From bd3239d2bbe0de3a200b266503e3330b1e391489 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 22 Mar 2016 15:32:06 -0400 Subject: [PATCH] more --- 155903/core | Bin 65536 -> 0 bytes 306833/306833.F90 | 11 + 306833/blahblah.mod | 26 + 321197/pyside.ii | 44 + 321197/pyside.ii.0 | 124028 ++++++++++++++++++++++++ 321197/pyside.ii.1 | 80546 ++++++++++++++++ 321197/pyside.ii.2 | 498 + 321197/pyside.ii.3 | 379 + 321197/pyside.ii.4 | 221 + 321197/pyside.ii.5 | 192 + 321197/pyside.ii.6 | 179 + 321197/pyside.ii.7 | 58 + 321197/pyside.ii.8 | 65 + 321197/reduce-ice | 13 + 321325/lgc_pg-scenarios.pre.i | 23 + 321325/lgc_pg-scenarios.pre.i.0 | 5459 ++ 321325/lgc_pg-scenarios.pre.i.1 | 28 + 321325/reduce-ice | 13 + 326285/libtest.so | Bin 0 -> 5837 bytes 326285/test1.c | 1 + 326285/test2.c | 1 + 332927/crash.c | 23 + 334889/Makefile | 3 + 334889/boxdraw.c | 0 334889/console.c | 0 334889/libfoo.a | Bin 0 -> 2054 bytes 334889/smbios.c | 0 353816/busybox.c | 3 + 353816/busybox.i | 21 + 353816/busybox.i.0 | 5336 ++ 353816/busybox.i.1 | 38 + 353816/busybox.i.2 | 31 + 353816/reduce-ice | 13 + 360229/reduce-ice | 13 + 360229/xapian_wrap.i | 34 + 360229/xapian_wrap.i.0 | 63091 +++++++++++++ 360229/xapian_wrap.i.1 | 59 + 360229/xapian_wrap.i.2 | 35 + 388835/aesni-intel_glue.i | 32 + 388835/aesni-intel_glue.i.0 | 21716 +++++ 388835/aesni-intel_glue.i.1 | 394 + 388835/aesni-intel_glue.i.10 | 107 + 388835/aesni-intel_glue.i.11 | 102 + 388835/aesni-intel_glue.i.2 | 306 + 388835/aesni-intel_glue.i.3 | 306 + 388835/aesni-intel_glue.i.4 | 230 + 388835/aesni-intel_glue.i.5 | 230 + 388835/aesni-intel_glue.i.6 | 184 + 388835/aesni-intel_glue.i.7 | 163 + 388835/aesni-intel_glue.i.8 | 164 + 388835/aesni-intel_glue.i.9 | 155 + 388835/reduce-ice | 13 + 394889/foo.i | 21465 +++++ 394889/reduce-ice | 13 + 394889/s_triangle.i | 103 + 394889/s_triangle.i.0 | 21465 +++++ 394889/s_triangle.i.1 | 13412 +++ 394889/s_triangle.i.10 | 214 + 394889/s_triangle.i.11 | 214 + 394889/s_triangle.i.12 | 207 + 394889/s_triangle.i.13 | 174 + 394889/s_triangle.i.14 | 146 + 394889/s_triangle.i.15 | 122 + 394889/s_triangle.i.16 | 119 + 394889/s_triangle.i.17 | 104 + 394889/s_triangle.i.2 | 428 + 394889/s_triangle.i.3 | 382 + 394889/s_triangle.i.4 | 383 + 394889/s_triangle.i.5 | 388 + 394889/s_triangle.i.6 | 370 + 394889/s_triangle.i.7 | 368 + 394889/s_triangle.i.8 | 323 + 394889/s_triangle.i.9 | 233 + 395151/addr.i | 57715 ++++++++++++ 411691/id_manager.i | 57 + 411691/id_manager.i.0 | 92496 ++++++++++++++++++ 411691/id_manager.i.1 | 333 + 411691/id_manager.i.2 | 314 + 411691/id_manager.i.3 | 247 + 411691/id_manager.i.4 | 243 + 411691/id_manager.i.5 | 209 + 411691/id_manager.i.6 | 70 + 411691/id_manager.i.7 | 67 + 411691/id_manager.i.8 | 64 + 411691/id_manager.i.9 | 61 + 411691/reduce-ice | 13 + 434452/ObjectImpl.ii | 63541 +++++++++++++ 434452/ObjectImpl.ii.0 | 63541 +++++++++++++ 434452/reduce-ice | 13 + 434908/op_helper.i | 30286 ++++++ 462550/bug462550.ii | 145854 +++++++++++++++++++++++++++++ 462550/bug462550.ii.0 | 145854 +++++++++++++++++++++++++++++ 462550/reduce-ice | 16 + 490546/fxprintf.i | 11 + 490546/fxprintf.i.0 | 14146 +++ 490546/fxprintf.i.1 | 28 + 490546/reduce-ice | 13 + 505182/reduce-ice | 13 + 505182/ssh-keygen.i | 1736 + 505182/ssh-keygen.i.0 | 10788 +++ 505182/ssh-keygen.i.1 | 1736 + 529496/ipaddress.i | 13959 +++ 555418/mips.c | 137 + 555418/mips.s | 205 + 568732/reduce-ice | 35 + 568732/writepart.c | 55 + 568732/writepart.i | 57 + 568732/writepart.i.0 | 5190 + 571482/jsxml.ii | 78 + 571482/jsxml.ii.0 | 38814 ++++++++ 571482/jsxml.ii.1 | 25382 +++++ 571482/jsxml.ii.2 | 425 + 571482/jsxml.ii.3 | 443 + 571482/jsxml.ii.4 | 292 + 571482/jsxml.ii.5 | 249 + 571482/jsxml.ii.6 | 143 + 571482/jsxml.ii.7 | 111 + 571482/jsxml.ii.8 | 77 + 571482/jsxml.ii.9 | 84 + 571482/reduce-ice | 13 + 573068/test.ii | 13 + bfin-4845/reduce-ice | 13 + bfin-4845/trace.i | 26 + bfin-4845/trace.i.0 | 19813 ++++ bfin-4845/trace.i.1 | 100 + bfin-4845/trace.i.2 | 70 + bfin-4845/trace.i.3 | 47 + bfin-4845/trace.i.4 | 48 + bfin-4845/trace.i.5 | 40 + bfin-4845/trace.i.6 | 31 + bfin-4845/trace.i.7 | 27 + bfin-4845/trace.i.8 | 35 + bfin-text-sect-attrs/ldso.i | 37 + bfin-text-sect-attrs/ldso.i.0 | 12681 +++ bfin-text-sect-attrs/reduce-ice | 13 + 135 files changed, 1113428 insertions(+) delete mode 100644 155903/core create mode 100644 306833/306833.F90 create mode 100644 306833/blahblah.mod create mode 100644 321197/pyside.ii create mode 100644 321197/pyside.ii.0 create mode 100644 321197/pyside.ii.1 create mode 100644 321197/pyside.ii.2 create mode 100644 321197/pyside.ii.3 create mode 100644 321197/pyside.ii.4 create mode 100644 321197/pyside.ii.5 create mode 100644 321197/pyside.ii.6 create mode 100644 321197/pyside.ii.7 create mode 100644 321197/pyside.ii.8 create mode 100755 321197/reduce-ice create mode 100644 321325/lgc_pg-scenarios.pre.i create mode 100644 321325/lgc_pg-scenarios.pre.i.0 create mode 100644 321325/lgc_pg-scenarios.pre.i.1 create mode 100755 321325/reduce-ice create mode 100755 326285/libtest.so create mode 100644 326285/test1.c create mode 100644 326285/test2.c create mode 100644 332927/crash.c create mode 100644 334889/Makefile create mode 100644 334889/boxdraw.c create mode 100644 334889/console.c create mode 100644 334889/libfoo.a create mode 100644 334889/smbios.c create mode 100644 353816/busybox.c create mode 100644 353816/busybox.i create mode 100644 353816/busybox.i.0 create mode 100644 353816/busybox.i.1 create mode 100644 353816/busybox.i.2 create mode 100755 353816/reduce-ice create mode 100755 360229/reduce-ice create mode 100644 360229/xapian_wrap.i create mode 100644 360229/xapian_wrap.i.0 create mode 100644 360229/xapian_wrap.i.1 create mode 100644 360229/xapian_wrap.i.2 create mode 100644 388835/aesni-intel_glue.i create mode 100644 388835/aesni-intel_glue.i.0 create mode 100644 388835/aesni-intel_glue.i.1 create mode 100644 388835/aesni-intel_glue.i.10 create mode 100644 388835/aesni-intel_glue.i.11 create mode 100644 388835/aesni-intel_glue.i.2 create mode 100644 388835/aesni-intel_glue.i.3 create mode 100644 388835/aesni-intel_glue.i.4 create mode 100644 388835/aesni-intel_glue.i.5 create mode 100644 388835/aesni-intel_glue.i.6 create mode 100644 388835/aesni-intel_glue.i.7 create mode 100644 388835/aesni-intel_glue.i.8 create mode 100644 388835/aesni-intel_glue.i.9 create mode 100755 388835/reduce-ice create mode 100644 394889/foo.i create mode 100755 394889/reduce-ice create mode 100644 394889/s_triangle.i create mode 100644 394889/s_triangle.i.0 create mode 100644 394889/s_triangle.i.1 create mode 100644 394889/s_triangle.i.10 create mode 100644 394889/s_triangle.i.11 create mode 100644 394889/s_triangle.i.12 create mode 100644 394889/s_triangle.i.13 create mode 100644 394889/s_triangle.i.14 create mode 100644 394889/s_triangle.i.15 create mode 100644 394889/s_triangle.i.16 create mode 100644 394889/s_triangle.i.17 create mode 100644 394889/s_triangle.i.2 create mode 100644 394889/s_triangle.i.3 create mode 100644 394889/s_triangle.i.4 create mode 100644 394889/s_triangle.i.5 create mode 100644 394889/s_triangle.i.6 create mode 100644 394889/s_triangle.i.7 create mode 100644 394889/s_triangle.i.8 create mode 100644 394889/s_triangle.i.9 create mode 100644 395151/addr.i create mode 100644 411691/id_manager.i create mode 100644 411691/id_manager.i.0 create mode 100644 411691/id_manager.i.1 create mode 100644 411691/id_manager.i.2 create mode 100644 411691/id_manager.i.3 create mode 100644 411691/id_manager.i.4 create mode 100644 411691/id_manager.i.5 create mode 100644 411691/id_manager.i.6 create mode 100644 411691/id_manager.i.7 create mode 100644 411691/id_manager.i.8 create mode 100644 411691/id_manager.i.9 create mode 100755 411691/reduce-ice create mode 100644 434452/ObjectImpl.ii create mode 100644 434452/ObjectImpl.ii.0 create mode 100755 434452/reduce-ice create mode 100644 434908/op_helper.i create mode 100644 462550/bug462550.ii create mode 100644 462550/bug462550.ii.0 create mode 100755 462550/reduce-ice create mode 100644 490546/fxprintf.i create mode 100644 490546/fxprintf.i.0 create mode 100644 490546/fxprintf.i.1 create mode 100755 490546/reduce-ice create mode 100755 505182/reduce-ice create mode 100644 505182/ssh-keygen.i create mode 100644 505182/ssh-keygen.i.0 create mode 100644 505182/ssh-keygen.i.1 create mode 100644 529496/ipaddress.i create mode 100644 555418/mips.c create mode 100644 555418/mips.s create mode 100755 568732/reduce-ice create mode 100644 568732/writepart.c create mode 100644 568732/writepart.i create mode 100644 568732/writepart.i.0 create mode 100644 571482/jsxml.ii create mode 100644 571482/jsxml.ii.0 create mode 100644 571482/jsxml.ii.1 create mode 100644 571482/jsxml.ii.2 create mode 100644 571482/jsxml.ii.3 create mode 100644 571482/jsxml.ii.4 create mode 100644 571482/jsxml.ii.5 create mode 100644 571482/jsxml.ii.6 create mode 100644 571482/jsxml.ii.7 create mode 100644 571482/jsxml.ii.8 create mode 100644 571482/jsxml.ii.9 create mode 100755 571482/reduce-ice create mode 100644 573068/test.ii create mode 100755 bfin-4845/reduce-ice create mode 100644 bfin-4845/trace.i create mode 100644 bfin-4845/trace.i.0 create mode 100644 bfin-4845/trace.i.1 create mode 100644 bfin-4845/trace.i.2 create mode 100644 bfin-4845/trace.i.3 create mode 100644 bfin-4845/trace.i.4 create mode 100644 bfin-4845/trace.i.5 create mode 100644 bfin-4845/trace.i.6 create mode 100644 bfin-4845/trace.i.7 create mode 100644 bfin-4845/trace.i.8 create mode 100644 bfin-text-sect-attrs/ldso.i create mode 100644 bfin-text-sect-attrs/ldso.i.0 create mode 100755 bfin-text-sect-attrs/reduce-ice diff --git a/155903/core b/155903/core deleted file mode 100644 index 9464e515a956cfa9a9fe5fdc72f63514e0d83f76..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 65536 zcmeHw4SZC^z4qB;15q(XM2nT`s?o+uz94*)HX*wtDIr;spjgq(l3kL8O?KHmf#B7e z7!W90V@q#st2SENYwz_VT5eyoRKtgWtwMs7(2DoQ%Bgt8Hhqh}h`inRdCobrd$J@U zfPHQ4nf#ue`G3rRX8vc+oSE6#le-{jB!X2+lmwM4n22*Fn{TJ^k|c zt6vA?ef{PA>~})m+;Re+YTZt$Umy6rk%%hiM{3;lG0Gt`%6aMS{|9(S%ijc=VEqJ= zKa`~8KWOr?;1fdTRAi40a+@wsgNzXJB&6E__LIW$3I`(T0)FVhn0~uJl4_@Dc<*kZ zF?f7z?>?n#eai{jZa=E|Z!>7-xKRhwH9!R6fmUnswMgHSV39ULk2(yj+WId#uUA|Dz~JxKN9v6g~c&9$$p`s&DFjQ0JME z=>gLNrUy(9m>w`aV0ysxfaw9#1D~D;?v7jkC+O>c&hxqcUv<7#H?IGarF49LL0#fd z#x(<>F4QdAx`As5bv*$(w*_*5`vwGMV5>kRsrv)SFGE0Z-67WBDsKa105eztv2Nk| zb1n4OLPqQcO;FA&iSbu^%C5ZgZms-822+2s-Y-IU;i?aNl48O0T zu_-eg$ef_@xxPZNQc>A_YD=sqZF1d2pRj$b19c4BC!n-Io%oQaGaf~z(MV?k{#Dvq z?P9FBXiEee5|;`BF=@&5)#a`VZ>=vZdqahOcR1_~OD%xs!Y&`Y-)}3URYhF~*6wwk_?UN7os8(n&!Bv)tqtW?wjQ+} zVV+xCwpYQg>%V;xveo<-W%82Y5h?UL}cG%jMk^F z-q-lv&Lqk$$fW5%whG;Hb*DUfGs{5Yyj|8b@*-W(xxX~ciYi8yorLzh)}yJr9LK4* z-f?^vV@b``x+C?L+wOOt)GMM@hxT9De!qOZbpMtwQWf;gH&q^?t6R3O!-~H3=(r<4 z`fDU|f2$1*x&PbzyrFCB@q~4bKKa_5$hrgT9jQg@>}kpC9itFg*E^EeS<@nyweGY| zyQ{D9t=1jmZoS?0%J%i+(oi()(^rr2K5RW6kw@pe5$Rgr8YKCi6`aPt)*V*OUAnID z>q+#7BU@0FTOelNw&=YcHBzsch}jPIWA-8LDcp&%hkFX8dOxqjJP?TJZiNe+_#VOQPrK+JoI9f;!+V^lL>2Oo6`ur7Uw zr-MfFjDtERp)PIy9;JHZHsu9_on|=hj18I@Ob?hIFg;*;!1RFW0n-Df2TTu`9xy#% zdcgF6=>gLNp8*dvzmBt1$My46L$s&kC!I?Ae{?F0RW+P%k)-n@ODu5npZXp0`$*f6rtSwwk4Ku%{g08J ziZqha6@{m%8+2Zn-K}f`eg_-_tVP|*I3Nos0jhxza4&GAxm)=j;tpUNum?B{oCK1K zyOnEz9H0Pj0&d`LU{p)D@@>SA1J44l00)4hz{kLN$VZlRE7t*E0V)75@O8im8QbzL zq@MyhfkVItfc2~0%4pz5pctqDLO?6bKoRgT=pDdOVAMU`%1pomJOtbh`7&S!(#?n;0S+Vm zG~$o_JwPw;7a*m)Te%XL2$Ta~1L&vt5Cne(&;r~Gd>`llHUry$ zH-O&*$AJr++BLlzaRx9IumkgeTLC{H18adtfaic;0dE5z0T<81bpbMf89;np{vPQ$ zsAoA)2`mK`0Ji~)fW^QPAOOg~O5p3jFM(EIE${%a0r(#9DDWfT3E(NWfuFMw^p zF5oqw3)m0*J^CZQPR+iZN@v|prLPv_CeQ^qm+Vw}5y$KPE$Qs${^j-E)1Mx0*}cEk z##-B}T0CUF=l3b?nXjGF&P|0F7a;4+7+5B3?plN~Q4ol4uIW~vc}o%hUp(-HXc=gx z??a5ULXqzw=Ck2Zo&Ph$JVLe^G0z}9xnX#H=hx7`iH7y?OVHvuD|p5@!GkdcxDl`e z`%zBY@;yp5&<=C}oj_{S9>oUa---0U>`|OZcdZBS8=wIvkPl=7?cYKC;2x#7ZI2=$ zZu=HwjDHAQ-`}GIfi@r;bQj{(F39(wETC;K%0}!2x(>n?kbMAh#7@MWJ@&FyBuw4cj;(WxtRnSGc3$XzCop-|? zklzeBAhjS3u%5je!21^RJ_x%Hz~*|?b1mrAnw&a^e=+#J>Yrv}4&vLU+Oi@ZL>6aLW0$LKj>!2STCzJ zA>nDz)#aML)oQW41iH6K$SsyPK|5Ws{Kr7&-z?+_3DU2%H0_;DxaH=7?^E7`obS!2 z(TSKNPS@s%QobHf)?-7V3ro9{p8yiTye}2P_Ds;Tx|AZ&l>qq#?rx>=_HN~cTf3D9 zp|jZ0tvt4{TlwuR-O4jx#8pxj$^W9MXM>W(l)5i-i<^r5=6RKY+L^xf3o|hK+28yk-Fh3ju z->)59F6<4Je<)caPVm0;;s;40=JggqwDEN9<9XO?T`}LVy$r+6AAs%%wEuh{1sDxn z27Dg461WDq0mufX0<(ZQKm~9s-~wuZT3{&<0K&iu;9r2dfmUD*upam}@G$T=K>a6x zr-0{x=Yj3OuYvu*n?Nt{HgFuU;M$+B_W|L1W6XAwuEzZk1e$?1pdIJ{I)N_WD3JU^ z+)scLkbyQ}6R-o=4;%)L0oHb`2Y@sn7qA0WfCrF)4Zvog3!wfH#3zB&$FSxAssI^y z2-pJb2KEE#k9RAjKoH2qJr$43(2nU_vMpl~GyQoTY~MJb9r<{TPuD*<7r6l)Yae3K zC+H^;PM3cq6mwCI(a$11obtKOUVGQT`GuYM*jUfg)epmzR2WykGs(|69DQrd16DMg zu6&*`pNssP(8j}n59t-aYT(-d+xD0qi+27P^iP4bqg{iRD=Kih@_By!TthGF(fj@& zb@?Uc*Dqln4YY6Hr*yu!PiY2NX6IJK+x98>Ks(S2*q|fjYR^1A`&j=o#X#+GzK%6b z`3|LbE7mzcN7qipwr8i3-2?v1JC*$HJC*8fh>>>g->C#&-KjJKPJp~>!~@wCywo|c z`G=T&sRVfok+_5_cwEuD7rkH=)ZbLc+x(5F^ zkv^S&g#C`n!R@!9{|sb5cn0>X&%%Cu{oB8J=5zAq0DLfv>yrw-v$_7xmFS26g}lGj z?!Wxs#m0~7L$UtV*MxpI$oMf-|LTR^j<28I{!ru7Q1;vYf_3G4SX1_4EhxsnBj92D zYdebdAjUuEpRum|AFLNKez1RaBF+1+{SbJdhq6D|_`&{ry8Ao+`in8u7z_JO*c0_v z$G^vL&pf30pZ&KN^%eCOZjSKd6v zeMS9^{*F&$IeT{kp2hq=MXa}ljs*#V-+>SV1?Fd7+7Rn=p(pYQJA%*H?f1F)lT(H* z*4GuUT;~mGr1T`{+EAb|s7fWg?(21>E)bS=vGfq=2Cp1d*`(1c0->d<%EO?8_(kgq zk7i&a=}RkzXGw4vTMlVg0o&X*8hL-zkv(#ZMRZzDTz zvPhptrN$+Umc}6#zTfn0r^30gec4upYr_49I~D#$@*U(8zmeoxfbYNJoHrjZ{x-5I zX`8~|Ms9jztHR$#w%-u@Z6x+J16$H9681v_%yT6$7Wi2Itt5XtDc@+3&_|-bogBYw zt8xN#&tM%2`QrnAa~a_tYVfz1XTGyfNq-%4$+s}SJcxN^7kIcHxe2c;`H8P9e&85% zr$VO_a_QZdmGMa1khl5jUCLDG*`c!#=)gWO_rUhUh76dS~ z-?F{@su!2Nv3*?GrfDCQZ9M*L^ZL^C?eAay=A4(-DEZI5a>blKzWdJ8_Y@W^y|wap zFTeN~xG2IpaO~;AVpWVm+|#Gy+1II)jCi2Hyk{C{&zOg0vK-!bjK2Vo$KNvZhuQf6 z^N`0MB`<)Iu)#6)zp>{^8F+VdKbC4DP(~dg=l-maF{bPygPi-dMmc51{M^4a$|=hO zgnjPk8s(H3^WPRHuaA@86(?t2>InPX|25iw1hmmU_k)dc%BUmqbAQ+ARF_+#ix-m(qggAd!am z+g-1}ZR(uFtuDjeTjcKg~D+zUWss5NmBueH_m_ z6I%51jd)ik(+q0<1DcP{#8y=ISFyaS&Z2%cjIX>_45B_AarNu`gz9(iS=6r+^w`aV0ysxfaw9#1EvQ|511Y}jRzLqXa3Ka)40eK zn;tMdV0ysxfaw9#1EvQ|511Y>Jz#pk^nmFB(*vdlOb?hIFg;*;!1Tap+ygu?RrOE2 zUv3^4`;2#Rvw5ZmOb?hIFg;*;!1RFW0n-Df2TTuqVjh^8eLy+%;~w>QbzMK`QTV>M zGYKN^LFDCoCd^=Z!1RFWfxndpvi!b96DRPqCNmt!`yFpVpW{MV5b__TQ>;PT`_5->FH97?PFz}?#-)NAJ+Otm?1B?Ss8u(VwGXWad zr1Q7vajwo6Wt4)p1LJ`-fcX{zLOxVnHB7ysYz$YH3x77Bw+&-D-}ci#?EbJvQD3@Z zU~k^qscgYJh{*Z^Ube#b1NG{D7ixSbP&Rq6y#?>9kviamt?^JpfFK@Bw zw#kd{Xj=a}g)OOl4gC&T`lsQmezG{4`a^}Rd#uT+J|ADBDp`>pN|&;}w<3`b8lN8a zYi;K5+^Pus%b*75 z_FfCxdHu@h)W#^!gKcAdNE`h}TJzfApI@DQpr8M%KpXvkJ7{Bj>p&aZD}y$+=j))2 z_0KmH&3?!}t@cL)-%OewFg;*;!1TaBp$C%iO1hnqhz)Ty;#|aSi245?s&_>q9>jd- zBZK9R3dwS3vgL|VR_j_kNciq^zJt==^w;Qgkn^u>Al(v)@c&Fm1u4m^6YLiz72KO> z16fKywg<5$n{{DQ$-UOrB*z*~T5JH{2YMVjKjp(p&EH>#Wo`ggB}O7&WG10g*qU^& zbxk7Wo2WA)61kNx!5l!oAM9gaiA2Ul%Wzznr02I$M&w5#PjQkc^3S66*{yJiTFd_QI5WXNtWh1v5pKxrOC#jzsvsJ=l)cgsK$lcJ107gv<$HHoco+*Gh+$PYt)i!Lt^ zuCuo$mfmZ%uSv46PFRqVx(kAx$iKZH#riUISzZV7Cch9Xk9FSxUM_e8`JorG1&|3p z(8e+FHiF0Z05Xu5jK0{L)B+j&?SWzt`>yQAOdF{~K z_{&J-I;0uMTL4}sc+aRD&7L2;lP^XhKhW)=d27(%gv9lhlw?@7?!@(k{s!pDosq}_ z=0#z}YZ7LkHzHxdPKPKQlxOE`)(1Jtos=7(zfFMQ#o4SNe3?E^fG(orL(fQA)_b7c6dz4_$0i~m?M@gO6 zqvX2``9)8|38WE8a4q#+2MCNY`^#(M#MwqF=eI){vJILyBlKP z?XjNDOV&rnj@v=2qX@<|TM52n%s-&ywpf!-;{Rn(*Z5uCIK#b@i~D{&U z8*l4Naf}@pcgF!_^Lt~Ci`COKTBvetRMW7{@oJ0l`6QG+;dnou1ME-i5B%PEDD%xv zTBK%9I6mc&kN)fg@Tigc=JrJ2ao!7mvMn||T+$I^Iwht5N2kX71MUOepEGqoi~ET8 z#VEr)fNat5#v@vTsVkmYZLO~>nU|csBc4E=cs9U>cs3XE=(49aV@KBtr5A<>JzGF@9MZ8;= zAJJoBW2iV4d6R*mbOw`+J`?1we0Eqi&aE=O7b9d&(#n1^8&8)CL$A!vTJ#+d$CVu(RX zvOk=~#bs6)3)C!9Y61(n0}9U^Q^yRZ2TTu`9{4PKpe6s*XR~PUmh14nYD>$BEm)r& zY;8Gl40({7rD4zqP)oaJqoWU^U%jCA7!%|3@pp|%+In)TDCdmp*mL6(TS zbXuH+rcb~46RqzoeN3w(pUo_z?%tLYQ?_DH7G?69iE^FbLmWLz%>48Zc?|lT*HUdb zm))z+Yxum^<1>Ndlt#XGotkg4NZg2i;-J>fT*-!YW4h#! z>=M_jlnGQLJCOt)+e6#EAEZWcDQH5pHC7s!2%_&ZKmAEL&vpyceG&D*!4sBCIr|X* zC#panXo7NA5c8!gO*cW%;njgSkJ$2{3en8=wZ=O4z1KJKWV}Bq)!ab+=cb-9XG#BzC0OhH}ve~ZPQ3(Mvjkf?&Knu7;a*;J%CpXT*sUSW?kLoeFEvRFsbtOxTj zT?{^d7s9eYT3A2wMKF$aqvv_`V#d!4fU>VgWXc_oWMbpGx|xbo{XQ> z)2dCw$4S(0)~``ksGs+~C;b)O#ynkK) zK4_H1r^PtO!Gpfugf*ggE@&eP#t`r>iqAMq`sT3@ME9iGMqXQv2Mj!~HBgZC_2)n` zBTw89M&933T8u&bZHuT^JH`_FfMXD!&)frHKiZ9c)b|bC_lP+L34IZZF-XwV%`D6N zkog#kF-XWoOdq|6ft%%W4Eh4f=pm{w3|PEYKFIRcn70_QD>5&V%6d|FfszH%iR+TgXXs-;@8Nm}%PSf-D`pnaSJK z|5M%xJwdY`{7#*D?)se8|3y71qYeIVbJ}5^7ap-*x%A4Se${XH_bBxvx2gW8fct>d z|1)A4Wr;FaZUu)N;ZG6av#IDd-D7rNxf#Kl41L?Fp)qShX3mt%N!gj%nK={Ujn&rF44yGJGbb}g%Ml35Sxxo6 zhT0V|3(MrJiCLaNO-y5X{R&oiMIf{^EW2f2pn)=}_-lDN+1XNMWwEQE$Wd11a+cWh zCQQSDjFQ=vdA9S;mx`Q4x~QaVc6nZwTp!G;4c2BXYnsq7zb30PlZ3n0+aOP$FfDiT z^c<uZ%#zBwblFF*elCL>fD2gpCFDhA2m^g8I7-|qr zn(h&aMIKEwBRgk$jUgQfQ8RnejEPfb9HwjUQ29)|LrbD**&XBi@2HFN@9+g<>1gU} z(Uig5qB|x;*^6Sa3^TZY@0-CAb?^ zHj|6}27bK{wSztdNTXqbSc>i;(!q&_bj)a=R;vUvhhpk0-0-uSRVuR2abdW0Etp-E zmm?L;$5`nqEibUE!=rJSt!?!Ay;(V#Q?=*Md<>qI<%JkL`HTsN>oRLauinS!?9Pc z$qKt0Jc|NNnI2mf$=aGg!(uJTXO*vEaX?T_^^3Dsco$8m(HJ4`a*sEd5%MlVg*}oJ zPfGpy!v`Bi@~~Q`!t%LuORDf#8L(P-N~zC~`C)Hpmb*@W{*a|Ve)w?7%G4e`+B3&- zlcS=tq`WK-kB-TiQ!^*w8IqkN%`UB)&%L>&Gx1_K7CzL*tyiyyXYM23IoHh?I7)ijk9h;O~@BMmnPH& zgTw9^167~-CuC-yeFJ!|_*@#mg~mDO@3){BW2oQ#e)80%!_BYi4&6sEFXqZ> zplhTqZ1C=zVK%JZ7d)pf#r)^!8r6c=KV0_=+-RJXAGU=CUm!dogJU92GejLVF*7%F z(%^m#23B}O=sLq3R|l%4FmY~Uh_Etr56Kz4CEP!lN|Pvs&Y)?U^A=1-4Ku*v#{f!jzTP^w4kgg&)a|*n}mga zrMh&^%a)3eeOCGWGJB<~+*wtbm(dW&K+VFKoJx+uVq|i_x;D@2KP$D(Jf)UjMwWuY zV$=ln&?bM_rI6;>$>~2;Q#+N`v(()uY2Ms|IgU!FqcBh3OSsic(i z->Qo8Qnf;{-iFD)918fQ!ka2x6_v$#SZ=77mrkwBQzy>$f~o>n>{_U^Z0#b5zHVR{ zb_LZ6mpdJ0d3SPc5cCCcysXZ4U08C?iB8937e&2Kv|XU!Qgu<{tChId7E{qC_*|iA zDdyiSyal!61|_-upG-lw{e9v*e%w7m1SJj zEy&5qYFfI;rru2bJcS+AhQ+?x{t|D)^8So)U8C&5>|Nt(O%)kWxqh~+7|ZSVxx*SG zI)r!v7)cu9xmf;5MXp&D<#QZm(Qa3X#p(iWU0G6fi?}5hxEtlVK*%SrjO|wHJC&}y zOv4_rF@5TmvdJ+$V0ysxfaw9#1EvQ|511Y>Jz#p^)AGPz=XH4|h39eW^n)cluWQAr z){Ah0#3Cxo^Ju_s96}*@CPkd5wS(qw%Lu-?g5cQ|fn*$T;kh@0=iLY)<9S&dC ztrqqut)0Btf_7{23pIbiKF{`yhJC&RQG|=7KS!=7f&46qr-%982$s+Kj^+s;musmv z)Zq2ImWNk{apcAyRYZU0BA`zKM? z1)EpE%th+Z^-0+KN3*f{DXsZDZ^-eLp_JdAAm%%lELSAXup!Mcw-+z4;aKqBe~m3M2VhB~falqlOqq)G{L zcB&;o9-o?!Ag8A$Cdg^2NeS|})Da2t*wm2;@|e`*1bOBxXpd91$5T6<+G*6bQF|=4 z$51|G-;vvRsA%d98 zTnz@gvwA&vElxmi8FeKQjc>P8}!nI z5@Mlu57I)9a~wMxM1~%O-hH4cq94?GA1c8ygfs*7*skvY%uYV%NL!#c3TY9jM+hCk b=lt?fLFjS=X(mk%m>w`aV0z#TJ@EekzIy1g diff --git a/306833/306833.F90 b/306833/306833.F90 new file mode 100644 index 0000000..433d08d --- /dev/null +++ b/306833/306833.F90 @@ -0,0 +1,11 @@ +module blahblah + character(len=1), parameter :: ch10 = char(10) +end module + +program testme3 + use blahblah + implicit none + character(len=100) :: message + + write(6, '(a,a)') ch10,'invars1m : enter jdtset=' +end program diff --git a/306833/blahblah.mod b/306833/blahblah.mod new file mode 100644 index 0000000..65015e9 --- /dev/null +++ b/306833/blahblah.mod @@ -0,0 +1,26 @@ +GFORTRAN module version '0' created from 306833.F90 on Thu Jun 10 01:36:29 2010 +MD5:6828906e838de8e1da29ae7df345f08c -- If you edit this, you'll get what you deserve. + +(() () () () () () () () () () () () () () () () () () () () () () () () +() () ()) + +() + +() + +() + +() + +(2 'blahblah' 'blahblah' 'blahblah' 1 ((MODULE UNKNOWN-INTENT +UNKNOWN-PROC UNKNOWN UNKNOWN) (UNKNOWN 0 0 0 UNKNOWN ()) 0 0 () () 0 () +() () 0 0) +3 'ch10' 'blahblah' 'ch10' 1 ((PARAMETER UNKNOWN-INTENT UNKNOWN-PROC +UNKNOWN IMPLICIT-SAVE) (CHARACTER 1 0 0 CHARACTER ((CONSTANT (INTEGER 4 +0 0 INTEGER ()) 0 '1'))) 0 0 () (CONSTANT (CHARACTER 1 0 0 CHARACTER (())) +0 1 '\U0000000a') () 0 () () () 0 0) +4 'char' '(intrinsic)' 'char' 1 ((PROCEDURE UNKNOWN-INTENT UNKNOWN-PROC +UNKNOWN UNKNOWN FUNCTION) (REAL 4 0 0 REAL ()) 0 0 () () 4 () () () 0 0) +) + +('blahblah' 0 2 'ch10' 0 3 'char' 0 4) diff --git a/321197/pyside.ii b/321197/pyside.ii new file mode 100644 index 0000000..b018968 --- /dev/null +++ b/321197/pyside.ii @@ -0,0 +1,44 @@ +class QString { public:inline QString(const int i); }; +class object {}; +template < class T > struct rvalue_from_python_data { + ~rvalue_from_python_data(); +}; +template < class T > struct extract_rvalue { + typedef const T & result_type; + mutable rvalue_from_python_data < T > m_data; +}; +template < class T > struct extract:extract_rvalue < T > { + private:typedef extract_rvalue < T > base; + public:typedef typename base::result_type result_type; + operator result_type() const {} + extract(object const &); +}; +template < class Key, class T > class QHash { + public:inline QHash() {} + T & operator[](const Key & key); +}; + +class type_details { + typedef object(*func_python_to_cpp_type) (const object &); + public: + template < typename T > static type_details *create_value_type_details() { + type_details *self = new type_details(); + self->m_func_python_to_cpp = &python_to_value_type < T >; + } func_python_to_cpp_type m_func_python_to_cpp; + template < class T > static object python_to_value_type(const object & obj) { + T *val = new T(extract < T > (obj)); + } +}; + +class type_manager { + public: static type_manager & instance(); + template < typename T > void register_value_type() { + m_type_map[0] = type_details::create_value_type_details < T > (); + } + QHash < QString, type_details * >m_type_map; +}; + +void foo() +{ + type_manager::instance().register_value_type < object > (); +} diff --git a/321197/pyside.ii.0 b/321197/pyside.ii.0 new file mode 100644 index 0000000..502bb24 --- /dev/null +++ b/321197/pyside.ii.0 @@ -0,0 +1,124028 @@ +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3_build/PySide/QtWebKit/PySide/QtWebKit/qwebpage_extensionoption_wrapper.cpp" +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3_build/PySide/QtWebKit//" +# 1 "" +# 1 "" +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3_build/PySide/QtWebKit/PySide/QtWebKit/qwebpage_extensionoption_wrapper.cpp" +# 28 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3_build/PySide/QtWebKit/PySide/QtWebKit/qwebpage_extensionoption_wrapper.cpp" +# 1 "/usr/include/qt4/QtWebKit/qwebpage.h" 1 +# 24 "/usr/include/qt4/QtWebKit/qwebpage.h" +# 1 "/usr/include/qt4/QtWebKit/qwebsettings.h" 1 +# 23 "/usr/include/qt4/QtWebKit/qwebsettings.h" +# 1 "/usr/include/qt4/QtWebKit/qwebkitglobal.h" 1 +# 23 "/usr/include/qt4/QtWebKit/qwebkitglobal.h" +# 1 "/usr/include/qt4/QtCore/qglobal.h" 1 +# 45 "/usr/include/qt4/QtCore/qglobal.h" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 149 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 3 4 +typedef long int ptrdiff_t; +# 211 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 3 4 +typedef long unsigned int size_t; +# 46 "/usr/include/qt4/QtCore/qglobal.h" 2 +# 62 "/usr/include/qt4/QtCore/qglobal.h" +# 1 "/usr/include/qt4/QtCore/qconfig.h" 1 + + +# 1 "/usr/include/qt4/Gentoo/gentoo-qconfig.h" 1 +# 4 "/usr/include/qt4/QtCore/qconfig.h" 2 +# 63 "/usr/include/qt4/QtCore/qglobal.h" 2 +# 828 "/usr/include/qt4/QtCore/qglobal.h" + + + + + + + + + +typedef signed char qint8; +typedef unsigned char quint8; +typedef short qint16; +typedef unsigned short quint16; +typedef int qint32; +typedef unsigned int quint32; +# 851 "/usr/include/qt4/QtCore/qglobal.h" +typedef long long qint64; +typedef unsigned long long quint64; + + +typedef qint64 qlonglong; +typedef quint64 qulonglong; +# 881 "/usr/include/qt4/QtCore/qglobal.h" +template struct QIntegerForSize; +template <> struct QIntegerForSize<1> { typedef quint8 Unsigned; typedef qint8 Signed; }; +template <> struct QIntegerForSize<2> { typedef quint16 Unsigned; typedef qint16 Signed; }; +template <> struct QIntegerForSize<4> { typedef quint32 Unsigned; typedef qint32 Signed; }; +template <> struct QIntegerForSize<8> { typedef quint64 Unsigned; typedef qint64 Signed; }; +template struct QIntegerForSizeof: QIntegerForSize { }; +typedef QIntegerForSizeof::Unsigned quintptr; +typedef QIntegerForSizeof::Signed qptrdiff; + + + + + + +typedef unsigned char uchar; +typedef unsigned short ushort; +typedef unsigned int uint; +typedef unsigned long ulong; + +# 1063 "/usr/include/qt4/QtCore/qglobal.h" +typedef int QNoImplicitBoolCast; +# 1075 "/usr/include/qt4/QtCore/qglobal.h" +typedef double qreal; + + + + + + +template +inline T qAbs(const T &t) { return t >= 0 ? t : -t; } + +inline int qRound(qreal d) +{ return d >= 0.0 ? int(d + 0.5) : int(d - int(d-1) + 0.5) + int(d-1); } + + + + + +inline qint64 qRound64(qreal d) +{ return d >= 0.0 ? qint64(d + 0.5) : qint64(d - qreal(qint64(d-1)) + 0.5) + qint64(d-1); } + + +template +inline const T &qMin(const T &a, const T &b) { if (a < b) return a; return b; } +template +inline const T &qMax(const T &a, const T &b) { if (a < b) return b; return a; } +template +inline const T &qBound(const T &min, const T &val, const T &max) +{ return qMax(min, qMin(max, val)); } +# 1133 "/usr/include/qt4/QtCore/qglobal.h" +class QDataStream; +# 1158 "/usr/include/qt4/QtCore/qglobal.h" +# 1 "/usr/include/qt4/QtCore/qfeatures.h" 1 +# 1159 "/usr/include/qt4/QtCore/qglobal.h" 2 +# 1368 "/usr/include/qt4/QtCore/qglobal.h" +inline void qt_noop() {} +# 1401 "/usr/include/qt4/QtCore/qglobal.h" +class QString; +class QSysInfo { +public: + enum Sizes { + WordSize = (sizeof(void *)<<3) + }; +# 1416 "/usr/include/qt4/QtCore/qglobal.h" + enum Endian { + BigEndian, + LittleEndian + + + + + + + , ByteOrder = LittleEndian + + + + }; +# 1519 "/usr/include/qt4/QtCore/qglobal.h" +}; + + const char *qVersion(); + bool qSharedBuild(); +# 1592 "/usr/include/qt4/QtCore/qglobal.h" + void qDebug(const char *, ...) + + __attribute__ ((format (printf, 1, 2))) + +; + + void qWarning(const char *, ...) + + __attribute__ ((format (printf, 1, 2))) + +; + +class QString; + QString qt_error_string(int errorCode = -1); + void qCritical(const char *, ...) + + __attribute__ ((format (printf, 1, 2))) + +; + void qFatal(const char *, ...) + + __attribute__ ((format (printf, 1, 2))) + +; + + + + + void qErrnoWarning(int code, const char *msg, ...); + void qErrnoWarning(const char *msg, ...); +# 1632 "/usr/include/qt4/QtCore/qglobal.h" +class QDebug; +class QNoDebug; + + inline QDebug qDebug(); + inline QDebug qWarning(); + inline QDebug qCritical(); +# 1652 "/usr/include/qt4/QtCore/qglobal.h" + void qt_assert(const char *assertion, const char *file, int line); +# 1666 "/usr/include/qt4/QtCore/qglobal.h" + void qt_assert_x(const char *where, const char *what, const char *file, int line); +# 1676 "/usr/include/qt4/QtCore/qglobal.h" + void qt_check_pointer(const char *, int); + + + void qBadAlloc(); +# 1692 "/usr/include/qt4/QtCore/qglobal.h" +template +inline T *q_check_ptr(T *p) { do { if (!(p)) qBadAlloc(); } while (0); return p; } +# 1722 "/usr/include/qt4/QtCore/qglobal.h" +enum QtMsgType { QtDebugMsg, QtWarningMsg, QtCriticalMsg, QtFatalMsg, QtSystemMsg = QtCriticalMsg }; + + void qt_message_output(QtMsgType, const char *buf); + +typedef void (*QtMsgHandler)(QtMsgType, const char *); + QtMsgHandler qInstallMsgHandler(QtMsgHandler); +# 1776 "/usr/include/qt4/QtCore/qglobal.h" +template class QBasicAtomicPointer; + + +template +class QGlobalStatic +{ +public: + QBasicAtomicPointer pointer; + bool destroyed; +}; + + +template +class QGlobalStaticDeleter +{ +public: + QGlobalStatic &globalStatic; + QGlobalStaticDeleter(QGlobalStatic &_globalStatic) + : globalStatic(_globalStatic) + { } + + inline ~QGlobalStaticDeleter() + { + delete globalStatic.pointer; + globalStatic.pointer = 0; + globalStatic.destroyed = true; + } +}; +# 1853 "/usr/include/qt4/QtCore/qglobal.h" +class QBool +{ + bool b; + +public: + inline explicit QBool(bool B) : b(B) {} + inline operator const void *() const + { return b ? static_cast(this) : static_cast(0); } +}; + +inline bool operator==(QBool b1, bool b2) { return !b1 == !b2; } +inline bool operator==(bool b1, QBool b2) { return !b1 == !b2; } +inline bool operator==(QBool b1, QBool b2) { return !b1 == !b2; } +inline bool operator!=(QBool b1, bool b2) { return !b1 != !b2; } +inline bool operator!=(bool b1, QBool b2) { return !b1 != !b2; } +inline bool operator!=(QBool b1, QBool b2) { return !b1 != !b2; } + +static inline bool qFuzzyCompare(double p1, double p2) +{ + return (qAbs(p1 - p2) <= 0.000000000001 * qMin(qAbs(p1), qAbs(p2))); +} + +static inline bool qFuzzyCompare(float p1, float p2) +{ + return (qAbs(p1 - p2) <= 0.00001f * qMin(qAbs(p1), qAbs(p2))); +} + + + + +static inline bool qFuzzyIsNull(double d) +{ + return qAbs(d) <= 0.000000000001; +} + + + + +static inline bool qFuzzyIsNull(float f) +{ + return qAbs(f) <= 0.00001f; +} + + + + + + +static inline bool qIsNull(double d) +{ + union U { + double d; + quint64 u; + }; + U val; + val.d = d; + return val.u == quint64(0); +} + + + + + + +static inline bool qIsNull(float f) +{ + union U { + float f; + quint32 u; + }; + U val; + val.f = f; + return val.u == 0u; +} +# 1959 "/usr/include/qt4/QtCore/qglobal.h" +template inline bool qIsDetached(T &) { return true; } + +template +class QTypeInfo +{ +public: + enum { + isPointer = false, + isComplex = true, + isStatic = true, + isLarge = (sizeof(T)>sizeof(void*)), + isDummy = false + }; +}; + +template +class QTypeInfo +{ +public: + enum { + isPointer = true, + isComplex = false, + isStatic = false, + isLarge = false, + isDummy = false + }; +}; +# 2017 "/usr/include/qt4/QtCore/qglobal.h" +enum { + Q_COMPLEX_TYPE = 0, + Q_PRIMITIVE_TYPE = 0x1, + Q_STATIC_TYPE = 0, + Q_MOVABLE_TYPE = 0x2, + Q_DUMMY_TYPE = 0x4 +}; +# 2040 "/usr/include/qt4/QtCore/qglobal.h" +template +inline void qSwap(T &value1, T &value2) +{ + const T t = value1; + value1 = value2; + value2 = t; +} +# 2067 "/usr/include/qt4/QtCore/qglobal.h" +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(bool)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "bool"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(char)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "char"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(signed char)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "signed char"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(uchar)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "uchar"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(short)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "short"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(ushort)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "ushort"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(int)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "int"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(uint)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "uint"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(long)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "long"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(ulong)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "ulong"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(qint64)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "qint64"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(quint64)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "quint64"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(float)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "float"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(double)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "double"; } }; + +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(long double)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "long double"; } }; + + + + + + + void *qMalloc(size_t size); + void qFree(void *ptr); + void *qRealloc(void *ptr, size_t size); + void *qMallocAligned(size_t size, size_t alignment); + void *qReallocAligned(void *ptr, size_t size, size_t oldsize, size_t alignment); + void qFreeAligned(void *ptr); + void *qMemCopy(void *dest, const void *src, size_t n); + void *qMemSet(void *dest, int c, size_t n); +# 2137 "/usr/include/qt4/QtCore/qglobal.h" +class QFlag +{ + int i; +public: + inline QFlag(int i); + inline operator int() const { return i; } +}; + +inline QFlag::QFlag(int ai) : i(ai) {} + +class QIncompatibleFlag +{ + int i; +public: + inline explicit QIncompatibleFlag(int i); + inline operator int() const { return i; } +}; + +inline QIncompatibleFlag::QIncompatibleFlag(int ai) : i(ai) {} + + + + +template +class QFlags +{ + typedef void **Zero; + int i; +public: + typedef Enum enum_type; + inline QFlags(const QFlags &f) : i(f.i) {} + inline QFlags(Enum f) : i(f) {} + inline QFlags(Zero = 0) : i(0) {} + inline QFlags(QFlag f) : i(f) {} + + inline QFlags &operator=(const QFlags &f) { i = f.i; return *this; } + inline QFlags &operator&=(int mask) { i &= mask; return *this; } + inline QFlags &operator&=(uint mask) { i &= mask; return *this; } + inline QFlags &operator|=(QFlags f) { i |= f.i; return *this; } + inline QFlags &operator|=(Enum f) { i |= f; return *this; } + inline QFlags &operator^=(QFlags f) { i ^= f.i; return *this; } + inline QFlags &operator^=(Enum f) { i ^= f; return *this; } + + inline operator int() const { return i; } + + inline QFlags operator|(QFlags f) const { QFlags g; g.i = i | f.i; return g; } + inline QFlags operator|(Enum f) const { QFlags g; g.i = i | f; return g; } + inline QFlags operator^(QFlags f) const { QFlags g; g.i = i ^ f.i; return g; } + inline QFlags operator^(Enum f) const { QFlags g; g.i = i ^ f; return g; } + inline QFlags operator&(int mask) const { QFlags g; g.i = i & mask; return g; } + inline QFlags operator&(uint mask) const { QFlags g; g.i = i & mask; return g; } + inline QFlags operator&(Enum f) const { QFlags g; g.i = i & f; return g; } + inline QFlags operator~() const { QFlags g; g.i = ~i; return g; } + + inline bool operator!() const { return !i; } + + inline bool testFlag(Enum f) const { return (i & f) == f && (f != 0 || i == int(f) ); } +}; +# 2224 "/usr/include/qt4/QtCore/qglobal.h" +template +class QForeachContainer { +public: + inline QForeachContainer(const T& t) : c(t), brk(0), i(c.begin()), e(c.end()) { } + const T c; + int brk; + typename T::const_iterator i, e; +}; +# 2316 "/usr/include/qt4/QtCore/qglobal.h" +template static inline T *qGetPtrHelper(T *ptr) { return ptr; } +template static inline typename Wrapper::pointer qGetPtrHelper(const Wrapper &p) { return p.data(); } +# 2349 "/usr/include/qt4/QtCore/qglobal.h" + QString qtTrId(const char *id, int n = -1); +# 2379 "/usr/include/qt4/QtCore/qglobal.h" +class QByteArray; + QByteArray qgetenv(const char *varName); + bool qputenv(const char *varName, const QByteArray& value); + +inline int qIntCast(double f) { return int(f); } +inline int qIntCast(float f) { return int(f); } + + + + + void qsrand(uint seed); + int qrand(); +# 2552 "/usr/include/qt4/QtCore/qglobal.h" +enum QtValidLicenseForCoreModule { LicensedCore = true }; + + +enum QtValidLicenseForGuiModule { LicensedGui = true }; + + +enum QtValidLicenseForNetworkModule { LicensedNetwork = true }; + + +enum QtValidLicenseForOpenGLModule { LicensedOpenGL = true }; + + +enum QtValidLicenseForOpenVGModule { LicensedOpenVG = true }; + + +enum QtValidLicenseForSqlModule { LicensedSql = true }; + + +enum QtValidLicenseForMultimediaModule { LicensedMultimedia = true }; + + +enum QtValidLicenseForXmlModule { LicensedXml = true }; + + +enum QtValidLicenseForXmlPatternsModule { LicensedXmlPatterns = true }; + + +enum QtValidLicenseForHelpModule { LicensedHelp = true }; + + +enum QtValidLicenseForScriptModule { LicensedScript = true }; + + +enum QtValidLicenseForScriptToolsModule { LicensedScriptTools = true }; + + +enum QtValidLicenseForQt3SupportLightModule { LicensedQt3SupportLight = true }; + + +enum QtValidLicenseForQt3SupportModule { LicensedQt3Support = true }; + + +enum QtValidLicenseForSvgModule { LicensedSvg = true }; + + +enum QtValidLicenseForDeclarativeModule { LicensedDeclarative = true }; + + +enum QtValidLicenseForActiveQtModule { LicensedActiveQt = true }; + + +enum QtValidLicenseForTestModule { LicensedTest = true }; + + +enum QtValidLicenseForDBusModule { LicensedDBus = true }; +# 2640 "/usr/include/qt4/QtCore/qglobal.h" + + +# 24 "/usr/include/qt4/QtWebKit/qwebkitglobal.h" 2 +# 24 "/usr/include/qt4/QtWebKit/qwebsettings.h" 2 + +# 1 "/usr/include/qt4/QtCore/qstring.h" 1 +# 45 "/usr/include/qt4/QtCore/qstring.h" +# 1 "/usr/include/qt4/QtCore/qchar.h" 1 +# 47 "/usr/include/qt4/QtCore/qchar.h" + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +class QString; + +struct QLatin1Char +{ +public: + inline explicit QLatin1Char(char c) : ch(c) {} + + + + + inline char toLatin1() const { return ch; } + inline ushort unicode() const { return ushort(uchar(ch)); } + + +private: + char ch; +}; + + +class QChar { +public: + QChar(); + + QChar(char c); + QChar(uchar c); + + QChar(QLatin1Char ch); + QChar(uchar c, uchar r); + inline QChar(ushort rc) : ucs(rc){} + QChar(short rc); + QChar(uint rc); + QChar(int rc); + enum SpecialCharacter { + Null = 0x0000, + Nbsp = 0x00a0, + ReplacementCharacter = 0xfffd, + ObjectReplacementCharacter = 0xfffc, + ByteOrderMark = 0xfeff, + ByteOrderSwapped = 0xfffe, + + + + + + + + ParagraphSeparator = 0x2029, + LineSeparator = 0x2028 + }; + QChar(SpecialCharacter sc); + + + + enum Category + { + NoCategory, + + Mark_NonSpacing, + Mark_SpacingCombining, + Mark_Enclosing, + + Number_DecimalDigit, + Number_Letter, + Number_Other, + + Separator_Space, + Separator_Line, + Separator_Paragraph, + + Other_Control, + Other_Format, + Other_Surrogate, + Other_PrivateUse, + Other_NotAssigned, + + Letter_Uppercase, + Letter_Lowercase, + Letter_Titlecase, + Letter_Modifier, + Letter_Other, + + Punctuation_Connector, + Punctuation_Dash, + Punctuation_Open, + Punctuation_Close, + Punctuation_InitialQuote, + Punctuation_FinalQuote, + Punctuation_Other, + + Symbol_Math, + Symbol_Currency, + Symbol_Modifier, + Symbol_Other, + + Punctuation_Dask = Punctuation_Dash + }; + + enum Direction + { + DirL, DirR, DirEN, DirES, DirET, DirAN, DirCS, DirB, DirS, DirWS, DirON, + DirLRE, DirLRO, DirAL, DirRLE, DirRLO, DirPDF, DirNSM, DirBN + }; + + enum Decomposition + { + NoDecomposition, + Canonical, + Font, + NoBreak, + Initial, + Medial, + Final, + Isolated, + Circle, + Super, + Sub, + Vertical, + Wide, + Narrow, + Small, + Square, + Compat, + Fraction + + + + + }; + + enum Joining + { + OtherJoining, Dual, Right, Center + }; + + enum CombiningClass + { + Combining_BelowLeftAttached = 200, + Combining_BelowAttached = 202, + Combining_BelowRightAttached = 204, + Combining_LeftAttached = 208, + Combining_RightAttached = 210, + Combining_AboveLeftAttached = 212, + Combining_AboveAttached = 214, + Combining_AboveRightAttached = 216, + + Combining_BelowLeft = 218, + Combining_Below = 220, + Combining_BelowRight = 222, + Combining_Left = 224, + Combining_Right = 226, + Combining_AboveLeft = 228, + Combining_Above = 230, + Combining_AboveRight = 232, + + Combining_DoubleBelow = 233, + Combining_DoubleAbove = 234, + Combining_IotaSubscript = 240 + }; + + enum UnicodeVersion { + Unicode_Unassigned, + Unicode_1_1, + Unicode_2_0, + Unicode_2_1_2, + Unicode_3_0, + Unicode_3_1, + Unicode_3_2, + Unicode_4_0, + Unicode_4_1, + Unicode_5_0 + }; + + + Category category() const; + Direction direction() const; + Joining joining() const; + bool hasMirrored() const; + unsigned char combiningClass() const; + + QChar mirroredChar() const; + QString decomposition() const; + Decomposition decompositionTag() const; + + int digitValue() const; + QChar toLower() const; + QChar toUpper() const; + QChar toTitleCase() const; + QChar toCaseFolded() const; + + UnicodeVersion unicodeVersion() const; + + + + + + + char toAscii() const; + inline char toLatin1() const; + inline ushort unicode() const { return ucs; } + + + inline ushort &unicode() { return const_cast(ucs); } + + + + + static QChar fromAscii(char c); + static QChar fromLatin1(char c); + + inline bool isNull() const { return ucs == 0; } + bool isPrint() const; + bool isPunct() const; + bool isSpace() const; + bool isMark() const; + bool isLetter() const; + bool isNumber() const; + bool isLetterOrNumber() const; + bool isDigit() const; + bool isSymbol() const; + inline bool isLower() const { return category() == Letter_Lowercase; } + inline bool isUpper() const { return category() == Letter_Uppercase; } + inline bool isTitleCase() const { return category() == Letter_Titlecase; } + + inline bool isHighSurrogate() const { + return ((ucs & 0xfc00) == 0xd800); + } + inline bool isLowSurrogate() const { + return ((ucs & 0xfc00) == 0xdc00); + } + + inline uchar cell() const { return uchar(ucs & 0xff); } + inline uchar row() const { return uchar((ucs>>8)&0xff); } + inline void setCell(uchar cell); + inline void setRow(uchar row); + + static inline uint surrogateToUcs4(ushort high, ushort low) { + return (uint(high)<<10) + low - 0x35fdc00; + } + static inline uint surrogateToUcs4(QChar high, QChar low) { + return (uint(high.ucs)<<10) + low.ucs - 0x35fdc00; + } + static inline ushort highSurrogate(uint ucs4) { + return ushort((ucs4>>10) + 0xd7c0); + } + static inline ushort lowSurrogate(uint ucs4) { + return ushort(ucs4%0x400 + 0xdc00); + } + + static Category category(uint ucs4); + static Category category(ushort ucs2); + static Direction direction(uint ucs4); + static Direction direction(ushort ucs2); + static Joining joining(uint ucs4); + static Joining joining(ushort ucs2); + static unsigned char combiningClass(uint ucs4); + static unsigned char combiningClass(ushort ucs2); + + static uint mirroredChar(uint ucs4); + static ushort mirroredChar(ushort ucs2); + static Decomposition decompositionTag(uint ucs4); + + static int digitValue(uint ucs4); + static int digitValue(ushort ucs2); + static uint toLower(uint ucs4); + static ushort toLower(ushort ucs2); + static uint toUpper(uint ucs4); + static ushort toUpper(ushort ucs2); + static uint toTitleCase(uint ucs4); + static ushort toTitleCase(ushort ucs2); + static uint toCaseFolded(uint ucs4); + static ushort toCaseFolded(ushort ucs2); + + static UnicodeVersion unicodeVersion(uint ucs4); + static UnicodeVersion unicodeVersion(ushort ucs2); + + static QString decomposition(uint ucs4); +# 346 "/usr/include/qt4/QtCore/qchar.h" +private: + + + + + ushort ucs; +} + + + + ; + +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QChar)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QChar"; } }; + +inline QChar::QChar() : ucs(0) {} + + + + +inline char QChar::toLatin1() const { return ucs > 0xff ? '\0' : char(ucs); } + +inline QChar QChar::fromLatin1(char c) { return QChar(ushort(uchar(c))); } + +inline QChar::QChar(uchar c, uchar r) : ucs(ushort((r << 8) | c)){} +inline QChar::QChar(short rc) : ucs(ushort(rc)){} +inline QChar::QChar(uint rc) : ucs(ushort(rc & 0xffff)){} +inline QChar::QChar(int rc) : ucs(ushort(rc & 0xffff)){} +inline QChar::QChar(SpecialCharacter s) : ucs(ushort(s)) {} +inline QChar::QChar(QLatin1Char ch) : ucs(ch.unicode()) {} + +inline void QChar::setCell(uchar acell) +{ ucs = ushort((ucs & 0xff00) + acell); } +inline void QChar::setRow(uchar arow) +{ ucs = ushort((ushort(arow)<<8) + (ucs&0xff)); } + +inline bool operator==(QChar c1, QChar c2) { return c1.unicode() == c2.unicode(); } +inline bool operator!=(QChar c1, QChar c2) { return c1.unicode() != c2.unicode(); } +inline bool operator<=(QChar c1, QChar c2) { return c1.unicode() <= c2.unicode(); } +inline bool operator>=(QChar c1, QChar c2) { return c1.unicode() >= c2.unicode(); } +inline bool operator<(QChar c1, QChar c2) { return c1.unicode() < c2.unicode(); } +inline bool operator>(QChar c1, QChar c2) { return c1.unicode() > c2.unicode(); } + + + QDataStream &operator<<(QDataStream &, const QChar &); + QDataStream &operator>>(QDataStream &, QChar &); + + + + + +# 46 "/usr/include/qt4/QtCore/qstring.h" 2 +# 1 "/usr/include/qt4/QtCore/qbytearray.h" 1 +# 45 "/usr/include/qt4/QtCore/qbytearray.h" +# 1 "/usr/include/qt4/QtCore/qatomic.h" 1 +# 46 "/usr/include/qt4/QtCore/qatomic.h" +# 1 "/usr/include/qt4/QtCore/qbasicatomic.h" 1 +# 47 "/usr/include/qt4/QtCore/qbasicatomic.h" + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +class QBasicAtomicInt +{ +public: +# 64 "/usr/include/qt4/QtCore/qbasicatomic.h" + volatile int _q_value; + + + + inline bool operator==(int value) const + { + return _q_value == value; + } + + inline bool operator!=(int value) const + { + return _q_value != value; + } + + inline bool operator!() const + { + return _q_value == 0; + } + + inline operator int() const + { + return _q_value; + } + + inline QBasicAtomicInt &operator=(int value) + { + + + + _q_value = value; + return *this; + } + + + + static bool isReferenceCountingNative(); + static bool isReferenceCountingWaitFree(); + + bool ref(); + bool deref(); + + static bool isTestAndSetNative(); + static bool isTestAndSetWaitFree(); + + bool testAndSetRelaxed(int expectedValue, int newValue); + bool testAndSetAcquire(int expectedValue, int newValue); + bool testAndSetRelease(int expectedValue, int newValue); + bool testAndSetOrdered(int expectedValue, int newValue); + + static bool isFetchAndStoreNative(); + static bool isFetchAndStoreWaitFree(); + + int fetchAndStoreRelaxed(int newValue); + int fetchAndStoreAcquire(int newValue); + int fetchAndStoreRelease(int newValue); + int fetchAndStoreOrdered(int newValue); + + static bool isFetchAndAddNative(); + static bool isFetchAndAddWaitFree(); + + int fetchAndAddRelaxed(int valueToAdd); + int fetchAndAddAcquire(int valueToAdd); + int fetchAndAddRelease(int valueToAdd); + int fetchAndAddOrdered(int valueToAdd); +}; + +template +class QBasicAtomicPointer +{ +public: +# 148 "/usr/include/qt4/QtCore/qbasicatomic.h" + T * volatile _q_value; + + + + inline bool operator==(T *value) const + { + return _q_value == value; + } + + inline bool operator!=(T *value) const + { + return !operator==(value); + } + + inline bool operator!() const + { + return operator==(0); + } + + inline operator T *() const + { + return _q_value; + } + + inline T *operator->() const + { + return _q_value; + } + + inline QBasicAtomicPointer &operator=(T *value) + { + + + + _q_value = value; + return *this; + } + + + + static bool isTestAndSetNative(); + static bool isTestAndSetWaitFree(); + + bool testAndSetRelaxed(T *expectedValue, T *newValue); + bool testAndSetAcquire(T *expectedValue, T *newValue); + bool testAndSetRelease(T *expectedValue, T *newValue); + bool testAndSetOrdered(T *expectedValue, T *newValue); + + static bool isFetchAndStoreNative(); + static bool isFetchAndStoreWaitFree(); + + T *fetchAndStoreRelaxed(T *newValue); + T *fetchAndStoreAcquire(T *newValue); + T *fetchAndStoreRelease(T *newValue); + T *fetchAndStoreOrdered(T *newValue); + + static bool isFetchAndAddNative(); + static bool isFetchAndAddWaitFree(); + + T *fetchAndAddRelaxed(qptrdiff valueToAdd); + T *fetchAndAddAcquire(qptrdiff valueToAdd); + T *fetchAndAddRelease(qptrdiff valueToAdd); + T *fetchAndAddOrdered(qptrdiff valueToAdd); +}; +# 221 "/usr/include/qt4/QtCore/qbasicatomic.h" + + + + + + +# 1 "/usr/include/qt4/QtCore/qatomic_arch.h" 1 +# 45 "/usr/include/qt4/QtCore/qatomic_arch.h" + +# 84 "/usr/include/qt4/QtCore/qatomic_arch.h" +# 1 "/usr/include/qt4/QtCore/qatomic_x86_64.h" 1 +# 45 "/usr/include/qt4/QtCore/qatomic_x86_64.h" + + + + + + + +inline bool QBasicAtomicInt::isReferenceCountingNative() +{ return true; } +inline bool QBasicAtomicInt::isReferenceCountingWaitFree() +{ return true; } + + + + +inline bool QBasicAtomicInt::isTestAndSetNative() +{ return true; } +inline bool QBasicAtomicInt::isTestAndSetWaitFree() +{ return true; } + + + + +inline bool QBasicAtomicInt::isFetchAndStoreNative() +{ return true; } +inline bool QBasicAtomicInt::isFetchAndStoreWaitFree() +{ return true; } + + + + +inline bool QBasicAtomicInt::isFetchAndAddNative() +{ return true; } +inline bool QBasicAtomicInt::isFetchAndAddWaitFree() +{ return true; } + + + + +template +inline bool QBasicAtomicPointer::isTestAndSetNative() +{ return true; } +template +inline bool QBasicAtomicPointer::isTestAndSetWaitFree() +{ return true; } + + + + +template +inline bool QBasicAtomicPointer::isFetchAndStoreNative() +{ return true; } +template +inline bool QBasicAtomicPointer::isFetchAndStoreWaitFree() +{ return true; } + + + + +template +inline bool QBasicAtomicPointer::isFetchAndAddNative() +{ return true; } +template +inline bool QBasicAtomicPointer::isFetchAndAddWaitFree() +{ return true; } + + + +inline bool QBasicAtomicInt::ref() +{ + unsigned char ret; + asm volatile("lock\n" + "incl %0\n" + "setne %1" + : "=m" (_q_value), "=qm" (ret) + : "m" (_q_value) + : "memory"); + return ret != 0; +} + +inline bool QBasicAtomicInt::deref() +{ + unsigned char ret; + asm volatile("lock\n" + "decl %0\n" + "setne %1" + : "=m" (_q_value), "=qm" (ret) + : "m" (_q_value) + : "memory"); + return ret != 0; +} + +inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue) +{ + unsigned char ret; + asm volatile("lock\n" + "cmpxchgl %3,%2\n" + "sete %1\n" + : "=a" (newValue), "=qm" (ret), "+m" (_q_value) + : "r" (newValue), "0" (expectedValue) + : "memory"); + return ret != 0; +} + +inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue) +{ + asm volatile("xchgl %0,%1" + : "=r" (newValue), "+m" (_q_value) + : "0" (newValue) + : "memory"); + return newValue; +} + +inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd) +{ + asm volatile("lock\n" + "xaddl %0,%1" + : "=r" (valueToAdd), "+m" (_q_value) + : "0" (valueToAdd) + : "memory"); + return valueToAdd; +} + +template +inline bool QBasicAtomicPointer::testAndSetOrdered(T *expectedValue, T *newValue) +{ + unsigned char ret; + asm volatile("lock\n" + "cmpxchgq %3,%2\n" + "sete %1\n" + : "=a" (newValue), "=qm" (ret), "+m" (_q_value) + : "r" (newValue), "0" (expectedValue) + : "memory"); + return ret != 0; +} + +template +inline T *QBasicAtomicPointer::fetchAndStoreOrdered(T *newValue) +{ + asm volatile("xchgq %0,%1" + : "=r" (newValue), "+m" (_q_value) + : "0" (newValue) + : "memory"); + return newValue; +} + +template +inline T *QBasicAtomicPointer::fetchAndAddOrdered(qptrdiff valueToAdd) +{ + asm volatile("lock\n" + "xaddq %0,%1" + : "=r" (valueToAdd), "+m" (_q_value) + : "0" (valueToAdd * sizeof(T)) + : "memory"); + return reinterpret_cast(valueToAdd); +} +# 260 "/usr/include/qt4/QtCore/qatomic_x86_64.h" +inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue) +{ + return testAndSetOrdered(expectedValue, newValue); +} + +inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue) +{ + return testAndSetOrdered(expectedValue, newValue); +} + +inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue) +{ + return testAndSetOrdered(expectedValue, newValue); +} + +inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue) +{ + return fetchAndStoreOrdered(newValue); +} + +inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue) +{ + return fetchAndStoreOrdered(newValue); +} + +inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue) +{ + return fetchAndStoreOrdered(newValue); +} + +inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd) +{ + return fetchAndAddOrdered(valueToAdd); +} + +inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd) +{ + return fetchAndAddOrdered(valueToAdd); +} + +inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd) +{ + return fetchAndAddOrdered(valueToAdd); +} + +template +inline bool QBasicAtomicPointer::testAndSetRelaxed(T *expectedValue, T *newValue) +{ + return testAndSetOrdered(expectedValue, newValue); +} + +template +inline bool QBasicAtomicPointer::testAndSetAcquire(T *expectedValue, T *newValue) +{ + return testAndSetOrdered(expectedValue, newValue); +} + +template +inline bool QBasicAtomicPointer::testAndSetRelease(T *expectedValue, T *newValue) +{ + return testAndSetOrdered(expectedValue, newValue); +} + +template +inline T *QBasicAtomicPointer::fetchAndStoreRelaxed(T *newValue) +{ + return fetchAndStoreOrdered(newValue); +} + +template +inline T *QBasicAtomicPointer::fetchAndStoreAcquire(T *newValue) +{ + return fetchAndStoreOrdered(newValue); +} + +template +inline T *QBasicAtomicPointer::fetchAndStoreRelease(T *newValue) +{ + return fetchAndStoreOrdered(newValue); +} + +template +inline T *QBasicAtomicPointer::fetchAndAddRelaxed(qptrdiff valueToAdd) +{ + return fetchAndAddOrdered(valueToAdd); +} + +template +inline T *QBasicAtomicPointer::fetchAndAddAcquire(qptrdiff valueToAdd) +{ + return fetchAndAddOrdered(valueToAdd); +} + +template +inline T *QBasicAtomicPointer::fetchAndAddRelease(qptrdiff valueToAdd) +{ + return fetchAndAddOrdered(valueToAdd); +} + + + + +# 85 "/usr/include/qt4/QtCore/qatomic_arch.h" 2 +# 95 "/usr/include/qt4/QtCore/qatomic_arch.h" + +# 228 "/usr/include/qt4/QtCore/qbasicatomic.h" 2 +# 47 "/usr/include/qt4/QtCore/qatomic.h" 2 + + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + + +class QAtomicInt : public QBasicAtomicInt +{ +public: + inline QAtomicInt(int value = 0) + { + + + + _q_value = value; + } + inline QAtomicInt(const QAtomicInt &other) + { + + + + _q_value = other._q_value; + } + + inline QAtomicInt &operator=(int value) + { + (void) QBasicAtomicInt::operator=(value); + return *this; + } + + inline QAtomicInt &operator=(const QAtomicInt &other) + { + (void) QBasicAtomicInt::operator=(other); + return *this; + } +# 121 "/usr/include/qt4/QtCore/qatomic.h" +}; + + +template +class QAtomicPointer : public QBasicAtomicPointer +{ +public: + inline QAtomicPointer(T *value = 0) + { + + + + QBasicAtomicPointer::_q_value = value; + } + inline QAtomicPointer(const QAtomicPointer &other) + { + + + + QBasicAtomicPointer::_q_value = other._q_value; + } + + inline QAtomicPointer &operator=(T *value) + { + (void) QBasicAtomicPointer::operator=(value); + return *this; + } + + inline QAtomicPointer &operator=(const QAtomicPointer &other) + { + (void) QBasicAtomicPointer::operator=(other); + return *this; + } +# 186 "/usr/include/qt4/QtCore/qatomic.h" +}; + + + + + + + +template +inline void qAtomicAssign(T *&d, T *x) +{ + if (d == x) + return; + x->ref.ref(); + if (!d->ref.deref()) + delete d; + d = x; +} +# 213 "/usr/include/qt4/QtCore/qatomic.h" +template +inline void qAtomicDetach(T *&d) +{ + if (d->ref == 1) + return; + T *x = d; + d = new T(*d); + if (!x->ref.deref()) + delete x; +} + + + +# 46 "/usr/include/qt4/QtCore/qbytearray.h" 2 +# 1 "/usr/include/qt4/QtCore/qnamespace.h" 1 +# 47 "/usr/include/qt4/QtCore/qnamespace.h" + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + + +namespace + + + +Qt { +# 99 "/usr/include/qt4/QtCore/qnamespace.h" + enum GlobalColor { + color0, + color1, + black, + white, + darkGray, + gray, + lightGray, + red, + green, + blue, + cyan, + magenta, + yellow, + darkRed, + darkGreen, + darkBlue, + darkCyan, + darkMagenta, + darkYellow, + transparent + }; + + enum KeyboardModifier { + NoModifier = 0x00000000, + ShiftModifier = 0x02000000, + ControlModifier = 0x04000000, + AltModifier = 0x08000000, + MetaModifier = 0x10000000, + KeypadModifier = 0x20000000, + GroupSwitchModifier = 0x40000000, + + KeyboardModifierMask = 0xfe000000 + }; + typedef QFlags KeyboardModifiers; + + + enum Modifier { + META = Qt::MetaModifier, + SHIFT = Qt::ShiftModifier, + CTRL = Qt::ControlModifier, + ALT = Qt::AltModifier, + MODIFIER_MASK = KeyboardModifierMask, + UNICODE_ACCEL = 0x00000000 + }; + + enum MouseButton { + NoButton = 0x00000000, + LeftButton = 0x00000001, + RightButton = 0x00000002, + MidButton = 0x00000004, + XButton1 = 0x00000008, + XButton2 = 0x00000010, + MouseButtonMask = 0x000000ff + }; + typedef QFlags MouseButtons; +# 168 "/usr/include/qt4/QtCore/qnamespace.h" + enum Orientation { + Horizontal = 0x1, + Vertical = 0x2 + }; + + typedef QFlags Orientations; + + enum FocusPolicy { + NoFocus = 0, + TabFocus = 0x1, + ClickFocus = 0x2, + StrongFocus = TabFocus | ClickFocus | 0x8, + WheelFocus = StrongFocus | 0x4 + }; + + enum SortOrder { + AscendingOrder, + DescendingOrder + + + + + }; + + enum TileRule { + StretchTile, + RepeatTile, + RoundTile + }; + + + + + + enum AlignmentFlag { + AlignLeft = 0x0001, + AlignLeading = AlignLeft, + AlignRight = 0x0002, + AlignTrailing = AlignRight, + AlignHCenter = 0x0004, + AlignJustify = 0x0008, + AlignAbsolute = 0x0010, + AlignHorizontal_Mask = AlignLeft | AlignRight | AlignHCenter | AlignJustify | AlignAbsolute, + + AlignTop = 0x0020, + AlignBottom = 0x0040, + AlignVCenter = 0x0080, + AlignVertical_Mask = AlignTop | AlignBottom | AlignVCenter, + + AlignCenter = AlignVCenter | AlignHCenter + + + + }; + + typedef QFlags Alignment; + + enum TextFlag { + TextSingleLine = 0x0100, + TextDontClip = 0x0200, + TextExpandTabs = 0x0400, + TextShowMnemonic = 0x0800, + TextWordWrap = 0x1000, + TextWrapAnywhere = 0x2000, + TextDontPrint = 0x4000, + TextIncludeTrailingSpaces = 0x08000000, + TextHideMnemonic = 0x8000, + TextJustificationForced = 0x10000, + TextForceLeftToRight = 0x20000, + TextForceRightToLeft = 0x40000, + TextLongestVariant = 0x80000 +# 251 "/usr/include/qt4/QtCore/qnamespace.h" + }; + + + + + enum TextElideMode { + ElideLeft, + ElideRight, + ElideMiddle, + ElideNone + }; + + enum WindowType { + Widget = 0x00000000, + Window = 0x00000001, + Dialog = 0x00000002 | Window, + Sheet = 0x00000004 | Window, + Drawer = 0x00000006 | Window, + Popup = 0x00000008 | Window, + Tool = 0x0000000a | Window, + ToolTip = 0x0000000c | Window, + SplashScreen = 0x0000000e | Window, + Desktop = 0x00000010 | Window, + SubWindow = 0x00000012, + + WindowType_Mask = 0x000000ff, + MSWindowsFixedSizeDialogHint = 0x00000100, + MSWindowsOwnDC = 0x00000200, + X11BypassWindowManagerHint = 0x00000400, + FramelessWindowHint = 0x00000800, + WindowTitleHint = 0x00001000, + WindowSystemMenuHint = 0x00002000, + WindowMinimizeButtonHint = 0x00004000, + WindowMaximizeButtonHint = 0x00008000, + WindowMinMaxButtonsHint = WindowMinimizeButtonHint | WindowMaximizeButtonHint, + WindowContextHelpButtonHint = 0x00010000, + WindowShadeButtonHint = 0x00020000, + WindowStaysOnTopHint = 0x00040000, + + + + + + + + CustomizeWindowHint = 0x02000000, + WindowStaysOnBottomHint = 0x04000000, + WindowCloseButtonHint = 0x08000000, + MacWindowToolBarButtonHint = 0x10000000, + BypassGraphicsProxyWidget = 0x20000000, + WindowOkButtonHint = 0x00080000, + WindowCancelButtonHint = 0x00100000 +# 353 "/usr/include/qt4/QtCore/qnamespace.h" + }; + + typedef QFlags WindowFlags; + + enum WindowState { + WindowNoState = 0x00000000, + WindowMinimized = 0x00000001, + WindowMaximized = 0x00000002, + WindowFullScreen = 0x00000004, + WindowActive = 0x00000008 + }; + + typedef QFlags WindowStates; + + enum WidgetAttribute { + WA_Disabled = 0, + WA_UnderMouse = 1, + WA_MouseTracking = 2, + WA_ContentsPropagated = 3, + WA_OpaquePaintEvent = 4, + WA_NoBackground = WA_OpaquePaintEvent, + WA_StaticContents = 5, + WA_LaidOut = 7, + WA_PaintOnScreen = 8, + WA_NoSystemBackground = 9, + WA_UpdatesDisabled = 10, + WA_Mapped = 11, + WA_MacNoClickThrough = 12, + WA_PaintOutsidePaintEvent = 13, + WA_InputMethodEnabled = 14, + WA_WState_Visible = 15, + WA_WState_Hidden = 16, + + WA_ForceDisabled = 32, + WA_KeyCompression = 33, + WA_PendingMoveEvent = 34, + WA_PendingResizeEvent = 35, + WA_SetPalette = 36, + WA_SetFont = 37, + WA_SetCursor = 38, + WA_NoChildEventsFromChildren = 39, + WA_WindowModified = 41, + WA_Resized = 42, + WA_Moved = 43, + WA_PendingUpdate = 44, + WA_InvalidSize = 45, + WA_MacBrushedMetal = 46, + WA_MacMetalStyle = WA_MacBrushedMetal, + WA_CustomWhatsThis = 47, + WA_LayoutOnEntireRect = 48, + WA_OutsideWSRange = 49, + WA_GrabbedShortcut = 50, + WA_TransparentForMouseEvents = 51, + WA_PaintUnclipped = 52, + WA_SetWindowIcon = 53, + WA_NoMouseReplay = 54, + WA_DeleteOnClose = 55, + WA_RightToLeft = 56, + WA_SetLayoutDirection = 57, + WA_NoChildEventsForParent = 58, + WA_ForceUpdatesDisabled = 59, + + WA_WState_Created = 60, + WA_WState_CompressKeys = 61, + WA_WState_InPaintEvent = 62, + WA_WState_Reparented = 63, + WA_WState_ConfigPending = 64, + WA_WState_Polished = 66, + WA_WState_DND = 67, + WA_WState_OwnSizePolicy = 68, + WA_WState_ExplicitShowHide = 69, + + WA_ShowModal = 70, + WA_MouseNoMask = 71, + WA_GroupLeader = 72, + WA_NoMousePropagation = 73, + WA_Hover = 74, + WA_InputMethodTransparent = 75, + WA_QuitOnClose = 76, + + WA_KeyboardFocusChange = 77, + + WA_AcceptDrops = 78, + WA_DropSiteRegistered = 79, + WA_ForceAcceptDrops = WA_DropSiteRegistered, + + WA_WindowPropagation = 80, + + WA_NoX11EventCompression = 81, + WA_TintedBackground = 82, + WA_X11OpenGLOverlay = 83, + WA_AlwaysShowToolTips = 84, + WA_MacOpaqueSizeGrip = 85, + WA_SetStyle = 86, + + WA_SetLocale = 87, + WA_MacShowFocusRect = 88, + + WA_MacNormalSize = 89, + WA_MacSmallSize = 90, + WA_MacMiniSize = 91, + + WA_LayoutUsesWidgetRect = 92, + WA_StyledBackground = 93, + WA_MSWindowsUseDirect3D = 94, + WA_CanHostQMdiSubWindowTitleBar = 95, + + WA_MacAlwaysShowToolWindow = 96, + + WA_StyleSheet = 97, + + WA_ShowWithoutActivating = 98, + + WA_X11BypassTransientForHint = 99, + + WA_NativeWindow = 100, + WA_DontCreateNativeAncestors = 101, + + WA_MacVariableSize = 102, + + WA_DontShowOnScreen = 103, + + + WA_X11NetWmWindowTypeDesktop = 104, + WA_X11NetWmWindowTypeDock = 105, + WA_X11NetWmWindowTypeToolBar = 106, + WA_X11NetWmWindowTypeMenu = 107, + WA_X11NetWmWindowTypeUtility = 108, + WA_X11NetWmWindowTypeSplash = 109, + WA_X11NetWmWindowTypeDialog = 110, + WA_X11NetWmWindowTypeDropDownMenu = 111, + WA_X11NetWmWindowTypePopupMenu = 112, + WA_X11NetWmWindowTypeToolTip = 113, + WA_X11NetWmWindowTypeNotification = 114, + WA_X11NetWmWindowTypeCombo = 115, + WA_X11NetWmWindowTypeDND = 116, + + WA_MacFrameworkScaled = 117, + + WA_SetWindowModality = 118, + WA_WState_WindowOpacitySet = 119, + WA_TranslucentBackground = 120, + + WA_AcceptTouchEvents = 121, + WA_WState_AcceptedTouchBeginEvent = 122, + WA_TouchPadAcceptSingleTouchEvents = 123, + + WA_MergeSoftkeys = 124, + WA_MergeSoftkeysRecursively = 125, + + + WA_AttributeCount + }; + + enum ApplicationAttribute + { + AA_ImmediateWidgetCreation = 0, + AA_MSWindowsUseDirect3DByDefault = 1, + AA_DontShowIconsInMenus = 2, + AA_NativeWindows = 3, + AA_DontCreateNativeWidgetSiblings = 4, + AA_MacPluginApplication = 5, + AA_DontUseNativeMenuBar = 6, + AA_MacDontSwapCtrlAndMeta = 7, + AA_S60DontConstructApplicationPanes = 8, + + + AA_AttributeCount + }; + + + + + + enum ImageConversionFlag { + ColorMode_Mask = 0x00000003, + AutoColor = 0x00000000, + ColorOnly = 0x00000003, + MonoOnly = 0x00000002, + + + AlphaDither_Mask = 0x0000000c, + ThresholdAlphaDither = 0x00000000, + OrderedAlphaDither = 0x00000004, + DiffuseAlphaDither = 0x00000008, + NoAlpha = 0x0000000c, + + Dither_Mask = 0x00000030, + DiffuseDither = 0x00000000, + OrderedDither = 0x00000010, + ThresholdDither = 0x00000020, + + + DitherMode_Mask = 0x000000c0, + AutoDither = 0x00000000, + PreferDither = 0x00000040, + AvoidDither = 0x00000080, + + NoOpaqueDetection = 0x00000100 + }; + typedef QFlags ImageConversionFlags; + + enum BGMode { + TransparentMode, + OpaqueMode + }; +# 579 "/usr/include/qt4/QtCore/qnamespace.h" + enum Key { + Key_Escape = 0x01000000, + Key_Tab = 0x01000001, + Key_Backtab = 0x01000002, + + + + Key_Backspace = 0x01000003, + + + + Key_Return = 0x01000004, + Key_Enter = 0x01000005, + Key_Insert = 0x01000006, + Key_Delete = 0x01000007, + Key_Pause = 0x01000008, + Key_Print = 0x01000009, + Key_SysReq = 0x0100000a, + Key_Clear = 0x0100000b, + Key_Home = 0x01000010, + Key_End = 0x01000011, + Key_Left = 0x01000012, + Key_Up = 0x01000013, + Key_Right = 0x01000014, + Key_Down = 0x01000015, + Key_PageUp = 0x01000016, + + + + Key_PageDown = 0x01000017, + + + + Key_Shift = 0x01000020, + Key_Control = 0x01000021, + Key_Meta = 0x01000022, + Key_Alt = 0x01000023, + Key_CapsLock = 0x01000024, + Key_NumLock = 0x01000025, + Key_ScrollLock = 0x01000026, + Key_F1 = 0x01000030, + Key_F2 = 0x01000031, + Key_F3 = 0x01000032, + Key_F4 = 0x01000033, + Key_F5 = 0x01000034, + Key_F6 = 0x01000035, + Key_F7 = 0x01000036, + Key_F8 = 0x01000037, + Key_F9 = 0x01000038, + Key_F10 = 0x01000039, + Key_F11 = 0x0100003a, + Key_F12 = 0x0100003b, + Key_F13 = 0x0100003c, + Key_F14 = 0x0100003d, + Key_F15 = 0x0100003e, + Key_F16 = 0x0100003f, + Key_F17 = 0x01000040, + Key_F18 = 0x01000041, + Key_F19 = 0x01000042, + Key_F20 = 0x01000043, + Key_F21 = 0x01000044, + Key_F22 = 0x01000045, + Key_F23 = 0x01000046, + Key_F24 = 0x01000047, + Key_F25 = 0x01000048, + Key_F26 = 0x01000049, + Key_F27 = 0x0100004a, + Key_F28 = 0x0100004b, + Key_F29 = 0x0100004c, + Key_F30 = 0x0100004d, + Key_F31 = 0x0100004e, + Key_F32 = 0x0100004f, + Key_F33 = 0x01000050, + Key_F34 = 0x01000051, + Key_F35 = 0x01000052, + Key_Super_L = 0x01000053, + Key_Super_R = 0x01000054, + Key_Menu = 0x01000055, + Key_Hyper_L = 0x01000056, + Key_Hyper_R = 0x01000057, + Key_Help = 0x01000058, + Key_Direction_L = 0x01000059, + Key_Direction_R = 0x01000060, + Key_Space = 0x20, + Key_Any = Key_Space, + Key_Exclam = 0x21, + Key_QuoteDbl = 0x22, + Key_NumberSign = 0x23, + Key_Dollar = 0x24, + Key_Percent = 0x25, + Key_Ampersand = 0x26, + Key_Apostrophe = 0x27, + Key_ParenLeft = 0x28, + Key_ParenRight = 0x29, + Key_Asterisk = 0x2a, + Key_Plus = 0x2b, + Key_Comma = 0x2c, + Key_Minus = 0x2d, + Key_Period = 0x2e, + Key_Slash = 0x2f, + Key_0 = 0x30, + Key_1 = 0x31, + Key_2 = 0x32, + Key_3 = 0x33, + Key_4 = 0x34, + Key_5 = 0x35, + Key_6 = 0x36, + Key_7 = 0x37, + Key_8 = 0x38, + Key_9 = 0x39, + Key_Colon = 0x3a, + Key_Semicolon = 0x3b, + Key_Less = 0x3c, + Key_Equal = 0x3d, + Key_Greater = 0x3e, + Key_Question = 0x3f, + Key_At = 0x40, + Key_A = 0x41, + Key_B = 0x42, + Key_C = 0x43, + Key_D = 0x44, + Key_E = 0x45, + Key_F = 0x46, + Key_G = 0x47, + Key_H = 0x48, + Key_I = 0x49, + Key_J = 0x4a, + Key_K = 0x4b, + Key_L = 0x4c, + Key_M = 0x4d, + Key_N = 0x4e, + Key_O = 0x4f, + Key_P = 0x50, + Key_Q = 0x51, + Key_R = 0x52, + Key_S = 0x53, + Key_T = 0x54, + Key_U = 0x55, + Key_V = 0x56, + Key_W = 0x57, + Key_X = 0x58, + Key_Y = 0x59, + Key_Z = 0x5a, + Key_BracketLeft = 0x5b, + Key_Backslash = 0x5c, + Key_BracketRight = 0x5d, + Key_AsciiCircum = 0x5e, + Key_Underscore = 0x5f, + Key_QuoteLeft = 0x60, + Key_BraceLeft = 0x7b, + Key_Bar = 0x7c, + Key_BraceRight = 0x7d, + Key_AsciiTilde = 0x7e, + + Key_nobreakspace = 0x0a0, + Key_exclamdown = 0x0a1, + Key_cent = 0x0a2, + Key_sterling = 0x0a3, + Key_currency = 0x0a4, + Key_yen = 0x0a5, + Key_brokenbar = 0x0a6, + Key_section = 0x0a7, + Key_diaeresis = 0x0a8, + Key_copyright = 0x0a9, + Key_ordfeminine = 0x0aa, + Key_guillemotleft = 0x0ab, + Key_notsign = 0x0ac, + Key_hyphen = 0x0ad, + Key_registered = 0x0ae, + Key_macron = 0x0af, + Key_degree = 0x0b0, + Key_plusminus = 0x0b1, + Key_twosuperior = 0x0b2, + Key_threesuperior = 0x0b3, + Key_acute = 0x0b4, + Key_mu = 0x0b5, + Key_paragraph = 0x0b6, + Key_periodcentered = 0x0b7, + Key_cedilla = 0x0b8, + Key_onesuperior = 0x0b9, + Key_masculine = 0x0ba, + Key_guillemotright = 0x0bb, + Key_onequarter = 0x0bc, + Key_onehalf = 0x0bd, + Key_threequarters = 0x0be, + Key_questiondown = 0x0bf, + Key_Agrave = 0x0c0, + Key_Aacute = 0x0c1, + Key_Acircumflex = 0x0c2, + Key_Atilde = 0x0c3, + Key_Adiaeresis = 0x0c4, + Key_Aring = 0x0c5, + Key_AE = 0x0c6, + Key_Ccedilla = 0x0c7, + Key_Egrave = 0x0c8, + Key_Eacute = 0x0c9, + Key_Ecircumflex = 0x0ca, + Key_Ediaeresis = 0x0cb, + Key_Igrave = 0x0cc, + Key_Iacute = 0x0cd, + Key_Icircumflex = 0x0ce, + Key_Idiaeresis = 0x0cf, + Key_ETH = 0x0d0, + Key_Ntilde = 0x0d1, + Key_Ograve = 0x0d2, + Key_Oacute = 0x0d3, + Key_Ocircumflex = 0x0d4, + Key_Otilde = 0x0d5, + Key_Odiaeresis = 0x0d6, + Key_multiply = 0x0d7, + Key_Ooblique = 0x0d8, + Key_Ugrave = 0x0d9, + Key_Uacute = 0x0da, + Key_Ucircumflex = 0x0db, + Key_Udiaeresis = 0x0dc, + Key_Yacute = 0x0dd, + Key_THORN = 0x0de, + Key_ssharp = 0x0df, +# 822 "/usr/include/qt4/QtCore/qnamespace.h" + Key_division = 0x0f7, +# 832 "/usr/include/qt4/QtCore/qnamespace.h" + Key_ydiaeresis = 0x0ff, + + + + + + + Key_AltGr = 0x01001103, + Key_Multi_key = 0x01001120, + Key_Codeinput = 0x01001137, + Key_SingleCandidate = 0x0100113c, + Key_MultipleCandidate = 0x0100113d, + Key_PreviousCandidate = 0x0100113e, + + + Key_Mode_switch = 0x0100117e, + + + + Key_Kanji = 0x01001121, + Key_Muhenkan = 0x01001122, + + Key_Henkan = 0x01001123, + Key_Romaji = 0x01001124, + Key_Hiragana = 0x01001125, + Key_Katakana = 0x01001126, + Key_Hiragana_Katakana = 0x01001127, + Key_Zenkaku = 0x01001128, + Key_Hankaku = 0x01001129, + Key_Zenkaku_Hankaku = 0x0100112a, + Key_Touroku = 0x0100112b, + Key_Massyo = 0x0100112c, + Key_Kana_Lock = 0x0100112d, + Key_Kana_Shift = 0x0100112e, + Key_Eisu_Shift = 0x0100112f, + Key_Eisu_toggle = 0x01001130, +# 877 "/usr/include/qt4/QtCore/qnamespace.h" + Key_Hangul = 0x01001131, + Key_Hangul_Start = 0x01001132, + Key_Hangul_End = 0x01001133, + Key_Hangul_Hanja = 0x01001134, + Key_Hangul_Jamo = 0x01001135, + Key_Hangul_Romaja = 0x01001136, + + Key_Hangul_Jeonja = 0x01001138, + Key_Hangul_Banja = 0x01001139, + Key_Hangul_PreHanja = 0x0100113a, + Key_Hangul_PostHanja = 0x0100113b, + + + + Key_Hangul_Special = 0x0100113f, + + + + Key_Dead_Grave = 0x01001250, + Key_Dead_Acute = 0x01001251, + Key_Dead_Circumflex = 0x01001252, + Key_Dead_Tilde = 0x01001253, + Key_Dead_Macron = 0x01001254, + Key_Dead_Breve = 0x01001255, + Key_Dead_Abovedot = 0x01001256, + Key_Dead_Diaeresis = 0x01001257, + Key_Dead_Abovering = 0x01001258, + Key_Dead_Doubleacute = 0x01001259, + Key_Dead_Caron = 0x0100125a, + Key_Dead_Cedilla = 0x0100125b, + Key_Dead_Ogonek = 0x0100125c, + Key_Dead_Iota = 0x0100125d, + Key_Dead_Voiced_Sound = 0x0100125e, + Key_Dead_Semivoiced_Sound = 0x0100125f, + Key_Dead_Belowdot = 0x01001260, + Key_Dead_Hook = 0x01001261, + Key_Dead_Horn = 0x01001262, + + + Key_Back = 0x01000061, + Key_Forward = 0x01000062, + Key_Stop = 0x01000063, + Key_Refresh = 0x01000064, + Key_VolumeDown = 0x01000070, + Key_VolumeMute = 0x01000071, + Key_VolumeUp = 0x01000072, + Key_BassBoost = 0x01000073, + Key_BassUp = 0x01000074, + Key_BassDown = 0x01000075, + Key_TrebleUp = 0x01000076, + Key_TrebleDown = 0x01000077, + Key_MediaPlay = 0x01000080, + Key_MediaStop = 0x01000081, + Key_MediaPrevious = 0x01000082, + + + + Key_MediaNext = 0x01000083, + Key_MediaRecord = 0x01000084, + Key_HomePage = 0x01000090, + Key_Favorites = 0x01000091, + Key_Search = 0x01000092, + Key_Standby = 0x01000093, + Key_OpenUrl = 0x01000094, + Key_LaunchMail = 0x010000a0, + Key_LaunchMedia = 0x010000a1, + Key_Launch0 = 0x010000a2, + Key_Launch1 = 0x010000a3, + Key_Launch2 = 0x010000a4, + Key_Launch3 = 0x010000a5, + Key_Launch4 = 0x010000a6, + Key_Launch5 = 0x010000a7, + Key_Launch6 = 0x010000a8, + Key_Launch7 = 0x010000a9, + Key_Launch8 = 0x010000aa, + Key_Launch9 = 0x010000ab, + Key_LaunchA = 0x010000ac, + Key_LaunchB = 0x010000ad, + Key_LaunchC = 0x010000ae, + Key_LaunchD = 0x010000af, + Key_LaunchE = 0x010000b0, + Key_LaunchF = 0x010000b1, + Key_MonBrightnessUp = 0x010000b2, + Key_MonBrightnessDown = 0x010000b3, + Key_KeyboardLightOnOff = 0x010000b4, + Key_KeyboardBrightnessUp = 0x010000b5, + Key_KeyboardBrightnessDown = 0x010000b6, + Key_PowerOff = 0x010000b7, + Key_WakeUp = 0x010000b8, + Key_Eject = 0x010000b9, + Key_ScreenSaver = 0x010000ba, + Key_WWW = 0x010000bb, + Key_Memo = 0x010000bc, + Key_LightBulb = 0x010000bd, + Key_Shop = 0x010000be, + Key_History = 0x010000bf, + Key_AddFavorite = 0x010000c0, + Key_HotLinks = 0x010000c1, + Key_BrightnessAdjust = 0x010000c2, + Key_Finance = 0x010000c3, + Key_Community = 0x010000c4, + Key_AudioRewind = 0x010000c5, + Key_BackForward = 0x010000c6, + Key_ApplicationLeft = 0x010000c7, + Key_ApplicationRight = 0x010000c8, + Key_Book = 0x010000c9, + Key_CD = 0x010000ca, + Key_Calculator = 0x010000cb, + Key_ToDoList = 0x010000cc, + Key_ClearGrab = 0x010000cd, + Key_Close = 0x010000ce, + Key_Copy = 0x010000cf, + Key_Cut = 0x010000d0, + Key_Display = 0x010000d1, + Key_DOS = 0x010000d2, + Key_Documents = 0x010000d3, + Key_Excel = 0x010000d4, + Key_Explorer = 0x010000d5, + Key_Game = 0x010000d6, + Key_Go = 0x010000d7, + Key_iTouch = 0x010000d8, + Key_LogOff = 0x010000d9, + Key_Market = 0x010000da, + Key_Meeting = 0x010000db, + Key_MenuKB = 0x010000dc, + Key_MenuPB = 0x010000dd, + Key_MySites = 0x010000de, + Key_News = 0x010000df, + Key_OfficeHome = 0x010000e0, + Key_Option = 0x010000e1, + Key_Paste = 0x010000e2, + Key_Phone = 0x010000e3, + Key_Calendar = 0x010000e4, + Key_Reply = 0x010000e5, + Key_Reload = 0x010000e6, + Key_RotateWindows = 0x010000e7, + Key_RotationPB = 0x010000e8, + Key_RotationKB = 0x010000e9, + Key_Save = 0x010000ea, + Key_Send = 0x010000eb, + Key_Spell = 0x010000ec, + Key_SplitScreen = 0x010000ed, + Key_Support = 0x010000ee, + Key_TaskPane = 0x010000ef, + Key_Terminal = 0x010000f0, + Key_Tools = 0x010000f1, + Key_Travel = 0x010000f2, + Key_Video = 0x010000f3, + Key_Word = 0x010000f4, + Key_Xfer = 0x010000f5, + Key_ZoomIn = 0x010000f6, + Key_ZoomOut = 0x010000f7, + Key_Away = 0x010000f8, + Key_Messenger = 0x010000f9, + Key_WebCam = 0x010000fa, + Key_MailForward = 0x010000fb, + Key_Pictures = 0x010000fc, + Key_Music = 0x010000fd, + Key_Battery = 0x010000fe, + Key_Bluetooth = 0x010000ff, + Key_WLAN = 0x01000100, + Key_UWB = 0x01000101, + Key_AudioForward = 0x01000102, + Key_AudioRepeat = 0x01000103, + Key_AudioRandomPlay = 0x01000104, + Key_Subtitle = 0x01000105, + Key_AudioCycleTrack = 0x01000106, + Key_Time = 0x01000107, + Key_Hibernate = 0x01000108, + Key_View = 0x01000109, + Key_TopMenu = 0x0100010a, + Key_PowerDown = 0x0100010b, + Key_Suspend = 0x0100010c, + Key_ContrastAdjust = 0x0100010d, + + Key_MediaLast = 0x0100ffff, + + + Key_Select = 0x01010000, + Key_Yes = 0x01010001, + Key_No = 0x01010002, + + + Key_Cancel = 0x01020001, + Key_Printer = 0x01020002, + Key_Execute = 0x01020003, + Key_Sleep = 0x01020004, + Key_Play = 0x01020005, + Key_Zoom = 0x01020006, + + + + + + Key_Context1 = 0x01100000, + Key_Context2 = 0x01100001, + Key_Context3 = 0x01100002, + Key_Context4 = 0x01100003, + Key_Call = 0x01100004, + Key_Hangup = 0x01100005, + Key_Flip = 0x01100006, + + Key_unknown = 0x01ffffff + }; + + enum ArrowType { + NoArrow, + UpArrow, + DownArrow, + LeftArrow, + RightArrow + }; + + enum PenStyle { + NoPen, + SolidLine, + DashLine, + DotLine, + DashDotLine, + DashDotDotLine, + CustomDashLine + + , MPenStyle = 0x0f + + }; + + enum PenCapStyle { + FlatCap = 0x00, + SquareCap = 0x10, + RoundCap = 0x20, + MPenCapStyle = 0x30 + }; + + enum PenJoinStyle { + MiterJoin = 0x00, + BevelJoin = 0x40, + RoundJoin = 0x80, + SvgMiterJoin = 0x100, + MPenJoinStyle = 0x1c0 + }; + + enum BrushStyle { + NoBrush, + SolidPattern, + Dense1Pattern, + Dense2Pattern, + Dense3Pattern, + Dense4Pattern, + Dense5Pattern, + Dense6Pattern, + Dense7Pattern, + HorPattern, + VerPattern, + CrossPattern, + BDiagPattern, + FDiagPattern, + DiagCrossPattern, + LinearGradientPattern, + RadialGradientPattern, + ConicalGradientPattern, + TexturePattern = 24 + + + + }; + + enum SizeMode { + AbsoluteSize, + RelativeSize + }; +# 1208 "/usr/include/qt4/QtCore/qnamespace.h" + enum UIEffect { + UI_General, + UI_AnimateMenu, + UI_FadeMenu, + UI_AnimateCombo, + UI_AnimateTooltip, + UI_FadeTooltip, + UI_AnimateToolBox + }; + + enum CursorShape { + ArrowCursor, + UpArrowCursor, + CrossCursor, + WaitCursor, + IBeamCursor, + SizeVerCursor, + SizeHorCursor, + SizeBDiagCursor, + SizeFDiagCursor, + SizeAllCursor, + BlankCursor, + SplitVCursor, + SplitHCursor, + PointingHandCursor, + ForbiddenCursor, + WhatsThisCursor, + BusyCursor, + OpenHandCursor, + ClosedHandCursor, + LastCursor = ClosedHandCursor, + BitmapCursor = 24, + CustomCursor = 25 +# 1261 "/usr/include/qt4/QtCore/qnamespace.h" + }; + + enum TextFormat { + PlainText, + RichText, + AutoText, + LogText + }; + + enum AspectRatioMode { + IgnoreAspectRatio, + KeepAspectRatio, + KeepAspectRatioByExpanding + + + + + + }; + + + + + + enum AnchorAttribute { + AnchorName, + AnchorHref + }; + + enum DockWidgetArea { + LeftDockWidgetArea = 0x1, + RightDockWidgetArea = 0x2, + TopDockWidgetArea = 0x4, + BottomDockWidgetArea = 0x8, + + DockWidgetArea_Mask = 0xf, + AllDockWidgetAreas = DockWidgetArea_Mask, + NoDockWidgetArea = 0 + }; + enum DockWidgetAreaSizes { + NDockWidgetAreas = 4 + }; + + typedef QFlags DockWidgetAreas; + + enum ToolBarArea { + LeftToolBarArea = 0x1, + RightToolBarArea = 0x2, + TopToolBarArea = 0x4, + BottomToolBarArea = 0x8, + + ToolBarArea_Mask = 0xf, + AllToolBarAreas = ToolBarArea_Mask, + NoToolBarArea = 0 + }; + + enum ToolBarAreaSizes { + NToolBarAreas = 4 + }; + + typedef QFlags ToolBarAreas; +# 1345 "/usr/include/qt4/QtCore/qnamespace.h" + enum DateFormat { + TextDate, + ISODate, + SystemLocaleDate, + LocalDate = SystemLocaleDate, + LocaleDate, + SystemLocaleShortDate, + SystemLocaleLongDate, + DefaultLocaleShortDate, + DefaultLocaleLongDate + }; + + enum TimeSpec { + LocalTime, + UTC, + OffsetFromUTC + }; + + enum DayOfWeek { + Monday = 1, + Tuesday = 2, + Wednesday = 3, + Thursday = 4, + Friday = 5, + Saturday = 6, + Sunday = 7 + }; + + enum ScrollBarPolicy { + ScrollBarAsNeeded, + ScrollBarAlwaysOff, + ScrollBarAlwaysOn + }; +# 1404 "/usr/include/qt4/QtCore/qnamespace.h" + enum CaseSensitivity { + CaseInsensitive, + CaseSensitive + }; + + enum Corner { + TopLeftCorner = 0x00000, + TopRightCorner = 0x00001, + BottomLeftCorner = 0x00002, + BottomRightCorner = 0x00003 + + + + + + + }; + + enum ConnectionType { + AutoConnection, + DirectConnection, + QueuedConnection, + AutoCompatConnection, + BlockingQueuedConnection, + UniqueConnection = 0x80 + }; + + enum ShortcutContext { + WidgetShortcut, + WindowShortcut, + ApplicationShortcut, + WidgetWithChildrenShortcut + }; + + enum FillRule { + OddEvenFill, + WindingFill + }; + + enum MaskMode { + MaskInColor, + MaskOutColor + }; + + enum ClipOperation { + NoClip, + ReplaceClip, + IntersectClip, + UniteClip + }; + + + enum ItemSelectionMode { + ContainsItemShape = 0x0, + IntersectsItemShape = 0x1, + ContainsItemBoundingRect = 0x2, + IntersectsItemBoundingRect = 0x3 + }; + + enum TransformationMode { + FastTransformation, + SmoothTransformation + }; + + enum Axis { + XAxis, + YAxis, + ZAxis + }; + + enum FocusReason { + MouseFocusReason, + TabFocusReason, + BacktabFocusReason, + ActiveWindowFocusReason, + PopupFocusReason, + ShortcutFocusReason, + MenuBarFocusReason, + OtherFocusReason, + NoFocusReason + }; + + enum ContextMenuPolicy { + NoContextMenu, + DefaultContextMenu, + ActionsContextMenu, + CustomContextMenu, + PreventContextMenu + }; + + enum InputMethodQuery { + ImMicroFocus, + ImFont, + ImCursorPosition, + ImSurroundingText, + ImCurrentSelection, + ImMaximumTextLength, + ImAnchorPosition + }; + + enum InputMethodHint { + ImhNone = 0x0, + ImhHiddenText = 0x1, + ImhNoAutoUppercase = 0x2, + ImhPreferNumbers = 0x4, + ImhPreferUppercase = 0x8, + ImhPreferLowercase = 0x10, + ImhNoPredictiveText = 0x20, + + ImhDigitsOnly = 0x10000, + ImhFormattedNumbersOnly = 0x20000, + ImhUppercaseOnly = 0x40000, + ImhLowercaseOnly = 0x80000, + ImhDialableCharactersOnly = 0x100000, + ImhEmailCharactersOnly = 0x200000, + ImhUrlCharactersOnly = 0x400000, + + ImhExclusiveInputMask = 0xffff0000 + }; + typedef QFlags InputMethodHints; + + enum ToolButtonStyle { + ToolButtonIconOnly, + ToolButtonTextOnly, + ToolButtonTextBesideIcon, + ToolButtonTextUnderIcon, + ToolButtonFollowStyle + }; + + enum LayoutDirection { + LeftToRight, + RightToLeft + }; + + enum AnchorPoint { + AnchorLeft = 0, + AnchorHorizontalCenter, + AnchorRight, + AnchorTop, + AnchorVerticalCenter, + AnchorBottom + }; + + + + enum DropAction { + CopyAction = 0x1, + MoveAction = 0x2, + LinkAction = 0x4, + ActionMask = 0xff, + TargetMoveAction = 0x8002, + IgnoreAction = 0x0 + }; + typedef QFlags DropActions; + + enum CheckState { + Unchecked, + PartiallyChecked, + Checked + }; + + enum ItemDataRole { + DisplayRole = 0, + DecorationRole = 1, + EditRole = 2, + ToolTipRole = 3, + StatusTipRole = 4, + WhatsThisRole = 5, + + FontRole = 6, + TextAlignmentRole = 7, + BackgroundColorRole = 8, + BackgroundRole = 8, + TextColorRole = 9, + ForegroundRole = 9, + CheckStateRole = 10, + + AccessibleTextRole = 11, + AccessibleDescriptionRole = 12, + + SizeHintRole = 13, + + DisplayPropertyRole = 27, + DecorationPropertyRole = 28, + ToolTipPropertyRole = 29, + StatusTipPropertyRole = 30, + WhatsThisPropertyRole = 31, + + UserRole = 32 + }; + + enum ItemFlag { + NoItemFlags = 0, + ItemIsSelectable = 1, + ItemIsEditable = 2, + ItemIsDragEnabled = 4, + ItemIsDropEnabled = 8, + ItemIsUserCheckable = 16, + ItemIsEnabled = 32, + ItemIsTristate = 64 + }; + typedef QFlags ItemFlags; + + enum MatchFlag { + MatchExactly = 0, + MatchContains = 1, + MatchStartsWith = 2, + MatchEndsWith = 3, + MatchRegExp = 4, + MatchWildcard = 5, + MatchFixedString = 8, + MatchCaseSensitive = 16, + MatchWrap = 32, + MatchRecursive = 64 + }; + typedef QFlags MatchFlags; + + + + + + + typedef unsigned long HANDLE; + + + + + + typedef WindowFlags WFlags; + + enum WindowModality { + NonModal, + WindowModal, + ApplicationModal + }; + + enum TextInteractionFlag { + NoTextInteraction = 0, + TextSelectableByMouse = 1, + TextSelectableByKeyboard = 2, + LinksAccessibleByMouse = 4, + LinksAccessibleByKeyboard = 8, + TextEditable = 16, + + TextEditorInteraction = TextSelectableByMouse | TextSelectableByKeyboard | TextEditable, + TextBrowserInteraction = TextSelectableByMouse | LinksAccessibleByMouse | LinksAccessibleByKeyboard + }; + typedef QFlags TextInteractionFlags; + + enum EventPriority { + HighEventPriority = 1, + NormalEventPriority = 0, + LowEventPriority = -1 + }; + + enum SizeHint { + MinimumSize, + PreferredSize, + MaximumSize, + MinimumDescent, + NSizeHints + }; + + enum WindowFrameSection { + NoSection, + LeftSection, + TopLeftSection, + TopSection, + TopRightSection, + RightSection, + BottomRightSection, + BottomSection, + BottomLeftSection, + TitleBarArea + }; + + enum Initialization { + Uninitialized + }; + + enum CoordinateSystem { + DeviceCoordinates, + LogicalCoordinates + }; + + enum TouchPointState { + TouchPointPressed = 0x01, + TouchPointMoved = 0x02, + TouchPointStationary = 0x04, + TouchPointReleased = 0x08, + TouchPointStateMask = 0x0f, + + TouchPointPrimary = 0x10 + }; + typedef QFlags TouchPointStates; + + enum GestureState + { + NoGesture, + GestureStarted = 1, + GestureUpdated = 2, + GestureFinished = 3, + GestureCanceled = 4 + }; + + enum GestureType + { + TapGesture = 1, + TapAndHoldGesture = 2, + PanGesture = 3, + PinchGesture = 4, + SwipeGesture = 5, + + CustomGesture = 0x0100, + + LastGestureType = ~0u + }; + + enum GestureFlag + { + DontStartGestureOnChildren = 0x01, + ReceivePartialGestures = 0x02 + }; + typedef QFlags GestureFlags; + + enum NavigationMode + { + NavigationModeNone, + NavigationModeKeypadTabOrder, + NavigationModeKeypadDirectional, + NavigationModeCursorAuto, + NavigationModeCursorForceVisible + }; +} + + + + +inline QFlags operator|(Qt::MouseButtons::enum_type f1, Qt::MouseButtons::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::MouseButtons::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::MouseButtons::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::Orientations::enum_type f1, Qt::Orientations::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::Orientations::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::Orientations::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::KeyboardModifiers::enum_type f1, Qt::KeyboardModifiers::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::KeyboardModifiers::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::KeyboardModifiers::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::WindowFlags::enum_type f1, Qt::WindowFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::WindowFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::WindowFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::Alignment::enum_type f1, Qt::Alignment::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::Alignment::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::Alignment::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::ImageConversionFlags::enum_type f1, Qt::ImageConversionFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::ImageConversionFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::ImageConversionFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::DockWidgetAreas::enum_type f1, Qt::DockWidgetAreas::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::DockWidgetAreas::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::DockWidgetAreas::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::ToolBarAreas::enum_type f1, Qt::ToolBarAreas::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::ToolBarAreas::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::ToolBarAreas::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::WindowStates::enum_type f1, Qt::WindowStates::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::WindowStates::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::WindowStates::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::DropActions::enum_type f1, Qt::DropActions::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::DropActions::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::DropActions::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::ItemFlags::enum_type f1, Qt::ItemFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::ItemFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::ItemFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::MatchFlags::enum_type f1, Qt::MatchFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::MatchFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::MatchFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::TextInteractionFlags::enum_type f1, Qt::TextInteractionFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::TextInteractionFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::TextInteractionFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::InputMethodHints::enum_type f1, Qt::InputMethodHints::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::InputMethodHints::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::InputMethodHints::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::TouchPointStates::enum_type f1, Qt::TouchPointStates::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::TouchPointStates::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::TouchPointStates::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::GestureFlags::enum_type f1, Qt::GestureFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::GestureFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::GestureFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } + +typedef bool (*qInternalCallback)(void **); + +class QInternal { +public: + enum PaintDeviceFlags { + UnknownDevice = 0x00, + Widget = 0x01, + Pixmap = 0x02, + Image = 0x03, + Printer = 0x04, + Picture = 0x05, + Pbuffer = 0x06, + FramebufferObject = 0x07, + CustomRaster = 0x08, + MacQuartz = 0x09, + PaintBuffer = 0x0a, + OpenGL = 0x0b + }; + enum RelayoutType { + RelayoutNormal, + RelayoutDragging, + RelayoutDropped + }; + + + enum Callback { + ConnectCallback, + DisconnectCallback, + AdoptCurrentThread, + EventNotifyCallback, + LastCallback + }; + + enum InternalFunction { + CreateThreadForAdoption, + RefAdoptedThread, + DerefAdoptedThread, + SetCurrentThreadToMainThread, + SetQObjectSender, + GetQObjectSender, + ResetQObjectSender, + LastInternalFunction + }; + + enum DockPosition { + LeftDock, + RightDock, + TopDock, + BottomDock, + DockCount + }; + + static bool registerCallback(Callback, qInternalCallback); + static bool unregisterCallback(Callback, qInternalCallback); + + static bool activateCallbacks(Callback, void **); + static bool callFunction(InternalFunction func, void **); +}; +# 1826 "/usr/include/qt4/QtCore/qnamespace.h" + + + +# 47 "/usr/include/qt4/QtCore/qbytearray.h" 2 + +# 1 "/usr/include/string.h" 1 3 4 +# 26 "/usr/include/string.h" 3 4 +# 1 "/usr/include/features.h" 1 3 4 +# 347 "/usr/include/features.h" 3 4 +# 1 "/usr/include/sys/cdefs.h" 1 3 4 +# 353 "/usr/include/sys/cdefs.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 354 "/usr/include/sys/cdefs.h" 2 3 4 +# 348 "/usr/include/features.h" 2 3 4 +# 371 "/usr/include/features.h" 3 4 +# 1 "/usr/include/gnu/stubs.h" 1 3 4 + + + +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 5 "/usr/include/gnu/stubs.h" 2 3 4 + + + + +# 1 "/usr/include/gnu/stubs-64.h" 1 3 4 +# 10 "/usr/include/gnu/stubs.h" 2 3 4 +# 372 "/usr/include/features.h" 2 3 4 +# 27 "/usr/include/string.h" 2 3 4 + +extern "C" { + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 34 "/usr/include/string.h" 2 3 4 + + + + + + + + + +extern void *memcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern void *memmove (void *__dest, __const void *__src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, + int __c, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1))); + + +extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern "C++" +{ +extern void *memchr (void *__s, int __c, size_t __n) + throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const void *memchr (__const void *__s, int __c, size_t __n) + throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +memchr (void *__s, int __c, size_t __n) throw () +{ + return __builtin_memchr (__s, __c, __n); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const void * +memchr (__const void *__s, int __c, size_t __n) throw () +{ + return __builtin_memchr (__s, __c, __n); +} + +} + + + + + + + + + + +extern "C++" void *rawmemchr (void *__s, int __c) + throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" __const void *rawmemchr (__const void *__s, int __c) + throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + + + +extern "C++" void *memrchr (void *__s, int __c, size_t __n) + throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" __const void *memrchr (__const void *__s, int __c, size_t __n) + throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + + + + + +extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); + +extern char *strncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern char *strcat (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); + +extern char *strncat (char *__restrict __dest, __const char *__restrict __src, + size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int strcmp (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strcoll (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern size_t strxfrm (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (2))); + + + + + + +# 1 "/usr/include/xlocale.h" 1 3 4 +# 28 "/usr/include/xlocale.h" 3 4 +typedef struct __locale_struct +{ + + struct locale_data *__locales[13]; + + + const unsigned short int *__ctype_b; + const int *__ctype_tolower; + const int *__ctype_toupper; + + + const char *__names[13]; +} *__locale_t; + + +typedef __locale_t locale_t; +# 162 "/usr/include/string.h" 2 3 4 + + +extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); + +extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, + __locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4))); + + + + +extern char *strdup (__const char *__s) + throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern char *strndup (__const char *__string, size_t __n) + throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); +# 208 "/usr/include/string.h" 3 4 + + + +extern "C++" +{ +extern char *strchr (char *__s, int __c) + throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *strchr (__const char *__s, int __c) + throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strchr (char *__s, int __c) throw () +{ + return __builtin_strchr (__s, __c); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +strchr (__const char *__s, int __c) throw () +{ + return __builtin_strchr (__s, __c); +} + +} + + + + + + +extern "C++" +{ +extern char *strrchr (char *__s, int __c) + throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *strrchr (__const char *__s, int __c) + throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strrchr (char *__s, int __c) throw () +{ + return __builtin_strrchr (__s, __c); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +strrchr (__const char *__s, int __c) throw () +{ + return __builtin_strrchr (__s, __c); +} + +} + + + + + + + + + + +extern "C++" char *strchrnul (char *__s, int __c) + throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" __const char *strchrnul (__const char *__s, int __c) + throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + + + + + +extern size_t strcspn (__const char *__s, __const char *__reject) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern size_t strspn (__const char *__s, __const char *__accept) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern "C++" +{ +extern char *strpbrk (char *__s, __const char *__accept) + throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern __const char *strpbrk (__const char *__s, __const char *__accept) + throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strpbrk (char *__s, __const char *__accept) throw () +{ + return __builtin_strpbrk (__s, __accept); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +strpbrk (__const char *__s, __const char *__accept) throw () +{ + return __builtin_strpbrk (__s, __accept); +} + +} + + + + + + +extern "C++" +{ +extern char *strstr (char *__haystack, __const char *__needle) + throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern __const char *strstr (__const char *__haystack, + __const char *__needle) + throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strstr (char *__haystack, __const char *__needle) throw () +{ + return __builtin_strstr (__haystack, __needle); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +strstr (__const char *__haystack, __const char *__needle) throw () +{ + return __builtin_strstr (__haystack, __needle); +} + +} + + + + + + + +extern char *strtok (char *__restrict __s, __const char *__restrict __delim) + throw () __attribute__ ((__nonnull__ (2))); + + + + +extern char *__strtok_r (char *__restrict __s, + __const char *__restrict __delim, + char **__restrict __save_ptr) + throw () __attribute__ ((__nonnull__ (2, 3))); + +extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, + char **__restrict __save_ptr) + throw () __attribute__ ((__nonnull__ (2, 3))); + + + + + +extern "C++" char *strcasestr (char *__haystack, __const char *__needle) + throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern "C++" __const char *strcasestr (__const char *__haystack, + __const char *__needle) + throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 380 "/usr/include/string.h" 3 4 +extern void *memmem (__const void *__haystack, size_t __haystacklen, + __const void *__needle, size_t __needlelen) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); + + + +extern void *__mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void *mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern size_t strlen (__const char *__s) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern size_t strnlen (__const char *__string, size_t __maxlen) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern char *strerror (int __errnum) throw (); + +# 436 "/usr/include/string.h" 3 4 +extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) + throw () __attribute__ ((__nonnull__ (2))); + + + + + +extern char *strerror_l (int __errnum, __locale_t __l) throw (); + + + + + +extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); + + + +extern void bcopy (__const void *__src, void *__dest, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); + + +extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern "C++" +{ +extern char *index (char *__s, int __c) + throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *index (__const char *__s, int __c) + throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +index (char *__s, int __c) throw () +{ + return __builtin_index (__s, __c); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +index (__const char *__s, int __c) throw () +{ + return __builtin_index (__s, __c); +} + +} + + + + + + + +extern "C++" +{ +extern char *rindex (char *__s, int __c) + throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *rindex (__const char *__s, int __c) + throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +rindex (char *__s, int __c) throw () +{ + return __builtin_rindex (__s, __c); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +rindex (__const char *__s, int __c) throw () +{ + return __builtin_rindex (__s, __c); +} + +} + + + + + + + +extern int ffs (int __i) throw () __attribute__ ((__const__)); + + + + +extern int ffsl (long int __l) throw () __attribute__ ((__const__)); + +__extension__ extern int ffsll (long long int __ll) + throw () __attribute__ ((__const__)); + + + + +extern int strcasecmp (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern int strcasecmp_l (__const char *__s1, __const char *__s2, + __locale_t __loc) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); + +extern int strncasecmp_l (__const char *__s1, __const char *__s2, + size_t __n, __locale_t __loc) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); + + + + + +extern char *strsep (char **__restrict __stringp, + __const char *__restrict __delim) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + +extern char *strsignal (int __sig) throw (); + + +extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern char *__stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int strverscmp (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1))); + + +extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); + + + + + + + +extern "C++" char *basename (char *__filename) + throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); +extern "C++" __const char *basename (__const char *__filename) + throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); +# 640 "/usr/include/string.h" 3 4 +# 1 "/usr/include/bits/string3.h" 1 3 4 +# 23 "/usr/include/bits/string3.h" 3 4 +extern void __warn_memset_zero_len (void) __attribute__((__warning__ ("memset used with constant zero length parameter; this could be due to transposed parameters"))) + ; +# 48 "/usr/include/bits/string3.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) throw () + +{ + return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +memmove (void *__restrict __dest, __const void *__restrict __src, size_t __len) throw () + +{ + return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) throw () + +{ + return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} +# 77 "/usr/include/bits/string3.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +memset (void *__dest, int __ch, size_t __len) throw () +{ + if (__builtin_constant_p (__len) && __len == 0 + && (!__builtin_constant_p (__ch) || __ch != 0)) + { + __warn_memset_zero_len (); + return __dest; + } + return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void +bcopy (__const void *__restrict __src, void *__restrict __dest, size_t __len) throw () + +{ + (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void +bzero (void *__dest, size_t __len) throw () +{ + (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strcpy (char *__restrict __dest, __const char *__restrict __src) throw () +{ + return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +stpcpy (char *__restrict __dest, __const char *__restrict __src) throw () +{ + return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __len) throw () + +{ + return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); +} + + +extern char *__stpncpy_chk (char *__dest, __const char *__src, size_t __n, + size_t __destlen) throw (); +extern char *__stpncpy_alias (char *__dest, __const char *__src, size_t __n) throw () __asm__ ("" "stpncpy") + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +stpncpy (char *__dest, __const char *__src, size_t __n) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1 + && (!__builtin_constant_p (__n) || __n <= __builtin_object_size (__dest, 2 > 1))) + return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1)); + return __stpncpy_alias (__dest, __src, __n); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strcat (char *__restrict __dest, __const char *__restrict __src) throw () +{ + return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strncat (char *__restrict __dest, __const char *__restrict __src, size_t __len) throw () + +{ + return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); +} +# 641 "/usr/include/string.h" 2 3 4 + + + +} +# 49 "/usr/include/qt4/QtCore/qbytearray.h" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stdarg.h" 1 3 4 +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stdarg.h" 3 4 +typedef __builtin_va_list __gnuc_va_list; +# 102 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stdarg.h" 3 4 +typedef __gnuc_va_list va_list; +# 50 "/usr/include/qt4/QtCore/qbytearray.h" 2 + + + + + + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + + + + + + char *qstrdup(const char *); + +inline uint qstrlen(const char *str) +{ return str ? uint(strlen(str)) : 0; } + +inline uint qstrnlen(const char *str, uint maxlen) +{ + uint length = 0; + if (str) { + while (length < maxlen && *str++) + length++; + } + return length; +} + + char *qstrcpy(char *dst, const char *src); + char *qstrncpy(char *dst, const char *src, uint len); + + int qstrcmp(const char *str1, const char *str2); + int qstrcmp(const QByteArray &str1, const QByteArray &str2); + int qstrcmp(const QByteArray &str1, const char *str2); +static inline int qstrcmp(const char *str1, const QByteArray &str2) +{ return -qstrcmp(str2, str1); } + +inline int qstrncmp(const char *str1, const char *str2, uint len) +{ + return (str1 && str2) ? strncmp(str1, str2, len) + : (str1 ? 1 : (str2 ? -1 : 0)); +} + int qstricmp(const char *, const char *); + int qstrnicmp(const char *, const char *, uint len); + + + int qvsnprintf(char *str, size_t n, const char *fmt, va_list ap); + int qsnprintf(char *str, size_t n, const char *fmt, ...); +# 116 "/usr/include/qt4/QtCore/qbytearray.h" + quint16 qChecksum(const char *s, uint len); + +class QByteRef; +class QString; +class QDataStream; +template class QList; + +class QByteArray +{ +private: + struct Data { + QBasicAtomicInt ref; + int alloc, size; + + + + char *data; + char array[1]; + }; + +public: + inline QByteArray(); + QByteArray(const char *); + QByteArray(const char *, int size); + QByteArray(int size, char c); + QByteArray(int size, Qt::Initialization); + inline QByteArray(const QByteArray &); + inline ~QByteArray(); + + QByteArray &operator=(const QByteArray &); + QByteArray &operator=(const char *str); + + inline int size() const; + bool isEmpty() const; + void resize(int size); + + QByteArray &fill(char c, int size = -1); + + int capacity() const; + void reserve(int size); + void squeeze(); + + + operator const char *() const; + operator const void *() const; + + char *data(); + const char *data() const; + inline const char *constData() const; + inline void detach(); + bool isDetached() const; + void clear(); + + + + + + + char at(int i) const; + char operator[](int i) const; + char operator[](uint i) const; + + QByteRef operator[](int i); + QByteRef operator[](uint i); + + int indexOf(char c, int from = 0) const; + int indexOf(const char *c, int from = 0) const; + int indexOf(const QByteArray &a, int from = 0) const; + int lastIndexOf(char c, int from = -1) const; + int lastIndexOf(const char *c, int from = -1) const; + int lastIndexOf(const QByteArray &a, int from = -1) const; + + QBool contains(char c) const; + QBool contains(const char *a) const; + QBool contains(const QByteArray &a) const; + int count(char c) const; + int count(const char *a) const; + int count(const QByteArray &a) const; + + QByteArray left(int len) const; + QByteArray right(int len) const; + QByteArray mid(int index, int len = -1) const; + + bool startsWith(const QByteArray &a) const; + bool startsWith(char c) const; + bool startsWith(const char *c) const; + + bool endsWith(const QByteArray &a) const; + bool endsWith(char c) const; + bool endsWith(const char *c) const; + + void truncate(int pos); + void chop(int n); + + QByteArray toLower() const; + QByteArray toUpper() const; + + QByteArray trimmed() const; + QByteArray simplified() const; + QByteArray leftJustified(int width, char fill = ' ', bool truncate = false) const; + QByteArray rightJustified(int width, char fill = ' ', bool truncate = false) const; +# 225 "/usr/include/qt4/QtCore/qbytearray.h" + QByteArray &prepend(char c); + QByteArray &prepend(const char *s); + QByteArray &prepend(const char *s, int len); + QByteArray &prepend(const QByteArray &a); + QByteArray &append(char c); + QByteArray &append(const char *s); + QByteArray &append(const char *s, int len); + QByteArray &append(const QByteArray &a); + QByteArray &insert(int i, char c); + QByteArray &insert(int i, const char *s); + QByteArray &insert(int i, const char *s, int len); + QByteArray &insert(int i, const QByteArray &a); + QByteArray &remove(int index, int len); + QByteArray &replace(int index, int len, const char *s); + QByteArray &replace(int index, int len, const QByteArray &s); + QByteArray &replace(char before, const char *after); + QByteArray &replace(char before, const QByteArray &after); + QByteArray &replace(const char *before, const char *after); + QByteArray &replace(const char *before, int bsize, const char *after, int asize); + QByteArray &replace(const QByteArray &before, const QByteArray &after); + QByteArray &replace(const QByteArray &before, const char *after); + QByteArray &replace(const char *before, const QByteArray &after); + QByteArray &replace(char before, char after); + QByteArray &operator+=(char c); + QByteArray &operator+=(const char *s); + QByteArray &operator+=(const QByteArray &a); + + QList split(char sep) const; + + QByteArray repeated(int times) const; + + + QByteArray &append(const QString &s); + QByteArray &insert(int i, const QString &s); + QByteArray &replace(const QString &before, const char *after); + QByteArray &replace(char c, const QString &after); + QByteArray &replace(const QString &before, const QByteArray &after); + + QByteArray &operator+=(const QString &s); + int indexOf(const QString &s, int from = 0) const; + int lastIndexOf(const QString &s, int from = -1) const; + + + inline bool operator==(const QString &s2) const; + inline bool operator!=(const QString &s2) const; + inline bool operator<(const QString &s2) const; + inline bool operator>(const QString &s2) const; + inline bool operator<=(const QString &s2) const; + inline bool operator>=(const QString &s2) const; + + + short toShort(bool *ok = 0, int base = 10) const; + ushort toUShort(bool *ok = 0, int base = 10) const; + int toInt(bool *ok = 0, int base = 10) const; + uint toUInt(bool *ok = 0, int base = 10) const; + long toLong(bool *ok = 0, int base = 10) const; + ulong toULong(bool *ok = 0, int base = 10) const; + qlonglong toLongLong(bool *ok = 0, int base = 10) const; + qulonglong toULongLong(bool *ok = 0, int base = 10) const; + float toFloat(bool *ok = 0) const; + double toDouble(bool *ok = 0) const; + QByteArray toBase64() const; + QByteArray toHex() const; + QByteArray toPercentEncoding(const QByteArray &exclude = QByteArray(), + const QByteArray &include = QByteArray(), + char percent = '%') const; + + QByteArray &setNum(short, int base = 10); + QByteArray &setNum(ushort, int base = 10); + QByteArray &setNum(int, int base = 10); + QByteArray &setNum(uint, int base = 10); + QByteArray &setNum(qlonglong, int base = 10); + QByteArray &setNum(qulonglong, int base = 10); + QByteArray &setNum(float, char f = 'g', int prec = 6); + QByteArray &setNum(double, char f = 'g', int prec = 6); + + static QByteArray number(int, int base = 10); + static QByteArray number(uint, int base = 10); + static QByteArray number(qlonglong, int base = 10); + static QByteArray number(qulonglong, int base = 10); + static QByteArray number(double, char f = 'g', int prec = 6); + static QByteArray fromRawData(const char *, int size); + static QByteArray fromBase64(const QByteArray &base64); + static QByteArray fromHex(const QByteArray &hexEncoded); + static QByteArray fromPercentEncoding(const QByteArray &pctEncoded, char percent = '%'); + + + typedef char *iterator; + typedef const char *const_iterator; + typedef iterator Iterator; + typedef const_iterator ConstIterator; + iterator begin(); + const_iterator begin() const; + const_iterator constBegin() const; + iterator end(); + const_iterator end() const; + const_iterator constEnd() const; + + + typedef const char & const_reference; + typedef char & reference; + typedef char value_type; + void push_back(char c); + void push_back(const char *c); + void push_back(const QByteArray &a); + void push_front(char c); + void push_front(const char *c); + void push_front(const QByteArray &a); + + inline int count() const { return d->size; } + int length() const { return d->size; } + bool isNull() const; +# 363 "/usr/include/qt4/QtCore/qbytearray.h" +private: + operator QNoImplicitBoolCast() const; + static Data shared_null; + static Data shared_empty; + Data *d; + QByteArray(Data *dd, int , int ) : d(dd) {} + void realloc(int alloc); + void expand(int i); + QByteArray nulTerminated() const; + + friend class QByteRef; + friend class QString; + friend QByteArray qUncompress(const uchar *data, int nbytes); +public: + typedef Data * DataPtr; + inline DataPtr &data_ptr() { return d; } +}; + +inline QByteArray::QByteArray(): d(&shared_null) { d->ref.ref(); } +inline QByteArray::~QByteArray() { if (!d->ref.deref()) qFree(d); } +inline int QByteArray::size() const +{ return d->size; } +# 394 "/usr/include/qt4/QtCore/qbytearray.h" +inline char QByteArray::at(int i) const +{ ((!(i >= 0 && i < size())) ? qt_assert("i >= 0 && i < size()","/usr/include/qt4/QtCore/qbytearray.h",395) : qt_noop()); return d->data[i]; } +inline char QByteArray::operator[](int i) const +{ ((!(i >= 0 && i < size())) ? qt_assert("i >= 0 && i < size()","/usr/include/qt4/QtCore/qbytearray.h",397) : qt_noop()); return d->data[i]; } +inline char QByteArray::operator[](uint i) const +{ ((!(i < uint(size()))) ? qt_assert("i < uint(size())","/usr/include/qt4/QtCore/qbytearray.h",399) : qt_noop()); return d->data[i]; } + + +inline bool QByteArray::isEmpty() const +{ return d->size == 0; } + +inline QByteArray::operator const char *() const +{ return d->data; } +inline QByteArray::operator const void *() const +{ return d->data; } + +inline char *QByteArray::data() +{ detach(); return d->data; } +inline const char *QByteArray::data() const +{ return d->data; } +inline const char *QByteArray::constData() const +{ return d->data; } +inline void QByteArray::detach() +{ if (d->ref != 1 || d->data != d->array) realloc(d->size); } +inline bool QByteArray::isDetached() const +{ return d->ref == 1; } +inline QByteArray::QByteArray(const QByteArray &a) : d(a.d) +{ d->ref.ref(); } + + + + + +inline int QByteArray::capacity() const +{ return d->alloc; } + +inline void QByteArray::reserve(int asize) +{ if (d->ref != 1 || asize > d->alloc) realloc(asize); } + +inline void QByteArray::squeeze() +{ if (d->size < d->alloc) realloc(d->size); } + +class QByteRef { + QByteArray &a; + int i; + inline QByteRef(QByteArray &array, int idx) + : a(array),i(idx) {} + friend class QByteArray; +public: + + + + + inline operator char() const + { return i < a.d->size ? a.d->data[i] : char(0); } + + inline QByteRef &operator=(char c) + { if (i >= a.d->size) a.expand(i); else a.detach(); + a.d->data[i] = c; return *this; } + inline QByteRef &operator=(const QByteRef &c) + { if (i >= a.d->size) a.expand(i); else a.detach(); + a.d->data[i] = c.a.d->data[c.i]; return *this; } + inline bool operator==(char c) const + { return a.d->data[i] == c; } + inline bool operator!=(char c) const + { return a.d->data[i] != c; } + inline bool operator>(char c) const + { return a.d->data[i] > c; } + inline bool operator>=(char c) const + { return a.d->data[i] >= c; } + inline bool operator<(char c) const + { return a.d->data[i] < c; } + inline bool operator<=(char c) const + { return a.d->data[i] <= c; } +}; + +inline QByteRef QByteArray::operator[](int i) +{ ((!(i >= 0)) ? qt_assert("i >= 0","/usr/include/qt4/QtCore/qbytearray.h",471) : qt_noop()); return QByteRef(*this, i); } +inline QByteRef QByteArray::operator[](uint i) +{ return QByteRef(*this, i); } +inline QByteArray::iterator QByteArray::begin() +{ detach(); return d->data; } +inline QByteArray::const_iterator QByteArray::begin() const +{ return d->data; } +inline QByteArray::const_iterator QByteArray::constBegin() const +{ return d->data; } +inline QByteArray::iterator QByteArray::end() +{ detach(); return d->data + d->size; } +inline QByteArray::const_iterator QByteArray::end() const +{ return d->data + d->size; } +inline QByteArray::const_iterator QByteArray::constEnd() const +{ return d->data + d->size; } +inline QByteArray &QByteArray::operator+=(char c) +{ return append(c); } +inline QByteArray &QByteArray::operator+=(const char *s) +{ return append(s); } +inline QByteArray &QByteArray::operator+=(const QByteArray &a) +{ return append(a); } +inline void QByteArray::push_back(char c) +{ append(c); } +inline void QByteArray::push_back(const char *c) +{ append(c); } +inline void QByteArray::push_back(const QByteArray &a) +{ append(a); } +inline void QByteArray::push_front(char c) +{ prepend(c); } +inline void QByteArray::push_front(const char *c) +{ prepend(c); } +inline void QByteArray::push_front(const QByteArray &a) +{ prepend(a); } +inline QBool QByteArray::contains(const QByteArray &a) const +{ return QBool(indexOf(a) != -1); } +inline QBool QByteArray::contains(char c) const +{ return QBool(indexOf(c) != -1); } +inline bool operator==(const QByteArray &a1, const QByteArray &a2) +{ return (a1.size() == a2.size()) && (memcmp(a1.constData(), a2.constData(), a1.size())==0); } +inline bool operator==(const QByteArray &a1, const char *a2) +{ return a2 ? qstrcmp(a1,a2) == 0 : a1.isEmpty(); } +inline bool operator==(const char *a1, const QByteArray &a2) +{ return a1 ? qstrcmp(a1,a2) == 0 : a2.isEmpty(); } +inline bool operator!=(const QByteArray &a1, const QByteArray &a2) +{ return !(a1==a2); } +inline bool operator!=(const QByteArray &a1, const char *a2) +{ return a2 ? qstrcmp(a1,a2) != 0 : !a1.isEmpty(); } +inline bool operator!=(const char *a1, const QByteArray &a2) +{ return a1 ? qstrcmp(a1,a2) != 0 : !a2.isEmpty(); } +inline bool operator<(const QByteArray &a1, const QByteArray &a2) +{ return qstrcmp(a1, a2) < 0; } + inline bool operator<(const QByteArray &a1, const char *a2) +{ return qstrcmp(a1, a2) < 0; } +inline bool operator<(const char *a1, const QByteArray &a2) +{ return qstrcmp(a1, a2) < 0; } +inline bool operator<=(const QByteArray &a1, const QByteArray &a2) +{ return qstrcmp(a1, a2) <= 0; } +inline bool operator<=(const QByteArray &a1, const char *a2) +{ return qstrcmp(a1, a2) <= 0; } +inline bool operator<=(const char *a1, const QByteArray &a2) +{ return qstrcmp(a1, a2) <= 0; } +inline bool operator>(const QByteArray &a1, const QByteArray &a2) +{ return qstrcmp(a1, a2) > 0; } +inline bool operator>(const QByteArray &a1, const char *a2) +{ return qstrcmp(a1, a2) > 0; } +inline bool operator>(const char *a1, const QByteArray &a2) +{ return qstrcmp(a1, a2) > 0; } +inline bool operator>=(const QByteArray &a1, const QByteArray &a2) +{ return qstrcmp(a1, a2) >= 0; } +inline bool operator>=(const QByteArray &a1, const char *a2) +{ return qstrcmp(a1, a2) >= 0; } +inline bool operator>=(const char *a1, const QByteArray &a2) +{ return qstrcmp(a1, a2) >= 0; } +inline const QByteArray operator+(const QByteArray &a1, const QByteArray &a2) +{ return QByteArray(a1) += a2; } +inline const QByteArray operator+(const QByteArray &a1, const char *a2) +{ return QByteArray(a1) += a2; } +inline const QByteArray operator+(const QByteArray &a1, char a2) +{ return QByteArray(a1) += a2; } +inline const QByteArray operator+(const char *a1, const QByteArray &a2) +{ return QByteArray(a1) += a2; } +inline const QByteArray operator+(char a1, const QByteArray &a2) +{ return QByteArray(&a1, 1) += a2; } +inline QBool QByteArray::contains(const char *c) const +{ return QBool(indexOf(c) != -1); } +inline QByteArray &QByteArray::replace(char before, const char *c) +{ return replace(&before, 1, c, qstrlen(c)); } +inline QByteArray &QByteArray::replace(const QByteArray &before, const char *c) +{ return replace(before.constData(), before.size(), c, qstrlen(c)); } +inline QByteArray &QByteArray::replace(const char *before, const char *after) +{ return replace(before, qstrlen(before), after, qstrlen(after)); } + +inline QByteArray &QByteArray::setNum(short n, int base) +{ return setNum(qlonglong(n), base); } +inline QByteArray &QByteArray::setNum(ushort n, int base) +{ return setNum(qulonglong(n), base); } +inline QByteArray &QByteArray::setNum(int n, int base) +{ return setNum(qlonglong(n), base); } +inline QByteArray &QByteArray::setNum(uint n, int base) +{ return setNum(qulonglong(n), base); } +inline QByteArray &QByteArray::setNum(float n, char f, int prec) +{ return setNum(double(n),f,prec); } + + + + QDataStream &operator<<(QDataStream &, const QByteArray &); + QDataStream &operator>>(QDataStream &, QByteArray &); + + + + QByteArray qCompress(const uchar* data, int nbytes, int compressionLevel = -1); + QByteArray qUncompress(const uchar* data, int nbytes); +inline QByteArray qCompress(const QByteArray& data, int compressionLevel = -1) +{ return qCompress(reinterpret_cast(data.constData()), data.size(), compressionLevel); } +inline QByteArray qUncompress(const QByteArray& data) +{ return qUncompress(reinterpret_cast(data.constData()), data.size()); } + + +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QByteArray)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QByteArray"; } }; +template <> inline bool qIsDetached(QByteArray &t) { return t.isDetached(); } template <> inline void qSwap(QByteArray &value1, QByteArray &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } + + + + +# 47 "/usr/include/qt4/QtCore/qstring.h" 2 +# 60 "/usr/include/qt4/QtCore/qstring.h" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/string" 1 3 +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/string" 3 + +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/string" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 1 3 +# 275 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/os_defines.h" 1 3 +# 276 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 2 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/cpu_defines.h" 1 3 +# 279 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 2 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/string" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stringfwd.h" 1 3 +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stringfwd.h" 3 + +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stringfwd.h" 3 + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + class allocator; + + template + struct char_traits; + + template, + typename _Alloc = allocator<_CharT> > + class basic_string; + + template<> struct char_traits; + + typedef basic_string string; + + + template<> struct char_traits; + + typedef basic_string wstring; +# 75 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stringfwd.h" 3 +} +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/string" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/char_traits.h" 1 3 +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/char_traits.h" 3 + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/char_traits.h" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 1 3 +# 61 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + using ::ptrdiff_t; + using ::size_t; + +} +# 62 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/functexcept.h" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/functexcept.h" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/exception_defines.h" 1 3 +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/functexcept.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + void + __throw_bad_exception(void) __attribute__((__noreturn__)); + + + void + __throw_bad_alloc(void) __attribute__((__noreturn__)); + + + void + __throw_bad_cast(void) __attribute__((__noreturn__)); + + void + __throw_bad_typeid(void) __attribute__((__noreturn__)); + + + void + __throw_logic_error(const char*) __attribute__((__noreturn__)); + + void + __throw_domain_error(const char*) __attribute__((__noreturn__)); + + void + __throw_invalid_argument(const char*) __attribute__((__noreturn__)); + + void + __throw_length_error(const char*) __attribute__((__noreturn__)); + + void + __throw_out_of_range(const char*) __attribute__((__noreturn__)); + + void + __throw_runtime_error(const char*) __attribute__((__noreturn__)); + + void + __throw_range_error(const char*) __attribute__((__noreturn__)); + + void + __throw_overflow_error(const char*) __attribute__((__noreturn__)); + + void + __throw_underflow_error(const char*) __attribute__((__noreturn__)); + + + void + __throw_ios_failure(const char*) __attribute__((__noreturn__)); + + void + __throw_system_error(int) __attribute__((__noreturn__)); + + void + __throw_future_error(int) __attribute__((__noreturn__)); + + + void + __throw_bad_function_call() __attribute__((__noreturn__)); + +} +# 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/cpp_type_traits.h" 1 3 +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/cpp_type_traits.h" 3 + +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/cpp_type_traits.h" 3 +# 69 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/cpp_type_traits.h" 3 +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + + template + class __normal_iterator; + +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + + struct __true_type { }; + struct __false_type { }; + + template + struct __truth_type + { typedef __false_type __type; }; + + template<> + struct __truth_type + { typedef __true_type __type; }; + + + + template + struct __traitor + { + enum { __value = bool(_Sp::__value) || bool(_Tp::__value) }; + typedef typename __truth_type<__value>::__type __type; + }; + + + template + struct __are_same + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template + struct __are_same<_Tp, _Tp> + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template + struct __is_void + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template<> + struct __is_void + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_integer + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + + + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; +# 194 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/cpp_type_traits.h" 3 + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_floating + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_pointer + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template + struct __is_pointer<_Tp*> + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_normal_iterator + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template + struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator, + _Container> > + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_arithmetic + : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > + { }; + + + + + template + struct __is_fundamental + : public __traitor<__is_void<_Tp>, __is_arithmetic<_Tp> > + { }; + + + + + template + struct __is_scalar + : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > + { }; + + + + + template + struct __is_char + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template<> + struct __is_char + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template<> + struct __is_char + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template + struct __is_byte + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_move_iterator + { + enum { __value = 0 }; + typedef __false_type __type; + }; +# 417 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/cpp_type_traits.h" 3 +} +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ext/type_traits.h" 1 3 +# 32 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ext/type_traits.h" 3 + +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ext/type_traits.h" 3 + + + + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + + + template + struct __enable_if + { }; + + template + struct __enable_if + { typedef _Tp __type; }; + + + + template + struct __conditional_type + { typedef _Iftrue __type; }; + + template + struct __conditional_type + { typedef _Iffalse __type; }; + + + + template + struct __add_unsigned + { + private: + typedef __enable_if::__value, _Tp> __if_type; + + public: + typedef typename __if_type::__type __type; + }; + + template<> + struct __add_unsigned + { typedef unsigned char __type; }; + + template<> + struct __add_unsigned + { typedef unsigned char __type; }; + + template<> + struct __add_unsigned + { typedef unsigned short __type; }; + + template<> + struct __add_unsigned + { typedef unsigned int __type; }; + + template<> + struct __add_unsigned + { typedef unsigned long __type; }; + + template<> + struct __add_unsigned + { typedef unsigned long long __type; }; + + + template<> + struct __add_unsigned; + + template<> + struct __add_unsigned; + + + + template + struct __remove_unsigned + { + private: + typedef __enable_if::__value, _Tp> __if_type; + + public: + typedef typename __if_type::__type __type; + }; + + template<> + struct __remove_unsigned + { typedef signed char __type; }; + + template<> + struct __remove_unsigned + { typedef signed char __type; }; + + template<> + struct __remove_unsigned + { typedef short __type; }; + + template<> + struct __remove_unsigned + { typedef int __type; }; + + template<> + struct __remove_unsigned + { typedef long __type; }; + + template<> + struct __remove_unsigned + { typedef long long __type; }; + + + template<> + struct __remove_unsigned; + + template<> + struct __remove_unsigned; + + + + template + inline bool + __is_null_pointer(_Type* __ptr) + { return __ptr == 0; } + + template + inline bool + __is_null_pointer(_Type) + { return false; } + + + + template::__value> + struct __promote + { typedef double __type; }; + + template + struct __promote<_Tp, false> + { typedef _Tp __type; }; + + template + struct __promote_2 + { + private: + typedef typename __promote<_Tp>::__type __type1; + typedef typename __promote<_Up>::__type __type2; + + public: + typedef __typeof__(__type1() + __type2()) __type; + }; + + template + struct __promote_3 + { + private: + typedef typename __promote<_Tp>::__type __type1; + typedef typename __promote<_Up>::__type __type2; + typedef typename __promote<_Vp>::__type __type3; + + public: + typedef __typeof__(__type1() + __type2() + __type3()) __type; + }; + + template + struct __promote_4 + { + private: + typedef typename __promote<_Tp>::__type __type1; + typedef typename __promote<_Up>::__type __type2; + typedef typename __promote<_Vp>::__type __type3; + typedef typename __promote<_Wp>::__type __type4; + + public: + typedef __typeof__(__type1() + __type2() + __type3() + __type4()) __type; + }; + +} +# 65 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ext/numeric_traits.h" 1 3 +# 32 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ext/numeric_traits.h" 3 + +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ext/numeric_traits.h" 3 + + + + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { +# 52 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ext/numeric_traits.h" 3 + template + struct __numeric_traits_integer + { + + static const _Value __min = (((_Value)(-1) < 0) ? (_Value)1 << (sizeof(_Value) * 8 - ((_Value)(-1) < 0)) : (_Value)0); + static const _Value __max = (((_Value)(-1) < 0) ? (((((_Value)1 << ((sizeof(_Value) * 8 - ((_Value)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(_Value)0); + + + + static const bool __is_signed = ((_Value)(-1) < 0); + static const int __digits = (sizeof(_Value) * 8 - ((_Value)(-1) < 0)); + }; + + template + const _Value __numeric_traits_integer<_Value>::__min; + + template + const _Value __numeric_traits_integer<_Value>::__max; + + template + const bool __numeric_traits_integer<_Value>::__is_signed; + + template + const int __numeric_traits_integer<_Value>::__digits; +# 97 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ext/numeric_traits.h" 3 + template + struct __numeric_traits_floating + { + + static const int __max_digits10 = (2 + (std::__are_same<_Value, float>::__value ? 24 : std::__are_same<_Value, double>::__value ? 53 : 64) * 3010 / 10000); + + + static const bool __is_signed = true; + static const int __digits10 = (std::__are_same<_Value, float>::__value ? 6 : std::__are_same<_Value, double>::__value ? 15 : 18); + static const int __max_exponent10 = (std::__are_same<_Value, float>::__value ? 38 : std::__are_same<_Value, double>::__value ? 308 : 4932); + }; + + template + const int __numeric_traits_floating<_Value>::__max_digits10; + + template + const bool __numeric_traits_floating<_Value>::__is_signed; + + template + const int __numeric_traits_floating<_Value>::__digits10; + + template + const int __numeric_traits_floating<_Value>::__max_exponent10; + + template + struct __numeric_traits + : public __conditional_type::__value, + __numeric_traits_integer<_Value>, + __numeric_traits_floating<_Value> >::__type + { }; + +} +# 66 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_pair.h" 1 3 +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_pair.h" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/move.h" 1 3 +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/move.h" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/move.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/concept_check.h" 1 3 +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/concept_check.h" 3 + +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/concept_check.h" 3 +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/move.h" 2 3 +# 95 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/move.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { +# 104 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/move.h" 3 + template + inline void + swap(_Tp& __a, _Tp& __b) + { + + + + _Tp __tmp = (__a); + __a = (__b); + __b = (__tmp); + } + + + + template + inline void + swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) + { + for (size_t __n = 0; __n < _Nm; ++__n) + swap(__a[__n], __b[__n]); + } + +} +# 61 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_pair.h" 2 3 + + + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + template + struct pair + { + typedef _T1 first_type; + typedef _T2 second_type; + + _T1 first; + _T2 second; + + + + + + pair() + : first(), second() { } + + + pair(const _T1& __a, const _T2& __b) + : first(__a), second(__b) { } +# 117 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_pair.h" 3 + template + pair(const pair<_U1, _U2>& __p) + : first(__p.first), + second(__p.second) { } +# 153 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_pair.h" 3 + }; + + + template + inline bool + operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __x.first == __y.first && __x.second == __y.second; } + + + template + inline bool + operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __x.first < __y.first + || (!(__y.first < __x.first) && __x.second < __y.second); } + + + template + inline bool + operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return !(__x == __y); } + + + template + inline bool + operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __y < __x; } + + + template + inline bool + operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return !(__y < __x); } + + + template + inline bool + operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return !(__x < __y); } +# 215 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_pair.h" 3 + template + inline pair<_T1, _T2> + make_pair(_T1 __x, _T2 __y) + { return pair<_T1, _T2>(__x, __y); } +# 261 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_pair.h" 3 +} +# 67 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator_base_types.h" 1 3 +# 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator_base_types.h" 3 + +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator_base_types.h" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 67 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator_base_types.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 79 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator_base_types.h" 3 + struct input_iterator_tag { }; + + + struct output_iterator_tag { }; + + + struct forward_iterator_tag : public input_iterator_tag { }; + + + + struct bidirectional_iterator_tag : public forward_iterator_tag { }; + + + + struct random_access_iterator_tag : public bidirectional_iterator_tag { }; +# 106 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator_base_types.h" 3 + template + struct iterator + { + + typedef _Category iterator_category; + + typedef _Tp value_type; + + typedef _Distance difference_type; + + typedef _Pointer pointer; + + typedef _Reference reference; + }; +# 130 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator_base_types.h" 3 + template + struct iterator_traits + { + typedef typename _Iterator::iterator_category iterator_category; + typedef typename _Iterator::value_type value_type; + typedef typename _Iterator::difference_type difference_type; + typedef typename _Iterator::pointer pointer; + typedef typename _Iterator::reference reference; + }; + + + template + struct iterator_traits<_Tp*> + { + typedef random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef _Tp& reference; + }; + + + template + struct iterator_traits + { + typedef random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef ptrdiff_t difference_type; + typedef const _Tp* pointer; + typedef const _Tp& reference; + }; + + + + + + template + inline typename iterator_traits<_Iter>::iterator_category + __iterator_category(const _Iter&) + { return typename iterator_traits<_Iter>::iterator_category(); } + + + +} +# 68 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator_base_funcs.h" 1 3 +# 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 + +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + inline typename iterator_traits<_InputIterator>::difference_type + __distance(_InputIterator __first, _InputIterator __last, + input_iterator_tag) + { + + + + typename iterator_traits<_InputIterator>::difference_type __n = 0; + while (__first != __last) + { + ++__first; + ++__n; + } + return __n; + } + + template + inline typename iterator_traits<_RandomAccessIterator>::difference_type + __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, + random_access_iterator_tag) + { + + + + return __last - __first; + } +# 108 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 + template + inline typename iterator_traits<_InputIterator>::difference_type + distance(_InputIterator __first, _InputIterator __last) + { + + return std::__distance(__first, __last, + std::__iterator_category(__first)); + } + + template + inline void + __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) + { + + + while (__n--) + ++__i; + } + + template + inline void + __advance(_BidirectionalIterator& __i, _Distance __n, + bidirectional_iterator_tag) + { + + + + if (__n > 0) + while (__n--) + ++__i; + else + while (__n++) + --__i; + } + + template + inline void + __advance(_RandomAccessIterator& __i, _Distance __n, + random_access_iterator_tag) + { + + + + __i += __n; + } +# 166 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 + template + inline void + advance(_InputIterator& __i, _Distance __n) + { + + typename iterator_traits<_InputIterator>::difference_type __d = __n; + std::__advance(__i, __d, std::__iterator_category(__i)); + } +# 195 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 +} +# 69 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator.h" 1 3 +# 68 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { +# 94 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator.h" 3 + template + class reverse_iterator + : public iterator::iterator_category, + typename iterator_traits<_Iterator>::value_type, + typename iterator_traits<_Iterator>::difference_type, + typename iterator_traits<_Iterator>::pointer, + typename iterator_traits<_Iterator>::reference> + { + public: + _Iterator current; + + typedef iterator_traits<_Iterator> __traits_type; + + public: + typedef _Iterator iterator_type; + typedef typename __traits_type::difference_type difference_type; + typedef typename __traits_type::pointer pointer; + typedef typename __traits_type::reference reference; + + + + + + + + reverse_iterator() : current() { } + + + + + explicit + reverse_iterator(iterator_type __x) : current(__x) { } + + + + + reverse_iterator(const reverse_iterator& __x) + : current(__x.current) { } + + + + + + template + reverse_iterator(const reverse_iterator<_Iter>& __x) + : current(__x.base()) { } + + + + + iterator_type + base() const + { return current; } + + + + + + + reference + operator*() const + { + _Iterator __tmp = current; + return *--__tmp; + } + + + + + + + pointer + operator->() const + { return &(operator*()); } + + + + + + + reverse_iterator& + operator++() + { + --current; + return *this; + } + + + + + + + reverse_iterator + operator++(int) + { + reverse_iterator __tmp = *this; + --current; + return __tmp; + } + + + + + + + reverse_iterator& + operator--() + { + ++current; + return *this; + } + + + + + + + reverse_iterator + operator--(int) + { + reverse_iterator __tmp = *this; + ++current; + return __tmp; + } + + + + + + + reverse_iterator + operator+(difference_type __n) const + { return reverse_iterator(current - __n); } + + + + + + + reverse_iterator& + operator+=(difference_type __n) + { + current -= __n; + return *this; + } + + + + + + + reverse_iterator + operator-(difference_type __n) const + { return reverse_iterator(current + __n); } + + + + + + + reverse_iterator& + operator-=(difference_type __n) + { + current += __n; + return *this; + } + + + + + + + reference + operator[](difference_type __n) const + { return *(*this + __n); } + }; +# 281 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator.h" 3 + template + inline bool + operator==(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return __x.base() == __y.base(); } + + template + inline bool + operator<(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return __y.base() < __x.base(); } + + template + inline bool + operator!=(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return !(__x == __y); } + + template + inline bool + operator>(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return __y < __x; } + + template + inline bool + operator<=(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return !(__y < __x); } + + template + inline bool + operator>=(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return !(__x < __y); } + + template + inline typename reverse_iterator<_Iterator>::difference_type + operator-(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return __y.base() - __x.base(); } + + template + inline reverse_iterator<_Iterator> + operator+(typename reverse_iterator<_Iterator>::difference_type __n, + const reverse_iterator<_Iterator>& __x) + { return reverse_iterator<_Iterator>(__x.base() - __n); } + + + + template + inline bool + operator==(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __x.base() == __y.base(); } + + template + inline bool + operator<(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __y.base() < __x.base(); } + + template + inline bool + operator!=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return !(__x == __y); } + + template + inline bool + operator>(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __y < __x; } + + template + inline bool + operator<=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return !(__y < __x); } + + template + inline bool + operator>=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return !(__x < __y); } + + template + + + + + + + + inline typename reverse_iterator<_IteratorL>::difference_type + operator-(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + + { return __y.base() - __x.base(); } +# 393 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator.h" 3 + template + class back_insert_iterator + : public iterator + { + public: + _Container* container; + + public: + + typedef _Container container_type; + + + explicit + back_insert_iterator(_Container& __x) : container(&__x) { } +# 419 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator.h" 3 + back_insert_iterator& + operator=(typename _Container::const_reference __value) + { + container->push_back(__value); + return *this; + } +# 436 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator.h" 3 + back_insert_iterator& + operator*() + { return *this; } + + + back_insert_iterator& + operator++() + { return *this; } + + + back_insert_iterator + operator++(int) + { return *this; } + }; +# 462 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator.h" 3 + template + inline back_insert_iterator<_Container> + back_inserter(_Container& __x) + { return back_insert_iterator<_Container>(__x); } +# 477 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator.h" 3 + template + class front_insert_iterator + : public iterator + { + public: + _Container* container; + + public: + + typedef _Container container_type; + + + explicit front_insert_iterator(_Container& __x) : container(&__x) { } +# 502 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator.h" 3 + front_insert_iterator& + operator=(typename _Container::const_reference __value) + { + container->push_front(__value); + return *this; + } +# 519 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator.h" 3 + front_insert_iterator& + operator*() + { return *this; } + + + front_insert_iterator& + operator++() + { return *this; } + + + front_insert_iterator + operator++(int) + { return *this; } + }; +# 545 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator.h" 3 + template + inline front_insert_iterator<_Container> + front_inserter(_Container& __x) + { return front_insert_iterator<_Container>(__x); } +# 564 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator.h" 3 + template + class insert_iterator + : public iterator + { + public: + _Container* container; + typename _Container::iterator iter; + + public: + + typedef _Container container_type; + + + + + + insert_iterator(_Container& __x, typename _Container::iterator __i) + : container(&__x), iter(__i) {} +# 606 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator.h" 3 + insert_iterator& + operator=(typename _Container::const_reference __value) + { + iter = container->insert(iter, __value); + ++iter; + return *this; + } +# 625 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator.h" 3 + insert_iterator& + operator*() + { return *this; } + + + insert_iterator& + operator++() + { return *this; } + + + insert_iterator& + operator++(int) + { return *this; } + }; +# 651 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator.h" 3 + template + inline insert_iterator<_Container> + inserter(_Container& __x, _Iterator __i) + { + return insert_iterator<_Container>(__x, + typename _Container::iterator(__i)); + } + + + +} + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { +# 672 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator.h" 3 + using std::iterator_traits; + using std::iterator; + template + class __normal_iterator + { + public: + _Iterator _M_current; + + typedef iterator_traits<_Iterator> __traits_type; + + public: + typedef _Iterator iterator_type; + typedef typename __traits_type::iterator_category iterator_category; + typedef typename __traits_type::value_type value_type; + typedef typename __traits_type::difference_type difference_type; + typedef typename __traits_type::reference reference; + typedef typename __traits_type::pointer pointer; + + __normal_iterator() : _M_current(_Iterator()) { } + + explicit + __normal_iterator(const _Iterator& __i) : _M_current(__i) { } + + + template + __normal_iterator(const __normal_iterator<_Iter, + typename __enable_if< + (std::__are_same<_Iter, typename _Container::pointer>::__value), + _Container>::__type>& __i) + : _M_current(__i.base()) { } + + + reference + operator*() const + { return *_M_current; } + + pointer + operator->() const + { return _M_current; } + + __normal_iterator& + operator++() + { + ++_M_current; + return *this; + } + + __normal_iterator + operator++(int) + { return __normal_iterator(_M_current++); } + + + __normal_iterator& + operator--() + { + --_M_current; + return *this; + } + + __normal_iterator + operator--(int) + { return __normal_iterator(_M_current--); } + + + reference + operator[](const difference_type& __n) const + { return _M_current[__n]; } + + __normal_iterator& + operator+=(const difference_type& __n) + { _M_current += __n; return *this; } + + __normal_iterator + operator+(const difference_type& __n) const + { return __normal_iterator(_M_current + __n); } + + __normal_iterator& + operator-=(const difference_type& __n) + { _M_current -= __n; return *this; } + + __normal_iterator + operator-(const difference_type& __n) const + { return __normal_iterator(_M_current - __n); } + + const _Iterator& + base() const + { return _M_current; } + }; +# 770 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_iterator.h" 3 + template + inline bool + operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() == __rhs.base(); } + + template + inline bool + operator==(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() == __rhs.base(); } + + template + inline bool + operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() != __rhs.base(); } + + template + inline bool + operator!=(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() != __rhs.base(); } + + + template + inline bool + operator<(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() < __rhs.base(); } + + template + inline bool + operator<(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() < __rhs.base(); } + + template + inline bool + operator>(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() > __rhs.base(); } + + template + inline bool + operator>(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() > __rhs.base(); } + + template + inline bool + operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() <= __rhs.base(); } + + template + inline bool + operator<=(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() <= __rhs.base(); } + + template + inline bool + operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() >= __rhs.base(); } + + template + inline bool + operator>=(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() >= __rhs.base(); } + + + + + + template + + + + + + + + inline typename __normal_iterator<_IteratorL, _Container>::difference_type + operator-(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + + { return __lhs.base() - __rhs.base(); } + + template + inline typename __normal_iterator<_Iterator, _Container>::difference_type + operator-(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() - __rhs.base(); } + + template + inline __normal_iterator<_Iterator, _Container> + operator+(typename __normal_iterator<_Iterator, _Container>::difference_type + __n, const __normal_iterator<_Iterator, _Container>& __i) + { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } + +} +# 70 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 2 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/debug/debug.h" 1 3 +# 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/debug/debug.h" 3 +namespace std +{ + namespace __debug { } +} + + + + +namespace __gnu_debug +{ + using namespace std::__debug; +} +# 72 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 2 3 + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + + + template + struct __iter_swap + { + template + static void + iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) + { + typedef typename iterator_traits<_ForwardIterator1>::value_type + _ValueType1; + _ValueType1 __tmp = (*__a); + *__a = (*__b); + *__b = (__tmp); + } + }; + + template<> + struct __iter_swap + { + template + static void + iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) + { + swap(*__a, *__b); + } + }; +# 115 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 3 + template + inline void + iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) + { + typedef typename iterator_traits<_ForwardIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_ForwardIterator2>::value_type + _ValueType2; + + + + + + + + + + + + typedef typename iterator_traits<_ForwardIterator1>::reference + _ReferenceType1; + typedef typename iterator_traits<_ForwardIterator2>::reference + _ReferenceType2; + std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value + && __are_same<_ValueType1&, _ReferenceType1>::__value + && __are_same<_ValueType2&, _ReferenceType2>::__value>:: + iter_swap(__a, __b); + } +# 156 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 3 + template + _ForwardIterator2 + swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2) + { + + + + + + ; + + for (; __first1 != __last1; ++__first1, ++__first2) + std::iter_swap(__first1, __first2); + return __first2; + } +# 184 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 3 + template + inline const _Tp& + min(const _Tp& __a, const _Tp& __b) + { + + + + if (__b < __a) + return __b; + return __a; + } +# 207 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 3 + template + inline const _Tp& + max(const _Tp& __a, const _Tp& __b) + { + + + + if (__a < __b) + return __b; + return __a; + } +# 230 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 3 + template + inline const _Tp& + min(const _Tp& __a, const _Tp& __b, _Compare __comp) + { + + if (__comp(__b, __a)) + return __b; + return __a; + } +# 251 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 3 + template + inline const _Tp& + max(const _Tp& __a, const _Tp& __b, _Compare __comp) + { + + if (__comp(__a, __b)) + return __b; + return __a; + } + + + + + template + struct _Iter_base + { + typedef _Iterator iterator_type; + static iterator_type + _S_base(_Iterator __it) + { return __it; } + }; + + template + struct _Iter_base<_Iterator, true> + { + typedef typename _Iterator::iterator_type iterator_type; + static iterator_type + _S_base(_Iterator __it) + { return __it.base(); } + }; + + + + template + struct _Niter_base + : _Iter_base<_Iterator, __is_normal_iterator<_Iterator>::__value> + { }; + + template + inline typename _Niter_base<_Iterator>::iterator_type + __niter_base(_Iterator __it) + { return std::_Niter_base<_Iterator>::_S_base(__it); } + + + template + struct _Miter_base + : _Iter_base<_Iterator, __is_move_iterator<_Iterator>::__value> + { }; + + template + inline typename _Miter_base<_Iterator>::iterator_type + __miter_base(_Iterator __it) + { return std::_Miter_base<_Iterator>::_S_base(__it); } + + + + + + + + template + struct __copy_move + { + template + static _OI + __copy_m(_II __first, _II __last, _OI __result) + { + for (; __first != __last; ++__result, ++__first) + *__result = *__first; + return __result; + } + }; +# 339 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 3 + template<> + struct __copy_move + { + template + static _OI + __copy_m(_II __first, _II __last, _OI __result) + { + typedef typename iterator_traits<_II>::difference_type _Distance; + for(_Distance __n = __last - __first; __n > 0; --__n) + { + *__result = *__first; + ++__first; + ++__result; + } + return __result; + } + }; +# 377 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 3 + template + struct __copy_move<_IsMove, true, random_access_iterator_tag> + { + template + static _Tp* + __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result) + { + const ptrdiff_t _Num = __last - __first; + if (_Num) + __builtin_memmove(__result, __first, sizeof(_Tp) * _Num); + return __result + _Num; + } + }; + + template + inline _OI + __copy_move_a(_II __first, _II __last, _OI __result) + { + typedef typename iterator_traits<_II>::value_type _ValueTypeI; + typedef typename iterator_traits<_OI>::value_type _ValueTypeO; + typedef typename iterator_traits<_II>::iterator_category _Category; + const bool __simple = (__is_pod(_ValueTypeI) + && __is_pointer<_II>::__value + && __is_pointer<_OI>::__value + && __are_same<_ValueTypeI, _ValueTypeO>::__value); + + return std::__copy_move<_IsMove, __simple, + _Category>::__copy_m(__first, __last, __result); + } + + + + template + struct char_traits; + + template + class istreambuf_iterator; + + template + class ostreambuf_iterator; + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type + __copy_move_a2(_CharT*, _CharT*, + ostreambuf_iterator<_CharT, char_traits<_CharT> >); + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type + __copy_move_a2(const _CharT*, const _CharT*, + ostreambuf_iterator<_CharT, char_traits<_CharT> >); + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + _CharT*>::__type + __copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >, + istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*); + + template + inline _OI + __copy_move_a2(_II __first, _II __last, _OI __result) + { + return _OI(std::__copy_move_a<_IsMove>(std::__niter_base(__first), + std::__niter_base(__last), + std::__niter_base(__result))); + } +# 462 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 3 + template + inline _OI + copy(_II __first, _II __last, _OI __result) + { + + + + + ; + + return (std::__copy_move_a2<__is_move_iterator<_II>::__value> + (std::__miter_base(__first), std::__miter_base(__last), + __result)); + } +# 514 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 3 + template + struct __copy_move_backward + { + template + static _BI2 + __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) + { + while (__first != __last) + *--__result = *--__last; + return __result; + } + }; +# 542 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 3 + template<> + struct __copy_move_backward + { + template + static _BI2 + __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) + { + typename iterator_traits<_BI1>::difference_type __n; + for (__n = __last - __first; __n > 0; --__n) + *--__result = *--__last; + return __result; + } + }; +# 572 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 3 + template + struct __copy_move_backward<_IsMove, true, random_access_iterator_tag> + { + template + static _Tp* + __copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result) + { + const ptrdiff_t _Num = __last - __first; + if (_Num) + __builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num); + return __result - _Num; + } + }; + + template + inline _BI2 + __copy_move_backward_a(_BI1 __first, _BI1 __last, _BI2 __result) + { + typedef typename iterator_traits<_BI1>::value_type _ValueType1; + typedef typename iterator_traits<_BI2>::value_type _ValueType2; + typedef typename iterator_traits<_BI1>::iterator_category _Category; + const bool __simple = (__is_pod(_ValueType1) + && __is_pointer<_BI1>::__value + && __is_pointer<_BI2>::__value + && __are_same<_ValueType1, _ValueType2>::__value); + + return std::__copy_move_backward<_IsMove, __simple, + _Category>::__copy_move_b(__first, + __last, + __result); + } + + template + inline _BI2 + __copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result) + { + return _BI2(std::__copy_move_backward_a<_IsMove> + (std::__niter_base(__first), std::__niter_base(__last), + std::__niter_base(__result))); + } +# 631 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 3 + template + inline _BI2 + copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) + { + + + + + + + ; + + return (std::__copy_move_backward_a2<__is_move_iterator<_BI1>::__value> + (std::__miter_base(__first), std::__miter_base(__last), + __result)); + } +# 689 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 3 + template + inline typename + __gnu_cxx::__enable_if::__value, void>::__type + __fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __value) + { + for (; __first != __last; ++__first) + *__first = __value; + } + + template + inline typename + __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type + __fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __value) + { + const _Tp __tmp = __value; + for (; __first != __last; ++__first) + *__first = __tmp; + } + + + template + inline typename + __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type + __fill_a(_Tp* __first, _Tp* __last, const _Tp& __c) + { + const _Tp __tmp = __c; + __builtin_memset(__first, static_cast(__tmp), + __last - __first); + } +# 733 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 3 + template + inline void + fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) + { + + + + ; + + std::__fill_a(std::__niter_base(__first), std::__niter_base(__last), + __value); + } + + template + inline typename + __gnu_cxx::__enable_if::__value, _OutputIterator>::__type + __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) + { + for (; __n > 0; --__n, ++__first) + *__first = __value; + return __first; + } + + template + inline typename + __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type + __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) + { + const _Tp __tmp = __value; + for (; __n > 0; --__n, ++__first) + *__first = __tmp; + return __first; + } + + template + inline typename + __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, _Tp*>::__type + __fill_n_a(_Tp* __first, _Size __n, const _Tp& __c) + { + std::__fill_a(__first, __first + __n, __c); + return __first + __n; + } +# 791 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 3 + template + inline _OI + fill_n(_OI __first, _Size __n, const _Tp& __value) + { + + + + return _OI(std::__fill_n_a(std::__niter_base(__first), __n, __value)); + } + + template + struct __equal + { + template + static bool + equal(_II1 __first1, _II1 __last1, _II2 __first2) + { + for (; __first1 != __last1; ++__first1, ++__first2) + if (!(*__first1 == *__first2)) + return false; + return true; + } + }; + + template<> + struct __equal + { + template + static bool + equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2) + { + return !__builtin_memcmp(__first1, __first2, sizeof(_Tp) + * (__last1 - __first1)); + } + }; + + template + inline bool + __equal_aux(_II1 __first1, _II1 __last1, _II2 __first2) + { + typedef typename iterator_traits<_II1>::value_type _ValueType1; + typedef typename iterator_traits<_II2>::value_type _ValueType2; + const bool __simple = (__is_integer<_ValueType1>::__value + && __is_pointer<_II1>::__value + && __is_pointer<_II2>::__value + && __are_same<_ValueType1, _ValueType2>::__value); + + return std::__equal<__simple>::equal(__first1, __last1, __first2); + } + + + template + struct __lc_rai + { + template + static _II1 + __newlast1(_II1, _II1 __last1, _II2, _II2) + { return __last1; } + + template + static bool + __cnd2(_II __first, _II __last) + { return __first != __last; } + }; + + template<> + struct __lc_rai + { + template + static _RAI1 + __newlast1(_RAI1 __first1, _RAI1 __last1, + _RAI2 __first2, _RAI2 __last2) + { + const typename iterator_traits<_RAI1>::difference_type + __diff1 = __last1 - __first1; + const typename iterator_traits<_RAI2>::difference_type + __diff2 = __last2 - __first2; + return __diff2 < __diff1 ? __first1 + __diff2 : __last1; + } + + template + static bool + __cnd2(_RAI, _RAI) + { return true; } + }; + + template + struct __lexicographical_compare + { + template + static bool __lc(_II1, _II1, _II2, _II2); + }; + + template + template + bool + __lexicographical_compare<_BoolType>:: + __lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) + { + typedef typename iterator_traits<_II1>::iterator_category _Category1; + typedef typename iterator_traits<_II2>::iterator_category _Category2; + typedef std::__lc_rai<_Category1, _Category2> __rai_type; + + __last1 = __rai_type::__newlast1(__first1, __last1, + __first2, __last2); + for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); + ++__first1, ++__first2) + { + if (*__first1 < *__first2) + return true; + if (*__first2 < *__first1) + return false; + } + return __first1 == __last1 && __first2 != __last2; + } + + template<> + struct __lexicographical_compare + { + template + static bool + __lc(const _Tp* __first1, const _Tp* __last1, + const _Up* __first2, const _Up* __last2) + { + const size_t __len1 = __last1 - __first1; + const size_t __len2 = __last2 - __first2; + const int __result = __builtin_memcmp(__first1, __first2, + std::min(__len1, __len2)); + return __result != 0 ? __result < 0 : __len1 < __len2; + } + }; + + template + inline bool + __lexicographical_compare_aux(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2) + { + typedef typename iterator_traits<_II1>::value_type _ValueType1; + typedef typename iterator_traits<_II2>::value_type _ValueType2; + const bool __simple = + (__is_byte<_ValueType1>::__value && __is_byte<_ValueType2>::__value + && !__gnu_cxx::__numeric_traits<_ValueType1>::__is_signed + && !__gnu_cxx::__numeric_traits<_ValueType2>::__is_signed + && __is_pointer<_II1>::__value + && __is_pointer<_II2>::__value); + + return std::__lexicographical_compare<__simple>::__lc(__first1, __last1, + __first2, __last2); + } +# 952 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 3 + template + _ForwardIterator + lower_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + + + ; + + _DistanceType __len = std::distance(__first, __last); + _DistanceType __half; + _ForwardIterator __middle; + + while (__len > 0) + { + __half = __len >> 1; + __middle = __first; + std::advance(__middle, __half); + if (*__middle < __val) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else + __len = __half; + } + return __first; + } + + + + template + inline _Size + __lg(_Size __n) + { + _Size __k; + for (__k = 0; __n != 0; __n >>= 1) + ++__k; + return __k - 1; + } + + inline int + __lg(int __n) + { return sizeof(int) * 8 - 1 - __builtin_clz(__n); } + + inline long + __lg(long __n) + { return sizeof(long) * 8 - 1 - __builtin_clzl(__n); } + + inline long long + __lg(long long __n) + { return sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } + +} + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 1028 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 3 + template + inline bool + equal(_II1 __first1, _II1 __last1, _II2 __first2) + { + + + + + + + ; + + return std::__equal_aux(std::__niter_base(__first1), + std::__niter_base(__last1), + std::__niter_base(__first2)); + } +# 1060 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 3 + template + inline bool + equal(_IIter1 __first1, _IIter1 __last1, + _IIter2 __first2, _BinaryPredicate __binary_pred) + { + + + + ; + + for (; __first1 != __last1; ++__first1, ++__first2) + if (!bool(__binary_pred(*__first1, *__first2))) + return false; + return true; + } +# 1091 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 3 + template + inline bool + lexicographical_compare(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2) + { + + typedef typename iterator_traits<_II1>::value_type _ValueType1; + typedef typename iterator_traits<_II2>::value_type _ValueType2; + + + + + ; + ; + + return std::__lexicographical_compare_aux(std::__niter_base(__first1), + std::__niter_base(__last1), + std::__niter_base(__first2), + std::__niter_base(__last2)); + } +# 1125 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 3 + template + bool + lexicographical_compare(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2, _Compare __comp) + { + typedef typename iterator_traits<_II1>::iterator_category _Category1; + typedef typename iterator_traits<_II2>::iterator_category _Category2; + typedef std::__lc_rai<_Category1, _Category2> __rai_type; + + + + + ; + ; + + __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2); + for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); + ++__first1, ++__first2) + { + if (__comp(*__first1, *__first2)) + return true; + if (__comp(*__first2, *__first1)) + return false; + } + return __first1 == __last1 && __first2 != __last2; + } +# 1165 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 3 + template + pair<_InputIterator1, _InputIterator2> + mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2) + { + + + + + + + ; + + while (__first1 != __last1 && *__first1 == *__first2) + { + ++__first1; + ++__first2; + } + return pair<_InputIterator1, _InputIterator2>(__first1, __first2); + } +# 1202 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algobase.h" 3 + template + pair<_InputIterator1, _InputIterator2> + mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _BinaryPredicate __binary_pred) + { + + + + ; + + while (__first1 != __last1 && bool(__binary_pred(*__first1, *__first2))) + { + ++__first1; + ++__first2; + } + return pair<_InputIterator1, _InputIterator2>(__first1, __first2); + } + +} +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/char_traits.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/postypes.h" 1 3 +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/postypes.h" 3 + +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/postypes.h" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cwchar" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cwchar" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cwchar" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cwchar" 2 3 + + +# 1 "/usr/include/wchar.h" 1 3 4 +# 37 "/usr/include/wchar.h" 3 4 +# 1 "/usr/include/stdio.h" 1 3 4 +# 45 "/usr/include/stdio.h" 3 4 +struct _IO_FILE; + + + +typedef struct _IO_FILE FILE; + + + + + +# 65 "/usr/include/stdio.h" 3 4 +typedef struct _IO_FILE __FILE; +# 38 "/usr/include/wchar.h" 2 3 4 + + + + +# 1 "/usr/include/bits/wchar.h" 1 3 4 +# 43 "/usr/include/wchar.h" 2 3 4 +# 52 "/usr/include/wchar.h" 3 4 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 352 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 3 4 +typedef unsigned int wint_t; +# 53 "/usr/include/wchar.h" 2 3 4 +# 83 "/usr/include/wchar.h" 3 4 +typedef struct +{ + int __count; + union + { + + unsigned int __wch; + + + + char __wchb[4]; + } __value; +} __mbstate_t; +# 104 "/usr/include/wchar.h" 3 4 + + +typedef __mbstate_t mbstate_t; + + + +# 129 "/usr/include/wchar.h" 3 4 +extern "C" { + + + + +struct tm; + + + + + + + + + +extern wchar_t *wcscpy (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src) throw (); + +extern wchar_t *wcsncpy (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n) + throw (); + + +extern wchar_t *wcscat (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src) throw (); + +extern wchar_t *wcsncat (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n) + throw (); + + +extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2) + throw () __attribute__ ((__pure__)); + +extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) + throw () __attribute__ ((__pure__)); + + + + +extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) throw (); + + +extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2, + size_t __n) throw (); + + + + + +extern int wcscasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, + __locale_t __loc) throw (); + +extern int wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, + size_t __n, __locale_t __loc) throw (); + + + + + +extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) throw (); + + + +extern size_t wcsxfrm (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) throw (); + + + + + + + + +extern int wcscoll_l (__const wchar_t *__s1, __const wchar_t *__s2, + __locale_t __loc) throw (); + + + + +extern size_t wcsxfrm_l (wchar_t *__s1, __const wchar_t *__s2, + size_t __n, __locale_t __loc) throw (); + + +extern wchar_t *wcsdup (__const wchar_t *__s) throw () __attribute__ ((__malloc__)); + + + + + +extern "C++" wchar_t *wcschr (wchar_t *__wcs, wchar_t __wc) + throw () __asm ("wcschr") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc) + throw () __asm ("wcschr") __attribute__ ((__pure__)); + + + + + + +extern "C++" wchar_t *wcsrchr (wchar_t *__wcs, wchar_t __wc) + throw () __asm ("wcsrchr") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc) + throw () __asm ("wcsrchr") __attribute__ ((__pure__)); + + + + + + + + + +extern wchar_t *wcschrnul (__const wchar_t *__s, wchar_t __wc) + throw () __attribute__ ((__pure__)); + + + + + +extern size_t wcscspn (__const wchar_t *__wcs, __const wchar_t *__reject) + throw () __attribute__ ((__pure__)); + + +extern size_t wcsspn (__const wchar_t *__wcs, __const wchar_t *__accept) + throw () __attribute__ ((__pure__)); + + +extern "C++" wchar_t *wcspbrk (wchar_t *__wcs, __const wchar_t *__accept) + throw () __asm ("wcspbrk") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcspbrk (__const wchar_t *__wcs, + __const wchar_t *__accept) + throw () __asm ("wcspbrk") __attribute__ ((__pure__)); + + + + + + +extern "C++" wchar_t *wcsstr (wchar_t *__haystack, __const wchar_t *__needle) + throw () __asm ("wcsstr") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcsstr (__const wchar_t *__haystack, + __const wchar_t *__needle) + throw () __asm ("wcsstr") __attribute__ ((__pure__)); + + + + + + +extern wchar_t *wcstok (wchar_t *__restrict __s, + __const wchar_t *__restrict __delim, + wchar_t **__restrict __ptr) throw (); + + +extern size_t wcslen (__const wchar_t *__s) throw () __attribute__ ((__pure__)); + + + + + +extern "C++" wchar_t *wcswcs (wchar_t *__haystack, __const wchar_t *__needle) + throw () __asm ("wcswcs") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcswcs (__const wchar_t *__haystack, + __const wchar_t *__needle) + throw () __asm ("wcswcs") __attribute__ ((__pure__)); +# 303 "/usr/include/wchar.h" 3 4 +extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen) + throw () __attribute__ ((__pure__)); + + + + + + +extern "C++" wchar_t *wmemchr (wchar_t *__s, wchar_t __c, size_t __n) + throw () __asm ("wmemchr") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, + size_t __n) + throw () __asm ("wmemchr") __attribute__ ((__pure__)); + + + + + + +extern int wmemcmp (__const wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) + throw () __attribute__ ((__pure__)); + + +extern wchar_t *wmemcpy (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) throw (); + + + +extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n) + throw (); + + +extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw (); + + + + + +extern wchar_t *wmempcpy (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) + throw (); + + + + + + +extern wint_t btowc (int __c) throw (); + + + +extern int wctob (wint_t __c) throw (); + + + +extern int mbsinit (__const mbstate_t *__ps) throw () __attribute__ ((__pure__)); + + + +extern size_t mbrtowc (wchar_t *__restrict __pwc, + __const char *__restrict __s, size_t __n, + mbstate_t *__p) throw (); + + +extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, + mbstate_t *__restrict __ps) throw (); + + +extern size_t __mbrlen (__const char *__restrict __s, size_t __n, + mbstate_t *__restrict __ps) throw (); +extern size_t mbrlen (__const char *__restrict __s, size_t __n, + mbstate_t *__restrict __ps) throw (); + + + + + + + + +extern wint_t __btowc_alias (int __c) __asm ("btowc"); +extern __inline __attribute__ ((__gnu_inline__)) wint_t +btowc (int __c) throw () +{ return (__builtin_constant_p (__c) && __c >= '\0' && __c <= '\x7f' + ? (wint_t) __c : __btowc_alias (__c)); } + +extern int __wctob_alias (wint_t __c) __asm ("wctob"); +extern __inline __attribute__ ((__gnu_inline__)) int +wctob (wint_t __wc) throw () +{ return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f' + ? (int) __wc : __wctob_alias (__wc)); } + +extern __inline __attribute__ ((__gnu_inline__)) size_t +mbrlen (__const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw () + +{ return (__ps != __null + ? mbrtowc (__null, __s, __n, __ps) : __mbrlen (__s, __n, __null)); } + + + + + +extern size_t mbsrtowcs (wchar_t *__restrict __dst, + __const char **__restrict __src, size_t __len, + mbstate_t *__restrict __ps) throw (); + + + +extern size_t wcsrtombs (char *__restrict __dst, + __const wchar_t **__restrict __src, size_t __len, + mbstate_t *__restrict __ps) throw (); + + + + + + +extern size_t mbsnrtowcs (wchar_t *__restrict __dst, + __const char **__restrict __src, size_t __nmc, + size_t __len, mbstate_t *__restrict __ps) throw (); + + + +extern size_t wcsnrtombs (char *__restrict __dst, + __const wchar_t **__restrict __src, + size_t __nwc, size_t __len, + mbstate_t *__restrict __ps) throw (); + + + + + + +extern int wcwidth (wchar_t __c) throw (); + + + +extern int wcswidth (__const wchar_t *__s, size_t __n) throw (); + + + + + + +extern double wcstod (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) throw (); + + + + + +extern float wcstof (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) throw (); +extern long double wcstold (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) throw (); + + + + + + + +extern long int wcstol (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) throw (); + + + +extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + throw (); + + + + + + +__extension__ +extern long long int wcstoll (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + throw (); + + + +__extension__ +extern unsigned long long int wcstoull (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base) throw (); + + + + + + +__extension__ +extern long long int wcstoq (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + throw (); + + + +__extension__ +extern unsigned long long int wcstouq (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base) throw (); +# 528 "/usr/include/wchar.h" 3 4 +extern long int wcstol_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base, + __locale_t __loc) throw (); + +extern unsigned long int wcstoul_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, __locale_t __loc) throw (); + +__extension__ +extern long long int wcstoll_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, __locale_t __loc) throw (); + +__extension__ +extern unsigned long long int wcstoull_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, __locale_t __loc) + throw (); + +extern double wcstod_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, __locale_t __loc) + throw (); + +extern float wcstof_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, __locale_t __loc) + throw (); + +extern long double wcstold_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + __locale_t __loc) throw (); + + + + + + +extern wchar_t *wcpcpy (wchar_t *__dest, __const wchar_t *__src) throw (); + + + +extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n) + throw (); +# 578 "/usr/include/wchar.h" 3 4 +extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) throw (); + + + + + + +extern int fwide (__FILE *__fp, int __mode) throw (); + + + + + + +extern int fwprintf (__FILE *__restrict __stream, + __const wchar_t *__restrict __format, ...) + ; + + + + +extern int wprintf (__const wchar_t *__restrict __format, ...) + ; + +extern int swprintf (wchar_t *__restrict __s, size_t __n, + __const wchar_t *__restrict __format, ...) + throw () ; + + + + + +extern int vfwprintf (__FILE *__restrict __s, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; + + + + +extern int vwprintf (__const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; + + +extern int vswprintf (wchar_t *__restrict __s, size_t __n, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + throw () ; + + + + + + +extern int fwscanf (__FILE *__restrict __stream, + __const wchar_t *__restrict __format, ...) + ; + + + + +extern int wscanf (__const wchar_t *__restrict __format, ...) + ; + +extern int swscanf (__const wchar_t *__restrict __s, + __const wchar_t *__restrict __format, ...) + throw () ; +# 678 "/usr/include/wchar.h" 3 4 + + + + + + + + + +extern int vfwscanf (__FILE *__restrict __s, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; + + + + +extern int vwscanf (__const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; + +extern int vswscanf (__const wchar_t *__restrict __s, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + throw () ; +# 734 "/usr/include/wchar.h" 3 4 + + + + + + + + + +extern wint_t fgetwc (__FILE *__stream); +extern wint_t getwc (__FILE *__stream); + + + + + +extern wint_t getwchar (void); + + + + + + +extern wint_t fputwc (wchar_t __wc, __FILE *__stream); +extern wint_t putwc (wchar_t __wc, __FILE *__stream); + + + + + +extern wint_t putwchar (wchar_t __wc); + + + + + + + +extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n, + __FILE *__restrict __stream); + + + + + +extern int fputws (__const wchar_t *__restrict __ws, + __FILE *__restrict __stream); + + + + + + +extern wint_t ungetwc (wint_t __wc, __FILE *__stream); + +# 799 "/usr/include/wchar.h" 3 4 +extern wint_t getwc_unlocked (__FILE *__stream); +extern wint_t getwchar_unlocked (void); + + + + + + + +extern wint_t fgetwc_unlocked (__FILE *__stream); + + + + + + + +extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream); +# 825 "/usr/include/wchar.h" 3 4 +extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream); +extern wint_t putwchar_unlocked (wchar_t __wc); +# 835 "/usr/include/wchar.h" 3 4 +extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n, + __FILE *__restrict __stream); + + + + + + + +extern int fputws_unlocked (__const wchar_t *__restrict __ws, + __FILE *__restrict __stream); + + + + + + + +extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize, + __const wchar_t *__restrict __format, + __const struct tm *__restrict __tp) throw (); + + + + + + + +extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, + __const wchar_t *__restrict __format, + __const struct tm *__restrict __tp, + __locale_t __loc) throw (); +# 882 "/usr/include/wchar.h" 3 4 +# 1 "/usr/include/bits/wchar2.h" 1 3 4 +# 25 "/usr/include/bits/wchar2.h" 3 4 +extern wchar_t *__wmemcpy_chk (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n, + size_t __ns1) throw (); +extern wchar_t *__wmemcpy_alias (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () __asm__ ("" "wmemcpy") + + + ; +extern wchar_t *__wmemcpy_chk_warn (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmemcpy_chk") + + + + __attribute__((__warning__ ("wmemcpy called with length bigger than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wmemcpy (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () + +{ + if (__builtin_object_size (__s1, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wmemcpy_chk (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + + if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t)) + return __wmemcpy_chk_warn (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + } + return __wmemcpy_alias (__s1, __s2, __n); +} + + +extern wchar_t *__wmemmove_chk (wchar_t *__s1, __const wchar_t *__s2, + size_t __n, size_t __ns1) throw (); +extern wchar_t *__wmemmove_alias (wchar_t *__s1, __const wchar_t *__s2, size_t __n) throw () __asm__ ("" "wmemmove") + + ; +extern wchar_t *__wmemmove_chk_warn (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmemmove_chk") + + + + __attribute__((__warning__ ("wmemmove called with length bigger than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wmemmove (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () + +{ + if (__builtin_object_size (__s1, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wmemmove_chk (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + + if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t)) + return __wmemmove_chk_warn (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + } + return __wmemmove_alias (__s1, __s2, __n); +} + + + +extern wchar_t *__wmempcpy_chk (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n, + size_t __ns1) throw (); +extern wchar_t *__wmempcpy_alias (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () __asm__ ("" "wmempcpy") + + + ; +extern wchar_t *__wmempcpy_chk_warn (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmempcpy_chk") + + + + __attribute__((__warning__ ("wmempcpy called with length bigger than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wmempcpy (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () + +{ + if (__builtin_object_size (__s1, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wmempcpy_chk (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + + if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t)) + return __wmempcpy_chk_warn (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + } + return __wmempcpy_alias (__s1, __s2, __n); +} + + + +extern wchar_t *__wmemset_chk (wchar_t *__s, wchar_t __c, size_t __n, + size_t __ns) throw (); +extern wchar_t *__wmemset_alias (wchar_t *__s, wchar_t __c, size_t __n) throw () __asm__ ("" "wmemset") + ; +extern wchar_t *__wmemset_chk_warn (wchar_t *__s, wchar_t __c, size_t __n, size_t __ns) throw () __asm__ ("" "__wmemset_chk") + + + __attribute__((__warning__ ("wmemset called with length bigger than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wmemset (wchar_t *__restrict __s, wchar_t __c, size_t __n) throw () +{ + if (__builtin_object_size (__s, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wmemset_chk (__s, __c, __n, __builtin_object_size (__s, 0) / sizeof (wchar_t)); + + if (__n > __builtin_object_size (__s, 0) / sizeof (wchar_t)) + return __wmemset_chk_warn (__s, __c, __n, + __builtin_object_size (__s, 0) / sizeof (wchar_t)); + } + return __wmemset_alias (__s, __c, __n); +} + + +extern wchar_t *__wcscpy_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, + size_t __n) throw (); +extern wchar_t *__wcscpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () __asm__ ("" "wcscpy") + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wcscpy (wchar_t *__dest, __const wchar_t *__src) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + return __wcscpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + return __wcscpy_alias (__dest, __src); +} + + +extern wchar_t *__wcpcpy_chk (wchar_t *__dest, __const wchar_t *__src, + size_t __destlen) throw (); +extern wchar_t *__wcpcpy_alias (wchar_t *__dest, __const wchar_t *__src) throw () __asm__ ("" "wcpcpy") + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wcpcpy (wchar_t *__dest, __const wchar_t *__src) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + return __wcpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + return __wcpcpy_alias (__dest, __src); +} + + +extern wchar_t *__wcsncpy_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n, + size_t __destlen) throw (); +extern wchar_t *__wcsncpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcsncpy") + + + ; +extern wchar_t *__wcsncpy_chk_warn (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n, size_t __destlen) throw () __asm__ ("" "__wcsncpy_chk") + + + + __attribute__((__warning__ ("wcsncpy called with length bigger than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wcsncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wcsncpy_chk (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + if (__n > __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)) + return __wcsncpy_chk_warn (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + } + return __wcsncpy_alias (__dest, __src, __n); +} + + +extern wchar_t *__wcpncpy_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n, + size_t __destlen) throw (); +extern wchar_t *__wcpncpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcpncpy") + + + ; +extern wchar_t *__wcpncpy_chk_warn (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n, size_t __destlen) throw () __asm__ ("" "__wcpncpy_chk") + + + + __attribute__((__warning__ ("wcpncpy called with length bigger than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wcpncpy_chk (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + if (__n > __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)) + return __wcpncpy_chk_warn (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + } + return __wcpncpy_alias (__dest, __src, __n); +} + + +extern wchar_t *__wcscat_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, + size_t __destlen) throw (); +extern wchar_t *__wcscat_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () __asm__ ("" "wcscat") + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wcscat (wchar_t *__dest, __const wchar_t *__src) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + return __wcscat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + return __wcscat_alias (__dest, __src); +} + + +extern wchar_t *__wcsncat_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, + size_t __n, size_t __destlen) throw (); +extern wchar_t *__wcsncat_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcsncat") + + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wcsncat (wchar_t *__dest, __const wchar_t *__src, size_t __n) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + return __wcsncat_chk (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + return __wcsncat_alias (__dest, __src, __n); +} + + +extern int __swprintf_chk (wchar_t *__restrict __s, size_t __n, + int __flag, size_t __s_len, + __const wchar_t *__restrict __format, ...) + throw () ; + +extern int __swprintf_alias (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, ...) throw () __asm__ ("" "swprintf") + + + ; + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +swprintf (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, ...) throw () + +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 || 2 > 1) + return __swprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __fmt, __builtin_va_arg_pack ()); + return __swprintf_alias (__s, __n, __fmt, __builtin_va_arg_pack ()); +} +# 302 "/usr/include/bits/wchar2.h" 3 4 +extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n, + int __flag, size_t __s_len, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + throw () ; + +extern int __vswprintf_alias (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, __gnuc_va_list __ap) throw () __asm__ ("" "vswprintf") + + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vswprintf (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, __gnuc_va_list __ap) throw () + +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 || 2 > 1) + return __vswprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), __fmt, __ap); + return __vswprintf_alias (__s, __n, __fmt, __ap); +} + + + + +extern int __fwprintf_chk (__FILE *__restrict __stream, int __flag, + __const wchar_t *__restrict __format, ...); +extern int __wprintf_chk (int __flag, __const wchar_t *__restrict __format, + ...); +extern int __vfwprintf_chk (__FILE *__restrict __stream, int __flag, + __const wchar_t *__restrict __format, + __gnuc_va_list __ap); +extern int __vwprintf_chk (int __flag, __const wchar_t *__restrict __format, + __gnuc_va_list __ap); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +wprintf (__const wchar_t *__restrict __fmt, ...) +{ + return __wprintf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +fwprintf (__FILE *__restrict __stream, __const wchar_t *__restrict __fmt, ...) +{ + return __fwprintf_chk (__stream, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vwprintf (__const wchar_t *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vwprintf_chk (2 - 1, __fmt, __ap); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vfwprintf (__FILE *__restrict __stream, + __const wchar_t *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vfwprintf_chk (__stream, 2 - 1, __fmt, __ap); +} + + + +extern wchar_t *__fgetws_chk (wchar_t *__restrict __s, size_t __size, int __n, + __FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern wchar_t *__fgetws_alias (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) __asm__ ("" "fgetws") + + __attribute__ ((__warn_unused_result__)); +extern wchar_t *__fgetws_chk_warn (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __asm__ ("" "__fgetws_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgetws called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) wchar_t * +fgetws (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgetws_chk (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __n, __stream); + + if ((size_t) __n > __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t)) + return __fgetws_chk_warn (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __n, __stream); + } + return __fgetws_alias (__s, __n, __stream); +} + + +extern wchar_t *__fgetws_unlocked_chk (wchar_t *__restrict __s, size_t __size, + int __n, __FILE *__restrict __stream) + __attribute__ ((__warn_unused_result__)); +extern wchar_t *__fgetws_unlocked_alias (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) __asm__ ("" "fgetws_unlocked") + + + __attribute__ ((__warn_unused_result__)); +extern wchar_t *__fgetws_unlocked_chk_warn (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __asm__ ("" "__fgetws_unlocked_chk") + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgetws_unlocked called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) wchar_t * +fgetws_unlocked (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgetws_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __n, __stream); + + if ((size_t) __n > __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t)) + return __fgetws_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __n, __stream); + } + return __fgetws_unlocked_alias (__s, __n, __stream); +} + + + +extern size_t __wcrtomb_chk (char *__s, wchar_t __wchar, mbstate_t *__p, + size_t __buflen) throw () __attribute__ ((__warn_unused_result__)); +extern size_t __wcrtomb_alias (char *__restrict __s, wchar_t __wchar, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcrtomb") + + __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +wcrtomb (char *__s, wchar_t __wchar, mbstate_t *__ps) throw () +{ + + + + + + + + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) + return __wcrtomb_chk (__s, __wchar, __ps, __builtin_object_size (__s, 2 > 1)); + return __wcrtomb_alias (__s, __wchar, __ps); +} + + +extern size_t __mbsrtowcs_chk (wchar_t *__restrict __dst, + __const char **__restrict __src, + size_t __len, mbstate_t *__restrict __ps, + size_t __dstlen) throw (); +extern size_t __mbsrtowcs_alias (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "mbsrtowcs") + + + + ; +extern size_t __mbsrtowcs_chk_warn (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__mbsrtowcs_chk") + + + + + __attribute__((__warning__ ("mbsrtowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +mbsrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __mbsrtowcs_chk (__dst, __src, __len, __ps, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + + if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) + return __mbsrtowcs_chk_warn (__dst, __src, __len, __ps, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + } + return __mbsrtowcs_alias (__dst, __src, __len, __ps); +} + + +extern size_t __wcsrtombs_chk (char *__restrict __dst, + __const wchar_t **__restrict __src, + size_t __len, mbstate_t *__restrict __ps, + size_t __dstlen) throw (); +extern size_t __wcsrtombs_alias (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcsrtombs") + + + + ; +extern size_t __wcsrtombs_chk_warn (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__wcsrtombs_chk") + + + + + __attribute__((__warning__ ("wcsrtombs called with dst buffer smaller than len"))); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +wcsrtombs (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __wcsrtombs_chk (__dst, __src, __len, __ps, __builtin_object_size (__dst, 2 > 1)); + + if (__len > __builtin_object_size (__dst, 2 > 1)) + return __wcsrtombs_chk_warn (__dst, __src, __len, __ps, __builtin_object_size (__dst, 2 > 1)); + } + return __wcsrtombs_alias (__dst, __src, __len, __ps); +} + + + +extern size_t __mbsnrtowcs_chk (wchar_t *__restrict __dst, + __const char **__restrict __src, size_t __nmc, + size_t __len, mbstate_t *__restrict __ps, + size_t __dstlen) throw (); +extern size_t __mbsnrtowcs_alias (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "mbsnrtowcs") + + + + ; +extern size_t __mbsnrtowcs_chk_warn (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__mbsnrtowcs_chk") + + + + + __attribute__((__warning__ ("mbsnrtowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +mbsnrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) throw () + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __mbsnrtowcs_chk (__dst, __src, __nmc, __len, __ps, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + + if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) + return __mbsnrtowcs_chk_warn (__dst, __src, __nmc, __len, __ps, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + } + return __mbsnrtowcs_alias (__dst, __src, __nmc, __len, __ps); +} + + +extern size_t __wcsnrtombs_chk (char *__restrict __dst, + __const wchar_t **__restrict __src, + size_t __nwc, size_t __len, + mbstate_t *__restrict __ps, size_t __dstlen) + throw (); +extern size_t __wcsnrtombs_alias (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcsnrtombs") + + + + ; +extern size_t __wcsnrtombs_chk_warn (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__wcsnrtombs_chk") + + + + + + __attribute__((__warning__ ("wcsnrtombs called with dst buffer smaller than len"))); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +wcsnrtombs (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) throw () + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __wcsnrtombs_chk (__dst, __src, __nwc, __len, __ps, + __builtin_object_size (__dst, 2 > 1)); + + if (__len > __builtin_object_size (__dst, 2 > 1)) + return __wcsnrtombs_chk_warn (__dst, __src, __nwc, __len, __ps, + __builtin_object_size (__dst, 2 > 1)); + } + return __wcsnrtombs_alias (__dst, __src, __nwc, __len, __ps); +} +# 883 "/usr/include/wchar.h" 2 3 4 + + + + + + +} +# 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cwchar" 2 3 +# 65 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cwchar" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + using ::mbstate_t; + +} +# 139 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cwchar" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + using ::wint_t; + + using ::btowc; + using ::fgetwc; + using ::fgetws; + using ::fputwc; + using ::fputws; + using ::fwide; + using ::fwprintf; + using ::fwscanf; + using ::getwc; + using ::getwchar; + using ::mbrlen; + using ::mbrtowc; + using ::mbsinit; + using ::mbsrtowcs; + using ::putwc; + using ::putwchar; + + using ::swprintf; + + using ::swscanf; + using ::ungetwc; + using ::vfwprintf; + + using ::vfwscanf; + + + using ::vswprintf; + + + using ::vswscanf; + + using ::vwprintf; + + using ::vwscanf; + + using ::wcrtomb; + using ::wcscat; + using ::wcscmp; + using ::wcscoll; + using ::wcscpy; + using ::wcscspn; + using ::wcsftime; + using ::wcslen; + using ::wcsncat; + using ::wcsncmp; + using ::wcsncpy; + using ::wcsrtombs; + using ::wcsspn; + using ::wcstod; + + using ::wcstof; + + using ::wcstok; + using ::wcstol; + using ::wcstoul; + using ::wcsxfrm; + using ::wctob; + using ::wmemcmp; + using ::wmemcpy; + using ::wmemmove; + using ::wmemset; + using ::wprintf; + using ::wscanf; + using ::wcschr; + using ::wcspbrk; + using ::wcsrchr; + using ::wcsstr; + using ::wmemchr; +# 234 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cwchar" 3 +} + + + + + + + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + + + + + + + using ::wcstold; +# 258 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cwchar" 3 + using ::wcstoll; + using ::wcstoull; + + +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + + using ::__gnu_cxx::wcstold; + using ::__gnu_cxx::wcstoll; + using ::__gnu_cxx::wcstoull; + +} +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/postypes.h" 2 3 +# 70 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/postypes.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { +# 88 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/postypes.h" 3 + typedef long streamoff; +# 98 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/postypes.h" 3 + typedef ptrdiff_t streamsize; +# 111 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/postypes.h" 3 + template + class fpos + { + private: + streamoff _M_off; + _StateT _M_state; + + public: + + + + + fpos() + : _M_off(0), _M_state() { } +# 133 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/postypes.h" 3 + fpos(streamoff __off) + : _M_off(__off), _M_state() { } + + + operator streamoff() const { return _M_off; } + + + void + state(_StateT __st) + { _M_state = __st; } + + + _StateT + state() const + { return _M_state; } + + + + + + fpos& + operator+=(streamoff __off) + { + _M_off += __off; + return *this; + } + + + + + + fpos& + operator-=(streamoff __off) + { + _M_off -= __off; + return *this; + } + + + + + + + + fpos + operator+(streamoff __off) const + { + fpos __pos(*this); + __pos += __off; + return __pos; + } + + + + + + + + fpos + operator-(streamoff __off) const + { + fpos __pos(*this); + __pos -= __off; + return __pos; + } + + + + + + + streamoff + operator-(const fpos& __other) const + { return _M_off - __other._M_off; } + }; + + + + + + + template + inline bool + operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) + { return streamoff(__lhs) == streamoff(__rhs); } + + template + inline bool + operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) + { return streamoff(__lhs) != streamoff(__rhs); } + + + + + + typedef fpos streampos; + + typedef fpos wstreampos; +# 239 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/postypes.h" 3 +} +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/char_traits.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cwchar" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cwchar" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cwchar" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cwchar" 2 3 + + +# 1 "/usr/include/wchar.h" 1 3 4 +# 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cwchar" 2 3 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/char_traits.h" 2 3 +# 52 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/char_traits.h" 3 +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/char_traits.h" 3 + template + struct _Char_types + { + typedef unsigned long int_type; + typedef std::streampos pos_type; + typedef std::streamoff off_type; + typedef std::mbstate_t state_type; + }; +# 89 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/char_traits.h" 3 + template + struct char_traits + { + typedef _CharT char_type; + typedef typename _Char_types<_CharT>::int_type int_type; + typedef typename _Char_types<_CharT>::pos_type pos_type; + typedef typename _Char_types<_CharT>::off_type off_type; + typedef typename _Char_types<_CharT>::state_type state_type; + + static void + assign(char_type& __c1, const char_type& __c2) + { __c1 = __c2; } + + static bool + eq(const char_type& __c1, const char_type& __c2) + { return __c1 == __c2; } + + static bool + lt(const char_type& __c1, const char_type& __c2) + { return __c1 < __c2; } + + static int + compare(const char_type* __s1, const char_type* __s2, std::size_t __n); + + static std::size_t + length(const char_type* __s); + + static const char_type* + find(const char_type* __s, std::size_t __n, const char_type& __a); + + static char_type* + move(char_type* __s1, const char_type* __s2, std::size_t __n); + + static char_type* + copy(char_type* __s1, const char_type* __s2, std::size_t __n); + + static char_type* + assign(char_type* __s, std::size_t __n, char_type __a); + + static char_type + to_char_type(const int_type& __c) + { return static_cast(__c); } + + static int_type + to_int_type(const char_type& __c) + { return static_cast(__c); } + + static bool + eq_int_type(const int_type& __c1, const int_type& __c2) + { return __c1 == __c2; } + + static int_type + eof() + { return static_cast((-1)); } + + static int_type + not_eof(const int_type& __c) + { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); } + }; + + template + int + char_traits<_CharT>:: + compare(const char_type* __s1, const char_type* __s2, std::size_t __n) + { + for (std::size_t __i = 0; __i < __n; ++__i) + if (lt(__s1[__i], __s2[__i])) + return -1; + else if (lt(__s2[__i], __s1[__i])) + return 1; + return 0; + } + + template + std::size_t + char_traits<_CharT>:: + length(const char_type* __p) + { + std::size_t __i = 0; + while (!eq(__p[__i], char_type())) + ++__i; + return __i; + } + + template + const typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + find(const char_type* __s, std::size_t __n, const char_type& __a) + { + for (std::size_t __i = 0; __i < __n; ++__i) + if (eq(__s[__i], __a)) + return __s + __i; + return 0; + } + + template + typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + move(char_type* __s1, const char_type* __s2, std::size_t __n) + { + return static_cast<_CharT*>(__builtin_memmove(__s1, __s2, + __n * sizeof(char_type))); + } + + template + typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + copy(char_type* __s1, const char_type* __s2, std::size_t __n) + { + + std::copy(__s2, __s2 + __n, __s1); + return __s1; + } + + template + typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + assign(char_type* __s, std::size_t __n, char_type __a) + { + + std::fill_n(__s, __n, __a); + return __s; + } + +} + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 230 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/char_traits.h" 3 + template + struct char_traits : public __gnu_cxx::char_traits<_CharT> + { }; + + + + template<> + struct char_traits + { + typedef char char_type; + typedef int int_type; + typedef streampos pos_type; + typedef streamoff off_type; + typedef mbstate_t state_type; + + static void + assign(char_type& __c1, const char_type& __c2) + { __c1 = __c2; } + + static bool + eq(const char_type& __c1, const char_type& __c2) + { return __c1 == __c2; } + + static bool + lt(const char_type& __c1, const char_type& __c2) + { return __c1 < __c2; } + + static int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { return __builtin_memcmp(__s1, __s2, __n); } + + static size_t + length(const char_type* __s) + { return __builtin_strlen(__s); } + + static const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { return static_cast(__builtin_memchr(__s, __a, __n)); } + + static char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { return static_cast(__builtin_memmove(__s1, __s2, __n)); } + + static char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { return static_cast(__builtin_memcpy(__s1, __s2, __n)); } + + static char_type* + assign(char_type* __s, size_t __n, char_type __a) + { return static_cast(__builtin_memset(__s, __a, __n)); } + + static char_type + to_char_type(const int_type& __c) + { return static_cast(__c); } + + + + static int_type + to_int_type(const char_type& __c) + { return static_cast(static_cast(__c)); } + + static bool + eq_int_type(const int_type& __c1, const int_type& __c2) + { return __c1 == __c2; } + + static int_type + eof() + { return static_cast((-1)); } + + static int_type + not_eof(const int_type& __c) + { return (__c == eof()) ? 0 : __c; } + }; + + + + + template<> + struct char_traits + { + typedef wchar_t char_type; + typedef wint_t int_type; + typedef streamoff off_type; + typedef wstreampos pos_type; + typedef mbstate_t state_type; + + static void + assign(char_type& __c1, const char_type& __c2) + { __c1 = __c2; } + + static bool + eq(const char_type& __c1, const char_type& __c2) + { return __c1 == __c2; } + + static bool + lt(const char_type& __c1, const char_type& __c2) + { return __c1 < __c2; } + + static int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { return wmemcmp(__s1, __s2, __n); } + + static size_t + length(const char_type* __s) + { return wcslen(__s); } + + static const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { return wmemchr(__s, __a, __n); } + + static char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { return wmemmove(__s1, __s2, __n); } + + static char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { return wmemcpy(__s1, __s2, __n); } + + static char_type* + assign(char_type* __s, size_t __n, char_type __a) + { return wmemset(__s, __a, __n); } + + static char_type + to_char_type(const int_type& __c) + { return char_type(__c); } + + static int_type + to_int_type(const char_type& __c) + { return int_type(__c); } + + static bool + eq_int_type(const int_type& __c1, const int_type& __c2) + { return __c1 == __c2; } + + static int_type + eof() + { return static_cast((0xffffffffu)); } + + static int_type + not_eof(const int_type& __c) + { return eq_int_type(__c, eof()) ? 0 : __c; } + }; + + +} +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/string" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/allocator.h" 1 3 +# 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/allocator.h" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/c++allocator.h" 1 3 +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/c++allocator.h" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ext/new_allocator.h" 1 3 +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ext/new_allocator.h" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/new" 1 3 +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/new" 3 + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/new" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/new" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/exception" 1 3 +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/exception" 3 + +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/exception" 3 + +#pragma GCC visibility push(default) + + + +extern "C++" { + +namespace std +{ +# 61 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/exception" 3 + class exception + { + public: + exception() throw() { } + virtual ~exception() throw(); + + + + virtual const char* what() const throw(); + }; + + + + class bad_exception : public exception + { + public: + bad_exception() throw() { } + + + + virtual ~bad_exception() throw(); + + + virtual const char* what() const throw(); + }; + + + typedef void (*terminate_handler) (); + + + typedef void (*unexpected_handler) (); + + + terminate_handler set_terminate(terminate_handler) throw(); + + + + void terminate() throw() __attribute__ ((__noreturn__)); + + + unexpected_handler set_unexpected(unexpected_handler) throw(); + + + + void unexpected() __attribute__ ((__noreturn__)); +# 118 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/exception" 3 + bool uncaught_exception() throw() __attribute__ ((__pure__)); + + +} + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { +# 141 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/exception" 3 + void __verbose_terminate_handler(); + +} + +} + +#pragma GCC visibility pop +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/new" 2 3 + +#pragma GCC visibility push(default) + +extern "C++" { + +namespace std +{ + + + + + + + class bad_alloc : public exception + { + public: + bad_alloc() throw() { } + + + + virtual ~bad_alloc() throw(); + + + virtual const char* what() const throw(); + }; + + struct nothrow_t { }; + + extern const nothrow_t nothrow; + + + + typedef void (*new_handler)(); + + + + new_handler set_new_handler(new_handler) throw(); +} +# 93 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/new" 3 +void* operator new(std::size_t) throw (std::bad_alloc); +void* operator new[](std::size_t) throw (std::bad_alloc); +void operator delete(void*) throw(); +void operator delete[](void*) throw(); +void* operator new(std::size_t, const std::nothrow_t&) throw(); +void* operator new[](std::size_t, const std::nothrow_t&) throw(); +void operator delete(void*, const std::nothrow_t&) throw(); +void operator delete[](void*, const std::nothrow_t&) throw(); + + +inline void* operator new(std::size_t, void* __p) throw() { return __p; } +inline void* operator new[](std::size_t, void* __p) throw() { return __p; } + + +inline void operator delete (void*, void*) throw() { } +inline void operator delete[](void*, void*) throw() { } + +} + +#pragma GCC visibility pop +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ext/new_allocator.h" 2 3 + + + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + + using std::size_t; + using std::ptrdiff_t; +# 50 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ext/new_allocator.h" 3 + template + class new_allocator + { + public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef const _Tp* const_pointer; + typedef _Tp& reference; + typedef const _Tp& const_reference; + typedef _Tp value_type; + + template + struct rebind + { typedef new_allocator<_Tp1> other; }; + + new_allocator() throw() { } + + new_allocator(const new_allocator&) throw() { } + + template + new_allocator(const new_allocator<_Tp1>&) throw() { } + + ~new_allocator() throw() { } + + pointer + address(reference __x) const { return &__x; } + + const_pointer + address(const_reference __x) const { return &__x; } + + + + pointer + allocate(size_type __n, const void* = 0) + { + if (__n > this->max_size()) + std::__throw_bad_alloc(); + + return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); + } + + + void + deallocate(pointer __p, size_type) + { ::operator delete(__p); } + + size_type + max_size() const throw() + { return size_t(-1) / sizeof(_Tp); } + + + + void + construct(pointer __p, const _Tp& __val) + { ::new((void *)__p) _Tp(__val); } +# 114 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ext/new_allocator.h" 3 + void + destroy(pointer __p) { __p->~_Tp(); } + }; + + template + inline bool + operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&) + { return true; } + + template + inline bool + operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&) + { return false; } + +} +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/c++allocator.h" 2 3 +# 49 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/allocator.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 59 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/allocator.h" 3 + template + class allocator; + + + template<> + class allocator + { + public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef void* pointer; + typedef const void* const_pointer; + typedef void value_type; + + template + struct rebind + { typedef allocator<_Tp1> other; }; + }; +# 85 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/allocator.h" 3 + template + class allocator: public __gnu_cxx::new_allocator<_Tp> + { + public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef const _Tp* const_pointer; + typedef _Tp& reference; + typedef const _Tp& const_reference; + typedef _Tp value_type; + + template + struct rebind + { typedef allocator<_Tp1> other; }; + + allocator() throw() { } + + allocator(const allocator& __a) throw() + : __gnu_cxx::new_allocator<_Tp>(__a) { } + + template + allocator(const allocator<_Tp1>&) throw() { } + + ~allocator() throw() { } + + + }; + + template + inline bool + operator==(const allocator<_T1>&, const allocator<_T2>&) + { return true; } + + template + inline bool + operator==(const allocator<_Tp>&, const allocator<_Tp>&) + { return true; } + + template + inline bool + operator!=(const allocator<_T1>&, const allocator<_T2>&) + { return false; } + + template + inline bool + operator!=(const allocator<_Tp>&, const allocator<_Tp>&) + { return false; } + + + + + + extern template class allocator; + extern template class allocator; + + + + + + + template + struct __alloc_swap + { static void _S_do_it(_Alloc&, _Alloc&) { } }; + + template + struct __alloc_swap<_Alloc, false> + { + static void + _S_do_it(_Alloc& __one, _Alloc& __two) + { + + if (__one != __two) + swap(__one, __two); + } + }; + + + template + struct __alloc_neq + { + static bool + _S_do_it(const _Alloc&, const _Alloc&) + { return false; } + }; + + template + struct __alloc_neq<_Alloc, false> + { + static bool + _S_do_it(const _Alloc& __one, const _Alloc& __two) + { return __one != __two; } + }; +# 204 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/allocator.h" 3 +} +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/string" 2 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/localefwd.h" 1 3 +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/localefwd.h" 3 + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/localefwd.h" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 1 3 +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 3 + +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/clocale" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/clocale" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/clocale" 3 + + +# 1 "/usr/include/locale.h" 1 3 4 +# 29 "/usr/include/locale.h" 3 4 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 30 "/usr/include/locale.h" 2 3 4 +# 1 "/usr/include/bits/locale.h" 1 3 4 +# 27 "/usr/include/bits/locale.h" 3 4 +enum +{ + __LC_CTYPE = 0, + __LC_NUMERIC = 1, + __LC_TIME = 2, + __LC_COLLATE = 3, + __LC_MONETARY = 4, + __LC_MESSAGES = 5, + __LC_ALL = 6, + __LC_PAPER = 7, + __LC_NAME = 8, + __LC_ADDRESS = 9, + __LC_TELEPHONE = 10, + __LC_MEASUREMENT = 11, + __LC_IDENTIFICATION = 12 +}; +# 31 "/usr/include/locale.h" 2 3 4 + +extern "C" { +# 51 "/usr/include/locale.h" 3 4 + + + +struct lconv +{ + + + char *decimal_point; + char *thousands_sep; + + + + + + char *grouping; + + + + + + char *int_curr_symbol; + char *currency_symbol; + char *mon_decimal_point; + char *mon_thousands_sep; + char *mon_grouping; + char *positive_sign; + char *negative_sign; + char int_frac_digits; + char frac_digits; + + char p_cs_precedes; + + char p_sep_by_space; + + char n_cs_precedes; + + char n_sep_by_space; + + + + + + + char p_sign_posn; + char n_sign_posn; + + + char int_p_cs_precedes; + + char int_p_sep_by_space; + + char int_n_cs_precedes; + + char int_n_sep_by_space; + + + + + + + char int_p_sign_posn; + char int_n_sign_posn; +# 121 "/usr/include/locale.h" 3 4 +}; + + + +extern char *setlocale (int __category, __const char *__locale) throw (); + + +extern struct lconv *localeconv (void) throw (); + + +# 152 "/usr/include/locale.h" 3 4 +extern __locale_t newlocale (int __category_mask, __const char *__locale, + __locale_t __base) throw (); +# 187 "/usr/include/locale.h" 3 4 +extern __locale_t duplocale (__locale_t __dataset) throw (); + + + +extern void freelocale (__locale_t __dataset) throw (); + + + + + + +extern __locale_t uselocale (__locale_t __dataset) throw (); + + + + + + + +} +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/clocale" 2 3 +# 53 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/clocale" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + using ::lconv; + using ::setlocale; + using ::localeconv; + +} +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 2 3 + + + + + + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + + extern "C" __typeof(uselocale) __uselocale; + +} + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + typedef __locale_t __c_locale; + + + + + + inline int + __convert_from_v(const __c_locale& __cloc __attribute__ ((__unused__)), + char* __out, + const int __size __attribute__ ((__unused__)), + const char* __fmt, ...) + { + + __c_locale __old = __gnu_cxx::__uselocale(__cloc); +# 85 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 3 + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + + + const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); + + + + + __builtin_va_end(__args); + + + __gnu_cxx::__uselocale(__old); + + + + + + + + return __ret; + } + +} +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/localefwd.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/iosfwd" 1 3 +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/iosfwd" 3 + +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/iosfwd" 3 + + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 74 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/iosfwd" 3 + class ios_base; + + template > + class basic_ios; + + template > + class basic_streambuf; + + template > + class basic_istream; + + template > + class basic_ostream; + + template > + class basic_iostream; + + template, + typename _Alloc = allocator<_CharT> > + class basic_stringbuf; + + template, + typename _Alloc = allocator<_CharT> > + class basic_istringstream; + + template, + typename _Alloc = allocator<_CharT> > + class basic_ostringstream; + + template, + typename _Alloc = allocator<_CharT> > + class basic_stringstream; + + template > + class basic_filebuf; + + template > + class basic_ifstream; + + template > + class basic_ofstream; + + template > + class basic_fstream; + + template > + class istreambuf_iterator; + + template > + class ostreambuf_iterator; + + + + + typedef basic_ios ios; + typedef basic_streambuf streambuf; + typedef basic_istream istream; + typedef basic_ostream ostream; + typedef basic_iostream iostream; + typedef basic_stringbuf stringbuf; + typedef basic_istringstream istringstream; + typedef basic_ostringstream ostringstream; + typedef basic_stringstream stringstream; + typedef basic_filebuf filebuf; + typedef basic_ifstream ifstream; + typedef basic_ofstream ofstream; + typedef basic_fstream fstream; + + + typedef basic_ios wios; + typedef basic_streambuf wstreambuf; + typedef basic_istream wistream; + typedef basic_ostream wostream; + typedef basic_iostream wiostream; + typedef basic_stringbuf wstringbuf; + typedef basic_istringstream wistringstream; + typedef basic_ostringstream wostringstream; + typedef basic_stringstream wstringstream; + typedef basic_filebuf wfilebuf; + typedef basic_ifstream wifstream; + typedef basic_ofstream wofstream; + typedef basic_fstream wfstream; + + + +} +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/localefwd.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cctype" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cctype" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cctype" 3 + + +# 1 "/usr/include/ctype.h" 1 3 4 +# 28 "/usr/include/ctype.h" 3 4 +# 1 "/usr/include/bits/types.h" 1 3 4 +# 28 "/usr/include/bits/types.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 29 "/usr/include/bits/types.h" 2 3 4 + + +typedef unsigned char __u_char; +typedef unsigned short int __u_short; +typedef unsigned int __u_int; +typedef unsigned long int __u_long; + + +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; + +typedef signed long int __int64_t; +typedef unsigned long int __uint64_t; + + + + + + + +typedef long int __quad_t; +typedef unsigned long int __u_quad_t; +# 131 "/usr/include/bits/types.h" 3 4 +# 1 "/usr/include/bits/typesizes.h" 1 3 4 +# 132 "/usr/include/bits/types.h" 2 3 4 + + +typedef unsigned long int __dev_t; +typedef unsigned int __uid_t; +typedef unsigned int __gid_t; +typedef unsigned long int __ino_t; +typedef unsigned long int __ino64_t; +typedef unsigned int __mode_t; +typedef unsigned long int __nlink_t; +typedef long int __off_t; +typedef long int __off64_t; +typedef int __pid_t; +typedef struct { int __val[2]; } __fsid_t; +typedef long int __clock_t; +typedef unsigned long int __rlim_t; +typedef unsigned long int __rlim64_t; +typedef unsigned int __id_t; +typedef long int __time_t; +typedef unsigned int __useconds_t; +typedef long int __suseconds_t; + +typedef int __daddr_t; +typedef long int __swblk_t; +typedef int __key_t; + + +typedef int __clockid_t; + + +typedef void * __timer_t; + + +typedef long int __blksize_t; + + + + +typedef long int __blkcnt_t; +typedef long int __blkcnt64_t; + + +typedef unsigned long int __fsblkcnt_t; +typedef unsigned long int __fsblkcnt64_t; + + +typedef unsigned long int __fsfilcnt_t; +typedef unsigned long int __fsfilcnt64_t; + +typedef long int __ssize_t; + + + +typedef __off64_t __loff_t; +typedef __quad_t *__qaddr_t; +typedef char *__caddr_t; + + +typedef long int __intptr_t; + + +typedef unsigned int __socklen_t; +# 29 "/usr/include/ctype.h" 2 3 4 + +extern "C" { +# 41 "/usr/include/ctype.h" 3 4 +# 1 "/usr/include/endian.h" 1 3 4 +# 37 "/usr/include/endian.h" 3 4 +# 1 "/usr/include/bits/endian.h" 1 3 4 +# 38 "/usr/include/endian.h" 2 3 4 +# 61 "/usr/include/endian.h" 3 4 +# 1 "/usr/include/bits/byteswap.h" 1 3 4 +# 28 "/usr/include/bits/byteswap.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 29 "/usr/include/bits/byteswap.h" 2 3 4 +# 62 "/usr/include/endian.h" 2 3 4 +# 42 "/usr/include/ctype.h" 2 3 4 + + + + + + +enum +{ + _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), + _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), + _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), + _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), + _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), + _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), + _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), + _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), + _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), + _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), + _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), + _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) +}; +# 81 "/usr/include/ctype.h" 3 4 +extern __const unsigned short int **__ctype_b_loc (void) + throw () __attribute__ ((__const)); +extern __const __int32_t **__ctype_tolower_loc (void) + throw () __attribute__ ((__const)); +extern __const __int32_t **__ctype_toupper_loc (void) + throw () __attribute__ ((__const)); +# 96 "/usr/include/ctype.h" 3 4 + + + + + + +extern int isalnum (int) throw (); +extern int isalpha (int) throw (); +extern int iscntrl (int) throw (); +extern int isdigit (int) throw (); +extern int islower (int) throw (); +extern int isgraph (int) throw (); +extern int isprint (int) throw (); +extern int ispunct (int) throw (); +extern int isspace (int) throw (); +extern int isupper (int) throw (); +extern int isxdigit (int) throw (); + + + +extern int tolower (int __c) throw (); + + +extern int toupper (int __c) throw (); + + + + + + + + +extern int isblank (int) throw (); + + + + + + +extern int isctype (int __c, int __mask) throw (); + + + + + + +extern int isascii (int __c) throw (); + + + +extern int toascii (int __c) throw (); + + + +extern int _toupper (int) throw (); +extern int _tolower (int) throw (); +# 247 "/usr/include/ctype.h" 3 4 +extern int isalnum_l (int, __locale_t) throw (); +extern int isalpha_l (int, __locale_t) throw (); +extern int iscntrl_l (int, __locale_t) throw (); +extern int isdigit_l (int, __locale_t) throw (); +extern int islower_l (int, __locale_t) throw (); +extern int isgraph_l (int, __locale_t) throw (); +extern int isprint_l (int, __locale_t) throw (); +extern int ispunct_l (int, __locale_t) throw (); +extern int isspace_l (int, __locale_t) throw (); +extern int isupper_l (int, __locale_t) throw (); +extern int isxdigit_l (int, __locale_t) throw (); + +extern int isblank_l (int, __locale_t) throw (); + + + +extern int __tolower_l (int __c, __locale_t __l) throw (); +extern int tolower_l (int __c, __locale_t __l) throw (); + + +extern int __toupper_l (int __c, __locale_t __l) throw (); +extern int toupper_l (int __c, __locale_t __l) throw (); +# 323 "/usr/include/ctype.h" 3 4 +} +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cctype" 2 3 +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cctype" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + using ::isalnum; + using ::isalpha; + using ::iscntrl; + using ::isdigit; + using ::isgraph; + using ::islower; + using ::isprint; + using ::ispunct; + using ::isspace; + using ::isupper; + using ::isxdigit; + using ::tolower; + using ::toupper; + +} +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/localefwd.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 55 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/localefwd.h" 3 + class locale; + + template + bool + has_facet(const locale&) throw(); + + template + const _Facet& + use_facet(const locale&); + + + template + bool + isspace(_CharT, const locale&); + + template + bool + isprint(_CharT, const locale&); + + template + bool + iscntrl(_CharT, const locale&); + + template + bool + isupper(_CharT, const locale&); + + template + bool + islower(_CharT, const locale&); + + template + bool + isalpha(_CharT, const locale&); + + template + bool + isdigit(_CharT, const locale&); + + template + bool + ispunct(_CharT, const locale&); + + template + bool + isxdigit(_CharT, const locale&); + + template + bool + isalnum(_CharT, const locale&); + + template + bool + isgraph(_CharT, const locale&); + + template + _CharT + toupper(_CharT, const locale&); + + template + _CharT + tolower(_CharT, const locale&); + + + class ctype_base; + template + class ctype; + template<> class ctype; + + template<> class ctype; + + template + class ctype_byname; + + + class codecvt_base; + template + class codecvt; + template<> class codecvt; + + template<> class codecvt; + + template + class codecvt_byname; + + + + template > + class num_get; + template > + class num_put; + + template class numpunct; + template class numpunct_byname; + + + template + class collate; + template class + collate_byname; + + + class time_base; + template > + class time_get; + template > + class time_get_byname; + template > + class time_put; + template > + class time_put_byname; + + + class money_base; + + template > + class money_get; + template > + class money_put; + + template + class moneypunct; + template + class moneypunct_byname; + + + class messages_base; + template + class messages; + template + class messages_byname; + +} +# 46 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/string" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ostream_insert.h" 1 3 +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ostream_insert.h" 3 + +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ostream_insert.h" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cxxabi-forced.h" 1 3 +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cxxabi-forced.h" 3 + +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cxxabi-forced.h" 3 + +#pragma GCC visibility push(default) + + +namespace __cxxabiv1 +{ + + + + + + + + class __forced_unwind + { + virtual ~__forced_unwind() throw(); + + + virtual void __pure_dummy() = 0; + }; +} + + +#pragma GCC visibility pop +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ostream_insert.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + inline void + __ostream_write(basic_ostream<_CharT, _Traits>& __out, + const _CharT* __s, streamsize __n) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + + const streamsize __put = __out.rdbuf()->sputn(__s, __n); + if (__put != __n) + __out.setstate(__ios_base::badbit); + } + + template + inline void + __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + + const _CharT __c = __out.fill(); + for (; __n > 0; --__n) + { + const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c); + if (_Traits::eq_int_type(__put, _Traits::eof())) + { + __out.setstate(__ios_base::badbit); + break; + } + } + } + + template + basic_ostream<_CharT, _Traits>& + __ostream_insert(basic_ostream<_CharT, _Traits>& __out, + const _CharT* __s, streamsize __n) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + + typename __ostream_type::sentry __cerb(__out); + if (__cerb) + { + try + { + const streamsize __w = __out.width(); + if (__w > __n) + { + const bool __left = ((__out.flags() + & __ios_base::adjustfield) + == __ios_base::left); + if (!__left) + __ostream_fill(__out, __w - __n); + if (__out.good()) + __ostream_write(__out, __s, __n); + if (__left && __out.good()) + __ostream_fill(__out, __w - __n); + } + else + __ostream_write(__out, __s, __n); + __out.width(0); + } + catch(__cxxabiv1::__forced_unwind&) + { + __out._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { __out._M_setstate(__ios_base::badbit); } + } + return __out; + } + + + + + + extern template ostream& __ostream_insert(ostream&, const char*, streamsize); + + + extern template wostream& __ostream_insert(wostream&, const wchar_t*, + streamsize); + + + +} +# 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/string" 2 3 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_function.h" 1 3 +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_function.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { +# 99 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_function.h" 3 + template + struct unary_function + { + typedef _Arg argument_type; + + + typedef _Result result_type; + }; + + + + + template + struct binary_function + { + typedef _Arg1 first_argument_type; + + + typedef _Arg2 second_argument_type; + typedef _Result result_type; + }; +# 134 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_function.h" 3 + template + struct plus : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x + __y; } + }; + + + template + struct minus : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x - __y; } + }; + + + template + struct multiplies : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x * __y; } + }; + + + template + struct divides : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x / __y; } + }; + + + template + struct modulus : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x % __y; } + }; + + + template + struct negate : public unary_function<_Tp, _Tp> + { + _Tp + operator()(const _Tp& __x) const + { return -__x; } + }; +# 198 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_function.h" 3 + template + struct equal_to : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x == __y; } + }; + + + template + struct not_equal_to : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x != __y; } + }; + + + template + struct greater : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x > __y; } + }; + + + template + struct less : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x < __y; } + }; + + + template + struct greater_equal : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x >= __y; } + }; + + + template + struct less_equal : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x <= __y; } + }; +# 262 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_function.h" 3 + template + struct logical_and : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x && __y; } + }; + + + template + struct logical_or : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x || __y; } + }; + + + template + struct logical_not : public unary_function<_Tp, bool> + { + bool + operator()(const _Tp& __x) const + { return !__x; } + }; + + + + + template + struct bit_and : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x & __y; } + }; + + template + struct bit_or : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x | __y; } + }; + + template + struct bit_xor : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x ^ __y; } + }; +# 345 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_function.h" 3 + template + class unary_negate + : public unary_function + { + public: + _Predicate _M_pred; + + public: + explicit + unary_negate(const _Predicate& __x) : _M_pred(__x) { } + + bool + operator()(const typename _Predicate::argument_type& __x) const + { return !_M_pred(__x); } + }; + + + template + inline unary_negate<_Predicate> + not1(const _Predicate& __pred) + { return unary_negate<_Predicate>(__pred); } + + + template + class binary_negate + : public binary_function + { + public: + _Predicate _M_pred; + + public: + explicit + binary_negate(const _Predicate& __x) : _M_pred(__x) { } + + bool + operator()(const typename _Predicate::first_argument_type& __x, + const typename _Predicate::second_argument_type& __y) const + { return !_M_pred(__x, __y); } + }; + + + template + inline binary_negate<_Predicate> + not2(const _Predicate& __pred) + { return binary_negate<_Predicate>(__pred); } +# 416 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_function.h" 3 + template + class pointer_to_unary_function : public unary_function<_Arg, _Result> + { + public: + _Result (*_M_ptr)(_Arg); + + public: + pointer_to_unary_function() { } + + explicit + pointer_to_unary_function(_Result (*__x)(_Arg)) + : _M_ptr(__x) { } + + _Result + operator()(_Arg __x) const + { return _M_ptr(__x); } + }; + + + template + inline pointer_to_unary_function<_Arg, _Result> + ptr_fun(_Result (*__x)(_Arg)) + { return pointer_to_unary_function<_Arg, _Result>(__x); } + + + template + class pointer_to_binary_function + : public binary_function<_Arg1, _Arg2, _Result> + { + public: + _Result (*_M_ptr)(_Arg1, _Arg2); + + public: + pointer_to_binary_function() { } + + explicit + pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) + : _M_ptr(__x) { } + + _Result + operator()(_Arg1 __x, _Arg2 __y) const + { return _M_ptr(__x, __y); } + }; + + + template + inline pointer_to_binary_function<_Arg1, _Arg2, _Result> + ptr_fun(_Result (*__x)(_Arg1, _Arg2)) + { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); } + + + template + struct _Identity : public unary_function<_Tp,_Tp> + { + _Tp& + operator()(_Tp& __x) const + { return __x; } + + const _Tp& + operator()(const _Tp& __x) const + { return __x; } + }; + + template + struct _Select1st : public unary_function<_Pair, + typename _Pair::first_type> + { + typename _Pair::first_type& + operator()(_Pair& __x) const + { return __x.first; } + + const typename _Pair::first_type& + operator()(const _Pair& __x) const + { return __x.first; } + }; + + template + struct _Select2nd : public unary_function<_Pair, + typename _Pair::second_type> + { + typename _Pair::second_type& + operator()(_Pair& __x) const + { return __x.second; } + + const typename _Pair::second_type& + operator()(const _Pair& __x) const + { return __x.second; } + }; +# 523 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_function.h" 3 + template + class mem_fun_t : public unary_function<_Tp*, _Ret> + { + public: + explicit + mem_fun_t(_Ret (_Tp::*__pf)()) + : _M_f(__pf) { } + + _Ret + operator()(_Tp* __p) const + { return (__p->*_M_f)(); } + + private: + _Ret (_Tp::*_M_f)(); + }; + + + + template + class const_mem_fun_t : public unary_function + { + public: + explicit + const_mem_fun_t(_Ret (_Tp::*__pf)() const) + : _M_f(__pf) { } + + _Ret + operator()(const _Tp* __p) const + { return (__p->*_M_f)(); } + + private: + _Ret (_Tp::*_M_f)() const; + }; + + + + template + class mem_fun_ref_t : public unary_function<_Tp, _Ret> + { + public: + explicit + mem_fun_ref_t(_Ret (_Tp::*__pf)()) + : _M_f(__pf) { } + + _Ret + operator()(_Tp& __r) const + { return (__r.*_M_f)(); } + + private: + _Ret (_Tp::*_M_f)(); + }; + + + + template + class const_mem_fun_ref_t : public unary_function<_Tp, _Ret> + { + public: + explicit + const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) + : _M_f(__pf) { } + + _Ret + operator()(const _Tp& __r) const + { return (__r.*_M_f)(); } + + private: + _Ret (_Tp::*_M_f)() const; + }; + + + + template + class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret> + { + public: + explicit + mem_fun1_t(_Ret (_Tp::*__pf)(_Arg)) + : _M_f(__pf) { } + + _Ret + operator()(_Tp* __p, _Arg __x) const + { return (__p->*_M_f)(__x); } + + private: + _Ret (_Tp::*_M_f)(_Arg); + }; + + + + template + class const_mem_fun1_t : public binary_function + { + public: + explicit + const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const) + : _M_f(__pf) { } + + _Ret + operator()(const _Tp* __p, _Arg __x) const + { return (__p->*_M_f)(__x); } + + private: + _Ret (_Tp::*_M_f)(_Arg) const; + }; + + + + template + class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> + { + public: + explicit + mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg)) + : _M_f(__pf) { } + + _Ret + operator()(_Tp& __r, _Arg __x) const + { return (__r.*_M_f)(__x); } + + private: + _Ret (_Tp::*_M_f)(_Arg); + }; + + + + template + class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> + { + public: + explicit + const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const) + : _M_f(__pf) { } + + _Ret + operator()(const _Tp& __r, _Arg __x) const + { return (__r.*_M_f)(__x); } + + private: + _Ret (_Tp::*_M_f)(_Arg) const; + }; + + + + template + inline mem_fun_t<_Ret, _Tp> + mem_fun(_Ret (_Tp::*__f)()) + { return mem_fun_t<_Ret, _Tp>(__f); } + + template + inline const_mem_fun_t<_Ret, _Tp> + mem_fun(_Ret (_Tp::*__f)() const) + { return const_mem_fun_t<_Ret, _Tp>(__f); } + + template + inline mem_fun_ref_t<_Ret, _Tp> + mem_fun_ref(_Ret (_Tp::*__f)()) + { return mem_fun_ref_t<_Ret, _Tp>(__f); } + + template + inline const_mem_fun_ref_t<_Ret, _Tp> + mem_fun_ref(_Ret (_Tp::*__f)() const) + { return const_mem_fun_ref_t<_Ret, _Tp>(__f); } + + template + inline mem_fun1_t<_Ret, _Tp, _Arg> + mem_fun(_Ret (_Tp::*__f)(_Arg)) + { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); } + + template + inline const_mem_fun1_t<_Ret, _Tp, _Arg> + mem_fun(_Ret (_Tp::*__f)(_Arg) const) + { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); } + + template + inline mem_fun1_ref_t<_Ret, _Tp, _Arg> + mem_fun_ref(_Ret (_Tp::*__f)(_Arg)) + { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } + + template + inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg> + mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const) + { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } + + + +} + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/backward/binders.h" 1 3 +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/backward/binders.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { +# 97 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/backward/binders.h" 3 + template + class binder1st + : public unary_function + { + public: + _Operation op; + typename _Operation::first_argument_type value; + + public: + binder1st(const _Operation& __x, + const typename _Operation::first_argument_type& __y) + : op(__x), value(__y) { } + + typename _Operation::result_type + operator()(const typename _Operation::second_argument_type& __x) const + { return op(value, __x); } + + + + typename _Operation::result_type + operator()(typename _Operation::second_argument_type& __x) const + { return op(value, __x); } + } ; + + + template + inline binder1st<_Operation> + bind1st(const _Operation& __fn, const _Tp& __x) + { + typedef typename _Operation::first_argument_type _Arg1_type; + return binder1st<_Operation>(__fn, _Arg1_type(__x)); + } + + + template + class binder2nd + : public unary_function + { + public: + _Operation op; + typename _Operation::second_argument_type value; + + public: + binder2nd(const _Operation& __x, + const typename _Operation::second_argument_type& __y) + : op(__x), value(__y) { } + + typename _Operation::result_type + operator()(const typename _Operation::first_argument_type& __x) const + { return op(__x, value); } + + + + typename _Operation::result_type + operator()(typename _Operation::first_argument_type& __x) const + { return op(__x, value); } + } ; + + + template + inline binder2nd<_Operation> + bind2nd(const _Operation& __fn, const _Tp& __x) + { + typedef typename _Operation::second_argument_type _Arg2_type; + return binder2nd<_Operation>(__fn, _Arg2_type(__x)); + } + + +} +# 713 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_function.h" 2 3 +# 51 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/string" 2 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 1 3 +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ext/atomicity.h" 1 3 +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ext/atomicity.h" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr.h" 1 3 +# 30 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr.h" 3 +#pragma GCC visibility push(default) +# 162 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr.h" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 +# 1 "/usr/include/pthread.h" 1 3 4 +# 25 "/usr/include/pthread.h" 3 4 +# 1 "/usr/include/sched.h" 1 3 4 +# 29 "/usr/include/sched.h" 3 4 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 30 "/usr/include/sched.h" 2 3 4 + + +# 1 "/usr/include/time.h" 1 3 4 +# 120 "/usr/include/time.h" 3 4 +struct timespec + { + __time_t tv_sec; + long int tv_nsec; + }; +# 33 "/usr/include/sched.h" 2 3 4 + + +# 1 "/usr/include/bits/sched.h" 1 3 4 +# 71 "/usr/include/bits/sched.h" 3 4 +struct sched_param + { + int __sched_priority; + }; + +extern "C" { + + + +extern int clone (int (*__fn) (void *__arg), void *__child_stack, + int __flags, void *__arg, ...) throw (); + + +extern int unshare (int __flags) throw (); + + +extern int sched_getcpu (void) throw (); + + +} + + + + + + + +struct __sched_param + { + int __sched_priority; + }; +# 113 "/usr/include/bits/sched.h" 3 4 +typedef unsigned long int __cpu_mask; + + + + + + +typedef struct +{ + __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; +} cpu_set_t; +# 196 "/usr/include/bits/sched.h" 3 4 +extern "C" { + +extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) + throw (); +extern cpu_set_t *__sched_cpualloc (size_t __count) throw () __attribute__ ((__warn_unused_result__)); +extern void __sched_cpufree (cpu_set_t *__set) throw (); + +} +# 36 "/usr/include/sched.h" 2 3 4 + + + + +extern "C" { + + +extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param) + throw (); + + +extern int sched_getparam (__pid_t __pid, struct sched_param *__param) throw (); + + +extern int sched_setscheduler (__pid_t __pid, int __policy, + __const struct sched_param *__param) throw (); + + +extern int sched_getscheduler (__pid_t __pid) throw (); + + +extern int sched_yield (void) throw (); + + +extern int sched_get_priority_max (int __algorithm) throw (); + + +extern int sched_get_priority_min (int __algorithm) throw (); + + +extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) throw (); +# 110 "/usr/include/sched.h" 3 4 +extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, + __const cpu_set_t *__cpuset) throw (); + + +extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, + cpu_set_t *__cpuset) throw (); + + +} +# 26 "/usr/include/pthread.h" 2 3 4 +# 1 "/usr/include/time.h" 1 3 4 +# 30 "/usr/include/time.h" 3 4 +extern "C" { + + + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 39 "/usr/include/time.h" 2 3 4 + + + +# 1 "/usr/include/bits/time.h" 1 3 4 +# 43 "/usr/include/time.h" 2 3 4 +# 58 "/usr/include/time.h" 3 4 + + +typedef __clock_t clock_t; + + + +# 74 "/usr/include/time.h" 3 4 + + +typedef __time_t time_t; + + + +# 92 "/usr/include/time.h" 3 4 +typedef __clockid_t clockid_t; +# 104 "/usr/include/time.h" 3 4 +typedef __timer_t timer_t; +# 131 "/usr/include/time.h" 3 4 + + +struct tm +{ + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; + + + long int tm_gmtoff; + __const char *tm_zone; + + + + +}; + + + + + + + + +struct itimerspec + { + struct timespec it_interval; + struct timespec it_value; + }; + + +struct sigevent; + + + + + +typedef __pid_t pid_t; + + + + + + + + +extern clock_t clock (void) throw (); + + +extern time_t time (time_t *__timer) throw (); + + +extern double difftime (time_t __time1, time_t __time0) + throw () __attribute__ ((__const__)); + + +extern time_t mktime (struct tm *__tp) throw (); + + + + + +extern size_t strftime (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp) throw (); + + + + + +extern char *strptime (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp) + throw (); + + + + + + + +extern size_t strftime_l (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp, + __locale_t __loc) throw (); + + + +extern char *strptime_l (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp, + __locale_t __loc) throw (); + + + + + + +extern struct tm *gmtime (__const time_t *__timer) throw (); + + + +extern struct tm *localtime (__const time_t *__timer) throw (); + + + + + +extern struct tm *gmtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) throw (); + + + +extern struct tm *localtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) throw (); + + + + + +extern char *asctime (__const struct tm *__tp) throw (); + + +extern char *ctime (__const time_t *__timer) throw (); + + + + + + + +extern char *asctime_r (__const struct tm *__restrict __tp, + char *__restrict __buf) throw (); + + +extern char *ctime_r (__const time_t *__restrict __timer, + char *__restrict __buf) throw (); + + + + +extern char *__tzname[2]; +extern int __daylight; +extern long int __timezone; + + + + +extern char *tzname[2]; + + + +extern void tzset (void) throw (); + + + +extern int daylight; +extern long int timezone; + + + + + +extern int stime (__const time_t *__when) throw (); +# 313 "/usr/include/time.h" 3 4 +extern time_t timegm (struct tm *__tp) throw (); + + +extern time_t timelocal (struct tm *__tp) throw (); + + +extern int dysize (int __year) throw () __attribute__ ((__const__)); +# 328 "/usr/include/time.h" 3 4 +extern int nanosleep (__const struct timespec *__requested_time, + struct timespec *__remaining); + + + +extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw (); + + +extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw (); + + +extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) + throw (); + + + + + + +extern int clock_nanosleep (clockid_t __clock_id, int __flags, + __const struct timespec *__req, + struct timespec *__rem); + + +extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw (); + + + + +extern int timer_create (clockid_t __clock_id, + struct sigevent *__restrict __evp, + timer_t *__restrict __timerid) throw (); + + +extern int timer_delete (timer_t __timerid) throw (); + + +extern int timer_settime (timer_t __timerid, int __flags, + __const struct itimerspec *__restrict __value, + struct itimerspec *__restrict __ovalue) throw (); + + +extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) + throw (); + + +extern int timer_getoverrun (timer_t __timerid) throw (); +# 390 "/usr/include/time.h" 3 4 +extern int getdate_err; +# 399 "/usr/include/time.h" 3 4 +extern struct tm *getdate (__const char *__string); +# 413 "/usr/include/time.h" 3 4 +extern int getdate_r (__const char *__restrict __string, + struct tm *__restrict __resbufp); + + +} +# 27 "/usr/include/pthread.h" 2 3 4 + + +# 1 "/usr/include/signal.h" 1 3 4 +# 31 "/usr/include/signal.h" 3 4 +extern "C" { + +# 1 "/usr/include/bits/sigset.h" 1 3 4 +# 24 "/usr/include/bits/sigset.h" 3 4 +typedef int __sig_atomic_t; + + + + +typedef struct + { + unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; + } __sigset_t; +# 34 "/usr/include/signal.h" 2 3 4 +# 50 "/usr/include/signal.h" 3 4 +typedef __sigset_t sigset_t; +# 408 "/usr/include/signal.h" 3 4 +} +# 30 "/usr/include/pthread.h" 2 3 4 +# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 +# 23 "/usr/include/bits/pthreadtypes.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 24 "/usr/include/bits/pthreadtypes.h" 2 3 4 +# 50 "/usr/include/bits/pthreadtypes.h" 3 4 +typedef unsigned long int pthread_t; + + +typedef union +{ + char __size[56]; + long int __align; +} pthread_attr_t; + + + +typedef struct __pthread_internal_list +{ + struct __pthread_internal_list *__prev; + struct __pthread_internal_list *__next; +} __pthread_list_t; +# 76 "/usr/include/bits/pthreadtypes.h" 3 4 +typedef union +{ + struct __pthread_mutex_s + { + int __lock; + unsigned int __count; + int __owner; + + unsigned int __nusers; + + + + int __kind; + + int __spins; + __pthread_list_t __list; +# 101 "/usr/include/bits/pthreadtypes.h" 3 4 + } __data; + char __size[40]; + long int __align; +} pthread_mutex_t; + +typedef union +{ + char __size[4]; + int __align; +} pthread_mutexattr_t; + + + + +typedef union +{ + struct + { + int __lock; + unsigned int __futex; + __extension__ unsigned long long int __total_seq; + __extension__ unsigned long long int __wakeup_seq; + __extension__ unsigned long long int __woken_seq; + void *__mutex; + unsigned int __nwaiters; + unsigned int __broadcast_seq; + } __data; + char __size[48]; + __extension__ long long int __align; +} pthread_cond_t; + +typedef union +{ + char __size[4]; + int __align; +} pthread_condattr_t; + + + +typedef unsigned int pthread_key_t; + + + +typedef int pthread_once_t; + + + + + +typedef union +{ + + struct + { + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + int __writer; + int __shared; + unsigned long int __pad1; + unsigned long int __pad2; + + + unsigned int __flags; + } __data; +# 187 "/usr/include/bits/pthreadtypes.h" 3 4 + char __size[56]; + long int __align; +} pthread_rwlock_t; + +typedef union +{ + char __size[8]; + long int __align; +} pthread_rwlockattr_t; + + + + + +typedef volatile int pthread_spinlock_t; + + + + +typedef union +{ + char __size[32]; + long int __align; +} pthread_barrier_t; + +typedef union +{ + char __size[4]; + int __align; +} pthread_barrierattr_t; +# 31 "/usr/include/pthread.h" 2 3 4 +# 1 "/usr/include/bits/setjmp.h" 1 3 4 +# 27 "/usr/include/bits/setjmp.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 28 "/usr/include/bits/setjmp.h" 2 3 4 + + + + +typedef long int __jmp_buf[8]; +# 32 "/usr/include/pthread.h" 2 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 33 "/usr/include/pthread.h" 2 3 4 + + + +enum +{ + PTHREAD_CREATE_JOINABLE, + + PTHREAD_CREATE_DETACHED + +}; + + + +enum +{ + PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_ADAPTIVE_NP + + , + PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL + + + + , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP + +}; + + + + +enum +{ + PTHREAD_MUTEX_STALLED, + PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, + PTHREAD_MUTEX_ROBUST, + PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST +}; + + + + + +enum +{ + PTHREAD_PRIO_NONE, + PTHREAD_PRIO_INHERIT, + PTHREAD_PRIO_PROTECT +}; +# 117 "/usr/include/pthread.h" 3 4 +enum +{ + PTHREAD_RWLOCK_PREFER_READER_NP, + PTHREAD_RWLOCK_PREFER_WRITER_NP, + PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, + PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP +}; +# 149 "/usr/include/pthread.h" 3 4 +enum +{ + PTHREAD_INHERIT_SCHED, + + PTHREAD_EXPLICIT_SCHED + +}; + + + +enum +{ + PTHREAD_SCOPE_SYSTEM, + + PTHREAD_SCOPE_PROCESS + +}; + + + +enum +{ + PTHREAD_PROCESS_PRIVATE, + + PTHREAD_PROCESS_SHARED + +}; +# 184 "/usr/include/pthread.h" 3 4 +struct _pthread_cleanup_buffer +{ + void (*__routine) (void *); + void *__arg; + int __canceltype; + struct _pthread_cleanup_buffer *__prev; +}; + + +enum +{ + PTHREAD_CANCEL_ENABLE, + + PTHREAD_CANCEL_DISABLE + +}; +enum +{ + PTHREAD_CANCEL_DEFERRED, + + PTHREAD_CANCEL_ASYNCHRONOUS + +}; +# 222 "/usr/include/pthread.h" 3 4 +extern "C" { + + + + +extern int pthread_create (pthread_t *__restrict __newthread, + __const pthread_attr_t *__restrict __attr, + void *(*__start_routine) (void *), + void *__restrict __arg) throw () __attribute__ ((__nonnull__ (1, 3))); + + + + + +extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); + + + + + + + +extern int pthread_join (pthread_t __th, void **__thread_return); + + + + +extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) throw (); + + + + + + + +extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, + __const struct timespec *__abstime); + + + + + + +extern int pthread_detach (pthread_t __th) throw (); + + + +extern pthread_t pthread_self (void) throw () __attribute__ ((__const__)); + + +extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) throw (); + + + + + + + +extern int pthread_attr_init (pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_destroy (pthread_attr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, + int *__detachstate) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, + int __detachstate) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, + size_t *__guardsize) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setguardsize (pthread_attr_t *__attr, + size_t __guardsize) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict + __attr, + struct sched_param *__restrict __param) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, + __const struct sched_param *__restrict + __param) throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict + __attr, int *__restrict __policy) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict + __attr, int *__restrict __inherit) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, + int __inherit) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, + int *__restrict __scope) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict + __attr, void **__restrict __stackaddr) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); + + + + + +extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, + void *__stackaddr) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); + + +extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict + __attr, size_t *__restrict __stacksize) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int pthread_attr_setstacksize (pthread_attr_t *__attr, + size_t __stacksize) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, + void **__restrict __stackaddr, + size_t *__restrict __stacksize) + throw () __attribute__ ((__nonnull__ (1, 2, 3))); + + + + +extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, + size_t __stacksize) throw () __attribute__ ((__nonnull__ (1))); + + + + + +extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, + size_t __cpusetsize, + __const cpu_set_t *__cpuset) + throw () __attribute__ ((__nonnull__ (1, 3))); + + + +extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr, + size_t __cpusetsize, + cpu_set_t *__cpuset) + throw () __attribute__ ((__nonnull__ (1, 3))); + + + + + +extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) + throw () __attribute__ ((__nonnull__ (2))); + + + + + + + +extern int pthread_setschedparam (pthread_t __target_thread, int __policy, + __const struct sched_param *__param) + throw () __attribute__ ((__nonnull__ (3))); + + +extern int pthread_getschedparam (pthread_t __target_thread, + int *__restrict __policy, + struct sched_param *__restrict __param) + throw () __attribute__ ((__nonnull__ (2, 3))); + + +extern int pthread_setschedprio (pthread_t __target_thread, int __prio) + throw (); + + + + +extern int pthread_getconcurrency (void) throw (); + + +extern int pthread_setconcurrency (int __level) throw (); + + + + + + + +extern int pthread_yield (void) throw (); + + + + +extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, + __const cpu_set_t *__cpuset) + throw () __attribute__ ((__nonnull__ (3))); + + +extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, + cpu_set_t *__cpuset) + throw () __attribute__ ((__nonnull__ (3))); +# 468 "/usr/include/pthread.h" 3 4 +extern int pthread_once (pthread_once_t *__once_control, + void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); +# 480 "/usr/include/pthread.h" 3 4 +extern int pthread_setcancelstate (int __state, int *__oldstate); + + + +extern int pthread_setcanceltype (int __type, int *__oldtype); + + +extern int pthread_cancel (pthread_t __th); + + + + +extern void pthread_testcancel (void); + + + + +typedef struct +{ + struct + { + __jmp_buf __cancel_jmp_buf; + int __mask_was_saved; + } __cancel_jmp_buf[1]; + void *__pad[4]; +} __pthread_unwind_buf_t __attribute__ ((__aligned__)); +# 514 "/usr/include/pthread.h" 3 4 +struct __pthread_cleanup_frame +{ + void (*__cancel_routine) (void *); + void *__cancel_arg; + int __do_it; + int __cancel_type; +}; + + + + +class __pthread_cleanup_class +{ + void (*__cancel_routine) (void *); + void *__cancel_arg; + int __do_it; + int __cancel_type; + + public: + __pthread_cleanup_class (void (*__fct) (void *), void *__arg) + : __cancel_routine (__fct), __cancel_arg (__arg), __do_it (1) { } + ~__pthread_cleanup_class () { if (__do_it) __cancel_routine (__cancel_arg); } + void __setdoit (int __newval) { __do_it = __newval; } + void __defer () { pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, + &__cancel_type); } + void __restore () const { pthread_setcanceltype (__cancel_type, 0); } +}; +# 716 "/usr/include/pthread.h" 3 4 +struct __jmp_buf_tag; +extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) throw (); + + + + + +extern int pthread_mutex_init (pthread_mutex_t *__mutex, + __const pthread_mutexattr_t *__mutexattr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutex_lock (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, + __const struct timespec *__restrict + __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); + + + + +extern int pthread_mutex_getprioceiling (__const pthread_mutex_t * + __restrict __mutex, + int *__restrict __prioceiling) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, + int __prioceiling, + int *__restrict __old_ceiling) + throw () __attribute__ ((__nonnull__ (1, 3))); + + + + + +extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); + +extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); +# 782 "/usr/include/pthread.h" 3 4 +extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __pshared) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, + int __pshared) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict + __attr, int *__restrict __kind) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __protocol) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, + int __protocol) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __prioceiling) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, + int __prioceiling) + throw () __attribute__ ((__nonnull__ (1))); + + + + +extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr, + int *__robustness) + throw () __attribute__ ((__nonnull__ (1, 2))); + +extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr, + int *__robustness) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, + int __robustness) + throw () __attribute__ ((__nonnull__ (1))); + +extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, + int __robustness) + throw () __attribute__ ((__nonnull__ (1))); +# 864 "/usr/include/pthread.h" 3 4 +extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, + __const pthread_rwlockattr_t *__restrict + __attr) throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, + __const struct timespec *__restrict + __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, + __const struct timespec *__restrict + __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); + + + + + +extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * + __restrict __attr, + int *__restrict __pshared) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, + int __pshared) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t * + __restrict __attr, + int *__restrict __pref) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, + int __pref) throw () __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int pthread_cond_init (pthread_cond_t *__restrict __cond, + __const pthread_condattr_t *__restrict + __cond_attr) throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_cond_destroy (pthread_cond_t *__cond) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_cond_signal (pthread_cond_t *__cond) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_cond_broadcast (pthread_cond_t *__cond) + throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex) + __attribute__ ((__nonnull__ (1, 2))); +# 976 "/usr/include/pthread.h" 3 4 +extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex, + __const struct timespec *__restrict + __abstime) __attribute__ ((__nonnull__ (1, 2, 3))); + + + + +extern int pthread_condattr_init (pthread_condattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_condattr_destroy (pthread_condattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_condattr_getpshared (__const pthread_condattr_t * + __restrict __attr, + int *__restrict __pshared) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, + int __pshared) throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_condattr_getclock (__const pthread_condattr_t * + __restrict __attr, + __clockid_t *__restrict __clock_id) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_condattr_setclock (pthread_condattr_t *__attr, + __clockid_t __clock_id) + throw () __attribute__ ((__nonnull__ (1))); +# 1020 "/usr/include/pthread.h" 3 4 +extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_destroy (pthread_spinlock_t *__lock) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_lock (pthread_spinlock_t *__lock) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_trylock (pthread_spinlock_t *__lock) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_unlock (pthread_spinlock_t *__lock) + throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, + __const pthread_barrierattr_t *__restrict + __attr, unsigned int __count) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrier_wait (pthread_barrier_t *__barrier) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * + __restrict __attr, + int *__restrict __pshared) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, + int __pshared) + throw () __attribute__ ((__nonnull__ (1))); +# 1087 "/usr/include/pthread.h" 3 4 +extern int pthread_key_create (pthread_key_t *__key, + void (*__destr_function) (void *)) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_key_delete (pthread_key_t __key) throw (); + + +extern void *pthread_getspecific (pthread_key_t __key) throw (); + + +extern int pthread_setspecific (pthread_key_t __key, + __const void *__pointer) throw () ; + + + + +extern int pthread_getcpuclockid (pthread_t __thread_id, + __clockid_t *__clock_id) + throw () __attribute__ ((__nonnull__ (2))); +# 1121 "/usr/include/pthread.h" 3 4 +extern int pthread_atfork (void (*__prepare) (void), + void (*__parent) (void), + void (*__child) (void)) throw (); + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +pthread_equal (pthread_t __thread1, pthread_t __thread2) throw () +{ + return __thread1 == __thread2; +} + + +} +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 2 3 +# 1 "/usr/include/unistd.h" 1 3 4 +# 28 "/usr/include/unistd.h" 3 4 +extern "C" { +# 203 "/usr/include/unistd.h" 3 4 +# 1 "/usr/include/bits/posix_opt.h" 1 3 4 +# 204 "/usr/include/unistd.h" 2 3 4 + + + +# 1 "/usr/include/bits/environments.h" 1 3 4 +# 23 "/usr/include/bits/environments.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 24 "/usr/include/bits/environments.h" 2 3 4 +# 208 "/usr/include/unistd.h" 2 3 4 +# 221 "/usr/include/unistd.h" 3 4 +typedef __ssize_t ssize_t; + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 228 "/usr/include/unistd.h" 2 3 4 + + + + + +typedef __gid_t gid_t; + + + + +typedef __uid_t uid_t; + + + + + +typedef __off_t off_t; + + + + + + +typedef __off64_t off64_t; + + + + +typedef __useconds_t useconds_t; +# 268 "/usr/include/unistd.h" 3 4 +typedef __intptr_t intptr_t; + + + + + + +typedef __socklen_t socklen_t; +# 288 "/usr/include/unistd.h" 3 4 +extern int access (__const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); + + + + +extern int euidaccess (__const char *__name, int __type) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int eaccess (__const char *__name, int __type) + throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern int faccessat (int __fd, __const char *__file, int __type, int __flag) + throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); +# 331 "/usr/include/unistd.h" 3 4 +extern __off_t lseek (int __fd, __off_t __offset, int __whence) throw (); +# 342 "/usr/include/unistd.h" 3 4 +extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) + throw (); + + + + + + +extern int close (int __fd); + + + + + + +extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__)); + + + + + +extern ssize_t write (int __fd, __const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__)); +# 373 "/usr/include/unistd.h" 3 4 +extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, + __off_t __offset) __attribute__ ((__warn_unused_result__)); + + + + + + +extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n, + __off_t __offset) __attribute__ ((__warn_unused_result__)); +# 401 "/usr/include/unistd.h" 3 4 +extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset) __attribute__ ((__warn_unused_result__)); + + +extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n, + __off64_t __offset) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern int pipe (int __pipedes[2]) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern int pipe2 (int __pipedes[2], int __flags) throw () __attribute__ ((__warn_unused_result__)); +# 429 "/usr/include/unistd.h" 3 4 +extern unsigned int alarm (unsigned int __seconds) throw (); +# 441 "/usr/include/unistd.h" 3 4 +extern unsigned int sleep (unsigned int __seconds); + + + + + + +extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) + throw (); + + + + + + +extern int usleep (__useconds_t __useconds); +# 465 "/usr/include/unistd.h" 3 4 +extern int pause (void); + + + +extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + +extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + + +extern int fchownat (int __fd, __const char *__file, __uid_t __owner, + __gid_t __group, int __flag) + throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); + + + +extern int chdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + +extern int fchdir (int __fd) throw () __attribute__ ((__warn_unused_result__)); +# 507 "/usr/include/unistd.h" 3 4 +extern char *getcwd (char *__buf, size_t __size) throw () __attribute__ ((__warn_unused_result__)); + + + + + +extern char *get_current_dir_name (void) throw (); + + + + + + +extern char *getwd (char *__buf) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)); + + + + +extern int dup (int __fd) throw () __attribute__ ((__warn_unused_result__)); + + +extern int dup2 (int __fd, int __fd2) throw (); + + + + +extern int dup3 (int __fd, int __fd2, int __flags) throw (); + + + +extern char **__environ; + +extern char **environ; + + + + + +extern int execve (__const char *__path, char *__const __argv[], + char *__const __envp[]) throw () __attribute__ ((__nonnull__ (1))); + + + + +extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[]) + throw (); + + + + +extern int execv (__const char *__path, char *__const __argv[]) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int execle (__const char *__path, __const char *__arg, ...) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int execl (__const char *__path, __const char *__arg, ...) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int execvp (__const char *__file, char *__const __argv[]) + throw () __attribute__ ((__nonnull__ (1))); + + + + +extern int execlp (__const char *__file, __const char *__arg, ...) + throw () __attribute__ ((__nonnull__ (1))); + + + + +extern int execvpe (__const char *__file, char *__const __argv[], + char *__const __envp[]) + throw () __attribute__ ((__nonnull__ (1))); + + + + + +extern int nice (int __inc) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern void _exit (int __status) __attribute__ ((__noreturn__)); + + + + + +# 1 "/usr/include/bits/confname.h" 1 3 4 +# 26 "/usr/include/bits/confname.h" 3 4 +enum + { + _PC_LINK_MAX, + + _PC_MAX_CANON, + + _PC_MAX_INPUT, + + _PC_NAME_MAX, + + _PC_PATH_MAX, + + _PC_PIPE_BUF, + + _PC_CHOWN_RESTRICTED, + + _PC_NO_TRUNC, + + _PC_VDISABLE, + + _PC_SYNC_IO, + + _PC_ASYNC_IO, + + _PC_PRIO_IO, + + _PC_SOCK_MAXBUF, + + _PC_FILESIZEBITS, + + _PC_REC_INCR_XFER_SIZE, + + _PC_REC_MAX_XFER_SIZE, + + _PC_REC_MIN_XFER_SIZE, + + _PC_REC_XFER_ALIGN, + + _PC_ALLOC_SIZE_MIN, + + _PC_SYMLINK_MAX, + + _PC_2_SYMLINKS + + }; + + +enum + { + _SC_ARG_MAX, + + _SC_CHILD_MAX, + + _SC_CLK_TCK, + + _SC_NGROUPS_MAX, + + _SC_OPEN_MAX, + + _SC_STREAM_MAX, + + _SC_TZNAME_MAX, + + _SC_JOB_CONTROL, + + _SC_SAVED_IDS, + + _SC_REALTIME_SIGNALS, + + _SC_PRIORITY_SCHEDULING, + + _SC_TIMERS, + + _SC_ASYNCHRONOUS_IO, + + _SC_PRIORITIZED_IO, + + _SC_SYNCHRONIZED_IO, + + _SC_FSYNC, + + _SC_MAPPED_FILES, + + _SC_MEMLOCK, + + _SC_MEMLOCK_RANGE, + + _SC_MEMORY_PROTECTION, + + _SC_MESSAGE_PASSING, + + _SC_SEMAPHORES, + + _SC_SHARED_MEMORY_OBJECTS, + + _SC_AIO_LISTIO_MAX, + + _SC_AIO_MAX, + + _SC_AIO_PRIO_DELTA_MAX, + + _SC_DELAYTIMER_MAX, + + _SC_MQ_OPEN_MAX, + + _SC_MQ_PRIO_MAX, + + _SC_VERSION, + + _SC_PAGESIZE, + + + _SC_RTSIG_MAX, + + _SC_SEM_NSEMS_MAX, + + _SC_SEM_VALUE_MAX, + + _SC_SIGQUEUE_MAX, + + _SC_TIMER_MAX, + + + + + _SC_BC_BASE_MAX, + + _SC_BC_DIM_MAX, + + _SC_BC_SCALE_MAX, + + _SC_BC_STRING_MAX, + + _SC_COLL_WEIGHTS_MAX, + + _SC_EQUIV_CLASS_MAX, + + _SC_EXPR_NEST_MAX, + + _SC_LINE_MAX, + + _SC_RE_DUP_MAX, + + _SC_CHARCLASS_NAME_MAX, + + + _SC_2_VERSION, + + _SC_2_C_BIND, + + _SC_2_C_DEV, + + _SC_2_FORT_DEV, + + _SC_2_FORT_RUN, + + _SC_2_SW_DEV, + + _SC_2_LOCALEDEF, + + + _SC_PII, + + _SC_PII_XTI, + + _SC_PII_SOCKET, + + _SC_PII_INTERNET, + + _SC_PII_OSI, + + _SC_POLL, + + _SC_SELECT, + + _SC_UIO_MAXIOV, + + _SC_IOV_MAX = _SC_UIO_MAXIOV, + + _SC_PII_INTERNET_STREAM, + + _SC_PII_INTERNET_DGRAM, + + _SC_PII_OSI_COTS, + + _SC_PII_OSI_CLTS, + + _SC_PII_OSI_M, + + _SC_T_IOV_MAX, + + + + _SC_THREADS, + + _SC_THREAD_SAFE_FUNCTIONS, + + _SC_GETGR_R_SIZE_MAX, + + _SC_GETPW_R_SIZE_MAX, + + _SC_LOGIN_NAME_MAX, + + _SC_TTY_NAME_MAX, + + _SC_THREAD_DESTRUCTOR_ITERATIONS, + + _SC_THREAD_KEYS_MAX, + + _SC_THREAD_STACK_MIN, + + _SC_THREAD_THREADS_MAX, + + _SC_THREAD_ATTR_STACKADDR, + + _SC_THREAD_ATTR_STACKSIZE, + + _SC_THREAD_PRIORITY_SCHEDULING, + + _SC_THREAD_PRIO_INHERIT, + + _SC_THREAD_PRIO_PROTECT, + + _SC_THREAD_PROCESS_SHARED, + + + _SC_NPROCESSORS_CONF, + + _SC_NPROCESSORS_ONLN, + + _SC_PHYS_PAGES, + + _SC_AVPHYS_PAGES, + + _SC_ATEXIT_MAX, + + _SC_PASS_MAX, + + + _SC_XOPEN_VERSION, + + _SC_XOPEN_XCU_VERSION, + + _SC_XOPEN_UNIX, + + _SC_XOPEN_CRYPT, + + _SC_XOPEN_ENH_I18N, + + _SC_XOPEN_SHM, + + + _SC_2_CHAR_TERM, + + _SC_2_C_VERSION, + + _SC_2_UPE, + + + _SC_XOPEN_XPG2, + + _SC_XOPEN_XPG3, + + _SC_XOPEN_XPG4, + + + _SC_CHAR_BIT, + + _SC_CHAR_MAX, + + _SC_CHAR_MIN, + + _SC_INT_MAX, + + _SC_INT_MIN, + + _SC_LONG_BIT, + + _SC_WORD_BIT, + + _SC_MB_LEN_MAX, + + _SC_NZERO, + + _SC_SSIZE_MAX, + + _SC_SCHAR_MAX, + + _SC_SCHAR_MIN, + + _SC_SHRT_MAX, + + _SC_SHRT_MIN, + + _SC_UCHAR_MAX, + + _SC_UINT_MAX, + + _SC_ULONG_MAX, + + _SC_USHRT_MAX, + + + _SC_NL_ARGMAX, + + _SC_NL_LANGMAX, + + _SC_NL_MSGMAX, + + _SC_NL_NMAX, + + _SC_NL_SETMAX, + + _SC_NL_TEXTMAX, + + + _SC_XBS5_ILP32_OFF32, + + _SC_XBS5_ILP32_OFFBIG, + + _SC_XBS5_LP64_OFF64, + + _SC_XBS5_LPBIG_OFFBIG, + + + _SC_XOPEN_LEGACY, + + _SC_XOPEN_REALTIME, + + _SC_XOPEN_REALTIME_THREADS, + + + _SC_ADVISORY_INFO, + + _SC_BARRIERS, + + _SC_BASE, + + _SC_C_LANG_SUPPORT, + + _SC_C_LANG_SUPPORT_R, + + _SC_CLOCK_SELECTION, + + _SC_CPUTIME, + + _SC_THREAD_CPUTIME, + + _SC_DEVICE_IO, + + _SC_DEVICE_SPECIFIC, + + _SC_DEVICE_SPECIFIC_R, + + _SC_FD_MGMT, + + _SC_FIFO, + + _SC_PIPE, + + _SC_FILE_ATTRIBUTES, + + _SC_FILE_LOCKING, + + _SC_FILE_SYSTEM, + + _SC_MONOTONIC_CLOCK, + + _SC_MULTI_PROCESS, + + _SC_SINGLE_PROCESS, + + _SC_NETWORKING, + + _SC_READER_WRITER_LOCKS, + + _SC_SPIN_LOCKS, + + _SC_REGEXP, + + _SC_REGEX_VERSION, + + _SC_SHELL, + + _SC_SIGNALS, + + _SC_SPAWN, + + _SC_SPORADIC_SERVER, + + _SC_THREAD_SPORADIC_SERVER, + + _SC_SYSTEM_DATABASE, + + _SC_SYSTEM_DATABASE_R, + + _SC_TIMEOUTS, + + _SC_TYPED_MEMORY_OBJECTS, + + _SC_USER_GROUPS, + + _SC_USER_GROUPS_R, + + _SC_2_PBS, + + _SC_2_PBS_ACCOUNTING, + + _SC_2_PBS_LOCATE, + + _SC_2_PBS_MESSAGE, + + _SC_2_PBS_TRACK, + + _SC_SYMLOOP_MAX, + + _SC_STREAMS, + + _SC_2_PBS_CHECKPOINT, + + + _SC_V6_ILP32_OFF32, + + _SC_V6_ILP32_OFFBIG, + + _SC_V6_LP64_OFF64, + + _SC_V6_LPBIG_OFFBIG, + + + _SC_HOST_NAME_MAX, + + _SC_TRACE, + + _SC_TRACE_EVENT_FILTER, + + _SC_TRACE_INHERIT, + + _SC_TRACE_LOG, + + + _SC_LEVEL1_ICACHE_SIZE, + + _SC_LEVEL1_ICACHE_ASSOC, + + _SC_LEVEL1_ICACHE_LINESIZE, + + _SC_LEVEL1_DCACHE_SIZE, + + _SC_LEVEL1_DCACHE_ASSOC, + + _SC_LEVEL1_DCACHE_LINESIZE, + + _SC_LEVEL2_CACHE_SIZE, + + _SC_LEVEL2_CACHE_ASSOC, + + _SC_LEVEL2_CACHE_LINESIZE, + + _SC_LEVEL3_CACHE_SIZE, + + _SC_LEVEL3_CACHE_ASSOC, + + _SC_LEVEL3_CACHE_LINESIZE, + + _SC_LEVEL4_CACHE_SIZE, + + _SC_LEVEL4_CACHE_ASSOC, + + _SC_LEVEL4_CACHE_LINESIZE, + + + + _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, + + _SC_RAW_SOCKETS, + + + _SC_V7_ILP32_OFF32, + + _SC_V7_ILP32_OFFBIG, + + _SC_V7_LP64_OFF64, + + _SC_V7_LPBIG_OFFBIG, + + + _SC_SS_REPL_MAX, + + + _SC_TRACE_EVENT_NAME_MAX, + + _SC_TRACE_NAME_MAX, + + _SC_TRACE_SYS_MAX, + + _SC_TRACE_USER_EVENT_MAX, + + + _SC_XOPEN_STREAMS, + + + _SC_THREAD_ROBUST_PRIO_INHERIT, + + _SC_THREAD_ROBUST_PRIO_PROTECT, + + }; + + +enum + { + _CS_PATH, + + + _CS_V6_WIDTH_RESTRICTED_ENVS, + + + + _CS_GNU_LIBC_VERSION, + + _CS_GNU_LIBPTHREAD_VERSION, + + + _CS_V5_WIDTH_RESTRICTED_ENVS, + + + + _CS_V7_WIDTH_RESTRICTED_ENVS, + + + + _CS_LFS_CFLAGS = 1000, + + _CS_LFS_LDFLAGS, + + _CS_LFS_LIBS, + + _CS_LFS_LINTFLAGS, + + _CS_LFS64_CFLAGS, + + _CS_LFS64_LDFLAGS, + + _CS_LFS64_LIBS, + + _CS_LFS64_LINTFLAGS, + + + _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, + + _CS_XBS5_ILP32_OFF32_LDFLAGS, + + _CS_XBS5_ILP32_OFF32_LIBS, + + _CS_XBS5_ILP32_OFF32_LINTFLAGS, + + _CS_XBS5_ILP32_OFFBIG_CFLAGS, + + _CS_XBS5_ILP32_OFFBIG_LDFLAGS, + + _CS_XBS5_ILP32_OFFBIG_LIBS, + + _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, + + _CS_XBS5_LP64_OFF64_CFLAGS, + + _CS_XBS5_LP64_OFF64_LDFLAGS, + + _CS_XBS5_LP64_OFF64_LIBS, + + _CS_XBS5_LP64_OFF64_LINTFLAGS, + + _CS_XBS5_LPBIG_OFFBIG_CFLAGS, + + _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, + + _CS_XBS5_LPBIG_OFFBIG_LIBS, + + _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, + + + _CS_POSIX_V6_ILP32_OFF32_CFLAGS, + + _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, + + _CS_POSIX_V6_ILP32_OFF32_LIBS, + + _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, + + _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, + + _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, + + _CS_POSIX_V6_ILP32_OFFBIG_LIBS, + + _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, + + _CS_POSIX_V6_LP64_OFF64_CFLAGS, + + _CS_POSIX_V6_LP64_OFF64_LDFLAGS, + + _CS_POSIX_V6_LP64_OFF64_LIBS, + + _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, + + _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, + + _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, + + _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, + + _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, + + + _CS_POSIX_V7_ILP32_OFF32_CFLAGS, + + _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, + + _CS_POSIX_V7_ILP32_OFF32_LIBS, + + _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, + + _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, + + _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, + + _CS_POSIX_V7_ILP32_OFFBIG_LIBS, + + _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, + + _CS_POSIX_V7_LP64_OFF64_CFLAGS, + + _CS_POSIX_V7_LP64_OFF64_LDFLAGS, + + _CS_POSIX_V7_LP64_OFF64_LIBS, + + _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, + + _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, + + _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, + + _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, + + _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS + + }; +# 605 "/usr/include/unistd.h" 2 3 4 + + +extern long int pathconf (__const char *__path, int __name) + throw () __attribute__ ((__nonnull__ (1))); + + +extern long int fpathconf (int __fd, int __name) throw (); + + +extern long int sysconf (int __name) throw (); + + + +extern size_t confstr (int __name, char *__buf, size_t __len) throw (); + + + + +extern __pid_t getpid (void) throw (); + + +extern __pid_t getppid (void) throw (); + + + + +extern __pid_t getpgrp (void) throw (); +# 641 "/usr/include/unistd.h" 3 4 +extern __pid_t __getpgid (__pid_t __pid) throw (); + +extern __pid_t getpgid (__pid_t __pid) throw (); + + + + + + +extern int setpgid (__pid_t __pid, __pid_t __pgid) throw (); +# 667 "/usr/include/unistd.h" 3 4 +extern int setpgrp (void) throw (); +# 684 "/usr/include/unistd.h" 3 4 +extern __pid_t setsid (void) throw (); + + + +extern __pid_t getsid (__pid_t __pid) throw (); + + + +extern __uid_t getuid (void) throw (); + + +extern __uid_t geteuid (void) throw (); + + +extern __gid_t getgid (void) throw (); + + +extern __gid_t getegid (void) throw (); + + + + +extern int getgroups (int __size, __gid_t __list[]) throw () __attribute__ ((__warn_unused_result__)); + + + +extern int group_member (__gid_t __gid) throw (); + + + + + + +extern int setuid (__uid_t __uid) throw (); + + + + +extern int setreuid (__uid_t __ruid, __uid_t __euid) throw (); + + + + +extern int seteuid (__uid_t __uid) throw (); + + + + + + +extern int setgid (__gid_t __gid) throw (); + + + + +extern int setregid (__gid_t __rgid, __gid_t __egid) throw (); + + + + +extern int setegid (__gid_t __gid) throw (); + + + + + +extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) + throw (); + + + +extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) + throw (); + + + +extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) + throw (); + + + +extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) + throw (); + + + + + + +extern __pid_t fork (void) throw (); + + + + + + +extern __pid_t vfork (void) throw (); + + + + + +extern char *ttyname (int __fd) throw (); + + + +extern int ttyname_r (int __fd, char *__buf, size_t __buflen) + throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); + + + +extern int isatty (int __fd) throw (); + + + + + +extern int ttyslot (void) throw (); + + + + +extern int link (__const char *__from, __const char *__to) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); + + + + +extern int linkat (int __fromfd, __const char *__from, int __tofd, + __const char *__to, int __flags) + throw () __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern int symlink (__const char *__from, __const char *__to) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); + + + + +extern ssize_t readlink (__const char *__restrict __path, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); + + + + +extern int symlinkat (__const char *__from, int __tofd, + __const char *__to) throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + + +extern ssize_t readlinkat (int __fd, __const char *__restrict __path, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); + + + +extern int unlink (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); + + + +extern int unlinkat (int __fd, __const char *__name, int __flag) + throw () __attribute__ ((__nonnull__ (2))); + + + +extern int rmdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))); + + + +extern __pid_t tcgetpgrp (int __fd) throw (); + + +extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw (); + + + + + + +extern char *getlogin (void); + + + + + + + +extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); + + + + +extern int setlogin (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); +# 887 "/usr/include/unistd.h" 3 4 +# 1 "/usr/include/getopt.h" 1 3 4 +# 50 "/usr/include/getopt.h" 3 4 +extern "C" { +# 59 "/usr/include/getopt.h" 3 4 +extern char *optarg; +# 73 "/usr/include/getopt.h" 3 4 +extern int optind; + + + + +extern int opterr; + + + +extern int optopt; +# 152 "/usr/include/getopt.h" 3 4 +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) + throw (); +# 187 "/usr/include/getopt.h" 3 4 +} +# 888 "/usr/include/unistd.h" 2 3 4 + + + + + + + +extern int gethostname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern int sethostname (__const char *__name, size_t __len) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + +extern int sethostid (long int __id) throw () __attribute__ ((__warn_unused_result__)); + + + + + +extern int getdomainname (char *__name, size_t __len) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int setdomainname (__const char *__name, size_t __len) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int vhangup (void) throw (); + + +extern int revoke (__const char *__file) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern int profil (unsigned short int *__sample_buffer, size_t __size, + size_t __offset, unsigned int __scale) + throw () __attribute__ ((__nonnull__ (1))); + + + + + +extern int acct (__const char *__name) throw (); + + + +extern char *getusershell (void) throw (); +extern void endusershell (void) throw (); +extern void setusershell (void) throw (); + + + + + +extern int daemon (int __nochdir, int __noclose) throw () __attribute__ ((__warn_unused_result__)); + + + + + + +extern int chroot (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + +extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1))); +# 973 "/usr/include/unistd.h" 3 4 +extern int fsync (int __fd); + + + + + + +extern long int gethostid (void); + + +extern void sync (void) throw (); + + + + +extern int getpagesize (void) throw () __attribute__ ((__const__)); + + + + +extern int getdtablesize (void) throw (); + + + + +extern int truncate (__const char *__file, __off_t __length) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 1010 "/usr/include/unistd.h" 3 4 +extern int truncate64 (__const char *__file, __off64_t __length) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 1020 "/usr/include/unistd.h" 3 4 +extern int ftruncate (int __fd, __off_t __length) throw () __attribute__ ((__warn_unused_result__)); +# 1030 "/usr/include/unistd.h" 3 4 +extern int ftruncate64 (int __fd, __off64_t __length) throw () __attribute__ ((__warn_unused_result__)); +# 1040 "/usr/include/unistd.h" 3 4 +extern int brk (void *__addr) throw () __attribute__ ((__warn_unused_result__)); + + + + + +extern void *sbrk (intptr_t __delta) throw (); +# 1061 "/usr/include/unistd.h" 3 4 +extern long int syscall (long int __sysno, ...) throw (); +# 1084 "/usr/include/unistd.h" 3 4 +extern int lockf (int __fd, int __cmd, __off_t __len) __attribute__ ((__warn_unused_result__)); +# 1094 "/usr/include/unistd.h" 3 4 +extern int lockf64 (int __fd, int __cmd, __off64_t __len) __attribute__ ((__warn_unused_result__)); +# 1115 "/usr/include/unistd.h" 3 4 +extern int fdatasync (int __fildes); + + + + + + + +extern char *crypt (__const char *__key, __const char *__salt) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern void encrypt (char *__block, int __edflag) throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern void swab (__const void *__restrict __from, void *__restrict __to, + ssize_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + + + +extern char *ctermid (char *__s) throw (); + + + + + +# 1 "/usr/include/bits/unistd.h" 1 3 4 +# 24 "/usr/include/bits/unistd.h" 3 4 +extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes, + size_t __buflen) __attribute__ ((__warn_unused_result__)); +extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read") + __attribute__ ((__warn_unused_result__)); +extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t +read (int __fd, void *__buf, size_t __nbytes) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__nbytes)) + return __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); + + if (__nbytes > __builtin_object_size (__buf, 0)) + return __read_chk_warn (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); + } + return __read_alias (__fd, __buf, __nbytes); +} + + +extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes, + __off_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread") + + __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") + + __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread called with bigger length than size of " "the destination buffer"))) + ; +extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk") + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread64 called with bigger length than size of " "the destination buffer"))) + ; + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t +pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__nbytes)) + return __pread_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)); + + if ( __nbytes > __builtin_object_size (__buf, 0)) + return __pread_chk_warn (__fd, __buf, __nbytes, __offset, + __builtin_object_size (__buf, 0)); + } + return __pread_alias (__fd, __buf, __nbytes, __offset); +} +# 105 "/usr/include/bits/unistd.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t +pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__nbytes)) + return __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)); + + if ( __nbytes > __builtin_object_size (__buf, 0)) + return __pread64_chk_warn (__fd, __buf, __nbytes, __offset, + __builtin_object_size (__buf, 0)); + } + + return __pread64_alias (__fd, __buf, __nbytes, __offset); +} + + + + +extern ssize_t __readlink_chk (__const char *__restrict __path, + char *__restrict __buf, size_t __len, + size_t __buflen) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlink_alias (__const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __asm__ ("" "readlink") + + + __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlink_chk_warn (__const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__readlink_chk") + + + + __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t +readlink (__const char *__restrict __path, char *__restrict __buf, size_t __len) throw () + +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + + if ( __len > __builtin_object_size (__buf, 2 > 1)) + return __readlink_chk_warn (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + } + return __readlink_alias (__path, __buf, __len); +} + + + +extern ssize_t __readlinkat_chk (int __fd, __const char *__restrict __path, + char *__restrict __buf, size_t __len, + size_t __buflen) + throw () __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlinkat_alias (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __asm__ ("" "readlinkat") + + + + __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlinkat_chk_warn (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__readlinkat_chk") + + + + __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer"))) + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t +readlinkat (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) throw () + +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __readlinkat_chk (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + + if (__len > __builtin_object_size (__buf, 2 > 1)) + return __readlinkat_chk_warn (__fd, __path, __buf, __len, + __builtin_object_size (__buf, 2 > 1)); + } + return __readlinkat_alias (__fd, __path, __buf, __len); +} + + +extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen) + throw () __attribute__ ((__warn_unused_result__)); +extern char *__getcwd_alias (char *__buf, size_t __size) throw () __asm__ ("" "getcwd") + __attribute__ ((__warn_unused_result__)); +extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) throw () __asm__ ("" "__getcwd_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +getcwd (char *__buf, size_t __size) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__size)) + return __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1)); + + if (__size > __builtin_object_size (__buf, 2 > 1)) + return __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1)); + } + return __getcwd_alias (__buf, __size); +} + + +extern char *__getwd_chk (char *__buf, size_t buflen) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern char *__getwd_warn (char *__buf) throw () __asm__ ("" "getwd") + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char * +getwd (char *__buf) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1)); + return __getwd_warn (__buf); +} + + +extern size_t __confstr_chk (int __name, char *__buf, size_t __len, + size_t __buflen) throw (); +extern size_t __confstr_alias (int __name, char *__buf, size_t __len) throw () __asm__ ("" "confstr") + ; +extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__confstr_chk") + + + __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +confstr (int __name, char *__buf, size_t __len) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + + if (__builtin_object_size (__buf, 2 > 1) < __len) + return __confstr_chk_warn (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + } + return __confstr_alias (__name, __buf, __len); +} + + +extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen) + throw () __attribute__ ((__warn_unused_result__)); +extern int __getgroups_alias (int __size, __gid_t __list[]) throw () __asm__ ("" "getgroups") + __attribute__ ((__warn_unused_result__)); +extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) throw () __asm__ ("" "__getgroups_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +getgroups (int __size, __gid_t __list[]) throw () +{ + if (__builtin_object_size (__list, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__size) || __size < 0) + return __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1)); + + if (__size * sizeof (__gid_t) > __builtin_object_size (__list, 2 > 1)) + return __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1)); + } + return __getgroups_alias (__size, __list); +} + + +extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen, + size_t __nreal) throw () __attribute__ ((__nonnull__ (2))); +extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) throw () __asm__ ("" "ttyname_r") + + __attribute__ ((__nonnull__ (2))); +extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__ttyname_r_chk") + + + __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +ttyname_r (int __fd, char *__buf, size_t __buflen) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __ttyname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __ttyname_r_alias (__fd, __buf, __buflen); +} + + + +extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal) + __attribute__ ((__nonnull__ (1))); +extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r") + __attribute__ ((__nonnull__ (1))); +extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk") + + + __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +getlogin_r (char *__buf, size_t __buflen) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __getlogin_r_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __getlogin_r_alias (__buf, __buflen); +} + + + + +extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal) + throw () __attribute__ ((__nonnull__ (1))); +extern int __gethostname_alias (char *__buf, size_t __buflen) throw () __asm__ ("" "gethostname") + __attribute__ ((__nonnull__ (1))); +extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__gethostname_chk") + + + __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +gethostname (char *__buf, size_t __buflen) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __gethostname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __gethostname_alias (__buf, __buflen); +} + + + + +extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int __getdomainname_alias (char *__buf, size_t __buflen) throw () __asm__ ("" "getdomainname") + + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__getdomainname_chk") + + + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer"))) + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +getdomainname (char *__buf, size_t __buflen) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __getdomainname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __getdomainname_alias (__buf, __buflen); +} +# 1151 "/usr/include/unistd.h" 2 3 4 + + +} +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 2 3 + +typedef pthread_t __gthread_t; +typedef pthread_key_t __gthread_key_t; +typedef pthread_once_t __gthread_once_t; +typedef pthread_mutex_t __gthread_mutex_t; +typedef pthread_mutex_t __gthread_recursive_mutex_t; +typedef pthread_cond_t __gthread_cond_t; +typedef struct timespec __gthread_time_t; +# 118 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 +static __typeof(pthread_once) __gthrw_pthread_once __attribute__ ((__weakref__("pthread_once"))); +static __typeof(pthread_getspecific) __gthrw_pthread_getspecific __attribute__ ((__weakref__("pthread_getspecific"))); +static __typeof(pthread_setspecific) __gthrw_pthread_setspecific __attribute__ ((__weakref__("pthread_setspecific"))); + +static __typeof(pthread_create) __gthrw_pthread_create __attribute__ ((__weakref__("pthread_create"))); +static __typeof(pthread_join) __gthrw_pthread_join __attribute__ ((__weakref__("pthread_join"))); +static __typeof(pthread_equal) __gthrw_pthread_equal __attribute__ ((__weakref__("pthread_equal"))); +static __typeof(pthread_self) __gthrw_pthread_self __attribute__ ((__weakref__("pthread_self"))); +static __typeof(pthread_detach) __gthrw_pthread_detach __attribute__ ((__weakref__("pthread_detach"))); +static __typeof(pthread_cancel) __gthrw_pthread_cancel __attribute__ ((__weakref__("pthread_cancel"))); +static __typeof(sched_yield) __gthrw_sched_yield __attribute__ ((__weakref__("sched_yield"))); + +static __typeof(pthread_mutex_lock) __gthrw_pthread_mutex_lock __attribute__ ((__weakref__("pthread_mutex_lock"))); +static __typeof(pthread_mutex_trylock) __gthrw_pthread_mutex_trylock __attribute__ ((__weakref__("pthread_mutex_trylock"))); + + +static __typeof(pthread_mutex_timedlock) __gthrw_pthread_mutex_timedlock __attribute__ ((__weakref__("pthread_mutex_timedlock"))); + + +static __typeof(pthread_mutex_unlock) __gthrw_pthread_mutex_unlock __attribute__ ((__weakref__("pthread_mutex_unlock"))); +static __typeof(pthread_mutex_init) __gthrw_pthread_mutex_init __attribute__ ((__weakref__("pthread_mutex_init"))); +static __typeof(pthread_mutex_destroy) __gthrw_pthread_mutex_destroy __attribute__ ((__weakref__("pthread_mutex_destroy"))); + +static __typeof(pthread_cond_broadcast) __gthrw_pthread_cond_broadcast __attribute__ ((__weakref__("pthread_cond_broadcast"))); +static __typeof(pthread_cond_signal) __gthrw_pthread_cond_signal __attribute__ ((__weakref__("pthread_cond_signal"))); +static __typeof(pthread_cond_wait) __gthrw_pthread_cond_wait __attribute__ ((__weakref__("pthread_cond_wait"))); +static __typeof(pthread_cond_timedwait) __gthrw_pthread_cond_timedwait __attribute__ ((__weakref__("pthread_cond_timedwait"))); +static __typeof(pthread_cond_destroy) __gthrw_pthread_cond_destroy __attribute__ ((__weakref__("pthread_cond_destroy"))); + + +static __typeof(pthread_key_create) __gthrw_pthread_key_create __attribute__ ((__weakref__("pthread_key_create"))); +static __typeof(pthread_key_delete) __gthrw_pthread_key_delete __attribute__ ((__weakref__("pthread_key_delete"))); +static __typeof(pthread_mutexattr_init) __gthrw_pthread_mutexattr_init __attribute__ ((__weakref__("pthread_mutexattr_init"))); +static __typeof(pthread_mutexattr_settype) __gthrw_pthread_mutexattr_settype __attribute__ ((__weakref__("pthread_mutexattr_settype"))); +static __typeof(pthread_mutexattr_destroy) __gthrw_pthread_mutexattr_destroy __attribute__ ((__weakref__("pthread_mutexattr_destroy"))); +# 237 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 +static inline int +__gthread_active_p (void) +{ + static void *const __gthread_active_ptr + = __extension__ (void *) &__gthrw_pthread_cancel; + return __gthread_active_ptr != 0; +} +# 675 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 +static inline int +__gthread_create (__gthread_t *__threadid, void *(*__func) (void*), + void *__args) +{ + return __gthrw_pthread_create (__threadid, __null, __func, __args); +} + +static inline int +__gthread_join (__gthread_t __threadid, void **__value_ptr) +{ + return __gthrw_pthread_join (__threadid, __value_ptr); +} + +static inline int +__gthread_detach (__gthread_t __threadid) +{ + return __gthrw_pthread_detach (__threadid); +} + +static inline int +__gthread_equal (__gthread_t __t1, __gthread_t __t2) +{ + return __gthrw_pthread_equal (__t1, __t2); +} + +static inline __gthread_t +__gthread_self (void) +{ + return __gthrw_pthread_self (); +} + +static inline int +__gthread_yield (void) +{ + return __gthrw_sched_yield (); +} + +static inline int +__gthread_once (__gthread_once_t *__once, void (*__func) (void)) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_once (__once, __func); + else + return -1; +} + +static inline int +__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *)) +{ + return __gthrw_pthread_key_create (__key, __dtor); +} + +static inline int +__gthread_key_delete (__gthread_key_t __key) +{ + return __gthrw_pthread_key_delete (__key); +} + +static inline void * +__gthread_getspecific (__gthread_key_t __key) +{ + return __gthrw_pthread_getspecific (__key); +} + +static inline int +__gthread_setspecific (__gthread_key_t __key, const void *__ptr) +{ + return __gthrw_pthread_setspecific (__key, __ptr); +} + +static inline int +__gthread_mutex_destroy (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_destroy (__mutex); + else + return 0; +} + +static inline int +__gthread_mutex_lock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_lock (__mutex); + else + return 0; +} + +static inline int +__gthread_mutex_trylock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_trylock (__mutex); + else + return 0; +} + + + +static inline int +__gthread_mutex_timedlock (__gthread_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_timedlock (__mutex, __abs_timeout); + else + return 0; +} + + + +static inline int +__gthread_mutex_unlock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_unlock (__mutex); + else + return 0; +} +# 818 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 +static inline int +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_lock (__mutex); +} + +static inline int +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_trylock (__mutex); +} + + + +static inline int +__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return __gthread_mutex_timedlock (__mutex, __abs_timeout); +} + + + +static inline int +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_unlock (__mutex); +} + +static inline int +__gthread_cond_broadcast (__gthread_cond_t *__cond) +{ + return __gthrw_pthread_cond_broadcast (__cond); +} + +static inline int +__gthread_cond_signal (__gthread_cond_t *__cond) +{ + return __gthrw_pthread_cond_signal (__cond); +} + +static inline int +__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex) +{ + return __gthrw_pthread_cond_wait (__cond, __mutex); +} + +static inline int +__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return __gthrw_pthread_cond_timedwait (__cond, __mutex, __abs_timeout); +} + +static inline int +__gthread_cond_wait_recursive (__gthread_cond_t *__cond, + __gthread_recursive_mutex_t *__mutex) +{ + return __gthread_cond_wait (__cond, __mutex); +} + +static inline int +__gthread_cond_timedwait_recursive (__gthread_cond_t *__cond, + __gthread_recursive_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return __gthread_cond_timedwait (__cond, __mutex, __abs_timeout); +} + +static inline int +__gthread_cond_destroy (__gthread_cond_t* __cond) +{ + return __gthrw_pthread_cond_destroy (__cond); +} +# 163 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr.h" 2 3 + + + + + + + +#pragma GCC visibility pop +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ext/atomicity.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/atomic_word.h" 1 3 +# 32 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/atomic_word.h" 3 +typedef int _Atomic_word; +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ext/atomicity.h" 2 3 + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + + + + + + + static inline _Atomic_word + __exchange_and_add(volatile _Atomic_word* __mem, int __val) + { return __sync_fetch_and_add(__mem, __val); } + + static inline void + __atomic_add(volatile _Atomic_word* __mem, int __val) + { __sync_fetch_and_add(__mem, __val); } +# 61 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ext/atomicity.h" 3 + static inline _Atomic_word + __exchange_and_add_single(_Atomic_word* __mem, int __val) + { + _Atomic_word __result = *__mem; + *__mem += __val; + return __result; + } + + static inline void + __atomic_add_single(_Atomic_word* __mem, int __val) + { *__mem += __val; } + + static inline _Atomic_word + __attribute__ ((__unused__)) + __exchange_and_add_dispatch(_Atomic_word* __mem, int __val) + { + + if (__gthread_active_p()) + return __exchange_and_add(__mem, __val); + else + return __exchange_and_add_single(__mem, __val); + + + + } + + static inline void + __attribute__ ((__unused__)) + __atomic_add_dispatch(_Atomic_word* __mem, int __val) + { + + if (__gthread_active_p()) + __atomic_add(__mem, __val); + else + __atomic_add_single(__mem, __val); + + + + } + +} +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 2 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/initializer_list" 1 3 +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/initializer_list" 3 + +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/initializer_list" 3 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 103 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + template + class basic_string + { + typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type; + + + public: + typedef _Traits traits_type; + typedef typename _Traits::char_type value_type; + typedef _Alloc allocator_type; + typedef typename _CharT_alloc_type::size_type size_type; + typedef typename _CharT_alloc_type::difference_type difference_type; + typedef typename _CharT_alloc_type::reference reference; + typedef typename _CharT_alloc_type::const_reference const_reference; + typedef typename _CharT_alloc_type::pointer pointer; + typedef typename _CharT_alloc_type::const_pointer const_pointer; + typedef __gnu_cxx::__normal_iterator iterator; + typedef __gnu_cxx::__normal_iterator + const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + + private: +# 140 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + struct _Rep_base + { + size_type _M_length; + size_type _M_capacity; + _Atomic_word _M_refcount; + }; + + struct _Rep : _Rep_base + { + + typedef typename _Alloc::template rebind::other _Raw_bytes_alloc; +# 165 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + static const size_type _S_max_size; + static const _CharT _S_terminal; + + + + static size_type _S_empty_rep_storage[]; + + static _Rep& + _S_empty_rep() + { + + + + void* __p = reinterpret_cast(&_S_empty_rep_storage); + return *reinterpret_cast<_Rep*>(__p); + } + + bool + _M_is_leaked() const + { return this->_M_refcount < 0; } + + bool + _M_is_shared() const + { return this->_M_refcount > 0; } + + void + _M_set_leaked() + { this->_M_refcount = -1; } + + void + _M_set_sharable() + { this->_M_refcount = 0; } + + void + _M_set_length_and_sharable(size_type __n) + { + + if (__builtin_expect(this != &_S_empty_rep(), false)) + + { + this->_M_set_sharable(); + this->_M_length = __n; + traits_type::assign(this->_M_refdata()[__n], _S_terminal); + + + } + } + + _CharT* + _M_refdata() throw() + { return reinterpret_cast<_CharT*>(this + 1); } + + _CharT* + _M_grab(const _Alloc& __alloc1, const _Alloc& __alloc2) + { + return (!_M_is_leaked() && __alloc1 == __alloc2) + ? _M_refcopy() : _M_clone(__alloc1); + } + + + static _Rep* + _S_create(size_type, size_type, const _Alloc&); + + void + _M_dispose(const _Alloc& __a) + { + + if (__builtin_expect(this != &_S_empty_rep(), false)) + + if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount, + -1) <= 0) + _M_destroy(__a); + } + + void + _M_destroy(const _Alloc&) throw(); + + _CharT* + _M_refcopy() throw() + { + + if (__builtin_expect(this != &_S_empty_rep(), false)) + + __gnu_cxx::__atomic_add_dispatch(&this->_M_refcount, 1); + return _M_refdata(); + } + + _CharT* + _M_clone(const _Alloc&, size_type __res = 0); + }; + + + struct _Alloc_hider : _Alloc + { + _Alloc_hider(_CharT* __dat, const _Alloc& __a) + : _Alloc(__a), _M_p(__dat) { } + + _CharT* _M_p; + }; + + public: + + + + + static const size_type npos = static_cast(-1); + + private: + + mutable _Alloc_hider _M_dataplus; + + _CharT* + _M_data() const + { return _M_dataplus._M_p; } + + _CharT* + _M_data(_CharT* __p) + { return (_M_dataplus._M_p = __p); } + + _Rep* + _M_rep() const + { return &((reinterpret_cast<_Rep*> (_M_data()))[-1]); } + + + + iterator + _M_ibegin() const + { return iterator(_M_data()); } + + iterator + _M_iend() const + { return iterator(_M_data() + this->size()); } + + void + _M_leak() + { + if (!_M_rep()->_M_is_leaked()) + _M_leak_hard(); + } + + size_type + _M_check(size_type __pos, const char* __s) const + { + if (__pos > this->size()) + __throw_out_of_range((__s)); + return __pos; + } + + void + _M_check_length(size_type __n1, size_type __n2, const char* __s) const + { + if (this->max_size() - (this->size() - __n1) < __n2) + __throw_length_error((__s)); + } + + + size_type + _M_limit(size_type __pos, size_type __off) const + { + const bool __testoff = __off < this->size() - __pos; + return __testoff ? __off : this->size() - __pos; + } + + + bool + _M_disjunct(const _CharT* __s) const + { + return (less()(__s, _M_data()) + || less()(_M_data() + this->size(), __s)); + } + + + + static void + _M_copy(_CharT* __d, const _CharT* __s, size_type __n) + { + if (__n == 1) + traits_type::assign(*__d, *__s); + else + traits_type::copy(__d, __s, __n); + } + + static void + _M_move(_CharT* __d, const _CharT* __s, size_type __n) + { + if (__n == 1) + traits_type::assign(*__d, *__s); + else + traits_type::move(__d, __s, __n); + } + + static void + _M_assign(_CharT* __d, size_type __n, _CharT __c) + { + if (__n == 1) + traits_type::assign(*__d, __c); + else + traits_type::assign(__d, __n, __c); + } + + + + template + static void + _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) + { + for (; __k1 != __k2; ++__k1, ++__p) + traits_type::assign(*__p, *__k1); + } + + static void + _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) + { _S_copy_chars(__p, __k1.base(), __k2.base()); } + + static void + _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) + { _S_copy_chars(__p, __k1.base(), __k2.base()); } + + static void + _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) + { _M_copy(__p, __k1, __k2 - __k1); } + + static void + _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) + { _M_copy(__p, __k1, __k2 - __k1); } + + static int + _S_compare(size_type __n1, size_type __n2) + { + const difference_type __d = difference_type(__n1 - __n2); + + if (__d > __gnu_cxx::__numeric_traits::__max) + return __gnu_cxx::__numeric_traits::__max; + else if (__d < __gnu_cxx::__numeric_traits::__min) + return __gnu_cxx::__numeric_traits::__min; + else + return int(__d); + } + + void + _M_mutate(size_type __pos, size_type __len1, size_type __len2); + + void + _M_leak_hard(); + + static _Rep& + _S_empty_rep() + { return _Rep::_S_empty_rep(); } + + public: + + + + + + + + basic_string() + + : _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) { } + + + + + + + + explicit + basic_string(const _Alloc& __a); + + + + + + + basic_string(const basic_string& __str); + + + + + + + basic_string(const basic_string& __str, size_type __pos, + size_type __n = npos); + + + + + + + + basic_string(const basic_string& __str, size_type __pos, + size_type __n, const _Alloc& __a); +# 468 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string(const _CharT* __s, size_type __n, + const _Alloc& __a = _Alloc()); + + + + + + basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()); + + + + + + + basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()); +# 516 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + template + basic_string(_InputIterator __beg, _InputIterator __end, + const _Alloc& __a = _Alloc()); + + + + + ~basic_string() + { _M_rep()->_M_dispose(this->get_allocator()); } + + + + + + basic_string& + operator=(const basic_string& __str) + { return this->assign(__str); } + + + + + + basic_string& + operator=(const _CharT* __s) + { return this->assign(__s); } +# 549 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string& + operator=(_CharT __c) + { + this->assign(1, __c); + return *this; + } +# 589 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + iterator + begin() + { + _M_leak(); + return iterator(_M_data()); + } + + + + + + const_iterator + begin() const + { return const_iterator(_M_data()); } + + + + + + iterator + end() + { + _M_leak(); + return iterator(_M_data() + this->size()); + } + + + + + + const_iterator + end() const + { return const_iterator(_M_data() + this->size()); } + + + + + + + reverse_iterator + rbegin() + { return reverse_iterator(this->end()); } + + + + + + + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(this->end()); } + + + + + + + reverse_iterator + rend() + { return reverse_iterator(this->begin()); } + + + + + + + const_reverse_iterator + rend() const + { return const_reverse_iterator(this->begin()); } +# 695 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + public: + + + + size_type + size() const + { return _M_rep()->_M_length; } + + + + size_type + length() const + { return _M_rep()->_M_length; } + + + size_type + max_size() const + { return _Rep::_S_max_size; } +# 724 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + void + resize(size_type __n, _CharT __c); +# 737 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + void + resize(size_type __n) + { this->resize(__n, _CharT()); } +# 757 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + capacity() const + { return _M_rep()->_M_capacity; } +# 778 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + void + reserve(size_type __res_arg = 0); + + + + + void + clear() + { _M_mutate(0, this->size(), 0); } + + + + + + bool + empty() const + { return this->size() == 0; } +# 807 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + const_reference + operator[] (size_type __pos) const + { + ; + return _M_data()[__pos]; + } +# 824 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + reference + operator[](size_type __pos) + { + + ; + + ; + _M_leak(); + return _M_data()[__pos]; + } +# 845 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + const_reference + at(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range(("basic_string::at")); + return _M_data()[__n]; + } +# 864 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + reference + at(size_type __n) + { + if (__n >= size()) + __throw_out_of_range(("basic_string::at")); + _M_leak(); + return _M_data()[__n]; + } + + + + + + + + basic_string& + operator+=(const basic_string& __str) + { return this->append(__str); } + + + + + + + basic_string& + operator+=(const _CharT* __s) + { return this->append(__s); } + + + + + + + basic_string& + operator+=(_CharT __c) + { + this->push_back(__c); + return *this; + } +# 920 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string& + append(const basic_string& __str); +# 935 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string& + append(const basic_string& __str, size_type __pos, size_type __n); + + + + + + + + basic_string& + append(const _CharT* __s, size_type __n); + + + + + + + basic_string& + append(const _CharT* __s) + { + ; + return this->append(__s, traits_type::length(__s)); + } +# 967 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string& + append(size_type __n, _CharT __c); +# 989 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + template + basic_string& + append(_InputIterator __first, _InputIterator __last) + { return this->replace(_M_iend(), _M_iend(), __first, __last); } + + + + + + void + push_back(_CharT __c) + { + const size_type __len = 1 + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + this->reserve(__len); + traits_type::assign(_M_data()[this->size()], __c); + _M_rep()->_M_set_length_and_sharable(__len); + } + + + + + + + basic_string& + assign(const basic_string& __str); +# 1045 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string& + assign(const basic_string& __str, size_type __pos, size_type __n) + { return this->assign(__str._M_data() + + __str._M_check(__pos, "basic_string::assign"), + __str._M_limit(__pos, __n)); } +# 1061 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string& + assign(const _CharT* __s, size_type __n); +# 1073 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string& + assign(const _CharT* __s) + { + ; + return this->assign(__s, traits_type::length(__s)); + } +# 1089 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string& + assign(size_type __n, _CharT __c) + { return _M_replace_aux(size_type(0), this->size(), __n, __c); } +# 1101 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + template + basic_string& + assign(_InputIterator __first, _InputIterator __last) + { return this->replace(_M_ibegin(), _M_iend(), __first, __last); } +# 1129 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + void + insert(iterator __p, size_type __n, _CharT __c) + { this->replace(__p, __p, __n, __c); } +# 1144 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + template + void + insert(iterator __p, _InputIterator __beg, _InputIterator __end) + { this->replace(__p, __p, __beg, __end); } +# 1175 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos1, const basic_string& __str) + { return this->insert(__pos1, __str, size_type(0), __str.size()); } +# 1197 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos1, const basic_string& __str, + size_type __pos2, size_type __n) + { return this->insert(__pos1, __str._M_data() + + __str._M_check(__pos2, "basic_string::insert"), + __str._M_limit(__pos2, __n)); } +# 1220 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos, const _CharT* __s, size_type __n); +# 1238 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos, const _CharT* __s) + { + ; + return this->insert(__pos, __s, traits_type::length(__s)); + } +# 1261 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos, size_type __n, _CharT __c) + { return _M_replace_aux(_M_check(__pos, "basic_string::insert"), + size_type(0), __n, __c); } +# 1278 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + iterator + insert(iterator __p, _CharT __c) + { + ; + const size_type __pos = __p - _M_ibegin(); + _M_replace_aux(__pos, size_type(0), size_type(1), __c); + _M_rep()->_M_set_leaked(); + return iterator(_M_data() + __pos); + } +# 1302 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string& + erase(size_type __pos = 0, size_type __n = npos) + { + _M_mutate(_M_check(__pos, "basic_string::erase"), + _M_limit(__pos, __n), size_type(0)); + return *this; + } +# 1318 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + iterator + erase(iterator __position) + { + + ; + const size_type __pos = __position - _M_ibegin(); + _M_mutate(__pos, size_type(1), size_type(0)); + _M_rep()->_M_set_leaked(); + return iterator(_M_data() + __pos); + } +# 1338 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + iterator + erase(iterator __first, iterator __last); +# 1357 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos, size_type __n, const basic_string& __str) + { return this->replace(__pos, __n, __str._M_data(), __str.size()); } +# 1379 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2) + { return this->replace(__pos1, __n1, __str._M_data() + + __str._M_check(__pos2, "basic_string::replace"), + __str._M_limit(__pos2, __n2)); } +# 1403 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2); +# 1422 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos, size_type __n1, const _CharT* __s) + { + ; + return this->replace(__pos, __n1, __s, traits_type::length(__s)); + } +# 1445 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) + { return _M_replace_aux(_M_check(__pos, "basic_string::replace"), + _M_limit(__pos, __n1), __n2, __c); } +# 1463 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(iterator __i1, iterator __i2, const basic_string& __str) + { return this->replace(__i1, __i2, __str._M_data(), __str.size()); } +# 1481 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n) + { + + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n); + } +# 1502 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(iterator __i1, iterator __i2, const _CharT* __s) + { + ; + return this->replace(__i1, __i2, __s, traits_type::length(__s)); + } +# 1523 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(iterator __i1, iterator __i2, size_type __n, _CharT __c) + { + + ; + return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c); + } +# 1545 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + template + basic_string& + replace(iterator __i1, iterator __i2, + _InputIterator __k1, _InputIterator __k2) + { + + ; + ; + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral()); + } + + + + basic_string& + replace(iterator __i1, iterator __i2, _CharT* __k1, _CharT* __k2) + { + + ; + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, + __k1, __k2 - __k1); + } + + basic_string& + replace(iterator __i1, iterator __i2, + const _CharT* __k1, const _CharT* __k2) + { + + ; + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, + __k1, __k2 - __k1); + } + + basic_string& + replace(iterator __i1, iterator __i2, iterator __k1, iterator __k2) + { + + ; + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, + __k1.base(), __k2 - __k1); + } + + basic_string& + replace(iterator __i1, iterator __i2, + const_iterator __k1, const_iterator __k2) + { + + ; + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, + __k1.base(), __k2 - __k1); + } +# 1620 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + private: + template + basic_string& + _M_replace_dispatch(iterator __i1, iterator __i2, _Integer __n, + _Integer __val, __true_type) + { return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __val); } + + template + basic_string& + _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, + _InputIterator __k2, __false_type); + + basic_string& + _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, + _CharT __c); + + basic_string& + _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, + size_type __n2); + + + + template + static _CharT* + _S_construct_aux(_InIterator __beg, _InIterator __end, + const _Alloc& __a, __false_type) + { + typedef typename iterator_traits<_InIterator>::iterator_category _Tag; + return _S_construct(__beg, __end, __a, _Tag()); + } + + + + template + static _CharT* + _S_construct_aux(_Integer __beg, _Integer __end, + const _Alloc& __a, __true_type) + { return _S_construct_aux_2(static_cast(__beg), + __end, __a); } + + static _CharT* + _S_construct_aux_2(size_type __req, _CharT __c, const _Alloc& __a) + { return _S_construct(__req, __c, __a); } + + template + static _CharT* + _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a) + { + typedef typename std::__is_integer<_InIterator>::__type _Integral; + return _S_construct_aux(__beg, __end, __a, _Integral()); + } + + + template + static _CharT* + _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, + input_iterator_tag); + + + + template + static _CharT* + _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a, + forward_iterator_tag); + + static _CharT* + _S_construct(size_type __req, _CharT __c, const _Alloc& __a); + + public: +# 1701 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + copy(_CharT* __s, size_type __n, size_type __pos = 0) const; +# 1711 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + void + swap(basic_string& __s); +# 1721 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + const _CharT* + c_str() const + { return _M_data(); } + + + + + + + + const _CharT* + data() const + { return _M_data(); } + + + + + allocator_type + get_allocator() const + { return _M_dataplus; } +# 1753 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + find(const _CharT* __s, size_type __pos, size_type __n) const; +# 1766 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + find(const basic_string& __str, size_type __pos = 0) const + { return this->find(__str.data(), __pos, __str.size()); } +# 1780 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + find(const _CharT* __s, size_type __pos = 0) const + { + ; + return this->find(__s, __pos, traits_type::length(__s)); + } +# 1797 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + find(_CharT __c, size_type __pos = 0) const; +# 1810 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + rfind(const basic_string& __str, size_type __pos = npos) const + { return this->rfind(__str.data(), __pos, __str.size()); } +# 1825 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + rfind(const _CharT* __s, size_type __pos, size_type __n) const; +# 1838 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + rfind(const _CharT* __s, size_type __pos = npos) const + { + ; + return this->rfind(__s, __pos, traits_type::length(__s)); + } +# 1855 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + rfind(_CharT __c, size_type __pos = npos) const; +# 1868 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + find_first_of(const basic_string& __str, size_type __pos = 0) const + { return this->find_first_of(__str.data(), __pos, __str.size()); } +# 1883 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + find_first_of(const _CharT* __s, size_type __pos, size_type __n) const; +# 1896 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + find_first_of(const _CharT* __s, size_type __pos = 0) const + { + ; + return this->find_first_of(__s, __pos, traits_type::length(__s)); + } +# 1915 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + find_first_of(_CharT __c, size_type __pos = 0) const + { return this->find(__c, __pos); } +# 1929 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + find_last_of(const basic_string& __str, size_type __pos = npos) const + { return this->find_last_of(__str.data(), __pos, __str.size()); } +# 1944 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + find_last_of(const _CharT* __s, size_type __pos, size_type __n) const; +# 1957 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + find_last_of(const _CharT* __s, size_type __pos = npos) const + { + ; + return this->find_last_of(__s, __pos, traits_type::length(__s)); + } +# 1976 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + find_last_of(_CharT __c, size_type __pos = npos) const + { return this->rfind(__c, __pos); } +# 1990 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + find_first_not_of(const basic_string& __str, size_type __pos = 0) const + { return this->find_first_not_of(__str.data(), __pos, __str.size()); } +# 2005 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + find_first_not_of(const _CharT* __s, size_type __pos, + size_type __n) const; +# 2019 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + find_first_not_of(const _CharT* __s, size_type __pos = 0) const + { + ; + return this->find_first_not_of(__s, __pos, traits_type::length(__s)); + } +# 2036 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + find_first_not_of(_CharT __c, size_type __pos = 0) const; +# 2049 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + find_last_not_of(const basic_string& __str, size_type __pos = npos) const + { return this->find_last_not_of(__str.data(), __pos, __str.size()); } +# 2065 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + find_last_not_of(const _CharT* __s, size_type __pos, + size_type __n) const; +# 2078 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + find_last_not_of(const _CharT* __s, size_type __pos = npos) const + { + ; + return this->find_last_not_of(__s, __pos, traits_type::length(__s)); + } +# 2095 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + size_type + find_last_not_of(_CharT __c, size_type __pos = npos) const; +# 2110 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + basic_string + substr(size_type __pos = 0, size_type __n = npos) const + { return basic_string(*this, + _M_check(__pos, "basic_string::substr"), __n); } +# 2128 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + int + compare(const basic_string& __str) const + { + const size_type __size = this->size(); + const size_type __osize = __str.size(); + const size_type __len = std::min(__size, __osize); + + int __r = traits_type::compare(_M_data(), __str.data(), __len); + if (!__r) + __r = _S_compare(__size, __osize); + return __r; + } +# 2158 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + int + compare(size_type __pos, size_type __n, const basic_string& __str) const; +# 2182 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + int + compare(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2) const; +# 2200 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + int + compare(const _CharT* __s) const; +# 2223 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + int + compare(size_type __pos, size_type __n1, const _CharT* __s) const; +# 2248 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + int + compare(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) const; + }; +# 2260 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + template + basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + basic_string<_CharT, _Traits, _Alloc> __str(__lhs); + __str.append(__rhs); + return __str; + } + + + + + + + + template + basic_string<_CharT,_Traits,_Alloc> + operator+(const _CharT* __lhs, + const basic_string<_CharT,_Traits,_Alloc>& __rhs); + + + + + + + + template + basic_string<_CharT,_Traits,_Alloc> + operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); + + + + + + + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { + basic_string<_CharT, _Traits, _Alloc> __str(__lhs); + __str.append(__rhs); + return __str; + } + + + + + + + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) + { + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + __string_type __str(__lhs); + __str.append(__size_type(1), __rhs); + return __str; + } +# 2331 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + template + inline bool + operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) == 0; } + + template + inline + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, bool>::__type + operator==(const basic_string<_CharT>& __lhs, + const basic_string<_CharT>& __rhs) + { return (__lhs.size() == __rhs.size() + && !std::char_traits<_CharT>::compare(__lhs.data(), __rhs.data(), + __lhs.size())); } + + + + + + + + template + inline bool + operator==(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) == 0; } + + + + + + + + template + inline bool + operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) == 0; } +# 2377 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + template + inline bool + operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return !(__lhs == __rhs); } + + + + + + + + template + inline bool + operator!=(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return !(__lhs == __rhs); } + + + + + + + + template + inline bool + operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return !(__lhs == __rhs); } +# 2414 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + template + inline bool + operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) < 0; } + + + + + + + + template + inline bool + operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) < 0; } + + + + + + + + template + inline bool + operator<(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) > 0; } +# 2451 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + template + inline bool + operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) > 0; } + + + + + + + + template + inline bool + operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) > 0; } + + + + + + + + template + inline bool + operator>(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) < 0; } +# 2488 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + template + inline bool + operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) <= 0; } + + + + + + + + template + inline bool + operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) <= 0; } + + + + + + + + template + inline bool + operator<=(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) >= 0; } +# 2525 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + template + inline bool + operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) >= 0; } + + + + + + + + template + inline bool + operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) >= 0; } + + + + + + + + template + inline bool + operator>=(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) <= 0; } +# 2562 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + template + inline void + swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, + basic_string<_CharT, _Traits, _Alloc>& __rhs) + { __lhs.swap(__rhs); } +# 2579 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str); + + template<> + basic_istream& + operator>>(basic_istream& __is, basic_string& __str); +# 2597 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, + const basic_string<_CharT, _Traits, _Alloc>& __str) + { + + + return __ostream_insert(__os, __str.data(), __str.size()); + } +# 2620 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + template + basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim); +# 2638 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.h" 3 + template + inline basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str) + { return getline(__is, __str, __is.widen('\n')); } + + template<> + basic_istream& + getline(basic_istream& __in, basic_string& __str, + char __delim); + + + template<> + basic_istream& + getline(basic_istream& __in, basic_string& __str, + wchar_t __delim); + + +} +# 54 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/string" 2 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.tcc" 1 3 +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.tcc" 3 + +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.tcc" 3 + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + const typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + _Rep::_S_max_size = (((npos - sizeof(_Rep_base))/sizeof(_CharT)) - 1) / 4; + + template + const _CharT + basic_string<_CharT, _Traits, _Alloc>:: + _Rep::_S_terminal = _CharT(); + + template + const typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>::npos; + + + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_empty_rep_storage[ + (sizeof(_Rep_base) + sizeof(_CharT) + sizeof(size_type) - 1) / + sizeof(size_type)]; + + + + + + template + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>:: + _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, + input_iterator_tag) + { + + if (__beg == __end && __a == _Alloc()) + return _S_empty_rep()._M_refdata(); + + + _CharT __buf[128]; + size_type __len = 0; + while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT)) + { + __buf[__len++] = *__beg; + ++__beg; + } + _Rep* __r = _Rep::_S_create(__len, size_type(0), __a); + _M_copy(__r->_M_refdata(), __buf, __len); + try + { + while (__beg != __end) + { + if (__len == __r->_M_capacity) + { + + _Rep* __another = _Rep::_S_create(__len + 1, __len, __a); + _M_copy(__another->_M_refdata(), __r->_M_refdata(), __len); + __r->_M_destroy(__a); + __r = __another; + } + __r->_M_refdata()[__len++] = *__beg; + ++__beg; + } + } + catch(...) + { + __r->_M_destroy(__a); + throw; + } + __r->_M_set_length_and_sharable(__len); + return __r->_M_refdata(); + } + + template + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>:: + _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, + forward_iterator_tag) + { + + if (__beg == __end && __a == _Alloc()) + return _S_empty_rep()._M_refdata(); + + + if (__gnu_cxx::__is_null_pointer(__beg) && __beg != __end) + __throw_logic_error(("basic_string::_S_construct NULL not valid")); + + const size_type __dnew = static_cast(std::distance(__beg, + __end)); + + _Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a); + try + { _S_copy_chars(__r->_M_refdata(), __beg, __end); } + catch(...) + { + __r->_M_destroy(__a); + throw; + } + __r->_M_set_length_and_sharable(__dnew); + return __r->_M_refdata(); + } + + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>:: + _S_construct(size_type __n, _CharT __c, const _Alloc& __a) + { + + if (__n == 0 && __a == _Alloc()) + return _S_empty_rep()._M_refdata(); + + + _Rep* __r = _Rep::_S_create(__n, size_type(0), __a); + if (__n) + _M_assign(__r->_M_refdata(), __n, __c); + + __r->_M_set_length_and_sharable(__n); + return __r->_M_refdata(); + } + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const basic_string& __str) + : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(__str.get_allocator()), + __str.get_allocator()), + __str.get_allocator()) + { } + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const _Alloc& __a) + : _M_dataplus(_S_construct(size_type(), _CharT(), __a), __a) + { } + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const basic_string& __str, size_type __pos, size_type __n) + : _M_dataplus(_S_construct(__str._M_data() + + __str._M_check(__pos, + "basic_string::basic_string"), + __str._M_data() + __str._M_limit(__pos, __n) + + __pos, _Alloc()), _Alloc()) + { } + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const basic_string& __str, size_type __pos, + size_type __n, const _Alloc& __a) + : _M_dataplus(_S_construct(__str._M_data() + + __str._M_check(__pos, + "basic_string::basic_string"), + __str._M_data() + __str._M_limit(__pos, __n) + + __pos, __a), __a) + { } + + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const _CharT* __s, size_type __n, const _Alloc& __a) + : _M_dataplus(_S_construct(__s, __s + __n, __a), __a) + { } + + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const _CharT* __s, const _Alloc& __a) + : _M_dataplus(_S_construct(__s, __s ? __s + traits_type::length(__s) : + __s + npos, __a), __a) + { } + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(size_type __n, _CharT __c, const _Alloc& __a) + : _M_dataplus(_S_construct(__n, __c, __a), __a) + { } + + + template + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a) + : _M_dataplus(_S_construct(__beg, __end, __a), __a) + { } +# 240 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.tcc" 3 + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + assign(const basic_string& __str) + { + if (_M_rep() != __str._M_rep()) + { + + const allocator_type __a = this->get_allocator(); + _CharT* __tmp = __str._M_rep()->_M_grab(__a, __str.get_allocator()); + _M_rep()->_M_dispose(__a); + _M_data(__tmp); + } + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + assign(const _CharT* __s, size_type __n) + { + ; + _M_check_length(this->size(), __n, "basic_string::assign"); + if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) + return _M_replace_safe(size_type(0), this->size(), __s, __n); + else + { + + const size_type __pos = __s - _M_data(); + if (__pos >= __n) + _M_copy(_M_data(), __s, __n); + else if (__pos) + _M_move(_M_data(), __s, __n); + _M_rep()->_M_set_length_and_sharable(__n); + return *this; + } + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + append(size_type __n, _CharT __c) + { + if (__n) + { + _M_check_length(size_type(0), __n, "basic_string::append"); + const size_type __len = __n + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + this->reserve(__len); + _M_assign(_M_data() + this->size(), __n, __c); + _M_rep()->_M_set_length_and_sharable(__len); + } + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + append(const _CharT* __s, size_type __n) + { + ; + if (__n) + { + _M_check_length(size_type(0), __n, "basic_string::append"); + const size_type __len = __n + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + { + if (_M_disjunct(__s)) + this->reserve(__len); + else + { + const size_type __off = __s - _M_data(); + this->reserve(__len); + __s = _M_data() + __off; + } + } + _M_copy(_M_data() + this->size(), __s, __n); + _M_rep()->_M_set_length_and_sharable(__len); + } + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + append(const basic_string& __str) + { + const size_type __size = __str.size(); + if (__size) + { + const size_type __len = __size + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + this->reserve(__len); + _M_copy(_M_data() + this->size(), __str._M_data(), __size); + _M_rep()->_M_set_length_and_sharable(__len); + } + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + append(const basic_string& __str, size_type __pos, size_type __n) + { + __str._M_check(__pos, "basic_string::append"); + __n = __str._M_limit(__pos, __n); + if (__n) + { + const size_type __len = __n + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + this->reserve(__len); + _M_copy(_M_data() + this->size(), __str._M_data() + __pos, __n); + _M_rep()->_M_set_length_and_sharable(__len); + } + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + insert(size_type __pos, const _CharT* __s, size_type __n) + { + ; + _M_check(__pos, "basic_string::insert"); + _M_check_length(size_type(0), __n, "basic_string::insert"); + if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) + return _M_replace_safe(__pos, size_type(0), __s, __n); + else + { + + const size_type __off = __s - _M_data(); + _M_mutate(__pos, 0, __n); + __s = _M_data() + __off; + _CharT* __p = _M_data() + __pos; + if (__s + __n <= __p) + _M_copy(__p, __s, __n); + else if (__s >= __p) + _M_copy(__p, __s + __n, __n); + else + { + const size_type __nleft = __p - __s; + _M_copy(__p, __s, __nleft); + _M_copy(__p + __nleft, __p + __n, __n - __nleft); + } + return *this; + } + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::iterator + basic_string<_CharT, _Traits, _Alloc>:: + erase(iterator __first, iterator __last) + { + + ; + + + + + const size_type __size = __last - __first; + if (__size) + { + const size_type __pos = __first - _M_ibegin(); + _M_mutate(__pos, __size, size_type(0)); + _M_rep()->_M_set_leaked(); + return iterator(_M_data() + __pos); + } + else + return __first; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + replace(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) + { + ; + _M_check(__pos, "basic_string::replace"); + __n1 = _M_limit(__pos, __n1); + _M_check_length(__n1, __n2, "basic_string::replace"); + bool __left; + if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) + return _M_replace_safe(__pos, __n1, __s, __n2); + else if ((__left = __s + __n2 <= _M_data() + __pos) + || _M_data() + __pos + __n1 <= __s) + { + + size_type __off = __s - _M_data(); + __left ? __off : (__off += __n2 - __n1); + _M_mutate(__pos, __n1, __n2); + _M_copy(_M_data() + __pos, _M_data() + __off, __n2); + return *this; + } + else + { + + const basic_string __tmp(__s, __n2); + return _M_replace_safe(__pos, __n1, __tmp._M_data(), __n2); + } + } + + template + void + basic_string<_CharT, _Traits, _Alloc>::_Rep:: + _M_destroy(const _Alloc& __a) throw () + { + const size_type __size = sizeof(_Rep_base) + + (this->_M_capacity + 1) * sizeof(_CharT); + _Raw_bytes_alloc(__a).deallocate(reinterpret_cast(this), __size); + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_leak_hard() + { + + if (_M_rep() == &_S_empty_rep()) + return; + + if (_M_rep()->_M_is_shared()) + _M_mutate(0, 0, 0); + _M_rep()->_M_set_leaked(); + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_mutate(size_type __pos, size_type __len1, size_type __len2) + { + const size_type __old_size = this->size(); + const size_type __new_size = __old_size + __len2 - __len1; + const size_type __how_much = __old_size - __pos - __len1; + + if (__new_size > this->capacity() || _M_rep()->_M_is_shared()) + { + + const allocator_type __a = get_allocator(); + _Rep* __r = _Rep::_S_create(__new_size, this->capacity(), __a); + + if (__pos) + _M_copy(__r->_M_refdata(), _M_data(), __pos); + if (__how_much) + _M_copy(__r->_M_refdata() + __pos + __len2, + _M_data() + __pos + __len1, __how_much); + + _M_rep()->_M_dispose(__a); + _M_data(__r->_M_refdata()); + } + else if (__how_much && __len1 != __len2) + { + + _M_move(_M_data() + __pos + __len2, + _M_data() + __pos + __len1, __how_much); + } + _M_rep()->_M_set_length_and_sharable(__new_size); + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + reserve(size_type __res) + { + if (__res != this->capacity() || _M_rep()->_M_is_shared()) + { + + if (__res < this->size()) + __res = this->size(); + const allocator_type __a = get_allocator(); + _CharT* __tmp = _M_rep()->_M_clone(__a, __res - this->size()); + _M_rep()->_M_dispose(__a); + _M_data(__tmp); + } + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + swap(basic_string& __s) + { + if (_M_rep()->_M_is_leaked()) + _M_rep()->_M_set_sharable(); + if (__s._M_rep()->_M_is_leaked()) + __s._M_rep()->_M_set_sharable(); + if (this->get_allocator() == __s.get_allocator()) + { + _CharT* __tmp = _M_data(); + _M_data(__s._M_data()); + __s._M_data(__tmp); + } + + else + { + const basic_string __tmp1(_M_ibegin(), _M_iend(), + __s.get_allocator()); + const basic_string __tmp2(__s._M_ibegin(), __s._M_iend(), + this->get_allocator()); + *this = __tmp2; + __s = __tmp1; + } + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::_Rep* + basic_string<_CharT, _Traits, _Alloc>::_Rep:: + _S_create(size_type __capacity, size_type __old_capacity, + const _Alloc& __alloc) + { + + + if (__capacity > _S_max_size) + __throw_length_error(("basic_string::_S_create")); +# 577 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_string.tcc" 3 + const size_type __pagesize = 4096; + const size_type __malloc_header_size = 4 * sizeof(void*); + + + + + + + + if (__capacity > __old_capacity && __capacity < 2 * __old_capacity) + __capacity = 2 * __old_capacity; + + + + + size_type __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); + + const size_type __adj_size = __size + __malloc_header_size; + if (__adj_size > __pagesize && __capacity > __old_capacity) + { + const size_type __extra = __pagesize - __adj_size % __pagesize; + __capacity += __extra / sizeof(_CharT); + + if (__capacity > _S_max_size) + __capacity = _S_max_size; + __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); + } + + + + void* __place = _Raw_bytes_alloc(__alloc).allocate(__size); + _Rep *__p = new (__place) _Rep; + __p->_M_capacity = __capacity; + + + + + + + + __p->_M_set_sharable(); + return __p; + } + + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>::_Rep:: + _M_clone(const _Alloc& __alloc, size_type __res) + { + + const size_type __requested_cap = this->_M_length + __res; + _Rep* __r = _Rep::_S_create(__requested_cap, this->_M_capacity, + __alloc); + if (this->_M_length) + _M_copy(__r->_M_refdata(), _M_refdata(), this->_M_length); + + __r->_M_set_length_and_sharable(this->_M_length); + return __r->_M_refdata(); + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + resize(size_type __n, _CharT __c) + { + const size_type __size = this->size(); + _M_check_length(__size, __n, "basic_string::resize"); + if (__size < __n) + this->append(__n - __size, __c); + else if (__n < __size) + this->erase(__n); + + } + + template + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, + _InputIterator __k2, __false_type) + { + const basic_string __s(__k1, __k2); + const size_type __n1 = __i2 - __i1; + _M_check_length(__n1, __s.size(), "basic_string::_M_replace_dispatch"); + return _M_replace_safe(__i1 - _M_ibegin(), __n1, __s._M_data(), + __s.size()); + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, + _CharT __c) + { + _M_check_length(__n1, __n2, "basic_string::_M_replace_aux"); + _M_mutate(__pos1, __n1, __n2); + if (__n2) + _M_assign(_M_data() + __pos1, __n2, __c); + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, + size_type __n2) + { + _M_mutate(__pos1, __n1, __n2); + if (__n2) + _M_copy(_M_data() + __pos1, __s, __n2); + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc> + operator+(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + ; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + const __size_type __len = _Traits::length(__lhs); + __string_type __str; + __str.reserve(__len + __rhs.size()); + __str.append(__lhs, __len); + __str.append(__rhs); + return __str; + } + + template + basic_string<_CharT, _Traits, _Alloc> + operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + __string_type __str; + const __size_type __len = __rhs.size(); + __str.reserve(__len + 1); + __str.append(__size_type(1), __lhs); + __str.append(__rhs); + return __str; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + copy(_CharT* __s, size_type __n, size_type __pos) const + { + _M_check(__pos, "basic_string::copy"); + __n = _M_limit(__pos, __n); + ; + if (__n) + _M_copy(__s, _M_data() + __pos, __n); + + return __n; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + const size_type __size = this->size(); + const _CharT* __data = _M_data(); + + if (__n == 0) + return __pos <= __size ? __pos : npos; + + if (__n <= __size) + { + for (; __pos <= __size - __n; ++__pos) + if (traits_type::eq(__data[__pos], __s[0]) + && traits_type::compare(__data + __pos + 1, + __s + 1, __n - 1) == 0) + return __pos; + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find(_CharT __c, size_type __pos) const + { + size_type __ret = npos; + const size_type __size = this->size(); + if (__pos < __size) + { + const _CharT* __data = _M_data(); + const size_type __n = __size - __pos; + const _CharT* __p = traits_type::find(__data + __pos, __n, __c); + if (__p) + __ret = __p - __data; + } + return __ret; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + rfind(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + const size_type __size = this->size(); + if (__n <= __size) + { + __pos = std::min(size_type(__size - __n), __pos); + const _CharT* __data = _M_data(); + do + { + if (traits_type::compare(__data + __pos, __s, __n) == 0) + return __pos; + } + while (__pos-- > 0); + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + rfind(_CharT __c, size_type __pos) const + { + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + for (++__size; __size-- > 0; ) + if (traits_type::eq(_M_data()[__size], __c)) + return __size; + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_of(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + for (; __n && __pos < this->size(); ++__pos) + { + const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]); + if (__p) + return __pos; + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_of(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + size_type __size = this->size(); + if (__size && __n) + { + if (--__size > __pos) + __size = __pos; + do + { + if (traits_type::find(__s, __n, _M_data()[__size])) + return __size; + } + while (__size-- != 0); + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + for (; __pos < this->size(); ++__pos) + if (!traits_type::find(__s, __n, _M_data()[__pos])) + return __pos; + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_not_of(_CharT __c, size_type __pos) const + { + for (; __pos < this->size(); ++__pos) + if (!traits_type::eq(_M_data()[__pos], __c)) + return __pos; + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + do + { + if (!traits_type::find(__s, __n, _M_data()[__size])) + return __size; + } + while (__size--); + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_not_of(_CharT __c, size_type __pos) const + { + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + do + { + if (!traits_type::eq(_M_data()[__size], __c)) + return __size; + } + while (__size--); + } + return npos; + } + + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n, const basic_string& __str) const + { + _M_check(__pos, "basic_string::compare"); + __n = _M_limit(__pos, __n); + const size_type __osize = __str.size(); + const size_type __len = std::min(__n, __osize); + int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len); + if (!__r) + __r = _S_compare(__n, __osize); + return __r; + } + + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2) const + { + _M_check(__pos1, "basic_string::compare"); + __str._M_check(__pos2, "basic_string::compare"); + __n1 = _M_limit(__pos1, __n1); + __n2 = __str._M_limit(__pos2, __n2); + const size_type __len = std::min(__n1, __n2); + int __r = traits_type::compare(_M_data() + __pos1, + __str.data() + __pos2, __len); + if (!__r) + __r = _S_compare(__n1, __n2); + return __r; + } + + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(const _CharT* __s) const + { + ; + const size_type __size = this->size(); + const size_type __osize = traits_type::length(__s); + const size_type __len = std::min(__size, __osize); + int __r = traits_type::compare(_M_data(), __s, __len); + if (!__r) + __r = _S_compare(__size, __osize); + return __r; + } + + template + int + basic_string <_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n1, const _CharT* __s) const + { + ; + _M_check(__pos, "basic_string::compare"); + __n1 = _M_limit(__pos, __n1); + const size_type __osize = traits_type::length(__s); + const size_type __len = std::min(__n1, __osize); + int __r = traits_type::compare(_M_data() + __pos, __s, __len); + if (!__r) + __r = _S_compare(__n1, __osize); + return __r; + } + + template + int + basic_string <_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) const + { + ; + _M_check(__pos, "basic_string::compare"); + __n1 = _M_limit(__pos, __n1); + const size_type __len = std::min(__n1, __n2); + int __r = traits_type::compare(_M_data() + __pos, __s, __len); + if (!__r) + __r = _S_compare(__n1, __n2); + return __r; + } + + + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, + basic_string<_CharT, _Traits, _Alloc>& __str) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __istream_type::ios_base __ios_base; + typedef typename __istream_type::int_type __int_type; + typedef typename __string_type::size_type __size_type; + typedef ctype<_CharT> __ctype_type; + typedef typename __ctype_type::ctype_base __ctype_base; + + __size_type __extracted = 0; + typename __ios_base::iostate __err = __ios_base::goodbit; + typename __istream_type::sentry __cerb(__in, false); + if (__cerb) + { + try + { + + __str.erase(); + _CharT __buf[128]; + __size_type __len = 0; + const streamsize __w = __in.width(); + const __size_type __n = __w > 0 ? static_cast<__size_type>(__w) + : __str.max_size(); + const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); + const __int_type __eof = _Traits::eof(); + __int_type __c = __in.rdbuf()->sgetc(); + + while (__extracted < __n + && !_Traits::eq_int_type(__c, __eof) + && !__ct.is(__ctype_base::space, + _Traits::to_char_type(__c))) + { + if (__len == sizeof(__buf) / sizeof(_CharT)) + { + __str.append(__buf, sizeof(__buf) / sizeof(_CharT)); + __len = 0; + } + __buf[__len++] = _Traits::to_char_type(__c); + ++__extracted; + __c = __in.rdbuf()->snextc(); + } + __str.append(__buf, __len); + + if (_Traits::eq_int_type(__c, __eof)) + __err |= __ios_base::eofbit; + __in.width(0); + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { + + + + __in._M_setstate(__ios_base::badbit); + } + } + + if (!__extracted) + __err |= __ios_base::failbit; + if (__err) + __in.setstate(__err); + return __in; + } + + template + basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __in, + basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __istream_type::ios_base __ios_base; + typedef typename __istream_type::int_type __int_type; + typedef typename __string_type::size_type __size_type; + + __size_type __extracted = 0; + const __size_type __n = __str.max_size(); + typename __ios_base::iostate __err = __ios_base::goodbit; + typename __istream_type::sentry __cerb(__in, true); + if (__cerb) + { + try + { + __str.erase(); + const __int_type __idelim = _Traits::to_int_type(__delim); + const __int_type __eof = _Traits::eof(); + __int_type __c = __in.rdbuf()->sgetc(); + + while (__extracted < __n + && !_Traits::eq_int_type(__c, __eof) + && !_Traits::eq_int_type(__c, __idelim)) + { + __str += _Traits::to_char_type(__c); + ++__extracted; + __c = __in.rdbuf()->snextc(); + } + + if (_Traits::eq_int_type(__c, __eof)) + __err |= __ios_base::eofbit; + else if (_Traits::eq_int_type(__c, __idelim)) + { + ++__extracted; + __in.rdbuf()->sbumpc(); + } + else + __err |= __ios_base::failbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { + + + + __in._M_setstate(__ios_base::badbit); + } + } + if (!__extracted) + __err |= __ios_base::failbit; + if (__err) + __in.setstate(__err); + return __in; + } + + + + + + extern template class basic_string; + extern template + basic_istream& + operator>>(basic_istream&, string&); + extern template + basic_ostream& + operator<<(basic_ostream&, const string&); + extern template + basic_istream& + getline(basic_istream&, string&, char); + extern template + basic_istream& + getline(basic_istream&, string&); + + + extern template class basic_string; + extern template + basic_istream& + operator>>(basic_istream&, wstring&); + extern template + basic_ostream& + operator<<(basic_ostream&, const wstring&); + extern template + basic_istream& + getline(basic_istream&, wstring&, wchar_t); + extern template + basic_istream& + getline(basic_istream&, wstring&); + + + +} +# 57 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/string" 2 3 +# 61 "/usr/include/qt4/QtCore/qstring.h" 2 + + + + +typedef std::basic_string QStdWString; +# 76 "/usr/include/qt4/QtCore/qstring.h" + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +class QCharRef; +class QRegExp; +class QStringList; +class QTextCodec; +class QLatin1String; +class QStringRef; +template class QVector; + +class QString +{ +public: + inline QString(); + QString(const QChar *unicode, int size); + QString(QChar c); + QString(int size, QChar c); + inline QString(const QLatin1String &latin1); + inline QString(const QString &); + inline ~QString(); + QString &operator=(QChar c); + QString &operator=(const QString &); + inline QString &operator=(const QLatin1String &); + + inline int size() const { return d->size; } + inline int count() const { return d->size; } + inline int length() const; + inline bool isEmpty() const; + void resize(int size); + + QString &fill(QChar c, int size = -1); + void truncate(int pos); + void chop(int n); + + int capacity() const; + inline void reserve(int size); + inline void squeeze() { if (d->size < d->alloc || d->ref != 1) realloc(); d->capacity = 0;} + + inline const QChar *unicode() const; + inline QChar *data(); + inline const QChar *data() const; + inline const QChar *constData() const; + + inline void detach(); + inline bool isDetached() const; + void clear(); + + inline const QChar at(int i) const; + const QChar operator[](int i) const; + QCharRef operator[](int i); + const QChar operator[](uint i) const; + QCharRef operator[](uint i); + + QString arg(qlonglong a, int fieldwidth=0, int base=10, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(qulonglong a, int fieldwidth=0, int base=10, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(long a, int fieldwidth=0, int base=10, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(ulong a, int fieldwidth=0, int base=10, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(int a, int fieldWidth = 0, int base = 10, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(uint a, int fieldWidth = 0, int base = 10, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(short a, int fieldWidth = 0, int base = 10, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(ushort a, int fieldWidth = 0, int base = 10, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(double a, int fieldWidth = 0, char fmt = 'g', int prec = -1, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(char a, int fieldWidth = 0, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(QChar a, int fieldWidth = 0, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a, int fieldWidth = 0, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a1, const QString &a2) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a1, const QString &a2, const QString &a3) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5, const QString &a6) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5, const QString &a6, + const QString &a7) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5, const QString &a6, + const QString &a7, const QString &a8) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5, const QString &a6, + const QString &a7, const QString &a8, const QString &a9) const __attribute__ ((warn_unused_result)); + + QString &vsprintf(const char *format, va_list ap) + + __attribute__ ((format (printf, 2, 0))) + + ; + QString &sprintf(const char *format, ...) + + __attribute__ ((format (printf, 2, 3))) + + ; + + int indexOf(QChar c, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int indexOf(const QString &s, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int indexOf(const QLatin1String &s, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int lastIndexOf(QChar c, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int lastIndexOf(const QString &s, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int lastIndexOf(const QLatin1String &s, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + + inline QBool contains(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + inline QBool contains(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int count(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int count(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + + + int indexOf(const QRegExp &, int from = 0) const; + int lastIndexOf(const QRegExp &, int from = -1) const; + inline QBool contains(const QRegExp &rx) const { return QBool(indexOf(rx) != -1); } + int count(const QRegExp &) const; + + int indexOf(QRegExp &, int from = 0) const; + int lastIndexOf(QRegExp &, int from = -1) const; + inline QBool contains(QRegExp &rx) const { return QBool(indexOf(rx) != -1); } + + + enum SectionFlag { + SectionDefault = 0x00, + SectionSkipEmpty = 0x01, + SectionIncludeLeadingSep = 0x02, + SectionIncludeTrailingSep = 0x04, + SectionCaseInsensitiveSeps = 0x08 + }; + typedef QFlags SectionFlags; + + QString section(QChar sep, int start, int end = -1, SectionFlags flags = SectionDefault) const; + QString section(const QString &in_sep, int start, int end = -1, SectionFlags flags = SectionDefault) const; + + QString section(const QRegExp ®, int start, int end = -1, SectionFlags flags = SectionDefault) const; + + + QString left(int n) const __attribute__ ((warn_unused_result)); + QString right(int n) const __attribute__ ((warn_unused_result)); + QString mid(int position, int n = -1) const __attribute__ ((warn_unused_result)); + QStringRef leftRef(int n) const __attribute__ ((warn_unused_result)); + QStringRef rightRef(int n) const __attribute__ ((warn_unused_result)); + QStringRef midRef(int position, int n = -1) const __attribute__ ((warn_unused_result)); + + bool startsWith(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool startsWith(const QLatin1String &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool startsWith(const QChar &c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool endsWith(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool endsWith(const QLatin1String &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool endsWith(const QChar &c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + + QString leftJustified(int width, QChar fill = QLatin1Char(' '), bool trunc = false) const __attribute__ ((warn_unused_result)); + QString rightJustified(int width, QChar fill = QLatin1Char(' '), bool trunc = false) const __attribute__ ((warn_unused_result)); + + QString toLower() const __attribute__ ((warn_unused_result)); + QString toUpper() const __attribute__ ((warn_unused_result)); + QString toCaseFolded() const __attribute__ ((warn_unused_result)); + + QString trimmed() const __attribute__ ((warn_unused_result)); + QString simplified() const __attribute__ ((warn_unused_result)); + + QString &insert(int i, QChar c); + QString &insert(int i, const QChar *uc, int len); + inline QString &insert(int i, const QString &s) { return insert(i, s.constData(), s.length()); } + QString &insert(int i, const QLatin1String &s); + QString &append(QChar c); + QString &append(const QString &s); + QString &append(const QStringRef &s); + QString &append(const QLatin1String &s); + inline QString &prepend(QChar c) { return insert(0, c); } + inline QString &prepend(const QString &s) { return insert(0, s); } + inline QString &prepend(const QLatin1String &s) { return insert(0, s); } + + inline QString &operator+=(QChar c) { + if (d->ref != 1 || d->size + 1 > d->alloc) + realloc(grow(d->size + 1)); + d->data[d->size++] = c.unicode(); + d->data[d->size] = '\0'; + return *this; + } + + inline QString &operator+=(QChar::SpecialCharacter c) { return append(QChar(c)); } + inline QString &operator+=(const QString &s) { return append(s); } + inline QString &operator+=(const QStringRef &s) { return append(s); } + inline QString &operator+=(const QLatin1String &s) { return append(s); } + + QString &remove(int i, int len); + QString &remove(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &remove(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(int i, int len, QChar after); + QString &replace(int i, int len, const QChar *s, int slen); + QString &replace(int i, int len, const QString &after); + QString &replace(QChar before, QChar after, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(const QChar *before, int blen, const QChar *after, int alen, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(const QLatin1String &before, const QLatin1String &after, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(const QLatin1String &before, const QString &after, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(const QString &before, const QLatin1String &after, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(const QString &before, const QString &after, + Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(QChar c, const QString &after, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(QChar c, const QLatin1String &after, Qt::CaseSensitivity cs = Qt::CaseSensitive); + + QString &replace(const QRegExp &rx, const QString &after); + inline QString &remove(const QRegExp &rx) + { return replace(rx, QString()); } + + + enum SplitBehavior { KeepEmptyParts, SkipEmptyParts }; + + QStringList split(const QString &sep, SplitBehavior behavior = KeepEmptyParts, + Qt::CaseSensitivity cs = Qt::CaseSensitive) const __attribute__ ((warn_unused_result)); + QStringList split(const QChar &sep, SplitBehavior behavior = KeepEmptyParts, + Qt::CaseSensitivity cs = Qt::CaseSensitive) const __attribute__ ((warn_unused_result)); + + QStringList split(const QRegExp &sep, SplitBehavior behavior = KeepEmptyParts) const __attribute__ ((warn_unused_result)); + + + enum NormalizationForm { + NormalizationForm_D, + NormalizationForm_C, + NormalizationForm_KD, + NormalizationForm_KC + }; + QString normalized(NormalizationForm mode) const __attribute__ ((warn_unused_result)); + QString normalized(NormalizationForm mode, QChar::UnicodeVersion version) const __attribute__ ((warn_unused_result)); + + QString repeated(int times) const; + + const ushort *utf16() const; + + QByteArray toAscii() const __attribute__ ((warn_unused_result)); + QByteArray toLatin1() const __attribute__ ((warn_unused_result)); + QByteArray toUtf8() const __attribute__ ((warn_unused_result)); + QByteArray toLocal8Bit() const __attribute__ ((warn_unused_result)); + QVector toUcs4() const __attribute__ ((warn_unused_result)); + + static QString fromAscii(const char *, int size = -1); + static QString fromLatin1(const char *, int size = -1); + static QString fromUtf8(const char *, int size = -1); + static QString fromLocal8Bit(const char *, int size = -1); + static QString fromUtf16(const ushort *, int size = -1); + static QString fromUcs4(const uint *, int size = -1); + static QString fromRawData(const QChar *, int size); + + int toWCharArray(wchar_t *array) const; + static QString fromWCharArray(const wchar_t *, int size = -1); + + QString &setUnicode(const QChar *unicode, int size); + inline QString &setUtf16(const ushort *utf16, int size); + + + int compare(const QString &s) const; + int compare(const QString &s, Qt::CaseSensitivity cs) const; + + int compare(const QLatin1String &other, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + + + static inline int compare(const QString &s1, const QString &s2) + { return s1.compare(s2); } + static inline int compare(const QString &s1, const QString &s2, Qt::CaseSensitivity cs) + { return s1.compare(s2, cs); } + + static inline int compare(const QString& s1, const QLatin1String &s2, + Qt::CaseSensitivity cs = Qt::CaseSensitive) + { return s1.compare(s2, cs); } + static inline int compare(const QLatin1String& s1, const QString &s2, + Qt::CaseSensitivity cs = Qt::CaseSensitive) + { return -s2.compare(s1, cs); } + + int compare(const QStringRef &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + static int compare(const QString &s1, const QStringRef &s2, + Qt::CaseSensitivity = Qt::CaseSensitive); + + int localeAwareCompare(const QString& s) const; + static int localeAwareCompare(const QString& s1, const QString& s2) + { return s1.localeAwareCompare(s2); } + + int localeAwareCompare(const QStringRef &s) const; + static int localeAwareCompare(const QString& s1, const QStringRef& s2); + + short toShort(bool *ok=0, int base=10) const; + ushort toUShort(bool *ok=0, int base=10) const; + int toInt(bool *ok=0, int base=10) const; + uint toUInt(bool *ok=0, int base=10) const; + long toLong(bool *ok=0, int base=10) const; + ulong toULong(bool *ok=0, int base=10) const; + qlonglong toLongLong(bool *ok=0, int base=10) const; + qulonglong toULongLong(bool *ok=0, int base=10) const; + float toFloat(bool *ok=0) const; + double toDouble(bool *ok=0) const; + + QString &setNum(short, int base=10); + QString &setNum(ushort, int base=10); + QString &setNum(int, int base=10); + QString &setNum(uint, int base=10); + QString &setNum(long, int base=10); + QString &setNum(ulong, int base=10); + QString &setNum(qlonglong, int base=10); + QString &setNum(qulonglong, int base=10); + QString &setNum(float, char f='g', int prec=6); + QString &setNum(double, char f='g', int prec=6); + + static QString number(int, int base=10); + static QString number(uint, int base=10); + static QString number(long, int base=10); + static QString number(ulong, int base=10); + static QString number(qlonglong, int base=10); + static QString number(qulonglong, int base=10); + static QString number(double, char f='g', int prec=6); + + bool operator==(const QString &s) const; + bool operator<(const QString &s) const; + inline bool operator>(const QString &s) const { return s < *this; } + inline bool operator!=(const QString &s) const { return !operator==(s); } + inline bool operator<=(const QString &s) const { return !operator>(s); } + inline bool operator>=(const QString &s) const { return !operator<(s); } + + bool operator==(const QLatin1String &s) const; + bool operator<(const QLatin1String &s) const; + bool operator>(const QLatin1String &s) const; + inline bool operator!=(const QLatin1String &s) const { return !operator==(s); } + inline bool operator<=(const QLatin1String &s) const { return !operator>(s); } + inline bool operator>=(const QLatin1String &s) const { return !operator<(s); } + + + + inline QString(const char *ch) : d(fromAscii_helper(ch)) + {} + inline QString(const QByteArray &a) + : d(fromAscii_helper(a.constData(), qstrnlen(a.constData(), a.size()))) + {} + inline QString &operator=(const char *ch) + { return (*this = fromAscii(ch)); } + inline QString &operator=(const QByteArray &a) + { return (*this = fromAscii(a.constData(), qstrnlen(a.constData(), a.size()))); } + inline QString &operator=(char c) + { return (*this = QChar::fromAscii(c)); } + + + inline QString &prepend(const char *s) + { return prepend(QString::fromAscii(s)); } + inline QString &prepend(const QByteArray &s) + { return prepend(QString::fromAscii(s.constData(), qstrnlen(s.constData(), s.size()))); } + inline QString &append(const char *s) + { return append(QString::fromAscii(s)); } + inline QString &append(const QByteArray &s) + { return append(QString::fromAscii(s.constData(), qstrnlen(s.constData(), s.size()))); } + inline QString &operator+=(const char *s) + { return append(QString::fromAscii(s)); } + inline QString &operator+=(const QByteArray &s) + { return append(QString::fromAscii(s.constData(), qstrnlen(s.constData(), s.size()))); } + inline QString &operator+=(char c) + { return append(QChar::fromAscii(c)); } + + inline bool operator==(const char *s) const; + inline bool operator!=(const char *s) const; + inline bool operator<(const char *s) const; + inline bool operator<=(const char *s2) const; + inline bool operator>(const char *s2) const; + inline bool operator>=(const char *s2) const; + + inline bool operator==(const QByteArray &s) const; + inline bool operator!=(const QByteArray &s) const; + inline bool operator<(const QByteArray &s) const + { return *this < QString::fromAscii(s.constData(), s.size()); } + inline bool operator>(const QByteArray &s) const + { return *this > QString::fromAscii(s.constData(), s.size()); } + inline bool operator<=(const QByteArray &s) const + { return *this <= QString::fromAscii(s.constData(), s.size()); } + inline bool operator>=(const QByteArray &s) const + { return *this >= QString::fromAscii(s.constData(), s.size()); } + + + typedef QChar *iterator; + typedef const QChar *const_iterator; + typedef iterator Iterator; + typedef const_iterator ConstIterator; + iterator begin(); + const_iterator begin() const; + const_iterator constBegin() const; + iterator end(); + const_iterator end() const; + const_iterator constEnd() const; + + + inline void push_back(QChar c) { append(c); } + inline void push_back(const QString &s) { append(s); } + inline void push_front(QChar c) { prepend(c); } + inline void push_front(const QString &s) { prepend(s); } + + + static inline QString fromStdString(const std::string &s); + inline std::string toStdString() const; + + + + + + static inline QString fromStdWString(const QStdWString &s); + inline QStdWString toStdWString() const; + + + + + + struct Null { }; + static const Null null; + inline QString(const Null &): d(&shared_null) { d->ref.ref(); } + inline QString &operator=(const Null &) { *this = QString(); return *this; } + inline bool isNull() const { return d == &shared_null; } +# 579 "/usr/include/qt4/QtCore/qstring.h" + bool isSimpleText() const { if (!d->clean) updateProperties(); return d->simpletext; } + bool isRightToLeft() const { if (!d->clean) updateProperties(); return d->righttoleft; } + + QString(int size, Qt::Initialization); + +private: +# 594 "/usr/include/qt4/QtCore/qstring.h" + struct Data { + QBasicAtomicInt ref; + int alloc, size; + ushort *data; + ushort clean : 1; + ushort simpletext : 1; + ushort righttoleft : 1; + ushort asciiCache : 1; + ushort capacity : 1; + ushort reserved : 11; + ushort array[1]; + }; + static Data shared_null; + static Data shared_empty; + Data *d; + QString(Data *dd, int ) : d(dd) {} + + static QTextCodec *codecForCStrings; + + static int grow(int); + static void free(Data *); + void realloc(); + void realloc(int alloc); + void expand(int i); + void updateProperties() const; + QString multiArg(int numArgs, const QString **args) const; + static int compare_helper(const QChar *data1, int length1, + const QChar *data2, int length2, + Qt::CaseSensitivity cs = Qt::CaseSensitive); + static int compare_helper(const QChar *data1, int length1, + QLatin1String s2, + Qt::CaseSensitivity cs = Qt::CaseSensitive); + static int localeAwareCompare_helper(const QChar *data1, int length1, + const QChar *data2, int length2); + static Data *fromLatin1_helper(const char *str, int size = -1); + static Data *fromAscii_helper(const char *str, int size = -1); + void replace_helper(uint *indices, int nIndices, int blen, const QChar *after, int alen); + friend class QCharRef; + friend class QTextCodec; + friend class QStringRef; + friend struct QAbstractConcatenable; + friend inline bool qStringComparisonHelper(const QString &s1, const char *s2); + friend inline bool qStringComparisonHelper(const QStringRef &s1, const char *s2); +public: + typedef Data * DataPtr; + inline DataPtr &data_ptr() { return d; } +}; + + +class QLatin1String +{ +public: + inline explicit QLatin1String(const char *s) : chars(s) {} + inline QLatin1String &operator=(const QLatin1String &other) + { chars = other.chars; return *this; } + + inline const char *latin1() const { return chars; } + + inline bool operator==(const QString &s) const + { return s == *this; } + inline bool operator!=(const QString &s) const + { return s != *this; } + inline bool operator>(const QString &s) const + { return s < *this; } + inline bool operator<(const QString &s) const + { return s > *this; } + inline bool operator>=(const QString &s) const + { return s <= *this; } + inline bool operator<=(const QString &s) const + { return s >= *this; } + + inline bool operator==(const char *s) const + { return QString::fromAscii(s) == *this; } + inline bool operator!=(const char *s) const + { return QString::fromAscii(s) != *this; } + inline bool operator<(const char *s) const + { return QString::fromAscii(s) > *this; } + inline bool operator>(const char *s) const + { return QString::fromAscii(s) < *this; } + inline bool operator<=(const char *s) const + { return QString::fromAscii(s) >= *this; } + inline bool operator>=(const char *s) const + { return QString::fromAscii(s) <= *this; } +private: + const char *chars; +}; + + + +inline QString::QString(const QLatin1String &aLatin1) : d(fromLatin1_helper(aLatin1.latin1())) +{ } +inline int QString::length() const +{ return d->size; } +inline const QChar QString::at(int i) const +{ ((!(i >= 0 && i < size())) ? qt_assert("i >= 0 && i < size()","/usr/include/qt4/QtCore/qstring.h",688) : qt_noop()); return d->data[i]; } +inline const QChar QString::operator[](int i) const +{ ((!(i >= 0 && i < size())) ? qt_assert("i >= 0 && i < size()","/usr/include/qt4/QtCore/qstring.h",690) : qt_noop()); return d->data[i]; } +inline const QChar QString::operator[](uint i) const +{ ((!(i < uint(size()))) ? qt_assert("i < uint(size())","/usr/include/qt4/QtCore/qstring.h",692) : qt_noop()); return d->data[i]; } +inline bool QString::isEmpty() const +{ return d->size == 0; } +inline const QChar *QString::unicode() const +{ return reinterpret_cast(d->data); } +inline const QChar *QString::data() const +{ return reinterpret_cast(d->data); } +inline QChar *QString::data() +{ detach(); return reinterpret_cast(d->data); } +inline const QChar *QString::constData() const +{ return reinterpret_cast(d->data); } +inline void QString::detach() +{ if (d->ref != 1 || d->data != d->array) realloc(); } +inline bool QString::isDetached() const +{ return d->ref == 1; } +inline QString &QString::operator=(const QLatin1String &s) +{ + *this = fromLatin1(s.latin1()); + return *this; +} +inline void QString::clear() +{ if (!isNull()) *this = QString(); } +inline QString::QString(const QString &other) : d(other.d) +{ ((!(&other != this)) ? qt_assert("&other != this","/usr/include/qt4/QtCore/qstring.h",715) : qt_noop()); d->ref.ref(); } +inline int QString::capacity() const +{ return d->alloc; } +inline QString &QString::setNum(short n, int base) +{ return setNum(qlonglong(n), base); } +inline QString &QString::setNum(ushort n, int base) +{ return setNum(qulonglong(n), base); } +inline QString &QString::setNum(int n, int base) +{ return setNum(qlonglong(n), base); } +inline QString &QString::setNum(uint n, int base) +{ return setNum(qulonglong(n), base); } +inline QString &QString::setNum(long n, int base) +{ return setNum(qlonglong(n), base); } +inline QString &QString::setNum(ulong n, int base) +{ return setNum(qulonglong(n), base); } +inline QString &QString::setNum(float n, char f, int prec) +{ return setNum(double(n),f,prec); } +inline QString QString::arg(int a, int fieldWidth, int base, const QChar &fillChar) const +{ return arg(qlonglong(a), fieldWidth, base, fillChar); } +inline QString QString::arg(uint a, int fieldWidth, int base, const QChar &fillChar) const +{ return arg(qulonglong(a), fieldWidth, base, fillChar); } +inline QString QString::arg(long a, int fieldWidth, int base, const QChar &fillChar) const +{ return arg(qlonglong(a), fieldWidth, base, fillChar); } +inline QString QString::arg(ulong a, int fieldWidth, int base, const QChar &fillChar) const +{ return arg(qulonglong(a), fieldWidth, base, fillChar); } +inline QString QString::arg(short a, int fieldWidth, int base, const QChar &fillChar) const +{ return arg(qlonglong(a), fieldWidth, base, fillChar); } +inline QString QString::arg(ushort a, int fieldWidth, int base, const QChar &fillChar) const +{ return arg(qulonglong(a), fieldWidth, base, fillChar); } +inline QString QString::arg(const QString &a1, const QString &a2) const +{ const QString *args[2] = { &a1, &a2 }; return multiArg(2, args); } +inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3) const +{ const QString *args[3] = { &a1, &a2, &a3 }; return multiArg(3, args); } +inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4) const +{ const QString *args[4] = { &a1, &a2, &a3, &a4 }; return multiArg(4, args); } +inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5) const +{ const QString *args[5] = { &a1, &a2, &a3, &a4, &a5 }; return multiArg(5, args); } +inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5, const QString &a6) const +{ const QString *args[6] = { &a1, &a2, &a3, &a4, &a5, &a6 }; return multiArg(6, args); } +inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5, const QString &a6, + const QString &a7) const +{ const QString *args[7] = { &a1, &a2, &a3, &a4, &a5, &a6, &a7 }; return multiArg(7, args); } +inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5, const QString &a6, + const QString &a7, const QString &a8) const +{ const QString *args[8] = { &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8 }; return multiArg(8, args); } +inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5, const QString &a6, + const QString &a7, const QString &a8, const QString &a9) const +{ const QString *args[9] = { &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8, &a9 }; return multiArg(9, args); } + +inline QString QString::section(QChar asep, int astart, int aend, SectionFlags aflags) const +{ return section(QString(asep), astart, aend, aflags); } + + +class QCharRef { + QString &s; + int i; + inline QCharRef(QString &str, int idx) + : s(str),i(idx) {} + friend class QString; +public: + + + + + inline operator QChar() const + { return i < s.d->size ? s.d->data[i] : 0; } + inline QCharRef &operator=(const QChar &c) + { if (i >= s.d->size) s.expand(i); else s.detach(); + s.d->data[i] = c.unicode(); return *this; } + + + + inline QCharRef &operator=(char c) + { return operator=(QChar::fromAscii(c)); } + inline QCharRef &operator=(uchar c) + { return operator=(QChar::fromAscii(c)); } + + inline QCharRef &operator=(const QCharRef &c) { return operator=(QChar(c)); } + inline QCharRef &operator=(ushort rc) { return operator=(QChar(rc)); } + inline QCharRef &operator=(short rc) { return operator=(QChar(rc)); } + inline QCharRef &operator=(uint rc) { return operator=(QChar(rc)); } + inline QCharRef &operator=(int rc) { return operator=(QChar(rc)); } + + + inline bool isNull() const { return QChar(*this).isNull(); } + inline bool isPrint() const { return QChar(*this).isPrint(); } + inline bool isPunct() const { return QChar(*this).isPunct(); } + inline bool isSpace() const { return QChar(*this).isSpace(); } + inline bool isMark() const { return QChar(*this).isMark(); } + inline bool isLetter() const { return QChar(*this).isLetter(); } + inline bool isNumber() const { return QChar(*this).isNumber(); } + inline bool isLetterOrNumber() { return QChar(*this).isLetterOrNumber(); } + inline bool isDigit() const { return QChar(*this).isDigit(); } + inline bool isLower() const { return QChar(*this).isLower(); } + inline bool isUpper() const { return QChar(*this).isUpper(); } + inline bool isTitleCase() const { return QChar(*this).isTitleCase(); } + + inline int digitValue() const { return QChar(*this).digitValue(); } + QChar toLower() const { return QChar(*this).toLower(); } + QChar toUpper() const { return QChar(*this).toUpper(); } + QChar toTitleCase () const { return QChar(*this).toTitleCase(); } + + QChar::Category category() const { return QChar(*this).category(); } + QChar::Direction direction() const { return QChar(*this).direction(); } + QChar::Joining joining() const { return QChar(*this).joining(); } + bool hasMirrored() const { return QChar(*this).hasMirrored(); } + QChar mirroredChar() const { return QChar(*this).mirroredChar(); } + QString decomposition() const { return QChar(*this).decomposition(); } + QChar::Decomposition decompositionTag() const { return QChar(*this).decompositionTag(); } + uchar combiningClass() const { return QChar(*this).combiningClass(); } + + QChar::UnicodeVersion unicodeVersion() const { return QChar(*this).unicodeVersion(); } + + inline uchar cell() const { return QChar(*this).cell(); } + inline uchar row() const { return QChar(*this).row(); } + inline void setCell(uchar cell); + inline void setRow(uchar row); + + + + + + + char toAscii() const { return QChar(*this).toAscii(); } + char toLatin1() const { return QChar(*this).toLatin1(); } + ushort unicode() const { return QChar(*this).unicode(); } + + ushort& unicode() { return s.data()[i].unicode(); } +# 862 "/usr/include/qt4/QtCore/qstring.h" +}; + +inline void QCharRef::setRow(uchar arow) { QChar(*this).setRow(arow); } +inline void QCharRef::setCell(uchar acell) { QChar(*this).setCell(acell); } + + +inline QString::QString() : d(&shared_null) { d->ref.ref(); } +inline QString::~QString() { if (!d->ref.deref()) free(d); } +inline void QString::reserve(int asize) { if (d->ref != 1 || asize > d->alloc) realloc(asize); d->capacity = 1;} +inline QString &QString::setUtf16(const ushort *autf16, int asize) +{ return setUnicode(reinterpret_cast(autf16), asize); } +inline QCharRef QString::operator[](int i) +{ ((!(i >= 0)) ? qt_assert("i >= 0","/usr/include/qt4/QtCore/qstring.h",874) : qt_noop()); return QCharRef(*this, i); } +inline QCharRef QString::operator[](uint i) +{ return QCharRef(*this, i); } +inline QString::iterator QString::begin() +{ detach(); return reinterpret_cast(d->data); } +inline QString::const_iterator QString::begin() const +{ return reinterpret_cast(d->data); } +inline QString::const_iterator QString::constBegin() const +{ return reinterpret_cast(d->data); } +inline QString::iterator QString::end() +{ detach(); return reinterpret_cast(d->data + d->size); } +inline QString::const_iterator QString::end() const +{ return reinterpret_cast(d->data + d->size); } +inline QString::const_iterator QString::constEnd() const +{ return reinterpret_cast(d->data + d->size); } +inline QBool QString::contains(const QString &s, Qt::CaseSensitivity cs) const +{ return QBool(indexOf(s, 0, cs) != -1); } +inline QBool QString::contains(QChar c, Qt::CaseSensitivity cs) const +{ return QBool(indexOf(c, 0, cs) != -1); } + + +inline bool operator==(QString::Null, QString::Null) { return true; } +inline bool operator==(QString::Null, const QString &s) { return s.isNull(); } +inline bool operator==(const QString &s, QString::Null) { return s.isNull(); } +inline bool operator!=(QString::Null, QString::Null) { return false; } +inline bool operator!=(QString::Null, const QString &s) { return !s.isNull(); } +inline bool operator!=(const QString &s, QString::Null) { return !s.isNull(); } + + +inline bool qStringComparisonHelper(const QString &s1, const char *s2) +{ + + if (QString::codecForCStrings) return (s1 == QString::fromAscii(s2)); + + return (s1 == QLatin1String(s2)); +} +inline bool QString::operator==(const char *s) const +{ return qStringComparisonHelper(*this, s); } +inline bool QString::operator!=(const char *s) const +{ return !qStringComparisonHelper(*this, s); } +inline bool QString::operator<(const char *s) const +{ return *this < QString::fromAscii(s); } +inline bool QString::operator>(const char *s) const +{ return *this > QString::fromAscii(s); } +inline bool QString::operator<=(const char *s) const +{ return *this <= QString::fromAscii(s); } +inline bool QString::operator>=(const char *s) const +{ return *this >= QString::fromAscii(s); } + +inline bool operator==(const char *s1, const QString &s2) +{ return qStringComparisonHelper(s2, s1); } +inline bool operator!=(const char *s1, const QString &s2) +{ return !qStringComparisonHelper(s2, s1); } +inline bool operator<(const char *s1, const QString &s2) +{ return (QString::fromAscii(s1) < s2); } +inline bool operator>(const char *s1, const QString &s2) +{ return (QString::fromAscii(s1) > s2); } +inline bool operator<=(const char *s1, const QString &s2) +{ return (QString::fromAscii(s1) <= s2); } +inline bool operator>=(const char *s1, const QString &s2) +{ return (QString::fromAscii(s1) >= s2); } + +inline bool operator==(const char *s1, const QLatin1String &s2) +{ return QString::fromAscii(s1) == s2; } +inline bool operator!=(const char *s1, const QLatin1String &s2) +{ return QString::fromAscii(s1) != s2; } +inline bool operator<(const char *s1, const QLatin1String &s2) +{ return (QString::fromAscii(s1) < s2); } +inline bool operator>(const char *s1, const QLatin1String &s2) +{ return (QString::fromAscii(s1) > s2); } +inline bool operator<=(const char *s1, const QLatin1String &s2) +{ return (QString::fromAscii(s1) <= s2); } +inline bool operator>=(const char *s1, const QLatin1String &s2) +{ return (QString::fromAscii(s1) >= s2); } + +inline bool operator==(const QLatin1String &s1, const QLatin1String &s2) +{ return (qstrcmp(s1.latin1(), s2.latin1()) == 0); } +inline bool operator!=(const QLatin1String &s1, const QLatin1String &s2) +{ return (qstrcmp(s1.latin1(), s2.latin1()) != 0); } +inline bool operator<(const QLatin1String &s1, const QLatin1String &s2) +{ return (qstrcmp(s1.latin1(), s2.latin1()) < 0); } +inline bool operator<=(const QLatin1String &s1, const QLatin1String &s2) +{ return (qstrcmp(s1.latin1(), s2.latin1()) <= 0); } +inline bool operator>(const QLatin1String &s1, const QLatin1String &s2) +{ return (qstrcmp(s1.latin1(), s2.latin1()) > 0); } +inline bool operator>=(const QLatin1String &s1, const QLatin1String &s2) +{ return (qstrcmp(s1.latin1(), s2.latin1()) >= 0); } + + +inline bool QString::operator==(const QByteArray &s) const +{ return qStringComparisonHelper(*this, s.constData()); } +inline bool QString::operator!=(const QByteArray &s) const +{ return !qStringComparisonHelper(*this, s.constData()); } + +inline bool QByteArray::operator==(const QString &s) const +{ return qStringComparisonHelper(s, constData()); } +inline bool QByteArray::operator!=(const QString &s) const +{ return !qStringComparisonHelper(s, constData()); } +inline bool QByteArray::operator<(const QString &s) const +{ return QString::fromAscii(constData(), size()) < s; } +inline bool QByteArray::operator>(const QString &s) const +{ return QString::fromAscii(constData(), size()) > s; } +inline bool QByteArray::operator<=(const QString &s) const +{ return QString::fromAscii(constData(), size()) <= s; } +inline bool QByteArray::operator>=(const QString &s) const +{ return QString::fromAscii(constData(), size()) >= s; } + + + +inline QByteArray &QByteArray::append(const QString &s) +{ return append(s.toAscii()); } +inline QByteArray &QByteArray::insert(int i, const QString &s) +{ return insert(i, s.toAscii()); } +inline QByteArray &QByteArray::replace(char c, const QString &after) +{ return replace(c, after.toAscii()); } +inline QByteArray &QByteArray::replace(const QString &before, const char *after) +{ return replace(before.toAscii(), after); } +inline QByteArray &QByteArray::replace(const QString &before, const QByteArray &after) +{ return replace(before.toAscii(), after); } +inline QByteArray &QByteArray::operator+=(const QString &s) +{ return operator+=(s.toAscii()); } +inline int QByteArray::indexOf(const QString &s, int from) const +{ return indexOf(s.toAscii(), from); } +inline int QByteArray::lastIndexOf(const QString &s, int from) const +{ return lastIndexOf(s.toAscii(), from); } +# 1009 "/usr/include/qt4/QtCore/qstring.h" +inline const QString operator+(const QString &s1, const QString &s2) +{ QString t(s1); t += s2; return t; } +inline const QString operator+(const QString &s1, QChar s2) +{ QString t(s1); t += s2; return t; } +inline const QString operator+(QChar s1, const QString &s2) +{ QString t(s1); t += s2; return t; } + +inline const QString operator+(const QString &s1, const char *s2) +{ QString t(s1); t += QString::fromAscii(s2); return t; } +inline const QString operator+(const char *s1, const QString &s2) +{ QString t = QString::fromAscii(s1); t += s2; return t; } +inline const QString operator+(char c, const QString &s) +{ QString t = s; t.prepend(QChar::fromAscii(c)); return t; } +inline const QString operator+(const QString &s, char c) +{ QString t = s; t += QChar::fromAscii(c); return t; } +inline const QString operator+(const QByteArray &ba, const QString &s) +{ QString t = QString::fromAscii(ba.constData(), qstrnlen(ba.constData(), ba.size())); t += s; return t; } +inline const QString operator+(const QString &s, const QByteArray &ba) +{ QString t(s); t += QString::fromAscii(ba.constData(), qstrnlen(ba.constData(), ba.size())); return t; } + + + + + +inline std::string QString::toStdString() const +{ const QByteArray asc = toAscii(); return std::string(asc.constData(), asc.length()); } + +inline QString QString::fromStdString(const std::string &s) +{ return fromAscii(s.data(), int(s.size())); } + + +inline QStdWString QString::toStdWString() const +{ + QStdWString str; + str.resize(length()); + + + + + + + + str.resize(toWCharArray(&(*str.begin()))); + return str; +} +inline QString QString::fromStdWString(const QStdWString &s) +{ return fromWCharArray(s.data(), int(s.size())); } +# 1069 "/usr/include/qt4/QtCore/qstring.h" + QDataStream &operator<<(QDataStream &, const QString &); + QDataStream &operator>>(QDataStream &, QString &); +# 1083 "/usr/include/qt4/QtCore/qstring.h" +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QString)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QString"; } }; +template <> inline bool qIsDetached(QString &t) { return t.isDetached(); } template <> inline void qSwap(QString &value1, QString &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } +inline QFlags operator|(QString::SectionFlags::enum_type f1, QString::SectionFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(QString::SectionFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QString::SectionFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +# 1094 "/usr/include/qt4/QtCore/qstring.h" +class QStringRef { + const QString *m_string; + int m_position; + int m_size; +public: + inline QStringRef():m_string(0), m_position(0), m_size(0){} + inline QStringRef(const QString *string, int position, int size); + inline QStringRef(const QString *string); + inline QStringRef(const QStringRef &other) + :m_string(other.m_string), m_position(other.m_position), m_size(other.m_size) + {} + + inline ~QStringRef(){} + inline const QString *string() const { return m_string; } + inline int position() const { return m_position; } + inline int size() const { return m_size; } + inline int count() const { return m_size; } + inline int length() const { return m_size; } + + inline QStringRef &operator=(const QStringRef &other) { + m_string = other.m_string; m_position = other.m_position; + m_size = other.m_size; return *this; + } + + inline QStringRef &operator=(const QString *string); + + inline const QChar *unicode() const { + if (!m_string) + return reinterpret_cast(QString::shared_null.data); + return m_string->unicode() + m_position; + } + inline const QChar *data() const { return unicode(); } + inline const QChar *constData() const { return unicode(); } + + inline void clear() { m_string = 0; m_position = m_size = 0; } + QString toString() const; + inline bool isEmpty() const { return m_size == 0; } + inline bool isNull() const { return m_string == 0 || m_string->isNull(); } + + QStringRef appendTo(QString *string) const; + + inline const QChar at(int i) const + { ((!(i >= 0 && i < size())) ? qt_assert("i >= 0 && i < size()","/usr/include/qt4/QtCore/qstring.h",1136) : qt_noop()); return m_string->at(i + m_position); } + + int compare(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int compare(const QStringRef &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int compare(QLatin1String s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + static int compare(const QStringRef &s1, const QString &s2, + Qt::CaseSensitivity = Qt::CaseSensitive); + static int compare(const QStringRef &s1, const QStringRef &s2, + Qt::CaseSensitivity = Qt::CaseSensitive); + static int compare(const QStringRef &s1, QLatin1String s2, + Qt::CaseSensitivity cs = Qt::CaseSensitive); + + int localeAwareCompare(const QString &s) const; + int localeAwareCompare(const QStringRef &s) const; + static int localeAwareCompare(const QStringRef &s1, const QString &s2); + static int localeAwareCompare(const QStringRef &s1, const QStringRef &s2); +}; + +inline QStringRef &QStringRef::operator=(const QString *aString) +{ m_string = aString; m_position = 0; m_size = aString?aString->size():0; return *this; } + +inline QStringRef::QStringRef(const QString *aString, int aPosition, int aSize) + :m_string(aString), m_position(aPosition), m_size(aSize){} + +inline QStringRef::QStringRef(const QString *aString) + :m_string(aString), m_position(0), m_size(aString?aString->size() : 0){} + + bool operator==(const QStringRef &s1,const QStringRef &s2); +inline bool operator!=(const QStringRef &s1,const QStringRef &s2) +{ return !(s1 == s2); } + bool operator==(const QString &s1,const QStringRef &s2); +inline bool operator!=(const QString &s1,const QStringRef &s2) +{ return !(s1 == s2); } +inline bool operator==(const QStringRef &s1,const QString &s2) +{ return s2 == s1; } +inline bool operator!=(const QStringRef &s1,const QString &s2) +{ return s2 != s1; } + bool operator==(const QLatin1String &s1, const QStringRef &s2); +inline bool operator!=(const QLatin1String &s1,const QStringRef &s2) +{ return !(s1 == s2); } +inline bool operator==(const QStringRef &s1,const QLatin1String &s2) +{ return s2 == s1; } +inline bool operator!=(const QStringRef &s1,const QLatin1String &s2) +{ return s2 != s1; } + + bool operator<(const QStringRef &s1,const QStringRef &s2); +inline bool operator>(const QStringRef &s1, const QStringRef &s2) +{ return s2 < s1; } +inline bool operator<=(const QStringRef &s1, const QStringRef &s2) +{ return !(s1 > s2); } +inline bool operator>=(const QStringRef &s1, const QStringRef &s2) +{ return !(s1 < s2); } + +inline bool qStringComparisonHelper(const QStringRef &s1, const char *s2) +{ + + if (QString::codecForCStrings) return (s1 == QString::fromAscii(s2)); + + return (s1 == QLatin1String(s2)); +} + +inline bool operator==(const char *s1, const QStringRef &s2) +{ return qStringComparisonHelper(s2, s1); } +inline bool operator==(const QStringRef &s1, const char *s2) +{ return qStringComparisonHelper(s1, s2); } +inline bool operator!=(const char *s1, const QStringRef &s2) +{ return !qStringComparisonHelper(s2, s1); } +inline bool operator!=(const QStringRef &s1, const char *s2) +{ return !qStringComparisonHelper(s1, s2); } + +inline int QString::compare(const QStringRef &s, Qt::CaseSensitivity cs) const +{ return QString::compare_helper(constData(), length(), s.constData(), s.length(), cs); } +inline int QString::compare(const QString &s1, const QStringRef &s2, Qt::CaseSensitivity cs) +{ return QString::compare_helper(s1.constData(), s1.length(), s2.constData(), s2.length(), cs); } +inline int QStringRef::compare(const QString &s, Qt::CaseSensitivity cs) const +{ return QString::compare_helper(constData(), length(), s.constData(), s.length(), cs); } +inline int QStringRef::compare(const QStringRef &s, Qt::CaseSensitivity cs) const +{ return QString::compare_helper(constData(), length(), s.constData(), s.length(), cs); } +inline int QStringRef::compare(QLatin1String s, Qt::CaseSensitivity cs) const +{ return QString::compare_helper(constData(), length(), s, cs); } +inline int QStringRef::compare(const QStringRef &s1, const QString &s2, Qt::CaseSensitivity cs) +{ return QString::compare_helper(s1.constData(), s1.length(), s2.constData(), s2.length(), cs); } +inline int QStringRef::compare(const QStringRef &s1, const QStringRef &s2, Qt::CaseSensitivity cs) +{ return QString::compare_helper(s1.constData(), s1.length(), s2.constData(), s2.length(), cs); } +inline int QStringRef::compare(const QStringRef &s1, QLatin1String s2, Qt::CaseSensitivity cs) +{ return QString::compare_helper(s1.constData(), s1.length(), s2, cs); } + +inline int QString::localeAwareCompare(const QStringRef &s) const +{ return localeAwareCompare_helper(constData(), length(), s.constData(), s.length()); } +inline int QString::localeAwareCompare(const QString& s1, const QStringRef& s2) +{ return localeAwareCompare_helper(s1.constData(), s1.length(), s2.constData(), s2.length()); } +inline int QStringRef::localeAwareCompare(const QString &s) const +{ return QString::localeAwareCompare_helper(constData(), length(), s.constData(), s.length()); } +inline int QStringRef::localeAwareCompare(const QStringRef &s) const +{ return QString::localeAwareCompare_helper(constData(), length(), s.constData(), s.length()); } +inline int QStringRef::localeAwareCompare(const QStringRef &s1, const QString &s2) +{ return QString::localeAwareCompare_helper(s1.constData(), s1.length(), s2.constData(), s2.length()); } +inline int QStringRef::localeAwareCompare(const QStringRef &s1, const QStringRef &s2) +{ return QString::localeAwareCompare_helper(s1.constData(), s1.length(), s2.constData(), s2.length()); } + + + + + +# 26 "/usr/include/qt4/QtWebKit/qwebsettings.h" 2 +# 1 "/usr/include/qt4/QtGui/qpixmap.h" 1 +# 45 "/usr/include/qt4/QtGui/qpixmap.h" +# 1 "/usr/include/qt4/QtGui/qpaintdevice.h" 1 +# 45 "/usr/include/qt4/QtGui/qpaintdevice.h" +# 1 "/usr/include/qt4/QtGui/qwindowdefs.h" 1 +# 45 "/usr/include/qt4/QtGui/qwindowdefs.h" +# 1 "/usr/include/qt4/QtCore/qobjectdefs.h" 1 +# 47 "/usr/include/qt4/QtCore/qobjectdefs.h" + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +class QByteArray; + +class QString; +# 141 "/usr/include/qt4/QtCore/qobjectdefs.h" +template +inline int qYouForgotTheQ_OBJECT_Macro(T, T) { return 0; } + +template +inline void qYouForgotTheQ_OBJECT_Macro(T1, T2) {} +# 210 "/usr/include/qt4/QtCore/qobjectdefs.h" + const char *qFlagLocation(const char *method); +# 238 "/usr/include/qt4/QtCore/qobjectdefs.h" +class QObject; +class QMetaMethod; +class QMetaEnum; +class QMetaProperty; +class QMetaClassInfo; + + +class QGenericArgument +{ +public: + inline QGenericArgument(const char *aName = 0, const void *aData = 0) + : _data(aData), _name(aName) {} + inline void *data() const { return const_cast(_data); } + inline const char *name() const { return _name; } + +private: + const void *_data; + const char *_name; +}; + +class QGenericReturnArgument: public QGenericArgument +{ +public: + inline QGenericReturnArgument(const char *aName = 0, void *aData = 0) + : QGenericArgument(aName, aData) + {} +}; + +template +class QArgument: public QGenericArgument +{ +public: + inline QArgument(const char *aName, const T &aData) + : QGenericArgument(aName, static_cast(&aData)) + {} +}; + + +template +class QReturnArgument: public QGenericReturnArgument +{ +public: + inline QReturnArgument(const char *aName, T &aData) + : QGenericReturnArgument(aName, static_cast(&aData)) + {} +}; + +struct QMetaObject +{ + const char *className() const; + const QMetaObject *superClass() const; + + QObject *cast(QObject *obj) const; + + + + QString tr(const char *s, const char *c) const; + QString trUtf8(const char *s, const char *c) const; + QString tr(const char *s, const char *c, int n) const; + QString trUtf8(const char *s, const char *c, int n) const; + + + int methodOffset() const; + int enumeratorOffset() const; + int propertyOffset() const; + int classInfoOffset() const; + + int constructorCount() const; + int methodCount() const; + int enumeratorCount() const; + int propertyCount() const; + int classInfoCount() const; + + int indexOfConstructor(const char *constructor) const; + int indexOfMethod(const char *method) const; + int indexOfSignal(const char *signal) const; + int indexOfSlot(const char *slot) const; + int indexOfEnumerator(const char *name) const; + int indexOfProperty(const char *name) const; + int indexOfClassInfo(const char *name) const; + + QMetaMethod constructor(int index) const; + QMetaMethod method(int index) const; + QMetaEnum enumerator(int index) const; + QMetaProperty property(int index) const; + QMetaClassInfo classInfo(int index) const; + QMetaProperty userProperty() const; + + static bool checkConnectArgs(const char *signal, const char *method); + static QByteArray normalizedSignature(const char *method); + static QByteArray normalizedType(const char *type); + + + static bool connect(const QObject *sender, int signal_index, + const QObject *receiver, int method_index, + int type = 0, int *types = 0); + + static bool disconnect(const QObject *sender, int signal_index, + const QObject *receiver, int method_index); + static bool disconnectOne(const QObject *sender, int signal_index, + const QObject *receiver, int method_index); + + static void connectSlotsByName(QObject *o); + + + static void activate(QObject *sender, int signal_index, void **argv); + static void activate(QObject *sender, int from_signal_index, int to_signal_index, void **argv); + static void activate(QObject *sender, const QMetaObject *, int local_signal_index, void **argv); + static void activate(QObject *sender, const QMetaObject *, int from_local_signal_index, int to_local_signal_index, void **argv); + + + static void addGuard(QObject **ptr); + static void removeGuard(QObject **ptr); + static void changeGuard(QObject **ptr, QObject *o); + + static bool invokeMethod(QObject *obj, const char *member, + Qt::ConnectionType, + QGenericReturnArgument ret, + QGenericArgument val0 = QGenericArgument(0), + QGenericArgument val1 = QGenericArgument(), + QGenericArgument val2 = QGenericArgument(), + QGenericArgument val3 = QGenericArgument(), + QGenericArgument val4 = QGenericArgument(), + QGenericArgument val5 = QGenericArgument(), + QGenericArgument val6 = QGenericArgument(), + QGenericArgument val7 = QGenericArgument(), + QGenericArgument val8 = QGenericArgument(), + QGenericArgument val9 = QGenericArgument()); + + static inline bool invokeMethod(QObject *obj, const char *member, + QGenericReturnArgument ret, + QGenericArgument val0 = QGenericArgument(0), + QGenericArgument val1 = QGenericArgument(), + QGenericArgument val2 = QGenericArgument(), + QGenericArgument val3 = QGenericArgument(), + QGenericArgument val4 = QGenericArgument(), + QGenericArgument val5 = QGenericArgument(), + QGenericArgument val6 = QGenericArgument(), + QGenericArgument val7 = QGenericArgument(), + QGenericArgument val8 = QGenericArgument(), + QGenericArgument val9 = QGenericArgument()) + { + return invokeMethod(obj, member, Qt::AutoConnection, ret, val0, val1, val2, val3, + val4, val5, val6, val7, val8, val9); + } + + static inline bool invokeMethod(QObject *obj, const char *member, + Qt::ConnectionType type, + QGenericArgument val0 = QGenericArgument(0), + QGenericArgument val1 = QGenericArgument(), + QGenericArgument val2 = QGenericArgument(), + QGenericArgument val3 = QGenericArgument(), + QGenericArgument val4 = QGenericArgument(), + QGenericArgument val5 = QGenericArgument(), + QGenericArgument val6 = QGenericArgument(), + QGenericArgument val7 = QGenericArgument(), + QGenericArgument val8 = QGenericArgument(), + QGenericArgument val9 = QGenericArgument()) + { + return invokeMethod(obj, member, type, QGenericReturnArgument(), val0, val1, val2, + val3, val4, val5, val6, val7, val8, val9); + } + + static inline bool invokeMethod(QObject *obj, const char *member, + QGenericArgument val0 = QGenericArgument(0), + QGenericArgument val1 = QGenericArgument(), + QGenericArgument val2 = QGenericArgument(), + QGenericArgument val3 = QGenericArgument(), + QGenericArgument val4 = QGenericArgument(), + QGenericArgument val5 = QGenericArgument(), + QGenericArgument val6 = QGenericArgument(), + QGenericArgument val7 = QGenericArgument(), + QGenericArgument val8 = QGenericArgument(), + QGenericArgument val9 = QGenericArgument()) + { + return invokeMethod(obj, member, Qt::AutoConnection, QGenericReturnArgument(), val0, + val1, val2, val3, val4, val5, val6, val7, val8, val9); + } + + QObject *newInstance(QGenericArgument val0 = QGenericArgument(0), + QGenericArgument val1 = QGenericArgument(), + QGenericArgument val2 = QGenericArgument(), + QGenericArgument val3 = QGenericArgument(), + QGenericArgument val4 = QGenericArgument(), + QGenericArgument val5 = QGenericArgument(), + QGenericArgument val6 = QGenericArgument(), + QGenericArgument val7 = QGenericArgument(), + QGenericArgument val8 = QGenericArgument(), + QGenericArgument val9 = QGenericArgument()) const; + + enum Call { + InvokeMetaMethod, + ReadProperty, + WriteProperty, + ResetProperty, + QueryPropertyDesignable, + QueryPropertyScriptable, + QueryPropertyStored, + QueryPropertyEditable, + QueryPropertyUser, + CreateInstance + }; + + int static_metacall(Call, int, void **) const; + static int metacall(QObject *, Call, int, void **); + + + + + + struct { + const QMetaObject *superdata; + const char *stringdata; + const uint *data; + const void *extradata; + } d; + +}; + +typedef const QMetaObject& (*QMetaObjectAccessor)(); + +struct QMetaObjectExtraData +{ + + + + const QMetaObject **objects; + + int (*static_metacall)(QMetaObject::Call, int, void **); +}; + +inline const char *QMetaObject::className() const +{ return d.stringdata; } + +inline const QMetaObject *QMetaObject::superClass() const +{ return d.superdata; } + + + + + + + + + +# 46 "/usr/include/qt4/QtGui/qwindowdefs.h" 2 + + + + + +typedef QtValidLicenseForGuiModule QtGuiModule; + + + +class QPaintDevice; +class QWidget; +class QDialog; +class QColor; +class QPalette; + + + +class QCursor; +class QPoint; +class QSize; +class QRect; +class QPolygon; +class QPainter; +class QRegion; +class QFont; +class QFontMetrics; +class QFontInfo; +class QPen; +class QBrush; +class QMatrix; +class QPixmap; +class QBitmap; +class QMovie; +class QImage; +class QPicture; +class QPrinter; +class QTimer; +class QTime; +class QClipboard; +class QString; +class QByteArray; +class QApplication; + +template class QList; +typedef QList QWidgetList; + + + +# 115 "/usr/include/qt4/QtGui/qwindowdefs.h" +typedef struct _XDisplay Display; +typedef union _XEvent XEvent; +typedef struct _XGC *GC; +typedef struct _XRegion *Region; +typedef unsigned long WId; +# 139 "/usr/include/qt4/QtGui/qwindowdefs.h" + + + +template class QHash; +typedef QHash QWidgetMapper; + +template class QSet; +typedef QSet QWidgetSet; + + + +# 46 "/usr/include/qt4/QtGui/qpaintdevice.h" 2 +# 1 "/usr/include/qt4/QtCore/qrect.h" 1 +# 45 "/usr/include/qt4/QtCore/qrect.h" +# 1 "/usr/include/qt4/QtCore/qsize.h" 1 +# 47 "/usr/include/qt4/QtCore/qsize.h" + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +class QSize +{ +public: + QSize(); + QSize(int w, int h); + + bool isNull() const; + bool isEmpty() const; + bool isValid() const; + + int width() const; + int height() const; + void setWidth(int w); + void setHeight(int h); + void transpose(); + + void scale(int w, int h, Qt::AspectRatioMode mode); + void scale(const QSize &s, Qt::AspectRatioMode mode); + + QSize expandedTo(const QSize &) const; + QSize boundedTo(const QSize &) const; + + int &rwidth(); + int &rheight(); + + QSize &operator+=(const QSize &); + QSize &operator-=(const QSize &); + QSize &operator*=(qreal c); + QSize &operator/=(qreal c); + + friend inline bool operator==(const QSize &, const QSize &); + friend inline bool operator!=(const QSize &, const QSize &); + friend inline const QSize operator+(const QSize &, const QSize &); + friend inline const QSize operator-(const QSize &, const QSize &); + friend inline const QSize operator*(const QSize &, qreal); + friend inline const QSize operator*(qreal, const QSize &); + friend inline const QSize operator/(const QSize &, qreal); + +private: + int wd; + int ht; +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QSize)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QSize"; } }; + + + + + + + QDataStream &operator<<(QDataStream &, const QSize &); + QDataStream &operator>>(QDataStream &, QSize &); + + + + + + + +inline QSize::QSize() +{ wd = ht = -1; } + +inline QSize::QSize(int w, int h) +{ wd = w; ht = h; } + +inline bool QSize::isNull() const +{ return wd==0 && ht==0; } + +inline bool QSize::isEmpty() const +{ return wd<1 || ht<1; } + +inline bool QSize::isValid() const +{ return wd>=0 && ht>=0; } + +inline int QSize::width() const +{ return wd; } + +inline int QSize::height() const +{ return ht; } + +inline void QSize::setWidth(int w) +{ wd = w; } + +inline void QSize::setHeight(int h) +{ ht = h; } + +inline void QSize::scale(int w, int h, Qt::AspectRatioMode mode) +{ scale(QSize(w, h), mode); } + +inline int &QSize::rwidth() +{ return wd; } + +inline int &QSize::rheight() +{ return ht; } + +inline QSize &QSize::operator+=(const QSize &s) +{ wd+=s.wd; ht+=s.ht; return *this; } + +inline QSize &QSize::operator-=(const QSize &s) +{ wd-=s.wd; ht-=s.ht; return *this; } + +inline QSize &QSize::operator*=(qreal c) +{ wd = qRound(wd*c); ht = qRound(ht*c); return *this; } + +inline bool operator==(const QSize &s1, const QSize &s2) +{ return s1.wd == s2.wd && s1.ht == s2.ht; } + +inline bool operator!=(const QSize &s1, const QSize &s2) +{ return s1.wd != s2.wd || s1.ht != s2.ht; } + +inline const QSize operator+(const QSize & s1, const QSize & s2) +{ return QSize(s1.wd+s2.wd, s1.ht+s2.ht); } + +inline const QSize operator-(const QSize &s1, const QSize &s2) +{ return QSize(s1.wd-s2.wd, s1.ht-s2.ht); } + +inline const QSize operator*(const QSize &s, qreal c) +{ return QSize(qRound(s.wd*c), qRound(s.ht*c)); } + +inline const QSize operator*(qreal c, const QSize &s) +{ return QSize(qRound(s.wd*c), qRound(s.ht*c)); } + +inline QSize &QSize::operator/=(qreal c) +{ + ((!(!qFuzzyIsNull(c))) ? qt_assert("!qFuzzyIsNull(c)","/usr/include/qt4/QtCore/qsize.h",176) : qt_noop()); + wd = qRound(wd/c); ht = qRound(ht/c); + return *this; +} + +inline const QSize operator/(const QSize &s, qreal c) +{ + ((!(!qFuzzyIsNull(c))) ? qt_assert("!qFuzzyIsNull(c)","/usr/include/qt4/QtCore/qsize.h",183) : qt_noop()); + return QSize(qRound(s.wd/c), qRound(s.ht/c)); +} + +inline QSize QSize::expandedTo(const QSize & otherSize) const +{ + return QSize(qMax(wd,otherSize.wd), qMax(ht,otherSize.ht)); +} + +inline QSize QSize::boundedTo(const QSize & otherSize) const +{ + return QSize(qMin(wd,otherSize.wd), qMin(ht,otherSize.ht)); +} + + + QDebug operator<<(QDebug, const QSize &); + + + +class QSizeF +{ +public: + QSizeF(); + QSizeF(const QSize &sz); + QSizeF(qreal w, qreal h); + + bool isNull() const; + bool isEmpty() const; + bool isValid() const; + + qreal width() const; + qreal height() const; + void setWidth(qreal w); + void setHeight(qreal h); + void transpose(); + + void scale(qreal w, qreal h, Qt::AspectRatioMode mode); + void scale(const QSizeF &s, Qt::AspectRatioMode mode); + + QSizeF expandedTo(const QSizeF &) const; + QSizeF boundedTo(const QSizeF &) const; + + qreal &rwidth(); + qreal &rheight(); + + QSizeF &operator+=(const QSizeF &); + QSizeF &operator-=(const QSizeF &); + QSizeF &operator*=(qreal c); + QSizeF &operator/=(qreal c); + + friend inline bool operator==(const QSizeF &, const QSizeF &); + friend inline bool operator!=(const QSizeF &, const QSizeF &); + friend inline const QSizeF operator+(const QSizeF &, const QSizeF &); + friend inline const QSizeF operator-(const QSizeF &, const QSizeF &); + friend inline const QSizeF operator*(const QSizeF &, qreal); + friend inline const QSizeF operator*(qreal, const QSizeF &); + friend inline const QSizeF operator/(const QSizeF &, qreal); + + inline QSize toSize() const; + +private: + qreal wd; + qreal ht; +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QSizeF)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QSizeF"; } }; + + + + + + + + QDataStream &operator<<(QDataStream &, const QSizeF &); + QDataStream &operator>>(QDataStream &, QSizeF &); + + + + + + + +inline QSizeF::QSizeF() +{ wd = ht = -1.; } + +inline QSizeF::QSizeF(const QSize &sz) + : wd(sz.width()), ht(sz.height()) +{ +} + +inline QSizeF::QSizeF(qreal w, qreal h) +{ wd = w; ht = h; } + +inline bool QSizeF::isNull() const +{ return qIsNull(wd) && qIsNull(ht); } + +inline bool QSizeF::isEmpty() const +{ return wd <= 0. || ht <= 0.; } + +inline bool QSizeF::isValid() const +{ return wd >= 0. && ht >= 0.; } + +inline qreal QSizeF::width() const +{ return wd; } + +inline qreal QSizeF::height() const +{ return ht; } + +inline void QSizeF::setWidth(qreal w) +{ wd = w; } + +inline void QSizeF::setHeight(qreal h) +{ ht = h; } + +inline void QSizeF::scale(qreal w, qreal h, Qt::AspectRatioMode mode) +{ scale(QSizeF(w, h), mode); } + +inline qreal &QSizeF::rwidth() +{ return wd; } + +inline qreal &QSizeF::rheight() +{ return ht; } + +inline QSizeF &QSizeF::operator+=(const QSizeF &s) +{ wd += s.wd; ht += s.ht; return *this; } + +inline QSizeF &QSizeF::operator-=(const QSizeF &s) +{ wd -= s.wd; ht -= s.ht; return *this; } + +inline QSizeF &QSizeF::operator*=(qreal c) +{ wd *= c; ht *= c; return *this; } + +inline bool operator==(const QSizeF &s1, const QSizeF &s2) +{ return qFuzzyCompare(s1.wd, s2.wd) && qFuzzyCompare(s1.ht, s2.ht); } + +inline bool operator!=(const QSizeF &s1, const QSizeF &s2) +{ return !qFuzzyCompare(s1.wd, s2.wd) || !qFuzzyCompare(s1.ht, s2.ht); } + +inline const QSizeF operator+(const QSizeF & s1, const QSizeF & s2) +{ return QSizeF(s1.wd+s2.wd, s1.ht+s2.ht); } + +inline const QSizeF operator-(const QSizeF &s1, const QSizeF &s2) +{ return QSizeF(s1.wd-s2.wd, s1.ht-s2.ht); } + +inline const QSizeF operator*(const QSizeF &s, qreal c) +{ return QSizeF(s.wd*c, s.ht*c); } + +inline const QSizeF operator*(qreal c, const QSizeF &s) +{ return QSizeF(s.wd*c, s.ht*c); } + +inline QSizeF &QSizeF::operator/=(qreal c) +{ + ((!(!qFuzzyIsNull(c))) ? qt_assert("!qFuzzyIsNull(c)","/usr/include/qt4/QtCore/qsize.h",334) : qt_noop()); + wd = wd/c; ht = ht/c; + return *this; +} + +inline const QSizeF operator/(const QSizeF &s, qreal c) +{ + ((!(!qFuzzyIsNull(c))) ? qt_assert("!qFuzzyIsNull(c)","/usr/include/qt4/QtCore/qsize.h",341) : qt_noop()); + return QSizeF(s.wd/c, s.ht/c); +} + +inline QSizeF QSizeF::expandedTo(const QSizeF & otherSize) const +{ + return QSizeF(qMax(wd,otherSize.wd), qMax(ht,otherSize.ht)); +} + +inline QSizeF QSizeF::boundedTo(const QSizeF & otherSize) const +{ + return QSizeF(qMin(wd,otherSize.wd), qMin(ht,otherSize.ht)); +} + +inline QSize QSizeF::toSize() const +{ + return QSize(qRound(wd), qRound(ht)); +} + + + QDebug operator<<(QDebug, const QSizeF &); + + + + + +# 46 "/usr/include/qt4/QtCore/qrect.h" 2 +# 1 "/usr/include/qt4/QtCore/qpoint.h" 1 +# 47 "/usr/include/qt4/QtCore/qpoint.h" + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +class QPoint +{ +public: + QPoint(); + QPoint(int xpos, int ypos); + + bool isNull() const; + + int x() const; + int y() const; + void setX(int x); + void setY(int y); + + int manhattanLength() const; + + int &rx(); + int &ry(); + + QPoint &operator+=(const QPoint &p); + QPoint &operator-=(const QPoint &p); + QPoint &operator*=(qreal c); + QPoint &operator/=(qreal c); + + friend inline bool operator==(const QPoint &, const QPoint &); + friend inline bool operator!=(const QPoint &, const QPoint &); + friend inline const QPoint operator+(const QPoint &, const QPoint &); + friend inline const QPoint operator-(const QPoint &, const QPoint &); + friend inline const QPoint operator*(const QPoint &, qreal); + friend inline const QPoint operator*(qreal, const QPoint &); + friend inline const QPoint operator-(const QPoint &); + friend inline const QPoint operator/(const QPoint &, qreal); + +private: + friend class QTransform; + + + + + + int xp; + int yp; + +}; + +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QPoint)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QPoint"; } }; + + + + + + QDataStream &operator<<(QDataStream &, const QPoint &); + QDataStream &operator>>(QDataStream &, QPoint &); + + + + + + +inline QPoint::QPoint() +{ xp=0; yp=0; } + +inline QPoint::QPoint(int xpos, int ypos) +{ xp = xpos; yp = ypos; } + +inline bool QPoint::isNull() const +{ return xp == 0 && yp == 0; } + +inline int QPoint::x() const +{ return xp; } + +inline int QPoint::y() const +{ return yp; } + +inline void QPoint::setX(int xpos) +{ xp = xpos; } + +inline void QPoint::setY(int ypos) +{ yp = ypos; } + +inline int &QPoint::rx() +{ return xp; } + +inline int &QPoint::ry() +{ return yp; } + +inline QPoint &QPoint::operator+=(const QPoint &p) +{ xp+=p.xp; yp+=p.yp; return *this; } + +inline QPoint &QPoint::operator-=(const QPoint &p) +{ xp-=p.xp; yp-=p.yp; return *this; } + +inline QPoint &QPoint::operator*=(qreal c) +{ xp = qRound(xp*c); yp = qRound(yp*c); return *this; } + +inline bool operator==(const QPoint &p1, const QPoint &p2) +{ return p1.xp == p2.xp && p1.yp == p2.yp; } + +inline bool operator!=(const QPoint &p1, const QPoint &p2) +{ return p1.xp != p2.xp || p1.yp != p2.yp; } + +inline const QPoint operator+(const QPoint &p1, const QPoint &p2) +{ return QPoint(p1.xp+p2.xp, p1.yp+p2.yp); } + +inline const QPoint operator-(const QPoint &p1, const QPoint &p2) +{ return QPoint(p1.xp-p2.xp, p1.yp-p2.yp); } + +inline const QPoint operator*(const QPoint &p, qreal c) +{ return QPoint(qRound(p.xp*c), qRound(p.yp*c)); } + +inline const QPoint operator*(qreal c, const QPoint &p) +{ return QPoint(qRound(p.xp*c), qRound(p.yp*c)); } + +inline const QPoint operator-(const QPoint &p) +{ return QPoint(-p.xp, -p.yp); } + +inline QPoint &QPoint::operator/=(qreal c) +{ + xp = qRound(xp/c); + yp = qRound(yp/c); + return *this; +} + +inline const QPoint operator/(const QPoint &p, qreal c) +{ + return QPoint(qRound(p.xp/c), qRound(p.yp/c)); +} + + + QDebug operator<<(QDebug, const QPoint &); + + + + + + +class QPointF +{ +public: + QPointF(); + QPointF(const QPoint &p); + QPointF(qreal xpos, qreal ypos); + + qreal manhattanLength() const; + + bool isNull() const; + + qreal x() const; + qreal y() const; + void setX(qreal x); + void setY(qreal y); + + qreal &rx(); + qreal &ry(); + + QPointF &operator+=(const QPointF &p); + QPointF &operator-=(const QPointF &p); + QPointF &operator*=(qreal c); + QPointF &operator/=(qreal c); + + friend inline bool operator==(const QPointF &, const QPointF &); + friend inline bool operator!=(const QPointF &, const QPointF &); + friend inline const QPointF operator+(const QPointF &, const QPointF &); + friend inline const QPointF operator-(const QPointF &, const QPointF &); + friend inline const QPointF operator*(qreal, const QPointF &); + friend inline const QPointF operator*(const QPointF &, qreal); + friend inline const QPointF operator-(const QPointF &); + friend inline const QPointF operator/(const QPointF &, qreal); + + QPoint toPoint() const; + +private: + friend class QMatrix; + friend class QTransform; + + qreal xp; + qreal yp; +}; + +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QPointF)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QPointF"; } }; + + + + + + QDataStream &operator<<(QDataStream &, const QPointF &); + QDataStream &operator>>(QDataStream &, QPointF &); + + + + + + +inline QPointF::QPointF() : xp(0), yp(0) { } + +inline QPointF::QPointF(qreal xpos, qreal ypos) : xp(xpos), yp(ypos) { } + +inline QPointF::QPointF(const QPoint &p) : xp(p.x()), yp(p.y()) { } + +inline bool QPointF::isNull() const +{ + return qIsNull(xp) && qIsNull(yp); +} + +inline qreal QPointF::x() const +{ + return xp; +} + +inline qreal QPointF::y() const +{ + return yp; +} + +inline void QPointF::setX(qreal xpos) +{ + xp = xpos; +} + +inline void QPointF::setY(qreal ypos) +{ + yp = ypos; +} + +inline qreal &QPointF::rx() +{ + return xp; +} + +inline qreal &QPointF::ry() +{ + return yp; +} + +inline QPointF &QPointF::operator+=(const QPointF &p) +{ + xp+=p.xp; + yp+=p.yp; + return *this; +} + +inline QPointF &QPointF::operator-=(const QPointF &p) +{ + xp-=p.xp; yp-=p.yp; return *this; +} + +inline QPointF &QPointF::operator*=(qreal c) +{ + xp*=c; yp*=c; return *this; +} + +inline bool operator==(const QPointF &p1, const QPointF &p2) +{ + return qFuzzyIsNull(p1.xp - p2.xp) && qFuzzyIsNull(p1.yp - p2.yp); +} + +inline bool operator!=(const QPointF &p1, const QPointF &p2) +{ + return !qFuzzyIsNull(p1.xp - p2.xp) || !qFuzzyIsNull(p1.yp - p2.yp); +} + +inline const QPointF operator+(const QPointF &p1, const QPointF &p2) +{ + return QPointF(p1.xp+p2.xp, p1.yp+p2.yp); +} + +inline const QPointF operator-(const QPointF &p1, const QPointF &p2) +{ + return QPointF(p1.xp-p2.xp, p1.yp-p2.yp); +} + +inline const QPointF operator*(const QPointF &p, qreal c) +{ + return QPointF(p.xp*c, p.yp*c); +} + +inline const QPointF operator*(qreal c, const QPointF &p) +{ + return QPointF(p.xp*c, p.yp*c); +} + +inline const QPointF operator-(const QPointF &p) +{ + return QPointF(-p.xp, -p.yp); +} + +inline QPointF &QPointF::operator/=(qreal c) +{ + xp/=c; + yp/=c; + return *this; +} + +inline const QPointF operator/(const QPointF &p, qreal c) +{ + return QPointF(p.xp/c, p.yp/c); +} + +inline QPoint QPointF::toPoint() const +{ + return QPoint(qRound(xp), qRound(yp)); +} + + + QDebug operator<<(QDebug d, const QPointF &p); + + + + + +# 47 "/usr/include/qt4/QtCore/qrect.h" 2 + + + + + + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +class QRect +{ +public: + QRect() { x1 = y1 = 0; x2 = y2 = -1; } + QRect(const QPoint &topleft, const QPoint &bottomright); + QRect(const QPoint &topleft, const QSize &size); + QRect(int left, int top, int width, int height); + + bool isNull() const; + bool isEmpty() const; + bool isValid() const; + + int left() const; + int top() const; + int right() const; + int bottom() const; + QRect normalized() const; +# 85 "/usr/include/qt4/QtCore/qrect.h" + int x() const; + int y() const; + void setLeft(int pos); + void setTop(int pos); + void setRight(int pos); + void setBottom(int pos); + void setX(int x); + void setY(int y); + + void setTopLeft(const QPoint &p); + void setBottomRight(const QPoint &p); + void setTopRight(const QPoint &p); + void setBottomLeft(const QPoint &p); + + QPoint topLeft() const; + QPoint bottomRight() const; + QPoint topRight() const; + QPoint bottomLeft() const; + QPoint center() const; + + void moveLeft(int pos); + void moveTop(int pos); + void moveRight(int pos); + void moveBottom(int pos); + void moveTopLeft(const QPoint &p); + void moveBottomRight(const QPoint &p); + void moveTopRight(const QPoint &p); + void moveBottomLeft(const QPoint &p); + void moveCenter(const QPoint &p); + + inline void translate(int dx, int dy); + inline void translate(const QPoint &p); + inline QRect translated(int dx, int dy) const; + inline QRect translated(const QPoint &p) const; + + void moveTo(int x, int t); + void moveTo(const QPoint &p); + + + + + + + void setRect(int x, int y, int w, int h); + inline void getRect(int *x, int *y, int *w, int *h) const; + + void setCoords(int x1, int y1, int x2, int y2); + + + + inline void getCoords(int *x1, int *y1, int *x2, int *y2) const; + + inline void adjust(int x1, int y1, int x2, int y2); + inline QRect adjusted(int x1, int y1, int x2, int y2) const; + + QSize size() const; + int width() const; + int height() const; + void setWidth(int w); + void setHeight(int h); + void setSize(const QSize &s); + + QRect operator|(const QRect &r) const; + QRect operator&(const QRect &r) const; + QRect& operator|=(const QRect &r); + QRect& operator&=(const QRect &r); + + bool contains(const QPoint &p, bool proper=false) const; + bool contains(int x, int y) const; + bool contains(int x, int y, bool proper) const; + bool contains(const QRect &r, bool proper = false) const; + QRect unite(const QRect &r) const; + QRect united(const QRect &other) const; + QRect intersect(const QRect &r) const; + QRect intersected(const QRect &other) const; + bool intersects(const QRect &r) const; + + friend inline bool operator==(const QRect &, const QRect &); + friend inline bool operator!=(const QRect &, const QRect &); + + + + + + + +private: + + friend void qt_setCoords(QRect *r, int xp1, int yp1, int xp2, int yp2); +# 182 "/usr/include/qt4/QtCore/qrect.h" + int x1; + int y1; + int x2; + int y2; + + +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QRect)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QRect"; } }; + + inline bool operator==(const QRect &, const QRect &); + inline bool operator!=(const QRect &, const QRect &); + + + + + + + QDataStream &operator<<(QDataStream &, const QRect &); + QDataStream &operator>>(QDataStream &, QRect &); + + + + + + +inline QRect::QRect(int aleft, int atop, int awidth, int aheight) +{ + x1 = aleft; + y1 = atop; + x2 = (aleft + awidth - 1); + y2 = (atop + aheight - 1); +} + +inline QRect::QRect(const QPoint &atopLeft, const QPoint &abottomRight) +{ + x1 = atopLeft.x(); + y1 = atopLeft.y(); + x2 = abottomRight.x(); + y2 = abottomRight.y(); +} + +inline QRect::QRect(const QPoint &atopLeft, const QSize &asize) +{ + x1 = atopLeft.x(); + y1 = atopLeft.y(); + x2 = (x1+asize.width() - 1); + y2 = (y1+asize.height() - 1); +} + +inline bool QRect::isNull() const +{ return x2 == x1 - 1 && y2 == y1 - 1; } + +inline bool QRect::isEmpty() const +{ return x1 > x2 || y1 > y2; } + +inline bool QRect::isValid() const +{ return x1 <= x2 && y1 <= y2; } + +inline int QRect::left() const +{ return x1; } + +inline int QRect::top() const +{ return y1; } + +inline int QRect::right() const +{ return x2; } + +inline int QRect::bottom() const +{ return y2; } + +inline int QRect::x() const +{ return x1; } + +inline int QRect::y() const +{ return y1; } + +inline void QRect::setLeft(int pos) +{ x1 = pos; } + +inline void QRect::setTop(int pos) +{ y1 = pos; } + +inline void QRect::setRight(int pos) +{ x2 = pos; } + +inline void QRect::setBottom(int pos) +{ y2 = pos; } + +inline void QRect::setTopLeft(const QPoint &p) +{ x1 = p.x(); y1 = p.y(); } + +inline void QRect::setBottomRight(const QPoint &p) +{ x2 = p.x(); y2 = p.y(); } + +inline void QRect::setTopRight(const QPoint &p) +{ x2 = p.x(); y1 = p.y(); } + +inline void QRect::setBottomLeft(const QPoint &p) +{ x1 = p.x(); y2 = p.y(); } + +inline void QRect::setX(int ax) +{ x1 = ax; } + +inline void QRect::setY(int ay) +{ y1 = ay; } + +inline QPoint QRect::topLeft() const +{ return QPoint(x1, y1); } + +inline QPoint QRect::bottomRight() const +{ return QPoint(x2, y2); } + +inline QPoint QRect::topRight() const +{ return QPoint(x2, y1); } + +inline QPoint QRect::bottomLeft() const +{ return QPoint(x1, y2); } + +inline QPoint QRect::center() const +{ return QPoint((x1+x2)/2, (y1+y2)/2); } + +inline int QRect::width() const +{ return x2 - x1 + 1; } + +inline int QRect::height() const +{ return y2 - y1 + 1; } + +inline QSize QRect::size() const +{ return QSize(width(), height()); } + +inline void QRect::translate(int dx, int dy) +{ + x1 += dx; + y1 += dy; + x2 += dx; + y2 += dy; +} + +inline void QRect::translate(const QPoint &p) +{ + x1 += p.x(); + y1 += p.y(); + x2 += p.x(); + y2 += p.y(); +} + +inline QRect QRect::translated(int dx, int dy) const +{ return QRect(QPoint(x1 + dx, y1 + dy), QPoint(x2 + dx, y2 + dy)); } + +inline QRect QRect::translated(const QPoint &p) const +{ return QRect(QPoint(x1 + p.x(), y1 + p.y()), QPoint(x2 + p.x(), y2 + p.y())); } + +inline void QRect::moveTo(int ax, int ay) +{ + x2 += ax - x1; + y2 += ay - y1; + x1 = ax; + y1 = ay; +} + +inline void QRect::moveTo(const QPoint &p) +{ + x2 += p.x() - x1; + y2 += p.y() - y1; + x1 = p.x(); + y1 = p.y(); +} + +inline void QRect::moveLeft(int pos) +{ x2 += (pos - x1); x1 = pos; } + +inline void QRect::moveTop(int pos) +{ y2 += (pos - y1); y1 = pos; } + +inline void QRect::moveRight(int pos) +{ + x1 += (pos - x2); + x2 = pos; +} + +inline void QRect::moveBottom(int pos) +{ + y1 += (pos - y2); + y2 = pos; +} + +inline void QRect::moveTopLeft(const QPoint &p) +{ + moveLeft(p.x()); + moveTop(p.y()); +} + +inline void QRect::moveBottomRight(const QPoint &p) +{ + moveRight(p.x()); + moveBottom(p.y()); +} + +inline void QRect::moveTopRight(const QPoint &p) +{ + moveRight(p.x()); + moveTop(p.y()); +} + +inline void QRect::moveBottomLeft(const QPoint &p) +{ + moveLeft(p.x()); + moveBottom(p.y()); +} + +inline void QRect::getRect(int *ax, int *ay, int *aw, int *ah) const +{ + *ax = x1; + *ay = y1; + *aw = x2 - x1 + 1; + *ah = y2 - y1 + 1; +} + +inline void QRect::setRect(int ax, int ay, int aw, int ah) +{ + x1 = ax; + y1 = ay; + x2 = (ax + aw - 1); + y2 = (ay + ah - 1); +} + +inline void QRect::getCoords(int *xp1, int *yp1, int *xp2, int *yp2) const +{ + *xp1 = x1; + *yp1 = y1; + *xp2 = x2; + *yp2 = y2; +} + +inline void QRect::setCoords(int xp1, int yp1, int xp2, int yp2) +{ + x1 = xp1; + y1 = yp1; + x2 = xp2; + y2 = yp2; +} +# 431 "/usr/include/qt4/QtCore/qrect.h" +inline QRect QRect::adjusted(int xp1, int yp1, int xp2, int yp2) const +{ return QRect(QPoint(x1 + xp1, y1 + yp1), QPoint(x2 + xp2, y2 + yp2)); } + +inline void QRect::adjust(int dx1, int dy1, int dx2, int dy2) +{ + x1 += dx1; + y1 += dy1; + x2 += dx2; + y2 += dy2; +} + +inline void QRect::setWidth(int w) +{ x2 = (x1 + w - 1); } + +inline void QRect::setHeight(int h) +{ y2 = (y1 + h - 1); } + +inline void QRect::setSize(const QSize &s) +{ + x2 = (s.width() + x1 - 1); + y2 = (s.height() + y1 - 1); +} + +inline bool QRect::contains(int ax, int ay, bool aproper) const +{ + return contains(QPoint(ax, ay), aproper); +} + +inline bool QRect::contains(int ax, int ay) const +{ + return contains(QPoint(ax, ay), false); +} + +inline QRect& QRect::operator|=(const QRect &r) +{ + *this = *this | r; + return *this; +} + +inline QRect& QRect::operator&=(const QRect &r) +{ + *this = *this & r; + return *this; +} + +inline QRect QRect::intersect(const QRect &r) const +{ + return *this & r; +} + +inline QRect QRect::intersected(const QRect &other) const +{ + return intersect(other); +} + +inline QRect QRect::unite(const QRect &r) const +{ + return *this | r; +} + +inline QRect QRect::united(const QRect &r) const +{ + return unite(r); +} + +inline bool operator==(const QRect &r1, const QRect &r2) +{ + return r1.x1==r2.x1 && r1.x2==r2.x2 && r1.y1==r2.y1 && r1.y2==r2.y2; +} + +inline bool operator!=(const QRect &r1, const QRect &r2) +{ + return r1.x1!=r2.x1 || r1.x2!=r2.x2 || r1.y1!=r2.y1 || r1.y2!=r2.y2; +} + + + QDebug operator<<(QDebug, const QRect &); + + + +class QRectF +{ +public: + QRectF() { xp = yp = 0.; w = h = 0.; } + QRectF(const QPointF &topleft, const QSizeF &size); + QRectF(const QPointF &topleft, const QPointF &bottomRight); + QRectF(qreal left, qreal top, qreal width, qreal height); + QRectF(const QRect &rect); + + bool isNull() const; + bool isEmpty() const; + bool isValid() const; + QRectF normalized() const; + + inline qreal left() const { return xp; } + inline qreal top() const { return yp; } + inline qreal right() const { return xp + w; } + inline qreal bottom() const { return yp + h; } + + inline qreal x() const; + inline qreal y() const; + inline void setLeft(qreal pos); + inline void setTop(qreal pos); + inline void setRight(qreal pos); + inline void setBottom(qreal pos); + inline void setX(qreal pos) { setLeft(pos); } + inline void setY(qreal pos) { setTop(pos); } + + inline QPointF topLeft() const { return QPointF(xp, yp); } + inline QPointF bottomRight() const { return QPointF(xp+w, yp+h); } + inline QPointF topRight() const { return QPointF(xp+w, yp); } + inline QPointF bottomLeft() const { return QPointF(xp, yp+h); } + inline QPointF center() const; + + void setTopLeft(const QPointF &p); + void setBottomRight(const QPointF &p); + void setTopRight(const QPointF &p); + void setBottomLeft(const QPointF &p); + + void moveLeft(qreal pos); + void moveTop(qreal pos); + void moveRight(qreal pos); + void moveBottom(qreal pos); + void moveTopLeft(const QPointF &p); + void moveBottomRight(const QPointF &p); + void moveTopRight(const QPointF &p); + void moveBottomLeft(const QPointF &p); + void moveCenter(const QPointF &p); + + void translate(qreal dx, qreal dy); + void translate(const QPointF &p); + + QRectF translated(qreal dx, qreal dy) const; + QRectF translated(const QPointF &p) const; + + void moveTo(qreal x, qreal t); + void moveTo(const QPointF &p); + + void setRect(qreal x, qreal y, qreal w, qreal h); + void getRect(qreal *x, qreal *y, qreal *w, qreal *h) const; + + void setCoords(qreal x1, qreal y1, qreal x2, qreal y2); + void getCoords(qreal *x1, qreal *y1, qreal *x2, qreal *y2) const; + + inline void adjust(qreal x1, qreal y1, qreal x2, qreal y2); + inline QRectF adjusted(qreal x1, qreal y1, qreal x2, qreal y2) const; + + QSizeF size() const; + qreal width() const; + qreal height() const; + void setWidth(qreal w); + void setHeight(qreal h); + void setSize(const QSizeF &s); + + QRectF operator|(const QRectF &r) const; + QRectF operator&(const QRectF &r) const; + QRectF& operator|=(const QRectF &r); + QRectF& operator&=(const QRectF &r); + + bool contains(const QPointF &p) const; + bool contains(qreal x, qreal y) const; + bool contains(const QRectF &r) const; + QRectF unite(const QRectF &r) const; + QRectF united(const QRectF &other) const; + QRectF intersect(const QRectF &r) const; + QRectF intersected(const QRectF &other) const; + bool intersects(const QRectF &r) const; + + friend inline bool operator==(const QRectF &, const QRectF &); + friend inline bool operator!=(const QRectF &, const QRectF &); + + QRect toRect() const; + QRect toAlignedRect() const; + +private: + qreal xp; + qreal yp; + qreal w; + qreal h; +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QRectF)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QRectF"; } }; + + inline bool operator==(const QRectF &, const QRectF &); + inline bool operator!=(const QRectF &, const QRectF &); + + + + + + + QDataStream &operator<<(QDataStream &, const QRectF &); + QDataStream &operator>>(QDataStream &, QRectF &); + + + + + + +inline QRectF::QRectF(qreal aleft, qreal atop, qreal awidth, qreal aheight) + : xp(aleft), yp(atop), w(awidth), h(aheight) +{ +} + +inline QRectF::QRectF(const QPointF &atopLeft, const QSizeF &asize) +{ + xp = atopLeft.x(); + yp = atopLeft.y(); + w = asize.width(); + h = asize.height(); +} + +inline QRectF::QRectF(const QPointF &atopLeft, const QPointF &abottomRight) +{ + xp = atopLeft.x(); + yp = atopLeft.y(); + w = abottomRight.x() - xp; + h = abottomRight.y() - yp; +} + +inline QRectF::QRectF(const QRect &r) + : xp(r.x()), yp(r.y()), w(r.width()), h(r.height()) +{ +} + +inline bool QRectF::isNull() const +{ return w == 0. && h == 0.; } + +inline bool QRectF::isEmpty() const +{ return w <= 0. || h <= 0.; } + +inline bool QRectF::isValid() const +{ return w > 0. && h > 0.; } + +inline qreal QRectF::x() const +{ return xp; } + +inline qreal QRectF::y() const +{ return yp; } + +inline void QRectF::setLeft(qreal pos) { qreal diff = pos - xp; xp += diff; w -= diff; } + +inline void QRectF::setRight(qreal pos) { w = pos - xp; } + +inline void QRectF::setTop(qreal pos) { qreal diff = pos - yp; yp += diff; h -= diff; } + +inline void QRectF::setBottom(qreal pos) { h = pos - yp; } + +inline void QRectF::setTopLeft(const QPointF &p) { setLeft(p.x()); setTop(p.y()); } + +inline void QRectF::setTopRight(const QPointF &p) { setRight(p.x()); setTop(p.y()); } + +inline void QRectF::setBottomLeft(const QPointF &p) { setLeft(p.x()); setBottom(p.y()); } + +inline void QRectF::setBottomRight(const QPointF &p) { setRight(p.x()); setBottom(p.y()); } + +inline QPointF QRectF::center() const +{ return QPointF(xp + w/2, yp + h/2); } + +inline void QRectF::moveLeft(qreal pos) { xp = pos; } + +inline void QRectF::moveTop(qreal pos) { yp = pos; } + +inline void QRectF::moveRight(qreal pos) { xp = pos - w; } + +inline void QRectF::moveBottom(qreal pos) { yp = pos - h; } + +inline void QRectF::moveTopLeft(const QPointF &p) { moveLeft(p.x()); moveTop(p.y()); } + +inline void QRectF::moveTopRight(const QPointF &p) { moveRight(p.x()); moveTop(p.y()); } + +inline void QRectF::moveBottomLeft(const QPointF &p) { moveLeft(p.x()); moveBottom(p.y()); } + +inline void QRectF::moveBottomRight(const QPointF &p) { moveRight(p.x()); moveBottom(p.y()); } + +inline void QRectF::moveCenter(const QPointF &p) { xp = p.x() - w/2; yp = p.y() - h/2; } + +inline qreal QRectF::width() const +{ return w; } + +inline qreal QRectF::height() const +{ return h; } + +inline QSizeF QRectF::size() const +{ return QSizeF(w, h); } + +inline void QRectF::translate(qreal dx, qreal dy) +{ + xp += dx; + yp += dy; +} + +inline void QRectF::translate(const QPointF &p) +{ + xp += p.x(); + yp += p.y(); +} + +inline void QRectF::moveTo(qreal ax, qreal ay) +{ + xp = ax; + yp = ay; +} + +inline void QRectF::moveTo(const QPointF &p) +{ + xp = p.x(); + yp = p.y(); +} + +inline QRectF QRectF::translated(qreal dx, qreal dy) const +{ return QRectF(xp + dx, yp + dy, w, h); } + +inline QRectF QRectF::translated(const QPointF &p) const +{ return QRectF(xp + p.x(), yp + p.y(), w, h); } + +inline void QRectF::getRect(qreal *ax, qreal *ay, qreal *aaw, qreal *aah) const +{ + *ax = this->xp; + *ay = this->yp; + *aaw = this->w; + *aah = this->h; +} + +inline void QRectF::setRect(qreal ax, qreal ay, qreal aaw, qreal aah) +{ + this->xp = ax; + this->yp = ay; + this->w = aaw; + this->h = aah; +} + +inline void QRectF::getCoords(qreal *xp1, qreal *yp1, qreal *xp2, qreal *yp2) const +{ + *xp1 = xp; + *yp1 = yp; + *xp2 = xp + w; + *yp2 = yp + h; +} + +inline void QRectF::setCoords(qreal xp1, qreal yp1, qreal xp2, qreal yp2) +{ + xp = xp1; + yp = yp1; + w = xp2 - xp1; + h = yp2 - yp1; +} + +inline void QRectF::adjust(qreal xp1, qreal yp1, qreal xp2, qreal yp2) +{ xp += xp1; yp += yp1; w += xp2 - xp1; h += yp2 - yp1; } + +inline QRectF QRectF::adjusted(qreal xp1, qreal yp1, qreal xp2, qreal yp2) const +{ return QRectF(xp + xp1, yp + yp1, w + xp2 - xp1, h + yp2 - yp1); } + +inline void QRectF::setWidth(qreal aw) +{ this->w = aw; } + +inline void QRectF::setHeight(qreal ah) +{ this->h = ah; } + +inline void QRectF::setSize(const QSizeF &s) +{ + w = s.width(); + h = s.height(); +} + +inline bool QRectF::contains(qreal ax, qreal ay) const +{ + return contains(QPointF(ax, ay)); +} + +inline QRectF& QRectF::operator|=(const QRectF &r) +{ + *this = *this | r; + return *this; +} + +inline QRectF& QRectF::operator&=(const QRectF &r) +{ + *this = *this & r; + return *this; +} + +inline QRectF QRectF::intersect(const QRectF &r) const +{ + return *this & r; +} + +inline QRectF QRectF::intersected(const QRectF &r) const +{ + return intersect(r); +} + +inline QRectF QRectF::unite(const QRectF &r) const +{ + return *this | r; +} + +inline QRectF QRectF::united(const QRectF &r) const +{ + return unite(r); +} + +inline bool operator==(const QRectF &r1, const QRectF &r2) +{ + return qFuzzyCompare(r1.xp, r2.xp) && qFuzzyCompare(r1.yp, r2.yp) + && qFuzzyCompare(r1.w, r2.w) && qFuzzyCompare(r1.h, r2.h); +} + +inline bool operator!=(const QRectF &r1, const QRectF &r2) +{ + return !qFuzzyCompare(r1.xp, r2.xp) || !qFuzzyCompare(r1.yp, r2.yp) + || !qFuzzyCompare(r1.w, r2.w) || !qFuzzyCompare(r1.h, r2.h); +} + +inline QRect QRectF::toRect() const +{ + return QRect(qRound(xp), qRound(yp), qRound(w), qRound(h)); +} + + + QDebug operator<<(QDebug, const QRectF &); + + + + + +# 47 "/usr/include/qt4/QtGui/qpaintdevice.h" 2 + + + + + +typedef QtValidLicenseForGuiModule QtGuiModule; + + + + + +class QPaintEngine; + +class QPaintDevice +{ +public: + enum PaintDeviceMetric { + PdmWidth = 1, + PdmHeight, + PdmWidthMM, + PdmHeightMM, + PdmNumColors, + PdmDepth, + PdmDpiX, + PdmDpiY, + PdmPhysicalDpiX, + PdmPhysicalDpiY + }; + + virtual ~QPaintDevice(); + + virtual int devType() const; + bool paintingActive() const; + virtual QPaintEngine *paintEngine() const = 0; +# 91 "/usr/include/qt4/QtGui/qpaintdevice.h" + int width() const { return metric(PdmWidth); } + int height() const { return metric(PdmHeight); } + int widthMM() const { return metric(PdmWidthMM); } + int heightMM() const { return metric(PdmHeightMM); } + int logicalDpiX() const { return metric(PdmDpiX); } + int logicalDpiY() const { return metric(PdmDpiY); } + int physicalDpiX() const { return metric(PdmPhysicalDpiX); } + int physicalDpiY() const { return metric(PdmPhysicalDpiY); } + + int numColors() const { return metric(PdmNumColors); } + + int colorCount() const { return metric(PdmNumColors); } + int depth() const { return metric(PdmDepth); } + +public: + QPaintDevice(); + virtual int metric(PaintDeviceMetric metric) const; + + ushort painters; + +private: + QPaintDevice(const QPaintDevice &); QPaintDevice &operator=(const QPaintDevice &); +# 140 "/usr/include/qt4/QtGui/qpaintdevice.h" + friend class QPainter; + friend class QFontEngineMac; + friend class QX11PaintEngine; + friend int qt_paint_device_metric(const QPaintDevice *device, PaintDeviceMetric metric); +}; +# 167 "/usr/include/qt4/QtGui/qpaintdevice.h" +inline int QPaintDevice::devType() const +{ return QInternal::UnknownDevice; } + +inline bool QPaintDevice::paintingActive() const +{ return painters != 0; } + + + + +# 46 "/usr/include/qt4/QtGui/qpixmap.h" 2 +# 1 "/usr/include/qt4/QtGui/qcolor.h" 1 +# 45 "/usr/include/qt4/QtGui/qcolor.h" +# 1 "/usr/include/qt4/QtGui/qrgb.h" 1 +# 47 "/usr/include/qt4/QtGui/qrgb.h" + + + + +typedef QtValidLicenseForGuiModule QtGuiModule; + +typedef unsigned int QRgb; + +const QRgb RGB_MASK = 0x00ffffff; + + inline int qRed(QRgb rgb) +{ return ((rgb >> 16) & 0xff); } + + inline int qGreen(QRgb rgb) +{ return ((rgb >> 8) & 0xff); } + + inline int qBlue(QRgb rgb) +{ return (rgb & 0xff); } + + inline int qAlpha(QRgb rgb) +{ return ((rgb >> 24) & 0xff); } + + inline QRgb qRgb(int r, int g, int b) +{ return (0xffu << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); } + + inline QRgb qRgba(int r, int g, int b, int a) +{ return ((a & 0xff) << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); } + + inline int qGray(int r, int g, int b) +{ return (r*11+g*16+b*5)/32; } + + inline int qGray(QRgb rgb) +{ return qGray(qRed(rgb), qGreen(rgb), qBlue(rgb)); } + + inline bool qIsGray(QRgb rgb) +{ return qRed(rgb) == qGreen(rgb) && qRed(rgb) == qBlue(rgb); } + + + + +# 46 "/usr/include/qt4/QtGui/qcolor.h" 2 + +# 1 "/usr/include/qt4/QtCore/qstringlist.h" 1 +# 45 "/usr/include/qt4/QtCore/qstringlist.h" +# 1 "/usr/include/qt4/QtCore/qalgorithms.h" 1 +# 47 "/usr/include/qt4/QtCore/qalgorithms.h" + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + + + + + +namespace QAlgorithmsPrivate { + +template + void qSortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan); +template +inline void qSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &dummy); + +template + void qStableSortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan); +template +inline void qStableSortHelper(RandomAccessIterator, RandomAccessIterator, const T &); + +template + RandomAccessIterator qLowerBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan); +template + RandomAccessIterator qUpperBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan); +template + RandomAccessIterator qBinaryFindHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan); + +} + +template +inline OutputIterator qCopy(InputIterator begin, InputIterator end, OutputIterator dest) +{ + while (begin != end) + *dest++ = *begin++; + return dest; +} + +template +inline BiIterator2 qCopyBackward(BiIterator1 begin, BiIterator1 end, BiIterator2 dest) +{ + while (begin != end) + *--dest = *--end; + return dest; +} + +template +inline bool qEqual(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2) +{ + for (; first1 != last1; ++first1, ++first2) + if (!(*first1 == *first2)) + return false; + return true; +} + +template +inline void qFill(ForwardIterator first, ForwardIterator last, const T &val) +{ + for (; first != last; ++first) + *first = val; +} + +template +inline void qFill(Container &container, const T &val) +{ + qFill(container.begin(), container.end(), val); +} + +template +inline InputIterator qFind(InputIterator first, InputIterator last, const T &val) +{ + while (first != last && !(*first == val)) + ++first; + return first; +} + +template +inline typename Container::const_iterator qFind(const Container &container, const T &val) +{ + return qFind(container.constBegin(), container.constEnd(), val); +} + +template +inline void qCount(InputIterator first, InputIterator last, const T &value, Size &n) +{ + for (; first != last; ++first) + if (*first == value) + ++n; +} + +template +inline void qCount(const Container &container, const T &value, Size &n) +{ + qCount(container.constBegin(), container.constEnd(), value, n); +} +# 155 "/usr/include/qt4/QtCore/qalgorithms.h" +template +class qLess +{ +public: + inline bool operator()(const T &t1, const T &t2) const + { + return (t1 < t2); + } +}; + +template +class qGreater +{ +public: + inline bool operator()(const T &t1, const T &t2) const + { + return (t2 < t1); + } +}; + + +template +inline void qSort(RandomAccessIterator start, RandomAccessIterator end) +{ + if (start != end) + QAlgorithmsPrivate::qSortHelper(start, end, *start); +} + +template +inline void qSort(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan) +{ + if (start != end) + QAlgorithmsPrivate::qSortHelper(start, end, *start, lessThan); +} + +template +inline void qSort(Container &c) +{ + + + + + if (!c.empty()) + QAlgorithmsPrivate::qSortHelper(c.begin(), c.end(), *c.begin()); +} + +template +inline void qStableSort(RandomAccessIterator start, RandomAccessIterator end) +{ + if (start != end) + QAlgorithmsPrivate::qStableSortHelper(start, end, *start); +} + +template +inline void qStableSort(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan) +{ + if (start != end) + QAlgorithmsPrivate::qStableSortHelper(start, end, *start, lessThan); +} + +template +inline void qStableSort(Container &c) +{ + + + + + if (!c.empty()) + QAlgorithmsPrivate::qStableSortHelper(c.begin(), c.end(), *c.begin()); +} + +template + RandomAccessIterator qLowerBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value) +{ + + + + RandomAccessIterator middle; + int n = end - begin; + int half; + + while (n > 0) { + half = n >> 1; + middle = begin + half; + if (*middle < value) { + begin = middle + 1; + n -= half + 1; + } else { + n = half; + } + } + return begin; +} + +template + RandomAccessIterator qLowerBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) +{ + return QAlgorithmsPrivate::qLowerBoundHelper(begin, end, value, lessThan); +} + +template + typename Container::const_iterator qLowerBound(const Container &container, const T &value) +{ + return QAlgorithmsPrivate::qLowerBoundHelper(container.constBegin(), container.constEnd(), value, qLess()); +} + +template + RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value) +{ + + RandomAccessIterator middle; + int n = end - begin; + int half; + + while (n > 0) { + half = n >> 1; + middle = begin + half; + if (value < *middle) { + n = half; + } else { + begin = middle + 1; + n -= half + 1; + } + } + return begin; +} + +template + RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) +{ + return QAlgorithmsPrivate::qUpperBoundHelper(begin, end, value, lessThan); +} + +template + typename Container::const_iterator qUpperBound(const Container &container, const T &value) +{ + return QAlgorithmsPrivate::qUpperBoundHelper(container.constBegin(), container.constEnd(), value, qLess()); +} + +template + RandomAccessIterator qBinaryFind(RandomAccessIterator begin, RandomAccessIterator end, const T &value) +{ + + RandomAccessIterator it = qLowerBound(begin, end, value); + + if (it == end || value < *it) + return end; + + return it; +} + +template + RandomAccessIterator qBinaryFind(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) +{ + return QAlgorithmsPrivate::qBinaryFindHelper(begin, end, value, lessThan); +} + +template + typename Container::const_iterator qBinaryFind(const Container &container, const T &value) +{ + return QAlgorithmsPrivate::qBinaryFindHelper(container.constBegin(), container.constEnd(), value, qLess()); +} + +template + void qDeleteAll(ForwardIterator begin, ForwardIterator end) +{ + while (begin != end) { + delete *begin; + ++begin; + } +} + +template +inline void qDeleteAll(const Container &c) +{ + qDeleteAll(c.begin(), c.end()); +} + + + + + +namespace QAlgorithmsPrivate { + +template + void qSortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan) +{ +top: + int span = int(end - start); + if (span < 2) + return; + + --end; + RandomAccessIterator low = start, high = end - 1; + RandomAccessIterator pivot = start + span / 2; + + if (lessThan(*end, *start)) + qSwap(*end, *start); + if (span == 2) + return; + + if (lessThan(*pivot, *start)) + qSwap(*pivot, *start); + if (lessThan(*end, *pivot)) + qSwap(*end, *pivot); + if (span == 3) + return; + + qSwap(*pivot, *end); + + while (low < high) { + while (low < high && lessThan(*low, *end)) + ++low; + + while (high > low && lessThan(*end, *high)) + --high; + + if (low < high) { + qSwap(*low, *high); + ++low; + --high; + } else { + break; + } + } + + if (lessThan(*low, *end)) + ++low; + + qSwap(*end, *low); + qSortHelper(start, low, t, lessThan); + + start = low + 1; + ++end; + goto top; +} + +template +inline void qSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &dummy) +{ + qSortHelper(begin, end, dummy, qLess()); +} + +template + void qReverse(RandomAccessIterator begin, RandomAccessIterator end) +{ + --end; + while (begin < end) + qSwap(*begin++, *end--); +} + +template + void qRotate(RandomAccessIterator begin, RandomAccessIterator middle, RandomAccessIterator end) +{ + qReverse(begin, middle); + qReverse(middle, end); + qReverse(begin, end); +} + +template + void qMerge(RandomAccessIterator begin, RandomAccessIterator pivot, RandomAccessIterator end, T &t, LessThan lessThan) +{ + const int len1 = pivot - begin; + const int len2 = end - pivot; + + if (len1 == 0 || len2 == 0) + return; + + if (len1 + len2 == 2) { + if (lessThan(*(begin + 1), *(begin))) + qSwap(*begin, *(begin + 1)); + return; + } + + RandomAccessIterator firstCut; + RandomAccessIterator secondCut; + int len2Half; + if (len1 > len2) { + const int len1Half = len1 / 2; + firstCut = begin + len1Half; + secondCut = qLowerBound(pivot, end, *firstCut, lessThan); + len2Half = secondCut - pivot; + } else { + len2Half = len2 / 2; + secondCut = pivot + len2Half; + firstCut = qUpperBound(begin, pivot, *secondCut, lessThan); + } + + qRotate(firstCut, pivot, secondCut); + const RandomAccessIterator newPivot = firstCut + len2Half; + qMerge(begin, firstCut, newPivot, t, lessThan); + qMerge(newPivot, secondCut, end, t, lessThan); +} + +template + void qStableSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &t, LessThan lessThan) +{ + const int span = end - begin; + if (span < 2) + return; + + const RandomAccessIterator middle = begin + span / 2; + qStableSortHelper(begin, middle, t, lessThan); + qStableSortHelper(middle, end, t, lessThan); + qMerge(begin, middle, end, t, lessThan); +} + +template +inline void qStableSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &dummy) +{ + qStableSortHelper(begin, end, dummy, qLess()); +} + +template + RandomAccessIterator qLowerBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) +{ + RandomAccessIterator middle; + int n = int(end - begin); + int half; + + while (n > 0) { + half = n >> 1; + middle = begin + half; + if (lessThan(*middle, value)) { + begin = middle + 1; + n -= half + 1; + } else { + n = half; + } + } + return begin; +} + + +template + RandomAccessIterator qUpperBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) +{ + RandomAccessIterator middle; + int n = end - begin; + int half; + + while (n > 0) { + half = n >> 1; + middle = begin + half; + if (lessThan(value, *middle)) { + n = half; + } else { + begin = middle + 1; + n -= half + 1; + } + } + return begin; +} + +template + RandomAccessIterator qBinaryFindHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) +{ + RandomAccessIterator it = qLowerBoundHelper(begin, end, value, lessThan); + + if (it == end || lessThan(value, *it)) + return end; + + return it; +} + +} + + + + +# 46 "/usr/include/qt4/QtCore/qstringlist.h" 2 +# 1 "/usr/include/qt4/QtCore/qdatastream.h" 1 +# 45 "/usr/include/qt4/QtCore/qdatastream.h" +# 1 "/usr/include/qt4/QtCore/qscopedpointer.h" 1 +# 47 "/usr/include/qt4/QtCore/qscopedpointer.h" + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +template +struct QScopedPointerDeleter +{ + static inline void cleanup(T *pointer) + { + + + + typedef char IsIncompleteType[ sizeof(T) ? 1 : -1 ]; + (void) sizeof(IsIncompleteType); + + delete pointer; + } +}; + +template +struct QScopedPointerArrayDeleter +{ + static inline void cleanup(T *pointer) + { + + + + typedef char IsIncompleteType[ sizeof(T) ? 1 : -1 ]; + (void) sizeof(IsIncompleteType); + + delete [] pointer; + } +}; + +struct QScopedPointerPodDeleter +{ + static inline void cleanup(void *pointer) { if (pointer) qFree(pointer); } +}; + +template > +class QScopedPointer +{ + + typedef T *QScopedPointer:: *RestrictedBool; + +public: + explicit inline QScopedPointer(T *p = 0) : d(p) + { + } + + inline ~QScopedPointer() + { + T *oldD = this->d; + Cleanup::cleanup(oldD); + this->d = 0; + } + + inline T &operator*() const + { + ((!(d)) ? qt_assert("d","/usr/include/qt4/QtCore/qscopedpointer.h",106) : qt_noop()); + return *d; + } + + inline T *operator->() const + { + ((!(d)) ? qt_assert("d","/usr/include/qt4/QtCore/qscopedpointer.h",112) : qt_noop()); + return d; + } + + inline bool operator!() const + { + return !d; + } + + + + + + + + inline operator RestrictedBool() const + { + return isNull() ? 0 : &QScopedPointer::d; + } + + + inline T *data() const + { + return d; + } + + inline bool isNull() const + { + return !d; + } + + inline void reset(T *other = 0) + { + if (d == other) + return; + T *oldD = d; + d = other; + Cleanup::cleanup(oldD); + } + + inline T *take() + { + T *oldD = d; + d = 0; + return oldD; + } + + inline void swap(QScopedPointer &other) + { + qSwap(d, other.d); + } + + typedef T *pointer; + +public: + T *d; + +private: + QScopedPointer(const QScopedPointer &); QScopedPointer &operator=(const QScopedPointer &); +}; + +template +inline bool operator==(const QScopedPointer &lhs, const QScopedPointer &rhs) +{ + return lhs.data() == rhs.data(); +} + +template +inline bool operator!=(const QScopedPointer &lhs, const QScopedPointer &rhs) +{ + return lhs.data() != rhs.data(); +} + +template +inline void qSwap(QScopedPointer &p1, QScopedPointer &p2) +{ p1.swap(p2); } + +template > +class QScopedArrayPointer : public QScopedPointer +{ +public: + explicit inline QScopedArrayPointer(T *p = 0) + : QScopedPointer(p) + { + } + + inline T &operator[](int i) + { + return this->d[i]; + } + + inline const T &operator[](int i) const + { + return this->d[i]; + } + +private: + QScopedArrayPointer(const QScopedArrayPointer &); QScopedArrayPointer &operator=(const QScopedArrayPointer &); +}; + + + +# 46 "/usr/include/qt4/QtCore/qdatastream.h" 2 +# 1 "/usr/include/qt4/QtCore/qiodevice.h" 1 +# 46 "/usr/include/qt4/QtCore/qiodevice.h" +# 1 "/usr/include/qt4/QtCore/qobject.h" 1 +# 50 "/usr/include/qt4/QtCore/qobject.h" +# 1 "/usr/include/qt4/QtCore/qlist.h" 1 +# 45 "/usr/include/qt4/QtCore/qlist.h" +# 1 "/usr/include/qt4/QtCore/qiterator.h" 1 +# 47 "/usr/include/qt4/QtCore/qiterator.h" + + +namespace std { + struct bidirectional_iterator_tag; + struct random_access_iterator_tag; +} + + + +typedef QtValidLicenseForCoreModule QtCoreModule; +# 198 "/usr/include/qt4/QtCore/qiterator.h" + + + +# 46 "/usr/include/qt4/QtCore/qlist.h" 2 + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/iterator" 1 3 +# 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/iterator" 3 + +# 59 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/iterator" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 62 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/iterator" 2 3 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ostream" 1 3 +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ostream" 3 + +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ostream" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ios" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ios" 3 + +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ios" 3 + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 1 3 +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 3 + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 3 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 1 3 +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 62 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + class locale + { + public: + + + typedef int category; + + + class facet; + class id; + class _Impl; + + friend class facet; + friend class _Impl; + + template + friend bool + has_facet(const locale&) throw(); + + template + friend const _Facet& + use_facet(const locale&); + + template + friend struct __use_cache; +# 98 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + static const category none = 0; + static const category ctype = 1L << 0; + static const category numeric = 1L << 1; + static const category collate = 1L << 2; + static const category time = 1L << 3; + static const category monetary = 1L << 4; + static const category messages = 1L << 5; + static const category all = (ctype | numeric | collate | + time | monetary | messages); +# 117 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + locale() throw(); +# 126 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + locale(const locale& __other) throw(); +# 136 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + explicit + locale(const char* __s); +# 151 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + locale(const locale& __base, const char* __s, category __cat); +# 164 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + locale(const locale& __base, const locale& __add, category __cat); +# 176 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + template + locale(const locale& __other, _Facet* __f); + + + ~locale() throw(); +# 190 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + const locale& + operator=(const locale& __other) throw(); +# 205 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + template + locale + combine(const locale& __other) const; + + + + + + + string + name() const; +# 224 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + bool + operator==(const locale& __other) const throw(); + + + + + + + + bool + operator!=(const locale& __other) const throw() + { return !(this->operator==(__other)); } +# 252 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + template + bool + operator()(const basic_string<_Char, _Traits, _Alloc>& __s1, + const basic_string<_Char, _Traits, _Alloc>& __s2) const; +# 268 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + static locale + global(const locale&); + + + + + static const locale& + classic(); + + private: + + _Impl* _M_impl; + + + static _Impl* _S_classic; + + + static _Impl* _S_global; + + + + + + static const char* const* const _S_categories; +# 303 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + enum { _S_categories_size = 6 + 6 }; + + + static __gthread_once_t _S_once; + + + explicit + locale(_Impl*) throw(); + + static void + _S_initialize(); + + static void + _S_initialize_once() throw(); + + static category + _S_normalize_category(category); + + void + _M_coalesce(const locale& __base, const locale& __add, category __cat); + }; +# 337 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + class locale::facet + { + private: + friend class locale; + friend class locale::_Impl; + + mutable _Atomic_word _M_refcount; + + + static __c_locale _S_c_locale; + + + static const char _S_c_name[2]; + + + static __gthread_once_t _S_once; + + + static void + _S_initialize_once(); + + public: +# 368 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + explicit + facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0) + { } + + + virtual + ~facet(); + + static void + _S_create_c_locale(__c_locale& __cloc, const char* __s, + __c_locale __old = 0); + + static __c_locale + _S_clone_c_locale(__c_locale& __cloc) throw(); + + static void + _S_destroy_c_locale(__c_locale& __cloc); + + static __c_locale + _S_lc_ctype_c_locale(__c_locale __cloc, const char* __s); + + + + static __c_locale + _S_get_c_locale(); + + __attribute__ ((__const__)) static const char* + _S_get_c_name() throw(); + + private: + void + _M_add_reference() const throw() + { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } + + void + _M_remove_reference() const throw() + { + if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) + { + try + { delete this; } + catch(...) + { } + } + } + + facet(const facet&); + + facet& + operator=(const facet&); + }; +# 432 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + class locale::id + { + private: + friend class locale; + friend class locale::_Impl; + + template + friend const _Facet& + use_facet(const locale&); + + template + friend bool + has_facet(const locale&) throw(); + + + + + mutable size_t _M_index; + + + static _Atomic_word _S_refcount; + + void + operator=(const id&); + + id(const id&); + + public: + + + + id() { } + + size_t + _M_id() const throw(); + }; + + + + class locale::_Impl + { + public: + + friend class locale; + friend class locale::facet; + + template + friend bool + has_facet(const locale&) throw(); + + template + friend const _Facet& + use_facet(const locale&); + + template + friend struct __use_cache; + + private: + + _Atomic_word _M_refcount; + const facet** _M_facets; + size_t _M_facets_size; + const facet** _M_caches; + char** _M_names; + static const locale::id* const _S_id_ctype[]; + static const locale::id* const _S_id_numeric[]; + static const locale::id* const _S_id_collate[]; + static const locale::id* const _S_id_time[]; + static const locale::id* const _S_id_monetary[]; + static const locale::id* const _S_id_messages[]; + static const locale::id* const* const _S_facet_categories[]; + + void + _M_add_reference() throw() + { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } + + void + _M_remove_reference() throw() + { + if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) + { + try + { delete this; } + catch(...) + { } + } + } + + _Impl(const _Impl&, size_t); + _Impl(const char*, size_t); + _Impl(size_t) throw(); + + ~_Impl() throw(); + + _Impl(const _Impl&); + + void + operator=(const _Impl&); + + bool + _M_check_same_name() + { + bool __ret = true; + if (_M_names[1]) + + for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i) + __ret = __builtin_strcmp(_M_names[__i], _M_names[__i + 1]) == 0; + return __ret; + } + + void + _M_replace_categories(const _Impl*, category); + + void + _M_replace_category(const _Impl*, const locale::id* const*); + + void + _M_replace_facet(const _Impl*, const locale::id*); + + void + _M_install_facet(const locale::id*, const facet*); + + template + void + _M_init_facet(_Facet* __facet) + { _M_install_facet(&_Facet::id, __facet); } + + void + _M_install_cache(const facet*, size_t); + }; +# 575 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + template + bool + has_facet(const locale& __loc) throw(); +# 592 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + template + const _Facet& + use_facet(const locale& __loc); +# 609 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + template + class collate : public locale::facet + { + public: + + + + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + + public: + + + __c_locale _M_c_locale_collate; + + public: + + static locale::id id; +# 636 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + explicit + collate(size_t __refs = 0) + : facet(__refs), _M_c_locale_collate(_S_get_c_locale()) + { } +# 650 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + explicit + collate(__c_locale __cloc, size_t __refs = 0) + : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc)) + { } +# 667 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + int + compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const + { return this->do_compare(__lo1, __hi1, __lo2, __hi2); } +# 686 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + string_type + transform(const _CharT* __lo, const _CharT* __hi) const + { return this->do_transform(__lo, __hi); } +# 700 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + long + hash(const _CharT* __lo, const _CharT* __hi) const + { return this->do_hash(__lo, __hi); } + + + int + _M_compare(const _CharT*, const _CharT*) const throw(); + + size_t + _M_transform(_CharT*, const _CharT*, size_t) const throw(); + + public: + + virtual + ~collate() + { _S_destroy_c_locale(_M_c_locale_collate); } +# 729 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + virtual int + do_compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const; +# 745 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + virtual string_type + do_transform(const _CharT* __lo, const _CharT* __hi) const; +# 758 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 3 + virtual long + do_hash(const _CharT* __lo, const _CharT* __hi) const; + }; + + template + locale::id collate<_CharT>::id; + + + template<> + int + collate::_M_compare(const char*, const char*) const throw(); + + template<> + size_t + collate::_M_transform(char*, const char*, size_t) const throw(); + + + template<> + int + collate::_M_compare(const wchar_t*, const wchar_t*) const throw(); + + template<> + size_t + collate::_M_transform(wchar_t*, const wchar_t*, size_t) const throw(); + + + + template + class collate_byname : public collate<_CharT> + { + public: + + + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + + explicit + collate_byname(const char* __s, size_t __refs = 0) + : collate<_CharT>(__refs) + { + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + this->_S_destroy_c_locale(this->_M_c_locale_collate); + this->_S_create_c_locale(this->_M_c_locale_collate, __s); + } + } + + public: + virtual + ~collate_byname() { } + }; + +} + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.tcc" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.tcc" 3 + +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.tcc" 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + locale:: + locale(const locale& __other, _Facet* __f) + { + _M_impl = new _Impl(*__other._M_impl, 1); + + try + { _M_impl->_M_install_facet(&_Facet::id, __f); } + catch(...) + { + _M_impl->_M_remove_reference(); + throw; + } + delete [] _M_impl->_M_names[0]; + _M_impl->_M_names[0] = 0; + } + + template + locale + locale:: + combine(const locale& __other) const + { + _Impl* __tmp = new _Impl(*_M_impl, 1); + try + { + __tmp->_M_replace_facet(__other._M_impl, &_Facet::id); + } + catch(...) + { + __tmp->_M_remove_reference(); + throw; + } + return locale(__tmp); + } + + template + bool + locale:: + operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1, + const basic_string<_CharT, _Traits, _Alloc>& __s2) const + { + typedef std::collate<_CharT> __collate_type; + const __collate_type& __collate = use_facet<__collate_type>(*this); + return (__collate.compare(__s1.data(), __s1.data() + __s1.length(), + __s2.data(), __s2.data() + __s2.length()) < 0); + } + + + template + bool + has_facet(const locale& __loc) throw() + { + const size_t __i = _Facet::id._M_id(); + const locale::facet** __facets = __loc._M_impl->_M_facets; + return (__i < __loc._M_impl->_M_facets_size + + && dynamic_cast(__facets[__i])); + + + + } + + template + const _Facet& + use_facet(const locale& __loc) + { + const size_t __i = _Facet::id._M_id(); + const locale::facet** __facets = __loc._M_impl->_M_facets; + if (__i >= __loc._M_impl->_M_facets_size || !__facets[__i]) + __throw_bad_cast(); + + return dynamic_cast(*__facets[__i]); + + + + } + + + + template + int + collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const throw () + { return 0; } + + + template + size_t + collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const throw () + { return 0; } + + template + int + collate<_CharT>:: + do_compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const + { + + + const string_type __one(__lo1, __hi1); + const string_type __two(__lo2, __hi2); + + const _CharT* __p = __one.c_str(); + const _CharT* __pend = __one.data() + __one.length(); + const _CharT* __q = __two.c_str(); + const _CharT* __qend = __two.data() + __two.length(); + + + + + for (;;) + { + const int __res = _M_compare(__p, __q); + if (__res) + return __res; + + __p += char_traits<_CharT>::length(__p); + __q += char_traits<_CharT>::length(__q); + if (__p == __pend && __q == __qend) + return 0; + else if (__p == __pend) + return -1; + else if (__q == __qend) + return 1; + + __p++; + __q++; + } + } + + template + typename collate<_CharT>::string_type + collate<_CharT>:: + do_transform(const _CharT* __lo, const _CharT* __hi) const + { + string_type __ret; + + + const string_type __str(__lo, __hi); + + const _CharT* __p = __str.c_str(); + const _CharT* __pend = __str.data() + __str.length(); + + size_t __len = (__hi - __lo) * 2; + + _CharT* __c = new _CharT[__len]; + + try + { + + + + for (;;) + { + + size_t __res = _M_transform(__c, __p, __len); + + + if (__res >= __len) + { + __len = __res + 1; + delete [] __c, __c = 0; + __c = new _CharT[__len]; + __res = _M_transform(__c, __p, __len); + } + + __ret.append(__c, __res); + __p += char_traits<_CharT>::length(__p); + if (__p == __pend) + break; + + __p++; + __ret.push_back(_CharT()); + } + } + catch(...) + { + delete [] __c; + throw; + } + + delete [] __c; + + return __ret; + } + + template + long + collate<_CharT>:: + do_hash(const _CharT* __lo, const _CharT* __hi) const + { + unsigned long __val = 0; + for (; __lo < __hi; ++__lo) + __val = + *__lo + ((__val << 7) + | (__val >> (__gnu_cxx::__numeric_traits:: + __digits - 7))); + return static_cast(__val); + } + + + + + + extern template class collate; + extern template class collate_byname; + + extern template + const collate& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + extern template class collate; + extern template class collate_byname; + + extern template + const collate& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + +} +# 816 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_classes.h" 2 3 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 2 3 +# 54 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + + + + + enum _Ios_Fmtflags + { + _S_boolalpha = 1L << 0, + _S_dec = 1L << 1, + _S_fixed = 1L << 2, + _S_hex = 1L << 3, + _S_internal = 1L << 4, + _S_left = 1L << 5, + _S_oct = 1L << 6, + _S_right = 1L << 7, + _S_scientific = 1L << 8, + _S_showbase = 1L << 9, + _S_showpoint = 1L << 10, + _S_showpos = 1L << 11, + _S_skipws = 1L << 12, + _S_unitbuf = 1L << 13, + _S_uppercase = 1L << 14, + _S_adjustfield = _S_left | _S_right | _S_internal, + _S_basefield = _S_dec | _S_oct | _S_hex, + _S_floatfield = _S_scientific | _S_fixed, + _S_ios_fmtflags_end = 1L << 16 + }; + + inline _Ios_Fmtflags + operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) & static_cast(__b)); } + + inline _Ios_Fmtflags + operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) | static_cast(__b)); } + + inline _Ios_Fmtflags + operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) ^ static_cast(__b)); } + + inline _Ios_Fmtflags& + operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a | __b; } + + inline _Ios_Fmtflags& + operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a & __b; } + + inline _Ios_Fmtflags& + operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a ^ __b; } + + inline _Ios_Fmtflags + operator~(_Ios_Fmtflags __a) + { return _Ios_Fmtflags(~static_cast(__a)); } + + + enum _Ios_Openmode + { + _S_app = 1L << 0, + _S_ate = 1L << 1, + _S_bin = 1L << 2, + _S_in = 1L << 3, + _S_out = 1L << 4, + _S_trunc = 1L << 5, + _S_ios_openmode_end = 1L << 16 + }; + + inline _Ios_Openmode + operator&(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) & static_cast(__b)); } + + inline _Ios_Openmode + operator|(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) | static_cast(__b)); } + + inline _Ios_Openmode + operator^(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) ^ static_cast(__b)); } + + inline _Ios_Openmode& + operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a | __b; } + + inline _Ios_Openmode& + operator&=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a & __b; } + + inline _Ios_Openmode& + operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a ^ __b; } + + inline _Ios_Openmode + operator~(_Ios_Openmode __a) + { return _Ios_Openmode(~static_cast(__a)); } + + + enum _Ios_Iostate + { + _S_goodbit = 0, + _S_badbit = 1L << 0, + _S_eofbit = 1L << 1, + _S_failbit = 1L << 2, + _S_ios_iostate_end = 1L << 16 + }; + + inline _Ios_Iostate + operator&(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) & static_cast(__b)); } + + inline _Ios_Iostate + operator|(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) | static_cast(__b)); } + + inline _Ios_Iostate + operator^(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) ^ static_cast(__b)); } + + inline _Ios_Iostate& + operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a | __b; } + + inline _Ios_Iostate& + operator&=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a & __b; } + + inline _Ios_Iostate& + operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a ^ __b; } + + inline _Ios_Iostate + operator~(_Ios_Iostate __a) + { return _Ios_Iostate(~static_cast(__a)); } + + enum _Ios_Seekdir + { + _S_beg = 0, + _S_cur = 1, + _S_end = 2, + _S_ios_seekdir_end = 1L << 16 + }; +# 207 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 3 + class ios_base + { + public: + + + + + + + + class failure : public exception + { + public: + + + explicit + failure(const string& __str) throw(); + + + + virtual + ~failure() throw(); + + virtual const char* + what() const throw(); + + private: + string _M_msg; + }; +# 263 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 3 + typedef _Ios_Fmtflags fmtflags; + + + static const fmtflags boolalpha = _S_boolalpha; + + + static const fmtflags dec = _S_dec; + + + static const fmtflags fixed = _S_fixed; + + + static const fmtflags hex = _S_hex; + + + + + static const fmtflags internal = _S_internal; + + + + static const fmtflags left = _S_left; + + + static const fmtflags oct = _S_oct; + + + + static const fmtflags right = _S_right; + + + static const fmtflags scientific = _S_scientific; + + + + static const fmtflags showbase = _S_showbase; + + + + static const fmtflags showpoint = _S_showpoint; + + + static const fmtflags showpos = _S_showpos; + + + static const fmtflags skipws = _S_skipws; + + + static const fmtflags unitbuf = _S_unitbuf; + + + + static const fmtflags uppercase = _S_uppercase; + + + static const fmtflags adjustfield = _S_adjustfield; + + + static const fmtflags basefield = _S_basefield; + + + static const fmtflags floatfield = _S_floatfield; +# 338 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 3 + typedef _Ios_Iostate iostate; + + + + static const iostate badbit = _S_badbit; + + + static const iostate eofbit = _S_eofbit; + + + + + static const iostate failbit = _S_failbit; + + + static const iostate goodbit = _S_goodbit; +# 369 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 3 + typedef _Ios_Openmode openmode; + + + static const openmode app = _S_app; + + + static const openmode ate = _S_ate; + + + + + static const openmode binary = _S_bin; + + + static const openmode in = _S_in; + + + static const openmode out = _S_out; + + + static const openmode trunc = _S_trunc; +# 401 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 3 + typedef _Ios_Seekdir seekdir; + + + static const seekdir beg = _S_beg; + + + static const seekdir cur = _S_cur; + + + static const seekdir end = _S_end; + + + typedef int io_state; + typedef int open_mode; + typedef int seek_dir; + + typedef std::streampos streampos; + typedef std::streamoff streamoff; +# 427 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 3 + enum event + { + erase_event, + imbue_event, + copyfmt_event + }; +# 444 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 3 + typedef void (*event_callback) (event, ios_base&, int); +# 456 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 3 + void + register_callback(event_callback __fn, int __index); + + public: + streamsize _M_precision; + streamsize _M_width; + fmtflags _M_flags; + iostate _M_exception; + iostate _M_streambuf_state; + + + + struct _Callback_list + { + + _Callback_list* _M_next; + ios_base::event_callback _M_fn; + int _M_index; + _Atomic_word _M_refcount; + + _Callback_list(ios_base::event_callback __fn, int __index, + _Callback_list* __cb) + : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { } + + void + _M_add_reference() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } + + + int + _M_remove_reference() + { return __gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1); } + }; + + _Callback_list* _M_callbacks; + + void + _M_call_callbacks(event __ev) throw(); + + void + _M_dispose_callbacks(void) throw(); + + + struct _Words + { + void* _M_pword; + long _M_iword; + _Words() : _M_pword(0), _M_iword(0) { } + }; + + + _Words _M_word_zero; + + + + enum { _S_local_word_size = 8 }; + _Words _M_local_word[_S_local_word_size]; + + + int _M_word_size; + _Words* _M_word; + + _Words& + _M_grow_words(int __index, bool __iword); + + + locale _M_ios_locale; + + void + _M_init() throw(); + + public: + + + + + + class Init + { + friend class ios_base; + public: + Init(); + ~Init(); + + private: + static _Atomic_word _S_refcount; + static bool _S_synced_with_stdio; + }; + + + + + + + fmtflags + flags() const + { return _M_flags; } +# 560 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 3 + fmtflags + flags(fmtflags __fmtfl) + { + fmtflags __old = _M_flags; + _M_flags = __fmtfl; + return __old; + } +# 576 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 3 + fmtflags + setf(fmtflags __fmtfl) + { + fmtflags __old = _M_flags; + _M_flags |= __fmtfl; + return __old; + } +# 593 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 3 + fmtflags + setf(fmtflags __fmtfl, fmtflags __mask) + { + fmtflags __old = _M_flags; + _M_flags &= ~__mask; + _M_flags |= (__fmtfl & __mask); + return __old; + } + + + + + + + + void + unsetf(fmtflags __mask) + { _M_flags &= ~__mask; } +# 619 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 3 + streamsize + precision() const + { return _M_precision; } + + + + + + + streamsize + precision(streamsize __prec) + { + streamsize __old = _M_precision; + _M_precision = __prec; + return __old; + } + + + + + + + + streamsize + width() const + { return _M_width; } + + + + + + + streamsize + width(streamsize __wide) + { + streamsize __old = _M_width; + _M_width = __wide; + return __old; + } +# 670 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 3 + static bool + sync_with_stdio(bool __sync = true); +# 682 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 3 + locale + imbue(const locale& __loc) throw(); +# 693 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 3 + locale + getloc() const + { return _M_ios_locale; } +# 704 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 3 + const locale& + _M_getloc() const + { return _M_ios_locale; } +# 723 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 3 + static int + xalloc() throw(); +# 739 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 3 + long& + iword(int __ix) + { + _Words& __word = (__ix < _M_word_size) + ? _M_word[__ix] : _M_grow_words(__ix, true); + return __word._M_iword; + } +# 760 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 3 + void*& + pword(int __ix) + { + _Words& __word = (__ix < _M_word_size) + ? _M_word[__ix] : _M_grow_words(__ix, false); + return __word._M_pword; + } +# 777 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ios_base.h" 3 + virtual ~ios_base(); + + public: + ios_base() throw (); + + + + private: + ios_base(const ios_base&); + + ios_base& + operator=(const ios_base&); + }; + + + + inline ios_base& + boolalpha(ios_base& __base) + { + __base.setf(ios_base::boolalpha); + return __base; + } + + + inline ios_base& + noboolalpha(ios_base& __base) + { + __base.unsetf(ios_base::boolalpha); + return __base; + } + + + inline ios_base& + showbase(ios_base& __base) + { + __base.setf(ios_base::showbase); + return __base; + } + + + inline ios_base& + noshowbase(ios_base& __base) + { + __base.unsetf(ios_base::showbase); + return __base; + } + + + inline ios_base& + showpoint(ios_base& __base) + { + __base.setf(ios_base::showpoint); + return __base; + } + + + inline ios_base& + noshowpoint(ios_base& __base) + { + __base.unsetf(ios_base::showpoint); + return __base; + } + + + inline ios_base& + showpos(ios_base& __base) + { + __base.setf(ios_base::showpos); + return __base; + } + + + inline ios_base& + noshowpos(ios_base& __base) + { + __base.unsetf(ios_base::showpos); + return __base; + } + + + inline ios_base& + skipws(ios_base& __base) + { + __base.setf(ios_base::skipws); + return __base; + } + + + inline ios_base& + noskipws(ios_base& __base) + { + __base.unsetf(ios_base::skipws); + return __base; + } + + + inline ios_base& + uppercase(ios_base& __base) + { + __base.setf(ios_base::uppercase); + return __base; + } + + + inline ios_base& + nouppercase(ios_base& __base) + { + __base.unsetf(ios_base::uppercase); + return __base; + } + + + inline ios_base& + unitbuf(ios_base& __base) + { + __base.setf(ios_base::unitbuf); + return __base; + } + + + inline ios_base& + nounitbuf(ios_base& __base) + { + __base.unsetf(ios_base::unitbuf); + return __base; + } + + + + inline ios_base& + internal(ios_base& __base) + { + __base.setf(ios_base::internal, ios_base::adjustfield); + return __base; + } + + + inline ios_base& + left(ios_base& __base) + { + __base.setf(ios_base::left, ios_base::adjustfield); + return __base; + } + + + inline ios_base& + right(ios_base& __base) + { + __base.setf(ios_base::right, ios_base::adjustfield); + return __base; + } + + + + inline ios_base& + dec(ios_base& __base) + { + __base.setf(ios_base::dec, ios_base::basefield); + return __base; + } + + + inline ios_base& + hex(ios_base& __base) + { + __base.setf(ios_base::hex, ios_base::basefield); + return __base; + } + + + inline ios_base& + oct(ios_base& __base) + { + __base.setf(ios_base::oct, ios_base::basefield); + return __base; + } + + + + inline ios_base& + fixed(ios_base& __base) + { + __base.setf(ios_base::fixed, ios_base::floatfield); + return __base; + } + + + inline ios_base& + scientific(ios_base& __base) + { + __base.setf(ios_base::scientific, ios_base::floatfield); + return __base; + } + +} +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ios" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 +# 46 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + streamsize + __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*, + basic_streambuf<_CharT, _Traits>*, bool&); +# 114 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + template + class basic_streambuf + { + public: + + + + + + + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + + + + typedef basic_streambuf __streambuf_type; + + + friend class basic_ios; + friend class basic_istream; + friend class basic_ostream; + friend class istreambuf_iterator; + friend class ostreambuf_iterator; + + friend streamsize + __copy_streambufs_eof<>(__streambuf_type*, __streambuf_type*, bool&); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + _CharT2*>::__type + __copy_move_a2(istreambuf_iterator<_CharT2>, + istreambuf_iterator<_CharT2>, _CharT2*); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + istreambuf_iterator<_CharT2> >::__type + find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + const _CharT2&); + + template + friend basic_istream<_CharT2, _Traits2>& + operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*); + + template + friend basic_istream<_CharT2, _Traits2>& + operator>>(basic_istream<_CharT2, _Traits2>&, + basic_string<_CharT2, _Traits2, _Alloc>&); + + template + friend basic_istream<_CharT2, _Traits2>& + getline(basic_istream<_CharT2, _Traits2>&, + basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2); + + public: +# 180 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + char_type* _M_in_beg; + char_type* _M_in_cur; + char_type* _M_in_end; + char_type* _M_out_beg; + char_type* _M_out_cur; + char_type* _M_out_end; + + + locale _M_buf_locale; + + public: + + virtual + ~basic_streambuf() + { } +# 204 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + locale + pubimbue(const locale &__loc) + { + locale __tmp(this->getloc()); + this->imbue(__loc); + _M_buf_locale = __loc; + return __tmp; + } +# 221 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + locale + getloc() const + { return _M_buf_locale; } +# 234 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + __streambuf_type* + pubsetbuf(char_type* __s, streamsize __n) + { return this->setbuf(__s, __n); } + + pos_type + pubseekoff(off_type __off, ios_base::seekdir __way, + ios_base::openmode __mode = ios_base::in | ios_base::out) + { return this->seekoff(__off, __way, __mode); } + + pos_type + pubseekpos(pos_type __sp, + ios_base::openmode __mode = ios_base::in | ios_base::out) + { return this->seekpos(__sp, __mode); } + + int + pubsync() { return this->sync(); } +# 261 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + streamsize + in_avail() + { + const streamsize __ret = this->egptr() - this->gptr(); + return __ret ? __ret : this->showmanyc(); + } +# 275 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + int_type + snextc() + { + int_type __ret = traits_type::eof(); + if (__builtin_expect(!traits_type::eq_int_type(this->sbumpc(), + __ret), true)) + __ret = this->sgetc(); + return __ret; + } +# 293 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + int_type + sbumpc() + { + int_type __ret; + if (__builtin_expect(this->gptr() < this->egptr(), true)) + { + __ret = traits_type::to_int_type(*this->gptr()); + this->gbump(1); + } + else + __ret = this->uflow(); + return __ret; + } +# 315 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + int_type + sgetc() + { + int_type __ret; + if (__builtin_expect(this->gptr() < this->egptr(), true)) + __ret = traits_type::to_int_type(*this->gptr()); + else + __ret = this->underflow(); + return __ret; + } +# 334 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + streamsize + sgetn(char_type* __s, streamsize __n) + { return this->xsgetn(__s, __n); } +# 349 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + int_type + sputbackc(char_type __c) + { + int_type __ret; + const bool __testpos = this->eback() < this->gptr(); + if (__builtin_expect(!__testpos || + !traits_type::eq(__c, this->gptr()[-1]), false)) + __ret = this->pbackfail(traits_type::to_int_type(__c)); + else + { + this->gbump(-1); + __ret = traits_type::to_int_type(*this->gptr()); + } + return __ret; + } +# 374 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + int_type + sungetc() + { + int_type __ret; + if (__builtin_expect(this->eback() < this->gptr(), true)) + { + this->gbump(-1); + __ret = traits_type::to_int_type(*this->gptr()); + } + else + __ret = this->pbackfail(); + return __ret; + } +# 401 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + int_type + sputc(char_type __c) + { + int_type __ret; + if (__builtin_expect(this->pptr() < this->epptr(), true)) + { + *this->pptr() = __c; + this->pbump(1); + __ret = traits_type::to_int_type(__c); + } + else + __ret = this->overflow(traits_type::to_int_type(__c)); + return __ret; + } +# 427 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + streamsize + sputn(const char_type* __s, streamsize __n) + { return this->xsputn(__s, __n); } + + public: +# 441 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + basic_streambuf() + : _M_in_beg(0), _M_in_cur(0), _M_in_end(0), + _M_out_beg(0), _M_out_cur(0), _M_out_end(0), + _M_buf_locale(locale()) + { } +# 459 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + char_type* + eback() const { return _M_in_beg; } + + char_type* + gptr() const { return _M_in_cur; } + + char_type* + egptr() const { return _M_in_end; } +# 475 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + void + gbump(int __n) { _M_in_cur += __n; } +# 486 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + void + setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) + { + _M_in_beg = __gbeg; + _M_in_cur = __gnext; + _M_in_end = __gend; + } +# 506 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + char_type* + pbase() const { return _M_out_beg; } + + char_type* + pptr() const { return _M_out_cur; } + + char_type* + epptr() const { return _M_out_end; } +# 522 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + void + pbump(int __n) { _M_out_cur += __n; } +# 532 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + void + setp(char_type* __pbeg, char_type* __pend) + { + _M_out_beg = _M_out_cur = __pbeg; + _M_out_end = __pend; + } +# 553 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + virtual void + imbue(const locale&) + { } +# 568 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + virtual basic_streambuf* + setbuf(char_type*, streamsize) + { return this; } +# 579 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + virtual pos_type + seekoff(off_type, ios_base::seekdir, + ios_base::openmode = ios_base::in | ios_base::out) + { return pos_type(off_type(-1)); } +# 591 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + virtual pos_type + seekpos(pos_type, + ios_base::openmode = ios_base::in | ios_base::out) + { return pos_type(off_type(-1)); } +# 604 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + virtual int + sync() { return 0; } +# 626 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + virtual streamsize + showmanyc() { return 0; } +# 642 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + virtual streamsize + xsgetn(char_type* __s, streamsize __n); +# 664 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + virtual int_type + underflow() + { return traits_type::eof(); } +# 677 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + virtual int_type + uflow() + { + int_type __ret = traits_type::eof(); + const bool __testeof = traits_type::eq_int_type(this->underflow(), + __ret); + if (!__testeof) + { + __ret = traits_type::to_int_type(*this->gptr()); + this->gbump(1); + } + return __ret; + } +# 701 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + virtual int_type + pbackfail(int_type = traits_type::eof()) + { return traits_type::eof(); } +# 719 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + virtual streamsize + xsputn(const char_type* __s, streamsize __n); +# 745 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + virtual int_type + overflow(int_type = traits_type::eof()) + { return traits_type::eof(); } + + + + public: +# 760 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 3 + void + stossc() + { + if (this->gptr() < this->egptr()) + this->gbump(1); + else + this->uflow(); + } + + + private: + + + basic_streambuf(const __streambuf_type& __sb) + : _M_in_beg(__sb._M_in_beg), _M_in_cur(__sb._M_in_cur), + _M_in_end(__sb._M_in_end), _M_out_beg(__sb._M_out_beg), + _M_out_cur(__sb._M_out_cur), _M_out_end(__sb._M_out_cur), + _M_buf_locale(__sb._M_buf_locale) + { } + + __streambuf_type& + operator=(const __streambuf_type&) { return *this; }; + }; + + + template<> + streamsize + __copy_streambufs_eof(basic_streambuf* __sbin, + basic_streambuf* __sbout, bool& __ineof); + + template<> + streamsize + __copy_streambufs_eof(basic_streambuf* __sbin, + basic_streambuf* __sbout, bool& __ineof); + + +} + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/streambuf.tcc" 1 3 +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/streambuf.tcc" 3 + +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/streambuf.tcc" 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + streamsize + basic_streambuf<_CharT, _Traits>:: + xsgetn(char_type* __s, streamsize __n) + { + streamsize __ret = 0; + while (__ret < __n) + { + const streamsize __buf_len = this->egptr() - this->gptr(); + if (__buf_len) + { + const streamsize __remaining = __n - __ret; + const streamsize __len = std::min(__buf_len, __remaining); + traits_type::copy(__s, this->gptr(), __len); + __ret += __len; + __s += __len; + this->gbump(__len); + } + + if (__ret < __n) + { + const int_type __c = this->uflow(); + if (!traits_type::eq_int_type(__c, traits_type::eof())) + { + traits_type::assign(*__s++, traits_type::to_char_type(__c)); + ++__ret; + } + else + break; + } + } + return __ret; + } + + template + streamsize + basic_streambuf<_CharT, _Traits>:: + xsputn(const char_type* __s, streamsize __n) + { + streamsize __ret = 0; + while (__ret < __n) + { + const streamsize __buf_len = this->epptr() - this->pptr(); + if (__buf_len) + { + const streamsize __remaining = __n - __ret; + const streamsize __len = std::min(__buf_len, __remaining); + traits_type::copy(this->pptr(), __s, __len); + __ret += __len; + __s += __len; + this->pbump(__len); + } + + if (__ret < __n) + { + int_type __c = this->overflow(traits_type::to_int_type(*__s)); + if (!traits_type::eq_int_type(__c, traits_type::eof())) + { + ++__ret; + ++__s; + } + else + break; + } + } + return __ret; + } + + + + + template + streamsize + __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>* __sbin, + basic_streambuf<_CharT, _Traits>* __sbout, + bool& __ineof) + { + streamsize __ret = 0; + __ineof = true; + typename _Traits::int_type __c = __sbin->sgetc(); + while (!_Traits::eq_int_type(__c, _Traits::eof())) + { + __c = __sbout->sputc(_Traits::to_char_type(__c)); + if (_Traits::eq_int_type(__c, _Traits::eof())) + { + __ineof = false; + break; + } + ++__ret; + __c = __sbin->snextc(); + } + return __ret; + } + + template + inline streamsize + __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, + basic_streambuf<_CharT, _Traits>* __sbout) + { + bool __ineof; + return __copy_streambufs_eof(__sbin, __sbout, __ineof); + } + + + + + + extern template class basic_streambuf; + extern template + streamsize + __copy_streambufs(basic_streambuf*, + basic_streambuf*); + extern template + streamsize + __copy_streambufs_eof(basic_streambuf*, + basic_streambuf*, bool&); + + + extern template class basic_streambuf; + extern template + streamsize + __copy_streambufs(basic_streambuf*, + basic_streambuf*); + extern template + streamsize + __copy_streambufs_eof(basic_streambuf*, + basic_streambuf*, bool&); + + + +} +# 800 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/streambuf" 2 3 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ios" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_ios.h" 1 3 +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_ios.h" 3 + +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_ios.h" 3 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 1 3 +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cwctype" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cwctype" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cwctype" 3 + + + + +# 1 "/usr/include/wctype.h" 1 3 4 +# 34 "/usr/include/wctype.h" 3 4 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 35 "/usr/include/wctype.h" 2 3 4 +# 50 "/usr/include/wctype.h" 3 4 + + + +typedef unsigned long int wctype_t; + +# 72 "/usr/include/wctype.h" 3 4 +enum +{ + __ISwupper = 0, + __ISwlower = 1, + __ISwalpha = 2, + __ISwdigit = 3, + __ISwxdigit = 4, + __ISwspace = 5, + __ISwprint = 6, + __ISwgraph = 7, + __ISwblank = 8, + __ISwcntrl = 9, + __ISwpunct = 10, + __ISwalnum = 11, + + _ISwupper = ((__ISwupper) < 8 ? (int) ((1UL << (__ISwupper)) << 24) : ((__ISwupper) < 16 ? (int) ((1UL << (__ISwupper)) << 8) : ((__ISwupper) < 24 ? (int) ((1UL << (__ISwupper)) >> 8) : (int) ((1UL << (__ISwupper)) >> 24)))), + _ISwlower = ((__ISwlower) < 8 ? (int) ((1UL << (__ISwlower)) << 24) : ((__ISwlower) < 16 ? (int) ((1UL << (__ISwlower)) << 8) : ((__ISwlower) < 24 ? (int) ((1UL << (__ISwlower)) >> 8) : (int) ((1UL << (__ISwlower)) >> 24)))), + _ISwalpha = ((__ISwalpha) < 8 ? (int) ((1UL << (__ISwalpha)) << 24) : ((__ISwalpha) < 16 ? (int) ((1UL << (__ISwalpha)) << 8) : ((__ISwalpha) < 24 ? (int) ((1UL << (__ISwalpha)) >> 8) : (int) ((1UL << (__ISwalpha)) >> 24)))), + _ISwdigit = ((__ISwdigit) < 8 ? (int) ((1UL << (__ISwdigit)) << 24) : ((__ISwdigit) < 16 ? (int) ((1UL << (__ISwdigit)) << 8) : ((__ISwdigit) < 24 ? (int) ((1UL << (__ISwdigit)) >> 8) : (int) ((1UL << (__ISwdigit)) >> 24)))), + _ISwxdigit = ((__ISwxdigit) < 8 ? (int) ((1UL << (__ISwxdigit)) << 24) : ((__ISwxdigit) < 16 ? (int) ((1UL << (__ISwxdigit)) << 8) : ((__ISwxdigit) < 24 ? (int) ((1UL << (__ISwxdigit)) >> 8) : (int) ((1UL << (__ISwxdigit)) >> 24)))), + _ISwspace = ((__ISwspace) < 8 ? (int) ((1UL << (__ISwspace)) << 24) : ((__ISwspace) < 16 ? (int) ((1UL << (__ISwspace)) << 8) : ((__ISwspace) < 24 ? (int) ((1UL << (__ISwspace)) >> 8) : (int) ((1UL << (__ISwspace)) >> 24)))), + _ISwprint = ((__ISwprint) < 8 ? (int) ((1UL << (__ISwprint)) << 24) : ((__ISwprint) < 16 ? (int) ((1UL << (__ISwprint)) << 8) : ((__ISwprint) < 24 ? (int) ((1UL << (__ISwprint)) >> 8) : (int) ((1UL << (__ISwprint)) >> 24)))), + _ISwgraph = ((__ISwgraph) < 8 ? (int) ((1UL << (__ISwgraph)) << 24) : ((__ISwgraph) < 16 ? (int) ((1UL << (__ISwgraph)) << 8) : ((__ISwgraph) < 24 ? (int) ((1UL << (__ISwgraph)) >> 8) : (int) ((1UL << (__ISwgraph)) >> 24)))), + _ISwblank = ((__ISwblank) < 8 ? (int) ((1UL << (__ISwblank)) << 24) : ((__ISwblank) < 16 ? (int) ((1UL << (__ISwblank)) << 8) : ((__ISwblank) < 24 ? (int) ((1UL << (__ISwblank)) >> 8) : (int) ((1UL << (__ISwblank)) >> 24)))), + _ISwcntrl = ((__ISwcntrl) < 8 ? (int) ((1UL << (__ISwcntrl)) << 24) : ((__ISwcntrl) < 16 ? (int) ((1UL << (__ISwcntrl)) << 8) : ((__ISwcntrl) < 24 ? (int) ((1UL << (__ISwcntrl)) >> 8) : (int) ((1UL << (__ISwcntrl)) >> 24)))), + _ISwpunct = ((__ISwpunct) < 8 ? (int) ((1UL << (__ISwpunct)) << 24) : ((__ISwpunct) < 16 ? (int) ((1UL << (__ISwpunct)) << 8) : ((__ISwpunct) < 24 ? (int) ((1UL << (__ISwpunct)) >> 8) : (int) ((1UL << (__ISwpunct)) >> 24)))), + _ISwalnum = ((__ISwalnum) < 8 ? (int) ((1UL << (__ISwalnum)) << 24) : ((__ISwalnum) < 16 ? (int) ((1UL << (__ISwalnum)) << 8) : ((__ISwalnum) < 24 ? (int) ((1UL << (__ISwalnum)) >> 8) : (int) ((1UL << (__ISwalnum)) >> 24)))) +}; + + + +extern "C" { + + + + + + + + +extern int iswalnum (wint_t __wc) throw (); + + + + + +extern int iswalpha (wint_t __wc) throw (); + + +extern int iswcntrl (wint_t __wc) throw (); + + + +extern int iswdigit (wint_t __wc) throw (); + + + +extern int iswgraph (wint_t __wc) throw (); + + + + +extern int iswlower (wint_t __wc) throw (); + + +extern int iswprint (wint_t __wc) throw (); + + + + +extern int iswpunct (wint_t __wc) throw (); + + + + +extern int iswspace (wint_t __wc) throw (); + + + + +extern int iswupper (wint_t __wc) throw (); + + + + +extern int iswxdigit (wint_t __wc) throw (); + + + + + +extern int iswblank (wint_t __wc) throw (); +# 172 "/usr/include/wctype.h" 3 4 +extern wctype_t wctype (__const char *__property) throw (); + + + +extern int iswctype (wint_t __wc, wctype_t __desc) throw (); + + + + + + + + + + +typedef __const __int32_t *wctrans_t; + + + + + + + +extern wint_t towlower (wint_t __wc) throw (); + + +extern wint_t towupper (wint_t __wc) throw (); + + +} +# 214 "/usr/include/wctype.h" 3 4 +extern "C" { + + + + +extern wctrans_t wctrans (__const char *__property) throw (); + + +extern wint_t towctrans (wint_t __wc, wctrans_t __desc) throw (); + + + + + + + + +extern int iswalnum_l (wint_t __wc, __locale_t __locale) throw (); + + + + + +extern int iswalpha_l (wint_t __wc, __locale_t __locale) throw (); + + +extern int iswcntrl_l (wint_t __wc, __locale_t __locale) throw (); + + + +extern int iswdigit_l (wint_t __wc, __locale_t __locale) throw (); + + + +extern int iswgraph_l (wint_t __wc, __locale_t __locale) throw (); + + + + +extern int iswlower_l (wint_t __wc, __locale_t __locale) throw (); + + +extern int iswprint_l (wint_t __wc, __locale_t __locale) throw (); + + + + +extern int iswpunct_l (wint_t __wc, __locale_t __locale) throw (); + + + + +extern int iswspace_l (wint_t __wc, __locale_t __locale) throw (); + + + + +extern int iswupper_l (wint_t __wc, __locale_t __locale) throw (); + + + + +extern int iswxdigit_l (wint_t __wc, __locale_t __locale) throw (); + + + + +extern int iswblank_l (wint_t __wc, __locale_t __locale) throw (); + + + +extern wctype_t wctype_l (__const char *__property, __locale_t __locale) + throw (); + + + +extern int iswctype_l (wint_t __wc, wctype_t __desc, __locale_t __locale) + throw (); + + + + + + + +extern wint_t towlower_l (wint_t __wc, __locale_t __locale) throw (); + + +extern wint_t towupper_l (wint_t __wc, __locale_t __locale) throw (); + + + +extern wctrans_t wctrans_l (__const char *__property, __locale_t __locale) + throw (); + + +extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc, + __locale_t __locale) throw (); + + + +} +# 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cwctype" 2 3 +# 76 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cwctype" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + using ::wctrans_t; + using ::wctype_t; + using ::wint_t; + + using ::iswalnum; + using ::iswalpha; + + using ::iswblank; + + using ::iswcntrl; + using ::iswctype; + using ::iswdigit; + using ::iswgraph; + using ::iswlower; + using ::iswprint; + using ::iswpunct; + using ::iswspace; + using ::iswupper; + using ::iswxdigit; + using ::towctrans; + using ::towlower; + using ::towupper; + using ::wctrans; + using ::wctype; + +} +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cctype" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cctype" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cctype" 3 +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/ctype_base.h" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/ctype_base.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + + struct ctype_base + { + + typedef const int* __to_type; + + + + typedef unsigned short mask; + static const mask upper = _ISupper; + static const mask lower = _ISlower; + static const mask alpha = _ISalpha; + static const mask digit = _ISdigit; + static const mask xdigit = _ISxdigit; + static const mask space = _ISspace; + static const mask print = _ISprint; + static const mask graph = _ISalpha | _ISdigit | _ISpunct; + static const mask cntrl = _IScntrl; + static const mask punct = _ISpunct; + static const mask alnum = _ISalpha | _ISdigit; + }; + +} +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 2 3 + + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/streambuf_iterator.h" 1 3 +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/streambuf_iterator.h" 3 + +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/streambuf_iterator.h" 3 + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 49 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/streambuf_iterator.h" 3 + template + class istreambuf_iterator + : public iterator + { + public: + + + + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename _Traits::int_type int_type; + typedef basic_streambuf<_CharT, _Traits> streambuf_type; + typedef basic_istream<_CharT, _Traits> istream_type; + + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + ostreambuf_iterator<_CharT2> >::__type + copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + ostreambuf_iterator<_CharT2>); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + _CharT2*>::__type + __copy_move_a2(istreambuf_iterator<_CharT2>, + istreambuf_iterator<_CharT2>, _CharT2*); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + istreambuf_iterator<_CharT2> >::__type + find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + const _CharT2&); + + private: + + + + + + + + mutable streambuf_type* _M_sbuf; + mutable int_type _M_c; + + public: + + istreambuf_iterator() throw() + : _M_sbuf(0), _M_c(traits_type::eof()) { } + + + istreambuf_iterator(istream_type& __s) throw() + : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { } + + + istreambuf_iterator(streambuf_type* __s) throw() + : _M_sbuf(__s), _M_c(traits_type::eof()) { } + + + + + char_type + operator*() const + { + + + + + + + + return traits_type::to_char_type(_M_get()); + } + + + istreambuf_iterator& + operator++() + { + + + ; + if (_M_sbuf) + { + _M_sbuf->sbumpc(); + _M_c = traits_type::eof(); + } + return *this; + } + + + istreambuf_iterator + operator++(int) + { + + + ; + + istreambuf_iterator __old = *this; + if (_M_sbuf) + { + __old._M_c = _M_sbuf->sbumpc(); + _M_c = traits_type::eof(); + } + return __old; + } + + + + + + bool + equal(const istreambuf_iterator& __b) const + { return _M_at_eof() == __b._M_at_eof(); } + + private: + int_type + _M_get() const + { + const int_type __eof = traits_type::eof(); + int_type __ret = __eof; + if (_M_sbuf) + { + if (!traits_type::eq_int_type(_M_c, __eof)) + __ret = _M_c; + else if (!traits_type::eq_int_type((__ret = _M_sbuf->sgetc()), + __eof)) + _M_c = __ret; + else + _M_sbuf = 0; + } + return __ret; + } + + bool + _M_at_eof() const + { + const int_type __eof = traits_type::eof(); + return traits_type::eq_int_type(_M_get(), __eof); + } + }; + + template + inline bool + operator==(const istreambuf_iterator<_CharT, _Traits>& __a, + const istreambuf_iterator<_CharT, _Traits>& __b) + { return __a.equal(__b); } + + template + inline bool + operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, + const istreambuf_iterator<_CharT, _Traits>& __b) + { return !__a.equal(__b); } + + + template + class ostreambuf_iterator + : public iterator + { + public: + + + + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_streambuf<_CharT, _Traits> streambuf_type; + typedef basic_ostream<_CharT, _Traits> ostream_type; + + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + ostreambuf_iterator<_CharT2> >::__type + copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + ostreambuf_iterator<_CharT2>); + + private: + streambuf_type* _M_sbuf; + bool _M_failed; + + public: + + ostreambuf_iterator(ostream_type& __s) throw () + : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { } + + + ostreambuf_iterator(streambuf_type* __s) throw () + : _M_sbuf(__s), _M_failed(!_M_sbuf) { } + + + ostreambuf_iterator& + operator=(_CharT __c) + { + if (!_M_failed && + _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof())) + _M_failed = true; + return *this; + } + + + ostreambuf_iterator& + operator*() + { return *this; } + + + ostreambuf_iterator& + operator++(int) + { return *this; } + + + ostreambuf_iterator& + operator++() + { return *this; } + + + bool + failed() const throw() + { return _M_failed; } + + ostreambuf_iterator& + _M_put(const _CharT* __ws, streamsize __len) + { + if (__builtin_expect(!_M_failed, true) + && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len, + false)) + _M_failed = true; + return *this; + } + }; + + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT> >::__type + copy(istreambuf_iterator<_CharT> __first, + istreambuf_iterator<_CharT> __last, + ostreambuf_iterator<_CharT> __result) + { + if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed) + { + bool __ineof; + __copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof); + if (!__ineof) + __result._M_failed = true; + } + return __result; + } + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT> >::__type + __copy_move_a2(_CharT* __first, _CharT* __last, + ostreambuf_iterator<_CharT> __result) + { + const streamsize __num = __last - __first; + if (__num > 0) + __result._M_put(__first, __num); + return __result; + } + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT> >::__type + __copy_move_a2(const _CharT* __first, const _CharT* __last, + ostreambuf_iterator<_CharT> __result) + { + const streamsize __num = __last - __first; + if (__num > 0) + __result._M_put(__first, __num); + return __result; + } + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + _CharT*>::__type + __copy_move_a2(istreambuf_iterator<_CharT> __first, + istreambuf_iterator<_CharT> __last, _CharT* __result) + { + typedef istreambuf_iterator<_CharT> __is_iterator_type; + typedef typename __is_iterator_type::traits_type traits_type; + typedef typename __is_iterator_type::streambuf_type streambuf_type; + typedef typename traits_type::int_type int_type; + + if (__first._M_sbuf && !__last._M_sbuf) + { + streambuf_type* __sb = __first._M_sbuf; + int_type __c = __sb->sgetc(); + while (!traits_type::eq_int_type(__c, traits_type::eof())) + { + const streamsize __n = __sb->egptr() - __sb->gptr(); + if (__n > 1) + { + traits_type::copy(__result, __sb->gptr(), __n); + __sb->gbump(__n); + __result += __n; + __c = __sb->underflow(); + } + else + { + *__result++ = traits_type::to_char_type(__c); + __c = __sb->snextc(); + } + } + } + return __result; + } + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + istreambuf_iterator<_CharT> >::__type + find(istreambuf_iterator<_CharT> __first, + istreambuf_iterator<_CharT> __last, const _CharT& __val) + { + typedef istreambuf_iterator<_CharT> __is_iterator_type; + typedef typename __is_iterator_type::traits_type traits_type; + typedef typename __is_iterator_type::streambuf_type streambuf_type; + typedef typename traits_type::int_type int_type; + + if (__first._M_sbuf && !__last._M_sbuf) + { + const int_type __ival = traits_type::to_int_type(__val); + streambuf_type* __sb = __first._M_sbuf; + int_type __c = __sb->sgetc(); + while (!traits_type::eq_int_type(__c, traits_type::eof()) + && !traits_type::eq_int_type(__c, __ival)) + { + streamsize __n = __sb->egptr() - __sb->gptr(); + if (__n > 1) + { + const _CharT* __p = traits_type::find(__sb->gptr(), + __n, __val); + if (__p) + __n = __p - __sb->gptr(); + __sb->gbump(__n); + __c = __sb->sgetc(); + } + else + __c = __sb->snextc(); + } + + if (!traits_type::eq_int_type(__c, traits_type::eof())) + __first._M_c = __c; + else + __first._M_sbuf = 0; + } + return __first; + } + + + +} +# 51 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + template + void + __convert_to_v(const char*, _Tp&, ios_base::iostate&, + const __c_locale&) throw(); + + + template<> + void + __convert_to_v(const char*, float&, ios_base::iostate&, + const __c_locale&) throw(); + + template<> + void + __convert_to_v(const char*, double&, ios_base::iostate&, + const __c_locale&) throw(); + + template<> + void + __convert_to_v(const char*, long double&, ios_base::iostate&, + const __c_locale&) throw(); + + + + template + struct __pad + { + static void + _S_pad(ios_base& __io, _CharT __fill, _CharT* __news, + const _CharT* __olds, streamsize __newlen, streamsize __oldlen); + }; + + + + + + + template + _CharT* + __add_grouping(_CharT* __s, _CharT __sep, + const char* __gbeg, size_t __gsize, + const _CharT* __first, const _CharT* __last); + + + + + template + inline + ostreambuf_iterator<_CharT> + __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len) + { + __s._M_put(__ws, __len); + return __s; + } + + + template + inline + _OutIter + __write(_OutIter __s, const _CharT* __ws, int __len) + { + for (int __j = 0; __j < __len; __j++, ++__s) + *__s = __ws[__j]; + return __s; + } +# 142 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + template + class __ctype_abstract_base : public locale::facet, public ctype_base + { + public: + + + typedef _CharT char_type; +# 160 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + bool + is(mask __m, char_type __c) const + { return this->do_is(__m, __c); } +# 177 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + is(const char_type *__lo, const char_type *__hi, mask *__vec) const + { return this->do_is(__lo, __hi, __vec); } +# 193 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + scan_is(mask __m, const char_type* __lo, const char_type* __hi) const + { return this->do_scan_is(__m, __lo, __hi); } +# 209 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + scan_not(mask __m, const char_type* __lo, const char_type* __hi) const + { return this->do_scan_not(__m, __lo, __hi); } +# 223 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + char_type + toupper(char_type __c) const + { return this->do_toupper(__c); } +# 238 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + toupper(char_type *__lo, const char_type* __hi) const + { return this->do_toupper(__lo, __hi); } +# 252 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + char_type + tolower(char_type __c) const + { return this->do_tolower(__c); } +# 267 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + tolower(char_type* __lo, const char_type* __hi) const + { return this->do_tolower(__lo, __hi); } +# 284 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + char_type + widen(char __c) const + { return this->do_widen(__c); } +# 303 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + const char* + widen(const char* __lo, const char* __hi, char_type* __to) const + { return this->do_widen(__lo, __hi, __to); } +# 322 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + char + narrow(char_type __c, char __dfault) const + { return this->do_narrow(__c, __dfault); } +# 344 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char *__to) const + { return this->do_narrow(__lo, __hi, __dfault, __to); } + + public: + explicit + __ctype_abstract_base(size_t __refs = 0): facet(__refs) { } + + virtual + ~__ctype_abstract_base() { } +# 369 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual bool + do_is(mask __m, char_type __c) const = 0; +# 388 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_is(const char_type* __lo, const char_type* __hi, + mask* __vec) const = 0; +# 407 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_scan_is(mask __m, const char_type* __lo, + const char_type* __hi) const = 0; +# 426 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_scan_not(mask __m, const char_type* __lo, + const char_type* __hi) const = 0; +# 444 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_toupper(char_type) const = 0; +# 461 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const = 0; +# 477 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_tolower(char_type) const = 0; +# 494 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const = 0; +# 513 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_widen(char) const = 0; +# 534 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual const char* + do_widen(const char* __lo, const char* __hi, + char_type* __dest) const = 0; +# 556 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual char + do_narrow(char_type, char __dfault) const = 0; +# 580 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char* __dest) const = 0; + }; +# 603 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + template + class ctype : public __ctype_abstract_base<_CharT> + { + public: + + typedef _CharT char_type; + typedef typename __ctype_abstract_base<_CharT>::mask mask; + + + static locale::id id; + + explicit + ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { } + + public: + virtual + ~ctype(); + + virtual bool + do_is(mask __m, char_type __c) const; + + virtual const char_type* + do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; + + virtual const char_type* + do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; + + virtual const char_type* + do_scan_not(mask __m, const char_type* __lo, + const char_type* __hi) const; + + virtual char_type + do_toupper(char_type __c) const; + + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const; + + virtual char_type + do_tolower(char_type __c) const; + + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const; + + virtual char_type + do_widen(char __c) const; + + virtual const char* + do_widen(const char* __lo, const char* __hi, char_type* __dest) const; + + virtual char + do_narrow(char_type, char __dfault) const; + + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char* __dest) const; + }; + + template + locale::id ctype<_CharT>::id; +# 672 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + template<> + class ctype : public locale::facet, public ctype_base + { + public: + + + typedef char char_type; + + public: + + __c_locale _M_c_locale_ctype; + bool _M_del; + __to_type _M_toupper; + __to_type _M_tolower; + const mask* _M_table; + mutable char _M_widen_ok; + mutable char _M_widen[1 + static_cast(-1)]; + mutable char _M_narrow[1 + static_cast(-1)]; + mutable char _M_narrow_ok; + + + public: + + static locale::id id; + + static const size_t table_size = 1 + static_cast(-1); +# 709 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + explicit + ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0); +# 722 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + explicit + ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false, + size_t __refs = 0); +# 735 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + inline bool + is(mask __m, char __c) const; +# 750 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + inline const char* + is(const char* __lo, const char* __hi, mask* __vec) const; +# 764 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + inline const char* + scan_is(mask __m, const char* __lo, const char* __hi) const; +# 778 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + inline const char* + scan_not(mask __m, const char* __lo, const char* __hi) const; +# 793 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + char_type + toupper(char_type __c) const + { return this->do_toupper(__c); } +# 810 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + toupper(char_type *__lo, const char_type* __hi) const + { return this->do_toupper(__lo, __hi); } +# 826 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + char_type + tolower(char_type __c) const + { return this->do_tolower(__c); } +# 843 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + tolower(char_type* __lo, const char_type* __hi) const + { return this->do_tolower(__lo, __hi); } +# 863 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + char_type + widen(char __c) const + { + if (_M_widen_ok) + return _M_widen[static_cast(__c)]; + this->_M_widen_init(); + return this->do_widen(__c); + } +# 890 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + const char* + widen(const char* __lo, const char* __hi, char_type* __to) const + { + if (_M_widen_ok == 1) + { + __builtin_memcpy(__to, __lo, __hi - __lo); + return __hi; + } + if (!_M_widen_ok) + _M_widen_init(); + return this->do_widen(__lo, __hi, __to); + } +# 921 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + char + narrow(char_type __c, char __dfault) const + { + if (_M_narrow[static_cast(__c)]) + return _M_narrow[static_cast(__c)]; + const char __t = do_narrow(__c, __dfault); + if (__t != __dfault) + _M_narrow[static_cast(__c)] = __t; + return __t; + } +# 954 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char *__to) const + { + if (__builtin_expect(_M_narrow_ok == 1, true)) + { + __builtin_memcpy(__to, __lo, __hi - __lo); + return __hi; + } + if (!_M_narrow_ok) + _M_narrow_init(); + return this->do_narrow(__lo, __hi, __dfault, __to); + } + + + + + + const mask* + table() const throw() + { return _M_table; } + + + static const mask* + classic_table() throw(); + public: + + + + + + + + virtual + ~ctype(); +# 1003 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_toupper(char_type) const; +# 1020 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const; +# 1036 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_tolower(char_type) const; +# 1053 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const; +# 1073 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_widen(char __c) const + { return __c; } +# 1096 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual const char* + do_widen(const char* __lo, const char* __hi, char_type* __dest) const + { + __builtin_memcpy(__dest, __lo, __hi - __lo); + return __hi; + } +# 1122 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual char + do_narrow(char_type __c, char) const + { return __c; } +# 1148 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char, char* __dest) const + { + __builtin_memcpy(__dest, __lo, __hi - __lo); + return __hi; + } + + private: + void _M_narrow_init() const; + void _M_widen_init() const; + }; +# 1173 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + template<> + class ctype : public __ctype_abstract_base + { + public: + + + typedef wchar_t char_type; + typedef wctype_t __wmask_type; + + public: + __c_locale _M_c_locale_ctype; + + + bool _M_narrow_ok; + char _M_narrow[128]; + wint_t _M_widen[1 + static_cast(-1)]; + + + mask _M_bit[16]; + __wmask_type _M_wmask[16]; + + public: + + + static locale::id id; +# 1206 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + explicit + ctype(size_t __refs = 0); +# 1217 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + explicit + ctype(__c_locale __cloc, size_t __refs = 0); + + public: + __wmask_type + _M_convert_to_wmask(const mask __m) const throw(); + + + virtual + ~ctype(); +# 1241 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual bool + do_is(mask __m, char_type __c) const; +# 1260 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; +# 1278 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; +# 1296 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_scan_not(mask __m, const char_type* __lo, + const char_type* __hi) const; +# 1313 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_toupper(char_type) const; +# 1330 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const; +# 1346 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_tolower(char_type) const; +# 1363 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const; +# 1383 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_widen(char) const; +# 1405 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual const char* + do_widen(const char* __lo, const char* __hi, char_type* __dest) const; +# 1428 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual char + do_narrow(char_type, char __dfault) const; +# 1454 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char* __dest) const; + + + void + _M_initialize_ctype() throw(); + }; + + + + template + class ctype_byname : public ctype<_CharT> + { + public: + typedef typename ctype<_CharT>::mask mask; + + explicit + ctype_byname(const char* __s, size_t __refs = 0); + + public: + virtual + ~ctype_byname() { }; + }; + + + template<> + class ctype_byname : public ctype + { + public: + explicit + ctype_byname(const char* __s, size_t __refs = 0); + + public: + virtual + ~ctype_byname(); + }; + + + template<> + class ctype_byname : public ctype + { + public: + explicit + ctype_byname(const char* __s, size_t __refs = 0); + + public: + virtual + ~ctype_byname(); + }; + + +} + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/ctype_inline.h" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/ctype_inline.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + bool + ctype:: + is(mask __m, char __c) const + { return _M_table[static_cast(__c)] & __m; } + + const char* + ctype:: + is(const char* __low, const char* __high, mask* __vec) const + { + while (__low < __high) + *__vec++ = _M_table[static_cast(*__low++)]; + return __high; + } + + const char* + ctype:: + scan_is(mask __m, const char* __low, const char* __high) const + { + while (__low < __high + && !(_M_table[static_cast(*__low)] & __m)) + ++__low; + return __low; + } + + const char* + ctype:: + scan_not(mask __m, const char* __low, const char* __high) const + { + while (__low < __high + && (_M_table[static_cast(*__low)] & __m) != 0) + ++__low; + return __low; + } + +} +# 1510 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + class __num_base + { + public: + + + enum + { + _S_ominus, + _S_oplus, + _S_ox, + _S_oX, + _S_odigits, + _S_odigits_end = _S_odigits + 16, + _S_oudigits = _S_odigits_end, + _S_oudigits_end = _S_oudigits + 16, + _S_oe = _S_odigits + 14, + _S_oE = _S_oudigits + 14, + _S_oend = _S_oudigits_end + }; + + + + + + + static const char* _S_atoms_out; + + + + static const char* _S_atoms_in; + + enum + { + _S_iminus, + _S_iplus, + _S_ix, + _S_iX, + _S_izero, + _S_ie = _S_izero + 14, + _S_iE = _S_izero + 20, + _S_iend = 26 + }; + + + + static void + _S_format_float(const ios_base& __io, char* __fptr, char __mod) throw(); + }; + + template + struct __numpunct_cache : public locale::facet + { + const char* _M_grouping; + size_t _M_grouping_size; + bool _M_use_grouping; + const _CharT* _M_truename; + size_t _M_truename_size; + const _CharT* _M_falsename; + size_t _M_falsename_size; + _CharT _M_decimal_point; + _CharT _M_thousands_sep; + + + + + + _CharT _M_atoms_out[__num_base::_S_oend]; + + + + + + _CharT _M_atoms_in[__num_base::_S_iend]; + + bool _M_allocated; + + __numpunct_cache(size_t __refs = 0) : facet(__refs), + _M_grouping(__null), _M_grouping_size(0), _M_use_grouping(false), + _M_truename(__null), _M_truename_size(0), _M_falsename(__null), + _M_falsename_size(0), _M_decimal_point(_CharT()), + _M_thousands_sep(_CharT()), _M_allocated(false) + { } + + ~__numpunct_cache(); + + void + _M_cache(const locale& __loc); + + private: + __numpunct_cache& + operator=(const __numpunct_cache&); + + explicit + __numpunct_cache(const __numpunct_cache&); + }; + + template + __numpunct_cache<_CharT>::~__numpunct_cache() + { + if (_M_allocated) + { + delete [] _M_grouping; + delete [] _M_truename; + delete [] _M_falsename; + } + } +# 1635 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + template + class numpunct : public locale::facet + { + public: + + + + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + typedef __numpunct_cache<_CharT> __cache_type; + + public: + __cache_type* _M_data; + + public: + + static locale::id id; + + + + + + + explicit + numpunct(size_t __refs = 0) : facet(__refs), _M_data(__null) + { _M_initialize_numpunct(); } +# 1672 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + explicit + numpunct(__cache_type* __cache, size_t __refs = 0) + : facet(__refs), _M_data(__cache) + { _M_initialize_numpunct(); } +# 1686 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + explicit + numpunct(__c_locale __cloc, size_t __refs = 0) + : facet(__refs), _M_data(__null) + { _M_initialize_numpunct(__cloc); } +# 1700 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + char_type + decimal_point() const + { return this->do_decimal_point(); } +# 1713 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + char_type + thousands_sep() const + { return this->do_thousands_sep(); } +# 1744 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + string + grouping() const + { return this->do_grouping(); } +# 1757 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + string_type + truename() const + { return this->do_truename(); } +# 1770 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + string_type + falsename() const + { return this->do_falsename(); } + + public: + + virtual + ~numpunct(); +# 1787 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_decimal_point() const + { return _M_data->_M_decimal_point; } +# 1799 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_thousands_sep() const + { return _M_data->_M_thousands_sep; } +# 1812 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual string + do_grouping() const + { return _M_data->_M_grouping; } +# 1825 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual string_type + do_truename() const + { return _M_data->_M_truename; } +# 1838 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual string_type + do_falsename() const + { return _M_data->_M_falsename; } + + + void + _M_initialize_numpunct(__c_locale __cloc = __null); + }; + + template + locale::id numpunct<_CharT>::id; + + template<> + numpunct::~numpunct(); + + template<> + void + numpunct::_M_initialize_numpunct(__c_locale __cloc); + + + template<> + numpunct::~numpunct(); + + template<> + void + numpunct::_M_initialize_numpunct(__c_locale __cloc); + + + + template + class numpunct_byname : public numpunct<_CharT> + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + explicit + numpunct_byname(const char* __s, size_t __refs = 0) + : numpunct<_CharT>(__refs) + { + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + __c_locale __tmp; + this->_S_create_c_locale(__tmp, __s); + this->_M_initialize_numpunct(__tmp); + this->_S_destroy_c_locale(__tmp); + } + } + + public: + virtual + ~numpunct_byname() { } + }; + + +# 1908 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + template + class num_get : public locale::facet + { + public: + + + + typedef _CharT char_type; + typedef _InIter iter_type; + + + + static locale::id id; +# 1929 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + explicit + num_get(size_t __refs = 0) : facet(__refs) { } +# 1955 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, bool& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } +# 1991 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned short& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned int& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long long& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long long& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } +# 2050 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, float& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, double& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long double& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } +# 2092 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, void*& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + + public: + + virtual ~num_get() { } + + iter_type + _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&, + string&) const; + + template + iter_type + _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&, + _ValueT&) const; + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, int>::__type + _M_find(const _CharT2*, size_t __len, _CharT2 __c) const + { + int __ret = -1; + if (__len <= 10) + { + if (__c >= _CharT2('0') && __c < _CharT2(_CharT2('0') + __len)) + __ret = __c - _CharT2('0'); + } + else + { + if (__c >= _CharT2('0') && __c <= _CharT2('9')) + __ret = __c - _CharT2('0'); + else if (__c >= _CharT2('a') && __c <= _CharT2('f')) + __ret = 10 + (__c - _CharT2('a')); + else if (__c >= _CharT2('A') && __c <= _CharT2('F')) + __ret = 10 + (__c - _CharT2('A')); + } + return __ret; + } + + template + typename __gnu_cxx::__enable_if::__value, + int>::__type + _M_find(const _CharT2* __zero, size_t __len, _CharT2 __c) const + { + int __ret = -1; + const char_type* __q = char_traits<_CharT2>::find(__zero, __len, __c); + if (__q) + { + __ret = __q - __zero; + if (__ret > 15) + __ret -= 6; + } + return __ret; + } +# 2163 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const; + + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned short& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned int& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + + + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long long& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long long& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + + + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + float&) const; + + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + double&) const; + + + + + + + + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + long double&) const; + + + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + void*&) const; +# 2228 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + }; + + template + locale::id num_get<_CharT, _InIter>::id; +# 2246 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + template + class num_put : public locale::facet + { + public: + + + + typedef _CharT char_type; + typedef _OutIter iter_type; + + + + static locale::id id; +# 2267 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + explicit + num_put(size_t __refs = 0) : facet(__refs) { } +# 2285 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, bool __v) const + { return this->do_put(__s, __f, __fill, __v); } +# 2327 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, long __v) const + { return this->do_put(__s, __f, __fill, __v); } + + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + unsigned long __v) const + { return this->do_put(__s, __f, __fill, __v); } + + + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, long long __v) const + { return this->do_put(__s, __f, __fill, __v); } + + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + unsigned long long __v) const + { return this->do_put(__s, __f, __fill, __v); } +# 2390 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, double __v) const + { return this->do_put(__s, __f, __fill, __v); } + + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + long double __v) const + { return this->do_put(__s, __f, __fill, __v); } +# 2415 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + const void* __v) const + { return this->do_put(__s, __f, __fill, __v); } + + public: + template + iter_type + _M_insert_float(iter_type, ios_base& __io, char_type __fill, + char __mod, _ValueT __v) const; + + void + _M_group_float(const char* __grouping, size_t __grouping_size, + char_type __sep, const char_type* __p, char_type* __new, + char_type* __cs, int& __len) const; + + template + iter_type + _M_insert_int(iter_type, ios_base& __io, char_type __fill, + _ValueT __v) const; + + void + _M_group_int(const char* __grouping, size_t __grouping_size, + char_type __sep, ios_base& __io, char_type* __new, + char_type* __cs, int& __len) const; + + void + _M_pad(char_type __fill, streamsize __w, ios_base& __io, + char_type* __new, const char_type* __cs, int& __len) const; + + + virtual + ~num_put() { }; +# 2463 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 3 + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, bool __v) const; + + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const + { return _M_insert_int(__s, __io, __fill, __v); } + + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, + unsigned long __v) const + { return _M_insert_int(__s, __io, __fill, __v); } + + + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, + long long __v) const + { return _M_insert_int(__s, __io, __fill, __v); } + + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, + unsigned long long __v) const + { return _M_insert_int(__s, __io, __fill, __v); } + + + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, double __v) const; + + + + + + + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, long double __v) const; + + + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, const void* __v) const; + + + + + + + + }; + + template + locale::id num_put<_CharT, _OutIter>::id; + + + + + + + + + + template + inline bool + isspace(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::space, __c); } + + + template + inline bool + isprint(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::print, __c); } + + + template + inline bool + iscntrl(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::cntrl, __c); } + + + template + inline bool + isupper(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::upper, __c); } + + + template + inline bool + islower(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::lower, __c); } + + + template + inline bool + isalpha(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::alpha, __c); } + + + template + inline bool + isdigit(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::digit, __c); } + + + template + inline bool + ispunct(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::punct, __c); } + + + template + inline bool + isxdigit(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::xdigit, __c); } + + + template + inline bool + isalnum(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::alnum, __c); } + + + template + inline bool + isgraph(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::graph, __c); } + + + template + inline _CharT + toupper(_CharT __c, const locale& __loc) + { return use_facet >(__loc).toupper(__c); } + + + template + inline _CharT + tolower(_CharT __c, const locale& __loc) + { return use_facet >(__loc).tolower(__c); } + +} + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.tcc" 1 3 +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.tcc" 3 + +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.tcc" 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + + template + struct __use_cache + { + const _Facet* + operator() (const locale& __loc) const; + }; + + + template + struct __use_cache<__numpunct_cache<_CharT> > + { + const __numpunct_cache<_CharT>* + operator() (const locale& __loc) const + { + const size_t __i = numpunct<_CharT>::id._M_id(); + const locale::facet** __caches = __loc._M_impl->_M_caches; + if (!__caches[__i]) + { + __numpunct_cache<_CharT>* __tmp = __null; + try + { + __tmp = new __numpunct_cache<_CharT>; + __tmp->_M_cache(__loc); + } + catch(...) + { + delete __tmp; + throw; + } + __loc._M_impl->_M_install_cache(__tmp, __i); + } + return static_cast*>(__caches[__i]); + } + }; + + template + void + __numpunct_cache<_CharT>::_M_cache(const locale& __loc) + { + _M_allocated = true; + + const numpunct<_CharT>& __np = use_facet >(__loc); + + char* __grouping = 0; + _CharT* __truename = 0; + _CharT* __falsename = 0; + try + { + _M_grouping_size = __np.grouping().size(); + __grouping = new char[_M_grouping_size]; + __np.grouping().copy(__grouping, _M_grouping_size); + _M_grouping = __grouping; + _M_use_grouping = (_M_grouping_size + && static_cast(_M_grouping[0]) > 0 + && (_M_grouping[0] + != __gnu_cxx::__numeric_traits::__max)); + + _M_truename_size = __np.truename().size(); + __truename = new _CharT[_M_truename_size]; + __np.truename().copy(__truename, _M_truename_size); + _M_truename = __truename; + + _M_falsename_size = __np.falsename().size(); + __falsename = new _CharT[_M_falsename_size]; + __np.falsename().copy(__falsename, _M_falsename_size); + _M_falsename = __falsename; + + _M_decimal_point = __np.decimal_point(); + _M_thousands_sep = __np.thousands_sep(); + + const ctype<_CharT>& __ct = use_facet >(__loc); + __ct.widen(__num_base::_S_atoms_out, + __num_base::_S_atoms_out + + __num_base::_S_oend, _M_atoms_out); + __ct.widen(__num_base::_S_atoms_in, + __num_base::_S_atoms_in + + __num_base::_S_iend, _M_atoms_in); + } + catch(...) + { + delete [] __grouping; + delete [] __truename; + delete [] __falsename; + throw; + } + } +# 136 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.tcc" 3 + __attribute__ ((__pure__)) bool + __verify_grouping(const char* __grouping, size_t __grouping_size, + const string& __grouping_tmp) throw (); + + + + template + _InIter + num_get<_CharT, _InIter>:: + _M_extract_float(_InIter __beg, _InIter __end, ios_base& __io, + ios_base::iostate& __err, string& __xtrc) const + { + typedef char_traits<_CharT> __traits_type; + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + const _CharT* __lit = __lc->_M_atoms_in; + char_type __c = char_type(); + + + bool __testeof = __beg == __end; + + + if (!__testeof) + { + __c = *__beg; + const bool __plus = __c == __lit[__num_base::_S_iplus]; + if ((__plus || __c == __lit[__num_base::_S_iminus]) + && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + && !(__c == __lc->_M_decimal_point)) + { + __xtrc += __plus ? '+' : '-'; + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + } + + + bool __found_mantissa = false; + int __sep_pos = 0; + while (!__testeof) + { + if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + || __c == __lc->_M_decimal_point) + break; + else if (__c == __lit[__num_base::_S_izero]) + { + if (!__found_mantissa) + { + __xtrc += '0'; + __found_mantissa = true; + } + ++__sep_pos; + + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + else + break; + } + + + bool __found_dec = false; + bool __found_sci = false; + string __found_grouping; + if (__lc->_M_use_grouping) + __found_grouping.reserve(32); + const char_type* __lit_zero = __lit + __num_base::_S_izero; + + if (!__lc->_M_allocated) + + while (!__testeof) + { + const int __digit = _M_find(__lit_zero, 10, __c); + if (__digit != -1) + { + __xtrc += '0' + __digit; + __found_mantissa = true; + } + else if (__c == __lc->_M_decimal_point + && !__found_dec && !__found_sci) + { + __xtrc += '.'; + __found_dec = true; + } + else if ((__c == __lit[__num_base::_S_ie] + || __c == __lit[__num_base::_S_iE]) + && !__found_sci && __found_mantissa) + { + + __xtrc += 'e'; + __found_sci = true; + + + if (++__beg != __end) + { + __c = *__beg; + const bool __plus = __c == __lit[__num_base::_S_iplus]; + if (__plus || __c == __lit[__num_base::_S_iminus]) + __xtrc += __plus ? '+' : '-'; + else + continue; + } + else + { + __testeof = true; + break; + } + } + else + break; + + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + else + while (!__testeof) + { + + + if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + { + if (!__found_dec && !__found_sci) + { + + + if (__sep_pos) + { + __found_grouping += static_cast(__sep_pos); + __sep_pos = 0; + } + else + { + + + __xtrc.clear(); + break; + } + } + else + break; + } + else if (__c == __lc->_M_decimal_point) + { + if (!__found_dec && !__found_sci) + { + + + + if (__found_grouping.size()) + __found_grouping += static_cast(__sep_pos); + __xtrc += '.'; + __found_dec = true; + } + else + break; + } + else + { + const char_type* __q = + __traits_type::find(__lit_zero, 10, __c); + if (__q) + { + __xtrc += '0' + (__q - __lit_zero); + __found_mantissa = true; + ++__sep_pos; + } + else if ((__c == __lit[__num_base::_S_ie] + || __c == __lit[__num_base::_S_iE]) + && !__found_sci && __found_mantissa) + { + + if (__found_grouping.size() && !__found_dec) + __found_grouping += static_cast(__sep_pos); + __xtrc += 'e'; + __found_sci = true; + + + if (++__beg != __end) + { + __c = *__beg; + const bool __plus = __c == __lit[__num_base::_S_iplus]; + if ((__plus || __c == __lit[__num_base::_S_iminus]) + && !(__lc->_M_use_grouping + && __c == __lc->_M_thousands_sep) + && !(__c == __lc->_M_decimal_point)) + __xtrc += __plus ? '+' : '-'; + else + continue; + } + else + { + __testeof = true; + break; + } + } + else + break; + } + + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + + + + if (__found_grouping.size()) + { + + if (!__found_dec && !__found_sci) + __found_grouping += static_cast(__sep_pos); + + if (!std::__verify_grouping(__lc->_M_grouping, + __lc->_M_grouping_size, + __found_grouping)) + __err = ios_base::failbit; + } + + return __beg; + } + + template + template + _InIter + num_get<_CharT, _InIter>:: + _M_extract_int(_InIter __beg, _InIter __end, ios_base& __io, + ios_base::iostate& __err, _ValueT& __v) const + { + typedef char_traits<_CharT> __traits_type; + using __gnu_cxx::__add_unsigned; + typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + const _CharT* __lit = __lc->_M_atoms_in; + char_type __c = char_type(); + + + const ios_base::fmtflags __basefield = __io.flags() + & ios_base::basefield; + const bool __oct = __basefield == ios_base::oct; + int __base = __oct ? 8 : (__basefield == ios_base::hex ? 16 : 10); + + + bool __testeof = __beg == __end; + + + bool __negative = false; + if (!__testeof) + { + __c = *__beg; + __negative = __c == __lit[__num_base::_S_iminus]; + if ((__negative || __c == __lit[__num_base::_S_iplus]) + && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + && !(__c == __lc->_M_decimal_point)) + { + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + } + + + + bool __found_zero = false; + int __sep_pos = 0; + while (!__testeof) + { + if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + || __c == __lc->_M_decimal_point) + break; + else if (__c == __lit[__num_base::_S_izero] + && (!__found_zero || __base == 10)) + { + __found_zero = true; + ++__sep_pos; + if (__basefield == 0) + __base = 8; + if (__base == 8) + __sep_pos = 0; + } + else if (__found_zero + && (__c == __lit[__num_base::_S_ix] + || __c == __lit[__num_base::_S_iX])) + { + if (__basefield == 0) + __base = 16; + if (__base == 16) + { + __found_zero = false; + __sep_pos = 0; + } + else + break; + } + else + break; + + if (++__beg != __end) + { + __c = *__beg; + if (!__found_zero) + break; + } + else + __testeof = true; + } + + + + const size_t __len = (__base == 16 ? __num_base::_S_iend + - __num_base::_S_izero : __base); + + + string __found_grouping; + if (__lc->_M_use_grouping) + __found_grouping.reserve(32); + bool __testfail = false; + bool __testoverflow = false; + const __unsigned_type __max = + (__negative && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) + ? -__gnu_cxx::__numeric_traits<_ValueT>::__min + : __gnu_cxx::__numeric_traits<_ValueT>::__max; + const __unsigned_type __smax = __max / __base; + __unsigned_type __result = 0; + int __digit = 0; + const char_type* __lit_zero = __lit + __num_base::_S_izero; + + if (!__lc->_M_allocated) + + while (!__testeof) + { + __digit = _M_find(__lit_zero, __len, __c); + if (__digit == -1) + break; + + if (__result > __smax) + __testoverflow = true; + else + { + __result *= __base; + __testoverflow |= __result > __max - __digit; + __result += __digit; + ++__sep_pos; + } + + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + else + while (!__testeof) + { + + + if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + { + + + if (__sep_pos) + { + __found_grouping += static_cast(__sep_pos); + __sep_pos = 0; + } + else + { + __testfail = true; + break; + } + } + else if (__c == __lc->_M_decimal_point) + break; + else + { + const char_type* __q = + __traits_type::find(__lit_zero, __len, __c); + if (!__q) + break; + + __digit = __q - __lit_zero; + if (__digit > 15) + __digit -= 6; + if (__result > __smax) + __testoverflow = true; + else + { + __result *= __base; + __testoverflow |= __result > __max - __digit; + __result += __digit; + ++__sep_pos; + } + } + + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + + + + if (__found_grouping.size()) + { + + __found_grouping += static_cast(__sep_pos); + + if (!std::__verify_grouping(__lc->_M_grouping, + __lc->_M_grouping_size, + __found_grouping)) + __err = ios_base::failbit; + } + + + + if ((!__sep_pos && !__found_zero && !__found_grouping.size()) + || __testfail) + { + __v = 0; + __err = ios_base::failbit; + } + else if (__testoverflow) + { + if (__negative + && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) + __v = __gnu_cxx::__numeric_traits<_ValueT>::__min; + else + __v = __gnu_cxx::__numeric_traits<_ValueT>::__max; + __err = ios_base::failbit; + } + else + __v = __negative ? -__result : __result; + + if (__testeof) + __err |= ios_base::eofbit; + return __beg; + } + + + + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, bool& __v) const + { + if (!(__io.flags() & ios_base::boolalpha)) + { + + + + long __l = -1; + __beg = _M_extract_int(__beg, __end, __io, __err, __l); + if (__l == 0 || __l == 1) + __v = bool(__l); + else + { + + + __v = true; + __err = ios_base::failbit; + if (__beg == __end) + __err |= ios_base::eofbit; + } + } + else + { + + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + + bool __testf = true; + bool __testt = true; + bool __donef = __lc->_M_falsename_size == 0; + bool __donet = __lc->_M_truename_size == 0; + bool __testeof = false; + size_t __n = 0; + while (!__donef || !__donet) + { + if (__beg == __end) + { + __testeof = true; + break; + } + + const char_type __c = *__beg; + + if (!__donef) + __testf = __c == __lc->_M_falsename[__n]; + + if (!__testf && __donet) + break; + + if (!__donet) + __testt = __c == __lc->_M_truename[__n]; + + if (!__testt && __donef) + break; + + if (!__testt && !__testf) + break; + + ++__n; + ++__beg; + + __donef = !__testf || __n >= __lc->_M_falsename_size; + __donet = !__testt || __n >= __lc->_M_truename_size; + } + if (__testf && __n == __lc->_M_falsename_size && __n) + { + __v = false; + if (__testt && __n == __lc->_M_truename_size) + __err = ios_base::failbit; + else + __err = __testeof ? ios_base::eofbit : ios_base::goodbit; + } + else if (__testt && __n == __lc->_M_truename_size && __n) + { + __v = true; + __err = __testeof ? ios_base::eofbit : ios_base::goodbit; + } + else + { + + + __v = false; + __err = ios_base::failbit; + if (__testeof) + __err |= ios_base::eofbit; + } + } + return __beg; + } + + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, float& __v) const + { + string __xtrc; + __xtrc.reserve(32); + __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); + std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, double& __v) const + { + string __xtrc; + __xtrc.reserve(32); + __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); + std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } +# 730 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.tcc" 3 + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long double& __v) const + { + string __xtrc; + __xtrc.reserve(32); + __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); + std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, void*& __v) const + { + + typedef ios_base::fmtflags fmtflags; + const fmtflags __fmt = __io.flags(); + __io.flags((__fmt & ~ios_base::basefield) | ios_base::hex); + + typedef __gnu_cxx::__conditional_type<(sizeof(void*) + <= sizeof(unsigned long)), + unsigned long, unsigned long long>::__type _UIntPtrType; + + _UIntPtrType __ul; + __beg = _M_extract_int(__beg, __end, __io, __err, __ul); + + + __io.flags(__fmt); + + __v = reinterpret_cast(__ul); + return __beg; + } + + + + template + void + num_put<_CharT, _OutIter>:: + _M_pad(_CharT __fill, streamsize __w, ios_base& __io, + _CharT* __new, const _CharT* __cs, int& __len) const + { + + + __pad<_CharT, char_traits<_CharT> >::_S_pad(__io, __fill, __new, + __cs, __w, __len); + __len = static_cast(__w); + } + + + + template + int + __int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit, + ios_base::fmtflags __flags, bool __dec) + { + _CharT* __buf = __bufend; + if (__builtin_expect(__dec, true)) + { + + do + { + *--__buf = __lit[(__v % 10) + __num_base::_S_odigits]; + __v /= 10; + } + while (__v != 0); + } + else if ((__flags & ios_base::basefield) == ios_base::oct) + { + + do + { + *--__buf = __lit[(__v & 0x7) + __num_base::_S_odigits]; + __v >>= 3; + } + while (__v != 0); + } + else + { + + const bool __uppercase = __flags & ios_base::uppercase; + const int __case_offset = __uppercase ? __num_base::_S_oudigits + : __num_base::_S_odigits; + do + { + *--__buf = __lit[(__v & 0xf) + __case_offset]; + __v >>= 4; + } + while (__v != 0); + } + return __bufend - __buf; + } + + + + template + void + num_put<_CharT, _OutIter>:: + _M_group_int(const char* __grouping, size_t __grouping_size, _CharT __sep, + ios_base&, _CharT* __new, _CharT* __cs, int& __len) const + { + _CharT* __p = std::__add_grouping(__new, __sep, __grouping, + __grouping_size, __cs, __cs + __len); + __len = __p - __new; + } + + template + template + _OutIter + num_put<_CharT, _OutIter>:: + _M_insert_int(_OutIter __s, ios_base& __io, _CharT __fill, + _ValueT __v) const + { + using __gnu_cxx::__add_unsigned; + typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + const _CharT* __lit = __lc->_M_atoms_out; + const ios_base::fmtflags __flags = __io.flags(); + + + const int __ilen = 5 * sizeof(_ValueT); + _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __ilen)); + + + + const ios_base::fmtflags __basefield = __flags & ios_base::basefield; + const bool __dec = (__basefield != ios_base::oct + && __basefield != ios_base::hex); + const __unsigned_type __u = ((__v > 0 || !__dec) + ? __unsigned_type(__v) + : -__unsigned_type(__v)); + int __len = __int_to_char(__cs + __ilen, __u, __lit, __flags, __dec); + __cs += __ilen - __len; + + + if (__lc->_M_use_grouping) + { + + + _CharT* __cs2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * (__len + 1) + * 2)); + _M_group_int(__lc->_M_grouping, __lc->_M_grouping_size, + __lc->_M_thousands_sep, __io, __cs2 + 2, __cs, __len); + __cs = __cs2 + 2; + } + + + if (__builtin_expect(__dec, true)) + { + + if (__v >= 0) + { + if (bool(__flags & ios_base::showpos) + && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) + *--__cs = __lit[__num_base::_S_oplus], ++__len; + } + else + *--__cs = __lit[__num_base::_S_ominus], ++__len; + } + else if (bool(__flags & ios_base::showbase) && __v) + { + if (__basefield == ios_base::oct) + *--__cs = __lit[__num_base::_S_odigits], ++__len; + else + { + + const bool __uppercase = __flags & ios_base::uppercase; + *--__cs = __lit[__num_base::_S_ox + __uppercase]; + + *--__cs = __lit[__num_base::_S_odigits]; + __len += 2; + } + } + + + const streamsize __w = __io.width(); + if (__w > static_cast(__len)) + { + _CharT* __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __w)); + _M_pad(__fill, __w, __io, __cs3, __cs, __len); + __cs = __cs3; + } + __io.width(0); + + + + return std::__write(__s, __cs, __len); + } + + template + void + num_put<_CharT, _OutIter>:: + _M_group_float(const char* __grouping, size_t __grouping_size, + _CharT __sep, const _CharT* __p, _CharT* __new, + _CharT* __cs, int& __len) const + { + + + + const int __declen = __p ? __p - __cs : __len; + _CharT* __p2 = std::__add_grouping(__new, __sep, __grouping, + __grouping_size, + __cs, __cs + __declen); + + + int __newlen = __p2 - __new; + if (__p) + { + char_traits<_CharT>::copy(__p2, __p, __len - __declen); + __newlen += __len - __declen; + } + __len = __newlen; + } +# 966 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.tcc" 3 + template + template + _OutIter + num_put<_CharT, _OutIter>:: + _M_insert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod, + _ValueT __v) const + { + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + + + const streamsize __prec = __io.precision() < 0 ? 6 : __io.precision(); + + const int __max_digits = + __gnu_cxx::__numeric_traits<_ValueT>::__digits10; + + + int __len; + + char __fbuf[16]; + __num_base::_S_format_float(__io, __fbuf, __mod); + + + + + int __cs_size = __max_digits * 3; + char* __cs = static_cast(__builtin_alloca(__cs_size)); + __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, + __fbuf, __prec, __v); + + + if (__len >= __cs_size) + { + __cs_size = __len + 1; + __cs = static_cast(__builtin_alloca(__cs_size)); + __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, + __fbuf, __prec, __v); + } +# 1027 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.tcc" 3 + const ctype<_CharT>& __ctype = use_facet >(__loc); + + _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __len)); + __ctype.widen(__cs, __cs + __len, __ws); + + + _CharT* __wp = 0; + const char* __p = char_traits::find(__cs, __len, '.'); + if (__p) + { + __wp = __ws + (__p - __cs); + *__wp = __lc->_M_decimal_point; + } + + + + + if (__lc->_M_use_grouping + && (__wp || __len < 3 || (__cs[1] <= '9' && __cs[2] <= '9' + && __cs[1] >= '0' && __cs[2] >= '0'))) + { + + + _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __len * 2)); + + streamsize __off = 0; + if (__cs[0] == '-' || __cs[0] == '+') + { + __off = 1; + __ws2[0] = __ws[0]; + __len -= 1; + } + + _M_group_float(__lc->_M_grouping, __lc->_M_grouping_size, + __lc->_M_thousands_sep, __wp, __ws2 + __off, + __ws + __off, __len); + __len += __off; + + __ws = __ws2; + } + + + const streamsize __w = __io.width(); + if (__w > static_cast(__len)) + { + _CharT* __ws3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __w)); + _M_pad(__fill, __w, __io, __ws3, __ws, __len); + __ws = __ws3; + } + __io.width(0); + + + + return std::__write(__s, __ws, __len); + } + + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const + { + const ios_base::fmtflags __flags = __io.flags(); + if ((__flags & ios_base::boolalpha) == 0) + { + const long __l = __v; + __s = _M_insert_int(__s, __io, __fill, __l); + } + else + { + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + + const _CharT* __name = __v ? __lc->_M_truename + : __lc->_M_falsename; + int __len = __v ? __lc->_M_truename_size + : __lc->_M_falsename_size; + + const streamsize __w = __io.width(); + if (__w > static_cast(__len)) + { + const streamsize __plen = __w - __len; + _CharT* __ps + = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __plen)); + + char_traits<_CharT>::assign(__ps, __plen, __fill); + __io.width(0); + + if ((__flags & ios_base::adjustfield) == ios_base::left) + { + __s = std::__write(__s, __name, __len); + __s = std::__write(__s, __ps, __plen); + } + else + { + __s = std::__write(__s, __ps, __plen); + __s = std::__write(__s, __name, __len); + } + return __s; + } + __io.width(0); + __s = std::__write(__s, __name, __len); + } + return __s; + } + + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const + { return _M_insert_float(__s, __io, __fill, char(), __v); } +# 1152 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.tcc" 3 + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, + long double __v) const + { return _M_insert_float(__s, __io, __fill, 'L', __v); } + + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, + const void* __v) const + { + const ios_base::fmtflags __flags = __io.flags(); + const ios_base::fmtflags __fmt = ~(ios_base::basefield + | ios_base::uppercase); + __io.flags((__flags & __fmt) | (ios_base::hex | ios_base::showbase)); + + typedef __gnu_cxx::__conditional_type<(sizeof(const void*) + <= sizeof(unsigned long)), + unsigned long, unsigned long long>::__type _UIntPtrType; + + __s = _M_insert_int(__s, __io, __fill, + reinterpret_cast<_UIntPtrType>(__v)); + __io.flags(__flags); + return __s; + } + + +# 1189 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.tcc" 3 + template + void + __pad<_CharT, _Traits>::_S_pad(ios_base& __io, _CharT __fill, + _CharT* __news, const _CharT* __olds, + streamsize __newlen, streamsize __oldlen) + { + const size_t __plen = static_cast(__newlen - __oldlen); + const ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield; + + + if (__adjust == ios_base::left) + { + _Traits::copy(__news, __olds, __oldlen); + _Traits::assign(__news + __oldlen, __plen, __fill); + return; + } + + size_t __mod = 0; + if (__adjust == ios_base::internal) + { + + + + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + + if (__ctype.widen('-') == __olds[0] + || __ctype.widen('+') == __olds[0]) + { + __news[0] = __olds[0]; + __mod = 1; + ++__news; + } + else if (__ctype.widen('0') == __olds[0] + && __oldlen > 1 + && (__ctype.widen('x') == __olds[1] + || __ctype.widen('X') == __olds[1])) + { + __news[0] = __olds[0]; + __news[1] = __olds[1]; + __mod = 2; + __news += 2; + } + + } + _Traits::assign(__news, __plen, __fill); + _Traits::copy(__news + __plen, __olds + __mod, __oldlen - __mod); + } + + template + _CharT* + __add_grouping(_CharT* __s, _CharT __sep, + const char* __gbeg, size_t __gsize, + const _CharT* __first, const _CharT* __last) + { + size_t __idx = 0; + size_t __ctr = 0; + + while (__last - __first > __gbeg[__idx] + && static_cast(__gbeg[__idx]) > 0 + && __gbeg[__idx] != __gnu_cxx::__numeric_traits::__max) + { + __last -= __gbeg[__idx]; + __idx < __gsize - 1 ? ++__idx : ++__ctr; + } + + while (__first != __last) + *__s++ = *__first++; + + while (__ctr--) + { + *__s++ = __sep; + for (char __i = __gbeg[__idx]; __i > 0; --__i) + *__s++ = *__first++; + } + + while (__idx--) + { + *__s++ = __sep; + for (char __i = __gbeg[__idx]; __i > 0; --__i) + *__s++ = *__first++; + } + + return __s; + } + + + + + + extern template class numpunct; + extern template class numpunct_byname; + extern template class num_get; + extern template class num_put; + extern template class ctype_byname; + + extern template + const ctype& + use_facet >(const locale&); + + extern template + const numpunct& + use_facet >(const locale&); + + extern template + const num_put& + use_facet >(const locale&); + + extern template + const num_get& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + extern template class numpunct; + extern template class numpunct_byname; + extern template class num_get; + extern template class num_put; + extern template class ctype_byname; + + extern template + const ctype& + use_facet >(const locale&); + + extern template + const numpunct& + use_facet >(const locale&); + + extern template + const num_put& + use_facet >(const locale&); + + extern template + const num_get& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + +} +# 2602 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets.h" 2 3 +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_ios.h" 2 3 + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + inline const _Facet& + __check_facet(const _Facet* __f) + { + if (!__f) + __throw_bad_cast(); + return *__f; + } +# 61 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_ios.h" 3 + template + class basic_ios : public ios_base + { + public: + + + + + + + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + + + + + + + typedef ctype<_CharT> __ctype_type; + typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > + __num_put_type; + typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > + __num_get_type; + + + + public: + basic_ostream<_CharT, _Traits>* _M_tie; + mutable char_type _M_fill; + mutable bool _M_fill_init; + basic_streambuf<_CharT, _Traits>* _M_streambuf; + + + const __ctype_type* _M_ctype; + + const __num_put_type* _M_num_put; + + const __num_get_type* _M_num_get; + + public: + + + + + + + + operator void*() const + { return this->fail() ? 0 : const_cast(this); } + + bool + operator!() const + { return this->fail(); } +# 126 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_ios.h" 3 + iostate + rdstate() const + { return _M_streambuf_state; } +# 137 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_ios.h" 3 + void + clear(iostate __state = goodbit); + + + + + + + + void + setstate(iostate __state) + { this->clear(this->rdstate() | __state); } + + + + + void + _M_setstate(iostate __state) + { + + + _M_streambuf_state |= __state; + if (this->exceptions() & __state) + throw; + } + + + + + + + + bool + good() const + { return this->rdstate() == 0; } + + + + + + + + bool + eof() const + { return (this->rdstate() & eofbit) != 0; } +# 190 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_ios.h" 3 + bool + fail() const + { return (this->rdstate() & (badbit | failbit)) != 0; } + + + + + + + + bool + bad() const + { return (this->rdstate() & badbit) != 0; } +# 211 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_ios.h" 3 + iostate + exceptions() const + { return _M_exception; } +# 246 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_ios.h" 3 + void + exceptions(iostate __except) + { + _M_exception = __except; + this->clear(_M_streambuf_state); + } + + + + + + + + explicit + basic_ios(basic_streambuf<_CharT, _Traits>* __sb) + : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0), + _M_ctype(0), _M_num_put(0), _M_num_get(0) + { this->init(__sb); } + + + + + + + + virtual + ~basic_ios() { } +# 284 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_ios.h" 3 + basic_ostream<_CharT, _Traits>* + tie() const + { return _M_tie; } +# 296 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_ios.h" 3 + basic_ostream<_CharT, _Traits>* + tie(basic_ostream<_CharT, _Traits>* __tiestr) + { + basic_ostream<_CharT, _Traits>* __old = _M_tie; + _M_tie = __tiestr; + return __old; + } + + + + + + + + basic_streambuf<_CharT, _Traits>* + rdbuf() const + { return _M_streambuf; } +# 336 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_ios.h" 3 + basic_streambuf<_CharT, _Traits>* + rdbuf(basic_streambuf<_CharT, _Traits>* __sb); +# 350 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_ios.h" 3 + basic_ios& + copyfmt(const basic_ios& __rhs); + + + + + + + + char_type + fill() const + { + if (!_M_fill_init) + { + _M_fill = this->widen(' '); + _M_fill_init = true; + } + return _M_fill; + } +# 379 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_ios.h" 3 + char_type + fill(char_type __ch) + { + char_type __old = this->fill(); + _M_fill = __ch; + return __old; + } +# 399 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_ios.h" 3 + locale + imbue(const locale& __loc); +# 419 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_ios.h" 3 + char + narrow(char_type __c, char __dfault) const + { return __check_facet(_M_ctype).narrow(__c, __dfault); } +# 438 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_ios.h" 3 + char_type + widen(char __c) const + { return __check_facet(_M_ctype).widen(__c); } + + public: + + + + + + + + basic_ios() + : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false), + _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0) + { } + + + + + + + + void + init(basic_streambuf<_CharT, _Traits>* __sb); + + void + _M_cache_locale(const locale& __loc); + }; + +} + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_ios.tcc" 1 3 +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_ios.tcc" 3 + +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_ios.tcc" 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + void + basic_ios<_CharT, _Traits>::clear(iostate __state) + { + if (this->rdbuf()) + _M_streambuf_state = __state; + else + _M_streambuf_state = __state | badbit; + if (this->exceptions() & this->rdstate()) + __throw_ios_failure(("basic_ios::clear")); + } + + template + basic_streambuf<_CharT, _Traits>* + basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb) + { + basic_streambuf<_CharT, _Traits>* __old = _M_streambuf; + _M_streambuf = __sb; + this->clear(); + return __old; + } + + template + basic_ios<_CharT, _Traits>& + basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs) + { + + + if (this != &__rhs) + { + + + + + _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ? + _M_local_word : new _Words[__rhs._M_word_size]; + + + _Callback_list* __cb = __rhs._M_callbacks; + if (__cb) + __cb->_M_add_reference(); + _M_call_callbacks(erase_event); + if (_M_word != _M_local_word) + { + delete [] _M_word; + _M_word = 0; + } + _M_dispose_callbacks(); + + + _M_callbacks = __cb; + for (int __i = 0; __i < __rhs._M_word_size; ++__i) + __words[__i] = __rhs._M_word[__i]; + _M_word = __words; + _M_word_size = __rhs._M_word_size; + + this->flags(__rhs.flags()); + this->width(__rhs.width()); + this->precision(__rhs.precision()); + this->tie(__rhs.tie()); + this->fill(__rhs.fill()); + _M_ios_locale = __rhs.getloc(); + _M_cache_locale(_M_ios_locale); + + _M_call_callbacks(copyfmt_event); + + + this->exceptions(__rhs.exceptions()); + } + return *this; + } + + + template + locale + basic_ios<_CharT, _Traits>::imbue(const locale& __loc) + { + locale __old(this->getloc()); + ios_base::imbue(__loc); + _M_cache_locale(__loc); + if (this->rdbuf() != 0) + this->rdbuf()->pubimbue(__loc); + return __old; + } + + template + void + basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb) + { + + ios_base::_M_init(); + + + _M_cache_locale(_M_ios_locale); +# 145 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_ios.tcc" 3 + _M_fill = _CharT(); + _M_fill_init = false; + + _M_tie = 0; + _M_exception = goodbit; + _M_streambuf = __sb; + _M_streambuf_state = __sb ? goodbit : badbit; + } + + template + void + basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc) + { + if (__builtin_expect(has_facet<__ctype_type>(__loc), true)) + _M_ctype = &use_facet<__ctype_type>(__loc); + else + _M_ctype = 0; + + if (__builtin_expect(has_facet<__num_put_type>(__loc), true)) + _M_num_put = &use_facet<__num_put_type>(__loc); + else + _M_num_put = 0; + + if (__builtin_expect(has_facet<__num_get_type>(__loc), true)) + _M_num_get = &use_facet<__num_get_type>(__loc); + else + _M_num_get = 0; + } + + + + + + extern template class basic_ios; + + + extern template class basic_ios; + + + +} +# 472 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/basic_ios.h" 2 3 +# 46 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ios" 2 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ostream" 2 3 + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 54 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ostream" 3 + template + class basic_ostream : virtual public basic_ios<_CharT, _Traits> + { + public: + + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + + + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef basic_ios<_CharT, _Traits> __ios_type; + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > + __num_put_type; + typedef ctype<_CharT> __ctype_type; +# 81 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ostream" 3 + explicit + basic_ostream(__streambuf_type* __sb) + { this->init(__sb); } + + + + + + + virtual + ~basic_ostream() { } + + + class sentry; + friend class sentry; +# 107 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ostream" 3 + __ostream_type& + operator<<(__ostream_type& (*__pf)(__ostream_type&)) + { + + + + return __pf(*this); + } + + __ostream_type& + operator<<(__ios_type& (*__pf)(__ios_type&)) + { + + + + __pf(*this); + return *this; + } + + __ostream_type& + operator<<(ios_base& (*__pf) (ios_base&)) + { + + + + __pf(*this); + return *this; + } +# 164 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ostream" 3 + __ostream_type& + operator<<(long __n) + { return _M_insert(__n); } + + __ostream_type& + operator<<(unsigned long __n) + { return _M_insert(__n); } + + __ostream_type& + operator<<(bool __n) + { return _M_insert(__n); } + + __ostream_type& + operator<<(short __n); + + __ostream_type& + operator<<(unsigned short __n) + { + + + return _M_insert(static_cast(__n)); + } + + __ostream_type& + operator<<(int __n); + + __ostream_type& + operator<<(unsigned int __n) + { + + + return _M_insert(static_cast(__n)); + } + + + __ostream_type& + operator<<(long long __n) + { return _M_insert(__n); } + + __ostream_type& + operator<<(unsigned long long __n) + { return _M_insert(__n); } + + + __ostream_type& + operator<<(double __f) + { return _M_insert(__f); } + + __ostream_type& + operator<<(float __f) + { + + + return _M_insert(static_cast(__f)); + } + + __ostream_type& + operator<<(long double __f) + { return _M_insert(__f); } + + __ostream_type& + operator<<(const void* __p) + { return _M_insert(__p); } +# 249 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ostream" 3 + __ostream_type& + operator<<(__streambuf_type* __sb); +# 282 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ostream" 3 + __ostream_type& + put(char_type __c); + + + void + _M_write(const char_type* __s, streamsize __n) + { + const streamsize __put = this->rdbuf()->sputn(__s, __n); + if (__put != __n) + this->setstate(ios_base::badbit); + } +# 310 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ostream" 3 + __ostream_type& + write(const char_type* __s, streamsize __n); +# 323 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ostream" 3 + __ostream_type& + flush(); +# 334 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ostream" 3 + pos_type + tellp(); +# 345 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ostream" 3 + __ostream_type& + seekp(pos_type); +# 357 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ostream" 3 + __ostream_type& + seekp(off_type, ios_base::seekdir); + + public: + basic_ostream() + { this->init(0); } + + template + __ostream_type& + _M_insert(_ValueT __v); + }; +# 376 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ostream" 3 + template + class basic_ostream<_CharT, _Traits>::sentry + { + + bool _M_ok; + basic_ostream<_CharT, _Traits>& _M_os; + + public: +# 395 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ostream" 3 + explicit + sentry(basic_ostream<_CharT, _Traits>& __os); +# 405 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ostream" 3 + ~sentry() + { + + if (bool(_M_os.flags() & ios_base::unitbuf) && !uncaught_exception()) + { + + if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1) + _M_os.setstate(ios_base::badbit); + } + } +# 426 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ostream" 3 + operator bool() const + { return _M_ok; } + }; +# 447 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ostream" 3 + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) + { return __ostream_insert(__out, &__c, 1); } + + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) + { return (__out << __out.widen(__c)); } + + + template + inline basic_ostream& + operator<<(basic_ostream& __out, char __c) + { return __ostream_insert(__out, &__c, 1); } + + + template + inline basic_ostream& + operator<<(basic_ostream& __out, signed char __c) + { return (__out << static_cast(__c)); } + + template + inline basic_ostream& + operator<<(basic_ostream& __out, unsigned char __c) + { return (__out << static_cast(__c)); } +# 489 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ostream" 3 + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) + { + if (!__s) + __out.setstate(ios_base::badbit); + else + __ostream_insert(__out, __s, + static_cast(_Traits::length(__s))); + return __out; + } + + template + basic_ostream<_CharT, _Traits> & + operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s); + + + template + inline basic_ostream& + operator<<(basic_ostream& __out, const char* __s) + { + if (!__s) + __out.setstate(ios_base::badbit); + else + __ostream_insert(__out, __s, + static_cast(_Traits::length(__s))); + return __out; + } + + + template + inline basic_ostream& + operator<<(basic_ostream& __out, const signed char* __s) + { return (__out << reinterpret_cast(__s)); } + + template + inline basic_ostream & + operator<<(basic_ostream& __out, const unsigned char* __s) + { return (__out << reinterpret_cast(__s)); } +# 539 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ostream" 3 + template + inline basic_ostream<_CharT, _Traits>& + endl(basic_ostream<_CharT, _Traits>& __os) + { return flush(__os.put(__os.widen('\n'))); } + + + + + + + + template + inline basic_ostream<_CharT, _Traits>& + ends(basic_ostream<_CharT, _Traits>& __os) + { return __os.put(_CharT()); } + + + + + + + template + inline basic_ostream<_CharT, _Traits>& + flush(basic_ostream<_CharT, _Traits>& __os) + { return __os.flush(); } +# 583 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ostream" 3 +} + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ostream.tcc" 1 3 +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ostream.tcc" 3 + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/ostream.tcc" 3 + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + basic_ostream<_CharT, _Traits>::sentry:: + sentry(basic_ostream<_CharT, _Traits>& __os) + : _M_ok(false), _M_os(__os) + { + + if (__os.tie() && __os.good()) + __os.tie()->flush(); + + if (__os.good()) + _M_ok = true; + else + __os.setstate(ios_base::failbit); + } + + template + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + _M_insert(_ValueT __v) + { + sentry __cerb(*this); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const __num_put_type& __np = __check_facet(this->_M_num_put); + if (__np.put(*this, *this, this->fill(), __v).failed()) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + operator<<(short __n) + { + + + const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; + if (__fmt == ios_base::oct || __fmt == ios_base::hex) + return _M_insert(static_cast(static_cast(__n))); + else + return _M_insert(static_cast(__n)); + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + operator<<(int __n) + { + + + const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; + if (__fmt == ios_base::oct || __fmt == ios_base::hex) + return _M_insert(static_cast(static_cast(__n))); + else + return _M_insert(static_cast(__n)); + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + operator<<(__streambuf_type* __sbin) + { + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this); + if (__cerb && __sbin) + { + try + { + if (!__copy_streambufs(__sbin, this->rdbuf())) + __err |= ios_base::failbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::failbit); } + } + else if (!__sbin) + __err |= ios_base::badbit; + if (__err) + this->setstate(__err); + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + put(char_type __c) + { + + + + + + + sentry __cerb(*this); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __put = this->rdbuf()->sputc(__c); + if (traits_type::eq_int_type(__put, traits_type::eof())) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + write(const _CharT* __s, streamsize __n) + { + + + + + + + + sentry __cerb(*this); + if (__cerb) + { + try + { _M_write(__s, __n); } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + flush() + { + + + + ios_base::iostate __err = ios_base::goodbit; + try + { + if (this->rdbuf() && this->rdbuf()->pubsync() == -1) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + + template + typename basic_ostream<_CharT, _Traits>::pos_type + basic_ostream<_CharT, _Traits>:: + tellp() + { + pos_type __ret = pos_type(-1); + try + { + if (!this->fail()) + __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + return __ret; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + seekp(pos_type __pos) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + if (!this->fail()) + { + + + const pos_type __p = this->rdbuf()->pubseekpos(__pos, + ios_base::out); + + + if (__p == pos_type(off_type(-1))) + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + seekp(off_type __off, ios_base::seekdir __dir) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + if (!this->fail()) + { + + + const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, + ios_base::out); + + + if (__p == pos_type(off_type(-1))) + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) + { + if (!__s) + __out.setstate(ios_base::badbit); + else + { + + + const size_t __clen = char_traits::length(__s); + try + { + struct __ptr_guard + { + _CharT *__p; + __ptr_guard (_CharT *__ip): __p(__ip) { } + ~__ptr_guard() { delete[] __p; } + _CharT* __get() { return __p; } + } __pg (new _CharT[__clen]); + + _CharT *__ws = __pg.__get(); + for (size_t __i = 0; __i < __clen; ++__i) + __ws[__i] = __out.widen(__s[__i]); + __ostream_insert(__out, __ws, __clen); + } + catch(__cxxabiv1::__forced_unwind&) + { + __out._M_setstate(ios_base::badbit); + throw; + } + catch(...) + { __out._M_setstate(ios_base::badbit); } + } + return __out; + } + + + + + + extern template class basic_ostream; + extern template ostream& endl(ostream&); + extern template ostream& ends(ostream&); + extern template ostream& flush(ostream&); + extern template ostream& operator<<(ostream&, char); + extern template ostream& operator<<(ostream&, unsigned char); + extern template ostream& operator<<(ostream&, signed char); + extern template ostream& operator<<(ostream&, const char*); + extern template ostream& operator<<(ostream&, const unsigned char*); + extern template ostream& operator<<(ostream&, const signed char*); + + extern template ostream& ostream::_M_insert(long); + extern template ostream& ostream::_M_insert(unsigned long); + extern template ostream& ostream::_M_insert(bool); + + extern template ostream& ostream::_M_insert(long long); + extern template ostream& ostream::_M_insert(unsigned long long); + + extern template ostream& ostream::_M_insert(double); + extern template ostream& ostream::_M_insert(long double); + extern template ostream& ostream::_M_insert(const void*); + + + extern template class basic_ostream; + extern template wostream& endl(wostream&); + extern template wostream& ends(wostream&); + extern template wostream& flush(wostream&); + extern template wostream& operator<<(wostream&, wchar_t); + extern template wostream& operator<<(wostream&, char); + extern template wostream& operator<<(wostream&, const wchar_t*); + extern template wostream& operator<<(wostream&, const char*); + + extern template wostream& wostream::_M_insert(long); + extern template wostream& wostream::_M_insert(unsigned long); + extern template wostream& wostream::_M_insert(bool); + + extern template wostream& wostream::_M_insert(long long); + extern template wostream& wostream::_M_insert(unsigned long long); + + extern template wostream& wostream::_M_insert(double); + extern template wostream& wostream::_M_insert(long double); + extern template wostream& wostream::_M_insert(const void*); + + + +} +# 587 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ostream" 2 3 +# 66 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/iterator" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 1 3 +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 54 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + template + class basic_istream : virtual public basic_ios<_CharT, _Traits> + { + public: + + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + + + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef basic_ios<_CharT, _Traits> __ios_type; + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > + __num_get_type; + typedef ctype<_CharT> __ctype_type; + + public: + + + + + + streamsize _M_gcount; + + public: +# 90 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + explicit + basic_istream(__streambuf_type* __sb) + : _M_gcount(streamsize(0)) + { this->init(__sb); } + + + + + + + virtual + ~basic_istream() + { _M_gcount = streamsize(0); } + + + class sentry; + friend class sentry; +# 119 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + __istream_type& + operator>>(__istream_type& (*__pf)(__istream_type&)) + { return __pf(*this); } + + __istream_type& + operator>>(__ios_type& (*__pf)(__ios_type&)) + { + __pf(*this); + return *this; + } + + __istream_type& + operator>>(ios_base& (*__pf)(ios_base&)) + { + __pf(*this); + return *this; + } +# 166 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + __istream_type& + operator>>(bool& __n) + { return _M_extract(__n); } + + __istream_type& + operator>>(short& __n); + + __istream_type& + operator>>(unsigned short& __n) + { return _M_extract(__n); } + + __istream_type& + operator>>(int& __n); + + __istream_type& + operator>>(unsigned int& __n) + { return _M_extract(__n); } + + __istream_type& + operator>>(long& __n) + { return _M_extract(__n); } + + __istream_type& + operator>>(unsigned long& __n) + { return _M_extract(__n); } + + + __istream_type& + operator>>(long long& __n) + { return _M_extract(__n); } + + __istream_type& + operator>>(unsigned long long& __n) + { return _M_extract(__n); } + + + __istream_type& + operator>>(float& __f) + { return _M_extract(__f); } + + __istream_type& + operator>>(double& __f) + { return _M_extract(__f); } + + __istream_type& + operator>>(long double& __f) + { return _M_extract(__f); } + + __istream_type& + operator>>(void*& __p) + { return _M_extract(__p); } +# 238 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + __istream_type& + operator>>(__streambuf_type* __sb); +# 248 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + streamsize + gcount() const + { return _M_gcount; } +# 280 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + int_type + get(); +# 294 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + __istream_type& + get(char_type& __c); +# 321 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + __istream_type& + get(char_type* __s, streamsize __n, char_type __delim); +# 332 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + __istream_type& + get(char_type* __s, streamsize __n) + { return this->get(__s, __n, this->widen('\n')); } +# 355 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + __istream_type& + get(__streambuf_type& __sb, char_type __delim); +# 365 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + __istream_type& + get(__streambuf_type& __sb) + { return this->get(__sb, this->widen('\n')); } +# 394 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + __istream_type& + getline(char_type* __s, streamsize __n, char_type __delim); +# 405 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + __istream_type& + getline(char_type* __s, streamsize __n) + { return this->getline(__s, __n, this->widen('\n')); } +# 429 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + __istream_type& + ignore(); + + __istream_type& + ignore(streamsize __n); + + __istream_type& + ignore(streamsize __n, int_type __delim); +# 446 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + int_type + peek(); +# 464 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + __istream_type& + read(char_type* __s, streamsize __n); +# 483 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + streamsize + readsome(char_type* __s, streamsize __n); +# 499 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + __istream_type& + putback(char_type __c); +# 514 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + __istream_type& + unget(); +# 532 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + int + sync(); +# 546 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + pos_type + tellg(); +# 561 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + __istream_type& + seekg(pos_type); +# 577 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + __istream_type& + seekg(off_type, ios_base::seekdir); + + + public: + basic_istream() + : _M_gcount(streamsize(0)) + { this->init(0); } + + template + __istream_type& + _M_extract(_ValueT& __v); + }; + + + template<> + basic_istream& + basic_istream:: + getline(char_type* __s, streamsize __n, char_type __delim); + + template<> + basic_istream& + basic_istream:: + ignore(streamsize __n); + + template<> + basic_istream& + basic_istream:: + ignore(streamsize __n, int_type __delim); + + + template<> + basic_istream& + basic_istream:: + getline(char_type* __s, streamsize __n, char_type __delim); + + template<> + basic_istream& + basic_istream:: + ignore(streamsize __n); + + template<> + basic_istream& + basic_istream:: + ignore(streamsize __n, int_type __delim); +# 632 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + template + class basic_istream<_CharT, _Traits>::sentry + { + + bool _M_ok; + + public: + + typedef _Traits traits_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef typename __istream_type::__ctype_type __ctype_type; + typedef typename _Traits::int_type __int_type; +# 668 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + explicit + sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false); +# 681 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + operator bool() const + { return _M_ok; } + }; +# 698 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c); + + template + inline basic_istream& + operator>>(basic_istream& __in, unsigned char& __c) + { return (__in >> reinterpret_cast(__c)); } + + template + inline basic_istream& + operator>>(basic_istream& __in, signed char& __c) + { return (__in >> reinterpret_cast(__c)); } +# 740 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s); + + + template<> + basic_istream& + operator>>(basic_istream& __in, char* __s); + + template + inline basic_istream& + operator>>(basic_istream& __in, unsigned char* __s) + { return (__in >> reinterpret_cast(__s)); } + + template + inline basic_istream& + operator>>(basic_istream& __in, signed char* __s) + { return (__in >> reinterpret_cast(__s)); } +# 768 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + template + class basic_iostream + : public basic_istream<_CharT, _Traits>, + public basic_ostream<_CharT, _Traits> + { + public: + + + + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + + + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_ostream<_CharT, _Traits> __ostream_type; + + + + + + + + explicit + basic_iostream(basic_streambuf<_CharT, _Traits>* __sb) + : __istream_type(__sb), __ostream_type(__sb) { } + + + + + virtual + ~basic_iostream() { } + + public: + basic_iostream() + : __istream_type(), __ostream_type() { } + }; +# 829 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 + template + basic_istream<_CharT, _Traits>& + ws(basic_istream<_CharT, _Traits>& __is); +# 851 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 3 +} + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/istream.tcc" 1 3 +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/istream.tcc" 3 + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/istream.tcc" 3 + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + basic_istream<_CharT, _Traits>::sentry:: + sentry(basic_istream<_CharT, _Traits>& __in, bool __noskip) : _M_ok(false) + { + ios_base::iostate __err = ios_base::goodbit; + if (__in.good()) + { + if (__in.tie()) + __in.tie()->flush(); + if (!__noskip && bool(__in.flags() & ios_base::skipws)) + { + const __int_type __eof = traits_type::eof(); + __streambuf_type* __sb = __in.rdbuf(); + __int_type __c = __sb->sgetc(); + + const __ctype_type& __ct = __check_facet(__in._M_ctype); + while (!traits_type::eq_int_type(__c, __eof) + && __ct.is(ctype_base::space, + traits_type::to_char_type(__c))) + __c = __sb->snextc(); + + + + + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + } + } + + if (__in.good() && __err == ios_base::goodbit) + _M_ok = true; + else + { + __err |= ios_base::failbit; + __in.setstate(__err); + } + } + + template + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + _M_extract(_ValueT& __v) + { + sentry __cerb(*this, false); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const __num_get_type& __ng = __check_facet(this->_M_num_get); + __ng.get(*this, 0, *this, __err, __v); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(short& __n) + { + + + sentry __cerb(*this, false); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + long __l; + const __num_get_type& __ng = __check_facet(this->_M_num_get); + __ng.get(*this, 0, *this, __err, __l); + + + + if (__l < __gnu_cxx::__numeric_traits::__min) + { + __err |= ios_base::failbit; + __n = __gnu_cxx::__numeric_traits::__min; + } + else if (__l > __gnu_cxx::__numeric_traits::__max) + { + __err |= ios_base::failbit; + __n = __gnu_cxx::__numeric_traits::__max; + } + else + __n = short(__l); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(int& __n) + { + + + sentry __cerb(*this, false); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + long __l; + const __num_get_type& __ng = __check_facet(this->_M_num_get); + __ng.get(*this, 0, *this, __err, __l); + + + + if (__l < __gnu_cxx::__numeric_traits::__min) + { + __err |= ios_base::failbit; + __n = __gnu_cxx::__numeric_traits::__min; + } + else if (__l > __gnu_cxx::__numeric_traits::__max) + { + __err |= ios_base::failbit; + __n = __gnu_cxx::__numeric_traits::__max; + } + else + __n = int(__l); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(__streambuf_type* __sbout) + { + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, false); + if (__cerb && __sbout) + { + try + { + bool __ineof; + if (!__copy_streambufs_eof(this->rdbuf(), __sbout, __ineof)) + __err |= ios_base::failbit; + if (__ineof) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::failbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::failbit); } + } + else if (!__sbout) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + + template + typename basic_istream<_CharT, _Traits>::int_type + basic_istream<_CharT, _Traits>:: + get(void) + { + const int_type __eof = traits_type::eof(); + int_type __c = __eof; + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + __c = this->rdbuf()->sbumpc(); + + if (!traits_type::eq_int_type(__c, __eof)) + _M_gcount = 1; + else + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return __c; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + get(char_type& __c) + { + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __cb = this->rdbuf()->sbumpc(); + + if (!traits_type::eq_int_type(__cb, traits_type::eof())) + { + _M_gcount = 1; + __c = traits_type::to_char_type(__cb); + } + else + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + get(char_type* __s, streamsize __n, char_type __delim) + { + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __idelim = traits_type::to_int_type(__delim); + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sgetc(); + + while (_M_gcount + 1 < __n + && !traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __idelim)) + { + *__s++ = traits_type::to_char_type(__c); + ++_M_gcount; + __c = __sb->snextc(); + } + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + + + if (__n > 0) + *__s = char_type(); + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + get(__streambuf_type& __sb, char_type __delim) + { + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __idelim = traits_type::to_int_type(__delim); + const int_type __eof = traits_type::eof(); + __streambuf_type* __this_sb = this->rdbuf(); + int_type __c = __this_sb->sgetc(); + char_type __c2 = traits_type::to_char_type(__c); + + while (!traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __idelim) + && !traits_type::eq_int_type(__sb.sputc(__c2), __eof)) + { + ++_M_gcount; + __c = __this_sb->snextc(); + __c2 = traits_type::to_char_type(__c); + } + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + getline(char_type* __s, streamsize __n, char_type __delim) + { + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __idelim = traits_type::to_int_type(__delim); + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sgetc(); + + while (_M_gcount + 1 < __n + && !traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __idelim)) + { + *__s++ = traits_type::to_char_type(__c); + __c = __sb->snextc(); + ++_M_gcount; + } + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + else + { + if (traits_type::eq_int_type(__c, __idelim)) + { + __sb->sbumpc(); + ++_M_gcount; + } + else + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + + + if (__n > 0) + *__s = char_type(); + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + + + + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + ignore(void) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + + if (traits_type::eq_int_type(__sb->sbumpc(), __eof)) + __err |= ios_base::eofbit; + else + _M_gcount = 1; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + ignore(streamsize __n) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb && __n > 0) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sgetc(); +# 513 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/istream.tcc" 3 + bool __large_ignore = false; + while (true) + { + while (_M_gcount < __n + && !traits_type::eq_int_type(__c, __eof)) + { + ++_M_gcount; + __c = __sb->snextc(); + } + if (__n == __gnu_cxx::__numeric_traits::__max + && !traits_type::eq_int_type(__c, __eof)) + { + _M_gcount = + __gnu_cxx::__numeric_traits::__min; + __large_ignore = true; + } + else + break; + } + + if (__large_ignore) + _M_gcount = __gnu_cxx::__numeric_traits::__max; + + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + ignore(streamsize __n, int_type __delim) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb && __n > 0) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sgetc(); + + + bool __large_ignore = false; + while (true) + { + while (_M_gcount < __n + && !traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __delim)) + { + ++_M_gcount; + __c = __sb->snextc(); + } + if (__n == __gnu_cxx::__numeric_traits::__max + && !traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __delim)) + { + _M_gcount = + __gnu_cxx::__numeric_traits::__min; + __large_ignore = true; + } + else + break; + } + + if (__large_ignore) + _M_gcount = __gnu_cxx::__numeric_traits::__max; + + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + else if (traits_type::eq_int_type(__c, __delim)) + { + if (_M_gcount + < __gnu_cxx::__numeric_traits::__max) + ++_M_gcount; + __sb->sbumpc(); + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + typename basic_istream<_CharT, _Traits>::int_type + basic_istream<_CharT, _Traits>:: + peek(void) + { + int_type __c = traits_type::eof(); + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + __c = this->rdbuf()->sgetc(); + if (traits_type::eq_int_type(__c, traits_type::eof())) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return __c; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + read(char_type* __s, streamsize __n) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + _M_gcount = this->rdbuf()->sgetn(__s, __n); + if (_M_gcount != __n) + __err |= (ios_base::eofbit | ios_base::failbit); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + streamsize + basic_istream<_CharT, _Traits>:: + readsome(char_type* __s, streamsize __n) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + + const streamsize __num = this->rdbuf()->in_avail(); + if (__num > 0) + _M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n)); + else if (__num == -1) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return _M_gcount; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + putback(char_type __c) + { + + + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + if (!__sb + || traits_type::eq_int_type(__sb->sputbackc(__c), __eof)) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + unget(void) + { + + + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + if (!__sb + || traits_type::eq_int_type(__sb->sungetc(), __eof)) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + int + basic_istream<_CharT, _Traits>:: + sync(void) + { + + + int __ret = -1; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + __streambuf_type* __sb = this->rdbuf(); + if (__sb) + { + if (__sb->pubsync() == -1) + __err |= ios_base::badbit; + else + __ret = 0; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return __ret; + } + + template + typename basic_istream<_CharT, _Traits>::pos_type + basic_istream<_CharT, _Traits>:: + tellg(void) + { + + + pos_type __ret = pos_type(-1); + try + { + if (!this->fail()) + __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, + ios_base::in); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + return __ret; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + seekg(pos_type __pos) + { + + + ios_base::iostate __err = ios_base::goodbit; + try + { + if (!this->fail()) + { + + const pos_type __p = this->rdbuf()->pubseekpos(__pos, + ios_base::in); + + + if (__p == pos_type(off_type(-1))) + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + seekg(off_type __off, ios_base::seekdir __dir) + { + + + ios_base::iostate __err = ios_base::goodbit; + try + { + if (!this->fail()) + { + + const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, + ios_base::in); + + + if (__p == pos_type(off_type(-1))) + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + + + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef typename __istream_type::int_type __int_type; + + typename __istream_type::sentry __cerb(__in, false); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const __int_type __cb = __in.rdbuf()->sbumpc(); + if (!_Traits::eq_int_type(__cb, _Traits::eof())) + __c = _Traits::to_char_type(__cb); + else + __err |= (ios_base::eofbit | ios_base::failbit); + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(ios_base::badbit); + throw; + } + catch(...) + { __in._M_setstate(ios_base::badbit); } + if (__err) + __in.setstate(__err); + } + return __in; + } + + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef typename _Traits::int_type int_type; + typedef _CharT char_type; + typedef ctype<_CharT> __ctype_type; + + streamsize __extracted = 0; + ios_base::iostate __err = ios_base::goodbit; + typename __istream_type::sentry __cerb(__in, false); + if (__cerb) + { + try + { + + streamsize __num = __in.width(); + if (__num <= 0) + __num = __gnu_cxx::__numeric_traits::__max; + + const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); + + const int_type __eof = _Traits::eof(); + __streambuf_type* __sb = __in.rdbuf(); + int_type __c = __sb->sgetc(); + + while (__extracted < __num - 1 + && !_Traits::eq_int_type(__c, __eof) + && !__ct.is(ctype_base::space, + _Traits::to_char_type(__c))) + { + *__s++ = _Traits::to_char_type(__c); + ++__extracted; + __c = __sb->snextc(); + } + if (_Traits::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + + + + *__s = char_type(); + __in.width(0); + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(ios_base::badbit); + throw; + } + catch(...) + { __in._M_setstate(ios_base::badbit); } + } + if (!__extracted) + __err |= ios_base::failbit; + if (__err) + __in.setstate(__err); + return __in; + } + + + template + basic_istream<_CharT, _Traits>& + ws(basic_istream<_CharT, _Traits>& __in) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef typename __istream_type::int_type __int_type; + typedef ctype<_CharT> __ctype_type; + + const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); + const __int_type __eof = _Traits::eof(); + __streambuf_type* __sb = __in.rdbuf(); + __int_type __c = __sb->sgetc(); + + while (!_Traits::eq_int_type(__c, __eof) + && __ct.is(ctype_base::space, _Traits::to_char_type(__c))) + __c = __sb->snextc(); + + if (_Traits::eq_int_type(__c, __eof)) + __in.setstate(ios_base::eofbit); + return __in; + } + + + + + + extern template class basic_istream; + extern template istream& ws(istream&); + extern template istream& operator>>(istream&, char&); + extern template istream& operator>>(istream&, char*); + extern template istream& operator>>(istream&, unsigned char&); + extern template istream& operator>>(istream&, signed char&); + extern template istream& operator>>(istream&, unsigned char*); + extern template istream& operator>>(istream&, signed char*); + + extern template istream& istream::_M_extract(unsigned short&); + extern template istream& istream::_M_extract(unsigned int&); + extern template istream& istream::_M_extract(long&); + extern template istream& istream::_M_extract(unsigned long&); + extern template istream& istream::_M_extract(bool&); + + extern template istream& istream::_M_extract(long long&); + extern template istream& istream::_M_extract(unsigned long long&); + + extern template istream& istream::_M_extract(float&); + extern template istream& istream::_M_extract(double&); + extern template istream& istream::_M_extract(long double&); + extern template istream& istream::_M_extract(void*&); + + extern template class basic_iostream; + + + extern template class basic_istream; + extern template wistream& ws(wistream&); + extern template wistream& operator>>(wistream&, wchar_t&); + extern template wistream& operator>>(wistream&, wchar_t*); + + extern template wistream& wistream::_M_extract(unsigned short&); + extern template wistream& wistream::_M_extract(unsigned int&); + extern template wistream& wistream::_M_extract(long&); + extern template wistream& wistream::_M_extract(unsigned long&); + extern template wistream& wistream::_M_extract(bool&); + + extern template wistream& wistream::_M_extract(long long&); + extern template wistream& wistream::_M_extract(unsigned long long&); + + extern template wistream& wistream::_M_extract(float&); + extern template wistream& wistream::_M_extract(double&); + extern template wistream& wistream::_M_extract(long double&); + extern template wistream& wistream::_M_extract(void*&); + + extern template class basic_iostream; + + + +} +# 855 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/istream" 2 3 +# 67 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/iterator" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stream_iterator.h" 1 3 +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stream_iterator.h" 3 + +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stream_iterator.h" 3 + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + + + + + + template, typename _Dist = ptrdiff_t> + class istream_iterator + : public iterator + { + public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_istream<_CharT, _Traits> istream_type; + + private: + istream_type* _M_stream; + _Tp _M_value; + bool _M_ok; + + public: + + istream_iterator() + : _M_stream(0), _M_value(), _M_ok(false) {} + + + istream_iterator(istream_type& __s) + : _M_stream(&__s) + { _M_read(); } + + istream_iterator(const istream_iterator& __obj) + : _M_stream(__obj._M_stream), _M_value(__obj._M_value), + _M_ok(__obj._M_ok) + { } + + const _Tp& + operator*() const + { + + + ; + return _M_value; + } + + const _Tp* + operator->() const { return &(operator*()); } + + istream_iterator& + operator++() + { + + + ; + _M_read(); + return *this; + } + + istream_iterator + operator++(int) + { + + + ; + istream_iterator __tmp = *this; + _M_read(); + return __tmp; + } + + bool + _M_equal(const istream_iterator& __x) const + { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); } + + private: + void + _M_read() + { + _M_ok = (_M_stream && *_M_stream) ? true : false; + if (_M_ok) + { + *_M_stream >> _M_value; + _M_ok = *_M_stream ? true : false; + } + } + }; + + + template + inline bool + operator==(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, + const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) + { return __x._M_equal(__y); } + + + template + inline bool + operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, + const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) + { return !__x._M_equal(__y); } +# 150 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stream_iterator.h" 3 + template > + class ostream_iterator + : public iterator + { + public: + + + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_ostream<_CharT, _Traits> ostream_type; + + + private: + ostream_type* _M_stream; + const _CharT* _M_string; + + public: + + ostream_iterator(ostream_type& __s) : _M_stream(&__s), _M_string(0) {} +# 181 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stream_iterator.h" 3 + ostream_iterator(ostream_type& __s, const _CharT* __c) + : _M_stream(&__s), _M_string(__c) { } + + + ostream_iterator(const ostream_iterator& __obj) + : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { } + + + + ostream_iterator& + operator=(const _Tp& __value) + { + + + ; + *_M_stream << __value; + if (_M_string) *_M_stream << _M_string; + return *this; + } + + ostream_iterator& + operator*() + { return *this; } + + ostream_iterator& + operator++() + { return *this; } + + ostream_iterator& + operator++(int) + { return *this; } + }; + + + +} +# 68 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/iterator" 2 3 +# 51 "/usr/include/qt4/QtCore/qlist.h" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/list" 1 3 +# 59 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/list" 3 + +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/list" 3 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 1 3 +# 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + + + + + + + struct _List_node_base + { + _List_node_base* _M_next; + _List_node_base* _M_prev; + + static void + swap(_List_node_base& __x, _List_node_base& __y) throw (); + + void + _M_transfer(_List_node_base * const __first, + _List_node_base * const __last) throw (); + + void + _M_reverse() throw (); + + void + _M_hook(_List_node_base * const __position) throw (); + + void + _M_unhook() throw (); + }; + + + template + struct _List_node : public _List_node_base + { + + _Tp _M_data; + + + + + + + }; + + + + + + + template + struct _List_iterator + { + typedef _List_iterator<_Tp> _Self; + typedef _List_node<_Tp> _Node; + + typedef ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + typedef _Tp value_type; + typedef _Tp* pointer; + typedef _Tp& reference; + + _List_iterator() + : _M_node() { } + + explicit + _List_iterator(_List_node_base* __x) + : _M_node(__x) { } + + + reference + operator*() const + { return static_cast<_Node*>(_M_node)->_M_data; } + + pointer + operator->() const + { return &static_cast<_Node*>(_M_node)->_M_data; } + + _Self& + operator++() + { + _M_node = _M_node->_M_next; + return *this; + } + + _Self + operator++(int) + { + _Self __tmp = *this; + _M_node = _M_node->_M_next; + return __tmp; + } + + _Self& + operator--() + { + _M_node = _M_node->_M_prev; + return *this; + } + + _Self + operator--(int) + { + _Self __tmp = *this; + _M_node = _M_node->_M_prev; + return __tmp; + } + + bool + operator==(const _Self& __x) const + { return _M_node == __x._M_node; } + + bool + operator!=(const _Self& __x) const + { return _M_node != __x._M_node; } + + + _List_node_base* _M_node; + }; + + + + + + + template + struct _List_const_iterator + { + typedef _List_const_iterator<_Tp> _Self; + typedef const _List_node<_Tp> _Node; + typedef _List_iterator<_Tp> iterator; + + typedef ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + typedef _Tp value_type; + typedef const _Tp* pointer; + typedef const _Tp& reference; + + _List_const_iterator() + : _M_node() { } + + explicit + _List_const_iterator(const _List_node_base* __x) + : _M_node(__x) { } + + _List_const_iterator(const iterator& __x) + : _M_node(__x._M_node) { } + + + + reference + operator*() const + { return static_cast<_Node*>(_M_node)->_M_data; } + + pointer + operator->() const + { return &static_cast<_Node*>(_M_node)->_M_data; } + + _Self& + operator++() + { + _M_node = _M_node->_M_next; + return *this; + } + + _Self + operator++(int) + { + _Self __tmp = *this; + _M_node = _M_node->_M_next; + return __tmp; + } + + _Self& + operator--() + { + _M_node = _M_node->_M_prev; + return *this; + } + + _Self + operator--(int) + { + _Self __tmp = *this; + _M_node = _M_node->_M_prev; + return __tmp; + } + + bool + operator==(const _Self& __x) const + { return _M_node == __x._M_node; } + + bool + operator!=(const _Self& __x) const + { return _M_node != __x._M_node; } + + + const _List_node_base* _M_node; + }; + + template + inline bool + operator==(const _List_iterator<_Val>& __x, + const _List_const_iterator<_Val>& __y) + { return __x._M_node == __y._M_node; } + + template + inline bool + operator!=(const _List_iterator<_Val>& __x, + const _List_const_iterator<_Val>& __y) + { return __x._M_node != __y._M_node; } + + + + template + class _List_base + { + public: +# 293 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + typedef typename _Alloc::template rebind<_List_node<_Tp> >::other + _Node_alloc_type; + + typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; + + struct _List_impl + : public _Node_alloc_type + { + _List_node_base _M_node; + + _List_impl() + : _Node_alloc_type(), _M_node() + { } + + _List_impl(const _Node_alloc_type& __a) + : _Node_alloc_type(__a), _M_node() + { } + }; + + _List_impl _M_impl; + + _List_node<_Tp>* + _M_get_node() + { return _M_impl._Node_alloc_type::allocate(1); } + + void + _M_put_node(_List_node<_Tp>* __p) + { _M_impl._Node_alloc_type::deallocate(__p, 1); } + + public: + typedef _Alloc allocator_type; + + _Node_alloc_type& + _M_get_Node_allocator() + { return *static_cast<_Node_alloc_type*>(&this->_M_impl); } + + const _Node_alloc_type& + _M_get_Node_allocator() const + { return *static_cast(&this->_M_impl); } + + _Tp_alloc_type + _M_get_Tp_allocator() const + { return _Tp_alloc_type(_M_get_Node_allocator()); } + + allocator_type + get_allocator() const + { return allocator_type(_M_get_Node_allocator()); } + + _List_base() + : _M_impl() + { _M_init(); } + + _List_base(const allocator_type& __a) + : _M_impl(__a) + { _M_init(); } +# 359 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + ~_List_base() + { _M_clear(); } + + void + _M_clear(); + + void + _M_init() + { + this->_M_impl._M_node._M_next = &this->_M_impl._M_node; + this->_M_impl._M_node._M_prev = &this->_M_impl._M_node; + } + }; +# 416 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + template > + class list : public _List_base<_Tp, _Alloc> + { + + typedef typename _Alloc::value_type _Alloc_value_type; + + + + typedef _List_base<_Tp, _Alloc> _Base; + typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; + + public: + typedef _Tp value_type; + typedef typename _Tp_alloc_type::pointer pointer; + typedef typename _Tp_alloc_type::const_pointer const_pointer; + typedef typename _Tp_alloc_type::reference reference; + typedef typename _Tp_alloc_type::const_reference const_reference; + typedef _List_iterator<_Tp> iterator; + typedef _List_const_iterator<_Tp> const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Alloc allocator_type; + + public: + + + typedef _List_node<_Tp> _Node; + + using _Base::_M_impl; + using _Base::_M_put_node; + using _Base::_M_get_node; + using _Base::_M_get_Tp_allocator; + using _Base::_M_get_Node_allocator; + + + + + + + + _Node* + _M_create_node(const value_type& __x) + { + _Node* __p = this->_M_get_node(); + try + { + _M_get_Tp_allocator().construct(&__p->_M_data, __x); + } + catch(...) + { + _M_put_node(__p); + throw; + } + return __p; + } +# 493 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + public: + + + + + + list() + : _Base() { } + + + + + + explicit + list(const allocator_type& __a) + : _Base(__a) { } +# 518 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + explicit + list(size_type __n, const value_type& __value = value_type(), + const allocator_type& __a = allocator_type()) + : _Base(__a) + { _M_fill_initialize(__n, __value); } +# 531 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + list(const list& __x) + : _Base(__x._M_get_Node_allocator()) + { _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); } +# 570 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + template + list(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_initialize_dispatch(__first, __last, _Integral()); + } +# 595 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + list& + operator=(const list& __x); +# 641 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + void + assign(size_type __n, const value_type& __val) + { _M_fill_assign(__n, __val); } +# 657 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + template + void + assign(_InputIterator __first, _InputIterator __last) + { + + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } +# 680 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + allocator_type + get_allocator() const + { return _Base::get_allocator(); } + + + + + + + iterator + begin() + { return iterator(this->_M_impl._M_node._M_next); } + + + + + + + const_iterator + begin() const + { return const_iterator(this->_M_impl._M_node._M_next); } + + + + + + + iterator + end() + { return iterator(&this->_M_impl._M_node); } + + + + + + + const_iterator + end() const + { return const_iterator(&this->_M_impl._M_node); } + + + + + + + reverse_iterator + rbegin() + { return reverse_iterator(end()); } + + + + + + + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(end()); } + + + + + + + reverse_iterator + rend() + { return reverse_iterator(begin()); } + + + + + + + const_reverse_iterator + rend() const + { return const_reverse_iterator(begin()); } +# 799 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + bool + empty() const + { return this->_M_impl._M_node._M_next == &this->_M_impl._M_node; } + + + size_type + size() const + { return std::distance(begin(), end()); } + + + size_type + max_size() const + { return _M_get_Node_allocator().max_size(); } +# 823 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + void + resize(size_type __new_size, value_type __x = value_type()); + + + + + + + reference + front() + { return *begin(); } + + + + + + const_reference + front() const + { return *begin(); } + + + + + + reference + back() + { + iterator __tmp = end(); + --__tmp; + return *__tmp; + } + + + + + + const_reference + back() const + { + const_iterator __tmp = end(); + --__tmp; + return *__tmp; + } +# 878 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + void + push_front(const value_type& __x) + { this->_M_insert(begin(), __x); } +# 905 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + void + pop_front() + { this->_M_erase(begin()); } +# 919 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + void + push_back(const value_type& __x) + { this->_M_insert(end(), __x); } +# 945 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + void + pop_back() + { this->_M_erase(iterator(this->_M_impl._M_node._M_prev)); } +# 978 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + iterator + insert(iterator __position, const value_type& __x); +# 1027 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + void + insert(iterator __position, size_type __n, const value_type& __x) + { + list __tmp(__n, __x, _M_get_Node_allocator()); + splice(__position, __tmp); + } +# 1047 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + template + void + insert(iterator __position, _InputIterator __first, + _InputIterator __last) + { + list __tmp(__first, __last, _M_get_Node_allocator()); + splice(__position, __tmp); + } +# 1071 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + iterator + erase(iterator __position); +# 1092 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + iterator + erase(iterator __first, iterator __last) + { + while (__first != __last) + __first = erase(__first); + return __last; + } +# 1109 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + void + swap(list& __x) + { + _List_node_base::swap(this->_M_impl._M_node, __x._M_impl._M_node); + + + + std::__alloc_swap:: + _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator()); + } + + + + + + + + void + clear() + { + _Base::_M_clear(); + _Base::_M_init(); + } +# 1145 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + void + + + + splice(iterator __position, list& __x) + + { + if (!__x.empty()) + { + _M_check_equal_allocators(__x); + + this->_M_transfer(__position, __x.begin(), __x.end()); + } + } +# 1175 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + void + + + + splice(iterator __position, list& __x, iterator __i) + + { + iterator __j = __i; + ++__j; + if (__position == __i || __position == __j) + return; + + if (this != &__x) + _M_check_equal_allocators(__x); + + this->_M_transfer(__position, __i, __j); + } +# 1211 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + void + + + + + splice(iterator __position, list& __x, iterator __first, + iterator __last) + + { + if (__first != __last) + { + if (this != &__x) + _M_check_equal_allocators(__x); + + this->_M_transfer(__position, __first, __last); + } + } +# 1246 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + void + remove(const _Tp& __value); +# 1260 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + template + void + remove_if(_Predicate); +# 1274 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + void + unique(); +# 1289 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + template + void + unique(_BinaryPredicate); +# 1310 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + void + merge(list& __x); +# 1336 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + template + void + merge(list&, _StrictWeakOrdering); + + + + + + + + void + reverse() + { this->_M_impl._M_node._M_reverse(); } + + + + + + + + void + sort(); + + + + + + + + template + void + sort(_StrictWeakOrdering); + + public: + + + + + + + template + void + _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) + { _M_fill_initialize(static_cast(__n), __x); } + + + template + void + _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { + for (; __first != __last; ++__first) + push_back(*__first); + } + + + + void + _M_fill_initialize(size_type __n, const value_type& __x) + { + for (; __n > 0; --__n) + push_back(__x); + } +# 1407 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + template + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } + + + template + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + __false_type); + + + + void + _M_fill_assign(size_type __n, const value_type& __val); + + + + void + _M_transfer(iterator __position, iterator __first, iterator __last) + { __position._M_node->_M_transfer(__first._M_node, __last._M_node); } + + + + void + _M_insert(iterator __position, const value_type& __x) + { + _Node* __tmp = _M_create_node(__x); + __tmp->_M_hook(__position._M_node); + } +# 1448 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + void + _M_erase(iterator __position) + { + __position._M_node->_M_unhook(); + _Node* __n = static_cast<_Node*>(__position._M_node); + + + + _M_get_Tp_allocator().destroy(&__n->_M_data); + + _M_put_node(__n); + } + + + void + _M_check_equal_allocators(list& __x) + { + if (std::__alloc_neq:: + _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator())) + __throw_runtime_error(("list::_M_check_equal_allocators")); + } + }; +# 1481 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + template + inline bool + operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { + typedef typename list<_Tp, _Alloc>::const_iterator const_iterator; + const_iterator __end1 = __x.end(); + const_iterator __end2 = __y.end(); + + const_iterator __i1 = __x.begin(); + const_iterator __i2 = __y.begin(); + while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2) + { + ++__i1; + ++__i2; + } + return __i1 == __end1 && __i2 == __end2; + } +# 1510 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_list.h" 3 + template + inline bool + operator<(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return std::lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); } + + + template + inline bool + operator!=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return !(__x == __y); } + + + template + inline bool + operator>(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return __y < __x; } + + + template + inline bool + operator<=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return !(__y < __x); } + + + template + inline bool + operator>=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return !(__x < __y); } + + + template + inline void + swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y) + { __x.swap(__y); } + +} +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/list" 2 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/list.tcc" 1 3 +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/list.tcc" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + void + _List_base<_Tp, _Alloc>:: + _M_clear() + { + typedef _List_node<_Tp> _Node; + _Node* __cur = static_cast<_Node*>(this->_M_impl._M_node._M_next); + while (__cur != &this->_M_impl._M_node) + { + _Node* __tmp = __cur; + __cur = static_cast<_Node*>(__cur->_M_next); + + + + _M_get_Tp_allocator().destroy(&__tmp->_M_data); + + _M_put_node(__tmp); + } + } +# 95 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/list.tcc" 3 + template + typename list<_Tp, _Alloc>::iterator + list<_Tp, _Alloc>:: + insert(iterator __position, const value_type& __x) + { + _Node* __tmp = _M_create_node(__x); + __tmp->_M_hook(__position._M_node); + return iterator(__tmp); + } + + template + typename list<_Tp, _Alloc>::iterator + list<_Tp, _Alloc>:: + erase(iterator __position) + { + iterator __ret = iterator(__position._M_node->_M_next); + _M_erase(__position); + return __ret; + } + + template + void + list<_Tp, _Alloc>:: + resize(size_type __new_size, value_type __x) + { + iterator __i = begin(); + size_type __len = 0; + for (; __i != end() && __len < __new_size; ++__i, ++__len) + ; + if (__len == __new_size) + erase(__i, end()); + else + insert(end(), __new_size - __len, __x); + } + + template + list<_Tp, _Alloc>& + list<_Tp, _Alloc>:: + operator=(const list& __x) + { + if (this != &__x) + { + iterator __first1 = begin(); + iterator __last1 = end(); + const_iterator __first2 = __x.begin(); + const_iterator __last2 = __x.end(); + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, ++__first2) + *__first1 = *__first2; + if (__first2 == __last2) + erase(__first1, __last1); + else + insert(__last1, __first2, __last2); + } + return *this; + } + + template + void + list<_Tp, _Alloc>:: + _M_fill_assign(size_type __n, const value_type& __val) + { + iterator __i = begin(); + for (; __i != end() && __n > 0; ++__i, --__n) + *__i = __val; + if (__n > 0) + insert(end(), __n, __val); + else + erase(__i, end()); + } + + template + template + void + list<_Tp, _Alloc>:: + _M_assign_dispatch(_InputIterator __first2, _InputIterator __last2, + __false_type) + { + iterator __first1 = begin(); + iterator __last1 = end(); + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, ++__first2) + *__first1 = *__first2; + if (__first2 == __last2) + erase(__first1, __last1); + else + insert(__last1, __first2, __last2); + } + + template + void + list<_Tp, _Alloc>:: + remove(const value_type& __value) + { + iterator __first = begin(); + iterator __last = end(); + iterator __extra = __last; + while (__first != __last) + { + iterator __next = __first; + ++__next; + if (*__first == __value) + { + + + + if (&*__first != &__value) + _M_erase(__first); + else + __extra = __first; + } + __first = __next; + } + if (__extra != __last) + _M_erase(__extra); + } + + template + void + list<_Tp, _Alloc>:: + unique() + { + iterator __first = begin(); + iterator __last = end(); + if (__first == __last) + return; + iterator __next = __first; + while (++__next != __last) + { + if (*__first == *__next) + _M_erase(__next); + else + __first = __next; + __next = __first; + } + } + + template + void + list<_Tp, _Alloc>:: + + + + merge(list& __x) + + { + + + if (this != &__x) + { + _M_check_equal_allocators(__x); + + iterator __first1 = begin(); + iterator __last1 = end(); + iterator __first2 = __x.begin(); + iterator __last2 = __x.end(); + while (__first1 != __last1 && __first2 != __last2) + if (*__first2 < *__first1) + { + iterator __next = __first2; + _M_transfer(__first1, __first2, ++__next); + __first2 = __next; + } + else + ++__first1; + if (__first2 != __last2) + _M_transfer(__last1, __first2, __last2); + } + } + + template + template + void + list<_Tp, _Alloc>:: + + + + merge(list& __x, _StrictWeakOrdering __comp) + + { + + + if (this != &__x) + { + _M_check_equal_allocators(__x); + + iterator __first1 = begin(); + iterator __last1 = end(); + iterator __first2 = __x.begin(); + iterator __last2 = __x.end(); + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first2, *__first1)) + { + iterator __next = __first2; + _M_transfer(__first1, __first2, ++__next); + __first2 = __next; + } + else + ++__first1; + if (__first2 != __last2) + _M_transfer(__last1, __first2, __last2); + } + } + + template + void + list<_Tp, _Alloc>:: + sort() + { + + if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node + && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node) + { + list __carry; + list __tmp[64]; + list * __fill = &__tmp[0]; + list * __counter; + + do + { + __carry.splice(__carry.begin(), *this, begin()); + + for(__counter = &__tmp[0]; + __counter != __fill && !__counter->empty(); + ++__counter) + { + __counter->merge(__carry); + __carry.swap(*__counter); + } + __carry.swap(*__counter); + if (__counter == __fill) + ++__fill; + } + while ( !empty() ); + + for (__counter = &__tmp[1]; __counter != __fill; ++__counter) + __counter->merge(*(__counter - 1)); + swap( *(__fill - 1) ); + } + } + + template + template + void + list<_Tp, _Alloc>:: + remove_if(_Predicate __pred) + { + iterator __first = begin(); + iterator __last = end(); + while (__first != __last) + { + iterator __next = __first; + ++__next; + if (__pred(*__first)) + _M_erase(__first); + __first = __next; + } + } + + template + template + void + list<_Tp, _Alloc>:: + unique(_BinaryPredicate __binary_pred) + { + iterator __first = begin(); + iterator __last = end(); + if (__first == __last) + return; + iterator __next = __first; + while (++__next != __last) + { + if (__binary_pred(*__first, *__next)) + _M_erase(__next); + else + __first = __next; + __next = __first; + } + } + + template + template + void + list<_Tp, _Alloc>:: + sort(_StrictWeakOrdering __comp) + { + + if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node + && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node) + { + list __carry; + list __tmp[64]; + list * __fill = &__tmp[0]; + list * __counter; + + do + { + __carry.splice(__carry.begin(), *this, begin()); + + for(__counter = &__tmp[0]; + __counter != __fill && !__counter->empty(); + ++__counter) + { + __counter->merge(__carry, __comp); + __carry.swap(*__counter); + } + __carry.swap(*__counter); + if (__counter == __fill) + ++__fill; + } + while ( !empty() ); + + for (__counter = &__tmp[1]; __counter != __fill; ++__counter) + __counter->merge(*(__counter - 1), __comp); + swap(*(__fill - 1)); + } + } + +} +# 67 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/list" 2 3 +# 52 "/usr/include/qt4/QtCore/qlist.h" 2 + + + + + + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +template class QVector; +template class QSet; + +struct QListData { + struct Data { + QBasicAtomicInt ref; + int alloc, begin, end; + uint sharable : 1; + void *array[1]; + }; + enum { DataHeaderSize = sizeof(Data) - sizeof(void *) }; + + Data *detach(); + Data *detach2(); + Data *detach3(); + void realloc(int alloc); + static Data shared_null; + Data *d; + void **erase(void **xi); + void **append(); + void **append(const QListData &l); + void **append2(const QListData &l); + void **prepend(); + void **insert(int i); + void remove(int i); + void remove(int i, int n); + void move(int from, int to); + inline int size() const { return d->end - d->begin; } + inline bool isEmpty() const { return d->end == d->begin; } + inline void **at(int i) const { return d->array + d->begin + i; } + inline void **begin() const { return d->array + d->begin; } + inline void **end() const { return d->array + d->end; } +}; + +template +class QList +{ + struct Node { void *v; + + + + inline T &t() + { return *reinterpret_cast(QTypeInfo::isLarge || QTypeInfo::isStatic + ? v : this); } + + }; + + union { QListData p; QListData::Data *d; }; + +public: + inline QList() : d(&QListData::shared_null) { d->ref.ref(); } + inline QList(const QList &l) : d(l.d) { d->ref.ref(); if (!d->sharable) detach_helper(); } + ~QList(); + QList &operator=(const QList &l); + bool operator==(const QList &l) const; + inline bool operator!=(const QList &l) const { return !(*this == l); } + + inline int size() const { return p.size(); } + + inline void detach() { if (d->ref != 1) detach_helper(); } + + inline void detachShared() + { + + if (d->ref != 1 && this->d != &QListData::shared_null) + detach_helper(); + } + + inline bool isDetached() const { return d->ref == 1; } + inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; } + + inline bool isEmpty() const { return p.isEmpty(); } + + void clear(); + + const T &at(int i) const; + const T &operator[](int i) const; + T &operator[](int i); + + void append(const T &t); + void append(const QList &t); + void prepend(const T &t); + void insert(int i, const T &t); + void replace(int i, const T &t); + void removeAt(int i); + int removeAll(const T &t); + bool removeOne(const T &t); + T takeAt(int i); + T takeFirst(); + T takeLast(); + void move(int from, int to); + void swap(int i, int j); + int indexOf(const T &t, int from = 0) const; + int lastIndexOf(const T &t, int from = -1) const; + QBool contains(const T &t) const; + int count(const T &t) const; + + class const_iterator; + + class iterator { + public: + Node *i; + typedef std::random_access_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + typedef T value_type; + typedef T *pointer; + typedef T &reference; + + inline iterator() : i(0) {} + inline iterator(Node *n) : i(n) {} + inline iterator(const iterator &o): i(o.i){} + inline T &operator*() const { return i->t(); } + inline T *operator->() const { return &i->t(); } + inline T &operator[](int j) const { return i[j].t(); } + inline bool operator==(const iterator &o) const { return i == o.i; } + inline bool operator!=(const iterator &o) const { return i != o.i; } + inline bool operator<(const iterator& other) const { return i < other.i; } + inline bool operator<=(const iterator& other) const { return i <= other.i; } + inline bool operator>(const iterator& other) const { return i > other.i; } + inline bool operator>=(const iterator& other) const { return i >= other.i; } + + inline bool operator==(const const_iterator &o) const + { return i == o.i; } + inline bool operator!=(const const_iterator &o) const + { return i != o.i; } + inline bool operator<(const const_iterator& other) const + { return i < other.i; } + inline bool operator<=(const const_iterator& other) const + { return i <= other.i; } + inline bool operator>(const const_iterator& other) const + { return i > other.i; } + inline bool operator>=(const const_iterator& other) const + { return i >= other.i; } + + inline iterator &operator++() { ++i; return *this; } + inline iterator operator++(int) { Node *n = i; ++i; return n; } + inline iterator &operator--() { i--; return *this; } + inline iterator operator--(int) { Node *n = i; i--; return n; } + inline iterator &operator+=(int j) { i+=j; return *this; } + inline iterator &operator-=(int j) { i-=j; return *this; } + inline iterator operator+(int j) const { return iterator(i+j); } + inline iterator operator-(int j) const { return iterator(i-j); } + inline int operator-(iterator j) const { return int(i - j.i); } + }; + friend class iterator; + + class const_iterator { + public: + Node *i; + typedef std::random_access_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + typedef T value_type; + typedef const T *pointer; + typedef const T &reference; + + inline const_iterator() : i(0) {} + inline const_iterator(Node *n) : i(n) {} + inline const_iterator(const const_iterator &o): i(o.i) {} + + + + inline const_iterator(const iterator &o): i(o.i) {} + + inline const T &operator*() const { return i->t(); } + inline const T *operator->() const { return &i->t(); } + inline const T &operator[](int j) const { return i[j].t(); } + inline bool operator==(const const_iterator &o) const { return i == o.i; } + inline bool operator!=(const const_iterator &o) const { return i != o.i; } + inline bool operator<(const const_iterator& other) const { return i < other.i; } + inline bool operator<=(const const_iterator& other) const { return i <= other.i; } + inline bool operator>(const const_iterator& other) const { return i > other.i; } + inline bool operator>=(const const_iterator& other) const { return i >= other.i; } + inline const_iterator &operator++() { ++i; return *this; } + inline const_iterator operator++(int) { Node *n = i; ++i; return n; } + inline const_iterator &operator--() { i--; return *this; } + inline const_iterator operator--(int) { Node *n = i; i--; return n; } + inline const_iterator &operator+=(int j) { i+=j; return *this; } + inline const_iterator &operator-=(int j) { i-=j; return *this; } + inline const_iterator operator+(int j) const { return const_iterator(i+j); } + inline const_iterator operator-(int j) const { return const_iterator(i-j); } + inline int operator-(const_iterator j) const { return i - j.i; } + }; + friend class const_iterator; + + + inline iterator begin() { detach(); return reinterpret_cast(p.begin()); } + inline const_iterator begin() const { return reinterpret_cast(p.begin()); } + inline const_iterator constBegin() const { return reinterpret_cast(p.begin()); } + inline iterator end() { detach(); return reinterpret_cast(p.end()); } + inline const_iterator end() const { return reinterpret_cast(p.end()); } + inline const_iterator constEnd() const { return reinterpret_cast(p.end()); } + iterator insert(iterator before, const T &t); + iterator erase(iterator pos); + iterator erase(iterator first, iterator last); + + + typedef iterator Iterator; + typedef const_iterator ConstIterator; + inline int count() const { return p.size(); } + inline int length() const { return p.size(); } + inline T& first() { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qlist.h",263) : qt_noop()); return *begin(); } + inline const T& first() const { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qlist.h",264) : qt_noop()); return *begin(); } + T& last() { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qlist.h",265) : qt_noop()); return *(--end()); } + const T& last() const { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qlist.h",266) : qt_noop()); return *(--end()); } + inline void removeFirst() { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qlist.h",267) : qt_noop()); erase(begin()); } + inline void removeLast() { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qlist.h",268) : qt_noop()); erase(--end()); } + inline bool startsWith(const T &t) const { return !isEmpty() && first() == t; } + inline bool endsWith(const T &t) const { return !isEmpty() && last() == t; } + QList mid(int pos, int length = -1) const; + + T value(int i) const; + T value(int i, const T &defaultValue) const; + + + inline void push_back(const T &t) { append(t); } + inline void push_front(const T &t) { prepend(t); } + inline T& front() { return first(); } + inline const T& front() const { return first(); } + inline T& back() { return last(); } + inline const T& back() const { return last(); } + inline void pop_front() { removeFirst(); } + inline void pop_back() { removeLast(); } + inline bool empty() const { return isEmpty(); } + typedef int size_type; + typedef T value_type; + typedef value_type *pointer; + typedef const value_type *const_pointer; + typedef value_type &reference; + typedef const value_type &const_reference; + typedef ptrdiff_t difference_type; +# 309 "/usr/include/qt4/QtCore/qlist.h" + QList &operator+=(const QList &l); + inline QList operator+(const QList &l) const + { QList n = *this; n += l; return n; } + inline QList &operator+=(const T &t) + { append(t); return *this; } + inline QList &operator<< (const T &t) + { append(t); return *this; } + inline QList &operator<<(const QList &l) + { *this += l; return *this; } + + QVector toVector() const; + QSet toSet() const; + + static QList fromVector(const QVector &vector); + static QList fromSet(const QSet &set); + + + static inline QList fromStdList(const std::list &list) + { QList tmp; qCopy(list.begin(), list.end(), std::back_inserter(tmp)); return tmp; } + inline std::list toStdList() const + { std::list tmp; qCopy(constBegin(), constEnd(), std::back_inserter(tmp)); return tmp; } + + +private: + void detach_helper(); + void free(QListData::Data *d); + + void node_construct(Node *n, const T &t); + void node_destruct(Node *n); + void node_copy(Node *from, Node *to, Node *src); + void node_destruct(Node *from, Node *to); +}; + + + + + + + +template +inline void QList::node_construct(Node *n, const T &t) +{ + if (QTypeInfo::isLarge || QTypeInfo::isStatic) n->v = new T(t); + else if (QTypeInfo::isComplex) new (n) T(t); + else *reinterpret_cast(n) = t; +} + +template +inline void QList::node_destruct(Node *n) +{ + if (QTypeInfo::isLarge || QTypeInfo::isStatic) delete reinterpret_cast(n->v); + else if (QTypeInfo::isComplex) reinterpret_cast(n)->~T(); +} + +template +inline void QList::node_copy(Node *from, Node *to, Node *src) +{ + Node *current = from; + if (QTypeInfo::isLarge || QTypeInfo::isStatic) { + try { + while(current != to) { + current->v = new T(*reinterpret_cast(src->v)); + ++current; + ++src; + } + } catch (...) { + while (current-- != from) + delete reinterpret_cast(current->v); + throw; + } + + } else if (QTypeInfo::isComplex) { + try { + while(current != to) { + new (current) T(*reinterpret_cast(src)); + ++current; + ++src; + } + } catch (...) { + while (current-- != from) + (reinterpret_cast(current))->~T(); + throw; + } + } else { + if (src != from && to - from > 0) + memcpy(from, src, (to - from) * sizeof(Node *)); + } +} + +template +inline void QList::node_destruct(Node *from, Node *to) +{ + if (QTypeInfo::isLarge || QTypeInfo::isStatic) + while(from != to) --to, delete reinterpret_cast(to->v); + else if (QTypeInfo::isComplex) + while (from != to) --to, reinterpret_cast(to)->~T(); +} + +template +inline QList &QList::operator=(const QList &l) +{ + if (d != l.d) { + l.d->ref.ref(); + if (!d->ref.deref()) + free(d); + d = l.d; + if (!d->sharable) + detach_helper(); + } + return *this; +} +template +inline typename QList::iterator QList::insert(iterator before, const T &t) +{ + int iBefore = int(before.i - reinterpret_cast(p.begin())); + Node *n = reinterpret_cast(p.insert(iBefore)); + try { + node_construct(n, t); + } catch (...) { + p.remove(iBefore); + throw; + } + return n; +} +template +inline typename QList::iterator QList::erase(iterator it) +{ node_destruct(it.i); + return reinterpret_cast(p.erase(reinterpret_cast(it.i))); } +template +inline const T &QList::at(int i) const +{ ((!(i >= 0 && i < p.size())) ? qt_assert_x("QList::at", "index out of range","/usr/include/qt4/QtCore/qlist.h",439) : qt_noop()); + return reinterpret_cast(p.at(i))->t(); } +template +inline const T &QList::operator[](int i) const +{ ((!(i >= 0 && i < p.size())) ? qt_assert_x("QList::operator[]", "index out of range","/usr/include/qt4/QtCore/qlist.h",443) : qt_noop()); + return reinterpret_cast(p.at(i))->t(); } +template +inline T &QList::operator[](int i) +{ ((!(i >= 0 && i < p.size())) ? qt_assert_x("QList::operator[]", "index out of range","/usr/include/qt4/QtCore/qlist.h",447) : qt_noop()); + detach(); return reinterpret_cast(p.at(i))->t(); } +template +inline void QList::removeAt(int i) +{ if(i >= 0 && i < p.size()) { detach(); + node_destruct(reinterpret_cast(p.at(i))); p.remove(i); } } +template +inline T QList::takeAt(int i) +{ ((!(i >= 0 && i < p.size())) ? qt_assert_x("QList::take", "index out of range","/usr/include/qt4/QtCore/qlist.h",455) : qt_noop()); + detach(); Node *n = reinterpret_cast(p.at(i)); T t = n->t(); node_destruct(n); + p.remove(i); return t; } +template +inline T QList::takeFirst() +{ T t = first(); removeFirst(); return t; } +template +inline T QList::takeLast() +{ T t = last(); removeLast(); return t; } + +template + void QList::append(const T &t) +{ + detach(); + if (QTypeInfo::isLarge || QTypeInfo::isStatic) { + Node *n = reinterpret_cast(p.append()); + try { + node_construct(n, t); + } catch (...) { + --d->end; + throw; + } + } else { + const T cpy(t); + Node *n = reinterpret_cast(p.append()); + try { + node_construct(n, cpy); + } catch (...) { + --d->end; + throw; + } + } +} + +template +inline void QList::prepend(const T &t) +{ + detach(); + if (QTypeInfo::isLarge || QTypeInfo::isStatic) { + Node *n = reinterpret_cast(p.prepend()); + try { + node_construct(n, t); + } catch (...) { + ++d->begin; + throw; + } + } else { + const T cpy(t); + Node *n = reinterpret_cast(p.prepend()); + try { + node_construct(n, cpy); + } catch (...) { + ++d->begin; + throw; + } + } +} + +template +inline void QList::insert(int i, const T &t) +{ + detach(); + if (QTypeInfo::isLarge || QTypeInfo::isStatic) { + Node *n = reinterpret_cast(p.insert(i)); + try { + node_construct(n, t); + } catch (...) { + p.remove(i); + throw; + } + } else { + const T cpy(t); + Node *n = reinterpret_cast(p.insert(i)); + try { + node_construct(n, cpy); + } catch (...) { + p.remove(i); + throw; + } + } +} + +template +inline void QList::replace(int i, const T &t) +{ + ((!(i >= 0 && i < p.size())) ? qt_assert_x("QList::replace", "index out of range","/usr/include/qt4/QtCore/qlist.h",540) : qt_noop()); + detach(); + if (QTypeInfo::isLarge || QTypeInfo::isStatic) { + reinterpret_cast(p.at(i))->t() = t; + } else { + const T cpy(t); + reinterpret_cast(p.at(i))->t() = cpy; + } +} + +template +inline void QList::swap(int i, int j) +{ + ((!(i >= 0 && i < p.size() && j >= 0 && j < p.size())) ? qt_assert_x("QList::swap", "index out of range", + "/usr/include/qt4/QtCore/qlist.h" +# 553 "/usr/include/qt4/QtCore/qlist.h" + , + 554 +# 553 "/usr/include/qt4/QtCore/qlist.h" + ) : qt_noop()) + ; + detach(); + void *t = d->array[d->begin + i]; + d->array[d->begin + i] = d->array[d->begin + j]; + d->array[d->begin + j] = t; +} + +template +inline void QList::move(int from, int to) +{ + ((!(from >= 0 && from < p.size() && to >= 0 && to < p.size())) ? qt_assert_x("QList::move", "index out of range", + "/usr/include/qt4/QtCore/qlist.h" +# 564 "/usr/include/qt4/QtCore/qlist.h" + , + 565 +# 564 "/usr/include/qt4/QtCore/qlist.h" + ) : qt_noop()) + ; + detach(); + p.move(from, to); +} + +template + QList QList::mid(int pos, int alength) const +{ + if (alength < 0) + alength = size() - pos; + if (pos == 0 && alength == size()) + return *this; + QList cpy; + if (pos + alength > size()) + alength = size() - pos; + for (int i = pos; i < pos + alength; ++i) + cpy += at(i); + return cpy; +} + +template + T QList::value(int i) const +{ + if (i < 0 || i >= p.size()) { + return T(); + } + return reinterpret_cast(p.at(i))->t(); +} + +template + T QList::value(int i, const T& defaultValue) const +{ + return ((i < 0 || i >= p.size()) ? defaultValue : reinterpret_cast(p.at(i))->t()); +} + +template + void QList::detach_helper() +{ + Node *n = reinterpret_cast(p.begin()); + QListData::Data *x = p.detach3(); + try { + node_copy(reinterpret_cast(p.begin()), reinterpret_cast(p.end()), n); + } catch (...) { + qFree(d); + d = x; + throw; + } + + if (!x->ref.deref()) + free(x); +} + +template + QList::~QList() +{ + if (d && !d->ref.deref()) + free(d); +} + +template + bool QList::operator==(const QList &l) const +{ + if (p.size() != l.p.size()) + return false; + if (d == l.d) + return true; + Node *i = reinterpret_cast(p.end()); + Node *b = reinterpret_cast(p.begin()); + Node *li = reinterpret_cast(l.p.end()); + while (i != b) { + --i; --li; + if (!(i->t() == li->t())) + return false; + } + return true; +} + + +template + void QList::free(QListData::Data *data) +{ + node_destruct(reinterpret_cast(data->array + data->begin), + reinterpret_cast(data->array + data->end)); + if (data->ref == 0) + qFree(data); +} + + +template + void QList::clear() +{ + *this = QList(); +} + +template + int QList::removeAll(const T &_t) +{ + detachShared(); + const T t = _t; + int removedCount=0, i=0; + Node *n; + while (i < p.size()) + if ((n = reinterpret_cast(p.at(i)))->t() == t) { + node_destruct(n); + p.remove(i); + ++removedCount; + } else { + ++i; + } + return removedCount; +} + +template + bool QList::removeOne(const T &_t) +{ + detachShared(); + int index = indexOf(_t); + if (index != -1) { + removeAt(index); + return true; + } + return false; +} + +template + typename QList::iterator QList::erase(typename QList::iterator afirst, + typename QList::iterator alast) +{ + for (Node *n = afirst.i; n < alast.i; ++n) + node_destruct(n); + int idx = afirst - begin(); + p.remove(idx, alast - afirst); + return begin() + idx; +} + +template + QList &QList::operator+=(const QList &l) +{ + detach(); + Node *n = reinterpret_cast(p.append2(l.p)); + try{ + node_copy(n, reinterpret_cast(p.end()), reinterpret_cast(l.p.begin())); + } catch (...) { + + d->end -= int(reinterpret_cast(p.end()) - n); + throw; + } + return *this; +} + +template +inline void QList::append(const QList &t) +{ + *this += t; +} + +template + int QList::indexOf(const T &t, int from) const +{ + if (from < 0) + from = qMax(from + p.size(), 0); + if (from < p.size()) { + Node *n = reinterpret_cast(p.at(from -1)); + Node *e = reinterpret_cast(p.end()); + while (++n != e) + if (n->t() == t) + return int(n - reinterpret_cast(p.begin())); + } + return -1; +} + +template + int QList::lastIndexOf(const T &t, int from) const +{ + if (from < 0) + from += p.size(); + else if (from >= p.size()) + from = p.size()-1; + if (from >= 0) { + Node *b = reinterpret_cast(p.begin()); + Node *n = reinterpret_cast(p.at(from + 1)); + while (n-- != b) { + if (n->t() == t) + return n - b; + } + } + return -1; +} + +template + QBool QList::contains(const T &t) const +{ + Node *b = reinterpret_cast(p.begin()); + Node *i = reinterpret_cast(p.end()); + while (i-- != b) + if (i->t() == t) + return QBool(true); + return QBool(false); +} + +template + int QList::count(const T &t) const +{ + int c = 0; + Node *b = reinterpret_cast(p.begin()); + Node *i = reinterpret_cast(p.end()); + while (i-- != b) + if (i->t() == t) + ++c; + return c; +} + +template class QListIterator { typedef typename QList::const_iterator const_iterator; QList c; const_iterator i; public: inline QListIterator(const QList &container) : c(container), i(c.constBegin()) {} inline QListIterator &operator=(const QList &container) { c = container; i = c.constBegin(); return *this; } inline void toFront() { i = c.constBegin(); } inline void toBack() { i = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline const T &next() { return *i++; } inline const T &peekNext() const { return *i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline const T &previous() { return *--i; } inline const T &peekPrevious() const { const_iterator p = i; return *--p; } inline bool findNext(const T &t) { while (i != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(--i) == t) return true; return false; } }; +template class QMutableListIterator { typedef typename QList::iterator iterator; typedef typename QList::const_iterator const_iterator; QList *c; iterator i, n; inline bool item_exists() const { return const_iterator(n) != c->constEnd(); } public: inline QMutableListIterator(QList &container) : c(&container) { c->setSharable(false); i = c->begin(); n = c->end(); } inline ~QMutableListIterator() { c->setSharable(true); } inline QMutableListIterator &operator=(QList &container) { c->setSharable(true); c = &container; c->setSharable(false); i = c->begin(); n = c->end(); return *this; } inline void toFront() { i = c->begin(); n = c->end(); } inline void toBack() { i = c->end(); n = i; } inline bool hasNext() const { return c->constEnd() != const_iterator(i); } inline T &next() { n = i++; return *n; } inline T &peekNext() const { return *i; } inline bool hasPrevious() const { return c->constBegin() != const_iterator(i); } inline T &previous() { n = --i; return *n; } inline T &peekPrevious() const { iterator p = i; return *--p; } inline void remove() { if (c->constEnd() != const_iterator(n)) { i = c->erase(n); n = c->end(); } } inline void setValue(const T &t) const { if (c->constEnd() != const_iterator(n)) *n = t; } inline T &value() { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qlist.h",778) : qt_noop()); return *n; } inline const T &value() const { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qlist.h",778) : qt_noop()); return *n; } inline void insert(const T &t) { n = i = c->insert(i, t); ++i; } inline bool findNext(const T &t) { while (c->constEnd() != const_iterator(n = i)) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (c->constBegin() != const_iterator(i)) if (*(n = --i) == t) return true; n = c->end(); return false; } }; + + + + +# 51 "/usr/include/qt4/QtCore/qobject.h" 2 + + + + + + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +class QEvent; +class QTimerEvent; +class QChildEvent; +struct QMetaObject; +class QVariant; +class QObjectPrivate; +class QObject; +class QThread; +class QWidget; + +class QRegExp; + + +class QObjectUserData; + + +typedef QList QObjectList; +# 87 "/usr/include/qt4/QtCore/qobject.h" +template inline T qFindChild(const QObject *, const QString & = QString()); +template inline QList qFindChildren(const QObject *, const QString & = QString()); + +template inline QList qFindChildren(const QObject *, const QRegExp &); + + + +class + + + +QObjectData { +public: + virtual ~QObjectData() = 0; + QObject *q_ptr; + QObject *parent; + QObjectList children; + + uint isWidget : 1; + uint pendTimer : 1; + uint blockSig : 1; + uint wasDeleted : 1; + uint ownObjectName : 1; + uint sendChildEvents : 1; + uint receiveChildEvents : 1; + uint inEventHandler : 1; + uint inThreadChangeEvent : 1; + uint hasGuards : 1; + uint unused : 22; + int postedEvents; + QMetaObject *metaObject; +}; + + +class QObject +{ + public: template inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: + + inline QObjectPrivate* d_func() { return reinterpret_cast(qGetPtrHelper(d_ptr)); } inline const QObjectPrivate* d_func() const { return reinterpret_cast(qGetPtrHelper(d_ptr)); } friend class QObjectPrivate; + +public: + explicit QObject(QObject *parent=0); + virtual ~QObject(); + + virtual bool event(QEvent *); + virtual bool eventFilter(QObject *, QEvent *); +# 153 "/usr/include/qt4/QtCore/qobject.h" + QString objectName() const; + void setObjectName(const QString &name); + + inline bool isWidgetType() const { return d_ptr->isWidget; } + + inline bool signalsBlocked() const { return d_ptr->blockSig; } + bool blockSignals(bool b); + + QThread *thread() const; + void moveToThread(QThread *thread); + + int startTimer(int interval); + void killTimer(int id); + + + template + inline T findChild(const QString &aName = QString()) const + { return qFindChild(this, aName); } + + template + inline QList findChildren(const QString &aName = QString()) const + { return qFindChildren(this, aName); } + + + template + inline QList findChildren(const QRegExp &re) const + { return qFindChildren(this, re); } +# 191 "/usr/include/qt4/QtCore/qobject.h" + inline const QObjectList &children() const { return d_ptr->children; } + + void setParent(QObject *); + void installEventFilter(QObject *); + void removeEventFilter(QObject *); + + + static bool connect(const QObject *sender, const char *signal, + const QObject *receiver, const char *member, Qt::ConnectionType = + + + + + + + Qt::AutoConnection + + + ); + inline bool connect(const QObject *sender, const char *signal, + const char *member, Qt::ConnectionType type = + + + + + + + Qt::AutoConnection + + + ) const; + + static bool disconnect(const QObject *sender, const char *signal, + const QObject *receiver, const char *member); + inline bool disconnect(const char *signal = 0, + const QObject *receiver = 0, const char *member = 0) + { return disconnect(this, signal, receiver, member); } + inline bool disconnect(const QObject *receiver, const char *member = 0) + { return disconnect(this, 0, receiver, member); } + + void dumpObjectTree(); + void dumpObjectInfo(); + + + bool setProperty(const char *name, const QVariant &value); + QVariant property(const char *name) const; + QList dynamicPropertyNames() const; + + + + static uint registerUserData(); + void setUserData(uint id, QObjectUserData* data); + QObjectUserData* userData(uint id) const; + + +public: + void destroyed(QObject * = 0); + +public: + inline QObject *parent() const { return d_ptr->parent; } + + inline bool inherits(const char *classname) const + { return const_cast(this)->qt_metacast(classname) != 0; } + +public : + void deleteLater(); + +public: + QObject *sender() const; + int receivers(const char* signal) const; + + virtual void timerEvent(QTimerEvent *); + virtual void childEvent(QChildEvent *); + virtual void customEvent(QEvent *); + + virtual void connectNotify(const char *signal); + virtual void disconnectNotify(const char *signal); +# 292 "/usr/include/qt4/QtCore/qobject.h" +public: + QObject(QObjectPrivate &dd, QObject *parent = 0); + +public: + QScopedPointer d_ptr; + + static const QMetaObject staticQtMetaObject; + + friend struct QMetaObject; + friend class QApplication; + friend class QApplicationPrivate; + friend class QCoreApplication; + friend class QCoreApplicationPrivate; + friend class QWidget; + friend class QThreadData; + +private: + QObject(const QObject &); QObject &operator=(const QObject &); + +}; + +inline bool QObject::connect(const QObject *asender, const char *asignal, + const char *amember, Qt::ConnectionType atype) const +{ return connect(asender, asignal, this, amember, atype); } + + +class QObjectUserData { +public: + virtual ~QObjectUserData(); +}; + + + void qt_qFindChildren_helper(const QObject *parent, const QString &name, const QRegExp *re, + const QMetaObject &mo, QList *list); + QObject *qt_qFindChild_helper(const QObject *parent, const QString &name, const QMetaObject &mo); +# 417 "/usr/include/qt4/QtCore/qobject.h" +template +inline T qFindChild(const QObject *o, const QString &name) +{ return static_cast(qt_qFindChild_helper(o, name, reinterpret_cast(0)->staticMetaObject)); } + +template +inline QList qFindChildren(const QObject *o, const QString &name) +{ + QList list; + union { + QList *typedList; + QList *voidList; + } u; + u.typedList = &list; + qt_qFindChildren_helper(o, name, 0, reinterpret_cast(0)->staticMetaObject, u.voidList); + return list; +} + + +template +inline QList qFindChildren(const QObject *o, const QRegExp &re) +{ + QList list; + union { + QList *typedList; + QList *voidList; + } u; + u.typedList = &list; + qt_qFindChildren_helper(o, QString(), &re, reinterpret_cast(0)->staticMetaObject, u.voidList); + return list; +} + + +template +inline T qobject_cast(QObject *object) +{ + + reinterpret_cast(0)->qt_check_for_QOBJECT_macro(*reinterpret_cast(object)); + + return static_cast(reinterpret_cast(0)->staticMetaObject.cast(object)); +} + +template +inline T qobject_cast(const QObject *object) +{ + + register T ptr = static_cast(object); + (void)ptr;; + + + reinterpret_cast(0)->qt_check_for_QOBJECT_macro(*reinterpret_cast(const_cast(object))); + + return static_cast(const_cast(reinterpret_cast(0)->staticMetaObject.cast(const_cast(object)))); +} + + +template inline const char * qobject_interface_iid() +{ return 0; } +# 488 "/usr/include/qt4/QtCore/qobject.h" + QDebug operator<<(QDebug, const QObject *); + + + + + +# 47 "/usr/include/qt4/QtCore/qiodevice.h" 2 +# 57 "/usr/include/qt4/QtCore/qiodevice.h" + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +class QByteArray; +class QIODevicePrivate; + +class QIODevice + + : public QObject + +{ + + public: template inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: + +public: + enum OpenModeFlag { + NotOpen = 0x0000, + ReadOnly = 0x0001, + WriteOnly = 0x0002, + ReadWrite = ReadOnly | WriteOnly, + Append = 0x0004, + Truncate = 0x0008, + Text = 0x0010, + Unbuffered = 0x0020 + }; + typedef QFlags OpenMode; + + QIODevice(); + + explicit QIODevice(QObject *parent); + + virtual ~QIODevice(); + + OpenMode openMode() const; + + void setTextModeEnabled(bool enabled); + bool isTextModeEnabled() const; + + bool isOpen() const; + bool isReadable() const; + bool isWritable() const; + virtual bool isSequential() const; + + virtual bool open(OpenMode mode); + virtual void close(); + + + + virtual qint64 pos() const; + virtual qint64 size() const; + virtual bool seek(qint64 pos); + virtual bool atEnd() const; + virtual bool reset(); + + virtual qint64 bytesAvailable() const; + virtual qint64 bytesToWrite() const; + + qint64 read(char *data, qint64 maxlen); + QByteArray read(qint64 maxlen); + QByteArray readAll(); + qint64 readLine(char *data, qint64 maxlen); + QByteArray readLine(qint64 maxlen = 0); + virtual bool canReadLine() const; + + qint64 write(const char *data, qint64 len); + qint64 write(const char *data); + inline qint64 write(const QByteArray &data) + { return write(data.constData(), data.size()); } + + qint64 peek(char *data, qint64 maxlen); + QByteArray peek(qint64 maxlen); + + virtual bool waitForReadyRead(int msecs); + virtual bool waitForBytesWritten(int msecs); + + void ungetChar(char c); + bool putChar(char c); + bool getChar(char *c); + + QString errorString() const; + + +public: + void readyRead(); + void bytesWritten(qint64 bytes); + void aboutToClose(); + void readChannelFinished(); + + +public: + + + + QIODevice(QIODevicePrivate &dd, QObject *parent = 0); + + virtual qint64 readData(char *data, qint64 maxlen) = 0; + virtual qint64 readLineData(char *data, qint64 maxlen); + virtual qint64 writeData(const char *data, qint64 len) = 0; + + void setOpenMode(OpenMode openMode); + + void setErrorString(const QString &errorString); + + + + + +private: + inline QIODevicePrivate* d_func() { return reinterpret_cast(qGetPtrHelper(d_ptr)); } inline const QIODevicePrivate* d_func() const { return reinterpret_cast(qGetPtrHelper(d_ptr)); } friend class QIODevicePrivate; + QIODevice(const QIODevice &); QIODevice &operator=(const QIODevice &); +# 204 "/usr/include/qt4/QtCore/qiodevice.h" +}; + +inline QFlags operator|(QIODevice::OpenMode::enum_type f1, QIODevice::OpenMode::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(QIODevice::OpenMode::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QIODevice::OpenMode::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +# 246 "/usr/include/qt4/QtCore/qiodevice.h" +class QDebug; + QDebug operator<<(QDebug debug, QIODevice::OpenMode modes); + + + + + +# 47 "/usr/include/qt4/QtCore/qdatastream.h" 2 + + + + + + + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +class QByteArray; +class QIODevice; + +template class QList; +template class QLinkedList; +template class QVector; +template class QSet; +template class QHash; +template class QMap; + + +class QDataStreamPrivate; +class QDataStream +{ +public: + enum Version { + Qt_1_0 = 1, + Qt_2_0 = 2, + Qt_2_1 = 3, + Qt_3_0 = 4, + Qt_3_1 = 5, + Qt_3_3 = 6, + Qt_4_0 = 7, + Qt_4_1 = Qt_4_0, + Qt_4_2 = 8, + Qt_4_3 = 9, + Qt_4_4 = 10, + Qt_4_5 = 11, + Qt_4_6 = 12 + + + + + }; + + enum ByteOrder { + BigEndian = QSysInfo::BigEndian, + LittleEndian = QSysInfo::LittleEndian + }; + + enum Status { + Ok, + ReadPastEnd, + ReadCorruptData + }; + + enum FloatingPointPrecision { + SinglePrecision, + DoublePrecision + }; + + QDataStream(); + explicit QDataStream(QIODevice *); + + + + QDataStream(QByteArray *, QIODevice::OpenMode flags); + QDataStream(const QByteArray &); + virtual ~QDataStream(); + + QIODevice *device() const; + void setDevice(QIODevice *); + void unsetDevice(); + + bool atEnd() const; + + + + + Status status() const; + void setStatus(Status status); + void resetStatus(); + + FloatingPointPrecision floatingPointPrecision() const; + void setFloatingPointPrecision(FloatingPointPrecision precision); + + ByteOrder byteOrder() const; + void setByteOrder(ByteOrder); + + int version() const; + void setVersion(int); + + QDataStream &operator>>(qint8 &i); + QDataStream &operator>>(quint8 &i); + QDataStream &operator>>(qint16 &i); + QDataStream &operator>>(quint16 &i); + QDataStream &operator>>(qint32 &i); + QDataStream &operator>>(quint32 &i); + QDataStream &operator>>(qint64 &i); + QDataStream &operator>>(quint64 &i); + + QDataStream &operator>>(bool &i); + QDataStream &operator>>(float &f); + QDataStream &operator>>(double &f); + QDataStream &operator>>(char *&str); + + QDataStream &operator<<(qint8 i); + QDataStream &operator<<(quint8 i); + QDataStream &operator<<(qint16 i); + QDataStream &operator<<(quint16 i); + QDataStream &operator<<(qint32 i); + QDataStream &operator<<(quint32 i); + QDataStream &operator<<(qint64 i); + QDataStream &operator<<(quint64 i); + QDataStream &operator<<(bool i); + QDataStream &operator<<(float f); + QDataStream &operator<<(double f); + QDataStream &operator<<(const char *str); + + QDataStream &readBytes(char *&, uint &len); + int readRawData(char *, int len); + + QDataStream &writeBytes(const char *, uint len); + int writeRawData(const char *, int len); + + int skipRawData(int len); +# 185 "/usr/include/qt4/QtCore/qdatastream.h" +private: + QDataStream(const QDataStream &); QDataStream &operator=(const QDataStream &); + + QScopedPointer d; + + QIODevice *dev; + bool owndev; + bool noswap; + ByteOrder byteorder; + int ver; + Status q_status; +}; + + + + + + +inline QIODevice *QDataStream::device() const +{ return dev; } + +inline QDataStream::ByteOrder QDataStream::byteOrder() const +{ return byteorder; } + +inline int QDataStream::version() const +{ return ver; } + +inline void QDataStream::setVersion(int v) +{ ver = v; } + +inline QDataStream &QDataStream::operator>>(quint8 &i) +{ return *this >> reinterpret_cast(i); } + +inline QDataStream &QDataStream::operator>>(quint16 &i) +{ return *this >> reinterpret_cast(i); } + +inline QDataStream &QDataStream::operator>>(quint32 &i) +{ return *this >> reinterpret_cast(i); } + +inline QDataStream &QDataStream::operator>>(quint64 &i) +{ return *this >> reinterpret_cast(i); } + +inline QDataStream &QDataStream::operator<<(quint8 i) +{ return *this << qint8(i); } + +inline QDataStream &QDataStream::operator<<(quint16 i) +{ return *this << qint16(i); } + +inline QDataStream &QDataStream::operator<<(quint32 i) +{ return *this << qint32(i); } + +inline QDataStream &QDataStream::operator<<(quint64 i) +{ return *this << qint64(i); } + +template +QDataStream& operator>>(QDataStream& s, QList& l) +{ + l.clear(); + quint32 c; + s >> c; + for(quint32 i = 0; i < c; ++i) + { + T t; + s >> t; + l.append(t); + if (s.atEnd()) + break; + } + return s; +} + +template +QDataStream& operator<<(QDataStream& s, const QList& l) +{ + s << quint32(l.size()); + for (int i = 0; i < l.size(); ++i) + s << l.at(i); + return s; +} + +template +QDataStream& operator>>(QDataStream& s, QLinkedList& l) +{ + l.clear(); + quint32 c; + s >> c; + for(quint32 i = 0; i < c; ++i) + { + T t; + s >> t; + l.append(t); + if (s.atEnd()) + break; + } + return s; +} + +template +QDataStream& operator<<(QDataStream& s, const QLinkedList& l) +{ + s << quint32(l.size()); + typename QLinkedList::ConstIterator it = l.constBegin(); + for(; it != l.constEnd(); ++it) + s << *it; + return s; +} + +template +QDataStream& operator>>(QDataStream& s, QVector& v) +{ + v.clear(); + quint32 c; + s >> c; + v.resize(c); + for(quint32 i = 0; i < c; ++i) { + T t; + s >> t; + v[i] = t; + } + return s; +} + +template +QDataStream& operator<<(QDataStream& s, const QVector& v) +{ + s << quint32(v.size()); + for (typename QVector::const_iterator it = v.begin(); it != v.end(); ++it) + s << *it; + return s; +} + +template +QDataStream &operator>>(QDataStream &in, QSet &set) +{ + set.clear(); + quint32 c; + in >> c; + for (quint32 i = 0; i < c; ++i) { + T t; + in >> t; + set << t; + if (in.atEnd()) + break; + } + return in; +} + +template +QDataStream& operator<<(QDataStream &out, const QSet &set) +{ + out << quint32(set.size()); + typename QSet::const_iterator i = set.constBegin(); + while (i != set.constEnd()) { + out << *i; + ++i; + } + return out; +} + +template + QDataStream &operator>>(QDataStream &in, QHash &hash) +{ + QDataStream::Status oldStatus = in.status(); + in.resetStatus(); + hash.clear(); + + quint32 n; + in >> n; + + for (quint32 i = 0; i < n; ++i) { + if (in.status() != QDataStream::Ok) + break; + + Key k; + T t; + in >> k >> t; + hash.insertMulti(k, t); + } + + if (in.status() != QDataStream::Ok) + hash.clear(); + if (oldStatus != QDataStream::Ok) + in.setStatus(oldStatus); + return in; +} + +template + QDataStream &operator<<(QDataStream &out, const QHash& hash) +{ + out << quint32(hash.size()); + typename QHash::ConstIterator it = hash.end(); + typename QHash::ConstIterator begin = hash.begin(); + while (it != begin) { + --it; + out << it.key() << it.value(); + } + return out; +} + + + + +template + QDataStream &operator>>(QDataStream &in, QMap &map) + +{ + QDataStream::Status oldStatus = in.status(); + in.resetStatus(); + map.clear(); + + quint32 n; + in >> n; + + map.detach(); + map.setInsertInOrder(true); + for (quint32 i = 0; i < n; ++i) { + if (in.status() != QDataStream::Ok) + break; + + aKey key; + aT value; + in >> key >> value; + map.insertMulti(key, value); + } + map.setInsertInOrder(false); + if (in.status() != QDataStream::Ok) + map.clear(); + if (oldStatus != QDataStream::Ok) + in.setStatus(oldStatus); + return in; +} + +template + QDataStream &operator<<(QDataStream &out, const QMap &map) +{ + out << quint32(map.size()); + typename QMap::ConstIterator it = map.end(); + typename QMap::ConstIterator begin = map.begin(); + while (it != begin) { + --it; + out << it.key() << it.value(); + } + return out; +} + + + + + + +# 47 "/usr/include/qt4/QtCore/qstringlist.h" 2 + +# 1 "/usr/include/qt4/QtCore/qregexp.h" 1 +# 52 "/usr/include/qt4/QtCore/qregexp.h" + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +struct QRegExpPrivate; +class QStringList; + +class QRegExp +{ +public: + enum PatternSyntax { + RegExp, + Wildcard, + FixedString, + RegExp2, + WildcardUnix, + W3CXmlSchema11 }; + enum CaretMode { CaretAtZero, CaretAtOffset, CaretWontMatch }; + + QRegExp(); + explicit QRegExp(const QString &pattern, Qt::CaseSensitivity cs = Qt::CaseSensitive, + PatternSyntax syntax = RegExp); + QRegExp(const QRegExp &rx); + ~QRegExp(); + QRegExp &operator=(const QRegExp &rx); + + bool operator==(const QRegExp &rx) const; + inline bool operator!=(const QRegExp &rx) const { return !operator==(rx); } + + bool isEmpty() const; + bool isValid() const; + QString pattern() const; + void setPattern(const QString &pattern); + Qt::CaseSensitivity caseSensitivity() const; + void setCaseSensitivity(Qt::CaseSensitivity cs); + + + + + + PatternSyntax patternSyntax() const; + void setPatternSyntax(PatternSyntax syntax); + + + + + + + bool isMinimal() const; + void setMinimal(bool minimal); + + + + + bool exactMatch(const QString &str) const; + + int indexIn(const QString &str, int offset = 0, CaretMode caretMode = CaretAtZero) const; + int lastIndexIn(const QString &str, int offset = -1, CaretMode caretMode = CaretAtZero) const; +# 120 "/usr/include/qt4/QtCore/qregexp.h" + int matchedLength() const; + + + int numCaptures() const; + + int captureCount() const; + QStringList capturedTexts() const; + QStringList capturedTexts(); + QString cap(int nth = 0) const; + QString cap(int nth = 0); + int pos(int nth = 0) const; + int pos(int nth = 0); + QString errorString() const; + QString errorString(); + + + static QString escape(const QString &str); +# 147 "/usr/include/qt4/QtCore/qregexp.h" +private: + QRegExpPrivate *priv; +}; + +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QRegExp)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QRegExp"; } }; + + + QDataStream &operator<<(QDataStream &out, const QRegExp ®Exp); + QDataStream &operator>>(QDataStream &in, QRegExp ®Exp); + + + + + +# 49 "/usr/include/qt4/QtCore/qstringlist.h" 2 + +# 1 "/usr/include/qt4/QtCore/qstringmatcher.h" 1 +# 47 "/usr/include/qt4/QtCore/qstringmatcher.h" + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +class QStringMatcherPrivate; + +class QStringMatcher +{ +public: + QStringMatcher(); + QStringMatcher(const QString &pattern, + Qt::CaseSensitivity cs = Qt::CaseSensitive); + QStringMatcher(const QChar *uc, int len, + Qt::CaseSensitivity cs = Qt::CaseSensitive); + QStringMatcher(const QStringMatcher &other); + ~QStringMatcher(); + + QStringMatcher &operator=(const QStringMatcher &other); + + void setPattern(const QString &pattern); + void setCaseSensitivity(Qt::CaseSensitivity cs); + + int indexIn(const QString &str, int from = 0) const; + int indexIn(const QChar *str, int length, int from = 0) const; + QString pattern() const; + inline Qt::CaseSensitivity caseSensitivity() const { return q_cs; } + +private: + QStringMatcherPrivate *d_ptr; + QString q_pattern; + Qt::CaseSensitivity q_cs; + + + + + + struct Data { + uchar q_skiptable[256]; + const QChar *uc; + int len; + }; + union { + uint q_data[256]; + Data p; + }; + + + +}; + + + + +# 51 "/usr/include/qt4/QtCore/qstringlist.h" 2 + + + + + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +class QRegExp; + +typedef QListIterator QStringListIterator; +typedef QMutableListIterator QMutableStringListIterator; + +class QStringList : public QList +{ +public: + inline QStringList() { } + inline explicit QStringList(const QString &i) { append(i); } + inline QStringList(const QStringList &l) : QList(l) { } + inline QStringList(const QList &l) : QList(l) { } + + inline void sort(); + inline int removeDuplicates(); + + inline QString join(const QString &sep) const; + + inline QStringList filter(const QString &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + inline QBool contains(const QString &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + + inline QStringList &replaceInStrings(const QString &before, const QString &after, Qt::CaseSensitivity cs = Qt::CaseSensitive); + + inline QStringList operator+(const QStringList &other) const + { QStringList n = *this; n += other; return n; } + inline QStringList &operator<<(const QString &str) + { append(str); return *this; } + inline QStringList &operator<<(const QStringList &l) + { *this += l; return *this; } + + + inline QStringList filter(const QRegExp &rx) const; + inline QStringList &replaceInStrings(const QRegExp &rx, const QString &after); + inline int indexOf(const QRegExp &rx, int from = 0) const; + inline int lastIndexOf(const QRegExp &rx, int from = -1) const; + inline int indexOf(QRegExp &rx, int from = 0) const; + inline int lastIndexOf(QRegExp &rx, int from = -1) const; + + + using QList::indexOf; + using QList::lastIndexOf; +# 126 "/usr/include/qt4/QtCore/qstringlist.h" +}; + +namespace QtPrivate { + void QStringList_sort(QStringList *that); + int QStringList_removeDuplicates(QStringList *that); + QString QStringList_join(const QStringList *that, const QString &sep); + QStringList QStringList_filter(const QStringList *that, const QString &str, + Qt::CaseSensitivity cs); + + QBool QStringList_contains(const QStringList *that, const QString &str, Qt::CaseSensitivity cs); + void QStringList_replaceInStrings(QStringList *that, const QString &before, const QString &after, + Qt::CaseSensitivity cs); + + + void QStringList_replaceInStrings(QStringList *that, const QRegExp &rx, const QString &after); + QStringList QStringList_filter(const QStringList *that, const QRegExp &re); + int QStringList_indexOf(const QStringList *that, const QRegExp &rx, int from); + int QStringList_lastIndexOf(const QStringList *that, const QRegExp &rx, int from); + int QStringList_indexOf(const QStringList *that, QRegExp &rx, int from); + int QStringList_lastIndexOf(const QStringList *that, QRegExp &rx, int from); + +} + +inline void QStringList::sort() +{ + QtPrivate::QStringList_sort(this); +} + +inline int QStringList::removeDuplicates() +{ + return QtPrivate::QStringList_removeDuplicates(this); +} + +inline QString QStringList::join(const QString &sep) const +{ + return QtPrivate::QStringList_join(this, sep); +} + +inline QStringList QStringList::filter(const QString &str, Qt::CaseSensitivity cs) const +{ + return QtPrivate::QStringList_filter(this, str, cs); +} + +inline QBool QStringList::contains(const QString &str, Qt::CaseSensitivity cs) const +{ + return QtPrivate::QStringList_contains(this, str, cs); +} + +inline QStringList &QStringList::replaceInStrings(const QString &before, const QString &after, Qt::CaseSensitivity cs) +{ + QtPrivate::QStringList_replaceInStrings(this, before, after, cs); + return *this; +} + + +inline QStringList &QStringList::replaceInStrings(const QRegExp &rx, const QString &after) +{ + QtPrivate::QStringList_replaceInStrings(this, rx, after); + return *this; +} + +inline QStringList QStringList::filter(const QRegExp &rx) const +{ + return QtPrivate::QStringList_filter(this, rx); +} + +inline int QStringList::indexOf(const QRegExp &rx, int from) const +{ + return QtPrivate::QStringList_indexOf(this, rx, from); +} + +inline int QStringList::lastIndexOf(const QRegExp &rx, int from) const +{ + return QtPrivate::QStringList_lastIndexOf(this, rx, from); +} + +inline int QStringList::indexOf(QRegExp &rx, int from) const +{ + return QtPrivate::QStringList_indexOf(this, rx, from); +} + +inline int QStringList::lastIndexOf(QRegExp &rx, int from) const +{ + return QtPrivate::QStringList_lastIndexOf(this, rx, from); +} +# 245 "/usr/include/qt4/QtCore/qstringlist.h" +inline QDataStream &operator>>(QDataStream &in, QStringList &list) +{ + return operator>>(in, static_cast &>(list)); +} +inline QDataStream &operator<<(QDataStream &out, const QStringList &list) +{ + return operator<<(out, static_cast &>(list)); +} + + + + + +# 48 "/usr/include/qt4/QtGui/qcolor.h" 2 + + + + + +typedef QtValidLicenseForGuiModule QtGuiModule; + +class QColor; +class QColormap; +class QVariant; + + + QDebug operator<<(QDebug, const QColor &); + + + QDataStream &operator<<(QDataStream &, const QColor &); + QDataStream &operator>>(QDataStream &, QColor &); + + +class QColor +{ +public: + enum Spec { Invalid, Rgb, Hsv, Cmyk, Hsl }; + + QColor(); + QColor(Qt::GlobalColor color); + QColor(int r, int g, int b, int a = 255); + QColor(QRgb rgb); + QColor(const QString& name); + QColor(const char *name); + QColor(const QColor &color); + QColor(Spec spec); + + bool isValid() const; + + QString name() const; + void setNamedColor(const QString& name); + + static QStringList colorNames(); + + inline Spec spec() const + { return cspec; } + + int alpha() const; + void setAlpha(int alpha); + + qreal alphaF() const; + void setAlphaF(qreal alpha); + + int red() const; + int green() const; + int blue() const; + void setRed(int red); + void setGreen(int green); + void setBlue(int blue); + + qreal redF() const; + qreal greenF() const; + qreal blueF() const; + void setRedF(qreal red); + void setGreenF(qreal green); + void setBlueF(qreal blue); + + void getRgb(int *r, int *g, int *b, int *a = 0) const; + void setRgb(int r, int g, int b, int a = 255); + + void getRgbF(qreal *r, qreal *g, qreal *b, qreal *a = 0) const; + void setRgbF(qreal r, qreal g, qreal b, qreal a = 1.0); + + QRgb rgba() const; + void setRgba(QRgb rgba); + + QRgb rgb() const; + void setRgb(QRgb rgb); + + int hue() const; + int saturation() const; + int hsvHue() const; + int hsvSaturation() const; + int value() const; + + qreal hueF() const; + qreal saturationF() const; + qreal hsvHueF() const; + qreal hsvSaturationF() const; + qreal valueF() const; + + void getHsv(int *h, int *s, int *v, int *a = 0) const; + void setHsv(int h, int s, int v, int a = 255); + + void getHsvF(qreal *h, qreal *s, qreal *v, qreal *a = 0) const; + void setHsvF(qreal h, qreal s, qreal v, qreal a = 1.0); + + int cyan() const; + int magenta() const; + int yellow() const; + int black() const; + + qreal cyanF() const; + qreal magentaF() const; + qreal yellowF() const; + qreal blackF() const; + + void getCmyk(int *c, int *m, int *y, int *k, int *a = 0); + void setCmyk(int c, int m, int y, int k, int a = 255); + + void getCmykF(qreal *c, qreal *m, qreal *y, qreal *k, qreal *a = 0); + void setCmykF(qreal c, qreal m, qreal y, qreal k, qreal a = 1.0); + + int hslHue() const; + int hslSaturation() const; + int lightness() const; + + qreal hslHueF() const; + qreal hslSaturationF() const; + qreal lightnessF() const; + + void getHsl(int *h, int *s, int *l, int *a = 0) const; + void setHsl(int h, int s, int l, int a = 255); + + void getHslF(qreal *h, qreal *s, qreal *l, qreal *a = 0) const; + void setHslF(qreal h, qreal s, qreal l, qreal a = 1.0); + + QColor toRgb() const; + QColor toHsv() const; + QColor toCmyk() const; + QColor toHsl() const; + + QColor convertTo(Spec colorSpec) const; + + static QColor fromRgb(QRgb rgb); + static QColor fromRgba(QRgb rgba); + + static QColor fromRgb(int r, int g, int b, int a = 255); + static QColor fromRgbF(qreal r, qreal g, qreal b, qreal a = 1.0); + + static QColor fromHsv(int h, int s, int v, int a = 255); + static QColor fromHsvF(qreal h, qreal s, qreal v, qreal a = 1.0); + + static QColor fromCmyk(int c, int m, int y, int k, int a = 255); + static QColor fromCmykF(qreal c, qreal m, qreal y, qreal k, qreal a = 1.0); + + static QColor fromHsl(int h, int s, int l, int a = 255); + static QColor fromHslF(qreal h, qreal s, qreal l, qreal a = 1.0); + + QColor light(int f = 150) const; + QColor lighter(int f = 150) const; + QColor dark(int f = 200) const; + QColor darker(int f = 200) const; + + QColor &operator=(const QColor &); + QColor &operator=(Qt::GlobalColor color); + + bool operator==(const QColor &c) const; + bool operator!=(const QColor &c) const; + + operator QVariant() const; + + + static bool allowX11ColorNames(); + static void setAllowX11ColorNames(bool enabled); +# 228 "/usr/include/qt4/QtGui/qcolor.h" +private: + + + QColor(int, int, int, Spec); + + + void invalidate(); + + Spec cspec; + union { + struct { + ushort alpha; + ushort red; + ushort green; + ushort blue; + ushort pad; + } argb; + struct { + ushort alpha; + ushort hue; + ushort saturation; + ushort value; + ushort pad; + } ahsv; + struct { + ushort alpha; + ushort cyan; + ushort magenta; + ushort yellow; + ushort black; + } acmyk; + struct { + ushort alpha; + ushort hue; + ushort saturation; + ushort lightness; + ushort pad; + } ahsl; + ushort array[5]; + } ct; + + friend class QColormap; + + friend QDataStream &operator<<(QDataStream &, const QColor &); + friend QDataStream &operator>>(QDataStream &, QColor &); + +}; + +inline QColor::QColor() +{ invalidate(); } + +inline QColor::QColor(int r, int g, int b, int a) +{ setRgb(r, g, b, a); } + +inline QColor::QColor(const char *aname) +{ setNamedColor(QLatin1String(aname)); } + +inline QColor::QColor(const QString& aname) +{ setNamedColor(aname); } + +inline QColor::QColor(const QColor &acolor) + : cspec(acolor.cspec) +{ ct.argb = acolor.ct.argb; } + +inline bool QColor::isValid() const +{ return cspec != Invalid; } + +inline QColor QColor::lighter(int f) const +{ return light(f); } + +inline QColor QColor::darker(int f) const +{ return dark(f); } + + + + +# 47 "/usr/include/qt4/QtGui/qpixmap.h" 2 + + +# 1 "/usr/include/qt4/QtCore/qsharedpointer.h" 1 +# 47 "/usr/include/qt4/QtCore/qsharedpointer.h" +# 1 "/usr/include/qt4/QtCore/qshareddata.h" 1 +# 48 "/usr/include/qt4/QtCore/qshareddata.h" + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +template class QSharedDataPointer; + +class QSharedData +{ +public: + mutable QAtomicInt ref; + + inline QSharedData() : ref(0) { } + inline QSharedData(const QSharedData &) : ref(0) { } + +private: + + QSharedData &operator=(const QSharedData &); +}; + +template class QSharedDataPointer +{ +public: + typedef T Type; + typedef T *pointer; + + inline void detach() { if (d && d->ref != 1) detach_helper(); } + inline T &operator*() { detach(); return *d; } + inline const T &operator*() const { return *d; } + inline T *operator->() { detach(); return d; } + inline const T *operator->() const { return d; } + inline operator T *() { detach(); return d; } + inline operator const T *() const { return d; } + inline T *data() { detach(); return d; } + inline const T *data() const { return d; } + inline const T *constData() const { return d; } + + inline bool operator==(const QSharedDataPointer &other) const { return d == other.d; } + inline bool operator!=(const QSharedDataPointer &other) const { return d != other.d; } + + inline QSharedDataPointer() { d = 0; } + inline ~QSharedDataPointer() { if (d && !d->ref.deref()) delete d; } + + explicit QSharedDataPointer(T *data); + inline QSharedDataPointer(const QSharedDataPointer &o) : d(o.d) { if (d) d->ref.ref(); } + inline QSharedDataPointer & operator=(const QSharedDataPointer &o) { + if (o.d != d) { + if (o.d) + o.d->ref.ref(); + if (d && !d->ref.deref()) + delete d; + d = o.d; + } + return *this; + } + inline QSharedDataPointer &operator=(T *o) { + if (o != d) { + if (o) + o->ref.ref(); + if (d && !d->ref.deref()) + delete d; + d = o; + } + return *this; + } + + inline bool operator!() const { return !d; } + + inline void swap(QSharedDataPointer &other) + { qSwap(d, other.d); } + +public: + T *clone(); + +private: + void detach_helper(); + + T *d; +}; + +template class QExplicitlySharedDataPointer +{ +public: + typedef T Type; + typedef T *pointer; + + inline T &operator*() const { return *d; } + inline T *operator->() { return d; } + inline T *operator->() const { return d; } + inline T *data() const { return d; } + inline const T *constData() const { return d; } + + inline void detach() { if (d && d->ref != 1) detach_helper(); } + + inline void reset() + { + if(d && !d->ref.deref()) + delete d; + + d = 0; + } + + inline operator bool () const { return d != 0; } + + inline bool operator==(const QExplicitlySharedDataPointer &other) const { return d == other.d; } + inline bool operator!=(const QExplicitlySharedDataPointer &other) const { return d != other.d; } + inline bool operator==(const T *ptr) const { return d == ptr; } + inline bool operator!=(const T *ptr) const { return d != ptr; } + + inline QExplicitlySharedDataPointer() { d = 0; } + inline ~QExplicitlySharedDataPointer() { if (d && !d->ref.deref()) delete d; } + + explicit QExplicitlySharedDataPointer(T *data); + inline QExplicitlySharedDataPointer(const QExplicitlySharedDataPointer &o) : d(o.d) { if (d) d->ref.ref(); } + + + template + inline QExplicitlySharedDataPointer(const QExplicitlySharedDataPointer &o) : d(static_cast(o.data())) + { + if(d) + d->ref.ref(); + } + + + inline QExplicitlySharedDataPointer & operator=(const QExplicitlySharedDataPointer &o) { + if (o.d != d) { + if (o.d) + o.d->ref.ref(); + if (d && !d->ref.deref()) + delete d; + d = o.d; + } + return *this; + } + inline QExplicitlySharedDataPointer &operator=(T *o) { + if (o != d) { + if (o) + o->ref.ref(); + if (d && !d->ref.deref()) + delete d; + d = o; + } + return *this; + } + + inline bool operator!() const { return !d; } + + inline void swap(QExplicitlySharedDataPointer &other) + { qSwap(d, other.d); } + +public: + T *clone(); + +private: + void detach_helper(); + + T *d; +}; + +template +inline QSharedDataPointer::QSharedDataPointer(T *adata) : d(adata) +{ if (d) d->ref.ref(); } + +template +inline T *QSharedDataPointer::clone() +{ + return new T(*d); +} + +template + void QSharedDataPointer::detach_helper() +{ + T *x = clone(); + x->ref.ref(); + if (!d->ref.deref()) + delete d; + d = x; +} + +template +inline T *QExplicitlySharedDataPointer::clone() +{ + return new T(*d); +} + +template + void QExplicitlySharedDataPointer::detach_helper() +{ + T *x = clone(); + x->ref.ref(); + if (!d->ref.deref()) + delete d; + d = x; +} + +template +inline QExplicitlySharedDataPointer::QExplicitlySharedDataPointer(T *adata) : d(adata) +{ if (d) d->ref.ref(); } + +template +inline void qSwap(QSharedDataPointer &p1, QSharedDataPointer &p2) +{ p1.swap(p2); } + +template +inline void qSwap(QExplicitlySharedDataPointer &p1, QExplicitlySharedDataPointer &p2) +{ p1.swap(p2); } + + + + +# 48 "/usr/include/qt4/QtCore/qsharedpointer.h" 2 + + + + +# 1 "/usr/include/qt4/QtCore/qsharedpointer_impl.h" 1 +# 55 "/usr/include/qt4/QtCore/qsharedpointer_impl.h" + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; +# 70 "/usr/include/qt4/QtCore/qsharedpointer_impl.h" +template inline void qt_sharedpointer_cast_check(T *) { } + + + + + + + +template class QWeakPointer; +template class QSharedPointer; + +template +QSharedPointer qSharedPointerCast(const QSharedPointer &ptr); +template +QSharedPointer qSharedPointerDynamicCast(const QSharedPointer &ptr); +template +QSharedPointer qSharedPointerConstCast(const QSharedPointer &ptr); + + +template +QSharedPointer qSharedPointerObjectCast(const QSharedPointer &ptr); + + +namespace QtSharedPointer { + template class InternalRefCount; + template class ExternalRefCount; + + template QSharedPointer copyAndSetPointer(X * ptr, const QSharedPointer &src); + + + void internalSafetyCheckAdd2(const void *, const volatile void *); + void internalSafetyCheckRemove2(const void *); + + template + inline void executeDeleter(T *t, RetVal (Klass:: *memberDeleter)()) + { (t->*memberDeleter)(); } + template + inline void executeDeleter(T *t, Deleter d) + { d(t); } + template inline void normalDeleter(T *t) { delete t; } + + + + template struct RemovePointer; + template struct RemovePointer { typedef T Type; }; + template struct RemovePointer > { typedef T Type; }; + template struct RemovePointer > { typedef T Type; }; + + + + + template + class Basic + { + + typedef T *Basic:: *RestrictedBool; + + public: + typedef T Type; + typedef T element_type; + typedef T value_type; + typedef value_type *pointer; + typedef const value_type *const_pointer; + typedef value_type &reference; + typedef const value_type &const_reference; + typedef ptrdiff_t difference_type; + + inline T *data() const { return value; } + inline bool isNull() const { return !data(); } + + inline operator RestrictedBool() const { return isNull() ? 0 : &Basic::value; } + + + + inline bool operator !() const { return isNull(); } + inline T &operator*() const { return *data(); } + inline T *operator->() const { return data(); } + + public: + inline Basic(T *ptr = 0) : value(ptr) { } + inline Basic(Qt::Initialization) { } + + + inline void internalConstruct(T *ptr) + { + value = ptr; + } + + + + + template friend class QWeakPointer; + + + Type *value; + }; + + + + + + + + struct ExternalRefCountData + { + QBasicAtomicInt weakref; + QBasicAtomicInt strongref; + + inline ExternalRefCountData() + { + strongref = 1; + weakref = 1; + } + inline ExternalRefCountData(Qt::Initialization) { } + virtual inline ~ExternalRefCountData() { ((!(!weakref)) ? qt_assert("!weakref","/usr/include/qt4/QtCore/qsharedpointer_impl.h",184) : qt_noop()); ((!(strongref <= 0)) ? qt_assert("strongref <= 0","/usr/include/qt4/QtCore/qsharedpointer_impl.h",184) : qt_noop()); } + + + + + virtual inline bool destroy() { return false; } + + + static ExternalRefCountData *getAndRef(const QObject *); + void setQObjectShared(const QObject *, bool enable); + + inline void setQObjectShared(...) { } + }; + + + + + struct ExternalRefCountWithDestroyFn: public ExternalRefCountData + { + typedef void (*DestroyerFn)(ExternalRefCountData *); + DestroyerFn destroyer; + + inline ExternalRefCountWithDestroyFn(DestroyerFn d) + : destroyer(d) + { } + + inline bool destroy() { destroyer(this); return true; } + inline void operator delete(void *ptr) { ::operator delete(ptr); } + }; + + + + + + template + struct ExternalRefCountWithCustomDeleter: public ExternalRefCountWithDestroyFn + { + typedef ExternalRefCountWithCustomDeleter Self; + typedef ExternalRefCountWithDestroyFn BaseClass; + + struct CustomDeleter + { + Deleter deleter; + T *ptr; + + inline CustomDeleter(T *p, Deleter d) : deleter(d), ptr(p) {} + }; + CustomDeleter extra; + + + + + static inline void deleter(ExternalRefCountData *self) + { + Self *realself = static_cast(self); + executeDeleter(realself->extra.ptr, realself->extra.deleter); + + + realself->extra.~CustomDeleter(); + } + static void safetyCheckDeleter(ExternalRefCountData *self) + { + internalSafetyCheckRemove2(self); + deleter(self); + } + + static inline Self *create(T *ptr, Deleter userDeleter) + { + + + + DestroyerFn destroy = &deleter; + + Self *d = static_cast(::operator new(sizeof(Self))); + + + new (&d->extra) CustomDeleter(ptr, userDeleter); + new (d) BaseClass(destroy); + + return d; + } + private: + + ExternalRefCountWithCustomDeleter(); + ~ExternalRefCountWithCustomDeleter(); + }; + + + + + + template + struct ExternalRefCountWithContiguousData: public ExternalRefCountWithDestroyFn + { + typedef ExternalRefCountWithDestroyFn Parent; + T data; + + static void deleter(ExternalRefCountData *self) + { + ExternalRefCountWithContiguousData *that = + static_cast(self); + that->data.~T(); + } + static void safetyCheckDeleter(ExternalRefCountData *self) + { + internalSafetyCheckRemove2(self); + deleter(self); + } + + static inline ExternalRefCountData *create(T **ptr) + { + + + + DestroyerFn destroy = &deleter; + + ExternalRefCountWithContiguousData *d = + static_cast(::operator new(sizeof(ExternalRefCountWithContiguousData))); + + + + new (d) Parent(destroy); + + *ptr = &d->data; + return d; + } + + private: + + ExternalRefCountWithContiguousData(); + ~ExternalRefCountWithContiguousData(); + }; + + + + template + class ExternalRefCount: public Basic + { + public: + typedef ExternalRefCountData Data; + + inline void ref() const { d->weakref.ref(); d->strongref.ref(); } + inline bool deref() + { + if (!d->strongref.deref()) { + internalDestroy(); + } + return d->weakref.deref(); + } + + inline void internalConstruct(T *ptr) + { + + + + if (ptr) + d = new Data; + else + d = 0; + internalFinishConstruction(ptr); + + } + + template + inline void internalConstruct(T *ptr, Deleter deleter) + { + if (ptr) + d = ExternalRefCountWithCustomDeleter::create(ptr, deleter); + else + d = 0; + internalFinishConstruction(ptr); + } + + inline void internalCreate() + { + T *ptr; + d = ExternalRefCountWithContiguousData::create(&ptr); + Basic::internalConstruct(ptr); + } + + inline void internalFinishConstruction(T *ptr) + { + Basic::internalConstruct(ptr); + if (ptr) d->setQObjectShared(ptr, true); + + + + } + + inline ExternalRefCount() : d(0) { } + inline ExternalRefCount(Qt::Initialization i) : Basic(i) { } + inline ExternalRefCount(const ExternalRefCount &other) : Basic(other), d(other.d) + { if (d) ref(); } + template + inline ExternalRefCount(const ExternalRefCount &other) : Basic(other.value), d(other.d) + { if (d) ref(); } + inline ~ExternalRefCount() { if (d && !deref()) delete d; } + + template + inline void internalCopy(const ExternalRefCount &other) + { + internalSet(other.d, other.data()); + } + + inline void internalDestroy() + { + if (!d->destroy()) + delete this->value; + } + + inline void internalSwap(ExternalRefCount &other) + { + qSwap(d, other.d); + qSwap(this->value, other.value); + } + + + + + template friend class ExternalRefCount; + template friend class QWeakPointer; + template friend QSharedPointer copyAndSetPointer(X * ptr, const QSharedPointer &src); + + + inline void internalSet(Data *o, T *actual) + { + if (o) { + + + register int tmp = o->strongref; + while (tmp > 0) { + + if (o->strongref.testAndSetRelaxed(tmp, tmp + 1)) + break; + tmp = o->strongref; + } + + if (tmp > 0) + o->weakref.ref(); + else + o = 0; + } + if (d && !deref()) + delete d; + d = o; + this->value = d && d->strongref ? actual : 0; + } + + Data *d; + + private: + template ExternalRefCount(const InternalRefCount &); + }; +} + +template +class QSharedPointer: public QtSharedPointer::ExternalRefCount +{ + typedef typename QtSharedPointer::ExternalRefCount BaseClass; +public: + inline QSharedPointer() { } + + + inline explicit QSharedPointer(T *ptr) : BaseClass(Qt::Uninitialized) + { BaseClass::internalConstruct(ptr); } + + template + inline QSharedPointer(T *ptr, Deleter d) { BaseClass::internalConstruct(ptr, d); } + + inline QSharedPointer(const QSharedPointer &other) : BaseClass(other) { } + inline QSharedPointer &operator=(const QSharedPointer &other) + { + BaseClass::internalCopy(other); + return *this; + } + + template + inline QSharedPointer(const QSharedPointer &other) : BaseClass(other) + { } + + template + inline QSharedPointer &operator=(const QSharedPointer &other) + { + qt_sharedpointer_cast_check(static_cast(0)); + BaseClass::internalCopy(other); + return *this; + } + + template + inline QSharedPointer(const QWeakPointer &other) : BaseClass(Qt::Uninitialized) + { this->d = 0; *this = other; } + + template + inline QSharedPointer &operator=(const QWeakPointer &other) + { BaseClass::internalSet(other.d, other.value); return *this; } + + inline void swap(QSharedPointer &other) + { QSharedPointer::internalSwap(other); } + + template + QSharedPointer staticCast() const + { + return qSharedPointerCast(*this); + } + + template + QSharedPointer dynamicCast() const + { + return qSharedPointerDynamicCast(*this); + } + + template + QSharedPointer constCast() const + { + return qSharedPointerConstCast(*this); + } + + + template + QSharedPointer objectCast() const + { + return qSharedPointerObjectCast(*this); + } + + + inline void clear() { *this = QSharedPointer(); } + + QWeakPointer toWeakRef() const; + +public: + inline explicit QSharedPointer(Qt::Initialization i) : BaseClass(i) {} + +public: + static inline QSharedPointer create() + { + QSharedPointer result(Qt::Uninitialized); + result.internalCreate(); + + + new (result.data()) T(); + result.internalFinishConstruction(result.data()); + return result; + } +}; + +template +class QWeakPointer +{ + + typedef T *QWeakPointer:: *RestrictedBool; + + typedef QtSharedPointer::ExternalRefCountData Data; + +public: + typedef T element_type; + typedef T value_type; + typedef value_type *pointer; + typedef const value_type *const_pointer; + typedef value_type &reference; + typedef const value_type &const_reference; + typedef ptrdiff_t difference_type; + + inline bool isNull() const { return d == 0 || d->strongref == 0 || value == 0; } + + inline operator RestrictedBool() const { return isNull() ? 0 : &QWeakPointer::value; } + + + + inline bool operator !() const { return isNull(); } + inline T *data() const { return d == 0 || d->strongref == 0 ? 0 : value; } + + inline QWeakPointer() : d(0), value(0) { } + inline ~QWeakPointer() { if (d && !d->weakref.deref()) delete d; } + + + + template + inline QWeakPointer(X *ptr) : d(ptr ? d->getAndRef(ptr) : 0), value(ptr) + { } + + template + inline QWeakPointer &operator=(X *ptr) + { return *this = QWeakPointer(ptr); } + + inline QWeakPointer(const QWeakPointer &o) : d(o.d), value(o.value) + { if (d) d->weakref.ref(); } + inline QWeakPointer &operator=(const QWeakPointer &o) + { + internalSet(o.d, o.value); + return *this; + } + + inline QWeakPointer(const QSharedPointer &o) : d(o.d), value(o.data()) + { if (d) d->weakref.ref();} + inline QWeakPointer &operator=(const QSharedPointer &o) + { + internalSet(o.d, o.value); + return *this; + } + + template + inline QWeakPointer(const QWeakPointer &o) : d(0), value(0) + { *this = o; } + + template + inline QWeakPointer &operator=(const QWeakPointer &o) + { + + + *this = o.toStrongRef(); + return *this; + } + + template + inline bool operator==(const QWeakPointer &o) const + { return d == o.d && value == static_cast(o.value); } + + template + inline bool operator!=(const QWeakPointer &o) const + { return !(*this == o); } + + template + inline QWeakPointer(const QSharedPointer &o) : d(0), value(0) + { *this = o; } + + template + inline QWeakPointer &operator=(const QSharedPointer &o) + { + qt_sharedpointer_cast_check(static_cast(0)); + internalSet(o.d, o.data()); + return *this; + } + + template + inline bool operator==(const QSharedPointer &o) const + { return d == o.d; } + + template + inline bool operator!=(const QSharedPointer &o) const + { return !(*this == o); } + + inline void clear() { *this = QWeakPointer(); } + + inline QSharedPointer toStrongRef() const { return QSharedPointer(*this); } + + + + + +private: + + + + + template friend class QSharedPointer; + + + inline void internalSet(Data *o, T *actual) + { + if (d == o) return; + if (o) + o->weakref.ref(); + if (d && !d->weakref.deref()) + delete d; + d = o; + value = actual; + } + + Data *d; + T *value; +}; + +template +bool operator==(const QSharedPointer &ptr1, const QSharedPointer &ptr2) +{ + return ptr1.data() == ptr2.data(); +} +template +bool operator!=(const QSharedPointer &ptr1, const QSharedPointer &ptr2) +{ + return ptr1.data() != ptr2.data(); +} + +template +bool operator==(const QSharedPointer &ptr1, const X *ptr2) +{ + return ptr1.data() == ptr2; +} +template +bool operator==(const T *ptr1, const QSharedPointer &ptr2) +{ + return ptr1 == ptr2.data(); +} + +template +bool operator!=(const QSharedPointer &ptr1, const X *ptr2) +{ + return !(ptr1 == ptr2); +} +template +bool operator!=(const T *ptr1, const QSharedPointer &ptr2) +{ + return !(ptr2 == ptr1); +} + +template +bool operator==(const QSharedPointer &ptr1, const QWeakPointer &ptr2) +{ + return ptr2 == ptr1; +} +template +bool operator!=(const QSharedPointer &ptr1, const QWeakPointer &ptr2) +{ + return ptr2 != ptr1; +} + +template +inline typename T::difference_type operator-(const QSharedPointer &ptr1, const QSharedPointer &ptr2) +{ + return ptr1.data() - ptr2.data(); +} + +template +inline QWeakPointer QSharedPointer::toWeakRef() const +{ + return QWeakPointer(*this); +} + +template +inline void qSwap(QSharedPointer &p1, QSharedPointer &p2) +{ + p1.swap(p2); +} + +namespace QtSharedPointer { + + template + inline QSharedPointer copyAndSetPointer(X *ptr, const QSharedPointer &src) + { + QSharedPointer result; + result.internalSet(src.d, ptr); + return result; + } +} + + +template +inline QSharedPointer qSharedPointerCast(const QSharedPointer &src) +{ + register X *ptr = static_cast(src.data()); + return QtSharedPointer::copyAndSetPointer(ptr, src); +} +template +inline QSharedPointer qSharedPointerCast(const QWeakPointer &src) +{ + return qSharedPointerCast(src.toStrongRef()); +} + +template +inline QSharedPointer qSharedPointerDynamicCast(const QSharedPointer &src) +{ + register X *ptr = dynamic_cast(src.data()); + return QtSharedPointer::copyAndSetPointer(ptr, src); +} +template +inline QSharedPointer qSharedPointerDynamicCast(const QWeakPointer &src) +{ + return qSharedPointerDynamicCast(src.toStrongRef()); +} + +template +inline QSharedPointer qSharedPointerConstCast(const QSharedPointer &src) +{ + register X *ptr = const_cast(src.data()); + return QtSharedPointer::copyAndSetPointer(ptr, src); +} +template +inline QSharedPointer qSharedPointerConstCast(const QWeakPointer &src) +{ + return qSharedPointerConstCast(src.toStrongRef()); +} + +template +inline +QWeakPointer qWeakPointerCast(const QSharedPointer &src) +{ + return qSharedPointerCast(src).toWeakRef(); +} + + +template +inline QSharedPointer qSharedPointerObjectCast(const QSharedPointer &src) +{ + register X *ptr = qobject_cast(src.data()); + return QtSharedPointer::copyAndSetPointer(ptr, src); +} +template +inline QSharedPointer qSharedPointerObjectCast(const QWeakPointer &src) +{ + return qSharedPointerObjectCast(src.toStrongRef()); +} + +template +inline QSharedPointer::Type> +qobject_cast(const QSharedPointer &src) +{ + return qSharedPointerObjectCast::Type, T>(src); +} +template +inline QSharedPointer::Type> +qobject_cast(const QWeakPointer &src) +{ + return qSharedPointerObjectCast::Type, T>(src); +} + + + + + + +# 53 "/usr/include/qt4/QtCore/qsharedpointer.h" 2 +# 50 "/usr/include/qt4/QtGui/qpixmap.h" 2 +# 1 "/usr/include/qt4/QtGui/qimage.h" 1 +# 45 "/usr/include/qt4/QtGui/qimage.h" +# 1 "/usr/include/qt4/QtGui/qtransform.h" 1 +# 44 "/usr/include/qt4/QtGui/qtransform.h" +# 1 "/usr/include/qt4/QtGui/qmatrix.h" 1 +# 45 "/usr/include/qt4/QtGui/qmatrix.h" +# 1 "/usr/include/qt4/QtGui/qpolygon.h" 1 +# 45 "/usr/include/qt4/QtGui/qpolygon.h" +# 1 "/usr/include/qt4/QtCore/qvector.h" 1 +# 52 "/usr/include/qt4/QtCore/qvector.h" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/vector" 1 3 +# 59 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/vector" 3 + +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/vector" 3 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_construct.h" 1 3 +# 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_construct.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + + + + + template + inline void + + + + + _Construct(_T1* __p, const _T2& __value) + + { + + + ::new(static_cast(__p)) _T1((__value)); + } + + + + + template + inline void + _Destroy(_Tp* __pointer) + { __pointer->~_Tp(); } + + template + struct _Destroy_aux + { + template + static void + __destroy(_ForwardIterator __first, _ForwardIterator __last) + { + for (; __first != __last; ++__first) + std::_Destroy(&*__first); + } + }; + + template<> + struct _Destroy_aux + { + template + static void + __destroy(_ForwardIterator, _ForwardIterator) { } + }; + + + + + + + template + inline void + _Destroy(_ForwardIterator __first, _ForwardIterator __last) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _Value_type; + std::_Destroy_aux<__has_trivial_destructor(_Value_type)>:: + __destroy(__first, __last); + } + + + + + + + + template class allocator; + + template + void + _Destroy(_ForwardIterator __first, _ForwardIterator __last, + _Allocator& __alloc) + { + for (; __first != __last; ++__first) + __alloc.destroy(&*__first); + } + + template + inline void + _Destroy(_ForwardIterator __first, _ForwardIterator __last, + allocator<_Tp>&) + { + _Destroy(__first, __last); + } + +} +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/vector" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_uninitialized.h" 1 3 +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_uninitialized.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + struct __uninitialized_copy + { + template + static _ForwardIterator + uninitialized_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { + _ForwardIterator __cur = __result; + try + { + for (; __first != __last; ++__first, ++__cur) + std::_Construct(&*__cur, *__first); + return __cur; + } + catch(...) + { + std::_Destroy(__result, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_copy + { + template + static _ForwardIterator + uninitialized_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { return std::copy(__first, __last, __result); } + }; +# 104 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_uninitialized.h" 3 + template + inline _ForwardIterator + uninitialized_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { + typedef typename iterator_traits<_InputIterator>::value_type + _ValueType1; + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType2; + + return std::__uninitialized_copy<(__is_pod(_ValueType1) + && __is_pod(_ValueType2))>:: + uninitialized_copy(__first, __last, __result); + } + + + template + struct __uninitialized_fill + { + template + static void + uninitialized_fill(_ForwardIterator __first, + _ForwardIterator __last, const _Tp& __x) + { + _ForwardIterator __cur = __first; + try + { + for (; __cur != __last; ++__cur) + std::_Construct(&*__cur, __x); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_fill + { + template + static void + uninitialized_fill(_ForwardIterator __first, + _ForwardIterator __last, const _Tp& __x) + { std::fill(__first, __last, __x); } + }; +# 161 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_uninitialized.h" 3 + template + inline void + uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + std::__uninitialized_fill<__is_pod(_ValueType)>:: + uninitialized_fill(__first, __last, __x); + } + + + template + struct __uninitialized_construct_range_dispatch + { + template + static void + __ucr(_ForwardIterator __first, _ForwardIterator __last, + _Tp& __value) + { + if(__first == __last) + return; + + _ForwardIterator __cur = __first; + try + { + std::_Construct(&*__first, (__value)); + _ForwardIterator __prev = __cur; + ++__cur; + for(; __cur != __last; ++__cur, ++__prev) + std::_Construct(&*__cur, (*__prev)); + __value = (*__prev); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_construct_range_dispatch + { + template + static void + __ucr(_ForwardIterator, _ForwardIterator, _Tp&) { } + }; +# 221 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_uninitialized.h" 3 + template + inline void + __uninitialized_construct_range(_ForwardIterator __first, + _ForwardIterator __last, + _Tp& __value) + { + typedef typename std::iterator_traits<_ForwardIterator>::value_type + _ValueType; + + std::__uninitialized_construct_range_dispatch< + __has_trivial_constructor(_ValueType)>:: + __ucr(__first, __last, __value); + } + + + template + struct __uninitialized_fill_n + { + template + static void + uninitialized_fill_n(_ForwardIterator __first, _Size __n, + const _Tp& __x) + { + _ForwardIterator __cur = __first; + try + { + for (; __n > 0; --__n, ++__cur) + std::_Construct(&*__cur, __x); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_fill_n + { + template + static void + uninitialized_fill_n(_ForwardIterator __first, _Size __n, + const _Tp& __x) + { std::fill_n(__first, __n, __x); } + }; +# 277 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_uninitialized.h" 3 + template + inline void + uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + std::__uninitialized_fill_n<__is_pod(_ValueType)>:: + uninitialized_fill_n(__first, __n, __x); + } + + + + + + + + template + _ForwardIterator + __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _Allocator& __alloc) + { + _ForwardIterator __cur = __result; + try + { + for (; __first != __last; ++__first, ++__cur) + __alloc.construct(&*__cur, *__first); + return __cur; + } + catch(...) + { + std::_Destroy(__result, __cur, __alloc); + throw; + } + } + + template + inline _ForwardIterator + __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, allocator<_Tp>&) + { return std::uninitialized_copy(__first, __last, __result); } + + template + inline _ForwardIterator + __uninitialized_move_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _Allocator& __alloc) + { + return std::__uninitialized_copy_a((__first), + (__last), + __result, __alloc); + } + + template + void + __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x, _Allocator& __alloc) + { + _ForwardIterator __cur = __first; + try + { + for (; __cur != __last; ++__cur) + __alloc.construct(&*__cur, __x); + } + catch(...) + { + std::_Destroy(__first, __cur, __alloc); + throw; + } + } + + template + inline void + __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x, allocator<_Tp2>&) + { std::uninitialized_fill(__first, __last, __x); } + + template + void + __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, + const _Tp& __x, _Allocator& __alloc) + { + _ForwardIterator __cur = __first; + try + { + for (; __n > 0; --__n, ++__cur) + __alloc.construct(&*__cur, __x); + } + catch(...) + { + std::_Destroy(__first, __cur, __alloc); + throw; + } + } + + template + inline void + __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, + const _Tp& __x, allocator<_Tp2>&) + { std::uninitialized_fill_n(__first, __n, __x); } +# 391 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_uninitialized.h" 3 + template + inline _ForwardIterator + __uninitialized_copy_move(_InputIterator1 __first1, + _InputIterator1 __last1, + _InputIterator2 __first2, + _InputIterator2 __last2, + _ForwardIterator __result, + _Allocator& __alloc) + { + _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1, + __result, + __alloc); + try + { + return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc); + } + catch(...) + { + std::_Destroy(__result, __mid, __alloc); + throw; + } + } + + + + + + template + inline _ForwardIterator + __uninitialized_move_copy(_InputIterator1 __first1, + _InputIterator1 __last1, + _InputIterator2 __first2, + _InputIterator2 __last2, + _ForwardIterator __result, + _Allocator& __alloc) + { + _ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1, + __result, + __alloc); + try + { + return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc); + } + catch(...) + { + std::_Destroy(__result, __mid, __alloc); + throw; + } + } + + + + + template + inline _ForwardIterator + __uninitialized_fill_move(_ForwardIterator __result, _ForwardIterator __mid, + const _Tp& __x, _InputIterator __first, + _InputIterator __last, _Allocator& __alloc) + { + std::__uninitialized_fill_a(__result, __mid, __x, __alloc); + try + { + return std::__uninitialized_move_a(__first, __last, __mid, __alloc); + } + catch(...) + { + std::_Destroy(__result, __mid, __alloc); + throw; + } + } + + + + + template + inline void + __uninitialized_move_fill(_InputIterator __first1, _InputIterator __last1, + _ForwardIterator __first2, + _ForwardIterator __last2, const _Tp& __x, + _Allocator& __alloc) + { + _ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1, + __first2, + __alloc); + try + { + std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc); + } + catch(...) + { + std::_Destroy(__first2, __mid2, __alloc); + throw; + } + } +# 537 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_uninitialized.h" 3 +} +# 65 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/vector" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 1 3 +# 65 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + + template + struct _Vector_base + { + typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; + + struct _Vector_impl + : public _Tp_alloc_type + { + typename _Tp_alloc_type::pointer _M_start; + typename _Tp_alloc_type::pointer _M_finish; + typename _Tp_alloc_type::pointer _M_end_of_storage; + + _Vector_impl() + : _Tp_alloc_type(), _M_start(0), _M_finish(0), _M_end_of_storage(0) + { } + + _Vector_impl(_Tp_alloc_type const& __a) + : _Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0) + { } + }; + + public: + typedef _Alloc allocator_type; + + _Tp_alloc_type& + _M_get_Tp_allocator() + { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); } + + const _Tp_alloc_type& + _M_get_Tp_allocator() const + { return *static_cast(&this->_M_impl); } + + allocator_type + get_allocator() const + { return allocator_type(_M_get_Tp_allocator()); } + + _Vector_base() + : _M_impl() { } + + _Vector_base(const allocator_type& __a) + : _M_impl(__a) { } + + _Vector_base(size_t __n, const allocator_type& __a) + : _M_impl(__a) + { + this->_M_impl._M_start = this->_M_allocate(__n); + this->_M_impl._M_finish = this->_M_impl._M_start; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + } +# 131 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + ~_Vector_base() + { _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); } + + public: + _Vector_impl _M_impl; + + typename _Tp_alloc_type::pointer + _M_allocate(size_t __n) + { return __n != 0 ? _M_impl.allocate(__n) : 0; } + + void + _M_deallocate(typename _Tp_alloc_type::pointer __p, size_t __n) + { + if (__p) + _M_impl.deallocate(__p, __n); + } + }; +# 169 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + template > + class vector : public _Vector_base<_Tp, _Alloc> + { + + typedef typename _Alloc::value_type _Alloc_value_type; + + + + typedef _Vector_base<_Tp, _Alloc> _Base; + typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; + + public: + typedef _Tp value_type; + typedef typename _Tp_alloc_type::pointer pointer; + typedef typename _Tp_alloc_type::const_pointer const_pointer; + typedef typename _Tp_alloc_type::reference reference; + typedef typename _Tp_alloc_type::const_reference const_reference; + typedef __gnu_cxx::__normal_iterator iterator; + typedef __gnu_cxx::__normal_iterator + const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Alloc allocator_type; + + public: + using _Base::_M_allocate; + using _Base::_M_deallocate; + using _Base::_M_impl; + using _Base::_M_get_Tp_allocator; + + public: + + + + + + vector() + : _Base() { } + + + + + + explicit + vector(const allocator_type& __a) + : _Base(__a) { } +# 226 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + explicit + vector(size_type __n, const value_type& __value = value_type(), + const allocator_type& __a = allocator_type()) + : _Base(__n, __a) + { _M_fill_initialize(__n, __value); } +# 241 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + vector(const vector& __x) + : _Base(__x.size(), __x._M_get_Tp_allocator()) + { this->_M_impl._M_finish = + std::__uninitialized_copy_a(__x.begin(), __x.end(), + this->_M_impl._M_start, + _M_get_Tp_allocator()); + } +# 296 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + template + vector(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_initialize_dispatch(__first, __last, _Integral()); + } + + + + + + + + ~vector() + { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); } +# 324 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + vector& + operator=(const vector& __x); +# 374 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + void + assign(size_type __n, const value_type& __val) + { _M_fill_assign(__n, __val); } +# 390 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + template + void + assign(_InputIterator __first, _InputIterator __last) + { + + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } +# 417 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + using _Base::get_allocator; + + + + + + + + iterator + begin() + { return iterator(this->_M_impl._M_start); } + + + + + + + const_iterator + begin() const + { return const_iterator(this->_M_impl._M_start); } + + + + + + + iterator + end() + { return iterator(this->_M_impl._M_finish); } + + + + + + + const_iterator + end() const + { return const_iterator(this->_M_impl._M_finish); } + + + + + + + reverse_iterator + rbegin() + { return reverse_iterator(end()); } + + + + + + + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(end()); } + + + + + + + reverse_iterator + rend() + { return reverse_iterator(begin()); } + + + + + + + const_reverse_iterator + rend() const + { return const_reverse_iterator(begin()); } +# 532 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + size_type + size() const + { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); } + + + size_type + max_size() const + { return _M_get_Tp_allocator().max_size(); } +# 552 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + void + resize(size_type __new_size, value_type __x = value_type()) + { + if (__new_size < size()) + _M_erase_at_end(this->_M_impl._M_start + __new_size); + else + insert(end(), __new_size - size(), __x); + } +# 572 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + size_type + capacity() const + { return size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); } + + + + + + bool + empty() const + { return begin() == end(); } +# 602 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + void + reserve(size_type __n); +# 617 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + reference + operator[](size_type __n) + { return *(this->_M_impl._M_start + __n); } +# 632 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + const_reference + operator[](size_type __n) const + { return *(this->_M_impl._M_start + __n); } + + public: + + void + _M_range_check(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range(("vector::_M_range_check")); + } + + public: +# 657 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + reference + at(size_type __n) + { + _M_range_check(__n); + return (*this)[__n]; + } +# 675 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + const_reference + at(size_type __n) const + { + _M_range_check(__n); + return (*this)[__n]; + } + + + + + + reference + front() + { return *begin(); } + + + + + + const_reference + front() const + { return *begin(); } + + + + + + reference + back() + { return *(end() - 1); } + + + + + + const_reference + back() const + { return *(end() - 1); } +# 721 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + pointer + data() + { return pointer(this->_M_impl._M_start); } + + const_pointer + data() const + { return const_pointer(this->_M_impl._M_start); } +# 740 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + void + push_back(const value_type& __x) + { + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + { + this->_M_impl.construct(this->_M_impl._M_finish, __x); + ++this->_M_impl._M_finish; + } + else + _M_insert_aux(end(), __x); + } +# 771 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + void + pop_back() + { + --this->_M_impl._M_finish; + this->_M_impl.destroy(this->_M_impl._M_finish); + } +# 807 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + iterator + insert(iterator __position, const value_type& __x); +# 857 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + void + insert(iterator __position, size_type __n, const value_type& __x) + { _M_fill_insert(__position, __n, __x); } +# 875 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + template + void + insert(iterator __position, _InputIterator __first, + _InputIterator __last) + { + + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_insert_dispatch(__position, __first, __last, _Integral()); + } +# 900 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + iterator + erase(iterator __position); +# 921 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + iterator + erase(iterator __first, iterator __last); +# 933 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + void + swap(vector& __x) + { + std::swap(this->_M_impl._M_start, __x._M_impl._M_start); + std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); + std::swap(this->_M_impl._M_end_of_storage, + __x._M_impl._M_end_of_storage); + + + + std::__alloc_swap<_Tp_alloc_type>::_S_do_it(_M_get_Tp_allocator(), + __x._M_get_Tp_allocator()); + } + + + + + + + + void + clear() + { _M_erase_at_end(this->_M_impl._M_start); } + + public: + + + + + template + pointer + _M_allocate_and_copy(size_type __n, + _ForwardIterator __first, _ForwardIterator __last) + { + pointer __result = this->_M_allocate(__n); + try + { + std::__uninitialized_copy_a(__first, __last, __result, + _M_get_Tp_allocator()); + return __result; + } + catch(...) + { + _M_deallocate(__result, __n); + throw; + } + } +# 988 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + template + void + _M_initialize_dispatch(_Integer __n, _Integer __value, __true_type) + { + this->_M_impl._M_start = _M_allocate(static_cast(__n)); + this->_M_impl._M_end_of_storage = + this->_M_impl._M_start + static_cast(__n); + _M_fill_initialize(static_cast(__n), __value); + } + + + template + void + _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { + typedef typename std::iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_range_initialize(__first, __last, _IterCategory()); + } + + + template + void + _M_range_initialize(_InputIterator __first, + _InputIterator __last, std::input_iterator_tag) + { + for (; __first != __last; ++__first) + push_back(*__first); + } + + + template + void + _M_range_initialize(_ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag) + { + const size_type __n = std::distance(__first, __last); + this->_M_impl._M_start = this->_M_allocate(__n); + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + this->_M_impl._M_finish = + std::__uninitialized_copy_a(__first, __last, + this->_M_impl._M_start, + _M_get_Tp_allocator()); + } + + + + void + _M_fill_initialize(size_type __n, const value_type& __value) + { + std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value, + _M_get_Tp_allocator()); + this->_M_impl._M_finish = this->_M_impl._M_end_of_storage; + } +# 1052 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + template + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } + + + template + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { + typedef typename std::iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_assign_aux(__first, __last, _IterCategory()); + } + + + template + void + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag); + + + template + void + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag); + + + + void + _M_fill_assign(size_type __n, const value_type& __val); +# 1092 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + template + void + _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, + __true_type) + { _M_fill_insert(__pos, __n, __val); } + + + template + void + _M_insert_dispatch(iterator __pos, _InputIterator __first, + _InputIterator __last, __false_type) + { + typedef typename std::iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_range_insert(__pos, __first, __last, _IterCategory()); + } + + + template + void + _M_range_insert(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag); + + + template + void + _M_range_insert(iterator __pos, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag); + + + + void + _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); + + + + void + _M_insert_aux(iterator __position, const value_type& __x); + + + + + + + + size_type + _M_check_len(size_type __n, const char* __s) const + { + if (max_size() - size() < __n) + __throw_length_error((__s)); + + const size_type __len = size() + std::max(size(), __n); + return (__len < size() || __len > max_size()) ? max_size() : __len; + } + + + + + + void + _M_erase_at_end(pointer __pos) + { + std::_Destroy(__pos, this->_M_impl._M_finish, _M_get_Tp_allocator()); + this->_M_impl._M_finish = __pos; + } + }; +# 1170 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + template + inline bool + operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return (__x.size() == __y.size() + && std::equal(__x.begin(), __x.end(), __y.begin())); } +# 1187 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_vector.h" 3 + template + inline bool + operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return std::lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); } + + + template + inline bool + operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return !(__x == __y); } + + + template + inline bool + operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return __y < __x; } + + + template + inline bool + operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return !(__y < __x); } + + + template + inline bool + operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return !(__x < __y); } + + + template + inline void + swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) + { __x.swap(__y); } + +} +# 66 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/vector" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_bvector.h" 1 3 +# 62 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_bvector.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + typedef unsigned long _Bit_type; + enum { _S_word_bit = int(8 * sizeof(_Bit_type)) }; + + struct _Bit_reference + { + _Bit_type * _M_p; + _Bit_type _M_mask; + + _Bit_reference(_Bit_type * __x, _Bit_type __y) + : _M_p(__x), _M_mask(__y) { } + + _Bit_reference() : _M_p(0), _M_mask(0) { } + + operator bool() const + { return !!(*_M_p & _M_mask); } + + _Bit_reference& + operator=(bool __x) + { + if (__x) + *_M_p |= _M_mask; + else + *_M_p &= ~_M_mask; + return *this; + } + + _Bit_reference& + operator=(const _Bit_reference& __x) + { return *this = bool(__x); } + + bool + operator==(const _Bit_reference& __x) const + { return bool(*this) == bool(__x); } + + bool + operator<(const _Bit_reference& __x) const + { return !bool(*this) && bool(__x); } + + void + flip() + { *_M_p ^= _M_mask; } + }; + + struct _Bit_iterator_base + : public std::iterator + { + _Bit_type * _M_p; + unsigned int _M_offset; + + _Bit_iterator_base(_Bit_type * __x, unsigned int __y) + : _M_p(__x), _M_offset(__y) { } + + void + _M_bump_up() + { + if (_M_offset++ == int(_S_word_bit) - 1) + { + _M_offset = 0; + ++_M_p; + } + } + + void + _M_bump_down() + { + if (_M_offset-- == 0) + { + _M_offset = int(_S_word_bit) - 1; + --_M_p; + } + } + + void + _M_incr(ptrdiff_t __i) + { + difference_type __n = __i + _M_offset; + _M_p += __n / int(_S_word_bit); + __n = __n % int(_S_word_bit); + if (__n < 0) + { + __n += int(_S_word_bit); + --_M_p; + } + _M_offset = static_cast(__n); + } + + bool + operator==(const _Bit_iterator_base& __i) const + { return _M_p == __i._M_p && _M_offset == __i._M_offset; } + + bool + operator<(const _Bit_iterator_base& __i) const + { + return _M_p < __i._M_p + || (_M_p == __i._M_p && _M_offset < __i._M_offset); + } + + bool + operator!=(const _Bit_iterator_base& __i) const + { return !(*this == __i); } + + bool + operator>(const _Bit_iterator_base& __i) const + { return __i < *this; } + + bool + operator<=(const _Bit_iterator_base& __i) const + { return !(__i < *this); } + + bool + operator>=(const _Bit_iterator_base& __i) const + { return !(*this < __i); } + }; + + inline ptrdiff_t + operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) + { + return (int(_S_word_bit) * (__x._M_p - __y._M_p) + + __x._M_offset - __y._M_offset); + } + + struct _Bit_iterator : public _Bit_iterator_base + { + typedef _Bit_reference reference; + typedef _Bit_reference* pointer; + typedef _Bit_iterator iterator; + + _Bit_iterator() : _Bit_iterator_base(0, 0) { } + + _Bit_iterator(_Bit_type * __x, unsigned int __y) + : _Bit_iterator_base(__x, __y) { } + + reference + operator*() const + { return reference(_M_p, 1UL << _M_offset); } + + iterator& + operator++() + { + _M_bump_up(); + return *this; + } + + iterator + operator++(int) + { + iterator __tmp = *this; + _M_bump_up(); + return __tmp; + } + + iterator& + operator--() + { + _M_bump_down(); + return *this; + } + + iterator + operator--(int) + { + iterator __tmp = *this; + _M_bump_down(); + return __tmp; + } + + iterator& + operator+=(difference_type __i) + { + _M_incr(__i); + return *this; + } + + iterator& + operator-=(difference_type __i) + { + *this += -__i; + return *this; + } + + iterator + operator+(difference_type __i) const + { + iterator __tmp = *this; + return __tmp += __i; + } + + iterator + operator-(difference_type __i) const + { + iterator __tmp = *this; + return __tmp -= __i; + } + + reference + operator[](difference_type __i) const + { return *(*this + __i); } + }; + + inline _Bit_iterator + operator+(ptrdiff_t __n, const _Bit_iterator& __x) + { return __x + __n; } + + struct _Bit_const_iterator : public _Bit_iterator_base + { + typedef bool reference; + typedef bool const_reference; + typedef const bool* pointer; + typedef _Bit_const_iterator const_iterator; + + _Bit_const_iterator() : _Bit_iterator_base(0, 0) { } + + _Bit_const_iterator(_Bit_type * __x, unsigned int __y) + : _Bit_iterator_base(__x, __y) { } + + _Bit_const_iterator(const _Bit_iterator& __x) + : _Bit_iterator_base(__x._M_p, __x._M_offset) { } + + const_reference + operator*() const + { return _Bit_reference(_M_p, 1UL << _M_offset); } + + const_iterator& + operator++() + { + _M_bump_up(); + return *this; + } + + const_iterator + operator++(int) + { + const_iterator __tmp = *this; + _M_bump_up(); + return __tmp; + } + + const_iterator& + operator--() + { + _M_bump_down(); + return *this; + } + + const_iterator + operator--(int) + { + const_iterator __tmp = *this; + _M_bump_down(); + return __tmp; + } + + const_iterator& + operator+=(difference_type __i) + { + _M_incr(__i); + return *this; + } + + const_iterator& + operator-=(difference_type __i) + { + *this += -__i; + return *this; + } + + const_iterator + operator+(difference_type __i) const + { + const_iterator __tmp = *this; + return __tmp += __i; + } + + const_iterator + operator-(difference_type __i) const + { + const_iterator __tmp = *this; + return __tmp -= __i; + } + + const_reference + operator[](difference_type __i) const + { return *(*this + __i); } + }; + + inline _Bit_const_iterator + operator+(ptrdiff_t __n, const _Bit_const_iterator& __x) + { return __x + __n; } + + inline void + __fill_bvector(_Bit_iterator __first, _Bit_iterator __last, bool __x) + { + for (; __first != __last; ++__first) + *__first = __x; + } + + inline void + fill(_Bit_iterator __first, _Bit_iterator __last, const bool& __x) + { + if (__first._M_p != __last._M_p) + { + std::fill(__first._M_p + 1, __last._M_p, __x ? ~0 : 0); + __fill_bvector(__first, _Bit_iterator(__first._M_p + 1, 0), __x); + __fill_bvector(_Bit_iterator(__last._M_p, 0), __last, __x); + } + else + __fill_bvector(__first, __last, __x); + } + + template + struct _Bvector_base + { + typedef typename _Alloc::template rebind<_Bit_type>::other + _Bit_alloc_type; + + struct _Bvector_impl + : public _Bit_alloc_type + { + _Bit_iterator _M_start; + _Bit_iterator _M_finish; + _Bit_type* _M_end_of_storage; + + _Bvector_impl() + : _Bit_alloc_type(), _M_start(), _M_finish(), _M_end_of_storage(0) + { } + + _Bvector_impl(const _Bit_alloc_type& __a) + : _Bit_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage(0) + { } + }; + + public: + typedef _Alloc allocator_type; + + _Bit_alloc_type& + _M_get_Bit_allocator() + { return *static_cast<_Bit_alloc_type*>(&this->_M_impl); } + + const _Bit_alloc_type& + _M_get_Bit_allocator() const + { return *static_cast(&this->_M_impl); } + + allocator_type + get_allocator() const + { return allocator_type(_M_get_Bit_allocator()); } + + _Bvector_base() + : _M_impl() { } + + _Bvector_base(const allocator_type& __a) + : _M_impl(__a) { } +# 429 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_bvector.h" 3 + ~_Bvector_base() + { this->_M_deallocate(); } + + public: + _Bvector_impl _M_impl; + + _Bit_type* + _M_allocate(size_t __n) + { return _M_impl.allocate((__n + int(_S_word_bit) - 1) + / int(_S_word_bit)); } + + void + _M_deallocate() + { + if (_M_impl._M_start._M_p) + _M_impl.deallocate(_M_impl._M_start._M_p, + _M_impl._M_end_of_storage - _M_impl._M_start._M_p); + } + }; + +} + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 473 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_bvector.h" 3 +template + class vector : public _Bvector_base<_Alloc> + { + typedef _Bvector_base<_Alloc> _Base; + + + + + + public: + typedef bool value_type; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Bit_reference reference; + typedef bool const_reference; + typedef _Bit_reference* pointer; + typedef const bool* const_pointer; + typedef _Bit_iterator iterator; + typedef _Bit_const_iterator const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef _Alloc allocator_type; + + allocator_type get_allocator() const + { return _Base::get_allocator(); } + + public: + using _Base::_M_allocate; + using _Base::_M_deallocate; + using _Base::_M_get_Bit_allocator; + + public: + vector() + : _Base() { } + + explicit + vector(const allocator_type& __a) + : _Base(__a) { } + + explicit + vector(size_type __n, const bool& __value = bool(), + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + _M_initialize(__n); + std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage, + __value ? ~0 : 0); + } + + vector(const vector& __x) + : _Base(__x._M_get_Bit_allocator()) + { + _M_initialize(__x.size()); + _M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start); + } +# 542 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_bvector.h" 3 + template + vector(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_initialize_dispatch(__first, __last, _Integral()); + } + + ~vector() { } + + vector& + operator=(const vector& __x) + { + if (&__x == this) + return *this; + if (__x.size() > capacity()) + { + this->_M_deallocate(); + _M_initialize(__x.size()); + } + this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(), + begin()); + return *this; + } +# 591 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_bvector.h" 3 + void + assign(size_type __n, const bool& __x) + { _M_fill_assign(__n, __x); } + + template + void + assign(_InputIterator __first, _InputIterator __last) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } + + + + + + + + iterator + begin() + { return this->_M_impl._M_start; } + + const_iterator + begin() const + { return this->_M_impl._M_start; } + + iterator + end() + { return this->_M_impl._M_finish; } + + const_iterator + end() const + { return this->_M_impl._M_finish; } + + reverse_iterator + rbegin() + { return reverse_iterator(end()); } + + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(end()); } + + reverse_iterator + rend() + { return reverse_iterator(begin()); } + + const_reverse_iterator + rend() const + { return const_reverse_iterator(begin()); } +# 659 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_bvector.h" 3 + size_type + size() const + { return size_type(end() - begin()); } + + size_type + max_size() const + { + const size_type __isize = + __gnu_cxx::__numeric_traits::__max + - int(_S_word_bit) + 1; + const size_type __asize = _M_get_Bit_allocator().max_size(); + return (__asize <= __isize / int(_S_word_bit) + ? __asize * int(_S_word_bit) : __isize); + } + + size_type + capacity() const + { return size_type(const_iterator(this->_M_impl._M_end_of_storage, 0) + - begin()); } + + bool + empty() const + { return begin() == end(); } + + reference + operator[](size_type __n) + { + return *iterator(this->_M_impl._M_start._M_p + + __n / int(_S_word_bit), __n % int(_S_word_bit)); + } + + const_reference + operator[](size_type __n) const + { + return *const_iterator(this->_M_impl._M_start._M_p + + __n / int(_S_word_bit), __n % int(_S_word_bit)); + } + + public: + void + _M_range_check(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range(("vector::_M_range_check")); + } + + public: + reference + at(size_type __n) + { _M_range_check(__n); return (*this)[__n]; } + + const_reference + at(size_type __n) const + { _M_range_check(__n); return (*this)[__n]; } + + void + reserve(size_type __n); + + reference + front() + { return *begin(); } + + const_reference + front() const + { return *begin(); } + + reference + back() + { return *(end() - 1); } + + const_reference + back() const + { return *(end() - 1); } + + + + + + + void + data() { } + + void + push_back(bool __x) + { + if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage) + *this->_M_impl._M_finish++ = __x; + else + _M_insert_aux(end(), __x); + } + + void + swap(vector& __x) + { + std::swap(this->_M_impl._M_start, __x._M_impl._M_start); + std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); + std::swap(this->_M_impl._M_end_of_storage, + __x._M_impl._M_end_of_storage); + + + + std::__alloc_swap:: + _S_do_it(_M_get_Bit_allocator(), __x._M_get_Bit_allocator()); + } + + + static void + swap(reference __x, reference __y) + { + bool __tmp = __x; + __x = __y; + __y = __tmp; + } + + iterator + insert(iterator __position, const bool& __x = bool()) + { + const difference_type __n = __position - begin(); + if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage + && __position == end()) + *this->_M_impl._M_finish++ = __x; + else + _M_insert_aux(__position, __x); + return begin() + __n; + } + + template + void + insert(iterator __position, + _InputIterator __first, _InputIterator __last) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_insert_dispatch(__position, __first, __last, _Integral()); + } + + void + insert(iterator __position, size_type __n, const bool& __x) + { _M_fill_insert(__position, __n, __x); } + + + + + + + void + pop_back() + { --this->_M_impl._M_finish; } + + iterator + erase(iterator __position) + { + if (__position + 1 != end()) + std::copy(__position + 1, end(), __position); + --this->_M_impl._M_finish; + return __position; + } + + iterator + erase(iterator __first, iterator __last) + { + _M_erase_at_end(std::copy(__last, end(), __first)); + return __first; + } + + void + resize(size_type __new_size, bool __x = bool()) + { + if (__new_size < size()) + _M_erase_at_end(begin() + difference_type(__new_size)); + else + insert(end(), __new_size - size(), __x); + } + + + + + + + + void + flip() + { + for (_Bit_type * __p = this->_M_impl._M_start._M_p; + __p != this->_M_impl._M_end_of_storage; ++__p) + *__p = ~*__p; + } + + void + clear() + { _M_erase_at_end(begin()); } + + + public: + + iterator + _M_copy_aligned(const_iterator __first, const_iterator __last, + iterator __result) + { + _Bit_type* __q = std::copy(__first._M_p, __last._M_p, __result._M_p); + return std::copy(const_iterator(__last._M_p, 0), __last, + iterator(__q, 0)); + } + + void + _M_initialize(size_type __n) + { + _Bit_type* __q = this->_M_allocate(__n); + this->_M_impl._M_end_of_storage = (__q + + ((__n + int(_S_word_bit) - 1) + / int(_S_word_bit))); + this->_M_impl._M_start = iterator(__q, 0); + this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n); + } + + + + + + template + void + _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) + { + _M_initialize(static_cast(__n)); + std::fill(this->_M_impl._M_start._M_p, + this->_M_impl._M_end_of_storage, __x ? ~0 : 0); + } + + template + void + _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { _M_initialize_range(__first, __last, + std::__iterator_category(__first)); } + + template + void + _M_initialize_range(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + for (; __first != __last; ++__first) + push_back(*__first); + } + + template + void + _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __n = std::distance(__first, __last); + _M_initialize(__n); + std::copy(__first, __last, this->_M_impl._M_start); + } + + + + template + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } + + template + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } + + void + _M_fill_assign(size_t __n, bool __x) + { + if (__n > size()) + { + std::fill(this->_M_impl._M_start._M_p, + this->_M_impl._M_end_of_storage, __x ? ~0 : 0); + insert(end(), __n - size(), __x); + } + else + { + _M_erase_at_end(begin() + __n); + std::fill(this->_M_impl._M_start._M_p, + this->_M_impl._M_end_of_storage, __x ? ~0 : 0); + } + } + + template + void + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + iterator __cur = begin(); + for (; __first != __last && __cur != end(); ++__cur, ++__first) + *__cur = *__first; + if (__first == __last) + _M_erase_at_end(__cur); + else + insert(end(), __first, __last); + } + + template + void + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __len = std::distance(__first, __last); + if (__len < size()) + _M_erase_at_end(std::copy(__first, __last, begin())); + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, size()); + std::copy(__first, __mid, begin()); + insert(end(), __mid, __last); + } + } + + + + + + template + void + _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, + __true_type) + { _M_fill_insert(__pos, __n, __x); } + + template + void + _M_insert_dispatch(iterator __pos, + _InputIterator __first, _InputIterator __last, + __false_type) + { _M_insert_range(__pos, __first, __last, + std::__iterator_category(__first)); } + + void + _M_fill_insert(iterator __position, size_type __n, bool __x); + + template + void + _M_insert_range(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag) + { + for (; __first != __last; ++__first) + { + __pos = insert(__pos, *__first); + ++__pos; + } + } + + template + void + _M_insert_range(iterator __position, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag); + + void + _M_insert_aux(iterator __position, bool __x); + + size_type + _M_check_len(size_type __n, const char* __s) const + { + if (max_size() - size() < __n) + __throw_length_error((__s)); + + const size_type __len = size() + std::max(size(), __n); + return (__len < size() || __len > max_size()) ? max_size() : __len; + } + + void + _M_erase_at_end(iterator __pos) + { this->_M_impl._M_finish = __pos; } + }; + +} +# 67 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/vector" 2 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/vector.tcc" 1 3 +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/vector.tcc" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + void + vector<_Tp, _Alloc>:: + reserve(size_type __n) + { + if (__n > this->max_size()) + __throw_length_error(("vector::reserve")); + if (this->capacity() < __n) + { + const size_type __old_size = size(); + pointer __tmp = _M_allocate_and_copy(__n, + (this->_M_impl._M_start), + (this->_M_impl._M_finish)); + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __tmp; + this->_M_impl._M_finish = __tmp + __old_size; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + } + } +# 104 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/vector.tcc" 3 + template + typename vector<_Tp, _Alloc>::iterator + vector<_Tp, _Alloc>:: + insert(iterator __position, const value_type& __x) + { + const size_type __n = __position - begin(); + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage + && __position == end()) + { + this->_M_impl.construct(this->_M_impl._M_finish, __x); + ++this->_M_impl._M_finish; + } + else + { +# 126 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/vector.tcc" 3 + _M_insert_aux(__position, __x); + } + return iterator(this->_M_impl._M_start + __n); + } + + template + typename vector<_Tp, _Alloc>::iterator + vector<_Tp, _Alloc>:: + erase(iterator __position) + { + if (__position + 1 != end()) + std::copy(__position + 1, end(), __position); + --this->_M_impl._M_finish; + this->_M_impl.destroy(this->_M_impl._M_finish); + return __position; + } + + template + typename vector<_Tp, _Alloc>::iterator + vector<_Tp, _Alloc>:: + erase(iterator __first, iterator __last) + { + if (__last != end()) + std::copy(__last, end(), __first); + _M_erase_at_end(__first.base() + (end() - __last)); + return __first; + } + + template + vector<_Tp, _Alloc>& + vector<_Tp, _Alloc>:: + operator=(const vector<_Tp, _Alloc>& __x) + { + if (&__x != this) + { + const size_type __xlen = __x.size(); + if (__xlen > capacity()) + { + pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(), + __x.end()); + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __tmp; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen; + } + else if (size() >= __xlen) + { + std::_Destroy(std::copy(__x.begin(), __x.end(), begin()), + end(), _M_get_Tp_allocator()); + } + else + { + std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(), + this->_M_impl._M_start); + std::__uninitialized_copy_a(__x._M_impl._M_start + size(), + __x._M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + } + this->_M_impl._M_finish = this->_M_impl._M_start + __xlen; + } + return *this; + } + + template + void + vector<_Tp, _Alloc>:: + _M_fill_assign(size_t __n, const value_type& __val) + { + if (__n > capacity()) + { + vector __tmp(__n, __val, _M_get_Tp_allocator()); + __tmp.swap(*this); + } + else if (__n > size()) + { + std::fill(begin(), end(), __val); + std::__uninitialized_fill_n_a(this->_M_impl._M_finish, + __n - size(), __val, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n - size(); + } + else + _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val)); + } + + template + template + void + vector<_Tp, _Alloc>:: + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + pointer __cur(this->_M_impl._M_start); + for (; __first != __last && __cur != this->_M_impl._M_finish; + ++__cur, ++__first) + *__cur = *__first; + if (__first == __last) + _M_erase_at_end(__cur); + else + insert(end(), __first, __last); + } + + template + template + void + vector<_Tp, _Alloc>:: + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __len = std::distance(__first, __last); + + if (__len > capacity()) + { + pointer __tmp(_M_allocate_and_copy(__len, __first, __last)); + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __tmp; + this->_M_impl._M_finish = this->_M_impl._M_start + __len; + this->_M_impl._M_end_of_storage = this->_M_impl._M_finish; + } + else if (size() >= __len) + _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start)); + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, size()); + std::copy(__first, __mid, this->_M_impl._M_start); + this->_M_impl._M_finish = + std::__uninitialized_copy_a(__mid, __last, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + } + } +# 293 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/vector.tcc" 3 + template + void + vector<_Tp, _Alloc>:: + _M_insert_aux(iterator __position, const _Tp& __x) + + { + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + { + this->_M_impl.construct(this->_M_impl._M_finish, + (*(this->_M_impl._M_finish - 1)) + ); + ++this->_M_impl._M_finish; + + _Tp __x_copy = __x; + + std::copy_backward(__position.base(), this->_M_impl._M_finish - 2, this->_M_impl._M_finish - 1) + + ; + + *__position = __x_copy; + + + + } + else + { + const size_type __len = + _M_check_len(size_type(1), "vector::_M_insert_aux"); + const size_type __elems_before = __position - begin(); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + try + { + + + + + this->_M_impl.construct(__new_start + __elems_before, + + + + __x); + + __new_finish = 0; + + __new_finish = + std::__uninitialized_move_a(this->_M_impl._M_start, + __position.base(), __new_start, + _M_get_Tp_allocator()); + ++__new_finish; + + __new_finish = + std::__uninitialized_move_a(__position.base(), + this->_M_impl._M_finish, + __new_finish, + _M_get_Tp_allocator()); + } + catch(...) + { + if (!__new_finish) + this->_M_impl.destroy(__new_start + __elems_before); + else + std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + } + + template + void + vector<_Tp, _Alloc>:: + _M_fill_insert(iterator __position, size_type __n, const value_type& __x) + { + if (__n != 0) + { + if (size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_finish) >= __n) + { + value_type __x_copy = __x; + const size_type __elems_after = end() - __position; + pointer __old_finish(this->_M_impl._M_finish); + if (__elems_after > __n) + { + std::__uninitialized_move_a(this->_M_impl._M_finish - __n, + this->_M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n; + std::copy_backward(__position.base(), __old_finish - __n, __old_finish) + ; + std::fill(__position.base(), __position.base() + __n, + __x_copy); + } + else + { + std::__uninitialized_fill_n_a(this->_M_impl._M_finish, + __n - __elems_after, + __x_copy, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n - __elems_after; + std::__uninitialized_move_a(__position.base(), __old_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __elems_after; + std::fill(__position.base(), __old_finish, __x_copy); + } + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_fill_insert"); + const size_type __elems_before = __position - begin(); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + try + { + + std::__uninitialized_fill_n_a(__new_start + __elems_before, + __n, __x, + _M_get_Tp_allocator()); + __new_finish = 0; + + __new_finish = + std::__uninitialized_move_a(this->_M_impl._M_start, + __position.base(), + __new_start, + _M_get_Tp_allocator()); + __new_finish += __n; + + __new_finish = + std::__uninitialized_move_a(__position.base(), + this->_M_impl._M_finish, + __new_finish, + _M_get_Tp_allocator()); + } + catch(...) + { + if (!__new_finish) + std::_Destroy(__new_start + __elems_before, + __new_start + __elems_before + __n, + _M_get_Tp_allocator()); + else + std::_Destroy(__new_start, __new_finish, + _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + } + } + + template + template + void + vector<_Tp, _Alloc>:: + _M_range_insert(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag) + { + for (; __first != __last; ++__first) + { + __pos = insert(__pos, *__first); + ++__pos; + } + } + + template + template + void + vector<_Tp, _Alloc>:: + _M_range_insert(iterator __position, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag) + { + if (__first != __last) + { + const size_type __n = std::distance(__first, __last); + if (size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_finish) >= __n) + { + const size_type __elems_after = end() - __position; + pointer __old_finish(this->_M_impl._M_finish); + if (__elems_after > __n) + { + std::__uninitialized_move_a(this->_M_impl._M_finish - __n, + this->_M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n; + std::copy_backward(__position.base(), __old_finish - __n, __old_finish) + ; + std::copy(__first, __last, __position); + } + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, __elems_after); + std::__uninitialized_copy_a(__mid, __last, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n - __elems_after; + std::__uninitialized_move_a(__position.base(), + __old_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __elems_after; + std::copy(__first, __mid, __position); + } + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_range_insert"); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + try + { + __new_finish = + std::__uninitialized_move_a(this->_M_impl._M_start, + __position.base(), + __new_start, + _M_get_Tp_allocator()); + __new_finish = + std::__uninitialized_copy_a(__first, __last, + __new_finish, + _M_get_Tp_allocator()); + __new_finish = + std::__uninitialized_move_a(__position.base(), + this->_M_impl._M_finish, + __new_finish, + _M_get_Tp_allocator()); + } + catch(...) + { + std::_Destroy(__new_start, __new_finish, + _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + } + } + + + + + template + void + vector:: + reserve(size_type __n) + { + if (__n > this->max_size()) + __throw_length_error(("vector::reserve")); + if (this->capacity() < __n) + { + _Bit_type* __q = this->_M_allocate(__n); + this->_M_impl._M_finish = _M_copy_aligned(begin(), end(), + iterator(__q, 0)); + this->_M_deallocate(); + this->_M_impl._M_start = iterator(__q, 0); + this->_M_impl._M_end_of_storage = (__q + (__n + int(_S_word_bit) - 1) + / int(_S_word_bit)); + } + } + + template + void + vector:: + _M_fill_insert(iterator __position, size_type __n, bool __x) + { + if (__n == 0) + return; + if (capacity() - size() >= __n) + { + std::copy_backward(__position, end(), + this->_M_impl._M_finish + difference_type(__n)); + std::fill(__position, __position + difference_type(__n), __x); + this->_M_impl._M_finish += difference_type(__n); + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_fill_insert"); + _Bit_type * __q = this->_M_allocate(__len); + iterator __i = _M_copy_aligned(begin(), __position, + iterator(__q, 0)); + std::fill(__i, __i + difference_type(__n), __x); + this->_M_impl._M_finish = std::copy(__position, end(), + __i + difference_type(__n)); + this->_M_deallocate(); + this->_M_impl._M_end_of_storage = (__q + ((__len + + int(_S_word_bit) - 1) + / int(_S_word_bit))); + this->_M_impl._M_start = iterator(__q, 0); + } + } + + template + template + void + vector:: + _M_insert_range(iterator __position, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag) + { + if (__first != __last) + { + size_type __n = std::distance(__first, __last); + if (capacity() - size() >= __n) + { + std::copy_backward(__position, end(), + this->_M_impl._M_finish + + difference_type(__n)); + std::copy(__first, __last, __position); + this->_M_impl._M_finish += difference_type(__n); + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_insert_range"); + _Bit_type * __q = this->_M_allocate(__len); + iterator __i = _M_copy_aligned(begin(), __position, + iterator(__q, 0)); + __i = std::copy(__first, __last, __i); + this->_M_impl._M_finish = std::copy(__position, end(), __i); + this->_M_deallocate(); + this->_M_impl._M_end_of_storage = (__q + + ((__len + + int(_S_word_bit) - 1) + / int(_S_word_bit))); + this->_M_impl._M_start = iterator(__q, 0); + } + } + } + + template + void + vector:: + _M_insert_aux(iterator __position, bool __x) + { + if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage) + { + std::copy_backward(__position, this->_M_impl._M_finish, + this->_M_impl._M_finish + 1); + *__position = __x; + ++this->_M_impl._M_finish; + } + else + { + const size_type __len = + _M_check_len(size_type(1), "vector::_M_insert_aux"); + _Bit_type * __q = this->_M_allocate(__len); + iterator __i = _M_copy_aligned(begin(), __position, + iterator(__q, 0)); + *__i++ = __x; + this->_M_impl._M_finish = std::copy(__position, end(), __i); + this->_M_deallocate(); + this->_M_impl._M_end_of_storage = (__q + ((__len + + int(_S_word_bit) - 1) + / int(_S_word_bit))); + this->_M_impl._M_start = iterator(__q, 0); + } + } + +} +# 70 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/vector" 2 3 +# 53 "/usr/include/qt4/QtCore/qvector.h" 2 + +# 1 "/usr/include/stdlib.h" 1 3 4 +# 33 "/usr/include/stdlib.h" 3 4 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 34 "/usr/include/stdlib.h" 2 3 4 + +extern "C" { + + + + + + +# 1 "/usr/include/bits/waitflags.h" 1 3 4 +# 43 "/usr/include/stdlib.h" 2 3 4 +# 1 "/usr/include/bits/waitstatus.h" 1 3 4 +# 67 "/usr/include/bits/waitstatus.h" 3 4 +union wait + { + int w_status; + struct + { + + unsigned int __w_termsig:7; + unsigned int __w_coredump:1; + unsigned int __w_retcode:8; + unsigned int:16; + + + + + + + + } __wait_terminated; + struct + { + + unsigned int __w_stopval:8; + unsigned int __w_stopsig:8; + unsigned int:16; + + + + + + + } __wait_stopped; + }; +# 44 "/usr/include/stdlib.h" 2 3 4 +# 96 "/usr/include/stdlib.h" 3 4 + + +typedef struct + { + int quot; + int rem; + } div_t; + + + +typedef struct + { + long int quot; + long int rem; + } ldiv_t; + + + + + + + +__extension__ typedef struct + { + long long int quot; + long long int rem; + } lldiv_t; + + +# 140 "/usr/include/stdlib.h" 3 4 +extern size_t __ctype_get_mb_cur_max (void) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern double atof (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern int atoi (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern long int atol (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +__extension__ extern long long int atoll (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern double strtod (__const char *__restrict __nptr, + char **__restrict __endptr) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern float strtof (__const char *__restrict __nptr, + char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern long double strtold (__const char *__restrict __nptr, + char **__restrict __endptr) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern long int strtol (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern unsigned long int strtoul (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +__extension__ +extern long long int strtoq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtouq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +__extension__ +extern long long int strtoll (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtoull (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +# 240 "/usr/include/stdlib.h" 3 4 +extern long int strtol_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +extern unsigned long int strtoul_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern long long int strtoll_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtoull_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +extern double strtod_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + +extern float strtof_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + +extern long double strtold_l (__const char *__restrict __nptr, + char **__restrict __endptr, + __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + + + + + +extern __inline __attribute__ ((__gnu_inline__)) double +atof (__const char *__nptr) throw () +{ + return strtod (__nptr, (char **) __null); +} +extern __inline __attribute__ ((__gnu_inline__)) int +atoi (__const char *__nptr) throw () +{ + return (int) strtol (__nptr, (char **) __null, 10); +} +extern __inline __attribute__ ((__gnu_inline__)) long int +atol (__const char *__nptr) throw () +{ + return strtol (__nptr, (char **) __null, 10); +} + + + + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int +atoll (__const char *__nptr) throw () +{ + return strtoll (__nptr, (char **) __null, 10); +} + +# 311 "/usr/include/stdlib.h" 3 4 +extern char *l64a (long int __n) throw () __attribute__ ((__warn_unused_result__)); + + +extern long int a64l (__const char *__s) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +# 1 "/usr/include/sys/types.h" 1 3 4 +# 29 "/usr/include/sys/types.h" 3 4 +extern "C" { + + + + + +typedef __u_char u_char; +typedef __u_short u_short; +typedef __u_int u_int; +typedef __u_long u_long; +typedef __quad_t quad_t; +typedef __u_quad_t u_quad_t; +typedef __fsid_t fsid_t; + + + + +typedef __loff_t loff_t; + + + +typedef __ino_t ino_t; + + + + + + +typedef __ino64_t ino64_t; + + + + +typedef __dev_t dev_t; +# 72 "/usr/include/sys/types.h" 3 4 +typedef __mode_t mode_t; + + + + +typedef __nlink_t nlink_t; +# 105 "/usr/include/sys/types.h" 3 4 +typedef __id_t id_t; +# 116 "/usr/include/sys/types.h" 3 4 +typedef __daddr_t daddr_t; +typedef __caddr_t caddr_t; + + + + + +typedef __key_t key_t; +# 141 "/usr/include/sys/types.h" 3 4 +typedef __suseconds_t suseconds_t; + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 148 "/usr/include/sys/types.h" 2 3 4 + + + +typedef unsigned long int ulong; +typedef unsigned short int ushort; +typedef unsigned int uint; +# 195 "/usr/include/sys/types.h" 3 4 +typedef int int8_t __attribute__ ((__mode__ (__QI__))); +typedef int int16_t __attribute__ ((__mode__ (__HI__))); +typedef int int32_t __attribute__ ((__mode__ (__SI__))); +typedef int int64_t __attribute__ ((__mode__ (__DI__))); + + +typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); +typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); + +typedef int register_t __attribute__ ((__mode__ (__word__))); +# 220 "/usr/include/sys/types.h" 3 4 +# 1 "/usr/include/sys/select.h" 1 3 4 +# 31 "/usr/include/sys/select.h" 3 4 +# 1 "/usr/include/bits/select.h" 1 3 4 +# 23 "/usr/include/bits/select.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 24 "/usr/include/bits/select.h" 2 3 4 +# 32 "/usr/include/sys/select.h" 2 3 4 + + +# 1 "/usr/include/bits/sigset.h" 1 3 4 +# 35 "/usr/include/sys/select.h" 2 3 4 +# 46 "/usr/include/sys/select.h" 3 4 +# 1 "/usr/include/bits/time.h" 1 3 4 +# 69 "/usr/include/bits/time.h" 3 4 +struct timeval + { + __time_t tv_sec; + __suseconds_t tv_usec; + }; +# 47 "/usr/include/sys/select.h" 2 3 4 +# 55 "/usr/include/sys/select.h" 3 4 +typedef long int __fd_mask; +# 67 "/usr/include/sys/select.h" 3 4 +typedef struct + { + + + + __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; + + + + + + } fd_set; + + + + + + +typedef __fd_mask fd_mask; +# 99 "/usr/include/sys/select.h" 3 4 +extern "C" { +# 109 "/usr/include/sys/select.h" 3 4 +extern int select (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + struct timeval *__restrict __timeout); +# 121 "/usr/include/sys/select.h" 3 4 +extern int pselect (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + const struct timespec *__restrict __timeout, + const __sigset_t *__restrict __sigmask); + + +} +# 221 "/usr/include/sys/types.h" 2 3 4 + + +# 1 "/usr/include/sys/sysmacros.h" 1 3 4 +# 30 "/usr/include/sys/sysmacros.h" 3 4 +__extension__ +extern unsigned int gnu_dev_major (unsigned long long int __dev) + throw (); +__extension__ +extern unsigned int gnu_dev_minor (unsigned long long int __dev) + throw (); +__extension__ +extern unsigned long long int gnu_dev_makedev (unsigned int __major, + unsigned int __minor) + throw (); + + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int +gnu_dev_major (unsigned long long int __dev) throw () +{ + return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); +} + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int +gnu_dev_minor (unsigned long long int __dev) throw () +{ + return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); +} + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned long long int +gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw () +{ + return ((__minor & 0xff) | ((__major & 0xfff) << 8) + | (((unsigned long long int) (__minor & ~0xff)) << 12) + | (((unsigned long long int) (__major & ~0xfff)) << 32)); +} +# 224 "/usr/include/sys/types.h" 2 3 4 + + + + +typedef __blksize_t blksize_t; + + + + + + +typedef __blkcnt_t blkcnt_t; + + + +typedef __fsblkcnt_t fsblkcnt_t; + + + +typedef __fsfilcnt_t fsfilcnt_t; +# 262 "/usr/include/sys/types.h" 3 4 +typedef __blkcnt64_t blkcnt64_t; +typedef __fsblkcnt64_t fsblkcnt64_t; +typedef __fsfilcnt64_t fsfilcnt64_t; +# 273 "/usr/include/sys/types.h" 3 4 +} +# 321 "/usr/include/stdlib.h" 2 3 4 + + + + + + +extern long int random (void) throw (); + + +extern void srandom (unsigned int __seed) throw (); + + + + + +extern char *initstate (unsigned int __seed, char *__statebuf, + size_t __statelen) throw () __attribute__ ((__nonnull__ (2))); + + + +extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1))); + + + + + + + +struct random_data + { + int32_t *fptr; + int32_t *rptr; + int32_t *state; + int rand_type; + int rand_deg; + int rand_sep; + int32_t *end_ptr; + }; + +extern int random_r (struct random_data *__restrict __buf, + int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); + +extern int srandom_r (unsigned int __seed, struct random_data *__buf) + throw () __attribute__ ((__nonnull__ (2))); + +extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, + size_t __statelen, + struct random_data *__restrict __buf) + throw () __attribute__ ((__nonnull__ (2, 4))); + +extern int setstate_r (char *__restrict __statebuf, + struct random_data *__restrict __buf) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern int rand (void) throw (); + +extern void srand (unsigned int __seed) throw (); + + + + +extern int rand_r (unsigned int *__seed) throw (); + + + + + + + +extern double drand48 (void) throw (); +extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); + + +extern long int lrand48 (void) throw (); +extern long int nrand48 (unsigned short int __xsubi[3]) + throw () __attribute__ ((__nonnull__ (1))); + + +extern long int mrand48 (void) throw (); +extern long int jrand48 (unsigned short int __xsubi[3]) + throw () __attribute__ ((__nonnull__ (1))); + + +extern void srand48 (long int __seedval) throw (); +extern unsigned short int *seed48 (unsigned short int __seed16v[3]) + throw () __attribute__ ((__nonnull__ (1))); +extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1))); + + + + + +struct drand48_data + { + unsigned short int __x[3]; + unsigned short int __old_x[3]; + unsigned short int __c; + unsigned short int __init; + unsigned long long int __a; + }; + + +extern int drand48_r (struct drand48_data *__restrict __buffer, + double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int erand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int lrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int nrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int mrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int jrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int srand48_r (long int __seedval, struct drand48_data *__buffer) + throw () __attribute__ ((__nonnull__ (2))); + +extern int seed48_r (unsigned short int __seed16v[3], + struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); + +extern int lcong48_r (unsigned short int __param[7], + struct drand48_data *__buffer) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + + + + + +extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + +extern void *calloc (size_t __nmemb, size_t __size) + throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + + + + + + + +extern void *realloc (void *__ptr, size_t __size) + throw () __attribute__ ((__warn_unused_result__)); + +extern void free (void *__ptr) throw (); + + + + +extern void cfree (void *__ptr) throw (); + + + +# 1 "/usr/include/alloca.h" 1 3 4 +# 25 "/usr/include/alloca.h" 3 4 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 26 "/usr/include/alloca.h" 2 3 4 + +extern "C" { + + + + + +extern void *alloca (size_t __size) throw (); + + + + + +} +# 498 "/usr/include/stdlib.h" 2 3 4 + + + + +extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + +extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +extern void abort (void) throw () __attribute__ ((__noreturn__)); + + + +extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern "C++" int at_quick_exit (void (*__func) (void)) + throw () __asm ("at_quick_exit") __attribute__ ((__nonnull__ (1))); + + + + + + + + + +extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) + throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern void exit (int __status) throw () __attribute__ ((__noreturn__)); + + + + + + + +extern void quick_exit (int __status) throw () __attribute__ ((__noreturn__)); + + + + + + + +extern void _Exit (int __status) throw () __attribute__ ((__noreturn__)); + + + + + + +extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *__secure_getenv (__const char *__name) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1))); + + + + + +extern int setenv (__const char *__name, __const char *__value, int __replace) + throw () __attribute__ ((__nonnull__ (2))); + + +extern int unsetenv (__const char *__name) throw (); + + + + + + +extern int clearenv (void) throw (); +# 604 "/usr/include/stdlib.h" 3 4 +extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 615 "/usr/include/stdlib.h" 3 4 +extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 625 "/usr/include/stdlib.h" 3 4 +extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 637 "/usr/include/stdlib.h" 3 4 +extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 647 "/usr/include/stdlib.h" 3 4 +extern int mkstemps64 (char *__template, int __suffixlen) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 658 "/usr/include/stdlib.h" 3 4 +extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 669 "/usr/include/stdlib.h" 3 4 +extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 679 "/usr/include/stdlib.h" 3 4 +extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 689 "/usr/include/stdlib.h" 3 4 +extern int mkostemps (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 701 "/usr/include/stdlib.h" 3 4 +extern int mkostemps64 (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + + + + + +extern int system (__const char *__command) __attribute__ ((__warn_unused_result__)); + + + + + + +extern char *canonicalize_file_name (__const char *__name) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 729 "/usr/include/stdlib.h" 3 4 +extern char *realpath (__const char *__restrict __name, + char *__restrict __resolved) throw () __attribute__ ((__warn_unused_result__)); + + + + + + +typedef int (*__compar_fn_t) (__const void *, __const void *); + + +typedef __compar_fn_t comparison_fn_t; + + + +typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *); + + + + + +extern void *bsearch (__const void *__key, __const void *__base, + size_t __nmemb, size_t __size, __compar_fn_t __compar) + __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__)); + + + +extern void qsort (void *__base, size_t __nmemb, size_t __size, + __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); + +extern void qsort_r (void *__base, size_t __nmemb, size_t __size, + __compar_d_fn_t __compar, void *__arg) + __attribute__ ((__nonnull__ (1, 4))); + + + + +extern int abs (int __x) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern long int labs (long int __x) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + +__extension__ extern long long int llabs (long long int __x) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern div_t div (int __numer, int __denom) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern ldiv_t ldiv (long int __numer, long int __denom) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + + +__extension__ extern lldiv_t lldiv (long long int __numer, + long long int __denom) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + +# 802 "/usr/include/stdlib.h" 3 4 +extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *gcvt (double __value, int __ndigit, char *__buf) + throw () __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *qecvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qfcvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qgcvt (long double __value, int __ndigit, char *__buf) + throw () __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); + + + + +extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); +extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); + +extern int qecvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (3, 4, 5))); +extern int qfcvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (3, 4, 5))); + + + + + + + +extern int mblen (__const char *__s, size_t __n) throw () __attribute__ ((__warn_unused_result__)); + + +extern int mbtowc (wchar_t *__restrict __pwc, + __const char *__restrict __s, size_t __n) throw () __attribute__ ((__warn_unused_result__)); + + +extern int wctomb (char *__s, wchar_t __wchar) throw () __attribute__ ((__warn_unused_result__)); + + + +extern size_t mbstowcs (wchar_t *__restrict __pwcs, + __const char *__restrict __s, size_t __n) throw (); + +extern size_t wcstombs (char *__restrict __s, + __const wchar_t *__restrict __pwcs, size_t __n) + throw (); + + + + + + + + +extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 890 "/usr/include/stdlib.h" 3 4 +extern int getsubopt (char **__restrict __optionp, + char *__const *__restrict __tokens, + char **__restrict __valuep) + throw () __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__)); + + + + + +extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern int grantpt (int __fd) throw (); + + + +extern int unlockpt (int __fd) throw (); + + + + +extern char *ptsname (int __fd) throw () __attribute__ ((__warn_unused_result__)); + + + + + + +extern int ptsname_r (int __fd, char *__buf, size_t __buflen) + throw () __attribute__ ((__nonnull__ (2))); + + +extern int getpt (void); + + + + + + +extern int getloadavg (double __loadavg[], int __nelem) + throw () __attribute__ ((__nonnull__ (1))); + + + + + +# 1 "/usr/include/bits/stdlib.h" 1 3 4 +# 24 "/usr/include/bits/stdlib.h" 3 4 +extern char *__realpath_chk (__const char *__restrict __name, + char *__restrict __resolved, + size_t __resolvedlen) throw () __attribute__ ((__warn_unused_result__)); +extern char *__realpath_alias (__const char *__restrict __name, char *__restrict __resolved) throw () __asm__ ("" "realpath") + + __attribute__ ((__warn_unused_result__)); +extern char *__realpath_chk_warn (__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) throw () __asm__ ("" "__realpath_chk") + + + __attribute__ ((__warn_unused_result__)) + __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +realpath (__const char *__restrict __name, char *__restrict __resolved) throw () +{ + if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1) + { + + + + + return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); + } + + return __realpath_alias (__name, __resolved); +} + + +extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, + size_t __nreal) throw () __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) throw () __asm__ ("" "ptsname_r") + + __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__ptsname_r_chk") + + + __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +ptsname_r (int __fd, char *__buf, size_t __buflen) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __ptsname_r_alias (__fd, __buf, __buflen); +} + + +extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) + throw () __attribute__ ((__warn_unused_result__)); +extern int __wctomb_alias (char *__s, wchar_t __wchar) throw () __asm__ ("" "wctomb") + __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) int +wctomb (char *__s, wchar_t __wchar) throw () +{ + + + + + + + + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) + return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1)); + return __wctomb_alias (__s, __wchar); +} + + +extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, + __const char *__restrict __src, + size_t __len, size_t __dstlen) throw (); +extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) throw () __asm__ ("" "mbstowcs") + + + ; +extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) throw () __asm__ ("" "__mbstowcs_chk") + + + + __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +mbstowcs (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) throw () + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __mbstowcs_chk (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + + if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) + return __mbstowcs_chk_warn (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + } + return __mbstowcs_alias (__dst, __src, __len); +} + + +extern size_t __wcstombs_chk (char *__restrict __dst, + __const wchar_t *__restrict __src, + size_t __len, size_t __dstlen) throw (); +extern size_t __wcstombs_alias (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) throw () __asm__ ("" "wcstombs") + + + ; +extern size_t __wcstombs_chk_warn (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) throw () __asm__ ("" "__wcstombs_chk") + + + + __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len"))); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +wcstombs (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) throw () + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + if (__len > __builtin_object_size (__dst, 2 > 1)) + return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + } + return __wcstombs_alias (__dst, __src, __len); +} +# 950 "/usr/include/stdlib.h" 2 3 4 +# 958 "/usr/include/stdlib.h" 3 4 +} +# 55 "/usr/include/qt4/QtCore/qvector.h" 2 + + + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +struct QVectorData +{ + QBasicAtomicInt ref; + int alloc; + int size; + + + + + + + uint sharable : 1; + uint capacity : 1; + uint reserved : 30; + + + static QVectorData shared_null; + + + + static QVectorData *malloc(int sizeofTypedData, int size, int sizeofT, QVectorData *init); + static QVectorData *allocate(int size, int alignment); + static QVectorData *reallocate(QVectorData *old, int newsize, int oldsize, int alignment); + static void free(QVectorData *data, int alignment); + static int grow(int sizeofTypedData, int size, int sizeofT, bool excessive); +}; + +template +struct QVectorTypedData : private QVectorData +{ + + T array[1]; + + static inline void free(QVectorTypedData *x, int alignment) { QVectorData::free(static_cast(x), alignment); } +}; + +class QRegion; + +template +class QVector +{ + typedef QVectorTypedData Data; + union { + QVectorData *d; + + + + Data *p; + + }; + +public: + inline QVector() : d(&QVectorData::shared_null) { d->ref.ref(); } + explicit QVector(int size); + QVector(int size, const T &t); + inline QVector(const QVector &v) : d(v.d) { d->ref.ref(); if (!d->sharable) detach_helper(); } + inline ~QVector() { if (!d) return; if (!d->ref.deref()) free(p); } + QVector &operator=(const QVector &v); + bool operator==(const QVector &v) const; + inline bool operator!=(const QVector &v) const { return !(*this == v); } + + inline int size() const { return d->size; } + + inline bool isEmpty() const { return d->size == 0; } + + void resize(int size); + + inline int capacity() const { return d->alloc; } + void reserve(int size); + inline void squeeze() { realloc(d->size, d->size); d->capacity = 0; } + + inline void detach() { if (d->ref != 1) detach_helper(); } + inline bool isDetached() const { return d->ref == 1; } + inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; } + + inline T *data() { detach(); return p->array; } + inline const T *data() const { return p->array; } + inline const T *constData() const { return p->array; } + void clear(); + + const T &at(int i) const; + T &operator[](int i); + const T &operator[](int i) const; + void append(const T &t); + void prepend(const T &t); + void insert(int i, const T &t); + void insert(int i, int n, const T &t); + void replace(int i, const T &t); + void remove(int i); + void remove(int i, int n); + + QVector &fill(const T &t, int size = -1); + + int indexOf(const T &t, int from = 0) const; + int lastIndexOf(const T &t, int from = -1) const; + bool contains(const T &t) const; + int count(const T &t) const; +# 230 "/usr/include/qt4/QtCore/qvector.h" + typedef T* iterator; + typedef const T* const_iterator; + + inline iterator begin() { detach(); return p->array; } + inline const_iterator begin() const { return p->array; } + inline const_iterator constBegin() const { return p->array; } + inline iterator end() { detach(); return p->array + d->size; } + inline const_iterator end() const { return p->array + d->size; } + inline const_iterator constEnd() const { return p->array + d->size; } + iterator insert(iterator before, int n, const T &x); + inline iterator insert(iterator before, const T &x) { return insert(before, 1, x); } + iterator erase(iterator begin, iterator end); + inline iterator erase(iterator pos) { return erase(pos, pos+1); } + + + inline int count() const { return d->size; } + inline T& first() { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qvector.h",246) : qt_noop()); return *begin(); } + inline const T &first() const { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qvector.h",247) : qt_noop()); return *begin(); } + inline T& last() { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qvector.h",248) : qt_noop()); return *(end()-1); } + inline const T &last() const { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qvector.h",249) : qt_noop()); return *(end()-1); } + inline bool startsWith(const T &t) const { return !isEmpty() && first() == t; } + inline bool endsWith(const T &t) const { return !isEmpty() && last() == t; } + QVector mid(int pos, int length = -1) const; + + T value(int i) const; + T value(int i, const T &defaultValue) const; + + + typedef T value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef ptrdiff_t difference_type; + typedef iterator Iterator; + typedef const_iterator ConstIterator; + typedef int size_type; + inline void push_back(const T &t) { append(t); } + inline void push_front(const T &t) { prepend(t); } + void pop_back() { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qvector.h",269) : qt_noop()); erase(end()-1); } + void pop_front() { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qvector.h",270) : qt_noop()); erase(begin()); } + inline bool empty() const + { return d->size == 0; } + inline T& front() { return first(); } + inline const_reference front() const { return first(); } + inline reference back() { return last(); } + inline const_reference back() const { return last(); } + + + QVector &operator+=(const QVector &l); + inline QVector operator+(const QVector &l) const + { QVector n = *this; n += l; return n; } + inline QVector &operator+=(const T &t) + { append(t); return *this; } + inline QVector &operator<< (const T &t) + { append(t); return *this; } + inline QVector &operator<<(const QVector &l) + { *this += l; return *this; } + + QList toList() const; + + static QVector fromList(const QList &list); + + + static inline QVector fromStdVector(const std::vector &vector) + { QVector tmp; qCopy(vector.begin(), vector.end(), std::back_inserter(tmp)); return tmp; } + inline std::vector toStdVector() const + { std::vector tmp; qCopy(constBegin(), constEnd(), std::back_inserter(tmp)); return tmp; } + + +private: + friend class QRegion; + + void detach_helper(); + QVectorData *malloc(int alloc); + void realloc(int size, int alloc); + void free(Data *d); + int sizeOfTypedData() { + + + return reinterpret_cast(&(reinterpret_cast(this))->array[1]) - reinterpret_cast(this); + } + inline int alignOfTypedData() const + { + + return qMax(sizeof(void*), __alignof__(Data)); + + + + } +}; + +template +void QVector::detach_helper() +{ realloc(d->size, d->alloc); } +template +void QVector::reserve(int asize) +{ if (asize > d->alloc) realloc(d->size, asize); if (d->ref == 1) d->capacity = 1; } +template +void QVector::resize(int asize) +{ realloc(asize, (asize > d->alloc || (!d->capacity && asize < d->size && asize < (d->alloc >> 1))) ? + QVectorData::grow(sizeOfTypedData(), asize, sizeof(T), QTypeInfo::isStatic) + : d->alloc); } +template +inline void QVector::clear() +{ *this = QVector(); } +template +inline const T &QVector::at(int i) const +{ ((!(i >= 0 && i < d->size)) ? qt_assert_x("QVector::at", "index out of range","/usr/include/qt4/QtCore/qvector.h",338) : qt_noop()); + return p->array[i]; } +template +inline const T &QVector::operator[](int i) const +{ ((!(i >= 0 && i < d->size)) ? qt_assert_x("QVector::operator[]", "index out of range","/usr/include/qt4/QtCore/qvector.h",342) : qt_noop()); + return p->array[i]; } +template +inline T &QVector::operator[](int i) +{ ((!(i >= 0 && i < d->size)) ? qt_assert_x("QVector::operator[]", "index out of range","/usr/include/qt4/QtCore/qvector.h",346) : qt_noop()); + return data()[i]; } +template +inline void QVector::insert(int i, const T &t) +{ ((!(i >= 0 && i <= d->size)) ? qt_assert_x("QVector::insert", "index out of range","/usr/include/qt4/QtCore/qvector.h",350) : qt_noop()); + insert(begin() + i, 1, t); } +template +inline void QVector::insert(int i, int n, const T &t) +{ ((!(i >= 0 && i <= d->size)) ? qt_assert_x("QVector::insert", "index out of range","/usr/include/qt4/QtCore/qvector.h",354) : qt_noop()); + insert(begin() + i, n, t); } +template +inline void QVector::remove(int i, int n) +{ ((!(i >= 0 && n >= 0 && i + n <= d->size)) ? qt_assert_x("QVector::remove", "index out of range","/usr/include/qt4/QtCore/qvector.h",358) : qt_noop()); + erase(begin() + i, begin() + i + n); } +template +inline void QVector::remove(int i) +{ ((!(i >= 0 && i < d->size)) ? qt_assert_x("QVector::remove", "index out of range","/usr/include/qt4/QtCore/qvector.h",362) : qt_noop()); + erase(begin() + i, begin() + i + 1); } +template +inline void QVector::prepend(const T &t) +{ insert(begin(), 1, t); } + +template +inline void QVector::replace(int i, const T &t) +{ + ((!(i >= 0 && i < d->size)) ? qt_assert_x("QVector::replace", "index out of range","/usr/include/qt4/QtCore/qvector.h",371) : qt_noop()); + const T copy(t); + data()[i] = copy; +} + +template +QVector &QVector::operator=(const QVector &v) +{ + v.d->ref.ref(); + if (!d->ref.deref()) + free(p); + d = v.d; + if (!d->sharable) + detach_helper(); + return *this; +} + +template +inline QVectorData *QVector::malloc(int aalloc) +{ + QVectorData *vectordata = QVectorData::allocate(sizeOfTypedData() + (aalloc - 1) * sizeof(T), alignOfTypedData()); + do { if (!(vectordata)) qBadAlloc(); } while (0); + return vectordata; +} + +template +QVector::QVector(int asize) +{ + d = malloc(asize); + d->ref = 1; + d->alloc = d->size = asize; + d->sharable = true; + d->capacity = false; + if (QTypeInfo::isComplex) { + T* b = p->array; + T* i = p->array + d->size; + while (i != b) + new (--i) T; + } else { + qMemSet(p->array, 0, asize * sizeof(T)); + } +} + +template +QVector::QVector(int asize, const T &t) +{ + d = malloc(asize); + d->ref = 1; + d->alloc = d->size = asize; + d->sharable = true; + d->capacity = false; + T* i = p->array + d->size; + while (i != p->array) + new (--i) T(t); +} + +template +void QVector::free(Data *x) +{ + if (QTypeInfo::isComplex) { + T* b = x->array; + union { QVectorData *d; Data *p; } u; + u.p = x; + T* i = b + u.d->size; + while (i-- != b) + i->~T(); + } + x->free(x, alignOfTypedData()); +} + +template +void QVector::realloc(int asize, int aalloc) +{ + ((!(asize <= aalloc)) ? qt_assert("asize <= aalloc","/usr/include/qt4/QtCore/qvector.h",444) : qt_noop()); + T *pOld; + T *pNew; + union { QVectorData *d; Data *p; } x; + x.d = d; + + if (QTypeInfo::isComplex && asize < d->size && d->ref == 1 ) { + + + pOld = p->array + d->size; + pNew = p->array + asize; + while (asize < d->size) { + (--pOld)->~T(); + d->size--; + } + } + + if (aalloc != d->alloc || d->ref != 1) { + + if (QTypeInfo::isStatic) { + x.d = malloc(aalloc); + do { if (!(x.p)) qBadAlloc(); } while (0); + x.d->size = 0; + } else if (d->ref != 1) { + x.d = malloc(aalloc); + do { if (!(x.p)) qBadAlloc(); } while (0); + if (QTypeInfo::isComplex) { + x.d->size = 0; + } else { + ::memcpy(x.p, p, sizeOfTypedData() + (qMin(aalloc, d->alloc) - 1) * sizeof(T)); + x.d->size = d->size; + } + } else { + try { + QVectorData *mem = QVectorData::reallocate(d, sizeOfTypedData() + (aalloc - 1) * sizeof(T), + sizeOfTypedData() + (d->alloc - 1) * sizeof(T), alignOfTypedData()); + do { if (!(mem)) qBadAlloc(); } while (0); + x.d = d = mem; + x.d->size = d->size; + } catch (const std::bad_alloc &) { + if (aalloc > d->alloc) + throw; + } + } + x.d->ref = 1; + x.d->alloc = aalloc; + x.d->sharable = true; + x.d->capacity = d->capacity; + x.d->reserved = 0; + } + + if (QTypeInfo::isComplex) { + try { + pOld = p->array + x.d->size; + pNew = x.p->array + x.d->size; + + const int toMove = qMin(asize, d->size); + while (x.d->size < toMove) { + new (pNew++) T(*pOld++); + x.d->size++; + } + + while (x.d->size < asize) { + new (pNew++) T; + x.d->size++; + } + } catch (...) { + free(x.p); + throw; + } + + } else if (asize > x.d->size) { + + qMemSet(x.p->array + x.d->size, 0, (asize - x.d->size) * sizeof(T)); + } + x.d->size = asize; + + if (d != x.d) { + if (!d->ref.deref()) + free(p); + d = x.d; + } +} + +template + T QVector::value(int i) const +{ + if (i < 0 || i >= d->size) { + return T(); + } + return p->array[i]; +} +template + T QVector::value(int i, const T &defaultValue) const +{ + return ((i < 0 || i >= d->size) ? defaultValue : p->array[i]); +} + +template +void QVector::append(const T &t) +{ + if (d->ref != 1 || d->size + 1 > d->alloc) { + const T copy(t); + realloc(d->size, QVectorData::grow(sizeOfTypedData(), d->size + 1, sizeof(T), + QTypeInfo::isStatic)); + if (QTypeInfo::isComplex) + new (p->array + d->size) T(copy); + else + p->array[d->size] = copy; + } else { + if (QTypeInfo::isComplex) + new (p->array + d->size) T(t); + else + p->array[d->size] = t; + } + ++d->size; +} + +template +typename QVector::iterator QVector::insert(iterator before, size_type n, const T &t) +{ + int offset = int(before - p->array); + if (n != 0) { + const T copy(t); + if (d->ref != 1 || d->size + n > d->alloc) + realloc(d->size, QVectorData::grow(sizeOfTypedData(), d->size + n, sizeof(T), + QTypeInfo::isStatic)); + if (QTypeInfo::isStatic) { + T *b = p->array + d->size; + T *i = p->array + d->size + n; + while (i != b) + new (--i) T; + i = p->array + d->size; + T *j = i + n; + b = p->array + offset; + while (i != b) + *--j = *--i; + i = b+n; + while (i != b) + *--i = copy; + } else { + T *b = p->array + offset; + T *i = b + n; + memmove(i, b, (d->size - offset) * sizeof(T)); + while (i != b) + new (--i) T(copy); + } + d->size += n; + } + return p->array + offset; +} + +template +typename QVector::iterator QVector::erase(iterator abegin, iterator aend) +{ + int f = int(abegin - p->array); + int l = int(aend - p->array); + int n = l - f; + detach(); + if (QTypeInfo::isComplex) { + qCopy(p->array+l, p->array+d->size, p->array+f); + T *i = p->array+d->size; + T* b = p->array+d->size-n; + while (i != b) { + --i; + i->~T(); + } + } else { + memmove(p->array + f, p->array + l, (d->size-l)*sizeof(T)); + } + d->size -= n; + return p->array + f; +} + +template +bool QVector::operator==(const QVector &v) const +{ + if (d->size != v.d->size) + return false; + if (d == v.d) + return true; + T* b = p->array; + T* i = b + d->size; + T* j = v.p->array + d->size; + while (i != b) + if (!(*--i == *--j)) + return false; + return true; +} + +template +QVector &QVector::fill(const T &from, int asize) +{ + const T copy(from); + resize(asize < 0 ? d->size : asize); + if (d->size) { + T *i = p->array + d->size; + T *b = p->array; + while (i != b) + *--i = copy; + } + return *this; +} + +template +QVector &QVector::operator+=(const QVector &l) +{ + int newSize = d->size + l.d->size; + realloc(d->size, newSize); + + T *w = p->array + newSize; + T *i = l.p->array + l.d->size; + T *b = l.p->array; + while (i != b) { + if (QTypeInfo::isComplex) + new (--w) T(*--i); + else + *--w = *--i; + } + d->size = newSize; + return *this; +} + +template +int QVector::indexOf(const T &t, int from) const +{ + if (from < 0) + from = qMax(from + d->size, 0); + if (from < d->size) { + T* n = p->array + from - 1; + T* e = p->array + d->size; + while (++n != e) + if (*n == t) + return n - p->array; + } + return -1; +} + +template +int QVector::lastIndexOf(const T &t, int from) const +{ + if (from < 0) + from += d->size; + else if (from >= d->size) + from = d->size-1; + if (from >= 0) { + T* b = p->array; + T* n = p->array + from + 1; + while (n != b) { + if (*--n == t) + return n - b; + } + } + return -1; +} + +template +bool QVector::contains(const T &t) const +{ + T* b = p->array; + T* i = p->array + d->size; + while (i != b) + if (*--i == t) + return true; + return false; +} + +template +int QVector::count(const T &t) const +{ + int c = 0; + T* b = p->array; + T* i = p->array + d->size; + while (i != b) + if (*--i == t) + ++c; + return c; +} + +template + QVector QVector::mid(int pos, int length) const +{ + if (length < 0) + length = size() - pos; + if (pos == 0 && length == size()) + return *this; + QVector copy; + if (pos + length > size()) + length = size() - pos; + for (int i = pos; i < pos + length; ++i) + copy += at(i); + return copy; +} + +template + QList QVector::toList() const +{ + QList result; + for (int i = 0; i < size(); ++i) + result.append(at(i)); + return result; +} + +template + QVector QList::toVector() const +{ + QVector result(size()); + for (int i = 0; i < size(); ++i) + result[i] = at(i); + return result; +} + +template +QVector QVector::fromList(const QList &list) +{ + return list.toVector(); +} + +template +QList QList::fromVector(const QVector &vector) +{ + return vector.toList(); +} + +template class QVectorIterator { typedef typename QVector::const_iterator const_iterator; QVector c; const_iterator i; public: inline QVectorIterator(const QVector &container) : c(container), i(c.constBegin()) {} inline QVectorIterator &operator=(const QVector &container) { c = container; i = c.constBegin(); return *this; } inline void toFront() { i = c.constBegin(); } inline void toBack() { i = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline const T &next() { return *i++; } inline const T &peekNext() const { return *i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline const T &previous() { return *--i; } inline const T &peekPrevious() const { const_iterator p = i; return *--p; } inline bool findNext(const T &t) { while (i != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(--i) == t) return true; return false; } }; +template class QMutableVectorIterator { typedef typename QVector::iterator iterator; typedef typename QVector::const_iterator const_iterator; QVector *c; iterator i, n; inline bool item_exists() const { return const_iterator(n) != c->constEnd(); } public: inline QMutableVectorIterator(QVector &container) : c(&container) { c->setSharable(false); i = c->begin(); n = c->end(); } inline ~QMutableVectorIterator() { c->setSharable(true); } inline QMutableVectorIterator &operator=(QVector &container) { c->setSharable(true); c = &container; c->setSharable(false); i = c->begin(); n = c->end(); return *this; } inline void toFront() { i = c->begin(); n = c->end(); } inline void toBack() { i = c->end(); n = i; } inline bool hasNext() const { return c->constEnd() != const_iterator(i); } inline T &next() { n = i++; return *n; } inline T &peekNext() const { return *i; } inline bool hasPrevious() const { return c->constBegin() != const_iterator(i); } inline T &previous() { n = --i; return *n; } inline T &peekPrevious() const { iterator p = i; return *--p; } inline void remove() { if (c->constEnd() != const_iterator(n)) { i = c->erase(n); n = c->end(); } } inline void setValue(const T &t) const { if (c->constEnd() != const_iterator(n)) *n = t; } inline T &value() { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qvector.h",769) : qt_noop()); return *n; } inline const T &value() const { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qvector.h",769) : qt_noop()); return *n; } inline void insert(const T &t) { n = i = c->insert(i, t); ++i; } inline bool findNext(const T &t) { while (c->constEnd() != const_iterator(n = i)) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (c->constBegin() != const_iterator(i)) if (*(n = --i) == t) return true; n = c->end(); return false; } }; +# 796 "/usr/include/qt4/QtCore/qvector.h" + + + +# 46 "/usr/include/qt4/QtGui/qpolygon.h" 2 + + + + + + + +typedef QtValidLicenseForGuiModule QtGuiModule; + +class QMatrix; +class QTransform; +class QRect; +class QVariant; + +class QPolygon : public QVector +{ +public: + inline QPolygon() {} + inline ~QPolygon() {} + inline QPolygon(int size); + inline QPolygon(const QPolygon &a) : QVector(a) {} + inline QPolygon(const QVector &v) : QVector(v) {} + QPolygon(const QRect &r, bool closed=false); + QPolygon(int nPoints, const int *points); + operator QVariant() const; + + void translate(int dx, int dy); + void translate(const QPoint &offset); + + QPolygon translated(int dx, int dy) const; + inline QPolygon translated(const QPoint &offset) const; + + QRect boundingRect() const; + + void point(int i, int *x, int *y) const; + QPoint point(int i) const; + void setPoint(int index, int x, int y); + void setPoint(int index, const QPoint &p); + void setPoints(int nPoints, const int *points); + void setPoints(int nPoints, int firstx, int firsty, ...); + void putPoints(int index, int nPoints, const int *points); + void putPoints(int index, int nPoints, int firstx, int firsty, ...); + void putPoints(int index, int nPoints, const QPolygon & from, int fromIndex=0); + + bool containsPoint(const QPoint &pt, Qt::FillRule fillRule) const; + + QPolygon united(const QPolygon &r) const; + QPolygon intersected(const QPolygon &r) const; + QPolygon subtracted(const QPolygon &r) const; +}; + +inline QPolygon::QPolygon(int asize) : QVector(asize) {} + + + QDebug operator<<(QDebug, const QPolygon &); + + + + + + + QDataStream &operator<<(QDataStream &stream, const QPolygon &polygon); + QDataStream &operator>>(QDataStream &stream, QPolygon &polygon); + + + + + + +inline void QPolygon::setPoint(int index, const QPoint &pt) +{ (*this)[index] = pt; } + +inline void QPolygon::setPoint(int index, int x, int y) +{ (*this)[index] = QPoint(x, y); } + +inline QPoint QPolygon::point(int index) const +{ return at(index); } + +inline void QPolygon::translate(const QPoint &offset) +{ translate(offset.x(), offset.y()); } + +inline QPolygon QPolygon::translated(const QPoint &offset) const +{ return translated(offset.x(), offset.y()); } + +class QRectF; + +class QPolygonF : public QVector +{ +public: + inline QPolygonF() {} + inline ~QPolygonF() {} + inline QPolygonF(int size); + inline QPolygonF(const QPolygonF &a) : QVector(a) {} + inline QPolygonF(const QVector &v) : QVector(v) {} + QPolygonF(const QRectF &r); + QPolygonF(const QPolygon &a); + + inline void translate(qreal dx, qreal dy); + void translate(const QPointF &offset); + + inline QPolygonF translated(qreal dx, qreal dy) const; + QPolygonF translated(const QPointF &offset) const; + + QPolygon toPolygon() const; + + bool isClosed() const { return !isEmpty() && first() == last(); } + + QRectF boundingRect() const; + + bool containsPoint(const QPointF &pt, Qt::FillRule fillRule) const; + + QPolygonF united(const QPolygonF &r) const; + QPolygonF intersected(const QPolygonF &r) const; + QPolygonF subtracted(const QPolygonF &r) const; +}; + +inline QPolygonF::QPolygonF(int asize) : QVector(asize) {} + + + QDebug operator<<(QDebug, const QPolygonF &); + + + + + + + QDataStream &operator<<(QDataStream &stream, const QPolygonF &array); + QDataStream &operator>>(QDataStream &stream, QPolygonF &array); + + +inline void QPolygonF::translate(qreal dx, qreal dy) +{ translate(QPointF(dx, dy)); } + +inline QPolygonF QPolygonF::translated(qreal dx, qreal dy) const +{ return translated(QPointF(dx, dy)); } + + + + +# 46 "/usr/include/qt4/QtGui/qmatrix.h" 2 +# 1 "/usr/include/qt4/QtGui/qregion.h" 1 +# 53 "/usr/include/qt4/QtGui/qregion.h" + + + + +typedef QtValidLicenseForGuiModule QtGuiModule; + +template class QVector; +class QVariant; + + +struct QRegionPrivate; + + +class QBitmap; + +class QRegion +{ +public: + enum RegionType { Rectangle, Ellipse }; + + QRegion(); + QRegion(int x, int y, int w, int h, RegionType t = Rectangle); + QRegion(const QRect &r, RegionType t = Rectangle); + QRegion(const QPolygon &pa, Qt::FillRule fillRule = Qt::OddEvenFill); + + + + QRegion(const QRegion ®ion); + QRegion(const QBitmap &bitmap); + ~QRegion(); + QRegion &operator=(const QRegion &); + + + + + bool isEmpty() const; + + bool contains(const QPoint &p) const; + bool contains(const QRect &r) const; + + void translate(int dx, int dy); + inline void translate(const QPoint &p) { translate(p.x(), p.y()); } + QRegion translated(int dx, int dy) const; + inline QRegion translated(const QPoint &p) const { return translated(p.x(), p.y()); } + + + QRegion unite(const QRegion &r) const; + QRegion unite(const QRect &r) const; + QRegion intersect(const QRegion &r) const; + QRegion intersect(const QRect &r) const; + QRegion subtract(const QRegion &r) const; + QRegion eor(const QRegion &r) const; + + inline QRegion united(const QRegion &r) const { return unite(r); } + inline QRegion united(const QRect &r) const { return unite(r); } + inline QRegion intersected(const QRegion &r) const { return intersect(r); } + inline QRegion intersected(const QRect &r) const { return intersect(r); } + inline QRegion subtracted(const QRegion &r) const { return subtract(r); } + inline QRegion xored(const QRegion &r) const { return eor(r); } + + bool intersects(const QRegion &r) const; + bool intersects(const QRect &r) const; + + QRect boundingRect() const; + QVector rects() const; + void setRects(const QRect *rect, int num); + + int numRects() const; + + int rectCount() const; + + const QRegion operator|(const QRegion &r) const; + const QRegion operator+(const QRegion &r) const; + const QRegion operator+(const QRect &r) const; + const QRegion operator&(const QRegion &r) const; + const QRegion operator&(const QRect &r) const; + const QRegion operator-(const QRegion &r) const; + const QRegion operator^(const QRegion &r) const; + QRegion& operator|=(const QRegion &r); + QRegion& operator+=(const QRegion &r); + QRegion& operator+=(const QRect &r); + QRegion& operator&=(const QRegion &r); + QRegion& operator&=(const QRect &r); + QRegion& operator-=(const QRegion &r); + QRegion& operator^=(const QRegion &r); + + bool operator==(const QRegion &r) const; + inline bool operator!=(const QRegion &r) const { return !(operator==(r)); } + operator QVariant() const; +# 150 "/usr/include/qt4/QtGui/qregion.h" + inline Region handle() const { if(!d->rgn) updateX11Region(); return d->rgn; } +# 172 "/usr/include/qt4/QtGui/qregion.h" + friend QDataStream &operator<<(QDataStream &, const QRegion &); + friend QDataStream &operator>>(QDataStream &, QRegion &); + +private: + QRegion copy() const; + void detach(); + + + + + void updateX11Region() const; + void *clipRectangles(int &num) const; + friend void *qt_getClipRects(const QRegion &r, int &num); + + + + + friend bool qt_region_strictContains(const QRegion ®ion, + const QRect &rect); + friend struct QRegionPrivate; + + + void exec(const QByteArray &ba, int ver = 0, QDataStream::ByteOrder byteOrder = QDataStream::BigEndian); + + struct QRegionData { + QBasicAtomicInt ref; + + + + Region rgn; + void *xrectangles; + + + + + QRegionPrivate *qt_rgn; + + }; + + + + struct QRegionData *d; + static struct QRegionData shared_empty; + static void cleanUp(QRegionData *x); +}; + + + + + + + QDataStream &operator<<(QDataStream &, const QRegion &); + QDataStream &operator>>(QDataStream &, QRegion &); + + + + QDebug operator<<(QDebug, const QRegion &); + + + + + +# 47 "/usr/include/qt4/QtGui/qmatrix.h" 2 + +# 1 "/usr/include/qt4/QtCore/qline.h" 1 +# 47 "/usr/include/qt4/QtCore/qline.h" + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + + + + + +class QLine +{ +public: + inline QLine(); + inline QLine(const QPoint &pt1, const QPoint &pt2); + inline QLine(int x1, int y1, int x2, int y2); + + inline bool isNull() const; + + inline QPoint p1() const; + inline QPoint p2() const; + + inline int x1() const; + inline int y1() const; + + inline int x2() const; + inline int y2() const; + + inline int dx() const; + inline int dy() const; + + inline void translate(const QPoint &p); + inline void translate(int dx, int dy); + + inline QLine translated(const QPoint &p) const; + inline QLine translated(int dx, int dy) const; + + inline void setP1(const QPoint &p1); + inline void setP2(const QPoint &p2); + inline void setPoints(const QPoint &p1, const QPoint &p2); + inline void setLine(int x1, int y1, int x2, int y2); + + inline bool operator==(const QLine &d) const; + inline bool operator!=(const QLine &d) const { return !(*this == d); } + +private: + QPoint pt1, pt2; +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QLine)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QLine"; } }; + + + + + +inline QLine::QLine() { } + +inline QLine::QLine(const QPoint &pt1_, const QPoint &pt2_) : pt1(pt1_), pt2(pt2_) { } + +inline QLine::QLine(int x1pos, int y1pos, int x2pos, int y2pos) : pt1(QPoint(x1pos, y1pos)), pt2(QPoint(x2pos, y2pos)) { } + +inline bool QLine::isNull() const +{ + return pt1 == pt2; +} + +inline int QLine::x1() const +{ + return pt1.x(); +} + +inline int QLine::y1() const +{ + return pt1.y(); +} + +inline int QLine::x2() const +{ + return pt2.x(); +} + +inline int QLine::y2() const +{ + return pt2.y(); +} + +inline QPoint QLine::p1() const +{ + return pt1; +} + +inline QPoint QLine::p2() const +{ + return pt2; +} + +inline int QLine::dx() const +{ + return pt2.x() - pt1.x(); +} + +inline int QLine::dy() const +{ + return pt2.y() - pt1.y(); +} + +inline void QLine::translate(const QPoint &point) +{ + pt1 += point; + pt2 += point; +} + +inline void QLine::translate(int adx, int ady) +{ + this->translate(QPoint(adx, ady)); +} + +inline QLine QLine::translated(const QPoint &p) const +{ + return QLine(pt1 + p, pt2 + p); +} + +inline QLine QLine::translated(int adx, int ady) const +{ + return translated(QPoint(adx, ady)); +} + +inline void QLine::setP1(const QPoint &aP1) +{ + pt1 = aP1; +} + +inline void QLine::setP2(const QPoint &aP2) +{ + pt2 = aP2; +} + +inline void QLine::setPoints(const QPoint &aP1, const QPoint &aP2) +{ + pt1 = aP1; + pt2 = aP2; +} + +inline void QLine::setLine(int aX1, int aY1, int aX2, int aY2) +{ + pt1 = QPoint(aX1, aY1); + pt2 = QPoint(aX2, aY2); +} + +inline bool QLine::operator==(const QLine &d) const +{ + return pt1 == d.pt1 && pt2 == d.pt2; +} + + + QDebug operator<<(QDebug d, const QLine &p); + + + + QDataStream &operator<<(QDataStream &, const QLine &); + QDataStream &operator>>(QDataStream &, QLine &); + + + + + +class QLineF { +public: + + enum IntersectType { NoIntersection, BoundedIntersection, UnboundedIntersection }; + + inline QLineF(); + inline QLineF(const QPointF &pt1, const QPointF &pt2); + inline QLineF(qreal x1, qreal y1, qreal x2, qreal y2); + inline QLineF(const QLine &line) : pt1(line.p1()), pt2(line.p2()) { } + + static QLineF fromPolar(qreal length, qreal angle); + + bool isNull() const; + + inline QPointF p1() const; + inline QPointF p2() const; + + inline qreal x1() const; + inline qreal y1() const; + + inline qreal x2() const; + inline qreal y2() const; + + inline qreal dx() const; + inline qreal dy() const; + + qreal length() const; + void setLength(qreal len); + + qreal angle() const; + void setAngle(qreal angle); + + qreal angleTo(const QLineF &l) const; + + QLineF unitVector() const; + QLineF normalVector() const; + + + IntersectType intersect(const QLineF &l, QPointF *intersectionPoint) const; + + qreal angle(const QLineF &l) const; + + QPointF pointAt(qreal t) const; + inline void translate(const QPointF &p); + inline void translate(qreal dx, qreal dy); + + inline QLineF translated(const QPointF &p) const; + inline QLineF translated(qreal dx, qreal dy) const; + + inline void setP1(const QPointF &p1); + inline void setP2(const QPointF &p2); + inline void setPoints(const QPointF &p1, const QPointF &p2); + inline void setLine(qreal x1, qreal y1, qreal x2, qreal y2); + + inline bool operator==(const QLineF &d) const; + inline bool operator!=(const QLineF &d) const { return !(*this == d); } + + QLine toLine() const; + +private: + QPointF pt1, pt2; +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QLineF)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QLineF"; } }; + + + + + +inline QLineF::QLineF() +{ +} + +inline QLineF::QLineF(const QPointF &apt1, const QPointF &apt2) + : pt1(apt1), pt2(apt2) +{ +} + +inline QLineF::QLineF(qreal x1pos, qreal y1pos, qreal x2pos, qreal y2pos) + : pt1(x1pos, y1pos), pt2(x2pos, y2pos) +{ +} + +inline qreal QLineF::x1() const +{ + return pt1.x(); +} + +inline qreal QLineF::y1() const +{ + return pt1.y(); +} + +inline qreal QLineF::x2() const +{ + return pt2.x(); +} + +inline qreal QLineF::y2() const +{ + return pt2.y(); +} + +inline QPointF QLineF::p1() const +{ + return pt1; +} + +inline QPointF QLineF::p2() const +{ + return pt2; +} + +inline qreal QLineF::dx() const +{ + return pt2.x() - pt1.x(); +} + +inline qreal QLineF::dy() const +{ + return pt2.y() - pt1.y(); +} + +inline QLineF QLineF::normalVector() const +{ + return QLineF(p1(), p1() + QPointF(dy(), -dx())); +} + +inline void QLineF::translate(const QPointF &point) +{ + pt1 += point; + pt2 += point; +} + +inline void QLineF::translate(qreal adx, qreal ady) +{ + this->translate(QPointF(adx, ady)); +} + +inline QLineF QLineF::translated(const QPointF &p) const +{ + return QLineF(pt1 + p, pt2 + p); +} + +inline QLineF QLineF::translated(qreal adx, qreal ady) const +{ + return translated(QPointF(adx, ady)); +} + +inline void QLineF::setLength(qreal len) +{ + if (isNull()) + return; + QLineF v = unitVector(); + pt2 = QPointF(pt1.x() + v.dx() * len, pt1.y() + v.dy() * len); +} + +inline QPointF QLineF::pointAt(qreal t) const +{ + qreal vx = pt2.x() - pt1.x(); + qreal vy = pt2.y() - pt1.y(); + return QPointF(pt1.x() + vx * t, pt1.y() + vy * t); +} + +inline QLine QLineF::toLine() const +{ + return QLine(pt1.toPoint(), pt2.toPoint()); +} + + +inline void QLineF::setP1(const QPointF &aP1) +{ + pt1 = aP1; +} + +inline void QLineF::setP2(const QPointF &aP2) +{ + pt2 = aP2; +} + +inline void QLineF::setPoints(const QPointF &aP1, const QPointF &aP2) +{ + pt1 = aP1; + pt2 = aP2; +} + +inline void QLineF::setLine(qreal aX1, qreal aY1, qreal aX2, qreal aY2) +{ + pt1 = QPointF(aX1, aY1); + pt2 = QPointF(aX2, aY2); +} + + +inline bool QLineF::operator==(const QLineF &d) const +{ + return pt1 == d.pt1 && pt2 == d.pt2; +} + + + + + QDebug operator<<(QDebug d, const QLineF &p); + + + + QDataStream &operator<<(QDataStream &, const QLineF &); + QDataStream &operator>>(QDataStream &, QLineF &); + + + + + +# 49 "/usr/include/qt4/QtGui/qmatrix.h" 2 + + + + + + + +typedef QtValidLicenseForGuiModule QtGuiModule; + +class QPainterPath; +class QVariant; + +class QMatrix +{ +public: + inline explicit QMatrix(Qt::Initialization) {} + QMatrix(); + QMatrix(qreal m11, qreal m12, qreal m21, qreal m22, + qreal dx, qreal dy); + QMatrix(const QMatrix &matrix); + + void setMatrix(qreal m11, qreal m12, qreal m21, qreal m22, + qreal dx, qreal dy); + + qreal m11() const { return _m11; } + qreal m12() const { return _m12; } + qreal m21() const { return _m21; } + qreal m22() const { return _m22; } + qreal dx() const { return _dx; } + qreal dy() const { return _dy; } + + void map(int x, int y, int *tx, int *ty) const; + void map(qreal x, qreal y, qreal *tx, qreal *ty) const; + QRect mapRect(const QRect &) const; + QRectF mapRect(const QRectF &) const; + + QPoint map(const QPoint &p) const; + QPointF map(const QPointF&p) const; + QLine map(const QLine &l) const; + QLineF map(const QLineF &l) const; + QPolygonF map(const QPolygonF &a) const; + QPolygon map(const QPolygon &a) const; + QRegion map(const QRegion &r) const; + QPainterPath map(const QPainterPath &p) const; + QPolygon mapToPolygon(const QRect &r) const; + + void reset(); + inline bool isIdentity() const; + + QMatrix &translate(qreal dx, qreal dy); + QMatrix &scale(qreal sx, qreal sy); + QMatrix &shear(qreal sh, qreal sv); + QMatrix &rotate(qreal a); + + bool isInvertible() const { return !qFuzzyIsNull(_m11*_m22 - _m12*_m21); } + qreal determinant() const { return _m11*_m22 - _m12*_m21; } + + qreal det() const { return _m11*_m22 - _m12*_m21; } + + + QMatrix inverted(bool *invertible = 0) const; + + bool operator==(const QMatrix &) const; + bool operator!=(const QMatrix &) const; + + QMatrix &operator*=(const QMatrix &); + QMatrix operator*(const QMatrix &o) const; + + QMatrix &operator=(const QMatrix &); + + operator QVariant() const; + + + + + + + +private: + inline QMatrix(bool) + : _m11(1.) + , _m12(0.) + , _m21(0.) + , _m22(1.) + , _dx(0.) + , _dy(0.) {} + inline QMatrix(qreal am11, qreal am12, qreal am21, qreal am22, qreal adx, qreal ady, bool) + : _m11(am11) + , _m12(am12) + , _m21(am21) + , _m22(am22) + , _dx(adx) + , _dy(ady) {} + friend class QTransform; + qreal _m11, _m12; + qreal _m21, _m22; + qreal _dx, _dy; +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QMatrix)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QMatrix"; } }; + + + inline QPoint operator*(const QPoint &p, const QMatrix &m) +{ return m.map(p); } + inline QPointF operator*(const QPointF &p, const QMatrix &m) +{ return m.map(p); } + inline QLineF operator*(const QLineF &l, const QMatrix &m) +{ return m.map(l); } + inline QLine operator*(const QLine &l, const QMatrix &m) +{ return m.map(l); } + inline QPolygon operator *(const QPolygon &a, const QMatrix &m) +{ return m.map(a); } + inline QPolygonF operator *(const QPolygonF &a, const QMatrix &m) +{ return m.map(a); } + inline QRegion operator *(const QRegion &r, const QMatrix &m) +{ return m.map(r); } + QPainterPath operator *(const QPainterPath &p, const QMatrix &m); + +inline bool QMatrix::isIdentity() const +{ + return qFuzzyIsNull(_m11 - 1) && qFuzzyIsNull(_m22 - 1) && qFuzzyIsNull(_m12) + && qFuzzyIsNull(_m21) && qFuzzyIsNull(_dx) && qFuzzyIsNull(_dy); +} + +inline bool qFuzzyCompare(const QMatrix& m1, const QMatrix& m2) +{ + return qFuzzyCompare(m1.m11(), m2.m11()) + && qFuzzyCompare(m1.m12(), m2.m12()) + && qFuzzyCompare(m1.m21(), m2.m21()) + && qFuzzyCompare(m1.m22(), m2.m22()) + && qFuzzyCompare(m1.dx(), m2.dx()) + && qFuzzyCompare(m1.dy(), m2.dy()); +} + + + + + + + + QDataStream &operator<<(QDataStream &, const QMatrix &); + QDataStream &operator>>(QDataStream &, QMatrix &); + + + + QDebug operator<<(QDebug, const QMatrix &); +# 202 "/usr/include/qt4/QtGui/qmatrix.h" + + + +# 45 "/usr/include/qt4/QtGui/qtransform.h" 2 +# 1 "/usr/include/qt4/QtGui/qpainterpath.h" 1 +# 52 "/usr/include/qt4/QtGui/qpainterpath.h" + + + + +typedef QtValidLicenseForGuiModule QtGuiModule; + +class QFont; +class QPainterPathPrivate; +struct QPainterPathPrivateDeleter; +class QPainterPathData; +class QPainterPathStrokerPrivate; +class QPolygonF; +class QRegion; +class QVectorPath; + +class QPainterPath +{ +public: + enum ElementType { + MoveToElement, + LineToElement, + CurveToElement, + CurveToDataElement + }; + + class Element { + public: + qreal x; + qreal y; + ElementType type; + + bool isMoveTo() const { return type == MoveToElement; } + bool isLineTo() const { return type == LineToElement; } + bool isCurveTo() const { return type == CurveToElement; } + + operator QPointF () const { return QPointF(x, y); } + + bool operator==(const Element &e) const { return qFuzzyCompare(x, e.x) + && qFuzzyCompare(y, e.y) && type == e.type; } + inline bool operator!=(const Element &e) const { return !operator==(e); } + }; + + QPainterPath(); + explicit QPainterPath(const QPointF &startPoint); + QPainterPath(const QPainterPath &other); + QPainterPath &operator=(const QPainterPath &other); + ~QPainterPath(); + + void closeSubpath(); + + void moveTo(const QPointF &p); + inline void moveTo(qreal x, qreal y); + + void lineTo(const QPointF &p); + inline void lineTo(qreal x, qreal y); + + void arcMoveTo(const QRectF &rect, qreal angle); + inline void arcMoveTo(qreal x, qreal y, qreal w, qreal h, qreal angle); + + void arcTo(const QRectF &rect, qreal startAngle, qreal arcLength); + inline void arcTo(qreal x, qreal y, qreal w, qreal h, qreal startAngle, qreal arcLength); + + void cubicTo(const QPointF &ctrlPt1, const QPointF &ctrlPt2, const QPointF &endPt); + inline void cubicTo(qreal ctrlPt1x, qreal ctrlPt1y, qreal ctrlPt2x, qreal ctrlPt2y, + qreal endPtx, qreal endPty); + void quadTo(const QPointF &ctrlPt, const QPointF &endPt); + inline void quadTo(qreal ctrlPtx, qreal ctrlPty, qreal endPtx, qreal endPty); + + QPointF currentPosition() const; + + void addRect(const QRectF &rect); + inline void addRect(qreal x, qreal y, qreal w, qreal h); + void addEllipse(const QRectF &rect); + inline void addEllipse(qreal x, qreal y, qreal w, qreal h); + inline void addEllipse(const QPointF ¢er, qreal rx, qreal ry); + void addPolygon(const QPolygonF &polygon); + void addText(const QPointF &point, const QFont &f, const QString &text); + inline void addText(qreal x, qreal y, const QFont &f, const QString &text); + void addPath(const QPainterPath &path); + void addRegion(const QRegion ®ion); + + void addRoundedRect(const QRectF &rect, qreal xRadius, qreal yRadius, + Qt::SizeMode mode = Qt::AbsoluteSize); + inline void addRoundedRect(qreal x, qreal y, qreal w, qreal h, + qreal xRadius, qreal yRadius, + Qt::SizeMode mode = Qt::AbsoluteSize); + + void addRoundRect(const QRectF &rect, int xRnd, int yRnd); + inline void addRoundRect(qreal x, qreal y, qreal w, qreal h, + int xRnd, int yRnd); + inline void addRoundRect(const QRectF &rect, int roundness); + inline void addRoundRect(qreal x, qreal y, qreal w, qreal h, + int roundness); + + void connectPath(const QPainterPath &path); + + bool contains(const QPointF &pt) const; + bool contains(const QRectF &rect) const; + bool intersects(const QRectF &rect) const; + + void translate(qreal dx, qreal dy); + inline void translate(const QPointF &offset); + + QPainterPath translated(qreal dx, qreal dy) const; + inline QPainterPath translated(const QPointF &offset) const; + + QRectF boundingRect() const; + QRectF controlPointRect() const; + + Qt::FillRule fillRule() const; + void setFillRule(Qt::FillRule fillRule); + + inline bool isEmpty() const; + + QPainterPath toReversed() const; + QList toSubpathPolygons(const QMatrix &matrix = QMatrix()) const; + QList toFillPolygons(const QMatrix &matrix = QMatrix()) const; + QPolygonF toFillPolygon(const QMatrix &matrix = QMatrix()) const; + QList toSubpathPolygons(const QTransform &matrix) const; + QList toFillPolygons(const QTransform &matrix) const; + QPolygonF toFillPolygon(const QTransform &matrix) const; + + inline int elementCount() const; + inline const QPainterPath::Element &elementAt(int i) const; + inline void setElementPositionAt(int i, qreal x, qreal y); + + qreal length() const; + qreal percentAtLength(qreal t) const; + QPointF pointAtPercent(qreal t) const; + qreal angleAtPercent(qreal t) const; + qreal slopeAtPercent(qreal t) const; + + bool intersects(const QPainterPath &p) const; + bool contains(const QPainterPath &p) const; + QPainterPath united(const QPainterPath &r) const; + QPainterPath intersected(const QPainterPath &r) const; + QPainterPath subtracted(const QPainterPath &r) const; + QPainterPath subtractedInverted(const QPainterPath &r) const; + + QPainterPath simplified() const; + + bool operator==(const QPainterPath &other) const; + bool operator!=(const QPainterPath &other) const; + + QPainterPath operator&(const QPainterPath &other) const; + QPainterPath operator|(const QPainterPath &other) const; + QPainterPath operator+(const QPainterPath &other) const; + QPainterPath operator-(const QPainterPath &other) const; + QPainterPath &operator&=(const QPainterPath &other); + QPainterPath &operator|=(const QPainterPath &other); + QPainterPath &operator+=(const QPainterPath &other); + QPainterPath &operator-=(const QPainterPath &other); + +private: + QScopedPointer d_ptr; + + inline void ensureData() { if (!d_ptr) ensureData_helper(); } + void ensureData_helper(); + inline void detach(); + void detach_helper(); + void setDirty(bool); + void computeBoundingRect() const; + void computeControlPointRect() const; + + QPainterPathData *d_func() const { return reinterpret_cast(d_ptr.data()); } + + friend class QPainterPathData; + friend class QPainterPathStroker; + friend class QPainterPathStrokerPrivate; + friend class QMatrix; + friend class QTransform; + friend class QVectorPath; + friend const QVectorPath &qtVectorPathForPath(const QPainterPath &); + + + friend QDataStream &operator<<(QDataStream &, const QPainterPath &); + friend QDataStream &operator>>(QDataStream &, QPainterPath &); + +}; + +class QPainterPathPrivate +{ +public: + friend class QPainterPath; + friend class QPainterPathData; + friend class QPainterPathStroker; + friend class QPainterPathStrokerPrivate; + friend class QMatrix; + friend class QTransform; + friend class QVectorPath; + friend struct QPainterPathPrivateDeleter; + + friend QDataStream &operator<<(QDataStream &, const QPainterPath &); + friend QDataStream &operator>>(QDataStream &, QPainterPath &); + +private: + QAtomicInt ref; + QVector elements; +}; + +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QPainterPath::Element)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QPainterPath::Element"; } }; + + + QDataStream &operator<<(QDataStream &, const QPainterPath &); + QDataStream &operator>>(QDataStream &, QPainterPath &); + + +class QPainterPathStroker +{ + inline QPainterPathStrokerPrivate* d_func() { return reinterpret_cast(qGetPtrHelper(d_ptr)); } inline const QPainterPathStrokerPrivate* d_func() const { return reinterpret_cast(qGetPtrHelper(d_ptr)); } friend class QPainterPathStrokerPrivate; +public: + QPainterPathStroker(); + ~QPainterPathStroker(); + + void setWidth(qreal width); + qreal width() const; + + void setCapStyle(Qt::PenCapStyle style); + Qt::PenCapStyle capStyle() const; + + void setJoinStyle(Qt::PenJoinStyle style); + Qt::PenJoinStyle joinStyle() const; + + void setMiterLimit(qreal length); + qreal miterLimit() const; + + void setCurveThreshold(qreal threshold); + qreal curveThreshold() const; + + void setDashPattern(Qt::PenStyle); + void setDashPattern(const QVector &dashPattern); + QVector dashPattern() const; + + void setDashOffset(qreal offset); + qreal dashOffset() const; + + QPainterPath createStroke(const QPainterPath &path) const; + +private: + friend class QX11PaintEngine; + + QScopedPointer d_ptr; +}; + +inline void QPainterPath::moveTo(qreal x, qreal y) +{ + moveTo(QPointF(x, y)); +} + +inline void QPainterPath::lineTo(qreal x, qreal y) +{ + lineTo(QPointF(x, y)); +} + +inline void QPainterPath::arcTo(qreal x, qreal y, qreal w, qreal h, qreal startAngle, qreal arcLength) +{ + arcTo(QRectF(x, y, w, h), startAngle, arcLength); +} + +inline void QPainterPath::arcMoveTo(qreal x, qreal y, qreal w, qreal h, qreal angle) +{ + arcMoveTo(QRectF(x, y, w, h), angle); +} + +inline void QPainterPath::cubicTo(qreal ctrlPt1x, qreal ctrlPt1y, qreal ctrlPt2x, qreal ctrlPt2y, + qreal endPtx, qreal endPty) +{ + cubicTo(QPointF(ctrlPt1x, ctrlPt1y), QPointF(ctrlPt2x, ctrlPt2y), + QPointF(endPtx, endPty)); +} + +inline void QPainterPath::quadTo(qreal ctrlPtx, qreal ctrlPty, qreal endPtx, qreal endPty) +{ + quadTo(QPointF(ctrlPtx, ctrlPty), QPointF(endPtx, endPty)); +} + +inline void QPainterPath::addEllipse(qreal x, qreal y, qreal w, qreal h) +{ + addEllipse(QRectF(x, y, w, h)); +} + +inline void QPainterPath::addEllipse(const QPointF ¢er, qreal rx, qreal ry) +{ + addEllipse(QRectF(center.x() - rx, center.y() - ry, 2 * rx, 2 * ry)); +} + +inline void QPainterPath::addRect(qreal x, qreal y, qreal w, qreal h) +{ + addRect(QRectF(x, y, w, h)); +} + +inline void QPainterPath::addRoundedRect(qreal x, qreal y, qreal w, qreal h, + qreal xRadius, qreal yRadius, + Qt::SizeMode mode) +{ + addRoundedRect(QRectF(x, y, w, h), xRadius, yRadius, mode); +} + +inline void QPainterPath::addRoundRect(qreal x, qreal y, qreal w, qreal h, + int xRnd, int yRnd) +{ + addRoundRect(QRectF(x, y, w, h), xRnd, yRnd); +} + +inline void QPainterPath::addRoundRect(const QRectF &rect, + int roundness) +{ + int xRnd = roundness; + int yRnd = roundness; + if (rect.width() > rect.height()) + xRnd = int(roundness * rect.height()/rect.width()); + else + yRnd = int(roundness * rect.width()/rect.height()); + addRoundRect(rect, xRnd, yRnd); +} + +inline void QPainterPath::addRoundRect(qreal x, qreal y, qreal w, qreal h, + int roundness) +{ + addRoundRect(QRectF(x, y, w, h), roundness); +} + +inline void QPainterPath::addText(qreal x, qreal y, const QFont &f, const QString &text) +{ + addText(QPointF(x, y), f, text); +} + +inline void QPainterPath::translate(const QPointF &offset) +{ translate(offset.x(), offset.y()); } + +inline QPainterPath QPainterPath::translated(const QPointF &offset) const +{ return translated(offset.x(), offset.y()); } + +inline bool QPainterPath::isEmpty() const +{ + return !d_ptr || (d_ptr->elements.size() == 1 && d_ptr->elements.first().type == MoveToElement); +} + +inline int QPainterPath::elementCount() const +{ + return d_ptr ? d_ptr->elements.size() : 0; +} + +inline const QPainterPath::Element &QPainterPath::elementAt(int i) const +{ + ((!(d_ptr)) ? qt_assert("d_ptr","/usr/include/qt4/QtGui/qpainterpath.h",397) : qt_noop()); + ((!(i >= 0 && i < elementCount())) ? qt_assert("i >= 0 && i < elementCount()","/usr/include/qt4/QtGui/qpainterpath.h",398) : qt_noop()); + return d_ptr->elements.at(i); +} + +inline void QPainterPath::setElementPositionAt(int i, qreal x, qreal y) +{ + ((!(d_ptr)) ? qt_assert("d_ptr","/usr/include/qt4/QtGui/qpainterpath.h",404) : qt_noop()); + ((!(i >= 0 && i < elementCount())) ? qt_assert("i >= 0 && i < elementCount()","/usr/include/qt4/QtGui/qpainterpath.h",405) : qt_noop()); + detach(); + QPainterPath::Element &e = d_ptr->elements[i]; + e.x = x; + e.y = y; +} + + +inline void QPainterPath::detach() +{ + if (d_ptr->ref != 1) + detach_helper(); + setDirty(true); +} + + + QDebug operator<<(QDebug, const QPainterPath &); + + + + + +# 46 "/usr/include/qt4/QtGui/qtransform.h" 2 +# 57 "/usr/include/qt4/QtGui/qtransform.h" + + + + +typedef QtValidLicenseForGuiModule QtGuiModule; + +class QVariant; + +class QTransform +{ + +public: + enum TransformationType { + TxNone = 0x00, + TxTranslate = 0x01, + TxScale = 0x02, + TxRotate = 0x04, + TxShear = 0x08, + TxProject = 0x10 + }; + + inline explicit QTransform(Qt::Initialization) : affine(Qt::Uninitialized) {} + QTransform(); + QTransform(qreal h11, qreal h12, qreal h13, + qreal h21, qreal h22, qreal h23, + qreal h31, qreal h32, qreal h33 = 1.0); + QTransform(qreal h11, qreal h12, qreal h21, + qreal h22, qreal dx, qreal dy); + explicit QTransform(const QMatrix &mtx); + + bool isAffine() const; + bool isIdentity() const; + bool isInvertible() const; + bool isScaling() const; + bool isRotating() const; + bool isTranslating() const; + + TransformationType type() const; + + inline qreal determinant() const; + qreal det() const; + + qreal m11() const; + qreal m12() const; + qreal m13() const; + qreal m21() const; + qreal m22() const; + qreal m23() const; + qreal m31() const; + qreal m32() const; + qreal m33() const; + qreal dx() const; + qreal dy() const; + + void setMatrix(qreal m11, qreal m12, qreal m13, + qreal m21, qreal m22, qreal m23, + qreal m31, qreal m32, qreal m33); + + QTransform inverted(bool *invertible = 0) const; + QTransform adjoint() const; + QTransform transposed() const; + + QTransform &translate(qreal dx, qreal dy); + QTransform &scale(qreal sx, qreal sy); + QTransform &shear(qreal sh, qreal sv); + QTransform &rotate(qreal a, Qt::Axis axis = Qt::ZAxis); + QTransform &rotateRadians(qreal a, Qt::Axis axis = Qt::ZAxis); + + static bool squareToQuad(const QPolygonF &square, QTransform &result); + static bool quadToSquare(const QPolygonF &quad, QTransform &result); + static bool quadToQuad(const QPolygonF &one, + const QPolygonF &two, + QTransform &result); + + bool operator==(const QTransform &) const; + bool operator!=(const QTransform &) const; + + QTransform &operator*=(const QTransform &); + QTransform operator*(const QTransform &o) const; + + QTransform &operator=(const QTransform &); + + operator QVariant() const; + + void reset(); + QPoint map(const QPoint &p) const; + QPointF map(const QPointF &p) const; + QLine map(const QLine &l) const; + QLineF map(const QLineF &l) const; + QPolygonF map(const QPolygonF &a) const; + QPolygon map(const QPolygon &a) const; + QRegion map(const QRegion &r) const; + QPainterPath map(const QPainterPath &p) const; + QPolygon mapToPolygon(const QRect &r) const; + QRect mapRect(const QRect &) const; + QRectF mapRect(const QRectF &) const; + void map(int x, int y, int *tx, int *ty) const; + void map(qreal x, qreal y, qreal *tx, qreal *ty) const; + + const QMatrix &toAffine() const; + + QTransform &operator*=(qreal div); + QTransform &operator/=(qreal div); + QTransform &operator+=(qreal div); + QTransform &operator-=(qreal div); + + static QTransform fromTranslate(qreal dx, qreal dy); + static QTransform fromScale(qreal dx, qreal dy); + +private: + inline QTransform(qreal h11, qreal h12, qreal h13, + qreal h21, qreal h22, qreal h23, + qreal h31, qreal h32, qreal h33, bool) + : affine(h11, h12, h21, h22, h31, h32, true) + , m_13(h13), m_23(h23), m_33(h33) + , m_type(TxNone) + , m_dirty(TxProject) {} + inline QTransform(bool) + : affine(true) + , m_13(0), m_23(0), m_33(1) + , m_type(TxNone) + , m_dirty(TxNone) {} + inline TransformationType inline_type() const; + QMatrix affine; + qreal m_13; + qreal m_23; + qreal m_33; + + mutable uint m_type : 5; + mutable uint m_dirty : 5; + + class Private; + Private *d; +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QTransform)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QTransform"; } }; + + +inline QTransform::TransformationType QTransform::inline_type() const +{ + if (m_dirty == TxNone) + return static_cast(m_type); + return type(); +} + +inline bool QTransform::isAffine() const +{ + return inline_type() < TxProject; +} +inline bool QTransform::isIdentity() const +{ + return inline_type() == TxNone; +} + +inline bool QTransform::isInvertible() const +{ + return !qFuzzyIsNull(determinant()); +} + +inline bool QTransform::isScaling() const +{ + return type() >= TxScale; +} +inline bool QTransform::isRotating() const +{ + return inline_type() >= TxRotate; +} + +inline bool QTransform::isTranslating() const +{ + return inline_type() >= TxTranslate; +} + +inline qreal QTransform::determinant() const +{ + return affine._m11*(m_33*affine._m22-affine._dy*m_23) - + affine._m21*(m_33*affine._m12-affine._dy*m_13)+affine._dx*(m_23*affine._m12-affine._m22*m_13); +} +inline qreal QTransform::det() const +{ + return determinant(); +} +inline qreal QTransform::m11() const +{ + return affine._m11; +} +inline qreal QTransform::m12() const +{ + return affine._m12; +} +inline qreal QTransform::m13() const +{ + return m_13; +} +inline qreal QTransform::m21() const +{ + return affine._m21; +} +inline qreal QTransform::m22() const +{ + return affine._m22; +} +inline qreal QTransform::m23() const +{ + return m_23; +} +inline qreal QTransform::m31() const +{ + return affine._dx; +} +inline qreal QTransform::m32() const +{ + return affine._dy; +} +inline qreal QTransform::m33() const +{ + return m_33; +} +inline qreal QTransform::dx() const +{ + return affine._dx; +} +inline qreal QTransform::dy() const +{ + return affine._dy; +} + +inline QTransform &QTransform::operator*=(qreal num) +{ + if (num == 1.) + return *this; + affine._m11 *= num; + affine._m12 *= num; + m_13 *= num; + affine._m21 *= num; + affine._m22 *= num; + m_23 *= num; + affine._dx *= num; + affine._dy *= num; + m_33 *= num; + m_dirty |= TxScale; + return *this; +} +inline QTransform &QTransform::operator/=(qreal div) +{ + if (div == 0) + return *this; + div = 1/div; + return operator*=(div); +} +inline QTransform &QTransform::operator+=(qreal num) +{ + if (num == 0) + return *this; + affine._m11 += num; + affine._m12 += num; + m_13 += num; + affine._m21 += num; + affine._m22 += num; + m_23 += num; + affine._dx += num; + affine._dy += num; + m_33 += num; + m_dirty |= TxProject; + return *this; +} +inline QTransform &QTransform::operator-=(qreal num) +{ + if (num == 0) + return *this; + affine._m11 -= num; + affine._m12 -= num; + m_13 -= num; + affine._m21 -= num; + affine._m22 -= num; + m_23 -= num; + affine._dx -= num; + affine._dy -= num; + m_33 -= num; + m_dirty |= TxProject; + return *this; +} + +inline bool qFuzzyCompare(const QTransform& t1, const QTransform& t2) +{ + return qFuzzyCompare(t1.m11(), t2.m11()) + && qFuzzyCompare(t1.m12(), t2.m12()) + && qFuzzyCompare(t1.m13(), t2.m13()) + && qFuzzyCompare(t1.m21(), t2.m21()) + && qFuzzyCompare(t1.m22(), t2.m22()) + && qFuzzyCompare(t1.m23(), t2.m23()) + && qFuzzyCompare(t1.m31(), t2.m31()) + && qFuzzyCompare(t1.m32(), t2.m32()) + && qFuzzyCompare(t1.m33(), t2.m33()); +} + + + + + QDataStream &operator<<(QDataStream &, const QTransform &); + QDataStream &operator>>(QDataStream &, QTransform &); + + + + QDebug operator<<(QDebug, const QTransform &); + + + + + inline QPoint operator*(const QPoint &p, const QTransform &m) +{ return m.map(p); } + inline QPointF operator*(const QPointF &p, const QTransform &m) +{ return m.map(p); } + inline QLineF operator*(const QLineF &l, const QTransform &m) +{ return m.map(l); } + inline QLine operator*(const QLine &l, const QTransform &m) +{ return m.map(l); } + inline QPolygon operator *(const QPolygon &a, const QTransform &m) +{ return m.map(a); } + inline QPolygonF operator *(const QPolygonF &a, const QTransform &m) +{ return m.map(a); } + inline QRegion operator *(const QRegion &r, const QTransform &m) +{ return m.map(r); } + inline QPainterPath operator *(const QPainterPath &p, const QTransform &m) +{ return m.map(p); } + + inline QTransform operator *(const QTransform &a, qreal n) +{ QTransform t(a); t *= n; return t; } + inline QTransform operator /(const QTransform &a, qreal n) +{ QTransform t(a); t /= n; return t; } + inline QTransform operator +(const QTransform &a, qreal n) +{ QTransform t(a); t += n; return t; } + inline QTransform operator -(const QTransform &a, qreal n) +{ QTransform t(a); t -= n; return t; } + + + + +# 46 "/usr/include/qt4/QtGui/qimage.h" 2 + + + + + + + + + + +typedef QtValidLicenseForGuiModule QtGuiModule; + +class QIODevice; +class QStringList; +class QMatrix; +class QTransform; +class QVariant; +template class QList; +template class QVector; + +struct QImageData; +class QImageDataMisc; + +class QImageTextKeyLang { +public: + QImageTextKeyLang(const char* k, const char* l) : key(k), lang(l) { } + QImageTextKeyLang() { } + + QByteArray key; + QByteArray lang; + + bool operator< (const QImageTextKeyLang& other) const + { return key < other.key || (key==other.key && lang < other.lang); } + bool operator== (const QImageTextKeyLang& other) const + { return key==other.key && lang==other.lang; } + inline bool operator!= (const QImageTextKeyLang &other) const + { return !operator==(other); } +}; + + + +class QImage : public QPaintDevice +{ +public: + enum InvertMode { InvertRgb, InvertRgba }; + enum Format { + Format_Invalid, + Format_Mono, + Format_MonoLSB, + Format_Indexed8, + Format_RGB32, + Format_ARGB32, + Format_ARGB32_Premultiplied, + Format_RGB16, + Format_ARGB8565_Premultiplied, + Format_RGB666, + Format_ARGB6666_Premultiplied, + Format_RGB555, + Format_ARGB8555_Premultiplied, + Format_RGB888, + Format_RGB444, + Format_ARGB4444_Premultiplied, +# 119 "/usr/include/qt4/QtGui/qimage.h" + NImageFormats + + }; + + QImage(); + QImage(const QSize &size, Format format); + QImage(int width, int height, Format format); + QImage(uchar *data, int width, int height, Format format); + QImage(const uchar *data, int width, int height, Format format); + QImage(uchar *data, int width, int height, int bytesPerLine, Format format); + QImage(const uchar *data, int width, int height, int bytesPerLine, Format format); + + + explicit QImage(const char * const xpm[]); + + explicit QImage(const QString &fileName, const char *format = 0); + + explicit QImage(const char *fileName, const char *format = 0); + + + QImage(const QImage &); + ~QImage(); + + QImage &operator=(const QImage &); + bool isNull() const; + + int devType() const; + + bool operator==(const QImage &) const; + bool operator!=(const QImage &) const; + operator QVariant() const; + void detach(); + bool isDetached() const; + + QImage copy(const QRect &rect = QRect()) const; + inline QImage copy(int x, int y, int w, int h) const + { return copy(QRect(x, y, w, h)); } + + Format format() const; + + QImage convertToFormat(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor) const __attribute__ ((warn_unused_result)); + QImage convertToFormat(Format f, const QVector &colorTable, Qt::ImageConversionFlags flags = Qt::AutoColor) const __attribute__ ((warn_unused_result)); + + int width() const; + int height() const; + QSize size() const; + QRect rect() const; + + int depth() const; + + int numColors() const; + + int colorCount() const; + + QRgb color(int i) const; + void setColor(int i, QRgb c); + + void setNumColors(int); + + void setColorCount(int); + + bool allGray() const; + bool isGrayscale() const; + + uchar *bits(); + const uchar *bits() const; + + int numBytes() const; + + int byteCount() const; + + uchar *scanLine(int); + const uchar *scanLine(int) const; + int bytesPerLine() const; + + bool valid(int x, int y) const; + bool valid(const QPoint &pt) const; + + int pixelIndex(int x, int y) const; + int pixelIndex(const QPoint &pt) const; + + QRgb pixel(int x, int y) const; + QRgb pixel(const QPoint &pt) const; + + void setPixel(int x, int y, uint index_or_rgb); + void setPixel(const QPoint &pt, uint index_or_rgb); + + QVector colorTable() const; + void setColorTable(const QVector colors); + + void fill(uint pixel); + + bool hasAlphaChannel() const; + void setAlphaChannel(const QImage &alphaChannel); + QImage alphaChannel() const; + QImage createAlphaMask(Qt::ImageConversionFlags flags = Qt::AutoColor) const; + + QImage createHeuristicMask(bool clipTight = true) const; + + QImage createMaskFromColor(QRgb color, Qt::MaskMode mode = Qt::MaskInColor) const; + + inline QImage scaled(int w, int h, Qt::AspectRatioMode aspectMode = Qt::IgnoreAspectRatio, + Qt::TransformationMode mode = Qt::FastTransformation) const + { return scaled(QSize(w, h), aspectMode, mode); } + QImage scaled(const QSize &s, Qt::AspectRatioMode aspectMode = Qt::IgnoreAspectRatio, + Qt::TransformationMode mode = Qt::FastTransformation) const; + QImage scaledToWidth(int w, Qt::TransformationMode mode = Qt::FastTransformation) const; + QImage scaledToHeight(int h, Qt::TransformationMode mode = Qt::FastTransformation) const; + QImage transformed(const QMatrix &matrix, Qt::TransformationMode mode = Qt::FastTransformation) const; + static QMatrix trueMatrix(const QMatrix &, int w, int h); + QImage transformed(const QTransform &matrix, Qt::TransformationMode mode = Qt::FastTransformation) const; + static QTransform trueMatrix(const QTransform &, int w, int h); + QImage mirrored(bool horizontally = false, bool vertically = true) const; + QImage rgbSwapped() const; + void invertPixels(InvertMode = InvertRgb); + + + bool load(QIODevice *device, const char* format); + bool load(const QString &fileName, const char* format=0); + bool loadFromData(const uchar *buf, int len, const char *format = 0); + inline bool loadFromData(const QByteArray &data, const char* aformat=0) + { return loadFromData(reinterpret_cast(data.constData()), data.size(), aformat); } + + bool save(const QString &fileName, const char* format=0, int quality=-1) const; + bool save(QIODevice *device, const char* format=0, int quality=-1) const; + + static QImage fromData(const uchar *data, int size, const char *format = 0); + inline static QImage fromData(const QByteArray &data, const char *format = 0) + { return fromData(reinterpret_cast(data.constData()), data.size(), format); } + + int serialNumber() const; + qint64 cacheKey() const; + + QPaintEngine *paintEngine() const; + + + int dotsPerMeterX() const; + int dotsPerMeterY() const; + void setDotsPerMeterX(int); + void setDotsPerMeterY(int); + QPoint offset() const; + void setOffset(const QPoint&); + + QStringList textKeys() const; + QString text(const QString &key = QString()) const; + void setText(const QString &key, const QString &value); + + + QString text(const char* key, const char* lang=0) const; + QList textList() const; + QStringList textLanguages() const; + QString text(const QImageTextKeyLang&) const; + void setText(const char* key, const char* lang, const QString&); +# 318 "/usr/include/qt4/QtGui/qimage.h" +public: + virtual int metric(PaintDeviceMetric metric) const; + +private: + friend class QWSOnScreenSurface; + QImageData *d; + + friend class QRasterPixmapData; + friend class QPixmapCacheEntry; + friend qint64 qt_image_id(const QImage &image); + friend const QVector *qt_image_colortable(const QImage &image); + +public: + typedef QImageData * DataPtr; + inline DataPtr &data_ptr() { return d; } +}; + +template <> inline bool qIsDetached(QImage &t) { return t.isDetached(); } template <> inline void qSwap(QImage &value1, QImage &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QImage)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QImage"; } }; + + + + inline bool QImage::valid(const QPoint &pt) const { return valid(pt.x(), pt.y()); } + inline int QImage::pixelIndex(const QPoint &pt) const { return pixelIndex(pt.x(), pt.y());} + inline QRgb QImage::pixel(const QPoint &pt) const { return pixel(pt.x(), pt.y()); } + inline void QImage::setPixel(const QPoint &pt, uint index_or_rgb) { setPixel(pt.x(), pt.y(), index_or_rgb); } + + + + + QDataStream &operator<<(QDataStream &, const QImage &); + QDataStream &operator>>(QDataStream &, QImage &); + + + + + + + + + + +# 51 "/usr/include/qt4/QtGui/qpixmap.h" 2 + + + + + + + + + + + +typedef QtValidLicenseForGuiModule QtGuiModule; + +class QImageWriter; +class QColor; +class QVariant; +class QX11Info; +class QPixmapData; + +class QPixmap : public QPaintDevice +{ +public: + QPixmap(); + explicit QPixmap(QPixmapData *data); + QPixmap(int w, int h); + QPixmap(const QSize &); + QPixmap(const QString& fileName, const char *format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor); + + QPixmap(const char * const xpm[]); + + QPixmap(const QPixmap &); + ~QPixmap(); + + QPixmap &operator=(const QPixmap &); + operator QVariant() const; + + bool isNull() const; + int devType() const; + + int width() const; + int height() const; + QSize size() const; + QRect rect() const; + int depth() const; + + static int defaultDepth(); + + void fill(const QColor &fillColor = Qt::white); + void fill(const QWidget *widget, const QPoint &ofs); + inline void fill(const QWidget *widget, int xofs, int yofs) { fill(widget, QPoint(xofs, yofs)); } + + QBitmap mask() const; + void setMask(const QBitmap &); + + QPixmap alphaChannel() const; + void setAlphaChannel(const QPixmap &); + + bool hasAlpha() const; + bool hasAlphaChannel() const; + + + QBitmap createHeuristicMask(bool clipTight = true) const; + + QBitmap createMaskFromColor(const QColor &maskColor) const; + QBitmap createMaskFromColor(const QColor &maskColor, Qt::MaskMode mode) const; + + static QPixmap grabWindow(WId, int x=0, int y=0, int w=-1, int h=-1); + static QPixmap grabWidget(QWidget *widget, const QRect &rect); + static inline QPixmap grabWidget(QWidget *widget, int x=0, int y=0, int w=-1, int h=-1) + { return grabWidget(widget, QRect(x, y, w, h)); } + + + inline QPixmap scaled(int w, int h, Qt::AspectRatioMode aspectMode = Qt::IgnoreAspectRatio, + Qt::TransformationMode mode = Qt::FastTransformation) const + { return scaled(QSize(w, h), aspectMode, mode); } + QPixmap scaled(const QSize &s, Qt::AspectRatioMode aspectMode = Qt::IgnoreAspectRatio, + Qt::TransformationMode mode = Qt::FastTransformation) const; + QPixmap scaledToWidth(int w, Qt::TransformationMode mode = Qt::FastTransformation) const; + QPixmap scaledToHeight(int h, Qt::TransformationMode mode = Qt::FastTransformation) const; + QPixmap transformed(const QMatrix &, Qt::TransformationMode mode = Qt::FastTransformation) const; + static QMatrix trueMatrix(const QMatrix &m, int w, int h); + QPixmap transformed(const QTransform &, Qt::TransformationMode mode = Qt::FastTransformation) const; + static QTransform trueMatrix(const QTransform &m, int w, int h); + + QImage toImage() const; + static QPixmap fromImage(const QImage &image, Qt::ImageConversionFlags flags = Qt::AutoColor); + + bool load(const QString& fileName, const char *format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor); + bool loadFromData(const uchar *buf, uint len, const char* format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor); + inline bool loadFromData(const QByteArray &data, const char* format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor); + bool save(const QString& fileName, const char* format = 0, int quality = -1) const; + bool save(QIODevice* device, const char* format = 0, int quality = -1) const; +# 170 "/usr/include/qt4/QtGui/qpixmap.h" + inline QPixmap copy(int x, int y, int width, int height) const; + QPixmap copy(const QRect &rect = QRect()) const; + + inline void scroll(int dx, int dy, int x, int y, int width, int height, QRegion *exposed = 0); + void scroll(int dx, int dy, const QRect &rect, QRegion *exposed = 0); + + int serialNumber() const; + qint64 cacheKey() const; + + bool isDetached() const; + void detach(); + + bool isQBitmap() const; +# 197 "/usr/include/qt4/QtGui/qpixmap.h" + enum ShareMode { ImplicitlyShared, ExplicitlyShared }; + + static QPixmap fromX11Pixmap(Qt::HANDLE pixmap, ShareMode mode = ImplicitlyShared); + static int x11SetDefaultScreen(int screen); + void x11SetScreen(int screen); + const QX11Info &x11Info() const; + Qt::HANDLE x11PictureHandle() const; + + + + Qt::HANDLE handle() const; + + + QPaintEngine *paintEngine() const; + + inline bool operator!() const { return isNull(); } + +public: + int metric(PaintDeviceMetric) const; +# 239 "/usr/include/qt4/QtGui/qpixmap.h" +private: + QExplicitlySharedDataPointer data; + + bool doImageIO(QImageWriter *io, int quality) const; + + + enum Type { PixmapType, BitmapType }; + QPixmap(const QSize &s, Type); + void init(int, int, Type = PixmapType); + + QPixmap(const QSize &s, int type); + void init(int, int, int); + void deref(); + + + + + + + + + + + + friend class QPixmapData; + friend class QX11PixmapData; + friend class QMacPixmapData; + friend class QS60PixmapData; + friend class QBitmap; + friend class QPaintDevice; + friend class QPainter; + friend class QGLWidget; + friend class QX11PaintEngine; + friend class QCoreGraphicsPaintEngine; + friend class QWidgetPrivate; + friend class QRasterPaintEngine; + friend class QRasterBuffer; + friend class QPixmapCacheEntry; + + friend QDataStream &operator>>(QDataStream &, QPixmap &); + + friend qint64 qt_pixmap_id(const QPixmap &pixmap); + +public: + QPixmapData* pixmapData() const; + +public: + typedef QExplicitlySharedDataPointer DataPtr; + inline DataPtr &data_ptr() { return data; } +}; + +template <> inline bool qIsDetached(QPixmap &t) { return t.isDetached(); } template <> inline void qSwap(QPixmap &value1, QPixmap &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } + +inline QPixmap QPixmap::copy(int ax, int ay, int awidth, int aheight) const +{ + return copy(QRect(ax, ay, awidth, aheight)); +} + +inline void QPixmap::scroll(int dx, int dy, int ax, int ay, int awidth, int aheight, QRegion *exposed) +{ + scroll(dx, dy, QRect(ax, ay, awidth, aheight), exposed); +} + +inline bool QPixmap::loadFromData(const QByteArray &buf, const char *format, + Qt::ImageConversionFlags flags) +{ + return loadFromData(reinterpret_cast(buf.constData()), buf.size(), format, flags); +} + + + + + + + QDataStream &operator<<(QDataStream &, const QPixmap &); + QDataStream &operator>>(QDataStream &, QPixmap &); +# 325 "/usr/include/qt4/QtGui/qpixmap.h" + + + +# 27 "/usr/include/qt4/QtWebKit/qwebsettings.h" 2 +# 1 "/usr/include/qt4/QtGui/qicon.h" 1 +# 50 "/usr/include/qt4/QtGui/qicon.h" + + + + +typedef QtValidLicenseForGuiModule QtGuiModule; + +class QIconPrivate; +class QIconEngine; +class QIconEngineV2; + +class QIcon +{ +public: + enum Mode { Normal, Disabled, Active, Selected }; + enum State { On, Off }; + + QIcon(); + QIcon(const QPixmap &pixmap); + QIcon(const QIcon &other); + explicit QIcon(const QString &fileName); + explicit QIcon(QIconEngine *engine); + explicit QIcon(QIconEngineV2 *engine); + ~QIcon(); + QIcon &operator=(const QIcon &other); + operator QVariant() const; + + QPixmap pixmap(const QSize &size, Mode mode = Normal, State state = Off) const; + inline QPixmap pixmap(int w, int h, Mode mode = Normal, State state = Off) const + { return pixmap(QSize(w, h), mode, state); } + inline QPixmap pixmap(int extent, Mode mode = Normal, State state = Off) const + { return pixmap(QSize(extent, extent), mode, state); } + + QSize actualSize(const QSize &size, Mode mode = Normal, State state = Off) const; + + void paint(QPainter *painter, const QRect &rect, Qt::Alignment alignment = Qt::AlignCenter, Mode mode = Normal, State state = Off) const; + inline void paint(QPainter *painter, int x, int y, int w, int h, Qt::Alignment alignment = Qt::AlignCenter, Mode mode = Normal, State state = Off) const + { paint(painter, QRect(x, y, w, h), alignment, mode, state); } + + bool isNull() const; + bool isDetached() const; + void detach(); + + int serialNumber() const; + qint64 cacheKey() const; + + void addPixmap(const QPixmap &pixmap, Mode mode = Normal, State state = Off); + void addFile(const QString &fileName, const QSize &size = QSize(), Mode mode = Normal, State state = Off); + + QList availableSizes(Mode mode = Normal, State state = Off) const; + + static QIcon fromTheme(const QString &name, const QIcon &fallback = QIcon()); + static bool hasThemeIcon(const QString &name); + + static QStringList themeSearchPaths(); + static void setThemeSearchPaths(const QStringList &searchpath); + + static QString themeName(); + static void setThemeName(const QString &path); +# 124 "/usr/include/qt4/QtGui/qicon.h" + + +private: + QIconPrivate *d; + + friend QDataStream &operator<<(QDataStream &, const QIcon &); + friend QDataStream &operator>>(QDataStream &, QIcon &); + + +public: + typedef QIconPrivate * DataPtr; + inline DataPtr &data_ptr() { return d; } +}; + +template <> inline bool qIsDetached(QIcon &t) { return t.isDetached(); } template <> inline void qSwap(QIcon &value1, QIcon &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QIcon)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QIcon"; } }; + + + QDataStream &operator<<(QDataStream &, const QIcon &); + QDataStream &operator>>(QDataStream &, QIcon &); + + + + + + + + + +# 28 "/usr/include/qt4/QtWebKit/qwebsettings.h" 2 + + +namespace WebCore { + class Settings; +} + +class QWebPage; +class QWebPluginDatabase; +class QWebSettingsPrivate; + +class QUrl; + + +class QWebSettings { +public: + enum FontFamily { + StandardFont, + FixedFont, + SerifFont, + SansSerifFont, + CursiveFont, + FantasyFont + }; + enum WebAttribute { + AutoLoadImages, + JavascriptEnabled, + JavaEnabled, + PluginsEnabled, + PrivateBrowsingEnabled, + JavascriptCanOpenWindows, + JavascriptCanAccessClipboard, + DeveloperExtrasEnabled, + LinksIncludedInFocusChain, + ZoomTextOnly, + PrintElementBackgrounds, + OfflineStorageDatabaseEnabled, + OfflineWebApplicationCacheEnabled, + LocalStorageEnabled, + + LocalStorageDatabaseEnabled = LocalStorageEnabled, + + LocalContentCanAccessRemoteUrls, + DnsPrefetchEnabled + }; + enum WebGraphic { + MissingImageGraphic, + MissingPluginGraphic, + DefaultFrameIconGraphic, + TextAreaSizeGripCornerGraphic + }; + enum FontSize { + MinimumFontSize, + MinimumLogicalFontSize, + DefaultFontSize, + DefaultFixedFontSize + }; + + static QWebSettings *globalSettings(); + + void setFontFamily(FontFamily which, const QString &family); + QString fontFamily(FontFamily which) const; + void resetFontFamily(FontFamily which); + + void setFontSize(FontSize type, int size); + int fontSize(FontSize type) const; + void resetFontSize(FontSize type); + + void setAttribute(WebAttribute attr, bool on); + bool testAttribute(WebAttribute attr) const; + void resetAttribute(WebAttribute attr); + + void setUserStyleSheetUrl(const QUrl &location); + QUrl userStyleSheetUrl() const; + + void setDefaultTextEncoding(const QString &encoding); + QString defaultTextEncoding() const; + + static void setIconDatabasePath(const QString &location); + static QString iconDatabasePath(); + static void clearIconDatabase(); + static QIcon iconForUrl(const QUrl &url); + + + + static void setWebGraphic(WebGraphic type, const QPixmap &graphic); + static QPixmap webGraphic(WebGraphic type); + + static void setMaximumPagesInCache(int pages); + static int maximumPagesInCache(); + static void setObjectCacheCapacities(int cacheMinDeadCapacity, int cacheMaxDead, int totalCapacity); + + static void setOfflineStoragePath(const QString& path); + static QString offlineStoragePath(); + static void setOfflineStorageDefaultQuota(qint64 maximumSize); + static qint64 offlineStorageDefaultQuota(); + + static void setOfflineWebApplicationCachePath(const QString& path); + static QString offlineWebApplicationCachePath(); + static void setOfflineWebApplicationCacheQuota(qint64 maximumSize); + static qint64 offlineWebApplicationCacheQuota(); + + void setLocalStoragePath(const QString& path); + QString localStoragePath() const; + + static void clearMemoryCaches(); + + static void enablePersistentStorage(const QString& path = QString()); + + inline QWebSettingsPrivate* handle() const { return d; } + +private: + friend class QWebPagePrivate; + friend class QWebSettingsPrivate; + + QWebSettings(const QWebSettings &); QWebSettings &operator=(const QWebSettings &); + + QWebSettings(); + QWebSettings(WebCore::Settings *settings); + ~QWebSettings(); + + QWebSettingsPrivate *d; +}; +# 25 "/usr/include/qt4/QtWebKit/qwebpage.h" 2 + + + +# 1 "/usr/include/qt4/QtCore/qurl.h" 1 +# 47 "/usr/include/qt4/QtCore/qurl.h" +# 1 "/usr/include/qt4/QtCore/qpair.h" 1 +# 47 "/usr/include/qt4/QtCore/qpair.h" + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +template +struct QPair +{ + typedef T1 first_type; + typedef T2 second_type; + + QPair() : first(T1()), second(T2()) {} + QPair(const T1 &t1, const T2 &t2) : first(t1), second(t2) {} + + QPair &operator=(const QPair &other) + { first = other.first; second = other.second; return *this; } + + T1 first; + T2 second; +}; + +template +inline bool operator==(const QPair &p1, const QPair &p2) +{ return p1.first == p2.first && p1.second == p2.second; } + +template +inline bool operator!=(const QPair &p1, const QPair &p2) +{ return !(p1 == p2); } + +template +inline bool operator<(const QPair &p1, const QPair &p2) +{ + return p1.first < p2.first || (!(p2.first < p1.first) && p1.second < p2.second); +} + +template +inline bool operator>(const QPair &p1, const QPair &p2) +{ + return p2 < p1; +} + +template +inline bool operator<=(const QPair &p1, const QPair &p2) +{ + return !(p2 < p1); +} + +template +inline bool operator>=(const QPair &p1, const QPair &p2) +{ + return !(p1 < p2); +} + +template + QPair qMakePair(const T1 &x, const T2 &y) +{ + return QPair(x, y); +} + + +template +inline QDataStream& operator>>(QDataStream& s, QPair& p) +{ + s >> p.first >> p.second; + return s; +} + +template +inline QDataStream& operator<<(QDataStream& s, const QPair& p) +{ + s << p.first << p.second; + return s; +} + + + + + +# 48 "/usr/include/qt4/QtCore/qurl.h" 2 + + + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +class QUrlPrivate; +class QDataStream; + +class QUrl +{ +public: + enum ParsingMode { + TolerantMode, + StrictMode + }; + + + enum FormattingOption { + None = 0x0, + RemoveScheme = 0x1, + RemovePassword = 0x2, + RemoveUserInfo = RemovePassword | 0x4, + RemovePort = 0x8, + RemoveAuthority = RemoveUserInfo | RemovePort | 0x10, + RemovePath = 0x20, + RemoveQuery = 0x40, + RemoveFragment = 0x80, + + StripTrailingSlash = 0x10000 + }; + typedef QFlags FormattingOptions; + + QUrl(); + + + + QUrl(const QString &url); + QUrl(const QString &url, ParsingMode mode); + + QUrl(const QUrl ©); + QUrl &operator =(const QUrl ©); + + QUrl &operator =(const QString &url); + + ~QUrl(); + + void setUrl(const QString &url); + void setUrl(const QString &url, ParsingMode mode); + + void setEncodedUrl(const QByteArray &url); + void setEncodedUrl(const QByteArray &url, ParsingMode mode); + + + bool isValid() const; + + bool isEmpty() const; + + void clear(); + + void setScheme(const QString &scheme); + QString scheme() const; + + void setAuthority(const QString &authority); + QString authority() const; + + void setUserInfo(const QString &userInfo); + QString userInfo() const; + + void setUserName(const QString &userName); + QString userName() const; + void setEncodedUserName(const QByteArray &userName); + QByteArray encodedUserName() const; + + void setPassword(const QString &password); + QString password() const; + void setEncodedPassword(const QByteArray &password); + QByteArray encodedPassword() const; + + void setHost(const QString &host); + QString host() const; + void setEncodedHost(const QByteArray &host); + QByteArray encodedHost() const; + + void setPort(int port); + int port() const; + int port(int defaultPort) const; + + + void setPath(const QString &path); + QString path() const; + void setEncodedPath(const QByteArray &path); + QByteArray encodedPath() const; + + bool hasQuery() const; + + void setEncodedQuery(const QByteArray &query); + QByteArray encodedQuery() const; + + void setQueryDelimiters(char valueDelimiter, char pairDelimiter); + char queryValueDelimiter() const; + char queryPairDelimiter() const; + + void setQueryItems(const QList > &query); + void addQueryItem(const QString &key, const QString &value); + QList > queryItems() const; + bool hasQueryItem(const QString &key) const; + QString queryItemValue(const QString &key) const; + QStringList allQueryItemValues(const QString &key) const; + void removeQueryItem(const QString &key); + void removeAllQueryItems(const QString &key); + + void setEncodedQueryItems(const QList > &query); + void addEncodedQueryItem(const QByteArray &key, const QByteArray &value); + QList > encodedQueryItems() const; + bool hasEncodedQueryItem(const QByteArray &key) const; + QByteArray encodedQueryItemValue(const QByteArray &key) const; + QList allEncodedQueryItemValues(const QByteArray &key) const; + void removeEncodedQueryItem(const QByteArray &key); + void removeAllEncodedQueryItems(const QByteArray &key); + + void setFragment(const QString &fragment); + QString fragment() const; + void setEncodedFragment(const QByteArray &fragment); + QByteArray encodedFragment() const; + bool hasFragment() const; + + QUrl resolved(const QUrl &relative) const; + + bool isRelative() const; + bool isParentOf(const QUrl &url) const; + + static QUrl fromLocalFile(const QString &localfile); + QString toLocalFile() const; + + QString toString(FormattingOptions options = None) const; + + QByteArray toEncoded(FormattingOptions options = None) const; + static QUrl fromEncoded(const QByteArray &url); + static QUrl fromEncoded(const QByteArray &url, ParsingMode mode); + + + static QUrl fromUserInput(const QString &userInput); + + void detach(); + bool isDetached() const; + + bool operator <(const QUrl &url) const; + bool operator ==(const QUrl &url) const; + bool operator !=(const QUrl &url) const; + + static QString fromPercentEncoding(const QByteArray &); + static QByteArray toPercentEncoding(const QString &, + const QByteArray &exclude = QByteArray(), + const QByteArray &include = QByteArray()); + static QString fromPunycode(const QByteArray &); + static QByteArray toPunycode(const QString &); + static QString fromAce(const QByteArray &); + static QByteArray toAce(const QString &); + static QStringList idnWhitelist(); + static void setIdnWhitelist(const QStringList &); +# 257 "/usr/include/qt4/QtCore/qurl.h" + QString errorString() const; + +public: + + + + +private: + QUrlPrivate *d; +public: + typedef QUrlPrivate * DataPtr; + inline DataPtr &data_ptr() { return d; } +}; + +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QUrl)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QUrl"; } }; +template <> inline bool qIsDetached(QUrl &t) { return t.isDetached(); } template <> inline void qSwap(QUrl &value1, QUrl &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } +inline QFlags operator|(QUrl::FormattingOptions::enum_type f1, QUrl::FormattingOptions::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(QUrl::FormattingOptions::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QUrl::FormattingOptions::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } + + + QDataStream &operator<<(QDataStream &, const QUrl &); + QDataStream &operator>>(QDataStream &, QUrl &); + + + + QDebug operator<<(QDebug, const QUrl &); + + + + + +# 29 "/usr/include/qt4/QtWebKit/qwebpage.h" 2 +# 1 "/usr/include/qt4/QtGui/qwidget.h" 1 +# 47 "/usr/include/qt4/QtGui/qwidget.h" +# 1 "/usr/include/qt4/QtCore/qmargins.h" 1 +# 47 "/usr/include/qt4/QtCore/qmargins.h" + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +class QMargins +{ +public: + QMargins(); + QMargins(int left, int top, int right, int bottom); + + bool isNull() const; + + int left() const; + int top() const; + int right() const; + int bottom() const; + + void setLeft(int left); + void setTop(int top); + void setRight(int right); + void setBottom(int bottom); + +private: + int m_left; + int m_top; + int m_right; + int m_bottom; + + friend inline bool operator==(const QMargins &, const QMargins &); + friend inline bool operator!=(const QMargins &, const QMargins &); +}; + +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QMargins)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QMargins"; } }; + + + + + +inline QMargins::QMargins() +{ m_top = m_bottom = m_left = m_right = 0; } + +inline QMargins::QMargins(int aleft, int atop, int aright, int abottom) + : m_left(aleft), m_top(atop), m_right(aright), m_bottom(abottom) {} + +inline bool QMargins::isNull() const +{ return m_left==0 && m_top==0 && m_right==0 && m_bottom==0; } + +inline int QMargins::left() const +{ return m_left; } + +inline int QMargins::top() const +{ return m_top; } + +inline int QMargins::right() const +{ return m_right; } + +inline int QMargins::bottom() const +{ return m_bottom; } + + +inline void QMargins::setLeft(int aleft) +{ m_left = aleft; } + +inline void QMargins::setTop(int atop) +{ m_top = atop; } + +inline void QMargins::setRight(int aright) +{ m_right = aright; } + +inline void QMargins::setBottom(int abottom) +{ m_bottom = abottom; } + +inline bool operator==(const QMargins &m1, const QMargins &m2) +{ + return + m1.m_left == m2.m_left && + m1.m_top == m2.m_top && + m1.m_right == m2.m_right && + m1.m_bottom == m2.m_bottom; +} + +inline bool operator!=(const QMargins &m1, const QMargins &m2) +{ + return + m1.m_left != m2.m_left || + m1.m_top != m2.m_top || + m1.m_right != m2.m_right || + m1.m_bottom != m2.m_bottom; +} + + + QDebug operator<<(QDebug, const QMargins &); + + + + + +# 48 "/usr/include/qt4/QtGui/qwidget.h" 2 + +# 1 "/usr/include/qt4/QtGui/qpalette.h" 1 +# 47 "/usr/include/qt4/QtGui/qpalette.h" +# 1 "/usr/include/qt4/QtGui/qbrush.h" 1 +# 64 "/usr/include/qt4/QtGui/qbrush.h" + + + + +typedef QtValidLicenseForGuiModule QtGuiModule; + +struct QBrushData; +class QPixmap; +class QGradient; +class QVariant; +struct QBrushDataPointerDeleter; + +class QBrush +{ +public: + QBrush(); + QBrush(Qt::BrushStyle bs); + QBrush(const QColor &color, Qt::BrushStyle bs=Qt::SolidPattern); + QBrush(Qt::GlobalColor color, Qt::BrushStyle bs=Qt::SolidPattern); + + QBrush(const QColor &color, const QPixmap &pixmap); + QBrush(Qt::GlobalColor color, const QPixmap &pixmap); + QBrush(const QPixmap &pixmap); + QBrush(const QImage &image); + + QBrush(const QBrush &brush); + + QBrush(const QGradient &gradient); + + ~QBrush(); + QBrush &operator=(const QBrush &brush); + operator QVariant() const; + + inline Qt::BrushStyle style() const; + void setStyle(Qt::BrushStyle); + + inline const QMatrix &matrix() const; + void setMatrix(const QMatrix &mat); + + inline QTransform transform() const; + void setTransform(const QTransform &); + + QPixmap texture() const; + void setTexture(const QPixmap &pixmap); + + QImage textureImage() const; + void setTextureImage(const QImage &image); + + inline const QColor &color() const; + void setColor(const QColor &color); + inline void setColor(Qt::GlobalColor color); + + const QGradient *gradient() const; + + bool isOpaque() const; + + bool operator==(const QBrush &b) const; + inline bool operator!=(const QBrush &b) const { return !(operator==(b)); } + + + + + + + +private: + + friend class QX11PaintEngine; + + friend class QRasterPaintEngine; + friend class QRasterPaintEnginePrivate; + friend struct QSpanData; + friend class QPainter; + friend bool qHasPixmapTexture(const QBrush& brush); + void detach(Qt::BrushStyle newStyle); + void init(const QColor &color, Qt::BrushStyle bs); + QScopedPointer d; + void cleanUp(QBrushData *x); + +public: + inline bool isDetached() const; + typedef QScopedPointer DataPtr; + inline DataPtr &data_ptr() { return d; } +}; + +inline void QBrush::setColor(Qt::GlobalColor acolor) +{ setColor(QColor(acolor)); } + +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QBrush)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QBrush"; } }; +template <> inline bool qIsDetached(QBrush &t) { return t.isDetached(); } template <> inline void qSwap(QBrush &value1, QBrush &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } + + + + + + + QDataStream &operator<<(QDataStream &, const QBrush &); + QDataStream &operator>>(QDataStream &, QBrush &); + + + + QDebug operator<<(QDebug, const QBrush &); + + +struct QBrushData +{ + QAtomicInt ref; + Qt::BrushStyle style; + QColor color; + QTransform transform; +}; + +inline Qt::BrushStyle QBrush::style() const { return d->style; } +inline const QColor &QBrush::color() const { return d->color; } +inline const QMatrix &QBrush::matrix() const { return d->transform.toAffine(); } +inline QTransform QBrush::transform() const { return d->transform; } +inline bool QBrush::isDetached() const { return d->ref == 1; } +# 190 "/usr/include/qt4/QtGui/qbrush.h" +class QGradientPrivate; + +typedef QPair QGradientStop; +typedef QVector QGradientStops; + +class QGradient +{ + public: static const QMetaObject staticMetaObject; private: + +public: + enum Type { + LinearGradient, + RadialGradient, + ConicalGradient, + NoGradient + }; + + enum Spread { + PadSpread, + ReflectSpread, + RepeatSpread + }; + + enum CoordinateMode { + LogicalMode, + StretchToDeviceMode, + ObjectBoundingMode + }; + + enum InterpolationMode { + ColorInterpolation, + ComponentInterpolation + }; + + QGradient(); + + Type type() const { return m_type; } + + inline void setSpread(Spread spread); + Spread spread() const { return m_spread; } + + void setColorAt(qreal pos, const QColor &color); + + void setStops(const QGradientStops &stops); + QGradientStops stops() const; + + CoordinateMode coordinateMode() const; + void setCoordinateMode(CoordinateMode mode); + + InterpolationMode interpolationMode() const; + void setInterpolationMode(InterpolationMode mode); + + bool operator==(const QGradient &gradient) const; + inline bool operator!=(const QGradient &other) const + { return !operator==(other); } + + bool operator==(const QGradient &gradient); + +private: + friend class QLinearGradient; + friend class QRadialGradient; + friend class QConicalGradient; + + Type m_type; + Spread m_spread; + QGradientStops m_stops; + union { + struct { + qreal x1, y1, x2, y2; + } linear; + struct { + qreal cx, cy, fx, fy, radius; + } radial; + struct { + qreal cx, cy, angle; + } conical; + } m_data; + void *dummy; +}; + +inline void QGradient::setSpread(Spread aspread) +{ m_spread = aspread; } + +class QLinearGradient : public QGradient +{ +public: + QLinearGradient(); + QLinearGradient(const QPointF &start, const QPointF &finalStop); + QLinearGradient(qreal xStart, qreal yStart, qreal xFinalStop, qreal yFinalStop); + + QPointF start() const; + void setStart(const QPointF &start); + inline void setStart(qreal x, qreal y) { setStart(QPointF(x, y)); } + + QPointF finalStop() const; + void setFinalStop(const QPointF &stop); + inline void setFinalStop(qreal x, qreal y) { setFinalStop(QPointF(x, y)); } +}; + + +class QRadialGradient : public QGradient +{ +public: + QRadialGradient(); + QRadialGradient(const QPointF ¢er, qreal radius, const QPointF &focalPoint); + QRadialGradient(qreal cx, qreal cy, qreal radius, qreal fx, qreal fy); + + QRadialGradient(const QPointF ¢er, qreal radius); + QRadialGradient(qreal cx, qreal cy, qreal radius); + + QPointF center() const; + void setCenter(const QPointF ¢er); + inline void setCenter(qreal x, qreal y) { setCenter(QPointF(x, y)); } + + QPointF focalPoint() const; + void setFocalPoint(const QPointF &focalPoint); + inline void setFocalPoint(qreal x, qreal y) { setFocalPoint(QPointF(x, y)); } + + qreal radius() const; + void setRadius(qreal radius); +}; + + +class QConicalGradient : public QGradient +{ +public: + QConicalGradient(); + QConicalGradient(const QPointF ¢er, qreal startAngle); + QConicalGradient(qreal cx, qreal cy, qreal startAngle); + + QPointF center() const; + void setCenter(const QPointF ¢er); + inline void setCenter(qreal x, qreal y) { setCenter(QPointF(x, y)); } + + qreal angle() const; + void setAngle(qreal angle); +}; + + + + +# 48 "/usr/include/qt4/QtGui/qpalette.h" 2 + + + + + +typedef QtValidLicenseForGuiModule QtGuiModule; + + + + +class QPalettePrivate; +class QVariant; + +class QPalette +{ + public: static const QMetaObject staticMetaObject; private: + +public: + QPalette(); + QPalette(const QColor &button); + QPalette(Qt::GlobalColor button); + QPalette(const QColor &button, const QColor &window); + QPalette(const QBrush &windowText, const QBrush &button, const QBrush &light, + const QBrush &dark, const QBrush &mid, const QBrush &text, + const QBrush &bright_text, const QBrush &base, const QBrush &window); + QPalette(const QColor &windowText, const QColor &window, const QColor &light, + const QColor &dark, const QColor &mid, const QColor &text, const QColor &base); + + + + QPalette(const QPalette &palette); + ~QPalette(); + QPalette &operator=(const QPalette &palette); + operator QVariant() const; + + + enum ColorGroup { Active, Disabled, Inactive, NColorGroups, Current, All, Normal = Active }; + enum ColorRole { WindowText, Button, Light, Midlight, Dark, Mid, + Text, BrightText, ButtonText, Base, Window, Shadow, + Highlight, HighlightedText, + Link, LinkVisited, + AlternateBase, + NoRole, + ToolTipBase, ToolTipText, + NColorRoles = ToolTipText + 1, + Foreground = WindowText, Background = Window + }; + + inline ColorGroup currentColorGroup() const { return static_cast(current_group); } + inline void setCurrentColorGroup(ColorGroup cg) { current_group = cg; } + + inline const QColor &color(ColorGroup cg, ColorRole cr) const + { return brush(cg, cr).color(); } + const QBrush &brush(ColorGroup cg, ColorRole cr) const; + inline void setColor(ColorGroup cg, ColorRole cr, const QColor &color); + inline void setColor(ColorRole cr, const QColor &color); + inline void setBrush(ColorRole cr, const QBrush &brush); + bool isBrushSet(ColorGroup cg, ColorRole cr) const; + void setBrush(ColorGroup cg, ColorRole cr, const QBrush &brush); + void setColorGroup(ColorGroup cr, const QBrush &windowText, const QBrush &button, + const QBrush &light, const QBrush &dark, const QBrush &mid, + const QBrush &text, const QBrush &bright_text, const QBrush &base, + const QBrush &window); + bool isEqual(ColorGroup cr1, ColorGroup cr2) const; + + inline const QColor &color(ColorRole cr) const { return color(Current, cr); } + inline const QBrush &brush(ColorRole cr) const { return brush(Current, cr); } + inline const QBrush &foreground() const { return brush(WindowText); } + inline const QBrush &windowText() const { return brush(WindowText); } + inline const QBrush &button() const { return brush(Button); } + inline const QBrush &light() const { return brush(Light); } + inline const QBrush &dark() const { return brush(Dark); } + inline const QBrush &mid() const { return brush(Mid); } + inline const QBrush &text() const { return brush(Text); } + inline const QBrush &base() const { return brush(Base); } + inline const QBrush &alternateBase() const { return brush(AlternateBase); } + inline const QBrush &toolTipBase() const { return brush(ToolTipBase); } + inline const QBrush &toolTipText() const { return brush(ToolTipText); } + inline const QBrush &background() const { return brush(Window); } + inline const QBrush &window() const { return brush(Window); } + inline const QBrush &midlight() const { return brush(Midlight); } + inline const QBrush &brightText() const { return brush(BrightText); } + inline const QBrush &buttonText() const { return brush(ButtonText); } + inline const QBrush &shadow() const { return brush(Shadow); } + inline const QBrush &highlight() const { return brush(Highlight); } + inline const QBrush &highlightedText() const { return brush(HighlightedText); } + inline const QBrush &link() const { return brush(Link); } + inline const QBrush &linkVisited() const { return brush(LinkVisited); } +# 150 "/usr/include/qt4/QtGui/qpalette.h" + bool operator==(const QPalette &p) const; + inline bool operator!=(const QPalette &p) const { return !(operator==(p)); } + bool isCopyOf(const QPalette &p) const; + + int serialNumber() const; + qint64 cacheKey() const; + + QPalette resolve(const QPalette &) const; + inline uint resolve() const { return resolve_mask; } + inline void resolve(uint mask) { resolve_mask = mask; } + +private: + void setColorGroup(ColorGroup cr, const QBrush &windowText, const QBrush &button, + const QBrush &light, const QBrush &dark, const QBrush &mid, + const QBrush &text, const QBrush &bright_text, + const QBrush &base, const QBrush &alternate_base, + const QBrush &window, const QBrush &midlight, + const QBrush &button_text, const QBrush &shadow, + const QBrush &highlight, const QBrush &highlighted_text, + const QBrush &link, const QBrush &link_visited); + void setColorGroup(ColorGroup cr, const QBrush &windowText, const QBrush &button, + const QBrush &light, const QBrush &dark, const QBrush &mid, + const QBrush &text, const QBrush &bright_text, + const QBrush &base, const QBrush &alternate_base, + const QBrush &window, const QBrush &midlight, + const QBrush &button_text, const QBrush &shadow, + const QBrush &highlight, const QBrush &highlighted_text, + const QBrush &link, const QBrush &link_visited, + const QBrush &toolTipBase, const QBrush &toolTipText); + + + + + + void init(); + void detach(); + + QPalettePrivate *d; + uint current_group : 4; + uint resolve_mask : 28; + friend QDataStream &operator<<(QDataStream &s, const QPalette &p); +}; + +inline void QPalette::setColor(ColorGroup acg, ColorRole acr, + const QColor &acolor) +{ setBrush(acg, acr, QBrush(acolor)); } +inline void QPalette::setColor(ColorRole acr, const QColor &acolor) +{ setColor(All, acr, acolor); } +inline void QPalette::setBrush(ColorRole acr, const QBrush &abrush) +{ setBrush(All, acr, abrush); } +# 254 "/usr/include/qt4/QtGui/qpalette.h" + QDataStream &operator<<(QDataStream &ds, const QPalette &p); + QDataStream &operator>>(QDataStream &ds, QPalette &p); + + + + + +# 50 "/usr/include/qt4/QtGui/qwidget.h" 2 +# 1 "/usr/include/qt4/QtGui/qfont.h" 1 +# 50 "/usr/include/qt4/QtGui/qfont.h" +typedef struct FT_FaceRec_* FT_Face; + + + + + + +typedef QtValidLicenseForGuiModule QtGuiModule; + +class QFontPrivate; +class QStringList; +class QVariant; +class Q3TextFormatCollection; + +class QFont +{ + public: static const QMetaObject staticMetaObject; private: + +public: + enum StyleHint { + Helvetica, SansSerif = Helvetica, + Times, Serif = Times, + Courier, TypeWriter = Courier, + OldEnglish, Decorative = OldEnglish, + System, + AnyStyle + }; + + enum StyleStrategy { + PreferDefault = 0x0001, + PreferBitmap = 0x0002, + PreferDevice = 0x0004, + PreferOutline = 0x0008, + ForceOutline = 0x0010, + PreferMatch = 0x0020, + PreferQuality = 0x0040, + PreferAntialias = 0x0080, + NoAntialias = 0x0100, + OpenGLCompatible = 0x0200, + NoFontMerging = 0x8000 + }; + + enum Weight { + Light = 25, + Normal = 50, + DemiBold = 63, + Bold = 75, + Black = 87 + }; + + enum Style { + StyleNormal, + StyleItalic, + StyleOblique + }; + + enum Stretch { + UltraCondensed = 50, + ExtraCondensed = 62, + Condensed = 75, + SemiCondensed = 87, + Unstretched = 100, + SemiExpanded = 112, + Expanded = 125, + ExtraExpanded = 150, + UltraExpanded = 200 + }; + + enum Capitalization { + MixedCase, + AllUppercase, + AllLowercase, + SmallCaps, + Capitalize + }; + + enum SpacingType { + PercentageSpacing, + AbsoluteSpacing + }; + + enum ResolveProperties { + FamilyResolved = 0x0001, + SizeResolved = 0x0002, + StyleHintResolved = 0x0004, + StyleStrategyResolved = 0x0008, + WeightResolved = 0x0010, + StyleResolved = 0x0020, + UnderlineResolved = 0x0040, + OverlineResolved = 0x0080, + StrikeOutResolved = 0x0100, + FixedPitchResolved = 0x0200, + StretchResolved = 0x0400, + KerningResolved = 0x0800, + CapitalizationResolved = 0x1000, + LetterSpacingResolved = 0x2000, + WordSpacingResolved = 0x4000, + AllPropertiesResolved = 0x7fff + }; + + QFont(); + QFont(const QString &family, int pointSize = -1, int weight = -1, bool italic = false); + QFont(const QFont &, QPaintDevice *pd); + QFont(const QFont &); + ~QFont(); + + QString family() const; + void setFamily(const QString &); + + int pointSize() const; + void setPointSize(int); + qreal pointSizeF() const; + void setPointSizeF(qreal); + + int pixelSize() const; + void setPixelSize(int); + + int weight() const; + void setWeight(int); + + inline bool bold() const; + inline void setBold(bool); + + void setStyle(Style style); + Style style() const; + + inline bool italic() const; + inline void setItalic(bool b); + + bool underline() const; + void setUnderline(bool); + + bool overline() const; + void setOverline(bool); + + bool strikeOut() const; + void setStrikeOut(bool); + + bool fixedPitch() const; + void setFixedPitch(bool); + + bool kerning() const; + void setKerning(bool); + + StyleHint styleHint() const; + StyleStrategy styleStrategy() const; + void setStyleHint(StyleHint, StyleStrategy = PreferDefault); + void setStyleStrategy(StyleStrategy s); + + int stretch() const; + void setStretch(int); + + qreal letterSpacing() const; + SpacingType letterSpacingType() const; + void setLetterSpacing(SpacingType type, qreal spacing); + + qreal wordSpacing() const; + void setWordSpacing(qreal spacing); + + void setCapitalization(Capitalization); + Capitalization capitalization() const; + + + bool rawMode() const; + void setRawMode(bool); + + + bool exactMatch() const; + + QFont &operator=(const QFont &); + bool operator==(const QFont &) const; + bool operator!=(const QFont &) const; + bool operator<(const QFont &) const; + operator QVariant() const; + bool isCopyOf(const QFont &) const; + + + + + + Qt::HANDLE handle() const; + + + + + + FT_Face freetypeFace() const; + + + + void setRawName(const QString &); + QString rawName() const; + + QString key() const; + + QString toString() const; + bool fromString(const QString &); + + static QString substitute(const QString &); + static QStringList substitutes(const QString &); + static QStringList substitutions(); + static void insertSubstitution(const QString&, const QString &); + static void insertSubstitutions(const QString&, const QStringList &); + static void removeSubstitution(const QString &); + static void initialize(); + static void cleanup(); + + static void cacheStatistics(); + + + QString defaultFamily() const; + QString lastResortFamily() const; + QString lastResortFont() const; + + QFont resolve(const QFont &) const; + inline uint resolve() const { return resolve_mask; } + inline void resolve(uint mask) { resolve_mask = mask; } +# 276 "/usr/include/qt4/QtGui/qfont.h" +private: + QFont(QFontPrivate *); + + void detach(); + + + + + void x11SetScreen(int screen = -1); + int x11Screen() const; + + + friend class QFontPrivate; + friend class QFontDialogPrivate; + friend class QFontMetrics; + friend class QFontMetricsF; + friend class QFontInfo; + friend class QPainter; + friend class QPSPrintEngineFont; + friend class QApplication; + friend class QWidget; + friend class QWidgetPrivate; + friend class Q3TextFormatCollection; + friend class QTextLayout; + friend class QTextEngine; + friend class QStackTextEngine; + friend class QTextLine; + friend struct QScriptLine; + friend class QGLContext; + friend class QWin32PaintEngine; + friend class QAlphaPaintEngine; + friend class QPainterPath; + friend class QTextItemInt; + friend class QPicturePaintEngine; + friend class QPainterReplayer; + friend class QPaintBufferEngine; + friend class QCommandLinkButtonPrivate; + + + friend QDataStream &operator<<(QDataStream &, const QFont &); + friend QDataStream &operator>>(QDataStream &, QFont &); + + + QExplicitlySharedDataPointer d; + uint resolve_mask; +}; + + +inline bool QFont::bold() const +{ return weight() > Normal; } + + +inline void QFont::setBold(bool enable) +{ setWeight(enable ? Bold : Normal); } + +inline bool QFont::italic() const +{ + return (style() != StyleNormal); +} + +inline void QFont::setItalic(bool b) { + setStyle(b ? StyleItalic : StyleNormal); +} + + + + + + + + QDataStream &operator<<(QDataStream &, const QFont &); + QDataStream &operator>>(QDataStream &, QFont &); + + + + QDebug operator<<(QDebug, const QFont &); + + + + + +# 51 "/usr/include/qt4/QtGui/qwidget.h" 2 +# 1 "/usr/include/qt4/QtGui/qfontmetrics.h" 1 +# 51 "/usr/include/qt4/QtGui/qfontmetrics.h" + + + + +typedef QtValidLicenseForGuiModule QtGuiModule; + + + + + +class QTextCodec; +class QRect; + + +class QFontMetrics +{ +public: + QFontMetrics(const QFont &); + QFontMetrics(const QFont &, QPaintDevice *pd); + QFontMetrics(const QFontMetrics &); + ~QFontMetrics(); + + QFontMetrics &operator=(const QFontMetrics &); + + int ascent() const; + int descent() const; + int height() const; + int leading() const; + int lineSpacing() const; + int minLeftBearing() const; + int minRightBearing() const; + int maxWidth() const; + + int xHeight() const; + int averageCharWidth() const; + + bool inFont(QChar) const; + + int leftBearing(QChar) const; + int rightBearing(QChar) const; + int width(const QString &, int len = -1) const; + + int width(QChar) const; + int charWidth(const QString &str, int pos) const; + + QRect boundingRect(QChar) const; + + QRect boundingRect(const QString &text) const; + QRect boundingRect(const QRect &r, int flags, const QString &text, int tabstops=0, int *tabarray=0) const; + inline QRect boundingRect(int x, int y, int w, int h, int flags, const QString &text, + int tabstops=0, int *tabarray=0) const + { return boundingRect(QRect(x, y, w, h), flags, text, tabstops, tabarray); } + QSize size(int flags, const QString& str, int tabstops=0, int *tabarray=0) const; + + QRect tightBoundingRect(const QString &text) const; + + QString elidedText(const QString &text, Qt::TextElideMode mode, int width, int flags = 0) const; + + int underlinePos() const; + int overlinePos() const; + int strikeOutPos() const; + int lineWidth() const; + + bool operator==(const QFontMetrics &other); + bool operator==(const QFontMetrics &other) const; + inline bool operator !=(const QFontMetrics &other) { return !operator==(other); } + inline bool operator !=(const QFontMetrics &other) const { return !operator==(other); } +# 128 "/usr/include/qt4/QtGui/qfontmetrics.h" +private: + + + + friend class QFontMetricsF; + friend class QStackTextEngine; + + QExplicitlySharedDataPointer d; +}; + + +class QFontMetricsF +{ +public: + QFontMetricsF(const QFont &); + QFontMetricsF(const QFont &, QPaintDevice *pd); + QFontMetricsF(const QFontMetrics &); + QFontMetricsF(const QFontMetricsF &); + ~QFontMetricsF(); + + QFontMetricsF &operator=(const QFontMetricsF &); + QFontMetricsF &operator=(const QFontMetrics &); + + qreal ascent() const; + qreal descent() const; + qreal height() const; + qreal leading() const; + qreal lineSpacing() const; + qreal minLeftBearing() const; + qreal minRightBearing() const; + qreal maxWidth() const; + + qreal xHeight() const; + qreal averageCharWidth() const; + + bool inFont(QChar) const; + + qreal leftBearing(QChar) const; + qreal rightBearing(QChar) const; + qreal width(const QString &string) const; + + qreal width(QChar) const; + + QRectF boundingRect(const QString &string) const; + QRectF boundingRect(QChar) const; + QRectF boundingRect(const QRectF &r, int flags, const QString& string, int tabstops=0, int *tabarray=0) const; + QSizeF size(int flags, const QString& str, int tabstops=0, int *tabarray=0) const; + + QRectF tightBoundingRect(const QString &text) const; + + QString elidedText(const QString &text, Qt::TextElideMode mode, qreal width, int flags = 0) const; + + qreal underlinePos() const; + qreal overlinePos() const; + qreal strikeOutPos() const; + qreal lineWidth() const; + + bool operator==(const QFontMetricsF &other); + bool operator==(const QFontMetricsF &other) const; + inline bool operator !=(const QFontMetricsF &other) { return !operator==(other); } + inline bool operator !=(const QFontMetricsF &other) const { return !operator==(other); } + +private: + QExplicitlySharedDataPointer d; +}; + + + + +# 52 "/usr/include/qt4/QtGui/qwidget.h" 2 +# 1 "/usr/include/qt4/QtGui/qfontinfo.h" 1 +# 48 "/usr/include/qt4/QtGui/qfontinfo.h" + + + + +typedef QtValidLicenseForGuiModule QtGuiModule; + +class QFontInfo +{ +public: + QFontInfo(const QFont &); + QFontInfo(const QFontInfo &); + ~QFontInfo(); + + QFontInfo &operator=(const QFontInfo &); + + QString family() const; + int pixelSize() const; + int pointSize() const; + qreal pointSizeF() const; + bool italic() const; + QFont::Style style() const; + int weight() const; + inline bool bold() const { return weight() > QFont::Normal; } + bool underline() const; + bool overline() const; + bool strikeOut() const; + bool fixedPitch() const; + QFont::StyleHint styleHint() const; + bool rawMode() const; + + bool exactMatch() const; + +private: + QExplicitlySharedDataPointer d; +}; + + + + +# 53 "/usr/include/qt4/QtGui/qwidget.h" 2 +# 1 "/usr/include/qt4/QtGui/qsizepolicy.h" 1 +# 47 "/usr/include/qt4/QtGui/qsizepolicy.h" + + + + +typedef QtValidLicenseForGuiModule QtGuiModule; + +class QVariant; + +class QSizePolicy +{ + public: static const QMetaObject staticMetaObject; private: + + +private: + enum SizePolicyMasks { + HSize = 4, + HMask = 0x0f, + VMask = HMask << HSize, + CTShift = 9, + CTSize = 5, + WFHShift = CTShift + CTSize, + CTMask = ((0x1 << CTSize) - 1) << CTShift, + UnusedShift = CTShift + CTSize, + UnusedSize = 2 + }; + +public: + enum PolicyFlag { + GrowFlag = 1, + ExpandFlag = 2, + ShrinkFlag = 4, + IgnoreFlag = 8 + }; + + enum Policy { + Fixed = 0, + Minimum = GrowFlag, + Maximum = ShrinkFlag, + Preferred = GrowFlag | ShrinkFlag, + MinimumExpanding = GrowFlag | ExpandFlag, + Expanding = GrowFlag | ShrinkFlag | ExpandFlag, + Ignored = ShrinkFlag | GrowFlag | IgnoreFlag + }; + + enum ControlType { + DefaultType = 0x00000001, + ButtonBox = 0x00000002, + CheckBox = 0x00000004, + ComboBox = 0x00000008, + Frame = 0x00000010, + GroupBox = 0x00000020, + Label = 0x00000040, + Line = 0x00000080, + LineEdit = 0x00000100, + PushButton = 0x00000200, + RadioButton = 0x00000400, + Slider = 0x00000800, + SpinBox = 0x00001000, + TabWidget = 0x00002000, + ToolButton = 0x00004000 + }; + typedef QFlags ControlTypes; + + QSizePolicy() : data(0) { } + + + QSizePolicy(Policy horizontal, Policy vertical) + : data(horizontal | (vertical << HSize)) { } + QSizePolicy(Policy horizontal, Policy vertical, ControlType type) + : data(horizontal | (vertical << HSize)) { setControlType(type); } + + Policy horizontalPolicy() const { return static_cast(data & HMask); } + Policy verticalPolicy() const { return static_cast((data & VMask) >> HSize); } + ControlType controlType() const; + + void setHorizontalPolicy(Policy d) { data = (data & ~HMask) | d; } + void setVerticalPolicy(Policy d) { data = (data & ~(HMask << HSize)) | (d << HSize); } + void setControlType(ControlType type); + + Qt::Orientations expandingDirections() const { + Qt::Orientations result; + if (verticalPolicy() & ExpandFlag) + result |= Qt::Vertical; + if (horizontalPolicy() & ExpandFlag) + result |= Qt::Horizontal; + return result; + } + + void setHeightForWidth(bool b) { data = b ? (data | (1 << 2*HSize)) : (data & ~(1 << 2*HSize)); } + bool hasHeightForWidth() const { return data & (1 << 2*HSize); } + + bool operator==(const QSizePolicy& s) const { return data == s.data; } + bool operator!=(const QSizePolicy& s) const { return data != s.data; } + operator QVariant() const; + + int horizontalStretch() const { return data >> 24; } + int verticalStretch() const { return (data >> 16) & 0xff; } + void setHorizontalStretch(uchar stretchFactor) { data = (data&0x00ffffff) | (uint(stretchFactor)<<24); } + void setVerticalStretch(uchar stretchFactor) { data = (data&0xff00ffff) | (uint(stretchFactor)<<16); } + + void transpose(); +# 195 "/usr/include/qt4/QtGui/qsizepolicy.h" +private: + + friend QDataStream &operator<<(QDataStream &, const QSizePolicy &); + friend QDataStream &operator>>(QDataStream &, QSizePolicy &); + + QSizePolicy(int i) : data(i) { } + + quint32 data; +# 214 "/usr/include/qt4/QtGui/qsizepolicy.h" +}; + +inline QFlags operator|(QSizePolicy::ControlTypes::enum_type f1, QSizePolicy::ControlTypes::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(QSizePolicy::ControlTypes::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QSizePolicy::ControlTypes::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } + + + + QDataStream &operator<<(QDataStream &, const QSizePolicy &); + QDataStream &operator>>(QDataStream &, QSizePolicy &); + + +inline void QSizePolicy::transpose() { + Policy hData = horizontalPolicy(); + Policy vData = verticalPolicy(); + uchar hStretch = uchar(horizontalStretch()); + uchar vStretch = uchar(verticalStretch()); + setHorizontalPolicy(vData); + setVerticalPolicy(hData); + setHorizontalStretch(vStretch); + setVerticalStretch(hStretch); +} + + + + +# 54 "/usr/include/qt4/QtGui/qwidget.h" 2 + + +# 1 "/usr/include/qt4/QtGui/qcursor.h" 1 +# 48 "/usr/include/qt4/QtGui/qcursor.h" + + + + +typedef QtValidLicenseForGuiModule QtGuiModule; + +class QVariant; +# 75 "/usr/include/qt4/QtGui/qcursor.h" +class QCursorData; +class QBitmap; +class QPixmap; +# 89 "/usr/include/qt4/QtGui/qcursor.h" +class QCursor +{ +public: + QCursor(); + QCursor(Qt::CursorShape shape); + QCursor(const QBitmap &bitmap, const QBitmap &mask, int hotX=-1, int hotY=-1); + QCursor(const QPixmap &pixmap, int hotX=-1, int hotY=-1); + QCursor(const QCursor &cursor); + ~QCursor(); + QCursor &operator=(const QCursor &cursor); + operator QVariant() const; + + Qt::CursorShape shape() const; + void setShape(Qt::CursorShape newShape); + + const QBitmap *bitmap() const; + const QBitmap *mask() const; + QPixmap pixmap() const; + QPoint hotSpot() const; + + static QPoint pos(); + static void setPos(int x, int y); + inline static void setPos(const QPoint &p) { setPos(p.x(), p.y()); } +# 124 "/usr/include/qt4/QtGui/qcursor.h" + Qt::HANDLE handle() const; + QCursor(Qt::HANDLE cursor); + static int x11Screen(); +# 136 "/usr/include/qt4/QtGui/qcursor.h" +private: + QCursorData *d; +# 148 "/usr/include/qt4/QtGui/qcursor.h" +}; +# 166 "/usr/include/qt4/QtGui/qcursor.h" + QDataStream &operator<<(QDataStream &outS, const QCursor &cursor); + QDataStream &operator>>(QDataStream &inS, QCursor &cursor); + + + + + + +# 57 "/usr/include/qt4/QtGui/qwidget.h" 2 +# 1 "/usr/include/qt4/QtGui/qkeysequence.h" 1 +# 48 "/usr/include/qt4/QtGui/qkeysequence.h" + + + + +typedef QtValidLicenseForGuiModule QtGuiModule; + + + + + + + +class QKeySequence; + QDataStream &operator<<(QDataStream &in, const QKeySequence &ks); + QDataStream &operator>>(QDataStream &out, QKeySequence &ks); + + + + + + +class QVariant; +class QKeySequencePrivate; + +class QKeySequence +{ +public: + enum StandardKey { + UnknownKey, + HelpContents, + WhatsThis, + Open, + Close, + Save, + New, + Delete, + Cut, + Copy, + Paste, + Undo, + Redo, + Back, + Forward, + Refresh, + ZoomIn, + ZoomOut, + Print, + AddTab, + NextChild, + PreviousChild, + Find, + FindNext, + FindPrevious, + Replace, + SelectAll, + Bold, + Italic, + Underline, + MoveToNextChar, + MoveToPreviousChar, + MoveToNextWord, + MoveToPreviousWord, + MoveToNextLine, + MoveToPreviousLine, + MoveToNextPage, + MoveToPreviousPage, + MoveToStartOfLine, + MoveToEndOfLine, + MoveToStartOfBlock, + MoveToEndOfBlock, + MoveToStartOfDocument, + MoveToEndOfDocument, + SelectNextChar, + SelectPreviousChar, + SelectNextWord, + SelectPreviousWord, + SelectNextLine, + SelectPreviousLine, + SelectNextPage, + SelectPreviousPage, + SelectStartOfLine, + SelectEndOfLine, + SelectStartOfBlock, + SelectEndOfBlock, + SelectStartOfDocument, + SelectEndOfDocument, + DeleteStartOfWord, + DeleteEndOfWord, + DeleteEndOfLine, + InsertParagraphSeparator, + InsertLineSeparator, + SaveAs, + Preferences, + Quit + }; + + QKeySequence(); + QKeySequence(const QString &key); + QKeySequence(int k1, int k2 = 0, int k3 = 0, int k4 = 0); + QKeySequence(const QKeySequence &ks); + QKeySequence(StandardKey key); + ~QKeySequence(); + + uint count() const; + bool isEmpty() const; + + enum SequenceMatch { + NoMatch, + PartialMatch, + ExactMatch + + + + }; + + enum SequenceFormat { + NativeText, + PortableText + }; + + QString toString(SequenceFormat format = PortableText) const; + static QKeySequence fromString(const QString &str, SequenceFormat format = PortableText); + + SequenceMatch matches(const QKeySequence &seq) const; + static QKeySequence mnemonic(const QString &text); + static QList keyBindings(StandardKey key); + + + operator QString() const; + operator QVariant() const; + operator int() const; + int operator[](uint i) const; + QKeySequence &operator=(const QKeySequence &other); + bool operator==(const QKeySequence &other) const; + inline bool operator!= (const QKeySequence &other) const + { return !(*this == other); } + bool operator< (const QKeySequence &ks) const; + inline bool operator> (const QKeySequence &other) const + { return other < *this; } + inline bool operator<= (const QKeySequence &other) const + { return !(other < *this); } + inline bool operator>= (const QKeySequence &other) const + { return !(*this < other); } + + bool isDetached() const; +private: + static int decodeString(const QString &ks); + static QString encodeString(int key); + int assign(const QString &str); + void setKey(int key, int index); + + QKeySequencePrivate *d; + + friend QDataStream &operator<<(QDataStream &in, const QKeySequence &ks); + friend QDataStream &operator>>(QDataStream &in, QKeySequence &ks); + friend class Q3AccelManager; + friend class QShortcutMap; + friend class QShortcut; + +public: + typedef QKeySequencePrivate * DataPtr; + inline DataPtr &data_ptr() { return d; } +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QKeySequence)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QKeySequence"; } }; +template <> inline bool qIsDetached(QKeySequence &t) { return t.isDetached(); } template <> inline void qSwap(QKeySequence &value1, QKeySequence &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } + + + QDebug operator<<(QDebug, const QKeySequence &); +# 229 "/usr/include/qt4/QtGui/qkeysequence.h" + + + +# 58 "/usr/include/qt4/QtGui/qwidget.h" 2 + + + + + + + + + +typedef QtValidLicenseForGuiModule QtGuiModule; + +class QLayout; +class QWSRegionManager; +class QStyle; +class QAction; +class QVariant; + +class QActionEvent; +class QMouseEvent; +class QWheelEvent; +class QHoverEvent; +class QKeyEvent; +class QFocusEvent; +class QPaintEvent; +class QMoveEvent; +class QResizeEvent; +class QCloseEvent; +class QContextMenuEvent; +class QInputMethodEvent; +class QTabletEvent; +class QDragEnterEvent; +class QDragMoveEvent; +class QDragLeaveEvent; +class QDropEvent; +class QShowEvent; +class QHideEvent; +class QInputContext; +class QIcon; +class QWindowSurface; +class QLocale; +class QGraphicsProxyWidget; +class QGraphicsEffect; + +class QX11Info; + + +class QWidgetData +{ +public: + WId winid; + uint widget_attributes; + Qt::WindowFlags window_flags; + uint window_state : 4; + uint focus_policy : 4; + uint sizehint_forced :1; + uint is_closing :1; + uint in_show : 1; + uint in_set_window_state : 1; + mutable uint fstrut_dirty : 1; + uint context_menu_policy : 3; + uint window_modality : 2; + uint in_destructor : 1; + uint unused : 13; + QRect crect; + mutable QPalette pal; + QFont fnt; +# 135 "/usr/include/qt4/QtGui/qwidget.h" + QRect wrect; +}; + +class QWidgetPrivate; + +class QWidget : public QObject, public QPaintDevice +{ + public: template inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: + inline QWidgetPrivate* d_func() { return reinterpret_cast(qGetPtrHelper(d_ptr)); } inline const QWidgetPrivate* d_func() const { return reinterpret_cast(qGetPtrHelper(d_ptr)); } friend class QWidgetPrivate; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +public: + enum RenderFlag { + DrawWindowBackground = 0x1, + DrawChildren = 0x2, + IgnoreMask = 0x4 + }; + typedef QFlags RenderFlags; + + explicit QWidget(QWidget* parent = 0, Qt::WindowFlags f = 0); + + + + ~QWidget(); + + int devType() const; + + WId winId() const; + void createWinId(); + inline WId internalWinId() const { return data->winid; } + WId effectiveWinId() const; + + + QStyle *style() const; + void setStyle(QStyle *); + + + bool isTopLevel() const; + bool isWindow() const; + + bool isModal() const; + Qt::WindowModality windowModality() const; + void setWindowModality(Qt::WindowModality windowModality); + + bool isEnabled() const; + bool isEnabledTo(QWidget*) const; + bool isEnabledToTLW() const; + +public : + void setEnabled(bool); + void setDisabled(bool); + void setWindowModified(bool); + + + +public: + QRect frameGeometry() const; + const QRect &geometry() const; + QRect normalGeometry() const; + + int x() const; + int y() const; + QPoint pos() const; + QSize frameSize() const; + QSize size() const; + inline int width() const; + inline int height() const; + inline QRect rect() const; + QRect childrenRect() const; + QRegion childrenRegion() const; + + QSize minimumSize() const; + QSize maximumSize() const; + int minimumWidth() const; + int minimumHeight() const; + int maximumWidth() const; + int maximumHeight() const; + void setMinimumSize(const QSize &); + void setMinimumSize(int minw, int minh); + void setMaximumSize(const QSize &); + void setMaximumSize(int maxw, int maxh); + void setMinimumWidth(int minw); + void setMinimumHeight(int minh); + void setMaximumWidth(int maxw); + void setMaximumHeight(int maxh); + + + + + + QSize sizeIncrement() const; + void setSizeIncrement(const QSize &); + void setSizeIncrement(int w, int h); + QSize baseSize() const; + void setBaseSize(const QSize &); + void setBaseSize(int basew, int baseh); + + void setFixedSize(const QSize &); + void setFixedSize(int w, int h); + void setFixedWidth(int w); + void setFixedHeight(int h); + + + + QPoint mapToGlobal(const QPoint &) const; + QPoint mapFromGlobal(const QPoint &) const; + QPoint mapToParent(const QPoint &) const; + QPoint mapFromParent(const QPoint &) const; + QPoint mapTo(QWidget *, const QPoint &) const; + QPoint mapFrom(QWidget *, const QPoint &) const; + + QWidget *window() const; + QWidget *nativeParentWidget() const; + inline QWidget *topLevelWidget() const { return window(); } + + + const QPalette &palette() const; + void setPalette(const QPalette &); + + void setBackgroundRole(QPalette::ColorRole); + QPalette::ColorRole backgroundRole() const; + + void setForegroundRole(QPalette::ColorRole); + QPalette::ColorRole foregroundRole() const; + + const QFont &font() const; + void setFont(const QFont &); + QFontMetrics fontMetrics() const; + QFontInfo fontInfo() const; + + + QCursor cursor() const; + void setCursor(const QCursor &); + void unsetCursor(); + + + void setMouseTracking(bool enable); + bool hasMouseTracking() const; + bool underMouse() const; + + void setMask(const QBitmap &); + void setMask(const QRegion &); + QRegion mask() const; + void clearMask(); + + void render(QPaintDevice *target, const QPoint &targetOffset = QPoint(), + const QRegion &sourceRegion = QRegion(), + RenderFlags renderFlags = RenderFlags(DrawWindowBackground | DrawChildren)); + + void render(QPainter *painter, const QPoint &targetOffset = QPoint(), + const QRegion &sourceRegion = QRegion(), + RenderFlags renderFlags = RenderFlags(DrawWindowBackground | DrawChildren)); + + + QGraphicsEffect *graphicsEffect() const; + void setGraphicsEffect(QGraphicsEffect *effect); + + + void grabGesture(Qt::GestureType type, Qt::GestureFlags flags = Qt::GestureFlags()); + void ungrabGesture(Qt::GestureType type); + +public : + void setWindowTitle(const QString &); + + void setStyleSheet(const QString& styleSheet); + +public: + + QString styleSheet() const; + + QString windowTitle() const; + void setWindowIcon(const QIcon &icon); + QIcon windowIcon() const; + void setWindowIconText(const QString &); + QString windowIconText() const; + void setWindowRole(const QString &); + QString windowRole() const; + void setWindowFilePath(const QString &filePath); + QString windowFilePath() const; + + void setWindowOpacity(qreal level); + qreal windowOpacity() const; + + bool isWindowModified() const; + + void setToolTip(const QString &); + QString toolTip() const; + + + void setStatusTip(const QString &); + QString statusTip() const; + + + void setWhatsThis(const QString &); + QString whatsThis() const; +# 408 "/usr/include/qt4/QtGui/qwidget.h" + void setLayoutDirection(Qt::LayoutDirection direction); + Qt::LayoutDirection layoutDirection() const; + void unsetLayoutDirection(); + + void setLocale(const QLocale &locale); + QLocale locale() const; + void unsetLocale(); + + inline bool isRightToLeft() const { return layoutDirection() == Qt::RightToLeft; } + inline bool isLeftToRight() const { return layoutDirection() == Qt::LeftToRight; } + +public : + inline void setFocus() { setFocus(Qt::OtherFocusReason); } + +public: + bool isActiveWindow() const; + void activateWindow(); + void clearFocus(); + + void setFocus(Qt::FocusReason reason); + Qt::FocusPolicy focusPolicy() const; + void setFocusPolicy(Qt::FocusPolicy policy); + bool hasFocus() const; + static void setTabOrder(QWidget *, QWidget *); + void setFocusProxy(QWidget *); + QWidget *focusProxy() const; + Qt::ContextMenuPolicy contextMenuPolicy() const; + void setContextMenuPolicy(Qt::ContextMenuPolicy policy); + + + void grabMouse(); + + void grabMouse(const QCursor &); + + void releaseMouse(); + void grabKeyboard(); + void releaseKeyboard(); + + int grabShortcut(const QKeySequence &key, Qt::ShortcutContext context = Qt::WindowShortcut); + void releaseShortcut(int id); + void setShortcutEnabled(int id, bool enable = true); + void setShortcutAutoRepeat(int id, bool enable = true); + + static QWidget *mouseGrabber(); + static QWidget *keyboardGrabber(); + + + inline bool updatesEnabled() const; + void setUpdatesEnabled(bool enable); + + + + + + + QGraphicsProxyWidget *graphicsProxyWidget() const; + + +public : + void update(); + void repaint(); + +public: + inline void update(int x, int y, int w, int h); + void update(const QRect&); + void update(const QRegion&); + + void repaint(int x, int y, int w, int h); + void repaint(const QRect &); + void repaint(const QRegion &); + +public : + + + virtual void setVisible(bool visible); + inline void setHidden(bool hidden) { setVisible(!hidden); } + + inline void show() { setVisible(true); } + + + + inline void hide() { setVisible(false); } + inline void setShown(bool shown) { setVisible(shown); } + + void showMinimized(); + void showMaximized(); + void showFullScreen(); + void showNormal(); + + bool close(); + void raise(); + void lower(); + +public: + void stackUnder(QWidget*); + void move(int x, int y); + void move(const QPoint &); + void resize(int w, int h); + void resize(const QSize &); + inline void setGeometry(int x, int y, int w, int h); + void setGeometry(const QRect &); + QByteArray saveGeometry() const; + bool restoreGeometry(const QByteArray &geometry); + void adjustSize(); + bool isVisible() const; + bool isVisibleTo(QWidget*) const; + + inline bool isHidden() const; + + bool isMinimized() const; + bool isMaximized() const; + bool isFullScreen() const; + + Qt::WindowStates windowState() const; + void setWindowState(Qt::WindowStates state); + void overrideWindowState(Qt::WindowStates state); + + virtual QSize sizeHint() const; + virtual QSize minimumSizeHint() const; + + QSizePolicy sizePolicy() const; + void setSizePolicy(QSizePolicy); + inline void setSizePolicy(QSizePolicy::Policy horizontal, QSizePolicy::Policy vertical); + virtual int heightForWidth(int) const; + + QRegion visibleRegion() const; + + void setContentsMargins(int left, int top, int right, int bottom); + void setContentsMargins(const QMargins &margins); + void getContentsMargins(int *left, int *top, int *right, int *bottom) const; + QMargins contentsMargins() const; + + QRect contentsRect() const; + +public: + QLayout *layout() const; + void setLayout(QLayout *); + void updateGeometry(); + + void setParent(QWidget *parent); + void setParent(QWidget *parent, Qt::WindowFlags f); + + void scroll(int dx, int dy); + void scroll(int dx, int dy, const QRect&); + + + + QWidget *focusWidget() const; + QWidget *nextInFocusChain() const; + QWidget *previousInFocusChain() const; + + + bool acceptDrops() const; + void setAcceptDrops(bool on); + + + + void addAction(QAction *action); + void addActions(QList actions); + void insertAction(QAction *before, QAction *action); + void insertActions(QAction *before, QList actions); + void removeAction(QAction *action); + QList actions() const; + + + QWidget *parentWidget() const; + + void setWindowFlags(Qt::WindowFlags type); + inline Qt::WindowFlags windowFlags() const; + void overrideWindowFlags(Qt::WindowFlags type); + + inline Qt::WindowType windowType() const; + + static QWidget *find(WId); + + + + inline QWidget *childAt(int x, int y) const; + QWidget *childAt(const QPoint &p) const; + + + const QX11Info &x11Info() const; + Qt::HANDLE x11PictureHandle() const; +# 602 "/usr/include/qt4/QtGui/qwidget.h" + Qt::HANDLE handle() const; + + + void setAttribute(Qt::WidgetAttribute, bool on = true); + inline bool testAttribute(Qt::WidgetAttribute) const; + + QPaintEngine *paintEngine() const; + + void ensurePolished() const; + + QInputContext *inputContext(); + void setInputContext(QInputContext *); + + bool isAncestorOf(const QWidget *child) const; + + + + + + + bool autoFillBackground() const; + void setAutoFillBackground(bool enabled); + + void setWindowSurface(QWindowSurface *surface); + QWindowSurface *windowSurface() const; + +public: + void customContextMenuRequested(const QPoint &pos); + +public: + + bool event(QEvent *); + virtual void mousePressEvent(QMouseEvent *); + virtual void mouseReleaseEvent(QMouseEvent *); + virtual void mouseDoubleClickEvent(QMouseEvent *); + virtual void mouseMoveEvent(QMouseEvent *); + + virtual void wheelEvent(QWheelEvent *); + + virtual void keyPressEvent(QKeyEvent *); + virtual void keyReleaseEvent(QKeyEvent *); + virtual void focusInEvent(QFocusEvent *); + virtual void focusOutEvent(QFocusEvent *); + virtual void enterEvent(QEvent *); + virtual void leaveEvent(QEvent *); + virtual void paintEvent(QPaintEvent *); + virtual void moveEvent(QMoveEvent *); + virtual void resizeEvent(QResizeEvent *); + virtual void closeEvent(QCloseEvent *); + + virtual void contextMenuEvent(QContextMenuEvent *); + + + virtual void tabletEvent(QTabletEvent *); + + + virtual void actionEvent(QActionEvent *); + + + + virtual void dragEnterEvent(QDragEnterEvent *); + virtual void dragMoveEvent(QDragMoveEvent *); + virtual void dragLeaveEvent(QDragLeaveEvent *); + virtual void dropEvent(QDropEvent *); + + + virtual void showEvent(QShowEvent *); + virtual void hideEvent(QHideEvent *); +# 678 "/usr/include/qt4/QtGui/qwidget.h" + virtual bool x11Event(XEvent *); + + + + + + + virtual void changeEvent(QEvent *); + + int metric(PaintDeviceMetric) const; + + virtual void inputMethodEvent(QInputMethodEvent *); +public: + virtual QVariant inputMethodQuery(Qt::InputMethodQuery) const; + + Qt::InputMethodHints inputMethodHints() const; + void setInputMethodHints(Qt::InputMethodHints hints); + +public: + void resetInputContext(); +public : + void updateMicroFocus(); +public: + + void create(WId = 0, bool initializeWindow = true, + bool destroyOldWindow = true); + void destroy(bool destroyWindow = true, + bool destroySubWindows = true); + + virtual bool focusNextPrevChild(bool next); + inline bool focusNextChild() { return focusNextPrevChild(true); } + inline bool focusPreviousChild() { return focusNextPrevChild(false); } + +public: + QWidget(QWidgetPrivate &d, QWidget* parent, Qt::WindowFlags f); +private: + + bool testAttribute_helper(Qt::WidgetAttribute) const; + + QLayout *takeLayout(); + + friend class QBackingStoreDevice; + friend class QWidgetBackingStore; + friend class QApplication; + friend class QApplicationPrivate; + friend class QBaseApplication; + friend class QPainter; + friend class QPainterPrivate; + friend class QPixmap; + friend class QFontMetrics; + friend class QFontInfo; + friend class QETWidget; + friend class QLayout; + friend class QWidgetItem; + friend class QWidgetItemV2; + friend class QGLContext; + friend class QGLWidget; + friend class QGLWindowSurface; + friend class QX11PaintEngine; + friend class QWin32PaintEngine; + friend class QShortcutPrivate; + friend class QShortcutMap; + friend class QWindowSurface; + friend class QGraphicsProxyWidget; + friend class QGraphicsProxyWidgetPrivate; + friend class QStyleSheetStyle; + friend struct QWidgetExceptionCleaner; + friend class QGestureManager; + friend class QWinNativePanGestureRecognizer; + friend class QWidgetEffectSourcePrivate; +# 774 "/usr/include/qt4/QtGui/qwidget.h" + friend void qt_net_update_user_time(QWidget *tlw, unsigned long timestamp); + friend void qt_net_remove_user_time(QWidget *tlw); + + + friend QWidgetData *qt_qwidget_data(QWidget *widget); + friend QWidgetPrivate *qt_widget_private(QWidget *widget); + +private: + QWidget(const QWidget &); QWidget &operator=(const QWidget &); + + + + + + QWidgetData *data; +# 885 "/usr/include/qt4/QtGui/qwidget.h" +public: + virtual void styleChange(QStyle&); + virtual void enabledChange(bool); + virtual void paletteChange(const QPalette &); + virtual void fontChange(const QFont &); + virtual void windowActivationChange(bool); + virtual void languageChange(); +}; + +inline QFlags operator|(QWidget::RenderFlags::enum_type f1, QWidget::RenderFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(QWidget::RenderFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QWidget::RenderFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +# 903 "/usr/include/qt4/QtGui/qwidget.h" +template <> inline QWidget *qobject_cast(QObject *o) +{ + if (!o || !o->isWidgetType()) return 0; + return static_cast(o); +} +template <> inline const QWidget *qobject_cast(const QObject *o) +{ + if (!o || !o->isWidgetType()) return 0; + return static_cast(o); +} + + +inline QWidget *QWidget::childAt(int ax, int ay) const +{ return childAt(QPoint(ax, ay)); } + +inline Qt::WindowType QWidget::windowType() const +{ return static_cast(int(data->window_flags & Qt::WindowType_Mask)); } +inline Qt::WindowFlags QWidget::windowFlags() const +{ return data->window_flags; } + +inline bool QWidget::isTopLevel() const +{ return (windowType() & Qt::Window); } + +inline bool QWidget::isWindow() const +{ return (windowType() & Qt::Window); } + +inline bool QWidget::isEnabled() const +{ return !testAttribute(Qt::WA_Disabled); } + +inline bool QWidget::isModal() const +{ return data->window_modality != Qt::NonModal; } + +inline bool QWidget::isEnabledToTLW() const +{ return isEnabled(); } + +inline int QWidget::minimumWidth() const +{ return minimumSize().width(); } + +inline int QWidget::minimumHeight() const +{ return minimumSize().height(); } + +inline int QWidget::maximumWidth() const +{ return maximumSize().width(); } + +inline int QWidget::maximumHeight() const +{ return maximumSize().height(); } + +inline void QWidget::setMinimumSize(const QSize &s) +{ setMinimumSize(s.width(),s.height()); } + +inline void QWidget::setMaximumSize(const QSize &s) +{ setMaximumSize(s.width(),s.height()); } + +inline void QWidget::setSizeIncrement(const QSize &s) +{ setSizeIncrement(s.width(),s.height()); } + +inline void QWidget::setBaseSize(const QSize &s) +{ setBaseSize(s.width(),s.height()); } + +inline const QFont &QWidget::font() const +{ return data->fnt; } + +inline QFontMetrics QWidget::fontMetrics() const +{ return QFontMetrics(data->fnt); } + +inline QFontInfo QWidget::fontInfo() const +{ return QFontInfo(data->fnt); } + +inline void QWidget::setMouseTracking(bool enable) +{ setAttribute(Qt::WA_MouseTracking, enable); } + +inline bool QWidget::hasMouseTracking() const +{ return testAttribute(Qt::WA_MouseTracking); } + +inline bool QWidget::underMouse() const +{ return testAttribute(Qt::WA_UnderMouse); } + +inline bool QWidget::updatesEnabled() const +{ return !testAttribute(Qt::WA_UpdatesDisabled); } + +inline void QWidget::update(int ax, int ay, int aw, int ah) +{ update(QRect(ax, ay, aw, ah)); } + +inline bool QWidget::isVisible() const +{ return testAttribute(Qt::WA_WState_Visible); } + +inline bool QWidget::isHidden() const +{ return testAttribute(Qt::WA_WState_Hidden); } + +inline void QWidget::move(int ax, int ay) +{ move(QPoint(ax, ay)); } + +inline void QWidget::resize(int w, int h) +{ resize(QSize(w, h)); } + +inline void QWidget::setGeometry(int ax, int ay, int aw, int ah) +{ setGeometry(QRect(ax, ay, aw, ah)); } + +inline QRect QWidget::rect() const +{ return QRect(0,0,data->crect.width(),data->crect.height()); } + +inline const QRect &QWidget::geometry() const +{ return data->crect; } + +inline QSize QWidget::size() const +{ return data->crect.size(); } + +inline int QWidget::width() const +{ return data->crect.width(); } + +inline int QWidget::height() const +{ return data->crect.height(); } + +inline QWidget *QWidget::parentWidget() const +{ return static_cast(QObject::parent()); } + +inline void QWidget::setSizePolicy(QSizePolicy::Policy hor, QSizePolicy::Policy ver) +{ setSizePolicy(QSizePolicy(hor, ver)); } + +inline bool QWidget::testAttribute(Qt::WidgetAttribute attribute) const +{ + if (attribute < int(8*sizeof(uint))) + return data->widget_attributes & (1< inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: + + + + + + + + + + +public: + enum NavigationType { + NavigationTypeLinkClicked, + NavigationTypeFormSubmitted, + NavigationTypeBackOrForward, + NavigationTypeReload, + NavigationTypeFormResubmitted, + NavigationTypeOther + }; + + enum WebAction { + NoWebAction = - 1, + + OpenLink, + + OpenLinkInNewWindow, + OpenFrameInNewWindow, + + DownloadLinkToDisk, + CopyLinkToClipboard, + + OpenImageInNewWindow, + DownloadImageToDisk, + CopyImageToClipboard, + + Back, + Forward, + Stop, + Reload, + + Cut, + Copy, + Paste, + + Undo, + Redo, + MoveToNextChar, + MoveToPreviousChar, + MoveToNextWord, + MoveToPreviousWord, + MoveToNextLine, + MoveToPreviousLine, + MoveToStartOfLine, + MoveToEndOfLine, + MoveToStartOfBlock, + MoveToEndOfBlock, + MoveToStartOfDocument, + MoveToEndOfDocument, + SelectNextChar, + SelectPreviousChar, + SelectNextWord, + SelectPreviousWord, + SelectNextLine, + SelectPreviousLine, + SelectStartOfLine, + SelectEndOfLine, + SelectStartOfBlock, + SelectEndOfBlock, + SelectStartOfDocument, + SelectEndOfDocument, + DeleteStartOfWord, + DeleteEndOfWord, + + SetTextDirectionDefault, + SetTextDirectionLeftToRight, + SetTextDirectionRightToLeft, + + ToggleBold, + ToggleItalic, + ToggleUnderline, + + InspectElement, + + InsertParagraphSeparator, + InsertLineSeparator, + + SelectAll, + ReloadAndBypassCache, + + PasteAndMatchStyle, + RemoveFormat, + + ToggleStrikethrough, + ToggleSubscript, + ToggleSuperscript, + InsertUnorderedList, + InsertOrderedList, + Indent, + Outdent, + + AlignCenter, + AlignJustified, + AlignLeft, + AlignRight, + + WebActionCount + }; + + enum FindFlag { + FindBackward = 1, + FindCaseSensitively = 2, + FindWrapsAroundDocument = 4, + HighlightAllOccurrences = 8 + }; + typedef QFlags FindFlags; + + enum LinkDelegationPolicy { + DontDelegateLinks, + DelegateExternalLinks, + DelegateAllLinks + }; + + enum WebWindowType { + WebBrowserWindow, + WebModalDialog + }; + + explicit QWebPage(QObject *parent = 0); + ~QWebPage(); + + QWebFrame *mainFrame() const; + QWebFrame *currentFrame() const; + QWebFrame* frameAt(const QPoint& pos) const; + + QWebHistory *history() const; + QWebSettings *settings() const; + + void setView(QWidget *view); + QWidget *view() const; + + bool isModified() const; + + QUndoStack *undoStack() const; +# 222 "/usr/include/qt4/QtWebKit/qwebpage.h" + void setNetworkAccessManager(QNetworkAccessManager *manager); + QNetworkAccessManager *networkAccessManager() const; + + + void setPluginFactory(QWebPluginFactory *factory); + QWebPluginFactory *pluginFactory() const; + + quint64 totalBytes() const; + quint64 bytesReceived() const; + + QString selectedText() const; + + QAction *action(WebAction action) const; + virtual void triggerAction(WebAction action, bool checked = false); + + QSize viewportSize() const; + void setViewportSize(const QSize &size) const; + + QSize preferredContentsSize() const; + void setPreferredContentsSize(const QSize &size) const; + + virtual bool event(QEvent*); + bool focusNextPrevChild(bool next); + + QVariant inputMethodQuery(Qt::InputMethodQuery property) const; + + bool findText(const QString &subString, FindFlags options = 0); + + void setForwardUnsupportedContent(bool forward); + bool forwardUnsupportedContent() const; + + void setLinkDelegationPolicy(LinkDelegationPolicy policy); + LinkDelegationPolicy linkDelegationPolicy() const; + + void setPalette(const QPalette &palette); + QPalette palette() const; + + void setContentEditable(bool editable); + bool isContentEditable() const; + + + bool swallowContextMenuEvent(QContextMenuEvent *event); + + void updatePositionDependentActions(const QPoint &pos); + + QMenu *createStandardContextMenu(); + + enum Extension { + ChooseMultipleFilesExtension, + ErrorPageExtension + }; + class ExtensionOption + {}; + class ExtensionReturn + {}; + + class ChooseMultipleFilesExtensionOption : public ExtensionOption { + public: + QWebFrame *parentFrame; + QStringList suggestedFileNames; + }; + + class ChooseMultipleFilesExtensionReturn : public ExtensionReturn { + public: + QStringList fileNames; + }; + + enum ErrorDomain { QtNetwork, Http, WebKit }; + class ErrorPageExtensionOption : public ExtensionOption { + public: + QUrl url; + QWebFrame* frame; + ErrorDomain domain; + int error; + QString errorString; + }; + + class ErrorPageExtensionReturn : public ExtensionReturn { + public: + ErrorPageExtensionReturn() : contentType(QLatin1String("text/html")), encoding(QLatin1String("utf-8")) {}; + QString contentType; + QString encoding; + QUrl baseUrl; + QByteArray content; + }; + + + virtual bool extension(Extension extension, const ExtensionOption *option = 0, ExtensionReturn *output = 0); + virtual bool supportsExtension(Extension extension) const; + + inline QWebPagePrivate* handle() const { return d; } + +public : + bool shouldInterruptJavaScript(); + +public: + void loadStarted(); + void loadProgress(int progress); + void loadFinished(bool ok); + + void linkHovered(const QString &link, const QString &title, const QString &textContent); + void statusBarMessage(const QString& text); + void selectionChanged(); + void frameCreated(QWebFrame *frame); + void geometryChangeRequested(const QRect& geom); + void repaintRequested(const QRect& dirtyRect); + void scrollRequested(int dx, int dy, const QRect& scrollViewRect); + void windowCloseRequested(); + void printRequested(QWebFrame *frame); + void linkClicked(const QUrl &url); + + void toolBarVisibilityChangeRequested(bool visible); + void statusBarVisibilityChangeRequested(bool visible); + void menuBarVisibilityChangeRequested(bool visible); + + + void unsupportedContent(QNetworkReply *reply); + void downloadRequested(const QNetworkRequest &request); + + + void microFocusChanged(); + void contentsChanged(); + void databaseQuotaExceeded(QWebFrame* frame, QString databaseName); + + void saveFrameStateRequested(QWebFrame* frame, QWebHistoryItem* item); + void restoreFrameStateRequested(QWebFrame* frame); + +public: + virtual QWebPage *createWindow(WebWindowType type); + virtual QObject *createPlugin(const QString &classid, const QUrl &url, const QStringList ¶mNames, const QStringList ¶mValues); + + + virtual bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type); + + + + virtual QString chooseFile(QWebFrame *originatingFrame, const QString& oldFile); + virtual void javaScriptAlert(QWebFrame *originatingFrame, const QString& msg); + virtual bool javaScriptConfirm(QWebFrame *originatingFrame, const QString& msg); + virtual bool javaScriptPrompt(QWebFrame *originatingFrame, const QString& msg, const QString& defaultValue, QString* result); + virtual void javaScriptConsoleMessage(const QString& message, int lineNumber, const QString& sourceID); + + virtual QString userAgentForUrl(const QUrl& url) const; + +private: + + + + + QWebPagePrivate *d; + + friend class QWebFrame; + friend class QWebPagePrivate; + friend class QWebView; + friend class QGraphicsWebView; + friend class QWebInspector; + friend class WebCore::ChromeClientQt; + friend class WebCore::EditorClientQt; + friend class WebCore::FrameLoaderClientQt; + friend class WebCore::InspectorClientQt; + friend class WebCore::ResourceHandle; + friend class WebCore::QNetworkReplyHandler; +}; + +inline QFlags operator|(QWebPage::FindFlags::enum_type f1, QWebPage::FindFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(QWebPage::FindFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QWebPage::FindFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +# 29 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3_build/PySide/QtWebKit/PySide/QtWebKit/qwebpage_extensionoption_wrapper.cpp" 2 + + + + + +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/pyside.hpp" 1 +# 26 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/pyside.hpp" +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/pyside_global.hpp" 1 +# 27 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/pyside.hpp" 2 +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/boost_headers.hpp" 1 +# 27 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/boost_headers.hpp" +# 1 "/usr/include/boost-1_42/boost/python.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python.hpp" +# 1 "/usr/include/boost-1_42/boost/python/args.hpp" 1 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/prefix.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/detail/prefix.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/wrap_python.hpp" 1 +# 50 "/usr/include/boost-1_42/boost/python/detail/wrap_python.hpp" +# 1 "/usr/include/python2.6/pyconfig.h" 1 +# 51 "/usr/include/boost-1_42/boost/python/detail/wrap_python.hpp" 2 +# 61 "/usr/include/boost-1_42/boost/python/detail/wrap_python.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include-fixed/limits.h" 1 3 4 +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include-fixed/limits.h" 3 4 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include-fixed/syslimits.h" 1 3 4 + + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include-fixed/limits.h" 1 3 4 +# 169 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include-fixed/limits.h" 3 4 +# 1 "/usr/include/limits.h" 1 3 4 +# 145 "/usr/include/limits.h" 3 4 +# 1 "/usr/include/bits/posix1_lim.h" 1 3 4 +# 157 "/usr/include/bits/posix1_lim.h" 3 4 +# 1 "/usr/include/bits/local_lim.h" 1 3 4 +# 39 "/usr/include/bits/local_lim.h" 3 4 +# 1 "/usr/include/linux/limits.h" 1 3 4 +# 40 "/usr/include/bits/local_lim.h" 2 3 4 +# 158 "/usr/include/bits/posix1_lim.h" 2 3 4 +# 146 "/usr/include/limits.h" 2 3 4 + + + +# 1 "/usr/include/bits/posix2_lim.h" 1 3 4 +# 150 "/usr/include/limits.h" 2 3 4 + + + +# 1 "/usr/include/bits/xopen_lim.h" 1 3 4 +# 34 "/usr/include/bits/xopen_lim.h" 3 4 +# 1 "/usr/include/bits/stdio_lim.h" 1 3 4 +# 35 "/usr/include/bits/xopen_lim.h" 2 3 4 +# 154 "/usr/include/limits.h" 2 3 4 +# 170 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include-fixed/limits.h" 2 3 4 +# 8 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include-fixed/syslimits.h" 2 3 4 +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include-fixed/limits.h" 2 3 4 +# 62 "/usr/include/boost-1_42/boost/python/detail/wrap_python.hpp" 2 +# 75 "/usr/include/boost-1_42/boost/python/detail/wrap_python.hpp" +# 1 "/usr/include/python2.6/patchlevel.h" 1 +# 76 "/usr/include/boost-1_42/boost/python/detail/wrap_python.hpp" 2 +# 142 "/usr/include/boost-1_42/boost/python/detail/wrap_python.hpp" +# 1 "/usr/include/python2.6/Python.h" 1 + + + + + + +# 1 "/usr/include/python2.6/patchlevel.h" 1 +# 8 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/pyconfig.h" 1 +# 9 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/pymacconfig.h" 1 +# 10 "/usr/include/python2.6/Python.h" 2 +# 19 "/usr/include/python2.6/Python.h" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include-fixed/limits.h" 1 3 4 +# 20 "/usr/include/python2.6/Python.h" 2 +# 33 "/usr/include/python2.6/Python.h" +# 1 "/usr/include/stdio.h" 1 3 4 +# 30 "/usr/include/stdio.h" 3 4 +extern "C" { + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 35 "/usr/include/stdio.h" 2 3 4 +# 75 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/libio.h" 1 3 4 +# 32 "/usr/include/libio.h" 3 4 +# 1 "/usr/include/_G_config.h" 1 3 4 +# 15 "/usr/include/_G_config.h" 3 4 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 16 "/usr/include/_G_config.h" 2 3 4 + + + + +# 1 "/usr/include/wchar.h" 1 3 4 +# 21 "/usr/include/_G_config.h" 2 3 4 + +typedef struct +{ + __off_t __pos; + __mbstate_t __state; +} _G_fpos_t; +typedef struct +{ + __off64_t __pos; + __mbstate_t __state; +} _G_fpos64_t; +# 53 "/usr/include/_G_config.h" 3 4 +typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); +typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); +# 33 "/usr/include/libio.h" 2 3 4 +# 170 "/usr/include/libio.h" 3 4 +struct _IO_jump_t; struct _IO_FILE; +# 180 "/usr/include/libio.h" 3 4 +typedef void _IO_lock_t; + + + + + +struct _IO_marker { + struct _IO_marker *_next; + struct _IO_FILE *_sbuf; + + + + int _pos; +# 203 "/usr/include/libio.h" 3 4 +}; + + +enum __codecvt_result +{ + __codecvt_ok, + __codecvt_partial, + __codecvt_error, + __codecvt_noconv +}; +# 271 "/usr/include/libio.h" 3 4 +struct _IO_FILE { + int _flags; + + + + + char* _IO_read_ptr; + char* _IO_read_end; + char* _IO_read_base; + char* _IO_write_base; + char* _IO_write_ptr; + char* _IO_write_end; + char* _IO_buf_base; + char* _IO_buf_end; + + char *_IO_save_base; + char *_IO_backup_base; + char *_IO_save_end; + + struct _IO_marker *_markers; + + struct _IO_FILE *_chain; + + int _fileno; + + + + int _flags2; + + __off_t _old_offset; + + + + unsigned short _cur_column; + signed char _vtable_offset; + char _shortbuf[1]; + + + + _IO_lock_t *_lock; +# 319 "/usr/include/libio.h" 3 4 + __off64_t _offset; +# 328 "/usr/include/libio.h" 3 4 + void *__pad1; + void *__pad2; + void *__pad3; + void *__pad4; + size_t __pad5; + + int _mode; + + char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; + +}; + + + + + +struct _IO_FILE_plus; + +extern struct _IO_FILE_plus _IO_2_1_stdin_; +extern struct _IO_FILE_plus _IO_2_1_stdout_; +extern struct _IO_FILE_plus _IO_2_1_stderr_; +# 364 "/usr/include/libio.h" 3 4 +typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); + + + + + + + +typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, + size_t __n); + + + + + + + +typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); + + +typedef int __io_close_fn (void *__cookie); + + + + +typedef __io_read_fn cookie_read_function_t; +typedef __io_write_fn cookie_write_function_t; +typedef __io_seek_fn cookie_seek_function_t; +typedef __io_close_fn cookie_close_function_t; + + +typedef struct +{ + __io_read_fn *read; + __io_write_fn *write; + __io_seek_fn *seek; + __io_close_fn *close; +} _IO_cookie_io_functions_t; +typedef _IO_cookie_io_functions_t cookie_io_functions_t; + +struct _IO_cookie_file; + + +extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, + void *__cookie, _IO_cookie_io_functions_t __fns); + + + + +extern "C" { + + +extern int __underflow (_IO_FILE *); +extern int __uflow (_IO_FILE *); +extern int __overflow (_IO_FILE *, int); +# 460 "/usr/include/libio.h" 3 4 +extern int _IO_getc (_IO_FILE *__fp); +extern int _IO_putc (int __c, _IO_FILE *__fp); +extern int _IO_feof (_IO_FILE *__fp) throw (); +extern int _IO_ferror (_IO_FILE *__fp) throw (); + +extern int _IO_peekc_locked (_IO_FILE *__fp); + + + + + +extern void _IO_flockfile (_IO_FILE *) throw (); +extern void _IO_funlockfile (_IO_FILE *) throw (); +extern int _IO_ftrylockfile (_IO_FILE *) throw (); +# 490 "/usr/include/libio.h" 3 4 +extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, + __gnuc_va_list, int *__restrict); +extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, + __gnuc_va_list); +extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); +extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); + +extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); +extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); + +extern void _IO_free_backup_area (_IO_FILE *) throw (); +# 552 "/usr/include/libio.h" 3 4 +} +# 76 "/usr/include/stdio.h" 2 3 4 +# 89 "/usr/include/stdio.h" 3 4 + + +typedef _G_fpos_t fpos_t; + + + + + +typedef _G_fpos64_t fpos64_t; +# 141 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/bits/stdio_lim.h" 1 3 4 +# 142 "/usr/include/stdio.h" 2 3 4 + + + +extern struct _IO_FILE *stdin; +extern struct _IO_FILE *stdout; +extern struct _IO_FILE *stderr; + + + + + + + +extern int remove (__const char *__filename) throw (); + +extern int rename (__const char *__old, __const char *__new) throw (); + + + + +extern int renameat (int __oldfd, __const char *__old, int __newfd, + __const char *__new) throw (); + + + + + + + + +extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__)); +# 182 "/usr/include/stdio.h" 3 4 +extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__)); + + + +extern char *tmpnam (char *__s) throw () __attribute__ ((__warn_unused_result__)); + + + + + +extern char *tmpnam_r (char *__s) throw () __attribute__ ((__warn_unused_result__)); +# 204 "/usr/include/stdio.h" 3 4 +extern char *tempnam (__const char *__dir, __const char *__pfx) + throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fclose (FILE *__stream); + + + + +extern int fflush (FILE *__stream); + +# 229 "/usr/include/stdio.h" 3 4 +extern int fflush_unlocked (FILE *__stream); +# 239 "/usr/include/stdio.h" 3 4 +extern int fcloseall (void); + + + + + + + + + +extern FILE *fopen (__const char *__restrict __filename, + __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *freopen (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +# 272 "/usr/include/stdio.h" 3 4 + + +extern FILE *fopen64 (__const char *__restrict __filename, + __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); +extern FILE *freopen64 (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *fdopen (int __fd, __const char *__modes) throw () __attribute__ ((__warn_unused_result__)); + + + + + +extern FILE *fopencookie (void *__restrict __magic_cookie, + __const char *__restrict __modes, + _IO_cookie_io_functions_t __io_funcs) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) + throw () __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () __attribute__ ((__warn_unused_result__)); + + + + + + +extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); + + + +extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, + int __modes, size_t __n) throw (); + + + + + +extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, + size_t __size) throw (); + + +extern void setlinebuf (FILE *__stream) throw (); + + + + + + + + +extern int fprintf (FILE *__restrict __stream, + __const char *__restrict __format, ...); + + + + +extern int printf (__const char *__restrict __format, ...); + +extern int sprintf (char *__restrict __s, + __const char *__restrict __format, ...) throw (); + + + + + +extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg); + + + + +extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); + +extern int vsprintf (char *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) throw (); + + + + + +extern int snprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, ...) + throw () __attribute__ ((__format__ (__printf__, 3, 4))); + +extern int vsnprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__printf__, 3, 0))); + + + + + + +extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, + __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__)); +extern int __asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + throw () __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +extern int asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + throw () __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +# 394 "/usr/include/stdio.h" 3 4 +extern int vdprintf (int __fd, __const char *__restrict __fmt, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 2, 0))); +extern int dprintf (int __fd, __const char *__restrict __fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); + + + + + + + + +extern int fscanf (FILE *__restrict __stream, + __const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); + + + + +extern int scanf (__const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); + +extern int sscanf (__const char *__restrict __s, + __const char *__restrict __format, ...) throw (); +# 445 "/usr/include/stdio.h" 3 4 + + + + + + + + +extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); + + +extern int vsscanf (__const char *__restrict __s, + __const char *__restrict __format, __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__scanf__, 2, 0))); +# 504 "/usr/include/stdio.h" 3 4 + + + + + + + + + +extern int fgetc (FILE *__stream); +extern int getc (FILE *__stream); + + + + + +extern int getchar (void); + +# 532 "/usr/include/stdio.h" 3 4 +extern int getc_unlocked (FILE *__stream); +extern int getchar_unlocked (void); +# 543 "/usr/include/stdio.h" 3 4 +extern int fgetc_unlocked (FILE *__stream); + + + + + + + + + + + +extern int fputc (int __c, FILE *__stream); +extern int putc (int __c, FILE *__stream); + + + + + +extern int putchar (int __c); + +# 576 "/usr/include/stdio.h" 3 4 +extern int fputc_unlocked (int __c, FILE *__stream); + + + + + + + +extern int putc_unlocked (int __c, FILE *__stream); +extern int putchar_unlocked (int __c); + + + + + + +extern int getw (FILE *__stream); + + +extern int putw (int __w, FILE *__stream); + + + + + + + + +extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) + __attribute__ ((__warn_unused_result__)); + + + + + + +extern char *gets (char *__s) __attribute__ ((__warn_unused_result__)); + +# 622 "/usr/include/stdio.h" 3 4 +extern char *fgets_unlocked (char *__restrict __s, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +# 638 "/usr/include/stdio.h" 3 4 +extern __ssize_t __getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern __ssize_t getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern __ssize_t getline (char **__restrict __lineptr, + size_t *__restrict __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); + + + + + +extern int puts (__const char *__s); + + + + + + +extern int ungetc (int __c, FILE *__stream); + + + + + + +extern size_t fread (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + +extern size_t fwrite (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __s) __attribute__ ((__warn_unused_result__)); + +# 699 "/usr/include/stdio.h" 3 4 +extern int fputs_unlocked (__const char *__restrict __s, + FILE *__restrict __stream); +# 710 "/usr/include/stdio.h" 3 4 +extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fseek (FILE *__stream, long int __off, int __whence); + + + + +extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)); + + + + +extern void rewind (FILE *__stream); + +# 746 "/usr/include/stdio.h" 3 4 +extern int fseeko (FILE *__stream, __off_t __off, int __whence); + + + + +extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__)); +# 765 "/usr/include/stdio.h" 3 4 + + + + + + +extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); + + + + +extern int fsetpos (FILE *__stream, __const fpos_t *__pos); +# 788 "/usr/include/stdio.h" 3 4 + + + +extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); +extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__)); +extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); +extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); + + + + +extern void clearerr (FILE *__stream) throw (); + +extern int feof (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + +extern int ferror (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern void clearerr_unlocked (FILE *__stream) throw (); +extern int feof_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); +extern int ferror_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern void perror (__const char *__s); + + + + + + +# 1 "/usr/include/bits/sys_errlist.h" 1 3 4 +# 27 "/usr/include/bits/sys_errlist.h" 3 4 +extern int sys_nerr; +extern __const char *__const sys_errlist[]; + + +extern int _sys_nerr; +extern __const char *__const _sys_errlist[]; +# 827 "/usr/include/stdio.h" 2 3 4 + + + + +extern int fileno (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern int fileno_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); +# 846 "/usr/include/stdio.h" 3 4 +extern FILE *popen (__const char *__command, __const char *__modes) __attribute__ ((__warn_unused_result__)); + + + + + +extern int pclose (FILE *__stream); + + + + + +extern char *ctermid (char *__s) throw (); + + + + + +extern char *cuserid (char *__s); + + + + +struct obstack; + + +extern int obstack_printf (struct obstack *__restrict __obstack, + __const char *__restrict __format, ...) + throw () __attribute__ ((__format__ (__printf__, 2, 3))); +extern int obstack_vprintf (struct obstack *__restrict __obstack, + __const char *__restrict __format, + __gnuc_va_list __args) + throw () __attribute__ ((__format__ (__printf__, 2, 0))); + + + + + + + +extern void flockfile (FILE *__stream) throw (); + + + +extern int ftrylockfile (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + + +extern void funlockfile (FILE *__stream) throw (); +# 907 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/bits/stdio.h" 1 3 4 +# 44 "/usr/include/bits/stdio.h" 3 4 +extern __inline __attribute__ ((__gnu_inline__)) int +getchar (void) +{ + return _IO_getc (stdin); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +fgetc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +getc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +getchar_unlocked (void) +{ + return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +putchar (int __c) +{ + return _IO_putc (__c, stdout); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +fputc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +putc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +putchar_unlocked (int __c) +{ + return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) __ssize_t +getline (char **__lineptr, size_t *__n, FILE *__stream) +{ + return __getdelim (__lineptr, __n, '\n', __stream); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +feof_unlocked (FILE *__stream) throw () +{ + return (((__stream)->_flags & 0x10) != 0); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +ferror_unlocked (FILE *__stream) throw () +{ + return (((__stream)->_flags & 0x20) != 0); +} +# 908 "/usr/include/stdio.h" 2 3 4 + + +# 1 "/usr/include/bits/stdio2.h" 1 3 4 +# 24 "/usr/include/bits/stdio2.h" 3 4 +extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, + __const char *__restrict __format, ...) throw (); +extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, + __const char *__restrict __format, + __gnuc_va_list __ap) throw (); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +sprintf (char *__restrict __s, __const char *__restrict __fmt, ...) throw () +{ + return __builtin___sprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vsprintf (char *__restrict __s, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () + +{ + return __builtin___vsprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} + + + +extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, __const char *__restrict __format, + ...) throw (); +extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, __const char *__restrict __format, + __gnuc_va_list __ap) throw (); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +snprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, ...) throw () + +{ + return __builtin___snprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vsnprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () + +{ + return __builtin___vsnprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} + + + + + +extern int __fprintf_chk (FILE *__restrict __stream, int __flag, + __const char *__restrict __format, ...); +extern int __printf_chk (int __flag, __const char *__restrict __format, ...); +extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, + __const char *__restrict __format, __gnuc_va_list __ap); +extern int __vprintf_chk (int __flag, __const char *__restrict __format, + __gnuc_va_list __ap); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +fprintf (FILE *__restrict __stream, __const char *__restrict __fmt, ...) +{ + return __fprintf_chk (__stream, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +printf (__const char *__restrict __fmt, ...) +{ + return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); +} + + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vprintf (__const char *__restrict __fmt, __gnuc_va_list __ap) +{ + + return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap); + + + +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vfprintf (FILE *__restrict __stream, + __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap); +} + + + +extern int __asprintf_chk (char **__restrict __ptr, int __flag, + __const char *__restrict __fmt, ...) + throw () __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__)); +extern int __vasprintf_chk (char **__restrict __ptr, int __flag, + __const char *__restrict __fmt, __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__)); +extern int __dprintf_chk (int __fd, int __flag, __const char *__restrict __fmt, + ...) __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __vdprintf_chk (int __fd, int __flag, + __const char *__restrict __fmt, __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 3, 0))); +extern int __obstack_printf_chk (struct obstack *__restrict __obstack, + int __flag, __const char *__restrict __format, + ...) + throw () __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack, + int __flag, + __const char *__restrict __format, + __gnuc_va_list __args) + throw () __attribute__ ((__format__ (__printf__, 3, 0))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () + +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +dprintf (int __fd, __const char *__restrict __fmt, ...) +{ + return __dprintf_chk (__fd, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, ...) throw () + +{ + return __obstack_printf_chk (__obstack, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +# 195 "/usr/include/bits/stdio2.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vasprintf (char **__restrict __ptr, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () + +{ + return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () + +{ + return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt, + __ap); +} + + + + + +extern char *__gets_chk (char *__str, size_t) __attribute__ ((__warn_unused_result__)); +extern char *__gets_warn (char *__str) __asm__ ("" "gets") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use fgets or getline instead, gets can't " "specify buffer size"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +gets (char *__str) +{ + if (__builtin_object_size (__str, 2 > 1) != (size_t) -1) + return __gets_chk (__str, __builtin_object_size (__str, 2 > 1)); + return __gets_warn (__str); +} + +extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") + + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_alias (__s, __n, __stream); +} + +extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") + + + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk") + + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + } + return __fread_alias (__ptr, __size, __n, __stream); +} + + +extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size, + int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked") + + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_unlocked_alias (__s, __n, __stream); +} + + + + +extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") + + + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk") + + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + } + + + if (__builtin_constant_p (__size) + && __builtin_constant_p (__n) + && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) + && __size * __n <= 8) + { + size_t __cnt = __size * __n; + char *__cptr = (char *) __ptr; + if (__cnt == 0) + return 0; + + for (; __cnt > 0; --__cnt) + { + int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++); + if (__c == (-1)) + break; + *__cptr++ = __c; + } + return (__cptr - (char *) __ptr) / __size; + } + + return __fread_unlocked_alias (__ptr, __size, __n, __stream); +} +# 911 "/usr/include/stdio.h" 2 3 4 + + + + + +} +# 34 "/usr/include/python2.6/Python.h" 2 + + + + + + +# 1 "/usr/include/errno.h" 1 3 4 +# 32 "/usr/include/errno.h" 3 4 +extern "C" { + + + +# 1 "/usr/include/bits/errno.h" 1 3 4 +# 25 "/usr/include/bits/errno.h" 3 4 +# 1 "/usr/include/linux/errno.h" 1 3 4 + + + +# 1 "/usr/include/asm/errno.h" 1 3 4 +# 1 "/usr/include/asm-generic/errno.h" 1 3 4 + + + +# 1 "/usr/include/asm-generic/errno-base.h" 1 3 4 +# 5 "/usr/include/asm-generic/errno.h" 2 3 4 +# 1 "/usr/include/asm/errno.h" 2 3 4 +# 5 "/usr/include/linux/errno.h" 2 3 4 +# 26 "/usr/include/bits/errno.h" 2 3 4 +# 43 "/usr/include/bits/errno.h" 3 4 +extern int *__errno_location (void) throw () __attribute__ ((__const__)); +# 37 "/usr/include/errno.h" 2 3 4 +# 55 "/usr/include/errno.h" 3 4 +extern char *program_invocation_name, *program_invocation_short_name; + + + +} +# 69 "/usr/include/errno.h" 3 4 +typedef int error_t; +# 41 "/usr/include/python2.6/Python.h" 2 +# 56 "/usr/include/python2.6/Python.h" +# 1 "/usr/include/assert.h" 1 3 4 +# 57 "/usr/include/python2.6/Python.h" 2 + +# 1 "/usr/include/python2.6/pyport.h" 1 + + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stdint.h" 1 3 4 + + +# 1 "/usr/include/stdint.h" 1 3 4 +# 28 "/usr/include/stdint.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 29 "/usr/include/stdint.h" 2 3 4 +# 49 "/usr/include/stdint.h" 3 4 +typedef unsigned char uint8_t; +typedef unsigned short int uint16_t; + +typedef unsigned int uint32_t; + + + +typedef unsigned long int uint64_t; +# 66 "/usr/include/stdint.h" 3 4 +typedef signed char int_least8_t; +typedef short int int_least16_t; +typedef int int_least32_t; + +typedef long int int_least64_t; + + + + + + +typedef unsigned char uint_least8_t; +typedef unsigned short int uint_least16_t; +typedef unsigned int uint_least32_t; + +typedef unsigned long int uint_least64_t; +# 91 "/usr/include/stdint.h" 3 4 +typedef signed char int_fast8_t; + +typedef long int int_fast16_t; +typedef long int int_fast32_t; +typedef long int int_fast64_t; +# 104 "/usr/include/stdint.h" 3 4 +typedef unsigned char uint_fast8_t; + +typedef unsigned long int uint_fast16_t; +typedef unsigned long int uint_fast32_t; +typedef unsigned long int uint_fast64_t; +# 123 "/usr/include/stdint.h" 3 4 +typedef unsigned long int uintptr_t; +# 135 "/usr/include/stdint.h" 3 4 +typedef long int intmax_t; +typedef unsigned long int uintmax_t; +# 4 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stdint.h" 2 3 4 +# 8 "/usr/include/python2.6/pyport.h" 2 +# 89 "/usr/include/python2.6/pyport.h" +typedef uintptr_t Py_uintptr_t; +typedef intptr_t Py_intptr_t; +# 113 "/usr/include/python2.6/pyport.h" +typedef ssize_t Py_ssize_t; +# 235 "/usr/include/python2.6/pyport.h" +# 1 "/usr/include/math.h" 1 3 4 +# 30 "/usr/include/math.h" 3 4 +extern "C" { + + + +# 1 "/usr/include/bits/huge_val.h" 1 3 4 +# 35 "/usr/include/math.h" 2 3 4 + +# 1 "/usr/include/bits/huge_valf.h" 1 3 4 +# 37 "/usr/include/math.h" 2 3 4 +# 1 "/usr/include/bits/huge_vall.h" 1 3 4 +# 38 "/usr/include/math.h" 2 3 4 + + +# 1 "/usr/include/bits/inf.h" 1 3 4 +# 41 "/usr/include/math.h" 2 3 4 + + +# 1 "/usr/include/bits/nan.h" 1 3 4 +# 44 "/usr/include/math.h" 2 3 4 + + + +# 1 "/usr/include/bits/mathdef.h" 1 3 4 +# 26 "/usr/include/bits/mathdef.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 27 "/usr/include/bits/mathdef.h" 2 3 4 + + + + +typedef float float_t; +typedef double double_t; +# 48 "/usr/include/math.h" 2 3 4 +# 71 "/usr/include/math.h" 3 4 +# 1 "/usr/include/bits/mathcalls.h" 1 3 4 +# 53 "/usr/include/bits/mathcalls.h" 3 4 + + +extern double acos (double __x) throw (); extern double __acos (double __x) throw (); + +extern double asin (double __x) throw (); extern double __asin (double __x) throw (); + +extern double atan (double __x) throw (); extern double __atan (double __x) throw (); + +extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw (); + + +extern double cos (double __x) throw (); extern double __cos (double __x) throw (); + +extern double sin (double __x) throw (); extern double __sin (double __x) throw (); + +extern double tan (double __x) throw (); extern double __tan (double __x) throw (); + + + + +extern double cosh (double __x) throw (); extern double __cosh (double __x) throw (); + +extern double sinh (double __x) throw (); extern double __sinh (double __x) throw (); + +extern double tanh (double __x) throw (); extern double __tanh (double __x) throw (); + + + + +extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw () + ; + + + + + +extern double acosh (double __x) throw (); extern double __acosh (double __x) throw (); + +extern double asinh (double __x) throw (); extern double __asinh (double __x) throw (); + +extern double atanh (double __x) throw (); extern double __atanh (double __x) throw (); + + + + + + + +extern double exp (double __x) throw (); extern double __exp (double __x) throw (); + + +extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw (); + + +extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw (); + + +extern double log (double __x) throw (); extern double __log (double __x) throw (); + + +extern double log10 (double __x) throw (); extern double __log10 (double __x) throw (); + + +extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw (); + + + + +extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw (); + +extern double pow10 (double __x) throw (); extern double __pow10 (double __x) throw (); + + + + + +extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw (); + + +extern double log1p (double __x) throw (); extern double __log1p (double __x) throw (); + + +extern double logb (double __x) throw (); extern double __logb (double __x) throw (); + + + + + + +extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw (); + + +extern double log2 (double __x) throw (); extern double __log2 (double __x) throw (); + + + + + + + + +extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw (); + + +extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw (); + + + + + +extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw (); + + + + + + +extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw (); + + + + + + + + +extern double ceil (double __x) throw () __attribute__ ((__const__)); extern double __ceil (double __x) throw () __attribute__ ((__const__)); + + +extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__)); + + +extern double floor (double __x) throw () __attribute__ ((__const__)); extern double __floor (double __x) throw () __attribute__ ((__const__)); + + +extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw (); + + + + +extern int __isinf (double __value) throw () __attribute__ ((__const__)); + + +extern int __finite (double __value) throw () __attribute__ ((__const__)); + + + + + +extern int isinf (double __value) throw () __attribute__ ((__const__)); + + +extern int finite (double __value) throw () __attribute__ ((__const__)); + + +extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw (); + + + +extern double significand (double __x) throw (); extern double __significand (double __x) throw (); + + + + + +extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__)); + + + + + + +extern double nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern double __nan (__const char *__tagb) throw () __attribute__ ((__const__)); + + + + + +extern int __isnan (double __value) throw () __attribute__ ((__const__)); + + + +extern int isnan (double __value) throw () __attribute__ ((__const__)); + + +extern double j0 (double) throw (); extern double __j0 (double) throw (); +extern double j1 (double) throw (); extern double __j1 (double) throw (); +extern double jn (int, double) throw (); extern double __jn (int, double) throw (); +extern double y0 (double) throw (); extern double __y0 (double) throw (); +extern double y1 (double) throw (); extern double __y1 (double) throw (); +extern double yn (int, double) throw (); extern double __yn (int, double) throw (); + + + + + + +extern double erf (double) throw (); extern double __erf (double) throw (); +extern double erfc (double) throw (); extern double __erfc (double) throw (); +extern double lgamma (double) throw (); extern double __lgamma (double) throw (); + + + + + + +extern double tgamma (double) throw (); extern double __tgamma (double) throw (); + + + + + +extern double gamma (double) throw (); extern double __gamma (double) throw (); + + + + + + +extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw (); + + + + + + + +extern double rint (double __x) throw (); extern double __rint (double __x) throw (); + + +extern double nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) throw () __attribute__ ((__const__)); + +extern double nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); + + + +extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw (); + + + +extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw (); + + + +extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw (); + + + + +extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw (); + + + +extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw (); + + + +extern double round (double __x) throw () __attribute__ ((__const__)); extern double __round (double __x) throw () __attribute__ ((__const__)); + + + +extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__)); + + + + +extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw (); + + + + + + +extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw (); +extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw (); + + + +extern long int lround (double __x) throw (); extern long int __lround (double __x) throw (); +extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw (); + + + +extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw (); + + +extern double fmax (double __x, double __y) throw (); extern double __fmax (double __x, double __y) throw (); + + +extern double fmin (double __x, double __y) throw (); extern double __fmin (double __x, double __y) throw (); + + + +extern int __fpclassify (double __value) throw () + __attribute__ ((__const__)); + + +extern int __signbit (double __value) throw () + __attribute__ ((__const__)); + + + +extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw (); + + + + + + + + +extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw (); +# 72 "/usr/include/math.h" 2 3 4 +# 94 "/usr/include/math.h" 3 4 +# 1 "/usr/include/bits/mathcalls.h" 1 3 4 +# 53 "/usr/include/bits/mathcalls.h" 3 4 + + +extern float acosf (float __x) throw (); extern float __acosf (float __x) throw (); + +extern float asinf (float __x) throw (); extern float __asinf (float __x) throw (); + +extern float atanf (float __x) throw (); extern float __atanf (float __x) throw (); + +extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw (); + + +extern float cosf (float __x) throw (); extern float __cosf (float __x) throw (); + +extern float sinf (float __x) throw (); extern float __sinf (float __x) throw (); + +extern float tanf (float __x) throw (); extern float __tanf (float __x) throw (); + + + + +extern float coshf (float __x) throw (); extern float __coshf (float __x) throw (); + +extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw (); + +extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw (); + + + + +extern void + sincosf +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (float __x, float *__sinx, float *__cosx) throw (); extern void + __sincosf +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (float __x, float *__sinx, float *__cosx) throw () + ; + + + + + +extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw (); + +extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw (); + +extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw (); + + + + + + + +extern float expf (float __x) throw (); extern float __expf (float __x) throw (); + + +extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw (); + + +extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw (); + + +extern float logf (float __x) throw (); extern float __logf (float __x) throw (); + + +extern float log10f (float __x) throw (); extern float __log10f (float __x) throw (); + + +extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw (); + + + + +extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw (); + +extern float pow10f (float __x) throw (); extern float __pow10f (float __x) throw (); + + + + + +extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw (); + + +extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw (); + + +extern float logbf (float __x) throw (); extern float __logbf (float __x) throw (); + + + + + + +extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw (); + + +extern float log2f (float __x) throw (); extern float __log2f (float __x) throw (); + + + + + + + + +extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw (); + + +extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw (); + + + + + +extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw (); + + + + + + +extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw (); + + + + + + + + +extern float ceilf (float __x) throw () __attribute__ ((__const__)); extern float __ceilf (float __x) throw () __attribute__ ((__const__)); + + +extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__)); + + +extern float floorf (float __x) throw () __attribute__ ((__const__)); extern float __floorf (float __x) throw () __attribute__ ((__const__)); + + +extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw (); + + + + +extern int __isinff (float __value) throw () __attribute__ ((__const__)); + + +extern int __finitef (float __value) throw () __attribute__ ((__const__)); + + + + + +extern int isinff (float __value) throw () __attribute__ ((__const__)); + + +extern int finitef (float __value) throw () __attribute__ ((__const__)); + + +extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw (); + + + +extern float significandf (float __x) throw (); extern float __significandf (float __x) throw (); + + + + + +extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__)); + + + + + + +extern float nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) throw () __attribute__ ((__const__)); + + + + + +extern int __isnanf (float __value) throw () __attribute__ ((__const__)); + + + +extern int isnanf (float __value) throw () __attribute__ ((__const__)); + + +extern float j0f (float) throw (); extern float __j0f (float) throw (); +extern float j1f (float) throw (); extern float __j1f (float) throw (); +extern float jnf (int, float) throw (); extern float __jnf (int, float) throw (); +extern float y0f (float) throw (); extern float __y0f (float) throw (); +extern float y1f (float) throw (); extern float __y1f (float) throw (); +extern float ynf (int, float) throw (); extern float __ynf (int, float) throw (); + + + + + + +extern float erff (float) throw (); extern float __erff (float) throw (); +extern float erfcf (float) throw (); extern float __erfcf (float) throw (); +extern float lgammaf (float) throw (); extern float __lgammaf (float) throw (); + + + + + + +extern float tgammaf (float) throw (); extern float __tgammaf (float) throw (); + + + + + +extern float gammaf (float) throw (); extern float __gammaf (float) throw (); + + + + + + +extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw (); + + + + + + + +extern float rintf (float __x) throw (); extern float __rintf (float __x) throw (); + + +extern float nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); + +extern float nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); + + + +extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw (); + + + +extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw (); + + + +extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw (); + + + + +extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw (); + + + +extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw (); + + + +extern float roundf (float __x) throw () __attribute__ ((__const__)); extern float __roundf (float __x) throw () __attribute__ ((__const__)); + + + +extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__)); + + + + +extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw (); + + + + + + +extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw (); +extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw (); + + + +extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw (); +extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw (); + + + +extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw (); + + +extern float fmaxf (float __x, float __y) throw (); extern float __fmaxf (float __x, float __y) throw (); + + +extern float fminf (float __x, float __y) throw (); extern float __fminf (float __x, float __y) throw (); + + + +extern int __fpclassifyf (float __value) throw () + __attribute__ ((__const__)); + + +extern int __signbitf (float __value) throw () + __attribute__ ((__const__)); + + + +extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw (); + + + + + + + + +extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw (); +# 95 "/usr/include/math.h" 2 3 4 +# 141 "/usr/include/math.h" 3 4 +# 1 "/usr/include/bits/mathcalls.h" 1 3 4 +# 53 "/usr/include/bits/mathcalls.h" 3 4 + + +extern long double acosl (long double __x) throw (); extern long double __acosl (long double __x) throw (); + +extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw (); + +extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw (); + +extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw (); + + +extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw (); + +extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw (); + +extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw (); + + + + +extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw (); + +extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw (); + +extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw (); + + + + +extern void + sincosl +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (long double __x, long double *__sinx, long double *__cosx) throw (); extern void + __sincosl +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (long double __x, long double *__sinx, long double *__cosx) throw () + ; + + + + + +extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw (); + +extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw (); + +extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw (); + + + + + + + +extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw (); + + +extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw (); + + +extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw (); + + +extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw (); + + +extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw (); + + +extern long double modfl (long double __x, long double *__iptr) throw (); extern long double __modfl (long double __x, long double *__iptr) throw (); + + + + +extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw (); + +extern long double pow10l (long double __x) throw (); extern long double __pow10l (long double __x) throw (); + + + + + +extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw (); + + +extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw (); + + +extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw (); + + + + + + +extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw (); + + +extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw (); + + + + + + + + +extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw (); + + +extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw (); + + + + + +extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw (); + + + + + + +extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw (); + + + + + + + + +extern long double ceill (long double __x) throw () __attribute__ ((__const__)); extern long double __ceill (long double __x) throw () __attribute__ ((__const__)); + + +extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__)); + + +extern long double floorl (long double __x) throw () __attribute__ ((__const__)); extern long double __floorl (long double __x) throw () __attribute__ ((__const__)); + + +extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw (); + + + + +extern int __isinfl (long double __value) throw () __attribute__ ((__const__)); + + +extern int __finitel (long double __value) throw () __attribute__ ((__const__)); + + + + + +extern int isinfl (long double __value) throw () __attribute__ ((__const__)); + + +extern int finitel (long double __value) throw () __attribute__ ((__const__)); + + +extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw (); + + + +extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw (); + + + + + +extern long double copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); + + + + + + +extern long double nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) throw () __attribute__ ((__const__)); + + + + + +extern int __isnanl (long double __value) throw () __attribute__ ((__const__)); + + + +extern int isnanl (long double __value) throw () __attribute__ ((__const__)); + + +extern long double j0l (long double) throw (); extern long double __j0l (long double) throw (); +extern long double j1l (long double) throw (); extern long double __j1l (long double) throw (); +extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw (); +extern long double y0l (long double) throw (); extern long double __y0l (long double) throw (); +extern long double y1l (long double) throw (); extern long double __y1l (long double) throw (); +extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw (); + + + + + + +extern long double erfl (long double) throw (); extern long double __erfl (long double) throw (); +extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw (); +extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw (); + + + + + + +extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw (); + + + + + +extern long double gammal (long double) throw (); extern long double __gammal (long double) throw (); + + + + + + +extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw (); + + + + + + + +extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw (); + + +extern long double nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); + +extern long double nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); + + + +extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw (); + + + +extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw (); + + + +extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw (); + + + + +extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw (); + + + +extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw (); + + + +extern long double roundl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundl (long double __x) throw () __attribute__ ((__const__)); + + + +extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__)); + + + + +extern long double remquol (long double __x, long double __y, int *__quo) throw (); extern long double __remquol (long double __x, long double __y, int *__quo) throw (); + + + + + + +extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw (); +extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw (); + + + +extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw (); +extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw (); + + + +extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw (); + + +extern long double fmaxl (long double __x, long double __y) throw (); extern long double __fmaxl (long double __x, long double __y) throw (); + + +extern long double fminl (long double __x, long double __y) throw (); extern long double __fminl (long double __x, long double __y) throw (); + + + +extern int __fpclassifyl (long double __value) throw () + __attribute__ ((__const__)); + + +extern int __signbitl (long double __value) throw () + __attribute__ ((__const__)); + + + +extern long double fmal (long double __x, long double __y, long double __z) throw (); extern long double __fmal (long double __x, long double __y, long double __z) throw (); + + + + + + + + +extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw (); +# 142 "/usr/include/math.h" 2 3 4 +# 157 "/usr/include/math.h" 3 4 +extern int signgam; +# 198 "/usr/include/math.h" 3 4 +enum + { + FP_NAN, + + FP_INFINITE, + + FP_ZERO, + + FP_SUBNORMAL, + + FP_NORMAL + + }; +# 291 "/usr/include/math.h" 3 4 +typedef enum +{ + _IEEE_ = -1, + _SVID_, + _XOPEN_, + _POSIX_, + _ISOC_ +} _LIB_VERSION_TYPE; + + + + +extern _LIB_VERSION_TYPE _LIB_VERSION; +# 314 "/usr/include/math.h" 3 4 +struct __exception + + + + { + int type; + char *name; + double arg1; + double arg2; + double retval; + }; + + +extern int matherr (struct __exception *__exc) throw (); +# 416 "/usr/include/math.h" 3 4 +# 1 "/usr/include/bits/mathinline.h" 1 3 4 +# 25 "/usr/include/bits/mathinline.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 26 "/usr/include/bits/mathinline.h" 2 3 4 +# 37 "/usr/include/bits/mathinline.h" 3 4 +extern __inline __attribute__ ((__gnu_inline__)) int +__signbitf (float __x) throw () +{ + + + + + int __m; + __asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x)); + return __m & 0x8; + +} +extern __inline __attribute__ ((__gnu_inline__)) int +__signbit (double __x) throw () +{ + + + + + int __m; + __asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x)); + return __m & 0x80; + +} +extern __inline __attribute__ ((__gnu_inline__)) int +__signbitl (long double __x) throw () +{ + __extension__ union { long double __l; int __i[3]; } __u = { __l: __x }; + return (__u.__i[2] & 0x8000) != 0; +} +# 417 "/usr/include/math.h" 2 3 4 +# 472 "/usr/include/math.h" 3 4 +} +# 236 "/usr/include/python2.6/pyport.h" 2 + + + + + + +# 1 "/usr/include/sys/time.h" 1 3 4 +# 29 "/usr/include/sys/time.h" 3 4 +# 1 "/usr/include/bits/time.h" 1 3 4 +# 30 "/usr/include/sys/time.h" 2 3 4 +# 39 "/usr/include/sys/time.h" 3 4 +extern "C" { +# 57 "/usr/include/sys/time.h" 3 4 +struct timezone + { + int tz_minuteswest; + int tz_dsttime; + }; + +typedef struct timezone *__restrict __timezone_ptr_t; +# 73 "/usr/include/sys/time.h" 3 4 +extern int gettimeofday (struct timeval *__restrict __tv, + __timezone_ptr_t __tz) throw () __attribute__ ((__nonnull__ (1))); + + + + +extern int settimeofday (__const struct timeval *__tv, + __const struct timezone *__tz) + throw () __attribute__ ((__nonnull__ (1))); + + + + + +extern int adjtime (__const struct timeval *__delta, + struct timeval *__olddelta) throw (); + + + + +enum __itimer_which + { + + ITIMER_REAL = 0, + + + ITIMER_VIRTUAL = 1, + + + + ITIMER_PROF = 2 + + }; + + + +struct itimerval + { + + struct timeval it_interval; + + struct timeval it_value; + }; + + + + + + +typedef int __itimer_which_t; + + + + +extern int getitimer (__itimer_which_t __which, + struct itimerval *__value) throw (); + + + + +extern int setitimer (__itimer_which_t __which, + __const struct itimerval *__restrict __new, + struct itimerval *__restrict __old) throw (); + + + + +extern int utimes (__const char *__file, __const struct timeval __tvp[2]) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int lutimes (__const char *__file, __const struct timeval __tvp[2]) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int futimes (int __fd, __const struct timeval __tvp[2]) throw (); + + + + + + +extern int futimesat (int __fd, __const char *__file, + __const struct timeval __tvp[2]) throw (); +# 191 "/usr/include/sys/time.h" 3 4 +} +# 243 "/usr/include/python2.6/pyport.h" 2 +# 300 "/usr/include/python2.6/pyport.h" +# 1 "/usr/include/sys/stat.h" 1 3 4 +# 105 "/usr/include/sys/stat.h" 3 4 +extern "C" { + +# 1 "/usr/include/bits/stat.h" 1 3 4 +# 43 "/usr/include/bits/stat.h" 3 4 +struct stat + { + __dev_t st_dev; + + + + + __ino_t st_ino; + + + + + + + + __nlink_t st_nlink; + __mode_t st_mode; + + __uid_t st_uid; + __gid_t st_gid; + + int __pad0; + + __dev_t st_rdev; + + + + + __off_t st_size; + + + + __blksize_t st_blksize; + + __blkcnt_t st_blocks; +# 88 "/usr/include/bits/stat.h" 3 4 + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; +# 103 "/usr/include/bits/stat.h" 3 4 + long int __unused[3]; +# 112 "/usr/include/bits/stat.h" 3 4 + }; + + + +struct stat64 + { + __dev_t st_dev; + + __ino64_t st_ino; + __nlink_t st_nlink; + __mode_t st_mode; + + + + + + + __uid_t st_uid; + __gid_t st_gid; + + int __pad0; + __dev_t st_rdev; + __off_t st_size; + + + + + + __blksize_t st_blksize; + __blkcnt64_t st_blocks; + + + + + + + + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; +# 164 "/usr/include/bits/stat.h" 3 4 + long int __unused[3]; + + + + }; +# 108 "/usr/include/sys/stat.h" 2 3 4 +# 209 "/usr/include/sys/stat.h" 3 4 +extern int stat (__const char *__restrict __file, + struct stat *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int fstat (int __fd, struct stat *__buf) throw () __attribute__ ((__nonnull__ (2))); +# 228 "/usr/include/sys/stat.h" 3 4 +extern int stat64 (__const char *__restrict __file, + struct stat64 *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int fstat64 (int __fd, struct stat64 *__buf) throw () __attribute__ ((__nonnull__ (2))); + + + + + + + +extern int fstatat (int __fd, __const char *__restrict __file, + struct stat *__restrict __buf, int __flag) + throw () __attribute__ ((__nonnull__ (2, 3))); +# 253 "/usr/include/sys/stat.h" 3 4 +extern int fstatat64 (int __fd, __const char *__restrict __file, + struct stat64 *__restrict __buf, int __flag) + throw () __attribute__ ((__nonnull__ (2, 3))); + + + + + + + +extern int lstat (__const char *__restrict __file, + struct stat *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2))); +# 276 "/usr/include/sys/stat.h" 3 4 +extern int lstat64 (__const char *__restrict __file, + struct stat64 *__restrict __buf) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern int chmod (__const char *__file, __mode_t __mode) + throw () __attribute__ ((__nonnull__ (1))); + + + + + +extern int lchmod (__const char *__file, __mode_t __mode) + throw () __attribute__ ((__nonnull__ (1))); + + + + +extern int fchmod (int __fd, __mode_t __mode) throw (); + + + + + +extern int fchmodat (int __fd, __const char *__file, __mode_t __mode, + int __flag) + throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); + + + + + + +extern __mode_t umask (__mode_t __mask) throw (); + + + + +extern __mode_t getumask (void) throw (); + + + +extern int mkdir (__const char *__path, __mode_t __mode) + throw () __attribute__ ((__nonnull__ (1))); + + + + + +extern int mkdirat (int __fd, __const char *__path, __mode_t __mode) + throw () __attribute__ ((__nonnull__ (2))); + + + + + + +extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev) + throw () __attribute__ ((__nonnull__ (1))); + + + + + +extern int mknodat (int __fd, __const char *__path, __mode_t __mode, + __dev_t __dev) throw () __attribute__ ((__nonnull__ (2))); + + + + + +extern int mkfifo (__const char *__path, __mode_t __mode) + throw () __attribute__ ((__nonnull__ (1))); + + + + + +extern int mkfifoat (int __fd, __const char *__path, __mode_t __mode) + throw () __attribute__ ((__nonnull__ (2))); + + + + + +extern int utimensat (int __fd, __const char *__path, + __const struct timespec __times[2], + int __flags) + throw () __attribute__ ((__nonnull__ (2))); + + + + +extern int futimens (int __fd, __const struct timespec __times[2]) throw (); +# 399 "/usr/include/sys/stat.h" 3 4 +extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf) + throw () __attribute__ ((__nonnull__ (3))); +extern int __xstat (int __ver, __const char *__filename, + struct stat *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3))); +extern int __lxstat (int __ver, __const char *__filename, + struct stat *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3))); +extern int __fxstatat (int __ver, int __fildes, __const char *__filename, + struct stat *__stat_buf, int __flag) + throw () __attribute__ ((__nonnull__ (3, 4))); +# 432 "/usr/include/sys/stat.h" 3 4 +extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf) + throw () __attribute__ ((__nonnull__ (3))); +extern int __xstat64 (int __ver, __const char *__filename, + struct stat64 *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3))); +extern int __lxstat64 (int __ver, __const char *__filename, + struct stat64 *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3))); +extern int __fxstatat64 (int __ver, int __fildes, __const char *__filename, + struct stat64 *__stat_buf, int __flag) + throw () __attribute__ ((__nonnull__ (3, 4))); + +extern int __xmknod (int __ver, __const char *__path, __mode_t __mode, + __dev_t *__dev) throw () __attribute__ ((__nonnull__ (2, 4))); + +extern int __xmknodat (int __ver, int __fd, __const char *__path, + __mode_t __mode, __dev_t *__dev) + throw () __attribute__ ((__nonnull__ (3, 5))); + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +stat (__const char *__path, struct stat *__statbuf) throw () +{ + return __xstat (1, __path, __statbuf); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +lstat (__const char *__path, struct stat *__statbuf) throw () +{ + return __lxstat (1, __path, __statbuf); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +fstat (int __fd, struct stat *__statbuf) throw () +{ + return __fxstat (1, __fd, __statbuf); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +fstatat (int __fd, __const char *__filename, struct stat *__statbuf, int __flag) throw () + +{ + return __fxstatat (1, __fd, __filename, __statbuf, __flag); +} + + + +extern __inline __attribute__ ((__gnu_inline__)) int +mknod (__const char *__path, __mode_t __mode, __dev_t __dev) throw () +{ + return __xmknod (0, __path, __mode, &__dev); +} + + + +extern __inline __attribute__ ((__gnu_inline__)) int +mknodat (int __fd, __const char *__path, __mode_t __mode, __dev_t __dev) throw () + +{ + return __xmknodat (0, __fd, __path, __mode, &__dev); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +stat64 (__const char *__path, struct stat64 *__statbuf) throw () +{ + return __xstat64 (1, __path, __statbuf); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +lstat64 (__const char *__path, struct stat64 *__statbuf) throw () +{ + return __lxstat64 (1, __path, __statbuf); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +fstat64 (int __fd, struct stat64 *__statbuf) throw () +{ + return __fxstat64 (1, __fd, __statbuf); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +fstatat64 (int __fd, __const char *__filename, struct stat64 *__statbuf, int __flag) throw () + +{ + return __fxstatat64 (1, __fd, __filename, __statbuf, __flag); +} + + + + + + +} +# 301 "/usr/include/python2.6/pyport.h" 2 +# 322 "/usr/include/python2.6/pyport.h" +extern "C" { +# 698 "/usr/include/python2.6/pyport.h" +} +# 59 "/usr/include/python2.6/Python.h" 2 +# 77 "/usr/include/python2.6/Python.h" +# 1 "/usr/include/python2.6/pymath.h" 1 +# 78 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/pymem.h" 1 +# 11 "/usr/include/python2.6/pymem.h" +extern "C" { +# 52 "/usr/include/python2.6/pymem.h" +void * PyMem_Malloc(size_t); +void * PyMem_Realloc(void *, size_t); +void PyMem_Free(void *); +# 119 "/usr/include/python2.6/pymem.h" +} +# 79 "/usr/include/python2.6/Python.h" 2 + +# 1 "/usr/include/python2.6/object.h" 1 + + + +extern "C" { +# 106 "/usr/include/python2.6/object.h" +typedef struct _object { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; +} PyObject; + +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; Py_ssize_t ob_size; +} PyVarObject; +# 133 "/usr/include/python2.6/object.h" +typedef PyObject * (*unaryfunc)(PyObject *); +typedef PyObject * (*binaryfunc)(PyObject *, PyObject *); +typedef PyObject * (*ternaryfunc)(PyObject *, PyObject *, PyObject *); +typedef int (*inquiry)(PyObject *); +typedef Py_ssize_t (*lenfunc)(PyObject *); +typedef int (*coercion)(PyObject **, PyObject **); +typedef PyObject *(*intargfunc)(PyObject *, int) __attribute__((__deprecated__)); +typedef PyObject *(*intintargfunc)(PyObject *, int, int) __attribute__((__deprecated__)); +typedef PyObject *(*ssizeargfunc)(PyObject *, Py_ssize_t); +typedef PyObject *(*ssizessizeargfunc)(PyObject *, Py_ssize_t, Py_ssize_t); +typedef int(*intobjargproc)(PyObject *, int, PyObject *); +typedef int(*intintobjargproc)(PyObject *, int, int, PyObject *); +typedef int(*ssizeobjargproc)(PyObject *, Py_ssize_t, PyObject *); +typedef int(*ssizessizeobjargproc)(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *); +typedef int(*objobjargproc)(PyObject *, PyObject *, PyObject *); + + + + +typedef int (*getreadbufferproc)(PyObject *, int, void **); +typedef int (*getwritebufferproc)(PyObject *, int, void **); +typedef int (*getsegcountproc)(PyObject *, int *); +typedef int (*getcharbufferproc)(PyObject *, int, char **); + +typedef Py_ssize_t (*readbufferproc)(PyObject *, Py_ssize_t, void **); +typedef Py_ssize_t (*writebufferproc)(PyObject *, Py_ssize_t, void **); +typedef Py_ssize_t (*segcountproc)(PyObject *, Py_ssize_t *); +typedef Py_ssize_t (*charbufferproc)(PyObject *, Py_ssize_t, char **); + + + +typedef struct bufferinfo { + void *buf; + PyObject *obj; + Py_ssize_t len; + Py_ssize_t itemsize; + + int readonly; + int ndim; + char *format; + Py_ssize_t *shape; + Py_ssize_t *strides; + Py_ssize_t *suboffsets; + void *internal; +} Py_buffer; + +typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); +typedef void (*releasebufferproc)(PyObject *, Py_buffer *); +# 213 "/usr/include/python2.6/object.h" +typedef int (*objobjproc)(PyObject *, PyObject *); +typedef int (*visitproc)(PyObject *, void *); +typedef int (*traverseproc)(PyObject *, visitproc, void *); + +typedef struct { +# 226 "/usr/include/python2.6/object.h" + binaryfunc nb_add; + binaryfunc nb_subtract; + binaryfunc nb_multiply; + binaryfunc nb_divide; + binaryfunc nb_remainder; + binaryfunc nb_divmod; + ternaryfunc nb_power; + unaryfunc nb_negative; + unaryfunc nb_positive; + unaryfunc nb_absolute; + inquiry nb_nonzero; + unaryfunc nb_invert; + binaryfunc nb_lshift; + binaryfunc nb_rshift; + binaryfunc nb_and; + binaryfunc nb_xor; + binaryfunc nb_or; + coercion nb_coerce; + unaryfunc nb_int; + unaryfunc nb_long; + unaryfunc nb_float; + unaryfunc nb_oct; + unaryfunc nb_hex; + + binaryfunc nb_inplace_add; + binaryfunc nb_inplace_subtract; + binaryfunc nb_inplace_multiply; + binaryfunc nb_inplace_divide; + binaryfunc nb_inplace_remainder; + ternaryfunc nb_inplace_power; + binaryfunc nb_inplace_lshift; + binaryfunc nb_inplace_rshift; + binaryfunc nb_inplace_and; + binaryfunc nb_inplace_xor; + binaryfunc nb_inplace_or; + + + + binaryfunc nb_floor_divide; + binaryfunc nb_true_divide; + binaryfunc nb_inplace_floor_divide; + binaryfunc nb_inplace_true_divide; + + + unaryfunc nb_index; +} PyNumberMethods; + +typedef struct { + lenfunc sq_length; + binaryfunc sq_concat; + ssizeargfunc sq_repeat; + ssizeargfunc sq_item; + ssizessizeargfunc sq_slice; + ssizeobjargproc sq_ass_item; + ssizessizeobjargproc sq_ass_slice; + objobjproc sq_contains; + + binaryfunc sq_inplace_concat; + ssizeargfunc sq_inplace_repeat; +} PySequenceMethods; + +typedef struct { + lenfunc mp_length; + binaryfunc mp_subscript; + objobjargproc mp_ass_subscript; +} PyMappingMethods; + +typedef struct { + readbufferproc bf_getreadbuffer; + writebufferproc bf_getwritebuffer; + segcountproc bf_getsegcount; + charbufferproc bf_getcharbuffer; + getbufferproc bf_getbuffer; + releasebufferproc bf_releasebuffer; +} PyBufferProcs; + + +typedef void (*freefunc)(void *); +typedef void (*destructor)(PyObject *); +typedef int (*printfunc)(PyObject *, FILE *, int); +typedef PyObject *(*getattrfunc)(PyObject *, char *); +typedef PyObject *(*getattrofunc)(PyObject *, PyObject *); +typedef int (*setattrfunc)(PyObject *, char *, PyObject *); +typedef int (*setattrofunc)(PyObject *, PyObject *, PyObject *); +typedef int (*cmpfunc)(PyObject *, PyObject *); +typedef PyObject *(*reprfunc)(PyObject *); +typedef long (*hashfunc)(PyObject *); +typedef PyObject *(*richcmpfunc) (PyObject *, PyObject *, int); +typedef PyObject *(*getiterfunc) (PyObject *); +typedef PyObject *(*iternextfunc) (PyObject *); +typedef PyObject *(*descrgetfunc) (PyObject *, PyObject *, PyObject *); +typedef int (*descrsetfunc) (PyObject *, PyObject *, PyObject *); +typedef int (*initproc)(PyObject *, PyObject *, PyObject *); +typedef PyObject *(*newfunc)(struct _typeobject *, PyObject *, PyObject *); +typedef PyObject *(*allocfunc)(struct _typeobject *, Py_ssize_t); + +typedef struct _typeobject { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; Py_ssize_t ob_size; + const char *tp_name; + Py_ssize_t tp_basicsize, tp_itemsize; + + + + destructor tp_dealloc; + printfunc tp_print; + getattrfunc tp_getattr; + setattrfunc tp_setattr; + cmpfunc tp_compare; + reprfunc tp_repr; + + + + PyNumberMethods *tp_as_number; + PySequenceMethods *tp_as_sequence; + PyMappingMethods *tp_as_mapping; + + + + hashfunc tp_hash; + ternaryfunc tp_call; + reprfunc tp_str; + getattrofunc tp_getattro; + setattrofunc tp_setattro; + + + PyBufferProcs *tp_as_buffer; + + + long tp_flags; + + const char *tp_doc; + + + + traverseproc tp_traverse; + + + inquiry tp_clear; + + + + richcmpfunc tp_richcompare; + + + Py_ssize_t tp_weaklistoffset; + + + + getiterfunc tp_iter; + iternextfunc tp_iternext; + + + struct PyMethodDef *tp_methods; + struct PyMemberDef *tp_members; + struct PyGetSetDef *tp_getset; + struct _typeobject *tp_base; + PyObject *tp_dict; + descrgetfunc tp_descr_get; + descrsetfunc tp_descr_set; + Py_ssize_t tp_dictoffset; + initproc tp_init; + allocfunc tp_alloc; + newfunc tp_new; + freefunc tp_free; + inquiry tp_is_gc; + PyObject *tp_bases; + PyObject *tp_mro; + PyObject *tp_cache; + PyObject *tp_subclasses; + PyObject *tp_weaklist; + destructor tp_del; + + + unsigned int tp_version_tag; +# 409 "/usr/include/python2.6/object.h" +} PyTypeObject; + + + +typedef struct _heaptypeobject { + + + PyTypeObject ht_type; + PyNumberMethods as_number; + PyMappingMethods as_mapping; + PySequenceMethods as_sequence; + + + + + PyBufferProcs as_buffer; + PyObject *ht_name, *ht_slots; + +} PyHeapTypeObject; + + + + + + + +int PyType_IsSubtype(PyTypeObject *, PyTypeObject *); + + + +extern PyTypeObject PyType_Type; +extern PyTypeObject PyBaseObject_Type; +extern PyTypeObject PySuper_Type; + + + + + +int PyType_Ready(PyTypeObject *); +PyObject * PyType_GenericAlloc(PyTypeObject *, Py_ssize_t); +PyObject * PyType_GenericNew(PyTypeObject *, + PyObject *, PyObject *); +PyObject * _PyType_Lookup(PyTypeObject *, PyObject *); +unsigned int PyType_ClearCache(void); +void PyType_Modified(PyTypeObject *); + + +int PyObject_Print(PyObject *, FILE *, int); +void _PyObject_Dump(PyObject *); +PyObject * PyObject_Repr(PyObject *); +PyObject * _PyObject_Str(PyObject *); +PyObject * PyObject_Str(PyObject *); + + +PyObject * PyObject_Unicode(PyObject *); + +int PyObject_Compare(PyObject *, PyObject *); +PyObject * PyObject_RichCompare(PyObject *, PyObject *, int); +int PyObject_RichCompareBool(PyObject *, PyObject *, int); +PyObject * PyObject_GetAttrString(PyObject *, const char *); +int PyObject_SetAttrString(PyObject *, const char *, PyObject *); +int PyObject_HasAttrString(PyObject *, const char *); +PyObject * PyObject_GetAttr(PyObject *, PyObject *); +int PyObject_SetAttr(PyObject *, PyObject *, PyObject *); +int PyObject_HasAttr(PyObject *, PyObject *); +PyObject ** _PyObject_GetDictPtr(PyObject *); +PyObject * PyObject_SelfIter(PyObject *); +PyObject * PyObject_GenericGetAttr(PyObject *, PyObject *); +int PyObject_GenericSetAttr(PyObject *, + PyObject *, PyObject *); +long PyObject_Hash(PyObject *); +long PyObject_HashNotImplemented(PyObject *); +int PyObject_IsTrue(PyObject *); +int PyObject_Not(PyObject *); +int PyCallable_Check(PyObject *); +int PyNumber_Coerce(PyObject **, PyObject **); +int PyNumber_CoerceEx(PyObject **, PyObject **); + +void PyObject_ClearWeakRefs(PyObject *); + + +extern int _PyObject_SlotCompare(PyObject *, PyObject *); + + + + + + + +PyObject * PyObject_Dir(PyObject *); + + + +int Py_ReprEnter(PyObject *); +void Py_ReprLeave(PyObject *); + + +long _Py_HashDouble(double); +long _Py_HashPointer(void*); +# 806 "/usr/include/python2.6/object.h" +void Py_IncRef(PyObject *); +void Py_DecRef(PyObject *); + + + + + + + +extern PyObject _Py_NoneStruct; +# 825 "/usr/include/python2.6/object.h" +extern PyObject _Py_NotImplementedStruct; +# 839 "/usr/include/python2.6/object.h" +extern int _Py_SwappedOp[]; +# 951 "/usr/include/python2.6/object.h" +void _PyTrash_deposit_object(PyObject*); +void _PyTrash_destroy_chain(void); +extern int _PyTrash_delete_nesting; +extern PyObject * _PyTrash_delete_later; +# 971 "/usr/include/python2.6/object.h" +} +# 81 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/objimpl.h" 1 +# 11 "/usr/include/python2.6/objimpl.h" +extern "C" { +# 97 "/usr/include/python2.6/objimpl.h" +void * PyObject_Malloc(size_t); +void * PyObject_Realloc(void *, size_t); +void PyObject_Free(void *); +# 143 "/usr/include/python2.6/objimpl.h" +PyObject * PyObject_Init(PyObject *, PyTypeObject *); +PyVarObject * PyObject_InitVar(PyVarObject *, + PyTypeObject *, Py_ssize_t); +PyObject * _PyObject_New(PyTypeObject *); +PyVarObject * _PyObject_NewVar(PyTypeObject *, Py_ssize_t); +# 228 "/usr/include/python2.6/objimpl.h" +Py_ssize_t PyGC_Collect(void); +# 237 "/usr/include/python2.6/objimpl.h" +PyVarObject * _PyObject_GC_Resize(PyVarObject *, Py_ssize_t); + + + + + + + +typedef union _gc_head { + struct { + union _gc_head *gc_next; + union _gc_head *gc_prev; + Py_ssize_t gc_refs; + } gc; + long double dummy; +} PyGC_Head; + +extern PyGC_Head *_PyGC_generation0; +# 288 "/usr/include/python2.6/objimpl.h" +PyObject * _PyObject_GC_Malloc(size_t); +PyObject * _PyObject_GC_New(PyTypeObject *); +PyVarObject * _PyObject_GC_NewVar(PyTypeObject *, Py_ssize_t); +void PyObject_GC_Track(void *); +void PyObject_GC_UnTrack(void *); +void PyObject_GC_Del(void *); +# 334 "/usr/include/python2.6/objimpl.h" +} +# 82 "/usr/include/python2.6/Python.h" 2 + +# 1 "/usr/include/python2.6/pydebug.h" 1 + + + + +extern "C" { + + +extern int Py_DebugFlag; +extern int Py_VerboseFlag; +extern int Py_InteractiveFlag; +extern int Py_InspectFlag; +extern int Py_OptimizeFlag; +extern int Py_NoSiteFlag; +extern int Py_BytesWarningFlag; +extern int Py_UseClassExceptionsFlag; +extern int Py_FrozenFlag; +extern int Py_TabcheckFlag; +extern int Py_UnicodeFlag; +extern int Py_IgnoreEnvironmentFlag; +extern int Py_DivisionWarningFlag; +extern int Py_DontWriteBytecodeFlag; +extern int Py_NoUserSiteDirectory; + + + +extern int _Py_QnewFlag; + +extern int Py_Py3kWarningFlag; + + + + + + +void Py_FatalError(const char *message); + + +} +# 84 "/usr/include/python2.6/Python.h" 2 + +# 1 "/usr/include/python2.6/unicodeobject.h" 1 +# 120 "/usr/include/python2.6/unicodeobject.h" +# 1 "/usr/include/wchar.h" 1 3 4 +# 121 "/usr/include/python2.6/unicodeobject.h" 2 + + + + + + + +typedef unsigned int Py_UCS4; +# 137 "/usr/include/python2.6/unicodeobject.h" +typedef Py_UCS4 Py_UNICODE; +# 410 "/usr/include/python2.6/unicodeobject.h" +extern "C" { + + + + +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + Py_ssize_t length; + Py_UNICODE *str; + long hash; + PyObject *defenc; + + +} PyUnicodeObject; + +extern PyTypeObject PyUnicode_Type; +# 464 "/usr/include/python2.6/unicodeobject.h" +PyObject* PyUnicodeUCS4_FromUnicode( + const Py_UNICODE *u, + Py_ssize_t size + ); + + +PyObject* PyUnicodeUCS4_FromStringAndSize( + const char *u, + Py_ssize_t size + ); + + + +PyObject* PyUnicodeUCS4_FromString( + const char *u + ); + + + + +Py_UNICODE * PyUnicodeUCS4_AsUnicode( + PyObject *unicode + ); + + + +Py_ssize_t PyUnicodeUCS4_GetSize( + PyObject *unicode + ); + + +Py_UNICODE PyUnicodeUCS4_GetMax(void); +# 511 "/usr/include/python2.6/unicodeobject.h" +int PyUnicodeUCS4_Resize( + PyObject **unicode, + Py_ssize_t length + ); +# 533 "/usr/include/python2.6/unicodeobject.h" +PyObject* PyUnicodeUCS4_FromEncodedObject( + register PyObject *obj, + const char *encoding, + const char *errors + ); +# 552 "/usr/include/python2.6/unicodeobject.h" +PyObject* PyUnicodeUCS4_FromObject( + register PyObject *obj + ); + +PyObject * PyUnicodeUCS4_FromFormatV(const char*, va_list); +PyObject * PyUnicodeUCS4_FromFormat(const char*, ...); + + + +PyObject * _PyUnicode_FormatAdvanced(PyObject *obj, + Py_UNICODE *format_spec, + Py_ssize_t format_spec_len); +# 574 "/usr/include/python2.6/unicodeobject.h" +PyObject* PyUnicodeUCS4_FromWideChar( + register const wchar_t *w, + Py_ssize_t size + ); +# 591 "/usr/include/python2.6/unicodeobject.h" +Py_ssize_t PyUnicodeUCS4_AsWideChar( + PyUnicodeObject *unicode, + register wchar_t *w, + Py_ssize_t size + ); +# 609 "/usr/include/python2.6/unicodeobject.h" +PyObject* PyUnicodeUCS4_FromOrdinal(int ordinal); +# 620 "/usr/include/python2.6/unicodeobject.h" +int PyUnicodeUCS4_ClearFreelist(void); +# 656 "/usr/include/python2.6/unicodeobject.h" +PyObject * _PyUnicodeUCS4_AsDefaultEncodedString( + PyObject *, const char *); +# 668 "/usr/include/python2.6/unicodeobject.h" +const char* PyUnicodeUCS4_GetDefaultEncoding(void); + + + + + + + +int PyUnicodeUCS4_SetDefaultEncoding( + const char *encoding + ); + + + + + + +PyObject* PyUnicodeUCS4_Decode( + const char *s, + Py_ssize_t size, + const char *encoding, + const char *errors + ); + + + + +PyObject* PyUnicodeUCS4_Encode( + const Py_UNICODE *s, + Py_ssize_t size, + const char *encoding, + const char *errors + ); + + + + +PyObject* PyUnicodeUCS4_AsEncodedObject( + PyObject *unicode, + const char *encoding, + const char *errors + ); + + + + +PyObject* PyUnicodeUCS4_AsEncodedString( + PyObject *unicode, + const char *encoding, + const char *errors + ); + +PyObject* PyUnicode_BuildEncodingMap( + PyObject* string + ); + + + + +PyObject* PyUnicode_DecodeUTF7( + const char *string, + Py_ssize_t length, + const char *errors + ); + +PyObject* PyUnicode_DecodeUTF7Stateful( + const char *string, + Py_ssize_t length, + const char *errors, + Py_ssize_t *consumed + ); + +PyObject* PyUnicode_EncodeUTF7( + const Py_UNICODE *data, + Py_ssize_t length, + int encodeSetO, + + int encodeWhiteSpace, + + const char *errors + ); + + + +PyObject* PyUnicodeUCS4_DecodeUTF8( + const char *string, + Py_ssize_t length, + const char *errors + ); + +PyObject* PyUnicodeUCS4_DecodeUTF8Stateful( + const char *string, + Py_ssize_t length, + const char *errors, + Py_ssize_t *consumed + ); + +PyObject* PyUnicodeUCS4_AsUTF8String( + PyObject *unicode + ); + +PyObject* PyUnicodeUCS4_EncodeUTF8( + const Py_UNICODE *data, + Py_ssize_t length, + const char *errors + ); +# 800 "/usr/include/python2.6/unicodeobject.h" +PyObject* PyUnicodeUCS4_DecodeUTF32( + const char *string, + Py_ssize_t length, + const char *errors, + int *byteorder + + + ); + +PyObject* PyUnicodeUCS4_DecodeUTF32Stateful( + const char *string, + Py_ssize_t length, + const char *errors, + int *byteorder, + + + Py_ssize_t *consumed + ); + + + + +PyObject* PyUnicodeUCS4_AsUTF32String( + PyObject *unicode + ); +# 842 "/usr/include/python2.6/unicodeobject.h" +PyObject* PyUnicodeUCS4_EncodeUTF32( + const Py_UNICODE *data, + Py_ssize_t length, + const char *errors, + int byteorder + ); +# 874 "/usr/include/python2.6/unicodeobject.h" +PyObject* PyUnicodeUCS4_DecodeUTF16( + const char *string, + Py_ssize_t length, + const char *errors, + int *byteorder + + + ); + +PyObject* PyUnicodeUCS4_DecodeUTF16Stateful( + const char *string, + Py_ssize_t length, + const char *errors, + int *byteorder, + + + Py_ssize_t *consumed + ); + + + + +PyObject* PyUnicodeUCS4_AsUTF16String( + PyObject *unicode + ); +# 920 "/usr/include/python2.6/unicodeobject.h" +PyObject* PyUnicodeUCS4_EncodeUTF16( + const Py_UNICODE *data, + Py_ssize_t length, + const char *errors, + int byteorder + ); + + + +PyObject* PyUnicodeUCS4_DecodeUnicodeEscape( + const char *string, + Py_ssize_t length, + const char *errors + ); + +PyObject* PyUnicodeUCS4_AsUnicodeEscapeString( + PyObject *unicode + ); + +PyObject* PyUnicodeUCS4_EncodeUnicodeEscape( + const Py_UNICODE *data, + Py_ssize_t length + ); + + + +PyObject* PyUnicodeUCS4_DecodeRawUnicodeEscape( + const char *string, + Py_ssize_t length, + const char *errors + ); + +PyObject* PyUnicodeUCS4_AsRawUnicodeEscapeString( + PyObject *unicode + ); + +PyObject* PyUnicodeUCS4_EncodeRawUnicodeEscape( + const Py_UNICODE *data, + Py_ssize_t length + ); + + + + + +PyObject *_PyUnicode_DecodeUnicodeInternal( + const char *string, + Py_ssize_t length, + const char *errors + ); + + + + + + + +PyObject* PyUnicodeUCS4_DecodeLatin1( + const char *string, + Py_ssize_t length, + const char *errors + ); + +PyObject* PyUnicodeUCS4_AsLatin1String( + PyObject *unicode + ); + +PyObject* PyUnicodeUCS4_EncodeLatin1( + const Py_UNICODE *data, + Py_ssize_t length, + const char *errors + ); + + + + + + + +PyObject* PyUnicodeUCS4_DecodeASCII( + const char *string, + Py_ssize_t length, + const char *errors + ); + +PyObject* PyUnicodeUCS4_AsASCIIString( + PyObject *unicode + ); + +PyObject* PyUnicodeUCS4_EncodeASCII( + const Py_UNICODE *data, + Py_ssize_t length, + const char *errors + ); +# 1037 "/usr/include/python2.6/unicodeobject.h" +PyObject* PyUnicodeUCS4_DecodeCharmap( + const char *string, + Py_ssize_t length, + PyObject *mapping, + + const char *errors + ); + +PyObject* PyUnicodeUCS4_AsCharmapString( + PyObject *unicode, + PyObject *mapping + + ); + +PyObject* PyUnicodeUCS4_EncodeCharmap( + const Py_UNICODE *data, + Py_ssize_t length, + PyObject *mapping, + + const char *errors + ); +# 1072 "/usr/include/python2.6/unicodeobject.h" +PyObject * PyUnicodeUCS4_TranslateCharmap( + const Py_UNICODE *data, + Py_ssize_t length, + PyObject *table, + const char *errors + ); +# 1132 "/usr/include/python2.6/unicodeobject.h" +int PyUnicodeUCS4_EncodeDecimal( + Py_UNICODE *s, + Py_ssize_t length, + char *output, + const char *errors + ); +# 1147 "/usr/include/python2.6/unicodeobject.h" +PyObject* PyUnicodeUCS4_Concat( + PyObject *left, + PyObject *right + ); +# 1163 "/usr/include/python2.6/unicodeobject.h" +PyObject* PyUnicodeUCS4_Split( + PyObject *s, + PyObject *sep, + Py_ssize_t maxsplit + ); + + + + + + +PyObject* PyUnicodeUCS4_Splitlines( + PyObject *s, + int keepends + ); + + + +PyObject* PyUnicodeUCS4_Partition( + PyObject *s, + PyObject *sep + ); + + + + +PyObject* PyUnicodeUCS4_RPartition( + PyObject *s, + PyObject *sep + ); +# 1207 "/usr/include/python2.6/unicodeobject.h" +PyObject* PyUnicodeUCS4_RSplit( + PyObject *s, + PyObject *sep, + Py_ssize_t maxsplit + ); +# 1225 "/usr/include/python2.6/unicodeobject.h" +PyObject * PyUnicodeUCS4_Translate( + PyObject *str, + PyObject *table, + const char *errors + ); + + + + +PyObject* PyUnicodeUCS4_Join( + PyObject *separator, + PyObject *seq + ); + + + + +Py_ssize_t PyUnicodeUCS4_Tailmatch( + PyObject *str, + PyObject *substr, + Py_ssize_t start, + Py_ssize_t end, + int direction + ); + + + + + +Py_ssize_t PyUnicodeUCS4_Find( + PyObject *str, + PyObject *substr, + Py_ssize_t start, + Py_ssize_t end, + int direction + ); + + + +Py_ssize_t PyUnicodeUCS4_Count( + PyObject *str, + PyObject *substr, + Py_ssize_t start, + Py_ssize_t end + ); + + + + +PyObject * PyUnicodeUCS4_Replace( + PyObject *str, + PyObject *substr, + PyObject *replstr, + Py_ssize_t maxcount + + ); + + + + +int PyUnicodeUCS4_Compare( + PyObject *left, + PyObject *right + ); +# 1306 "/usr/include/python2.6/unicodeobject.h" +PyObject * PyUnicodeUCS4_RichCompare( + PyObject *left, + PyObject *right, + int op + ); + + + + +PyObject * PyUnicodeUCS4_Format( + PyObject *format, + PyObject *args + ); + + + + + + + +int PyUnicodeUCS4_Contains( + PyObject *container, + PyObject *element + ); + + +PyObject * _PyUnicode_XStrip( + PyUnicodeObject *self, + int striptype, + PyObject *sepobj + ); + + + + + +extern const unsigned char _Py_ascii_whitespace[]; +# 1351 "/usr/include/python2.6/unicodeobject.h" +int _PyUnicodeUCS4_IsLowercase( + Py_UNICODE ch + ); + +int _PyUnicodeUCS4_IsUppercase( + Py_UNICODE ch + ); + +int _PyUnicodeUCS4_IsTitlecase( + Py_UNICODE ch + ); + +int _PyUnicodeUCS4_IsWhitespace( + const Py_UNICODE ch + ); + +int _PyUnicodeUCS4_IsLinebreak( + const Py_UNICODE ch + ); + +Py_UNICODE _PyUnicodeUCS4_ToLowercase( + Py_UNICODE ch + ); + +Py_UNICODE _PyUnicodeUCS4_ToUppercase( + Py_UNICODE ch + ); + +Py_UNICODE _PyUnicodeUCS4_ToTitlecase( + Py_UNICODE ch + ); + +int _PyUnicodeUCS4_ToDecimalDigit( + Py_UNICODE ch + ); + +int _PyUnicodeUCS4_ToDigit( + Py_UNICODE ch + ); + +double _PyUnicodeUCS4_ToNumeric( + Py_UNICODE ch + ); + +int _PyUnicodeUCS4_IsDecimalDigit( + Py_UNICODE ch + ); + +int _PyUnicodeUCS4_IsDigit( + Py_UNICODE ch + ); + +int _PyUnicodeUCS4_IsNumeric( + Py_UNICODE ch + ); + +int _PyUnicodeUCS4_IsAlpha( + Py_UNICODE ch + ); + + +} +# 86 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/intobject.h" 1 +# 20 "/usr/include/python2.6/intobject.h" +extern "C" { + + +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + long ob_ival; +} PyIntObject; + +extern PyTypeObject PyInt_Type; + + + + + +PyObject * PyInt_FromString(char*, char**, int); + +PyObject * PyInt_FromUnicode(Py_UNICODE*, Py_ssize_t, int); + +PyObject * PyInt_FromLong(long); +PyObject * PyInt_FromSize_t(size_t); +PyObject * PyInt_FromSsize_t(Py_ssize_t); +long PyInt_AsLong(PyObject *); +Py_ssize_t PyInt_AsSsize_t(PyObject *); +unsigned long PyInt_AsUnsignedLongMask(PyObject *); + +unsigned long long PyInt_AsUnsignedLongLongMask(PyObject *); + + +long PyInt_GetMax(void); +# 59 "/usr/include/python2.6/intobject.h" +unsigned long PyOS_strtoul(char *, char **, int); +long PyOS_strtol(char *, char **, int); + + +int PyInt_ClearFreeList(void); + + + + + +PyObject* _PyInt_Format(PyIntObject* v, int base, int newstyle); + + + +PyObject * _PyInt_FormatAdvanced(PyObject *obj, + char *format_spec, + Py_ssize_t format_spec_len); + + +} +# 87 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/boolobject.h" 1 + + + + + +extern "C" { + + + +typedef PyIntObject PyBoolObject; + +extern PyTypeObject PyBool_Type; + + + + + + + +extern PyIntObject _Py_ZeroStruct, _Py_TrueStruct; +# 31 "/usr/include/python2.6/boolobject.h" +PyObject * PyBool_FromLong(long); + + +} +# 88 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/longobject.h" 1 + + + +extern "C" { + + + + + +typedef struct _longobject PyLongObject; + +extern PyTypeObject PyLong_Type; + + + + + +PyObject * PyLong_FromLong(long); +PyObject * PyLong_FromUnsignedLong(unsigned long); +PyObject * PyLong_FromDouble(double); +PyObject * PyLong_FromSize_t(size_t); +PyObject * PyLong_FromSsize_t(Py_ssize_t); +long PyLong_AsLong(PyObject *); +unsigned long PyLong_AsUnsignedLong(PyObject *); +unsigned long PyLong_AsUnsignedLongMask(PyObject *); +Py_ssize_t PyLong_AsSsize_t(PyObject *); + + + + + +extern int _PyLong_DigitValue[256]; + + + + + + + +double _PyLong_AsScaledDouble(PyObject *vv, int *e); + +double PyLong_AsDouble(PyObject *); +PyObject * PyLong_FromVoidPtr(void *); +void * PyLong_AsVoidPtr(PyObject *); + + +PyObject * PyLong_FromLongLong(long long); +PyObject * PyLong_FromUnsignedLongLong(unsigned long long); +long long PyLong_AsLongLong(PyObject *); +unsigned long long PyLong_AsUnsignedLongLong(PyObject *); +unsigned long long PyLong_AsUnsignedLongLongMask(PyObject *); + + +PyObject * PyLong_FromString(char *, char **, int); + +PyObject * PyLong_FromUnicode(Py_UNICODE*, Py_ssize_t, int); + + + + + + +int _PyLong_Sign(PyObject *v); +# 73 "/usr/include/python2.6/longobject.h" +size_t _PyLong_NumBits(PyObject *v); +# 88 "/usr/include/python2.6/longobject.h" +PyObject * _PyLong_FromByteArray( + const unsigned char* bytes, size_t n, + int little_endian, int is_signed); +# 111 "/usr/include/python2.6/longobject.h" +int _PyLong_AsByteArray(PyLongObject* v, + unsigned char* bytes, size_t n, + int little_endian, int is_signed); + + + + + + +PyObject * _PyLong_Format(PyObject *aa, int base, int addL, int newstyle); + + + +PyObject * _PyLong_FormatAdvanced(PyObject *obj, + char *format_spec, + Py_ssize_t format_spec_len); + + +} +# 89 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/floatobject.h" 1 +# 11 "/usr/include/python2.6/floatobject.h" +extern "C" { + + +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + double ob_fval; +} PyFloatObject; + +extern PyTypeObject PyFloat_Type; +# 35 "/usr/include/python2.6/floatobject.h" +double PyFloat_GetMax(void); +double PyFloat_GetMin(void); +PyObject * PyFloat_GetInfo(void); + + + + +PyObject * PyFloat_FromString(PyObject*, char** junk); + + +PyObject * PyFloat_FromDouble(double); + + + +double PyFloat_AsDouble(PyObject *); + + + + + + +void PyFloat_AsReprString(char*, PyFloatObject *v); + + + + + + +void PyFloat_AsString(char*, PyFloatObject *v); +# 97 "/usr/include/python2.6/floatobject.h" +int _PyFloat_Pack4(double x, unsigned char *p, int le); +int _PyFloat_Pack8(double x, unsigned char *p, int le); + + +int _PyFloat_Digits(char *buf, double v, int *signum); +void _PyFloat_DigitsInit(void); +# 112 "/usr/include/python2.6/floatobject.h" +double _PyFloat_Unpack4(const unsigned char *p, int le); +double _PyFloat_Unpack8(const unsigned char *p, int le); + + +int PyFloat_ClearFreeList(void); + + + +PyObject * _PyFloat_FormatAdvanced(PyObject *obj, + char *format_spec, + Py_ssize_t format_spec_len); + + +} +# 90 "/usr/include/python2.6/Python.h" 2 + +# 1 "/usr/include/python2.6/complexobject.h" 1 + + + + + +extern "C" { + + +typedef struct { + double real; + double imag; +} Py_complex; +# 24 "/usr/include/python2.6/complexobject.h" +Py_complex _Py_c_sum(Py_complex, Py_complex); +Py_complex _Py_c_diff(Py_complex, Py_complex); +Py_complex _Py_c_neg(Py_complex); +Py_complex _Py_c_prod(Py_complex, Py_complex); +Py_complex _Py_c_quot(Py_complex, Py_complex); +Py_complex _Py_c_pow(Py_complex, Py_complex); +double _Py_c_abs(Py_complex); +# 40 "/usr/include/python2.6/complexobject.h" +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + Py_complex cval; +} PyComplexObject; + +extern PyTypeObject PyComplex_Type; + + + + +PyObject * PyComplex_FromCComplex(Py_complex); +PyObject * PyComplex_FromDoubles(double real, double imag); + +double PyComplex_RealAsDouble(PyObject *op); +double PyComplex_ImagAsDouble(PyObject *op); +Py_complex PyComplex_AsCComplex(PyObject *op); + + +} +# 92 "/usr/include/python2.6/Python.h" 2 + +# 1 "/usr/include/python2.6/rangeobject.h" 1 + + + + + + +extern "C" { +# 21 "/usr/include/python2.6/rangeobject.h" +extern PyTypeObject PyRange_Type; + + + + +} +# 94 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/stringobject.h" 1 + + + + + + +extern "C" { +# 35 "/usr/include/python2.6/stringobject.h" +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; Py_ssize_t ob_size; + long ob_shash; + int ob_sstate; + char ob_sval[1]; +# 49 "/usr/include/python2.6/stringobject.h" +} PyStringObject; + + + + + +extern PyTypeObject PyBaseString_Type; +extern PyTypeObject PyString_Type; + + + + + +PyObject * PyString_FromStringAndSize(const char *, Py_ssize_t); +PyObject * PyString_FromString(const char *); +PyObject * PyString_FromFormatV(const char*, va_list) + __attribute__((format(printf, 1, 0))); +PyObject * PyString_FromFormat(const char*, ...) + __attribute__((format(printf, 1, 2))); +Py_ssize_t PyString_Size(PyObject *); +char * PyString_AsString(PyObject *); +PyObject * PyString_Repr(PyObject *, int); +void PyString_Concat(PyObject **, PyObject *); +void PyString_ConcatAndDel(PyObject **, PyObject *); +int _PyString_Resize(PyObject **, Py_ssize_t); +int _PyString_Eq(PyObject *, PyObject*); +PyObject * PyString_Format(PyObject *, PyObject *); +PyObject * _PyString_FormatLong(PyObject*, int, int, + int, char**, int*); +PyObject * PyString_DecodeEscape(const char *, Py_ssize_t, + const char *, Py_ssize_t, + const char *); + +void PyString_InternInPlace(PyObject **); +void PyString_InternImmortal(PyObject **); +PyObject * PyString_InternFromString(const char *); +void _Py_ReleaseInternedStrings(void); +# 96 "/usr/include/python2.6/stringobject.h" +PyObject * _PyString_Join(PyObject *sep, PyObject *x); + + + + + + +PyObject* PyString_Decode( + const char *s, + Py_ssize_t size, + const char *encoding, + const char *errors + ); + + + + +PyObject* PyString_Encode( + const char *s, + Py_ssize_t size, + const char *encoding, + const char *errors + ); + + + + +PyObject* PyString_AsEncodedObject( + PyObject *str, + const char *encoding, + const char *errors + ); +# 137 "/usr/include/python2.6/stringobject.h" +PyObject* PyString_AsEncodedString( + PyObject *str, + const char *encoding, + const char *errors + ); + + + + +PyObject* PyString_AsDecodedObject( + PyObject *str, + const char *encoding, + const char *errors + ); +# 160 "/usr/include/python2.6/stringobject.h" +PyObject* PyString_AsDecodedString( + PyObject *str, + const char *encoding, + const char *errors + ); + + + + + + + +int PyString_AsStringAndSize( + register PyObject *obj, + register char **s, + register Py_ssize_t *len + + + ); + + + + + +int _PyString_InsertThousandsGrouping(char *buffer, + Py_ssize_t n_buffer, + Py_ssize_t n_digits, + Py_ssize_t buf_size, + Py_ssize_t *count, + int append_zero_char); + + + +PyObject * _PyBytes_FormatAdvanced(PyObject *obj, + char *format_spec, + Py_ssize_t format_spec_len); + + +} +# 95 "/usr/include/python2.6/Python.h" 2 + +# 1 "/usr/include/python2.6/bufferobject.h" 1 +# 9 "/usr/include/python2.6/bufferobject.h" +extern "C" { + + + +extern PyTypeObject PyBuffer_Type; + + + + + +PyObject * PyBuffer_FromObject(PyObject *base, + Py_ssize_t offset, Py_ssize_t size); +PyObject * PyBuffer_FromReadWriteObject(PyObject *base, + Py_ssize_t offset, + Py_ssize_t size); + +PyObject * PyBuffer_FromMemory(void *ptr, Py_ssize_t size); +PyObject * PyBuffer_FromReadWriteMemory(void *ptr, Py_ssize_t size); + +PyObject * PyBuffer_New(Py_ssize_t size); + + +} +# 97 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/bytesobject.h" 1 +# 98 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/bytearrayobject.h" 1 + + + + + +extern "C" { +# 22 "/usr/include/python2.6/bytearrayobject.h" +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; Py_ssize_t ob_size; + + int ob_exports; + Py_ssize_t ob_alloc; + char *ob_bytes; +} PyByteArrayObject; + + +extern PyTypeObject PyByteArray_Type; +extern PyTypeObject PyByteArrayIter_Type; + + + + + + +PyObject * PyByteArray_FromObject(PyObject *); +PyObject * PyByteArray_Concat(PyObject *, PyObject *); +PyObject * PyByteArray_FromStringAndSize(const char *, Py_ssize_t); +Py_ssize_t PyByteArray_Size(PyObject *); +char * PyByteArray_AsString(PyObject *); +int PyByteArray_Resize(PyObject *, Py_ssize_t); + + + + + + + +extern char _PyByteArray_empty_string[]; + + +} +# 99 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/tupleobject.h" 1 + + + + + + +extern "C" { +# 24 "/usr/include/python2.6/tupleobject.h" +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; Py_ssize_t ob_size; + PyObject *ob_item[1]; + + + + + +} PyTupleObject; + +extern PyTypeObject PyTuple_Type; + + + + + +PyObject * PyTuple_New(Py_ssize_t size); +Py_ssize_t PyTuple_Size(PyObject *); +PyObject * PyTuple_GetItem(PyObject *, Py_ssize_t); +int PyTuple_SetItem(PyObject *, Py_ssize_t, PyObject *); +PyObject * PyTuple_GetSlice(PyObject *, Py_ssize_t, Py_ssize_t); +int _PyTuple_Resize(PyObject **, Py_ssize_t); +PyObject * PyTuple_Pack(Py_ssize_t, ...); +# 55 "/usr/include/python2.6/tupleobject.h" +int PyTuple_ClearFreeList(void); + + +} +# 100 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/listobject.h" 1 +# 19 "/usr/include/python2.6/listobject.h" +extern "C" { + + +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; Py_ssize_t ob_size; + + PyObject **ob_item; +# 38 "/usr/include/python2.6/listobject.h" + Py_ssize_t allocated; +} PyListObject; + +extern PyTypeObject PyList_Type; + + + + + +PyObject * PyList_New(Py_ssize_t size); +Py_ssize_t PyList_Size(PyObject *); +PyObject * PyList_GetItem(PyObject *, Py_ssize_t); +int PyList_SetItem(PyObject *, Py_ssize_t, PyObject *); +int PyList_Insert(PyObject *, Py_ssize_t, PyObject *); +int PyList_Append(PyObject *, PyObject *); +PyObject * PyList_GetSlice(PyObject *, Py_ssize_t, Py_ssize_t); +int PyList_SetSlice(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *); +int PyList_Sort(PyObject *); +int PyList_Reverse(PyObject *); +PyObject * PyList_AsTuple(PyObject *); +PyObject * _PyList_Extend(PyListObject *, PyObject *); + + + + + + + +} +# 101 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/dictobject.h" 1 + + + +extern "C" { +# 50 "/usr/include/python2.6/dictobject.h" +typedef struct { + + + + + Py_ssize_t me_hash; + PyObject *me_key; + PyObject *me_value; +} PyDictEntry; +# 69 "/usr/include/python2.6/dictobject.h" +typedef struct _dictobject PyDictObject; +struct _dictobject { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + Py_ssize_t ma_fill; + Py_ssize_t ma_used; + + + + + + Py_ssize_t ma_mask; + + + + + + + PyDictEntry *ma_table; + PyDictEntry *(*ma_lookup)(PyDictObject *mp, PyObject *key, long hash); + PyDictEntry ma_smalltable[8]; +}; + +extern PyTypeObject PyDict_Type; + + + + + +PyObject * PyDict_New(void); +PyObject * PyDict_GetItem(PyObject *mp, PyObject *key); +int PyDict_SetItem(PyObject *mp, PyObject *key, PyObject *item); +int PyDict_DelItem(PyObject *mp, PyObject *key); +void PyDict_Clear(PyObject *mp); +int PyDict_Next( + PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value); +int _PyDict_Next( + PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value, long *hash); +PyObject * PyDict_Keys(PyObject *mp); +PyObject * PyDict_Values(PyObject *mp); +PyObject * PyDict_Items(PyObject *mp); +Py_ssize_t PyDict_Size(PyObject *mp); +PyObject * PyDict_Copy(PyObject *mp); +int PyDict_Contains(PyObject *mp, PyObject *key); +int _PyDict_Contains(PyObject *mp, PyObject *key, long hash); +PyObject * _PyDict_NewPresized(Py_ssize_t minused); + + +int PyDict_Update(PyObject *mp, PyObject *other); + + + + + + +int PyDict_Merge(PyObject *mp, + PyObject *other, + int override); + + + + + + +int PyDict_MergeFromSeq2(PyObject *d, + PyObject *seq2, + int override); + +PyObject * PyDict_GetItemString(PyObject *dp, const char *key); +int PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item); +int PyDict_DelItemString(PyObject *dp, const char *key); + + +} +# 102 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/enumobject.h" 1 + + + + + + +extern "C" { + + +extern PyTypeObject PyEnum_Type; +extern PyTypeObject PyReversed_Type; + + +} +# 103 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/setobject.h" 1 + + + + + +extern "C" { +# 24 "/usr/include/python2.6/setobject.h" +typedef struct { + long hash; + PyObject *key; +} setentry; + + + + + + +typedef struct _setobject PySetObject; +struct _setobject { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + + Py_ssize_t fill; + Py_ssize_t used; + + + + + + Py_ssize_t mask; + + + + + + setentry *table; + setentry *(*lookup)(PySetObject *so, PyObject *key, long hash); + setentry smalltable[8]; + + long hash; + PyObject *weakreflist; +}; + +extern PyTypeObject PySet_Type; +extern PyTypeObject PyFrozenSet_Type; +# 83 "/usr/include/python2.6/setobject.h" +PyObject * PySet_New(PyObject *); +PyObject * PyFrozenSet_New(PyObject *); +Py_ssize_t PySet_Size(PyObject *anyset); + +int PySet_Clear(PyObject *set); +int PySet_Contains(PyObject *anyset, PyObject *key); +int PySet_Discard(PyObject *set, PyObject *key); +int PySet_Add(PyObject *set, PyObject *key); +int _PySet_Next(PyObject *set, Py_ssize_t *pos, PyObject **key); +int _PySet_NextEntry(PyObject *set, Py_ssize_t *pos, PyObject **key, long *hash); +PyObject * PySet_Pop(PyObject *set); +int _PySet_Update(PyObject *set, PyObject *iterable); + + +} +# 104 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/methodobject.h" 1 + + + + + + +extern "C" { + + + + + + +extern PyTypeObject PyCFunction_Type; + + + +typedef PyObject *(*PyCFunction)(PyObject *, PyObject *); +typedef PyObject *(*PyCFunctionWithKeywords)(PyObject *, PyObject *, + PyObject *); +typedef PyObject *(*PyNoArgsFunction)(PyObject *); + +PyCFunction PyCFunction_GetFunction(PyObject *); +PyObject * PyCFunction_GetSelf(PyObject *); +int PyCFunction_GetFlags(PyObject *); +# 35 "/usr/include/python2.6/methodobject.h" +PyObject * PyCFunction_Call(PyObject *, PyObject *, PyObject *); + +struct PyMethodDef { + const char *ml_name; + PyCFunction ml_meth; + int ml_flags; + + const char *ml_doc; +}; +typedef struct PyMethodDef PyMethodDef; + +PyObject * Py_FindMethod(PyMethodDef[], PyObject *, const char *); + + +PyObject * PyCFunction_NewEx(PyMethodDef *, PyObject *, + PyObject *); +# 73 "/usr/include/python2.6/methodobject.h" +typedef struct PyMethodChain { + PyMethodDef *methods; + struct PyMethodChain *link; +} PyMethodChain; + +PyObject * Py_FindMethodInChain(PyMethodChain *, PyObject *, + const char *); + +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyMethodDef *m_ml; + PyObject *m_self; + PyObject *m_module; +} PyCFunctionObject; + +int PyCFunction_ClearFreeList(void); + + +} +# 105 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/moduleobject.h" 1 + + + + + + +extern "C" { + + +extern PyTypeObject PyModule_Type; + + + + +PyObject * PyModule_New(const char *); +PyObject * PyModule_GetDict(PyObject *); +char * PyModule_GetName(PyObject *); +char * PyModule_GetFilename(PyObject *); +void _PyModule_Clear(PyObject *); + + +} +# 106 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/funcobject.h" 1 + + + + + + +extern "C" { +# 21 "/usr/include/python2.6/funcobject.h" +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *func_code; + PyObject *func_globals; + PyObject *func_defaults; + PyObject *func_closure; + PyObject *func_doc; + PyObject *func_name; + PyObject *func_dict; + PyObject *func_weakreflist; + PyObject *func_module; + + + + + + +} PyFunctionObject; + +extern PyTypeObject PyFunction_Type; + + + +PyObject * PyFunction_New(PyObject *, PyObject *); +PyObject * PyFunction_GetCode(PyObject *); +PyObject * PyFunction_GetGlobals(PyObject *); +PyObject * PyFunction_GetModule(PyObject *); +PyObject * PyFunction_GetDefaults(PyObject *); +int PyFunction_SetDefaults(PyObject *, PyObject *); +PyObject * PyFunction_GetClosure(PyObject *); +int PyFunction_SetClosure(PyObject *, PyObject *); +# 67 "/usr/include/python2.6/funcobject.h" +extern PyTypeObject PyClassMethod_Type; +extern PyTypeObject PyStaticMethod_Type; + +PyObject * PyClassMethod_New(PyObject *); +PyObject * PyStaticMethod_New(PyObject *); + + +} +# 107 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/classobject.h" 1 +# 9 "/usr/include/python2.6/classobject.h" +extern "C" { + + +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *cl_bases; + PyObject *cl_dict; + PyObject *cl_name; + + PyObject *cl_getattr; + PyObject *cl_setattr; + PyObject *cl_delattr; +} PyClassObject; + +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyClassObject *in_class; + PyObject *in_dict; + PyObject *in_weakreflist; +} PyInstanceObject; + +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *im_func; + PyObject *im_self; + PyObject *im_class; + PyObject *im_weakreflist; +} PyMethodObject; + +extern PyTypeObject PyClass_Type, PyInstance_Type, PyMethod_Type; + + + + + +PyObject * PyClass_New(PyObject *, PyObject *, PyObject *); +PyObject * PyInstance_New(PyObject *, PyObject *, + PyObject *); +PyObject * PyInstance_NewRaw(PyObject *, PyObject *); +PyObject * PyMethod_New(PyObject *, PyObject *, PyObject *); + +PyObject * PyMethod_Function(PyObject *); +PyObject * PyMethod_Self(PyObject *); +PyObject * PyMethod_Class(PyObject *); +# 64 "/usr/include/python2.6/classobject.h" +PyObject * _PyInstance_Lookup(PyObject *pinst, PyObject *name); +# 75 "/usr/include/python2.6/classobject.h" +int PyClass_IsSubclass(PyObject *, PyObject *); + +int PyMethod_ClearFreeList(void); + + +} +# 108 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/fileobject.h" 1 + + + + + + +extern "C" { + + +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + FILE *f_fp; + PyObject *f_name; + PyObject *f_mode; + int (*f_close)(FILE *); + int f_softspace; + int f_binary; + + char* f_buf; + char* f_bufend; + char* f_bufptr; + char *f_setbuf; + int f_univ_newline; + int f_newlinetypes; + int f_skipnextlf; + PyObject *f_encoding; + PyObject *f_errors; + PyObject *weakreflist; + int unlocked_count; + + int readable; + int writable; +} PyFileObject; + +extern PyTypeObject PyFile_Type; + + + + +PyObject * PyFile_FromString(char *, char *); +void PyFile_SetBufSize(PyObject *, int); +int PyFile_SetEncoding(PyObject *, const char *); +int PyFile_SetEncodingAndErrors(PyObject *, const char *, char *errors); +PyObject * PyFile_FromFile(FILE *, char *, char *, + int (*)(FILE *)); +FILE * PyFile_AsFile(PyObject *); +void PyFile_IncUseCount(PyFileObject *); +void PyFile_DecUseCount(PyFileObject *); +PyObject * PyFile_Name(PyObject *); +PyObject * PyFile_GetLine(PyObject *, int); +int PyFile_WriteObject(PyObject *, PyObject *, int); +int PyFile_SoftSpace(PyObject *, int); +int PyFile_WriteString(const char *, PyObject *); +int PyObject_AsFileDescriptor(PyObject *); + + + + +extern const char * Py_FileSystemDefaultEncoding; + + + + + +char *Py_UniversalNewlineFgets(char *, int, FILE*, PyObject *); +size_t Py_UniversalNewlineFread(char *, size_t, FILE *, PyObject *); + + + + +int _PyFile_SanitizeMode(char *mode); + + +} +# 109 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/cobject.h" 1 +# 14 "/usr/include/python2.6/cobject.h" +extern "C" { + + +extern PyTypeObject PyCObject_Type; +# 27 "/usr/include/python2.6/cobject.h" +PyObject * PyCObject_FromVoidPtr( + void *cobj, void (*destruct)(void*)); + + + + + + + +PyObject * PyCObject_FromVoidPtrAndDesc( + void *cobj, void *desc, void (*destruct)(void*,void*)); + + +void * PyCObject_AsVoidPtr(PyObject *); + + +void * PyCObject_GetDesc(PyObject *); + + +void * PyCObject_Import(char *module_name, char *cobject_name); + + +int PyCObject_SetVoidPtr(PyObject *self, void *cobj); + + +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + void *cobject; + void *desc; + void (*destructor)(void *); +} PyCObject; + + + +} +# 110 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/traceback.h" 1 + + + + +extern "C" { + + +struct _frame; + + + +typedef struct _traceback { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + struct _traceback *tb_next; + struct _frame *tb_frame; + int tb_lasti; + int tb_lineno; +} PyTracebackObject; + +int PyTraceBack_Here(struct _frame *); +int PyTraceBack_Print(PyObject *, PyObject *); +int _Py_DisplaySourceLine(PyObject *, const char *, int, int); + + +extern PyTypeObject PyTraceBack_Type; + + + +} +# 111 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/sliceobject.h" 1 + + + +extern "C" { + + + + +extern PyObject _Py_EllipsisObject; +# 22 "/usr/include/python2.6/sliceobject.h" +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *start, *stop, *step; +} PySliceObject; + +extern PyTypeObject PySlice_Type; +extern PyTypeObject PyEllipsis_Type; + + + +PyObject * PySlice_New(PyObject* start, PyObject* stop, + PyObject* step); +PyObject * _PySlice_FromIndices(Py_ssize_t start, Py_ssize_t stop); +int PySlice_GetIndices(PySliceObject *r, Py_ssize_t length, + Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step); +int PySlice_GetIndicesEx(PySliceObject *r, Py_ssize_t length, + Py_ssize_t *start, Py_ssize_t *stop, + Py_ssize_t *step, Py_ssize_t *slicelength); + + +} +# 112 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/cellobject.h" 1 + + + + + +extern "C" { + + +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *ob_ref; +} PyCellObject; + +extern PyTypeObject PyCell_Type; + + + +PyObject * PyCell_New(PyObject *); +PyObject * PyCell_Get(PyObject *); +int PyCell_Set(PyObject *, PyObject *); + + + + + +} +# 113 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/iterobject.h" 1 + + + + +extern "C" { + + +extern PyTypeObject PySeqIter_Type; + + + +PyObject * PySeqIter_New(PyObject *); + +extern PyTypeObject PyCallIter_Type; + + + +PyObject * PyCallIter_New(PyObject *, PyObject *); + +} +# 114 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/genobject.h" 1 + + + + + + +extern "C" { + + +struct _frame; + +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + + + + struct _frame *gi_frame; + + + int gi_running; + + + PyObject *gi_code; + + + PyObject *gi_weakreflist; +} PyGenObject; + +extern PyTypeObject PyGen_Type; + + + + +PyObject * PyGen_New(struct _frame *); +int PyGen_NeedsFinalizing(PyGenObject *); + + +} +# 115 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/descrobject.h" 1 + + + + +extern "C" { + + +typedef PyObject *(*getter)(PyObject *, void *); +typedef int (*setter)(PyObject *, PyObject *, void *); + +typedef struct PyGetSetDef { + char *name; + getter get; + setter set; + char *doc; + void *closure; +} PyGetSetDef; + +typedef PyObject *(*wrapperfunc)(PyObject *self, PyObject *args, + void *wrapped); + +typedef PyObject *(*wrapperfunc_kwds)(PyObject *self, PyObject *args, + void *wrapped, PyObject *kwds); + +struct wrapperbase { + char *name; + int offset; + void *function; + wrapperfunc wrapper; + char *doc; + int flags; + PyObject *name_strobj; +}; +# 45 "/usr/include/python2.6/descrobject.h" +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; PyTypeObject *d_type; PyObject *d_name; +} PyDescrObject; + +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; PyTypeObject *d_type; PyObject *d_name; + PyMethodDef *d_method; +} PyMethodDescrObject; + +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; PyTypeObject *d_type; PyObject *d_name; + struct PyMemberDef *d_member; +} PyMemberDescrObject; + +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; PyTypeObject *d_type; PyObject *d_name; + PyGetSetDef *d_getset; +} PyGetSetDescrObject; + +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; PyTypeObject *d_type; PyObject *d_name; + struct wrapperbase *d_base; + void *d_wrapped; +} PyWrapperDescrObject; + +extern PyTypeObject PyWrapperDescr_Type; +extern PyTypeObject PyDictProxy_Type; +extern PyTypeObject PyGetSetDescr_Type; +extern PyTypeObject PyMemberDescr_Type; + +PyObject * PyDescr_NewMethod(PyTypeObject *, PyMethodDef *); +PyObject * PyDescr_NewClassMethod(PyTypeObject *, PyMethodDef *); +PyObject * PyDescr_NewMember(PyTypeObject *, + struct PyMemberDef *); +PyObject * PyDescr_NewGetSet(PyTypeObject *, + struct PyGetSetDef *); +PyObject * PyDescr_NewWrapper(PyTypeObject *, + struct wrapperbase *, void *); + + +PyObject * PyDictProxy_New(PyObject *); +PyObject * PyWrapper_New(PyObject *, PyObject *); + + +extern PyTypeObject PyProperty_Type; + +} +# 116 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/warnings.h" 1 + + + +extern "C" { + + +void _PyWarnings_Init(void); + +int PyErr_WarnEx(PyObject *, const char *, Py_ssize_t); +int PyErr_WarnExplicit(PyObject *, const char *, const char *, int, + const char *, PyObject *); +# 20 "/usr/include/python2.6/warnings.h" +} +# 117 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/weakrefobject.h" 1 + + + + + +extern "C" { + + + +typedef struct _PyWeakReference PyWeakReference; + + + + +struct _PyWeakReference { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + + + + + + PyObject *wr_object; + + + PyObject *wr_callback; + + + + + long hash; + + + + + + + PyWeakReference *wr_prev; + PyWeakReference *wr_next; +}; + +extern PyTypeObject _PyWeakref_RefType; +extern PyTypeObject _PyWeakref_ProxyType; +extern PyTypeObject _PyWeakref_CallableProxyType; +# 59 "/usr/include/python2.6/weakrefobject.h" +PyObject * PyWeakref_NewRef(PyObject *ob, + PyObject *callback); +PyObject * PyWeakref_NewProxy(PyObject *ob, + PyObject *callback); +PyObject * PyWeakref_GetObject(PyObject *ref); + +Py_ssize_t _PyWeakref_GetWeakrefCount(PyWeakReference *head); + +void _PyWeakref_ClearRef(PyWeakReference *self); + + + + + +} +# 118 "/usr/include/python2.6/Python.h" 2 + +# 1 "/usr/include/python2.6/codecs.h" 1 + + + +extern "C" { +# 26 "/usr/include/python2.6/codecs.h" +int PyCodec_Register( + PyObject *search_function + ); +# 48 "/usr/include/python2.6/codecs.h" +PyObject * _PyCodec_Lookup( + const char *encoding + ); +# 62 "/usr/include/python2.6/codecs.h" +PyObject * PyCodec_Encode( + PyObject *object, + const char *encoding, + const char *errors + ); +# 78 "/usr/include/python2.6/codecs.h" +PyObject * PyCodec_Decode( + PyObject *object, + const char *encoding, + const char *errors + ); +# 94 "/usr/include/python2.6/codecs.h" +PyObject * PyCodec_Encoder( + const char *encoding + ); + + + +PyObject * PyCodec_Decoder( + const char *encoding + ); + + + +PyObject * PyCodec_IncrementalEncoder( + const char *encoding, + const char *errors + ); + + + +PyObject * PyCodec_IncrementalDecoder( + const char *encoding, + const char *errors + ); + + + +PyObject * PyCodec_StreamReader( + const char *encoding, + PyObject *stream, + const char *errors + ); + + + +PyObject * PyCodec_StreamWriter( + const char *encoding, + PyObject *stream, + const char *errors + ); +# 142 "/usr/include/python2.6/codecs.h" +int PyCodec_RegisterError(const char *name, PyObject *error); + + + + +PyObject * PyCodec_LookupError(const char *name); + + +PyObject * PyCodec_StrictErrors(PyObject *exc); + + +PyObject * PyCodec_IgnoreErrors(PyObject *exc); + + +PyObject * PyCodec_ReplaceErrors(PyObject *exc); + + +PyObject * PyCodec_XMLCharRefReplaceErrors(PyObject *exc); + + +PyObject * PyCodec_BackslashReplaceErrors(PyObject *exc); + + +} +# 120 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/pyerrors.h" 1 + + + +extern "C" { + + + + +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *dict; + PyObject *args; + PyObject *message; +} PyBaseExceptionObject; + +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *dict; + PyObject *args; + PyObject *message; + PyObject *msg; + PyObject *filename; + PyObject *lineno; + PyObject *offset; + PyObject *text; + PyObject *print_file_and_line; +} PySyntaxErrorObject; + + +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *dict; + PyObject *args; + PyObject *message; + PyObject *encoding; + PyObject *object; + Py_ssize_t start; + Py_ssize_t end; + PyObject *reason; +} PyUnicodeErrorObject; + + +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *dict; + PyObject *args; + PyObject *message; + PyObject *code; +} PySystemExitObject; + +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *dict; + PyObject *args; + PyObject *message; + PyObject *myerrno; + PyObject *strerror; + PyObject *filename; +} PyEnvironmentErrorObject; +# 76 "/usr/include/python2.6/pyerrors.h" +void PyErr_SetNone(PyObject *); +void PyErr_SetObject(PyObject *, PyObject *); +void PyErr_SetString(PyObject *, const char *); +PyObject * PyErr_Occurred(void); +void PyErr_Clear(void); +void PyErr_Fetch(PyObject **, PyObject **, PyObject **); +void PyErr_Restore(PyObject *, PyObject *, PyObject *); +# 91 "/usr/include/python2.6/pyerrors.h" +int PyErr_GivenExceptionMatches(PyObject *, PyObject *); +int PyErr_ExceptionMatches(PyObject *); +void PyErr_NormalizeException(PyObject**, PyObject**, PyObject**); +# 118 "/usr/include/python2.6/pyerrors.h" +extern PyObject * PyExc_BaseException; +extern PyObject * PyExc_Exception; +extern PyObject * PyExc_StopIteration; +extern PyObject * PyExc_GeneratorExit; +extern PyObject * PyExc_StandardError; +extern PyObject * PyExc_ArithmeticError; +extern PyObject * PyExc_LookupError; + +extern PyObject * PyExc_AssertionError; +extern PyObject * PyExc_AttributeError; +extern PyObject * PyExc_EOFError; +extern PyObject * PyExc_FloatingPointError; +extern PyObject * PyExc_EnvironmentError; +extern PyObject * PyExc_IOError; +extern PyObject * PyExc_OSError; +extern PyObject * PyExc_ImportError; +extern PyObject * PyExc_IndexError; +extern PyObject * PyExc_KeyError; +extern PyObject * PyExc_KeyboardInterrupt; +extern PyObject * PyExc_MemoryError; +extern PyObject * PyExc_NameError; +extern PyObject * PyExc_OverflowError; +extern PyObject * PyExc_RuntimeError; +extern PyObject * PyExc_NotImplementedError; +extern PyObject * PyExc_SyntaxError; +extern PyObject * PyExc_IndentationError; +extern PyObject * PyExc_TabError; +extern PyObject * PyExc_ReferenceError; +extern PyObject * PyExc_SystemError; +extern PyObject * PyExc_SystemExit; +extern PyObject * PyExc_TypeError; +extern PyObject * PyExc_UnboundLocalError; +extern PyObject * PyExc_UnicodeError; +extern PyObject * PyExc_UnicodeEncodeError; +extern PyObject * PyExc_UnicodeDecodeError; +extern PyObject * PyExc_UnicodeTranslateError; +extern PyObject * PyExc_ValueError; +extern PyObject * PyExc_ZeroDivisionError; + + + + + + + +extern PyObject * PyExc_BufferError; + +extern PyObject * PyExc_MemoryErrorInst; +extern PyObject * PyExc_RecursionErrorInst; + + +extern PyObject * PyExc_Warning; +extern PyObject * PyExc_UserWarning; +extern PyObject * PyExc_DeprecationWarning; +extern PyObject * PyExc_PendingDeprecationWarning; +extern PyObject * PyExc_SyntaxWarning; +extern PyObject * PyExc_RuntimeWarning; +extern PyObject * PyExc_FutureWarning; +extern PyObject * PyExc_ImportWarning; +extern PyObject * PyExc_UnicodeWarning; +extern PyObject * PyExc_BytesWarning; + + + + +int PyErr_BadArgument(void); +PyObject * PyErr_NoMemory(void); +PyObject * PyErr_SetFromErrno(PyObject *); +PyObject * PyErr_SetFromErrnoWithFilenameObject( + PyObject *, PyObject *); +PyObject * PyErr_SetFromErrnoWithFilename(PyObject *, char *); + + + + + +PyObject * PyErr_Format(PyObject *, const char *, ...) + __attribute__((format(printf, 2, 3))); +# 219 "/usr/include/python2.6/pyerrors.h" +void PyErr_BadInternalCall(void); +void _PyErr_BadInternalCall(char *filename, int lineno); + + + + + +PyObject * PyErr_NewException(char *name, PyObject *base, + PyObject *dict); +void PyErr_WriteUnraisable(PyObject *); + + +int PyErr_CheckSignals(void); +void PyErr_SetInterrupt(void); + + +int PySignal_SetWakeupFd(int fd); + + +void PyErr_SyntaxLocation(const char *, int); +PyObject * PyErr_ProgramText(const char *, int); + + + + + + +PyObject * PyUnicodeDecodeError_Create( + const char *, const char *, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char *); + + +PyObject * PyUnicodeEncodeError_Create( + const char *, const Py_UNICODE *, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char *); + + +PyObject * PyUnicodeTranslateError_Create( + const Py_UNICODE *, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char *); + + +PyObject * PyUnicodeEncodeError_GetEncoding(PyObject *); +PyObject * PyUnicodeDecodeError_GetEncoding(PyObject *); + + +PyObject * PyUnicodeEncodeError_GetObject(PyObject *); +PyObject * PyUnicodeDecodeError_GetObject(PyObject *); +PyObject * PyUnicodeTranslateError_GetObject(PyObject *); + + + +int PyUnicodeEncodeError_GetStart(PyObject *, Py_ssize_t *); +int PyUnicodeDecodeError_GetStart(PyObject *, Py_ssize_t *); +int PyUnicodeTranslateError_GetStart(PyObject *, Py_ssize_t *); + + + +int PyUnicodeEncodeError_SetStart(PyObject *, Py_ssize_t); +int PyUnicodeDecodeError_SetStart(PyObject *, Py_ssize_t); +int PyUnicodeTranslateError_SetStart(PyObject *, Py_ssize_t); + + + +int PyUnicodeEncodeError_GetEnd(PyObject *, Py_ssize_t *); +int PyUnicodeDecodeError_GetEnd(PyObject *, Py_ssize_t *); +int PyUnicodeTranslateError_GetEnd(PyObject *, Py_ssize_t *); + + + +int PyUnicodeEncodeError_SetEnd(PyObject *, Py_ssize_t); +int PyUnicodeDecodeError_SetEnd(PyObject *, Py_ssize_t); +int PyUnicodeTranslateError_SetEnd(PyObject *, Py_ssize_t); + + +PyObject * PyUnicodeEncodeError_GetReason(PyObject *); +PyObject * PyUnicodeDecodeError_GetReason(PyObject *); +PyObject * PyUnicodeTranslateError_GetReason(PyObject *); + + + +int PyUnicodeEncodeError_SetReason( + PyObject *, const char *); +int PyUnicodeDecodeError_SetReason( + PyObject *, const char *); +int PyUnicodeTranslateError_SetReason( + PyObject *, const char *); +# 321 "/usr/include/python2.6/pyerrors.h" +int PyOS_snprintf(char *str, size_t size, const char *format, ...) + __attribute__((format(printf, 3, 4))); +int PyOS_vsnprintf(char *str, size_t size, const char *format, va_list va) + __attribute__((format(printf, 3, 0))); + + +} +# 121 "/usr/include/python2.6/Python.h" 2 + +# 1 "/usr/include/python2.6/pystate.h" 1 + + + + + + + +extern "C" { + + + + +struct _ts; +struct _is; + +typedef struct _is { + + struct _is *next; + struct _ts *tstate_head; + + PyObject *modules; + PyObject *sysdict; + PyObject *builtins; + PyObject *modules_reloading; + + PyObject *codec_search_path; + PyObject *codec_search_cache; + PyObject *codec_error_registry; + + + int dlopenflags; + + + + + +} PyInterpreterState; + + + + +struct _frame; + + +typedef int (*Py_tracefunc)(PyObject *, struct _frame *, int, PyObject *); +# 56 "/usr/include/python2.6/pystate.h" +typedef struct _ts { + + + struct _ts *next; + PyInterpreterState *interp; + + struct _frame *frame; + int recursion_depth; + + + + int tracing; + int use_tracing; + + Py_tracefunc c_profilefunc; + Py_tracefunc c_tracefunc; + PyObject *c_profileobj; + PyObject *c_traceobj; + + PyObject *curexc_type; + PyObject *curexc_value; + PyObject *curexc_traceback; + + PyObject *exc_type; + PyObject *exc_value; + PyObject *exc_traceback; + + PyObject *dict; + + + + + + + + int tick_counter; + + int gilstate_counter; + + PyObject *async_exc; + long thread_id; + + + +} PyThreadState; + + +PyInterpreterState * PyInterpreterState_New(void); +void PyInterpreterState_Clear(PyInterpreterState *); +void PyInterpreterState_Delete(PyInterpreterState *); + +PyThreadState * PyThreadState_New(PyInterpreterState *); +PyThreadState * _PyThreadState_Prealloc(PyInterpreterState *); +void _PyThreadState_Init(PyThreadState *); +void PyThreadState_Clear(PyThreadState *); +void PyThreadState_Delete(PyThreadState *); + +void PyThreadState_DeleteCurrent(void); + + +PyThreadState * PyThreadState_Get(void); +PyThreadState * PyThreadState_Swap(PyThreadState *); +PyObject * PyThreadState_GetDict(void); +int PyThreadState_SetAsyncExc(long, PyObject *); + + + + +extern PyThreadState * _PyThreadState_Current; + + + + + + + +typedef + enum {PyGILState_LOCKED, PyGILState_UNLOCKED} + PyGILState_STATE; +# 157 "/usr/include/python2.6/pystate.h" +PyGILState_STATE PyGILState_Ensure(void); +# 167 "/usr/include/python2.6/pystate.h" +void PyGILState_Release(PyGILState_STATE); + + + + + + + +PyThreadState * PyGILState_GetThisThreadState(void); + + + + +PyObject * _PyThread_CurrentFrames(void); + + + +PyInterpreterState * PyInterpreterState_Head(void); +PyInterpreterState * PyInterpreterState_Next(PyInterpreterState *); +PyThreadState * PyInterpreterState_ThreadHead(PyInterpreterState *); +PyThreadState * PyThreadState_Next(PyThreadState *); + +typedef struct _frame *(*PyThreadFrameGetter)(PyThreadState *self_); + + +extern PyThreadFrameGetter _PyThreadState_GetFrame; + + +} +# 123 "/usr/include/python2.6/Python.h" 2 + +# 1 "/usr/include/python2.6/pyarena.h" 1 + + + + + + + +extern "C" { + + + typedef struct _arena PyArena; +# 35 "/usr/include/python2.6/pyarena.h" + PyArena * PyArena_New(void); + void PyArena_Free(PyArena *); +# 50 "/usr/include/python2.6/pyarena.h" + void * PyArena_Malloc(PyArena *, size_t size); + + + + + + int PyArena_AddPyObject(PyArena *, PyObject *); + + +} +# 125 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/modsupport.h" 1 + + + + +extern "C" { +# 23 "/usr/include/python2.6/modsupport.h" +PyObject * _Py_VaBuildValue_SizeT(const char *, va_list); + + +int PyArg_Parse(PyObject *, const char *, ...); +int PyArg_ParseTuple(PyObject *, const char *, ...) ; +int PyArg_ParseTupleAndKeywords(PyObject *, PyObject *, + const char *, char **, ...); +int PyArg_UnpackTuple(PyObject *, const char *, Py_ssize_t, Py_ssize_t, ...); +PyObject * Py_BuildValue(const char *, ...); +PyObject * _Py_BuildValue_SizeT(const char *, ...); +int _PyArg_NoKeywords(const char *funcname, PyObject *kw); + +int PyArg_VaParse(PyObject *, const char *, va_list); +int PyArg_VaParseTupleAndKeywords(PyObject *, PyObject *, + const char *, char **, va_list); +PyObject * Py_VaBuildValue(const char *, va_list); + +int PyModule_AddObject(PyObject *, const char *, PyObject *); +int PyModule_AddIntConstant(PyObject *, const char *, long); +int PyModule_AddStringConstant(PyObject *, const char *, const char *); +# 117 "/usr/include/python2.6/modsupport.h" +PyObject * Py_InitModule4_64(const char *name, PyMethodDef *methods, + const char *doc, PyObject *self, + int apiver); +# 129 "/usr/include/python2.6/modsupport.h" +extern char * _Py_PackageContext; + + +} +# 126 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/pythonrun.h" 1 + + + + + + +extern "C" { +# 18 "/usr/include/python2.6/pythonrun.h" +typedef struct { + int cf_flags; +} PyCompilerFlags; + +void Py_SetProgramName(char *); +char * Py_GetProgramName(void); + +void Py_SetPythonHome(char *); +char * Py_GetPythonHome(void); + +void Py_Initialize(void); +void Py_InitializeEx(int); +void Py_Finalize(void); +int Py_IsInitialized(void); +PyThreadState * Py_NewInterpreter(void); +void Py_EndInterpreter(PyThreadState *); + +int PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *); +int PyRun_AnyFileExFlags(FILE *, const char *, int, PyCompilerFlags *); +int PyRun_SimpleStringFlags(const char *, PyCompilerFlags *); +int PyRun_SimpleFileExFlags(FILE *, const char *, int, PyCompilerFlags *); +int PyRun_InteractiveOneFlags(FILE *, const char *, PyCompilerFlags *); +int PyRun_InteractiveLoopFlags(FILE *, const char *, PyCompilerFlags *); + +struct _mod * PyParser_ASTFromString(const char *, const char *, + int, PyCompilerFlags *flags, + PyArena *); +struct _mod * PyParser_ASTFromFile(FILE *, const char *, int, + char *, char *, + PyCompilerFlags *, int *, + PyArena *); + + + + +struct _node * PyParser_SimpleParseStringFlags(const char *, int, + int); +struct _node * PyParser_SimpleParseFileFlags(FILE *, const char *, + int, int); + +PyObject * PyRun_StringFlags(const char *, int, PyObject *, + PyObject *, PyCompilerFlags *); + +PyObject * PyRun_FileExFlags(FILE *, const char *, int, + PyObject *, PyObject *, int, + PyCompilerFlags *); + + +PyObject * Py_CompileStringFlags(const char *, const char *, int, + PyCompilerFlags *); +struct symtable * Py_SymtableString(const char *, const char *, int); + +void PyErr_Print(void); +void PyErr_PrintEx(int); +void PyErr_Display(PyObject *, PyObject *, PyObject *); + +int Py_AtExit(void (*func)(void)); + +void Py_Exit(int); + +int Py_FdIsInteractive(FILE *, const char *); + + +int Py_Main(int argc, char **argv); +# 103 "/usr/include/python2.6/pythonrun.h" +char * Py_GetProgramFullPath(void); +char * Py_GetPrefix(void); +char * Py_GetExecPrefix(void); +char * Py_GetPath(void); + + +const char * Py_GetVersion(void); +const char * Py_GetPlatform(void); +const char * Py_GetCopyright(void); +const char * Py_GetCompiler(void); +const char * Py_GetBuildInfo(void); +const char * _Py_svnversion(void); +const char * Py_SubversionRevision(void); +const char * Py_SubversionShortBranch(void); + + +PyObject * _PyBuiltin_Init(void); +PyObject * _PySys_Init(void); +void _PyImport_Init(void); +void _PyExc_Init(void); +void _PyImportHooks_Init(void); +int _PyFrame_Init(void); +int _PyInt_Init(void); +void _PyFloat_Init(void); +int PyByteArray_Init(void); + + +void _PyExc_Fini(void); +void _PyImport_Fini(void); +void PyMethod_Fini(void); +void PyFrame_Fini(void); +void PyCFunction_Fini(void); +void PyDict_Fini(void); +void PyTuple_Fini(void); +void PyList_Fini(void); +void PySet_Fini(void); +void PyString_Fini(void); +void PyInt_Fini(void); +void PyFloat_Fini(void); +void PyOS_FiniInterrupts(void); +void PyByteArray_Fini(void); + + +char * PyOS_Readline(FILE *, FILE *, char *); +extern int (*PyOS_InputHook)(void); +extern char *(*PyOS_ReadlineFunctionPointer)(FILE *, FILE *, char *); +extern PyThreadState* _PyOS_ReadlineTState; +# 167 "/usr/include/python2.6/pythonrun.h" +typedef void (*PyOS_sighandler_t)(int); +PyOS_sighandler_t PyOS_getsig(int); +PyOS_sighandler_t PyOS_setsig(int, PyOS_sighandler_t); + + + +} +# 127 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/ceval.h" 1 + + + +extern "C" { + + + + + +PyObject * PyEval_CallObjectWithKeywords( + PyObject *, PyObject *, PyObject *); + + + +PyObject * PyEval_CallObject(PyObject *, PyObject *); + + + + + +PyObject * PyEval_CallFunction(PyObject *obj, + const char *format, ...); +PyObject * PyEval_CallMethod(PyObject *obj, + const char *methodname, + const char *format, ...); + +void PyEval_SetProfile(Py_tracefunc, PyObject *); +void PyEval_SetTrace(Py_tracefunc, PyObject *); + +struct _frame; + +PyObject * PyEval_GetBuiltins(void); +PyObject * PyEval_GetGlobals(void); +PyObject * PyEval_GetLocals(void); +struct _frame * PyEval_GetFrame(void); +int PyEval_GetRestricted(void); + + + + +int PyEval_MergeCompilerFlags(PyCompilerFlags *cf); + +int Py_FlushLine(void); + +int Py_AddPendingCall(int (*func)(void *), void *arg); +int Py_MakePendingCalls(void); + + +void Py_SetRecursionLimit(int); +int Py_GetRecursionLimit(void); + + + + + + +int _Py_CheckRecursiveCall(char *where); +extern int _Py_CheckRecursionLimit; + + + + + + +const char * PyEval_GetFuncName(PyObject *); +const char * PyEval_GetFuncDesc(PyObject *); + +PyObject * PyEval_GetCallStats(PyObject *); +PyObject * PyEval_EvalFrame(struct _frame *); +PyObject * PyEval_EvalFrameEx(struct _frame *f, int exc); + + +extern volatile int _Py_Ticker; +extern int _Py_CheckInterval; +# 121 "/usr/include/python2.6/ceval.h" +PyThreadState * PyEval_SaveThread(void); +void PyEval_RestoreThread(PyThreadState *); + + + +int PyEval_ThreadsInitialized(void); +void PyEval_InitThreads(void); +void PyEval_AcquireLock(void); +void PyEval_ReleaseLock(void); +void PyEval_AcquireThread(PyThreadState *tstate); +void PyEval_ReleaseThread(PyThreadState *tstate); +void PyEval_ReInitThreads(void); +# 151 "/usr/include/python2.6/ceval.h" +int _PyEval_SliceIndex(PyObject *, Py_ssize_t *); + + + +} +# 128 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/sysmodule.h" 1 + + + + + + +extern "C" { + + +PyObject * PySys_GetObject(char *); +int PySys_SetObject(char *, PyObject *); +FILE * PySys_GetFile(char *, FILE *); +void PySys_SetArgv(int, char **); +void PySys_SetPath(char *); + +void PySys_WriteStdout(const char *format, ...) + __attribute__((format(printf, 1, 2))); +void PySys_WriteStderr(const char *format, ...) + __attribute__((format(printf, 1, 2))); + +extern PyObject * _PySys_TraceFunc, *_PySys_ProfileFunc; +extern int _PySys_CheckInterval; + +void PySys_ResetWarnOptions(void); +void PySys_AddWarnOption(char *); +int PySys_HasWarnOptions(void); + + +} +# 129 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/intrcheck.h" 1 + + + + +extern "C" { + + +int PyOS_InterruptOccurred(void); +void PyOS_InitInterrupts(void); +void PyOS_AfterFork(void); + + +} +# 130 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/import.h" 1 + + + + + + +extern "C" { + + +long PyImport_GetMagicNumber(void); +PyObject * PyImport_ExecCodeModule(char *name, PyObject *co); +PyObject * PyImport_ExecCodeModuleEx( + char *name, PyObject *co, char *pathname); +PyObject * PyImport_GetModuleDict(void); +PyObject * PyImport_AddModule(const char *name); +PyObject * PyImport_ImportModule(const char *name); +PyObject * PyImport_ImportModuleNoBlock(const char *); +PyObject * PyImport_ImportModuleLevel(char *name, + PyObject *globals, PyObject *locals, PyObject *fromlist, int level); + + + + +PyObject * PyImport_GetImporter(PyObject *path); +PyObject * PyImport_Import(PyObject *name); +PyObject * PyImport_ReloadModule(PyObject *m); +void PyImport_Cleanup(void); +int PyImport_ImportFrozenModule(char *); + + +void _PyImport_AcquireLock(void); +int _PyImport_ReleaseLock(void); + + + + + +struct filedescr * _PyImport_FindModule( + const char *, PyObject *, char *, size_t, FILE **, PyObject **); +int _PyImport_IsScript(struct filedescr *); +void _PyImport_ReInitLock(void); + +PyObject *_PyImport_FindExtension(char *, char *); +PyObject *_PyImport_FixupExtension(char *, char *); + +struct _inittab { + char *name; + void (*initfunc)(void); +}; + +extern PyTypeObject PyNullImporter_Type; +extern struct _inittab * PyImport_Inittab; + +int PyImport_AppendInittab(char *name, void (*initfunc)(void)); +int PyImport_ExtendInittab(struct _inittab *newtab); + +struct _frozen { + char *name; + unsigned char *code; + int size; +}; + + + + +extern struct _frozen * PyImport_FrozenModules; + + +} +# 131 "/usr/include/python2.6/Python.h" 2 + +# 1 "/usr/include/python2.6/abstract.h" 1 + + + +extern "C" { +# 231 "/usr/include/python2.6/abstract.h" + int PyObject_Cmp(PyObject *o1, PyObject *o2, int *result); +# 304 "/usr/include/python2.6/abstract.h" + PyObject * PyObject_Call(PyObject *callable_object, + PyObject *args, PyObject *kw); +# 314 "/usr/include/python2.6/abstract.h" + PyObject * PyObject_CallObject(PyObject *callable_object, + PyObject *args); +# 326 "/usr/include/python2.6/abstract.h" + PyObject * PyObject_CallFunction(PyObject *callable_object, + char *format, ...); +# 340 "/usr/include/python2.6/abstract.h" + PyObject * PyObject_CallMethod(PyObject *o, char *m, + char *format, ...); +# 352 "/usr/include/python2.6/abstract.h" + PyObject * _PyObject_CallFunction_SizeT(PyObject *callable, + char *format, ...); + PyObject * _PyObject_CallMethod_SizeT(PyObject *o, + char *name, + char *format, ...); + + PyObject * PyObject_CallFunctionObjArgs(PyObject *callable, + ...); +# 370 "/usr/include/python2.6/abstract.h" + PyObject * PyObject_CallMethodObjArgs(PyObject *o, + PyObject *m, ...); +# 413 "/usr/include/python2.6/abstract.h" + PyObject * PyObject_Type(PyObject *o); + + + + + + + + Py_ssize_t PyObject_Size(PyObject *o); +# 433 "/usr/include/python2.6/abstract.h" + Py_ssize_t PyObject_Length(PyObject *o); + + + Py_ssize_t _PyObject_LengthHint(PyObject *o, Py_ssize_t); + + + + + + + + PyObject * PyObject_GetItem(PyObject *o, PyObject *key); +# 453 "/usr/include/python2.6/abstract.h" + int PyObject_SetItem(PyObject *o, PyObject *key, PyObject *v); + + + + + + + + int PyObject_DelItemString(PyObject *o, char *key); + + + + + + + + int PyObject_DelItem(PyObject *o, PyObject *key); + + + + + + + int PyObject_AsCharBuffer(PyObject *obj, + const char **buffer, + Py_ssize_t *buffer_len); +# 492 "/usr/include/python2.6/abstract.h" + int PyObject_CheckReadBuffer(PyObject *obj); +# 501 "/usr/include/python2.6/abstract.h" + int PyObject_AsReadBuffer(PyObject *obj, + const void **buffer, + Py_ssize_t *buffer_len); +# 517 "/usr/include/python2.6/abstract.h" + int PyObject_AsWriteBuffer(PyObject *obj, + void **buffer, + Py_ssize_t *buffer_len); +# 542 "/usr/include/python2.6/abstract.h" + int PyObject_GetBuffer(PyObject *obj, Py_buffer *view, + int flags); +# 552 "/usr/include/python2.6/abstract.h" + void * PyBuffer_GetPointer(Py_buffer *view, Py_ssize_t *indices); + + + + + + int PyBuffer_SizeFromFormat(const char *); + + + + + + + int PyBuffer_ToContiguous(void *buf, Py_buffer *view, + Py_ssize_t len, char fort); + + int PyBuffer_FromContiguous(Py_buffer *view, void *buf, + Py_ssize_t len, char fort); +# 588 "/usr/include/python2.6/abstract.h" + int PyObject_CopyData(PyObject *dest, PyObject *src); + + + + + int PyBuffer_IsContiguous(Py_buffer *view, char fort); + + + void PyBuffer_FillContiguousStrides(int ndims, + Py_ssize_t *shape, + Py_ssize_t *strides, + int itemsize, + char fort); + + + + + + + + int PyBuffer_FillInfo(Py_buffer *view, PyObject *o, void *buf, + Py_ssize_t len, int readonly, + int flags); + + + + + + + + void PyBuffer_Release(Py_buffer *view); + + + + + PyObject * PyObject_Format(PyObject* obj, + PyObject *format_spec); + + + + + + + + PyObject * PyObject_GetIter(PyObject *); +# 641 "/usr/include/python2.6/abstract.h" + PyObject * PyIter_Next(PyObject *); + + + + + + + + int PyNumber_Check(PyObject *o); +# 659 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_Add(PyObject *o1, PyObject *o2); +# 668 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_Subtract(PyObject *o1, PyObject *o2); +# 677 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_Multiply(PyObject *o1, PyObject *o2); +# 687 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_Divide(PyObject *o1, PyObject *o2); +# 696 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_FloorDivide(PyObject *o1, PyObject *o2); +# 706 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_TrueDivide(PyObject *o1, PyObject *o2); +# 716 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_Remainder(PyObject *o1, PyObject *o2); +# 726 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_Divmod(PyObject *o1, PyObject *o2); +# 736 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_Power(PyObject *o1, PyObject *o2, + PyObject *o3); +# 746 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_Negative(PyObject *o); + + + + + + + + PyObject * PyNumber_Positive(PyObject *o); + + + + + + + + PyObject * PyNumber_Absolute(PyObject *o); + + + + + + + + PyObject * PyNumber_Invert(PyObject *o); +# 780 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_Lshift(PyObject *o1, PyObject *o2); +# 790 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_Rshift(PyObject *o1, PyObject *o2); +# 799 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_And(PyObject *o1, PyObject *o2); +# 809 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_Xor(PyObject *o1, PyObject *o2); +# 819 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_Or(PyObject *o1, PyObject *o2); +# 852 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_Index(PyObject *o); + + + + + + + Py_ssize_t PyNumber_AsSsize_t(PyObject *o, PyObject *exc); +# 870 "/usr/include/python2.6/abstract.h" + PyObject * _PyNumber_ConvertIntegralToInt( + PyObject *integral, + const char* error_format); +# 882 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_Int(PyObject *o); +# 891 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_Long(PyObject *o); +# 900 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_Float(PyObject *o); +# 910 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_InPlaceAdd(PyObject *o1, PyObject *o2); +# 919 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_InPlaceSubtract(PyObject *o1, PyObject *o2); +# 928 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_InPlaceMultiply(PyObject *o1, PyObject *o2); +# 937 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_InPlaceDivide(PyObject *o1, PyObject *o2); +# 946 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_InPlaceFloorDivide(PyObject *o1, + PyObject *o2); +# 957 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_InPlaceTrueDivide(PyObject *o1, + PyObject *o2); +# 968 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_InPlaceRemainder(PyObject *o1, PyObject *o2); +# 977 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_InPlacePower(PyObject *o1, PyObject *o2, + PyObject *o3); +# 987 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_InPlaceLshift(PyObject *o1, PyObject *o2); +# 996 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_InPlaceRshift(PyObject *o1, PyObject *o2); +# 1005 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_InPlaceAnd(PyObject *o1, PyObject *o2); +# 1014 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_InPlaceXor(PyObject *o1, PyObject *o2); +# 1023 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_InPlaceOr(PyObject *o1, PyObject *o2); +# 1033 "/usr/include/python2.6/abstract.h" + PyObject * PyNumber_ToBase(PyObject *n, int base); +# 1044 "/usr/include/python2.6/abstract.h" + int PySequence_Check(PyObject *o); +# 1054 "/usr/include/python2.6/abstract.h" + Py_ssize_t PySequence_Size(PyObject *o); +# 1063 "/usr/include/python2.6/abstract.h" + Py_ssize_t PySequence_Length(PyObject *o); + + + + PyObject * PySequence_Concat(PyObject *o1, PyObject *o2); +# 1076 "/usr/include/python2.6/abstract.h" + PyObject * PySequence_Repeat(PyObject *o, Py_ssize_t count); +# 1085 "/usr/include/python2.6/abstract.h" + PyObject * PySequence_GetItem(PyObject *o, Py_ssize_t i); + + + + + + + PyObject * PySequence_GetSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2); +# 1101 "/usr/include/python2.6/abstract.h" + int PySequence_SetItem(PyObject *o, Py_ssize_t i, PyObject *v); +# 1110 "/usr/include/python2.6/abstract.h" + int PySequence_DelItem(PyObject *o, Py_ssize_t i); + + + + + + + + int PySequence_SetSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2, + PyObject *v); + + + + + + + + int PySequence_DelSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2); + + + + + + + + PyObject * PySequence_Tuple(PyObject *o); + + + + + + + + PyObject * PySequence_List(PyObject *o); + + + + + + PyObject * PySequence_Fast(PyObject *o, const char* m); +# 1185 "/usr/include/python2.6/abstract.h" + Py_ssize_t PySequence_Count(PyObject *o, PyObject *value); +# 1194 "/usr/include/python2.6/abstract.h" + int PySequence_Contains(PyObject *seq, PyObject *ob); +# 1203 "/usr/include/python2.6/abstract.h" + Py_ssize_t _PySequence_IterSearch(PyObject *seq, + PyObject *obj, int operation); +# 1218 "/usr/include/python2.6/abstract.h" + int PySequence_In(PyObject *o, PyObject *value); +# 1229 "/usr/include/python2.6/abstract.h" + Py_ssize_t PySequence_Index(PyObject *o, PyObject *value); +# 1239 "/usr/include/python2.6/abstract.h" + PyObject * PySequence_InPlaceConcat(PyObject *o1, PyObject *o2); +# 1248 "/usr/include/python2.6/abstract.h" + PyObject * PySequence_InPlaceRepeat(PyObject *o, Py_ssize_t count); +# 1259 "/usr/include/python2.6/abstract.h" + int PyMapping_Check(PyObject *o); +# 1268 "/usr/include/python2.6/abstract.h" + Py_ssize_t PyMapping_Size(PyObject *o); +# 1278 "/usr/include/python2.6/abstract.h" + Py_ssize_t PyMapping_Length(PyObject *o); +# 1302 "/usr/include/python2.6/abstract.h" + int PyMapping_HasKeyString(PyObject *o, char *key); +# 1312 "/usr/include/python2.6/abstract.h" + int PyMapping_HasKey(PyObject *o, PyObject *key); +# 1355 "/usr/include/python2.6/abstract.h" + PyObject * PyMapping_GetItemString(PyObject *o, char *key); + + + + + + + + int PyMapping_SetItemString(PyObject *o, char *key, + PyObject *value); +# 1373 "/usr/include/python2.6/abstract.h" +int PyObject_IsInstance(PyObject *object, PyObject *typeorclass); + + +int PyObject_IsSubclass(PyObject *object, PyObject *typeorclass); + + + +int _PyObject_RealIsInstance(PyObject *inst, PyObject *cls); + +int _PyObject_RealIsSubclass(PyObject *derived, PyObject *cls); + + + +} +# 133 "/usr/include/python2.6/Python.h" 2 + +# 1 "/usr/include/python2.6/compile.h" 1 + + + + +# 1 "/usr/include/python2.6/code.h" 1 + + + + + +extern "C" { + + + +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + int co_argcount; + int co_nlocals; + int co_stacksize; + int co_flags; + PyObject *co_code; + PyObject *co_consts; + PyObject *co_names; + PyObject *co_varnames; + PyObject *co_freevars; + PyObject *co_cellvars; + + PyObject *co_filename; + PyObject *co_name; + int co_firstlineno; + PyObject *co_lnotab; + void *co_zombieframe; +} PyCodeObject; +# 63 "/usr/include/python2.6/code.h" +extern PyTypeObject PyCode_Type; + + + + + +PyCodeObject * PyCode_New( + int, int, int, int, PyObject *, PyObject *, PyObject *, PyObject *, + PyObject *, PyObject *, PyObject *, PyObject *, int, PyObject *); + +int PyCode_Addr2Line(PyCodeObject *, int); + + + + + + +typedef struct _addr_pair { + int ap_lower; + int ap_upper; +} PyAddrPair; +# 92 "/usr/include/python2.6/code.h" +int PyCode_CheckLineNumber(PyCodeObject* co, + int lasti, PyAddrPair *bounds); + +PyObject* PyCode_Optimize(PyObject *code, PyObject* consts, + PyObject *names, PyObject *lineno_obj); + + +} +# 6 "/usr/include/python2.6/compile.h" 2 + + +extern "C" { + + + +struct _node; +PyCodeObject * PyNode_Compile(struct _node *, const char *); + + + +typedef struct { + int ff_features; + int ff_lineno; +} PyFutureFeatures; +# 31 "/usr/include/python2.6/compile.h" +struct _mod; +PyCodeObject * PyAST_Compile(struct _mod *, const char *, + PyCompilerFlags *, PyArena *); +PyFutureFeatures * PyFuture_FromAST(struct _mod *, const char *); + + + + + +} +# 135 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/eval.h" 1 + + + + + + +extern "C" { + + +PyObject * PyEval_EvalCode(PyCodeObject *, PyObject *, PyObject *); + +PyObject * PyEval_EvalCodeEx(PyCodeObject *co, + PyObject *globals, + PyObject *locals, + PyObject **args, int argc, + PyObject **kwds, int kwdc, + PyObject **defs, int defc, + PyObject *closure); + +PyObject * _PyEval_CallTracing(PyObject *func, PyObject *args); + + +} +# 136 "/usr/include/python2.6/Python.h" 2 + +# 1 "/usr/include/python2.6/pystrtod.h" 1 + + + + +extern "C" { + + + +double PyOS_ascii_strtod(const char *str, char **ptr); +double PyOS_ascii_atof(const char *str); +char * PyOS_ascii_formatd(char *buffer, size_t buf_len, const char *format, double d); + + + +} +# 138 "/usr/include/python2.6/Python.h" 2 +# 1 "/usr/include/python2.6/pystrcmp.h" 1 + + + + +extern "C" { + + +int PyOS_mystrnicmp(const char *, const char *, Py_ssize_t); +int PyOS_mystricmp(const char *, const char *); +# 20 "/usr/include/python2.6/pystrcmp.h" +} +# 139 "/usr/include/python2.6/Python.h" 2 + + +PyObject* _Py_Mangle(PyObject *p, PyObject *name); +# 158 "/usr/include/python2.6/Python.h" +# 1 "/usr/include/python2.6/pyfpe.h" 1 + + + +extern "C" { +# 129 "/usr/include/python2.6/pyfpe.h" +# 1 "/usr/include/signal.h" 1 3 4 +# 31 "/usr/include/signal.h" 3 4 +extern "C" { + +# 1 "/usr/include/bits/sigset.h" 1 3 4 +# 104 "/usr/include/bits/sigset.h" 3 4 +extern int __sigismember (__const __sigset_t *, int); +extern int __sigaddset (__sigset_t *, int); +extern int __sigdelset (__sigset_t *, int); +# 118 "/usr/include/bits/sigset.h" 3 4 +extern __inline __attribute__ ((__gnu_inline__)) int __sigismember (__const __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return (__set->__val[__word] & __mask) ? 1 : 0; } +extern __inline __attribute__ ((__gnu_inline__)) int __sigaddset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] |= __mask), 0); } +extern __inline __attribute__ ((__gnu_inline__)) int __sigdelset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] &= ~__mask), 0); } +# 34 "/usr/include/signal.h" 2 3 4 + + + + + + + +typedef __sig_atomic_t sig_atomic_t; + +# 58 "/usr/include/signal.h" 3 4 +# 1 "/usr/include/bits/signum.h" 1 3 4 +# 59 "/usr/include/signal.h" 2 3 4 +# 79 "/usr/include/signal.h" 3 4 +# 1 "/usr/include/bits/siginfo.h" 1 3 4 +# 25 "/usr/include/bits/siginfo.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 26 "/usr/include/bits/siginfo.h" 2 3 4 + + + + + + + +typedef union sigval + { + int sival_int; + void *sival_ptr; + } sigval_t; +# 51 "/usr/include/bits/siginfo.h" 3 4 +typedef struct siginfo + { + int si_signo; + int si_errno; + + int si_code; + + union + { + int _pad[((128 / sizeof (int)) - 4)]; + + + struct + { + __pid_t si_pid; + __uid_t si_uid; + } _kill; + + + struct + { + int si_tid; + int si_overrun; + sigval_t si_sigval; + } _timer; + + + struct + { + __pid_t si_pid; + __uid_t si_uid; + sigval_t si_sigval; + } _rt; + + + struct + { + __pid_t si_pid; + __uid_t si_uid; + int si_status; + __clock_t si_utime; + __clock_t si_stime; + } _sigchld; + + + struct + { + void *si_addr; + } _sigfault; + + + struct + { + long int si_band; + int si_fd; + } _sigpoll; + } _sifields; + } siginfo_t; +# 129 "/usr/include/bits/siginfo.h" 3 4 +enum +{ + SI_ASYNCNL = -60, + + SI_TKILL = -6, + + SI_SIGIO, + + SI_ASYNCIO, + + SI_MESGQ, + + SI_TIMER, + + SI_QUEUE, + + SI_USER, + + SI_KERNEL = 0x80 + +}; + + + +enum +{ + ILL_ILLOPC = 1, + + ILL_ILLOPN, + + ILL_ILLADR, + + ILL_ILLTRP, + + ILL_PRVOPC, + + ILL_PRVREG, + + ILL_COPROC, + + ILL_BADSTK + +}; + + +enum +{ + FPE_INTDIV = 1, + + FPE_INTOVF, + + FPE_FLTDIV, + + FPE_FLTOVF, + + FPE_FLTUND, + + FPE_FLTRES, + + FPE_FLTINV, + + FPE_FLTSUB + +}; + + +enum +{ + SEGV_MAPERR = 1, + + SEGV_ACCERR + +}; + + +enum +{ + BUS_ADRALN = 1, + + BUS_ADRERR, + + BUS_OBJERR + +}; + + +enum +{ + TRAP_BRKPT = 1, + + TRAP_TRACE + +}; + + +enum +{ + CLD_EXITED = 1, + + CLD_KILLED, + + CLD_DUMPED, + + CLD_TRAPPED, + + CLD_STOPPED, + + CLD_CONTINUED + +}; + + +enum +{ + POLL_IN = 1, + + POLL_OUT, + + POLL_MSG, + + POLL_ERR, + + POLL_PRI, + + POLL_HUP + +}; +# 273 "/usr/include/bits/siginfo.h" 3 4 +typedef struct sigevent + { + sigval_t sigev_value; + int sigev_signo; + int sigev_notify; + + union + { + int _pad[((64 / sizeof (int)) - 4)]; + + + + __pid_t _tid; + + struct + { + void (*_function) (sigval_t); + void *_attribute; + } _sigev_thread; + } _sigev_un; + } sigevent_t; + + + + + + +enum +{ + SIGEV_SIGNAL = 0, + + SIGEV_NONE, + + SIGEV_THREAD, + + + SIGEV_THREAD_ID = 4 + +}; +# 80 "/usr/include/signal.h" 2 3 4 + + + + +typedef void (*__sighandler_t) (int); + + + + +extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) + throw (); + +extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler) + throw (); + + + + + + + +extern __sighandler_t signal (int __sig, __sighandler_t __handler) + throw (); +# 113 "/usr/include/signal.h" 3 4 + + + + + +extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler) + throw (); + + + + + + +extern int kill (__pid_t __pid, int __sig) throw (); + + + + + + +extern int killpg (__pid_t __pgrp, int __sig) throw (); + + + + +extern int raise (int __sig) throw (); + + + + +extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) + throw (); +extern int gsignal (int __sig) throw (); + + + + +extern void psignal (int __sig, __const char *__s); + + + + +extern void psiginfo (__const siginfo_t *__pinfo, __const char *__s); +# 168 "/usr/include/signal.h" 3 4 +extern int __sigpause (int __sig_or_mask, int __is_sig); +# 177 "/usr/include/signal.h" 3 4 +extern int sigpause (int __sig) __asm__ ("__xpg_sigpause"); +# 196 "/usr/include/signal.h" 3 4 +extern int sigblock (int __mask) throw () __attribute__ ((__deprecated__)); + + +extern int sigsetmask (int __mask) throw () __attribute__ ((__deprecated__)); + + +extern int siggetmask (void) throw () __attribute__ ((__deprecated__)); +# 211 "/usr/include/signal.h" 3 4 +typedef __sighandler_t sighandler_t; + + + + +typedef __sighandler_t sig_t; + + + + + +extern int sigemptyset (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); + + +extern int sigfillset (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); + + +extern int sigaddset (sigset_t *__set, int __signo) throw () __attribute__ ((__nonnull__ (1))); + + +extern int sigdelset (sigset_t *__set, int __signo) throw () __attribute__ ((__nonnull__ (1))); + + +extern int sigismember (__const sigset_t *__set, int __signo) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int sigisemptyset (__const sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); + + +extern int sigandset (sigset_t *__set, __const sigset_t *__left, + __const sigset_t *__right) throw () __attribute__ ((__nonnull__ (1, 2, 3))); + + +extern int sigorset (sigset_t *__set, __const sigset_t *__left, + __const sigset_t *__right) throw () __attribute__ ((__nonnull__ (1, 2, 3))); + + + + +# 1 "/usr/include/bits/sigaction.h" 1 3 4 +# 25 "/usr/include/bits/sigaction.h" 3 4 +struct sigaction + { + + + union + { + + __sighandler_t sa_handler; + + void (*sa_sigaction) (int, siginfo_t *, void *); + } + __sigaction_handler; + + + + + + + + __sigset_t sa_mask; + + + int sa_flags; + + + void (*sa_restorer) (void); + }; +# 253 "/usr/include/signal.h" 2 3 4 + + +extern int sigprocmask (int __how, __const sigset_t *__restrict __set, + sigset_t *__restrict __oset) throw (); + + + + + + +extern int sigsuspend (__const sigset_t *__set) __attribute__ ((__nonnull__ (1))); + + +extern int sigaction (int __sig, __const struct sigaction *__restrict __act, + struct sigaction *__restrict __oact) throw (); + + +extern int sigpending (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig) + __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern int sigwaitinfo (__const sigset_t *__restrict __set, + siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int sigtimedwait (__const sigset_t *__restrict __set, + siginfo_t *__restrict __info, + __const struct timespec *__restrict __timeout) + __attribute__ ((__nonnull__ (1))); + + + +extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val) + throw (); +# 310 "/usr/include/signal.h" 3 4 +extern __const char *__const _sys_siglist[65]; +extern __const char *__const sys_siglist[65]; + + +struct sigvec + { + __sighandler_t sv_handler; + int sv_mask; + + int sv_flags; + + }; +# 334 "/usr/include/signal.h" 3 4 +extern int sigvec (int __sig, __const struct sigvec *__vec, + struct sigvec *__ovec) throw (); + + + +# 1 "/usr/include/bits/sigcontext.h" 1 3 4 +# 26 "/usr/include/bits/sigcontext.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 27 "/usr/include/bits/sigcontext.h" 2 3 4 + +struct _fpreg +{ + unsigned short significand[4]; + unsigned short exponent; +}; + +struct _fpxreg +{ + unsigned short significand[4]; + unsigned short exponent; + unsigned short padding[3]; +}; + +struct _xmmreg +{ + __uint32_t element[4]; +}; +# 109 "/usr/include/bits/sigcontext.h" 3 4 +struct _fpstate +{ + + __uint16_t cwd; + __uint16_t swd; + __uint16_t ftw; + __uint16_t fop; + __uint64_t rip; + __uint64_t rdp; + __uint32_t mxcsr; + __uint32_t mxcr_mask; + struct _fpxreg _st[8]; + struct _xmmreg _xmm[16]; + __uint32_t padding[24]; +}; + +struct sigcontext +{ + unsigned long r8; + unsigned long r9; + unsigned long r10; + unsigned long r11; + unsigned long r12; + unsigned long r13; + unsigned long r14; + unsigned long r15; + unsigned long rdi; + unsigned long rsi; + unsigned long rbp; + unsigned long rbx; + unsigned long rdx; + unsigned long rax; + unsigned long rcx; + unsigned long rsp; + unsigned long rip; + unsigned long eflags; + unsigned short cs; + unsigned short gs; + unsigned short fs; + unsigned short __pad0; + unsigned long err; + unsigned long trapno; + unsigned long oldmask; + unsigned long cr2; + struct _fpstate * fpstate; + unsigned long __reserved1 [8]; +}; +# 340 "/usr/include/signal.h" 2 3 4 + + +extern int sigreturn (struct sigcontext *__scp) throw (); + + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 350 "/usr/include/signal.h" 2 3 4 + + + + +extern int siginterrupt (int __sig, int __interrupt) throw (); + +# 1 "/usr/include/bits/sigstack.h" 1 3 4 +# 26 "/usr/include/bits/sigstack.h" 3 4 +struct sigstack + { + void *ss_sp; + int ss_onstack; + }; + + + +enum +{ + SS_ONSTACK = 1, + + SS_DISABLE + +}; +# 50 "/usr/include/bits/sigstack.h" 3 4 +typedef struct sigaltstack + { + void *ss_sp; + int ss_flags; + size_t ss_size; + } stack_t; +# 357 "/usr/include/signal.h" 2 3 4 + + +# 1 "/usr/include/sys/ucontext.h" 1 3 4 +# 24 "/usr/include/sys/ucontext.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 25 "/usr/include/sys/ucontext.h" 2 3 4 +# 33 "/usr/include/sys/ucontext.h" 3 4 +typedef long int greg_t; + + + + + +typedef greg_t gregset_t[23]; + + + +enum +{ + REG_R8 = 0, + + REG_R9, + + REG_R10, + + REG_R11, + + REG_R12, + + REG_R13, + + REG_R14, + + REG_R15, + + REG_RDI, + + REG_RSI, + + REG_RBP, + + REG_RBX, + + REG_RDX, + + REG_RAX, + + REG_RCX, + + REG_RSP, + + REG_RIP, + + REG_EFL, + + REG_CSGSFS, + + REG_ERR, + + REG_TRAPNO, + + REG_OLDMASK, + + REG_CR2 + +}; + + +struct _libc_fpxreg +{ + unsigned short int significand[4]; + unsigned short int exponent; + unsigned short int padding[3]; +}; + +struct _libc_xmmreg +{ + __uint32_t element[4]; +}; + +struct _libc_fpstate +{ + + __uint16_t cwd; + __uint16_t swd; + __uint16_t ftw; + __uint16_t fop; + __uint64_t rip; + __uint64_t rdp; + __uint32_t mxcsr; + __uint32_t mxcr_mask; + struct _libc_fpxreg _st[8]; + struct _libc_xmmreg _xmm[16]; + __uint32_t padding[24]; +}; + + +typedef struct _libc_fpstate *fpregset_t; + + +typedef struct + { + gregset_t gregs; + + fpregset_t fpregs; + unsigned long __reserved1 [8]; +} mcontext_t; + + +typedef struct ucontext + { + unsigned long int uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + __sigset_t uc_sigmask; + struct _libc_fpstate __fpregs_mem; + } ucontext_t; +# 360 "/usr/include/signal.h" 2 3 4 + + + + + +extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) + throw () __attribute__ ((__deprecated__)); + + + +extern int sigaltstack (__const struct sigaltstack *__restrict __ss, + struct sigaltstack *__restrict __oss) throw (); + + + + + + + +extern int sighold (int __sig) throw (); + + +extern int sigrelse (int __sig) throw (); + + +extern int sigignore (int __sig) throw (); + + +extern __sighandler_t sigset (int __sig, __sighandler_t __disp) throw (); + + + + + + +# 1 "/usr/include/bits/sigthread.h" 1 3 4 +# 31 "/usr/include/bits/sigthread.h" 3 4 +extern int pthread_sigmask (int __how, + __const __sigset_t *__restrict __newmask, + __sigset_t *__restrict __oldmask)throw (); + + +extern int pthread_kill (pthread_t __threadid, int __signo) throw (); + + + +extern int pthread_sigqueue (pthread_t __threadid, int __signo, + const union sigval __value) throw (); +# 396 "/usr/include/signal.h" 2 3 4 + + + + + + +extern int __libc_current_sigrtmin (void) throw (); + +extern int __libc_current_sigrtmax (void) throw (); + + + +} +# 130 "/usr/include/python2.6/pyfpe.h" 2 +# 1 "/usr/include/setjmp.h" 1 3 4 +# 28 "/usr/include/setjmp.h" 3 4 +extern "C" { + + +# 1 "/usr/include/bits/sigset.h" 1 3 4 +# 32 "/usr/include/setjmp.h" 2 3 4 + + + +struct __jmp_buf_tag + { + + + + + __jmp_buf __jmpbuf; + int __mask_was_saved; + __sigset_t __saved_mask; + }; + + + + +typedef struct __jmp_buf_tag jmp_buf[1]; + + + +extern int setjmp (jmp_buf __env) throw (); + + + + + + +extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) throw (); + + + + +extern int _setjmp (struct __jmp_buf_tag __env[1]) throw (); +# 78 "/usr/include/setjmp.h" 3 4 + + + + +extern void longjmp (struct __jmp_buf_tag __env[1], int __val) + throw () __attribute__ ((__noreturn__)); + + + + + + + +extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) + throw () __attribute__ ((__noreturn__)); + + + + + + + +typedef struct __jmp_buf_tag sigjmp_buf[1]; +# 110 "/usr/include/setjmp.h" 3 4 +extern void siglongjmp (sigjmp_buf __env, int __val) + throw () __attribute__ ((__noreturn__)); + + + + + +# 1 "/usr/include/bits/setjmp2.h" 1 3 4 +# 26 "/usr/include/bits/setjmp2.h" 3 4 +extern void longjmp (struct __jmp_buf_tag __env[1], int __val) throw () __asm__ ("" "__longjmp_chk") + + __attribute__ ((__noreturn__)); +extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) throw () __asm__ ("" "__longjmp_chk") + + __attribute__ ((__noreturn__)); +extern void siglongjmp (struct __jmp_buf_tag __env[1], int __val) throw () __asm__ ("" "__longjmp_chk") + + __attribute__ ((__noreturn__)); +# 118 "/usr/include/setjmp.h" 2 3 4 + + +} +# 131 "/usr/include/python2.6/pyfpe.h" 2 + +extern jmp_buf PyFPE_jbuf; +extern int PyFPE_counter; +extern double PyFPE_dummy(void *); +# 174 "/usr/include/python2.6/pyfpe.h" +} +# 159 "/usr/include/python2.6/Python.h" 2 +# 143 "/usr/include/boost-1_42/boost/python/detail/wrap_python.hpp" 2 +# 14 "/usr/include/boost-1_42/boost/python/detail/prefix.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/detail/config.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/python/detail/config.hpp" +# 1 "/usr/include/boost-1_42/boost/config.hpp" 1 +# 26 "/usr/include/boost-1_42/boost/config.hpp" +# 1 "/usr/include/boost-1_42/boost/config/user.hpp" 1 +# 27 "/usr/include/boost-1_42/boost/config.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/config/select_compiler_config.hpp" 1 +# 32 "/usr/include/boost-1_42/boost/config.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/config/compiler/gcc.hpp" 1 +# 36 "/usr/include/boost-1_42/boost/config.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/config/select_stdlib_config.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/config/select_stdlib_config.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 18 "/usr/include/boost-1_42/boost/config/select_stdlib_config.hpp" 2 +# 33 "/usr/include/boost-1_42/boost/config/select_stdlib_config.hpp" +# 1 "/usr/include/boost-1_42/boost/config/no_tr1/utility.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/config/no_tr1/utility.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/utility" 1 3 +# 59 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/utility" 3 + +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/utility" 3 +# 70 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/utility" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_relops.h" 1 3 +# 67 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_relops.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + namespace rel_ops + { +# 83 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_relops.h" 3 + template + inline bool + operator!=(const _Tp& __x, const _Tp& __y) + { return !(__x == __y); } +# 96 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_relops.h" 3 + template + inline bool + operator>(const _Tp& __x, const _Tp& __y) + { return __y < __x; } +# 109 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_relops.h" 3 + template + inline bool + operator<=(const _Tp& __x, const _Tp& __y) + { return !(__y < __x); } +# 122 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_relops.h" 3 + template + inline bool + operator>=(const _Tp& __x, const _Tp& __y) + { return !(__x < __y); } + + } + +} +# 71 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/utility" 2 3 +# 22 "/usr/include/boost-1_42/boost/config/no_tr1/utility.hpp" 2 +# 34 "/usr/include/boost-1_42/boost/config/select_stdlib_config.hpp" 2 +# 41 "/usr/include/boost-1_42/boost/config.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/config/stdlib/libstdcpp3.hpp" 1 +# 45 "/usr/include/boost-1_42/boost/config.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/config/select_platform_config.hpp" 1 +# 50 "/usr/include/boost-1_42/boost/config.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/config/platform/linux.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/config/platform/linux.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstdlib" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstdlib" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstdlib" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstdlib" 2 3 +# 100 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstdlib" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + using ::div_t; + using ::ldiv_t; + + using ::abort; + using ::abs; + using ::atexit; + using ::atof; + using ::atoi; + using ::atol; + using ::bsearch; + using ::calloc; + using ::div; + using ::exit; + using ::free; + using ::getenv; + using ::labs; + using ::ldiv; + using ::malloc; + + using ::mblen; + using ::mbstowcs; + using ::mbtowc; + + using ::qsort; + using ::rand; + using ::realloc; + using ::srand; + using ::strtod; + using ::strtol; + using ::strtoul; + using ::system; + + using ::wcstombs; + using ::wctomb; + + + inline long + abs(long __i) { return labs(__i); } + + inline ldiv_t + div(long __i, long __j) { return ldiv(__i, __j); } + +} +# 157 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstdlib" 3 +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + + + using ::lldiv_t; + + + + + + using ::_Exit; + + + inline long long + abs(long long __x) { return __x >= 0 ? __x : -__x; } + + + using ::llabs; + + inline lldiv_t + div(long long __n, long long __d) + { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } + + using ::lldiv; +# 190 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstdlib" 3 + using ::atoll; + using ::strtoll; + using ::strtoull; + + using ::strtof; + using ::strtold; + +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + using ::__gnu_cxx::lldiv_t; + + using ::__gnu_cxx::_Exit; + using ::__gnu_cxx::abs; + + using ::__gnu_cxx::llabs; + using ::__gnu_cxx::div; + using ::__gnu_cxx::lldiv; + + using ::__gnu_cxx::atoll; + using ::__gnu_cxx::strtof; + using ::__gnu_cxx::strtoll; + using ::__gnu_cxx::strtoull; + using ::__gnu_cxx::strtold; + +} +# 15 "/usr/include/boost-1_42/boost/config/platform/linux.hpp" 2 +# 70 "/usr/include/boost-1_42/boost/config/platform/linux.hpp" +# 1 "/usr/include/boost-1_42/boost/config/posix_features.hpp" 1 +# 71 "/usr/include/boost-1_42/boost/config/platform/linux.hpp" 2 +# 54 "/usr/include/boost-1_42/boost/config.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/config/suffix.hpp" 1 +# 468 "/usr/include/boost-1_42/boost/config/suffix.hpp" +namespace boost{ + + __extension__ typedef long long long_long_type; + __extension__ typedef unsigned long long ulong_long_type; + + + + +} +# 58 "/usr/include/boost-1_42/boost/config.hpp" 2 +# 16 "/usr/include/boost-1_42/boost/python/detail/config.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/detail/workaround.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/python/detail/config.hpp" 2 +# 134 "/usr/include/boost-1_42/boost/python/detail/config.hpp" +# 1 "/usr/include/boost-1_42/boost/config/auto_link.hpp" 1 +# 135 "/usr/include/boost-1_42/boost/python/detail/config.hpp" 2 +# 15 "/usr/include/boost-1_42/boost/python/detail/prefix.hpp" 2 +# 9 "/usr/include/boost-1_42/boost/python/args.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/args_fwd.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/args_fwd.hpp" +# 1 "/usr/include/boost-1_42/boost/python/handle.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/handle.hpp" +# 1 "/usr/include/boost-1_42/boost/python/cast.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/cast.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/same_traits.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/type_traits/same_traits.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/is_same.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/type_traits/is_same.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/config.hpp" 1 +# 25 "/usr/include/boost-1_42/boost/type_traits/is_same.hpp" 2 + + + + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/int.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/int.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/int_fwd.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/int_fwd.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/adl_barrier.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/aux_/adl_barrier.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/adl.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/aux_/config/adl.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/msvc.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/aux_/config/adl.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/intel.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/aux_/config/adl.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/gcc.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/mpl/aux_/config/adl.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/workaround.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/mpl/aux_/config/adl.hpp" 2 +# 18 "/usr/include/boost-1_42/boost/mpl/aux_/adl_barrier.hpp" 2 +# 33 "/usr/include/boost-1_42/boost/mpl/aux_/adl_barrier.hpp" +namespace mpl_ { namespace aux {} } +namespace boost { namespace mpl { using namespace mpl_; +namespace aux { using namespace mpl_::aux; } +}} +# 18 "/usr/include/boost-1_42/boost/mpl/int_fwd.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/nttp_decl.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/aux_/nttp_decl.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/nttp.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/aux_/nttp_decl.hpp" 2 +# 19 "/usr/include/boost-1_42/boost/mpl/int_fwd.hpp" 2 + +namespace mpl_ { + +template< int N > struct int_; + +} +namespace boost { namespace mpl { using ::mpl_::int_; } } +# 18 "/usr/include/boost-1_42/boost/mpl/int.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/integral_wrapper.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/mpl/aux_/integral_wrapper.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/integral_c_tag.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/integral_c_tag.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/static_constant.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/mpl/integral_c_tag.hpp" 2 + +namespace mpl_ { +struct integral_c_tag { static const int value = 0; }; +} +namespace boost { namespace mpl { using ::mpl_::integral_c_tag; } } +# 17 "/usr/include/boost-1_42/boost/mpl/aux_/integral_wrapper.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/static_cast.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/aux_/integral_wrapper.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/cat.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/preprocessor/cat.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/config/config.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/preprocessor/cat.hpp" 2 +# 23 "/usr/include/boost-1_42/boost/mpl/aux_/integral_wrapper.hpp" 2 +# 40 "/usr/include/boost-1_42/boost/mpl/aux_/integral_wrapper.hpp" +namespace mpl_ { + +template< int N > +struct int_ +{ + static const int value = N; + + + + + + typedef int_ type; + + typedef int value_type; + typedef integral_c_tag tag; +# 72 "/usr/include/boost-1_42/boost/mpl/aux_/integral_wrapper.hpp" + typedef mpl_::int_< static_cast((value + 1)) > next; + typedef mpl_::int_< static_cast((value - 1)) > prior; + + + + + + + operator int() const { return static_cast(this->value); } +}; + + +template< int N > +int const mpl_::int_< N >::value; + + +} +# 21 "/usr/include/boost-1_42/boost/mpl/int.hpp" 2 +# 11 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/template_arity_fwd.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/aux_/template_arity_fwd.hpp" +namespace boost { namespace mpl { namespace aux { + +template< typename F > struct template_arity; + +}}} +# 12 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessor/params.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessor/params.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/preprocessor.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessor/params.hpp" 2 +# 45 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessor/params.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/comma_if.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/preprocessor/comma_if.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/punctuation/comma_if.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/preprocessor/punctuation/comma_if.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/control/if.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/preprocessor/control/if.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/control/iif.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/preprocessor/control/if.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/logical/bool.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/preprocessor/control/if.hpp" 2 +# 19 "/usr/include/boost-1_42/boost/preprocessor/punctuation/comma_if.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/facilities/empty.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/preprocessor/punctuation/comma_if.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/punctuation/comma.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/preprocessor/punctuation/comma_if.hpp" 2 +# 16 "/usr/include/boost-1_42/boost/preprocessor/comma_if.hpp" 2 +# 46 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessor/params.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/repeat.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/preprocessor/repeat.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/repetition/repeat.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/preprocessor/repetition/repeat.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/debug/error.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/preprocessor/repetition/repeat.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/detail/auto_rec.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/preprocessor/repetition/repeat.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/tuple/eat.hpp" 1 +# 22 "/usr/include/boost-1_42/boost/preprocessor/repetition/repeat.hpp" 2 +# 16 "/usr/include/boost-1_42/boost/preprocessor/repeat.hpp" 2 +# 47 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessor/params.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/inc.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/preprocessor/inc.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/arithmetic/inc.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/preprocessor/inc.hpp" 2 +# 48 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessor/params.hpp" 2 +# 13 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/lambda.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/aux_/config/lambda.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/ttp.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/aux_/config/lambda.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/ctps.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/aux_/config/lambda.hpp" 2 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/overload_resolution.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 2 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/integral_constant.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/type_traits/integral_constant.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/bool.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/bool.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/bool_fwd.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/bool_fwd.hpp" +namespace mpl_ { + +template< bool C_ > struct bool_; + + +typedef bool_ true_; +typedef bool_ false_; + +} + +namespace boost { namespace mpl { using ::mpl_::bool_; } } +namespace boost { namespace mpl { using ::mpl_::true_; } } +namespace boost { namespace mpl { using ::mpl_::false_; } } +# 18 "/usr/include/boost-1_42/boost/mpl/bool.hpp" 2 + + + +namespace mpl_ { + +template< bool C_ > struct bool_ +{ + static const bool value = C_; + typedef integral_c_tag tag; + typedef bool_ type; + typedef bool value_type; + operator bool() const { return this->value; } +}; + + +template< bool C_ > +bool const bool_::value; + + +} +# 11 "/usr/include/boost-1_42/boost/type_traits/integral_constant.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/integral_c.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/integral_c.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/integral_c_fwd.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/mpl/integral_c_fwd.hpp" +namespace mpl_ { + + + + + +template< typename T, T N > struct integral_c; + + +} +namespace boost { namespace mpl { using ::mpl_::integral_c; } } +# 18 "/usr/include/boost-1_42/boost/mpl/integral_c.hpp" 2 +# 32 "/usr/include/boost-1_42/boost/mpl/integral_c.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/integral_wrapper.hpp" 1 +# 40 "/usr/include/boost-1_42/boost/mpl/aux_/integral_wrapper.hpp" +namespace mpl_ { + +template< typename T, T N > +struct integral_c +{ + static const T value = N; + + + + + + typedef integral_c type; + + typedef T value_type; + typedef integral_c_tag tag; +# 72 "/usr/include/boost-1_42/boost/mpl/aux_/integral_wrapper.hpp" + typedef integral_c< T, static_cast((value + 1)) > next; + typedef integral_c< T, static_cast((value - 1)) > prior; + + + + + + + operator T() const { return static_cast(this->value); } +}; + + +template< typename T, T N > +T const integral_c< T, N >::value; + + +} +# 33 "/usr/include/boost-1_42/boost/mpl/integral_c.hpp" 2 + + + + +namespace mpl_ { + +template< bool C > +struct integral_c +{ + static const bool value = C; + typedef integral_c_tag tag; + typedef integral_c type; + typedef bool value_type; + operator bool() const { return this->value; } +}; +} +# 12 "/usr/include/boost-1_42/boost/type_traits/integral_constant.hpp" 2 + +namespace boost{ + + + + +template + +struct integral_constant : public mpl::integral_c +{ + typedef integral_constant type; +}; + +template<> struct integral_constant : public mpl::true_ +{ + + + + + + + + typedef integral_constant type; +}; +template<> struct integral_constant : public mpl::false_ +{ + + + + + + + + typedef integral_constant type; +}; + +typedef integral_constant true_type; +typedef integral_constant false_type; + +} +# 16 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/lambda_support.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 32 "/usr/include/boost-1_42/boost/type_traits/is_same.hpp" 2 + +namespace boost { + + + +template< typename T, typename U > struct is_same : ::boost::integral_constant { }; +template< typename T > struct is_same< T,T > : ::boost::integral_constant { }; +# 98 "/usr/include/boost-1_42/boost/type_traits/is_same.hpp" +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 101 "/usr/include/boost-1_42/boost/type_traits/is_same.hpp" 2 +# 14 "/usr/include/boost-1_42/boost/type_traits/same_traits.hpp" 2 +# 11 "/usr/include/boost-1_42/boost/python/cast.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/cv_traits.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/cv_traits.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/add_const.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/type_traits/add_const.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 2 +# 17 "/usr/include/boost-1_42/boost/type_traits/add_const.hpp" 2 + +namespace boost { +# 33 "/usr/include/boost-1_42/boost/type_traits/add_const.hpp" +template< typename T > struct add_const { typedef T const type; }; + + + + + + +template< typename T > struct add_const { typedef T& type; }; + + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_undef.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/type_traits/add_const.hpp" 2 +# 16 "/usr/include/boost-1_42/boost/type_traits/cv_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/add_volatile.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/type_traits/add_volatile.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 2 +# 17 "/usr/include/boost-1_42/boost/type_traits/add_volatile.hpp" 2 + +namespace boost { +# 33 "/usr/include/boost-1_42/boost/type_traits/add_volatile.hpp" +template< typename T > struct add_volatile { typedef T volatile type; }; + + + + + + +template< typename T > struct add_volatile { typedef T& type; }; + + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_undef.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/type_traits/add_volatile.hpp" 2 +# 17 "/usr/include/boost-1_42/boost/type_traits/cv_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/add_cv.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/type_traits/add_cv.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 2 +# 18 "/usr/include/boost-1_42/boost/type_traits/add_cv.hpp" 2 + +namespace boost { +# 34 "/usr/include/boost-1_42/boost/type_traits/add_cv.hpp" +template< typename T > struct add_cv { typedef T const volatile type; }; + + + + + + +template< typename T > struct add_cv { typedef T& type; }; + + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_undef.hpp" 1 +# 47 "/usr/include/boost-1_42/boost/type_traits/add_cv.hpp" 2 +# 18 "/usr/include/boost-1_42/boost/type_traits/cv_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/is_const.hpp" 1 +# 28 "/usr/include/boost-1_42/boost/type_traits/is_const.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/cv_traits_impl.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/type_traits/detail/cv_traits_impl.hpp" +namespace boost { +namespace detail { + + + + + + + +template struct cv_traits_imp {}; + +template +struct cv_traits_imp +{ + static const bool is_const = false; + static const bool is_volatile = false; + typedef T unqualified_type; +}; + +template +struct cv_traits_imp +{ + static const bool is_const = true; + static const bool is_volatile = false; + typedef T unqualified_type; +}; + +template +struct cv_traits_imp +{ + static const bool is_const = false; + static const bool is_volatile = true; + typedef T unqualified_type; +}; + +template +struct cv_traits_imp +{ + static const bool is_const = true; + static const bool is_volatile = true; + typedef T unqualified_type; +}; +# 92 "/usr/include/boost-1_42/boost/type_traits/detail/cv_traits_impl.hpp" +} +} +# 29 "/usr/include/boost-1_42/boost/type_traits/is_const.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/type_traits/is_reference.hpp" 1 +# 32 "/usr/include/boost-1_42/boost/type_traits/is_reference.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 33 "/usr/include/boost-1_42/boost/type_traits/is_reference.hpp" 2 + +namespace boost { + + + + + +template< typename T > struct is_reference : ::boost::integral_constant { }; +template< typename T > struct is_reference< T& > : ::boost::integral_constant { }; +# 113 "/usr/include/boost-1_42/boost/type_traits/is_reference.hpp" +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 116 "/usr/include/boost-1_42/boost/type_traits/is_reference.hpp" 2 +# 31 "/usr/include/boost-1_42/boost/type_traits/is_const.hpp" 2 +# 43 "/usr/include/boost-1_42/boost/type_traits/is_const.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 44 "/usr/include/boost-1_42/boost/type_traits/is_const.hpp" 2 + +namespace boost { +# 57 "/usr/include/boost-1_42/boost/type_traits/is_const.hpp" + template< typename T > struct is_const : ::boost::integral_constant::is_const> { }; + +template< typename T > struct is_const< T& > : ::boost::integral_constant { }; +# 141 "/usr/include/boost-1_42/boost/type_traits/is_const.hpp" +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 144 "/usr/include/boost-1_42/boost/type_traits/is_const.hpp" 2 +# 19 "/usr/include/boost-1_42/boost/type_traits/cv_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/is_volatile.hpp" 1 +# 40 "/usr/include/boost-1_42/boost/type_traits/is_volatile.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 41 "/usr/include/boost-1_42/boost/type_traits/is_volatile.hpp" 2 + +namespace boost { +# 52 "/usr/include/boost-1_42/boost/type_traits/is_volatile.hpp" + template< typename T > struct is_volatile : ::boost::integral_constant::is_volatile> { }; + +template< typename T > struct is_volatile< T& > : ::boost::integral_constant { }; +# 129 "/usr/include/boost-1_42/boost/type_traits/is_volatile.hpp" +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 132 "/usr/include/boost-1_42/boost/type_traits/is_volatile.hpp" 2 +# 20 "/usr/include/boost-1_42/boost/type_traits/cv_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/remove_const.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/remove_const.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/broken_compiler_spec.hpp" 1 +# 95 "/usr/include/boost-1_42/boost/type_traits/broken_compiler_spec.hpp" + + + + + + + + + + + + + + + +# 16 "/usr/include/boost-1_42/boost/type_traits/remove_const.hpp" 2 + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 21 "/usr/include/boost-1_42/boost/type_traits/remove_const.hpp" 2 + + + + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 2 +# 28 "/usr/include/boost-1_42/boost/type_traits/remove_const.hpp" 2 + +namespace boost { + + + +namespace detail { + +template +struct remove_const_helper +{ + typedef T type; +}; + +template +struct remove_const_helper +{ + typedef T volatile type; +}; + + +template +struct remove_const_impl +{ + typedef typename remove_const_helper< + typename cv_traits_imp::unqualified_type + , ::boost::is_volatile::value + >::type type; +}; + +} + + + +template< typename T > struct remove_const { typedef typename boost::detail::remove_const_impl::type type; }; +template< typename T > struct remove_const { typedef T& type; }; + +template< typename T, std::size_t N > struct remove_const { typedef T type[N]; }; +template< typename T, std::size_t N > struct remove_const { typedef T volatile type[N]; }; +# 74 "/usr/include/boost-1_42/boost/type_traits/remove_const.hpp" +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_undef.hpp" 1 +# 77 "/usr/include/boost-1_42/boost/type_traits/remove_const.hpp" 2 +# 21 "/usr/include/boost-1_42/boost/type_traits/cv_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/remove_volatile.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/type_traits/remove_volatile.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 21 "/usr/include/boost-1_42/boost/type_traits/remove_volatile.hpp" 2 + + + + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 2 +# 28 "/usr/include/boost-1_42/boost/type_traits/remove_volatile.hpp" 2 + +namespace boost { + + + +namespace detail { + +template +struct remove_volatile_helper +{ + typedef T type; +}; + +template +struct remove_volatile_helper +{ + typedef T const type; +}; + +template +struct remove_volatile_impl +{ + typedef typename remove_volatile_helper< + typename cv_traits_imp::unqualified_type + , ::boost::is_const::value + >::type type; +}; + +} + + + +template< typename T > struct remove_volatile { typedef typename boost::detail::remove_volatile_impl::type type; }; +template< typename T > struct remove_volatile { typedef T& type; }; + +template< typename T, std::size_t N > struct remove_volatile { typedef T type[N]; }; +template< typename T, std::size_t N > struct remove_volatile { typedef T const type[N]; }; +# 73 "/usr/include/boost-1_42/boost/type_traits/remove_volatile.hpp" +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_undef.hpp" 1 +# 76 "/usr/include/boost-1_42/boost/type_traits/remove_volatile.hpp" 2 +# 22 "/usr/include/boost-1_42/boost/type_traits/cv_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/remove_cv.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/type_traits/remove_cv.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 20 "/usr/include/boost-1_42/boost/type_traits/remove_cv.hpp" 2 + + + + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/type_traits/remove_cv.hpp" 2 + +namespace boost { + + + + +template< typename T > struct remove_cv { typedef typename boost::detail::cv_traits_imp::unqualified_type type; }; +template< typename T > struct remove_cv { typedef T& type; }; + +template< typename T, std::size_t N > struct remove_cv { typedef T type[N]; }; +template< typename T, std::size_t N > struct remove_cv { typedef T type[N]; }; +template< typename T, std::size_t N > struct remove_cv { typedef T type[N]; }; +# 57 "/usr/include/boost-1_42/boost/type_traits/remove_cv.hpp" +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_undef.hpp" 1 +# 60 "/usr/include/boost-1_42/boost/type_traits/remove_cv.hpp" 2 +# 23 "/usr/include/boost-1_42/boost/type_traits/cv_traits.hpp" 2 +# 12 "/usr/include/boost-1_42/boost/python/cast.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type.hpp" 1 +# 9 "/usr/include/boost-1_42/boost/type.hpp" +namespace boost { + + + + template + struct type {}; + +} +# 13 "/usr/include/boost-1_42/boost/python/cast.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/base_type_traits.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/base_type_traits.hpp" +namespace boost { namespace python { + +namespace detail +{ + struct unspecialized {}; +} + + + +template struct base_type_traits + : detail::unspecialized +{}; + +template <> +struct base_type_traits +{ + typedef PyObject type; +}; + +template <> +struct base_type_traits +{ + typedef PyObject type; +}; + +template <> +struct base_type_traits +{ + typedef PyObject type; +}; + +}} +# 14 "/usr/include/boost-1_42/boost/python/cast.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/detail/convertible.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/python/detail/convertible.hpp" +namespace boost { namespace python { namespace detail { + +typedef char* yes_convertible; +typedef int* no_convertible; + +template +struct convertible +{ + + static inline no_convertible check(...) { return 0; } + static inline yes_convertible check(Target) { return 0; } +# 34 "/usr/include/boost-1_42/boost/python/detail/convertible.hpp" +}; + +}}} +# 15 "/usr/include/boost-1_42/boost/python/cast.hpp" 2 + +namespace boost { namespace python { + +namespace detail +{ + template inline Target* upcast_impl(Source*, Target*); + + template + inline Target* upcast(Source* p, yes_convertible, no_convertible, Target*) + { + return p; + } + + template + inline Target* upcast(Source* p, no_convertible, no_convertible, Target*) + { + typedef typename base_type_traits::type base; + + return detail::upcast_impl((base*)p, (Target*)0); + } + + template + struct upcaster + { + template + static inline T* execute(T* x, T*) { return x; } + }; + + template <> + struct upcaster + { + template + static inline Target* execute(Source* x, Target*) + { + return detail::upcast( + x, detail::convertible::check(x) + , detail::convertible::check((Target*)0) + , (Target*)0); + } + }; + + + template + inline Target* downcast(Source* p, yes_convertible) + { + return static_cast(p); + } + + template + inline Target* downcast(Source* p, no_convertible, boost::type* = 0) + { + typedef typename base_type_traits::type base; + return (Target*)detail::downcast(p, convertible::check((base*)0)); + } + + template + inline void assert_castable(boost::type* = 0) + { + typedef char must_be_a_complete_type[sizeof(T)]; + } + + template + inline Target* upcast_impl(Source* x, Target*) + { + typedef typename add_cv::type src_t; + typedef typename add_cv::type target_t; + bool const same = is_same::value; + + return detail::upcaster::execute(x, (Target*)0); + } +} + +template +inline Target* upcast(Source* x, Target* = 0) +{ + detail::assert_castable(); + detail::assert_castable(); + return detail::upcast_impl(x, (Target*)0); + +} + +template +inline Target* downcast(Source* x, Target* = 0) +{ + detail::assert_castable(); + detail::assert_castable(); + return detail::downcast(x, detail::convertible::check((Target*)0)); +} + +}} +# 11 "/usr/include/boost-1_42/boost/python/handle.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/errors.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/errors.hpp" +# 1 "/usr/include/boost-1_42/boost/function/function0.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/function/function0.hpp" +# 1 "/usr/include/boost-1_42/boost/function/detail/maybe_include.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/function/detail/maybe_include.hpp" +# 1 "/usr/include/boost-1_42/boost/function/function_template.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/function/function_template.hpp" +# 1 "/usr/include/boost-1_42/boost/function/detail/prologue.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/function/detail/prologue.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cassert" 1 3 +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cassert" 3 + +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cassert" 3 + +# 1 "/usr/include/assert.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cassert" 2 3 +# 13 "/usr/include/boost-1_42/boost/function/detail/prologue.hpp" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/algorithm" 1 3 +# 59 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/algorithm" 3 + +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/algorithm" 3 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 1 3 +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstdlib" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstdlib" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstdlib" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstdlib" 2 3 +# 61 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/algorithmfwd.h" 1 3 +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/algorithmfwd.h" 3 + +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/algorithmfwd.h" 3 + + + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 199 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/algorithmfwd.h" 3 + template + bool + binary_search(_FIter, _FIter, const _Tp&); + + template + bool + binary_search(_FIter, _FIter, const _Tp&, _Compare); + + template + _OIter + copy(_IIter, _IIter, _OIter); + + template + _BIter2 + copy_backward(_BIter1, _BIter1, _BIter2); +# 228 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/algorithmfwd.h" 3 + template + pair<_FIter, _FIter> + equal_range(_FIter, _FIter, const _Tp&); + + template + pair<_FIter, _FIter> + equal_range(_FIter, _FIter, const _Tp&, _Compare); + + template + void + fill(_FIter, _FIter, const _Tp&); + + template + _OIter + fill_n(_OIter, _Size, const _Tp&); + + + + template + _FIter1 + find_end(_FIter1, _FIter1, _FIter2, _FIter2); + + template + _FIter1 + find_end(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); +# 267 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/algorithmfwd.h" 3 + template + bool + includes(_IIter1, _IIter1, _IIter2, _IIter2); + + template + bool + includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); + + template + void + inplace_merge(_BIter, _BIter, _BIter); + + template + void + inplace_merge(_BIter, _BIter, _BIter, _Compare); +# 321 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/algorithmfwd.h" 3 + template + void + iter_swap(_FIter1, _FIter2); + + template + _FIter + lower_bound(_FIter, _FIter, const _Tp&); + + template + _FIter + lower_bound(_FIter, _FIter, const _Tp&, _Compare); + + template + void + make_heap(_RAIter, _RAIter); + + template + void + make_heap(_RAIter, _RAIter, _Compare); + + template + const _Tp& + max(const _Tp&, const _Tp&); + + template + const _Tp& + max(const _Tp&, const _Tp&, _Compare); + + + + + template + const _Tp& + min(const _Tp&, const _Tp&); + + template + const _Tp& + min(const _Tp&, const _Tp&, _Compare); +# 406 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/algorithmfwd.h" 3 + template + bool + next_permutation(_BIter, _BIter); + + template + bool + next_permutation(_BIter, _BIter, _Compare); +# 423 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/algorithmfwd.h" 3 + template + _RAIter + partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter); + + template + _RAIter + partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter, _Compare); +# 444 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/algorithmfwd.h" 3 + template + void + pop_heap(_RAIter, _RAIter); + + template + void + pop_heap(_RAIter, _RAIter, _Compare); + + template + bool + prev_permutation(_BIter, _BIter); + + template + bool + prev_permutation(_BIter, _BIter, _Compare); + + template + void + push_heap(_RAIter, _RAIter); + + template + void + push_heap(_RAIter, _RAIter, _Compare); + + + + template + _FIter + remove(_FIter, _FIter, const _Tp&); + + template + _FIter + remove_if(_FIter, _FIter, _Predicate); + + template + _OIter + remove_copy(_IIter, _IIter, _OIter, const _Tp&); + + template + _OIter + remove_copy_if(_IIter, _IIter, _OIter, _Predicate); + + + + template + _OIter + replace_copy(_IIter, _IIter, _OIter, const _Tp&, const _Tp&); + + template + _OIter + replace_copy_if(_Iter, _Iter, _OIter, _Predicate, const _Tp&); + + + + template + void + reverse(_BIter, _BIter); + + template + _OIter + reverse_copy(_BIter, _BIter, _OIter); + + template + void + rotate(_FIter, _FIter, _FIter); + + template + _OIter + rotate_copy(_FIter, _FIter, _FIter, _OIter); +# 527 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/algorithmfwd.h" 3 + template + void + sort_heap(_RAIter, _RAIter); + + template + void + sort_heap(_RAIter, _RAIter, _Compare); + + template + _BIter + stable_partition(_BIter, _BIter, _Predicate); + + template + void + swap(_Tp&, _Tp&); + + template + void + swap(_Tp (&)[_Nm], _Tp (&)[_Nm]); + + template + _FIter2 + swap_ranges(_FIter1, _FIter1, _FIter2); + + + + template + _FIter + unique(_FIter, _FIter); + + template + _FIter + unique(_FIter, _FIter, _BinaryPredicate); + + + + template + _FIter + upper_bound(_FIter, _FIter, const _Tp&); + + template + _FIter + upper_bound(_FIter, _FIter, const _Tp&, _Compare); + +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + _FIter + adjacent_find(_FIter, _FIter); + + template + _FIter + adjacent_find(_FIter, _FIter, _BinaryPredicate); + + template + typename iterator_traits<_IIter>::difference_type + count(_IIter, _IIter, const _Tp&); + + template + typename iterator_traits<_IIter>::difference_type + count_if(_IIter, _IIter, _Predicate); + + template + bool + equal(_IIter1, _IIter1, _IIter2); + + template + bool + equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate); + + template + _IIter + find(_IIter, _IIter, const _Tp&); + + template + _FIter1 + find_first_of(_FIter1, _FIter1, _FIter2, _FIter2); + + template + _FIter1 + find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); + + template + _IIter + find_if(_IIter, _IIter, _Predicate); + + template + _Funct + for_each(_IIter, _IIter, _Funct); + + template + void + generate(_FIter, _FIter, _Generator); + + template + _OIter + generate_n(_OIter, _Size, _Generator); + + template + bool + lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2); + + template + bool + lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); + + template + _FIter + max_element(_FIter, _FIter); + + template + _FIter + max_element(_FIter, _FIter, _Compare); + + template + _OIter + merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + + template + _OIter + merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + + template + _FIter + min_element(_FIter, _FIter); + + template + _FIter + min_element(_FIter, _FIter, _Compare); + + template + pair<_IIter1, _IIter2> + mismatch(_IIter1, _IIter1, _IIter2); + + template + pair<_IIter1, _IIter2> + mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate); + + template + void + nth_element(_RAIter, _RAIter, _RAIter); + + template + void + nth_element(_RAIter, _RAIter, _RAIter, _Compare); + + template + void + partial_sort(_RAIter, _RAIter, _RAIter); + + template + void + partial_sort(_RAIter, _RAIter, _RAIter, _Compare); + + template + _BIter + partition(_BIter, _BIter, _Predicate); + + template + void + random_shuffle(_RAIter, _RAIter); + + template + void + random_shuffle(_RAIter, _RAIter, + + + + _Generator&); + + + template + void + replace(_FIter, _FIter, const _Tp&, const _Tp&); + + template + void + replace_if(_FIter, _FIter, _Predicate, const _Tp&); + + template + _FIter1 + search(_FIter1, _FIter1, _FIter2, _FIter2); + + template + _FIter1 + search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); + + template + _FIter + search_n(_FIter, _FIter, _Size, const _Tp&); + + template + _FIter + search_n(_FIter, _FIter, _Size, const _Tp&, _BinaryPredicate); + + template + _OIter + set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + + template + _OIter + set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + + template + _OIter + set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + + template + _OIter + set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + + template + _OIter + set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + + template + _OIter + set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, + _OIter, _Compare); + + template + _OIter + set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + + template + _OIter + set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + + template + void + sort(_RAIter, _RAIter); + + template + void + sort(_RAIter, _RAIter, _Compare); + + template + void + stable_sort(_RAIter, _RAIter); + + template + void + stable_sort(_RAIter, _RAIter, _Compare); + + template + _OIter + transform(_IIter, _IIter, _OIter, _UnaryOperation); + + template + _OIter + transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation); + + template + _OIter + unique_copy(_IIter, _IIter, _OIter); + + template + _OIter + unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate); + +} +# 62 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_heap.h" 1 3 +# 62 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_heap.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + + + + + + template + _Distance + __is_heap_until(_RandomAccessIterator __first, _Distance __n) + { + _Distance __parent = 0; + for (_Distance __child = 1; __child < __n; ++__child) + { + if (__first[__parent] < __first[__child]) + return __child; + if ((__child & 1) == 0) + ++__parent; + } + return __n; + } + + template + _Distance + __is_heap_until(_RandomAccessIterator __first, _Distance __n, + _Compare __comp) + { + _Distance __parent = 0; + for (_Distance __child = 1; __child < __n; ++__child) + { + if (__comp(__first[__parent], __first[__child])) + return __child; + if ((__child & 1) == 0) + ++__parent; + } + return __n; + } + + + + template + inline bool + __is_heap(_RandomAccessIterator __first, _Distance __n) + { return std::__is_heap_until(__first, __n) == __n; } + + template + inline bool + __is_heap(_RandomAccessIterator __first, _Compare __comp, _Distance __n) + { return std::__is_heap_until(__first, __n, __comp) == __n; } + + template + inline bool + __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { return std::__is_heap(__first, std::distance(__first, __last)); } + + template + inline bool + __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { return std::__is_heap(__first, __comp, std::distance(__first, __last)); } + + + + + template + void + __push_heap(_RandomAccessIterator __first, + _Distance __holeIndex, _Distance __topIndex, _Tp __value) + { + _Distance __parent = (__holeIndex - 1) / 2; + while (__holeIndex > __topIndex && *(__first + __parent) < __value) + { + *(__first + __holeIndex) = (*(__first + __parent)); + __holeIndex = __parent; + __parent = (__holeIndex - 1) / 2; + } + *(__first + __holeIndex) = (__value); + } +# 152 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_heap.h" 3 + template + inline void + push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + + ; + ; + + _ValueType __value = (*(__last - 1)); + std::__push_heap(__first, _DistanceType((__last - __first) - 1), + _DistanceType(0), (__value)); + } + + template + void + __push_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __topIndex, _Tp __value, _Compare __comp) + { + _Distance __parent = (__holeIndex - 1) / 2; + while (__holeIndex > __topIndex + && __comp(*(__first + __parent), __value)) + { + *(__first + __holeIndex) = (*(__first + __parent)); + __holeIndex = __parent; + __parent = (__holeIndex - 1) / 2; + } + *(__first + __holeIndex) = (__value); + } +# 201 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_heap.h" 3 + template + inline void + push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + ; + ; + + _ValueType __value = (*(__last - 1)); + std::__push_heap(__first, _DistanceType((__last - __first) - 1), + _DistanceType(0), (__value), __comp); + } + + template + void + __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __len, _Tp __value) + { + const _Distance __topIndex = __holeIndex; + _Distance __secondChild = __holeIndex; + while (__secondChild < (__len - 1) / 2) + { + __secondChild = 2 * (__secondChild + 1); + if (*(__first + __secondChild) < *(__first + (__secondChild - 1))) + __secondChild--; + *(__first + __holeIndex) = (*(__first + __secondChild)); + __holeIndex = __secondChild; + } + if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2) + { + __secondChild = 2 * (__secondChild + 1); + *(__first + __holeIndex) = (*(__first + (__secondChild - 1))) + ; + __holeIndex = __secondChild - 1; + } + std::__push_heap(__first, __holeIndex, __topIndex, + (__value)); + } + + template + inline void + __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _RandomAccessIterator __result) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + _ValueType __value = (*__result); + *__result = (*__first); + std::__adjust_heap(__first, _DistanceType(0), + _DistanceType(__last - __first), + (__value)); + } +# 274 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_heap.h" 3 + template + inline void + pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + + + + ; + ; + + --__last; + std::__pop_heap(__first, __last, __last); + } + + template + void + __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __len, _Tp __value, _Compare __comp) + { + const _Distance __topIndex = __holeIndex; + _Distance __secondChild = __holeIndex; + while (__secondChild < (__len - 1) / 2) + { + __secondChild = 2 * (__secondChild + 1); + if (__comp(*(__first + __secondChild), + *(__first + (__secondChild - 1)))) + __secondChild--; + *(__first + __holeIndex) = (*(__first + __secondChild)); + __holeIndex = __secondChild; + } + if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2) + { + __secondChild = 2 * (__secondChild + 1); + *(__first + __holeIndex) = (*(__first + (__secondChild - 1))) + ; + __holeIndex = __secondChild - 1; + } + std::__push_heap(__first, __holeIndex, __topIndex, + (__value), __comp); + } + + template + inline void + __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _RandomAccessIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + _ValueType __value = (*__result); + *__result = (*__first); + std::__adjust_heap(__first, _DistanceType(0), + _DistanceType(__last - __first), + (__value), __comp); + } +# 348 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_heap.h" 3 + template + inline void + pop_heap(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + + + + ; + ; + + --__last; + std::__pop_heap(__first, __last, __last, __comp); + } +# 371 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_heap.h" 3 + template + void + make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + + ; + + if (__last - __first < 2) + return; + + const _DistanceType __len = __last - __first; + _DistanceType __parent = (__len - 2) / 2; + while (true) + { + _ValueType __value = (*(__first + __parent)); + std::__adjust_heap(__first, __parent, __len, (__value)); + if (__parent == 0) + return; + __parent--; + } + } +# 411 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_heap.h" 3 + template + void + make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + ; + + if (__last - __first < 2) + return; + + const _DistanceType __len = __last - __first; + _DistanceType __parent = (__len - 2) / 2; + while (true) + { + _ValueType __value = (*(__first + __parent)); + std::__adjust_heap(__first, __parent, __len, (__value), + __comp); + if (__parent == 0) + return; + __parent--; + } + } +# 450 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_heap.h" 3 + template + void + sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + + + + + + ; + ; + + while (__last - __first > 1) + { + --__last; + std::__pop_heap(__first, __last, __last); + } + } +# 479 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_heap.h" 3 + template + void + sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + + + + ; + ; + + while (__last - __first > 1) + { + --__last; + std::__pop_heap(__first, __last, __last, __comp); + } + } +# 576 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_heap.h" 3 +} +# 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_tempbuf.h" 1 3 +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_tempbuf.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { +# 83 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_tempbuf.h" 3 + template + pair<_Tp*, ptrdiff_t> + get_temporary_buffer(ptrdiff_t __len) + { + const ptrdiff_t __max = + __gnu_cxx::__numeric_traits::__max / sizeof(_Tp); + if (__len > __max) + __len = __max; + + while (__len > 0) + { + _Tp* __tmp = static_cast<_Tp*>(::operator new(__len * sizeof(_Tp), + std::nothrow)); + if (__tmp != 0) + return std::pair<_Tp*, ptrdiff_t>(__tmp, __len); + __len /= 2; + } + return std::pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0); + } +# 110 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_tempbuf.h" 3 + template + inline void + return_temporary_buffer(_Tp* __p) + { ::operator delete(__p, std::nothrow); } + + + + + + + + template + class _Temporary_buffer + { + + + + public: + typedef _Tp value_type; + typedef value_type* pointer; + typedef pointer iterator; + typedef ptrdiff_t size_type; + + protected: + size_type _M_original_len; + size_type _M_len; + pointer _M_buffer; + + public: + + size_type + size() const + { return _M_len; } + + + size_type + requested_size() const + { return _M_original_len; } + + + iterator + begin() + { return _M_buffer; } + + + iterator + end() + { return _M_buffer + _M_len; } + + + + + + _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last); + + ~_Temporary_buffer() + { + std::_Destroy(_M_buffer, _M_buffer + _M_len); + std::return_temporary_buffer(_M_buffer); + } + + private: + + _Temporary_buffer(const _Temporary_buffer&); + + void + operator=(const _Temporary_buffer&); + }; + + template + _Temporary_buffer<_ForwardIterator, _Tp>:: + _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) + : _M_original_len(std::distance(__first, __last)), + _M_len(0), _M_buffer(0) + { + try + { + std::pair __p(std::get_temporary_buffer< + value_type>(_M_original_len)); + _M_buffer = __p.first; + _M_len = __p.second; + if(_M_buffer) + std::__uninitialized_construct_range(_M_buffer, _M_buffer + _M_len, + *__first); + } + catch(...) + { + std::return_temporary_buffer(_M_buffer); + _M_buffer = 0; + _M_len = 0; + throw; + } + } + +} +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 2 3 + + + + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + template + void + __move_median_first(_Iterator __a, _Iterator __b, _Iterator __c) + { + + + + + if (*__a < *__b) + { + if (*__b < *__c) + std::iter_swap(__a, __b); + else if (*__a < *__c) + std::iter_swap(__a, __c); + } + else if (*__a < *__c) + return; + else if (*__b < *__c) + std::iter_swap(__a, __c); + else + std::iter_swap(__a, __b); + } + + + template + void + __move_median_first(_Iterator __a, _Iterator __b, _Iterator __c, + _Compare __comp) + { + + + + + + if (__comp(*__a, *__b)) + { + if (__comp(*__b, *__c)) + std::iter_swap(__a, __b); + else if (__comp(*__a, *__c)) + std::iter_swap(__a, __c); + } + else if (__comp(*__a, *__c)) + return; + else if (__comp(*__b, *__c)) + std::iter_swap(__a, __c); + else + std::iter_swap(__a, __b); + } + + + + + template + inline _InputIterator + __find(_InputIterator __first, _InputIterator __last, + const _Tp& __val, input_iterator_tag) + { + while (__first != __last && !(*__first == __val)) + ++__first; + return __first; + } + + + template + inline _InputIterator + __find_if(_InputIterator __first, _InputIterator __last, + _Predicate __pred, input_iterator_tag) + { + while (__first != __last && !bool(__pred(*__first))) + ++__first; + return __first; + } + + + template + _RandomAccessIterator + __find(_RandomAccessIterator __first, _RandomAccessIterator __last, + const _Tp& __val, random_access_iterator_tag) + { + typename iterator_traits<_RandomAccessIterator>::difference_type + __trip_count = (__last - __first) >> 2; + + for (; __trip_count > 0; --__trip_count) + { + if (*__first == __val) + return __first; + ++__first; + + if (*__first == __val) + return __first; + ++__first; + + if (*__first == __val) + return __first; + ++__first; + + if (*__first == __val) + return __first; + ++__first; + } + + switch (__last - __first) + { + case 3: + if (*__first == __val) + return __first; + ++__first; + case 2: + if (*__first == __val) + return __first; + ++__first; + case 1: + if (*__first == __val) + return __first; + ++__first; + case 0: + default: + return __last; + } + } + + + template + _RandomAccessIterator + __find_if(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Predicate __pred, random_access_iterator_tag) + { + typename iterator_traits<_RandomAccessIterator>::difference_type + __trip_count = (__last - __first) >> 2; + + for (; __trip_count > 0; --__trip_count) + { + if (__pred(*__first)) + return __first; + ++__first; + + if (__pred(*__first)) + return __first; + ++__first; + + if (__pred(*__first)) + return __first; + ++__first; + + if (__pred(*__first)) + return __first; + ++__first; + } + + switch (__last - __first) + { + case 3: + if (__pred(*__first)) + return __first; + ++__first; + case 2: + if (__pred(*__first)) + return __first; + ++__first; + case 1: + if (__pred(*__first)) + return __first; + ++__first; + case 0: + default: + return __last; + } + } +# 322 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + __search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, const _Tp& __val, + std::forward_iterator_tag) + { + __first = std::find(__first, __last, __val); + while (__first != __last) + { + typename iterator_traits<_ForwardIterator>::difference_type + __n = __count; + _ForwardIterator __i = __first; + ++__i; + while (__i != __last && __n != 1 && *__i == __val) + { + ++__i; + --__n; + } + if (__n == 1) + return __first; + if (__i == __last) + return __last; + __first = std::find(++__i, __last, __val); + } + return __last; + } + + + + + + + template + _RandomAccessIter + __search_n(_RandomAccessIter __first, _RandomAccessIter __last, + _Integer __count, const _Tp& __val, + std::random_access_iterator_tag) + { + + typedef typename std::iterator_traits<_RandomAccessIter>::difference_type + _DistanceType; + + _DistanceType __tailSize = __last - __first; + const _DistanceType __pattSize = __count; + + if (__tailSize < __pattSize) + return __last; + + const _DistanceType __skipOffset = __pattSize - 1; + _RandomAccessIter __lookAhead = __first + __skipOffset; + __tailSize -= __pattSize; + + while (1) + { + + + while (!(*__lookAhead == __val)) + { + if (__tailSize < __pattSize) + return __last; + __lookAhead += __pattSize; + __tailSize -= __pattSize; + } + _DistanceType __remainder = __skipOffset; + for (_RandomAccessIter __backTrack = __lookAhead - 1; + *__backTrack == __val; --__backTrack) + { + if (--__remainder == 0) + return (__lookAhead - __skipOffset); + } + if (__remainder > __tailSize) + return __last; + __lookAhead += __remainder; + __tailSize -= __remainder; + } + } +# 407 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + __search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, const _Tp& __val, + _BinaryPredicate __binary_pred, std::forward_iterator_tag) + { + while (__first != __last && !bool(__binary_pred(*__first, __val))) + ++__first; + + while (__first != __last) + { + typename iterator_traits<_ForwardIterator>::difference_type + __n = __count; + _ForwardIterator __i = __first; + ++__i; + while (__i != __last && __n != 1 && bool(__binary_pred(*__i, __val))) + { + ++__i; + --__n; + } + if (__n == 1) + return __first; + if (__i == __last) + return __last; + __first = ++__i; + while (__first != __last + && !bool(__binary_pred(*__first, __val))) + ++__first; + } + return __last; + } + + + + + + + + template + _RandomAccessIter + __search_n(_RandomAccessIter __first, _RandomAccessIter __last, + _Integer __count, const _Tp& __val, + _BinaryPredicate __binary_pred, std::random_access_iterator_tag) + { + + typedef typename std::iterator_traits<_RandomAccessIter>::difference_type + _DistanceType; + + _DistanceType __tailSize = __last - __first; + const _DistanceType __pattSize = __count; + + if (__tailSize < __pattSize) + return __last; + + const _DistanceType __skipOffset = __pattSize - 1; + _RandomAccessIter __lookAhead = __first + __skipOffset; + __tailSize -= __pattSize; + + while (1) + { + + + while (!bool(__binary_pred(*__lookAhead, __val))) + { + if (__tailSize < __pattSize) + return __last; + __lookAhead += __pattSize; + __tailSize -= __pattSize; + } + _DistanceType __remainder = __skipOffset; + for (_RandomAccessIter __backTrack = __lookAhead - 1; + __binary_pred(*__backTrack, __val); --__backTrack) + { + if (--__remainder == 0) + return (__lookAhead - __skipOffset); + } + if (__remainder > __tailSize) + return __last; + __lookAhead += __remainder; + __tailSize -= __remainder; + } + } + + + template + _ForwardIterator1 + __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + forward_iterator_tag, forward_iterator_tag) + { + if (__first2 == __last2) + return __last1; + else + { + _ForwardIterator1 __result = __last1; + while (1) + { + _ForwardIterator1 __new_result + = std::search(__first1, __last1, __first2, __last2); + if (__new_result == __last1) + return __result; + else + { + __result = __new_result; + __first1 = __new_result; + ++__first1; + } + } + } + } + + template + _ForwardIterator1 + __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + forward_iterator_tag, forward_iterator_tag, + _BinaryPredicate __comp) + { + if (__first2 == __last2) + return __last1; + else + { + _ForwardIterator1 __result = __last1; + while (1) + { + _ForwardIterator1 __new_result + = std::search(__first1, __last1, __first2, + __last2, __comp); + if (__new_result == __last1) + return __result; + else + { + __result = __new_result; + __first1 = __new_result; + ++__first1; + } + } + } + } + + + template + _BidirectionalIterator1 + __find_end(_BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + bidirectional_iterator_tag, bidirectional_iterator_tag) + { + + + + + + + typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; + typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; + + _RevIterator1 __rlast1(__first1); + _RevIterator2 __rlast2(__first2); + _RevIterator1 __rresult = std::search(_RevIterator1(__last1), + __rlast1, + _RevIterator2(__last2), + __rlast2); + + if (__rresult == __rlast1) + return __last1; + else + { + _BidirectionalIterator1 __result = __rresult.base(); + std::advance(__result, -std::distance(__first2, __last2)); + return __result; + } + } + + template + _BidirectionalIterator1 + __find_end(_BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + bidirectional_iterator_tag, bidirectional_iterator_tag, + _BinaryPredicate __comp) + { + + + + + + + typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; + typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; + + _RevIterator1 __rlast1(__first1); + _RevIterator2 __rlast2(__first2); + _RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1, + _RevIterator2(__last2), __rlast2, + __comp); + + if (__rresult == __rlast1) + return __last1; + else + { + _BidirectionalIterator1 __result = __rresult.base(); + std::advance(__result, -std::distance(__first2, __last2)); + return __result; + } + } +# 645 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + inline _ForwardIterator1 + find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2) + { + + + + + + + ; + ; + + return std::__find_end(__first1, __last1, __first2, __last2, + std::__iterator_category(__first1), + std::__iterator_category(__first2)); + } +# 691 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + inline _ForwardIterator1 + find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + _BinaryPredicate __comp) + { + + + + + + + ; + ; + + return std::__find_end(__first1, __last1, __first2, __last2, + std::__iterator_category(__first1), + std::__iterator_category(__first2), + __comp); + } +# 870 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + remove_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, const _Tp& __value) + { + + + + + + + ; + + for (; __first != __last; ++__first) + if (!(*__first == __value)) + { + *__result = *__first; + ++__result; + } + return __result; + } +# 907 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + remove_copy_if(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _Predicate __pred) + { + + + + + + + ; + + for (; __first != __last; ++__first) + if (!bool(__pred(*__first))) + { + *__result = *__first; + ++__result; + } + return __result; + } +# 1082 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + remove(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __value) + { + + + + + + ; + + __first = std::find(__first, __last, __value); + if(__first == __last) + return __first; + _ForwardIterator __result = __first; + ++__first; + for(; __first != __last; ++__first) + if(!(*__first == __value)) + { + *__result = (*__first); + ++__result; + } + return __result; + } +# 1125 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + remove_if(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + + + + + + ; + + __first = std::find_if(__first, __last, __pred); + if(__first == __last) + return __first; + _ForwardIterator __result = __first; + ++__first; + for(; __first != __last; ++__first) + if(!bool(__pred(*__first))) + { + *__result = (*__first); + ++__result; + } + return __result; + } +# 1165 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + unique(_ForwardIterator __first, _ForwardIterator __last) + { + + + + + + ; + + + __first = std::adjacent_find(__first, __last); + if (__first == __last) + return __last; + + + _ForwardIterator __dest = __first; + ++__first; + while (++__first != __last) + if (!(*__dest == *__first)) + *++__dest = (*__first); + return ++__dest; + } +# 1205 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + unique(_ForwardIterator __first, _ForwardIterator __last, + _BinaryPredicate __binary_pred) + { + + + + + + + ; + + + __first = std::adjacent_find(__first, __last, __binary_pred); + if (__first == __last) + return __last; + + + _ForwardIterator __dest = __first; + ++__first; + while (++__first != __last) + if (!bool(__binary_pred(*__dest, *__first))) + *++__dest = (*__first); + return ++__dest; + } + + + + + + + template + _OutputIterator + __unique_copy(_ForwardIterator __first, _ForwardIterator __last, + _OutputIterator __result, + forward_iterator_tag, output_iterator_tag) + { + + _ForwardIterator __next = __first; + *__result = *__first; + while (++__next != __last) + if (!(*__first == *__next)) + { + __first = __next; + *++__result = *__first; + } + return ++__result; + } + + + + + + + template + _OutputIterator + __unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + input_iterator_tag, output_iterator_tag) + { + + typename iterator_traits<_InputIterator>::value_type __value = *__first; + *__result = __value; + while (++__first != __last) + if (!(__value == *__first)) + { + __value = *__first; + *++__result = __value; + } + return ++__result; + } + + + + + + + template + _ForwardIterator + __unique_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, + input_iterator_tag, forward_iterator_tag) + { + + *__result = *__first; + while (++__first != __last) + if (!(*__result == *__first)) + *++__result = *__first; + return ++__result; + } + + + + + + + + template + _OutputIterator + __unique_copy(_ForwardIterator __first, _ForwardIterator __last, + _OutputIterator __result, _BinaryPredicate __binary_pred, + forward_iterator_tag, output_iterator_tag) + { + + + + + + _ForwardIterator __next = __first; + *__result = *__first; + while (++__next != __last) + if (!bool(__binary_pred(*__first, *__next))) + { + __first = __next; + *++__result = *__first; + } + return ++__result; + } + + + + + + + + template + _OutputIterator + __unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _BinaryPredicate __binary_pred, + input_iterator_tag, output_iterator_tag) + { + + + + + + typename iterator_traits<_InputIterator>::value_type __value = *__first; + *__result = __value; + while (++__first != __last) + if (!bool(__binary_pred(__value, *__first))) + { + __value = *__first; + *++__result = __value; + } + return ++__result; + } + + + + + + + + template + _ForwardIterator + __unique_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _BinaryPredicate __binary_pred, + input_iterator_tag, forward_iterator_tag) + { + + + + + + *__result = *__first; + while (++__first != __last) + if (!bool(__binary_pred(*__result, *__first))) + *++__result = *__first; + return ++__result; + } + + + + + + + template + void + __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last, + bidirectional_iterator_tag) + { + while (true) + if (__first == __last || __first == --__last) + return; + else + { + std::iter_swap(__first, __last); + ++__first; + } + } + + + + + + + template + void + __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last, + random_access_iterator_tag) + { + if (__first == __last) + return; + --__last; + while (__first < __last) + { + std::iter_swap(__first, __last); + ++__first; + --__last; + } + } +# 1433 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + inline void + reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) + { + + + + ; + std::__reverse(__first, __last, std::__iterator_category(__first)); + } +# 1460 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, + _OutputIterator __result) + { + + + + + + ; + + while (__first != __last) + { + --__last; + *__result = *__last; + ++__result; + } + return __result; + } + + + + + + template + _EuclideanRingElement + __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n) + { + while (__n != 0) + { + _EuclideanRingElement __t = __m % __n; + __m = __n; + __n = __t; + } + return __m; + } + + + template + void + __rotate(_ForwardIterator __first, + _ForwardIterator __middle, + _ForwardIterator __last, + forward_iterator_tag) + { + if (__first == __middle || __last == __middle) + return; + + _ForwardIterator __first2 = __middle; + do + { + std::iter_swap(__first, __first2); + ++__first; + ++__first2; + if (__first == __middle) + __middle = __first2; + } + while (__first2 != __last); + + __first2 = __middle; + + while (__first2 != __last) + { + std::iter_swap(__first, __first2); + ++__first; + ++__first2; + if (__first == __middle) + __middle = __first2; + else if (__first2 == __last) + __first2 = __middle; + } + } + + + template + void + __rotate(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + bidirectional_iterator_tag) + { + + + + + if (__first == __middle || __last == __middle) + return; + + std::__reverse(__first, __middle, bidirectional_iterator_tag()); + std::__reverse(__middle, __last, bidirectional_iterator_tag()); + + while (__first != __middle && __middle != __last) + { + std::iter_swap(__first, --__last); + ++__first; + } + + if (__first == __middle) + std::__reverse(__middle, __last, bidirectional_iterator_tag()); + else + std::__reverse(__first, __middle, bidirectional_iterator_tag()); + } + + + template + void + __rotate(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last, + random_access_iterator_tag) + { + + + + + if (__first == __middle || __last == __middle) + return; + + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _Distance; + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + _Distance __n = __last - __first; + _Distance __k = __middle - __first; + + if (__k == __n - __k) + { + std::swap_ranges(__first, __middle, __middle); + return; + } + + _RandomAccessIterator __p = __first; + + for (;;) + { + if (__k < __n - __k) + { + if (__is_pod(_ValueType) && __k == 1) + { + _ValueType __t = (*__p); + std::copy(__p + 1, __p + __n, __p); + *(__p + __n - 1) = (__t); + return; + } + _RandomAccessIterator __q = __p + __k; + for (_Distance __i = 0; __i < __n - __k; ++ __i) + { + std::iter_swap(__p, __q); + ++__p; + ++__q; + } + __n %= __k; + if (__n == 0) + return; + std::swap(__n, __k); + __k = __n - __k; + } + else + { + __k = __n - __k; + if (__is_pod(_ValueType) && __k == 1) + { + _ValueType __t = (*(__p + __n - 1)); + std::copy_backward(__p, __p + __n - 1, __p + __n); + *__p = (__t); + return; + } + _RandomAccessIterator __q = __p + __n; + __p = __q - __k; + for (_Distance __i = 0; __i < __n - __k; ++ __i) + { + --__p; + --__q; + std::iter_swap(__p, __q); + } + __n %= __k; + if (__n == 0) + return; + std::swap(__n, __k); + } + } + } +# 1664 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + inline void + rotate(_ForwardIterator __first, _ForwardIterator __middle, + _ForwardIterator __last) + { + + + + ; + ; + + typedef typename iterator_traits<_ForwardIterator>::iterator_category + _IterType; + std::__rotate(__first, __middle, __last, _IterType()); + } +# 1698 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, + _ForwardIterator __last, _OutputIterator __result) + { + + + + + ; + ; + + return std::copy(__first, __middle, + std::copy(__middle, __last, __result)); + } + + + template + _ForwardIterator + __partition(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred, forward_iterator_tag) + { + if (__first == __last) + return __first; + + while (__pred(*__first)) + if (++__first == __last) + return __first; + + _ForwardIterator __next = __first; + + while (++__next != __last) + if (__pred(*__next)) + { + std::iter_swap(__first, __next); + ++__first; + } + + return __first; + } + + + template + _BidirectionalIterator + __partition(_BidirectionalIterator __first, _BidirectionalIterator __last, + _Predicate __pred, bidirectional_iterator_tag) + { + while (true) + { + while (true) + if (__first == __last) + return __first; + else if (__pred(*__first)) + ++__first; + else + break; + --__last; + while (true) + if (__first == __last) + return __first; + else if (!bool(__pred(*__last))) + --__last; + else + break; + std::iter_swap(__first, __last); + ++__first; + } + } + + + + + template + _ForwardIterator + __inplace_stable_partition(_ForwardIterator __first, + _ForwardIterator __last, + _Predicate __pred, _Distance __len) + { + if (__len == 1) + return __pred(*__first) ? __last : __first; + _ForwardIterator __middle = __first; + std::advance(__middle, __len / 2); + _ForwardIterator __begin = std::__inplace_stable_partition(__first, + __middle, + __pred, + __len / 2); + _ForwardIterator __end = std::__inplace_stable_partition(__middle, __last, + __pred, + __len + - __len / 2); + std::rotate(__begin, __middle, __end); + std::advance(__begin, std::distance(__middle, __end)); + return __begin; + } + + + template + _ForwardIterator + __stable_partition_adaptive(_ForwardIterator __first, + _ForwardIterator __last, + _Predicate __pred, _Distance __len, + _Pointer __buffer, + _Distance __buffer_size) + { + if (__len <= __buffer_size) + { + _ForwardIterator __result1 = __first; + _Pointer __result2 = __buffer; + for (; __first != __last; ++__first) + if (__pred(*__first)) + { + *__result1 = (*__first); + ++__result1; + } + else + { + *__result2 = (*__first); + ++__result2; + } + std::copy(__buffer, __result2, __result1); + return __result1; + } + else + { + _ForwardIterator __middle = __first; + std::advance(__middle, __len / 2); + _ForwardIterator __begin = + std::__stable_partition_adaptive(__first, __middle, __pred, + __len / 2, __buffer, + __buffer_size); + _ForwardIterator __end = + std::__stable_partition_adaptive(__middle, __last, __pred, + __len - __len / 2, + __buffer, __buffer_size); + std::rotate(__begin, __middle, __end); + std::advance(__begin, std::distance(__middle, __end)); + return __begin; + } + } +# 1856 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + stable_partition(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + + + + + + ; + + if (__first == __last) + return __first; + else + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + _Temporary_buffer<_ForwardIterator, _ValueType> __buf(__first, + __last); + if (__buf.size() > 0) + return + std::__stable_partition_adaptive(__first, __last, __pred, + _DistanceType(__buf.requested_size()), + __buf.begin(), + _DistanceType(__buf.size())); + else + return + std::__inplace_stable_partition(__first, __last, __pred, + _DistanceType(__buf.requested_size())); + } + } + + + template + void + __heap_select(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last) + { + std::make_heap(__first, __middle); + for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) + if (*__i < *__first) + std::__pop_heap(__first, __middle, __i); + } + + + template + void + __heap_select(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last, _Compare __comp) + { + std::make_heap(__first, __middle, __comp); + for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) + if (__comp(*__i, *__first)) + std::__pop_heap(__first, __middle, __i, __comp); + } +# 1938 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _RandomAccessIterator + partial_sort_copy(_InputIterator __first, _InputIterator __last, + _RandomAccessIterator __result_first, + _RandomAccessIterator __result_last) + { + typedef typename iterator_traits<_InputIterator>::value_type + _InputValueType; + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _OutputValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + + + + + ; + ; + + if (__result_first == __result_last) + return __result_last; + _RandomAccessIterator __result_real_last = __result_first; + while(__first != __last && __result_real_last != __result_last) + { + *__result_real_last = *__first; + ++__result_real_last; + ++__first; + } + std::make_heap(__result_first, __result_real_last); + while (__first != __last) + { + if (*__first < *__result_first) + std::__adjust_heap(__result_first, _DistanceType(0), + _DistanceType(__result_real_last + - __result_first), + _InputValueType(*__first)); + ++__first; + } + std::sort_heap(__result_first, __result_real_last); + return __result_real_last; + } +# 2004 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _RandomAccessIterator + partial_sort_copy(_InputIterator __first, _InputIterator __last, + _RandomAccessIterator __result_first, + _RandomAccessIterator __result_last, + _Compare __comp) + { + typedef typename iterator_traits<_InputIterator>::value_type + _InputValueType; + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _OutputValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + + + + + + + + ; + ; + + if (__result_first == __result_last) + return __result_last; + _RandomAccessIterator __result_real_last = __result_first; + while(__first != __last && __result_real_last != __result_last) + { + *__result_real_last = *__first; + ++__result_real_last; + ++__first; + } + std::make_heap(__result_first, __result_real_last, __comp); + while (__first != __last) + { + if (__comp(*__first, *__result_first)) + std::__adjust_heap(__result_first, _DistanceType(0), + _DistanceType(__result_real_last + - __result_first), + _InputValueType(*__first), + __comp); + ++__first; + } + std::sort_heap(__result_first, __result_real_last, __comp); + return __result_real_last; + } + + + template + void + __unguarded_linear_insert(_RandomAccessIterator __last) + { + typename iterator_traits<_RandomAccessIterator>::value_type + __val = (*__last); + _RandomAccessIterator __next = __last; + --__next; + while (__val < *__next) + { + *__last = (*__next); + __last = __next; + --__next; + } + *__last = (__val); + } + + + template + void + __unguarded_linear_insert(_RandomAccessIterator __last, + _Compare __comp) + { + typename iterator_traits<_RandomAccessIterator>::value_type + __val = (*__last); + _RandomAccessIterator __next = __last; + --__next; + while (__comp(__val, *__next)) + { + *__last = (*__next); + __last = __next; + --__next; + } + *__last = (__val); + } + + + template + void + __insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last) + { + if (__first == __last) + return; + + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + { + if (*__i < *__first) + { + typename iterator_traits<_RandomAccessIterator>::value_type + __val = (*__i); + std::copy_backward(__first, __i, __i + 1); + *__first = (__val); + } + else + std::__unguarded_linear_insert(__i); + } + } + + + template + void + __insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + if (__first == __last) return; + + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + { + if (__comp(*__i, *__first)) + { + typename iterator_traits<_RandomAccessIterator>::value_type + __val = (*__i); + std::copy_backward(__first, __i, __i + 1); + *__first = (__val); + } + else + std::__unguarded_linear_insert(__i, __comp); + } + } + + + template + inline void + __unguarded_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + for (_RandomAccessIterator __i = __first; __i != __last; ++__i) + std::__unguarded_linear_insert(__i); + } + + + template + inline void + __unguarded_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + for (_RandomAccessIterator __i = __first; __i != __last; ++__i) + std::__unguarded_linear_insert(__i, __comp); + } + + + + + + enum { _S_threshold = 16 }; + + + template + void + __final_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last) + { + if (__last - __first > int(_S_threshold)) + { + std::__insertion_sort(__first, __first + int(_S_threshold)); + std::__unguarded_insertion_sort(__first + int(_S_threshold), __last); + } + else + std::__insertion_sort(__first, __last); + } + + + template + void + __final_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + if (__last - __first > int(_S_threshold)) + { + std::__insertion_sort(__first, __first + int(_S_threshold), __comp); + std::__unguarded_insertion_sort(__first + int(_S_threshold), __last, + __comp); + } + else + std::__insertion_sort(__first, __last, __comp); + } + + + template + _RandomAccessIterator + __unguarded_partition(_RandomAccessIterator __first, + _RandomAccessIterator __last, const _Tp& __pivot) + { + while (true) + { + while (*__first < __pivot) + ++__first; + --__last; + while (__pivot < *__last) + --__last; + if (!(__first < __last)) + return __first; + std::iter_swap(__first, __last); + ++__first; + } + } + + + template + _RandomAccessIterator + __unguarded_partition(_RandomAccessIterator __first, + _RandomAccessIterator __last, + const _Tp& __pivot, _Compare __comp) + { + while (true) + { + while (__comp(*__first, __pivot)) + ++__first; + --__last; + while (__comp(__pivot, *__last)) + --__last; + if (!(__first < __last)) + return __first; + std::iter_swap(__first, __last); + ++__first; + } + } + + + template + inline _RandomAccessIterator + __unguarded_partition_pivot(_RandomAccessIterator __first, + _RandomAccessIterator __last) + { + _RandomAccessIterator __mid = __first + (__last - __first) / 2; + std::__move_median_first(__first, __mid, (__last - 1)); + return std::__unguarded_partition(__first + 1, __last, *__first); + } + + + + template + inline _RandomAccessIterator + __unguarded_partition_pivot(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + _RandomAccessIterator __mid = __first + (__last - __first) / 2; + std::__move_median_first(__first, __mid, (__last - 1), __comp); + return std::__unguarded_partition(__first + 1, __last, *__first, __comp); + } + + + template + void + __introsort_loop(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Size __depth_limit) + { + while (__last - __first > int(_S_threshold)) + { + if (__depth_limit == 0) + { + std::partial_sort(__first, __last, __last); + return; + } + --__depth_limit; + _RandomAccessIterator __cut = + std::__unguarded_partition_pivot(__first, __last); + std::__introsort_loop(__cut, __last, __depth_limit); + __last = __cut; + } + } + + + template + void + __introsort_loop(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Size __depth_limit, _Compare __comp) + { + while (__last - __first > int(_S_threshold)) + { + if (__depth_limit == 0) + { + std::partial_sort(__first, __last, __last, __comp); + return; + } + --__depth_limit; + _RandomAccessIterator __cut = + std::__unguarded_partition_pivot(__first, __last, __comp); + std::__introsort_loop(__cut, __last, __depth_limit, __comp); + __last = __cut; + } + } + + + + template + void + __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last, _Size __depth_limit) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + while (__last - __first > 3) + { + if (__depth_limit == 0) + { + std::__heap_select(__first, __nth + 1, __last); + + + std::iter_swap(__first, __nth); + return; + } + --__depth_limit; + _RandomAccessIterator __cut = + std::__unguarded_partition_pivot(__first, __last); + if (__cut <= __nth) + __first = __cut; + else + __last = __cut; + } + std::__insertion_sort(__first, __last); + } + + template + void + __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last, _Size __depth_limit, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + while (__last - __first > 3) + { + if (__depth_limit == 0) + { + std::__heap_select(__first, __nth + 1, __last, __comp); + + std::iter_swap(__first, __nth); + return; + } + --__depth_limit; + _RandomAccessIterator __cut = + std::__unguarded_partition_pivot(__first, __last, __comp); + if (__cut <= __nth) + __first = __cut; + else + __last = __cut; + } + std::__insertion_sort(__first, __last, __comp); + } +# 2388 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + lower_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + + + + + ; + + _DistanceType __len = std::distance(__first, __last); + _DistanceType __half; + _ForwardIterator __middle; + + while (__len > 0) + { + __half = __len >> 1; + __middle = __first; + std::advance(__middle, __half); + if (__comp(*__middle, __val)) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else + __len = __half; + } + return __first; + } +# 2437 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + upper_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + + + ; + + _DistanceType __len = std::distance(__first, __last); + _DistanceType __half; + _ForwardIterator __middle; + + while (__len > 0) + { + __half = __len >> 1; + __middle = __first; + std::advance(__middle, __half); + if (__val < *__middle) + __len = __half; + else + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + } + return __first; + } +# 2488 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + upper_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + + + + + ; + + _DistanceType __len = std::distance(__first, __last); + _DistanceType __half; + _ForwardIterator __middle; + + while (__len > 0) + { + __half = __len >> 1; + __middle = __first; + std::advance(__middle, __half); + if (__comp(__val, *__middle)) + __len = __half; + else + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + } + return __first; + } +# 2543 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + pair<_ForwardIterator, _ForwardIterator> + equal_range(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + + + + ; + ; + + _DistanceType __len = std::distance(__first, __last); + _DistanceType __half; + _ForwardIterator __middle, __left, __right; + + while (__len > 0) + { + __half = __len >> 1; + __middle = __first; + std::advance(__middle, __half); + if (*__middle < __val) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else if (__val < *__middle) + __len = __half; + else + { + __left = std::lower_bound(__first, __middle, __val); + std::advance(__first, __len); + __right = std::upper_bound(++__middle, __first, __val); + return pair<_ForwardIterator, _ForwardIterator>(__left, __right); + } + } + return pair<_ForwardIterator, _ForwardIterator>(__first, __first); + } +# 2605 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + pair<_ForwardIterator, _ForwardIterator> + equal_range(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, + _Compare __comp) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + + + + + + + ; + + ; + + _DistanceType __len = std::distance(__first, __last); + _DistanceType __half; + _ForwardIterator __middle, __left, __right; + + while (__len > 0) + { + __half = __len >> 1; + __middle = __first; + std::advance(__middle, __half); + if (__comp(*__middle, __val)) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else if (__comp(__val, *__middle)) + __len = __half; + else + { + __left = std::lower_bound(__first, __middle, __val, __comp); + std::advance(__first, __len); + __right = std::upper_bound(++__middle, __first, __val, __comp); + return pair<_ForwardIterator, _ForwardIterator>(__left, __right); + } + } + return pair<_ForwardIterator, _ForwardIterator>(__first, __first); + } +# 2666 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + bool + binary_search(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + + + + ; + ; + + _ForwardIterator __i = std::lower_bound(__first, __last, __val); + return __i != __last && !(__val < *__i); + } +# 2699 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + bool + binary_search(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + + + + + + ; + + ; + + _ForwardIterator __i = std::lower_bound(__first, __last, __val, __comp); + return __i != __last && !bool(__comp(__val, *__i)); + } + + + + + template + _BidirectionalIterator3 + __merge_backward(_BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + _BidirectionalIterator3 __result) + { + if (__first1 == __last1) + return std::copy_backward(__first2, __last2, __result); + if (__first2 == __last2) + return std::copy_backward(__first1, __last1, __result); + --__last1; + --__last2; + while (true) + { + if (*__last2 < *__last1) + { + *--__result = *__last1; + if (__first1 == __last1) + return std::copy_backward(__first2, ++__last2, __result); + --__last1; + } + else + { + *--__result = *__last2; + if (__first2 == __last2) + return std::copy_backward(__first1, ++__last1, __result); + --__last2; + } + } + } + + + template + _BidirectionalIterator3 + __merge_backward(_BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + _BidirectionalIterator3 __result, + _Compare __comp) + { + if (__first1 == __last1) + return std::copy_backward(__first2, __last2, __result); + if (__first2 == __last2) + return std::copy_backward(__first1, __last1, __result); + --__last1; + --__last2; + while (true) + { + if (__comp(*__last2, *__last1)) + { + *--__result = *__last1; + if (__first1 == __last1) + return std::copy_backward(__first2, ++__last2, __result); + --__last1; + } + else + { + *--__result = *__last2; + if (__first2 == __last2) + return std::copy_backward(__first1, ++__last1, __result); + --__last2; + } + } + } + + + template + _BidirectionalIterator1 + __rotate_adaptive(_BidirectionalIterator1 __first, + _BidirectionalIterator1 __middle, + _BidirectionalIterator1 __last, + _Distance __len1, _Distance __len2, + _BidirectionalIterator2 __buffer, + _Distance __buffer_size) + { + _BidirectionalIterator2 __buffer_end; + if (__len1 > __len2 && __len2 <= __buffer_size) + { + __buffer_end = std::copy(__middle, __last, __buffer); + std::copy_backward(__first, __middle, __last); + return std::copy(__buffer, __buffer_end, __first); + } + else if (__len1 <= __buffer_size) + { + __buffer_end = std::copy(__first, __middle, __buffer); + std::copy(__middle, __last, __first); + return std::copy_backward(__buffer, __buffer_end, __last); + } + else + { + std::rotate(__first, __middle, __last); + std::advance(__first, std::distance(__middle, __last)); + return __first; + } + } + + + template + void + __merge_adaptive(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Distance __len1, _Distance __len2, + _Pointer __buffer, _Distance __buffer_size) + { + if (__len1 <= __len2 && __len1 <= __buffer_size) + { + _Pointer __buffer_end = std::copy(__first, __middle, __buffer); + std::merge((__buffer), + (__buffer_end), + (__middle), + (__last), + __first); + } + else if (__len2 <= __buffer_size) + { + _Pointer __buffer_end = std::copy(__middle, __last, __buffer); + std::__merge_backward((__first), + (__middle), + (__buffer), + (__buffer_end), + __last); + } + else + { + _BidirectionalIterator __first_cut = __first; + _BidirectionalIterator __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) + { + __len11 = __len1 / 2; + std::advance(__first_cut, __len11); + __second_cut = std::lower_bound(__middle, __last, + *__first_cut); + __len22 = std::distance(__middle, __second_cut); + } + else + { + __len22 = __len2 / 2; + std::advance(__second_cut, __len22); + __first_cut = std::upper_bound(__first, __middle, + *__second_cut); + __len11 = std::distance(__first, __first_cut); + } + _BidirectionalIterator __new_middle = + std::__rotate_adaptive(__first_cut, __middle, __second_cut, + __len1 - __len11, __len22, __buffer, + __buffer_size); + std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, + __len22, __buffer, __buffer_size); + std::__merge_adaptive(__new_middle, __second_cut, __last, + __len1 - __len11, + __len2 - __len22, __buffer, __buffer_size); + } + } + + + template + void + __merge_adaptive(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Distance __len1, _Distance __len2, + _Pointer __buffer, _Distance __buffer_size, + _Compare __comp) + { + if (__len1 <= __len2 && __len1 <= __buffer_size) + { + _Pointer __buffer_end = std::copy(__first, __middle, __buffer); + std::merge((__buffer), + (__buffer_end), + (__middle), + (__last), + __first, __comp); + } + else if (__len2 <= __buffer_size) + { + _Pointer __buffer_end = std::copy(__middle, __last, __buffer); + std::__merge_backward((__first), + (__middle), + (__buffer), + (__buffer_end), + __last,__comp); + } + else + { + _BidirectionalIterator __first_cut = __first; + _BidirectionalIterator __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) + { + __len11 = __len1 / 2; + std::advance(__first_cut, __len11); + __second_cut = std::lower_bound(__middle, __last, *__first_cut, + __comp); + __len22 = std::distance(__middle, __second_cut); + } + else + { + __len22 = __len2 / 2; + std::advance(__second_cut, __len22); + __first_cut = std::upper_bound(__first, __middle, *__second_cut, + __comp); + __len11 = std::distance(__first, __first_cut); + } + _BidirectionalIterator __new_middle = + std::__rotate_adaptive(__first_cut, __middle, __second_cut, + __len1 - __len11, __len22, __buffer, + __buffer_size); + std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, + __len22, __buffer, __buffer_size, __comp); + std::__merge_adaptive(__new_middle, __second_cut, __last, + __len1 - __len11, + __len2 - __len22, __buffer, + __buffer_size, __comp); + } + } + + + template + void + __merge_without_buffer(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Distance __len1, _Distance __len2) + { + if (__len1 == 0 || __len2 == 0) + return; + if (__len1 + __len2 == 2) + { + if (*__middle < *__first) + std::iter_swap(__first, __middle); + return; + } + _BidirectionalIterator __first_cut = __first; + _BidirectionalIterator __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) + { + __len11 = __len1 / 2; + std::advance(__first_cut, __len11); + __second_cut = std::lower_bound(__middle, __last, *__first_cut); + __len22 = std::distance(__middle, __second_cut); + } + else + { + __len22 = __len2 / 2; + std::advance(__second_cut, __len22); + __first_cut = std::upper_bound(__first, __middle, *__second_cut); + __len11 = std::distance(__first, __first_cut); + } + std::rotate(__first_cut, __middle, __second_cut); + _BidirectionalIterator __new_middle = __first_cut; + std::advance(__new_middle, std::distance(__middle, __second_cut)); + std::__merge_without_buffer(__first, __first_cut, __new_middle, + __len11, __len22); + std::__merge_without_buffer(__new_middle, __second_cut, __last, + __len1 - __len11, __len2 - __len22); + } + + + template + void + __merge_without_buffer(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Distance __len1, _Distance __len2, + _Compare __comp) + { + if (__len1 == 0 || __len2 == 0) + return; + if (__len1 + __len2 == 2) + { + if (__comp(*__middle, *__first)) + std::iter_swap(__first, __middle); + return; + } + _BidirectionalIterator __first_cut = __first; + _BidirectionalIterator __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) + { + __len11 = __len1 / 2; + std::advance(__first_cut, __len11); + __second_cut = std::lower_bound(__middle, __last, *__first_cut, + __comp); + __len22 = std::distance(__middle, __second_cut); + } + else + { + __len22 = __len2 / 2; + std::advance(__second_cut, __len22); + __first_cut = std::upper_bound(__first, __middle, *__second_cut, + __comp); + __len11 = std::distance(__first, __first_cut); + } + std::rotate(__first_cut, __middle, __second_cut); + _BidirectionalIterator __new_middle = __first_cut; + std::advance(__new_middle, std::distance(__middle, __second_cut)); + std::__merge_without_buffer(__first, __first_cut, __new_middle, + __len11, __len22, __comp); + std::__merge_without_buffer(__new_middle, __second_cut, __last, + __len1 - __len11, __len2 - __len22, __comp); + } +# 3059 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + void + inplace_merge(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last) + { + typedef typename iterator_traits<_BidirectionalIterator>::value_type + _ValueType; + typedef typename iterator_traits<_BidirectionalIterator>::difference_type + _DistanceType; + + + + + + ; + ; + + if (__first == __middle || __middle == __last) + return; + + _DistanceType __len1 = std::distance(__first, __middle); + _DistanceType __len2 = std::distance(__middle, __last); + + _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first, + __last); + if (__buf.begin() == 0) + std::__merge_without_buffer(__first, __middle, __last, __len1, __len2); + else + std::__merge_adaptive(__first, __middle, __last, __len1, __len2, + __buf.begin(), _DistanceType(__buf.size())); + } +# 3114 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + void + inplace_merge(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_BidirectionalIterator>::value_type + _ValueType; + typedef typename iterator_traits<_BidirectionalIterator>::difference_type + _DistanceType; + + + + + + + ; + ; + + if (__first == __middle || __middle == __last) + return; + + const _DistanceType __len1 = std::distance(__first, __middle); + const _DistanceType __len2 = std::distance(__middle, __last); + + _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first, + __last); + if (__buf.begin() == 0) + std::__merge_without_buffer(__first, __middle, __last, __len1, + __len2, __comp); + else + std::__merge_adaptive(__first, __middle, __last, __len1, __len2, + __buf.begin(), _DistanceType(__buf.size()), + __comp); + } + + template + void + __merge_sort_loop(_RandomAccessIterator1 __first, + _RandomAccessIterator1 __last, + _RandomAccessIterator2 __result, + _Distance __step_size) + { + const _Distance __two_step = 2 * __step_size; + + while (__last - __first >= __two_step) + { + __result = std::merge( + (__first), + (__first + __step_size), + (__first + __step_size), + (__first + __two_step), + __result); + __first += __two_step; + } + + __step_size = std::min(_Distance(__last - __first), __step_size); + std::merge((__first), + (__first + __step_size) + , + (__first + __step_size) + , + (__last), + __result); + } + + template + void + __merge_sort_loop(_RandomAccessIterator1 __first, + _RandomAccessIterator1 __last, + _RandomAccessIterator2 __result, _Distance __step_size, + _Compare __comp) + { + const _Distance __two_step = 2 * __step_size; + + while (__last - __first >= __two_step) + { + __result = std::merge( + (__first), + (__first + __step_size), + (__first + __step_size), + (__first + __two_step), + __result, __comp); + __first += __two_step; + } + __step_size = std::min(_Distance(__last - __first), __step_size); + + std::merge((__first), + (__first + __step_size) + , + (__first + __step_size) + , + (__last), + __result, __comp); + } + + template + void + __chunk_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Distance __chunk_size) + { + while (__last - __first >= __chunk_size) + { + std::__insertion_sort(__first, __first + __chunk_size); + __first += __chunk_size; + } + std::__insertion_sort(__first, __last); + } + + template + void + __chunk_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Distance __chunk_size, _Compare __comp) + { + while (__last - __first >= __chunk_size) + { + std::__insertion_sort(__first, __first + __chunk_size, __comp); + __first += __chunk_size; + } + std::__insertion_sort(__first, __last, __comp); + } + + enum { _S_chunk_size = 7 }; + + template + void + __merge_sort_with_buffer(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Pointer __buffer) + { + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _Distance; + + const _Distance __len = __last - __first; + const _Pointer __buffer_last = __buffer + __len; + + _Distance __step_size = _S_chunk_size; + std::__chunk_insertion_sort(__first, __last, __step_size); + + while (__step_size < __len) + { + std::__merge_sort_loop(__first, __last, __buffer, __step_size); + __step_size *= 2; + std::__merge_sort_loop(__buffer, __buffer_last, __first, __step_size); + __step_size *= 2; + } + } + + template + void + __merge_sort_with_buffer(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Pointer __buffer, _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _Distance; + + const _Distance __len = __last - __first; + const _Pointer __buffer_last = __buffer + __len; + + _Distance __step_size = _S_chunk_size; + std::__chunk_insertion_sort(__first, __last, __step_size, __comp); + + while (__step_size < __len) + { + std::__merge_sort_loop(__first, __last, __buffer, + __step_size, __comp); + __step_size *= 2; + std::__merge_sort_loop(__buffer, __buffer_last, __first, + __step_size, __comp); + __step_size *= 2; + } + } + + template + void + __stable_sort_adaptive(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Pointer __buffer, _Distance __buffer_size) + { + const _Distance __len = (__last - __first + 1) / 2; + const _RandomAccessIterator __middle = __first + __len; + if (__len > __buffer_size) + { + std::__stable_sort_adaptive(__first, __middle, + __buffer, __buffer_size); + std::__stable_sort_adaptive(__middle, __last, + __buffer, __buffer_size); + } + else + { + std::__merge_sort_with_buffer(__first, __middle, __buffer); + std::__merge_sort_with_buffer(__middle, __last, __buffer); + } + std::__merge_adaptive(__first, __middle, __last, + _Distance(__middle - __first), + _Distance(__last - __middle), + __buffer, __buffer_size); + } + + template + void + __stable_sort_adaptive(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Pointer __buffer, _Distance __buffer_size, + _Compare __comp) + { + const _Distance __len = (__last - __first + 1) / 2; + const _RandomAccessIterator __middle = __first + __len; + if (__len > __buffer_size) + { + std::__stable_sort_adaptive(__first, __middle, __buffer, + __buffer_size, __comp); + std::__stable_sort_adaptive(__middle, __last, __buffer, + __buffer_size, __comp); + } + else + { + std::__merge_sort_with_buffer(__first, __middle, __buffer, __comp); + std::__merge_sort_with_buffer(__middle, __last, __buffer, __comp); + } + std::__merge_adaptive(__first, __middle, __last, + _Distance(__middle - __first), + _Distance(__last - __middle), + __buffer, __buffer_size, + __comp); + } + + + template + void + __inplace_stable_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last) + { + if (__last - __first < 15) + { + std::__insertion_sort(__first, __last); + return; + } + _RandomAccessIterator __middle = __first + (__last - __first) / 2; + std::__inplace_stable_sort(__first, __middle); + std::__inplace_stable_sort(__middle, __last); + std::__merge_without_buffer(__first, __middle, __last, + __middle - __first, + __last - __middle); + } + + + template + void + __inplace_stable_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + if (__last - __first < 15) + { + std::__insertion_sort(__first, __last, __comp); + return; + } + _RandomAccessIterator __middle = __first + (__last - __first) / 2; + std::__inplace_stable_sort(__first, __middle, __comp); + std::__inplace_stable_sort(__middle, __last, __comp); + std::__merge_without_buffer(__first, __middle, __last, + __middle - __first, + __last - __middle, + __comp); + } +# 3412 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + bool + includes(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + ; + ; + + while (__first1 != __last1 && __first2 != __last2) + if (*__first2 < *__first1) + return false; + else if(*__first1 < *__first2) + ++__first1; + else + ++__first1, ++__first2; + + return __first2 == __last2; + } +# 3461 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + bool + includes(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + + + ; + ; + + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first2, *__first1)) + return false; + else if(__comp(*__first1, *__first2)) + ++__first1; + else + ++__first1, ++__first2; + + return __first2 == __last2; + } +# 3516 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + bool + next_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last) + { + + + + + + ; + + if (__first == __last) + return false; + _BidirectionalIterator __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + + for(;;) + { + _BidirectionalIterator __ii = __i; + --__i; + if (*__i < *__ii) + { + _BidirectionalIterator __j = __last; + while (!(*__i < *--__j)) + {} + std::iter_swap(__i, __j); + std::reverse(__ii, __last); + return true; + } + if (__i == __first) + { + std::reverse(__first, __last); + return false; + } + } + } +# 3573 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + bool + next_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last, _Compare __comp) + { + + + + + + + ; + + if (__first == __last) + return false; + _BidirectionalIterator __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + + for(;;) + { + _BidirectionalIterator __ii = __i; + --__i; + if (__comp(*__i, *__ii)) + { + _BidirectionalIterator __j = __last; + while (!bool(__comp(*__i, *--__j))) + {} + std::iter_swap(__i, __j); + std::reverse(__ii, __last); + return true; + } + if (__i == __first) + { + std::reverse(__first, __last); + return false; + } + } + } +# 3629 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + bool + prev_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last) + { + + + + + + ; + + if (__first == __last) + return false; + _BidirectionalIterator __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + + for(;;) + { + _BidirectionalIterator __ii = __i; + --__i; + if (*__ii < *__i) + { + _BidirectionalIterator __j = __last; + while (!(*--__j < *__i)) + {} + std::iter_swap(__i, __j); + std::reverse(__ii, __last); + return true; + } + if (__i == __first) + { + std::reverse(__first, __last); + return false; + } + } + } +# 3686 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + bool + prev_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last, _Compare __comp) + { + + + + + + + ; + + if (__first == __last) + return false; + _BidirectionalIterator __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + + for(;;) + { + _BidirectionalIterator __ii = __i; + --__i; + if (__comp(*__ii, *__i)) + { + _BidirectionalIterator __j = __last; + while (!bool(__comp(*--__j, *__i))) + {} + std::iter_swap(__i, __j); + std::reverse(__ii, __last); + return true; + } + if (__i == __first) + { + std::reverse(__first, __last); + return false; + } + } + } +# 3746 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + replace_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + const _Tp& __old_value, const _Tp& __new_value) + { + + + + + + + ; + + for (; __first != __last; ++__first, ++__result) + if (*__first == __old_value) + *__result = __new_value; + else + *__result = *__first; + return __result; + } +# 3783 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + replace_copy_if(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + _Predicate __pred, const _Tp& __new_value) + { + + + + + + + ; + + for (; __first != __last; ++__first, ++__result) + if (__pred(*__first)) + *__result = __new_value; + else + *__result = *__first; + return __result; + } +# 4161 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 +} + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 4177 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _Function + for_each(_InputIterator __first, _InputIterator __last, _Function __f) + { + + + ; + for (; __first != __last; ++__first) + __f(*__first); + return (__f); + } +# 4198 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + inline _InputIterator + find(_InputIterator __first, _InputIterator __last, + const _Tp& __val) + { + + + + + ; + return std::__find(__first, __last, __val, + std::__iterator_category(__first)); + } +# 4222 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + inline _InputIterator + find_if(_InputIterator __first, _InputIterator __last, + _Predicate __pred) + { + + + + + ; + return std::__find_if(__first, __last, __pred, + std::__iterator_category(__first)); + } +# 4251 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _InputIterator + find_first_of(_InputIterator __first1, _InputIterator __last1, + _ForwardIterator __first2, _ForwardIterator __last2) + { + + + + + + + ; + ; + + for (; __first1 != __last1; ++__first1) + for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) + if (*__first1 == *__iter) + return __first1; + return __last1; + } +# 4290 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _InputIterator + find_first_of(_InputIterator __first1, _InputIterator __last1, + _ForwardIterator __first2, _ForwardIterator __last2, + _BinaryPredicate __comp) + { + + + + + + + ; + ; + + for (; __first1 != __last1; ++__first1) + for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) + if (__comp(*__first1, *__iter)) + return __first1; + return __last1; + } +# 4322 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + adjacent_find(_ForwardIterator __first, _ForwardIterator __last) + { + + + + + ; + if (__first == __last) + return __last; + _ForwardIterator __next = __first; + while(++__next != __last) + { + if (*__first == *__next) + return __first; + __first = __next; + } + return __last; + } +# 4354 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + adjacent_find(_ForwardIterator __first, _ForwardIterator __last, + _BinaryPredicate __binary_pred) + { + + + + + + ; + if (__first == __last) + return __last; + _ForwardIterator __next = __first; + while(++__next != __last) + { + if (__binary_pred(*__first, *__next)) + return __first; + __first = __next; + } + return __last; + } +# 4386 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + typename iterator_traits<_InputIterator>::difference_type + count(_InputIterator __first, _InputIterator __last, const _Tp& __value) + { + + + + + ; + typename iterator_traits<_InputIterator>::difference_type __n = 0; + for (; __first != __last; ++__first) + if (*__first == __value) + ++__n; + return __n; + } +# 4411 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + typename iterator_traits<_InputIterator>::difference_type + count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) + { + + + + + ; + typename iterator_traits<_InputIterator>::difference_type __n = 0; + for (; __first != __last; ++__first) + if (__pred(*__first)) + ++__n; + return __n; + } +# 4451 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator1 + search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2) + { + + + + + + + ; + ; + + + if (__first1 == __last1 || __first2 == __last2) + return __first1; + + + _ForwardIterator2 __p1(__first2); + if (++__p1 == __last2) + return std::find(__first1, __last1, *__first2); + + + _ForwardIterator2 __p; + _ForwardIterator1 __current = __first1; + + for (;;) + { + __first1 = std::find(__first1, __last1, *__first2); + if (__first1 == __last1) + return __last1; + + __p = __p1; + __current = __first1; + if (++__current == __last1) + return __last1; + + while (*__current == *__p) + { + if (++__p == __last2) + return __first1; + if (++__current == __last1) + return __last1; + } + ++__first1; + } + return __first1; + } +# 4522 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator1 + search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + _BinaryPredicate __predicate) + { + + + + + + + ; + ; + + + if (__first1 == __last1 || __first2 == __last2) + return __first1; + + + _ForwardIterator2 __p1(__first2); + if (++__p1 == __last2) + { + while (__first1 != __last1 + && !bool(__predicate(*__first1, *__first2))) + ++__first1; + return __first1; + } + + + _ForwardIterator2 __p; + _ForwardIterator1 __current = __first1; + + for (;;) + { + while (__first1 != __last1 + && !bool(__predicate(*__first1, *__first2))) + ++__first1; + if (__first1 == __last1) + return __last1; + + __p = __p1; + __current = __first1; + if (++__current == __last1) + return __last1; + + while (__predicate(*__current, *__p)) + { + if (++__p == __last2) + return __first1; + if (++__current == __last1) + return __last1; + } + ++__first1; + } + return __first1; + } +# 4596 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, const _Tp& __val) + { + + + + + ; + + if (__count <= 0) + return __first; + if (__count == 1) + return std::find(__first, __last, __val); + return std::__search_n(__first, __last, __count, __val, + std::__iterator_category(__first)); + } +# 4632 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, const _Tp& __val, + _BinaryPredicate __binary_pred) + { + + + + + ; + + if (__count <= 0) + return __first; + if (__count == 1) + { + while (__first != __last && !bool(__binary_pred(*__first, __val))) + ++__first; + return __first; + } + return std::__search_n(__first, __last, __count, __val, __binary_pred, + std::__iterator_category(__first)); + } +# 4674 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + transform(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _UnaryOperation __unary_op) + { + + + + + + ; + + for (; __first != __last; ++__first, ++__result) + *__result = __unary_op(*__first); + return __result; + } +# 4710 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + transform(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _OutputIterator __result, + _BinaryOperation __binary_op) + { + + + + + + + ; + + for (; __first1 != __last1; ++__first1, ++__first2, ++__result) + *__result = __binary_op(*__first1, *__first2); + return __result; + } +# 4743 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + void + replace(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __old_value, const _Tp& __new_value) + { + + + + + + + + ; + + for (; __first != __last; ++__first) + if (*__first == __old_value) + *__first = __new_value; + } +# 4775 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + void + replace_if(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred, const _Tp& __new_value) + { + + + + + + + + ; + + for (; __first != __last; ++__first) + if (__pred(*__first)) + *__first = __new_value; + } +# 4807 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + void + generate(_ForwardIterator __first, _ForwardIterator __last, + _Generator __gen) + { + + + + + ; + + for (; __first != __last; ++__first) + *__first = __gen(); + } +# 4838 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + generate_n(_OutputIterator __first, _Size __n, _Generator __gen) + { + + + + + + for (; __n > 0; --__n, ++__first) + *__first = __gen(); + return __first; + } +# 4874 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + inline _OutputIterator + unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result) + { + + + + + + + ; + + if (__first == __last) + return __result; + return std::__unique_copy(__first, __last, __result, + std::__iterator_category(__first), + std::__iterator_category(__result)); + } +# 4913 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + inline _OutputIterator + unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + _BinaryPredicate __binary_pred) + { + + + + + ; + + if (__first == __last) + return __result; + return std::__unique_copy(__first, __last, __result, __binary_pred, + std::__iterator_category(__first), + std::__iterator_category(__result)); + } +# 4945 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + inline void + random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + + + + ; + + if (__first != __last) + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + std::iter_swap(__i, __first + (std::rand() % ((__i - __first) + 1))); + } +# 4973 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + void + random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, + + + + _RandomNumberGenerator& __rand) + + { + + + + ; + + if (__first == __last) + return; + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + std::iter_swap(__i, __first + __rand((__i - __first) + 1)); + } +# 5009 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + inline _ForwardIterator + partition(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + + + + + + ; + + return std::__partition(__first, __last, __pred, + std::__iterator_category(__first)); + } +# 5043 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + inline void + partial_sort(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + + + + ; + ; + + std::__heap_select(__first, __middle, __last); + std::sort_heap(__first, __middle); + } +# 5082 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + inline void + partial_sort(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + + + + + ; + ; + + std::__heap_select(__first, __middle, __last, __comp); + std::sort_heap(__first, __middle, __comp); + } +# 5120 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + inline void + nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + + + + ; + ; + + if (__first == __last || __nth == __last) + return; + + std::__introselect(__first, __nth, __last, + std::__lg(__last - __first) * 2); + } +# 5159 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + inline void + nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last, _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + + + + + ; + ; + + if (__first == __last || __nth == __last) + return; + + std::__introselect(__first, __nth, __last, + std::__lg(__last - __first) * 2, __comp); + } +# 5197 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + inline void + sort(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + + + + ; + + if (__first != __last) + { + std::__introsort_loop(__first, __last, + std::__lg(__last - __first) * 2); + std::__final_insertion_sort(__first, __last); + } + } +# 5233 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + inline void + sort(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + + + + + ; + + if (__first != __last) + { + std::__introsort_loop(__first, __last, + std::__lg(__last - __first) * 2, __comp); + std::__final_insertion_sort(__first, __last, __comp); + } + } +# 5274 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + merge(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + + + + ; + ; + + while (__first1 != __last1 && __first2 != __last2) + { + if (*__first2 < *__first1) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + } + ++__result; + } + return std::copy(__first2, __last2, std::copy(__first1, __last1, + __result)); + } +# 5337 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + merge(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + + + + + ; + ; + + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(*__first2, *__first1)) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + } + ++__result; + } + return std::copy(__first2, __last2, std::copy(__first1, __last1, + __result)); + } +# 5397 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + inline void + stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + + ; + + _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first, + __last); + if (__buf.begin() == 0) + std::__inplace_stable_sort(__first, __last); + else + std::__stable_sort_adaptive(__first, __last, __buf.begin(), + _DistanceType(__buf.size())); + } +# 5439 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + inline void + stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + + + + ; + + _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first, + __last); + if (__buf.begin() == 0) + std::__inplace_stable_sort(__first, __last, __comp); + else + std::__stable_sort_adaptive(__first, __last, __buf.begin(), + _DistanceType(__buf.size()), __comp); + } +# 5485 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + set_union(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + + + + + ; + ; + + while (__first1 != __last1 && __first2 != __last2) + { + if (*__first1 < *__first2) + { + *__result = *__first1; + ++__first1; + } + else if (*__first2 < *__first1) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + ++__first2; + } + ++__result; + } + return std::copy(__first2, __last2, std::copy(__first1, __last1, + __result)); + } +# 5552 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + set_union(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + + + + + + + ; + ; + + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(*__first1, *__first2)) + { + *__result = *__first1; + ++__first1; + } + else if (__comp(*__first2, *__first1)) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + ++__first2; + } + ++__result; + } + return std::copy(__first2, __last2, std::copy(__first1, __last1, + __result)); + } +# 5619 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + + + ; + ; + + while (__first1 != __last1 && __first2 != __last2) + if (*__first1 < *__first2) + ++__first1; + else if (*__first2 < *__first1) + ++__first2; + else + { + *__result = *__first1; + ++__first1; + ++__first2; + ++__result; + } + return __result; + } +# 5676 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + + + + + ; + ; + + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first1, *__first2)) + ++__first1; + else if (__comp(*__first2, *__first1)) + ++__first2; + else + { + *__result = *__first1; + ++__first1; + ++__first2; + ++__result; + } + return __result; + } +# 5734 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + set_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + + + ; + ; + + while (__first1 != __last1 && __first2 != __last2) + if (*__first1 < *__first2) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (*__first2 < *__first1) + ++__first2; + else + { + ++__first1; + ++__first2; + } + return std::copy(__first1, __last1, __result); + } +# 5795 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + set_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + + + + + ; + ; + + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first1, *__first2)) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (__comp(*__first2, *__first1)) + ++__first2; + else + { + ++__first1; + ++__first2; + } + return std::copy(__first1, __last1, __result); + } +# 5853 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + + + + + ; + ; + + while (__first1 != __last1 && __first2 != __last2) + if (*__first1 < *__first2) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (*__first2 < *__first1) + { + *__result = *__first2; + ++__first2; + ++__result; + } + else + { + ++__first1; + ++__first2; + } + return std::copy(__first2, __last2, std::copy(__first1, + __last1, __result)); + } +# 5919 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, + _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + + + + + + + ; + ; + + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first1, *__first2)) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (__comp(*__first2, *__first1)) + { + *__result = *__first2; + ++__first2; + ++__result; + } + else + { + ++__first1; + ++__first2; + } + return std::copy(__first2, __last2, + std::copy(__first1, __last1, __result)); + } +# 5976 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + min_element(_ForwardIterator __first, _ForwardIterator __last) + { + + + + + ; + + if (__first == __last) + return __first; + _ForwardIterator __result = __first; + while (++__first != __last) + if (*__first < *__result) + __result = __first; + return __result; + } +# 6004 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + min_element(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + + + + + + ; + + if (__first == __last) + return __first; + _ForwardIterator __result = __first; + while (++__first != __last) + if (__comp(*__first, *__result)) + __result = __first; + return __result; + } +# 6032 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + max_element(_ForwardIterator __first, _ForwardIterator __last) + { + + + + + ; + + if (__first == __last) + return __first; + _ForwardIterator __result = __first; + while (++__first != __last) + if (*__result < *__first) + __result = __first; + return __result; + } +# 6060 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + max_element(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + + + + + + ; + + if (__first == __last) return __first; + _ForwardIterator __result = __first; + while (++__first != __last) + if (__comp(*__result, *__first)) + __result = __first; + return __result; + } + +} +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/algorithm" 2 3 +# 14 "/usr/include/boost-1_42/boost/function/detail/prologue.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/config/no_tr1/functional.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/config/no_tr1/functional.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/functional" 1 3 +# 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/functional" 3 + +# 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/functional" 3 +# 22 "/usr/include/boost-1_42/boost/config/no_tr1/functional.hpp" 2 +# 15 "/usr/include/boost-1_42/boost/function/detail/prologue.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/throw_exception.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/throw_exception.hpp" +# 1 "/usr/include/boost-1_42/boost/exception/detail/attribute_noreturn.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/throw_exception.hpp" 2 +# 37 "/usr/include/boost-1_42/boost/throw_exception.hpp" +# 1 "/usr/include/boost-1_42/boost/exception/exception.hpp" 1 +# 9 "/usr/include/boost-1_42/boost/exception/exception.hpp" + +# 10 "/usr/include/boost-1_42/boost/exception/exception.hpp" 3 + + + + + +namespace +boost + { + namespace + exception_detail + { + template + class + refcount_ptr + { + public: + + refcount_ptr(): + px_(0) + { + } + + ~refcount_ptr() + { + release(); + } + + refcount_ptr( refcount_ptr const & x ): + px_(x.px_) + { + add_ref(); + } + + refcount_ptr & + operator=( refcount_ptr const & x ) + { + adopt(x.px_); + return *this; + } + + void + adopt( T * px ) + { + release(); + px_=px; + add_ref(); + } + + T * + get() const + { + return px_; + } + + private: + + T * px_; + + void + add_ref() + { + if( px_ ) + px_->add_ref(); + } + + void + release() + { + if( px_ ) + px_->release(); + } + }; + } + + + + template + class error_info; + + typedef error_info throw_function; + typedef error_info throw_file; + typedef error_info throw_line; + + template <> + class + error_info + { + public: + typedef char const * value_type; + value_type v_; + explicit + error_info( value_type v ): + v_(v) + { + } + }; + + template <> + class + error_info + { + public: + typedef char const * value_type; + value_type v_; + explicit + error_info( value_type v ): + v_(v) + { + } + }; + + template <> + class + error_info + { + public: + typedef int value_type; + value_type v_; + explicit + error_info( value_type v ): + v_(v) + { + } + }; + + template + E const & operator<<( E const &, error_info const & ); + + template + E const & operator<<( E const &, throw_function const & ); + + template + E const & operator<<( E const &, throw_file const & ); + + template + E const & operator<<( E const &, throw_line const & ); + + class exception; + + template + class shared_ptr; + + namespace + exception_detail + { + class error_info_base; + struct type_info_; + + struct + error_info_container + { + virtual char const * diagnostic_information( char const * ) const = 0; + virtual shared_ptr get( type_info_ const & ) const = 0; + virtual void set( shared_ptr const &, type_info_ const & ) = 0; + virtual void add_ref() const = 0; + virtual void release() const = 0; + + protected: + + ~error_info_container() throw() + { + } + }; + + template + struct get_info; + + template <> + struct get_info; + + template <> + struct get_info; + + template <> + struct get_info; + + char const * get_diagnostic_information( exception const &, char const * ); + } + + class + exception + { + protected: + + exception(): + throw_function_(0), + throw_file_(0), + throw_line_(-1) + { + } +# 213 "/usr/include/boost-1_42/boost/exception/exception.hpp" 3 + virtual ~exception() throw() + + = 0 + + ; + + + + + private: + + template + friend E const & operator<<( E const &, throw_function const & ); + + template + friend E const & operator<<( E const &, throw_file const & ); + + template + friend E const & operator<<( E const &, throw_line const & ); + + friend char const * exception_detail::get_diagnostic_information( exception const &, char const * ); + + template + friend E const & operator<<( E const &, error_info const & ); + + template + friend struct exception_detail::get_info; + friend struct exception_detail::get_info; + friend struct exception_detail::get_info; + friend struct exception_detail::get_info; + + mutable exception_detail::refcount_ptr data_; + mutable char const * throw_function_; + mutable char const * throw_file_; + mutable int throw_line_; + }; + + inline + exception:: + ~exception() throw() + { + } + + template + E const & + operator<<( E const & x, throw_function const & y ) + { + x.throw_function_=y.v_; + return x; + } + + template + E const & + operator<<( E const & x, throw_file const & y ) + { + x.throw_file_=y.v_; + return x; + } + + template + E const & + operator<<( E const & x, throw_line const & y ) + { + x.throw_line_=y.v_; + return x; + } + + + + namespace + exception_detail + { + template + struct + error_info_injector: + public T, + public exception + { + explicit + error_info_injector( T const & x ): + T(x) + { + } + + ~error_info_injector() throw() + { + } + }; + + struct large_size { char c[256]; }; + large_size dispatch( exception * ); + + struct small_size { }; + small_size dispatch( void * ); + + template + struct enable_error_info_helper; + + template + struct + enable_error_info_helper + { + typedef T type; + }; + + template + struct + enable_error_info_helper + { + typedef error_info_injector type; + }; + + template + struct + enable_error_info_return_type + { + typedef typename enable_error_info_helper::type type; + }; + } + + template + inline + typename + exception_detail::enable_error_info_return_type::type + enable_error_info( T const & x ) + { + typedef typename exception_detail::enable_error_info_return_type::type rt; + return rt(x); + } + + + + namespace + exception_detail + { + class + clone_base + { + public: + + virtual clone_base const * clone() const = 0; + virtual void rethrow() const = 0; + + virtual + ~clone_base() throw() + { + } + }; + + inline + void + copy_boost_exception( exception * a, exception const * b ) + { + *a = *b; + } + + inline + void + copy_boost_exception( void *, void const * ) + { + } + + template + class + clone_impl: + public T, + public clone_base + { + public: + + explicit + clone_impl( T const & x ): + T(x) + { + copy_boost_exception(this,&x); + } + + ~clone_impl() throw() + { + } + + private: + + clone_base const * + clone() const + { + return new clone_impl(*this); + } + + void + rethrow() const + { + throw*this; + } + }; + } + + template + inline + exception_detail::clone_impl + enable_current_exception( T const & x ) + { + return exception_detail::clone_impl(x); + } + } +# 38 "/usr/include/boost-1_42/boost/throw_exception.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/current_function.hpp" 1 +# 22 "/usr/include/boost-1_42/boost/current_function.hpp" +namespace boost +{ + +namespace detail +{ + +inline void current_function_helper() +{ +# 61 "/usr/include/boost-1_42/boost/current_function.hpp" +} + +} + +} +# 39 "/usr/include/boost-1_42/boost/throw_exception.hpp" 2 +# 47 "/usr/include/boost-1_42/boost/throw_exception.hpp" +namespace boost +{ + + + + + + + +inline void throw_exception_assert_compatibility( std::exception const & ) { } + +template __attribute__((noreturn)) inline void throw_exception( E const & e ) +{ + + + throw_exception_assert_compatibility(e); + + + throw enable_current_exception(enable_error_info(e)); + + + +} + + + +} +# 16 "/usr/include/boost-1_42/boost/function/detail/prologue.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/function/function_base.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/function/function_base.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/stdexcept" 1 3 +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/stdexcept" 3 + +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/stdexcept" 3 + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 53 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/stdexcept" 3 + class logic_error : public exception + { + string _M_msg; + + public: + + explicit + logic_error(const string& __arg); + + virtual + ~logic_error() throw(); + + + + virtual const char* + what() const throw(); + }; + + + + class domain_error : public logic_error + { + public: + explicit domain_error(const string& __arg); + }; + + + class invalid_argument : public logic_error + { + public: + explicit invalid_argument(const string& __arg); + }; + + + + class length_error : public logic_error + { + public: + explicit length_error(const string& __arg); + }; + + + + class out_of_range : public logic_error + { + public: + explicit out_of_range(const string& __arg); + }; + + + + + + + class runtime_error : public exception + { + string _M_msg; + + public: + + explicit + runtime_error(const string& __arg); + + virtual + ~runtime_error() throw(); + + + + virtual const char* + what() const throw(); + }; + + + class range_error : public runtime_error + { + public: + explicit range_error(const string& __arg); + }; + + + class overflow_error : public runtime_error + { + public: + explicit overflow_error(const string& __arg); + }; + + + class underflow_error : public runtime_error + { + public: + explicit underflow_error(const string& __arg); + }; + + + +} +# 15 "/usr/include/boost-1_42/boost/function/function_base.hpp" 2 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/memory" 1 3 +# 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/memory" 3 + +# 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/memory" 3 +# 68 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/memory" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_raw_storage_iter.h" 1 3 +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_raw_storage_iter.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + + + + + template + class raw_storage_iterator + : public iterator + { + protected: + _OutputIterator _M_iter; + + public: + explicit + raw_storage_iterator(_OutputIterator __x) + : _M_iter(__x) {} + + raw_storage_iterator& + operator*() { return *this; } + + raw_storage_iterator& + operator=(const _Tp& __element) + { + std::_Construct(&*_M_iter, __element); + return *this; + } + + raw_storage_iterator<_OutputIterator, _Tp>& + operator++() + { + ++_M_iter; + return *this; + } + + raw_storage_iterator<_OutputIterator, _Tp> + operator++(int) + { + raw_storage_iterator<_OutputIterator, _Tp> __tmp = *this; + ++_M_iter; + return __tmp; + } + }; + +} +# 69 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/memory" 2 3 +# 103 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/memory" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/backward/auto_ptr.h" 1 3 +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/backward/auto_ptr.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/backward/auto_ptr.h" 3 + template + struct auto_ptr_ref + { + _Tp1* _M_ptr; + + explicit + auto_ptr_ref(_Tp1* __p): _M_ptr(__p) { } + } ; +# 84 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/backward/auto_ptr.h" 3 + template + class auto_ptr + { + private: + _Tp* _M_ptr; + + public: + + typedef _Tp element_type; + + + + + + + + explicit + auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { } +# 110 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/backward/auto_ptr.h" 3 + auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) { } +# 122 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/backward/auto_ptr.h" 3 + template + auto_ptr(auto_ptr<_Tp1>& __a) throw() : _M_ptr(__a.release()) { } +# 133 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/backward/auto_ptr.h" 3 + auto_ptr& + operator=(auto_ptr& __a) throw() + { + reset(__a.release()); + return *this; + } +# 150 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/backward/auto_ptr.h" 3 + template + auto_ptr& + operator=(auto_ptr<_Tp1>& __a) throw() + { + reset(__a.release()); + return *this; + } +# 168 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/backward/auto_ptr.h" 3 + ~auto_ptr() { delete _M_ptr; } +# 178 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/backward/auto_ptr.h" 3 + element_type& + operator*() const throw() + { + ; + return *_M_ptr; + } + + + + + + + + element_type* + operator->() const throw() + { + ; + return _M_ptr; + } +# 208 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/backward/auto_ptr.h" 3 + element_type* + get() const throw() { return _M_ptr; } +# 222 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/backward/auto_ptr.h" 3 + element_type* + release() throw() + { + element_type* __tmp = _M_ptr; + _M_ptr = 0; + return __tmp; + } +# 237 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/backward/auto_ptr.h" 3 + void + reset(element_type* __p = 0) throw() + { + if (__p != _M_ptr) + { + delete _M_ptr; + _M_ptr = __p; + } + } +# 258 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/backward/auto_ptr.h" 3 + auto_ptr(auto_ptr_ref __ref) throw() + : _M_ptr(__ref._M_ptr) { } + + auto_ptr& + operator=(auto_ptr_ref __ref) throw() + { + if (__ref._M_ptr != this->get()) + { + delete _M_ptr; + _M_ptr = __ref._M_ptr; + } + return *this; + } + + template + operator auto_ptr_ref<_Tp1>() throw() + { return auto_ptr_ref<_Tp1>(this->release()); } + + template + operator auto_ptr<_Tp1>() throw() + { return auto_ptr<_Tp1>(this->release()); } + } ; + + + + template<> + class auto_ptr + { + public: + typedef void element_type; + } ; + +} +# 104 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/memory" 2 3 +# 17 "/usr/include/boost-1_42/boost/function/function_base.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/detail/sp_typeinfo.hpp" 1 +# 103 "/usr/include/boost-1_42/boost/detail/sp_typeinfo.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/typeinfo" 1 3 +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/typeinfo" 3 + +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/typeinfo" 3 + + + +#pragma GCC visibility push(default) + +extern "C++" { + +namespace __cxxabiv1 +{ + class __class_type_info; +} +# 79 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/typeinfo" 3 +namespace std +{ + + + + + + + class type_info + { + public: + + + + + virtual ~type_info(); + + + + const char* name() const + { return __name[0] == '*' ? __name + 1 : __name; } +# 114 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/typeinfo" 3 + bool before(const type_info& __arg) const + { return (__name[0] == '*' && __arg.__name[0] == '*') + ? __name < __arg.__name + : __builtin_strcmp (__name, __arg.__name) < 0; } + + bool operator==(const type_info& __arg) const + { + return ((__name == __arg.__name) + || (__name[0] != '*' && + __builtin_strcmp (__name, __arg.__name) == 0)); + } +# 135 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/typeinfo" 3 + bool operator!=(const type_info& __arg) const + { return !operator==(__arg); } + + + virtual bool __is_pointer_p() const; + + + virtual bool __is_function_p() const; + + + + + + + + virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj, + unsigned __outer) const; + + + virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target, + void **__obj_ptr) const; + + protected: + const char *__name; + + explicit type_info(const char *__n): __name(__n) { } + + private: + + type_info& operator=(const type_info&); + type_info(const type_info&); + }; + + + + + + + + class bad_cast : public exception + { + public: + bad_cast() throw() { } + + + + virtual ~bad_cast() throw(); + + + virtual const char* what() const throw(); + }; + + + + + + class bad_typeid : public exception + { + public: + bad_typeid () throw() { } + + + + virtual ~bad_typeid() throw(); + + + virtual const char* what() const throw(); + }; +} + +#pragma GCC visibility pop + +} +# 104 "/usr/include/boost-1_42/boost/detail/sp_typeinfo.hpp" 2 + +namespace boost +{ + +namespace detail +{ + + + + + + + +typedef std::type_info sp_typeinfo; + + + +} + +} +# 20 "/usr/include/boost-1_42/boost/function/function_base.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/assert.hpp" 1 +# 36 "/usr/include/boost-1_42/boost/assert.hpp" +# 1 "/usr/include/assert.h" 1 3 4 +# 37 "/usr/include/boost-1_42/boost/assert.hpp" 2 +# 21 "/usr/include/boost-1_42/boost/function/function_base.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/integer.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/integer.hpp" +# 1 "/usr/include/boost-1_42/boost/integer_fwd.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/integer_fwd.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/climits" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/climits" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/climits" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include-fixed/limits.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/climits" 2 3 +# 13 "/usr/include/boost-1_42/boost/integer_fwd.hpp" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 14 "/usr/include/boost-1_42/boost/integer_fwd.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/limits.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/limits.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/limits" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/limits" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/limits" 3 +# 148 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/limits" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + + + + + + enum float_round_style + { + round_indeterminate = -1, + round_toward_zero = 0, + round_to_nearest = 1, + round_toward_infinity = 2, + round_toward_neg_infinity = 3 + }; + + + + + + + + enum float_denorm_style + { + + denorm_indeterminate = -1, + + denorm_absent = 0, + + denorm_present = 1 + }; +# 190 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/limits" 3 + struct __numeric_limits_base + { + + + static const bool is_specialized = false; + + + + + static const int digits = 0; + + static const int digits10 = 0; + + + + + + + static const bool is_signed = false; + + + static const bool is_integer = false; + + + + + static const bool is_exact = false; + + + static const int radix = 0; + + + + static const int min_exponent = 0; + + + static const int min_exponent10 = 0; + + + + static const int max_exponent = 0; + + + static const int max_exponent10 = 0; + + + static const bool has_infinity = false; + + + static const bool has_quiet_NaN = false; + + + static const bool has_signaling_NaN = false; + + static const float_denorm_style has_denorm = denorm_absent; + + + static const bool has_denorm_loss = false; + + + + static const bool is_iec559 = false; + + + + static const bool is_bounded = false; + + + + + static const bool is_modulo = false; + + + static const bool traps = false; + + static const bool tinyness_before = false; + + + + static const float_round_style round_style = round_toward_zero; + }; +# 283 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/limits" 3 + template + struct numeric_limits : public __numeric_limits_base + { + + + static _Tp min() throw() { return static_cast<_Tp>(0); } + + static _Tp max() throw() { return static_cast<_Tp>(0); } + + + + + + + + static _Tp epsilon() throw() { return static_cast<_Tp>(0); } + + static _Tp round_error() throw() { return static_cast<_Tp>(0); } + + static _Tp infinity() throw() { return static_cast<_Tp>(0); } + + + + static _Tp quiet_NaN() throw() { return static_cast<_Tp>(0); } + + + static _Tp signaling_NaN() throw() { return static_cast<_Tp>(0); } + + + + static _Tp denorm_min() throw() { return static_cast<_Tp>(0); } + }; +# 334 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/limits" 3 + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static bool min() throw() + { return false; } + static bool max() throw() + { return true; } + + + + + static const int digits = 1; + static const int digits10 = 0; + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static bool epsilon() throw() + { return false; } + static bool round_error() throw() + { return false; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static bool infinity() throw() + { return false; } + static bool quiet_NaN() throw() + { return false; } + static bool signaling_NaN() throw() + { return false; } + static bool denorm_min() throw() + { return false; } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = false; + + + + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static char min() throw() + { return (((char)(-1) < 0) ? (char)1 << (sizeof(char) * 8 - ((char)(-1) < 0)) : (char)0); } + static char max() throw() + { return (((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0); } + + + + + + static const int digits = (sizeof(char) * 8 - ((char)(-1) < 0)); + static const int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = ((char)(-1) < 0); + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static char epsilon() throw() + { return 0; } + static char round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static char infinity() throw() + { return char(); } + static char quiet_NaN() throw() + { return char(); } + static char signaling_NaN() throw() + { return char(); } + static char denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static signed char min() throw() + { return -127 - 1; } + static signed char max() throw() + { return 127; } + + + + + + static const int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0)); + static const int digits10 = ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static signed char epsilon() throw() + { return 0; } + static signed char round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static signed char infinity() throw() + { return static_cast(0); } + static signed char quiet_NaN() throw() + { return static_cast(0); } + static signed char signaling_NaN() throw() + { return static_cast(0); } + static signed char denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned char min() throw() + { return 0; } + static unsigned char max() throw() + { return 127 * 2U + 1; } + + + + + + static const int digits = (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned char epsilon() throw() + { return 0; } + static unsigned char round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned char infinity() throw() + { return static_cast(0); } + static unsigned char quiet_NaN() throw() + { return static_cast(0); } + static unsigned char signaling_NaN() throw() + { return static_cast(0); } + static unsigned char denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static wchar_t min() throw() + { return (((wchar_t)(-1) < 0) ? (wchar_t)1 << (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) : (wchar_t)0); } + static wchar_t max() throw() + { return (((wchar_t)(-1) < 0) ? (((((wchar_t)1 << ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(wchar_t)0); } + + + + + + static const int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)); + static const int digits10 = ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = ((wchar_t)(-1) < 0); + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static wchar_t epsilon() throw() + { return 0; } + static wchar_t round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static wchar_t infinity() throw() + { return wchar_t(); } + static wchar_t quiet_NaN() throw() + { return wchar_t(); } + static wchar_t signaling_NaN() throw() + { return wchar_t(); } + static wchar_t denorm_min() throw() + { return wchar_t(); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; +# 744 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/limits" 3 + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static short min() throw() + { return -32767 - 1; } + static short max() throw() + { return 32767; } + + + + + + static const int digits = (sizeof(short) * 8 - ((short)(-1) < 0)); + static const int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static short epsilon() throw() + { return 0; } + static short round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static short infinity() throw() + { return short(); } + static short quiet_NaN() throw() + { return short(); } + static short signaling_NaN() throw() + { return short(); } + static short denorm_min() throw() + { return short(); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned short min() throw() + { return 0; } + static unsigned short max() throw() + { return 32767 * 2U + 1; } + + + + + + static const int digits = (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned short epsilon() throw() + { return 0; } + static unsigned short round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned short infinity() throw() + { return static_cast(0); } + static unsigned short quiet_NaN() throw() + { return static_cast(0); } + static unsigned short signaling_NaN() throw() + { return static_cast(0); } + static unsigned short denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static int min() throw() + { return -2147483647 - 1; } + static int max() throw() + { return 2147483647; } + + + + + + static const int digits = (sizeof(int) * 8 - ((int)(-1) < 0)); + static const int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static int epsilon() throw() + { return 0; } + static int round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static int infinity() throw() + { return static_cast(0); } + static int quiet_NaN() throw() + { return static_cast(0); } + static int signaling_NaN() throw() + { return static_cast(0); } + static int denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned int min() throw() + { return 0; } + static unsigned int max() throw() + { return 2147483647 * 2U + 1; } + + + + + + static const int digits = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned int epsilon() throw() + { return 0; } + static unsigned int round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned int infinity() throw() + { return static_cast(0); } + static unsigned int quiet_NaN() throw() + { return static_cast(0); } + static unsigned int signaling_NaN() throw() + { return static_cast(0); } + static unsigned int denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static long min() throw() + { return -9223372036854775807L - 1; } + static long max() throw() + { return 9223372036854775807L; } + + + + + + static const int digits = (sizeof(long) * 8 - ((long)(-1) < 0)); + static const int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static long epsilon() throw() + { return 0; } + static long round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static long infinity() throw() + { return static_cast(0); } + static long quiet_NaN() throw() + { return static_cast(0); } + static long signaling_NaN() throw() + { return static_cast(0); } + static long denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned long min() throw() + { return 0; } + static unsigned long max() throw() + { return 9223372036854775807L * 2UL + 1; } + + + + + + static const int digits = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned long epsilon() throw() + { return 0; } + static unsigned long round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned long infinity() throw() + { return static_cast(0); } + static unsigned long quiet_NaN() throw() + { return static_cast(0); } + static unsigned long signaling_NaN() throw() + { return static_cast(0); } + static unsigned long denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static long long min() throw() + { return -9223372036854775807LL - 1; } + static long long max() throw() + { return 9223372036854775807LL; } + + + + + + static const int digits = (sizeof(long long) * 8 - ((long long)(-1) < 0)); + static const int digits10 = ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static long long epsilon() throw() + { return 0; } + static long long round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static long long infinity() throw() + { return static_cast(0); } + static long long quiet_NaN() throw() + { return static_cast(0); } + static long long signaling_NaN() throw() + { return static_cast(0); } + static long long denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned long long min() throw() + { return 0; } + static unsigned long long max() throw() + { return 9223372036854775807LL * 2ULL + 1; } + + + + + + static const int digits = (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned long long epsilon() throw() + { return 0; } + static unsigned long long round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned long long infinity() throw() + { return static_cast(0); } + static unsigned long long quiet_NaN() throw() + { return static_cast(0); } + static unsigned long long signaling_NaN() throw() + { return static_cast(0); } + static unsigned long long denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static float min() throw() + { return 1.17549435082228750797e-38F; } + static float max() throw() + { return 3.40282346638528859812e+38F; } + + + + + + static const int digits = 24; + static const int digits10 = 6; + + + + + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 2; + static float epsilon() throw() + { return 1.19209289550781250000e-7F; } + static float round_error() throw() + { return 0.5F; } + + static const int min_exponent = (-125); + static const int min_exponent10 = (-37); + static const int max_exponent = 128; + static const int max_exponent10 = 38; + + static const bool has_infinity = 1; + static const bool has_quiet_NaN = 1; + static const bool has_signaling_NaN = has_quiet_NaN; + static const float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static const bool has_denorm_loss = false; + + static float infinity() throw() + { return __builtin_huge_valf (); } + static float quiet_NaN() throw() + { return __builtin_nanf (""); } + static float signaling_NaN() throw() + { return __builtin_nansf (""); } + static float denorm_min() throw() + { return 1.40129846432481707092e-45F; } + + static const bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_to_nearest; + }; + + + + + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static double min() throw() + { return ((double)2.22507385850720138309e-308L); } + static double max() throw() + { return ((double)1.79769313486231570815e+308L); } + + + + + + static const int digits = 53; + static const int digits10 = 15; + + + + + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 2; + static double epsilon() throw() + { return ((double)2.22044604925031308085e-16L); } + static double round_error() throw() + { return 0.5; } + + static const int min_exponent = (-1021); + static const int min_exponent10 = (-307); + static const int max_exponent = 1024; + static const int max_exponent10 = 308; + + static const bool has_infinity = 1; + static const bool has_quiet_NaN = 1; + static const bool has_signaling_NaN = has_quiet_NaN; + static const float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static const bool has_denorm_loss = false; + + static double infinity() throw() + { return __builtin_huge_val(); } + static double quiet_NaN() throw() + { return __builtin_nan (""); } + static double signaling_NaN() throw() + { return __builtin_nans (""); } + static double denorm_min() throw() + { return ((double)4.94065645841246544177e-324L); } + + static const bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_to_nearest; + }; + + + + + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static long double min() throw() + { return 3.36210314311209350626e-4932L; } + static long double max() throw() + { return 1.18973149535723176502e+4932L; } + + + + + + static const int digits = 64; + static const int digits10 = 18; + + + + + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 2; + static long double epsilon() throw() + { return 1.08420217248550443401e-19L; } + static long double round_error() throw() + { return 0.5L; } + + static const int min_exponent = (-16381); + static const int min_exponent10 = (-4931); + static const int max_exponent = 16384; + static const int max_exponent10 = 4932; + + static const bool has_infinity = 1; + static const bool has_quiet_NaN = 1; + static const bool has_signaling_NaN = has_quiet_NaN; + static const float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static const bool has_denorm_loss + = false; + + static long double infinity() throw() + { return __builtin_huge_vall (); } + static long double quiet_NaN() throw() + { return __builtin_nanl (""); } + static long double signaling_NaN() throw() + { return __builtin_nansl (""); } + static long double denorm_min() throw() + { return 3.64519953188247460253e-4951L; } + + static const bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_to_nearest; + }; + + + + + +} +# 20 "/usr/include/boost-1_42/boost/limits.hpp" 2 +# 17 "/usr/include/boost-1_42/boost/integer_fwd.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/cstdint.hpp" 1 +# 100 "/usr/include/boost-1_42/boost/cstdint.hpp" +namespace boost +{ + + using ::int8_t; + using ::int_least8_t; + using ::int_fast8_t; + using ::uint8_t; + using ::uint_least8_t; + using ::uint_fast8_t; + + using ::int16_t; + using ::int_least16_t; + using ::int_fast16_t; + using ::uint16_t; + using ::uint_least16_t; + using ::uint_fast16_t; + + using ::int32_t; + using ::int_least32_t; + using ::int_fast32_t; + using ::uint32_t; + using ::uint_least32_t; + using ::uint_fast32_t; + + + + using ::int64_t; + using ::int_least64_t; + using ::int_fast64_t; + using ::uint64_t; + using ::uint_least64_t; + using ::uint_fast64_t; + + + + using ::intmax_t; + using ::uintmax_t; + +} +# 370 "/usr/include/boost-1_42/boost/cstdint.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include-fixed/limits.h" 1 3 4 +# 371 "/usr/include/boost-1_42/boost/cstdint.hpp" 2 +# 18 "/usr/include/boost-1_42/boost/integer_fwd.hpp" 2 + + +namespace boost +{ + + + + + + + + typedef boost::uintmax_t static_min_max_unsigned_type; + typedef boost::intmax_t static_min_max_signed_type; + typedef boost::uintmax_t static_log2_argument_type; + typedef int static_log2_result_type; +# 42 "/usr/include/boost-1_42/boost/integer_fwd.hpp" +template < class T > + class integer_traits; + +template < > + class integer_traits< bool >; + +template < > + class integer_traits< char >; + +template < > + class integer_traits< signed char >; + +template < > + class integer_traits< unsigned char >; + + +template < > + class integer_traits< wchar_t >; + + +template < > + class integer_traits< short >; + +template < > + class integer_traits< unsigned short >; + +template < > + class integer_traits< int >; + +template < > + class integer_traits< unsigned int >; + +template < > + class integer_traits< long >; + +template < > + class integer_traits< unsigned long >; + + +template < > + class integer_traits< ::boost::long_long_type>; + +template < > + class integer_traits< ::boost::ulong_long_type >; + + + + + +template < typename LeastInt > + struct int_fast_t; + +template< int Bits > + struct int_t; + +template< int Bits > + struct uint_t; + + + template< boost::long_long_type MaxValue > + + + + struct int_max_value_t; + + + template< boost::long_long_type MinValue > + + + + struct int_min_value_t; + + + template< boost::ulong_long_type MaxValue > + + + + struct uint_value_t; + + + + +template < std::size_t Bit > + struct high_bit_mask_t; + +template < std::size_t Bits > + struct low_bits_mask_t; + +template < > + struct low_bits_mask_t< ::std::numeric_limits::digits >; + + +template < > + struct low_bits_mask_t< ::std::numeric_limits::digits >; + + + +template < > + struct low_bits_mask_t< ::std::numeric_limits::digits >; + + + +template < > + struct low_bits_mask_t< ::std::numeric_limits::digits >; + + + + + +template + struct static_log2; + +template <> struct static_log2<0u>; + + + + +template + struct static_signed_min; + +template + struct static_signed_max; + +template + struct static_unsigned_min; + +template + struct static_unsigned_max; + +} +# 19 "/usr/include/boost-1_42/boost/integer.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/integer_traits.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/integer_traits.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include-fixed/limits.h" 1 3 4 +# 24 "/usr/include/boost-1_42/boost/integer_traits.hpp" 2 + + + +# 1 "/usr/include/wchar.h" 1 3 4 +# 28 "/usr/include/boost-1_42/boost/integer_traits.hpp" 2 +# 39 "/usr/include/boost-1_42/boost/integer_traits.hpp" + +# 40 "/usr/include/boost-1_42/boost/integer_traits.hpp" 3 + + +namespace boost { +template +class integer_traits : public std::numeric_limits +{ +public: + static const bool is_integral = false; +}; + +namespace detail { +template +class integer_traits_base +{ +public: + static const bool is_integral = true; + static const T const_min = min_val; + static const T const_max = max_val; +}; + + + +template +const bool integer_traits_base::is_integral; + +template +const T integer_traits_base::const_min; + +template +const T integer_traits_base::const_max; + + +} + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + + +template<> +class integer_traits + : public std::numeric_limits, + + + + public detail::integer_traits_base +# 130 "/usr/include/boost-1_42/boost/integer_traits.hpp" 3 +{ }; + + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + + + + +template<> +class integer_traits< ::boost::long_long_type> + : public std::numeric_limits< ::boost::long_long_type>, + public detail::integer_traits_base< ::boost::long_long_type, (-9223372036854775807LL -1), 9223372036854775807LL> +{ }; + +template<> +class integer_traits< ::boost::ulong_long_type> + : public std::numeric_limits< ::boost::ulong_long_type>, + public detail::integer_traits_base< ::boost::ulong_long_type, 0, (9223372036854775807LL * 2ULL + 1)> +{ }; +# 256 "/usr/include/boost-1_42/boost/integer_traits.hpp" 3 +} +# 21 "/usr/include/boost-1_42/boost/integer.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/cstdint.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/integer.hpp" 2 +# 33 "/usr/include/boost-1_42/boost/integer.hpp" + +# 34 "/usr/include/boost-1_42/boost/integer.hpp" 3 + + +namespace boost +{ + + + + + + template< typename LeastInt > + struct int_fast_t + { + typedef LeastInt fast; + typedef fast type; + }; + + namespace detail{ + + + template< int Category > struct int_least_helper {}; + + + + + + template<> struct int_least_helper<1> { typedef boost::long_long_type least; }; + + template<> struct int_least_helper<2> { typedef long least; }; + template<> struct int_least_helper<3> { typedef int least; }; + template<> struct int_least_helper<4> { typedef short least; }; + template<> struct int_least_helper<5> { typedef signed char least; }; + + template<> struct int_least_helper<6> { typedef boost::ulong_long_type least; }; + + template<> struct int_least_helper<7> { typedef unsigned long least; }; + template<> struct int_least_helper<8> { typedef unsigned int least; }; + template<> struct int_least_helper<9> { typedef unsigned short least; }; + template<> struct int_least_helper<10> { typedef unsigned char least; }; + + template + struct exact_signed_base_helper{}; + template + struct exact_unsigned_base_helper{}; + + template <> struct exact_signed_base_helper { typedef signed char exact; }; + template <> struct exact_unsigned_base_helper { typedef unsigned char exact; }; + + template <> struct exact_signed_base_helper { typedef short exact; }; + template <> struct exact_unsigned_base_helper { typedef unsigned short exact; }; + + + template <> struct exact_signed_base_helper { typedef int exact; }; + template <> struct exact_unsigned_base_helper { typedef unsigned int exact; }; + + + template <> struct exact_signed_base_helper { typedef long exact; }; + template <> struct exact_unsigned_base_helper { typedef unsigned long exact; }; +# 102 "/usr/include/boost-1_42/boost/integer.hpp" 3 + } + + + + + template< int Bits > + struct int_t : public detail::exact_signed_base_helper + { + typedef typename detail::int_least_helper + < + + (Bits-1 <= (int)(sizeof(boost::long_long_type) * 8)) + + + + + (Bits-1 <= ::std::numeric_limits::digits) + + (Bits-1 <= ::std::numeric_limits::digits) + + (Bits-1 <= ::std::numeric_limits::digits) + + (Bits-1 <= ::std::numeric_limits::digits) + >::least least; + typedef typename int_fast_t::type fast; + }; + + + template< int Bits > + struct uint_t : public detail::exact_unsigned_base_helper + { +# 139 "/usr/include/boost-1_42/boost/integer.hpp" 3 + typedef typename detail::int_least_helper + < + 5 + + + (Bits-1 <= (int)(sizeof(boost::long_long_type) * 8)) + + + + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + >::least least; + + typedef typename int_fast_t::type fast; + + }; + + + + + + template< boost::long_long_type MaxValue > + + + + struct int_max_value_t + { + typedef typename detail::int_least_helper + < + + (MaxValue <= ::boost::integer_traits::const_max) + + + + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + >::least least; + typedef typename int_fast_t::type fast; + }; + + + template< boost::long_long_type MinValue > + + + + struct int_min_value_t + { + typedef typename detail::int_least_helper + < + + (MinValue >= ::boost::integer_traits::const_min) + + + + + (MinValue >= ::boost::integer_traits::const_min) + + (MinValue >= ::boost::integer_traits::const_min) + + (MinValue >= ::boost::integer_traits::const_min) + + (MinValue >= ::boost::integer_traits::const_min) + >::least least; + typedef typename int_fast_t::type fast; + }; + + + + template< boost::ulong_long_type MaxValue > + + + + struct uint_value_t + { +# 233 "/usr/include/boost-1_42/boost/integer.hpp" 3 + typedef typename detail::int_least_helper + < + 5 + + + (MaxValue <= ::boost::integer_traits::const_max) + + + + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + >::least least; + + typedef typename int_fast_t::type fast; + }; + + +} +# 22 "/usr/include/boost-1_42/boost/function/function_base.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/has_trivial_copy.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/type_traits/has_trivial_copy.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/intrinsics.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/has_trivial_copy.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/type_traits/is_pod.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/type_traits/is_pod.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/is_void.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/is_void.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 16 "/usr/include/boost-1_42/boost/type_traits/is_void.hpp" 2 + +namespace boost { + + + + + +template< typename T > struct is_void : ::boost::integral_constant { }; +template<> struct is_void< void > : ::boost::integral_constant { }; + + +template<> struct is_void< void const > : ::boost::integral_constant { }; +template<> struct is_void< void volatile > : ::boost::integral_constant { }; +template<> struct is_void< void const volatile > : ::boost::integral_constant { }; + + + + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/type_traits/is_void.hpp" 2 +# 14 "/usr/include/boost-1_42/boost/type_traits/is_pod.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/is_scalar.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/type_traits/is_scalar.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/is_arithmetic.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/type_traits/is_arithmetic.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/is_integral.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/is_integral.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 16 "/usr/include/boost-1_42/boost/type_traits/is_integral.hpp" 2 + +namespace boost { + + + + + + + +template< typename T > struct is_integral : ::boost::integral_constant { }; + +template<> struct is_integral< unsigned char > : ::boost::integral_constant { }; template<> struct is_integral< unsigned char const > : ::boost::integral_constant { }; template<> struct is_integral< unsigned char volatile > : ::boost::integral_constant { }; template<> struct is_integral< unsigned char const volatile > : ::boost::integral_constant { }; +template<> struct is_integral< unsigned short > : ::boost::integral_constant { }; template<> struct is_integral< unsigned short const > : ::boost::integral_constant { }; template<> struct is_integral< unsigned short volatile > : ::boost::integral_constant { }; template<> struct is_integral< unsigned short const volatile > : ::boost::integral_constant { }; +template<> struct is_integral< unsigned int > : ::boost::integral_constant { }; template<> struct is_integral< unsigned int const > : ::boost::integral_constant { }; template<> struct is_integral< unsigned int volatile > : ::boost::integral_constant { }; template<> struct is_integral< unsigned int const volatile > : ::boost::integral_constant { }; +template<> struct is_integral< unsigned long > : ::boost::integral_constant { }; template<> struct is_integral< unsigned long const > : ::boost::integral_constant { }; template<> struct is_integral< unsigned long volatile > : ::boost::integral_constant { }; template<> struct is_integral< unsigned long const volatile > : ::boost::integral_constant { }; + +template<> struct is_integral< signed char > : ::boost::integral_constant { }; template<> struct is_integral< signed char const > : ::boost::integral_constant { }; template<> struct is_integral< signed char volatile > : ::boost::integral_constant { }; template<> struct is_integral< signed char const volatile > : ::boost::integral_constant { }; +template<> struct is_integral< signed short > : ::boost::integral_constant { }; template<> struct is_integral< signed short const > : ::boost::integral_constant { }; template<> struct is_integral< signed short volatile > : ::boost::integral_constant { }; template<> struct is_integral< signed short const volatile > : ::boost::integral_constant { }; +template<> struct is_integral< signed int > : ::boost::integral_constant { }; template<> struct is_integral< signed int const > : ::boost::integral_constant { }; template<> struct is_integral< signed int volatile > : ::boost::integral_constant { }; template<> struct is_integral< signed int const volatile > : ::boost::integral_constant { }; +template<> struct is_integral< signed long > : ::boost::integral_constant { }; template<> struct is_integral< signed long const > : ::boost::integral_constant { }; template<> struct is_integral< signed long volatile > : ::boost::integral_constant { }; template<> struct is_integral< signed long const volatile > : ::boost::integral_constant { }; + +template<> struct is_integral< bool > : ::boost::integral_constant { }; template<> struct is_integral< bool const > : ::boost::integral_constant { }; template<> struct is_integral< bool volatile > : ::boost::integral_constant { }; template<> struct is_integral< bool const volatile > : ::boost::integral_constant { }; +template<> struct is_integral< char > : ::boost::integral_constant { }; template<> struct is_integral< char const > : ::boost::integral_constant { }; template<> struct is_integral< char volatile > : ::boost::integral_constant { }; template<> struct is_integral< char const volatile > : ::boost::integral_constant { }; + + + + + +template<> struct is_integral< wchar_t > : ::boost::integral_constant { }; template<> struct is_integral< wchar_t const > : ::boost::integral_constant { }; template<> struct is_integral< wchar_t volatile > : ::boost::integral_constant { }; template<> struct is_integral< wchar_t const volatile > : ::boost::integral_constant { }; +# 65 "/usr/include/boost-1_42/boost/type_traits/is_integral.hpp" +template<> struct is_integral< ::boost::ulong_long_type > : ::boost::integral_constant { }; template<> struct is_integral< ::boost::ulong_long_type const > : ::boost::integral_constant { }; template<> struct is_integral< ::boost::ulong_long_type volatile > : ::boost::integral_constant { }; template<> struct is_integral< ::boost::ulong_long_type const volatile > : ::boost::integral_constant { }; +template<> struct is_integral< ::boost::long_long_type > : ::boost::integral_constant { }; template<> struct is_integral< ::boost::long_long_type const > : ::boost::integral_constant { }; template<> struct is_integral< ::boost::long_long_type volatile > : ::boost::integral_constant { }; template<> struct is_integral< ::boost::long_long_type const volatile > : ::boost::integral_constant { }; + + + + + + + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 77 "/usr/include/boost-1_42/boost/type_traits/is_integral.hpp" 2 +# 14 "/usr/include/boost-1_42/boost/type_traits/is_arithmetic.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/is_float.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/type_traits/is_float.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 14 "/usr/include/boost-1_42/boost/type_traits/is_float.hpp" 2 + +namespace boost { + + +template< typename T > struct is_float : ::boost::integral_constant { }; +template<> struct is_float< float > : ::boost::integral_constant { }; template<> struct is_float< float const > : ::boost::integral_constant { }; template<> struct is_float< float volatile > : ::boost::integral_constant { }; template<> struct is_float< float const volatile > : ::boost::integral_constant { }; +template<> struct is_float< double > : ::boost::integral_constant { }; template<> struct is_float< double const > : ::boost::integral_constant { }; template<> struct is_float< double volatile > : ::boost::integral_constant { }; template<> struct is_float< double const volatile > : ::boost::integral_constant { }; +template<> struct is_float< long double > : ::boost::integral_constant { }; template<> struct is_float< long double const > : ::boost::integral_constant { }; template<> struct is_float< long double volatile > : ::boost::integral_constant { }; template<> struct is_float< long double const volatile > : ::boost::integral_constant { }; + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 26 "/usr/include/boost-1_42/boost/type_traits/is_float.hpp" 2 +# 15 "/usr/include/boost-1_42/boost/type_traits/is_arithmetic.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/ice_or.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/type_traits/detail/ice_or.hpp" +namespace boost { +namespace type_traits { + +template +struct ice_or; + +template +struct ice_or +{ + static const bool value = true; +}; + +template <> +struct ice_or +{ + static const bool value = false; +}; + +} +} +# 16 "/usr/include/boost-1_42/boost/type_traits/is_arithmetic.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 21 "/usr/include/boost-1_42/boost/type_traits/is_arithmetic.hpp" 2 + +namespace boost { + + +namespace detail { + +template< typename T > +struct is_arithmetic_impl +{ + static const bool value = (::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_float::value >::value) + + + + ; +}; + +} + + + + + + +template< typename T > struct is_arithmetic : ::boost::integral_constant::value> { }; + + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 50 "/usr/include/boost-1_42/boost/type_traits/is_arithmetic.hpp" 2 +# 13 "/usr/include/boost-1_42/boost/type_traits/is_scalar.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/is_enum.hpp" 1 +# 32 "/usr/include/boost-1_42/boost/type_traits/is_enum.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 33 "/usr/include/boost-1_42/boost/type_traits/is_enum.hpp" 2 + +namespace boost { +# 181 "/usr/include/boost-1_42/boost/type_traits/is_enum.hpp" +template< typename T > struct is_enum : ::boost::integral_constant { }; + + + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 188 "/usr/include/boost-1_42/boost/type_traits/is_enum.hpp" 2 +# 14 "/usr/include/boost-1_42/boost/type_traits/is_scalar.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/is_pointer.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/type_traits/is_pointer.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/is_member_pointer.hpp" 1 +# 28 "/usr/include/boost-1_42/boost/type_traits/is_member_pointer.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/is_member_function_pointer.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/type_traits/is_member_function_pointer.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp" 1 +# 25 "/usr/include/boost-1_42/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp" +namespace boost { +namespace type_traits { + +template +struct is_mem_fun_pointer_impl +{ + static const bool value = false; +}; + + + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +# 776 "/usr/include/boost-1_42/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp" +} +} +# 25 "/usr/include/boost-1_42/boost/type_traits/is_member_function_pointer.hpp" 2 +# 36 "/usr/include/boost-1_42/boost/type_traits/is_member_function_pointer.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 37 "/usr/include/boost-1_42/boost/type_traits/is_member_function_pointer.hpp" 2 + +namespace boost { + + + + + +template< typename T > struct is_member_function_pointer : ::boost::integral_constant::type>::value> { }; +# 132 "/usr/include/boost-1_42/boost/type_traits/is_member_function_pointer.hpp" +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 135 "/usr/include/boost-1_42/boost/type_traits/is_member_function_pointer.hpp" 2 +# 29 "/usr/include/boost-1_42/boost/type_traits/is_member_pointer.hpp" 2 +# 39 "/usr/include/boost-1_42/boost/type_traits/is_member_pointer.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 40 "/usr/include/boost-1_42/boost/type_traits/is_member_pointer.hpp" 2 + +namespace boost { +# 50 "/usr/include/boost-1_42/boost/type_traits/is_member_pointer.hpp" +template< typename T > struct is_member_pointer : ::boost::integral_constant::value> { }; +template< typename T, typename U > struct is_member_pointer< U T::* > : ::boost::integral_constant { }; + + +template< typename T, typename U > struct is_member_pointer< U T::*const > : ::boost::integral_constant { }; +template< typename T, typename U > struct is_member_pointer< U T::*volatile > : ::boost::integral_constant { }; +template< typename T, typename U > struct is_member_pointer< U T::*const volatile > : ::boost::integral_constant { }; +# 112 "/usr/include/boost-1_42/boost/type_traits/is_member_pointer.hpp" +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 115 "/usr/include/boost-1_42/boost/type_traits/is_member_pointer.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/type_traits/is_pointer.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/ice_and.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/ice_and.hpp" +namespace boost { +namespace type_traits { + +template +struct ice_and; + +template +struct ice_and +{ + static const bool value = false; +}; + +template <> +struct ice_and +{ + static const bool value = true; +}; + +} +} +# 26 "/usr/include/boost-1_42/boost/type_traits/is_pointer.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/ice_not.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/type_traits/detail/ice_not.hpp" +namespace boost { +namespace type_traits { + +template +struct ice_not +{ + static const bool value = true; +}; + +template <> +struct ice_not +{ + static const bool value = false; +}; + +} +} +# 27 "/usr/include/boost-1_42/boost/type_traits/is_pointer.hpp" 2 +# 41 "/usr/include/boost-1_42/boost/type_traits/is_pointer.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 42 "/usr/include/boost-1_42/boost/type_traits/is_pointer.hpp" 2 + +namespace boost { + + + + + +namespace detail { + +template< typename T > struct is_pointer_helper +{ + static const bool value = false; +}; +# 63 "/usr/include/boost-1_42/boost/type_traits/is_pointer.hpp" +template< typename T > struct is_pointer_helper { static const bool value = true; }; + + + +template< typename T > +struct is_pointer_impl +{ +# 80 "/usr/include/boost-1_42/boost/type_traits/is_pointer.hpp" + static const bool value = (::boost::type_traits::ice_and< ::boost::detail::is_pointer_helper::type>::value , ::boost::type_traits::ice_not< ::boost::is_member_pointer::value >::value >::value) + + + + + + + ; + +}; + +} + +template< typename T > struct is_pointer : ::boost::integral_constant::value> { }; +# 158 "/usr/include/boost-1_42/boost/type_traits/is_pointer.hpp" +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 161 "/usr/include/boost-1_42/boost/type_traits/is_pointer.hpp" 2 +# 15 "/usr/include/boost-1_42/boost/type_traits/is_scalar.hpp" 2 + + + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 21 "/usr/include/boost-1_42/boost/type_traits/is_scalar.hpp" 2 + +namespace boost { + +namespace detail { + +template +struct is_scalar_impl +{ + static const bool value = (::boost::type_traits::ice_or< ::boost::is_arithmetic::value, ::boost::is_enum::value, ::boost::is_pointer::value, ::boost::is_member_pointer::value >::value) + + + + + + ; +}; + + + +template <> struct is_scalar_impl{ static const bool value = false; }; + +template <> struct is_scalar_impl{ static const bool value = false; }; +template <> struct is_scalar_impl{ static const bool value = false; }; +template <> struct is_scalar_impl{ static const bool value = false; }; + + +} + +template< typename T > struct is_scalar : ::boost::integral_constant::value> { }; + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 54 "/usr/include/boost-1_42/boost/type_traits/is_scalar.hpp" 2 +# 15 "/usr/include/boost-1_42/boost/type_traits/is_pod.hpp" 2 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 19 "/usr/include/boost-1_42/boost/type_traits/is_pod.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 22 "/usr/include/boost-1_42/boost/type_traits/is_pod.hpp" 2 + +namespace boost { + + +template< typename T > struct is_POD; + +namespace detail { + + + +template struct is_pod_impl +{ + static const bool value = (::boost::type_traits::ice_or< ::boost::is_scalar::value, ::boost::is_void::value, __is_pod(T) >::value) + + + + + + ; +}; + + +template +struct is_pod_impl + : is_pod_impl +{ +}; +# 118 "/usr/include/boost-1_42/boost/type_traits/is_pod.hpp" +template<> struct is_pod_impl< void > { static const bool value = (true); }; + + +template<> struct is_pod_impl< void const > { static const bool value = (true); }; +template<> struct is_pod_impl< void volatile > { static const bool value = (true); }; +template<> struct is_pod_impl< void const volatile > { static const bool value = (true); }; + + +} + +template< typename T > struct is_POD : ::boost::integral_constant::value> { }; +template< typename T > struct is_pod : ::boost::integral_constant::value> { }; + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 134 "/usr/include/boost-1_42/boost/type_traits/is_pod.hpp" 2 +# 16 "/usr/include/boost-1_42/boost/type_traits/has_trivial_copy.hpp" 2 + + + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 22 "/usr/include/boost-1_42/boost/type_traits/has_trivial_copy.hpp" 2 + +namespace boost { + +namespace detail { + +template +struct has_trivial_copy_impl +{ + static const bool value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::is_pod::value, (__has_trivial_copy(T) && !is_reference::value) >::value, ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value >::value) + + + + + + + ; +}; + +} + +template< typename T > struct has_trivial_copy : ::boost::integral_constant::value> { }; +template< typename T > struct has_trivial_copy_constructor : ::boost::integral_constant::value> { }; + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 48 "/usr/include/boost-1_42/boost/type_traits/has_trivial_copy.hpp" 2 +# 23 "/usr/include/boost-1_42/boost/function/function_base.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/has_trivial_destructor.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/type_traits/has_trivial_destructor.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 19 "/usr/include/boost-1_42/boost/type_traits/has_trivial_destructor.hpp" 2 + +namespace boost { + +namespace detail { + +template +struct has_trivial_dtor_impl +{ + static const bool value = (::boost::type_traits::ice_or< ::boost::is_pod::value, __has_trivial_destructor(T) >::value) + + + + ; +}; + +} + +template< typename T > struct has_trivial_destructor : ::boost::integral_constant::value> { }; + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 41 "/usr/include/boost-1_42/boost/type_traits/has_trivial_destructor.hpp" 2 +# 24 "/usr/include/boost-1_42/boost/function/function_base.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/composite_traits.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/type_traits/composite_traits.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/is_array.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/type_traits/is_array.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 25 "/usr/include/boost-1_42/boost/type_traits/is_array.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 28 "/usr/include/boost-1_42/boost/type_traits/is_array.hpp" 2 + +namespace boost { + + + + +template< typename T > struct is_array : ::boost::integral_constant { }; + +template< typename T, std::size_t N > struct is_array< T[N] > : ::boost::integral_constant { }; +template< typename T, std::size_t N > struct is_array< T const[N] > : ::boost::integral_constant { }; +template< typename T, std::size_t N > struct is_array< T volatile[N] > : ::boost::integral_constant { }; +template< typename T, std::size_t N > struct is_array< T const volatile[N] > : ::boost::integral_constant { }; + +template< typename T > struct is_array< T[] > : ::boost::integral_constant { }; +template< typename T > struct is_array< T const[] > : ::boost::integral_constant { }; +template< typename T > struct is_array< T volatile[] > : ::boost::integral_constant { }; +template< typename T > struct is_array< T const volatile[] > : ::boost::integral_constant { }; +# 87 "/usr/include/boost-1_42/boost/type_traits/is_array.hpp" +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 90 "/usr/include/boost-1_42/boost/type_traits/is_array.hpp" 2 +# 17 "/usr/include/boost-1_42/boost/type_traits/composite_traits.hpp" 2 + + + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/is_union.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/type_traits/is_union.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 20 "/usr/include/boost-1_42/boost/type_traits/is_union.hpp" 2 + +namespace boost { + +namespace detail { +# 36 "/usr/include/boost-1_42/boost/type_traits/is_union.hpp" +template struct is_union_impl +{ + static const bool value = __is_union(T); +}; + +} + +template< typename T > struct is_union : ::boost::integral_constant::value> { }; + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 48 "/usr/include/boost-1_42/boost/type_traits/is_union.hpp" 2 +# 23 "/usr/include/boost-1_42/boost/type_traits/composite_traits.hpp" 2 +# 28 "/usr/include/boost-1_42/boost/function/function_base.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/ice.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/ice.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/yes_no_type.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/yes_no_type.hpp" +namespace boost { +namespace type_traits { + +typedef char yes_type; +struct no_type +{ + char padding[8]; +}; + +} +} +# 15 "/usr/include/boost-1_42/boost/type_traits/ice.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/ice_eq.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/type_traits/detail/ice_eq.hpp" +namespace boost { +namespace type_traits { + +template +struct ice_eq +{ + static const bool value = (b1 == b2); +}; + +template +struct ice_ne +{ + static const bool value = (b1 != b2); +}; + + +template bool const ice_eq::value; +template bool const ice_ne::value; + + +} +} +# 19 "/usr/include/boost-1_42/boost/type_traits/ice.hpp" 2 +# 29 "/usr/include/boost-1_42/boost/function/function_base.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/ref.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/ref.hpp" +# 1 "/usr/include/boost-1_42/boost/utility/addressof.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/utility/addressof.hpp" +namespace boost +{ + +namespace detail +{ + +template struct addr_impl_ref +{ + T & v_; + + inline addr_impl_ref( T & v ): v_( v ) {} + inline operator T& () const { return v_; } + +private: + addr_impl_ref & operator=(const addr_impl_ref &); +}; + +template struct addressof_impl +{ + static inline T * f( T & v, long ) + { + return reinterpret_cast( + &const_cast(reinterpret_cast(v))); + } + + static inline T * f( T * v, int ) + { + return v; + } +}; + +} + +template T * addressof( T & v ) +{ + + + + + + + return boost::detail::addressof_impl::f( boost::detail::addr_impl_ref( v ), 0 ); + + +} +# 100 "/usr/include/boost-1_42/boost/utility/addressof.hpp" +} +# 12 "/usr/include/boost-1_42/boost/ref.hpp" 2 +# 29 "/usr/include/boost-1_42/boost/ref.hpp" +namespace boost +{ + +template class reference_wrapper +{ +public: + typedef T type; + + + + + + + + explicit reference_wrapper(T& t): t_(boost::addressof(t)) {} + + + + operator T& () const { return *t_; } + + T& get() const { return *t_; } + + T* get_pointer() const { return t_; } + +private: + + T* t_; +}; + + + + + + + +template inline reference_wrapper const ref(T & t) +{ + return reference_wrapper(t); +} + +template inline reference_wrapper const cref(T const & t) +{ + return reference_wrapper(t); +} + + + + + +template +class is_reference_wrapper + : public mpl::false_ +{ +}; + +template +class unwrap_reference +{ + public: + typedef T type; +}; +# 106 "/usr/include/boost-1_42/boost/ref.hpp" +template class is_reference_wrapper< reference_wrapper > : public mpl::true_ { }; template class unwrap_reference< reference_wrapper > { public: typedef T type; }; + +template class is_reference_wrapper< reference_wrapper const > : public mpl::true_ { }; template class unwrap_reference< reference_wrapper const > { public: typedef T type; }; +template class is_reference_wrapper< reference_wrapper volatile > : public mpl::true_ { }; template class unwrap_reference< reference_wrapper volatile > { public: typedef T type; }; +template class is_reference_wrapper< reference_wrapper const volatile > : public mpl::true_ { }; template class unwrap_reference< reference_wrapper const volatile > { public: typedef T type; }; +# 176 "/usr/include/boost-1_42/boost/ref.hpp" +template inline typename unwrap_reference::type& +unwrap_ref(T& t) +{ + return t; +} + +template inline T* get_pointer( reference_wrapper const & r ) +{ + return r.get_pointer(); +} + +} +# 30 "/usr/include/boost-1_42/boost/function/function_base.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/if.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/if.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/value_wknd.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/aux_/value_wknd.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/integral.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/aux_/value_wknd.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/eti.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/mpl/aux_/value_wknd.hpp" 2 +# 73 "/usr/include/boost-1_42/boost/mpl/aux_/value_wknd.hpp" +namespace boost { namespace mpl { namespace aux { + +template< typename T > struct value_type_wknd +{ + typedef typename T::value_type type; +}; +# 87 "/usr/include/boost-1_42/boost/mpl/aux_/value_wknd.hpp" +}}} +# 18 "/usr/include/boost-1_42/boost/mpl/if.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/na_spec.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/aux_/na_spec.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/lambda_fwd.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/lambda_fwd.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/void_fwd.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/void_fwd.hpp" +namespace mpl_ { + +struct void_; + +} +namespace boost { namespace mpl { using ::mpl_::void_; } } +# 18 "/usr/include/boost-1_42/boost/mpl/lambda_fwd.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/na.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/aux_/na.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/na_fwd.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/aux_/na_fwd.hpp" +namespace mpl_ { + + +struct na +{ + typedef na type; + enum { value = 0 }; +}; + +} +namespace boost { namespace mpl { using ::mpl_::na; } } +# 19 "/usr/include/boost-1_42/boost/mpl/aux_/na.hpp" 2 + + + +namespace boost { namespace mpl { + +template< typename T > +struct is_na + : false_ +{ + + + +}; + +template<> +struct is_na + : true_ +{ + + + +}; + +template< typename T > +struct is_not_na + : true_ +{ + + + +}; + +template<> +struct is_not_na + : false_ +{ + + + +}; + + +template< typename T, typename U > struct if_na +{ + typedef T type; +}; + +template< typename U > struct if_na +{ + typedef U type; +}; +# 93 "/usr/include/boost-1_42/boost/mpl/aux_/na.hpp" +}} +# 19 "/usr/include/boost-1_42/boost/mpl/lambda_fwd.hpp" 2 + + + + + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/lambda_arity_param.hpp" 1 +# 25 "/usr/include/boost-1_42/boost/mpl/lambda_fwd.hpp" 2 + + +namespace boost { namespace mpl { + +template< + typename T = na + , typename Tag = void_ + , typename Arity = int_< aux::template_arity::value > + + + > +struct lambda; + +}} +# 19 "/usr/include/boost-1_42/boost/mpl/aux_/na_spec.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/arity.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/aux_/arity.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/dtp.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/aux_/arity.hpp" 2 +# 23 "/usr/include/boost-1_42/boost/mpl/aux_/na_spec.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessor/enum.hpp" 1 +# 28 "/usr/include/boost-1_42/boost/mpl/aux_/na_spec.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessor/def_params_tail.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/limits/arity.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/logical/and.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/preprocessor/logical/and.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/logical/bitand.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/preprocessor/logical/and.hpp" 2 +# 23 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/identity.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/preprocessor/identity.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/facilities/identity.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/preprocessor/identity.hpp" 2 +# 24 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/empty.hpp" 1 +# 25 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 +# 66 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessor/def_params_tail.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/arithmetic/add.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/preprocessor/arithmetic/add.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/arithmetic/dec.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/preprocessor/arithmetic/add.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/control/while.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/preprocessor/control/while.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/detail/auto_rec.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/preprocessor/control/while.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/list/fold_left.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/preprocessor/list/fold_left.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/control/while.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/preprocessor/list/fold_left.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/detail/auto_rec.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/preprocessor/list/fold_left.hpp" 2 +# 41 "/usr/include/boost-1_42/boost/preprocessor/list/fold_left.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/list/detail/fold_left.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/preprocessor/list/detail/fold_left.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/control/expr_iif.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/preprocessor/list/detail/fold_left.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/list/adt.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/preprocessor/list/adt.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/detail/is_binary.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/preprocessor/detail/is_binary.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/detail/check.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/preprocessor/detail/is_binary.hpp" 2 +# 19 "/usr/include/boost-1_42/boost/preprocessor/list/adt.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/logical/compl.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/preprocessor/list/adt.hpp" 2 +# 20 "/usr/include/boost-1_42/boost/preprocessor/list/detail/fold_left.hpp" 2 +# 42 "/usr/include/boost-1_42/boost/preprocessor/list/fold_left.hpp" 2 +# 22 "/usr/include/boost-1_42/boost/preprocessor/control/while.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/list/fold_right.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/preprocessor/list/fold_right.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/detail/auto_rec.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/preprocessor/list/fold_right.hpp" 2 +# 37 "/usr/include/boost-1_42/boost/preprocessor/list/fold_right.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/list/detail/fold_right.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/preprocessor/list/detail/fold_right.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/list/reverse.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/preprocessor/list/detail/fold_right.hpp" 2 +# 38 "/usr/include/boost-1_42/boost/preprocessor/list/fold_right.hpp" 2 +# 23 "/usr/include/boost-1_42/boost/preprocessor/control/while.hpp" 2 +# 48 "/usr/include/boost-1_42/boost/preprocessor/control/while.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/control/detail/while.hpp" 1 +# 49 "/usr/include/boost-1_42/boost/preprocessor/control/while.hpp" 2 +# 21 "/usr/include/boost-1_42/boost/preprocessor/arithmetic/add.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/tuple/elem.hpp" 1 +# 22 "/usr/include/boost-1_42/boost/preprocessor/arithmetic/add.hpp" 2 +# 67 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/arithmetic/sub.hpp" 1 +# 68 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 +# 29 "/usr/include/boost-1_42/boost/mpl/aux_/na_spec.hpp" 2 +# 20 "/usr/include/boost-1_42/boost/mpl/if.hpp" 2 + + + + + +namespace boost { namespace mpl { + + + +template< + bool C + , typename T1 + , typename T2 + > +struct if_c +{ + typedef T1 type; +}; + +template< + typename T1 + , typename T2 + > +struct if_c +{ + typedef T2 type; +}; + + + +template< + typename T1 = na + , typename T2 = na + , typename T3 = na + > +struct if_ +{ + private: + + typedef if_c< + + + + static_cast(T1::value) + + , T2 + , T3 + > almost_type_; + + public: + typedef typename almost_type_::type type; + + +}; +# 131 "/usr/include/boost-1_42/boost/mpl/if.hpp" +template<> struct if_< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : if_< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< if_< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef if_< na , na , na > result_; typedef if_< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< if_< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< if_< na , na , na > > : int_<-1> { }; } + +}} +# 31 "/usr/include/boost-1_42/boost/function/function_base.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/type_traits/alignment_of.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/type_traits/alignment_of.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 14 "/usr/include/boost-1_42/boost/type_traits/alignment_of.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/size_t_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/size_t_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/size_t_trait_def.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/mpl/size_t.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/size_t.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/size_t_fwd.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/size_t_fwd.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 20 "/usr/include/boost-1_42/boost/mpl/size_t_fwd.hpp" 2 + +namespace mpl_ { + +template< std::size_t N > struct size_t; + +} +namespace boost { namespace mpl { using ::mpl_::size_t; } } +# 18 "/usr/include/boost-1_42/boost/mpl/size_t.hpp" 2 + + + + + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/integral_wrapper.hpp" 1 +# 40 "/usr/include/boost-1_42/boost/mpl/aux_/integral_wrapper.hpp" +namespace mpl_ { + +template< std::size_t N > +struct size_t +{ + static const std::size_t value = N; + + + + + + typedef size_t type; + + typedef std::size_t value_type; + typedef integral_c_tag tag; +# 72 "/usr/include/boost-1_42/boost/mpl/aux_/integral_wrapper.hpp" + typedef mpl_::size_t< static_cast((value + 1)) > next; + typedef mpl_::size_t< static_cast((value - 1)) > prior; + + + + + + + operator std::size_t() const { return static_cast(this->value); } +}; + + +template< std::size_t N > +std::size_t const mpl_::size_t< N >::value; + + +} +# 24 "/usr/include/boost-1_42/boost/mpl/size_t.hpp" 2 +# 18 "/usr/include/boost-1_42/boost/type_traits/detail/size_t_trait_def.hpp" 2 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 20 "/usr/include/boost-1_42/boost/type_traits/detail/size_t_trait_def.hpp" 2 +# 18 "/usr/include/boost-1_42/boost/type_traits/alignment_of.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/type_traits/alignment_of.hpp" +namespace boost { + +template struct alignment_of; + + +namespace detail { + + + + + +template +struct alignment_of_hack +{ + char c; + T t; + alignment_of_hack(); +}; + + + + +template +struct alignment_logic +{ + static const std::size_t value = A < S ? A : S; +}; + + +template< typename T > +struct alignment_of_impl +{ +# 83 "/usr/include/boost-1_42/boost/type_traits/alignment_of.hpp" + static const std::size_t value = __alignof__(T); + +}; + +} + +template< typename T > struct alignment_of : ::boost::integral_constant::value> { }; + + + + +template +struct alignment_of + : alignment_of +{ +}; +# 109 "/usr/include/boost-1_42/boost/type_traits/alignment_of.hpp" +template<> struct alignment_of : ::boost::integral_constant { }; + +template<> struct alignment_of : ::boost::integral_constant { }; +template<> struct alignment_of : ::boost::integral_constant { }; +template<> struct alignment_of : ::boost::integral_constant { }; + + +} +# 125 "/usr/include/boost-1_42/boost/type_traits/alignment_of.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/size_t_trait_undef.hpp" 1 +# 126 "/usr/include/boost-1_42/boost/type_traits/alignment_of.hpp" 2 +# 33 "/usr/include/boost-1_42/boost/function/function_base.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/utility/enable_if.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/utility/enable_if.hpp" +namespace boost +{ + + template + struct enable_if_c { + typedef T type; + }; + + template + struct enable_if_c {}; + + template + struct enable_if : public enable_if_c {}; + + template + struct lazy_enable_if_c { + typedef typename T::type type; + }; + + template + struct lazy_enable_if_c {}; + + template + struct lazy_enable_if : public lazy_enable_if_c {}; + + + template + struct disable_if_c { + typedef T type; + }; + + template + struct disable_if_c {}; + + template + struct disable_if : public disable_if_c {}; + + template + struct lazy_disable_if_c { + typedef typename T::type type; + }; + + template + struct lazy_disable_if_c {}; + + template + struct lazy_disable_if : public lazy_disable_if_c {}; + +} +# 35 "/usr/include/boost-1_42/boost/function/function_base.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/function_equal.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/function_equal.hpp" +namespace boost { + +template + bool function_equal_impl(const F& f, const G& g, long) + { return f == g; } + + + + +template + bool function_equal(const F& f, const G& g) + { return function_equal_impl(f, g, 0); } + +} +# 39 "/usr/include/boost-1_42/boost/function/function_base.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/function/function_fwd.hpp" 1 +# 28 "/usr/include/boost-1_42/boost/function/function_fwd.hpp" +namespace boost { + class bad_function_call; + + + + template class function; + + template + inline void swap(function& f1, function& f2) + { + f1.swap(f2); + } + + + + template class function0; + template class function1; + template class function2; + template class function3; + template + class function4; + template + class function5; + template + class function6; + template + class function7; + template + class function8; + template + class function9; + template + class function10; +} +# 40 "/usr/include/boost-1_42/boost/function/function_base.hpp" 2 +# 62 "/usr/include/boost-1_42/boost/function/function_base.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstring" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstring" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstring" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstring" 2 3 +# 74 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstring" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + using ::memchr; + using ::memcmp; + using ::memcpy; + using ::memmove; + using ::memset; + using ::strcat; + using ::strcmp; + using ::strcoll; + using ::strcpy; + using ::strcspn; + using ::strerror; + using ::strlen; + using ::strncat; + using ::strncmp; + using ::strncpy; + using ::strspn; + using ::strtok; + using ::strxfrm; + using ::strchr; + using ::strpbrk; + using ::strrchr; + using ::strstr; +# 121 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstring" 3 +} +# 63 "/usr/include/boost-1_42/boost/function/function_base.hpp" 2 +# 89 "/usr/include/boost-1_42/boost/function/function_base.hpp" +namespace boost { + namespace detail { + namespace function { + class X; + + + + + + + + union function_buffer + { + + mutable void* obj_ptr; + + + struct type_t { + + const detail::sp_typeinfo* type; + + + bool const_qualified; + + bool volatile_qualified; + } type; + + + mutable void (*func_ptr)(); + + + struct bound_memfunc_ptr_t { + void (X::*memfunc_ptr)(int); + void* obj_ptr; + } bound_memfunc_ptr; + + + + struct obj_ref_t { + mutable void* obj_ptr; + bool is_const_qualified; + bool is_volatile_qualified; + } obj_ref; + + + mutable char data; + }; + + + + + + + + struct unusable + { + unusable() {} + template unusable(const T&) {} + }; + + + + + + template struct function_return_type { typedef T type; }; + + template<> + struct function_return_type + { + typedef unusable type; + }; + + + enum functor_manager_operation_type { + clone_functor_tag, + move_functor_tag, + destroy_functor_tag, + check_functor_type_tag, + get_functor_type_tag + }; + + + struct function_ptr_tag {}; + struct function_obj_tag {}; + struct member_ptr_tag {}; + struct function_obj_ref_tag {}; + + template + class get_function_tag + { + typedef typename mpl::if_c<(is_pointer::value), + function_ptr_tag, + function_obj_tag>::type ptr_or_obj_tag; + + typedef typename mpl::if_c<(is_member_pointer::value), + member_ptr_tag, + ptr_or_obj_tag>::type ptr_or_obj_or_mem_tag; + + typedef typename mpl::if_c<(is_reference_wrapper::value), + function_obj_ref_tag, + ptr_or_obj_or_mem_tag>::type or_ref_tag; + + public: + typedef or_ref_tag type; + }; + + + + template + struct reference_manager + { + static inline void + manage(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + switch (op) { + case clone_functor_tag: + out_buffer.obj_ref.obj_ptr = in_buffer.obj_ref.obj_ptr; + return; + + case move_functor_tag: + out_buffer.obj_ref.obj_ptr = in_buffer.obj_ref.obj_ptr; + in_buffer.obj_ref.obj_ptr = 0; + return; + + case destroy_functor_tag: + out_buffer.obj_ref.obj_ptr = 0; + return; + + case check_functor_type_tag: + { + const detail::sp_typeinfo& check_type + = *out_buffer.type.type; + + + + if ((std::strcmp((check_type).name(),(typeid(F)).name()) == 0) + && (!in_buffer.obj_ref.is_const_qualified + || out_buffer.type.const_qualified) + && (!in_buffer.obj_ref.is_volatile_qualified + || out_buffer.type.volatile_qualified)) + out_buffer.obj_ptr = in_buffer.obj_ref.obj_ptr; + else + out_buffer.obj_ptr = 0; + } + return; + + case get_functor_type_tag: + out_buffer.type.type = &typeid(F); + out_buffer.type.const_qualified = in_buffer.obj_ref.is_const_qualified; + out_buffer.type.volatile_qualified = in_buffer.obj_ref.is_volatile_qualified; + return; + } + } + }; + + + + + + template + struct function_allows_small_object_optimization + { + static const bool value = ((sizeof(F) <= sizeof(function_buffer) && (alignment_of::value % alignment_of::value == 0))) + + + + ; + }; + + template + struct functor_wrapper: public F, public A + { + functor_wrapper( F f, A a ): + F(f), + A(a) + { + } + + functor_wrapper(const functor_wrapper& f) : + F(static_cast(f)), + A(static_cast(f)) + { + } + }; + + + + + + template + struct functor_manager_common + { + typedef Functor functor_type; + + + static inline void + manage_ptr(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + if (op == clone_functor_tag) + out_buffer.func_ptr = in_buffer.func_ptr; + else if (op == move_functor_tag) { + out_buffer.func_ptr = in_buffer.func_ptr; + in_buffer.func_ptr = 0; + } else if (op == destroy_functor_tag) + out_buffer.func_ptr = 0; + else if (op == check_functor_type_tag) { + const detail::sp_typeinfo& check_type + = *out_buffer.type.type; + if ((std::strcmp((check_type).name(),(typeid(Functor)).name()) == 0)) + out_buffer.obj_ptr = &in_buffer.func_ptr; + else + out_buffer.obj_ptr = 0; + } else { + out_buffer.type.type = &typeid(Functor); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + } + } + + + static inline void + manage_small(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + if (op == clone_functor_tag || op == move_functor_tag) { + const functor_type* in_functor = + reinterpret_cast(&in_buffer.data); + new ((void*)&out_buffer.data) functor_type(*in_functor); + + if (op == move_functor_tag) { + reinterpret_cast(&in_buffer.data)->~Functor(); + } + } else if (op == destroy_functor_tag) { + + reinterpret_cast(&out_buffer.data)->~Functor(); + } else if (op == check_functor_type_tag) { + const detail::sp_typeinfo& check_type + = *out_buffer.type.type; + if ((std::strcmp((check_type).name(),(typeid(Functor)).name()) == 0)) + out_buffer.obj_ptr = &in_buffer.data; + else + out_buffer.obj_ptr = 0; + } else { + out_buffer.type.type = &typeid(Functor); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + } + } + }; + + template + struct functor_manager + { + private: + typedef Functor functor_type; + + + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, function_ptr_tag) + { + functor_manager_common::manage_ptr(in_buffer,out_buffer,op); + } + + + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, mpl::true_) + { + functor_manager_common::manage_small(in_buffer,out_buffer,op); + } + + + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, mpl::false_) + { + if (op == clone_functor_tag) { + + + + const functor_type* f = + (const functor_type*)(in_buffer.obj_ptr); + functor_type* new_f = new functor_type(*f); + out_buffer.obj_ptr = new_f; + } else if (op == move_functor_tag) { + out_buffer.obj_ptr = in_buffer.obj_ptr; + in_buffer.obj_ptr = 0; + } else if (op == destroy_functor_tag) { + + functor_type* f = + static_cast(out_buffer.obj_ptr); + delete f; + out_buffer.obj_ptr = 0; + } else if (op == check_functor_type_tag) { + const detail::sp_typeinfo& check_type + = *out_buffer.type.type; + if ((std::strcmp((check_type).name(),(typeid(Functor)).name()) == 0)) + out_buffer.obj_ptr = in_buffer.obj_ptr; + else + out_buffer.obj_ptr = 0; + } else { + out_buffer.type.type = &typeid(Functor); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + } + } + + + + + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, function_obj_tag) + { + manager(in_buffer, out_buffer, op, + mpl::bool_<(function_allows_small_object_optimization::value)>()); + } + + + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, member_ptr_tag) + { + manager(in_buffer, out_buffer, op, mpl::true_()); + } + + public: + + + static inline void + manage(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + typedef typename get_function_tag::type tag_type; + switch (op) { + case get_functor_type_tag: + out_buffer.type.type = &typeid(functor_type); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + return; + + default: + manager(in_buffer, out_buffer, op, tag_type()); + return; + } + } + }; + + template + struct functor_manager_a + { + private: + typedef Functor functor_type; + + + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, function_ptr_tag) + { + functor_manager_common::manage_ptr(in_buffer,out_buffer,op); + } + + + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, mpl::true_) + { + functor_manager_common::manage_small(in_buffer,out_buffer,op); + } + + + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, mpl::false_) + { + typedef functor_wrapper functor_wrapper_type; + typedef typename Allocator::template rebind::other + wrapper_allocator_type; + typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type; + + if (op == clone_functor_tag) { + + + + const functor_wrapper_type* f = + (const functor_wrapper_type*)(in_buffer.obj_ptr); + wrapper_allocator_type wrapper_allocator(static_cast(*f)); + wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1); + wrapper_allocator.construct(copy, *f); + + + functor_wrapper_type* new_f = static_cast(copy); + out_buffer.obj_ptr = new_f; + } else if (op == move_functor_tag) { + out_buffer.obj_ptr = in_buffer.obj_ptr; + in_buffer.obj_ptr = 0; + } else if (op == destroy_functor_tag) { + + functor_wrapper_type* victim = + static_cast(in_buffer.obj_ptr); + wrapper_allocator_type wrapper_allocator(static_cast(*victim)); + wrapper_allocator.destroy(victim); + wrapper_allocator.deallocate(victim,1); + out_buffer.obj_ptr = 0; + } else if (op == check_functor_type_tag) { + const detail::sp_typeinfo& check_type + = *out_buffer.type.type; + if ((std::strcmp((check_type).name(),(typeid(Functor)).name()) == 0)) + out_buffer.obj_ptr = in_buffer.obj_ptr; + else + out_buffer.obj_ptr = 0; + } else { + out_buffer.type.type = &typeid(Functor); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + } + } + + + + + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, function_obj_tag) + { + manager(in_buffer, out_buffer, op, + mpl::bool_<(function_allows_small_object_optimization::value)>()); + } + + public: + + + static inline void + manage(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + typedef typename get_function_tag::type tag_type; + switch (op) { + case get_functor_type_tag: + out_buffer.type.type = &typeid(functor_type); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + return; + + default: + manager(in_buffer, out_buffer, op, tag_type()); + return; + } + } + }; + + + struct useless_clear_type {}; +# 609 "/usr/include/boost-1_42/boost/function/function_base.hpp" + struct vtable_base + { + void (*manager)(const function_buffer& in_buffer, + function_buffer& out_buffer, + functor_manager_operation_type op); + }; + } + } + + + + + + + +class function_base +{ +public: + function_base() : vtable(0) { } + + + bool empty() const { return !vtable; } + + + + const detail::sp_typeinfo& target_type() const + { + if (!vtable) return typeid(void); + + detail::function::function_buffer type; + get_vtable()->manager(functor, type, detail::function::get_functor_type_tag); + return *type.type.type; + } + + template + Functor* target() + { + if (!vtable) return 0; + + detail::function::function_buffer type_result; + type_result.type.type = &typeid(Functor); + type_result.type.const_qualified = is_const::value; + type_result.type.volatile_qualified = is_volatile::value; + get_vtable()->manager(functor, type_result, + detail::function::check_functor_type_tag); + return static_cast(type_result.obj_ptr); + } + + template + + + + const Functor* target() const + + { + if (!vtable) return 0; + + detail::function::function_buffer type_result; + type_result.type.type = &typeid(Functor); + type_result.type.const_qualified = true; + type_result.type.volatile_qualified = is_volatile::value; + get_vtable()->manager(functor, type_result, + detail::function::check_functor_type_tag); + + + return (const Functor*)(type_result.obj_ptr); + } + + template + bool contains(const F& f) const + { + + + + if (const F* fp = this->template target()) + + { + return function_equal(*fp, f); + } else { + return false; + } + } +# 715 "/usr/include/boost-1_42/boost/function/function_base.hpp" +public: + detail::function::vtable_base* get_vtable() const { + return reinterpret_cast( + reinterpret_cast(vtable) & ~(std::size_t)0x01); + } + + bool has_trivial_copy_and_destroy() const { + return reinterpret_cast(vtable) & 0x01; + } + + detail::function::vtable_base* vtable; + mutable detail::function::function_buffer functor; +}; + + + + + +class bad_function_call : public std::runtime_error +{ +public: + bad_function_call() : std::runtime_error("call to empty boost::function") {} +}; + + +inline bool operator==(const function_base& f, + detail::function::useless_clear_type*) +{ + return f.empty(); +} + +inline bool operator!=(const function_base& f, + detail::function::useless_clear_type*) +{ + return !f.empty(); +} + +inline bool operator==(detail::function::useless_clear_type*, + const function_base& f) +{ + return f.empty(); +} + +inline bool operator!=(detail::function::useless_clear_type*, + const function_base& f) +{ + return !f.empty(); +} +# 800 "/usr/include/boost-1_42/boost/function/function_base.hpp" +template + typename ::boost::enable_if_c<(::boost::type_traits::ice_not< (::boost::is_integral::value)>::value), bool>::type + operator==(const function_base& f, Functor g) + { + if (const Functor* fp = f.template target()) + return function_equal(*fp, g); + else return false; + } + +template + typename ::boost::enable_if_c<(::boost::type_traits::ice_not< (::boost::is_integral::value)>::value), bool>::type + operator==(Functor g, const function_base& f) + { + if (const Functor* fp = f.template target()) + return function_equal(g, *fp); + else return false; + } + +template + typename ::boost::enable_if_c<(::boost::type_traits::ice_not< (::boost::is_integral::value)>::value), bool>::type + operator!=(const function_base& f, Functor g) + { + if (const Functor* fp = f.template target()) + return !function_equal(*fp, g); + else return true; + } + +template + typename ::boost::enable_if_c<(::boost::type_traits::ice_not< (::boost::is_integral::value)>::value), bool>::type + operator!=(Functor g, const function_base& f) + { + if (const Functor* fp = f.template target()) + return !function_equal(g, *fp); + else return true; + } + + +template + typename ::boost::enable_if_c<(::boost::type_traits::ice_not< (::boost::is_integral::value)>::value), bool>::type + operator==(const function_base& f, reference_wrapper g) + { + if (const Functor* fp = f.template target()) + return fp == g.get_pointer(); + else return false; + } + +template + typename ::boost::enable_if_c<(::boost::type_traits::ice_not< (::boost::is_integral::value)>::value), bool>::type + operator==(reference_wrapper g, const function_base& f) + { + if (const Functor* fp = f.template target()) + return g.get_pointer() == fp; + else return false; + } + +template + typename ::boost::enable_if_c<(::boost::type_traits::ice_not< (::boost::is_integral::value)>::value), bool>::type + operator!=(const function_base& f, reference_wrapper g) + { + if (const Functor* fp = f.template target()) + return fp != g.get_pointer(); + else return true; + } + +template + typename ::boost::enable_if_c<(::boost::type_traits::ice_not< (::boost::is_integral::value)>::value), bool>::type + operator!=(reference_wrapper g, const function_base& f) + { + if (const Functor* fp = f.template target()) + return g.get_pointer() != fp; + else return true; + } + + + +namespace detail { + namespace function { + inline bool has_empty_target(const function_base* f) + { + return f->empty(); + } + + + + + + + + inline bool has_empty_target(...) + { + return false; + } + + } +} +} +# 18 "/usr/include/boost-1_42/boost/function/detail/prologue.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mem_fn.hpp" 1 +# 22 "/usr/include/boost-1_42/boost/mem_fn.hpp" +# 1 "/usr/include/boost-1_42/boost/bind/mem_fn.hpp" 1 +# 25 "/usr/include/boost-1_42/boost/bind/mem_fn.hpp" +# 1 "/usr/include/boost-1_42/boost/get_pointer.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/get_pointer.hpp" +# 1 "/usr/include/boost-1_42/boost/config/no_tr1/memory.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/get_pointer.hpp" 2 + +namespace boost { + + + +template T * get_pointer(T * p) +{ + return p; +} + + + +template T * get_pointer(std::auto_ptr const& p) +{ + return p.get(); +} + + +} +# 26 "/usr/include/boost-1_42/boost/bind/mem_fn.hpp" 2 + + +namespace boost +{ +# 207 "/usr/include/boost-1_42/boost/bind/mem_fn.hpp" +namespace _mfi +{ + + + + + + +# 1 "/usr/include/boost-1_42/boost/bind/mem_fn_template.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/bind/mem_fn_template.hpp" +template class mf0 +{ +public: + + typedef R result_type; + typedef T * argument_type; + +private: + + typedef R ( T::*F) (); + F f_; + + template R call(U & u, T const *) const + { + return (u.*f_)(); + } + + template R call(U & u, void const *) const + { + return (get_pointer(u)->*f_)(); + } + +public: + + explicit mf0(F f): f_(f) {} + + R operator()(T * p) const + { + return (p->*f_)(); + } + + template R operator()(U & u) const + { + U const * p = 0; + return call(u, p); + } + + + + template R operator()(U const & u) const + { + U const * p = 0; + return call(u, p); + } + + + + R operator()(T & t) const + { + return (t.*f_)(); + } + + bool operator==(mf0 const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(mf0 const & rhs) const + { + return f_ != rhs.f_; + } +}; + + + +template class cmf0 +{ +public: + + typedef R result_type; + typedef T const * argument_type; + +private: + + typedef R ( T::*F) () const; + F f_; + + template R call(U & u, T const *) const + { + return (u.*f_)(); + } + + template R call(U & u, void const *) const + { + return (get_pointer(u)->*f_)(); + } + +public: + + explicit cmf0(F f): f_(f) {} + + template R operator()(U const & u) const + { + U const * p = 0; + return call(u, p); + } + + R operator()(T const & t) const + { + return (t.*f_)(); + } + + bool operator==(cmf0 const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(cmf0 const & rhs) const + { + return f_ != rhs.f_; + } +}; + + + +template class mf1 +{ +public: + + typedef R result_type; + typedef T * first_argument_type; + typedef A1 second_argument_type; + +private: + + typedef R ( T::*F) (A1); + F f_; + + template R call(U & u, T const *, B1 & b1) const + { + return (u.*f_)(b1); + } + + template R call(U & u, void const *, B1 & b1) const + { + return (get_pointer(u)->*f_)(b1); + } + +public: + + explicit mf1(F f): f_(f) {} + + R operator()(T * p, A1 a1) const + { + return (p->*f_)(a1); + } + + template R operator()(U & u, A1 a1) const + { + U const * p = 0; + return call(u, p, a1); + } + + + + template R operator()(U const & u, A1 a1) const + { + U const * p = 0; + return call(u, p, a1); + } + + + + R operator()(T & t, A1 a1) const + { + return (t.*f_)(a1); + } + + bool operator==(mf1 const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(mf1 const & rhs) const + { + return f_ != rhs.f_; + } +}; + + + +template class cmf1 +{ +public: + + typedef R result_type; + typedef T const * first_argument_type; + typedef A1 second_argument_type; + +private: + + typedef R ( T::*F) (A1) const; + F f_; + + template R call(U & u, T const *, B1 & b1) const + { + return (u.*f_)(b1); + } + + template R call(U & u, void const *, B1 & b1) const + { + return (get_pointer(u)->*f_)(b1); + } + +public: + + explicit cmf1(F f): f_(f) {} + + template R operator()(U const & u, A1 a1) const + { + U const * p = 0; + return call(u, p, a1); + } + + R operator()(T const & t, A1 a1) const + { + return (t.*f_)(a1); + } + + bool operator==(cmf1 const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(cmf1 const & rhs) const + { + return f_ != rhs.f_; + } +}; + + + +template class mf2 +{ +public: + + typedef R result_type; + +private: + + typedef R ( T::*F) (A1, A2); + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2) const + { + return (u.*f_)(b1, b2); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2) const + { + return (get_pointer(u)->*f_)(b1, b2); + } + +public: + + explicit mf2(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2) const + { + return (p->*f_)(a1, a2); + } + + template R operator()(U & u, A1 a1, A2 a2) const + { + U const * p = 0; + return call(u, p, a1, a2); + } + + + + template R operator()(U const & u, A1 a1, A2 a2) const + { + U const * p = 0; + return call(u, p, a1, a2); + } + + + + R operator()(T & t, A1 a1, A2 a2) const + { + return (t.*f_)(a1, a2); + } + + bool operator==(mf2 const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(mf2 const & rhs) const + { + return f_ != rhs.f_; + } +}; + + + +template class cmf2 +{ +public: + + typedef R result_type; + +private: + + typedef R ( T::*F) (A1, A2) const; + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2) const + { + return (u.*f_)(b1, b2); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2) const + { + return (get_pointer(u)->*f_)(b1, b2); + } + +public: + + explicit cmf2(F f): f_(f) {} + + template R operator()(U const & u, A1 a1, A2 a2) const + { + U const * p = 0; + return call(u, p, a1, a2); + } + + R operator()(T const & t, A1 a1, A2 a2) const + { + return (t.*f_)(a1, a2); + } + + bool operator==(cmf2 const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(cmf2 const & rhs) const + { + return f_ != rhs.f_; + } +}; + + + +template class mf3 +{ +public: + + typedef R result_type; + +private: + + typedef R ( T::*F) (A1, A2, A3); + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3) const + { + return (u.*f_)(b1, b2, b3); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3) const + { + return (get_pointer(u)->*f_)(b1, b2, b3); + } + +public: + + explicit mf3(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2, A3 a3) const + { + return (p->*f_)(a1, a2, a3); + } + + template R operator()(U & u, A1 a1, A2 a2, A3 a3) const + { + U const * p = 0; + return call(u, p, a1, a2, a3); + } + + + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3) const + { + U const * p = 0; + return call(u, p, a1, a2, a3); + } + + + + R operator()(T & t, A1 a1, A2 a2, A3 a3) const + { + return (t.*f_)(a1, a2, a3); + } + + bool operator==(mf3 const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(mf3 const & rhs) const + { + return f_ != rhs.f_; + } +}; + + + +template class cmf3 +{ +public: + + typedef R result_type; + +private: + + typedef R ( T::*F) (A1, A2, A3) const; + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3) const + { + return (u.*f_)(b1, b2, b3); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3) const + { + return (get_pointer(u)->*f_)(b1, b2, b3); + } + +public: + + explicit cmf3(F f): f_(f) {} + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3) const + { + U const * p = 0; + return call(u, p, a1, a2, a3); + } + + R operator()(T const & t, A1 a1, A2 a2, A3 a3) const + { + return (t.*f_)(a1, a2, a3); + } + + bool operator==(cmf3 const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(cmf3 const & rhs) const + { + return f_ != rhs.f_; + } +}; + + + +template class mf4 +{ +public: + + typedef R result_type; + +private: + + typedef R ( T::*F) (A1, A2, A3, A4); + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const + { + return (u.*f_)(b1, b2, b3, b4); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const + { + return (get_pointer(u)->*f_)(b1, b2, b3, b4); + } + +public: + + explicit mf4(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4) const + { + return (p->*f_)(a1, a2, a3, a4); + } + + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4); + } + + + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4); + } + + + + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4) const + { + return (t.*f_)(a1, a2, a3, a4); + } + + bool operator==(mf4 const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(mf4 const & rhs) const + { + return f_ != rhs.f_; + } +}; + + + +template class cmf4 +{ +public: + + typedef R result_type; + +private: + + typedef R ( T::*F) (A1, A2, A3, A4) const; + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const + { + return (u.*f_)(b1, b2, b3, b4); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const + { + return (get_pointer(u)->*f_)(b1, b2, b3, b4); + } + +public: + + explicit cmf4(F f): f_(f) {} + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4); + } + + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4) const + { + return (t.*f_)(a1, a2, a3, a4); + } + + bool operator==(cmf4 const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(cmf4 const & rhs) const + { + return f_ != rhs.f_; + } +}; + + + +template class mf5 +{ +public: + + typedef R result_type; + +private: + + typedef R ( T::*F) (A1, A2, A3, A4, A5); + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const + { + return (u.*f_)(b1, b2, b3, b4, b5); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const + { + return (get_pointer(u)->*f_)(b1, b2, b3, b4, b5); + } + +public: + + explicit mf5(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + return (p->*f_)(a1, a2, a3, a4, a5); + } + + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4, a5); + } + + + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4, a5); + } + + + + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + return (t.*f_)(a1, a2, a3, a4, a5); + } + + bool operator==(mf5 const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(mf5 const & rhs) const + { + return f_ != rhs.f_; + } +}; + + + +template class cmf5 +{ +public: + + typedef R result_type; + +private: + + typedef R ( T::*F) (A1, A2, A3, A4, A5) const; + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const + { + return (u.*f_)(b1, b2, b3, b4, b5); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const + { + return (get_pointer(u)->*f_)(b1, b2, b3, b4, b5); + } + +public: + + explicit cmf5(F f): f_(f) {} + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4, a5); + } + + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + return (t.*f_)(a1, a2, a3, a4, a5); + } + + bool operator==(cmf5 const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(cmf5 const & rhs) const + { + return f_ != rhs.f_; + } +}; + + + +template class mf6 +{ +public: + + typedef R result_type; + +private: + + typedef R ( T::*F) (A1, A2, A3, A4, A5, A6); + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const + { + return (u.*f_)(b1, b2, b3, b4, b5, b6); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const + { + return (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6); + } + +public: + + explicit mf6(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + return (p->*f_)(a1, a2, a3, a4, a5, a6); + } + + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4, a5, a6); + } + + + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4, a5, a6); + } + + + + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + return (t.*f_)(a1, a2, a3, a4, a5, a6); + } + + bool operator==(mf6 const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(mf6 const & rhs) const + { + return f_ != rhs.f_; + } +}; + + + +template class cmf6 +{ +public: + + typedef R result_type; + +private: + + typedef R ( T::*F) (A1, A2, A3, A4, A5, A6) const; + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const + { + return (u.*f_)(b1, b2, b3, b4, b5, b6); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const + { + return (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6); + } + +public: + + explicit cmf6(F f): f_(f) {} + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4, a5, a6); + } + + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + return (t.*f_)(a1, a2, a3, a4, a5, a6); + } + + bool operator==(cmf6 const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(cmf6 const & rhs) const + { + return f_ != rhs.f_; + } +}; + + + +template class mf7 +{ +public: + + typedef R result_type; + +private: + + typedef R ( T::*F) (A1, A2, A3, A4, A5, A6, A7); + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const + { + return (u.*f_)(b1, b2, b3, b4, b5, b6, b7); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const + { + return (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7); + } + +public: + + explicit mf7(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + return (p->*f_)(a1, a2, a3, a4, a5, a6, a7); + } + + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4, a5, a6, a7); + } + + + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4, a5, a6, a7); + } + + + + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + return (t.*f_)(a1, a2, a3, a4, a5, a6, a7); + } + + bool operator==(mf7 const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(mf7 const & rhs) const + { + return f_ != rhs.f_; + } +}; + + + +template class cmf7 +{ +public: + + typedef R result_type; + +private: + + typedef R ( T::*F) (A1, A2, A3, A4, A5, A6, A7) const; + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const + { + return (u.*f_)(b1, b2, b3, b4, b5, b6, b7); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const + { + return (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7); + } + +public: + + explicit cmf7(F f): f_(f) {} + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4, a5, a6, a7); + } + + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + return (t.*f_)(a1, a2, a3, a4, a5, a6, a7); + } + + bool operator==(cmf7 const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(cmf7 const & rhs) const + { + return f_ != rhs.f_; + } +}; + + + +template class mf8 +{ +public: + + typedef R result_type; + +private: + + typedef R ( T::*F) (A1, A2, A3, A4, A5, A6, A7, A8); + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const + { + return (u.*f_)(b1, b2, b3, b4, b5, b6, b7, b8); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const + { + return (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7, b8); + } + +public: + + explicit mf8(F f): f_(f) {} + + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + return (p->*f_)(a1, a2, a3, a4, a5, a6, a7, a8); + } + + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4, a5, a6, a7, a8); + } + + + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4, a5, a6, a7, a8); + } + + + + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + return (t.*f_)(a1, a2, a3, a4, a5, a6, a7, a8); + } + + bool operator==(mf8 const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(mf8 const & rhs) const + { + return f_ != rhs.f_; + } +}; + + + +template class cmf8 +{ +public: + + typedef R result_type; + +private: + + typedef R ( T::*F) (A1, A2, A3, A4, A5, A6, A7, A8) const; + F f_; + + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const + { + return (u.*f_)(b1, b2, b3, b4, b5, b6, b7, b8); + } + + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const + { + return (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7, b8); + } + +public: + + explicit cmf8(F f): f_(f) {} + + R operator()(T const * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + return (p->*f_)(a1, a2, a3, a4, a5, a6, a7, a8); + } + + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4, a5, a6, a7, a8); + } + + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + return (t.*f_)(a1, a2, a3, a4, a5, a6, a7, a8); + } + + bool operator==(cmf8 const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(cmf8 const & rhs) const + { + return f_ != rhs.f_; + } +}; +# 216 "/usr/include/boost-1_42/boost/bind/mem_fn.hpp" 2 +# 258 "/usr/include/boost-1_42/boost/bind/mem_fn.hpp" +} +# 268 "/usr/include/boost-1_42/boost/bind/mem_fn.hpp" +# 1 "/usr/include/boost-1_42/boost/bind/mem_fn_cc.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/bind/mem_fn_cc.hpp" +template _mfi::mf0 mem_fn(R ( T::*f) ()) +{ + return _mfi::mf0(f); +} + +template _mfi::cmf0 mem_fn(R ( T::*f) () const) +{ + return _mfi::cmf0(f); +} + +template _mfi::mf1 mem_fn(R ( T::*f) (A1)) +{ + return _mfi::mf1(f); +} + +template _mfi::cmf1 mem_fn(R ( T::*f) (A1) const) +{ + return _mfi::cmf1(f); +} + +template _mfi::mf2 mem_fn(R ( T::*f) (A1, A2)) +{ + return _mfi::mf2(f); +} + +template _mfi::cmf2 mem_fn(R ( T::*f) (A1, A2) const) +{ + return _mfi::cmf2(f); +} + +template _mfi::mf3 mem_fn(R ( T::*f) (A1, A2, A3)) +{ + return _mfi::mf3(f); +} + +template _mfi::cmf3 mem_fn(R ( T::*f) (A1, A2, A3) const) +{ + return _mfi::cmf3(f); +} + +template _mfi::mf4 mem_fn(R ( T::*f) (A1, A2, A3, A4)) +{ + return _mfi::mf4(f); +} + +template _mfi::cmf4 mem_fn(R ( T::*f) (A1, A2, A3, A4) const) +{ + return _mfi::cmf4(f); +} + +template _mfi::mf5 mem_fn(R ( T::*f) (A1, A2, A3, A4, A5)) +{ + return _mfi::mf5(f); +} + +template _mfi::cmf5 mem_fn(R ( T::*f) (A1, A2, A3, A4, A5) const) +{ + return _mfi::cmf5(f); +} + +template _mfi::mf6 mem_fn(R ( T::*f) (A1, A2, A3, A4, A5, A6)) +{ + return _mfi::mf6(f); +} + +template _mfi::cmf6 mem_fn(R ( T::*f) (A1, A2, A3, A4, A5, A6) const) +{ + return _mfi::cmf6(f); +} + +template _mfi::mf7 mem_fn(R ( T::*f) (A1, A2, A3, A4, A5, A6, A7)) +{ + return _mfi::mf7(f); +} + +template _mfi::cmf7 mem_fn(R ( T::*f) (A1, A2, A3, A4, A5, A6, A7) const) +{ + return _mfi::cmf7(f); +} + +template _mfi::mf8 mem_fn(R ( T::*f) (A1, A2, A3, A4, A5, A6, A7, A8)) +{ + return _mfi::mf8(f); +} + +template _mfi::cmf8 mem_fn(R ( T::*f) (A1, A2, A3, A4, A5, A6, A7, A8) const) +{ + return _mfi::cmf8(f); +} +# 269 "/usr/include/boost-1_42/boost/bind/mem_fn.hpp" 2 +# 311 "/usr/include/boost-1_42/boost/bind/mem_fn.hpp" +namespace _mfi +{ + +template class dm +{ +public: + + typedef R const & result_type; + typedef T const * argument_type; + +private: + + typedef R (T::*F); + F f_; + + template R const & call(U & u, T const *) const + { + return (u.*f_); + } + + template R const & call(U & u, void const *) const + { + return (get_pointer(u)->*f_); + } + +public: + + explicit dm(F f): f_(f) {} + + R & operator()(T * p) const + { + return (p->*f_); + } + + R const & operator()(T const * p) const + { + return (p->*f_); + } + + template R const & operator()(U const & u) const + { + return call(u, &u); + } + + + + R & operator()(T & t) const + { + return (t.*f_); + } + + R const & operator()(T const & t) const + { + return (t.*f_); + } + + + + bool operator==(dm const & rhs) const + { + return f_ == rhs.f_; + } + + bool operator!=(dm const & rhs) const + { + return f_ != rhs.f_; + } +}; + +} + +template _mfi::dm mem_fn(R T::*f) +{ + return _mfi::dm(f); +} + +} +# 23 "/usr/include/boost-1_42/boost/mem_fn.hpp" 2 +# 19 "/usr/include/boost-1_42/boost/function/detail/prologue.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/enum.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/preprocessor/enum.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/repetition/enum.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/preprocessor/repetition/enum.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/detail/auto_rec.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/preprocessor/repetition/enum.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/tuple/rem.hpp" 1 +# 25 "/usr/include/boost-1_42/boost/preprocessor/repetition/enum.hpp" 2 +# 16 "/usr/include/boost-1_42/boost/preprocessor/enum.hpp" 2 +# 21 "/usr/include/boost-1_42/boost/function/detail/prologue.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/enum_params.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/preprocessor/enum_params.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/repetition/enum_params.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/preprocessor/enum_params.hpp" 2 +# 22 "/usr/include/boost-1_42/boost/function/detail/prologue.hpp" 2 +# 14 "/usr/include/boost-1_42/boost/function/function_template.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/detail/no_exceptions_support.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/function/function_template.hpp" 2 +# 81 "/usr/include/boost-1_42/boost/function/function_template.hpp" +namespace boost { + namespace detail { + namespace function { + template< + typename FunctionPtr, + typename R + + > + struct function_invoker0 + { + static R invoke(function_buffer& function_ptr + ) + { + FunctionPtr f = reinterpret_cast(function_ptr.func_ptr); + return f(); + } + }; + + template< + typename FunctionPtr, + typename R + + > + struct void_function_invoker0 + { + static void + invoke(function_buffer& function_ptr + ) + + { + FunctionPtr f = reinterpret_cast(function_ptr.func_ptr); + f(); + } + }; + + template< + typename FunctionObj, + typename R + + > + struct function_obj_invoker0 + { + static R invoke(function_buffer& function_obj_ptr + ) + + { + FunctionObj* f; + if (function_allows_small_object_optimization::value) + f = reinterpret_cast(&function_obj_ptr.data); + else + f = reinterpret_cast(function_obj_ptr.obj_ptr); + return (*f)(); + } + }; + + template< + typename FunctionObj, + typename R + + > + struct void_function_obj_invoker0 + { + static void + invoke(function_buffer& function_obj_ptr + ) + + { + FunctionObj* f; + if (function_allows_small_object_optimization::value) + f = reinterpret_cast(&function_obj_ptr.data); + else + f = reinterpret_cast(function_obj_ptr.obj_ptr); + (*f)(); + } + }; + + template< + typename FunctionObj, + typename R + + > + struct function_ref_invoker0 + { + static R invoke(function_buffer& function_obj_ptr + ) + + { + FunctionObj* f = + reinterpret_cast(function_obj_ptr.obj_ptr); + return (*f)(); + } + }; + + template< + typename FunctionObj, + typename R + + > + struct void_function_ref_invoker0 + { + static void + invoke(function_buffer& function_obj_ptr + ) + + { + FunctionObj* f = + reinterpret_cast(function_obj_ptr.obj_ptr); + (*f)(); + } + }; +# 230 "/usr/include/boost-1_42/boost/function/function_template.hpp" + template< + typename FunctionPtr, + typename R + + > + struct get_function_invoker0 + { + typedef typename mpl::if_c<(is_void::value), + void_function_invoker0< + FunctionPtr, + R + + >, + function_invoker0< + FunctionPtr, + R + + > + >::type type; + }; + + template< + typename FunctionObj, + typename R + + > + struct get_function_obj_invoker0 + { + typedef typename mpl::if_c<(is_void::value), + void_function_obj_invoker0< + FunctionObj, + R + + >, + function_obj_invoker0< + FunctionObj, + R + + > + >::type type; + }; + + template< + typename FunctionObj, + typename R + + > + struct get_function_ref_invoker0 + { + typedef typename mpl::if_c<(is_void::value), + void_function_ref_invoker0< + FunctionObj, + R + + >, + function_ref_invoker0< + FunctionObj, + R + + > + >::type type; + }; +# 326 "/usr/include/boost-1_42/boost/function/function_template.hpp" + template + struct get_invoker0 { }; + + + template<> + struct get_invoker0 + { + template + struct apply + { + typedef typename get_function_invoker0< + FunctionPtr, + R + + >::type + invoker_type; + + typedef functor_manager manager_type; + }; + + template + struct apply_a + { + typedef typename get_function_invoker0< + FunctionPtr, + R + + >::type + invoker_type; + + typedef functor_manager manager_type; + }; + }; +# 400 "/usr/include/boost-1_42/boost/function/function_template.hpp" + template<> + struct get_invoker0 + { + template + struct apply + { + typedef typename get_function_obj_invoker0< + FunctionObj, + R + + >::type + invoker_type; + + typedef functor_manager manager_type; + }; + + template + struct apply_a + { + typedef typename get_function_obj_invoker0< + FunctionObj, + R + + >::type + invoker_type; + + typedef functor_manager_a manager_type; + }; + }; + + + template<> + struct get_invoker0 + { + template + struct apply + { + typedef typename get_function_ref_invoker0< + typename RefWrapper::type, + R + + >::type + invoker_type; + + typedef reference_manager manager_type; + }; + + template + struct apply_a + { + typedef typename get_function_ref_invoker0< + typename RefWrapper::type, + R + + >::type + invoker_type; + + typedef reference_manager manager_type; + }; + }; +# 475 "/usr/include/boost-1_42/boost/function/function_template.hpp" + template + struct basic_vtable0 + { + + typedef R result_type; + + + + + typedef result_type (*invoker_type)(function_buffer& + + ); + + template + bool assign_to(F f, function_buffer& functor) + { + typedef typename get_function_tag::type tag; + return assign_to(f, functor, tag()); + } + template + bool assign_to_a(F f, function_buffer& functor, Allocator a) + { + typedef typename get_function_tag::type tag; + return assign_to_a(f, functor, a, tag()); + } + + void clear(function_buffer& functor) + { + if (base.manager) + base.manager(functor, functor, destroy_functor_tag); + } + + private: + + template + bool + assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) + { + this->clear(functor); + if (f) { + + + functor.func_ptr = (void (*)())(f); + return true; + } else { + return false; + } + } + template + bool + assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) + { + return assign_to(f,functor,function_ptr_tag()); + } +# 562 "/usr/include/boost-1_42/boost/function/function_template.hpp" + template + void + assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) + { + new ((void*)&functor.data) FunctionObj(f); + } + template + void + assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) + { + assign_functor(f,functor,mpl::true_()); + } + + + template + void + assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) + { + functor.obj_ptr = new FunctionObj(f); + } + template + void + assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) + { + typedef functor_wrapper functor_wrapper_type; + typedef typename Allocator::template rebind::other + wrapper_allocator_type; + typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type; + wrapper_allocator_type wrapper_allocator(a); + wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1); + wrapper_allocator.construct(copy, functor_wrapper_type(f,a)); + functor_wrapper_type* new_f = static_cast(copy); + functor.obj_ptr = new_f; + } + + template + bool + assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) + { + if (!boost::detail::function::has_empty_target(boost::addressof(f))) { + assign_functor(f, functor, + mpl::bool_<(function_allows_small_object_optimization::value)>()); + return true; + } else { + return false; + } + } + template + bool + assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) + { + if (!boost::detail::function::has_empty_target(boost::addressof(f))) { + assign_functor_a(f, functor, a, + mpl::bool_<(function_allows_small_object_optimization::value)>()); + return true; + } else { + return false; + } + } + + + template + bool + assign_to(const reference_wrapper& f, + function_buffer& functor, function_obj_ref_tag) + { + functor.obj_ref.obj_ptr = (void *)f.get_pointer(); + functor.obj_ref.is_const_qualified = is_const::value; + functor.obj_ref.is_volatile_qualified = is_volatile::value; + return true; + } + template + bool + assign_to_a(const reference_wrapper& f, + function_buffer& functor, Allocator, function_obj_ref_tag) + { + return assign_to(f,functor,function_obj_ref_tag()); + } + + public: + vtable_base base; + invoker_type invoker; + }; + } + } + + template< + typename R + + > + class function0 : public function_base +# 664 "/usr/include/boost-1_42/boost/function/function_template.hpp" + { + public: + + typedef R result_type; + + + + + + private: + typedef boost::detail::function::basic_vtable0< + R > + vtable_type; + + vtable_type* get_vtable() const { + return reinterpret_cast( + reinterpret_cast(vtable) & ~(std::size_t)0x01); + } + + struct clear_type {}; + + public: + static const int args = 0; + + + template + struct sig + { + typedef result_type type; + }; +# 702 "/usr/include/boost-1_42/boost/function/function_template.hpp" + static const int arity = 0; + + + typedef function0 self_type; + + function0() : function_base() { } + + + + template + function0(Functor f + + ,typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + int>::type = 0 + + ) : + function_base() + { + this->assign_to(f); + } + template + function0(Functor f, Allocator a + + ,typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + int>::type = 0 + + ) : + function_base() + { + this->assign_to_a(f,a); + } + + + function0(clear_type*) : function_base() { } + + + + + + + + function0(const function0& f) : function_base() + { + this->assign_to_own(f); + } + + ~function0() { clear(); } +# 766 "/usr/include/boost-1_42/boost/function/function_template.hpp" + result_type operator()() const; + + + + + + + + template + + typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + function0&>::type + + + + operator=(Functor f) + { + this->clear(); + { try { + this->assign_to(f); + } catch(...) { + vtable = 0; + throw;; + } + } + return *this; + } + template + void assign(Functor f, Allocator a) + { + this->clear(); + { try{ + this->assign_to_a(f,a); + } catch(...) { + vtable = 0; + throw;; + } + } + } + + + function0& operator=(clear_type*) + { + this->clear(); + return *this; + } +# 824 "/usr/include/boost-1_42/boost/function/function_template.hpp" + function0& operator=(const function0& f) + { + if (&f == this) + return *this; + + this->clear(); + { try { + this->assign_to_own(f); + } catch(...) { + vtable = 0; + throw;; + } + } + return *this; + } + + void swap(function0& other) + { + if (&other == this) + return; + + function0 tmp; + tmp.move_assign(*this); + this->move_assign(other); + other.move_assign(tmp); + } + + + void clear() + { + if (vtable) { + if (!this->has_trivial_copy_and_destroy()) + get_vtable()->clear(this->functor); + vtable = 0; + } + } + + + + + + private: + struct dummy { + void nonnull() {}; + }; + + typedef void (dummy::*safe_bool)(); + + public: + operator safe_bool () const + { return (this->empty())? 0 : &dummy::nonnull; } + + bool operator!() const + { return this->empty(); } + + + private: + void assign_to_own(const function0& f) + { + if (!f.empty()) { + this->vtable = f.vtable; + if (this->has_trivial_copy_and_destroy()) + this->functor = f.functor; + else + get_vtable()->base.manager(f.functor, this->functor, + boost::detail::function::clone_functor_tag); + } + } + + template + void assign_to(Functor f) + { + using detail::function::vtable_base; + + typedef typename detail::function::get_function_tag::type tag; + typedef detail::function::get_invoker0 get_invoker; + typedef typename get_invoker:: + template apply + handler_type; + + typedef typename handler_type::invoker_type invoker_type; + typedef typename handler_type::manager_type manager_type; + + + + + + static vtable_type stored_vtable = + { { &manager_type::manage }, &invoker_type::invoke }; + + if (stored_vtable.assign_to(f, functor)) { + std::size_t value = reinterpret_cast(&stored_vtable.base); + if (boost::has_trivial_copy_constructor::value && + boost::has_trivial_destructor::value && + detail::function::function_allows_small_object_optimization::value) + value |= (std::size_t)0x01; + vtable = reinterpret_cast(value); + } else + vtable = 0; + } + + template + void assign_to_a(Functor f,Allocator a) + { + using detail::function::vtable_base; + + typedef typename detail::function::get_function_tag::type tag; + typedef detail::function::get_invoker0 get_invoker; + typedef typename get_invoker:: + template apply_a + handler_type; + + typedef typename handler_type::invoker_type invoker_type; + typedef typename handler_type::manager_type manager_type; + + + + + + static vtable_type stored_vtable = + { { &manager_type::manage }, &invoker_type::invoke }; + + if (stored_vtable.assign_to_a(f, functor, a)) { + std::size_t value = reinterpret_cast(&stored_vtable.base); + if (boost::has_trivial_copy_constructor::value && + boost::has_trivial_destructor::value && + detail::function::function_allows_small_object_optimization::value) + value |= (std::size_t)0x01; + vtable = reinterpret_cast(value); + } else + vtable = 0; + } + + + + + void move_assign(function0& f) + { + if (&f == this) + return; + + { try { + if (!f.empty()) { + this->vtable = f.vtable; + if (this->has_trivial_copy_and_destroy()) + this->functor = f.functor; + else + get_vtable()->base.manager(f.functor, this->functor, + boost::detail::function::move_functor_tag); + f.vtable = 0; + } else { + clear(); + } + } catch(...) { + vtable = 0; + throw;; + } + } + } + }; + + template + inline void swap(function0< + R + + >& f1, + function0< + R + + >& f2) + { + f1.swap(f2); + } + + + template + typename function0< + R >::result_type + inline + function0 + ::operator()() const + { + if (this->empty()) + boost::throw_exception(bad_function_call()); + + return get_vtable()->invoker + (this->functor ); + } + + + +template + void operator==(const function0< + R + >&, + const function0< + R + >&); +template + void operator!=(const function0< + R + >&, + const function0< + R + >& ); +# 1041 "/usr/include/boost-1_42/boost/function/function_template.hpp" +template +class function + : public function0 +{ + typedef function0 base_type; + typedef function self_type; + + struct clear_type {}; + +public: + + function() : base_type() {} + + template + function(Functor f + + ,typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + int>::type = 0 + + ) : + base_type(f) + { + } + template + function(Functor f, Allocator a + + ,typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + int>::type = 0 + + ) : + base_type(f,a) + { + } + + + function(clear_type*) : base_type() {} + + + function(const self_type& f) : base_type(static_cast(f)){} + + function(const base_type& f) : base_type(static_cast(f)){} + + self_type& operator=(const self_type& f) + { + self_type(f).swap(*this); + return *this; + } + + template + + typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + self_type&>::type + + + + operator=(Functor f) + { + self_type(f).swap(*this); + return *this; + } + + + self_type& operator=(clear_type*) + { + this->clear(); + return *this; + } + + + self_type& operator=(const base_type& f) + { + self_type(f).swap(*this); + return *this; + } +}; + + + + +} +# 14 "/usr/include/boost-1_42/boost/function/detail/maybe_include.hpp" 2 +# 12 "/usr/include/boost-1_42/boost/function/function0.hpp" 2 +# 14 "/usr/include/boost-1_42/boost/python/errors.hpp" 2 + +namespace boost { namespace python { + +struct __attribute__ ((visibility("default"))) error_already_set +{ + virtual ~error_already_set(); +}; + + + + bool handle_exception_impl(function0); + +template +bool handle_exception(T f) +{ + return handle_exception_impl(function0(boost::ref(f))); +} + +namespace detail { inline void rethrow() { throw; } } + +inline void handle_exception() +{ + handle_exception(detail::rethrow); +} + + void throw_error_already_set(); + +template +inline T* expect_non_null(T* x) +{ + if (x == 0) + throw_error_already_set(); + return x; +} + + + + PyObject* pytype_check(PyTypeObject* pytype, PyObject* source); + +}} +# 12 "/usr/include/boost-1_42/boost/python/handle.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/borrowed.hpp" 1 +# 9 "/usr/include/boost-1_42/boost/python/borrowed.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/borrowed_ptr.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/detail/borrowed_ptr.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/object_traits.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/type_traits/object_traits.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/has_trivial_assign.hpp" 1 +# 22 "/usr/include/boost-1_42/boost/type_traits/has_trivial_assign.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 23 "/usr/include/boost-1_42/boost/type_traits/has_trivial_assign.hpp" 2 + +namespace boost { + +namespace detail { + +template +struct has_trivial_assign_impl +{ + static const bool value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::is_pod::value, __has_trivial_assign(T) >::value, ::boost::type_traits::ice_not< ::boost::is_const::value >::value, ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value >::value) + + + + + + + + ; +}; + +} + +template< typename T > struct has_trivial_assign : ::boost::integral_constant::value> { }; + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 49 "/usr/include/boost-1_42/boost/type_traits/has_trivial_assign.hpp" 2 +# 18 "/usr/include/boost-1_42/boost/type_traits/object_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/has_trivial_constructor.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/type_traits/has_trivial_constructor.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 19 "/usr/include/boost-1_42/boost/type_traits/has_trivial_constructor.hpp" 2 + +namespace boost { + +namespace detail { + +template +struct has_trivial_ctor_impl +{ + static const bool value = (::boost::type_traits::ice_or< ::boost::is_pod::value, __has_trivial_constructor(T) >::value) + + + + ; +}; + +} + +template< typename T > struct has_trivial_constructor : ::boost::integral_constant::value> { }; +template< typename T > struct has_trivial_default_constructor : ::boost::integral_constant::value> { }; + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 42 "/usr/include/boost-1_42/boost/type_traits/has_trivial_constructor.hpp" 2 +# 19 "/usr/include/boost-1_42/boost/type_traits/object_traits.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/type_traits/has_nothrow_constructor.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/has_nothrow_constructor.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 16 "/usr/include/boost-1_42/boost/type_traits/has_nothrow_constructor.hpp" 2 + +namespace boost { + +namespace detail{ + +template +struct has_nothrow_constructor_imp{ + static const bool value = (::boost::type_traits::ice_or< ::boost::has_trivial_constructor::value, __has_nothrow_constructor(T) >::value) + + + + ; +}; + +} + +template< typename T > struct has_nothrow_constructor : ::boost::integral_constant::value> { }; +template< typename T > struct has_nothrow_default_constructor : ::boost::integral_constant::value> { }; + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 38 "/usr/include/boost-1_42/boost/type_traits/has_nothrow_constructor.hpp" 2 +# 22 "/usr/include/boost-1_42/boost/type_traits/object_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/has_nothrow_copy.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/has_nothrow_copy.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 16 "/usr/include/boost-1_42/boost/type_traits/has_nothrow_copy.hpp" 2 + +namespace boost { + +namespace detail{ + +template +struct has_nothrow_copy_imp{ + static const bool value = (::boost::type_traits::ice_or< ::boost::has_trivial_copy::value, (__has_nothrow_copy(T) && !is_volatile::value && !is_reference::value) >::value) + + + + ; +}; + +} + +template< typename T > struct has_nothrow_copy : ::boost::integral_constant::value> { }; +template< typename T > struct has_nothrow_copy_constructor : ::boost::integral_constant::value> { }; + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 38 "/usr/include/boost-1_42/boost/type_traits/has_nothrow_copy.hpp" 2 +# 23 "/usr/include/boost-1_42/boost/type_traits/object_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/has_nothrow_assign.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/has_nothrow_assign.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 16 "/usr/include/boost-1_42/boost/type_traits/has_nothrow_assign.hpp" 2 + +namespace boost { + +namespace detail{ + +template +struct has_nothrow_assign_imp{ + static const bool value = (::boost::type_traits::ice_or< ::boost::has_trivial_assign::value, (__has_nothrow_assign(T) && !is_volatile::value) >::value) + + + + ; +}; + +} + +template< typename T > struct has_nothrow_assign : ::boost::integral_constant::value> { }; + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/type_traits/has_nothrow_assign.hpp" 2 +# 24 "/usr/include/boost-1_42/boost/type_traits/object_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/is_base_and_derived.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/type_traits/is_base_and_derived.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/type_traits/is_base_and_derived.hpp" 2 + +namespace boost { + +namespace detail { +# 222 "/usr/include/boost-1_42/boost/type_traits/is_base_and_derived.hpp" +template +struct is_base_and_derived_impl +{ + typedef typename remove_cv::type ncvB; + typedef typename remove_cv::type ncvD; + + static const bool value = ((__is_base_of(B,D) && !is_same::value) && ! ::boost::is_same::value); +}; + +} + +template< typename Base, typename Derived > struct is_base_and_derived : ::boost::integral_constant::value)> { }; + + + + + + + +template< typename Base, typename Derived > struct is_base_and_derived< Base&,Derived > : ::boost::integral_constant { }; +template< typename Base, typename Derived > struct is_base_and_derived< Base,Derived& > : ::boost::integral_constant { }; +template< typename Base, typename Derived > struct is_base_and_derived< Base&,Derived& > : ::boost::integral_constant { }; + + + + + + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 253 "/usr/include/boost-1_42/boost/type_traits/is_base_and_derived.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/type_traits/object_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/is_class.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/type_traits/is_class.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 38 "/usr/include/boost-1_42/boost/type_traits/is_class.hpp" 2 + +namespace boost { + +namespace detail { +# 120 "/usr/include/boost-1_42/boost/type_traits/is_class.hpp" +template +struct is_class_impl +{ + static const bool value = __is_class(T); +}; + + +} + + + + + +template< typename T > struct is_class : ::boost::integral_constant::value> { }; + + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 139 "/usr/include/boost-1_42/boost/type_traits/is_class.hpp" 2 +# 26 "/usr/include/boost-1_42/boost/type_traits/object_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/is_compound.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/type_traits/is_compound.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/is_fundamental.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/type_traits/is_fundamental.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 18 "/usr/include/boost-1_42/boost/type_traits/is_fundamental.hpp" 2 + +namespace boost { + +namespace detail { + +template +struct is_fundamental_impl + : ::boost::type_traits::ice_or< + ::boost::is_arithmetic::value + , ::boost::is_void::value + > +{ +}; + +} + + + + + +template< typename T > struct is_fundamental : ::boost::integral_constant::value> { }; + + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 44 "/usr/include/boost-1_42/boost/type_traits/is_fundamental.hpp" 2 +# 14 "/usr/include/boost-1_42/boost/type_traits/is_compound.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 18 "/usr/include/boost-1_42/boost/type_traits/is_compound.hpp" 2 + +namespace boost { + + +namespace detail { + +template +struct is_compound_impl +{ + static const bool value = (::boost::type_traits::ice_not< ::boost::is_fundamental::value >::value) + + + ; +}; + +} + + + + + +template< typename T > struct is_compound : ::boost::integral_constant::value> { }; + + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 45 "/usr/include/boost-1_42/boost/type_traits/is_compound.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/type_traits/object_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/is_empty.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/type_traits/is_empty.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/is_convertible.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/type_traits/is_convertible.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/add_reference.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/type_traits/add_reference.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 2 +# 18 "/usr/include/boost-1_42/boost/type_traits/add_reference.hpp" 2 + +namespace boost { + +namespace detail { +# 55 "/usr/include/boost-1_42/boost/type_traits/add_reference.hpp" +template +struct add_reference_impl +{ + typedef T& type; +}; + + +template< typename T > struct add_reference_impl { typedef T& type; }; + + + + + +template<> struct add_reference_impl { typedef void type; }; + +template<> struct add_reference_impl { typedef void const type; }; +template<> struct add_reference_impl { typedef void volatile type; }; +template<> struct add_reference_impl { typedef void const volatile type; }; + + +} + +template< typename T > struct add_reference { typedef typename boost::detail::add_reference_impl::type type; }; + + + + + + + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_undef.hpp" 1 +# 88 "/usr/include/boost-1_42/boost/type_traits/add_reference.hpp" 2 +# 21 "/usr/include/boost-1_42/boost/type_traits/is_convertible.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/is_abstract.hpp" 1 +# 62 "/usr/include/boost-1_42/boost/type_traits/is_abstract.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 63 "/usr/include/boost-1_42/boost/type_traits/is_abstract.hpp" 2 + + +namespace boost { +namespace detail{ + + +template +struct is_abstract_imp +{ + static const bool value = __is_abstract(T); +}; +# 141 "/usr/include/boost-1_42/boost/type_traits/is_abstract.hpp" +} + + +template< typename T > struct is_abstract : ::boost::integral_constant::value> { }; + + + + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 152 "/usr/include/boost-1_42/boost/type_traits/is_abstract.hpp" 2 +# 26 "/usr/include/boost-1_42/boost/type_traits/is_convertible.hpp" 2 +# 36 "/usr/include/boost-1_42/boost/type_traits/is_convertible.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 37 "/usr/include/boost-1_42/boost/type_traits/is_convertible.hpp" 2 + +namespace boost { +# 52 "/usr/include/boost-1_42/boost/type_traits/is_convertible.hpp" +namespace detail { +# 119 "/usr/include/boost-1_42/boost/type_traits/is_convertible.hpp" +struct any_conversion +{ + template any_conversion(const volatile T&); + template any_conversion(T&); +}; + +template struct checker +{ + static boost::type_traits::no_type _m_check(any_conversion ...); + static boost::type_traits::yes_type _m_check(T, int); +}; + +template +struct is_convertible_basic_impl +{ + static From _m_from; + static bool const value = sizeof( detail::checker::_m_check(_m_from, 0) ) + == sizeof(::boost::type_traits::yes_type); +}; +# 291 "/usr/include/boost-1_42/boost/type_traits/is_convertible.hpp" +template +struct is_convertible_impl +{ + typedef typename add_reference::type ref_type; + static const bool value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::detail::is_convertible_basic_impl::value, ::boost::is_void::value >::value, ::boost::type_traits::ice_not< ::boost::is_array::value >::value >::value) +# 305 "/usr/include/boost-1_42/boost/type_traits/is_convertible.hpp" + ; +}; + + +template +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef is_convertible_impl type; + }; +}; + +template <> +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef true_type type; + }; +}; + +template <> +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template <> +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template +struct is_convertible_impl_dispatch_base +{ + + typedef is_convertible_impl_select< + ::boost::is_arithmetic::value, + ::boost::is_arithmetic::value, + + ::boost::is_abstract::value + + + + > selector; + + + + typedef typename selector::template rebind isc_binder; + typedef typename isc_binder::type type; +}; + +template +struct is_convertible_impl_dispatch + : public is_convertible_impl_dispatch_base::type +{}; +# 394 "/usr/include/boost-1_42/boost/type_traits/is_convertible.hpp" + template<> struct is_convertible_impl< void,void > { static const bool value = (true); }; template<> struct is_convertible_impl< void,void const > { static const bool value = (true); }; template<> struct is_convertible_impl< void,void volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void,void const volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void const,void > { static const bool value = (true); }; template<> struct is_convertible_impl< void const,void const > { static const bool value = (true); }; template<> struct is_convertible_impl< void const,void volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void const,void const volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void > { static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void const > { static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void const volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void > { static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void const > { static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void const volatile > { static const bool value = (true); }; +# 404 "/usr/include/boost-1_42/boost/type_traits/is_convertible.hpp" +template< typename To > struct is_convertible_impl< void,To > { static const bool value = (false); }; +template< typename From > struct is_convertible_impl< From,void > { static const bool value = (true); }; + +template< typename To > struct is_convertible_impl< void const,To > { static const bool value = (false); }; +template< typename To > struct is_convertible_impl< void volatile,To > { static const bool value = (false); }; +template< typename To > struct is_convertible_impl< void const volatile,To > { static const bool value = (false); }; +template< typename From > struct is_convertible_impl< From,void const > { static const bool value = (true); }; +template< typename From > struct is_convertible_impl< From,void volatile > { static const bool value = (true); }; +template< typename From > struct is_convertible_impl< From,void const volatile > { static const bool value = (true); }; + + + +} + +template< typename From, typename To > struct is_convertible : ::boost::integral_constant::value)> { }; + + + + + + + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 429 "/usr/include/boost-1_42/boost/type_traits/is_convertible.hpp" 2 +# 13 "/usr/include/boost-1_42/boost/type_traits/is_empty.hpp" 2 +# 32 "/usr/include/boost-1_42/boost/type_traits/is_empty.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 33 "/usr/include/boost-1_42/boost/type_traits/is_empty.hpp" 2 + +namespace boost { + +namespace detail { + + +template +struct empty_helper_t1 : public T +{ + empty_helper_t1(); + int i[256]; +private: + + empty_helper_t1(const empty_helper_t1&); + empty_helper_t1& operator=(const empty_helper_t1&); +}; + +struct empty_helper_t2 { int i[256]; }; + + + +template +struct empty_helper +{ + static const bool value = false; +}; + +template +struct empty_helper +{ + static const bool value = (sizeof(empty_helper_t1) == sizeof(empty_helper_t2)) + + ; +}; + +template +struct is_empty_impl +{ + typedef typename remove_cv::type cvt; + static const bool value = ( ::boost::type_traits::ice_or< ::boost::detail::empty_helper::value>::value , __is_empty(cvt) >::value ) + + + + + + ; +}; +# 195 "/usr/include/boost-1_42/boost/type_traits/is_empty.hpp" +template<> struct is_empty_impl< void > { static const bool value = (false); }; + +template<> struct is_empty_impl< void const > { static const bool value = (false); }; +template<> struct is_empty_impl< void volatile > { static const bool value = (false); }; +template<> struct is_empty_impl< void const volatile > { static const bool value = (false); }; + + +} + +template< typename T > struct is_empty : ::boost::integral_constant::value> { }; + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 209 "/usr/include/boost-1_42/boost/type_traits/is_empty.hpp" 2 +# 28 "/usr/include/boost-1_42/boost/type_traits/object_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/is_object.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/is_object.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/is_function.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/is_function.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/false_result.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/false_result.hpp" +namespace boost { +namespace type_traits { + + +struct false_result +{ + template struct result_ + { + static const bool value = false; + }; +}; + +}} +# 16 "/usr/include/boost-1_42/boost/type_traits/is_function.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/is_function_ptr_helper.hpp" 1 +# 26 "/usr/include/boost-1_42/boost/type_traits/detail/is_function_ptr_helper.hpp" +namespace boost { +namespace type_traits { + +template +struct is_function_ptr_helper +{ + static const bool value = false; +}; + + + + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; +# 203 "/usr/include/boost-1_42/boost/type_traits/detail/is_function_ptr_helper.hpp" +} +} +# 20 "/usr/include/boost-1_42/boost/type_traits/is_function.hpp" 2 + + + + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/type_traits/is_function.hpp" 2 + + + + + + + +namespace boost { + + + +namespace detail { + + +template +struct is_function_chooser + : ::boost::type_traits::false_result +{ +}; + +template <> +struct is_function_chooser +{ + template< typename T > struct result_ + : ::boost::type_traits::is_function_ptr_helper + { + }; +}; + +template +struct is_function_impl + : is_function_chooser< ::boost::is_reference::value > + ::template result_ +{ +}; +# 90 "/usr/include/boost-1_42/boost/type_traits/is_function.hpp" +} + + + + + + +template< typename T > struct is_function : ::boost::integral_constant::value> { }; + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 102 "/usr/include/boost-1_42/boost/type_traits/is_function.hpp" 2 +# 15 "/usr/include/boost-1_42/boost/type_traits/is_object.hpp" 2 + + + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 21 "/usr/include/boost-1_42/boost/type_traits/is_object.hpp" 2 + +namespace boost { + +namespace detail { + +template +struct is_object_impl +{ + + static const bool value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_not< ::boost::is_reference::value>::value, ::boost::type_traits::ice_not< ::boost::is_void::value>::value, ::boost::type_traits::ice_not< ::boost::is_function::value>::value >::value) + + + + + ; + + + + + + + +}; + +} + +template< typename T > struct is_object : ::boost::integral_constant::value> { }; + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 52 "/usr/include/boost-1_42/boost/type_traits/is_object.hpp" 2 +# 29 "/usr/include/boost-1_42/boost/type_traits/object_traits.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/type_traits/is_stateless.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/type_traits/is_stateless.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 22 "/usr/include/boost-1_42/boost/type_traits/is_stateless.hpp" 2 + +namespace boost { + +namespace detail { + +template +struct is_stateless_impl +{ + static const bool value = (::boost::type_traits::ice_and< ::boost::has_trivial_constructor::value, ::boost::has_trivial_copy::value, ::boost::has_trivial_destructor::value, ::boost::is_class::value, ::boost::is_empty::value >::value) + + + + + + + ; +}; + +} + +template< typename T > struct is_stateless : ::boost::integral_constant::value> { }; + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 47 "/usr/include/boost-1_42/boost/type_traits/is_stateless.hpp" 2 +# 32 "/usr/include/boost-1_42/boost/type_traits/object_traits.hpp" 2 +# 12 "/usr/include/boost-1_42/boost/python/detail/borrowed_ptr.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/tag.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/tag.hpp" +namespace boost { namespace python { + + + +enum tag_t { tag }; + +}} +# 14 "/usr/include/boost-1_42/boost/python/detail/borrowed_ptr.hpp" 2 + +namespace boost { namespace python { namespace detail { + +template class borrowed +{ + typedef T type; +}; + + +template +struct is_borrowed_ptr +{ + static const bool value = false; +}; + + +template +struct is_borrowed_ptr*> +{ + static const bool value = true; +}; + +template +struct is_borrowed_ptr const*> +{ + static const bool value = true; +}; + +template +struct is_borrowed_ptr volatile*> +{ + static const bool value = true; +}; + +template +struct is_borrowed_ptr const volatile*> +{ + static const bool value = true; +}; +# 101 "/usr/include/boost-1_42/boost/python/detail/borrowed_ptr.hpp" +} + +template +inline T* get_managed_object(detail::borrowed const volatile* p, tag_t) +{ + return (T*)p; +} + +}} +# 10 "/usr/include/boost-1_42/boost/python/borrowed.hpp" 2 + +namespace boost { namespace python { + +template +inline python::detail::borrowed* borrowed(T* p) +{ + return (detail::borrowed*)p; +} + +}} +# 13 "/usr/include/boost-1_42/boost/python/handle.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/handle_fwd.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/handle_fwd.hpp" +namespace boost { namespace python { + +template class handle; + +}} +# 14 "/usr/include/boost-1_42/boost/python/handle.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/refcount.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/refcount.hpp" +namespace boost { namespace python { + +template +inline T* incref(T* p) +{ + ( ((PyObject*)(python::upcast(p)))->ob_refcnt++); + return p; +} + +template +inline T* xincref(T* p) +{ + if ((python::upcast(p)) == __null) ; else ( ((PyObject*)(python::upcast(p)))->ob_refcnt++); + return p; +} + +template +inline void decref(T* p) +{ + if ( --((PyObject*)(python::upcast(p)))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(python::upcast(p))))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(python::upcast(p))))); +} + +template +inline void xdecref(T* p) +{ + if ((python::upcast(p)) == __null) ; else if ( --((PyObject*)(python::upcast(p)))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(python::upcast(p))))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(python::upcast(p))))); +} + +}} +# 15 "/usr/include/boost-1_42/boost/python/handle.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/detail/raw_pyobject.hpp" 1 + + + + + + + +namespace boost { namespace python { namespace detail { +# 19 "/usr/include/boost-1_42/boost/python/detail/raw_pyobject.hpp" +struct new_reference_t; +typedef new_reference_t* new_reference; + + +struct borrowed_reference_t; +typedef borrowed_reference_t* borrowed_reference; + + +struct new_non_null_reference_t; +typedef new_non_null_reference_t* new_non_null_reference; + +}}} +# 17 "/usr/include/boost-1_42/boost/python/handle.hpp" 2 + +namespace boost { namespace python { + +template struct null_ok; + +template +inline null_ok* allow_null(T* p) +{ + return (null_ok*)p; +} + +namespace detail +{ + template + inline T* manage_ptr(detail::borrowed >* p, int) + { + return python::xincref((T*)p); + } + + template + inline T* manage_ptr(null_ok >* p, int) + { + return python::xincref((T*)p); + } + + template + inline T* manage_ptr(detail::borrowed* p, long) + { + return python::incref(expect_non_null((T*)p)); + } + + template + inline T* manage_ptr(null_ok* p, long) + { + return (T*)p; + } + + template + inline T* manage_ptr(T* p, ...) + { + return expect_non_null(p); + } +} + +template +class handle +{ + typedef T* (handle::* bool_type )() const; + + public: + typedef T element_type; + + public: + handle(); + ~handle(); + + template + explicit handle(Y* p) + : m_p( + python::upcast( + detail::manage_ptr(p, 0) + ) + ) + { + } + + handle& operator=(handle const& r) + { + python::xdecref(m_p); + m_p = python::xincref(r.m_p); + return *this; + } + + + + template + handle& operator=(handle const & r) + { + python::xdecref(m_p); + m_p = python::xincref(python::upcast(r.get())); + return *this; + } + + + + template + handle(handle const& r) + : m_p(python::xincref(python::upcast(r.get()))) + { + } + + handle(handle const& r) + : m_p(python::xincref(r.m_p)) + { + } + + T* operator-> () const; + T& operator* () const; + T* get() const; + T* release(); + void reset(); + + operator bool_type() const + { + return m_p ? &handle::get : 0; + } + bool operator! () const; + + public: + + inline handle(detail::borrowed_reference x) + : m_p( + python::incref( + downcast((PyObject*)x) + )) + { + } + + private: + T* m_p; +}; + + + + + +template inline T * get_pointer(python::handle const & p) +{ + return p.get(); +} + + + + + + +using boost::get_pointer; + + + +typedef handle type_handle; + + + + + +template +class is_handle +{ + public: + static const bool value = false; +}; + +template +class is_handle > +{ + public: + static const bool value = true; +}; +# 202 "/usr/include/boost-1_42/boost/python/handle.hpp" +template +inline handle::handle() + : m_p(0) +{ +} + +template +inline handle::~handle() +{ + python::xdecref(m_p); +} + +template +inline T* handle::operator->() const +{ + return m_p; +} + +template +inline T& handle::operator*() const +{ + return *m_p; +} + +template +inline T* handle::get() const +{ + return m_p; +} + +template +inline bool handle::operator!() const +{ + return m_p == 0; +} + +template +inline T* handle::release() +{ + T* result = m_p; + m_p = 0; + return result; +} + +template +inline void handle::reset() +{ + python::xdecref(m_p); + m_p = 0; +} + + + +template +inline PyObject* get_managed_object(handle const& h, tag_t) +{ + return h.get() ? python::upcast(h.get()) : (&_Py_NoneStruct); +} + +}} +# 11 "/usr/include/boost-1_42/boost/python/args_fwd.hpp" 2 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 13 "/usr/include/boost-1_42/boost/python/args_fwd.hpp" 2 + + +namespace boost { namespace python { + +namespace detail +{ + struct keyword + { + keyword(char const* name_=0) + : name(name_) + {} + + char const* name; + handle<> default_value; + }; + + template struct keywords; + + typedef std::pair keyword_range; + + template <> + struct keywords<0> + { + static const std::size_t size = 0; + static keyword_range range() { return keyword_range(); } + }; + + namespace error + { + template + struct more_keywords_than_function_arguments + { + typedef char too_many_keywords[keywords > function_args ? -1 : 1]; + }; + } +} + +}} +# 11 "/usr/include/boost-1_42/boost/python/args.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/detail/preprocessor.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/args.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/detail/type_list.hpp" 1 +# 28 "/usr/include/boost-1_42/boost/python/detail/type_list.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/vector/vector20.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/vector/vector20.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/vector/vector10.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/vector/vector10.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/vector/vector0.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/vector/vector0.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/vector/aux_/at.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/vector/aux_/at.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/at_fwd.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/at_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct at_impl; +template< typename Sequence, typename N > struct at; + +}} +# 18 "/usr/include/boost-1_42/boost/mpl/vector/aux_/at.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/vector/aux_/tag.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/vector/aux_/tag.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/typeof.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/vector/aux_/tag.hpp" 2 + + +namespace boost { namespace mpl { namespace aux { + +struct v_iter_tag; + + +struct vector_tag; + + + + +}}} +# 19 "/usr/include/boost-1_42/boost/mpl/vector/aux_/at.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/long.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/long.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/long_fwd.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/mpl/long_fwd.hpp" +namespace mpl_ { + +template< long N > struct long_; + +} +namespace boost { namespace mpl { using ::mpl_::long_; } } +# 18 "/usr/include/boost-1_42/boost/mpl/long.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/integral_wrapper.hpp" 1 +# 40 "/usr/include/boost-1_42/boost/mpl/aux_/integral_wrapper.hpp" +namespace mpl_ { + +template< long N > +struct long_ +{ + static const long value = N; + + + + + + typedef long_ type; + + typedef long value_type; + typedef integral_c_tag tag; +# 72 "/usr/include/boost-1_42/boost/mpl/aux_/integral_wrapper.hpp" + typedef mpl_::long_< static_cast((value + 1)) > next; + typedef mpl_::long_< static_cast((value - 1)) > prior; + + + + + + + operator long() const { return static_cast(this->value); } +}; + + +template< long N > +long const mpl_::long_< N >::value; + + +} +# 21 "/usr/include/boost-1_42/boost/mpl/long.hpp" 2 +# 20 "/usr/include/boost-1_42/boost/mpl/vector/aux_/at.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/void.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/mpl/void.hpp" +namespace mpl_ { + + + + + +struct void_ { typedef void_ type; }; + +} + +namespace boost { namespace mpl { + +template< typename T > +struct is_void_ + : false_ +{ + + + +}; + +template<> +struct is_void_ + : true_ +{ + + + +}; + +template< typename T > +struct is_not_void_ + : true_ +{ + + + +}; + +template<> +struct is_not_void_ + : false_ +{ + + + +}; + +template<> struct is_void_< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : is_void_< T1 > { }; }; template< typename Tag > struct lambda< is_void_< na > , Tag , int_<-1> > { typedef false_ is_le; typedef is_void_< na > result_; typedef is_void_< na > type; }; namespace aux { template< typename T1 > struct template_arity< is_void_< T1 > > : int_<1> { }; template<> struct template_arity< is_void_< na > > : int_<-1> { }; } +template<> struct is_not_void_< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : is_not_void_< T1 > { }; }; template< typename Tag > struct lambda< is_not_void_< na > , Tag , int_<-1> > { typedef false_ is_le; typedef is_not_void_< na > result_; typedef is_not_void_< na > type; }; namespace aux { template< typename T1 > struct template_arity< is_not_void_< T1 > > : int_<1> { }; template<> struct template_arity< is_not_void_< na > > : int_<-1> { }; } + +}} +# 21 "/usr/include/boost-1_42/boost/mpl/vector/aux_/at.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/type_wrapper.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/mpl/aux_/type_wrapper.hpp" +namespace boost { namespace mpl { namespace aux { + +template< typename T > struct type_wrapper +{ + typedef T type; +}; + + + + + + +template< typename T > struct wrapped_type; + +template< typename T > struct wrapped_type< type_wrapper > +{ + typedef T type; +}; + + + + + + + +}}} +# 23 "/usr/include/boost-1_42/boost/mpl/vector/aux_/at.hpp" 2 + + + + +namespace boost { namespace mpl { + + + +template< typename Vector, long n_ > +struct v_at_impl +{ + typedef long_< (Vector::lower_bound_::value + n_) > index_; + typedef __typeof__( Vector::item_(index_()) ) type; +}; + + +template< typename Vector, long n_ > +struct v_at + : aux::wrapped_type< typename v_at_impl::type > +{ +}; + +template<> +struct at_impl< aux::vector_tag > +{ + template< typename Vector, typename N > struct apply + : v_at< + Vector + , N::value + > + { + }; +}; +# 114 "/usr/include/boost-1_42/boost/mpl/vector/aux_/at.hpp" +}} +# 18 "/usr/include/boost-1_42/boost/mpl/vector/vector0.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/vector/aux_/front.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/vector/aux_/front.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/front_fwd.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/front_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct front_impl; +template< typename Sequence > struct front; + +}} +# 18 "/usr/include/boost-1_42/boost/mpl/vector/aux_/front.hpp" 2 + + + + + + +namespace boost { namespace mpl { + + + +template<> +struct front_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + : v_at + { + }; +}; +# 54 "/usr/include/boost-1_42/boost/mpl/vector/aux_/front.hpp" +}} +# 19 "/usr/include/boost-1_42/boost/mpl/vector/vector0.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/vector/aux_/push_front.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/vector/aux_/push_front.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/push_front_fwd.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/push_front_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct push_front_impl; +template< typename Sequence, typename T > struct push_front; + +}} +# 18 "/usr/include/boost-1_42/boost/mpl/vector/aux_/push_front.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/mpl/vector/aux_/item.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/vector/aux_/item.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/next_prior.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/next_prior.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/common_name_wknd.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/next_prior.hpp" 2 + + + +namespace boost { namespace mpl { + + + + +template< + typename T = na + > +struct next +{ + typedef typename T::next type; + +}; + +template< + typename T = na + > +struct prior +{ + typedef typename T::prior type; + +}; + +template<> struct next< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : next< T1 > { }; }; template< typename Tag > struct lambda< next< na > , Tag , int_<-1> > { typedef false_ is_le; typedef next< na > result_; typedef next< na > type; }; namespace aux { template< typename T1 > struct template_arity< next< T1 > > : int_<1> { }; template<> struct template_arity< next< na > > : int_<-1> { }; } +template<> struct prior< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : prior< T1 > { }; }; template< typename Tag > struct lambda< prior< na > , Tag , int_<-1> > { typedef false_ is_le; typedef prior< na > result_; typedef prior< na > type; }; namespace aux { template< typename T1 > struct template_arity< prior< T1 > > : int_<1> { }; template<> struct template_arity< prior< na > > : int_<-1> { }; } + +}} +# 20 "/usr/include/boost-1_42/boost/mpl/vector/aux_/item.hpp" 2 + + + + +namespace boost { namespace mpl { + + + +template< + typename T + , typename Base + , int at_front = 0 + > +struct v_item + : Base +{ + typedef typename Base::upper_bound_ index_; + typedef typename next::type upper_bound_; + typedef typename next::type size; + typedef Base base; + typedef v_item type; + + + + static aux::type_wrapper item_(index_); + using Base::item_; +}; + +template< + typename T + , typename Base + > +struct v_item + : Base +{ + typedef typename prior::type index_; + typedef index_ lower_bound_; + typedef typename next::type size; + typedef Base base; + typedef v_item type; + + static aux::type_wrapper item_(index_); + using Base::item_; +}; + + +template< + typename Base + , int at_front + > +struct v_mask + : Base +{ + typedef typename prior::type index_; + typedef index_ upper_bound_; + typedef typename prior::type size; + typedef Base base; + typedef v_mask type; + + static aux::type_wrapper item_(index_); + using Base::item_; +}; + +template< + typename Base + > +struct v_mask + : Base +{ + typedef typename Base::lower_bound_ index_; + typedef typename next::type lower_bound_; + typedef typename prior::type size; + typedef Base base; + typedef v_mask type; + + static aux::type_wrapper item_(index_); + using Base::item_; +}; + + + +}} +# 23 "/usr/include/boost-1_42/boost/mpl/vector/aux_/push_front.hpp" 2 + + +namespace boost { namespace mpl { + +template<> +struct push_front_impl< aux::vector_tag > +{ + template< typename Vector, typename T > struct apply + { + typedef v_item type; + }; +}; + +}} +# 20 "/usr/include/boost-1_42/boost/mpl/vector/vector0.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/vector/aux_/pop_front.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/vector/aux_/pop_front.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/pop_front_fwd.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/pop_front_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct pop_front_impl; +template< typename Sequence > struct pop_front; + +}} +# 18 "/usr/include/boost-1_42/boost/mpl/vector/aux_/pop_front.hpp" 2 + + + + + + + +namespace boost { namespace mpl { + +template<> +struct pop_front_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef v_mask type; + }; +}; + +}} +# 21 "/usr/include/boost-1_42/boost/mpl/vector/vector0.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/vector/aux_/push_back.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/vector/aux_/push_back.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/push_back_fwd.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/push_back_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct push_back_impl; +template< typename Sequence, typename T > struct push_back; + +}} +# 18 "/usr/include/boost-1_42/boost/mpl/vector/aux_/push_back.hpp" 2 + + + + + + + +namespace boost { namespace mpl { + +template<> +struct push_back_impl< aux::vector_tag > +{ + template< typename Vector, typename T > struct apply + { + typedef v_item type; + }; +}; + +}} +# 22 "/usr/include/boost-1_42/boost/mpl/vector/vector0.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/vector/aux_/pop_back.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/vector/aux_/pop_back.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/pop_back_fwd.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/pop_back_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct pop_back_impl; +template< typename Sequence > struct pop_back; + +}} +# 18 "/usr/include/boost-1_42/boost/mpl/vector/aux_/pop_back.hpp" 2 + + + + + + + +namespace boost { namespace mpl { + +template<> +struct pop_back_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef v_mask type; + }; +}; + +}} +# 23 "/usr/include/boost-1_42/boost/mpl/vector/vector0.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/vector/aux_/back.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/vector/aux_/back.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/back_fwd.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/back_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct back_impl; +template< typename Sequence > struct back; + +}} +# 18 "/usr/include/boost-1_42/boost/mpl/vector/aux_/back.hpp" 2 + + + + + + +namespace boost { namespace mpl { + + + +template<> +struct back_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + : v_at< + Vector + , prior::type::value + > + { + }; +}; +# 57 "/usr/include/boost-1_42/boost/mpl/vector/aux_/back.hpp" +}} +# 24 "/usr/include/boost-1_42/boost/mpl/vector/vector0.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/vector/aux_/clear.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/vector/aux_/clear.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/clear_fwd.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/clear_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct clear_impl; +template< typename Sequence > struct clear; + +}} +# 18 "/usr/include/boost-1_42/boost/mpl/vector/aux_/clear.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/vector/aux_/vector0.hpp" 1 +# 22 "/usr/include/boost-1_42/boost/mpl/vector/aux_/vector0.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/vector/aux_/iterator.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/vector/aux_/iterator.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/iterator_tags.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/iterator_tags.hpp" +namespace boost { namespace mpl { + +struct forward_iterator_tag : int_<0> { typedef forward_iterator_tag type; }; +struct bidirectional_iterator_tag : int_<1> { typedef bidirectional_iterator_tag type; }; +struct random_access_iterator_tag : int_<2> { typedef random_access_iterator_tag type; }; + +}} +# 19 "/usr/include/boost-1_42/boost/mpl/vector/aux_/iterator.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/plus.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/plus.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/arithmetic_op.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/aux_/arithmetic_op.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/largest_int.hpp" 1 +# 22 "/usr/include/boost-1_42/boost/mpl/aux_/largest_int.hpp" +namespace boost { namespace mpl { namespace aux { + +template< typename T > struct integral_rank; + +template<> struct integral_rank : int_<1> {}; +template<> struct integral_rank : int_<2> {}; +template<> struct integral_rank : int_<3> {}; +template<> struct integral_rank : int_<4> {}; + +template<> struct integral_rank : int_<5> {}; + +template<> struct integral_rank : int_<6> {}; +template<> struct integral_rank : int_<7> {}; +template<> struct integral_rank : int_<8> {}; +template<> struct integral_rank : int_<9> {}; +template<> struct integral_rank : int_<10> {}; +template<> struct integral_rank : int_<11> {}; + + +template<> struct integral_rank : int_<12> {}; +template<> struct integral_rank: int_<13> {}; + + +template< typename T1, typename T2 > struct largest_int + + : if_c< + ( integral_rank::value >= integral_rank::value ) + , T1 + , T2 + > +{ + + + + + + +}; + +}}} +# 19 "/usr/include/boost-1_42/boost/mpl/aux_/arithmetic_op.hpp" 2 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_op.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_op.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/numeric_cast.hpp" 1 +# 30 "/usr/include/boost-1_42/boost/mpl/numeric_cast.hpp" +namespace boost { namespace mpl { + + + +template< typename SourceTag, typename TargetTag > struct numeric_cast +{ + template< typename N > struct apply; +}; + +}} +# 22 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_op.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/apply_wrap.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/mpl/apply_wrap.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/has_apply.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/aux_/has_apply.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/has_xxx.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/mpl/has_xxx.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/yes_no.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/aux_/yes_no.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/arrays.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/aux_/yes_no.hpp" 2 + + + + +namespace boost { namespace mpl { namespace aux { + +typedef char (&no_tag)[1]; +typedef char (&yes_tag)[2]; + +template< bool C_ > struct yes_no_tag +{ + typedef no_tag type; +}; + +template<> struct yes_no_tag +{ + typedef yes_tag type; +}; + + +template< long n > struct weighted_tag +{ + + typedef char (&type)[n]; + + + + +}; +# 56 "/usr/include/boost-1_42/boost/mpl/aux_/yes_no.hpp" +}}} +# 21 "/usr/include/boost-1_42/boost/mpl/has_xxx.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/has_xxx.hpp" 1 +# 22 "/usr/include/boost-1_42/boost/mpl/has_xxx.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/msvc_typename.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/mpl/has_xxx.hpp" 2 +# 18 "/usr/include/boost-1_42/boost/mpl/aux_/has_apply.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/has_apply.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/aux_/has_apply.hpp" 2 + +namespace boost { namespace mpl { namespace aux { + +template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_apply { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; + + + + + + + +}}} +# 24 "/usr/include/boost-1_42/boost/mpl/apply_wrap.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/msvc_never_true.hpp" 1 +# 26 "/usr/include/boost-1_42/boost/mpl/apply_wrap.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/use_preprocessed.hpp" 1 +# 29 "/usr/include/boost-1_42/boost/mpl/apply_wrap.hpp" 2 + + + + + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/compiler.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/stringize.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 2 +# 37 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp" +namespace boost { namespace mpl { + +template< + typename F + + , typename has_apply_ = typename aux::has_apply::type + + > +struct apply_wrap0 + + : F::template apply< > +{ +}; + +template< typename F > +struct apply_wrap0< F,true_ > + : F::apply +{ +}; + +template< + typename F, typename T1 + + > +struct apply_wrap1 + + : F::template apply +{ +}; + +template< + typename F, typename T1, typename T2 + + > +struct apply_wrap2 + + : F::template apply< T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + + > +struct apply_wrap3 + + : F::template apply< T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + + > +struct apply_wrap4 + + : F::template apply< T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + + > +struct apply_wrap5 + + : F::template apply< T1,T2,T3,T4,T5 > +{ +}; + +}} +# 38 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 2 +# 35 "/usr/include/boost-1_42/boost/mpl/apply_wrap.hpp" 2 +# 23 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_op.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/mpl/tag.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/tag.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/eval_if.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/mpl/eval_if.hpp" +namespace boost { namespace mpl { + +template< + typename C = na + , typename F1 = na + , typename F2 = na + > +struct eval_if + + + + +{ + typedef typename if_::type f_; + typedef typename f_::type type; + + + + + +}; + + + +template< + bool C + , typename F1 + , typename F2 + > +struct eval_if_c + + + + +{ + typedef typename if_c::type f_; + typedef typename f_::type type; + + + + +}; + +template<> struct eval_if< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : eval_if< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< eval_if< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef eval_if< na , na , na > result_; typedef eval_if< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< eval_if< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< eval_if< na , na , na > > : int_<-1> { }; } + +}} +# 18 "/usr/include/boost-1_42/boost/mpl/tag.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/has_tag.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/aux_/has_tag.hpp" +namespace boost { namespace mpl { namespace aux { +template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_tag { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; +}}} +# 20 "/usr/include/boost-1_42/boost/mpl/tag.hpp" 2 + + +namespace boost { namespace mpl { + +namespace aux { +template< typename T > struct tag_impl +{ + typedef typename T::tag type; +}; +} + +template< typename T, typename Default = void_ > struct tag + + : if_< + aux::has_tag + , aux::tag_impl + , Default + >::type +{ +# 48 "/usr/include/boost-1_42/boost/mpl/tag.hpp" +}; + +}} +# 25 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_op.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_cast_utils.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_cast_utils.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/apply_wrap.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_cast_utils.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/forwarding.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_cast_utils.hpp" 2 + +namespace boost { namespace mpl { namespace aux { + +template< + typename F + , typename Tag1 + , typename Tag2 + > +struct cast1st_impl +{ + template< typename N1, typename N2 > struct apply + + : apply_wrap2< + F + , typename apply_wrap1< numeric_cast,N1 >::type + , N2 + > + { +# 46 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_cast_utils.hpp" + }; +}; + +template< + typename F + , typename Tag1 + , typename Tag2 + > +struct cast2nd_impl +{ + template< typename N1, typename N2 > struct apply + + : apply_wrap2< + F + , N1 + , typename apply_wrap1< numeric_cast,N2 >::type + > + { +# 72 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_cast_utils.hpp" + }; +}; + +}}} +# 26 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_op.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/msvc_eti_base.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/aux_/msvc_eti_base.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/is_msvc_eti_arg.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/mpl/aux_/is_msvc_eti_arg.hpp" +namespace boost { namespace mpl { namespace aux { +# 62 "/usr/include/boost-1_42/boost/mpl/aux_/is_msvc_eti_arg.hpp" +}}} +# 18 "/usr/include/boost-1_42/boost/mpl/aux_/msvc_eti_base.hpp" 2 + + + + +namespace boost { namespace mpl { namespace aux { +# 55 "/usr/include/boost-1_42/boost/mpl/aux_/msvc_eti_base.hpp" +template< typename T > struct msvc_eti_base + : T +{ + + msvc_eti_base(); + + typedef T type; +}; + + + +template<> struct msvc_eti_base +{ + typedef msvc_eti_base type; + typedef msvc_eti_base first; + typedef msvc_eti_base second; + typedef msvc_eti_base tag; + enum { value = 0 }; +}; + +}}} +# 30 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_op.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/mpl/aux_/arithmetic_op.hpp" 2 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/plus.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/plus.hpp" +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( Tag1::value + > Tag2::value + ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + + +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename N1 = na + , typename N2 = na + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ + + + + + +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + + + + + +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + + + + + +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag::type + , typename plus_tag::type + >::template apply< N1,N2 >::type +{ + + + + + + +}; + +template<> struct plus< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : plus< T1 , T2 > { }; }; template< typename Tag > struct lambda< plus< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef plus< na , na > result_; typedef plus< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< plus< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< plus< na , na > > : int_<-1> { }; } + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( N1::value + + N2::value + ) + > + { + }; +}; + +}} +# 38 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 2 +# 35 "/usr/include/boost-1_42/boost/mpl/aux_/arithmetic_op.hpp" 2 +# 20 "/usr/include/boost-1_42/boost/mpl/plus.hpp" 2 +# 20 "/usr/include/boost-1_42/boost/mpl/vector/aux_/iterator.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/minus.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/minus.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/arithmetic_op.hpp" 1 +# 26 "/usr/include/boost-1_42/boost/mpl/aux_/arithmetic_op.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_op.hpp" 1 +# 22 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_op.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/apply_wrap.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_op.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/mpl/aux_/arithmetic_op.hpp" 2 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/minus.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/minus.hpp" +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( Tag1::value + > Tag2::value + ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + + +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename N1 = na + , typename N2 = na + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ + + + + + +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + + + + + +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + + + + + +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag::type + , typename minus_tag::type + >::template apply< N1,N2 >::type +{ + + + + + + +}; + +template<> struct minus< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : minus< T1 , T2 > { }; }; template< typename Tag > struct lambda< minus< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef minus< na , na > result_; typedef minus< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< minus< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< minus< na , na > > : int_<-1> { }; } + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( N1::value + - N2::value + ) + > + { + }; +}; + +}} +# 38 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 2 +# 35 "/usr/include/boost-1_42/boost/mpl/aux_/arithmetic_op.hpp" 2 +# 20 "/usr/include/boost-1_42/boost/mpl/minus.hpp" 2 +# 21 "/usr/include/boost-1_42/boost/mpl/vector/aux_/iterator.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/advance_fwd.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/advance_fwd.hpp" +namespace boost { namespace mpl { + + + +template< typename Tag > struct advance_impl; +template< typename Iterator, typename N > struct advance; + +}} +# 22 "/usr/include/boost-1_42/boost/mpl/vector/aux_/iterator.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/distance_fwd.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/distance_fwd.hpp" +namespace boost { namespace mpl { + + + +template< typename Tag > struct distance_impl; +template< typename First, typename Last > struct distance; + +}} +# 23 "/usr/include/boost-1_42/boost/mpl/vector/aux_/iterator.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/next.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/mpl/vector/aux_/iterator.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/prior.hpp" 1 +# 25 "/usr/include/boost-1_42/boost/mpl/vector/aux_/iterator.hpp" 2 + + + + + +namespace boost { namespace mpl { + +template< + typename Vector + , long n_ + > +struct v_iter +{ + typedef aux::v_iter_tag tag; + typedef random_access_iterator_tag category; + typedef typename v_at::type type; + + typedef Vector vector_; + typedef mpl::long_ pos; +# 56 "/usr/include/boost-1_42/boost/mpl/vector/aux_/iterator.hpp" +}; + + + + +template< + typename Vector + , long n_ + > +struct next< v_iter > +{ + typedef v_iter type; +}; + +template< + typename Vector + , long n_ + > +struct prior< v_iter > +{ + typedef v_iter type; +}; + +template< + typename Vector + , long n_ + , typename Distance + > +struct advance< v_iter,Distance> +{ + typedef v_iter< + Vector + , (n_ + Distance::value) + > type; +}; + +template< + typename Vector + , long n_ + , long m_ + > +struct distance< v_iter, v_iter > + : mpl::long_<(m_ - n_)> +{ +}; +# 128 "/usr/include/boost-1_42/boost/mpl/vector/aux_/iterator.hpp" +}} +# 23 "/usr/include/boost-1_42/boost/mpl/vector/aux_/vector0.hpp" 2 + + + +namespace boost { namespace mpl { + +template< typename Dummy = na > struct vector0; + +template<> struct vector0 +{ + + typedef aux::vector_tag tag; + typedef vector0 type; + typedef long_<32768> lower_bound_; + typedef lower_bound_ upper_bound_; + typedef long_<0> size; + + static aux::type_wrapper item_(...); +# 48 "/usr/include/boost-1_42/boost/mpl/vector/aux_/vector0.hpp" +}; + +}} +# 19 "/usr/include/boost-1_42/boost/mpl/vector/aux_/clear.hpp" 2 + + + + +namespace boost { namespace mpl { + + + +template<> +struct clear_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; +# 53 "/usr/include/boost-1_42/boost/mpl/vector/aux_/clear.hpp" +}} +# 25 "/usr/include/boost-1_42/boost/mpl/vector/vector0.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/vector/aux_/O1_size.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/vector/aux_/O1_size.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/O1_size_fwd.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/O1_size_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct O1_size_impl; +template< typename Sequence > struct O1_size; + +}} +# 18 "/usr/include/boost-1_42/boost/mpl/vector/aux_/O1_size.hpp" 2 + + + + + + +namespace boost { namespace mpl { + + + +template<> +struct O1_size_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + : Vector::size + { + }; +}; +# 54 "/usr/include/boost-1_42/boost/mpl/vector/aux_/O1_size.hpp" +}} +# 26 "/usr/include/boost-1_42/boost/mpl/vector/vector0.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/vector/aux_/size.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/vector/aux_/size.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/size_fwd.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/size_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct size_impl; +template< typename Sequence > struct size; + +}} +# 18 "/usr/include/boost-1_42/boost/mpl/vector/aux_/size.hpp" 2 + + + + + +namespace boost { namespace mpl { + + + +template<> +struct size_impl< aux::vector_tag > + : O1_size_impl< aux::vector_tag > +{ +}; +# 47 "/usr/include/boost-1_42/boost/mpl/vector/aux_/size.hpp" +}} +# 27 "/usr/include/boost-1_42/boost/mpl/vector/vector0.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/vector/aux_/empty.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/vector/aux_/empty.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/empty_fwd.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/empty_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct empty_impl; +template< typename Sequence > struct empty; + +}} +# 18 "/usr/include/boost-1_42/boost/mpl/vector/aux_/empty.hpp" 2 + + + + + + +namespace boost { namespace mpl { + + + +template<> +struct empty_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + : is_same< + typename Vector::lower_bound_ + , typename Vector::upper_bound_ + > + { + }; +}; +# 66 "/usr/include/boost-1_42/boost/mpl/vector/aux_/empty.hpp" +}} +# 28 "/usr/include/boost-1_42/boost/mpl/vector/vector0.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/mpl/vector/aux_/begin_end.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/mpl/vector/aux_/begin_end.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/begin_end_fwd.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/begin_end_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct begin_impl; +template< typename Tag > struct end_impl; + +template< typename Sequence > struct begin; +template< typename Sequence > struct end; + +}} +# 22 "/usr/include/boost-1_42/boost/mpl/vector/aux_/begin_end.hpp" 2 + + + +namespace boost { namespace mpl { + +template<> +struct begin_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef v_iter type; + }; +}; + +template<> +struct end_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef v_iter type; + }; +}; + +}} +# 32 "/usr/include/boost-1_42/boost/mpl/vector/vector0.hpp" 2 +# 19 "/usr/include/boost-1_42/boost/mpl/vector/vector10.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/mpl/vector/vector10.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/vector/aux_/include_preprocessed.hpp" 1 +# 49 "/usr/include/boost-1_42/boost/mpl/vector/aux_/include_preprocessed.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp" +namespace boost { namespace mpl { + +template< + typename T0 + > +struct vector1 + : v_item< + T0 + , vector0< > + > +{ + typedef vector1 type; +}; + +template< + typename T0, typename T1 + > +struct vector2 + : v_item< + T1 + , vector1 + > +{ + typedef vector2 type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct vector3 + : v_item< + T2 + , vector2< T0,T1 > + > +{ + typedef vector3 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct vector4 + : v_item< + T3 + , vector3< T0,T1,T2 > + > +{ + typedef vector4 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct vector5 + : v_item< + T4 + , vector4< T0,T1,T2,T3 > + > +{ + typedef vector5 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct vector6 + : v_item< + T5 + , vector5< T0,T1,T2,T3,T4 > + > +{ + typedef vector6 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct vector7 + : v_item< + T6 + , vector6< T0,T1,T2,T3,T4,T5 > + > +{ + typedef vector7 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct vector8 + : v_item< + T7 + , vector7< T0,T1,T2,T3,T4,T5,T6 > + > +{ + typedef vector8 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct vector9 + : v_item< + T8 + , vector8< T0,T1,T2,T3,T4,T5,T6,T7 > + > +{ + typedef vector9 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct vector10 + : v_item< + T9 + , vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > + > +{ + typedef vector10 type; +}; + +}} +# 50 "/usr/include/boost-1_42/boost/mpl/vector/aux_/include_preprocessed.hpp" 2 +# 28 "/usr/include/boost-1_42/boost/mpl/vector/vector10.hpp" 2 +# 19 "/usr/include/boost-1_42/boost/mpl/vector/vector20.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/mpl/vector/vector20.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/vector/aux_/include_preprocessed.hpp" 1 +# 49 "/usr/include/boost-1_42/boost/mpl/vector/aux_/include_preprocessed.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp" +namespace boost { namespace mpl { + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector11 + : v_item< + T10 + , vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > + > +{ + typedef vector11 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector12 + : v_item< + T11 + , vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > + > +{ + typedef vector12 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector13 + : v_item< + T12 + , vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > + > +{ + typedef vector13 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector14 + : v_item< + T13 + , vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > + > +{ + typedef vector14 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector15 + : v_item< + T14 + , vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > + > +{ + typedef vector15 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector16 + : v_item< + T15 + , vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 > + > +{ + typedef vector16 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector17 + : v_item< + T16 + , vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 > + > +{ + typedef vector17 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector18 + : v_item< + T17 + , vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 > + > +{ + typedef vector18 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector19 + : v_item< + T18 + , vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 > + > +{ + typedef vector19 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector20 + : v_item< + T19 + , vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 > + > +{ + typedef vector20 type; +}; + +}} +# 50 "/usr/include/boost-1_42/boost/mpl/vector/aux_/include_preprocessed.hpp" 2 +# 28 "/usr/include/boost-1_42/boost/mpl/vector/vector20.hpp" 2 +# 29 "/usr/include/boost-1_42/boost/python/detail/type_list.hpp" 2 + + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" 1 +# 9 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/type_list.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/enum_params_with_a_default.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/preprocessor/enum_params_with_a_default.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/repetition/enum_params_with_a_default.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/preprocessor/repetition/enum_params_with_a_default.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/facilities/intercept.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/preprocessor/repetition/enum_params_with_a_default.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/repetition/enum_binary_params.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/preprocessor/repetition/enum_params_with_a_default.hpp" 2 +# 16 "/usr/include/boost-1_42/boost/preprocessor/enum_params_with_a_default.hpp" 2 +# 13 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iterate.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/preprocessor/iterate.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/iterate.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/preprocessor/iteration/iterate.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/array/elem.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/preprocessor/array/elem.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/array/data.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/preprocessor/array/elem.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/array/size.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/preprocessor/array/elem.hpp" 2 +# 18 "/usr/include/boost-1_42/boost/preprocessor/iteration/iterate.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/slot.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/preprocessor/slot/slot.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/def.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/preprocessor/slot/slot.hpp" 2 +# 21 "/usr/include/boost-1_42/boost/preprocessor/iteration/iterate.hpp" 2 +# 16 "/usr/include/boost-1_42/boost/preprocessor/iterate.hpp" 2 +# 17 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/repetition/enum_trailing.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/preprocessor/repetition/enum_trailing.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/detail/auto_rec.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/preprocessor/repetition/enum_trailing.hpp" 2 +# 18 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" 2 + +namespace boost { namespace python { namespace detail { + +template < class T0 = mpl::void_ , class T1 = mpl::void_ , class T2 = mpl::void_ , class T3 = mpl::void_ , class T4 = mpl::void_ , class T5 = mpl::void_ , class T6 = mpl::void_ , class T7 = mpl::void_ , class T8 = mpl::void_ , class T9 = mpl::void_ , class T10 = mpl::void_ , class T11 = mpl::void_ , class T12 = mpl::void_ , class T13 = mpl::void_ , class T14 = mpl::void_ , class T15 = mpl::void_ , class T16 = mpl::void_ > +struct type_list + : mpl::vector17< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16> +{ +}; + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 47 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" 1 +# 41 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" +template < + + > +struct type_list< + + + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector0<> +{ +}; +# 48 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" 1 +# 41 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" +template < + class T0 + > +struct type_list< + T0 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector1< T0> +{ +}; +# 53 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" 1 +# 41 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" +template < + class T0 , class T1 + > +struct type_list< + T0 , T1 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector2< T0 , T1> +{ +}; +# 58 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" 1 +# 41 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" +template < + class T0 , class T1 , class T2 + > +struct type_list< + T0 , T1 , T2 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector3< T0 , T1 , T2> +{ +}; +# 63 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" 1 +# 41 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" +template < + class T0 , class T1 , class T2 , class T3 + > +struct type_list< + T0 , T1 , T2 , T3 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector4< T0 , T1 , T2 , T3> +{ +}; +# 68 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" 1 +# 41 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" +template < + class T0 , class T1 , class T2 , class T3 , class T4 + > +struct type_list< + T0 , T1 , T2 , T3 , T4 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector5< T0 , T1 , T2 , T3 , T4> +{ +}; +# 73 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" 1 +# 41 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" +template < + class T0 , class T1 , class T2 , class T3 , class T4 , class T5 + > +struct type_list< + T0 , T1 , T2 , T3 , T4 , T5 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector6< T0 , T1 , T2 , T3 , T4 , T5> +{ +}; +# 78 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" 1 +# 41 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" +template < + class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 + > +struct type_list< + T0 , T1 , T2 , T3 , T4 , T5 , T6 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector7< T0 , T1 , T2 , T3 , T4 , T5 , T6> +{ +}; +# 83 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" 1 +# 41 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" +template < + class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 + > +struct type_list< + T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector8< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7> +{ +}; +# 88 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" 1 +# 41 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" +template < + class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 + > +struct type_list< + T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector9< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8> +{ +}; +# 93 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" 1 +# 41 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" +template < + class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 + > +struct type_list< + T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector10< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> +{ +}; +# 98 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" 1 +# 41 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" +template < + class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 + > +struct type_list< + T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector11< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10> +{ +}; +# 103 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" 1 +# 41 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" +template < + class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 + > +struct type_list< + T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector12< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11> +{ +}; +# 108 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" 1 +# 41 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" +template < + class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 + > +struct type_list< + T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector13< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12> +{ +}; +# 113 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" 1 +# 41 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" +template < + class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 + > +struct type_list< + T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 + , + + mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector14< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13> +{ +}; +# 118 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" 1 +# 41 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" +template < + class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 + > +struct type_list< + T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 + , + + mpl::void_ , mpl::void_ + > + : mpl::vector15< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14> +{ +}; +# 123 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" 1 +# 41 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" +template < + class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 + > +struct type_list< + T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 + , + + mpl::void_ + > + : mpl::vector16< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15> +{ +}; +# 128 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 30 "/usr/include/boost-1_42/boost/python/detail/type_list_impl.hpp" 2 + + +}}} +# 35 "/usr/include/boost-1_42/boost/python/detail/type_list.hpp" 2 +# 14 "/usr/include/boost-1_42/boost/python/args.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/type_traits/remove_reference.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/type_traits/remove_reference.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 2 +# 22 "/usr/include/boost-1_42/boost/type_traits/remove_reference.hpp" 2 + +namespace boost { + + + +template< typename T > struct remove_reference { typedef T type; }; +template< typename T > struct remove_reference { typedef T type; }; +# 46 "/usr/include/boost-1_42/boost/type_traits/remove_reference.hpp" +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_undef.hpp" 1 +# 49 "/usr/include/boost-1_42/boost/type_traits/remove_reference.hpp" 2 +# 17 "/usr/include/boost-1_42/boost/python/args.hpp" 2 + + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/local.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/python/args.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/detail/mpl_lambda.hpp" 1 +# 25 "/usr/include/boost-1_42/boost/python/args.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/object_core.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/python/object_core.hpp" +# 1 "/usr/include/boost-1_42/boost/python/call.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/python/call.hpp" +# 1 "/usr/include/boost-1_42/boost/python/converter/arg_to_python.hpp" 1 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/python/ptr.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/python/ptr.hpp" +namespace boost { namespace python { + +template class pointer_wrapper +{ + public: + typedef Ptr type; + + explicit pointer_wrapper(Ptr x): p_(x) {} + operator Ptr() const { return p_; } + Ptr get() const { return p_; } + private: + Ptr p_; +}; + +template +inline pointer_wrapper ptr(T t) +{ + return pointer_wrapper(t); +} + + +template +class is_pointer_wrapper + : public mpl::false_ +{ +}; + +template +class is_pointer_wrapper > + : public mpl::true_ +{ +}; + +template +class unwrap_pointer +{ + public: + typedef T type; +}; + +template +class unwrap_pointer > +{ + public: + typedef T type; +}; +# 126 "/usr/include/boost-1_42/boost/python/ptr.hpp" +}} +# 9 "/usr/include/boost-1_42/boost/python/converter/arg_to_python.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/to_python_indirect.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/to_python_indirect.hpp" +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" +# 1 "/usr/include/boost-1_42/boost/python/instance_holder.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/instance_holder.hpp" +# 1 "/usr/include/boost-1_42/boost/utility.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/utility.hpp" +# 1 "/usr/include/boost-1_42/boost/utility/base_from_member.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/utility/base_from_member.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/repetition/repeat_from_to.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/preprocessor/repetition/repeat_from_to.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/detail/auto_rec.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/repetition/repeat_from_to.hpp" 2 +# 17 "/usr/include/boost-1_42/boost/utility/base_from_member.hpp" 2 +# 53 "/usr/include/boost-1_42/boost/utility/base_from_member.hpp" +namespace boost +{ +# 65 "/usr/include/boost-1_42/boost/utility/base_from_member.hpp" +template < typename MemberType, int UniqueID = 0 > +class base_from_member +{ +protected: + MemberType member; + + base_from_member() + : member() + {} + + + template < typename T0 > explicit base_from_member( T0 x0 ) : member( x0 ) {} template < typename T0 , typename T1 > explicit base_from_member( T0 x0 , T1 x1 ) : member( x0 , x1 ) {} template < typename T0 , typename T1 , typename T2 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 ) : member( x0 , x1 , x2 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 ) : member( x0 , x1 , x2 , x3 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 ) : member( x0 , x1 , x2 , x3 , x4 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 ) : member( x0 , x1 , x2 , x3 , x4 , x5 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 , T6 x6 ) : member( x0 , x1 , x2 , x3 , x4 , x5 , x6 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 , T6 x6 , T7 x7 ) : member( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 , T6 x6 , T7 x7 , T8 x8 ) : member( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 , T6 x6 , T7 x7 , T8 x8 , T9 x9 ) : member( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 ) {} + +}; + +} +# 14 "/usr/include/boost-1_42/boost/utility.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/utility/binary.hpp" 1 +# 26 "/usr/include/boost-1_42/boost/utility/binary.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/control/deduce_d.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/preprocessor/control/deduce_d.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/detail/auto_rec.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/preprocessor/control/deduce_d.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/utility/binary.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/seq/cat.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/preprocessor/seq/cat.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/seq/fold_left.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/preprocessor/seq/fold_left.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/detail/auto_rec.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/preprocessor/seq/fold_left.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/seq/seq.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/preprocessor/seq/seq.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/seq/elem.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/preprocessor/seq/seq.hpp" 2 +# 21 "/usr/include/boost-1_42/boost/preprocessor/seq/fold_left.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/seq/size.hpp" 1 +# 22 "/usr/include/boost-1_42/boost/preprocessor/seq/fold_left.hpp" 2 +# 19 "/usr/include/boost-1_42/boost/preprocessor/seq/cat.hpp" 2 +# 30 "/usr/include/boost-1_42/boost/utility/binary.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/seq/transform.hpp" 1 +# 31 "/usr/include/boost-1_42/boost/utility/binary.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/arithmetic/mod.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/preprocessor/arithmetic/mod.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/arithmetic/detail/div_base.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/preprocessor/arithmetic/detail/div_base.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/comparison/less_equal.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/preprocessor/comparison/less_equal.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/logical/not.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/preprocessor/comparison/less_equal.hpp" 2 +# 20 "/usr/include/boost-1_42/boost/preprocessor/arithmetic/detail/div_base.hpp" 2 +# 18 "/usr/include/boost-1_42/boost/preprocessor/arithmetic/mod.hpp" 2 +# 32 "/usr/include/boost-1_42/boost/utility/binary.hpp" 2 +# 15 "/usr/include/boost-1_42/boost/utility.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/checked_delete.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/checked_delete.hpp" +namespace boost +{ + + + +template inline void checked_delete(T * x) +{ + + typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; + (void) sizeof(type_must_be_complete); + delete x; +} + +template inline void checked_array_delete(T * x) +{ + typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; + (void) sizeof(type_must_be_complete); + delete [] x; +} + +template struct checked_deleter +{ + typedef void result_type; + typedef T * argument_type; + + void operator()(T * x) const + { + + boost::checked_delete(x); + } +}; + +template struct checked_array_deleter +{ + typedef void result_type; + typedef T * argument_type; + + void operator()(T * x) const + { + boost::checked_array_delete(x); + } +}; + +} +# 17 "/usr/include/boost-1_42/boost/utility.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/next_prior.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/next_prior.hpp" +namespace boost { +# 29 "/usr/include/boost-1_42/boost/next_prior.hpp" +template +inline T next(T x) { return ++x; } + +template +inline T next(T x, Distance n) +{ + std::advance(x, n); + return x; +} + +template +inline T prior(T x) { return --x; } + +template +inline T prior(T x, Distance n) +{ + std::advance(x, -n); + return x; +} + +} +# 18 "/usr/include/boost-1_42/boost/utility.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/noncopyable.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/noncopyable.hpp" +namespace boost { + + + + + + +namespace noncopyable_ +{ + class noncopyable + { + protected: + noncopyable() {} + ~noncopyable() {} + private: + noncopyable( const noncopyable& ); + const noncopyable& operator=( const noncopyable& ); + }; +} + +typedef noncopyable_::noncopyable noncopyable; + +} +# 19 "/usr/include/boost-1_42/boost/utility.hpp" 2 +# 11 "/usr/include/boost-1_42/boost/python/instance_holder.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/type_id.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/type_id.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/msvc_typeinfo.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/type_id.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/operators.hpp" 1 +# 84 "/usr/include/boost-1_42/boost/operators.hpp" +# 1 "/usr/include/boost-1_42/boost/iterator.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/iterator.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 19 "/usr/include/boost-1_42/boost/iterator.hpp" 2 + + +namespace boost +{ +# 39 "/usr/include/boost-1_42/boost/iterator.hpp" + namespace detail { + template + + struct iterator_base : std::iterator {}; +# 51 "/usr/include/boost-1_42/boost/iterator.hpp" + } + + template + struct iterator : boost::detail::iterator_base {}; + +} +# 85 "/usr/include/boost-1_42/boost/operators.hpp" 2 +# 95 "/usr/include/boost-1_42/boost/operators.hpp" +namespace boost { +namespace detail { + +template class empty_base { + + + + + + +}; + +} +} +# 118 "/usr/include/boost-1_42/boost/operators.hpp" +namespace boost +{ + + + + + + + +template > +struct less_than_comparable2 : B +{ + friend bool operator<=(const T& x, const U& y) { return !static_cast(x > y); } + friend bool operator>=(const T& x, const U& y) { return !static_cast(x < y); } + friend bool operator>(const U& x, const T& y) { return y < x; } + friend bool operator<(const U& x, const T& y) { return y > x; } + friend bool operator<=(const U& x, const T& y) { return !static_cast(y < x); } + friend bool operator>=(const U& x, const T& y) { return !static_cast(y > x); } +}; + +template > +struct less_than_comparable1 : B +{ + friend bool operator>(const T& x, const T& y) { return y < x; } + friend bool operator<=(const T& x, const T& y) { return !static_cast(y < x); } + friend bool operator>=(const T& x, const T& y) { return !static_cast(x < y); } +}; + +template > +struct equality_comparable2 : B +{ + friend bool operator==(const U& y, const T& x) { return x == y; } + friend bool operator!=(const U& y, const T& x) { return !static_cast(x == y); } + friend bool operator!=(const T& y, const U& x) { return !static_cast(y == x); } +}; + +template > +struct equality_comparable1 : B +{ + friend bool operator!=(const T& x, const T& y) { return !static_cast(x == y); } +}; +# 254 "/usr/include/boost-1_42/boost/operators.hpp" +template > struct multipliable2 : B { friend T operator *( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv *= rhs; return nrv; } friend T operator *( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv *= lhs; return nrv; } }; template > struct multipliable1 : B { friend T operator *( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv *= rhs; return nrv; } }; +template > struct addable2 : B { friend T operator +( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv += rhs; return nrv; } friend T operator +( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv += lhs; return nrv; } }; template > struct addable1 : B { friend T operator +( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv += rhs; return nrv; } }; +template > struct subtractable2 : B { friend T operator -( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv -= rhs; return nrv; } }; template > struct subtractable2_left : B { friend T operator -( const U& lhs, const T& rhs ) { T nrv( lhs ); nrv -= rhs; return nrv; } }; template > struct subtractable1 : B { friend T operator -( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv -= rhs; return nrv; } }; +template > struct dividable2 : B { friend T operator /( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv /= rhs; return nrv; } }; template > struct dividable2_left : B { friend T operator /( const U& lhs, const T& rhs ) { T nrv( lhs ); nrv /= rhs; return nrv; } }; template > struct dividable1 : B { friend T operator /( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv /= rhs; return nrv; } }; +template > struct modable2 : B { friend T operator %( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv %= rhs; return nrv; } }; template > struct modable2_left : B { friend T operator %( const U& lhs, const T& rhs ) { T nrv( lhs ); nrv %= rhs; return nrv; } }; template > struct modable1 : B { friend T operator %( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv %= rhs; return nrv; } }; +template > struct xorable2 : B { friend T operator ^( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv ^= rhs; return nrv; } friend T operator ^( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv ^= lhs; return nrv; } }; template > struct xorable1 : B { friend T operator ^( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv ^= rhs; return nrv; } }; +template > struct andable2 : B { friend T operator &( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv &= rhs; return nrv; } friend T operator &( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv &= lhs; return nrv; } }; template > struct andable1 : B { friend T operator &( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv &= rhs; return nrv; } }; +template > struct orable2 : B { friend T operator |( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv |= rhs; return nrv; } friend T operator |( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv |= lhs; return nrv; } }; template > struct orable1 : B { friend T operator |( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv |= rhs; return nrv; } }; + + + + + + + +template > +struct incrementable : B +{ + friend T operator++(T& x, int) + { + incrementable_type nrv(x); + ++x; + return nrv; + } +private: + typedef T incrementable_type; +}; + +template > +struct decrementable : B +{ + friend T operator--(T& x, int) + { + decrementable_type nrv(x); + --x; + return nrv; + } +private: + typedef T decrementable_type; +}; + + + +template > +struct dereferenceable : B +{ + P operator->() const + { + return &*static_cast(*this); + } +}; + +template > +struct indexable : B +{ + R operator[](I n) const + { + return *(static_cast(*this) + n); + } +}; +# 352 "/usr/include/boost-1_42/boost/operators.hpp" +template > struct left_shiftable2 : B { friend T operator <<( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv <<= rhs; return nrv; } }; template > struct left_shiftable1 : B { friend T operator <<( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv <<= rhs; return nrv; } }; +template > struct right_shiftable2 : B { friend T operator >>( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv >>= rhs; return nrv; } }; template > struct right_shiftable1 : B { friend T operator >>( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv >>= rhs; return nrv; } }; + + + +template > +struct equivalent2 : B +{ + friend bool operator==(const T& x, const U& y) + { + return !static_cast(x < y) && !static_cast(x > y); + } +}; + +template > +struct equivalent1 : B +{ + friend bool operator==(const T&x, const T&y) + { + return !static_cast(x < y) && !static_cast(y < x); + } +}; + +template > +struct partially_ordered2 : B +{ + friend bool operator<=(const T& x, const U& y) + { return static_cast(x < y) || static_cast(x == y); } + friend bool operator>=(const T& x, const U& y) + { return static_cast(x > y) || static_cast(x == y); } + friend bool operator>(const U& x, const T& y) + { return y < x; } + friend bool operator<(const U& x, const T& y) + { return y > x; } + friend bool operator<=(const U& x, const T& y) + { return static_cast(y > x) || static_cast(y == x); } + friend bool operator>=(const U& x, const T& y) + { return static_cast(y < x) || static_cast(y == x); } +}; + +template > +struct partially_ordered1 : B +{ + friend bool operator>(const T& x, const T& y) + { return y < x; } + friend bool operator<=(const T& x, const T& y) + { return static_cast(x < y) || static_cast(x == y); } + friend bool operator>=(const T& x, const T& y) + { return static_cast(y < x) || static_cast(x == y); } +}; + + + +template > +struct totally_ordered2 + : less_than_comparable2 > {}; + +template > +struct totally_ordered1 + : less_than_comparable1 > {}; + +template > +struct additive2 + : addable2 > {}; + +template > +struct additive1 + : addable1 > {}; + +template > +struct multiplicative2 + : multipliable2 > {}; + +template > +struct multiplicative1 + : multipliable1 > {}; + +template > +struct integer_multiplicative2 + : multiplicative2 > {}; + +template > +struct integer_multiplicative1 + : multiplicative1 > {}; + +template > +struct arithmetic2 + : additive2 > {}; + +template > +struct arithmetic1 + : additive1 > {}; + +template > +struct integer_arithmetic2 + : additive2 > {}; + +template > +struct integer_arithmetic1 + : additive1 > {}; + +template > +struct bitwise2 + : xorable2 > > {}; + +template > +struct bitwise1 + : xorable1 > > {}; + +template > +struct unit_steppable + : incrementable > {}; + +template > +struct shiftable2 + : left_shiftable2 > {}; + +template > +struct shiftable1 + : left_shiftable1 > {}; + +template > +struct ring_operators2 + : additive2 > > {}; + +template > +struct ring_operators1 + : additive1 > {}; + +template > +struct ordered_ring_operators2 + : ring_operators2 > {}; + +template > +struct ordered_ring_operators1 + : ring_operators1 > {}; + +template > +struct field_operators2 + : ring_operators2 > > {}; + +template > +struct field_operators1 + : ring_operators1 > {}; + +template > +struct ordered_field_operators2 + : field_operators2 > {}; + +template > +struct ordered_field_operators1 + : field_operators1 > {}; + +template > +struct euclidian_ring_operators2 + : ring_operators2 > > > > {}; + +template > +struct euclidian_ring_operators1 + : ring_operators1 > > {}; + +template > +struct ordered_euclidian_ring_operators2 + : totally_ordered2 > {}; + +template > +struct ordered_euclidian_ring_operators1 + : totally_ordered1 > {}; + +template > +struct euclidean_ring_operators2 + : ring_operators2 > > > > {}; + +template > +struct euclidean_ring_operators1 + : ring_operators1 > > {}; + +template > +struct ordered_euclidean_ring_operators2 + : totally_ordered2 > {}; + +template > +struct ordered_euclidean_ring_operators1 + : totally_ordered1 > {}; + +template > +struct input_iteratable + : equality_comparable1 > > {}; + +template > +struct output_iteratable + : incrementable {}; + +template > +struct forward_iteratable + : input_iteratable {}; + +template > +struct bidirectional_iteratable + : forward_iteratable > {}; + + + + + +template > +struct random_access_iteratable + : bidirectional_iteratable > > > {}; + + +} +# 718 "/usr/include/boost-1_42/boost/operators.hpp" +namespace boost { + + +namespace detail { + struct true_t {}; + struct false_t {}; +} + + + + +template struct is_chained_base { + typedef ::boost::detail::false_t value; +}; + +} +# 829 "/usr/include/boost-1_42/boost/operators.hpp" +namespace boost { + +template ,class O = typename is_chained_base::value > struct less_than_comparable : less_than_comparable2 {}; template struct less_than_comparable : less_than_comparable1 {}; template struct less_than_comparable : less_than_comparable1 {}; template struct is_chained_base< ::boost::less_than_comparable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::less_than_comparable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::less_than_comparable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct equality_comparable : equality_comparable2 {}; template struct equality_comparable : equality_comparable1 {}; template struct equality_comparable : equality_comparable1 {}; template struct is_chained_base< ::boost::equality_comparable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::equality_comparable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::equality_comparable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct multipliable : multipliable2 {}; template struct multipliable : multipliable1 {}; template struct multipliable : multipliable1 {}; template struct is_chained_base< ::boost::multipliable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::multipliable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::multipliable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct addable : addable2 {}; template struct addable : addable1 {}; template struct addable : addable1 {}; template struct is_chained_base< ::boost::addable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::addable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::addable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct subtractable : subtractable2 {}; template struct subtractable : subtractable1 {}; template struct subtractable : subtractable1 {}; template struct is_chained_base< ::boost::subtractable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::subtractable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::subtractable1 > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::subtractable2_left > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct dividable : dividable2 {}; template struct dividable : dividable1 {}; template struct dividable : dividable1 {}; template struct is_chained_base< ::boost::dividable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::dividable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::dividable1 > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::dividable2_left > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct modable : modable2 {}; template struct modable : modable1 {}; template struct modable : modable1 {}; template struct is_chained_base< ::boost::modable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::modable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::modable1 > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::modable2_left > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct xorable : xorable2 {}; template struct xorable : xorable1 {}; template struct xorable : xorable1 {}; template struct is_chained_base< ::boost::xorable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::xorable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::xorable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct andable : andable2 {}; template struct andable : andable1 {}; template struct andable : andable1 {}; template struct is_chained_base< ::boost::andable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::andable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::andable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct orable : orable2 {}; template struct orable : orable1 {}; template struct orable : orable1 {}; template struct is_chained_base< ::boost::orable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::orable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::orable1 > { typedef ::boost::detail::true_t value; }; + + template struct is_chained_base< ::boost::incrementable > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::decrementable > { typedef ::boost::detail::true_t value; }; + + template struct is_chained_base< ::boost::dereferenceable > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::indexable > { typedef ::boost::detail::true_t value; }; + +template ,class O = typename is_chained_base::value > struct left_shiftable : left_shiftable2 {}; template struct left_shiftable : left_shiftable1 {}; template struct left_shiftable : left_shiftable1 {}; template struct is_chained_base< ::boost::left_shiftable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::left_shiftable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::left_shiftable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct right_shiftable : right_shiftable2 {}; template struct right_shiftable : right_shiftable1 {}; template struct right_shiftable : right_shiftable1 {}; template struct is_chained_base< ::boost::right_shiftable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::right_shiftable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::right_shiftable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct equivalent : equivalent2 {}; template struct equivalent : equivalent1 {}; template struct equivalent : equivalent1 {}; template struct is_chained_base< ::boost::equivalent > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::equivalent2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::equivalent1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct partially_ordered : partially_ordered2 {}; template struct partially_ordered : partially_ordered1 {}; template struct partially_ordered : partially_ordered1 {}; template struct is_chained_base< ::boost::partially_ordered > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::partially_ordered2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::partially_ordered1 > { typedef ::boost::detail::true_t value; }; + +template ,class O = typename is_chained_base::value > struct totally_ordered : totally_ordered2 {}; template struct totally_ordered : totally_ordered1 {}; template struct totally_ordered : totally_ordered1 {}; template struct is_chained_base< ::boost::totally_ordered > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::totally_ordered2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::totally_ordered1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct additive : additive2 {}; template struct additive : additive1 {}; template struct additive : additive1 {}; template struct is_chained_base< ::boost::additive > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::additive2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::additive1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct multiplicative : multiplicative2 {}; template struct multiplicative : multiplicative1 {}; template struct multiplicative : multiplicative1 {}; template struct is_chained_base< ::boost::multiplicative > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::multiplicative2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::multiplicative1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct integer_multiplicative : integer_multiplicative2 {}; template struct integer_multiplicative : integer_multiplicative1 {}; template struct integer_multiplicative : integer_multiplicative1 {}; template struct is_chained_base< ::boost::integer_multiplicative > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::integer_multiplicative2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::integer_multiplicative1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct arithmetic : arithmetic2 {}; template struct arithmetic : arithmetic1 {}; template struct arithmetic : arithmetic1 {}; template struct is_chained_base< ::boost::arithmetic > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::arithmetic2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::arithmetic1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct integer_arithmetic : integer_arithmetic2 {}; template struct integer_arithmetic : integer_arithmetic1 {}; template struct integer_arithmetic : integer_arithmetic1 {}; template struct is_chained_base< ::boost::integer_arithmetic > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::integer_arithmetic2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::integer_arithmetic1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct bitwise : bitwise2 {}; template struct bitwise : bitwise1 {}; template struct bitwise : bitwise1 {}; template struct is_chained_base< ::boost::bitwise > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::bitwise2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::bitwise1 > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::unit_steppable > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct shiftable : shiftable2 {}; template struct shiftable : shiftable1 {}; template struct shiftable : shiftable1 {}; template struct is_chained_base< ::boost::shiftable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::shiftable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::shiftable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct ring_operators : ring_operators2 {}; template struct ring_operators : ring_operators1 {}; template struct ring_operators : ring_operators1 {}; template struct is_chained_base< ::boost::ring_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ring_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ring_operators1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct ordered_ring_operators : ordered_ring_operators2 {}; template struct ordered_ring_operators : ordered_ring_operators1 {}; template struct ordered_ring_operators : ordered_ring_operators1 {}; template struct is_chained_base< ::boost::ordered_ring_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_ring_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_ring_operators1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct field_operators : field_operators2 {}; template struct field_operators : field_operators1 {}; template struct field_operators : field_operators1 {}; template struct is_chained_base< ::boost::field_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::field_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::field_operators1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct ordered_field_operators : ordered_field_operators2 {}; template struct ordered_field_operators : ordered_field_operators1 {}; template struct ordered_field_operators : ordered_field_operators1 {}; template struct is_chained_base< ::boost::ordered_field_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_field_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_field_operators1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct euclidian_ring_operators : euclidian_ring_operators2 {}; template struct euclidian_ring_operators : euclidian_ring_operators1 {}; template struct euclidian_ring_operators : euclidian_ring_operators1 {}; template struct is_chained_base< ::boost::euclidian_ring_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::euclidian_ring_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::euclidian_ring_operators1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct ordered_euclidian_ring_operators : ordered_euclidian_ring_operators2 {}; template struct ordered_euclidian_ring_operators : ordered_euclidian_ring_operators1 {}; template struct ordered_euclidian_ring_operators : ordered_euclidian_ring_operators1 {}; template struct is_chained_base< ::boost::ordered_euclidian_ring_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_euclidian_ring_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_euclidian_ring_operators1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct euclidean_ring_operators : euclidean_ring_operators2 {}; template struct euclidean_ring_operators : euclidean_ring_operators1 {}; template struct euclidean_ring_operators : euclidean_ring_operators1 {}; template struct is_chained_base< ::boost::euclidean_ring_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::euclidean_ring_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::euclidean_ring_operators1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct ordered_euclidean_ring_operators : ordered_euclidean_ring_operators2 {}; template struct ordered_euclidean_ring_operators : ordered_euclidean_ring_operators1 {}; template struct ordered_euclidean_ring_operators : ordered_euclidean_ring_operators1 {}; template struct is_chained_base< ::boost::ordered_euclidean_ring_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_euclidean_ring_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_euclidean_ring_operators1 > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::input_iteratable > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::output_iteratable > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::forward_iteratable > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::bidirectional_iteratable > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::random_access_iteratable > { typedef ::boost::detail::true_t value; }; +# 891 "/usr/include/boost-1_42/boost/operators.hpp" +template +struct operators2 + : totally_ordered2 > > {}; + + +template +struct operators : operators2 {}; + +template struct operators + + + + : totally_ordered > > > {}; + + + + +template +struct input_iterator_helper + : input_iteratable > {}; + +template +struct output_iterator_helper + : output_iteratable > +{ + T& operator*() { return static_cast(*this); } + T& operator++() { return static_cast(*this); } +}; + +template +struct forward_iterator_helper + : forward_iteratable > {}; + +template +struct bidirectional_iterator_helper + : bidirectional_iteratable > {}; + +template +struct random_access_iterator_helper + : random_access_iteratable > +{ + friend D requires_difference_operator(const T& x, const T& y) { + return x - y; + } +}; + +} +# 12 "/usr/include/boost-1_42/boost/python/type_id.hpp" 2 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstring" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstring" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstring" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstring" 2 3 +# 14 "/usr/include/boost-1_42/boost/python/type_id.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/static_assert.hpp" 1 +# 45 "/usr/include/boost-1_42/boost/static_assert.hpp" +namespace boost{ + + +template struct STATIC_ASSERTION_FAILURE; + +template <> struct STATIC_ASSERTION_FAILURE { enum { value = 1 }; }; + + +template struct static_assert_test{}; + +} +# 16 "/usr/include/boost-1_42/boost/python/type_id.hpp" 2 +# 28 "/usr/include/boost-1_42/boost/python/type_id.hpp" +namespace boost { namespace python { +# 44 "/usr/include/boost-1_42/boost/python/type_id.hpp" +bool cxxabi_cxa_demangle_is_broken(); + + + + + + +struct type_info : private totally_ordered +{ + inline type_info(std::type_info const& = typeid(void)); + + inline bool operator<(type_info const& rhs) const; + inline bool operator==(type_info const& rhs) const; + + char const* name() const; + friend std::ostream& operator<<( + std::ostream&, type_info const&); + + private: + + typedef char const* base_id_t; + + + + + base_id_t m_base_type; +}; + + + + + + + +template +inline type_info type_id() +{ + return type_info( + + + + typeid(T) + + + + ); +} +# 119 "/usr/include/boost-1_42/boost/python/type_id.hpp" +inline type_info::type_info(std::type_info const& id) + : m_base_type( + + id.name() + + + + ) +{ +} + +inline bool type_info::operator<(type_info const& rhs) const +{ + + return std::strcmp(m_base_type, rhs.m_base_type) < 0; + + + +} + +inline bool type_info::operator==(type_info const& rhs) const +{ + + return !std::strcmp(m_base_type, rhs.m_base_type); + + + +} + + +namespace detail +{ + char const* gcc_demangle(char const*); +} + + +inline char const* type_info::name() const +{ + char const* raw_name + = m_base_type + + + + ; + + + return detail::gcc_demangle(raw_name); + + + +} + + + std::ostream& operator<<(std::ostream&, type_info const&); + + +template<> +inline type_info type_id() +{ + return type_info (typeid (void *)); +} + +template<> +inline type_info type_id() +{ + return type_info (typeid (void *)); +} + + + + +}} +# 12 "/usr/include/boost-1_42/boost/python/instance_holder.hpp" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 13 "/usr/include/boost-1_42/boost/python/instance_holder.hpp" 2 + +namespace boost { namespace python { + + +struct instance_holder : private noncopyable +{ + public: + instance_holder(); + virtual ~instance_holder(); + + + instance_holder* next() const; + + + + + + + + virtual void* holds(type_info, bool null_ptr_only) = 0; + + void install(PyObject* inst) throw(); + + + + + + + static void* allocate(PyObject*, std::size_t offset, std::size_t size); + + + + static void deallocate(PyObject*, void* storage) throw(); + private: + instance_holder* m_next; +}; + + + + + + + +inline instance_holder* instance_holder::next() const +{ + return m_next; +} + +}} +# 15 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/object/inheritance_query.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/object/inheritance_query.hpp" +namespace boost { namespace python { namespace objects { + + void* find_static_type(void* p, type_info src, type_info dst); + void* find_dynamic_type(void* p, type_info src, type_info dst); + +}}} +# 16 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/object/forward.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/object/forward.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/value_arg.hpp" 1 + + + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/copy_ctor_mutates_rhs.hpp" 1 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/is_auto_ptr.hpp" 1 +# 9 "/usr/include/boost-1_42/boost/python/detail/is_auto_ptr.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/is_xxx.hpp" 1 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/detail/is_xxx.hpp" 1 +# 9 "/usr/include/boost-1_42/boost/python/detail/is_xxx.hpp" 2 +# 10 "/usr/include/boost-1_42/boost/python/detail/is_auto_ptr.hpp" 2 + + + +namespace boost { namespace python { namespace detail { + + + +template struct is_auto_ptr : mpl::false_ { }; template < class T0 > struct is_auto_ptr< std::auto_ptr< T0 > > : mpl::true_ { }; +# 28 "/usr/include/boost-1_42/boost/python/detail/is_auto_ptr.hpp" +}}} +# 9 "/usr/include/boost-1_42/boost/python/detail/copy_ctor_mutates_rhs.hpp" 2 + + +namespace boost { namespace python { namespace detail { + +template +struct copy_ctor_mutates_rhs + : is_auto_ptr +{ +}; + +}}} +# 8 "/usr/include/boost-1_42/boost/python/detail/value_arg.hpp" 2 + + + + +namespace boost { namespace python { namespace detail { + +template +struct value_arg + : mpl::if_< + copy_ctor_mutates_rhs + , T + , typename add_reference< + typename add_const::type + >::type + > +{}; + +}}} +# 14 "/usr/include/boost-1_42/boost/python/object/forward.hpp" 2 + + + + + + +# 1 "/usr/include/boost-1_42/boost/mpl/or.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/mpl/or.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/nested_type_wknd.hpp" 1 +# 25 "/usr/include/boost-1_42/boost/mpl/aux_/nested_type_wknd.hpp" +namespace boost { namespace mpl { namespace aux { +template< typename T > struct nested_type_wknd + : T::type +{ +}; +}}} +# 24 "/usr/include/boost-1_42/boost/mpl/or.hpp" 2 +# 43 "/usr/include/boost-1_42/boost/mpl/or.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/or.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/or.hpp" +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct or_impl + : true_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct or_impl< false,T1,T2,T3,T4 > + : or_impl< + ::boost::mpl::aux::nested_type_wknd::value + , T2, T3, T4 + , false_ + > +{ +}; + +template<> +struct or_impl< + false + , false_, false_, false_, false_ + > + : false_ +{ +}; + +} + +template< + typename T1 = na + , typename T2 = na + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + ::boost::mpl::aux::nested_type_wknd::value + , T2, T3, T4, T5 + > + +{ + + + + + +}; + +template<> struct or_< + + + + na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : or_< T1 , T2 > { }; }; template< typename Tag > struct lambda< or_< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef or_< na , na > result_; typedef or_< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< or_< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< or_< na , na > > : int_<-1> { }; } + +}} +# 38 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 2 +# 44 "/usr/include/boost-1_42/boost/mpl/or.hpp" 2 +# 21 "/usr/include/boost-1_42/boost/python/object/forward.hpp" 2 + + +namespace boost { namespace python { namespace objects { + + + + +template +struct reference_to_value +{ + typedef typename add_reference::type>::type reference; + + reference_to_value(reference x) : m_value(x) {} + reference get() const { return m_value; } + private: + reference m_value; +}; + + + + +template +struct forward + : mpl::if_< +# 54 "/usr/include/boost-1_42/boost/python/object/forward.hpp" + mpl::or_, is_scalar > + + , T + , reference_to_value + > +{ +}; + + +template +struct unforward +{ + typedef typename unwrap_reference::type& type; +}; + +template +struct unforward > +{ + typedef T type; +}; + +template +struct unforward_cref + : python::detail::value_arg< + typename unwrap_reference::type + > +{ +}; + +template +struct unforward_cref > + : add_reference::type> +{ +}; +# 172 "/usr/include/boost-1_42/boost/python/object/forward.hpp" +template +typename reference_to_value::reference +do_unforward(reference_to_value const& x, int) +{ + return x.get(); +} + +template +typename reference_wrapper::type& +do_unforward(reference_wrapper const& x, int) +{ + return x.get(); +} + +template +T const& do_unforward(T const& x, ...) +{ + return x; +} + +}}} +# 17 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/pointee.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/pointee.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/remove_pointer.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/type_traits/remove_pointer.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 2 +# 22 "/usr/include/boost-1_42/boost/type_traits/remove_pointer.hpp" 2 + +namespace boost { + + + +template< typename T > struct remove_pointer { typedef T type; }; +template< typename T > struct remove_pointer { typedef T type; }; +template< typename T > struct remove_pointer { typedef T type; }; +template< typename T > struct remove_pointer { typedef T type; }; +template< typename T > struct remove_pointer { typedef T type; }; + + + + + + + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_undef.hpp" 1 +# 42 "/usr/include/boost-1_42/boost/type_traits/remove_pointer.hpp" 2 +# 12 "/usr/include/boost-1_42/boost/python/pointee.hpp" 2 + +namespace boost { namespace python { + +namespace detail +{ + template + struct pointee_impl + { + template struct apply : remove_pointer {}; + }; + + template <> + struct pointee_impl + { + template struct apply + { + typedef typename T::element_type type; + }; + }; +} + +template +struct pointee + : detail::pointee_impl< + ::boost::is_pointer::value + >::template apply +{ +}; + +}} +# 19 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/python/detail/wrapper_base.hpp" 1 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/is_polymorphic.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/type_traits/is_polymorphic.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 18 "/usr/include/boost-1_42/boost/type_traits/is_polymorphic.hpp" 2 + + +namespace boost{ +# 106 "/usr/include/boost-1_42/boost/type_traits/is_polymorphic.hpp" +template< typename T > struct is_polymorphic : ::boost::integral_constant { }; + + + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 113 "/usr/include/boost-1_42/boost/type_traits/is_polymorphic.hpp" 2 +# 9 "/usr/include/boost-1_42/boost/python/detail/wrapper_base.hpp" 2 + + +namespace boost { namespace python { + +class override; + +namespace detail +{ + class wrapper_base; + + namespace wrapper_base_ + { + inline PyObject* get_owner(wrapper_base const volatile& w); + + inline PyObject* + owner_impl(void const volatile* , mpl::false_) + { + return 0; + } + + template + inline PyObject* + owner_impl(T const volatile* x, mpl::true_); + + template + inline PyObject* + owner(T const volatile* x) + { + return wrapper_base_::owner_impl(x,is_polymorphic()); + } + } + + class wrapper_base + { + friend void initialize_wrapper(PyObject* self, wrapper_base* w); + friend PyObject* wrapper_base_::get_owner(wrapper_base const volatile& w); + protected: + wrapper_base() : m_self(0) {} + + override get_override( + char const* name, PyTypeObject* class_object) const; + + private: + void detach(); + + private: + PyObject* m_self; + }; + + namespace wrapper_base_ + { + template + inline PyObject* + owner_impl(T const volatile* x, mpl::true_) + { + if (wrapper_base const volatile* w = dynamic_cast(x)) + { + return wrapper_base_::get_owner(*w); + } + return 0; + } + + inline PyObject* get_owner(wrapper_base const volatile& w) + { + return w.m_self; + } + } + + inline void initialize_wrapper(PyObject* self, wrapper_base* w) + { + w->m_self = self; + } + + inline void initialize_wrapper(PyObject* , ...) {} + + + +} + +}} +# 22 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/detail/force_instantiate.hpp" 1 + + + + + + + +namespace boost { namespace python { namespace detail { + + + + + + +template +inline void force_instantiate(T const&) {} +# 30 "/usr/include/boost-1_42/boost/python/detail/force_instantiate.hpp" +}}} +# 23 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/mpl/apply.hpp" 1 +# 22 "/usr/include/boost-1_42/boost/mpl/apply.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/apply_fwd.hpp" 1 +# 31 "/usr/include/boost-1_42/boost/mpl/apply_fwd.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp" +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} +# 38 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 2 +# 32 "/usr/include/boost-1_42/boost/mpl/apply_fwd.hpp" 2 +# 23 "/usr/include/boost-1_42/boost/mpl/apply.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/apply_wrap.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/mpl/apply.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/placeholders.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/mpl/placeholders.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/arg.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/mpl/arg.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/arg_fwd.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/mpl/arg_fwd.hpp" +namespace mpl_ { + +template< int N > struct arg; + +} +namespace boost { namespace mpl { using ::mpl_::arg; } } +# 24 "/usr/include/boost-1_42/boost/mpl/arg.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/na_assert.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/mpl/aux_/na_assert.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/assert.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/assert.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/not.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/mpl/not.hpp" +namespace boost { namespace mpl { + +namespace aux { + +template< long C_ > +struct not_impl + : bool_ +{ +}; + +} + + +template< + typename T = na + > +struct not_ + : aux::not_impl< + ::boost::mpl::aux::nested_type_wknd::value + > +{ + +}; + +template<> struct not_< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : not_< T1 > { }; }; template< typename Tag > struct lambda< not_< na > , Tag , int_<-1> > { typedef false_ is_le; typedef not_< na > result_; typedef not_< na > type; }; namespace aux { template< typename T1 > struct template_arity< not_< T1 > > : int_<1> { }; template<> struct template_arity< not_< na > > : int_<-1> { }; } + +}} +# 18 "/usr/include/boost-1_42/boost/mpl/assert.hpp" 2 +# 29 "/usr/include/boost-1_42/boost/mpl/assert.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/pp_counter.hpp" 1 +# 30 "/usr/include/boost-1_42/boost/mpl/assert.hpp" 2 + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 36 "/usr/include/boost-1_42/boost/mpl/assert.hpp" 2 +# 62 "/usr/include/boost-1_42/boost/mpl/assert.hpp" +namespace mpl_ { + +struct failed {}; +# 75 "/usr/include/boost-1_42/boost/mpl/assert.hpp" +template< bool C > struct assert { typedef void* type; }; +template<> struct assert { typedef assert type; }; + +template< bool C > +int assertion_failed( typename assert::type ); + +template< bool C > +struct assertion +{ + static int failed( assert ); +}; + +template<> +struct assertion +{ + static int failed( void* ); +}; + +struct assert_ +{ + + template< typename T1, typename T2 = na, typename T3 = na, typename T4 = na > struct types {}; + + static assert_ const arg; + enum relations { equal = 1, not_equal, greater, greater_equal, less, less_equal }; +}; +# 123 "/usr/include/boost-1_42/boost/mpl/assert.hpp" +boost::mpl::aux::weighted_tag<1>::type operator==( assert_, assert_ ); +boost::mpl::aux::weighted_tag<2>::type operator!=( assert_, assert_ ); +boost::mpl::aux::weighted_tag<3>::type operator>( assert_, assert_ ); +boost::mpl::aux::weighted_tag<4>::type operator>=( assert_, assert_ ); +boost::mpl::aux::weighted_tag<5>::type operator<( assert_, assert_ ); +boost::mpl::aux::weighted_tag<6>::type operator<=( assert_, assert_ ); + +template< assert_::relations r, long x, long y > struct assert_relation {}; + + + + + + +template< bool > struct assert_arg_pred_impl { typedef int type; }; +template<> struct assert_arg_pred_impl { typedef void* type; }; + +template< typename P > struct assert_arg_pred +{ + typedef typename P::type p_type; + typedef typename assert_arg_pred_impl< p_type::value >::type type; +}; + +template< typename P > struct assert_arg_pred_not +{ + typedef typename P::type p_type; + enum { p = !p_type::value }; + typedef typename assert_arg_pred_impl

::type type; +}; + +template< typename Pred > +failed ************ (Pred::************ + assert_arg( void (*)(Pred), typename assert_arg_pred::type ) + ); + +template< typename Pred > +failed ************ (boost::mpl::not_::************ + assert_not_arg( void (*)(Pred), typename assert_arg_pred_not::type ) + ); + +template< typename Pred > +assert +assert_arg( void (*)(Pred), typename assert_arg_pred_not::type ); + +template< typename Pred > +assert +assert_not_arg( void (*)(Pred), typename assert_arg_pred::type ); +# 212 "/usr/include/boost-1_42/boost/mpl/assert.hpp" +} +# 24 "/usr/include/boost-1_42/boost/mpl/aux_/na_assert.hpp" 2 +# 26 "/usr/include/boost-1_42/boost/mpl/arg.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/arity_spec.hpp" 1 +# 27 "/usr/include/boost-1_42/boost/mpl/arg.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/arg_typedef.hpp" 1 +# 28 "/usr/include/boost-1_42/boost/mpl/arg.hpp" 2 +# 37 "/usr/include/boost-1_42/boost/mpl/arg.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/arg.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/arg.hpp" +namespace mpl_ { +template<> struct arg< -1 > +{ + static const int value = -1; + + + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + enum { mpl_assertion_in_line_27 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na))0, 1 ) ) ) }; + }; +}; + +template<> struct arg<1> +{ + static const int value = 1; + typedef arg<2> next; + + + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + enum { mpl_assertion_in_line_45 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na))0, 1 ) ) ) }; + }; +}; + +template<> struct arg<2> +{ + static const int value = 2; + typedef arg<3> next; + + + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U2 type; + enum { mpl_assertion_in_line_63 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na))0, 1 ) ) ) }; + }; +}; + +template<> struct arg<3> +{ + static const int value = 3; + typedef arg<4> next; + + + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U3 type; + enum { mpl_assertion_in_line_81 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na))0, 1 ) ) ) }; + }; +}; + +template<> struct arg<4> +{ + static const int value = 4; + typedef arg<5> next; + + + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U4 type; + enum { mpl_assertion_in_line_99 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na))0, 1 ) ) ) }; + }; +}; + +template<> struct arg<5> +{ + static const int value = 5; + typedef arg<6> next; + + + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U5 type; + enum { mpl_assertion_in_line_117 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na))0, 1 ) ) ) }; + }; +}; + + + +} +# 38 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 2 +# 38 "/usr/include/boost-1_42/boost/mpl/arg.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/mpl/placeholders.hpp" 2 +# 43 "/usr/include/boost-1_42/boost/mpl/placeholders.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp" +namespace mpl_ { +typedef arg< -1 > _; +} +namespace boost { namespace mpl { + +using ::mpl_::_; + +namespace placeholders { +using mpl_::_; +} + +}} + + + +namespace mpl_ { +typedef arg<1> _1; + +} +namespace boost { namespace mpl { + +using ::mpl_::_1; + +namespace placeholders { +using mpl_::_1; +} + +}} +namespace mpl_ { +typedef arg<2> _2; + +} +namespace boost { namespace mpl { + +using ::mpl_::_2; + +namespace placeholders { +using mpl_::_2; +} + +}} +namespace mpl_ { +typedef arg<3> _3; + +} +namespace boost { namespace mpl { + +using ::mpl_::_3; + +namespace placeholders { +using mpl_::_3; +} + +}} +namespace mpl_ { +typedef arg<4> _4; + +} +namespace boost { namespace mpl { + +using ::mpl_::_4; + +namespace placeholders { +using mpl_::_4; +} + +}} +namespace mpl_ { +typedef arg<5> _5; + +} +namespace boost { namespace mpl { + +using ::mpl_::_5; + +namespace placeholders { +using mpl_::_5; +} + +}} +namespace mpl_ { +typedef arg<6> _6; + +} +namespace boost { namespace mpl { + +using ::mpl_::_6; + +namespace placeholders { +using mpl_::_6; +} + +}} +# 38 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 2 +# 44 "/usr/include/boost-1_42/boost/mpl/placeholders.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/mpl/apply.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/lambda.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/lambda.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/bind.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/mpl/bind.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/bind_fwd.hpp" 1 +# 25 "/usr/include/boost-1_42/boost/mpl/bind_fwd.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/bind.hpp" 1 +# 26 "/usr/include/boost-1_42/boost/mpl/bind_fwd.hpp" 2 + + + + + + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp" +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct bind; + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} +# 38 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 2 +# 33 "/usr/include/boost-1_42/boost/mpl/bind_fwd.hpp" 2 +# 24 "/usr/include/boost-1_42/boost/mpl/bind.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/placeholders.hpp" 1 +# 25 "/usr/include/boost-1_42/boost/mpl/bind.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/mpl/protect.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/mpl/protect.hpp" +namespace boost { namespace mpl { + +template< + typename T = na + , int not_le_ = 0 + > +struct protect : T +{ + + + + typedef protect type; + +}; +# 48 "/usr/include/boost-1_42/boost/mpl/protect.hpp" +template<> struct protect< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : protect< T1 > { }; }; + +namespace aux { template< typename T1 > struct template_arity< protect< T1 > > : int_<1> { }; template<> struct template_arity< protect< na > > : int_<-1> { }; } + + +}} +# 27 "/usr/include/boost-1_42/boost/mpl/bind.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/apply_wrap.hpp" 1 +# 28 "/usr/include/boost-1_42/boost/mpl/bind.hpp" 2 +# 50 "/usr/include/boost-1_42/boost/mpl/bind.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/bind.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/bind.hpp" +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + typename T + , typename Arg + > +struct replace_unnamed_arg +{ + typedef Arg next; + typedef T type; +}; + +template< + typename Arg + > +struct replace_unnamed_arg< arg< -1 >, Arg > +{ + typedef typename Arg::next next; + typedef Arg type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} + + +namespace aux { template< typename T1 > struct template_arity< bind0< T1> > : int_<1> { }; } + +template< + typename F + > +struct bind< F,na,na,na,na,na > + : bind0 +{ +}; + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} + + +namespace aux { template< typename T1 , typename T2 > struct template_arity< bind1< T1 , T2> > : int_<2> { }; } + +template< + typename F, typename T1 + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} + + +namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< bind2< T1 , T2 , T3> > : int_<3> { }; } + +template< + typename F, typename T1, typename T2 + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} + + +namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 > struct template_arity< bind3< T1 , T2 , T3 , T4> > : int_<4> { }; } + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} + + +namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< bind4< T1 , T2 , T3 , T4 , T5> > : int_<5> { }; } + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} + + +namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > struct template_arity< bind5< T1 , T2 , T3 , T4 , T5 , T6> > : int_<6> { }; } + + + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; + + +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +template< + template< typename T1, typename T2, typename T3 > class F, typename Tag + > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct eval_if; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< eval_if,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + + typedef typename eval_if< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +}} +# 38 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 2 +# 51 "/usr/include/boost-1_42/boost/mpl/bind.hpp" 2 +# 19 "/usr/include/boost-1_42/boost/mpl/lambda.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/full_lambda.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/mpl/aux_/full_lambda.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/bind_fwd.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/mpl/aux_/full_lambda.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/mpl/quote.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/mpl/quote.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/has_type.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/aux_/has_type.hpp" +namespace boost { namespace mpl { namespace aux { +template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_type { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; +}}} +# 24 "/usr/include/boost-1_42/boost/mpl/quote.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/config/bcc.hpp" 1 +# 27 "/usr/include/boost-1_42/boost/mpl/quote.hpp" 2 +# 45 "/usr/include/boost-1_42/boost/mpl/quote.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/quote.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/quote.hpp" +namespace boost { namespace mpl { + +template< typename T, bool has_type_ > +struct quote_impl +{ + typedef typename T::type type; +}; + +template< typename T > +struct quote_impl< T,false > +{ + typedef T type; +}; + +template< + template< typename P1 > class F + , typename Tag = void_ + > +struct quote1 +{ + template< typename U1 > struct apply + + : quote_impl< + F + , aux::has_type< F >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2 > class F + , typename Tag = void_ + > +struct quote2 +{ + template< typename U1, typename U2 > struct apply + + : quote_impl< + F< U1,U2 > + , aux::has_type< F< U1,U2 > >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3 > class F + , typename Tag = void_ + > +struct quote3 +{ + template< typename U1, typename U2, typename U3 > struct apply + + : quote_impl< + F< U1,U2,U3 > + , aux::has_type< F< U1,U2,U3 > >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename Tag = void_ + > +struct quote4 +{ + template< + typename U1, typename U2, typename U3, typename U4 + > + struct apply + + : quote_impl< + F< U1,U2,U3,U4 > + , aux::has_type< F< U1,U2,U3,U4 > >::value + > + + { + }; +}; + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename Tag = void_ + > +struct quote5 +{ + template< + typename U1, typename U2, typename U3, typename U4 + , typename U5 + > + struct apply + + : quote_impl< + F< U1,U2,U3,U4,U5 > + , aux::has_type< F< U1,U2,U3,U4,U5 > >::value + > + + { + }; +}; + +}} +# 38 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 2 +# 46 "/usr/include/boost-1_42/boost/mpl/quote.hpp" 2 +# 26 "/usr/include/boost-1_42/boost/mpl/aux_/full_lambda.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/arg.hpp" 1 +# 27 "/usr/include/boost-1_42/boost/mpl/aux_/full_lambda.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/template_arity.hpp" 1 +# 43 "/usr/include/boost-1_42/boost/mpl/aux_/template_arity.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp" +namespace boost { namespace mpl { namespace aux { + +template< int N > struct arity_tag +{ + typedef char (&type)[N + 1]; +}; + +template< + int C1, int C2, int C3, int C4, int C5, int C6 + > +struct max_arity +{ + static const int value = ( C6 > 0 ? C6 : ( C5 > 0 ? C5 : ( C4 > 0 ? C4 : ( C3 > 0 ? C3 : ( C2 > 0 ? C2 : ( C1 > 0 ? C1 : -1 ) ) ) ) ) ) + + + ; +}; + +arity_tag<0>::type arity_helper(...); + +template< + template< typename P1 > class F + , typename T1 + > +typename arity_tag<1>::type +arity_helper(type_wrapper< F >, arity_tag<1>); + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + > +typename arity_tag<2>::type +arity_helper(type_wrapper< F< T1,T2 > >, arity_tag<2>); + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + > +typename arity_tag<3>::type +arity_helper(type_wrapper< F< T1,T2,T3 > >, arity_tag<3>); + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + > +typename arity_tag<4>::type +arity_helper(type_wrapper< F< T1,T2,T3,T4 > >, arity_tag<4>); + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + > +typename arity_tag<5>::type +arity_helper(type_wrapper< F< T1,T2,T3,T4,T5 > >, arity_tag<5>); + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6 + > +typename arity_tag<6>::type +arity_helper(type_wrapper< F< T1,T2,T3,T4,T5,T6 > >, arity_tag<6>); +template< typename F, int N > +struct template_arity_impl +{ + static const int value = sizeof(arity_helper(type_wrapper(), arity_tag())) - 1 + + ; +}; + +template< typename F > +struct template_arity +{ + static const int value = ( max_arity< template_arity_impl< F,1 >::value, template_arity_impl< F,2 >::value, template_arity_impl< F,3 >::value, template_arity_impl< F,4 >::value, template_arity_impl< F,5 >::value, template_arity_impl< F,6 >::value >::value ) + + + ; + + typedef mpl::int_ type; +}; + +}}} +# 38 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 2 +# 44 "/usr/include/boost-1_42/boost/mpl/aux_/template_arity.hpp" 2 +# 30 "/usr/include/boost-1_42/boost/mpl/aux_/full_lambda.hpp" 2 +# 44 "/usr/include/boost-1_42/boost/mpl/aux_/full_lambda.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp" +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} + +template< + typename T + , typename Tag + , typename Arity + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg,Tag, int_< -1 > > +{ + typedef true_ is_le; + typedef mpl::arg result_; + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + , int_<1> + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + , int_<1> + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + , int_<2> + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + , int_<2> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + , int_<3> + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + , int_<3> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + , int_<4> + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + , int_<4> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + , int_<5> + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + , int_<5> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + + +template< typename T, typename Tag > +struct lambda< mpl::protect,Tag, int_<1> > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + + + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +template< + typename F + , typename Tag1 + , typename Tag2 + , typename Arity + > +struct lambda< + lambda< F,Tag1,Arity > + , Tag2 + , int_<3> + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef bind1< quote1, typename l1::result_ > arity_; + typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3; + typedef aux::le_result3 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template<> struct lambda< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : lambda< T1 , T2 > { }; }; template< typename Tag > struct lambda< lambda< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef lambda< na , na > result_; typedef lambda< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< lambda< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< lambda< na , na > > : int_<-1> { }; } + +}} +# 38 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 2 +# 45 "/usr/include/boost-1_42/boost/mpl/aux_/full_lambda.hpp" 2 +# 23 "/usr/include/boost-1_42/boost/mpl/lambda.hpp" 2 +# 26 "/usr/include/boost-1_42/boost/mpl/apply.hpp" 2 +# 36 "/usr/include/boost-1_42/boost/mpl/apply.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/apply.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/apply.hpp" +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda::type + + > +{ + + + + + +}; + +template< + typename F + > +struct apply< F,na,na,na,na,na > + : apply0 +{ +}; + +template< + typename F, typename T1 + > +struct apply1 + + : apply_wrap1< + typename lambda::type + , T1 + > +{ + + + + + +}; + +template< + typename F, typename T1 + > +struct apply< F,T1,na,na,na,na > + : apply1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply2 + + : apply_wrap2< + typename lambda::type + , T1, T2 + > +{ + + + + + +}; + +template< + typename F, typename T1, typename T2 + > +struct apply< F,T1,T2,na,na,na > + : apply2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + + : apply_wrap3< + typename lambda::type + , T1, T2, T3 + > +{ + + + + + +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply< F,T1,T2,T3,na,na > + : apply3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + + : apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + > +{ + + + + + +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply< F,T1,T2,T3,T4,na > + : apply4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + + : apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + > +{ + + + + + +}; + + + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply + : apply5< F,T1,T2,T3,T4,T5 > +{ +}; + +}} +# 38 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 2 +# 37 "/usr/include/boost-1_42/boost/mpl/apply.hpp" 2 +# 28 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/debug/line.hpp" 1 +# 33 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 2 + + + + + +namespace boost { namespace python { + +template class wrapper; + +}} + + +namespace boost { namespace python { namespace objects { + + + + + + + +template +struct pointer_holder : instance_holder +{ + typedef Value value_type; + + pointer_holder(Pointer); + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 47 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 179 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + + + pointer_holder(PyObject* self ) + : m_p(new Value( + + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } +# 48 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 179 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template< class A0 > + + pointer_holder(PyObject* self , A0 a0) + : m_p(new Value( + objects::do_unforward(a0,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } +# 53 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 179 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template< class A0 , class A1 > + + pointer_holder(PyObject* self , A0 a0 , A1 a1) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } +# 58 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 179 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template< class A0 , class A1 , class A2 > + + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } +# 63 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 179 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template< class A0 , class A1 , class A2 , class A3 > + + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } +# 68 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 179 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template< class A0 , class A1 , class A2 , class A3 , class A4 > + + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } +# 73 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 179 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 > + + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } +# 78 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 179 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 > + + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } +# 83 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 179 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 > + + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } +# 88 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 179 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 > + + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } +# 93 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 179 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 > + + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } +# 98 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 179 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 > + + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } +# 103 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 179 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 > + + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } +# 108 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 179 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 > + + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11 , A12 a12) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) , objects::do_unforward(a12,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } +# 113 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 179 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 > + + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11 , A12 a12 , A13 a13) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) , objects::do_unforward(a12,0) , objects::do_unforward(a13,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } +# 118 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 179 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 , class A14 > + + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11 , A12 a12 , A13 a13 , A14 a14) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) , objects::do_unforward(a12,0) , objects::do_unforward(a13,0) , objects::do_unforward(a14,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } +# 123 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 64 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 2 + + private: + + private: + void* holds(type_info, bool null_ptr_only); + + template + inline void* holds_wrapped(type_info dst_t, wrapper*,T* p) + { + return python::type_id() == dst_t ? p : 0; + } + + inline void* holds_wrapped(type_info, ...) + { + return 0; + } + + private: + Pointer m_p; +}; + +template +struct pointer_holder_back_reference : instance_holder +{ + private: + typedef typename python::pointee::type held_type; + public: + typedef Value value_type; + + + + pointer_holder_back_reference(Pointer); + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 47 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 201 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + + + pointer_holder_back_reference( + PyObject* p ) + : m_p(new held_type( + p + )) + {} +# 48 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 201 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template < class A0 > + + pointer_holder_back_reference( + PyObject* p , A0 a0) + : m_p(new held_type( + p , objects::do_unforward(a0,0) + )) + {} +# 53 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 201 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template < class A0 , class A1 > + + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) + )) + {} +# 58 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 201 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 > + + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) + )) + {} +# 63 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 201 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 > + + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) + )) + {} +# 68 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 201 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 > + + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) + )) + {} +# 73 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 201 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 > + + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) + )) + {} +# 78 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 201 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 > + + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) + )) + {} +# 83 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 201 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 > + + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) + )) + {} +# 88 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 201 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 > + + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) + )) + {} +# 93 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 201 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 > + + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) + )) + {} +# 98 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 201 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 > + + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) + )) + {} +# 103 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 201 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 > + + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) + )) + {} +# 108 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 201 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 > + + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11 , A12 a12) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) , objects::do_unforward(a12,0) + )) + {} +# 113 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 201 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 > + + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11 , A12 a12 , A13 a13) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) , objects::do_unforward(a12,0) , objects::do_unforward(a13,0) + )) + {} +# 118 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 201 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 , class A14 > + + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11 , A12 a12 , A13 a13 , A14 a14) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) , objects::do_unforward(a12,0) , objects::do_unforward(a13,0) , objects::do_unforward(a14,0) + )) + {} +# 123 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 100 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 2 + + private: + void* holds(type_info, bool null_ptr_only); + + private: + Pointer m_p; +}; + + + +template +inline pointer_holder::pointer_holder(Pointer p) + : m_p(p) +{ +} + +template +inline pointer_holder_back_reference::pointer_holder_back_reference(Pointer p) + : m_p(p) +{ +} + +template +void* pointer_holder::holds(type_info dst_t, bool null_ptr_only) +{ + if (dst_t == python::type_id() + && !(null_ptr_only && get_pointer(this->m_p)) + ) + return &this->m_p; + + Value* p + + + + = get_pointer(this->m_p) + + ; + + if (p == 0) + return 0; + + if (void* wrapped = holds_wrapped(dst_t, p, p)) + return wrapped; + + type_info src_t = python::type_id(); + return src_t == dst_t ? p : find_dynamic_type(p, src_t, dst_t); +} + +template +void* pointer_holder_back_reference::holds(type_info dst_t, bool null_ptr_only) +{ + if (dst_t == python::type_id() + && !(null_ptr_only && get_pointer(this->m_p)) + ) + return &this->m_p; + + if (!get_pointer(this->m_p)) + return 0; + + Value* p = get_pointer(m_p); + + if (dst_t == python::type_id()) + return p; + + type_info src_t = python::type_id(); + return src_t == dst_t ? p : find_dynamic_type(p, src_t, dst_t); +} + +}}} +# 11 "/usr/include/boost-1_42/boost/python/to_python_indirect.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/object/make_ptr_instance.hpp" 1 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/make_instance.hpp" 1 +# 9 "/usr/include/boost-1_42/boost/python/object/make_instance.hpp" +# 1 "/usr/include/boost-1_42/boost/python/object/instance.hpp" 1 +# 9 "/usr/include/boost-1_42/boost/python/object/instance.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/alignment_traits.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/type_traits/alignment_traits.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/type_with_alignment.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/type_traits/type_with_alignment.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/list/for_each_i.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/preprocessor/list/for_each_i.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/repetition/for.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/preprocessor/repetition/for.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/detail/auto_rec.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/preprocessor/repetition/for.hpp" 2 +# 42 "/usr/include/boost-1_42/boost/preprocessor/repetition/for.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/repetition/detail/for.hpp" 1 +# 43 "/usr/include/boost-1_42/boost/preprocessor/repetition/for.hpp" 2 +# 21 "/usr/include/boost-1_42/boost/preprocessor/list/for_each_i.hpp" 2 +# 13 "/usr/include/boost-1_42/boost/type_traits/type_with_alignment.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/tuple/to_list.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/type_with_alignment.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/list/transform.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/type_traits/type_with_alignment.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/list/append.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/type_traits/type_with_alignment.hpp" 2 + + + + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 24 "/usr/include/boost-1_42/boost/type_traits/type_with_alignment.hpp" 2 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 26 "/usr/include/boost-1_42/boost/type_traits/type_with_alignment.hpp" 2 + + + + + + +namespace boost { + + + +namespace detail { + +class alignment_dummy; +typedef void (*function_ptr)(); +typedef int (alignment_dummy::*member_ptr); +typedef int (alignment_dummy::*member_function_ptr)(); +# 101 "/usr/include/boost-1_42/boost/type_traits/type_with_alignment.hpp" +template +struct lower_alignment_helper +{ + typedef char type; + enum { value = true }; +}; + +template +struct lower_alignment_helper +{ + enum { value = (alignment_of::value == target) }; + typedef typename mpl::if_c::type type; +}; +# 127 "/usr/include/boost-1_42/boost/type_traits/type_with_alignment.hpp" +template +struct has_one_T +{ + T data; +}; + +template +union lower_alignment +{ + enum { found0 = false }; + + + + + + typename lower_alignment_helper< found0,target,char >::type t0; enum { found1 = lower_alignment_helper::value }; typename lower_alignment_helper< found1,target,short >::type t1; enum { found2 = lower_alignment_helper::value }; typename lower_alignment_helper< found2,target,int >::type t2; enum { found3 = lower_alignment_helper::value }; typename lower_alignment_helper< found3,target,long >::type t3; enum { found4 = lower_alignment_helper::value }; typename lower_alignment_helper< found4,target,::boost::long_long_type >::type t4; enum { found5 = lower_alignment_helper::value }; typename lower_alignment_helper< found5,target,float >::type t5; enum { found6 = lower_alignment_helper::value }; typename lower_alignment_helper< found6,target,double >::type t6; enum { found7 = lower_alignment_helper::value }; typename lower_alignment_helper< found7,target,long double >::type t7; enum { found8 = lower_alignment_helper::value }; typename lower_alignment_helper< found8,target,void* >::type t8; enum { found9 = lower_alignment_helper::value }; typename lower_alignment_helper< found9,target,function_ptr >::type t9; enum { found10 = lower_alignment_helper::value }; typename lower_alignment_helper< found10,target,member_ptr >::type t10; enum { found11 = lower_alignment_helper::value }; typename lower_alignment_helper< found11,target,member_function_ptr >::type t11; enum { found12 = lower_alignment_helper::value }; typename lower_alignment_helper< found12,target,boost::detail::has_one_T< char > >::type t12; enum { found13 = lower_alignment_helper >::value }; typename lower_alignment_helper< found13,target,boost::detail::has_one_T< short > >::type t13; enum { found14 = lower_alignment_helper >::value }; typename lower_alignment_helper< found14,target,boost::detail::has_one_T< int > >::type t14; enum { found15 = lower_alignment_helper >::value }; typename lower_alignment_helper< found15,target,boost::detail::has_one_T< long > >::type t15; enum { found16 = lower_alignment_helper >::value }; typename lower_alignment_helper< found16,target,boost::detail::has_one_T< ::boost::long_long_type > >::type t16; enum { found17 = lower_alignment_helper >::value }; typename lower_alignment_helper< found17,target,boost::detail::has_one_T< float > >::type t17; enum { found18 = lower_alignment_helper >::value }; typename lower_alignment_helper< found18,target,boost::detail::has_one_T< double > >::type t18; enum { found19 = lower_alignment_helper >::value }; typename lower_alignment_helper< found19,target,boost::detail::has_one_T< long double > >::type t19; enum { found20 = lower_alignment_helper >::value }; typename lower_alignment_helper< found20,target,boost::detail::has_one_T< void* > >::type t20; enum { found21 = lower_alignment_helper >::value }; typename lower_alignment_helper< found21,target,boost::detail::has_one_T< function_ptr > >::type t21; enum { found22 = lower_alignment_helper >::value }; typename lower_alignment_helper< found22,target,boost::detail::has_one_T< member_ptr > >::type t22; enum { found23 = lower_alignment_helper >::value }; typename lower_alignment_helper< found23,target,boost::detail::has_one_T< member_function_ptr > >::type t23; enum { found24 = lower_alignment_helper >::value }; +}; + +union max_align +{ + + + + + char t0; short t1; int t2; long t3; ::boost::long_long_type t4; float t5; double t6; long double t7; void* t8; function_ptr t9; member_ptr t10; member_function_ptr t11; boost::detail::has_one_T< char > t12; boost::detail::has_one_T< short > t13; boost::detail::has_one_T< int > t14; boost::detail::has_one_T< long > t15; boost::detail::has_one_T< ::boost::long_long_type > t16; boost::detail::has_one_T< float > t17; boost::detail::has_one_T< double > t18; boost::detail::has_one_T< long double > t19; boost::detail::has_one_T< void* > t20; boost::detail::has_one_T< function_ptr > t21; boost::detail::has_one_T< member_ptr > t22; boost::detail::has_one_T< member_function_ptr > t23; +}; +# 161 "/usr/include/boost-1_42/boost/type_traits/type_with_alignment.hpp" +template +struct is_aligned +{ + static const bool value = (TAlign >= Align) & (TAlign % Align == 0) + + ; +}; +# 180 "/usr/include/boost-1_42/boost/type_traits/type_with_alignment.hpp" +} + + +template +struct is_pod< ::boost::detail::lower_alignment > +{ + static const std::size_t value = true; +}; + + + + +namespace detail{ + +template +class type_with_alignment_imp +{ + typedef ::boost::detail::lower_alignment t1; + typedef typename mpl::if_c< + ::boost::detail::is_aligned< ::boost::alignment_of::value,Align >::value + , t1 + , ::boost::detail::max_align + >::type align_t; + + static const std::size_t found = alignment_of::value; + + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((found >= Align) == 0 ? false : true) >)> boost_static_assert_typedef_206; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((found % Align == 0) == 0 ? false : true) >)> boost_static_assert_typedef_207; + + public: + typedef align_t type; +}; + +} + +template +class type_with_alignment + : public ::boost::detail::type_with_alignment_imp +{ +}; + + +namespace align { +struct __attribute__((__aligned__(2))) a2 {}; +struct __attribute__((__aligned__(4))) a4 {}; +struct __attribute__((__aligned__(8))) a8 {}; +struct __attribute__((__aligned__(16))) a16 {}; +struct __attribute__((__aligned__(32))) a32 {}; +} + +template<> class type_with_alignment<1> { public: typedef char type; }; +template<> class type_with_alignment<2> { public: typedef align::a2 type; }; +template<> class type_with_alignment<4> { public: typedef align::a4 type; }; +template<> class type_with_alignment<8> { public: typedef align::a8 type; }; +template<> class type_with_alignment<16> { public: typedef align::a16 type; }; +template<> class type_with_alignment<32> { public: typedef align::a32 type; }; + +namespace detail { +template<> struct is_pod_impl< ::boost::align::a2 > { static const bool value = (true); }; +template<> struct is_pod_impl< ::boost::align::a4 > { static const bool value = (true); }; +template<> struct is_pod_impl< ::boost::align::a8 > { static const bool value = (true); }; +template<> struct is_pod_impl< ::boost::align::a16 > { static const bool value = (true); }; +template<> struct is_pod_impl< ::boost::align::a32 > { static const bool value = (true); }; +} +# 383 "/usr/include/boost-1_42/boost/type_traits/type_with_alignment.hpp" +} + + + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 390 "/usr/include/boost-1_42/boost/type_traits/type_with_alignment.hpp" 2 +# 14 "/usr/include/boost-1_42/boost/type_traits/alignment_traits.hpp" 2 +# 10 "/usr/include/boost-1_42/boost/python/object/instance.hpp" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 11 "/usr/include/boost-1_42/boost/python/object/instance.hpp" 2 + +namespace boost { namespace python +{ + struct instance_holder; +}} + +namespace boost { namespace python { namespace objects { + + +template +struct instance +{ + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; Py_ssize_t ob_size; + PyObject* dict; + PyObject* weakrefs; + instance_holder* objects; + + typedef typename type_with_alignment< + ::boost::alignment_of::value + >::type align_t; + + union + { + align_t align; + char bytes[sizeof(Data)]; + } storage; +}; + +template +struct additional_instance_size +{ + typedef instance instance_data; + typedef instance instance_char; + static const std::size_t value = sizeof(instance_data) - __builtin_offsetof (instance_char, storage) + + ; +}; + +}}} +# 10 "/usr/include/boost-1_42/boost/python/object/make_instance.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/converter/registered.hpp" 1 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/python/converter/registry.hpp" 1 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/python/converter/to_python_function_type.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/converter/to_python_function_type.hpp" +namespace boost { namespace python { namespace converter { + + + + +typedef PyObject* (*to_python_function_t)(void const*); + +}}} +# 9 "/usr/include/boost-1_42/boost/python/converter/registry.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/converter/rvalue_from_python_data.hpp" 1 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/python/converter/constructor_function.hpp" 1 + + + + + + + +namespace boost { namespace python { namespace converter { + + + +struct rvalue_from_python_stage1_data; +typedef void (*constructor_function)(PyObject* source, rvalue_from_python_stage1_data*); + +}}} +# 9 "/usr/include/boost-1_42/boost/python/converter/rvalue_from_python_data.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/detail/referent_storage.hpp" 1 + + + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 9 "/usr/include/boost-1_42/boost/python/detail/referent_storage.hpp" 2 + +namespace boost { namespace python { namespace detail { + +struct alignment_dummy; +typedef void (*function_ptr)(); +typedef int (alignment_dummy::*member_ptr); +typedef int (alignment_dummy::*member_function_ptr)(); + + + + + + +template +union aligned_storage +{ + typename mpl::if_c< sizeof(char) <= size, char, char>::type t0; + typename mpl::if_c< sizeof(short) <= size, short, char>::type t1; + typename mpl::if_c< sizeof(int) <= size, int, char>::type t2; + typename mpl::if_c< sizeof(long) <= size, long, char>::type t3; + typename mpl::if_c< sizeof(float) <= size, float, char>::type t4; + typename mpl::if_c< sizeof(double) <= size, double, char>::type t5; + typename mpl::if_c< sizeof(long double) <= size, long double, char>::type t6; + typename mpl::if_c< sizeof(void*) <= size, void*, char>::type t7; + typename mpl::if_c< sizeof(function_ptr) <= size, function_ptr, char>::type t8; + typename mpl::if_c< sizeof(member_ptr) <= size, member_ptr, char>::type t9; + typename mpl::if_c< sizeof(member_function_ptr) <= size, member_function_ptr, char>::type t10; + char bytes[size]; +}; + + + + + + template struct referent_size; + + + + template + struct referent_size + { + static const std::size_t value = sizeof(T) + ; + }; +# 66 "/usr/include/boost-1_42/boost/python/detail/referent_storage.hpp" +template +struct referent_storage +{ + typedef aligned_storage< + ::boost::python::detail::referent_size::value + > type; +}; + +}}} +# 10 "/usr/include/boost-1_42/boost/python/converter/rvalue_from_python_data.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/detail/destroy.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/detail/destroy.hpp" +namespace boost { namespace python { namespace detail { + +template < + bool array + + + + > struct value_destroyer; + +template <> +struct value_destroyer< + false + + + + > +{ + template + static void execute(T const volatile* p) + { + p->T::~T(); + } +}; + +template <> +struct value_destroyer< + true + + + + > +{ + template + static void execute(A*, T const volatile* const first) + { + for (T const volatile* p = first; p != first + sizeof(A)/sizeof(T); ++p) + { + value_destroyer< + boost::is_array::value + + + + >::execute(p); + } + } + + template + static void execute(T const volatile* p) + { + execute(p, *p); + } +}; +# 85 "/usr/include/boost-1_42/boost/python/detail/destroy.hpp" +template +inline void destroy_referent_impl(void* p, T& (*)()) +{ + + + value_destroyer< + (boost::is_array::value) + + + + >::execute((const volatile T*)p); +} + +template +inline void destroy_referent(void* p, T(*)() = 0) +{ + destroy_referent_impl(p, (T(*)())0); +} + +}}} +# 11 "/usr/include/boost-1_42/boost/python/converter/rvalue_from_python_data.hpp" 2 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 15 "/usr/include/boost-1_42/boost/python/converter/rvalue_from_python_data.hpp" 2 +# 39 "/usr/include/boost-1_42/boost/python/converter/rvalue_from_python_data.hpp" +namespace boost { namespace python { namespace converter { +# 62 "/usr/include/boost-1_42/boost/python/converter/rvalue_from_python_data.hpp" +struct rvalue_from_python_stage1_data +{ + void* convertible; + constructor_function construct; +}; + + + + + + + +template +struct rvalue_from_python_storage +{ + rvalue_from_python_stage1_data stage1; + + + typename python::detail::referent_storage< + typename add_reference::type + >::type storage; +}; + + + + + + + +template +struct rvalue_from_python_data : rvalue_from_python_storage +{ + + + + + + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((__builtin_offsetof (rvalue_from_python_storage, stage1) == 0) == 0 ? false : true) >)> boost_static_assert_typedef_99; + + + + rvalue_from_python_data(rvalue_from_python_stage1_data const&); + + + + + rvalue_from_python_data(void* convertible); + + + ~rvalue_from_python_data(); + private: + typedef typename add_reference::type>::type ref_type; +}; + + + + +template +inline rvalue_from_python_data::rvalue_from_python_data(rvalue_from_python_stage1_data const& _stage1) +{ + this->stage1 = _stage1; +} + +template +inline rvalue_from_python_data::rvalue_from_python_data(void* convertible) +{ + this->stage1.convertible = convertible; +} + +template +inline rvalue_from_python_data::~rvalue_from_python_data() +{ + if (this->stage1.convertible == this->storage.bytes) + python::detail::destroy_referent(this->storage.bytes); +} + +}}} +# 10 "/usr/include/boost-1_42/boost/python/converter/registry.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/converter/convertible_function.hpp" 1 + + + + + + + +namespace boost { namespace python { namespace converter { + +typedef void* (*convertible_function)(PyObject*); + +}}} +# 12 "/usr/include/boost-1_42/boost/python/converter/registry.hpp" 2 + +namespace boost { namespace python { namespace converter { + +struct registration; + + +namespace registry +{ + + registration const& lookup(type_info); + + + + registration const& lookup_shared_ptr(type_info); + + + registration const* query(type_info); + + void insert(to_python_function_t, type_info, PyTypeObject const* (*to_python_target_type)() = 0); + + + void insert(void* (*convert)(PyObject*), type_info, PyTypeObject const* (*expected_pytype)() = 0); + + + void insert( + convertible_function + , constructor_function + , type_info + , PyTypeObject const* (*expected_pytype)() = 0 + ); + + + + void push_back( + convertible_function + , constructor_function + , type_info + , PyTypeObject const* (*expected_pytype)() = 0 + ); +} + +}}} +# 9 "/usr/include/boost-1_42/boost/python/converter/registered.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/converter/registrations.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/python/converter/registrations.hpp" +namespace boost { namespace python { namespace converter { + +struct lvalue_from_python_chain +{ + convertible_function convert; + lvalue_from_python_chain* next; +}; + +struct rvalue_from_python_chain +{ + convertible_function convertible; + constructor_function construct; + PyTypeObject const* (*expected_pytype)(); + rvalue_from_python_chain* next; +}; + +struct registration +{ + public: + explicit registration(type_info target, bool is_shared_ptr = false); + ~registration(); + + + PyObject* to_python(void const volatile*) const; + + + + PyTypeObject* get_class_object() const; + + + + PyTypeObject const* expected_from_python_type() const; + PyTypeObject const* to_python_target_type() const; + + public: + const python::type_info target_type; + + + lvalue_from_python_chain* lvalue_chain; + + + rvalue_from_python_chain* rvalue_chain; + + + PyTypeObject* m_class_object; + + + to_python_function_t m_to_python; + PyTypeObject const* (*m_to_python_target_type)(); + + + + + const bool is_shared_ptr; + + + + + +}; + + + + +inline registration::registration(type_info target_type, bool is_shared_ptr) + : target_type(target_type) + , lvalue_chain(0) + , rvalue_chain(0) + , m_class_object(0) + , m_to_python(0) + , m_to_python_target_type(0) + , is_shared_ptr(is_shared_ptr) +{} + +inline bool operator<(registration const& lhs, registration const& rhs) +{ + return lhs.target_type < rhs.target_type; +} + +}}} +# 10 "/usr/include/boost-1_42/boost/python/converter/registered.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/transform_traits.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/transform_traits.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/add_pointer.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/add_pointer.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 2 +# 16 "/usr/include/boost-1_42/boost/type_traits/add_pointer.hpp" 2 + +namespace boost { + +namespace detail { +# 55 "/usr/include/boost-1_42/boost/type_traits/add_pointer.hpp" +template +struct add_pointer_impl +{ + typedef typename remove_reference::type no_ref_type; + typedef no_ref_type* type; +}; + + + +} + +template< typename T > struct add_pointer { typedef typename boost::detail::add_pointer_impl::type type; }; + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_undef.hpp" 1 +# 71 "/usr/include/boost-1_42/boost/type_traits/add_pointer.hpp" 2 +# 16 "/usr/include/boost-1_42/boost/type_traits/transform_traits.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/type_traits/remove_bounds.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/type_traits/remove_bounds.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 14 "/usr/include/boost-1_42/boost/type_traits/remove_bounds.hpp" 2 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 2 +# 22 "/usr/include/boost-1_42/boost/type_traits/remove_bounds.hpp" 2 + + + +namespace boost { + +template< typename T > struct remove_bounds { typedef T type; }; + + +template< typename T, std::size_t N > struct remove_bounds { typedef T type; }; +template< typename T, std::size_t N > struct remove_bounds { typedef T const type; }; +template< typename T, std::size_t N > struct remove_bounds { typedef T volatile type; }; +template< typename T, std::size_t N > struct remove_bounds { typedef T const volatile type; }; + +template< typename T > struct remove_bounds { typedef T type; }; +template< typename T > struct remove_bounds { typedef T const type; }; +template< typename T > struct remove_bounds { typedef T volatile type; }; +template< typename T > struct remove_bounds { typedef T const volatile type; }; + + + +} + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_undef.hpp" 1 +# 47 "/usr/include/boost-1_42/boost/type_traits/remove_bounds.hpp" 2 +# 18 "/usr/include/boost-1_42/boost/type_traits/transform_traits.hpp" 2 +# 11 "/usr/include/boost-1_42/boost/python/converter/registered.hpp" 2 + + + + + + +namespace boost { + + + + +template class shared_ptr; + +namespace python { namespace converter { + +struct registration; + +namespace detail +{ + template + struct registered_base + { + static registration const& converters; + }; +} + +template +struct registered + : detail::registered_base< + typename add_reference< + typename add_cv::type + >::type + > +{ +}; + + + + + + + +template +struct registered + : registered {}; + + + + + +namespace detail +{ + inline void + register_shared_ptr0(...) + { + } + + template + inline void + register_shared_ptr0(shared_ptr*) + { + registry::lookup_shared_ptr(type_id >()); + } + + template + inline void + register_shared_ptr1(T const volatile*) + { + detail::register_shared_ptr0((T*)0); + } + + template + inline registration const& + registry_lookup2(T&(*)()) + { + detail::register_shared_ptr1((T*)0); + return registry::lookup(type_id()); + } + + template + inline registration const& + registry_lookup1(type) + { + return registry_lookup2((T(*)())0); + } + + inline registration const& + registry_lookup1(type) + { + detail::register_shared_ptr1((void*)0); + return registry::lookup(type_id()); + } + + template + registration const& registered_base::converters = detail::registry_lookup1(type()); + +} + +}}} +# 11 "/usr/include/boost-1_42/boost/python/object/make_instance.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/detail/decref_guard.hpp" 1 + + + + + + + +namespace boost { namespace python { namespace detail { + +struct decref_guard +{ + decref_guard(PyObject* o) : obj(o) {} + ~decref_guard() { if ((obj) == __null) ; else if ( --((PyObject*)(obj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(obj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(obj)))); } + void cancel() { obj = 0; } + private: + PyObject* obj; +}; + +}}} +# 12 "/usr/include/boost-1_42/boost/python/object/make_instance.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/detail/none.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/python/detail/none.hpp" +namespace boost { namespace python { namespace detail { + +inline PyObject* none() { ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } + +}}} +# 13 "/usr/include/boost-1_42/boost/python/object/make_instance.hpp" 2 + +namespace boost { namespace python { namespace objects { + +template +struct make_instance_impl +{ + typedef objects::instance instance_t; + + template + static inline PyObject* execute(Arg& x) + { + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((is_class::value) == 0 ? false : true) >)> boost_static_assert_typedef_24; + + PyTypeObject* type = Derived::get_class_object(x); + + if (type == 0) + return python::detail::none(); + + PyObject* raw_result = type->tp_alloc( + type, objects::additional_instance_size::value); + + if (raw_result != 0) + { + python::detail::decref_guard protect(raw_result); + + instance_t* instance = (instance_t*)raw_result; + + + + Derived::construct(&instance->storage, (PyObject*)instance, x)->install(raw_result); + + + + (((PyVarObject*)(instance))->ob_size) = __builtin_offsetof (instance_t, storage); + + + protect.cancel(); + } + return raw_result; + } +}; + + +template +struct make_instance + : make_instance_impl > +{ + template + static inline PyTypeObject* get_class_object(U&) + { + return converter::registered::converters.get_class_object(); + } + + static inline Holder* construct(void* storage, PyObject* instance, reference_wrapper x) + { + return new (storage) Holder(instance, x); + } +}; + + +}}} +# 9 "/usr/include/boost-1_42/boost/python/object/make_ptr_instance.hpp" 2 + + + + + + +namespace boost { namespace python { namespace objects { + +template +struct make_ptr_instance + : make_instance_impl > +{ + template + static inline Holder* construct(void* storage, PyObject*, Arg& x) + { + return new (storage) Holder(x); + } + + template + static inline PyTypeObject* get_class_object(Ptr const& x) + { + return get_class_object_impl(get_pointer(x)); + } + + static inline PyTypeObject const* get_pytype() + { + return converter::registered::converters.get_class_object(); + } + + private: + template + static inline PyTypeObject* get_class_object_impl(U const volatile* p) + { + if (p == 0) + return 0; + + PyTypeObject* derived = get_derived_class_object( + typename is_polymorphic::type(), p); + + if (derived) + return derived; + return converter::registered::converters.get_class_object(); + } + + template + static inline PyTypeObject* get_derived_class_object(mpl::true_, U const volatile* x) + { + converter::registration const* r = converter::registry::query( + type_info(typeid(*get_pointer(x))) + ); + return r ? r->m_class_object : 0; + } + + template + static inline PyTypeObject* get_derived_class_object(mpl::false_, U*) + { + return 0; + } +}; + + +}}} +# 12 "/usr/include/boost-1_42/boost/python/to_python_indirect.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/converter/pytype_function.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/converter/pytype_function.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/unwind_type.hpp" 1 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/cv_category.hpp" 1 +# 9 "/usr/include/boost-1_42/boost/python/detail/cv_category.hpp" +namespace boost { namespace python { namespace detail { + +template +struct cv_tag +{ + static const bool is_const = is_const_; + static const bool is_volatile = is_const_; +}; + +typedef cv_tag cv_unqualified; +typedef cv_tag const_; +typedef cv_tag volatile_; +typedef cv_tag const_volatile_; + +template +struct cv_category +{ + + + typedef cv_tag< + ::boost::is_const::value + , ::boost::is_volatile::value + > type; +}; + +}}} +# 9 "/usr/include/boost-1_42/boost/python/detail/unwind_type.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/detail/indirect_traits.hpp" 1 + + + + + + +# 1 "/usr/include/boost-1_42/boost/detail/indirect_traits.hpp" 1 +# 25 "/usr/include/boost-1_42/boost/detail/indirect_traits.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/and.hpp" 1 +# 42 "/usr/include/boost-1_42/boost/mpl/and.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/and.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/and.hpp" +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct and_impl + : false_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct and_impl< true,T1,T2,T3,T4 > + : and_impl< + ::boost::mpl::aux::nested_type_wknd::value + , T2, T3, T4 + , true_ + > +{ +}; + +template<> +struct and_impl< + true + , true_, true_, true_, true_ + > + : true_ +{ +}; + +} + +template< + typename T1 = na + , typename T2 = na + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + ::boost::mpl::aux::nested_type_wknd::value + , T2, T3, T4, T5 + > + +{ + + + + + +}; + +template<> struct and_< + + + + na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : and_< T1 , T2 > { }; }; template< typename Tag > struct lambda< and_< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef and_< na , na > result_; typedef and_< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< and_< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< and_< na , na > > : int_<-1> { }; } + +}} +# 38 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 2 +# 43 "/usr/include/boost-1_42/boost/mpl/and.hpp" 2 +# 26 "/usr/include/boost-1_42/boost/detail/indirect_traits.hpp" 2 + + + + + + + +namespace boost { namespace detail { + +namespace indirect_traits { + + +template +struct is_reference_to_const : mpl::false_ +{ +}; + +template +struct is_reference_to_const : mpl::true_ +{ +}; +# 55 "/usr/include/boost-1_42/boost/detail/indirect_traits.hpp" +template +struct is_reference_to_function : mpl::false_ +{ +}; + +template +struct is_reference_to_function : is_function +{ +}; + +template +struct is_pointer_to_function : mpl::false_ +{ +}; + + + +template +struct is_pointer_to_function : is_function +{ +}; + +template +struct is_reference_to_member_function_pointer_impl : mpl::false_ +{ +}; + +template +struct is_reference_to_member_function_pointer_impl + : is_member_function_pointer::type> +{ +}; + + +template +struct is_reference_to_member_function_pointer + : is_reference_to_member_function_pointer_impl +{ + +}; + +template +struct is_reference_to_function_pointer_aux + : mpl::and_< + is_reference + , is_pointer_to_function< + typename remove_cv< + typename remove_reference::type + >::type + > + > +{ + +}; + +template +struct is_reference_to_function_pointer + : mpl::if_< + is_reference_to_function + , mpl::false_ + , is_reference_to_function_pointer_aux + >::type +{ +}; + +template +struct is_reference_to_non_const + : mpl::and_< + is_reference + , mpl::not_< + is_reference_to_const + > + > +{ +}; + +template +struct is_reference_to_volatile : mpl::false_ +{ +}; + +template +struct is_reference_to_volatile : mpl::true_ +{ +}; +# 149 "/usr/include/boost-1_42/boost/detail/indirect_traits.hpp" +template +struct is_reference_to_pointer : mpl::false_ +{ +}; + +template +struct is_reference_to_pointer : mpl::true_ +{ +}; + +template +struct is_reference_to_pointer : mpl::true_ +{ +}; + +template +struct is_reference_to_pointer : mpl::true_ +{ +}; + +template +struct is_reference_to_pointer : mpl::true_ +{ +}; + +template +struct is_reference_to_class + : mpl::and_< + is_reference + , is_class< + typename remove_cv< + typename remove_reference::type + >::type + > + > +{ + +}; + +template +struct is_pointer_to_class + : mpl::and_< + is_pointer + , is_class< + typename remove_cv< + typename remove_pointer::type + >::type + > + > +{ + +}; +# 481 "/usr/include/boost-1_42/boost/detail/indirect_traits.hpp" +} + +using namespace indirect_traits; + +}} +# 8 "/usr/include/boost-1_42/boost/python/detail/indirect_traits.hpp" 2 + +namespace boost { namespace python { +namespace indirect_traits = boost::detail::indirect_traits; +}} +# 10 "/usr/include/boost-1_42/boost/python/detail/unwind_type.hpp" 2 + + +namespace boost { namespace python { namespace detail { + + + +template +inline typename Generator::result_type +unwind_type(U const& p, Generator* = 0); + + +template +inline typename Generator::result_type +unwind_type(boost::type*p = 0, Generator* = 0); + + +template +inline typename Generator::result_type +unwind_type_cv(U* p, cv_unqualified, Generator* = 0) +{ + return Generator::execute(p); +} + +template +inline typename Generator::result_type +unwind_type_cv(U const* p, const_, Generator* = 0) +{ + return unwind_type(const_cast(p), (Generator*)0); +} + +template +inline typename Generator::result_type +unwind_type_cv(U volatile* p, volatile_, Generator* = 0) +{ + return unwind_type(const_cast(p), (Generator*)0); +} + +template +inline typename Generator::result_type +unwind_type_cv(U const volatile* p, const_volatile_, Generator* = 0) +{ + return unwind_type(const_cast(p), (Generator*)0); +} + +template +inline typename Generator::result_type +unwind_ptr_type(U* p, Generator* = 0) +{ + typedef typename cv_category::type tag; + return unwind_type_cv(p, tag()); +} + +template +struct unwind_helper +{ + template + static typename Generator::result_type + execute(U p, Generator* = 0) + { + return unwind_ptr_type(p, (Generator*)0); + } +}; + +template <> +struct unwind_helper +{ + template + static typename Generator::result_type + execute(U& p, Generator* = 0) + { + return unwind_ptr_type(&p, (Generator*)0); + } +}; + +template +inline typename Generator::result_type + +unwind_type(U const& p, Generator*) + + + +{ + return unwind_helper::value>::execute(p, (Generator*)0); +} + +enum { direct_ = 0, pointer_ = 1, reference_ = 2, reference_to_pointer_ = 3 }; +template struct unwind_helper2; + +template <> +struct unwind_helper2 +{ + template + static typename Generator::result_type + execute(U(*)(), Generator* = 0) + { + return unwind_ptr_type((U*)0, (Generator*)0); + } +}; + +template <> +struct unwind_helper2 +{ + template + static typename Generator::result_type + execute(U*(*)(), Generator* = 0) + { + return unwind_ptr_type((U*)0, (Generator*)0); + } +}; + +template <> +struct unwind_helper2 +{ + template + static typename Generator::result_type + execute(U&(*)(), Generator* = 0) + { + return unwind_ptr_type((U*)0, (Generator*)0); + } +}; + +template <> +struct unwind_helper2 +{ + template + static typename Generator::result_type + execute(U&(*)(), Generator* = 0) + { + return unwind_ptr_type(U(0), (Generator*)0); + } +}; +# 149 "/usr/include/boost-1_42/boost/python/detail/unwind_type.hpp" +template +inline typename Generator::result_type + +unwind_type(boost::type*, Generator*) + + + +{ + static const int indirection = (boost::is_pointer::value ? pointer_ : 0) + (indirect_traits::is_reference_to_pointer::value ? reference_to_pointer_ : boost::is_reference::value ? reference_ : 0) + + + + + + ; + + return unwind_helper2::execute((U(*)())0,(Generator*)0); +} + +}}} +# 11 "/usr/include/boost-1_42/boost/python/converter/pytype_function.hpp" 2 + + +namespace boost { namespace python { + +namespace converter +{ +template +struct wrap_pytype +{ + static PyTypeObject const* get_pytype() + { + return python_type; + } +}; + +typedef PyTypeObject const* (*pytype_function)(); + + + + + +namespace detail +{ +struct unwind_type_id_helper{ + typedef python::type_info result_type; + template + static result_type execute(U* ){ + return python::type_id(); + } +}; + +template +inline python::type_info unwind_type_id_(boost::type* = 0, mpl::false_ * =0) +{ + return boost::python::detail::unwind_type (); +} + +inline python::type_info unwind_type_id_(boost::type* = 0, mpl::true_* =0) +{ + return type_id(); +} + +template +inline python::type_info unwind_type_id(boost::type* p= 0) +{ + return unwind_type_id_(p, (mpl::bool_::value >*)0 ); +} +} + + +template +struct expected_pytype_for_arg +{ + static PyTypeObject const *get_pytype() + { + const converter::registration *r=converter::registry::query( + detail::unwind_type_id_((boost::type*)0, (mpl::bool_::value >*)0 ) + ); + return r ? r->expected_from_python_type(): 0; + } +}; + + +template +struct registered_pytype +{ + static PyTypeObject const *get_pytype() + { + const converter::registration *r=converter::registry::query( + detail::unwind_type_id_((boost::type*) 0, (mpl::bool_::value >*)0 ) + ); + return r ? r->m_class_object: 0; + } +}; + + +template +struct registered_pytype_direct +{ + static PyTypeObject const* get_pytype() + { + return registered::converters.m_class_object; + } +}; + +template +struct expected_from_python_type : expected_pytype_for_arg{}; + +template +struct expected_from_python_type_direct +{ + static PyTypeObject const* get_pytype() + { + return registered::converters.expected_from_python_type(); + } +}; + +template +struct to_python_target_type +{ + static PyTypeObject const *get_pytype() + { + const converter::registration *r=converter::registry::query( + detail::unwind_type_id_((boost::type*)0, (mpl::bool_::value >*)0 ) + ); + return r ? r->to_python_target_type(): 0; + } +}; + +template +struct to_python_target_type_direct +{ + static PyTypeObject const *get_pytype() + { + return registered::converters.to_python_target_type(); + } +}; + + +}}} +# 17 "/usr/include/boost-1_42/boost/python/to_python_indirect.hpp" 2 +# 32 "/usr/include/boost-1_42/boost/python/to_python_indirect.hpp" +namespace boost { namespace python { + +template +struct to_python_indirect +{ + template + inline PyObject* + operator()(U const& ref) const + { + return this->execute(const_cast(ref), is_pointer()); + } + + inline PyTypeObject const* + get_pytype()const + { + return converter::registered_pytype::get_pytype(); + } + + private: + template + inline PyObject* execute(U* ptr, mpl::true_) const + { + + if (ptr == 0) + return python::detail::none(); + else + return this->execute(*ptr, mpl::false_()); + } + + template + inline PyObject* execute(U const& x, mpl::false_) const + { + U* const p = &const_cast(x); + if (is_polymorphic::value) + { + if (PyObject* o = detail::wrapper_base_::owner(p)) + return incref(o); + } + return MakeHolder::execute(p); + } +}; + + + + +namespace detail +{ + struct make_owning_holder + { + template + static PyObject* execute(T* p) + { + + + + + + + typedef std::auto_ptr smart_pointer; + + typedef objects::pointer_holder holder_t; + + smart_pointer ptr(const_cast(p)); + return objects::make_ptr_instance::execute(ptr); + } + }; + + struct make_reference_holder + { + template + static PyObject* execute(T* p) + { + typedef objects::pointer_holder holder_t; + T* q = const_cast(p); + return objects::make_ptr_instance::execute(q); + } + }; +} + +}} +# 11 "/usr/include/boost-1_42/boost/python/converter/arg_to_python.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/python/converter/registered_pointee.hpp" 1 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/python/converter/pointer_type_id.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/converter/pointer_type_id.hpp" +namespace boost { namespace python { namespace converter { + +namespace detail +{ + template + struct pointer_typeid_select + { + template + static inline type_info execute(T*(*)() = 0) + { + return type_id(); + } + }; + + template <> + struct pointer_typeid_select + { + template + static inline type_info execute(T* const volatile&(*)() = 0) + { + return type_id(); + } + + template + static inline type_info execute(T*volatile&(*)() = 0) + { + return type_id(); + } + + template + static inline type_info execute(T*const&(*)() = 0) + { + return type_id(); + } + + template + static inline type_info execute(T*&(*)() = 0) + { + return type_id(); + } + }; +} + + + + + +template +type_info pointer_type_id(T(*)() = 0) +{ + return detail::pointer_typeid_select< + is_reference::value + >::execute((T(*)())0); +} + +}}} +# 9 "/usr/include/boost-1_42/boost/python/converter/registered_pointee.hpp" 2 + + + + +namespace boost { namespace python { namespace converter { + +struct registration; + + +template +struct registered_pointee + : registered< + typename remove_pointer< + typename remove_cv< + typename remove_reference::type + >::type + >::type + > +{ +}; +# 60 "/usr/include/boost-1_42/boost/python/converter/registered_pointee.hpp" +}}} +# 14 "/usr/include/boost-1_42/boost/python/converter/arg_to_python.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/converter/arg_to_python_base.hpp" 1 +# 9 "/usr/include/boost-1_42/boost/python/converter/arg_to_python_base.hpp" +namespace boost { namespace python { namespace converter { + +struct registration; + +namespace detail +{ + struct arg_to_python_base + + : handle<> + + { + arg_to_python_base(void const volatile* source, registration const&); + + + + + + + }; +} + +}}} +# 15 "/usr/include/boost-1_42/boost/python/converter/arg_to_python.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/converter/shared_ptr_to_python.hpp" 1 +# 9 "/usr/include/boost-1_42/boost/python/converter/shared_ptr_to_python.hpp" +# 1 "/usr/include/boost-1_42/boost/python/converter/shared_ptr_deleter.hpp" 1 + + + + + + + +namespace boost { namespace python { namespace converter { + +struct shared_ptr_deleter +{ + shared_ptr_deleter(handle<> owner); + ~shared_ptr_deleter(); + + void operator()(void const*); + + handle<> owner; +}; + +}}} +# 10 "/usr/include/boost-1_42/boost/python/converter/shared_ptr_to_python.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/shared_ptr.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/shared_ptr.hpp" +# 1 "/usr/include/boost-1_42/boost/smart_ptr/shared_ptr.hpp" 1 +# 29 "/usr/include/boost-1_42/boost/smart_ptr/shared_ptr.hpp" +# 1 "/usr/include/boost-1_42/boost/assert.hpp" 1 +# 36 "/usr/include/boost-1_42/boost/assert.hpp" +# 1 "/usr/include/assert.h" 1 3 4 +# 37 "/usr/include/boost-1_42/boost/assert.hpp" 2 +# 30 "/usr/include/boost-1_42/boost/smart_ptr/shared_ptr.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/smart_ptr/detail/shared_count.hpp" 1 +# 28 "/usr/include/boost-1_42/boost/smart_ptr/detail/shared_count.hpp" +# 1 "/usr/include/boost-1_42/boost/smart_ptr/bad_weak_ptr.hpp" 1 +# 26 "/usr/include/boost-1_42/boost/smart_ptr/bad_weak_ptr.hpp" +namespace boost +{ +# 39 "/usr/include/boost-1_42/boost/smart_ptr/bad_weak_ptr.hpp" +class bad_weak_ptr: public std::exception +{ +public: + + virtual char const * what() const throw() + { + return "tr1::bad_weak_ptr"; + } +}; + + + + + +} +# 29 "/usr/include/boost-1_42/boost/smart_ptr/detail/shared_count.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/smart_ptr/detail/sp_counted_base.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/smart_ptr/detail/sp_counted_base.hpp" +# 1 "/usr/include/boost-1_42/boost/smart_ptr/detail/sp_has_sync.hpp" 1 +# 22 "/usr/include/boost-1_42/boost/smart_ptr/detail/sp_counted_base.hpp" 2 +# 36 "/usr/include/boost-1_42/boost/smart_ptr/detail/sp_counted_base.hpp" +# 1 "/usr/include/boost-1_42/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp" 1 +# 29 "/usr/include/boost-1_42/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp" +namespace boost +{ + +namespace detail +{ + +inline int atomic_exchange_and_add( int * pw, int dv ) +{ + + + + + int r; + + __asm__ __volatile__ + ( + "lock\n\t" + "xadd %1, %0": + "=m"( *pw ), "=r"( r ): + "m"( *pw ), "1"( dv ): + "memory", "cc" + ); + + return r; +} + +inline void atomic_increment( int * pw ) +{ + + + __asm__ + ( + "lock\n\t" + "incl %0": + "=m"( *pw ): + "m"( *pw ): + "cc" + ); +} + +inline int atomic_conditional_increment( int * pw ) +{ + + + + + int rv, tmp; + + __asm__ + ( + "movl %0, %%eax\n\t" + "0:\n\t" + "test %%eax, %%eax\n\t" + "je 1f\n\t" + "movl %%eax, %2\n\t" + "incl %2\n\t" + "lock\n\t" + "cmpxchgl %2, %0\n\t" + "jne 0b\n\t" + "1:": + "=m"( *pw ), "=&a"( rv ), "=&r"( tmp ): + "m"( *pw ): + "cc" + ); + + return rv; +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + int use_count_; + int weak_count_; + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() + { + } + + + + + virtual void dispose() = 0; + + + + virtual void destroy() + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() + { + if( atomic_exchange_and_add( &use_count_, -1 ) == 1 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() + { + atomic_increment( &weak_count_ ); + } + + void weak_release() + { + if( atomic_exchange_and_add( &weak_count_, -1 ) == 1 ) + { + destroy(); + } + } + + long use_count() const + { + return static_cast( use_count_ ); + } +}; + +} + +} +# 37 "/usr/include/boost-1_42/boost/smart_ptr/detail/sp_counted_base.hpp" 2 +# 30 "/usr/include/boost-1_42/boost/smart_ptr/detail/shared_count.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/smart_ptr/detail/sp_counted_impl.hpp" 1 +# 38 "/usr/include/boost-1_42/boost/smart_ptr/detail/sp_counted_impl.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 39 "/usr/include/boost-1_42/boost/smart_ptr/detail/sp_counted_impl.hpp" 2 + +namespace boost +{ +# 50 "/usr/include/boost-1_42/boost/smart_ptr/detail/sp_counted_impl.hpp" +namespace detail +{ + +template class sp_counted_impl_p: public sp_counted_base +{ +private: + + X * px_; + + sp_counted_impl_p( sp_counted_impl_p const & ); + sp_counted_impl_p & operator= ( sp_counted_impl_p const & ); + + typedef sp_counted_impl_p this_type; + +public: + + explicit sp_counted_impl_p( X * px ): px_( px ) + { + + + + } + + virtual void dispose() + { + + + + boost::checked_delete( px_ ); + } + + virtual void * get_deleter( detail::sp_typeinfo const & ) + { + return 0; + } +# 113 "/usr/include/boost-1_42/boost/smart_ptr/detail/sp_counted_impl.hpp" +}; +# 122 "/usr/include/boost-1_42/boost/smart_ptr/detail/sp_counted_impl.hpp" +template class sp_counted_impl_pd: public sp_counted_base +{ +private: + + P ptr; + D del; + + sp_counted_impl_pd( sp_counted_impl_pd const & ); + sp_counted_impl_pd & operator= ( sp_counted_impl_pd const & ); + + typedef sp_counted_impl_pd this_type; + +public: + + + + sp_counted_impl_pd( P p, D d ): ptr(p), del(d) + { + } + + virtual void dispose() + { + del( ptr ); + } + + virtual void * get_deleter( detail::sp_typeinfo const & ti ) + { + return ti == typeid(D)? &reinterpret_cast( del ): 0; + } +# 179 "/usr/include/boost-1_42/boost/smart_ptr/detail/sp_counted_impl.hpp" +}; + +template class sp_counted_impl_pda: public sp_counted_base +{ +private: + + P p_; + D d_; + A a_; + + sp_counted_impl_pda( sp_counted_impl_pda const & ); + sp_counted_impl_pda & operator= ( sp_counted_impl_pda const & ); + + typedef sp_counted_impl_pda this_type; + +public: + + + + sp_counted_impl_pda( P p, D d, A a ): p_( p ), d_( d ), a_( a ) + { + } + + virtual void dispose() + { + d_( p_ ); + } + + virtual void destroy() + { + typedef typename A::template rebind< this_type >::other A2; + + A2 a2( a_ ); + + this->~this_type(); + a2.deallocate( this, 1 ); + } + + virtual void * get_deleter( detail::sp_typeinfo const & ti ) + { + return ti == typeid(D)? &reinterpret_cast( d_ ): 0; + } +}; + + + + + +} + +} +# 31 "/usr/include/boost-1_42/boost/smart_ptr/detail/shared_count.hpp" 2 +# 40 "/usr/include/boost-1_42/boost/smart_ptr/detail/shared_count.hpp" +namespace boost +{ + +namespace detail +{ +# 53 "/usr/include/boost-1_42/boost/smart_ptr/detail/shared_count.hpp" +struct sp_nothrow_tag {}; + +class weak_count; + +class shared_count +{ +private: + + sp_counted_base * pi_; + + + + + + friend class weak_count; + +public: + + shared_count(): pi_(0) + + + + { + } + + template explicit shared_count( Y * p ): pi_( 0 ) + + + + { + + + try + { + pi_ = new sp_counted_impl_p( p ); + } + catch(...) + { + boost::checked_delete( p ); + throw; + } +# 106 "/usr/include/boost-1_42/boost/smart_ptr/detail/shared_count.hpp" + } + + + + + template shared_count( P p, D d ): pi_(0) + + + + + { + + + + + + try + { + pi_ = new sp_counted_impl_pd(p, d); + } + catch(...) + { + d(p); + throw; + } +# 143 "/usr/include/boost-1_42/boost/smart_ptr/detail/shared_count.hpp" + } + + template shared_count( P p, D d, A a ): pi_( 0 ) + + + + { + typedef sp_counted_impl_pda impl_type; + typedef typename A::template rebind< impl_type >::other A2; + + A2 a2( a ); + + + + try + { + pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); + new( static_cast< void* >( pi_ ) ) impl_type( p, d, a ); + } + catch(...) + { + d( p ); + + if( pi_ != 0 ) + { + a2.deallocate( static_cast< impl_type* >( pi_ ), 1 ); + } + + throw; + } +# 189 "/usr/include/boost-1_42/boost/smart_ptr/detail/shared_count.hpp" + } + + + + + + template + explicit shared_count( std::auto_ptr & r ): pi_( new sp_counted_impl_p( r.get() ) ) + + + + { +# 210 "/usr/include/boost-1_42/boost/smart_ptr/detail/shared_count.hpp" + r.release(); + } + + + + ~shared_count() + { + if( pi_ != 0 ) pi_->release(); + + + + } + + shared_count(shared_count const & r): pi_(r.pi_) + + + + { + if( pi_ != 0 ) pi_->add_ref_copy(); + } +# 243 "/usr/include/boost-1_42/boost/smart_ptr/detail/shared_count.hpp" + explicit shared_count(weak_count const & r); + shared_count( weak_count const & r, sp_nothrow_tag ); + + shared_count & operator= (shared_count const & r) + { + sp_counted_base * tmp = r.pi_; + + if( tmp != pi_ ) + { + if( tmp != 0 ) tmp->add_ref_copy(); + if( pi_ != 0 ) pi_->release(); + pi_ = tmp; + } + + return *this; + } + + void swap(shared_count & r) + { + sp_counted_base * tmp = r.pi_; + r.pi_ = pi_; + pi_ = tmp; + } + + long use_count() const + { + return pi_ != 0? pi_->use_count(): 0; + } + + bool unique() const + { + return use_count() == 1; + } + + bool empty() const + { + return pi_ == 0; + } + + friend inline bool operator==(shared_count const & a, shared_count const & b) + { + return a.pi_ == b.pi_; + } + + friend inline bool operator<(shared_count const & a, shared_count const & b) + { + return std::less()( a.pi_, b.pi_ ); + } + + void * get_deleter( sp_typeinfo const & ti ) const + { + return pi_? pi_->get_deleter( ti ): 0; + } +}; + + +class weak_count +{ +private: + + sp_counted_base * pi_; + + + + + + friend class shared_count; + +public: + + weak_count(): pi_(0) + + + + { + } + + weak_count(shared_count const & r): pi_(r.pi_) + + + + { + if(pi_ != 0) pi_->weak_add_ref(); + } + + weak_count(weak_count const & r): pi_(r.pi_) + + + + { + if(pi_ != 0) pi_->weak_add_ref(); + } +# 350 "/usr/include/boost-1_42/boost/smart_ptr/detail/shared_count.hpp" + ~weak_count() + { + if(pi_ != 0) pi_->weak_release(); + + + + } + + weak_count & operator= (shared_count const & r) + { + sp_counted_base * tmp = r.pi_; + + if( tmp != pi_ ) + { + if(tmp != 0) tmp->weak_add_ref(); + if(pi_ != 0) pi_->weak_release(); + pi_ = tmp; + } + + return *this; + } + + weak_count & operator= (weak_count const & r) + { + sp_counted_base * tmp = r.pi_; + + if( tmp != pi_ ) + { + if(tmp != 0) tmp->weak_add_ref(); + if(pi_ != 0) pi_->weak_release(); + pi_ = tmp; + } + + return *this; + } + + void swap(weak_count & r) + { + sp_counted_base * tmp = r.pi_; + r.pi_ = pi_; + pi_ = tmp; + } + + long use_count() const + { + return pi_ != 0? pi_->use_count(): 0; + } + + bool empty() const + { + return pi_ == 0; + } + + friend inline bool operator==(weak_count const & a, weak_count const & b) + { + return a.pi_ == b.pi_; + } + + friend inline bool operator<(weak_count const & a, weak_count const & b) + { + return std::less()(a.pi_, b.pi_); + } +}; + +inline shared_count::shared_count( weak_count const & r ): pi_( r.pi_ ) + + + +{ + if( pi_ == 0 || !pi_->add_ref_lock() ) + { + boost::throw_exception( boost::bad_weak_ptr() ); + } +} + +inline shared_count::shared_count( weak_count const & r, sp_nothrow_tag ): pi_( r.pi_ ) + + + +{ + if( pi_ != 0 && !pi_->add_ref_lock() ) + { + pi_ = 0; + } +} + +} + +} +# 33 "/usr/include/boost-1_42/boost/smart_ptr/shared_ptr.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/smart_ptr/detail/sp_convertible.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/smart_ptr/detail/sp_convertible.hpp" +namespace boost +{ + +namespace detail +{ + +template< class Y, class T > struct sp_convertible +{ + typedef char (&yes) [1]; + typedef char (&no) [2]; + + static yes f( T* ); + static no f( ... ); + + enum _vt { value = sizeof( f( static_cast(0) ) ) == sizeof(yes) }; +}; + +struct sp_empty +{ +}; + +template< bool > struct sp_enable_if_convertible_impl; + +template<> struct sp_enable_if_convertible_impl +{ + typedef sp_empty type; +}; + +template<> struct sp_enable_if_convertible_impl +{ +}; + +template< class Y, class T > struct sp_enable_if_convertible: public sp_enable_if_convertible_impl< sp_convertible< Y, T >::value > +{ +}; + +} + +} +# 35 "/usr/include/boost-1_42/boost/smart_ptr/shared_ptr.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/smart_ptr/detail/spinlock_pool.hpp" 1 +# 25 "/usr/include/boost-1_42/boost/smart_ptr/detail/spinlock_pool.hpp" +# 1 "/usr/include/boost-1_42/boost/smart_ptr/detail/spinlock.hpp" 1 +# 38 "/usr/include/boost-1_42/boost/smart_ptr/detail/spinlock.hpp" +# 1 "/usr/include/boost-1_42/boost/smart_ptr/detail/spinlock_sync.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/smart_ptr/detail/spinlock_sync.hpp" +# 1 "/usr/include/boost-1_42/boost/smart_ptr/detail/yield_k.hpp" 1 +# 91 "/usr/include/boost-1_42/boost/smart_ptr/detail/yield_k.hpp" +namespace boost +{ + +namespace detail +{ + +inline void yield( unsigned k ) +{ + if( k < 4 ) + { + } + + else if( k < 16 ) + { + __asm__ __volatile__( "rep; nop" : : : "memory" ); + } + + else if( k < 32 || k & 1 ) + { + sched_yield(); + } + else + { + + struct timespec rqtp = { 0, 0 }; + + + + + rqtp.tv_sec = 0; + rqtp.tv_nsec = 1000; + + nanosleep( &rqtp, 0 ); + } +} + +} + +} +# 19 "/usr/include/boost-1_42/boost/smart_ptr/detail/spinlock_sync.hpp" 2 + + + + + +namespace boost +{ + +namespace detail +{ + +class spinlock +{ +public: + + int v_; + +public: + + bool try_lock() + { + int r = __sync_lock_test_and_set( &v_, 1 ); + return r == 0; + } + + void lock() + { + for( unsigned k = 0; !try_lock(); ++k ) + { + boost::detail::yield( k ); + } + } + + void unlock() + { + __sync_lock_release( &v_ ); + } + +public: + + class scoped_lock + { + private: + + spinlock & sp_; + + scoped_lock( scoped_lock const & ); + scoped_lock & operator=( scoped_lock const & ); + + public: + + explicit scoped_lock( spinlock & sp ): sp_( sp ) + { + sp.lock(); + } + + ~scoped_lock() + { + sp_.unlock(); + } + }; +}; + +} +} +# 39 "/usr/include/boost-1_42/boost/smart_ptr/detail/spinlock.hpp" 2 +# 26 "/usr/include/boost-1_42/boost/smart_ptr/detail/spinlock_pool.hpp" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 27 "/usr/include/boost-1_42/boost/smart_ptr/detail/spinlock_pool.hpp" 2 + +namespace boost +{ + +namespace detail +{ + +template< int I > class spinlock_pool +{ +private: + + static spinlock pool_[ 41 ]; + +public: + + static spinlock & spinlock_for( void const * pv ) + { + std::size_t i = reinterpret_cast< std::size_t >( pv ) % 41; + return pool_[ i ]; + } + + class scoped_lock + { + private: + + spinlock & sp_; + + scoped_lock( scoped_lock const & ); + scoped_lock & operator=( scoped_lock const & ); + + public: + + explicit scoped_lock( void const * pv ): sp_( spinlock_for( pv ) ) + { + sp_.lock(); + } + + ~scoped_lock() + { + sp_.unlock(); + } + }; +}; + +template< int I > spinlock spinlock_pool< I >::pool_[ 41 ] = +{ + {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, + {0} +}; + +} +} +# 38 "/usr/include/boost-1_42/boost/smart_ptr/shared_ptr.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/memory_order.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/memory_order.hpp" +namespace boost +{ +# 41 "/usr/include/boost-1_42/boost/memory_order.hpp" +enum memory_order +{ + memory_order_relaxed = 0, + memory_order_acquire = 1, + memory_order_release = 2, + memory_order_acq_rel = 3, + memory_order_seq_cst = 7, + memory_order_consume = 8 +}; + +} +# 39 "/usr/include/boost-1_42/boost/smart_ptr/shared_ptr.hpp" 2 +# 58 "/usr/include/boost-1_42/boost/smart_ptr/shared_ptr.hpp" +namespace boost +{ + +template class shared_ptr; +template class weak_ptr; +template class enable_shared_from_this; +template class enable_shared_from_this2; + +namespace detail +{ + +struct static_cast_tag {}; +struct const_cast_tag {}; +struct dynamic_cast_tag {}; +struct polymorphic_cast_tag {}; + +template struct shared_ptr_traits +{ + typedef T & reference; +}; + +template<> struct shared_ptr_traits +{ + typedef void reference; +}; + + + +template<> struct shared_ptr_traits +{ + typedef void reference; +}; + +template<> struct shared_ptr_traits +{ + typedef void reference; +}; + +template<> struct shared_ptr_traits +{ + typedef void reference; +}; + + + + + +template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr const * ppx, Y const * py, boost::enable_shared_from_this< T > const * pe ) +{ + if( pe != 0 ) + { + pe->_internal_accept_owner( ppx, const_cast< Y* >( py ) ); + } +} + +template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr * ppx, Y const * py, boost::enable_shared_from_this2< T > const * pe ) +{ + if( pe != 0 ) + { + pe->_internal_accept_owner( ppx, const_cast< Y* >( py ) ); + } +} +# 136 "/usr/include/boost-1_42/boost/smart_ptr/shared_ptr.hpp" +inline void sp_enable_shared_from_this( ... ) +{ +} + + + + + + + +template< class T, class R > struct sp_enable_if_auto_ptr +{ +}; + +template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R > +{ + typedef R type; +}; + + + +} +# 168 "/usr/include/boost-1_42/boost/smart_ptr/shared_ptr.hpp" +template class shared_ptr +{ +private: + + + typedef shared_ptr this_type; + +public: + + typedef T element_type; + typedef T value_type; + typedef T * pointer; + typedef typename boost::detail::shared_ptr_traits::reference reference; + + shared_ptr(): px(0), pn() + { + } + + template + explicit shared_ptr( Y * p ): px( p ), pn( p ) + { + boost::detail::sp_enable_shared_from_this( this, p, p ); + } + + + + + + + + template shared_ptr(Y * p, D d): px(p), pn(p, d) + { + boost::detail::sp_enable_shared_from_this( this, p, p ); + } + + + + template shared_ptr( Y * p, D d, A a ): px( p ), pn( p, d, a ) + { + boost::detail::sp_enable_shared_from_this( this, p, p ); + } + + + + template + explicit shared_ptr(weak_ptr const & r): pn(r.pn) + { + + px = r.px; + } + + template + shared_ptr( weak_ptr const & r, boost::detail::sp_nothrow_tag ): px( 0 ), pn( r.pn, boost::detail::sp_nothrow_tag() ) + { + if( !pn.empty() ) + { + px = r.px; + } + } + + template + + + shared_ptr( shared_ptr const & r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) + + + + + + + : px( r.px ), pn( r.pn ) + { + } + + + template< class Y > + shared_ptr( shared_ptr const & r, T * p ): px( p ), pn( r.pn ) + { + } + + template + shared_ptr(shared_ptr const & r, boost::detail::static_cast_tag): px(static_cast(r.px)), pn(r.pn) + { + } + + template + shared_ptr(shared_ptr const & r, boost::detail::const_cast_tag): px(const_cast(r.px)), pn(r.pn) + { + } + + template + shared_ptr(shared_ptr const & r, boost::detail::dynamic_cast_tag): px(dynamic_cast(r.px)), pn(r.pn) + { + if(px == 0) + { + pn = boost::detail::shared_count(); + } + } + + template + shared_ptr(shared_ptr const & r, boost::detail::polymorphic_cast_tag): px(dynamic_cast(r.px)), pn(r.pn) + { + if(px == 0) + { + boost::throw_exception(std::bad_cast()); + } + } + + + + template + explicit shared_ptr(std::auto_ptr & r): px(r.get()), pn() + { + Y * tmp = r.get(); + pn = boost::detail::shared_count(r); + boost::detail::sp_enable_shared_from_this( this, tmp, tmp ); + } + + + + template + explicit shared_ptr( Ap r, typename boost::detail::sp_enable_if_auto_ptr::type = 0 ): px( r.get() ), pn() + { + typename Ap::element_type * tmp = r.get(); + pn = boost::detail::shared_count( r ); + boost::detail::sp_enable_shared_from_this( this, tmp, tmp ); + } +# 303 "/usr/include/boost-1_42/boost/smart_ptr/shared_ptr.hpp" + shared_ptr & operator=( shared_ptr const & r ) + { + this_type(r).swap(*this); + return *this; + } + + + + template + shared_ptr & operator=(shared_ptr const & r) + { + this_type(r).swap(*this); + return *this; + } + + + + + + template + shared_ptr & operator=( std::auto_ptr & r ) + { + this_type(r).swap(*this); + return *this; + } + + + + template + typename boost::detail::sp_enable_if_auto_ptr< Ap, shared_ptr & >::type operator=( Ap r ) + { + this_type( r ).swap( *this ); + return *this; + } +# 384 "/usr/include/boost-1_42/boost/smart_ptr/shared_ptr.hpp" + void reset() + { + this_type().swap(*this); + } + + template void reset(Y * p) + { + (static_cast (0)); + this_type(p).swap(*this); + } + + template void reset( Y * p, D d ) + { + this_type( p, d ).swap( *this ); + } + + template void reset( Y * p, D d, A a ) + { + this_type( p, d, a ).swap( *this ); + } + + template void reset( shared_ptr const & r, T * p ) + { + this_type( r, p ).swap( *this ); + } + + reference operator* () const + { + (static_cast (0)); + return *px; + } + + T * operator-> () const + { + (static_cast (0)); + return px; + } + + T * get() const + { + return px; + } + + +# 1 "/usr/include/boost-1_42/boost/smart_ptr/detail/operator_bool.hpp" 1 +# 43 "/usr/include/boost-1_42/boost/smart_ptr/detail/operator_bool.hpp" + typedef T * this_type::*unspecified_bool_type; + + operator unspecified_bool_type() const + { + return px == 0? 0: &this_type::px; + } + + + + + bool operator! () const + { + return px == 0; + } +# 429 "/usr/include/boost-1_42/boost/smart_ptr/shared_ptr.hpp" 2 + + bool unique() const + { + return pn.unique(); + } + + long use_count() const + { + return pn.use_count(); + } + + void swap(shared_ptr & other) + { + std::swap(px, other.px); + pn.swap(other.pn); + } + + template bool _internal_less(shared_ptr const & rhs) const + { + return pn < rhs.pn; + } + + void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const + { + return pn.get_deleter( ti ); + } + + bool _internal_equiv( shared_ptr const & r ) const + { + return px == r.px && pn == r.pn; + } + + + + + + +private: + + template friend class shared_ptr; + template friend class weak_ptr; + + + + + T * px; + boost::detail::shared_count pn; + +}; + +template inline bool operator==(shared_ptr const & a, shared_ptr const & b) +{ + return a.get() == b.get(); +} + +template inline bool operator!=(shared_ptr const & a, shared_ptr const & b) +{ + return a.get() != b.get(); +} +# 500 "/usr/include/boost-1_42/boost/smart_ptr/shared_ptr.hpp" +template inline bool operator<(shared_ptr const & a, shared_ptr const & b) +{ + return a._internal_less(b); +} + +template inline void swap(shared_ptr & a, shared_ptr & b) +{ + a.swap(b); +} + +template shared_ptr static_pointer_cast(shared_ptr const & r) +{ + return shared_ptr(r, boost::detail::static_cast_tag()); +} + +template shared_ptr const_pointer_cast(shared_ptr const & r) +{ + return shared_ptr(r, boost::detail::const_cast_tag()); +} + +template shared_ptr dynamic_pointer_cast(shared_ptr const & r) +{ + return shared_ptr(r, boost::detail::dynamic_cast_tag()); +} + + + +template shared_ptr shared_static_cast(shared_ptr const & r) +{ + return shared_ptr(r, boost::detail::static_cast_tag()); +} + +template shared_ptr shared_dynamic_cast(shared_ptr const & r) +{ + return shared_ptr(r, boost::detail::dynamic_cast_tag()); +} + +template shared_ptr shared_polymorphic_cast(shared_ptr const & r) +{ + return shared_ptr(r, boost::detail::polymorphic_cast_tag()); +} + +template shared_ptr shared_polymorphic_downcast(shared_ptr const & r) +{ + (static_cast (0)); + return shared_static_cast(r); +} + + + +template inline T * get_pointer(shared_ptr const & p) +{ + return p.get(); +} +# 577 "/usr/include/boost-1_42/boost/smart_ptr/shared_ptr.hpp" +template std::basic_ostream & operator<< (std::basic_ostream & os, shared_ptr const & p) + +{ + os << p.get(); + return os; +} +# 607 "/usr/include/boost-1_42/boost/smart_ptr/shared_ptr.hpp" +template D * get_deleter(shared_ptr const & p) +{ + return static_cast(p._internal_get_deleter(typeid(D))); +} + + + + + + + +template inline bool atomic_is_lock_free( shared_ptr const * ) +{ + return false; +} + +template shared_ptr atomic_load( shared_ptr const * p ) +{ + boost::detail::spinlock_pool<2>::scoped_lock lock( p ); + return *p; +} + +template inline shared_ptr atomic_load_explicit( shared_ptr const * p, memory_order ) +{ + return atomic_load( p ); +} + +template void atomic_store( shared_ptr * p, shared_ptr r ) +{ + boost::detail::spinlock_pool<2>::scoped_lock lock( p ); + p->swap( r ); +} + +template inline void atomic_store_explicit( shared_ptr * p, shared_ptr r, memory_order ) +{ + atomic_store( p, r ); +} + +template shared_ptr atomic_exchange( shared_ptr * p, shared_ptr r ) +{ + boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p ); + + sp.lock(); + p->swap( r ); + sp.unlock(); + + return r; +} + +template shared_ptr atomic_exchange_explicit( shared_ptr * p, shared_ptr r, memory_order ) +{ + return atomic_exchange( p, r ); +} + +template bool atomic_compare_exchange( shared_ptr * p, shared_ptr * v, shared_ptr w ) +{ + boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p ); + + sp.lock(); + + if( p->_internal_equiv( *v ) ) + { + p->swap( w ); + + sp.unlock(); + + return true; + } + else + { + shared_ptr tmp( *p ); + + sp.unlock(); + + tmp.swap( *v ); + return false; + } +} + +template inline bool atomic_compare_exchange_explicit( shared_ptr * p, shared_ptr * v, shared_ptr w, memory_order , memory_order ) +{ + return atomic_compare_exchange( p, v, w ); +} + + + +} +# 18 "/usr/include/boost-1_42/boost/shared_ptr.hpp" 2 +# 11 "/usr/include/boost-1_42/boost/python/converter/shared_ptr_to_python.hpp" 2 + + +namespace boost { namespace python { namespace converter { + +template +PyObject* shared_ptr_to_python(shared_ptr const& x) +{ + if (!x) + return python::detail::none(); + else if (shared_ptr_deleter* d = boost::get_deleter(x)) + return incref( get_pointer( d->owner ) ); + else + return converter::registered const&>::converters.to_python(&x); +} + +}}} +# 16 "/usr/include/boost-1_42/boost/python/converter/arg_to_python.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/converter/builtin_converters.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/converter/builtin_converters.hpp" +# 1 "/usr/include/boost-1_42/boost/python/ssize_t.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/ssize_t.hpp" +namespace boost { namespace python { + + + +typedef Py_ssize_t ssize_t; +ssize_t const ssize_t_max = ((Py_ssize_t)(((size_t)-1)>>1)); +ssize_t const ssize_t_min = (-((Py_ssize_t)(((size_t)-1)>>1))-1); +# 27 "/usr/include/boost-1_42/boost/python/ssize_t.hpp" +}} +# 11 "/usr/include/boost-1_42/boost/python/converter/builtin_converters.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/implicit_cast.hpp" 1 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/mpl/identity.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/mpl/identity.hpp" +namespace boost { namespace mpl { + +template< + typename T = na + > +struct identity +{ + typedef T type; + +}; + +template< + typename T = na + > +struct make_identity +{ + typedef identity type; + +}; + +template<> struct identity< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : identity< T1 > { }; }; template< typename Tag > struct lambda< identity< na > , Tag , int_<-1> > { typedef false_ is_le; typedef identity< na > result_; typedef identity< na > type; }; namespace aux { template< typename T1 > struct template_arity< identity< T1 > > : int_<1> { }; template<> struct template_arity< identity< na > > : int_<-1> { }; } +template<> struct make_identity< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : make_identity< T1 > { }; }; template< typename Tag > struct lambda< make_identity< na > , Tag , int_<-1> > { typedef false_ is_le; typedef make_identity< na > result_; typedef make_identity< na > type; }; namespace aux { template< typename T1 > struct template_arity< make_identity< T1 > > : int_<1> { }; template<> struct template_arity< make_identity< na > > : int_<-1> { }; } + +}} +# 9 "/usr/include/boost-1_42/boost/implicit_cast.hpp" 2 + +namespace boost { + + + + + + +template +inline T implicit_cast (typename mpl::identity::type x) { + return x; +} + + + + + +} +# 12 "/usr/include/boost-1_42/boost/python/converter/builtin_converters.hpp" 2 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/complex" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/complex" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/complex" 3 + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cmath" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cmath" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cmath" 3 +# 77 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cmath" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + + + template + _Tp __cmath_power(_Tp, unsigned int); + + template + inline _Tp + __pow_helper(_Tp __x, int __n) + { + return __n < 0 + ? _Tp(1)/__cmath_power(__x, -__n) + : __cmath_power(__x, __n); + } + + inline double + abs(double __x) + { return __builtin_fabs(__x); } + + inline float + abs(float __x) + { return __builtin_fabsf(__x); } + + inline long double + abs(long double __x) + { return __builtin_fabsl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + abs(_Tp __x) + { return __builtin_fabs(__x); } + + using ::acos; + + inline float + acos(float __x) + { return __builtin_acosf(__x); } + + inline long double + acos(long double __x) + { return __builtin_acosl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + acos(_Tp __x) + { return __builtin_acos(__x); } + + using ::asin; + + inline float + asin(float __x) + { return __builtin_asinf(__x); } + + inline long double + asin(long double __x) + { return __builtin_asinl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + asin(_Tp __x) + { return __builtin_asin(__x); } + + using ::atan; + + inline float + atan(float __x) + { return __builtin_atanf(__x); } + + inline long double + atan(long double __x) + { return __builtin_atanl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + atan(_Tp __x) + { return __builtin_atan(__x); } + + using ::atan2; + + inline float + atan2(float __y, float __x) + { return __builtin_atan2f(__y, __x); } + + inline long double + atan2(long double __y, long double __x) + { return __builtin_atan2l(__y, __x); } + + template + inline + typename __gnu_cxx::__promote_2< + typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value + && __is_arithmetic<_Up>::__value, + _Tp>::__type, _Up>::__type + atan2(_Tp __y, _Up __x) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return atan2(__type(__y), __type(__x)); + } + + using ::ceil; + + inline float + ceil(float __x) + { return __builtin_ceilf(__x); } + + inline long double + ceil(long double __x) + { return __builtin_ceill(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + ceil(_Tp __x) + { return __builtin_ceil(__x); } + + using ::cos; + + inline float + cos(float __x) + { return __builtin_cosf(__x); } + + inline long double + cos(long double __x) + { return __builtin_cosl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + cos(_Tp __x) + { return __builtin_cos(__x); } + + using ::cosh; + + inline float + cosh(float __x) + { return __builtin_coshf(__x); } + + inline long double + cosh(long double __x) + { return __builtin_coshl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + cosh(_Tp __x) + { return __builtin_cosh(__x); } + + using ::exp; + + inline float + exp(float __x) + { return __builtin_expf(__x); } + + inline long double + exp(long double __x) + { return __builtin_expl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + exp(_Tp __x) + { return __builtin_exp(__x); } + + using ::fabs; + + inline float + fabs(float __x) + { return __builtin_fabsf(__x); } + + inline long double + fabs(long double __x) + { return __builtin_fabsl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + fabs(_Tp __x) + { return __builtin_fabs(__x); } + + using ::floor; + + inline float + floor(float __x) + { return __builtin_floorf(__x); } + + inline long double + floor(long double __x) + { return __builtin_floorl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + floor(_Tp __x) + { return __builtin_floor(__x); } + + using ::fmod; + + inline float + fmod(float __x, float __y) + { return __builtin_fmodf(__x, __y); } + + inline long double + fmod(long double __x, long double __y) + { return __builtin_fmodl(__x, __y); } + + using ::frexp; + + inline float + frexp(float __x, int* __exp) + { return __builtin_frexpf(__x, __exp); } + + inline long double + frexp(long double __x, int* __exp) + { return __builtin_frexpl(__x, __exp); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + frexp(_Tp __x, int* __exp) + { return __builtin_frexp(__x, __exp); } + + using ::ldexp; + + inline float + ldexp(float __x, int __exp) + { return __builtin_ldexpf(__x, __exp); } + + inline long double + ldexp(long double __x, int __exp) + { return __builtin_ldexpl(__x, __exp); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + ldexp(_Tp __x, int __exp) + { return __builtin_ldexp(__x, __exp); } + + using ::log; + + inline float + log(float __x) + { return __builtin_logf(__x); } + + inline long double + log(long double __x) + { return __builtin_logl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + log(_Tp __x) + { return __builtin_log(__x); } + + using ::log10; + + inline float + log10(float __x) + { return __builtin_log10f(__x); } + + inline long double + log10(long double __x) + { return __builtin_log10l(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + log10(_Tp __x) + { return __builtin_log10(__x); } + + using ::modf; + + inline float + modf(float __x, float* __iptr) + { return __builtin_modff(__x, __iptr); } + + inline long double + modf(long double __x, long double* __iptr) + { return __builtin_modfl(__x, __iptr); } + + using ::pow; + + inline float + pow(float __x, float __y) + { return __builtin_powf(__x, __y); } + + inline long double + pow(long double __x, long double __y) + { return __builtin_powl(__x, __y); } + + + + + inline double + pow(double __x, int __i) + { return __builtin_powi(__x, __i); } + + inline float + pow(float __x, int __n) + { return __builtin_powif(__x, __n); } + + inline long double + pow(long double __x, int __n) + { return __builtin_powil(__x, __n); } + + + template + inline + typename __gnu_cxx::__promote_2< + typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value + && __is_arithmetic<_Up>::__value, + _Tp>::__type, _Up>::__type + pow(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return pow(__type(__x), __type(__y)); + } + + using ::sin; + + inline float + sin(float __x) + { return __builtin_sinf(__x); } + + inline long double + sin(long double __x) + { return __builtin_sinl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + sin(_Tp __x) + { return __builtin_sin(__x); } + + using ::sinh; + + inline float + sinh(float __x) + { return __builtin_sinhf(__x); } + + inline long double + sinh(long double __x) + { return __builtin_sinhl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + sinh(_Tp __x) + { return __builtin_sinh(__x); } + + using ::sqrt; + + inline float + sqrt(float __x) + { return __builtin_sqrtf(__x); } + + inline long double + sqrt(long double __x) + { return __builtin_sqrtl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + sqrt(_Tp __x) + { return __builtin_sqrt(__x); } + + using ::tan; + + inline float + tan(float __x) + { return __builtin_tanf(__x); } + + inline long double + tan(long double __x) + { return __builtin_tanl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + tan(_Tp __x) + { return __builtin_tan(__x); } + + using ::tanh; + + inline float + tanh(float __x) + { return __builtin_tanhf(__x); } + + inline long double + tanh(long double __x) + { return __builtin_tanhl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + tanh(_Tp __x) + { return __builtin_tanh(__x); } + +} +# 498 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cmath" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + fpclassify(_Tp __f) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, + FP_SUBNORMAL, FP_ZERO, __type(__f)); + } + + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + isfinite(_Tp __f) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_isfinite(__type(__f)); + } + + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + isinf(_Tp __f) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_isinf(__type(__f)); + } + + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + isnan(_Tp __f) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_isnan(__type(__f)); + } + + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + isnormal(_Tp __f) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_isnormal(__type(__f)); + } + + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + signbit(_Tp __f) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_signbit(__type(__f)); + } + + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + isgreater(_Tp __f1, _Tp __f2) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_isgreater(__type(__f1), __type(__f2)); + } + + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + isgreaterequal(_Tp __f1, _Tp __f2) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_isgreaterequal(__type(__f1), __type(__f2)); + } + + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + isless(_Tp __f1, _Tp __f2) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_isless(__type(__f1), __type(__f2)); + } + + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + islessequal(_Tp __f1, _Tp __f2) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_islessequal(__type(__f1), __type(__f2)); + } + + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + islessgreater(_Tp __f1, _Tp __f2) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_islessgreater(__type(__f1), __type(__f2)); + } + + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + isunordered(_Tp __f1, _Tp __f2) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_isunordered(__type(__f1), __type(__f2)); + } + +} + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/cmath.tcc" 1 3 +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/cmath.tcc" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + inline _Tp + __cmath_power(_Tp __x, unsigned int __n) + { + _Tp __y = __n % 2 ? __x : _Tp(1); + + while (__n >>= 1) + { + __x = __x * __x; + if (__n % 2) + __y = __y * __x; + } + + return __y; + } + +} +# 616 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cmath" 2 3 +# 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/complex" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/sstream" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/sstream" 3 + +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/sstream" 3 + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 57 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/sstream" 3 + template + class basic_stringbuf : public basic_streambuf<_CharT, _Traits> + { + public: + + typedef _CharT char_type; + typedef _Traits traits_type; + + + typedef _Alloc allocator_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + typedef basic_streambuf __streambuf_type; + typedef basic_string __string_type; + typedef typename __string_type::size_type __size_type; + + protected: + + ios_base::openmode _M_mode; + + + __string_type _M_string; + + public: +# 91 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/sstream" 3 + explicit + basic_stringbuf(ios_base::openmode __mode = ios_base::in | ios_base::out) + : __streambuf_type(), _M_mode(__mode), _M_string() + { } +# 104 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/sstream" 3 + explicit + basic_stringbuf(const __string_type& __str, + ios_base::openmode __mode = ios_base::in | ios_base::out) + : __streambuf_type(), _M_mode(), _M_string(__str.data(), __str.size()) + { _M_stringbuf_init(__mode); } +# 119 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/sstream" 3 + __string_type + str() const + { + __string_type __ret; + if (this->pptr()) + { + + if (this->pptr() > this->egptr()) + __ret = __string_type(this->pbase(), this->pptr()); + else + __ret = __string_type(this->pbase(), this->egptr()); + } + else + __ret = _M_string; + return __ret; + } +# 143 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/sstream" 3 + void + str(const __string_type& __s) + { + + _M_string.assign(__s.data(), __s.size()); + _M_stringbuf_init(_M_mode); + } + + protected: + + void + _M_stringbuf_init(ios_base::openmode __mode) + { + _M_mode = __mode; + __size_type __len = 0; + if (_M_mode & (ios_base::ate | ios_base::app)) + __len = _M_string.size(); + _M_sync(const_cast(_M_string.data()), 0, __len); + } + + virtual streamsize + showmanyc() + { + streamsize __ret = -1; + if (_M_mode & ios_base::in) + { + _M_update_egptr(); + __ret = this->egptr() - this->gptr(); + } + return __ret; + } + + virtual int_type + underflow(); + + virtual int_type + pbackfail(int_type __c = traits_type::eof()); + + virtual int_type + overflow(int_type __c = traits_type::eof()); +# 195 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/sstream" 3 + virtual __streambuf_type* + setbuf(char_type* __s, streamsize __n) + { + if (__s && __n >= 0) + { + + + + + + + _M_string.clear(); + + + _M_sync(__s, __n, 0); + } + return this; + } + + virtual pos_type + seekoff(off_type __off, ios_base::seekdir __way, + ios_base::openmode __mode = ios_base::in | ios_base::out); + + virtual pos_type + seekpos(pos_type __sp, + ios_base::openmode __mode = ios_base::in | ios_base::out); + + + + + void + _M_sync(char_type* __base, __size_type __i, __size_type __o); + + + + void + _M_update_egptr() + { + const bool __testin = _M_mode & ios_base::in; + if (this->pptr() && this->pptr() > this->egptr()) + { + if (__testin) + this->setg(this->eback(), this->gptr(), this->pptr()); + else + this->setg(this->pptr(), this->pptr(), this->pptr()); + } + } + }; +# 255 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/sstream" 3 + template + class basic_istringstream : public basic_istream<_CharT, _Traits> + { + public: + + typedef _CharT char_type; + typedef _Traits traits_type; + + + typedef _Alloc allocator_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; + typedef basic_istream __istream_type; + + private: + __stringbuf_type _M_stringbuf; + + public: +# 291 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/sstream" 3 + explicit + basic_istringstream(ios_base::openmode __mode = ios_base::in) + : __istream_type(), _M_stringbuf(__mode | ios_base::in) + { this->init(&_M_stringbuf); } +# 309 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/sstream" 3 + explicit + basic_istringstream(const __string_type& __str, + ios_base::openmode __mode = ios_base::in) + : __istream_type(), _M_stringbuf(__str, __mode | ios_base::in) + { this->init(&_M_stringbuf); } + + + + + + + + ~basic_istringstream() + { } +# 331 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/sstream" 3 + __stringbuf_type* + rdbuf() const + { return const_cast<__stringbuf_type*>(&_M_stringbuf); } + + + + + + __string_type + str() const + { return _M_stringbuf.str(); } + + + + + + + + void + str(const __string_type& __s) + { _M_stringbuf.str(__s); } + }; +# 365 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/sstream" 3 + template + class basic_ostringstream : public basic_ostream<_CharT, _Traits> + { + public: + + typedef _CharT char_type; + typedef _Traits traits_type; + + + typedef _Alloc allocator_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; + typedef basic_ostream __ostream_type; + + private: + __stringbuf_type _M_stringbuf; + + public: +# 401 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/sstream" 3 + explicit + basic_ostringstream(ios_base::openmode __mode = ios_base::out) + : __ostream_type(), _M_stringbuf(__mode | ios_base::out) + { this->init(&_M_stringbuf); } +# 419 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/sstream" 3 + explicit + basic_ostringstream(const __string_type& __str, + ios_base::openmode __mode = ios_base::out) + : __ostream_type(), _M_stringbuf(__str, __mode | ios_base::out) + { this->init(&_M_stringbuf); } + + + + + + + + ~basic_ostringstream() + { } +# 441 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/sstream" 3 + __stringbuf_type* + rdbuf() const + { return const_cast<__stringbuf_type*>(&_M_stringbuf); } + + + + + + __string_type + str() const + { return _M_stringbuf.str(); } + + + + + + + + void + str(const __string_type& __s) + { _M_stringbuf.str(__s); } + }; +# 475 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/sstream" 3 + template + class basic_stringstream : public basic_iostream<_CharT, _Traits> + { + public: + + typedef _CharT char_type; + typedef _Traits traits_type; + + + typedef _Alloc allocator_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; + typedef basic_iostream __iostream_type; + + private: + __stringbuf_type _M_stringbuf; + + public: +# 509 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/sstream" 3 + explicit + basic_stringstream(ios_base::openmode __m = ios_base::out | ios_base::in) + : __iostream_type(), _M_stringbuf(__m) + { this->init(&_M_stringbuf); } +# 525 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/sstream" 3 + explicit + basic_stringstream(const __string_type& __str, + ios_base::openmode __m = ios_base::out | ios_base::in) + : __iostream_type(), _M_stringbuf(__str, __m) + { this->init(&_M_stringbuf); } + + + + + + + + ~basic_stringstream() + { } +# 547 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/sstream" 3 + __stringbuf_type* + rdbuf() const + { return const_cast<__stringbuf_type*>(&_M_stringbuf); } + + + + + + __string_type + str() const + { return _M_stringbuf.str(); } + + + + + + + + void + str(const __string_type& __s) + { _M_stringbuf.str(__s); } + }; + +} + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/sstream.tcc" 1 3 +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/sstream.tcc" 3 + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/sstream.tcc" 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type + basic_stringbuf<_CharT, _Traits, _Alloc>:: + pbackfail(int_type __c) + { + int_type __ret = traits_type::eof(); + if (this->eback() < this->gptr()) + { + + + const bool __testeof = traits_type::eq_int_type(__c, __ret); + if (!__testeof) + { + const bool __testeq = traits_type::eq(traits_type:: + to_char_type(__c), + this->gptr()[-1]); + const bool __testout = this->_M_mode & ios_base::out; + if (__testeq || __testout) + { + this->gbump(-1); + if (!__testeq) + *this->gptr() = traits_type::to_char_type(__c); + __ret = __c; + } + } + else + { + this->gbump(-1); + __ret = traits_type::not_eof(__c); + } + } + return __ret; + } + + template + typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type + basic_stringbuf<_CharT, _Traits, _Alloc>:: + overflow(int_type __c) + { + const bool __testout = this->_M_mode & ios_base::out; + if (__builtin_expect(!__testout, false)) + return traits_type::eof(); + + const bool __testeof = traits_type::eq_int_type(__c, traits_type::eof()); + if (__builtin_expect(__testeof, false)) + return traits_type::not_eof(__c); + + const __size_type __capacity = _M_string.capacity(); + const __size_type __max_size = _M_string.max_size(); + const bool __testput = this->pptr() < this->epptr(); + if (__builtin_expect(!__testput && __capacity == __max_size, false)) + return traits_type::eof(); + + + + const char_type __conv = traits_type::to_char_type(__c); + if (!__testput) + { +# 110 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/sstream.tcc" 3 + const __size_type __opt_len = std::max(__size_type(2 * __capacity), + __size_type(512)); + const __size_type __len = std::min(__opt_len, __max_size); + __string_type __tmp; + __tmp.reserve(__len); + if (this->pbase()) + __tmp.assign(this->pbase(), this->epptr() - this->pbase()); + __tmp.push_back(__conv); + _M_string.swap(__tmp); + _M_sync(const_cast(_M_string.data()), + this->gptr() - this->eback(), this->pptr() - this->pbase()); + } + else + *this->pptr() = __conv; + this->pbump(1); + return __c; + } + + template + typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type + basic_stringbuf<_CharT, _Traits, _Alloc>:: + underflow() + { + int_type __ret = traits_type::eof(); + const bool __testin = this->_M_mode & ios_base::in; + if (__testin) + { + + _M_update_egptr(); + + if (this->gptr() < this->egptr()) + __ret = traits_type::to_int_type(*this->gptr()); + } + return __ret; + } + + template + typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type + basic_stringbuf<_CharT, _Traits, _Alloc>:: + seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode) + { + pos_type __ret = pos_type(off_type(-1)); + bool __testin = (ios_base::in & this->_M_mode & __mode) != 0; + bool __testout = (ios_base::out & this->_M_mode & __mode) != 0; + const bool __testboth = __testin && __testout && __way != ios_base::cur; + __testin &= !(__mode & ios_base::out); + __testout &= !(__mode & ios_base::in); + + + + const char_type* __beg = __testin ? this->eback() : this->pbase(); + if ((__beg || !__off) && (__testin || __testout || __testboth)) + { + _M_update_egptr(); + + off_type __newoffi = __off; + off_type __newoffo = __newoffi; + if (__way == ios_base::cur) + { + __newoffi += this->gptr() - __beg; + __newoffo += this->pptr() - __beg; + } + else if (__way == ios_base::end) + __newoffo = __newoffi += this->egptr() - __beg; + + if ((__testin || __testboth) + && __newoffi >= 0 + && this->egptr() - __beg >= __newoffi) + { + this->gbump((__beg + __newoffi) - this->gptr()); + __ret = pos_type(__newoffi); + } + if ((__testout || __testboth) + && __newoffo >= 0 + && this->egptr() - __beg >= __newoffo) + { + this->pbump((__beg + __newoffo) - this->pptr()); + __ret = pos_type(__newoffo); + } + } + return __ret; + } + + template + typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type + basic_stringbuf<_CharT, _Traits, _Alloc>:: + seekpos(pos_type __sp, ios_base::openmode __mode) + { + pos_type __ret = pos_type(off_type(-1)); + const bool __testin = (ios_base::in & this->_M_mode & __mode) != 0; + const bool __testout = (ios_base::out & this->_M_mode & __mode) != 0; + + const char_type* __beg = __testin ? this->eback() : this->pbase(); + if ((__beg || !off_type(__sp)) && (__testin || __testout)) + { + _M_update_egptr(); + + const off_type __pos(__sp); + const bool __testpos = (0 <= __pos + && __pos <= this->egptr() - __beg); + if (__testpos) + { + if (__testin) + this->gbump((__beg + __pos) - this->gptr()); + if (__testout) + this->pbump((__beg + __pos) - this->pptr()); + __ret = __sp; + } + } + return __ret; + } + + template + void + basic_stringbuf<_CharT, _Traits, _Alloc>:: + _M_sync(char_type* __base, __size_type __i, __size_type __o) + { + const bool __testin = _M_mode & ios_base::in; + const bool __testout = _M_mode & ios_base::out; + char_type* __endg = __base + _M_string.size(); + char_type* __endp = __base + _M_string.capacity(); + + if (__base != _M_string.data()) + { + + __endg += __i; + __i = 0; + __endp = __endg; + } + + if (__testin) + this->setg(__base, __base + __i, __endg); + if (__testout) + { + this->setp(__base, __endp); + this->pbump(__o); + + + + if (!__testin) + this->setg(__endg, __endg, __endg); + } + } + + + + + + extern template class basic_stringbuf; + extern template class basic_istringstream; + extern template class basic_ostringstream; + extern template class basic_stringstream; + + + extern template class basic_stringbuf; + extern template class basic_istringstream; + extern template class basic_ostringstream; + extern template class basic_stringstream; + + + +} +# 574 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/sstream" 2 3 +# 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/complex" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/complex" 3 + template class complex; + template<> class complex; + template<> class complex; + template<> class complex; + + + template _Tp abs(const complex<_Tp>&); + + template _Tp arg(const complex<_Tp>&); + + template _Tp norm(const complex<_Tp>&); + + + template complex<_Tp> conj(const complex<_Tp>&); + + template complex<_Tp> polar(const _Tp&, const _Tp& = 0); + + + + template complex<_Tp> cos(const complex<_Tp>&); + + template complex<_Tp> cosh(const complex<_Tp>&); + + template complex<_Tp> exp(const complex<_Tp>&); + + template complex<_Tp> log(const complex<_Tp>&); + + template complex<_Tp> log10(const complex<_Tp>&); + + + + template complex<_Tp> pow(const complex<_Tp>&, int); + + + template complex<_Tp> pow(const complex<_Tp>&, const _Tp&); + + template complex<_Tp> pow(const complex<_Tp>&, + const complex<_Tp>&); + + template complex<_Tp> pow(const _Tp&, const complex<_Tp>&); + + template complex<_Tp> sin(const complex<_Tp>&); + + template complex<_Tp> sinh(const complex<_Tp>&); + + template complex<_Tp> sqrt(const complex<_Tp>&); + + template complex<_Tp> tan(const complex<_Tp>&); + + template complex<_Tp> tanh(const complex<_Tp>&); +# 121 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/complex" 3 + template + struct complex + { + + typedef _Tp value_type; + + + + complex(const _Tp& __r = _Tp(), const _Tp& __i = _Tp()) + : _M_real(__r), _M_imag(__i) { } + + + + + template + complex(const complex<_Up>& __z) + : _M_real(__z.real()), _M_imag(__z.imag()) { } +# 149 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/complex" 3 + _Tp& real() + { return _M_real; } + + + const _Tp& real() const + { return _M_real; } + + + _Tp& imag() + { return _M_imag; } + + + const _Tp& imag() const + { return _M_imag; } + + + + + void real(_Tp __val) + { _M_real = __val; } + + void imag(_Tp __val) + { _M_imag = __val; } + + + complex<_Tp>& operator=(const _Tp&); + + + + complex<_Tp>& + operator+=(const _Tp& __t) + { + _M_real += __t; + return *this; + } + + + + complex<_Tp>& + operator-=(const _Tp& __t) + { + _M_real -= __t; + return *this; + } + + + complex<_Tp>& operator*=(const _Tp&); + + complex<_Tp>& operator/=(const _Tp&); + + + + + + template + complex<_Tp>& operator=(const complex<_Up>&); + + template + complex<_Tp>& operator+=(const complex<_Up>&); + + template + complex<_Tp>& operator-=(const complex<_Up>&); + + template + complex<_Tp>& operator*=(const complex<_Up>&); + + template + complex<_Tp>& operator/=(const complex<_Up>&); + + const complex& __rep() const + { return *this; } + + private: + _Tp _M_real; + _Tp _M_imag; + }; + + template + complex<_Tp>& + complex<_Tp>::operator=(const _Tp& __t) + { + _M_real = __t; + _M_imag = _Tp(); + return *this; + } + + + template + complex<_Tp>& + complex<_Tp>::operator*=(const _Tp& __t) + { + _M_real *= __t; + _M_imag *= __t; + return *this; + } + + + template + complex<_Tp>& + complex<_Tp>::operator/=(const _Tp& __t) + { + _M_real /= __t; + _M_imag /= __t; + return *this; + } + + template + template + complex<_Tp>& + complex<_Tp>::operator=(const complex<_Up>& __z) + { + _M_real = __z.real(); + _M_imag = __z.imag(); + return *this; + } + + + template + template + complex<_Tp>& + complex<_Tp>::operator+=(const complex<_Up>& __z) + { + _M_real += __z.real(); + _M_imag += __z.imag(); + return *this; + } + + + template + template + complex<_Tp>& + complex<_Tp>::operator-=(const complex<_Up>& __z) + { + _M_real -= __z.real(); + _M_imag -= __z.imag(); + return *this; + } + + + + template + template + complex<_Tp>& + complex<_Tp>::operator*=(const complex<_Up>& __z) + { + const _Tp __r = _M_real * __z.real() - _M_imag * __z.imag(); + _M_imag = _M_real * __z.imag() + _M_imag * __z.real(); + _M_real = __r; + return *this; + } + + + + template + template + complex<_Tp>& + complex<_Tp>::operator/=(const complex<_Up>& __z) + { + const _Tp __r = _M_real * __z.real() + _M_imag * __z.imag(); + const _Tp __n = std::norm(__z); + _M_imag = (_M_imag * __z.real() - _M_real * __z.imag()) / __n; + _M_real = __r / __n; + return *this; + } + + + + + template + inline complex<_Tp> + operator+(const complex<_Tp>& __x, const complex<_Tp>& __y) + { + complex<_Tp> __r = __x; + __r += __y; + return __r; + } + + template + inline complex<_Tp> + operator+(const complex<_Tp>& __x, const _Tp& __y) + { + complex<_Tp> __r = __x; + __r += __y; + return __r; + } + + template + inline complex<_Tp> + operator+(const _Tp& __x, const complex<_Tp>& __y) + { + complex<_Tp> __r = __y; + __r += __x; + return __r; + } + + + + + template + inline complex<_Tp> + operator-(const complex<_Tp>& __x, const complex<_Tp>& __y) + { + complex<_Tp> __r = __x; + __r -= __y; + return __r; + } + + template + inline complex<_Tp> + operator-(const complex<_Tp>& __x, const _Tp& __y) + { + complex<_Tp> __r = __x; + __r -= __y; + return __r; + } + + template + inline complex<_Tp> + operator-(const _Tp& __x, const complex<_Tp>& __y) + { + complex<_Tp> __r(__x, -__y.imag()); + __r -= __y.real(); + return __r; + } + + + + + template + inline complex<_Tp> + operator*(const complex<_Tp>& __x, const complex<_Tp>& __y) + { + complex<_Tp> __r = __x; + __r *= __y; + return __r; + } + + template + inline complex<_Tp> + operator*(const complex<_Tp>& __x, const _Tp& __y) + { + complex<_Tp> __r = __x; + __r *= __y; + return __r; + } + + template + inline complex<_Tp> + operator*(const _Tp& __x, const complex<_Tp>& __y) + { + complex<_Tp> __r = __y; + __r *= __x; + return __r; + } + + + + + template + inline complex<_Tp> + operator/(const complex<_Tp>& __x, const complex<_Tp>& __y) + { + complex<_Tp> __r = __x; + __r /= __y; + return __r; + } + + template + inline complex<_Tp> + operator/(const complex<_Tp>& __x, const _Tp& __y) + { + complex<_Tp> __r = __x; + __r /= __y; + return __r; + } + + template + inline complex<_Tp> + operator/(const _Tp& __x, const complex<_Tp>& __y) + { + complex<_Tp> __r = __x; + __r /= __y; + return __r; + } + + + + template + inline complex<_Tp> + operator+(const complex<_Tp>& __x) + { return __x; } + + + template + inline complex<_Tp> + operator-(const complex<_Tp>& __x) + { return complex<_Tp>(-__x.real(), -__x.imag()); } + + + + template + inline bool + operator==(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return __x.real() == __y.real() && __x.imag() == __y.imag(); } + + template + inline bool + operator==(const complex<_Tp>& __x, const _Tp& __y) + { return __x.real() == __y && __x.imag() == _Tp(); } + + template + inline bool + operator==(const _Tp& __x, const complex<_Tp>& __y) + { return __x == __y.real() && _Tp() == __y.imag(); } + + + + + template + inline bool + operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return __x.real() != __y.real() || __x.imag() != __y.imag(); } + + template + inline bool + operator!=(const complex<_Tp>& __x, const _Tp& __y) + { return __x.real() != __y || __x.imag() != _Tp(); } + + template + inline bool + operator!=(const _Tp& __x, const complex<_Tp>& __y) + { return __x != __y.real() || _Tp() != __y.imag(); } + + + + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) + { + _Tp __re_x, __im_x; + _CharT __ch; + __is >> __ch; + if (__ch == '(') + { + __is >> __re_x >> __ch; + if (__ch == ',') + { + __is >> __im_x >> __ch; + if (__ch == ')') + __x = complex<_Tp>(__re_x, __im_x); + else + __is.setstate(ios_base::failbit); + } + else if (__ch == ')') + __x = __re_x; + else + __is.setstate(ios_base::failbit); + } + else + { + __is.putback(__ch); + __is >> __re_x; + __x = __re_x; + } + return __is; + } + + + template + basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x) + { + basic_ostringstream<_CharT, _Traits> __s; + __s.flags(__os.flags()); + __s.imbue(__os.getloc()); + __s.precision(__os.precision()); + __s << '(' << __x.real() << ',' << __x.imag() << ')'; + return __os << __s.str(); + } +# 541 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/complex" 3 + template + inline _Tp& + real(complex<_Tp>& __z) + { return __z.real(); } + + template + inline const _Tp& + real(const complex<_Tp>& __z) + { return __z.real(); } + + template + inline _Tp& + imag(complex<_Tp>& __z) + { return __z.imag(); } + + template + inline const _Tp& + imag(const complex<_Tp>& __z) + { return __z.imag(); } + + + + template + inline _Tp + __complex_abs(const complex<_Tp>& __z) + { + _Tp __x = __z.real(); + _Tp __y = __z.imag(); + const _Tp __s = std::max(abs(__x), abs(__y)); + if (__s == _Tp()) + return __s; + __x /= __s; + __y /= __s; + return __s * sqrt(__x * __x + __y * __y); + } + + + inline float + __complex_abs(__complex__ float __z) { return __builtin_cabsf(__z); } + + inline double + __complex_abs(__complex__ double __z) { return __builtin_cabs(__z); } + + inline long double + __complex_abs(const __complex__ long double& __z) + { return __builtin_cabsl(__z); } + + template + inline _Tp + abs(const complex<_Tp>& __z) { return __complex_abs(__z.__rep()); } +# 599 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/complex" 3 + template + inline _Tp + __complex_arg(const complex<_Tp>& __z) + { return atan2(__z.imag(), __z.real()); } + + + inline float + __complex_arg(__complex__ float __z) { return __builtin_cargf(__z); } + + inline double + __complex_arg(__complex__ double __z) { return __builtin_carg(__z); } + + inline long double + __complex_arg(const __complex__ long double& __z) + { return __builtin_cargl(__z); } + + template + inline _Tp + arg(const complex<_Tp>& __z) { return __complex_arg(__z.__rep()); } +# 629 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/complex" 3 + template + struct _Norm_helper + { + template + static inline _Tp _S_do_it(const complex<_Tp>& __z) + { + const _Tp __x = __z.real(); + const _Tp __y = __z.imag(); + return __x * __x + __y * __y; + } + }; + + template<> + struct _Norm_helper + { + template + static inline _Tp _S_do_it(const complex<_Tp>& __z) + { + _Tp __res = std::abs(__z); + return __res * __res; + } + }; + + template + inline _Tp + norm(const complex<_Tp>& __z) + { + return _Norm_helper<__is_floating<_Tp>::__value + && !0>::_S_do_it(__z); + } + + template + inline complex<_Tp> + polar(const _Tp& __rho, const _Tp& __theta) + { return complex<_Tp>(__rho * cos(__theta), __rho * sin(__theta)); } + + template + inline complex<_Tp> + conj(const complex<_Tp>& __z) + { return complex<_Tp>(__z.real(), -__z.imag()); } + + + + + template + inline complex<_Tp> + __complex_cos(const complex<_Tp>& __z) + { + const _Tp __x = __z.real(); + const _Tp __y = __z.imag(); + return complex<_Tp>(cos(__x) * cosh(__y), -sin(__x) * sinh(__y)); + } + + + inline __complex__ float + __complex_cos(__complex__ float __z) { return __builtin_ccosf(__z); } + + inline __complex__ double + __complex_cos(__complex__ double __z) { return __builtin_ccos(__z); } + + inline __complex__ long double + __complex_cos(const __complex__ long double& __z) + { return __builtin_ccosl(__z); } + + template + inline complex<_Tp> + cos(const complex<_Tp>& __z) { return __complex_cos(__z.__rep()); } + + + + + + + + template + inline complex<_Tp> + __complex_cosh(const complex<_Tp>& __z) + { + const _Tp __x = __z.real(); + const _Tp __y = __z.imag(); + return complex<_Tp>(cosh(__x) * cos(__y), sinh(__x) * sin(__y)); + } + + + inline __complex__ float + __complex_cosh(__complex__ float __z) { return __builtin_ccoshf(__z); } + + inline __complex__ double + __complex_cosh(__complex__ double __z) { return __builtin_ccosh(__z); } + + inline __complex__ long double + __complex_cosh(const __complex__ long double& __z) + { return __builtin_ccoshl(__z); } + + template + inline complex<_Tp> + cosh(const complex<_Tp>& __z) { return __complex_cosh(__z.__rep()); } + + + + + + + + template + inline complex<_Tp> + __complex_exp(const complex<_Tp>& __z) + { return std::polar(exp(__z.real()), __z.imag()); } + + + inline __complex__ float + __complex_exp(__complex__ float __z) { return __builtin_cexpf(__z); } + + inline __complex__ double + __complex_exp(__complex__ double __z) { return __builtin_cexp(__z); } + + inline __complex__ long double + __complex_exp(const __complex__ long double& __z) + { return __builtin_cexpl(__z); } + + template + inline complex<_Tp> + exp(const complex<_Tp>& __z) { return __complex_exp(__z.__rep()); } +# 760 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/complex" 3 + template + inline complex<_Tp> + __complex_log(const complex<_Tp>& __z) + { return complex<_Tp>(log(std::abs(__z)), std::arg(__z)); } + + + inline __complex__ float + __complex_log(__complex__ float __z) { return __builtin_clogf(__z); } + + inline __complex__ double + __complex_log(__complex__ double __z) { return __builtin_clog(__z); } + + inline __complex__ long double + __complex_log(const __complex__ long double& __z) + { return __builtin_clogl(__z); } + + template + inline complex<_Tp> + log(const complex<_Tp>& __z) { return __complex_log(__z.__rep()); } + + + + + + + template + inline complex<_Tp> + log10(const complex<_Tp>& __z) + { return std::log(__z) / log(_Tp(10.0)); } + + + template + inline complex<_Tp> + __complex_sin(const complex<_Tp>& __z) + { + const _Tp __x = __z.real(); + const _Tp __y = __z.imag(); + return complex<_Tp>(sin(__x) * cosh(__y), cos(__x) * sinh(__y)); + } + + + inline __complex__ float + __complex_sin(__complex__ float __z) { return __builtin_csinf(__z); } + + inline __complex__ double + __complex_sin(__complex__ double __z) { return __builtin_csin(__z); } + + inline __complex__ long double + __complex_sin(const __complex__ long double& __z) + { return __builtin_csinl(__z); } + + template + inline complex<_Tp> + sin(const complex<_Tp>& __z) { return __complex_sin(__z.__rep()); } + + + + + + + + template + inline complex<_Tp> + __complex_sinh(const complex<_Tp>& __z) + { + const _Tp __x = __z.real(); + const _Tp __y = __z.imag(); + return complex<_Tp>(sinh(__x) * cos(__y), cosh(__x) * sin(__y)); + } + + + inline __complex__ float + __complex_sinh(__complex__ float __z) { return __builtin_csinhf(__z); } + + inline __complex__ double + __complex_sinh(__complex__ double __z) { return __builtin_csinh(__z); } + + inline __complex__ long double + __complex_sinh(const __complex__ long double& __z) + { return __builtin_csinhl(__z); } + + template + inline complex<_Tp> + sinh(const complex<_Tp>& __z) { return __complex_sinh(__z.__rep()); } +# 852 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/complex" 3 + template + complex<_Tp> + __complex_sqrt(const complex<_Tp>& __z) + { + _Tp __x = __z.real(); + _Tp __y = __z.imag(); + + if (__x == _Tp()) + { + _Tp __t = sqrt(abs(__y) / 2); + return complex<_Tp>(__t, __y < _Tp() ? -__t : __t); + } + else + { + _Tp __t = sqrt(2 * (std::abs(__z) + abs(__x))); + _Tp __u = __t / 2; + return __x > _Tp() + ? complex<_Tp>(__u, __y / __t) + : complex<_Tp>(abs(__y) / __t, __y < _Tp() ? -__u : __u); + } + } + + + inline __complex__ float + __complex_sqrt(__complex__ float __z) { return __builtin_csqrtf(__z); } + + inline __complex__ double + __complex_sqrt(__complex__ double __z) { return __builtin_csqrt(__z); } + + inline __complex__ long double + __complex_sqrt(const __complex__ long double& __z) + { return __builtin_csqrtl(__z); } + + template + inline complex<_Tp> + sqrt(const complex<_Tp>& __z) { return __complex_sqrt(__z.__rep()); } +# 896 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/complex" 3 + template + inline complex<_Tp> + __complex_tan(const complex<_Tp>& __z) + { return std::sin(__z) / std::cos(__z); } + + + inline __complex__ float + __complex_tan(__complex__ float __z) { return __builtin_ctanf(__z); } + + inline __complex__ double + __complex_tan(__complex__ double __z) { return __builtin_ctan(__z); } + + inline __complex__ long double + __complex_tan(const __complex__ long double& __z) + { return __builtin_ctanl(__z); } + + template + inline complex<_Tp> + tan(const complex<_Tp>& __z) { return __complex_tan(__z.__rep()); } +# 924 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/complex" 3 + template + inline complex<_Tp> + __complex_tanh(const complex<_Tp>& __z) + { return std::sinh(__z) / std::cosh(__z); } + + + inline __complex__ float + __complex_tanh(__complex__ float __z) { return __builtin_ctanhf(__z); } + + inline __complex__ double + __complex_tanh(__complex__ double __z) { return __builtin_ctanh(__z); } + + inline __complex__ long double + __complex_tanh(const __complex__ long double& __z) + { return __builtin_ctanhl(__z); } + + template + inline complex<_Tp> + tanh(const complex<_Tp>& __z) { return __complex_tanh(__z.__rep()); } +# 956 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/complex" 3 + template + inline complex<_Tp> + pow(const complex<_Tp>& __z, int __n) + { return std::__pow_helper(__z, __n); } + + + template + complex<_Tp> + pow(const complex<_Tp>& __x, const _Tp& __y) + { + + + + + if (__x.imag() == _Tp() && __x.real() > _Tp()) + return pow(__x.real(), __y); + + complex<_Tp> __t = std::log(__x); + return std::polar(exp(__y * __t.real()), __y * __t.imag()); + } + + template + inline complex<_Tp> + __complex_pow(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return __x == _Tp() ? _Tp() : std::exp(__y * std::log(__x)); } + + + inline __complex__ float + __complex_pow(__complex__ float __x, __complex__ float __y) + { return __builtin_cpowf(__x, __y); } + + inline __complex__ double + __complex_pow(__complex__ double __x, __complex__ double __y) + { return __builtin_cpow(__x, __y); } + + inline __complex__ long double + __complex_pow(const __complex__ long double& __x, + const __complex__ long double& __y) + { return __builtin_cpowl(__x, __y); } + + template + inline complex<_Tp> + pow(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return __complex_pow(__x.__rep(), __y.__rep()); } + + + + + + + + template + inline complex<_Tp> + pow(const _Tp& __x, const complex<_Tp>& __y) + { + return __x > _Tp() ? std::polar(pow(__x, __y.real()), + __y.imag() * log(__x)) + : std::pow(complex<_Tp>(__x), __y); + } + + + + template<> + struct complex + { + typedef float value_type; + typedef __complex__ float _ComplexT; + + complex(_ComplexT __z) : _M_value(__z) { } + + complex(float __r = 0.0f, float __i = 0.0f) + { + __real__ _M_value = __r; + __imag__ _M_value = __i; + } + + explicit complex(const complex&); + explicit complex(const complex&); +# 1044 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/complex" 3 + float& real() + { return __real__ _M_value; } + + const float& real() const + { return __real__ _M_value; } + + float& imag() + { return __imag__ _M_value; } + + const float& imag() const + { return __imag__ _M_value; } + + + + + void real(float __val) + { __real__ _M_value = __val; } + + void imag(float __val) + { __imag__ _M_value = __val; } + + complex& + operator=(float __f) + { + __real__ _M_value = __f; + __imag__ _M_value = 0.0f; + return *this; + } + + complex& + operator+=(float __f) + { + __real__ _M_value += __f; + return *this; + } + + complex& + operator-=(float __f) + { + __real__ _M_value -= __f; + return *this; + } + + complex& + operator*=(float __f) + { + _M_value *= __f; + return *this; + } + + complex& + operator/=(float __f) + { + _M_value /= __f; + return *this; + } + + + + + + template + complex& + operator=(const complex<_Tp>& __z) + { + __real__ _M_value = __z.real(); + __imag__ _M_value = __z.imag(); + return *this; + } + + template + complex& + operator+=(const complex<_Tp>& __z) + { + __real__ _M_value += __z.real(); + __imag__ _M_value += __z.imag(); + return *this; + } + + template + complex& + operator-=(const complex<_Tp>& __z) + { + __real__ _M_value -= __z.real(); + __imag__ _M_value -= __z.imag(); + return *this; + } + + template + complex& + operator*=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value *= __t; + return *this; + } + + template + complex& + operator/=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value /= __t; + return *this; + } + + const _ComplexT& __rep() const { return _M_value; } + + private: + _ComplexT _M_value; + }; + + + + template<> + struct complex + { + typedef double value_type; + typedef __complex__ double _ComplexT; + + complex(_ComplexT __z) : _M_value(__z) { } + + complex(double __r = 0.0, double __i = 0.0) + { + __real__ _M_value = __r; + __imag__ _M_value = __i; + } + + complex(const complex& __z) + : _M_value(__z.__rep()) { } + + explicit complex(const complex&); +# 1190 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/complex" 3 + double& real() + { return __real__ _M_value; } + + const double& real() const + { return __real__ _M_value; } + + double& imag() + { return __imag__ _M_value; } + + const double& imag() const + { return __imag__ _M_value; } + + + + + void real(double __val) + { __real__ _M_value = __val; } + + void imag(double __val) + { __imag__ _M_value = __val; } + + complex& + operator=(double __d) + { + __real__ _M_value = __d; + __imag__ _M_value = 0.0; + return *this; + } + + complex& + operator+=(double __d) + { + __real__ _M_value += __d; + return *this; + } + + complex& + operator-=(double __d) + { + __real__ _M_value -= __d; + return *this; + } + + complex& + operator*=(double __d) + { + _M_value *= __d; + return *this; + } + + complex& + operator/=(double __d) + { + _M_value /= __d; + return *this; + } + + + + + template + complex& + operator=(const complex<_Tp>& __z) + { + __real__ _M_value = __z.real(); + __imag__ _M_value = __z.imag(); + return *this; + } + + template + complex& + operator+=(const complex<_Tp>& __z) + { + __real__ _M_value += __z.real(); + __imag__ _M_value += __z.imag(); + return *this; + } + + template + complex& + operator-=(const complex<_Tp>& __z) + { + __real__ _M_value -= __z.real(); + __imag__ _M_value -= __z.imag(); + return *this; + } + + template + complex& + operator*=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value *= __t; + return *this; + } + + template + complex& + operator/=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value /= __t; + return *this; + } + + const _ComplexT& __rep() const { return _M_value; } + + private: + _ComplexT _M_value; + }; + + + + template<> + struct complex + { + typedef long double value_type; + typedef __complex__ long double _ComplexT; + + complex(_ComplexT __z) : _M_value(__z) { } + + complex(long double __r = 0.0L, long double __i = 0.0L) + { + __real__ _M_value = __r; + __imag__ _M_value = __i; + } + + complex(const complex& __z) + : _M_value(__z.__rep()) { } + + complex(const complex& __z) + : _M_value(__z.__rep()) { } +# 1336 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/complex" 3 + long double& real() + { return __real__ _M_value; } + + const long double& real() const + { return __real__ _M_value; } + + long double& imag() + { return __imag__ _M_value; } + + const long double& imag() const + { return __imag__ _M_value; } + + + + + void real(long double __val) + { __real__ _M_value = __val; } + + void imag(long double __val) + { __imag__ _M_value = __val; } + + complex& + operator=(long double __r) + { + __real__ _M_value = __r; + __imag__ _M_value = 0.0L; + return *this; + } + + complex& + operator+=(long double __r) + { + __real__ _M_value += __r; + return *this; + } + + complex& + operator-=(long double __r) + { + __real__ _M_value -= __r; + return *this; + } + + complex& + operator*=(long double __r) + { + _M_value *= __r; + return *this; + } + + complex& + operator/=(long double __r) + { + _M_value /= __r; + return *this; + } + + + + + template + complex& + operator=(const complex<_Tp>& __z) + { + __real__ _M_value = __z.real(); + __imag__ _M_value = __z.imag(); + return *this; + } + + template + complex& + operator+=(const complex<_Tp>& __z) + { + __real__ _M_value += __z.real(); + __imag__ _M_value += __z.imag(); + return *this; + } + + template + complex& + operator-=(const complex<_Tp>& __z) + { + __real__ _M_value -= __z.real(); + __imag__ _M_value -= __z.imag(); + return *this; + } + + template + complex& + operator*=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value *= __t; + return *this; + } + + template + complex& + operator/=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value /= __t; + return *this; + } + + const _ComplexT& __rep() const { return _M_value; } + + private: + _ComplexT _M_value; + }; + + + + inline + complex::complex(const complex& __z) + : _M_value(__z.__rep()) { } + + inline + complex::complex(const complex& __z) + : _M_value(__z.__rep()) { } + + inline + complex::complex(const complex& __z) + : _M_value(__z.__rep()) { } + + + + + + extern template istream& operator>>(istream&, complex&); + extern template ostream& operator<<(ostream&, const complex&); + extern template istream& operator>>(istream&, complex&); + extern template ostream& operator<<(ostream&, const complex&); + extern template istream& operator>>(istream&, complex&); + extern template ostream& operator<<(ostream&, const complex&); + + + extern template wistream& operator>>(wistream&, complex&); + extern template wostream& operator<<(wostream&, const complex&); + extern template wistream& operator>>(wistream&, complex&); + extern template wostream& operator<<(wostream&, const complex&); + extern template wistream& operator>>(wistream&, complex&); + extern template wostream& operator<<(wostream&, const complex&); + + + + + +} + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + + + template + struct __promote_2, _Up> + { + public: + typedef std::complex::__type> __type; + }; + + template + struct __promote_2<_Tp, std::complex<_Up> > + { + public: + typedef std::complex::__type> __type; + }; + + template + struct __promote_2, std::complex<_Up> > + { + public: + typedef std::complex::__type> __type; + }; + +} +# 14 "/usr/include/boost-1_42/boost/python/converter/builtin_converters.hpp" 2 +# 22 "/usr/include/boost-1_42/boost/python/converter/builtin_converters.hpp" +namespace boost { namespace python { + +namespace converter +{ + template struct arg_to_python; + PyObject* do_return_to_python(char); + PyObject* do_return_to_python(char const*); + PyObject* do_return_to_python(PyObject*); + PyObject* do_arg_to_python(PyObject*); +} + + +template struct to_python_value; + +namespace detail +{ + + + struct builtin_to_python + { + + + + static const bool uses_registry = false; + }; +} +# 113 "/usr/include/boost-1_42/boost/python/converter/builtin_converters.hpp" +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(bool const& x) const { return (::PyBool_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyBool_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(bool const& x) const { return (::PyBool_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyBool_Type); } }; namespace converter { template <> struct arg_to_python< bool > : handle<> { arg_to_python(bool const& x) : python::handle<>(::PyBool_FromLong(x)) {} }; } + + + + + +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(signed char const& x) const { return (::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(signed char const& x) const { return (::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; namespace converter { template <> struct arg_to_python< signed char > : handle<> { arg_to_python(signed char const& x) : python::handle<>(::PyInt_FromLong(x)) {} }; } template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(unsigned char const& x) const { return (static_cast(x) > static_cast( (std::numeric_limits::max)()) ? ::PyLong_FromUnsignedLong(x) : ::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(unsigned char const& x) const { return (static_cast(x) > static_cast( (std::numeric_limits::max)()) ? ::PyLong_FromUnsignedLong(x) : ::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; namespace converter { template <> struct arg_to_python< unsigned char > : handle<> { arg_to_python(unsigned char const& x) : python::handle<>(static_cast(x) > static_cast( (std::numeric_limits::max)()) ? ::PyLong_FromUnsignedLong(x) : ::PyInt_FromLong(x)) {} }; } + +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(signed short const& x) const { return (::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(signed short const& x) const { return (::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; namespace converter { template <> struct arg_to_python< signed short > : handle<> { arg_to_python(signed short const& x) : python::handle<>(::PyInt_FromLong(x)) {} }; } template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(unsigned short const& x) const { return (static_cast(x) > static_cast( (std::numeric_limits::max)()) ? ::PyLong_FromUnsignedLong(x) : ::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(unsigned short const& x) const { return (static_cast(x) > static_cast( (std::numeric_limits::max)()) ? ::PyLong_FromUnsignedLong(x) : ::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; namespace converter { template <> struct arg_to_python< unsigned short > : handle<> { arg_to_python(unsigned short const& x) : python::handle<>(static_cast(x) > static_cast( (std::numeric_limits::max)()) ? ::PyLong_FromUnsignedLong(x) : ::PyInt_FromLong(x)) {} }; } +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(signed int const& x) const { return (::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(signed int const& x) const { return (::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; namespace converter { template <> struct arg_to_python< signed int > : handle<> { arg_to_python(signed int const& x) : python::handle<>(::PyInt_FromLong(x)) {} }; } template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(unsigned int const& x) const { return (static_cast(x) > static_cast( (std::numeric_limits::max)()) ? ::PyLong_FromUnsignedLong(x) : ::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(unsigned int const& x) const { return (static_cast(x) > static_cast( (std::numeric_limits::max)()) ? ::PyLong_FromUnsignedLong(x) : ::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; namespace converter { template <> struct arg_to_python< unsigned int > : handle<> { arg_to_python(unsigned int const& x) : python::handle<>(static_cast(x) > static_cast( (std::numeric_limits::max)()) ? ::PyLong_FromUnsignedLong(x) : ::PyInt_FromLong(x)) {} }; } +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(signed long const& x) const { return (::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(signed long const& x) const { return (::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; namespace converter { template <> struct arg_to_python< signed long > : handle<> { arg_to_python(signed long const& x) : python::handle<>(::PyInt_FromLong(x)) {} }; } template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(unsigned long const& x) const { return (static_cast(x) > static_cast( (std::numeric_limits::max)()) ? ::PyLong_FromUnsignedLong(x) : ::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(unsigned long const& x) const { return (static_cast(x) > static_cast( (std::numeric_limits::max)()) ? ::PyLong_FromUnsignedLong(x) : ::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; namespace converter { template <> struct arg_to_python< unsigned long > : handle<> { arg_to_python(unsigned long const& x) : python::handle<>(static_cast(x) > static_cast( (std::numeric_limits::max)()) ? ::PyLong_FromUnsignedLong(x) : ::PyInt_FromLong(x)) {} }; } + + + + +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(signed long long const& x) const { return (::PyLong_FromLongLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyLong_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(signed long long const& x) const { return (::PyLong_FromLongLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyLong_Type); } }; namespace converter { template <> struct arg_to_python< signed long long > : handle<> { arg_to_python(signed long long const& x) : python::handle<>(::PyLong_FromLongLong(x)) {} }; } +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(unsigned long long const& x) const { return (::PyLong_FromUnsignedLongLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyLong_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(unsigned long long const& x) const { return (::PyLong_FromUnsignedLongLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyLong_Type); } }; namespace converter { template <> struct arg_to_python< unsigned long long > : handle<> { arg_to_python(unsigned long long const& x) : python::handle<>(::PyLong_FromUnsignedLongLong(x)) {} }; } +# 139 "/usr/include/boost-1_42/boost/python/converter/builtin_converters.hpp" +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(char const& x) const { return (converter::do_return_to_python(x)); } inline PyTypeObject const* get_pytype() const { return (&PyString_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(char const& x) const { return (converter::do_return_to_python(x)); } inline PyTypeObject const* get_pytype() const { return (&PyString_Type); } }; namespace converter { template <> struct arg_to_python< char > : handle<> { arg_to_python(char const& x) : python::handle<>(converter::do_return_to_python(x)) {} }; } +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(char const* const& x) const { return (converter::do_return_to_python(x)); } inline PyTypeObject const* get_pytype() const { return (&PyString_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(char const* const& x) const { return (converter::do_return_to_python(x)); } inline PyTypeObject const* get_pytype() const { return (&PyString_Type); } }; namespace converter { template <> struct arg_to_python< char const* > : handle<> { arg_to_python(char const* const& x) : python::handle<>(converter::do_return_to_python(x)) {} }; } +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(std::string const& x) const { return (::PyString_FromStringAndSize(x.data(),implicit_cast(x.size()))); } inline PyTypeObject const* get_pytype() const { return (&PyString_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(std::string const& x) const { return (::PyString_FromStringAndSize(x.data(),implicit_cast(x.size()))); } inline PyTypeObject const* get_pytype() const { return (&PyString_Type); } }; namespace converter { template <> struct arg_to_python< std::string > : handle<> { arg_to_python(std::string const& x) : python::handle<>(::PyString_FromStringAndSize(x.data(),implicit_cast(x.size()))) {} }; } + + + +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(std::wstring const& x) const { return (::PyUnicodeUCS4_FromWideChar(x.data(),implicit_cast(x.size()))); } inline PyTypeObject const* get_pytype() const { return (&PyUnicode_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(std::wstring const& x) const { return (::PyUnicodeUCS4_FromWideChar(x.data(),implicit_cast(x.size()))); } inline PyTypeObject const* get_pytype() const { return (&PyUnicode_Type); } }; namespace converter { template <> struct arg_to_python< std::wstring > : handle<> { arg_to_python(std::wstring const& x) : python::handle<>(::PyUnicodeUCS4_FromWideChar(x.data(),implicit_cast(x.size()))) {} }; } + +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(float const& x) const { return (::PyFloat_FromDouble(x)); } inline PyTypeObject const* get_pytype() const { return (&PyFloat_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(float const& x) const { return (::PyFloat_FromDouble(x)); } inline PyTypeObject const* get_pytype() const { return (&PyFloat_Type); } }; namespace converter { template <> struct arg_to_python< float > : handle<> { arg_to_python(float const& x) : python::handle<>(::PyFloat_FromDouble(x)) {} }; } +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(double const& x) const { return (::PyFloat_FromDouble(x)); } inline PyTypeObject const* get_pytype() const { return (&PyFloat_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(double const& x) const { return (::PyFloat_FromDouble(x)); } inline PyTypeObject const* get_pytype() const { return (&PyFloat_Type); } }; namespace converter { template <> struct arg_to_python< double > : handle<> { arg_to_python(double const& x) : python::handle<>(::PyFloat_FromDouble(x)) {} }; } +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(long double const& x) const { return (::PyFloat_FromDouble(x)); } inline PyTypeObject const* get_pytype() const { return (&PyFloat_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(long double const& x) const { return (::PyFloat_FromDouble(x)); } inline PyTypeObject const* get_pytype() const { return (&PyFloat_Type); } }; namespace converter { template <> struct arg_to_python< long double > : handle<> { arg_to_python(long double const& x) : python::handle<>(::PyFloat_FromDouble(x)) {} }; } +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(PyObject* const& x) const { return (converter::do_return_to_python(x)); } inline PyTypeObject const* get_pytype() const { return (0); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(PyObject* const& x) const { return (converter::do_return_to_python(x)); } inline PyTypeObject const* get_pytype() const { return (0); } }; +template <> struct to_python_value&> : detail::builtin_to_python { inline PyObject* operator()(std::complex const& x) const { return (::PyComplex_FromDoubles(x.real(), x.imag())); } inline PyTypeObject const* get_pytype() const { return (&PyComplex_Type); } }; template <> struct to_python_value const&> : detail::builtin_to_python { inline PyObject* operator()(std::complex const& x) const { return (::PyComplex_FromDoubles(x.real(), x.imag())); } inline PyTypeObject const* get_pytype() const { return (&PyComplex_Type); } }; namespace converter { template <> struct arg_to_python< std::complex > : handle<> { arg_to_python(std::complex const& x) : python::handle<>(::PyComplex_FromDoubles(x.real(), x.imag())) {} }; } +template <> struct to_python_value&> : detail::builtin_to_python { inline PyObject* operator()(std::complex const& x) const { return (::PyComplex_FromDoubles(x.real(), x.imag())); } inline PyTypeObject const* get_pytype() const { return (&PyComplex_Type); } }; template <> struct to_python_value const&> : detail::builtin_to_python { inline PyObject* operator()(std::complex const& x) const { return (::PyComplex_FromDoubles(x.real(), x.imag())); } inline PyTypeObject const* get_pytype() const { return (&PyComplex_Type); } }; namespace converter { template <> struct arg_to_python< std::complex > : handle<> { arg_to_python(std::complex const& x) : python::handle<>(::PyComplex_FromDoubles(x.real(), x.imag())) {} }; } +template <> struct to_python_value&> : detail::builtin_to_python { inline PyObject* operator()(std::complex const& x) const { return (::PyComplex_FromDoubles(x.real(), x.imag())); } inline PyTypeObject const* get_pytype() const { return (&PyComplex_Type); } }; template <> struct to_python_value const&> : detail::builtin_to_python { inline PyObject* operator()(std::complex const& x) const { return (::PyComplex_FromDoubles(x.real(), x.imag())); } inline PyTypeObject const* get_pytype() const { return (&PyComplex_Type); } }; namespace converter { template <> struct arg_to_python< std::complex > : handle<> { arg_to_python(std::complex const& x) : python::handle<>(::PyComplex_FromDoubles(x.real(), x.imag())) {} }; } + + + + + + +namespace converter +{ + + void initialize_builtin_converters(); + +} + +}} +# 18 "/usr/include/boost-1_42/boost/python/converter/arg_to_python.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/object/function_handle.hpp" 1 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/repetition/enum_trailing_params.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/repetition/enum_trailing_binary_params.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/to_python_value.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/python/to_python_value.hpp" +# 1 "/usr/include/boost-1_42/boost/python/converter/object_manager.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/converter/object_manager.hpp" +# 1 "/usr/include/boost-1_42/boost/python/converter/pyobject_traits.hpp" 1 +# 9 "/usr/include/boost-1_42/boost/python/converter/pyobject_traits.hpp" +# 1 "/usr/include/boost-1_42/boost/python/converter/pyobject_type.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/converter/pyobject_type.hpp" +namespace boost { namespace python { namespace converter { + + PyObject* checked_downcast_impl(PyObject*, PyTypeObject*); + + + +template +struct pyobject_type +{ + static bool check(PyObject* x) + { + return ::PyObject_IsInstance(x, (PyObject*)pytype); + } + + static Object* checked_downcast(PyObject* x) + { + return python::downcast( + (checked_downcast_impl)(x, pytype) + ); + } + + static PyTypeObject const* get_pytype() { return pytype; } + +}; + +}}} +# 10 "/usr/include/boost-1_42/boost/python/converter/pyobject_traits.hpp" 2 + +namespace boost { namespace python { namespace converter { + +template struct pyobject_traits; + +template <> +struct pyobject_traits +{ + + static bool check(PyObject*) { return true; } + static PyObject* checked_downcast(PyObject* x) { return x; } + + static PyTypeObject const* get_pytype() { return 0; } + +}; +# 35 "/usr/include/boost-1_42/boost/python/converter/pyobject_traits.hpp" +template <> struct pyobject_traits : pyobject_type {}; +template <> struct pyobject_traits : pyobject_type {}; + +template <> struct pyobject_traits : pyobject_type {}; + +template <> struct pyobject_traits : pyobject_type {}; +template <> struct pyobject_traits : pyobject_type {}; +template <> struct pyobject_traits : pyobject_type {}; + +}}} +# 11 "/usr/include/boost-1_42/boost/python/converter/object_manager.hpp" 2 +# 65 "/usr/include/boost-1_42/boost/python/converter/object_manager.hpp" +namespace boost { namespace python +{ + namespace api + { + class object; + } +}} + +namespace boost { namespace python { namespace converter { + + + +template +struct handle_object_manager_traits + : pyobject_traits +{ + private: + typedef pyobject_traits base; + + public: + static const bool is_specialized = true; + + + + static null_ok* adopt(PyObject* p) + { + return python::allow_null(base::checked_downcast(p)); + } +}; + +template +struct default_object_manager_traits +{ + static const bool is_specialized = python::detail::is_borrowed_ptr::value + + ; +}; + +template +struct object_manager_traits + : mpl::if_c< + is_handle::value + , handle_object_manager_traits + , default_object_manager_traits + >::type +{ +}; + + + + + + +template +struct is_object_manager + : mpl::bool_::is_specialized> +{ +}; + + +template +struct is_reference_to_object_manager + : mpl::false_ +{ +}; + +template +struct is_reference_to_object_manager + : is_object_manager +{ +}; + +template +struct is_reference_to_object_manager + : is_object_manager +{ +}; + +template +struct is_reference_to_object_manager + : is_object_manager +{ +}; + +template +struct is_reference_to_object_manager + : is_object_manager +{ +}; +# 228 "/usr/include/boost-1_42/boost/python/converter/object_manager.hpp" +}}} +# 18 "/usr/include/boost-1_42/boost/python/to_python_value.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/python/detail/value_is_shared_ptr.hpp" 1 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/value_is_xxx.hpp" 1 +# 9 "/usr/include/boost-1_42/boost/python/detail/value_is_shared_ptr.hpp" 2 + + +namespace boost { namespace python { namespace detail { + +template struct value_is_shared_ptr { template struct is_shared_ptr : mpl::false_ { }; template < class T0 > struct is_shared_ptr< shared_ptr< T0 > > : mpl::true_ { }; static const bool value = is_shared_ptr< typename remove_cv< typename remove_reference::type >::type >::value; typedef mpl::bool_ type; }; + +}}} +# 21 "/usr/include/boost-1_42/boost/python/to_python_value.hpp" 2 +# 29 "/usr/include/boost-1_42/boost/python/to_python_value.hpp" +namespace boost { namespace python { + +namespace detail +{ + + +template +struct object_manager_get_pytype +{ + template + static PyTypeObject const* get( U& (*)() =0) + { + return converter::object_manager_traits::get_pytype(); + } +}; + +template <> +struct object_manager_get_pytype +{ + template + static PyTypeObject const* get( U const& (*)() =0) + { + return converter::object_manager_traits::get_pytype(); + } +}; + + + + template + struct object_manager_to_python_value + { + typedef typename value_arg::type argument_type; + + PyObject* operator()(argument_type) const; + + typedef boost::mpl::bool_::value> is_t_handle; + typedef boost::detail::indirect_traits::is_reference_to_const is_t_const; + PyTypeObject const* get_pytype() const { + return get_pytype_aux((is_t_handle*)0); + } + + inline static PyTypeObject const* get_pytype_aux(mpl::true_*) {return converter::object_manager_traits::get_pytype();} + + inline static PyTypeObject const* get_pytype_aux(mpl::false_* ) + { + return object_manager_get_pytype::get((T(*)())0); + } + + + + + + + static const bool uses_registry = false; + }; + + + template + struct registry_to_python_value + { + typedef typename value_arg::type argument_type; + + PyObject* operator()(argument_type) const; + + PyTypeObject const* get_pytype() const {return converter::registered::converters.to_python_target_type();} + + + + + + static const bool uses_registry = true; + }; + + template + struct shared_ptr_to_python_value + { + typedef typename value_arg::type argument_type; + + PyObject* operator()(argument_type) const; + + PyTypeObject const* get_pytype() const {return get_pytype((boost::type*)0);} + + + + + static const bool uses_registry = false; + private: + + template + PyTypeObject const* get_pytype(boost::type &> *) const {return converter::registered::converters.to_python_target_type();} + template + PyTypeObject const* get_pytype(boost::type &> *) const {return converter::registered::converters.to_python_target_type();} + + }; +} + +template +struct to_python_value + : mpl::if_< + detail::value_is_shared_ptr + , detail::shared_ptr_to_python_value + , typename mpl::if_< + mpl::or_< + converter::is_object_manager + , converter::is_reference_to_object_manager + > + , detail::object_manager_to_python_value + , detail::registry_to_python_value + >::type + >::type +{ +}; + + + + +namespace detail +{ + template + inline PyObject* registry_to_python_value::operator()(argument_type x) const + { + typedef converter::registered r; + + + + + return converter::registered::converters.to_python(&x); + } + + template + inline PyObject* object_manager_to_python_value::operator()(argument_type x) const + { + return python::upcast( + python::xincref( + get_managed_object(x, tag)) + ); + } + + template + inline PyObject* shared_ptr_to_python_value::operator()(argument_type x) const + { + return converter::shared_ptr_to_python(x); + } +} + +}} +# 22 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" 2 +# 41 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" +namespace boost { namespace python { namespace detail { + + + +typedef int void_result_to_python; + +template +struct invoke_tag_ {}; + + + +template +struct invoke_tag + : invoke_tag_< + is_same::value + , is_member_function_pointer::value + > +{ +}; + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 47 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" 1 +# 72 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f ) +{ + return rc(f( )); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f ) +{ + f( ); + return none(); +} + +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc ) +{ + return rc( (tc().*f)() ); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc ) +{ + (tc().*f)(); + return none(); +} +# 48 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" 1 +# 72 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 ) +{ + return rc(f( ac0 () )); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 ) +{ + f( ac0 () ); + return none(); +} + +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 ) +{ + return rc( (tc().*f)( ac0 () ) ); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 ) +{ + (tc().*f)( ac0 () ); + return none(); +} +# 53 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" 1 +# 72 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 ) +{ + return rc(f( ac0 () , ac1 () )); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 ) +{ + f( ac0 () , ac1 () ); + return none(); +} + +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () ) ); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 ) +{ + (tc().*f)( ac0 () , ac1 () ); + return none(); +} +# 58 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" 1 +# 72 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () )); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 ) +{ + f( ac0 () , ac1 () , ac2 () ); + return none(); +} + +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () ) ); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () ); + return none(); +} +# 63 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" 1 +# 72 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () , ac3 () )); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 ) +{ + f( ac0 () , ac1 () , ac2 () , ac3 () ); + return none(); +} + +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () ) ); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () ); + return none(); +} +# 68 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" 1 +# 72 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () )); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 ) +{ + f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () ); + return none(); +} + +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () ) ); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () ); + return none(); +} +# 73 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" 1 +# 72 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () )); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 ) +{ + f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () ); + return none(); +} + +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () ) ); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () ); + return none(); +} +# 78 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" 1 +# 72 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () )); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 ) +{ + f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () ); + return none(); +} + +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () ) ); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () ); + return none(); +} +# 83 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" 1 +# 72 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () )); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 ) +{ + f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () ); + return none(); +} + +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () ) ); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () ); + return none(); +} +# 88 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" 1 +# 72 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () )); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 ) +{ + f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () ); + return none(); +} + +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () ) ); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () ); + return none(); +} +# 93 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" 1 +# 72 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () )); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 ) +{ + f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () ); + return none(); +} + +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () ) ); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () ); + return none(); +} +# 98 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" 1 +# 72 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () )); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 ) +{ + f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () ); + return none(); +} + +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () ) ); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () ); + return none(); +} +# 103 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" 1 +# 72 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () )); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 ) +{ + f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () ); + return none(); +} + +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () ) ); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () ); + return none(); +} +# 108 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" 1 +# 72 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 , AC12 & ac12 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () , ac12 () )); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 , AC12 & ac12 ) +{ + f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () , ac12 () ); + return none(); +} + +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 , AC12 & ac12 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () , ac12 () ) ); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 , AC12 & ac12 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () , ac12 () ); + return none(); +} +# 113 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" 1 +# 72 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 , AC12 & ac12 , AC13 & ac13 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () , ac12 () , ac13 () )); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 , AC12 & ac12 , AC13 & ac13 ) +{ + f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () , ac12 () , ac13 () ); + return none(); +} + +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 , AC12 & ac12 , AC13 & ac13 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () , ac12 () , ac13 () ) ); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 , AC12 & ac12 , AC13 & ac13 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () , ac12 () , ac13 () ); + return none(); +} +# 118 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" 1 +# 72 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 , AC12 & ac12 , AC13 & ac13 , AC14 & ac14 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () , ac12 () , ac13 () , ac14 () )); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 , AC12 & ac12 , AC13 & ac13 , AC14 & ac14 ) +{ + f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () , ac12 () , ac13 () , ac14 () ); + return none(); +} + +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 , AC12 & ac12 , AC13 & ac13 , AC14 & ac14 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () , ac12 () , ac13 () , ac14 () ) ); +} + +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 , AC12 & ac12 , AC13 & ac13 , AC14 & ac14 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () , ac12 () , ac13 () , ac14 () ); + return none(); +} +# 123 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 64 "/usr/include/boost-1_42/boost/python/detail/invoke.hpp" 2 + +}}} +# 17 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/at.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/at.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/at_impl.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/aux_/at_impl.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/begin_end.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/begin_end.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/begin_end_impl.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/aux_/begin_end_impl.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/sequence_tag_fwd.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/sequence_tag_fwd.hpp" +namespace boost { namespace mpl { + +struct nested_begin_end_tag; +struct non_sequence_tag; + +template< typename Sequence > struct sequence_tag; + +}} +# 19 "/usr/include/boost-1_42/boost/mpl/aux_/begin_end_impl.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/has_begin.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/aux_/has_begin.hpp" +namespace boost { namespace mpl { namespace aux { +template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_begin { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; +}}} +# 22 "/usr/include/boost-1_42/boost/mpl/aux_/begin_end_impl.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/traits_lambda_spec.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/mpl/aux_/begin_end_impl.hpp" 2 + + +namespace boost { namespace mpl { + + +namespace aux { + +template< typename Sequence > +struct begin_type +{ + typedef typename Sequence::begin type; +}; +template< typename Sequence > +struct end_type +{ + typedef typename Sequence::end type; +}; + +} + + + + + +template< typename Tag > +struct begin_impl +{ + template< typename Sequence > struct apply + { + typedef typename eval_if, + aux::begin_type, void_>::type type; + }; +}; + +template< typename Tag > +struct end_impl +{ + template< typename Sequence > struct apply + { + typedef typename eval_if, + aux::end_type, void_>::type type; + }; +}; +# 82 "/usr/include/boost-1_42/boost/mpl/aux_/begin_end_impl.hpp" +template<> struct begin_impl { template< typename Sequence > struct apply { typedef typename Sequence::begin type; }; }; +template<> struct end_impl { template< typename Sequence > struct apply { typedef typename Sequence::end type; }; }; + + + + +template<> struct begin_impl { template< typename Sequence > struct apply { typedef void_ type; }; }; +template<> struct end_impl { template< typename Sequence > struct apply { typedef void_ type; }; }; +template<> struct begin_impl { template< typename Sequence > struct apply { typedef void_ type; }; }; +template<> struct end_impl { template< typename Sequence > struct apply { typedef void_ type; }; }; + + + + + + + +}} +# 19 "/usr/include/boost-1_42/boost/mpl/begin_end.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/sequence_tag.hpp" 1 +# 26 "/usr/include/boost-1_42/boost/mpl/sequence_tag.hpp" +namespace boost { namespace mpl { +# 78 "/usr/include/boost-1_42/boost/mpl/sequence_tag.hpp" +namespace aux { + +template< bool has_tag_, bool has_begin_ > +struct sequence_tag_impl +{ + + + template< typename Sequence > struct result2_; +}; +# 98 "/usr/include/boost-1_42/boost/mpl/sequence_tag.hpp" +template<> struct sequence_tag_impl { template< typename Sequence > struct result2_ { typedef typename Sequence::tag type; }; }; +template<> struct sequence_tag_impl { template< typename Sequence > struct result2_ { typedef typename Sequence::tag type; }; }; +template<> struct sequence_tag_impl { template< typename Sequence > struct result2_ { typedef nested_begin_end_tag type; }; }; +template<> struct sequence_tag_impl { template< typename Sequence > struct result2_ { typedef non_sequence_tag type; }; }; + + + +} + +template< + typename Sequence = na + > +struct sequence_tag + : aux::sequence_tag_impl< + ::boost::mpl::aux::has_tag::value + , ::boost::mpl::aux::has_begin::value + >::template result2_ +{ +}; + + + +template<> struct sequence_tag< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : sequence_tag< T1 > { }; }; template< typename Tag > struct lambda< sequence_tag< na > , Tag , int_<-1> > { typedef false_ is_le; typedef sequence_tag< na > result_; typedef sequence_tag< na > type; }; namespace aux { template< typename T1 > struct template_arity< sequence_tag< T1 > > : int_<1> { }; template<> struct template_arity< sequence_tag< na > > : int_<-1> { }; } + +}} +# 20 "/usr/include/boost-1_42/boost/mpl/begin_end.hpp" 2 + + + +namespace boost { namespace mpl { + + + + +template< + typename Sequence = na + > +struct begin +{ + typedef typename sequence_tag::type tag_; + typedef typename begin_impl< tag_ > + ::template apply< Sequence >::type type; + + +}; + +template< + typename Sequence = na + > +struct end +{ + typedef typename sequence_tag::type tag_; + typedef typename end_impl< tag_ > + ::template apply< Sequence >::type type; + + +}; + +template<> struct begin< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : begin< T1 > { }; }; template< typename Tag > struct lambda< begin< na > , Tag , int_<-1> > { typedef false_ is_le; typedef begin< na > result_; typedef begin< na > type; }; namespace aux { template< typename T1 > struct template_arity< begin< T1 > > : int_<1> { }; template<> struct template_arity< begin< na > > : int_<-1> { }; } +template<> struct end< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : end< T1 > { }; }; template< typename Tag > struct lambda< end< na > , Tag , int_<-1> > { typedef false_ is_le; typedef end< na > result_; typedef end< na > type; }; namespace aux { template< typename T1 > struct template_arity< end< T1 > > : int_<1> { }; template<> struct template_arity< end< na > > : int_<-1> { }; } + +}} +# 18 "/usr/include/boost-1_42/boost/mpl/aux_/at_impl.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/advance.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/advance.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/less.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/less.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/comparison_op.hpp" 1 +# 27 "/usr/include/boost-1_42/boost/mpl/aux_/comparison_op.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_op.hpp" 1 +# 22 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_op.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/apply_wrap.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_op.hpp" 2 +# 28 "/usr/include/boost-1_42/boost/mpl/aux_/comparison_op.hpp" 2 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/less.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/less.hpp" +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( Tag1::value + > Tag2::value + ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + + +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename N1 = na + , typename N2 = na + > +struct less + + : less_impl< + typename less_tag::type + , typename less_tag::type + >::template apply< N1,N2 >::type +{ + + +}; + +template<> struct less< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : less< T1 , T2 > { }; }; template< typename Tag > struct lambda< less< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef less< na , na > result_; typedef less< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< less< T1 , T2 > > : int_<2> { }; template<> struct template_arity< less< na , na > > : int_<-1> { }; } + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( N2::value > N1::value ) > + { + }; +}; + +}} +# 38 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 2 +# 36 "/usr/include/boost-1_42/boost/mpl/aux_/comparison_op.hpp" 2 +# 20 "/usr/include/boost-1_42/boost/mpl/less.hpp" 2 +# 19 "/usr/include/boost-1_42/boost/mpl/advance.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/negate.hpp" 1 +# 25 "/usr/include/boost-1_42/boost/mpl/negate.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct negate_impl; + +template< typename T > struct negate_tag +{ + typedef typename T::tag type; +}; + +template< + typename N = na + > +struct negate + + : negate_impl< + typename negate_tag::type + >::template apply::type + + + + + + +{ + +}; + +template<> struct negate< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : negate< T1 > { }; }; template< typename Tag > struct lambda< negate< na > , Tag , int_<-1> > { typedef false_ is_le; typedef negate< na > result_; typedef negate< na > type; }; namespace aux { template< typename T1 > struct template_arity< negate< T1 > > : int_<1> { }; template<> struct template_arity< negate< na > > : int_<-1> { }; } +# 65 "/usr/include/boost-1_42/boost/mpl/negate.hpp" +template<> +struct negate_impl +{ + + + + + template< typename N > struct apply + : integral_c< typename N::value_type, (-N::value) > + + { + }; +}; + +}} +# 20 "/usr/include/boost-1_42/boost/mpl/advance.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/mpl/apply_wrap.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/mpl/advance.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/advance_forward.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/mpl/aux_/advance_forward.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/apply_wrap.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/mpl/aux_/advance_forward.hpp" 2 +# 32 "/usr/include/boost-1_42/boost/mpl/aux_/advance_forward.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp" +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} +# 38 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 2 +# 33 "/usr/include/boost-1_42/boost/mpl/aux_/advance_forward.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/mpl/advance.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/advance_backward.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/mpl/aux_/advance_backward.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/apply_wrap.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/mpl/aux_/advance_backward.hpp" 2 +# 32 "/usr/include/boost-1_42/boost/mpl/aux_/advance_backward.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp" +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} +# 38 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 2 +# 33 "/usr/include/boost-1_42/boost/mpl/aux_/advance_backward.hpp" 2 +# 26 "/usr/include/boost-1_42/boost/mpl/advance.hpp" 2 + + + + +namespace boost { namespace mpl { + + +template< typename Tag > +struct advance_impl +{ + template< typename Iterator, typename N > struct apply + { + typedef typename less< N,long_<0> >::type backward_; + typedef typename if_< backward_, negate, N >::type offset_; + + typedef typename if_< + backward_ + , aux::advance_backward< offset_::value > + , aux::advance_forward< offset_::value > + >::type f_; + + typedef typename apply_wrap1::type type; + }; +}; + + +template< + typename Iterator = na + , typename N = na + > +struct advance + : advance_impl< typename tag::type > + ::template apply +{ +}; + +template< + typename Iterator + , long N + > +struct advance_c + : advance_impl< typename tag::type > + ::template apply > +{ +}; + +template<> struct advance< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : advance< T1 , T2 > { }; }; template< typename Tag > struct lambda< advance< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef advance< na , na > result_; typedef advance< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< advance< T1 , T2 > > : int_<2> { }; template<> struct template_arity< advance< na , na > > : int_<-1> { }; } + +}} +# 19 "/usr/include/boost-1_42/boost/mpl/aux_/at_impl.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/deref.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/deref.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/msvc_type.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/mpl/aux_/msvc_type.hpp" +namespace boost { namespace mpl { namespace aux { +# 48 "/usr/include/boost-1_42/boost/mpl/aux_/msvc_type.hpp" +template< typename T > struct msvc_type +{ + typedef typename T::type type; +}; + +template<> struct msvc_type +{ + typedef int type; +}; + + + +}}} +# 18 "/usr/include/boost-1_42/boost/mpl/deref.hpp" 2 + + + + +namespace boost { namespace mpl { + +template< + typename Iterator = na + > +struct deref +{ + + typedef typename Iterator::type type; + + + + +}; + +template<> struct deref< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : deref< T1 > { }; }; template< typename Tag > struct lambda< deref< na > , Tag , int_<-1> > { typedef false_ is_le; typedef deref< na > result_; typedef deref< na > type; }; namespace aux { template< typename T1 > struct template_arity< deref< T1 > > : int_<1> { }; template<> struct template_arity< deref< na > > : int_<-1> { }; } + +}} +# 20 "/usr/include/boost-1_42/boost/mpl/aux_/at_impl.hpp" 2 + + +namespace boost { namespace mpl { + + + + +template< typename Tag > +struct at_impl +{ + template< typename Sequence, typename N > struct apply + { + typedef typename advance< + typename begin::type + , N + >::type iter_; + + typedef typename deref::type type; + }; +}; + + template<> struct at_impl {}; + +}} +# 19 "/usr/include/boost-1_42/boost/mpl/at.hpp" 2 + + + + + + +namespace boost { namespace mpl { + +template< + typename Sequence = na + , typename N = na + > +struct at + : at_impl< typename sequence_tag::type > + ::template apply< Sequence,N > +{ + +}; + +template< + typename Sequence + , long N + > +struct at_c + : at_impl< typename sequence_tag::type > + ::template apply< Sequence,mpl::long_ > +{ +}; + +template<> struct at< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : at< T1 , T2 > { }; }; template< typename Tag > struct lambda< at< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef at< na , na > result_; typedef at< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< at< T1 , T2 > > : int_<2> { }; template<> struct template_arity< at< na , na > > : int_<-1> { }; } + +}} +# 21 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/size.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/size.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/size_impl.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/aux_/size_impl.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/distance.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/distance.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/iter_fold.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/iter_fold.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/O1_size.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/O1_size.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/O1_size_impl.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/mpl/aux_/O1_size_impl.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/has_size.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/aux_/has_size.hpp" +namespace boost { namespace mpl { namespace aux { +template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_size { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; +}}} +# 21 "/usr/include/boost-1_42/boost/mpl/aux_/O1_size_impl.hpp" 2 + + + + + +namespace boost { namespace mpl { +# 35 "/usr/include/boost-1_42/boost/mpl/aux_/O1_size_impl.hpp" +namespace aux { +template< typename Sequence > struct O1_size_impl + : Sequence::size +{ +}; +} + +template< typename Tag > +struct O1_size_impl +{ + template< typename Sequence > struct apply + + : if_< + aux::has_size + , aux::O1_size_impl + , long_<-1> + >::type + { +# 69 "/usr/include/boost-1_42/boost/mpl/aux_/O1_size_impl.hpp" + }; +}; +# 85 "/usr/include/boost-1_42/boost/mpl/aux_/O1_size_impl.hpp" +}} +# 20 "/usr/include/boost-1_42/boost/mpl/O1_size.hpp" 2 + + + +namespace boost { namespace mpl { + + +template< + typename Sequence = na + > +struct O1_size + : O1_size_impl< typename sequence_tag::type > + ::template apply< Sequence > +{ + +}; + +template<> struct O1_size< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : O1_size< T1 > { }; }; template< typename Tag > struct lambda< O1_size< na > , Tag , int_<-1> > { typedef false_ is_le; typedef O1_size< na > result_; typedef O1_size< na > type; }; namespace aux { template< typename T1 > struct template_arity< O1_size< T1 > > : int_<1> { }; template<> struct template_arity< O1_size< na > > : int_<-1> { }; } + +}} +# 20 "/usr/include/boost-1_42/boost/mpl/iter_fold.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/iter_fold_impl.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/aux_/iter_fold_impl.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/apply.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/mpl/aux_/iter_fold_impl.hpp" 2 +# 33 "/usr/include/boost-1_42/boost/mpl/aux_/iter_fold_impl.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp" +namespace boost { namespace mpl { namespace aux { + + + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl +{ + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,First,Last,State,ForwardOp > + : iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} +# 38 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 2 +# 34 "/usr/include/boost-1_42/boost/mpl/aux_/iter_fold_impl.hpp" 2 +# 22 "/usr/include/boost-1_42/boost/mpl/iter_fold.hpp" 2 + + + +namespace boost { namespace mpl { + +template< + typename Sequence = na + , typename State = na + , typename ForwardOp = na + > +struct iter_fold +{ + typedef typename aux::iter_fold_impl< + ::boost::mpl::O1_size::value + , typename begin::type + , typename end::type + , State + , typename lambda::type + >::state type; + + +}; + +template<> struct iter_fold< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : iter_fold< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< iter_fold< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef iter_fold< na , na , na > result_; typedef iter_fold< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< iter_fold< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< iter_fold< na , na , na > > : int_<-1> { }; } + +}} +# 19 "/usr/include/boost-1_42/boost/mpl/distance.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/iterator_range.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/mpl/iterator_range.hpp" +namespace boost { namespace mpl { + +struct iterator_range_tag; + +template< + typename First = na + , typename Last = na + > +struct iterator_range +{ + typedef iterator_range_tag tag; + typedef iterator_range type; + typedef First begin; + typedef Last end; + + +}; + +template<> struct iterator_range< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : iterator_range< T1 , T2 > { }; }; template< typename Tag > struct lambda< iterator_range< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef iterator_range< na , na > result_; typedef iterator_range< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< iterator_range< T1 , T2 > > : int_<2> { }; template<> struct template_arity< iterator_range< na , na > > : int_<-1> { }; } + +}} +# 20 "/usr/include/boost-1_42/boost/mpl/distance.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/mpl/apply_wrap.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/mpl/distance.hpp" 2 + + + + + + + +namespace boost { namespace mpl { + + +template< typename Tag > struct distance_impl +{ + template< typename First, typename Last > struct apply + + : aux::msvc_eti_base< typename iter_fold< + iterator_range + , mpl::long_<0> + , next<> + >::type > + { +# 60 "/usr/include/boost-1_42/boost/mpl/distance.hpp" + }; +}; + +template< + typename First = na + , typename Last = na + > +struct distance + : distance_impl< typename tag::type > + ::template apply +{ + +}; + +template<> struct distance< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : distance< T1 , T2 > { }; }; template< typename Tag > struct lambda< distance< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef distance< na , na > result_; typedef distance< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< distance< T1 , T2 > > : int_<2> { }; template<> struct template_arity< distance< na , na > > : int_<-1> { }; } + +}} +# 20 "/usr/include/boost-1_42/boost/mpl/aux_/size_impl.hpp" 2 + + + +namespace boost { namespace mpl { + + + + +template< typename Tag > +struct size_impl +{ + template< typename Sequence > struct apply + + : distance< + typename begin::type + , typename end::type + > + { + + + + + + + + }; +}; + + template<> struct size_impl {}; + +}} +# 20 "/usr/include/boost-1_42/boost/mpl/size.hpp" 2 + + + + +namespace boost { namespace mpl { + +template< + typename Sequence = na + > +struct size + : aux::msvc_eti_base< + typename size_impl< typename sequence_tag::type > + ::template apply< Sequence >::type + >::type +{ + +}; + +template<> struct size< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : size< T1 > { }; }; template< typename Tag > struct lambda< size< na > , Tag , int_<-1> > { typedef false_ is_le; typedef size< na > result_; typedef size< na > type; }; namespace aux { template< typename T1 > struct template_arity< size< T1 > > : int_<1> { }; template<> struct template_arity< size< na > > : int_<-1> { }; } + +}} +# 22 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 2 + +namespace boost { namespace python { namespace detail { + +struct signature_element +{ + char const* basename; + converter::pytype_function pytype_f; + bool lvalue; +}; + +struct py_func_sig_info +{ + signature_element const *signature; + signature_element const *ret; +}; + +template struct signature_arity; + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 47 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +template <> +struct signature_arity<0> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[0 +2] = { +# 96 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, +# 97 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 2 + {0,0,0} + }; + return result; + } + }; +}; +# 48 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +template <> +struct signature_arity<1> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[1 +2] = { +# 96 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, +# 97 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 2 + {0,0,0} + }; + return result; + } + }; +}; +# 53 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +template <> +struct signature_arity<2> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[2 +2] = { +# 96 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, +# 97 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 2 + {0,0,0} + }; + return result; + } + }; +}; +# 58 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +template <> +struct signature_arity<3> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[3 +2] = { +# 96 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, +# 97 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 2 + {0,0,0} + }; + return result; + } + }; +}; +# 63 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +template <> +struct signature_arity<4> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[4 +2] = { +# 96 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, +# 97 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 2 + {0,0,0} + }; + return result; + } + }; +}; +# 68 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +template <> +struct signature_arity<5> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[5 +2] = { +# 96 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, +# 97 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 2 + {0,0,0} + }; + return result; + } + }; +}; +# 73 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +template <> +struct signature_arity<6> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[6 +2] = { +# 96 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, +# 97 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 2 + {0,0,0} + }; + return result; + } + }; +}; +# 78 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +template <> +struct signature_arity<7> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[7 +2] = { +# 96 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, +# 97 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 2 + {0,0,0} + }; + return result; + } + }; +}; +# 83 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +template <> +struct signature_arity<8> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[8 +2] = { +# 96 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, +# 97 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 2 + {0,0,0} + }; + return result; + } + }; +}; +# 88 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +template <> +struct signature_arity<9> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[9 +2] = { +# 96 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, +# 97 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 2 + {0,0,0} + }; + return result; + } + }; +}; +# 93 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +template <> +struct signature_arity<10> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[10 +2] = { +# 96 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, +# 97 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 2 + {0,0,0} + }; + return result; + } + }; +}; +# 98 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +template <> +struct signature_arity<11> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[11 +2] = { +# 96 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, +# 97 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 2 + {0,0,0} + }; + return result; + } + }; +}; +# 103 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +template <> +struct signature_arity<12> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[12 +2] = { +# 96 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, +# 97 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 2 + {0,0,0} + }; + return result; + } + }; +}; +# 108 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +template <> +struct signature_arity<13> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[13 +2] = { +# 96 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, +# 97 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 2 + {0,0,0} + }; + return result; + } + }; +}; +# 113 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +template <> +struct signature_arity<14> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[14 +2] = { +# 96 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, +# 97 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 2 + {0,0,0} + }; + return result; + } + }; +}; +# 118 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +template <> +struct signature_arity<15> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[15 +2] = { +# 96 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, +# 97 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 2 + {0,0,0} + }; + return result; + } + }; +}; +# 123 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +template <> +struct signature_arity<16> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[16 +2] = { +# 96 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + + + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, +# 97 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 2 + {0,0,0} + }; + return result; + } + }; +}; +# 128 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 43 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 2 + + + + + +template +struct signature_base_select +{ + enum { arity = mpl::size::value - 1 }; + typedef typename signature_arity::template impl type; +}; + +template +struct signature + : signature_base_select::type +{ +}; + +}}} +# 18 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/python/arg_from_python.hpp" 1 +# 9 "/usr/include/boost-1_42/boost/python/arg_from_python.hpp" +# 1 "/usr/include/boost-1_42/boost/python/converter/arg_from_python.hpp" 1 +# 9 "/usr/include/boost-1_42/boost/python/converter/arg_from_python.hpp" +# 1 "/usr/include/boost-1_42/boost/python/converter/from_python.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/converter/from_python.hpp" +namespace boost { namespace python { namespace converter { + +struct registration; + + + void* get_lvalue_from_python( + PyObject* source, registration const&); + + bool implicit_rvalue_convertible_from_python( + PyObject* source, registration const&); + + rvalue_from_python_stage1_data rvalue_from_python_stage1( + PyObject* source, registration const&); + + void* rvalue_from_python_stage2( + PyObject* source, rvalue_from_python_stage1_data&, registration const&); + + void* rvalue_result_from_python( + PyObject*, rvalue_from_python_stage1_data&); + + void* reference_result_from_python(PyObject*, registration const&); + void* pointer_result_from_python(PyObject*, registration const&); + + void void_result_from_python(PyObject*); + + void throw_no_pointer_from_python(PyObject*, registration const&); + void throw_no_reference_from_python(PyObject*, registration const&); + +}}} +# 10 "/usr/include/boost-1_42/boost/python/converter/arg_from_python.hpp" 2 +# 23 "/usr/include/boost-1_42/boost/python/converter/arg_from_python.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/void_ptr.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/detail/void_ptr.hpp" +namespace boost { namespace python { namespace detail { + +template +inline U& void_ptr_to_reference(void const volatile* p, U&(*)()) +{ + return *(U*)p; +} + +template +inline void write_void_ptr(void const volatile* storage, void* ptr, T*) +{ + *(T**)storage = (T*)ptr; +} + + +template +inline void write_void_ptr_reference(void const volatile* storage, void* ptr, U&(*)()) +{ + + typedef typename remove_cv::type u_stripped; + write_void_ptr(storage, ptr, u_stripped(0)); +} + +}}} +# 24 "/usr/include/boost-1_42/boost/python/converter/arg_from_python.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/back_reference.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/back_reference.hpp" +# 1 "/usr/include/boost-1_42/boost/python/object_fwd.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/object_fwd.hpp" +namespace boost { namespace python { +namespace api +{ + class object; +} +using api::object; +}} +# 11 "/usr/include/boost-1_42/boost/python/back_reference.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/detail/dependent.hpp" 1 + + + + + + + +namespace boost { namespace python { namespace detail { +# 19 "/usr/include/boost-1_42/boost/python/detail/dependent.hpp" +template +struct dependent +{ + typedef T type; +}; + +}}} +# 12 "/usr/include/boost-1_42/boost/python/back_reference.hpp" 2 + + +namespace boost { namespace python { + +template +struct back_reference +{ + private: + typedef typename detail::dependent::type source_t; + public: + typedef T type; + + back_reference(PyObject*, T); + source_t const& source() const; + T get() const; + private: + source_t m_source; + T m_value; +}; + + +template +class is_back_reference +{ + public: + static const bool value = false; +}; + +template +class is_back_reference > +{ + public: + static const bool value = true; +}; +# 81 "/usr/include/boost-1_42/boost/python/back_reference.hpp" +template +back_reference::back_reference(PyObject* p, T x) + : m_source(detail::borrowed_reference(p)) + , m_value(x) +{ +} + +template +typename back_reference::source_t const& back_reference::source() const +{ + return m_source; +} + +template +T back_reference::get() const +{ + return m_value; +} + +}} +# 25 "/usr/include/boost-1_42/boost/python/converter/arg_from_python.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/converter/obj_mgr_arg_from_python.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/converter/obj_mgr_arg_from_python.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/construct.hpp" 1 + + + + + + + +namespace boost { namespace python { namespace detail { + +template +void construct_pointee(void* storage, Arg& x + + , T const volatile* + + + + ) +{ + new (storage) T(x); +} + +template +void construct_referent_impl(void* storage, Arg& x, T&(*)()) +{ + construct_pointee(storage, x, (T*)0); +} + +template +void construct_referent(void* storage, Arg const& x, T(*tag)() = 0) +{ + construct_referent_impl(storage, x, tag); +} + +template +void construct_referent(void* storage, Arg& x, T(*tag)() = 0) +{ + construct_referent_impl(storage, x, tag); +} + +}}} +# 12 "/usr/include/boost-1_42/boost/python/converter/obj_mgr_arg_from_python.hpp" 2 +# 20 "/usr/include/boost-1_42/boost/python/converter/obj_mgr_arg_from_python.hpp" +namespace boost { namespace python { namespace converter { + +template +struct object_manager_value_arg_from_python +{ + typedef T result_type; + + object_manager_value_arg_from_python(PyObject*); + bool convertible() const; + T operator()() const; + private: + PyObject* m_source; +}; +# 43 "/usr/include/boost-1_42/boost/python/converter/obj_mgr_arg_from_python.hpp" +template +struct object_manager_ref_arg_from_python +{ + typedef Ref result_type; + + object_manager_ref_arg_from_python(PyObject*); + bool convertible() const; + Ref operator()() const; + ~object_manager_ref_arg_from_python(); + private: + typename python::detail::referent_storage::type m_result; +}; + + + + + +template +inline object_manager_value_arg_from_python::object_manager_value_arg_from_python(PyObject* x) + : m_source(x) +{ +} + +template +inline bool object_manager_value_arg_from_python::convertible() const +{ + return object_manager_traits::check(m_source); +} + +template +inline T object_manager_value_arg_from_python::operator()() const +{ + return T(python::detail::borrowed_reference(m_source)); +} + +template +inline object_manager_ref_arg_from_python::object_manager_ref_arg_from_python(PyObject* x) +{ + + + + + + python::detail::construct_referent(&m_result.bytes, (python::detail::borrowed_reference)x); + +} + +template +inline object_manager_ref_arg_from_python::~object_manager_ref_arg_from_python() +{ + python::detail::destroy_referent(this->m_result.bytes); +} + +namespace detail +{ + template + inline bool object_manager_ref_check(T const& x) + { + return object_manager_traits::check(get_managed_object(x, tag)); + } +} + +template +inline bool object_manager_ref_arg_from_python::convertible() const +{ + return detail::object_manager_ref_check( + python::detail::void_ptr_to_reference(this->m_result.bytes, (Ref(*)())0)); +} + +template +inline Ref object_manager_ref_arg_from_python::operator()() const +{ + return python::detail::void_ptr_to_reference( + this->m_result.bytes, (Ref(*)())0); +} + +}}} +# 27 "/usr/include/boost-1_42/boost/python/converter/arg_from_python.hpp" 2 + +namespace boost { namespace python +{ + template struct arg_from_python; +}} + + + + +namespace boost { namespace python { namespace converter { +# 45 "/usr/include/boost-1_42/boost/python/converter/arg_from_python.hpp" +template +struct pointer_cref_arg_from_python +{ + typedef T result_type; + + pointer_cref_arg_from_python(PyObject*); + T operator()() const; + bool convertible() const; + + private: + + + typename python::detail::referent_storage::type m_result; +}; + + +struct arg_lvalue_from_python_base +{ + public: + arg_lvalue_from_python_base(void* result); + bool convertible() const; + + protected: + void*const& result() const; + + private: + void* m_result; +}; + + +template +struct pointer_arg_from_python : arg_lvalue_from_python_base +{ + typedef T result_type; + + pointer_arg_from_python(PyObject*); + T operator()() const; +}; + + +template +struct reference_arg_from_python : arg_lvalue_from_python_base +{ + typedef T result_type; + + reference_arg_from_python(PyObject*); + T operator()() const; +}; +# 106 "/usr/include/boost-1_42/boost/python/converter/arg_from_python.hpp" +template +struct arg_rvalue_from_python +{ + typedef typename boost::add_reference< + T + + + >::type result_type; + + arg_rvalue_from_python(PyObject*); + bool convertible() const; + + + typename arg_rvalue_from_python:: + + result_type operator()(); + + private: + rvalue_from_python_data m_data; + PyObject* m_source; +}; + + + + + + +template +struct back_reference_arg_from_python + : boost::python::arg_from_python +{ + typedef T result_type; + + back_reference_arg_from_python(PyObject*); + T operator()(); + private: + typedef boost::python::arg_from_python base; + PyObject* m_source; +}; + + + + +template +struct if_2 +{ + typedef typename mpl::eval_if, F>::type type; +}; + + + +template +struct select_arg_from_python +{ + typedef typename if_2< + is_object_manager + , object_manager_value_arg_from_python + , if_2< + is_reference_to_object_manager + , object_manager_ref_arg_from_python + , if_2< + is_pointer + , pointer_arg_from_python + , if_2< + mpl::and_< + indirect_traits::is_reference_to_pointer + , indirect_traits::is_reference_to_const + , mpl::not_ > + > + , pointer_cref_arg_from_python + , if_2< + mpl::or_< + indirect_traits::is_reference_to_non_const + , indirect_traits::is_reference_to_volatile + > + , reference_arg_from_python + , mpl::if_< + boost::python::is_back_reference + , back_reference_arg_from_python + , arg_rvalue_from_python + > + > + > + > + > + >::type type; +}; +# 202 "/usr/include/boost-1_42/boost/python/converter/arg_from_python.hpp" +inline arg_lvalue_from_python_base::arg_lvalue_from_python_base(void* result) + : m_result(result) +{ +} + +inline bool arg_lvalue_from_python_base::convertible() const +{ + return m_result != 0; +} + +inline void*const& arg_lvalue_from_python_base::result() const +{ + return m_result; +} + + + +namespace detail +{ + + + + template + struct null_ptr_owner + { + static T value; + }; + template T null_ptr_owner::value = 0; + + template + inline U& null_ptr_reference(U&(*)()) + { + return null_ptr_owner::value; + } +} + +template +inline pointer_cref_arg_from_python::pointer_cref_arg_from_python(PyObject* p) +{ + + + + python::detail::write_void_ptr_reference( + m_result.bytes + , p == (&_Py_NoneStruct) ? p : converter::get_lvalue_from_python(p, registered_pointee::converters) + , (T(*)())0); +} + +template +inline bool pointer_cref_arg_from_python::convertible() const +{ + return python::detail::void_ptr_to_reference(m_result.bytes, (T(*)())0) != 0; +} +template +inline T pointer_cref_arg_from_python::operator()() const +{ + return (*(void**)m_result.bytes == (&_Py_NoneStruct)) + ? detail::null_ptr_reference((T(*)())0) + + : python::detail::void_ptr_to_reference(m_result.bytes, (T(*)())0); +} + + + +template +inline pointer_arg_from_python::pointer_arg_from_python(PyObject* p) + : arg_lvalue_from_python_base( + p == (&_Py_NoneStruct) ? p : converter::get_lvalue_from_python(p, registered_pointee::converters)) +{ +} + +template +inline T pointer_arg_from_python::operator()() const +{ + return (result() == (&_Py_NoneStruct)) ? 0 : T(result()); +} + + + +template +inline reference_arg_from_python::reference_arg_from_python(PyObject* p) + : arg_lvalue_from_python_base(converter::get_lvalue_from_python(p,registered::converters)) +{ +} + +template +inline T reference_arg_from_python::operator()() const +{ + return python::detail::void_ptr_to_reference(result(), (T(*)())0); +} + + + + +template +inline arg_rvalue_from_python::arg_rvalue_from_python(PyObject* obj) + : m_data(converter::rvalue_from_python_stage1(obj, registered::converters)) + , m_source(obj) +{ +} + +template +inline bool arg_rvalue_from_python::convertible() const +{ + return m_data.stage1.convertible != 0; +} + +template +inline typename arg_rvalue_from_python::result_type +arg_rvalue_from_python::operator()() +{ + if (m_data.stage1.construct != 0) + m_data.stage1.construct(m_source, &m_data.stage1); + + return python::detail::void_ptr_to_reference(m_data.stage1.convertible, (result_type(*)())0); +} + + + +template +back_reference_arg_from_python::back_reference_arg_from_python(PyObject* x) + : base(x), m_source(x) +{ +} + +template +inline T +back_reference_arg_from_python::operator()() +{ + return T(m_source, base::operator()()); +} + +}}} +# 10 "/usr/include/boost-1_42/boost/python/arg_from_python.hpp" 2 + + + + + +namespace boost { namespace python { + +template +struct arg_from_python + : converter::select_arg_from_python< + + + + + T + + >::type +{ + typedef typename converter::select_arg_from_python< + + + + + T + + >::type base; + + arg_from_python(PyObject*); +}; + + +template <> +struct arg_from_python +{ + typedef PyObject* result_type; + + arg_from_python(PyObject* p) : m_source(p) {} + bool convertible() const { return true; } + PyObject* operator()() const { return m_source; } + private: + PyObject* m_source; +}; + +template <> +struct arg_from_python +{ + typedef PyObject* const& result_type; + + arg_from_python(PyObject* p) : m_source(p) {} + bool convertible() const { return true; } + PyObject*const& operator()() const { return m_source; } + private: + PyObject* m_source; +}; + + + + +template +inline arg_from_python::arg_from_python(PyObject* source) + : base(source) +{ +} + +}} +# 21 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/converter/context_result_converter.hpp" 1 + + + + + + + +namespace boost { namespace python { namespace converter { + + + + +struct context_result_converter {}; + +}}} +# 22 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/dec.hpp" 1 +# 27 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/preprocessor/if.hpp" 1 +# 28 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/compressed_pair.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/compressed_pair.hpp" +# 1 "/usr/include/boost-1_42/boost/detail/compressed_pair.hpp" 1 +# 28 "/usr/include/boost-1_42/boost/detail/compressed_pair.hpp" +# 1 "/usr/include/boost-1_42/boost/call_traits.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/call_traits.hpp" +# 1 "/usr/include/boost-1_42/boost/detail/call_traits.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/detail/call_traits.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 25 "/usr/include/boost-1_42/boost/detail/call_traits.hpp" 2 + + + + + +namespace boost{ + +namespace detail{ + +template +struct ct_imp2 +{ + typedef const T& param_type; +}; + +template +struct ct_imp2 +{ + typedef const T param_type; +}; + +template +struct ct_imp +{ + typedef const T& param_type; +}; + +template +struct ct_imp +{ + typedef typename ct_imp2::param_type param_type; +}; + +template +struct ct_imp +{ + typedef const T param_type; +}; + +} + +template +struct call_traits +{ +public: + typedef T value_type; + typedef T& reference; + typedef const T& const_reference; + + + + + + + typedef typename boost::detail::ct_imp< + T, + ::boost::is_pointer::value, + ::boost::is_arithmetic::value + >::param_type param_type; +}; + +template +struct call_traits +{ + typedef T& value_type; + typedef T& reference; + typedef const T& const_reference; + typedef T& param_type; +}; +# 135 "/usr/include/boost-1_42/boost/detail/call_traits.hpp" +template +struct call_traits +{ +private: + typedef T array_type[BOOST_PP_ITERATION_0]; +public: + + typedef const T* value_type; + typedef array_type& reference; + typedef const array_type& const_reference; + typedef const T* const param_type; +}; + +template +struct call_traits +{ +private: + typedef const T array_type[BOOST_PP_ITERATION_0]; +public: + + typedef const T* value_type; + typedef array_type& reference; + typedef const array_type& const_reference; + typedef const T* const param_type; +}; + + +} +# 22 "/usr/include/boost-1_42/boost/call_traits.hpp" 2 +# 29 "/usr/include/boost-1_42/boost/detail/compressed_pair.hpp" 2 + + + + + +namespace boost +{ + +template +class compressed_pair; + + + + +namespace details +{ + + template + struct compressed_pair_switch; + + template + struct compressed_pair_switch + {static const int value = 0;}; + + template + struct compressed_pair_switch + {static const int value = 3;}; + + template + struct compressed_pair_switch + {static const int value = 1;}; + + template + struct compressed_pair_switch + {static const int value = 2;}; + + template + struct compressed_pair_switch + {static const int value = 4;}; + + template + struct compressed_pair_switch + {static const int value = 5;}; + + template class compressed_pair_imp; + + + + using std::swap; + + + + + + + template + inline void cp_swap(T& t1, T& t2) + { + + + + swap(t1, t2); + } + + + + template + class compressed_pair_imp + { + public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair_imp() {} + + compressed_pair_imp(first_param_type x, second_param_type y) + : first_(x), second_(y) {} + + compressed_pair_imp(first_param_type x) + : first_(x) {} + + compressed_pair_imp(second_param_type y) + : second_(y) {} + + first_reference first() {return first_;} + first_const_reference first() const {return first_;} + + second_reference second() {return second_;} + second_const_reference second() const {return second_;} + + void swap(::boost::compressed_pair& y) + { + cp_swap(first_, y.first()); + cp_swap(second_, y.second()); + } + private: + first_type first_; + second_type second_; + }; + + + + template + class compressed_pair_imp + : protected ::boost::remove_cv::type + { + public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair_imp() {} + + compressed_pair_imp(first_param_type x, second_param_type y) + : first_type(x), second_(y) {} + + compressed_pair_imp(first_param_type x) + : first_type(x) {} + + compressed_pair_imp(second_param_type y) + : second_(y) {} + + first_reference first() {return *this;} + first_const_reference first() const {return *this;} + + second_reference second() {return second_;} + second_const_reference second() const {return second_;} + + void swap(::boost::compressed_pair& y) + { + + cp_swap(second_, y.second()); + } + private: + second_type second_; + }; + + + + template + class compressed_pair_imp + : protected ::boost::remove_cv::type + { + public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair_imp() {} + + compressed_pair_imp(first_param_type x, second_param_type y) + : second_type(y), first_(x) {} + + compressed_pair_imp(first_param_type x) + : first_(x) {} + + compressed_pair_imp(second_param_type y) + : second_type(y) {} + + first_reference first() {return first_;} + first_const_reference first() const {return first_;} + + second_reference second() {return *this;} + second_const_reference second() const {return *this;} + + void swap(::boost::compressed_pair& y) + { + + cp_swap(first_, y.first()); + } + + private: + first_type first_; + }; + + + + template + class compressed_pair_imp + : protected ::boost::remove_cv::type, + protected ::boost::remove_cv::type + { + public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair_imp() {} + + compressed_pair_imp(first_param_type x, second_param_type y) + : first_type(x), second_type(y) {} + + compressed_pair_imp(first_param_type x) + : first_type(x) {} + + compressed_pair_imp(second_param_type y) + : second_type(y) {} + + first_reference first() {return *this;} + first_const_reference first() const {return *this;} + + second_reference second() {return *this;} + second_const_reference second() const {return *this;} + + + void swap(::boost::compressed_pair&) {} + }; +# 265 "/usr/include/boost-1_42/boost/detail/compressed_pair.hpp" + template + class compressed_pair_imp + : protected ::boost::remove_cv::type + { + public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair_imp() {} + + compressed_pair_imp(first_param_type x, second_param_type y) + : first_type(x), m_second(y) {} + + compressed_pair_imp(first_param_type x) + : first_type(x), m_second(x) {} + + first_reference first() {return *this;} + first_const_reference first() const {return *this;} + + second_reference second() {return m_second;} + second_const_reference second() const {return m_second;} + + void swap(::boost::compressed_pair&) {} + private: + T2 m_second; + }; + + + + template + class compressed_pair_imp + { + public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair_imp() {} + + compressed_pair_imp(first_param_type x, second_param_type y) + : first_(x), second_(y) {} + + compressed_pair_imp(first_param_type x) + : first_(x), second_(x) {} + + first_reference first() {return first_;} + first_const_reference first() const {return first_;} + + second_reference second() {return second_;} + second_const_reference second() const {return second_;} + + void swap(::boost::compressed_pair& y) + { + cp_swap(first_, y.first()); + cp_swap(second_, y.second()); + } + private: + first_type first_; + second_type second_; + }; + +} + +template +class compressed_pair + : private ::boost::details::compressed_pair_imp::type, typename remove_cv::type>::value, + ::boost::is_empty::value, + ::boost::is_empty::value>::value> +{ +private: + typedef details::compressed_pair_imp::type, typename remove_cv::type>::value, + ::boost::is_empty::value, + ::boost::is_empty::value>::value> base; +public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair() : base() {} + compressed_pair(first_param_type x, second_param_type y) : base(x, y) {} + explicit compressed_pair(first_param_type x) : base(x) {} + explicit compressed_pair(second_param_type y) : base(y) {} + + first_reference first() {return base::first();} + first_const_reference first() const {return base::first();} + + second_reference second() {return base::second();} + second_const_reference second() const {return base::second();} + + void swap(compressed_pair& y) { base::swap(y); } +}; + + + + +template +class compressed_pair + : private details::compressed_pair_imp::type, typename remove_cv::type>::value, + ::boost::is_empty::value, + ::boost::is_empty::value>::value> +{ +private: + typedef details::compressed_pair_imp::type, typename remove_cv::type>::value, + ::boost::is_empty::value, + ::boost::is_empty::value>::value> base; +public: + typedef T first_type; + typedef T second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair() : base() {} + compressed_pair(first_param_type x, second_param_type y) : base(x, y) {} + + explicit + + compressed_pair(first_param_type x) : base(x) {} + + first_reference first() {return base::first();} + first_const_reference first() const {return base::first();} + + second_reference second() {return base::second();} + second_const_reference second() const {return base::second();} + + void swap(::boost::compressed_pair& y) { base::swap(y); } +}; + +template +inline +void +swap(compressed_pair& x, compressed_pair& y) +{ + x.swap(y); +} + +} +# 22 "/usr/include/boost-1_42/boost/compressed_pair.hpp" 2 +# 33 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/mpl/apply.hpp" 1 +# 38 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 + + + + + + + +namespace boost { namespace python { namespace detail { + +template +inline PyObject* get(mpl::int_, PyObject* const& args_) +{ + return (((PyTupleObject *)(args_))->ob_item[BOOST_PP_ITERATION_0]); +} + +inline unsigned arity(PyObject* const& args_) +{ + return (((PyVarObject*)(args_))->ob_size); +} + + + + +typedef int void_result_to_python; + + + + +template +struct select_result_converter + : mpl::eval_if< + is_same + , mpl::identity + , mpl::apply1 + > +{ +}; + +template +inline ResultConverter create_result_converter( + ArgPackage const& args_ + , ResultConverter* + , converter::context_result_converter* +) +{ + return ResultConverter(args_); +} + +template +inline ResultConverter create_result_converter( + ArgPackage const& + , ResultConverter* + , ... +) +{ + return ResultConverter(); +} + + +template +struct converter_target_type +{ + static PyTypeObject const *get_pytype() + { + return create_result_converter((PyObject*)0, (ResultConverter *)0, (ResultConverter *)0).get_pytype(); + } +}; + +template < > +struct converter_target_type +{ + static PyTypeObject const *get_pytype() + { + return 0; + } +}; + + + +template struct caller_arity; + +template +struct caller; +# 134 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 47 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 1 +# 188 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" +template <> +struct caller_arity<0> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + + PyObject* operator()(PyObject* args_, PyObject*) + + + + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + + argument_package inner_args(args_); +# 215 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" + if (!m_data.second().precall(inner_args)) + return 0; + + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + + ); + + return m_data.second().postcall(inner_args, result); + } + + static unsigned min_arity() { return 0; } + + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + + + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + + + + + return res; + } + private: + compressed_pair m_data; + }; +}; +# 48 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 1 +# 188 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" +template <> +struct caller_arity<1> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + + PyObject* operator()(PyObject* args_, PyObject*) + + + + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + + argument_package inner_args(args_); + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; +# 212 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 + + + + if (!m_data.second().precall(inner_args)) + return 0; + + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 + ); + + return m_data.second().postcall(inner_args, result); + } + + static unsigned min_arity() { return 1; } + + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + + + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + + + + + return res; + } + private: + compressed_pair m_data; + }; +}; +# 53 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 1 +# 188 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" +template <> +struct caller_arity<2> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + + PyObject* operator()(PyObject* args_, PyObject*) + + + + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + + argument_package inner_args(args_); + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + + + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; +# 212 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 + + + + if (!m_data.second().precall(inner_args)) + return 0; + + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 + ); + + return m_data.second().postcall(inner_args, result); + } + + static unsigned min_arity() { return 2; } + + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + + + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + + + + + return res; + } + private: + compressed_pair m_data; + }; +}; +# 58 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 1 +# 188 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" +template <> +struct caller_arity<3> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + + PyObject* operator()(PyObject* args_, PyObject*) + + + + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + + argument_package inner_args(args_); + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + + + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + + + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; +# 212 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 + + + + if (!m_data.second().precall(inner_args)) + return 0; + + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 + ); + + return m_data.second().postcall(inner_args, result); + } + + static unsigned min_arity() { return 3; } + + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + + + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + + + + + return res; + } + private: + compressed_pair m_data; + }; +}; +# 63 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 1 +# 188 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" +template <> +struct caller_arity<4> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + + PyObject* operator()(PyObject* args_, PyObject*) + + + + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + + argument_package inner_args(args_); + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + + + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + + + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + + + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; +# 212 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 + + + + if (!m_data.second().precall(inner_args)) + return 0; + + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 + ); + + return m_data.second().postcall(inner_args, result); + } + + static unsigned min_arity() { return 4; } + + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + + + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + + + + + return res; + } + private: + compressed_pair m_data; + }; +}; +# 68 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 1 +# 188 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" +template <> +struct caller_arity<5> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + + PyObject* operator()(PyObject* args_, PyObject*) + + + + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + + argument_package inner_args(args_); + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + + + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + + + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + + + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + + + typedef typename mpl::next< arg_iter3 >::type arg_iter4; typedef arg_from_python c_t4; c_t4 c4(get(mpl::int_<4>(), inner_args)); if (!c4.convertible()) return 0; +# 212 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 + + + + if (!m_data.second().precall(inner_args)) + return 0; + + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 , c4 + ); + + return m_data.second().postcall(inner_args, result); + } + + static unsigned min_arity() { return 5; } + + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + + + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + + + + + return res; + } + private: + compressed_pair m_data; + }; +}; +# 73 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 1 +# 188 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" +template <> +struct caller_arity<6> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + + PyObject* operator()(PyObject* args_, PyObject*) + + + + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + + argument_package inner_args(args_); + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + + + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + + + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + + + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + + + typedef typename mpl::next< arg_iter3 >::type arg_iter4; typedef arg_from_python c_t4; c_t4 c4(get(mpl::int_<4>(), inner_args)); if (!c4.convertible()) return 0; + + + typedef typename mpl::next< arg_iter4 >::type arg_iter5; typedef arg_from_python c_t5; c_t5 c5(get(mpl::int_<5>(), inner_args)); if (!c5.convertible()) return 0; +# 212 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 + + + + if (!m_data.second().precall(inner_args)) + return 0; + + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 , c4 , c5 + ); + + return m_data.second().postcall(inner_args, result); + } + + static unsigned min_arity() { return 6; } + + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + + + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + + + + + return res; + } + private: + compressed_pair m_data; + }; +}; +# 78 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 1 +# 188 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" +template <> +struct caller_arity<7> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + + PyObject* operator()(PyObject* args_, PyObject*) + + + + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + + argument_package inner_args(args_); + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + + + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + + + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + + + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + + + typedef typename mpl::next< arg_iter3 >::type arg_iter4; typedef arg_from_python c_t4; c_t4 c4(get(mpl::int_<4>(), inner_args)); if (!c4.convertible()) return 0; + + + typedef typename mpl::next< arg_iter4 >::type arg_iter5; typedef arg_from_python c_t5; c_t5 c5(get(mpl::int_<5>(), inner_args)); if (!c5.convertible()) return 0; + + + typedef typename mpl::next< arg_iter5 >::type arg_iter6; typedef arg_from_python c_t6; c_t6 c6(get(mpl::int_<6>(), inner_args)); if (!c6.convertible()) return 0; +# 212 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 + + + + if (!m_data.second().precall(inner_args)) + return 0; + + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 , c4 , c5 , c6 + ); + + return m_data.second().postcall(inner_args, result); + } + + static unsigned min_arity() { return 7; } + + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + + + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + + + + + return res; + } + private: + compressed_pair m_data; + }; +}; +# 83 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 1 +# 188 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" +template <> +struct caller_arity<8> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + + PyObject* operator()(PyObject* args_, PyObject*) + + + + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + + argument_package inner_args(args_); + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + + + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + + + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + + + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + + + typedef typename mpl::next< arg_iter3 >::type arg_iter4; typedef arg_from_python c_t4; c_t4 c4(get(mpl::int_<4>(), inner_args)); if (!c4.convertible()) return 0; + + + typedef typename mpl::next< arg_iter4 >::type arg_iter5; typedef arg_from_python c_t5; c_t5 c5(get(mpl::int_<5>(), inner_args)); if (!c5.convertible()) return 0; + + + typedef typename mpl::next< arg_iter5 >::type arg_iter6; typedef arg_from_python c_t6; c_t6 c6(get(mpl::int_<6>(), inner_args)); if (!c6.convertible()) return 0; + + + typedef typename mpl::next< arg_iter6 >::type arg_iter7; typedef arg_from_python c_t7; c_t7 c7(get(mpl::int_<7>(), inner_args)); if (!c7.convertible()) return 0; +# 212 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 + + + + if (!m_data.second().precall(inner_args)) + return 0; + + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 , c4 , c5 , c6 , c7 + ); + + return m_data.second().postcall(inner_args, result); + } + + static unsigned min_arity() { return 8; } + + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + + + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + + + + + return res; + } + private: + compressed_pair m_data; + }; +}; +# 88 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 1 +# 188 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" +template <> +struct caller_arity<9> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + + PyObject* operator()(PyObject* args_, PyObject*) + + + + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + + argument_package inner_args(args_); + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + + + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + + + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + + + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + + + typedef typename mpl::next< arg_iter3 >::type arg_iter4; typedef arg_from_python c_t4; c_t4 c4(get(mpl::int_<4>(), inner_args)); if (!c4.convertible()) return 0; + + + typedef typename mpl::next< arg_iter4 >::type arg_iter5; typedef arg_from_python c_t5; c_t5 c5(get(mpl::int_<5>(), inner_args)); if (!c5.convertible()) return 0; + + + typedef typename mpl::next< arg_iter5 >::type arg_iter6; typedef arg_from_python c_t6; c_t6 c6(get(mpl::int_<6>(), inner_args)); if (!c6.convertible()) return 0; + + + typedef typename mpl::next< arg_iter6 >::type arg_iter7; typedef arg_from_python c_t7; c_t7 c7(get(mpl::int_<7>(), inner_args)); if (!c7.convertible()) return 0; + + + typedef typename mpl::next< arg_iter7 >::type arg_iter8; typedef arg_from_python c_t8; c_t8 c8(get(mpl::int_<8>(), inner_args)); if (!c8.convertible()) return 0; +# 212 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 + + + + if (!m_data.second().precall(inner_args)) + return 0; + + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 , c4 , c5 , c6 , c7 , c8 + ); + + return m_data.second().postcall(inner_args, result); + } + + static unsigned min_arity() { return 9; } + + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + + + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + + + + + return res; + } + private: + compressed_pair m_data; + }; +}; +# 93 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 1 +# 188 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" +template <> +struct caller_arity<10> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + + PyObject* operator()(PyObject* args_, PyObject*) + + + + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + + argument_package inner_args(args_); + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + + + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + + + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + + + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + + + typedef typename mpl::next< arg_iter3 >::type arg_iter4; typedef arg_from_python c_t4; c_t4 c4(get(mpl::int_<4>(), inner_args)); if (!c4.convertible()) return 0; + + + typedef typename mpl::next< arg_iter4 >::type arg_iter5; typedef arg_from_python c_t5; c_t5 c5(get(mpl::int_<5>(), inner_args)); if (!c5.convertible()) return 0; + + + typedef typename mpl::next< arg_iter5 >::type arg_iter6; typedef arg_from_python c_t6; c_t6 c6(get(mpl::int_<6>(), inner_args)); if (!c6.convertible()) return 0; + + + typedef typename mpl::next< arg_iter6 >::type arg_iter7; typedef arg_from_python c_t7; c_t7 c7(get(mpl::int_<7>(), inner_args)); if (!c7.convertible()) return 0; + + + typedef typename mpl::next< arg_iter7 >::type arg_iter8; typedef arg_from_python c_t8; c_t8 c8(get(mpl::int_<8>(), inner_args)); if (!c8.convertible()) return 0; + + + typedef typename mpl::next< arg_iter8 >::type arg_iter9; typedef arg_from_python c_t9; c_t9 c9(get(mpl::int_<9>(), inner_args)); if (!c9.convertible()) return 0; +# 212 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 + + + + if (!m_data.second().precall(inner_args)) + return 0; + + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 , c4 , c5 , c6 , c7 , c8 , c9 + ); + + return m_data.second().postcall(inner_args, result); + } + + static unsigned min_arity() { return 10; } + + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + + + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + + + + + return res; + } + private: + compressed_pair m_data; + }; +}; +# 98 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 1 +# 188 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" +template <> +struct caller_arity<11> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + + PyObject* operator()(PyObject* args_, PyObject*) + + + + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + + argument_package inner_args(args_); + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + + + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + + + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + + + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + + + typedef typename mpl::next< arg_iter3 >::type arg_iter4; typedef arg_from_python c_t4; c_t4 c4(get(mpl::int_<4>(), inner_args)); if (!c4.convertible()) return 0; + + + typedef typename mpl::next< arg_iter4 >::type arg_iter5; typedef arg_from_python c_t5; c_t5 c5(get(mpl::int_<5>(), inner_args)); if (!c5.convertible()) return 0; + + + typedef typename mpl::next< arg_iter5 >::type arg_iter6; typedef arg_from_python c_t6; c_t6 c6(get(mpl::int_<6>(), inner_args)); if (!c6.convertible()) return 0; + + + typedef typename mpl::next< arg_iter6 >::type arg_iter7; typedef arg_from_python c_t7; c_t7 c7(get(mpl::int_<7>(), inner_args)); if (!c7.convertible()) return 0; + + + typedef typename mpl::next< arg_iter7 >::type arg_iter8; typedef arg_from_python c_t8; c_t8 c8(get(mpl::int_<8>(), inner_args)); if (!c8.convertible()) return 0; + + + typedef typename mpl::next< arg_iter8 >::type arg_iter9; typedef arg_from_python c_t9; c_t9 c9(get(mpl::int_<9>(), inner_args)); if (!c9.convertible()) return 0; + + + typedef typename mpl::next< arg_iter9 >::type arg_iter10; typedef arg_from_python c_t10; c_t10 c10(get(mpl::int_<10>(), inner_args)); if (!c10.convertible()) return 0; +# 212 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 + + + + if (!m_data.second().precall(inner_args)) + return 0; + + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 , c4 , c5 , c6 , c7 , c8 , c9 , c10 + ); + + return m_data.second().postcall(inner_args, result); + } + + static unsigned min_arity() { return 11; } + + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + + + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + + + + + return res; + } + private: + compressed_pair m_data; + }; +}; +# 103 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 1 +# 188 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" +template <> +struct caller_arity<12> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + + PyObject* operator()(PyObject* args_, PyObject*) + + + + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + + argument_package inner_args(args_); + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + + + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + + + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + + + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + + + typedef typename mpl::next< arg_iter3 >::type arg_iter4; typedef arg_from_python c_t4; c_t4 c4(get(mpl::int_<4>(), inner_args)); if (!c4.convertible()) return 0; + + + typedef typename mpl::next< arg_iter4 >::type arg_iter5; typedef arg_from_python c_t5; c_t5 c5(get(mpl::int_<5>(), inner_args)); if (!c5.convertible()) return 0; + + + typedef typename mpl::next< arg_iter5 >::type arg_iter6; typedef arg_from_python c_t6; c_t6 c6(get(mpl::int_<6>(), inner_args)); if (!c6.convertible()) return 0; + + + typedef typename mpl::next< arg_iter6 >::type arg_iter7; typedef arg_from_python c_t7; c_t7 c7(get(mpl::int_<7>(), inner_args)); if (!c7.convertible()) return 0; + + + typedef typename mpl::next< arg_iter7 >::type arg_iter8; typedef arg_from_python c_t8; c_t8 c8(get(mpl::int_<8>(), inner_args)); if (!c8.convertible()) return 0; + + + typedef typename mpl::next< arg_iter8 >::type arg_iter9; typedef arg_from_python c_t9; c_t9 c9(get(mpl::int_<9>(), inner_args)); if (!c9.convertible()) return 0; + + + typedef typename mpl::next< arg_iter9 >::type arg_iter10; typedef arg_from_python c_t10; c_t10 c10(get(mpl::int_<10>(), inner_args)); if (!c10.convertible()) return 0; + + + typedef typename mpl::next< arg_iter10 >::type arg_iter11; typedef arg_from_python c_t11; c_t11 c11(get(mpl::int_<11>(), inner_args)); if (!c11.convertible()) return 0; +# 212 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 + + + + if (!m_data.second().precall(inner_args)) + return 0; + + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 , c4 , c5 , c6 , c7 , c8 , c9 , c10 , c11 + ); + + return m_data.second().postcall(inner_args, result); + } + + static unsigned min_arity() { return 12; } + + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + + + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + + + + + return res; + } + private: + compressed_pair m_data; + }; +}; +# 108 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 1 +# 188 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" +template <> +struct caller_arity<13> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + + PyObject* operator()(PyObject* args_, PyObject*) + + + + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + + argument_package inner_args(args_); + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + + + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + + + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + + + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + + + typedef typename mpl::next< arg_iter3 >::type arg_iter4; typedef arg_from_python c_t4; c_t4 c4(get(mpl::int_<4>(), inner_args)); if (!c4.convertible()) return 0; + + + typedef typename mpl::next< arg_iter4 >::type arg_iter5; typedef arg_from_python c_t5; c_t5 c5(get(mpl::int_<5>(), inner_args)); if (!c5.convertible()) return 0; + + + typedef typename mpl::next< arg_iter5 >::type arg_iter6; typedef arg_from_python c_t6; c_t6 c6(get(mpl::int_<6>(), inner_args)); if (!c6.convertible()) return 0; + + + typedef typename mpl::next< arg_iter6 >::type arg_iter7; typedef arg_from_python c_t7; c_t7 c7(get(mpl::int_<7>(), inner_args)); if (!c7.convertible()) return 0; + + + typedef typename mpl::next< arg_iter7 >::type arg_iter8; typedef arg_from_python c_t8; c_t8 c8(get(mpl::int_<8>(), inner_args)); if (!c8.convertible()) return 0; + + + typedef typename mpl::next< arg_iter8 >::type arg_iter9; typedef arg_from_python c_t9; c_t9 c9(get(mpl::int_<9>(), inner_args)); if (!c9.convertible()) return 0; + + + typedef typename mpl::next< arg_iter9 >::type arg_iter10; typedef arg_from_python c_t10; c_t10 c10(get(mpl::int_<10>(), inner_args)); if (!c10.convertible()) return 0; + + + typedef typename mpl::next< arg_iter10 >::type arg_iter11; typedef arg_from_python c_t11; c_t11 c11(get(mpl::int_<11>(), inner_args)); if (!c11.convertible()) return 0; + + + typedef typename mpl::next< arg_iter11 >::type arg_iter12; typedef arg_from_python c_t12; c_t12 c12(get(mpl::int_<12>(), inner_args)); if (!c12.convertible()) return 0; +# 212 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 + + + + if (!m_data.second().precall(inner_args)) + return 0; + + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 , c4 , c5 , c6 , c7 , c8 , c9 , c10 , c11 , c12 + ); + + return m_data.second().postcall(inner_args, result); + } + + static unsigned min_arity() { return 13; } + + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + + + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + + + + + return res; + } + private: + compressed_pair m_data; + }; +}; +# 113 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 1 +# 188 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" +template <> +struct caller_arity<14> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + + PyObject* operator()(PyObject* args_, PyObject*) + + + + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + + argument_package inner_args(args_); + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + + + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + + + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + + + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + + + typedef typename mpl::next< arg_iter3 >::type arg_iter4; typedef arg_from_python c_t4; c_t4 c4(get(mpl::int_<4>(), inner_args)); if (!c4.convertible()) return 0; + + + typedef typename mpl::next< arg_iter4 >::type arg_iter5; typedef arg_from_python c_t5; c_t5 c5(get(mpl::int_<5>(), inner_args)); if (!c5.convertible()) return 0; + + + typedef typename mpl::next< arg_iter5 >::type arg_iter6; typedef arg_from_python c_t6; c_t6 c6(get(mpl::int_<6>(), inner_args)); if (!c6.convertible()) return 0; + + + typedef typename mpl::next< arg_iter6 >::type arg_iter7; typedef arg_from_python c_t7; c_t7 c7(get(mpl::int_<7>(), inner_args)); if (!c7.convertible()) return 0; + + + typedef typename mpl::next< arg_iter7 >::type arg_iter8; typedef arg_from_python c_t8; c_t8 c8(get(mpl::int_<8>(), inner_args)); if (!c8.convertible()) return 0; + + + typedef typename mpl::next< arg_iter8 >::type arg_iter9; typedef arg_from_python c_t9; c_t9 c9(get(mpl::int_<9>(), inner_args)); if (!c9.convertible()) return 0; + + + typedef typename mpl::next< arg_iter9 >::type arg_iter10; typedef arg_from_python c_t10; c_t10 c10(get(mpl::int_<10>(), inner_args)); if (!c10.convertible()) return 0; + + + typedef typename mpl::next< arg_iter10 >::type arg_iter11; typedef arg_from_python c_t11; c_t11 c11(get(mpl::int_<11>(), inner_args)); if (!c11.convertible()) return 0; + + + typedef typename mpl::next< arg_iter11 >::type arg_iter12; typedef arg_from_python c_t12; c_t12 c12(get(mpl::int_<12>(), inner_args)); if (!c12.convertible()) return 0; + + + typedef typename mpl::next< arg_iter12 >::type arg_iter13; typedef arg_from_python c_t13; c_t13 c13(get(mpl::int_<13>(), inner_args)); if (!c13.convertible()) return 0; +# 212 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 + + + + if (!m_data.second().precall(inner_args)) + return 0; + + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 , c4 , c5 , c6 , c7 , c8 , c9 , c10 , c11 , c12 , c13 + ); + + return m_data.second().postcall(inner_args, result); + } + + static unsigned min_arity() { return 14; } + + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + + + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + + + + + return res; + } + private: + compressed_pair m_data; + }; +}; +# 118 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 1 +# 188 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" +template <> +struct caller_arity<15> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + + PyObject* operator()(PyObject* args_, PyObject*) + + + + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + + argument_package inner_args(args_); + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + + + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + + + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + + + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + + + typedef typename mpl::next< arg_iter3 >::type arg_iter4; typedef arg_from_python c_t4; c_t4 c4(get(mpl::int_<4>(), inner_args)); if (!c4.convertible()) return 0; + + + typedef typename mpl::next< arg_iter4 >::type arg_iter5; typedef arg_from_python c_t5; c_t5 c5(get(mpl::int_<5>(), inner_args)); if (!c5.convertible()) return 0; + + + typedef typename mpl::next< arg_iter5 >::type arg_iter6; typedef arg_from_python c_t6; c_t6 c6(get(mpl::int_<6>(), inner_args)); if (!c6.convertible()) return 0; + + + typedef typename mpl::next< arg_iter6 >::type arg_iter7; typedef arg_from_python c_t7; c_t7 c7(get(mpl::int_<7>(), inner_args)); if (!c7.convertible()) return 0; + + + typedef typename mpl::next< arg_iter7 >::type arg_iter8; typedef arg_from_python c_t8; c_t8 c8(get(mpl::int_<8>(), inner_args)); if (!c8.convertible()) return 0; + + + typedef typename mpl::next< arg_iter8 >::type arg_iter9; typedef arg_from_python c_t9; c_t9 c9(get(mpl::int_<9>(), inner_args)); if (!c9.convertible()) return 0; + + + typedef typename mpl::next< arg_iter9 >::type arg_iter10; typedef arg_from_python c_t10; c_t10 c10(get(mpl::int_<10>(), inner_args)); if (!c10.convertible()) return 0; + + + typedef typename mpl::next< arg_iter10 >::type arg_iter11; typedef arg_from_python c_t11; c_t11 c11(get(mpl::int_<11>(), inner_args)); if (!c11.convertible()) return 0; + + + typedef typename mpl::next< arg_iter11 >::type arg_iter12; typedef arg_from_python c_t12; c_t12 c12(get(mpl::int_<12>(), inner_args)); if (!c12.convertible()) return 0; + + + typedef typename mpl::next< arg_iter12 >::type arg_iter13; typedef arg_from_python c_t13; c_t13 c13(get(mpl::int_<13>(), inner_args)); if (!c13.convertible()) return 0; + + + typedef typename mpl::next< arg_iter13 >::type arg_iter14; typedef arg_from_python c_t14; c_t14 c14(get(mpl::int_<14>(), inner_args)); if (!c14.convertible()) return 0; +# 212 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 + + + + if (!m_data.second().precall(inner_args)) + return 0; + + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 , c4 , c5 , c6 , c7 , c8 , c9 , c10 , c11 , c12 , c13 , c14 + ); + + return m_data.second().postcall(inner_args, result); + } + + static unsigned min_arity() { return 15; } + + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + + + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + + + + + return res; + } + private: + compressed_pair m_data; + }; +}; +# 123 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 1 +# 188 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" +template <> +struct caller_arity<16> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + + PyObject* operator()(PyObject* args_, PyObject*) + + + + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + + argument_package inner_args(args_); + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + + + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + + + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + + + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + + + typedef typename mpl::next< arg_iter3 >::type arg_iter4; typedef arg_from_python c_t4; c_t4 c4(get(mpl::int_<4>(), inner_args)); if (!c4.convertible()) return 0; + + + typedef typename mpl::next< arg_iter4 >::type arg_iter5; typedef arg_from_python c_t5; c_t5 c5(get(mpl::int_<5>(), inner_args)); if (!c5.convertible()) return 0; + + + typedef typename mpl::next< arg_iter5 >::type arg_iter6; typedef arg_from_python c_t6; c_t6 c6(get(mpl::int_<6>(), inner_args)); if (!c6.convertible()) return 0; + + + typedef typename mpl::next< arg_iter6 >::type arg_iter7; typedef arg_from_python c_t7; c_t7 c7(get(mpl::int_<7>(), inner_args)); if (!c7.convertible()) return 0; + + + typedef typename mpl::next< arg_iter7 >::type arg_iter8; typedef arg_from_python c_t8; c_t8 c8(get(mpl::int_<8>(), inner_args)); if (!c8.convertible()) return 0; + + + typedef typename mpl::next< arg_iter8 >::type arg_iter9; typedef arg_from_python c_t9; c_t9 c9(get(mpl::int_<9>(), inner_args)); if (!c9.convertible()) return 0; + + + typedef typename mpl::next< arg_iter9 >::type arg_iter10; typedef arg_from_python c_t10; c_t10 c10(get(mpl::int_<10>(), inner_args)); if (!c10.convertible()) return 0; + + + typedef typename mpl::next< arg_iter10 >::type arg_iter11; typedef arg_from_python c_t11; c_t11 c11(get(mpl::int_<11>(), inner_args)); if (!c11.convertible()) return 0; + + + typedef typename mpl::next< arg_iter11 >::type arg_iter12; typedef arg_from_python c_t12; c_t12 c12(get(mpl::int_<12>(), inner_args)); if (!c12.convertible()) return 0; + + + typedef typename mpl::next< arg_iter12 >::type arg_iter13; typedef arg_from_python c_t13; c_t13 c13(get(mpl::int_<13>(), inner_args)); if (!c13.convertible()) return 0; + + + typedef typename mpl::next< arg_iter13 >::type arg_iter14; typedef arg_from_python c_t14; c_t14 c14(get(mpl::int_<14>(), inner_args)); if (!c14.convertible()) return 0; + + + typedef typename mpl::next< arg_iter14 >::type arg_iter15; typedef arg_from_python c_t15; c_t15 c15(get(mpl::int_<15>(), inner_args)); if (!c15.convertible()) return 0; +# 212 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 + + + + if (!m_data.second().precall(inner_args)) + return 0; + + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 , c4 , c5 , c6 , c7 , c8 , c9 , c10 , c11 , c12 , c13 , c14 , c15 + ); + + return m_data.second().postcall(inner_args, result); + } + + static unsigned min_arity() { return 16; } + + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + + + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + + + + + return res; + } + private: + compressed_pair m_data; + }; +}; +# 128 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 135 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 2 + + + + + + +template +struct caller_base_select +{ + enum { arity = mpl::size::value - 1 }; + typedef typename caller_arity::template impl type; +}; +# 166 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" +template +struct caller + : caller_base_select::type +{ + typedef typename caller_base_select< + F,CallPolicies,Sig + >::type base; + + typedef PyObject* result_type; + + caller(F f, CallPolicies p) : base(f,p) {} + +}; + +}}} +# 9 "/usr/include/boost-1_42/boost/python/object/function_handle.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/default_call_policies.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/python/default_call_policies.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/front.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/front.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/front_impl.hpp" 1 +# 22 "/usr/include/boost-1_42/boost/mpl/aux_/front_impl.hpp" +namespace boost { namespace mpl { + + + + +template< typename Tag > +struct front_impl +{ + template< typename Sequence > struct apply + { + typedef typename begin::type iter_; + typedef typename deref::type type; + }; +}; + + template<> struct front_impl {}; + +}} +# 19 "/usr/include/boost-1_42/boost/mpl/front.hpp" 2 + + + + +namespace boost { namespace mpl { + +template< + typename Sequence = na + > +struct front + : front_impl< typename sequence_tag::type > + ::template apply< Sequence > +{ + +}; + +template<> struct front< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : front< T1 > { }; }; template< typename Tag > struct lambda< front< na > , Tag , int_<-1> > { typedef false_ is_le; typedef front< na > result_; typedef front< na > type; }; namespace aux { template< typename T1 > struct template_arity< front< T1 > > : int_<1> { }; template<> struct template_arity< front< na > > : int_<-1> { }; } + +}} +# 17 "/usr/include/boost-1_42/boost/python/default_call_policies.hpp" 2 + +namespace boost { namespace python { + +template struct to_python_value; + +namespace detail +{ + + template struct specify_a_return_value_policy_to_wrap_functions_returning + + {} + + ; +} + +struct default_result_converter; + +struct default_call_policies +{ + + + template + static bool precall(ArgumentPackage const&) + { + return true; + } + + + template + static PyObject* postcall(ArgumentPackage const&, PyObject* result) + { + return result; + } + + typedef default_result_converter result_converter; + typedef PyObject* argument_package; + + template + struct extract_return_type : mpl::front + { + }; + +}; + +struct default_result_converter +{ + template + struct apply + { + typedef typename mpl::if_< + mpl::or_, is_reference > + , detail::specify_a_return_value_policy_to_wrap_functions_returning + , boost::python::to_python_value< + typename detail::value_arg::type + > + >::type type; + }; +}; + + +template <> +struct default_result_converter::apply +{ + typedef boost::python::to_python_value type; +}; + +template <> +struct default_result_converter::apply +{ + typedef boost::python::to_python_value type; +}; + +}} +# 10 "/usr/include/boost-1_42/boost/python/object/function_handle.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/object/py_function.hpp" 1 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/signature.hpp" 1 +# 9 "/usr/include/boost-1_42/boost/python/object/py_function.hpp" 2 + + + + +namespace boost { namespace python { namespace objects { + + + + + + +struct py_function_impl_base +{ + virtual ~py_function_impl_base(); + virtual PyObject* operator()(PyObject*, PyObject*) = 0; + virtual unsigned min_arity() const = 0; + virtual unsigned max_arity() const; + virtual python::detail::py_func_sig_info signature() const = 0; +}; + +template +struct caller_py_function_impl : py_function_impl_base +{ + caller_py_function_impl(Caller const& caller) + : m_caller(caller) + {} + + PyObject* operator()(PyObject* args, PyObject* kw) + { + return m_caller(args, kw); + } + + virtual unsigned min_arity() const + { + return m_caller.min_arity(); + } + + virtual python::detail::py_func_sig_info signature() const + { + return m_caller.signature(); + } + + private: + Caller m_caller; +}; + +template +struct signature_py_function_impl : py_function_impl_base +{ + signature_py_function_impl(Caller const& caller) + : m_caller(caller) + {} + + PyObject* operator()(PyObject* args, PyObject* kw) + { + return m_caller(args, kw); + } + + virtual unsigned min_arity() const + { + return mpl::size::value - 1; + } + + virtual python::detail::py_func_sig_info signature() const + { + python::detail::signature_element const* sig = python::detail::signature::elements(); + python::detail::py_func_sig_info res = {sig, sig}; + return res; + } + + private: + Caller m_caller; +}; + +template +struct full_py_function_impl : py_function_impl_base +{ + full_py_function_impl(Caller const& caller, unsigned min_arity, unsigned max_arity) + : m_caller(caller) + , m_min_arity(min_arity) + , m_max_arity(max_arity > min_arity ? max_arity : min_arity) + {} + + PyObject* operator()(PyObject* args, PyObject* kw) + { + return m_caller(args, kw); + } + + virtual unsigned min_arity() const + { + return m_min_arity; + } + + virtual unsigned max_arity() const + { + return m_max_arity; + } + + virtual python::detail::py_func_sig_info signature() const + { + python::detail::signature_element const* sig = python::detail::signature::elements(); + python::detail::py_func_sig_info res = {sig, sig}; + return res; + } + + private: + Caller m_caller; + unsigned m_min_arity; + unsigned m_max_arity; +}; + +struct py_function +{ + template + py_function(Caller const& caller) + : m_impl(new caller_py_function_impl(caller)) + {} + + template + py_function(Caller const& caller, Sig) + : m_impl(new signature_py_function_impl(caller)) + {} + + template + py_function(Caller const& caller, Sig, int min_arity, int max_arity = 0) + : m_impl(new full_py_function_impl(caller, min_arity, max_arity)) + {} + + py_function(py_function const& rhs) + : m_impl(rhs.m_impl) + {} + + PyObject* operator()(PyObject* args, PyObject* kw) const + { + return (*m_impl)(args, kw); + } + + unsigned min_arity() const + { + return m_impl->min_arity(); + } + + unsigned max_arity() const + { + return m_impl->max_arity(); + } + + python::detail::signature_element const* signature() const + { + return m_impl->signature().signature; + } + + python::detail::signature_element const& get_return_type() const + { + return *m_impl->signature().ret; + } + + private: + mutable std::auto_ptr m_impl; +}; + +}}} +# 11 "/usr/include/boost-1_42/boost/python/object/function_handle.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/python/signature.hpp" +namespace boost { namespace python { namespace detail { + + + +template +struct most_derived +{ + typedef typename mpl::if_< + is_convertible + , C1 + , C2 + >::type type; +}; +# 106 "/usr/include/boost-1_42/boost/python/signature.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 47 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT > +inline mpl::vector1< + RT > +get_signature(RT(*)(), void* = 0) +{ + return mpl::vector1< + RT + >(); +} + + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 45 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT > +inline mpl::vector2< + RT, ClassT& > +get_signature(RT(ClassT::*)() ) +{ + return mpl::vector2< + RT, ClassT& + >(); +} + +template < + class Target + , class RT + , class ClassT + +> +inline mpl::vector2< + RT + , typename most_derived::type& + +> +get_signature( + RT(ClassT::*)() + , Target* +) +{ + return mpl::vector2< + RT + , typename most_derived::type& + + >(); +} +# 46 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT > +inline mpl::vector2< + RT, ClassT& > +get_signature(RT(ClassT::*)() const) +{ + return mpl::vector2< + RT, ClassT& + >(); +} + +template < + class Target + , class RT + , class ClassT + +> +inline mpl::vector2< + RT + , typename most_derived::type& + +> +get_signature( + RT(ClassT::*)() const + , Target* +) +{ + return mpl::vector2< + RT + , typename most_derived::type& + + >(); +} +# 51 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT > +inline mpl::vector2< + RT, ClassT& > +get_signature(RT(ClassT::*)() volatile) +{ + return mpl::vector2< + RT, ClassT& + >(); +} + +template < + class Target + , class RT + , class ClassT + +> +inline mpl::vector2< + RT + , typename most_derived::type& + +> +get_signature( + RT(ClassT::*)() volatile + , Target* +) +{ + return mpl::vector2< + RT + , typename most_derived::type& + + >(); +} +# 56 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT > +inline mpl::vector2< + RT, ClassT& > +get_signature(RT(ClassT::*)() const volatile) +{ + return mpl::vector2< + RT, ClassT& + >(); +} + +template < + class Target + , class RT + , class ClassT + +> +inline mpl::vector2< + RT + , typename most_derived::type& + +> +get_signature( + RT(ClassT::*)() const volatile + , Target* +) +{ + return mpl::vector2< + RT + , typename most_derived::type& + + >(); +} +# 61 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 139 "/usr/include/boost-1_42/boost/python/signature.hpp" 2 +# 48 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT , class T0> +inline mpl::vector2< + RT , T0> +get_signature(RT(*)( T0), void* = 0) +{ + return mpl::vector2< + RT , T0 + >(); +} + + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 45 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0> +inline mpl::vector3< + RT, ClassT& , T0> +get_signature(RT(ClassT::*)( T0) ) +{ + return mpl::vector3< + RT, ClassT& , T0 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 +> +inline mpl::vector3< + RT + , typename most_derived::type& + , T0 +> +get_signature( + RT(ClassT::*)( T0) + , Target* +) +{ + return mpl::vector3< + RT + , typename most_derived::type& + , T0 + >(); +} +# 46 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0> +inline mpl::vector3< + RT, ClassT& , T0> +get_signature(RT(ClassT::*)( T0) const) +{ + return mpl::vector3< + RT, ClassT& , T0 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 +> +inline mpl::vector3< + RT + , typename most_derived::type& + , T0 +> +get_signature( + RT(ClassT::*)( T0) const + , Target* +) +{ + return mpl::vector3< + RT + , typename most_derived::type& + , T0 + >(); +} +# 51 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0> +inline mpl::vector3< + RT, ClassT& , T0> +get_signature(RT(ClassT::*)( T0) volatile) +{ + return mpl::vector3< + RT, ClassT& , T0 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 +> +inline mpl::vector3< + RT + , typename most_derived::type& + , T0 +> +get_signature( + RT(ClassT::*)( T0) volatile + , Target* +) +{ + return mpl::vector3< + RT + , typename most_derived::type& + , T0 + >(); +} +# 56 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0> +inline mpl::vector3< + RT, ClassT& , T0> +get_signature(RT(ClassT::*)( T0) const volatile) +{ + return mpl::vector3< + RT, ClassT& , T0 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 +> +inline mpl::vector3< + RT + , typename most_derived::type& + , T0 +> +get_signature( + RT(ClassT::*)( T0) const volatile + , Target* +) +{ + return mpl::vector3< + RT + , typename most_derived::type& + , T0 + >(); +} +# 61 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 139 "/usr/include/boost-1_42/boost/python/signature.hpp" 2 +# 53 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT , class T0 , class T1> +inline mpl::vector3< + RT , T0 , T1> +get_signature(RT(*)( T0 , T1), void* = 0) +{ + return mpl::vector3< + RT , T0 , T1 + >(); +} + + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 45 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1> +inline mpl::vector4< + RT, ClassT& , T0 , T1> +get_signature(RT(ClassT::*)( T0 , T1) ) +{ + return mpl::vector4< + RT, ClassT& , T0 , T1 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 +> +inline mpl::vector4< + RT + , typename most_derived::type& + , T0 , T1 +> +get_signature( + RT(ClassT::*)( T0 , T1) + , Target* +) +{ + return mpl::vector4< + RT + , typename most_derived::type& + , T0 , T1 + >(); +} +# 46 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1> +inline mpl::vector4< + RT, ClassT& , T0 , T1> +get_signature(RT(ClassT::*)( T0 , T1) const) +{ + return mpl::vector4< + RT, ClassT& , T0 , T1 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 +> +inline mpl::vector4< + RT + , typename most_derived::type& + , T0 , T1 +> +get_signature( + RT(ClassT::*)( T0 , T1) const + , Target* +) +{ + return mpl::vector4< + RT + , typename most_derived::type& + , T0 , T1 + >(); +} +# 51 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1> +inline mpl::vector4< + RT, ClassT& , T0 , T1> +get_signature(RT(ClassT::*)( T0 , T1) volatile) +{ + return mpl::vector4< + RT, ClassT& , T0 , T1 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 +> +inline mpl::vector4< + RT + , typename most_derived::type& + , T0 , T1 +> +get_signature( + RT(ClassT::*)( T0 , T1) volatile + , Target* +) +{ + return mpl::vector4< + RT + , typename most_derived::type& + , T0 , T1 + >(); +} +# 56 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1> +inline mpl::vector4< + RT, ClassT& , T0 , T1> +get_signature(RT(ClassT::*)( T0 , T1) const volatile) +{ + return mpl::vector4< + RT, ClassT& , T0 , T1 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 +> +inline mpl::vector4< + RT + , typename most_derived::type& + , T0 , T1 +> +get_signature( + RT(ClassT::*)( T0 , T1) const volatile + , Target* +) +{ + return mpl::vector4< + RT + , typename most_derived::type& + , T0 , T1 + >(); +} +# 61 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 139 "/usr/include/boost-1_42/boost/python/signature.hpp" 2 +# 58 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT , class T0 , class T1 , class T2> +inline mpl::vector4< + RT , T0 , T1 , T2> +get_signature(RT(*)( T0 , T1 , T2), void* = 0) +{ + return mpl::vector4< + RT , T0 , T1 , T2 + >(); +} + + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 45 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2> +inline mpl::vector5< + RT, ClassT& , T0 , T1 , T2> +get_signature(RT(ClassT::*)( T0 , T1 , T2) ) +{ + return mpl::vector5< + RT, ClassT& , T0 , T1 , T2 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 +> +inline mpl::vector5< + RT + , typename most_derived::type& + , T0 , T1 , T2 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2) + , Target* +) +{ + return mpl::vector5< + RT + , typename most_derived::type& + , T0 , T1 , T2 + >(); +} +# 46 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2> +inline mpl::vector5< + RT, ClassT& , T0 , T1 , T2> +get_signature(RT(ClassT::*)( T0 , T1 , T2) const) +{ + return mpl::vector5< + RT, ClassT& , T0 , T1 , T2 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 +> +inline mpl::vector5< + RT + , typename most_derived::type& + , T0 , T1 , T2 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2) const + , Target* +) +{ + return mpl::vector5< + RT + , typename most_derived::type& + , T0 , T1 , T2 + >(); +} +# 51 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2> +inline mpl::vector5< + RT, ClassT& , T0 , T1 , T2> +get_signature(RT(ClassT::*)( T0 , T1 , T2) volatile) +{ + return mpl::vector5< + RT, ClassT& , T0 , T1 , T2 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 +> +inline mpl::vector5< + RT + , typename most_derived::type& + , T0 , T1 , T2 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2) volatile + , Target* +) +{ + return mpl::vector5< + RT + , typename most_derived::type& + , T0 , T1 , T2 + >(); +} +# 56 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2> +inline mpl::vector5< + RT, ClassT& , T0 , T1 , T2> +get_signature(RT(ClassT::*)( T0 , T1 , T2) const volatile) +{ + return mpl::vector5< + RT, ClassT& , T0 , T1 , T2 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 +> +inline mpl::vector5< + RT + , typename most_derived::type& + , T0 , T1 , T2 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2) const volatile + , Target* +) +{ + return mpl::vector5< + RT + , typename most_derived::type& + , T0 , T1 , T2 + >(); +} +# 61 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 139 "/usr/include/boost-1_42/boost/python/signature.hpp" 2 +# 63 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT , class T0 , class T1 , class T2 , class T3> +inline mpl::vector5< + RT , T0 , T1 , T2 , T3> +get_signature(RT(*)( T0 , T1 , T2 , T3), void* = 0) +{ + return mpl::vector5< + RT , T0 , T1 , T2 , T3 + >(); +} + + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 45 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3> +inline mpl::vector6< + RT, ClassT& , T0 , T1 , T2 , T3> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3) ) +{ + return mpl::vector6< + RT, ClassT& , T0 , T1 , T2 , T3 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 +> +inline mpl::vector6< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3) + , Target* +) +{ + return mpl::vector6< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 + >(); +} +# 46 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3> +inline mpl::vector6< + RT, ClassT& , T0 , T1 , T2 , T3> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3) const) +{ + return mpl::vector6< + RT, ClassT& , T0 , T1 , T2 , T3 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 +> +inline mpl::vector6< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3) const + , Target* +) +{ + return mpl::vector6< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 + >(); +} +# 51 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3> +inline mpl::vector6< + RT, ClassT& , T0 , T1 , T2 , T3> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3) volatile) +{ + return mpl::vector6< + RT, ClassT& , T0 , T1 , T2 , T3 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 +> +inline mpl::vector6< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3) volatile + , Target* +) +{ + return mpl::vector6< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 + >(); +} +# 56 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3> +inline mpl::vector6< + RT, ClassT& , T0 , T1 , T2 , T3> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3) const volatile) +{ + return mpl::vector6< + RT, ClassT& , T0 , T1 , T2 , T3 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 +> +inline mpl::vector6< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3) const volatile + , Target* +) +{ + return mpl::vector6< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 + >(); +} +# 61 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 139 "/usr/include/boost-1_42/boost/python/signature.hpp" 2 +# 68 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT , class T0 , class T1 , class T2 , class T3 , class T4> +inline mpl::vector6< + RT , T0 , T1 , T2 , T3 , T4> +get_signature(RT(*)( T0 , T1 , T2 , T3 , T4), void* = 0) +{ + return mpl::vector6< + RT , T0 , T1 , T2 , T3 , T4 + >(); +} + + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 45 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4> +inline mpl::vector7< + RT, ClassT& , T0 , T1 , T2 , T3 , T4> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4) ) +{ + return mpl::vector7< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 +> +inline mpl::vector7< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4) + , Target* +) +{ + return mpl::vector7< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 + >(); +} +# 46 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4> +inline mpl::vector7< + RT, ClassT& , T0 , T1 , T2 , T3 , T4> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4) const) +{ + return mpl::vector7< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 +> +inline mpl::vector7< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4) const + , Target* +) +{ + return mpl::vector7< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 + >(); +} +# 51 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4> +inline mpl::vector7< + RT, ClassT& , T0 , T1 , T2 , T3 , T4> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4) volatile) +{ + return mpl::vector7< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 +> +inline mpl::vector7< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4) volatile + , Target* +) +{ + return mpl::vector7< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 + >(); +} +# 56 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4> +inline mpl::vector7< + RT, ClassT& , T0 , T1 , T2 , T3 , T4> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4) const volatile) +{ + return mpl::vector7< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 +> +inline mpl::vector7< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4) const volatile + , Target* +) +{ + return mpl::vector7< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 + >(); +} +# 61 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 139 "/usr/include/boost-1_42/boost/python/signature.hpp" 2 +# 73 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5> +inline mpl::vector7< + RT , T0 , T1 , T2 , T3 , T4 , T5> +get_signature(RT(*)( T0 , T1 , T2 , T3 , T4 , T5), void* = 0) +{ + return mpl::vector7< + RT , T0 , T1 , T2 , T3 , T4 , T5 + >(); +} + + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 45 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5> +inline mpl::vector8< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5) ) +{ + return mpl::vector8< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 +> +inline mpl::vector8< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5) + , Target* +) +{ + return mpl::vector8< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 + >(); +} +# 46 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5> +inline mpl::vector8< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5) const) +{ + return mpl::vector8< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 +> +inline mpl::vector8< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5) const + , Target* +) +{ + return mpl::vector8< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 + >(); +} +# 51 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5> +inline mpl::vector8< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5) volatile) +{ + return mpl::vector8< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 +> +inline mpl::vector8< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5) volatile + , Target* +) +{ + return mpl::vector8< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 + >(); +} +# 56 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5> +inline mpl::vector8< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile) +{ + return mpl::vector8< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 +> +inline mpl::vector8< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile + , Target* +) +{ + return mpl::vector8< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 + >(); +} +# 61 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 139 "/usr/include/boost-1_42/boost/python/signature.hpp" 2 +# 78 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6> +inline mpl::vector8< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6> +get_signature(RT(*)( T0 , T1 , T2 , T3 , T4 , T5 , T6), void* = 0) +{ + return mpl::vector8< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 + >(); +} + + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 45 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6> +inline mpl::vector9< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) ) +{ + return mpl::vector9< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 +> +inline mpl::vector9< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) + , Target* +) +{ + return mpl::vector9< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 + >(); +} +# 46 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6> +inline mpl::vector9< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const) +{ + return mpl::vector9< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 +> +inline mpl::vector9< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const + , Target* +) +{ + return mpl::vector9< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 + >(); +} +# 51 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6> +inline mpl::vector9< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile) +{ + return mpl::vector9< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 +> +inline mpl::vector9< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile + , Target* +) +{ + return mpl::vector9< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 + >(); +} +# 56 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6> +inline mpl::vector9< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile) +{ + return mpl::vector9< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 +> +inline mpl::vector9< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile + , Target* +) +{ + return mpl::vector9< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 + >(); +} +# 61 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 139 "/usr/include/boost-1_42/boost/python/signature.hpp" 2 +# 83 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7> +inline mpl::vector9< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7> +get_signature(RT(*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7), void* = 0) +{ + return mpl::vector9< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 + >(); +} + + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 45 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7> +inline mpl::vector10< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) ) +{ + return mpl::vector10< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 +> +inline mpl::vector10< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) + , Target* +) +{ + return mpl::vector10< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 + >(); +} +# 46 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7> +inline mpl::vector10< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const) +{ + return mpl::vector10< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 +> +inline mpl::vector10< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const + , Target* +) +{ + return mpl::vector10< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 + >(); +} +# 51 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7> +inline mpl::vector10< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile) +{ + return mpl::vector10< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 +> +inline mpl::vector10< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile + , Target* +) +{ + return mpl::vector10< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 + >(); +} +# 56 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7> +inline mpl::vector10< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile) +{ + return mpl::vector10< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 +> +inline mpl::vector10< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile + , Target* +) +{ + return mpl::vector10< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 + >(); +} +# 61 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 139 "/usr/include/boost-1_42/boost/python/signature.hpp" 2 +# 88 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8> +inline mpl::vector10< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8> +get_signature(RT(*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8), void* = 0) +{ + return mpl::vector10< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 + >(); +} + + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 45 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8> +inline mpl::vector11< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) ) +{ + return mpl::vector11< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 +> +inline mpl::vector11< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) + , Target* +) +{ + return mpl::vector11< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 + >(); +} +# 46 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8> +inline mpl::vector11< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const) +{ + return mpl::vector11< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 +> +inline mpl::vector11< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const + , Target* +) +{ + return mpl::vector11< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 + >(); +} +# 51 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8> +inline mpl::vector11< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile) +{ + return mpl::vector11< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 +> +inline mpl::vector11< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile + , Target* +) +{ + return mpl::vector11< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 + >(); +} +# 56 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8> +inline mpl::vector11< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile) +{ + return mpl::vector11< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 +> +inline mpl::vector11< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile + , Target* +) +{ + return mpl::vector11< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 + >(); +} +# 61 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 139 "/usr/include/boost-1_42/boost/python/signature.hpp" 2 +# 93 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9> +inline mpl::vector11< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> +get_signature(RT(*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9), void* = 0) +{ + return mpl::vector11< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 + >(); +} + + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 45 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9> +inline mpl::vector12< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) ) +{ + return mpl::vector12< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 +> +inline mpl::vector12< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) + , Target* +) +{ + return mpl::vector12< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 + >(); +} +# 46 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9> +inline mpl::vector12< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const) +{ + return mpl::vector12< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 +> +inline mpl::vector12< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const + , Target* +) +{ + return mpl::vector12< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 + >(); +} +# 51 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9> +inline mpl::vector12< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile) +{ + return mpl::vector12< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 +> +inline mpl::vector12< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile + , Target* +) +{ + return mpl::vector12< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 + >(); +} +# 56 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9> +inline mpl::vector12< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile) +{ + return mpl::vector12< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 +> +inline mpl::vector12< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile + , Target* +) +{ + return mpl::vector12< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 + >(); +} +# 61 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 139 "/usr/include/boost-1_42/boost/python/signature.hpp" 2 +# 98 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10> +inline mpl::vector12< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10> +get_signature(RT(*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10), void* = 0) +{ + return mpl::vector12< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 + >(); +} + + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 45 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10> +inline mpl::vector13< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) ) +{ + return mpl::vector13< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 +> +inline mpl::vector13< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) + , Target* +) +{ + return mpl::vector13< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 + >(); +} +# 46 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10> +inline mpl::vector13< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const) +{ + return mpl::vector13< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 +> +inline mpl::vector13< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const + , Target* +) +{ + return mpl::vector13< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 + >(); +} +# 51 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10> +inline mpl::vector13< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile) +{ + return mpl::vector13< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 +> +inline mpl::vector13< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile + , Target* +) +{ + return mpl::vector13< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 + >(); +} +# 56 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10> +inline mpl::vector13< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile) +{ + return mpl::vector13< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 +> +inline mpl::vector13< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile + , Target* +) +{ + return mpl::vector13< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 + >(); +} +# 61 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 139 "/usr/include/boost-1_42/boost/python/signature.hpp" 2 +# 103 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11> +inline mpl::vector13< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11> +get_signature(RT(*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11), void* = 0) +{ + return mpl::vector13< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 + >(); +} + + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 45 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11> +inline mpl::vector14< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) ) +{ + return mpl::vector14< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 +> +inline mpl::vector14< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) + , Target* +) +{ + return mpl::vector14< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 + >(); +} +# 46 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11> +inline mpl::vector14< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const) +{ + return mpl::vector14< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 +> +inline mpl::vector14< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const + , Target* +) +{ + return mpl::vector14< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 + >(); +} +# 51 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11> +inline mpl::vector14< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile) +{ + return mpl::vector14< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 +> +inline mpl::vector14< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile + , Target* +) +{ + return mpl::vector14< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 + >(); +} +# 56 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11> +inline mpl::vector14< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile) +{ + return mpl::vector14< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 +> +inline mpl::vector14< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile + , Target* +) +{ + return mpl::vector14< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 + >(); +} +# 61 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 139 "/usr/include/boost-1_42/boost/python/signature.hpp" 2 +# 108 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12> +inline mpl::vector14< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12> +get_signature(RT(*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12), void* = 0) +{ + return mpl::vector14< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 + >(); +} + + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 45 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12> +inline mpl::vector15< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) ) +{ + return mpl::vector15< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 +> +inline mpl::vector15< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) + , Target* +) +{ + return mpl::vector15< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 + >(); +} +# 46 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12> +inline mpl::vector15< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const) +{ + return mpl::vector15< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 +> +inline mpl::vector15< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const + , Target* +) +{ + return mpl::vector15< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 + >(); +} +# 51 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12> +inline mpl::vector15< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile) +{ + return mpl::vector15< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 +> +inline mpl::vector15< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile + , Target* +) +{ + return mpl::vector15< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 + >(); +} +# 56 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12> +inline mpl::vector15< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile) +{ + return mpl::vector15< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 +> +inline mpl::vector15< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile + , Target* +) +{ + return mpl::vector15< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 + >(); +} +# 61 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 139 "/usr/include/boost-1_42/boost/python/signature.hpp" 2 +# 113 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13> +inline mpl::vector15< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13> +get_signature(RT(*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13), void* = 0) +{ + return mpl::vector15< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 + >(); +} + + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 45 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13> +inline mpl::vector16< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) ) +{ + return mpl::vector16< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 +> +inline mpl::vector16< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) + , Target* +) +{ + return mpl::vector16< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 + >(); +} +# 46 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13> +inline mpl::vector16< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const) +{ + return mpl::vector16< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 +> +inline mpl::vector16< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const + , Target* +) +{ + return mpl::vector16< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 + >(); +} +# 51 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13> +inline mpl::vector16< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile) +{ + return mpl::vector16< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 +> +inline mpl::vector16< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile + , Target* +) +{ + return mpl::vector16< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 + >(); +} +# 56 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13> +inline mpl::vector16< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile) +{ + return mpl::vector16< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 +> +inline mpl::vector16< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile + , Target* +) +{ + return mpl::vector16< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 + >(); +} +# 61 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 139 "/usr/include/boost-1_42/boost/python/signature.hpp" 2 +# 118 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> +inline mpl::vector16< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14> +get_signature(RT(*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14), void* = 0) +{ + return mpl::vector16< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 + >(); +} + + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 45 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> +inline mpl::vector17< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) ) +{ + return mpl::vector17< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 +> +inline mpl::vector17< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) + , Target* +) +{ + return mpl::vector17< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 + >(); +} +# 46 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> +inline mpl::vector17< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const) +{ + return mpl::vector17< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 +> +inline mpl::vector17< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const + , Target* +) +{ + return mpl::vector17< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 + >(); +} +# 51 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> +inline mpl::vector17< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile) +{ + return mpl::vector17< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 +> +inline mpl::vector17< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile + , Target* +) +{ + return mpl::vector17< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 + >(); +} +# 56 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 145 "/usr/include/boost-1_42/boost/python/signature.hpp" +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> +inline mpl::vector17< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile) +{ + return mpl::vector17< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 + >(); +} + +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 +> +inline mpl::vector17< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile + , Target* +) +{ + return mpl::vector17< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 + >(); +} +# 61 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 139 "/usr/include/boost-1_42/boost/python/signature.hpp" 2 +# 123 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 107 "/usr/include/boost-1_42/boost/python/signature.hpp" 2 + + + + +}}} +# 12 "/usr/include/boost-1_42/boost/python/object/function_handle.hpp" 2 + +namespace boost { namespace python { namespace objects { + + handle<> function_handle_impl(py_function const& f); + + + + +template +inline handle<> function_handle(F const& f, Signature) +{ + enum { n_arguments = mpl::size::value - 1 }; + + return objects::function_handle_impl( + python::detail::caller< + F,default_call_policies,Signature + >( + f, default_call_policies() + ) + ); +} + + + +template +handle<> make_function_handle(F f) +{ + return objects::function_handle(f, python::detail::get_signature(f)); +} + +}}} +# 20 "/usr/include/boost-1_42/boost/python/converter/arg_to_python.hpp" 2 + + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/string_literal.hpp" 1 + + + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 9 "/usr/include/boost-1_42/boost/python/detail/string_literal.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/type_traits/array_traits.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/detail/string_literal.hpp" 2 + + + + +namespace boost { namespace python { namespace detail { + + +template +struct is_string_literal : mpl::false_ +{ +}; + + +template +struct is_string_literal : mpl::true_ +{ +}; +# 86 "/usr/include/boost-1_42/boost/python/detail/string_literal.hpp" +}}} +# 26 "/usr/include/boost-1_42/boost/python/converter/arg_to_python.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/function_traits.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/type_traits/function_traits.hpp" +namespace boost { + + +namespace detail { + +template struct function_traits_helper; + +template +struct function_traits_helper +{ + static const unsigned arity = 0; + typedef R result_type; +}; + +template +struct function_traits_helper +{ + static const unsigned arity = 1; + typedef R result_type; + typedef T1 arg1_type; + typedef T1 argument_type; +}; + +template +struct function_traits_helper +{ + static const unsigned arity = 2; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T1 first_argument_type; + typedef T2 second_argument_type; +}; + +template +struct function_traits_helper +{ + static const unsigned arity = 3; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; +}; + +template +struct function_traits_helper +{ + static const unsigned arity = 4; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; +}; + +template +struct function_traits_helper +{ + static const unsigned arity = 5; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; +}; + +template +struct function_traits_helper +{ + static const unsigned arity = 6; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; +}; + +template +struct function_traits_helper +{ + static const unsigned arity = 7; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; + typedef T7 arg7_type; +}; + +template +struct function_traits_helper +{ + static const unsigned arity = 8; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; + typedef T7 arg7_type; + typedef T8 arg8_type; +}; + +template +struct function_traits_helper +{ + static const unsigned arity = 9; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; + typedef T7 arg7_type; + typedef T8 arg8_type; + typedef T9 arg9_type; +}; + +template +struct function_traits_helper +{ + static const unsigned arity = 10; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; + typedef T7 arg7_type; + typedef T8 arg8_type; + typedef T9 arg9_type; + typedef T10 arg10_type; +}; + +} + +template +struct function_traits : + public detail::function_traits_helper::type> +{ +}; +# 234 "/usr/include/boost-1_42/boost/type_traits/function_traits.hpp" +} +# 31 "/usr/include/boost-1_42/boost/python/converter/arg_to_python.hpp" 2 + + + + +namespace boost { namespace python { namespace converter { + +template struct is_object_manager; + +namespace detail +{ + template + struct function_arg_to_python : handle<> + { + function_arg_to_python(T const& x); + }; + + template + struct reference_arg_to_python : handle<> + { + reference_arg_to_python(T& x); + private: + static PyObject* get_object(T& x); + }; + + template + struct shared_ptr_arg_to_python : handle<> + { + shared_ptr_arg_to_python(T const& x); + private: + static PyObject* get_object(T& x); + }; + + template + struct value_arg_to_python : arg_to_python_base + { + + value_arg_to_python(T const&); + }; + + template + struct pointer_deep_arg_to_python : arg_to_python_base + { + + pointer_deep_arg_to_python(Ptr); + }; + + template + struct pointer_shallow_arg_to_python : handle<> + { + + pointer_shallow_arg_to_python(Ptr); + private: + static PyObject* get_object(Ptr p); + }; + + + template + struct object_manager_arg_to_python + { + object_manager_arg_to_python(T const& x) : m_src(x) {} + + PyObject* get() const + { + return python::upcast(get_managed_object(m_src, tag)); + } + + private: + T const& m_src; + }; + + template + struct select_arg_to_python + { + typedef typename unwrap_reference::type unwrapped_referent; + typedef typename unwrap_pointer::type unwrapped_ptr; + + typedef typename mpl::if_< + + + python::detail::is_string_literal + , arg_to_python + + , typename mpl::if_< + python::detail::value_is_shared_ptr + , shared_ptr_arg_to_python + + , typename mpl::if_< + mpl::or_< + is_function + , indirect_traits::is_pointer_to_function + , is_member_function_pointer + > + , function_arg_to_python + + , typename mpl::if_< + is_object_manager + , object_manager_arg_to_python + + , typename mpl::if_< + is_pointer + , pointer_deep_arg_to_python + + , typename mpl::if_< + is_pointer_wrapper + , pointer_shallow_arg_to_python + + , typename mpl::if_< + is_reference_wrapper + , reference_arg_to_python + , value_arg_to_python + >::type + >::type + >::type + >::type + >::type + >::type + >::type + + type; + }; +} + +template +struct arg_to_python + : detail::select_arg_to_python::type +{ + typedef typename detail::select_arg_to_python::type base; + public: + + arg_to_python(T const& x); +}; + + + + +namespace detail +{ + + + using python::detail::yes_convertible; + using python::detail::no_convertible; + using python::detail::unspecialized; + + template struct cannot_convert_raw_PyObject; + + template + struct reject_raw_object_helper + { + static void error(Convertibility) + { + cannot_convert_raw_PyObject::to_python_use_handle_instead(); + } + static void error(...) {} + }; + + template + inline void reject_raw_object_ptr(T*) + { + reject_raw_object_helper::error( + python::detail::convertible::check((T*)0)); + + typedef typename remove_cv::type value_type; + + reject_raw_object_helper::error( + python::detail::convertible::check( + (base_type_traits*)0 + )); + } + + + template + inline function_arg_to_python::function_arg_to_python(T const& x) + : handle<>(python::objects::make_function_handle(x)) + { + } + + template + inline value_arg_to_python::value_arg_to_python(T const& x) + : arg_to_python_base(&x, registered::converters) + { + } + + template + inline pointer_deep_arg_to_python::pointer_deep_arg_to_python(Ptr x) + : arg_to_python_base(x, registered_pointee::converters) + { + detail::reject_raw_object_ptr((Ptr)0); + } + + template + inline PyObject* reference_arg_to_python::get_object(T& x) + { + to_python_indirect convert; + return convert(x); + } + + template + inline reference_arg_to_python::reference_arg_to_python(T& x) + : handle<>(reference_arg_to_python::get_object(x)) + { + } + + template + inline shared_ptr_arg_to_python::shared_ptr_arg_to_python(T const& x) + : handle<>(shared_ptr_to_python(x)) + { + } + + template + inline pointer_shallow_arg_to_python::pointer_shallow_arg_to_python(Ptr x) + : handle<>(pointer_shallow_arg_to_python::get_object(x)) + { + detail::reject_raw_object_ptr((Ptr)0); + } + + template + inline PyObject* pointer_shallow_arg_to_python::get_object(Ptr x) + { + to_python_indirect convert; + return convert(x); + } +} + +template +inline arg_to_python::arg_to_python(T const& x) + : base(x) +{} + +}}} +# 16 "/usr/include/boost-1_42/boost/python/call.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/converter/return_from_python.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/python/converter/return_from_python.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/void_return.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/detail/void_return.hpp" +namespace boost { namespace python { namespace detail { + +struct void_return +{ + void_return() {} + private: + void operator=(void_return const&); +}; + +template +struct returnable +{ + typedef T type; +}; +# 40 "/usr/include/boost-1_42/boost/python/detail/void_return.hpp" +}}} +# 15 "/usr/include/boost-1_42/boost/python/converter/return_from_python.hpp" 2 + + + + + + +namespace boost { namespace python { namespace converter { + +template struct is_object_manager; + +namespace detail +{ + template + struct return_pointer_from_python + { + typedef T result_type; + T operator()(PyObject*) const; + }; + + template + struct return_reference_from_python + { + typedef T result_type; + T operator()(PyObject*) const; + }; + + template + struct return_rvalue_from_python + { + typedef T result_type; + + return_rvalue_from_python(); + result_type operator()(PyObject*); + private: + rvalue_from_python_data m_data; + }; + + template + struct return_object_manager_from_python + { + typedef T result_type; + result_type operator()(PyObject*) const; + }; + + template + struct select_return_from_python + { + static const bool obj_mgr = is_object_manager::value + ; + + static const bool ptr = is_pointer::value + ; + + static const bool ref = is_reference::value + ; + + typedef typename mpl::if_c< + obj_mgr + , return_object_manager_from_python + , typename mpl::if_c< + ptr + , return_pointer_from_python + , typename mpl::if_c< + ref + , return_reference_from_python + , return_rvalue_from_python + >::type + >::type + >::type type; + }; +} + +template +struct return_from_python + : detail::select_return_from_python::type +{ +}; + + +template <> +struct return_from_python +{ + typedef python::detail::returnable::type result_type; + + result_type operator()(PyObject* x) const + { + (void_result_from_python)(x); + + + + } +}; + + + + +namespace detail +{ + template + inline return_rvalue_from_python::return_rvalue_from_python() + : m_data( + const_cast(®istered::converters) + ) + { + } + + template + inline typename return_rvalue_from_python::result_type + return_rvalue_from_python::operator()(PyObject* obj) + { + + + + + handle<> holder(obj); + + return *(T*) + (rvalue_result_from_python)(obj, m_data.stage1); + } + + template + inline T return_reference_from_python::operator()(PyObject* obj) const + { + return python::detail::void_ptr_to_reference( + (reference_result_from_python)(obj, registered::converters) + , (T(*)())0); + } + + template + inline T return_pointer_from_python::operator()(PyObject* obj) const + { + return T( + (pointer_result_from_python)(obj, registered_pointee::converters) + ); + } + + template + inline T return_object_manager_from_python::operator()(PyObject* obj) const + { + return T( + object_manager_traits::adopt(expect_non_null(obj)) + ); + } +} + +}}} +# 17 "/usr/include/boost-1_42/boost/python/call.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/python/call.hpp" +namespace boost { namespace python { + + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 47 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/python/call.hpp" 1 +# 47 "/usr/include/boost-1_42/boost/python/call.hpp" + + + + +template < + class R + + > +typename detail::returnable::type +call(PyObject* callable + + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" ")") + + ); +# 75 "/usr/include/boost-1_42/boost/python/call.hpp" + converter::return_from_python converter; + return converter(result); +} +# 48 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call.hpp" 1 +# 47 "/usr/include/boost-1_42/boost/python/call.hpp" + + + + +template < + class R + , class A0 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" ")") + , converter::arg_to_python(a0).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call.hpp" + converter::return_from_python converter; + return converter(result); +} +# 53 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call.hpp" 1 +# 47 "/usr/include/boost-1_42/boost/python/call.hpp" + + + + +template < + class R + , class A0 , class A1 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call.hpp" + converter::return_from_python converter; + return converter(result); +} +# 58 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call.hpp" 1 +# 47 "/usr/include/boost-1_42/boost/python/call.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call.hpp" + converter::return_from_python converter; + return converter(result); +} +# 63 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call.hpp" 1 +# 47 "/usr/include/boost-1_42/boost/python/call.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 , class A3 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call.hpp" + converter::return_from_python converter; + return converter(result); +} +# 68 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call.hpp" 1 +# 47 "/usr/include/boost-1_42/boost/python/call.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call.hpp" + converter::return_from_python converter; + return converter(result); +} +# 73 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call.hpp" 1 +# 47 "/usr/include/boost-1_42/boost/python/call.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call.hpp" + converter::return_from_python converter; + return converter(result); +} +# 78 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call.hpp" 1 +# 47 "/usr/include/boost-1_42/boost/python/call.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call.hpp" + converter::return_from_python converter; + return converter(result); +} +# 83 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call.hpp" 1 +# 47 "/usr/include/boost-1_42/boost/python/call.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call.hpp" + converter::return_from_python converter; + return converter(result); +} +# 88 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call.hpp" 1 +# 47 "/usr/include/boost-1_42/boost/python/call.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call.hpp" + converter::return_from_python converter; + return converter(result); +} +# 93 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call.hpp" 1 +# 47 "/usr/include/boost-1_42/boost/python/call.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call.hpp" + converter::return_from_python converter; + return converter(result); +} +# 98 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call.hpp" 1 +# 47 "/usr/include/boost-1_42/boost/python/call.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call.hpp" + converter::return_from_python converter; + return converter(result); +} +# 103 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call.hpp" 1 +# 47 "/usr/include/boost-1_42/boost/python/call.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() , converter::arg_to_python(a11).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call.hpp" + converter::return_from_python converter; + return converter(result); +} +# 108 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call.hpp" 1 +# 47 "/usr/include/boost-1_42/boost/python/call.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() , converter::arg_to_python(a11).get() , converter::arg_to_python(a12).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call.hpp" + converter::return_from_python converter; + return converter(result); +} +# 113 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call.hpp" 1 +# 47 "/usr/include/boost-1_42/boost/python/call.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() , converter::arg_to_python(a11).get() , converter::arg_to_python(a12).get() , converter::arg_to_python(a13).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call.hpp" + converter::return_from_python converter; + return converter(result); +} +# 118 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call.hpp" 1 +# 47 "/usr/include/boost-1_42/boost/python/call.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 , class A14 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() , converter::arg_to_python(a11).get() , converter::arg_to_python(a12).get() , converter::arg_to_python(a13).get() , converter::arg_to_python(a14).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call.hpp" + converter::return_from_python converter; + return converter(result); +} +# 123 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 34 "/usr/include/boost-1_42/boost/python/call.hpp" 2 + + + +}} +# 13 "/usr/include/boost-1_42/boost/python/object_core.hpp" 2 + + + + + +# 1 "/usr/include/boost-1_42/boost/python/def_visitor.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/def_visitor.hpp" +namespace boost { namespace python { + +template class def_visitor; +template class class_; + +class def_visitor_access +{ + + + + + + + template friend class def_visitor; + + + + template + static void visit(V const& v, classT& c) + { + v.derived_visitor().visit(c); + } + + + template + static void visit( + V const& v + , classT& c + , char const* name + , OptionalArgs const& options + ) + { + v.derived_visitor().visit(c, name, options); + } + +}; + + +template +class def_visitor +{ + friend class def_visitor_access; + + + + + + + + template friend class class_; + + + + template + void visit(classT& c) const + { + def_visitor_access::visit(*this, c); + } + + + template + void visit(classT& c, char const* name, OptionalArgs const& options) const + { + def_visitor_access::visit(*this, c, name, options); + } + + protected: + DerivedVisitor const& derived_visitor() const + { + return static_cast(*this); + } +}; + +}} +# 19 "/usr/include/boost-1_42/boost/python/object_core.hpp" 2 + + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/add_to_namespace.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/object/add_to_namespace.hpp" +namespace boost { namespace python { namespace objects { + + + + + void add_to_namespace( + object const& name_space, char const* name, object const& attribute); + + void add_to_namespace( + object const& name_space, char const* name, object const& attribute, char const* doc); + +}}} +# 25 "/usr/include/boost-1_42/boost/python/object_core.hpp" 2 + + + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/def_helper_fwd.hpp" 1 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/not_specified.hpp" 1 + + + + + + + +namespace boost { namespace python { namespace detail { + + struct not_specified {}; + +}}} +# 9 "/usr/include/boost-1_42/boost/python/detail/def_helper_fwd.hpp" 2 + +namespace boost { namespace python { namespace detail { + +template +struct def_helper; + +}}} +# 32 "/usr/include/boost-1_42/boost/python/object_core.hpp" 2 +# 43 "/usr/include/boost-1_42/boost/python/object_core.hpp" +namespace boost { namespace python { + +namespace detail +{ + class kwds_proxy; + class args_proxy; +} + +namespace converter +{ + template struct arg_to_python; +} + + +namespace api +{ + + + + + + template class proxy; + + struct const_attribute_policies; + struct attribute_policies; + struct const_objattribute_policies; + struct objattribute_policies; + struct const_item_policies; + struct item_policies; + struct const_slice_policies; + struct slice_policies; + class slice_nil; + + typedef proxy const_object_attribute; + typedef proxy object_attribute; + typedef proxy const_object_objattribute; + typedef proxy object_objattribute; + typedef proxy const_object_item; + typedef proxy object_item; + typedef proxy const_object_slice; + typedef proxy object_slice; + + + + + template struct is_proxy : mpl::false_ { }; template < class T0 > struct is_proxy< boost::python::api::proxy< T0 > > : mpl::true_ { }; + + template struct object_initializer; + + class object; + typedef PyObject* (object::*bool_type)() const; + + template + class object_operators : public def_visitor + { + protected: + + typedef object const& object_cref; + + + + public: + + + object operator()() const; + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 52 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/python/object_call.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/object_call.hpp" + template < class A0> + typename detail::dependent::type + operator()( A0 const& a0) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0); + } +# 53 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object_call.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/object_call.hpp" + template < class A0 , class A1> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1); + } +# 58 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object_call.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/object_call.hpp" + template < class A0 , class A1 , class A2> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2); + } +# 63 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object_call.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/object_call.hpp" + template < class A0 , class A1 , class A2 , class A3> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2 , a3); + } +# 68 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object_call.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/object_call.hpp" + template < class A0 , class A1 , class A2 , class A3 , class A4> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2 , a3 , a4); + } +# 73 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object_call.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/object_call.hpp" + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2 , a3 , a4 , a5); + } +# 78 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object_call.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/object_call.hpp" + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2 , a3 , a4 , a5 , a6); + } +# 83 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object_call.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/object_call.hpp" + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7); + } +# 88 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object_call.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/object_call.hpp" + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8); + } +# 93 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object_call.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/object_call.hpp" + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9); + } +# 98 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object_call.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/object_call.hpp" + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10); + } +# 103 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object_call.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/object_call.hpp" + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11); + } +# 108 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object_call.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/object_call.hpp" + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12); + } +# 113 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object_call.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/object_call.hpp" + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13); + } +# 118 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object_call.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/object_call.hpp" + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 , class A14> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13 , a14); + } +# 123 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 111 "/usr/include/boost-1_42/boost/python/object_core.hpp" 2 + + detail::args_proxy operator* () const; + object operator()(detail::args_proxy const &args) const; + object operator()(detail::args_proxy const &args, + detail::kwds_proxy const &kwds) const; + + + + operator bool_type() const; + bool operator!() const; + + + + const_object_attribute attr(char const*) const; + object_attribute attr(char const*); + const_object_objattribute attr(object const&) const; + object_objattribute attr(object const&); + + + template + object contains(T const& key) const; + + + + const_object_item operator[](object_cref) const; + object_item operator[](object_cref); + + template + const_object_item + operator[](T const& key) const + + ; + + + + + + + template + object_item + operator[](T const& key) + + ; +# 162 "/usr/include/boost-1_42/boost/python/object_core.hpp" + const_object_slice slice(object_cref, object_cref) const; + object_slice slice(object_cref, object_cref); + + const_object_slice slice(slice_nil, object_cref) const; + object_slice slice(slice_nil, object_cref); + + const_object_slice slice(object_cref, slice_nil) const; + object_slice slice(object_cref, slice_nil); + + const_object_slice slice(slice_nil, slice_nil) const; + object_slice slice(slice_nil, slice_nil); + + template + const_object_slice + slice(T const& start, V const& end) const + + ; +# 187 "/usr/include/boost-1_42/boost/python/object_core.hpp" + template + object_slice + slice(T const& start, V const& end) + + ; +# 200 "/usr/include/boost-1_42/boost/python/object_core.hpp" + private: + + template + void visit(ClassT& cl, char const* name, python::detail::def_helper const& helper) const + { + + + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((is_same::value || detail::is_string_literal::value)) == 0 ? false : true) >)> + + boost_static_assert_typedef_209; + + objects::add_to_namespace(cl, name, this->derived_visitor(), helper.doc()); + } + + friend class python::def_visitor_access; + + private: + + + + + typedef object const& object_cref2; + + + + }; + + + + + + struct object_base : object_operators + { + + inline object_base(object_base const&); + inline object_base(PyObject* ptr); + + inline object_base& operator=(object_base const& rhs); + inline ~object_base(); + + + inline PyObject* ptr() const; + + private: + PyObject* m_ptr; + }; +# 267 "/usr/include/boost-1_42/boost/python/object_core.hpp" + template + struct is_derived + : is_convertible< + typename remove_reference::type* + , U const* + > + {}; + + + template + typename objects::unforward_cref::type do_unforward_cref(T const& x) + { + + + + + return x; + + } +# 296 "/usr/include/boost-1_42/boost/python/object_core.hpp" + class object; + + template + PyObject* object_base_initializer(T const& x) + { + typedef typename is_derived< + typename objects::unforward_cref::type + , object + >::type is_obj; + + return object_initializer< + typename unwrap_reference::type + >::get( + x + , is_obj() + ); + } + + class object : public object_base + { + public: + + object(); + + + template + explicit object( + T const& x + + + + + + ) + : object_base(object_base_initializer(x)) + { + } + + + explicit object(handle<> const&); + private: + + public: + explicit object(detail::borrowed_reference); + explicit object(detail::new_reference); + explicit object(detail::new_non_null_reference); + }; +# 376 "/usr/include/boost-1_42/boost/python/object_core.hpp" + template + struct object_initializer_impl + { + static PyObject* + get(object const& x, mpl::true_) + { + return python::incref(x.ptr()); + } + + template + static PyObject* + get(T const& x, mpl::false_) + { + return python::incref(converter::arg_to_python(x).get()); + } + }; + + template <> + struct object_initializer_impl + { + template + static PyObject* + get(proxy const& x, mpl::false_) + { + return python::incref(x.operator object().ptr()); + } + }; + + template <> + struct object_initializer_impl + { + template + static PyObject* + get(T const& x, U) + { + return python::incref(get_managed_object(x, boost::python::tag)); + } + }; + + template <> + struct object_initializer_impl + {}; + + template + struct object_initializer : object_initializer_impl< + is_proxy::value + , converter::is_object_manager::value + > + {}; + +} +using api::object; +template struct extract; + + + + + +namespace detail +{ + +class call_proxy +{ +public: + call_proxy(object target) : m_target(target) {} + operator object() const { return m_target;} + + private: + object m_target; +}; + +class kwds_proxy : public call_proxy +{ +public: + kwds_proxy(object o = object()) : call_proxy(o) {} +}; +class args_proxy : public call_proxy +{ +public: + args_proxy(object o) : call_proxy(o) {} + kwds_proxy operator* () const { return kwds_proxy(*this);} +}; +} + +template +detail::args_proxy api::object_operators::operator* () const +{ + object_cref2 x = *static_cast(this); + return boost::python::detail::args_proxy(x); +} + +template +object api::object_operators::operator()(detail::args_proxy const &args) const +{ + U const& self = *static_cast(this); + PyObject *result = PyObject_Call(get_managed_object(self, boost::python::tag), + args.operator object().ptr(), + 0); + return object(boost::python::detail::new_reference(result)); + +} + +template +object api::object_operators::operator()(detail::args_proxy const &args, + detail::kwds_proxy const &kwds) const +{ + U const& self = *static_cast(this); + PyObject *result = PyObject_Call(get_managed_object(self, boost::python::tag), + args.operator object().ptr(), + kwds.operator object().ptr()); + return object(boost::python::detail::new_reference(result)); + +} + + +template +template +object api::object_operators::contains(T const& key) const +{ + return this->attr("__contains__")(object(key)); +} + + +inline object::object() + : object_base(python::incref((&_Py_NoneStruct))) +{} + + +inline api::object_base::object_base(object_base const& rhs) + : m_ptr(python::incref(rhs.m_ptr)) +{} + +inline api::object_base::object_base(PyObject* p) + : m_ptr(p) +{} + +inline api::object_base& api::object_base::operator=(api::object_base const& rhs) +{ + ( ((PyObject*)(rhs.m_ptr))->ob_refcnt++); + if ( --((PyObject*)(this->m_ptr))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(this->m_ptr)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(this->m_ptr)))); + this->m_ptr = rhs.m_ptr; + return *this; +} + +inline api::object_base::~object_base() +{ + if ( --((PyObject*)(m_ptr))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(m_ptr)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(m_ptr)))); +} + +inline object::object(detail::borrowed_reference p) + : object_base(python::incref((PyObject*)p)) +{} + +inline object::object(detail::new_reference p) + : object_base(expect_non_null((PyObject*)p)) +{} + +inline object::object(detail::new_non_null_reference p) + : object_base((PyObject*)p) +{} + +inline PyObject* api::object_base::ptr() const +{ + return m_ptr; +} + + + + +namespace converter +{ + template struct object_manager_traits; + + template <> + struct object_manager_traits + { + static const bool is_specialized = true; + static bool check(PyObject*) { return true; } + + static python::detail::new_non_null_reference adopt(PyObject* x) + { + return python::detail::new_non_null_reference(x); + } + + static PyTypeObject const *get_pytype() {return 0;} + + }; +} + +inline PyObject* get_managed_object(object const& x, tag_t) +{ + return x.ptr(); +} + +}} + +# 1 "/usr/include/boost-1_42/boost/python/slice_nil.hpp" 1 +# 9 "/usr/include/boost-1_42/boost/python/slice_nil.hpp" +# 1 "/usr/include/boost-1_42/boost/python/object_core.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/slice_nil.hpp" 2 + +namespace boost { namespace python { namespace api { + +class slice_nil : public object +{ + public: + slice_nil() : object() {} +}; + + +static const slice_nil _ = slice_nil(); + + +template +struct slice_bound +{ + typedef object type; +}; + +template <> +struct slice_bound +{ + typedef slice_nil type; +}; + +} + +using api::slice_nil; + +using api::_; + + +}} +# 573 "/usr/include/boost-1_42/boost/python/object_core.hpp" 2 +# 26 "/usr/include/boost-1_42/boost/python/args.hpp" 2 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 30 "/usr/include/boost-1_42/boost/python/args.hpp" 2 + + +namespace boost { namespace python { + +typedef detail::keywords<1> arg; +typedef arg arg_; + +namespace detail +{ + template + struct keywords_base + { + static const std::size_t size = nkeywords; + + keyword_range range() const + { + return keyword_range(elements, elements + nkeywords); + } + + keyword elements[nkeywords]; + + keywords + operator,(python::arg const &k) const; + + keywords + operator,(char const *name) const; + }; + + template + struct keywords : keywords_base + { + }; + + template <> + struct keywords<1> : keywords_base<1> + { + explicit keywords(char const *name) + { + elements[0].name = name; + } + + template + python::arg& operator=(T const& value) + { + object z(value); + elements[0].default_value = handle<>(python::borrowed(object(value).ptr())); + return *this; + } + + operator detail::keyword const&() const + { + return elements[0]; + } + }; + + template + inline + keywords + keywords_base::operator,(python::arg const &k) const + { + keywords const& l = *static_cast const*>(this); + python::detail::keywords res; + std::copy(l.elements, l.elements+nkeywords, res.elements); + res.elements[nkeywords] = k.elements[0]; + return res; + } + + template + inline + keywords + keywords_base::operator,(char const *name) const + { + return this->operator,(python::arg(name)); + } + + + template + struct is_keywords + { + static const bool value = false; + }; + + template + struct is_keywords > + { + static const bool value = true; + }; + template + struct is_reference_to_keywords + { + static const bool is_ref = is_reference::value; + typedef typename remove_reference::type deref; + typedef typename remove_cv::type key_t; + static const bool is_key = is_keywords::value; + static const bool value = (is_ref & is_key); + + typedef mpl::bool_ type; + + }; +# 154 "/usr/include/boost-1_42/boost/python/args.hpp" +} + +inline detail::keywords<1> args(char const* name) +{ + return detail::keywords<1>(name); +} +# 170 "/usr/include/boost-1_42/boost/python/args.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 40 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + inline detail::keywords<2> args( char const* name0 , char const* name1) { detail::keywords<2> result; result.elements[0].name = name0; result.elements[1].name = name1; return result; } + + + inline detail::keywords<3> args( char const* name0 , char const* name1 , char const* name2) { detail::keywords<3> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; return result; } + + + inline detail::keywords<4> args( char const* name0 , char const* name1 , char const* name2 , char const* name3) { detail::keywords<4> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; result.elements[3].name = name3; return result; } + + + inline detail::keywords<5> args( char const* name0 , char const* name1 , char const* name2 , char const* name3 , char const* name4) { detail::keywords<5> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; result.elements[3].name = name3; result.elements[4].name = name4; return result; } + + + inline detail::keywords<6> args( char const* name0 , char const* name1 , char const* name2 , char const* name3 , char const* name4 , char const* name5) { detail::keywords<6> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; result.elements[3].name = name3; result.elements[4].name = name4; result.elements[5].name = name5; return result; } + + + inline detail::keywords<7> args( char const* name0 , char const* name1 , char const* name2 , char const* name3 , char const* name4 , char const* name5 , char const* name6) { detail::keywords<7> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; result.elements[3].name = name3; result.elements[4].name = name4; result.elements[5].name = name5; result.elements[6].name = name6; return result; } + + + inline detail::keywords<8> args( char const* name0 , char const* name1 , char const* name2 , char const* name3 , char const* name4 , char const* name5 , char const* name6 , char const* name7) { detail::keywords<8> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; result.elements[3].name = name3; result.elements[4].name = name4; result.elements[5].name = name5; result.elements[6].name = name6; result.elements[7].name = name7; return result; } + + + inline detail::keywords<9> args( char const* name0 , char const* name1 , char const* name2 , char const* name3 , char const* name4 , char const* name5 , char const* name6 , char const* name7 , char const* name8) { detail::keywords<9> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; result.elements[3].name = name3; result.elements[4].name = name4; result.elements[5].name = name5; result.elements[6].name = name6; result.elements[7].name = name7; result.elements[8].name = name8; return result; } + + + inline detail::keywords<10> args( char const* name0 , char const* name1 , char const* name2 , char const* name3 , char const* name4 , char const* name5 , char const* name6 , char const* name7 , char const* name8 , char const* name9) { detail::keywords<10> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; result.elements[3].name = name3; result.elements[4].name = name4; result.elements[5].name = name5; result.elements[6].name = name6; result.elements[7].name = name7; result.elements[8].name = name8; result.elements[9].name = name9; return result; } + + + inline detail::keywords<11> args( char const* name0 , char const* name1 , char const* name2 , char const* name3 , char const* name4 , char const* name5 , char const* name6 , char const* name7 , char const* name8 , char const* name9 , char const* name10) { detail::keywords<11> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; result.elements[3].name = name3; result.elements[4].name = name4; result.elements[5].name = name5; result.elements[6].name = name6; result.elements[7].name = name7; result.elements[8].name = name8; result.elements[9].name = name9; result.elements[10].name = name10; return result; } + + + inline detail::keywords<12> args( char const* name0 , char const* name1 , char const* name2 , char const* name3 , char const* name4 , char const* name5 , char const* name6 , char const* name7 , char const* name8 , char const* name9 , char const* name10 , char const* name11) { detail::keywords<12> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; result.elements[3].name = name3; result.elements[4].name = name4; result.elements[5].name = name5; result.elements[6].name = name6; result.elements[7].name = name7; result.elements[8].name = name8; result.elements[9].name = name9; result.elements[10].name = name10; result.elements[11].name = name11; return result; } + + + inline detail::keywords<13> args( char const* name0 , char const* name1 , char const* name2 , char const* name3 , char const* name4 , char const* name5 , char const* name6 , char const* name7 , char const* name8 , char const* name9 , char const* name10 , char const* name11 , char const* name12) { detail::keywords<13> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; result.elements[3].name = name3; result.elements[4].name = name4; result.elements[5].name = name5; result.elements[6].name = name6; result.elements[7].name = name7; result.elements[8].name = name8; result.elements[9].name = name9; result.elements[10].name = name10; result.elements[11].name = name11; result.elements[12].name = name12; return result; } + + + inline detail::keywords<14> args( char const* name0 , char const* name1 , char const* name2 , char const* name3 , char const* name4 , char const* name5 , char const* name6 , char const* name7 , char const* name8 , char const* name9 , char const* name10 , char const* name11 , char const* name12 , char const* name13) { detail::keywords<14> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; result.elements[3].name = name3; result.elements[4].name = name4; result.elements[5].name = name5; result.elements[6].name = name6; result.elements[7].name = name7; result.elements[8].name = name8; result.elements[9].name = name9; result.elements[10].name = name10; result.elements[11].name = name11; result.elements[12].name = name12; result.elements[13].name = name13; return result; } + + + inline detail::keywords<15> args( char const* name0 , char const* name1 , char const* name2 , char const* name3 , char const* name4 , char const* name5 , char const* name6 , char const* name7 , char const* name8 , char const* name9 , char const* name10 , char const* name11 , char const* name12 , char const* name13 , char const* name14) { detail::keywords<15> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; result.elements[3].name = name3; result.elements[4].name = name4; result.elements[5].name = name5; result.elements[6].name = name6; result.elements[7].name = name7; result.elements[8].name = name8; result.elements[9].name = name9; result.elements[10].name = name10; result.elements[11].name = name11; result.elements[12].name = name12; result.elements[13].name = name13; result.elements[14].name = name14; return result; } +# 171 "/usr/include/boost-1_42/boost/python/args.hpp" 2 + +}} +# 12 "/usr/include/boost-1_42/boost/python.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/python/bases.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/python/bases.hpp" +namespace boost { namespace python { + + + + + template < typename Base0 = mpl::void_ > + struct bases : detail::type_list< Base0 >::type + {}; + + namespace detail + { + + template struct specifies_bases + : mpl::false_ + { + }; + + template < class Base0 > + struct specifies_bases< bases< Base0 > > + : mpl::true_ + { + }; +# 55 "/usr/include/boost-1_42/boost/python/bases.hpp" + template > + struct select_bases + : mpl::if_< + specifies_bases + , T + , Prev + > + { + }; + } + +}} +# 15 "/usr/include/boost-1_42/boost/python.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/call.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/python.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/call_method.hpp" 1 +# 26 "/usr/include/boost-1_42/boost/python/call_method.hpp" +namespace boost { namespace python { + + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 47 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/python/call_method.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/call_method.hpp" + + + + +template < + class R + + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" ")") + + ); +# 75 "/usr/include/boost-1_42/boost/python/call_method.hpp" + converter::return_from_python converter; + return converter(result); +} +# 48 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call_method.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/call_method.hpp" + + + + +template < + class R + , class A0 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" ")") + , converter::arg_to_python(a0).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call_method.hpp" + converter::return_from_python converter; + return converter(result); +} +# 53 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call_method.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/call_method.hpp" + + + + +template < + class R + , class A0 , class A1 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call_method.hpp" + converter::return_from_python converter; + return converter(result); +} +# 58 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call_method.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/call_method.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call_method.hpp" + converter::return_from_python converter; + return converter(result); +} +# 63 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call_method.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/call_method.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 , class A3 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call_method.hpp" + converter::return_from_python converter; + return converter(result); +} +# 68 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call_method.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/call_method.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call_method.hpp" + converter::return_from_python converter; + return converter(result); +} +# 73 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call_method.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/call_method.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call_method.hpp" + converter::return_from_python converter; + return converter(result); +} +# 78 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call_method.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/call_method.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call_method.hpp" + converter::return_from_python converter; + return converter(result); +} +# 83 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call_method.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/call_method.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call_method.hpp" + converter::return_from_python converter; + return converter(result); +} +# 88 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call_method.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/call_method.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call_method.hpp" + converter::return_from_python converter; + return converter(result); +} +# 93 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call_method.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/call_method.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call_method.hpp" + converter::return_from_python converter; + return converter(result); +} +# 98 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call_method.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/call_method.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call_method.hpp" + converter::return_from_python converter; + return converter(result); +} +# 103 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call_method.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/call_method.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() , converter::arg_to_python(a11).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call_method.hpp" + converter::return_from_python converter; + return converter(result); +} +# 108 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call_method.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/call_method.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() , converter::arg_to_python(a11).get() , converter::arg_to_python(a12).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call_method.hpp" + converter::return_from_python converter; + return converter(result); +} +# 113 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call_method.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/call_method.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() , converter::arg_to_python(a11).get() , converter::arg_to_python(a12).get() , converter::arg_to_python(a13).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call_method.hpp" + converter::return_from_python converter; + return converter(result); +} +# 118 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/call_method.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/call_method.hpp" + + + + +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 , class A14 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() , converter::arg_to_python(a11).get() , converter::arg_to_python(a12).get() , converter::arg_to_python(a13).get() , converter::arg_to_python(a14).get() + ); +# 75 "/usr/include/boost-1_42/boost/python/call_method.hpp" + converter::return_from_python converter; + return converter(result); +} +# 123 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 33 "/usr/include/boost-1_42/boost/python/call_method.hpp" 2 + + + +}} +# 18 "/usr/include/boost-1_42/boost/python.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/class.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/python/class.hpp" +# 1 "/usr/include/boost-1_42/boost/python/class_fwd.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/class_fwd.hpp" +namespace boost { namespace python { + +template < + class T + + , class X1 = ::boost::python::detail::not_specified + , class X2 = ::boost::python::detail::not_specified + , class X3 = ::boost::python::detail::not_specified + > +class class_; + +}} +# 13 "/usr/include/boost-1_42/boost/python/class.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/object/class.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/python/object/class.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 13 "/usr/include/boost-1_42/boost/python/object/class.hpp" 2 + +namespace boost { namespace python { + +namespace objects { + +struct class_base : python::api::object +{ + + class_base( + char const* name + + , std::size_t num_types + , type_info const*const types + + + , char const* doc = 0 + ); + + + + + void enable_pickling_(bool getstate_manages_dict); + + protected: + void add_property( + char const* name, object const& fget, char const* docstr); + void add_property(char const* name, + object const& fget, object const& fset, char const* docstr); + + void add_static_property(char const* name, object const& fget); + void add_static_property(char const* name, object const& fget, object const& fset); + + + void setattr(char const* name, object const&); + + + + + void set_instance_size(std::size_t bytes); + + + + void def_no_init(); + + + + void make_method_static(const char *method_name); +}; + +}}} +# 14 "/usr/include/boost-1_42/boost/python/class.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/object.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/object.hpp" +# 1 "/usr/include/boost-1_42/boost/python/object_attributes.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/object_attributes.hpp" +# 1 "/usr/include/boost-1_42/boost/python/proxy.hpp" 1 +# 9 "/usr/include/boost-1_42/boost/python/proxy.hpp" +# 1 "/usr/include/boost-1_42/boost/python/object_operators.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/object_operators.hpp" +# 1 "/usr/include/boost-1_42/boost/python/call.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/python/object_operators.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/iterator/detail/enable_if.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/iterator/detail/enable_if.hpp" +# 1 "/usr/include/boost-1_42/boost/iterator/detail/config_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/iterator/detail/enable_if.hpp" 2 + + + + + + + +namespace boost +{ + + namespace iterators + { + + + + template + struct enabled + { + template + struct base + { + typedef T type; + }; + }; + + + + + + + template<> + struct enabled + { + template + struct base + { +# 62 "/usr/include/boost-1_42/boost/iterator/detail/enable_if.hpp" + }; + }; + + + template + struct enable_if + + : enabled<(Cond::value)>::template base + + + + { + + + + }; + + } + +} + +# 1 "/usr/include/boost-1_42/boost/iterator/detail/config_undef.hpp" 1 +# 85 "/usr/include/boost-1_42/boost/iterator/detail/enable_if.hpp" 2 +# 13 "/usr/include/boost-1_42/boost/python/object_operators.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/iterator/detail/config_def.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/python/object_operators.hpp" 2 + +namespace boost { namespace python { namespace api { + +template +char is_object_operators_helper(object_operators const*); + +typedef char (&no_type)[2]; +no_type is_object_operators_helper(...); + +template X* make_ptr(); + +template +struct is_object_operators +{ + enum { + value + = (sizeof(api::is_object_operators_helper(api::make_ptr())) + + sizeof(api::is_object_operators_helper(api::make_ptr())) + < 4 + ) + }; + typedef mpl::bool_ type; +}; + + +template +struct enable_binary + : boost::iterators::enable_if, T> +{}; + + + + + +template +object object_operators::operator()() const +{ + object_cref2 f = *static_cast(this); + return call(f.ptr()); +} + + +template +inline +object_operators::operator bool_type() const +{ + object_cref2 x = *static_cast(this); + int is_true = PyObject_IsTrue(x.ptr()); + if (is_true < 0) throw_error_already_set(); + return is_true ? &object::ptr : 0; +} + +template +inline bool +object_operators::operator!() const +{ + object_cref2 x = *static_cast(this); + int is_true = PyObject_IsTrue(x.ptr()); + if (is_true < 0) throw_error_already_set(); + return !is_true; +} +# 94 "/usr/include/boost-1_42/boost/python/object_operators.hpp" + object operator >(object const& l, object const& r); template typename enable_binary::type operator >(L const& l, R const& r) { return object(l) > object(r); } + object operator >=(object const& l, object const& r); template typename enable_binary::type operator >=(L const& l, R const& r) { return object(l) >= object(r); } + object operator <(object const& l, object const& r); template typename enable_binary::type operator <(L const& l, R const& r) { return object(l) < object(r); } + object operator <=(object const& l, object const& r); template typename enable_binary::type operator <=(L const& l, R const& r) { return object(l) <= object(r); } + object operator ==(object const& l, object const& r); template typename enable_binary::type operator ==(L const& l, R const& r) { return object(l) == object(r); } + object operator !=(object const& l, object const& r); template typename enable_binary::type operator !=(L const& l, R const& r) { return object(l) != object(r); } + object operator +(object const& l, object const& r); template typename enable_binary::type operator +(L const& l, R const& r) { return object(l) + object(r); } + object operator -(object const& l, object const& r); template typename enable_binary::type operator -(L const& l, R const& r) { return object(l) - object(r); } + object operator *(object const& l, object const& r); template typename enable_binary::type operator *(L const& l, R const& r) { return object(l) * object(r); } + object operator /(object const& l, object const& r); template typename enable_binary::type operator /(L const& l, R const& r) { return object(l) / object(r); } + object operator %(object const& l, object const& r); template typename enable_binary::type operator %(L const& l, R const& r) { return object(l) % object(r); } + object operator <<(object const& l, object const& r); template typename enable_binary::type operator <<(L const& l, R const& r) { return object(l) << object(r); } + object operator >>(object const& l, object const& r); template typename enable_binary::type operator >>(L const& l, R const& r) { return object(l) >> object(r); } + object operator &(object const& l, object const& r); template typename enable_binary::type operator &(L const& l, R const& r) { return object(l) & object(r); } + object operator ^(object const& l, object const& r); template typename enable_binary::type operator ^(L const& l, R const& r) { return object(l) ^ object(r); } + object operator |(object const& l, object const& r); template typename enable_binary::type operator |(L const& l, R const& r) { return object(l) | object(r); } +# 120 "/usr/include/boost-1_42/boost/python/object_operators.hpp" + object& operator +=(object& l, object const& r); template object& operator +=(object& l, R const& r) { return l += object(r); } + object& operator -=(object& l, object const& r); template object& operator -=(object& l, R const& r) { return l -= object(r); } + object& operator *=(object& l, object const& r); template object& operator *=(object& l, R const& r) { return l *= object(r); } + object& operator /=(object& l, object const& r); template object& operator /=(object& l, R const& r) { return l /= object(r); } + object& operator %=(object& l, object const& r); template object& operator %=(object& l, R const& r) { return l %= object(r); } + object& operator <<=(object& l, object const& r); template object& operator <<=(object& l, R const& r) { return l <<= object(r); } + object& operator >>=(object& l, object const& r); template object& operator >>=(object& l, R const& r) { return l >>= object(r); } + object& operator &=(object& l, object const& r); template object& operator &=(object& l, R const& r) { return l &= object(r); } + object& operator ^=(object& l, object const& r); template object& operator ^=(object& l, R const& r) { return l ^= object(r); } + object& operator |=(object& l, object const& r); template object& operator |=(object& l, R const& r) { return l |= object(r); } + + +}}} + +# 1 "/usr/include/boost-1_42/boost/iterator/detail/config_undef.hpp" 1 +# 135 "/usr/include/boost-1_42/boost/python/object_operators.hpp" 2 +# 10 "/usr/include/boost-1_42/boost/python/proxy.hpp" 2 + +namespace boost { namespace python { namespace api { + +template +class proxy : public object_operators > +{ + typedef typename Policies::key_type key_type; + + + typedef proxy const& assignment_self; + + + + public: + proxy(object const& target, key_type const& key); + operator object() const; + + + proxy const& operator=(assignment_self) const; + + template + inline proxy const& operator=(T const& rhs) const + { + Policies::set(m_target, m_key, object(rhs)); + return *this; + } + + public: + void del() const; + + private: + object m_target; + key_type m_key; +}; + + +template +inline void del(proxy const& x) +{ + x.del(); +} + + + + + +template +inline proxy::proxy(object const& target, key_type const& key) + : m_target(target), m_key(key) +{} + +template +inline proxy::operator object() const +{ + return Policies::get(m_target, m_key); +} + + +template +inline proxy const& proxy::operator=(typename proxy::assignment_self rhs) const +{ + return *this = python::object(rhs); +} +# 81 "/usr/include/boost-1_42/boost/python/proxy.hpp" +template proxy const& operator +=(proxy const& lhs, R const& rhs) { object old(lhs); return lhs = (old += rhs); } +template proxy const& operator -=(proxy const& lhs, R const& rhs) { object old(lhs); return lhs = (old -= rhs); } +template proxy const& operator *=(proxy const& lhs, R const& rhs) { object old(lhs); return lhs = (old *= rhs); } +template proxy const& operator /=(proxy const& lhs, R const& rhs) { object old(lhs); return lhs = (old /= rhs); } +template proxy const& operator %=(proxy const& lhs, R const& rhs) { object old(lhs); return lhs = (old %= rhs); } +template proxy const& operator <<=(proxy const& lhs, R const& rhs) { object old(lhs); return lhs = (old <<= rhs); } +template proxy const& operator >>=(proxy const& lhs, R const& rhs) { object old(lhs); return lhs = (old >>= rhs); } +template proxy const& operator &=(proxy const& lhs, R const& rhs) { object old(lhs); return lhs = (old &= rhs); } +template proxy const& operator ^=(proxy const& lhs, R const& rhs) { object old(lhs); return lhs = (old ^= rhs); } +template proxy const& operator |=(proxy const& lhs, R const& rhs) { object old(lhs); return lhs = (old |= rhs); } + + +template +inline void proxy::del() const +{ + Policies::del(m_target, m_key); +} + +}}} +# 11 "/usr/include/boost-1_42/boost/python/object_attributes.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/object_protocol.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/object_protocol.hpp" +# 1 "/usr/include/boost-1_42/boost/python/object_protocol_core.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/python/object_protocol_core.hpp" +namespace boost { namespace python { + +namespace api +{ + class object; + + object getattr(object const& target, object const& key); + object getattr(object const& target, object const& key, object const& default_); + void setattr(object const& target, object const& key, object const& value); + void delattr(object const& target, object const& key); + + + + object getattr(object const& target, char const* key); + object getattr(object const& target, char const* key, object const& default_); + void setattr(object const& target, char const* key, object const& value); + void delattr(object const& target, char const* key); + + object getitem(object const& target, object const& key); + void setitem(object const& target, object const& key, object const& value); + void delitem(object const& target, object const& key); + + object getslice(object const& target, handle<> const& begin, handle<> const& end); + void setslice(object const& target, handle<> const& begin, handle<> const& end, object const& value); + void delslice(object const& target, handle<> const& begin, handle<> const& end); +} + +using api::getattr; +using api::setattr; +using api::delattr; + +using api::getitem; +using api::setitem; +using api::delitem; + +using api::getslice; +using api::setslice; +using api::delslice; + +}} +# 11 "/usr/include/boost-1_42/boost/python/object_protocol.hpp" 2 + + + + +namespace boost { namespace python { namespace api { +# 26 "/usr/include/boost-1_42/boost/python/object_protocol.hpp" +template +object getattr(Target const& target, Key const& key ) +{ + return getattr(object(target), object(key)); +} + +template +object getattr(Target const& target, Key const& key, Default const& default_ ) +{ + return getattr(object(target), object(key), object(default_)); +} + + +template +void setattr(object const& target, Key const& key, Value const& value ) +{ + setattr(target, object(key), object(value)); +} + +template +void delattr(object const& target, Key const& key ) +{ + delattr(target, object(key)); +} + +template +object getitem(Target const& target, Key const& key ) +{ + return getitem(object(target), object(key)); +} + + +template +void setitem(object const& target, Key const& key, Value const& value ) +{ + setitem(target, object(key), object(value)); +} + +template +void delitem(object const& target, Key const& key ) +{ + delitem(target, object(key)); +} + +template +object getslice(Target const& target, Begin const& begin, End const& end) +{ + return getslice(object(target), object(begin), object(end)); +} + +template +void setslice(object const& target, Begin const& begin, End const& end, Value const& value) +{ + setslice(target, object(begin), object(end), object(value)); +} + +template +void delslice(object const& target, Begin const& begin, End const& end) +{ + delslice(target, object(begin), object(end)); +} + +}}} +# 13 "/usr/include/boost-1_42/boost/python/object_attributes.hpp" 2 + +namespace boost { namespace python { namespace api { + +struct const_attribute_policies +{ + typedef char const* key_type; + static object get(object const& target, char const* key); + static object get(object const& target, object const& key); +}; + +struct attribute_policies : const_attribute_policies +{ + static object const& set(object const& target, char const* key, object const& value); + static void del(object const&target, char const* key); +}; + +struct const_objattribute_policies +{ + typedef object const key_type; + static object get(object const& target, object const& key); +}; + +struct objattribute_policies : const_objattribute_policies +{ + static object const& set(object const& target, object const& key, object const& value); + static void del(object const&target, object const& key); +}; + + + + +template +inline object_attribute object_operators::attr(char const* name) +{ + object_cref2 x = *static_cast(this); + return object_attribute(x, name); +} + +template +inline const_object_attribute object_operators::attr(char const* name) const +{ + object_cref2 x = *static_cast(this); + return const_object_attribute(x, name); +} + +template +inline object_objattribute object_operators::attr(object const& name) +{ + object_cref2 x = *static_cast(this); + return object_objattribute(x, name); +} + +template +inline const_object_objattribute object_operators::attr(object const& name) const +{ + object_cref2 x = *static_cast(this); + return const_object_objattribute(x, name); +} + +inline object const_attribute_policies::get(object const& target, char const* key) +{ + return python::getattr(target, key); +} + +inline object const_objattribute_policies::get(object const& target, object const& key) +{ + return python::getattr(target, key); +} + +inline object const& attribute_policies::set( + object const& target + , char const* key + , object const& value) +{ + python::setattr(target, key, value); + return value; +} + +inline object const& objattribute_policies::set( + object const& target + , object const& key + , object const& value) +{ + python::setattr(target, key, value); + return value; +} + +inline void attribute_policies::del( + object const& target + , char const* key) +{ + python::delattr(target, key); +} + +inline void objattribute_policies::del( + object const& target + , object const& key) +{ + python::delattr(target, key); +} + +}}} +# 11 "/usr/include/boost-1_42/boost/python/object.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/object_items.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/python/object_items.hpp" +namespace boost { namespace python { namespace api { + +struct const_item_policies +{ + typedef object key_type; + static object get(object const& target, object const& key); +}; + +struct item_policies : const_item_policies +{ + static object const& set(object const& target, object const& key, object const& value); + static void del(object const& target, object const& key); +}; + + + + +template +inline object_item +object_operators::operator[](object_cref key) +{ + object_cref2 x = *static_cast(this); + return object_item(x, key); +} + +template +inline const_object_item +object_operators::operator[](object_cref key) const +{ + object_cref2 x = *static_cast(this); + return const_object_item(x, key); +} + + +template +template +inline const_object_item +object_operators::operator[](T const& key) const +{ + return (*this)[object(key)]; +} + +template +template +inline object_item +object_operators::operator[](T const& key) +{ + return (*this)[object(key)]; +} + + + +inline object const_item_policies::get(object const& target, object const& key) +{ + return getitem(target, key); +} + +inline object const& item_policies::set( + object const& target + , object const& key + , object const& value) +{ + setitem(target, key, value); + return value; +} + +inline void item_policies::del( + object const& target + , object const& key) +{ + delitem(target, key); +} + +}}} +# 12 "/usr/include/boost-1_42/boost/python/object.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/object_slices.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/python/object_slices.hpp" +namespace boost { namespace python { namespace api { + +struct const_slice_policies +{ + typedef std::pair, handle<> > key_type; + static object get(object const& target, key_type const& key); +}; + +struct slice_policies : const_slice_policies +{ + static object const& set(object const& target, key_type const& key, object const& value); + static void del(object const& target, key_type const& key); +}; + +template +inline slice_policies::key_type slice_key(T x, U y) +{ + return slice_policies::key_type(handle<>(x), handle<>(y)); +} + + + + +template +object_slice +object_operators::slice(object_cref start, object_cref finish) +{ + object_cref2 x = *static_cast(this); + return object_slice(x, api::slice_key(borrowed(start.ptr()), borrowed(finish.ptr()))); +} + +template +const_object_slice +object_operators::slice(object_cref start, object_cref finish) const +{ + object_cref2 x = *static_cast(this); + return const_object_slice(x, api::slice_key(borrowed(start.ptr()), borrowed(finish.ptr()))); +} + +template +object_slice +object_operators::slice(slice_nil, object_cref finish) +{ + object_cref2 x = *static_cast(this); + return object_slice(x, api::slice_key(allow_null((PyObject*)0), borrowed(finish.ptr()))); +} + +template +const_object_slice +object_operators::slice(slice_nil, object_cref finish) const +{ + object_cref2 x = *static_cast(this); + return const_object_slice(x, api::slice_key(allow_null((PyObject*)0), borrowed(finish.ptr()))); +} + +template +object_slice +object_operators::slice(slice_nil, slice_nil) +{ + object_cref2 x = *static_cast(this); + return object_slice(x, api::slice_key(allow_null((PyObject*)0), allow_null((PyObject*)0))); +} + +template +const_object_slice +object_operators::slice(slice_nil, slice_nil) const +{ + object_cref2 x = *static_cast(this); + return const_object_slice(x, api::slice_key(allow_null((PyObject*)0), allow_null((PyObject*)0))); +} + +template +object_slice +object_operators::slice(object_cref start, slice_nil) +{ + object_cref2 x = *static_cast(this); + return object_slice(x, api::slice_key(borrowed(start.ptr()), allow_null((PyObject*)0))); +} + +template +const_object_slice +object_operators::slice(object_cref start, slice_nil) const +{ + object_cref2 x = *static_cast(this); + return const_object_slice(x, api::slice_key(borrowed(start.ptr()), allow_null((PyObject*)0))); +} + +template +template +inline const_object_slice +object_operators::slice(T const& start, V const& end) const +{ + return this->slice( + typename slice_bound::type(start) + , typename slice_bound::type(end)); +} + +template +template +inline object_slice +object_operators::slice(T const& start, V const& end) +{ + return this->slice( + typename slice_bound::type(start) + , typename slice_bound::type(end)); +} + + + +inline object const_slice_policies::get(object const& target, key_type const& key) +{ + return getslice(target, key.first, key.second); +} + +inline object const& slice_policies::set( + object const& target + , key_type const& key + , object const& value) +{ + setslice(target, key.first, key.second, value); + return value; +} + +inline void slice_policies::del( + object const& target + , key_type const& key) +{ + delslice(target, key.first, key.second); +} + +}}} +# 13 "/usr/include/boost-1_42/boost/python/object.hpp" 2 + + + +namespace boost { namespace python { + + inline ssize_t len(object const& obj) + { + ssize_t result = PyObject_Size(obj.ptr()); + if (PyErr_Occurred()) throw_error_already_set(); + return result; + } + +}} +# 16 "/usr/include/boost-1_42/boost/python/class.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/data_members.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/python/data_members.hpp" +# 1 "/usr/include/boost-1_42/boost/python/return_value_policy.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/return_value_policy.hpp" +namespace boost { namespace python { + +template +struct return_value_policy : BasePolicy_ +{ + typedef ResultConverterGenerator result_converter; +}; + +}} +# 13 "/usr/include/boost-1_42/boost/python/data_members.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/return_by_value.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/python/return_by_value.hpp" +namespace boost { namespace python { + +struct return_by_value +{ + template + struct apply + { + typedef to_python_value< + typename detail::value_arg::type + > type; + }; +}; + +}} +# 14 "/usr/include/boost-1_42/boost/python/data_members.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/return_internal_reference.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/return_internal_reference.hpp" +# 1 "/usr/include/boost-1_42/boost/python/reference_existing_object.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/python/reference_existing_object.hpp" +namespace boost { namespace python { + +namespace detail +{ + template + struct reference_existing_object_requires_a_pointer_or_reference_return_type + + {} + + ; +} + +template struct to_python_value; + +struct reference_existing_object +{ + template + struct apply + { + static const bool ok = is_pointer::value || is_reference::value + ; + + typedef typename mpl::if_c< + ok + , to_python_indirect + , detail::reference_existing_object_requires_a_pointer_or_reference_return_type + >::type type; + }; +}; + +}} +# 12 "/usr/include/boost-1_42/boost/python/return_internal_reference.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/with_custodian_and_ward.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/with_custodian_and_ward.hpp" +# 1 "/usr/include/boost-1_42/boost/python/object/life_support.hpp" 1 +# 9 "/usr/include/boost-1_42/boost/python/object/life_support.hpp" +namespace boost { namespace python { namespace objects { + + PyObject* make_nurse_and_patient(PyObject* nurse, PyObject* patient); + +}}} +# 12 "/usr/include/boost-1_42/boost/python/with_custodian_and_ward.hpp" 2 + + +namespace boost { namespace python { + +namespace detail +{ + template + struct get_prev + { + template + static PyObject* execute(ArgumentPackage const& args, PyObject* = 0) + { + int const pre_n = static_cast(N) - 1; + return detail::get(mpl::int_(), args); + } + }; + template <> + struct get_prev<0> + { + template + static PyObject* execute(ArgumentPackage const&, PyObject* zeroth) + { + return zeroth; + } + }; +} +template < + std::size_t custodian + , std::size_t ward + , class BasePolicy_ = default_call_policies +> +struct with_custodian_and_ward : BasePolicy_ +{ + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((custodian != ward) == 0 ? false : true) >)> boost_static_assert_typedef_45; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((custodian > 0) == 0 ? false : true) >)> boost_static_assert_typedef_46; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((ward > 0) == 0 ? false : true) >)> boost_static_assert_typedef_47; + + template + static bool precall(ArgumentPackage const& args_) + { + unsigned arity_ = detail::arity(args_); + if (custodian > arity_ || ward > arity_) + { + PyErr_SetString( + PyExc_IndexError + , "boost::python::with_custodian_and_ward: argument index out of range" + ); + return false; + } + + PyObject* patient = detail::get_prev::execute(args_); + PyObject* nurse = detail::get_prev::execute(args_); + + PyObject* life_support = python::objects::make_nurse_and_patient(nurse, patient); + if (life_support == 0) + return false; + + bool result = BasePolicy_::precall(args_); + + if (!result) { + if ( --((PyObject*)(life_support))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(life_support)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(life_support)))); + } + + return result; + } +}; + +template +struct with_custodian_and_ward_postcall : BasePolicy_ +{ + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((custodian != ward) == 0 ? false : true) >)> boost_static_assert_typedef_82; + + template + static PyObject* postcall(ArgumentPackage const& args_, PyObject* result) + { + std::size_t arity_ = detail::arity(args_); + + + + + + + if ( (std::max)(custodian, ward) > arity_ ) + + { + PyErr_SetString( + PyExc_IndexError + , "boost::python::with_custodian_and_ward_postcall: argument index out of range" + ); + return 0; + } + + PyObject* patient = detail::get_prev::execute(args_, result); + PyObject* nurse = detail::get_prev::execute(args_, result); + + if (nurse == 0) return 0; + + result = BasePolicy_::postcall(args_, result); + if (result == 0) + return 0; + + if (python::objects::make_nurse_and_patient(nurse, patient) == 0) + { + if ((result) == __null) ; else if ( --((PyObject*)(result))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(result)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(result)))); + return 0; + } + return result; + } +}; + + +}} +# 13 "/usr/include/boost-1_42/boost/python/return_internal_reference.hpp" 2 + + +namespace boost { namespace python { + +namespace detail +{ + template + struct return_internal_reference_owner_arg_must_be_greater_than_zero + + {} + + ; +} + +template +struct return_internal_reference + : with_custodian_and_ward_postcall<0, owner_arg, BasePolicy_> +{ + private: + static const bool legal = owner_arg > 0; + public: + typedef typename mpl::if_c< + legal + , reference_existing_object + , detail::return_internal_reference_owner_arg_must_be_greater_than_zero + >::type result_converter; +}; + +}} +# 15 "/usr/include/boost-1_42/boost/python/data_members.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/make_function.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/python/make_function.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/make_function.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/object/function_object.hpp" 1 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/function/function2.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/function/function2.hpp" +# 1 "/usr/include/boost-1_42/boost/function/detail/maybe_include.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/function/detail/maybe_include.hpp" +# 1 "/usr/include/boost-1_42/boost/function/function_template.hpp" 1 +# 81 "/usr/include/boost-1_42/boost/function/function_template.hpp" +namespace boost { + namespace detail { + namespace function { + template< + typename FunctionPtr, + typename R , + typename T0 , typename T1 + > + struct function_invoker2 + { + static R invoke(function_buffer& function_ptr , + T0 a0 , T1 a1) + { + FunctionPtr f = reinterpret_cast(function_ptr.func_ptr); + return f( a0 , a1); + } + }; + + template< + typename FunctionPtr, + typename R , + typename T0 , typename T1 + > + struct void_function_invoker2 + { + static void + invoke(function_buffer& function_ptr , + T0 a0 , T1 a1) + + { + FunctionPtr f = reinterpret_cast(function_ptr.func_ptr); + f( a0 , a1); + } + }; + + template< + typename FunctionObj, + typename R , + typename T0 , typename T1 + > + struct function_obj_invoker2 + { + static R invoke(function_buffer& function_obj_ptr , + T0 a0 , T1 a1) + + { + FunctionObj* f; + if (function_allows_small_object_optimization::value) + f = reinterpret_cast(&function_obj_ptr.data); + else + f = reinterpret_cast(function_obj_ptr.obj_ptr); + return (*f)( a0 , a1); + } + }; + + template< + typename FunctionObj, + typename R , + typename T0 , typename T1 + > + struct void_function_obj_invoker2 + { + static void + invoke(function_buffer& function_obj_ptr , + T0 a0 , T1 a1) + + { + FunctionObj* f; + if (function_allows_small_object_optimization::value) + f = reinterpret_cast(&function_obj_ptr.data); + else + f = reinterpret_cast(function_obj_ptr.obj_ptr); + (*f)( a0 , a1); + } + }; + + template< + typename FunctionObj, + typename R , + typename T0 , typename T1 + > + struct function_ref_invoker2 + { + static R invoke(function_buffer& function_obj_ptr , + T0 a0 , T1 a1) + + { + FunctionObj* f = + reinterpret_cast(function_obj_ptr.obj_ptr); + return (*f)( a0 , a1); + } + }; + + template< + typename FunctionObj, + typename R , + typename T0 , typename T1 + > + struct void_function_ref_invoker2 + { + static void + invoke(function_buffer& function_obj_ptr , + T0 a0 , T1 a1) + + { + FunctionObj* f = + reinterpret_cast(function_obj_ptr.obj_ptr); + (*f)( a0 , a1); + } + }; + + + + template< + typename MemberPtr, + typename R , + typename T0 , typename T1 + > + struct function_mem_invoker2 + { + static R invoke(function_buffer& function_obj_ptr , + T0 a0 , T1 a1) + + { + MemberPtr* f = + reinterpret_cast(&function_obj_ptr.data); + return boost::mem_fn(*f)( a0 , a1); + } + }; + + template< + typename MemberPtr, + typename R , + typename T0 , typename T1 + > + struct function_void_mem_invoker2 + { + static void + invoke(function_buffer& function_obj_ptr , + T0 a0 , T1 a1) + + { + MemberPtr* f = + reinterpret_cast(&function_obj_ptr.data); + boost::mem_fn(*f)( a0 , a1); + } + }; + + + template< + typename FunctionPtr, + typename R , + typename T0 , typename T1 + > + struct get_function_invoker2 + { + typedef typename mpl::if_c<(is_void::value), + void_function_invoker2< + FunctionPtr, + R , + T0 , T1 + >, + function_invoker2< + FunctionPtr, + R , + T0 , T1 + > + >::type type; + }; + + template< + typename FunctionObj, + typename R , + typename T0 , typename T1 + > + struct get_function_obj_invoker2 + { + typedef typename mpl::if_c<(is_void::value), + void_function_obj_invoker2< + FunctionObj, + R , + T0 , T1 + >, + function_obj_invoker2< + FunctionObj, + R , + T0 , T1 + > + >::type type; + }; + + template< + typename FunctionObj, + typename R , + typename T0 , typename T1 + > + struct get_function_ref_invoker2 + { + typedef typename mpl::if_c<(is_void::value), + void_function_ref_invoker2< + FunctionObj, + R , + T0 , T1 + >, + function_ref_invoker2< + FunctionObj, + R , + T0 , T1 + > + >::type type; + }; + + + + template< + typename MemberPtr, + typename R , + typename T0 , typename T1 + > + struct get_member_invoker2 + { + typedef typename mpl::if_c<(is_void::value), + function_void_mem_invoker2< + MemberPtr, + R , + T0 , T1 + >, + function_mem_invoker2< + MemberPtr, + R , + T0 , T1 + > + >::type type; + }; +# 326 "/usr/include/boost-1_42/boost/function/function_template.hpp" + template + struct get_invoker2 { }; + + + template<> + struct get_invoker2 + { + template + struct apply + { + typedef typename get_function_invoker2< + FunctionPtr, + R , + T0 , T1 + >::type + invoker_type; + + typedef functor_manager manager_type; + }; + + template + struct apply_a + { + typedef typename get_function_invoker2< + FunctionPtr, + R , + T0 , T1 + >::type + invoker_type; + + typedef functor_manager manager_type; + }; + }; + + + + template<> + struct get_invoker2 + { + template + struct apply + { + typedef typename get_member_invoker2< + MemberPtr, + R , + T0 , T1 + >::type + invoker_type; + + typedef functor_manager manager_type; + }; + + template + struct apply_a + { + typedef typename get_member_invoker2< + MemberPtr, + R , + T0 , T1 + >::type + invoker_type; + + typedef functor_manager manager_type; + }; + }; + + + + template<> + struct get_invoker2 + { + template + struct apply + { + typedef typename get_function_obj_invoker2< + FunctionObj, + R , + T0 , T1 + >::type + invoker_type; + + typedef functor_manager manager_type; + }; + + template + struct apply_a + { + typedef typename get_function_obj_invoker2< + FunctionObj, + R , + T0 , T1 + >::type + invoker_type; + + typedef functor_manager_a manager_type; + }; + }; + + + template<> + struct get_invoker2 + { + template + struct apply + { + typedef typename get_function_ref_invoker2< + typename RefWrapper::type, + R , + T0 , T1 + >::type + invoker_type; + + typedef reference_manager manager_type; + }; + + template + struct apply_a + { + typedef typename get_function_ref_invoker2< + typename RefWrapper::type, + R , + T0 , T1 + >::type + invoker_type; + + typedef reference_manager manager_type; + }; + }; +# 475 "/usr/include/boost-1_42/boost/function/function_template.hpp" + template + struct basic_vtable2 + { + + typedef R result_type; + + + + + typedef result_type (*invoker_type)(function_buffer& + , + T0 , T1); + + template + bool assign_to(F f, function_buffer& functor) + { + typedef typename get_function_tag::type tag; + return assign_to(f, functor, tag()); + } + template + bool assign_to_a(F f, function_buffer& functor, Allocator a) + { + typedef typename get_function_tag::type tag; + return assign_to_a(f, functor, a, tag()); + } + + void clear(function_buffer& functor) + { + if (base.manager) + base.manager(functor, functor, destroy_functor_tag); + } + + private: + + template + bool + assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) + { + this->clear(functor); + if (f) { + + + functor.func_ptr = (void (*)())(f); + return true; + } else { + return false; + } + } + template + bool + assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) + { + return assign_to(f,functor,function_ptr_tag()); + } + + + + template + bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) + { + + + + if (f) { + this->assign_to(mem_fn(f), functor); + return true; + } else { + return false; + } + } + template + bool assign_to_a(MemberPtr f, function_buffer& functor, Allocator a, member_ptr_tag) + { + + + + if (f) { + this->assign_to_a(mem_fn(f), functor, a); + return true; + } else { + return false; + } + } + + + + + template + void + assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) + { + new ((void*)&functor.data) FunctionObj(f); + } + template + void + assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) + { + assign_functor(f,functor,mpl::true_()); + } + + + template + void + assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) + { + functor.obj_ptr = new FunctionObj(f); + } + template + void + assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) + { + typedef functor_wrapper functor_wrapper_type; + typedef typename Allocator::template rebind::other + wrapper_allocator_type; + typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type; + wrapper_allocator_type wrapper_allocator(a); + wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1); + wrapper_allocator.construct(copy, functor_wrapper_type(f,a)); + functor_wrapper_type* new_f = static_cast(copy); + functor.obj_ptr = new_f; + } + + template + bool + assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) + { + if (!boost::detail::function::has_empty_target(boost::addressof(f))) { + assign_functor(f, functor, + mpl::bool_<(function_allows_small_object_optimization::value)>()); + return true; + } else { + return false; + } + } + template + bool + assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) + { + if (!boost::detail::function::has_empty_target(boost::addressof(f))) { + assign_functor_a(f, functor, a, + mpl::bool_<(function_allows_small_object_optimization::value)>()); + return true; + } else { + return false; + } + } + + + template + bool + assign_to(const reference_wrapper& f, + function_buffer& functor, function_obj_ref_tag) + { + functor.obj_ref.obj_ptr = (void *)f.get_pointer(); + functor.obj_ref.is_const_qualified = is_const::value; + functor.obj_ref.is_volatile_qualified = is_volatile::value; + return true; + } + template + bool + assign_to_a(const reference_wrapper& f, + function_buffer& functor, Allocator, function_obj_ref_tag) + { + return assign_to(f,functor,function_obj_ref_tag()); + } + + public: + vtable_base base; + invoker_type invoker; + }; + } + } + + template< + typename R , + typename T0 , typename T1 + > + class function2 : public function_base + + + + + + + + , public std::binary_function + + + + { + public: + + typedef R result_type; + + + + + + private: + typedef boost::detail::function::basic_vtable2< + R , T0 , T1> + vtable_type; + + vtable_type* get_vtable() const { + return reinterpret_cast( + reinterpret_cast(vtable) & ~(std::size_t)0x01); + } + + struct clear_type {}; + + public: + static const int args = 2; + + + template + struct sig + { + typedef result_type type; + }; + + + + + typedef T0 first_argument_type; + typedef T1 second_argument_type; + + + static const int arity = 2; + typedef T0 arg1_type; typedef T1 arg2_type; + + typedef function2 self_type; + + function2() : function_base() { } + + + + template + function2(Functor f + + ,typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + int>::type = 0 + + ) : + function_base() + { + this->assign_to(f); + } + template + function2(Functor f, Allocator a + + ,typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + int>::type = 0 + + ) : + function_base() + { + this->assign_to_a(f,a); + } + + + function2(clear_type*) : function_base() { } + + + + + + + + function2(const function2& f) : function_base() + { + this->assign_to_own(f); + } + + ~function2() { clear(); } +# 766 "/usr/include/boost-1_42/boost/function/function_template.hpp" + result_type operator()( T0 a0 , T1 a1) const; + + + + + + + + template + + typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + function2&>::type + + + + operator=(Functor f) + { + this->clear(); + { try { + this->assign_to(f); + } catch(...) { + vtable = 0; + throw;; + } + } + return *this; + } + template + void assign(Functor f, Allocator a) + { + this->clear(); + { try{ + this->assign_to_a(f,a); + } catch(...) { + vtable = 0; + throw;; + } + } + } + + + function2& operator=(clear_type*) + { + this->clear(); + return *this; + } +# 824 "/usr/include/boost-1_42/boost/function/function_template.hpp" + function2& operator=(const function2& f) + { + if (&f == this) + return *this; + + this->clear(); + { try { + this->assign_to_own(f); + } catch(...) { + vtable = 0; + throw;; + } + } + return *this; + } + + void swap(function2& other) + { + if (&other == this) + return; + + function2 tmp; + tmp.move_assign(*this); + this->move_assign(other); + other.move_assign(tmp); + } + + + void clear() + { + if (vtable) { + if (!this->has_trivial_copy_and_destroy()) + get_vtable()->clear(this->functor); + vtable = 0; + } + } + + + + + + private: + struct dummy { + void nonnull() {}; + }; + + typedef void (dummy::*safe_bool)(); + + public: + operator safe_bool () const + { return (this->empty())? 0 : &dummy::nonnull; } + + bool operator!() const + { return this->empty(); } + + + private: + void assign_to_own(const function2& f) + { + if (!f.empty()) { + this->vtable = f.vtable; + if (this->has_trivial_copy_and_destroy()) + this->functor = f.functor; + else + get_vtable()->base.manager(f.functor, this->functor, + boost::detail::function::clone_functor_tag); + } + } + + template + void assign_to(Functor f) + { + using detail::function::vtable_base; + + typedef typename detail::function::get_function_tag::type tag; + typedef detail::function::get_invoker2 get_invoker; + typedef typename get_invoker:: + template apply + handler_type; + + typedef typename handler_type::invoker_type invoker_type; + typedef typename handler_type::manager_type manager_type; + + + + + + static vtable_type stored_vtable = + { { &manager_type::manage }, &invoker_type::invoke }; + + if (stored_vtable.assign_to(f, functor)) { + std::size_t value = reinterpret_cast(&stored_vtable.base); + if (boost::has_trivial_copy_constructor::value && + boost::has_trivial_destructor::value && + detail::function::function_allows_small_object_optimization::value) + value |= (std::size_t)0x01; + vtable = reinterpret_cast(value); + } else + vtable = 0; + } + + template + void assign_to_a(Functor f,Allocator a) + { + using detail::function::vtable_base; + + typedef typename detail::function::get_function_tag::type tag; + typedef detail::function::get_invoker2 get_invoker; + typedef typename get_invoker:: + template apply_a + handler_type; + + typedef typename handler_type::invoker_type invoker_type; + typedef typename handler_type::manager_type manager_type; + + + + + + static vtable_type stored_vtable = + { { &manager_type::manage }, &invoker_type::invoke }; + + if (stored_vtable.assign_to_a(f, functor, a)) { + std::size_t value = reinterpret_cast(&stored_vtable.base); + if (boost::has_trivial_copy_constructor::value && + boost::has_trivial_destructor::value && + detail::function::function_allows_small_object_optimization::value) + value |= (std::size_t)0x01; + vtable = reinterpret_cast(value); + } else + vtable = 0; + } + + + + + void move_assign(function2& f) + { + if (&f == this) + return; + + { try { + if (!f.empty()) { + this->vtable = f.vtable; + if (this->has_trivial_copy_and_destroy()) + this->functor = f.functor; + else + get_vtable()->base.manager(f.functor, this->functor, + boost::detail::function::move_functor_tag); + f.vtable = 0; + } else { + clear(); + } + } catch(...) { + vtable = 0; + throw;; + } + } + } + }; + + template + inline void swap(function2< + R , + T0 , T1 + >& f1, + function2< + R , + T0 , T1 + >& f2) + { + f1.swap(f2); + } + + + template + typename function2< + R , T0 , T1>::result_type + inline + function2 + ::operator()( T0 a0 , T1 a1) const + { + if (this->empty()) + boost::throw_exception(bad_function_call()); + + return get_vtable()->invoker + (this->functor , a0 , a1); + } + + + +template + void operator==(const function2< + R , + T0 , T1>&, + const function2< + R , + T0 , T1>&); +template + void operator!=(const function2< + R , + T0 , T1>&, + const function2< + R , + T0 , T1>& ); +# 1041 "/usr/include/boost-1_42/boost/function/function_template.hpp" +template +class function + : public function2 +{ + typedef function2 base_type; + typedef function self_type; + + struct clear_type {}; + +public: + + function() : base_type() {} + + template + function(Functor f + + ,typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + int>::type = 0 + + ) : + base_type(f) + { + } + template + function(Functor f, Allocator a + + ,typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + int>::type = 0 + + ) : + base_type(f,a) + { + } + + + function(clear_type*) : base_type() {} + + + function(const self_type& f) : base_type(static_cast(f)){} + + function(const base_type& f) : base_type(static_cast(f)){} + + self_type& operator=(const self_type& f) + { + self_type(f).swap(*this); + return *this; + } + + template + + typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + self_type&>::type + + + + operator=(Functor f) + { + self_type(f).swap(*this); + return *this; + } + + + self_type& operator=(clear_type*) + { + this->clear(); + return *this; + } + + + self_type& operator=(const base_type& f) + { + self_type(f).swap(*this); + return *this; + } +}; + + + + +} +# 24 "/usr/include/boost-1_42/boost/function/detail/maybe_include.hpp" 2 +# 12 "/usr/include/boost-1_42/boost/function/function2.hpp" 2 +# 9 "/usr/include/boost-1_42/boost/python/object/function_object.hpp" 2 + + + + +namespace boost { namespace python { + +namespace objects +{ + api::object function_object( + py_function const& f + , python::detail::keyword_range const&); + + api::object function_object( + py_function const& f + , python::detail::keyword_range const&); + + api::object function_object(py_function const& f); + + + + + + void add_to_namespace( + object const& name_space, char const* name, object const& attribute); + + void add_to_namespace( + object const& name_space, char const* name, object const& attribute, char const* doc); +} + +}} +# 15 "/usr/include/boost-1_42/boost/python/make_function.hpp" 2 + + + + +namespace boost { namespace python { + +namespace detail +{ + + + + + + + template + object make_function_aux( + F f + , CallPolicies const& p + , Sig const& + ) + { + return objects::function_object( + detail::caller(f, p) + ); + } + + + + + + template + object make_function_aux( + F f + , CallPolicies const& p + , Sig const& + , detail::keyword_range const& kw + , NumKeywords + ) + { + enum { arity = mpl::size::value - 1 }; + + typedef typename detail::error::more_keywords_than_function_arguments< + NumKeywords::value, arity + >::too_many_keywords assertion; + + return objects::function_object( + detail::caller(f, p) + , kw); + } + + + + + + + template + object make_function_dispatch(F f, CallPolicies const& policies, Keywords const& kw, mpl::true_) + { + return detail::make_function_aux( + f + , policies + , detail::get_signature(f) + , kw.range() + , mpl::int_() + ); + } + + template + object make_function_dispatch(F f, CallPolicies const& policies, Signature const& sig, mpl::false_) + { + return detail::make_function_aux( + f + , policies + , sig + ); + } + + + } + + + + + + +template +object make_function(F f) +{ + return detail::make_function_aux( + f,default_call_policies(), detail::get_signature(f)); +} + +template +object make_function(F f, CallPolicies const& policies) +{ + return detail::make_function_aux( + f, policies, detail::get_signature(f)); +} + +template +object make_function( + F f + , CallPolicies const& policies + , KeywordsOrSignature const& keywords_or_signature) +{ + typedef typename + detail::is_reference_to_keywords::type + is_kw; + + return detail::make_function_dispatch( + f + , policies + , keywords_or_signature + , is_kw() + ); +} + +template +object make_function( + F f + , CallPolicies const& policies + , Keywords const& kw + , Signature const& sig + ) +{ + return detail::make_function_aux( + f + , policies + , sig + , kw.range() + , mpl::int_() + ); +} + + +}} +# 16 "/usr/include/boost-1_42/boost/python/data_members.hpp" 2 +# 37 "/usr/include/boost-1_42/boost/python/data_members.hpp" +namespace boost { namespace python { +# 46 "/usr/include/boost-1_42/boost/python/data_members.hpp" +namespace detail +{ + + + + template + struct member + { + public: + member(Data Class::*which) : m_which(which) {} + + Data& operator()(Class& c) const + { + return c.*m_which; + } + + void operator()(Class& c, typename value_arg::type d) const + { + c.*m_which = d; + } + private: + Data Class::*m_which; + }; + + + + template + struct datum + { + public: + datum(Data *which) : m_which(which) {} + + Data& operator()() const + { + return *m_which; + } + + void operator()(typename value_arg::type d) const + { + *m_which = d; + } + private: + Data *m_which; + }; +# 102 "/usr/include/boost-1_42/boost/python/data_members.hpp" + template + struct default_getter_by_ref + : mpl::and_< + mpl::bool_< + to_python_value< + typename value_arg::type + >::uses_registry + > + , indirect_traits::is_reference_to_class< + typename value_arg::type + > + > + { + }; +# 125 "/usr/include/boost-1_42/boost/python/data_members.hpp" + template + struct default_member_getter_policy + : mpl::if_< + default_getter_by_ref + , return_internal_reference<> + , return_value_policy + > + {}; + + + + template + struct default_datum_getter_policy + : mpl::if_< + default_getter_by_ref + , return_value_policy + , return_value_policy + > + {}; +# 162 "/usr/include/boost-1_42/boost/python/data_members.hpp" + template + inline object make_getter(D* d, Policies const& policies, mpl::false_, int) + { + return python::make_function( + detail::datum(d), policies, mpl::vector1() + ); + } + + + template + inline object make_getter(D* d, not_specified, mpl::false_, long) + { + typedef typename default_datum_getter_policy::type policies; + return detail::make_getter(d, policies(), mpl::false_(), 0); + } + + + template + inline object make_getter(D C::*pm, Policies const& policies, mpl::true_, int) + { + + + + typedef C Class; + + return python::make_function( + detail::member(pm) + , policies + , mpl::vector2() + ); + } + + + template + inline object make_getter(D C::*pm, not_specified, mpl::true_, long) + { + typedef typename default_member_getter_policy::type policies; + return detail::make_getter(pm, policies(), mpl::true_(), 0); + } + + + template + inline object make_getter(D& d, P& p, mpl::false_, ...) + { + + return detail::make_getter(&d, p, mpl::false_(), 0L); + } +# 219 "/usr/include/boost-1_42/boost/python/data_members.hpp" + template + inline object make_setter(D* p, Policies const& policies, mpl::false_, int) + { + return python::make_function( + detail::datum(p), policies, mpl::vector2() + ); + } + + + template + inline object make_setter(D C::*pm, Policies const& policies, mpl::true_, int) + { + return python::make_function( + detail::member(pm) + , policies + , mpl::vector3() + ); + } + + + template + inline object make_setter(D& x, Policies const& policies, mpl::false_, ...) + { + return detail::make_setter(&x, policies, mpl::false_(), 0L); + } +} +# 253 "/usr/include/boost-1_42/boost/python/data_members.hpp" +template +inline object make_getter(D& d, Policies const& policies) +{ + return detail::make_getter(d, policies, is_member_pointer(), 0L); +} + +template +inline object make_getter(D const& d, Policies const& policies) +{ + return detail::make_getter(d, policies, is_member_pointer(), 0L); +} + +template +inline object make_getter(D& x) +{ + detail::not_specified policy + = detail::not_specified(); + return detail::make_getter(x, policy, is_member_pointer(), 0L); +} + + +template +inline object make_getter(D const& d) +{ + detail::not_specified policy + = detail::not_specified(); + return detail::make_getter(d, policy, is_member_pointer(), 0L); +} +# 290 "/usr/include/boost-1_42/boost/python/data_members.hpp" +template +inline object make_setter(D& x, Policies const& policies) +{ + return detail::make_setter(x, policies, is_member_pointer(), 0); +} + +template +inline object make_setter(D const& x, Policies const& policies) +{ + return detail::make_setter(x, policies, is_member_pointer(), 0); +} + +template +inline object make_setter(D& x) +{ + return detail::make_setter(x, default_call_policies(), is_member_pointer(), 0); +} + + +template +inline object make_setter(D const& x) +{ + return detail::make_setter(x, default_call_policies(), is_member_pointer(), 0); +} + + +}} +# 18 "/usr/include/boost-1_42/boost/python/class.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/python/class.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/init.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/python/init.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/make_keyword_range_fn.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/detail/make_keyword_range_fn.hpp" +# 1 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 1 +# 32 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 33 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 2 + +namespace boost { namespace python { namespace objects { + +template struct make_holder; + + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 47 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 1 +# 56 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" + + + + +template <> +struct make_holder<0> +{ + template + struct apply + { +# 82 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" + static void execute( + + + + PyObject *p + + ) + { + typedef instance instance_t; + + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p ))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +# 48 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 1 +# 56 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" + + + + +template <> +struct make_holder<1> +{ + template + struct apply + { + + + + + typedef typename mpl::begin::type iter0; +# 79 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; +# 80 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 2 + + + static void execute( + + + + PyObject *p + + , t0 a0) + { + typedef instance instance_t; + + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +# 53 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 1 +# 56 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" + + + + +template <> +struct make_holder<2> +{ + template + struct apply + { + + + + + typedef typename mpl::begin::type iter0; +# 79 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + + + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; +# 80 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 2 + + + static void execute( + + + + PyObject *p + + , t0 a0 , t1 a1) + { + typedef instance instance_t; + + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +# 58 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 1 +# 56 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" + + + + +template <> +struct make_holder<3> +{ + template + struct apply + { + + + + + typedef typename mpl::begin::type iter0; +# 79 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + + + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + + + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; +# 80 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 2 + + + static void execute( + + + + PyObject *p + + , t0 a0 , t1 a1 , t2 a2) + { + typedef instance instance_t; + + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +# 63 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 1 +# 56 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" + + + + +template <> +struct make_holder<4> +{ + template + struct apply + { + + + + + typedef typename mpl::begin::type iter0; +# 79 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + + + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + + + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + + + typedef typename mpl::deref::type t3; typedef typename forward::type f3; typedef typename mpl::next::type iter4; +# 80 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 2 + + + static void execute( + + + + PyObject *p + + , t0 a0 , t1 a1 , t2 a2 , t3 a3) + { + typedef instance instance_t; + + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2) , f3(a3)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +# 68 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 1 +# 56 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" + + + + +template <> +struct make_holder<5> +{ + template + struct apply + { + + + + + typedef typename mpl::begin::type iter0; +# 79 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + + + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + + + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + + + typedef typename mpl::deref::type t3; typedef typename forward::type f3; typedef typename mpl::next::type iter4; + + + typedef typename mpl::deref::type t4; typedef typename forward::type f4; typedef typename mpl::next::type iter5; +# 80 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 2 + + + static void execute( + + + + PyObject *p + + , t0 a0 , t1 a1 , t2 a2 , t3 a3 , t4 a4) + { + typedef instance instance_t; + + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2) , f3(a3) , f4(a4)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +# 73 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 1 +# 56 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" + + + + +template <> +struct make_holder<6> +{ + template + struct apply + { + + + + + typedef typename mpl::begin::type iter0; +# 79 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + + + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + + + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + + + typedef typename mpl::deref::type t3; typedef typename forward::type f3; typedef typename mpl::next::type iter4; + + + typedef typename mpl::deref::type t4; typedef typename forward::type f4; typedef typename mpl::next::type iter5; + + + typedef typename mpl::deref::type t5; typedef typename forward::type f5; typedef typename mpl::next::type iter6; +# 80 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 2 + + + static void execute( + + + + PyObject *p + + , t0 a0 , t1 a1 , t2 a2 , t3 a3 , t4 a4 , t5 a5) + { + typedef instance instance_t; + + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2) , f3(a3) , f4(a4) , f5(a5)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +# 78 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 1 +# 56 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" + + + + +template <> +struct make_holder<7> +{ + template + struct apply + { + + + + + typedef typename mpl::begin::type iter0; +# 79 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + + + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + + + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + + + typedef typename mpl::deref::type t3; typedef typename forward::type f3; typedef typename mpl::next::type iter4; + + + typedef typename mpl::deref::type t4; typedef typename forward::type f4; typedef typename mpl::next::type iter5; + + + typedef typename mpl::deref::type t5; typedef typename forward::type f5; typedef typename mpl::next::type iter6; + + + typedef typename mpl::deref::type t6; typedef typename forward::type f6; typedef typename mpl::next::type iter7; +# 80 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 2 + + + static void execute( + + + + PyObject *p + + , t0 a0 , t1 a1 , t2 a2 , t3 a3 , t4 a4 , t5 a5 , t6 a6) + { + typedef instance instance_t; + + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2) , f3(a3) , f4(a4) , f5(a5) , f6(a6)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +# 83 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 1 +# 56 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" + + + + +template <> +struct make_holder<8> +{ + template + struct apply + { + + + + + typedef typename mpl::begin::type iter0; +# 79 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + + + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + + + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + + + typedef typename mpl::deref::type t3; typedef typename forward::type f3; typedef typename mpl::next::type iter4; + + + typedef typename mpl::deref::type t4; typedef typename forward::type f4; typedef typename mpl::next::type iter5; + + + typedef typename mpl::deref::type t5; typedef typename forward::type f5; typedef typename mpl::next::type iter6; + + + typedef typename mpl::deref::type t6; typedef typename forward::type f6; typedef typename mpl::next::type iter7; + + + typedef typename mpl::deref::type t7; typedef typename forward::type f7; typedef typename mpl::next::type iter8; +# 80 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 2 + + + static void execute( + + + + PyObject *p + + , t0 a0 , t1 a1 , t2 a2 , t3 a3 , t4 a4 , t5 a5 , t6 a6 , t7 a7) + { + typedef instance instance_t; + + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2) , f3(a3) , f4(a4) , f5(a5) , f6(a6) , f7(a7)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +# 88 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 1 +# 56 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" + + + + +template <> +struct make_holder<9> +{ + template + struct apply + { + + + + + typedef typename mpl::begin::type iter0; +# 79 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + + + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + + + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + + + typedef typename mpl::deref::type t3; typedef typename forward::type f3; typedef typename mpl::next::type iter4; + + + typedef typename mpl::deref::type t4; typedef typename forward::type f4; typedef typename mpl::next::type iter5; + + + typedef typename mpl::deref::type t5; typedef typename forward::type f5; typedef typename mpl::next::type iter6; + + + typedef typename mpl::deref::type t6; typedef typename forward::type f6; typedef typename mpl::next::type iter7; + + + typedef typename mpl::deref::type t7; typedef typename forward::type f7; typedef typename mpl::next::type iter8; + + + typedef typename mpl::deref::type t8; typedef typename forward::type f8; typedef typename mpl::next::type iter9; +# 80 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 2 + + + static void execute( + + + + PyObject *p + + , t0 a0 , t1 a1 , t2 a2 , t3 a3 , t4 a4 , t5 a5 , t6 a6 , t7 a7 , t8 a8) + { + typedef instance instance_t; + + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2) , f3(a3) , f4(a4) , f5(a5) , f6(a6) , f7(a7) , f8(a8)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +# 93 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 1 +# 56 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" + + + + +template <> +struct make_holder<10> +{ + template + struct apply + { + + + + + typedef typename mpl::begin::type iter0; +# 79 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + + + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + + + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + + + typedef typename mpl::deref::type t3; typedef typename forward::type f3; typedef typename mpl::next::type iter4; + + + typedef typename mpl::deref::type t4; typedef typename forward::type f4; typedef typename mpl::next::type iter5; + + + typedef typename mpl::deref::type t5; typedef typename forward::type f5; typedef typename mpl::next::type iter6; + + + typedef typename mpl::deref::type t6; typedef typename forward::type f6; typedef typename mpl::next::type iter7; + + + typedef typename mpl::deref::type t7; typedef typename forward::type f7; typedef typename mpl::next::type iter8; + + + typedef typename mpl::deref::type t8; typedef typename forward::type f8; typedef typename mpl::next::type iter9; + + + typedef typename mpl::deref::type t9; typedef typename forward::type f9; typedef typename mpl::next::type iter10; +# 80 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 2 + + + static void execute( + + + + PyObject *p + + , t0 a0 , t1 a1 , t2 a2 , t3 a3 , t4 a4 , t5 a5 , t6 a6 , t7 a7 , t8 a8 , t9 a9) + { + typedef instance instance_t; + + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2) , f3(a3) , f4(a4) , f5(a5) , f6(a6) , f7(a7) , f8(a8) , f9(a9)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +# 98 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 1 +# 56 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" + + + + +template <> +struct make_holder<11> +{ + template + struct apply + { + + + + + typedef typename mpl::begin::type iter0; +# 79 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + + + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + + + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + + + typedef typename mpl::deref::type t3; typedef typename forward::type f3; typedef typename mpl::next::type iter4; + + + typedef typename mpl::deref::type t4; typedef typename forward::type f4; typedef typename mpl::next::type iter5; + + + typedef typename mpl::deref::type t5; typedef typename forward::type f5; typedef typename mpl::next::type iter6; + + + typedef typename mpl::deref::type t6; typedef typename forward::type f6; typedef typename mpl::next::type iter7; + + + typedef typename mpl::deref::type t7; typedef typename forward::type f7; typedef typename mpl::next::type iter8; + + + typedef typename mpl::deref::type t8; typedef typename forward::type f8; typedef typename mpl::next::type iter9; + + + typedef typename mpl::deref::type t9; typedef typename forward::type f9; typedef typename mpl::next::type iter10; + + + typedef typename mpl::deref::type t10; typedef typename forward::type f10; typedef typename mpl::next::type iter11; +# 80 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 2 + + + static void execute( + + + + PyObject *p + + , t0 a0 , t1 a1 , t2 a2 , t3 a3 , t4 a4 , t5 a5 , t6 a6 , t7 a7 , t8 a8 , t9 a9 , t10 a10) + { + typedef instance instance_t; + + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2) , f3(a3) , f4(a4) , f5(a5) , f6(a6) , f7(a7) , f8(a8) , f9(a9) , f10(a10)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +# 103 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 1 +# 56 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" + + + + +template <> +struct make_holder<12> +{ + template + struct apply + { + + + + + typedef typename mpl::begin::type iter0; +# 79 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + + + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + + + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + + + typedef typename mpl::deref::type t3; typedef typename forward::type f3; typedef typename mpl::next::type iter4; + + + typedef typename mpl::deref::type t4; typedef typename forward::type f4; typedef typename mpl::next::type iter5; + + + typedef typename mpl::deref::type t5; typedef typename forward::type f5; typedef typename mpl::next::type iter6; + + + typedef typename mpl::deref::type t6; typedef typename forward::type f6; typedef typename mpl::next::type iter7; + + + typedef typename mpl::deref::type t7; typedef typename forward::type f7; typedef typename mpl::next::type iter8; + + + typedef typename mpl::deref::type t8; typedef typename forward::type f8; typedef typename mpl::next::type iter9; + + + typedef typename mpl::deref::type t9; typedef typename forward::type f9; typedef typename mpl::next::type iter10; + + + typedef typename mpl::deref::type t10; typedef typename forward::type f10; typedef typename mpl::next::type iter11; + + + typedef typename mpl::deref::type t11; typedef typename forward::type f11; typedef typename mpl::next::type iter12; +# 80 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 2 + + + static void execute( + + + + PyObject *p + + , t0 a0 , t1 a1 , t2 a2 , t3 a3 , t4 a4 , t5 a5 , t6 a6 , t7 a7 , t8 a8 , t9 a9 , t10 a10 , t11 a11) + { + typedef instance instance_t; + + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2) , f3(a3) , f4(a4) , f5(a5) , f6(a6) , f7(a7) , f8(a8) , f9(a9) , f10(a10) , f11(a11)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +# 108 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 1 +# 56 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" + + + + +template <> +struct make_holder<13> +{ + template + struct apply + { + + + + + typedef typename mpl::begin::type iter0; +# 79 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + + + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + + + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + + + typedef typename mpl::deref::type t3; typedef typename forward::type f3; typedef typename mpl::next::type iter4; + + + typedef typename mpl::deref::type t4; typedef typename forward::type f4; typedef typename mpl::next::type iter5; + + + typedef typename mpl::deref::type t5; typedef typename forward::type f5; typedef typename mpl::next::type iter6; + + + typedef typename mpl::deref::type t6; typedef typename forward::type f6; typedef typename mpl::next::type iter7; + + + typedef typename mpl::deref::type t7; typedef typename forward::type f7; typedef typename mpl::next::type iter8; + + + typedef typename mpl::deref::type t8; typedef typename forward::type f8; typedef typename mpl::next::type iter9; + + + typedef typename mpl::deref::type t9; typedef typename forward::type f9; typedef typename mpl::next::type iter10; + + + typedef typename mpl::deref::type t10; typedef typename forward::type f10; typedef typename mpl::next::type iter11; + + + typedef typename mpl::deref::type t11; typedef typename forward::type f11; typedef typename mpl::next::type iter12; + + + typedef typename mpl::deref::type t12; typedef typename forward::type f12; typedef typename mpl::next::type iter13; +# 80 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 2 + + + static void execute( + + + + PyObject *p + + , t0 a0 , t1 a1 , t2 a2 , t3 a3 , t4 a4 , t5 a5 , t6 a6 , t7 a7 , t8 a8 , t9 a9 , t10 a10 , t11 a11 , t12 a12) + { + typedef instance instance_t; + + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2) , f3(a3) , f4(a4) , f5(a5) , f6(a6) , f7(a7) , f8(a8) , f9(a9) , f10(a10) , f11(a11) , f12(a12)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +# 113 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 1 +# 56 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" + + + + +template <> +struct make_holder<14> +{ + template + struct apply + { + + + + + typedef typename mpl::begin::type iter0; +# 79 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + + + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + + + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + + + typedef typename mpl::deref::type t3; typedef typename forward::type f3; typedef typename mpl::next::type iter4; + + + typedef typename mpl::deref::type t4; typedef typename forward::type f4; typedef typename mpl::next::type iter5; + + + typedef typename mpl::deref::type t5; typedef typename forward::type f5; typedef typename mpl::next::type iter6; + + + typedef typename mpl::deref::type t6; typedef typename forward::type f6; typedef typename mpl::next::type iter7; + + + typedef typename mpl::deref::type t7; typedef typename forward::type f7; typedef typename mpl::next::type iter8; + + + typedef typename mpl::deref::type t8; typedef typename forward::type f8; typedef typename mpl::next::type iter9; + + + typedef typename mpl::deref::type t9; typedef typename forward::type f9; typedef typename mpl::next::type iter10; + + + typedef typename mpl::deref::type t10; typedef typename forward::type f10; typedef typename mpl::next::type iter11; + + + typedef typename mpl::deref::type t11; typedef typename forward::type f11; typedef typename mpl::next::type iter12; + + + typedef typename mpl::deref::type t12; typedef typename forward::type f12; typedef typename mpl::next::type iter13; + + + typedef typename mpl::deref::type t13; typedef typename forward::type f13; typedef typename mpl::next::type iter14; +# 80 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 2 + + + static void execute( + + + + PyObject *p + + , t0 a0 , t1 a1 , t2 a2 , t3 a3 , t4 a4 , t5 a5 , t6 a6 , t7 a7 , t8 a8 , t9 a9 , t10 a10 , t11 a11 , t12 a12 , t13 a13) + { + typedef instance instance_t; + + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2) , f3(a3) , f4(a4) , f5(a5) , f6(a6) , f7(a7) , f8(a8) , f9(a9) , f10(a10) , f11(a11) , f12(a12) , f13(a13)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +# 118 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 1 +# 56 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" + + + + +template <> +struct make_holder<15> +{ + template + struct apply + { + + + + + typedef typename mpl::begin::type iter0; +# 79 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + + + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + + + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + + + typedef typename mpl::deref::type t3; typedef typename forward::type f3; typedef typename mpl::next::type iter4; + + + typedef typename mpl::deref::type t4; typedef typename forward::type f4; typedef typename mpl::next::type iter5; + + + typedef typename mpl::deref::type t5; typedef typename forward::type f5; typedef typename mpl::next::type iter6; + + + typedef typename mpl::deref::type t6; typedef typename forward::type f6; typedef typename mpl::next::type iter7; + + + typedef typename mpl::deref::type t7; typedef typename forward::type f7; typedef typename mpl::next::type iter8; + + + typedef typename mpl::deref::type t8; typedef typename forward::type f8; typedef typename mpl::next::type iter9; + + + typedef typename mpl::deref::type t9; typedef typename forward::type f9; typedef typename mpl::next::type iter10; + + + typedef typename mpl::deref::type t10; typedef typename forward::type f10; typedef typename mpl::next::type iter11; + + + typedef typename mpl::deref::type t11; typedef typename forward::type f11; typedef typename mpl::next::type iter12; + + + typedef typename mpl::deref::type t12; typedef typename forward::type f12; typedef typename mpl::next::type iter13; + + + typedef typename mpl::deref::type t13; typedef typename forward::type f13; typedef typename mpl::next::type iter14; + + + typedef typename mpl::deref::type t14; typedef typename forward::type f14; typedef typename mpl::next::type iter15; +# 80 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 2 + + + static void execute( + + + + PyObject *p + + , t0 a0 , t1 a1 , t2 a2 , t3 a3 , t4 a4 , t5 a5 , t6 a6 , t7 a7 , t8 a8 , t9 a9 , t10 a10 , t11 a11 , t12 a12 , t13 a13 , t14 a14) + { + typedef instance instance_t; + + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2) , f3(a3) , f4(a4) , f5(a5) , f6(a6) , f7(a7) , f8(a8) , f9(a9) , f10(a10) , f11(a11) , f12(a12) , f13(a13) , f14(a14)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +# 123 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 43 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 2 + + + +}}} +# 12 "/usr/include/boost-1_42/boost/python/detail/make_keyword_range_fn.hpp" 2 + + + + +namespace boost { namespace python { namespace detail { +# 25 "/usr/include/boost-1_42/boost/python/detail/make_keyword_range_fn.hpp" +template +object make_keyword_range_function( + F f + , Policies const& policies + , keyword_range const& kw) +{ + return detail::make_function_aux( + f, policies, detail::get_signature(f), kw, mpl::int_<0>()); +} + +template +object make_keyword_range_function( + F f + , Policies const& policies + , keyword_range const& kw + , Signature const& sig) +{ + return detail::make_function_aux( + f, policies, sig, kw, mpl::int_<0>()); +} +# 53 "/usr/include/boost-1_42/boost/python/detail/make_keyword_range_fn.hpp" +template +object make_keyword_range_constructor( + CallPolicies const& policies + , detail::keyword_range const& kw + , Holder* = 0 + , ArgList* = 0, Arity* = 0) +{ + + + + return detail::make_keyword_range_function( + objects::make_holder + ::template apply::execute + , policies + , kw); +} + +}}} +# 17 "/usr/include/boost-1_42/boost/python/init.hpp" 2 + + + + + + +# 1 "/usr/include/boost-1_42/boost/mpl/empty.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/empty.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/empty_impl.hpp" 1 +# 22 "/usr/include/boost-1_42/boost/mpl/aux_/empty_impl.hpp" +namespace boost { namespace mpl { + + + + +template< typename Tag > +struct empty_impl +{ + template< typename Sequence > struct apply + : is_same< + typename begin::type + , typename end::type + > + { + }; +}; + + template<> struct empty_impl {}; + +}} +# 20 "/usr/include/boost-1_42/boost/mpl/empty.hpp" 2 + + + +namespace boost { namespace mpl { + +template< + typename Sequence = na + > +struct empty + : empty_impl< typename sequence_tag::type > + ::template apply< Sequence > +{ + +}; + +template<> struct empty< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : empty< T1 > { }; }; template< typename Tag > struct lambda< empty< na > , Tag , int_<-1> > { typedef false_ is_le; typedef empty< na > result_; typedef empty< na > type; }; namespace aux { template< typename T1 > struct template_arity< empty< T1 > > : int_<1> { }; template<> struct template_arity< empty< na > > : int_<-1> { }; } + +}} +# 24 "/usr/include/boost-1_42/boost/python/init.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/mpl/joint_view.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/joint_view.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/joint_iter.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/mpl/aux_/joint_iter.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/lambda_spec.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/mpl/aux_/joint_iter.hpp" 2 + + + + + + +namespace boost { namespace mpl { + + + +template< + typename Iterator1 + , typename LastIterator1 + , typename Iterator2 + > +struct joint_iter +{ + typedef Iterator1 base; + typedef forward_iterator_tag category; +}; + +template< + typename LastIterator1 + , typename Iterator2 + > +struct joint_iter +{ + typedef Iterator2 base; + typedef forward_iterator_tag category; +}; + + +template< typename I1, typename L1, typename I2 > +struct deref< joint_iter > +{ + typedef typename joint_iter::base base_; + typedef typename deref::type type; +}; + +template< typename I1, typename L1, typename I2 > +struct next< joint_iter > +{ + typedef joint_iter< typename mpl::next::type,L1,I2 > type; +}; + +template< typename L1, typename I2 > +struct next< joint_iter > +{ + typedef joint_iter< L1,L1,typename mpl::next::type > type; +}; +# 116 "/usr/include/boost-1_42/boost/mpl/aux_/joint_iter.hpp" +template< typename T1 , typename T2 , typename T3 , typename Tag > struct lambda< joint_iter< T1 , T2 , T3 > , Tag , int_<3> > { typedef false_ is_le; typedef joint_iter< T1 , T2 , T3 > result_; typedef result_ type; }; + +}} +# 18 "/usr/include/boost-1_42/boost/mpl/joint_view.hpp" 2 + + + + + +namespace boost { namespace mpl { + +namespace aux { +struct joint_view_tag; +} + +template<> +struct size_impl< aux::joint_view_tag > +{ + template < typename JointView > struct apply + : plus< + size + , size + > + {}; +}; + +template< + typename Sequence1_ = na + , typename Sequence2_ = na + > +struct joint_view +{ + typedef typename mpl::begin::type first1_; + typedef typename mpl::end::type last1_; + typedef typename mpl::begin::type first2_; + typedef typename mpl::end::type last2_; + + + typedef Sequence1_ sequence1_; + typedef Sequence2_ sequence2_; + + typedef joint_view type; + typedef aux::joint_view_tag tag; + typedef joint_iter begin; + typedef joint_iter end; +}; + +template<> struct joint_view< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : joint_view< T1 , T2 > { }; }; template< typename Tag > struct lambda< joint_view< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef joint_view< na , na > result_; typedef joint_view< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< joint_view< T1 , T2 > > : int_<2> { }; template<> struct template_arity< joint_view< na , na > > : int_<-1> { }; } + +}} +# 28 "/usr/include/boost-1_42/boost/python/init.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/back.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/back.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/back_impl.hpp" 1 +# 22 "/usr/include/boost-1_42/boost/mpl/aux_/back_impl.hpp" +namespace boost { namespace mpl { + + + + + +template< typename Tag > +struct back_impl +{ + template< typename Sequence > struct apply + { + typedef typename end::type end_; + typedef typename prior::type last_; + typedef typename deref::type type; + }; +}; + + template<> struct back_impl {}; + +}} +# 19 "/usr/include/boost-1_42/boost/mpl/back.hpp" 2 + + + + +namespace boost { namespace mpl { + +template< + typename Sequence = na + > +struct back + : back_impl< typename sequence_tag::type > + ::template apply< Sequence > +{ + +}; + +template<> struct back< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : back< T1 > { }; }; template< typename Tag > struct lambda< back< na > , Tag , int_<-1> > { typedef false_ is_le; typedef back< na > result_; typedef back< na > type; }; namespace aux { template< typename T1 > struct template_arity< back< T1 > > : int_<1> { }; template<> struct template_arity< back< na > > : int_<-1> { }; } + +}} +# 29 "/usr/include/boost-1_42/boost/python/init.hpp" 2 +# 55 "/usr/include/boost-1_42/boost/python/init.hpp" +namespace boost { namespace python { + +template < class T0 = mpl::void_ , class T1 = mpl::void_ , class T2 = mpl::void_ , class T3 = mpl::void_ , class T4 = mpl::void_ , class T5 = mpl::void_ , class T6 = mpl::void_ , class T7 = mpl::void_ , class T8 = mpl::void_ , class T9 = mpl::void_ , class T10 = mpl::void_ , class T11 = mpl::void_ , class T12 = mpl::void_ , class T13 = mpl::void_ , class T14 = mpl::void_ > +class init; + + +template < class T0 = mpl::void_ , class T1 = mpl::void_ , class T2 = mpl::void_ , class T3 = mpl::void_ , class T4 = mpl::void_ , class T5 = mpl::void_ , class T6 = mpl::void_ , class T7 = mpl::void_ , class T8 = mpl::void_ , class T9 = mpl::void_ , class T10 = mpl::void_ , class T11 = mpl::void_ , class T12 = mpl::void_ , class T13 = mpl::void_ , class T14 = mpl::void_ > +struct optional; + +namespace detail +{ + namespace error + { + template + struct more_keywords_than_init_arguments + { + typedef char too_many_keywords[init_args - keywords >= 0 ? 1 : -1]; + }; + } +# 101 "/usr/include/boost-1_42/boost/python/init.hpp" + template + struct is_optional + : mpl::false_ + {}; + + template < class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> + struct is_optional > + : mpl::true_ + {}; + + + + template + struct define_class_init_helper; + +} + +template +struct init_base : def_visitor +{ + init_base(char const* doc_, detail::keyword_range const& keywords_) + : m_doc(doc_), m_keywords(keywords_) + {} + + init_base(char const* doc_) + : m_doc(doc_) + {} + + DerivedT const& derived() const + { + return *static_cast(this); + } + + char const* doc_string() const + { + return m_doc; + } + + detail::keyword_range const& keywords() const + { + return m_keywords; + } + + static default_call_policies call_policies() + { + return default_call_policies(); + } + + private: +# 164 "/usr/include/boost-1_42/boost/python/init.hpp" + template + void visit(classT& cl) const + { + typedef typename DerivedT::signature signature; + typedef typename DerivedT::n_arguments n_arguments; + typedef typename DerivedT::n_defaults n_defaults; + + detail::define_class_init_helper::apply( + cl + , derived().call_policies() + , signature() + , n_arguments() + , derived().doc_string() + , derived().keywords()); + } + + friend class python::def_visitor_access; + + private: + char const* m_doc; + detail::keyword_range m_keywords; +}; + +template +class init_with_call_policies + : public init_base > +{ + typedef init_base > base; + public: + typedef typename InitT::n_arguments n_arguments; + typedef typename InitT::n_defaults n_defaults; + typedef typename InitT::signature signature; + + init_with_call_policies( + CallPoliciesT const& policies_ + , char const* doc_ + , detail::keyword_range const& keywords + ) + : base(doc_, keywords) + , m_policies(policies_) + {} + + CallPoliciesT const& call_policies() const + { + return this->m_policies; + } + + private: + CallPoliciesT m_policies; +}; + + + + +namespace detail +{ + template + struct drop1 + : mpl::iterator_range< + typename mpl::begin::type + , typename mpl::prior< + typename mpl::end::type + >::type + > + {}; +} + +template < class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> +class init : public init_base > +{ + typedef init_base > base; + public: + typedef init< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14> self_t; + + init(char const* doc_ = 0) + : base(doc_) + { + } + + template + init(char const* doc_, detail::keywords const& kw) + : base(doc_, kw.range()) + { + typedef typename detail::error::more_keywords_than_init_arguments< + N, n_arguments::value + 1 + >::too_many_keywords assertion; + } + + template + init(detail::keywords const& kw, char const* doc_ = 0) + : base(doc_, kw.range()) + { + typedef typename detail::error::more_keywords_than_init_arguments< + N, n_arguments::value + 1 + >::too_many_keywords assertion; + } + + template + init_with_call_policies + operator[](CallPoliciesT const& policies) const + { + return init_with_call_policies( + policies, this->doc_string(), this->keywords()); + } + + typedef detail::type_list< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14> signature_; + + typedef detail::is_optional< + typename mpl::eval_if< + mpl::empty + , mpl::false_ + , mpl::back + >::type + > back_is_optional; + + typedef typename mpl::eval_if< + back_is_optional + , mpl::back + , mpl::vector0<> + >::type optional_args; + + typedef typename mpl::eval_if< + back_is_optional + , mpl::if_< + mpl::empty + , detail::drop1 + , mpl::joint_view< + detail::drop1 + , optional_args + > + > + , signature_ + >::type signature; + + + + + typedef mpl::size n_defaults; + typedef mpl::size n_arguments; +}; +# 312 "/usr/include/boost-1_42/boost/python/init.hpp" +template < class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> +struct optional + : detail::type_list< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14> +{ +}; + +namespace detail +{ + template + inline void def_init_aux( + ClassT& cl + , Signature const& + , NArgs + , CallPoliciesT const& policies + , char const* doc + , detail::keyword_range const& keywords_ + ) + { + cl.def( + "__init__" + , detail::make_keyword_range_constructor( + policies + , keywords_ + , (typename ClassT::metadata::holder*)0 + ) + , doc + ); + } +# 353 "/usr/include/boost-1_42/boost/python/init.hpp" + template + struct define_class_init_helper + { + + template + static void apply( + ClassT& cl + , CallPoliciesT const& policies + , Signature const& args + , NArgs + , char const* doc + , detail::keyword_range keywords) + { + detail::def_init_aux(cl, args, NArgs(), policies, doc, keywords); + + if (keywords.second > keywords.first) + --keywords.second; + + typedef typename mpl::prior::type next_nargs; + define_class_init_helper::apply( + cl, policies, Signature(), next_nargs(), doc, keywords); + } + }; +# 387 "/usr/include/boost-1_42/boost/python/init.hpp" + template <> + struct define_class_init_helper<0> { + + template + static void apply( + ClassT& cl + , CallPoliciesT const& policies + , Signature const& args + , NArgs + , char const* doc + , detail::keyword_range const& keywords) + { + detail::def_init_aux(cl, args, NArgs(), policies, doc, keywords); + } + }; +} + +}} +# 21 "/usr/include/boost-1_42/boost/python/class.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/python/object/class_metadata.hpp" 1 + + + + + +# 1 "/usr/include/boost-1_42/boost/python/converter/shared_ptr_from_python.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/python/converter/shared_ptr_from_python.hpp" +namespace boost { namespace python { namespace converter { + +template +struct shared_ptr_from_python +{ + shared_ptr_from_python() + { + converter::registry::insert(&convertible, &construct, type_id >() + + , &converter::expected_from_python_type_direct::get_pytype + + ); + } + + private: + static void* convertible(PyObject* p) + { + if (p == (&_Py_NoneStruct)) + return p; + + return converter::get_lvalue_from_python(p, registered::converters); + } + + static void construct(PyObject* source, rvalue_from_python_stage1_data* data) + { + void* const storage = ((converter::rvalue_from_python_storage >*)data)->storage.bytes; + + if (data->convertible == source) + new (storage) shared_ptr(); + else + { + boost::shared_ptr hold_convertible_ref_count( + (void*)0, shared_ptr_deleter(handle<>(borrowed(source))) ); + + new (storage) shared_ptr( + hold_convertible_ref_count, + static_cast(data->convertible)); + } + + data->convertible = storage; + } +}; + +}}} +# 7 "/usr/include/boost-1_42/boost/python/object/class_metadata.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/object/inheritance.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/python/object/inheritance.hpp" +namespace boost { namespace python { namespace objects { + +typedef type_info class_id; +using python::type_id; + + +typedef std::pair dynamic_id_t; +typedef dynamic_id_t (*dynamic_id_function)(void*); + + void register_dynamic_id_aux( + class_id static_id, dynamic_id_function get_dynamic_id); + + void add_cast( + class_id src_t, class_id dst_t, void* (*cast)(void*), bool is_downcast); +# 37 "/usr/include/boost-1_42/boost/python/object/inheritance.hpp" +template +struct polymorphic_id_generator +{ + static dynamic_id_t execute(void* p_) + { + T* p = static_cast(p_); + return std::make_pair(dynamic_cast(p), class_id(typeid(*p))); + } +}; + + +template +struct non_polymorphic_id_generator +{ + static dynamic_id_t execute(void* p_) + { + return std::make_pair(p_, python::type_id()); + } +}; + + +template +struct dynamic_id_generator + : mpl::if_< + boost::is_polymorphic + , boost::python::objects::polymorphic_id_generator + , boost::python::objects::non_polymorphic_id_generator + > +{}; + + + +template +void register_dynamic_id(T* = 0) +{ + typedef typename dynamic_id_generator::type generator; + register_dynamic_id_aux( + python::type_id(), &generator::execute); +} + + + + + + + +template +struct dynamic_cast_generator +{ + static void* execute(void* source) + { + return dynamic_cast( + static_cast(source)); + } + +}; + +template +struct implicit_cast_generator +{ + static void* execute(void* source) + { + Target* result = static_cast(source); + return result; + } +}; + +template +struct cast_generator + : mpl::if_< + is_base_and_derived + , implicit_cast_generator + , dynamic_cast_generator + > +{ +}; + +template +inline void register_conversion( + bool is_downcast = ::boost::is_base_and_derived::value + + , Source* = 0, Target* = 0) +{ + typedef typename cast_generator::type generator; + + add_cast( + python::type_id() + , python::type_id() + , &generator::execute + , is_downcast + ); +} + +}}} +# 9 "/usr/include/boost-1_42/boost/python/object/class_metadata.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/object/class_wrapper.hpp" 1 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/python/to_python_converter.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/to_python_converter.hpp" +# 1 "/usr/include/boost-1_42/boost/python/converter/as_to_python_function.hpp" 1 +# 9 "/usr/include/boost-1_42/boost/python/converter/as_to_python_function.hpp" +namespace boost { namespace python { namespace converter { + + + +template +struct as_to_python_function +{ + + + + + template + static void convert_function_must_take_value_or_const_reference(U(*)(T), int, T* = 0) {} + template + static void convert_function_must_take_value_or_const_reference(U(*)(T const&), long ...) {} + + static PyObject* convert(void const* x) + { + convert_function_must_take_value_or_const_reference(&ToPython::convert, 1L); +# 40 "/usr/include/boost-1_42/boost/python/converter/as_to_python_function.hpp" + return ToPython::convert(*const_cast(static_cast(x))); + } + + static PyTypeObject const * get_pytype() { return ToPython::get_pytype(); } + +}; + +}}} +# 12 "/usr/include/boost-1_42/boost/python/to_python_converter.hpp" 2 + + + + + +namespace boost { namespace python { +# 47 "/usr/include/boost-1_42/boost/python/to_python_converter.hpp" +template < class T, class Conversion, bool has_get_pytype=false > +struct to_python_converter +{ + + + + + + typedef boost::mpl::bool_ HasGetPytype; + + + static PyTypeObject const* get_pytype_1(boost::mpl::true_ *) + { + return Conversion::get_pytype(); + } + + static PyTypeObject const* get_pytype_1(boost::mpl::false_ *) + { + return 0; + } + static PyTypeObject const* get_pytype_impl() + { + return get_pytype_1((HasGetPytype*)0); + } + + + to_python_converter(); +}; + + + + + +template +to_python_converter::to_python_converter() +{ + typedef converter::as_to_python_function< + T, Conversion + > normalized; + + converter::registry::insert( + &normalized::convert + , type_id() + + , &get_pytype_impl + + ); +} + +}} +# 9 "/usr/include/boost-1_42/boost/python/object/class_wrapper.hpp" 2 + + + + + +namespace boost { namespace python { namespace objects { +# 23 "/usr/include/boost-1_42/boost/python/object/class_wrapper.hpp" +template +struct class_cref_wrapper + : to_python_converter ,true> +{ + static PyObject* convert(Src const& x) + { + return MakeInstance::execute(boost::ref(x)); + } + + static PyTypeObject const *get_pytype() { return converter::registered_pytype_direct::get_pytype(); } + +}; + +template +struct class_value_wrapper + : to_python_converter ,true> +{ + static PyObject* convert(Src x) + { + return MakeInstance::execute(x); + } + + static PyTypeObject const *get_pytype() { return MakeInstance::get_pytype(); } + +}; + +}}} +# 10 "/usr/include/boost-1_42/boost/python/object/class_metadata.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder_fwd.hpp" 1 + + + + + + + +namespace boost { namespace python { namespace objects { + +struct no_back_reference; + +template struct value_holder_generator; + +}}} +# 12 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/python/wrapper.hpp" 1 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/python/override.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/override.hpp" +# 1 "/usr/include/boost-1_42/boost/python/extract.hpp" 1 +# 32 "/usr/include/boost-1_42/boost/python/extract.hpp" +namespace boost { namespace python { + +namespace api +{ + class object; +} + +namespace converter +{ + template + struct extract_pointer + { + typedef Ptr result_type; + extract_pointer(PyObject*); + + bool check() const; + Ptr operator()() const; + + private: + PyObject* m_source; + void* m_result; + }; + + template + struct extract_reference + { + typedef Ref result_type; + extract_reference(PyObject*); + + bool check() const; + Ref operator()() const; + + private: + PyObject* m_source; + void* m_result; + }; + + template + struct extract_rvalue : private noncopyable + { + typedef typename mpl::if_< + python::detail::copy_ctor_mutates_rhs + , T& + , typename call_traits::param_type + >::type result_type; + + extract_rvalue(PyObject*); + + bool check() const; + result_type operator()() const; + private: + PyObject* m_source; + mutable rvalue_from_python_data m_data; + }; + + template + struct extract_object_manager + { + typedef T result_type; + extract_object_manager(PyObject*); + + bool check() const; + result_type operator()() const; + private: + PyObject* m_source; + }; + + template + struct select_extract + { + static const bool obj_mgr = is_object_manager::value + ; + + static const bool ptr = is_pointer::value + ; + + static const bool ref = is_reference::value + ; + + typedef typename mpl::if_c< + obj_mgr + , extract_object_manager + , typename mpl::if_c< + ptr + , extract_pointer + , typename mpl::if_c< + ref + , extract_reference + , extract_rvalue + >::type + >::type + >::type type; + }; +} + +template +struct extract + : converter::select_extract::type +{ + private: + typedef typename converter::select_extract::type base; + public: + typedef typename base::result_type result_type; + + operator result_type() const + { + return (*this)(); + } + + extract(PyObject*); + extract(api::object const&); +}; + + + + +template +inline extract::extract(PyObject* o) + : base(o) +{ +} + +template +inline extract::extract(api::object const& o) + : base(o.ptr()) +{ +} + +namespace converter +{ + template + inline extract_rvalue::extract_rvalue(PyObject* x) + : m_source(x) + , m_data( + (rvalue_from_python_stage1)(x, registered::converters) + ) + { + } + + template + inline bool + extract_rvalue::check() const + { + return m_data.stage1.convertible; + } + + template + inline typename extract_rvalue::result_type + extract_rvalue::operator()() const + { + return *(T*)( + + m_data.stage1.convertible == m_data.storage.bytes + ? m_data.storage.bytes + : (rvalue_from_python_stage2)(m_source, m_data.stage1, registered::converters) + ); + } + + template + inline extract_reference::extract_reference(PyObject* obj) + : m_source(obj) + , m_result( + (get_lvalue_from_python)(obj, registered::converters) + ) + { + } + + template + inline bool extract_reference::check() const + { + return m_result != 0; + } + + template + inline Ref extract_reference::operator()() const + { + if (m_result == 0) + (throw_no_reference_from_python)(m_source, registered::converters); + + return python::detail::void_ptr_to_reference(m_result, (Ref(*)())0); + } + + template + inline extract_pointer::extract_pointer(PyObject* obj) + : m_source(obj) + , m_result( + obj == (&_Py_NoneStruct) ? 0 : (get_lvalue_from_python)(obj, registered_pointee::converters) + ) + { + } + + template + inline bool extract_pointer::check() const + { + return m_source == (&_Py_NoneStruct) || m_result != 0; + } + + template + inline Ptr extract_pointer::operator()() const + { + if (m_result == 0 && m_source != (&_Py_NoneStruct)) + (throw_no_pointer_from_python)(m_source, registered_pointee::converters); + + return Ptr(m_result); + } + + template + inline extract_object_manager::extract_object_manager(PyObject* obj) + : m_source(obj) + { + } + + template + inline bool extract_object_manager::check() const + { + return object_manager_traits::check(m_source); + } + + template + inline T extract_object_manager::operator()() const + { + return T( + object_manager_traits::adopt(python::incref(m_source)) + ); + } +} + +}} +# 14 "/usr/include/boost-1_42/boost/python/override.hpp" 2 +# 24 "/usr/include/boost-1_42/boost/python/override.hpp" +namespace boost { namespace python { + +class override; + +namespace detail +{ + class wrapper_base; + + + class method_result + { + private: + friend class boost::python::override; + explicit method_result(PyObject* x) + : m_obj(x) + {} + + public: + template + operator T() + { + converter::return_from_python converter; + return converter(m_obj.release()); + } +# 62 "/usr/include/boost-1_42/boost/python/override.hpp" + template + operator T&() const + { + converter::return_from_python converter; + return converter(const_cast&>(m_obj).release()); + } + + + template + T as(type* = 0) + { + converter::return_from_python converter; + return converter(m_obj.release()); + } + + template + T unchecked(type* = 0) + { + return extract(m_obj)(); + } + private: + mutable handle<> m_obj; + }; +} + +class override : public object +{ + private: + friend class detail::wrapper_base; + override(handle<> x) + : object(x) + {} + + public: + detail::method_result + operator()() const + { + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("()") + )); + return x; + } + + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 52 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/python/override.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/override.hpp" + + + + +template < + class A0 + > +detail::method_result +operator()( A0 const& a0 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" ")") + , converter::arg_to_python(a0).get() + )); + return x; +} +# 53 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/override.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/override.hpp" + + + + +template < + class A0 , class A1 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() + )); + return x; +} +# 58 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/override.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/override.hpp" + + + + +template < + class A0 , class A1 , class A2 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() + )); + return x; +} +# 63 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/override.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/override.hpp" + + + + +template < + class A0 , class A1 , class A2 , class A3 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() + )); + return x; +} +# 68 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/override.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/override.hpp" + + + + +template < + class A0 , class A1 , class A2 , class A3 , class A4 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() + )); + return x; +} +# 73 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/override.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/override.hpp" + + + + +template < + class A0 , class A1 , class A2 , class A3 , class A4 , class A5 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() + )); + return x; +} +# 78 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/override.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/override.hpp" + + + + +template < + class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() + )); + return x; +} +# 83 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/override.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/override.hpp" + + + + +template < + class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() + )); + return x; +} +# 88 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/override.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/override.hpp" + + + + +template < + class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() + )); + return x; +} +# 93 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/override.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/override.hpp" + + + + +template < + class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() + )); + return x; +} +# 98 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/override.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/override.hpp" + + + + +template < + class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() + )); + return x; +} +# 103 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/override.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/override.hpp" + + + + +template < + class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() , converter::arg_to_python(a11).get() + )); + return x; +} +# 108 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/override.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/override.hpp" + + + + +template < + class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() , converter::arg_to_python(a11).get() , converter::arg_to_python(a12).get() + )); + return x; +} +# 113 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/override.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/override.hpp" + + + + +template < + class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() , converter::arg_to_python(a11).get() , converter::arg_to_python(a12).get() , converter::arg_to_python(a13).get() + )); + return x; +} +# 118 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/override.hpp" 1 +# 123 "/usr/include/boost-1_42/boost/python/override.hpp" + + + + +template < + class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 , class A14 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() , converter::arg_to_python(a11).get() , converter::arg_to_python(a12).get() , converter::arg_to_python(a13).get() , converter::arg_to_python(a14).get() + )); + return x; +} +# 123 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 112 "/usr/include/boost-1_42/boost/python/override.hpp" 2 + + +}; + +}} +# 9 "/usr/include/boost-1_42/boost/python/wrapper.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/detail/sfinae.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/wrapper.hpp" 2 + +namespace boost { namespace python { + +template +class wrapper : public detail::wrapper_base +{ + public: + + typedef T _wrapper_wrapped_type_; + + protected: + override get_override(char const* name) const + { + typedef detail::wrapper_base base; + converter::registration const& r + = converter::registered::converters; + PyTypeObject* type = r.get_class_object(); + + return this->base::get_override(name, type); + } +}; + +}} +# 16 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 2 +# 34 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" +namespace boost { namespace python { namespace objects { + + + + + + + +template +struct value_holder : instance_holder +{ + typedef Value held_type; + typedef Value value_type; + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 47 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 126 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + + + value_holder( + PyObject* self ) + : m_held( + + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } +# 48 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 126 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0> + + value_holder( + PyObject* self , A0 a0) + : m_held( + objects::do_unforward(a0,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } +# 53 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 126 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1> + + value_holder( + PyObject* self , A0 a0 , A1 a1) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } +# 58 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 126 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2> + + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } +# 63 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 126 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3> + + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } +# 68 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 126 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4> + + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } +# 73 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 126 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5> + + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } +# 78 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 126 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6> + + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } +# 83 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 126 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7> + + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } +# 88 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 126 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8> + + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } +# 93 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 126 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9> + + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } +# 98 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 126 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10> + + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } +# 103 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 126 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11> + + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } +# 108 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 126 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12> + + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11 , A12 a12) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) , objects::do_unforward(a12,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } +# 113 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 126 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13> + + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11 , A12 a12 , A13 a13) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) , objects::do_unforward(a12,0) , objects::do_unforward(a13,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } +# 118 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 126 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 , class A14> + + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11 , A12 a12 , A13 a13 , A14 a14) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) , objects::do_unforward(a12,0) , objects::do_unforward(a13,0) , objects::do_unforward(a14,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } +# 123 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 51 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 2 + + private: + void* holds(type_info, bool null_ptr_only); + + template + inline void* holds_wrapped(type_info dst_t, wrapper*,T* p) + { + return python::type_id() == dst_t ? p : 0; + } + + inline void* holds_wrapped(type_info, ...) + { + return 0; + } + private: + Value m_held; +}; + +template +struct value_holder_back_reference : instance_holder +{ + typedef Held held_type; + typedef Value value_type; + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 47 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 150 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + + + value_holder_back_reference( + PyObject* p ) + : m_held( + p + + ) + { + } +# 48 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 150 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0> + + value_holder_back_reference( + PyObject* p , A0 a0) + : m_held( + p , + objects::do_unforward(a0,0) + ) + { + } +# 53 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 150 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1> + + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) + ) + { + } +# 58 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 150 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2> + + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) + ) + { + } +# 63 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 150 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3> + + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) + ) + { + } +# 68 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 150 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4> + + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) + ) + { + } +# 73 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 150 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5> + + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) + ) + { + } +# 78 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 150 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6> + + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) + ) + { + } +# 83 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 150 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7> + + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) + ) + { + } +# 88 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 150 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8> + + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) + ) + { + } +# 93 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 150 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9> + + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) + ) + { + } +# 98 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 150 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10> + + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) + ) + { + } +# 103 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 150 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11> + + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) + ) + { + } +# 108 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 150 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12> + + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11 , A12 a12) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) , objects::do_unforward(a12,0) + ) + { + } +# 113 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 150 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13> + + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11 , A12 a12 , A13 a13) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) , objects::do_unforward(a12,0) , objects::do_unforward(a13,0) + ) + { + } +# 118 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 1 +# 150 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" + + + + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 , class A14> + + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11 , A12 a12 , A13 a13 , A14 a14) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) , objects::do_unforward(a12,0) , objects::do_unforward(a13,0) , objects::do_unforward(a14,0) + ) + { + } +# 123 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 78 "/usr/include/boost-1_42/boost/python/object/value_holder.hpp" 2 + +private: + void* holds(type_info, bool null_ptr_only); + + private: + Held m_held; +}; + + + +template +void* value_holder::holds(type_info dst_t, bool ) +{ + if (void* wrapped = holds_wrapped(dst_t, boost::addressof(m_held), boost::addressof(m_held))) + return wrapped; + + type_info src_t = python::type_id(); + return src_t == dst_t ? boost::addressof(m_held) + : find_static_type(boost::addressof(m_held), src_t, dst_t); +} + +template +void* value_holder_back_reference::holds( + type_info dst_t, bool ) +{ + type_info src_t = python::type_id(); + Value* x = &m_held; + + if (dst_t == src_t) + return x; + else if (dst_t == python::type_id()) + return &m_held; + else + return find_static_type(x, src_t, dst_t); +} + +}}} +# 12 "/usr/include/boost-1_42/boost/python/object/class_metadata.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/object/class_metadata.hpp" 2 + + + + + +# 1 "/usr/include/boost-1_42/boost/python/has_back_reference.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/has_back_reference.hpp" +namespace boost { namespace python { + + + +template +struct has_back_reference + : mpl::false_ +{ +}; + + +}} +# 19 "/usr/include/boost-1_42/boost/python/object/class_metadata.hpp" 2 +# 30 "/usr/include/boost-1_42/boost/python/object/class_metadata.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/for_each.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/for_each.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/is_sequence.hpp" 1 +# 40 "/usr/include/boost-1_42/boost/mpl/is_sequence.hpp" +namespace boost { namespace mpl { +# 90 "/usr/include/boost-1_42/boost/mpl/is_sequence.hpp" +template< + typename T = na + > +struct is_sequence + : not_< is_same< typename begin::type, void_ > > +{ + +}; +# 108 "/usr/include/boost-1_42/boost/mpl/is_sequence.hpp" +template<> struct is_sequence< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : is_sequence< T1 > { }; }; template< typename Tag > struct lambda< is_sequence< na > , Tag , int_<-1> > { typedef false_ is_le; typedef is_sequence< na > result_; typedef is_sequence< na > type; }; namespace aux { template< typename T1 > struct template_arity< is_sequence< T1 > > : int_<1> { }; template<> struct template_arity< is_sequence< na > > : int_<-1> { }; } + +}} +# 18 "/usr/include/boost-1_42/boost/mpl/for_each.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/mpl/apply.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/mpl/for_each.hpp" 2 + + + + + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/unwrap.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/mpl/aux_/unwrap.hpp" +namespace boost { namespace mpl { namespace aux { + +template< typename F > +inline +F& unwrap(F& f, long) +{ + return f; +} + +template< typename F > +inline +F& +unwrap(reference_wrapper& f, int) +{ + return f; +} + +template< typename F > +inline +F& +unwrap(reference_wrapper const& f, int) +{ + return f; +} + +}}} +# 26 "/usr/include/boost-1_42/boost/mpl/for_each.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/utility/value_init.hpp" 1 +# 22 "/usr/include/boost-1_42/boost/utility/value_init.hpp" +# 1 "/usr/include/boost-1_42/boost/aligned_storage.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/aligned_storage.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 17 "/usr/include/boost-1_42/boost/aligned_storage.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/aligned_storage.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 28 "/usr/include/boost-1_42/boost/aligned_storage.hpp" 2 + +namespace boost { + +namespace detail { namespace aligned_storage { + +static const std::size_t alignment_of_max_align = ::boost::alignment_of::value + + + ; + + + + +template < + std::size_t size_ + , std::size_t alignment_ +> +struct aligned_storage_imp +{ + union data_t + { + char buf[size_]; + + typename mpl::eval_if_c< + alignment_ == std::size_t(-1) + , mpl::identity + , type_with_alignment + >::type align_; + } data_; + void* address() const { return const_cast(this); } +}; + +template< std::size_t alignment_ > +struct aligned_storage_imp<0u,alignment_> +{ + + void* address() const { return 0; } +}; + +}} + +template < + std::size_t size_ + , std::size_t alignment_ = std::size_t(-1) +> +class aligned_storage : + + private + + + + detail::aligned_storage::aligned_storage_imp +{ + +public: + + typedef detail::aligned_storage::aligned_storage_imp type; + + static const std::size_t size = size_ + + + ; + static const std::size_t alignment = ( alignment_ == std::size_t(-1) ? ::boost::detail::aligned_storage::alignment_of_max_align : alignment_ ) + + + + + + + ; + + + + + + +private: + + aligned_storage(const aligned_storage&); + aligned_storage& operator=(const aligned_storage&); +# 118 "/usr/include/boost-1_42/boost/aligned_storage.hpp" +public: + + aligned_storage() + { + } + + ~aligned_storage() + { + } + +public: + + void* address() + { + return static_cast(this)->address(); + } + + + + const void* address() const + { + return static_cast(this)->address(); + } + + + + + + + +}; +# 168 "/usr/include/boost-1_42/boost/aligned_storage.hpp" +template +struct is_pod > + : ::boost::integral_constant +{ + +}; + + + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 180 "/usr/include/boost-1_42/boost/aligned_storage.hpp" 2 +# 23 "/usr/include/boost-1_42/boost/utility/value_init.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/swap.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/swap.hpp" +# 1 "/usr/include/boost-1_42/boost/utility/swap.hpp" 1 +# 25 "/usr/include/boost-1_42/boost/utility/swap.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 26 "/usr/include/boost-1_42/boost/utility/swap.hpp" 2 + +namespace boost_swap_impl +{ + template + void swap_impl(T& left, T& right) + { + using namespace std; + swap(left,right); + } + + template + void swap_impl(T (& left)[N], T (& right)[N]) + { + for (std::size_t i = 0; i < N; ++i) + { + ::boost_swap_impl::swap_impl(left[i], right[i]); + } + } +} + +namespace boost +{ + template + void swap(T1& left, T2& right) + { + ::boost_swap_impl::swap_impl(left, right); + } +} +# 11 "/usr/include/boost-1_42/boost/swap.hpp" 2 +# 28 "/usr/include/boost-1_42/boost/utility/value_init.hpp" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstring" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstring" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstring" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstring" 2 3 +# 29 "/usr/include/boost-1_42/boost/utility/value_init.hpp" 2 + + +namespace boost { + +template +class value_initialized +{ + private : + struct wrapper + { + + typename + + remove_const::type data; + }; + + mutable + + typename + + aligned_storage::value>::type x; + + wrapper * wrapper_address() const + { + return static_cast( static_cast(&x)); + } + + public : + + value_initialized() + { + std::memset(&x, 0, sizeof(x)); +# 70 "/usr/include/boost-1_42/boost/utility/value_init.hpp" + new (wrapper_address()) wrapper(); + + + + } + + value_initialized(value_initialized const & arg) + { + new (wrapper_address()) wrapper( static_cast(*(arg.wrapper_address()))); + } + + value_initialized & operator=(value_initialized const & arg) + { + + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((! is_const::value) == 0 ? false : true) >)> boost_static_assert_typedef_84; + *wrapper_address() = static_cast(*(arg.wrapper_address())); + return *this; + } + + ~value_initialized() + { + wrapper_address()->wrapper::~wrapper(); + } + + T const & data() const + { + return wrapper_address()->data; + } + + T& data() + { + return wrapper_address()->data; + } + + void swap(value_initialized & arg) + { + ::boost::swap( this->data(), arg.data() ); + } + + operator T const &() const { return this->data(); } + + operator T&() { return this->data(); } + +} ; + + + +template +T const& get ( value_initialized const& x ) +{ + return x.data() ; +} +template +T& get ( value_initialized& x ) +{ + return x.data() ; +} + +template +void swap ( value_initialized & lhs, value_initialized & rhs ) +{ + lhs.swap(rhs) ; +} + + +class initialized_value_t +{ + public : + + template operator T() const + { + return get( value_initialized() ); + } +}; + +initialized_value_t const initialized_value = {} ; + + +} +# 29 "/usr/include/boost-1_42/boost/mpl/for_each.hpp" 2 + +namespace boost { namespace mpl { + +namespace aux { + +template< bool done = true > +struct for_each_impl +{ + template< + typename Iterator + , typename LastIterator + , typename TransformFunc + , typename F + > + static void execute( + Iterator* + , LastIterator* + , TransformFunc* + , F + ) + { + } +}; + +template<> +struct for_each_impl +{ + template< + typename Iterator + , typename LastIterator + , typename TransformFunc + , typename F + > + static void execute( + Iterator* + , LastIterator* + , TransformFunc* + , F f + ) + { + typedef typename deref::type item; + typedef typename apply1::type arg; + + + + value_initialized x; + aux::unwrap(f, 0)(boost::get(x)); + + typedef typename mpl::next::type iter; + for_each_impl::value> + ::execute( static_cast(0), static_cast(0), static_cast(0), f); + } +}; + +} + + + +template< + typename Sequence + , typename TransformOp + , typename F + > +inline +void for_each(F f, Sequence* = 0, TransformOp* = 0) +{ + enum { mpl_assertion_in_line_95 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_arg( (void (*) ( is_sequence ))0, 1 ) ) ) }; + + typedef typename begin::type first; + typedef typename end::type last; + + aux::for_each_impl< boost::is_same::value > + ::execute(static_cast(0), static_cast(0), static_cast(0), f); +} + +template< + typename Sequence + , typename F + > +inline +void for_each(F f, Sequence* = 0) +{ + for_each >(f); +} + +}} +# 31 "/usr/include/boost-1_42/boost/python/object/class_metadata.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/placeholders.hpp" 1 +# 32 "/usr/include/boost-1_42/boost/python/object/class_metadata.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/single_view.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/single_view.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/single_element_iter.hpp" 1 +# 27 "/usr/include/boost-1_42/boost/mpl/aux_/single_element_iter.hpp" +namespace boost { namespace mpl { + + + +namespace aux { + +template< typename T, int is_last_ > +struct sel_iter; + +template< typename T > +struct sel_iter +{ + typedef random_access_iterator_tag category; + typedef sel_iter next; + typedef T type; +}; + +template< typename T > +struct sel_iter +{ + typedef random_access_iterator_tag category; + typedef sel_iter prior; +}; + +} + +template< typename T, int is_last_, typename Distance > +struct advance< aux::sel_iter,Distance> +{ + typedef aux::sel_iter< + T + , ( is_last_ + Distance::value ) + > type; +}; + +template< + typename T + , int l1 + , int l2 + > +struct distance< aux::sel_iter, aux::sel_iter > + : int_<( l2 - l1 )> +{ +}; +# 116 "/usr/include/boost-1_42/boost/mpl/aux_/single_element_iter.hpp" +}} +# 18 "/usr/include/boost-1_42/boost/mpl/single_view.hpp" 2 + + + +namespace boost { namespace mpl { + +template< + typename T = na + > +struct single_view + : iterator_range< + aux::sel_iter + , aux::sel_iter + > +{ +}; + +template<> struct single_view< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : single_view< T1 > { }; }; template< typename Tag > struct lambda< single_view< na > , Tag , int_<-1> > { typedef false_ is_le; typedef single_view< na > result_; typedef single_view< na > type; }; namespace aux { template< typename T1 > struct template_arity< single_view< T1 > > : int_<1> { }; template<> struct template_arity< single_view< na > > : int_<-1> { }; } + +}} +# 33 "/usr/include/boost-1_42/boost/python/object/class_metadata.hpp" 2 +# 42 "/usr/include/boost-1_42/boost/python/object/class_metadata.hpp" +namespace boost { namespace python { namespace objects { + + +void copy_class_object(type_info const& src, type_info const& dst); + + + + +template +struct register_base_of +{ + template + inline void operator()(Base*) const + { + + enum { mpl_assertion_in_line_57 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (is_same))0, 1 ) ) ) }; + + + + + + register_dynamic_id(); + + + register_conversion(false); + + + this->register_downcast((Base*)0, is_polymorphic()); + } + + private: + static inline void register_downcast(void*, mpl::false_) {} + + template + static inline void register_downcast(Base*, mpl::true_) + { + register_conversion(true); + } + +}; + + + + + +template +inline void register_shared_ptr_from_python_and_casts(T*, Bases) +{ + + python::detail::force_instantiate(converter::shared_ptr_from_python()); + + + + + + register_dynamic_id(); + mpl::for_each(register_base_of(), (Bases*)0, (add_pointer*)0); +} + + + + +template +struct select_held_type + : mpl::if_< + mpl::or_< + python::detail::specifies_bases + , is_same + > + , Prev + , T + > +{ +}; + +template < + class T + , class X1 + , class X2 + , class X3 +> +struct class_metadata +{ + + + + + + + + typedef typename select_held_type< + X1 + , typename select_held_type< + X2 + , typename select_held_type< + X3 + , python::detail::not_specified + >::type + >::type + >::type held_type_arg; + + + typedef typename python::detail::select_bases< + X1 + , typename python::detail::select_bases< + X2 + , typename python::detail::select_bases< + X3 + , python::bases<> + >::type + >::type + >::type bases; + + typedef mpl::or_< + is_same + , is_same + , is_same + > is_noncopyable; + + + + + + + typedef typename mpl::if_< + is_same, T, held_type_arg + >::type held_type; + + + typedef is_convertible use_value_holder; + + + + typedef typename mpl::eval_if< + use_value_holder + , mpl::identity + , pointee + >::type wrapped; + + + typedef mpl::or_< + has_back_reference + , is_same + , is_base_and_derived + > use_back_reference; + + + typedef typename mpl::eval_if< + use_back_reference + , mpl::if_< + use_value_holder + , value_holder_back_reference + , pointer_holder_back_reference + > + , mpl::if_< + use_value_holder + , value_holder + , pointer_holder + > + >::type holder; + + inline static void register_() + { + class_metadata::register_aux((T*)0); + } + + private: + template + inline static void register_aux(python::wrapper*) + { + typedef typename mpl::not_ >::type use_callback; + class_metadata::register_aux2((T2*)0, use_callback()); + } + + inline static void register_aux(void*) + { + typedef typename is_base_and_derived::type use_callback; + class_metadata::register_aux2((T*)0, use_callback()); + } + + template + inline static void register_aux2(T2*, Callback) + { + objects::register_shared_ptr_from_python_and_casts((T2*)0, bases()); + + class_metadata::maybe_register_callback_class((T2*)0, Callback()); + + class_metadata::maybe_register_class_to_python((T2*)0, is_noncopyable()); + + class_metadata::maybe_register_pointer_to_python( + (T2*)0, (use_value_holder*)0, (use_back_reference*)0); + } + + + + + + inline static void maybe_register_pointer_to_python(...) {} + + + inline static void maybe_register_pointer_to_python(void*,void*,mpl::true_*) + { + objects::copy_class_object(python::type_id(), python::type_id >()); + objects::copy_class_object(python::type_id(), python::type_id >()); + } + + + template + inline static void maybe_register_pointer_to_python(T2*, mpl::false_*, mpl::false_*) + { + python::detail::force_instantiate( + objects::class_value_wrapper< + held_type + , make_ptr_instance > + >() + ); + + + objects::copy_class_object(python::type_id(), python::type_id()); + + } + + + + inline static void maybe_register_class_to_python(void*, mpl::true_) {} + + + template + inline static void maybe_register_class_to_python(T2*, mpl::false_) + { + python::detail::force_instantiate(class_cref_wrapper >()); + + + objects::copy_class_object(python::type_id(), python::type_id()); + + } + + + + + inline static void maybe_register_callback_class(void*, mpl::false_) {} + + template + inline static void maybe_register_callback_class(T2*, mpl::true_) + { + objects::register_shared_ptr_from_python_and_casts( + (wrapped*)0, mpl::single_view()); + + + objects::copy_class_object(python::type_id(), python::type_id()); + } +}; + +}}} +# 24 "/usr/include/boost-1_42/boost/python/class.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/object/pickle_support.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/object/pickle_support.hpp" +namespace boost { namespace python { + +namespace api +{ + class object; +} +using api::object; +class tuple; + + object const& make_instance_reduce_function(); + +struct pickle_suite; + +namespace error_messages { + + template + struct missing_pickle_suite_function_or_incorrect_signature {}; + + inline void must_be_derived_from_pickle_suite(pickle_suite const&) {} +} + +namespace detail { struct pickle_suite_registration; } + +struct pickle_suite +{ + private: + struct inaccessible {}; + friend struct detail::pickle_suite_registration; + public: + static inaccessible* getinitargs() { return 0; } + static inaccessible* getstate() { return 0; } + static inaccessible* setstate() { return 0; } + static bool getstate_manages_dict() { return false; } +}; + +namespace detail { + + struct pickle_suite_registration + { + typedef pickle_suite::inaccessible inaccessible; + + template + static + void + register_( + Class_& cl, + tuple (*getinitargs_fn)(Tgetinitargs), + inaccessible* (* )(), + inaccessible* (* )(), + bool) + { + cl.enable_pickling_(false); + cl.def("__getinitargs__", getinitargs_fn); + } + + template + static + void + register_( + Class_& cl, + inaccessible* (* )(), + Rgetstate (*getstate_fn)(Tgetstate), + void (*setstate_fn)(Tsetstate, Ttuple), + bool getstate_manages_dict) + { + cl.enable_pickling_(getstate_manages_dict); + cl.def("__getstate__", getstate_fn); + cl.def("__setstate__", setstate_fn); + } + + template + static + void + register_( + Class_& cl, + tuple (*getinitargs_fn)(Tgetinitargs), + Rgetstate (*getstate_fn)(Tgetstate), + void (*setstate_fn)(Tsetstate, Ttuple), + bool getstate_manages_dict) + { + cl.enable_pickling_(getstate_manages_dict); + cl.def("__getinitargs__", getinitargs_fn); + cl.def("__getstate__", getstate_fn); + cl.def("__setstate__", setstate_fn); + } + + template + static + void + register_( + Class_&, + ...) + { + typedef typename + error_messages::missing_pickle_suite_function_or_incorrect_signature< + Class_>::error_type error_type; + } + }; + + template + struct pickle_suite_finalize + : PickleSuiteType, + pickle_suite_registration + {}; + +} + +}} +# 25 "/usr/include/boost-1_42/boost/python/class.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/python/detail/overloads_fwd.hpp" 1 + + + + + + + +namespace boost { namespace python { namespace detail { + + +struct overloads_base; + +template +inline void define_with_defaults(char const* name, OverloadsT const&, NameSpaceT&, SigT const&); + +}}} +# 28 "/usr/include/boost-1_42/boost/python/class.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/detail/operator_id.hpp" 1 + + + + + + + +namespace boost { namespace python { namespace detail { + +enum operator_id +{ + op_add, + op_sub, + op_mul, + op_div, + op_mod, + op_divmod, + op_pow, + op_lshift, + op_rshift, + op_and, + op_xor, + op_or, + op_neg, + op_pos, + op_abs, + op_invert, + op_int, + op_long, + op_float, + op_str, + op_cmp, + op_gt, + op_ge, + op_lt, + op_le, + op_eq, + op_ne, + op_iadd, + op_isub, + op_imul, + op_idiv, + op_imod, + op_ilshift, + op_irshift, + op_iand, + op_ixor, + op_ior, + op_complex, + + + + op_nonzero, + + op_repr +}; + +}}} +# 29 "/usr/include/boost-1_42/boost/python/class.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/detail/def_helper.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/python/detail/def_helper.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/apply.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/python/detail/def_helper.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/tuple/tuple.hpp" 1 +# 33 "/usr/include/boost-1_42/boost/tuple/tuple.hpp" +# 1 "/usr/include/boost-1_42/boost/tuple/detail/tuple_basic.hpp" 1 +# 43 "/usr/include/boost-1_42/boost/tuple/detail/tuple_basic.hpp" +namespace boost { +namespace tuples { + + +struct null_type {}; + + +namespace detail { + inline const null_type cnull() { return null_type(); } + + + + + +template struct IF { typedef Then RET; }; + +template struct IF { + typedef Else RET; +}; + +} + + +template struct cons; + + + +template < + class T0 = null_type, class T1 = null_type, class T2 = null_type, + class T3 = null_type, class T4 = null_type, class T5 = null_type, + class T6 = null_type, class T7 = null_type, class T8 = null_type, + class T9 = null_type> +class tuple; + + +template struct length; + + + +namespace detail { + + + +template +class generate_error; + + + + +template< int N > +struct get_class { + template + inline static RET get(const cons& t) + { + + + + + + return get_class::template get(t.tail); + + } + template + inline static RET get(cons& t) + { + + + + return get_class::template get(t.tail); + + } +}; + +template<> +struct get_class<0> { + template + inline static RET get(const cons& t) + { + return t.head; + } + template + inline static RET get(cons& t) + { + return t.head; + } +}; + +} +# 140 "/usr/include/boost-1_42/boost/tuple/detail/tuple_basic.hpp" +template +struct element +{ +private: + typedef typename T::tail_type Next; +public: + typedef typename element::type type; +}; +template +struct element<0,T> +{ + typedef typename T::head_type type; +}; + +template +struct element +{ +private: + typedef typename T::tail_type Next; + typedef typename element::type unqualified_type; +public: + + + + typedef typename boost::add_const::type type; + + +}; +template +struct element<0,const T> +{ + + + + typedef typename boost::add_const::type type; + +}; +# 233 "/usr/include/boost-1_42/boost/tuple/detail/tuple_basic.hpp" +template struct access_traits { + typedef const T& const_type; + typedef T& non_const_type; + + typedef const typename boost::remove_cv::type& parameter_type; + + + + + + +}; + +template struct access_traits { + + typedef T& const_type; + typedef T& non_const_type; + + typedef T& parameter_type; +}; + + + +template +inline typename access_traits< + typename element >::type + >::non_const_type +get(cons& c ) { + + + + return detail::get_class::template + + get< + typename access_traits< + typename element >::type + >::non_const_type, + HT,TT + >(c); +} + + + + +template +inline typename access_traits< + typename element >::type + >::const_type +get(const cons& c ) { + + + + return detail::get_class::template + + get< + typename access_traits< + typename element >::type + >::const_type, + HT,TT + >(c); +} + + +namespace detail { + + + + + + + +template class non_storeable_type { + non_storeable_type(); +}; + +template struct wrap_non_storeable_type { + typedef typename IF< + ::boost::is_function::value, non_storeable_type, T + >::RET type; +}; +template <> struct wrap_non_storeable_type { + typedef non_storeable_type type; +}; + +} + +template +struct cons { + + typedef HT head_type; + typedef TT tail_type; + + typedef typename + detail::wrap_non_storeable_type::type stored_head_type; + + stored_head_type head; + tail_type tail; + + typename access_traits::non_const_type + get_head() { return head; } + + typename access_traits::non_const_type + get_tail() { return tail; } + + typename access_traits::const_type + get_head() const { return head; } + + typename access_traits::const_type + get_tail() const { return tail; } + + cons() : head(), tail() {} + + + + + + + + cons(typename access_traits::parameter_type h, + const tail_type& t) + : head (h), tail(t) {} + + template + cons( T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, + T6& t6, T7& t7, T8& t8, T9& t9, T10& t10 ) + : head (t1), + tail (t2, t3, t4, t5, t6, t7, t8, t9, t10, detail::cnull()) + {} + + template + cons( const null_type& , T2& t2, T3& t3, T4& t4, T5& t5, + T6& t6, T7& t7, T8& t8, T9& t9, T10& t10 ) + : head (), + tail (t2, t3, t4, t5, t6, t7, t8, t9, t10, detail::cnull()) + {} + + + template + cons( const cons& u ) : head(u.head), tail(u.tail) {} + + template + cons& operator=( const cons& u ) { + head=u.head; tail=u.tail; return *this; + } + + + + cons& operator=(const cons& u) { + head = u.head; tail = u.tail; return *this; + } + + template + cons& operator=( const std::pair& u ) { + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((length::value == 2) == 0 ? false : true) >)> boost_static_assert_typedef_388; + head = u.first; tail.head = u.second; return *this; + } + + + template + typename access_traits< + typename element >::type + >::non_const_type + get() { + return boost::tuples::get(*this); + } + + template + typename access_traits< + typename element >::type + >::const_type + get() const { + return boost::tuples::get(*this); + } +}; + +template +struct cons { + + typedef HT head_type; + typedef null_type tail_type; + typedef cons self_type; + + typedef typename + detail::wrap_non_storeable_type::type stored_head_type; + stored_head_type head; + + typename access_traits::non_const_type + get_head() { return head; } + + null_type get_tail() { return null_type(); } + + typename access_traits::const_type + get_head() const { return head; } + + const null_type get_tail() const { return null_type(); } + + + cons() : head() {} + + cons(typename access_traits::parameter_type h, + const null_type& = null_type()) + : head (h) {} + + template + cons(T1& t1, const null_type&, const null_type&, const null_type&, + const null_type&, const null_type&, const null_type&, + const null_type&, const null_type&, const null_type&) + : head (t1) {} + + cons(const null_type&, + const null_type&, const null_type&, const null_type&, + const null_type&, const null_type&, const null_type&, + const null_type&, const null_type&, const null_type&) + : head () {} + + template + cons( const cons& u ) : head(u.head) {} + + template + cons& operator=(const cons& u ) + { head = u.head; return *this; } + + + + cons& operator=(const cons& u) { head = u.head; return *this; } + + template + typename access_traits< + typename element::type + >::non_const_type + get() { + return boost::tuples::get(*this); + } + + template + typename access_traits< + typename element::type + >::const_type + get() const { + return boost::tuples::get(*this); + } + +}; + + + +template +struct length { + static const int value = 1 + length::value; +}; + +template<> +struct length > { + static const int value = 0; +}; + +template<> +struct length const> { + static const int value = 0; +}; + +template<> +struct length { + static const int value = 0; +}; + +template<> +struct length { + static const int value = 0; +}; + +namespace detail { + + +template +struct map_tuple_to_cons +{ + typedef cons::type + > type; +}; + + +template <> +struct map_tuple_to_cons +{ + typedef null_type type; +}; + +} + + + +template + +class tuple : + public detail::map_tuple_to_cons::type +{ +public: + typedef typename + detail::map_tuple_to_cons::type inherited; + typedef typename inherited::head_type head_type; + typedef typename inherited::tail_type tail_type; + + + + tuple() {} + + tuple(typename access_traits::parameter_type t0) + : inherited(t0, detail::cnull(), detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull()) {} + + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1) + : inherited(t0, t1, detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull()) {} + + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1, + typename access_traits::parameter_type t2) + : inherited(t0, t1, t2, detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull()) {} + + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1, + typename access_traits::parameter_type t2, + typename access_traits::parameter_type t3) + : inherited(t0, t1, t2, t3, detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull(), + detail::cnull()) {} + + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1, + typename access_traits::parameter_type t2, + typename access_traits::parameter_type t3, + typename access_traits::parameter_type t4) + : inherited(t0, t1, t2, t3, t4, detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull()) {} + + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1, + typename access_traits::parameter_type t2, + typename access_traits::parameter_type t3, + typename access_traits::parameter_type t4, + typename access_traits::parameter_type t5) + : inherited(t0, t1, t2, t3, t4, t5, detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull()) {} + + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1, + typename access_traits::parameter_type t2, + typename access_traits::parameter_type t3, + typename access_traits::parameter_type t4, + typename access_traits::parameter_type t5, + typename access_traits::parameter_type t6) + : inherited(t0, t1, t2, t3, t4, t5, t6, detail::cnull(), + detail::cnull(), detail::cnull()) {} + + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1, + typename access_traits::parameter_type t2, + typename access_traits::parameter_type t3, + typename access_traits::parameter_type t4, + typename access_traits::parameter_type t5, + typename access_traits::parameter_type t6, + typename access_traits::parameter_type t7) + : inherited(t0, t1, t2, t3, t4, t5, t6, t7, detail::cnull(), + detail::cnull()) {} + + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1, + typename access_traits::parameter_type t2, + typename access_traits::parameter_type t3, + typename access_traits::parameter_type t4, + typename access_traits::parameter_type t5, + typename access_traits::parameter_type t6, + typename access_traits::parameter_type t7, + typename access_traits::parameter_type t8) + : inherited(t0, t1, t2, t3, t4, t5, t6, t7, t8, detail::cnull()) {} + + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1, + typename access_traits::parameter_type t2, + typename access_traits::parameter_type t3, + typename access_traits::parameter_type t4, + typename access_traits::parameter_type t5, + typename access_traits::parameter_type t6, + typename access_traits::parameter_type t7, + typename access_traits::parameter_type t8, + typename access_traits::parameter_type t9) + : inherited(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) {} + + + template + tuple(const cons& p) : inherited(p) {} + + template + tuple& operator=(const cons& k) { + inherited::operator=(k); + return *this; + } + + template + tuple& operator=(const std::pair& k) { + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((length::value == 2) == 0 ? false : true) >)> boost_static_assert_typedef_645; + this->head = k.first; + this->tail.head = k.second; + return *this; + } + +}; + + +template <> +class tuple : + public null_type +{ +public: + typedef null_type inherited; +}; + + + +namespace detail { + +struct swallow_assign { + + template + swallow_assign const& operator=(const T&) const { + return *this; + } +}; + +} + + +detail::swallow_assign const ignore = detail::swallow_assign(); +# 696 "/usr/include/boost-1_42/boost/tuple/detail/tuple_basic.hpp" +template +struct make_tuple_traits { + typedef T type; + + + + + + + +}; +# 720 "/usr/include/boost-1_42/boost/tuple/detail/tuple_basic.hpp" +template +struct make_tuple_traits { + typedef typename + detail::generate_error:: + do_not_use_with_reference_type error; +}; + + + + + +template struct make_tuple_traits { + typedef const T (&type)[n]; +}; + +template +struct make_tuple_traits { + typedef const T (&type)[n]; +}; + +template struct make_tuple_traits { + typedef const volatile T (&type)[n]; +}; + +template +struct make_tuple_traits { + typedef const volatile T (&type)[n]; +}; + +template +struct make_tuple_traits >{ + typedef T& type; +}; + +template +struct make_tuple_traits >{ + typedef T& type; +}; + + + + +namespace detail { + + + +template < + class T0 = null_type, class T1 = null_type, class T2 = null_type, + class T3 = null_type, class T4 = null_type, class T5 = null_type, + class T6 = null_type, class T7 = null_type, class T8 = null_type, + class T9 = null_type +> +struct make_tuple_mapper { + typedef + tuple::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type> type; +}; + +} + + +inline tuple<> make_tuple() { + return tuple<>(); +} + +template +inline typename detail::make_tuple_mapper::type +make_tuple(const T0& t0) { + typedef typename detail::make_tuple_mapper::type t; + return t(t0); +} + +template +inline typename detail::make_tuple_mapper::type +make_tuple(const T0& t0, const T1& t1) { + typedef typename detail::make_tuple_mapper::type t; + return t(t0, t1); +} + +template +inline typename detail::make_tuple_mapper::type +make_tuple(const T0& t0, const T1& t1, const T2& t2) { + typedef typename detail::make_tuple_mapper::type t; + return t(t0, t1, t2); +} + +template +inline typename detail::make_tuple_mapper::type +make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3) { + typedef typename detail::make_tuple_mapper::type t; + return t(t0, t1, t2, t3); +} + +template +inline typename detail::make_tuple_mapper::type +make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, + const T4& t4) { + typedef typename detail::make_tuple_mapper::type t; + return t(t0, t1, t2, t3, t4); +} + +template +inline typename detail::make_tuple_mapper::type +make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, + const T4& t4, const T5& t5) { + typedef typename detail::make_tuple_mapper::type t; + return t(t0, t1, t2, t3, t4, t5); +} + +template +inline typename detail::make_tuple_mapper::type +make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, + const T4& t4, const T5& t5, const T6& t6) { + typedef typename detail::make_tuple_mapper + ::type t; + return t(t0, t1, t2, t3, t4, t5, t6); +} + +template +inline typename detail::make_tuple_mapper::type +make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, + const T4& t4, const T5& t5, const T6& t6, const T7& t7) { + typedef typename detail::make_tuple_mapper + ::type t; + return t(t0, t1, t2, t3, t4, t5, t6, t7); +} + +template +inline typename detail::make_tuple_mapper + ::type +make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, + const T4& t4, const T5& t5, const T6& t6, const T7& t7, + const T8& t8) { + typedef typename detail::make_tuple_mapper + ::type t; + return t(t0, t1, t2, t3, t4, t5, t6, t7, t8); +} + +template +inline typename detail::make_tuple_mapper + ::type +make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, + const T4& t4, const T5& t5, const T6& t6, const T7& t7, + const T8& t8, const T9& t9) { + typedef typename detail::make_tuple_mapper + ::type t; + return t(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9); +} + + + + +template +inline tuple tie(T1& t1) { + return tuple (t1); +} + +template +inline tuple tie(T1& t1, T2& t2) { + return tuple (t1, t2); +} + +template +inline tuple tie(T1& t1, T2& t2, T3& t3) { + return tuple (t1, t2, t3); +} + +template +inline tuple tie(T1& t1, T2& t2, T3& t3, T4& t4) { + return tuple (t1, t2, t3, t4); +} + +template +inline tuple +tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5) { + return tuple (t1, t2, t3, t4, t5); +} + +template +inline tuple +tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6) { + return tuple (t1, t2, t3, t4, t5, t6); +} + +template +inline tuple +tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7) { + return tuple (t1, t2, t3, t4, t5, t6, t7); +} + +template +inline tuple +tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8) { + return tuple + (t1, t2, t3, t4, t5, t6, t7, t8); +} + +template +inline tuple +tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, + T9& t9) { + return tuple + (t1, t2, t3, t4, t5, t6, t7, t8, t9); +} + +template +inline tuple +tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, + T9& t9, T10& t10) { + return tuple + (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); +} + +} +} +# 34 "/usr/include/boost-1_42/boost/tuple/tuple.hpp" 2 + + + +namespace boost { + +using tuples::tuple; +using tuples::make_tuple; +using tuples::tie; + +using tuples::get; +# 87 "/usr/include/boost-1_42/boost/tuple/tuple.hpp" +} +# 19 "/usr/include/boost-1_42/boost/python/detail/def_helper.hpp" 2 + + + +namespace boost { namespace python { + +struct default_call_policies; + +namespace detail +{ + + + + + template + struct tuple_extract; + + + + template + struct tuple_extract_impl + { + template + struct apply + { + typedef typename Tuple::head_type result_type; + + static typename Tuple::head_type extract(Tuple const& x) + { + return x.get_head(); + } + }; + }; + + + + template <> + struct tuple_extract_impl + { + template + struct apply + { + + typedef tuple_extract next; + typedef typename next::result_type result_type; + + static result_type extract(Tuple const& x) + { + return next::extract(x.get_tail()); + } + }; + }; + + + + template + struct tuple_extract_base_select + { + typedef typename Tuple::head_type head_type; + typedef typename mpl::apply1::type>::type match_t; + static const bool match = match_t::value; + typedef typename tuple_extract_impl::template apply type; + }; + + template + struct tuple_extract + : tuple_extract_base_select< + Tuple + , typename mpl::lambda::type + >::type + { + }; + + + + + + + + template + struct doc_extract + : tuple_extract< + Tuple + , mpl::not_< + mpl::or_< + indirect_traits::is_reference_to_class + , indirect_traits::is_reference_to_member_function_pointer + > + > + > + { + }; + + template + struct keyword_extract + : tuple_extract > + { + }; + + template + struct policy_extract + : tuple_extract< + Tuple + , mpl::and_< + mpl::not_ > + , indirect_traits::is_reference_to_class + , mpl::not_ > + > + > + { + }; + + template + struct default_implementation_extract + : tuple_extract< + Tuple + , indirect_traits::is_reference_to_member_function_pointer + > + { + }; +# 146 "/usr/include/boost-1_42/boost/python/detail/def_helper.hpp" + template + struct def_helper + { + + + + typedef boost::tuples::tuple< + T1 const& + , T2 const& + , T3 const& + , T4 const& + , default_call_policies + , detail::keywords<0> + , char const* + , void(not_specified::*)() + + > all_t; + + + + def_helper(T1 const& a1) : m_all(a1,m_nil,m_nil,m_nil) {} + def_helper(T1 const& a1, T2 const& a2) : m_all(a1,a2,m_nil,m_nil) {} + def_helper(T1 const& a1, T2 const& a2, T3 const& a3) : m_all(a1,a2,a3,m_nil) {} + def_helper(T1 const& a1, T2 const& a2, T3 const& a3, T4 const& a4) : m_all(a1,a2,a3,a4) {} + + private: + typedef typename default_implementation_extract::result_type default_implementation_t; + + public: + + + + static const bool has_default_implementation = ( !is_same::value) + + ; + + public: + + char const* doc() const + { + return doc_extract::extract(m_all); + } + + typename keyword_extract::result_type keywords() const + { + return keyword_extract::extract(m_all); + } + + typename policy_extract::result_type policies() const + { + return policy_extract::extract(m_all); + } + + default_implementation_t default_implementation() const + { + return default_implementation_extract::extract(m_all); + } + + private: + all_t m_all; + not_specified m_nil; + }; +} + +}} +# 30 "/usr/include/boost-1_42/boost/python/class.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/detail/unwrap_type_id.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/detail/unwrap_type_id.hpp" +namespace boost { namespace python { + +template class wrapper; + +namespace detail { + +template +inline type_info unwrap_type_id(T*, ...) +{ + return type_id(); +} + +template +inline type_info unwrap_type_id(U*, wrapper*) +{ + return type_id(); +} + +}}} +# 32 "/usr/include/boost-1_42/boost/python/class.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/detail/unwrap_wrapper.hpp" 1 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/is_wrapper.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/detail/is_wrapper.hpp" +namespace boost { namespace python { + +template class wrapper; + +namespace detail +{ + typedef char (&is_not_wrapper)[2]; + is_not_wrapper is_wrapper_helper(...); + template + char is_wrapper_helper(wrapper const volatile*); + + + template + struct is_wrapper + : mpl::bool_<(sizeof(detail::is_wrapper_helper((T*)0)) == 1)> + {}; + +}}} +# 9 "/usr/include/boost-1_42/boost/python/detail/unwrap_wrapper.hpp" 2 + + + +namespace boost { namespace python { namespace detail { + +template +struct unwrap_wrapper_helper +{ + typedef typename T::_wrapper_wrapped_type_ type; +}; + +template +struct unwrap_wrapper_ + : mpl::eval_if,unwrap_wrapper_helper,mpl::identity > +{}; + +template +typename unwrap_wrapper_::type* +unwrap_wrapper(T*) +{ + return 0; +} + +}}} +# 33 "/usr/include/boost-1_42/boost/python/class.hpp" 2 +# 60 "/usr/include/boost-1_42/boost/python/class.hpp" +namespace boost { namespace python { + +template class def_visitor; + +enum no_init_t { no_init }; + +namespace detail +{ + + + + struct write_type_id + { + write_type_id(type_info**p) : p(p) {} + + + template + void operator()(T*) const + { + *(*p)++ = type_id(); + } + + type_info** p; + }; + + template + struct is_data_member_pointer + : mpl::and_< + is_member_pointer + , mpl::not_ > + > + {}; +# 107 "/usr/include/boost-1_42/boost/python/class.hpp" + namespace error + { +# 118 "/usr/include/boost-1_42/boost/python/class.hpp" + template struct assertion_failed { }; + template struct assertion_ok { typedef C failed; }; + + template + struct assertion + : mpl::if_, assertion_failed >::type + {}; + + + + + + + template + void not_a_derived_class_member(Default) {} + + template + struct virtual_function_default + { + template + static void + must_be_derived_class_member(Default const&) + { + typedef typename assertion > >::failed test0; + + typedef typename assertion >::failed test1; + + typedef typename assertion >::failed test2; + not_a_derived_class_member(Fn()); + } + }; + } +} + + + +template < + class W + , class X1 + , class X2 + , class X3 + > +class class_ : public objects::class_base +{ + public: + typedef objects::class_base base; + typedef class_ self; + typedef typename objects::class_metadata metadata; + typedef W wrapped_type; + + private: + + + + struct id_vector + { + typedef typename metadata::bases bases; + + id_vector() + { + + ids[0] = detail::unwrap_type_id((W*)0, (W*)0); + + + type_info* p = ids + 1; + mpl::for_each(detail::write_type_id(&p), (bases*)0, (add_pointer*)0); + } + + static const std::size_t size = mpl::size::value + 1 + ; + type_info ids[size]; + }; + friend struct id_vector; + + public: + + + class_(char const* name, char const* doc = 0); + + + class_(char const* name, no_init_t); + + + class_(char const* name, char const* doc, no_init_t); + + + template + inline class_(char const* name, init_base const& i) + : base(name, id_vector::size, id_vector().ids) + { + this->initialize(i); + } + + + template + inline class_(char const* name, char const* doc, init_base const& i) + : base(name, id_vector::size, id_vector().ids, doc) + { + this->initialize(i); + } + + public: + + + template + self& def(def_visitor const& visitor) + { + visitor.visit(*this); + return *this; + } + + + + + template + self& def(char const* name, F f) + { + this->def_impl( + detail::unwrap_wrapper((W*)0) + , name, f, detail::def_helper(0), &f); + return *this; + } + + template + self& def(char const* name, A1 a1, A2 const& a2) + { + this->def_maybe_overloads(name, a1, a2, &a2); + return *this; + } + + template + self& def(char const* name, Fn fn, A1 const& a1, A2 const& a2) + { + + + + + this->def_impl( + detail::unwrap_wrapper((W*)0) + , name, fn + , detail::def_helper(a1,a2) + , &fn); + + return *this; + } + + template + self& def(char const* name, Fn fn, A1 const& a1, A2 const& a2, A3 const& a3) + { + this->def_impl( + detail::unwrap_wrapper((W*)0) + , name, fn + , detail::def_helper(a1,a2,a3) + , &fn); + + return *this; + } + + + + + template + self& def_readonly(char const* name, D const& d, char const* doc=0) + { + return this->def_readonly_impl(name, d, doc ); + } + + template + self& def_readwrite(char const* name, D const& d, char const* doc=0) + { + return this->def_readwrite_impl(name, d, doc ); + } + + template + self& def_readonly(char const* name, D& d, char const* doc=0) + { + return this->def_readonly_impl(name, d, doc ); + } + + template + self& def_readwrite(char const* name, D& d, char const* doc=0) + { + return this->def_readwrite_impl(name, d, doc ); + } + + + + template + self& add_property(char const* name, Get fget, char const* docstr = 0) + { + base::add_property(name, this->make_getter(fget), docstr); + return *this; + } + + template + self& add_property(char const* name, Get fget, Set fset, char const* docstr = 0) + { + base::add_property( + name, this->make_getter(fget), this->make_setter(fset), docstr); + return *this; + } +# 361 "/usr/include/boost-1_42/boost/python/class.hpp" + template + self& add_static_property(char const* name, Get fget) + { + base::add_static_property(name, object(fget)); + return *this; + } + + template + self& add_static_property(char const* name, Get fget, Set fset) + { + base::add_static_property(name, object(fget), object(fset)); + return *this; + } + + template + self& setattr(char const* name, U const& x) + { + this->base::setattr(name, object(x)); + return *this; + } + + + template + self& def_pickle(PickleSuiteType const& x) + { + error_messages::must_be_derived_from_pickle_suite(x); + detail::pickle_suite_finalize::register_( + *this, + &PickleSuiteType::getinitargs, + &PickleSuiteType::getstate, + &PickleSuiteType::setstate, + PickleSuiteType::getstate_manages_dict()); + return *this; + } + + self& enable_pickling() + { + this->base::enable_pickling_(false); + return *this; + } + + self& staticmethod(char const* name) + { + this->make_method_static(name); + return *this; + } + private: +# 416 "/usr/include/boost-1_42/boost/python/class.hpp" + template + object make_getter(F f) + { + typedef typename api::is_object_operators::type is_obj_or_proxy; + + return this->make_fn_impl( + detail::unwrap_wrapper((W*)0) + , f, is_obj_or_proxy(), (char*)0, detail::is_data_member_pointer() + ); + } + + template + object make_setter(F f) + { + typedef typename api::is_object_operators::type is_obj_or_proxy; + + return this->make_fn_impl( + detail::unwrap_wrapper((W*)0) + , f, is_obj_or_proxy(), (int*)0, detail::is_data_member_pointer() + ); + } + + template + object make_fn_impl(T*, F const& f, mpl::false_, void*, mpl::false_) + { + return python::make_function(f, default_call_policies(), detail::get_signature(f, (T*)0)); + } + + template + object make_fn_impl(T*, D B::*pm_, mpl::false_, char*, mpl::true_) + { + D T::*pm = pm_; + return python::make_getter(pm); + } + + template + object make_fn_impl(T*, D B::*pm_, mpl::false_, int*, mpl::true_) + { + D T::*pm = pm_; + return python::make_setter(pm); + } + + template + object make_fn_impl(T*, F const& x, mpl::true_, void*, mpl::false_) + { + return x; + } + + + template + self& def_readonly_impl( + char const* name, D B::*pm_, char const* doc ) + { + return this->add_property(name, pm_, doc); + } + + template + self& def_readwrite_impl( + char const* name, D B::*pm_, char const* doc ) + { + return this->add_property(name, pm_, pm_, doc); + } + + template + self& def_readonly_impl( + char const* name, D& d, char const* ) + { + return this->add_static_property(name, python::make_getter(d)); + } + + template + self& def_readwrite_impl( + char const* name, D& d, char const* ) + { + return this->add_static_property(name, python::make_getter(d), python::make_setter(d)); + } + + template + inline void initialize(DefVisitor const& i) + { + metadata::register_(); + + typedef typename metadata::holder holder; + this->set_instance_size( objects::additional_instance_size::value ); + + this->def(i); + } + + inline void initialize(no_init_t) + { + metadata::register_(); + this->def_no_init(); + } + + + + + + + template + inline void def_impl( + T* + , char const* name + , LeafVisitor + , Helper const& helper + , def_visitor const* v + ) + { + v->visit(*this, name, helper); + } + + template + inline void def_impl( + T* + , char const* name + , Fn fn + , Helper const& helper + , ... + ) + { + objects::add_to_namespace( + *this + , name + , make_function( + fn + , helper.policies() + , helper.keywords() + , detail::get_signature(fn, (T*)0) + ) + , helper.doc() + ); + + this->def_default(name, fn, helper, mpl::bool_()); + } +# 558 "/usr/include/boost-1_42/boost/python/class.hpp" + template + inline void def_default( + char const* name + , Fn + , Helper const& helper + , mpl::bool_) + { + detail::error::virtual_function_default::must_be_derived_class_member( + helper.default_implementation()); + + objects::add_to_namespace( + *this, name, + make_function( + helper.default_implementation(), helper.policies(), helper.keywords()) + ); + } + + template + inline void def_default(char const*, Fn, Helper const&, mpl::bool_) + { } +# 587 "/usr/include/boost-1_42/boost/python/class.hpp" + template + void def_maybe_overloads( + char const* name + , SigT sig + , OverloadsT const& overloads + , detail::overloads_base const*) + + { + + + detail::define_with_defaults( + name, overloads, *this, detail::get_signature(sig)); + } + + template + void def_maybe_overloads( + char const* name + , Fn fn + , A1 const& a1 + , ...) + { + this->def_impl( + detail::unwrap_wrapper((W*)0) + , name + , fn + , detail::def_helper(a1) + , &fn + ); + + } + +}; + + + + + + +template +inline class_::class_(char const* name, char const* doc) + : base(name, id_vector::size, id_vector().ids, doc) +{ + this->initialize(init<>()); + +} + +template +inline class_::class_(char const* name, no_init_t) + : base(name, id_vector::size, id_vector().ids) +{ + this->initialize(no_init); +} + +template +inline class_::class_(char const* name, char const* doc, no_init_t) + : base(name, id_vector::size, id_vector().ids, doc) +{ + this->initialize(no_init); +} + +}} +# 19 "/usr/include/boost-1_42/boost/python.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/copy_const_reference.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/copy_const_reference.hpp" +namespace boost { namespace python { + +namespace detail +{ + template + struct copy_const_reference_expects_a_const_reference_return_type + + {} + + ; +} + +template struct to_python_value; + +struct copy_const_reference +{ + template + struct apply + { + typedef typename mpl::if_c< + indirect_traits::is_reference_to_const::value + , to_python_value + , detail::copy_const_reference_expects_a_const_reference_return_type + >::type type; + }; +}; + + +}} +# 20 "/usr/include/boost-1_42/boost/python.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/copy_non_const_reference.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/copy_non_const_reference.hpp" +namespace boost { namespace python { + +namespace detail +{ + template + struct copy_non_const_reference_expects_a_non_const_reference_return_type + + {} + + ; +} + +template struct to_python_value; + +struct copy_non_const_reference +{ + template + struct apply + { + typedef typename mpl::if_c< + indirect_traits::is_reference_to_non_const::value + , to_python_value + , detail::copy_non_const_reference_expects_a_non_const_reference_return_type + >::type type; + }; +}; + + +}} +# 21 "/usr/include/boost-1_42/boost/python.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/python/def.hpp" +# 1 "/usr/include/boost-1_42/boost/python/scope.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/scope.hpp" +namespace boost { namespace python { + +namespace detail +{ + + + extern PyObject* current_scope; +} + +class scope + : public object +{ + public: + inline scope(scope const&); + inline scope(object const&); + inline scope(); + inline ~scope(); + + private: + PyObject* m_previous_scope; + + private: + void operator=(scope const&); +}; + +inline scope::scope(object const& new_scope) + : object(new_scope) + , m_previous_scope(detail::current_scope) +{ + detail::current_scope = python::incref(new_scope.ptr()); +} + +inline scope::scope() + : object(detail::borrowed_reference( + detail::current_scope ? detail::current_scope : (&_Py_NoneStruct) + )) + , m_previous_scope(python::xincref(detail::current_scope)) +{ +} + +inline scope::~scope() +{ + python::xdecref(detail::current_scope); + detail::current_scope = m_previous_scope; +} + +namespace converter +{ + template <> + struct object_manager_traits + : object_manager_traits + { + }; +} + + +inline scope::scope(scope const& new_scope) + : object(new_scope) + , m_previous_scope(detail::current_scope) +{ + detail::current_scope = python::incref(new_scope.ptr()); +} + +}} +# 15 "/usr/include/boost-1_42/boost/python/def.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/signature.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/python/def.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/detail/scope.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/detail/scope.hpp" +namespace boost { namespace python { namespace detail { + +void scope_setattr_doc(char const* name, object const& obj, char const* doc); + +}}} +# 17 "/usr/include/boost-1_42/boost/python/def.hpp" 2 + +namespace boost { namespace python { + +namespace detail +{ + namespace error + { + + template struct multiple_functions_passed_to_def; + template <> struct multiple_functions_passed_to_def { typedef char type; }; + } + + + + + + template + void def_from_helper( + char const* name, F const& fn, Helper const& helper) + { + + typedef typename error::multiple_functions_passed_to_def< + Helper::has_default_implementation + >::type assertion; + + detail::scope_setattr_doc( + name, boost::python::make_function( + fn + , helper.policies() + , helper.keywords()) + , helper.doc() + ); + } + + + + + + + + template + void + def_maybe_overloads( + char const* name + , Fn fn + , A1 const& a1 + , ...) + { + detail::def_from_helper(name, fn, def_helper(a1)); + } + + template + void def_maybe_overloads( + char const* name + , SigT sig + , StubsT const& stubs + , detail::overloads_base const*) + { + scope current; + + detail::define_with_defaults( + name, stubs, current, detail::get_signature(sig)); + } + + template + object make_function1(T fn, ...) { return make_function(fn); } + + inline + object make_function1(object const& x, object const*) { return x; } +} + +template +void def(char const* name, Fn fn) +{ + detail::scope_setattr_doc(name, detail::make_function1(fn, &fn), 0); +} + +template +void def(char const* name, Arg1T arg1, Arg2T const& arg2) +{ + detail::def_maybe_overloads(name, arg1, arg2, &arg2); +} + +template +void def(char const* name, F f, A1 const& a1, A2 const& a2) +{ + detail::def_from_helper(name, f, detail::def_helper(a1,a2)); +} + +template +void def(char const* name, F f, A1 const& a1, A2 const& a2, A3 const& a3) +{ + detail::def_from_helper(name, f, detail::def_helper(a1,a2,a3)); +} + +}} +# 23 "/usr/include/boost-1_42/boost/python.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/dict.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/dict.hpp" +# 1 "/usr/include/boost-1_42/boost/python/list.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/list.hpp" +# 1 "/usr/include/boost-1_42/boost/python/converter/pytype_object_mgr_traits.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/python/converter/pytype_object_mgr_traits.hpp" +namespace boost { namespace python { namespace converter { + + + +template struct object_manager_traits; + + + + +template +struct pytype_object_manager_traits + : pyobject_type +{ + static const bool is_specialized = true; + static inline python::detail::new_reference adopt(PyObject*); +}; + + + + +template +inline python::detail::new_reference pytype_object_manager_traits::adopt(PyObject* x) +{ + return python::detail::new_reference(python::pytype_check(pytype, x)); +} + +}}} +# 12 "/usr/include/boost-1_42/boost/python/list.hpp" 2 + + +namespace boost { namespace python { + +namespace detail +{ + struct list_base : object + { + void append(object_cref); + + ssize_t count(object_cref value) const; + + void extend(object_cref sequence); + + long index(object_cref value) const; + + void insert(ssize_t index, object_cref); + void insert(object const& index, object_cref); + + object pop(); + object pop(ssize_t index); + object pop(object const& index); + + void remove(object_cref value); + + void reverse(); + + void sort(); + + + + + void sort(object_cref cmpfunc); + + + protected: + list_base(); + explicit list_base(object_cref sequence); + + inline explicit list_base(python::detail::borrowed_reference p) : object(p) {} inline explicit list_base(python::detail::new_reference p) : object(p) {} inline explicit list_base(python::detail::new_non_null_reference p) : object(p) {} + private: + static detail::new_non_null_reference call(object const&); + }; +} + +class list : public detail::list_base +{ + typedef detail::list_base base; + public: + list() {} + + template + explicit list(T const& sequence) + : base(object(sequence)) + { + } + + template + void append(T const& x) + { + base::append(object(x)); + } + + template + long count(T const& value) const + { + return base::count(object(value)); + } + + template + void extend(T const& x) + { + base::extend(object(x)); + } + + template + long index(T const& x) const + { + return base::index(object(x)); + } + + template + void insert(ssize_t index, T const& x) + { + base::insert(index, object(x)); + } + + template + void insert(object const& index, T const& x) + { + base::insert(index, object(x)); + } + + object pop() { return base::pop(); } + object pop(ssize_t index) { return base::pop(index); } + + template + object pop(T const& index) + { + return base::pop(object(index)); + } + + template + void remove(T const& value) + { + base::remove(object(value)); + } + + + void sort() { base::sort(); } + + template + void sort(T const& value) + { + base::sort(object(value)); + } + + + public: + inline explicit list(python::detail::borrowed_reference p) : base(p) {} inline explicit list(python::detail::new_reference p) : base(p) {} inline explicit list(python::detail::new_non_null_reference p) : base(p) {} +}; + + + + +namespace converter +{ + template <> + struct object_manager_traits + : pytype_object_manager_traits<&PyList_Type,list> + { + }; +} + +}} +# 12 "/usr/include/boost-1_42/boost/python/dict.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/tuple.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/python/tuple.hpp" +namespace boost { namespace python { + +namespace detail +{ + struct tuple_base : object + { + protected: + tuple_base(); + tuple_base(object_cref sequence); + + inline explicit tuple_base(python::detail::borrowed_reference p) : object(p) {} inline explicit tuple_base(python::detail::new_reference p) : object(p) {} inline explicit tuple_base(python::detail::new_non_null_reference p) : object(p) {} + + private: + static detail::new_reference call(object const&); + }; +} + +class tuple : public detail::tuple_base +{ + typedef detail::tuple_base base; + public: + tuple() {} + + template + explicit tuple(T const& sequence) + : base(object(sequence)) + { + } + + public: + inline explicit tuple(python::detail::borrowed_reference p) : base(p) {} inline explicit tuple(python::detail::new_reference p) : base(p) {} inline explicit tuple(python::detail::new_non_null_reference p) : base(p) {} +}; + + + + + +namespace converter +{ + template <> + struct object_manager_traits + : pytype_object_manager_traits<&PyTuple_Type,tuple> + { + }; +} + + +inline tuple make_tuple() { return tuple(); } + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 52 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" + template < class A0> + tuple + make_tuple( A0 const& a0) + { + tuple result((detail::new_reference)::PyTuple_New(1)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); + return result; + } +# 53 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" + template < class A0 , class A1> + tuple + make_tuple( A0 const& a0 , A1 const& a1) + { + tuple result((detail::new_reference)::PyTuple_New(2)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); + return result; + } +# 58 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" + template < class A0 , class A1 , class A2> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2) + { + tuple result((detail::new_reference)::PyTuple_New(3)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); + return result; + } +# 63 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" + template < class A0 , class A1 , class A2 , class A3> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3) + { + tuple result((detail::new_reference)::PyTuple_New(4)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[3] = python::incref(python::object(a3).ptr())); + return result; + } +# 68 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" + template < class A0 , class A1 , class A2 , class A3 , class A4> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4) + { + tuple result((detail::new_reference)::PyTuple_New(5)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[3] = python::incref(python::object(a3).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[4] = python::incref(python::object(a4).ptr())); + return result; + } +# 73 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5) + { + tuple result((detail::new_reference)::PyTuple_New(6)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[3] = python::incref(python::object(a3).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[4] = python::incref(python::object(a4).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[5] = python::incref(python::object(a5).ptr())); + return result; + } +# 78 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6) + { + tuple result((detail::new_reference)::PyTuple_New(7)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[3] = python::incref(python::object(a3).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[4] = python::incref(python::object(a4).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[5] = python::incref(python::object(a5).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[6] = python::incref(python::object(a6).ptr())); + return result; + } +# 83 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7) + { + tuple result((detail::new_reference)::PyTuple_New(8)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[3] = python::incref(python::object(a3).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[4] = python::incref(python::object(a4).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[5] = python::incref(python::object(a5).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[6] = python::incref(python::object(a6).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[7] = python::incref(python::object(a7).ptr())); + return result; + } +# 88 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8) + { + tuple result((detail::new_reference)::PyTuple_New(9)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[3] = python::incref(python::object(a3).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[4] = python::incref(python::object(a4).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[5] = python::incref(python::object(a5).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[6] = python::incref(python::object(a6).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[7] = python::incref(python::object(a7).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[8] = python::incref(python::object(a8).ptr())); + return result; + } +# 93 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9) + { + tuple result((detail::new_reference)::PyTuple_New(10)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[3] = python::incref(python::object(a3).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[4] = python::incref(python::object(a4).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[5] = python::incref(python::object(a5).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[6] = python::incref(python::object(a6).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[7] = python::incref(python::object(a7).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[8] = python::incref(python::object(a8).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[9] = python::incref(python::object(a9).ptr())); + return result; + } +# 98 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10) + { + tuple result((detail::new_reference)::PyTuple_New(11)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[3] = python::incref(python::object(a3).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[4] = python::incref(python::object(a4).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[5] = python::incref(python::object(a5).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[6] = python::incref(python::object(a6).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[7] = python::incref(python::object(a7).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[8] = python::incref(python::object(a8).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[9] = python::incref(python::object(a9).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[10] = python::incref(python::object(a10).ptr())); + return result; + } +# 103 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11) + { + tuple result((detail::new_reference)::PyTuple_New(12)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[3] = python::incref(python::object(a3).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[4] = python::incref(python::object(a4).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[5] = python::incref(python::object(a5).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[6] = python::incref(python::object(a6).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[7] = python::incref(python::object(a7).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[8] = python::incref(python::object(a8).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[9] = python::incref(python::object(a9).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[10] = python::incref(python::object(a10).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[11] = python::incref(python::object(a11).ptr())); + return result; + } +# 108 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12) + { + tuple result((detail::new_reference)::PyTuple_New(13)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[3] = python::incref(python::object(a3).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[4] = python::incref(python::object(a4).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[5] = python::incref(python::object(a5).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[6] = python::incref(python::object(a6).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[7] = python::incref(python::object(a7).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[8] = python::incref(python::object(a8).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[9] = python::incref(python::object(a9).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[10] = python::incref(python::object(a10).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[11] = python::incref(python::object(a11).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[12] = python::incref(python::object(a12).ptr())); + return result; + } +# 113 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13) + { + tuple result((detail::new_reference)::PyTuple_New(14)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[3] = python::incref(python::object(a3).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[4] = python::incref(python::object(a4).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[5] = python::incref(python::object(a5).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[6] = python::incref(python::object(a6).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[7] = python::incref(python::object(a7).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[8] = python::incref(python::object(a8).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[9] = python::incref(python::object(a9).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[10] = python::incref(python::object(a10).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[11] = python::incref(python::object(a11).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[12] = python::incref(python::object(a12).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[13] = python::incref(python::object(a13).ptr())); + return result; + } +# 118 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/python/detail/make_tuple.hpp" + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 , class A14> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14) + { + tuple result((detail::new_reference)::PyTuple_New(15)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[3] = python::incref(python::object(a3).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[4] = python::incref(python::object(a4).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[5] = python::incref(python::object(a5).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[6] = python::incref(python::object(a6).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[7] = python::incref(python::object(a7).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[8] = python::incref(python::object(a8).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[9] = python::incref(python::object(a9).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[10] = python::incref(python::object(a10).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[11] = python::incref(python::object(a11).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[12] = python::incref(python::object(a12).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[13] = python::incref(python::object(a13).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[14] = python::incref(python::object(a14).ptr())); + return result; + } +# 123 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 66 "/usr/include/boost-1_42/boost/python/tuple.hpp" 2 + +}} +# 13 "/usr/include/boost-1_42/boost/python/dict.hpp" 2 + + +namespace boost { namespace python { + +class dict; + +namespace detail +{ + struct dict_base : object + { + + void clear(); + + + dict copy(); + + + object get(object_cref k) const; + + object get(object_cref k, object_cref d) const; + + + bool has_key(object_cref k) const; + + + list items() const; + + + object iteritems() const; + + + object iterkeys() const; + + + object itervalues() const; + + + list keys() const; + + + + tuple popitem(); + + + object setdefault(object_cref k); + + object setdefault(object_cref k, object_cref d); + + + void update(object_cref E); + + + list values() const; + + protected: + + + + + dict_base(); + explicit dict_base(object_cref data); + + inline explicit dict_base(python::detail::borrowed_reference p) : object(p) {} inline explicit dict_base(python::detail::new_reference p) : object(p) {} inline explicit dict_base(python::detail::new_non_null_reference p) : object(p) {} + private: + static detail::new_reference call(object const&); + }; +} + +class dict : public detail::dict_base +{ + typedef detail::dict_base base; + public: + + + + + dict() {} + + template + explicit dict(T const& data) + : base(object(data)) + { + } + + template + object get(T const& k) const + { + return base::get(object(k)); + } + + template + object get(T1 const& k, T2 const& d) const + { + return base::get(object(k),object(d)); + } + + template + bool has_key(T const& k) const + { + return base::has_key(object(k)); + } + + template + object setdefault(T const& k) + { + return base::setdefault(object(k)); + } + + template + object setdefault(T1 const& k, T2 const& d) + { + return base::setdefault(object(k),object(d)); + } + + template + void update(T const& E) + { + base::update(object(E)); + } + + public: + inline explicit dict(python::detail::borrowed_reference p) : base(p) {} inline explicit dict(python::detail::new_reference p) : base(p) {} inline explicit dict(python::detail::new_non_null_reference p) : base(p) {} +}; + + + + +namespace converter +{ + template <> + struct object_manager_traits + : pytype_object_manager_traits<&PyDict_Type,dict> + { + }; +} + +}} +# 25 "/usr/include/boost-1_42/boost/python.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/docstring_options.hpp" 1 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/python/object/function.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/object/function.hpp" +# 1 "/usr/include/boost-1_42/boost/function/function2.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/function/function2.hpp" +# 1 "/usr/include/boost-1_42/boost/function/detail/maybe_include.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/function/function2.hpp" 2 +# 12 "/usr/include/boost-1_42/boost/python/object/function.hpp" 2 + + + +namespace boost { namespace python { namespace objects { + + +struct function : PyObject +{ + function( + py_function const& + , python::detail::keyword const* names_and_defaults + , unsigned num_keywords); + + ~function(); + + PyObject* call(PyObject*, PyObject*) const; + + + + + static void add_to_namespace( + object const& name_space, char const* name, object const& attribute); + + static void add_to_namespace( + object const& name_space, char const* name, object const& attribute, char const* doc); + + object const& doc() const; + void doc(object const& x); + + object const& name() const; + + private: + object signature(bool show_return_type=false) const; + object signatures(bool show_return_type=false) const; + void argument_error(PyObject* args, PyObject* keywords) const; + void add_overload(handle const&); + + private: + py_function m_fn; + handle m_overloads; + object m_name; + object m_namespace; + object m_doc; + object m_arg_names; + unsigned m_nkeyword_values; + friend class function_doc_signature_generator; +}; + + + + +inline object const& function::doc() const +{ + return this->m_doc; +} + +inline void function::doc(object const& x) +{ + this->m_doc = x; +} + +inline object const& function::name() const +{ + return this->m_name; +} + +}}} +# 9 "/usr/include/boost-1_42/boost/python/docstring_options.hpp" 2 + +namespace boost { namespace python { + + + +class docstring_options : boost::noncopyable +{ + public: + docstring_options(bool show_all=true) + { + previous_show_user_defined_ = show_user_defined_; + previous_show_py_signatures_ = show_py_signatures_; + previous_show_cpp_signatures_ = show_cpp_signatures_; + show_user_defined_ = show_all; + show_cpp_signatures_ = show_all; + show_py_signatures_ = show_all; + } + + docstring_options(bool show_user_defined, bool show_signatures) + { + previous_show_user_defined_ = show_user_defined_; + previous_show_cpp_signatures_ = show_cpp_signatures_; + previous_show_py_signatures_ = show_py_signatures_; + show_user_defined_ = show_user_defined; + show_cpp_signatures_ = show_signatures; + show_py_signatures_ = show_signatures; + } + + docstring_options(bool show_user_defined, bool show_py_signatures, bool show_cpp_signatures) + { + previous_show_user_defined_ = show_user_defined_; + previous_show_cpp_signatures_ = show_cpp_signatures_; + previous_show_py_signatures_ = show_py_signatures_; + show_user_defined_ = show_user_defined; + show_cpp_signatures_ = show_cpp_signatures; + show_py_signatures_ = show_py_signatures; + } + + ~docstring_options() + { + show_user_defined_ = previous_show_user_defined_; + show_cpp_signatures_ = previous_show_cpp_signatures_; + show_py_signatures_ = previous_show_py_signatures_; + } + + void + disable_user_defined() { show_user_defined_ = false; } + + void + enable_user_defined() { show_user_defined_ = true; } + + void + disable_py_signatures() + { + show_py_signatures_ = false; + } + + void + enable_py_signatures() + { + show_py_signatures_ = true; + } + + void + disable_cpp_signatures() + { + show_cpp_signatures_ = false; + } + + void + enable_cpp_signatures() + { + show_cpp_signatures_ = true; + } + + void + disable_signatures() + { + show_cpp_signatures_ = false; + show_py_signatures_ = false; + } + + void + enable_signatures() + { + show_cpp_signatures_ = true; + show_py_signatures_ = true; + } + + void + disable_all() + { + show_user_defined_ = false; + show_cpp_signatures_ = false; + show_py_signatures_ = false; + } + + void + enable_all() + { + show_user_defined_ = true; + show_cpp_signatures_ = true; + show_py_signatures_ = true; + } + + friend struct objects::function; + + private: + static volatile bool show_user_defined_; + static volatile bool show_cpp_signatures_; + static volatile bool show_py_signatures_; + bool previous_show_user_defined_; + bool previous_show_cpp_signatures_; + bool previous_show_py_signatures_; +}; + +}} +# 26 "/usr/include/boost-1_42/boost/python.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/enum.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/enum.hpp" +# 1 "/usr/include/boost-1_42/boost/python/object/enum_base.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/python/object/enum_base.hpp" +namespace boost { namespace python { namespace objects { + +struct enum_base : python::api::object +{ + protected: + enum_base( + char const* name + , converter::to_python_function_t + , converter::convertible_function + , converter::constructor_function + , type_info + , const char *doc = 0 + ); + + void add_value(char const* name, long value); + void export_values(); + + static PyObject* to_python(PyTypeObject* type, long x); +}; + +}}} +# 11 "/usr/include/boost-1_42/boost/python/enum.hpp" 2 + + + +namespace boost { namespace python { + +template +struct enum_ : public objects::enum_base +{ + typedef objects::enum_base base; + + + enum_(char const* name, char const* doc = 0); + + + inline enum_& value(char const* name, T); + + + + inline enum_& export_values(); + private: + static PyObject* to_python(void const* x); + static void* convertible_from_python(PyObject* obj); + static void construct(PyObject* obj, converter::rvalue_from_python_stage1_data* data); +}; + +template +inline enum_::enum_(char const* name, char const* doc ) + : base( + name + , &enum_::to_python + , &enum_::convertible_from_python + , &enum_::construct + , type_id() + , doc + ) +{ +} + + + +template +PyObject* enum_::to_python(void const* x) +{ + return base::to_python( + converter::registered::converters.m_class_object + , static_cast(*(T const*)x)); +} +# 66 "/usr/include/boost-1_42/boost/python/enum.hpp" +template +void* enum_::convertible_from_python(PyObject* obj) +{ + return PyObject_IsInstance( + obj + , upcast( + converter::registered::converters.m_class_object)) + + ? obj : 0; +} + + + +template +void enum_::construct(PyObject* obj, converter::rvalue_from_python_stage1_data* data) +{ + + + + T x = static_cast((((PyIntObject *)(obj))->ob_ival)); + + void* const storage = ((converter::rvalue_from_python_storage*)data)->storage.bytes; + new (storage) T(x); + data->convertible = storage; +} + +template +inline enum_& enum_::value(char const* name, T x) +{ + this->add_value(name, static_cast(x)); + return *this; +} + +template +inline enum_& enum_::export_values() +{ + this->base::export_values(); + return *this; +} + +}} +# 27 "/usr/include/boost-1_42/boost/python.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/exception_translator.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/exception_translator.hpp" +# 1 "/usr/include/boost-1_42/boost/bind.hpp" 1 +# 22 "/usr/include/boost-1_42/boost/bind.hpp" +# 1 "/usr/include/boost-1_42/boost/bind/bind.hpp" 1 +# 28 "/usr/include/boost-1_42/boost/bind/bind.hpp" +# 1 "/usr/include/boost-1_42/boost/is_placeholder.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/is_placeholder.hpp" +namespace boost +{ + +template< class T > struct is_placeholder +{ + enum _vt { value = 0 }; +}; + +} +# 29 "/usr/include/boost-1_42/boost/bind/bind.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/bind/arg.hpp" 1 +# 25 "/usr/include/boost-1_42/boost/bind/arg.hpp" +namespace boost +{ + +template< int I > struct arg +{ + arg() + { + } + + template< class T > arg( T const & ) + { + + typedef char T_must_be_placeholder[ I == is_placeholder::value? 1: -1 ]; + } +}; + +template< int I > bool operator==( arg const &, arg const & ) +{ + return true; +} + + + +template< int I > struct is_placeholder< arg > +{ + enum _vt { value = I }; +}; + +template< int I > struct is_placeholder< arg (*) () > +{ + enum _vt { value = I }; +}; + + + +} +# 30 "/usr/include/boost-1_42/boost/bind/bind.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/visit_each.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/visit_each.hpp" +namespace boost { + template + inline void visit_each(Visitor& visitor, const T& t, long) + { + visitor(t); + } + + template + inline void visit_each(Visitor& visitor, const T& t) + { + visit_each(visitor, t, 0); + } +} +# 32 "/usr/include/boost-1_42/boost/bind/bind.hpp" 2 +# 41 "/usr/include/boost-1_42/boost/bind/bind.hpp" +# 1 "/usr/include/boost-1_42/boost/bind/storage.hpp" 1 +# 32 "/usr/include/boost-1_42/boost/bind/storage.hpp" +namespace boost +{ + +namespace _bi +{ + + + +template struct storage1 +{ + explicit storage1( A1 a1 ): a1_( a1 ) {} + + template void accept(V & v) const + { + visit_each(v, a1_, 0); + } + + A1 a1_; +}; + + + +template struct storage1< boost::arg > +{ + explicit storage1( boost::arg ) {} + + template void accept(V &) const { } + + static boost::arg a1_() { return boost::arg(); } +}; + +template struct storage1< boost::arg (*) () > +{ + explicit storage1( boost::arg (*) () ) {} + + template void accept(V &) const { } + + static boost::arg a1_() { return boost::arg(); } +}; + + + + + +template struct storage2: public storage1 +{ + typedef storage1 inherited; + + storage2( A1 a1, A2 a2 ): storage1( a1 ), a2_( a2 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + visit_each(v, a2_, 0); + } + + A2 a2_; +}; + + + +template struct storage2< A1, boost::arg >: public storage1 +{ + typedef storage1 inherited; + + storage2( A1 a1, boost::arg ): storage1( a1 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a2_() { return boost::arg(); } +}; + +template struct storage2< A1, boost::arg (*) () >: public storage1 +{ + typedef storage1 inherited; + + storage2( A1 a1, boost::arg (*) () ): storage1( a1 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a2_() { return boost::arg(); } +}; + + + + + +template struct storage3: public storage2< A1, A2 > +{ + typedef storage2 inherited; + + storage3( A1 a1, A2 a2, A3 a3 ): storage2( a1, a2 ), a3_( a3 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + visit_each(v, a3_, 0); + } + + A3 a3_; +}; + + + +template struct storage3< A1, A2, boost::arg >: public storage2< A1, A2 > +{ + typedef storage2 inherited; + + storage3( A1 a1, A2 a2, boost::arg ): storage2( a1, a2 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a3_() { return boost::arg(); } +}; + +template struct storage3< A1, A2, boost::arg (*) () >: public storage2< A1, A2 > +{ + typedef storage2 inherited; + + storage3( A1 a1, A2 a2, boost::arg (*) () ): storage2( a1, a2 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a3_() { return boost::arg(); } +}; + + + + + +template struct storage4: public storage3< A1, A2, A3 > +{ + typedef storage3 inherited; + + storage4( A1 a1, A2 a2, A3 a3, A4 a4 ): storage3( a1, a2, a3 ), a4_( a4 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + visit_each(v, a4_, 0); + } + + A4 a4_; +}; + + + +template struct storage4< A1, A2, A3, boost::arg >: public storage3< A1, A2, A3 > +{ + typedef storage3 inherited; + + storage4( A1 a1, A2 a2, A3 a3, boost::arg ): storage3( a1, a2, a3 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a4_() { return boost::arg(); } +}; + +template struct storage4< A1, A2, A3, boost::arg (*) () >: public storage3< A1, A2, A3 > +{ + typedef storage3 inherited; + + storage4( A1 a1, A2 a2, A3 a3, boost::arg (*) () ): storage3( a1, a2, a3 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a4_() { return boost::arg(); } +}; + + + + + +template struct storage5: public storage4< A1, A2, A3, A4 > +{ + typedef storage4 inherited; + + storage5( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5 ): storage4( a1, a2, a3, a4 ), a5_( a5 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + visit_each(v, a5_, 0); + } + + A5 a5_; +}; + + + +template struct storage5< A1, A2, A3, A4, boost::arg >: public storage4< A1, A2, A3, A4 > +{ + typedef storage4 inherited; + + storage5( A1 a1, A2 a2, A3 a3, A4 a4, boost::arg ): storage4( a1, a2, a3, a4 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a5_() { return boost::arg(); } +}; + +template struct storage5< A1, A2, A3, A4, boost::arg (*) () >: public storage4< A1, A2, A3, A4 > +{ + typedef storage4 inherited; + + storage5( A1 a1, A2 a2, A3 a3, A4 a4, boost::arg (*) () ): storage4( a1, a2, a3, a4 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a5_() { return boost::arg(); } +}; + + + + + +template struct storage6: public storage5< A1, A2, A3, A4, A5 > +{ + typedef storage5 inherited; + + storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6 ): storage5( a1, a2, a3, a4, a5 ), a6_( a6 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + visit_each(v, a6_, 0); + } + + A6 a6_; +}; + + + +template struct storage6< A1, A2, A3, A4, A5, boost::arg >: public storage5< A1, A2, A3, A4, A5 > +{ + typedef storage5 inherited; + + storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, boost::arg ): storage5( a1, a2, a3, a4, a5 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a6_() { return boost::arg(); } +}; + +template struct storage6< A1, A2, A3, A4, A5, boost::arg (*) () >: public storage5< A1, A2, A3, A4, A5 > +{ + typedef storage5 inherited; + + storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, boost::arg (*) () ): storage5( a1, a2, a3, a4, a5 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a6_() { return boost::arg(); } +}; + + + + + +template struct storage7: public storage6< A1, A2, A3, A4, A5, A6 > +{ + typedef storage6 inherited; + + storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7 ): storage6( a1, a2, a3, a4, a5, a6 ), a7_( a7 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + visit_each(v, a7_, 0); + } + + A7 a7_; +}; + + + +template struct storage7< A1, A2, A3, A4, A5, A6, boost::arg >: public storage6< A1, A2, A3, A4, A5, A6 > +{ + typedef storage6 inherited; + + storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, boost::arg ): storage6( a1, a2, a3, a4, a5, a6 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a7_() { return boost::arg(); } +}; + +template struct storage7< A1, A2, A3, A4, A5, A6, boost::arg (*) () >: public storage6< A1, A2, A3, A4, A5, A6 > +{ + typedef storage6 inherited; + + storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, boost::arg (*) () ): storage6( a1, a2, a3, a4, a5, a6 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a7_() { return boost::arg(); } +}; + + + + + +template struct storage8: public storage7< A1, A2, A3, A4, A5, A6, A7 > +{ + typedef storage7 inherited; + + storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8 ): storage7( a1, a2, a3, a4, a5, a6, a7 ), a8_( a8 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + visit_each(v, a8_, 0); + } + + A8 a8_; +}; + + + +template struct storage8< A1, A2, A3, A4, A5, A6, A7, boost::arg >: public storage7< A1, A2, A3, A4, A5, A6, A7 > +{ + typedef storage7 inherited; + + storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, boost::arg ): storage7( a1, a2, a3, a4, a5, a6, a7 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a8_() { return boost::arg(); } +}; + +template struct storage8< A1, A2, A3, A4, A5, A6, A7, boost::arg (*) () >: public storage7< A1, A2, A3, A4, A5, A6, A7 > +{ + typedef storage7 inherited; + + storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, boost::arg (*) () ): storage7( a1, a2, a3, a4, a5, a6, a7 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a8_() { return boost::arg(); } +}; + + + + + +template struct storage9: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > +{ + typedef storage8 inherited; + + storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9 ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ), a9_( a9 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + visit_each(v, a9_, 0); + } + + A9 a9_; +}; + + + +template struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, boost::arg >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > +{ + typedef storage8 inherited; + + storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, boost::arg ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a9_() { return boost::arg(); } +}; + +template struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, boost::arg (*) () >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > +{ + typedef storage8 inherited; + + storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, boost::arg (*) () ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ) {} + + template void accept(V & v) const + { + inherited::accept(v); + } + + static boost::arg a9_() { return boost::arg(); } +}; + + + +} + +} +# 42 "/usr/include/boost-1_42/boost/bind/bind.hpp" 2 + + + + + + +namespace boost +{ + +template class weak_ptr; + +namespace _bi +{ + + + +template struct result_traits +{ + typedef R type; +}; + + + +struct unspecified {}; + +template struct result_traits +{ + typedef typename F::result_type type; +}; + +template struct result_traits< unspecified, reference_wrapper > +{ + typedef typename F::result_type type; +}; + + + + + +template bool ref_compare( T const & a, T const & b, long ) +{ + return a == b; +} + +template bool ref_compare( arg const &, arg const &, int ) +{ + return true; +} + +template bool ref_compare( arg (*) (), arg (*) (), int ) +{ + return true; +} + +template bool ref_compare( reference_wrapper const & a, reference_wrapper const & b, int ) +{ + return a.get_pointer() == b.get_pointer(); +} + + + +template class bind_t; + +template bool ref_compare( bind_t const & a, bind_t const & b, int ) +{ + return a.compare( b ); +} + + + +template class value +{ +public: + + value(T const & t): t_(t) {} + + T & get() { return t_; } + T const & get() const { return t_; } + + bool operator==(value const & rhs) const + { + return t_ == rhs.t_; + } + +private: + + T t_; +}; + + + +template bool ref_compare( value< weak_ptr > const & a, value< weak_ptr > const & b, int ) +{ + return !(a.get() < b.get()) && !(b.get() < a.get()); +} + + + +template class type {}; + + + +template struct unwrapper +{ + static inline F & unwrap( F & f, long ) + { + return f; + } + + template static inline F2 & unwrap( reference_wrapper rf, int ) + { + return rf.get(); + } + + template static inline _mfi::dm unwrap( R T::* pm, int ) + { + return _mfi::dm( pm ); + } +}; + + + +class list0 +{ +public: + + list0() {} + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A &, long) + { + return unwrapper::unwrap(f, 0)(); + } + + template R operator()(type, F const & f, A &, long) const + { + return unwrapper::unwrap(f, 0)(); + } + + template void operator()(type, F & f, A &, int) + { + unwrapper::unwrap(f, 0)(); + } + + template void operator()(type, F const & f, A &, int) const + { + unwrapper::unwrap(f, 0)(); + } + + template void accept(V &) const + { + } + + bool operator==(list0 const &) const + { + return true; + } +}; +# 217 "/usr/include/boost-1_42/boost/bind/bind.hpp" +template< class A1 > class list1: private storage1< A1 > +{ +private: + + typedef storage1< A1 > base_type; + +public: + + explicit list1( A1 a1 ): base_type( a1 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + + template T & operator[] ( _bi::value & v ) const { return v.get(); } + + template T const & operator[] ( _bi::value const & v ) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_]); + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list1 const & rhs) const + { + return ref_compare(base_type::a1_, rhs.a1_, 0); + } +}; + +struct logical_and; +struct logical_or; + +template< class A1, class A2 > class list2: private storage2< A1, A2 > +{ +private: + + typedef storage2< A1, A2 > base_type; + +public: + + list2( A1 a1, A2 a2 ): base_type( a1, a2 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); + } + + template bool operator()( type, logical_and & , A & a, int ) + { + return a[ base_type::a1_ ] && a[ base_type::a2_ ]; + } + + template bool operator()( type, logical_and const & , A & a, int ) const + { + return a[ base_type::a1_ ] && a[ base_type::a2_ ]; + } + + template bool operator()( type, logical_or & , A & a, int ) + { + return a[ base_type::a1_ ] || a[ base_type::a2_ ]; + } + + template bool operator()( type, logical_or const & , A & a, int ) const + { + return a[ base_type::a1_ ] || a[ base_type::a2_ ]; + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list2 const & rhs) const + { + return ref_compare(base_type::a1_, rhs.a1_, 0) && ref_compare(base_type::a2_, rhs.a2_, 0); + } +}; + +template< class A1, class A2, class A3 > class list3: private storage3< A1, A2, A3 > +{ +private: + + typedef storage3< A1, A2, A3 > base_type; + +public: + + list3( A1 a1, A2 a2, A3 a3 ): base_type( a1, a2, a3 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list3 const & rhs) const + { + return + + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ); + } +}; + +template< class A1, class A2, class A3, class A4 > class list4: private storage4< A1, A2, A3, A4 > +{ +private: + + typedef storage4< A1, A2, A3, A4 > base_type; + +public: + + list4( A1 a1, A2 a2, A3 a3, A4 a4 ): base_type( a1, a2, a3, a4 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A4 operator[] (boost::arg<4>) const { return base_type::a4_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list4 const & rhs) const + { + return + + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ) && + ref_compare( base_type::a4_, rhs.a4_, 0 ); + } +}; + +template< class A1, class A2, class A3, class A4, class A5 > class list5: private storage5< A1, A2, A3, A4, A5 > +{ +private: + + typedef storage5< A1, A2, A3, A4, A5 > base_type; + +public: + + list5( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5 ): base_type( a1, a2, a3, a4, a5 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A4 operator[] (boost::arg<4>) const { return base_type::a4_; } + A5 operator[] (boost::arg<5>) const { return base_type::a5_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } + A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list5 const & rhs) const + { + return + + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ) && + ref_compare( base_type::a4_, rhs.a4_, 0 ) && + ref_compare( base_type::a5_, rhs.a5_, 0 ); + } +}; + +template class list6: private storage6< A1, A2, A3, A4, A5, A6 > +{ +private: + + typedef storage6< A1, A2, A3, A4, A5, A6 > base_type; + +public: + + list6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6 ): base_type( a1, a2, a3, a4, a5, a6 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A4 operator[] (boost::arg<4>) const { return base_type::a4_; } + A5 operator[] (boost::arg<5>) const { return base_type::a5_; } + A6 operator[] (boost::arg<6>) const { return base_type::a6_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } + A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } + A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list6 const & rhs) const + { + return + + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ) && + ref_compare( base_type::a4_, rhs.a4_, 0 ) && + ref_compare( base_type::a5_, rhs.a5_, 0 ) && + ref_compare( base_type::a6_, rhs.a6_, 0 ); + } +}; + +template class list7: private storage7< A1, A2, A3, A4, A5, A6, A7 > +{ +private: + + typedef storage7< A1, A2, A3, A4, A5, A6, A7 > base_type; + +public: + + list7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7 ): base_type( a1, a2, a3, a4, a5, a6, a7 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A4 operator[] (boost::arg<4>) const { return base_type::a4_; } + A5 operator[] (boost::arg<5>) const { return base_type::a5_; } + A6 operator[] (boost::arg<6>) const { return base_type::a6_; } + A7 operator[] (boost::arg<7>) const { return base_type::a7_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } + A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } + A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } + A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list7 const & rhs) const + { + return + + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ) && + ref_compare( base_type::a4_, rhs.a4_, 0 ) && + ref_compare( base_type::a5_, rhs.a5_, 0 ) && + ref_compare( base_type::a6_, rhs.a6_, 0 ) && + ref_compare( base_type::a7_, rhs.a7_, 0 ); + } +}; + +template< class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > class list8: private storage8< A1, A2, A3, A4, A5, A6, A7, A8 > +{ +private: + + typedef storage8< A1, A2, A3, A4, A5, A6, A7, A8 > base_type; + +public: + + list8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8 ): base_type( a1, a2, a3, a4, a5, a6, a7, a8 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A4 operator[] (boost::arg<4>) const { return base_type::a4_; } + A5 operator[] (boost::arg<5>) const { return base_type::a5_; } + A6 operator[] (boost::arg<6>) const { return base_type::a6_; } + A7 operator[] (boost::arg<7>) const { return base_type::a7_; } + A8 operator[] (boost::arg<8>) const { return base_type::a8_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } + A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } + A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } + A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } + A8 operator[] (boost::arg<8> (*) ()) const { return base_type::a8_; } + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list8 const & rhs) const + { + return + + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ) && + ref_compare( base_type::a4_, rhs.a4_, 0 ) && + ref_compare( base_type::a5_, rhs.a5_, 0 ) && + ref_compare( base_type::a6_, rhs.a6_, 0 ) && + ref_compare( base_type::a7_, rhs.a7_, 0 ) && + ref_compare( base_type::a8_, rhs.a8_, 0 ); + } +}; + +template class list9: private storage9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > +{ +private: + + typedef storage9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > base_type; + +public: + + list9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9 ): base_type( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) {} + + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A4 operator[] (boost::arg<4>) const { return base_type::a4_; } + A5 operator[] (boost::arg<5>) const { return base_type::a5_; } + A6 operator[] (boost::arg<6>) const { return base_type::a6_; } + A7 operator[] (boost::arg<7>) const { return base_type::a7_; } + A8 operator[] (boost::arg<8>) const { return base_type::a8_; } + A9 operator[] (boost::arg<9>) const { return base_type::a9_; } + + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } + A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } + A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } + A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } + A8 operator[] (boost::arg<8> (*) ()) const { return base_type::a8_; } + A9 operator[] (boost::arg<9> (*) ()) const { return base_type::a9_; } + + template T & operator[] (_bi::value & v) const { return v.get(); } + + template T const & operator[] (_bi::value const & v) const { return v.get(); } + + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); + } + + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); + } + + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); + } + + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); + } + + template void accept(V & v) const + { + base_type::accept(v); + } + + bool operator==(list9 const & rhs) const + { + return + + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ) && + ref_compare( base_type::a4_, rhs.a4_, 0 ) && + ref_compare( base_type::a5_, rhs.a5_, 0 ) && + ref_compare( base_type::a6_, rhs.a6_, 0 ) && + ref_compare( base_type::a7_, rhs.a7_, 0 ) && + ref_compare( base_type::a8_, rhs.a8_, 0 ) && + ref_compare( base_type::a9_, rhs.a9_, 0 ); + } +}; +# 864 "/usr/include/boost-1_42/boost/bind/bind.hpp" +template class bind_t +{ +public: + + typedef bind_t this_type; + + bind_t(F f, L const & l): f_(f), l_(l) {} + + +# 1 "/usr/include/boost-1_42/boost/bind/bind_template.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/bind/bind_template.hpp" + typedef typename result_traits::type result_type; + + result_type operator()() + { + list0 a; + return l_(type(), f_, a, 0); + } + + result_type operator()() const + { + list0 a; + return l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1) + { + list1 a(a1); + return l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1) const + { + list1 a(a1); + return l_(type(), f_, a, 0); + } + + + + + template result_type operator()(A1 const & a1) + { + list1 a(a1); + return l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1) const + { + list1 a(a1); + return l_(type(), f_, a, 0); + } + + + + template result_type operator()(A1 & a1, A2 & a2) + { + list2 a(a1, a2); + return l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 & a2) const + { + list2 a(a1, a2); + return l_(type(), f_, a, 0); + } + + + + + template result_type operator()(A1 const & a1, A2 & a2) + { + list2 a(a1, a2); + return l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 & a2) const + { + list2 a(a1, a2); + return l_(type(), f_, a, 0); + } + + + template result_type operator()(A1 & a1, A2 const & a2) + { + list2 a(a1, a2); + return l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 const & a2) const + { + list2 a(a1, a2); + return l_(type(), f_, a, 0); + } + + + template result_type operator()(A1 const & a1, A2 const & a2) + { + list2 a(a1, a2); + return l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 const & a2) const + { + list2 a(a1, a2); + return l_(type(), f_, a, 0); + } + + + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3) + { + list3 a(a1, a2, a3); + return l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3) const + { + list3 a(a1, a2, a3); + return l_(type(), f_, a, 0); + } + + + + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) + { + list3 a(a1, a2, a3); + return l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) const + { + list3 a(a1, a2, a3); + return l_(type(), f_, a, 0); + } + + + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) + { + list4 a(a1, a2, a3, a4); + return l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) const + { + list4 a(a1, a2, a3, a4); + return l_(type(), f_, a, 0); + } + + + + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) + { + list4 a(a1, a2, a3, a4); + return l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) const + { + list4 a(a1, a2, a3, a4); + return l_(type(), f_, a, 0); + } + + + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) + { + list5 a(a1, a2, a3, a4, a5); + return l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) const + { + list5 a(a1, a2, a3, a4, a5); + return l_(type(), f_, a, 0); + } + + + + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) + { + list5 a(a1, a2, a3, a4, a5); + return l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) const + { + list5 a(a1, a2, a3, a4, a5); + return l_(type(), f_, a, 0); + } + + + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) + { + list6 a(a1, a2, a3, a4, a5, a6); + return l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) const + { + list6 a(a1, a2, a3, a4, a5, a6); + return l_(type(), f_, a, 0); + } + + + + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) + { + list6 a(a1, a2, a3, a4, a5, a6); + return l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) const + { + list6 a(a1, a2, a3, a4, a5, a6); + return l_(type(), f_, a, 0); + } + + + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) + { + list7 a(a1, a2, a3, a4, a5, a6, a7); + return l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) const + { + list7 a(a1, a2, a3, a4, a5, a6, a7); + return l_(type(), f_, a, 0); + } + + + + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) + { + list7 a(a1, a2, a3, a4, a5, a6, a7); + return l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) const + { + list7 a(a1, a2, a3, a4, a5, a6, a7); + return l_(type(), f_, a, 0); + } + + + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) + { + list8 a(a1, a2, a3, a4, a5, a6, a7, a8); + return l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) const + { + list8 a(a1, a2, a3, a4, a5, a6, a7, a8); + return l_(type(), f_, a, 0); + } + + + + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) + { + list8 a(a1, a2, a3, a4, a5, a6, a7, a8); + return l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) const + { + list8 a(a1, a2, a3, a4, a5, a6, a7, a8); + return l_(type(), f_, a, 0); + } + + + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) + { + list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); + return l_(type(), f_, a, 0); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) const + { + list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); + return l_(type(), f_, a, 0); + } + + + + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) + { + list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); + return l_(type(), f_, a, 0); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) const + { + list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); + return l_(type(), f_, a, 0); + } + + + + template result_type eval(A & a) + { + return l_(type(), f_, a, 0); + } + + template result_type eval(A & a) const + { + return l_(type(), f_, a, 0); + } + + template void accept(V & v) const + { + + + using boost::visit_each; + + + visit_each(v, f_, 0); + l_.accept(v); + } + + bool compare(this_type const & rhs) const + { + return ref_compare(f_, rhs.f_, 0) && l_ == rhs.l_; + } + +private: + + F f_; + L l_; +# 874 "/usr/include/boost-1_42/boost/bind/bind.hpp" 2 + + +}; +# 940 "/usr/include/boost-1_42/boost/bind/bind.hpp" +template bool function_equal( bind_t const & a, bind_t const & b ) +{ + return a.compare(b); +} +# 994 "/usr/include/boost-1_42/boost/bind/bind.hpp" +template< class T, int I > struct add_value_2 +{ + typedef boost::arg type; +}; + +template< class T > struct add_value_2< T, 0 > +{ + typedef _bi::value< T > type; +}; + +template struct add_value +{ + typedef typename add_value_2< T, boost::is_placeholder< T >::value >::type type; +}; + + + +template struct add_value< value > +{ + typedef _bi::value type; +}; + +template struct add_value< reference_wrapper > +{ + typedef reference_wrapper type; +}; + +template struct add_value< arg > +{ + typedef boost::arg type; +}; + +template struct add_value< arg (*) () > +{ + typedef boost::arg (*type) (); +}; + +template struct add_value< bind_t > +{ + typedef bind_t type; +}; +# 1077 "/usr/include/boost-1_42/boost/bind/bind.hpp" +template struct list_av_1 +{ + typedef typename add_value::type B1; + typedef list1 type; +}; + +template struct list_av_2 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef list2 type; +}; + +template struct list_av_3 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef list3 type; +}; + +template struct list_av_4 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef typename add_value::type B4; + typedef list4 type; +}; + +template struct list_av_5 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef typename add_value::type B4; + typedef typename add_value::type B5; + typedef list5 type; +}; + +template struct list_av_6 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef typename add_value::type B4; + typedef typename add_value::type B5; + typedef typename add_value::type B6; + typedef list6 type; +}; + +template struct list_av_7 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef typename add_value::type B4; + typedef typename add_value::type B5; + typedef typename add_value::type B6; + typedef typename add_value::type B7; + typedef list7 type; +}; + +template struct list_av_8 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef typename add_value::type B4; + typedef typename add_value::type B5; + typedef typename add_value::type B6; + typedef typename add_value::type B7; + typedef typename add_value::type B8; + typedef list8 type; +}; + +template struct list_av_9 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef typename add_value::type B4; + typedef typename add_value::type B5; + typedef typename add_value::type B6; + typedef typename add_value::type B7; + typedef typename add_value::type B8; + typedef typename add_value::type B9; + typedef list9 type; +}; + + + +struct logical_not +{ + template bool operator()(V const & v) const { return !v; } +}; + +template + bind_t< bool, logical_not, list1< bind_t > > + operator! (bind_t const & f) +{ + typedef list1< bind_t > list_type; + return bind_t ( logical_not(), list_type(f) ); +} +# 1200 "/usr/include/boost-1_42/boost/bind/bind.hpp" +struct equal { template bool operator()(V const & v, W const & w) const { return v == w; } }; template bind_t< bool, equal, list2< bind_t, typename add_value::type > > operator == (bind_t const & f, A2 a2) { typedef typename add_value::type B2; typedef list2< bind_t, B2> list_type; return bind_t ( equal(), list_type(f, a2) ); } +struct not_equal { template bool operator()(V const & v, W const & w) const { return v != w; } }; template bind_t< bool, not_equal, list2< bind_t, typename add_value::type > > operator != (bind_t const & f, A2 a2) { typedef typename add_value::type B2; typedef list2< bind_t, B2> list_type; return bind_t ( not_equal(), list_type(f, a2) ); } + +struct less { template bool operator()(V const & v, W const & w) const { return v < w; } }; template bind_t< bool, less, list2< bind_t, typename add_value::type > > operator < (bind_t const & f, A2 a2) { typedef typename add_value::type B2; typedef list2< bind_t, B2> list_type; return bind_t ( less(), list_type(f, a2) ); } +struct less_equal { template bool operator()(V const & v, W const & w) const { return v <= w; } }; template bind_t< bool, less_equal, list2< bind_t, typename add_value::type > > operator <= (bind_t const & f, A2 a2) { typedef typename add_value::type B2; typedef list2< bind_t, B2> list_type; return bind_t ( less_equal(), list_type(f, a2) ); } + +struct greater { template bool operator()(V const & v, W const & w) const { return v > w; } }; template bind_t< bool, greater, list2< bind_t, typename add_value::type > > operator > (bind_t const & f, A2 a2) { typedef typename add_value::type B2; typedef list2< bind_t, B2> list_type; return bind_t ( greater(), list_type(f, a2) ); } +struct greater_equal { template bool operator()(V const & v, W const & w) const { return v >= w; } }; template bind_t< bool, greater_equal, list2< bind_t, typename add_value::type > > operator >= (bind_t const & f, A2 a2) { typedef typename add_value::type B2; typedef list2< bind_t, B2> list_type; return bind_t ( greater_equal(), list_type(f, a2) ); } + +struct logical_and { template bool operator()(V const & v, W const & w) const { return v && w; } }; template bind_t< bool, logical_and, list2< bind_t, typename add_value::type > > operator && (bind_t const & f, A2 a2) { typedef typename add_value::type B2; typedef list2< bind_t, B2> list_type; return bind_t ( logical_and(), list_type(f, a2) ); } +struct logical_or { template bool operator()(V const & v, W const & w) const { return v || w; } }; template bind_t< bool, logical_or, list2< bind_t, typename add_value::type > > operator || (bind_t const & f, A2 a2) { typedef typename add_value::type B2; typedef list2< bind_t, B2> list_type; return bind_t ( logical_or(), list_type(f, a2) ); } +# 1240 "/usr/include/boost-1_42/boost/bind/bind.hpp" +template void visit_each( V & v, value const & t, int ) +{ + using boost::visit_each; + visit_each( v, t.get(), 0 ); +} + +template void visit_each( V & v, bind_t const & t, int ) +{ + t.accept( v ); +} + + + +} +# 1274 "/usr/include/boost-1_42/boost/bind/bind.hpp" +template< class T > struct is_bind_expression +{ + enum _vt { value = 0 }; +}; + + + +template< class R, class F, class L > struct is_bind_expression< _bi::bind_t< R, F, L > > +{ + enum _vt { value = 1 }; +}; +# 1296 "/usr/include/boost-1_42/boost/bind/bind.hpp" +template + _bi::bind_t + bind(F f) +{ + typedef _bi::list0 list_type; + return _bi::bind_t (f, list_type()); +} + +template + _bi::bind_t::type> + bind(F f, A1 a1) +{ + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t (f, list_type(a1)); +} + +template + _bi::bind_t::type> + bind(F f, A1 a1, A2 a2) +{ + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t (f, list_type(a1, a2)); +} + +template + _bi::bind_t::type> + bind(F f, A1 a1, A2 a2, A3 a3) +{ + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3)); +} + +template + _bi::bind_t::type> + bind(F f, A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4)); +} + +template + _bi::bind_t::type> + bind(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); +} + +template + _bi::bind_t::type> + bind(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); +} + +template + _bi::bind_t::type> + bind(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +template + _bi::bind_t::type> + bind(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +template + _bi::bind_t::type> + bind(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} + + + +template + _bi::bind_t + bind(boost::type, F f) +{ + typedef _bi::list0 list_type; + return _bi::bind_t (f, list_type()); +} + +template + _bi::bind_t::type> + bind(boost::type, F f, A1 a1) +{ + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t (f, list_type(a1)); +} + +template + _bi::bind_t::type> + bind(boost::type, F f, A1 a1, A2 a2) +{ + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t (f, list_type(a1, a2)); +} + +template + _bi::bind_t::type> + bind(boost::type, F f, A1 a1, A2 a2, A3 a3) +{ + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3)); +} + +template + _bi::bind_t::type> + bind(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4)); +} + +template + _bi::bind_t::type> + bind(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); +} + +template + _bi::bind_t::type> + bind(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); +} + +template + _bi::bind_t::type> + bind(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +template + _bi::bind_t::type> + bind(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +template + _bi::bind_t::type> + bind(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} + + + + + +template + _bi::bind_t<_bi::unspecified, F, _bi::list0> + bind(F f) +{ + typedef _bi::list0 list_type; + return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type()); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_1::type> + bind(F f, A1 a1) +{ + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1)); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_2::type> + bind(F f, A1 a1, A2 a2) +{ + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1, a2)); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_3::type> + bind(F f, A1 a1, A2 a2, A3 a3) +{ + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3)); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_4::type> + bind(F f, A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4)); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_5::type> + bind(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5)); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_6::type> + bind(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6)); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_7::type> + bind(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_8::type> + bind(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_9::type> + bind(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} +# 1549 "/usr/include/boost-1_42/boost/bind/bind.hpp" +# 1 "/usr/include/boost-1_42/boost/bind/bind_cc.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/bind/bind_cc.hpp" +template + _bi::bind_t + bind( R ( *f) ()) +{ + typedef R ( *F) (); + typedef _bi::list0 list_type; + return _bi::bind_t (f, list_type()); +} + +template + _bi::bind_t::type> + bind( R ( *f) (B1), A1 a1) +{ + typedef R ( *F) (B1); + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t (f, list_type(a1)); +} + +template + _bi::bind_t::type> + bind( R ( *f) (B1, B2), A1 a1, A2 a2) +{ + typedef R ( *F) (B1, B2); + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t (f, list_type(a1, a2)); +} + +template + _bi::bind_t::type> + bind( R ( *f) (B1, B2, B3), A1 a1, A2 a2, A3 a3) +{ + typedef R ( *F) (B1, B2, B3); + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3)); +} + +template + _bi::bind_t::type> + bind( R ( *f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef R ( *F) (B1, B2, B3, B4); + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4)); +} + +template + _bi::bind_t::type> + bind( R ( *f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef R ( *F) (B1, B2, B3, B4, B5); + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); +} + +template + _bi::bind_t::type> + bind( R ( *f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef R ( *F) (B1, B2, B3, B4, B5, B6); + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); +} + +template + _bi::bind_t::type> + bind( R ( *f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef R ( *F) (B1, B2, B3, B4, B5, B6, B7); + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +template + _bi::bind_t::type> + bind( R ( *f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef R ( *F) (B1, B2, B3, B4, B5, B6, B7, B8); + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +template + _bi::bind_t::type> + bind( R ( *f) (B1, B2, B3, B4, B5, B6, B7, B8, B9), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef R ( *F) (B1, B2, B3, B4, B5, B6, B7, B8, B9); + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} +# 1550 "/usr/include/boost-1_42/boost/bind/bind.hpp" 2 +# 1595 "/usr/include/boost-1_42/boost/bind/bind.hpp" +# 1 "/usr/include/boost-1_42/boost/bind/bind_mf_cc.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/bind/bind_mf_cc.hpp" +template + _bi::bind_t, typename _bi::list_av_1::type> + bind(R ( T::*f) (), A1 a1) +{ + typedef _mfi::mf0 F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t(F(f), list_type(a1)); +} + +template + _bi::bind_t, typename _bi::list_av_1::type> + bind(R ( T::*f) () const, A1 a1) +{ + typedef _mfi::cmf0 F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t(F(f), list_type(a1)); +} + + + +template + _bi::bind_t, typename _bi::list_av_2::type> + bind(R ( T::*f) (B1), A1 a1, A2 a2) +{ + typedef _mfi::mf1 F; + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2)); +} + +template + _bi::bind_t, typename _bi::list_av_2::type> + bind(R ( T::*f) (B1) const, A1 a1, A2 a2) +{ + typedef _mfi::cmf1 F; + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2)); +} + + + +template + _bi::bind_t, typename _bi::list_av_3::type> + bind(R ( T::*f) (B1, B2), A1 a1, A2 a2, A3 a3) +{ + typedef _mfi::mf2 F; + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3)); +} + +template + _bi::bind_t, typename _bi::list_av_3::type> + bind(R ( T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3) +{ + typedef _mfi::cmf2 F; + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3)); +} + + + +template + _bi::bind_t, typename _bi::list_av_4::type> + bind(R ( T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef _mfi::mf3 F; + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); +} + +template + _bi::bind_t, typename _bi::list_av_4::type> + bind(R ( T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef _mfi::cmf3 F; + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); +} + + + +template + _bi::bind_t, typename _bi::list_av_5::type> + bind(R ( T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef _mfi::mf4 F; + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); +} + +template + _bi::bind_t, typename _bi::list_av_5::type> + bind(R ( T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef _mfi::cmf4 F; + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); +} + + + +template + _bi::bind_t, typename _bi::list_av_6::type> + bind(R ( T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef _mfi::mf5 F; + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); +} + +template + _bi::bind_t, typename _bi::list_av_6::type> + bind(R ( T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef _mfi::cmf5 F; + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); +} + + + +template + _bi::bind_t, typename _bi::list_av_7::type> + bind(R ( T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef _mfi::mf6 F; + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +template + _bi::bind_t, typename _bi::list_av_7::type> + bind(R ( T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef _mfi::cmf6 F; + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); +} + + + +template + _bi::bind_t, typename _bi::list_av_8::type> + bind(R ( T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef _mfi::mf7 F; + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +template + _bi::bind_t, typename _bi::list_av_8::type> + bind(R ( T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef _mfi::cmf7 F; + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + + + +template + _bi::bind_t, typename _bi::list_av_9::type> + bind(R ( T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef _mfi::mf8 F; + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} + +template + _bi::bind_t, typename _bi::list_av_9::type> + bind(R ( T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef _mfi::cmf8 F; + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} +# 1596 "/usr/include/boost-1_42/boost/bind/bind.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/bind/bind_mf2_cc.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/bind/bind_mf2_cc.hpp" +template + _bi::bind_t, typename _bi::list_av_1::type> + bind(boost::type, R ( T::*f) (), A1 a1) +{ + typedef _mfi::mf0 F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t(F(f), list_type(a1)); +} + +template + _bi::bind_t, typename _bi::list_av_1::type> + bind(boost::type, R ( T::*f) () const, A1 a1) +{ + typedef _mfi::cmf0 F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t(F(f), list_type(a1)); +} + + + +template + _bi::bind_t, typename _bi::list_av_2::type> + bind(boost::type, R ( T::*f) (B1), A1 a1, A2 a2) +{ + typedef _mfi::mf1 F; + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2)); +} + +template + _bi::bind_t, typename _bi::list_av_2::type> + bind(boost::type, R ( T::*f) (B1) const, A1 a1, A2 a2) +{ + typedef _mfi::cmf1 F; + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2)); +} + + + +template + _bi::bind_t, typename _bi::list_av_3::type> + bind(boost::type, R ( T::*f) (B1, B2), A1 a1, A2 a2, A3 a3) +{ + typedef _mfi::mf2 F; + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3)); +} + +template + _bi::bind_t, typename _bi::list_av_3::type> + bind(boost::type, R ( T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3) +{ + typedef _mfi::cmf2 F; + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3)); +} + + + +template + _bi::bind_t, typename _bi::list_av_4::type> + bind(boost::type, R ( T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef _mfi::mf3 F; + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); +} + +template + _bi::bind_t, typename _bi::list_av_4::type> + bind(boost::type, R ( T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef _mfi::cmf3 F; + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); +} + + + +template + _bi::bind_t, typename _bi::list_av_5::type> + bind(boost::type, R ( T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef _mfi::mf4 F; + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); +} + +template + _bi::bind_t, typename _bi::list_av_5::type> + bind(boost::type, R ( T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef _mfi::cmf4 F; + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); +} + + + +template + _bi::bind_t, typename _bi::list_av_6::type> + bind(boost::type, R ( T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef _mfi::mf5 F; + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); +} + +template + _bi::bind_t, typename _bi::list_av_6::type> + bind(boost::type, R ( T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef _mfi::cmf5 F; + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); +} + + + +template + _bi::bind_t, typename _bi::list_av_7::type> + bind(boost::type, R ( T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef _mfi::mf6 F; + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); +} + +template + _bi::bind_t, typename _bi::list_av_7::type> + bind(boost::type, R ( T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef _mfi::cmf6 F; + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); +} + + + +template + _bi::bind_t, typename _bi::list_av_8::type> + bind(boost::type, R ( T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef _mfi::mf7 F; + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + +template + _bi::bind_t, typename _bi::list_av_8::type> + bind(boost::type, R ( T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef _mfi::cmf7 F; + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} + + + +template + _bi::bind_t, typename _bi::list_av_9::type> + bind(boost::type, R ( T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef _mfi::mf8 F; + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} + +template + _bi::bind_t, typename _bi::list_av_9::type> + bind(boost::type, R ( T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef _mfi::cmf8 F; + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} +# 1597 "/usr/include/boost-1_42/boost/bind/bind.hpp" 2 +# 1656 "/usr/include/boost-1_42/boost/bind/bind.hpp" +namespace _bi +{ + +template< class Pm, int I > struct add_cref; + +template< class M, class T > struct add_cref< M T::*, 0 > +{ + typedef M type; +}; + +template< class M, class T > struct add_cref< M T::*, 1 > +{ + + + + + typedef M const & type; + + + +}; + +template< class R, class T > struct add_cref< R (T::*) (), 1 > +{ + typedef void type; +}; + + + +template< class R, class T > struct add_cref< R (T::*) () const, 1 > +{ + typedef void type; +}; + + + +template struct isref +{ + enum value_type { value = 0 }; +}; + +template struct isref< R& > +{ + enum value_type { value = 1 }; +}; + +template struct isref< R* > +{ + enum value_type { value = 1 }; +}; + +template struct dm_result +{ + typedef typename add_cref< Pm, 1 >::type type; +}; + +template struct dm_result< Pm, bind_t > +{ + typedef typename bind_t::result_type result_type; + typedef typename add_cref< Pm, isref< result_type >::value >::type type; +}; + +} + +template< class A1, class M, class T > + +_bi::bind_t< + typename _bi::dm_result< M T::*, A1 >::type, + _mfi::dm, + typename _bi::list_av_1::type +> + +bind( M T::*f, A1 a1 ) +{ + typedef typename _bi::dm_result< M T::*, A1 >::type result_type; + typedef _mfi::dm F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t< result_type, F, list_type >( F( f ), list_type( a1 ) ); +} + + + +} + + + +# 1 "/usr/include/boost-1_42/boost/bind/placeholders.hpp" 1 +# 25 "/usr/include/boost-1_42/boost/bind/placeholders.hpp" +namespace +{ +# 55 "/usr/include/boost-1_42/boost/bind/placeholders.hpp" +boost::arg<1> _1; +boost::arg<2> _2; +boost::arg<3> _3; +boost::arg<4> _4; +boost::arg<5> _5; +boost::arg<6> _6; +boost::arg<7> _7; +boost::arg<8> _8; +boost::arg<9> _9; + + + +} +# 1743 "/usr/include/boost-1_42/boost/bind/bind.hpp" 2 +# 23 "/usr/include/boost-1_42/boost/bind.hpp" 2 +# 11 "/usr/include/boost-1_42/boost/python/exception_translator.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/detail/translate_exception.hpp" 1 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/exception_handler.hpp" 1 +# 9 "/usr/include/boost-1_42/boost/python/detail/exception_handler.hpp" +# 1 "/usr/include/boost-1_42/boost/function/function0.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/function/function0.hpp" +# 1 "/usr/include/boost-1_42/boost/function/detail/maybe_include.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/function/function0.hpp" 2 +# 10 "/usr/include/boost-1_42/boost/python/detail/exception_handler.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/function/function2.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/function/function2.hpp" +# 1 "/usr/include/boost-1_42/boost/function/detail/maybe_include.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/function/function2.hpp" 2 +# 11 "/usr/include/boost-1_42/boost/python/detail/exception_handler.hpp" 2 + +namespace boost { namespace python { namespace detail { + +struct exception_handler; + +typedef function2 const&> handler_function; + +struct exception_handler +{ + private: + + public: + explicit exception_handler(handler_function const& impl); + + inline bool handle(function0 const& f) const; + + bool operator()(function0 const& f) const; + + static exception_handler* chain; + + private: + static exception_handler* tail; + + handler_function m_impl; + exception_handler* m_next; +}; + + +inline bool exception_handler::handle(function0 const& f) const +{ + return this->m_impl(*this, f); +} + + void register_exception_handler(handler_function const& f); + +}}} +# 9 "/usr/include/boost-1_42/boost/python/detail/translate_exception.hpp" 2 + + + + + + +# 1 "/usr/include/boost-1_42/boost/function/function0.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/function/function0.hpp" +# 1 "/usr/include/boost-1_42/boost/function/detail/maybe_include.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/function/function0.hpp" 2 +# 16 "/usr/include/boost-1_42/boost/python/detail/translate_exception.hpp" 2 + +namespace boost { namespace python { namespace detail { + + + + + +template +struct translate_exception +{ +# 36 "/usr/include/boost-1_42/boost/python/detail/translate_exception.hpp" + typedef typename add_reference< + typename add_const::type + >::type exception_cref; + + + inline bool operator()( + exception_handler const& handler + , function0 const& f + , typename call_traits::param_type translate) const + { + try + { + return handler(f); + } +# 58 "/usr/include/boost-1_42/boost/python/detail/translate_exception.hpp" + catch(exception_cref e) + + { + translate(e); + return true; + } + } +}; + +}}} +# 13 "/usr/include/boost-1_42/boost/python/exception_translator.hpp" 2 + + +namespace boost { namespace python { + +template +void register_exception_translator(Translate translate, boost::type* = 0) +{ + detail::register_exception_handler( + bind(detail::translate_exception(), _1, _2, translate) + ); +} + +}} +# 29 "/usr/include/boost-1_42/boost/python.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/exec.hpp" 1 +# 9 "/usr/include/boost-1_42/boost/python/exec.hpp" +# 1 "/usr/include/boost-1_42/boost/python/str.hpp" 1 +# 22 "/usr/include/boost-1_42/boost/python/str.hpp" +namespace boost { namespace python { + +class str; + +namespace detail +{ + struct str_base : object + { + str capitalize() const; + + str center(object_cref width) const; + + long count(object_cref sub) const; + + long count(object_cref sub, object_cref start) const; + + long count(object_cref sub, object_cref start, object_cref end) const; + + + object decode() const; + object decode(object_cref encoding) const; + + object decode(object_cref encoding, object_cref errors) const; + + + object encode() const; + object encode(object_cref encoding) const; + object encode(object_cref encoding, object_cref errors) const; + + bool endswith(object_cref suffix) const; + + bool endswith(object_cref suffix, object_cref start) const; + bool endswith(object_cref suffix, object_cref start, object_cref end) const; + + str expandtabs() const; + str expandtabs(object_cref tabsize) const; + + long find(object_cref sub) const; + long find(object_cref sub, object_cref start) const; + + long find(object_cref sub, object_cref start, object_cref end) const; + + long index(object_cref sub) const; + + long index(object_cref sub, object_cref start) const; + long index(object_cref sub, object_cref start, object_cref end) const; + + bool isalnum() const; + bool isalpha() const; + bool isdigit() const; + bool islower() const; + bool isspace() const; + bool istitle() const; + bool isupper() const; + + str join(object_cref sequence) const; + + str ljust(object_cref width) const; + str lower() const; + str lstrip() const; + + str replace(object_cref old, object_cref new_) const; + str replace(object_cref old, object_cref new_, object_cref maxsplit) const; + long rfind(object_cref sub) const; + + long rfind(object_cref sub, object_cref start) const; + + long rfind(object_cref sub, object_cref start, object_cref end) const; + long rindex(object_cref sub) const; + long rindex(object_cref sub, object_cref start) const; + + + long rindex(object_cref sub, object_cref start, object_cref end) const; + + str rjust(object_cref width) const; + + str rstrip() const; + + list split() const; + list split(object_cref sep) const; + + list split(object_cref sep, object_cref maxsplit) const; + + + list splitlines() const; + list splitlines(object_cref keepends) const; + + bool startswith(object_cref prefix) const; + + + bool startswith(object_cref prefix, object_cref start) const; + bool startswith(object_cref prefix, object_cref start, object_cref end) const; + + str strip() const; + str swapcase() const; + str title() const; + + str translate(object_cref table) const; + + str translate(object_cref table, object_cref deletechars) const; + + + str upper() const; + + protected: + str_base(); + + str_base(const char* s); + + str_base(char const* start, char const* finish); + + str_base(char const* start, std::size_t length); + + explicit str_base(object_cref other); + + inline explicit str_base(python::detail::borrowed_reference p) : object(p) {} inline explicit str_base(python::detail::new_reference p) : object(p) {} inline explicit str_base(python::detail::new_non_null_reference p) : object(p) {} + private: + static new_reference call(object const&); + }; +} + + +class str : public detail::str_base +{ + typedef detail::str_base base; + public: + str() {} + + str(const char* s) : base(s) {} + + str(char const* start, char const* finish) + : base(start, finish) + {} + + str(char const* start, std::size_t length) + : base(start, length) + {} + + template + explicit str(T const& other) + : base(object(other)) + { + } + + template + str center(T const& width) const + { + return base::center(object(width)); + } + + template + long count(T const& sub) const + { + return base::count(object(sub)); + } + + template + long count(T1 const& sub,T2 const& start) const + { + return base::count(object(sub), object(start)); + } + + template + long count(T1 const& sub,T2 const& start, T3 const& end) const + { + return base::count(object(sub), object(start)); + } + + + object decode() const { return base::decode(); } + + template + object decode(T const& encoding) const + { + return base::decode(object(encoding)); + } + + template + object decode(T1 const& encoding, T2 const& errors) const + { + return base::decode(object(encoding),object(errors)); + } + + + object encode() const { return base::encode(); } + + template + object encode(T const& encoding) const + { + return base::encode(object(encoding)); + } + + template + object encode(T1 const& encoding, T2 const& errors) const + { + return base::encode(object(encoding),object(errors)); + } + + template + bool endswith(T const& suffix) const + { + return base::endswith(object(suffix)); + } + + template + bool endswith(T1 const& suffix, T2 const& start) const + { + return base::endswith(object(suffix), object(start)); + } + + template + bool endswith(T1 const& suffix, T2 const& start, T3 const& end) const + { + return base::endswith(object(suffix), object(start), object(end)); + } + + str expandtabs() const { return base::expandtabs(); } + + template + str expandtabs(T const& tabsize) const + { + return base::expandtabs(object(tabsize)); + } + + template + long find(T const& sub) const + { + return base::find(object(sub)); + } + + template + long find(T1 const& sub, T2 const& start) const + { + return base::find(object(sub), object(start)); + } + + template + long find(T1 const& sub, T2 const& start, T3 const& end) const + { + return base::find(object(sub), object(start), object(end)); + } + + template + long index(T const& sub) const + { + return base::index(object(sub)); + } + + template + long index(T1 const& sub, T2 const& start) const + { + return base::index(object(sub), object(start)); + } + + template + long index(T1 const& sub, T2 const& start, T3 const& end) const + { + return base::index(object(sub), object(start), object(end)); + } + + template + str join(T const& sequence) const + { + return base::join(object(sequence)); + } + + template + str ljust(T const& width) const + { + return base::ljust(object(width)); + } + + template + str replace(T1 const& old, T2 const& new_) const + { + return base::replace(object(old),object(new_)); + } + + template + str replace(T1 const& old, T2 const& new_, T3 const& maxsplit) const + { + return base::replace(object(old),object(new_), object(maxsplit)); + } + + template + long rfind(T const& sub) const + { + return base::rfind(object(sub)); + } + + template + long rfind(T1 const& sub, T2 const& start) const + { + return base::rfind(object(sub), object(start)); + } + + template + long rfind(T1 const& sub, T2 const& start, T3 const& end) const + { + return base::rfind(object(sub), object(start), object(end)); + } + + template + long rindex(T const& sub) const + { + return base::rindex(object(sub)); + } + + template + long rindex(T1 const& sub, T2 const& start) const + { + return base::rindex(object(sub), object(start)); + } + + template + long rindex(T1 const& sub, T2 const& start, T3 const& end) const + { + return base::rindex(object(sub), object(start), object(end)); + } + + template + str rjust(T const& width) const + { + return base::rjust(object(width)); + } + + list split() const { return base::split(); } + + template + list split(T const& sep) const + { + return base::split(object(sep)); + } + + template + list split(T1 const& sep, T2 const& maxsplit) const + { + return base::split(object(sep), object(maxsplit)); + } + + list splitlines() const { return base::splitlines(); } + + template + list splitlines(T const& keepends) const + { + return base::splitlines(object(keepends)); + } + + template + bool startswith(T const& prefix) const + { + return base::startswith(object(prefix)); + } + + template + bool startswith(T1 const& prefix, T2 const& start) const + { + return base::startswith(object(prefix), object(start)); + } + + template + bool startswith(T1 const& prefix, T2 const& start, T3 const& end) const + { + return base::startswith(object(prefix), object(start), object(end)); + } + + template + str translate(T const& table) const + { + return base::translate(object(table)); + } + + template + str translate(T1 const& table, T2 const& deletechars) const + { + return base::translate(object(table), object(deletechars)); + } + + public: + inline explicit str(python::detail::borrowed_reference p) : base(p) {} inline explicit str(python::detail::new_reference p) : base(p) {} inline explicit str(python::detail::new_non_null_reference p) : base(p) {} +}; + + + + +namespace converter +{ + template <> + struct object_manager_traits + + + + : pytype_object_manager_traits<&PyString_Type,str> + + { + }; +} + +}} +# 10 "/usr/include/boost-1_42/boost/python/exec.hpp" 2 + +namespace boost +{ +namespace python +{ + + + + +object + +eval(str string, object global = object(), object local = object()); + + + + +object + +exec_statement(str string, object global = object(), object local = object()); + + + + +object + +exec(str string, object global = object(), object local = object()); + + + + +object + +exec_file(str filename, object global = object(), object local = object()); + +} +} +# 30 "/usr/include/boost-1_42/boost/python.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/python/implicit.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/implicit.hpp" +# 1 "/usr/include/boost-1_42/boost/python/converter/implicit.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/python/converter/implicit.hpp" +namespace boost { namespace python { namespace converter { + +template +struct implicit +{ + static void* convertible(PyObject* obj) + { + + + + + return implicit_rvalue_convertible_from_python(obj, registered::converters) + ? obj : 0; + } + + static void construct(PyObject* obj, rvalue_from_python_stage1_data* data) + { + void* storage = ((rvalue_from_python_storage*)data)->storage.bytes; + + arg_from_python get_source(obj); + bool convertible = get_source.convertible(); + ((void)(convertible)); + + new (storage) Target(get_source()); + + + data->convertible = storage; + } +}; + +}}} +# 11 "/usr/include/boost-1_42/boost/python/implicit.hpp" 2 + + + + + + +namespace boost { namespace python { + +template +void implicitly_convertible(boost::type* = 0, boost::type* = 0) +{ + typedef converter::implicit functions; + + converter::registry::push_back( + &functions::convertible + , &functions::construct + , type_id() + + , &converter::expected_from_python_type_direct::get_pytype + + ); +} + +}} +# 34 "/usr/include/boost-1_42/boost/python.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/import.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/import.hpp" +namespace boost +{ +namespace python +{ + + +object import(str name); + +} +} +# 36 "/usr/include/boost-1_42/boost/python.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/iterator.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/iterator.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 22 "/usr/include/boost-1_42/boost/python/detail/target.hpp" +namespace boost { namespace python { namespace detail { + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 47 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + +template +void(* target(R (*)()) )() +{ + return 0; +} +# 48 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + +template +A0(* target(R (*)( A0)) )() +{ + return 0; +} +# 53 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + +template +A0(* target(R (*)( A0 , A1)) )() +{ + return 0; +} +# 58 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + +template +A0(* target(R (*)( A0 , A1 , A2)) )() +{ + return 0; +} +# 63 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + +template +A0(* target(R (*)( A0 , A1 , A2 , A3)) )() +{ + return 0; +} +# 68 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + +template +A0(* target(R (*)( A0 , A1 , A2 , A3 , A4)) )() +{ + return 0; +} +# 73 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + +template +A0(* target(R (*)( A0 , A1 , A2 , A3 , A4 , A5)) )() +{ + return 0; +} +# 78 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + +template +A0(* target(R (*)( A0 , A1 , A2 , A3 , A4 , A5 , A6)) )() +{ + return 0; +} +# 83 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + +template +A0(* target(R (*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7)) )() +{ + return 0; +} +# 88 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + +template +A0(* target(R (*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8)) )() +{ + return 0; +} +# 93 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + +template +A0(* target(R (*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9)) )() +{ + return 0; +} +# 98 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + +template +A0(* target(R (*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10)) )() +{ + return 0; +} +# 103 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + +template +A0(* target(R (*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11)) )() +{ + return 0; +} +# 108 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + +template +A0(* target(R (*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12)) )() +{ + return 0; +} +# 113 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + +template +A0(* target(R (*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13)) )() +{ + return 0; +} +# 118 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 46 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + +template +A0(* target(R (*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14)) )() +{ + return 0; +} +# 123 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 47 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 64 "/usr/include/boost-1_42/boost/python/detail/target.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 45 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)() ) )() +{ + return 0; +} +# 46 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0) ) )() +{ + return 0; +} +# 51 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1) ) )() +{ + return 0; +} +# 56 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2) ) )() +{ + return 0; +} +# 61 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3) ) )() +{ + return 0; +} +# 66 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4) ) )() +{ + return 0; +} +# 71 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5) ) )() +{ + return 0; +} +# 76 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6) ) )() +{ + return 0; +} +# 81 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7) ) )() +{ + return 0; +} +# 86 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8) ) )() +{ + return 0; +} +# 91 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9) ) )() +{ + return 0; +} +# 96 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10) ) )() +{ + return 0; +} +# 101 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11) ) )() +{ + return 0; +} +# 106 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12) ) )() +{ + return 0; +} +# 111 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13) ) )() +{ + return 0; +} +# 116 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14) ) )() +{ + return 0; +} +# 121 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 65 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 2 +# 48 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 64 "/usr/include/boost-1_42/boost/python/detail/target.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 45 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)() const) )() +{ + return 0; +} +# 46 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0) const) )() +{ + return 0; +} +# 51 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1) const) )() +{ + return 0; +} +# 56 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2) const) )() +{ + return 0; +} +# 61 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3) const) )() +{ + return 0; +} +# 66 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4) const) )() +{ + return 0; +} +# 71 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5) const) )() +{ + return 0; +} +# 76 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6) const) )() +{ + return 0; +} +# 81 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7) const) )() +{ + return 0; +} +# 86 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8) const) )() +{ + return 0; +} +# 91 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9) const) )() +{ + return 0; +} +# 96 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10) const) )() +{ + return 0; +} +# 101 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11) const) )() +{ + return 0; +} +# 106 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12) const) )() +{ + return 0; +} +# 111 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13) const) )() +{ + return 0; +} +# 116 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14) const) )() +{ + return 0; +} +# 121 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 65 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 2 +# 53 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 64 "/usr/include/boost-1_42/boost/python/detail/target.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 45 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)() volatile) )() +{ + return 0; +} +# 46 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0) volatile) )() +{ + return 0; +} +# 51 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1) volatile) )() +{ + return 0; +} +# 56 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2) volatile) )() +{ + return 0; +} +# 61 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3) volatile) )() +{ + return 0; +} +# 66 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4) volatile) )() +{ + return 0; +} +# 71 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5) volatile) )() +{ + return 0; +} +# 76 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6) volatile) )() +{ + return 0; +} +# 81 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7) volatile) )() +{ + return 0; +} +# 86 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8) volatile) )() +{ + return 0; +} +# 91 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9) volatile) )() +{ + return 0; +} +# 96 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10) volatile) )() +{ + return 0; +} +# 101 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11) volatile) )() +{ + return 0; +} +# 106 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12) volatile) )() +{ + return 0; +} +# 111 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13) volatile) )() +{ + return 0; +} +# 116 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14) volatile) )() +{ + return 0; +} +# 121 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 65 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 2 +# 58 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 64 "/usr/include/boost-1_42/boost/python/detail/target.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower2.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper2.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 45 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)() const volatile) )() +{ + return 0; +} +# 46 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0) const volatile) )() +{ + return 0; +} +# 51 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1) const volatile) )() +{ + return 0; +} +# 56 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2) const volatile) )() +{ + return 0; +} +# 61 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3) const volatile) )() +{ + return 0; +} +# 66 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4) const volatile) )() +{ + return 0; +} +# 71 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5) const volatile) )() +{ + return 0; +} +# 76 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6) const volatile) )() +{ + return 0; +} +# 81 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7) const volatile) )() +{ + return 0; +} +# 86 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8) const volatile) )() +{ + return 0; +} +# 91 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9) const volatile) )() +{ + return 0; +} +# 96 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10) const volatile) )() +{ + return 0; +} +# 101 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11) const volatile) )() +{ + return 0; +} +# 106 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12) const volatile) )() +{ + return 0; +} +# 111 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13) const volatile) )() +{ + return 0; +} +# 116 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/python/detail/target.hpp" + + + + + + +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14) const volatile) )() +{ + return 0; +} +# 121 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward2.hpp" 2 +# 65 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 2 +# 63 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 31 "/usr/include/boost-1_42/boost/python/detail/target.hpp" 2 + +template +T& (* target(R (T::*)) )() { return 0; } + +}}} +# 11 "/usr/include/boost-1_42/boost/python/iterator.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/object/iterator.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/python/object/iterator.hpp" +# 1 "/usr/include/boost-1_42/boost/python/object/iterator_core.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/object/iterator_core.hpp" +namespace boost { namespace python { namespace objects { + + object const& identity_function(); + void stop_iteration_error(); + +}}} +# 17 "/usr/include/boost-1_42/boost/python/object/iterator.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/object/class_detail.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/object/class_detail.hpp" +namespace boost { namespace python { namespace objects { + + type_handle registered_class_object(type_info id); + type_handle class_metatype(); + type_handle class_type(); + +}}} +# 18 "/usr/include/boost-1_42/boost/python/object/iterator.hpp" 2 +# 31 "/usr/include/boost-1_42/boost/python/object/iterator.hpp" +# 1 "/usr/include/boost-1_42/boost/detail/iterator.hpp" 1 +# 77 "/usr/include/boost-1_42/boost/detail/iterator.hpp" +namespace boost { namespace detail { + + +template +struct iterator_traits + : std::iterator_traits +{}; +using std::distance; + +}} +# 32 "/usr/include/boost-1_42/boost/python/object/iterator.hpp" 2 + +namespace boost { namespace python { namespace objects { + + + + + + +typedef return_value_policy default_iterator_call_policies; + + +template +struct iterator_range +{ + iterator_range(object sequence, Iterator start, Iterator finish); + + typedef boost::detail::iterator_traits traits_t; + + struct next + { + typedef typename mpl::if_< + is_reference< + typename traits_t::reference + > + , typename traits_t::reference + , typename traits_t::value_type + >::type result_type; + + result_type + operator()(iterator_range& self) + { + if (self.m_start == self.m_finish) + stop_iteration_error(); + return *self.m_start++; + } + + + + + + }; +# 101 "/usr/include/boost-1_42/boost/python/object/iterator.hpp" + typedef next next_fn; + + + object m_sequence; + Iterator m_start; + Iterator m_finish; +}; + +namespace detail +{ + + + + template + object demand_iterator_class(char const* name, Iterator* = 0, NextPolicies const& policies = NextPolicies()) + { + typedef iterator_range range_; + + + handle<> class_obj( + objects::registered_class_object(python::type_id())); + + if (class_obj.get() != 0) + return object(class_obj); + + typedef typename range_::next_fn next_fn; + typedef typename next_fn::result_type result_type; + + return class_(name, no_init) + .def("__iter__", identity_function()) + .def( + + + + "next" + + , make_function( + next_fn() + , policies + , mpl::vector2() + )); + } + + + template < + class Target + , class Iterator + , class Accessor1 + , class Accessor2 + , class NextPolicies + > + struct py_iter_ + { + py_iter_(Accessor1 const& get_start, Accessor2 const& get_finish) + : m_get_start(get_start) + , m_get_finish(get_finish) + {} + + + + + + iterator_range + operator()(back_reference x) const + { + + detail::demand_iterator_class("iterator", (Iterator*)0, NextPolicies()); + + return iterator_range( + x.source() + , m_get_start(x.get()) + , m_get_finish(x.get()) + ); + } + private: + Accessor1 m_get_start; + Accessor2 m_get_finish; + }; + + template + inline object make_iterator_function( + Accessor1 const& get_start + , Accessor2 const& get_finish + , NextPolicies const& + , Iterator const& (*)() + , boost::type* + , int + ) + { + return make_function( + py_iter_(get_start, get_finish) + , default_call_policies() + , mpl::vector2, back_reference >() + ); + } + + template + inline object make_iterator_function( + Accessor1 const& get_start + , Accessor2 const& get_finish + , NextPolicies const& next_policies + , Iterator& (*)() + , boost::type* + , ...) + { + return make_iterator_function( + get_start + , get_finish + , next_policies + , (Iterator const&(*)())0 + , (boost::type*)0 + , 0 + ); + } + +} + + + + + + + +template +inline object make_iterator_function( + Accessor1 const& get_start + , Accessor2 const& get_finish + , NextPolicies const& next_policies + , boost::type* = 0 +) +{ + typedef typename Accessor1::result_type iterator; + typedef typename add_const::type iterator_const; + typedef typename add_reference::type iterator_cref; + + return detail::make_iterator_function( + get_start + , get_finish + , next_policies + , (iterator_cref(*)())0 + , (boost::type*)0 + , 0 + ); +} + + + + +template +inline iterator_range::iterator_range( + object sequence, Iterator start, Iterator finish) + : m_sequence(sequence), m_start(start), m_finish(finish) +{ +} + +}}} +# 12 "/usr/include/boost-1_42/boost/python/iterator.hpp" 2 +# 28 "/usr/include/boost-1_42/boost/python/iterator.hpp" +# 1 "/usr/include/boost-1_42/boost/bind/protect.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/bind/protect.hpp" +namespace boost +{ + +namespace _bi +{ + +template class protected_bind_t +{ +public: + + typedef typename F::result_type result_type; + + explicit protected_bind_t(F f): f_(f) + { + } + + result_type operator()() + { + return f_(); + } + + result_type operator()() const + { + return f_(); + } + + template result_type operator()(A1 & a1) + { + return f_(a1); + } + + template result_type operator()(A1 & a1) const + { + return f_(a1); + } + + + + + + template result_type operator()(const A1 & a1) + { + return f_(a1); + } + + template result_type operator()(const A1 & a1) const + { + return f_(a1); + } + + + + template result_type operator()(A1 & a1, A2 & a2) + { + return f_(a1, a2); + } + + template result_type operator()(A1 & a1, A2 & a2) const + { + return f_(a1, a2); + } + + + + + template result_type operator()(A1 const & a1, A2 & a2) + { + return f_(a1, a2); + } + + template result_type operator()(A1 const & a1, A2 & a2) const + { + return f_(a1, a2); + } + + template result_type operator()(A1 & a1, A2 const & a2) + { + return f_(a1, a2); + } + + template result_type operator()(A1 & a1, A2 const & a2) const + { + return f_(a1, a2); + } + + template result_type operator()(A1 const & a1, A2 const & a2) + { + return f_(a1, a2); + } + + template result_type operator()(A1 const & a1, A2 const & a2) const + { + return f_(a1, a2); + } + + + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3) + { + return f_(a1, a2, a3); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3) const + { + return f_(a1, a2, a3); + } + + + + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) + { + return f_(a1, a2, a3); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) const + { + return f_(a1, a2, a3); + } + + + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) + { + return f_(a1, a2, a3, a4); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) const + { + return f_(a1, a2, a3, a4); + } + + + + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) + { + return f_(a1, a2, a3, a4); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) const + { + return f_(a1, a2, a3, a4); + } + + + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) + { + return f_(a1, a2, a3, a4, a5); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) const + { + return f_(a1, a2, a3, a4, a5); + } + + + + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) + { + return f_(a1, a2, a3, a4, a5); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) const + { + return f_(a1, a2, a3, a4, a5); + } + + + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) + { + return f_(a1, a2, a3, a4, a5, a6); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) const + { + return f_(a1, a2, a3, a4, a5, a6); + } + + + + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) + { + return f_(a1, a2, a3, a4, a5, a6); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) const + { + return f_(a1, a2, a3, a4, a5, a6); + } + + + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) + { + return f_(a1, a2, a3, a4, a5, a6, a7); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) const + { + return f_(a1, a2, a3, a4, a5, a6, a7); + } + + + + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) + { + return f_(a1, a2, a3, a4, a5, a6, a7); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) const + { + return f_(a1, a2, a3, a4, a5, a6, a7); + } + + + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) + { + return f_(a1, a2, a3, a4, a5, a6, a7, a8); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) const + { + return f_(a1, a2, a3, a4, a5, a6, a7, a8); + } + + + + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) + { + return f_(a1, a2, a3, a4, a5, a6, a7, a8); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) const + { + return f_(a1, a2, a3, a4, a5, a6, a7, a8); + } + + + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) + { + return f_(a1, a2, a3, a4, a5, a6, a7, a8, a9); + } + + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) const + { + return f_(a1, a2, a3, a4, a5, a6, a7, a8, a9); + } + + + + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) + { + return f_(a1, a2, a3, a4, a5, a6, a7, a8, a9); + } + + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) const + { + return f_(a1, a2, a3, a4, a5, a6, a7, a8, a9); + } + + + +private: + + F f_; +}; + +} + +template _bi::protected_bind_t protect(F f) +{ + return _bi::protected_bind_t(f); +} + +} +# 29 "/usr/include/boost-1_42/boost/python/iterator.hpp" 2 + +namespace boost { namespace python { + +namespace detail +{ + + + + template + inline object make_iterator( + Accessor1 get_start + , Accessor2 get_finish + , NextPolicies next_policies + , Target&(*)() + ) + { + return objects::make_iterator_function( + boost::protect(boost::bind(get_start, _1)) + , boost::protect(boost::bind(get_finish, _1)) + , next_policies + ); + } + + + template + struct iterators_impl + { + template + struct apply + { + typedef typename T::iterator iterator; + static iterator begin(T& x) { return x.begin(); } + static iterator end(T& x) { return x.end(); } + }; + }; + + template <> + struct iterators_impl + { + template + struct apply + { + typedef typename T::const_iterator iterator; + static iterator begin(T& x) { return x.begin(); } + static iterator end(T& x) { return x.end(); } + }; + }; +} + + + +template +struct iterators + : detail::iterators_impl< + boost::is_const::value + >::template apply +{ +}; + + + + +template +object range(Accessor1 start, Accessor2 finish) +{ + return detail::make_iterator( + start, finish + , objects::default_iterator_call_policies() + , detail::target(start) + ); +} + + + +template +object range(Accessor1 start, Accessor2 finish, NextPolicies* = 0) +{ + return detail::make_iterator(start, finish, NextPolicies(), detail::target(start)); +} + + + +template +object range(Accessor1 start, Accessor2 finish, NextPolicies* = 0, boost::type* = 0) +{ + + return detail::make_iterator(start, finish, NextPolicies(), (Target&(*)())0); +} + + + + + +template +struct iterator : object +{ + iterator() + : object( + python::range( + &iterators::begin, &iterators::end + )) + { + } +}; + +}} +# 38 "/usr/include/boost-1_42/boost/python.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/long.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/long.hpp" +namespace boost { namespace python { + +namespace detail +{ + struct long_base : object + { + protected: + long_base(); + explicit long_base(object_cref rhs); + explicit long_base(object_cref rhs, object_cref base); + + inline explicit long_base(python::detail::borrowed_reference p) : object(p) {} inline explicit long_base(python::detail::new_reference p) : object(p) {} inline explicit long_base(python::detail::new_non_null_reference p) : object(p) {} + + private: + static detail::new_non_null_reference call(object const&); + static detail::new_non_null_reference call(object const&, object const&); + }; +} + +class long_ : public detail::long_base +{ + typedef detail::long_base base; + public: + long_() {} + + template + explicit long_(T const& rhs) + : detail::long_base(object(rhs)) + { + } + + template + explicit long_(T const& rhs, U const& base) + : detail::long_base(object(rhs), object(base)) + { + } + + public: + inline explicit long_(python::detail::borrowed_reference p) : base(p) {} inline explicit long_(python::detail::new_reference p) : base(p) {} inline explicit long_(python::detail::new_non_null_reference p) : base(p) {} +}; + + + + +namespace converter +{ + template <> + struct object_manager_traits + : pytype_object_manager_traits<&PyLong_Type,long_> + { + }; +} + +}} +# 40 "/usr/include/boost-1_42/boost/python.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/lvalue_from_pytype.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/python/lvalue_from_pytype.hpp" +namespace boost { namespace python { + +namespace detail +{ + + + template + inline type_info extractor_type_id(T&(*)(U)) + { + return type_id(); + } + + + + + + template + struct normalized_extractor + { + static inline void* execute(PyObject* op) + { + typedef typename boost::add_reference::type param; + return &Extractor::execute( + boost::python::detail::void_ptr_to_reference( + op, (param(*)())0 ) + ); + } + }; + + + + + + + template + inline normalized_extractor + normalize(T(*)(U), Extractor* = 0) + { + return normalized_extractor(); + } +} + + + +template +struct extract_member +{ + static MemberType& execute(InstanceType& c) + { + (void)(((PyObject*)(&c))->ob_type); + return c.*member; + } +}; + + + +template +struct extract_identity +{ + static InstanceType& execute(InstanceType& c) + { + (void)(((PyObject*)(&c))->ob_type); + return c; + } +}; + + + + +template +struct lvalue_from_pytype +{ + lvalue_from_pytype() + { + converter::registry::insert + ( &extract + , detail::extractor_type_id(&Extractor::execute) + + , &get_pytype + + ); + } + private: + static void* extract(PyObject* op) + { + return ((((PyObject*)(op))->ob_type) == (const_cast(python_type)) || PyType_IsSubtype((((PyObject*)(op))->ob_type), (const_cast(python_type)))) + ? const_cast( + static_cast( + detail::normalize(&Extractor::execute).execute(op))) + : 0 + ; + } + + static PyTypeObject const*get_pytype() { return python_type; } + +}; + +}} +# 41 "/usr/include/boost-1_42/boost/python.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/make_constructor.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/python/make_constructor.hpp" +# 1 "/usr/include/boost-1_42/boost/python/object/make_holder.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/python/make_constructor.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/object/pointer_holder.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/python/make_constructor.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/python/detail/caller.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/python/make_constructor.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/mpl/push_front.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/push_front.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/push_front_impl.hpp" 1 +# 26 "/usr/include/boost-1_42/boost/mpl/aux_/push_front_impl.hpp" +namespace boost { namespace mpl { + +struct has_push_front_arg {}; + + + + +template< typename Tag > +struct push_front_impl +{ + template< typename Sequence, typename T > struct apply + { + + + + struct REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST; typedef struct + + + + REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST45 +# 41 "/usr/include/boost-1_42/boost/mpl/aux_/push_front_impl.hpp" + : boost::mpl::assert_ { static boost::mpl::failed ************ (REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST::************ assert_arg()) ( Sequence ) { return 0; } } + + + + mpl_assert_arg45 +# 41 "/usr/include/boost-1_42/boost/mpl/aux_/push_front_impl.hpp" + ; enum { mpl_assertion_in_line_45 = sizeof( boost::mpl::assertion_failed<(( boost::is_same< T, has_push_front_arg >::value ))>( mpl_assert_arg45::assert_arg() ) ) } + + + + ; + }; +}; + +template< typename Tag > +struct has_push_front_impl +{ + template< typename Seq > struct apply + + : aux::has_type< push_front< Seq, has_push_front_arg > > + { + + + + + + + + }; +}; + + template<> struct push_front_impl {}; + template<> struct has_push_front_impl {}; + +}} +# 19 "/usr/include/boost-1_42/boost/mpl/push_front.hpp" 2 + + + + +namespace boost { namespace mpl { + +template< + typename Sequence = na + , typename T = na + > +struct push_front + : push_front_impl< typename sequence_tag::type > + ::template apply< Sequence,T > +{ + +}; + + +template< + typename Sequence = na + > +struct has_push_front + : has_push_front_impl< typename sequence_tag::type > + ::template apply< Sequence > +{ + +}; + +template<> struct push_front< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : push_front< T1 , T2 > { }; }; template< typename Tag > struct lambda< push_front< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef push_front< na , na > result_; typedef push_front< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< push_front< T1 , T2 > > : int_<2> { }; template<> struct template_arity< push_front< na , na > > : int_<-1> { }; } +template<> struct has_push_front< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : has_push_front< T1 > { }; }; template< typename Tag > struct lambda< has_push_front< na > , Tag , int_<-1> > { typedef false_ is_le; typedef has_push_front< na > result_; typedef has_push_front< na > type; }; namespace aux { template< typename T1 > struct template_arity< has_push_front< T1 > > : int_<1> { }; template<> struct template_arity< has_push_front< na > > : int_<-1> { }; } + +}} +# 25 "/usr/include/boost-1_42/boost/python/make_constructor.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/pop_front.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/mpl/pop_front.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/pop_front_impl.hpp" 1 +# 22 "/usr/include/boost-1_42/boost/mpl/aux_/pop_front_impl.hpp" +namespace boost { namespace mpl { + + + +template< typename Tag > +struct pop_front_impl +{ + template< typename Sequence > struct apply + + + + + + + + ; +}; + + template<> struct pop_front_impl {}; + +}} +# 19 "/usr/include/boost-1_42/boost/mpl/pop_front.hpp" 2 + + + + +namespace boost { namespace mpl { + +template< + typename Sequence = na + > +struct pop_front + : pop_front_impl< typename sequence_tag::type > + ::template apply< Sequence > +{ + +}; + +template<> struct pop_front< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : pop_front< T1 > { }; }; template< typename Tag > struct lambda< pop_front< na > , Tag , int_<-1> > { typedef false_ is_le; typedef pop_front< na > result_; typedef pop_front< na > type; }; namespace aux { template< typename T1 > struct template_arity< pop_front< T1 > > : int_<1> { }; template<> struct template_arity< pop_front< na > > : int_<-1> { }; } + +}} +# 26 "/usr/include/boost-1_42/boost/python/make_constructor.hpp" 2 + + +namespace boost { namespace python { + +namespace detail +{ + template + struct install_holder : converter::context_result_converter + { + install_holder(PyObject* args_) + : m_self(PyTuple_GetItem(args_, 0)) {} + + PyObject* operator()(T x) const + { + dispatch(x, is_pointer()); + return none(); + } + + private: + template + void dispatch(U* x, mpl::true_) const + { + std::auto_ptr owner(x); + dispatch(owner, mpl::false_()); + } + + template + void dispatch(Ptr x, mpl::false_) const + { + typedef typename pointee::type value_type; + typedef objects::pointer_holder holder; + typedef objects::instance instance_t; + + void* memory = holder::allocate(this->m_self, __builtin_offsetof (instance_t, storage), sizeof(holder)); + try { + (new (memory) holder(x))->install(this->m_self); + } + catch(...) { + holder::deallocate(this->m_self, memory); + throw; + } + } + + PyObject* m_self; + }; + + struct constructor_result_converter + { + template + struct apply + { + typedef install_holder type; + }; + }; + + template + struct offset_args + { + offset_args(BaseArgs base_) : base(base_) {} + BaseArgs base; + }; + + template + inline PyObject* get(mpl::int_, offset_args const& args_) + { + return get(mpl::int_<(N+Offset::value)>(), args_.base); + } + + template + inline unsigned arity(offset_args const& args_) + { + return arity(args_.base) - Offset::value; + } + + template + struct constructor_policy : BasePolicy_ + { + constructor_policy(BasePolicy_ base) : BasePolicy_(base) {} +# 115 "/usr/include/boost-1_42/boost/python/make_constructor.hpp" + struct MAKE_CONSTRUCTOR_SUPPLIES_ITS_OWN_RESULT_CONVERTER_THAT_WOULD_OVERRIDE_YOURS; typedef struct + + + + + + + MAKE_CONSTRUCTOR_SUPPLIES_ITS_OWN_RESULT_CONVERTER_THAT_WOULD_OVERRIDE_YOURS122 +# 115 "/usr/include/boost-1_42/boost/python/make_constructor.hpp" + : boost::mpl::assert_ { static boost::mpl::failed ************ (MAKE_CONSTRUCTOR_SUPPLIES_ITS_OWN_RESULT_CONVERTER_THAT_WOULD_OVERRIDE_YOURS::************ assert_arg()) (typename BasePolicy_::result_converter) { return 0; } } + + + + + + + mpl_assert_arg122 +# 115 "/usr/include/boost-1_42/boost/python/make_constructor.hpp" + ; enum { mpl_assertion_in_line_122 = sizeof( boost::mpl::assertion_failed<((is_same< typename BasePolicy_::result_converter , default_result_converter >::value))>( mpl_assert_arg122::assert_arg() ) ) } + + + + + + + ; + + typedef constructor_result_converter result_converter; + typedef offset_args > argument_package; + }; + + template + struct outer_constructor_signature + { + typedef typename mpl::pop_front::type inner_args; + typedef typename mpl::push_front::type outer_args; + typedef typename mpl::push_front::type type; + }; + + + template <> + struct outer_constructor_signature + { + typedef int type; + }; +# 150 "/usr/include/boost-1_42/boost/python/make_constructor.hpp" + template + object make_constructor_aux( + F f + , CallPolicies const& p + , Sig const& + ) + { + typedef typename outer_constructor_signature::type outer_signature; + + typedef constructor_policy inner_policy; + + return objects::function_object( + objects::py_function( + detail::caller(f, inner_policy(p)) + , outer_signature() + ) + ); + } + + + + + + template + object make_constructor_aux( + F f + , CallPolicies const& p + , Sig const& + , detail::keyword_range const& kw + , NumKeywords + ) + { + enum { arity = mpl::size::value - 1 }; + + typedef typename detail::error::more_keywords_than_function_arguments< + NumKeywords::value, arity + >::too_many_keywords assertion; + + typedef typename outer_constructor_signature::type outer_signature; + + typedef constructor_policy inner_policy; + + return objects::function_object( + objects::py_function( + detail::caller(f, inner_policy(p)) + , outer_signature() + ) + , kw + ); + } +# 209 "/usr/include/boost-1_42/boost/python/make_constructor.hpp" + template + object make_constructor_dispatch(F f, CallPolicies const& policies, Keywords const& kw, mpl::true_) + { + return detail::make_constructor_aux( + f + , policies + , detail::get_signature(f) + , kw.range() + , mpl::int_() + ); + } + + template + object make_constructor_dispatch(F f, CallPolicies const& policies, Signature const& sig, mpl::false_) + { + return detail::make_constructor_aux( + f + , policies + , sig + ); + } + +} + + + + + +template +object make_constructor(F f) +{ + return detail::make_constructor_aux( + f,default_call_policies(), detail::get_signature(f)); +} + +template +object make_constructor(F f, CallPolicies const& policies) +{ + return detail::make_constructor_aux( + f, policies, detail::get_signature(f)); +} + +template +object make_constructor( + F f + , CallPolicies const& policies + , KeywordsOrSignature const& keywords_or_signature) +{ + typedef typename + detail::is_reference_to_keywords::type + is_kw; + + return detail::make_constructor_dispatch( + f + , policies + , keywords_or_signature + , is_kw() + ); +} + +template +object make_constructor( + F f + , CallPolicies const& policies + , Keywords const& kw + , Signature const& sig + ) +{ + return detail::make_constructor_aux( + f + , policies + , sig + , kw.range() + , mpl::int_() + ); +} + + +}} +# 42 "/usr/include/boost-1_42/boost/python.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/manage_new_object.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/python/manage_new_object.hpp" +namespace boost { namespace python { + +namespace detail +{ + template + struct manage_new_object_requires_a_pointer_return_type + + {} + + ; +} + +struct manage_new_object +{ + template + struct apply + { + typedef typename mpl::if_c< + boost::is_pointer::value + , to_python_indirect + , detail::manage_new_object_requires_a_pointer_return_type + >::type type; + }; +}; + +}} +# 44 "/usr/include/boost-1_42/boost/python.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/module.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/module.hpp" +# 1 "/usr/include/boost-1_42/boost/python/module_init.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/python/module_init.hpp" +namespace boost { namespace python { namespace detail { + + PyObject* init_module(char const* name, void(*)()); + +}}} +# 11 "/usr/include/boost-1_42/boost/python/module.hpp" 2 +# 45 "/usr/include/boost-1_42/boost/python.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/numeric.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/python/numeric.hpp" +namespace boost { namespace python { namespace numeric { + +class array; + +namespace aux +{ + struct array_base : object + { + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + array_base( object const& x0); + + + array_base( object const& x0 , object const& x1); + + + array_base( object const& x0 , object const& x1 , object const& x2); + + + array_base( object const& x0 , object const& x1 , object const& x2 , object const& x3); + + + array_base( object const& x0 , object const& x1 , object const& x2 , object const& x3 , object const& x4); + + + array_base( object const& x0 , object const& x1 , object const& x2 , object const& x3 , object const& x4 , object const& x5); + + + array_base( object const& x0 , object const& x1 , object const& x2 , object const& x3 , object const& x4 , object const& x5 , object const& x6); +# 30 "/usr/include/boost-1_42/boost/python/numeric.hpp" 2 + + object argmax(long axis=-1); + object argmin(long axis=-1); + object argsort(long axis=-1); + object astype(object const& type = object()); + void byteswap(); + object copy() const; + object diagonal(long offset = 0, long axis1 = 0, long axis2 = 1) const; + void info() const; + bool is_c_array() const; + bool isbyteswapped() const; + array new_(object type) const; + void sort(); + object trace(long offset = 0, long axis1 = 0, long axis2 = 1) const; + object type() const; + char typecode() const; + + object factory( + object const& sequence = object() + , object const& typecode = object() + , bool copy = true + , bool savespace = false + , object type = object() + , object shape = object()); + + object getflat() const; + long getrank() const; + object getshape() const; + bool isaligned() const; + bool iscontiguous() const; + long itemsize() const; + long nelements() const; + object nonzero() const; + + void put(object const& indices, object const& values); + + void ravel(); + + object repeat(object const& repeats, long axis=0); + + void resize(object const& shape); + + void setflat(object const& flat); + void setshape(object const& shape); + + void swapaxes(long axis1, long axis2); + + object take(object const& sequence, long axis = 0) const; + + void tofile(object const& file) const; + + str tostring() const; + + void transpose(object const& axes = object()); + + object view() const; + + public: + inline explicit array_base(python::detail::borrowed_reference p) : object(p) {} inline explicit array_base(python::detail::new_reference p) : object(p) {} inline explicit array_base(python::detail::new_non_null_reference p) : object(p) {}; + }; + + struct array_object_manager_traits + { + static bool check(PyObject* obj); + static detail::new_non_null_reference adopt(PyObject* obj); + static PyTypeObject const* get_pytype() ; + }; +} + +class array : public aux::array_base +{ + typedef aux::array_base base; + public: + + object astype() { return base::astype(); } + + template + object astype(Type const& type_) + { + return base::astype(object(type_)); + } + + template + array new_(Type const& type_) const + { + return base::new_(object(type_)); + } + + template + void resize(Sequence const& x) + { + base::resize(object(x)); + } + + + + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + void resize( long x0) { resize(make_tuple( x0)); } + + + void resize( long x0 , long x1) { resize(make_tuple( x0 , x1)); } + + + void resize( long x0 , long x1 , long x2) { resize(make_tuple( x0 , x1 , x2)); } + + + void resize( long x0 , long x1 , long x2 , long x3) { resize(make_tuple( x0 , x1 , x2 , x3)); } + + + void resize( long x0 , long x1 , long x2 , long x3 , long x4) { resize(make_tuple( x0 , x1 , x2 , x3 , x4)); } + + + void resize( long x0 , long x1 , long x2 , long x3 , long x4 , long x5) { resize(make_tuple( x0 , x1 , x2 , x3 , x4 , x5)); } + + + void resize( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6) { resize(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6)); } + + + void resize( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7) { resize(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7)); } + + + void resize( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8) { resize(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8)); } + + + void resize( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8 , long x9) { resize(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9)); } + + + void resize( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8 , long x9 , long x10) { resize(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 , x10)); } + + + void resize( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8 , long x9 , long x10 , long x11) { resize(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 , x10 , x11)); } + + + void resize( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8 , long x9 , long x10 , long x11 , long x12) { resize(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 , x10 , x11 , x12)); } + + + void resize( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8 , long x9 , long x10 , long x11 , long x12 , long x13) { resize(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 , x10 , x11 , x12 , x13)); } + + + void resize( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8 , long x9 , long x10 , long x11 , long x12 , long x13 , long x14) { resize(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 , x10 , x11 , x12 , x13 , x14)); } +# 131 "/usr/include/boost-1_42/boost/python/numeric.hpp" 2 + + template + void setshape(Sequence const& x) + { + base::setshape(object(x)); + } + + + + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + void setshape( long x0) { setshape(make_tuple( x0)); } + + + void setshape( long x0 , long x1) { setshape(make_tuple( x0 , x1)); } + + + void setshape( long x0 , long x1 , long x2) { setshape(make_tuple( x0 , x1 , x2)); } + + + void setshape( long x0 , long x1 , long x2 , long x3) { setshape(make_tuple( x0 , x1 , x2 , x3)); } + + + void setshape( long x0 , long x1 , long x2 , long x3 , long x4) { setshape(make_tuple( x0 , x1 , x2 , x3 , x4)); } + + + void setshape( long x0 , long x1 , long x2 , long x3 , long x4 , long x5) { setshape(make_tuple( x0 , x1 , x2 , x3 , x4 , x5)); } + + + void setshape( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6) { setshape(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6)); } + + + void setshape( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7) { setshape(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7)); } + + + void setshape( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8) { setshape(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8)); } + + + void setshape( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8 , long x9) { setshape(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9)); } + + + void setshape( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8 , long x9 , long x10) { setshape(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 , x10)); } + + + void setshape( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8 , long x9 , long x10 , long x11) { setshape(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 , x10 , x11)); } + + + void setshape( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8 , long x9 , long x10 , long x11 , long x12) { setshape(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 , x10 , x11 , x12)); } + + + void setshape( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8 , long x9 , long x10 , long x11 , long x12 , long x13) { setshape(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 , x10 , x11 , x12 , x13)); } + + + void setshape( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8 , long x9 , long x10 , long x11 , long x12 , long x13 , long x14) { setshape(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 , x10 , x11 , x12 , x13 , x14)); } +# 145 "/usr/include/boost-1_42/boost/python/numeric.hpp" 2 + + template + void put(Indices const& indices, Values const& values) + { + base::put(object(indices), object(values)); + } + + template + object take(Sequence const& sequence, long axis = 0) + { + return base::take(object(sequence), axis); + } + + template + void tofile(File const& f) const + { + base::tofile(object(f)); + } + + object factory() + { + return base::factory(); + } + + template + object factory(Sequence const& sequence) + { + return base::factory(object(sequence)); + } + + template + object factory( + Sequence const& sequence + , Typecode const& typecode_ + , bool copy = true + , bool savespace = false + ) + { + return base::factory(object(sequence), object(typecode_), copy, savespace); + } + + template + object factory( + Sequence const& sequence + , Typecode const& typecode_ + , bool copy + , bool savespace + , Type const& type + ) + { + return base::factory(object(sequence), object(typecode_), copy, savespace, object(type)); + } + + template + object factory( + Sequence const& sequence + , Typecode const& typecode_ + , bool copy + , bool savespace + , Type const& type + , Shape const& shape + ) + { + return base::factory(object(sequence), object(typecode_), copy, savespace, object(type), object(shape)); + } +# 218 "/usr/include/boost-1_42/boost/python/numeric.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + template < class T0> explicit array( T0 const& x0) : base( object(x0)) {} + + + template < class T0 , class T1> explicit array( T0 const& x0 , T1 const& x1) : base( object(x0) , object(x1)) {} + + + template < class T0 , class T1 , class T2> explicit array( T0 const& x0 , T1 const& x1 , T2 const& x2) : base( object(x0) , object(x1) , object(x2)) {} + + + template < class T0 , class T1 , class T2 , class T3> explicit array( T0 const& x0 , T1 const& x1 , T2 const& x2 , T3 const& x3) : base( object(x0) , object(x1) , object(x2) , object(x3)) {} + + + template < class T0 , class T1 , class T2 , class T3 , class T4> explicit array( T0 const& x0 , T1 const& x1 , T2 const& x2 , T3 const& x3 , T4 const& x4) : base( object(x0) , object(x1) , object(x2) , object(x3) , object(x4)) {} + + + template < class T0 , class T1 , class T2 , class T3 , class T4 , class T5> explicit array( T0 const& x0 , T1 const& x1 , T2 const& x2 , T3 const& x3 , T4 const& x4 , T5 const& x5) : base( object(x0) , object(x1) , object(x2) , object(x3) , object(x4) , object(x5)) {} + + + template < class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6> explicit array( T0 const& x0 , T1 const& x1 , T2 const& x2 , T3 const& x3 , T4 const& x4 , T5 const& x5 , T6 const& x6) : base( object(x0) , object(x1) , object(x2) , object(x3) , object(x4) , object(x5) , object(x6)) {} +# 219 "/usr/include/boost-1_42/boost/python/numeric.hpp" 2 + + + static void set_module_and_type(char const* package_name = 0, char const* type_attribute_name = 0); + static std::string get_module_name(); + + public: + inline explicit array(python::detail::borrowed_reference p) : base(p) {} inline explicit array(python::detail::new_reference p) : base(p) {} inline explicit array(python::detail::new_non_null_reference p) : base(p) {}; +}; + +} + +namespace converter +{ + template <> + struct object_manager_traits< numeric::array > + : numeric::aux::array_object_manager_traits + { + static const bool is_specialized = true; + }; +} + +}} +# 46 "/usr/include/boost-1_42/boost/python.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/python/opaque_pointer_converter.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/python/opaque_pointer_converter.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/dealloc.hpp" 1 + + + + + + + +namespace boost { namespace python { namespace detail { + extern "C" + { + inline void dealloc(PyObject* self) + { + PyObject_Free(self); + } + } +}}} +# 16 "/usr/include/boost-1_42/boost/python/opaque_pointer_converter.hpp" 2 +# 41 "/usr/include/boost-1_42/boost/python/opaque_pointer_converter.hpp" +namespace boost { namespace python { + +template +struct opaque +{ + opaque() + { + if (type_object.tp_name == 0) + { + type_object.tp_name = const_cast(type_id().name()); + if (PyType_Ready (&type_object) < 0) + { + throw error_already_set(); + } + + this->register_self(); + } + } + + static opaque instance; +private: + + static void* extract(PyObject* op) + { + return ((((PyObject*)(op))->ob_type) == (&type_object) || PyType_IsSubtype((((PyObject*)(op))->ob_type), (&type_object))) + ? static_cast(implicit_cast(op))->x + : 0 + ; + } + + static PyObject* wrap(void const* px) + { + Pointee* x = *static_cast(px); + + if (x == 0) + return detail::none(); + + if ( python_instance *o = ( (python_instance *) _PyObject_New(&type_object) ) ) + { + o->x = x; + return static_cast(implicit_cast(o)); + } + else + { + throw error_already_set(); + } + } + + void register_self() + { + converter::registration const *existing = + converter::registry::query (type_id()); + + if ((existing == 0) || (existing->m_to_python == 0)) + { + + converter::registry::insert(&extract, type_id(), &get_pytype); + converter::registry::insert(&wrap, type_id(), &get_pytype); + + + + + } + } + + struct python_instance + { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + Pointee* x; + }; + + static PyTypeObject type_object; + + static PyTypeObject const *get_pytype(){return &type_object; } + +}; + +template +opaque opaque::instance; + +template +PyTypeObject opaque::type_object = +{ + 1, __null, 0, + 0, + sizeof( typename opaque::python_instance ), + 0, + ::boost::python::detail::dealloc, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + + 0 + +}; +}} +# 50 "/usr/include/boost-1_42/boost/python.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/operators.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/python/operators.hpp" +# 1 "/usr/include/boost-1_42/boost/python/self.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/self.hpp" +namespace boost { namespace python { + + + + + + + +namespace self_ns +{ + + + + struct self_t {}; + extern self_t self; + +} + +using self_ns::self_t; +using self_ns::self; + +}} +# 18 "/usr/include/boost-1_42/boost/python/operators.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/other.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/python/other.hpp" +namespace boost { namespace python { + +template struct other +{ + typedef T type; +}; + + +namespace detail +{ + template + class is_other + { + public: + static const bool value = false; + }; + + template + class is_other > + { + public: + static const bool value = true; + }; + + template + class unwrap_other + { + public: + typedef T type; + }; + + template + class unwrap_other > + { + public: + typedef T type; + }; +} +# 112 "/usr/include/boost-1_42/boost/python/other.hpp" +}} +# 19 "/usr/include/boost-1_42/boost/python/operators.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/lexical_cast.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/lexical_cast.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/climits" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/climits" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/climits" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include-fixed/limits.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/climits" 2 3 +# 18 "/usr/include/boost-1_42/boost/lexical_cast.hpp" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 19 "/usr/include/boost-1_42/boost/lexical_cast.hpp" 2 +# 28 "/usr/include/boost-1_42/boost/lexical_cast.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/make_unsigned.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/make_unsigned.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/is_signed.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/type_traits/is_signed.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 20 "/usr/include/boost-1_42/boost/type_traits/is_signed.hpp" 2 + +namespace boost { + + + +namespace detail{ + + + +template +struct is_signed_values +{ + typedef typename remove_cv::type no_cv_t; + static const no_cv_t minus_one = (static_cast(-1)); + static const no_cv_t zero = (static_cast(0)); +}; + +template +struct is_signed_helper +{ + typedef typename remove_cv::type no_cv_t; + static const bool value = (!(::boost::detail::is_signed_values::minus_one > boost::detail::is_signed_values::zero)); +}; + +template +struct is_signed_select_helper +{ + template + struct rebind + { + typedef is_signed_helper type; + }; +}; + +template <> +struct is_signed_select_helper +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template +struct is_signed_imp +{ + typedef is_signed_select_helper< + ::boost::type_traits::ice_or< + ::boost::is_integral::value, + ::boost::is_enum::value>::value + > selector; + typedef typename selector::template rebind binder; + typedef typename binder::type type; + + + + static const bool value = type::value; + +}; +# 121 "/usr/include/boost-1_42/boost/type_traits/is_signed.hpp" +} + + + + + + +template< typename T > struct is_signed : ::boost::integral_constant::value> { }; + + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 134 "/usr/include/boost-1_42/boost/type_traits/is_signed.hpp" 2 +# 15 "/usr/include/boost-1_42/boost/type_traits/make_unsigned.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/is_unsigned.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/type_traits/is_unsigned.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 20 "/usr/include/boost-1_42/boost/type_traits/is_unsigned.hpp" 2 + +namespace boost { + + + +namespace detail{ + + + +template +struct is_unsigned_values +{ + typedef typename remove_cv::type no_cv_t; + static const no_cv_t minus_one = (static_cast(-1)); + static const no_cv_t zero = (static_cast(0)); +}; + +template +struct is_ununsigned_helper +{ + static const bool value = (::boost::detail::is_unsigned_values::minus_one > ::boost::detail::is_unsigned_values::zero); +}; + +template +struct is_ununsigned_select_helper +{ + template + struct rebind + { + typedef is_ununsigned_helper type; + }; +}; + +template <> +struct is_ununsigned_select_helper +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template +struct is_unsigned_imp +{ + typedef is_ununsigned_select_helper< + ::boost::type_traits::ice_or< + ::boost::is_integral::value, + ::boost::is_enum::value>::value + > selector; + typedef typename selector::template rebind binder; + typedef typename binder::type type; + static const bool value = type::value; +}; +# 116 "/usr/include/boost-1_42/boost/type_traits/is_unsigned.hpp" +} + + + + + + +template< typename T > struct is_unsigned : ::boost::integral_constant::value> { }; + + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 129 "/usr/include/boost-1_42/boost/type_traits/is_unsigned.hpp" 2 +# 16 "/usr/include/boost-1_42/boost/type_traits/make_unsigned.hpp" 2 +# 29 "/usr/include/boost-1_42/boost/type_traits/make_unsigned.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 2 +# 30 "/usr/include/boost-1_42/boost/type_traits/make_unsigned.hpp" 2 + +namespace boost { + +namespace detail { + +template +struct make_unsigned_imp +{ + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_enum::value>::value)) == 0 ? false : true) >)> + boost_static_assert_typedef_39; + + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((::boost::type_traits::ice_not< ::boost::is_same< typename remove_cv::type, bool>::value>::value)) == 0 ? false : true) >)> + + boost_static_assert_typedef_43; + + + typedef typename remove_cv::type t_no_cv; + typedef typename mpl::if_c< + (::boost::type_traits::ice_and< + ::boost::is_unsigned::value, + ::boost::is_integral::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value >::value), + T, + typename mpl::if_c< + (::boost::type_traits::ice_and< + ::boost::is_integral::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value> + ::value), + typename mpl::if_< + is_same, + unsigned char, + typename mpl::if_< + is_same, + unsigned short, + typename mpl::if_< + is_same, + unsigned int, + typename mpl::if_< + is_same, + unsigned long, + + boost::ulong_long_type + + + + + + >::type + >::type + >::type + >::type, + + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned char), + unsigned char, + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned short), + unsigned short, + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned int), + unsigned int, + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned long), + unsigned long, + + boost::ulong_long_type + + + + + + >::type + >::type + >::type + >::type + >::type + >::type base_integer_type; + + + typedef typename mpl::if_< + is_const, + typename add_const::type, + base_integer_type + >::type const_base_integer_type; + + + typedef typename mpl::if_< + is_volatile, + typename add_volatile::type, + const_base_integer_type + >::type type; +}; + + +} + +template< typename T > struct make_unsigned { typedef typename boost::detail::make_unsigned_imp::type type; }; + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_undef.hpp" 1 +# 135 "/usr/include/boost-1_42/boost/type_traits/make_unsigned.hpp" 2 +# 29 "/usr/include/boost-1_42/boost/lexical_cast.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/detail/lcast_precision.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/detail/lcast_precision.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/climits" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/climits" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/climits" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include-fixed/limits.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/climits" 2 3 +# 12 "/usr/include/boost-1_42/boost/detail/lcast_precision.hpp" 2 +# 36 "/usr/include/boost-1_42/boost/detail/lcast_precision.hpp" +namespace boost { namespace detail { + +class lcast_abstract_stub {}; + + + + + +template +struct lcast_precision +{ + + + + typedef typename boost::mpl::if_< + boost::is_abstract + , std::numeric_limits + , std::numeric_limits + >::type limits; + + + static const bool use_default_precision = !limits::is_specialized || limits::is_exact + + ; + + static const bool is_specialized_bin = !use_default_precision && limits::radix == 2 && limits::digits > 0 + + + ; + + static const bool is_specialized_dec = !use_default_precision && limits::radix == 10 && limits::digits10 > 0 + + + ; + + static const std::streamsize streamsize_max = boost::integer_traits::const_max + + ; + + static const unsigned int precision_dec = limits::digits10 + 1U; + + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((!is_specialized_dec || precision_dec <= streamsize_max + 0UL) == 0 ? false : true) >)> + + boost_static_assert_typedef_79; + + static const unsigned long precision_bin = 2UL + limits::digits * 30103UL / 100000UL + + ; + + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((!is_specialized_bin || (limits::digits + 0UL < (9223372036854775807L * 2UL + 1UL) / 30103UL && precision_bin > limits::digits10 + 0UL && precision_bin <= streamsize_max + 0UL)) == 0 ? false : true) >)> + + + + boost_static_assert_typedef_89; + + static const std::streamsize value = is_specialized_bin ? precision_bin : is_specialized_dec ? precision_dec : 6 + + + ; +}; + + +template +inline std::streamsize lcast_get_precision(T* = 0) +{ + + return lcast_precision::value; +# 165 "/usr/include/boost-1_42/boost/detail/lcast_precision.hpp" +} + +template +inline void lcast_set_precision(std::ios_base& stream, T*) +{ + stream.precision(lcast_get_precision()); +} + +template +inline void lcast_set_precision(std::ios_base& stream, Source*, Target*) +{ + std::streamsize const s = lcast_get_precision((Source*)0); + std::streamsize const t = lcast_get_precision((Target*)0); + stream.precision(s > t ? s : t); +} + +}} +# 32 "/usr/include/boost-1_42/boost/lexical_cast.hpp" 2 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/locale" 1 3 +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/locale" 3 + +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/locale" 3 + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ctime" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ctime" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ctime" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ctime" 2 3 +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/ctime" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + using ::clock_t; + using ::time_t; + using ::tm; + + using ::clock; + using ::difftime; + using ::mktime; + using ::time; + using ::asctime; + using ::ctime; + using ::gmtime; + using ::localtime; + using ::strftime; + +} +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 50 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + class time_base + { + public: + enum dateorder { no_order, dmy, mdy, ymd, ydm }; + }; + + template + struct __timepunct_cache : public locale::facet + { + + static const _CharT* _S_timezones[14]; + + const _CharT* _M_date_format; + const _CharT* _M_date_era_format; + const _CharT* _M_time_format; + const _CharT* _M_time_era_format; + const _CharT* _M_date_time_format; + const _CharT* _M_date_time_era_format; + const _CharT* _M_am; + const _CharT* _M_pm; + const _CharT* _M_am_pm_format; + + + const _CharT* _M_day1; + const _CharT* _M_day2; + const _CharT* _M_day3; + const _CharT* _M_day4; + const _CharT* _M_day5; + const _CharT* _M_day6; + const _CharT* _M_day7; + + + const _CharT* _M_aday1; + const _CharT* _M_aday2; + const _CharT* _M_aday3; + const _CharT* _M_aday4; + const _CharT* _M_aday5; + const _CharT* _M_aday6; + const _CharT* _M_aday7; + + + const _CharT* _M_month01; + const _CharT* _M_month02; + const _CharT* _M_month03; + const _CharT* _M_month04; + const _CharT* _M_month05; + const _CharT* _M_month06; + const _CharT* _M_month07; + const _CharT* _M_month08; + const _CharT* _M_month09; + const _CharT* _M_month10; + const _CharT* _M_month11; + const _CharT* _M_month12; + + + const _CharT* _M_amonth01; + const _CharT* _M_amonth02; + const _CharT* _M_amonth03; + const _CharT* _M_amonth04; + const _CharT* _M_amonth05; + const _CharT* _M_amonth06; + const _CharT* _M_amonth07; + const _CharT* _M_amonth08; + const _CharT* _M_amonth09; + const _CharT* _M_amonth10; + const _CharT* _M_amonth11; + const _CharT* _M_amonth12; + + bool _M_allocated; + + __timepunct_cache(size_t __refs = 0) : facet(__refs), + _M_date_format(__null), _M_date_era_format(__null), _M_time_format(__null), + _M_time_era_format(__null), _M_date_time_format(__null), + _M_date_time_era_format(__null), _M_am(__null), _M_pm(__null), + _M_am_pm_format(__null), _M_day1(__null), _M_day2(__null), _M_day3(__null), + _M_day4(__null), _M_day5(__null), _M_day6(__null), _M_day7(__null), + _M_aday1(__null), _M_aday2(__null), _M_aday3(__null), _M_aday4(__null), + _M_aday5(__null), _M_aday6(__null), _M_aday7(__null), _M_month01(__null), + _M_month02(__null), _M_month03(__null), _M_month04(__null), _M_month05(__null), + _M_month06(__null), _M_month07(__null), _M_month08(__null), _M_month09(__null), + _M_month10(__null), _M_month11(__null), _M_month12(__null), _M_amonth01(__null), + _M_amonth02(__null), _M_amonth03(__null), _M_amonth04(__null), + _M_amonth05(__null), _M_amonth06(__null), _M_amonth07(__null), + _M_amonth08(__null), _M_amonth09(__null), _M_amonth10(__null), + _M_amonth11(__null), _M_amonth12(__null), _M_allocated(false) + { } + + ~__timepunct_cache(); + + void + _M_cache(const locale& __loc); + + private: + __timepunct_cache& + operator=(const __timepunct_cache&); + + explicit + __timepunct_cache(const __timepunct_cache&); + }; + + template + __timepunct_cache<_CharT>::~__timepunct_cache() + { + if (_M_allocated) + { + + } + } + + + template<> + const char* + __timepunct_cache::_S_timezones[14]; + + + template<> + const wchar_t* + __timepunct_cache::_S_timezones[14]; + + + + template + const _CharT* __timepunct_cache<_CharT>::_S_timezones[14]; + + template + class __timepunct : public locale::facet + { + public: + + typedef _CharT __char_type; + typedef basic_string<_CharT> __string_type; + typedef __timepunct_cache<_CharT> __cache_type; + + protected: + __cache_type* _M_data; + __c_locale _M_c_locale_timepunct; + const char* _M_name_timepunct; + + public: + + static locale::id id; + + explicit + __timepunct(size_t __refs = 0); + + explicit + __timepunct(__cache_type* __cache, size_t __refs = 0); +# 208 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + explicit + __timepunct(__c_locale __cloc, const char* __s, size_t __refs = 0); + + + + void + _M_put(_CharT* __s, size_t __maxlen, const _CharT* __format, + const tm* __tm) const throw (); + + void + _M_date_formats(const _CharT** __date) const + { + + __date[0] = _M_data->_M_date_format; + __date[1] = _M_data->_M_date_era_format; + } + + void + _M_time_formats(const _CharT** __time) const + { + + __time[0] = _M_data->_M_time_format; + __time[1] = _M_data->_M_time_era_format; + } + + void + _M_date_time_formats(const _CharT** __dt) const + { + + __dt[0] = _M_data->_M_date_time_format; + __dt[1] = _M_data->_M_date_time_era_format; + } + + void + _M_am_pm_format(const _CharT* __ampm) const + { __ampm = _M_data->_M_am_pm_format; } + + void + _M_am_pm(const _CharT** __ampm) const + { + __ampm[0] = _M_data->_M_am; + __ampm[1] = _M_data->_M_pm; + } + + void + _M_days(const _CharT** __days) const + { + __days[0] = _M_data->_M_day1; + __days[1] = _M_data->_M_day2; + __days[2] = _M_data->_M_day3; + __days[3] = _M_data->_M_day4; + __days[4] = _M_data->_M_day5; + __days[5] = _M_data->_M_day6; + __days[6] = _M_data->_M_day7; + } + + void + _M_days_abbreviated(const _CharT** __days) const + { + __days[0] = _M_data->_M_aday1; + __days[1] = _M_data->_M_aday2; + __days[2] = _M_data->_M_aday3; + __days[3] = _M_data->_M_aday4; + __days[4] = _M_data->_M_aday5; + __days[5] = _M_data->_M_aday6; + __days[6] = _M_data->_M_aday7; + } + + void + _M_months(const _CharT** __months) const + { + __months[0] = _M_data->_M_month01; + __months[1] = _M_data->_M_month02; + __months[2] = _M_data->_M_month03; + __months[3] = _M_data->_M_month04; + __months[4] = _M_data->_M_month05; + __months[5] = _M_data->_M_month06; + __months[6] = _M_data->_M_month07; + __months[7] = _M_data->_M_month08; + __months[8] = _M_data->_M_month09; + __months[9] = _M_data->_M_month10; + __months[10] = _M_data->_M_month11; + __months[11] = _M_data->_M_month12; + } + + void + _M_months_abbreviated(const _CharT** __months) const + { + __months[0] = _M_data->_M_amonth01; + __months[1] = _M_data->_M_amonth02; + __months[2] = _M_data->_M_amonth03; + __months[3] = _M_data->_M_amonth04; + __months[4] = _M_data->_M_amonth05; + __months[5] = _M_data->_M_amonth06; + __months[6] = _M_data->_M_amonth07; + __months[7] = _M_data->_M_amonth08; + __months[8] = _M_data->_M_amonth09; + __months[9] = _M_data->_M_amonth10; + __months[10] = _M_data->_M_amonth11; + __months[11] = _M_data->_M_amonth12; + } + + protected: + virtual + ~__timepunct(); + + + void + _M_initialize_timepunct(__c_locale __cloc = __null); + }; + + template + locale::id __timepunct<_CharT>::id; + + + template<> + void + __timepunct::_M_initialize_timepunct(__c_locale __cloc); + + template<> + void + __timepunct::_M_put(char*, size_t, const char*, const tm*) const throw (); + + + template<> + void + __timepunct::_M_initialize_timepunct(__c_locale __cloc); + + template<> + void + __timepunct::_M_put(wchar_t*, size_t, const wchar_t*, + const tm*) const throw (); + + +} + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/time_members.h" 1 3 +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/time_members.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + __timepunct<_CharT>::__timepunct(size_t __refs) + : facet(__refs), _M_data(__null), _M_c_locale_timepunct(__null), + _M_name_timepunct(_S_get_c_name()) + { _M_initialize_timepunct(); } + + template + __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) + : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(__null), + _M_name_timepunct(_S_get_c_name()) + { _M_initialize_timepunct(); } + + template + __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, + size_t __refs) + : facet(__refs), _M_data(__null), _M_c_locale_timepunct(__null), + _M_name_timepunct(__null) + { + if (__builtin_strcmp(__s, _S_get_c_name()) != 0) + { + const size_t __len = __builtin_strlen(__s) + 1; + char* __tmp = new char[__len]; + __builtin_memcpy(__tmp, __s, __len); + _M_name_timepunct = __tmp; + } + else + _M_name_timepunct = _S_get_c_name(); + + try + { _M_initialize_timepunct(__cloc); } + catch(...) + { + if (_M_name_timepunct != _S_get_c_name()) + delete [] _M_name_timepunct; + throw; + } + } + + template + __timepunct<_CharT>::~__timepunct() + { + if (_M_name_timepunct != _S_get_c_name()) + delete [] _M_name_timepunct; + delete _M_data; + _S_destroy_c_locale(_M_c_locale_timepunct); + } + +} +# 346 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 362 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + template + class time_get : public locale::facet, public time_base + { + public: + + + + typedef _CharT char_type; + typedef _InIter iter_type; + + typedef basic_string<_CharT> __string_type; + + + static locale::id id; +# 384 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + explicit + time_get(size_t __refs = 0) + : facet (__refs) { } +# 401 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + dateorder + date_order() const + { return this->do_date_order(); } +# 425 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + iter_type + get_time(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { return this->do_get_time(__beg, __end, __io, __err, __tm); } +# 450 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + iter_type + get_date(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { return this->do_get_date(__beg, __end, __io, __err, __tm); } +# 478 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + iter_type + get_weekday(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { return this->do_get_weekday(__beg, __end, __io, __err, __tm); } +# 507 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + iter_type + get_monthname(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { return this->do_get_monthname(__beg, __end, __io, __err, __tm); } +# 533 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + iter_type + get_year(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { return this->do_get_year(__beg, __end, __io, __err, __tm); } + + protected: + + virtual + ~time_get() { } +# 553 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual dateorder + do_date_order() const; +# 571 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual iter_type + do_get_time(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const; +# 590 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual iter_type + do_get_date(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const; +# 609 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual iter_type + do_get_weekday(iter_type __beg, iter_type __end, ios_base&, + ios_base::iostate& __err, tm* __tm) const; +# 628 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual iter_type + do_get_monthname(iter_type __beg, iter_type __end, ios_base&, + ios_base::iostate& __err, tm* __tm) const; +# 647 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual iter_type + do_get_year(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const; + + + iter_type + _M_extract_num(iter_type __beg, iter_type __end, int& __member, + int __min, int __max, size_t __len, + ios_base& __io, ios_base::iostate& __err) const; + + + iter_type + _M_extract_name(iter_type __beg, iter_type __end, int& __member, + const _CharT** __names, size_t __indexlen, + ios_base& __io, ios_base::iostate& __err) const; + + + iter_type + _M_extract_wday_or_month(iter_type __beg, iter_type __end, int& __member, + const _CharT** __names, size_t __indexlen, + ios_base& __io, ios_base::iostate& __err) const; + + + iter_type + _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm, + const _CharT* __format) const; + }; + + template + locale::id time_get<_CharT, _InIter>::id; + + + template + class time_get_byname : public time_get<_CharT, _InIter> + { + public: + + typedef _CharT char_type; + typedef _InIter iter_type; + + explicit + time_get_byname(const char*, size_t __refs = 0) + : time_get<_CharT, _InIter>(__refs) { } + + protected: + virtual + ~time_get_byname() { } + }; +# 709 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + template + class time_put : public locale::facet + { + public: + + + + typedef _CharT char_type; + typedef _OutIter iter_type; + + + + static locale::id id; +# 730 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + explicit + time_put(size_t __refs = 0) + : facet(__refs) { } +# 749 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + iter_type + put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, + const _CharT* __beg, const _CharT* __end) const; +# 769 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + iter_type + put(iter_type __s, ios_base& __io, char_type __fill, + const tm* __tm, char __format, char __mod = 0) const + { return this->do_put(__s, __io, __fill, __tm, __format, __mod); } + + protected: + + virtual + ~time_put() + { } +# 796 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, + char __format, char __mod) const; + }; + + template + locale::id time_put<_CharT, _OutIter>::id; + + + template + class time_put_byname : public time_put<_CharT, _OutIter> + { + public: + + typedef _CharT char_type; + typedef _OutIter iter_type; + + explicit + time_put_byname(const char*, size_t __refs = 0) + : time_put<_CharT, _OutIter>(__refs) + { }; + + protected: + virtual + ~time_put_byname() { } + }; +# 835 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + class money_base + { + public: + enum part { none, space, symbol, sign, value }; + struct pattern { char field[4]; }; + + static const pattern _S_default_pattern; + + enum + { + _S_minus, + _S_zero, + _S_end = 11 + }; + + + + static const char* _S_atoms; + + + + __attribute__ ((__const__)) static pattern + _S_construct_pattern(char __precedes, char __space, char __posn) throw (); + }; + + template + struct __moneypunct_cache : public locale::facet + { + const char* _M_grouping; + size_t _M_grouping_size; + bool _M_use_grouping; + _CharT _M_decimal_point; + _CharT _M_thousands_sep; + const _CharT* _M_curr_symbol; + size_t _M_curr_symbol_size; + const _CharT* _M_positive_sign; + size_t _M_positive_sign_size; + const _CharT* _M_negative_sign; + size_t _M_negative_sign_size; + int _M_frac_digits; + money_base::pattern _M_pos_format; + money_base::pattern _M_neg_format; + + + + + _CharT _M_atoms[money_base::_S_end]; + + bool _M_allocated; + + __moneypunct_cache(size_t __refs = 0) : facet(__refs), + _M_grouping(__null), _M_grouping_size(0), _M_use_grouping(false), + _M_decimal_point(_CharT()), _M_thousands_sep(_CharT()), + _M_curr_symbol(__null), _M_curr_symbol_size(0), + _M_positive_sign(__null), _M_positive_sign_size(0), + _M_negative_sign(__null), _M_negative_sign_size(0), + _M_frac_digits(0), + _M_pos_format(money_base::pattern()), + _M_neg_format(money_base::pattern()), _M_allocated(false) + { } + + ~__moneypunct_cache(); + + void + _M_cache(const locale& __loc); + + private: + __moneypunct_cache& + operator=(const __moneypunct_cache&); + + explicit + __moneypunct_cache(const __moneypunct_cache&); + }; + + template + __moneypunct_cache<_CharT, _Intl>::~__moneypunct_cache() + { + if (_M_allocated) + { + delete [] _M_grouping; + delete [] _M_curr_symbol; + delete [] _M_positive_sign; + delete [] _M_negative_sign; + } + } +# 928 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + template + class moneypunct : public locale::facet, public money_base + { + public: + + + + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + typedef __moneypunct_cache<_CharT, _Intl> __cache_type; + + private: + __cache_type* _M_data; + + public: + + + static const bool intl = _Intl; + + static locale::id id; +# 957 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + explicit + moneypunct(size_t __refs = 0) : facet(__refs), _M_data(__null) + { _M_initialize_moneypunct(); } +# 969 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + explicit + moneypunct(__cache_type* __cache, size_t __refs = 0) + : facet(__refs), _M_data(__cache) + { _M_initialize_moneypunct(); } +# 984 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + explicit + moneypunct(__c_locale __cloc, const char* __s, size_t __refs = 0) + : facet(__refs), _M_data(__null) + { _M_initialize_moneypunct(__cloc, __s); } +# 998 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + char_type + decimal_point() const + { return this->do_decimal_point(); } +# 1011 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + char_type + thousands_sep() const + { return this->do_thousands_sep(); } +# 1041 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + string + grouping() const + { return this->do_grouping(); } +# 1054 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + string_type + curr_symbol() const + { return this->do_curr_symbol(); } +# 1071 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + string_type + positive_sign() const + { return this->do_positive_sign(); } +# 1088 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + string_type + negative_sign() const + { return this->do_negative_sign(); } +# 1104 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + int + frac_digits() const + { return this->do_frac_digits(); } +# 1140 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + pattern + pos_format() const + { return this->do_pos_format(); } + + pattern + neg_format() const + { return this->do_neg_format(); } + + + protected: + + virtual + ~moneypunct(); +# 1162 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual char_type + do_decimal_point() const + { return _M_data->_M_decimal_point; } +# 1174 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual char_type + do_thousands_sep() const + { return _M_data->_M_thousands_sep; } +# 1187 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual string + do_grouping() const + { return _M_data->_M_grouping; } +# 1200 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual string_type + do_curr_symbol() const + { return _M_data->_M_curr_symbol; } +# 1213 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual string_type + do_positive_sign() const + { return _M_data->_M_positive_sign; } +# 1226 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual string_type + do_negative_sign() const + { return _M_data->_M_negative_sign; } +# 1240 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual int + do_frac_digits() const + { return _M_data->_M_frac_digits; } +# 1254 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual pattern + do_pos_format() const + { return _M_data->_M_pos_format; } +# 1268 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual pattern + do_neg_format() const + { return _M_data->_M_neg_format; } + + + void + _M_initialize_moneypunct(__c_locale __cloc = __null, + const char* __name = __null); + }; + + template + locale::id moneypunct<_CharT, _Intl>::id; + + template + const bool moneypunct<_CharT, _Intl>::intl; + + template<> + moneypunct::~moneypunct(); + + template<> + moneypunct::~moneypunct(); + + template<> + void + moneypunct::_M_initialize_moneypunct(__c_locale, const char*); + + template<> + void + moneypunct::_M_initialize_moneypunct(__c_locale, const char*); + + + template<> + moneypunct::~moneypunct(); + + template<> + moneypunct::~moneypunct(); + + template<> + void + moneypunct::_M_initialize_moneypunct(__c_locale, + const char*); + + template<> + void + moneypunct::_M_initialize_moneypunct(__c_locale, + const char*); + + + + template + class moneypunct_byname : public moneypunct<_CharT, _Intl> + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + static const bool intl = _Intl; + + explicit + moneypunct_byname(const char* __s, size_t __refs = 0) + : moneypunct<_CharT, _Intl>(__refs) + { + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + __c_locale __tmp; + this->_S_create_c_locale(__tmp, __s); + this->_M_initialize_moneypunct(__tmp); + this->_S_destroy_c_locale(__tmp); + } + } + + protected: + virtual + ~moneypunct_byname() { } + }; + + template + const bool moneypunct_byname<_CharT, _Intl>::intl; + + +# 1363 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + template + class money_get : public locale::facet + { + public: + + + + typedef _CharT char_type; + typedef _InIter iter_type; + typedef basic_string<_CharT> string_type; + + + + static locale::id id; +# 1385 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + explicit + money_get(size_t __refs = 0) : facet(__refs) { } +# 1415 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + iter_type + get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, + ios_base::iostate& __err, long double& __units) const + { return this->do_get(__s, __end, __intl, __io, __err, __units); } +# 1446 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + iter_type + get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, + ios_base::iostate& __err, string_type& __digits) const + { return this->do_get(__s, __end, __intl, __io, __err, __digits); } + + protected: + + virtual + ~money_get() { } +# 1469 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual iter_type + do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, + ios_base::iostate& __err, long double& __units) const; +# 1481 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual iter_type + do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, + ios_base::iostate& __err, string_type& __digits) const; +# 1492 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + template + iter_type + _M_extract(iter_type __s, iter_type __end, ios_base& __io, + ios_base::iostate& __err, string& __digits) const; + }; + + template + locale::id money_get<_CharT, _InIter>::id; +# 1514 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + template + class money_put : public locale::facet + { + public: + + + typedef _CharT char_type; + typedef _OutIter iter_type; + typedef basic_string<_CharT> string_type; + + + + static locale::id id; +# 1535 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + explicit + money_put(size_t __refs = 0) : facet(__refs) { } +# 1555 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + iter_type + put(iter_type __s, bool __intl, ios_base& __io, + char_type __fill, long double __units) const + { return this->do_put(__s, __intl, __io, __fill, __units); } +# 1578 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + iter_type + put(iter_type __s, bool __intl, ios_base& __io, + char_type __fill, const string_type& __digits) const + { return this->do_put(__s, __intl, __io, __fill, __digits); } + + protected: + + virtual + ~money_put() { } +# 1612 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual iter_type + do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, + long double __units) const; +# 1636 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual iter_type + do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, + const string_type& __digits) const; +# 1647 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + template + iter_type + _M_insert(iter_type __s, ios_base& __io, char_type __fill, + const string_type& __digits) const; + }; + + template + locale::id money_put<_CharT, _OutIter>::id; + + + + + + + + struct messages_base + { + typedef int catalog; + }; +# 1688 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + template + class messages : public locale::facet, public messages_base + { + public: + + + + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + + protected: + + + __c_locale _M_c_locale_messages; + const char* _M_name_messages; + + public: + + static locale::id id; +# 1716 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + explicit + messages(size_t __refs = 0); +# 1730 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + explicit + messages(__c_locale __cloc, const char* __s, size_t __refs = 0); +# 1743 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + catalog + open(const basic_string& __s, const locale& __loc) const + { return this->do_open(__s, __loc); } +# 1761 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + catalog + open(const basic_string&, const locale&, const char*) const; +# 1779 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + string_type + get(catalog __c, int __set, int __msgid, const string_type& __s) const + { return this->do_get(__c, __set, __msgid, __s); } +# 1790 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + void + close(catalog __c) const + { return this->do_close(__c); } + + protected: + + virtual + ~messages(); +# 1810 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual catalog + do_open(const basic_string&, const locale&) const; +# 1829 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual string_type + do_get(catalog, int, int, const string_type& __dfault) const; + + + + + + + virtual void + do_close(catalog) const; + + + char* + _M_convert_to_char(const string_type& __msg) const + { + + return reinterpret_cast(const_cast<_CharT*>(__msg.c_str())); + } + + + string_type + _M_convert_from_char(char*) const + { +# 1886 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 3 + return string_type(); + } + }; + + template + locale::id messages<_CharT>::id; + + + template<> + string + messages::do_get(catalog, int, int, const string&) const; + + + template<> + wstring + messages::do_get(catalog, int, int, const wstring&) const; + + + + template + class messages_byname : public messages<_CharT> + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + explicit + messages_byname(const char* __s, size_t __refs = 0); + + protected: + virtual + ~messages_byname() + { } + }; + +} + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/messages_members.h" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/messages_members.h" 3 +# 1 "/usr/include/libintl.h" 1 3 4 +# 35 "/usr/include/libintl.h" 3 4 +extern "C" { + + + + +extern char *gettext (__const char *__msgid) + throw () __attribute__ ((__format_arg__ (1))); + + + +extern char *dgettext (__const char *__domainname, __const char *__msgid) + throw () __attribute__ ((__format_arg__ (2))); +extern char *__dgettext (__const char *__domainname, __const char *__msgid) + throw () __attribute__ ((__format_arg__ (2))); + + + +extern char *dcgettext (__const char *__domainname, + __const char *__msgid, int __category) + throw () __attribute__ ((__format_arg__ (2))); +extern char *__dcgettext (__const char *__domainname, + __const char *__msgid, int __category) + throw () __attribute__ ((__format_arg__ (2))); + + + + +extern char *ngettext (__const char *__msgid1, __const char *__msgid2, + unsigned long int __n) + throw () __attribute__ ((__format_arg__ (1))) __attribute__ ((__format_arg__ (2))); + + + +extern char *dngettext (__const char *__domainname, __const char *__msgid1, + __const char *__msgid2, unsigned long int __n) + throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); + + + +extern char *dcngettext (__const char *__domainname, __const char *__msgid1, + __const char *__msgid2, unsigned long int __n, + int __category) + throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); + + + + + +extern char *textdomain (__const char *__domainname) throw (); + + + +extern char *bindtextdomain (__const char *__domainname, + __const char *__dirname) throw (); + + + +extern char *bind_textdomain_codeset (__const char *__domainname, + __const char *__codeset) throw (); +# 122 "/usr/include/libintl.h" 3 4 +} +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/x86_64-pc-linux-gnu/bits/messages_members.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + template + messages<_CharT>::messages(size_t __refs) + : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), + _M_name_messages(_S_get_c_name()) + { } + + template + messages<_CharT>::messages(__c_locale __cloc, const char* __s, + size_t __refs) + : facet(__refs), _M_c_locale_messages(__null), _M_name_messages(__null) + { + if (__builtin_strcmp(__s, _S_get_c_name()) != 0) + { + const size_t __len = __builtin_strlen(__s) + 1; + char* __tmp = new char[__len]; + __builtin_memcpy(__tmp, __s, __len); + _M_name_messages = __tmp; + } + else + _M_name_messages = _S_get_c_name(); + + + _M_c_locale_messages = _S_clone_c_locale(__cloc); + } + + template + typename messages<_CharT>::catalog + messages<_CharT>::open(const basic_string& __s, const locale& __loc, + const char* __dir) const + { + bindtextdomain(__s.c_str(), __dir); + return this->do_open(__s, __loc); + } + + + template + messages<_CharT>::~messages() + { + if (_M_name_messages != _S_get_c_name()) + delete [] _M_name_messages; + _S_destroy_c_locale(_M_c_locale_messages); + } + + template + typename messages<_CharT>::catalog + messages<_CharT>::do_open(const basic_string& __s, + const locale&) const + { + + + textdomain(__s.c_str()); + return 0; + } + + template + void + messages<_CharT>::do_close(catalog) const + { } + + + template + messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) + : messages<_CharT>(__refs) + { + if (this->_M_name_messages != locale::facet::_S_get_c_name()) + { + delete [] this->_M_name_messages; + if (__builtin_strcmp(__s, locale::facet::_S_get_c_name()) != 0) + { + const size_t __len = __builtin_strlen(__s) + 1; + char* __tmp = new char[__len]; + __builtin_memcpy(__tmp, __s, __len); + this->_M_name_messages = __tmp; + } + else + this->_M_name_messages = locale::facet::_S_get_c_name(); + } + + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + this->_S_destroy_c_locale(this->_M_c_locale_messages); + this->_S_create_c_locale(this->_M_c_locale_messages, __s); + } + } + +} +# 1925 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 2 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/codecvt.h" 1 3 +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/codecvt.h" 3 + +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/codecvt.h" 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + class codecvt_base + { + public: + enum result + { + ok, + partial, + error, + noconv + }; + }; +# 66 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/codecvt.h" 3 + template + class __codecvt_abstract_base + : public locale::facet, public codecvt_base + { + public: + + typedef codecvt_base::result result; + typedef _InternT intern_type; + typedef _ExternT extern_type; + typedef _StateT state_type; +# 114 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/codecvt.h" 3 + result + out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const + { + return this->do_out(__state, __from, __from_end, __from_next, + __to, __to_end, __to_next); + } +# 153 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/codecvt.h" 3 + result + unshift(state_type& __state, extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const + { return this->do_unshift(__state, __to,__to_end,__to_next); } +# 194 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/codecvt.h" 3 + result + in(state_type& __state, const extern_type* __from, + const extern_type* __from_end, const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const + { + return this->do_in(__state, __from, __from_end, __from_next, + __to, __to_end, __to_next); + } + + int + encoding() const throw() + { return this->do_encoding(); } + + bool + always_noconv() const throw() + { return this->do_always_noconv(); } + + int + length(state_type& __state, const extern_type* __from, + const extern_type* __end, size_t __max) const + { return this->do_length(__state, __from, __end, __max); } + + int + max_length() const throw() + { return this->do_max_length(); } + + protected: + explicit + __codecvt_abstract_base(size_t __refs = 0) : locale::facet(__refs) { } + + virtual + ~__codecvt_abstract_base() { } +# 235 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/codecvt.h" 3 + virtual result + do_out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const = 0; + + virtual result + do_unshift(state_type& __state, extern_type* __to, + extern_type* __to_end, extern_type*& __to_next) const = 0; + + virtual result + do_in(state_type& __state, const extern_type* __from, + const extern_type* __from_end, const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const = 0; + + virtual int + do_encoding() const throw() = 0; + + virtual bool + do_always_noconv() const throw() = 0; + + virtual int + do_length(state_type&, const extern_type* __from, + const extern_type* __end, size_t __max) const = 0; + + virtual int + do_max_length() const throw() = 0; + }; +# 274 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/codecvt.h" 3 + template + class codecvt + : public __codecvt_abstract_base<_InternT, _ExternT, _StateT> + { + public: + + typedef codecvt_base::result result; + typedef _InternT intern_type; + typedef _ExternT extern_type; + typedef _StateT state_type; + + protected: + __c_locale _M_c_locale_codecvt; + + public: + static locale::id id; + + explicit + codecvt(size_t __refs = 0) + : __codecvt_abstract_base<_InternT, _ExternT, _StateT> (__refs) { } + + explicit + codecvt(__c_locale __cloc, size_t __refs = 0); + + protected: + virtual + ~codecvt() { } + + virtual result + do_out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const; + + virtual result + do_unshift(state_type& __state, extern_type* __to, + extern_type* __to_end, extern_type*& __to_next) const; + + virtual result + do_in(state_type& __state, const extern_type* __from, + const extern_type* __from_end, const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const; + + virtual int + do_encoding() const throw(); + + virtual bool + do_always_noconv() const throw(); + + virtual int + do_length(state_type&, const extern_type* __from, + const extern_type* __end, size_t __max) const; + + virtual int + do_max_length() const throw(); + }; + + template + locale::id codecvt<_InternT, _ExternT, _StateT>::id; + + + template<> + class codecvt + : public __codecvt_abstract_base + { + public: + + typedef char intern_type; + typedef char extern_type; + typedef mbstate_t state_type; + + protected: + __c_locale _M_c_locale_codecvt; + + public: + static locale::id id; + + explicit + codecvt(size_t __refs = 0); + + explicit + codecvt(__c_locale __cloc, size_t __refs = 0); + + protected: + virtual + ~codecvt(); + + virtual result + do_out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const; + + virtual result + do_unshift(state_type& __state, extern_type* __to, + extern_type* __to_end, extern_type*& __to_next) const; + + virtual result + do_in(state_type& __state, const extern_type* __from, + const extern_type* __from_end, const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const; + + virtual int + do_encoding() const throw(); + + virtual bool + do_always_noconv() const throw(); + + virtual int + do_length(state_type&, const extern_type* __from, + const extern_type* __end, size_t __max) const; + + virtual int + do_max_length() const throw(); + }; + + + + template<> + class codecvt + : public __codecvt_abstract_base + { + public: + + typedef wchar_t intern_type; + typedef char extern_type; + typedef mbstate_t state_type; + + protected: + __c_locale _M_c_locale_codecvt; + + public: + static locale::id id; + + explicit + codecvt(size_t __refs = 0); + + explicit + codecvt(__c_locale __cloc, size_t __refs = 0); + + protected: + virtual + ~codecvt(); + + virtual result + do_out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const; + + virtual result + do_unshift(state_type& __state, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const; + + virtual result + do_in(state_type& __state, + const extern_type* __from, const extern_type* __from_end, + const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const; + + virtual + int do_encoding() const throw(); + + virtual + bool do_always_noconv() const throw(); + + virtual + int do_length(state_type&, const extern_type* __from, + const extern_type* __end, size_t __max) const; + + virtual int + do_max_length() const throw(); + }; + + + + template + class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT> + { + public: + explicit + codecvt_byname(const char* __s, size_t __refs = 0) + : codecvt<_InternT, _ExternT, _StateT>(__refs) + { + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + this->_S_destroy_c_locale(this->_M_c_locale_codecvt); + this->_S_create_c_locale(this->_M_c_locale_codecvt, __s); + } + } + + protected: + virtual + ~codecvt_byname() { } + }; + + + + + + extern template class codecvt_byname; + + extern template + const codecvt& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + extern template class codecvt_byname; + + extern template + const codecvt& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + +} +# 1928 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 2 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.tcc" 1 3 +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.tcc" 3 + +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.tcc" 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + struct __use_cache<__moneypunct_cache<_CharT, _Intl> > + { + const __moneypunct_cache<_CharT, _Intl>* + operator() (const locale& __loc) const + { + const size_t __i = moneypunct<_CharT, _Intl>::id._M_id(); + const locale::facet** __caches = __loc._M_impl->_M_caches; + if (!__caches[__i]) + { + __moneypunct_cache<_CharT, _Intl>* __tmp = __null; + try + { + __tmp = new __moneypunct_cache<_CharT, _Intl>; + __tmp->_M_cache(__loc); + } + catch(...) + { + delete __tmp; + throw; + } + __loc._M_impl->_M_install_cache(__tmp, __i); + } + return static_cast< + const __moneypunct_cache<_CharT, _Intl>*>(__caches[__i]); + } + }; + + template + void + __moneypunct_cache<_CharT, _Intl>::_M_cache(const locale& __loc) + { + _M_allocated = true; + + const moneypunct<_CharT, _Intl>& __mp = + use_facet >(__loc); + + _M_decimal_point = __mp.decimal_point(); + _M_thousands_sep = __mp.thousands_sep(); + _M_frac_digits = __mp.frac_digits(); + + char* __grouping = 0; + _CharT* __curr_symbol = 0; + _CharT* __positive_sign = 0; + _CharT* __negative_sign = 0; + try + { + _M_grouping_size = __mp.grouping().size(); + __grouping = new char[_M_grouping_size]; + __mp.grouping().copy(__grouping, _M_grouping_size); + _M_grouping = __grouping; + _M_use_grouping = (_M_grouping_size + && static_cast(_M_grouping[0]) > 0 + && (_M_grouping[0] + != __gnu_cxx::__numeric_traits::__max)); + + _M_curr_symbol_size = __mp.curr_symbol().size(); + __curr_symbol = new _CharT[_M_curr_symbol_size]; + __mp.curr_symbol().copy(__curr_symbol, _M_curr_symbol_size); + _M_curr_symbol = __curr_symbol; + + _M_positive_sign_size = __mp.positive_sign().size(); + __positive_sign = new _CharT[_M_positive_sign_size]; + __mp.positive_sign().copy(__positive_sign, _M_positive_sign_size); + _M_positive_sign = __positive_sign; + + _M_negative_sign_size = __mp.negative_sign().size(); + __negative_sign = new _CharT[_M_negative_sign_size]; + __mp.negative_sign().copy(__negative_sign, _M_negative_sign_size); + _M_negative_sign = __negative_sign; + + _M_pos_format = __mp.pos_format(); + _M_neg_format = __mp.neg_format(); + + const ctype<_CharT>& __ct = use_facet >(__loc); + __ct.widen(money_base::_S_atoms, + money_base::_S_atoms + money_base::_S_end, _M_atoms); + } + catch(...) + { + delete [] __grouping; + delete [] __curr_symbol; + delete [] __positive_sign; + delete [] __negative_sign; + throw; + } + } + + + + template + template + _InIter + money_get<_CharT, _InIter>:: + _M_extract(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, string& __units) const + { + typedef char_traits<_CharT> __traits_type; + typedef typename string_type::size_type size_type; + typedef money_base::part part; + typedef __moneypunct_cache<_CharT, _Intl> __cache_type; + + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + + __use_cache<__cache_type> __uc; + const __cache_type* __lc = __uc(__loc); + const char_type* __lit = __lc->_M_atoms; + + + bool __negative = false; + + size_type __sign_size = 0; + + const bool __mandatory_sign = (__lc->_M_positive_sign_size + && __lc->_M_negative_sign_size); + + string __grouping_tmp; + if (__lc->_M_use_grouping) + __grouping_tmp.reserve(32); + + int __last_pos = 0; + + int __n = 0; + + bool __testvalid = true; + + bool __testdecfound = false; + + + string __res; + __res.reserve(32); + + const char_type* __lit_zero = __lit + money_base::_S_zero; + const money_base::pattern __p = __lc->_M_neg_format; + for (int __i = 0; __i < 4 && __testvalid; ++__i) + { + const part __which = static_cast(__p.field[__i]); + switch (__which) + { + case money_base::symbol: + + + + + if (__io.flags() & ios_base::showbase || __sign_size > 1 + || __i == 0 + || (__i == 1 && (__mandatory_sign + || (static_cast(__p.field[0]) + == money_base::sign) + || (static_cast(__p.field[2]) + == money_base::space))) + || (__i == 2 && ((static_cast(__p.field[3]) + == money_base::value) + || (__mandatory_sign + && (static_cast(__p.field[3]) + == money_base::sign))))) + { + const size_type __len = __lc->_M_curr_symbol_size; + size_type __j = 0; + for (; __beg != __end && __j < __len + && *__beg == __lc->_M_curr_symbol[__j]; + ++__beg, ++__j); + if (__j != __len + && (__j || __io.flags() & ios_base::showbase)) + __testvalid = false; + } + break; + case money_base::sign: + + if (__lc->_M_positive_sign_size && __beg != __end + && *__beg == __lc->_M_positive_sign[0]) + { + __sign_size = __lc->_M_positive_sign_size; + ++__beg; + } + else if (__lc->_M_negative_sign_size && __beg != __end + && *__beg == __lc->_M_negative_sign[0]) + { + __negative = true; + __sign_size = __lc->_M_negative_sign_size; + ++__beg; + } + else if (__lc->_M_positive_sign_size + && !__lc->_M_negative_sign_size) + + + __negative = true; + else if (__mandatory_sign) + __testvalid = false; + break; + case money_base::value: + + + for (; __beg != __end; ++__beg) + { + const char_type __c = *__beg; + const char_type* __q = __traits_type::find(__lit_zero, + 10, __c); + if (__q != 0) + { + __res += money_base::_S_atoms[__q - __lit]; + ++__n; + } + else if (__c == __lc->_M_decimal_point + && !__testdecfound) + { + if (__lc->_M_frac_digits <= 0) + break; + + __last_pos = __n; + __n = 0; + __testdecfound = true; + } + else if (__lc->_M_use_grouping + && __c == __lc->_M_thousands_sep + && !__testdecfound) + { + if (__n) + { + + __grouping_tmp += static_cast(__n); + __n = 0; + } + else + { + __testvalid = false; + break; + } + } + else + break; + } + if (__res.empty()) + __testvalid = false; + break; + case money_base::space: + + if (__beg != __end && __ctype.is(ctype_base::space, *__beg)) + ++__beg; + else + __testvalid = false; + case money_base::none: + + if (__i != 3) + for (; __beg != __end + && __ctype.is(ctype_base::space, *__beg); ++__beg); + break; + } + } + + + if (__sign_size > 1 && __testvalid) + { + const char_type* __sign = __negative ? __lc->_M_negative_sign + : __lc->_M_positive_sign; + size_type __i = 1; + for (; __beg != __end && __i < __sign_size + && *__beg == __sign[__i]; ++__beg, ++__i); + + if (__i != __sign_size) + __testvalid = false; + } + + if (__testvalid) + { + + if (__res.size() > 1) + { + const size_type __first = __res.find_first_not_of('0'); + const bool __only_zeros = __first == string::npos; + if (__first) + __res.erase(0, __only_zeros ? __res.size() - 1 : __first); + } + + + if (__negative && __res[0] != '0') + __res.insert(__res.begin(), '-'); + + + if (__grouping_tmp.size()) + { + + __grouping_tmp += static_cast(__testdecfound ? __last_pos + : __n); + if (!std::__verify_grouping(__lc->_M_grouping, + __lc->_M_grouping_size, + __grouping_tmp)) + __err |= ios_base::failbit; + } + + + if (__testdecfound && __n != __lc->_M_frac_digits) + __testvalid = false; + } + + + if (!__testvalid) + __err |= ios_base::failbit; + else + __units.swap(__res); + + + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } +# 360 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.tcc" 3 + template + _InIter + money_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, + ios_base::iostate& __err, long double& __units) const + { + string __str; + __beg = __intl ? _M_extract(__beg, __end, __io, __err, __str) + : _M_extract(__beg, __end, __io, __err, __str); + std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale()); + return __beg; + } + + template + _InIter + money_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, + ios_base::iostate& __err, string_type& __digits) const + { + typedef typename string::size_type size_type; + + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + + string __str; + __beg = __intl ? _M_extract(__beg, __end, __io, __err, __str) + : _M_extract(__beg, __end, __io, __err, __str); + const size_type __len = __str.size(); + if (__len) + { + __digits.resize(__len); + __ctype.widen(__str.data(), __str.data() + __len, &__digits[0]); + } + return __beg; + } + + template + template + _OutIter + money_put<_CharT, _OutIter>:: + _M_insert(iter_type __s, ios_base& __io, char_type __fill, + const string_type& __digits) const + { + typedef typename string_type::size_type size_type; + typedef money_base::part part; + typedef __moneypunct_cache<_CharT, _Intl> __cache_type; + + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + + __use_cache<__cache_type> __uc; + const __cache_type* __lc = __uc(__loc); + const char_type* __lit = __lc->_M_atoms; + + + + const char_type* __beg = __digits.data(); + + money_base::pattern __p; + const char_type* __sign; + size_type __sign_size; + if (!(*__beg == __lit[money_base::_S_minus])) + { + __p = __lc->_M_pos_format; + __sign = __lc->_M_positive_sign; + __sign_size = __lc->_M_positive_sign_size; + } + else + { + __p = __lc->_M_neg_format; + __sign = __lc->_M_negative_sign; + __sign_size = __lc->_M_negative_sign_size; + if (__digits.size()) + ++__beg; + } + + + size_type __len = __ctype.scan_not(ctype_base::digit, __beg, + __beg + __digits.size()) - __beg; + if (__len) + { + + + + string_type __value; + __value.reserve(2 * __len); + + + + long __paddec = __len - __lc->_M_frac_digits; + if (__paddec > 0) + { + if (__lc->_M_frac_digits < 0) + __paddec = __len; + if (__lc->_M_grouping_size) + { + __value.assign(2 * __paddec, char_type()); + _CharT* __vend = + std::__add_grouping(&__value[0], __lc->_M_thousands_sep, + __lc->_M_grouping, + __lc->_M_grouping_size, + __beg, __beg + __paddec); + __value.erase(__vend - &__value[0]); + } + else + __value.assign(__beg, __paddec); + } + + + if (__lc->_M_frac_digits > 0) + { + __value += __lc->_M_decimal_point; + if (__paddec >= 0) + __value.append(__beg + __paddec, __lc->_M_frac_digits); + else + { + + __value.append(-__paddec, __lit[money_base::_S_zero]); + __value.append(__beg, __len); + } + } + + + const ios_base::fmtflags __f = __io.flags() + & ios_base::adjustfield; + __len = __value.size() + __sign_size; + __len += ((__io.flags() & ios_base::showbase) + ? __lc->_M_curr_symbol_size : 0); + + string_type __res; + __res.reserve(2 * __len); + + const size_type __width = static_cast(__io.width()); + const bool __testipad = (__f == ios_base::internal + && __len < __width); + + for (int __i = 0; __i < 4; ++__i) + { + const part __which = static_cast(__p.field[__i]); + switch (__which) + { + case money_base::symbol: + if (__io.flags() & ios_base::showbase) + __res.append(__lc->_M_curr_symbol, + __lc->_M_curr_symbol_size); + break; + case money_base::sign: + + + + if (__sign_size) + __res += __sign[0]; + break; + case money_base::value: + __res += __value; + break; + case money_base::space: + + + + if (__testipad) + __res.append(__width - __len, __fill); + else + __res += __fill; + break; + case money_base::none: + if (__testipad) + __res.append(__width - __len, __fill); + break; + } + } + + + if (__sign_size > 1) + __res.append(__sign + 1, __sign_size - 1); + + + __len = __res.size(); + if (__width > __len) + { + if (__f == ios_base::left) + + __res.append(__width - __len, __fill); + else + + __res.insert(0, __width - __len, __fill); + __len = __width; + } + + + __s = std::__write(__s, __res.data(), __len); + } + __io.width(0); + return __s; + } +# 565 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.tcc" 3 + template + _OutIter + money_put<_CharT, _OutIter>:: + do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, + long double __units) const + { + const locale __loc = __io.getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + + + int __cs_size = 64; + char* __cs = static_cast(__builtin_alloca(__cs_size)); + + + int __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, + "%.*Lf", 0, __units); + + if (__len >= __cs_size) + { + __cs_size = __len + 1; + __cs = static_cast(__builtin_alloca(__cs_size)); + __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, + "%.*Lf", 0, __units); + } +# 597 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.tcc" 3 + string_type __digits(__len, char_type()); + __ctype.widen(__cs, __cs + __len, &__digits[0]); + return __intl ? _M_insert(__s, __io, __fill, __digits) + : _M_insert(__s, __io, __fill, __digits); + } + + template + _OutIter + money_put<_CharT, _OutIter>:: + do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, + const string_type& __digits) const + { return __intl ? _M_insert(__s, __io, __fill, __digits) + : _M_insert(__s, __io, __fill, __digits); } + + + + + + + template + time_base::dateorder + time_get<_CharT, _InIter>::do_date_order() const + { return time_base::no_order; } + + + + template + _InIter + time_get<_CharT, _InIter>:: + _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm, + const _CharT* __format) const + { + const locale& __loc = __io._M_getloc(); + const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); + const ctype<_CharT>& __ctype = use_facet >(__loc); + const size_t __len = char_traits<_CharT>::length(__format); + + ios_base::iostate __tmperr = ios_base::goodbit; + for (size_t __i = 0; __beg != __end && __i < __len && !__tmperr; ++__i) + { + if (__ctype.narrow(__format[__i], 0) == '%') + { + + char __c = __ctype.narrow(__format[++__i], 0); + int __mem = 0; + if (__c == 'E' || __c == 'O') + __c = __ctype.narrow(__format[++__i], 0); + switch (__c) + { + const char* __cs; + _CharT __wcs[10]; + case 'a': + + const char_type* __days1[7]; + __tp._M_days_abbreviated(__days1); + __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days1, + 7, __io, __tmperr); + break; + case 'A': + + const char_type* __days2[7]; + __tp._M_days(__days2); + __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days2, + 7, __io, __tmperr); + break; + case 'h': + case 'b': + + const char_type* __months1[12]; + __tp._M_months_abbreviated(__months1); + __beg = _M_extract_name(__beg, __end, __tm->tm_mon, + __months1, 12, __io, __tmperr); + break; + case 'B': + + const char_type* __months2[12]; + __tp._M_months(__months2); + __beg = _M_extract_name(__beg, __end, __tm->tm_mon, + __months2, 12, __io, __tmperr); + break; + case 'c': + + const char_type* __dt[2]; + __tp._M_date_time_formats(__dt); + __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, + __tm, __dt[0]); + break; + case 'd': + + __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 1, 31, 2, + __io, __tmperr); + break; + case 'e': + + + if (__ctype.is(ctype_base::space, *__beg)) + __beg = _M_extract_num(++__beg, __end, __tm->tm_mday, 1, 9, + 1, __io, __tmperr); + else + __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 10, 31, + 2, __io, __tmperr); + break; + case 'D': + + __cs = "%m/%d/%y"; + __ctype.widen(__cs, __cs + 9, __wcs); + __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, + __tm, __wcs); + break; + case 'H': + + __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 0, 23, 2, + __io, __tmperr); + break; + case 'I': + + __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 1, 12, 2, + __io, __tmperr); + break; + case 'm': + + __beg = _M_extract_num(__beg, __end, __mem, 1, 12, 2, + __io, __tmperr); + if (!__tmperr) + __tm->tm_mon = __mem - 1; + break; + case 'M': + + __beg = _M_extract_num(__beg, __end, __tm->tm_min, 0, 59, 2, + __io, __tmperr); + break; + case 'n': + if (__ctype.narrow(*__beg, 0) == '\n') + ++__beg; + else + __tmperr |= ios_base::failbit; + break; + case 'R': + + __cs = "%H:%M"; + __ctype.widen(__cs, __cs + 6, __wcs); + __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, + __tm, __wcs); + break; + case 'S': + + + + __beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 60, 2, + + + + __io, __tmperr); + break; + case 't': + if (__ctype.narrow(*__beg, 0) == '\t') + ++__beg; + else + __tmperr |= ios_base::failbit; + break; + case 'T': + + __cs = "%H:%M:%S"; + __ctype.widen(__cs, __cs + 9, __wcs); + __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, + __tm, __wcs); + break; + case 'x': + + const char_type* __dates[2]; + __tp._M_date_formats(__dates); + __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, + __tm, __dates[0]); + break; + case 'X': + + const char_type* __times[2]; + __tp._M_time_formats(__times); + __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, + __tm, __times[0]); + break; + case 'y': + case 'C': + + case 'Y': + + + + + __beg = _M_extract_num(__beg, __end, __mem, 0, 9999, 4, + __io, __tmperr); + if (!__tmperr) + __tm->tm_year = __mem < 0 ? __mem + 100 : __mem - 1900; + break; + case 'Z': + + if (__ctype.is(ctype_base::upper, *__beg)) + { + int __tmp; + __beg = _M_extract_name(__beg, __end, __tmp, + __timepunct_cache<_CharT>::_S_timezones, + 14, __io, __tmperr); + + + if (__beg != __end && !__tmperr && __tmp == 0 + && (*__beg == __ctype.widen('-') + || *__beg == __ctype.widen('+'))) + { + __beg = _M_extract_num(__beg, __end, __tmp, 0, 23, 2, + __io, __tmperr); + __beg = _M_extract_num(__beg, __end, __tmp, 0, 59, 2, + __io, __tmperr); + } + } + else + __tmperr |= ios_base::failbit; + break; + default: + + __tmperr |= ios_base::failbit; + } + } + else + { + + if (__format[__i] == *__beg) + ++__beg; + else + __tmperr |= ios_base::failbit; + } + } + + if (__tmperr) + __err |= ios_base::failbit; + + return __beg; + } + + template + _InIter + time_get<_CharT, _InIter>:: + _M_extract_num(iter_type __beg, iter_type __end, int& __member, + int __min, int __max, size_t __len, + ios_base& __io, ios_base::iostate& __err) const + { + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + + + int __mult = __len == 2 ? 10 : (__len == 4 ? 1000 : 1); + + ++__min; + size_t __i = 0; + int __value = 0; + for (; __beg != __end && __i < __len; ++__beg, ++__i) + { + const char __c = __ctype.narrow(*__beg, '*'); + if (__c >= '0' && __c <= '9') + { + __value = __value * 10 + (__c - '0'); + const int __valuec = __value * __mult; + if (__valuec > __max || __valuec + __mult < __min) + break; + __mult /= 10; + } + else + break; + } + if (__i == __len) + __member = __value; + + else if (__len == 4 && __i == 2) + __member = __value - 100; + else + __err |= ios_base::failbit; + + return __beg; + } + + + + template + _InIter + time_get<_CharT, _InIter>:: + _M_extract_name(iter_type __beg, iter_type __end, int& __member, + const _CharT** __names, size_t __indexlen, + ios_base& __io, ios_base::iostate& __err) const + { + typedef char_traits<_CharT> __traits_type; + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + + int* __matches = static_cast(__builtin_alloca(sizeof(int) + * __indexlen)); + size_t __nmatches = 0; + size_t __pos = 0; + bool __testvalid = true; + const char_type* __name; + + + + + + if (__beg != __end) + { + const char_type __c = *__beg; + for (size_t __i1 = 0; __i1 < __indexlen; ++__i1) + if (__c == __names[__i1][0] + || __c == __ctype.toupper(__names[__i1][0])) + __matches[__nmatches++] = __i1; + } + + while (__nmatches > 1) + { + + size_t __minlen = __traits_type::length(__names[__matches[0]]); + for (size_t __i2 = 1; __i2 < __nmatches; ++__i2) + __minlen = std::min(__minlen, + __traits_type::length(__names[__matches[__i2]])); + ++__beg, ++__pos; + if (__pos < __minlen && __beg != __end) + for (size_t __i3 = 0; __i3 < __nmatches;) + { + __name = __names[__matches[__i3]]; + if (!(__name[__pos] == *__beg)) + __matches[__i3] = __matches[--__nmatches]; + else + ++__i3; + } + else + break; + } + + if (__nmatches == 1) + { + + ++__beg, ++__pos; + __name = __names[__matches[0]]; + const size_t __len = __traits_type::length(__name); + while (__pos < __len && __beg != __end && __name[__pos] == *__beg) + ++__beg, ++__pos; + + if (__len == __pos) + __member = __matches[0]; + else + __testvalid = false; + } + else + __testvalid = false; + if (!__testvalid) + __err |= ios_base::failbit; + + return __beg; + } + + template + _InIter + time_get<_CharT, _InIter>:: + _M_extract_wday_or_month(iter_type __beg, iter_type __end, int& __member, + const _CharT** __names, size_t __indexlen, + ios_base& __io, ios_base::iostate& __err) const + { + typedef char_traits<_CharT> __traits_type; + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + + int* __matches = static_cast(__builtin_alloca(2 * sizeof(int) + * __indexlen)); + size_t __nmatches = 0; + size_t* __matches_lengths = 0; + size_t __pos = 0; + + if (__beg != __end) + { + const char_type __c = *__beg; + for (size_t __i = 0; __i < 2 * __indexlen; ++__i) + if (__c == __names[__i][0] + || __c == __ctype.toupper(__names[__i][0])) + __matches[__nmatches++] = __i; + } + + if (__nmatches) + { + ++__beg, ++__pos; + + __matches_lengths + = static_cast(__builtin_alloca(sizeof(size_t) + * __nmatches)); + for (size_t __i = 0; __i < __nmatches; ++__i) + __matches_lengths[__i] + = __traits_type::length(__names[__matches[__i]]); + } + + for (; __beg != __end; ++__beg, ++__pos) + { + size_t __nskipped = 0; + const char_type __c = *__beg; + for (size_t __i = 0; __i < __nmatches;) + { + const char_type* __name = __names[__matches[__i]]; + if (__pos >= __matches_lengths[__i]) + ++__nskipped, ++__i; + else if (!(__name[__pos] == __c)) + { + --__nmatches; + __matches[__i] = __matches[__nmatches]; + __matches_lengths[__i] = __matches_lengths[__nmatches]; + } + else + ++__i; + } + if (__nskipped == __nmatches) + break; + } + + if ((__nmatches == 1 && __matches_lengths[0] == __pos) + || (__nmatches == 2 && (__matches_lengths[0] == __pos + || __matches_lengths[1] == __pos))) + __member = (__matches[0] >= __indexlen + ? __matches[0] - __indexlen : __matches[0]); + else + __err |= ios_base::failbit; + + return __beg; + } + + template + _InIter + time_get<_CharT, _InIter>:: + do_get_time(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { + const locale& __loc = __io._M_getloc(); + const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); + const char_type* __times[2]; + __tp._M_time_formats(__times); + __beg = _M_extract_via_format(__beg, __end, __io, __err, + __tm, __times[0]); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + + template + _InIter + time_get<_CharT, _InIter>:: + do_get_date(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { + const locale& __loc = __io._M_getloc(); + const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); + const char_type* __dates[2]; + __tp._M_date_formats(__dates); + __beg = _M_extract_via_format(__beg, __end, __io, __err, + __tm, __dates[0]); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + + template + _InIter + time_get<_CharT, _InIter>:: + do_get_weekday(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { + typedef char_traits<_CharT> __traits_type; + const locale& __loc = __io._M_getloc(); + const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); + const ctype<_CharT>& __ctype = use_facet >(__loc); + const char_type* __days[14]; + __tp._M_days_abbreviated(__days); + __tp._M_days(__days + 7); + int __tmpwday; + ios_base::iostate __tmperr = ios_base::goodbit; + + __beg = _M_extract_wday_or_month(__beg, __end, __tmpwday, __days, 7, + __io, __tmperr); + if (!__tmperr) + __tm->tm_wday = __tmpwday; + else + __err |= ios_base::failbit; + + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + + template + _InIter + time_get<_CharT, _InIter>:: + do_get_monthname(iter_type __beg, iter_type __end, + ios_base& __io, ios_base::iostate& __err, tm* __tm) const + { + typedef char_traits<_CharT> __traits_type; + const locale& __loc = __io._M_getloc(); + const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); + const ctype<_CharT>& __ctype = use_facet >(__loc); + const char_type* __months[24]; + __tp._M_months_abbreviated(__months); + __tp._M_months(__months + 12); + int __tmpmon; + ios_base::iostate __tmperr = ios_base::goodbit; + + __beg = _M_extract_wday_or_month(__beg, __end, __tmpmon, __months, 12, + __io, __tmperr); + if (!__tmperr) + __tm->tm_mon = __tmpmon; + else + __err |= ios_base::failbit; + + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + + template + _InIter + time_get<_CharT, _InIter>:: + do_get_year(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + int __tmpyear; + ios_base::iostate __tmperr = ios_base::goodbit; + + __beg = _M_extract_num(__beg, __end, __tmpyear, 0, 9999, 4, + __io, __tmperr); + if (!__tmperr) + __tm->tm_year = __tmpyear < 0 ? __tmpyear + 100 : __tmpyear - 1900; + else + __err |= ios_base::failbit; + + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + + template + _OutIter + time_put<_CharT, _OutIter>:: + put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, + const _CharT* __beg, const _CharT* __end) const + { + const locale& __loc = __io._M_getloc(); + ctype<_CharT> const& __ctype = use_facet >(__loc); + for (; __beg != __end; ++__beg) + if (__ctype.narrow(*__beg, 0) != '%') + { + *__s = *__beg; + ++__s; + } + else if (++__beg != __end) + { + char __format; + char __mod = 0; + const char __c = __ctype.narrow(*__beg, 0); + if (__c != 'E' && __c != 'O') + __format = __c; + else if (++__beg != __end) + { + __mod = __c; + __format = __ctype.narrow(*__beg, 0); + } + else + break; + __s = this->do_put(__s, __io, __fill, __tm, __format, __mod); + } + else + break; + return __s; + } + + template + _OutIter + time_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type, const tm* __tm, + char __format, char __mod) const + { + const locale& __loc = __io._M_getloc(); + ctype<_CharT> const& __ctype = use_facet >(__loc); + __timepunct<_CharT> const& __tp = use_facet<__timepunct<_CharT> >(__loc); + + + + const size_t __maxlen = 128; + char_type __res[__maxlen]; + + + + + + + char_type __fmt[4]; + __fmt[0] = __ctype.widen('%'); + if (!__mod) + { + __fmt[1] = __format; + __fmt[2] = char_type(); + } + else + { + __fmt[1] = __mod; + __fmt[2] = __format; + __fmt[3] = char_type(); + } + + __tp._M_put(__res, __maxlen, __fmt, __tm); + + + return std::__write(__s, __res, char_traits::length(__res)); + } + + + + + + + extern template class moneypunct; + extern template class moneypunct; + extern template class moneypunct_byname; + extern template class moneypunct_byname; + extern template class money_get; + extern template class money_put; + extern template class __timepunct; + extern template class time_put; + extern template class time_put_byname; + extern template class time_get; + extern template class time_get_byname; + extern template class messages; + extern template class messages_byname; + + extern template + const moneypunct& + use_facet >(const locale&); + + extern template + const moneypunct& + use_facet >(const locale&); + + extern template + const money_put& + use_facet >(const locale&); + + extern template + const money_get& + use_facet >(const locale&); + + extern template + const __timepunct& + use_facet<__timepunct >(const locale&); + + extern template + const time_put& + use_facet >(const locale&); + + extern template + const time_get& + use_facet >(const locale&); + + extern template + const messages& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet<__timepunct >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + extern template class moneypunct; + extern template class moneypunct; + extern template class moneypunct_byname; + extern template class moneypunct_byname; + extern template class money_get; + extern template class money_put; + extern template class __timepunct; + extern template class time_put; + extern template class time_put_byname; + extern template class time_get; + extern template class time_get_byname; + extern template class messages; + extern template class messages_byname; + + extern template + const moneypunct& + use_facet >(const locale&); + + extern template + const moneypunct& + use_facet >(const locale&); + + extern template + const money_put& + use_facet >(const locale&); + + extern template + const money_get& + use_facet >(const locale&); + + extern template + const __timepunct& + use_facet<__timepunct >(const locale&); + + extern template + const time_put& + use_facet >(const locale&); + + extern template + const time_get& + use_facet >(const locale&); + + extern template + const messages& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet<__timepunct >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + +} +# 1931 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/locale_facets_nonio.h" 2 3 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/locale" 2 3 +# 36 "/usr/include/boost-1_42/boost/lexical_cast.hpp" 2 +# 55 "/usr/include/boost-1_42/boost/lexical_cast.hpp" +namespace boost +{ + + class bad_lexical_cast : public std::bad_cast + + + + + + + { + public: + bad_lexical_cast() : + + source(&typeid(void)), target(&typeid(void)) + + + + { + } + + bad_lexical_cast( + const std::type_info &source_type_arg, + const std::type_info &target_type_arg) : + source(&source_type_arg), target(&target_type_arg) + { + } + + const std::type_info &source_type() const + { + return *source; + } + const std::type_info &target_type() const + { + return *target; + } + + virtual const char *what() const throw() + { + return "bad lexical cast: " + "source type value could not be interpreted as target"; + } + virtual ~bad_lexical_cast() throw() + { + } + private: + const std::type_info *source; + const std::type_info *target; + }; + + namespace detail + { + template + struct stream_char + { + typedef char type; + }; + + + template + struct stream_char< std::basic_string > + { + typedef CharT type; + }; + + + + + template<> + struct stream_char + { + typedef wchar_t type; + }; + + + template<> + struct stream_char + { + typedef wchar_t type; + }; + + template<> + struct stream_char + { + typedef wchar_t type; + }; +# 151 "/usr/include/boost-1_42/boost/lexical_cast.hpp" + template + struct widest_char + { + typedef TargetChar type; + }; + + template<> + struct widest_char + { + typedef wchar_t type; + }; + } + + namespace detail + { + + template + struct deduce_char_traits + { + typedef std::char_traits type; + }; + + template + struct deduce_char_traits< CharT + , std::basic_string + , Source + > + { + typedef Traits type; + }; + + template + struct deduce_char_traits< CharT + , Target + , std::basic_string + > + { + typedef Traits type; + }; + + template + struct deduce_char_traits< CharT + , std::basic_string + , std::basic_string + > + { + typedef Traits type; + }; + + } + + namespace detail + { +# 213 "/usr/include/boost-1_42/boost/lexical_cast.hpp" + template< class CharT + , class Source + > + struct lcast_src_length + { + static const std::size_t value = 0; + + + static void check_coverage() {} + }; + + template<> + struct lcast_src_length + { + static const std::size_t value = 1; + static void check_coverage() {} + }; + + template<> + struct lcast_src_length + { + static const std::size_t value = 1; + static void check_coverage() {} + }; +# 247 "/usr/include/boost-1_42/boost/lexical_cast.hpp" + template<> + struct lcast_src_length + { + static const std::size_t value = 1; + static void check_coverage() {} + }; + + template<> + struct lcast_src_length + { + static const std::size_t value = 1; + static void check_coverage() {} + }; + + + template<> + struct lcast_src_length + { + static const std::size_t value = 1; + static void check_coverage() {} + }; + + + + template<> + struct lcast_src_length + { + static const std::size_t value = 1; + static void check_coverage() {} + }; + + template<> + struct lcast_src_length + { + static const std::size_t value = 1; + static void check_coverage() {} + }; + + + template<> + struct lcast_src_length + { + static const std::size_t value = 1; + static void check_coverage() {} + }; + + template<> + struct lcast_src_length + { + static const std::size_t value = 1; + static void check_coverage() {} + }; + + + + template + struct lcast_src_length< CharT, std::basic_string > + { + static const std::size_t value = 1; + static void check_coverage() {} + }; +# 339 "/usr/include/boost-1_42/boost/lexical_cast.hpp" + template + struct lcast_src_length_integral + { + + static const std::size_t value = std::numeric_limits::is_signed + std::numeric_limits::is_specialized + std::numeric_limits::digits10 * 2 + + + + ; + + + + + }; +# 367 "/usr/include/boost-1_42/boost/lexical_cast.hpp" + template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; + template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; + template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; + template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; + template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; + template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; + + template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; + template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; +# 395 "/usr/include/boost-1_42/boost/lexical_cast.hpp" + template + struct lcast_src_length_floating + { + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((std::numeric_limits::max_exponent10 <= 999999L && std::numeric_limits::min_exponent10 >= -999999L) == 0 ? false : true) >)> + + + boost_static_assert_typedef_401; + static const std::size_t value = 5 + lcast_precision::value + 6 + + ; + }; + + template<> + struct lcast_src_length + : lcast_src_length_floating + { + static void check_coverage() {} + }; + + template<> + struct lcast_src_length + : lcast_src_length_floating + { + static void check_coverage() {} + }; + + template<> + struct lcast_src_length + : lcast_src_length_floating + { + static void check_coverage() {} + }; + + + template<> + struct lcast_src_length + : lcast_src_length_floating + { + static void check_coverage() {} + }; + + template<> + struct lcast_src_length + : lcast_src_length_floating + { + static void check_coverage() {} + }; + + template<> + struct lcast_src_length + : lcast_src_length_floating + { + static void check_coverage() {} + }; + + + + } + + namespace detail + { + template struct lcast_char_constants; + + template<> + struct lcast_char_constants + { + static const char zero = '0'; + static const char minus = '-'; + }; + + + template<> + struct lcast_char_constants + { + static const wchar_t zero = L'0'; + static const wchar_t minus = L'-'; + }; + + } + + namespace detail + { + struct lexical_streambuf_fake + { + }; + } + + namespace detail + { + + + + + + + + template + inline + typename make_unsigned::type lcast_to_unsigned(T value) + { + typedef typename make_unsigned::type result_type; + result_type uvalue = static_cast(value); + return value < 0 ? -uvalue : uvalue; + } + + + + + + } + + namespace detail + { + template + CharT* lcast_put_unsigned(T n, CharT* finish) + { + + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((!std::numeric_limits::is_signed) == 0 ? false : true) >)> boost_static_assert_typedef_512; + + + + + std::locale loc; + typedef std::numpunct numpunct; + numpunct const& np = std::use_facet< numpunct >(loc); + std::string const& grouping = np.grouping(); + std::string::size_type const grouping_size = grouping.size(); + CharT thousands_sep = grouping_size ? np.thousands_sep() : 0; + std::string::size_type group = 0; + char last_grp_size = grouping[0] <= 0 ? 127 : grouping[0]; + + + + + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((std::numeric_limits::digits10 < 127) == 0 ? false : true) >)> boost_static_assert_typedef_529; + + + char left = last_grp_size; + + + typedef typename Traits::int_type int_type; + CharT const czero = lcast_char_constants::zero; + int_type const zero = Traits::to_int_type(czero); + + do + { + + if(left == 0) + { + ++group; + if(group < grouping_size) + { + char const grp_size = grouping[group]; + last_grp_size = grp_size <= 0 ? 127 : grp_size; + } + + left = last_grp_size; + --finish; + Traits::assign(*finish, thousands_sep); + } + + --left; + + + --finish; + int_type const digit = static_cast(n % 10U); + Traits::assign(*finish, Traits::to_char_type(zero + digit)); + n /= 10; + } while(n); + + return finish; + } + } + + namespace detail + { + template + class lexical_stream + { + private: + typedef typename widest_char< + typename stream_char::type, + typename stream_char::type>::type char_type; + + typedef Traits traits_type; + + public: + lexical_stream(char_type* = 0, char_type* = 0) + { + stream.unsetf(std::ios::skipws); + lcast_set_precision(stream, static_cast(0), static_cast(0) ); + } + ~lexical_stream() + { + + + + } + bool operator<<(const Source &input) + { + return !(stream << input).fail(); + } + template + bool operator>>(InputStreamable &output) + { + return !is_pointer::value && + stream >> output && + stream.get() == + + + + + + + + traits_type::eof(); + + } +# 633 "/usr/include/boost-1_42/boost/lexical_cast.hpp" + bool operator>>(std::basic_string& output) + { + stream.str().swap(output); + return true; + } + + template + bool operator>>(std::basic_string& out) + { + std::basic_string str(stream.str()); + out.assign(str.begin(), str.end()); + return true; + } + + private: + + + + + + std::basic_stringstream stream; + + }; + } + + namespace detail + { + + template< class CharT + , class Base + , class Traits + > + class lexical_stream_limited_src : public Base + { + + + + CharT* start; + CharT* finish; + + private: + + static void widen_and_assign(char*p, char ch) + { + Traits::assign(*p, ch); + } + + + static void widen_and_assign(wchar_t* p, char ch) + { + + std::locale loc; + wchar_t w = std::use_facet< std::ctype >(loc).widen(ch); + Traits::assign(*p, w); + } + + static void widen_and_assign(wchar_t* p, wchar_t ch) + { + Traits::assign(*p, ch); + } + + static void widen_and_assign(char*, wchar_t ch); + + + template + bool lcast_put(const OutputStreamable& input) + { + this->setp(start, finish); + std::basic_ostream stream(static_cast(this)); + lcast_set_precision(stream, static_cast(0)); + bool const result = !(stream << input).fail(); + finish = this->pptr(); + return result; + } + + + lexical_stream_limited_src(lexical_stream_limited_src const&); + void operator=(lexical_stream_limited_src const&); + + public: + + lexical_stream_limited_src(CharT* sta, CharT* fin) + : start(sta) + , finish(fin) + {} + + public: + + template + bool operator<<(std::basic_string const& str) + { + start = const_cast(str.data()); + finish = start + str.length(); + return true; + } + + bool operator<<(bool); + bool operator<<(char); + + bool operator<<(wchar_t); + + bool operator<<(CharT const*); + bool operator<<(short); + bool operator<<(int); + bool operator<<(long); + bool operator<<(unsigned short); + bool operator<<(unsigned int); + bool operator<<(unsigned long); + + bool operator<<(boost::ulong_long_type); + bool operator<<(boost::long_long_type ); + + + + + + + bool operator<<(float); + bool operator<<(double); + bool operator<<(long double); + + public: + + + + template + bool operator>>(InputStreamable& output) + { + + + + + + if(is_pointer::value) + return false; + + this->setg(start, start, finish); + std::basic_istream stream(static_cast(this)); + stream.unsetf(std::ios::skipws); + lcast_set_precision(stream, static_cast(0)); + + + + return stream >> output && + stream.get() == + + + + + + + + Traits::eof(); + + } + + bool operator>>(CharT&); +# 801 "/usr/include/boost-1_42/boost/lexical_cast.hpp" + template + bool operator>>(std::basic_string& str) + { + str.assign(start, finish); + return true; + } + + }; + + template + inline bool lexical_stream_limited_src::operator<<( + bool value) + { + typedef typename Traits::int_type int_type; + CharT const czero = lcast_char_constants::zero; + int_type const zero = Traits::to_int_type(czero); + Traits::assign(*start, Traits::to_char_type(zero + value)); + finish = start + 1; + return true; + } + + template + inline bool lexical_stream_limited_src::operator<<( + char ch) + { + widen_and_assign(start, ch); + finish = start + 1; + return true; + } + + + template + inline bool lexical_stream_limited_src::operator<<( + wchar_t ch) + { + widen_and_assign(start, ch); + finish = start + 1; + return true; + } + + + template + inline bool lexical_stream_limited_src::operator<<( + short n) + { + start = lcast_put_unsigned(lcast_to_unsigned(n), finish); + if(n < 0) + { + --start; + CharT const minus = lcast_char_constants::minus; + Traits::assign(*start, minus); + } + return true; + } + + template + inline bool lexical_stream_limited_src::operator<<( + int n) + { + start = lcast_put_unsigned(lcast_to_unsigned(n), finish); + if(n < 0) + { + --start; + CharT const minus = lcast_char_constants::minus; + Traits::assign(*start, minus); + } + return true; + } + + template + inline bool lexical_stream_limited_src::operator<<( + long n) + { + start = lcast_put_unsigned(lcast_to_unsigned(n), finish); + if(n < 0) + { + --start; + CharT const minus = lcast_char_constants::minus; + Traits::assign(*start, minus); + } + return true; + } + + + template + inline bool lexical_stream_limited_src::operator<<( + boost::long_long_type n) + { + start = lcast_put_unsigned(lcast_to_unsigned(n), finish); + if(n < 0) + { + --start; + CharT const minus = lcast_char_constants::minus; + Traits::assign(*start, minus); + } + return true; + } +# 914 "/usr/include/boost-1_42/boost/lexical_cast.hpp" + template + inline bool lexical_stream_limited_src::operator<<( + unsigned short n) + { + start = lcast_put_unsigned(n, finish); + return true; + } + + template + inline bool lexical_stream_limited_src::operator<<( + unsigned int n) + { + start = lcast_put_unsigned(n, finish); + return true; + } + + template + inline bool lexical_stream_limited_src::operator<<( + unsigned long n) + { + start = lcast_put_unsigned(n, finish); + return true; + } + + + template + inline bool lexical_stream_limited_src::operator<<( + boost::ulong_long_type n) + { + start = lcast_put_unsigned(n, finish); + return true; + } +# 956 "/usr/include/boost-1_42/boost/lexical_cast.hpp" + template + inline bool lexical_stream_limited_src::operator<<( + float val) + { + return this->lcast_put(val); + } + + template + inline bool lexical_stream_limited_src::operator<<( + double val) + { + return this->lcast_put(val); + } + + template + inline bool lexical_stream_limited_src::operator<<( + long double val) + { + return this->lcast_put(val); + } + + template + inline bool lexical_stream_limited_src::operator<<( + CharT const* str) + { + start = const_cast(str); + finish = start + Traits::length(str); + return true; + } + + template + inline bool lexical_stream_limited_src::operator>>( + CharT& output) + { + bool const ok = (finish - start == 1); + if(ok) + Traits::assign(output, *start); + return ok; + } +# 1015 "/usr/include/boost-1_42/boost/lexical_cast.hpp" + } + + namespace detail + { + + template + struct lcast_streambuf_for_source + { + static const bool value = false; + }; + + template<> + struct lcast_streambuf_for_source + { + static const bool value = true; + }; + + template<> + struct lcast_streambuf_for_source + { + static const bool value = true; + }; + + template<> + struct lcast_streambuf_for_source + { + static const bool value = true; + }; + } + + namespace detail + { + + template + struct lcast_streambuf_for_target + { + static const bool value = true; + }; + + template<> + struct lcast_streambuf_for_target + { + static const bool value = false; + }; + + + template<> + struct lcast_streambuf_for_target + { + static const bool value = false; + }; + + + + template + struct lcast_streambuf_for_target< + std::basic_string > + { + static const bool value = false; + }; + + + template + struct lcast_streambuf_for_target< + std::basic_string > + { + static const bool value = false; + }; +# 1099 "/usr/include/boost-1_42/boost/lexical_cast.hpp" + } + + + + + + namespace detail + { + template + struct array_to_pointer_decay + { + typedef T type; + }; + + template + struct array_to_pointer_decay + { + typedef const T * type; + }; + + + + + + + + template< typename Target + , typename Source + , bool Unlimited + , typename CharT + > + Target lexical_cast( + typename boost::call_traits::param_type arg, + CharT* buf, std::size_t src_len) + { + typedef typename + deduce_char_traits::type traits; + + typedef typename boost::mpl::if_c< + lcast_streambuf_for_target::value || + lcast_streambuf_for_source::value + , std::basic_streambuf + , lexical_streambuf_fake + >::type base; + + typename boost::mpl::if_c< + Unlimited + , detail::lexical_stream + , detail::lexical_stream_limited_src + >::type interpreter(buf, buf + src_len); + + Target result; + if(!(interpreter << arg && interpreter >> result)) + throw_exception(bad_lexical_cast(typeid(Source), typeid(Target))); + return result; + } + + + + } + + template + inline Target lexical_cast(const Source &arg) + { + typedef typename detail::array_to_pointer_decay::type src; + + typedef typename detail::widest_char< + typename detail::stream_char::type + , typename detail::stream_char::type + >::type char_type; + + typedef detail::lcast_src_length lcast_src_length; + std::size_t const src_len = lcast_src_length::value; + char_type buf[src_len + 1]; + lcast_src_length::check_coverage(); + return detail::lexical_cast(arg, buf, src_len); + } +# 1203 "/usr/include/boost-1_42/boost/lexical_cast.hpp" +} +# 20 "/usr/include/boost-1_42/boost/python/operators.hpp" 2 + + + + + +namespace boost { namespace python { + +namespace detail +{ + + + template + PyObject* convert_result(T const& x) + { + return converter::arg_to_python(x).release(); + } + + + + template struct operator_l + { + template struct apply; + }; + + template struct operator_r + { + template struct apply; + }; + + template struct operator_1 + { + template struct apply; + }; + + + + + template + struct operator_l_inner + : operator_l::template apply + {}; + + template + struct operator_r_inner + : operator_r::template apply + {}; + + template + struct operator_1_inner + : operator_1::template apply + {}; +# 84 "/usr/include/boost-1_42/boost/python/operators.hpp" + template + struct binary_op : operator_l + { + template + struct apply : operator_l_inner + { + }; + }; + + + template + struct binary_op_l : operator_l + { + template + struct apply : operator_l_inner + { + }; + }; + + + template + struct binary_op_r : operator_r + { + template + struct apply : operator_r_inner + { + }; + }; + + template + struct unary_op : operator_1 + { + template + struct apply : operator_1_inner + { + }; + }; + + + + template + struct operator_ + : def_visitor > + { + private: + template + void visit(ClassT& cl) const + { + typedef typename mpl::eval_if< + is_same + , mpl::if_< + is_same + , binary_op + , binary_op_l< + id + , typename unwrap_other::type + > + > + , mpl::if_< + is_same + , unary_op + , binary_op_r< + id + , typename unwrap_other::type + > + > + >::type generator; + + cl.def( + generator::name() + , &generator::template apply< + typename ClassT::wrapped_type + >::execute + ); + } + + friend class python::def_visitor_access; + }; +} +# 212 "/usr/include/boost-1_42/boost/python/operators.hpp" +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l + r); } }; static char const* name() { return "__" "add" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l + r); } }; static char const* name() { return "__" "radd" "__"; } }; } namespace self_ns { template inline detail::operator_ operator +(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l - r); } }; static char const* name() { return "__" "sub" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l - r); } }; static char const* name() { return "__" "rsub" "__"; } }; } namespace self_ns { template inline detail::operator_ operator -(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l * r); } }; static char const* name() { return "__" "mul" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l * r); } }; static char const* name() { return "__" "rmul" "__"; } }; } namespace self_ns { template inline detail::operator_ operator *(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l / r); } }; static char const* name() { return "__" "div" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l / r); } }; static char const* name() { return "__" "rdiv" "__"; } }; } namespace self_ns { template inline detail::operator_ operator /(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l % r); } }; static char const* name() { return "__" "mod" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l % r); } }; static char const* name() { return "__" "rmod" "__"; } }; } namespace self_ns { template inline detail::operator_ operator %(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l << r); } }; static char const* name() { return "__" "lshift" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l << r); } }; static char const* name() { return "__" "rlshift" "__"; } }; } namespace self_ns { template inline detail::operator_ operator <<(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l >> r); } }; static char const* name() { return "__" "rshift" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l >> r); } }; static char const* name() { return "__" "rrshift" "__"; } }; } namespace self_ns { template inline detail::operator_ operator >>(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l & r); } }; static char const* name() { return "__" "and" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l & r); } }; static char const* name() { return "__" "rand" "__"; } }; } namespace self_ns { template inline detail::operator_ operator &(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l ^ r); } }; static char const* name() { return "__" "xor" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l ^ r); } }; static char const* name() { return "__" "rxor" "__"; } }; } namespace self_ns { template inline detail::operator_ operator ^(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l | r); } }; static char const* name() { return "__" "or" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l | r); } }; static char const* name() { return "__" "ror" "__"; } }; } namespace self_ns { template inline detail::operator_ operator |(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l > r); } }; static char const* name() { return "__" "gt" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l > r); } }; static char const* name() { return "__" "lt" "__"; } }; } namespace self_ns { template inline detail::operator_ operator >(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l >= r); } }; static char const* name() { return "__" "ge" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l >= r); } }; static char const* name() { return "__" "le" "__"; } }; } namespace self_ns { template inline detail::operator_ operator >=(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l < r); } }; static char const* name() { return "__" "lt" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l < r); } }; static char const* name() { return "__" "gt" "__"; } }; } namespace self_ns { template inline detail::operator_ operator <(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l <= r); } }; static char const* name() { return "__" "le" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l <= r); } }; static char const* name() { return "__" "ge" "__"; } }; } namespace self_ns { template inline detail::operator_ operator <=(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l == r); } }; static char const* name() { return "__" "eq" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l == r); } }; static char const* name() { return "__" "eq" "__"; } }; } namespace self_ns { template inline detail::operator_ operator ==(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l != r); } }; static char const* name() { return "__" "ne" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l != r); } }; static char const* name() { return "__" "ne" "__"; } }; } namespace self_ns { template inline detail::operator_ operator !=(L const&, R const&) { return detail::operator_(); } } + + + +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(pow(l,r)); } }; static char const* name() { return "__" "pow" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(pow(l,r)); } }; static char const* name() { return "__" "rpow" "__"; } }; } + + +namespace self_ns +{ + + template + inline detail::operator_ + pow(L const&, R const&) + { + return detail::operator_(); + } +# 267 "/usr/include/boost-1_42/boost/python/operators.hpp" +} +# 301 "/usr/include/boost-1_42/boost/python/operators.hpp" +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(back_reference l, rhs const& r) { l.get() += r; return python::incref(l.source().ptr()); } }; static char const* name() { return "__" "iadd" "__"; } }; } namespace self_ns { template inline detail::operator_ operator +=(self_t const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(back_reference l, rhs const& r) { l.get() -= r; return python::incref(l.source().ptr()); } }; static char const* name() { return "__" "isub" "__"; } }; } namespace self_ns { template inline detail::operator_ operator -=(self_t const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(back_reference l, rhs const& r) { l.get() *= r; return python::incref(l.source().ptr()); } }; static char const* name() { return "__" "imul" "__"; } }; } namespace self_ns { template inline detail::operator_ operator *=(self_t const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(back_reference l, rhs const& r) { l.get() /= r; return python::incref(l.source().ptr()); } }; static char const* name() { return "__" "idiv" "__"; } }; } namespace self_ns { template inline detail::operator_ operator /=(self_t const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(back_reference l, rhs const& r) { l.get() %= r; return python::incref(l.source().ptr()); } }; static char const* name() { return "__" "imod" "__"; } }; } namespace self_ns { template inline detail::operator_ operator %=(self_t const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(back_reference l, rhs const& r) { l.get() <<= r; return python::incref(l.source().ptr()); } }; static char const* name() { return "__" "ilshift" "__"; } }; } namespace self_ns { template inline detail::operator_ operator <<=(self_t const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(back_reference l, rhs const& r) { l.get() >>= r; return python::incref(l.source().ptr()); } }; static char const* name() { return "__" "irshift" "__"; } }; } namespace self_ns { template inline detail::operator_ operator >>=(self_t const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(back_reference l, rhs const& r) { l.get() &= r; return python::incref(l.source().ptr()); } }; static char const* name() { return "__" "iand" "__"; } }; } namespace self_ns { template inline detail::operator_ operator &=(self_t const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(back_reference l, rhs const& r) { l.get() ^= r; return python::incref(l.source().ptr()); } }; static char const* name() { return "__" "ixor" "__"; } }; } namespace self_ns { template inline detail::operator_ operator ^=(self_t const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(back_reference l, rhs const& r) { l.get() |= r; return python::incref(l.source().ptr()); } }; static char const* name() { return "__" "ior" "__"; } }; } namespace self_ns { template inline detail::operator_ operator |=(self_t const&, R const&) { return detail::operator_(); } } +# 340 "/usr/include/boost-1_42/boost/python/operators.hpp" +namespace detail { template <> struct operator_1 { template struct apply { typedef typename unwrap_wrapper_::type self_t; static PyObject* execute(self_t& x) { return detail::convert_result(-(x)); } }; static char const* name() { return "__" "neg" "__"; } }; } namespace self_ns { inline detail::operator_ operator-(self_t const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_1 { template struct apply { typedef typename unwrap_wrapper_::type self_t; static PyObject* execute(self_t& x) { return detail::convert_result(+(x)); } }; static char const* name() { return "__" "pos" "__"; } }; } namespace self_ns { inline detail::operator_ operator+(self_t const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_1 { template struct apply { typedef typename unwrap_wrapper_::type self_t; static PyObject* execute(self_t& x) { return detail::convert_result(abs(x)); } }; static char const* name() { return "__" "abs" "__"; } }; } namespace self_ns { inline detail::operator_ abs(self_t const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_1 { template struct apply { typedef typename unwrap_wrapper_::type self_t; static PyObject* execute(self_t& x) { return detail::convert_result(~(x)); } }; static char const* name() { return "__" "invert" "__"; } }; } namespace self_ns { inline detail::operator_ operator~(self_t const&) { return detail::operator_(); } } + + + +namespace detail { template <> struct operator_1 { template struct apply { typedef typename unwrap_wrapper_::type self_t; static PyObject* execute(self_t& x) { return detail::convert_result(!!(x)); } }; static char const* name() { return "__" "nonzero" "__"; } }; } namespace self_ns { inline detail::operator_ operator!(self_t const&) { return detail::operator_(); } } + +namespace detail { template <> struct operator_1 { template struct apply { typedef typename unwrap_wrapper_::type self_t; static PyObject* execute(self_t& x) { return detail::convert_result(long(x)); } }; static char const* name() { return "__" "int" "__"; } }; } namespace self_ns { inline detail::operator_ int_(self_t const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_1 { template struct apply { typedef typename unwrap_wrapper_::type self_t; static PyObject* execute(self_t& x) { return detail::convert_result(PyLong_FromLong(x)); } }; static char const* name() { return "__" "long" "__"; } }; } namespace self_ns { inline detail::operator_ long_(self_t const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_1 { template struct apply { typedef typename unwrap_wrapper_::type self_t; static PyObject* execute(self_t& x) { return detail::convert_result(double(x)); } }; static char const* name() { return "__" "float" "__"; } }; } namespace self_ns { inline detail::operator_ float_(self_t const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_1 { template struct apply { typedef typename unwrap_wrapper_::type self_t; static PyObject* execute(self_t& x) { return detail::convert_result(std::complex(x)); } }; static char const* name() { return "__" "complex" "__"; } }; } namespace self_ns { inline detail::operator_ complex_(self_t const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_1 { template struct apply { typedef typename unwrap_wrapper_::type self_t; static PyObject* execute(self_t& x) { return detail::convert_result(lexical_cast(x)); } }; static char const* name() { return "__" "str" "__"; } }; } namespace self_ns { inline detail::operator_ str(self_t const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_1 { template struct apply { typedef typename unwrap_wrapper_::type self_t; static PyObject* execute(self_t& x) { return detail::convert_result(lexical_cast(x)); } }; static char const* name() { return "__" "repr" "__"; } }; } namespace self_ns { inline detail::operator_ repr(self_t const&) { return detail::operator_(); } } + + +}} +# 51 "/usr/include/boost-1_42/boost/python.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/overloads.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/overloads.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/defaults_gen.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/python/detail/defaults_gen.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/repeat_from_to.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/python/detail/defaults_gen.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/tuple.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/preprocessor/tuple.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/tuple/reverse.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/preprocessor/tuple.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/tuple/to_seq.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/preprocessor/tuple.hpp" 2 +# 19 "/usr/include/boost-1_42/boost/python/detail/defaults_gen.hpp" 2 +# 29 "/usr/include/boost-1_42/boost/python/detail/defaults_gen.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 30 "/usr/include/boost-1_42/boost/python/detail/defaults_gen.hpp" 2 + +namespace boost { namespace python { + +namespace detail +{ + + + struct overloads_base + { + overloads_base(char const* doc_) + : m_doc(doc_) {} + + overloads_base(char const* doc_, detail::keyword_range const& kw) + : m_doc(doc_), m_keywords(kw) {} + + char const* doc_string() const + { + return m_doc; + } + + detail::keyword_range const& keywords() const + { + return m_keywords; + } + + private: + char const* m_doc; + detail::keyword_range m_keywords; + }; + + + + template + struct overloads_proxy + : public overloads_base + { + typedef typename OverloadsT::non_void_return_type non_void_return_type; + typedef typename OverloadsT::void_return_type void_return_type; + + overloads_proxy( + CallPoliciesT const& policies_ + , char const* doc + , keyword_range const& kw + ) + : overloads_base(doc, kw) + , policies(policies_) + {} + + CallPoliciesT + call_policies() const + { + return policies; + } + + CallPoliciesT policies; + }; + + + + + + template + struct overloads_common + : public overloads_base + { + overloads_common(char const* doc) + : overloads_base(doc) {} + + overloads_common(char const* doc, keyword_range const& kw) + : overloads_base(doc, kw) {} + + default_call_policies + call_policies() const + { + return default_call_policies(); + } + + template + overloads_proxy + operator[](CallPoliciesT const& policies) const + { + return overloads_proxy( + policies, this->doc_string(), this->keywords()); + } + }; + +}}} +# 15 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits.hpp" 1 +# 22 "/usr/include/boost-1_42/boost/type_traits.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/has_nothrow_destructor.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/has_nothrow_destructor.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 16 "/usr/include/boost-1_42/boost/type_traits/has_nothrow_destructor.hpp" 2 + +namespace boost { + +template< typename T > struct has_nothrow_destructor : ::boost::integral_constant::value> { }; + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/type_traits/has_nothrow_destructor.hpp" 2 +# 23 "/usr/include/boost-1_42/boost/type_traits.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/has_virtual_destructor.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/has_virtual_destructor.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 16 "/usr/include/boost-1_42/boost/type_traits/has_virtual_destructor.hpp" 2 + +namespace boost { + +template< typename T > struct has_virtual_destructor : ::boost::integral_constant { }; + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/type_traits/has_virtual_destructor.hpp" 2 +# 28 "/usr/include/boost-1_42/boost/type_traits.hpp" 2 + + + + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/is_base_of.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/type_traits/is_base_of.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 20 "/usr/include/boost-1_42/boost/type_traits/is_base_of.hpp" 2 + +namespace boost { + + namespace detail{ + template + struct is_base_of_imp + { + typedef typename remove_cv::type ncvB; + typedef typename remove_cv::type ncvD; + static const bool value = (::boost::type_traits::ice_or< (::boost::detail::is_base_and_derived_impl::value), (::boost::type_traits::ice_and< ::boost::is_same::value, ::boost::is_class::value>::value)>::value) + + ; + }; + } + +template< typename Base, typename Derived > struct is_base_of : ::boost::integral_constant::value)> { }; + + + + + + +template< typename Base, typename Derived > struct is_base_of< Base&,Derived > : ::boost::integral_constant { }; +template< typename Base, typename Derived > struct is_base_of< Base,Derived& > : ::boost::integral_constant { }; +template< typename Base, typename Derived > struct is_base_of< Base&,Derived& > : ::boost::integral_constant { }; + + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 50 "/usr/include/boost-1_42/boost/type_traits/is_base_of.hpp" 2 +# 35 "/usr/include/boost-1_42/boost/type_traits.hpp" 2 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/is_floating_point.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/type_traits/is_floating_point.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 14 "/usr/include/boost-1_42/boost/type_traits/is_floating_point.hpp" 2 + +namespace boost { + + +template< typename T > struct is_floating_point : ::boost::integral_constant { }; +template<> struct is_floating_point< float > : ::boost::integral_constant { }; template<> struct is_floating_point< float const > : ::boost::integral_constant { }; template<> struct is_floating_point< float volatile > : ::boost::integral_constant { }; template<> struct is_floating_point< float const volatile > : ::boost::integral_constant { }; +template<> struct is_floating_point< double > : ::boost::integral_constant { }; template<> struct is_floating_point< double const > : ::boost::integral_constant { }; template<> struct is_floating_point< double volatile > : ::boost::integral_constant { }; template<> struct is_floating_point< double const volatile > : ::boost::integral_constant { }; +template<> struct is_floating_point< long double > : ::boost::integral_constant { }; template<> struct is_floating_point< long double const > : ::boost::integral_constant { }; template<> struct is_floating_point< long double volatile > : ::boost::integral_constant { }; template<> struct is_floating_point< long double const volatile > : ::boost::integral_constant { }; + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 26 "/usr/include/boost-1_42/boost/type_traits/is_floating_point.hpp" 2 +# 43 "/usr/include/boost-1_42/boost/type_traits.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/is_member_object_pointer.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/type_traits/is_member_object_pointer.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 21 "/usr/include/boost-1_42/boost/type_traits/is_member_object_pointer.hpp" 2 + +namespace boost { + +namespace detail{ + +template +struct is_member_object_pointer_impl +{ + static const bool value = (::boost::type_traits::ice_and< ::boost::is_member_pointer::value, ::boost::type_traits::ice_not< ::boost::is_member_function_pointer::value >::value >::value ) + + + + + + ; +}; + +} + +template< typename T > struct is_member_object_pointer : ::boost::integral_constant::value> { }; + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 45 "/usr/include/boost-1_42/boost/type_traits/is_member_object_pointer.hpp" 2 +# 48 "/usr/include/boost-1_42/boost/type_traits.hpp" 2 +# 60 "/usr/include/boost-1_42/boost/type_traits.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/rank.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/rank.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/size_t_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/size_t_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/size_t_trait_def.hpp" 2 + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 20 "/usr/include/boost-1_42/boost/type_traits/detail/size_t_trait_def.hpp" 2 +# 15 "/usr/include/boost-1_42/boost/type_traits/rank.hpp" 2 + +namespace boost { + + + +namespace detail{ + +template +struct rank_imp +{ + static const std::size_t value = N; +}; + +template +struct rank_imp +{ + static const std::size_t value = (::boost::detail::rank_imp::value); +}; + +template +struct rank_imp +{ + static const std::size_t value = (::boost::detail::rank_imp::value); +}; + +template +struct rank_imp +{ + static const std::size_t value = (::boost::detail::rank_imp::value); +}; + +template +struct rank_imp +{ + static const std::size_t value = (::boost::detail::rank_imp::value); +}; + + +template +struct rank_imp +{ + static const std::size_t value = (::boost::detail::rank_imp::value); +}; +template +struct rank_imp +{ + static const std::size_t value = (::boost::detail::rank_imp::value); +}; +template +struct rank_imp +{ + static const std::size_t value = (::boost::detail::rank_imp::value); +}; +template +struct rank_imp +{ + static const std::size_t value = (::boost::detail::rank_imp::value); +}; + + +} + + + + + + +template< typename T > struct rank : ::boost::integral_constant::value)> { }; + + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/size_t_trait_undef.hpp" 1 +# 88 "/usr/include/boost-1_42/boost/type_traits/rank.hpp" 2 +# 61 "/usr/include/boost-1_42/boost/type_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/extent.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/extent.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/size_t_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/size_t_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/size_t_trait_def.hpp" 2 + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 20 "/usr/include/boost-1_42/boost/type_traits/detail/size_t_trait_def.hpp" 2 +# 15 "/usr/include/boost-1_42/boost/type_traits/extent.hpp" 2 + +namespace boost { + +namespace detail{ +# 29 "/usr/include/boost-1_42/boost/type_traits/extent.hpp" +template +struct extent_imp +{ + static const std::size_t value = 0; +}; + +template +struct extent_imp +{ + static const std::size_t value = (::boost::detail::extent_imp::value); +}; + +template +struct extent_imp +{ + static const std::size_t value = (::boost::detail::extent_imp::value); +}; + +template +struct extent_imp +{ + static const std::size_t value = (::boost::detail::extent_imp::value); +}; + +template +struct extent_imp +{ + static const std::size_t value = (::boost::detail::extent_imp::value); +}; + +template +struct extent_imp +{ + static const std::size_t value = R; +}; + +template +struct extent_imp +{ + static const std::size_t value = R; +}; + +template +struct extent_imp +{ + static const std::size_t value = R; +}; + +template +struct extent_imp +{ + static const std::size_t value = R; +}; + + +template +struct extent_imp +{ + static const std::size_t value = (::boost::detail::extent_imp::value); +}; +template +struct extent_imp +{ + static const std::size_t value = (::boost::detail::extent_imp::value); +}; +template +struct extent_imp +{ + static const std::size_t value = (::boost::detail::extent_imp::value); +}; +template +struct extent_imp +{ + static const std::size_t value = (::boost::detail::extent_imp::value); +}; +template +struct extent_imp +{ + static const std::size_t value = 0; +}; +template +struct extent_imp +{ + static const std::size_t value = 0; +}; +template +struct extent_imp +{ + static const std::size_t value = 0; +}; +template +struct extent_imp +{ + static const std::size_t value = 0; +}; + + + + +} + +template +struct extent + : public ::boost::integral_constant::value> +{ + + + + + +}; + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/size_t_trait_undef.hpp" 1 +# 144 "/usr/include/boost-1_42/boost/type_traits/extent.hpp" 2 +# 62 "/usr/include/boost-1_42/boost/type_traits.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/type_traits/remove_extent.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/remove_extent.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 15 "/usr/include/boost-1_42/boost/type_traits/remove_extent.hpp" 2 + + + + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 2 +# 22 "/usr/include/boost-1_42/boost/type_traits/remove_extent.hpp" 2 + + + +namespace boost { + +template< typename T > struct remove_extent { typedef T type; }; + + +template< typename T, std::size_t N > struct remove_extent { typedef T type; }; +template< typename T, std::size_t N > struct remove_extent { typedef T const type; }; +template< typename T, std::size_t N > struct remove_extent { typedef T volatile type; }; +template< typename T, std::size_t N > struct remove_extent { typedef T const volatile type; }; + +template< typename T > struct remove_extent { typedef T type; }; +template< typename T > struct remove_extent { typedef T const type; }; +template< typename T > struct remove_extent { typedef T volatile type; }; +template< typename T > struct remove_extent { typedef T const volatile type; }; + + + +} + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_undef.hpp" 1 +# 47 "/usr/include/boost-1_42/boost/type_traits/remove_extent.hpp" 2 +# 64 "/usr/include/boost-1_42/boost/type_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/remove_all_extents.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/type_traits/remove_all_extents.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 14 "/usr/include/boost-1_42/boost/type_traits/remove_all_extents.hpp" 2 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 2 +# 22 "/usr/include/boost-1_42/boost/type_traits/remove_all_extents.hpp" 2 + + + +namespace boost { + +template< typename T > struct remove_all_extents { typedef T type; }; + + +template< typename T, std::size_t N > struct remove_all_extents { typedef typename boost::remove_all_extents::type type; }; +template< typename T, std::size_t N > struct remove_all_extents { typedef typename boost::remove_all_extents::type type; }; +template< typename T, std::size_t N > struct remove_all_extents { typedef typename boost::remove_all_extents::type type; }; +template< typename T, std::size_t N > struct remove_all_extents { typedef typename boost::remove_all_extents::type type; }; + +template< typename T > struct remove_all_extents { typedef typename boost::remove_all_extents::type type; }; +template< typename T > struct remove_all_extents { typedef typename boost::remove_all_extents::type type; }; +template< typename T > struct remove_all_extents { typedef typename boost::remove_all_extents::type type; }; +template< typename T > struct remove_all_extents { typedef typename boost::remove_all_extents::type type; }; + + + +} + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_undef.hpp" 1 +# 47 "/usr/include/boost-1_42/boost/type_traits/remove_all_extents.hpp" 2 +# 65 "/usr/include/boost-1_42/boost/type_traits.hpp" 2 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/type_traits/aligned_storage.hpp" 1 +# 73 "/usr/include/boost-1_42/boost/type_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/floating_point_promotion.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/type_traits/floating_point_promotion.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 2 +# 22 "/usr/include/boost-1_42/boost/type_traits/floating_point_promotion.hpp" 2 + +namespace boost { + +namespace type_traits { namespace detail { + + + +template +struct floating_point_promotion +{ + typedef T type; +}; + +template<> +struct floating_point_promotion +{ + typedef double type; +}; + +template<> +struct floating_point_promotion +{ + typedef double const type; +}; + +template<> +struct floating_point_promotion +{ + typedef double volatile type; +}; + +template<> +struct floating_point_promotion +{ + typedef double const volatile type; +}; +# 78 "/usr/include/boost-1_42/boost/type_traits/floating_point_promotion.hpp" +} } + +template< typename T > struct floating_point_promotion { typedef typename boost::type_traits::detail::floating_point_promotion::type type; }; + + + + + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_undef.hpp" 1 +# 89 "/usr/include/boost-1_42/boost/type_traits/floating_point_promotion.hpp" 2 +# 74 "/usr/include/boost-1_42/boost/type_traits.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/type_traits/integral_promotion.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/type_traits/integral_promotion.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 2 +# 21 "/usr/include/boost-1_42/boost/type_traits/integral_promotion.hpp" 2 + +namespace boost { + +namespace type_traits { namespace detail { + + +template struct need_promotion : boost::is_enum {}; + + +template<> struct need_promotion : true_type {}; +template<> struct need_promotion : true_type {}; +template<> struct need_promotion : true_type {}; +template<> struct need_promotion : true_type {}; +template<> struct need_promotion : true_type {}; +# 63 "/usr/include/boost-1_42/boost/type_traits/integral_promotion.hpp" +template<> struct need_promotion : integral_constant {}; +template<> struct need_promotion : integral_constant {}; +# 75 "/usr/include/boost-1_42/boost/type_traits/integral_promotion.hpp" +template<> struct need_promotion : true_type {}; + + + + + +template<> struct need_promotion : true_type {}; + + + + +template struct promote_from_index; +# 95 "/usr/include/boost-1_42/boost/type_traits/integral_promotion.hpp" +template<> struct promote_from_index<1,0,0> { typedef int type; }; template<> struct promote_from_index<1,0,1> { typedef int volatile type; }; template<> struct promote_from_index<1,1,0> { typedef int const type; }; template<> struct promote_from_index<1,1,1> { typedef int const volatile type; }; +template<> struct promote_from_index<2,0,0> { typedef unsigned int type; }; template<> struct promote_from_index<2,0,1> { typedef unsigned int volatile type; }; template<> struct promote_from_index<2,1,0> { typedef unsigned int const type; }; template<> struct promote_from_index<2,1,1> { typedef unsigned int const volatile type; }; +template<> struct promote_from_index<3,0,0> { typedef long type; }; template<> struct promote_from_index<3,0,1> { typedef long volatile type; }; template<> struct promote_from_index<3,1,0> { typedef long const type; }; template<> struct promote_from_index<3,1,1> { typedef long const volatile type; }; +template<> struct promote_from_index<4,0,0> { typedef unsigned long type; }; template<> struct promote_from_index<4,0,1> { typedef unsigned long volatile type; }; template<> struct promote_from_index<4,1,0> { typedef unsigned long const type; }; template<> struct promote_from_index<4,1,1> { typedef unsigned long const volatile type; }; +# 107 "/usr/include/boost-1_42/boost/type_traits/integral_promotion.hpp" +template<> struct promote_from_index<5,0,0> { typedef boost::long_long_type type; }; template<> struct promote_from_index<5,0,1> { typedef boost::long_long_type volatile type; }; template<> struct promote_from_index<5,1,0> { typedef boost::long_long_type const type; }; template<> struct promote_from_index<5,1,1> { typedef boost::long_long_type const volatile type; }; +template<> struct promote_from_index<6,0,0> { typedef boost::ulong_long_type type; }; template<> struct promote_from_index<6,0,1> { typedef boost::ulong_long_type volatile type; }; template<> struct promote_from_index<6,1,0> { typedef boost::ulong_long_type const type; }; template<> struct promote_from_index<6,1,1> { typedef boost::ulong_long_type const volatile type; }; +# 120 "/usr/include/boost-1_42/boost/type_traits/integral_promotion.hpp" +template +struct sized_type_for_promotion +{ + typedef char (&type)[N]; +}; +# 136 "/usr/include/boost-1_42/boost/type_traits/integral_promotion.hpp" +sized_type_for_promotion<1>::type promoted_index_tester(int); +sized_type_for_promotion<2>::type promoted_index_tester(unsigned int); +sized_type_for_promotion<3>::type promoted_index_tester(long); +sized_type_for_promotion<4>::type promoted_index_tester(unsigned long); + + +sized_type_for_promotion<5>::type promoted_index_tester(boost::long_long_type); +sized_type_for_promotion<6>::type promoted_index_tester(boost::ulong_long_type); +# 154 "/usr/include/boost-1_42/boost/type_traits/integral_promotion.hpp" +template +struct promoted_index +{ + static T testee; + static const int value = sizeof(promoted_index_tester(+testee)); + +}; + +template +struct integral_promotion_impl +{ + typedef typename promote_from_index< + (boost::type_traits::detail::promoted_index::value) + , (boost::is_const::value) + , (boost::is_volatile::value) + >::type type; +}; + +template +struct integral_promotion + : boost::mpl::eval_if< + need_promotion::type> + , integral_promotion_impl + , boost::mpl::identity + > +{ +}; + +} } + +template< typename T > struct integral_promotion { typedef typename boost::type_traits::detail::integral_promotion::type type; }; + + + + + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_undef.hpp" 1 +# 193 "/usr/include/boost-1_42/boost/type_traits/integral_promotion.hpp" 2 +# 76 "/usr/include/boost-1_42/boost/type_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/promote.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/promote.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 2 +# 15 "/usr/include/boost-1_42/boost/type_traits/promote.hpp" 2 + +namespace boost { + +namespace detail { + +template +struct promote_impl + : integral_promotion< + typename floating_point_promotion::type + > +{ +}; + +} + +template< typename T > struct promote { typedef typename boost::detail::promote_impl::type type; }; + + + + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_undef.hpp" 1 +# 38 "/usr/include/boost-1_42/boost/type_traits/promote.hpp" 2 +# 77 "/usr/include/boost-1_42/boost/type_traits.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/type_traits/make_signed.hpp" 1 +# 29 "/usr/include/boost-1_42/boost/type_traits/make_signed.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_def.hpp" 2 +# 30 "/usr/include/boost-1_42/boost/type_traits/make_signed.hpp" 2 + +namespace boost { + +namespace detail { + +template +struct make_signed_imp +{ + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_enum::value>::value)) == 0 ? false : true) >)> + boost_static_assert_typedef_39; + + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((::boost::type_traits::ice_not< ::boost::is_same< typename remove_cv::type, bool>::value>::value)) == 0 ? false : true) >)> + + boost_static_assert_typedef_43; + + + typedef typename remove_cv::type t_no_cv; + typedef typename mpl::if_c< + (::boost::type_traits::ice_and< + ::boost::is_signed::value, + ::boost::is_integral::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value >::value), + T, + typename mpl::if_c< + (::boost::type_traits::ice_and< + ::boost::is_integral::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value> + ::value), + typename mpl::if_< + is_same, + signed char, + typename mpl::if_< + is_same, + signed short, + typename mpl::if_< + is_same, + int, + typename mpl::if_< + is_same, + long, + + boost::long_long_type + + + + + + >::type + >::type + >::type + >::type, + + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned char), + signed char, + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned short), + signed short, + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned int), + int, + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned long), + long, + + boost::long_long_type + + + + + + >::type + >::type + >::type + >::type + >::type + >::type base_integer_type; + + + typedef typename mpl::if_< + is_const, + typename add_const::type, + base_integer_type + >::type const_base_integer_type; + + + typedef typename mpl::if_< + is_volatile, + typename add_volatile::type, + const_base_integer_type + >::type type; +}; + + +} + +template< typename T > struct make_signed { typedef typename boost::detail::make_signed_imp::type type; }; + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/type_trait_undef.hpp" 1 +# 135 "/usr/include/boost-1_42/boost/type_traits/make_signed.hpp" 2 +# 80 "/usr/include/boost-1_42/boost/type_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/decay.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/type_traits/decay.hpp" +namespace boost +{ + + template< class T > + struct decay + { + private: + typedef typename remove_reference::type Ty; + public: + typedef typename mpl::eval_if< + is_array, + mpl::identity::type*>, + typename mpl::eval_if< + is_function, + add_pointer, + mpl::identity + > + >::type type; + }; + +} +# 81 "/usr/include/boost-1_42/boost/type_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/type_traits/is_complex.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/is_complex.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_def.hpp" 2 +# 15 "/usr/include/boost-1_42/boost/type_traits/is_complex.hpp" 2 + + +namespace boost { +namespace detail{ + +struct is_convertible_from_tester +{ + template + is_convertible_from_tester(const std::complex&); +}; + +} + +template< typename T > struct is_complex : ::boost::integral_constant::value)> { }; + +} + +# 1 "/usr/include/boost-1_42/boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 33 "/usr/include/boost-1_42/boost/type_traits/is_complex.hpp" 2 +# 82 "/usr/include/boost-1_42/boost/type_traits.hpp" 2 +# 16 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" 2 +# 28 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" +namespace boost { namespace python { + +struct module; + +namespace objects +{ + struct class_base; +} + +namespace detail +{ + + + + + + + + template + static void name_space_def( + NameSpaceT& name_space + , char const* name + , Func f + , keyword_range const& kw + , CallPolicies const& policies + , char const* doc + , objects::class_base* + ) + { + typedef typename NameSpaceT::wrapped_type wrapped_type; + + objects::add_to_namespace( + name_space, name, + detail::make_keyword_range_function( + f, policies, kw, get_signature(f, (wrapped_type*)0)) + , doc + ); + } + + template + static void name_space_def( + object& name_space + , char const* name + , Func f + , keyword_range const& kw + , CallPolicies const& policies + , char const* doc + , ... + ) + { + scope within(name_space); + + detail::scope_setattr_doc( + name + , detail::make_keyword_range_function(f, policies, kw) + , doc); + } + + + template + static void name_space_def( + NameSpaceT& name_space + , char const* name + , Func f + , keyword_range const& kw + , CallPolicies const& policies + , char const* doc + , module* + ) + { + name_space.def(name, f, policies, doc); + } +# 125 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" + template + struct define_stub_function {}; + + + + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/lower1.hpp" 2 +# 25 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/bounds/upper1.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 47 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" 1 +# 269 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" +template <> +struct define_stub_function<0> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_0 + , kw + , policies + , doc + , &name_space); + } +}; +# 48 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" 1 +# 269 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" +template <> +struct define_stub_function<1> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_1 + , kw + , policies + , doc + , &name_space); + } +}; +# 53 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" 1 +# 269 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" +template <> +struct define_stub_function<2> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_2 + , kw + , policies + , doc + , &name_space); + } +}; +# 58 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" 1 +# 269 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" +template <> +struct define_stub_function<3> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_3 + , kw + , policies + , doc + , &name_space); + } +}; +# 63 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" 1 +# 269 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" +template <> +struct define_stub_function<4> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_4 + , kw + , policies + , doc + , &name_space); + } +}; +# 68 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" 1 +# 269 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" +template <> +struct define_stub_function<5> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_5 + , kw + , policies + , doc + , &name_space); + } +}; +# 73 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" 1 +# 269 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" +template <> +struct define_stub_function<6> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_6 + , kw + , policies + , doc + , &name_space); + } +}; +# 78 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" 1 +# 269 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" +template <> +struct define_stub_function<7> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_7 + , kw + , policies + , doc + , &name_space); + } +}; +# 83 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" 1 +# 269 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" +template <> +struct define_stub_function<8> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_8 + , kw + , policies + , doc + , &name_space); + } +}; +# 88 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" 1 +# 269 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" +template <> +struct define_stub_function<9> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_9 + , kw + , policies + , doc + , &name_space); + } +}; +# 93 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" 1 +# 269 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" +template <> +struct define_stub_function<10> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_10 + , kw + , policies + , doc + , &name_space); + } +}; +# 98 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" 1 +# 269 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" +template <> +struct define_stub_function<11> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_11 + , kw + , policies + , doc + , &name_space); + } +}; +# 103 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" 1 +# 269 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" +template <> +struct define_stub_function<12> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_12 + , kw + , policies + , doc + , &name_space); + } +}; +# 108 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" 1 +# 269 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" +template <> +struct define_stub_function<13> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_13 + , kw + , policies + , doc + , &name_space); + } +}; +# 113 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" 1 +# 269 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" +template <> +struct define_stub_function<14> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_14 + , kw + , policies + , doc + , &name_space); + } +}; +# 118 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" 1 +# 269 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" +template <> +struct define_stub_function<15> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_15 + , kw + , policies + , doc + , &name_space); + } +}; +# 123 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 132 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" 2 +# 157 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" + template + struct define_with_defaults_helper { + + template + static void + def( + char const* name, + StubsT stubs, + keyword_range kw, + CallPolicies const& policies, + NameSpaceT& name_space, + char const* doc) + { + + define_stub_function::define(name, stubs, kw, policies, name_space, doc); + + if (kw.second > kw.first) + --kw.second; + + + define_with_defaults_helper::def(name, stubs, kw, policies, name_space, doc); + } + }; + + template <> + struct define_with_defaults_helper<0> { + + template + static void + def( + char const* name, + StubsT stubs, + keyword_range const& kw, + CallPolicies const& policies, + NameSpaceT& name_space, + char const* doc) + { + + define_stub_function<0>::define(name, stubs, kw, policies, name_space, doc); + + } + }; +# 228 "/usr/include/boost-1_42/boost/python/detail/defaults_def.hpp" + template + inline void + define_with_defaults( + char const* name, + OverloadsT const& overloads, + NameSpaceT& name_space, + SigT const&) + { + typedef typename mpl::front::type return_type; + typedef typename OverloadsT::void_return_type void_return_type; + typedef typename OverloadsT::non_void_return_type non_void_return_type; + + typedef typename mpl::if_c< + boost::is_same::value + , void_return_type + , non_void_return_type + >::type stubs_type; + + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((stubs_type::max_args) <= mpl::size::value) == 0 ? false : true) >)> + boost_static_assert_typedef_247; + + typedef typename stubs_type::template gen gen_type; + define_with_defaults_helper::def( + name + , gen_type() + , overloads.keywords() + , overloads.call_policies() + , name_space + , overloads.doc_string()); + } + +} + +}} +# 12 "/usr/include/boost-1_42/boost/python/overloads.hpp" 2 +# 53 "/usr/include/boost-1_42/boost/python.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/pure_virtual.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/python/pure_virtual.hpp" +# 1 "/usr/include/boost-1_42/boost/python/detail/nullary_function_adaptor.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/python/detail/nullary_function_adaptor.hpp" +namespace boost { namespace python { namespace detail { + + + + +template +struct nullary_function_adaptor +{ + nullary_function_adaptor(NullaryFunction fn) + : m_fn(fn) + {} + + void operator()() const { m_fn(); } +# 38 "/usr/include/boost-1_42/boost/python/detail/nullary_function_adaptor.hpp" +# 1 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/preprocessor/iteration/detail/local.hpp" + template < class A0> void operator()( A0 const& ) const { m_fn(); } + + + template < class A0 , class A1> void operator()( A0 const& , A1 const& ) const { m_fn(); } + + + template < class A0 , class A1 , class A2> void operator()( A0 const& , A1 const& , A2 const& ) const { m_fn(); } + + + template < class A0 , class A1 , class A2 , class A3> void operator()( A0 const& , A1 const& , A2 const& , A3 const& ) const { m_fn(); } + + + template < class A0 , class A1 , class A2 , class A3 , class A4> void operator()( A0 const& , A1 const& , A2 const& , A3 const& , A4 const& ) const { m_fn(); } + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5> void operator()( A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& ) const { m_fn(); } + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6> void operator()( A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& ) const { m_fn(); } + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7> void operator()( A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& ) const { m_fn(); } + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8> void operator()( A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& ) const { m_fn(); } + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9> void operator()( A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& ) const { m_fn(); } + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10> void operator()( A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& ) const { m_fn(); } + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11> void operator()( A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& ) const { m_fn(); } + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12> void operator()( A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& ) const { m_fn(); } + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13> void operator()( A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const& ) const { m_fn(); } + + + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 , class A14> void operator()( A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const& , A14 const& ) const { m_fn(); } +# 39 "/usr/include/boost-1_42/boost/python/detail/nullary_function_adaptor.hpp" 2 + + private: + NullaryFunction m_fn; +}; + +}}} +# 14 "/usr/include/boost-1_42/boost/python/pure_virtual.hpp" 2 + +namespace boost { namespace python { + +namespace detail +{ + + + + + + + void pure_virtual_called(); + + + template + struct replace_front2 + { + + typedef typename mpl::push_front< + typename mpl::push_front< + typename mpl::pop_front< + typename mpl::pop_front< + S + >::type + >::type + , T2 + >::type + , T1 + >::type type; + }; + + + + + template + typename replace_front2::type + error_signature(S ) + { + typedef typename replace_front2::type r; + return r(); + } +# 65 "/usr/include/boost-1_42/boost/python/pure_virtual.hpp" + template + struct pure_virtual_visitor + : def_visitor > + { + pure_virtual_visitor(PointerToMemberFunction pmf) + : m_pmf(pmf) + {} + + private: + friend class python::def_visitor_access; + + template + void visit(C_& c, char const* name, Options& options) const + { + + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((!Options::has_default_implementation) == 0 ? false : true) >)> boost_static_assert_typedef_80; + + + c.def( + name + , m_pmf + , options.doc() + , options.keywords() + , options.policies() + ); + + typedef typename C_::metadata::held_type held_type; + + + c.def( + name + , make_function( + detail::nullary_function_adaptor(pure_virtual_called) + , default_call_policies() + , detail::error_signature(detail::get_signature(m_pmf)) + ) + ); + } + + private: + PointerToMemberFunction m_pmf; + }; +} + + + + + + + +template +detail::pure_virtual_visitor +pure_virtual(PointerToMemberFunction pmf) +{ + return detail::pure_virtual_visitor(pmf); +} + +}} +# 55 "/usr/include/boost-1_42/boost/python.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/python/register_ptr_to_python.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/python/register_ptr_to_python.hpp" +namespace boost { namespace python { + +template +void register_ptr_to_python() +{ + typedef typename boost::python::pointee

::type X; + objects::class_value_wrapper< + P + , objects::make_ptr_instance< + X + , objects::pointer_holder + > + >(); +} + +}} +# 58 "/usr/include/boost-1_42/boost/python.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/return_arg.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/python/return_arg.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 25 "/usr/include/boost-1_42/boost/python/return_arg.hpp" 2 + +namespace boost { namespace python { + +namespace detail +{ + template + struct return_arg_pos_argument_must_be_positive + + {} + + ; + + struct return_none + { + template struct apply + { + struct type + { + static bool convertible() + { + return true; + } + + PyObject *operator()( typename value_arg::type ) const + { + return none(); + } + + PyTypeObject const *get_pytype() const { return converter::expected_pytype_for_arg::get_pytype() ; } + + }; + }; + }; +} + +template < + std::size_t arg_pos=1 + , class Base = default_call_policies +> +struct return_arg : Base +{ + private: + static const bool legal = arg_pos > 0; + + public: + typedef typename mpl::if_c< + legal + , detail::return_none + , detail::return_arg_pos_argument_must_be_positive + + + + + >::type result_converter; + + template + static PyObject* postcall(ArgumentPackage const& args, PyObject* result) + { + + + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((arg_pos > 0) == 0 ? false : true) >)> boost_static_assert_typedef_85; + + result = Base::postcall(args,result); + if (!result) + return 0; + if ( --((PyObject*)(result))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(result)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(result)))); + return incref( detail::get(mpl::int_(),args) ); + } + + template + struct extract_return_type : mpl::at_c + { + }; + +}; + +template < + class Base = default_call_policies + > +struct return_self + : return_arg<1,Base> +{}; + +}} +# 59 "/usr/include/boost-1_42/boost/python.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/return_opaque_pointer.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/python/return_opaque_pointer.hpp" +namespace boost { namespace python { + +namespace detail +{ + template + static void opaque_pointee(Pointee const volatile*) + { + force_instantiate(opaque::instance); + } +} + +struct return_opaque_pointer +{ + template + struct apply + { + struct RETURN_OPAQUE_POINTER_EXPECTS_A_POINTER_TYPE; typedef struct RETURN_OPAQUE_POINTER_EXPECTS_A_POINTER_TYPE34 : boost::mpl::assert_ { static boost::mpl::failed ************ (RETURN_OPAQUE_POINTER_EXPECTS_A_POINTER_TYPE::************ assert_arg()) (R) { return 0; } } mpl_assert_arg34; enum { mpl_assertion_in_line_34 = sizeof( boost::mpl::assertion_failed<(is_pointer::value)>( mpl_assert_arg34::assert_arg() ) ) }; + + struct type : + boost::python::to_python_value< + typename detail::value_arg::type + > + { + type() { detail::opaque_pointee(R()); } + }; + }; +}; + +}} +# 61 "/usr/include/boost-1_42/boost/python.hpp" 2 +# 28 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/boost_headers.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/raw_function.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/python/raw_function.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 17 "/usr/include/boost-1_42/boost/python/raw_function.hpp" 2 + +namespace boost { namespace python { + +namespace detail +{ + template + struct raw_dispatcher + { + raw_dispatcher(F f) : f(f) {} + + PyObject* operator()(PyObject* args, PyObject* keywords) + { + return incref( + object( + f( + tuple(borrowed_reference(args)) + , keywords ? dict(borrowed_reference(keywords)) : dict() + ) + ).ptr() + ); + } + + private: + F f; + }; + + object make_raw_function(objects::py_function); +} + +template +object raw_function(F f, std::size_t min_args = 0) +{ + return detail::make_raw_function( + objects::py_function( + detail::raw_dispatcher(f) + , mpl::vector1() + , min_args + , (std::numeric_limits::max)() + ) + ); +} + +}} +# 30 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/boost_headers.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/slice.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/python/slice.hpp" +# 1 "/usr/include/boost-1_42/boost/iterator/iterator_traits.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/iterator/iterator_traits.hpp" +namespace boost { +# 27 "/usr/include/boost-1_42/boost/iterator/iterator_traits.hpp" +template +struct iterator_value +{ + typedef typename boost::detail::iterator_traits::value_type type; +}; + +template +struct iterator_reference +{ + typedef typename boost::detail::iterator_traits::reference type; +}; + + +template +struct iterator_pointer +{ + typedef typename boost::detail::iterator_traits::pointer type; +}; + +template +struct iterator_difference +{ + typedef typename boost::detail::iterator_traits::difference_type type; +}; + +template +struct iterator_category +{ + typedef typename boost::detail::iterator_traits::iterator_category type; +}; +# 90 "/usr/include/boost-1_42/boost/iterator/iterator_traits.hpp" +} +# 16 "/usr/include/boost-1_42/boost/python/slice.hpp" 2 + + + + +namespace boost { namespace python { + +namespace detail +{ + class slice_base : public object + { + public: + + + + + + + + object start() const; + object stop() const; + object step() const; + + protected: + explicit slice_base(PyObject*, PyObject*, PyObject*); + + inline explicit slice_base(python::detail::borrowed_reference p) : object(p) {} inline explicit slice_base(python::detail::new_reference p) : object(p) {} inline explicit slice_base(python::detail::new_non_null_reference p) : object(p) {} + }; +} + +class slice : public detail::slice_base +{ + typedef detail::slice_base base; + public: + + slice() : base(0,0,0) {} + + + + template + slice( Integer1 start, Integer2 stop) + : base( object(start).ptr(), object(stop).ptr(), 0 ) + {} + + template + slice( Integer1 start, Integer2 stop, Integer3 stride) + : base( object(start).ptr(), object(stop).ptr(), object(stride).ptr() ) + {} +# 103 "/usr/include/boost-1_42/boost/python/slice.hpp" + template + struct range + { + RandomAccessIterator start; + RandomAccessIterator stop; + typename iterator_difference::type step; + }; + + template + slice::range + get_indicies( const RandomAccessIterator& begin, + const RandomAccessIterator& end) const + { + + + + slice::range ret; + + typedef typename iterator_difference::type difference_type; + difference_type max_dist = boost::detail::distance(begin, end); + + object slice_start = this->start(); + object slice_stop = this->stop(); + object slice_step = this->step(); + + + if (slice_step == object()) { + ret.step = 1; + } + else { + ret.step = extract( slice_step); + if (ret.step == 0) { + PyErr_SetString( PyExc_IndexError, "step size cannot be zero."); + throw_error_already_set(); + } + } + + + if (slice_start == object()) { + if (ret.step < 0) { + ret.start = end; + --ret.start; + } + else + ret.start = begin; + } + else { + difference_type i = extract( slice_start); + if (i >= max_dist && ret.step > 0) + throw std::invalid_argument( "Zero-length slice"); + if (i >= 0) { + ret.start = begin; + using std::min; + std::advance( ret.start, min (i, max_dist-1)); + } + else { + if (i < -max_dist && ret.step < 0) + throw std::invalid_argument( "Zero-length slice"); + ret.start = end; + + std::advance( ret.start, (-i < max_dist) ? i : -max_dist ); + } + } + + + + if (slice_stop == object()) { + if (ret.step < 0) { + ret.stop = begin; + } + else { + ret.stop = end; + std::advance( ret.stop, -1); + } + } + else { + difference_type i = extract(slice_stop); + + if (ret.step < 0) { + if (i+1 >= max_dist || i == -1) + throw std::invalid_argument( "Zero-length slice"); + + if (i >= 0) { + ret.stop = begin; + std::advance( ret.stop, i+1); + } + else { + ret.stop = end; + std::advance( ret.stop, (-i < max_dist) ? i : -max_dist); + } + } + else { + if (i == 0 || -i >= max_dist) + throw std::invalid_argument( "Zero-length slice"); + + if (i > 0) { + ret.stop = begin; + std::advance( ret.stop, (std::min)( i-1, max_dist-1)); + } + else { + ret.stop = end; + std::advance( ret.stop, i-1); + } + } + } + + + + + + + typename iterator_difference::type final_dist = + boost::detail::distance( ret.start, ret.stop); + + + + if (final_dist == 0) + return ret; + + + + + if ((final_dist > 0) != (ret.step > 0)) + throw std::invalid_argument( "Zero-length slice."); + + + + + + if (final_dist < 0) { + difference_type remainder = -final_dist % -ret.step; + std::advance( ret.stop, remainder); + } + else { + difference_type remainder = final_dist % ret.step; + std::advance( ret.stop, -remainder); + } + + return ret; + } + + public: + + + + + inline explicit slice(python::detail::borrowed_reference p) : detail::slice_base(p) {} inline explicit slice(python::detail::new_reference p) : detail::slice_base(p) {} inline explicit slice(python::detail::new_non_null_reference p) : detail::slice_base(p) {} +}; + + +namespace converter { + +template<> +struct object_manager_traits + : pytype_object_manager_traits<&PySlice_Type, slice> +{ +}; + +} + +} } +# 31 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/boost_headers.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/python/suite/indexing/indexing_suite.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/python/suite/indexing/indexing_suite.hpp" +# 1 "/usr/include/boost-1_42/boost/python/suite/indexing/detail/indexing_suite_detail.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/suite/indexing/detail/indexing_suite_detail.hpp" +# 1 "/usr/include/boost-1_42/boost/scoped_ptr.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/scoped_ptr.hpp" +# 1 "/usr/include/boost-1_42/boost/smart_ptr/scoped_ptr.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/smart_ptr/scoped_ptr.hpp" +# 1 "/usr/include/boost-1_42/boost/assert.hpp" 1 +# 36 "/usr/include/boost-1_42/boost/assert.hpp" +# 1 "/usr/include/assert.h" 1 3 4 +# 37 "/usr/include/boost-1_42/boost/assert.hpp" 2 +# 15 "/usr/include/boost-1_42/boost/smart_ptr/scoped_ptr.hpp" 2 + + + + + + + +namespace boost +{ +# 39 "/usr/include/boost-1_42/boost/smart_ptr/scoped_ptr.hpp" +template class scoped_ptr +{ +private: + + T * px; + + scoped_ptr(scoped_ptr const &); + scoped_ptr & operator=(scoped_ptr const &); + + typedef scoped_ptr this_type; + + void operator==( scoped_ptr const& ) const; + void operator!=( scoped_ptr const& ) const; + +public: + + typedef T element_type; + + explicit scoped_ptr( T * p = 0 ): px( p ) + { + + + + } + + + + explicit scoped_ptr( std::auto_ptr p ): px( p.release() ) + { + + + + } + + + + ~scoped_ptr() + { + + + + boost::checked_delete( px ); + } + + void reset(T * p = 0) + { + (static_cast (0)); + this_type(p).swap(*this); + } + + T & operator*() const + { + (static_cast (0)); + return *px; + } + + T * operator->() const + { + (static_cast (0)); + return px; + } + + T * get() const + { + return px; + } + + +# 1 "/usr/include/boost-1_42/boost/smart_ptr/detail/operator_bool.hpp" 1 +# 43 "/usr/include/boost-1_42/boost/smart_ptr/detail/operator_bool.hpp" + typedef T * this_type::*unspecified_bool_type; + + operator unspecified_bool_type() const + { + return px == 0? 0: &this_type::px; + } + + + + + bool operator! () const + { + return px == 0; + } +# 108 "/usr/include/boost-1_42/boost/smart_ptr/scoped_ptr.hpp" 2 + + void swap(scoped_ptr & b) + { + T * tmp = b.px; + b.px = px; + px = tmp; + } +}; + +template inline void swap(scoped_ptr & a, scoped_ptr & b) +{ + a.swap(b); +} + + + +template inline T * get_pointer(scoped_ptr const & p) +{ + return p.get(); +} + +} +# 15 "/usr/include/boost-1_42/boost/scoped_ptr.hpp" 2 +# 11 "/usr/include/boost-1_42/boost/python/suite/indexing/detail/indexing_suite_detail.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/detail/binary_search.hpp" 1 +# 34 "/usr/include/boost-1_42/boost/detail/binary_search.hpp" +namespace boost { namespace detail { + +template +ForwardIter lower_bound(ForwardIter first, ForwardIter last, + const Tp& val) +{ + typedef detail::iterator_traits traits; + + typename traits::difference_type len = boost::detail::distance(first, last); + typename traits::difference_type half; + ForwardIter middle; + + while (len > 0) { + half = len >> 1; + middle = first; + std::advance(middle, half); + if (*middle < val) { + first = middle; + ++first; + len = len - half - 1; + } + else + len = half; + } + return first; +} + +template +ForwardIter lower_bound(ForwardIter first, ForwardIter last, + const Tp& val, Compare comp) +{ + typedef detail::iterator_traits traits; + + typename traits::difference_type len = boost::detail::distance(first, last); + typename traits::difference_type half; + ForwardIter middle; + + while (len > 0) { + half = len >> 1; + middle = first; + std::advance(middle, half); + if (comp(*middle, val)) { + first = middle; + ++first; + len = len - half - 1; + } + else + len = half; + } + return first; +} + +template +ForwardIter upper_bound(ForwardIter first, ForwardIter last, + const Tp& val) +{ + typedef detail::iterator_traits traits; + + typename traits::difference_type len = boost::detail::distance(first, last); + typename traits::difference_type half; + ForwardIter middle; + + while (len > 0) { + half = len >> 1; + middle = first; + std::advance(middle, half); + if (val < *middle) + len = half; + else { + first = middle; + ++first; + len = len - half - 1; + } + } + return first; +} + +template +ForwardIter upper_bound(ForwardIter first, ForwardIter last, + const Tp& val, Compare comp) +{ + typedef detail::iterator_traits traits; + + typename traits::difference_type len = boost::detail::distance(first, last); + typename traits::difference_type half; + ForwardIter middle; + + while (len > 0) { + half = len >> 1; + middle = first; + std::advance(middle, half); + if (comp(val, *middle)) + len = half; + else { + first = middle; + ++first; + len = len - half - 1; + } + } + return first; +} + +template +std::pair +equal_range(ForwardIter first, ForwardIter last, const Tp& val) +{ + typedef detail::iterator_traits traits; + + typename traits::difference_type len = boost::detail::distance(first, last); + typename traits::difference_type half; + ForwardIter middle, left, right; + + while (len > 0) { + half = len >> 1; + middle = first; + std::advance(middle, half); + if (*middle < val) { + first = middle; + ++first; + len = len - half - 1; + } + else if (val < *middle) + len = half; + else { + left = boost::detail::lower_bound(first, middle, val); + std::advance(first, len); + right = boost::detail::upper_bound(++middle, first, val); + return std::pair(left, right); + } + } + return std::pair(first, first); +} + +template +std::pair +equal_range(ForwardIter first, ForwardIter last, const Tp& val, + Compare comp) +{ + typedef detail::iterator_traits traits; + + typename traits::difference_type len = boost::detail::distance(first, last); + typename traits::difference_type half; + ForwardIter middle, left, right; + + while (len > 0) { + half = len >> 1; + middle = first; + std::advance(middle, half); + if (comp(*middle, val)) { + first = middle; + ++first; + len = len - half - 1; + } + else if (comp(val, *middle)) + len = half; + else { + left = boost::detail::lower_bound(first, middle, val, comp); + std::advance(first, len); + right = boost::detail::upper_bound(++middle, first, val, comp); + return std::pair(left, right); + } + } + return std::pair(first, first); +} + +template +bool binary_search(ForwardIter first, ForwardIter last, + const Tp& val) { + ForwardIter i = boost::detail::lower_bound(first, last, val); + return i != last && !(val < *i); +} + +template +bool binary_search(ForwardIter first, ForwardIter last, + const Tp& val, + Compare comp) { + ForwardIter i = boost::detail::lower_bound(first, last, val, comp); + return i != last && !comp(val, *i); +} + +}} +# 13 "/usr/include/boost-1_42/boost/python/suite/indexing/detail/indexing_suite_detail.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/numeric/conversion/cast.hpp" 1 +# 32 "/usr/include/boost-1_42/boost/numeric/conversion/cast.hpp" +# 1 "/usr/include/boost-1_42/boost/numeric/conversion/converter.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/numeric/conversion/converter.hpp" +# 1 "/usr/include/boost-1_42/boost/numeric/conversion/conversion_traits.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/numeric/conversion/conversion_traits.hpp" +# 1 "/usr/include/boost-1_42/boost/numeric/conversion/detail/conversion_traits.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/numeric/conversion/detail/conversion_traits.hpp" +# 1 "/usr/include/boost-1_42/boost/numeric/conversion/detail/meta.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/numeric/conversion/detail/meta.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/equal_to.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/equal_to.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/comparison_op.hpp" 1 +# 27 "/usr/include/boost-1_42/boost/mpl/aux_/comparison_op.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_op.hpp" 1 +# 22 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_op.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/apply_wrap.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_op.hpp" 2 +# 28 "/usr/include/boost-1_42/boost/mpl/aux_/comparison_op.hpp" 2 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp" +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( Tag1::value + > Tag2::value + ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + + +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename N1 = na + , typename N2 = na + > +struct equal_to + + : equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + >::template apply< N1,N2 >::type +{ + + +}; + +template<> struct equal_to< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : equal_to< T1 , T2 > { }; }; template< typename Tag > struct lambda< equal_to< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef equal_to< na , na > result_; typedef equal_to< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< equal_to< T1 , T2 > > : int_<2> { }; template<> struct template_arity< equal_to< na , na > > : int_<-1> { }; } + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( N1::value == N2::value ) > + { + }; +}; + +}} +# 38 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 2 +# 36 "/usr/include/boost-1_42/boost/mpl/aux_/comparison_op.hpp" 2 +# 20 "/usr/include/boost-1_42/boost/mpl/equal_to.hpp" 2 +# 18 "/usr/include/boost-1_42/boost/numeric/conversion/detail/meta.hpp" 2 + + + + + +namespace boost { namespace numeric { namespace convdetail +{ + template< class T1, class T2> + struct equal_to + { + + + enum { x = ( T1::value == T2::value ) }; + + static const bool value = x; + + typedef mpl::bool_ type; +# 48 "/usr/include/boost-1_42/boost/numeric/conversion/detail/meta.hpp" + }; +# 59 "/usr/include/boost-1_42/boost/numeric/conversion/detail/meta.hpp" + template + struct ct_switch4 + { + typedef mpl::identity Case0TypeQ ; + typedef mpl::identity Case1TypeQ ; + + typedef equal_to is_case0 ; + typedef equal_to is_case1 ; + typedef equal_to is_case2 ; + + typedef mpl::if_ choose_2_3Q ; + typedef mpl::eval_if choose_1_2_3Q ; + + typedef typename + mpl::eval_if::type + type ; + } ; +# 97 "/usr/include/boost-1_42/boost/numeric/conversion/detail/meta.hpp" + template + struct for_both + { + typedef mpl::identity TF_Q ; + typedef mpl::identity TT_Q ; + + typedef typename mpl::not_::type not_expr0 ; + typedef typename mpl::not_::type not_expr1 ; + + typedef typename mpl::and_::type caseTT ; + typedef typename mpl::and_::type caseTF ; + typedef typename mpl::and_::type caseFT ; + + typedef mpl::if_ choose_FT_FF_Q ; + typedef mpl::eval_if choose_TF_FT_FF_Q ; + + typedef typename mpl::eval_if::type type ; + } ; + +} } } +# 18 "/usr/include/boost-1_42/boost/numeric/conversion/detail/conversion_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/numeric/conversion/detail/int_float_mixture.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/numeric/conversion/detail/int_float_mixture.hpp" +# 1 "/usr/include/boost-1_42/boost/numeric/conversion/int_float_mixture_enum.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/numeric/conversion/int_float_mixture_enum.hpp" +namespace boost { namespace numeric +{ + enum int_float_mixture_enum + { + integral_to_integral + ,integral_to_float + ,float_to_integral + ,float_to_float + } ; + +} } +# 17 "/usr/include/boost-1_42/boost/numeric/conversion/detail/int_float_mixture.hpp" 2 + + + + +namespace boost { namespace numeric { namespace convdetail +{ + + typedef mpl::integral_c int2int_c ; + typedef mpl::integral_c int2float_c ; + typedef mpl::integral_c float2int_c ; + typedef mpl::integral_c float2float_c ; + + + + + + + + template + struct get_int_float_mixture + { + typedef mpl::bool_< ::std::numeric_limits::is_integer > S_int ; + typedef mpl::bool_< ::std::numeric_limits::is_integer > T_int ; + + typedef typename + for_both::type + type ; + } ; +# 55 "/usr/include/boost-1_42/boost/numeric/conversion/detail/int_float_mixture.hpp" + template + struct for_int_float_mixture + { + typedef typename + ct_switch4::type + type ; + } ; + +} } } +# 19 "/usr/include/boost-1_42/boost/numeric/conversion/detail/conversion_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/numeric/conversion/detail/sign_mixture.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/numeric/conversion/detail/sign_mixture.hpp" +# 1 "/usr/include/boost-1_42/boost/numeric/conversion/sign_mixture_enum.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/numeric/conversion/sign_mixture_enum.hpp" +namespace boost { namespace numeric +{ + enum sign_mixture_enum + { + unsigned_to_unsigned + ,signed_to_signed + ,signed_to_unsigned + ,unsigned_to_signed + } ; + +} } +# 17 "/usr/include/boost-1_42/boost/numeric/conversion/detail/sign_mixture.hpp" 2 + + + + +namespace boost { namespace numeric { namespace convdetail +{ + + typedef mpl::integral_c unsig2unsig_c ; + typedef mpl::integral_c sig2sig_c ; + typedef mpl::integral_c sig2unsig_c ; + typedef mpl::integral_c unsig2sig_c ; + + + + + + + + template + struct get_sign_mixture + { + typedef mpl::bool_< ::std::numeric_limits::is_signed > S_signed ; + typedef mpl::bool_< ::std::numeric_limits::is_signed > T_signed ; + + typedef typename + for_both::type + type ; + } ; +# 55 "/usr/include/boost-1_42/boost/numeric/conversion/detail/sign_mixture.hpp" + template + struct for_sign_mixture + { + typedef typename + ct_switch4::type + type ; + } ; + +} } } +# 20 "/usr/include/boost-1_42/boost/numeric/conversion/detail/conversion_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/numeric/conversion/detail/udt_builtin_mixture.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/numeric/conversion/detail/udt_builtin_mixture.hpp" +# 1 "/usr/include/boost-1_42/boost/numeric/conversion/udt_builtin_mixture_enum.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/numeric/conversion/udt_builtin_mixture_enum.hpp" +namespace boost { namespace numeric +{ + enum udt_builtin_mixture_enum + { + builtin_to_builtin + ,builtin_to_udt + ,udt_to_builtin + ,udt_to_udt + } ; + +} } +# 16 "/usr/include/boost-1_42/boost/numeric/conversion/detail/udt_builtin_mixture.hpp" 2 + + + + +namespace boost { namespace numeric { namespace convdetail +{ + + typedef mpl::integral_c builtin2builtin_c ; + typedef mpl::integral_c builtin2udt_c ; + typedef mpl::integral_c udt2builtin_c ; + typedef mpl::integral_c udt2udt_c ; +# 37 "/usr/include/boost-1_42/boost/numeric/conversion/detail/udt_builtin_mixture.hpp" + template + struct for_udt_builtin_mixture + { + typedef typename + ct_switch4::type + type ; + } ; + + + + + + + + template + struct get_udt_builtin_mixture + { + typedef is_arithmetic S_builtin ; + typedef is_arithmetic T_builtin ; + + typedef typename + for_both::type + type ; + } ; + +} } } +# 21 "/usr/include/boost-1_42/boost/numeric/conversion/detail/conversion_traits.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/numeric/conversion/detail/is_subranged.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/numeric/conversion/detail/is_subranged.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/multiplies.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/mpl/multiplies.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/times.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/mpl/times.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/arithmetic_op.hpp" 1 +# 26 "/usr/include/boost-1_42/boost/mpl/aux_/arithmetic_op.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_op.hpp" 1 +# 22 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_op.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/apply_wrap.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/mpl/aux_/numeric_op.hpp" 2 +# 27 "/usr/include/boost-1_42/boost/mpl/aux_/arithmetic_op.hpp" 2 + + + + + + + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/times.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessed/gcc/times.hpp" +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( Tag1::value + > Tag2::value + ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + + +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename N1 = na + , typename N2 = na + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ + + + + + +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + + + + + +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + + + + + +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag::type + , typename times_tag::type + >::template apply< N1,N2 >::type +{ + + + + + + +}; + +template<> struct times< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : times< T1 , T2 > { }; }; template< typename Tag > struct lambda< times< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef times< na , na > result_; typedef times< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< times< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< times< na , na > > : int_<-1> { }; } + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( N1::value + * N2::value + ) + > + { + }; +}; + +}} +# 38 "/usr/include/boost-1_42/boost/mpl/aux_/include_preprocessed.hpp" 2 +# 35 "/usr/include/boost-1_42/boost/mpl/aux_/arithmetic_op.hpp" 2 +# 20 "/usr/include/boost-1_42/boost/mpl/times.hpp" 2 +# 18 "/usr/include/boost-1_42/boost/mpl/multiplies.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/mpl/aux_/preprocessor/default_params.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/mpl/multiplies.hpp" 2 + + + + + +namespace boost { namespace mpl { + + + + + + + +template< + typename N1 = na , typename N2 = na , typename N3 = na , typename N4 = na , typename N5 = na + > +struct multiplies + : times< N1 , N2 , N3 , N4 , N5 > +{ + + + + + +}; + +template<> struct multiplies< na , na , na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct apply : multiplies< T1 , T2 , T3 , T4 , T5 > { }; }; template< typename Tag > struct lambda< multiplies< na , na , na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef multiplies< na , na , na , na , na > result_; typedef multiplies< na , na , na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< multiplies< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< multiplies< na , na , na , na , na > > : int_<-1> { }; } + + + +}} +# 18 "/usr/include/boost-1_42/boost/numeric/conversion/detail/is_subranged.hpp" 2 +# 28 "/usr/include/boost-1_42/boost/numeric/conversion/detail/is_subranged.hpp" +namespace boost { namespace numeric { namespace convdetail +{ + + + + + + template + struct subranged_Sig2Unsig + { + + + typedef mpl::true_ type ; + } ; + + + template + struct subranged_Unsig2Sig + { +# 62 "/usr/include/boost-1_42/boost/numeric/conversion/detail/is_subranged.hpp" + typedef mpl::int_< ::std::numeric_limits::digits > S_digits ; + typedef mpl::int_< ::std::numeric_limits::digits > T_digits ; + + + typedef typename T_digits::next u_T_digits ; + + typedef mpl::int_<2> Two ; + + typedef typename mpl::multiplies::type S_digits_times_2 ; + + typedef typename mpl::less::type type ; + } ; + + + template + struct subranged_SameSign + { + + + typedef mpl::int_< ::std::numeric_limits::digits > S_digits ; + typedef mpl::int_< ::std::numeric_limits::digits > T_digits ; + + typedef typename mpl::less::type type ; + } ; + + + template + struct subranged_Int2Float + { + typedef mpl::false_ type ; + } ; + + + template + struct subranged_Float2Int + { + typedef mpl::true_ type ; + } ; + + + template + struct subranged_Float2Float + { + + + + typedef mpl::int_< ::std::numeric_limits::digits > S_mantisa ; + typedef mpl::int_< ::std::numeric_limits::digits > T_mantisa ; + + typedef mpl::int_< ::std::numeric_limits::max_exponent > S_exponent ; + typedef mpl::int_< ::std::numeric_limits::max_exponent > T_exponent ; + + typedef typename mpl::less::type T_smaller_exponent ; + + typedef typename mpl::equal_to::type equal_exponents ; + + typedef mpl::less T_smaller_mantisa ; + + typedef mpl::eval_if not_bigger_exponent_case ; + + typedef typename + mpl::eval_if::type + type ; + } ; + + + template + struct subranged_Udt2BuiltIn + { + typedef mpl::true_ type ; + } ; + + + template + struct subranged_BuiltIn2Udt + { + typedef mpl::false_ type ; + } ; + + + template + struct subranged_Udt2Udt + { + typedef mpl::false_ type ; + } ; + + + + + + template + struct get_subranged_Int2Int + { + typedef subranged_SameSign Sig2Sig ; + typedef subranged_Sig2Unsig Sig2Unsig ; + typedef subranged_Unsig2Sig Unsig2Sig ; + typedef Sig2Sig Unsig2Unsig ; + + typedef typename get_sign_mixture::type sign_mixture ; + + typedef typename + for_sign_mixture::type + type ; + } ; + + template + struct get_subranged_BuiltIn2BuiltIn + { + typedef get_subranged_Int2Int Int2IntQ ; + + typedef subranged_Int2Float Int2Float ; + typedef subranged_Float2Int Float2Int ; + typedef subranged_Float2Float Float2Float ; + + typedef mpl::identity Int2FloatQ ; + typedef mpl::identity Float2IntQ ; + typedef mpl::identity Float2FloatQ ; + + typedef typename get_int_float_mixture::type int_float_mixture ; + + typedef for_int_float_mixture for_ ; + + typedef typename for_::type selected ; + + typedef typename selected::type type ; + } ; + + template + struct get_subranged + { + typedef get_subranged_BuiltIn2BuiltIn BuiltIn2BuiltInQ ; + + typedef subranged_BuiltIn2Udt BuiltIn2Udt ; + typedef subranged_Udt2BuiltIn Udt2BuiltIn ; + typedef subranged_Udt2Udt Udt2Udt ; + + typedef mpl::identity BuiltIn2UdtQ ; + typedef mpl::identity Udt2BuiltInQ ; + typedef mpl::identity Udt2UdtQ ; + + typedef typename get_udt_builtin_mixture::type udt_builtin_mixture ; + + typedef typename + for_udt_builtin_mixture::type + selected ; + + typedef typename selected::type selected2 ; + + typedef typename selected2::type type ; + } ; + + + + + + template + struct get_is_subranged + { + typedef get_subranged non_trivial_case ; + typedef mpl::identity trivial_case ; + + typedef is_same is_trivial ; + + typedef typename mpl::if_::type selected ; + + typedef typename selected::type type ; + } ; + +} } } +# 22 "/usr/include/boost-1_42/boost/numeric/conversion/detail/conversion_traits.hpp" 2 + +namespace boost { namespace numeric { namespace convdetail +{ + + + + + + template + struct non_trivial_traits_impl + { + typedef typename get_int_float_mixture ::type int_float_mixture ; + typedef typename get_sign_mixture ::type sign_mixture ; + typedef typename get_udt_builtin_mixture ::type udt_builtin_mixture ; + + typedef typename get_is_subranged::type subranged ; + + typedef mpl::false_ trivial ; + + typedef T target_type ; + typedef S source_type ; + typedef T result_type ; + + typedef typename mpl::if_< is_arithmetic, S, S const&>::type argument_type ; + + typedef typename mpl::if_::type supertype ; + typedef typename mpl::if_::type subtype ; + } ; + + + + + + + template + struct trivial_traits_impl + { + typedef typename get_int_float_mixture ::type int_float_mixture ; + typedef typename get_sign_mixture ::type sign_mixture ; + typedef typename get_udt_builtin_mixture::type udt_builtin_mixture ; + + typedef mpl::false_ subranged ; + typedef mpl::true_ trivial ; + + typedef N target_type ; + typedef N source_type ; + typedef N const& result_type ; + typedef N const& argument_type ; + + typedef N supertype ; + typedef N subtype ; + + } ; + + + + + template + struct get_conversion_traits + { + typedef typename remove_cv::type target_type ; + typedef typename remove_cv::type source_type ; + + typedef typename is_same::type is_trivial ; + + typedef trivial_traits_impl trivial_imp ; + typedef non_trivial_traits_impl non_trivial_imp ; + + typedef typename mpl::if_::type type ; + } ; + +} } } +# 14 "/usr/include/boost-1_42/boost/numeric/conversion/conversion_traits.hpp" 2 + + + +namespace boost { namespace numeric +{ + +template +struct conversion_traits + : convdetail::get_conversion_traits::type +{ + + + + + + + +} ; + +} } +# 14 "/usr/include/boost-1_42/boost/numeric/conversion/converter.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/numeric/conversion/converter_policies.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/numeric/conversion/converter_policies.hpp" +# 1 "/usr/include/boost-1_42/boost/config/no_tr1/cmath.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/config/no_tr1/cmath.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cmath" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cmath" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cmath" 3 +# 22 "/usr/include/boost-1_42/boost/config/no_tr1/cmath.hpp" 2 +# 16 "/usr/include/boost-1_42/boost/numeric/conversion/converter_policies.hpp" 2 +# 24 "/usr/include/boost-1_42/boost/numeric/conversion/converter_policies.hpp" +namespace boost { namespace numeric +{ + +template +struct Trunc +{ + typedef S source_type ; + + typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; + + static source_type nearbyint ( argument_type s ) + { + + using std::floor ; + using std::ceil ; + + + return s < static_cast(0) ? ceil(s) : floor(s) ; + } + + typedef mpl::integral_c< std::float_round_style, std::round_toward_zero> round_style ; +} ; + + + +template +struct Floor +{ + typedef S source_type ; + + typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; + + static source_type nearbyint ( argument_type s ) + { + + using std::floor ; + + + return floor(s) ; + } + + typedef mpl::integral_c< std::float_round_style, std::round_toward_neg_infinity> round_style ; +} ; + +template +struct Ceil +{ + typedef S source_type ; + + typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; + + static source_type nearbyint ( argument_type s ) + { + + using std::ceil ; + + + return ceil(s) ; + } + + typedef mpl::integral_c< std::float_round_style, std::round_toward_infinity> round_style ; +} ; + +template +struct RoundEven +{ + typedef S source_type ; + + typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; + + static source_type nearbyint ( argument_type s ) + { + + + + using std::floor ; + using std::ceil ; + + + + S prev = floor(s); + S next = ceil(s); + + S rt = (s - prev) - (next - s); + + S const zero(0.0); + S const two(2.0); + + if ( rt < zero ) + return prev; + else if ( rt > zero ) + return next; + else + { + bool is_prev_even = two * floor(prev / two) == prev ; + return ( is_prev_even ? prev : next ) ; + } + } + + typedef mpl::integral_c< std::float_round_style, std::round_to_nearest> round_style ; +} ; + + +enum range_check_result +{ + cInRange = 0 , + cNegOverflow = 1 , + cPosOverflow = 2 +} ; + +class bad_numeric_cast : public std::bad_cast +{ + public: + + virtual const char * what() const throw() + { return "bad numeric conversion: overflow"; } +}; + +class negative_overflow : public bad_numeric_cast +{ + public: + + virtual const char * what() const throw() + { return "bad numeric conversion: negative overflow"; } +}; +class positive_overflow : public bad_numeric_cast +{ + public: + + virtual const char * what() const throw() + { return "bad numeric conversion: positive overflow"; } +}; + +struct def_overflow_handler +{ + void operator() ( range_check_result r ) + { + if ( r == cNegOverflow ) + throw negative_overflow() ; + else if ( r == cPosOverflow ) + throw positive_overflow() ; + } +} ; + +struct silent_overflow_handler +{ + void operator() ( range_check_result ) {} +} ; + +template +struct raw_converter +{ + typedef typename Traits::result_type result_type ; + typedef typename Traits::argument_type argument_type ; + + static result_type low_level_convert ( argument_type s ) { return static_cast(s) ; } +} ; + +struct UseInternalRangeChecker {} ; + +} } +# 15 "/usr/include/boost-1_42/boost/numeric/conversion/converter.hpp" 2 + +# 1 "/usr/include/boost-1_42/boost/numeric/conversion/detail/converter.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/numeric/conversion/detail/converter.hpp" +# 1 "/usr/include/boost-1_42/boost/numeric/conversion/bounds.hpp" 1 +# 13 "/usr/include/boost-1_42/boost/numeric/conversion/bounds.hpp" +# 1 "/usr/include/boost-1_42/boost/numeric/conversion/detail/bounds.hpp" 1 +# 17 "/usr/include/boost-1_42/boost/numeric/conversion/detail/bounds.hpp" +namespace boost { namespace numeric { namespace boundsdetail +{ + template + class Integral + { + typedef std::numeric_limits limits ; + + public : + + static N lowest () { return limits::min (); } + static N highest () { return limits::max (); } + static N smallest() { return static_cast(1); } + } ; + + template + class Float + { + typedef std::numeric_limits limits ; + + public : + + static N lowest () { return static_cast(-limits::max ()) ; } + static N highest () { return limits::max (); } + static N smallest() { return limits::min (); } + } ; + + template + struct get_impl + { + typedef mpl::bool_< ::std::numeric_limits::is_integer > is_int ; + + typedef Integral impl_int ; + typedef Float impl_float ; + + typedef typename mpl::if_::type type ; + } ; + +} } } +# 14 "/usr/include/boost-1_42/boost/numeric/conversion/bounds.hpp" 2 + +namespace boost { namespace numeric +{ + +template +struct bounds : boundsdetail::get_impl::type +{} ; + +} } +# 18 "/usr/include/boost-1_42/boost/numeric/conversion/detail/converter.hpp" 2 + + + + + +namespace boost { namespace numeric { namespace convdetail +{ + + typedef mpl::integral_c round2zero_c ; + typedef mpl::integral_c round2nearest_c ; + typedef mpl::integral_c round2inf_c ; + typedef mpl::integral_c round2neg_inf_c ; +# 40 "/usr/include/boost-1_42/boost/numeric/conversion/detail/converter.hpp" + template + struct for_round_style + { + typedef ct_switch4 selector ; + + typedef typename selector::type type ; + } ; +# 81 "/usr/include/boost-1_42/boost/numeric/conversion/detail/converter.hpp" + struct non_applicable { typedef mpl::false_ do_apply ; } ; + struct applicable { typedef mpl::true_ do_apply ; } ; +# 96 "/usr/include/boost-1_42/boost/numeric/conversion/detail/converter.hpp" + template + struct LT_LoT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s < static_cast(bounds::lowest()) ? cNegOverflow : cInRange ; + } + } ; + + + + template + struct LT_Zero : applicable + { + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s < static_cast(0) ? cNegOverflow : cInRange ; + } + } ; + + + + template + struct LE_PrevLoT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s <= static_cast(bounds::lowest()) - static_cast(1.0) + ? cNegOverflow : cInRange ; + } + } ; + + + + template + struct LT_HalfPrevLoT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s < static_cast(bounds::lowest()) - static_cast(0.5) + ? cNegOverflow : cInRange ; + } + } ; + + + + template + struct GT_HiT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s > static_cast(bounds::highest()) + ? cPosOverflow : cInRange ; + } + } ; + + + + template + struct GE_SuccHiT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s >= static_cast(bounds::highest()) + static_cast(1.0) + ? cPosOverflow : cInRange ; + } + } ; + + + + template + struct GT_HalfSuccHiT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s >= static_cast(bounds::highest()) + static_cast(0.5) + ? cPosOverflow : cInRange ; + } + } ; +# 215 "/usr/include/boost-1_42/boost/numeric/conversion/detail/converter.hpp" + template + struct applyBoth + { + typedef typename PredA::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + range_check_result r = PredA::apply(s) ; + if ( r == cInRange ) + r = PredB::apply(s); + return r ; + } + } ; + + template + struct combine + { + typedef applyBoth Both ; + typedef void NNone ; + + typedef typename PredA::do_apply do_applyA ; + typedef typename PredB::do_apply do_applyB ; + + typedef typename for_both::type type ; + } ; +# 262 "/usr/include/boost-1_42/boost/numeric/conversion/detail/converter.hpp" + template + struct dummy_range_checker + { + typedef typename Traits::argument_type argument_type ; + + static range_check_result out_of_range ( argument_type ) { return cInRange ; } + static void validate_range ( argument_type ) {} + } ; +# 279 "/usr/include/boost-1_42/boost/numeric/conversion/detail/converter.hpp" + template + struct generic_range_checker + { + typedef OverflowHandler overflow_handler ; + + typedef typename Traits::argument_type argument_type ; + + static range_check_result out_of_range ( argument_type s ) + { + typedef typename combine::type Predicate ; + + return Predicate::apply(s); + } + + static void validate_range ( argument_type s ) + { OverflowHandler()( out_of_range(s) ) ; } + } ; +# 305 "/usr/include/boost-1_42/boost/numeric/conversion/detail/converter.hpp" + template + struct GetRC_Sig2Sig_or_Unsig2Unsig + { + typedef dummy_range_checker Dummy ; + + typedef LT_LoT Pred1 ; + typedef GT_HiT Pred2 ; + + typedef generic_range_checker Normal ; + + typedef typename Traits::subranged subranged ; + + typedef typename mpl::if_::type type ; + } ; + + template + struct GetRC_Sig2Unsig + { + typedef LT_Zero Pred1 ; + typedef GT_HiT Pred2 ; + + typedef generic_range_checker ChoiceA ; + + typedef generic_range_checker ChoiceB ; + + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + + typedef typename subranged_Unsig2Sig::type oposite_subranged ; + + typedef typename mpl::not_::type positively_subranged ; + + typedef typename mpl::if_::type type ; + } ; + + template + struct GetRC_Unsig2Sig + { + typedef GT_HiT Pred1 ; + + typedef generic_range_checker type ; + } ; + + template + struct GetRC_Int2Int + { + typedef GetRC_Sig2Sig_or_Unsig2Unsig Sig2SigQ ; + typedef GetRC_Sig2Unsig Sig2UnsigQ ; + typedef GetRC_Unsig2Sig Unsig2SigQ ; + typedef Sig2SigQ Unsig2UnsigQ ; + + typedef typename Traits::sign_mixture sign_mixture ; + + typedef typename + for_sign_mixture::type + selector ; + + typedef typename selector::type type ; + } ; + + template + struct GetRC_Int2Float + { + typedef dummy_range_checker type ; + } ; + + template + struct GetRC_Float2Int + { + typedef LE_PrevLoT Pred1 ; + typedef GE_SuccHiT Pred2 ; + typedef LT_HalfPrevLoT Pred3 ; + typedef GT_HalfSuccHiT Pred4 ; + typedef GT_HiT Pred5 ; + typedef LT_LoT Pred6 ; + + typedef generic_range_checker ToZero ; + typedef generic_range_checker ToNearest ; + typedef generic_range_checker ToInf ; + typedef generic_range_checker ToNegInf ; + + typedef typename Float2IntRounder::round_style round_style ; + + typedef typename for_round_style::type type ; + } ; + + template + struct GetRC_Float2Float + { + typedef dummy_range_checker Dummy ; + + typedef LT_LoT Pred1 ; + typedef GT_HiT Pred2 ; + + typedef generic_range_checker Normal ; + + typedef typename Traits::subranged subranged ; + + typedef typename mpl::if_::type type ; + } ; + + template + struct GetRC_BuiltIn2BuiltIn + { + typedef GetRC_Int2Int Int2IntQ ; + typedef GetRC_Int2Float Int2FloatQ ; + typedef GetRC_Float2Int Float2IntQ ; + typedef GetRC_Float2Float Float2FloatQ ; + + typedef typename Traits::int_float_mixture int_float_mixture ; + + typedef typename for_int_float_mixture::type selector ; + + typedef typename selector::type type ; + } ; + + template + struct GetRC + { + typedef GetRC_BuiltIn2BuiltIn BuiltIn2BuiltInQ ; + + typedef dummy_range_checker Dummy ; + + typedef mpl::identity DummyQ ; + + typedef typename Traits::udt_builtin_mixture udt_builtin_mixture ; + + typedef typename for_udt_builtin_mixture::type selector ; + + typedef typename selector::type type ; + } ; +# 452 "/usr/include/boost-1_42/boost/numeric/conversion/detail/converter.hpp" + template + struct trivial_converter_impl : public std::unary_function< typename Traits::argument_type + ,typename Traits::result_type + > + ,public dummy_range_checker + { + typedef Traits traits ; + + typedef typename Traits::source_type source_type ; + typedef typename Traits::argument_type argument_type ; + typedef typename Traits::result_type result_type ; + + static result_type low_level_convert ( argument_type s ) { return s ; } + static source_type nearbyint ( argument_type s ) { return s ; } + static result_type convert ( argument_type s ) { return s ; } + } ; + + + + + + template + struct rounding_converter : public std::unary_function< typename Traits::argument_type + ,typename Traits::result_type + > + ,public RangeChecker + ,public Float2IntRounder + ,public RawConverter + { + typedef RangeChecker RangeCheckerBase ; + typedef Float2IntRounder Float2IntRounderBase ; + typedef RawConverter RawConverterBase ; + + typedef Traits traits ; + + typedef typename Traits::source_type source_type ; + typedef typename Traits::argument_type argument_type ; + typedef typename Traits::result_type result_type ; + + static result_type convert ( argument_type s ) + { + RangeCheckerBase::validate_range(s); + source_type s1 = Float2IntRounderBase::nearbyint(s); + return RawConverterBase::low_level_convert(s1); + } + } ; + + + + + + template + struct non_rounding_converter : public std::unary_function< typename Traits::argument_type + ,typename Traits::result_type + > + ,public RangeChecker + ,public RawConverter + { + typedef RangeChecker RangeCheckerBase ; + typedef RawConverter RawConverterBase ; + + typedef Traits traits ; + + typedef typename Traits::source_type source_type ; + typedef typename Traits::argument_type argument_type ; + typedef typename Traits::result_type result_type ; + + static source_type nearbyint ( argument_type s ) { return s ; } + + static result_type convert ( argument_type s ) + { + RangeCheckerBase::validate_range(s); + return RawConverterBase::low_level_convert(s); + } + } ; +# 537 "/usr/include/boost-1_42/boost/numeric/conversion/detail/converter.hpp" + template + struct get_non_trivial_converter + { + typedef GetRC InternalRangeCheckerQ ; + + typedef is_same use_internal_RC ; + + typedef mpl::identity UserRangeCheckerQ ; + + typedef typename + mpl::eval_if::type + RangeChecker ; + + typedef non_rounding_converter NonRounding ; + typedef rounding_converter Rounding ; + + typedef mpl::identity NonRoundingQ ; + typedef mpl::identity RoundingQ ; + + typedef typename Traits::int_float_mixture int_float_mixture ; + + typedef typename + for_int_float_mixture::type + selector ; + + typedef typename selector::type type ; + } ; + + template< class Traits + ,class OverflowHandler + ,class Float2IntRounder + ,class RawConverter + ,class UserRangeChecker + > + struct get_converter_impl + { +# 583 "/usr/include/boost-1_42/boost/numeric/conversion/detail/converter.hpp" + typedef trivial_converter_impl Trivial ; + typedef mpl::identity TrivialQ ; + + typedef get_non_trivial_converter< Traits + ,OverflowHandler + ,Float2IntRounder + ,RawConverter + ,UserRangeChecker + > NonTrivialQ ; + + typedef typename Traits::trivial trivial ; + + typedef typename mpl::eval_if::type type ; + } ; + +} } } +# 17 "/usr/include/boost-1_42/boost/numeric/conversion/converter.hpp" 2 + +namespace boost { namespace numeric +{ + +template, + class OverflowHandler = def_overflow_handler, + class Float2IntRounder = Trunc< typename Traits::source_type> , + class RawConverter = raw_converter, + class UserRangeChecker = UseInternalRangeChecker + > +struct converter : convdetail::get_converter_impl::type +{ + typedef Traits traits ; + + typedef typename Traits::argument_type argument_type ; + typedef typename Traits::result_type result_type ; + + result_type operator() ( argument_type s ) const { return this->convert(s) ; } +} ; + + + +template , + class UserRangeChecker = UseInternalRangeChecker + > +struct make_converter_from +{ + template, + class RawConverter = raw_converter + > + struct to + { + typedef converter type ; + } ; + +} ; + +} } +# 33 "/usr/include/boost-1_42/boost/numeric/conversion/cast.hpp" 2 + +namespace boost +{ + template + inline + Target numeric_cast ( Source arg ) + { + typedef boost::numeric::converter Converter ; + return Converter::convert(arg); + } + + using numeric::bad_numeric_cast; + +} +# 14 "/usr/include/boost-1_42/boost/python/suite/indexing/detail/indexing_suite_detail.hpp" 2 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/map" 1 3 +# 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/map" 3 + +# 59 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/map" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_tree.h" 1 3 +# 67 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_tree.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { +# 85 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_tree.h" 3 + enum _Rb_tree_color { _S_red = false, _S_black = true }; + + struct _Rb_tree_node_base + { + typedef _Rb_tree_node_base* _Base_ptr; + typedef const _Rb_tree_node_base* _Const_Base_ptr; + + _Rb_tree_color _M_color; + _Base_ptr _M_parent; + _Base_ptr _M_left; + _Base_ptr _M_right; + + static _Base_ptr + _S_minimum(_Base_ptr __x) + { + while (__x->_M_left != 0) __x = __x->_M_left; + return __x; + } + + static _Const_Base_ptr + _S_minimum(_Const_Base_ptr __x) + { + while (__x->_M_left != 0) __x = __x->_M_left; + return __x; + } + + static _Base_ptr + _S_maximum(_Base_ptr __x) + { + while (__x->_M_right != 0) __x = __x->_M_right; + return __x; + } + + static _Const_Base_ptr + _S_maximum(_Const_Base_ptr __x) + { + while (__x->_M_right != 0) __x = __x->_M_right; + return __x; + } + }; + + template + struct _Rb_tree_node : public _Rb_tree_node_base + { + typedef _Rb_tree_node<_Val>* _Link_type; + _Val _M_value_field; + + + + + + + + }; + + __attribute__ ((__pure__)) _Rb_tree_node_base* + _Rb_tree_increment(_Rb_tree_node_base* __x) throw (); + + __attribute__ ((__pure__)) const _Rb_tree_node_base* + _Rb_tree_increment(const _Rb_tree_node_base* __x) throw (); + + __attribute__ ((__pure__)) _Rb_tree_node_base* + _Rb_tree_decrement(_Rb_tree_node_base* __x) throw (); + + __attribute__ ((__pure__)) const _Rb_tree_node_base* + _Rb_tree_decrement(const _Rb_tree_node_base* __x) throw (); + + template + struct _Rb_tree_iterator + { + typedef _Tp value_type; + typedef _Tp& reference; + typedef _Tp* pointer; + + typedef bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + + typedef _Rb_tree_iterator<_Tp> _Self; + typedef _Rb_tree_node_base::_Base_ptr _Base_ptr; + typedef _Rb_tree_node<_Tp>* _Link_type; + + _Rb_tree_iterator() + : _M_node() { } + + explicit + _Rb_tree_iterator(_Link_type __x) + : _M_node(__x) { } + + reference + operator*() const + { return static_cast<_Link_type>(_M_node)->_M_value_field; } + + pointer + operator->() const + { return &static_cast<_Link_type>(_M_node)->_M_value_field; } + + _Self& + operator++() + { + _M_node = _Rb_tree_increment(_M_node); + return *this; + } + + _Self + operator++(int) + { + _Self __tmp = *this; + _M_node = _Rb_tree_increment(_M_node); + return __tmp; + } + + _Self& + operator--() + { + _M_node = _Rb_tree_decrement(_M_node); + return *this; + } + + _Self + operator--(int) + { + _Self __tmp = *this; + _M_node = _Rb_tree_decrement(_M_node); + return __tmp; + } + + bool + operator==(const _Self& __x) const + { return _M_node == __x._M_node; } + + bool + operator!=(const _Self& __x) const + { return _M_node != __x._M_node; } + + _Base_ptr _M_node; + }; + + template + struct _Rb_tree_const_iterator + { + typedef _Tp value_type; + typedef const _Tp& reference; + typedef const _Tp* pointer; + + typedef _Rb_tree_iterator<_Tp> iterator; + + typedef bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + + typedef _Rb_tree_const_iterator<_Tp> _Self; + typedef _Rb_tree_node_base::_Const_Base_ptr _Base_ptr; + typedef const _Rb_tree_node<_Tp>* _Link_type; + + _Rb_tree_const_iterator() + : _M_node() { } + + explicit + _Rb_tree_const_iterator(_Link_type __x) + : _M_node(__x) { } + + _Rb_tree_const_iterator(const iterator& __it) + : _M_node(__it._M_node) { } + + reference + operator*() const + { return static_cast<_Link_type>(_M_node)->_M_value_field; } + + pointer + operator->() const + { return &static_cast<_Link_type>(_M_node)->_M_value_field; } + + _Self& + operator++() + { + _M_node = _Rb_tree_increment(_M_node); + return *this; + } + + _Self + operator++(int) + { + _Self __tmp = *this; + _M_node = _Rb_tree_increment(_M_node); + return __tmp; + } + + _Self& + operator--() + { + _M_node = _Rb_tree_decrement(_M_node); + return *this; + } + + _Self + operator--(int) + { + _Self __tmp = *this; + _M_node = _Rb_tree_decrement(_M_node); + return __tmp; + } + + bool + operator==(const _Self& __x) const + { return _M_node == __x._M_node; } + + bool + operator!=(const _Self& __x) const + { return _M_node != __x._M_node; } + + _Base_ptr _M_node; + }; + + template + inline bool + operator==(const _Rb_tree_iterator<_Val>& __x, + const _Rb_tree_const_iterator<_Val>& __y) + { return __x._M_node == __y._M_node; } + + template + inline bool + operator!=(const _Rb_tree_iterator<_Val>& __x, + const _Rb_tree_const_iterator<_Val>& __y) + { return __x._M_node != __y._M_node; } + + void + _Rb_tree_insert_and_rebalance(const bool __insert_left, + _Rb_tree_node_base* __x, + _Rb_tree_node_base* __p, + _Rb_tree_node_base& __header) throw (); + + _Rb_tree_node_base* + _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z, + _Rb_tree_node_base& __header) throw (); + + + template > + class _Rb_tree + { + typedef typename _Alloc::template rebind<_Rb_tree_node<_Val> >::other + _Node_allocator; + + protected: + typedef _Rb_tree_node_base* _Base_ptr; + typedef const _Rb_tree_node_base* _Const_Base_ptr; + + public: + typedef _Key key_type; + typedef _Val value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef _Rb_tree_node<_Val>* _Link_type; + typedef const _Rb_tree_node<_Val>* _Const_Link_type; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Alloc allocator_type; + + _Node_allocator& + _M_get_Node_allocator() + { return *static_cast<_Node_allocator*>(&this->_M_impl); } + + const _Node_allocator& + _M_get_Node_allocator() const + { return *static_cast(&this->_M_impl); } + + allocator_type + get_allocator() const + { return allocator_type(_M_get_Node_allocator()); } + + protected: + _Link_type + _M_get_node() + { return _M_impl._Node_allocator::allocate(1); } + + void + _M_put_node(_Link_type __p) + { _M_impl._Node_allocator::deallocate(__p, 1); } + + + _Link_type + _M_create_node(const value_type& __x) + { + _Link_type __tmp = _M_get_node(); + try + { get_allocator().construct(&__tmp->_M_value_field, __x); } + catch(...) + { + _M_put_node(__tmp); + throw; + } + return __tmp; + } + + void + _M_destroy_node(_Link_type __p) + { + get_allocator().destroy(&__p->_M_value_field); + _M_put_node(__p); + } +# 413 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_tree.h" 3 + _Link_type + _M_clone_node(_Const_Link_type __x) + { + _Link_type __tmp = _M_create_node(__x->_M_value_field); + __tmp->_M_color = __x->_M_color; + __tmp->_M_left = 0; + __tmp->_M_right = 0; + return __tmp; + } + + protected: + template + struct _Rb_tree_impl : public _Node_allocator + { + _Key_compare _M_key_compare; + _Rb_tree_node_base _M_header; + size_type _M_node_count; + + _Rb_tree_impl() + : _Node_allocator(), _M_key_compare(), _M_header(), + _M_node_count(0) + { _M_initialize(); } + + _Rb_tree_impl(const _Key_compare& __comp, const _Node_allocator& __a) + : _Node_allocator(__a), _M_key_compare(__comp), _M_header(), + _M_node_count(0) + { _M_initialize(); } + + private: + void + _M_initialize() + { + this->_M_header._M_color = _S_red; + this->_M_header._M_parent = 0; + this->_M_header._M_left = &this->_M_header; + this->_M_header._M_right = &this->_M_header; + } + }; + + _Rb_tree_impl<_Compare> _M_impl; + + protected: + _Base_ptr& + _M_root() + { return this->_M_impl._M_header._M_parent; } + + _Const_Base_ptr + _M_root() const + { return this->_M_impl._M_header._M_parent; } + + _Base_ptr& + _M_leftmost() + { return this->_M_impl._M_header._M_left; } + + _Const_Base_ptr + _M_leftmost() const + { return this->_M_impl._M_header._M_left; } + + _Base_ptr& + _M_rightmost() + { return this->_M_impl._M_header._M_right; } + + _Const_Base_ptr + _M_rightmost() const + { return this->_M_impl._M_header._M_right; } + + _Link_type + _M_begin() + { return static_cast<_Link_type>(this->_M_impl._M_header._M_parent); } + + _Const_Link_type + _M_begin() const + { + return static_cast<_Const_Link_type> + (this->_M_impl._M_header._M_parent); + } + + _Link_type + _M_end() + { return static_cast<_Link_type>(&this->_M_impl._M_header); } + + _Const_Link_type + _M_end() const + { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); } + + static const_reference + _S_value(_Const_Link_type __x) + { return __x->_M_value_field; } + + static const _Key& + _S_key(_Const_Link_type __x) + { return _KeyOfValue()(_S_value(__x)); } + + static _Link_type + _S_left(_Base_ptr __x) + { return static_cast<_Link_type>(__x->_M_left); } + + static _Const_Link_type + _S_left(_Const_Base_ptr __x) + { return static_cast<_Const_Link_type>(__x->_M_left); } + + static _Link_type + _S_right(_Base_ptr __x) + { return static_cast<_Link_type>(__x->_M_right); } + + static _Const_Link_type + _S_right(_Const_Base_ptr __x) + { return static_cast<_Const_Link_type>(__x->_M_right); } + + static const_reference + _S_value(_Const_Base_ptr __x) + { return static_cast<_Const_Link_type>(__x)->_M_value_field; } + + static const _Key& + _S_key(_Const_Base_ptr __x) + { return _KeyOfValue()(_S_value(__x)); } + + static _Base_ptr + _S_minimum(_Base_ptr __x) + { return _Rb_tree_node_base::_S_minimum(__x); } + + static _Const_Base_ptr + _S_minimum(_Const_Base_ptr __x) + { return _Rb_tree_node_base::_S_minimum(__x); } + + static _Base_ptr + _S_maximum(_Base_ptr __x) + { return _Rb_tree_node_base::_S_maximum(__x); } + + static _Const_Base_ptr + _S_maximum(_Const_Base_ptr __x) + { return _Rb_tree_node_base::_S_maximum(__x); } + + public: + typedef _Rb_tree_iterator iterator; + typedef _Rb_tree_const_iterator const_iterator; + + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + + private: + iterator + _M_insert_(_Const_Base_ptr __x, _Const_Base_ptr __y, + const value_type& __v); + + + + iterator + _M_insert_lower(_Base_ptr __x, _Base_ptr __y, const value_type& __v); + + iterator + _M_insert_equal_lower(const value_type& __x); + + _Link_type + _M_copy(_Const_Link_type __x, _Link_type __p); + + void + _M_erase(_Link_type __x); + + iterator + _M_lower_bound(_Link_type __x, _Link_type __y, + const _Key& __k); + + const_iterator + _M_lower_bound(_Const_Link_type __x, _Const_Link_type __y, + const _Key& __k) const; + + iterator + _M_upper_bound(_Link_type __x, _Link_type __y, + const _Key& __k); + + const_iterator + _M_upper_bound(_Const_Link_type __x, _Const_Link_type __y, + const _Key& __k) const; + + public: + + _Rb_tree() { } + + _Rb_tree(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_impl(__comp, __a) { } + + _Rb_tree(const _Rb_tree& __x) + : _M_impl(__x._M_impl._M_key_compare, __x._M_get_Node_allocator()) + { + if (__x._M_root() != 0) + { + _M_root() = _M_copy(__x._M_begin(), _M_end()); + _M_leftmost() = _S_minimum(_M_root()); + _M_rightmost() = _S_maximum(_M_root()); + _M_impl._M_node_count = __x._M_impl._M_node_count; + } + } + + + + + + ~_Rb_tree() + { _M_erase(_M_begin()); } + + _Rb_tree& + operator=(const _Rb_tree& __x); + + + _Compare + key_comp() const + { return _M_impl._M_key_compare; } + + iterator + begin() + { + return iterator(static_cast<_Link_type> + (this->_M_impl._M_header._M_left)); + } + + const_iterator + begin() const + { + return const_iterator(static_cast<_Const_Link_type> + (this->_M_impl._M_header._M_left)); + } + + iterator + end() + { return iterator(static_cast<_Link_type>(&this->_M_impl._M_header)); } + + const_iterator + end() const + { + return const_iterator(static_cast<_Const_Link_type> + (&this->_M_impl._M_header)); + } + + reverse_iterator + rbegin() + { return reverse_iterator(end()); } + + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(end()); } + + reverse_iterator + rend() + { return reverse_iterator(begin()); } + + const_reverse_iterator + rend() const + { return const_reverse_iterator(begin()); } + + bool + empty() const + { return _M_impl._M_node_count == 0; } + + size_type + size() const + { return _M_impl._M_node_count; } + + size_type + max_size() const + { return _M_get_Node_allocator().max_size(); } + + void + swap(_Rb_tree& __t); + + + pair + _M_insert_unique(const value_type& __x); + + iterator + _M_insert_equal(const value_type& __x); + + iterator + _M_insert_unique_(const_iterator __position, const value_type& __x); + + iterator + _M_insert_equal_(const_iterator __position, const value_type& __x); + + template + void + _M_insert_unique(_InputIterator __first, _InputIterator __last); + + template + void + _M_insert_equal(_InputIterator __first, _InputIterator __last); +# 712 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_tree.h" 3 + void + erase(iterator __position); + + void + erase(const_iterator __position); + + size_type + erase(const key_type& __x); +# 732 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_tree.h" 3 + void + erase(iterator __first, iterator __last); + + void + erase(const_iterator __first, const_iterator __last); + + void + erase(const key_type* __first, const key_type* __last); + + void + clear() + { + _M_erase(_M_begin()); + _M_leftmost() = _M_end(); + _M_root() = 0; + _M_rightmost() = _M_end(); + _M_impl._M_node_count = 0; + } + + + iterator + find(const key_type& __k); + + const_iterator + find(const key_type& __k) const; + + size_type + count(const key_type& __k) const; + + iterator + lower_bound(const key_type& __k) + { return _M_lower_bound(_M_begin(), _M_end(), __k); } + + const_iterator + lower_bound(const key_type& __k) const + { return _M_lower_bound(_M_begin(), _M_end(), __k); } + + iterator + upper_bound(const key_type& __k) + { return _M_upper_bound(_M_begin(), _M_end(), __k); } + + const_iterator + upper_bound(const key_type& __k) const + { return _M_upper_bound(_M_begin(), _M_end(), __k); } + + pair + equal_range(const key_type& __k); + + pair + equal_range(const key_type& __k) const; + + + bool + __rb_verify() const; + }; + + template + inline bool + operator==(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { + return __x.size() == __y.size() + && std::equal(__x.begin(), __x.end(), __y.begin()); + } + + template + inline bool + operator<(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { + return std::lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); + } + + template + inline bool + operator!=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { return !(__x == __y); } + + template + inline bool + operator>(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { return __y < __x; } + + template + inline bool + operator<=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { return !(__y < __x); } + + template + inline bool + operator>=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { return !(__x < __y); } + + template + inline void + swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { __x.swap(__y); } +# 867 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_tree.h" 3 + template + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + operator=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x) + { + if (this != &__x) + { + + clear(); + _M_impl._M_key_compare = __x._M_impl._M_key_compare; + if (__x._M_root() != 0) + { + _M_root() = _M_copy(__x._M_begin(), _M_end()); + _M_leftmost() = _S_minimum(_M_root()); + _M_rightmost() = _S_maximum(_M_root()); + _M_impl._M_node_count = __x._M_impl._M_node_count; + } + } + return *this; + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_(_Const_Base_ptr __x, _Const_Base_ptr __p, const _Val& __v) + { + bool __insert_left = (__x != 0 || __p == _M_end() + || _M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key(__p))); + + _Link_type __z = _M_create_node(__v); + + _Rb_tree_insert_and_rebalance(__insert_left, __z, + const_cast<_Base_ptr>(__p), + this->_M_impl._M_header); + ++_M_impl._M_node_count; + return iterator(__z); + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_lower(_Base_ptr __x, _Base_ptr __p, const _Val& __v) + { + bool __insert_left = (__x != 0 || __p == _M_end() + || !_M_impl._M_key_compare(_S_key(__p), + _KeyOfValue()(__v))); + + _Link_type __z = _M_create_node(__v); + + _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, + this->_M_impl._M_header); + ++_M_impl._M_node_count; + return iterator(__z); + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_equal_lower(const _Val& __v) + { + _Link_type __x = _M_begin(); + _Link_type __y = _M_end(); + while (__x != 0) + { + __y = __x; + __x = !_M_impl._M_key_compare(_S_key(__x), _KeyOfValue()(__v)) ? + _S_left(__x) : _S_right(__x); + } + return _M_insert_lower(__x, __y, __v); + } + + template + typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::_Link_type + _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>:: + _M_copy(_Const_Link_type __x, _Link_type __p) + { + + _Link_type __top = _M_clone_node(__x); + __top->_M_parent = __p; + + try + { + if (__x->_M_right) + __top->_M_right = _M_copy(_S_right(__x), __top); + __p = __top; + __x = _S_left(__x); + + while (__x != 0) + { + _Link_type __y = _M_clone_node(__x); + __p->_M_left = __y; + __y->_M_parent = __p; + if (__x->_M_right) + __y->_M_right = _M_copy(_S_right(__x), __y); + __p = __y; + __x = _S_left(__x); + } + } + catch(...) + { + _M_erase(__top); + throw; + } + return __top; + } + + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_erase(_Link_type __x) + { + + while (__x != 0) + { + _M_erase(_S_right(__x)); + _Link_type __y = _S_left(__x); + _M_destroy_node(__x); + __x = __y; + } + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_lower_bound(_Link_type __x, _Link_type __y, + const _Key& __k) + { + while (__x != 0) + if (!_M_impl._M_key_compare(_S_key(__x), __k)) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + return iterator(__y); + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::const_iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_lower_bound(_Const_Link_type __x, _Const_Link_type __y, + const _Key& __k) const + { + while (__x != 0) + if (!_M_impl._M_key_compare(_S_key(__x), __k)) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + return const_iterator(__y); + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_upper_bound(_Link_type __x, _Link_type __y, + const _Key& __k) + { + while (__x != 0) + if (_M_impl._M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + return iterator(__y); + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::const_iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_upper_bound(_Const_Link_type __x, _Const_Link_type __y, + const _Key& __k) const + { + while (__x != 0) + if (_M_impl._M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + return const_iterator(__y); + } + + template + pair::iterator, + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::iterator> + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + equal_range(const _Key& __k) + { + _Link_type __x = _M_begin(); + _Link_type __y = _M_end(); + while (__x != 0) + { + if (_M_impl._M_key_compare(_S_key(__x), __k)) + __x = _S_right(__x); + else if (_M_impl._M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + { + _Link_type __xu(__x), __yu(__y); + __y = __x, __x = _S_left(__x); + __xu = _S_right(__xu); + return pair(_M_lower_bound(__x, __y, __k), + _M_upper_bound(__xu, __yu, __k)); + } + } + return pair(iterator(__y), + iterator(__y)); + } + + template + pair::const_iterator, + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::const_iterator> + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + equal_range(const _Key& __k) const + { + _Const_Link_type __x = _M_begin(); + _Const_Link_type __y = _M_end(); + while (__x != 0) + { + if (_M_impl._M_key_compare(_S_key(__x), __k)) + __x = _S_right(__x); + else if (_M_impl._M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + { + _Const_Link_type __xu(__x), __yu(__y); + __y = __x, __x = _S_left(__x); + __xu = _S_right(__xu); + return pair(_M_lower_bound(__x, __y, __k), + _M_upper_bound(__xu, __yu, __k)); + } + } + return pair(const_iterator(__y), + const_iterator(__y)); + } + + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __t) + { + if (_M_root() == 0) + { + if (__t._M_root() != 0) + { + _M_root() = __t._M_root(); + _M_leftmost() = __t._M_leftmost(); + _M_rightmost() = __t._M_rightmost(); + _M_root()->_M_parent = _M_end(); + + __t._M_root() = 0; + __t._M_leftmost() = __t._M_end(); + __t._M_rightmost() = __t._M_end(); + } + } + else if (__t._M_root() == 0) + { + __t._M_root() = _M_root(); + __t._M_leftmost() = _M_leftmost(); + __t._M_rightmost() = _M_rightmost(); + __t._M_root()->_M_parent = __t._M_end(); + + _M_root() = 0; + _M_leftmost() = _M_end(); + _M_rightmost() = _M_end(); + } + else + { + std::swap(_M_root(),__t._M_root()); + std::swap(_M_leftmost(),__t._M_leftmost()); + std::swap(_M_rightmost(),__t._M_rightmost()); + + _M_root()->_M_parent = _M_end(); + __t._M_root()->_M_parent = __t._M_end(); + } + + std::swap(this->_M_impl._M_node_count, __t._M_impl._M_node_count); + std::swap(this->_M_impl._M_key_compare, __t._M_impl._M_key_compare); + + + + std::__alloc_swap<_Node_allocator>:: + _S_do_it(_M_get_Node_allocator(), __t._M_get_Node_allocator()); + } + + template + pair::iterator, bool> + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_unique(const _Val& __v) + { + _Link_type __x = _M_begin(); + _Link_type __y = _M_end(); + bool __comp = true; + while (__x != 0) + { + __y = __x; + __comp = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x)); + __x = __comp ? _S_left(__x) : _S_right(__x); + } + iterator __j = iterator(__y); + if (__comp) + { + if (__j == begin()) + return pair(_M_insert_(__x, __y, __v), true); + else + --__j; + } + if (_M_impl._M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v))) + return pair(_M_insert_(__x, __y, __v), true); + return pair(__j, false); + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_equal(const _Val& __v) + { + _Link_type __x = _M_begin(); + _Link_type __y = _M_end(); + while (__x != 0) + { + __y = __x; + __x = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x)) ? + _S_left(__x) : _S_right(__x); + } + return _M_insert_(__x, __y, __v); + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_unique_(const_iterator __position, const _Val& __v) + { + + if (__position._M_node == _M_end()) + { + if (size() > 0 + && _M_impl._M_key_compare(_S_key(_M_rightmost()), + _KeyOfValue()(__v))) + return _M_insert_(0, _M_rightmost(), __v); + else + return _M_insert_unique(__v).first; + } + else if (_M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key(__position._M_node))) + { + + const_iterator __before = __position; + if (__position._M_node == _M_leftmost()) + return _M_insert_(_M_leftmost(), _M_leftmost(), __v); + else if (_M_impl._M_key_compare(_S_key((--__before)._M_node), + _KeyOfValue()(__v))) + { + if (_S_right(__before._M_node) == 0) + return _M_insert_(0, __before._M_node, __v); + else + return _M_insert_(__position._M_node, + __position._M_node, __v); + } + else + return _M_insert_unique(__v).first; + } + else if (_M_impl._M_key_compare(_S_key(__position._M_node), + _KeyOfValue()(__v))) + { + + const_iterator __after = __position; + if (__position._M_node == _M_rightmost()) + return _M_insert_(0, _M_rightmost(), __v); + else if (_M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key((++__after)._M_node))) + { + if (_S_right(__position._M_node) == 0) + return _M_insert_(0, __position._M_node, __v); + else + return _M_insert_(__after._M_node, __after._M_node, __v); + } + else + return _M_insert_unique(__v).first; + } + else + + return iterator(static_cast<_Link_type> + (const_cast<_Base_ptr>(__position._M_node))); + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_equal_(const_iterator __position, const _Val& __v) + { + + if (__position._M_node == _M_end()) + { + if (size() > 0 + && !_M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key(_M_rightmost()))) + return _M_insert_(0, _M_rightmost(), __v); + else + return _M_insert_equal(__v); + } + else if (!_M_impl._M_key_compare(_S_key(__position._M_node), + _KeyOfValue()(__v))) + { + + const_iterator __before = __position; + if (__position._M_node == _M_leftmost()) + return _M_insert_(_M_leftmost(), _M_leftmost(), __v); + else if (!_M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key((--__before)._M_node))) + { + if (_S_right(__before._M_node) == 0) + return _M_insert_(0, __before._M_node, __v); + else + return _M_insert_(__position._M_node, + __position._M_node, __v); + } + else + return _M_insert_equal(__v); + } + else + { + + const_iterator __after = __position; + if (__position._M_node == _M_rightmost()) + return _M_insert_(0, _M_rightmost(), __v); + else if (!_M_impl._M_key_compare(_S_key((++__after)._M_node), + _KeyOfValue()(__v))) + { + if (_S_right(__position._M_node) == 0) + return _M_insert_(0, __position._M_node, __v); + else + return _M_insert_(__after._M_node, __after._M_node, __v); + } + else + return _M_insert_equal_lower(__v); + } + } + + template + template + void + _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: + _M_insert_unique(_II __first, _II __last) + { + for (; __first != __last; ++__first) + _M_insert_unique_(end(), *__first); + } + + template + template + void + _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: + _M_insert_equal(_II __first, _II __last) + { + for (; __first != __last; ++__first) + _M_insert_equal_(end(), *__first); + } +# 1391 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_tree.h" 3 + template + inline void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(iterator __position) + { + _Link_type __y = + static_cast<_Link_type>(_Rb_tree_rebalance_for_erase + (__position._M_node, + this->_M_impl._M_header)); + _M_destroy_node(__y); + --_M_impl._M_node_count; + } + + template + inline void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(const_iterator __position) + { + _Link_type __y = + static_cast<_Link_type>(_Rb_tree_rebalance_for_erase + (const_cast<_Base_ptr>(__position._M_node), + this->_M_impl._M_header)); + _M_destroy_node(__y); + --_M_impl._M_node_count; + } + + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(const _Key& __x) + { + pair __p = equal_range(__x); + const size_type __old_size = size(); + erase(__p.first, __p.second); + return __old_size - size(); + } +# 1475 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_tree.h" 3 + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(iterator __first, iterator __last) + { + if (__first == begin() && __last == end()) + clear(); + else + while (__first != __last) + erase(__first++); + } + + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(const_iterator __first, const_iterator __last) + { + if (__first == begin() && __last == end()) + clear(); + else + while (__first != __last) + erase(__first++); + } + + + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(const _Key* __first, const _Key* __last) + { + while (__first != __last) + erase(*__first++); + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + find(const _Key& __k) + { + iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k); + return (__j == end() + || _M_impl._M_key_compare(__k, + _S_key(__j._M_node))) ? end() : __j; + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::const_iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + find(const _Key& __k) const + { + const_iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k); + return (__j == end() + || _M_impl._M_key_compare(__k, + _S_key(__j._M_node))) ? end() : __j; + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + count(const _Key& __k) const + { + pair __p = equal_range(__k); + const size_type __n = std::distance(__p.first, __p.second); + return __n; + } + + __attribute__ ((__pure__)) unsigned int + _Rb_tree_black_count(const _Rb_tree_node_base* __node, + const _Rb_tree_node_base* __root) throw (); + + template + bool + _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::__rb_verify() const + { + if (_M_impl._M_node_count == 0 || begin() == end()) + return _M_impl._M_node_count == 0 && begin() == end() + && this->_M_impl._M_header._M_left == _M_end() + && this->_M_impl._M_header._M_right == _M_end(); + + unsigned int __len = _Rb_tree_black_count(_M_leftmost(), _M_root()); + for (const_iterator __it = begin(); __it != end(); ++__it) + { + _Const_Link_type __x = static_cast<_Const_Link_type>(__it._M_node); + _Const_Link_type __L = _S_left(__x); + _Const_Link_type __R = _S_right(__x); + + if (__x->_M_color == _S_red) + if ((__L && __L->_M_color == _S_red) + || (__R && __R->_M_color == _S_red)) + return false; + + if (__L && _M_impl._M_key_compare(_S_key(__x), _S_key(__L))) + return false; + if (__R && _M_impl._M_key_compare(_S_key(__R), _S_key(__x))) + return false; + + if (!__L && !__R && _Rb_tree_black_count(__x, _M_root()) != __len) + return false; + } + + if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root())) + return false; + if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root())) + return false; + return true; + } + +} +# 61 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/map" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 1 3 +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { +# 84 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + template , + typename _Alloc = std::allocator > > + class map + { + public: + typedef _Key key_type; + typedef _Tp mapped_type; + typedef std::pair value_type; + typedef _Compare key_compare; + typedef _Alloc allocator_type; + + private: + + typedef typename _Alloc::value_type _Alloc_value_type; + + + + + + public: + class value_compare + : public std::binary_function + { + friend class map<_Key, _Tp, _Compare, _Alloc>; + protected: + _Compare comp; + + value_compare(_Compare __c) + : comp(__c) { } + + public: + bool operator()(const value_type& __x, const value_type& __y) const + { return comp(__x.first, __y.first); } + }; + + private: + + typedef typename _Alloc::template rebind::other + _Pair_alloc_type; + + typedef _Rb_tree, + key_compare, _Pair_alloc_type> _Rep_type; + + + _Rep_type _M_t; + + public: + + + typedef typename _Pair_alloc_type::pointer pointer; + typedef typename _Pair_alloc_type::const_pointer const_pointer; + typedef typename _Pair_alloc_type::reference reference; + typedef typename _Pair_alloc_type::const_reference const_reference; + typedef typename _Rep_type::iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + typedef typename _Rep_type::reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; + + + + + + + + map() + : _M_t() { } + + + + + + + explicit + map(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) { } +# 170 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + map(const map& __x) + : _M_t(__x._M_t) { } +# 211 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + template + map(_InputIterator __first, _InputIterator __last) + : _M_t() + { _M_t._M_insert_unique(__first, __last); } +# 227 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + template + map(_InputIterator __first, _InputIterator __last, + const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) + { _M_t._M_insert_unique(__first, __last); } +# 250 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + map& + operator=(const map& __x) + { + _M_t = __x._M_t; + return *this; + } +# 296 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + allocator_type + get_allocator() const + { return _M_t.get_allocator(); } + + + + + + + + iterator + begin() + { return _M_t.begin(); } + + + + + + + const_iterator + begin() const + { return _M_t.begin(); } + + + + + + + iterator + end() + { return _M_t.end(); } + + + + + + + const_iterator + end() const + { return _M_t.end(); } + + + + + + + reverse_iterator + rbegin() + { return _M_t.rbegin(); } + + + + + + + const_reverse_iterator + rbegin() const + { return _M_t.rbegin(); } + + + + + + + reverse_iterator + rend() + { return _M_t.rend(); } + + + + + + + const_reverse_iterator + rend() const + { return _M_t.rend(); } +# 415 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + bool + empty() const + { return _M_t.empty(); } + + + size_type + size() const + { return _M_t.size(); } + + + size_type + max_size() const + { return _M_t.max_size(); } +# 442 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + mapped_type& + operator[](const key_type& __k) + { + + + + iterator __i = lower_bound(__k); + + if (__i == end() || key_comp()(__k, (*__i).first)) + __i = insert(__i, value_type(__k, mapped_type())); + return (*__i).second; + } +# 464 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + mapped_type& + at(const key_type& __k) + { + iterator __i = lower_bound(__k); + if (__i == end() || key_comp()(__k, (*__i).first)) + __throw_out_of_range(("map::at")); + return (*__i).second; + } + + const mapped_type& + at(const key_type& __k) const + { + const_iterator __i = lower_bound(__k); + if (__i == end() || key_comp()(__k, (*__i).first)) + __throw_out_of_range(("map::at")); + return (*__i).second; + } +# 499 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + std::pair + insert(const value_type& __x) + { return _M_t._M_insert_unique(__x); } +# 539 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + iterator + insert(iterator __position, const value_type& __x) + { return _M_t._M_insert_unique_(__position, __x); } +# 551 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + template + void + insert(_InputIterator __first, _InputIterator __last) + { _M_t._M_insert_unique(__first, __last); } +# 586 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + void + erase(iterator __position) + { _M_t.erase(__position); } +# 602 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + size_type + erase(const key_type& __x) + { return _M_t.erase(__x); } +# 636 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + void + erase(iterator __first, iterator __last) + { _M_t.erase(__first, __last); } +# 652 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + void + swap(map& __x) + { _M_t.swap(__x._M_t); } + + + + + + + + void + clear() + { _M_t.clear(); } + + + + + + + key_compare + key_comp() const + { return _M_t.key_comp(); } + + + + + + value_compare + value_comp() const + { return value_compare(_M_t.key_comp()); } +# 695 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + iterator + find(const key_type& __x) + { return _M_t.find(__x); } +# 710 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + const_iterator + find(const key_type& __x) const + { return _M_t.find(__x); } +# 722 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + size_type + count(const key_type& __x) const + { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } +# 737 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + iterator + lower_bound(const key_type& __x) + { return _M_t.lower_bound(__x); } +# 752 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + const_iterator + lower_bound(const key_type& __x) const + { return _M_t.lower_bound(__x); } + + + + + + + + iterator + upper_bound(const key_type& __x) + { return _M_t.upper_bound(__x); } + + + + + + + + const_iterator + upper_bound(const key_type& __x) const + { return _M_t.upper_bound(__x); } +# 791 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + std::pair + equal_range(const key_type& __x) + { return _M_t.equal_range(__x); } +# 810 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + std::pair + equal_range(const key_type& __x) const + { return _M_t.equal_range(__x); } + + template + friend bool + operator==(const map<_K1, _T1, _C1, _A1>&, + const map<_K1, _T1, _C1, _A1>&); + + template + friend bool + operator<(const map<_K1, _T1, _C1, _A1>&, + const map<_K1, _T1, _C1, _A1>&); + }; +# 835 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + template + inline bool + operator==(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return __x._M_t == __y._M_t; } +# 852 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_map.h" 3 + template + inline bool + operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return __x._M_t < __y._M_t; } + + + template + inline bool + operator!=(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__x == __y); } + + + template + inline bool + operator>(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return __y < __x; } + + + template + inline bool + operator<=(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__y < __x); } + + + template + inline bool + operator>=(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__x < __y); } + + + template + inline void + swap(map<_Key, _Tp, _Compare, _Alloc>& __x, + map<_Key, _Tp, _Compare, _Alloc>& __y) + { __x.swap(__y); } + +} +# 62 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/map" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_multimap.h" 1 3 +# 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_multimap.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { +# 83 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_multimap.h" 3 + template , + typename _Alloc = std::allocator > > + class multimap + { + public: + typedef _Key key_type; + typedef _Tp mapped_type; + typedef std::pair value_type; + typedef _Compare key_compare; + typedef _Alloc allocator_type; + + private: + + typedef typename _Alloc::value_type _Alloc_value_type; + + + + + + public: + class value_compare + : public std::binary_function + { + friend class multimap<_Key, _Tp, _Compare, _Alloc>; + protected: + _Compare comp; + + value_compare(_Compare __c) + : comp(__c) { } + + public: + bool operator()(const value_type& __x, const value_type& __y) const + { return comp(__x.first, __y.first); } + }; + + private: + + typedef typename _Alloc::template rebind::other + _Pair_alloc_type; + + typedef _Rb_tree, + key_compare, _Pair_alloc_type> _Rep_type; + + _Rep_type _M_t; + + public: + + + typedef typename _Pair_alloc_type::pointer pointer; + typedef typename _Pair_alloc_type::const_pointer const_pointer; + typedef typename _Pair_alloc_type::reference reference; + typedef typename _Pair_alloc_type::const_reference const_reference; + typedef typename _Rep_type::iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + typedef typename _Rep_type::reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; + + + + + + + multimap() + : _M_t() { } + + + + + + + explicit + multimap(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) { } +# 168 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_multimap.h" 3 + multimap(const multimap& __x) + : _M_t(__x._M_t) { } +# 208 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_multimap.h" 3 + template + multimap(_InputIterator __first, _InputIterator __last) + : _M_t() + { _M_t._M_insert_equal(__first, __last); } +# 224 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_multimap.h" 3 + template + multimap(_InputIterator __first, _InputIterator __last, + const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) + { _M_t._M_insert_equal(__first, __last); } +# 247 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_multimap.h" 3 + multimap& + operator=(const multimap& __x) + { + _M_t = __x._M_t; + return *this; + } +# 293 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_multimap.h" 3 + allocator_type + get_allocator() const + { return _M_t.get_allocator(); } + + + + + + + + iterator + begin() + { return _M_t.begin(); } + + + + + + + const_iterator + begin() const + { return _M_t.begin(); } + + + + + + + iterator + end() + { return _M_t.end(); } + + + + + + + const_iterator + end() const + { return _M_t.end(); } + + + + + + + reverse_iterator + rbegin() + { return _M_t.rbegin(); } + + + + + + + const_reverse_iterator + rbegin() const + { return _M_t.rbegin(); } + + + + + + + reverse_iterator + rend() + { return _M_t.rend(); } + + + + + + + const_reverse_iterator + rend() const + { return _M_t.rend(); } +# 410 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_multimap.h" 3 + bool + empty() const + { return _M_t.empty(); } + + + size_type + size() const + { return _M_t.size(); } + + + size_type + max_size() const + { return _M_t.max_size(); } +# 437 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_multimap.h" 3 + iterator + insert(const value_type& __x) + { return _M_t._M_insert_equal(__x); } +# 461 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_multimap.h" 3 + iterator + insert(iterator __position, const value_type& __x) + { return _M_t._M_insert_equal_(__position, __x); } +# 474 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_multimap.h" 3 + template + void + insert(_InputIterator __first, _InputIterator __last) + { _M_t._M_insert_equal(__first, __last); } +# 522 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_multimap.h" 3 + void + erase(iterator __position) + { _M_t.erase(__position); } +# 538 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_multimap.h" 3 + size_type + erase(const key_type& __x) + { return _M_t.erase(__x); } +# 574 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_multimap.h" 3 + void + erase(iterator __first, iterator __last) + { _M_t.erase(__first, __last); } +# 590 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_multimap.h" 3 + void + swap(multimap& __x) + { _M_t.swap(__x._M_t); } + + + + + + + + void + clear() + { _M_t.clear(); } + + + + + + + key_compare + key_comp() const + { return _M_t.key_comp(); } + + + + + + value_compare + value_comp() const + { return value_compare(_M_t.key_comp()); } +# 633 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_multimap.h" 3 + iterator + find(const key_type& __x) + { return _M_t.find(__x); } +# 648 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_multimap.h" 3 + const_iterator + find(const key_type& __x) const + { return _M_t.find(__x); } + + + + + + + size_type + count(const key_type& __x) const + { return _M_t.count(__x); } +# 672 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_multimap.h" 3 + iterator + lower_bound(const key_type& __x) + { return _M_t.lower_bound(__x); } +# 687 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_multimap.h" 3 + const_iterator + lower_bound(const key_type& __x) const + { return _M_t.lower_bound(__x); } + + + + + + + + iterator + upper_bound(const key_type& __x) + { return _M_t.upper_bound(__x); } + + + + + + + + const_iterator + upper_bound(const key_type& __x) const + { return _M_t.upper_bound(__x); } +# 724 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_multimap.h" 3 + std::pair + equal_range(const key_type& __x) + { return _M_t.equal_range(__x); } +# 741 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_multimap.h" 3 + std::pair + equal_range(const key_type& __x) const + { return _M_t.equal_range(__x); } + + template + friend bool + operator==(const multimap<_K1, _T1, _C1, _A1>&, + const multimap<_K1, _T1, _C1, _A1>&); + + template + friend bool + operator<(const multimap<_K1, _T1, _C1, _A1>&, + const multimap<_K1, _T1, _C1, _A1>&); + }; +# 766 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_multimap.h" 3 + template + inline bool + operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return __x._M_t == __y._M_t; } +# 783 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/bits/stl_multimap.h" 3 + template + inline bool + operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return __x._M_t < __y._M_t; } + + + template + inline bool + operator!=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__x == __y); } + + + template + inline bool + operator>(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return __y < __x; } + + + template + inline bool + operator<=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__y < __x); } + + + template + inline bool + operator>=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__x < __y); } + + + template + inline void + swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x, + multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { __x.swap(__y); } + +} +# 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/map" 2 3 +# 17 "/usr/include/boost-1_42/boost/python/suite/indexing/detail/indexing_suite_detail.hpp" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/iostream" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/iostream" 3 + +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/iostream" 3 + + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 59 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/iostream" 3 + extern istream cin; + extern ostream cout; + extern ostream cerr; + extern ostream clog; + + + extern wistream wcin; + extern wostream wcout; + extern wostream wcerr; + extern wostream wclog; + + + + + static ios_base::Init __ioinit; + +} +# 18 "/usr/include/boost-1_42/boost/python/suite/indexing/detail/indexing_suite_detail.hpp" 2 + +namespace boost { namespace python { namespace detail { + + + + + + + + template + struct compare_proxy_index + { + + + + + template + bool operator()(PyObject* prox, Index i) const + { + typedef typename Proxy::policies_type policies_type; + Proxy& proxy = extract(prox)(); + return policies_type:: + compare_index(proxy.get_container(), proxy.get_index(), i); + } + }; +# 53 "/usr/include/boost-1_42/boost/python/suite/indexing/detail/indexing_suite_detail.hpp" + template + class proxy_group + { + public: + + typedef typename std::vector::const_iterator const_iterator; + typedef typename std::vector::iterator iterator; + typedef typename Proxy::index_type index_type; + typedef typename Proxy::policies_type policies_type; + + iterator + first_proxy(index_type i) + { + + return boost::detail::lower_bound( + proxies.begin(), proxies.end(), + i, compare_proxy_index()); + } + + void + remove(Proxy& proxy) + { + + for (iterator iter = first_proxy(proxy.get_index()); + iter != proxies.end(); ++iter) + { + if (&extract(*iter)() == &proxy) + { + proxies.erase(iter); + break; + } + } + ; + } + + void + add(PyObject* prox) + { + ; + + proxies.insert( + first_proxy(extract(prox)().get_index()), prox); + ; + } + + void + erase(index_type i, mpl::false_) + { + ; + + replace(i, i+1, 0); + ; + } + + void + erase(index_type i, mpl::true_) + { + ; + + + iterator iter = first_proxy(i); + extract p(*iter); + + if (iter != proxies.end() && p().get_index() == i) + { + extract p(*iter); + p().detach(); + proxies.erase(iter); + } + ; + } + + void + erase(index_type from, index_type to) + { + + + ; + + replace(from, to, 0); + ; + } + + void + replace( + index_type from, + index_type to, + typename std::vector::size_type len) + { + + + ; + + + + + + + + iterator left = first_proxy(from); + iterator right = proxies.end(); + + for (iterator iter = left; iter != right; ++iter) + { + if (extract(*iter)().get_index() > to) + { + right = iter; + break; + } + extract p(*iter); + p().detach(); + } + + typename std::vector::size_type + offset = left-proxies.begin(); + proxies.erase(left, right); + right = proxies.begin()+offset; + + while (right != proxies.end()) + { + typedef typename Proxy::container_type::difference_type difference_type; + extract p(*right); + p().set_index( + extract(*right)().get_index() + - (difference_type(to) - from - len) + ); + + ++right; + } + ; + } + + PyObject* + find(index_type i) + { + ; + + + + iterator iter = first_proxy(i); + if (iter != proxies.end() + && extract(*iter)().get_index() == i) + { + ; + return *iter; + } + ; + return 0; + } + + typename std::vector::size_type + size() const + { + ; + + return proxies.size(); + } + + private: +# 240 "/usr/include/boost-1_42/boost/python/suite/indexing/detail/indexing_suite_detail.hpp" + std::vector proxies; + }; + + + + + + + template + class proxy_links + { + public: + + typedef std::map > links_t; + typedef typename Proxy::index_type index_type; + + void + remove(Proxy& proxy) + { + + typename links_t::iterator r = links.find(&proxy.get_container()); + if (r != links.end()) + { + r->second.remove(proxy); + if (r->second.size() == 0) + links.erase(r); + } + } + + void + add(PyObject* prox, Container& container) + { + + links[&container].add(prox); + } + + template + void erase(Container& container, index_type i, NoSlice no_slice) + { + + typename links_t::iterator r = links.find(&container); + if (r != links.end()) + { + r->second.erase(i, no_slice); + if (r->second.size() == 0) + links.erase(r); + } + } + + void + erase(Container& container, index_type from, index_type to) + { + + typename links_t::iterator r = links.find(&container); + if (r != links.end()) + { + r->second.erase(from, to); + if (r->second.size() == 0) + links.erase(r); + } + } + + void + replace( + Container& container, + index_type from, index_type to, index_type len) + { + + + + + + + + typename links_t::iterator r = links.find(&container); + if (r != links.end()) + { + r->second.replace(from, to, len); + if (r->second.size() == 0) + links.erase(r); + } + } + + PyObject* + find(Container& container, index_type i) + { + + + + typename links_t::iterator r = links.find(&container); + if (r != links.end()) + return r->second.find(i); + return 0; + } + + private: + + links_t links; + }; +# 351 "/usr/include/boost-1_42/boost/python/suite/indexing/detail/indexing_suite_detail.hpp" + template + class container_element + { + public: + + typedef Index index_type; + typedef Container container_type; + typedef typename Policies::data_type element_type; + typedef Policies policies_type; + typedef container_element self_t; + typedef proxy_group links_type; + + container_element(object container, Index index) + : ptr() + , container(container) + , index(index) + { + } + + container_element(container_element const& ce) + : ptr(ce.ptr.get() == 0 ? 0 : new element_type(*ce.ptr.get())) + , container(ce.container) + , index(ce.index) + { + } + + ~container_element() + { + if (!is_detached()) + get_links().remove(*this); + } + + element_type& operator*() const + { + if (is_detached()) + return *get_pointer(ptr); + return Policies::get_item(get_container(), index); + } + + element_type* get() const + { + if (is_detached()) + return get_pointer(ptr); + return &Policies::get_item(get_container(), index); + } + + void + detach() + { + if (!is_detached()) + { + ptr.reset( + new element_type( + Policies::get_item(get_container(), index))); + container = object(); + } + } + + bool + is_detached() const + { + return get_pointer(ptr) != 0; + } + + Container& + get_container() const + { + return extract(container)(); + } + + Index + get_index() const + { + return index; + } + + void + set_index(Index i) + { + index = i; + } + + static proxy_links& + get_links() + { + + + + + static proxy_links links; + return links; + } + + private: + + container_element& operator=(container_element const& ce); + + scoped_ptr ptr; + object container; + Index index; + }; + + template < + class Container + , class DerivedPolicies + , class ContainerElement + , class Index + > + struct no_proxy_helper + { + static void + register_container_element() + { + } + + template + static object + base_get_item_helper(DataType const& p, mpl::true_) + { + return object(ptr(p)); + } + + template + static object + base_get_item_helper(DataType const& x, mpl::false_) + { + return object(x); + } + + static object + base_get_item_(back_reference const& container, PyObject* i) + { + return base_get_item_helper( + DerivedPolicies::get_item( + container.get(), DerivedPolicies:: + convert_index(container.get(), i)) + , is_pointer() + ); + } + + static void + base_replace_indexes( + Container& , Index , + Index , Index ) + { + } + + template + static void + base_erase_index( + Container& , Index , NoSlice ) + { + } + + static void + base_erase_indexes(Container& , Index , Index ) + { + } + }; + + template < + class Container + , class DerivedPolicies + , class ContainerElement + , class Index + > + struct proxy_helper + { + static void + register_container_element() + { + register_ptr_to_python(); + } + + static object + base_get_item_(back_reference const& container, PyObject* i) + { + + Index idx = DerivedPolicies::convert_index(container.get(), i); + + if (PyObject* shared = + ContainerElement::get_links().find(container.get(), idx)) + { + handle<> h(python::borrowed(shared)); + return object(h); + } + else + { + object prox(ContainerElement(container.source(), idx)); + ContainerElement:: + get_links().add(prox.ptr(), container.get()); + return prox; + } + } + + static void + base_replace_indexes( + Container& container, Index from, + Index to, Index n) + { + ContainerElement::get_links().replace(container, from, to, n); + } + + template + static void + base_erase_index( + Container& container, Index i, NoSlice no_slice) + { + ContainerElement::get_links().erase(container, i, no_slice); + } + + static void + base_erase_indexes( + Container& container, Index from, Index to) + { + ContainerElement::get_links().erase(container, from, to); + } + }; + + template < + class Container + , class DerivedPolicies + , class ProxyHandler + , class Data + , class Index + > + struct slice_helper + { + static object + base_get_slice(Container& container, PySliceObject* slice) + { + Index from, to; + base_get_slice_data(container, slice, from, to); + return DerivedPolicies::get_slice(container, from, to); + } + + static void + base_get_slice_data( + Container& container, PySliceObject* slice, Index& from_, Index& to_) + { + if ((&_Py_NoneStruct) != slice->step) { + PyErr_SetString( PyExc_IndexError, "slice step size not supported."); + throw_error_already_set(); + } + + Index min_index = DerivedPolicies::get_min_index(container); + Index max_index = DerivedPolicies::get_max_index(container); + + if ((&_Py_NoneStruct) == slice->start) { + from_ = min_index; + } + else { + long from = extract( slice->start); + if (from < 0) + from += max_index; + if (from < 0) + from = 0; + from_ = boost::numeric_cast(from); + if (from_ > max_index) + from_ = max_index; + } + + if ((&_Py_NoneStruct) == slice->stop) { + to_ = max_index; + } + else { + long to = extract( slice->stop); + if (to < 0) + to += max_index; + if (to < 0) + to = 0; + to_ = boost::numeric_cast(to); + if (to_ > max_index) + to_ = max_index; + } + } + + static void + base_set_slice(Container& container, PySliceObject* slice, PyObject* v) + { + Index from, to; + base_get_slice_data(container, slice, from, to); + + extract elem(v); + + if (elem.check()) + { + ProxyHandler::base_replace_indexes(container, from, to, 1); + DerivedPolicies::set_slice(container, from, to, elem()); + } + else + { + + extract elem(v); + if (elem.check()) + { + ProxyHandler::base_replace_indexes(container, from, to, 1); + DerivedPolicies::set_slice(container, from, to, elem()); + } + else + { + + handle<> l_(python::borrowed(v)); + object l(l_); + + std::vector temp; + for (int i = 0; i < l.attr("__len__")(); i++) + { + object elem(l[i]); + extract x(elem); + + if (x.check()) + { + temp.push_back(x()); + } + else + { + + extract x(elem); + if (x.check()) + { + temp.push_back(x()); + } + else + { + PyErr_SetString(PyExc_TypeError, + "Invalid sequence element"); + throw_error_already_set(); + } + } + } + + ProxyHandler::base_replace_indexes(container, from, to, + temp.end()-temp.begin()); + DerivedPolicies::set_slice(container, from, to, + temp.begin(), temp.end()); + } + } + } + + static void + base_delete_slice(Container& container, PySliceObject* slice) + { + Index from, to; + base_get_slice_data(container, slice, from, to); + ProxyHandler::base_erase_indexes(container, from, to); + DerivedPolicies::delete_slice(container, from, to); + } + }; + + template < + class Container + , class DerivedPolicies + , class ProxyHandler + , class Data + , class Index + > + struct no_slice_helper + { + static void + slicing_not_suported() + { + PyErr_SetString(PyExc_RuntimeError, "Slicing not supported"); + throw_error_already_set(); + } + + static object + base_get_slice(Container& , PySliceObject* ) + { + slicing_not_suported(); + return object(); + } + + static void + base_set_slice(Container& , PySliceObject* , PyObject* ) + { + slicing_not_suported(); + } + + static void + base_delete_slice(Container& , PySliceObject* ) + { + slicing_not_suported(); + } + }; + + + + + + template + inline typename Policies::data_type* + get_pointer( + python::detail::container_element const& p) + { + + return p.get(); + } + + + + using boost::python::get_pointer; + using boost::get_pointer; +}} + + +} +# 13 "/usr/include/boost-1_42/boost/python/suite/indexing/indexing_suite.hpp" 2 + + + + + + +namespace boost { namespace python { +# 98 "/usr/include/boost-1_42/boost/python/suite/indexing/indexing_suite.hpp" + template < + class Container + , class DerivedPolicies + , bool NoProxy = false + , bool NoSlice = false + , class Data = typename Container::value_type + , class Index = typename Container::size_type + , class Key = typename Container::value_type + > + class indexing_suite + : public def_visitor< + indexing_suite< + Container + , DerivedPolicies + , NoProxy + , NoSlice + , Data + , Index + , Key + > > + { + private: + + typedef mpl::or_< + mpl::bool_ + , mpl::not_ > + , typename mpl::or_< + is_same + , is_same > + , is_same > + , is_same > >::type> + no_proxy; + + typedef detail::container_element + container_element_t; + + + + + typedef return_internal_reference<> return_policy; + + + typedef typename mpl::if_< + no_proxy + , iterator + , iterator >::type + def_iterator; + + typedef typename mpl::if_< + no_proxy + , detail::no_proxy_helper< + Container + , DerivedPolicies + , container_element_t + , Index> + , detail::proxy_helper< + Container + , DerivedPolicies + , container_element_t + , Index> >::type + proxy_handler; + + typedef typename mpl::if_< + mpl::bool_ + , detail::no_slice_helper< + Container + , DerivedPolicies + , proxy_handler + , Data + , Index> + , detail::slice_helper< + Container + , DerivedPolicies + , proxy_handler + , Data + , Index> >::type + slice_handler; + + public: + + template + void visit(Class& cl) const + { + + proxy_handler::register_container_element(); + + cl + .def("__len__", base_size) + .def("__setitem__", &base_set_item) + .def("__delitem__", &base_delete_item) + .def("__getitem__", &base_get_item) + .def("__contains__", &base_contains) + .def("__iter__", def_iterator()) + ; + + DerivedPolicies::extension_def(cl); + } + + template + static void + extension_def(Class& cl) + { + + + } + + private: + + static object + base_get_item(back_reference container, PyObject* i) + { + if (((((PyObject*)(i))->ob_type) == &PySlice_Type)) + return slice_handler::base_get_slice( + container.get(), static_cast(static_cast(i))); + + return proxy_handler::base_get_item_(container, i); + } + + static void + base_set_item(Container& container, PyObject* i, PyObject* v) + { + if (((((PyObject*)(i))->ob_type) == &PySlice_Type)) + { + slice_handler::base_set_slice(container, + static_cast(static_cast(i)), v); + } + else + { + extract elem(v); + + if (elem.check()) + { + DerivedPolicies:: + set_item(container, + DerivedPolicies:: + convert_index(container, i), elem()); + } + else + { + + extract elem(v); + if (elem.check()) + { + DerivedPolicies:: + set_item(container, + DerivedPolicies:: + convert_index(container, i), elem()); + } + else + { + PyErr_SetString(PyExc_TypeError, "Invalid assignment"); + throw_error_already_set(); + } + } + } + } + + static void + base_delete_item(Container& container, PyObject* i) + { + if (((((PyObject*)(i))->ob_type) == &PySlice_Type)) + { + slice_handler::base_delete_slice( + container, static_cast(static_cast(i))); + return; + } + + Index index = DerivedPolicies::convert_index(container, i); + proxy_handler::base_erase_index(container, index, mpl::bool_()); + DerivedPolicies::delete_item(container, index); + } + + static size_t + base_size(Container& container) + { + return DerivedPolicies::size(container); + } + + static bool + base_contains(Container& container, PyObject* key) + { + extract x(key); + + if (x.check()) + { + return DerivedPolicies::contains(container, x()); + } + else + { + + extract x(key); + if (x.check()) + return DerivedPolicies::contains(container, x()); + else + return false; + } + } + }; + +}} +# 33 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/boost_headers.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/python/suite/indexing/container_utils.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/suite/indexing/container_utils.hpp" +# 1 "/usr/include/boost-1_42/boost/foreach.hpp" 1 +# 26 "/usr/include/boost-1_42/boost/foreach.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 27 "/usr/include/boost-1_42/boost/foreach.hpp" 2 +# 68 "/usr/include/boost-1_42/boost/foreach.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/logical.hpp" 1 +# 69 "/usr/include/boost-1_42/boost/foreach.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/range/end.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/range/end.hpp" +# 1 "/usr/include/boost-1_42/boost/range/config.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/range/end.hpp" 2 + + + + + +# 1 "/usr/include/boost-1_42/boost/range/detail/implementation_help.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/range/detail/implementation_help.hpp" +# 1 "/usr/include/boost-1_42/boost/range/detail/common.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/range/detail/common.hpp" +# 1 "/usr/include/boost-1_42/boost/range/detail/sfinae.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/range/detail/sfinae.hpp" +namespace boost +{ + namespace range_detail + { + using type_traits::yes_type; + using type_traits::no_type; + + + + + + yes_type is_string_impl( const char* const ); + yes_type is_string_impl( const wchar_t* const ); + no_type is_string_impl( ... ); + + template< std::size_t sz > + yes_type is_char_array_impl( char (&boost_range_array)[sz] ); + template< std::size_t sz > + yes_type is_char_array_impl( const char (&boost_range_array)[sz] ); + no_type is_char_array_impl( ... ); + + template< std::size_t sz > + yes_type is_wchar_t_array_impl( wchar_t (&boost_range_array)[sz] ); + template< std::size_t sz > + yes_type is_wchar_t_array_impl( const wchar_t (&boost_range_array)[sz] ); + no_type is_wchar_t_array_impl( ... ); + + yes_type is_char_ptr_impl( char* const ); + no_type is_char_ptr_impl( ... ); + + yes_type is_const_char_ptr_impl( const char* const ); + no_type is_const_char_ptr_impl( ... ); + + yes_type is_wchar_t_ptr_impl( wchar_t* const ); + no_type is_wchar_t_ptr_impl( ... ); + + yes_type is_const_wchar_t_ptr_impl( const wchar_t* const ); + no_type is_const_wchar_t_ptr_impl( ... ); + + + + + + template< typename Iterator > + yes_type is_pair_impl( const std::pair* ); + no_type is_pair_impl( ... ); + + + + + + struct char_or_wchar_t_array_tag {}; + + } + +} +# 20 "/usr/include/boost-1_42/boost/range/detail/common.hpp" 2 + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 25 "/usr/include/boost-1_42/boost/range/detail/common.hpp" 2 + + + + + +namespace boost +{ + namespace range_detail + { +# 47 "/usr/include/boost-1_42/boost/range/detail/common.hpp" + typedef mpl::int_<1>::type std_container_; + typedef mpl::int_<2>::type std_pair_; + typedef mpl::int_<3>::type const_std_pair_; + typedef mpl::int_<4>::type array_; + typedef mpl::int_<5>::type const_array_; + typedef mpl::int_<6>::type char_array_; + typedef mpl::int_<7>::type wchar_t_array_; + typedef mpl::int_<8>::type char_ptr_; + typedef mpl::int_<9>::type const_char_ptr_; + typedef mpl::int_<10>::type wchar_t_ptr_; + typedef mpl::int_<11>::type const_wchar_t_ptr_; + typedef mpl::int_<12>::type string_; + + template< typename C > + struct range_helper + { + static C* c; + static C ptr; + + static const bool is_pair_ = sizeof( boost::range_detail::is_pair_impl( c ) ) == sizeof( yes_type ); + static const bool is_char_ptr_ = sizeof( boost::range_detail::is_char_ptr_impl( ptr ) ) == sizeof( yes_type ); + static const bool is_const_char_ptr_ = sizeof( boost::range_detail::is_const_char_ptr_impl( ptr ) ) == sizeof( yes_type ); + static const bool is_wchar_t_ptr_ = sizeof( boost::range_detail::is_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ); + static const bool is_const_wchar_t_ptr_ = sizeof( boost::range_detail::is_const_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ); + static const bool is_char_array_ = sizeof( boost::range_detail::is_char_array_impl( ptr ) ) == sizeof( yes_type ); + static const bool is_wchar_t_array_ = sizeof( boost::range_detail::is_wchar_t_array_impl( ptr ) ) == sizeof( yes_type ); + static const bool is_string_ = (boost::type_traits::ice_or::value ); + static const bool is_array_ = boost::is_array::value; + + }; + + template< typename C > + class range + { + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_pair_, + boost::range_detail::std_pair_, + void >::type pair_t; + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_array_, + boost::range_detail::array_, + pair_t >::type array_t; + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_string_, + boost::range_detail::string_, + array_t >::type string_t; + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_const_char_ptr_, + boost::range_detail::const_char_ptr_, + string_t >::type const_char_ptr_t; + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_char_ptr_, + boost::range_detail::char_ptr_, + const_char_ptr_t >::type char_ptr_t; + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_const_wchar_t_ptr_, + boost::range_detail::const_wchar_t_ptr_, + char_ptr_t >::type const_wchar_ptr_t; + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_wchar_t_ptr_, + boost::range_detail::wchar_t_ptr_, + const_wchar_ptr_t >::type wchar_ptr_t; + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_wchar_t_array_, + boost::range_detail::wchar_t_array_, + wchar_ptr_t >::type wchar_array_t; + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_char_array_, + boost::range_detail::char_array_, + wchar_array_t >::type char_array_t; + public: + typedef typename boost::mpl::if_c< ::boost::is_void::value, + boost::range_detail::std_container_, + char_array_t >::type type; + }; + } +} +# 16 "/usr/include/boost-1_42/boost/range/detail/implementation_help.hpp" 2 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 18 "/usr/include/boost-1_42/boost/range/detail/implementation_help.hpp" 2 + + + +# 1 "/usr/include/wchar.h" 1 3 4 +# 22 "/usr/include/boost-1_42/boost/range/detail/implementation_help.hpp" 2 + + +namespace boost +{ + namespace range_detail + { + template + inline void boost_range_silence_warning( const T& ) { } + + + + + + inline const char* str_end( const char* s, const char* ) + { + return s + strlen( s ); + } + + + inline const wchar_t* str_end( const wchar_t* s, const wchar_t* ) + { + return s + wcslen( s ); + } +# 56 "/usr/include/boost-1_42/boost/range/detail/implementation_help.hpp" + template< class Char > + inline Char* str_end( Char* s ) + { + return const_cast( str_end( s, s ) ); + } + + template< class T, std::size_t sz > + inline T* array_end( T (&boost_range_array)[sz] ) + { + return boost_range_array + sz; + } + + template< class T, std::size_t sz > + inline const T* array_end( const T (&boost_range_array)[sz] ) + { + return boost_range_array + sz; + } + + + + + + template< class Char > + inline std::size_t str_size( const Char* const& s ) + { + return str_end( s ) - s; + } + + template< class T, std::size_t sz > + inline std::size_t array_size( T (&boost_range_array)[sz] ) + { + boost_range_silence_warning( boost_range_array ); + return sz; + } + + template< class T, std::size_t sz > + inline std::size_t array_size( const T (&boost_range_array)[sz] ) + { + boost_range_silence_warning( boost_range_array ); + return sz; + } + + } + +} +# 25 "/usr/include/boost-1_42/boost/range/end.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/range/iterator.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/range/iterator.hpp" +# 1 "/usr/include/boost-1_42/boost/range/mutable_iterator.hpp" 1 +# 25 "/usr/include/boost-1_42/boost/range/mutable_iterator.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 26 "/usr/include/boost-1_42/boost/range/mutable_iterator.hpp" 2 + + +namespace boost +{ + + + + + template< typename C > + struct range_mutable_iterator + { + typedef typename C::iterator type; + }; + + + + + + template< typename Iterator > + struct range_mutable_iterator< std::pair > + { + typedef Iterator type; + }; + + + + + + template< typename T, std::size_t sz > + struct range_mutable_iterator< T[sz] > + { + typedef T* type; + }; + +} +# 20 "/usr/include/boost-1_42/boost/range/iterator.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/range/const_iterator.hpp" 1 +# 25 "/usr/include/boost-1_42/boost/range/const_iterator.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 26 "/usr/include/boost-1_42/boost/range/const_iterator.hpp" 2 + + +namespace boost +{ + + + + + template< typename C > + struct range_const_iterator + { + typedef typename C::const_iterator type; + }; + + + + + + template< typename Iterator > + struct range_const_iterator< std::pair > + { + typedef Iterator type; + }; + + + + + + template< typename T, std::size_t sz > + struct range_const_iterator< T[sz] > + { + typedef const T* type; + }; + +} +# 21 "/usr/include/boost-1_42/boost/range/iterator.hpp" 2 + + + + +namespace boost +{ +# 50 "/usr/include/boost-1_42/boost/range/iterator.hpp" + template< typename C > + struct range_iterator + { + + + + + + + + typedef typename + mpl::eval_if_c< is_const::value, + range_const_iterator< typename remove_const::type >, + range_mutable_iterator >::type type; + + + }; + +} +# 26 "/usr/include/boost-1_42/boost/range/end.hpp" 2 + + +namespace boost +{ + + + + +namespace range_detail +{ + + + + + + template< typename C > + inline typename range_iterator::type + range_end( C& c ) + { + + + + + + return c.end(); + } + + + + + + template< typename Iterator > + inline Iterator range_end( const std::pair& p ) + { + return p.second; + } + + template< typename Iterator > + inline Iterator range_end( std::pair& p ) + { + return p.second; + } + + + + + + template< typename T, std::size_t sz > + inline const T* range_end( const T (&a)[sz] ) + { + return range_detail::array_end( a ); + } + + template< typename T, std::size_t sz > + inline T* range_end( T (&a)[sz] ) + { + return range_detail::array_end( a ); + } + + + + +} + + +template< class T > +inline typename range_iterator::type end( T& r ) +{ + + + + using namespace range_detail; + + return range_end( r ); +} + +template< class T > +inline typename range_iterator::type end( const T& r ) +{ + + + + using namespace range_detail; + + return range_end( r ); +} + +} + + + + + + +namespace boost +{ + template< class T > + inline typename range_iterator::type + const_end( const T& r ) + { + return boost::end( r ); + } +} +# 72 "/usr/include/boost-1_42/boost/foreach.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/range/begin.hpp" 1 +# 26 "/usr/include/boost-1_42/boost/range/begin.hpp" +namespace boost +{ + + + + +namespace range_detail +{ + + + + + + + template< typename C > + inline typename range_iterator::type + range_begin( C& c ) + { + + + + + + return c.begin(); + } + + + + + + template< typename Iterator > + inline Iterator range_begin( const std::pair& p ) + { + return p.first; + } + + template< typename Iterator > + inline Iterator range_begin( std::pair& p ) + { + return p.first; + } +# 75 "/usr/include/boost-1_42/boost/range/begin.hpp" + template< typename T, std::size_t sz > + inline const T* range_begin( const T (&a)[sz] ) + { + return a; + } + + template< typename T, std::size_t sz > + inline T* range_begin( T (&a)[sz] ) + { + return a; + } + + + + + +} + + + +template< class T > +inline typename range_iterator::type begin( T& r ) +{ + + + + using namespace range_detail; + + return range_begin( r ); +} + +template< class T > +inline typename range_iterator::type begin( const T& r ) +{ + + + + using namespace range_detail; + + return range_begin( r ); +} + +} + + + +namespace boost +{ + template< class T > + inline typename range_iterator::type + const_begin( const T& r ) + { + return boost::begin( r ); + } +} +# 73 "/usr/include/boost-1_42/boost/foreach.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/range/rend.hpp" 1 +# 19 "/usr/include/boost-1_42/boost/range/rend.hpp" +# 1 "/usr/include/boost-1_42/boost/range/reverse_iterator.hpp" 1 +# 20 "/usr/include/boost-1_42/boost/range/reverse_iterator.hpp" +# 1 "/usr/include/boost-1_42/boost/iterator/reverse_iterator.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/iterator/reverse_iterator.hpp" +# 1 "/usr/include/boost-1_42/boost/iterator/iterator_adaptor.hpp" 1 +# 14 "/usr/include/boost-1_42/boost/iterator/iterator_adaptor.hpp" +# 1 "/usr/include/boost-1_42/boost/iterator/iterator_categories.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/iterator/iterator_categories.hpp" +# 1 "/usr/include/boost-1_42/boost/iterator/detail/config_def.hpp" 1 +# 12 "/usr/include/boost-1_42/boost/iterator/iterator_categories.hpp" 2 + + + + + +# 1 "/usr/include/boost-1_42/boost/mpl/placeholders.hpp" 1 +# 18 "/usr/include/boost-1_42/boost/iterator/iterator_categories.hpp" 2 + + + + + + +namespace boost { + + + + + +struct no_traversal_tag {}; + +struct incrementable_traversal_tag + : no_traversal_tag +{ + + +}; + +struct single_pass_traversal_tag + : incrementable_traversal_tag +{ + + +}; + +struct forward_traversal_tag + : single_pass_traversal_tag +{ + + +}; + +struct bidirectional_traversal_tag + : forward_traversal_tag +{ + + +}; + +struct random_access_traversal_tag + : bidirectional_traversal_tag +{ + + +}; + +namespace detail +{ + + + + + + + template + struct old_category_to_traversal + : mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , void + > + > + > + > + > + {}; +# 108 "/usr/include/boost-1_42/boost/iterator/iterator_categories.hpp" + template + struct pure_traversal_tag + : mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , void + > + > + > + > + > + { + }; +# 142 "/usr/include/boost-1_42/boost/iterator/iterator_categories.hpp" +} + + + + + +template +struct iterator_category_to_traversal + : mpl::eval_if< + is_convertible + , mpl::identity + , boost::detail::old_category_to_traversal + > +{}; + + +template +struct iterator_traversal + : iterator_category_to_traversal< + typename boost::detail::iterator_traits::iterator_category + > +{}; +# 184 "/usr/include/boost-1_42/boost/iterator/iterator_categories.hpp" +} + +# 1 "/usr/include/boost-1_42/boost/iterator/detail/config_undef.hpp" 1 +# 187 "/usr/include/boost-1_42/boost/iterator/iterator_categories.hpp" 2 +# 15 "/usr/include/boost-1_42/boost/iterator/iterator_adaptor.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/iterator/iterator_facade.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/iterator/iterator_facade.hpp" +# 1 "/usr/include/boost-1_42/boost/iterator/interoperable.hpp" 1 +# 15 "/usr/include/boost-1_42/boost/iterator/interoperable.hpp" +# 1 "/usr/include/boost-1_42/boost/iterator/detail/config_def.hpp" 1 +# 16 "/usr/include/boost-1_42/boost/iterator/interoperable.hpp" 2 + +namespace boost +{ +# 34 "/usr/include/boost-1_42/boost/iterator/interoperable.hpp" + template + struct is_interoperable + + + + : mpl::or_< + is_convertible< A, B > + , is_convertible< B, A > > + + { + }; + +} + +# 1 "/usr/include/boost-1_42/boost/iterator/detail/config_undef.hpp" 1 +# 49 "/usr/include/boost-1_42/boost/iterator/interoperable.hpp" 2 +# 12 "/usr/include/boost-1_42/boost/iterator/iterator_facade.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/iterator/detail/facade_iterator_category.hpp" 1 +# 23 "/usr/include/boost-1_42/boost/iterator/detail/facade_iterator_category.hpp" +# 1 "/usr/include/boost-1_42/boost/iterator/detail/config_def.hpp" 1 +# 24 "/usr/include/boost-1_42/boost/iterator/detail/facade_iterator_category.hpp" 2 +# 34 "/usr/include/boost-1_42/boost/iterator/detail/facade_iterator_category.hpp" +namespace boost { struct use_default; } + +namespace boost { namespace detail { + +struct input_output_iterator_tag + : std::input_iterator_tag +{ + + + + + + + operator std::output_iterator_tag() const + { + return std::output_iterator_tag(); + } +}; + + + + + + +template +struct iterator_writability_disabled + + : mpl::or_< + is_const + , boost::detail::indirect_traits::is_reference_to_const + , is_const + > + + + +{}; +# 86 "/usr/include/boost-1_42/boost/iterator/detail/facade_iterator_category.hpp" +template +struct iterator_facade_default_category + : mpl::eval_if< + mpl::and_< + is_reference + , is_convertible + > + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::if_< + is_convertible + , std::bidirectional_iterator_tag + , std::forward_iterator_tag + > + > + , typename mpl::eval_if< + mpl::and_< + is_convertible + + + , is_convertible + > + , mpl::identity + , mpl::identity + > + > +{ +}; + + +template +struct is_iterator_category + : mpl::or_< + is_convertible + , is_convertible + > +{ +}; + +template +struct is_iterator_traversal + : is_convertible +{}; + + + + + + + +template +struct iterator_category_with_traversal + : Category, Traversal +{ + + + + + enum { mpl_assertion_in_line_149 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) ( is_convertible< typename iterator_category_to_traversal::type , Traversal >))0, 1 ) ) ) } + + + + ; + + enum { mpl_assertion_in_line_151 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_arg( (void (*) (is_iterator_category))0, 1 ) ) ) }; + enum { mpl_assertion_in_line_152 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (is_iterator_category))0, 1 ) ) ) }; + enum { mpl_assertion_in_line_153 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (is_iterator_traversal))0, 1 ) ) ) }; + + enum { mpl_assertion_in_line_155 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_arg( (void (*) (is_iterator_traversal))0, 1 ) ) ) }; + + +}; + + + +template +struct facade_iterator_category_impl +{ + + enum { mpl_assertion_in_line_166 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (is_iterator_category))0, 1 ) ) ) }; + + + typedef typename iterator_facade_default_category< + Traversal,ValueParam,Reference + >::type category; + + typedef typename mpl::if_< + is_same< + Traversal + , typename iterator_category_to_traversal::type + > + , category + , iterator_category_with_traversal + >::type type; +}; + + + + +template +struct facade_iterator_category + : mpl::eval_if< + is_iterator_category + , mpl::identity + , facade_iterator_category_impl + > +{ +}; + +}} + +# 1 "/usr/include/boost-1_42/boost/iterator/detail/config_undef.hpp" 1 +# 199 "/usr/include/boost-1_42/boost/iterator/detail/facade_iterator_category.hpp" 2 +# 15 "/usr/include/boost-1_42/boost/iterator/iterator_facade.hpp" 2 +# 33 "/usr/include/boost-1_42/boost/iterator/iterator_facade.hpp" +# 1 "/usr/include/boost-1_42/boost/mpl/always.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/mpl/always.hpp" +namespace boost { namespace mpl { + +template< typename Value > struct always +{ + template< + typename T + , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na + > + struct apply + { + typedef Value type; + }; +}; + + + +}} +# 34 "/usr/include/boost-1_42/boost/iterator/iterator_facade.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/mpl/apply.hpp" 1 +# 35 "/usr/include/boost-1_42/boost/iterator/iterator_facade.hpp" 2 + + +# 1 "/usr/include/boost-1_42/boost/iterator/detail/config_def.hpp" 1 +# 38 "/usr/include/boost-1_42/boost/iterator/iterator_facade.hpp" 2 + +namespace boost +{ + + + template class iterator_facade; + + namespace detail + { + + + + struct always_bool2 + { + template + struct apply + { + typedef bool type; + }; + }; + + + + + template < + class Facade1 + , class Facade2 + , class Return + > + struct enable_if_interoperable +# 80 "/usr/include/boost-1_42/boost/iterator/iterator_facade.hpp" + : ::boost::iterators::enable_if< + mpl::or_< + is_convertible + , is_convertible + > + , Return + > + {}; + + + + + + + template < + class ValueParam + , class CategoryOrTraversal + , class Reference + , class Difference + > + struct iterator_facade_types + { + typedef typename facade_iterator_category< + CategoryOrTraversal, ValueParam, Reference + >::type iterator_category; + + typedef typename remove_const::type value_type; + + typedef typename mpl::eval_if< + boost::detail::iterator_writability_disabled + , add_pointer + , add_pointer + >::type pointer; +# 130 "/usr/include/boost-1_42/boost/iterator/iterator_facade.hpp" + }; + + + + + + + + template + class postfix_increment_proxy + { + typedef typename iterator_value::type value_type; + public: + explicit postfix_increment_proxy(Iterator const& x) + : stored_value(*x) + {} + + + + + + value_type& + operator*() const + { + return this->stored_value; + } + private: + mutable value_type stored_value; + }; + + + + + + template + class writable_postfix_increment_proxy + { + typedef typename iterator_value::type value_type; + public: + explicit writable_postfix_increment_proxy(Iterator const& x) + : stored_value(*x) + , stored_iterator(x) + {} + + + + + + writable_postfix_increment_proxy const& + operator*() const + { + return *this; + } + + + operator value_type&() const + { + return stored_value; + } + + + template + T const& operator=(T const& x) const + { + *this->stored_iterator = x; + return x; + } + + + template + T& operator=(T& x) const + { + *this->stored_iterator = x; + return x; + } + + + operator Iterator const&() const + { + return stored_iterator; + } + + private: + mutable value_type stored_value; + Iterator stored_iterator; + }; +# 244 "/usr/include/boost-1_42/boost/iterator/iterator_facade.hpp" + template + struct is_non_proxy_reference + : is_convertible< + typename remove_reference::type + const volatile* + , Value const volatile* + > + {}; +# 269 "/usr/include/boost-1_42/boost/iterator/iterator_facade.hpp" + template + struct postfix_increment_result + : mpl::eval_if< + mpl::and_< + + is_convertible + + + + , mpl::not_< + is_convertible< + typename iterator_category_to_traversal::type + , forward_traversal_tag + > + > + > + , mpl::if_< + is_non_proxy_reference + , postfix_increment_proxy + , writable_postfix_increment_proxy + > + , mpl::identity + > + {}; + + + + + + template + struct operator_arrow_proxy + { + operator_arrow_proxy(T const* px) : m_value(*px) {} + T* operator->() const { return &m_value; } + + + operator T*() const { return &m_value; } + mutable T m_value; + }; + + + + + template + struct operator_arrow_result + { + + + + typedef typename mpl::if_< + is_reference + , Pointer + , operator_arrow_proxy + >::type type; + + static type make(Reference x) + { + return implicit_cast(&x); + } + }; +# 342 "/usr/include/boost-1_42/boost/iterator/iterator_facade.hpp" + template + class operator_brackets_proxy + { + + + typedef typename Iterator::reference reference; + typedef typename Iterator::value_type value_type; + + public: + operator_brackets_proxy(Iterator const& iter) + : m_iter(iter) + {} + + operator reference() const + { + return *m_iter; + } + + operator_brackets_proxy& operator=(value_type const& val) + { + *m_iter = val; + return *this; + } + + private: + Iterator m_iter; + }; + + + + template + struct use_operator_brackets_proxy + : mpl::not_< + mpl::and_< + + + boost::is_POD + , iterator_writability_disabled + > + > + {}; + + template + struct operator_brackets_result + { + typedef typename mpl::if_< + use_operator_brackets_proxy + , operator_brackets_proxy + , Value + >::type type; + }; + + template + operator_brackets_proxy make_operator_brackets_result(Iterator const& iter, mpl::true_) + { + return operator_brackets_proxy(iter); + } + + template + typename Iterator::value_type make_operator_brackets_result(Iterator const& iter, mpl::false_) + { + return *iter; + } + + struct choose_difference_type + { + template + struct apply + : +# 420 "/usr/include/boost-1_42/boost/iterator/iterator_facade.hpp" + mpl::eval_if< + is_convertible + , iterator_difference + , iterator_difference + > + + {}; + + }; + } +# 471 "/usr/include/boost-1_42/boost/iterator/iterator_facade.hpp" + class iterator_core_access + { + + + + + + + template friend class iterator_facade; + + + + + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator ==( iterator_facade const& lhs , iterator_facade const& rhs); + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator !=( iterator_facade const& lhs , iterator_facade const& rhs); + + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator <( iterator_facade const& lhs , iterator_facade const& rhs); + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator >( iterator_facade const& lhs , iterator_facade const& rhs); + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator <=( iterator_facade const& lhs , iterator_facade const& rhs); + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator >=( iterator_facade const& lhs , iterator_facade const& rhs); + + + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator -( iterator_facade const& lhs , iterator_facade const& rhs) + + ; + + template friend inline Derived operator+ (iterator_facade const& , typename Derived::difference_type) + + + + + ; + + template friend inline Derived operator+ (typename Derived::difference_type , iterator_facade const&) + + + + + ; + + + + template + static typename Facade::reference dereference(Facade const& f) + { + return f.dereference(); + } + + template + static void increment(Facade& f) + { + f.increment(); + } + + template + static void decrement(Facade& f) + { + f.decrement(); + } + + template + static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::true_) + { + return f1.equal(f2); + } + + template + static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::false_) + { + return f2.equal(f1); + } + + template + static void advance(Facade& f, typename Facade::difference_type n) + { + f.advance(n); + } + + template + static typename Facade1::difference_type distance_from( + Facade1 const& f1, Facade2 const& f2, mpl::true_) + { + return -f1.distance_to(f2); + } + + template + static typename Facade2::difference_type distance_from( + Facade1 const& f1, Facade2 const& f2, mpl::false_) + { + return f2.distance_to(f1); + } + + + + + template + static I& derived(iterator_facade& facade) + { + return *static_cast(&facade); + } + + template + static I const& derived(iterator_facade const& facade) + { + return *static_cast(&facade); + } + + private: + + iterator_core_access(); + }; + + + + + + template < + class Derived + , class Value + , class CategoryOrTraversal + , class Reference = Value& + , class Difference = std::ptrdiff_t + > + class iterator_facade + + + + + + + { + private: + + + + Derived& derived() + { + return *static_cast(this); + } + + Derived const& derived() const + { + return *static_cast(this); + } + + typedef boost::detail::iterator_facade_types< + Value, CategoryOrTraversal, Reference, Difference + > associated_types; + + protected: + + typedef iterator_facade iterator_facade_; + + public: + + typedef typename associated_types::value_type value_type; + typedef Reference reference; + typedef Difference difference_type; + typedef typename associated_types::pointer pointer; + typedef typename associated_types::iterator_category iterator_category; + + reference operator*() const + { + return iterator_core_access::dereference(this->derived()); + } + + typename boost::detail::operator_arrow_result< + value_type + , reference + , pointer + >::type + operator->() const + { + return boost::detail::operator_arrow_result< + value_type + , reference + , pointer + >::make(*this->derived()); + } + + typename boost::detail::operator_brackets_result::type + operator[](difference_type n) const + { + typedef boost::detail::use_operator_brackets_proxy use_proxy; + + return boost::detail::make_operator_brackets_result( + this->derived() + n + , use_proxy() + ); + } + + Derived& operator++() + { + iterator_core_access::increment(this->derived()); + return this->derived(); + } +# 679 "/usr/include/boost-1_42/boost/iterator/iterator_facade.hpp" + Derived& operator--() + { + iterator_core_access::decrement(this->derived()); + return this->derived(); + } + + Derived operator--(int) + { + Derived tmp(this->derived()); + --*this; + return tmp; + } + + Derived& operator+=(difference_type n) + { + iterator_core_access::advance(this->derived(), n); + return this->derived(); + } + + Derived& operator-=(difference_type n) + { + iterator_core_access::advance(this->derived(), -n); + return this->derived(); + } + + Derived operator-(difference_type x) const + { + Derived result(this->derived()); + return result -= x; + } +# 721 "/usr/include/boost-1_42/boost/iterator/iterator_facade.hpp" + }; + + + template + inline typename boost::detail::postfix_increment_result::type + operator++( + iterator_facade& i + , int + ) + { + typename boost::detail::postfix_increment_result::type + tmp(*static_cast(&i)); + + ++i; + + return tmp; + } +# 836 "/usr/include/boost-1_42/boost/iterator/iterator_facade.hpp" + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator ==( iterator_facade const& lhs , iterator_facade const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> boost_static_assert_typedef_836; return iterator_core_access::equal( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator !=( iterator_facade const& lhs , iterator_facade const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> boost_static_assert_typedef_837; return ! iterator_core_access::equal( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } + + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator <( iterator_facade const& lhs , iterator_facade const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> boost_static_assert_typedef_839; return 0 > iterator_core_access::distance_from( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator >( iterator_facade const& lhs , iterator_facade const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> boost_static_assert_typedef_840; return 0 < iterator_core_access::distance_from( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator <=( iterator_facade const& lhs , iterator_facade const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> boost_static_assert_typedef_841; return 0 >= iterator_core_access::distance_from( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator >=( iterator_facade const& lhs , iterator_facade const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> boost_static_assert_typedef_842; return 0 <= iterator_core_access::distance_from( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } + + + + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator -( iterator_facade const& lhs , iterator_facade const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> + + + + + boost_static_assert_typedef_851 +# 846 "/usr/include/boost-1_42/boost/iterator/iterator_facade.hpp" + ; return iterator_core_access::distance_from( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } +# 862 "/usr/include/boost-1_42/boost/iterator/iterator_facade.hpp" +template inline Derived operator+ ( iterator_facade const& i , typename Derived::difference_type n ) { Derived tmp(static_cast(i)); return tmp += n; } + + + + +template inline Derived operator+ ( typename Derived::difference_type n , iterator_facade const& i ) { Derived tmp(static_cast(i)); return tmp += n; } + + + + + + +} + +# 1 "/usr/include/boost-1_42/boost/iterator/detail/config_undef.hpp" 1 +# 877 "/usr/include/boost-1_42/boost/iterator/iterator_facade.hpp" 2 +# 16 "/usr/include/boost-1_42/boost/iterator/iterator_adaptor.hpp" 2 +# 36 "/usr/include/boost-1_42/boost/iterator/iterator_adaptor.hpp" +# 1 "/usr/include/boost-1_42/boost/iterator/detail/config_def.hpp" 1 +# 37 "/usr/include/boost-1_42/boost/iterator/iterator_adaptor.hpp" 2 + + + +namespace boost +{ + + + + struct use_default; + + + + + + template + struct is_convertible + : mpl::false_ {}; + + + namespace detail + { +# 66 "/usr/include/boost-1_42/boost/iterator/iterator_adaptor.hpp" + struct enable_type; + } +# 148 "/usr/include/boost-1_42/boost/iterator/iterator_adaptor.hpp" + template + struct enable_if_convertible + : iterators::enable_if< + is_convertible + , boost::detail::enable_type + > + {}; + + + + + + + namespace detail + { + + + template + struct ia_dflt_help + : mpl::eval_if< + is_same + , DefaultNullaryFn + , mpl::identity + > + { + }; + + + + template < + class Derived + , class Base + , class Value + , class Traversal + , class Reference + , class Difference + > + struct iterator_adaptor_base + { + typedef iterator_facade< + Derived + + + , typename boost::detail::ia_dflt_help< + Value + , mpl::eval_if< + is_same + , iterator_value + , remove_reference + > + >::type + + + + + + + , typename boost::detail::ia_dflt_help< + Traversal + , iterator_traversal + >::type + + , typename boost::detail::ia_dflt_help< + Reference + , mpl::eval_if< + is_same + , iterator_reference + , add_reference + > + >::type + + , typename boost::detail::ia_dflt_help< + Difference, iterator_difference + >::type + > + type; + }; + + + template + inline void iterator_adaptor_assert_traversal () + { + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((is_convertible::value)) == 0 ? false : true) >)> boost_static_assert_typedef_230; + } + } +# 259 "/usr/include/boost-1_42/boost/iterator/iterator_adaptor.hpp" + template < + class Derived + , class Base + , class Value = use_default + , class Traversal = use_default + , class Reference = use_default + , class Difference = use_default + > + class iterator_adaptor + : public boost::detail::iterator_adaptor_base< + Derived, Base, Value, Traversal, Reference, Difference + >::type + { + friend class iterator_core_access; + + protected: + typedef typename boost::detail::iterator_adaptor_base< + Derived, Base, Value, Traversal, Reference, Difference + >::type super_t; + public: + iterator_adaptor() {} + + explicit iterator_adaptor(Base const &iter) + : m_iterator(iter) + { + } + + typedef Base base_type; + + Base const& base() const + { return m_iterator; } + + protected: + + typedef iterator_adaptor iterator_adaptor_; + + + + + Base const& base_reference() const + { return m_iterator; } + + Base& base_reference() + { return m_iterator; } + + private: + + + + + + + typename super_t::reference dereference() const + { return *m_iterator; } + + template < + class OtherDerived, class OtherIterator, class V, class C, class R, class D + > + bool equal(iterator_adaptor const& x) const + { + + + + + return m_iterator == x.base(); + } + + typedef typename iterator_category_to_traversal< + typename super_t::iterator_category + >::type my_traversal; + + + + + void advance(typename super_t::difference_type n) + { + boost::detail::iterator_adaptor_assert_traversal(); + m_iterator += n; + } + + void increment() { ++m_iterator; } + + void decrement() + { + boost::detail::iterator_adaptor_assert_traversal(); + --m_iterator; + } + + template < + class OtherDerived, class OtherIterator, class V, class C, class R, class D + > + typename super_t::difference_type distance_to( + iterator_adaptor const& y) const + { + boost::detail::iterator_adaptor_assert_traversal(); + + + + + return y.base() - m_iterator; + } + + + + private: + Base m_iterator; + }; + +} + +# 1 "/usr/include/boost-1_42/boost/iterator/detail/config_undef.hpp" 1 +# 370 "/usr/include/boost-1_42/boost/iterator/iterator_adaptor.hpp" 2 +# 13 "/usr/include/boost-1_42/boost/iterator/reverse_iterator.hpp" 2 + +namespace boost +{ + + + + + template + class reverse_iterator + : public iterator_adaptor< reverse_iterator, Iterator > + { + typedef iterator_adaptor< reverse_iterator, Iterator > super_t; + + friend class iterator_core_access; + + public: + reverse_iterator() {} + + explicit reverse_iterator(Iterator x) + : super_t(x) {} + + template + reverse_iterator( + reverse_iterator const& r + , typename enable_if_convertible::type* = 0 + ) + : super_t(r.base()) + {} + + private: + typename super_t::reference dereference() const { return *boost::prior(this->base()); } + + void increment() { --this->base_reference(); } + void decrement() { ++this->base_reference(); } + + void advance(typename super_t::difference_type n) + { + this->base_reference() += -n; + } + + template + typename super_t::difference_type + distance_to(reverse_iterator const& y) const + { + return this->base_reference() - y.base(); + } + }; + + template + reverse_iterator make_reverse_iterator(BidirectionalIterator x) + { + return reverse_iterator(x); + } + +} +# 21 "/usr/include/boost-1_42/boost/range/reverse_iterator.hpp" 2 + + +namespace boost +{ + + + + + template< typename C > + struct range_reverse_iterator + { + typedef reverse_iterator< + typename range_iterator::type > type; + }; + + +} +# 20 "/usr/include/boost-1_42/boost/range/rend.hpp" 2 + +namespace boost +{ +# 35 "/usr/include/boost-1_42/boost/range/rend.hpp" +template< class C > +inline typename range_reverse_iterator::type +rend( C& c ) +{ + typedef typename range_reverse_iterator::type + iter_type; + return iter_type( boost::begin( c ) ); +} + +template< class C > +inline typename range_reverse_iterator::type +rend( const C& c ) +{ + typedef typename range_reverse_iterator::type + iter_type; + return iter_type( boost::begin( c ) ); +} + + + +template< class T > +inline typename range_reverse_iterator::type +const_rend( const T& r ) +{ + return boost::rend( r ); +} + +} +# 74 "/usr/include/boost-1_42/boost/foreach.hpp" 2 +# 1 "/usr/include/boost-1_42/boost/range/rbegin.hpp" 1 +# 21 "/usr/include/boost-1_42/boost/range/rbegin.hpp" +namespace boost +{ +# 35 "/usr/include/boost-1_42/boost/range/rbegin.hpp" +template< class C > +inline typename range_reverse_iterator::type +rbegin( C& c ) +{ + typedef typename range_reverse_iterator::type + iter_type; + return iter_type( boost::end( c ) ); +} + +template< class C > +inline typename range_reverse_iterator::type +rbegin( const C& c ) +{ + typedef typename range_reverse_iterator::type + iter_type; + return iter_type( boost::end( c ) ); +} + + + +template< class T > +inline typename range_reverse_iterator::type +const_rbegin( const T& r ) +{ + return boost::rbegin( r ); +} + +} +# 75 "/usr/include/boost-1_42/boost/foreach.hpp" 2 +# 92 "/usr/include/boost-1_42/boost/foreach.hpp" +enum boost_foreach_argument_dependent_lookup_hack +{ + boost_foreach_argument_dependent_lookup_hack_value +}; + +namespace boost +{ + + +template +class iterator_range; + + +template +class sub_range; + +namespace +# 2301 "/usr/include/qt4/QtCore/qglobal.h" + Q_FOREACH +# 109 "/usr/include/boost-1_42/boost/foreach.hpp" +{ + + + + template + inline std::pair in_range(T begin, T end) + { + return std::make_pair(begin, end); + } + + + + + typedef boost_foreach_argument_dependent_lookup_hack tag; + + + + + + template + struct is_lightweight_proxy + : boost::mpl::false_ + { + }; + + + + + + template + struct is_noncopyable + + : boost::mpl::or_< + boost::is_abstract + , boost::is_base_and_derived + > + + + + + + + + { + }; + +} + +} +# 171 "/usr/include/boost-1_42/boost/foreach.hpp" +template +inline boost:: +# 2301 "/usr/include/qt4/QtCore/qglobal.h" + Q_FOREACH +# 172 "/usr/include/boost-1_42/boost/foreach.hpp" + ::is_lightweight_proxy * +boost_foreach_is_lightweight_proxy(T *&, boost:: +# 2301 "/usr/include/qt4/QtCore/qglobal.h" + Q_FOREACH +# 173 "/usr/include/boost-1_42/boost/foreach.hpp" + ::tag) { return 0; } + +template +inline boost::mpl::true_ * +boost_foreach_is_lightweight_proxy(std::pair *&, boost:: +# 2301 "/usr/include/qt4/QtCore/qglobal.h" + Q_FOREACH +# 177 "/usr/include/boost-1_42/boost/foreach.hpp" + ::tag) { return 0; } + +template +inline boost::mpl::true_ * +boost_foreach_is_lightweight_proxy(boost::iterator_range *&, boost:: +# 2301 "/usr/include/qt4/QtCore/qglobal.h" + Q_FOREACH +# 181 "/usr/include/boost-1_42/boost/foreach.hpp" + ::tag) { return 0; } + +template +inline boost::mpl::true_ * +boost_foreach_is_lightweight_proxy(boost::sub_range *&, boost:: +# 2301 "/usr/include/qt4/QtCore/qglobal.h" + Q_FOREACH +# 185 "/usr/include/boost-1_42/boost/foreach.hpp" + ::tag) { return 0; } + +template +inline boost::mpl::true_ * +boost_foreach_is_lightweight_proxy(T **&, boost:: +# 2301 "/usr/include/qt4/QtCore/qglobal.h" + Q_FOREACH +# 189 "/usr/include/boost-1_42/boost/foreach.hpp" + ::tag) { return 0; } + + + + + + +template +inline boost:: +# 2301 "/usr/include/qt4/QtCore/qglobal.h" + Q_FOREACH +# 197 "/usr/include/boost-1_42/boost/foreach.hpp" + ::is_noncopyable * +boost_foreach_is_noncopyable(T *&, boost:: +# 2301 "/usr/include/qt4/QtCore/qglobal.h" + Q_FOREACH +# 198 "/usr/include/boost-1_42/boost/foreach.hpp" + ::tag) { return 0; } + +namespace boost +{ + +namespace foreach_detail_ +{ + + + + +template +inline boost::mpl::and_ *and_(Bool1 *, Bool2 *) { return 0; } + +template +inline boost::mpl::and_ *and_(Bool1 *, Bool2 *, Bool3 *) { return 0; } + +template +inline boost::mpl::or_ *or_(Bool1 *, Bool2 *) { return 0; } + +template +inline boost::mpl::or_ *or_(Bool1 *, Bool2 *, Bool3 *) { return 0; } + +template +inline boost::mpl::not_ *not_(Bool1 *) { return 0; } + +template +inline boost::mpl::false_ *is_rvalue_(T &, int) { return 0; } + +template +inline boost::mpl::true_ *is_rvalue_(T const &, ...) { return 0; } + +template +inline boost::is_array *is_array_(T const &) { return 0; } + +template +inline boost::is_const *is_const_(T &) { return 0; } + + +template +inline boost::mpl::true_ *is_const_(T const &) { return 0; } + + + + + +struct auto_any_base +{ + + + operator bool() const + { + return false; + } +}; + +template +struct auto_any : auto_any_base +{ + auto_any(T const &t) + : item(t) + { + } + + + + + mutable T item; +}; + +typedef auto_any_base const &auto_any_t; + +template +inline typename boost::mpl::if_::type &auto_any_cast(auto_any_t a) +{ + return static_cast const &>(a).item; +} + +typedef boost::mpl::true_ const_; + + + + +template +struct type2type + : boost::mpl::if_ +{ +}; + +template +struct wrap_cstr +{ + typedef T type; +}; + +template<> +struct wrap_cstr +{ + typedef wrap_cstr type; + typedef char *iterator; + typedef char *const_iterator; +}; + +template<> +struct wrap_cstr +{ + typedef wrap_cstr type; + typedef char const *iterator; + typedef char const *const_iterator; +}; + +template<> +struct wrap_cstr +{ + typedef wrap_cstr type; + typedef wchar_t *iterator; + typedef wchar_t *const_iterator; +}; + +template<> +struct wrap_cstr +{ + typedef wrap_cstr type; + typedef wchar_t const *iterator; + typedef wchar_t const *const_iterator; +}; + +template +struct is_char_array + : mpl::and_< + is_array + , mpl::or_< + is_convertible + , is_convertible + > + > +{}; + +template +struct foreach_iterator +{ +# 352 "/usr/include/boost-1_42/boost/foreach.hpp" + struct IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING; typedef struct IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING352 : boost::mpl::assert_ { static boost::mpl::failed ************ (IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING::************ assert_arg()) (T&) { return 0; } } mpl_assert_arg352; enum { mpl_assertion_in_line_352 = sizeof( boost::mpl::assertion_failed<((!is_char_array::value))>( mpl_assert_arg352::assert_arg() ) ) }; + + + + + typedef typename wrap_cstr::type container; + + typedef typename boost::mpl::eval_if< + C + , range_const_iterator + , range_mutable_iterator + >::type type; +}; + + +template +struct foreach_reverse_iterator +{ +# 383 "/usr/include/boost-1_42/boost/foreach.hpp" + struct IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING; typedef struct IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING383 : boost::mpl::assert_ { static boost::mpl::failed ************ (IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING::************ assert_arg()) (T&) { return 0; } } mpl_assert_arg383; enum { mpl_assertion_in_line_383 = sizeof( boost::mpl::assertion_failed<((!is_char_array::value))>( mpl_assert_arg383::assert_arg() ) ) }; + + + + + typedef typename wrap_cstr::type container; + + typedef typename boost::mpl::eval_if< + C + , range_reverse_iterator + , range_reverse_iterator + >::type type; +}; + +template +struct foreach_reference + : iterator_reference::type> +{ +}; + + + + +template +inline type2type *encode_type(T &, boost::mpl::false_ *) { return 0; } + +template +inline type2type *encode_type(T const &, boost::mpl::true_ *) { return 0; } + + + + +inline bool set_false(bool &b) +{ + b = false; + return false; +} + + + + +template +inline T *&to_ptr(T const &) +{ + static T *t = 0; + return t; +} +# 444 "/usr/include/boost-1_42/boost/foreach.hpp" +template +inline T &derefof(T *t) +{ + + + return reinterpret_cast( + *const_cast( + reinterpret_cast(t) + ) + ); +} +# 466 "/usr/include/boost-1_42/boost/foreach.hpp" +template +struct rvalue_probe +{ + struct private_type_ {}; + + typedef typename boost::mpl::if_< + boost::mpl::or_, boost::is_array >, private_type_, T + >::type value_type; + operator value_type() { return *reinterpret_cast(this); } + operator T &() const { return *reinterpret_cast(const_cast(this)); } +}; + +template +rvalue_probe const make_probe(T const &) +{ + return rvalue_probe(); +} +# 614 "/usr/include/boost-1_42/boost/foreach.hpp" +template +inline auto_any contain(T const &t, boost::mpl::true_ *) +{ + return t; +} + +template +inline auto_any contain(T &t, boost::mpl::false_ *) +{ + + + + + return boost::addressof(t); + +} +# 643 "/usr/include/boost-1_42/boost/foreach.hpp" +template +inline auto_any::type> +begin(auto_any_t col, type2type *, boost::mpl::true_ *) +{ + return boost::begin(auto_any_cast(col)); +} + +template +inline auto_any::type> +begin(auto_any_t col, type2type *, boost::mpl::false_ *) +{ + typedef typename type2type::type type; + typedef typename foreach_iterator::type iterator; + return iterator(boost::begin(derefof(auto_any_cast(col)))); +} +# 669 "/usr/include/boost-1_42/boost/foreach.hpp" +template +inline auto_any +begin(auto_any_t col, type2type *, boost::mpl::true_ *) +{ + return auto_any_cast(col); +} + + + + + +template +inline auto_any::type> +end(auto_any_t col, type2type *, boost::mpl::true_ *) +{ + return boost::end(auto_any_cast(col)); +} + +template +inline auto_any::type> +end(auto_any_t col, type2type *, boost::mpl::false_ *) +{ + typedef typename type2type::type type; + typedef typename foreach_iterator::type iterator; + return iterator(boost::end(derefof(auto_any_cast(col)))); +} +# 706 "/usr/include/boost-1_42/boost/foreach.hpp" +template +inline auto_any +end(auto_any_t col, type2type *, boost::mpl::true_ *) +{ + return 0; +} + + + + + +template +inline bool done(auto_any_t cur, auto_any_t end, type2type *) +{ + typedef typename foreach_iterator::type iter_t; + return auto_any_cast(cur) == auto_any_cast(end); +} + + +template +inline bool done(auto_any_t cur, auto_any_t, type2type *) +{ + return ! *auto_any_cast(cur); +} + + + + + +template +inline void next(auto_any_t cur, type2type *) +{ + typedef typename foreach_iterator::type iter_t; + ++auto_any_cast(cur); +} + + + + +template +inline typename foreach_reference::type +deref(auto_any_t cur, type2type *) +{ + typedef typename foreach_iterator::type iter_t; + return *auto_any_cast(cur); +} + + + + +template +inline auto_any::type> +rbegin(auto_any_t col, type2type *, boost::mpl::true_ *) +{ + return boost::rbegin(auto_any_cast(col)); +} + +template +inline auto_any::type> +rbegin(auto_any_t col, type2type *, boost::mpl::false_ *) +{ + typedef typename type2type::type type; + typedef typename foreach_reverse_iterator::type iterator; + return iterator(boost::rbegin(derefof(auto_any_cast(col)))); +} +# 782 "/usr/include/boost-1_42/boost/foreach.hpp" +template +inline auto_any > +rbegin(auto_any_t col, type2type *, boost::mpl::true_ *) +{ + T *p = auto_any_cast(col); + while(0 != *p) + ++p; + return reverse_iterator(p); +} + + + + + +template +inline auto_any::type> +rend(auto_any_t col, type2type *, boost::mpl::true_ *) +{ + return boost::rend(auto_any_cast(col)); +} + +template +inline auto_any::type> +rend(auto_any_t col, type2type *, boost::mpl::false_ *) +{ + typedef typename type2type::type type; + typedef typename foreach_reverse_iterator::type iterator; + return iterator(boost::rend(derefof(auto_any_cast(col)))); +} +# 822 "/usr/include/boost-1_42/boost/foreach.hpp" +template +inline auto_any > +rend(auto_any_t col, type2type *, boost::mpl::true_ *) +{ + return reverse_iterator(auto_any_cast(col)); +} + + + + + +template +inline bool rdone(auto_any_t cur, auto_any_t end, type2type *) +{ + typedef typename foreach_reverse_iterator::type iter_t; + return auto_any_cast(cur) == auto_any_cast(end); +} + + + + +template +inline void rnext(auto_any_t cur, type2type *) +{ + typedef typename foreach_reverse_iterator::type iter_t; + ++auto_any_cast(cur); +} + + + + +template +inline typename foreach_reference::type +rderef(auto_any_t cur, type2type *) +{ + typedef typename foreach_reverse_iterator::type iter_t; + return *auto_any_cast(cur); +} + +} +} +# 12 "/usr/include/boost-1_42/boost/python/suite/indexing/container_utils.hpp" 2 + + + +# 1 "/usr/include/boost-1_42/boost/python/stl_iterator.hpp" 1 +# 10 "/usr/include/boost-1_42/boost/python/stl_iterator.hpp" +# 1 "/usr/include/boost-1_42/boost/python/object/stl_iterator_core.hpp" 1 +# 11 "/usr/include/boost-1_42/boost/python/object/stl_iterator_core.hpp" +namespace boost { namespace python { namespace objects { + +struct stl_input_iterator_impl +{ + stl_input_iterator_impl(); + stl_input_iterator_impl(boost::python::object const &ob); + void increment(); + bool equal(stl_input_iterator_impl const &that) const; + boost::python::handle<> const ¤t() const; +private: + boost::python::object it_; + boost::python::handle<> ob_; +}; + +}}} +# 11 "/usr/include/boost-1_42/boost/python/stl_iterator.hpp" 2 + + + +namespace boost { namespace python +{ + + +template +struct stl_input_iterator + : boost::iterator_facade< + stl_input_iterator + , ValueT + , std::input_iterator_tag + , ValueT + > +{ + stl_input_iterator() + : impl_() + { + } + + + stl_input_iterator(boost::python::object const &ob) + : impl_(ob) + { + } + +private: + friend class boost::iterator_core_access; + + void increment() + { + this->impl_.increment(); + } + + ValueT dereference() const + { + return extract(this->impl_.current().get())(); + } + + bool equal(stl_input_iterator const &that) const + { + return this->impl_.equal(that.impl_); + } + + objects::stl_input_iterator_impl impl_; +}; + +}} +# 16 "/usr/include/boost-1_42/boost/python/suite/indexing/container_utils.hpp" 2 + +namespace boost { namespace python { namespace container_utils { + + template + void + extend_container(Container& container, object l) + { + typedef typename Container::value_type data_type; + + + if (boost::foreach_detail_::auto_any_t + + + + _foreach_col30 +# 26 "/usr/include/boost-1_42/boost/python/suite/indexing/container_utils.hpp" + = boost::foreach_detail_::contain( (std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() )) , (true ? 0 : boost::foreach_detail_::or_( boost::foreach_detail_::and_( boost::foreach_detail_::not_(boost::foreach_detail_::is_array_(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ))) , (true ? 0 : boost::foreach_detail_::is_rvalue_( (true ? boost::foreach_detail_::make_probe(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() )) : (std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ))), 0))) , boost::foreach_detail_::and_( boost::foreach_detail_::not_(boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() )) , boost_foreach_argument_dependent_lookup_hack_value)) , boost_foreach_is_lightweight_proxy( boost::foreach_detail_::to_ptr(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() )) , boost_foreach_argument_dependent_lookup_hack_value)))))) {} else if (boost::foreach_detail_::auto_any_t + + + + _foreach_cur30 +# 26 "/usr/include/boost-1_42/boost/python/suite/indexing/container_utils.hpp" + = boost::foreach_detail_::begin( + + + + _foreach_col30 +# 26 "/usr/include/boost-1_42/boost/python/suite/indexing/container_utils.hpp" + , (true ? 0 : boost::foreach_detail_::encode_type(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ), boost::foreach_detail_::is_const_(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() )))) , (true ? 0 : boost::foreach_detail_::or_( boost::foreach_detail_::and_( boost::foreach_detail_::not_(boost::foreach_detail_::is_array_(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ))) , (true ? 0 : boost::foreach_detail_::is_rvalue_( (true ? boost::foreach_detail_::make_probe(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() )) : (std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ))), 0))) , boost::foreach_detail_::and_( boost::foreach_detail_::not_(boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() )) , boost_foreach_argument_dependent_lookup_hack_value)) , boost_foreach_is_lightweight_proxy( boost::foreach_detail_::to_ptr(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() )) , boost_foreach_argument_dependent_lookup_hack_value)))))) {} else if (boost::foreach_detail_::auto_any_t + + + + _foreach_end30 +# 26 "/usr/include/boost-1_42/boost/python/suite/indexing/container_utils.hpp" + = boost::foreach_detail_::end( + + + + _foreach_col30 +# 26 "/usr/include/boost-1_42/boost/python/suite/indexing/container_utils.hpp" + , (true ? 0 : boost::foreach_detail_::encode_type(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ), boost::foreach_detail_::is_const_(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() )))) , (true ? 0 : boost::foreach_detail_::or_( boost::foreach_detail_::and_( boost::foreach_detail_::not_(boost::foreach_detail_::is_array_(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ))) , (true ? 0 : boost::foreach_detail_::is_rvalue_( (true ? boost::foreach_detail_::make_probe(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() )) : (std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ))), 0))) , boost::foreach_detail_::and_( boost::foreach_detail_::not_(boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() )) , boost_foreach_argument_dependent_lookup_hack_value)) , boost_foreach_is_lightweight_proxy( boost::foreach_detail_::to_ptr(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() )) , boost_foreach_argument_dependent_lookup_hack_value)))))) {} else for (bool + + + + _foreach_continue30 +# 26 "/usr/include/boost-1_42/boost/python/suite/indexing/container_utils.hpp" + = true; + + + + _foreach_continue30 +# 26 "/usr/include/boost-1_42/boost/python/suite/indexing/container_utils.hpp" + && !boost::foreach_detail_::done( + + + + _foreach_cur30 +# 26 "/usr/include/boost-1_42/boost/python/suite/indexing/container_utils.hpp" + , + + + + _foreach_end30 +# 26 "/usr/include/boost-1_42/boost/python/suite/indexing/container_utils.hpp" + , (true ? 0 : boost::foreach_detail_::encode_type(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ), boost::foreach_detail_::is_const_(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ))))); + + + + _foreach_continue30 +# 26 "/usr/include/boost-1_42/boost/python/suite/indexing/container_utils.hpp" + ? boost::foreach_detail_::next( + + + + _foreach_cur30 +# 26 "/usr/include/boost-1_42/boost/python/suite/indexing/container_utils.hpp" + , (true ? 0 : boost::foreach_detail_::encode_type(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ), boost::foreach_detail_::is_const_(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ))))) : (void)0) if (boost::foreach_detail_::set_false( + + + + _foreach_continue30 +# 26 "/usr/include/boost-1_42/boost/python/suite/indexing/container_utils.hpp" + )) {} else for (object elem = boost::foreach_detail_::deref( + + + + _foreach_cur30 +# 26 "/usr/include/boost-1_42/boost/python/suite/indexing/container_utils.hpp" + , (true ? 0 : boost::foreach_detail_::encode_type(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ), boost::foreach_detail_::is_const_(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ))))); ! + + + + _foreach_continue30 +# 26 "/usr/include/boost-1_42/boost/python/suite/indexing/container_utils.hpp" + ; + + + + _foreach_continue30 +# 26 "/usr/include/boost-1_42/boost/python/suite/indexing/container_utils.hpp" + = true) + + + + + { + extract x(elem); + + if (x.check()) + { + container.push_back(x()); + } + else + { + + extract x(elem); + if (x.check()) + { + container.push_back(x()); + } + else + { + PyErr_SetString(PyExc_TypeError, "Incompatible Data Type"); + throw_error_already_set(); + } + } + } + } + +}}} +# 34 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/boost_headers.hpp" 2 +# 28 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/pyside.hpp" 2 +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/declare_qflags.hpp" 1 +# 26 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/declare_qflags.hpp" +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/boost_headers.hpp" 1 +# 27 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/declare_qflags.hpp" 2 +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/pyside_global.hpp" 1 +# 28 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/declare_qflags.hpp" 2 + +namespace PySide +{ + +template< typename FLAG > +void __attribute__ ((visibility("internal"))) declare_qflags(const char *flag_name) +{ + boost::python::class_< FLAG >(flag_name, boost::python::init()) + .def(boost::python::init< boost::python::optional< int > >()) + .def(boost::python::init< typename FLAG::enum_type >()) + .def(boost::python::self & int()) + .def(boost::python::self == boost::python::self) + .def(boost::python::self == int()) + .def(boost::python::self &= int()) + + .def(int_(boost::python::self)) + + .def(~boost::python::self) + .def(boost::python::self |= boost::python::self) + .def(boost::python::self ^= boost::python::self) + .def(boost::python::self != boost::python::self) + .def(!boost::python::self) + .def(boost::python::self | boost::python::self) + .def(boost::python::self ^ boost::python::self) + + ; + + + boost::python::implicitly_convertible(); +} + +template< typename FLAG > +void __attribute__ ((visibility("internal"))) declare_int_qflags(const char *flag_name) +{ + boost::python::class_< FLAG >(flag_name, boost::python::init()) + .def(boost::python::init< boost::python::optional< int > >()) + .def(boost::python::init< typename FLAG::enum_type >()) + .def(boost::python::self & int()) + .def(boost::python::self &= int()) + + .def(int_(boost::python::self)) + + .def(~boost::python::self) + .def(boost::python::self |= boost::python::self) + .def(boost::python::self ^= boost::python::self) + .def(!boost::python::self) + .def(boost::python::self | boost::python::self) + .def(boost::python::self ^ boost::python::self) + + ; + + + boost::python::implicitly_convertible(); +} + +}; +# 29 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/pyside.hpp" 2 +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/pyside_global.hpp" 1 +# 30 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/pyside.hpp" 2 +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/parent_policy.hpp" 1 +# 28 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/parent_policy.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include/g++-v4/cstddef" 2 3 +# 29 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/parent_policy.hpp" 2 + + +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/qptr.hpp" 1 +# 28 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/qptr.hpp" +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/pyside_global.hpp" 1 +# 29 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/qptr.hpp" 2 +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/wrapper.hpp" 1 +# 27 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/wrapper.hpp" +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/pyside_global.hpp" 1 +# 28 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/wrapper.hpp" 2 + + +# 1 "/usr/include/qt4/QtCore/QStringList" 1 +# 1 "/usr/include/qt4/QtCore/qstringlist.h" 1 +# 1 "/usr/include/qt4/QtCore/QStringList" 2 +# 31 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/wrapper.hpp" 2 + +namespace PySide +{ + +class __attribute__ ((visibility("default"))) wrapper +{ + public: + PyObject* py_object() { return m_self; } + void keep_cpp_ref(); + virtual ~wrapper(); + + protected: + wrapper(PyObject *self); + boost::python::object get_override(const char* base_class_name, const char* method_name) const; + + private: + wrapper() {} + wrapper(wrapper &) {} + + PyObject *m_self; + bool m_has_cpp_ref; +}; + +} +# 30 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/qptr.hpp" 2 + +# 1 "/usr/include/qt4/QtCore/QHash" 1 +# 1 "/usr/include/qt4/QtCore/qhash.h" 1 +# 51 "/usr/include/qt4/QtCore/qhash.h" + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +class QBitArray; +class QByteArray; +class QString; +class QStringRef; + +inline uint qHash(char key) { return uint(key); } +inline uint qHash(uchar key) { return uint(key); } +inline uint qHash(signed char key) { return uint(key); } +inline uint qHash(ushort key) { return uint(key); } +inline uint qHash(short key) { return uint(key); } +inline uint qHash(uint key) { return key; } +inline uint qHash(int key) { return uint(key); } +inline uint qHash(ulong key) +{ + if (sizeof(ulong) > sizeof(uint)) { + return uint(((key >> (8 * sizeof(uint) - 1)) ^ key) & (~0U)); + } else { + return uint(key & (~0U)); + } +} +inline uint qHash(long key) { return qHash(ulong(key)); } +inline uint qHash(quint64 key) +{ + if (sizeof(quint64) > sizeof(uint)) { + return uint(((key >> (8 * sizeof(uint) - 1)) ^ key) & (~0U)); + } else { + return uint(key & (~0U)); + } +} +inline uint qHash(qint64 key) { return qHash(quint64(key)); } +inline uint qHash(QChar key) { return qHash(key.unicode()); } + uint qHash(const QByteArray &key); + uint qHash(const QString &key); + uint qHash(const QStringRef &key); + uint qHash(const QBitArray &key); + + + + + +template inline uint qHash(const T *key) +{ + return qHash(reinterpret_cast(key)); +} + + + + +template inline uint qHash(const QPair &key) +{ + uint h1 = qHash(key.first); + uint h2 = qHash(key.second); + return ((h1 << 16) | (h1 >> 16)) ^ h2; +} + +struct QHashData +{ + struct Node { + Node *next; + uint h; + }; + + Node *fakeNext; + Node **buckets; + QBasicAtomicInt ref; + int size; + int nodeSize; + short userNumBits; + short numBits; + int numBuckets; + uint sharable : 1; + uint strictAlignment : 1; + uint reserved : 30; + + void *allocateNode(); + void *allocateNode(int nodeAlign); + void freeNode(void *node); + QHashData *detach_helper(void (*node_duplicate)(Node *, void *), int nodeSize); + QHashData *detach_helper2(void (*node_duplicate)(Node *, void *), void (*node_delete)(Node *), + int nodeSize, int nodeAlign); + void mightGrow(); + bool willGrow(); + void hasShrunk(); + void rehash(int hint); + void free_helper(void (*node_delete)(Node *)); + void destroyAndFree(); + Node *firstNode(); + + + + + static Node *nextNode(Node *node); + static Node *previousNode(Node *node); + + static QHashData shared_null; +}; + +inline void QHashData::mightGrow() +{ + if (size >= numBuckets) + rehash(numBits + 1); +} + +inline bool QHashData::willGrow() +{ + if (size >= numBuckets) { + rehash(numBits + 1); + return true; + } else { + return false; + } +} + +inline void QHashData::hasShrunk() +{ + if (size <= (numBuckets >> 3) && numBits > userNumBits) { + try { + rehash(qMax(int(numBits) - 2, int(userNumBits))); + } catch (const std::bad_alloc &) { + + } + } +} + +inline QHashData::Node *QHashData::firstNode() +{ + Node *e = reinterpret_cast(this); + Node **bucket = buckets; + int n = numBuckets; + while (n--) { + if (*bucket != e) + return *bucket; + ++bucket; + } + return e; +} + +struct QHashDummyValue +{ +}; + +inline bool operator==(const QHashDummyValue & , const QHashDummyValue & ) +{ + return true; +} + +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE | Q_DUMMY_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE | Q_DUMMY_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QHashDummyValue)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE | Q_DUMMY_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QHashDummyValue"; } }; + +template +struct QHashDummyNode +{ + QHashDummyNode *next; + uint h; + Key key; + + inline QHashDummyNode(const Key &key0) : key(key0) {} +}; + +template +struct QHashNode +{ + QHashNode *next; + uint h; + Key key; + T value; + + inline QHashNode(const Key &key0) : key(key0) {} + inline QHashNode(const Key &key0, const T &value0) : key(key0), value(value0) {} + inline bool same_key(uint h0, const Key &key0) { return h0 == h && key0 == key; } +}; +# 250 "/usr/include/qt4/QtCore/qhash.h" +template struct QHashDummyNode { QHashDummyNode *next; union { uint h; short key; }; inline QHashDummyNode(short ) {} }; template struct QHashNode { QHashNode *next; union { uint h; short key; }; T value; inline QHashNode(short ) {} inline QHashNode(short , const T &value0) : value(value0) {} inline bool same_key(uint h0, short) { return h0 == h; } }; +template struct QHashDummyNode { QHashDummyNode *next; union { uint h; ushort key; }; inline QHashDummyNode(ushort ) {} }; template struct QHashNode { QHashNode *next; union { uint h; ushort key; }; T value; inline QHashNode(ushort ) {} inline QHashNode(ushort , const T &value0) : value(value0) {} inline bool same_key(uint h0, ushort) { return h0 == h; } }; + +template struct QHashDummyNode { QHashDummyNode *next; union { uint h; int key; }; inline QHashDummyNode(int ) {} }; template struct QHashNode { QHashNode *next; union { uint h; int key; }; T value; inline QHashNode(int ) {} inline QHashNode(int , const T &value0) : value(value0) {} inline bool same_key(uint h0, int) { return h0 == h; } }; +template struct QHashDummyNode { QHashDummyNode *next; union { uint h; uint key; }; inline QHashDummyNode(uint ) {} }; template struct QHashNode { QHashNode *next; union { uint h; uint key; }; T value; inline QHashNode(uint ) {} inline QHashNode(uint , const T &value0) : value(value0) {} inline bool same_key(uint h0, uint) { return h0 == h; } }; + + + +template +class QHash +{ + typedef QHashDummyNode DummyNode; + typedef QHashNode Node; + + union { + QHashData *d; + QHashNode *e; + }; + + static inline Node *concrete(QHashData::Node *node) { + return reinterpret_cast(node); + } + + + static inline int alignOfNode() { return qMax(sizeof(void*), __alignof__(Node)); } + static inline int alignOfDummyNode() { return qMax(sizeof(void*), __alignof__(DummyNode)); } + + + + + +public: + inline QHash() : d(&QHashData::shared_null) { d->ref.ref(); } + inline QHash(const QHash &other) : d(other.d) { d->ref.ref(); if (!d->sharable) detach(); } + inline ~QHash() { if (!d->ref.deref()) freeData(d); } + + QHash &operator=(const QHash &other); + + bool operator==(const QHash &other) const; + inline bool operator!=(const QHash &other) const { return !(*this == other); } + + inline int size() const { return d->size; } + + inline bool isEmpty() const { return d->size == 0; } + + inline int capacity() const { return d->numBuckets; } + void reserve(int size); + inline void squeeze() { reserve(1); } + + inline void detach() { if (d->ref != 1) detach_helper(); } + inline bool isDetached() const { return d->ref == 1; } + inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; } + + void clear(); + + int remove(const Key &key); + T take(const Key &key); + + bool contains(const Key &key) const; + const Key key(const T &value) const; + const Key key(const T &value, const Key &defaultKey) const; + const T value(const Key &key) const; + const T value(const Key &key, const T &defaultValue) const; + T &operator[](const Key &key); + const T operator[](const Key &key) const; + + QList uniqueKeys() const; + QList keys() const; + QList keys(const T &value) const; + QList values() const; + QList values(const Key &key) const; + int count(const Key &key) const; + + class const_iterator; + + class iterator + { + friend class const_iterator; + QHashData::Node *i; + + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + typedef T value_type; + typedef T *pointer; + typedef T &reference; + + + inline operator Node *() const { return concrete(i); } + inline iterator() : i(0) { } + explicit inline iterator(void *node) : i(reinterpret_cast(node)) { } + + inline const Key &key() const { return concrete(i)->key; } + inline T &value() const { return concrete(i)->value; } + inline T &operator*() const { return concrete(i)->value; } + inline T *operator->() const { return &concrete(i)->value; } + inline bool operator==(const iterator &o) const { return i == o.i; } + inline bool operator!=(const iterator &o) const { return i != o.i; } + + inline iterator &operator++() { + i = QHashData::nextNode(i); + return *this; + } + inline iterator operator++(int) { + iterator r = *this; + i = QHashData::nextNode(i); + return r; + } + inline iterator &operator--() { + i = QHashData::previousNode(i); + return *this; + } + inline iterator operator--(int) { + iterator r = *this; + i = QHashData::previousNode(i); + return r; + } + inline iterator operator+(int j) const + { iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; } + inline iterator operator-(int j) const { return operator+(-j); } + inline iterator &operator+=(int j) { return *this = *this + j; } + inline iterator &operator-=(int j) { return *this = *this - j; } + + + + + + public: + + inline bool operator==(const const_iterator &o) const + { return i == o.i; } + inline bool operator!=(const const_iterator &o) const + { return i != o.i; } + + private: + + inline operator bool() const { return false; } + }; + friend class iterator; + + class const_iterator + { + friend class iterator; + QHashData::Node *i; + + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + typedef T value_type; + typedef const T *pointer; + typedef const T &reference; + + + inline operator Node *() const { return concrete(i); } + inline const_iterator() : i(0) { } + explicit inline const_iterator(void *node) + : i(reinterpret_cast(node)) { } + + + + inline const_iterator(const iterator &o) + + { i = o.i; } + + inline const Key &key() const { return concrete(i)->key; } + inline const T &value() const { return concrete(i)->value; } + inline const T &operator*() const { return concrete(i)->value; } + inline const T *operator->() const { return &concrete(i)->value; } + inline bool operator==(const const_iterator &o) const { return i == o.i; } + inline bool operator!=(const const_iterator &o) const { return i != o.i; } + + inline const_iterator &operator++() { + i = QHashData::nextNode(i); + return *this; + } + inline const_iterator operator++(int) { + const_iterator r = *this; + i = QHashData::nextNode(i); + return r; + } + inline const_iterator &operator--() { + i = QHashData::previousNode(i); + return *this; + } + inline const_iterator operator--(int) { + const_iterator r = *this; + i = QHashData::previousNode(i); + return r; + } + inline const_iterator operator+(int j) const + { const_iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; } + inline const_iterator operator-(int j) const { return operator+(-j); } + inline const_iterator &operator+=(int j) { return *this = *this + j; } + inline const_iterator &operator-=(int j) { return *this = *this - j; } +# 452 "/usr/include/qt4/QtCore/qhash.h" + private: + + inline operator bool() const { return false; } + }; + friend class const_iterator; + + + inline iterator begin() { detach(); return iterator(d->firstNode()); } + inline const_iterator begin() const { return const_iterator(d->firstNode()); } + inline const_iterator constBegin() const { return const_iterator(d->firstNode()); } + inline iterator end() { detach(); return iterator(e); } + inline const_iterator end() const { return const_iterator(e); } + inline const_iterator constEnd() const { return const_iterator(e); } + iterator erase(iterator it); + + + typedef iterator Iterator; + typedef const_iterator ConstIterator; + inline int count() const { return d->size; } + iterator find(const Key &key); + const_iterator find(const Key &key) const; + const_iterator constFind(const Key &key) const; + iterator insert(const Key &key, const T &value); + iterator insertMulti(const Key &key, const T &value); + QHash &unite(const QHash &other); + + + typedef T mapped_type; + typedef Key key_type; + typedef ptrdiff_t difference_type; + typedef int size_type; + + inline bool empty() const { return isEmpty(); } + + + + + + +private: + void detach_helper(); + void freeData(QHashData *d); + Node **findNode(const Key &key, uint *hp = 0) const; + Node *createNode(uint h, const Key &key, const T &value, Node **nextNode); + void deleteNode(Node *node); + static void deleteNode2(QHashData::Node *node); + + static void duplicateNode(QHashData::Node *originalNode, void *newNode); +}; + + +template +inline void QHash::deleteNode(Node *node) +{ + deleteNode2(reinterpret_cast(node)); + d->freeNode(node); +} + +template +inline void QHash::deleteNode2(QHashData::Node *node) +{ + + + + + + concrete(node)->~Node(); + +} + +template +inline void QHash::duplicateNode(QHashData::Node *node, void *newNode) +{ + Node *concreteNode = concrete(node); + if (QTypeInfo::isDummy) { + (void) new (newNode) DummyNode(concreteNode->key); + } else { + (void) new (newNode) Node(concreteNode->key, concreteNode->value); + } +} + +template +inline typename QHash::Node * +QHash::createNode(uint ah, const Key &akey, const T &avalue, Node **anextNode) +{ + Node *node; + + if (QTypeInfo::isDummy) { + node = reinterpret_cast(new (d->allocateNode(alignOfDummyNode())) DummyNode(akey)); + } else { + node = new (d->allocateNode(alignOfNode())) Node(akey, avalue); + } + + node->h = ah; + node->next = *anextNode; + *anextNode = node; + ++d->size; + return node; +} + +template +inline QHash &QHash::unite(const QHash &other) +{ + QHash copy(other); + const_iterator it = copy.constEnd(); + while (it != copy.constBegin()) { + --it; + insertMulti(it.key(), it.value()); + } + return *this; +} + +template + void QHash::freeData(QHashData *x) +{ + x->free_helper(deleteNode2); +} + +template +inline void QHash::clear() +{ + *this = QHash(); +} + +template + void QHash::detach_helper() +{ + QHashData *x = d->detach_helper2(duplicateNode, deleteNode2, + QTypeInfo::isDummy ? sizeof(DummyNode) : sizeof(Node), + QTypeInfo::isDummy ? alignOfDummyNode() : alignOfNode()); + if (!d->ref.deref()) + freeData(d); + d = x; +} + +template +inline QHash &QHash::operator=(const QHash &other) +{ + if (d != other.d) { + other.d->ref.ref(); + if (!d->ref.deref()) + freeData(d); + d = other.d; + if (!d->sharable) + detach_helper(); + } + return *this; +} + +template +inline const T QHash::value(const Key &akey) const +{ + Node *node; + if (d->size == 0 || (node = *findNode(akey)) == e) { + return T(); + } else { + return node->value; + } +} + +template +inline const T QHash::value(const Key &akey, const T &adefaultValue) const +{ + Node *node; + if (d->size == 0 || (node = *findNode(akey)) == e) { + return adefaultValue; + } else { + return node->value; + } +} + +template + QList QHash::uniqueKeys() const +{ + QList res; + const_iterator i = begin(); + if (i != end()) { + for (;;) { + const Key &aKey = i.key(); + res.append(aKey); + do { + if (++i == end()) + goto break_out_of_outer_loop; + } while (aKey == i.key()); + } + } +break_out_of_outer_loop: + return res; +} + +template + QList QHash::keys() const +{ + QList res; + const_iterator i = begin(); + while (i != end()) { + res.append(i.key()); + ++i; + } + return res; +} + +template + QList QHash::keys(const T &avalue) const +{ + QList res; + const_iterator i = begin(); + while (i != end()) { + if (i.value() == avalue) + res.append(i.key()); + ++i; + } + return res; +} + +template + const Key QHash::key(const T &avalue) const +{ + return key(avalue, Key()); +} + +template + const Key QHash::key(const T &avalue, const Key &defaultValue) const +{ + const_iterator i = begin(); + while (i != end()) { + if (i.value() == avalue) + return i.key(); + ++i; + } + + return defaultValue; +} + +template + QList QHash::values() const +{ + QList res; + const_iterator i = begin(); + while (i != end()) { + res.append(i.value()); + ++i; + } + return res; +} + +template + QList QHash::values(const Key &akey) const +{ + QList res; + Node *node = *findNode(akey); + if (node != e) { + do { + res.append(node->value); + } while ((node = node->next) != e && node->key == akey); + } + return res; +} + +template + int QHash::count(const Key &akey) const +{ + int cnt = 0; + Node *node = *findNode(akey); + if (node != e) { + do { + ++cnt; + } while ((node = node->next) != e && node->key == akey); + } + return cnt; +} + +template +inline const T QHash::operator[](const Key &akey) const +{ + return value(akey); +} + +template +inline T &QHash::operator[](const Key &akey) +{ + detach(); + + uint h; + Node **node = findNode(akey, &h); + if (*node == e) { + if (d->willGrow()) + node = findNode(akey, &h); + return createNode(h, akey, T(), node)->value; + } + return (*node)->value; +} + +template +inline typename QHash::iterator QHash::insert(const Key &akey, + const T &avalue) +{ + detach(); + + uint h; + Node **node = findNode(akey, &h); + if (*node == e) { + if (d->willGrow()) + node = findNode(akey, &h); + return iterator(createNode(h, akey, avalue, node)); + } + + if (!QTypeInfo::isDummy) + (*node)->value = avalue; + return iterator(*node); +} + +template +inline typename QHash::iterator QHash::insertMulti(const Key &akey, + const T &avalue) +{ + detach(); + d->willGrow(); + + uint h; + Node **nextNode = findNode(akey, &h); + return iterator(createNode(h, akey, avalue, nextNode)); +} + +template + int QHash::remove(const Key &akey) +{ + if (isEmpty()) + return 0; + detach(); + + int oldSize = d->size; + Node **node = findNode(akey); + if (*node != e) { + bool deleteNext = true; + do { + Node *next = (*node)->next; + deleteNext = (next != e && next->key == (*node)->key); + deleteNode(*node); + *node = next; + --d->size; + } while (deleteNext); + d->hasShrunk(); + } + return oldSize - d->size; +} + +template + T QHash::take(const Key &akey) +{ + if (isEmpty()) + return T(); + detach(); + + Node **node = findNode(akey); + if (*node != e) { + T t = (*node)->value; + Node *next = (*node)->next; + deleteNode(*node); + *node = next; + --d->size; + d->hasShrunk(); + return t; + } + return T(); +} + +template + typename QHash::iterator QHash::erase(iterator it) +{ + if (it == iterator(e)) + return it; + + iterator ret = it; + ++ret; + + Node *node = it; + Node **node_ptr = reinterpret_cast(&d->buckets[node->h % d->numBuckets]); + while (*node_ptr != node) + node_ptr = &(*node_ptr)->next; + *node_ptr = node->next; + deleteNode(node); + --d->size; + return ret; +} + +template +inline void QHash::reserve(int asize) +{ + detach(); + d->rehash(-qMax(asize, 1)); +} + +template +inline typename QHash::const_iterator QHash::find(const Key &akey) const +{ + return const_iterator(*findNode(akey)); +} + +template +inline typename QHash::const_iterator QHash::constFind(const Key &akey) const +{ + return const_iterator(*findNode(akey)); +} + +template +inline typename QHash::iterator QHash::find(const Key &akey) +{ + detach(); + return iterator(*findNode(akey)); +} + +template +inline bool QHash::contains(const Key &akey) const +{ + return *findNode(akey) != e; +} + +template + typename QHash::Node **QHash::findNode(const Key &akey, + uint *ahp) const +{ + Node **node; + uint h = qHash(akey); + + if (d->numBuckets) { + node = reinterpret_cast(&d->buckets[h % d->numBuckets]); + ((!(*node == e || (*node)->next)) ? qt_assert("*node == e || (*node)->next","/usr/include/qt4/QtCore/qhash.h",879) : qt_noop()); + while (*node != e && !(*node)->same_key(h, akey)) + node = &(*node)->next; + } else { + node = const_cast(reinterpret_cast(&e)); + } + if (ahp) + *ahp = h; + return node; +} + +template + bool QHash::operator==(const QHash &other) const +{ + if (size() != other.size()) + return false; + if (d == other.d) + return true; + + const_iterator it = begin(); + + while (it != end()) { + const Key &akey = it.key(); + + const_iterator it2 = other.find(akey); + do { + if (it2 == other.end() || !(it2.key() == akey)) + return false; + if (!QTypeInfo::isDummy && !(it.value() == it2.value())) + return false; + ++it; + ++it2; + } while (it != end() && it.key() == akey); + } + return true; +} + +template +class QMultiHash : public QHash +{ +public: + QMultiHash() {} + QMultiHash(const QHash &other) : QHash(other) {} + + inline typename QHash::iterator replace(const Key &key, const T &value) + { return QHash::insert(key, value); } + + inline typename QHash::iterator insert(const Key &key, const T &value) + { return QHash::insertMulti(key, value); } + + inline QMultiHash &operator+=(const QMultiHash &other) + { unite(other); return *this; } + inline QMultiHash operator+(const QMultiHash &other) const + { QMultiHash result = *this; result += other; return result; } + + + + using QHash::contains; + using QHash::remove; + using QHash::count; + using QHash::find; + using QHash::constFind; +# 958 "/usr/include/qt4/QtCore/qhash.h" + bool contains(const Key &key, const T &value) const; + + int remove(const Key &key, const T &value); + + int count(const Key &key, const T &value) const; + + typename QHash::iterator find(const Key &key, const T &value) { + typename QHash::iterator i(find(key)); + typename QHash::iterator end(this->end()); + while (i != end && i.key() == key) { + if (i.value() == value) + return i; + ++i; + } + return end; + } + typename QHash::const_iterator find(const Key &key, const T &value) const { + typename QHash::const_iterator i(constFind(key)); + typename QHash::const_iterator end(QHash::constEnd()); + while (i != end && i.key() == key) { + if (i.value() == value) + return i; + ++i; + } + return end; + } + typename QHash::const_iterator constFind(const Key &key, const T &value) const + { return find(key, value); } +private: + T &operator[](const Key &key); + const T operator[](const Key &key) const; +}; + +template +inline bool QMultiHash::contains(const Key &key, const T &value) const +{ + return constFind(key, value) != QHash::constEnd(); +} + +template +inline int QMultiHash::remove(const Key &key, const T &value) +{ + int n = 0; + typename QHash::iterator i(find(key)); + typename QHash::iterator end(QHash::end()); + while (i != end && i.key() == key) { + if (i.value() == value) { + + + + + i = erase(i); + + ++n; + } else { + ++i; + } + } + return n; +} + +template +inline int QMultiHash::count(const Key &key, const T &value) const +{ + int n = 0; + typename QHash::const_iterator i(constFind(key)); + typename QHash::const_iterator end(QHash::constEnd()); + while (i != end && i.key() == key) { + if (i.value() == value) + ++n; + ++i; + } + return n; +} + +template class QHashIterator { typedef typename QHash::const_iterator const_iterator; typedef const_iterator Item; QHash c; const_iterator i, n; inline bool item_exists() const { return n != c.constEnd(); } public: inline QHashIterator(const QHash &container) : c(container), i(c.constBegin()), n(c.constEnd()) {} inline QHashIterator &operator=(const QHash &container) { c = container; i = c.constBegin(); n = c.constEnd(); return *this; } inline void toFront() { i = c.constBegin(); n = c.constEnd(); } inline void toBack() { i = c.constEnd(); n = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline Item next() { n = i++; return n; } inline Item peekNext() const { return i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline Item previous() { n = --i; return n; } inline Item peekPrevious() const { const_iterator p = i; return --p; } inline const T &value() const { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qhash.h",1033) : qt_noop()); return *n; } inline const Key &key() const { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qhash.h",1033) : qt_noop()); return n.key(); } inline bool findNext(const T &t) { while ((n = i) != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(n = --i) == t) return true; n = c.constEnd(); return false; } }; +template class QMutableHashIterator { typedef typename QHash::iterator iterator; typedef typename QHash::const_iterator const_iterator; typedef iterator Item; QHash *c; iterator i, n; inline bool item_exists() const { return const_iterator(n) != c->constEnd(); } public: inline QMutableHashIterator(QHash &container) : c(&container) { c->setSharable(false); i = c->begin(); n = c->end(); } inline ~QMutableHashIterator() { c->setSharable(true); } inline QMutableHashIterator &operator=(QHash &container) { c->setSharable(true); c = &container; c->setSharable(false); i = c->begin(); n = c->end(); return *this; } inline void toFront() { i = c->begin(); n = c->end(); } inline void toBack() { i = c->end(); n = c->end(); } inline bool hasNext() const { return const_iterator(i) != c->constEnd(); } inline Item next() { n = i++; return n; } inline Item peekNext() const { return i; } inline bool hasPrevious() const { return const_iterator(i) != c->constBegin(); } inline Item previous() { n = --i; return n; } inline Item peekPrevious() const { iterator p = i; return --p; } inline void remove() { if (const_iterator(n) != c->constEnd()) { i = c->erase(n); n = c->end(); } } inline void setValue(const T &t) { if (const_iterator(n) != c->constEnd()) *n = t; } inline T &value() { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qhash.h",1034) : qt_noop()); return *n; } inline const T &value() const { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qhash.h",1034) : qt_noop()); return *n; } inline const Key &key() const { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qhash.h",1034) : qt_noop()); return n.key(); } inline bool findNext(const T &t) { while (const_iterator(n = i) != c->constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (const_iterator(i) != c->constBegin()) if (*(n = --i) == t) return true; n = c->end(); return false; } }; + + + + +# 1 "/usr/include/qt4/QtCore/QHash" 2 +# 32 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/qptr.hpp" 2 +# 1 "/usr/include/qt4/QtCore/QDebug" 1 +# 1 "/usr/include/qt4/QtCore/qdebug.h" 1 +# 46 "/usr/include/qt4/QtCore/qdebug.h" +# 1 "/usr/include/qt4/QtCore/qhash.h" 1 +# 47 "/usr/include/qt4/QtCore/qdebug.h" 2 + +# 1 "/usr/include/qt4/QtCore/qmap.h" 1 +# 55 "/usr/include/qt4/QtCore/qmap.h" + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +struct QMapData +{ + struct Node { + Node *backward; + Node *forward[1]; + }; + enum { LastLevel = 11, Sparseness = 3 }; + + QMapData *backward; + QMapData *forward[QMapData::LastLevel + 1]; + QBasicAtomicInt ref; + int topLevel; + int size; + uint randomBits; + uint insertInOrder : 1; + uint sharable : 1; + uint strictAlignment : 1; + uint reserved : 29; + + static QMapData *createData(); + static QMapData *createData(int alignment); + void continueFreeData(int offset); + Node *node_create(Node *update[], int offset); + Node *node_create(Node *update[], int offset, int alignment); + void node_delete(Node *update[], int offset, Node *node); + + + + + + static QMapData shared_null; +}; +# 105 "/usr/include/qt4/QtCore/qmap.h" +template inline bool qMapLessThanKey(const Key &key1, const Key &key2) +{ + return key1 < key2; +} + + +template inline bool qMapLessThanKey(Ptr *key1, Ptr *key2) +{ + ((!(sizeof(quintptr) == sizeof(Ptr *))) ? qt_assert("sizeof(quintptr) == sizeof(Ptr *)","/usr/include/qt4/QtCore/qmap.h",113) : qt_noop()); + return quintptr(key1) < quintptr(key2); +} + +template inline bool qMapLessThanKey(const Ptr *key1, const Ptr *key2) +{ + ((!(sizeof(quintptr) == sizeof(const Ptr *))) ? qt_assert("sizeof(quintptr) == sizeof(const Ptr *)","/usr/include/qt4/QtCore/qmap.h",119) : qt_noop()); + return quintptr(key1) < quintptr(key2); +} + + +template +struct QMapNode { + Key key; + T value; + QMapData::Node *backward; + QMapData::Node *forward[1]; +}; + +template +struct QMapPayloadNode +{ + Key key; + T value; + QMapData::Node *backward; +}; + +template +class QMap +{ + typedef QMapNode Node; + typedef QMapPayloadNode PayloadNode; + + union { + QMapData *d; + QMapData::Node *e; + }; + + static inline int payload() { return sizeof(PayloadNode) - sizeof(QMapData::Node *); } + static inline int alignment() { + + return int(qMax(sizeof(void*), __alignof__(Node))); + + + + } + static inline Node *concrete(QMapData::Node *node) { + return reinterpret_cast(reinterpret_cast(node) - payload()); + } + +public: + inline QMap() : d(&QMapData::shared_null) { d->ref.ref(); } + inline QMap(const QMap &other) : d(other.d) + { d->ref.ref(); if (!d->sharable) detach(); } + inline ~QMap() { if (!d) return; if (!d->ref.deref()) freeData(d); } + + QMap &operator=(const QMap &other); + + explicit QMap(const typename std::map &other); + std::map toStdMap() const; + + + bool operator==(const QMap &other) const; + inline bool operator!=(const QMap &other) const { return !(*this == other); } + + inline int size() const { return d->size; } + + inline bool isEmpty() const { return d->size == 0; } + + inline void detach() { if (d->ref != 1) detach_helper(); } + inline bool isDetached() const { return d->ref == 1; } + inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; } + inline void setInsertInOrder(bool ordered) { d->insertInOrder = ordered; } + + void clear(); + + int remove(const Key &key); + T take(const Key &key); + + bool contains(const Key &key) const; + const Key key(const T &value) const; + const Key key(const T &value, const Key &defaultKey) const; + const T value(const Key &key) const; + const T value(const Key &key, const T &defaultValue) const; + T &operator[](const Key &key); + const T operator[](const Key &key) const; + + QList uniqueKeys() const; + QList keys() const; + QList keys(const T &value) const; + QList values() const; + QList values(const Key &key) const; + int count(const Key &key) const; + + class const_iterator; + + class iterator + { + friend class const_iterator; + QMapData::Node *i; + + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + typedef T value_type; + typedef T *pointer; + typedef T &reference; + + + inline operator QMapData::Node *() const { return i; } + inline iterator() : i(0) { } + inline iterator(QMapData::Node *node) : i(node) { } + + inline const Key &key() const { return concrete(i)->key; } + inline T &value() const { return concrete(i)->value; } + + + + inline T &operator*() const { return concrete(i)->value; } + inline T *operator->() const { return &concrete(i)->value; } + inline bool operator==(const iterator &o) const { return i == o.i; } + inline bool operator!=(const iterator &o) const { return i != o.i; } + + inline iterator &operator++() { + i = i->forward[0]; + return *this; + } + inline iterator operator++(int) { + iterator r = *this; + i = i->forward[0]; + return r; + } + inline iterator &operator--() { + i = i->backward; + return *this; + } + inline iterator operator--(int) { + iterator r = *this; + i = i->backward; + return r; + } + inline iterator operator+(int j) const + { iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; } + inline iterator operator-(int j) const { return operator+(-j); } + inline iterator &operator+=(int j) { return *this = *this + j; } + inline iterator &operator-=(int j) { return *this = *this - j; } + + + + + + public: + + inline bool operator==(const const_iterator &o) const + { return i == o.i; } + inline bool operator!=(const const_iterator &o) const + { return i != o.i; } + + private: + + inline operator bool() const { return false; } + }; + friend class iterator; + + class const_iterator + { + friend class iterator; + QMapData::Node *i; + + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + typedef T value_type; + typedef const T *pointer; + typedef const T &reference; + + + inline operator QMapData::Node *() const { return i; } + inline const_iterator() : i(0) { } + inline const_iterator(QMapData::Node *node) : i(node) { } + + + + inline const_iterator(const iterator &o) + + { i = o.i; } + + inline const Key &key() const { return concrete(i)->key; } + inline const T &value() const { return concrete(i)->value; } + + + + inline const T &operator*() const { return concrete(i)->value; } + inline const T *operator->() const { return &concrete(i)->value; } + inline bool operator==(const const_iterator &o) const { return i == o.i; } + inline bool operator!=(const const_iterator &o) const { return i != o.i; } + + inline const_iterator &operator++() { + i = i->forward[0]; + return *this; + } + inline const_iterator operator++(int) { + const_iterator r = *this; + i = i->forward[0]; + return r; + } + inline const_iterator &operator--() { + i = i->backward; + return *this; + } + inline const_iterator operator--(int) { + const_iterator r = *this; + i = i->backward; + return r; + } + inline const_iterator operator+(int j) const + { const_iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; } + inline const_iterator operator-(int j) const { return operator+(-j); } + inline const_iterator &operator+=(int j) { return *this = *this + j; } + inline const_iterator &operator-=(int j) { return *this = *this - j; } +# 341 "/usr/include/qt4/QtCore/qmap.h" + private: + + inline operator bool() const { return false; } + }; + friend class const_iterator; + + + inline iterator begin() { detach(); return iterator(e->forward[0]); } + inline const_iterator begin() const { return const_iterator(e->forward[0]); } + inline const_iterator constBegin() const { return const_iterator(e->forward[0]); } + inline iterator end() { + detach(); + return iterator(e); + } + inline const_iterator end() const { return const_iterator(e); } + inline const_iterator constEnd() const { return const_iterator(e); } + iterator erase(iterator it); + + + + + + + typedef iterator Iterator; + typedef const_iterator ConstIterator; + inline int count() const { return d->size; } + iterator find(const Key &key); + const_iterator find(const Key &key) const; + const_iterator constFind(const Key &key) const; + iterator lowerBound(const Key &key); + const_iterator lowerBound(const Key &key) const; + iterator upperBound(const Key &key); + const_iterator upperBound(const Key &key) const; + iterator insert(const Key &key, const T &value); + + + + iterator insertMulti(const Key &key, const T &value); + + + + QMap &unite(const QMap &other); + + + typedef Key key_type; + typedef T mapped_type; + typedef ptrdiff_t difference_type; + typedef int size_type; + inline bool empty() const { return isEmpty(); } + + + + + +private: + void detach_helper(); + void freeData(QMapData *d); + QMapData::Node *findNode(const Key &key) const; + QMapData::Node *mutableFindNode(QMapData::Node *update[], const Key &key) const; + QMapData::Node *node_create(QMapData *d, QMapData::Node *update[], const Key &key, + const T &value); +}; + +template +inline QMap &QMap::operator=(const QMap &other) +{ + if (d != other.d) { + other.d->ref.ref(); + if (!d->ref.deref()) + freeData(d); + d = other.d; + if (!d->sharable) + detach_helper(); + } + return *this; +} + +template +inline void QMap::clear() +{ + *this = QMap(); +} + +template +inline typename QMapData::Node * +QMap::node_create(QMapData *adt, QMapData::Node *aupdate[], const Key &akey, const T &avalue) +{ + QMapData::Node *abstractNode = adt->node_create(aupdate, payload(), alignment()); + try { + Node *concreteNode = concrete(abstractNode); + new (&concreteNode->key) Key(akey); + try { + new (&concreteNode->value) T(avalue); + } catch (...) { + concreteNode->key.~Key(); + throw; + } + } catch (...) { + adt->node_delete(aupdate, payload(), abstractNode); + throw; + } +# 452 "/usr/include/qt4/QtCore/qmap.h" + return abstractNode; +} + +template +inline QMapData::Node *QMap::findNode(const Key &akey) const +{ + QMapData::Node *cur = e; + QMapData::Node *next = e; + + for (int i = d->topLevel; i >= 0; i--) { + while ((next = cur->forward[i]) != e && qMapLessThanKey(concrete(next)->key, akey)) + cur = next; + } + + if (next != e && !qMapLessThanKey(akey, concrete(next)->key)) { + return next; + } else { + return e; + } +} + +template +inline const T QMap::value(const Key &akey) const +{ + QMapData::Node *node; + if (d->size == 0 || (node = findNode(akey)) == e) { + return T(); + } else { + return concrete(node)->value; + } +} + +template +inline const T QMap::value(const Key &akey, const T &adefaultValue) const +{ + QMapData::Node *node; + if (d->size == 0 || (node = findNode(akey)) == e) { + return adefaultValue; + } else { + return concrete(node)->value; + } +} + +template +inline const T QMap::operator[](const Key &akey) const +{ + return value(akey); +} + +template +inline T &QMap::operator[](const Key &akey) +{ + detach(); + + QMapData::Node *update[QMapData::LastLevel + 1]; + QMapData::Node *node = mutableFindNode(update, akey); + if (node == e) + node = node_create(d, update, akey, T()); + return concrete(node)->value; +} + +template +inline int QMap::count(const Key &akey) const +{ + int cnt = 0; + QMapData::Node *node = findNode(akey); + if (node != e) { + do { + ++cnt; + node = node->forward[0]; + } while (node != e && !qMapLessThanKey(akey, concrete(node)->key)); + } + return cnt; +} + +template +inline bool QMap::contains(const Key &akey) const +{ + return findNode(akey) != e; +} + +template +inline typename QMap::iterator QMap::insert(const Key &akey, + const T &avalue) +{ + detach(); + + QMapData::Node *update[QMapData::LastLevel + 1]; + QMapData::Node *node = mutableFindNode(update, akey); + if (node == e) { + node = node_create(d, update, akey, avalue); + } else { + concrete(node)->value = avalue; + } + return iterator(node); +} +# 569 "/usr/include/qt4/QtCore/qmap.h" +template +inline typename QMap::iterator QMap::insertMulti(const Key &akey, + const T &avalue) +{ + detach(); + + QMapData::Node *update[QMapData::LastLevel + 1]; + mutableFindNode(update, akey); + return iterator(node_create(d, update, akey, avalue)); +} + +template +inline typename QMap::const_iterator QMap::find(const Key &akey) const +{ + return const_iterator(findNode(akey)); +} + +template +inline typename QMap::const_iterator QMap::constFind(const Key &akey) const +{ + return const_iterator(findNode(akey)); +} + +template +inline typename QMap::iterator QMap::find(const Key &akey) +{ + detach(); + return iterator(findNode(akey)); +} + +template +inline QMap &QMap::unite(const QMap &other) +{ + QMap copy(other); + const_iterator it = copy.constEnd(); + const const_iterator b = copy.constBegin(); + while (it != b) { + --it; + insertMulti(it.key(), it.value()); + } + return *this; +} + +template + void QMap::freeData(QMapData *x) +{ + if (QTypeInfo::isComplex || QTypeInfo::isComplex) { + QMapData *cur = x; + QMapData *next = cur->forward[0]; + while (next != x) { + cur = next; + next = cur->forward[0]; + + + + Node *concreteNode = concrete(reinterpret_cast(cur)); + concreteNode->key.~Key(); + concreteNode->value.~T(); + + + + } + } + x->continueFreeData(payload()); +} + +template + int QMap::remove(const Key &akey) +{ + detach(); + + QMapData::Node *update[QMapData::LastLevel + 1]; + QMapData::Node *cur = e; + QMapData::Node *next = e; + int oldSize = d->size; + + for (int i = d->topLevel; i >= 0; i--) { + while ((next = cur->forward[i]) != e && qMapLessThanKey(concrete(next)->key, akey)) + cur = next; + update[i] = cur; + } + + if (next != e && !qMapLessThanKey(akey, concrete(next)->key)) { + bool deleteNext = true; + do { + cur = next; + next = cur->forward[0]; + deleteNext = (next != e && !qMapLessThanKey(concrete(cur)->key, concrete(next)->key)); + concrete(cur)->key.~Key(); + concrete(cur)->value.~T(); + d->node_delete(update, payload(), cur); + } while (deleteNext); + } + return oldSize - d->size; +} + +template + T QMap::take(const Key &akey) +{ + detach(); + + QMapData::Node *update[QMapData::LastLevel + 1]; + QMapData::Node *cur = e; + QMapData::Node *next = e; + + for (int i = d->topLevel; i >= 0; i--) { + while ((next = cur->forward[i]) != e && qMapLessThanKey(concrete(next)->key, akey)) + cur = next; + update[i] = cur; + } + + if (next != e && !qMapLessThanKey(akey, concrete(next)->key)) { + T t = concrete(next)->value; + concrete(next)->key.~Key(); + concrete(next)->value.~T(); + d->node_delete(update, payload(), next); + return t; + } + return T(); +} + +template + typename QMap::iterator QMap::erase(iterator it) +{ + QMapData::Node *update[QMapData::LastLevel + 1]; + QMapData::Node *cur = e; + QMapData::Node *next = e; + + if (it == iterator(e)) + return it; + + for (int i = d->topLevel; i >= 0; i--) { + while ((next = cur->forward[i]) != e && qMapLessThanKey(concrete(next)->key, it.key())) + cur = next; + update[i] = cur; + } + + while (next != e) { + cur = next; + next = cur->forward[0]; + if (cur == it) { + concrete(cur)->key.~Key(); + concrete(cur)->value.~T(); + d->node_delete(update, payload(), cur); + return iterator(next); + } + + for (int i = 0; i <= d->topLevel; ++i) { + if (update[i]->forward[i] != cur) + break; + update[i] = cur; + } + } + return end(); +} + +template + void QMap::detach_helper() +{ + union { QMapData *d; QMapData::Node *e; } x; + x.d = QMapData::createData(alignment()); + if (d->size) { + x.d->insertInOrder = true; + QMapData::Node *update[QMapData::LastLevel + 1]; + QMapData::Node *cur = e->forward[0]; + update[0] = x.e; + while (cur != e) { + try { + Node *concreteNode = concrete(cur); + node_create(x.d, update, concreteNode->key, concreteNode->value); + } catch (...) { + freeData(x.d); + throw; + } + cur = cur->forward[0]; + } + x.d->insertInOrder = false; + } + if (!d->ref.deref()) + freeData(d); + d = x.d; +} + +template + QMapData::Node *QMap::mutableFindNode(QMapData::Node *aupdate[], + const Key &akey) const +{ + QMapData::Node *cur = e; + QMapData::Node *next = e; + + for (int i = d->topLevel; i >= 0; i--) { + while ((next = cur->forward[i]) != e && qMapLessThanKey(concrete(next)->key, akey)) + cur = next; + aupdate[i] = cur; + } + if (next != e && !qMapLessThanKey(akey, concrete(next)->key)) { + return next; + } else { + return e; + } +} + +template + QList QMap::uniqueKeys() const +{ + QList res; + const_iterator i = begin(); + if (i != end()) { + for (;;) { + const Key &aKey = i.key(); + res.append(aKey); + do { + if (++i == end()) + goto break_out_of_outer_loop; + } while (!(aKey < i.key())); + } + } +break_out_of_outer_loop: + return res; +} + +template + QList QMap::keys() const +{ + QList res; + const_iterator i = begin(); + while (i != end()) { + res.append(i.key()); + ++i; + } + return res; +} + +template + QList QMap::keys(const T &avalue) const +{ + QList res; + const_iterator i = begin(); + while (i != end()) { + if (i.value() == avalue) + res.append(i.key()); + ++i; + } + return res; +} + +template + const Key QMap::key(const T &avalue) const +{ + return key(avalue, Key()); +} + +template + const Key QMap::key(const T &avalue, const Key &defaultKey) const +{ + const_iterator i = begin(); + while (i != end()) { + if (i.value() == avalue) + return i.key(); + ++i; + } + + return defaultKey; +} + +template + QList QMap::values() const +{ + QList res; + const_iterator i = begin(); + while (i != end()) { + res.append(i.value()); + ++i; + } + return res; +} + +template + QList QMap::values(const Key &akey) const +{ + QList res; + QMapData::Node *node = findNode(akey); + if (node != e) { + do { + res.append(concrete(node)->value); + node = node->forward[0]; + } while (node != e && !qMapLessThanKey(akey, concrete(node)->key)); + } + return res; +} + +template +inline typename QMap::const_iterator +QMap::lowerBound(const Key &akey) const +{ + QMapData::Node *update[QMapData::LastLevel + 1]; + mutableFindNode(update, akey); + return const_iterator(update[0]->forward[0]); +} + +template +inline typename QMap::iterator QMap::lowerBound(const Key &akey) +{ + detach(); + return static_cast(const_cast(this)->lowerBound(akey)); +} + +template +inline typename QMap::const_iterator +QMap::upperBound(const Key &akey) const +{ + QMapData::Node *update[QMapData::LastLevel + 1]; + mutableFindNode(update, akey); + QMapData::Node *node = update[0]->forward[0]; + while (node != e && !qMapLessThanKey(akey, concrete(node)->key)) + node = node->forward[0]; + return const_iterator(node); +} + +template +inline typename QMap::iterator QMap::upperBound(const Key &akey) +{ + detach(); + return static_cast(const_cast(this)->upperBound(akey)); +} + +template + bool QMap::operator==(const QMap &other) const +{ + if (size() != other.size()) + return false; + if (d == other.d) + return true; + + const_iterator it1 = begin(); + const_iterator it2 = other.begin(); + + while (it1 != end()) { + if (!(it1.value() == it2.value()) || qMapLessThanKey(it1.key(), it2.key()) || qMapLessThanKey(it2.key(), it1.key())) + return false; + ++it2; + ++it1; + } + return true; +} + + +template + QMap::QMap(const std::map &other) +{ + d = QMapData::createData(alignment()); + d->insertInOrder = true; + typename std::map::const_iterator it = other.end(); + while (it != other.begin()) { + --it; + insert((*it).first, (*it).second); + } + d->insertInOrder = false; +} + +template + std::map QMap::toStdMap() const +{ + std::map map; + const_iterator it = end(); + while (it != begin()) { + --it; + map.insert(std::pair(it.key(), it.value())); + } + return map; +} + + + +template +class QMultiMap : public QMap +{ +public: + QMultiMap() {} + QMultiMap(const QMap &other) : QMap(other) {} + + inline typename QMap::iterator replace(const Key &key, const T &value) + { return QMap::insert(key, value); } + inline typename QMap::iterator insert(const Key &key, const T &value) + { return QMap::insertMulti(key, value); } + + inline QMultiMap &operator+=(const QMultiMap &other) + { unite(other); return *this; } + inline QMultiMap operator+(const QMultiMap &other) const + { QMultiMap result = *this; result += other; return result; } + + + + using QMap::contains; + using QMap::remove; + using QMap::count; + using QMap::find; + using QMap::constFind; +# 984 "/usr/include/qt4/QtCore/qmap.h" + bool contains(const Key &key, const T &value) const; + + int remove(const Key &key, const T &value); + + int count(const Key &key, const T &value) const; + + typename QMap::iterator find(const Key &key, const T &value) { + typename QMap::iterator i(find(key)); + typename QMap::iterator end(this->end()); + while (i != end && !qMapLessThanKey(key, i.key())) { + if (i.value() == value) + return i; + ++i; + } + return end; + } + typename QMap::const_iterator find(const Key &key, const T &value) const { + typename QMap::const_iterator i(constFind(key)); + typename QMap::const_iterator end(QMap::constEnd()); + while (i != end && !qMapLessThanKey(key, i.key())) { + if (i.value() == value) + return i; + ++i; + } + return end; + } + typename QMap::const_iterator constFind(const Key &key, const T &value) const + { return find(key, value); } +private: + T &operator[](const Key &key); + const T operator[](const Key &key) const; +}; + +template +inline bool QMultiMap::contains(const Key &key, const T &value) const +{ + return constFind(key, value) != QMap::constEnd(); +} + +template +inline int QMultiMap::remove(const Key &key, const T &value) +{ + int n = 0; + typename QMap::iterator i(find(key)); + typename QMap::iterator end(QMap::end()); + while (i != end && !qMapLessThanKey(key, i.key())) { + if (i.value() == value) { + + + + + i = erase(i); + + ++n; + } else { + ++i; + } + } + return n; +} + +template +inline int QMultiMap::count(const Key &key, const T &value) const +{ + int n = 0; + typename QMap::const_iterator i(constFind(key)); + typename QMap::const_iterator end(QMap::constEnd()); + while (i != end && !qMapLessThanKey(key, i.key())) { + if (i.value() == value) + ++n; + ++i; + } + return n; +} + +template class QMapIterator { typedef typename QMap::const_iterator const_iterator; typedef const_iterator Item; QMap c; const_iterator i, n; inline bool item_exists() const { return n != c.constEnd(); } public: inline QMapIterator(const QMap &container) : c(container), i(c.constBegin()), n(c.constEnd()) {} inline QMapIterator &operator=(const QMap &container) { c = container; i = c.constBegin(); n = c.constEnd(); return *this; } inline void toFront() { i = c.constBegin(); n = c.constEnd(); } inline void toBack() { i = c.constEnd(); n = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline Item next() { n = i++; return n; } inline Item peekNext() const { return i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline Item previous() { n = --i; return n; } inline Item peekPrevious() const { const_iterator p = i; return --p; } inline const T &value() const { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qmap.h",1059) : qt_noop()); return *n; } inline const Key &key() const { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qmap.h",1059) : qt_noop()); return n.key(); } inline bool findNext(const T &t) { while ((n = i) != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(n = --i) == t) return true; n = c.constEnd(); return false; } }; +template class QMutableMapIterator { typedef typename QMap::iterator iterator; typedef typename QMap::const_iterator const_iterator; typedef iterator Item; QMap *c; iterator i, n; inline bool item_exists() const { return const_iterator(n) != c->constEnd(); } public: inline QMutableMapIterator(QMap &container) : c(&container) { c->setSharable(false); i = c->begin(); n = c->end(); } inline ~QMutableMapIterator() { c->setSharable(true); } inline QMutableMapIterator &operator=(QMap &container) { c->setSharable(true); c = &container; c->setSharable(false); i = c->begin(); n = c->end(); return *this; } inline void toFront() { i = c->begin(); n = c->end(); } inline void toBack() { i = c->end(); n = c->end(); } inline bool hasNext() const { return const_iterator(i) != c->constEnd(); } inline Item next() { n = i++; return n; } inline Item peekNext() const { return i; } inline bool hasPrevious() const { return const_iterator(i) != c->constBegin(); } inline Item previous() { n = --i; return n; } inline Item peekPrevious() const { iterator p = i; return --p; } inline void remove() { if (const_iterator(n) != c->constEnd()) { i = c->erase(n); n = c->end(); } } inline void setValue(const T &t) { if (const_iterator(n) != c->constEnd()) *n = t; } inline T &value() { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qmap.h",1060) : qt_noop()); return *n; } inline const T &value() const { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qmap.h",1060) : qt_noop()); return *n; } inline const Key &key() const { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qmap.h",1060) : qt_noop()); return n.key(); } inline bool findNext(const T &t) { while (const_iterator(n = i) != c->constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (const_iterator(i) != c->constBegin()) if (*(n = --i) == t) return true; n = c->end(); return false; } }; + + + + +# 49 "/usr/include/qt4/QtCore/qdebug.h" 2 + +# 1 "/usr/include/qt4/QtCore/qtextstream.h" 1 +# 48 "/usr/include/qt4/QtCore/qtextstream.h" +# 1 "/usr/include/qt4/QtCore/qlocale.h" 1 +# 48 "/usr/include/qt4/QtCore/qlocale.h" + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +class QDataStream; +class QDate; +class QDateTime; +class QTime; +class QVariant; +class QTextStream; +class QTextStreamPrivate; + +class QLocale; + + +class QSystemLocale +{ +public: + QSystemLocale(); + virtual ~QSystemLocale(); + + enum QueryType { + LanguageId, + CountryId, + DecimalPoint, + GroupSeparator, + ZeroDigit, + NegativeSign, + DateFormatLong, + DateFormatShort, + TimeFormatLong, + TimeFormatShort, + DayNameLong, + DayNameShort, + MonthNameLong, + MonthNameShort, + DateToStringLong, + DateToStringShort, + TimeToStringLong, + TimeToStringShort, + DateTimeFormatLong, + DateTimeFormatShort, + DateTimeToStringLong, + DateTimeToStringShort, + MeasurementSystem, + PositiveSign, + AMText, + PMText + }; + virtual QVariant query(QueryType type, QVariant in) const; + virtual QLocale fallbackLocale() const; + +private: + QSystemLocale(bool); + friend QSystemLocale *QSystemLocale_globalSystemLocale(); +}; + + +struct QLocalePrivate; +class QLocale +{ + public: static const QMetaObject staticMetaObject; private: + + + friend class QString; + friend class QByteArray; + friend class QIntValidator; + friend class QDoubleValidator; + friend class QTextStream; + friend class QTextStreamPrivate; + +public: + enum Language { + C = 1, + Abkhazian = 2, + Afan = 3, + Afar = 4, + Afrikaans = 5, + Albanian = 6, + Amharic = 7, + Arabic = 8, + Armenian = 9, + Assamese = 10, + Aymara = 11, + Azerbaijani = 12, + Bashkir = 13, + Basque = 14, + Bengali = 15, + Bhutani = 16, + Bihari = 17, + Bislama = 18, + Breton = 19, + Bulgarian = 20, + Burmese = 21, + Byelorussian = 22, + Cambodian = 23, + Catalan = 24, + Chinese = 25, + Corsican = 26, + Croatian = 27, + Czech = 28, + Danish = 29, + Dutch = 30, + English = 31, + Esperanto = 32, + Estonian = 33, + Faroese = 34, + FijiLanguage = 35, + Finnish = 36, + French = 37, + Frisian = 38, + Gaelic = 39, + Galician = 40, + Georgian = 41, + German = 42, + Greek = 43, + Greenlandic = 44, + Guarani = 45, + Gujarati = 46, + Hausa = 47, + Hebrew = 48, + Hindi = 49, + Hungarian = 50, + Icelandic = 51, + Indonesian = 52, + Interlingua = 53, + Interlingue = 54, + Inuktitut = 55, + Inupiak = 56, + Irish = 57, + Italian = 58, + Japanese = 59, + Javanese = 60, + Kannada = 61, + Kashmiri = 62, + Kazakh = 63, + Kinyarwanda = 64, + Kirghiz = 65, + Korean = 66, + Kurdish = 67, + Kurundi = 68, + Laothian = 69, + Latin = 70, + Latvian = 71, + Lingala = 72, + Lithuanian = 73, + Macedonian = 74, + Malagasy = 75, + Malay = 76, + Malayalam = 77, + Maltese = 78, + Maori = 79, + Marathi = 80, + Moldavian = 81, + Mongolian = 82, + NauruLanguage = 83, + Nepali = 84, + Norwegian = 85, + NorwegianBokmal = Norwegian, + Occitan = 86, + Oriya = 87, + Pashto = 88, + Persian = 89, + Polish = 90, + Portuguese = 91, + Punjabi = 92, + Quechua = 93, + RhaetoRomance = 94, + Romanian = 95, + Russian = 96, + Samoan = 97, + Sangho = 98, + Sanskrit = 99, + Serbian = 100, + SerboCroatian = 101, + Sesotho = 102, + Setswana = 103, + Shona = 104, + Sindhi = 105, + Singhalese = 106, + Siswati = 107, + Slovak = 108, + Slovenian = 109, + Somali = 110, + Spanish = 111, + Sundanese = 112, + Swahili = 113, + Swedish = 114, + Tagalog = 115, + Tajik = 116, + Tamil = 117, + Tatar = 118, + Telugu = 119, + Thai = 120, + Tibetan = 121, + Tigrinya = 122, + TongaLanguage = 123, + Tsonga = 124, + Turkish = 125, + Turkmen = 126, + Twi = 127, + Uigur = 128, + Ukrainian = 129, + Urdu = 130, + Uzbek = 131, + Vietnamese = 132, + Volapuk = 133, + Welsh = 134, + Wolof = 135, + Xhosa = 136, + Yiddish = 137, + Yoruba = 138, + Zhuang = 139, + Zulu = 140, + NorwegianNynorsk = 141, + Nynorsk = NorwegianNynorsk, + Bosnian = 142, + Divehi = 143, + Manx = 144, + Cornish = 145, + Akan = 146, + Konkani = 147, + Ga = 148, + Igbo = 149, + Kamba = 150, + Syriac = 151, + Blin = 152, + Geez = 153, + Koro = 154, + Sidamo = 155, + Atsam = 156, + Tigre = 157, + Jju = 158, + Friulian = 159, + Venda = 160, + Ewe = 161, + Walamo = 162, + Hawaiian = 163, + Tyap = 164, + Chewa = 165, + LastLanguage = Chewa + }; + + enum Country { + AnyCountry = 0, + Afghanistan = 1, + Albania = 2, + Algeria = 3, + AmericanSamoa = 4, + Andorra = 5, + Angola = 6, + Anguilla = 7, + Antarctica = 8, + AntiguaAndBarbuda = 9, + Argentina = 10, + Armenia = 11, + Aruba = 12, + Australia = 13, + Austria = 14, + Azerbaijan = 15, + Bahamas = 16, + Bahrain = 17, + Bangladesh = 18, + Barbados = 19, + Belarus = 20, + Belgium = 21, + Belize = 22, + Benin = 23, + Bermuda = 24, + Bhutan = 25, + Bolivia = 26, + BosniaAndHerzegowina = 27, + Botswana = 28, + BouvetIsland = 29, + Brazil = 30, + BritishIndianOceanTerritory = 31, + BruneiDarussalam = 32, + Bulgaria = 33, + BurkinaFaso = 34, + Burundi = 35, + Cambodia = 36, + Cameroon = 37, + Canada = 38, + CapeVerde = 39, + CaymanIslands = 40, + CentralAfricanRepublic = 41, + Chad = 42, + Chile = 43, + China = 44, + ChristmasIsland = 45, + CocosIslands = 46, + Colombia = 47, + Comoros = 48, + DemocraticRepublicOfCongo = 49, + PeoplesRepublicOfCongo = 50, + CookIslands = 51, + CostaRica = 52, + IvoryCoast = 53, + Croatia = 54, + Cuba = 55, + Cyprus = 56, + CzechRepublic = 57, + Denmark = 58, + Djibouti = 59, + Dominica = 60, + DominicanRepublic = 61, + EastTimor = 62, + Ecuador = 63, + Egypt = 64, + ElSalvador = 65, + EquatorialGuinea = 66, + Eritrea = 67, + Estonia = 68, + Ethiopia = 69, + FalklandIslands = 70, + FaroeIslands = 71, + FijiCountry = 72, + Finland = 73, + France = 74, + MetropolitanFrance = 75, + FrenchGuiana = 76, + FrenchPolynesia = 77, + FrenchSouthernTerritories = 78, + Gabon = 79, + Gambia = 80, + Georgia = 81, + Germany = 82, + Ghana = 83, + Gibraltar = 84, + Greece = 85, + Greenland = 86, + Grenada = 87, + Guadeloupe = 88, + Guam = 89, + Guatemala = 90, + Guinea = 91, + GuineaBissau = 92, + Guyana = 93, + Haiti = 94, + HeardAndMcDonaldIslands = 95, + Honduras = 96, + HongKong = 97, + Hungary = 98, + Iceland = 99, + India = 100, + Indonesia = 101, + Iran = 102, + Iraq = 103, + Ireland = 104, + Israel = 105, + Italy = 106, + Jamaica = 107, + Japan = 108, + Jordan = 109, + Kazakhstan = 110, + Kenya = 111, + Kiribati = 112, + DemocraticRepublicOfKorea = 113, + RepublicOfKorea = 114, + Kuwait = 115, + Kyrgyzstan = 116, + Lao = 117, + Latvia = 118, + Lebanon = 119, + Lesotho = 120, + Liberia = 121, + LibyanArabJamahiriya = 122, + Liechtenstein = 123, + Lithuania = 124, + Luxembourg = 125, + Macau = 126, + Macedonia = 127, + Madagascar = 128, + Malawi = 129, + Malaysia = 130, + Maldives = 131, + Mali = 132, + Malta = 133, + MarshallIslands = 134, + Martinique = 135, + Mauritania = 136, + Mauritius = 137, + Mayotte = 138, + Mexico = 139, + Micronesia = 140, + Moldova = 141, + Monaco = 142, + Mongolia = 143, + Montserrat = 144, + Morocco = 145, + Mozambique = 146, + Myanmar = 147, + Namibia = 148, + NauruCountry = 149, + Nepal = 150, + Netherlands = 151, + NetherlandsAntilles = 152, + NewCaledonia = 153, + NewZealand = 154, + Nicaragua = 155, + Niger = 156, + Nigeria = 157, + Niue = 158, + NorfolkIsland = 159, + NorthernMarianaIslands = 160, + Norway = 161, + Oman = 162, + Pakistan = 163, + Palau = 164, + PalestinianTerritory = 165, + Panama = 166, + PapuaNewGuinea = 167, + Paraguay = 168, + Peru = 169, + Philippines = 170, + Pitcairn = 171, + Poland = 172, + Portugal = 173, + PuertoRico = 174, + Qatar = 175, + Reunion = 176, + Romania = 177, + RussianFederation = 178, + Rwanda = 179, + SaintKittsAndNevis = 180, + StLucia = 181, + StVincentAndTheGrenadines = 182, + Samoa = 183, + SanMarino = 184, + SaoTomeAndPrincipe = 185, + SaudiArabia = 186, + Senegal = 187, + Seychelles = 188, + SierraLeone = 189, + Singapore = 190, + Slovakia = 191, + Slovenia = 192, + SolomonIslands = 193, + Somalia = 194, + SouthAfrica = 195, + SouthGeorgiaAndTheSouthSandwichIslands = 196, + Spain = 197, + SriLanka = 198, + StHelena = 199, + StPierreAndMiquelon = 200, + Sudan = 201, + Suriname = 202, + SvalbardAndJanMayenIslands = 203, + Swaziland = 204, + Sweden = 205, + Switzerland = 206, + SyrianArabRepublic = 207, + Taiwan = 208, + Tajikistan = 209, + Tanzania = 210, + Thailand = 211, + Togo = 212, + Tokelau = 213, + TongaCountry = 214, + TrinidadAndTobago = 215, + Tunisia = 216, + Turkey = 217, + Turkmenistan = 218, + TurksAndCaicosIslands = 219, + Tuvalu = 220, + Uganda = 221, + Ukraine = 222, + UnitedArabEmirates = 223, + UnitedKingdom = 224, + UnitedStates = 225, + UnitedStatesMinorOutlyingIslands = 226, + Uruguay = 227, + Uzbekistan = 228, + Vanuatu = 229, + VaticanCityState = 230, + Venezuela = 231, + VietNam = 232, + BritishVirginIslands = 233, + USVirginIslands = 234, + WallisAndFutunaIslands = 235, + WesternSahara = 236, + Yemen = 237, + Yugoslavia = 238, + Zambia = 239, + Zimbabwe = 240, + SerbiaAndMontenegro = 241, + LastCountry = SerbiaAndMontenegro + }; + + enum MeasurementSystem { MetricSystem, ImperialSystem }; + + enum FormatType { LongFormat, ShortFormat, NarrowFormat }; + enum NumberOption { + OmitGroupSeparator = 0x01, + RejectGroupSeparator = 0x02 + }; + typedef QFlags NumberOptions; + + QLocale(); + QLocale(const QString &name); + QLocale(Language language, Country country = AnyCountry); + QLocale(const QLocale &other); + + QLocale &operator=(const QLocale &other); + + Language language() const; + Country country() const; + QString name() const; + + short toShort(const QString &s, bool *ok = 0, int base = 0) const; + ushort toUShort(const QString &s, bool *ok = 0, int base = 0) const; + int toInt(const QString &s, bool *ok = 0, int base = 0) const; + uint toUInt(const QString &s, bool *ok = 0, int base = 0) const; + qlonglong toLongLong(const QString &s, bool *ok = 0, int base = 0) const; + qlonglong toULongLong(const QString &s, bool *ok = 0, int base = 0) const; + float toFloat(const QString &s, bool *ok = 0) const; + double toDouble(const QString &s, bool *ok = 0) const; + + QString toString(qlonglong i) const; + QString toString(qulonglong i) const; + inline QString toString(short i) const; + inline QString toString(ushort i) const; + inline QString toString(int i) const; + inline QString toString(uint i) const; + QString toString(double i, char f = 'g', int prec = 6) const; + inline QString toString(float i, char f = 'g', int prec = 6) const; + QString toString(const QDate &date, const QString &formatStr) const; + QString toString(const QDate &date, FormatType format = LongFormat) const; + QString toString(const QTime &time, const QString &formatStr) const; + QString toString(const QTime &time, FormatType format = LongFormat) const; + QString toString(const QDateTime &dateTime, FormatType format = LongFormat) const; + QString toString(const QDateTime &dateTime, const QString &format) const; + + QString dateFormat(FormatType format = LongFormat) const; + QString timeFormat(FormatType format = LongFormat) const; + QString dateTimeFormat(FormatType format = LongFormat) const; + + QDate toDate(const QString &string, FormatType = LongFormat) const; + QTime toTime(const QString &string, FormatType = LongFormat) const; + QDateTime toDateTime(const QString &string, FormatType format = LongFormat) const; + QDate toDate(const QString &string, const QString &format) const; + QTime toTime(const QString &string, const QString &format) const; + QDateTime toDateTime(const QString &string, const QString &format) const; + + + + + QChar decimalPoint() const; + QChar groupSeparator() const; + QChar percent() const; + QChar zeroDigit() const; + QChar negativeSign() const; + QChar positiveSign() const; + QChar exponential() const; + + QString monthName(int, FormatType format = LongFormat) const; + QString standaloneMonthName(int, FormatType format = LongFormat) const; + QString dayName(int, FormatType format = LongFormat) const; + QString standaloneDayName(int, FormatType format = LongFormat) const; + + QString amText() const; + QString pmText() const; + + MeasurementSystem measurementSystem() const; + + inline bool operator==(const QLocale &other) const; + inline bool operator!=(const QLocale &other) const; + + static QString languageToString(Language language); + static QString countryToString(Country country); + static void setDefault(const QLocale &locale); + + static QLocale c() { return QLocale(C); } + static QLocale system(); + + static QList countriesForLanguage(Language lang); + + void setNumberOptions(NumberOptions options); + NumberOptions numberOptions() const; + + + struct Data { + quint16 index; + quint16 numberOptions; + } + + + + ; +private: + friend struct QLocalePrivate; + + + union { + void *v; + Data p; + }; + const QLocalePrivate *d() const; +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QLocale)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QLocale"; } }; +inline QFlags operator|(QLocale::NumberOptions::enum_type f1, QLocale::NumberOptions::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(QLocale::NumberOptions::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QLocale::NumberOptions::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } + +inline QString QLocale::toString(short i) const + { return toString(qlonglong(i)); } +inline QString QLocale::toString(ushort i) const + { return toString(qulonglong(i)); } +inline QString QLocale::toString(int i) const + { return toString(qlonglong(i)); } +inline QString QLocale::toString(uint i) const + { return toString(qulonglong(i)); } +inline QString QLocale::toString(float i, char f, int prec) const + { return toString(double(i), f, prec); } +inline bool QLocale::operator==(const QLocale &other) const + { return d() == other.d() && numberOptions() == other.numberOptions(); } +inline bool QLocale::operator!=(const QLocale &other) const + { return d() != other.d() || numberOptions() != other.numberOptions(); } + + + QDataStream &operator<<(QDataStream &, const QLocale &); + QDataStream &operator>>(QDataStream &, QLocale &); + + + + + +# 49 "/usr/include/qt4/QtCore/qtextstream.h" 2 +# 63 "/usr/include/qt4/QtCore/qtextstream.h" + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +class QTextCodec; +class QTextDecoder; + +class QTextStreamPrivate; +class QTextStream +{ + inline QTextStreamPrivate* d_func() { return reinterpret_cast(qGetPtrHelper(d_ptr)); } inline const QTextStreamPrivate* d_func() const { return reinterpret_cast(qGetPtrHelper(d_ptr)); } friend class QTextStreamPrivate; + +public: + enum RealNumberNotation { + SmartNotation, + FixedNotation, + ScientificNotation + }; + enum FieldAlignment { + AlignLeft, + AlignRight, + AlignCenter, + AlignAccountingStyle + }; + enum Status { + Ok, + ReadPastEnd, + ReadCorruptData + }; + enum NumberFlag { + ShowBase = 0x1, + ForcePoint = 0x2, + ForceSign = 0x4, + UppercaseBase = 0x8, + UppercaseDigits = 0x10 + }; + typedef QFlags NumberFlags; + + QTextStream(); + explicit QTextStream(QIODevice *device); + explicit QTextStream(FILE *fileHandle, QIODevice::OpenMode openMode = QIODevice::ReadWrite); + explicit QTextStream(QString *string, QIODevice::OpenMode openMode = QIODevice::ReadWrite); + explicit QTextStream(QByteArray *array, QIODevice::OpenMode openMode = QIODevice::ReadWrite); + explicit QTextStream(const QByteArray &array, QIODevice::OpenMode openMode = QIODevice::ReadOnly); + virtual ~QTextStream(); + + + void setCodec(QTextCodec *codec); + void setCodec(const char *codecName); + QTextCodec *codec() const; + void setAutoDetectUnicode(bool enabled); + bool autoDetectUnicode() const; + void setGenerateByteOrderMark(bool generate); + bool generateByteOrderMark() const; + + + void setLocale(const QLocale &locale); + QLocale locale() const; + + void setDevice(QIODevice *device); + QIODevice *device() const; + + void setString(QString *string, QIODevice::OpenMode openMode = QIODevice::ReadWrite); + QString *string() const; + + Status status() const; + void setStatus(Status status); + void resetStatus(); + + bool atEnd() const; + void reset(); + void flush(); + bool seek(qint64 pos); + qint64 pos() const; + + void skipWhiteSpace(); + + QString readLine(qint64 maxlen = 0); + QString readAll(); + QString read(qint64 maxlen); + + void setFieldAlignment(FieldAlignment alignment); + FieldAlignment fieldAlignment() const; + + void setPadChar(QChar ch); + QChar padChar() const; + + void setFieldWidth(int width); + int fieldWidth() const; + + void setNumberFlags(NumberFlags flags); + NumberFlags numberFlags() const; + + void setIntegerBase(int base); + int integerBase() const; + + void setRealNumberNotation(RealNumberNotation notation); + RealNumberNotation realNumberNotation() const; + + void setRealNumberPrecision(int precision); + int realNumberPrecision() const; + + QTextStream &operator>>(QChar &ch); + QTextStream &operator>>(char &ch); + QTextStream &operator>>(signed short &i); + QTextStream &operator>>(unsigned short &i); + QTextStream &operator>>(signed int &i); + QTextStream &operator>>(unsigned int &i); + QTextStream &operator>>(signed long &i); + QTextStream &operator>>(unsigned long &i); + QTextStream &operator>>(qlonglong &i); + QTextStream &operator>>(qulonglong &i); + QTextStream &operator>>(float &f); + QTextStream &operator>>(double &f); + QTextStream &operator>>(QString &s); + QTextStream &operator>>(QByteArray &array); + QTextStream &operator>>(char *c); + + QTextStream &operator<<(QBool b); + QTextStream &operator<<(QChar ch); + QTextStream &operator<<(char ch); + QTextStream &operator<<(signed short i); + QTextStream &operator<<(unsigned short i); + QTextStream &operator<<(signed int i); + QTextStream &operator<<(unsigned int i); + QTextStream &operator<<(signed long i); + QTextStream &operator<<(unsigned long i); + QTextStream &operator<<(qlonglong i); + QTextStream &operator<<(qulonglong i); + QTextStream &operator<<(float f); + QTextStream &operator<<(double f); + QTextStream &operator<<(const QString &s); + QTextStream &operator<<(const QByteArray &array); + QTextStream &operator<<(const char *c); + QTextStream &operator<<(const void *ptr); +# 252 "/usr/include/qt4/QtCore/qtextstream.h" +private: + + + + + + QTextStream(const QTextStream &); QTextStream &operator=(const QTextStream &); + + QScopedPointer d_ptr; +}; + +inline QFlags operator|(QTextStream::NumberFlags::enum_type f1, QTextStream::NumberFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(QTextStream::NumberFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QTextStream::NumberFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } + + + + + +typedef QTextStream & (*QTextStreamFunction)(QTextStream &); +typedef void (QTextStream::*QTSMFI)(int); +typedef void (QTextStream::*QTSMFC)(QChar); + +class QTextStreamManipulator +{ +public: + QTextStreamManipulator(QTSMFI m, int a) { mf = m; mc = 0; arg = a; } + QTextStreamManipulator(QTSMFC m, QChar c) { mf = 0; mc = m; ch = c; arg = -1; } + void exec(QTextStream &s) { if (mf) { (s.*mf)(arg); } else { (s.*mc)(ch); } } + +private: + QTSMFI mf; + QTSMFC mc; + int arg; + QChar ch; +}; + +inline QTextStream &operator>>(QTextStream &s, QTextStreamFunction f) +{ return (*f)(s); } + +inline QTextStream &operator<<(QTextStream &s, QTextStreamFunction f) +{ return (*f)(s); } + +inline QTextStream &operator<<(QTextStream &s, QTextStreamManipulator m) +{ m.exec(s); return s; } + + QTextStream &bin(QTextStream &s); + QTextStream &oct(QTextStream &s); + QTextStream &dec(QTextStream &s); + QTextStream &hex(QTextStream &s); + + QTextStream &showbase(QTextStream &s); + QTextStream &forcesign(QTextStream &s); + QTextStream &forcepoint(QTextStream &s); + QTextStream &noshowbase(QTextStream &s); + QTextStream &noforcesign(QTextStream &s); + QTextStream &noforcepoint(QTextStream &s); + + QTextStream &uppercasebase(QTextStream &s); + QTextStream &uppercasedigits(QTextStream &s); + QTextStream &lowercasebase(QTextStream &s); + QTextStream &lowercasedigits(QTextStream &s); + + QTextStream &fixed(QTextStream &s); + QTextStream &scientific(QTextStream &s); + + QTextStream &left(QTextStream &s); + QTextStream &right(QTextStream &s); + QTextStream ¢er(QTextStream &s); + + QTextStream &endl(QTextStream &s); + QTextStream &flush(QTextStream &s); + QTextStream &reset(QTextStream &s); + + QTextStream &bom(QTextStream &s); + + QTextStream &ws(QTextStream &s); + +inline QTextStreamManipulator qSetFieldWidth(int width) +{ + QTSMFI func = &QTextStream::setFieldWidth; + return QTextStreamManipulator(func,width); +} + +inline QTextStreamManipulator qSetPadChar(QChar ch) +{ + QTSMFC func = &QTextStream::setPadChar; + return QTextStreamManipulator(func, ch); +} + +inline QTextStreamManipulator qSetRealNumberPrecision(int precision) +{ + QTSMFI func = &QTextStream::setRealNumberPrecision; + return QTextStreamManipulator(func, precision); +} +# 372 "/usr/include/qt4/QtCore/qtextstream.h" + + + +# 51 "/usr/include/qt4/QtCore/qdebug.h" 2 + + +# 1 "/usr/include/qt4/QtCore/qset.h" 1 +# 47 "/usr/include/qt4/QtCore/qset.h" + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +template +class QSet +{ + typedef QHash Hash; + +public: + inline QSet() {} + inline QSet(const QSet &other) : q_hash(other.q_hash) {} + + inline QSet &operator=(const QSet &other) + { q_hash = other.q_hash; return *this; } + + inline bool operator==(const QSet &other) const + { return q_hash == other.q_hash; } + inline bool operator!=(const QSet &other) const + { return q_hash != other.q_hash; } + + inline int size() const { return q_hash.size(); } + + inline bool isEmpty() const { return q_hash.isEmpty(); } + + inline int capacity() const { return q_hash.capacity(); } + inline void reserve(int size); + inline void squeeze() { q_hash.squeeze(); } + + inline void detach() { q_hash.detach(); } + inline bool isDetached() const { return q_hash.isDetached(); } + inline void setSharable(bool sharable) { q_hash.setSharable(sharable); } + + inline void clear() { q_hash.clear(); } + + inline bool remove(const T &value) { return q_hash.remove(value) != 0; } + + inline bool contains(const T &value) const { return q_hash.contains(value); } + + bool contains(const QSet &set) const; + + class const_iterator; + + class iterator + { + typedef QHash Hash; + typename Hash::iterator i; + friend class const_iterator; + + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + typedef T value_type; + typedef const T *pointer; + typedef const T &reference; + + inline iterator() {} + inline iterator(typename Hash::iterator o) : i(o) {} + inline iterator(const iterator &o) : i(o.i) {} + inline iterator &operator=(const iterator &o) { i = o.i; return *this; } + inline const T &operator*() const { return i.key(); } + inline const T *operator->() const { return &i.key(); } + inline bool operator==(const iterator &o) const { return i == o.i; } + inline bool operator!=(const iterator &o) const { return i != o.i; } + inline bool operator==(const const_iterator &o) const + { return i == o.i; } + inline bool operator!=(const const_iterator &o) const + { return i != o.i; } + inline iterator &operator++() { ++i; return *this; } + inline iterator operator++(int) { iterator r = *this; ++i; return r; } + inline iterator &operator--() { --i; return *this; } + inline iterator operator--(int) { iterator r = *this; --i; return r; } + inline iterator operator+(int j) const { return i + j; } + inline iterator operator-(int j) const { return i - j; } + inline iterator &operator+=(int j) { i += j; return *this; } + inline iterator &operator-=(int j) { i -= j; return *this; } + }; + + class const_iterator + { + typedef QHash Hash; + typename Hash::const_iterator i; + friend class iterator; + + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + typedef T value_type; + typedef const T *pointer; + typedef const T &reference; + + inline const_iterator() {} + inline const_iterator(typename Hash::const_iterator o) : i(o) {} + inline const_iterator(const const_iterator &o) : i(o.i) {} + inline const_iterator(const iterator &o) + : i(o.i) {} + inline const_iterator &operator=(const const_iterator &o) { i = o.i; return *this; } + inline const T &operator*() const { return i.key(); } + inline const T *operator->() const { return &i.key(); } + inline bool operator==(const const_iterator &o) const { return i == o.i; } + inline bool operator!=(const const_iterator &o) const { return i != o.i; } + inline const_iterator &operator++() { ++i; return *this; } + inline const_iterator operator++(int) { const_iterator r = *this; ++i; return r; } + inline const_iterator &operator--() { --i; return *this; } + inline const_iterator operator--(int) { const_iterator r = *this; --i; return r; } + inline const_iterator operator+(int j) const { return i + j; } + inline const_iterator operator-(int j) const { return i - j; } + inline const_iterator &operator+=(int j) { i += j; return *this; } + inline const_iterator &operator-=(int j) { i -= j; return *this; } + }; + + + inline iterator begin() { return q_hash.begin(); } + inline const_iterator begin() const { return q_hash.begin(); } + inline const_iterator constBegin() const { return q_hash.constBegin(); } + inline iterator end() { return q_hash.end(); } + inline const_iterator end() const { return q_hash.end(); } + inline const_iterator constEnd() const { return q_hash.constEnd(); } + iterator erase(iterator i) + { return q_hash.erase(reinterpret_cast(i)); } + + + typedef iterator Iterator; + typedef const_iterator ConstIterator; + inline int count() const { return q_hash.count(); } + inline const_iterator insert(const T &value) + { return static_cast(q_hash.insert(value, + QHashDummyValue())); } + iterator find(const T &value) { return q_hash.find(value); } + const_iterator find(const T &value) const { return q_hash.find(value); } + inline const_iterator constFind(const T &value) const { return find(value); } + QSet &unite(const QSet &other); + QSet &intersect(const QSet &other); + QSet &subtract(const QSet &other); + + + typedef T key_type; + typedef T value_type; + typedef value_type *pointer; + typedef const value_type *const_pointer; + typedef value_type &reference; + typedef const value_type &const_reference; + typedef ptrdiff_t difference_type; + typedef int size_type; + + inline bool empty() const { return isEmpty(); } + + + inline QSet &operator<<(const T &value) { insert(value); return *this; } + inline QSet &operator|=(const QSet &other) { unite(other); return *this; } + inline QSet &operator|=(const T &value) { insert(value); return *this; } + inline QSet &operator&=(const QSet &other) { intersect(other); return *this; } + inline QSet &operator&=(const T &value) + { QSet result; if (contains(value)) result.insert(value); return (*this = result); } + inline QSet &operator+=(const QSet &other) { unite(other); return *this; } + inline QSet &operator+=(const T &value) { insert(value); return *this; } + inline QSet &operator-=(const QSet &other) { subtract(other); return *this; } + inline QSet &operator-=(const T &value) { remove(value); return *this; } + inline QSet operator|(const QSet &other) const + { QSet result = *this; result |= other; return result; } + inline QSet operator&(const QSet &other) const + { QSet result = *this; result &= other; return result; } + inline QSet operator+(const QSet &other) const + { QSet result = *this; result += other; return result; } + inline QSet operator-(const QSet &other) const + { QSet result = *this; result -= other; return result; } + + + inline QSet operator|(const QSet &other) + { QSet result = *this; result |= other; return result; } + inline QSet operator&(const QSet &other) + { QSet result = *this; result &= other; return result; } + inline QSet operator+(const QSet &other) + { QSet result = *this; result += other; return result; } + inline QSet operator-(const QSet &other) + { QSet result = *this; result -= other; return result; } + + + QList toList() const; + inline QList values() const { return toList(); } + + static QSet fromList(const QList &list); + +private: + Hash q_hash; +}; + +template +inline void QSet::reserve(int asize) { q_hash.reserve(asize); } + +template +inline QSet &QSet::unite(const QSet &other) +{ + QSet copy(other); + typename QSet::const_iterator i = copy.constEnd(); + while (i != copy.constBegin()) { + --i; + insert(*i); + } + return *this; +} + +template +inline QSet &QSet::intersect(const QSet &other) +{ + QSet copy1(*this); + QSet copy2(other); + typename QSet::const_iterator i = copy1.constEnd(); + while (i != copy1.constBegin()) { + --i; + if (!copy2.contains(*i)) + remove(*i); + } + return *this; +} + +template +inline QSet &QSet::subtract(const QSet &other) +{ + QSet copy1(*this); + QSet copy2(other); + typename QSet::const_iterator i = copy1.constEnd(); + while (i != copy1.constBegin()) { + --i; + if (copy2.contains(*i)) + remove(*i); + } + return *this; +} + +template +inline bool QSet::contains(const QSet &other) const +{ + typename QSet::const_iterator i = other.constBegin(); + while (i != other.constEnd()) { + if (!contains(*i)) + return false; + ++i; + } + return true; +} + +template + QList QSet::toList() const +{ + QList result; + typename QSet::const_iterator i = constBegin(); + while (i != constEnd()) { + result.append(*i); + ++i; + } + return result; +} + +template + QSet QList::toSet() const +{ + QSet result; + result.reserve(size()); + for (int i = 0; i < size(); ++i) + result.insert(at(i)); + return result; +} + +template +QSet QSet::fromList(const QList &list) +{ + return list.toSet(); +} + +template +QList QList::fromSet(const QSet &set) +{ + return set.toList(); +} + +template class QSetIterator { typedef typename QSet::const_iterator const_iterator; QSet c; const_iterator i; public: inline QSetIterator(const QSet &container) : c(container), i(c.constBegin()) {} inline QSetIterator &operator=(const QSet &container) { c = container; i = c.constBegin(); return *this; } inline void toFront() { i = c.constBegin(); } inline void toBack() { i = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline const T &next() { return *i++; } inline const T &peekNext() const { return *i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline const T &previous() { return *--i; } inline const T &peekPrevious() const { const_iterator p = i; return *--p; } inline bool findNext(const T &t) { while (i != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(--i) == t) return true; return false; } }; + +template +class QMutableSetIterator +{ + typedef typename QSet::iterator iterator; + QSet *c; + iterator i, n; + inline bool item_exists() const { return n != c->constEnd(); } + +public: + inline QMutableSetIterator(QSet &container) + : c(&container) + { c->setSharable(false); i = c->begin(); n = c->end(); } + inline ~QMutableSetIterator() + { c->setSharable(true); } + inline QMutableSetIterator &operator=(QSet &container) + { c->setSharable(true); c = &container; c->setSharable(false); + i = c->begin(); n = c->end(); return *this; } + inline void toFront() { i = c->begin(); n = c->end(); } + inline void toBack() { i = c->end(); n = i; } + inline bool hasNext() const { return c->constEnd() != i; } + inline const T &next() { n = i++; return *n; } + inline const T &peekNext() const { return *i; } + inline bool hasPrevious() const { return c->constBegin() != i; } + inline const T &previous() { n = --i; return *n; } + inline const T &peekPrevious() const { iterator p = i; return *--p; } + inline void remove() + { if (c->constEnd() != n) { i = c->erase(n); n = c->end(); } } + inline const T &value() const { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qset.h",354) : qt_noop()); return *n; } + inline bool findNext(const T &t) + { while (c->constEnd() != (n = i)) if (*i++ == t) return true; return false; } + inline bool findPrevious(const T &t) + { while (c->constBegin() != i) if (*(n = --i) == t) return true; + n = c->end(); return false; } +}; + + + + +# 54 "/usr/include/qt4/QtCore/qdebug.h" 2 +# 1 "/usr/include/qt4/QtCore/qcontiguouscache.h" 1 +# 46 "/usr/include/qt4/QtCore/qcontiguouscache.h" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.0/include-fixed/limits.h" 1 3 4 +# 47 "/usr/include/qt4/QtCore/qcontiguouscache.h" 2 + + + + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + + +struct QContiguousCacheData +{ + QBasicAtomicInt ref; + int alloc; + int count; + int start; + int offset; + uint sharable : 1; + uint reserved : 31; + + + + + + + static QContiguousCacheData *allocate(int size, int alignment); + static void free(QContiguousCacheData *data); + + + + +}; + +template +struct QContiguousCacheTypedData: private QContiguousCacheData +{ + + T array[1]; + + static inline void free(QContiguousCacheTypedData *data) { QContiguousCacheData::free(data); } +}; + +template +class QContiguousCache { + typedef QContiguousCacheTypedData Data; + union { QContiguousCacheData *d; QContiguousCacheTypedData *p; }; +public: + + typedef T value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef ptrdiff_t difference_type; + typedef int size_type; + + explicit QContiguousCache(int capacity = 0); + QContiguousCache(const QContiguousCache &v) : d(v.d) { d->ref.ref(); if (!d->sharable) detach_helper(); } + + inline ~QContiguousCache() { if (!d) return; if (!d->ref.deref()) free(p); } + + inline void detach() { if (d->ref != 1) detach_helper(); } + inline bool isDetached() const { return d->ref == 1; } + inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; } + + QContiguousCache &operator=(const QContiguousCache &other); + bool operator==(const QContiguousCache &other) const; + inline bool operator!=(const QContiguousCache &other) const { return !(*this == other); } + + inline int capacity() const {return d->alloc; } + inline int count() const { return d->count; } + inline int size() const { return d->count; } + + inline bool isEmpty() const { return d->count == 0; } + inline bool isFull() const { return d->count == d->alloc; } + inline int available() const { return d->alloc - d->count; } + + void clear(); + void setCapacity(int size); + + const T &at(int pos) const; + T &operator[](int i); + const T &operator[](int i) const; + + void append(const T &value); + void prepend(const T &value); + void insert(int pos, const T &value); + + inline bool containsIndex(int pos) const { return pos >= d->offset && pos - d->offset < d->count; } + inline int firstIndex() const { return d->offset; } + inline int lastIndex() const { return d->offset + d->count - 1; } + + inline const T &first() const { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qcontiguouscache.h",139) : qt_noop()); return p->array[d->start]; } + inline const T &last() const { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qcontiguouscache.h",140) : qt_noop()); return p->array[(d->start + d->count -1) % d->alloc]; } + inline T &first() { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qcontiguouscache.h",141) : qt_noop()); detach(); return p->array[d->start]; } + inline T &last() { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qcontiguouscache.h",142) : qt_noop()); detach(); return p->array[(d->start + d->count -1) % d->alloc]; } + + void removeFirst(); + T takeFirst(); + void removeLast(); + T takeLast(); + + inline bool areIndexesValid() const + { return d->offset >= 0 && d->offset < 2147483647 - d->count && (d->offset % d->alloc) == d->start; } + + inline void normalizeIndexes() { d->offset = d->start; } + + + + +private: + void detach_helper(); + + QContiguousCacheData *malloc(int aalloc); + void free(Data *x); + int sizeOfTypedData() { + + + return reinterpret_cast(&(reinterpret_cast(this))->array[1]) - reinterpret_cast(this); + } + int alignOfTypedData() const + { + + return qMax(sizeof(void*), __alignof__(Data)); + + + + } +}; + +template +void QContiguousCache::detach_helper() +{ + union { QContiguousCacheData *d; QContiguousCacheTypedData *p; } x; + + x.d = malloc(d->alloc); + x.d->ref = 1; + x.d->count = d->count; + x.d->start = d->start; + x.d->offset = d->offset; + x.d->alloc = d->alloc; + x.d->sharable = true; + x.d->reserved = 0; + + T *dest = x.p->array + x.d->start; + T *src = p->array + d->start; + int oldcount = x.d->count; + while (oldcount--) { + if (QTypeInfo::isComplex) { + new (dest) T(*src); + } else { + *dest = *src; + } + dest++; + if (dest == x.p->array + x.d->alloc) + dest = x.p->array; + src++; + if (src == p->array + d->alloc) + src = p->array; + } + + if (!d->ref.deref()) + free(p); + d = x.d; +} + +template +void QContiguousCache::setCapacity(int asize) +{ + if (asize == d->alloc) + return; + detach(); + union { QContiguousCacheData *d; QContiguousCacheTypedData *p; } x; + x.d = malloc(asize); + x.d->alloc = asize; + x.d->count = qMin(d->count, asize); + x.d->offset = d->offset + d->count - x.d->count; + x.d->start = x.d->offset % x.d->alloc; + T *dest = x.p->array + (x.d->start + x.d->count-1) % x.d->alloc; + T *src = p->array + (d->start + d->count-1) % d->alloc; + int oldcount = x.d->count; + while (oldcount--) { + if (QTypeInfo::isComplex) { + new (dest) T(*src); + } else { + *dest = *src; + } + if (dest == x.p->array) + dest = x.p->array + x.d->alloc; + dest--; + if (src == p->array) + src = p->array + d->alloc; + src--; + } + + free(p); + d = x.d; +} + +template +void QContiguousCache::clear() +{ + if (d->ref == 1) { + if (QTypeInfo::isComplex) { + int oldcount = d->count; + T * i = p->array + d->start; + T * e = p->array + d->alloc; + while (oldcount--) { + i->~T(); + i++; + if (i == e) + i = p->array; + } + } + d->count = d->start = d->offset = 0; + } else { + union { QContiguousCacheData *d; QContiguousCacheTypedData *p; } x; + x.d = malloc(d->alloc); + x.d->ref = 1; + x.d->alloc = d->alloc; + x.d->count = x.d->start = x.d->offset = 0; + x.d->sharable = true; + if (!d->ref.deref()) free(p); + d = x.d; + } +} + +template +inline QContiguousCacheData *QContiguousCache::malloc(int aalloc) +{ + return QContiguousCacheData::allocate(sizeOfTypedData() + (aalloc - 1) * sizeof(T), alignOfTypedData()); +} + +template +QContiguousCache::QContiguousCache(int cap) +{ + d = malloc(cap); + d->ref = 1; + d->alloc = cap; + d->count = d->start = d->offset = 0; + d->sharable = true; +} + +template +QContiguousCache &QContiguousCache::operator=(const QContiguousCache &other) +{ + other.d->ref.ref(); + if (!d->ref.deref()) + free(d); + d = other.d; + if (!d->sharable) + detach_helper(); + return *this; +} + +template +bool QContiguousCache::operator==(const QContiguousCache &other) const +{ + if (other.d == d) + return true; + if (other.d->start != d->start + || other.d->count != d->count + || other.d->offset != d->offset + || other.d->alloc != d->alloc) + return false; + for (int i = firstIndex(); i <= lastIndex(); ++i) + if (!(at(i) == other.at(i))) + return false; + return true; +} + +template +void QContiguousCache::free(Data *x) +{ + if (QTypeInfo::isComplex) { + int oldcount = d->count; + T * i = p->array + d->start; + T * e = p->array + d->alloc; + while (oldcount--) { + i->~T(); + i++; + if (i == e) + i = p->array; + } + } + x->free(x); +} +template +void QContiguousCache::append(const T &value) +{ + detach(); + if (QTypeInfo::isComplex) { + if (d->count == d->alloc) + (p->array + (d->start+d->count) % d->alloc)->~T(); + new (p->array + (d->start+d->count) % d->alloc) T(value); + } else { + p->array[(d->start+d->count) % d->alloc] = value; + } + + if (d->count == d->alloc) { + d->start++; + d->start %= d->alloc; + d->offset++; + } else { + d->count++; + } +} + +template +void QContiguousCache::prepend(const T &value) +{ + detach(); + if (d->start) + d->start--; + else + d->start = d->alloc-1; + d->offset--; + + if (d->count != d->alloc) + d->count++; + else + if (d->count == d->alloc) + (p->array + d->start)->~T(); + + if (QTypeInfo::isComplex) + new (p->array + d->start) T(value); + else + p->array[d->start] = value; +} + +template +void QContiguousCache::insert(int pos, const T &value) +{ + ((!(pos >= 0 && pos < 2147483647)) ? qt_assert_x("QContiguousCache::insert", "index out of range","/usr/include/qt4/QtCore/qcontiguouscache.h",380) : qt_noop()); + detach(); + if (containsIndex(pos)) { + if(QTypeInfo::isComplex) + new (p->array + pos % d->alloc) T(value); + else + p->array[pos % d->alloc] = value; + } else if (pos == d->offset-1) + prepend(value); + else if (pos == d->offset+d->count) + append(value); + else { + + clear(); + d->offset = pos; + d->start = pos % d->alloc; + d->count = 1; + if (QTypeInfo::isComplex) + new (p->array + d->start) T(value); + else + p->array[d->start] = value; + } +} + +template +inline const T &QContiguousCache::at(int pos) const +{ ((!(pos >= d->offset && pos - d->offset < d->count)) ? qt_assert_x("QContiguousCache::at", "index out of range","/usr/include/qt4/QtCore/qcontiguouscache.h",406) : qt_noop()); return p->array[pos % d->alloc]; } +template +inline const T &QContiguousCache::operator[](int pos) const +{ ((!(pos >= d->offset && pos - d->offset < d->count)) ? qt_assert_x("QContiguousCache::at", "index out of range","/usr/include/qt4/QtCore/qcontiguouscache.h",409) : qt_noop()); return p->array[pos % d->alloc]; } + +template +inline T &QContiguousCache::operator[](int pos) +{ + detach(); + if (!containsIndex(pos)) + insert(pos, T()); + return p->array[pos % d->alloc]; +} + +template +inline void QContiguousCache::removeFirst() +{ + ((!(d->count > 0)) ? qt_assert("d->count > 0","/usr/include/qt4/QtCore/qcontiguouscache.h",423) : qt_noop()); + detach(); + d->count--; + if (QTypeInfo::isComplex) + (p->array + d->start)->~T(); + d->start = (d->start + 1) % d->alloc; + d->offset++; +} + +template +inline void QContiguousCache::removeLast() +{ + ((!(d->count > 0)) ? qt_assert("d->count > 0","/usr/include/qt4/QtCore/qcontiguouscache.h",435) : qt_noop()); + detach(); + d->count--; + if (QTypeInfo::isComplex) + (p->array + (d->start + d->count) % d->alloc)->~T(); +} + +template +inline T QContiguousCache::takeFirst() +{ T t = first(); removeFirst(); return t; } + +template +inline T QContiguousCache::takeLast() +{ T t = last(); removeLast(); return t; } + + + + +# 55 "/usr/include/qt4/QtCore/qdebug.h" 2 + + + + + +typedef QtValidLicenseForCoreModule QtCoreModule; + +class QDebug +{ + struct Stream { + Stream(QIODevice *device) : ts(device), ref(1), type(QtDebugMsg), space(true), message_output(false) {} + Stream(QString *string) : ts(string, QIODevice::WriteOnly), ref(1), type(QtDebugMsg), space(true), message_output(false) {} + Stream(QtMsgType t) : ts(&buffer, QIODevice::WriteOnly), ref(1), type(t), space(true), message_output(true) {} + QTextStream ts; + QString buffer; + int ref; + QtMsgType type; + bool space; + bool message_output; + } *stream; +public: + inline QDebug(QIODevice *device) : stream(new Stream(device)) {} + inline QDebug(QString *string) : stream(new Stream(string)) {} + inline QDebug(QtMsgType t) : stream(new Stream(t)) {} + inline QDebug(const QDebug &o):stream(o.stream) { ++stream->ref; } + inline QDebug &operator=(const QDebug &other); + inline ~QDebug() { + if (!--stream->ref) { + if(stream->message_output) { + try { + qt_message_output(stream->type, stream->buffer.toLocal8Bit().data()); + } catch (std::bad_alloc&) { } + } + delete stream; + } + } + inline QDebug &space() { stream->space = true; stream->ts << ' '; return *this; } + inline QDebug &nospace() { stream->space = false; return *this; } + inline QDebug &maybeSpace() { if (stream->space) stream->ts << ' '; return *this; } + + inline QDebug &operator<<(QChar t) { stream->ts << '\'' << t << '\''; return maybeSpace(); } + inline QDebug &operator<<(QBool t) { stream->ts << (bool(t != 0) ? "true" : "false"); return maybeSpace(); } + inline QDebug &operator<<(bool t) { stream->ts << (t ? "true" : "false"); return maybeSpace(); } + inline QDebug &operator<<(char t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(signed short t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(unsigned short t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(signed int t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(unsigned int t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(signed long t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(unsigned long t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(qint64 t) + { stream->ts << QString::number(t); return maybeSpace(); } + inline QDebug &operator<<(quint64 t) + { stream->ts << QString::number(t); return maybeSpace(); } + inline QDebug &operator<<(float t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(double t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(const char* t) { stream->ts << QString::fromAscii(t); return maybeSpace(); } + inline QDebug &operator<<(const QString & t) { stream->ts << '\"' << t << '\"'; return maybeSpace(); } + inline QDebug &operator<<(const QStringRef & t) { return operator<<(t.toString()); } + inline QDebug &operator<<(const QLatin1String &t) { stream->ts << '\"' << t.latin1() << '\"'; return maybeSpace(); } + inline QDebug &operator<<(const QByteArray & t) { stream->ts << '\"' << t << '\"'; return maybeSpace(); } + inline QDebug &operator<<(const void * t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(QTextStreamFunction f) { + stream->ts << f; + return *this; + } + + inline QDebug &operator<<(QTextStreamManipulator m) + { stream->ts << m; return *this; } +}; + +class QNoDebug +{ +public: + inline QNoDebug(){} + inline QNoDebug(const QDebug &){} + inline ~QNoDebug(){} + + inline QNoDebug &operator<<(QTextStreamFunction) { return *this; } + inline QNoDebug &operator<<(QTextStreamManipulator) { return *this; } + + inline QNoDebug &space() { return *this; } + inline QNoDebug &nospace() { return *this; } + inline QNoDebug &maybeSpace() { return *this; } + + + template + inline QNoDebug &operator<<(const T &) { return *this; } + +}; + + inline QDebug qCritical() { return QDebug(QtCriticalMsg); } + +inline QDebug &QDebug::operator=(const QDebug &other) +{ + if (this != &other) { + QDebug copy(other); + qSwap(stream, copy.stream); + } + return *this; +} + + + + + +template +inline QDebug operator<<(QDebug debug, const QList &list) + +{ + debug.nospace() << '('; + for (typename QList::size_type i = 0; i < list.count(); ++i) { + if (i) + debug << ", "; + debug << list.at(i); + } + debug << ')'; + return debug.space(); +} + + + + + +template +inline QDebug operator<<(QDebug debug, const QVector &vec) + +{ + debug.nospace() << "QVector"; + return operator<<(debug, vec.toList()); +} + + + + + +template +inline QDebug operator<<(QDebug debug, const QMap &map) + +{ + debug.nospace() << "QMap("; + for (typename QMap::const_iterator it = map.constBegin(); + it != map.constEnd(); ++it) { + debug << '(' << it.key() << ", " << it.value() << ')'; + } + debug << ')'; + return debug.space(); +} + + + + + +template +inline QDebug operator<<(QDebug debug, const QHash &hash) + +{ + debug.nospace() << "QHash("; + for (typename QHash::const_iterator it = hash.constBegin(); + it != hash.constEnd(); ++it) + debug << '(' << it.key() << ", " << it.value() << ')'; + debug << ')'; + return debug.space(); +} + + + + + +template +inline QDebug operator<<(QDebug debug, const QPair &pair) + +{ + debug.nospace() << "QPair(" << pair.first << ',' << pair.second << ')'; + return debug.space(); +} + +template +inline QDebug operator<<(QDebug debug, const QSet &set) +{ + debug.nospace() << "QSet"; + return operator<<(debug, set.toList()); +} + + + + + +template +inline QDebug operator<<(QDebug debug, const QContiguousCache &cache) + +{ + debug.nospace() << "QContiguousCache("; + for (int i = cache.firstIndex(); i <= cache.lastIndex(); ++i) { + debug << cache[i]; + if (i != cache.lastIndex()) + debug << ", "; + } + debug << ')'; + return debug.space(); +} + + + inline QDebug qDebug() { return QDebug(QtDebugMsg); } +# 273 "/usr/include/qt4/QtCore/qdebug.h" + inline QDebug qWarning() { return QDebug(QtWarningMsg); } + + + + + + + + + +# 1 "/usr/include/qt4/QtCore/QDebug" 2 +# 33 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/qptr.hpp" 2 + + +namespace PySide +{ + + + + +class __attribute__ ((visibility("default"))) qptr_base +{ +public: + enum construction_mode { + none = 0x00000000, + check_cache = 0x00000001, + no_check_cache = 0x00000002, + wrapper_pointer = 0x00000004, + no_wrapper_pointer = 0x00000008 + }; + + qptr_base(void* cpp_obj, PyObject *py_obj, void (*deleter)(void*), int mode); + qptr_base(const qptr_base& other); + qptr_base() : m_data(0) {} + virtual ~qptr_base(); + + + + + + + static void invalidate(void *cpp_obj, bool cleanup = false); + static bool exists(void *cpp_obj); + + bool is_null() const; + + qptr_base& operator=(const qptr_base& other); + + bool + operator==(const qptr_base& other) + { + return m_data == other.m_data; + } + + + void acquire_ownership(); + void release_ownership(); + bool has_ownership(); + + + bool is_wrapper() const; + void add_cpp_ref(); + void remove_cpp_ref(); + bool has_cpp_ref(); + + void add_child(qptr_base &child); + void remove_child(qptr_base &child); + void remove_parent(); + + PyObject* get_pyobject(); + void set_pyobject(PyObject *py_obj); + + void release(); + + + bool has_parent(); + int children_count(); + int refcount(); + static inline int list_size() { return m_cpp_to_qptrs.size(); } + + void* raw_ptr() const; + +protected: + bool ptr_assert() const; + void destroy(); + void invalidate(); + void invalidate(bool invalidate_ptr); + + class qptr_base_private; + mutable qptr_base_private* m_data; + static QHash m_cpp_to_qptrs; + explicit qptr_base(qptr_base::qptr_base_private* data); + qptr_base_private* create_copy() const; +}; + + +template +inline __attribute__ ((visibility("internal"))) +void delete_pointer(T *p) +{ + delete p; +} + +template +inline __attribute__ ((visibility("internal"))) +void delete_pointer_helper(void* p) +{ + T *ptr = reinterpret_cast(p); + delete_pointer(ptr); +} + + + + +template +class __attribute__ ((visibility("internal"))) qptr : public qptr_base +{ +public: + typedef T element_type; + typedef T value_type; + typedef T * pointer; + +public: + qptr(T* ptr, int mode = c_mode) + : qptr_base(get_void_pointer(ptr), + (mode & wrapper_pointer ? extract_pyobject(ptr, boost::is_polymorphic()) : 0 ), + &delete_pointer_helper, mode) + { + } + + template + qptr(const qptr& ptr) : qptr_base(ptr) + { + } + + qptr(T* ptr, PyObject* py_obj) + : qptr_base(get_void_pointer(ptr), py_obj, &delete_pointer_helper, no_check_cache | no_wrapper_pointer) + { + } + + qptr(PyObject* py_obj) + : qptr_base(get_void_pointer(boost::python::extract(py_obj)), py_obj, + &delete_pointer_helper, c_mode) + { + } + + template + qptr& + operator=(const qptr& ptr) + { + if ( m_data != ptr.m_data ) { + release(); + m_data = ptr.create_copy(); + } + return *this; + } + + inline T& + operator*() const + { + return *get(); + } + + inline T* + operator->() const + { + return get(); + } + + inline T* + get() const + { + ptr_assert(); + return reinterpret_cast(raw_ptr()); + } + + ~qptr() + { + if (!is_null() && refcount() == 1 && has_cpp_ref()) { + notify_ptr_del(reinterpret_cast(raw_ptr()), boost::is_polymorphic()); + } + } + + static inline void* get_void_pointer(T* pointer) + { + return get_void_pointer(pointer, boost::is_polymorphic()); + } + +private: + static inline PyObject* + extract_pyobject(T* ptr, boost::mpl::false_) + { + return 0; + } + + static inline PyObject* + extract_pyobject(T* ptr, boost::mpl::true_) + { + PySide::wrapper *w = dynamic_cast(ptr); + if (w) + return w->py_object(); + else + return 0; + } + + static inline void + notify_ptr_del(T* ptr, boost::mpl::false_) + { + } + + static inline void + notify_ptr_del(T* ptr, boost::mpl::true_) + { + PySide::wrapper *w = dynamic_cast(ptr); + if (w) + w->keep_cpp_ref(); + } + + static inline void* + get_void_pointer(T* ptr, boost::mpl::false_) + { + return static_cast(ptr); + } + + static inline void* + get_void_pointer(T* ptr, boost::mpl::true_) + { + boost::python::objects::dynamic_id_t base_id = + boost::python::objects::polymorphic_id_generator::execute(ptr); + return base_id.first; + } + +}; + + + + +template +inline __attribute__ ((visibility("internal"))) T* +get_pointer(qptr const& p){ + return p.get(); +} + +} +# 32 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/parent_policy.hpp" 2 + +namespace PySide +{ + + + + + + + +template < + class T + , class BasePolicy_ = boost::python::default_call_policies> +struct __attribute__ ((visibility("internal"))) register_wrapper_object : BasePolicy_ +{ + template + static PyObject* + postcall(ArgumentPackage const& args_, PyObject* result) + { + result = BasePolicy_::postcall(args_, result); + if (result) { + + PyObject* py_self = + boost::python::detail::get_prev<1>::execute(args_, result); + qptr ptr_parent(py_self); + } + return result; + } +}; +# 72 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/parent_policy.hpp" +template < + std::size_t parent + , std::size_t child + , class T_PARENT + , class T_CHILD + , class BasePolicy_ = boost::python::default_call_policies + , class T = void> +struct __attribute__ ((visibility("internal"))) parent_policy_add : BasePolicy_ +{ + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((parent != child) == 0 ? false : true) >)> boost_static_assert_typedef_81; + + template + static PyObject* + postcall(ArgumentPackage const& args_, PyObject* result) + { + unsigned arity_ = boost::python::detail::arity(args_); + if ((std::max)(parent, child) > arity_) { + + + return BasePolicy_::postcall(args_, result); + } + + result = BasePolicy_::postcall(args_, result); + if (result) { + PyObject* py_parent = (&_Py_NoneStruct); + if (parent <= arity_) + py_parent = boost::python::detail::get_prev::execute(args_, result); + + PyObject* py_child = boost::python::detail::get_prev::execute(args_, result); + if (py_child == (&_Py_NoneStruct)) { + return result; + } else if (py_parent == (&_Py_NoneStruct)) { + qptr ptr_child(py_child); + ptr_child.remove_parent(); + } else { + qptr ptr_parent(py_parent); + qptr ptr_child(py_child); + + if (ptr_parent.is_wrapper()) { + ptr_parent.add_child(ptr_child); + } else { + ptr_child.add_cpp_ref(); + } + } + } + return result; + } + +}; + +template < std::size_t parent + , std::size_t child + , class T_PARENT + , class BasePolicy_ + , class T> +struct __attribute__ ((visibility("internal"))) parent_policy_add, BasePolicy_ > : BasePolicy_ +{ + template + static PyObject* + postcall(ArgumentPackage const& args_, PyObject* result) + { + unsigned arity_ = boost::python::detail::arity(args_); + if ((std::max)(parent, child) > arity_) { + return BasePolicy_::postcall(args_, result); + } + + result = BasePolicy_::postcall(args_, result); + if (result) { + PyObject* py_parent = (&_Py_NoneStruct); + if (parent <= arity_) + py_parent = boost::python::detail::get_prev::execute(args_, result); + + PyObject* py_child = boost::python::detail::get_prev::execute(args_, result); + if (py_child == (&_Py_NoneStruct) || !((((((PyObject*)(py_child))->ob_type))->tp_flags & ((1L<<25))) != 0)) { + return result; + } else if (py_parent == (&_Py_NoneStruct)) { + Py_ssize_t max = PyList_Size(py_child); + for (Py_ssize_t i = 0; i < max; ++i) { + qptr ptr_child(PyList_GetItem(py_child, i)); + ptr_child.remove_parent(); + } + } else { + Py_ssize_t max = PyList_Size(py_child); + qptr ptr_parent(py_parent); + for (Py_ssize_t i = 0; i < max; ++i) { + qptr ptr_child(PyList_GetItem(py_child, i)); + + if (ptr_parent.is_wrapper()) { + ptr_parent.add_child(ptr_child); + } else { + ptr_child.add_cpp_ref(); + } + } + } + } + return result; + } +}; +# 179 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/parent_policy.hpp" +template < + std::size_t arg_index + , bool release_ownership + , class T + , class BasePolicy_ = boost::python::default_call_policies> +struct __attribute__ ((visibility("internal"))) transfer_ownership : BasePolicy_ +{ + template + static PyObject* + postcall(ArgumentPackage const& args_, PyObject* result) + { + unsigned arity_ = boost::python::detail::arity(args_); + if (arg_index > arity_) { + PyErr_SetString(PyExc_IndexError, + "PySide::transfer_ownership: argument index out of range"); + return 0; + } + + result = BasePolicy_::postcall(args_, result); + if (result) { + PyObject* py_arg = boost::python::detail::get_prev::execute(args_, result); + + qptr ptr_child(py_arg); + if (release_ownership) + ptr_child.release_ownership(); + else + ptr_child.acquire_ownership(); + } + + return result; + } +}; +# 223 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/parent_policy.hpp" +template < + std::size_t parent + , std::size_t child + , class T_PARENT + , class T_CHILD + , class BasePolicy_ = boost::python::default_call_policies + , class T = void> +struct __attribute__ ((visibility("internal"))) parent_policy_remove : BasePolicy_ +{ + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((parent != child) == 0 ? false : true) >)> boost_static_assert_typedef_232; + + template + static PyObject* + postcall(ArgumentPackage const& args_, PyObject* result) + { + unsigned arity_ = boost::python::detail::arity(args_); + if ((std::max)(parent, child) > arity_) { + PyErr_SetString(PyExc_IndexError, + "PyQt::parent_policy_remove: argument index out of range"); + return 0; + } + + result = BasePolicy_::postcall(args_, result); + if (result) { + PyObject* py_parent = 0; + if (parent <= arity_) + py_parent = boost::python::detail::get_prev::execute(args_, result); + + PyObject* py_child = boost::python::detail::get_prev::execute(args_, result); + + qptr ptr_parent(py_parent); + qptr ptr_child(py_child); + + if (ptr_parent.is_wrapper()) { + ptr_child.remove_parent(); + } else { + ptr_child.remove_cpp_ref(); + } + } + + return result; + } +}; + +template < std::size_t parent + , std::size_t child + , class T_PARENT + , class BasePolicy_ + , class T> +struct __attribute__ ((visibility("internal"))) parent_policy_remove, BasePolicy_> : BasePolicy_ +{ + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((parent != child) == 0 ? false : true) >)> boost_static_assert_typedef_274; + + template + static PyObject* + postcall(ArgumentPackage const& args_, PyObject* result) + { + unsigned arity_ = boost::python::detail::arity(args_); + if ((std::max)(parent, child) > arity_) { + PyErr_SetString(PyExc_IndexError, + "PyQt::parent_policy_remove: argument index out of range"); + return 0; + } + + result = BasePolicy_::postcall(args_, result); + if (result) { + PyObject* py_parent = 0; + if (parent <= arity_) + py_parent = boost::python::detail::get_prev::execute(args_, result); + + PyObject* py_child = boost::python::detail::get_prev::execute(args_, result); + if (((((((PyObject*)(py_child))->ob_type))->tp_flags & ((1L<<25))) != 0)) { + qptr ptr_parent(py_parent); + uint max = PyList_Size(py_child); + for (Py_ssize_t i = 0; i < max; ++i) { + qptr ptr_child(PyList_GetItem(py_child, i)); + + if (ptr_parent.is_wrapper()) { + ptr_child.remove_parent(); + } else { + ptr_child.remove_cpp_ref(); + } + } + } + } + return result; + } +}; + + + + + + + +template +struct __attribute__ ((visibility("internal"))) make_ptr_reference_holder +{ + template + static PyObject* + execute(T* p) + { + if(p == 0) + { + return boost::python::incref((&_Py_NoneStruct)); + } + + + qptr ptr(const_cast(p)); + PyObject *ret = ptr.get_pyobject(); + if (ret) + return boost::python::incref(ret); + + ptr.set_pyobject(execute_impl(p)); + + + if (cpp_ownership) { + ptr.release_ownership(); + } + + return ptr.get_pyobject(); + } + + template + static PyObject* + execute_impl(T* p) + { + typedef qptr smart_pointer; + typedef boost::python::objects::pointer_holder holder_t; + + smart_pointer ptr(const_cast(p)); + PyObject *ret = boost::python::objects::make_ptr_instance::execute(ptr); + ptr.set_pyobject(ret); + return ret; + } +}; +# 369 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/parent_policy.hpp" +template +struct __attribute__ ((visibility("internal"))) return_ptr_object +{ + template + struct apply + { + typedef typename boost::mpl::if_c< + boost::is_pointer::value + , boost::python::to_python_indirect > + , boost::python::detail::reference_existing_object_requires_a_pointer_or_reference_return_type + >::type type; + }; +}; + +struct __attribute__ ((visibility("internal"))) reference_ptr_object +{ + template + struct apply + { + static const bool ok = boost::is_pointer::value || boost::is_reference::value + ; + + typedef typename boost::mpl::if_c< + ok + , boost::python::to_python_indirect > + , boost::python::detail::reference_existing_object_requires_a_pointer_or_reference_return_type + >::type type; + }; +}; +# 407 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/parent_policy.hpp" +template < std::size_t parent_arg + , std::size_t child_arg + , class T_PARENT + , class T_CHILD + , class BasePolicy_ = boost::python::default_call_policies + , class T = void > +struct __attribute__ ((visibility("internal"))) return_object + : parent_policy_add +{ + private: + static const bool legal = parent_arg > 0; + public: + typedef typename boost::mpl::if_c< + legal + , reference_ptr_object + , boost::python::detail::return_internal_reference_owner_arg_must_be_greater_than_zero + >::type result_converter; +}; + +template < std::size_t parent_arg + , std::size_t child_arg + , class T_PARENT + , class BasePolicy_ + , class T > +struct __attribute__ ((visibility("internal"))) return_object, BasePolicy_> +: parent_policy_add, BasePolicy_, T> +{ +}; + + + + +template +inline boost::python::handle<> +ptr(T* data, bool take_ownership = false) +{ + if (data == 0) + return boost::python::handle<>(boost::python::incref((&_Py_NoneStruct))); + + PyObject *ret; + + if (take_ownership) { + boost::python::to_python_indirect > + convert; + ret = convert(data); + } else { + boost::python::to_python_indirect > + convert; + ret = convert(data); + } + return boost::python::handle<>(ret); +} + +} +# 31 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/pyside.hpp" 2 +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/qcontainer_indexing_suite.hpp" 1 +# 29 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/qcontainer_indexing_suite.hpp" +namespace PySide +{ + + +template +class __attribute__ ((visibility("internal"))) qcontainer_indexing_suite; + +template +class __attribute__ ((visibility("internal"))) final_qcontainer_derived_policies + : public qcontainer_indexing_suite > +{}; + +template > +class __attribute__ ((visibility("internal"))) qcontainer_indexing_suite + : public boost::python::indexing_suite +{ +public: + typedef typename Container::value_type data_type; + typedef typename Container::value_type key_type; + typedef typename Container::size_type index_type; + typedef typename Container::size_type size_type; + typedef typename Container::difference_type difference_type; + + static typename boost::mpl::if_, + data_type&, + data_type>::type + get_item(Container& container, index_type i) + { + return container[i]; + } + + static boost::python::object + get_slice(Container& container, index_type from, index_type to) + { + if (from > to) + return boost::python::object(Container()); + + return boost::python::object(container.mid(from, to-from)); + } + + static void + set_item(Container& container, index_type i, data_type const& v) + { + container[i] = v; + } + + static void + set_slice(Container& container, index_type from, + index_type to, data_type const& v) + { + if (from > to) + return; + + container.erase(container.begin()+from, container.end()+to); + container.insert(container.begin()+from, v); + } + + template + static void + set_slice(Container& container, index_type from, + index_type to, Iter first, Iter last) + { + if (from > to) { + std::copy(first, last, container.begin()+from); + } else { + container.erase(container.begin()+from, container.end()+to); + std::copy(first, last, container.begin()+from); + } + } + + static void + delete_item(Container& container, index_type i) + { + container.erase(container.begin()+i); + } + + static void + delete_slice(Container& container, index_type from, index_type to) + { + if (from > to) + return; + + container.erase(container.begin()+from, container.begin()+to); + } + + static size_t + size(Container& container) + { + return container.size(); + } + + static bool + contains(Container& container, key_type const& key) + { + return std::find(container.begin(), container.end(), key) + != container.end(); + } + + static index_type + convert_index(Container& container, PyObject* i_) + { + boost::python::extract i(i_); + if (i.check()) { + long index = i(); + if (index < 0) + index += DerivedPolicies::size(container); + + if (index >= long(container.size()) || index < 0) { + PyErr_SetString(PyExc_IndexError, "Index out of range"); + boost::python::throw_error_already_set(); + } + return index; + } + + PyErr_SetString(PyExc_TypeError, "Invalid index type"); + boost::python::throw_error_already_set(); + return index_type(); + } + + static index_type + get_min_index(Container& ) + { + return 0; + } + + static index_type + get_max_index(Container& container) + { + return container.size(); + } + + static bool + compare_index(Container& , index_type a, index_type b) + { + return a < b; + } + + static void + append(Container& container, data_type const& v) + { + container.push_back(v); + } +}; + +} +# 32 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/pyside.hpp" 2 + +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/thread_support.hpp" 1 +# 28 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/thread_support.hpp" +# 1 "/usr/include/python2.6/pystate.h" 1 +# 29 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/thread_support.hpp" 2 +# 1 "/usr/include/python2.6/ceval.h" 1 +# 30 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/thread_support.hpp" 2 + +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/pyside_global.hpp" 1 +# 32 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/thread_support.hpp" 2 + +namespace PySide +{ + +class __attribute__ ((visibility("default"))) thread_support +{ +private: + static bool m_enabled; + thread_support() {} + +public: + static void init(); + static void shutdown(); + static inline bool enabled(); +}; + +class __attribute__ ((visibility("default"))) thread_locker +{ +private: + PyThreadState *m_thread_state; + PyGILState_STATE m_gstate; + +public: + thread_locker(); + ~thread_locker(); +}; + +class __attribute__ ((visibility("default"))) py_allow_threads +{ +private: + PyThreadState *_save; + +public: + py_allow_threads(); + ~py_allow_threads(); +}; + +} +# 34 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/pyside.hpp" 2 +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/type_manager.hpp" 1 +# 30 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/type_manager.hpp" +# 1 "/usr/include/qt4/QtCore/QDebug" 1 +# 31 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/type_manager.hpp" 2 +# 1 "/usr/include/qt4/QtCore/QHash" 1 +# 32 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/type_manager.hpp" 2 +# 1 "/usr/include/qt4/QtCore/QString" 1 +# 1 "/usr/include/qt4/QtCore/qstring.h" 1 +# 1 "/usr/include/qt4/QtCore/QString" 2 +# 33 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/type_manager.hpp" 2 +# 1 "/usr/include/qt4/QtCore/QGenericArgument" 1 +# 1 "/usr/include/qt4/QtCore/qobjectdefs.h" 1 +# 1 "/usr/include/qt4/QtCore/QGenericArgument" 2 +# 34 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/type_manager.hpp" 2 +# 1 "/usr/include/qt4/QtCore/QSet" 1 +# 1 "/usr/include/qt4/QtCore/qset.h" 1 +# 1 "/usr/include/qt4/QtCore/QSet" 2 +# 35 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/type_manager.hpp" 2 + + + +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/pyside_global.hpp" 1 +# 39 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/type_manager.hpp" 2 +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/type_details.hpp" 1 +# 28 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/type_details.hpp" +# 1 "/usr/include/qt4/QtCore/QString" 1 +# 29 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/type_details.hpp" 2 +# 1 "/usr/include/qt4/QtCore/QGenericArgument" 1 +# 30 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/type_details.hpp" 2 + + +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/pyside_global.hpp" 1 +# 33 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/type_details.hpp" 2 +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/parent_policy.hpp" 1 +# 34 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/type_details.hpp" 2 + +namespace PySide +{ + +class __attribute__ ((visibility("internal"))) type_details +{ + typedef boost::python::object(*func_cpp_to_python_type)(void*); + typedef QGenericArgument(*func_python_to_cpp_type)(const boost::python::object&, const char*); + typedef void(*func_delete_type)(void*); + + + type_details() {} + type_details(const type_details&); + type_details& operator=(const type_details&); + +public: + template + static type_details* + create_object_type_details(const char* type_name) { + type_details* self = new type_details(); + self->m_type_name = type_name; + self->m_type_object = boost::python::converter::registry::query(boost::python::type_id())->get_class_object(); + self->m_func_cpp_to_python = &objecttype_to_python; + self->m_func_python_to_cpp = &python_to_objecttype; + self->m_func_delete = 0; + return self; + } + + template + static type_details* + create_value_type_details(const char* type_name) { + type_details* self = new type_details(); + self->m_type_name = type_name; + self->m_type_object = boost::python::converter::registry::query(boost::python::type_id())->get_class_object(); + self->m_func_cpp_to_python = &valuetype_to_python; + self->m_func_python_to_cpp = &python_to_value_type; + self->m_func_delete = &func_delete_data; + return self; + } + template + static type_details* + create_native_type_details(const char* type_name) { + type_details* self = new type_details(); + self->m_type_name = type_name; + self->m_type_object = 0; + self->m_func_cpp_to_python = &native_to_python; + self->m_func_python_to_cpp = &python_to_value_type; + self->m_func_delete = &func_delete_data; + return self; + } + + template + static type_details* + create_container_type_details(const char* type_name) { + type_details* self = new type_details(); + self->m_type_name = type_name; + self->m_type_object = 0; + self->m_func_cpp_to_python = &container_to_python; + self->m_func_python_to_cpp = &python_to_container; + self->m_func_delete = &func_delete_data; + return self; + } + + boost::python::object + to_python(void *data) const + { + return m_func_cpp_to_python(data); + } + + QGenericArgument + to_cpp(const boost::python::object &obj) const + { + return m_func_python_to_cpp(obj, m_type_name); + } + + const PyTypeObject* + get_python_type_object() const + { + return m_type_object; + } + + void + delete_data(QGenericArgument &arg) const + { + if (m_func_delete) + m_func_delete(arg.data()); + } + +private: + const char* m_type_name; + const PyTypeObject *m_type_object; + + func_cpp_to_python_type m_func_cpp_to_python; + func_python_to_cpp_type m_func_python_to_cpp; + func_delete_type m_func_delete; + + + template + static boost::python::object + objecttype_to_python(void* p) + { + T* obj = *(reinterpret_cast< T*(*)>(p)); + boost::python::object py_obj(PySide::ptr(obj)); + if (!py_obj.ptr()) + { + fprintf(stderr, "Fail to create python object from object in adress: %p\n", obj); + py_obj = boost::python::object(); + } + else + { + boost::python::incref(py_obj.ptr()); + } + + return py_obj; + } + + template + static QGenericArgument + python_to_objecttype(const boost::python::object &obj, const char *type_name) + { + T val = boost::python::extract(obj); + return QGenericArgument(type_name, val); + } + + + template + static boost::python::object + valuetype_to_python(void* p) + { + T* val = reinterpret_cast(p); + return boost::python::object(val); + } + + template + static QGenericArgument + python_to_value_type(const boost::python::object& obj, const char *type_name) + { + T* val = new T(boost::python::extract(obj)); + return QGenericArgument(type_name, static_cast(val)); + } + + template + static QGenericArgument + python_to_container(const boost::python::object& obj, const char* type_name) + { + T* val = new T(boost::python::extract(obj)); + return QGenericArgument(type_name, static_cast(val)); + } + + template + static boost::python::object + container_to_python(void* p) + { + return boost::python::object(reinterpret_cast(p)); + } + + template + static boost::python::object + container_value_to_python(T t) + { + return valuetype_to_python(&t); + } + + template + static boost::python::object + container_value_to_python(T* t) + { + return objecttype_to_python(&t); + } + + template + static void + func_delete_data(void *data) + { + delete reinterpret_cast(data); + } + + template + static boost::python::object + native_to_python(void* p) + { + T* val = new T(*reinterpret_cast(p)); + return boost::python::object(*val); + } +}; + +} +# 40 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/type_manager.hpp" 2 + + +namespace PySide +{ + +class __attribute__ ((visibility("default"))) type_manager +{ +public: + static type_manager& instance(); + ~type_manager(); + + boost::python::object to_python(const QString &name, void *data); + QGenericArgument to_cpp(const QString &name, const boost::python::object &obj); + void delete_data(QGenericArgument &arg); + + template + void __attribute__ ((visibility("internal"))) + register_object_type(const char* type_name) + { + m_type_map[type_name] = type_details::create_object_type_details(type_name); + } + + template + void __attribute__ ((visibility("internal"))) + register_value_type(const char* type_name) + { + m_type_map[type_name] = type_details::create_value_type_details(type_name); + } + + template + void __attribute__ ((visibility("internal"))) + register_native_type(const char* type_name) + { + m_type_map[type_name] = type_details::create_native_type_details(type_name); + } + + template + void __attribute__ ((visibility("internal"))) + register_container_type(const char* type_name) + { + m_type_map[type_name] = type_details::create_container_type_details(type_name); + } + + + bool __attribute__ ((visibility("internal"))) + register_converter(const char* type_name) { + QString key(type_name); + if (m_registered_converters.contains(key)) + return false; + m_registered_converters << key; + return true; + } + + const type_details* + get_type_details(const char* type_name) + { + return m_type_map[type_name]; + } + + +private: + QSet m_registered_converters; + QHash m_type_map; + type_manager(); + type_manager(const type_manager&); +}; + +} +# 35 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/pyside.hpp" 2 + +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/signal_manager.hpp" 1 +# 27 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/signal_manager.hpp" +# 1 "/usr/include/qt4/QtCore/QHash" 1 +# 28 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/signal_manager.hpp" 2 +# 1 "/usr/include/qt4/QtCore/QList" 1 +# 1 "/usr/include/qt4/QtCore/qlist.h" 1 +# 1 "/usr/include/qt4/QtCore/QList" 2 +# 29 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/signal_manager.hpp" 2 +# 1 "/usr/include/qt4/QtCore/QByteArray" 1 +# 1 "/usr/include/qt4/QtCore/qbytearray.h" 1 +# 1 "/usr/include/qt4/QtCore/QByteArray" 2 +# 30 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/signal_manager.hpp" 2 +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/pyside_global.hpp" 1 +# 31 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/signal_manager.hpp" 2 + +# 1 "/usr/include/qt4/QtCore/QMap" 1 +# 1 "/usr/include/qt4/QtCore/qmap.h" 1 +# 1 "/usr/include/qt4/QtCore/QMap" 2 +# 33 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/signal_manager.hpp" 2 + +class QObject; + +namespace PySide +{ + +class signal_holder; +class pyqt_signal; +class pyqt_slot; +class trigger; + +struct signal_manager_data; +# 63 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/signal_manager.hpp" +class __attribute__ ((visibility("default"))) signal_manager +{ +public: + + static signal_manager& instance(); + + + bool connect(QObject* src, const pyqt_signal& signal, + boost::python::object& callable, Qt::ConnectionType type = Qt::AutoConnection); + + bool connect(QObject* sender, const pyqt_signal& signal, + QObject* receiver, const pyqt_slot& slot, Qt::ConnectionType type = Qt::AutoConnection); + + bool disconnect(QObject* src, const pyqt_signal& signal, + boost::python::object& callable); + + bool disconnect(QObject* sender, const pyqt_signal& signal, + QObject* receiver, + const pyqt_slot& slot); + + int dynamicsignal_receivers(const QObject *sender, + const pyqt_signal &signal, + int offset) const; + QList signals_of(const QObject* obj); +# 96 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/signal_manager.hpp" + void register_dynamic_signal(QObject *src, const pyqt_signal& signal, + trigger* trigger, int slot_id); +# 107 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/signal_manager.hpp" + QObject* register_dynamic_signal(QObject *parent, + QObject *sender, + const pyqt_signal& signal, + const pyqt_signal& receiver); +# 119 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/signal_manager.hpp" + QObject* register_dynamic_slot(QObject *parent, + const boost::python::object &callback, + QString &slot_name); + + + const QMetaObject* get_dynamic_metaobject(QObject* obj); + + + void unregister_qobj(QObject* obj); + + + void emit_(QObject *src, const pyqt_signal& signal, + const boost::python::object& args); + + ~signal_manager(); + + void register_sender(QObject* sender); + void unregister_sender(); + QObject* sender(); + +private: + signal_manager_data *m_data; + + trigger* find_trigger(QObject* src); + trigger* get_trigger(const QObject *src) const; + void emit_dynamic_signal(QObject *source, const pyqt_signal& signal, + const boost::python::object& args); + void emit_native_signal(QObject *source, int signal_index, + const pyqt_signal& signal, + const boost::python::object& args); + void parse_objects_to_qarguments(const QStringList &args_type, + const boost::python::object &argv, + QList &q_args); + + + signal_manager(); + signal_manager(const signal_manager&); + signal_manager& operator=(const signal_manager&); +}; + +class __attribute__ ((visibility("internal"))) set_sender +{ + signal_manager& m_sm; + +public: + set_sender(QObject* sender) : m_sm(signal_manager::instance()) + { + m_sm.register_sender(sender); + } + + ~set_sender() + { + m_sm.unregister_sender(); + } +}; + +} +# 37 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3/base/pyside.hpp" 2 +# 35 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3_build/PySide/QtWebKit/PySide/QtWebKit/qwebpage_extensionoption_wrapper.cpp" 2 +# 1 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3_build/PySide/QtWebKit/PySide/QtWebKit/qwebpage_extensionoption_wrapper.hpp" 1 +# 31 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3_build/PySide/QtWebKit/PySide/QtWebKit/qwebpage_extensionoption_wrapper.hpp" +using namespace PySide; + +class __attribute__ ((visibility("internal"))) qwebpage_extensionoption_wrapper : public QWebPage::ExtensionOption, public PySide::wrapper +{ + +private: + typedef boost::python::class_< QWebPage::ExtensionOption, PySide::qptr < qwebpage_extensionoption_wrapper, qptr_base::no_check_cache | qptr_base::wrapper_pointer> > class_type; +public: + qwebpage_extensionoption_wrapper(PyObject *py_self, const QWebPage::ExtensionOption& self) : QWebPage::ExtensionOption(self), wrapper(py_self) + { + } + qwebpage_extensionoption_wrapper(PyObject *py_self); + ~qwebpage_extensionoption_wrapper(); + + static void define_python_class() throw(); + +}; +# 36 "/var/tmp/portage/dev-python/pyside-0.2.3-r1/work/pyside-qt4.6+0.2.3_build/PySide/QtWebKit/PySide/QtWebKit/qwebpage_extensionoption_wrapper.cpp" 2 + + + + +using namespace boost; +using namespace PySide; + +qwebpage_extensionoption_wrapper::qwebpage_extensionoption_wrapper(PyObject *py_self) + : QWebPage::ExtensionOption(), wrapper(py_self) +{ +} + +qwebpage_extensionoption_wrapper::~qwebpage_extensionoption_wrapper() +{ + PySide::qptr_base::invalidate(PySide::qptr::get_void_pointer(this)); +} +void qwebpage_extensionoption_wrapper::define_python_class() throw() { + class_type python_cls("ExtensionOption", python::init< > ()); + + python::scope qwebpage_extensionoption_wrapper_scope(python_cls); + python::implicitly_convertible< PySide::qptr, PySide::qptr >(); + python_cls.def(python::init()); + type_manager::instance().register_value_type("QWebPage::ExtensionOption"); +} diff --git a/321197/pyside.ii.1 b/321197/pyside.ii.1 new file mode 100644 index 0000000..3c80347 --- /dev/null +++ b/321197/pyside.ii.1 @@ -0,0 +1,80546 @@ +typedef long int ptrdiff_t; +typedef long unsigned int size_t; +typedef signed char qint8; +typedef unsigned char quint8; +typedef short qint16; +typedef unsigned short quint16; +typedef int qint32; +typedef unsigned int quint32; +typedef long long qint64; +typedef unsigned long long quint64; +typedef qint64 qlonglong; +typedef quint64 qulonglong; +template struct QIntegerForSize; +template <> struct QIntegerForSize<1> { typedef quint8 Unsigned; typedef qint8 Signed; }; +template <> struct QIntegerForSize<2> { typedef quint16 Unsigned; typedef qint16 Signed; }; +template <> struct QIntegerForSize<4> { typedef quint32 Unsigned; typedef qint32 Signed; }; +template <> struct QIntegerForSize<8> { typedef quint64 Unsigned; typedef qint64 Signed; }; +template struct QIntegerForSizeof: QIntegerForSize { }; +typedef QIntegerForSizeof::Unsigned quintptr; +typedef QIntegerForSizeof::Signed qptrdiff; +typedef unsigned char uchar; +typedef unsigned short ushort; +typedef unsigned int uint; +typedef unsigned long ulong; +typedef int QNoImplicitBoolCast; +typedef double qreal; +template +inline T qAbs(const T &t) { return t >= 0 ? t : -t; } +inline int qRound(qreal d) +{ return d >= 0.0 ? int(d + 0.5) : int(d - int(d-1) + 0.5) + int(d-1); } +inline qint64 qRound64(qreal d) +{ return d >= 0.0 ? qint64(d + 0.5) : qint64(d - qreal(qint64(d-1)) + 0.5) + qint64(d-1); } +template +inline const T &qMin(const T &a, const T &b) { if (a < b) return a; return b; } +template +inline const T &qMax(const T &a, const T &b) { if (a < b) return b; return a; } +template +inline const T &qBound(const T &min, const T &val, const T &max) +{ return qMax(min, qMin(max, val)); } +class QDataStream; +inline void qt_noop() {} +class QString; +class QSysInfo { +public: + enum Sizes { + WordSize = (sizeof(void *)<<3) + }; + enum Endian { + BigEndian, + LittleEndian + , ByteOrder = LittleEndian + }; +}; + const char *qVersion(); + bool qSharedBuild(); + void qDebug(const char *, ...) + __attribute__ ((format (printf, 1, 2))) +; + void qWarning(const char *, ...) + __attribute__ ((format (printf, 1, 2))) +; +class QString; + QString qt_error_string(int errorCode = -1); + void qCritical(const char *, ...) + __attribute__ ((format (printf, 1, 2))) +; + void qFatal(const char *, ...) + __attribute__ ((format (printf, 1, 2))) +; + void qErrnoWarning(int code, const char *msg, ...); + void qErrnoWarning(const char *msg, ...); +class QDebug; +class QNoDebug; + inline QDebug qDebug(); + inline QDebug qWarning(); + inline QDebug qCritical(); + void qt_assert(const char *assertion, const char *file, int line); + void qt_assert_x(const char *where, const char *what, const char *file, int line); + void qt_check_pointer(const char *, int); + void qBadAlloc(); +template +inline T *q_check_ptr(T *p) { do { if (!(p)) qBadAlloc(); } while (0); return p; } +enum QtMsgType { QtDebugMsg, QtWarningMsg, QtCriticalMsg, QtFatalMsg, QtSystemMsg = QtCriticalMsg }; + void qt_message_output(QtMsgType, const char *buf); +typedef void (*QtMsgHandler)(QtMsgType, const char *); + QtMsgHandler qInstallMsgHandler(QtMsgHandler); +template class QBasicAtomicPointer; +template +class QGlobalStatic +{ +public: + QBasicAtomicPointer pointer; + bool destroyed; +}; +template +class QGlobalStaticDeleter +{ +public: + QGlobalStatic &globalStatic; + QGlobalStaticDeleter(QGlobalStatic &_globalStatic) + : globalStatic(_globalStatic) + { } + inline ~QGlobalStaticDeleter() + { + delete globalStatic.pointer; + globalStatic.pointer = 0; + globalStatic.destroyed = true; + } +}; +class QBool +{ + bool b; +public: + inline explicit QBool(bool B) : b(B) {} + inline operator const void *() const + { return b ? static_cast(this) : static_cast(0); } +}; +inline bool operator==(QBool b1, bool b2) { return !b1 == !b2; } +inline bool operator==(bool b1, QBool b2) { return !b1 == !b2; } +inline bool operator==(QBool b1, QBool b2) { return !b1 == !b2; } +inline bool operator!=(QBool b1, bool b2) { return !b1 != !b2; } +inline bool operator!=(bool b1, QBool b2) { return !b1 != !b2; } +inline bool operator!=(QBool b1, QBool b2) { return !b1 != !b2; } +static inline bool qFuzzyCompare(double p1, double p2) +{ + return (qAbs(p1 - p2) <= 0.000000000001 * qMin(qAbs(p1), qAbs(p2))); +} +static inline bool qFuzzyCompare(float p1, float p2) +{ + return (qAbs(p1 - p2) <= 0.00001f * qMin(qAbs(p1), qAbs(p2))); +} +static inline bool qFuzzyIsNull(double d) +{ + return qAbs(d) <= 0.000000000001; +} +static inline bool qFuzzyIsNull(float f) +{ + return qAbs(f) <= 0.00001f; +} +static inline bool qIsNull(double d) +{ + union U { + double d; + quint64 u; + }; + U val; + val.d = d; + return val.u == quint64(0); +} +static inline bool qIsNull(float f) +{ + union U { + float f; + quint32 u; + }; + U val; + val.f = f; + return val.u == 0u; +} +template inline bool qIsDetached(T &) { return true; } +template +class QTypeInfo +{ +public: + enum { + isPointer = false, + isComplex = true, + isStatic = true, + isLarge = (sizeof(T)>sizeof(void*)), + isDummy = false + }; +}; +template +class QTypeInfo +{ +public: + enum { + isPointer = true, + isComplex = false, + isStatic = false, + isLarge = false, + isDummy = false + }; +}; +enum { + Q_COMPLEX_TYPE = 0, + Q_PRIMITIVE_TYPE = 0x1, + Q_STATIC_TYPE = 0, + Q_MOVABLE_TYPE = 0x2, + Q_DUMMY_TYPE = 0x4 +}; +template +inline void qSwap(T &value1, T &value2) +{ + const T t = value1; + value1 = value2; + value2 = t; +} +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(bool)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "bool"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(char)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "char"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(signed char)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "signed char"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(uchar)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "uchar"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(short)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "short"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(ushort)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "ushort"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(int)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "int"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(uint)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "uint"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(long)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "long"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(ulong)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "ulong"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(qint64)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "qint64"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(quint64)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "quint64"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(float)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "float"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(double)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "double"; } }; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(long double)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "long double"; } }; + void *qMalloc(size_t size); + void qFree(void *ptr); + void *qRealloc(void *ptr, size_t size); + void *qMallocAligned(size_t size, size_t alignment); + void *qReallocAligned(void *ptr, size_t size, size_t oldsize, size_t alignment); + void qFreeAligned(void *ptr); + void *qMemCopy(void *dest, const void *src, size_t n); + void *qMemSet(void *dest, int c, size_t n); +class QFlag +{ + int i; +public: + inline QFlag(int i); + inline operator int() const { return i; } +}; +inline QFlag::QFlag(int ai) : i(ai) {} +class QIncompatibleFlag +{ + int i; +public: + inline explicit QIncompatibleFlag(int i); + inline operator int() const { return i; } +}; +inline QIncompatibleFlag::QIncompatibleFlag(int ai) : i(ai) {} +template +class QFlags +{ + typedef void **Zero; + int i; +public: + typedef Enum enum_type; + inline QFlags(const QFlags &f) : i(f.i) {} + inline QFlags(Enum f) : i(f) {} + inline QFlags(Zero = 0) : i(0) {} + inline QFlags(QFlag f) : i(f) {} + inline QFlags &operator=(const QFlags &f) { i = f.i; return *this; } + inline QFlags &operator&=(int mask) { i &= mask; return *this; } + inline QFlags &operator&=(uint mask) { i &= mask; return *this; } + inline QFlags &operator|=(QFlags f) { i |= f.i; return *this; } + inline QFlags &operator|=(Enum f) { i |= f; return *this; } + inline QFlags &operator^=(QFlags f) { i ^= f.i; return *this; } + inline QFlags &operator^=(Enum f) { i ^= f; return *this; } + inline operator int() const { return i; } + inline QFlags operator|(QFlags f) const { QFlags g; g.i = i | f.i; return g; } + inline QFlags operator|(Enum f) const { QFlags g; g.i = i | f; return g; } + inline QFlags operator^(QFlags f) const { QFlags g; g.i = i ^ f.i; return g; } + inline QFlags operator^(Enum f) const { QFlags g; g.i = i ^ f; return g; } + inline QFlags operator&(int mask) const { QFlags g; g.i = i & mask; return g; } + inline QFlags operator&(uint mask) const { QFlags g; g.i = i & mask; return g; } + inline QFlags operator&(Enum f) const { QFlags g; g.i = i & f; return g; } + inline QFlags operator~() const { QFlags g; g.i = ~i; return g; } + inline bool operator!() const { return !i; } + inline bool testFlag(Enum f) const { return (i & f) == f && (f != 0 || i == int(f) ); } +}; +template +class QForeachContainer { +public: + inline QForeachContainer(const T& t) : c(t), brk(0), i(c.begin()), e(c.end()) { } + const T c; + int brk; + typename T::const_iterator i, e; +}; +template static inline T *qGetPtrHelper(T *ptr) { return ptr; } +template static inline typename Wrapper::pointer qGetPtrHelper(const Wrapper &p) { return p.data(); } + QString qtTrId(const char *id, int n = -1); +class QByteArray; + QByteArray qgetenv(const char *varName); + bool qputenv(const char *varName, const QByteArray& value); +inline int qIntCast(double f) { return int(f); } +inline int qIntCast(float f) { return int(f); } + void qsrand(uint seed); + int qrand(); +enum QtValidLicenseForCoreModule { LicensedCore = true }; +enum QtValidLicenseForGuiModule { LicensedGui = true }; +enum QtValidLicenseForNetworkModule { LicensedNetwork = true }; +enum QtValidLicenseForOpenGLModule { LicensedOpenGL = true }; +enum QtValidLicenseForOpenVGModule { LicensedOpenVG = true }; +enum QtValidLicenseForSqlModule { LicensedSql = true }; +enum QtValidLicenseForMultimediaModule { LicensedMultimedia = true }; +enum QtValidLicenseForXmlModule { LicensedXml = true }; +enum QtValidLicenseForXmlPatternsModule { LicensedXmlPatterns = true }; +enum QtValidLicenseForHelpModule { LicensedHelp = true }; +enum QtValidLicenseForScriptModule { LicensedScript = true }; +enum QtValidLicenseForScriptToolsModule { LicensedScriptTools = true }; +enum QtValidLicenseForQt3SupportLightModule { LicensedQt3SupportLight = true }; +enum QtValidLicenseForQt3SupportModule { LicensedQt3Support = true }; +enum QtValidLicenseForSvgModule { LicensedSvg = true }; +enum QtValidLicenseForDeclarativeModule { LicensedDeclarative = true }; +enum QtValidLicenseForActiveQtModule { LicensedActiveQt = true }; +enum QtValidLicenseForTestModule { LicensedTest = true }; +enum QtValidLicenseForDBusModule { LicensedDBus = true }; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QString; +struct QLatin1Char +{ +public: + inline explicit QLatin1Char(char c) : ch(c) {} + inline char toLatin1() const { return ch; } + inline ushort unicode() const { return ushort(uchar(ch)); } +private: + char ch; +}; +class QChar { +public: + QChar(); + QChar(char c); + QChar(uchar c); + QChar(QLatin1Char ch); + QChar(uchar c, uchar r); + inline QChar(ushort rc) : ucs(rc){} + QChar(short rc); + QChar(uint rc); + QChar(int rc); + enum SpecialCharacter { + Null = 0x0000, + Nbsp = 0x00a0, + ReplacementCharacter = 0xfffd, + ObjectReplacementCharacter = 0xfffc, + ByteOrderMark = 0xfeff, + ByteOrderSwapped = 0xfffe, + ParagraphSeparator = 0x2029, + LineSeparator = 0x2028 + }; + QChar(SpecialCharacter sc); + enum Category + { + NoCategory, + Mark_NonSpacing, + Mark_SpacingCombining, + Mark_Enclosing, + Number_DecimalDigit, + Number_Letter, + Number_Other, + Separator_Space, + Separator_Line, + Separator_Paragraph, + Other_Control, + Other_Format, + Other_Surrogate, + Other_PrivateUse, + Other_NotAssigned, + Letter_Uppercase, + Letter_Lowercase, + Letter_Titlecase, + Letter_Modifier, + Letter_Other, + Punctuation_Connector, + Punctuation_Dash, + Punctuation_Open, + Punctuation_Close, + Punctuation_InitialQuote, + Punctuation_FinalQuote, + Punctuation_Other, + Symbol_Math, + Symbol_Currency, + Symbol_Modifier, + Symbol_Other, + Punctuation_Dask = Punctuation_Dash + }; + enum Direction + { + DirL, DirR, DirEN, DirES, DirET, DirAN, DirCS, DirB, DirS, DirWS, DirON, + DirLRE, DirLRO, DirAL, DirRLE, DirRLO, DirPDF, DirNSM, DirBN + }; + enum Decomposition + { + NoDecomposition, + Canonical, + Font, + NoBreak, + Initial, + Medial, + Final, + Isolated, + Circle, + Super, + Sub, + Vertical, + Wide, + Narrow, + Small, + Square, + Compat, + Fraction + }; + enum Joining + { + OtherJoining, Dual, Right, Center + }; + enum CombiningClass + { + Combining_BelowLeftAttached = 200, + Combining_BelowAttached = 202, + Combining_BelowRightAttached = 204, + Combining_LeftAttached = 208, + Combining_RightAttached = 210, + Combining_AboveLeftAttached = 212, + Combining_AboveAttached = 214, + Combining_AboveRightAttached = 216, + Combining_BelowLeft = 218, + Combining_Below = 220, + Combining_BelowRight = 222, + Combining_Left = 224, + Combining_Right = 226, + Combining_AboveLeft = 228, + Combining_Above = 230, + Combining_AboveRight = 232, + Combining_DoubleBelow = 233, + Combining_DoubleAbove = 234, + Combining_IotaSubscript = 240 + }; + enum UnicodeVersion { + Unicode_Unassigned, + Unicode_1_1, + Unicode_2_0, + Unicode_2_1_2, + Unicode_3_0, + Unicode_3_1, + Unicode_3_2, + Unicode_4_0, + Unicode_4_1, + Unicode_5_0 + }; + Category category() const; + Direction direction() const; + Joining joining() const; + bool hasMirrored() const; + unsigned char combiningClass() const; + QChar mirroredChar() const; + QString decomposition() const; + Decomposition decompositionTag() const; + int digitValue() const; + QChar toLower() const; + QChar toUpper() const; + QChar toTitleCase() const; + QChar toCaseFolded() const; + UnicodeVersion unicodeVersion() const; + char toAscii() const; + inline char toLatin1() const; + inline ushort unicode() const { return ucs; } + inline ushort &unicode() { return const_cast(ucs); } + static QChar fromAscii(char c); + static QChar fromLatin1(char c); + inline bool isNull() const { return ucs == 0; } + bool isPrint() const; + bool isPunct() const; + bool isSpace() const; + bool isMark() const; + bool isLetter() const; + bool isNumber() const; + bool isLetterOrNumber() const; + bool isDigit() const; + bool isSymbol() const; + inline bool isLower() const { return category() == Letter_Lowercase; } + inline bool isUpper() const { return category() == Letter_Uppercase; } + inline bool isTitleCase() const { return category() == Letter_Titlecase; } + inline bool isHighSurrogate() const { + return ((ucs & 0xfc00) == 0xd800); + } + inline bool isLowSurrogate() const { + return ((ucs & 0xfc00) == 0xdc00); + } + inline uchar cell() const { return uchar(ucs & 0xff); } + inline uchar row() const { return uchar((ucs>>8)&0xff); } + inline void setCell(uchar cell); + inline void setRow(uchar row); + static inline uint surrogateToUcs4(ushort high, ushort low) { + return (uint(high)<<10) + low - 0x35fdc00; + } + static inline uint surrogateToUcs4(QChar high, QChar low) { + return (uint(high.ucs)<<10) + low.ucs - 0x35fdc00; + } + static inline ushort highSurrogate(uint ucs4) { + return ushort((ucs4>>10) + 0xd7c0); + } + static inline ushort lowSurrogate(uint ucs4) { + return ushort(ucs4%0x400 + 0xdc00); + } + static Category category(uint ucs4); + static Category category(ushort ucs2); + static Direction direction(uint ucs4); + static Direction direction(ushort ucs2); + static Joining joining(uint ucs4); + static Joining joining(ushort ucs2); + static unsigned char combiningClass(uint ucs4); + static unsigned char combiningClass(ushort ucs2); + static uint mirroredChar(uint ucs4); + static ushort mirroredChar(ushort ucs2); + static Decomposition decompositionTag(uint ucs4); + static int digitValue(uint ucs4); + static int digitValue(ushort ucs2); + static uint toLower(uint ucs4); + static ushort toLower(ushort ucs2); + static uint toUpper(uint ucs4); + static ushort toUpper(ushort ucs2); + static uint toTitleCase(uint ucs4); + static ushort toTitleCase(ushort ucs2); + static uint toCaseFolded(uint ucs4); + static ushort toCaseFolded(ushort ucs2); + static UnicodeVersion unicodeVersion(uint ucs4); + static UnicodeVersion unicodeVersion(ushort ucs2); + static QString decomposition(uint ucs4); +private: + ushort ucs; +} + ; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QChar)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QChar"; } }; +inline QChar::QChar() : ucs(0) {} +inline char QChar::toLatin1() const { return ucs > 0xff ? '\0' : char(ucs); } +inline QChar QChar::fromLatin1(char c) { return QChar(ushort(uchar(c))); } +inline QChar::QChar(uchar c, uchar r) : ucs(ushort((r << 8) | c)){} +inline QChar::QChar(short rc) : ucs(ushort(rc)){} +inline QChar::QChar(uint rc) : ucs(ushort(rc & 0xffff)){} +inline QChar::QChar(int rc) : ucs(ushort(rc & 0xffff)){} +inline QChar::QChar(SpecialCharacter s) : ucs(ushort(s)) {} +inline QChar::QChar(QLatin1Char ch) : ucs(ch.unicode()) {} +inline void QChar::setCell(uchar acell) +{ ucs = ushort((ucs & 0xff00) + acell); } +inline void QChar::setRow(uchar arow) +{ ucs = ushort((ushort(arow)<<8) + (ucs&0xff)); } +inline bool operator==(QChar c1, QChar c2) { return c1.unicode() == c2.unicode(); } +inline bool operator!=(QChar c1, QChar c2) { return c1.unicode() != c2.unicode(); } +inline bool operator<=(QChar c1, QChar c2) { return c1.unicode() <= c2.unicode(); } +inline bool operator>=(QChar c1, QChar c2) { return c1.unicode() >= c2.unicode(); } +inline bool operator<(QChar c1, QChar c2) { return c1.unicode() < c2.unicode(); } +inline bool operator>(QChar c1, QChar c2) { return c1.unicode() > c2.unicode(); } + QDataStream &operator<<(QDataStream &, const QChar &); + QDataStream &operator>>(QDataStream &, QChar &); +typedef QtValidLicenseForCoreModule QtCoreModule; +class QBasicAtomicInt +{ +public: + volatile int _q_value; + inline bool operator==(int value) const + { + return _q_value == value; + } + inline bool operator!=(int value) const + { + return _q_value != value; + } + inline bool operator!() const + { + return _q_value == 0; + } + inline operator int() const + { + return _q_value; + } + inline QBasicAtomicInt &operator=(int value) + { + _q_value = value; + return *this; + } + static bool isReferenceCountingNative(); + static bool isReferenceCountingWaitFree(); + bool ref(); + bool deref(); + static bool isTestAndSetNative(); + static bool isTestAndSetWaitFree(); + bool testAndSetRelaxed(int expectedValue, int newValue); + bool testAndSetAcquire(int expectedValue, int newValue); + bool testAndSetRelease(int expectedValue, int newValue); + bool testAndSetOrdered(int expectedValue, int newValue); + static bool isFetchAndStoreNative(); + static bool isFetchAndStoreWaitFree(); + int fetchAndStoreRelaxed(int newValue); + int fetchAndStoreAcquire(int newValue); + int fetchAndStoreRelease(int newValue); + int fetchAndStoreOrdered(int newValue); + static bool isFetchAndAddNative(); + static bool isFetchAndAddWaitFree(); + int fetchAndAddRelaxed(int valueToAdd); + int fetchAndAddAcquire(int valueToAdd); + int fetchAndAddRelease(int valueToAdd); + int fetchAndAddOrdered(int valueToAdd); +}; +template +class QBasicAtomicPointer +{ +public: + T * volatile _q_value; + inline bool operator==(T *value) const + { + return _q_value == value; + } + inline bool operator!=(T *value) const + { + return !operator==(value); + } + inline bool operator!() const + { + return operator==(0); + } + inline operator T *() const + { + return _q_value; + } + inline T *operator->() const + { + return _q_value; + } + inline QBasicAtomicPointer &operator=(T *value) + { + _q_value = value; + return *this; + } + static bool isTestAndSetNative(); + static bool isTestAndSetWaitFree(); + bool testAndSetRelaxed(T *expectedValue, T *newValue); + bool testAndSetAcquire(T *expectedValue, T *newValue); + bool testAndSetRelease(T *expectedValue, T *newValue); + bool testAndSetOrdered(T *expectedValue, T *newValue); + static bool isFetchAndStoreNative(); + static bool isFetchAndStoreWaitFree(); + T *fetchAndStoreRelaxed(T *newValue); + T *fetchAndStoreAcquire(T *newValue); + T *fetchAndStoreRelease(T *newValue); + T *fetchAndStoreOrdered(T *newValue); + static bool isFetchAndAddNative(); + static bool isFetchAndAddWaitFree(); + T *fetchAndAddRelaxed(qptrdiff valueToAdd); + T *fetchAndAddAcquire(qptrdiff valueToAdd); + T *fetchAndAddRelease(qptrdiff valueToAdd); + T *fetchAndAddOrdered(qptrdiff valueToAdd); +}; +inline bool QBasicAtomicInt::isReferenceCountingNative() +{ return true; } +inline bool QBasicAtomicInt::isReferenceCountingWaitFree() +{ return true; } +inline bool QBasicAtomicInt::isTestAndSetNative() +{ return true; } +inline bool QBasicAtomicInt::isTestAndSetWaitFree() +{ return true; } +inline bool QBasicAtomicInt::isFetchAndStoreNative() +{ return true; } +inline bool QBasicAtomicInt::isFetchAndStoreWaitFree() +{ return true; } +inline bool QBasicAtomicInt::isFetchAndAddNative() +{ return true; } +inline bool QBasicAtomicInt::isFetchAndAddWaitFree() +{ return true; } +template +inline bool QBasicAtomicPointer::isTestAndSetNative() +{ return true; } +template +inline bool QBasicAtomicPointer::isTestAndSetWaitFree() +{ return true; } +template +inline bool QBasicAtomicPointer::isFetchAndStoreNative() +{ return true; } +template +inline bool QBasicAtomicPointer::isFetchAndStoreWaitFree() +{ return true; } +template +inline bool QBasicAtomicPointer::isFetchAndAddNative() +{ return true; } +template +inline bool QBasicAtomicPointer::isFetchAndAddWaitFree() +{ return true; } +inline bool QBasicAtomicInt::ref() +{ + unsigned char ret; + asm volatile("lock\n" + "incl %0\n" + "setne %1" + : "=m" (_q_value), "=qm" (ret) + : "m" (_q_value) + : "memory"); + return ret != 0; +} +inline bool QBasicAtomicInt::deref() +{ + unsigned char ret; + asm volatile("lock\n" + "decl %0\n" + "setne %1" + : "=m" (_q_value), "=qm" (ret) + : "m" (_q_value) + : "memory"); + return ret != 0; +} +inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue) +{ + unsigned char ret; + asm volatile("lock\n" + "cmpxchgl %3,%2\n" + "sete %1\n" + : "=a" (newValue), "=qm" (ret), "+m" (_q_value) + : "r" (newValue), "0" (expectedValue) + : "memory"); + return ret != 0; +} +inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue) +{ + asm volatile("xchgl %0,%1" + : "=r" (newValue), "+m" (_q_value) + : "0" (newValue) + : "memory"); + return newValue; +} +inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd) +{ + asm volatile("lock\n" + "xaddl %0,%1" + : "=r" (valueToAdd), "+m" (_q_value) + : "0" (valueToAdd) + : "memory"); + return valueToAdd; +} +template +inline bool QBasicAtomicPointer::testAndSetOrdered(T *expectedValue, T *newValue) +{ + unsigned char ret; + asm volatile("lock\n" + "cmpxchgq %3,%2\n" + "sete %1\n" + : "=a" (newValue), "=qm" (ret), "+m" (_q_value) + : "r" (newValue), "0" (expectedValue) + : "memory"); + return ret != 0; +} +template +inline T *QBasicAtomicPointer::fetchAndStoreOrdered(T *newValue) +{ + asm volatile("xchgq %0,%1" + : "=r" (newValue), "+m" (_q_value) + : "0" (newValue) + : "memory"); + return newValue; +} +template +inline T *QBasicAtomicPointer::fetchAndAddOrdered(qptrdiff valueToAdd) +{ + asm volatile("lock\n" + "xaddq %0,%1" + : "=r" (valueToAdd), "+m" (_q_value) + : "0" (valueToAdd * sizeof(T)) + : "memory"); + return reinterpret_cast(valueToAdd); +} +inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue) +{ + return testAndSetOrdered(expectedValue, newValue); +} +inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue) +{ + return testAndSetOrdered(expectedValue, newValue); +} +inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue) +{ + return testAndSetOrdered(expectedValue, newValue); +} +inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue) +{ + return fetchAndStoreOrdered(newValue); +} +inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue) +{ + return fetchAndStoreOrdered(newValue); +} +inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue) +{ + return fetchAndStoreOrdered(newValue); +} +inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd) +{ + return fetchAndAddOrdered(valueToAdd); +} +inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd) +{ + return fetchAndAddOrdered(valueToAdd); +} +inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd) +{ + return fetchAndAddOrdered(valueToAdd); +} +template +inline bool QBasicAtomicPointer::testAndSetRelaxed(T *expectedValue, T *newValue) +{ + return testAndSetOrdered(expectedValue, newValue); +} +template +inline bool QBasicAtomicPointer::testAndSetAcquire(T *expectedValue, T *newValue) +{ + return testAndSetOrdered(expectedValue, newValue); +} +template +inline bool QBasicAtomicPointer::testAndSetRelease(T *expectedValue, T *newValue) +{ + return testAndSetOrdered(expectedValue, newValue); +} +template +inline T *QBasicAtomicPointer::fetchAndStoreRelaxed(T *newValue) +{ + return fetchAndStoreOrdered(newValue); +} +template +inline T *QBasicAtomicPointer::fetchAndStoreAcquire(T *newValue) +{ + return fetchAndStoreOrdered(newValue); +} +template +inline T *QBasicAtomicPointer::fetchAndStoreRelease(T *newValue) +{ + return fetchAndStoreOrdered(newValue); +} +template +inline T *QBasicAtomicPointer::fetchAndAddRelaxed(qptrdiff valueToAdd) +{ + return fetchAndAddOrdered(valueToAdd); +} +template +inline T *QBasicAtomicPointer::fetchAndAddAcquire(qptrdiff valueToAdd) +{ + return fetchAndAddOrdered(valueToAdd); +} +template +inline T *QBasicAtomicPointer::fetchAndAddRelease(qptrdiff valueToAdd) +{ + return fetchAndAddOrdered(valueToAdd); +} +typedef QtValidLicenseForCoreModule QtCoreModule; +class QAtomicInt : public QBasicAtomicInt +{ +public: + inline QAtomicInt(int value = 0) + { + _q_value = value; + } + inline QAtomicInt(const QAtomicInt &other) + { + _q_value = other._q_value; + } + inline QAtomicInt &operator=(int value) + { + (void) QBasicAtomicInt::operator=(value); + return *this; + } + inline QAtomicInt &operator=(const QAtomicInt &other) + { + (void) QBasicAtomicInt::operator=(other); + return *this; + } +}; +template +class QAtomicPointer : public QBasicAtomicPointer +{ +public: + inline QAtomicPointer(T *value = 0) + { + QBasicAtomicPointer::_q_value = value; + } + inline QAtomicPointer(const QAtomicPointer &other) + { + QBasicAtomicPointer::_q_value = other._q_value; + } + inline QAtomicPointer &operator=(T *value) + { + (void) QBasicAtomicPointer::operator=(value); + return *this; + } + inline QAtomicPointer &operator=(const QAtomicPointer &other) + { + (void) QBasicAtomicPointer::operator=(other); + return *this; + } +}; +template +inline void qAtomicAssign(T *&d, T *x) +{ + if (d == x) + return; + x->ref.ref(); + if (!d->ref.deref()) + delete d; + d = x; +} +template +inline void qAtomicDetach(T *&d) +{ + if (d->ref == 1) + return; + T *x = d; + d = new T(*d); + if (!x->ref.deref()) + delete x; +} +typedef QtValidLicenseForCoreModule QtCoreModule; +namespace +Qt { + enum GlobalColor { + color0, + color1, + black, + white, + darkGray, + gray, + lightGray, + red, + green, + blue, + cyan, + magenta, + yellow, + darkRed, + darkGreen, + darkBlue, + darkCyan, + darkMagenta, + darkYellow, + transparent + }; + enum KeyboardModifier { + NoModifier = 0x00000000, + ShiftModifier = 0x02000000, + ControlModifier = 0x04000000, + AltModifier = 0x08000000, + MetaModifier = 0x10000000, + KeypadModifier = 0x20000000, + GroupSwitchModifier = 0x40000000, + KeyboardModifierMask = 0xfe000000 + }; + typedef QFlags KeyboardModifiers; + enum Modifier { + META = Qt::MetaModifier, + SHIFT = Qt::ShiftModifier, + CTRL = Qt::ControlModifier, + ALT = Qt::AltModifier, + MODIFIER_MASK = KeyboardModifierMask, + UNICODE_ACCEL = 0x00000000 + }; + enum MouseButton { + NoButton = 0x00000000, + LeftButton = 0x00000001, + RightButton = 0x00000002, + MidButton = 0x00000004, + XButton1 = 0x00000008, + XButton2 = 0x00000010, + MouseButtonMask = 0x000000ff + }; + typedef QFlags MouseButtons; + enum Orientation { + Horizontal = 0x1, + Vertical = 0x2 + }; + typedef QFlags Orientations; + enum FocusPolicy { + NoFocus = 0, + TabFocus = 0x1, + ClickFocus = 0x2, + StrongFocus = TabFocus | ClickFocus | 0x8, + WheelFocus = StrongFocus | 0x4 + }; + enum SortOrder { + AscendingOrder, + DescendingOrder + }; + enum TileRule { + StretchTile, + RepeatTile, + RoundTile + }; + enum AlignmentFlag { + AlignLeft = 0x0001, + AlignLeading = AlignLeft, + AlignRight = 0x0002, + AlignTrailing = AlignRight, + AlignHCenter = 0x0004, + AlignJustify = 0x0008, + AlignAbsolute = 0x0010, + AlignHorizontal_Mask = AlignLeft | AlignRight | AlignHCenter | AlignJustify | AlignAbsolute, + AlignTop = 0x0020, + AlignBottom = 0x0040, + AlignVCenter = 0x0080, + AlignVertical_Mask = AlignTop | AlignBottom | AlignVCenter, + AlignCenter = AlignVCenter | AlignHCenter + }; + typedef QFlags Alignment; + enum TextFlag { + TextSingleLine = 0x0100, + TextDontClip = 0x0200, + TextExpandTabs = 0x0400, + TextShowMnemonic = 0x0800, + TextWordWrap = 0x1000, + TextWrapAnywhere = 0x2000, + TextDontPrint = 0x4000, + TextIncludeTrailingSpaces = 0x08000000, + TextHideMnemonic = 0x8000, + TextJustificationForced = 0x10000, + TextForceLeftToRight = 0x20000, + TextForceRightToLeft = 0x40000, + TextLongestVariant = 0x80000 + }; + enum TextElideMode { + ElideLeft, + ElideRight, + ElideMiddle, + ElideNone + }; + enum WindowType { + Widget = 0x00000000, + Window = 0x00000001, + Dialog = 0x00000002 | Window, + Sheet = 0x00000004 | Window, + Drawer = 0x00000006 | Window, + Popup = 0x00000008 | Window, + Tool = 0x0000000a | Window, + ToolTip = 0x0000000c | Window, + SplashScreen = 0x0000000e | Window, + Desktop = 0x00000010 | Window, + SubWindow = 0x00000012, + WindowType_Mask = 0x000000ff, + MSWindowsFixedSizeDialogHint = 0x00000100, + MSWindowsOwnDC = 0x00000200, + X11BypassWindowManagerHint = 0x00000400, + FramelessWindowHint = 0x00000800, + WindowTitleHint = 0x00001000, + WindowSystemMenuHint = 0x00002000, + WindowMinimizeButtonHint = 0x00004000, + WindowMaximizeButtonHint = 0x00008000, + WindowMinMaxButtonsHint = WindowMinimizeButtonHint | WindowMaximizeButtonHint, + WindowContextHelpButtonHint = 0x00010000, + WindowShadeButtonHint = 0x00020000, + WindowStaysOnTopHint = 0x00040000, + CustomizeWindowHint = 0x02000000, + WindowStaysOnBottomHint = 0x04000000, + WindowCloseButtonHint = 0x08000000, + MacWindowToolBarButtonHint = 0x10000000, + BypassGraphicsProxyWidget = 0x20000000, + WindowOkButtonHint = 0x00080000, + WindowCancelButtonHint = 0x00100000 + }; + typedef QFlags WindowFlags; + enum WindowState { + WindowNoState = 0x00000000, + WindowMinimized = 0x00000001, + WindowMaximized = 0x00000002, + WindowFullScreen = 0x00000004, + WindowActive = 0x00000008 + }; + typedef QFlags WindowStates; + enum WidgetAttribute { + WA_Disabled = 0, + WA_UnderMouse = 1, + WA_MouseTracking = 2, + WA_ContentsPropagated = 3, + WA_OpaquePaintEvent = 4, + WA_NoBackground = WA_OpaquePaintEvent, + WA_StaticContents = 5, + WA_LaidOut = 7, + WA_PaintOnScreen = 8, + WA_NoSystemBackground = 9, + WA_UpdatesDisabled = 10, + WA_Mapped = 11, + WA_MacNoClickThrough = 12, + WA_PaintOutsidePaintEvent = 13, + WA_InputMethodEnabled = 14, + WA_WState_Visible = 15, + WA_WState_Hidden = 16, + WA_ForceDisabled = 32, + WA_KeyCompression = 33, + WA_PendingMoveEvent = 34, + WA_PendingResizeEvent = 35, + WA_SetPalette = 36, + WA_SetFont = 37, + WA_SetCursor = 38, + WA_NoChildEventsFromChildren = 39, + WA_WindowModified = 41, + WA_Resized = 42, + WA_Moved = 43, + WA_PendingUpdate = 44, + WA_InvalidSize = 45, + WA_MacBrushedMetal = 46, + WA_MacMetalStyle = WA_MacBrushedMetal, + WA_CustomWhatsThis = 47, + WA_LayoutOnEntireRect = 48, + WA_OutsideWSRange = 49, + WA_GrabbedShortcut = 50, + WA_TransparentForMouseEvents = 51, + WA_PaintUnclipped = 52, + WA_SetWindowIcon = 53, + WA_NoMouseReplay = 54, + WA_DeleteOnClose = 55, + WA_RightToLeft = 56, + WA_SetLayoutDirection = 57, + WA_NoChildEventsForParent = 58, + WA_ForceUpdatesDisabled = 59, + WA_WState_Created = 60, + WA_WState_CompressKeys = 61, + WA_WState_InPaintEvent = 62, + WA_WState_Reparented = 63, + WA_WState_ConfigPending = 64, + WA_WState_Polished = 66, + WA_WState_DND = 67, + WA_WState_OwnSizePolicy = 68, + WA_WState_ExplicitShowHide = 69, + WA_ShowModal = 70, + WA_MouseNoMask = 71, + WA_GroupLeader = 72, + WA_NoMousePropagation = 73, + WA_Hover = 74, + WA_InputMethodTransparent = 75, + WA_QuitOnClose = 76, + WA_KeyboardFocusChange = 77, + WA_AcceptDrops = 78, + WA_DropSiteRegistered = 79, + WA_ForceAcceptDrops = WA_DropSiteRegistered, + WA_WindowPropagation = 80, + WA_NoX11EventCompression = 81, + WA_TintedBackground = 82, + WA_X11OpenGLOverlay = 83, + WA_AlwaysShowToolTips = 84, + WA_MacOpaqueSizeGrip = 85, + WA_SetStyle = 86, + WA_SetLocale = 87, + WA_MacShowFocusRect = 88, + WA_MacNormalSize = 89, + WA_MacSmallSize = 90, + WA_MacMiniSize = 91, + WA_LayoutUsesWidgetRect = 92, + WA_StyledBackground = 93, + WA_MSWindowsUseDirect3D = 94, + WA_CanHostQMdiSubWindowTitleBar = 95, + WA_MacAlwaysShowToolWindow = 96, + WA_StyleSheet = 97, + WA_ShowWithoutActivating = 98, + WA_X11BypassTransientForHint = 99, + WA_NativeWindow = 100, + WA_DontCreateNativeAncestors = 101, + WA_MacVariableSize = 102, + WA_DontShowOnScreen = 103, + WA_X11NetWmWindowTypeDesktop = 104, + WA_X11NetWmWindowTypeDock = 105, + WA_X11NetWmWindowTypeToolBar = 106, + WA_X11NetWmWindowTypeMenu = 107, + WA_X11NetWmWindowTypeUtility = 108, + WA_X11NetWmWindowTypeSplash = 109, + WA_X11NetWmWindowTypeDialog = 110, + WA_X11NetWmWindowTypeDropDownMenu = 111, + WA_X11NetWmWindowTypePopupMenu = 112, + WA_X11NetWmWindowTypeToolTip = 113, + WA_X11NetWmWindowTypeNotification = 114, + WA_X11NetWmWindowTypeCombo = 115, + WA_X11NetWmWindowTypeDND = 116, + WA_MacFrameworkScaled = 117, + WA_SetWindowModality = 118, + WA_WState_WindowOpacitySet = 119, + WA_TranslucentBackground = 120, + WA_AcceptTouchEvents = 121, + WA_WState_AcceptedTouchBeginEvent = 122, + WA_TouchPadAcceptSingleTouchEvents = 123, + WA_MergeSoftkeys = 124, + WA_MergeSoftkeysRecursively = 125, + WA_AttributeCount + }; + enum ApplicationAttribute + { + AA_ImmediateWidgetCreation = 0, + AA_MSWindowsUseDirect3DByDefault = 1, + AA_DontShowIconsInMenus = 2, + AA_NativeWindows = 3, + AA_DontCreateNativeWidgetSiblings = 4, + AA_MacPluginApplication = 5, + AA_DontUseNativeMenuBar = 6, + AA_MacDontSwapCtrlAndMeta = 7, + AA_S60DontConstructApplicationPanes = 8, + AA_AttributeCount + }; + enum ImageConversionFlag { + ColorMode_Mask = 0x00000003, + AutoColor = 0x00000000, + ColorOnly = 0x00000003, + MonoOnly = 0x00000002, + AlphaDither_Mask = 0x0000000c, + ThresholdAlphaDither = 0x00000000, + OrderedAlphaDither = 0x00000004, + DiffuseAlphaDither = 0x00000008, + NoAlpha = 0x0000000c, + Dither_Mask = 0x00000030, + DiffuseDither = 0x00000000, + OrderedDither = 0x00000010, + ThresholdDither = 0x00000020, + DitherMode_Mask = 0x000000c0, + AutoDither = 0x00000000, + PreferDither = 0x00000040, + AvoidDither = 0x00000080, + NoOpaqueDetection = 0x00000100 + }; + typedef QFlags ImageConversionFlags; + enum BGMode { + TransparentMode, + OpaqueMode + }; + enum Key { + Key_Escape = 0x01000000, + Key_Tab = 0x01000001, + Key_Backtab = 0x01000002, + Key_Backspace = 0x01000003, + Key_Return = 0x01000004, + Key_Enter = 0x01000005, + Key_Insert = 0x01000006, + Key_Delete = 0x01000007, + Key_Pause = 0x01000008, + Key_Print = 0x01000009, + Key_SysReq = 0x0100000a, + Key_Clear = 0x0100000b, + Key_Home = 0x01000010, + Key_End = 0x01000011, + Key_Left = 0x01000012, + Key_Up = 0x01000013, + Key_Right = 0x01000014, + Key_Down = 0x01000015, + Key_PageUp = 0x01000016, + Key_PageDown = 0x01000017, + Key_Shift = 0x01000020, + Key_Control = 0x01000021, + Key_Meta = 0x01000022, + Key_Alt = 0x01000023, + Key_CapsLock = 0x01000024, + Key_NumLock = 0x01000025, + Key_ScrollLock = 0x01000026, + Key_F1 = 0x01000030, + Key_F2 = 0x01000031, + Key_F3 = 0x01000032, + Key_F4 = 0x01000033, + Key_F5 = 0x01000034, + Key_F6 = 0x01000035, + Key_F7 = 0x01000036, + Key_F8 = 0x01000037, + Key_F9 = 0x01000038, + Key_F10 = 0x01000039, + Key_F11 = 0x0100003a, + Key_F12 = 0x0100003b, + Key_F13 = 0x0100003c, + Key_F14 = 0x0100003d, + Key_F15 = 0x0100003e, + Key_F16 = 0x0100003f, + Key_F17 = 0x01000040, + Key_F18 = 0x01000041, + Key_F19 = 0x01000042, + Key_F20 = 0x01000043, + Key_F21 = 0x01000044, + Key_F22 = 0x01000045, + Key_F23 = 0x01000046, + Key_F24 = 0x01000047, + Key_F25 = 0x01000048, + Key_F26 = 0x01000049, + Key_F27 = 0x0100004a, + Key_F28 = 0x0100004b, + Key_F29 = 0x0100004c, + Key_F30 = 0x0100004d, + Key_F31 = 0x0100004e, + Key_F32 = 0x0100004f, + Key_F33 = 0x01000050, + Key_F34 = 0x01000051, + Key_F35 = 0x01000052, + Key_Super_L = 0x01000053, + Key_Super_R = 0x01000054, + Key_Menu = 0x01000055, + Key_Hyper_L = 0x01000056, + Key_Hyper_R = 0x01000057, + Key_Help = 0x01000058, + Key_Direction_L = 0x01000059, + Key_Direction_R = 0x01000060, + Key_Space = 0x20, + Key_Any = Key_Space, + Key_Exclam = 0x21, + Key_QuoteDbl = 0x22, + Key_NumberSign = 0x23, + Key_Dollar = 0x24, + Key_Percent = 0x25, + Key_Ampersand = 0x26, + Key_Apostrophe = 0x27, + Key_ParenLeft = 0x28, + Key_ParenRight = 0x29, + Key_Asterisk = 0x2a, + Key_Plus = 0x2b, + Key_Comma = 0x2c, + Key_Minus = 0x2d, + Key_Period = 0x2e, + Key_Slash = 0x2f, + Key_0 = 0x30, + Key_1 = 0x31, + Key_2 = 0x32, + Key_3 = 0x33, + Key_4 = 0x34, + Key_5 = 0x35, + Key_6 = 0x36, + Key_7 = 0x37, + Key_8 = 0x38, + Key_9 = 0x39, + Key_Colon = 0x3a, + Key_Semicolon = 0x3b, + Key_Less = 0x3c, + Key_Equal = 0x3d, + Key_Greater = 0x3e, + Key_Question = 0x3f, + Key_At = 0x40, + Key_A = 0x41, + Key_B = 0x42, + Key_C = 0x43, + Key_D = 0x44, + Key_E = 0x45, + Key_F = 0x46, + Key_G = 0x47, + Key_H = 0x48, + Key_I = 0x49, + Key_J = 0x4a, + Key_K = 0x4b, + Key_L = 0x4c, + Key_M = 0x4d, + Key_N = 0x4e, + Key_O = 0x4f, + Key_P = 0x50, + Key_Q = 0x51, + Key_R = 0x52, + Key_S = 0x53, + Key_T = 0x54, + Key_U = 0x55, + Key_V = 0x56, + Key_W = 0x57, + Key_X = 0x58, + Key_Y = 0x59, + Key_Z = 0x5a, + Key_BracketLeft = 0x5b, + Key_Backslash = 0x5c, + Key_BracketRight = 0x5d, + Key_AsciiCircum = 0x5e, + Key_Underscore = 0x5f, + Key_QuoteLeft = 0x60, + Key_BraceLeft = 0x7b, + Key_Bar = 0x7c, + Key_BraceRight = 0x7d, + Key_AsciiTilde = 0x7e, + Key_nobreakspace = 0x0a0, + Key_exclamdown = 0x0a1, + Key_cent = 0x0a2, + Key_sterling = 0x0a3, + Key_currency = 0x0a4, + Key_yen = 0x0a5, + Key_brokenbar = 0x0a6, + Key_section = 0x0a7, + Key_diaeresis = 0x0a8, + Key_copyright = 0x0a9, + Key_ordfeminine = 0x0aa, + Key_guillemotleft = 0x0ab, + Key_notsign = 0x0ac, + Key_hyphen = 0x0ad, + Key_registered = 0x0ae, + Key_macron = 0x0af, + Key_degree = 0x0b0, + Key_plusminus = 0x0b1, + Key_twosuperior = 0x0b2, + Key_threesuperior = 0x0b3, + Key_acute = 0x0b4, + Key_mu = 0x0b5, + Key_paragraph = 0x0b6, + Key_periodcentered = 0x0b7, + Key_cedilla = 0x0b8, + Key_onesuperior = 0x0b9, + Key_masculine = 0x0ba, + Key_guillemotright = 0x0bb, + Key_onequarter = 0x0bc, + Key_onehalf = 0x0bd, + Key_threequarters = 0x0be, + Key_questiondown = 0x0bf, + Key_Agrave = 0x0c0, + Key_Aacute = 0x0c1, + Key_Acircumflex = 0x0c2, + Key_Atilde = 0x0c3, + Key_Adiaeresis = 0x0c4, + Key_Aring = 0x0c5, + Key_AE = 0x0c6, + Key_Ccedilla = 0x0c7, + Key_Egrave = 0x0c8, + Key_Eacute = 0x0c9, + Key_Ecircumflex = 0x0ca, + Key_Ediaeresis = 0x0cb, + Key_Igrave = 0x0cc, + Key_Iacute = 0x0cd, + Key_Icircumflex = 0x0ce, + Key_Idiaeresis = 0x0cf, + Key_ETH = 0x0d0, + Key_Ntilde = 0x0d1, + Key_Ograve = 0x0d2, + Key_Oacute = 0x0d3, + Key_Ocircumflex = 0x0d4, + Key_Otilde = 0x0d5, + Key_Odiaeresis = 0x0d6, + Key_multiply = 0x0d7, + Key_Ooblique = 0x0d8, + Key_Ugrave = 0x0d9, + Key_Uacute = 0x0da, + Key_Ucircumflex = 0x0db, + Key_Udiaeresis = 0x0dc, + Key_Yacute = 0x0dd, + Key_THORN = 0x0de, + Key_ssharp = 0x0df, + Key_division = 0x0f7, + Key_ydiaeresis = 0x0ff, + Key_AltGr = 0x01001103, + Key_Multi_key = 0x01001120, + Key_Codeinput = 0x01001137, + Key_SingleCandidate = 0x0100113c, + Key_MultipleCandidate = 0x0100113d, + Key_PreviousCandidate = 0x0100113e, + Key_Mode_switch = 0x0100117e, + Key_Kanji = 0x01001121, + Key_Muhenkan = 0x01001122, + Key_Henkan = 0x01001123, + Key_Romaji = 0x01001124, + Key_Hiragana = 0x01001125, + Key_Katakana = 0x01001126, + Key_Hiragana_Katakana = 0x01001127, + Key_Zenkaku = 0x01001128, + Key_Hankaku = 0x01001129, + Key_Zenkaku_Hankaku = 0x0100112a, + Key_Touroku = 0x0100112b, + Key_Massyo = 0x0100112c, + Key_Kana_Lock = 0x0100112d, + Key_Kana_Shift = 0x0100112e, + Key_Eisu_Shift = 0x0100112f, + Key_Eisu_toggle = 0x01001130, + Key_Hangul = 0x01001131, + Key_Hangul_Start = 0x01001132, + Key_Hangul_End = 0x01001133, + Key_Hangul_Hanja = 0x01001134, + Key_Hangul_Jamo = 0x01001135, + Key_Hangul_Romaja = 0x01001136, + Key_Hangul_Jeonja = 0x01001138, + Key_Hangul_Banja = 0x01001139, + Key_Hangul_PreHanja = 0x0100113a, + Key_Hangul_PostHanja = 0x0100113b, + Key_Hangul_Special = 0x0100113f, + Key_Dead_Grave = 0x01001250, + Key_Dead_Acute = 0x01001251, + Key_Dead_Circumflex = 0x01001252, + Key_Dead_Tilde = 0x01001253, + Key_Dead_Macron = 0x01001254, + Key_Dead_Breve = 0x01001255, + Key_Dead_Abovedot = 0x01001256, + Key_Dead_Diaeresis = 0x01001257, + Key_Dead_Abovering = 0x01001258, + Key_Dead_Doubleacute = 0x01001259, + Key_Dead_Caron = 0x0100125a, + Key_Dead_Cedilla = 0x0100125b, + Key_Dead_Ogonek = 0x0100125c, + Key_Dead_Iota = 0x0100125d, + Key_Dead_Voiced_Sound = 0x0100125e, + Key_Dead_Semivoiced_Sound = 0x0100125f, + Key_Dead_Belowdot = 0x01001260, + Key_Dead_Hook = 0x01001261, + Key_Dead_Horn = 0x01001262, + Key_Back = 0x01000061, + Key_Forward = 0x01000062, + Key_Stop = 0x01000063, + Key_Refresh = 0x01000064, + Key_VolumeDown = 0x01000070, + Key_VolumeMute = 0x01000071, + Key_VolumeUp = 0x01000072, + Key_BassBoost = 0x01000073, + Key_BassUp = 0x01000074, + Key_BassDown = 0x01000075, + Key_TrebleUp = 0x01000076, + Key_TrebleDown = 0x01000077, + Key_MediaPlay = 0x01000080, + Key_MediaStop = 0x01000081, + Key_MediaPrevious = 0x01000082, + Key_MediaNext = 0x01000083, + Key_MediaRecord = 0x01000084, + Key_HomePage = 0x01000090, + Key_Favorites = 0x01000091, + Key_Search = 0x01000092, + Key_Standby = 0x01000093, + Key_OpenUrl = 0x01000094, + Key_LaunchMail = 0x010000a0, + Key_LaunchMedia = 0x010000a1, + Key_Launch0 = 0x010000a2, + Key_Launch1 = 0x010000a3, + Key_Launch2 = 0x010000a4, + Key_Launch3 = 0x010000a5, + Key_Launch4 = 0x010000a6, + Key_Launch5 = 0x010000a7, + Key_Launch6 = 0x010000a8, + Key_Launch7 = 0x010000a9, + Key_Launch8 = 0x010000aa, + Key_Launch9 = 0x010000ab, + Key_LaunchA = 0x010000ac, + Key_LaunchB = 0x010000ad, + Key_LaunchC = 0x010000ae, + Key_LaunchD = 0x010000af, + Key_LaunchE = 0x010000b0, + Key_LaunchF = 0x010000b1, + Key_MonBrightnessUp = 0x010000b2, + Key_MonBrightnessDown = 0x010000b3, + Key_KeyboardLightOnOff = 0x010000b4, + Key_KeyboardBrightnessUp = 0x010000b5, + Key_KeyboardBrightnessDown = 0x010000b6, + Key_PowerOff = 0x010000b7, + Key_WakeUp = 0x010000b8, + Key_Eject = 0x010000b9, + Key_ScreenSaver = 0x010000ba, + Key_WWW = 0x010000bb, + Key_Memo = 0x010000bc, + Key_LightBulb = 0x010000bd, + Key_Shop = 0x010000be, + Key_History = 0x010000bf, + Key_AddFavorite = 0x010000c0, + Key_HotLinks = 0x010000c1, + Key_BrightnessAdjust = 0x010000c2, + Key_Finance = 0x010000c3, + Key_Community = 0x010000c4, + Key_AudioRewind = 0x010000c5, + Key_BackForward = 0x010000c6, + Key_ApplicationLeft = 0x010000c7, + Key_ApplicationRight = 0x010000c8, + Key_Book = 0x010000c9, + Key_CD = 0x010000ca, + Key_Calculator = 0x010000cb, + Key_ToDoList = 0x010000cc, + Key_ClearGrab = 0x010000cd, + Key_Close = 0x010000ce, + Key_Copy = 0x010000cf, + Key_Cut = 0x010000d0, + Key_Display = 0x010000d1, + Key_DOS = 0x010000d2, + Key_Documents = 0x010000d3, + Key_Excel = 0x010000d4, + Key_Explorer = 0x010000d5, + Key_Game = 0x010000d6, + Key_Go = 0x010000d7, + Key_iTouch = 0x010000d8, + Key_LogOff = 0x010000d9, + Key_Market = 0x010000da, + Key_Meeting = 0x010000db, + Key_MenuKB = 0x010000dc, + Key_MenuPB = 0x010000dd, + Key_MySites = 0x010000de, + Key_News = 0x010000df, + Key_OfficeHome = 0x010000e0, + Key_Option = 0x010000e1, + Key_Paste = 0x010000e2, + Key_Phone = 0x010000e3, + Key_Calendar = 0x010000e4, + Key_Reply = 0x010000e5, + Key_Reload = 0x010000e6, + Key_RotateWindows = 0x010000e7, + Key_RotationPB = 0x010000e8, + Key_RotationKB = 0x010000e9, + Key_Save = 0x010000ea, + Key_Send = 0x010000eb, + Key_Spell = 0x010000ec, + Key_SplitScreen = 0x010000ed, + Key_Support = 0x010000ee, + Key_TaskPane = 0x010000ef, + Key_Terminal = 0x010000f0, + Key_Tools = 0x010000f1, + Key_Travel = 0x010000f2, + Key_Video = 0x010000f3, + Key_Word = 0x010000f4, + Key_Xfer = 0x010000f5, + Key_ZoomIn = 0x010000f6, + Key_ZoomOut = 0x010000f7, + Key_Away = 0x010000f8, + Key_Messenger = 0x010000f9, + Key_WebCam = 0x010000fa, + Key_MailForward = 0x010000fb, + Key_Pictures = 0x010000fc, + Key_Music = 0x010000fd, + Key_Battery = 0x010000fe, + Key_Bluetooth = 0x010000ff, + Key_WLAN = 0x01000100, + Key_UWB = 0x01000101, + Key_AudioForward = 0x01000102, + Key_AudioRepeat = 0x01000103, + Key_AudioRandomPlay = 0x01000104, + Key_Subtitle = 0x01000105, + Key_AudioCycleTrack = 0x01000106, + Key_Time = 0x01000107, + Key_Hibernate = 0x01000108, + Key_View = 0x01000109, + Key_TopMenu = 0x0100010a, + Key_PowerDown = 0x0100010b, + Key_Suspend = 0x0100010c, + Key_ContrastAdjust = 0x0100010d, + Key_MediaLast = 0x0100ffff, + Key_Select = 0x01010000, + Key_Yes = 0x01010001, + Key_No = 0x01010002, + Key_Cancel = 0x01020001, + Key_Printer = 0x01020002, + Key_Execute = 0x01020003, + Key_Sleep = 0x01020004, + Key_Play = 0x01020005, + Key_Zoom = 0x01020006, + Key_Context1 = 0x01100000, + Key_Context2 = 0x01100001, + Key_Context3 = 0x01100002, + Key_Context4 = 0x01100003, + Key_Call = 0x01100004, + Key_Hangup = 0x01100005, + Key_Flip = 0x01100006, + Key_unknown = 0x01ffffff + }; + enum ArrowType { + NoArrow, + UpArrow, + DownArrow, + LeftArrow, + RightArrow + }; + enum PenStyle { + NoPen, + SolidLine, + DashLine, + DotLine, + DashDotLine, + DashDotDotLine, + CustomDashLine + , MPenStyle = 0x0f + }; + enum PenCapStyle { + FlatCap = 0x00, + SquareCap = 0x10, + RoundCap = 0x20, + MPenCapStyle = 0x30 + }; + enum PenJoinStyle { + MiterJoin = 0x00, + BevelJoin = 0x40, + RoundJoin = 0x80, + SvgMiterJoin = 0x100, + MPenJoinStyle = 0x1c0 + }; + enum BrushStyle { + NoBrush, + SolidPattern, + Dense1Pattern, + Dense2Pattern, + Dense3Pattern, + Dense4Pattern, + Dense5Pattern, + Dense6Pattern, + Dense7Pattern, + HorPattern, + VerPattern, + CrossPattern, + BDiagPattern, + FDiagPattern, + DiagCrossPattern, + LinearGradientPattern, + RadialGradientPattern, + ConicalGradientPattern, + TexturePattern = 24 + }; + enum SizeMode { + AbsoluteSize, + RelativeSize + }; + enum UIEffect { + UI_General, + UI_AnimateMenu, + UI_FadeMenu, + UI_AnimateCombo, + UI_AnimateTooltip, + UI_FadeTooltip, + UI_AnimateToolBox + }; + enum CursorShape { + ArrowCursor, + UpArrowCursor, + CrossCursor, + WaitCursor, + IBeamCursor, + SizeVerCursor, + SizeHorCursor, + SizeBDiagCursor, + SizeFDiagCursor, + SizeAllCursor, + BlankCursor, + SplitVCursor, + SplitHCursor, + PointingHandCursor, + ForbiddenCursor, + WhatsThisCursor, + BusyCursor, + OpenHandCursor, + ClosedHandCursor, + LastCursor = ClosedHandCursor, + BitmapCursor = 24, + CustomCursor = 25 + }; + enum TextFormat { + PlainText, + RichText, + AutoText, + LogText + }; + enum AspectRatioMode { + IgnoreAspectRatio, + KeepAspectRatio, + KeepAspectRatioByExpanding + }; + enum AnchorAttribute { + AnchorName, + AnchorHref + }; + enum DockWidgetArea { + LeftDockWidgetArea = 0x1, + RightDockWidgetArea = 0x2, + TopDockWidgetArea = 0x4, + BottomDockWidgetArea = 0x8, + DockWidgetArea_Mask = 0xf, + AllDockWidgetAreas = DockWidgetArea_Mask, + NoDockWidgetArea = 0 + }; + enum DockWidgetAreaSizes { + NDockWidgetAreas = 4 + }; + typedef QFlags DockWidgetAreas; + enum ToolBarArea { + LeftToolBarArea = 0x1, + RightToolBarArea = 0x2, + TopToolBarArea = 0x4, + BottomToolBarArea = 0x8, + ToolBarArea_Mask = 0xf, + AllToolBarAreas = ToolBarArea_Mask, + NoToolBarArea = 0 + }; + enum ToolBarAreaSizes { + NToolBarAreas = 4 + }; + typedef QFlags ToolBarAreas; + enum DateFormat { + TextDate, + ISODate, + SystemLocaleDate, + LocalDate = SystemLocaleDate, + LocaleDate, + SystemLocaleShortDate, + SystemLocaleLongDate, + DefaultLocaleShortDate, + DefaultLocaleLongDate + }; + enum TimeSpec { + LocalTime, + UTC, + OffsetFromUTC + }; + enum DayOfWeek { + Monday = 1, + Tuesday = 2, + Wednesday = 3, + Thursday = 4, + Friday = 5, + Saturday = 6, + Sunday = 7 + }; + enum ScrollBarPolicy { + ScrollBarAsNeeded, + ScrollBarAlwaysOff, + ScrollBarAlwaysOn + }; + enum CaseSensitivity { + CaseInsensitive, + CaseSensitive + }; + enum Corner { + TopLeftCorner = 0x00000, + TopRightCorner = 0x00001, + BottomLeftCorner = 0x00002, + BottomRightCorner = 0x00003 + }; + enum ConnectionType { + AutoConnection, + DirectConnection, + QueuedConnection, + AutoCompatConnection, + BlockingQueuedConnection, + UniqueConnection = 0x80 + }; + enum ShortcutContext { + WidgetShortcut, + WindowShortcut, + ApplicationShortcut, + WidgetWithChildrenShortcut + }; + enum FillRule { + OddEvenFill, + WindingFill + }; + enum MaskMode { + MaskInColor, + MaskOutColor + }; + enum ClipOperation { + NoClip, + ReplaceClip, + IntersectClip, + UniteClip + }; + enum ItemSelectionMode { + ContainsItemShape = 0x0, + IntersectsItemShape = 0x1, + ContainsItemBoundingRect = 0x2, + IntersectsItemBoundingRect = 0x3 + }; + enum TransformationMode { + FastTransformation, + SmoothTransformation + }; + enum Axis { + XAxis, + YAxis, + ZAxis + }; + enum FocusReason { + MouseFocusReason, + TabFocusReason, + BacktabFocusReason, + ActiveWindowFocusReason, + PopupFocusReason, + ShortcutFocusReason, + MenuBarFocusReason, + OtherFocusReason, + NoFocusReason + }; + enum ContextMenuPolicy { + NoContextMenu, + DefaultContextMenu, + ActionsContextMenu, + CustomContextMenu, + PreventContextMenu + }; + enum InputMethodQuery { + ImMicroFocus, + ImFont, + ImCursorPosition, + ImSurroundingText, + ImCurrentSelection, + ImMaximumTextLength, + ImAnchorPosition + }; + enum InputMethodHint { + ImhNone = 0x0, + ImhHiddenText = 0x1, + ImhNoAutoUppercase = 0x2, + ImhPreferNumbers = 0x4, + ImhPreferUppercase = 0x8, + ImhPreferLowercase = 0x10, + ImhNoPredictiveText = 0x20, + ImhDigitsOnly = 0x10000, + ImhFormattedNumbersOnly = 0x20000, + ImhUppercaseOnly = 0x40000, + ImhLowercaseOnly = 0x80000, + ImhDialableCharactersOnly = 0x100000, + ImhEmailCharactersOnly = 0x200000, + ImhUrlCharactersOnly = 0x400000, + ImhExclusiveInputMask = 0xffff0000 + }; + typedef QFlags InputMethodHints; + enum ToolButtonStyle { + ToolButtonIconOnly, + ToolButtonTextOnly, + ToolButtonTextBesideIcon, + ToolButtonTextUnderIcon, + ToolButtonFollowStyle + }; + enum LayoutDirection { + LeftToRight, + RightToLeft + }; + enum AnchorPoint { + AnchorLeft = 0, + AnchorHorizontalCenter, + AnchorRight, + AnchorTop, + AnchorVerticalCenter, + AnchorBottom + }; + enum DropAction { + CopyAction = 0x1, + MoveAction = 0x2, + LinkAction = 0x4, + ActionMask = 0xff, + TargetMoveAction = 0x8002, + IgnoreAction = 0x0 + }; + typedef QFlags DropActions; + enum CheckState { + Unchecked, + PartiallyChecked, + Checked + }; + enum ItemDataRole { + DisplayRole = 0, + DecorationRole = 1, + EditRole = 2, + ToolTipRole = 3, + StatusTipRole = 4, + WhatsThisRole = 5, + FontRole = 6, + TextAlignmentRole = 7, + BackgroundColorRole = 8, + BackgroundRole = 8, + TextColorRole = 9, + ForegroundRole = 9, + CheckStateRole = 10, + AccessibleTextRole = 11, + AccessibleDescriptionRole = 12, + SizeHintRole = 13, + DisplayPropertyRole = 27, + DecorationPropertyRole = 28, + ToolTipPropertyRole = 29, + StatusTipPropertyRole = 30, + WhatsThisPropertyRole = 31, + UserRole = 32 + }; + enum ItemFlag { + NoItemFlags = 0, + ItemIsSelectable = 1, + ItemIsEditable = 2, + ItemIsDragEnabled = 4, + ItemIsDropEnabled = 8, + ItemIsUserCheckable = 16, + ItemIsEnabled = 32, + ItemIsTristate = 64 + }; + typedef QFlags ItemFlags; + enum MatchFlag { + MatchExactly = 0, + MatchContains = 1, + MatchStartsWith = 2, + MatchEndsWith = 3, + MatchRegExp = 4, + MatchWildcard = 5, + MatchFixedString = 8, + MatchCaseSensitive = 16, + MatchWrap = 32, + MatchRecursive = 64 + }; + typedef QFlags MatchFlags; + typedef unsigned long HANDLE; + typedef WindowFlags WFlags; + enum WindowModality { + NonModal, + WindowModal, + ApplicationModal + }; + enum TextInteractionFlag { + NoTextInteraction = 0, + TextSelectableByMouse = 1, + TextSelectableByKeyboard = 2, + LinksAccessibleByMouse = 4, + LinksAccessibleByKeyboard = 8, + TextEditable = 16, + TextEditorInteraction = TextSelectableByMouse | TextSelectableByKeyboard | TextEditable, + TextBrowserInteraction = TextSelectableByMouse | LinksAccessibleByMouse | LinksAccessibleByKeyboard + }; + typedef QFlags TextInteractionFlags; + enum EventPriority { + HighEventPriority = 1, + NormalEventPriority = 0, + LowEventPriority = -1 + }; + enum SizeHint { + MinimumSize, + PreferredSize, + MaximumSize, + MinimumDescent, + NSizeHints + }; + enum WindowFrameSection { + NoSection, + LeftSection, + TopLeftSection, + TopSection, + TopRightSection, + RightSection, + BottomRightSection, + BottomSection, + BottomLeftSection, + TitleBarArea + }; + enum Initialization { + Uninitialized + }; + enum CoordinateSystem { + DeviceCoordinates, + LogicalCoordinates + }; + enum TouchPointState { + TouchPointPressed = 0x01, + TouchPointMoved = 0x02, + TouchPointStationary = 0x04, + TouchPointReleased = 0x08, + TouchPointStateMask = 0x0f, + TouchPointPrimary = 0x10 + }; + typedef QFlags TouchPointStates; + enum GestureState + { + NoGesture, + GestureStarted = 1, + GestureUpdated = 2, + GestureFinished = 3, + GestureCanceled = 4 + }; + enum GestureType + { + TapGesture = 1, + TapAndHoldGesture = 2, + PanGesture = 3, + PinchGesture = 4, + SwipeGesture = 5, + CustomGesture = 0x0100, + LastGestureType = ~0u + }; + enum GestureFlag + { + DontStartGestureOnChildren = 0x01, + ReceivePartialGestures = 0x02 + }; + typedef QFlags GestureFlags; + enum NavigationMode + { + NavigationModeNone, + NavigationModeKeypadTabOrder, + NavigationModeKeypadDirectional, + NavigationModeCursorAuto, + NavigationModeCursorForceVisible + }; +} +inline QFlags operator|(Qt::MouseButtons::enum_type f1, Qt::MouseButtons::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::MouseButtons::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::MouseButtons::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::Orientations::enum_type f1, Qt::Orientations::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::Orientations::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::Orientations::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::KeyboardModifiers::enum_type f1, Qt::KeyboardModifiers::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::KeyboardModifiers::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::KeyboardModifiers::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::WindowFlags::enum_type f1, Qt::WindowFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::WindowFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::WindowFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::Alignment::enum_type f1, Qt::Alignment::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::Alignment::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::Alignment::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::ImageConversionFlags::enum_type f1, Qt::ImageConversionFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::ImageConversionFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::ImageConversionFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::DockWidgetAreas::enum_type f1, Qt::DockWidgetAreas::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::DockWidgetAreas::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::DockWidgetAreas::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::ToolBarAreas::enum_type f1, Qt::ToolBarAreas::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::ToolBarAreas::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::ToolBarAreas::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::WindowStates::enum_type f1, Qt::WindowStates::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::WindowStates::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::WindowStates::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::DropActions::enum_type f1, Qt::DropActions::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::DropActions::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::DropActions::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::ItemFlags::enum_type f1, Qt::ItemFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::ItemFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::ItemFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::MatchFlags::enum_type f1, Qt::MatchFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::MatchFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::MatchFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::TextInteractionFlags::enum_type f1, Qt::TextInteractionFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::TextInteractionFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::TextInteractionFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::InputMethodHints::enum_type f1, Qt::InputMethodHints::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::InputMethodHints::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::InputMethodHints::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::TouchPointStates::enum_type f1, Qt::TouchPointStates::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::TouchPointStates::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::TouchPointStates::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QFlags operator|(Qt::GestureFlags::enum_type f1, Qt::GestureFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::GestureFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::GestureFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +typedef bool (*qInternalCallback)(void **); +class QInternal { +public: + enum PaintDeviceFlags { + UnknownDevice = 0x00, + Widget = 0x01, + Pixmap = 0x02, + Image = 0x03, + Printer = 0x04, + Picture = 0x05, + Pbuffer = 0x06, + FramebufferObject = 0x07, + CustomRaster = 0x08, + MacQuartz = 0x09, + PaintBuffer = 0x0a, + OpenGL = 0x0b + }; + enum RelayoutType { + RelayoutNormal, + RelayoutDragging, + RelayoutDropped + }; + enum Callback { + ConnectCallback, + DisconnectCallback, + AdoptCurrentThread, + EventNotifyCallback, + LastCallback + }; + enum InternalFunction { + CreateThreadForAdoption, + RefAdoptedThread, + DerefAdoptedThread, + SetCurrentThreadToMainThread, + SetQObjectSender, + GetQObjectSender, + ResetQObjectSender, + LastInternalFunction + }; + enum DockPosition { + LeftDock, + RightDock, + TopDock, + BottomDock, + DockCount + }; + static bool registerCallback(Callback, qInternalCallback); + static bool unregisterCallback(Callback, qInternalCallback); + static bool activateCallbacks(Callback, void **); + static bool callFunction(InternalFunction func, void **); +}; +extern "C" { +extern void *memcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void *memmove (void *__dest, __const void *__src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, + int __c, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1))); +extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern "C++" +{ +extern void *memchr (void *__s, int __c, size_t __n) + throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const void *memchr (__const void *__s, int __c, size_t __n) + throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +memchr (void *__s, int __c, size_t __n) throw () +{ + return __builtin_memchr (__s, __c, __n); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const void * +memchr (__const void *__s, int __c, size_t __n) throw () +{ + return __builtin_memchr (__s, __c, __n); +} +} +extern "C++" void *rawmemchr (void *__s, int __c) + throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" __const void *rawmemchr (__const void *__s, int __c) + throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" void *memrchr (void *__s, int __c, size_t __n) + throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" __const void *memrchr (__const void *__s, int __c, size_t __n) + throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *strncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *strcat (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *strncat (char *__restrict __dest, __const char *__restrict __src, + size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int strcmp (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern int strcoll (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern size_t strxfrm (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (2))); +typedef struct __locale_struct +{ + struct locale_data *__locales[13]; + const unsigned short int *__ctype_b; + const int *__ctype_tolower; + const int *__ctype_toupper; + const char *__names[13]; +} *__locale_t; +typedef __locale_t locale_t; +extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); +extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, + __locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4))); +extern char *strdup (__const char *__s) + throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); +extern char *strndup (__const char *__string, size_t __n) + throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); +extern "C++" +{ +extern char *strchr (char *__s, int __c) + throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *strchr (__const char *__s, int __c) + throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strchr (char *__s, int __c) throw () +{ + return __builtin_strchr (__s, __c); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +strchr (__const char *__s, int __c) throw () +{ + return __builtin_strchr (__s, __c); +} +} +extern "C++" +{ +extern char *strrchr (char *__s, int __c) + throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *strrchr (__const char *__s, int __c) + throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strrchr (char *__s, int __c) throw () +{ + return __builtin_strrchr (__s, __c); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +strrchr (__const char *__s, int __c) throw () +{ + return __builtin_strrchr (__s, __c); +} +} +extern "C++" char *strchrnul (char *__s, int __c) + throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" __const char *strchrnul (__const char *__s, int __c) + throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern size_t strcspn (__const char *__s, __const char *__reject) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern size_t strspn (__const char *__s, __const char *__accept) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern "C++" +{ +extern char *strpbrk (char *__s, __const char *__accept) + throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern __const char *strpbrk (__const char *__s, __const char *__accept) + throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strpbrk (char *__s, __const char *__accept) throw () +{ + return __builtin_strpbrk (__s, __accept); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +strpbrk (__const char *__s, __const char *__accept) throw () +{ + return __builtin_strpbrk (__s, __accept); +} +} +extern "C++" +{ +extern char *strstr (char *__haystack, __const char *__needle) + throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern __const char *strstr (__const char *__haystack, + __const char *__needle) + throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strstr (char *__haystack, __const char *__needle) throw () +{ + return __builtin_strstr (__haystack, __needle); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +strstr (__const char *__haystack, __const char *__needle) throw () +{ + return __builtin_strstr (__haystack, __needle); +} +} +extern char *strtok (char *__restrict __s, __const char *__restrict __delim) + throw () __attribute__ ((__nonnull__ (2))); +extern char *__strtok_r (char *__restrict __s, + __const char *__restrict __delim, + char **__restrict __save_ptr) + throw () __attribute__ ((__nonnull__ (2, 3))); +extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, + char **__restrict __save_ptr) + throw () __attribute__ ((__nonnull__ (2, 3))); +extern "C++" char *strcasestr (char *__haystack, __const char *__needle) + throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern "C++" __const char *strcasestr (__const char *__haystack, + __const char *__needle) + throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern void *memmem (__const void *__haystack, size_t __haystacklen, + __const void *__needle, size_t __needlelen) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); +extern void *__mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void *mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern size_t strlen (__const char *__s) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern size_t strnlen (__const char *__string, size_t __maxlen) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern char *strerror (int __errnum) throw (); +extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) + throw () __attribute__ ((__nonnull__ (2))); +extern char *strerror_l (int __errnum, __locale_t __l) throw (); +extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); +extern void bcopy (__const void *__src, void *__dest, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); +extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern "C++" +{ +extern char *index (char *__s, int __c) + throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *index (__const char *__s, int __c) + throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +index (char *__s, int __c) throw () +{ + return __builtin_index (__s, __c); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +index (__const char *__s, int __c) throw () +{ + return __builtin_index (__s, __c); +} +} +extern "C++" +{ +extern char *rindex (char *__s, int __c) + throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *rindex (__const char *__s, int __c) + throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +rindex (char *__s, int __c) throw () +{ + return __builtin_rindex (__s, __c); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +rindex (__const char *__s, int __c) throw () +{ + return __builtin_rindex (__s, __c); +} +} +extern int ffs (int __i) throw () __attribute__ ((__const__)); +extern int ffsl (long int __l) throw () __attribute__ ((__const__)); +__extension__ extern int ffsll (long long int __ll) + throw () __attribute__ ((__const__)); +extern int strcasecmp (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern int strcasecmp_l (__const char *__s1, __const char *__s2, + __locale_t __loc) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); +extern int strncasecmp_l (__const char *__s1, __const char *__s2, + size_t __n, __locale_t __loc) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); +extern char *strsep (char **__restrict __stringp, + __const char *__restrict __delim) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *strsignal (int __sig) throw (); +extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *__stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int strverscmp (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1))); +extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); +extern "C++" char *basename (char *__filename) + throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); +extern "C++" __const char *basename (__const char *__filename) + throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); +extern void __warn_memset_zero_len (void) __attribute__((__warning__ ("memset used with constant zero length parameter; this could be due to transposed parameters"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) throw () +{ + return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +memmove (void *__restrict __dest, __const void *__restrict __src, size_t __len) throw () +{ + return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) throw () +{ + return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +memset (void *__dest, int __ch, size_t __len) throw () +{ + if (__builtin_constant_p (__len) && __len == 0 + && (!__builtin_constant_p (__ch) || __ch != 0)) + { + __warn_memset_zero_len (); + return __dest; + } + return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void +bcopy (__const void *__restrict __src, void *__restrict __dest, size_t __len) throw () +{ + (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void +bzero (void *__dest, size_t __len) throw () +{ + (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strcpy (char *__restrict __dest, __const char *__restrict __src) throw () +{ + return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +stpcpy (char *__restrict __dest, __const char *__restrict __src) throw () +{ + return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __len) throw () +{ + return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); +} +extern char *__stpncpy_chk (char *__dest, __const char *__src, size_t __n, + size_t __destlen) throw (); +extern char *__stpncpy_alias (char *__dest, __const char *__src, size_t __n) throw () __asm__ ("" "stpncpy") + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +stpncpy (char *__dest, __const char *__src, size_t __n) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1 + && (!__builtin_constant_p (__n) || __n <= __builtin_object_size (__dest, 2 > 1))) + return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1)); + return __stpncpy_alias (__dest, __src, __n); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strcat (char *__restrict __dest, __const char *__restrict __src) throw () +{ + return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strncat (char *__restrict __dest, __const char *__restrict __src, size_t __len) throw () +{ + return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); +} +} +typedef __builtin_va_list __gnuc_va_list; +typedef __gnuc_va_list va_list; +typedef QtValidLicenseForCoreModule QtCoreModule; + char *qstrdup(const char *); +inline uint qstrlen(const char *str) +{ return str ? uint(strlen(str)) : 0; } +inline uint qstrnlen(const char *str, uint maxlen) +{ + uint length = 0; + if (str) { + while (length < maxlen && *str++) + length++; + } + return length; +} + char *qstrcpy(char *dst, const char *src); + char *qstrncpy(char *dst, const char *src, uint len); + int qstrcmp(const char *str1, const char *str2); + int qstrcmp(const QByteArray &str1, const QByteArray &str2); + int qstrcmp(const QByteArray &str1, const char *str2); +static inline int qstrcmp(const char *str1, const QByteArray &str2) +{ return -qstrcmp(str2, str1); } +inline int qstrncmp(const char *str1, const char *str2, uint len) +{ + return (str1 && str2) ? strncmp(str1, str2, len) + : (str1 ? 1 : (str2 ? -1 : 0)); +} + int qstricmp(const char *, const char *); + int qstrnicmp(const char *, const char *, uint len); + int qvsnprintf(char *str, size_t n, const char *fmt, va_list ap); + int qsnprintf(char *str, size_t n, const char *fmt, ...); + quint16 qChecksum(const char *s, uint len); +class QByteRef; +class QString; +class QDataStream; +template class QList; +class QByteArray +{ +private: + struct Data { + QBasicAtomicInt ref; + int alloc, size; + char *data; + char array[1]; + }; +public: + inline QByteArray(); + QByteArray(const char *); + QByteArray(const char *, int size); + QByteArray(int size, char c); + QByteArray(int size, Qt::Initialization); + inline QByteArray(const QByteArray &); + inline ~QByteArray(); + QByteArray &operator=(const QByteArray &); + QByteArray &operator=(const char *str); + inline int size() const; + bool isEmpty() const; + void resize(int size); + QByteArray &fill(char c, int size = -1); + int capacity() const; + void reserve(int size); + void squeeze(); + operator const char *() const; + operator const void *() const; + char *data(); + const char *data() const; + inline const char *constData() const; + inline void detach(); + bool isDetached() const; + void clear(); + char at(int i) const; + char operator[](int i) const; + char operator[](uint i) const; + QByteRef operator[](int i); + QByteRef operator[](uint i); + int indexOf(char c, int from = 0) const; + int indexOf(const char *c, int from = 0) const; + int indexOf(const QByteArray &a, int from = 0) const; + int lastIndexOf(char c, int from = -1) const; + int lastIndexOf(const char *c, int from = -1) const; + int lastIndexOf(const QByteArray &a, int from = -1) const; + QBool contains(char c) const; + QBool contains(const char *a) const; + QBool contains(const QByteArray &a) const; + int count(char c) const; + int count(const char *a) const; + int count(const QByteArray &a) const; + QByteArray left(int len) const; + QByteArray right(int len) const; + QByteArray mid(int index, int len = -1) const; + bool startsWith(const QByteArray &a) const; + bool startsWith(char c) const; + bool startsWith(const char *c) const; + bool endsWith(const QByteArray &a) const; + bool endsWith(char c) const; + bool endsWith(const char *c) const; + void truncate(int pos); + void chop(int n); + QByteArray toLower() const; + QByteArray toUpper() const; + QByteArray trimmed() const; + QByteArray simplified() const; + QByteArray leftJustified(int width, char fill = ' ', bool truncate = false) const; + QByteArray rightJustified(int width, char fill = ' ', bool truncate = false) const; + QByteArray &prepend(char c); + QByteArray &prepend(const char *s); + QByteArray &prepend(const char *s, int len); + QByteArray &prepend(const QByteArray &a); + QByteArray &append(char c); + QByteArray &append(const char *s); + QByteArray &append(const char *s, int len); + QByteArray &append(const QByteArray &a); + QByteArray &insert(int i, char c); + QByteArray &insert(int i, const char *s); + QByteArray &insert(int i, const char *s, int len); + QByteArray &insert(int i, const QByteArray &a); + QByteArray &remove(int index, int len); + QByteArray &replace(int index, int len, const char *s); + QByteArray &replace(int index, int len, const QByteArray &s); + QByteArray &replace(char before, const char *after); + QByteArray &replace(char before, const QByteArray &after); + QByteArray &replace(const char *before, const char *after); + QByteArray &replace(const char *before, int bsize, const char *after, int asize); + QByteArray &replace(const QByteArray &before, const QByteArray &after); + QByteArray &replace(const QByteArray &before, const char *after); + QByteArray &replace(const char *before, const QByteArray &after); + QByteArray &replace(char before, char after); + QByteArray &operator+=(char c); + QByteArray &operator+=(const char *s); + QByteArray &operator+=(const QByteArray &a); + QList split(char sep) const; + QByteArray repeated(int times) const; + QByteArray &append(const QString &s); + QByteArray &insert(int i, const QString &s); + QByteArray &replace(const QString &before, const char *after); + QByteArray &replace(char c, const QString &after); + QByteArray &replace(const QString &before, const QByteArray &after); + QByteArray &operator+=(const QString &s); + int indexOf(const QString &s, int from = 0) const; + int lastIndexOf(const QString &s, int from = -1) const; + inline bool operator==(const QString &s2) const; + inline bool operator!=(const QString &s2) const; + inline bool operator<(const QString &s2) const; + inline bool operator>(const QString &s2) const; + inline bool operator<=(const QString &s2) const; + inline bool operator>=(const QString &s2) const; + short toShort(bool *ok = 0, int base = 10) const; + ushort toUShort(bool *ok = 0, int base = 10) const; + int toInt(bool *ok = 0, int base = 10) const; + uint toUInt(bool *ok = 0, int base = 10) const; + long toLong(bool *ok = 0, int base = 10) const; + ulong toULong(bool *ok = 0, int base = 10) const; + qlonglong toLongLong(bool *ok = 0, int base = 10) const; + qulonglong toULongLong(bool *ok = 0, int base = 10) const; + float toFloat(bool *ok = 0) const; + double toDouble(bool *ok = 0) const; + QByteArray toBase64() const; + QByteArray toHex() const; + QByteArray toPercentEncoding(const QByteArray &exclude = QByteArray(), + const QByteArray &include = QByteArray(), + char percent = '%') const; + QByteArray &setNum(short, int base = 10); + QByteArray &setNum(ushort, int base = 10); + QByteArray &setNum(int, int base = 10); + QByteArray &setNum(uint, int base = 10); + QByteArray &setNum(qlonglong, int base = 10); + QByteArray &setNum(qulonglong, int base = 10); + QByteArray &setNum(float, char f = 'g', int prec = 6); + QByteArray &setNum(double, char f = 'g', int prec = 6); + static QByteArray number(int, int base = 10); + static QByteArray number(uint, int base = 10); + static QByteArray number(qlonglong, int base = 10); + static QByteArray number(qulonglong, int base = 10); + static QByteArray number(double, char f = 'g', int prec = 6); + static QByteArray fromRawData(const char *, int size); + static QByteArray fromBase64(const QByteArray &base64); + static QByteArray fromHex(const QByteArray &hexEncoded); + static QByteArray fromPercentEncoding(const QByteArray &pctEncoded, char percent = '%'); + typedef char *iterator; + typedef const char *const_iterator; + typedef iterator Iterator; + typedef const_iterator ConstIterator; + iterator begin(); + const_iterator begin() const; + const_iterator constBegin() const; + iterator end(); + const_iterator end() const; + const_iterator constEnd() const; + typedef const char & const_reference; + typedef char & reference; + typedef char value_type; + void push_back(char c); + void push_back(const char *c); + void push_back(const QByteArray &a); + void push_front(char c); + void push_front(const char *c); + void push_front(const QByteArray &a); + inline int count() const { return d->size; } + int length() const { return d->size; } + bool isNull() const; +private: + operator QNoImplicitBoolCast() const; + static Data shared_null; + static Data shared_empty; + Data *d; + QByteArray(Data *dd, int , int ) : d(dd) {} + void realloc(int alloc); + void expand(int i); + QByteArray nulTerminated() const; + friend class QByteRef; + friend class QString; + friend QByteArray qUncompress(const uchar *data, int nbytes); +public: + typedef Data * DataPtr; + inline DataPtr &data_ptr() { return d; } +}; +inline QByteArray::QByteArray(): d(&shared_null) { d->ref.ref(); } +inline QByteArray::~QByteArray() { if (!d->ref.deref()) qFree(d); } +inline int QByteArray::size() const +{ return d->size; } +inline char QByteArray::at(int i) const +{ ((!(i >= 0 && i < size())) ? qt_assert("i >= 0 && i < size()","/usr/include/qt4/QtCore/qbytearray.h",395) : qt_noop()); return d->data[i]; } +inline char QByteArray::operator[](int i) const +{ ((!(i >= 0 && i < size())) ? qt_assert("i >= 0 && i < size()","/usr/include/qt4/QtCore/qbytearray.h",397) : qt_noop()); return d->data[i]; } +inline char QByteArray::operator[](uint i) const +{ ((!(i < uint(size()))) ? qt_assert("i < uint(size())","/usr/include/qt4/QtCore/qbytearray.h",399) : qt_noop()); return d->data[i]; } +inline bool QByteArray::isEmpty() const +{ return d->size == 0; } +inline QByteArray::operator const char *() const +{ return d->data; } +inline QByteArray::operator const void *() const +{ return d->data; } +inline char *QByteArray::data() +{ detach(); return d->data; } +inline const char *QByteArray::data() const +{ return d->data; } +inline const char *QByteArray::constData() const +{ return d->data; } +inline void QByteArray::detach() +{ if (d->ref != 1 || d->data != d->array) realloc(d->size); } +inline bool QByteArray::isDetached() const +{ return d->ref == 1; } +inline QByteArray::QByteArray(const QByteArray &a) : d(a.d) +{ d->ref.ref(); } +inline int QByteArray::capacity() const +{ return d->alloc; } +inline void QByteArray::reserve(int asize) +{ if (d->ref != 1 || asize > d->alloc) realloc(asize); } +inline void QByteArray::squeeze() +{ if (d->size < d->alloc) realloc(d->size); } +class QByteRef { + QByteArray &a; + int i; + inline QByteRef(QByteArray &array, int idx) + : a(array),i(idx) {} + friend class QByteArray; +public: + inline operator char() const + { return i < a.d->size ? a.d->data[i] : char(0); } + inline QByteRef &operator=(char c) + { if (i >= a.d->size) a.expand(i); else a.detach(); + a.d->data[i] = c; return *this; } + inline QByteRef &operator=(const QByteRef &c) + { if (i >= a.d->size) a.expand(i); else a.detach(); + a.d->data[i] = c.a.d->data[c.i]; return *this; } + inline bool operator==(char c) const + { return a.d->data[i] == c; } + inline bool operator!=(char c) const + { return a.d->data[i] != c; } + inline bool operator>(char c) const + { return a.d->data[i] > c; } + inline bool operator>=(char c) const + { return a.d->data[i] >= c; } + inline bool operator<(char c) const + { return a.d->data[i] < c; } + inline bool operator<=(char c) const + { return a.d->data[i] <= c; } +}; +inline QByteRef QByteArray::operator[](int i) +{ ((!(i >= 0)) ? qt_assert("i >= 0","/usr/include/qt4/QtCore/qbytearray.h",471) : qt_noop()); return QByteRef(*this, i); } +inline QByteRef QByteArray::operator[](uint i) +{ return QByteRef(*this, i); } +inline QByteArray::iterator QByteArray::begin() +{ detach(); return d->data; } +inline QByteArray::const_iterator QByteArray::begin() const +{ return d->data; } +inline QByteArray::const_iterator QByteArray::constBegin() const +{ return d->data; } +inline QByteArray::iterator QByteArray::end() +{ detach(); return d->data + d->size; } +inline QByteArray::const_iterator QByteArray::end() const +{ return d->data + d->size; } +inline QByteArray::const_iterator QByteArray::constEnd() const +{ return d->data + d->size; } +inline QByteArray &QByteArray::operator+=(char c) +{ return append(c); } +inline QByteArray &QByteArray::operator+=(const char *s) +{ return append(s); } +inline QByteArray &QByteArray::operator+=(const QByteArray &a) +{ return append(a); } +inline void QByteArray::push_back(char c) +{ append(c); } +inline void QByteArray::push_back(const char *c) +{ append(c); } +inline void QByteArray::push_back(const QByteArray &a) +{ append(a); } +inline void QByteArray::push_front(char c) +{ prepend(c); } +inline void QByteArray::push_front(const char *c) +{ prepend(c); } +inline void QByteArray::push_front(const QByteArray &a) +{ prepend(a); } +inline QBool QByteArray::contains(const QByteArray &a) const +{ return QBool(indexOf(a) != -1); } +inline QBool QByteArray::contains(char c) const +{ return QBool(indexOf(c) != -1); } +inline bool operator==(const QByteArray &a1, const QByteArray &a2) +{ return (a1.size() == a2.size()) && (memcmp(a1.constData(), a2.constData(), a1.size())==0); } +inline bool operator==(const QByteArray &a1, const char *a2) +{ return a2 ? qstrcmp(a1,a2) == 0 : a1.isEmpty(); } +inline bool operator==(const char *a1, const QByteArray &a2) +{ return a1 ? qstrcmp(a1,a2) == 0 : a2.isEmpty(); } +inline bool operator!=(const QByteArray &a1, const QByteArray &a2) +{ return !(a1==a2); } +inline bool operator!=(const QByteArray &a1, const char *a2) +{ return a2 ? qstrcmp(a1,a2) != 0 : !a1.isEmpty(); } +inline bool operator!=(const char *a1, const QByteArray &a2) +{ return a1 ? qstrcmp(a1,a2) != 0 : !a2.isEmpty(); } +inline bool operator<(const QByteArray &a1, const QByteArray &a2) +{ return qstrcmp(a1, a2) < 0; } + inline bool operator<(const QByteArray &a1, const char *a2) +{ return qstrcmp(a1, a2) < 0; } +inline bool operator<(const char *a1, const QByteArray &a2) +{ return qstrcmp(a1, a2) < 0; } +inline bool operator<=(const QByteArray &a1, const QByteArray &a2) +{ return qstrcmp(a1, a2) <= 0; } +inline bool operator<=(const QByteArray &a1, const char *a2) +{ return qstrcmp(a1, a2) <= 0; } +inline bool operator<=(const char *a1, const QByteArray &a2) +{ return qstrcmp(a1, a2) <= 0; } +inline bool operator>(const QByteArray &a1, const QByteArray &a2) +{ return qstrcmp(a1, a2) > 0; } +inline bool operator>(const QByteArray &a1, const char *a2) +{ return qstrcmp(a1, a2) > 0; } +inline bool operator>(const char *a1, const QByteArray &a2) +{ return qstrcmp(a1, a2) > 0; } +inline bool operator>=(const QByteArray &a1, const QByteArray &a2) +{ return qstrcmp(a1, a2) >= 0; } +inline bool operator>=(const QByteArray &a1, const char *a2) +{ return qstrcmp(a1, a2) >= 0; } +inline bool operator>=(const char *a1, const QByteArray &a2) +{ return qstrcmp(a1, a2) >= 0; } +inline const QByteArray operator+(const QByteArray &a1, const QByteArray &a2) +{ return QByteArray(a1) += a2; } +inline const QByteArray operator+(const QByteArray &a1, const char *a2) +{ return QByteArray(a1) += a2; } +inline const QByteArray operator+(const QByteArray &a1, char a2) +{ return QByteArray(a1) += a2; } +inline const QByteArray operator+(const char *a1, const QByteArray &a2) +{ return QByteArray(a1) += a2; } +inline const QByteArray operator+(char a1, const QByteArray &a2) +{ return QByteArray(&a1, 1) += a2; } +inline QBool QByteArray::contains(const char *c) const +{ return QBool(indexOf(c) != -1); } +inline QByteArray &QByteArray::replace(char before, const char *c) +{ return replace(&before, 1, c, qstrlen(c)); } +inline QByteArray &QByteArray::replace(const QByteArray &before, const char *c) +{ return replace(before.constData(), before.size(), c, qstrlen(c)); } +inline QByteArray &QByteArray::replace(const char *before, const char *after) +{ return replace(before, qstrlen(before), after, qstrlen(after)); } +inline QByteArray &QByteArray::setNum(short n, int base) +{ return setNum(qlonglong(n), base); } +inline QByteArray &QByteArray::setNum(ushort n, int base) +{ return setNum(qulonglong(n), base); } +inline QByteArray &QByteArray::setNum(int n, int base) +{ return setNum(qlonglong(n), base); } +inline QByteArray &QByteArray::setNum(uint n, int base) +{ return setNum(qulonglong(n), base); } +inline QByteArray &QByteArray::setNum(float n, char f, int prec) +{ return setNum(double(n),f,prec); } + QDataStream &operator<<(QDataStream &, const QByteArray &); + QDataStream &operator>>(QDataStream &, QByteArray &); + QByteArray qCompress(const uchar* data, int nbytes, int compressionLevel = -1); + QByteArray qUncompress(const uchar* data, int nbytes); +inline QByteArray qCompress(const QByteArray& data, int compressionLevel = -1) +{ return qCompress(reinterpret_cast(data.constData()), data.size(), compressionLevel); } +inline QByteArray qUncompress(const QByteArray& data) +{ return qUncompress(reinterpret_cast(data.constData()), data.size()); } +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QByteArray)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QByteArray"; } }; +template <> inline bool qIsDetached(QByteArray &t) { return t.isDetached(); } template <> inline void qSwap(QByteArray &value1, QByteArray &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } + + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + class allocator; + template + struct char_traits; + template, + typename _Alloc = allocator<_CharT> > + class basic_string; + template<> struct char_traits; + typedef basic_string string; + template<> struct char_traits; + typedef basic_string wstring; +} + + +namespace std __attribute__ ((__visibility__ ("default"))) { + using ::ptrdiff_t; + using ::size_t; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + void + __throw_bad_exception(void) __attribute__((__noreturn__)); + void + __throw_bad_alloc(void) __attribute__((__noreturn__)); + void + __throw_bad_cast(void) __attribute__((__noreturn__)); + void + __throw_bad_typeid(void) __attribute__((__noreturn__)); + void + __throw_logic_error(const char*) __attribute__((__noreturn__)); + void + __throw_domain_error(const char*) __attribute__((__noreturn__)); + void + __throw_invalid_argument(const char*) __attribute__((__noreturn__)); + void + __throw_length_error(const char*) __attribute__((__noreturn__)); + void + __throw_out_of_range(const char*) __attribute__((__noreturn__)); + void + __throw_runtime_error(const char*) __attribute__((__noreturn__)); + void + __throw_range_error(const char*) __attribute__((__noreturn__)); + void + __throw_overflow_error(const char*) __attribute__((__noreturn__)); + void + __throw_underflow_error(const char*) __attribute__((__noreturn__)); + void + __throw_ios_failure(const char*) __attribute__((__noreturn__)); + void + __throw_system_error(int) __attribute__((__noreturn__)); + void + __throw_future_error(int) __attribute__((__noreturn__)); + void + __throw_bad_function_call() __attribute__((__noreturn__)); +} + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + template + class __normal_iterator; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + struct __true_type { }; + struct __false_type { }; + template + struct __truth_type + { typedef __false_type __type; }; + template<> + struct __truth_type + { typedef __true_type __type; }; + template + struct __traitor + { + enum { __value = bool(_Sp::__value) || bool(_Tp::__value) }; + typedef typename __truth_type<__value>::__type __type; + }; + template + struct __are_same + { + enum { __value = 0 }; + typedef __false_type __type; + }; + template + struct __are_same<_Tp, _Tp> + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template + struct __is_void + { + enum { __value = 0 }; + typedef __false_type __type; + }; + template<> + struct __is_void + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template + struct __is_integer + { + enum { __value = 0 }; + typedef __false_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template + struct __is_floating + { + enum { __value = 0 }; + typedef __false_type __type; + }; + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template + struct __is_pointer + { + enum { __value = 0 }; + typedef __false_type __type; + }; + template + struct __is_pointer<_Tp*> + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template + struct __is_normal_iterator + { + enum { __value = 0 }; + typedef __false_type __type; + }; + template + struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator, + _Container> > + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template + struct __is_arithmetic + : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > + { }; + template + struct __is_fundamental + : public __traitor<__is_void<_Tp>, __is_arithmetic<_Tp> > + { }; + template + struct __is_scalar + : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > + { }; + template + struct __is_char + { + enum { __value = 0 }; + typedef __false_type __type; + }; + template<> + struct __is_char + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_char + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template + struct __is_byte + { + enum { __value = 0 }; + typedef __false_type __type; + }; + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template + struct __is_move_iterator + { + enum { __value = 0 }; + typedef __false_type __type; + }; +} + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + template + struct __enable_if + { }; + template + struct __enable_if + { typedef _Tp __type; }; + template + struct __conditional_type + { typedef _Iftrue __type; }; + template + struct __conditional_type + { typedef _Iffalse __type; }; + template + struct __add_unsigned + { + private: + typedef __enable_if::__value, _Tp> __if_type; + public: + typedef typename __if_type::__type __type; + }; + template<> + struct __add_unsigned + { typedef unsigned char __type; }; + template<> + struct __add_unsigned + { typedef unsigned char __type; }; + template<> + struct __add_unsigned + { typedef unsigned short __type; }; + template<> + struct __add_unsigned + { typedef unsigned int __type; }; + template<> + struct __add_unsigned + { typedef unsigned long __type; }; + template<> + struct __add_unsigned + { typedef unsigned long long __type; }; + template<> + struct __add_unsigned; + template<> + struct __add_unsigned; + template + struct __remove_unsigned + { + private: + typedef __enable_if::__value, _Tp> __if_type; + public: + typedef typename __if_type::__type __type; + }; + template<> + struct __remove_unsigned + { typedef signed char __type; }; + template<> + struct __remove_unsigned + { typedef signed char __type; }; + template<> + struct __remove_unsigned + { typedef short __type; }; + template<> + struct __remove_unsigned + { typedef int __type; }; + template<> + struct __remove_unsigned + { typedef long __type; }; + template<> + struct __remove_unsigned + { typedef long long __type; }; + template<> + struct __remove_unsigned; + template<> + struct __remove_unsigned; + template + inline bool + __is_null_pointer(_Type* __ptr) + { return __ptr == 0; } + template + inline bool + __is_null_pointer(_Type) + { return false; } + template::__value> + struct __promote + { typedef double __type; }; + template + struct __promote<_Tp, false> + { typedef _Tp __type; }; + template + struct __promote_2 + { + private: + typedef typename __promote<_Tp>::__type __type1; + typedef typename __promote<_Up>::__type __type2; + public: + typedef __typeof__(__type1() + __type2()) __type; + }; + template + struct __promote_3 + { + private: + typedef typename __promote<_Tp>::__type __type1; + typedef typename __promote<_Up>::__type __type2; + typedef typename __promote<_Vp>::__type __type3; + public: + typedef __typeof__(__type1() + __type2() + __type3()) __type; + }; + template + struct __promote_4 + { + private: + typedef typename __promote<_Tp>::__type __type1; + typedef typename __promote<_Up>::__type __type2; + typedef typename __promote<_Vp>::__type __type3; + typedef typename __promote<_Wp>::__type __type4; + public: + typedef __typeof__(__type1() + __type2() + __type3() + __type4()) __type; + }; +} + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + template + struct __numeric_traits_integer + { + static const _Value __min = (((_Value)(-1) < 0) ? (_Value)1 << (sizeof(_Value) * 8 - ((_Value)(-1) < 0)) : (_Value)0); + static const _Value __max = (((_Value)(-1) < 0) ? (((((_Value)1 << ((sizeof(_Value) * 8 - ((_Value)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(_Value)0); + static const bool __is_signed = ((_Value)(-1) < 0); + static const int __digits = (sizeof(_Value) * 8 - ((_Value)(-1) < 0)); + }; + template + const _Value __numeric_traits_integer<_Value>::__min; + template + const _Value __numeric_traits_integer<_Value>::__max; + template + const bool __numeric_traits_integer<_Value>::__is_signed; + template + const int __numeric_traits_integer<_Value>::__digits; + template + struct __numeric_traits_floating + { + static const int __max_digits10 = (2 + (std::__are_same<_Value, float>::__value ? 24 : std::__are_same<_Value, double>::__value ? 53 : 64) * 3010 / 10000); + static const bool __is_signed = true; + static const int __digits10 = (std::__are_same<_Value, float>::__value ? 6 : std::__are_same<_Value, double>::__value ? 15 : 18); + static const int __max_exponent10 = (std::__are_same<_Value, float>::__value ? 38 : std::__are_same<_Value, double>::__value ? 308 : 4932); + }; + template + const int __numeric_traits_floating<_Value>::__max_digits10; + template + const bool __numeric_traits_floating<_Value>::__is_signed; + template + const int __numeric_traits_floating<_Value>::__digits10; + template + const int __numeric_traits_floating<_Value>::__max_exponent10; + template + struct __numeric_traits + : public __conditional_type::__value, + __numeric_traits_integer<_Value>, + __numeric_traits_floating<_Value> >::__type + { }; +} + + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + inline void + swap(_Tp& __a, _Tp& __b) + { + + _Tp __tmp = (__a); + __a = (__b); + __b = (__tmp); + } + template + inline void + swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) + { + for (size_t __n = 0; __n < _Nm; ++__n) + swap(__a[__n], __b[__n]); + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + struct pair + { + typedef _T1 first_type; + typedef _T2 second_type; + _T1 first; + _T2 second; + pair() + : first(), second() { } + pair(const _T1& __a, const _T2& __b) + : first(__a), second(__b) { } + template + pair(const pair<_U1, _U2>& __p) + : first(__p.first), + second(__p.second) { } + }; + template + inline bool + operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __x.first == __y.first && __x.second == __y.second; } + template + inline bool + operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __x.first < __y.first + || (!(__y.first < __x.first) && __x.second < __y.second); } + template + inline bool + operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __y < __x; } + template + inline bool + operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return !(__x < __y); } + template + inline pair<_T1, _T2> + make_pair(_T1 __x, _T2 __y) + { return pair<_T1, _T2>(__x, __y); } +} + + +namespace std __attribute__ ((__visibility__ ("default"))) { + struct input_iterator_tag { }; + struct output_iterator_tag { }; + struct forward_iterator_tag : public input_iterator_tag { }; + struct bidirectional_iterator_tag : public forward_iterator_tag { }; + struct random_access_iterator_tag : public bidirectional_iterator_tag { }; + template + struct iterator + { + typedef _Category iterator_category; + typedef _Tp value_type; + typedef _Distance difference_type; + typedef _Pointer pointer; + typedef _Reference reference; + }; + template + struct iterator_traits + { + typedef typename _Iterator::iterator_category iterator_category; + typedef typename _Iterator::value_type value_type; + typedef typename _Iterator::difference_type difference_type; + typedef typename _Iterator::pointer pointer; + typedef typename _Iterator::reference reference; + }; + template + struct iterator_traits<_Tp*> + { + typedef random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef _Tp& reference; + }; + template + struct iterator_traits + { + typedef random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef ptrdiff_t difference_type; + typedef const _Tp* pointer; + typedef const _Tp& reference; + }; + template + inline typename iterator_traits<_Iter>::iterator_category + __iterator_category(const _Iter&) + { return typename iterator_traits<_Iter>::iterator_category(); } +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + inline typename iterator_traits<_InputIterator>::difference_type + __distance(_InputIterator __first, _InputIterator __last, + input_iterator_tag) + { + + typename iterator_traits<_InputIterator>::difference_type __n = 0; + while (__first != __last) + { + ++__first; + ++__n; + } + return __n; + } + template + inline typename iterator_traits<_RandomAccessIterator>::difference_type + __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, + random_access_iterator_tag) + { + + return __last - __first; + } + template + inline typename iterator_traits<_InputIterator>::difference_type + distance(_InputIterator __first, _InputIterator __last) + { + return std::__distance(__first, __last, + std::__iterator_category(__first)); + } + template + inline void + __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) + { + + while (__n--) + ++__i; + } + template + inline void + __advance(_BidirectionalIterator& __i, _Distance __n, + bidirectional_iterator_tag) + { + + if (__n > 0) + while (__n--) + ++__i; + else + while (__n++) + --__i; + } + template + inline void + __advance(_RandomAccessIterator& __i, _Distance __n, + random_access_iterator_tag) + { + + __i += __n; + } + template + inline void + advance(_InputIterator& __i, _Distance __n) + { + typename iterator_traits<_InputIterator>::difference_type __d = __n; + std::__advance(__i, __d, std::__iterator_category(__i)); + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + class reverse_iterator + : public iterator::iterator_category, + typename iterator_traits<_Iterator>::value_type, + typename iterator_traits<_Iterator>::difference_type, + typename iterator_traits<_Iterator>::pointer, + typename iterator_traits<_Iterator>::reference> + { + public: + _Iterator current; + typedef iterator_traits<_Iterator> __traits_type; + public: + typedef _Iterator iterator_type; + typedef typename __traits_type::difference_type difference_type; + typedef typename __traits_type::pointer pointer; + typedef typename __traits_type::reference reference; + reverse_iterator() : current() { } + explicit + reverse_iterator(iterator_type __x) : current(__x) { } + reverse_iterator(const reverse_iterator& __x) + : current(__x.current) { } + template + reverse_iterator(const reverse_iterator<_Iter>& __x) + : current(__x.base()) { } + iterator_type + base() const + { return current; } + reference + operator*() const + { + _Iterator __tmp = current; + return *--__tmp; + } + pointer + operator->() const + { return &(operator*()); } + reverse_iterator& + operator++() + { + --current; + return *this; + } + reverse_iterator + operator++(int) + { + reverse_iterator __tmp = *this; + --current; + return __tmp; + } + reverse_iterator& + operator--() + { + ++current; + return *this; + } + reverse_iterator + operator--(int) + { + reverse_iterator __tmp = *this; + ++current; + return __tmp; + } + reverse_iterator + operator+(difference_type __n) const + { return reverse_iterator(current - __n); } + reverse_iterator& + operator+=(difference_type __n) + { + current -= __n; + return *this; + } + reverse_iterator + operator-(difference_type __n) const + { return reverse_iterator(current + __n); } + reverse_iterator& + operator-=(difference_type __n) + { + current += __n; + return *this; + } + reference + operator[](difference_type __n) const + { return *(*this + __n); } + }; + template + inline bool + operator==(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return __x.base() == __y.base(); } + template + inline bool + operator<(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return __y.base() < __x.base(); } + template + inline bool + operator!=(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return __y < __x; } + template + inline bool + operator<=(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return !(__x < __y); } + template + inline typename reverse_iterator<_Iterator>::difference_type + operator-(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return __y.base() - __x.base(); } + template + inline reverse_iterator<_Iterator> + operator+(typename reverse_iterator<_Iterator>::difference_type __n, + const reverse_iterator<_Iterator>& __x) + { return reverse_iterator<_Iterator>(__x.base() - __n); } + template + inline bool + operator==(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __x.base() == __y.base(); } + template + inline bool + operator<(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __y.base() < __x.base(); } + template + inline bool + operator!=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __y < __x; } + template + inline bool + operator<=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return !(__x < __y); } + template + inline typename reverse_iterator<_IteratorL>::difference_type + operator-(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __y.base() - __x.base(); } + template + class back_insert_iterator + : public iterator + { + public: + _Container* container; + public: + typedef _Container container_type; + explicit + back_insert_iterator(_Container& __x) : container(&__x) { } + back_insert_iterator& + operator=(typename _Container::const_reference __value) + { + container->push_back(__value); + return *this; + } + back_insert_iterator& + operator*() + { return *this; } + back_insert_iterator& + operator++() + { return *this; } + back_insert_iterator + operator++(int) + { return *this; } + }; + template + inline back_insert_iterator<_Container> + back_inserter(_Container& __x) + { return back_insert_iterator<_Container>(__x); } + template + class front_insert_iterator + : public iterator + { + public: + _Container* container; + public: + typedef _Container container_type; + explicit front_insert_iterator(_Container& __x) : container(&__x) { } + front_insert_iterator& + operator=(typename _Container::const_reference __value) + { + container->push_front(__value); + return *this; + } + front_insert_iterator& + operator*() + { return *this; } + front_insert_iterator& + operator++() + { return *this; } + front_insert_iterator + operator++(int) + { return *this; } + }; + template + inline front_insert_iterator<_Container> + front_inserter(_Container& __x) + { return front_insert_iterator<_Container>(__x); } + template + class insert_iterator + : public iterator + { + public: + _Container* container; + typename _Container::iterator iter; + public: + typedef _Container container_type; + insert_iterator(_Container& __x, typename _Container::iterator __i) + : container(&__x), iter(__i) {} + insert_iterator& + operator=(typename _Container::const_reference __value) + { + iter = container->insert(iter, __value); + ++iter; + return *this; + } + insert_iterator& + operator*() + { return *this; } + insert_iterator& + operator++() + { return *this; } + insert_iterator& + operator++(int) + { return *this; } + }; + template + inline insert_iterator<_Container> + inserter(_Container& __x, _Iterator __i) + { + return insert_iterator<_Container>(__x, + typename _Container::iterator(__i)); + } +} +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + using std::iterator_traits; + using std::iterator; + template + class __normal_iterator + { + public: + _Iterator _M_current; + typedef iterator_traits<_Iterator> __traits_type; + public: + typedef _Iterator iterator_type; + typedef typename __traits_type::iterator_category iterator_category; + typedef typename __traits_type::value_type value_type; + typedef typename __traits_type::difference_type difference_type; + typedef typename __traits_type::reference reference; + typedef typename __traits_type::pointer pointer; + __normal_iterator() : _M_current(_Iterator()) { } + explicit + __normal_iterator(const _Iterator& __i) : _M_current(__i) { } + template + __normal_iterator(const __normal_iterator<_Iter, + typename __enable_if< + (std::__are_same<_Iter, typename _Container::pointer>::__value), + _Container>::__type>& __i) + : _M_current(__i.base()) { } + reference + operator*() const + { return *_M_current; } + pointer + operator->() const + { return _M_current; } + __normal_iterator& + operator++() + { + ++_M_current; + return *this; + } + __normal_iterator + operator++(int) + { return __normal_iterator(_M_current++); } + __normal_iterator& + operator--() + { + --_M_current; + return *this; + } + __normal_iterator + operator--(int) + { return __normal_iterator(_M_current--); } + reference + operator[](const difference_type& __n) const + { return _M_current[__n]; } + __normal_iterator& + operator+=(const difference_type& __n) + { _M_current += __n; return *this; } + __normal_iterator + operator+(const difference_type& __n) const + { return __normal_iterator(_M_current + __n); } + __normal_iterator& + operator-=(const difference_type& __n) + { _M_current -= __n; return *this; } + __normal_iterator + operator-(const difference_type& __n) const + { return __normal_iterator(_M_current - __n); } + const _Iterator& + base() const + { return _M_current; } + }; + template + inline bool + operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() == __rhs.base(); } + template + inline bool + operator==(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() == __rhs.base(); } + template + inline bool + operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() != __rhs.base(); } + template + inline bool + operator!=(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() != __rhs.base(); } + template + inline bool + operator<(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() < __rhs.base(); } + template + inline bool + operator<(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() < __rhs.base(); } + template + inline bool + operator>(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() > __rhs.base(); } + template + inline bool + operator>(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() > __rhs.base(); } + template + inline bool + operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() <= __rhs.base(); } + template + inline bool + operator<=(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() <= __rhs.base(); } + template + inline bool + operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() >= __rhs.base(); } + template + inline bool + operator>=(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() >= __rhs.base(); } + template + inline typename __normal_iterator<_IteratorL, _Container>::difference_type + operator-(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() - __rhs.base(); } + template + inline typename __normal_iterator<_Iterator, _Container>::difference_type + operator-(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() - __rhs.base(); } + template + inline __normal_iterator<_Iterator, _Container> + operator+(typename __normal_iterator<_Iterator, _Container>::difference_type + __n, const __normal_iterator<_Iterator, _Container>& __i) + { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } +} +namespace std +{ + namespace __debug { } +} +namespace __gnu_debug +{ + using namespace std::__debug; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + struct __iter_swap + { + template + static void + iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) + { + typedef typename iterator_traits<_ForwardIterator1>::value_type + _ValueType1; + _ValueType1 __tmp = (*__a); + *__a = (*__b); + *__b = (__tmp); + } + }; + template<> + struct __iter_swap + { + template + static void + iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) + { + swap(*__a, *__b); + } + }; + template + inline void + iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) + { + typedef typename iterator_traits<_ForwardIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_ForwardIterator2>::value_type + _ValueType2; + + + + + typedef typename iterator_traits<_ForwardIterator1>::reference + _ReferenceType1; + typedef typename iterator_traits<_ForwardIterator2>::reference + _ReferenceType2; + std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value + && __are_same<_ValueType1&, _ReferenceType1>::__value + && __are_same<_ValueType2&, _ReferenceType2>::__value>:: + iter_swap(__a, __b); + } + template + _ForwardIterator2 + swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2) + { + + + ; + for (; __first1 != __last1; ++__first1, ++__first2) + std::iter_swap(__first1, __first2); + return __first2; + } + template + inline const _Tp& + min(const _Tp& __a, const _Tp& __b) + { + + if (__b < __a) + return __b; + return __a; + } + template + inline const _Tp& + max(const _Tp& __a, const _Tp& __b) + { + + if (__a < __b) + return __b; + return __a; + } + template + inline const _Tp& + min(const _Tp& __a, const _Tp& __b, _Compare __comp) + { + if (__comp(__b, __a)) + return __b; + return __a; + } + template + inline const _Tp& + max(const _Tp& __a, const _Tp& __b, _Compare __comp) + { + if (__comp(__a, __b)) + return __b; + return __a; + } + template + struct _Iter_base + { + typedef _Iterator iterator_type; + static iterator_type + _S_base(_Iterator __it) + { return __it; } + }; + template + struct _Iter_base<_Iterator, true> + { + typedef typename _Iterator::iterator_type iterator_type; + static iterator_type + _S_base(_Iterator __it) + { return __it.base(); } + }; + template + struct _Niter_base + : _Iter_base<_Iterator, __is_normal_iterator<_Iterator>::__value> + { }; + template + inline typename _Niter_base<_Iterator>::iterator_type + __niter_base(_Iterator __it) + { return std::_Niter_base<_Iterator>::_S_base(__it); } + template + struct _Miter_base + : _Iter_base<_Iterator, __is_move_iterator<_Iterator>::__value> + { }; + template + inline typename _Miter_base<_Iterator>::iterator_type + __miter_base(_Iterator __it) + { return std::_Miter_base<_Iterator>::_S_base(__it); } + template + struct __copy_move + { + template + static _OI + __copy_m(_II __first, _II __last, _OI __result) + { + for (; __first != __last; ++__result, ++__first) + *__result = *__first; + return __result; + } + }; + template<> + struct __copy_move + { + template + static _OI + __copy_m(_II __first, _II __last, _OI __result) + { + typedef typename iterator_traits<_II>::difference_type _Distance; + for(_Distance __n = __last - __first; __n > 0; --__n) + { + *__result = *__first; + ++__first; + ++__result; + } + return __result; + } + }; + template + struct __copy_move<_IsMove, true, random_access_iterator_tag> + { + template + static _Tp* + __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result) + { + const ptrdiff_t _Num = __last - __first; + if (_Num) + __builtin_memmove(__result, __first, sizeof(_Tp) * _Num); + return __result + _Num; + } + }; + template + inline _OI + __copy_move_a(_II __first, _II __last, _OI __result) + { + typedef typename iterator_traits<_II>::value_type _ValueTypeI; + typedef typename iterator_traits<_OI>::value_type _ValueTypeO; + typedef typename iterator_traits<_II>::iterator_category _Category; + const bool __simple = (__is_pod(_ValueTypeI) + && __is_pointer<_II>::__value + && __is_pointer<_OI>::__value + && __are_same<_ValueTypeI, _ValueTypeO>::__value); + return std::__copy_move<_IsMove, __simple, + _Category>::__copy_m(__first, __last, __result); + } + template + struct char_traits; + template + class istreambuf_iterator; + template + class ostreambuf_iterator; + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type + __copy_move_a2(_CharT*, _CharT*, + ostreambuf_iterator<_CharT, char_traits<_CharT> >); + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type + __copy_move_a2(const _CharT*, const _CharT*, + ostreambuf_iterator<_CharT, char_traits<_CharT> >); + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + _CharT*>::__type + __copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >, + istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*); + template + inline _OI + __copy_move_a2(_II __first, _II __last, _OI __result) + { + return _OI(std::__copy_move_a<_IsMove>(std::__niter_base(__first), + std::__niter_base(__last), + std::__niter_base(__result))); + } + template + inline _OI + copy(_II __first, _II __last, _OI __result) + { + + + ; + return (std::__copy_move_a2<__is_move_iterator<_II>::__value> + (std::__miter_base(__first), std::__miter_base(__last), + __result)); + } + template + struct __copy_move_backward + { + template + static _BI2 + __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) + { + while (__first != __last) + *--__result = *--__last; + return __result; + } + }; + template<> + struct __copy_move_backward + { + template + static _BI2 + __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) + { + typename iterator_traits<_BI1>::difference_type __n; + for (__n = __last - __first; __n > 0; --__n) + *--__result = *--__last; + return __result; + } + }; + template + struct __copy_move_backward<_IsMove, true, random_access_iterator_tag> + { + template + static _Tp* + __copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result) + { + const ptrdiff_t _Num = __last - __first; + if (_Num) + __builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num); + return __result - _Num; + } + }; + template + inline _BI2 + __copy_move_backward_a(_BI1 __first, _BI1 __last, _BI2 __result) + { + typedef typename iterator_traits<_BI1>::value_type _ValueType1; + typedef typename iterator_traits<_BI2>::value_type _ValueType2; + typedef typename iterator_traits<_BI1>::iterator_category _Category; + const bool __simple = (__is_pod(_ValueType1) + && __is_pointer<_BI1>::__value + && __is_pointer<_BI2>::__value + && __are_same<_ValueType1, _ValueType2>::__value); + return std::__copy_move_backward<_IsMove, __simple, + _Category>::__copy_move_b(__first, + __last, + __result); + } + template + inline _BI2 + __copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result) + { + return _BI2(std::__copy_move_backward_a<_IsMove> + (std::__niter_base(__first), std::__niter_base(__last), + std::__niter_base(__result))); + } + template + inline _BI2 + copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) + { + + + + ; + return (std::__copy_move_backward_a2<__is_move_iterator<_BI1>::__value> + (std::__miter_base(__first), std::__miter_base(__last), + __result)); + } + template + inline typename + __gnu_cxx::__enable_if::__value, void>::__type + __fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __value) + { + for (; __first != __last; ++__first) + *__first = __value; + } + template + inline typename + __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type + __fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __value) + { + const _Tp __tmp = __value; + for (; __first != __last; ++__first) + *__first = __tmp; + } + template + inline typename + __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type + __fill_a(_Tp* __first, _Tp* __last, const _Tp& __c) + { + const _Tp __tmp = __c; + __builtin_memset(__first, static_cast(__tmp), + __last - __first); + } + template + inline void + fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) + { + + ; + std::__fill_a(std::__niter_base(__first), std::__niter_base(__last), + __value); + } + template + inline typename + __gnu_cxx::__enable_if::__value, _OutputIterator>::__type + __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) + { + for (; __n > 0; --__n, ++__first) + *__first = __value; + return __first; + } + template + inline typename + __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type + __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) + { + const _Tp __tmp = __value; + for (; __n > 0; --__n, ++__first) + *__first = __tmp; + return __first; + } + template + inline typename + __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, _Tp*>::__type + __fill_n_a(_Tp* __first, _Size __n, const _Tp& __c) + { + std::__fill_a(__first, __first + __n, __c); + return __first + __n; + } + template + inline _OI + fill_n(_OI __first, _Size __n, const _Tp& __value) + { + + return _OI(std::__fill_n_a(std::__niter_base(__first), __n, __value)); + } + template + struct __equal + { + template + static bool + equal(_II1 __first1, _II1 __last1, _II2 __first2) + { + for (; __first1 != __last1; ++__first1, ++__first2) + if (!(*__first1 == *__first2)) + return false; + return true; + } + }; + template<> + struct __equal + { + template + static bool + equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2) + { + return !__builtin_memcmp(__first1, __first2, sizeof(_Tp) + * (__last1 - __first1)); + } + }; + template + inline bool + __equal_aux(_II1 __first1, _II1 __last1, _II2 __first2) + { + typedef typename iterator_traits<_II1>::value_type _ValueType1; + typedef typename iterator_traits<_II2>::value_type _ValueType2; + const bool __simple = (__is_integer<_ValueType1>::__value + && __is_pointer<_II1>::__value + && __is_pointer<_II2>::__value + && __are_same<_ValueType1, _ValueType2>::__value); + return std::__equal<__simple>::equal(__first1, __last1, __first2); + } + template + struct __lc_rai + { + template + static _II1 + __newlast1(_II1, _II1 __last1, _II2, _II2) + { return __last1; } + template + static bool + __cnd2(_II __first, _II __last) + { return __first != __last; } + }; + template<> + struct __lc_rai + { + template + static _RAI1 + __newlast1(_RAI1 __first1, _RAI1 __last1, + _RAI2 __first2, _RAI2 __last2) + { + const typename iterator_traits<_RAI1>::difference_type + __diff1 = __last1 - __first1; + const typename iterator_traits<_RAI2>::difference_type + __diff2 = __last2 - __first2; + return __diff2 < __diff1 ? __first1 + __diff2 : __last1; + } + template + static bool + __cnd2(_RAI, _RAI) + { return true; } + }; + template + struct __lexicographical_compare + { + template + static bool __lc(_II1, _II1, _II2, _II2); + }; + template + template + bool + __lexicographical_compare<_BoolType>:: + __lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) + { + typedef typename iterator_traits<_II1>::iterator_category _Category1; + typedef typename iterator_traits<_II2>::iterator_category _Category2; + typedef std::__lc_rai<_Category1, _Category2> __rai_type; + __last1 = __rai_type::__newlast1(__first1, __last1, + __first2, __last2); + for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); + ++__first1, ++__first2) + { + if (*__first1 < *__first2) + return true; + if (*__first2 < *__first1) + return false; + } + return __first1 == __last1 && __first2 != __last2; + } + template<> + struct __lexicographical_compare + { + template + static bool + __lc(const _Tp* __first1, const _Tp* __last1, + const _Up* __first2, const _Up* __last2) + { + const size_t __len1 = __last1 - __first1; + const size_t __len2 = __last2 - __first2; + const int __result = __builtin_memcmp(__first1, __first2, + std::min(__len1, __len2)); + return __result != 0 ? __result < 0 : __len1 < __len2; + } + }; + template + inline bool + __lexicographical_compare_aux(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2) + { + typedef typename iterator_traits<_II1>::value_type _ValueType1; + typedef typename iterator_traits<_II2>::value_type _ValueType2; + const bool __simple = + (__is_byte<_ValueType1>::__value && __is_byte<_ValueType2>::__value + && !__gnu_cxx::__numeric_traits<_ValueType1>::__is_signed + && !__gnu_cxx::__numeric_traits<_ValueType2>::__is_signed + && __is_pointer<_II1>::__value + && __is_pointer<_II2>::__value); + return std::__lexicographical_compare<__simple>::__lc(__first1, __last1, + __first2, __last2); + } + template + _ForwardIterator + lower_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + ; + _DistanceType __len = std::distance(__first, __last); + _DistanceType __half; + _ForwardIterator __middle; + while (__len > 0) + { + __half = __len >> 1; + __middle = __first; + std::advance(__middle, __half); + if (*__middle < __val) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else + __len = __half; + } + return __first; + } + template + inline _Size + __lg(_Size __n) + { + _Size __k; + for (__k = 0; __n != 0; __n >>= 1) + ++__k; + return __k - 1; + } + inline int + __lg(int __n) + { return sizeof(int) * 8 - 1 - __builtin_clz(__n); } + inline long + __lg(long __n) + { return sizeof(long) * 8 - 1 - __builtin_clzl(__n); } + inline long long + __lg(long long __n) + { return sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + inline bool + equal(_II1 __first1, _II1 __last1, _II2 __first2) + { + + + + ; + return std::__equal_aux(std::__niter_base(__first1), + std::__niter_base(__last1), + std::__niter_base(__first2)); + } + template + inline bool + equal(_IIter1 __first1, _IIter1 __last1, + _IIter2 __first2, _BinaryPredicate __binary_pred) + { + + + ; + for (; __first1 != __last1; ++__first1, ++__first2) + if (!bool(__binary_pred(*__first1, *__first2))) + return false; + return true; + } + template + inline bool + lexicographical_compare(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2) + { + typedef typename iterator_traits<_II1>::value_type _ValueType1; + typedef typename iterator_traits<_II2>::value_type _ValueType2; + + + + + ; + ; + return std::__lexicographical_compare_aux(std::__niter_base(__first1), + std::__niter_base(__last1), + std::__niter_base(__first2), + std::__niter_base(__last2)); + } + template + bool + lexicographical_compare(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2, _Compare __comp) + { + typedef typename iterator_traits<_II1>::iterator_category _Category1; + typedef typename iterator_traits<_II2>::iterator_category _Category2; + typedef std::__lc_rai<_Category1, _Category2> __rai_type; + + + ; + ; + __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2); + for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); + ++__first1, ++__first2) + { + if (__comp(*__first1, *__first2)) + return true; + if (__comp(*__first2, *__first1)) + return false; + } + return __first1 == __last1 && __first2 != __last2; + } + template + pair<_InputIterator1, _InputIterator2> + mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2) + { + + + + ; + while (__first1 != __last1 && *__first1 == *__first2) + { + ++__first1; + ++__first2; + } + return pair<_InputIterator1, _InputIterator2>(__first1, __first2); + } + template + pair<_InputIterator1, _InputIterator2> + mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _BinaryPredicate __binary_pred) + { + + + ; + while (__first1 != __last1 && bool(__binary_pred(*__first1, *__first2))) + { + ++__first1; + ++__first2; + } + return pair<_InputIterator1, _InputIterator2>(__first1, __first2); + } +} + + + +struct _IO_FILE; +typedef struct _IO_FILE FILE; +typedef struct _IO_FILE __FILE; +typedef unsigned int wint_t; +typedef struct +{ + int __count; + union + { + unsigned int __wch; + char __wchb[4]; + } __value; +} __mbstate_t; +typedef __mbstate_t mbstate_t; +extern "C" { +struct tm; +extern wchar_t *wcscpy (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src) throw (); +extern wchar_t *wcsncpy (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n) + throw (); +extern wchar_t *wcscat (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src) throw (); +extern wchar_t *wcsncat (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n) + throw (); +extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2) + throw () __attribute__ ((__pure__)); +extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) + throw () __attribute__ ((__pure__)); +extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) throw (); +extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2, + size_t __n) throw (); +extern int wcscasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, + __locale_t __loc) throw (); +extern int wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, + size_t __n, __locale_t __loc) throw (); +extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) throw (); +extern size_t wcsxfrm (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) throw (); +extern int wcscoll_l (__const wchar_t *__s1, __const wchar_t *__s2, + __locale_t __loc) throw (); +extern size_t wcsxfrm_l (wchar_t *__s1, __const wchar_t *__s2, + size_t __n, __locale_t __loc) throw (); +extern wchar_t *wcsdup (__const wchar_t *__s) throw () __attribute__ ((__malloc__)); +extern "C++" wchar_t *wcschr (wchar_t *__wcs, wchar_t __wc) + throw () __asm ("wcschr") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc) + throw () __asm ("wcschr") __attribute__ ((__pure__)); +extern "C++" wchar_t *wcsrchr (wchar_t *__wcs, wchar_t __wc) + throw () __asm ("wcsrchr") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc) + throw () __asm ("wcsrchr") __attribute__ ((__pure__)); +extern wchar_t *wcschrnul (__const wchar_t *__s, wchar_t __wc) + throw () __attribute__ ((__pure__)); +extern size_t wcscspn (__const wchar_t *__wcs, __const wchar_t *__reject) + throw () __attribute__ ((__pure__)); +extern size_t wcsspn (__const wchar_t *__wcs, __const wchar_t *__accept) + throw () __attribute__ ((__pure__)); +extern "C++" wchar_t *wcspbrk (wchar_t *__wcs, __const wchar_t *__accept) + throw () __asm ("wcspbrk") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcspbrk (__const wchar_t *__wcs, + __const wchar_t *__accept) + throw () __asm ("wcspbrk") __attribute__ ((__pure__)); +extern "C++" wchar_t *wcsstr (wchar_t *__haystack, __const wchar_t *__needle) + throw () __asm ("wcsstr") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcsstr (__const wchar_t *__haystack, + __const wchar_t *__needle) + throw () __asm ("wcsstr") __attribute__ ((__pure__)); +extern wchar_t *wcstok (wchar_t *__restrict __s, + __const wchar_t *__restrict __delim, + wchar_t **__restrict __ptr) throw (); +extern size_t wcslen (__const wchar_t *__s) throw () __attribute__ ((__pure__)); +extern "C++" wchar_t *wcswcs (wchar_t *__haystack, __const wchar_t *__needle) + throw () __asm ("wcswcs") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcswcs (__const wchar_t *__haystack, + __const wchar_t *__needle) + throw () __asm ("wcswcs") __attribute__ ((__pure__)); +extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen) + throw () __attribute__ ((__pure__)); +extern "C++" wchar_t *wmemchr (wchar_t *__s, wchar_t __c, size_t __n) + throw () __asm ("wmemchr") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, + size_t __n) + throw () __asm ("wmemchr") __attribute__ ((__pure__)); +extern int wmemcmp (__const wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) + throw () __attribute__ ((__pure__)); +extern wchar_t *wmemcpy (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) throw (); +extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n) + throw (); +extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw (); +extern wchar_t *wmempcpy (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) + throw (); +extern wint_t btowc (int __c) throw (); +extern int wctob (wint_t __c) throw (); +extern int mbsinit (__const mbstate_t *__ps) throw () __attribute__ ((__pure__)); +extern size_t mbrtowc (wchar_t *__restrict __pwc, + __const char *__restrict __s, size_t __n, + mbstate_t *__p) throw (); +extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, + mbstate_t *__restrict __ps) throw (); +extern size_t __mbrlen (__const char *__restrict __s, size_t __n, + mbstate_t *__restrict __ps) throw (); +extern size_t mbrlen (__const char *__restrict __s, size_t __n, + mbstate_t *__restrict __ps) throw (); +extern wint_t __btowc_alias (int __c) __asm ("btowc"); +extern __inline __attribute__ ((__gnu_inline__)) wint_t +btowc (int __c) throw () +{ return (__builtin_constant_p (__c) && __c >= '\0' && __c <= '\x7f' + ? (wint_t) __c : __btowc_alias (__c)); } +extern int __wctob_alias (wint_t __c) __asm ("wctob"); +extern __inline __attribute__ ((__gnu_inline__)) int +wctob (wint_t __wc) throw () +{ return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f' + ? (int) __wc : __wctob_alias (__wc)); } +extern __inline __attribute__ ((__gnu_inline__)) size_t +mbrlen (__const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw () +{ return (__ps != __null + ? mbrtowc (__null, __s, __n, __ps) : __mbrlen (__s, __n, __null)); } +extern size_t mbsrtowcs (wchar_t *__restrict __dst, + __const char **__restrict __src, size_t __len, + mbstate_t *__restrict __ps) throw (); +extern size_t wcsrtombs (char *__restrict __dst, + __const wchar_t **__restrict __src, size_t __len, + mbstate_t *__restrict __ps) throw (); +extern size_t mbsnrtowcs (wchar_t *__restrict __dst, + __const char **__restrict __src, size_t __nmc, + size_t __len, mbstate_t *__restrict __ps) throw (); +extern size_t wcsnrtombs (char *__restrict __dst, + __const wchar_t **__restrict __src, + size_t __nwc, size_t __len, + mbstate_t *__restrict __ps) throw (); +extern int wcwidth (wchar_t __c) throw (); +extern int wcswidth (__const wchar_t *__s, size_t __n) throw (); +extern double wcstod (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) throw (); +extern float wcstof (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) throw (); +extern long double wcstold (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) throw (); +extern long int wcstol (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) throw (); +extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + throw (); +__extension__ +extern long long int wcstoll (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + throw (); +__extension__ +extern unsigned long long int wcstoull (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base) throw (); +__extension__ +extern long long int wcstoq (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + throw (); +__extension__ +extern unsigned long long int wcstouq (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base) throw (); +extern long int wcstol_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base, + __locale_t __loc) throw (); +extern unsigned long int wcstoul_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, __locale_t __loc) throw (); +__extension__ +extern long long int wcstoll_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, __locale_t __loc) throw (); +__extension__ +extern unsigned long long int wcstoull_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, __locale_t __loc) + throw (); +extern double wcstod_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, __locale_t __loc) + throw (); +extern float wcstof_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, __locale_t __loc) + throw (); +extern long double wcstold_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + __locale_t __loc) throw (); +extern wchar_t *wcpcpy (wchar_t *__dest, __const wchar_t *__src) throw (); +extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n) + throw (); +extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) throw (); +extern int fwide (__FILE *__fp, int __mode) throw (); +extern int fwprintf (__FILE *__restrict __stream, + __const wchar_t *__restrict __format, ...) + ; +extern int wprintf (__const wchar_t *__restrict __format, ...) + ; +extern int swprintf (wchar_t *__restrict __s, size_t __n, + __const wchar_t *__restrict __format, ...) + throw () ; +extern int vfwprintf (__FILE *__restrict __s, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; +extern int vwprintf (__const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; +extern int vswprintf (wchar_t *__restrict __s, size_t __n, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + throw () ; +extern int fwscanf (__FILE *__restrict __stream, + __const wchar_t *__restrict __format, ...) + ; +extern int wscanf (__const wchar_t *__restrict __format, ...) + ; +extern int swscanf (__const wchar_t *__restrict __s, + __const wchar_t *__restrict __format, ...) + throw () ; +extern int vfwscanf (__FILE *__restrict __s, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; +extern int vwscanf (__const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; +extern int vswscanf (__const wchar_t *__restrict __s, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + throw () ; +extern wint_t fgetwc (__FILE *__stream); +extern wint_t getwc (__FILE *__stream); +extern wint_t getwchar (void); +extern wint_t fputwc (wchar_t __wc, __FILE *__stream); +extern wint_t putwc (wchar_t __wc, __FILE *__stream); +extern wint_t putwchar (wchar_t __wc); +extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n, + __FILE *__restrict __stream); +extern int fputws (__const wchar_t *__restrict __ws, + __FILE *__restrict __stream); +extern wint_t ungetwc (wint_t __wc, __FILE *__stream); +extern wint_t getwc_unlocked (__FILE *__stream); +extern wint_t getwchar_unlocked (void); +extern wint_t fgetwc_unlocked (__FILE *__stream); +extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream); +extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream); +extern wint_t putwchar_unlocked (wchar_t __wc); +extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n, + __FILE *__restrict __stream); +extern int fputws_unlocked (__const wchar_t *__restrict __ws, + __FILE *__restrict __stream); +extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize, + __const wchar_t *__restrict __format, + __const struct tm *__restrict __tp) throw (); +extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, + __const wchar_t *__restrict __format, + __const struct tm *__restrict __tp, + __locale_t __loc) throw (); +extern wchar_t *__wmemcpy_chk (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n, + size_t __ns1) throw (); +extern wchar_t *__wmemcpy_alias (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () __asm__ ("" "wmemcpy") + ; +extern wchar_t *__wmemcpy_chk_warn (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmemcpy_chk") + __attribute__((__warning__ ("wmemcpy called with length bigger than size of destination " "buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wmemcpy (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () +{ + if (__builtin_object_size (__s1, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wmemcpy_chk (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t)) + return __wmemcpy_chk_warn (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + } + return __wmemcpy_alias (__s1, __s2, __n); +} +extern wchar_t *__wmemmove_chk (wchar_t *__s1, __const wchar_t *__s2, + size_t __n, size_t __ns1) throw (); +extern wchar_t *__wmemmove_alias (wchar_t *__s1, __const wchar_t *__s2, size_t __n) throw () __asm__ ("" "wmemmove") + ; +extern wchar_t *__wmemmove_chk_warn (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmemmove_chk") + __attribute__((__warning__ ("wmemmove called with length bigger than size of destination " "buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wmemmove (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () +{ + if (__builtin_object_size (__s1, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wmemmove_chk (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t)) + return __wmemmove_chk_warn (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + } + return __wmemmove_alias (__s1, __s2, __n); +} +extern wchar_t *__wmempcpy_chk (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n, + size_t __ns1) throw (); +extern wchar_t *__wmempcpy_alias (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () __asm__ ("" "wmempcpy") + ; +extern wchar_t *__wmempcpy_chk_warn (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmempcpy_chk") + __attribute__((__warning__ ("wmempcpy called with length bigger than size of destination " "buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wmempcpy (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () +{ + if (__builtin_object_size (__s1, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wmempcpy_chk (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t)) + return __wmempcpy_chk_warn (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + } + return __wmempcpy_alias (__s1, __s2, __n); +} +extern wchar_t *__wmemset_chk (wchar_t *__s, wchar_t __c, size_t __n, + size_t __ns) throw (); +extern wchar_t *__wmemset_alias (wchar_t *__s, wchar_t __c, size_t __n) throw () __asm__ ("" "wmemset") + ; +extern wchar_t *__wmemset_chk_warn (wchar_t *__s, wchar_t __c, size_t __n, size_t __ns) throw () __asm__ ("" "__wmemset_chk") + __attribute__((__warning__ ("wmemset called with length bigger than size of destination " "buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wmemset (wchar_t *__restrict __s, wchar_t __c, size_t __n) throw () +{ + if (__builtin_object_size (__s, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wmemset_chk (__s, __c, __n, __builtin_object_size (__s, 0) / sizeof (wchar_t)); + if (__n > __builtin_object_size (__s, 0) / sizeof (wchar_t)) + return __wmemset_chk_warn (__s, __c, __n, + __builtin_object_size (__s, 0) / sizeof (wchar_t)); + } + return __wmemset_alias (__s, __c, __n); +} +extern wchar_t *__wcscpy_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, + size_t __n) throw (); +extern wchar_t *__wcscpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () __asm__ ("" "wcscpy") + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wcscpy (wchar_t *__dest, __const wchar_t *__src) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + return __wcscpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + return __wcscpy_alias (__dest, __src); +} +extern wchar_t *__wcpcpy_chk (wchar_t *__dest, __const wchar_t *__src, + size_t __destlen) throw (); +extern wchar_t *__wcpcpy_alias (wchar_t *__dest, __const wchar_t *__src) throw () __asm__ ("" "wcpcpy") + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wcpcpy (wchar_t *__dest, __const wchar_t *__src) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + return __wcpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + return __wcpcpy_alias (__dest, __src); +} +extern wchar_t *__wcsncpy_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n, + size_t __destlen) throw (); +extern wchar_t *__wcsncpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcsncpy") + ; +extern wchar_t *__wcsncpy_chk_warn (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n, size_t __destlen) throw () __asm__ ("" "__wcsncpy_chk") + __attribute__((__warning__ ("wcsncpy called with length bigger than size of destination " "buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wcsncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wcsncpy_chk (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + if (__n > __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)) + return __wcsncpy_chk_warn (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + } + return __wcsncpy_alias (__dest, __src, __n); +} +extern wchar_t *__wcpncpy_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n, + size_t __destlen) throw (); +extern wchar_t *__wcpncpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcpncpy") + ; +extern wchar_t *__wcpncpy_chk_warn (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n, size_t __destlen) throw () __asm__ ("" "__wcpncpy_chk") + __attribute__((__warning__ ("wcpncpy called with length bigger than size of destination " "buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wcpncpy_chk (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + if (__n > __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)) + return __wcpncpy_chk_warn (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + } + return __wcpncpy_alias (__dest, __src, __n); +} +extern wchar_t *__wcscat_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, + size_t __destlen) throw (); +extern wchar_t *__wcscat_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () __asm__ ("" "wcscat") + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wcscat (wchar_t *__dest, __const wchar_t *__src) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + return __wcscat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + return __wcscat_alias (__dest, __src); +} +extern wchar_t *__wcsncat_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, + size_t __n, size_t __destlen) throw (); +extern wchar_t *__wcsncat_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcsncat") + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wcsncat (wchar_t *__dest, __const wchar_t *__src, size_t __n) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + return __wcsncat_chk (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + return __wcsncat_alias (__dest, __src, __n); +} +extern int __swprintf_chk (wchar_t *__restrict __s, size_t __n, + int __flag, size_t __s_len, + __const wchar_t *__restrict __format, ...) + throw () ; +extern int __swprintf_alias (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, ...) throw () __asm__ ("" "swprintf") + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +swprintf (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, ...) throw () +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 || 2 > 1) + return __swprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __fmt, __builtin_va_arg_pack ()); + return __swprintf_alias (__s, __n, __fmt, __builtin_va_arg_pack ()); +} +extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n, + int __flag, size_t __s_len, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + throw () ; +extern int __vswprintf_alias (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, __gnuc_va_list __ap) throw () __asm__ ("" "vswprintf") + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vswprintf (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, __gnuc_va_list __ap) throw () +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 || 2 > 1) + return __vswprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), __fmt, __ap); + return __vswprintf_alias (__s, __n, __fmt, __ap); +} +extern int __fwprintf_chk (__FILE *__restrict __stream, int __flag, + __const wchar_t *__restrict __format, ...); +extern int __wprintf_chk (int __flag, __const wchar_t *__restrict __format, + ...); +extern int __vfwprintf_chk (__FILE *__restrict __stream, int __flag, + __const wchar_t *__restrict __format, + __gnuc_va_list __ap); +extern int __vwprintf_chk (int __flag, __const wchar_t *__restrict __format, + __gnuc_va_list __ap); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +wprintf (__const wchar_t *__restrict __fmt, ...) +{ + return __wprintf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +fwprintf (__FILE *__restrict __stream, __const wchar_t *__restrict __fmt, ...) +{ + return __fwprintf_chk (__stream, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vwprintf (__const wchar_t *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vwprintf_chk (2 - 1, __fmt, __ap); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vfwprintf (__FILE *__restrict __stream, + __const wchar_t *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vfwprintf_chk (__stream, 2 - 1, __fmt, __ap); +} +extern wchar_t *__fgetws_chk (wchar_t *__restrict __s, size_t __size, int __n, + __FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern wchar_t *__fgetws_alias (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) __asm__ ("" "fgetws") + __attribute__ ((__warn_unused_result__)); +extern wchar_t *__fgetws_chk_warn (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __asm__ ("" "__fgetws_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgetws called with bigger size than length " "of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) wchar_t * +fgetws (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgetws_chk (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __n, __stream); + if ((size_t) __n > __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t)) + return __fgetws_chk_warn (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __n, __stream); + } + return __fgetws_alias (__s, __n, __stream); +} +extern wchar_t *__fgetws_unlocked_chk (wchar_t *__restrict __s, size_t __size, + int __n, __FILE *__restrict __stream) + __attribute__ ((__warn_unused_result__)); +extern wchar_t *__fgetws_unlocked_alias (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) __asm__ ("" "fgetws_unlocked") + __attribute__ ((__warn_unused_result__)); +extern wchar_t *__fgetws_unlocked_chk_warn (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __asm__ ("" "__fgetws_unlocked_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgetws_unlocked called with bigger size than length " "of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) wchar_t * +fgetws_unlocked (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgetws_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __n, __stream); + if ((size_t) __n > __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t)) + return __fgetws_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __n, __stream); + } + return __fgetws_unlocked_alias (__s, __n, __stream); +} +extern size_t __wcrtomb_chk (char *__s, wchar_t __wchar, mbstate_t *__p, + size_t __buflen) throw () __attribute__ ((__warn_unused_result__)); +extern size_t __wcrtomb_alias (char *__restrict __s, wchar_t __wchar, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcrtomb") + __attribute__ ((__warn_unused_result__)); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +wcrtomb (char *__s, wchar_t __wchar, mbstate_t *__ps) throw () +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) + return __wcrtomb_chk (__s, __wchar, __ps, __builtin_object_size (__s, 2 > 1)); + return __wcrtomb_alias (__s, __wchar, __ps); +} +extern size_t __mbsrtowcs_chk (wchar_t *__restrict __dst, + __const char **__restrict __src, + size_t __len, mbstate_t *__restrict __ps, + size_t __dstlen) throw (); +extern size_t __mbsrtowcs_alias (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "mbsrtowcs") + ; +extern size_t __mbsrtowcs_chk_warn (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__mbsrtowcs_chk") + __attribute__((__warning__ ("mbsrtowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +mbsrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __mbsrtowcs_chk (__dst, __src, __len, __ps, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) + return __mbsrtowcs_chk_warn (__dst, __src, __len, __ps, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + } + return __mbsrtowcs_alias (__dst, __src, __len, __ps); +} +extern size_t __wcsrtombs_chk (char *__restrict __dst, + __const wchar_t **__restrict __src, + size_t __len, mbstate_t *__restrict __ps, + size_t __dstlen) throw (); +extern size_t __wcsrtombs_alias (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcsrtombs") + ; +extern size_t __wcsrtombs_chk_warn (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__wcsrtombs_chk") + __attribute__((__warning__ ("wcsrtombs called with dst buffer smaller than len"))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +wcsrtombs (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __wcsrtombs_chk (__dst, __src, __len, __ps, __builtin_object_size (__dst, 2 > 1)); + if (__len > __builtin_object_size (__dst, 2 > 1)) + return __wcsrtombs_chk_warn (__dst, __src, __len, __ps, __builtin_object_size (__dst, 2 > 1)); + } + return __wcsrtombs_alias (__dst, __src, __len, __ps); +} +extern size_t __mbsnrtowcs_chk (wchar_t *__restrict __dst, + __const char **__restrict __src, size_t __nmc, + size_t __len, mbstate_t *__restrict __ps, + size_t __dstlen) throw (); +extern size_t __mbsnrtowcs_alias (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "mbsnrtowcs") + ; +extern size_t __mbsnrtowcs_chk_warn (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__mbsnrtowcs_chk") + __attribute__((__warning__ ("mbsnrtowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +mbsnrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) throw () +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __mbsnrtowcs_chk (__dst, __src, __nmc, __len, __ps, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) + return __mbsnrtowcs_chk_warn (__dst, __src, __nmc, __len, __ps, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + } + return __mbsnrtowcs_alias (__dst, __src, __nmc, __len, __ps); +} +extern size_t __wcsnrtombs_chk (char *__restrict __dst, + __const wchar_t **__restrict __src, + size_t __nwc, size_t __len, + mbstate_t *__restrict __ps, size_t __dstlen) + throw (); +extern size_t __wcsnrtombs_alias (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcsnrtombs") + ; +extern size_t __wcsnrtombs_chk_warn (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__wcsnrtombs_chk") + __attribute__((__warning__ ("wcsnrtombs called with dst buffer smaller than len"))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +wcsnrtombs (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) throw () +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __wcsnrtombs_chk (__dst, __src, __nwc, __len, __ps, + __builtin_object_size (__dst, 2 > 1)); + if (__len > __builtin_object_size (__dst, 2 > 1)) + return __wcsnrtombs_chk_warn (__dst, __src, __nwc, __len, __ps, + __builtin_object_size (__dst, 2 > 1)); + } + return __wcsnrtombs_alias (__dst, __src, __nwc, __len, __ps); +} +} +namespace std __attribute__ ((__visibility__ ("default"))) { + using ::mbstate_t; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + using ::wint_t; + using ::btowc; + using ::fgetwc; + using ::fgetws; + using ::fputwc; + using ::fputws; + using ::fwide; + using ::fwprintf; + using ::fwscanf; + using ::getwc; + using ::getwchar; + using ::mbrlen; + using ::mbrtowc; + using ::mbsinit; + using ::mbsrtowcs; + using ::putwc; + using ::putwchar; + using ::swprintf; + using ::swscanf; + using ::ungetwc; + using ::vfwprintf; + using ::vfwscanf; + using ::vswprintf; + using ::vswscanf; + using ::vwprintf; + using ::vwscanf; + using ::wcrtomb; + using ::wcscat; + using ::wcscmp; + using ::wcscoll; + using ::wcscpy; + using ::wcscspn; + using ::wcsftime; + using ::wcslen; + using ::wcsncat; + using ::wcsncmp; + using ::wcsncpy; + using ::wcsrtombs; + using ::wcsspn; + using ::wcstod; + using ::wcstof; + using ::wcstok; + using ::wcstol; + using ::wcstoul; + using ::wcsxfrm; + using ::wctob; + using ::wmemcmp; + using ::wmemcpy; + using ::wmemmove; + using ::wmemset; + using ::wprintf; + using ::wscanf; + using ::wcschr; + using ::wcspbrk; + using ::wcsrchr; + using ::wcsstr; + using ::wmemchr; +} +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + using ::wcstold; + using ::wcstoll; + using ::wcstoull; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + using ::__gnu_cxx::wcstold; + using ::__gnu_cxx::wcstoll; + using ::__gnu_cxx::wcstoull; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + typedef long streamoff; + typedef ptrdiff_t streamsize; + template + class fpos + { + private: + streamoff _M_off; + _StateT _M_state; + public: + fpos() + : _M_off(0), _M_state() { } + fpos(streamoff __off) + : _M_off(__off), _M_state() { } + operator streamoff() const { return _M_off; } + void + state(_StateT __st) + { _M_state = __st; } + _StateT + state() const + { return _M_state; } + fpos& + operator+=(streamoff __off) + { + _M_off += __off; + return *this; + } + fpos& + operator-=(streamoff __off) + { + _M_off -= __off; + return *this; + } + fpos + operator+(streamoff __off) const + { + fpos __pos(*this); + __pos += __off; + return __pos; + } + fpos + operator-(streamoff __off) const + { + fpos __pos(*this); + __pos -= __off; + return __pos; + } + streamoff + operator-(const fpos& __other) const + { return _M_off - __other._M_off; } + }; + template + inline bool + operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) + { return streamoff(__lhs) == streamoff(__rhs); } + template + inline bool + operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) + { return streamoff(__lhs) != streamoff(__rhs); } + typedef fpos streampos; + typedef fpos wstreampos; +} + + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + template + struct _Char_types + { + typedef unsigned long int_type; + typedef std::streampos pos_type; + typedef std::streamoff off_type; + typedef std::mbstate_t state_type; + }; + template + struct char_traits + { + typedef _CharT char_type; + typedef typename _Char_types<_CharT>::int_type int_type; + typedef typename _Char_types<_CharT>::pos_type pos_type; + typedef typename _Char_types<_CharT>::off_type off_type; + typedef typename _Char_types<_CharT>::state_type state_type; + static void + assign(char_type& __c1, const char_type& __c2) + { __c1 = __c2; } + static bool + eq(const char_type& __c1, const char_type& __c2) + { return __c1 == __c2; } + static bool + lt(const char_type& __c1, const char_type& __c2) + { return __c1 < __c2; } + static int + compare(const char_type* __s1, const char_type* __s2, std::size_t __n); + static std::size_t + length(const char_type* __s); + static const char_type* + find(const char_type* __s, std::size_t __n, const char_type& __a); + static char_type* + move(char_type* __s1, const char_type* __s2, std::size_t __n); + static char_type* + copy(char_type* __s1, const char_type* __s2, std::size_t __n); + static char_type* + assign(char_type* __s, std::size_t __n, char_type __a); + static char_type + to_char_type(const int_type& __c) + { return static_cast(__c); } + static int_type + to_int_type(const char_type& __c) + { return static_cast(__c); } + static bool + eq_int_type(const int_type& __c1, const int_type& __c2) + { return __c1 == __c2; } + static int_type + eof() + { return static_cast((-1)); } + static int_type + not_eof(const int_type& __c) + { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); } + }; + template + int + char_traits<_CharT>:: + compare(const char_type* __s1, const char_type* __s2, std::size_t __n) + { + for (std::size_t __i = 0; __i < __n; ++__i) + if (lt(__s1[__i], __s2[__i])) + return -1; + else if (lt(__s2[__i], __s1[__i])) + return 1; + return 0; + } + template + std::size_t + char_traits<_CharT>:: + length(const char_type* __p) + { + std::size_t __i = 0; + while (!eq(__p[__i], char_type())) + ++__i; + return __i; + } + template + const typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + find(const char_type* __s, std::size_t __n, const char_type& __a) + { + for (std::size_t __i = 0; __i < __n; ++__i) + if (eq(__s[__i], __a)) + return __s + __i; + return 0; + } + template + typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + move(char_type* __s1, const char_type* __s2, std::size_t __n) + { + return static_cast<_CharT*>(__builtin_memmove(__s1, __s2, + __n * sizeof(char_type))); + } + template + typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + copy(char_type* __s1, const char_type* __s2, std::size_t __n) + { + std::copy(__s2, __s2 + __n, __s1); + return __s1; + } + template + typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + assign(char_type* __s, std::size_t __n, char_type __a) + { + std::fill_n(__s, __n, __a); + return __s; + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + struct char_traits : public __gnu_cxx::char_traits<_CharT> + { }; + template<> + struct char_traits + { + typedef char char_type; + typedef int int_type; + typedef streampos pos_type; + typedef streamoff off_type; + typedef mbstate_t state_type; + static void + assign(char_type& __c1, const char_type& __c2) + { __c1 = __c2; } + static bool + eq(const char_type& __c1, const char_type& __c2) + { return __c1 == __c2; } + static bool + lt(const char_type& __c1, const char_type& __c2) + { return __c1 < __c2; } + static int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { return __builtin_memcmp(__s1, __s2, __n); } + static size_t + length(const char_type* __s) + { return __builtin_strlen(__s); } + static const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { return static_cast(__builtin_memchr(__s, __a, __n)); } + static char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { return static_cast(__builtin_memmove(__s1, __s2, __n)); } + static char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { return static_cast(__builtin_memcpy(__s1, __s2, __n)); } + static char_type* + assign(char_type* __s, size_t __n, char_type __a) + { return static_cast(__builtin_memset(__s, __a, __n)); } + static char_type + to_char_type(const int_type& __c) + { return static_cast(__c); } + static int_type + to_int_type(const char_type& __c) + { return static_cast(static_cast(__c)); } + static bool + eq_int_type(const int_type& __c1, const int_type& __c2) + { return __c1 == __c2; } + static int_type + eof() + { return static_cast((-1)); } + static int_type + not_eof(const int_type& __c) + { return (__c == eof()) ? 0 : __c; } + }; + template<> + struct char_traits + { + typedef wchar_t char_type; + typedef wint_t int_type; + typedef streamoff off_type; + typedef wstreampos pos_type; + typedef mbstate_t state_type; + static void + assign(char_type& __c1, const char_type& __c2) + { __c1 = __c2; } + static bool + eq(const char_type& __c1, const char_type& __c2) + { return __c1 == __c2; } + static bool + lt(const char_type& __c1, const char_type& __c2) + { return __c1 < __c2; } + static int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { return wmemcmp(__s1, __s2, __n); } + static size_t + length(const char_type* __s) + { return wcslen(__s); } + static const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { return wmemchr(__s, __a, __n); } + static char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { return wmemmove(__s1, __s2, __n); } + static char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { return wmemcpy(__s1, __s2, __n); } + static char_type* + assign(char_type* __s, size_t __n, char_type __a) + { return wmemset(__s, __a, __n); } + static char_type + to_char_type(const int_type& __c) + { return char_type(__c); } + static int_type + to_int_type(const char_type& __c) + { return int_type(__c); } + static bool + eq_int_type(const int_type& __c1, const int_type& __c2) + { return __c1 == __c2; } + static int_type + eof() + { return static_cast((0xffffffffu)); } + static int_type + not_eof(const int_type& __c) + { return eq_int_type(__c, eof()) ? 0 : __c; } + }; +} + + + +extern "C++" { +namespace std +{ + class exception + { + public: + exception() throw() { } + virtual ~exception() throw(); + virtual const char* what() const throw(); + }; + class bad_exception : public exception + { + public: + bad_exception() throw() { } + virtual ~bad_exception() throw(); + virtual const char* what() const throw(); + }; + typedef void (*terminate_handler) (); + typedef void (*unexpected_handler) (); + terminate_handler set_terminate(terminate_handler) throw(); + void terminate() throw() __attribute__ ((__noreturn__)); + unexpected_handler set_unexpected(unexpected_handler) throw(); + void unexpected() __attribute__ ((__noreturn__)); + bool uncaught_exception() throw() __attribute__ ((__pure__)); +} +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + void __verbose_terminate_handler(); +} +} +extern "C++" { +namespace std +{ + class bad_alloc : public exception + { + public: + bad_alloc() throw() { } + virtual ~bad_alloc() throw(); + virtual const char* what() const throw(); + }; + struct nothrow_t { }; + extern const nothrow_t nothrow; + typedef void (*new_handler)(); + new_handler set_new_handler(new_handler) throw(); +} +void* operator new(std::size_t) throw (std::bad_alloc); +void* operator new[](std::size_t) throw (std::bad_alloc); +void operator delete(void*) throw(); +void operator delete[](void*) throw(); +void* operator new(std::size_t, const std::nothrow_t&) throw(); +void* operator new[](std::size_t, const std::nothrow_t&) throw(); +void operator delete(void*, const std::nothrow_t&) throw(); +void operator delete[](void*, const std::nothrow_t&) throw(); +inline void* operator new(std::size_t, void* __p) throw() { return __p; } +inline void* operator new[](std::size_t, void* __p) throw() { return __p; } +inline void operator delete (void*, void*) throw() { } +inline void operator delete[](void*, void*) throw() { } +} +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + using std::size_t; + using std::ptrdiff_t; + template + class new_allocator + { + public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef const _Tp* const_pointer; + typedef _Tp& reference; + typedef const _Tp& const_reference; + typedef _Tp value_type; + template + struct rebind + { typedef new_allocator<_Tp1> other; }; + new_allocator() throw() { } + new_allocator(const new_allocator&) throw() { } + template + new_allocator(const new_allocator<_Tp1>&) throw() { } + ~new_allocator() throw() { } + pointer + address(reference __x) const { return &__x; } + const_pointer + address(const_reference __x) const { return &__x; } + pointer + allocate(size_type __n, const void* = 0) + { + if (__n > this->max_size()) + std::__throw_bad_alloc(); + return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); + } + void + deallocate(pointer __p, size_type) + { ::operator delete(__p); } + size_type + max_size() const throw() + { return size_t(-1) / sizeof(_Tp); } + void + construct(pointer __p, const _Tp& __val) + { ::new((void *)__p) _Tp(__val); } + void + destroy(pointer __p) { __p->~_Tp(); } + }; + template + inline bool + operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&) + { return true; } + template + inline bool + operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&) + { return false; } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + class allocator; + template<> + class allocator + { + public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef void* pointer; + typedef const void* const_pointer; + typedef void value_type; + template + struct rebind + { typedef allocator<_Tp1> other; }; + }; + template + class allocator: public __gnu_cxx::new_allocator<_Tp> + { + public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef const _Tp* const_pointer; + typedef _Tp& reference; + typedef const _Tp& const_reference; + typedef _Tp value_type; + template + struct rebind + { typedef allocator<_Tp1> other; }; + allocator() throw() { } + allocator(const allocator& __a) throw() + : __gnu_cxx::new_allocator<_Tp>(__a) { } + template + allocator(const allocator<_Tp1>&) throw() { } + ~allocator() throw() { } + }; + template + inline bool + operator==(const allocator<_T1>&, const allocator<_T2>&) + { return true; } + template + inline bool + operator==(const allocator<_Tp>&, const allocator<_Tp>&) + { return true; } + template + inline bool + operator!=(const allocator<_T1>&, const allocator<_T2>&) + { return false; } + template + inline bool + operator!=(const allocator<_Tp>&, const allocator<_Tp>&) + { return false; } + extern template class allocator; + extern template class allocator; + template + struct __alloc_swap + { static void _S_do_it(_Alloc&, _Alloc&) { } }; + template + struct __alloc_swap<_Alloc, false> + { + static void + _S_do_it(_Alloc& __one, _Alloc& __two) + { + if (__one != __two) + swap(__one, __two); + } + }; + template + struct __alloc_neq + { + static bool + _S_do_it(const _Alloc&, const _Alloc&) + { return false; } + }; + template + struct __alloc_neq<_Alloc, false> + { + static bool + _S_do_it(const _Alloc& __one, const _Alloc& __two) + { return __one != __two; } + }; +} + + + +enum +{ + __LC_CTYPE = 0, + __LC_NUMERIC = 1, + __LC_TIME = 2, + __LC_COLLATE = 3, + __LC_MONETARY = 4, + __LC_MESSAGES = 5, + __LC_ALL = 6, + __LC_PAPER = 7, + __LC_NAME = 8, + __LC_ADDRESS = 9, + __LC_TELEPHONE = 10, + __LC_MEASUREMENT = 11, + __LC_IDENTIFICATION = 12 +}; +extern "C" { +struct lconv +{ + char *decimal_point; + char *thousands_sep; + char *grouping; + char *int_curr_symbol; + char *currency_symbol; + char *mon_decimal_point; + char *mon_thousands_sep; + char *mon_grouping; + char *positive_sign; + char *negative_sign; + char int_frac_digits; + char frac_digits; + char p_cs_precedes; + char p_sep_by_space; + char n_cs_precedes; + char n_sep_by_space; + char p_sign_posn; + char n_sign_posn; + char int_p_cs_precedes; + char int_p_sep_by_space; + char int_n_cs_precedes; + char int_n_sep_by_space; + char int_p_sign_posn; + char int_n_sign_posn; +}; +extern char *setlocale (int __category, __const char *__locale) throw (); +extern struct lconv *localeconv (void) throw (); +extern __locale_t newlocale (int __category_mask, __const char *__locale, + __locale_t __base) throw (); +extern __locale_t duplocale (__locale_t __dataset) throw (); +extern void freelocale (__locale_t __dataset) throw (); +extern __locale_t uselocale (__locale_t __dataset) throw (); +} +namespace std __attribute__ ((__visibility__ ("default"))) { + using ::lconv; + using ::setlocale; + using ::localeconv; +} + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + extern "C" __typeof(uselocale) __uselocale; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + typedef __locale_t __c_locale; + inline int + __convert_from_v(const __c_locale& __cloc __attribute__ ((__unused__)), + char* __out, + const int __size __attribute__ ((__unused__)), + const char* __fmt, ...) + { + __c_locale __old = __gnu_cxx::__uselocale(__cloc); + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); + __builtin_va_end(__args); + __gnu_cxx::__uselocale(__old); + return __ret; + } +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + class ios_base; + template > + class basic_ios; + template > + class basic_streambuf; + template > + class basic_istream; + template > + class basic_ostream; + template > + class basic_iostream; + template, + typename _Alloc = allocator<_CharT> > + class basic_stringbuf; + template, + typename _Alloc = allocator<_CharT> > + class basic_istringstream; + template, + typename _Alloc = allocator<_CharT> > + class basic_ostringstream; + template, + typename _Alloc = allocator<_CharT> > + class basic_stringstream; + template > + class basic_filebuf; + template > + class basic_ifstream; + template > + class basic_ofstream; + template > + class basic_fstream; + template > + class istreambuf_iterator; + template > + class ostreambuf_iterator; + typedef basic_ios ios; + typedef basic_streambuf streambuf; + typedef basic_istream istream; + typedef basic_ostream ostream; + typedef basic_iostream iostream; + typedef basic_stringbuf stringbuf; + typedef basic_istringstream istringstream; + typedef basic_ostringstream ostringstream; + typedef basic_stringstream stringstream; + typedef basic_filebuf filebuf; + typedef basic_ifstream ifstream; + typedef basic_ofstream ofstream; + typedef basic_fstream fstream; + typedef basic_ios wios; + typedef basic_streambuf wstreambuf; + typedef basic_istream wistream; + typedef basic_ostream wostream; + typedef basic_iostream wiostream; + typedef basic_stringbuf wstringbuf; + typedef basic_istringstream wistringstream; + typedef basic_ostringstream wostringstream; + typedef basic_stringstream wstringstream; + typedef basic_filebuf wfilebuf; + typedef basic_ifstream wifstream; + typedef basic_ofstream wofstream; + typedef basic_fstream wfstream; +} + +typedef unsigned char __u_char; +typedef unsigned short int __u_short; +typedef unsigned int __u_int; +typedef unsigned long int __u_long; +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; +typedef signed long int __int64_t; +typedef unsigned long int __uint64_t; +typedef long int __quad_t; +typedef unsigned long int __u_quad_t; +typedef unsigned long int __dev_t; +typedef unsigned int __uid_t; +typedef unsigned int __gid_t; +typedef unsigned long int __ino_t; +typedef unsigned long int __ino64_t; +typedef unsigned int __mode_t; +typedef unsigned long int __nlink_t; +typedef long int __off_t; +typedef long int __off64_t; +typedef int __pid_t; +typedef struct { int __val[2]; } __fsid_t; +typedef long int __clock_t; +typedef unsigned long int __rlim_t; +typedef unsigned long int __rlim64_t; +typedef unsigned int __id_t; +typedef long int __time_t; +typedef unsigned int __useconds_t; +typedef long int __suseconds_t; +typedef int __daddr_t; +typedef long int __swblk_t; +typedef int __key_t; +typedef int __clockid_t; +typedef void * __timer_t; +typedef long int __blksize_t; +typedef long int __blkcnt_t; +typedef long int __blkcnt64_t; +typedef unsigned long int __fsblkcnt_t; +typedef unsigned long int __fsblkcnt64_t; +typedef unsigned long int __fsfilcnt_t; +typedef unsigned long int __fsfilcnt64_t; +typedef long int __ssize_t; +typedef __off64_t __loff_t; +typedef __quad_t *__qaddr_t; +typedef char *__caddr_t; +typedef long int __intptr_t; +typedef unsigned int __socklen_t; +extern "C" { +enum +{ + _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), + _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), + _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), + _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), + _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), + _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), + _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), + _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), + _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), + _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), + _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), + _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) +}; +extern __const unsigned short int **__ctype_b_loc (void) + throw () __attribute__ ((__const)); +extern __const __int32_t **__ctype_tolower_loc (void) + throw () __attribute__ ((__const)); +extern __const __int32_t **__ctype_toupper_loc (void) + throw () __attribute__ ((__const)); +extern int isalnum (int) throw (); +extern int isalpha (int) throw (); +extern int iscntrl (int) throw (); +extern int isdigit (int) throw (); +extern int islower (int) throw (); +extern int isgraph (int) throw (); +extern int isprint (int) throw (); +extern int ispunct (int) throw (); +extern int isspace (int) throw (); +extern int isupper (int) throw (); +extern int isxdigit (int) throw (); +extern int tolower (int __c) throw (); +extern int toupper (int __c) throw (); +extern int isblank (int) throw (); +extern int isctype (int __c, int __mask) throw (); +extern int isascii (int __c) throw (); +extern int toascii (int __c) throw (); +extern int _toupper (int) throw (); +extern int _tolower (int) throw (); +extern int isalnum_l (int, __locale_t) throw (); +extern int isalpha_l (int, __locale_t) throw (); +extern int iscntrl_l (int, __locale_t) throw (); +extern int isdigit_l (int, __locale_t) throw (); +extern int islower_l (int, __locale_t) throw (); +extern int isgraph_l (int, __locale_t) throw (); +extern int isprint_l (int, __locale_t) throw (); +extern int ispunct_l (int, __locale_t) throw (); +extern int isspace_l (int, __locale_t) throw (); +extern int isupper_l (int, __locale_t) throw (); +extern int isxdigit_l (int, __locale_t) throw (); +extern int isblank_l (int, __locale_t) throw (); +extern int __tolower_l (int __c, __locale_t __l) throw (); +extern int tolower_l (int __c, __locale_t __l) throw (); +extern int __toupper_l (int __c, __locale_t __l) throw (); +extern int toupper_l (int __c, __locale_t __l) throw (); +} +namespace std __attribute__ ((__visibility__ ("default"))) { + using ::isalnum; + using ::isalpha; + using ::iscntrl; + using ::isdigit; + using ::isgraph; + using ::islower; + using ::isprint; + using ::ispunct; + using ::isspace; + using ::isupper; + using ::isxdigit; + using ::tolower; + using ::toupper; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + class locale; + template + bool + has_facet(const locale&) throw(); + template + const _Facet& + use_facet(const locale&); + template + bool + isspace(_CharT, const locale&); + template + bool + isprint(_CharT, const locale&); + template + bool + iscntrl(_CharT, const locale&); + template + bool + isupper(_CharT, const locale&); + template + bool + islower(_CharT, const locale&); + template + bool + isalpha(_CharT, const locale&); + template + bool + isdigit(_CharT, const locale&); + template + bool + ispunct(_CharT, const locale&); + template + bool + isxdigit(_CharT, const locale&); + template + bool + isalnum(_CharT, const locale&); + template + bool + isgraph(_CharT, const locale&); + template + _CharT + toupper(_CharT, const locale&); + template + _CharT + tolower(_CharT, const locale&); + class ctype_base; + template + class ctype; + template<> class ctype; + template<> class ctype; + template + class ctype_byname; + class codecvt_base; + template + class codecvt; + template<> class codecvt; + template<> class codecvt; + template + class codecvt_byname; + template > + class num_get; + template > + class num_put; + template class numpunct; + template class numpunct_byname; + template + class collate; + template class + collate_byname; + class time_base; + template > + class time_get; + template > + class time_get_byname; + template > + class time_put; + template > + class time_put_byname; + class money_base; + template > + class money_get; + template > + class money_put; + template + class moneypunct; + template + class moneypunct_byname; + class messages_base; + template + class messages; + template + class messages_byname; +} + + +namespace __cxxabiv1 +{ + class __forced_unwind + { + virtual ~__forced_unwind() throw(); + virtual void __pure_dummy() = 0; + }; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + inline void + __ostream_write(basic_ostream<_CharT, _Traits>& __out, + const _CharT* __s, streamsize __n) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + const streamsize __put = __out.rdbuf()->sputn(__s, __n); + if (__put != __n) + __out.setstate(__ios_base::badbit); + } + template + inline void + __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + const _CharT __c = __out.fill(); + for (; __n > 0; --__n) + { + const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c); + if (_Traits::eq_int_type(__put, _Traits::eof())) + { + __out.setstate(__ios_base::badbit); + break; + } + } + } + template + basic_ostream<_CharT, _Traits>& + __ostream_insert(basic_ostream<_CharT, _Traits>& __out, + const _CharT* __s, streamsize __n) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + typename __ostream_type::sentry __cerb(__out); + if (__cerb) + { + try + { + const streamsize __w = __out.width(); + if (__w > __n) + { + const bool __left = ((__out.flags() + & __ios_base::adjustfield) + == __ios_base::left); + if (!__left) + __ostream_fill(__out, __w - __n); + if (__out.good()) + __ostream_write(__out, __s, __n); + if (__left && __out.good()) + __ostream_fill(__out, __w - __n); + } + else + __ostream_write(__out, __s, __n); + __out.width(0); + } + catch(__cxxabiv1::__forced_unwind&) + { + __out._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { __out._M_setstate(__ios_base::badbit); } + } + return __out; + } + extern template ostream& __ostream_insert(ostream&, const char*, streamsize); + extern template wostream& __ostream_insert(wostream&, const wchar_t*, + streamsize); +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + struct unary_function + { + typedef _Arg argument_type; + typedef _Result result_type; + }; + template + struct binary_function + { + typedef _Arg1 first_argument_type; + typedef _Arg2 second_argument_type; + typedef _Result result_type; + }; + template + struct plus : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x + __y; } + }; + template + struct minus : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x - __y; } + }; + template + struct multiplies : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x * __y; } + }; + template + struct divides : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x / __y; } + }; + template + struct modulus : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x % __y; } + }; + template + struct negate : public unary_function<_Tp, _Tp> + { + _Tp + operator()(const _Tp& __x) const + { return -__x; } + }; + template + struct equal_to : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x == __y; } + }; + template + struct not_equal_to : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x != __y; } + }; + template + struct greater : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x > __y; } + }; + template + struct less : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x < __y; } + }; + template + struct greater_equal : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x >= __y; } + }; + template + struct less_equal : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x <= __y; } + }; + template + struct logical_and : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x && __y; } + }; + template + struct logical_or : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x || __y; } + }; + template + struct logical_not : public unary_function<_Tp, bool> + { + bool + operator()(const _Tp& __x) const + { return !__x; } + }; + template + struct bit_and : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x & __y; } + }; + template + struct bit_or : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x | __y; } + }; + template + struct bit_xor : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x ^ __y; } + }; + template + class unary_negate + : public unary_function + { + public: + _Predicate _M_pred; + public: + explicit + unary_negate(const _Predicate& __x) : _M_pred(__x) { } + bool + operator()(const typename _Predicate::argument_type& __x) const + { return !_M_pred(__x); } + }; + template + inline unary_negate<_Predicate> + not1(const _Predicate& __pred) + { return unary_negate<_Predicate>(__pred); } + template + class binary_negate + : public binary_function + { + public: + _Predicate _M_pred; + public: + explicit + binary_negate(const _Predicate& __x) : _M_pred(__x) { } + bool + operator()(const typename _Predicate::first_argument_type& __x, + const typename _Predicate::second_argument_type& __y) const + { return !_M_pred(__x, __y); } + }; + template + inline binary_negate<_Predicate> + not2(const _Predicate& __pred) + { return binary_negate<_Predicate>(__pred); } + template + class pointer_to_unary_function : public unary_function<_Arg, _Result> + { + public: + _Result (*_M_ptr)(_Arg); + public: + pointer_to_unary_function() { } + explicit + pointer_to_unary_function(_Result (*__x)(_Arg)) + : _M_ptr(__x) { } + _Result + operator()(_Arg __x) const + { return _M_ptr(__x); } + }; + template + inline pointer_to_unary_function<_Arg, _Result> + ptr_fun(_Result (*__x)(_Arg)) + { return pointer_to_unary_function<_Arg, _Result>(__x); } + template + class pointer_to_binary_function + : public binary_function<_Arg1, _Arg2, _Result> + { + public: + _Result (*_M_ptr)(_Arg1, _Arg2); + public: + pointer_to_binary_function() { } + explicit + pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) + : _M_ptr(__x) { } + _Result + operator()(_Arg1 __x, _Arg2 __y) const + { return _M_ptr(__x, __y); } + }; + template + inline pointer_to_binary_function<_Arg1, _Arg2, _Result> + ptr_fun(_Result (*__x)(_Arg1, _Arg2)) + { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); } + template + struct _Identity : public unary_function<_Tp,_Tp> + { + _Tp& + operator()(_Tp& __x) const + { return __x; } + const _Tp& + operator()(const _Tp& __x) const + { return __x; } + }; + template + struct _Select1st : public unary_function<_Pair, + typename _Pair::first_type> + { + typename _Pair::first_type& + operator()(_Pair& __x) const + { return __x.first; } + const typename _Pair::first_type& + operator()(const _Pair& __x) const + { return __x.first; } + }; + template + struct _Select2nd : public unary_function<_Pair, + typename _Pair::second_type> + { + typename _Pair::second_type& + operator()(_Pair& __x) const + { return __x.second; } + const typename _Pair::second_type& + operator()(const _Pair& __x) const + { return __x.second; } + }; + template + class mem_fun_t : public unary_function<_Tp*, _Ret> + { + public: + explicit + mem_fun_t(_Ret (_Tp::*__pf)()) + : _M_f(__pf) { } + _Ret + operator()(_Tp* __p) const + { return (__p->*_M_f)(); } + private: + _Ret (_Tp::*_M_f)(); + }; + template + class const_mem_fun_t : public unary_function + { + public: + explicit + const_mem_fun_t(_Ret (_Tp::*__pf)() const) + : _M_f(__pf) { } + _Ret + operator()(const _Tp* __p) const + { return (__p->*_M_f)(); } + private: + _Ret (_Tp::*_M_f)() const; + }; + template + class mem_fun_ref_t : public unary_function<_Tp, _Ret> + { + public: + explicit + mem_fun_ref_t(_Ret (_Tp::*__pf)()) + : _M_f(__pf) { } + _Ret + operator()(_Tp& __r) const + { return (__r.*_M_f)(); } + private: + _Ret (_Tp::*_M_f)(); + }; + template + class const_mem_fun_ref_t : public unary_function<_Tp, _Ret> + { + public: + explicit + const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) + : _M_f(__pf) { } + _Ret + operator()(const _Tp& __r) const + { return (__r.*_M_f)(); } + private: + _Ret (_Tp::*_M_f)() const; + }; + template + class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret> + { + public: + explicit + mem_fun1_t(_Ret (_Tp::*__pf)(_Arg)) + : _M_f(__pf) { } + _Ret + operator()(_Tp* __p, _Arg __x) const + { return (__p->*_M_f)(__x); } + private: + _Ret (_Tp::*_M_f)(_Arg); + }; + template + class const_mem_fun1_t : public binary_function + { + public: + explicit + const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const) + : _M_f(__pf) { } + _Ret + operator()(const _Tp* __p, _Arg __x) const + { return (__p->*_M_f)(__x); } + private: + _Ret (_Tp::*_M_f)(_Arg) const; + }; + template + class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> + { + public: + explicit + mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg)) + : _M_f(__pf) { } + _Ret + operator()(_Tp& __r, _Arg __x) const + { return (__r.*_M_f)(__x); } + private: + _Ret (_Tp::*_M_f)(_Arg); + }; + template + class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> + { + public: + explicit + const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const) + : _M_f(__pf) { } + _Ret + operator()(const _Tp& __r, _Arg __x) const + { return (__r.*_M_f)(__x); } + private: + _Ret (_Tp::*_M_f)(_Arg) const; + }; + template + inline mem_fun_t<_Ret, _Tp> + mem_fun(_Ret (_Tp::*__f)()) + { return mem_fun_t<_Ret, _Tp>(__f); } + template + inline const_mem_fun_t<_Ret, _Tp> + mem_fun(_Ret (_Tp::*__f)() const) + { return const_mem_fun_t<_Ret, _Tp>(__f); } + template + inline mem_fun_ref_t<_Ret, _Tp> + mem_fun_ref(_Ret (_Tp::*__f)()) + { return mem_fun_ref_t<_Ret, _Tp>(__f); } + template + inline const_mem_fun_ref_t<_Ret, _Tp> + mem_fun_ref(_Ret (_Tp::*__f)() const) + { return const_mem_fun_ref_t<_Ret, _Tp>(__f); } + template + inline mem_fun1_t<_Ret, _Tp, _Arg> + mem_fun(_Ret (_Tp::*__f)(_Arg)) + { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); } + template + inline const_mem_fun1_t<_Ret, _Tp, _Arg> + mem_fun(_Ret (_Tp::*__f)(_Arg) const) + { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); } + template + inline mem_fun1_ref_t<_Ret, _Tp, _Arg> + mem_fun_ref(_Ret (_Tp::*__f)(_Arg)) + { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } + template + inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg> + mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const) + { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + class binder1st + : public unary_function + { + public: + _Operation op; + typename _Operation::first_argument_type value; + public: + binder1st(const _Operation& __x, + const typename _Operation::first_argument_type& __y) + : op(__x), value(__y) { } + typename _Operation::result_type + operator()(const typename _Operation::second_argument_type& __x) const + { return op(value, __x); } + typename _Operation::result_type + operator()(typename _Operation::second_argument_type& __x) const + { return op(value, __x); } + } ; + template + inline binder1st<_Operation> + bind1st(const _Operation& __fn, const _Tp& __x) + { + typedef typename _Operation::first_argument_type _Arg1_type; + return binder1st<_Operation>(__fn, _Arg1_type(__x)); + } + template + class binder2nd + : public unary_function + { + public: + _Operation op; + typename _Operation::second_argument_type value; + public: + binder2nd(const _Operation& __x, + const typename _Operation::second_argument_type& __y) + : op(__x), value(__y) { } + typename _Operation::result_type + operator()(const typename _Operation::first_argument_type& __x) const + { return op(__x, value); } + typename _Operation::result_type + operator()(typename _Operation::first_argument_type& __x) const + { return op(__x, value); } + } ; + template + inline binder2nd<_Operation> + bind2nd(const _Operation& __fn, const _Tp& __x) + { + typedef typename _Operation::second_argument_type _Arg2_type; + return binder2nd<_Operation>(__fn, _Arg2_type(__x)); + } +} + +struct timespec + { + __time_t tv_sec; + long int tv_nsec; + }; +struct sched_param + { + int __sched_priority; + }; +extern "C" { +extern int clone (int (*__fn) (void *__arg), void *__child_stack, + int __flags, void *__arg, ...) throw (); +extern int unshare (int __flags) throw (); +extern int sched_getcpu (void) throw (); +} +struct __sched_param + { + int __sched_priority; + }; +typedef unsigned long int __cpu_mask; +typedef struct +{ + __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; +} cpu_set_t; +extern "C" { +extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) + throw (); +extern cpu_set_t *__sched_cpualloc (size_t __count) throw () __attribute__ ((__warn_unused_result__)); +extern void __sched_cpufree (cpu_set_t *__set) throw (); +} +extern "C" { +extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param) + throw (); +extern int sched_getparam (__pid_t __pid, struct sched_param *__param) throw (); +extern int sched_setscheduler (__pid_t __pid, int __policy, + __const struct sched_param *__param) throw (); +extern int sched_getscheduler (__pid_t __pid) throw (); +extern int sched_yield (void) throw (); +extern int sched_get_priority_max (int __algorithm) throw (); +extern int sched_get_priority_min (int __algorithm) throw (); +extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) throw (); +extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, + __const cpu_set_t *__cpuset) throw (); +extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, + cpu_set_t *__cpuset) throw (); +} +extern "C" { +typedef __clock_t clock_t; +typedef __time_t time_t; +typedef __clockid_t clockid_t; +typedef __timer_t timer_t; +struct tm +{ + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; + long int tm_gmtoff; + __const char *tm_zone; +}; +struct itimerspec + { + struct timespec it_interval; + struct timespec it_value; + }; +struct sigevent; +typedef __pid_t pid_t; +extern clock_t clock (void) throw (); +extern time_t time (time_t *__timer) throw (); +extern double difftime (time_t __time1, time_t __time0) + throw () __attribute__ ((__const__)); +extern time_t mktime (struct tm *__tp) throw (); +extern size_t strftime (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp) throw (); +extern char *strptime (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp) + throw (); +extern size_t strftime_l (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp, + __locale_t __loc) throw (); +extern char *strptime_l (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp, + __locale_t __loc) throw (); +extern struct tm *gmtime (__const time_t *__timer) throw (); +extern struct tm *localtime (__const time_t *__timer) throw (); +extern struct tm *gmtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) throw (); +extern struct tm *localtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) throw (); +extern char *asctime (__const struct tm *__tp) throw (); +extern char *ctime (__const time_t *__timer) throw (); +extern char *asctime_r (__const struct tm *__restrict __tp, + char *__restrict __buf) throw (); +extern char *ctime_r (__const time_t *__restrict __timer, + char *__restrict __buf) throw (); +extern char *__tzname[2]; +extern int __daylight; +extern long int __timezone; +extern char *tzname[2]; +extern void tzset (void) throw (); +extern int daylight; +extern long int timezone; +extern int stime (__const time_t *__when) throw (); +extern time_t timegm (struct tm *__tp) throw (); +extern time_t timelocal (struct tm *__tp) throw (); +extern int dysize (int __year) throw () __attribute__ ((__const__)); +extern int nanosleep (__const struct timespec *__requested_time, + struct timespec *__remaining); +extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw (); +extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw (); +extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) + throw (); +extern int clock_nanosleep (clockid_t __clock_id, int __flags, + __const struct timespec *__req, + struct timespec *__rem); +extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw (); +extern int timer_create (clockid_t __clock_id, + struct sigevent *__restrict __evp, + timer_t *__restrict __timerid) throw (); +extern int timer_delete (timer_t __timerid) throw (); +extern int timer_settime (timer_t __timerid, int __flags, + __const struct itimerspec *__restrict __value, + struct itimerspec *__restrict __ovalue) throw (); +extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) + throw (); +extern int timer_getoverrun (timer_t __timerid) throw (); +extern int getdate_err; +extern struct tm *getdate (__const char *__string); +extern int getdate_r (__const char *__restrict __string, + struct tm *__restrict __resbufp); +} +extern "C" { +typedef int __sig_atomic_t; +typedef struct + { + unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; + } __sigset_t; +typedef __sigset_t sigset_t; +} +typedef unsigned long int pthread_t; +typedef union +{ + char __size[56]; + long int __align; +} pthread_attr_t; +typedef struct __pthread_internal_list +{ + struct __pthread_internal_list *__prev; + struct __pthread_internal_list *__next; +} __pthread_list_t; +typedef union +{ + struct __pthread_mutex_s + { + int __lock; + unsigned int __count; + int __owner; + unsigned int __nusers; + int __kind; + int __spins; + __pthread_list_t __list; + } __data; + char __size[40]; + long int __align; +} pthread_mutex_t; +typedef union +{ + char __size[4]; + int __align; +} pthread_mutexattr_t; +typedef union +{ + struct + { + int __lock; + unsigned int __futex; + __extension__ unsigned long long int __total_seq; + __extension__ unsigned long long int __wakeup_seq; + __extension__ unsigned long long int __woken_seq; + void *__mutex; + unsigned int __nwaiters; + unsigned int __broadcast_seq; + } __data; + char __size[48]; + __extension__ long long int __align; +} pthread_cond_t; +typedef union +{ + char __size[4]; + int __align; +} pthread_condattr_t; +typedef unsigned int pthread_key_t; +typedef int pthread_once_t; +typedef union +{ + struct + { + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + int __writer; + int __shared; + unsigned long int __pad1; + unsigned long int __pad2; + unsigned int __flags; + } __data; + char __size[56]; + long int __align; +} pthread_rwlock_t; +typedef union +{ + char __size[8]; + long int __align; +} pthread_rwlockattr_t; +typedef volatile int pthread_spinlock_t; +typedef union +{ + char __size[32]; + long int __align; +} pthread_barrier_t; +typedef union +{ + char __size[4]; + int __align; +} pthread_barrierattr_t; +typedef long int __jmp_buf[8]; +enum +{ + PTHREAD_CREATE_JOINABLE, + PTHREAD_CREATE_DETACHED +}; +enum +{ + PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_ADAPTIVE_NP + , + PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL + , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP +}; +enum +{ + PTHREAD_MUTEX_STALLED, + PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, + PTHREAD_MUTEX_ROBUST, + PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST +}; +enum +{ + PTHREAD_PRIO_NONE, + PTHREAD_PRIO_INHERIT, + PTHREAD_PRIO_PROTECT +}; +enum +{ + PTHREAD_RWLOCK_PREFER_READER_NP, + PTHREAD_RWLOCK_PREFER_WRITER_NP, + PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, + PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP +}; +enum +{ + PTHREAD_INHERIT_SCHED, + PTHREAD_EXPLICIT_SCHED +}; +enum +{ + PTHREAD_SCOPE_SYSTEM, + PTHREAD_SCOPE_PROCESS +}; +enum +{ + PTHREAD_PROCESS_PRIVATE, + PTHREAD_PROCESS_SHARED +}; +struct _pthread_cleanup_buffer +{ + void (*__routine) (void *); + void *__arg; + int __canceltype; + struct _pthread_cleanup_buffer *__prev; +}; +enum +{ + PTHREAD_CANCEL_ENABLE, + PTHREAD_CANCEL_DISABLE +}; +enum +{ + PTHREAD_CANCEL_DEFERRED, + PTHREAD_CANCEL_ASYNCHRONOUS +}; +extern "C" { +extern int pthread_create (pthread_t *__restrict __newthread, + __const pthread_attr_t *__restrict __attr, + void *(*__start_routine) (void *), + void *__restrict __arg) throw () __attribute__ ((__nonnull__ (1, 3))); +extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); +extern int pthread_join (pthread_t __th, void **__thread_return); +extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) throw (); +extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, + __const struct timespec *__abstime); +extern int pthread_detach (pthread_t __th) throw (); +extern pthread_t pthread_self (void) throw () __attribute__ ((__const__)); +extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) throw (); +extern int pthread_attr_init (pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_destroy (pthread_attr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, + int *__detachstate) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, + int __detachstate) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, + size_t *__guardsize) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setguardsize (pthread_attr_t *__attr, + size_t __guardsize) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict + __attr, + struct sched_param *__restrict __param) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, + __const struct sched_param *__restrict + __param) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict + __attr, int *__restrict __policy) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict + __attr, int *__restrict __inherit) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, + int __inherit) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, + int *__restrict __scope) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict + __attr, void **__restrict __stackaddr) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); +extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, + void *__stackaddr) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); +extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict + __attr, size_t *__restrict __stacksize) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setstacksize (pthread_attr_t *__attr, + size_t __stacksize) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, + void **__restrict __stackaddr, + size_t *__restrict __stacksize) + throw () __attribute__ ((__nonnull__ (1, 2, 3))); +extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, + size_t __stacksize) throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, + size_t __cpusetsize, + __const cpu_set_t *__cpuset) + throw () __attribute__ ((__nonnull__ (1, 3))); +extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr, + size_t __cpusetsize, + cpu_set_t *__cpuset) + throw () __attribute__ ((__nonnull__ (1, 3))); +extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) + throw () __attribute__ ((__nonnull__ (2))); +extern int pthread_setschedparam (pthread_t __target_thread, int __policy, + __const struct sched_param *__param) + throw () __attribute__ ((__nonnull__ (3))); +extern int pthread_getschedparam (pthread_t __target_thread, + int *__restrict __policy, + struct sched_param *__restrict __param) + throw () __attribute__ ((__nonnull__ (2, 3))); +extern int pthread_setschedprio (pthread_t __target_thread, int __prio) + throw (); +extern int pthread_getconcurrency (void) throw (); +extern int pthread_setconcurrency (int __level) throw (); +extern int pthread_yield (void) throw (); +extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, + __const cpu_set_t *__cpuset) + throw () __attribute__ ((__nonnull__ (3))); +extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, + cpu_set_t *__cpuset) + throw () __attribute__ ((__nonnull__ (3))); +extern int pthread_once (pthread_once_t *__once_control, + void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_setcancelstate (int __state, int *__oldstate); +extern int pthread_setcanceltype (int __type, int *__oldtype); +extern int pthread_cancel (pthread_t __th); +extern void pthread_testcancel (void); +typedef struct +{ + struct + { + __jmp_buf __cancel_jmp_buf; + int __mask_was_saved; + } __cancel_jmp_buf[1]; + void *__pad[4]; +} __pthread_unwind_buf_t __attribute__ ((__aligned__)); +struct __pthread_cleanup_frame +{ + void (*__cancel_routine) (void *); + void *__cancel_arg; + int __do_it; + int __cancel_type; +}; +class __pthread_cleanup_class +{ + void (*__cancel_routine) (void *); + void *__cancel_arg; + int __do_it; + int __cancel_type; + public: + __pthread_cleanup_class (void (*__fct) (void *), void *__arg) + : __cancel_routine (__fct), __cancel_arg (__arg), __do_it (1) { } + ~__pthread_cleanup_class () { if (__do_it) __cancel_routine (__cancel_arg); } + void __setdoit (int __newval) { __do_it = __newval; } + void __defer () { pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, + &__cancel_type); } + void __restore () const { pthread_setcanceltype (__cancel_type, 0); } +}; +struct __jmp_buf_tag; +extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) throw (); +extern int pthread_mutex_init (pthread_mutex_t *__mutex, + __const pthread_mutexattr_t *__mutexattr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutex_lock (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, + __const struct timespec *__restrict + __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutex_getprioceiling (__const pthread_mutex_t * + __restrict __mutex, + int *__restrict __prioceiling) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, + int __prioceiling, + int *__restrict __old_ceiling) + throw () __attribute__ ((__nonnull__ (1, 3))); +extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __pshared) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, + int __pshared) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict + __attr, int *__restrict __kind) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __protocol) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, + int __protocol) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __prioceiling) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, + int __prioceiling) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr, + int *__robustness) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr, + int *__robustness) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, + int __robustness) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, + int __robustness) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, + __const pthread_rwlockattr_t *__restrict + __attr) throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, + __const struct timespec *__restrict + __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, + __const struct timespec *__restrict + __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * + __restrict __attr, + int *__restrict __pshared) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, + int __pshared) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t * + __restrict __attr, + int *__restrict __pref) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, + int __pref) throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_cond_init (pthread_cond_t *__restrict __cond, + __const pthread_condattr_t *__restrict + __cond_attr) throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_cond_destroy (pthread_cond_t *__cond) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_cond_signal (pthread_cond_t *__cond) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_cond_broadcast (pthread_cond_t *__cond) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex) + __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex, + __const struct timespec *__restrict + __abstime) __attribute__ ((__nonnull__ (1, 2, 3))); +extern int pthread_condattr_init (pthread_condattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_condattr_destroy (pthread_condattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_condattr_getpshared (__const pthread_condattr_t * + __restrict __attr, + int *__restrict __pshared) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, + int __pshared) throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_condattr_getclock (__const pthread_condattr_t * + __restrict __attr, + __clockid_t *__restrict __clock_id) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_condattr_setclock (pthread_condattr_t *__attr, + __clockid_t __clock_id) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_spin_destroy (pthread_spinlock_t *__lock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_spin_lock (pthread_spinlock_t *__lock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_spin_trylock (pthread_spinlock_t *__lock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_spin_unlock (pthread_spinlock_t *__lock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, + __const pthread_barrierattr_t *__restrict + __attr, unsigned int __count) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_barrier_wait (pthread_barrier_t *__barrier) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * + __restrict __attr, + int *__restrict __pshared) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, + int __pshared) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_key_create (pthread_key_t *__key, + void (*__destr_function) (void *)) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_key_delete (pthread_key_t __key) throw (); +extern void *pthread_getspecific (pthread_key_t __key) throw (); +extern int pthread_setspecific (pthread_key_t __key, + __const void *__pointer) throw () ; +extern int pthread_getcpuclockid (pthread_t __thread_id, + __clockid_t *__clock_id) + throw () __attribute__ ((__nonnull__ (2))); +extern int pthread_atfork (void (*__prepare) (void), + void (*__parent) (void), + void (*__child) (void)) throw (); +extern __inline __attribute__ ((__gnu_inline__)) int +pthread_equal (pthread_t __thread1, pthread_t __thread2) throw () +{ + return __thread1 == __thread2; +} +} +extern "C" { +typedef __ssize_t ssize_t; +typedef __gid_t gid_t; +typedef __uid_t uid_t; +typedef __off_t off_t; +typedef __off64_t off64_t; +typedef __useconds_t useconds_t; +typedef __intptr_t intptr_t; +typedef __socklen_t socklen_t; +extern int access (__const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); +extern int euidaccess (__const char *__name, int __type) + throw () __attribute__ ((__nonnull__ (1))); +extern int eaccess (__const char *__name, int __type) + throw () __attribute__ ((__nonnull__ (1))); +extern int faccessat (int __fd, __const char *__file, int __type, int __flag) + throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); +extern __off_t lseek (int __fd, __off_t __offset, int __whence) throw (); +extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) + throw (); +extern int close (int __fd); +extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__)); +extern ssize_t write (int __fd, __const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__)); +extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, + __off_t __offset) __attribute__ ((__warn_unused_result__)); +extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n, + __off_t __offset) __attribute__ ((__warn_unused_result__)); +extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset) __attribute__ ((__warn_unused_result__)); +extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n, + __off64_t __offset) __attribute__ ((__warn_unused_result__)); +extern int pipe (int __pipedes[2]) throw () __attribute__ ((__warn_unused_result__)); +extern int pipe2 (int __pipedes[2], int __flags) throw () __attribute__ ((__warn_unused_result__)); +extern unsigned int alarm (unsigned int __seconds) throw (); +extern unsigned int sleep (unsigned int __seconds); +extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) + throw (); +extern int usleep (__useconds_t __useconds); +extern int pause (void); +extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw () __attribute__ ((__warn_unused_result__)); +extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int fchownat (int __fd, __const char *__file, __uid_t __owner, + __gid_t __group, int __flag) + throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); +extern int chdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int fchdir (int __fd) throw () __attribute__ ((__warn_unused_result__)); +extern char *getcwd (char *__buf, size_t __size) throw () __attribute__ ((__warn_unused_result__)); +extern char *get_current_dir_name (void) throw (); +extern char *getwd (char *__buf) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)); +extern int dup (int __fd) throw () __attribute__ ((__warn_unused_result__)); +extern int dup2 (int __fd, int __fd2) throw (); +extern int dup3 (int __fd, int __fd2, int __flags) throw (); +extern char **__environ; +extern char **environ; +extern int execve (__const char *__path, char *__const __argv[], + char *__const __envp[]) throw () __attribute__ ((__nonnull__ (1))); +extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[]) + throw (); +extern int execv (__const char *__path, char *__const __argv[]) + throw () __attribute__ ((__nonnull__ (1))); +extern int execle (__const char *__path, __const char *__arg, ...) + throw () __attribute__ ((__nonnull__ (1))); +extern int execl (__const char *__path, __const char *__arg, ...) + throw () __attribute__ ((__nonnull__ (1))); +extern int execvp (__const char *__file, char *__const __argv[]) + throw () __attribute__ ((__nonnull__ (1))); +extern int execlp (__const char *__file, __const char *__arg, ...) + throw () __attribute__ ((__nonnull__ (1))); +extern int execvpe (__const char *__file, char *__const __argv[], + char *__const __envp[]) + throw () __attribute__ ((__nonnull__ (1))); +extern int nice (int __inc) throw () __attribute__ ((__warn_unused_result__)); +extern void _exit (int __status) __attribute__ ((__noreturn__)); +enum + { + _PC_LINK_MAX, + _PC_MAX_CANON, + _PC_MAX_INPUT, + _PC_NAME_MAX, + _PC_PATH_MAX, + _PC_PIPE_BUF, + _PC_CHOWN_RESTRICTED, + _PC_NO_TRUNC, + _PC_VDISABLE, + _PC_SYNC_IO, + _PC_ASYNC_IO, + _PC_PRIO_IO, + _PC_SOCK_MAXBUF, + _PC_FILESIZEBITS, + _PC_REC_INCR_XFER_SIZE, + _PC_REC_MAX_XFER_SIZE, + _PC_REC_MIN_XFER_SIZE, + _PC_REC_XFER_ALIGN, + _PC_ALLOC_SIZE_MIN, + _PC_SYMLINK_MAX, + _PC_2_SYMLINKS + }; +enum + { + _SC_ARG_MAX, + _SC_CHILD_MAX, + _SC_CLK_TCK, + _SC_NGROUPS_MAX, + _SC_OPEN_MAX, + _SC_STREAM_MAX, + _SC_TZNAME_MAX, + _SC_JOB_CONTROL, + _SC_SAVED_IDS, + _SC_REALTIME_SIGNALS, + _SC_PRIORITY_SCHEDULING, + _SC_TIMERS, + _SC_ASYNCHRONOUS_IO, + _SC_PRIORITIZED_IO, + _SC_SYNCHRONIZED_IO, + _SC_FSYNC, + _SC_MAPPED_FILES, + _SC_MEMLOCK, + _SC_MEMLOCK_RANGE, + _SC_MEMORY_PROTECTION, + _SC_MESSAGE_PASSING, + _SC_SEMAPHORES, + _SC_SHARED_MEMORY_OBJECTS, + _SC_AIO_LISTIO_MAX, + _SC_AIO_MAX, + _SC_AIO_PRIO_DELTA_MAX, + _SC_DELAYTIMER_MAX, + _SC_MQ_OPEN_MAX, + _SC_MQ_PRIO_MAX, + _SC_VERSION, + _SC_PAGESIZE, + _SC_RTSIG_MAX, + _SC_SEM_NSEMS_MAX, + _SC_SEM_VALUE_MAX, + _SC_SIGQUEUE_MAX, + _SC_TIMER_MAX, + _SC_BC_BASE_MAX, + _SC_BC_DIM_MAX, + _SC_BC_SCALE_MAX, + _SC_BC_STRING_MAX, + _SC_COLL_WEIGHTS_MAX, + _SC_EQUIV_CLASS_MAX, + _SC_EXPR_NEST_MAX, + _SC_LINE_MAX, + _SC_RE_DUP_MAX, + _SC_CHARCLASS_NAME_MAX, + _SC_2_VERSION, + _SC_2_C_BIND, + _SC_2_C_DEV, + _SC_2_FORT_DEV, + _SC_2_FORT_RUN, + _SC_2_SW_DEV, + _SC_2_LOCALEDEF, + _SC_PII, + _SC_PII_XTI, + _SC_PII_SOCKET, + _SC_PII_INTERNET, + _SC_PII_OSI, + _SC_POLL, + _SC_SELECT, + _SC_UIO_MAXIOV, + _SC_IOV_MAX = _SC_UIO_MAXIOV, + _SC_PII_INTERNET_STREAM, + _SC_PII_INTERNET_DGRAM, + _SC_PII_OSI_COTS, + _SC_PII_OSI_CLTS, + _SC_PII_OSI_M, + _SC_T_IOV_MAX, + _SC_THREADS, + _SC_THREAD_SAFE_FUNCTIONS, + _SC_GETGR_R_SIZE_MAX, + _SC_GETPW_R_SIZE_MAX, + _SC_LOGIN_NAME_MAX, + _SC_TTY_NAME_MAX, + _SC_THREAD_DESTRUCTOR_ITERATIONS, + _SC_THREAD_KEYS_MAX, + _SC_THREAD_STACK_MIN, + _SC_THREAD_THREADS_MAX, + _SC_THREAD_ATTR_STACKADDR, + _SC_THREAD_ATTR_STACKSIZE, + _SC_THREAD_PRIORITY_SCHEDULING, + _SC_THREAD_PRIO_INHERIT, + _SC_THREAD_PRIO_PROTECT, + _SC_THREAD_PROCESS_SHARED, + _SC_NPROCESSORS_CONF, + _SC_NPROCESSORS_ONLN, + _SC_PHYS_PAGES, + _SC_AVPHYS_PAGES, + _SC_ATEXIT_MAX, + _SC_PASS_MAX, + _SC_XOPEN_VERSION, + _SC_XOPEN_XCU_VERSION, + _SC_XOPEN_UNIX, + _SC_XOPEN_CRYPT, + _SC_XOPEN_ENH_I18N, + _SC_XOPEN_SHM, + _SC_2_CHAR_TERM, + _SC_2_C_VERSION, + _SC_2_UPE, + _SC_XOPEN_XPG2, + _SC_XOPEN_XPG3, + _SC_XOPEN_XPG4, + _SC_CHAR_BIT, + _SC_CHAR_MAX, + _SC_CHAR_MIN, + _SC_INT_MAX, + _SC_INT_MIN, + _SC_LONG_BIT, + _SC_WORD_BIT, + _SC_MB_LEN_MAX, + _SC_NZERO, + _SC_SSIZE_MAX, + _SC_SCHAR_MAX, + _SC_SCHAR_MIN, + _SC_SHRT_MAX, + _SC_SHRT_MIN, + _SC_UCHAR_MAX, + _SC_UINT_MAX, + _SC_ULONG_MAX, + _SC_USHRT_MAX, + _SC_NL_ARGMAX, + _SC_NL_LANGMAX, + _SC_NL_MSGMAX, + _SC_NL_NMAX, + _SC_NL_SETMAX, + _SC_NL_TEXTMAX, + _SC_XBS5_ILP32_OFF32, + _SC_XBS5_ILP32_OFFBIG, + _SC_XBS5_LP64_OFF64, + _SC_XBS5_LPBIG_OFFBIG, + _SC_XOPEN_LEGACY, + _SC_XOPEN_REALTIME, + _SC_XOPEN_REALTIME_THREADS, + _SC_ADVISORY_INFO, + _SC_BARRIERS, + _SC_BASE, + _SC_C_LANG_SUPPORT, + _SC_C_LANG_SUPPORT_R, + _SC_CLOCK_SELECTION, + _SC_CPUTIME, + _SC_THREAD_CPUTIME, + _SC_DEVICE_IO, + _SC_DEVICE_SPECIFIC, + _SC_DEVICE_SPECIFIC_R, + _SC_FD_MGMT, + _SC_FIFO, + _SC_PIPE, + _SC_FILE_ATTRIBUTES, + _SC_FILE_LOCKING, + _SC_FILE_SYSTEM, + _SC_MONOTONIC_CLOCK, + _SC_MULTI_PROCESS, + _SC_SINGLE_PROCESS, + _SC_NETWORKING, + _SC_READER_WRITER_LOCKS, + _SC_SPIN_LOCKS, + _SC_REGEXP, + _SC_REGEX_VERSION, + _SC_SHELL, + _SC_SIGNALS, + _SC_SPAWN, + _SC_SPORADIC_SERVER, + _SC_THREAD_SPORADIC_SERVER, + _SC_SYSTEM_DATABASE, + _SC_SYSTEM_DATABASE_R, + _SC_TIMEOUTS, + _SC_TYPED_MEMORY_OBJECTS, + _SC_USER_GROUPS, + _SC_USER_GROUPS_R, + _SC_2_PBS, + _SC_2_PBS_ACCOUNTING, + _SC_2_PBS_LOCATE, + _SC_2_PBS_MESSAGE, + _SC_2_PBS_TRACK, + _SC_SYMLOOP_MAX, + _SC_STREAMS, + _SC_2_PBS_CHECKPOINT, + _SC_V6_ILP32_OFF32, + _SC_V6_ILP32_OFFBIG, + _SC_V6_LP64_OFF64, + _SC_V6_LPBIG_OFFBIG, + _SC_HOST_NAME_MAX, + _SC_TRACE, + _SC_TRACE_EVENT_FILTER, + _SC_TRACE_INHERIT, + _SC_TRACE_LOG, + _SC_LEVEL1_ICACHE_SIZE, + _SC_LEVEL1_ICACHE_ASSOC, + _SC_LEVEL1_ICACHE_LINESIZE, + _SC_LEVEL1_DCACHE_SIZE, + _SC_LEVEL1_DCACHE_ASSOC, + _SC_LEVEL1_DCACHE_LINESIZE, + _SC_LEVEL2_CACHE_SIZE, + _SC_LEVEL2_CACHE_ASSOC, + _SC_LEVEL2_CACHE_LINESIZE, + _SC_LEVEL3_CACHE_SIZE, + _SC_LEVEL3_CACHE_ASSOC, + _SC_LEVEL3_CACHE_LINESIZE, + _SC_LEVEL4_CACHE_SIZE, + _SC_LEVEL4_CACHE_ASSOC, + _SC_LEVEL4_CACHE_LINESIZE, + _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, + _SC_RAW_SOCKETS, + _SC_V7_ILP32_OFF32, + _SC_V7_ILP32_OFFBIG, + _SC_V7_LP64_OFF64, + _SC_V7_LPBIG_OFFBIG, + _SC_SS_REPL_MAX, + _SC_TRACE_EVENT_NAME_MAX, + _SC_TRACE_NAME_MAX, + _SC_TRACE_SYS_MAX, + _SC_TRACE_USER_EVENT_MAX, + _SC_XOPEN_STREAMS, + _SC_THREAD_ROBUST_PRIO_INHERIT, + _SC_THREAD_ROBUST_PRIO_PROTECT, + }; +enum + { + _CS_PATH, + _CS_V6_WIDTH_RESTRICTED_ENVS, + _CS_GNU_LIBC_VERSION, + _CS_GNU_LIBPTHREAD_VERSION, + _CS_V5_WIDTH_RESTRICTED_ENVS, + _CS_V7_WIDTH_RESTRICTED_ENVS, + _CS_LFS_CFLAGS = 1000, + _CS_LFS_LDFLAGS, + _CS_LFS_LIBS, + _CS_LFS_LINTFLAGS, + _CS_LFS64_CFLAGS, + _CS_LFS64_LDFLAGS, + _CS_LFS64_LIBS, + _CS_LFS64_LINTFLAGS, + _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, + _CS_XBS5_ILP32_OFF32_LDFLAGS, + _CS_XBS5_ILP32_OFF32_LIBS, + _CS_XBS5_ILP32_OFF32_LINTFLAGS, + _CS_XBS5_ILP32_OFFBIG_CFLAGS, + _CS_XBS5_ILP32_OFFBIG_LDFLAGS, + _CS_XBS5_ILP32_OFFBIG_LIBS, + _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, + _CS_XBS5_LP64_OFF64_CFLAGS, + _CS_XBS5_LP64_OFF64_LDFLAGS, + _CS_XBS5_LP64_OFF64_LIBS, + _CS_XBS5_LP64_OFF64_LINTFLAGS, + _CS_XBS5_LPBIG_OFFBIG_CFLAGS, + _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, + _CS_XBS5_LPBIG_OFFBIG_LIBS, + _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, + _CS_POSIX_V6_ILP32_OFF32_CFLAGS, + _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, + _CS_POSIX_V6_ILP32_OFF32_LIBS, + _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, + _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, + _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, + _CS_POSIX_V6_ILP32_OFFBIG_LIBS, + _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, + _CS_POSIX_V6_LP64_OFF64_CFLAGS, + _CS_POSIX_V6_LP64_OFF64_LDFLAGS, + _CS_POSIX_V6_LP64_OFF64_LIBS, + _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, + _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, + _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, + _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, + _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, + _CS_POSIX_V7_ILP32_OFF32_CFLAGS, + _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, + _CS_POSIX_V7_ILP32_OFF32_LIBS, + _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, + _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, + _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, + _CS_POSIX_V7_ILP32_OFFBIG_LIBS, + _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, + _CS_POSIX_V7_LP64_OFF64_CFLAGS, + _CS_POSIX_V7_LP64_OFF64_LDFLAGS, + _CS_POSIX_V7_LP64_OFF64_LIBS, + _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, + _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, + _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, + _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, + _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS + }; +extern long int pathconf (__const char *__path, int __name) + throw () __attribute__ ((__nonnull__ (1))); +extern long int fpathconf (int __fd, int __name) throw (); +extern long int sysconf (int __name) throw (); +extern size_t confstr (int __name, char *__buf, size_t __len) throw (); +extern __pid_t getpid (void) throw (); +extern __pid_t getppid (void) throw (); +extern __pid_t getpgrp (void) throw (); +extern __pid_t __getpgid (__pid_t __pid) throw (); +extern __pid_t getpgid (__pid_t __pid) throw (); +extern int setpgid (__pid_t __pid, __pid_t __pgid) throw (); +extern int setpgrp (void) throw (); +extern __pid_t setsid (void) throw (); +extern __pid_t getsid (__pid_t __pid) throw (); +extern __uid_t getuid (void) throw (); +extern __uid_t geteuid (void) throw (); +extern __gid_t getgid (void) throw (); +extern __gid_t getegid (void) throw (); +extern int getgroups (int __size, __gid_t __list[]) throw () __attribute__ ((__warn_unused_result__)); +extern int group_member (__gid_t __gid) throw (); +extern int setuid (__uid_t __uid) throw (); +extern int setreuid (__uid_t __ruid, __uid_t __euid) throw (); +extern int seteuid (__uid_t __uid) throw (); +extern int setgid (__gid_t __gid) throw (); +extern int setregid (__gid_t __rgid, __gid_t __egid) throw (); +extern int setegid (__gid_t __gid) throw (); +extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) + throw (); +extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) + throw (); +extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) + throw (); +extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) + throw (); +extern __pid_t fork (void) throw (); +extern __pid_t vfork (void) throw (); +extern char *ttyname (int __fd) throw (); +extern int ttyname_r (int __fd, char *__buf, size_t __buflen) + throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); +extern int isatty (int __fd) throw (); +extern int ttyslot (void) throw (); +extern int link (__const char *__from, __const char *__to) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); +extern int linkat (int __fromfd, __const char *__from, int __tofd, + __const char *__to, int __flags) + throw () __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__)); +extern int symlink (__const char *__from, __const char *__to) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); +extern ssize_t readlink (__const char *__restrict __path, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); +extern int symlinkat (__const char *__from, int __tofd, + __const char *__to) throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); +extern ssize_t readlinkat (int __fd, __const char *__restrict __path, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); +extern int unlink (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); +extern int unlinkat (int __fd, __const char *__name, int __flag) + throw () __attribute__ ((__nonnull__ (2))); +extern int rmdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))); +extern __pid_t tcgetpgrp (int __fd) throw (); +extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw (); +extern char *getlogin (void); +extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); +extern int setlogin (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); +extern "C" { +extern char *optarg; +extern int optind; +extern int opterr; +extern int optopt; +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) + throw (); +} +extern int gethostname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))); +extern int sethostname (__const char *__name, size_t __len) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int sethostid (long int __id) throw () __attribute__ ((__warn_unused_result__)); +extern int getdomainname (char *__name, size_t __len) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int setdomainname (__const char *__name, size_t __len) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int vhangup (void) throw (); +extern int revoke (__const char *__file) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int profil (unsigned short int *__sample_buffer, size_t __size, + size_t __offset, unsigned int __scale) + throw () __attribute__ ((__nonnull__ (1))); +extern int acct (__const char *__name) throw (); +extern char *getusershell (void) throw (); +extern void endusershell (void) throw (); +extern void setusershell (void) throw (); +extern int daemon (int __nochdir, int __noclose) throw () __attribute__ ((__warn_unused_result__)); +extern int chroot (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1))); +extern int fsync (int __fd); +extern long int gethostid (void); +extern void sync (void) throw (); +extern int getpagesize (void) throw () __attribute__ ((__const__)); +extern int getdtablesize (void) throw (); +extern int truncate (__const char *__file, __off_t __length) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int truncate64 (__const char *__file, __off64_t __length) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int ftruncate (int __fd, __off_t __length) throw () __attribute__ ((__warn_unused_result__)); +extern int ftruncate64 (int __fd, __off64_t __length) throw () __attribute__ ((__warn_unused_result__)); +extern int brk (void *__addr) throw () __attribute__ ((__warn_unused_result__)); +extern void *sbrk (intptr_t __delta) throw (); +extern long int syscall (long int __sysno, ...) throw (); +extern int lockf (int __fd, int __cmd, __off_t __len) __attribute__ ((__warn_unused_result__)); +extern int lockf64 (int __fd, int __cmd, __off64_t __len) __attribute__ ((__warn_unused_result__)); +extern int fdatasync (int __fildes); +extern char *crypt (__const char *__key, __const char *__salt) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void encrypt (char *__block, int __edflag) throw () __attribute__ ((__nonnull__ (1))); +extern void swab (__const void *__restrict __from, void *__restrict __to, + ssize_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *ctermid (char *__s) throw (); +extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes, + size_t __buflen) __attribute__ ((__warn_unused_result__)); +extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read") + __attribute__ ((__warn_unused_result__)); +extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t +read (int __fd, void *__buf, size_t __nbytes) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__nbytes)) + return __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); + if (__nbytes > __builtin_object_size (__buf, 0)) + return __read_chk_warn (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); + } + return __read_alias (__fd, __buf, __nbytes); +} +extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes, + __off_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread") + __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") + __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread called with bigger length than size of " "the destination buffer"))) + ; +extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread64 called with bigger length than size of " "the destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t +pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__nbytes)) + return __pread_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)); + if ( __nbytes > __builtin_object_size (__buf, 0)) + return __pread_chk_warn (__fd, __buf, __nbytes, __offset, + __builtin_object_size (__buf, 0)); + } + return __pread_alias (__fd, __buf, __nbytes, __offset); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t +pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__nbytes)) + return __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)); + if ( __nbytes > __builtin_object_size (__buf, 0)) + return __pread64_chk_warn (__fd, __buf, __nbytes, __offset, + __builtin_object_size (__buf, 0)); + } + return __pread64_alias (__fd, __buf, __nbytes, __offset); +} +extern ssize_t __readlink_chk (__const char *__restrict __path, + char *__restrict __buf, size_t __len, + size_t __buflen) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlink_alias (__const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __asm__ ("" "readlink") + __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlink_chk_warn (__const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__readlink_chk") + __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t +readlink (__const char *__restrict __path, char *__restrict __buf, size_t __len) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + if ( __len > __builtin_object_size (__buf, 2 > 1)) + return __readlink_chk_warn (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + } + return __readlink_alias (__path, __buf, __len); +} +extern ssize_t __readlinkat_chk (int __fd, __const char *__restrict __path, + char *__restrict __buf, size_t __len, + size_t __buflen) + throw () __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlinkat_alias (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __asm__ ("" "readlinkat") + __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlinkat_chk_warn (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__readlinkat_chk") + __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t +readlinkat (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __readlinkat_chk (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + if (__len > __builtin_object_size (__buf, 2 > 1)) + return __readlinkat_chk_warn (__fd, __path, __buf, __len, + __builtin_object_size (__buf, 2 > 1)); + } + return __readlinkat_alias (__fd, __path, __buf, __len); +} +extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen) + throw () __attribute__ ((__warn_unused_result__)); +extern char *__getcwd_alias (char *__buf, size_t __size) throw () __asm__ ("" "getcwd") + __attribute__ ((__warn_unused_result__)); +extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) throw () __asm__ ("" "__getcwd_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +getcwd (char *__buf, size_t __size) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__size)) + return __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1)); + if (__size > __builtin_object_size (__buf, 2 > 1)) + return __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1)); + } + return __getcwd_alias (__buf, __size); +} +extern char *__getwd_chk (char *__buf, size_t buflen) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern char *__getwd_warn (char *__buf) throw () __asm__ ("" "getwd") + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char * +getwd (char *__buf) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1)); + return __getwd_warn (__buf); +} +extern size_t __confstr_chk (int __name, char *__buf, size_t __len, + size_t __buflen) throw (); +extern size_t __confstr_alias (int __name, char *__buf, size_t __len) throw () __asm__ ("" "confstr") + ; +extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__confstr_chk") + __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +confstr (int __name, char *__buf, size_t __len) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + if (__builtin_object_size (__buf, 2 > 1) < __len) + return __confstr_chk_warn (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + } + return __confstr_alias (__name, __buf, __len); +} +extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen) + throw () __attribute__ ((__warn_unused_result__)); +extern int __getgroups_alias (int __size, __gid_t __list[]) throw () __asm__ ("" "getgroups") + __attribute__ ((__warn_unused_result__)); +extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) throw () __asm__ ("" "__getgroups_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +getgroups (int __size, __gid_t __list[]) throw () +{ + if (__builtin_object_size (__list, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__size) || __size < 0) + return __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1)); + if (__size * sizeof (__gid_t) > __builtin_object_size (__list, 2 > 1)) + return __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1)); + } + return __getgroups_alias (__size, __list); +} +extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen, + size_t __nreal) throw () __attribute__ ((__nonnull__ (2))); +extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) throw () __asm__ ("" "ttyname_r") + __attribute__ ((__nonnull__ (2))); +extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__ttyname_r_chk") + __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +ttyname_r (int __fd, char *__buf, size_t __buflen) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __ttyname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __ttyname_r_alias (__fd, __buf, __buflen); +} +extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal) + __attribute__ ((__nonnull__ (1))); +extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r") + __attribute__ ((__nonnull__ (1))); +extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk") + __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +getlogin_r (char *__buf, size_t __buflen) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __getlogin_r_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __getlogin_r_alias (__buf, __buflen); +} +extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal) + throw () __attribute__ ((__nonnull__ (1))); +extern int __gethostname_alias (char *__buf, size_t __buflen) throw () __asm__ ("" "gethostname") + __attribute__ ((__nonnull__ (1))); +extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__gethostname_chk") + __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +gethostname (char *__buf, size_t __buflen) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __gethostname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __gethostname_alias (__buf, __buflen); +} +extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int __getdomainname_alias (char *__buf, size_t __buflen) throw () __asm__ ("" "getdomainname") + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__getdomainname_chk") + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +getdomainname (char *__buf, size_t __buflen) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __getdomainname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __getdomainname_alias (__buf, __buflen); +} +} +typedef pthread_t __gthread_t; +typedef pthread_key_t __gthread_key_t; +typedef pthread_once_t __gthread_once_t; +typedef pthread_mutex_t __gthread_mutex_t; +typedef pthread_mutex_t __gthread_recursive_mutex_t; +typedef pthread_cond_t __gthread_cond_t; +typedef struct timespec __gthread_time_t; +static __typeof(pthread_once) __gthrw_pthread_once __attribute__ ((__weakref__("pthread_once"))); +static __typeof(pthread_getspecific) __gthrw_pthread_getspecific __attribute__ ((__weakref__("pthread_getspecific"))); +static __typeof(pthread_setspecific) __gthrw_pthread_setspecific __attribute__ ((__weakref__("pthread_setspecific"))); +static __typeof(pthread_create) __gthrw_pthread_create __attribute__ ((__weakref__("pthread_create"))); +static __typeof(pthread_join) __gthrw_pthread_join __attribute__ ((__weakref__("pthread_join"))); +static __typeof(pthread_equal) __gthrw_pthread_equal __attribute__ ((__weakref__("pthread_equal"))); +static __typeof(pthread_self) __gthrw_pthread_self __attribute__ ((__weakref__("pthread_self"))); +static __typeof(pthread_detach) __gthrw_pthread_detach __attribute__ ((__weakref__("pthread_detach"))); +static __typeof(pthread_cancel) __gthrw_pthread_cancel __attribute__ ((__weakref__("pthread_cancel"))); +static __typeof(sched_yield) __gthrw_sched_yield __attribute__ ((__weakref__("sched_yield"))); +static __typeof(pthread_mutex_lock) __gthrw_pthread_mutex_lock __attribute__ ((__weakref__("pthread_mutex_lock"))); +static __typeof(pthread_mutex_trylock) __gthrw_pthread_mutex_trylock __attribute__ ((__weakref__("pthread_mutex_trylock"))); +static __typeof(pthread_mutex_timedlock) __gthrw_pthread_mutex_timedlock __attribute__ ((__weakref__("pthread_mutex_timedlock"))); +static __typeof(pthread_mutex_unlock) __gthrw_pthread_mutex_unlock __attribute__ ((__weakref__("pthread_mutex_unlock"))); +static __typeof(pthread_mutex_init) __gthrw_pthread_mutex_init __attribute__ ((__weakref__("pthread_mutex_init"))); +static __typeof(pthread_mutex_destroy) __gthrw_pthread_mutex_destroy __attribute__ ((__weakref__("pthread_mutex_destroy"))); +static __typeof(pthread_cond_broadcast) __gthrw_pthread_cond_broadcast __attribute__ ((__weakref__("pthread_cond_broadcast"))); +static __typeof(pthread_cond_signal) __gthrw_pthread_cond_signal __attribute__ ((__weakref__("pthread_cond_signal"))); +static __typeof(pthread_cond_wait) __gthrw_pthread_cond_wait __attribute__ ((__weakref__("pthread_cond_wait"))); +static __typeof(pthread_cond_timedwait) __gthrw_pthread_cond_timedwait __attribute__ ((__weakref__("pthread_cond_timedwait"))); +static __typeof(pthread_cond_destroy) __gthrw_pthread_cond_destroy __attribute__ ((__weakref__("pthread_cond_destroy"))); +static __typeof(pthread_key_create) __gthrw_pthread_key_create __attribute__ ((__weakref__("pthread_key_create"))); +static __typeof(pthread_key_delete) __gthrw_pthread_key_delete __attribute__ ((__weakref__("pthread_key_delete"))); +static __typeof(pthread_mutexattr_init) __gthrw_pthread_mutexattr_init __attribute__ ((__weakref__("pthread_mutexattr_init"))); +static __typeof(pthread_mutexattr_settype) __gthrw_pthread_mutexattr_settype __attribute__ ((__weakref__("pthread_mutexattr_settype"))); +static __typeof(pthread_mutexattr_destroy) __gthrw_pthread_mutexattr_destroy __attribute__ ((__weakref__("pthread_mutexattr_destroy"))); +static inline int +__gthread_active_p (void) +{ + static void *const __gthread_active_ptr + = __extension__ (void *) &__gthrw_pthread_cancel; + return __gthread_active_ptr != 0; +} +static inline int +__gthread_create (__gthread_t *__threadid, void *(*__func) (void*), + void *__args) +{ + return __gthrw_pthread_create (__threadid, __null, __func, __args); +} +static inline int +__gthread_join (__gthread_t __threadid, void **__value_ptr) +{ + return __gthrw_pthread_join (__threadid, __value_ptr); +} +static inline int +__gthread_detach (__gthread_t __threadid) +{ + return __gthrw_pthread_detach (__threadid); +} +static inline int +__gthread_equal (__gthread_t __t1, __gthread_t __t2) +{ + return __gthrw_pthread_equal (__t1, __t2); +} +static inline __gthread_t +__gthread_self (void) +{ + return __gthrw_pthread_self (); +} +static inline int +__gthread_yield (void) +{ + return __gthrw_sched_yield (); +} +static inline int +__gthread_once (__gthread_once_t *__once, void (*__func) (void)) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_once (__once, __func); + else + return -1; +} +static inline int +__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *)) +{ + return __gthrw_pthread_key_create (__key, __dtor); +} +static inline int +__gthread_key_delete (__gthread_key_t __key) +{ + return __gthrw_pthread_key_delete (__key); +} +static inline void * +__gthread_getspecific (__gthread_key_t __key) +{ + return __gthrw_pthread_getspecific (__key); +} +static inline int +__gthread_setspecific (__gthread_key_t __key, const void *__ptr) +{ + return __gthrw_pthread_setspecific (__key, __ptr); +} +static inline int +__gthread_mutex_destroy (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_destroy (__mutex); + else + return 0; +} +static inline int +__gthread_mutex_lock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_lock (__mutex); + else + return 0; +} +static inline int +__gthread_mutex_trylock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_trylock (__mutex); + else + return 0; +} +static inline int +__gthread_mutex_timedlock (__gthread_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_timedlock (__mutex, __abs_timeout); + else + return 0; +} +static inline int +__gthread_mutex_unlock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_unlock (__mutex); + else + return 0; +} +static inline int +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_lock (__mutex); +} +static inline int +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_trylock (__mutex); +} +static inline int +__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return __gthread_mutex_timedlock (__mutex, __abs_timeout); +} +static inline int +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_unlock (__mutex); +} +static inline int +__gthread_cond_broadcast (__gthread_cond_t *__cond) +{ + return __gthrw_pthread_cond_broadcast (__cond); +} +static inline int +__gthread_cond_signal (__gthread_cond_t *__cond) +{ + return __gthrw_pthread_cond_signal (__cond); +} +static inline int +__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex) +{ + return __gthrw_pthread_cond_wait (__cond, __mutex); +} +static inline int +__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return __gthrw_pthread_cond_timedwait (__cond, __mutex, __abs_timeout); +} +static inline int +__gthread_cond_wait_recursive (__gthread_cond_t *__cond, + __gthread_recursive_mutex_t *__mutex) +{ + return __gthread_cond_wait (__cond, __mutex); +} +static inline int +__gthread_cond_timedwait_recursive (__gthread_cond_t *__cond, + __gthread_recursive_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return __gthread_cond_timedwait (__cond, __mutex, __abs_timeout); +} +static inline int +__gthread_cond_destroy (__gthread_cond_t* __cond) +{ + return __gthrw_pthread_cond_destroy (__cond); +} +typedef int _Atomic_word; +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + static inline _Atomic_word + __exchange_and_add(volatile _Atomic_word* __mem, int __val) + { return __sync_fetch_and_add(__mem, __val); } + static inline void + __atomic_add(volatile _Atomic_word* __mem, int __val) + { __sync_fetch_and_add(__mem, __val); } + static inline _Atomic_word + __exchange_and_add_single(_Atomic_word* __mem, int __val) + { + _Atomic_word __result = *__mem; + *__mem += __val; + return __result; + } + static inline void + __atomic_add_single(_Atomic_word* __mem, int __val) + { *__mem += __val; } + static inline _Atomic_word + __attribute__ ((__unused__)) + __exchange_and_add_dispatch(_Atomic_word* __mem, int __val) + { + if (__gthread_active_p()) + return __exchange_and_add(__mem, __val); + else + return __exchange_and_add_single(__mem, __val); + } + static inline void + __attribute__ ((__unused__)) + __atomic_add_dispatch(_Atomic_word* __mem, int __val) + { + if (__gthread_active_p()) + __atomic_add(__mem, __val); + else + __atomic_add_single(__mem, __val); + } +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + class basic_string + { + typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type; + public: + typedef _Traits traits_type; + typedef typename _Traits::char_type value_type; + typedef _Alloc allocator_type; + typedef typename _CharT_alloc_type::size_type size_type; + typedef typename _CharT_alloc_type::difference_type difference_type; + typedef typename _CharT_alloc_type::reference reference; + typedef typename _CharT_alloc_type::const_reference const_reference; + typedef typename _CharT_alloc_type::pointer pointer; + typedef typename _CharT_alloc_type::const_pointer const_pointer; + typedef __gnu_cxx::__normal_iterator iterator; + typedef __gnu_cxx::__normal_iterator + const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + private: + struct _Rep_base + { + size_type _M_length; + size_type _M_capacity; + _Atomic_word _M_refcount; + }; + struct _Rep : _Rep_base + { + typedef typename _Alloc::template rebind::other _Raw_bytes_alloc; + static const size_type _S_max_size; + static const _CharT _S_terminal; + static size_type _S_empty_rep_storage[]; + static _Rep& + _S_empty_rep() + { + void* __p = reinterpret_cast(&_S_empty_rep_storage); + return *reinterpret_cast<_Rep*>(__p); + } + bool + _M_is_leaked() const + { return this->_M_refcount < 0; } + bool + _M_is_shared() const + { return this->_M_refcount > 0; } + void + _M_set_leaked() + { this->_M_refcount = -1; } + void + _M_set_sharable() + { this->_M_refcount = 0; } + void + _M_set_length_and_sharable(size_type __n) + { + if (__builtin_expect(this != &_S_empty_rep(), false)) + { + this->_M_set_sharable(); + this->_M_length = __n; + traits_type::assign(this->_M_refdata()[__n], _S_terminal); + } + } + _CharT* + _M_refdata() throw() + { return reinterpret_cast<_CharT*>(this + 1); } + _CharT* + _M_grab(const _Alloc& __alloc1, const _Alloc& __alloc2) + { + return (!_M_is_leaked() && __alloc1 == __alloc2) + ? _M_refcopy() : _M_clone(__alloc1); + } + static _Rep* + _S_create(size_type, size_type, const _Alloc&); + void + _M_dispose(const _Alloc& __a) + { + if (__builtin_expect(this != &_S_empty_rep(), false)) + if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount, + -1) <= 0) + _M_destroy(__a); + } + void + _M_destroy(const _Alloc&) throw(); + _CharT* + _M_refcopy() throw() + { + if (__builtin_expect(this != &_S_empty_rep(), false)) + __gnu_cxx::__atomic_add_dispatch(&this->_M_refcount, 1); + return _M_refdata(); + } + _CharT* + _M_clone(const _Alloc&, size_type __res = 0); + }; + struct _Alloc_hider : _Alloc + { + _Alloc_hider(_CharT* __dat, const _Alloc& __a) + : _Alloc(__a), _M_p(__dat) { } + _CharT* _M_p; + }; + public: + static const size_type npos = static_cast(-1); + private: + mutable _Alloc_hider _M_dataplus; + _CharT* + _M_data() const + { return _M_dataplus._M_p; } + _CharT* + _M_data(_CharT* __p) + { return (_M_dataplus._M_p = __p); } + _Rep* + _M_rep() const + { return &((reinterpret_cast<_Rep*> (_M_data()))[-1]); } + iterator + _M_ibegin() const + { return iterator(_M_data()); } + iterator + _M_iend() const + { return iterator(_M_data() + this->size()); } + void + _M_leak() + { + if (!_M_rep()->_M_is_leaked()) + _M_leak_hard(); + } + size_type + _M_check(size_type __pos, const char* __s) const + { + if (__pos > this->size()) + __throw_out_of_range((__s)); + return __pos; + } + void + _M_check_length(size_type __n1, size_type __n2, const char* __s) const + { + if (this->max_size() - (this->size() - __n1) < __n2) + __throw_length_error((__s)); + } + size_type + _M_limit(size_type __pos, size_type __off) const + { + const bool __testoff = __off < this->size() - __pos; + return __testoff ? __off : this->size() - __pos; + } + bool + _M_disjunct(const _CharT* __s) const + { + return (less()(__s, _M_data()) + || less()(_M_data() + this->size(), __s)); + } + static void + _M_copy(_CharT* __d, const _CharT* __s, size_type __n) + { + if (__n == 1) + traits_type::assign(*__d, *__s); + else + traits_type::copy(__d, __s, __n); + } + static void + _M_move(_CharT* __d, const _CharT* __s, size_type __n) + { + if (__n == 1) + traits_type::assign(*__d, *__s); + else + traits_type::move(__d, __s, __n); + } + static void + _M_assign(_CharT* __d, size_type __n, _CharT __c) + { + if (__n == 1) + traits_type::assign(*__d, __c); + else + traits_type::assign(__d, __n, __c); + } + template + static void + _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) + { + for (; __k1 != __k2; ++__k1, ++__p) + traits_type::assign(*__p, *__k1); + } + static void + _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) + { _S_copy_chars(__p, __k1.base(), __k2.base()); } + static void + _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) + { _S_copy_chars(__p, __k1.base(), __k2.base()); } + static void + _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) + { _M_copy(__p, __k1, __k2 - __k1); } + static void + _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) + { _M_copy(__p, __k1, __k2 - __k1); } + static int + _S_compare(size_type __n1, size_type __n2) + { + const difference_type __d = difference_type(__n1 - __n2); + if (__d > __gnu_cxx::__numeric_traits::__max) + return __gnu_cxx::__numeric_traits::__max; + else if (__d < __gnu_cxx::__numeric_traits::__min) + return __gnu_cxx::__numeric_traits::__min; + else + return int(__d); + } + void + _M_mutate(size_type __pos, size_type __len1, size_type __len2); + void + _M_leak_hard(); + static _Rep& + _S_empty_rep() + { return _Rep::_S_empty_rep(); } + public: + basic_string() + : _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) { } + explicit + basic_string(const _Alloc& __a); + basic_string(const basic_string& __str); + basic_string(const basic_string& __str, size_type __pos, + size_type __n = npos); + basic_string(const basic_string& __str, size_type __pos, + size_type __n, const _Alloc& __a); + basic_string(const _CharT* __s, size_type __n, + const _Alloc& __a = _Alloc()); + basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()); + basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()); + template + basic_string(_InputIterator __beg, _InputIterator __end, + const _Alloc& __a = _Alloc()); + ~basic_string() + { _M_rep()->_M_dispose(this->get_allocator()); } + basic_string& + operator=(const basic_string& __str) + { return this->assign(__str); } + basic_string& + operator=(const _CharT* __s) + { return this->assign(__s); } + basic_string& + operator=(_CharT __c) + { + this->assign(1, __c); + return *this; + } + iterator + begin() + { + _M_leak(); + return iterator(_M_data()); + } + const_iterator + begin() const + { return const_iterator(_M_data()); } + iterator + end() + { + _M_leak(); + return iterator(_M_data() + this->size()); + } + const_iterator + end() const + { return const_iterator(_M_data() + this->size()); } + reverse_iterator + rbegin() + { return reverse_iterator(this->end()); } + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(this->end()); } + reverse_iterator + rend() + { return reverse_iterator(this->begin()); } + const_reverse_iterator + rend() const + { return const_reverse_iterator(this->begin()); } + public: + size_type + size() const + { return _M_rep()->_M_length; } + size_type + length() const + { return _M_rep()->_M_length; } + size_type + max_size() const + { return _Rep::_S_max_size; } + void + resize(size_type __n, _CharT __c); + void + resize(size_type __n) + { this->resize(__n, _CharT()); } + size_type + capacity() const + { return _M_rep()->_M_capacity; } + void + reserve(size_type __res_arg = 0); + void + clear() + { _M_mutate(0, this->size(), 0); } + bool + empty() const + { return this->size() == 0; } + const_reference + operator[] (size_type __pos) const + { + ; + return _M_data()[__pos]; + } + reference + operator[](size_type __pos) + { + ; + ; + _M_leak(); + return _M_data()[__pos]; + } + const_reference + at(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range(("basic_string::at")); + return _M_data()[__n]; + } + reference + at(size_type __n) + { + if (__n >= size()) + __throw_out_of_range(("basic_string::at")); + _M_leak(); + return _M_data()[__n]; + } + basic_string& + operator+=(const basic_string& __str) + { return this->append(__str); } + basic_string& + operator+=(const _CharT* __s) + { return this->append(__s); } + basic_string& + operator+=(_CharT __c) + { + this->push_back(__c); + return *this; + } + basic_string& + append(const basic_string& __str); + basic_string& + append(const basic_string& __str, size_type __pos, size_type __n); + basic_string& + append(const _CharT* __s, size_type __n); + basic_string& + append(const _CharT* __s) + { + ; + return this->append(__s, traits_type::length(__s)); + } + basic_string& + append(size_type __n, _CharT __c); + template + basic_string& + append(_InputIterator __first, _InputIterator __last) + { return this->replace(_M_iend(), _M_iend(), __first, __last); } + void + push_back(_CharT __c) + { + const size_type __len = 1 + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + this->reserve(__len); + traits_type::assign(_M_data()[this->size()], __c); + _M_rep()->_M_set_length_and_sharable(__len); + } + basic_string& + assign(const basic_string& __str); + basic_string& + assign(const basic_string& __str, size_type __pos, size_type __n) + { return this->assign(__str._M_data() + + __str._M_check(__pos, "basic_string::assign"), + __str._M_limit(__pos, __n)); } + basic_string& + assign(const _CharT* __s, size_type __n); + basic_string& + assign(const _CharT* __s) + { + ; + return this->assign(__s, traits_type::length(__s)); + } + basic_string& + assign(size_type __n, _CharT __c) + { return _M_replace_aux(size_type(0), this->size(), __n, __c); } + template + basic_string& + assign(_InputIterator __first, _InputIterator __last) + { return this->replace(_M_ibegin(), _M_iend(), __first, __last); } + void + insert(iterator __p, size_type __n, _CharT __c) + { this->replace(__p, __p, __n, __c); } + template + void + insert(iterator __p, _InputIterator __beg, _InputIterator __end) + { this->replace(__p, __p, __beg, __end); } + basic_string& + insert(size_type __pos1, const basic_string& __str) + { return this->insert(__pos1, __str, size_type(0), __str.size()); } + basic_string& + insert(size_type __pos1, const basic_string& __str, + size_type __pos2, size_type __n) + { return this->insert(__pos1, __str._M_data() + + __str._M_check(__pos2, "basic_string::insert"), + __str._M_limit(__pos2, __n)); } + basic_string& + insert(size_type __pos, const _CharT* __s, size_type __n); + basic_string& + insert(size_type __pos, const _CharT* __s) + { + ; + return this->insert(__pos, __s, traits_type::length(__s)); + } + basic_string& + insert(size_type __pos, size_type __n, _CharT __c) + { return _M_replace_aux(_M_check(__pos, "basic_string::insert"), + size_type(0), __n, __c); } + iterator + insert(iterator __p, _CharT __c) + { + ; + const size_type __pos = __p - _M_ibegin(); + _M_replace_aux(__pos, size_type(0), size_type(1), __c); + _M_rep()->_M_set_leaked(); + return iterator(_M_data() + __pos); + } + basic_string& + erase(size_type __pos = 0, size_type __n = npos) + { + _M_mutate(_M_check(__pos, "basic_string::erase"), + _M_limit(__pos, __n), size_type(0)); + return *this; + } + iterator + erase(iterator __position) + { + ; + const size_type __pos = __position - _M_ibegin(); + _M_mutate(__pos, size_type(1), size_type(0)); + _M_rep()->_M_set_leaked(); + return iterator(_M_data() + __pos); + } + iterator + erase(iterator __first, iterator __last); + basic_string& + replace(size_type __pos, size_type __n, const basic_string& __str) + { return this->replace(__pos, __n, __str._M_data(), __str.size()); } + basic_string& + replace(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2) + { return this->replace(__pos1, __n1, __str._M_data() + + __str._M_check(__pos2, "basic_string::replace"), + __str._M_limit(__pos2, __n2)); } + basic_string& + replace(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2); + basic_string& + replace(size_type __pos, size_type __n1, const _CharT* __s) + { + ; + return this->replace(__pos, __n1, __s, traits_type::length(__s)); + } + basic_string& + replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) + { return _M_replace_aux(_M_check(__pos, "basic_string::replace"), + _M_limit(__pos, __n1), __n2, __c); } + basic_string& + replace(iterator __i1, iterator __i2, const basic_string& __str) + { return this->replace(__i1, __i2, __str._M_data(), __str.size()); } + basic_string& + replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n) + { + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n); + } + basic_string& + replace(iterator __i1, iterator __i2, const _CharT* __s) + { + ; + return this->replace(__i1, __i2, __s, traits_type::length(__s)); + } + basic_string& + replace(iterator __i1, iterator __i2, size_type __n, _CharT __c) + { + ; + return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c); + } + template + basic_string& + replace(iterator __i1, iterator __i2, + _InputIterator __k1, _InputIterator __k2) + { + + ; + ; + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral()); + } + basic_string& + replace(iterator __i1, iterator __i2, _CharT* __k1, _CharT* __k2) + { + ; + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, + __k1, __k2 - __k1); + } + basic_string& + replace(iterator __i1, iterator __i2, + const _CharT* __k1, const _CharT* __k2) + { + ; + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, + __k1, __k2 - __k1); + } + basic_string& + replace(iterator __i1, iterator __i2, iterator __k1, iterator __k2) + { + ; + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, + __k1.base(), __k2 - __k1); + } + basic_string& + replace(iterator __i1, iterator __i2, + const_iterator __k1, const_iterator __k2) + { + ; + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, + __k1.base(), __k2 - __k1); + } + private: + template + basic_string& + _M_replace_dispatch(iterator __i1, iterator __i2, _Integer __n, + _Integer __val, __true_type) + { return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __val); } + template + basic_string& + _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, + _InputIterator __k2, __false_type); + basic_string& + _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, + _CharT __c); + basic_string& + _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, + size_type __n2); + template + static _CharT* + _S_construct_aux(_InIterator __beg, _InIterator __end, + const _Alloc& __a, __false_type) + { + typedef typename iterator_traits<_InIterator>::iterator_category _Tag; + return _S_construct(__beg, __end, __a, _Tag()); + } + template + static _CharT* + _S_construct_aux(_Integer __beg, _Integer __end, + const _Alloc& __a, __true_type) + { return _S_construct_aux_2(static_cast(__beg), + __end, __a); } + static _CharT* + _S_construct_aux_2(size_type __req, _CharT __c, const _Alloc& __a) + { return _S_construct(__req, __c, __a); } + template + static _CharT* + _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a) + { + typedef typename std::__is_integer<_InIterator>::__type _Integral; + return _S_construct_aux(__beg, __end, __a, _Integral()); + } + template + static _CharT* + _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, + input_iterator_tag); + template + static _CharT* + _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a, + forward_iterator_tag); + static _CharT* + _S_construct(size_type __req, _CharT __c, const _Alloc& __a); + public: + size_type + copy(_CharT* __s, size_type __n, size_type __pos = 0) const; + void + swap(basic_string& __s); + const _CharT* + c_str() const + { return _M_data(); } + const _CharT* + data() const + { return _M_data(); } + allocator_type + get_allocator() const + { return _M_dataplus; } + size_type + find(const _CharT* __s, size_type __pos, size_type __n) const; + size_type + find(const basic_string& __str, size_type __pos = 0) const + { return this->find(__str.data(), __pos, __str.size()); } + size_type + find(const _CharT* __s, size_type __pos = 0) const + { + ; + return this->find(__s, __pos, traits_type::length(__s)); + } + size_type + find(_CharT __c, size_type __pos = 0) const; + size_type + rfind(const basic_string& __str, size_type __pos = npos) const + { return this->rfind(__str.data(), __pos, __str.size()); } + size_type + rfind(const _CharT* __s, size_type __pos, size_type __n) const; + size_type + rfind(const _CharT* __s, size_type __pos = npos) const + { + ; + return this->rfind(__s, __pos, traits_type::length(__s)); + } + size_type + rfind(_CharT __c, size_type __pos = npos) const; + size_type + find_first_of(const basic_string& __str, size_type __pos = 0) const + { return this->find_first_of(__str.data(), __pos, __str.size()); } + size_type + find_first_of(const _CharT* __s, size_type __pos, size_type __n) const; + size_type + find_first_of(const _CharT* __s, size_type __pos = 0) const + { + ; + return this->find_first_of(__s, __pos, traits_type::length(__s)); + } + size_type + find_first_of(_CharT __c, size_type __pos = 0) const + { return this->find(__c, __pos); } + size_type + find_last_of(const basic_string& __str, size_type __pos = npos) const + { return this->find_last_of(__str.data(), __pos, __str.size()); } + size_type + find_last_of(const _CharT* __s, size_type __pos, size_type __n) const; + size_type + find_last_of(const _CharT* __s, size_type __pos = npos) const + { + ; + return this->find_last_of(__s, __pos, traits_type::length(__s)); + } + size_type + find_last_of(_CharT __c, size_type __pos = npos) const + { return this->rfind(__c, __pos); } + size_type + find_first_not_of(const basic_string& __str, size_type __pos = 0) const + { return this->find_first_not_of(__str.data(), __pos, __str.size()); } + size_type + find_first_not_of(const _CharT* __s, size_type __pos, + size_type __n) const; + size_type + find_first_not_of(const _CharT* __s, size_type __pos = 0) const + { + ; + return this->find_first_not_of(__s, __pos, traits_type::length(__s)); + } + size_type + find_first_not_of(_CharT __c, size_type __pos = 0) const; + size_type + find_last_not_of(const basic_string& __str, size_type __pos = npos) const + { return this->find_last_not_of(__str.data(), __pos, __str.size()); } + size_type + find_last_not_of(const _CharT* __s, size_type __pos, + size_type __n) const; + size_type + find_last_not_of(const _CharT* __s, size_type __pos = npos) const + { + ; + return this->find_last_not_of(__s, __pos, traits_type::length(__s)); + } + size_type + find_last_not_of(_CharT __c, size_type __pos = npos) const; + basic_string + substr(size_type __pos = 0, size_type __n = npos) const + { return basic_string(*this, + _M_check(__pos, "basic_string::substr"), __n); } + int + compare(const basic_string& __str) const + { + const size_type __size = this->size(); + const size_type __osize = __str.size(); + const size_type __len = std::min(__size, __osize); + int __r = traits_type::compare(_M_data(), __str.data(), __len); + if (!__r) + __r = _S_compare(__size, __osize); + return __r; + } + int + compare(size_type __pos, size_type __n, const basic_string& __str) const; + int + compare(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2) const; + int + compare(const _CharT* __s) const; + int + compare(size_type __pos, size_type __n1, const _CharT* __s) const; + int + compare(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) const; + }; + template + basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + basic_string<_CharT, _Traits, _Alloc> __str(__lhs); + __str.append(__rhs); + return __str; + } + template + basic_string<_CharT,_Traits,_Alloc> + operator+(const _CharT* __lhs, + const basic_string<_CharT,_Traits,_Alloc>& __rhs); + template + basic_string<_CharT,_Traits,_Alloc> + operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { + basic_string<_CharT, _Traits, _Alloc> __str(__lhs); + __str.append(__rhs); + return __str; + } + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) + { + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + __string_type __str(__lhs); + __str.append(__size_type(1), __rhs); + return __str; + } + template + inline bool + operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) == 0; } + template + inline + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, bool>::__type + operator==(const basic_string<_CharT>& __lhs, + const basic_string<_CharT>& __rhs) + { return (__lhs.size() == __rhs.size() + && !std::char_traits<_CharT>::compare(__lhs.data(), __rhs.data(), + __lhs.size())); } + template + inline bool + operator==(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) == 0; } + template + inline bool + operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) == 0; } + template + inline bool + operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return !(__lhs == __rhs); } + template + inline bool + operator!=(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return !(__lhs == __rhs); } + template + inline bool + operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return !(__lhs == __rhs); } + template + inline bool + operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) < 0; } + template + inline bool + operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) < 0; } + template + inline bool + operator<(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) > 0; } + template + inline bool + operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) > 0; } + template + inline bool + operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) > 0; } + template + inline bool + operator>(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) < 0; } + template + inline bool + operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) <= 0; } + template + inline bool + operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) <= 0; } + template + inline bool + operator<=(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) >= 0; } + template + inline bool + operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) >= 0; } + template + inline bool + operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) >= 0; } + template + inline bool + operator>=(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) <= 0; } + template + inline void + swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, + basic_string<_CharT, _Traits, _Alloc>& __rhs) + { __lhs.swap(__rhs); } + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str); + template<> + basic_istream& + operator>>(basic_istream& __is, basic_string& __str); + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, + const basic_string<_CharT, _Traits, _Alloc>& __str) + { + return __ostream_insert(__os, __str.data(), __str.size()); + } + template + basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim); + template + inline basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str) + { return getline(__is, __str, __is.widen('\n')); } + template<> + basic_istream& + getline(basic_istream& __in, basic_string& __str, + char __delim); + template<> + basic_istream& + getline(basic_istream& __in, basic_string& __str, + wchar_t __delim); +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + const typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + _Rep::_S_max_size = (((npos - sizeof(_Rep_base))/sizeof(_CharT)) - 1) / 4; + template + const _CharT + basic_string<_CharT, _Traits, _Alloc>:: + _Rep::_S_terminal = _CharT(); + template + const typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>::npos; + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_empty_rep_storage[ + (sizeof(_Rep_base) + sizeof(_CharT) + sizeof(size_type) - 1) / + sizeof(size_type)]; + template + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>:: + _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, + input_iterator_tag) + { + if (__beg == __end && __a == _Alloc()) + return _S_empty_rep()._M_refdata(); + _CharT __buf[128]; + size_type __len = 0; + while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT)) + { + __buf[__len++] = *__beg; + ++__beg; + } + _Rep* __r = _Rep::_S_create(__len, size_type(0), __a); + _M_copy(__r->_M_refdata(), __buf, __len); + try + { + while (__beg != __end) + { + if (__len == __r->_M_capacity) + { + _Rep* __another = _Rep::_S_create(__len + 1, __len, __a); + _M_copy(__another->_M_refdata(), __r->_M_refdata(), __len); + __r->_M_destroy(__a); + __r = __another; + } + __r->_M_refdata()[__len++] = *__beg; + ++__beg; + } + } + catch(...) + { + __r->_M_destroy(__a); + throw; + } + __r->_M_set_length_and_sharable(__len); + return __r->_M_refdata(); + } + template + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>:: + _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, + forward_iterator_tag) + { + if (__beg == __end && __a == _Alloc()) + return _S_empty_rep()._M_refdata(); + if (__gnu_cxx::__is_null_pointer(__beg) && __beg != __end) + __throw_logic_error(("basic_string::_S_construct NULL not valid")); + const size_type __dnew = static_cast(std::distance(__beg, + __end)); + _Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a); + try + { _S_copy_chars(__r->_M_refdata(), __beg, __end); } + catch(...) + { + __r->_M_destroy(__a); + throw; + } + __r->_M_set_length_and_sharable(__dnew); + return __r->_M_refdata(); + } + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>:: + _S_construct(size_type __n, _CharT __c, const _Alloc& __a) + { + if (__n == 0 && __a == _Alloc()) + return _S_empty_rep()._M_refdata(); + _Rep* __r = _Rep::_S_create(__n, size_type(0), __a); + if (__n) + _M_assign(__r->_M_refdata(), __n, __c); + __r->_M_set_length_and_sharable(__n); + return __r->_M_refdata(); + } + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const basic_string& __str) + : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(__str.get_allocator()), + __str.get_allocator()), + __str.get_allocator()) + { } + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const _Alloc& __a) + : _M_dataplus(_S_construct(size_type(), _CharT(), __a), __a) + { } + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const basic_string& __str, size_type __pos, size_type __n) + : _M_dataplus(_S_construct(__str._M_data() + + __str._M_check(__pos, + "basic_string::basic_string"), + __str._M_data() + __str._M_limit(__pos, __n) + + __pos, _Alloc()), _Alloc()) + { } + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const basic_string& __str, size_type __pos, + size_type __n, const _Alloc& __a) + : _M_dataplus(_S_construct(__str._M_data() + + __str._M_check(__pos, + "basic_string::basic_string"), + __str._M_data() + __str._M_limit(__pos, __n) + + __pos, __a), __a) + { } + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const _CharT* __s, size_type __n, const _Alloc& __a) + : _M_dataplus(_S_construct(__s, __s + __n, __a), __a) + { } + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const _CharT* __s, const _Alloc& __a) + : _M_dataplus(_S_construct(__s, __s ? __s + traits_type::length(__s) : + __s + npos, __a), __a) + { } + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(size_type __n, _CharT __c, const _Alloc& __a) + : _M_dataplus(_S_construct(__n, __c, __a), __a) + { } + template + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a) + : _M_dataplus(_S_construct(__beg, __end, __a), __a) + { } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + assign(const basic_string& __str) + { + if (_M_rep() != __str._M_rep()) + { + const allocator_type __a = this->get_allocator(); + _CharT* __tmp = __str._M_rep()->_M_grab(__a, __str.get_allocator()); + _M_rep()->_M_dispose(__a); + _M_data(__tmp); + } + return *this; + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + assign(const _CharT* __s, size_type __n) + { + ; + _M_check_length(this->size(), __n, "basic_string::assign"); + if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) + return _M_replace_safe(size_type(0), this->size(), __s, __n); + else + { + const size_type __pos = __s - _M_data(); + if (__pos >= __n) + _M_copy(_M_data(), __s, __n); + else if (__pos) + _M_move(_M_data(), __s, __n); + _M_rep()->_M_set_length_and_sharable(__n); + return *this; + } + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + append(size_type __n, _CharT __c) + { + if (__n) + { + _M_check_length(size_type(0), __n, "basic_string::append"); + const size_type __len = __n + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + this->reserve(__len); + _M_assign(_M_data() + this->size(), __n, __c); + _M_rep()->_M_set_length_and_sharable(__len); + } + return *this; + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + append(const _CharT* __s, size_type __n) + { + ; + if (__n) + { + _M_check_length(size_type(0), __n, "basic_string::append"); + const size_type __len = __n + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + { + if (_M_disjunct(__s)) + this->reserve(__len); + else + { + const size_type __off = __s - _M_data(); + this->reserve(__len); + __s = _M_data() + __off; + } + } + _M_copy(_M_data() + this->size(), __s, __n); + _M_rep()->_M_set_length_and_sharable(__len); + } + return *this; + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + append(const basic_string& __str) + { + const size_type __size = __str.size(); + if (__size) + { + const size_type __len = __size + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + this->reserve(__len); + _M_copy(_M_data() + this->size(), __str._M_data(), __size); + _M_rep()->_M_set_length_and_sharable(__len); + } + return *this; + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + append(const basic_string& __str, size_type __pos, size_type __n) + { + __str._M_check(__pos, "basic_string::append"); + __n = __str._M_limit(__pos, __n); + if (__n) + { + const size_type __len = __n + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + this->reserve(__len); + _M_copy(_M_data() + this->size(), __str._M_data() + __pos, __n); + _M_rep()->_M_set_length_and_sharable(__len); + } + return *this; + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + insert(size_type __pos, const _CharT* __s, size_type __n) + { + ; + _M_check(__pos, "basic_string::insert"); + _M_check_length(size_type(0), __n, "basic_string::insert"); + if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) + return _M_replace_safe(__pos, size_type(0), __s, __n); + else + { + const size_type __off = __s - _M_data(); + _M_mutate(__pos, 0, __n); + __s = _M_data() + __off; + _CharT* __p = _M_data() + __pos; + if (__s + __n <= __p) + _M_copy(__p, __s, __n); + else if (__s >= __p) + _M_copy(__p, __s + __n, __n); + else + { + const size_type __nleft = __p - __s; + _M_copy(__p, __s, __nleft); + _M_copy(__p + __nleft, __p + __n, __n - __nleft); + } + return *this; + } + } + template + typename basic_string<_CharT, _Traits, _Alloc>::iterator + basic_string<_CharT, _Traits, _Alloc>:: + erase(iterator __first, iterator __last) + { + + ; + const size_type __size = __last - __first; + if (__size) + { + const size_type __pos = __first - _M_ibegin(); + _M_mutate(__pos, __size, size_type(0)); + _M_rep()->_M_set_leaked(); + return iterator(_M_data() + __pos); + } + else + return __first; + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + replace(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) + { + ; + _M_check(__pos, "basic_string::replace"); + __n1 = _M_limit(__pos, __n1); + _M_check_length(__n1, __n2, "basic_string::replace"); + bool __left; + if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) + return _M_replace_safe(__pos, __n1, __s, __n2); + else if ((__left = __s + __n2 <= _M_data() + __pos) + || _M_data() + __pos + __n1 <= __s) + { + size_type __off = __s - _M_data(); + __left ? __off : (__off += __n2 - __n1); + _M_mutate(__pos, __n1, __n2); + _M_copy(_M_data() + __pos, _M_data() + __off, __n2); + return *this; + } + else + { + const basic_string __tmp(__s, __n2); + return _M_replace_safe(__pos, __n1, __tmp._M_data(), __n2); + } + } + template + void + basic_string<_CharT, _Traits, _Alloc>::_Rep:: + _M_destroy(const _Alloc& __a) throw () + { + const size_type __size = sizeof(_Rep_base) + + (this->_M_capacity + 1) * sizeof(_CharT); + _Raw_bytes_alloc(__a).deallocate(reinterpret_cast(this), __size); + } + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_leak_hard() + { + if (_M_rep() == &_S_empty_rep()) + return; + if (_M_rep()->_M_is_shared()) + _M_mutate(0, 0, 0); + _M_rep()->_M_set_leaked(); + } + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_mutate(size_type __pos, size_type __len1, size_type __len2) + { + const size_type __old_size = this->size(); + const size_type __new_size = __old_size + __len2 - __len1; + const size_type __how_much = __old_size - __pos - __len1; + if (__new_size > this->capacity() || _M_rep()->_M_is_shared()) + { + const allocator_type __a = get_allocator(); + _Rep* __r = _Rep::_S_create(__new_size, this->capacity(), __a); + if (__pos) + _M_copy(__r->_M_refdata(), _M_data(), __pos); + if (__how_much) + _M_copy(__r->_M_refdata() + __pos + __len2, + _M_data() + __pos + __len1, __how_much); + _M_rep()->_M_dispose(__a); + _M_data(__r->_M_refdata()); + } + else if (__how_much && __len1 != __len2) + { + _M_move(_M_data() + __pos + __len2, + _M_data() + __pos + __len1, __how_much); + } + _M_rep()->_M_set_length_and_sharable(__new_size); + } + template + void + basic_string<_CharT, _Traits, _Alloc>:: + reserve(size_type __res) + { + if (__res != this->capacity() || _M_rep()->_M_is_shared()) + { + if (__res < this->size()) + __res = this->size(); + const allocator_type __a = get_allocator(); + _CharT* __tmp = _M_rep()->_M_clone(__a, __res - this->size()); + _M_rep()->_M_dispose(__a); + _M_data(__tmp); + } + } + template + void + basic_string<_CharT, _Traits, _Alloc>:: + swap(basic_string& __s) + { + if (_M_rep()->_M_is_leaked()) + _M_rep()->_M_set_sharable(); + if (__s._M_rep()->_M_is_leaked()) + __s._M_rep()->_M_set_sharable(); + if (this->get_allocator() == __s.get_allocator()) + { + _CharT* __tmp = _M_data(); + _M_data(__s._M_data()); + __s._M_data(__tmp); + } + else + { + const basic_string __tmp1(_M_ibegin(), _M_iend(), + __s.get_allocator()); + const basic_string __tmp2(__s._M_ibegin(), __s._M_iend(), + this->get_allocator()); + *this = __tmp2; + __s = __tmp1; + } + } + template + typename basic_string<_CharT, _Traits, _Alloc>::_Rep* + basic_string<_CharT, _Traits, _Alloc>::_Rep:: + _S_create(size_type __capacity, size_type __old_capacity, + const _Alloc& __alloc) + { + if (__capacity > _S_max_size) + __throw_length_error(("basic_string::_S_create")); + const size_type __pagesize = 4096; + const size_type __malloc_header_size = 4 * sizeof(void*); + if (__capacity > __old_capacity && __capacity < 2 * __old_capacity) + __capacity = 2 * __old_capacity; + size_type __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); + const size_type __adj_size = __size + __malloc_header_size; + if (__adj_size > __pagesize && __capacity > __old_capacity) + { + const size_type __extra = __pagesize - __adj_size % __pagesize; + __capacity += __extra / sizeof(_CharT); + if (__capacity > _S_max_size) + __capacity = _S_max_size; + __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); + } + void* __place = _Raw_bytes_alloc(__alloc).allocate(__size); + _Rep *__p = new (__place) _Rep; + __p->_M_capacity = __capacity; + __p->_M_set_sharable(); + return __p; + } + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>::_Rep:: + _M_clone(const _Alloc& __alloc, size_type __res) + { + const size_type __requested_cap = this->_M_length + __res; + _Rep* __r = _Rep::_S_create(__requested_cap, this->_M_capacity, + __alloc); + if (this->_M_length) + _M_copy(__r->_M_refdata(), _M_refdata(), this->_M_length); + __r->_M_set_length_and_sharable(this->_M_length); + return __r->_M_refdata(); + } + template + void + basic_string<_CharT, _Traits, _Alloc>:: + resize(size_type __n, _CharT __c) + { + const size_type __size = this->size(); + _M_check_length(__size, __n, "basic_string::resize"); + if (__size < __n) + this->append(__n - __size, __c); + else if (__n < __size) + this->erase(__n); + } + template + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, + _InputIterator __k2, __false_type) + { + const basic_string __s(__k1, __k2); + const size_type __n1 = __i2 - __i1; + _M_check_length(__n1, __s.size(), "basic_string::_M_replace_dispatch"); + return _M_replace_safe(__i1 - _M_ibegin(), __n1, __s._M_data(), + __s.size()); + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, + _CharT __c) + { + _M_check_length(__n1, __n2, "basic_string::_M_replace_aux"); + _M_mutate(__pos1, __n1, __n2); + if (__n2) + _M_assign(_M_data() + __pos1, __n2, __c); + return *this; + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, + size_type __n2) + { + _M_mutate(__pos1, __n1, __n2); + if (__n2) + _M_copy(_M_data() + __pos1, __s, __n2); + return *this; + } + template + basic_string<_CharT, _Traits, _Alloc> + operator+(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + ; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + const __size_type __len = _Traits::length(__lhs); + __string_type __str; + __str.reserve(__len + __rhs.size()); + __str.append(__lhs, __len); + __str.append(__rhs); + return __str; + } + template + basic_string<_CharT, _Traits, _Alloc> + operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + __string_type __str; + const __size_type __len = __rhs.size(); + __str.reserve(__len + 1); + __str.append(__size_type(1), __lhs); + __str.append(__rhs); + return __str; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + copy(_CharT* __s, size_type __n, size_type __pos) const + { + _M_check(__pos, "basic_string::copy"); + __n = _M_limit(__pos, __n); + ; + if (__n) + _M_copy(__s, _M_data() + __pos, __n); + return __n; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + const size_type __size = this->size(); + const _CharT* __data = _M_data(); + if (__n == 0) + return __pos <= __size ? __pos : npos; + if (__n <= __size) + { + for (; __pos <= __size - __n; ++__pos) + if (traits_type::eq(__data[__pos], __s[0]) + && traits_type::compare(__data + __pos + 1, + __s + 1, __n - 1) == 0) + return __pos; + } + return npos; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find(_CharT __c, size_type __pos) const + { + size_type __ret = npos; + const size_type __size = this->size(); + if (__pos < __size) + { + const _CharT* __data = _M_data(); + const size_type __n = __size - __pos; + const _CharT* __p = traits_type::find(__data + __pos, __n, __c); + if (__p) + __ret = __p - __data; + } + return __ret; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + rfind(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + const size_type __size = this->size(); + if (__n <= __size) + { + __pos = std::min(size_type(__size - __n), __pos); + const _CharT* __data = _M_data(); + do + { + if (traits_type::compare(__data + __pos, __s, __n) == 0) + return __pos; + } + while (__pos-- > 0); + } + return npos; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + rfind(_CharT __c, size_type __pos) const + { + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + for (++__size; __size-- > 0; ) + if (traits_type::eq(_M_data()[__size], __c)) + return __size; + } + return npos; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_of(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + for (; __n && __pos < this->size(); ++__pos) + { + const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]); + if (__p) + return __pos; + } + return npos; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_of(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + size_type __size = this->size(); + if (__size && __n) + { + if (--__size > __pos) + __size = __pos; + do + { + if (traits_type::find(__s, __n, _M_data()[__size])) + return __size; + } + while (__size-- != 0); + } + return npos; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + for (; __pos < this->size(); ++__pos) + if (!traits_type::find(__s, __n, _M_data()[__pos])) + return __pos; + return npos; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_not_of(_CharT __c, size_type __pos) const + { + for (; __pos < this->size(); ++__pos) + if (!traits_type::eq(_M_data()[__pos], __c)) + return __pos; + return npos; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + do + { + if (!traits_type::find(__s, __n, _M_data()[__size])) + return __size; + } + while (__size--); + } + return npos; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_not_of(_CharT __c, size_type __pos) const + { + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + do + { + if (!traits_type::eq(_M_data()[__size], __c)) + return __size; + } + while (__size--); + } + return npos; + } + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n, const basic_string& __str) const + { + _M_check(__pos, "basic_string::compare"); + __n = _M_limit(__pos, __n); + const size_type __osize = __str.size(); + const size_type __len = std::min(__n, __osize); + int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len); + if (!__r) + __r = _S_compare(__n, __osize); + return __r; + } + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2) const + { + _M_check(__pos1, "basic_string::compare"); + __str._M_check(__pos2, "basic_string::compare"); + __n1 = _M_limit(__pos1, __n1); + __n2 = __str._M_limit(__pos2, __n2); + const size_type __len = std::min(__n1, __n2); + int __r = traits_type::compare(_M_data() + __pos1, + __str.data() + __pos2, __len); + if (!__r) + __r = _S_compare(__n1, __n2); + return __r; + } + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(const _CharT* __s) const + { + ; + const size_type __size = this->size(); + const size_type __osize = traits_type::length(__s); + const size_type __len = std::min(__size, __osize); + int __r = traits_type::compare(_M_data(), __s, __len); + if (!__r) + __r = _S_compare(__size, __osize); + return __r; + } + template + int + basic_string <_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n1, const _CharT* __s) const + { + ; + _M_check(__pos, "basic_string::compare"); + __n1 = _M_limit(__pos, __n1); + const size_type __osize = traits_type::length(__s); + const size_type __len = std::min(__n1, __osize); + int __r = traits_type::compare(_M_data() + __pos, __s, __len); + if (!__r) + __r = _S_compare(__n1, __osize); + return __r; + } + template + int + basic_string <_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) const + { + ; + _M_check(__pos, "basic_string::compare"); + __n1 = _M_limit(__pos, __n1); + const size_type __len = std::min(__n1, __n2); + int __r = traits_type::compare(_M_data() + __pos, __s, __len); + if (!__r) + __r = _S_compare(__n1, __n2); + return __r; + } + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, + basic_string<_CharT, _Traits, _Alloc>& __str) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __istream_type::ios_base __ios_base; + typedef typename __istream_type::int_type __int_type; + typedef typename __string_type::size_type __size_type; + typedef ctype<_CharT> __ctype_type; + typedef typename __ctype_type::ctype_base __ctype_base; + __size_type __extracted = 0; + typename __ios_base::iostate __err = __ios_base::goodbit; + typename __istream_type::sentry __cerb(__in, false); + if (__cerb) + { + try + { + __str.erase(); + _CharT __buf[128]; + __size_type __len = 0; + const streamsize __w = __in.width(); + const __size_type __n = __w > 0 ? static_cast<__size_type>(__w) + : __str.max_size(); + const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); + const __int_type __eof = _Traits::eof(); + __int_type __c = __in.rdbuf()->sgetc(); + while (__extracted < __n + && !_Traits::eq_int_type(__c, __eof) + && !__ct.is(__ctype_base::space, + _Traits::to_char_type(__c))) + { + if (__len == sizeof(__buf) / sizeof(_CharT)) + { + __str.append(__buf, sizeof(__buf) / sizeof(_CharT)); + __len = 0; + } + __buf[__len++] = _Traits::to_char_type(__c); + ++__extracted; + __c = __in.rdbuf()->snextc(); + } + __str.append(__buf, __len); + if (_Traits::eq_int_type(__c, __eof)) + __err |= __ios_base::eofbit; + __in.width(0); + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { + __in._M_setstate(__ios_base::badbit); + } + } + if (!__extracted) + __err |= __ios_base::failbit; + if (__err) + __in.setstate(__err); + return __in; + } + template + basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __in, + basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __istream_type::ios_base __ios_base; + typedef typename __istream_type::int_type __int_type; + typedef typename __string_type::size_type __size_type; + __size_type __extracted = 0; + const __size_type __n = __str.max_size(); + typename __ios_base::iostate __err = __ios_base::goodbit; + typename __istream_type::sentry __cerb(__in, true); + if (__cerb) + { + try + { + __str.erase(); + const __int_type __idelim = _Traits::to_int_type(__delim); + const __int_type __eof = _Traits::eof(); + __int_type __c = __in.rdbuf()->sgetc(); + while (__extracted < __n + && !_Traits::eq_int_type(__c, __eof) + && !_Traits::eq_int_type(__c, __idelim)) + { + __str += _Traits::to_char_type(__c); + ++__extracted; + __c = __in.rdbuf()->snextc(); + } + if (_Traits::eq_int_type(__c, __eof)) + __err |= __ios_base::eofbit; + else if (_Traits::eq_int_type(__c, __idelim)) + { + ++__extracted; + __in.rdbuf()->sbumpc(); + } + else + __err |= __ios_base::failbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { + __in._M_setstate(__ios_base::badbit); + } + } + if (!__extracted) + __err |= __ios_base::failbit; + if (__err) + __in.setstate(__err); + return __in; + } + extern template class basic_string; + extern template + basic_istream& + operator>>(basic_istream&, string&); + extern template + basic_ostream& + operator<<(basic_ostream&, const string&); + extern template + basic_istream& + getline(basic_istream&, string&, char); + extern template + basic_istream& + getline(basic_istream&, string&); + extern template class basic_string; + extern template + basic_istream& + operator>>(basic_istream&, wstring&); + extern template + basic_ostream& + operator<<(basic_ostream&, const wstring&); + extern template + basic_istream& + getline(basic_istream&, wstring&, wchar_t); + extern template + basic_istream& + getline(basic_istream&, wstring&); +} +typedef std::basic_string QStdWString; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QCharRef; +class QRegExp; +class QStringList; +class QTextCodec; +class QLatin1String; +class QStringRef; +template class QVector; +class QString +{ +public: + inline QString(); + QString(const QChar *unicode, int size); + QString(QChar c); + QString(int size, QChar c); + inline QString(const QLatin1String &latin1); + inline QString(const QString &); + inline ~QString(); + QString &operator=(QChar c); + QString &operator=(const QString &); + inline QString &operator=(const QLatin1String &); + inline int size() const { return d->size; } + inline int count() const { return d->size; } + inline int length() const; + inline bool isEmpty() const; + void resize(int size); + QString &fill(QChar c, int size = -1); + void truncate(int pos); + void chop(int n); + int capacity() const; + inline void reserve(int size); + inline void squeeze() { if (d->size < d->alloc || d->ref != 1) realloc(); d->capacity = 0;} + inline const QChar *unicode() const; + inline QChar *data(); + inline const QChar *data() const; + inline const QChar *constData() const; + inline void detach(); + inline bool isDetached() const; + void clear(); + inline const QChar at(int i) const; + const QChar operator[](int i) const; + QCharRef operator[](int i); + const QChar operator[](uint i) const; + QCharRef operator[](uint i); + QString arg(qlonglong a, int fieldwidth=0, int base=10, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(qulonglong a, int fieldwidth=0, int base=10, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(long a, int fieldwidth=0, int base=10, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(ulong a, int fieldwidth=0, int base=10, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(int a, int fieldWidth = 0, int base = 10, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(uint a, int fieldWidth = 0, int base = 10, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(short a, int fieldWidth = 0, int base = 10, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(ushort a, int fieldWidth = 0, int base = 10, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(double a, int fieldWidth = 0, char fmt = 'g', int prec = -1, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(char a, int fieldWidth = 0, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(QChar a, int fieldWidth = 0, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a, int fieldWidth = 0, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a1, const QString &a2) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a1, const QString &a2, const QString &a3) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5, const QString &a6) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5, const QString &a6, + const QString &a7) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5, const QString &a6, + const QString &a7, const QString &a8) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5, const QString &a6, + const QString &a7, const QString &a8, const QString &a9) const __attribute__ ((warn_unused_result)); + QString &vsprintf(const char *format, va_list ap) + __attribute__ ((format (printf, 2, 0))) + ; + QString &sprintf(const char *format, ...) + __attribute__ ((format (printf, 2, 3))) + ; + int indexOf(QChar c, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int indexOf(const QString &s, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int indexOf(const QLatin1String &s, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int lastIndexOf(QChar c, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int lastIndexOf(const QString &s, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int lastIndexOf(const QLatin1String &s, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + inline QBool contains(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + inline QBool contains(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int count(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int count(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int indexOf(const QRegExp &, int from = 0) const; + int lastIndexOf(const QRegExp &, int from = -1) const; + inline QBool contains(const QRegExp &rx) const { return QBool(indexOf(rx) != -1); } + int count(const QRegExp &) const; + int indexOf(QRegExp &, int from = 0) const; + int lastIndexOf(QRegExp &, int from = -1) const; + inline QBool contains(QRegExp &rx) const { return QBool(indexOf(rx) != -1); } + enum SectionFlag { + SectionDefault = 0x00, + SectionSkipEmpty = 0x01, + SectionIncludeLeadingSep = 0x02, + SectionIncludeTrailingSep = 0x04, + SectionCaseInsensitiveSeps = 0x08 + }; + typedef QFlags SectionFlags; + QString section(QChar sep, int start, int end = -1, SectionFlags flags = SectionDefault) const; + QString section(const QString &in_sep, int start, int end = -1, SectionFlags flags = SectionDefault) const; + QString section(const QRegExp ®, int start, int end = -1, SectionFlags flags = SectionDefault) const; + QString left(int n) const __attribute__ ((warn_unused_result)); + QString right(int n) const __attribute__ ((warn_unused_result)); + QString mid(int position, int n = -1) const __attribute__ ((warn_unused_result)); + QStringRef leftRef(int n) const __attribute__ ((warn_unused_result)); + QStringRef rightRef(int n) const __attribute__ ((warn_unused_result)); + QStringRef midRef(int position, int n = -1) const __attribute__ ((warn_unused_result)); + bool startsWith(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool startsWith(const QLatin1String &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool startsWith(const QChar &c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool endsWith(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool endsWith(const QLatin1String &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool endsWith(const QChar &c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + QString leftJustified(int width, QChar fill = QLatin1Char(' '), bool trunc = false) const __attribute__ ((warn_unused_result)); + QString rightJustified(int width, QChar fill = QLatin1Char(' '), bool trunc = false) const __attribute__ ((warn_unused_result)); + QString toLower() const __attribute__ ((warn_unused_result)); + QString toUpper() const __attribute__ ((warn_unused_result)); + QString toCaseFolded() const __attribute__ ((warn_unused_result)); + QString trimmed() const __attribute__ ((warn_unused_result)); + QString simplified() const __attribute__ ((warn_unused_result)); + QString &insert(int i, QChar c); + QString &insert(int i, const QChar *uc, int len); + inline QString &insert(int i, const QString &s) { return insert(i, s.constData(), s.length()); } + QString &insert(int i, const QLatin1String &s); + QString &append(QChar c); + QString &append(const QString &s); + QString &append(const QStringRef &s); + QString &append(const QLatin1String &s); + inline QString &prepend(QChar c) { return insert(0, c); } + inline QString &prepend(const QString &s) { return insert(0, s); } + inline QString &prepend(const QLatin1String &s) { return insert(0, s); } + inline QString &operator+=(QChar c) { + if (d->ref != 1 || d->size + 1 > d->alloc) + realloc(grow(d->size + 1)); + d->data[d->size++] = c.unicode(); + d->data[d->size] = '\0'; + return *this; + } + inline QString &operator+=(QChar::SpecialCharacter c) { return append(QChar(c)); } + inline QString &operator+=(const QString &s) { return append(s); } + inline QString &operator+=(const QStringRef &s) { return append(s); } + inline QString &operator+=(const QLatin1String &s) { return append(s); } + QString &remove(int i, int len); + QString &remove(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &remove(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(int i, int len, QChar after); + QString &replace(int i, int len, const QChar *s, int slen); + QString &replace(int i, int len, const QString &after); + QString &replace(QChar before, QChar after, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(const QChar *before, int blen, const QChar *after, int alen, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(const QLatin1String &before, const QLatin1String &after, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(const QLatin1String &before, const QString &after, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(const QString &before, const QLatin1String &after, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(const QString &before, const QString &after, + Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(QChar c, const QString &after, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(QChar c, const QLatin1String &after, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(const QRegExp &rx, const QString &after); + inline QString &remove(const QRegExp &rx) + { return replace(rx, QString()); } + enum SplitBehavior { KeepEmptyParts, SkipEmptyParts }; + QStringList split(const QString &sep, SplitBehavior behavior = KeepEmptyParts, + Qt::CaseSensitivity cs = Qt::CaseSensitive) const __attribute__ ((warn_unused_result)); + QStringList split(const QChar &sep, SplitBehavior behavior = KeepEmptyParts, + Qt::CaseSensitivity cs = Qt::CaseSensitive) const __attribute__ ((warn_unused_result)); + QStringList split(const QRegExp &sep, SplitBehavior behavior = KeepEmptyParts) const __attribute__ ((warn_unused_result)); + enum NormalizationForm { + NormalizationForm_D, + NormalizationForm_C, + NormalizationForm_KD, + NormalizationForm_KC + }; + QString normalized(NormalizationForm mode) const __attribute__ ((warn_unused_result)); + QString normalized(NormalizationForm mode, QChar::UnicodeVersion version) const __attribute__ ((warn_unused_result)); + QString repeated(int times) const; + const ushort *utf16() const; + QByteArray toAscii() const __attribute__ ((warn_unused_result)); + QByteArray toLatin1() const __attribute__ ((warn_unused_result)); + QByteArray toUtf8() const __attribute__ ((warn_unused_result)); + QByteArray toLocal8Bit() const __attribute__ ((warn_unused_result)); + QVector toUcs4() const __attribute__ ((warn_unused_result)); + static QString fromAscii(const char *, int size = -1); + static QString fromLatin1(const char *, int size = -1); + static QString fromUtf8(const char *, int size = -1); + static QString fromLocal8Bit(const char *, int size = -1); + static QString fromUtf16(const ushort *, int size = -1); + static QString fromUcs4(const uint *, int size = -1); + static QString fromRawData(const QChar *, int size); + int toWCharArray(wchar_t *array) const; + static QString fromWCharArray(const wchar_t *, int size = -1); + QString &setUnicode(const QChar *unicode, int size); + inline QString &setUtf16(const ushort *utf16, int size); + int compare(const QString &s) const; + int compare(const QString &s, Qt::CaseSensitivity cs) const; + int compare(const QLatin1String &other, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + static inline int compare(const QString &s1, const QString &s2) + { return s1.compare(s2); } + static inline int compare(const QString &s1, const QString &s2, Qt::CaseSensitivity cs) + { return s1.compare(s2, cs); } + static inline int compare(const QString& s1, const QLatin1String &s2, + Qt::CaseSensitivity cs = Qt::CaseSensitive) + { return s1.compare(s2, cs); } + static inline int compare(const QLatin1String& s1, const QString &s2, + Qt::CaseSensitivity cs = Qt::CaseSensitive) + { return -s2.compare(s1, cs); } + int compare(const QStringRef &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + static int compare(const QString &s1, const QStringRef &s2, + Qt::CaseSensitivity = Qt::CaseSensitive); + int localeAwareCompare(const QString& s) const; + static int localeAwareCompare(const QString& s1, const QString& s2) + { return s1.localeAwareCompare(s2); } + int localeAwareCompare(const QStringRef &s) const; + static int localeAwareCompare(const QString& s1, const QStringRef& s2); + short toShort(bool *ok=0, int base=10) const; + ushort toUShort(bool *ok=0, int base=10) const; + int toInt(bool *ok=0, int base=10) const; + uint toUInt(bool *ok=0, int base=10) const; + long toLong(bool *ok=0, int base=10) const; + ulong toULong(bool *ok=0, int base=10) const; + qlonglong toLongLong(bool *ok=0, int base=10) const; + qulonglong toULongLong(bool *ok=0, int base=10) const; + float toFloat(bool *ok=0) const; + double toDouble(bool *ok=0) const; + QString &setNum(short, int base=10); + QString &setNum(ushort, int base=10); + QString &setNum(int, int base=10); + QString &setNum(uint, int base=10); + QString &setNum(long, int base=10); + QString &setNum(ulong, int base=10); + QString &setNum(qlonglong, int base=10); + QString &setNum(qulonglong, int base=10); + QString &setNum(float, char f='g', int prec=6); + QString &setNum(double, char f='g', int prec=6); + static QString number(int, int base=10); + static QString number(uint, int base=10); + static QString number(long, int base=10); + static QString number(ulong, int base=10); + static QString number(qlonglong, int base=10); + static QString number(qulonglong, int base=10); + static QString number(double, char f='g', int prec=6); + bool operator==(const QString &s) const; + bool operator<(const QString &s) const; + inline bool operator>(const QString &s) const { return s < *this; } + inline bool operator!=(const QString &s) const { return !operator==(s); } + inline bool operator<=(const QString &s) const { return !operator>(s); } + inline bool operator>=(const QString &s) const { return !operator<(s); } + bool operator==(const QLatin1String &s) const; + bool operator<(const QLatin1String &s) const; + bool operator>(const QLatin1String &s) const; + inline bool operator!=(const QLatin1String &s) const { return !operator==(s); } + inline bool operator<=(const QLatin1String &s) const { return !operator>(s); } + inline bool operator>=(const QLatin1String &s) const { return !operator<(s); } + inline QString(const char *ch) : d(fromAscii_helper(ch)) + {} + inline QString(const QByteArray &a) + : d(fromAscii_helper(a.constData(), qstrnlen(a.constData(), a.size()))) + {} + inline QString &operator=(const char *ch) + { return (*this = fromAscii(ch)); } + inline QString &operator=(const QByteArray &a) + { return (*this = fromAscii(a.constData(), qstrnlen(a.constData(), a.size()))); } + inline QString &operator=(char c) + { return (*this = QChar::fromAscii(c)); } + inline QString &prepend(const char *s) + { return prepend(QString::fromAscii(s)); } + inline QString &prepend(const QByteArray &s) + { return prepend(QString::fromAscii(s.constData(), qstrnlen(s.constData(), s.size()))); } + inline QString &append(const char *s) + { return append(QString::fromAscii(s)); } + inline QString &append(const QByteArray &s) + { return append(QString::fromAscii(s.constData(), qstrnlen(s.constData(), s.size()))); } + inline QString &operator+=(const char *s) + { return append(QString::fromAscii(s)); } + inline QString &operator+=(const QByteArray &s) + { return append(QString::fromAscii(s.constData(), qstrnlen(s.constData(), s.size()))); } + inline QString &operator+=(char c) + { return append(QChar::fromAscii(c)); } + inline bool operator==(const char *s) const; + inline bool operator!=(const char *s) const; + inline bool operator<(const char *s) const; + inline bool operator<=(const char *s2) const; + inline bool operator>(const char *s2) const; + inline bool operator>=(const char *s2) const; + inline bool operator==(const QByteArray &s) const; + inline bool operator!=(const QByteArray &s) const; + inline bool operator<(const QByteArray &s) const + { return *this < QString::fromAscii(s.constData(), s.size()); } + inline bool operator>(const QByteArray &s) const + { return *this > QString::fromAscii(s.constData(), s.size()); } + inline bool operator<=(const QByteArray &s) const + { return *this <= QString::fromAscii(s.constData(), s.size()); } + inline bool operator>=(const QByteArray &s) const + { return *this >= QString::fromAscii(s.constData(), s.size()); } + typedef QChar *iterator; + typedef const QChar *const_iterator; + typedef iterator Iterator; + typedef const_iterator ConstIterator; + iterator begin(); + const_iterator begin() const; + const_iterator constBegin() const; + iterator end(); + const_iterator end() const; + const_iterator constEnd() const; + inline void push_back(QChar c) { append(c); } + inline void push_back(const QString &s) { append(s); } + inline void push_front(QChar c) { prepend(c); } + inline void push_front(const QString &s) { prepend(s); } + static inline QString fromStdString(const std::string &s); + inline std::string toStdString() const; + static inline QString fromStdWString(const QStdWString &s); + inline QStdWString toStdWString() const; + struct Null { }; + static const Null null; + inline QString(const Null &): d(&shared_null) { d->ref.ref(); } + inline QString &operator=(const Null &) { *this = QString(); return *this; } + inline bool isNull() const { return d == &shared_null; } + bool isSimpleText() const { if (!d->clean) updateProperties(); return d->simpletext; } + bool isRightToLeft() const { if (!d->clean) updateProperties(); return d->righttoleft; } + QString(int size, Qt::Initialization); +private: + struct Data { + QBasicAtomicInt ref; + int alloc, size; + ushort *data; + ushort clean : 1; + ushort simpletext : 1; + ushort righttoleft : 1; + ushort asciiCache : 1; + ushort capacity : 1; + ushort reserved : 11; + ushort array[1]; + }; + static Data shared_null; + static Data shared_empty; + Data *d; + QString(Data *dd, int ) : d(dd) {} + static QTextCodec *codecForCStrings; + static int grow(int); + static void free(Data *); + void realloc(); + void realloc(int alloc); + void expand(int i); + void updateProperties() const; + QString multiArg(int numArgs, const QString **args) const; + static int compare_helper(const QChar *data1, int length1, + const QChar *data2, int length2, + Qt::CaseSensitivity cs = Qt::CaseSensitive); + static int compare_helper(const QChar *data1, int length1, + QLatin1String s2, + Qt::CaseSensitivity cs = Qt::CaseSensitive); + static int localeAwareCompare_helper(const QChar *data1, int length1, + const QChar *data2, int length2); + static Data *fromLatin1_helper(const char *str, int size = -1); + static Data *fromAscii_helper(const char *str, int size = -1); + void replace_helper(uint *indices, int nIndices, int blen, const QChar *after, int alen); + friend class QCharRef; + friend class QTextCodec; + friend class QStringRef; + friend struct QAbstractConcatenable; + friend inline bool qStringComparisonHelper(const QString &s1, const char *s2); + friend inline bool qStringComparisonHelper(const QStringRef &s1, const char *s2); +public: + typedef Data * DataPtr; + inline DataPtr &data_ptr() { return d; } +}; +class QLatin1String +{ +public: + inline explicit QLatin1String(const char *s) : chars(s) {} + inline QLatin1String &operator=(const QLatin1String &other) + { chars = other.chars; return *this; } + inline const char *latin1() const { return chars; } + inline bool operator==(const QString &s) const + { return s == *this; } + inline bool operator!=(const QString &s) const + { return s != *this; } + inline bool operator>(const QString &s) const + { return s < *this; } + inline bool operator<(const QString &s) const + { return s > *this; } + inline bool operator>=(const QString &s) const + { return s <= *this; } + inline bool operator<=(const QString &s) const + { return s >= *this; } + inline bool operator==(const char *s) const + { return QString::fromAscii(s) == *this; } + inline bool operator!=(const char *s) const + { return QString::fromAscii(s) != *this; } + inline bool operator<(const char *s) const + { return QString::fromAscii(s) > *this; } + inline bool operator>(const char *s) const + { return QString::fromAscii(s) < *this; } + inline bool operator<=(const char *s) const + { return QString::fromAscii(s) >= *this; } + inline bool operator>=(const char *s) const + { return QString::fromAscii(s) <= *this; } +private: + const char *chars; +}; +inline QString::QString(const QLatin1String &aLatin1) : d(fromLatin1_helper(aLatin1.latin1())) +{ } +inline int QString::length() const +{ return d->size; } +inline const QChar QString::at(int i) const +{ ((!(i >= 0 && i < size())) ? qt_assert("i >= 0 && i < size()","/usr/include/qt4/QtCore/qstring.h",688) : qt_noop()); return d->data[i]; } +inline const QChar QString::operator[](int i) const +{ ((!(i >= 0 && i < size())) ? qt_assert("i >= 0 && i < size()","/usr/include/qt4/QtCore/qstring.h",690) : qt_noop()); return d->data[i]; } +inline const QChar QString::operator[](uint i) const +{ ((!(i < uint(size()))) ? qt_assert("i < uint(size())","/usr/include/qt4/QtCore/qstring.h",692) : qt_noop()); return d->data[i]; } +inline bool QString::isEmpty() const +{ return d->size == 0; } +inline const QChar *QString::unicode() const +{ return reinterpret_cast(d->data); } +inline const QChar *QString::data() const +{ return reinterpret_cast(d->data); } +inline QChar *QString::data() +{ detach(); return reinterpret_cast(d->data); } +inline const QChar *QString::constData() const +{ return reinterpret_cast(d->data); } +inline void QString::detach() +{ if (d->ref != 1 || d->data != d->array) realloc(); } +inline bool QString::isDetached() const +{ return d->ref == 1; } +inline QString &QString::operator=(const QLatin1String &s) +{ + *this = fromLatin1(s.latin1()); + return *this; +} +inline void QString::clear() +{ if (!isNull()) *this = QString(); } +inline QString::QString(const QString &other) : d(other.d) +{ ((!(&other != this)) ? qt_assert("&other != this","/usr/include/qt4/QtCore/qstring.h",715) : qt_noop()); d->ref.ref(); } +inline int QString::capacity() const +{ return d->alloc; } +inline QString &QString::setNum(short n, int base) +{ return setNum(qlonglong(n), base); } +inline QString &QString::setNum(ushort n, int base) +{ return setNum(qulonglong(n), base); } +inline QString &QString::setNum(int n, int base) +{ return setNum(qlonglong(n), base); } +inline QString &QString::setNum(uint n, int base) +{ return setNum(qulonglong(n), base); } +inline QString &QString::setNum(long n, int base) +{ return setNum(qlonglong(n), base); } +inline QString &QString::setNum(ulong n, int base) +{ return setNum(qulonglong(n), base); } +inline QString &QString::setNum(float n, char f, int prec) +{ return setNum(double(n),f,prec); } +inline QString QString::arg(int a, int fieldWidth, int base, const QChar &fillChar) const +{ return arg(qlonglong(a), fieldWidth, base, fillChar); } +inline QString QString::arg(uint a, int fieldWidth, int base, const QChar &fillChar) const +{ return arg(qulonglong(a), fieldWidth, base, fillChar); } +inline QString QString::arg(long a, int fieldWidth, int base, const QChar &fillChar) const +{ return arg(qlonglong(a), fieldWidth, base, fillChar); } +inline QString QString::arg(ulong a, int fieldWidth, int base, const QChar &fillChar) const +{ return arg(qulonglong(a), fieldWidth, base, fillChar); } +inline QString QString::arg(short a, int fieldWidth, int base, const QChar &fillChar) const +{ return arg(qlonglong(a), fieldWidth, base, fillChar); } +inline QString QString::arg(ushort a, int fieldWidth, int base, const QChar &fillChar) const +{ return arg(qulonglong(a), fieldWidth, base, fillChar); } +inline QString QString::arg(const QString &a1, const QString &a2) const +{ const QString *args[2] = { &a1, &a2 }; return multiArg(2, args); } +inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3) const +{ const QString *args[3] = { &a1, &a2, &a3 }; return multiArg(3, args); } +inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4) const +{ const QString *args[4] = { &a1, &a2, &a3, &a4 }; return multiArg(4, args); } +inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5) const +{ const QString *args[5] = { &a1, &a2, &a3, &a4, &a5 }; return multiArg(5, args); } +inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5, const QString &a6) const +{ const QString *args[6] = { &a1, &a2, &a3, &a4, &a5, &a6 }; return multiArg(6, args); } +inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5, const QString &a6, + const QString &a7) const +{ const QString *args[7] = { &a1, &a2, &a3, &a4, &a5, &a6, &a7 }; return multiArg(7, args); } +inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5, const QString &a6, + const QString &a7, const QString &a8) const +{ const QString *args[8] = { &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8 }; return multiArg(8, args); } +inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5, const QString &a6, + const QString &a7, const QString &a8, const QString &a9) const +{ const QString *args[9] = { &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8, &a9 }; return multiArg(9, args); } +inline QString QString::section(QChar asep, int astart, int aend, SectionFlags aflags) const +{ return section(QString(asep), astart, aend, aflags); } +class QCharRef { + QString &s; + int i; + inline QCharRef(QString &str, int idx) + : s(str),i(idx) {} + friend class QString; +public: + inline operator QChar() const + { return i < s.d->size ? s.d->data[i] : 0; } + inline QCharRef &operator=(const QChar &c) + { if (i >= s.d->size) s.expand(i); else s.detach(); + s.d->data[i] = c.unicode(); return *this; } + inline QCharRef &operator=(char c) + { return operator=(QChar::fromAscii(c)); } + inline QCharRef &operator=(uchar c) + { return operator=(QChar::fromAscii(c)); } + inline QCharRef &operator=(const QCharRef &c) { return operator=(QChar(c)); } + inline QCharRef &operator=(ushort rc) { return operator=(QChar(rc)); } + inline QCharRef &operator=(short rc) { return operator=(QChar(rc)); } + inline QCharRef &operator=(uint rc) { return operator=(QChar(rc)); } + inline QCharRef &operator=(int rc) { return operator=(QChar(rc)); } + inline bool isNull() const { return QChar(*this).isNull(); } + inline bool isPrint() const { return QChar(*this).isPrint(); } + inline bool isPunct() const { return QChar(*this).isPunct(); } + inline bool isSpace() const { return QChar(*this).isSpace(); } + inline bool isMark() const { return QChar(*this).isMark(); } + inline bool isLetter() const { return QChar(*this).isLetter(); } + inline bool isNumber() const { return QChar(*this).isNumber(); } + inline bool isLetterOrNumber() { return QChar(*this).isLetterOrNumber(); } + inline bool isDigit() const { return QChar(*this).isDigit(); } + inline bool isLower() const { return QChar(*this).isLower(); } + inline bool isUpper() const { return QChar(*this).isUpper(); } + inline bool isTitleCase() const { return QChar(*this).isTitleCase(); } + inline int digitValue() const { return QChar(*this).digitValue(); } + QChar toLower() const { return QChar(*this).toLower(); } + QChar toUpper() const { return QChar(*this).toUpper(); } + QChar toTitleCase () const { return QChar(*this).toTitleCase(); } + QChar::Category category() const { return QChar(*this).category(); } + QChar::Direction direction() const { return QChar(*this).direction(); } + QChar::Joining joining() const { return QChar(*this).joining(); } + bool hasMirrored() const { return QChar(*this).hasMirrored(); } + QChar mirroredChar() const { return QChar(*this).mirroredChar(); } + QString decomposition() const { return QChar(*this).decomposition(); } + QChar::Decomposition decompositionTag() const { return QChar(*this).decompositionTag(); } + uchar combiningClass() const { return QChar(*this).combiningClass(); } + QChar::UnicodeVersion unicodeVersion() const { return QChar(*this).unicodeVersion(); } + inline uchar cell() const { return QChar(*this).cell(); } + inline uchar row() const { return QChar(*this).row(); } + inline void setCell(uchar cell); + inline void setRow(uchar row); + char toAscii() const { return QChar(*this).toAscii(); } + char toLatin1() const { return QChar(*this).toLatin1(); } + ushort unicode() const { return QChar(*this).unicode(); } + ushort& unicode() { return s.data()[i].unicode(); } +}; +inline void QCharRef::setRow(uchar arow) { QChar(*this).setRow(arow); } +inline void QCharRef::setCell(uchar acell) { QChar(*this).setCell(acell); } +inline QString::QString() : d(&shared_null) { d->ref.ref(); } +inline QString::~QString() { if (!d->ref.deref()) free(d); } +inline void QString::reserve(int asize) { if (d->ref != 1 || asize > d->alloc) realloc(asize); d->capacity = 1;} +inline QString &QString::setUtf16(const ushort *autf16, int asize) +{ return setUnicode(reinterpret_cast(autf16), asize); } +inline QCharRef QString::operator[](int i) +{ ((!(i >= 0)) ? qt_assert("i >= 0","/usr/include/qt4/QtCore/qstring.h",874) : qt_noop()); return QCharRef(*this, i); } +inline QCharRef QString::operator[](uint i) +{ return QCharRef(*this, i); } +inline QString::iterator QString::begin() +{ detach(); return reinterpret_cast(d->data); } +inline QString::const_iterator QString::begin() const +{ return reinterpret_cast(d->data); } +inline QString::const_iterator QString::constBegin() const +{ return reinterpret_cast(d->data); } +inline QString::iterator QString::end() +{ detach(); return reinterpret_cast(d->data + d->size); } +inline QString::const_iterator QString::end() const +{ return reinterpret_cast(d->data + d->size); } +inline QString::const_iterator QString::constEnd() const +{ return reinterpret_cast(d->data + d->size); } +inline QBool QString::contains(const QString &s, Qt::CaseSensitivity cs) const +{ return QBool(indexOf(s, 0, cs) != -1); } +inline QBool QString::contains(QChar c, Qt::CaseSensitivity cs) const +{ return QBool(indexOf(c, 0, cs) != -1); } +inline bool operator==(QString::Null, QString::Null) { return true; } +inline bool operator==(QString::Null, const QString &s) { return s.isNull(); } +inline bool operator==(const QString &s, QString::Null) { return s.isNull(); } +inline bool operator!=(QString::Null, QString::Null) { return false; } +inline bool operator!=(QString::Null, const QString &s) { return !s.isNull(); } +inline bool operator!=(const QString &s, QString::Null) { return !s.isNull(); } +inline bool qStringComparisonHelper(const QString &s1, const char *s2) +{ + if (QString::codecForCStrings) return (s1 == QString::fromAscii(s2)); + return (s1 == QLatin1String(s2)); +} +inline bool QString::operator==(const char *s) const +{ return qStringComparisonHelper(*this, s); } +inline bool QString::operator!=(const char *s) const +{ return !qStringComparisonHelper(*this, s); } +inline bool QString::operator<(const char *s) const +{ return *this < QString::fromAscii(s); } +inline bool QString::operator>(const char *s) const +{ return *this > QString::fromAscii(s); } +inline bool QString::operator<=(const char *s) const +{ return *this <= QString::fromAscii(s); } +inline bool QString::operator>=(const char *s) const +{ return *this >= QString::fromAscii(s); } +inline bool operator==(const char *s1, const QString &s2) +{ return qStringComparisonHelper(s2, s1); } +inline bool operator!=(const char *s1, const QString &s2) +{ return !qStringComparisonHelper(s2, s1); } +inline bool operator<(const char *s1, const QString &s2) +{ return (QString::fromAscii(s1) < s2); } +inline bool operator>(const char *s1, const QString &s2) +{ return (QString::fromAscii(s1) > s2); } +inline bool operator<=(const char *s1, const QString &s2) +{ return (QString::fromAscii(s1) <= s2); } +inline bool operator>=(const char *s1, const QString &s2) +{ return (QString::fromAscii(s1) >= s2); } +inline bool operator==(const char *s1, const QLatin1String &s2) +{ return QString::fromAscii(s1) == s2; } +inline bool operator!=(const char *s1, const QLatin1String &s2) +{ return QString::fromAscii(s1) != s2; } +inline bool operator<(const char *s1, const QLatin1String &s2) +{ return (QString::fromAscii(s1) < s2); } +inline bool operator>(const char *s1, const QLatin1String &s2) +{ return (QString::fromAscii(s1) > s2); } +inline bool operator<=(const char *s1, const QLatin1String &s2) +{ return (QString::fromAscii(s1) <= s2); } +inline bool operator>=(const char *s1, const QLatin1String &s2) +{ return (QString::fromAscii(s1) >= s2); } +inline bool operator==(const QLatin1String &s1, const QLatin1String &s2) +{ return (qstrcmp(s1.latin1(), s2.latin1()) == 0); } +inline bool operator!=(const QLatin1String &s1, const QLatin1String &s2) +{ return (qstrcmp(s1.latin1(), s2.latin1()) != 0); } +inline bool operator<(const QLatin1String &s1, const QLatin1String &s2) +{ return (qstrcmp(s1.latin1(), s2.latin1()) < 0); } +inline bool operator<=(const QLatin1String &s1, const QLatin1String &s2) +{ return (qstrcmp(s1.latin1(), s2.latin1()) <= 0); } +inline bool operator>(const QLatin1String &s1, const QLatin1String &s2) +{ return (qstrcmp(s1.latin1(), s2.latin1()) > 0); } +inline bool operator>=(const QLatin1String &s1, const QLatin1String &s2) +{ return (qstrcmp(s1.latin1(), s2.latin1()) >= 0); } +inline bool QString::operator==(const QByteArray &s) const +{ return qStringComparisonHelper(*this, s.constData()); } +inline bool QString::operator!=(const QByteArray &s) const +{ return !qStringComparisonHelper(*this, s.constData()); } +inline bool QByteArray::operator==(const QString &s) const +{ return qStringComparisonHelper(s, constData()); } +inline bool QByteArray::operator!=(const QString &s) const +{ return !qStringComparisonHelper(s, constData()); } +inline bool QByteArray::operator<(const QString &s) const +{ return QString::fromAscii(constData(), size()) < s; } +inline bool QByteArray::operator>(const QString &s) const +{ return QString::fromAscii(constData(), size()) > s; } +inline bool QByteArray::operator<=(const QString &s) const +{ return QString::fromAscii(constData(), size()) <= s; } +inline bool QByteArray::operator>=(const QString &s) const +{ return QString::fromAscii(constData(), size()) >= s; } +inline QByteArray &QByteArray::append(const QString &s) +{ return append(s.toAscii()); } +inline QByteArray &QByteArray::insert(int i, const QString &s) +{ return insert(i, s.toAscii()); } +inline QByteArray &QByteArray::replace(char c, const QString &after) +{ return replace(c, after.toAscii()); } +inline QByteArray &QByteArray::replace(const QString &before, const char *after) +{ return replace(before.toAscii(), after); } +inline QByteArray &QByteArray::replace(const QString &before, const QByteArray &after) +{ return replace(before.toAscii(), after); } +inline QByteArray &QByteArray::operator+=(const QString &s) +{ return operator+=(s.toAscii()); } +inline int QByteArray::indexOf(const QString &s, int from) const +{ return indexOf(s.toAscii(), from); } +inline int QByteArray::lastIndexOf(const QString &s, int from) const +{ return lastIndexOf(s.toAscii(), from); } +inline const QString operator+(const QString &s1, const QString &s2) +{ QString t(s1); t += s2; return t; } +inline const QString operator+(const QString &s1, QChar s2) +{ QString t(s1); t += s2; return t; } +inline const QString operator+(QChar s1, const QString &s2) +{ QString t(s1); t += s2; return t; } +inline const QString operator+(const QString &s1, const char *s2) +{ QString t(s1); t += QString::fromAscii(s2); return t; } +inline const QString operator+(const char *s1, const QString &s2) +{ QString t = QString::fromAscii(s1); t += s2; return t; } +inline const QString operator+(char c, const QString &s) +{ QString t = s; t.prepend(QChar::fromAscii(c)); return t; } +inline const QString operator+(const QString &s, char c) +{ QString t = s; t += QChar::fromAscii(c); return t; } +inline const QString operator+(const QByteArray &ba, const QString &s) +{ QString t = QString::fromAscii(ba.constData(), qstrnlen(ba.constData(), ba.size())); t += s; return t; } +inline const QString operator+(const QString &s, const QByteArray &ba) +{ QString t(s); t += QString::fromAscii(ba.constData(), qstrnlen(ba.constData(), ba.size())); return t; } +inline std::string QString::toStdString() const +{ const QByteArray asc = toAscii(); return std::string(asc.constData(), asc.length()); } +inline QString QString::fromStdString(const std::string &s) +{ return fromAscii(s.data(), int(s.size())); } +inline QStdWString QString::toStdWString() const +{ + QStdWString str; + str.resize(length()); + str.resize(toWCharArray(&(*str.begin()))); + return str; +} +inline QString QString::fromStdWString(const QStdWString &s) +{ return fromWCharArray(s.data(), int(s.size())); } + QDataStream &operator<<(QDataStream &, const QString &); + QDataStream &operator>>(QDataStream &, QString &); +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QString)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QString"; } }; +template <> inline bool qIsDetached(QString &t) { return t.isDetached(); } template <> inline void qSwap(QString &value1, QString &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } +inline QFlags operator|(QString::SectionFlags::enum_type f1, QString::SectionFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(QString::SectionFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QString::SectionFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +class QStringRef { + const QString *m_string; + int m_position; + int m_size; +public: + inline QStringRef():m_string(0), m_position(0), m_size(0){} + inline QStringRef(const QString *string, int position, int size); + inline QStringRef(const QString *string); + inline QStringRef(const QStringRef &other) + :m_string(other.m_string), m_position(other.m_position), m_size(other.m_size) + {} + inline ~QStringRef(){} + inline const QString *string() const { return m_string; } + inline int position() const { return m_position; } + inline int size() const { return m_size; } + inline int count() const { return m_size; } + inline int length() const { return m_size; } + inline QStringRef &operator=(const QStringRef &other) { + m_string = other.m_string; m_position = other.m_position; + m_size = other.m_size; return *this; + } + inline QStringRef &operator=(const QString *string); + inline const QChar *unicode() const { + if (!m_string) + return reinterpret_cast(QString::shared_null.data); + return m_string->unicode() + m_position; + } + inline const QChar *data() const { return unicode(); } + inline const QChar *constData() const { return unicode(); } + inline void clear() { m_string = 0; m_position = m_size = 0; } + QString toString() const; + inline bool isEmpty() const { return m_size == 0; } + inline bool isNull() const { return m_string == 0 || m_string->isNull(); } + QStringRef appendTo(QString *string) const; + inline const QChar at(int i) const + { ((!(i >= 0 && i < size())) ? qt_assert("i >= 0 && i < size()","/usr/include/qt4/QtCore/qstring.h",1136) : qt_noop()); return m_string->at(i + m_position); } + int compare(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int compare(const QStringRef &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int compare(QLatin1String s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + static int compare(const QStringRef &s1, const QString &s2, + Qt::CaseSensitivity = Qt::CaseSensitive); + static int compare(const QStringRef &s1, const QStringRef &s2, + Qt::CaseSensitivity = Qt::CaseSensitive); + static int compare(const QStringRef &s1, QLatin1String s2, + Qt::CaseSensitivity cs = Qt::CaseSensitive); + int localeAwareCompare(const QString &s) const; + int localeAwareCompare(const QStringRef &s) const; + static int localeAwareCompare(const QStringRef &s1, const QString &s2); + static int localeAwareCompare(const QStringRef &s1, const QStringRef &s2); +}; +inline QStringRef &QStringRef::operator=(const QString *aString) +{ m_string = aString; m_position = 0; m_size = aString?aString->size():0; return *this; } +inline QStringRef::QStringRef(const QString *aString, int aPosition, int aSize) + :m_string(aString), m_position(aPosition), m_size(aSize){} +inline QStringRef::QStringRef(const QString *aString) + :m_string(aString), m_position(0), m_size(aString?aString->size() : 0){} + bool operator==(const QStringRef &s1,const QStringRef &s2); +inline bool operator!=(const QStringRef &s1,const QStringRef &s2) +{ return !(s1 == s2); } + bool operator==(const QString &s1,const QStringRef &s2); +inline bool operator!=(const QString &s1,const QStringRef &s2) +{ return !(s1 == s2); } +inline bool operator==(const QStringRef &s1,const QString &s2) +{ return s2 == s1; } +inline bool operator!=(const QStringRef &s1,const QString &s2) +{ return s2 != s1; } + bool operator==(const QLatin1String &s1, const QStringRef &s2); +inline bool operator!=(const QLatin1String &s1,const QStringRef &s2) +{ return !(s1 == s2); } +inline bool operator==(const QStringRef &s1,const QLatin1String &s2) +{ return s2 == s1; } +inline bool operator!=(const QStringRef &s1,const QLatin1String &s2) +{ return s2 != s1; } + bool operator<(const QStringRef &s1,const QStringRef &s2); +inline bool operator>(const QStringRef &s1, const QStringRef &s2) +{ return s2 < s1; } +inline bool operator<=(const QStringRef &s1, const QStringRef &s2) +{ return !(s1 > s2); } +inline bool operator>=(const QStringRef &s1, const QStringRef &s2) +{ return !(s1 < s2); } +inline bool qStringComparisonHelper(const QStringRef &s1, const char *s2) +{ + if (QString::codecForCStrings) return (s1 == QString::fromAscii(s2)); + return (s1 == QLatin1String(s2)); +} +inline bool operator==(const char *s1, const QStringRef &s2) +{ return qStringComparisonHelper(s2, s1); } +inline bool operator==(const QStringRef &s1, const char *s2) +{ return qStringComparisonHelper(s1, s2); } +inline bool operator!=(const char *s1, const QStringRef &s2) +{ return !qStringComparisonHelper(s2, s1); } +inline bool operator!=(const QStringRef &s1, const char *s2) +{ return !qStringComparisonHelper(s1, s2); } +inline int QString::compare(const QStringRef &s, Qt::CaseSensitivity cs) const +{ return QString::compare_helper(constData(), length(), s.constData(), s.length(), cs); } +inline int QString::compare(const QString &s1, const QStringRef &s2, Qt::CaseSensitivity cs) +{ return QString::compare_helper(s1.constData(), s1.length(), s2.constData(), s2.length(), cs); } +inline int QStringRef::compare(const QString &s, Qt::CaseSensitivity cs) const +{ return QString::compare_helper(constData(), length(), s.constData(), s.length(), cs); } +inline int QStringRef::compare(const QStringRef &s, Qt::CaseSensitivity cs) const +{ return QString::compare_helper(constData(), length(), s.constData(), s.length(), cs); } +inline int QStringRef::compare(QLatin1String s, Qt::CaseSensitivity cs) const +{ return QString::compare_helper(constData(), length(), s, cs); } +inline int QStringRef::compare(const QStringRef &s1, const QString &s2, Qt::CaseSensitivity cs) +{ return QString::compare_helper(s1.constData(), s1.length(), s2.constData(), s2.length(), cs); } +inline int QStringRef::compare(const QStringRef &s1, const QStringRef &s2, Qt::CaseSensitivity cs) +{ return QString::compare_helper(s1.constData(), s1.length(), s2.constData(), s2.length(), cs); } +inline int QStringRef::compare(const QStringRef &s1, QLatin1String s2, Qt::CaseSensitivity cs) +{ return QString::compare_helper(s1.constData(), s1.length(), s2, cs); } +inline int QString::localeAwareCompare(const QStringRef &s) const +{ return localeAwareCompare_helper(constData(), length(), s.constData(), s.length()); } +inline int QString::localeAwareCompare(const QString& s1, const QStringRef& s2) +{ return localeAwareCompare_helper(s1.constData(), s1.length(), s2.constData(), s2.length()); } +inline int QStringRef::localeAwareCompare(const QString &s) const +{ return QString::localeAwareCompare_helper(constData(), length(), s.constData(), s.length()); } +inline int QStringRef::localeAwareCompare(const QStringRef &s) const +{ return QString::localeAwareCompare_helper(constData(), length(), s.constData(), s.length()); } +inline int QStringRef::localeAwareCompare(const QStringRef &s1, const QString &s2) +{ return QString::localeAwareCompare_helper(s1.constData(), s1.length(), s2.constData(), s2.length()); } +inline int QStringRef::localeAwareCompare(const QStringRef &s1, const QStringRef &s2) +{ return QString::localeAwareCompare_helper(s1.constData(), s1.length(), s2.constData(), s2.length()); } +typedef QtValidLicenseForCoreModule QtCoreModule; +class QByteArray; +class QString; +template +inline int qYouForgotTheQ_OBJECT_Macro(T, T) { return 0; } +template +inline void qYouForgotTheQ_OBJECT_Macro(T1, T2) {} + const char *qFlagLocation(const char *method); +class QObject; +class QMetaMethod; +class QMetaEnum; +class QMetaProperty; +class QMetaClassInfo; +class QGenericArgument +{ +public: + inline QGenericArgument(const char *aName = 0, const void *aData = 0) + : _data(aData), _name(aName) {} + inline void *data() const { return const_cast(_data); } + inline const char *name() const { return _name; } +private: + const void *_data; + const char *_name; +}; +class QGenericReturnArgument: public QGenericArgument +{ +public: + inline QGenericReturnArgument(const char *aName = 0, void *aData = 0) + : QGenericArgument(aName, aData) + {} +}; +template +class QArgument: public QGenericArgument +{ +public: + inline QArgument(const char *aName, const T &aData) + : QGenericArgument(aName, static_cast(&aData)) + {} +}; +template +class QReturnArgument: public QGenericReturnArgument +{ +public: + inline QReturnArgument(const char *aName, T &aData) + : QGenericReturnArgument(aName, static_cast(&aData)) + {} +}; +struct QMetaObject +{ + const char *className() const; + const QMetaObject *superClass() const; + QObject *cast(QObject *obj) const; + QString tr(const char *s, const char *c) const; + QString trUtf8(const char *s, const char *c) const; + QString tr(const char *s, const char *c, int n) const; + QString trUtf8(const char *s, const char *c, int n) const; + int methodOffset() const; + int enumeratorOffset() const; + int propertyOffset() const; + int classInfoOffset() const; + int constructorCount() const; + int methodCount() const; + int enumeratorCount() const; + int propertyCount() const; + int classInfoCount() const; + int indexOfConstructor(const char *constructor) const; + int indexOfMethod(const char *method) const; + int indexOfSignal(const char *signal) const; + int indexOfSlot(const char *slot) const; + int indexOfEnumerator(const char *name) const; + int indexOfProperty(const char *name) const; + int indexOfClassInfo(const char *name) const; + QMetaMethod constructor(int index) const; + QMetaMethod method(int index) const; + QMetaEnum enumerator(int index) const; + QMetaProperty property(int index) const; + QMetaClassInfo classInfo(int index) const; + QMetaProperty userProperty() const; + static bool checkConnectArgs(const char *signal, const char *method); + static QByteArray normalizedSignature(const char *method); + static QByteArray normalizedType(const char *type); + static bool connect(const QObject *sender, int signal_index, + const QObject *receiver, int method_index, + int type = 0, int *types = 0); + static bool disconnect(const QObject *sender, int signal_index, + const QObject *receiver, int method_index); + static bool disconnectOne(const QObject *sender, int signal_index, + const QObject *receiver, int method_index); + static void connectSlotsByName(QObject *o); + static void activate(QObject *sender, int signal_index, void **argv); + static void activate(QObject *sender, int from_signal_index, int to_signal_index, void **argv); + static void activate(QObject *sender, const QMetaObject *, int local_signal_index, void **argv); + static void activate(QObject *sender, const QMetaObject *, int from_local_signal_index, int to_local_signal_index, void **argv); + static void addGuard(QObject **ptr); + static void removeGuard(QObject **ptr); + static void changeGuard(QObject **ptr, QObject *o); + static bool invokeMethod(QObject *obj, const char *member, + Qt::ConnectionType, + QGenericReturnArgument ret, + QGenericArgument val0 = QGenericArgument(0), + QGenericArgument val1 = QGenericArgument(), + QGenericArgument val2 = QGenericArgument(), + QGenericArgument val3 = QGenericArgument(), + QGenericArgument val4 = QGenericArgument(), + QGenericArgument val5 = QGenericArgument(), + QGenericArgument val6 = QGenericArgument(), + QGenericArgument val7 = QGenericArgument(), + QGenericArgument val8 = QGenericArgument(), + QGenericArgument val9 = QGenericArgument()); + static inline bool invokeMethod(QObject *obj, const char *member, + QGenericReturnArgument ret, + QGenericArgument val0 = QGenericArgument(0), + QGenericArgument val1 = QGenericArgument(), + QGenericArgument val2 = QGenericArgument(), + QGenericArgument val3 = QGenericArgument(), + QGenericArgument val4 = QGenericArgument(), + QGenericArgument val5 = QGenericArgument(), + QGenericArgument val6 = QGenericArgument(), + QGenericArgument val7 = QGenericArgument(), + QGenericArgument val8 = QGenericArgument(), + QGenericArgument val9 = QGenericArgument()) + { + return invokeMethod(obj, member, Qt::AutoConnection, ret, val0, val1, val2, val3, + val4, val5, val6, val7, val8, val9); + } + static inline bool invokeMethod(QObject *obj, const char *member, + Qt::ConnectionType type, + QGenericArgument val0 = QGenericArgument(0), + QGenericArgument val1 = QGenericArgument(), + QGenericArgument val2 = QGenericArgument(), + QGenericArgument val3 = QGenericArgument(), + QGenericArgument val4 = QGenericArgument(), + QGenericArgument val5 = QGenericArgument(), + QGenericArgument val6 = QGenericArgument(), + QGenericArgument val7 = QGenericArgument(), + QGenericArgument val8 = QGenericArgument(), + QGenericArgument val9 = QGenericArgument()) + { + return invokeMethod(obj, member, type, QGenericReturnArgument(), val0, val1, val2, + val3, val4, val5, val6, val7, val8, val9); + } + static inline bool invokeMethod(QObject *obj, const char *member, + QGenericArgument val0 = QGenericArgument(0), + QGenericArgument val1 = QGenericArgument(), + QGenericArgument val2 = QGenericArgument(), + QGenericArgument val3 = QGenericArgument(), + QGenericArgument val4 = QGenericArgument(), + QGenericArgument val5 = QGenericArgument(), + QGenericArgument val6 = QGenericArgument(), + QGenericArgument val7 = QGenericArgument(), + QGenericArgument val8 = QGenericArgument(), + QGenericArgument val9 = QGenericArgument()) + { + return invokeMethod(obj, member, Qt::AutoConnection, QGenericReturnArgument(), val0, + val1, val2, val3, val4, val5, val6, val7, val8, val9); + } + QObject *newInstance(QGenericArgument val0 = QGenericArgument(0), + QGenericArgument val1 = QGenericArgument(), + QGenericArgument val2 = QGenericArgument(), + QGenericArgument val3 = QGenericArgument(), + QGenericArgument val4 = QGenericArgument(), + QGenericArgument val5 = QGenericArgument(), + QGenericArgument val6 = QGenericArgument(), + QGenericArgument val7 = QGenericArgument(), + QGenericArgument val8 = QGenericArgument(), + QGenericArgument val9 = QGenericArgument()) const; + enum Call { + InvokeMetaMethod, + ReadProperty, + WriteProperty, + ResetProperty, + QueryPropertyDesignable, + QueryPropertyScriptable, + QueryPropertyStored, + QueryPropertyEditable, + QueryPropertyUser, + CreateInstance + }; + int static_metacall(Call, int, void **) const; + static int metacall(QObject *, Call, int, void **); + struct { + const QMetaObject *superdata; + const char *stringdata; + const uint *data; + const void *extradata; + } d; +}; +typedef const QMetaObject& (*QMetaObjectAccessor)(); +struct QMetaObjectExtraData +{ + const QMetaObject **objects; + int (*static_metacall)(QMetaObject::Call, int, void **); +}; +inline const char *QMetaObject::className() const +{ return d.stringdata; } +inline const QMetaObject *QMetaObject::superClass() const +{ return d.superdata; } +typedef QtValidLicenseForGuiModule QtGuiModule; +class QPaintDevice; +class QWidget; +class QDialog; +class QColor; +class QPalette; +class QCursor; +class QPoint; +class QSize; +class QRect; +class QPolygon; +class QPainter; +class QRegion; +class QFont; +class QFontMetrics; +class QFontInfo; +class QPen; +class QBrush; +class QMatrix; +class QPixmap; +class QBitmap; +class QMovie; +class QImage; +class QPicture; +class QPrinter; +class QTimer; +class QTime; +class QClipboard; +class QString; +class QByteArray; +class QApplication; +template class QList; +typedef QList QWidgetList; +typedef struct _XDisplay Display; +typedef union _XEvent XEvent; +typedef struct _XGC *GC; +typedef struct _XRegion *Region; +typedef unsigned long WId; +template class QHash; +typedef QHash QWidgetMapper; +template class QSet; +typedef QSet QWidgetSet; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QSize +{ +public: + QSize(); + QSize(int w, int h); + bool isNull() const; + bool isEmpty() const; + bool isValid() const; + int width() const; + int height() const; + void setWidth(int w); + void setHeight(int h); + void transpose(); + void scale(int w, int h, Qt::AspectRatioMode mode); + void scale(const QSize &s, Qt::AspectRatioMode mode); + QSize expandedTo(const QSize &) const; + QSize boundedTo(const QSize &) const; + int &rwidth(); + int &rheight(); + QSize &operator+=(const QSize &); + QSize &operator-=(const QSize &); + QSize &operator*=(qreal c); + QSize &operator/=(qreal c); + friend inline bool operator==(const QSize &, const QSize &); + friend inline bool operator!=(const QSize &, const QSize &); + friend inline const QSize operator+(const QSize &, const QSize &); + friend inline const QSize operator-(const QSize &, const QSize &); + friend inline const QSize operator*(const QSize &, qreal); + friend inline const QSize operator*(qreal, const QSize &); + friend inline const QSize operator/(const QSize &, qreal); +private: + int wd; + int ht; +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QSize)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QSize"; } }; + QDataStream &operator<<(QDataStream &, const QSize &); + QDataStream &operator>>(QDataStream &, QSize &); +inline QSize::QSize() +{ wd = ht = -1; } +inline QSize::QSize(int w, int h) +{ wd = w; ht = h; } +inline bool QSize::isNull() const +{ return wd==0 && ht==0; } +inline bool QSize::isEmpty() const +{ return wd<1 || ht<1; } +inline bool QSize::isValid() const +{ return wd>=0 && ht>=0; } +inline int QSize::width() const +{ return wd; } +inline int QSize::height() const +{ return ht; } +inline void QSize::setWidth(int w) +{ wd = w; } +inline void QSize::setHeight(int h) +{ ht = h; } +inline void QSize::scale(int w, int h, Qt::AspectRatioMode mode) +{ scale(QSize(w, h), mode); } +inline int &QSize::rwidth() +{ return wd; } +inline int &QSize::rheight() +{ return ht; } +inline QSize &QSize::operator+=(const QSize &s) +{ wd+=s.wd; ht+=s.ht; return *this; } +inline QSize &QSize::operator-=(const QSize &s) +{ wd-=s.wd; ht-=s.ht; return *this; } +inline QSize &QSize::operator*=(qreal c) +{ wd = qRound(wd*c); ht = qRound(ht*c); return *this; } +inline bool operator==(const QSize &s1, const QSize &s2) +{ return s1.wd == s2.wd && s1.ht == s2.ht; } +inline bool operator!=(const QSize &s1, const QSize &s2) +{ return s1.wd != s2.wd || s1.ht != s2.ht; } +inline const QSize operator+(const QSize & s1, const QSize & s2) +{ return QSize(s1.wd+s2.wd, s1.ht+s2.ht); } +inline const QSize operator-(const QSize &s1, const QSize &s2) +{ return QSize(s1.wd-s2.wd, s1.ht-s2.ht); } +inline const QSize operator*(const QSize &s, qreal c) +{ return QSize(qRound(s.wd*c), qRound(s.ht*c)); } +inline const QSize operator*(qreal c, const QSize &s) +{ return QSize(qRound(s.wd*c), qRound(s.ht*c)); } +inline QSize &QSize::operator/=(qreal c) +{ + ((!(!qFuzzyIsNull(c))) ? qt_assert("!qFuzzyIsNull(c)","/usr/include/qt4/QtCore/qsize.h",176) : qt_noop()); + wd = qRound(wd/c); ht = qRound(ht/c); + return *this; +} +inline const QSize operator/(const QSize &s, qreal c) +{ + ((!(!qFuzzyIsNull(c))) ? qt_assert("!qFuzzyIsNull(c)","/usr/include/qt4/QtCore/qsize.h",183) : qt_noop()); + return QSize(qRound(s.wd/c), qRound(s.ht/c)); +} +inline QSize QSize::expandedTo(const QSize & otherSize) const +{ + return QSize(qMax(wd,otherSize.wd), qMax(ht,otherSize.ht)); +} +inline QSize QSize::boundedTo(const QSize & otherSize) const +{ + return QSize(qMin(wd,otherSize.wd), qMin(ht,otherSize.ht)); +} + QDebug operator<<(QDebug, const QSize &); +class QSizeF +{ +public: + QSizeF(); + QSizeF(const QSize &sz); + QSizeF(qreal w, qreal h); + bool isNull() const; + bool isEmpty() const; + bool isValid() const; + qreal width() const; + qreal height() const; + void setWidth(qreal w); + void setHeight(qreal h); + void transpose(); + void scale(qreal w, qreal h, Qt::AspectRatioMode mode); + void scale(const QSizeF &s, Qt::AspectRatioMode mode); + QSizeF expandedTo(const QSizeF &) const; + QSizeF boundedTo(const QSizeF &) const; + qreal &rwidth(); + qreal &rheight(); + QSizeF &operator+=(const QSizeF &); + QSizeF &operator-=(const QSizeF &); + QSizeF &operator*=(qreal c); + QSizeF &operator/=(qreal c); + friend inline bool operator==(const QSizeF &, const QSizeF &); + friend inline bool operator!=(const QSizeF &, const QSizeF &); + friend inline const QSizeF operator+(const QSizeF &, const QSizeF &); + friend inline const QSizeF operator-(const QSizeF &, const QSizeF &); + friend inline const QSizeF operator*(const QSizeF &, qreal); + friend inline const QSizeF operator*(qreal, const QSizeF &); + friend inline const QSizeF operator/(const QSizeF &, qreal); + inline QSize toSize() const; +private: + qreal wd; + qreal ht; +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QSizeF)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QSizeF"; } }; + QDataStream &operator<<(QDataStream &, const QSizeF &); + QDataStream &operator>>(QDataStream &, QSizeF &); +inline QSizeF::QSizeF() +{ wd = ht = -1.; } +inline QSizeF::QSizeF(const QSize &sz) + : wd(sz.width()), ht(sz.height()) +{ +} +inline QSizeF::QSizeF(qreal w, qreal h) +{ wd = w; ht = h; } +inline bool QSizeF::isNull() const +{ return qIsNull(wd) && qIsNull(ht); } +inline bool QSizeF::isEmpty() const +{ return wd <= 0. || ht <= 0.; } +inline bool QSizeF::isValid() const +{ return wd >= 0. && ht >= 0.; } +inline qreal QSizeF::width() const +{ return wd; } +inline qreal QSizeF::height() const +{ return ht; } +inline void QSizeF::setWidth(qreal w) +{ wd = w; } +inline void QSizeF::setHeight(qreal h) +{ ht = h; } +inline void QSizeF::scale(qreal w, qreal h, Qt::AspectRatioMode mode) +{ scale(QSizeF(w, h), mode); } +inline qreal &QSizeF::rwidth() +{ return wd; } +inline qreal &QSizeF::rheight() +{ return ht; } +inline QSizeF &QSizeF::operator+=(const QSizeF &s) +{ wd += s.wd; ht += s.ht; return *this; } +inline QSizeF &QSizeF::operator-=(const QSizeF &s) +{ wd -= s.wd; ht -= s.ht; return *this; } +inline QSizeF &QSizeF::operator*=(qreal c) +{ wd *= c; ht *= c; return *this; } +inline bool operator==(const QSizeF &s1, const QSizeF &s2) +{ return qFuzzyCompare(s1.wd, s2.wd) && qFuzzyCompare(s1.ht, s2.ht); } +inline bool operator!=(const QSizeF &s1, const QSizeF &s2) +{ return !qFuzzyCompare(s1.wd, s2.wd) || !qFuzzyCompare(s1.ht, s2.ht); } +inline const QSizeF operator+(const QSizeF & s1, const QSizeF & s2) +{ return QSizeF(s1.wd+s2.wd, s1.ht+s2.ht); } +inline const QSizeF operator-(const QSizeF &s1, const QSizeF &s2) +{ return QSizeF(s1.wd-s2.wd, s1.ht-s2.ht); } +inline const QSizeF operator*(const QSizeF &s, qreal c) +{ return QSizeF(s.wd*c, s.ht*c); } +inline const QSizeF operator*(qreal c, const QSizeF &s) +{ return QSizeF(s.wd*c, s.ht*c); } +inline QSizeF &QSizeF::operator/=(qreal c) +{ + ((!(!qFuzzyIsNull(c))) ? qt_assert("!qFuzzyIsNull(c)","/usr/include/qt4/QtCore/qsize.h",334) : qt_noop()); + wd = wd/c; ht = ht/c; + return *this; +} +inline const QSizeF operator/(const QSizeF &s, qreal c) +{ + ((!(!qFuzzyIsNull(c))) ? qt_assert("!qFuzzyIsNull(c)","/usr/include/qt4/QtCore/qsize.h",341) : qt_noop()); + return QSizeF(s.wd/c, s.ht/c); +} +inline QSizeF QSizeF::expandedTo(const QSizeF & otherSize) const +{ + return QSizeF(qMax(wd,otherSize.wd), qMax(ht,otherSize.ht)); +} +inline QSizeF QSizeF::boundedTo(const QSizeF & otherSize) const +{ + return QSizeF(qMin(wd,otherSize.wd), qMin(ht,otherSize.ht)); +} +inline QSize QSizeF::toSize() const +{ + return QSize(qRound(wd), qRound(ht)); +} + QDebug operator<<(QDebug, const QSizeF &); +typedef QtValidLicenseForCoreModule QtCoreModule; +class QPoint +{ +public: + QPoint(); + QPoint(int xpos, int ypos); + bool isNull() const; + int x() const; + int y() const; + void setX(int x); + void setY(int y); + int manhattanLength() const; + int &rx(); + int &ry(); + QPoint &operator+=(const QPoint &p); + QPoint &operator-=(const QPoint &p); + QPoint &operator*=(qreal c); + QPoint &operator/=(qreal c); + friend inline bool operator==(const QPoint &, const QPoint &); + friend inline bool operator!=(const QPoint &, const QPoint &); + friend inline const QPoint operator+(const QPoint &, const QPoint &); + friend inline const QPoint operator-(const QPoint &, const QPoint &); + friend inline const QPoint operator*(const QPoint &, qreal); + friend inline const QPoint operator*(qreal, const QPoint &); + friend inline const QPoint operator-(const QPoint &); + friend inline const QPoint operator/(const QPoint &, qreal); +private: + friend class QTransform; + int xp; + int yp; +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QPoint)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QPoint"; } }; + QDataStream &operator<<(QDataStream &, const QPoint &); + QDataStream &operator>>(QDataStream &, QPoint &); +inline QPoint::QPoint() +{ xp=0; yp=0; } +inline QPoint::QPoint(int xpos, int ypos) +{ xp = xpos; yp = ypos; } +inline bool QPoint::isNull() const +{ return xp == 0 && yp == 0; } +inline int QPoint::x() const +{ return xp; } +inline int QPoint::y() const +{ return yp; } +inline void QPoint::setX(int xpos) +{ xp = xpos; } +inline void QPoint::setY(int ypos) +{ yp = ypos; } +inline int &QPoint::rx() +{ return xp; } +inline int &QPoint::ry() +{ return yp; } +inline QPoint &QPoint::operator+=(const QPoint &p) +{ xp+=p.xp; yp+=p.yp; return *this; } +inline QPoint &QPoint::operator-=(const QPoint &p) +{ xp-=p.xp; yp-=p.yp; return *this; } +inline QPoint &QPoint::operator*=(qreal c) +{ xp = qRound(xp*c); yp = qRound(yp*c); return *this; } +inline bool operator==(const QPoint &p1, const QPoint &p2) +{ return p1.xp == p2.xp && p1.yp == p2.yp; } +inline bool operator!=(const QPoint &p1, const QPoint &p2) +{ return p1.xp != p2.xp || p1.yp != p2.yp; } +inline const QPoint operator+(const QPoint &p1, const QPoint &p2) +{ return QPoint(p1.xp+p2.xp, p1.yp+p2.yp); } +inline const QPoint operator-(const QPoint &p1, const QPoint &p2) +{ return QPoint(p1.xp-p2.xp, p1.yp-p2.yp); } +inline const QPoint operator*(const QPoint &p, qreal c) +{ return QPoint(qRound(p.xp*c), qRound(p.yp*c)); } +inline const QPoint operator*(qreal c, const QPoint &p) +{ return QPoint(qRound(p.xp*c), qRound(p.yp*c)); } +inline const QPoint operator-(const QPoint &p) +{ return QPoint(-p.xp, -p.yp); } +inline QPoint &QPoint::operator/=(qreal c) +{ + xp = qRound(xp/c); + yp = qRound(yp/c); + return *this; +} +inline const QPoint operator/(const QPoint &p, qreal c) +{ + return QPoint(qRound(p.xp/c), qRound(p.yp/c)); +} + QDebug operator<<(QDebug, const QPoint &); +class QPointF +{ +public: + QPointF(); + QPointF(const QPoint &p); + QPointF(qreal xpos, qreal ypos); + qreal manhattanLength() const; + bool isNull() const; + qreal x() const; + qreal y() const; + void setX(qreal x); + void setY(qreal y); + qreal &rx(); + qreal &ry(); + QPointF &operator+=(const QPointF &p); + QPointF &operator-=(const QPointF &p); + QPointF &operator*=(qreal c); + QPointF &operator/=(qreal c); + friend inline bool operator==(const QPointF &, const QPointF &); + friend inline bool operator!=(const QPointF &, const QPointF &); + friend inline const QPointF operator+(const QPointF &, const QPointF &); + friend inline const QPointF operator-(const QPointF &, const QPointF &); + friend inline const QPointF operator*(qreal, const QPointF &); + friend inline const QPointF operator*(const QPointF &, qreal); + friend inline const QPointF operator-(const QPointF &); + friend inline const QPointF operator/(const QPointF &, qreal); + QPoint toPoint() const; +private: + friend class QMatrix; + friend class QTransform; + qreal xp; + qreal yp; +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QPointF)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QPointF"; } }; + QDataStream &operator<<(QDataStream &, const QPointF &); + QDataStream &operator>>(QDataStream &, QPointF &); +inline QPointF::QPointF() : xp(0), yp(0) { } +inline QPointF::QPointF(qreal xpos, qreal ypos) : xp(xpos), yp(ypos) { } +inline QPointF::QPointF(const QPoint &p) : xp(p.x()), yp(p.y()) { } +inline bool QPointF::isNull() const +{ + return qIsNull(xp) && qIsNull(yp); +} +inline qreal QPointF::x() const +{ + return xp; +} +inline qreal QPointF::y() const +{ + return yp; +} +inline void QPointF::setX(qreal xpos) +{ + xp = xpos; +} +inline void QPointF::setY(qreal ypos) +{ + yp = ypos; +} +inline qreal &QPointF::rx() +{ + return xp; +} +inline qreal &QPointF::ry() +{ + return yp; +} +inline QPointF &QPointF::operator+=(const QPointF &p) +{ + xp+=p.xp; + yp+=p.yp; + return *this; +} +inline QPointF &QPointF::operator-=(const QPointF &p) +{ + xp-=p.xp; yp-=p.yp; return *this; +} +inline QPointF &QPointF::operator*=(qreal c) +{ + xp*=c; yp*=c; return *this; +} +inline bool operator==(const QPointF &p1, const QPointF &p2) +{ + return qFuzzyIsNull(p1.xp - p2.xp) && qFuzzyIsNull(p1.yp - p2.yp); +} +inline bool operator!=(const QPointF &p1, const QPointF &p2) +{ + return !qFuzzyIsNull(p1.xp - p2.xp) || !qFuzzyIsNull(p1.yp - p2.yp); +} +inline const QPointF operator+(const QPointF &p1, const QPointF &p2) +{ + return QPointF(p1.xp+p2.xp, p1.yp+p2.yp); +} +inline const QPointF operator-(const QPointF &p1, const QPointF &p2) +{ + return QPointF(p1.xp-p2.xp, p1.yp-p2.yp); +} +inline const QPointF operator*(const QPointF &p, qreal c) +{ + return QPointF(p.xp*c, p.yp*c); +} +inline const QPointF operator*(qreal c, const QPointF &p) +{ + return QPointF(p.xp*c, p.yp*c); +} +inline const QPointF operator-(const QPointF &p) +{ + return QPointF(-p.xp, -p.yp); +} +inline QPointF &QPointF::operator/=(qreal c) +{ + xp/=c; + yp/=c; + return *this; +} +inline const QPointF operator/(const QPointF &p, qreal c) +{ + return QPointF(p.xp/c, p.yp/c); +} +inline QPoint QPointF::toPoint() const +{ + return QPoint(qRound(xp), qRound(yp)); +} + QDebug operator<<(QDebug d, const QPointF &p); +typedef QtValidLicenseForCoreModule QtCoreModule; +class QRect +{ +public: + QRect() { x1 = y1 = 0; x2 = y2 = -1; } + QRect(const QPoint &topleft, const QPoint &bottomright); + QRect(const QPoint &topleft, const QSize &size); + QRect(int left, int top, int width, int height); + bool isNull() const; + bool isEmpty() const; + bool isValid() const; + int left() const; + int top() const; + int right() const; + int bottom() const; + QRect normalized() const; + int x() const; + int y() const; + void setLeft(int pos); + void setTop(int pos); + void setRight(int pos); + void setBottom(int pos); + void setX(int x); + void setY(int y); + void setTopLeft(const QPoint &p); + void setBottomRight(const QPoint &p); + void setTopRight(const QPoint &p); + void setBottomLeft(const QPoint &p); + QPoint topLeft() const; + QPoint bottomRight() const; + QPoint topRight() const; + QPoint bottomLeft() const; + QPoint center() const; + void moveLeft(int pos); + void moveTop(int pos); + void moveRight(int pos); + void moveBottom(int pos); + void moveTopLeft(const QPoint &p); + void moveBottomRight(const QPoint &p); + void moveTopRight(const QPoint &p); + void moveBottomLeft(const QPoint &p); + void moveCenter(const QPoint &p); + inline void translate(int dx, int dy); + inline void translate(const QPoint &p); + inline QRect translated(int dx, int dy) const; + inline QRect translated(const QPoint &p) const; + void moveTo(int x, int t); + void moveTo(const QPoint &p); + void setRect(int x, int y, int w, int h); + inline void getRect(int *x, int *y, int *w, int *h) const; + void setCoords(int x1, int y1, int x2, int y2); + inline void getCoords(int *x1, int *y1, int *x2, int *y2) const; + inline void adjust(int x1, int y1, int x2, int y2); + inline QRect adjusted(int x1, int y1, int x2, int y2) const; + QSize size() const; + int width() const; + int height() const; + void setWidth(int w); + void setHeight(int h); + void setSize(const QSize &s); + QRect operator|(const QRect &r) const; + QRect operator&(const QRect &r) const; + QRect& operator|=(const QRect &r); + QRect& operator&=(const QRect &r); + bool contains(const QPoint &p, bool proper=false) const; + bool contains(int x, int y) const; + bool contains(int x, int y, bool proper) const; + bool contains(const QRect &r, bool proper = false) const; + QRect unite(const QRect &r) const; + QRect united(const QRect &other) const; + QRect intersect(const QRect &r) const; + QRect intersected(const QRect &other) const; + bool intersects(const QRect &r) const; + friend inline bool operator==(const QRect &, const QRect &); + friend inline bool operator!=(const QRect &, const QRect &); +private: + friend void qt_setCoords(QRect *r, int xp1, int yp1, int xp2, int yp2); + int x1; + int y1; + int x2; + int y2; +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QRect)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QRect"; } }; + inline bool operator==(const QRect &, const QRect &); + inline bool operator!=(const QRect &, const QRect &); + QDataStream &operator<<(QDataStream &, const QRect &); + QDataStream &operator>>(QDataStream &, QRect &); +inline QRect::QRect(int aleft, int atop, int awidth, int aheight) +{ + x1 = aleft; + y1 = atop; + x2 = (aleft + awidth - 1); + y2 = (atop + aheight - 1); +} +inline QRect::QRect(const QPoint &atopLeft, const QPoint &abottomRight) +{ + x1 = atopLeft.x(); + y1 = atopLeft.y(); + x2 = abottomRight.x(); + y2 = abottomRight.y(); +} +inline QRect::QRect(const QPoint &atopLeft, const QSize &asize) +{ + x1 = atopLeft.x(); + y1 = atopLeft.y(); + x2 = (x1+asize.width() - 1); + y2 = (y1+asize.height() - 1); +} +inline bool QRect::isNull() const +{ return x2 == x1 - 1 && y2 == y1 - 1; } +inline bool QRect::isEmpty() const +{ return x1 > x2 || y1 > y2; } +inline bool QRect::isValid() const +{ return x1 <= x2 && y1 <= y2; } +inline int QRect::left() const +{ return x1; } +inline int QRect::top() const +{ return y1; } +inline int QRect::right() const +{ return x2; } +inline int QRect::bottom() const +{ return y2; } +inline int QRect::x() const +{ return x1; } +inline int QRect::y() const +{ return y1; } +inline void QRect::setLeft(int pos) +{ x1 = pos; } +inline void QRect::setTop(int pos) +{ y1 = pos; } +inline void QRect::setRight(int pos) +{ x2 = pos; } +inline void QRect::setBottom(int pos) +{ y2 = pos; } +inline void QRect::setTopLeft(const QPoint &p) +{ x1 = p.x(); y1 = p.y(); } +inline void QRect::setBottomRight(const QPoint &p) +{ x2 = p.x(); y2 = p.y(); } +inline void QRect::setTopRight(const QPoint &p) +{ x2 = p.x(); y1 = p.y(); } +inline void QRect::setBottomLeft(const QPoint &p) +{ x1 = p.x(); y2 = p.y(); } +inline void QRect::setX(int ax) +{ x1 = ax; } +inline void QRect::setY(int ay) +{ y1 = ay; } +inline QPoint QRect::topLeft() const +{ return QPoint(x1, y1); } +inline QPoint QRect::bottomRight() const +{ return QPoint(x2, y2); } +inline QPoint QRect::topRight() const +{ return QPoint(x2, y1); } +inline QPoint QRect::bottomLeft() const +{ return QPoint(x1, y2); } +inline QPoint QRect::center() const +{ return QPoint((x1+x2)/2, (y1+y2)/2); } +inline int QRect::width() const +{ return x2 - x1 + 1; } +inline int QRect::height() const +{ return y2 - y1 + 1; } +inline QSize QRect::size() const +{ return QSize(width(), height()); } +inline void QRect::translate(int dx, int dy) +{ + x1 += dx; + y1 += dy; + x2 += dx; + y2 += dy; +} +inline void QRect::translate(const QPoint &p) +{ + x1 += p.x(); + y1 += p.y(); + x2 += p.x(); + y2 += p.y(); +} +inline QRect QRect::translated(int dx, int dy) const +{ return QRect(QPoint(x1 + dx, y1 + dy), QPoint(x2 + dx, y2 + dy)); } +inline QRect QRect::translated(const QPoint &p) const +{ return QRect(QPoint(x1 + p.x(), y1 + p.y()), QPoint(x2 + p.x(), y2 + p.y())); } +inline void QRect::moveTo(int ax, int ay) +{ + x2 += ax - x1; + y2 += ay - y1; + x1 = ax; + y1 = ay; +} +inline void QRect::moveTo(const QPoint &p) +{ + x2 += p.x() - x1; + y2 += p.y() - y1; + x1 = p.x(); + y1 = p.y(); +} +inline void QRect::moveLeft(int pos) +{ x2 += (pos - x1); x1 = pos; } +inline void QRect::moveTop(int pos) +{ y2 += (pos - y1); y1 = pos; } +inline void QRect::moveRight(int pos) +{ + x1 += (pos - x2); + x2 = pos; +} +inline void QRect::moveBottom(int pos) +{ + y1 += (pos - y2); + y2 = pos; +} +inline void QRect::moveTopLeft(const QPoint &p) +{ + moveLeft(p.x()); + moveTop(p.y()); +} +inline void QRect::moveBottomRight(const QPoint &p) +{ + moveRight(p.x()); + moveBottom(p.y()); +} +inline void QRect::moveTopRight(const QPoint &p) +{ + moveRight(p.x()); + moveTop(p.y()); +} +inline void QRect::moveBottomLeft(const QPoint &p) +{ + moveLeft(p.x()); + moveBottom(p.y()); +} +inline void QRect::getRect(int *ax, int *ay, int *aw, int *ah) const +{ + *ax = x1; + *ay = y1; + *aw = x2 - x1 + 1; + *ah = y2 - y1 + 1; +} +inline void QRect::setRect(int ax, int ay, int aw, int ah) +{ + x1 = ax; + y1 = ay; + x2 = (ax + aw - 1); + y2 = (ay + ah - 1); +} +inline void QRect::getCoords(int *xp1, int *yp1, int *xp2, int *yp2) const +{ + *xp1 = x1; + *yp1 = y1; + *xp2 = x2; + *yp2 = y2; +} +inline void QRect::setCoords(int xp1, int yp1, int xp2, int yp2) +{ + x1 = xp1; + y1 = yp1; + x2 = xp2; + y2 = yp2; +} +inline QRect QRect::adjusted(int xp1, int yp1, int xp2, int yp2) const +{ return QRect(QPoint(x1 + xp1, y1 + yp1), QPoint(x2 + xp2, y2 + yp2)); } +inline void QRect::adjust(int dx1, int dy1, int dx2, int dy2) +{ + x1 += dx1; + y1 += dy1; + x2 += dx2; + y2 += dy2; +} +inline void QRect::setWidth(int w) +{ x2 = (x1 + w - 1); } +inline void QRect::setHeight(int h) +{ y2 = (y1 + h - 1); } +inline void QRect::setSize(const QSize &s) +{ + x2 = (s.width() + x1 - 1); + y2 = (s.height() + y1 - 1); +} +inline bool QRect::contains(int ax, int ay, bool aproper) const +{ + return contains(QPoint(ax, ay), aproper); +} +inline bool QRect::contains(int ax, int ay) const +{ + return contains(QPoint(ax, ay), false); +} +inline QRect& QRect::operator|=(const QRect &r) +{ + *this = *this | r; + return *this; +} +inline QRect& QRect::operator&=(const QRect &r) +{ + *this = *this & r; + return *this; +} +inline QRect QRect::intersect(const QRect &r) const +{ + return *this & r; +} +inline QRect QRect::intersected(const QRect &other) const +{ + return intersect(other); +} +inline QRect QRect::unite(const QRect &r) const +{ + return *this | r; +} +inline QRect QRect::united(const QRect &r) const +{ + return unite(r); +} +inline bool operator==(const QRect &r1, const QRect &r2) +{ + return r1.x1==r2.x1 && r1.x2==r2.x2 && r1.y1==r2.y1 && r1.y2==r2.y2; +} +inline bool operator!=(const QRect &r1, const QRect &r2) +{ + return r1.x1!=r2.x1 || r1.x2!=r2.x2 || r1.y1!=r2.y1 || r1.y2!=r2.y2; +} + QDebug operator<<(QDebug, const QRect &); +class QRectF +{ +public: + QRectF() { xp = yp = 0.; w = h = 0.; } + QRectF(const QPointF &topleft, const QSizeF &size); + QRectF(const QPointF &topleft, const QPointF &bottomRight); + QRectF(qreal left, qreal top, qreal width, qreal height); + QRectF(const QRect &rect); + bool isNull() const; + bool isEmpty() const; + bool isValid() const; + QRectF normalized() const; + inline qreal left() const { return xp; } + inline qreal top() const { return yp; } + inline qreal right() const { return xp + w; } + inline qreal bottom() const { return yp + h; } + inline qreal x() const; + inline qreal y() const; + inline void setLeft(qreal pos); + inline void setTop(qreal pos); + inline void setRight(qreal pos); + inline void setBottom(qreal pos); + inline void setX(qreal pos) { setLeft(pos); } + inline void setY(qreal pos) { setTop(pos); } + inline QPointF topLeft() const { return QPointF(xp, yp); } + inline QPointF bottomRight() const { return QPointF(xp+w, yp+h); } + inline QPointF topRight() const { return QPointF(xp+w, yp); } + inline QPointF bottomLeft() const { return QPointF(xp, yp+h); } + inline QPointF center() const; + void setTopLeft(const QPointF &p); + void setBottomRight(const QPointF &p); + void setTopRight(const QPointF &p); + void setBottomLeft(const QPointF &p); + void moveLeft(qreal pos); + void moveTop(qreal pos); + void moveRight(qreal pos); + void moveBottom(qreal pos); + void moveTopLeft(const QPointF &p); + void moveBottomRight(const QPointF &p); + void moveTopRight(const QPointF &p); + void moveBottomLeft(const QPointF &p); + void moveCenter(const QPointF &p); + void translate(qreal dx, qreal dy); + void translate(const QPointF &p); + QRectF translated(qreal dx, qreal dy) const; + QRectF translated(const QPointF &p) const; + void moveTo(qreal x, qreal t); + void moveTo(const QPointF &p); + void setRect(qreal x, qreal y, qreal w, qreal h); + void getRect(qreal *x, qreal *y, qreal *w, qreal *h) const; + void setCoords(qreal x1, qreal y1, qreal x2, qreal y2); + void getCoords(qreal *x1, qreal *y1, qreal *x2, qreal *y2) const; + inline void adjust(qreal x1, qreal y1, qreal x2, qreal y2); + inline QRectF adjusted(qreal x1, qreal y1, qreal x2, qreal y2) const; + QSizeF size() const; + qreal width() const; + qreal height() const; + void setWidth(qreal w); + void setHeight(qreal h); + void setSize(const QSizeF &s); + QRectF operator|(const QRectF &r) const; + QRectF operator&(const QRectF &r) const; + QRectF& operator|=(const QRectF &r); + QRectF& operator&=(const QRectF &r); + bool contains(const QPointF &p) const; + bool contains(qreal x, qreal y) const; + bool contains(const QRectF &r) const; + QRectF unite(const QRectF &r) const; + QRectF united(const QRectF &other) const; + QRectF intersect(const QRectF &r) const; + QRectF intersected(const QRectF &other) const; + bool intersects(const QRectF &r) const; + friend inline bool operator==(const QRectF &, const QRectF &); + friend inline bool operator!=(const QRectF &, const QRectF &); + QRect toRect() const; + QRect toAlignedRect() const; +private: + qreal xp; + qreal yp; + qreal w; + qreal h; +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QRectF)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QRectF"; } }; + inline bool operator==(const QRectF &, const QRectF &); + inline bool operator!=(const QRectF &, const QRectF &); + QDataStream &operator<<(QDataStream &, const QRectF &); + QDataStream &operator>>(QDataStream &, QRectF &); +inline QRectF::QRectF(qreal aleft, qreal atop, qreal awidth, qreal aheight) + : xp(aleft), yp(atop), w(awidth), h(aheight) +{ +} +inline QRectF::QRectF(const QPointF &atopLeft, const QSizeF &asize) +{ + xp = atopLeft.x(); + yp = atopLeft.y(); + w = asize.width(); + h = asize.height(); +} +inline QRectF::QRectF(const QPointF &atopLeft, const QPointF &abottomRight) +{ + xp = atopLeft.x(); + yp = atopLeft.y(); + w = abottomRight.x() - xp; + h = abottomRight.y() - yp; +} +inline QRectF::QRectF(const QRect &r) + : xp(r.x()), yp(r.y()), w(r.width()), h(r.height()) +{ +} +inline bool QRectF::isNull() const +{ return w == 0. && h == 0.; } +inline bool QRectF::isEmpty() const +{ return w <= 0. || h <= 0.; } +inline bool QRectF::isValid() const +{ return w > 0. && h > 0.; } +inline qreal QRectF::x() const +{ return xp; } +inline qreal QRectF::y() const +{ return yp; } +inline void QRectF::setLeft(qreal pos) { qreal diff = pos - xp; xp += diff; w -= diff; } +inline void QRectF::setRight(qreal pos) { w = pos - xp; } +inline void QRectF::setTop(qreal pos) { qreal diff = pos - yp; yp += diff; h -= diff; } +inline void QRectF::setBottom(qreal pos) { h = pos - yp; } +inline void QRectF::setTopLeft(const QPointF &p) { setLeft(p.x()); setTop(p.y()); } +inline void QRectF::setTopRight(const QPointF &p) { setRight(p.x()); setTop(p.y()); } +inline void QRectF::setBottomLeft(const QPointF &p) { setLeft(p.x()); setBottom(p.y()); } +inline void QRectF::setBottomRight(const QPointF &p) { setRight(p.x()); setBottom(p.y()); } +inline QPointF QRectF::center() const +{ return QPointF(xp + w/2, yp + h/2); } +inline void QRectF::moveLeft(qreal pos) { xp = pos; } +inline void QRectF::moveTop(qreal pos) { yp = pos; } +inline void QRectF::moveRight(qreal pos) { xp = pos - w; } +inline void QRectF::moveBottom(qreal pos) { yp = pos - h; } +inline void QRectF::moveTopLeft(const QPointF &p) { moveLeft(p.x()); moveTop(p.y()); } +inline void QRectF::moveTopRight(const QPointF &p) { moveRight(p.x()); moveTop(p.y()); } +inline void QRectF::moveBottomLeft(const QPointF &p) { moveLeft(p.x()); moveBottom(p.y()); } +inline void QRectF::moveBottomRight(const QPointF &p) { moveRight(p.x()); moveBottom(p.y()); } +inline void QRectF::moveCenter(const QPointF &p) { xp = p.x() - w/2; yp = p.y() - h/2; } +inline qreal QRectF::width() const +{ return w; } +inline qreal QRectF::height() const +{ return h; } +inline QSizeF QRectF::size() const +{ return QSizeF(w, h); } +inline void QRectF::translate(qreal dx, qreal dy) +{ + xp += dx; + yp += dy; +} +inline void QRectF::translate(const QPointF &p) +{ + xp += p.x(); + yp += p.y(); +} +inline void QRectF::moveTo(qreal ax, qreal ay) +{ + xp = ax; + yp = ay; +} +inline void QRectF::moveTo(const QPointF &p) +{ + xp = p.x(); + yp = p.y(); +} +inline QRectF QRectF::translated(qreal dx, qreal dy) const +{ return QRectF(xp + dx, yp + dy, w, h); } +inline QRectF QRectF::translated(const QPointF &p) const +{ return QRectF(xp + p.x(), yp + p.y(), w, h); } +inline void QRectF::getRect(qreal *ax, qreal *ay, qreal *aaw, qreal *aah) const +{ + *ax = this->xp; + *ay = this->yp; + *aaw = this->w; + *aah = this->h; +} +inline void QRectF::setRect(qreal ax, qreal ay, qreal aaw, qreal aah) +{ + this->xp = ax; + this->yp = ay; + this->w = aaw; + this->h = aah; +} +inline void QRectF::getCoords(qreal *xp1, qreal *yp1, qreal *xp2, qreal *yp2) const +{ + *xp1 = xp; + *yp1 = yp; + *xp2 = xp + w; + *yp2 = yp + h; +} +inline void QRectF::setCoords(qreal xp1, qreal yp1, qreal xp2, qreal yp2) +{ + xp = xp1; + yp = yp1; + w = xp2 - xp1; + h = yp2 - yp1; +} +inline void QRectF::adjust(qreal xp1, qreal yp1, qreal xp2, qreal yp2) +{ xp += xp1; yp += yp1; w += xp2 - xp1; h += yp2 - yp1; } +inline QRectF QRectF::adjusted(qreal xp1, qreal yp1, qreal xp2, qreal yp2) const +{ return QRectF(xp + xp1, yp + yp1, w + xp2 - xp1, h + yp2 - yp1); } +inline void QRectF::setWidth(qreal aw) +{ this->w = aw; } +inline void QRectF::setHeight(qreal ah) +{ this->h = ah; } +inline void QRectF::setSize(const QSizeF &s) +{ + w = s.width(); + h = s.height(); +} +inline bool QRectF::contains(qreal ax, qreal ay) const +{ + return contains(QPointF(ax, ay)); +} +inline QRectF& QRectF::operator|=(const QRectF &r) +{ + *this = *this | r; + return *this; +} +inline QRectF& QRectF::operator&=(const QRectF &r) +{ + *this = *this & r; + return *this; +} +inline QRectF QRectF::intersect(const QRectF &r) const +{ + return *this & r; +} +inline QRectF QRectF::intersected(const QRectF &r) const +{ + return intersect(r); +} +inline QRectF QRectF::unite(const QRectF &r) const +{ + return *this | r; +} +inline QRectF QRectF::united(const QRectF &r) const +{ + return unite(r); +} +inline bool operator==(const QRectF &r1, const QRectF &r2) +{ + return qFuzzyCompare(r1.xp, r2.xp) && qFuzzyCompare(r1.yp, r2.yp) + && qFuzzyCompare(r1.w, r2.w) && qFuzzyCompare(r1.h, r2.h); +} +inline bool operator!=(const QRectF &r1, const QRectF &r2) +{ + return !qFuzzyCompare(r1.xp, r2.xp) || !qFuzzyCompare(r1.yp, r2.yp) + || !qFuzzyCompare(r1.w, r2.w) || !qFuzzyCompare(r1.h, r2.h); +} +inline QRect QRectF::toRect() const +{ + return QRect(qRound(xp), qRound(yp), qRound(w), qRound(h)); +} + QDebug operator<<(QDebug, const QRectF &); +typedef QtValidLicenseForGuiModule QtGuiModule; +class QPaintEngine; +class QPaintDevice +{ +public: + enum PaintDeviceMetric { + PdmWidth = 1, + PdmHeight, + PdmWidthMM, + PdmHeightMM, + PdmNumColors, + PdmDepth, + PdmDpiX, + PdmDpiY, + PdmPhysicalDpiX, + PdmPhysicalDpiY + }; + virtual ~QPaintDevice(); + virtual int devType() const; + bool paintingActive() const; + virtual QPaintEngine *paintEngine() const = 0; + int width() const { return metric(PdmWidth); } + int height() const { return metric(PdmHeight); } + int widthMM() const { return metric(PdmWidthMM); } + int heightMM() const { return metric(PdmHeightMM); } + int logicalDpiX() const { return metric(PdmDpiX); } + int logicalDpiY() const { return metric(PdmDpiY); } + int physicalDpiX() const { return metric(PdmPhysicalDpiX); } + int physicalDpiY() const { return metric(PdmPhysicalDpiY); } + int numColors() const { return metric(PdmNumColors); } + int colorCount() const { return metric(PdmNumColors); } + int depth() const { return metric(PdmDepth); } +public: + QPaintDevice(); + virtual int metric(PaintDeviceMetric metric) const; + ushort painters; +private: + QPaintDevice(const QPaintDevice &); QPaintDevice &operator=(const QPaintDevice &); + friend class QPainter; + friend class QFontEngineMac; + friend class QX11PaintEngine; + friend int qt_paint_device_metric(const QPaintDevice *device, PaintDeviceMetric metric); +}; +inline int QPaintDevice::devType() const +{ return QInternal::UnknownDevice; } +inline bool QPaintDevice::paintingActive() const +{ return painters != 0; } +typedef QtValidLicenseForGuiModule QtGuiModule; +typedef unsigned int QRgb; +const QRgb RGB_MASK = 0x00ffffff; + inline int qRed(QRgb rgb) +{ return ((rgb >> 16) & 0xff); } + inline int qGreen(QRgb rgb) +{ return ((rgb >> 8) & 0xff); } + inline int qBlue(QRgb rgb) +{ return (rgb & 0xff); } + inline int qAlpha(QRgb rgb) +{ return ((rgb >> 24) & 0xff); } + inline QRgb qRgb(int r, int g, int b) +{ return (0xffu << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); } + inline QRgb qRgba(int r, int g, int b, int a) +{ return ((a & 0xff) << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); } + inline int qGray(int r, int g, int b) +{ return (r*11+g*16+b*5)/32; } + inline int qGray(QRgb rgb) +{ return qGray(qRed(rgb), qGreen(rgb), qBlue(rgb)); } + inline bool qIsGray(QRgb rgb) +{ return qRed(rgb) == qGreen(rgb) && qRed(rgb) == qBlue(rgb); } +typedef QtValidLicenseForCoreModule QtCoreModule; +namespace QAlgorithmsPrivate { +template + void qSortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan); +template +inline void qSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &dummy); +template + void qStableSortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan); +template +inline void qStableSortHelper(RandomAccessIterator, RandomAccessIterator, const T &); +template + RandomAccessIterator qLowerBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan); +template + RandomAccessIterator qUpperBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan); +template + RandomAccessIterator qBinaryFindHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan); +} +template +inline OutputIterator qCopy(InputIterator begin, InputIterator end, OutputIterator dest) +{ + while (begin != end) + *dest++ = *begin++; + return dest; +} +template +inline BiIterator2 qCopyBackward(BiIterator1 begin, BiIterator1 end, BiIterator2 dest) +{ + while (begin != end) + *--dest = *--end; + return dest; +} +template +inline bool qEqual(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2) +{ + for (; first1 != last1; ++first1, ++first2) + if (!(*first1 == *first2)) + return false; + return true; +} +template +inline void qFill(ForwardIterator first, ForwardIterator last, const T &val) +{ + for (; first != last; ++first) + *first = val; +} +template +inline void qFill(Container &container, const T &val) +{ + qFill(container.begin(), container.end(), val); +} +template +inline InputIterator qFind(InputIterator first, InputIterator last, const T &val) +{ + while (first != last && !(*first == val)) + ++first; + return first; +} +template +inline typename Container::const_iterator qFind(const Container &container, const T &val) +{ + return qFind(container.constBegin(), container.constEnd(), val); +} +template +inline void qCount(InputIterator first, InputIterator last, const T &value, Size &n) +{ + for (; first != last; ++first) + if (*first == value) + ++n; +} +template +inline void qCount(const Container &container, const T &value, Size &n) +{ + qCount(container.constBegin(), container.constEnd(), value, n); +} +template +class qLess +{ +public: + inline bool operator()(const T &t1, const T &t2) const + { + return (t1 < t2); + } +}; +template +class qGreater +{ +public: + inline bool operator()(const T &t1, const T &t2) const + { + return (t2 < t1); + } +}; +template +inline void qSort(RandomAccessIterator start, RandomAccessIterator end) +{ + if (start != end) + QAlgorithmsPrivate::qSortHelper(start, end, *start); +} +template +inline void qSort(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan) +{ + if (start != end) + QAlgorithmsPrivate::qSortHelper(start, end, *start, lessThan); +} +template +inline void qSort(Container &c) +{ + if (!c.empty()) + QAlgorithmsPrivate::qSortHelper(c.begin(), c.end(), *c.begin()); +} +template +inline void qStableSort(RandomAccessIterator start, RandomAccessIterator end) +{ + if (start != end) + QAlgorithmsPrivate::qStableSortHelper(start, end, *start); +} +template +inline void qStableSort(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan) +{ + if (start != end) + QAlgorithmsPrivate::qStableSortHelper(start, end, *start, lessThan); +} +template +inline void qStableSort(Container &c) +{ + if (!c.empty()) + QAlgorithmsPrivate::qStableSortHelper(c.begin(), c.end(), *c.begin()); +} +template + RandomAccessIterator qLowerBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value) +{ + RandomAccessIterator middle; + int n = end - begin; + int half; + while (n > 0) { + half = n >> 1; + middle = begin + half; + if (*middle < value) { + begin = middle + 1; + n -= half + 1; + } else { + n = half; + } + } + return begin; +} +template + RandomAccessIterator qLowerBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) +{ + return QAlgorithmsPrivate::qLowerBoundHelper(begin, end, value, lessThan); +} +template + typename Container::const_iterator qLowerBound(const Container &container, const T &value) +{ + return QAlgorithmsPrivate::qLowerBoundHelper(container.constBegin(), container.constEnd(), value, qLess()); +} +template + RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value) +{ + RandomAccessIterator middle; + int n = end - begin; + int half; + while (n > 0) { + half = n >> 1; + middle = begin + half; + if (value < *middle) { + n = half; + } else { + begin = middle + 1; + n -= half + 1; + } + } + return begin; +} +template + RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) +{ + return QAlgorithmsPrivate::qUpperBoundHelper(begin, end, value, lessThan); +} +template + typename Container::const_iterator qUpperBound(const Container &container, const T &value) +{ + return QAlgorithmsPrivate::qUpperBoundHelper(container.constBegin(), container.constEnd(), value, qLess()); +} +template + RandomAccessIterator qBinaryFind(RandomAccessIterator begin, RandomAccessIterator end, const T &value) +{ + RandomAccessIterator it = qLowerBound(begin, end, value); + if (it == end || value < *it) + return end; + return it; +} +template + RandomAccessIterator qBinaryFind(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) +{ + return QAlgorithmsPrivate::qBinaryFindHelper(begin, end, value, lessThan); +} +template + typename Container::const_iterator qBinaryFind(const Container &container, const T &value) +{ + return QAlgorithmsPrivate::qBinaryFindHelper(container.constBegin(), container.constEnd(), value, qLess()); +} +template + void qDeleteAll(ForwardIterator begin, ForwardIterator end) +{ + while (begin != end) { + delete *begin; + ++begin; + } +} +template +inline void qDeleteAll(const Container &c) +{ + qDeleteAll(c.begin(), c.end()); +} +namespace QAlgorithmsPrivate { +template + void qSortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan) +{ +top: + int span = int(end - start); + if (span < 2) + return; + --end; + RandomAccessIterator low = start, high = end - 1; + RandomAccessIterator pivot = start + span / 2; + if (lessThan(*end, *start)) + qSwap(*end, *start); + if (span == 2) + return; + if (lessThan(*pivot, *start)) + qSwap(*pivot, *start); + if (lessThan(*end, *pivot)) + qSwap(*end, *pivot); + if (span == 3) + return; + qSwap(*pivot, *end); + while (low < high) { + while (low < high && lessThan(*low, *end)) + ++low; + while (high > low && lessThan(*end, *high)) + --high; + if (low < high) { + qSwap(*low, *high); + ++low; + --high; + } else { + break; + } + } + if (lessThan(*low, *end)) + ++low; + qSwap(*end, *low); + qSortHelper(start, low, t, lessThan); + start = low + 1; + ++end; + goto top; +} +template +inline void qSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &dummy) +{ + qSortHelper(begin, end, dummy, qLess()); +} +template + void qReverse(RandomAccessIterator begin, RandomAccessIterator end) +{ + --end; + while (begin < end) + qSwap(*begin++, *end--); +} +template + void qRotate(RandomAccessIterator begin, RandomAccessIterator middle, RandomAccessIterator end) +{ + qReverse(begin, middle); + qReverse(middle, end); + qReverse(begin, end); +} +template + void qMerge(RandomAccessIterator begin, RandomAccessIterator pivot, RandomAccessIterator end, T &t, LessThan lessThan) +{ + const int len1 = pivot - begin; + const int len2 = end - pivot; + if (len1 == 0 || len2 == 0) + return; + if (len1 + len2 == 2) { + if (lessThan(*(begin + 1), *(begin))) + qSwap(*begin, *(begin + 1)); + return; + } + RandomAccessIterator firstCut; + RandomAccessIterator secondCut; + int len2Half; + if (len1 > len2) { + const int len1Half = len1 / 2; + firstCut = begin + len1Half; + secondCut = qLowerBound(pivot, end, *firstCut, lessThan); + len2Half = secondCut - pivot; + } else { + len2Half = len2 / 2; + secondCut = pivot + len2Half; + firstCut = qUpperBound(begin, pivot, *secondCut, lessThan); + } + qRotate(firstCut, pivot, secondCut); + const RandomAccessIterator newPivot = firstCut + len2Half; + qMerge(begin, firstCut, newPivot, t, lessThan); + qMerge(newPivot, secondCut, end, t, lessThan); +} +template + void qStableSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &t, LessThan lessThan) +{ + const int span = end - begin; + if (span < 2) + return; + const RandomAccessIterator middle = begin + span / 2; + qStableSortHelper(begin, middle, t, lessThan); + qStableSortHelper(middle, end, t, lessThan); + qMerge(begin, middle, end, t, lessThan); +} +template +inline void qStableSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &dummy) +{ + qStableSortHelper(begin, end, dummy, qLess()); +} +template + RandomAccessIterator qLowerBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) +{ + RandomAccessIterator middle; + int n = int(end - begin); + int half; + while (n > 0) { + half = n >> 1; + middle = begin + half; + if (lessThan(*middle, value)) { + begin = middle + 1; + n -= half + 1; + } else { + n = half; + } + } + return begin; +} +template + RandomAccessIterator qUpperBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) +{ + RandomAccessIterator middle; + int n = end - begin; + int half; + while (n > 0) { + half = n >> 1; + middle = begin + half; + if (lessThan(value, *middle)) { + n = half; + } else { + begin = middle + 1; + n -= half + 1; + } + } + return begin; +} +template + RandomAccessIterator qBinaryFindHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) +{ + RandomAccessIterator it = qLowerBoundHelper(begin, end, value, lessThan); + if (it == end || lessThan(value, *it)) + return end; + return it; +} +} +typedef QtValidLicenseForCoreModule QtCoreModule; +template +struct QScopedPointerDeleter +{ + static inline void cleanup(T *pointer) + { + typedef char IsIncompleteType[ sizeof(T) ? 1 : -1 ]; + (void) sizeof(IsIncompleteType); + delete pointer; + } +}; +template +struct QScopedPointerArrayDeleter +{ + static inline void cleanup(T *pointer) + { + typedef char IsIncompleteType[ sizeof(T) ? 1 : -1 ]; + (void) sizeof(IsIncompleteType); + delete [] pointer; + } +}; +struct QScopedPointerPodDeleter +{ + static inline void cleanup(void *pointer) { if (pointer) qFree(pointer); } +}; +template > +class QScopedPointer +{ + typedef T *QScopedPointer:: *RestrictedBool; +public: + explicit inline QScopedPointer(T *p = 0) : d(p) + { + } + inline ~QScopedPointer() + { + T *oldD = this->d; + Cleanup::cleanup(oldD); + this->d = 0; + } + inline T &operator*() const + { + ((!(d)) ? qt_assert("d","/usr/include/qt4/QtCore/qscopedpointer.h",106) : qt_noop()); + return *d; + } + inline T *operator->() const + { + ((!(d)) ? qt_assert("d","/usr/include/qt4/QtCore/qscopedpointer.h",112) : qt_noop()); + return d; + } + inline bool operator!() const + { + return !d; + } + inline operator RestrictedBool() const + { + return isNull() ? 0 : &QScopedPointer::d; + } + inline T *data() const + { + return d; + } + inline bool isNull() const + { + return !d; + } + inline void reset(T *other = 0) + { + if (d == other) + return; + T *oldD = d; + d = other; + Cleanup::cleanup(oldD); + } + inline T *take() + { + T *oldD = d; + d = 0; + return oldD; + } + inline void swap(QScopedPointer &other) + { + qSwap(d, other.d); + } + typedef T *pointer; +public: + T *d; +private: + QScopedPointer(const QScopedPointer &); QScopedPointer &operator=(const QScopedPointer &); +}; +template +inline bool operator==(const QScopedPointer &lhs, const QScopedPointer &rhs) +{ + return lhs.data() == rhs.data(); +} +template +inline bool operator!=(const QScopedPointer &lhs, const QScopedPointer &rhs) +{ + return lhs.data() != rhs.data(); +} +template +inline void qSwap(QScopedPointer &p1, QScopedPointer &p2) +{ p1.swap(p2); } +template > +class QScopedArrayPointer : public QScopedPointer +{ +public: + explicit inline QScopedArrayPointer(T *p = 0) + : QScopedPointer(p) + { + } + inline T &operator[](int i) + { + return this->d[i]; + } + inline const T &operator[](int i) const + { + return this->d[i]; + } +private: + QScopedArrayPointer(const QScopedArrayPointer &); QScopedArrayPointer &operator=(const QScopedArrayPointer &); +}; +namespace std { + struct bidirectional_iterator_tag; + struct random_access_iterator_tag; +} +typedef QtValidLicenseForCoreModule QtCoreModule; + + + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + class locale + { + public: + typedef int category; + class facet; + class id; + class _Impl; + friend class facet; + friend class _Impl; + template + friend bool + has_facet(const locale&) throw(); + template + friend const _Facet& + use_facet(const locale&); + template + friend struct __use_cache; + static const category none = 0; + static const category ctype = 1L << 0; + static const category numeric = 1L << 1; + static const category collate = 1L << 2; + static const category time = 1L << 3; + static const category monetary = 1L << 4; + static const category messages = 1L << 5; + static const category all = (ctype | numeric | collate | + time | monetary | messages); + locale() throw(); + locale(const locale& __other) throw(); + explicit + locale(const char* __s); + locale(const locale& __base, const char* __s, category __cat); + locale(const locale& __base, const locale& __add, category __cat); + template + locale(const locale& __other, _Facet* __f); + ~locale() throw(); + const locale& + operator=(const locale& __other) throw(); + template + locale + combine(const locale& __other) const; + string + name() const; + bool + operator==(const locale& __other) const throw(); + bool + operator!=(const locale& __other) const throw() + { return !(this->operator==(__other)); } + template + bool + operator()(const basic_string<_Char, _Traits, _Alloc>& __s1, + const basic_string<_Char, _Traits, _Alloc>& __s2) const; + static locale + global(const locale&); + static const locale& + classic(); + private: + _Impl* _M_impl; + static _Impl* _S_classic; + static _Impl* _S_global; + static const char* const* const _S_categories; + enum { _S_categories_size = 6 + 6 }; + static __gthread_once_t _S_once; + explicit + locale(_Impl*) throw(); + static void + _S_initialize(); + static void + _S_initialize_once() throw(); + static category + _S_normalize_category(category); + void + _M_coalesce(const locale& __base, const locale& __add, category __cat); + }; + class locale::facet + { + private: + friend class locale; + friend class locale::_Impl; + mutable _Atomic_word _M_refcount; + static __c_locale _S_c_locale; + static const char _S_c_name[2]; + static __gthread_once_t _S_once; + static void + _S_initialize_once(); + public: + explicit + facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0) + { } + virtual + ~facet(); + static void + _S_create_c_locale(__c_locale& __cloc, const char* __s, + __c_locale __old = 0); + static __c_locale + _S_clone_c_locale(__c_locale& __cloc) throw(); + static void + _S_destroy_c_locale(__c_locale& __cloc); + static __c_locale + _S_lc_ctype_c_locale(__c_locale __cloc, const char* __s); + static __c_locale + _S_get_c_locale(); + __attribute__ ((__const__)) static const char* + _S_get_c_name() throw(); + private: + void + _M_add_reference() const throw() + { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } + void + _M_remove_reference() const throw() + { + if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) + { + try + { delete this; } + catch(...) + { } + } + } + facet(const facet&); + facet& + operator=(const facet&); + }; + class locale::id + { + private: + friend class locale; + friend class locale::_Impl; + template + friend const _Facet& + use_facet(const locale&); + template + friend bool + has_facet(const locale&) throw(); + mutable size_t _M_index; + static _Atomic_word _S_refcount; + void + operator=(const id&); + id(const id&); + public: + id() { } + size_t + _M_id() const throw(); + }; + class locale::_Impl + { + public: + friend class locale; + friend class locale::facet; + template + friend bool + has_facet(const locale&) throw(); + template + friend const _Facet& + use_facet(const locale&); + template + friend struct __use_cache; + private: + _Atomic_word _M_refcount; + const facet** _M_facets; + size_t _M_facets_size; + const facet** _M_caches; + char** _M_names; + static const locale::id* const _S_id_ctype[]; + static const locale::id* const _S_id_numeric[]; + static const locale::id* const _S_id_collate[]; + static const locale::id* const _S_id_time[]; + static const locale::id* const _S_id_monetary[]; + static const locale::id* const _S_id_messages[]; + static const locale::id* const* const _S_facet_categories[]; + void + _M_add_reference() throw() + { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } + void + _M_remove_reference() throw() + { + if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) + { + try + { delete this; } + catch(...) + { } + } + } + _Impl(const _Impl&, size_t); + _Impl(const char*, size_t); + _Impl(size_t) throw(); + ~_Impl() throw(); + _Impl(const _Impl&); + void + operator=(const _Impl&); + bool + _M_check_same_name() + { + bool __ret = true; + if (_M_names[1]) + for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i) + __ret = __builtin_strcmp(_M_names[__i], _M_names[__i + 1]) == 0; + return __ret; + } + void + _M_replace_categories(const _Impl*, category); + void + _M_replace_category(const _Impl*, const locale::id* const*); + void + _M_replace_facet(const _Impl*, const locale::id*); + void + _M_install_facet(const locale::id*, const facet*); + template + void + _M_init_facet(_Facet* __facet) + { _M_install_facet(&_Facet::id, __facet); } + void + _M_install_cache(const facet*, size_t); + }; + template + bool + has_facet(const locale& __loc) throw(); + template + const _Facet& + use_facet(const locale& __loc); + template + class collate : public locale::facet + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + public: + __c_locale _M_c_locale_collate; + public: + static locale::id id; + explicit + collate(size_t __refs = 0) + : facet(__refs), _M_c_locale_collate(_S_get_c_locale()) + { } + explicit + collate(__c_locale __cloc, size_t __refs = 0) + : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc)) + { } + int + compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const + { return this->do_compare(__lo1, __hi1, __lo2, __hi2); } + string_type + transform(const _CharT* __lo, const _CharT* __hi) const + { return this->do_transform(__lo, __hi); } + long + hash(const _CharT* __lo, const _CharT* __hi) const + { return this->do_hash(__lo, __hi); } + int + _M_compare(const _CharT*, const _CharT*) const throw(); + size_t + _M_transform(_CharT*, const _CharT*, size_t) const throw(); + public: + virtual + ~collate() + { _S_destroy_c_locale(_M_c_locale_collate); } + virtual int + do_compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const; + virtual string_type + do_transform(const _CharT* __lo, const _CharT* __hi) const; + virtual long + do_hash(const _CharT* __lo, const _CharT* __hi) const; + }; + template + locale::id collate<_CharT>::id; + template<> + int + collate::_M_compare(const char*, const char*) const throw(); + template<> + size_t + collate::_M_transform(char*, const char*, size_t) const throw(); + template<> + int + collate::_M_compare(const wchar_t*, const wchar_t*) const throw(); + template<> + size_t + collate::_M_transform(wchar_t*, const wchar_t*, size_t) const throw(); + template + class collate_byname : public collate<_CharT> + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + explicit + collate_byname(const char* __s, size_t __refs = 0) + : collate<_CharT>(__refs) + { + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + this->_S_destroy_c_locale(this->_M_c_locale_collate); + this->_S_create_c_locale(this->_M_c_locale_collate, __s); + } + } + public: + virtual + ~collate_byname() { } + }; +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + locale:: + locale(const locale& __other, _Facet* __f) + { + _M_impl = new _Impl(*__other._M_impl, 1); + try + { _M_impl->_M_install_facet(&_Facet::id, __f); } + catch(...) + { + _M_impl->_M_remove_reference(); + throw; + } + delete [] _M_impl->_M_names[0]; + _M_impl->_M_names[0] = 0; + } + template + locale + locale:: + combine(const locale& __other) const + { + _Impl* __tmp = new _Impl(*_M_impl, 1); + try + { + __tmp->_M_replace_facet(__other._M_impl, &_Facet::id); + } + catch(...) + { + __tmp->_M_remove_reference(); + throw; + } + return locale(__tmp); + } + template + bool + locale:: + operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1, + const basic_string<_CharT, _Traits, _Alloc>& __s2) const + { + typedef std::collate<_CharT> __collate_type; + const __collate_type& __collate = use_facet<__collate_type>(*this); + return (__collate.compare(__s1.data(), __s1.data() + __s1.length(), + __s2.data(), __s2.data() + __s2.length()) < 0); + } + template + bool + has_facet(const locale& __loc) throw() + { + const size_t __i = _Facet::id._M_id(); + const locale::facet** __facets = __loc._M_impl->_M_facets; + return (__i < __loc._M_impl->_M_facets_size + && dynamic_cast(__facets[__i])); + } + template + const _Facet& + use_facet(const locale& __loc) + { + const size_t __i = _Facet::id._M_id(); + const locale::facet** __facets = __loc._M_impl->_M_facets; + if (__i >= __loc._M_impl->_M_facets_size || !__facets[__i]) + __throw_bad_cast(); + return dynamic_cast(*__facets[__i]); + } + template + int + collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const throw () + { return 0; } + template + size_t + collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const throw () + { return 0; } + template + int + collate<_CharT>:: + do_compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const + { + const string_type __one(__lo1, __hi1); + const string_type __two(__lo2, __hi2); + const _CharT* __p = __one.c_str(); + const _CharT* __pend = __one.data() + __one.length(); + const _CharT* __q = __two.c_str(); + const _CharT* __qend = __two.data() + __two.length(); + for (;;) + { + const int __res = _M_compare(__p, __q); + if (__res) + return __res; + __p += char_traits<_CharT>::length(__p); + __q += char_traits<_CharT>::length(__q); + if (__p == __pend && __q == __qend) + return 0; + else if (__p == __pend) + return -1; + else if (__q == __qend) + return 1; + __p++; + __q++; + } + } + template + typename collate<_CharT>::string_type + collate<_CharT>:: + do_transform(const _CharT* __lo, const _CharT* __hi) const + { + string_type __ret; + const string_type __str(__lo, __hi); + const _CharT* __p = __str.c_str(); + const _CharT* __pend = __str.data() + __str.length(); + size_t __len = (__hi - __lo) * 2; + _CharT* __c = new _CharT[__len]; + try + { + for (;;) + { + size_t __res = _M_transform(__c, __p, __len); + if (__res >= __len) + { + __len = __res + 1; + delete [] __c, __c = 0; + __c = new _CharT[__len]; + __res = _M_transform(__c, __p, __len); + } + __ret.append(__c, __res); + __p += char_traits<_CharT>::length(__p); + if (__p == __pend) + break; + __p++; + __ret.push_back(_CharT()); + } + } + catch(...) + { + delete [] __c; + throw; + } + delete [] __c; + return __ret; + } + template + long + collate<_CharT>:: + do_hash(const _CharT* __lo, const _CharT* __hi) const + { + unsigned long __val = 0; + for (; __lo < __hi; ++__lo) + __val = + *__lo + ((__val << 7) + | (__val >> (__gnu_cxx::__numeric_traits:: + __digits - 7))); + return static_cast(__val); + } + extern template class collate; + extern template class collate_byname; + extern template + const collate& + use_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template class collate; + extern template class collate_byname; + extern template + const collate& + use_facet >(const locale&); + extern template + bool + has_facet >(const locale&); +} +namespace std __attribute__ ((__visibility__ ("default"))) { + enum _Ios_Fmtflags + { + _S_boolalpha = 1L << 0, + _S_dec = 1L << 1, + _S_fixed = 1L << 2, + _S_hex = 1L << 3, + _S_internal = 1L << 4, + _S_left = 1L << 5, + _S_oct = 1L << 6, + _S_right = 1L << 7, + _S_scientific = 1L << 8, + _S_showbase = 1L << 9, + _S_showpoint = 1L << 10, + _S_showpos = 1L << 11, + _S_skipws = 1L << 12, + _S_unitbuf = 1L << 13, + _S_uppercase = 1L << 14, + _S_adjustfield = _S_left | _S_right | _S_internal, + _S_basefield = _S_dec | _S_oct | _S_hex, + _S_floatfield = _S_scientific | _S_fixed, + _S_ios_fmtflags_end = 1L << 16 + }; + inline _Ios_Fmtflags + operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) & static_cast(__b)); } + inline _Ios_Fmtflags + operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) | static_cast(__b)); } + inline _Ios_Fmtflags + operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) ^ static_cast(__b)); } + inline _Ios_Fmtflags& + operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a | __b; } + inline _Ios_Fmtflags& + operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a & __b; } + inline _Ios_Fmtflags& + operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a ^ __b; } + inline _Ios_Fmtflags + operator~(_Ios_Fmtflags __a) + { return _Ios_Fmtflags(~static_cast(__a)); } + enum _Ios_Openmode + { + _S_app = 1L << 0, + _S_ate = 1L << 1, + _S_bin = 1L << 2, + _S_in = 1L << 3, + _S_out = 1L << 4, + _S_trunc = 1L << 5, + _S_ios_openmode_end = 1L << 16 + }; + inline _Ios_Openmode + operator&(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) & static_cast(__b)); } + inline _Ios_Openmode + operator|(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) | static_cast(__b)); } + inline _Ios_Openmode + operator^(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) ^ static_cast(__b)); } + inline _Ios_Openmode& + operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a | __b; } + inline _Ios_Openmode& + operator&=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a & __b; } + inline _Ios_Openmode& + operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a ^ __b; } + inline _Ios_Openmode + operator~(_Ios_Openmode __a) + { return _Ios_Openmode(~static_cast(__a)); } + enum _Ios_Iostate + { + _S_goodbit = 0, + _S_badbit = 1L << 0, + _S_eofbit = 1L << 1, + _S_failbit = 1L << 2, + _S_ios_iostate_end = 1L << 16 + }; + inline _Ios_Iostate + operator&(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) & static_cast(__b)); } + inline _Ios_Iostate + operator|(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) | static_cast(__b)); } + inline _Ios_Iostate + operator^(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) ^ static_cast(__b)); } + inline _Ios_Iostate& + operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a | __b; } + inline _Ios_Iostate& + operator&=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a & __b; } + inline _Ios_Iostate& + operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a ^ __b; } + inline _Ios_Iostate + operator~(_Ios_Iostate __a) + { return _Ios_Iostate(~static_cast(__a)); } + enum _Ios_Seekdir + { + _S_beg = 0, + _S_cur = 1, + _S_end = 2, + _S_ios_seekdir_end = 1L << 16 + }; + class ios_base + { + public: + class failure : public exception + { + public: + explicit + failure(const string& __str) throw(); + virtual + ~failure() throw(); + virtual const char* + what() const throw(); + private: + string _M_msg; + }; + typedef _Ios_Fmtflags fmtflags; + static const fmtflags boolalpha = _S_boolalpha; + static const fmtflags dec = _S_dec; + static const fmtflags fixed = _S_fixed; + static const fmtflags hex = _S_hex; + static const fmtflags internal = _S_internal; + static const fmtflags left = _S_left; + static const fmtflags oct = _S_oct; + static const fmtflags right = _S_right; + static const fmtflags scientific = _S_scientific; + static const fmtflags showbase = _S_showbase; + static const fmtflags showpoint = _S_showpoint; + static const fmtflags showpos = _S_showpos; + static const fmtflags skipws = _S_skipws; + static const fmtflags unitbuf = _S_unitbuf; + static const fmtflags uppercase = _S_uppercase; + static const fmtflags adjustfield = _S_adjustfield; + static const fmtflags basefield = _S_basefield; + static const fmtflags floatfield = _S_floatfield; + typedef _Ios_Iostate iostate; + static const iostate badbit = _S_badbit; + static const iostate eofbit = _S_eofbit; + static const iostate failbit = _S_failbit; + static const iostate goodbit = _S_goodbit; + typedef _Ios_Openmode openmode; + static const openmode app = _S_app; + static const openmode ate = _S_ate; + static const openmode binary = _S_bin; + static const openmode in = _S_in; + static const openmode out = _S_out; + static const openmode trunc = _S_trunc; + typedef _Ios_Seekdir seekdir; + static const seekdir beg = _S_beg; + static const seekdir cur = _S_cur; + static const seekdir end = _S_end; + typedef int io_state; + typedef int open_mode; + typedef int seek_dir; + typedef std::streampos streampos; + typedef std::streamoff streamoff; + enum event + { + erase_event, + imbue_event, + copyfmt_event + }; + typedef void (*event_callback) (event, ios_base&, int); + void + register_callback(event_callback __fn, int __index); + public: + streamsize _M_precision; + streamsize _M_width; + fmtflags _M_flags; + iostate _M_exception; + iostate _M_streambuf_state; + struct _Callback_list + { + _Callback_list* _M_next; + ios_base::event_callback _M_fn; + int _M_index; + _Atomic_word _M_refcount; + _Callback_list(ios_base::event_callback __fn, int __index, + _Callback_list* __cb) + : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { } + void + _M_add_reference() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } + int + _M_remove_reference() + { return __gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1); } + }; + _Callback_list* _M_callbacks; + void + _M_call_callbacks(event __ev) throw(); + void + _M_dispose_callbacks(void) throw(); + struct _Words + { + void* _M_pword; + long _M_iword; + _Words() : _M_pword(0), _M_iword(0) { } + }; + _Words _M_word_zero; + enum { _S_local_word_size = 8 }; + _Words _M_local_word[_S_local_word_size]; + int _M_word_size; + _Words* _M_word; + _Words& + _M_grow_words(int __index, bool __iword); + locale _M_ios_locale; + void + _M_init() throw(); + public: + class Init + { + friend class ios_base; + public: + Init(); + ~Init(); + private: + static _Atomic_word _S_refcount; + static bool _S_synced_with_stdio; + }; + fmtflags + flags() const + { return _M_flags; } + fmtflags + flags(fmtflags __fmtfl) + { + fmtflags __old = _M_flags; + _M_flags = __fmtfl; + return __old; + } + fmtflags + setf(fmtflags __fmtfl) + { + fmtflags __old = _M_flags; + _M_flags |= __fmtfl; + return __old; + } + fmtflags + setf(fmtflags __fmtfl, fmtflags __mask) + { + fmtflags __old = _M_flags; + _M_flags &= ~__mask; + _M_flags |= (__fmtfl & __mask); + return __old; + } + void + unsetf(fmtflags __mask) + { _M_flags &= ~__mask; } + streamsize + precision() const + { return _M_precision; } + streamsize + precision(streamsize __prec) + { + streamsize __old = _M_precision; + _M_precision = __prec; + return __old; + } + streamsize + width() const + { return _M_width; } + streamsize + width(streamsize __wide) + { + streamsize __old = _M_width; + _M_width = __wide; + return __old; + } + static bool + sync_with_stdio(bool __sync = true); + locale + imbue(const locale& __loc) throw(); + locale + getloc() const + { return _M_ios_locale; } + const locale& + _M_getloc() const + { return _M_ios_locale; } + static int + xalloc() throw(); + long& + iword(int __ix) + { + _Words& __word = (__ix < _M_word_size) + ? _M_word[__ix] : _M_grow_words(__ix, true); + return __word._M_iword; + } + void*& + pword(int __ix) + { + _Words& __word = (__ix < _M_word_size) + ? _M_word[__ix] : _M_grow_words(__ix, false); + return __word._M_pword; + } + virtual ~ios_base(); + public: + ios_base() throw (); + private: + ios_base(const ios_base&); + ios_base& + operator=(const ios_base&); + }; + inline ios_base& + boolalpha(ios_base& __base) + { + __base.setf(ios_base::boolalpha); + return __base; + } + inline ios_base& + noboolalpha(ios_base& __base) + { + __base.unsetf(ios_base::boolalpha); + return __base; + } + inline ios_base& + showbase(ios_base& __base) + { + __base.setf(ios_base::showbase); + return __base; + } + inline ios_base& + noshowbase(ios_base& __base) + { + __base.unsetf(ios_base::showbase); + return __base; + } + inline ios_base& + showpoint(ios_base& __base) + { + __base.setf(ios_base::showpoint); + return __base; + } + inline ios_base& + noshowpoint(ios_base& __base) + { + __base.unsetf(ios_base::showpoint); + return __base; + } + inline ios_base& + showpos(ios_base& __base) + { + __base.setf(ios_base::showpos); + return __base; + } + inline ios_base& + noshowpos(ios_base& __base) + { + __base.unsetf(ios_base::showpos); + return __base; + } + inline ios_base& + skipws(ios_base& __base) + { + __base.setf(ios_base::skipws); + return __base; + } + inline ios_base& + noskipws(ios_base& __base) + { + __base.unsetf(ios_base::skipws); + return __base; + } + inline ios_base& + uppercase(ios_base& __base) + { + __base.setf(ios_base::uppercase); + return __base; + } + inline ios_base& + nouppercase(ios_base& __base) + { + __base.unsetf(ios_base::uppercase); + return __base; + } + inline ios_base& + unitbuf(ios_base& __base) + { + __base.setf(ios_base::unitbuf); + return __base; + } + inline ios_base& + nounitbuf(ios_base& __base) + { + __base.unsetf(ios_base::unitbuf); + return __base; + } + inline ios_base& + internal(ios_base& __base) + { + __base.setf(ios_base::internal, ios_base::adjustfield); + return __base; + } + inline ios_base& + left(ios_base& __base) + { + __base.setf(ios_base::left, ios_base::adjustfield); + return __base; + } + inline ios_base& + right(ios_base& __base) + { + __base.setf(ios_base::right, ios_base::adjustfield); + return __base; + } + inline ios_base& + dec(ios_base& __base) + { + __base.setf(ios_base::dec, ios_base::basefield); + return __base; + } + inline ios_base& + hex(ios_base& __base) + { + __base.setf(ios_base::hex, ios_base::basefield); + return __base; + } + inline ios_base& + oct(ios_base& __base) + { + __base.setf(ios_base::oct, ios_base::basefield); + return __base; + } + inline ios_base& + fixed(ios_base& __base) + { + __base.setf(ios_base::fixed, ios_base::floatfield); + return __base; + } + inline ios_base& + scientific(ios_base& __base) + { + __base.setf(ios_base::scientific, ios_base::floatfield); + return __base; + } +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + streamsize + __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*, + basic_streambuf<_CharT, _Traits>*, bool&); + template + class basic_streambuf + { + public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + typedef basic_streambuf __streambuf_type; + friend class basic_ios; + friend class basic_istream; + friend class basic_ostream; + friend class istreambuf_iterator; + friend class ostreambuf_iterator; + friend streamsize + __copy_streambufs_eof<>(__streambuf_type*, __streambuf_type*, bool&); + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + _CharT2*>::__type + __copy_move_a2(istreambuf_iterator<_CharT2>, + istreambuf_iterator<_CharT2>, _CharT2*); + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + istreambuf_iterator<_CharT2> >::__type + find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + const _CharT2&); + template + friend basic_istream<_CharT2, _Traits2>& + operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*); + template + friend basic_istream<_CharT2, _Traits2>& + operator>>(basic_istream<_CharT2, _Traits2>&, + basic_string<_CharT2, _Traits2, _Alloc>&); + template + friend basic_istream<_CharT2, _Traits2>& + getline(basic_istream<_CharT2, _Traits2>&, + basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2); + public: + char_type* _M_in_beg; + char_type* _M_in_cur; + char_type* _M_in_end; + char_type* _M_out_beg; + char_type* _M_out_cur; + char_type* _M_out_end; + locale _M_buf_locale; + public: + virtual + ~basic_streambuf() + { } + locale + pubimbue(const locale &__loc) + { + locale __tmp(this->getloc()); + this->imbue(__loc); + _M_buf_locale = __loc; + return __tmp; + } + locale + getloc() const + { return _M_buf_locale; } + __streambuf_type* + pubsetbuf(char_type* __s, streamsize __n) + { return this->setbuf(__s, __n); } + pos_type + pubseekoff(off_type __off, ios_base::seekdir __way, + ios_base::openmode __mode = ios_base::in | ios_base::out) + { return this->seekoff(__off, __way, __mode); } + pos_type + pubseekpos(pos_type __sp, + ios_base::openmode __mode = ios_base::in | ios_base::out) + { return this->seekpos(__sp, __mode); } + int + pubsync() { return this->sync(); } + streamsize + in_avail() + { + const streamsize __ret = this->egptr() - this->gptr(); + return __ret ? __ret : this->showmanyc(); + } + int_type + snextc() + { + int_type __ret = traits_type::eof(); + if (__builtin_expect(!traits_type::eq_int_type(this->sbumpc(), + __ret), true)) + __ret = this->sgetc(); + return __ret; + } + int_type + sbumpc() + { + int_type __ret; + if (__builtin_expect(this->gptr() < this->egptr(), true)) + { + __ret = traits_type::to_int_type(*this->gptr()); + this->gbump(1); + } + else + __ret = this->uflow(); + return __ret; + } + int_type + sgetc() + { + int_type __ret; + if (__builtin_expect(this->gptr() < this->egptr(), true)) + __ret = traits_type::to_int_type(*this->gptr()); + else + __ret = this->underflow(); + return __ret; + } + streamsize + sgetn(char_type* __s, streamsize __n) + { return this->xsgetn(__s, __n); } + int_type + sputbackc(char_type __c) + { + int_type __ret; + const bool __testpos = this->eback() < this->gptr(); + if (__builtin_expect(!__testpos || + !traits_type::eq(__c, this->gptr()[-1]), false)) + __ret = this->pbackfail(traits_type::to_int_type(__c)); + else + { + this->gbump(-1); + __ret = traits_type::to_int_type(*this->gptr()); + } + return __ret; + } + int_type + sungetc() + { + int_type __ret; + if (__builtin_expect(this->eback() < this->gptr(), true)) + { + this->gbump(-1); + __ret = traits_type::to_int_type(*this->gptr()); + } + else + __ret = this->pbackfail(); + return __ret; + } + int_type + sputc(char_type __c) + { + int_type __ret; + if (__builtin_expect(this->pptr() < this->epptr(), true)) + { + *this->pptr() = __c; + this->pbump(1); + __ret = traits_type::to_int_type(__c); + } + else + __ret = this->overflow(traits_type::to_int_type(__c)); + return __ret; + } + streamsize + sputn(const char_type* __s, streamsize __n) + { return this->xsputn(__s, __n); } + public: + basic_streambuf() + : _M_in_beg(0), _M_in_cur(0), _M_in_end(0), + _M_out_beg(0), _M_out_cur(0), _M_out_end(0), + _M_buf_locale(locale()) + { } + char_type* + eback() const { return _M_in_beg; } + char_type* + gptr() const { return _M_in_cur; } + char_type* + egptr() const { return _M_in_end; } + void + gbump(int __n) { _M_in_cur += __n; } + void + setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) + { + _M_in_beg = __gbeg; + _M_in_cur = __gnext; + _M_in_end = __gend; + } + char_type* + pbase() const { return _M_out_beg; } + char_type* + pptr() const { return _M_out_cur; } + char_type* + epptr() const { return _M_out_end; } + void + pbump(int __n) { _M_out_cur += __n; } + void + setp(char_type* __pbeg, char_type* __pend) + { + _M_out_beg = _M_out_cur = __pbeg; + _M_out_end = __pend; + } + virtual void + imbue(const locale&) + { } + virtual basic_streambuf* + setbuf(char_type*, streamsize) + { return this; } + virtual pos_type + seekoff(off_type, ios_base::seekdir, + ios_base::openmode = ios_base::in | ios_base::out) + { return pos_type(off_type(-1)); } + virtual pos_type + seekpos(pos_type, + ios_base::openmode = ios_base::in | ios_base::out) + { return pos_type(off_type(-1)); } + virtual int + sync() { return 0; } + virtual streamsize + showmanyc() { return 0; } + virtual streamsize + xsgetn(char_type* __s, streamsize __n); + virtual int_type + underflow() + { return traits_type::eof(); } + virtual int_type + uflow() + { + int_type __ret = traits_type::eof(); + const bool __testeof = traits_type::eq_int_type(this->underflow(), + __ret); + if (!__testeof) + { + __ret = traits_type::to_int_type(*this->gptr()); + this->gbump(1); + } + return __ret; + } + virtual int_type + pbackfail(int_type = traits_type::eof()) + { return traits_type::eof(); } + virtual streamsize + xsputn(const char_type* __s, streamsize __n); + virtual int_type + overflow(int_type = traits_type::eof()) + { return traits_type::eof(); } + public: + void + stossc() + { + if (this->gptr() < this->egptr()) + this->gbump(1); + else + this->uflow(); + } + private: + basic_streambuf(const __streambuf_type& __sb) + : _M_in_beg(__sb._M_in_beg), _M_in_cur(__sb._M_in_cur), + _M_in_end(__sb._M_in_end), _M_out_beg(__sb._M_out_beg), + _M_out_cur(__sb._M_out_cur), _M_out_end(__sb._M_out_cur), + _M_buf_locale(__sb._M_buf_locale) + { } + __streambuf_type& + operator=(const __streambuf_type&) { return *this; }; + }; + template<> + streamsize + __copy_streambufs_eof(basic_streambuf* __sbin, + basic_streambuf* __sbout, bool& __ineof); + template<> + streamsize + __copy_streambufs_eof(basic_streambuf* __sbin, + basic_streambuf* __sbout, bool& __ineof); +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + streamsize + basic_streambuf<_CharT, _Traits>:: + xsgetn(char_type* __s, streamsize __n) + { + streamsize __ret = 0; + while (__ret < __n) + { + const streamsize __buf_len = this->egptr() - this->gptr(); + if (__buf_len) + { + const streamsize __remaining = __n - __ret; + const streamsize __len = std::min(__buf_len, __remaining); + traits_type::copy(__s, this->gptr(), __len); + __ret += __len; + __s += __len; + this->gbump(__len); + } + if (__ret < __n) + { + const int_type __c = this->uflow(); + if (!traits_type::eq_int_type(__c, traits_type::eof())) + { + traits_type::assign(*__s++, traits_type::to_char_type(__c)); + ++__ret; + } + else + break; + } + } + return __ret; + } + template + streamsize + basic_streambuf<_CharT, _Traits>:: + xsputn(const char_type* __s, streamsize __n) + { + streamsize __ret = 0; + while (__ret < __n) + { + const streamsize __buf_len = this->epptr() - this->pptr(); + if (__buf_len) + { + const streamsize __remaining = __n - __ret; + const streamsize __len = std::min(__buf_len, __remaining); + traits_type::copy(this->pptr(), __s, __len); + __ret += __len; + __s += __len; + this->pbump(__len); + } + if (__ret < __n) + { + int_type __c = this->overflow(traits_type::to_int_type(*__s)); + if (!traits_type::eq_int_type(__c, traits_type::eof())) + { + ++__ret; + ++__s; + } + else + break; + } + } + return __ret; + } + template + streamsize + __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>* __sbin, + basic_streambuf<_CharT, _Traits>* __sbout, + bool& __ineof) + { + streamsize __ret = 0; + __ineof = true; + typename _Traits::int_type __c = __sbin->sgetc(); + while (!_Traits::eq_int_type(__c, _Traits::eof())) + { + __c = __sbout->sputc(_Traits::to_char_type(__c)); + if (_Traits::eq_int_type(__c, _Traits::eof())) + { + __ineof = false; + break; + } + ++__ret; + __c = __sbin->snextc(); + } + return __ret; + } + template + inline streamsize + __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, + basic_streambuf<_CharT, _Traits>* __sbout) + { + bool __ineof; + return __copy_streambufs_eof(__sbin, __sbout, __ineof); + } + extern template class basic_streambuf; + extern template + streamsize + __copy_streambufs(basic_streambuf*, + basic_streambuf*); + extern template + streamsize + __copy_streambufs_eof(basic_streambuf*, + basic_streambuf*, bool&); + extern template class basic_streambuf; + extern template + streamsize + __copy_streambufs(basic_streambuf*, + basic_streambuf*); + extern template + streamsize + __copy_streambufs_eof(basic_streambuf*, + basic_streambuf*, bool&); +} + + + +typedef unsigned long int wctype_t; +enum +{ + __ISwupper = 0, + __ISwlower = 1, + __ISwalpha = 2, + __ISwdigit = 3, + __ISwxdigit = 4, + __ISwspace = 5, + __ISwprint = 6, + __ISwgraph = 7, + __ISwblank = 8, + __ISwcntrl = 9, + __ISwpunct = 10, + __ISwalnum = 11, + _ISwupper = ((__ISwupper) < 8 ? (int) ((1UL << (__ISwupper)) << 24) : ((__ISwupper) < 16 ? (int) ((1UL << (__ISwupper)) << 8) : ((__ISwupper) < 24 ? (int) ((1UL << (__ISwupper)) >> 8) : (int) ((1UL << (__ISwupper)) >> 24)))), + _ISwlower = ((__ISwlower) < 8 ? (int) ((1UL << (__ISwlower)) << 24) : ((__ISwlower) < 16 ? (int) ((1UL << (__ISwlower)) << 8) : ((__ISwlower) < 24 ? (int) ((1UL << (__ISwlower)) >> 8) : (int) ((1UL << (__ISwlower)) >> 24)))), + _ISwalpha = ((__ISwalpha) < 8 ? (int) ((1UL << (__ISwalpha)) << 24) : ((__ISwalpha) < 16 ? (int) ((1UL << (__ISwalpha)) << 8) : ((__ISwalpha) < 24 ? (int) ((1UL << (__ISwalpha)) >> 8) : (int) ((1UL << (__ISwalpha)) >> 24)))), + _ISwdigit = ((__ISwdigit) < 8 ? (int) ((1UL << (__ISwdigit)) << 24) : ((__ISwdigit) < 16 ? (int) ((1UL << (__ISwdigit)) << 8) : ((__ISwdigit) < 24 ? (int) ((1UL << (__ISwdigit)) >> 8) : (int) ((1UL << (__ISwdigit)) >> 24)))), + _ISwxdigit = ((__ISwxdigit) < 8 ? (int) ((1UL << (__ISwxdigit)) << 24) : ((__ISwxdigit) < 16 ? (int) ((1UL << (__ISwxdigit)) << 8) : ((__ISwxdigit) < 24 ? (int) ((1UL << (__ISwxdigit)) >> 8) : (int) ((1UL << (__ISwxdigit)) >> 24)))), + _ISwspace = ((__ISwspace) < 8 ? (int) ((1UL << (__ISwspace)) << 24) : ((__ISwspace) < 16 ? (int) ((1UL << (__ISwspace)) << 8) : ((__ISwspace) < 24 ? (int) ((1UL << (__ISwspace)) >> 8) : (int) ((1UL << (__ISwspace)) >> 24)))), + _ISwprint = ((__ISwprint) < 8 ? (int) ((1UL << (__ISwprint)) << 24) : ((__ISwprint) < 16 ? (int) ((1UL << (__ISwprint)) << 8) : ((__ISwprint) < 24 ? (int) ((1UL << (__ISwprint)) >> 8) : (int) ((1UL << (__ISwprint)) >> 24)))), + _ISwgraph = ((__ISwgraph) < 8 ? (int) ((1UL << (__ISwgraph)) << 24) : ((__ISwgraph) < 16 ? (int) ((1UL << (__ISwgraph)) << 8) : ((__ISwgraph) < 24 ? (int) ((1UL << (__ISwgraph)) >> 8) : (int) ((1UL << (__ISwgraph)) >> 24)))), + _ISwblank = ((__ISwblank) < 8 ? (int) ((1UL << (__ISwblank)) << 24) : ((__ISwblank) < 16 ? (int) ((1UL << (__ISwblank)) << 8) : ((__ISwblank) < 24 ? (int) ((1UL << (__ISwblank)) >> 8) : (int) ((1UL << (__ISwblank)) >> 24)))), + _ISwcntrl = ((__ISwcntrl) < 8 ? (int) ((1UL << (__ISwcntrl)) << 24) : ((__ISwcntrl) < 16 ? (int) ((1UL << (__ISwcntrl)) << 8) : ((__ISwcntrl) < 24 ? (int) ((1UL << (__ISwcntrl)) >> 8) : (int) ((1UL << (__ISwcntrl)) >> 24)))), + _ISwpunct = ((__ISwpunct) < 8 ? (int) ((1UL << (__ISwpunct)) << 24) : ((__ISwpunct) < 16 ? (int) ((1UL << (__ISwpunct)) << 8) : ((__ISwpunct) < 24 ? (int) ((1UL << (__ISwpunct)) >> 8) : (int) ((1UL << (__ISwpunct)) >> 24)))), + _ISwalnum = ((__ISwalnum) < 8 ? (int) ((1UL << (__ISwalnum)) << 24) : ((__ISwalnum) < 16 ? (int) ((1UL << (__ISwalnum)) << 8) : ((__ISwalnum) < 24 ? (int) ((1UL << (__ISwalnum)) >> 8) : (int) ((1UL << (__ISwalnum)) >> 24)))) +}; +extern "C" { +extern int iswalnum (wint_t __wc) throw (); +extern int iswalpha (wint_t __wc) throw (); +extern int iswcntrl (wint_t __wc) throw (); +extern int iswdigit (wint_t __wc) throw (); +extern int iswgraph (wint_t __wc) throw (); +extern int iswlower (wint_t __wc) throw (); +extern int iswprint (wint_t __wc) throw (); +extern int iswpunct (wint_t __wc) throw (); +extern int iswspace (wint_t __wc) throw (); +extern int iswupper (wint_t __wc) throw (); +extern int iswxdigit (wint_t __wc) throw (); +extern int iswblank (wint_t __wc) throw (); +extern wctype_t wctype (__const char *__property) throw (); +extern int iswctype (wint_t __wc, wctype_t __desc) throw (); +typedef __const __int32_t *wctrans_t; +extern wint_t towlower (wint_t __wc) throw (); +extern wint_t towupper (wint_t __wc) throw (); +} +extern "C" { +extern wctrans_t wctrans (__const char *__property) throw (); +extern wint_t towctrans (wint_t __wc, wctrans_t __desc) throw (); +extern int iswalnum_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswalpha_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswcntrl_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswdigit_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswgraph_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswlower_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswprint_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswpunct_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswspace_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswupper_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswxdigit_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswblank_l (wint_t __wc, __locale_t __locale) throw (); +extern wctype_t wctype_l (__const char *__property, __locale_t __locale) + throw (); +extern int iswctype_l (wint_t __wc, wctype_t __desc, __locale_t __locale) + throw (); +extern wint_t towlower_l (wint_t __wc, __locale_t __locale) throw (); +extern wint_t towupper_l (wint_t __wc, __locale_t __locale) throw (); +extern wctrans_t wctrans_l (__const char *__property, __locale_t __locale) + throw (); +extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc, + __locale_t __locale) throw (); +} +namespace std __attribute__ ((__visibility__ ("default"))) { + using ::wctrans_t; + using ::wctype_t; + using ::wint_t; + using ::iswalnum; + using ::iswalpha; + using ::iswblank; + using ::iswcntrl; + using ::iswctype; + using ::iswdigit; + using ::iswgraph; + using ::iswlower; + using ::iswprint; + using ::iswpunct; + using ::iswspace; + using ::iswupper; + using ::iswxdigit; + using ::towctrans; + using ::towlower; + using ::towupper; + using ::wctrans; + using ::wctype; +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + struct ctype_base + { + typedef const int* __to_type; + typedef unsigned short mask; + static const mask upper = _ISupper; + static const mask lower = _ISlower; + static const mask alpha = _ISalpha; + static const mask digit = _ISdigit; + static const mask xdigit = _ISxdigit; + static const mask space = _ISspace; + static const mask print = _ISprint; + static const mask graph = _ISalpha | _ISdigit | _ISpunct; + static const mask cntrl = _IScntrl; + static const mask punct = _ISpunct; + static const mask alnum = _ISalpha | _ISdigit; + }; +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + class istreambuf_iterator + : public iterator + { + public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename _Traits::int_type int_type; + typedef basic_streambuf<_CharT, _Traits> streambuf_type; + typedef basic_istream<_CharT, _Traits> istream_type; + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + ostreambuf_iterator<_CharT2> >::__type + copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + ostreambuf_iterator<_CharT2>); + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + _CharT2*>::__type + __copy_move_a2(istreambuf_iterator<_CharT2>, + istreambuf_iterator<_CharT2>, _CharT2*); + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + istreambuf_iterator<_CharT2> >::__type + find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + const _CharT2&); + private: + mutable streambuf_type* _M_sbuf; + mutable int_type _M_c; + public: + istreambuf_iterator() throw() + : _M_sbuf(0), _M_c(traits_type::eof()) { } + istreambuf_iterator(istream_type& __s) throw() + : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { } + istreambuf_iterator(streambuf_type* __s) throw() + : _M_sbuf(__s), _M_c(traits_type::eof()) { } + char_type + operator*() const + { + return traits_type::to_char_type(_M_get()); + } + istreambuf_iterator& + operator++() + { + ; + if (_M_sbuf) + { + _M_sbuf->sbumpc(); + _M_c = traits_type::eof(); + } + return *this; + } + istreambuf_iterator + operator++(int) + { + ; + istreambuf_iterator __old = *this; + if (_M_sbuf) + { + __old._M_c = _M_sbuf->sbumpc(); + _M_c = traits_type::eof(); + } + return __old; + } + bool + equal(const istreambuf_iterator& __b) const + { return _M_at_eof() == __b._M_at_eof(); } + private: + int_type + _M_get() const + { + const int_type __eof = traits_type::eof(); + int_type __ret = __eof; + if (_M_sbuf) + { + if (!traits_type::eq_int_type(_M_c, __eof)) + __ret = _M_c; + else if (!traits_type::eq_int_type((__ret = _M_sbuf->sgetc()), + __eof)) + _M_c = __ret; + else + _M_sbuf = 0; + } + return __ret; + } + bool + _M_at_eof() const + { + const int_type __eof = traits_type::eof(); + return traits_type::eq_int_type(_M_get(), __eof); + } + }; + template + inline bool + operator==(const istreambuf_iterator<_CharT, _Traits>& __a, + const istreambuf_iterator<_CharT, _Traits>& __b) + { return __a.equal(__b); } + template + inline bool + operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, + const istreambuf_iterator<_CharT, _Traits>& __b) + { return !__a.equal(__b); } + template + class ostreambuf_iterator + : public iterator + { + public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_streambuf<_CharT, _Traits> streambuf_type; + typedef basic_ostream<_CharT, _Traits> ostream_type; + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + ostreambuf_iterator<_CharT2> >::__type + copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + ostreambuf_iterator<_CharT2>); + private: + streambuf_type* _M_sbuf; + bool _M_failed; + public: + ostreambuf_iterator(ostream_type& __s) throw () + : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { } + ostreambuf_iterator(streambuf_type* __s) throw () + : _M_sbuf(__s), _M_failed(!_M_sbuf) { } + ostreambuf_iterator& + operator=(_CharT __c) + { + if (!_M_failed && + _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof())) + _M_failed = true; + return *this; + } + ostreambuf_iterator& + operator*() + { return *this; } + ostreambuf_iterator& + operator++(int) + { return *this; } + ostreambuf_iterator& + operator++() + { return *this; } + bool + failed() const throw() + { return _M_failed; } + ostreambuf_iterator& + _M_put(const _CharT* __ws, streamsize __len) + { + if (__builtin_expect(!_M_failed, true) + && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len, + false)) + _M_failed = true; + return *this; + } + }; + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT> >::__type + copy(istreambuf_iterator<_CharT> __first, + istreambuf_iterator<_CharT> __last, + ostreambuf_iterator<_CharT> __result) + { + if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed) + { + bool __ineof; + __copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof); + if (!__ineof) + __result._M_failed = true; + } + return __result; + } + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT> >::__type + __copy_move_a2(_CharT* __first, _CharT* __last, + ostreambuf_iterator<_CharT> __result) + { + const streamsize __num = __last - __first; + if (__num > 0) + __result._M_put(__first, __num); + return __result; + } + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT> >::__type + __copy_move_a2(const _CharT* __first, const _CharT* __last, + ostreambuf_iterator<_CharT> __result) + { + const streamsize __num = __last - __first; + if (__num > 0) + __result._M_put(__first, __num); + return __result; + } + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + _CharT*>::__type + __copy_move_a2(istreambuf_iterator<_CharT> __first, + istreambuf_iterator<_CharT> __last, _CharT* __result) + { + typedef istreambuf_iterator<_CharT> __is_iterator_type; + typedef typename __is_iterator_type::traits_type traits_type; + typedef typename __is_iterator_type::streambuf_type streambuf_type; + typedef typename traits_type::int_type int_type; + if (__first._M_sbuf && !__last._M_sbuf) + { + streambuf_type* __sb = __first._M_sbuf; + int_type __c = __sb->sgetc(); + while (!traits_type::eq_int_type(__c, traits_type::eof())) + { + const streamsize __n = __sb->egptr() - __sb->gptr(); + if (__n > 1) + { + traits_type::copy(__result, __sb->gptr(), __n); + __sb->gbump(__n); + __result += __n; + __c = __sb->underflow(); + } + else + { + *__result++ = traits_type::to_char_type(__c); + __c = __sb->snextc(); + } + } + } + return __result; + } + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + istreambuf_iterator<_CharT> >::__type + find(istreambuf_iterator<_CharT> __first, + istreambuf_iterator<_CharT> __last, const _CharT& __val) + { + typedef istreambuf_iterator<_CharT> __is_iterator_type; + typedef typename __is_iterator_type::traits_type traits_type; + typedef typename __is_iterator_type::streambuf_type streambuf_type; + typedef typename traits_type::int_type int_type; + if (__first._M_sbuf && !__last._M_sbuf) + { + const int_type __ival = traits_type::to_int_type(__val); + streambuf_type* __sb = __first._M_sbuf; + int_type __c = __sb->sgetc(); + while (!traits_type::eq_int_type(__c, traits_type::eof()) + && !traits_type::eq_int_type(__c, __ival)) + { + streamsize __n = __sb->egptr() - __sb->gptr(); + if (__n > 1) + { + const _CharT* __p = traits_type::find(__sb->gptr(), + __n, __val); + if (__p) + __n = __p - __sb->gptr(); + __sb->gbump(__n); + __c = __sb->sgetc(); + } + else + __c = __sb->snextc(); + } + if (!traits_type::eq_int_type(__c, traits_type::eof())) + __first._M_c = __c; + else + __first._M_sbuf = 0; + } + return __first; + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + void + __convert_to_v(const char*, _Tp&, ios_base::iostate&, + const __c_locale&) throw(); + template<> + void + __convert_to_v(const char*, float&, ios_base::iostate&, + const __c_locale&) throw(); + template<> + void + __convert_to_v(const char*, double&, ios_base::iostate&, + const __c_locale&) throw(); + template<> + void + __convert_to_v(const char*, long double&, ios_base::iostate&, + const __c_locale&) throw(); + template + struct __pad + { + static void + _S_pad(ios_base& __io, _CharT __fill, _CharT* __news, + const _CharT* __olds, streamsize __newlen, streamsize __oldlen); + }; + template + _CharT* + __add_grouping(_CharT* __s, _CharT __sep, + const char* __gbeg, size_t __gsize, + const _CharT* __first, const _CharT* __last); + template + inline + ostreambuf_iterator<_CharT> + __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len) + { + __s._M_put(__ws, __len); + return __s; + } + template + inline + _OutIter + __write(_OutIter __s, const _CharT* __ws, int __len) + { + for (int __j = 0; __j < __len; __j++, ++__s) + *__s = __ws[__j]; + return __s; + } + template + class __ctype_abstract_base : public locale::facet, public ctype_base + { + public: + typedef _CharT char_type; + bool + is(mask __m, char_type __c) const + { return this->do_is(__m, __c); } + const char_type* + is(const char_type *__lo, const char_type *__hi, mask *__vec) const + { return this->do_is(__lo, __hi, __vec); } + const char_type* + scan_is(mask __m, const char_type* __lo, const char_type* __hi) const + { return this->do_scan_is(__m, __lo, __hi); } + const char_type* + scan_not(mask __m, const char_type* __lo, const char_type* __hi) const + { return this->do_scan_not(__m, __lo, __hi); } + char_type + toupper(char_type __c) const + { return this->do_toupper(__c); } + const char_type* + toupper(char_type *__lo, const char_type* __hi) const + { return this->do_toupper(__lo, __hi); } + char_type + tolower(char_type __c) const + { return this->do_tolower(__c); } + const char_type* + tolower(char_type* __lo, const char_type* __hi) const + { return this->do_tolower(__lo, __hi); } + char_type + widen(char __c) const + { return this->do_widen(__c); } + const char* + widen(const char* __lo, const char* __hi, char_type* __to) const + { return this->do_widen(__lo, __hi, __to); } + char + narrow(char_type __c, char __dfault) const + { return this->do_narrow(__c, __dfault); } + const char_type* + narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char *__to) const + { return this->do_narrow(__lo, __hi, __dfault, __to); } + public: + explicit + __ctype_abstract_base(size_t __refs = 0): facet(__refs) { } + virtual + ~__ctype_abstract_base() { } + virtual bool + do_is(mask __m, char_type __c) const = 0; + virtual const char_type* + do_is(const char_type* __lo, const char_type* __hi, + mask* __vec) const = 0; + virtual const char_type* + do_scan_is(mask __m, const char_type* __lo, + const char_type* __hi) const = 0; + virtual const char_type* + do_scan_not(mask __m, const char_type* __lo, + const char_type* __hi) const = 0; + virtual char_type + do_toupper(char_type) const = 0; + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const = 0; + virtual char_type + do_tolower(char_type) const = 0; + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const = 0; + virtual char_type + do_widen(char) const = 0; + virtual const char* + do_widen(const char* __lo, const char* __hi, + char_type* __dest) const = 0; + virtual char + do_narrow(char_type, char __dfault) const = 0; + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char* __dest) const = 0; + }; + template + class ctype : public __ctype_abstract_base<_CharT> + { + public: + typedef _CharT char_type; + typedef typename __ctype_abstract_base<_CharT>::mask mask; + static locale::id id; + explicit + ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { } + public: + virtual + ~ctype(); + virtual bool + do_is(mask __m, char_type __c) const; + virtual const char_type* + do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; + virtual const char_type* + do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; + virtual const char_type* + do_scan_not(mask __m, const char_type* __lo, + const char_type* __hi) const; + virtual char_type + do_toupper(char_type __c) const; + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const; + virtual char_type + do_tolower(char_type __c) const; + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const; + virtual char_type + do_widen(char __c) const; + virtual const char* + do_widen(const char* __lo, const char* __hi, char_type* __dest) const; + virtual char + do_narrow(char_type, char __dfault) const; + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char* __dest) const; + }; + template + locale::id ctype<_CharT>::id; + template<> + class ctype : public locale::facet, public ctype_base + { + public: + typedef char char_type; + public: + __c_locale _M_c_locale_ctype; + bool _M_del; + __to_type _M_toupper; + __to_type _M_tolower; + const mask* _M_table; + mutable char _M_widen_ok; + mutable char _M_widen[1 + static_cast(-1)]; + mutable char _M_narrow[1 + static_cast(-1)]; + mutable char _M_narrow_ok; + public: + static locale::id id; + static const size_t table_size = 1 + static_cast(-1); + explicit + ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0); + explicit + ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false, + size_t __refs = 0); + inline bool + is(mask __m, char __c) const; + inline const char* + is(const char* __lo, const char* __hi, mask* __vec) const; + inline const char* + scan_is(mask __m, const char* __lo, const char* __hi) const; + inline const char* + scan_not(mask __m, const char* __lo, const char* __hi) const; + char_type + toupper(char_type __c) const + { return this->do_toupper(__c); } + const char_type* + toupper(char_type *__lo, const char_type* __hi) const + { return this->do_toupper(__lo, __hi); } + char_type + tolower(char_type __c) const + { return this->do_tolower(__c); } + const char_type* + tolower(char_type* __lo, const char_type* __hi) const + { return this->do_tolower(__lo, __hi); } + char_type + widen(char __c) const + { + if (_M_widen_ok) + return _M_widen[static_cast(__c)]; + this->_M_widen_init(); + return this->do_widen(__c); + } + const char* + widen(const char* __lo, const char* __hi, char_type* __to) const + { + if (_M_widen_ok == 1) + { + __builtin_memcpy(__to, __lo, __hi - __lo); + return __hi; + } + if (!_M_widen_ok) + _M_widen_init(); + return this->do_widen(__lo, __hi, __to); + } + char + narrow(char_type __c, char __dfault) const + { + if (_M_narrow[static_cast(__c)]) + return _M_narrow[static_cast(__c)]; + const char __t = do_narrow(__c, __dfault); + if (__t != __dfault) + _M_narrow[static_cast(__c)] = __t; + return __t; + } + const char_type* + narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char *__to) const + { + if (__builtin_expect(_M_narrow_ok == 1, true)) + { + __builtin_memcpy(__to, __lo, __hi - __lo); + return __hi; + } + if (!_M_narrow_ok) + _M_narrow_init(); + return this->do_narrow(__lo, __hi, __dfault, __to); + } + const mask* + table() const throw() + { return _M_table; } + static const mask* + classic_table() throw(); + public: + virtual + ~ctype(); + virtual char_type + do_toupper(char_type) const; + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const; + virtual char_type + do_tolower(char_type) const; + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const; + virtual char_type + do_widen(char __c) const + { return __c; } + virtual const char* + do_widen(const char* __lo, const char* __hi, char_type* __dest) const + { + __builtin_memcpy(__dest, __lo, __hi - __lo); + return __hi; + } + virtual char + do_narrow(char_type __c, char) const + { return __c; } + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char, char* __dest) const + { + __builtin_memcpy(__dest, __lo, __hi - __lo); + return __hi; + } + private: + void _M_narrow_init() const; + void _M_widen_init() const; + }; + template<> + class ctype : public __ctype_abstract_base + { + public: + typedef wchar_t char_type; + typedef wctype_t __wmask_type; + public: + __c_locale _M_c_locale_ctype; + bool _M_narrow_ok; + char _M_narrow[128]; + wint_t _M_widen[1 + static_cast(-1)]; + mask _M_bit[16]; + __wmask_type _M_wmask[16]; + public: + static locale::id id; + explicit + ctype(size_t __refs = 0); + explicit + ctype(__c_locale __cloc, size_t __refs = 0); + public: + __wmask_type + _M_convert_to_wmask(const mask __m) const throw(); + virtual + ~ctype(); + virtual bool + do_is(mask __m, char_type __c) const; + virtual const char_type* + do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; + virtual const char_type* + do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; + virtual const char_type* + do_scan_not(mask __m, const char_type* __lo, + const char_type* __hi) const; + virtual char_type + do_toupper(char_type) const; + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const; + virtual char_type + do_tolower(char_type) const; + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const; + virtual char_type + do_widen(char) const; + virtual const char* + do_widen(const char* __lo, const char* __hi, char_type* __dest) const; + virtual char + do_narrow(char_type, char __dfault) const; + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char* __dest) const; + void + _M_initialize_ctype() throw(); + }; + template + class ctype_byname : public ctype<_CharT> + { + public: + typedef typename ctype<_CharT>::mask mask; + explicit + ctype_byname(const char* __s, size_t __refs = 0); + public: + virtual + ~ctype_byname() { }; + }; + template<> + class ctype_byname : public ctype + { + public: + explicit + ctype_byname(const char* __s, size_t __refs = 0); + public: + virtual + ~ctype_byname(); + }; + template<> + class ctype_byname : public ctype + { + public: + explicit + ctype_byname(const char* __s, size_t __refs = 0); + public: + virtual + ~ctype_byname(); + }; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + bool + ctype:: + is(mask __m, char __c) const + { return _M_table[static_cast(__c)] & __m; } + const char* + ctype:: + is(const char* __low, const char* __high, mask* __vec) const + { + while (__low < __high) + *__vec++ = _M_table[static_cast(*__low++)]; + return __high; + } + const char* + ctype:: + scan_is(mask __m, const char* __low, const char* __high) const + { + while (__low < __high + && !(_M_table[static_cast(*__low)] & __m)) + ++__low; + return __low; + } + const char* + ctype:: + scan_not(mask __m, const char* __low, const char* __high) const + { + while (__low < __high + && (_M_table[static_cast(*__low)] & __m) != 0) + ++__low; + return __low; + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + class __num_base + { + public: + enum + { + _S_ominus, + _S_oplus, + _S_ox, + _S_oX, + _S_odigits, + _S_odigits_end = _S_odigits + 16, + _S_oudigits = _S_odigits_end, + _S_oudigits_end = _S_oudigits + 16, + _S_oe = _S_odigits + 14, + _S_oE = _S_oudigits + 14, + _S_oend = _S_oudigits_end + }; + static const char* _S_atoms_out; + static const char* _S_atoms_in; + enum + { + _S_iminus, + _S_iplus, + _S_ix, + _S_iX, + _S_izero, + _S_ie = _S_izero + 14, + _S_iE = _S_izero + 20, + _S_iend = 26 + }; + static void + _S_format_float(const ios_base& __io, char* __fptr, char __mod) throw(); + }; + template + struct __numpunct_cache : public locale::facet + { + const char* _M_grouping; + size_t _M_grouping_size; + bool _M_use_grouping; + const _CharT* _M_truename; + size_t _M_truename_size; + const _CharT* _M_falsename; + size_t _M_falsename_size; + _CharT _M_decimal_point; + _CharT _M_thousands_sep; + _CharT _M_atoms_out[__num_base::_S_oend]; + _CharT _M_atoms_in[__num_base::_S_iend]; + bool _M_allocated; + __numpunct_cache(size_t __refs = 0) : facet(__refs), + _M_grouping(__null), _M_grouping_size(0), _M_use_grouping(false), + _M_truename(__null), _M_truename_size(0), _M_falsename(__null), + _M_falsename_size(0), _M_decimal_point(_CharT()), + _M_thousands_sep(_CharT()), _M_allocated(false) + { } + ~__numpunct_cache(); + void + _M_cache(const locale& __loc); + private: + __numpunct_cache& + operator=(const __numpunct_cache&); + explicit + __numpunct_cache(const __numpunct_cache&); + }; + template + __numpunct_cache<_CharT>::~__numpunct_cache() + { + if (_M_allocated) + { + delete [] _M_grouping; + delete [] _M_truename; + delete [] _M_falsename; + } + } + template + class numpunct : public locale::facet + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + typedef __numpunct_cache<_CharT> __cache_type; + public: + __cache_type* _M_data; + public: + static locale::id id; + explicit + numpunct(size_t __refs = 0) : facet(__refs), _M_data(__null) + { _M_initialize_numpunct(); } + explicit + numpunct(__cache_type* __cache, size_t __refs = 0) + : facet(__refs), _M_data(__cache) + { _M_initialize_numpunct(); } + explicit + numpunct(__c_locale __cloc, size_t __refs = 0) + : facet(__refs), _M_data(__null) + { _M_initialize_numpunct(__cloc); } + char_type + decimal_point() const + { return this->do_decimal_point(); } + char_type + thousands_sep() const + { return this->do_thousands_sep(); } + string + grouping() const + { return this->do_grouping(); } + string_type + truename() const + { return this->do_truename(); } + string_type + falsename() const + { return this->do_falsename(); } + public: + virtual + ~numpunct(); + virtual char_type + do_decimal_point() const + { return _M_data->_M_decimal_point; } + virtual char_type + do_thousands_sep() const + { return _M_data->_M_thousands_sep; } + virtual string + do_grouping() const + { return _M_data->_M_grouping; } + virtual string_type + do_truename() const + { return _M_data->_M_truename; } + virtual string_type + do_falsename() const + { return _M_data->_M_falsename; } + void + _M_initialize_numpunct(__c_locale __cloc = __null); + }; + template + locale::id numpunct<_CharT>::id; + template<> + numpunct::~numpunct(); + template<> + void + numpunct::_M_initialize_numpunct(__c_locale __cloc); + template<> + numpunct::~numpunct(); + template<> + void + numpunct::_M_initialize_numpunct(__c_locale __cloc); + template + class numpunct_byname : public numpunct<_CharT> + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + explicit + numpunct_byname(const char* __s, size_t __refs = 0) + : numpunct<_CharT>(__refs) + { + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + __c_locale __tmp; + this->_S_create_c_locale(__tmp, __s); + this->_M_initialize_numpunct(__tmp); + this->_S_destroy_c_locale(__tmp); + } + } + public: + virtual + ~numpunct_byname() { } + }; + template + class num_get : public locale::facet + { + public: + typedef _CharT char_type; + typedef _InIter iter_type; + static locale::id id; + explicit + num_get(size_t __refs = 0) : facet(__refs) { } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, bool& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned short& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned int& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long long& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long long& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, float& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, double& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long double& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, void*& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + public: + virtual ~num_get() { } + iter_type + _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&, + string&) const; + template + iter_type + _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&, + _ValueT&) const; + template + typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, int>::__type + _M_find(const _CharT2*, size_t __len, _CharT2 __c) const + { + int __ret = -1; + if (__len <= 10) + { + if (__c >= _CharT2('0') && __c < _CharT2(_CharT2('0') + __len)) + __ret = __c - _CharT2('0'); + } + else + { + if (__c >= _CharT2('0') && __c <= _CharT2('9')) + __ret = __c - _CharT2('0'); + else if (__c >= _CharT2('a') && __c <= _CharT2('f')) + __ret = 10 + (__c - _CharT2('a')); + else if (__c >= _CharT2('A') && __c <= _CharT2('F')) + __ret = 10 + (__c - _CharT2('A')); + } + return __ret; + } + template + typename __gnu_cxx::__enable_if::__value, + int>::__type + _M_find(const _CharT2* __zero, size_t __len, _CharT2 __c) const + { + int __ret = -1; + const char_type* __q = char_traits<_CharT2>::find(__zero, __len, __c); + if (__q) + { + __ret = __q - __zero; + if (__ret > 15) + __ret -= 6; + } + return __ret; + } + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const; + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned short& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned int& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long long& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long long& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + float&) const; + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + double&) const; + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + long double&) const; + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + void*&) const; + }; + template + locale::id num_get<_CharT, _InIter>::id; + template + class num_put : public locale::facet + { + public: + typedef _CharT char_type; + typedef _OutIter iter_type; + static locale::id id; + explicit + num_put(size_t __refs = 0) : facet(__refs) { } + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, bool __v) const + { return this->do_put(__s, __f, __fill, __v); } + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, long __v) const + { return this->do_put(__s, __f, __fill, __v); } + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + unsigned long __v) const + { return this->do_put(__s, __f, __fill, __v); } + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, long long __v) const + { return this->do_put(__s, __f, __fill, __v); } + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + unsigned long long __v) const + { return this->do_put(__s, __f, __fill, __v); } + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, double __v) const + { return this->do_put(__s, __f, __fill, __v); } + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + long double __v) const + { return this->do_put(__s, __f, __fill, __v); } + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + const void* __v) const + { return this->do_put(__s, __f, __fill, __v); } + public: + template + iter_type + _M_insert_float(iter_type, ios_base& __io, char_type __fill, + char __mod, _ValueT __v) const; + void + _M_group_float(const char* __grouping, size_t __grouping_size, + char_type __sep, const char_type* __p, char_type* __new, + char_type* __cs, int& __len) const; + template + iter_type + _M_insert_int(iter_type, ios_base& __io, char_type __fill, + _ValueT __v) const; + void + _M_group_int(const char* __grouping, size_t __grouping_size, + char_type __sep, ios_base& __io, char_type* __new, + char_type* __cs, int& __len) const; + void + _M_pad(char_type __fill, streamsize __w, ios_base& __io, + char_type* __new, const char_type* __cs, int& __len) const; + virtual + ~num_put() { }; + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, bool __v) const; + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const + { return _M_insert_int(__s, __io, __fill, __v); } + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, + unsigned long __v) const + { return _M_insert_int(__s, __io, __fill, __v); } + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, + long long __v) const + { return _M_insert_int(__s, __io, __fill, __v); } + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, + unsigned long long __v) const + { return _M_insert_int(__s, __io, __fill, __v); } + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, double __v) const; + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, long double __v) const; + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, const void* __v) const; + }; + template + locale::id num_put<_CharT, _OutIter>::id; + template + inline bool + isspace(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::space, __c); } + template + inline bool + isprint(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::print, __c); } + template + inline bool + iscntrl(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::cntrl, __c); } + template + inline bool + isupper(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::upper, __c); } + template + inline bool + islower(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::lower, __c); } + template + inline bool + isalpha(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::alpha, __c); } + template + inline bool + isdigit(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::digit, __c); } + template + inline bool + ispunct(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::punct, __c); } + template + inline bool + isxdigit(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::xdigit, __c); } + template + inline bool + isalnum(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::alnum, __c); } + template + inline bool + isgraph(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::graph, __c); } + template + inline _CharT + toupper(_CharT __c, const locale& __loc) + { return use_facet >(__loc).toupper(__c); } + template + inline _CharT + tolower(_CharT __c, const locale& __loc) + { return use_facet >(__loc).tolower(__c); } +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + struct __use_cache + { + const _Facet* + operator() (const locale& __loc) const; + }; + template + struct __use_cache<__numpunct_cache<_CharT> > + { + const __numpunct_cache<_CharT>* + operator() (const locale& __loc) const + { + const size_t __i = numpunct<_CharT>::id._M_id(); + const locale::facet** __caches = __loc._M_impl->_M_caches; + if (!__caches[__i]) + { + __numpunct_cache<_CharT>* __tmp = __null; + try + { + __tmp = new __numpunct_cache<_CharT>; + __tmp->_M_cache(__loc); + } + catch(...) + { + delete __tmp; + throw; + } + __loc._M_impl->_M_install_cache(__tmp, __i); + } + return static_cast*>(__caches[__i]); + } + }; + template + void + __numpunct_cache<_CharT>::_M_cache(const locale& __loc) + { + _M_allocated = true; + const numpunct<_CharT>& __np = use_facet >(__loc); + char* __grouping = 0; + _CharT* __truename = 0; + _CharT* __falsename = 0; + try + { + _M_grouping_size = __np.grouping().size(); + __grouping = new char[_M_grouping_size]; + __np.grouping().copy(__grouping, _M_grouping_size); + _M_grouping = __grouping; + _M_use_grouping = (_M_grouping_size + && static_cast(_M_grouping[0]) > 0 + && (_M_grouping[0] + != __gnu_cxx::__numeric_traits::__max)); + _M_truename_size = __np.truename().size(); + __truename = new _CharT[_M_truename_size]; + __np.truename().copy(__truename, _M_truename_size); + _M_truename = __truename; + _M_falsename_size = __np.falsename().size(); + __falsename = new _CharT[_M_falsename_size]; + __np.falsename().copy(__falsename, _M_falsename_size); + _M_falsename = __falsename; + _M_decimal_point = __np.decimal_point(); + _M_thousands_sep = __np.thousands_sep(); + const ctype<_CharT>& __ct = use_facet >(__loc); + __ct.widen(__num_base::_S_atoms_out, + __num_base::_S_atoms_out + + __num_base::_S_oend, _M_atoms_out); + __ct.widen(__num_base::_S_atoms_in, + __num_base::_S_atoms_in + + __num_base::_S_iend, _M_atoms_in); + } + catch(...) + { + delete [] __grouping; + delete [] __truename; + delete [] __falsename; + throw; + } + } + __attribute__ ((__pure__)) bool + __verify_grouping(const char* __grouping, size_t __grouping_size, + const string& __grouping_tmp) throw (); + template + _InIter + num_get<_CharT, _InIter>:: + _M_extract_float(_InIter __beg, _InIter __end, ios_base& __io, + ios_base::iostate& __err, string& __xtrc) const + { + typedef char_traits<_CharT> __traits_type; + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + const _CharT* __lit = __lc->_M_atoms_in; + char_type __c = char_type(); + bool __testeof = __beg == __end; + if (!__testeof) + { + __c = *__beg; + const bool __plus = __c == __lit[__num_base::_S_iplus]; + if ((__plus || __c == __lit[__num_base::_S_iminus]) + && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + && !(__c == __lc->_M_decimal_point)) + { + __xtrc += __plus ? '+' : '-'; + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + } + bool __found_mantissa = false; + int __sep_pos = 0; + while (!__testeof) + { + if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + || __c == __lc->_M_decimal_point) + break; + else if (__c == __lit[__num_base::_S_izero]) + { + if (!__found_mantissa) + { + __xtrc += '0'; + __found_mantissa = true; + } + ++__sep_pos; + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + else + break; + } + bool __found_dec = false; + bool __found_sci = false; + string __found_grouping; + if (__lc->_M_use_grouping) + __found_grouping.reserve(32); + const char_type* __lit_zero = __lit + __num_base::_S_izero; + if (!__lc->_M_allocated) + while (!__testeof) + { + const int __digit = _M_find(__lit_zero, 10, __c); + if (__digit != -1) + { + __xtrc += '0' + __digit; + __found_mantissa = true; + } + else if (__c == __lc->_M_decimal_point + && !__found_dec && !__found_sci) + { + __xtrc += '.'; + __found_dec = true; + } + else if ((__c == __lit[__num_base::_S_ie] + || __c == __lit[__num_base::_S_iE]) + && !__found_sci && __found_mantissa) + { + __xtrc += 'e'; + __found_sci = true; + if (++__beg != __end) + { + __c = *__beg; + const bool __plus = __c == __lit[__num_base::_S_iplus]; + if (__plus || __c == __lit[__num_base::_S_iminus]) + __xtrc += __plus ? '+' : '-'; + else + continue; + } + else + { + __testeof = true; + break; + } + } + else + break; + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + else + while (!__testeof) + { + if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + { + if (!__found_dec && !__found_sci) + { + if (__sep_pos) + { + __found_grouping += static_cast(__sep_pos); + __sep_pos = 0; + } + else + { + __xtrc.clear(); + break; + } + } + else + break; + } + else if (__c == __lc->_M_decimal_point) + { + if (!__found_dec && !__found_sci) + { + if (__found_grouping.size()) + __found_grouping += static_cast(__sep_pos); + __xtrc += '.'; + __found_dec = true; + } + else + break; + } + else + { + const char_type* __q = + __traits_type::find(__lit_zero, 10, __c); + if (__q) + { + __xtrc += '0' + (__q - __lit_zero); + __found_mantissa = true; + ++__sep_pos; + } + else if ((__c == __lit[__num_base::_S_ie] + || __c == __lit[__num_base::_S_iE]) + && !__found_sci && __found_mantissa) + { + if (__found_grouping.size() && !__found_dec) + __found_grouping += static_cast(__sep_pos); + __xtrc += 'e'; + __found_sci = true; + if (++__beg != __end) + { + __c = *__beg; + const bool __plus = __c == __lit[__num_base::_S_iplus]; + if ((__plus || __c == __lit[__num_base::_S_iminus]) + && !(__lc->_M_use_grouping + && __c == __lc->_M_thousands_sep) + && !(__c == __lc->_M_decimal_point)) + __xtrc += __plus ? '+' : '-'; + else + continue; + } + else + { + __testeof = true; + break; + } + } + else + break; + } + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + if (__found_grouping.size()) + { + if (!__found_dec && !__found_sci) + __found_grouping += static_cast(__sep_pos); + if (!std::__verify_grouping(__lc->_M_grouping, + __lc->_M_grouping_size, + __found_grouping)) + __err = ios_base::failbit; + } + return __beg; + } + template + template + _InIter + num_get<_CharT, _InIter>:: + _M_extract_int(_InIter __beg, _InIter __end, ios_base& __io, + ios_base::iostate& __err, _ValueT& __v) const + { + typedef char_traits<_CharT> __traits_type; + using __gnu_cxx::__add_unsigned; + typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + const _CharT* __lit = __lc->_M_atoms_in; + char_type __c = char_type(); + const ios_base::fmtflags __basefield = __io.flags() + & ios_base::basefield; + const bool __oct = __basefield == ios_base::oct; + int __base = __oct ? 8 : (__basefield == ios_base::hex ? 16 : 10); + bool __testeof = __beg == __end; + bool __negative = false; + if (!__testeof) + { + __c = *__beg; + __negative = __c == __lit[__num_base::_S_iminus]; + if ((__negative || __c == __lit[__num_base::_S_iplus]) + && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + && !(__c == __lc->_M_decimal_point)) + { + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + } + bool __found_zero = false; + int __sep_pos = 0; + while (!__testeof) + { + if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + || __c == __lc->_M_decimal_point) + break; + else if (__c == __lit[__num_base::_S_izero] + && (!__found_zero || __base == 10)) + { + __found_zero = true; + ++__sep_pos; + if (__basefield == 0) + __base = 8; + if (__base == 8) + __sep_pos = 0; + } + else if (__found_zero + && (__c == __lit[__num_base::_S_ix] + || __c == __lit[__num_base::_S_iX])) + { + if (__basefield == 0) + __base = 16; + if (__base == 16) + { + __found_zero = false; + __sep_pos = 0; + } + else + break; + } + else + break; + if (++__beg != __end) + { + __c = *__beg; + if (!__found_zero) + break; + } + else + __testeof = true; + } + const size_t __len = (__base == 16 ? __num_base::_S_iend + - __num_base::_S_izero : __base); + string __found_grouping; + if (__lc->_M_use_grouping) + __found_grouping.reserve(32); + bool __testfail = false; + bool __testoverflow = false; + const __unsigned_type __max = + (__negative && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) + ? -__gnu_cxx::__numeric_traits<_ValueT>::__min + : __gnu_cxx::__numeric_traits<_ValueT>::__max; + const __unsigned_type __smax = __max / __base; + __unsigned_type __result = 0; + int __digit = 0; + const char_type* __lit_zero = __lit + __num_base::_S_izero; + if (!__lc->_M_allocated) + while (!__testeof) + { + __digit = _M_find(__lit_zero, __len, __c); + if (__digit == -1) + break; + if (__result > __smax) + __testoverflow = true; + else + { + __result *= __base; + __testoverflow |= __result > __max - __digit; + __result += __digit; + ++__sep_pos; + } + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + else + while (!__testeof) + { + if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + { + if (__sep_pos) + { + __found_grouping += static_cast(__sep_pos); + __sep_pos = 0; + } + else + { + __testfail = true; + break; + } + } + else if (__c == __lc->_M_decimal_point) + break; + else + { + const char_type* __q = + __traits_type::find(__lit_zero, __len, __c); + if (!__q) + break; + __digit = __q - __lit_zero; + if (__digit > 15) + __digit -= 6; + if (__result > __smax) + __testoverflow = true; + else + { + __result *= __base; + __testoverflow |= __result > __max - __digit; + __result += __digit; + ++__sep_pos; + } + } + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + if (__found_grouping.size()) + { + __found_grouping += static_cast(__sep_pos); + if (!std::__verify_grouping(__lc->_M_grouping, + __lc->_M_grouping_size, + __found_grouping)) + __err = ios_base::failbit; + } + if ((!__sep_pos && !__found_zero && !__found_grouping.size()) + || __testfail) + { + __v = 0; + __err = ios_base::failbit; + } + else if (__testoverflow) + { + if (__negative + && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) + __v = __gnu_cxx::__numeric_traits<_ValueT>::__min; + else + __v = __gnu_cxx::__numeric_traits<_ValueT>::__max; + __err = ios_base::failbit; + } + else + __v = __negative ? -__result : __result; + if (__testeof) + __err |= ios_base::eofbit; + return __beg; + } + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, bool& __v) const + { + if (!(__io.flags() & ios_base::boolalpha)) + { + long __l = -1; + __beg = _M_extract_int(__beg, __end, __io, __err, __l); + if (__l == 0 || __l == 1) + __v = bool(__l); + else + { + __v = true; + __err = ios_base::failbit; + if (__beg == __end) + __err |= ios_base::eofbit; + } + } + else + { + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + bool __testf = true; + bool __testt = true; + bool __donef = __lc->_M_falsename_size == 0; + bool __donet = __lc->_M_truename_size == 0; + bool __testeof = false; + size_t __n = 0; + while (!__donef || !__donet) + { + if (__beg == __end) + { + __testeof = true; + break; + } + const char_type __c = *__beg; + if (!__donef) + __testf = __c == __lc->_M_falsename[__n]; + if (!__testf && __donet) + break; + if (!__donet) + __testt = __c == __lc->_M_truename[__n]; + if (!__testt && __donef) + break; + if (!__testt && !__testf) + break; + ++__n; + ++__beg; + __donef = !__testf || __n >= __lc->_M_falsename_size; + __donet = !__testt || __n >= __lc->_M_truename_size; + } + if (__testf && __n == __lc->_M_falsename_size && __n) + { + __v = false; + if (__testt && __n == __lc->_M_truename_size) + __err = ios_base::failbit; + else + __err = __testeof ? ios_base::eofbit : ios_base::goodbit; + } + else if (__testt && __n == __lc->_M_truename_size && __n) + { + __v = true; + __err = __testeof ? ios_base::eofbit : ios_base::goodbit; + } + else + { + __v = false; + __err = ios_base::failbit; + if (__testeof) + __err |= ios_base::eofbit; + } + } + return __beg; + } + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, float& __v) const + { + string __xtrc; + __xtrc.reserve(32); + __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); + std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, double& __v) const + { + string __xtrc; + __xtrc.reserve(32); + __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); + std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long double& __v) const + { + string __xtrc; + __xtrc.reserve(32); + __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); + std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, void*& __v) const + { + typedef ios_base::fmtflags fmtflags; + const fmtflags __fmt = __io.flags(); + __io.flags((__fmt & ~ios_base::basefield) | ios_base::hex); + typedef __gnu_cxx::__conditional_type<(sizeof(void*) + <= sizeof(unsigned long)), + unsigned long, unsigned long long>::__type _UIntPtrType; + _UIntPtrType __ul; + __beg = _M_extract_int(__beg, __end, __io, __err, __ul); + __io.flags(__fmt); + __v = reinterpret_cast(__ul); + return __beg; + } + template + void + num_put<_CharT, _OutIter>:: + _M_pad(_CharT __fill, streamsize __w, ios_base& __io, + _CharT* __new, const _CharT* __cs, int& __len) const + { + __pad<_CharT, char_traits<_CharT> >::_S_pad(__io, __fill, __new, + __cs, __w, __len); + __len = static_cast(__w); + } + template + int + __int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit, + ios_base::fmtflags __flags, bool __dec) + { + _CharT* __buf = __bufend; + if (__builtin_expect(__dec, true)) + { + do + { + *--__buf = __lit[(__v % 10) + __num_base::_S_odigits]; + __v /= 10; + } + while (__v != 0); + } + else if ((__flags & ios_base::basefield) == ios_base::oct) + { + do + { + *--__buf = __lit[(__v & 0x7) + __num_base::_S_odigits]; + __v >>= 3; + } + while (__v != 0); + } + else + { + const bool __uppercase = __flags & ios_base::uppercase; + const int __case_offset = __uppercase ? __num_base::_S_oudigits + : __num_base::_S_odigits; + do + { + *--__buf = __lit[(__v & 0xf) + __case_offset]; + __v >>= 4; + } + while (__v != 0); + } + return __bufend - __buf; + } + template + void + num_put<_CharT, _OutIter>:: + _M_group_int(const char* __grouping, size_t __grouping_size, _CharT __sep, + ios_base&, _CharT* __new, _CharT* __cs, int& __len) const + { + _CharT* __p = std::__add_grouping(__new, __sep, __grouping, + __grouping_size, __cs, __cs + __len); + __len = __p - __new; + } + template + template + _OutIter + num_put<_CharT, _OutIter>:: + _M_insert_int(_OutIter __s, ios_base& __io, _CharT __fill, + _ValueT __v) const + { + using __gnu_cxx::__add_unsigned; + typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + const _CharT* __lit = __lc->_M_atoms_out; + const ios_base::fmtflags __flags = __io.flags(); + const int __ilen = 5 * sizeof(_ValueT); + _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __ilen)); + const ios_base::fmtflags __basefield = __flags & ios_base::basefield; + const bool __dec = (__basefield != ios_base::oct + && __basefield != ios_base::hex); + const __unsigned_type __u = ((__v > 0 || !__dec) + ? __unsigned_type(__v) + : -__unsigned_type(__v)); + int __len = __int_to_char(__cs + __ilen, __u, __lit, __flags, __dec); + __cs += __ilen - __len; + if (__lc->_M_use_grouping) + { + _CharT* __cs2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * (__len + 1) + * 2)); + _M_group_int(__lc->_M_grouping, __lc->_M_grouping_size, + __lc->_M_thousands_sep, __io, __cs2 + 2, __cs, __len); + __cs = __cs2 + 2; + } + if (__builtin_expect(__dec, true)) + { + if (__v >= 0) + { + if (bool(__flags & ios_base::showpos) + && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) + *--__cs = __lit[__num_base::_S_oplus], ++__len; + } + else + *--__cs = __lit[__num_base::_S_ominus], ++__len; + } + else if (bool(__flags & ios_base::showbase) && __v) + { + if (__basefield == ios_base::oct) + *--__cs = __lit[__num_base::_S_odigits], ++__len; + else + { + const bool __uppercase = __flags & ios_base::uppercase; + *--__cs = __lit[__num_base::_S_ox + __uppercase]; + *--__cs = __lit[__num_base::_S_odigits]; + __len += 2; + } + } + const streamsize __w = __io.width(); + if (__w > static_cast(__len)) + { + _CharT* __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __w)); + _M_pad(__fill, __w, __io, __cs3, __cs, __len); + __cs = __cs3; + } + __io.width(0); + return std::__write(__s, __cs, __len); + } + template + void + num_put<_CharT, _OutIter>:: + _M_group_float(const char* __grouping, size_t __grouping_size, + _CharT __sep, const _CharT* __p, _CharT* __new, + _CharT* __cs, int& __len) const + { + const int __declen = __p ? __p - __cs : __len; + _CharT* __p2 = std::__add_grouping(__new, __sep, __grouping, + __grouping_size, + __cs, __cs + __declen); + int __newlen = __p2 - __new; + if (__p) + { + char_traits<_CharT>::copy(__p2, __p, __len - __declen); + __newlen += __len - __declen; + } + __len = __newlen; + } + template + template + _OutIter + num_put<_CharT, _OutIter>:: + _M_insert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod, + _ValueT __v) const + { + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + const streamsize __prec = __io.precision() < 0 ? 6 : __io.precision(); + const int __max_digits = + __gnu_cxx::__numeric_traits<_ValueT>::__digits10; + int __len; + char __fbuf[16]; + __num_base::_S_format_float(__io, __fbuf, __mod); + int __cs_size = __max_digits * 3; + char* __cs = static_cast(__builtin_alloca(__cs_size)); + __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, + __fbuf, __prec, __v); + if (__len >= __cs_size) + { + __cs_size = __len + 1; + __cs = static_cast(__builtin_alloca(__cs_size)); + __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, + __fbuf, __prec, __v); + } + const ctype<_CharT>& __ctype = use_facet >(__loc); + _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __len)); + __ctype.widen(__cs, __cs + __len, __ws); + _CharT* __wp = 0; + const char* __p = char_traits::find(__cs, __len, '.'); + if (__p) + { + __wp = __ws + (__p - __cs); + *__wp = __lc->_M_decimal_point; + } + if (__lc->_M_use_grouping + && (__wp || __len < 3 || (__cs[1] <= '9' && __cs[2] <= '9' + && __cs[1] >= '0' && __cs[2] >= '0'))) + { + _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __len * 2)); + streamsize __off = 0; + if (__cs[0] == '-' || __cs[0] == '+') + { + __off = 1; + __ws2[0] = __ws[0]; + __len -= 1; + } + _M_group_float(__lc->_M_grouping, __lc->_M_grouping_size, + __lc->_M_thousands_sep, __wp, __ws2 + __off, + __ws + __off, __len); + __len += __off; + __ws = __ws2; + } + const streamsize __w = __io.width(); + if (__w > static_cast(__len)) + { + _CharT* __ws3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __w)); + _M_pad(__fill, __w, __io, __ws3, __ws, __len); + __ws = __ws3; + } + __io.width(0); + return std::__write(__s, __ws, __len); + } + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const + { + const ios_base::fmtflags __flags = __io.flags(); + if ((__flags & ios_base::boolalpha) == 0) + { + const long __l = __v; + __s = _M_insert_int(__s, __io, __fill, __l); + } + else + { + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + const _CharT* __name = __v ? __lc->_M_truename + : __lc->_M_falsename; + int __len = __v ? __lc->_M_truename_size + : __lc->_M_falsename_size; + const streamsize __w = __io.width(); + if (__w > static_cast(__len)) + { + const streamsize __plen = __w - __len; + _CharT* __ps + = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __plen)); + char_traits<_CharT>::assign(__ps, __plen, __fill); + __io.width(0); + if ((__flags & ios_base::adjustfield) == ios_base::left) + { + __s = std::__write(__s, __name, __len); + __s = std::__write(__s, __ps, __plen); + } + else + { + __s = std::__write(__s, __ps, __plen); + __s = std::__write(__s, __name, __len); + } + return __s; + } + __io.width(0); + __s = std::__write(__s, __name, __len); + } + return __s; + } + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const + { return _M_insert_float(__s, __io, __fill, char(), __v); } + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, + long double __v) const + { return _M_insert_float(__s, __io, __fill, 'L', __v); } + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, + const void* __v) const + { + const ios_base::fmtflags __flags = __io.flags(); + const ios_base::fmtflags __fmt = ~(ios_base::basefield + | ios_base::uppercase); + __io.flags((__flags & __fmt) | (ios_base::hex | ios_base::showbase)); + typedef __gnu_cxx::__conditional_type<(sizeof(const void*) + <= sizeof(unsigned long)), + unsigned long, unsigned long long>::__type _UIntPtrType; + __s = _M_insert_int(__s, __io, __fill, + reinterpret_cast<_UIntPtrType>(__v)); + __io.flags(__flags); + return __s; + } + template + void + __pad<_CharT, _Traits>::_S_pad(ios_base& __io, _CharT __fill, + _CharT* __news, const _CharT* __olds, + streamsize __newlen, streamsize __oldlen) + { + const size_t __plen = static_cast(__newlen - __oldlen); + const ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield; + if (__adjust == ios_base::left) + { + _Traits::copy(__news, __olds, __oldlen); + _Traits::assign(__news + __oldlen, __plen, __fill); + return; + } + size_t __mod = 0; + if (__adjust == ios_base::internal) + { + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + if (__ctype.widen('-') == __olds[0] + || __ctype.widen('+') == __olds[0]) + { + __news[0] = __olds[0]; + __mod = 1; + ++__news; + } + else if (__ctype.widen('0') == __olds[0] + && __oldlen > 1 + && (__ctype.widen('x') == __olds[1] + || __ctype.widen('X') == __olds[1])) + { + __news[0] = __olds[0]; + __news[1] = __olds[1]; + __mod = 2; + __news += 2; + } + } + _Traits::assign(__news, __plen, __fill); + _Traits::copy(__news + __plen, __olds + __mod, __oldlen - __mod); + } + template + _CharT* + __add_grouping(_CharT* __s, _CharT __sep, + const char* __gbeg, size_t __gsize, + const _CharT* __first, const _CharT* __last) + { + size_t __idx = 0; + size_t __ctr = 0; + while (__last - __first > __gbeg[__idx] + && static_cast(__gbeg[__idx]) > 0 + && __gbeg[__idx] != __gnu_cxx::__numeric_traits::__max) + { + __last -= __gbeg[__idx]; + __idx < __gsize - 1 ? ++__idx : ++__ctr; + } + while (__first != __last) + *__s++ = *__first++; + while (__ctr--) + { + *__s++ = __sep; + for (char __i = __gbeg[__idx]; __i > 0; --__i) + *__s++ = *__first++; + } + while (__idx--) + { + *__s++ = __sep; + for (char __i = __gbeg[__idx]; __i > 0; --__i) + *__s++ = *__first++; + } + return __s; + } + extern template class numpunct; + extern template class numpunct_byname; + extern template class num_get; + extern template class num_put; + extern template class ctype_byname; + extern template + const ctype& + use_facet >(const locale&); + extern template + const numpunct& + use_facet >(const locale&); + extern template + const num_put& + use_facet >(const locale&); + extern template + const num_get& + use_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template class numpunct; + extern template class numpunct_byname; + extern template class num_get; + extern template class num_put; + extern template class ctype_byname; + extern template + const ctype& + use_facet >(const locale&); + extern template + const numpunct& + use_facet >(const locale&); + extern template + const num_put& + use_facet >(const locale&); + extern template + const num_get& + use_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + inline const _Facet& + __check_facet(const _Facet* __f) + { + if (!__f) + __throw_bad_cast(); + return *__f; + } + template + class basic_ios : public ios_base + { + public: + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + typedef ctype<_CharT> __ctype_type; + typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > + __num_put_type; + typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > + __num_get_type; + public: + basic_ostream<_CharT, _Traits>* _M_tie; + mutable char_type _M_fill; + mutable bool _M_fill_init; + basic_streambuf<_CharT, _Traits>* _M_streambuf; + const __ctype_type* _M_ctype; + const __num_put_type* _M_num_put; + const __num_get_type* _M_num_get; + public: + operator void*() const + { return this->fail() ? 0 : const_cast(this); } + bool + operator!() const + { return this->fail(); } + iostate + rdstate() const + { return _M_streambuf_state; } + void + clear(iostate __state = goodbit); + void + setstate(iostate __state) + { this->clear(this->rdstate() | __state); } + void + _M_setstate(iostate __state) + { + _M_streambuf_state |= __state; + if (this->exceptions() & __state) + throw; + } + bool + good() const + { return this->rdstate() == 0; } + bool + eof() const + { return (this->rdstate() & eofbit) != 0; } + bool + fail() const + { return (this->rdstate() & (badbit | failbit)) != 0; } + bool + bad() const + { return (this->rdstate() & badbit) != 0; } + iostate + exceptions() const + { return _M_exception; } + void + exceptions(iostate __except) + { + _M_exception = __except; + this->clear(_M_streambuf_state); + } + explicit + basic_ios(basic_streambuf<_CharT, _Traits>* __sb) + : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0), + _M_ctype(0), _M_num_put(0), _M_num_get(0) + { this->init(__sb); } + virtual + ~basic_ios() { } + basic_ostream<_CharT, _Traits>* + tie() const + { return _M_tie; } + basic_ostream<_CharT, _Traits>* + tie(basic_ostream<_CharT, _Traits>* __tiestr) + { + basic_ostream<_CharT, _Traits>* __old = _M_tie; + _M_tie = __tiestr; + return __old; + } + basic_streambuf<_CharT, _Traits>* + rdbuf() const + { return _M_streambuf; } + basic_streambuf<_CharT, _Traits>* + rdbuf(basic_streambuf<_CharT, _Traits>* __sb); + basic_ios& + copyfmt(const basic_ios& __rhs); + char_type + fill() const + { + if (!_M_fill_init) + { + _M_fill = this->widen(' '); + _M_fill_init = true; + } + return _M_fill; + } + char_type + fill(char_type __ch) + { + char_type __old = this->fill(); + _M_fill = __ch; + return __old; + } + locale + imbue(const locale& __loc); + char + narrow(char_type __c, char __dfault) const + { return __check_facet(_M_ctype).narrow(__c, __dfault); } + char_type + widen(char __c) const + { return __check_facet(_M_ctype).widen(__c); } + public: + basic_ios() + : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false), + _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0) + { } + void + init(basic_streambuf<_CharT, _Traits>* __sb); + void + _M_cache_locale(const locale& __loc); + }; +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + void + basic_ios<_CharT, _Traits>::clear(iostate __state) + { + if (this->rdbuf()) + _M_streambuf_state = __state; + else + _M_streambuf_state = __state | badbit; + if (this->exceptions() & this->rdstate()) + __throw_ios_failure(("basic_ios::clear")); + } + template + basic_streambuf<_CharT, _Traits>* + basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb) + { + basic_streambuf<_CharT, _Traits>* __old = _M_streambuf; + _M_streambuf = __sb; + this->clear(); + return __old; + } + template + basic_ios<_CharT, _Traits>& + basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs) + { + if (this != &__rhs) + { + _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ? + _M_local_word : new _Words[__rhs._M_word_size]; + _Callback_list* __cb = __rhs._M_callbacks; + if (__cb) + __cb->_M_add_reference(); + _M_call_callbacks(erase_event); + if (_M_word != _M_local_word) + { + delete [] _M_word; + _M_word = 0; + } + _M_dispose_callbacks(); + _M_callbacks = __cb; + for (int __i = 0; __i < __rhs._M_word_size; ++__i) + __words[__i] = __rhs._M_word[__i]; + _M_word = __words; + _M_word_size = __rhs._M_word_size; + this->flags(__rhs.flags()); + this->width(__rhs.width()); + this->precision(__rhs.precision()); + this->tie(__rhs.tie()); + this->fill(__rhs.fill()); + _M_ios_locale = __rhs.getloc(); + _M_cache_locale(_M_ios_locale); + _M_call_callbacks(copyfmt_event); + this->exceptions(__rhs.exceptions()); + } + return *this; + } + template + locale + basic_ios<_CharT, _Traits>::imbue(const locale& __loc) + { + locale __old(this->getloc()); + ios_base::imbue(__loc); + _M_cache_locale(__loc); + if (this->rdbuf() != 0) + this->rdbuf()->pubimbue(__loc); + return __old; + } + template + void + basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb) + { + ios_base::_M_init(); + _M_cache_locale(_M_ios_locale); + _M_fill = _CharT(); + _M_fill_init = false; + _M_tie = 0; + _M_exception = goodbit; + _M_streambuf = __sb; + _M_streambuf_state = __sb ? goodbit : badbit; + } + template + void + basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc) + { + if (__builtin_expect(has_facet<__ctype_type>(__loc), true)) + _M_ctype = &use_facet<__ctype_type>(__loc); + else + _M_ctype = 0; + if (__builtin_expect(has_facet<__num_put_type>(__loc), true)) + _M_num_put = &use_facet<__num_put_type>(__loc); + else + _M_num_put = 0; + if (__builtin_expect(has_facet<__num_get_type>(__loc), true)) + _M_num_get = &use_facet<__num_get_type>(__loc); + else + _M_num_get = 0; + } + extern template class basic_ios; + extern template class basic_ios; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + class basic_ostream : virtual public basic_ios<_CharT, _Traits> + { + public: + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef basic_ios<_CharT, _Traits> __ios_type; + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > + __num_put_type; + typedef ctype<_CharT> __ctype_type; + explicit + basic_ostream(__streambuf_type* __sb) + { this->init(__sb); } + virtual + ~basic_ostream() { } + class sentry; + friend class sentry; + __ostream_type& + operator<<(__ostream_type& (*__pf)(__ostream_type&)) + { + return __pf(*this); + } + __ostream_type& + operator<<(__ios_type& (*__pf)(__ios_type&)) + { + __pf(*this); + return *this; + } + __ostream_type& + operator<<(ios_base& (*__pf) (ios_base&)) + { + __pf(*this); + return *this; + } + __ostream_type& + operator<<(long __n) + { return _M_insert(__n); } + __ostream_type& + operator<<(unsigned long __n) + { return _M_insert(__n); } + __ostream_type& + operator<<(bool __n) + { return _M_insert(__n); } + __ostream_type& + operator<<(short __n); + __ostream_type& + operator<<(unsigned short __n) + { + return _M_insert(static_cast(__n)); + } + __ostream_type& + operator<<(int __n); + __ostream_type& + operator<<(unsigned int __n) + { + return _M_insert(static_cast(__n)); + } + __ostream_type& + operator<<(long long __n) + { return _M_insert(__n); } + __ostream_type& + operator<<(unsigned long long __n) + { return _M_insert(__n); } + __ostream_type& + operator<<(double __f) + { return _M_insert(__f); } + __ostream_type& + operator<<(float __f) + { + return _M_insert(static_cast(__f)); + } + __ostream_type& + operator<<(long double __f) + { return _M_insert(__f); } + __ostream_type& + operator<<(const void* __p) + { return _M_insert(__p); } + __ostream_type& + operator<<(__streambuf_type* __sb); + __ostream_type& + put(char_type __c); + void + _M_write(const char_type* __s, streamsize __n) + { + const streamsize __put = this->rdbuf()->sputn(__s, __n); + if (__put != __n) + this->setstate(ios_base::badbit); + } + __ostream_type& + write(const char_type* __s, streamsize __n); + __ostream_type& + flush(); + pos_type + tellp(); + __ostream_type& + seekp(pos_type); + __ostream_type& + seekp(off_type, ios_base::seekdir); + public: + basic_ostream() + { this->init(0); } + template + __ostream_type& + _M_insert(_ValueT __v); + }; + template + class basic_ostream<_CharT, _Traits>::sentry + { + bool _M_ok; + basic_ostream<_CharT, _Traits>& _M_os; + public: + explicit + sentry(basic_ostream<_CharT, _Traits>& __os); + ~sentry() + { + if (bool(_M_os.flags() & ios_base::unitbuf) && !uncaught_exception()) + { + if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1) + _M_os.setstate(ios_base::badbit); + } + } + operator bool() const + { return _M_ok; } + }; + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) + { return __ostream_insert(__out, &__c, 1); } + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) + { return (__out << __out.widen(__c)); } + template + inline basic_ostream& + operator<<(basic_ostream& __out, char __c) + { return __ostream_insert(__out, &__c, 1); } + template + inline basic_ostream& + operator<<(basic_ostream& __out, signed char __c) + { return (__out << static_cast(__c)); } + template + inline basic_ostream& + operator<<(basic_ostream& __out, unsigned char __c) + { return (__out << static_cast(__c)); } + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) + { + if (!__s) + __out.setstate(ios_base::badbit); + else + __ostream_insert(__out, __s, + static_cast(_Traits::length(__s))); + return __out; + } + template + basic_ostream<_CharT, _Traits> & + operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s); + template + inline basic_ostream& + operator<<(basic_ostream& __out, const char* __s) + { + if (!__s) + __out.setstate(ios_base::badbit); + else + __ostream_insert(__out, __s, + static_cast(_Traits::length(__s))); + return __out; + } + template + inline basic_ostream& + operator<<(basic_ostream& __out, const signed char* __s) + { return (__out << reinterpret_cast(__s)); } + template + inline basic_ostream & + operator<<(basic_ostream& __out, const unsigned char* __s) + { return (__out << reinterpret_cast(__s)); } + template + inline basic_ostream<_CharT, _Traits>& + endl(basic_ostream<_CharT, _Traits>& __os) + { return flush(__os.put(__os.widen('\n'))); } + template + inline basic_ostream<_CharT, _Traits>& + ends(basic_ostream<_CharT, _Traits>& __os) + { return __os.put(_CharT()); } + template + inline basic_ostream<_CharT, _Traits>& + flush(basic_ostream<_CharT, _Traits>& __os) + { return __os.flush(); } +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + basic_ostream<_CharT, _Traits>::sentry:: + sentry(basic_ostream<_CharT, _Traits>& __os) + : _M_ok(false), _M_os(__os) + { + if (__os.tie() && __os.good()) + __os.tie()->flush(); + if (__os.good()) + _M_ok = true; + else + __os.setstate(ios_base::failbit); + } + template + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + _M_insert(_ValueT __v) + { + sentry __cerb(*this); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const __num_put_type& __np = __check_facet(this->_M_num_put); + if (__np.put(*this, *this, this->fill(), __v).failed()) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + operator<<(short __n) + { + const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; + if (__fmt == ios_base::oct || __fmt == ios_base::hex) + return _M_insert(static_cast(static_cast(__n))); + else + return _M_insert(static_cast(__n)); + } + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + operator<<(int __n) + { + const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; + if (__fmt == ios_base::oct || __fmt == ios_base::hex) + return _M_insert(static_cast(static_cast(__n))); + else + return _M_insert(static_cast(__n)); + } + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + operator<<(__streambuf_type* __sbin) + { + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this); + if (__cerb && __sbin) + { + try + { + if (!__copy_streambufs(__sbin, this->rdbuf())) + __err |= ios_base::failbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::failbit); } + } + else if (!__sbin) + __err |= ios_base::badbit; + if (__err) + this->setstate(__err); + return *this; + } + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + put(char_type __c) + { + sentry __cerb(*this); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __put = this->rdbuf()->sputc(__c); + if (traits_type::eq_int_type(__put, traits_type::eof())) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + write(const _CharT* __s, streamsize __n) + { + sentry __cerb(*this); + if (__cerb) + { + try + { _M_write(__s, __n); } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + return *this; + } + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + flush() + { + ios_base::iostate __err = ios_base::goodbit; + try + { + if (this->rdbuf() && this->rdbuf()->pubsync() == -1) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + template + typename basic_ostream<_CharT, _Traits>::pos_type + basic_ostream<_CharT, _Traits>:: + tellp() + { + pos_type __ret = pos_type(-1); + try + { + if (!this->fail()) + __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + return __ret; + } + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + seekp(pos_type __pos) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + if (!this->fail()) + { + const pos_type __p = this->rdbuf()->pubseekpos(__pos, + ios_base::out); + if (__p == pos_type(off_type(-1))) + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + seekp(off_type __off, ios_base::seekdir __dir) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + if (!this->fail()) + { + const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, + ios_base::out); + if (__p == pos_type(off_type(-1))) + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + template + basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) + { + if (!__s) + __out.setstate(ios_base::badbit); + else + { + const size_t __clen = char_traits::length(__s); + try + { + struct __ptr_guard + { + _CharT *__p; + __ptr_guard (_CharT *__ip): __p(__ip) { } + ~__ptr_guard() { delete[] __p; } + _CharT* __get() { return __p; } + } __pg (new _CharT[__clen]); + _CharT *__ws = __pg.__get(); + for (size_t __i = 0; __i < __clen; ++__i) + __ws[__i] = __out.widen(__s[__i]); + __ostream_insert(__out, __ws, __clen); + } + catch(__cxxabiv1::__forced_unwind&) + { + __out._M_setstate(ios_base::badbit); + throw; + } + catch(...) + { __out._M_setstate(ios_base::badbit); } + } + return __out; + } + extern template class basic_ostream; + extern template ostream& endl(ostream&); + extern template ostream& ends(ostream&); + extern template ostream& flush(ostream&); + extern template ostream& operator<<(ostream&, char); + extern template ostream& operator<<(ostream&, unsigned char); + extern template ostream& operator<<(ostream&, signed char); + extern template ostream& operator<<(ostream&, const char*); + extern template ostream& operator<<(ostream&, const unsigned char*); + extern template ostream& operator<<(ostream&, const signed char*); + extern template ostream& ostream::_M_insert(long); + extern template ostream& ostream::_M_insert(unsigned long); + extern template ostream& ostream::_M_insert(bool); + extern template ostream& ostream::_M_insert(long long); + extern template ostream& ostream::_M_insert(unsigned long long); + extern template ostream& ostream::_M_insert(double); + extern template ostream& ostream::_M_insert(long double); + extern template ostream& ostream::_M_insert(const void*); + extern template class basic_ostream; + extern template wostream& endl(wostream&); + extern template wostream& ends(wostream&); + extern template wostream& flush(wostream&); + extern template wostream& operator<<(wostream&, wchar_t); + extern template wostream& operator<<(wostream&, char); + extern template wostream& operator<<(wostream&, const wchar_t*); + extern template wostream& operator<<(wostream&, const char*); + extern template wostream& wostream::_M_insert(long); + extern template wostream& wostream::_M_insert(unsigned long); + extern template wostream& wostream::_M_insert(bool); + extern template wostream& wostream::_M_insert(long long); + extern template wostream& wostream::_M_insert(unsigned long long); + extern template wostream& wostream::_M_insert(double); + extern template wostream& wostream::_M_insert(long double); + extern template wostream& wostream::_M_insert(const void*); +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + class basic_istream : virtual public basic_ios<_CharT, _Traits> + { + public: + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef basic_ios<_CharT, _Traits> __ios_type; + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > + __num_get_type; + typedef ctype<_CharT> __ctype_type; + public: + streamsize _M_gcount; + public: + explicit + basic_istream(__streambuf_type* __sb) + : _M_gcount(streamsize(0)) + { this->init(__sb); } + virtual + ~basic_istream() + { _M_gcount = streamsize(0); } + class sentry; + friend class sentry; + __istream_type& + operator>>(__istream_type& (*__pf)(__istream_type&)) + { return __pf(*this); } + __istream_type& + operator>>(__ios_type& (*__pf)(__ios_type&)) + { + __pf(*this); + return *this; + } + __istream_type& + operator>>(ios_base& (*__pf)(ios_base&)) + { + __pf(*this); + return *this; + } + __istream_type& + operator>>(bool& __n) + { return _M_extract(__n); } + __istream_type& + operator>>(short& __n); + __istream_type& + operator>>(unsigned short& __n) + { return _M_extract(__n); } + __istream_type& + operator>>(int& __n); + __istream_type& + operator>>(unsigned int& __n) + { return _M_extract(__n); } + __istream_type& + operator>>(long& __n) + { return _M_extract(__n); } + __istream_type& + operator>>(unsigned long& __n) + { return _M_extract(__n); } + __istream_type& + operator>>(long long& __n) + { return _M_extract(__n); } + __istream_type& + operator>>(unsigned long long& __n) + { return _M_extract(__n); } + __istream_type& + operator>>(float& __f) + { return _M_extract(__f); } + __istream_type& + operator>>(double& __f) + { return _M_extract(__f); } + __istream_type& + operator>>(long double& __f) + { return _M_extract(__f); } + __istream_type& + operator>>(void*& __p) + { return _M_extract(__p); } + __istream_type& + operator>>(__streambuf_type* __sb); + streamsize + gcount() const + { return _M_gcount; } + int_type + get(); + __istream_type& + get(char_type& __c); + __istream_type& + get(char_type* __s, streamsize __n, char_type __delim); + __istream_type& + get(char_type* __s, streamsize __n) + { return this->get(__s, __n, this->widen('\n')); } + __istream_type& + get(__streambuf_type& __sb, char_type __delim); + __istream_type& + get(__streambuf_type& __sb) + { return this->get(__sb, this->widen('\n')); } + __istream_type& + getline(char_type* __s, streamsize __n, char_type __delim); + __istream_type& + getline(char_type* __s, streamsize __n) + { return this->getline(__s, __n, this->widen('\n')); } + __istream_type& + ignore(); + __istream_type& + ignore(streamsize __n); + __istream_type& + ignore(streamsize __n, int_type __delim); + int_type + peek(); + __istream_type& + read(char_type* __s, streamsize __n); + streamsize + readsome(char_type* __s, streamsize __n); + __istream_type& + putback(char_type __c); + __istream_type& + unget(); + int + sync(); + pos_type + tellg(); + __istream_type& + seekg(pos_type); + __istream_type& + seekg(off_type, ios_base::seekdir); + public: + basic_istream() + : _M_gcount(streamsize(0)) + { this->init(0); } + template + __istream_type& + _M_extract(_ValueT& __v); + }; + template<> + basic_istream& + basic_istream:: + getline(char_type* __s, streamsize __n, char_type __delim); + template<> + basic_istream& + basic_istream:: + ignore(streamsize __n); + template<> + basic_istream& + basic_istream:: + ignore(streamsize __n, int_type __delim); + template<> + basic_istream& + basic_istream:: + getline(char_type* __s, streamsize __n, char_type __delim); + template<> + basic_istream& + basic_istream:: + ignore(streamsize __n); + template<> + basic_istream& + basic_istream:: + ignore(streamsize __n, int_type __delim); + template + class basic_istream<_CharT, _Traits>::sentry + { + bool _M_ok; + public: + typedef _Traits traits_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef typename __istream_type::__ctype_type __ctype_type; + typedef typename _Traits::int_type __int_type; + explicit + sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false); + operator bool() const + { return _M_ok; } + }; + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c); + template + inline basic_istream& + operator>>(basic_istream& __in, unsigned char& __c) + { return (__in >> reinterpret_cast(__c)); } + template + inline basic_istream& + operator>>(basic_istream& __in, signed char& __c) + { return (__in >> reinterpret_cast(__c)); } + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s); + template<> + basic_istream& + operator>>(basic_istream& __in, char* __s); + template + inline basic_istream& + operator>>(basic_istream& __in, unsigned char* __s) + { return (__in >> reinterpret_cast(__s)); } + template + inline basic_istream& + operator>>(basic_istream& __in, signed char* __s) + { return (__in >> reinterpret_cast(__s)); } + template + class basic_iostream + : public basic_istream<_CharT, _Traits>, + public basic_ostream<_CharT, _Traits> + { + public: + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_ostream<_CharT, _Traits> __ostream_type; + explicit + basic_iostream(basic_streambuf<_CharT, _Traits>* __sb) + : __istream_type(__sb), __ostream_type(__sb) { } + virtual + ~basic_iostream() { } + public: + basic_iostream() + : __istream_type(), __ostream_type() { } + }; + template + basic_istream<_CharT, _Traits>& + ws(basic_istream<_CharT, _Traits>& __is); +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + basic_istream<_CharT, _Traits>::sentry:: + sentry(basic_istream<_CharT, _Traits>& __in, bool __noskip) : _M_ok(false) + { + ios_base::iostate __err = ios_base::goodbit; + if (__in.good()) + { + if (__in.tie()) + __in.tie()->flush(); + if (!__noskip && bool(__in.flags() & ios_base::skipws)) + { + const __int_type __eof = traits_type::eof(); + __streambuf_type* __sb = __in.rdbuf(); + __int_type __c = __sb->sgetc(); + const __ctype_type& __ct = __check_facet(__in._M_ctype); + while (!traits_type::eq_int_type(__c, __eof) + && __ct.is(ctype_base::space, + traits_type::to_char_type(__c))) + __c = __sb->snextc(); + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + } + } + if (__in.good() && __err == ios_base::goodbit) + _M_ok = true; + else + { + __err |= ios_base::failbit; + __in.setstate(__err); + } + } + template + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + _M_extract(_ValueT& __v) + { + sentry __cerb(*this, false); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const __num_get_type& __ng = __check_facet(this->_M_num_get); + __ng.get(*this, 0, *this, __err, __v); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(short& __n) + { + sentry __cerb(*this, false); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + long __l; + const __num_get_type& __ng = __check_facet(this->_M_num_get); + __ng.get(*this, 0, *this, __err, __l); + if (__l < __gnu_cxx::__numeric_traits::__min) + { + __err |= ios_base::failbit; + __n = __gnu_cxx::__numeric_traits::__min; + } + else if (__l > __gnu_cxx::__numeric_traits::__max) + { + __err |= ios_base::failbit; + __n = __gnu_cxx::__numeric_traits::__max; + } + else + __n = short(__l); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(int& __n) + { + sentry __cerb(*this, false); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + long __l; + const __num_get_type& __ng = __check_facet(this->_M_num_get); + __ng.get(*this, 0, *this, __err, __l); + if (__l < __gnu_cxx::__numeric_traits::__min) + { + __err |= ios_base::failbit; + __n = __gnu_cxx::__numeric_traits::__min; + } + else if (__l > __gnu_cxx::__numeric_traits::__max) + { + __err |= ios_base::failbit; + __n = __gnu_cxx::__numeric_traits::__max; + } + else + __n = int(__l); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(__streambuf_type* __sbout) + { + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, false); + if (__cerb && __sbout) + { + try + { + bool __ineof; + if (!__copy_streambufs_eof(this->rdbuf(), __sbout, __ineof)) + __err |= ios_base::failbit; + if (__ineof) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::failbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::failbit); } + } + else if (!__sbout) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + template + typename basic_istream<_CharT, _Traits>::int_type + basic_istream<_CharT, _Traits>:: + get(void) + { + const int_type __eof = traits_type::eof(); + int_type __c = __eof; + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + __c = this->rdbuf()->sbumpc(); + if (!traits_type::eq_int_type(__c, __eof)) + _M_gcount = 1; + else + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return __c; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + get(char_type& __c) + { + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __cb = this->rdbuf()->sbumpc(); + if (!traits_type::eq_int_type(__cb, traits_type::eof())) + { + _M_gcount = 1; + __c = traits_type::to_char_type(__cb); + } + else + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + get(char_type* __s, streamsize __n, char_type __delim) + { + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __idelim = traits_type::to_int_type(__delim); + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sgetc(); + while (_M_gcount + 1 < __n + && !traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __idelim)) + { + *__s++ = traits_type::to_char_type(__c); + ++_M_gcount; + __c = __sb->snextc(); + } + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + if (__n > 0) + *__s = char_type(); + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + get(__streambuf_type& __sb, char_type __delim) + { + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __idelim = traits_type::to_int_type(__delim); + const int_type __eof = traits_type::eof(); + __streambuf_type* __this_sb = this->rdbuf(); + int_type __c = __this_sb->sgetc(); + char_type __c2 = traits_type::to_char_type(__c); + while (!traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __idelim) + && !traits_type::eq_int_type(__sb.sputc(__c2), __eof)) + { + ++_M_gcount; + __c = __this_sb->snextc(); + __c2 = traits_type::to_char_type(__c); + } + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + getline(char_type* __s, streamsize __n, char_type __delim) + { + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __idelim = traits_type::to_int_type(__delim); + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sgetc(); + while (_M_gcount + 1 < __n + && !traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __idelim)) + { + *__s++ = traits_type::to_char_type(__c); + __c = __sb->snextc(); + ++_M_gcount; + } + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + else + { + if (traits_type::eq_int_type(__c, __idelim)) + { + __sb->sbumpc(); + ++_M_gcount; + } + else + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + if (__n > 0) + *__s = char_type(); + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + ignore(void) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + if (traits_type::eq_int_type(__sb->sbumpc(), __eof)) + __err |= ios_base::eofbit; + else + _M_gcount = 1; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + ignore(streamsize __n) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb && __n > 0) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sgetc(); + bool __large_ignore = false; + while (true) + { + while (_M_gcount < __n + && !traits_type::eq_int_type(__c, __eof)) + { + ++_M_gcount; + __c = __sb->snextc(); + } + if (__n == __gnu_cxx::__numeric_traits::__max + && !traits_type::eq_int_type(__c, __eof)) + { + _M_gcount = + __gnu_cxx::__numeric_traits::__min; + __large_ignore = true; + } + else + break; + } + if (__large_ignore) + _M_gcount = __gnu_cxx::__numeric_traits::__max; + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + ignore(streamsize __n, int_type __delim) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb && __n > 0) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sgetc(); + bool __large_ignore = false; + while (true) + { + while (_M_gcount < __n + && !traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __delim)) + { + ++_M_gcount; + __c = __sb->snextc(); + } + if (__n == __gnu_cxx::__numeric_traits::__max + && !traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __delim)) + { + _M_gcount = + __gnu_cxx::__numeric_traits::__min; + __large_ignore = true; + } + else + break; + } + if (__large_ignore) + _M_gcount = __gnu_cxx::__numeric_traits::__max; + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + else if (traits_type::eq_int_type(__c, __delim)) + { + if (_M_gcount + < __gnu_cxx::__numeric_traits::__max) + ++_M_gcount; + __sb->sbumpc(); + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + typename basic_istream<_CharT, _Traits>::int_type + basic_istream<_CharT, _Traits>:: + peek(void) + { + int_type __c = traits_type::eof(); + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + __c = this->rdbuf()->sgetc(); + if (traits_type::eq_int_type(__c, traits_type::eof())) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return __c; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + read(char_type* __s, streamsize __n) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + _M_gcount = this->rdbuf()->sgetn(__s, __n); + if (_M_gcount != __n) + __err |= (ios_base::eofbit | ios_base::failbit); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + streamsize + basic_istream<_CharT, _Traits>:: + readsome(char_type* __s, streamsize __n) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const streamsize __num = this->rdbuf()->in_avail(); + if (__num > 0) + _M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n)); + else if (__num == -1) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return _M_gcount; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + putback(char_type __c) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + if (!__sb + || traits_type::eq_int_type(__sb->sputbackc(__c), __eof)) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + unget(void) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + if (!__sb + || traits_type::eq_int_type(__sb->sungetc(), __eof)) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + int + basic_istream<_CharT, _Traits>:: + sync(void) + { + int __ret = -1; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + __streambuf_type* __sb = this->rdbuf(); + if (__sb) + { + if (__sb->pubsync() == -1) + __err |= ios_base::badbit; + else + __ret = 0; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return __ret; + } + template + typename basic_istream<_CharT, _Traits>::pos_type + basic_istream<_CharT, _Traits>:: + tellg(void) + { + pos_type __ret = pos_type(-1); + try + { + if (!this->fail()) + __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, + ios_base::in); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + return __ret; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + seekg(pos_type __pos) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + if (!this->fail()) + { + const pos_type __p = this->rdbuf()->pubseekpos(__pos, + ios_base::in); + if (__p == pos_type(off_type(-1))) + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + seekg(off_type __off, ios_base::seekdir __dir) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + if (!this->fail()) + { + const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, + ios_base::in); + if (__p == pos_type(off_type(-1))) + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef typename __istream_type::int_type __int_type; + typename __istream_type::sentry __cerb(__in, false); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const __int_type __cb = __in.rdbuf()->sbumpc(); + if (!_Traits::eq_int_type(__cb, _Traits::eof())) + __c = _Traits::to_char_type(__cb); + else + __err |= (ios_base::eofbit | ios_base::failbit); + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(ios_base::badbit); + throw; + } + catch(...) + { __in._M_setstate(ios_base::badbit); } + if (__err) + __in.setstate(__err); + } + return __in; + } + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef typename _Traits::int_type int_type; + typedef _CharT char_type; + typedef ctype<_CharT> __ctype_type; + streamsize __extracted = 0; + ios_base::iostate __err = ios_base::goodbit; + typename __istream_type::sentry __cerb(__in, false); + if (__cerb) + { + try + { + streamsize __num = __in.width(); + if (__num <= 0) + __num = __gnu_cxx::__numeric_traits::__max; + const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); + const int_type __eof = _Traits::eof(); + __streambuf_type* __sb = __in.rdbuf(); + int_type __c = __sb->sgetc(); + while (__extracted < __num - 1 + && !_Traits::eq_int_type(__c, __eof) + && !__ct.is(ctype_base::space, + _Traits::to_char_type(__c))) + { + *__s++ = _Traits::to_char_type(__c); + ++__extracted; + __c = __sb->snextc(); + } + if (_Traits::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + *__s = char_type(); + __in.width(0); + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(ios_base::badbit); + throw; + } + catch(...) + { __in._M_setstate(ios_base::badbit); } + } + if (!__extracted) + __err |= ios_base::failbit; + if (__err) + __in.setstate(__err); + return __in; + } + template + basic_istream<_CharT, _Traits>& + ws(basic_istream<_CharT, _Traits>& __in) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef typename __istream_type::int_type __int_type; + typedef ctype<_CharT> __ctype_type; + const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); + const __int_type __eof = _Traits::eof(); + __streambuf_type* __sb = __in.rdbuf(); + __int_type __c = __sb->sgetc(); + while (!_Traits::eq_int_type(__c, __eof) + && __ct.is(ctype_base::space, _Traits::to_char_type(__c))) + __c = __sb->snextc(); + if (_Traits::eq_int_type(__c, __eof)) + __in.setstate(ios_base::eofbit); + return __in; + } + extern template class basic_istream; + extern template istream& ws(istream&); + extern template istream& operator>>(istream&, char&); + extern template istream& operator>>(istream&, char*); + extern template istream& operator>>(istream&, unsigned char&); + extern template istream& operator>>(istream&, signed char&); + extern template istream& operator>>(istream&, unsigned char*); + extern template istream& operator>>(istream&, signed char*); + extern template istream& istream::_M_extract(unsigned short&); + extern template istream& istream::_M_extract(unsigned int&); + extern template istream& istream::_M_extract(long&); + extern template istream& istream::_M_extract(unsigned long&); + extern template istream& istream::_M_extract(bool&); + extern template istream& istream::_M_extract(long long&); + extern template istream& istream::_M_extract(unsigned long long&); + extern template istream& istream::_M_extract(float&); + extern template istream& istream::_M_extract(double&); + extern template istream& istream::_M_extract(long double&); + extern template istream& istream::_M_extract(void*&); + extern template class basic_iostream; + extern template class basic_istream; + extern template wistream& ws(wistream&); + extern template wistream& operator>>(wistream&, wchar_t&); + extern template wistream& operator>>(wistream&, wchar_t*); + extern template wistream& wistream::_M_extract(unsigned short&); + extern template wistream& wistream::_M_extract(unsigned int&); + extern template wistream& wistream::_M_extract(long&); + extern template wistream& wistream::_M_extract(unsigned long&); + extern template wistream& wistream::_M_extract(bool&); + extern template wistream& wistream::_M_extract(long long&); + extern template wistream& wistream::_M_extract(unsigned long long&); + extern template wistream& wistream::_M_extract(float&); + extern template wistream& wistream::_M_extract(double&); + extern template wistream& wistream::_M_extract(long double&); + extern template wistream& wistream::_M_extract(void*&); + extern template class basic_iostream; +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template, typename _Dist = ptrdiff_t> + class istream_iterator + : public iterator + { + public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_istream<_CharT, _Traits> istream_type; + private: + istream_type* _M_stream; + _Tp _M_value; + bool _M_ok; + public: + istream_iterator() + : _M_stream(0), _M_value(), _M_ok(false) {} + istream_iterator(istream_type& __s) + : _M_stream(&__s) + { _M_read(); } + istream_iterator(const istream_iterator& __obj) + : _M_stream(__obj._M_stream), _M_value(__obj._M_value), + _M_ok(__obj._M_ok) + { } + const _Tp& + operator*() const + { + ; + return _M_value; + } + const _Tp* + operator->() const { return &(operator*()); } + istream_iterator& + operator++() + { + ; + _M_read(); + return *this; + } + istream_iterator + operator++(int) + { + ; + istream_iterator __tmp = *this; + _M_read(); + return __tmp; + } + bool + _M_equal(const istream_iterator& __x) const + { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); } + private: + void + _M_read() + { + _M_ok = (_M_stream && *_M_stream) ? true : false; + if (_M_ok) + { + *_M_stream >> _M_value; + _M_ok = *_M_stream ? true : false; + } + } + }; + template + inline bool + operator==(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, + const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) + { return __x._M_equal(__y); } + template + inline bool + operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, + const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) + { return !__x._M_equal(__y); } + template > + class ostream_iterator + : public iterator + { + public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_ostream<_CharT, _Traits> ostream_type; + private: + ostream_type* _M_stream; + const _CharT* _M_string; + public: + ostream_iterator(ostream_type& __s) : _M_stream(&__s), _M_string(0) {} + ostream_iterator(ostream_type& __s, const _CharT* __c) + : _M_stream(&__s), _M_string(__c) { } + ostream_iterator(const ostream_iterator& __obj) + : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { } + ostream_iterator& + operator=(const _Tp& __value) + { + ; + *_M_stream << __value; + if (_M_string) *_M_stream << _M_string; + return *this; + } + ostream_iterator& + operator*() + { return *this; } + ostream_iterator& + operator++() + { return *this; } + ostream_iterator& + operator++(int) + { return *this; } + }; +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + struct _List_node_base + { + _List_node_base* _M_next; + _List_node_base* _M_prev; + static void + swap(_List_node_base& __x, _List_node_base& __y) throw (); + void + _M_transfer(_List_node_base * const __first, + _List_node_base * const __last) throw (); + void + _M_reverse() throw (); + void + _M_hook(_List_node_base * const __position) throw (); + void + _M_unhook() throw (); + }; + template + struct _List_node : public _List_node_base + { + _Tp _M_data; + }; + template + struct _List_iterator + { + typedef _List_iterator<_Tp> _Self; + typedef _List_node<_Tp> _Node; + typedef ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + typedef _Tp value_type; + typedef _Tp* pointer; + typedef _Tp& reference; + _List_iterator() + : _M_node() { } + explicit + _List_iterator(_List_node_base* __x) + : _M_node(__x) { } + reference + operator*() const + { return static_cast<_Node*>(_M_node)->_M_data; } + pointer + operator->() const + { return &static_cast<_Node*>(_M_node)->_M_data; } + _Self& + operator++() + { + _M_node = _M_node->_M_next; + return *this; + } + _Self + operator++(int) + { + _Self __tmp = *this; + _M_node = _M_node->_M_next; + return __tmp; + } + _Self& + operator--() + { + _M_node = _M_node->_M_prev; + return *this; + } + _Self + operator--(int) + { + _Self __tmp = *this; + _M_node = _M_node->_M_prev; + return __tmp; + } + bool + operator==(const _Self& __x) const + { return _M_node == __x._M_node; } + bool + operator!=(const _Self& __x) const + { return _M_node != __x._M_node; } + _List_node_base* _M_node; + }; + template + struct _List_const_iterator + { + typedef _List_const_iterator<_Tp> _Self; + typedef const _List_node<_Tp> _Node; + typedef _List_iterator<_Tp> iterator; + typedef ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + typedef _Tp value_type; + typedef const _Tp* pointer; + typedef const _Tp& reference; + _List_const_iterator() + : _M_node() { } + explicit + _List_const_iterator(const _List_node_base* __x) + : _M_node(__x) { } + _List_const_iterator(const iterator& __x) + : _M_node(__x._M_node) { } + reference + operator*() const + { return static_cast<_Node*>(_M_node)->_M_data; } + pointer + operator->() const + { return &static_cast<_Node*>(_M_node)->_M_data; } + _Self& + operator++() + { + _M_node = _M_node->_M_next; + return *this; + } + _Self + operator++(int) + { + _Self __tmp = *this; + _M_node = _M_node->_M_next; + return __tmp; + } + _Self& + operator--() + { + _M_node = _M_node->_M_prev; + return *this; + } + _Self + operator--(int) + { + _Self __tmp = *this; + _M_node = _M_node->_M_prev; + return __tmp; + } + bool + operator==(const _Self& __x) const + { return _M_node == __x._M_node; } + bool + operator!=(const _Self& __x) const + { return _M_node != __x._M_node; } + const _List_node_base* _M_node; + }; + template + inline bool + operator==(const _List_iterator<_Val>& __x, + const _List_const_iterator<_Val>& __y) + { return __x._M_node == __y._M_node; } + template + inline bool + operator!=(const _List_iterator<_Val>& __x, + const _List_const_iterator<_Val>& __y) + { return __x._M_node != __y._M_node; } + template + class _List_base + { + public: + typedef typename _Alloc::template rebind<_List_node<_Tp> >::other + _Node_alloc_type; + typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; + struct _List_impl + : public _Node_alloc_type + { + _List_node_base _M_node; + _List_impl() + : _Node_alloc_type(), _M_node() + { } + _List_impl(const _Node_alloc_type& __a) + : _Node_alloc_type(__a), _M_node() + { } + }; + _List_impl _M_impl; + _List_node<_Tp>* + _M_get_node() + { return _M_impl._Node_alloc_type::allocate(1); } + void + _M_put_node(_List_node<_Tp>* __p) + { _M_impl._Node_alloc_type::deallocate(__p, 1); } + public: + typedef _Alloc allocator_type; + _Node_alloc_type& + _M_get_Node_allocator() + { return *static_cast<_Node_alloc_type*>(&this->_M_impl); } + const _Node_alloc_type& + _M_get_Node_allocator() const + { return *static_cast(&this->_M_impl); } + _Tp_alloc_type + _M_get_Tp_allocator() const + { return _Tp_alloc_type(_M_get_Node_allocator()); } + allocator_type + get_allocator() const + { return allocator_type(_M_get_Node_allocator()); } + _List_base() + : _M_impl() + { _M_init(); } + _List_base(const allocator_type& __a) + : _M_impl(__a) + { _M_init(); } + ~_List_base() + { _M_clear(); } + void + _M_clear(); + void + _M_init() + { + this->_M_impl._M_node._M_next = &this->_M_impl._M_node; + this->_M_impl._M_node._M_prev = &this->_M_impl._M_node; + } + }; + template > + class list : public _List_base<_Tp, _Alloc> + { + typedef typename _Alloc::value_type _Alloc_value_type; + + + typedef _List_base<_Tp, _Alloc> _Base; + typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; + public: + typedef _Tp value_type; + typedef typename _Tp_alloc_type::pointer pointer; + typedef typename _Tp_alloc_type::const_pointer const_pointer; + typedef typename _Tp_alloc_type::reference reference; + typedef typename _Tp_alloc_type::const_reference const_reference; + typedef _List_iterator<_Tp> iterator; + typedef _List_const_iterator<_Tp> const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Alloc allocator_type; + public: + typedef _List_node<_Tp> _Node; + using _Base::_M_impl; + using _Base::_M_put_node; + using _Base::_M_get_node; + using _Base::_M_get_Tp_allocator; + using _Base::_M_get_Node_allocator; + _Node* + _M_create_node(const value_type& __x) + { + _Node* __p = this->_M_get_node(); + try + { + _M_get_Tp_allocator().construct(&__p->_M_data, __x); + } + catch(...) + { + _M_put_node(__p); + throw; + } + return __p; + } + public: + list() + : _Base() { } + explicit + list(const allocator_type& __a) + : _Base(__a) { } + explicit + list(size_type __n, const value_type& __value = value_type(), + const allocator_type& __a = allocator_type()) + : _Base(__a) + { _M_fill_initialize(__n, __value); } + list(const list& __x) + : _Base(__x._M_get_Node_allocator()) + { _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); } + template + list(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_initialize_dispatch(__first, __last, _Integral()); + } + list& + operator=(const list& __x); + void + assign(size_type __n, const value_type& __val) + { _M_fill_assign(__n, __val); } + template + void + assign(_InputIterator __first, _InputIterator __last) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } + allocator_type + get_allocator() const + { return _Base::get_allocator(); } + iterator + begin() + { return iterator(this->_M_impl._M_node._M_next); } + const_iterator + begin() const + { return const_iterator(this->_M_impl._M_node._M_next); } + iterator + end() + { return iterator(&this->_M_impl._M_node); } + const_iterator + end() const + { return const_iterator(&this->_M_impl._M_node); } + reverse_iterator + rbegin() + { return reverse_iterator(end()); } + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(end()); } + reverse_iterator + rend() + { return reverse_iterator(begin()); } + const_reverse_iterator + rend() const + { return const_reverse_iterator(begin()); } + bool + empty() const + { return this->_M_impl._M_node._M_next == &this->_M_impl._M_node; } + size_type + size() const + { return std::distance(begin(), end()); } + size_type + max_size() const + { return _M_get_Node_allocator().max_size(); } + void + resize(size_type __new_size, value_type __x = value_type()); + reference + front() + { return *begin(); } + const_reference + front() const + { return *begin(); } + reference + back() + { + iterator __tmp = end(); + --__tmp; + return *__tmp; + } + const_reference + back() const + { + const_iterator __tmp = end(); + --__tmp; + return *__tmp; + } + void + push_front(const value_type& __x) + { this->_M_insert(begin(), __x); } + void + pop_front() + { this->_M_erase(begin()); } + void + push_back(const value_type& __x) + { this->_M_insert(end(), __x); } + void + pop_back() + { this->_M_erase(iterator(this->_M_impl._M_node._M_prev)); } + iterator + insert(iterator __position, const value_type& __x); + void + insert(iterator __position, size_type __n, const value_type& __x) + { + list __tmp(__n, __x, _M_get_Node_allocator()); + splice(__position, __tmp); + } + template + void + insert(iterator __position, _InputIterator __first, + _InputIterator __last) + { + list __tmp(__first, __last, _M_get_Node_allocator()); + splice(__position, __tmp); + } + iterator + erase(iterator __position); + iterator + erase(iterator __first, iterator __last) + { + while (__first != __last) + __first = erase(__first); + return __last; + } + void + swap(list& __x) + { + _List_node_base::swap(this->_M_impl._M_node, __x._M_impl._M_node); + std::__alloc_swap:: + _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator()); + } + void + clear() + { + _Base::_M_clear(); + _Base::_M_init(); + } + void + splice(iterator __position, list& __x) + { + if (!__x.empty()) + { + _M_check_equal_allocators(__x); + this->_M_transfer(__position, __x.begin(), __x.end()); + } + } + void + splice(iterator __position, list& __x, iterator __i) + { + iterator __j = __i; + ++__j; + if (__position == __i || __position == __j) + return; + if (this != &__x) + _M_check_equal_allocators(__x); + this->_M_transfer(__position, __i, __j); + } + void + splice(iterator __position, list& __x, iterator __first, + iterator __last) + { + if (__first != __last) + { + if (this != &__x) + _M_check_equal_allocators(__x); + this->_M_transfer(__position, __first, __last); + } + } + void + remove(const _Tp& __value); + template + void + remove_if(_Predicate); + void + unique(); + template + void + unique(_BinaryPredicate); + void + merge(list& __x); + template + void + merge(list&, _StrictWeakOrdering); + void + reverse() + { this->_M_impl._M_node._M_reverse(); } + void + sort(); + template + void + sort(_StrictWeakOrdering); + public: + template + void + _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) + { _M_fill_initialize(static_cast(__n), __x); } + template + void + _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { + for (; __first != __last; ++__first) + push_back(*__first); + } + void + _M_fill_initialize(size_type __n, const value_type& __x) + { + for (; __n > 0; --__n) + push_back(__x); + } + template + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } + template + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + __false_type); + void + _M_fill_assign(size_type __n, const value_type& __val); + void + _M_transfer(iterator __position, iterator __first, iterator __last) + { __position._M_node->_M_transfer(__first._M_node, __last._M_node); } + void + _M_insert(iterator __position, const value_type& __x) + { + _Node* __tmp = _M_create_node(__x); + __tmp->_M_hook(__position._M_node); + } + void + _M_erase(iterator __position) + { + __position._M_node->_M_unhook(); + _Node* __n = static_cast<_Node*>(__position._M_node); + _M_get_Tp_allocator().destroy(&__n->_M_data); + _M_put_node(__n); + } + void + _M_check_equal_allocators(list& __x) + { + if (std::__alloc_neq:: + _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator())) + __throw_runtime_error(("list::_M_check_equal_allocators")); + } + }; + template + inline bool + operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { + typedef typename list<_Tp, _Alloc>::const_iterator const_iterator; + const_iterator __end1 = __x.end(); + const_iterator __end2 = __y.end(); + const_iterator __i1 = __x.begin(); + const_iterator __i2 = __y.begin(); + while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2) + { + ++__i1; + ++__i2; + } + return __i1 == __end1 && __i2 == __end2; + } + template + inline bool + operator<(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return std::lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); } + template + inline bool + operator!=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return __y < __x; } + template + inline bool + operator<=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return !(__x < __y); } + template + inline void + swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y) + { __x.swap(__y); } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + void + _List_base<_Tp, _Alloc>:: + _M_clear() + { + typedef _List_node<_Tp> _Node; + _Node* __cur = static_cast<_Node*>(this->_M_impl._M_node._M_next); + while (__cur != &this->_M_impl._M_node) + { + _Node* __tmp = __cur; + __cur = static_cast<_Node*>(__cur->_M_next); + _M_get_Tp_allocator().destroy(&__tmp->_M_data); + _M_put_node(__tmp); + } + } + template + typename list<_Tp, _Alloc>::iterator + list<_Tp, _Alloc>:: + insert(iterator __position, const value_type& __x) + { + _Node* __tmp = _M_create_node(__x); + __tmp->_M_hook(__position._M_node); + return iterator(__tmp); + } + template + typename list<_Tp, _Alloc>::iterator + list<_Tp, _Alloc>:: + erase(iterator __position) + { + iterator __ret = iterator(__position._M_node->_M_next); + _M_erase(__position); + return __ret; + } + template + void + list<_Tp, _Alloc>:: + resize(size_type __new_size, value_type __x) + { + iterator __i = begin(); + size_type __len = 0; + for (; __i != end() && __len < __new_size; ++__i, ++__len) + ; + if (__len == __new_size) + erase(__i, end()); + else + insert(end(), __new_size - __len, __x); + } + template + list<_Tp, _Alloc>& + list<_Tp, _Alloc>:: + operator=(const list& __x) + { + if (this != &__x) + { + iterator __first1 = begin(); + iterator __last1 = end(); + const_iterator __first2 = __x.begin(); + const_iterator __last2 = __x.end(); + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, ++__first2) + *__first1 = *__first2; + if (__first2 == __last2) + erase(__first1, __last1); + else + insert(__last1, __first2, __last2); + } + return *this; + } + template + void + list<_Tp, _Alloc>:: + _M_fill_assign(size_type __n, const value_type& __val) + { + iterator __i = begin(); + for (; __i != end() && __n > 0; ++__i, --__n) + *__i = __val; + if (__n > 0) + insert(end(), __n, __val); + else + erase(__i, end()); + } + template + template + void + list<_Tp, _Alloc>:: + _M_assign_dispatch(_InputIterator __first2, _InputIterator __last2, + __false_type) + { + iterator __first1 = begin(); + iterator __last1 = end(); + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, ++__first2) + *__first1 = *__first2; + if (__first2 == __last2) + erase(__first1, __last1); + else + insert(__last1, __first2, __last2); + } + template + void + list<_Tp, _Alloc>:: + remove(const value_type& __value) + { + iterator __first = begin(); + iterator __last = end(); + iterator __extra = __last; + while (__first != __last) + { + iterator __next = __first; + ++__next; + if (*__first == __value) + { + if (&*__first != &__value) + _M_erase(__first); + else + __extra = __first; + } + __first = __next; + } + if (__extra != __last) + _M_erase(__extra); + } + template + void + list<_Tp, _Alloc>:: + unique() + { + iterator __first = begin(); + iterator __last = end(); + if (__first == __last) + return; + iterator __next = __first; + while (++__next != __last) + { + if (*__first == *__next) + _M_erase(__next); + else + __first = __next; + __next = __first; + } + } + template + void + list<_Tp, _Alloc>:: + merge(list& __x) + { + if (this != &__x) + { + _M_check_equal_allocators(__x); + iterator __first1 = begin(); + iterator __last1 = end(); + iterator __first2 = __x.begin(); + iterator __last2 = __x.end(); + while (__first1 != __last1 && __first2 != __last2) + if (*__first2 < *__first1) + { + iterator __next = __first2; + _M_transfer(__first1, __first2, ++__next); + __first2 = __next; + } + else + ++__first1; + if (__first2 != __last2) + _M_transfer(__last1, __first2, __last2); + } + } + template + template + void + list<_Tp, _Alloc>:: + merge(list& __x, _StrictWeakOrdering __comp) + { + if (this != &__x) + { + _M_check_equal_allocators(__x); + iterator __first1 = begin(); + iterator __last1 = end(); + iterator __first2 = __x.begin(); + iterator __last2 = __x.end(); + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first2, *__first1)) + { + iterator __next = __first2; + _M_transfer(__first1, __first2, ++__next); + __first2 = __next; + } + else + ++__first1; + if (__first2 != __last2) + _M_transfer(__last1, __first2, __last2); + } + } + template + void + list<_Tp, _Alloc>:: + sort() + { + if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node + && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node) + { + list __carry; + list __tmp[64]; + list * __fill = &__tmp[0]; + list * __counter; + do + { + __carry.splice(__carry.begin(), *this, begin()); + for(__counter = &__tmp[0]; + __counter != __fill && !__counter->empty(); + ++__counter) + { + __counter->merge(__carry); + __carry.swap(*__counter); + } + __carry.swap(*__counter); + if (__counter == __fill) + ++__fill; + } + while ( !empty() ); + for (__counter = &__tmp[1]; __counter != __fill; ++__counter) + __counter->merge(*(__counter - 1)); + swap( *(__fill - 1) ); + } + } + template + template + void + list<_Tp, _Alloc>:: + remove_if(_Predicate __pred) + { + iterator __first = begin(); + iterator __last = end(); + while (__first != __last) + { + iterator __next = __first; + ++__next; + if (__pred(*__first)) + _M_erase(__first); + __first = __next; + } + } + template + template + void + list<_Tp, _Alloc>:: + unique(_BinaryPredicate __binary_pred) + { + iterator __first = begin(); + iterator __last = end(); + if (__first == __last) + return; + iterator __next = __first; + while (++__next != __last) + { + if (__binary_pred(*__first, *__next)) + _M_erase(__next); + else + __first = __next; + __next = __first; + } + } + template + template + void + list<_Tp, _Alloc>:: + sort(_StrictWeakOrdering __comp) + { + if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node + && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node) + { + list __carry; + list __tmp[64]; + list * __fill = &__tmp[0]; + list * __counter; + do + { + __carry.splice(__carry.begin(), *this, begin()); + for(__counter = &__tmp[0]; + __counter != __fill && !__counter->empty(); + ++__counter) + { + __counter->merge(__carry, __comp); + __carry.swap(*__counter); + } + __carry.swap(*__counter); + if (__counter == __fill) + ++__fill; + } + while ( !empty() ); + for (__counter = &__tmp[1]; __counter != __fill; ++__counter) + __counter->merge(*(__counter - 1), __comp); + swap(*(__fill - 1)); + } + } +} +typedef QtValidLicenseForCoreModule QtCoreModule; +template class QVector; +template class QSet; +struct QListData { + struct Data { + QBasicAtomicInt ref; + int alloc, begin, end; + uint sharable : 1; + void *array[1]; + }; + enum { DataHeaderSize = sizeof(Data) - sizeof(void *) }; + Data *detach(); + Data *detach2(); + Data *detach3(); + void realloc(int alloc); + static Data shared_null; + Data *d; + void **erase(void **xi); + void **append(); + void **append(const QListData &l); + void **append2(const QListData &l); + void **prepend(); + void **insert(int i); + void remove(int i); + void remove(int i, int n); + void move(int from, int to); + inline int size() const { return d->end - d->begin; } + inline bool isEmpty() const { return d->end == d->begin; } + inline void **at(int i) const { return d->array + d->begin + i; } + inline void **begin() const { return d->array + d->begin; } + inline void **end() const { return d->array + d->end; } +}; +template +class QList +{ + struct Node { void *v; + inline T &t() + { return *reinterpret_cast(QTypeInfo::isLarge || QTypeInfo::isStatic + ? v : this); } + }; + union { QListData p; QListData::Data *d; }; +public: + inline QList() : d(&QListData::shared_null) { d->ref.ref(); } + inline QList(const QList &l) : d(l.d) { d->ref.ref(); if (!d->sharable) detach_helper(); } + ~QList(); + QList &operator=(const QList &l); + bool operator==(const QList &l) const; + inline bool operator!=(const QList &l) const { return !(*this == l); } + inline int size() const { return p.size(); } + inline void detach() { if (d->ref != 1) detach_helper(); } + inline void detachShared() + { + if (d->ref != 1 && this->d != &QListData::shared_null) + detach_helper(); + } + inline bool isDetached() const { return d->ref == 1; } + inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; } + inline bool isEmpty() const { return p.isEmpty(); } + void clear(); + const T &at(int i) const; + const T &operator[](int i) const; + T &operator[](int i); + void append(const T &t); + void append(const QList &t); + void prepend(const T &t); + void insert(int i, const T &t); + void replace(int i, const T &t); + void removeAt(int i); + int removeAll(const T &t); + bool removeOne(const T &t); + T takeAt(int i); + T takeFirst(); + T takeLast(); + void move(int from, int to); + void swap(int i, int j); + int indexOf(const T &t, int from = 0) const; + int lastIndexOf(const T &t, int from = -1) const; + QBool contains(const T &t) const; + int count(const T &t) const; + class const_iterator; + class iterator { + public: + Node *i; + typedef std::random_access_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + typedef T value_type; + typedef T *pointer; + typedef T &reference; + inline iterator() : i(0) {} + inline iterator(Node *n) : i(n) {} + inline iterator(const iterator &o): i(o.i){} + inline T &operator*() const { return i->t(); } + inline T *operator->() const { return &i->t(); } + inline T &operator[](int j) const { return i[j].t(); } + inline bool operator==(const iterator &o) const { return i == o.i; } + inline bool operator!=(const iterator &o) const { return i != o.i; } + inline bool operator<(const iterator& other) const { return i < other.i; } + inline bool operator<=(const iterator& other) const { return i <= other.i; } + inline bool operator>(const iterator& other) const { return i > other.i; } + inline bool operator>=(const iterator& other) const { return i >= other.i; } + inline bool operator==(const const_iterator &o) const + { return i == o.i; } + inline bool operator!=(const const_iterator &o) const + { return i != o.i; } + inline bool operator<(const const_iterator& other) const + { return i < other.i; } + inline bool operator<=(const const_iterator& other) const + { return i <= other.i; } + inline bool operator>(const const_iterator& other) const + { return i > other.i; } + inline bool operator>=(const const_iterator& other) const + { return i >= other.i; } + inline iterator &operator++() { ++i; return *this; } + inline iterator operator++(int) { Node *n = i; ++i; return n; } + inline iterator &operator--() { i--; return *this; } + inline iterator operator--(int) { Node *n = i; i--; return n; } + inline iterator &operator+=(int j) { i+=j; return *this; } + inline iterator &operator-=(int j) { i-=j; return *this; } + inline iterator operator+(int j) const { return iterator(i+j); } + inline iterator operator-(int j) const { return iterator(i-j); } + inline int operator-(iterator j) const { return int(i - j.i); } + }; + friend class iterator; + class const_iterator { + public: + Node *i; + typedef std::random_access_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + typedef T value_type; + typedef const T *pointer; + typedef const T &reference; + inline const_iterator() : i(0) {} + inline const_iterator(Node *n) : i(n) {} + inline const_iterator(const const_iterator &o): i(o.i) {} + inline const_iterator(const iterator &o): i(o.i) {} + inline const T &operator*() const { return i->t(); } + inline const T *operator->() const { return &i->t(); } + inline const T &operator[](int j) const { return i[j].t(); } + inline bool operator==(const const_iterator &o) const { return i == o.i; } + inline bool operator!=(const const_iterator &o) const { return i != o.i; } + inline bool operator<(const const_iterator& other) const { return i < other.i; } + inline bool operator<=(const const_iterator& other) const { return i <= other.i; } + inline bool operator>(const const_iterator& other) const { return i > other.i; } + inline bool operator>=(const const_iterator& other) const { return i >= other.i; } + inline const_iterator &operator++() { ++i; return *this; } + inline const_iterator operator++(int) { Node *n = i; ++i; return n; } + inline const_iterator &operator--() { i--; return *this; } + inline const_iterator operator--(int) { Node *n = i; i--; return n; } + inline const_iterator &operator+=(int j) { i+=j; return *this; } + inline const_iterator &operator-=(int j) { i-=j; return *this; } + inline const_iterator operator+(int j) const { return const_iterator(i+j); } + inline const_iterator operator-(int j) const { return const_iterator(i-j); } + inline int operator-(const_iterator j) const { return i - j.i; } + }; + friend class const_iterator; + inline iterator begin() { detach(); return reinterpret_cast(p.begin()); } + inline const_iterator begin() const { return reinterpret_cast(p.begin()); } + inline const_iterator constBegin() const { return reinterpret_cast(p.begin()); } + inline iterator end() { detach(); return reinterpret_cast(p.end()); } + inline const_iterator end() const { return reinterpret_cast(p.end()); } + inline const_iterator constEnd() const { return reinterpret_cast(p.end()); } + iterator insert(iterator before, const T &t); + iterator erase(iterator pos); + iterator erase(iterator first, iterator last); + typedef iterator Iterator; + typedef const_iterator ConstIterator; + inline int count() const { return p.size(); } + inline int length() const { return p.size(); } + inline T& first() { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qlist.h",263) : qt_noop()); return *begin(); } + inline const T& first() const { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qlist.h",264) : qt_noop()); return *begin(); } + T& last() { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qlist.h",265) : qt_noop()); return *(--end()); } + const T& last() const { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qlist.h",266) : qt_noop()); return *(--end()); } + inline void removeFirst() { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qlist.h",267) : qt_noop()); erase(begin()); } + inline void removeLast() { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qlist.h",268) : qt_noop()); erase(--end()); } + inline bool startsWith(const T &t) const { return !isEmpty() && first() == t; } + inline bool endsWith(const T &t) const { return !isEmpty() && last() == t; } + QList mid(int pos, int length = -1) const; + T value(int i) const; + T value(int i, const T &defaultValue) const; + inline void push_back(const T &t) { append(t); } + inline void push_front(const T &t) { prepend(t); } + inline T& front() { return first(); } + inline const T& front() const { return first(); } + inline T& back() { return last(); } + inline const T& back() const { return last(); } + inline void pop_front() { removeFirst(); } + inline void pop_back() { removeLast(); } + inline bool empty() const { return isEmpty(); } + typedef int size_type; + typedef T value_type; + typedef value_type *pointer; + typedef const value_type *const_pointer; + typedef value_type &reference; + typedef const value_type &const_reference; + typedef ptrdiff_t difference_type; + QList &operator+=(const QList &l); + inline QList operator+(const QList &l) const + { QList n = *this; n += l; return n; } + inline QList &operator+=(const T &t) + { append(t); return *this; } + inline QList &operator<< (const T &t) + { append(t); return *this; } + inline QList &operator<<(const QList &l) + { *this += l; return *this; } + QVector toVector() const; + QSet toSet() const; + static QList fromVector(const QVector &vector); + static QList fromSet(const QSet &set); + static inline QList fromStdList(const std::list &list) + { QList tmp; qCopy(list.begin(), list.end(), std::back_inserter(tmp)); return tmp; } + inline std::list toStdList() const + { std::list tmp; qCopy(constBegin(), constEnd(), std::back_inserter(tmp)); return tmp; } +private: + void detach_helper(); + void free(QListData::Data *d); + void node_construct(Node *n, const T &t); + void node_destruct(Node *n); + void node_copy(Node *from, Node *to, Node *src); + void node_destruct(Node *from, Node *to); +}; +template +inline void QList::node_construct(Node *n, const T &t) +{ + if (QTypeInfo::isLarge || QTypeInfo::isStatic) n->v = new T(t); + else if (QTypeInfo::isComplex) new (n) T(t); + else *reinterpret_cast(n) = t; +} +template +inline void QList::node_destruct(Node *n) +{ + if (QTypeInfo::isLarge || QTypeInfo::isStatic) delete reinterpret_cast(n->v); + else if (QTypeInfo::isComplex) reinterpret_cast(n)->~T(); +} +template +inline void QList::node_copy(Node *from, Node *to, Node *src) +{ + Node *current = from; + if (QTypeInfo::isLarge || QTypeInfo::isStatic) { + try { + while(current != to) { + current->v = new T(*reinterpret_cast(src->v)); + ++current; + ++src; + } + } catch (...) { + while (current-- != from) + delete reinterpret_cast(current->v); + throw; + } + } else if (QTypeInfo::isComplex) { + try { + while(current != to) { + new (current) T(*reinterpret_cast(src)); + ++current; + ++src; + } + } catch (...) { + while (current-- != from) + (reinterpret_cast(current))->~T(); + throw; + } + } else { + if (src != from && to - from > 0) + memcpy(from, src, (to - from) * sizeof(Node *)); + } +} +template +inline void QList::node_destruct(Node *from, Node *to) +{ + if (QTypeInfo::isLarge || QTypeInfo::isStatic) + while(from != to) --to, delete reinterpret_cast(to->v); + else if (QTypeInfo::isComplex) + while (from != to) --to, reinterpret_cast(to)->~T(); +} +template +inline QList &QList::operator=(const QList &l) +{ + if (d != l.d) { + l.d->ref.ref(); + if (!d->ref.deref()) + free(d); + d = l.d; + if (!d->sharable) + detach_helper(); + } + return *this; +} +template +inline typename QList::iterator QList::insert(iterator before, const T &t) +{ + int iBefore = int(before.i - reinterpret_cast(p.begin())); + Node *n = reinterpret_cast(p.insert(iBefore)); + try { + node_construct(n, t); + } catch (...) { + p.remove(iBefore); + throw; + } + return n; +} +template +inline typename QList::iterator QList::erase(iterator it) +{ node_destruct(it.i); + return reinterpret_cast(p.erase(reinterpret_cast(it.i))); } +template +inline const T &QList::at(int i) const +{ ((!(i >= 0 && i < p.size())) ? qt_assert_x("QList::at", "index out of range","/usr/include/qt4/QtCore/qlist.h",439) : qt_noop()); + return reinterpret_cast(p.at(i))->t(); } +template +inline const T &QList::operator[](int i) const +{ ((!(i >= 0 && i < p.size())) ? qt_assert_x("QList::operator[]", "index out of range","/usr/include/qt4/QtCore/qlist.h",443) : qt_noop()); + return reinterpret_cast(p.at(i))->t(); } +template +inline T &QList::operator[](int i) +{ ((!(i >= 0 && i < p.size())) ? qt_assert_x("QList::operator[]", "index out of range","/usr/include/qt4/QtCore/qlist.h",447) : qt_noop()); + detach(); return reinterpret_cast(p.at(i))->t(); } +template +inline void QList::removeAt(int i) +{ if(i >= 0 && i < p.size()) { detach(); + node_destruct(reinterpret_cast(p.at(i))); p.remove(i); } } +template +inline T QList::takeAt(int i) +{ ((!(i >= 0 && i < p.size())) ? qt_assert_x("QList::take", "index out of range","/usr/include/qt4/QtCore/qlist.h",455) : qt_noop()); + detach(); Node *n = reinterpret_cast(p.at(i)); T t = n->t(); node_destruct(n); + p.remove(i); return t; } +template +inline T QList::takeFirst() +{ T t = first(); removeFirst(); return t; } +template +inline T QList::takeLast() +{ T t = last(); removeLast(); return t; } +template + void QList::append(const T &t) +{ + detach(); + if (QTypeInfo::isLarge || QTypeInfo::isStatic) { + Node *n = reinterpret_cast(p.append()); + try { + node_construct(n, t); + } catch (...) { + --d->end; + throw; + } + } else { + const T cpy(t); + Node *n = reinterpret_cast(p.append()); + try { + node_construct(n, cpy); + } catch (...) { + --d->end; + throw; + } + } +} +template +inline void QList::prepend(const T &t) +{ + detach(); + if (QTypeInfo::isLarge || QTypeInfo::isStatic) { + Node *n = reinterpret_cast(p.prepend()); + try { + node_construct(n, t); + } catch (...) { + ++d->begin; + throw; + } + } else { + const T cpy(t); + Node *n = reinterpret_cast(p.prepend()); + try { + node_construct(n, cpy); + } catch (...) { + ++d->begin; + throw; + } + } +} +template +inline void QList::insert(int i, const T &t) +{ + detach(); + if (QTypeInfo::isLarge || QTypeInfo::isStatic) { + Node *n = reinterpret_cast(p.insert(i)); + try { + node_construct(n, t); + } catch (...) { + p.remove(i); + throw; + } + } else { + const T cpy(t); + Node *n = reinterpret_cast(p.insert(i)); + try { + node_construct(n, cpy); + } catch (...) { + p.remove(i); + throw; + } + } +} +template +inline void QList::replace(int i, const T &t) +{ + ((!(i >= 0 && i < p.size())) ? qt_assert_x("QList::replace", "index out of range","/usr/include/qt4/QtCore/qlist.h",540) : qt_noop()); + detach(); + if (QTypeInfo::isLarge || QTypeInfo::isStatic) { + reinterpret_cast(p.at(i))->t() = t; + } else { + const T cpy(t); + reinterpret_cast(p.at(i))->t() = cpy; + } +} +template +inline void QList::swap(int i, int j) +{ + ((!(i >= 0 && i < p.size() && j >= 0 && j < p.size())) ? qt_assert_x("QList::swap", "index out of range", + "/usr/include/qt4/QtCore/qlist.h" + , + 554 + ) : qt_noop()) + ; + detach(); + void *t = d->array[d->begin + i]; + d->array[d->begin + i] = d->array[d->begin + j]; + d->array[d->begin + j] = t; +} +template +inline void QList::move(int from, int to) +{ + ((!(from >= 0 && from < p.size() && to >= 0 && to < p.size())) ? qt_assert_x("QList::move", "index out of range", + "/usr/include/qt4/QtCore/qlist.h" + , + 565 + ) : qt_noop()) + ; + detach(); + p.move(from, to); +} +template + QList QList::mid(int pos, int alength) const +{ + if (alength < 0) + alength = size() - pos; + if (pos == 0 && alength == size()) + return *this; + QList cpy; + if (pos + alength > size()) + alength = size() - pos; + for (int i = pos; i < pos + alength; ++i) + cpy += at(i); + return cpy; +} +template + T QList::value(int i) const +{ + if (i < 0 || i >= p.size()) { + return T(); + } + return reinterpret_cast(p.at(i))->t(); +} +template + T QList::value(int i, const T& defaultValue) const +{ + return ((i < 0 || i >= p.size()) ? defaultValue : reinterpret_cast(p.at(i))->t()); +} +template + void QList::detach_helper() +{ + Node *n = reinterpret_cast(p.begin()); + QListData::Data *x = p.detach3(); + try { + node_copy(reinterpret_cast(p.begin()), reinterpret_cast(p.end()), n); + } catch (...) { + qFree(d); + d = x; + throw; + } + if (!x->ref.deref()) + free(x); +} +template + QList::~QList() +{ + if (d && !d->ref.deref()) + free(d); +} +template + bool QList::operator==(const QList &l) const +{ + if (p.size() != l.p.size()) + return false; + if (d == l.d) + return true; + Node *i = reinterpret_cast(p.end()); + Node *b = reinterpret_cast(p.begin()); + Node *li = reinterpret_cast(l.p.end()); + while (i != b) { + --i; --li; + if (!(i->t() == li->t())) + return false; + } + return true; +} +template + void QList::free(QListData::Data *data) +{ + node_destruct(reinterpret_cast(data->array + data->begin), + reinterpret_cast(data->array + data->end)); + if (data->ref == 0) + qFree(data); +} +template + void QList::clear() +{ + *this = QList(); +} +template + int QList::removeAll(const T &_t) +{ + detachShared(); + const T t = _t; + int removedCount=0, i=0; + Node *n; + while (i < p.size()) + if ((n = reinterpret_cast(p.at(i)))->t() == t) { + node_destruct(n); + p.remove(i); + ++removedCount; + } else { + ++i; + } + return removedCount; +} +template + bool QList::removeOne(const T &_t) +{ + detachShared(); + int index = indexOf(_t); + if (index != -1) { + removeAt(index); + return true; + } + return false; +} +template + typename QList::iterator QList::erase(typename QList::iterator afirst, + typename QList::iterator alast) +{ + for (Node *n = afirst.i; n < alast.i; ++n) + node_destruct(n); + int idx = afirst - begin(); + p.remove(idx, alast - afirst); + return begin() + idx; +} +template + QList &QList::operator+=(const QList &l) +{ + detach(); + Node *n = reinterpret_cast(p.append2(l.p)); + try{ + node_copy(n, reinterpret_cast(p.end()), reinterpret_cast(l.p.begin())); + } catch (...) { + d->end -= int(reinterpret_cast(p.end()) - n); + throw; + } + return *this; +} +template +inline void QList::append(const QList &t) +{ + *this += t; +} +template + int QList::indexOf(const T &t, int from) const +{ + if (from < 0) + from = qMax(from + p.size(), 0); + if (from < p.size()) { + Node *n = reinterpret_cast(p.at(from -1)); + Node *e = reinterpret_cast(p.end()); + while (++n != e) + if (n->t() == t) + return int(n - reinterpret_cast(p.begin())); + } + return -1; +} +template + int QList::lastIndexOf(const T &t, int from) const +{ + if (from < 0) + from += p.size(); + else if (from >= p.size()) + from = p.size()-1; + if (from >= 0) { + Node *b = reinterpret_cast(p.begin()); + Node *n = reinterpret_cast(p.at(from + 1)); + while (n-- != b) { + if (n->t() == t) + return n - b; + } + } + return -1; +} +template + QBool QList::contains(const T &t) const +{ + Node *b = reinterpret_cast(p.begin()); + Node *i = reinterpret_cast(p.end()); + while (i-- != b) + if (i->t() == t) + return QBool(true); + return QBool(false); +} +template + int QList::count(const T &t) const +{ + int c = 0; + Node *b = reinterpret_cast(p.begin()); + Node *i = reinterpret_cast(p.end()); + while (i-- != b) + if (i->t() == t) + ++c; + return c; +} +template class QListIterator { typedef typename QList::const_iterator const_iterator; QList c; const_iterator i; public: inline QListIterator(const QList &container) : c(container), i(c.constBegin()) {} inline QListIterator &operator=(const QList &container) { c = container; i = c.constBegin(); return *this; } inline void toFront() { i = c.constBegin(); } inline void toBack() { i = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline const T &next() { return *i++; } inline const T &peekNext() const { return *i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline const T &previous() { return *--i; } inline const T &peekPrevious() const { const_iterator p = i; return *--p; } inline bool findNext(const T &t) { while (i != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(--i) == t) return true; return false; } }; +template class QMutableListIterator { typedef typename QList::iterator iterator; typedef typename QList::const_iterator const_iterator; QList *c; iterator i, n; inline bool item_exists() const { return const_iterator(n) != c->constEnd(); } public: inline QMutableListIterator(QList &container) : c(&container) { c->setSharable(false); i = c->begin(); n = c->end(); } inline ~QMutableListIterator() { c->setSharable(true); } inline QMutableListIterator &operator=(QList &container) { c->setSharable(true); c = &container; c->setSharable(false); i = c->begin(); n = c->end(); return *this; } inline void toFront() { i = c->begin(); n = c->end(); } inline void toBack() { i = c->end(); n = i; } inline bool hasNext() const { return c->constEnd() != const_iterator(i); } inline T &next() { n = i++; return *n; } inline T &peekNext() const { return *i; } inline bool hasPrevious() const { return c->constBegin() != const_iterator(i); } inline T &previous() { n = --i; return *n; } inline T &peekPrevious() const { iterator p = i; return *--p; } inline void remove() { if (c->constEnd() != const_iterator(n)) { i = c->erase(n); n = c->end(); } } inline void setValue(const T &t) const { if (c->constEnd() != const_iterator(n)) *n = t; } inline T &value() { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qlist.h",778) : qt_noop()); return *n; } inline const T &value() const { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qlist.h",778) : qt_noop()); return *n; } inline void insert(const T &t) { n = i = c->insert(i, t); ++i; } inline bool findNext(const T &t) { while (c->constEnd() != const_iterator(n = i)) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (c->constBegin() != const_iterator(i)) if (*(n = --i) == t) return true; n = c->end(); return false; } }; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QEvent; +class QTimerEvent; +class QChildEvent; +struct QMetaObject; +class QVariant; +class QObjectPrivate; +class QObject; +class QThread; +class QWidget; +class QRegExp; +class QObjectUserData; +typedef QList QObjectList; +template inline T qFindChild(const QObject *, const QString & = QString()); +template inline QList qFindChildren(const QObject *, const QString & = QString()); +template inline QList qFindChildren(const QObject *, const QRegExp &); +class +QObjectData { +public: + virtual ~QObjectData() = 0; + QObject *q_ptr; + QObject *parent; + QObjectList children; + uint isWidget : 1; + uint pendTimer : 1; + uint blockSig : 1; + uint wasDeleted : 1; + uint ownObjectName : 1; + uint sendChildEvents : 1; + uint receiveChildEvents : 1; + uint inEventHandler : 1; + uint inThreadChangeEvent : 1; + uint hasGuards : 1; + uint unused : 22; + int postedEvents; + QMetaObject *metaObject; +}; +class QObject +{ + public: template inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: + + inline QObjectPrivate* d_func() { return reinterpret_cast(qGetPtrHelper(d_ptr)); } inline const QObjectPrivate* d_func() const { return reinterpret_cast(qGetPtrHelper(d_ptr)); } friend class QObjectPrivate; +public: + explicit QObject(QObject *parent=0); + virtual ~QObject(); + virtual bool event(QEvent *); + virtual bool eventFilter(QObject *, QEvent *); + QString objectName() const; + void setObjectName(const QString &name); + inline bool isWidgetType() const { return d_ptr->isWidget; } + inline bool signalsBlocked() const { return d_ptr->blockSig; } + bool blockSignals(bool b); + QThread *thread() const; + void moveToThread(QThread *thread); + int startTimer(int interval); + void killTimer(int id); + template + inline T findChild(const QString &aName = QString()) const + { return qFindChild(this, aName); } + template + inline QList findChildren(const QString &aName = QString()) const + { return qFindChildren(this, aName); } + template + inline QList findChildren(const QRegExp &re) const + { return qFindChildren(this, re); } + inline const QObjectList &children() const { return d_ptr->children; } + void setParent(QObject *); + void installEventFilter(QObject *); + void removeEventFilter(QObject *); + static bool connect(const QObject *sender, const char *signal, + const QObject *receiver, const char *member, Qt::ConnectionType = + Qt::AutoConnection + ); + inline bool connect(const QObject *sender, const char *signal, + const char *member, Qt::ConnectionType type = + Qt::AutoConnection + ) const; + static bool disconnect(const QObject *sender, const char *signal, + const QObject *receiver, const char *member); + inline bool disconnect(const char *signal = 0, + const QObject *receiver = 0, const char *member = 0) + { return disconnect(this, signal, receiver, member); } + inline bool disconnect(const QObject *receiver, const char *member = 0) + { return disconnect(this, 0, receiver, member); } + void dumpObjectTree(); + void dumpObjectInfo(); + bool setProperty(const char *name, const QVariant &value); + QVariant property(const char *name) const; + QList dynamicPropertyNames() const; + static uint registerUserData(); + void setUserData(uint id, QObjectUserData* data); + QObjectUserData* userData(uint id) const; +public: + void destroyed(QObject * = 0); +public: + inline QObject *parent() const { return d_ptr->parent; } + inline bool inherits(const char *classname) const + { return const_cast(this)->qt_metacast(classname) != 0; } +public : + void deleteLater(); +public: + QObject *sender() const; + int receivers(const char* signal) const; + virtual void timerEvent(QTimerEvent *); + virtual void childEvent(QChildEvent *); + virtual void customEvent(QEvent *); + virtual void connectNotify(const char *signal); + virtual void disconnectNotify(const char *signal); +public: + QObject(QObjectPrivate &dd, QObject *parent = 0); +public: + QScopedPointer d_ptr; + static const QMetaObject staticQtMetaObject; + friend struct QMetaObject; + friend class QApplication; + friend class QApplicationPrivate; + friend class QCoreApplication; + friend class QCoreApplicationPrivate; + friend class QWidget; + friend class QThreadData; +private: + QObject(const QObject &); QObject &operator=(const QObject &); + +}; +inline bool QObject::connect(const QObject *asender, const char *asignal, + const char *amember, Qt::ConnectionType atype) const +{ return connect(asender, asignal, this, amember, atype); } +class QObjectUserData { +public: + virtual ~QObjectUserData(); +}; + void qt_qFindChildren_helper(const QObject *parent, const QString &name, const QRegExp *re, + const QMetaObject &mo, QList *list); + QObject *qt_qFindChild_helper(const QObject *parent, const QString &name, const QMetaObject &mo); +template +inline T qFindChild(const QObject *o, const QString &name) +{ return static_cast(qt_qFindChild_helper(o, name, reinterpret_cast(0)->staticMetaObject)); } +template +inline QList qFindChildren(const QObject *o, const QString &name) +{ + QList list; + union { + QList *typedList; + QList *voidList; + } u; + u.typedList = &list; + qt_qFindChildren_helper(o, name, 0, reinterpret_cast(0)->staticMetaObject, u.voidList); + return list; +} +template +inline QList qFindChildren(const QObject *o, const QRegExp &re) +{ + QList list; + union { + QList *typedList; + QList *voidList; + } u; + u.typedList = &list; + qt_qFindChildren_helper(o, QString(), &re, reinterpret_cast(0)->staticMetaObject, u.voidList); + return list; +} +template +inline T qobject_cast(QObject *object) +{ + reinterpret_cast(0)->qt_check_for_QOBJECT_macro(*reinterpret_cast(object)); + return static_cast(reinterpret_cast(0)->staticMetaObject.cast(object)); +} +template +inline T qobject_cast(const QObject *object) +{ + register T ptr = static_cast(object); + (void)ptr;; + reinterpret_cast(0)->qt_check_for_QOBJECT_macro(*reinterpret_cast(const_cast(object))); + return static_cast(const_cast(reinterpret_cast(0)->staticMetaObject.cast(const_cast(object)))); +} +template inline const char * qobject_interface_iid() +{ return 0; } + QDebug operator<<(QDebug, const QObject *); +typedef QtValidLicenseForCoreModule QtCoreModule; +class QByteArray; +class QIODevicePrivate; +class QIODevice + : public QObject +{ + public: template inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: +public: + enum OpenModeFlag { + NotOpen = 0x0000, + ReadOnly = 0x0001, + WriteOnly = 0x0002, + ReadWrite = ReadOnly | WriteOnly, + Append = 0x0004, + Truncate = 0x0008, + Text = 0x0010, + Unbuffered = 0x0020 + }; + typedef QFlags OpenMode; + QIODevice(); + explicit QIODevice(QObject *parent); + virtual ~QIODevice(); + OpenMode openMode() const; + void setTextModeEnabled(bool enabled); + bool isTextModeEnabled() const; + bool isOpen() const; + bool isReadable() const; + bool isWritable() const; + virtual bool isSequential() const; + virtual bool open(OpenMode mode); + virtual void close(); + virtual qint64 pos() const; + virtual qint64 size() const; + virtual bool seek(qint64 pos); + virtual bool atEnd() const; + virtual bool reset(); + virtual qint64 bytesAvailable() const; + virtual qint64 bytesToWrite() const; + qint64 read(char *data, qint64 maxlen); + QByteArray read(qint64 maxlen); + QByteArray readAll(); + qint64 readLine(char *data, qint64 maxlen); + QByteArray readLine(qint64 maxlen = 0); + virtual bool canReadLine() const; + qint64 write(const char *data, qint64 len); + qint64 write(const char *data); + inline qint64 write(const QByteArray &data) + { return write(data.constData(), data.size()); } + qint64 peek(char *data, qint64 maxlen); + QByteArray peek(qint64 maxlen); + virtual bool waitForReadyRead(int msecs); + virtual bool waitForBytesWritten(int msecs); + void ungetChar(char c); + bool putChar(char c); + bool getChar(char *c); + QString errorString() const; +public: + void readyRead(); + void bytesWritten(qint64 bytes); + void aboutToClose(); + void readChannelFinished(); +public: + QIODevice(QIODevicePrivate &dd, QObject *parent = 0); + virtual qint64 readData(char *data, qint64 maxlen) = 0; + virtual qint64 readLineData(char *data, qint64 maxlen); + virtual qint64 writeData(const char *data, qint64 len) = 0; + void setOpenMode(OpenMode openMode); + void setErrorString(const QString &errorString); +private: + inline QIODevicePrivate* d_func() { return reinterpret_cast(qGetPtrHelper(d_ptr)); } inline const QIODevicePrivate* d_func() const { return reinterpret_cast(qGetPtrHelper(d_ptr)); } friend class QIODevicePrivate; + QIODevice(const QIODevice &); QIODevice &operator=(const QIODevice &); +}; +inline QFlags operator|(QIODevice::OpenMode::enum_type f1, QIODevice::OpenMode::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(QIODevice::OpenMode::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QIODevice::OpenMode::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +class QDebug; + QDebug operator<<(QDebug debug, QIODevice::OpenMode modes); +typedef QtValidLicenseForCoreModule QtCoreModule; +class QByteArray; +class QIODevice; +template class QList; +template class QLinkedList; +template class QVector; +template class QSet; +template class QHash; +template class QMap; +class QDataStreamPrivate; +class QDataStream +{ +public: + enum Version { + Qt_1_0 = 1, + Qt_2_0 = 2, + Qt_2_1 = 3, + Qt_3_0 = 4, + Qt_3_1 = 5, + Qt_3_3 = 6, + Qt_4_0 = 7, + Qt_4_1 = Qt_4_0, + Qt_4_2 = 8, + Qt_4_3 = 9, + Qt_4_4 = 10, + Qt_4_5 = 11, + Qt_4_6 = 12 + }; + enum ByteOrder { + BigEndian = QSysInfo::BigEndian, + LittleEndian = QSysInfo::LittleEndian + }; + enum Status { + Ok, + ReadPastEnd, + ReadCorruptData + }; + enum FloatingPointPrecision { + SinglePrecision, + DoublePrecision + }; + QDataStream(); + explicit QDataStream(QIODevice *); + QDataStream(QByteArray *, QIODevice::OpenMode flags); + QDataStream(const QByteArray &); + virtual ~QDataStream(); + QIODevice *device() const; + void setDevice(QIODevice *); + void unsetDevice(); + bool atEnd() const; + Status status() const; + void setStatus(Status status); + void resetStatus(); + FloatingPointPrecision floatingPointPrecision() const; + void setFloatingPointPrecision(FloatingPointPrecision precision); + ByteOrder byteOrder() const; + void setByteOrder(ByteOrder); + int version() const; + void setVersion(int); + QDataStream &operator>>(qint8 &i); + QDataStream &operator>>(quint8 &i); + QDataStream &operator>>(qint16 &i); + QDataStream &operator>>(quint16 &i); + QDataStream &operator>>(qint32 &i); + QDataStream &operator>>(quint32 &i); + QDataStream &operator>>(qint64 &i); + QDataStream &operator>>(quint64 &i); + QDataStream &operator>>(bool &i); + QDataStream &operator>>(float &f); + QDataStream &operator>>(double &f); + QDataStream &operator>>(char *&str); + QDataStream &operator<<(qint8 i); + QDataStream &operator<<(quint8 i); + QDataStream &operator<<(qint16 i); + QDataStream &operator<<(quint16 i); + QDataStream &operator<<(qint32 i); + QDataStream &operator<<(quint32 i); + QDataStream &operator<<(qint64 i); + QDataStream &operator<<(quint64 i); + QDataStream &operator<<(bool i); + QDataStream &operator<<(float f); + QDataStream &operator<<(double f); + QDataStream &operator<<(const char *str); + QDataStream &readBytes(char *&, uint &len); + int readRawData(char *, int len); + QDataStream &writeBytes(const char *, uint len); + int writeRawData(const char *, int len); + int skipRawData(int len); +private: + QDataStream(const QDataStream &); QDataStream &operator=(const QDataStream &); + QScopedPointer d; + QIODevice *dev; + bool owndev; + bool noswap; + ByteOrder byteorder; + int ver; + Status q_status; +}; +inline QIODevice *QDataStream::device() const +{ return dev; } +inline QDataStream::ByteOrder QDataStream::byteOrder() const +{ return byteorder; } +inline int QDataStream::version() const +{ return ver; } +inline void QDataStream::setVersion(int v) +{ ver = v; } +inline QDataStream &QDataStream::operator>>(quint8 &i) +{ return *this >> reinterpret_cast(i); } +inline QDataStream &QDataStream::operator>>(quint16 &i) +{ return *this >> reinterpret_cast(i); } +inline QDataStream &QDataStream::operator>>(quint32 &i) +{ return *this >> reinterpret_cast(i); } +inline QDataStream &QDataStream::operator>>(quint64 &i) +{ return *this >> reinterpret_cast(i); } +inline QDataStream &QDataStream::operator<<(quint8 i) +{ return *this << qint8(i); } +inline QDataStream &QDataStream::operator<<(quint16 i) +{ return *this << qint16(i); } +inline QDataStream &QDataStream::operator<<(quint32 i) +{ return *this << qint32(i); } +inline QDataStream &QDataStream::operator<<(quint64 i) +{ return *this << qint64(i); } +template +QDataStream& operator>>(QDataStream& s, QList& l) +{ + l.clear(); + quint32 c; + s >> c; + for(quint32 i = 0; i < c; ++i) + { + T t; + s >> t; + l.append(t); + if (s.atEnd()) + break; + } + return s; +} +template +QDataStream& operator<<(QDataStream& s, const QList& l) +{ + s << quint32(l.size()); + for (int i = 0; i < l.size(); ++i) + s << l.at(i); + return s; +} +template +QDataStream& operator>>(QDataStream& s, QLinkedList& l) +{ + l.clear(); + quint32 c; + s >> c; + for(quint32 i = 0; i < c; ++i) + { + T t; + s >> t; + l.append(t); + if (s.atEnd()) + break; + } + return s; +} +template +QDataStream& operator<<(QDataStream& s, const QLinkedList& l) +{ + s << quint32(l.size()); + typename QLinkedList::ConstIterator it = l.constBegin(); + for(; it != l.constEnd(); ++it) + s << *it; + return s; +} +template +QDataStream& operator>>(QDataStream& s, QVector& v) +{ + v.clear(); + quint32 c; + s >> c; + v.resize(c); + for(quint32 i = 0; i < c; ++i) { + T t; + s >> t; + v[i] = t; + } + return s; +} +template +QDataStream& operator<<(QDataStream& s, const QVector& v) +{ + s << quint32(v.size()); + for (typename QVector::const_iterator it = v.begin(); it != v.end(); ++it) + s << *it; + return s; +} +template +QDataStream &operator>>(QDataStream &in, QSet &set) +{ + set.clear(); + quint32 c; + in >> c; + for (quint32 i = 0; i < c; ++i) { + T t; + in >> t; + set << t; + if (in.atEnd()) + break; + } + return in; +} +template +QDataStream& operator<<(QDataStream &out, const QSet &set) +{ + out << quint32(set.size()); + typename QSet::const_iterator i = set.constBegin(); + while (i != set.constEnd()) { + out << *i; + ++i; + } + return out; +} +template + QDataStream &operator>>(QDataStream &in, QHash &hash) +{ + QDataStream::Status oldStatus = in.status(); + in.resetStatus(); + hash.clear(); + quint32 n; + in >> n; + for (quint32 i = 0; i < n; ++i) { + if (in.status() != QDataStream::Ok) + break; + Key k; + T t; + in >> k >> t; + hash.insertMulti(k, t); + } + if (in.status() != QDataStream::Ok) + hash.clear(); + if (oldStatus != QDataStream::Ok) + in.setStatus(oldStatus); + return in; +} +template + QDataStream &operator<<(QDataStream &out, const QHash& hash) +{ + out << quint32(hash.size()); + typename QHash::ConstIterator it = hash.end(); + typename QHash::ConstIterator begin = hash.begin(); + while (it != begin) { + --it; + out << it.key() << it.value(); + } + return out; +} +template + QDataStream &operator>>(QDataStream &in, QMap &map) +{ + QDataStream::Status oldStatus = in.status(); + in.resetStatus(); + map.clear(); + quint32 n; + in >> n; + map.detach(); + map.setInsertInOrder(true); + for (quint32 i = 0; i < n; ++i) { + if (in.status() != QDataStream::Ok) + break; + aKey key; + aT value; + in >> key >> value; + map.insertMulti(key, value); + } + map.setInsertInOrder(false); + if (in.status() != QDataStream::Ok) + map.clear(); + if (oldStatus != QDataStream::Ok) + in.setStatus(oldStatus); + return in; +} +template + QDataStream &operator<<(QDataStream &out, const QMap &map) +{ + out << quint32(map.size()); + typename QMap::ConstIterator it = map.end(); + typename QMap::ConstIterator begin = map.begin(); + while (it != begin) { + --it; + out << it.key() << it.value(); + } + return out; +} +typedef QtValidLicenseForCoreModule QtCoreModule; +struct QRegExpPrivate; +class QStringList; +class QRegExp +{ +public: + enum PatternSyntax { + RegExp, + Wildcard, + FixedString, + RegExp2, + WildcardUnix, + W3CXmlSchema11 }; + enum CaretMode { CaretAtZero, CaretAtOffset, CaretWontMatch }; + QRegExp(); + explicit QRegExp(const QString &pattern, Qt::CaseSensitivity cs = Qt::CaseSensitive, + PatternSyntax syntax = RegExp); + QRegExp(const QRegExp &rx); + ~QRegExp(); + QRegExp &operator=(const QRegExp &rx); + bool operator==(const QRegExp &rx) const; + inline bool operator!=(const QRegExp &rx) const { return !operator==(rx); } + bool isEmpty() const; + bool isValid() const; + QString pattern() const; + void setPattern(const QString &pattern); + Qt::CaseSensitivity caseSensitivity() const; + void setCaseSensitivity(Qt::CaseSensitivity cs); + PatternSyntax patternSyntax() const; + void setPatternSyntax(PatternSyntax syntax); + bool isMinimal() const; + void setMinimal(bool minimal); + bool exactMatch(const QString &str) const; + int indexIn(const QString &str, int offset = 0, CaretMode caretMode = CaretAtZero) const; + int lastIndexIn(const QString &str, int offset = -1, CaretMode caretMode = CaretAtZero) const; + int matchedLength() const; + int numCaptures() const; + int captureCount() const; + QStringList capturedTexts() const; + QStringList capturedTexts(); + QString cap(int nth = 0) const; + QString cap(int nth = 0); + int pos(int nth = 0) const; + int pos(int nth = 0); + QString errorString() const; + QString errorString(); + static QString escape(const QString &str); +private: + QRegExpPrivate *priv; +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QRegExp)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QRegExp"; } }; + QDataStream &operator<<(QDataStream &out, const QRegExp ®Exp); + QDataStream &operator>>(QDataStream &in, QRegExp ®Exp); +typedef QtValidLicenseForCoreModule QtCoreModule; +class QStringMatcherPrivate; +class QStringMatcher +{ +public: + QStringMatcher(); + QStringMatcher(const QString &pattern, + Qt::CaseSensitivity cs = Qt::CaseSensitive); + QStringMatcher(const QChar *uc, int len, + Qt::CaseSensitivity cs = Qt::CaseSensitive); + QStringMatcher(const QStringMatcher &other); + ~QStringMatcher(); + QStringMatcher &operator=(const QStringMatcher &other); + void setPattern(const QString &pattern); + void setCaseSensitivity(Qt::CaseSensitivity cs); + int indexIn(const QString &str, int from = 0) const; + int indexIn(const QChar *str, int length, int from = 0) const; + QString pattern() const; + inline Qt::CaseSensitivity caseSensitivity() const { return q_cs; } +private: + QStringMatcherPrivate *d_ptr; + QString q_pattern; + Qt::CaseSensitivity q_cs; + struct Data { + uchar q_skiptable[256]; + const QChar *uc; + int len; + }; + union { + uint q_data[256]; + Data p; + }; +}; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QRegExp; +typedef QListIterator QStringListIterator; +typedef QMutableListIterator QMutableStringListIterator; +class QStringList : public QList +{ +public: + inline QStringList() { } + inline explicit QStringList(const QString &i) { append(i); } + inline QStringList(const QStringList &l) : QList(l) { } + inline QStringList(const QList &l) : QList(l) { } + inline void sort(); + inline int removeDuplicates(); + inline QString join(const QString &sep) const; + inline QStringList filter(const QString &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + inline QBool contains(const QString &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + inline QStringList &replaceInStrings(const QString &before, const QString &after, Qt::CaseSensitivity cs = Qt::CaseSensitive); + inline QStringList operator+(const QStringList &other) const + { QStringList n = *this; n += other; return n; } + inline QStringList &operator<<(const QString &str) + { append(str); return *this; } + inline QStringList &operator<<(const QStringList &l) + { *this += l; return *this; } + inline QStringList filter(const QRegExp &rx) const; + inline QStringList &replaceInStrings(const QRegExp &rx, const QString &after); + inline int indexOf(const QRegExp &rx, int from = 0) const; + inline int lastIndexOf(const QRegExp &rx, int from = -1) const; + inline int indexOf(QRegExp &rx, int from = 0) const; + inline int lastIndexOf(QRegExp &rx, int from = -1) const; + using QList::indexOf; + using QList::lastIndexOf; +}; +namespace QtPrivate { + void QStringList_sort(QStringList *that); + int QStringList_removeDuplicates(QStringList *that); + QString QStringList_join(const QStringList *that, const QString &sep); + QStringList QStringList_filter(const QStringList *that, const QString &str, + Qt::CaseSensitivity cs); + QBool QStringList_contains(const QStringList *that, const QString &str, Qt::CaseSensitivity cs); + void QStringList_replaceInStrings(QStringList *that, const QString &before, const QString &after, + Qt::CaseSensitivity cs); + void QStringList_replaceInStrings(QStringList *that, const QRegExp &rx, const QString &after); + QStringList QStringList_filter(const QStringList *that, const QRegExp &re); + int QStringList_indexOf(const QStringList *that, const QRegExp &rx, int from); + int QStringList_lastIndexOf(const QStringList *that, const QRegExp &rx, int from); + int QStringList_indexOf(const QStringList *that, QRegExp &rx, int from); + int QStringList_lastIndexOf(const QStringList *that, QRegExp &rx, int from); +} +inline void QStringList::sort() +{ + QtPrivate::QStringList_sort(this); +} +inline int QStringList::removeDuplicates() +{ + return QtPrivate::QStringList_removeDuplicates(this); +} +inline QString QStringList::join(const QString &sep) const +{ + return QtPrivate::QStringList_join(this, sep); +} +inline QStringList QStringList::filter(const QString &str, Qt::CaseSensitivity cs) const +{ + return QtPrivate::QStringList_filter(this, str, cs); +} +inline QBool QStringList::contains(const QString &str, Qt::CaseSensitivity cs) const +{ + return QtPrivate::QStringList_contains(this, str, cs); +} +inline QStringList &QStringList::replaceInStrings(const QString &before, const QString &after, Qt::CaseSensitivity cs) +{ + QtPrivate::QStringList_replaceInStrings(this, before, after, cs); + return *this; +} +inline QStringList &QStringList::replaceInStrings(const QRegExp &rx, const QString &after) +{ + QtPrivate::QStringList_replaceInStrings(this, rx, after); + return *this; +} +inline QStringList QStringList::filter(const QRegExp &rx) const +{ + return QtPrivate::QStringList_filter(this, rx); +} +inline int QStringList::indexOf(const QRegExp &rx, int from) const +{ + return QtPrivate::QStringList_indexOf(this, rx, from); +} +inline int QStringList::lastIndexOf(const QRegExp &rx, int from) const +{ + return QtPrivate::QStringList_lastIndexOf(this, rx, from); +} +inline int QStringList::indexOf(QRegExp &rx, int from) const +{ + return QtPrivate::QStringList_indexOf(this, rx, from); +} +inline int QStringList::lastIndexOf(QRegExp &rx, int from) const +{ + return QtPrivate::QStringList_lastIndexOf(this, rx, from); +} +inline QDataStream &operator>>(QDataStream &in, QStringList &list) +{ + return operator>>(in, static_cast &>(list)); +} +inline QDataStream &operator<<(QDataStream &out, const QStringList &list) +{ + return operator<<(out, static_cast &>(list)); +} +typedef QtValidLicenseForGuiModule QtGuiModule; +class QColor; +class QColormap; +class QVariant; + QDebug operator<<(QDebug, const QColor &); + QDataStream &operator<<(QDataStream &, const QColor &); + QDataStream &operator>>(QDataStream &, QColor &); +class QColor +{ +public: + enum Spec { Invalid, Rgb, Hsv, Cmyk, Hsl }; + QColor(); + QColor(Qt::GlobalColor color); + QColor(int r, int g, int b, int a = 255); + QColor(QRgb rgb); + QColor(const QString& name); + QColor(const char *name); + QColor(const QColor &color); + QColor(Spec spec); + bool isValid() const; + QString name() const; + void setNamedColor(const QString& name); + static QStringList colorNames(); + inline Spec spec() const + { return cspec; } + int alpha() const; + void setAlpha(int alpha); + qreal alphaF() const; + void setAlphaF(qreal alpha); + int red() const; + int green() const; + int blue() const; + void setRed(int red); + void setGreen(int green); + void setBlue(int blue); + qreal redF() const; + qreal greenF() const; + qreal blueF() const; + void setRedF(qreal red); + void setGreenF(qreal green); + void setBlueF(qreal blue); + void getRgb(int *r, int *g, int *b, int *a = 0) const; + void setRgb(int r, int g, int b, int a = 255); + void getRgbF(qreal *r, qreal *g, qreal *b, qreal *a = 0) const; + void setRgbF(qreal r, qreal g, qreal b, qreal a = 1.0); + QRgb rgba() const; + void setRgba(QRgb rgba); + QRgb rgb() const; + void setRgb(QRgb rgb); + int hue() const; + int saturation() const; + int hsvHue() const; + int hsvSaturation() const; + int value() const; + qreal hueF() const; + qreal saturationF() const; + qreal hsvHueF() const; + qreal hsvSaturationF() const; + qreal valueF() const; + void getHsv(int *h, int *s, int *v, int *a = 0) const; + void setHsv(int h, int s, int v, int a = 255); + void getHsvF(qreal *h, qreal *s, qreal *v, qreal *a = 0) const; + void setHsvF(qreal h, qreal s, qreal v, qreal a = 1.0); + int cyan() const; + int magenta() const; + int yellow() const; + int black() const; + qreal cyanF() const; + qreal magentaF() const; + qreal yellowF() const; + qreal blackF() const; + void getCmyk(int *c, int *m, int *y, int *k, int *a = 0); + void setCmyk(int c, int m, int y, int k, int a = 255); + void getCmykF(qreal *c, qreal *m, qreal *y, qreal *k, qreal *a = 0); + void setCmykF(qreal c, qreal m, qreal y, qreal k, qreal a = 1.0); + int hslHue() const; + int hslSaturation() const; + int lightness() const; + qreal hslHueF() const; + qreal hslSaturationF() const; + qreal lightnessF() const; + void getHsl(int *h, int *s, int *l, int *a = 0) const; + void setHsl(int h, int s, int l, int a = 255); + void getHslF(qreal *h, qreal *s, qreal *l, qreal *a = 0) const; + void setHslF(qreal h, qreal s, qreal l, qreal a = 1.0); + QColor toRgb() const; + QColor toHsv() const; + QColor toCmyk() const; + QColor toHsl() const; + QColor convertTo(Spec colorSpec) const; + static QColor fromRgb(QRgb rgb); + static QColor fromRgba(QRgb rgba); + static QColor fromRgb(int r, int g, int b, int a = 255); + static QColor fromRgbF(qreal r, qreal g, qreal b, qreal a = 1.0); + static QColor fromHsv(int h, int s, int v, int a = 255); + static QColor fromHsvF(qreal h, qreal s, qreal v, qreal a = 1.0); + static QColor fromCmyk(int c, int m, int y, int k, int a = 255); + static QColor fromCmykF(qreal c, qreal m, qreal y, qreal k, qreal a = 1.0); + static QColor fromHsl(int h, int s, int l, int a = 255); + static QColor fromHslF(qreal h, qreal s, qreal l, qreal a = 1.0); + QColor light(int f = 150) const; + QColor lighter(int f = 150) const; + QColor dark(int f = 200) const; + QColor darker(int f = 200) const; + QColor &operator=(const QColor &); + QColor &operator=(Qt::GlobalColor color); + bool operator==(const QColor &c) const; + bool operator!=(const QColor &c) const; + operator QVariant() const; + static bool allowX11ColorNames(); + static void setAllowX11ColorNames(bool enabled); +private: + QColor(int, int, int, Spec); + void invalidate(); + Spec cspec; + union { + struct { + ushort alpha; + ushort red; + ushort green; + ushort blue; + ushort pad; + } argb; + struct { + ushort alpha; + ushort hue; + ushort saturation; + ushort value; + ushort pad; + } ahsv; + struct { + ushort alpha; + ushort cyan; + ushort magenta; + ushort yellow; + ushort black; + } acmyk; + struct { + ushort alpha; + ushort hue; + ushort saturation; + ushort lightness; + ushort pad; + } ahsl; + ushort array[5]; + } ct; + friend class QColormap; + friend QDataStream &operator<<(QDataStream &, const QColor &); + friend QDataStream &operator>>(QDataStream &, QColor &); +}; +inline QColor::QColor() +{ invalidate(); } +inline QColor::QColor(int r, int g, int b, int a) +{ setRgb(r, g, b, a); } +inline QColor::QColor(const char *aname) +{ setNamedColor(QLatin1String(aname)); } +inline QColor::QColor(const QString& aname) +{ setNamedColor(aname); } +inline QColor::QColor(const QColor &acolor) + : cspec(acolor.cspec) +{ ct.argb = acolor.ct.argb; } +inline bool QColor::isValid() const +{ return cspec != Invalid; } +inline QColor QColor::lighter(int f) const +{ return light(f); } +inline QColor QColor::darker(int f) const +{ return dark(f); } +typedef QtValidLicenseForCoreModule QtCoreModule; +template class QSharedDataPointer; +class QSharedData +{ +public: + mutable QAtomicInt ref; + inline QSharedData() : ref(0) { } + inline QSharedData(const QSharedData &) : ref(0) { } +private: + QSharedData &operator=(const QSharedData &); +}; +template class QSharedDataPointer +{ +public: + typedef T Type; + typedef T *pointer; + inline void detach() { if (d && d->ref != 1) detach_helper(); } + inline T &operator*() { detach(); return *d; } + inline const T &operator*() const { return *d; } + inline T *operator->() { detach(); return d; } + inline const T *operator->() const { return d; } + inline operator T *() { detach(); return d; } + inline operator const T *() const { return d; } + inline T *data() { detach(); return d; } + inline const T *data() const { return d; } + inline const T *constData() const { return d; } + inline bool operator==(const QSharedDataPointer &other) const { return d == other.d; } + inline bool operator!=(const QSharedDataPointer &other) const { return d != other.d; } + inline QSharedDataPointer() { d = 0; } + inline ~QSharedDataPointer() { if (d && !d->ref.deref()) delete d; } + explicit QSharedDataPointer(T *data); + inline QSharedDataPointer(const QSharedDataPointer &o) : d(o.d) { if (d) d->ref.ref(); } + inline QSharedDataPointer & operator=(const QSharedDataPointer &o) { + if (o.d != d) { + if (o.d) + o.d->ref.ref(); + if (d && !d->ref.deref()) + delete d; + d = o.d; + } + return *this; + } + inline QSharedDataPointer &operator=(T *o) { + if (o != d) { + if (o) + o->ref.ref(); + if (d && !d->ref.deref()) + delete d; + d = o; + } + return *this; + } + inline bool operator!() const { return !d; } + inline void swap(QSharedDataPointer &other) + { qSwap(d, other.d); } +public: + T *clone(); +private: + void detach_helper(); + T *d; +}; +template class QExplicitlySharedDataPointer +{ +public: + typedef T Type; + typedef T *pointer; + inline T &operator*() const { return *d; } + inline T *operator->() { return d; } + inline T *operator->() const { return d; } + inline T *data() const { return d; } + inline const T *constData() const { return d; } + inline void detach() { if (d && d->ref != 1) detach_helper(); } + inline void reset() + { + if(d && !d->ref.deref()) + delete d; + d = 0; + } + inline operator bool () const { return d != 0; } + inline bool operator==(const QExplicitlySharedDataPointer &other) const { return d == other.d; } + inline bool operator!=(const QExplicitlySharedDataPointer &other) const { return d != other.d; } + inline bool operator==(const T *ptr) const { return d == ptr; } + inline bool operator!=(const T *ptr) const { return d != ptr; } + inline QExplicitlySharedDataPointer() { d = 0; } + inline ~QExplicitlySharedDataPointer() { if (d && !d->ref.deref()) delete d; } + explicit QExplicitlySharedDataPointer(T *data); + inline QExplicitlySharedDataPointer(const QExplicitlySharedDataPointer &o) : d(o.d) { if (d) d->ref.ref(); } + template + inline QExplicitlySharedDataPointer(const QExplicitlySharedDataPointer &o) : d(static_cast(o.data())) + { + if(d) + d->ref.ref(); + } + inline QExplicitlySharedDataPointer & operator=(const QExplicitlySharedDataPointer &o) { + if (o.d != d) { + if (o.d) + o.d->ref.ref(); + if (d && !d->ref.deref()) + delete d; + d = o.d; + } + return *this; + } + inline QExplicitlySharedDataPointer &operator=(T *o) { + if (o != d) { + if (o) + o->ref.ref(); + if (d && !d->ref.deref()) + delete d; + d = o; + } + return *this; + } + inline bool operator!() const { return !d; } + inline void swap(QExplicitlySharedDataPointer &other) + { qSwap(d, other.d); } +public: + T *clone(); +private: + void detach_helper(); + T *d; +}; +template +inline QSharedDataPointer::QSharedDataPointer(T *adata) : d(adata) +{ if (d) d->ref.ref(); } +template +inline T *QSharedDataPointer::clone() +{ + return new T(*d); +} +template + void QSharedDataPointer::detach_helper() +{ + T *x = clone(); + x->ref.ref(); + if (!d->ref.deref()) + delete d; + d = x; +} +template +inline T *QExplicitlySharedDataPointer::clone() +{ + return new T(*d); +} +template + void QExplicitlySharedDataPointer::detach_helper() +{ + T *x = clone(); + x->ref.ref(); + if (!d->ref.deref()) + delete d; + d = x; +} +template +inline QExplicitlySharedDataPointer::QExplicitlySharedDataPointer(T *adata) : d(adata) +{ if (d) d->ref.ref(); } +template +inline void qSwap(QSharedDataPointer &p1, QSharedDataPointer &p2) +{ p1.swap(p2); } +template +inline void qSwap(QExplicitlySharedDataPointer &p1, QExplicitlySharedDataPointer &p2) +{ p1.swap(p2); } +typedef QtValidLicenseForCoreModule QtCoreModule; +template inline void qt_sharedpointer_cast_check(T *) { } +template class QWeakPointer; +template class QSharedPointer; +template +QSharedPointer qSharedPointerCast(const QSharedPointer &ptr); +template +QSharedPointer qSharedPointerDynamicCast(const QSharedPointer &ptr); +template +QSharedPointer qSharedPointerConstCast(const QSharedPointer &ptr); +template +QSharedPointer qSharedPointerObjectCast(const QSharedPointer &ptr); +namespace QtSharedPointer { + template class InternalRefCount; + template class ExternalRefCount; + template QSharedPointer copyAndSetPointer(X * ptr, const QSharedPointer &src); + void internalSafetyCheckAdd2(const void *, const volatile void *); + void internalSafetyCheckRemove2(const void *); + template + inline void executeDeleter(T *t, RetVal (Klass:: *memberDeleter)()) + { (t->*memberDeleter)(); } + template + inline void executeDeleter(T *t, Deleter d) + { d(t); } + template inline void normalDeleter(T *t) { delete t; } + template struct RemovePointer; + template struct RemovePointer { typedef T Type; }; + template struct RemovePointer > { typedef T Type; }; + template struct RemovePointer > { typedef T Type; }; + template + class Basic + { + typedef T *Basic:: *RestrictedBool; + public: + typedef T Type; + typedef T element_type; + typedef T value_type; + typedef value_type *pointer; + typedef const value_type *const_pointer; + typedef value_type &reference; + typedef const value_type &const_reference; + typedef ptrdiff_t difference_type; + inline T *data() const { return value; } + inline bool isNull() const { return !data(); } + inline operator RestrictedBool() const { return isNull() ? 0 : &Basic::value; } + inline bool operator !() const { return isNull(); } + inline T &operator*() const { return *data(); } + inline T *operator->() const { return data(); } + public: + inline Basic(T *ptr = 0) : value(ptr) { } + inline Basic(Qt::Initialization) { } + inline void internalConstruct(T *ptr) + { + value = ptr; + } + template friend class QWeakPointer; + Type *value; + }; + struct ExternalRefCountData + { + QBasicAtomicInt weakref; + QBasicAtomicInt strongref; + inline ExternalRefCountData() + { + strongref = 1; + weakref = 1; + } + inline ExternalRefCountData(Qt::Initialization) { } + virtual inline ~ExternalRefCountData() { ((!(!weakref)) ? qt_assert("!weakref","/usr/include/qt4/QtCore/qsharedpointer_impl.h",184) : qt_noop()); ((!(strongref <= 0)) ? qt_assert("strongref <= 0","/usr/include/qt4/QtCore/qsharedpointer_impl.h",184) : qt_noop()); } + virtual inline bool destroy() { return false; } + static ExternalRefCountData *getAndRef(const QObject *); + void setQObjectShared(const QObject *, bool enable); + inline void setQObjectShared(...) { } + }; + struct ExternalRefCountWithDestroyFn: public ExternalRefCountData + { + typedef void (*DestroyerFn)(ExternalRefCountData *); + DestroyerFn destroyer; + inline ExternalRefCountWithDestroyFn(DestroyerFn d) + : destroyer(d) + { } + inline bool destroy() { destroyer(this); return true; } + inline void operator delete(void *ptr) { ::operator delete(ptr); } + }; + template + struct ExternalRefCountWithCustomDeleter: public ExternalRefCountWithDestroyFn + { + typedef ExternalRefCountWithCustomDeleter Self; + typedef ExternalRefCountWithDestroyFn BaseClass; + struct CustomDeleter + { + Deleter deleter; + T *ptr; + inline CustomDeleter(T *p, Deleter d) : deleter(d), ptr(p) {} + }; + CustomDeleter extra; + static inline void deleter(ExternalRefCountData *self) + { + Self *realself = static_cast(self); + executeDeleter(realself->extra.ptr, realself->extra.deleter); + realself->extra.~CustomDeleter(); + } + static void safetyCheckDeleter(ExternalRefCountData *self) + { + internalSafetyCheckRemove2(self); + deleter(self); + } + static inline Self *create(T *ptr, Deleter userDeleter) + { + DestroyerFn destroy = &deleter; + Self *d = static_cast(::operator new(sizeof(Self))); + new (&d->extra) CustomDeleter(ptr, userDeleter); + new (d) BaseClass(destroy); + return d; + } + private: + ExternalRefCountWithCustomDeleter(); + ~ExternalRefCountWithCustomDeleter(); + }; + template + struct ExternalRefCountWithContiguousData: public ExternalRefCountWithDestroyFn + { + typedef ExternalRefCountWithDestroyFn Parent; + T data; + static void deleter(ExternalRefCountData *self) + { + ExternalRefCountWithContiguousData *that = + static_cast(self); + that->data.~T(); + } + static void safetyCheckDeleter(ExternalRefCountData *self) + { + internalSafetyCheckRemove2(self); + deleter(self); + } + static inline ExternalRefCountData *create(T **ptr) + { + DestroyerFn destroy = &deleter; + ExternalRefCountWithContiguousData *d = + static_cast(::operator new(sizeof(ExternalRefCountWithContiguousData))); + new (d) Parent(destroy); + *ptr = &d->data; + return d; + } + private: + ExternalRefCountWithContiguousData(); + ~ExternalRefCountWithContiguousData(); + }; + template + class ExternalRefCount: public Basic + { + public: + typedef ExternalRefCountData Data; + inline void ref() const { d->weakref.ref(); d->strongref.ref(); } + inline bool deref() + { + if (!d->strongref.deref()) { + internalDestroy(); + } + return d->weakref.deref(); + } + inline void internalConstruct(T *ptr) + { + if (ptr) + d = new Data; + else + d = 0; + internalFinishConstruction(ptr); + } + template + inline void internalConstruct(T *ptr, Deleter deleter) + { + if (ptr) + d = ExternalRefCountWithCustomDeleter::create(ptr, deleter); + else + d = 0; + internalFinishConstruction(ptr); + } + inline void internalCreate() + { + T *ptr; + d = ExternalRefCountWithContiguousData::create(&ptr); + Basic::internalConstruct(ptr); + } + inline void internalFinishConstruction(T *ptr) + { + Basic::internalConstruct(ptr); + if (ptr) d->setQObjectShared(ptr, true); + } + inline ExternalRefCount() : d(0) { } + inline ExternalRefCount(Qt::Initialization i) : Basic(i) { } + inline ExternalRefCount(const ExternalRefCount &other) : Basic(other), d(other.d) + { if (d) ref(); } + template + inline ExternalRefCount(const ExternalRefCount &other) : Basic(other.value), d(other.d) + { if (d) ref(); } + inline ~ExternalRefCount() { if (d && !deref()) delete d; } + template + inline void internalCopy(const ExternalRefCount &other) + { + internalSet(other.d, other.data()); + } + inline void internalDestroy() + { + if (!d->destroy()) + delete this->value; + } + inline void internalSwap(ExternalRefCount &other) + { + qSwap(d, other.d); + qSwap(this->value, other.value); + } + template friend class ExternalRefCount; + template friend class QWeakPointer; + template friend QSharedPointer copyAndSetPointer(X * ptr, const QSharedPointer &src); + inline void internalSet(Data *o, T *actual) + { + if (o) { + register int tmp = o->strongref; + while (tmp > 0) { + if (o->strongref.testAndSetRelaxed(tmp, tmp + 1)) + break; + tmp = o->strongref; + } + if (tmp > 0) + o->weakref.ref(); + else + o = 0; + } + if (d && !deref()) + delete d; + d = o; + this->value = d && d->strongref ? actual : 0; + } + Data *d; + private: + template ExternalRefCount(const InternalRefCount &); + }; +} +template +class QSharedPointer: public QtSharedPointer::ExternalRefCount +{ + typedef typename QtSharedPointer::ExternalRefCount BaseClass; +public: + inline QSharedPointer() { } + inline explicit QSharedPointer(T *ptr) : BaseClass(Qt::Uninitialized) + { BaseClass::internalConstruct(ptr); } + template + inline QSharedPointer(T *ptr, Deleter d) { BaseClass::internalConstruct(ptr, d); } + inline QSharedPointer(const QSharedPointer &other) : BaseClass(other) { } + inline QSharedPointer &operator=(const QSharedPointer &other) + { + BaseClass::internalCopy(other); + return *this; + } + template + inline QSharedPointer(const QSharedPointer &other) : BaseClass(other) + { } + template + inline QSharedPointer &operator=(const QSharedPointer &other) + { + qt_sharedpointer_cast_check(static_cast(0)); + BaseClass::internalCopy(other); + return *this; + } + template + inline QSharedPointer(const QWeakPointer &other) : BaseClass(Qt::Uninitialized) + { this->d = 0; *this = other; } + template + inline QSharedPointer &operator=(const QWeakPointer &other) + { BaseClass::internalSet(other.d, other.value); return *this; } + inline void swap(QSharedPointer &other) + { QSharedPointer::internalSwap(other); } + template + QSharedPointer staticCast() const + { + return qSharedPointerCast(*this); + } + template + QSharedPointer dynamicCast() const + { + return qSharedPointerDynamicCast(*this); + } + template + QSharedPointer constCast() const + { + return qSharedPointerConstCast(*this); + } + template + QSharedPointer objectCast() const + { + return qSharedPointerObjectCast(*this); + } + inline void clear() { *this = QSharedPointer(); } + QWeakPointer toWeakRef() const; +public: + inline explicit QSharedPointer(Qt::Initialization i) : BaseClass(i) {} +public: + static inline QSharedPointer create() + { + QSharedPointer result(Qt::Uninitialized); + result.internalCreate(); + new (result.data()) T(); + result.internalFinishConstruction(result.data()); + return result; + } +}; +template +class QWeakPointer +{ + typedef T *QWeakPointer:: *RestrictedBool; + typedef QtSharedPointer::ExternalRefCountData Data; +public: + typedef T element_type; + typedef T value_type; + typedef value_type *pointer; + typedef const value_type *const_pointer; + typedef value_type &reference; + typedef const value_type &const_reference; + typedef ptrdiff_t difference_type; + inline bool isNull() const { return d == 0 || d->strongref == 0 || value == 0; } + inline operator RestrictedBool() const { return isNull() ? 0 : &QWeakPointer::value; } + inline bool operator !() const { return isNull(); } + inline T *data() const { return d == 0 || d->strongref == 0 ? 0 : value; } + inline QWeakPointer() : d(0), value(0) { } + inline ~QWeakPointer() { if (d && !d->weakref.deref()) delete d; } + template + inline QWeakPointer(X *ptr) : d(ptr ? d->getAndRef(ptr) : 0), value(ptr) + { } + template + inline QWeakPointer &operator=(X *ptr) + { return *this = QWeakPointer(ptr); } + inline QWeakPointer(const QWeakPointer &o) : d(o.d), value(o.value) + { if (d) d->weakref.ref(); } + inline QWeakPointer &operator=(const QWeakPointer &o) + { + internalSet(o.d, o.value); + return *this; + } + inline QWeakPointer(const QSharedPointer &o) : d(o.d), value(o.data()) + { if (d) d->weakref.ref();} + inline QWeakPointer &operator=(const QSharedPointer &o) + { + internalSet(o.d, o.value); + return *this; + } + template + inline QWeakPointer(const QWeakPointer &o) : d(0), value(0) + { *this = o; } + template + inline QWeakPointer &operator=(const QWeakPointer &o) + { + *this = o.toStrongRef(); + return *this; + } + template + inline bool operator==(const QWeakPointer &o) const + { return d == o.d && value == static_cast(o.value); } + template + inline bool operator!=(const QWeakPointer &o) const + { return !(*this == o); } + template + inline QWeakPointer(const QSharedPointer &o) : d(0), value(0) + { *this = o; } + template + inline QWeakPointer &operator=(const QSharedPointer &o) + { + qt_sharedpointer_cast_check(static_cast(0)); + internalSet(o.d, o.data()); + return *this; + } + template + inline bool operator==(const QSharedPointer &o) const + { return d == o.d; } + template + inline bool operator!=(const QSharedPointer &o) const + { return !(*this == o); } + inline void clear() { *this = QWeakPointer(); } + inline QSharedPointer toStrongRef() const { return QSharedPointer(*this); } +private: + template friend class QSharedPointer; + inline void internalSet(Data *o, T *actual) + { + if (d == o) return; + if (o) + o->weakref.ref(); + if (d && !d->weakref.deref()) + delete d; + d = o; + value = actual; + } + Data *d; + T *value; +}; +template +bool operator==(const QSharedPointer &ptr1, const QSharedPointer &ptr2) +{ + return ptr1.data() == ptr2.data(); +} +template +bool operator!=(const QSharedPointer &ptr1, const QSharedPointer &ptr2) +{ + return ptr1.data() != ptr2.data(); +} +template +bool operator==(const QSharedPointer &ptr1, const X *ptr2) +{ + return ptr1.data() == ptr2; +} +template +bool operator==(const T *ptr1, const QSharedPointer &ptr2) +{ + return ptr1 == ptr2.data(); +} +template +bool operator!=(const QSharedPointer &ptr1, const X *ptr2) +{ + return !(ptr1 == ptr2); +} +template +bool operator!=(const T *ptr1, const QSharedPointer &ptr2) +{ + return !(ptr2 == ptr1); +} +template +bool operator==(const QSharedPointer &ptr1, const QWeakPointer &ptr2) +{ + return ptr2 == ptr1; +} +template +bool operator!=(const QSharedPointer &ptr1, const QWeakPointer &ptr2) +{ + return ptr2 != ptr1; +} +template +inline typename T::difference_type operator-(const QSharedPointer &ptr1, const QSharedPointer &ptr2) +{ + return ptr1.data() - ptr2.data(); +} +template +inline QWeakPointer QSharedPointer::toWeakRef() const +{ + return QWeakPointer(*this); +} +template +inline void qSwap(QSharedPointer &p1, QSharedPointer &p2) +{ + p1.swap(p2); +} +namespace QtSharedPointer { + template + inline QSharedPointer copyAndSetPointer(X *ptr, const QSharedPointer &src) + { + QSharedPointer result; + result.internalSet(src.d, ptr); + return result; + } +} +template +inline QSharedPointer qSharedPointerCast(const QSharedPointer &src) +{ + register X *ptr = static_cast(src.data()); + return QtSharedPointer::copyAndSetPointer(ptr, src); +} +template +inline QSharedPointer qSharedPointerCast(const QWeakPointer &src) +{ + return qSharedPointerCast(src.toStrongRef()); +} +template +inline QSharedPointer qSharedPointerDynamicCast(const QSharedPointer &src) +{ + register X *ptr = dynamic_cast(src.data()); + return QtSharedPointer::copyAndSetPointer(ptr, src); +} +template +inline QSharedPointer qSharedPointerDynamicCast(const QWeakPointer &src) +{ + return qSharedPointerDynamicCast(src.toStrongRef()); +} +template +inline QSharedPointer qSharedPointerConstCast(const QSharedPointer &src) +{ + register X *ptr = const_cast(src.data()); + return QtSharedPointer::copyAndSetPointer(ptr, src); +} +template +inline QSharedPointer qSharedPointerConstCast(const QWeakPointer &src) +{ + return qSharedPointerConstCast(src.toStrongRef()); +} +template +inline +QWeakPointer qWeakPointerCast(const QSharedPointer &src) +{ + return qSharedPointerCast(src).toWeakRef(); +} +template +inline QSharedPointer qSharedPointerObjectCast(const QSharedPointer &src) +{ + register X *ptr = qobject_cast(src.data()); + return QtSharedPointer::copyAndSetPointer(ptr, src); +} +template +inline QSharedPointer qSharedPointerObjectCast(const QWeakPointer &src) +{ + return qSharedPointerObjectCast(src.toStrongRef()); +} +template +inline QSharedPointer::Type> +qobject_cast(const QSharedPointer &src) +{ + return qSharedPointerObjectCast::Type, T>(src); +} +template +inline QSharedPointer::Type> +qobject_cast(const QWeakPointer &src) +{ + return qSharedPointerObjectCast::Type, T>(src); +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + inline void + _Construct(_T1* __p, const _T2& __value) + { + ::new(static_cast(__p)) _T1((__value)); + } + template + inline void + _Destroy(_Tp* __pointer) + { __pointer->~_Tp(); } + template + struct _Destroy_aux + { + template + static void + __destroy(_ForwardIterator __first, _ForwardIterator __last) + { + for (; __first != __last; ++__first) + std::_Destroy(&*__first); + } + }; + template<> + struct _Destroy_aux + { + template + static void + __destroy(_ForwardIterator, _ForwardIterator) { } + }; + template + inline void + _Destroy(_ForwardIterator __first, _ForwardIterator __last) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _Value_type; + std::_Destroy_aux<__has_trivial_destructor(_Value_type)>:: + __destroy(__first, __last); + } + template class allocator; + template + void + _Destroy(_ForwardIterator __first, _ForwardIterator __last, + _Allocator& __alloc) + { + for (; __first != __last; ++__first) + __alloc.destroy(&*__first); + } + template + inline void + _Destroy(_ForwardIterator __first, _ForwardIterator __last, + allocator<_Tp>&) + { + _Destroy(__first, __last); + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + struct __uninitialized_copy + { + template + static _ForwardIterator + uninitialized_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { + _ForwardIterator __cur = __result; + try + { + for (; __first != __last; ++__first, ++__cur) + std::_Construct(&*__cur, *__first); + return __cur; + } + catch(...) + { + std::_Destroy(__result, __cur); + throw; + } + } + }; + template<> + struct __uninitialized_copy + { + template + static _ForwardIterator + uninitialized_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { return std::copy(__first, __last, __result); } + }; + template + inline _ForwardIterator + uninitialized_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { + typedef typename iterator_traits<_InputIterator>::value_type + _ValueType1; + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType2; + return std::__uninitialized_copy<(__is_pod(_ValueType1) + && __is_pod(_ValueType2))>:: + uninitialized_copy(__first, __last, __result); + } + template + struct __uninitialized_fill + { + template + static void + uninitialized_fill(_ForwardIterator __first, + _ForwardIterator __last, const _Tp& __x) + { + _ForwardIterator __cur = __first; + try + { + for (; __cur != __last; ++__cur) + std::_Construct(&*__cur, __x); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + template<> + struct __uninitialized_fill + { + template + static void + uninitialized_fill(_ForwardIterator __first, + _ForwardIterator __last, const _Tp& __x) + { std::fill(__first, __last, __x); } + }; + template + inline void + uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + std::__uninitialized_fill<__is_pod(_ValueType)>:: + uninitialized_fill(__first, __last, __x); + } + template + struct __uninitialized_construct_range_dispatch + { + template + static void + __ucr(_ForwardIterator __first, _ForwardIterator __last, + _Tp& __value) + { + if(__first == __last) + return; + _ForwardIterator __cur = __first; + try + { + std::_Construct(&*__first, (__value)); + _ForwardIterator __prev = __cur; + ++__cur; + for(; __cur != __last; ++__cur, ++__prev) + std::_Construct(&*__cur, (*__prev)); + __value = (*__prev); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + template<> + struct __uninitialized_construct_range_dispatch + { + template + static void + __ucr(_ForwardIterator, _ForwardIterator, _Tp&) { } + }; + template + inline void + __uninitialized_construct_range(_ForwardIterator __first, + _ForwardIterator __last, + _Tp& __value) + { + typedef typename std::iterator_traits<_ForwardIterator>::value_type + _ValueType; + std::__uninitialized_construct_range_dispatch< + __has_trivial_constructor(_ValueType)>:: + __ucr(__first, __last, __value); + } + template + struct __uninitialized_fill_n + { + template + static void + uninitialized_fill_n(_ForwardIterator __first, _Size __n, + const _Tp& __x) + { + _ForwardIterator __cur = __first; + try + { + for (; __n > 0; --__n, ++__cur) + std::_Construct(&*__cur, __x); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + template<> + struct __uninitialized_fill_n + { + template + static void + uninitialized_fill_n(_ForwardIterator __first, _Size __n, + const _Tp& __x) + { std::fill_n(__first, __n, __x); } + }; + template + inline void + uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + std::__uninitialized_fill_n<__is_pod(_ValueType)>:: + uninitialized_fill_n(__first, __n, __x); + } + template + _ForwardIterator + __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _Allocator& __alloc) + { + _ForwardIterator __cur = __result; + try + { + for (; __first != __last; ++__first, ++__cur) + __alloc.construct(&*__cur, *__first); + return __cur; + } + catch(...) + { + std::_Destroy(__result, __cur, __alloc); + throw; + } + } + template + inline _ForwardIterator + __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, allocator<_Tp>&) + { return std::uninitialized_copy(__first, __last, __result); } + template + inline _ForwardIterator + __uninitialized_move_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _Allocator& __alloc) + { + return std::__uninitialized_copy_a((__first), + (__last), + __result, __alloc); + } + template + void + __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x, _Allocator& __alloc) + { + _ForwardIterator __cur = __first; + try + { + for (; __cur != __last; ++__cur) + __alloc.construct(&*__cur, __x); + } + catch(...) + { + std::_Destroy(__first, __cur, __alloc); + throw; + } + } + template + inline void + __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x, allocator<_Tp2>&) + { std::uninitialized_fill(__first, __last, __x); } + template + void + __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, + const _Tp& __x, _Allocator& __alloc) + { + _ForwardIterator __cur = __first; + try + { + for (; __n > 0; --__n, ++__cur) + __alloc.construct(&*__cur, __x); + } + catch(...) + { + std::_Destroy(__first, __cur, __alloc); + throw; + } + } + template + inline void + __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, + const _Tp& __x, allocator<_Tp2>&) + { std::uninitialized_fill_n(__first, __n, __x); } + template + inline _ForwardIterator + __uninitialized_copy_move(_InputIterator1 __first1, + _InputIterator1 __last1, + _InputIterator2 __first2, + _InputIterator2 __last2, + _ForwardIterator __result, + _Allocator& __alloc) + { + _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1, + __result, + __alloc); + try + { + return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc); + } + catch(...) + { + std::_Destroy(__result, __mid, __alloc); + throw; + } + } + template + inline _ForwardIterator + __uninitialized_move_copy(_InputIterator1 __first1, + _InputIterator1 __last1, + _InputIterator2 __first2, + _InputIterator2 __last2, + _ForwardIterator __result, + _Allocator& __alloc) + { + _ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1, + __result, + __alloc); + try + { + return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc); + } + catch(...) + { + std::_Destroy(__result, __mid, __alloc); + throw; + } + } + template + inline _ForwardIterator + __uninitialized_fill_move(_ForwardIterator __result, _ForwardIterator __mid, + const _Tp& __x, _InputIterator __first, + _InputIterator __last, _Allocator& __alloc) + { + std::__uninitialized_fill_a(__result, __mid, __x, __alloc); + try + { + return std::__uninitialized_move_a(__first, __last, __mid, __alloc); + } + catch(...) + { + std::_Destroy(__result, __mid, __alloc); + throw; + } + } + template + inline void + __uninitialized_move_fill(_InputIterator __first1, _InputIterator __last1, + _ForwardIterator __first2, + _ForwardIterator __last2, const _Tp& __x, + _Allocator& __alloc) + { + _ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1, + __first2, + __alloc); + try + { + std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc); + } + catch(...) + { + std::_Destroy(__first2, __mid2, __alloc); + throw; + } + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + struct _Vector_base + { + typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; + struct _Vector_impl + : public _Tp_alloc_type + { + typename _Tp_alloc_type::pointer _M_start; + typename _Tp_alloc_type::pointer _M_finish; + typename _Tp_alloc_type::pointer _M_end_of_storage; + _Vector_impl() + : _Tp_alloc_type(), _M_start(0), _M_finish(0), _M_end_of_storage(0) + { } + _Vector_impl(_Tp_alloc_type const& __a) + : _Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0) + { } + }; + public: + typedef _Alloc allocator_type; + _Tp_alloc_type& + _M_get_Tp_allocator() + { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); } + const _Tp_alloc_type& + _M_get_Tp_allocator() const + { return *static_cast(&this->_M_impl); } + allocator_type + get_allocator() const + { return allocator_type(_M_get_Tp_allocator()); } + _Vector_base() + : _M_impl() { } + _Vector_base(const allocator_type& __a) + : _M_impl(__a) { } + _Vector_base(size_t __n, const allocator_type& __a) + : _M_impl(__a) + { + this->_M_impl._M_start = this->_M_allocate(__n); + this->_M_impl._M_finish = this->_M_impl._M_start; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + } + ~_Vector_base() + { _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); } + public: + _Vector_impl _M_impl; + typename _Tp_alloc_type::pointer + _M_allocate(size_t __n) + { return __n != 0 ? _M_impl.allocate(__n) : 0; } + void + _M_deallocate(typename _Tp_alloc_type::pointer __p, size_t __n) + { + if (__p) + _M_impl.deallocate(__p, __n); + } + }; + template > + class vector : public _Vector_base<_Tp, _Alloc> + { + typedef typename _Alloc::value_type _Alloc_value_type; + + + typedef _Vector_base<_Tp, _Alloc> _Base; + typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; + public: + typedef _Tp value_type; + typedef typename _Tp_alloc_type::pointer pointer; + typedef typename _Tp_alloc_type::const_pointer const_pointer; + typedef typename _Tp_alloc_type::reference reference; + typedef typename _Tp_alloc_type::const_reference const_reference; + typedef __gnu_cxx::__normal_iterator iterator; + typedef __gnu_cxx::__normal_iterator + const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Alloc allocator_type; + public: + using _Base::_M_allocate; + using _Base::_M_deallocate; + using _Base::_M_impl; + using _Base::_M_get_Tp_allocator; + public: + vector() + : _Base() { } + explicit + vector(const allocator_type& __a) + : _Base(__a) { } + explicit + vector(size_type __n, const value_type& __value = value_type(), + const allocator_type& __a = allocator_type()) + : _Base(__n, __a) + { _M_fill_initialize(__n, __value); } + vector(const vector& __x) + : _Base(__x.size(), __x._M_get_Tp_allocator()) + { this->_M_impl._M_finish = + std::__uninitialized_copy_a(__x.begin(), __x.end(), + this->_M_impl._M_start, + _M_get_Tp_allocator()); + } + template + vector(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_initialize_dispatch(__first, __last, _Integral()); + } + ~vector() + { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); } + vector& + operator=(const vector& __x); + void + assign(size_type __n, const value_type& __val) + { _M_fill_assign(__n, __val); } + template + void + assign(_InputIterator __first, _InputIterator __last) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } + using _Base::get_allocator; + iterator + begin() + { return iterator(this->_M_impl._M_start); } + const_iterator + begin() const + { return const_iterator(this->_M_impl._M_start); } + iterator + end() + { return iterator(this->_M_impl._M_finish); } + const_iterator + end() const + { return const_iterator(this->_M_impl._M_finish); } + reverse_iterator + rbegin() + { return reverse_iterator(end()); } + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(end()); } + reverse_iterator + rend() + { return reverse_iterator(begin()); } + const_reverse_iterator + rend() const + { return const_reverse_iterator(begin()); } + size_type + size() const + { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); } + size_type + max_size() const + { return _M_get_Tp_allocator().max_size(); } + void + resize(size_type __new_size, value_type __x = value_type()) + { + if (__new_size < size()) + _M_erase_at_end(this->_M_impl._M_start + __new_size); + else + insert(end(), __new_size - size(), __x); + } + size_type + capacity() const + { return size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); } + bool + empty() const + { return begin() == end(); } + void + reserve(size_type __n); + reference + operator[](size_type __n) + { return *(this->_M_impl._M_start + __n); } + const_reference + operator[](size_type __n) const + { return *(this->_M_impl._M_start + __n); } + public: + void + _M_range_check(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range(("vector::_M_range_check")); + } + public: + reference + at(size_type __n) + { + _M_range_check(__n); + return (*this)[__n]; + } + const_reference + at(size_type __n) const + { + _M_range_check(__n); + return (*this)[__n]; + } + reference + front() + { return *begin(); } + const_reference + front() const + { return *begin(); } + reference + back() + { return *(end() - 1); } + const_reference + back() const + { return *(end() - 1); } + pointer + data() + { return pointer(this->_M_impl._M_start); } + const_pointer + data() const + { return const_pointer(this->_M_impl._M_start); } + void + push_back(const value_type& __x) + { + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + { + this->_M_impl.construct(this->_M_impl._M_finish, __x); + ++this->_M_impl._M_finish; + } + else + _M_insert_aux(end(), __x); + } + void + pop_back() + { + --this->_M_impl._M_finish; + this->_M_impl.destroy(this->_M_impl._M_finish); + } + iterator + insert(iterator __position, const value_type& __x); + void + insert(iterator __position, size_type __n, const value_type& __x) + { _M_fill_insert(__position, __n, __x); } + template + void + insert(iterator __position, _InputIterator __first, + _InputIterator __last) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_insert_dispatch(__position, __first, __last, _Integral()); + } + iterator + erase(iterator __position); + iterator + erase(iterator __first, iterator __last); + void + swap(vector& __x) + { + std::swap(this->_M_impl._M_start, __x._M_impl._M_start); + std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); + std::swap(this->_M_impl._M_end_of_storage, + __x._M_impl._M_end_of_storage); + std::__alloc_swap<_Tp_alloc_type>::_S_do_it(_M_get_Tp_allocator(), + __x._M_get_Tp_allocator()); + } + void + clear() + { _M_erase_at_end(this->_M_impl._M_start); } + public: + template + pointer + _M_allocate_and_copy(size_type __n, + _ForwardIterator __first, _ForwardIterator __last) + { + pointer __result = this->_M_allocate(__n); + try + { + std::__uninitialized_copy_a(__first, __last, __result, + _M_get_Tp_allocator()); + return __result; + } + catch(...) + { + _M_deallocate(__result, __n); + throw; + } + } + template + void + _M_initialize_dispatch(_Integer __n, _Integer __value, __true_type) + { + this->_M_impl._M_start = _M_allocate(static_cast(__n)); + this->_M_impl._M_end_of_storage = + this->_M_impl._M_start + static_cast(__n); + _M_fill_initialize(static_cast(__n), __value); + } + template + void + _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { + typedef typename std::iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_range_initialize(__first, __last, _IterCategory()); + } + template + void + _M_range_initialize(_InputIterator __first, + _InputIterator __last, std::input_iterator_tag) + { + for (; __first != __last; ++__first) + push_back(*__first); + } + template + void + _M_range_initialize(_ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag) + { + const size_type __n = std::distance(__first, __last); + this->_M_impl._M_start = this->_M_allocate(__n); + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + this->_M_impl._M_finish = + std::__uninitialized_copy_a(__first, __last, + this->_M_impl._M_start, + _M_get_Tp_allocator()); + } + void + _M_fill_initialize(size_type __n, const value_type& __value) + { + std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value, + _M_get_Tp_allocator()); + this->_M_impl._M_finish = this->_M_impl._M_end_of_storage; + } + template + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } + template + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { + typedef typename std::iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_assign_aux(__first, __last, _IterCategory()); + } + template + void + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag); + template + void + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag); + void + _M_fill_assign(size_type __n, const value_type& __val); + template + void + _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, + __true_type) + { _M_fill_insert(__pos, __n, __val); } + template + void + _M_insert_dispatch(iterator __pos, _InputIterator __first, + _InputIterator __last, __false_type) + { + typedef typename std::iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_range_insert(__pos, __first, __last, _IterCategory()); + } + template + void + _M_range_insert(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag); + template + void + _M_range_insert(iterator __pos, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag); + void + _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); + void + _M_insert_aux(iterator __position, const value_type& __x); + size_type + _M_check_len(size_type __n, const char* __s) const + { + if (max_size() - size() < __n) + __throw_length_error((__s)); + const size_type __len = size() + std::max(size(), __n); + return (__len < size() || __len > max_size()) ? max_size() : __len; + } + void + _M_erase_at_end(pointer __pos) + { + std::_Destroy(__pos, this->_M_impl._M_finish, _M_get_Tp_allocator()); + this->_M_impl._M_finish = __pos; + } + }; + template + inline bool + operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return (__x.size() == __y.size() + && std::equal(__x.begin(), __x.end(), __y.begin())); } + template + inline bool + operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return std::lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); } + template + inline bool + operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return __y < __x; } + template + inline bool + operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return !(__x < __y); } + template + inline void + swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) + { __x.swap(__y); } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + typedef unsigned long _Bit_type; + enum { _S_word_bit = int(8 * sizeof(_Bit_type)) }; + struct _Bit_reference + { + _Bit_type * _M_p; + _Bit_type _M_mask; + _Bit_reference(_Bit_type * __x, _Bit_type __y) + : _M_p(__x), _M_mask(__y) { } + _Bit_reference() : _M_p(0), _M_mask(0) { } + operator bool() const + { return !!(*_M_p & _M_mask); } + _Bit_reference& + operator=(bool __x) + { + if (__x) + *_M_p |= _M_mask; + else + *_M_p &= ~_M_mask; + return *this; + } + _Bit_reference& + operator=(const _Bit_reference& __x) + { return *this = bool(__x); } + bool + operator==(const _Bit_reference& __x) const + { return bool(*this) == bool(__x); } + bool + operator<(const _Bit_reference& __x) const + { return !bool(*this) && bool(__x); } + void + flip() + { *_M_p ^= _M_mask; } + }; + struct _Bit_iterator_base + : public std::iterator + { + _Bit_type * _M_p; + unsigned int _M_offset; + _Bit_iterator_base(_Bit_type * __x, unsigned int __y) + : _M_p(__x), _M_offset(__y) { } + void + _M_bump_up() + { + if (_M_offset++ == int(_S_word_bit) - 1) + { + _M_offset = 0; + ++_M_p; + } + } + void + _M_bump_down() + { + if (_M_offset-- == 0) + { + _M_offset = int(_S_word_bit) - 1; + --_M_p; + } + } + void + _M_incr(ptrdiff_t __i) + { + difference_type __n = __i + _M_offset; + _M_p += __n / int(_S_word_bit); + __n = __n % int(_S_word_bit); + if (__n < 0) + { + __n += int(_S_word_bit); + --_M_p; + } + _M_offset = static_cast(__n); + } + bool + operator==(const _Bit_iterator_base& __i) const + { return _M_p == __i._M_p && _M_offset == __i._M_offset; } + bool + operator<(const _Bit_iterator_base& __i) const + { + return _M_p < __i._M_p + || (_M_p == __i._M_p && _M_offset < __i._M_offset); + } + bool + operator!=(const _Bit_iterator_base& __i) const + { return !(*this == __i); } + bool + operator>(const _Bit_iterator_base& __i) const + { return __i < *this; } + bool + operator<=(const _Bit_iterator_base& __i) const + { return !(__i < *this); } + bool + operator>=(const _Bit_iterator_base& __i) const + { return !(*this < __i); } + }; + inline ptrdiff_t + operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) + { + return (int(_S_word_bit) * (__x._M_p - __y._M_p) + + __x._M_offset - __y._M_offset); + } + struct _Bit_iterator : public _Bit_iterator_base + { + typedef _Bit_reference reference; + typedef _Bit_reference* pointer; + typedef _Bit_iterator iterator; + _Bit_iterator() : _Bit_iterator_base(0, 0) { } + _Bit_iterator(_Bit_type * __x, unsigned int __y) + : _Bit_iterator_base(__x, __y) { } + reference + operator*() const + { return reference(_M_p, 1UL << _M_offset); } + iterator& + operator++() + { + _M_bump_up(); + return *this; + } + iterator + operator++(int) + { + iterator __tmp = *this; + _M_bump_up(); + return __tmp; + } + iterator& + operator--() + { + _M_bump_down(); + return *this; + } + iterator + operator--(int) + { + iterator __tmp = *this; + _M_bump_down(); + return __tmp; + } + iterator& + operator+=(difference_type __i) + { + _M_incr(__i); + return *this; + } + iterator& + operator-=(difference_type __i) + { + *this += -__i; + return *this; + } + iterator + operator+(difference_type __i) const + { + iterator __tmp = *this; + return __tmp += __i; + } + iterator + operator-(difference_type __i) const + { + iterator __tmp = *this; + return __tmp -= __i; + } + reference + operator[](difference_type __i) const + { return *(*this + __i); } + }; + inline _Bit_iterator + operator+(ptrdiff_t __n, const _Bit_iterator& __x) + { return __x + __n; } + struct _Bit_const_iterator : public _Bit_iterator_base + { + typedef bool reference; + typedef bool const_reference; + typedef const bool* pointer; + typedef _Bit_const_iterator const_iterator; + _Bit_const_iterator() : _Bit_iterator_base(0, 0) { } + _Bit_const_iterator(_Bit_type * __x, unsigned int __y) + : _Bit_iterator_base(__x, __y) { } + _Bit_const_iterator(const _Bit_iterator& __x) + : _Bit_iterator_base(__x._M_p, __x._M_offset) { } + const_reference + operator*() const + { return _Bit_reference(_M_p, 1UL << _M_offset); } + const_iterator& + operator++() + { + _M_bump_up(); + return *this; + } + const_iterator + operator++(int) + { + const_iterator __tmp = *this; + _M_bump_up(); + return __tmp; + } + const_iterator& + operator--() + { + _M_bump_down(); + return *this; + } + const_iterator + operator--(int) + { + const_iterator __tmp = *this; + _M_bump_down(); + return __tmp; + } + const_iterator& + operator+=(difference_type __i) + { + _M_incr(__i); + return *this; + } + const_iterator& + operator-=(difference_type __i) + { + *this += -__i; + return *this; + } + const_iterator + operator+(difference_type __i) const + { + const_iterator __tmp = *this; + return __tmp += __i; + } + const_iterator + operator-(difference_type __i) const + { + const_iterator __tmp = *this; + return __tmp -= __i; + } + const_reference + operator[](difference_type __i) const + { return *(*this + __i); } + }; + inline _Bit_const_iterator + operator+(ptrdiff_t __n, const _Bit_const_iterator& __x) + { return __x + __n; } + inline void + __fill_bvector(_Bit_iterator __first, _Bit_iterator __last, bool __x) + { + for (; __first != __last; ++__first) + *__first = __x; + } + inline void + fill(_Bit_iterator __first, _Bit_iterator __last, const bool& __x) + { + if (__first._M_p != __last._M_p) + { + std::fill(__first._M_p + 1, __last._M_p, __x ? ~0 : 0); + __fill_bvector(__first, _Bit_iterator(__first._M_p + 1, 0), __x); + __fill_bvector(_Bit_iterator(__last._M_p, 0), __last, __x); + } + else + __fill_bvector(__first, __last, __x); + } + template + struct _Bvector_base + { + typedef typename _Alloc::template rebind<_Bit_type>::other + _Bit_alloc_type; + struct _Bvector_impl + : public _Bit_alloc_type + { + _Bit_iterator _M_start; + _Bit_iterator _M_finish; + _Bit_type* _M_end_of_storage; + _Bvector_impl() + : _Bit_alloc_type(), _M_start(), _M_finish(), _M_end_of_storage(0) + { } + _Bvector_impl(const _Bit_alloc_type& __a) + : _Bit_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage(0) + { } + }; + public: + typedef _Alloc allocator_type; + _Bit_alloc_type& + _M_get_Bit_allocator() + { return *static_cast<_Bit_alloc_type*>(&this->_M_impl); } + const _Bit_alloc_type& + _M_get_Bit_allocator() const + { return *static_cast(&this->_M_impl); } + allocator_type + get_allocator() const + { return allocator_type(_M_get_Bit_allocator()); } + _Bvector_base() + : _M_impl() { } + _Bvector_base(const allocator_type& __a) + : _M_impl(__a) { } + ~_Bvector_base() + { this->_M_deallocate(); } + public: + _Bvector_impl _M_impl; + _Bit_type* + _M_allocate(size_t __n) + { return _M_impl.allocate((__n + int(_S_word_bit) - 1) + / int(_S_word_bit)); } + void + _M_deallocate() + { + if (_M_impl._M_start._M_p) + _M_impl.deallocate(_M_impl._M_start._M_p, + _M_impl._M_end_of_storage - _M_impl._M_start._M_p); + } + }; +} +namespace std __attribute__ ((__visibility__ ("default"))) { +template + class vector : public _Bvector_base<_Alloc> + { + typedef _Bvector_base<_Alloc> _Base; + public: + typedef bool value_type; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Bit_reference reference; + typedef bool const_reference; + typedef _Bit_reference* pointer; + typedef const bool* const_pointer; + typedef _Bit_iterator iterator; + typedef _Bit_const_iterator const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef _Alloc allocator_type; + allocator_type get_allocator() const + { return _Base::get_allocator(); } + public: + using _Base::_M_allocate; + using _Base::_M_deallocate; + using _Base::_M_get_Bit_allocator; + public: + vector() + : _Base() { } + explicit + vector(const allocator_type& __a) + : _Base(__a) { } + explicit + vector(size_type __n, const bool& __value = bool(), + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + _M_initialize(__n); + std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage, + __value ? ~0 : 0); + } + vector(const vector& __x) + : _Base(__x._M_get_Bit_allocator()) + { + _M_initialize(__x.size()); + _M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start); + } + template + vector(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_initialize_dispatch(__first, __last, _Integral()); + } + ~vector() { } + vector& + operator=(const vector& __x) + { + if (&__x == this) + return *this; + if (__x.size() > capacity()) + { + this->_M_deallocate(); + _M_initialize(__x.size()); + } + this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(), + begin()); + return *this; + } + void + assign(size_type __n, const bool& __x) + { _M_fill_assign(__n, __x); } + template + void + assign(_InputIterator __first, _InputIterator __last) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } + iterator + begin() + { return this->_M_impl._M_start; } + const_iterator + begin() const + { return this->_M_impl._M_start; } + iterator + end() + { return this->_M_impl._M_finish; } + const_iterator + end() const + { return this->_M_impl._M_finish; } + reverse_iterator + rbegin() + { return reverse_iterator(end()); } + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(end()); } + reverse_iterator + rend() + { return reverse_iterator(begin()); } + const_reverse_iterator + rend() const + { return const_reverse_iterator(begin()); } + size_type + size() const + { return size_type(end() - begin()); } + size_type + max_size() const + { + const size_type __isize = + __gnu_cxx::__numeric_traits::__max + - int(_S_word_bit) + 1; + const size_type __asize = _M_get_Bit_allocator().max_size(); + return (__asize <= __isize / int(_S_word_bit) + ? __asize * int(_S_word_bit) : __isize); + } + size_type + capacity() const + { return size_type(const_iterator(this->_M_impl._M_end_of_storage, 0) + - begin()); } + bool + empty() const + { return begin() == end(); } + reference + operator[](size_type __n) + { + return *iterator(this->_M_impl._M_start._M_p + + __n / int(_S_word_bit), __n % int(_S_word_bit)); + } + const_reference + operator[](size_type __n) const + { + return *const_iterator(this->_M_impl._M_start._M_p + + __n / int(_S_word_bit), __n % int(_S_word_bit)); + } + public: + void + _M_range_check(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range(("vector::_M_range_check")); + } + public: + reference + at(size_type __n) + { _M_range_check(__n); return (*this)[__n]; } + const_reference + at(size_type __n) const + { _M_range_check(__n); return (*this)[__n]; } + void + reserve(size_type __n); + reference + front() + { return *begin(); } + const_reference + front() const + { return *begin(); } + reference + back() + { return *(end() - 1); } + const_reference + back() const + { return *(end() - 1); } + void + data() { } + void + push_back(bool __x) + { + if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage) + *this->_M_impl._M_finish++ = __x; + else + _M_insert_aux(end(), __x); + } + void + swap(vector& __x) + { + std::swap(this->_M_impl._M_start, __x._M_impl._M_start); + std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); + std::swap(this->_M_impl._M_end_of_storage, + __x._M_impl._M_end_of_storage); + std::__alloc_swap:: + _S_do_it(_M_get_Bit_allocator(), __x._M_get_Bit_allocator()); + } + static void + swap(reference __x, reference __y) + { + bool __tmp = __x; + __x = __y; + __y = __tmp; + } + iterator + insert(iterator __position, const bool& __x = bool()) + { + const difference_type __n = __position - begin(); + if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage + && __position == end()) + *this->_M_impl._M_finish++ = __x; + else + _M_insert_aux(__position, __x); + return begin() + __n; + } + template + void + insert(iterator __position, + _InputIterator __first, _InputIterator __last) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_insert_dispatch(__position, __first, __last, _Integral()); + } + void + insert(iterator __position, size_type __n, const bool& __x) + { _M_fill_insert(__position, __n, __x); } + void + pop_back() + { --this->_M_impl._M_finish; } + iterator + erase(iterator __position) + { + if (__position + 1 != end()) + std::copy(__position + 1, end(), __position); + --this->_M_impl._M_finish; + return __position; + } + iterator + erase(iterator __first, iterator __last) + { + _M_erase_at_end(std::copy(__last, end(), __first)); + return __first; + } + void + resize(size_type __new_size, bool __x = bool()) + { + if (__new_size < size()) + _M_erase_at_end(begin() + difference_type(__new_size)); + else + insert(end(), __new_size - size(), __x); + } + void + flip() + { + for (_Bit_type * __p = this->_M_impl._M_start._M_p; + __p != this->_M_impl._M_end_of_storage; ++__p) + *__p = ~*__p; + } + void + clear() + { _M_erase_at_end(begin()); } + public: + iterator + _M_copy_aligned(const_iterator __first, const_iterator __last, + iterator __result) + { + _Bit_type* __q = std::copy(__first._M_p, __last._M_p, __result._M_p); + return std::copy(const_iterator(__last._M_p, 0), __last, + iterator(__q, 0)); + } + void + _M_initialize(size_type __n) + { + _Bit_type* __q = this->_M_allocate(__n); + this->_M_impl._M_end_of_storage = (__q + + ((__n + int(_S_word_bit) - 1) + / int(_S_word_bit))); + this->_M_impl._M_start = iterator(__q, 0); + this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n); + } + template + void + _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) + { + _M_initialize(static_cast(__n)); + std::fill(this->_M_impl._M_start._M_p, + this->_M_impl._M_end_of_storage, __x ? ~0 : 0); + } + template + void + _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { _M_initialize_range(__first, __last, + std::__iterator_category(__first)); } + template + void + _M_initialize_range(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + for (; __first != __last; ++__first) + push_back(*__first); + } + template + void + _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __n = std::distance(__first, __last); + _M_initialize(__n); + std::copy(__first, __last, this->_M_impl._M_start); + } + template + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } + template + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } + void + _M_fill_assign(size_t __n, bool __x) + { + if (__n > size()) + { + std::fill(this->_M_impl._M_start._M_p, + this->_M_impl._M_end_of_storage, __x ? ~0 : 0); + insert(end(), __n - size(), __x); + } + else + { + _M_erase_at_end(begin() + __n); + std::fill(this->_M_impl._M_start._M_p, + this->_M_impl._M_end_of_storage, __x ? ~0 : 0); + } + } + template + void + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + iterator __cur = begin(); + for (; __first != __last && __cur != end(); ++__cur, ++__first) + *__cur = *__first; + if (__first == __last) + _M_erase_at_end(__cur); + else + insert(end(), __first, __last); + } + template + void + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __len = std::distance(__first, __last); + if (__len < size()) + _M_erase_at_end(std::copy(__first, __last, begin())); + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, size()); + std::copy(__first, __mid, begin()); + insert(end(), __mid, __last); + } + } + template + void + _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, + __true_type) + { _M_fill_insert(__pos, __n, __x); } + template + void + _M_insert_dispatch(iterator __pos, + _InputIterator __first, _InputIterator __last, + __false_type) + { _M_insert_range(__pos, __first, __last, + std::__iterator_category(__first)); } + void + _M_fill_insert(iterator __position, size_type __n, bool __x); + template + void + _M_insert_range(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag) + { + for (; __first != __last; ++__first) + { + __pos = insert(__pos, *__first); + ++__pos; + } + } + template + void + _M_insert_range(iterator __position, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag); + void + _M_insert_aux(iterator __position, bool __x); + size_type + _M_check_len(size_type __n, const char* __s) const + { + if (max_size() - size() < __n) + __throw_length_error((__s)); + const size_type __len = size() + std::max(size(), __n); + return (__len < size() || __len > max_size()) ? max_size() : __len; + } + void + _M_erase_at_end(iterator __pos) + { this->_M_impl._M_finish = __pos; } + }; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + void + vector<_Tp, _Alloc>:: + reserve(size_type __n) + { + if (__n > this->max_size()) + __throw_length_error(("vector::reserve")); + if (this->capacity() < __n) + { + const size_type __old_size = size(); + pointer __tmp = _M_allocate_and_copy(__n, + (this->_M_impl._M_start), + (this->_M_impl._M_finish)); + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __tmp; + this->_M_impl._M_finish = __tmp + __old_size; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + } + } + template + typename vector<_Tp, _Alloc>::iterator + vector<_Tp, _Alloc>:: + insert(iterator __position, const value_type& __x) + { + const size_type __n = __position - begin(); + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage + && __position == end()) + { + this->_M_impl.construct(this->_M_impl._M_finish, __x); + ++this->_M_impl._M_finish; + } + else + { + _M_insert_aux(__position, __x); + } + return iterator(this->_M_impl._M_start + __n); + } + template + typename vector<_Tp, _Alloc>::iterator + vector<_Tp, _Alloc>:: + erase(iterator __position) + { + if (__position + 1 != end()) + std::copy(__position + 1, end(), __position); + --this->_M_impl._M_finish; + this->_M_impl.destroy(this->_M_impl._M_finish); + return __position; + } + template + typename vector<_Tp, _Alloc>::iterator + vector<_Tp, _Alloc>:: + erase(iterator __first, iterator __last) + { + if (__last != end()) + std::copy(__last, end(), __first); + _M_erase_at_end(__first.base() + (end() - __last)); + return __first; + } + template + vector<_Tp, _Alloc>& + vector<_Tp, _Alloc>:: + operator=(const vector<_Tp, _Alloc>& __x) + { + if (&__x != this) + { + const size_type __xlen = __x.size(); + if (__xlen > capacity()) + { + pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(), + __x.end()); + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __tmp; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen; + } + else if (size() >= __xlen) + { + std::_Destroy(std::copy(__x.begin(), __x.end(), begin()), + end(), _M_get_Tp_allocator()); + } + else + { + std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(), + this->_M_impl._M_start); + std::__uninitialized_copy_a(__x._M_impl._M_start + size(), + __x._M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + } + this->_M_impl._M_finish = this->_M_impl._M_start + __xlen; + } + return *this; + } + template + void + vector<_Tp, _Alloc>:: + _M_fill_assign(size_t __n, const value_type& __val) + { + if (__n > capacity()) + { + vector __tmp(__n, __val, _M_get_Tp_allocator()); + __tmp.swap(*this); + } + else if (__n > size()) + { + std::fill(begin(), end(), __val); + std::__uninitialized_fill_n_a(this->_M_impl._M_finish, + __n - size(), __val, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n - size(); + } + else + _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val)); + } + template + template + void + vector<_Tp, _Alloc>:: + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + pointer __cur(this->_M_impl._M_start); + for (; __first != __last && __cur != this->_M_impl._M_finish; + ++__cur, ++__first) + *__cur = *__first; + if (__first == __last) + _M_erase_at_end(__cur); + else + insert(end(), __first, __last); + } + template + template + void + vector<_Tp, _Alloc>:: + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __len = std::distance(__first, __last); + if (__len > capacity()) + { + pointer __tmp(_M_allocate_and_copy(__len, __first, __last)); + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __tmp; + this->_M_impl._M_finish = this->_M_impl._M_start + __len; + this->_M_impl._M_end_of_storage = this->_M_impl._M_finish; + } + else if (size() >= __len) + _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start)); + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, size()); + std::copy(__first, __mid, this->_M_impl._M_start); + this->_M_impl._M_finish = + std::__uninitialized_copy_a(__mid, __last, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + } + } + template + void + vector<_Tp, _Alloc>:: + _M_insert_aux(iterator __position, const _Tp& __x) + { + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + { + this->_M_impl.construct(this->_M_impl._M_finish, + (*(this->_M_impl._M_finish - 1)) + ); + ++this->_M_impl._M_finish; + _Tp __x_copy = __x; + std::copy_backward(__position.base(), this->_M_impl._M_finish - 2, this->_M_impl._M_finish - 1) + ; + *__position = __x_copy; + } + else + { + const size_type __len = + _M_check_len(size_type(1), "vector::_M_insert_aux"); + const size_type __elems_before = __position - begin(); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + try + { + this->_M_impl.construct(__new_start + __elems_before, + __x); + __new_finish = 0; + __new_finish = + std::__uninitialized_move_a(this->_M_impl._M_start, + __position.base(), __new_start, + _M_get_Tp_allocator()); + ++__new_finish; + __new_finish = + std::__uninitialized_move_a(__position.base(), + this->_M_impl._M_finish, + __new_finish, + _M_get_Tp_allocator()); + } + catch(...) + { + if (!__new_finish) + this->_M_impl.destroy(__new_start + __elems_before); + else + std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + } + template + void + vector<_Tp, _Alloc>:: + _M_fill_insert(iterator __position, size_type __n, const value_type& __x) + { + if (__n != 0) + { + if (size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_finish) >= __n) + { + value_type __x_copy = __x; + const size_type __elems_after = end() - __position; + pointer __old_finish(this->_M_impl._M_finish); + if (__elems_after > __n) + { + std::__uninitialized_move_a(this->_M_impl._M_finish - __n, + this->_M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n; + std::copy_backward(__position.base(), __old_finish - __n, __old_finish) + ; + std::fill(__position.base(), __position.base() + __n, + __x_copy); + } + else + { + std::__uninitialized_fill_n_a(this->_M_impl._M_finish, + __n - __elems_after, + __x_copy, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n - __elems_after; + std::__uninitialized_move_a(__position.base(), __old_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __elems_after; + std::fill(__position.base(), __old_finish, __x_copy); + } + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_fill_insert"); + const size_type __elems_before = __position - begin(); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + try + { + std::__uninitialized_fill_n_a(__new_start + __elems_before, + __n, __x, + _M_get_Tp_allocator()); + __new_finish = 0; + __new_finish = + std::__uninitialized_move_a(this->_M_impl._M_start, + __position.base(), + __new_start, + _M_get_Tp_allocator()); + __new_finish += __n; + __new_finish = + std::__uninitialized_move_a(__position.base(), + this->_M_impl._M_finish, + __new_finish, + _M_get_Tp_allocator()); + } + catch(...) + { + if (!__new_finish) + std::_Destroy(__new_start + __elems_before, + __new_start + __elems_before + __n, + _M_get_Tp_allocator()); + else + std::_Destroy(__new_start, __new_finish, + _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + } + } + template + template + void + vector<_Tp, _Alloc>:: + _M_range_insert(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag) + { + for (; __first != __last; ++__first) + { + __pos = insert(__pos, *__first); + ++__pos; + } + } + template + template + void + vector<_Tp, _Alloc>:: + _M_range_insert(iterator __position, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag) + { + if (__first != __last) + { + const size_type __n = std::distance(__first, __last); + if (size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_finish) >= __n) + { + const size_type __elems_after = end() - __position; + pointer __old_finish(this->_M_impl._M_finish); + if (__elems_after > __n) + { + std::__uninitialized_move_a(this->_M_impl._M_finish - __n, + this->_M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n; + std::copy_backward(__position.base(), __old_finish - __n, __old_finish) + ; + std::copy(__first, __last, __position); + } + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, __elems_after); + std::__uninitialized_copy_a(__mid, __last, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n - __elems_after; + std::__uninitialized_move_a(__position.base(), + __old_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __elems_after; + std::copy(__first, __mid, __position); + } + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_range_insert"); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + try + { + __new_finish = + std::__uninitialized_move_a(this->_M_impl._M_start, + __position.base(), + __new_start, + _M_get_Tp_allocator()); + __new_finish = + std::__uninitialized_copy_a(__first, __last, + __new_finish, + _M_get_Tp_allocator()); + __new_finish = + std::__uninitialized_move_a(__position.base(), + this->_M_impl._M_finish, + __new_finish, + _M_get_Tp_allocator()); + } + catch(...) + { + std::_Destroy(__new_start, __new_finish, + _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + } + } + template + void + vector:: + reserve(size_type __n) + { + if (__n > this->max_size()) + __throw_length_error(("vector::reserve")); + if (this->capacity() < __n) + { + _Bit_type* __q = this->_M_allocate(__n); + this->_M_impl._M_finish = _M_copy_aligned(begin(), end(), + iterator(__q, 0)); + this->_M_deallocate(); + this->_M_impl._M_start = iterator(__q, 0); + this->_M_impl._M_end_of_storage = (__q + (__n + int(_S_word_bit) - 1) + / int(_S_word_bit)); + } + } + template + void + vector:: + _M_fill_insert(iterator __position, size_type __n, bool __x) + { + if (__n == 0) + return; + if (capacity() - size() >= __n) + { + std::copy_backward(__position, end(), + this->_M_impl._M_finish + difference_type(__n)); + std::fill(__position, __position + difference_type(__n), __x); + this->_M_impl._M_finish += difference_type(__n); + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_fill_insert"); + _Bit_type * __q = this->_M_allocate(__len); + iterator __i = _M_copy_aligned(begin(), __position, + iterator(__q, 0)); + std::fill(__i, __i + difference_type(__n), __x); + this->_M_impl._M_finish = std::copy(__position, end(), + __i + difference_type(__n)); + this->_M_deallocate(); + this->_M_impl._M_end_of_storage = (__q + ((__len + + int(_S_word_bit) - 1) + / int(_S_word_bit))); + this->_M_impl._M_start = iterator(__q, 0); + } + } + template + template + void + vector:: + _M_insert_range(iterator __position, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag) + { + if (__first != __last) + { + size_type __n = std::distance(__first, __last); + if (capacity() - size() >= __n) + { + std::copy_backward(__position, end(), + this->_M_impl._M_finish + + difference_type(__n)); + std::copy(__first, __last, __position); + this->_M_impl._M_finish += difference_type(__n); + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_insert_range"); + _Bit_type * __q = this->_M_allocate(__len); + iterator __i = _M_copy_aligned(begin(), __position, + iterator(__q, 0)); + __i = std::copy(__first, __last, __i); + this->_M_impl._M_finish = std::copy(__position, end(), __i); + this->_M_deallocate(); + this->_M_impl._M_end_of_storage = (__q + + ((__len + + int(_S_word_bit) - 1) + / int(_S_word_bit))); + this->_M_impl._M_start = iterator(__q, 0); + } + } + } + template + void + vector:: + _M_insert_aux(iterator __position, bool __x) + { + if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage) + { + std::copy_backward(__position, this->_M_impl._M_finish, + this->_M_impl._M_finish + 1); + *__position = __x; + ++this->_M_impl._M_finish; + } + else + { + const size_type __len = + _M_check_len(size_type(1), "vector::_M_insert_aux"); + _Bit_type * __q = this->_M_allocate(__len); + iterator __i = _M_copy_aligned(begin(), __position, + iterator(__q, 0)); + *__i++ = __x; + this->_M_impl._M_finish = std::copy(__position, end(), __i); + this->_M_deallocate(); + this->_M_impl._M_end_of_storage = (__q + ((__len + + int(_S_word_bit) - 1) + / int(_S_word_bit))); + this->_M_impl._M_start = iterator(__q, 0); + } + } +} +extern "C" { +union wait + { + int w_status; + struct + { + unsigned int __w_termsig:7; + unsigned int __w_coredump:1; + unsigned int __w_retcode:8; + unsigned int:16; + } __wait_terminated; + struct + { + unsigned int __w_stopval:8; + unsigned int __w_stopsig:8; + unsigned int:16; + } __wait_stopped; + }; +typedef struct + { + int quot; + int rem; + } div_t; +typedef struct + { + long int quot; + long int rem; + } ldiv_t; +__extension__ typedef struct + { + long long int quot; + long long int rem; + } lldiv_t; +extern size_t __ctype_get_mb_cur_max (void) throw () __attribute__ ((__warn_unused_result__)); +extern double atof (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int atoi (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern long int atol (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +__extension__ extern long long int atoll (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern double strtod (__const char *__restrict __nptr, + char **__restrict __endptr) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern float strtof (__const char *__restrict __nptr, + char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern long double strtold (__const char *__restrict __nptr, + char **__restrict __endptr) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern long int strtol (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern unsigned long int strtoul (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +__extension__ +extern long long int strtoq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +__extension__ +extern unsigned long long int strtouq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +__extension__ +extern long long int strtoll (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +__extension__ +extern unsigned long long int strtoull (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern long int strtol_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); +extern unsigned long int strtoul_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); +__extension__ +extern long long int strtoll_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); +__extension__ +extern unsigned long long int strtoull_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); +extern double strtod_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); +extern float strtof_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); +extern long double strtold_l (__const char *__restrict __nptr, + char **__restrict __endptr, + __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); +extern __inline __attribute__ ((__gnu_inline__)) double +atof (__const char *__nptr) throw () +{ + return strtod (__nptr, (char **) __null); +} +extern __inline __attribute__ ((__gnu_inline__)) int +atoi (__const char *__nptr) throw () +{ + return (int) strtol (__nptr, (char **) __null, 10); +} +extern __inline __attribute__ ((__gnu_inline__)) long int +atol (__const char *__nptr) throw () +{ + return strtol (__nptr, (char **) __null, 10); +} +__extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int +atoll (__const char *__nptr) throw () +{ + return strtoll (__nptr, (char **) __null, 10); +} +extern char *l64a (long int __n) throw () __attribute__ ((__warn_unused_result__)); +extern long int a64l (__const char *__s) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern "C" { +typedef __u_char u_char; +typedef __u_short u_short; +typedef __u_int u_int; +typedef __u_long u_long; +typedef __quad_t quad_t; +typedef __u_quad_t u_quad_t; +typedef __fsid_t fsid_t; +typedef __loff_t loff_t; +typedef __ino_t ino_t; +typedef __ino64_t ino64_t; +typedef __dev_t dev_t; +typedef __mode_t mode_t; +typedef __nlink_t nlink_t; +typedef __id_t id_t; +typedef __daddr_t daddr_t; +typedef __caddr_t caddr_t; +typedef __key_t key_t; +typedef __suseconds_t suseconds_t; +typedef unsigned long int ulong; +typedef unsigned short int ushort; +typedef unsigned int uint; +typedef int int8_t __attribute__ ((__mode__ (__QI__))); +typedef int int16_t __attribute__ ((__mode__ (__HI__))); +typedef int int32_t __attribute__ ((__mode__ (__SI__))); +typedef int int64_t __attribute__ ((__mode__ (__DI__))); +typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); +typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); +typedef int register_t __attribute__ ((__mode__ (__word__))); +struct timeval + { + __time_t tv_sec; + __suseconds_t tv_usec; + }; +typedef long int __fd_mask; +typedef struct + { + __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; + } fd_set; +typedef __fd_mask fd_mask; +extern "C" { +extern int select (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + struct timeval *__restrict __timeout); +extern int pselect (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + const struct timespec *__restrict __timeout, + const __sigset_t *__restrict __sigmask); +} +__extension__ +extern unsigned int gnu_dev_major (unsigned long long int __dev) + throw (); +__extension__ +extern unsigned int gnu_dev_minor (unsigned long long int __dev) + throw (); +__extension__ +extern unsigned long long int gnu_dev_makedev (unsigned int __major, + unsigned int __minor) + throw (); +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int +gnu_dev_major (unsigned long long int __dev) throw () +{ + return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); +} +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int +gnu_dev_minor (unsigned long long int __dev) throw () +{ + return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); +} +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned long long int +gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw () +{ + return ((__minor & 0xff) | ((__major & 0xfff) << 8) + | (((unsigned long long int) (__minor & ~0xff)) << 12) + | (((unsigned long long int) (__major & ~0xfff)) << 32)); +} +typedef __blksize_t blksize_t; +typedef __blkcnt_t blkcnt_t; +typedef __fsblkcnt_t fsblkcnt_t; +typedef __fsfilcnt_t fsfilcnt_t; +typedef __blkcnt64_t blkcnt64_t; +typedef __fsblkcnt64_t fsblkcnt64_t; +typedef __fsfilcnt64_t fsfilcnt64_t; +} +extern long int random (void) throw (); +extern void srandom (unsigned int __seed) throw (); +extern char *initstate (unsigned int __seed, char *__statebuf, + size_t __statelen) throw () __attribute__ ((__nonnull__ (2))); +extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1))); +struct random_data + { + int32_t *fptr; + int32_t *rptr; + int32_t *state; + int rand_type; + int rand_deg; + int rand_sep; + int32_t *end_ptr; + }; +extern int random_r (struct random_data *__restrict __buf, + int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int srandom_r (unsigned int __seed, struct random_data *__buf) + throw () __attribute__ ((__nonnull__ (2))); +extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, + size_t __statelen, + struct random_data *__restrict __buf) + throw () __attribute__ ((__nonnull__ (2, 4))); +extern int setstate_r (char *__restrict __statebuf, + struct random_data *__restrict __buf) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int rand (void) throw (); +extern void srand (unsigned int __seed) throw (); +extern int rand_r (unsigned int *__seed) throw (); +extern double drand48 (void) throw (); +extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); +extern long int lrand48 (void) throw (); +extern long int nrand48 (unsigned short int __xsubi[3]) + throw () __attribute__ ((__nonnull__ (1))); +extern long int mrand48 (void) throw (); +extern long int jrand48 (unsigned short int __xsubi[3]) + throw () __attribute__ ((__nonnull__ (1))); +extern void srand48 (long int __seedval) throw (); +extern unsigned short int *seed48 (unsigned short int __seed16v[3]) + throw () __attribute__ ((__nonnull__ (1))); +extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1))); +struct drand48_data + { + unsigned short int __x[3]; + unsigned short int __old_x[3]; + unsigned short int __c; + unsigned short int __init; + unsigned long long int __a; + }; +extern int drand48_r (struct drand48_data *__restrict __buffer, + double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int erand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int lrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int nrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int mrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int jrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int srand48_r (long int __seedval, struct drand48_data *__buffer) + throw () __attribute__ ((__nonnull__ (2))); +extern int seed48_r (unsigned short int __seed16v[3], + struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int lcong48_r (unsigned short int __param[7], + struct drand48_data *__buffer) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); +extern void *calloc (size_t __nmemb, size_t __size) + throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); +extern void *realloc (void *__ptr, size_t __size) + throw () __attribute__ ((__warn_unused_result__)); +extern void free (void *__ptr) throw (); +extern void cfree (void *__ptr) throw (); +extern "C" { +extern void *alloca (size_t __size) throw (); +} +extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); +extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern void abort (void) throw () __attribute__ ((__noreturn__)); +extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1))); +extern "C++" int at_quick_exit (void (*__func) (void)) + throw () __asm ("at_quick_exit") __attribute__ ((__nonnull__ (1))); +extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) + throw () __attribute__ ((__nonnull__ (1))); +extern void exit (int __status) throw () __attribute__ ((__noreturn__)); +extern void quick_exit (int __status) throw () __attribute__ ((__noreturn__)); +extern void _Exit (int __status) throw () __attribute__ ((__noreturn__)); +extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern char *__secure_getenv (__const char *__name) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1))); +extern int setenv (__const char *__name, __const char *__value, int __replace) + throw () __attribute__ ((__nonnull__ (2))); +extern int unsetenv (__const char *__name) throw (); +extern int clearenv (void) throw (); +extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkstemps64 (char *__template, int __suffixlen) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkostemps (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkostemps64 (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int system (__const char *__command) __attribute__ ((__warn_unused_result__)); +extern char *canonicalize_file_name (__const char *__name) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern char *realpath (__const char *__restrict __name, + char *__restrict __resolved) throw () __attribute__ ((__warn_unused_result__)); +typedef int (*__compar_fn_t) (__const void *, __const void *); +typedef __compar_fn_t comparison_fn_t; +typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *); +extern void *bsearch (__const void *__key, __const void *__base, + size_t __nmemb, size_t __size, __compar_fn_t __compar) + __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__)); +extern void qsort (void *__base, size_t __nmemb, size_t __size, + __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); +extern void qsort_r (void *__base, size_t __nmemb, size_t __size, + __compar_d_fn_t __compar, void *__arg) + __attribute__ ((__nonnull__ (1, 4))); +extern int abs (int __x) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern long int labs (long int __x) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +__extension__ extern long long int llabs (long long int __x) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern div_t div (int __numer, int __denom) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern ldiv_t ldiv (long int __numer, long int __denom) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +__extension__ extern lldiv_t lldiv (long long int __numer, + long long int __denom) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *gcvt (double __value, int __ndigit, char *__buf) + throw () __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); +extern char *qecvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qfcvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qgcvt (long double __value, int __ndigit, char *__buf) + throw () __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); +extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); +extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); +extern int qecvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (3, 4, 5))); +extern int qfcvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (3, 4, 5))); +extern int mblen (__const char *__s, size_t __n) throw () __attribute__ ((__warn_unused_result__)); +extern int mbtowc (wchar_t *__restrict __pwc, + __const char *__restrict __s, size_t __n) throw () __attribute__ ((__warn_unused_result__)); +extern int wctomb (char *__s, wchar_t __wchar) throw () __attribute__ ((__warn_unused_result__)); +extern size_t mbstowcs (wchar_t *__restrict __pwcs, + __const char *__restrict __s, size_t __n) throw (); +extern size_t wcstombs (char *__restrict __s, + __const wchar_t *__restrict __pwcs, size_t __n) + throw (); +extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int getsubopt (char **__restrict __optionp, + char *__const *__restrict __tokens, + char **__restrict __valuep) + throw () __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__)); +extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1))); +extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__)); +extern int grantpt (int __fd) throw (); +extern int unlockpt (int __fd) throw (); +extern char *ptsname (int __fd) throw () __attribute__ ((__warn_unused_result__)); +extern int ptsname_r (int __fd, char *__buf, size_t __buflen) + throw () __attribute__ ((__nonnull__ (2))); +extern int getpt (void); +extern int getloadavg (double __loadavg[], int __nelem) + throw () __attribute__ ((__nonnull__ (1))); +extern char *__realpath_chk (__const char *__restrict __name, + char *__restrict __resolved, + size_t __resolvedlen) throw () __attribute__ ((__warn_unused_result__)); +extern char *__realpath_alias (__const char *__restrict __name, char *__restrict __resolved) throw () __asm__ ("" "realpath") + __attribute__ ((__warn_unused_result__)); +extern char *__realpath_chk_warn (__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) throw () __asm__ ("" "__realpath_chk") + __attribute__ ((__warn_unused_result__)) + __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +realpath (__const char *__restrict __name, char *__restrict __resolved) throw () +{ + if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1) + { + return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); + } + return __realpath_alias (__name, __resolved); +} +extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, + size_t __nreal) throw () __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) throw () __asm__ ("" "ptsname_r") + __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__ptsname_r_chk") + __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +ptsname_r (int __fd, char *__buf, size_t __buflen) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __ptsname_r_alias (__fd, __buf, __buflen); +} +extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) + throw () __attribute__ ((__warn_unused_result__)); +extern int __wctomb_alias (char *__s, wchar_t __wchar) throw () __asm__ ("" "wctomb") + __attribute__ ((__warn_unused_result__)); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) int +wctomb (char *__s, wchar_t __wchar) throw () +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) + return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1)); + return __wctomb_alias (__s, __wchar); +} +extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, + __const char *__restrict __src, + size_t __len, size_t __dstlen) throw (); +extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) throw () __asm__ ("" "mbstowcs") + ; +extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) throw () __asm__ ("" "__mbstowcs_chk") + __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +mbstowcs (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) throw () +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __mbstowcs_chk (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) + return __mbstowcs_chk_warn (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + } + return __mbstowcs_alias (__dst, __src, __len); +} +extern size_t __wcstombs_chk (char *__restrict __dst, + __const wchar_t *__restrict __src, + size_t __len, size_t __dstlen) throw (); +extern size_t __wcstombs_alias (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) throw () __asm__ ("" "wcstombs") + ; +extern size_t __wcstombs_chk_warn (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) throw () __asm__ ("" "__wcstombs_chk") + __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len"))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +wcstombs (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) throw () +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + if (__len > __builtin_object_size (__dst, 2 > 1)) + return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + } + return __wcstombs_alias (__dst, __src, __len); +} +} +typedef QtValidLicenseForCoreModule QtCoreModule; +struct QVectorData +{ + QBasicAtomicInt ref; + int alloc; + int size; + uint sharable : 1; + uint capacity : 1; + uint reserved : 30; + static QVectorData shared_null; + static QVectorData *malloc(int sizeofTypedData, int size, int sizeofT, QVectorData *init); + static QVectorData *allocate(int size, int alignment); + static QVectorData *reallocate(QVectorData *old, int newsize, int oldsize, int alignment); + static void free(QVectorData *data, int alignment); + static int grow(int sizeofTypedData, int size, int sizeofT, bool excessive); +}; +template +struct QVectorTypedData : private QVectorData +{ + T array[1]; + static inline void free(QVectorTypedData *x, int alignment) { QVectorData::free(static_cast(x), alignment); } +}; +class QRegion; +template +class QVector +{ + typedef QVectorTypedData Data; + union { + QVectorData *d; + Data *p; + }; +public: + inline QVector() : d(&QVectorData::shared_null) { d->ref.ref(); } + explicit QVector(int size); + QVector(int size, const T &t); + inline QVector(const QVector &v) : d(v.d) { d->ref.ref(); if (!d->sharable) detach_helper(); } + inline ~QVector() { if (!d) return; if (!d->ref.deref()) free(p); } + QVector &operator=(const QVector &v); + bool operator==(const QVector &v) const; + inline bool operator!=(const QVector &v) const { return !(*this == v); } + inline int size() const { return d->size; } + inline bool isEmpty() const { return d->size == 0; } + void resize(int size); + inline int capacity() const { return d->alloc; } + void reserve(int size); + inline void squeeze() { realloc(d->size, d->size); d->capacity = 0; } + inline void detach() { if (d->ref != 1) detach_helper(); } + inline bool isDetached() const { return d->ref == 1; } + inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; } + inline T *data() { detach(); return p->array; } + inline const T *data() const { return p->array; } + inline const T *constData() const { return p->array; } + void clear(); + const T &at(int i) const; + T &operator[](int i); + const T &operator[](int i) const; + void append(const T &t); + void prepend(const T &t); + void insert(int i, const T &t); + void insert(int i, int n, const T &t); + void replace(int i, const T &t); + void remove(int i); + void remove(int i, int n); + QVector &fill(const T &t, int size = -1); + int indexOf(const T &t, int from = 0) const; + int lastIndexOf(const T &t, int from = -1) const; + bool contains(const T &t) const; + int count(const T &t) const; + typedef T* iterator; + typedef const T* const_iterator; + inline iterator begin() { detach(); return p->array; } + inline const_iterator begin() const { return p->array; } + inline const_iterator constBegin() const { return p->array; } + inline iterator end() { detach(); return p->array + d->size; } + inline const_iterator end() const { return p->array + d->size; } + inline const_iterator constEnd() const { return p->array + d->size; } + iterator insert(iterator before, int n, const T &x); + inline iterator insert(iterator before, const T &x) { return insert(before, 1, x); } + iterator erase(iterator begin, iterator end); + inline iterator erase(iterator pos) { return erase(pos, pos+1); } + inline int count() const { return d->size; } + inline T& first() { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qvector.h",246) : qt_noop()); return *begin(); } + inline const T &first() const { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qvector.h",247) : qt_noop()); return *begin(); } + inline T& last() { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qvector.h",248) : qt_noop()); return *(end()-1); } + inline const T &last() const { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qvector.h",249) : qt_noop()); return *(end()-1); } + inline bool startsWith(const T &t) const { return !isEmpty() && first() == t; } + inline bool endsWith(const T &t) const { return !isEmpty() && last() == t; } + QVector mid(int pos, int length = -1) const; + T value(int i) const; + T value(int i, const T &defaultValue) const; + typedef T value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef ptrdiff_t difference_type; + typedef iterator Iterator; + typedef const_iterator ConstIterator; + typedef int size_type; + inline void push_back(const T &t) { append(t); } + inline void push_front(const T &t) { prepend(t); } + void pop_back() { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qvector.h",269) : qt_noop()); erase(end()-1); } + void pop_front() { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qvector.h",270) : qt_noop()); erase(begin()); } + inline bool empty() const + { return d->size == 0; } + inline T& front() { return first(); } + inline const_reference front() const { return first(); } + inline reference back() { return last(); } + inline const_reference back() const { return last(); } + QVector &operator+=(const QVector &l); + inline QVector operator+(const QVector &l) const + { QVector n = *this; n += l; return n; } + inline QVector &operator+=(const T &t) + { append(t); return *this; } + inline QVector &operator<< (const T &t) + { append(t); return *this; } + inline QVector &operator<<(const QVector &l) + { *this += l; return *this; } + QList toList() const; + static QVector fromList(const QList &list); + static inline QVector fromStdVector(const std::vector &vector) + { QVector tmp; qCopy(vector.begin(), vector.end(), std::back_inserter(tmp)); return tmp; } + inline std::vector toStdVector() const + { std::vector tmp; qCopy(constBegin(), constEnd(), std::back_inserter(tmp)); return tmp; } +private: + friend class QRegion; + void detach_helper(); + QVectorData *malloc(int alloc); + void realloc(int size, int alloc); + void free(Data *d); + int sizeOfTypedData() { + return reinterpret_cast(&(reinterpret_cast(this))->array[1]) - reinterpret_cast(this); + } + inline int alignOfTypedData() const + { + return qMax(sizeof(void*), __alignof__(Data)); + } +}; +template +void QVector::detach_helper() +{ realloc(d->size, d->alloc); } +template +void QVector::reserve(int asize) +{ if (asize > d->alloc) realloc(d->size, asize); if (d->ref == 1) d->capacity = 1; } +template +void QVector::resize(int asize) +{ realloc(asize, (asize > d->alloc || (!d->capacity && asize < d->size && asize < (d->alloc >> 1))) ? + QVectorData::grow(sizeOfTypedData(), asize, sizeof(T), QTypeInfo::isStatic) + : d->alloc); } +template +inline void QVector::clear() +{ *this = QVector(); } +template +inline const T &QVector::at(int i) const +{ ((!(i >= 0 && i < d->size)) ? qt_assert_x("QVector::at", "index out of range","/usr/include/qt4/QtCore/qvector.h",338) : qt_noop()); + return p->array[i]; } +template +inline const T &QVector::operator[](int i) const +{ ((!(i >= 0 && i < d->size)) ? qt_assert_x("QVector::operator[]", "index out of range","/usr/include/qt4/QtCore/qvector.h",342) : qt_noop()); + return p->array[i]; } +template +inline T &QVector::operator[](int i) +{ ((!(i >= 0 && i < d->size)) ? qt_assert_x("QVector::operator[]", "index out of range","/usr/include/qt4/QtCore/qvector.h",346) : qt_noop()); + return data()[i]; } +template +inline void QVector::insert(int i, const T &t) +{ ((!(i >= 0 && i <= d->size)) ? qt_assert_x("QVector::insert", "index out of range","/usr/include/qt4/QtCore/qvector.h",350) : qt_noop()); + insert(begin() + i, 1, t); } +template +inline void QVector::insert(int i, int n, const T &t) +{ ((!(i >= 0 && i <= d->size)) ? qt_assert_x("QVector::insert", "index out of range","/usr/include/qt4/QtCore/qvector.h",354) : qt_noop()); + insert(begin() + i, n, t); } +template +inline void QVector::remove(int i, int n) +{ ((!(i >= 0 && n >= 0 && i + n <= d->size)) ? qt_assert_x("QVector::remove", "index out of range","/usr/include/qt4/QtCore/qvector.h",358) : qt_noop()); + erase(begin() + i, begin() + i + n); } +template +inline void QVector::remove(int i) +{ ((!(i >= 0 && i < d->size)) ? qt_assert_x("QVector::remove", "index out of range","/usr/include/qt4/QtCore/qvector.h",362) : qt_noop()); + erase(begin() + i, begin() + i + 1); } +template +inline void QVector::prepend(const T &t) +{ insert(begin(), 1, t); } +template +inline void QVector::replace(int i, const T &t) +{ + ((!(i >= 0 && i < d->size)) ? qt_assert_x("QVector::replace", "index out of range","/usr/include/qt4/QtCore/qvector.h",371) : qt_noop()); + const T copy(t); + data()[i] = copy; +} +template +QVector &QVector::operator=(const QVector &v) +{ + v.d->ref.ref(); + if (!d->ref.deref()) + free(p); + d = v.d; + if (!d->sharable) + detach_helper(); + return *this; +} +template +inline QVectorData *QVector::malloc(int aalloc) +{ + QVectorData *vectordata = QVectorData::allocate(sizeOfTypedData() + (aalloc - 1) * sizeof(T), alignOfTypedData()); + do { if (!(vectordata)) qBadAlloc(); } while (0); + return vectordata; +} +template +QVector::QVector(int asize) +{ + d = malloc(asize); + d->ref = 1; + d->alloc = d->size = asize; + d->sharable = true; + d->capacity = false; + if (QTypeInfo::isComplex) { + T* b = p->array; + T* i = p->array + d->size; + while (i != b) + new (--i) T; + } else { + qMemSet(p->array, 0, asize * sizeof(T)); + } +} +template +QVector::QVector(int asize, const T &t) +{ + d = malloc(asize); + d->ref = 1; + d->alloc = d->size = asize; + d->sharable = true; + d->capacity = false; + T* i = p->array + d->size; + while (i != p->array) + new (--i) T(t); +} +template +void QVector::free(Data *x) +{ + if (QTypeInfo::isComplex) { + T* b = x->array; + union { QVectorData *d; Data *p; } u; + u.p = x; + T* i = b + u.d->size; + while (i-- != b) + i->~T(); + } + x->free(x, alignOfTypedData()); +} +template +void QVector::realloc(int asize, int aalloc) +{ + ((!(asize <= aalloc)) ? qt_assert("asize <= aalloc","/usr/include/qt4/QtCore/qvector.h",444) : qt_noop()); + T *pOld; + T *pNew; + union { QVectorData *d; Data *p; } x; + x.d = d; + if (QTypeInfo::isComplex && asize < d->size && d->ref == 1 ) { + pOld = p->array + d->size; + pNew = p->array + asize; + while (asize < d->size) { + (--pOld)->~T(); + d->size--; + } + } + if (aalloc != d->alloc || d->ref != 1) { + if (QTypeInfo::isStatic) { + x.d = malloc(aalloc); + do { if (!(x.p)) qBadAlloc(); } while (0); + x.d->size = 0; + } else if (d->ref != 1) { + x.d = malloc(aalloc); + do { if (!(x.p)) qBadAlloc(); } while (0); + if (QTypeInfo::isComplex) { + x.d->size = 0; + } else { + ::memcpy(x.p, p, sizeOfTypedData() + (qMin(aalloc, d->alloc) - 1) * sizeof(T)); + x.d->size = d->size; + } + } else { + try { + QVectorData *mem = QVectorData::reallocate(d, sizeOfTypedData() + (aalloc - 1) * sizeof(T), + sizeOfTypedData() + (d->alloc - 1) * sizeof(T), alignOfTypedData()); + do { if (!(mem)) qBadAlloc(); } while (0); + x.d = d = mem; + x.d->size = d->size; + } catch (const std::bad_alloc &) { + if (aalloc > d->alloc) + throw; + } + } + x.d->ref = 1; + x.d->alloc = aalloc; + x.d->sharable = true; + x.d->capacity = d->capacity; + x.d->reserved = 0; + } + if (QTypeInfo::isComplex) { + try { + pOld = p->array + x.d->size; + pNew = x.p->array + x.d->size; + const int toMove = qMin(asize, d->size); + while (x.d->size < toMove) { + new (pNew++) T(*pOld++); + x.d->size++; + } + while (x.d->size < asize) { + new (pNew++) T; + x.d->size++; + } + } catch (...) { + free(x.p); + throw; + } + } else if (asize > x.d->size) { + qMemSet(x.p->array + x.d->size, 0, (asize - x.d->size) * sizeof(T)); + } + x.d->size = asize; + if (d != x.d) { + if (!d->ref.deref()) + free(p); + d = x.d; + } +} +template + T QVector::value(int i) const +{ + if (i < 0 || i >= d->size) { + return T(); + } + return p->array[i]; +} +template + T QVector::value(int i, const T &defaultValue) const +{ + return ((i < 0 || i >= d->size) ? defaultValue : p->array[i]); +} +template +void QVector::append(const T &t) +{ + if (d->ref != 1 || d->size + 1 > d->alloc) { + const T copy(t); + realloc(d->size, QVectorData::grow(sizeOfTypedData(), d->size + 1, sizeof(T), + QTypeInfo::isStatic)); + if (QTypeInfo::isComplex) + new (p->array + d->size) T(copy); + else + p->array[d->size] = copy; + } else { + if (QTypeInfo::isComplex) + new (p->array + d->size) T(t); + else + p->array[d->size] = t; + } + ++d->size; +} +template +typename QVector::iterator QVector::insert(iterator before, size_type n, const T &t) +{ + int offset = int(before - p->array); + if (n != 0) { + const T copy(t); + if (d->ref != 1 || d->size + n > d->alloc) + realloc(d->size, QVectorData::grow(sizeOfTypedData(), d->size + n, sizeof(T), + QTypeInfo::isStatic)); + if (QTypeInfo::isStatic) { + T *b = p->array + d->size; + T *i = p->array + d->size + n; + while (i != b) + new (--i) T; + i = p->array + d->size; + T *j = i + n; + b = p->array + offset; + while (i != b) + *--j = *--i; + i = b+n; + while (i != b) + *--i = copy; + } else { + T *b = p->array + offset; + T *i = b + n; + memmove(i, b, (d->size - offset) * sizeof(T)); + while (i != b) + new (--i) T(copy); + } + d->size += n; + } + return p->array + offset; +} +template +typename QVector::iterator QVector::erase(iterator abegin, iterator aend) +{ + int f = int(abegin - p->array); + int l = int(aend - p->array); + int n = l - f; + detach(); + if (QTypeInfo::isComplex) { + qCopy(p->array+l, p->array+d->size, p->array+f); + T *i = p->array+d->size; + T* b = p->array+d->size-n; + while (i != b) { + --i; + i->~T(); + } + } else { + memmove(p->array + f, p->array + l, (d->size-l)*sizeof(T)); + } + d->size -= n; + return p->array + f; +} +template +bool QVector::operator==(const QVector &v) const +{ + if (d->size != v.d->size) + return false; + if (d == v.d) + return true; + T* b = p->array; + T* i = b + d->size; + T* j = v.p->array + d->size; + while (i != b) + if (!(*--i == *--j)) + return false; + return true; +} +template +QVector &QVector::fill(const T &from, int asize) +{ + const T copy(from); + resize(asize < 0 ? d->size : asize); + if (d->size) { + T *i = p->array + d->size; + T *b = p->array; + while (i != b) + *--i = copy; + } + return *this; +} +template +QVector &QVector::operator+=(const QVector &l) +{ + int newSize = d->size + l.d->size; + realloc(d->size, newSize); + T *w = p->array + newSize; + T *i = l.p->array + l.d->size; + T *b = l.p->array; + while (i != b) { + if (QTypeInfo::isComplex) + new (--w) T(*--i); + else + *--w = *--i; + } + d->size = newSize; + return *this; +} +template +int QVector::indexOf(const T &t, int from) const +{ + if (from < 0) + from = qMax(from + d->size, 0); + if (from < d->size) { + T* n = p->array + from - 1; + T* e = p->array + d->size; + while (++n != e) + if (*n == t) + return n - p->array; + } + return -1; +} +template +int QVector::lastIndexOf(const T &t, int from) const +{ + if (from < 0) + from += d->size; + else if (from >= d->size) + from = d->size-1; + if (from >= 0) { + T* b = p->array; + T* n = p->array + from + 1; + while (n != b) { + if (*--n == t) + return n - b; + } + } + return -1; +} +template +bool QVector::contains(const T &t) const +{ + T* b = p->array; + T* i = p->array + d->size; + while (i != b) + if (*--i == t) + return true; + return false; +} +template +int QVector::count(const T &t) const +{ + int c = 0; + T* b = p->array; + T* i = p->array + d->size; + while (i != b) + if (*--i == t) + ++c; + return c; +} +template + QVector QVector::mid(int pos, int length) const +{ + if (length < 0) + length = size() - pos; + if (pos == 0 && length == size()) + return *this; + QVector copy; + if (pos + length > size()) + length = size() - pos; + for (int i = pos; i < pos + length; ++i) + copy += at(i); + return copy; +} +template + QList QVector::toList() const +{ + QList result; + for (int i = 0; i < size(); ++i) + result.append(at(i)); + return result; +} +template + QVector QList::toVector() const +{ + QVector result(size()); + for (int i = 0; i < size(); ++i) + result[i] = at(i); + return result; +} +template +QVector QVector::fromList(const QList &list) +{ + return list.toVector(); +} +template +QList QList::fromVector(const QVector &vector) +{ + return vector.toList(); +} +template class QVectorIterator { typedef typename QVector::const_iterator const_iterator; QVector c; const_iterator i; public: inline QVectorIterator(const QVector &container) : c(container), i(c.constBegin()) {} inline QVectorIterator &operator=(const QVector &container) { c = container; i = c.constBegin(); return *this; } inline void toFront() { i = c.constBegin(); } inline void toBack() { i = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline const T &next() { return *i++; } inline const T &peekNext() const { return *i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline const T &previous() { return *--i; } inline const T &peekPrevious() const { const_iterator p = i; return *--p; } inline bool findNext(const T &t) { while (i != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(--i) == t) return true; return false; } }; +template class QMutableVectorIterator { typedef typename QVector::iterator iterator; typedef typename QVector::const_iterator const_iterator; QVector *c; iterator i, n; inline bool item_exists() const { return const_iterator(n) != c->constEnd(); } public: inline QMutableVectorIterator(QVector &container) : c(&container) { c->setSharable(false); i = c->begin(); n = c->end(); } inline ~QMutableVectorIterator() { c->setSharable(true); } inline QMutableVectorIterator &operator=(QVector &container) { c->setSharable(true); c = &container; c->setSharable(false); i = c->begin(); n = c->end(); return *this; } inline void toFront() { i = c->begin(); n = c->end(); } inline void toBack() { i = c->end(); n = i; } inline bool hasNext() const { return c->constEnd() != const_iterator(i); } inline T &next() { n = i++; return *n; } inline T &peekNext() const { return *i; } inline bool hasPrevious() const { return c->constBegin() != const_iterator(i); } inline T &previous() { n = --i; return *n; } inline T &peekPrevious() const { iterator p = i; return *--p; } inline void remove() { if (c->constEnd() != const_iterator(n)) { i = c->erase(n); n = c->end(); } } inline void setValue(const T &t) const { if (c->constEnd() != const_iterator(n)) *n = t; } inline T &value() { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qvector.h",769) : qt_noop()); return *n; } inline const T &value() const { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qvector.h",769) : qt_noop()); return *n; } inline void insert(const T &t) { n = i = c->insert(i, t); ++i; } inline bool findNext(const T &t) { while (c->constEnd() != const_iterator(n = i)) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (c->constBegin() != const_iterator(i)) if (*(n = --i) == t) return true; n = c->end(); return false; } }; +typedef QtValidLicenseForGuiModule QtGuiModule; +class QMatrix; +class QTransform; +class QRect; +class QVariant; +class QPolygon : public QVector +{ +public: + inline QPolygon() {} + inline ~QPolygon() {} + inline QPolygon(int size); + inline QPolygon(const QPolygon &a) : QVector(a) {} + inline QPolygon(const QVector &v) : QVector(v) {} + QPolygon(const QRect &r, bool closed=false); + QPolygon(int nPoints, const int *points); + operator QVariant() const; + void translate(int dx, int dy); + void translate(const QPoint &offset); + QPolygon translated(int dx, int dy) const; + inline QPolygon translated(const QPoint &offset) const; + QRect boundingRect() const; + void point(int i, int *x, int *y) const; + QPoint point(int i) const; + void setPoint(int index, int x, int y); + void setPoint(int index, const QPoint &p); + void setPoints(int nPoints, const int *points); + void setPoints(int nPoints, int firstx, int firsty, ...); + void putPoints(int index, int nPoints, const int *points); + void putPoints(int index, int nPoints, int firstx, int firsty, ...); + void putPoints(int index, int nPoints, const QPolygon & from, int fromIndex=0); + bool containsPoint(const QPoint &pt, Qt::FillRule fillRule) const; + QPolygon united(const QPolygon &r) const; + QPolygon intersected(const QPolygon &r) const; + QPolygon subtracted(const QPolygon &r) const; +}; +inline QPolygon::QPolygon(int asize) : QVector(asize) {} + QDebug operator<<(QDebug, const QPolygon &); + QDataStream &operator<<(QDataStream &stream, const QPolygon &polygon); + QDataStream &operator>>(QDataStream &stream, QPolygon &polygon); +inline void QPolygon::setPoint(int index, const QPoint &pt) +{ (*this)[index] = pt; } +inline void QPolygon::setPoint(int index, int x, int y) +{ (*this)[index] = QPoint(x, y); } +inline QPoint QPolygon::point(int index) const +{ return at(index); } +inline void QPolygon::translate(const QPoint &offset) +{ translate(offset.x(), offset.y()); } +inline QPolygon QPolygon::translated(const QPoint &offset) const +{ return translated(offset.x(), offset.y()); } +class QRectF; +class QPolygonF : public QVector +{ +public: + inline QPolygonF() {} + inline ~QPolygonF() {} + inline QPolygonF(int size); + inline QPolygonF(const QPolygonF &a) : QVector(a) {} + inline QPolygonF(const QVector &v) : QVector(v) {} + QPolygonF(const QRectF &r); + QPolygonF(const QPolygon &a); + inline void translate(qreal dx, qreal dy); + void translate(const QPointF &offset); + inline QPolygonF translated(qreal dx, qreal dy) const; + QPolygonF translated(const QPointF &offset) const; + QPolygon toPolygon() const; + bool isClosed() const { return !isEmpty() && first() == last(); } + QRectF boundingRect() const; + bool containsPoint(const QPointF &pt, Qt::FillRule fillRule) const; + QPolygonF united(const QPolygonF &r) const; + QPolygonF intersected(const QPolygonF &r) const; + QPolygonF subtracted(const QPolygonF &r) const; +}; +inline QPolygonF::QPolygonF(int asize) : QVector(asize) {} + QDebug operator<<(QDebug, const QPolygonF &); + QDataStream &operator<<(QDataStream &stream, const QPolygonF &array); + QDataStream &operator>>(QDataStream &stream, QPolygonF &array); +inline void QPolygonF::translate(qreal dx, qreal dy) +{ translate(QPointF(dx, dy)); } +inline QPolygonF QPolygonF::translated(qreal dx, qreal dy) const +{ return translated(QPointF(dx, dy)); } +typedef QtValidLicenseForGuiModule QtGuiModule; +template class QVector; +class QVariant; +struct QRegionPrivate; +class QBitmap; +class QRegion +{ +public: + enum RegionType { Rectangle, Ellipse }; + QRegion(); + QRegion(int x, int y, int w, int h, RegionType t = Rectangle); + QRegion(const QRect &r, RegionType t = Rectangle); + QRegion(const QPolygon &pa, Qt::FillRule fillRule = Qt::OddEvenFill); + QRegion(const QRegion ®ion); + QRegion(const QBitmap &bitmap); + ~QRegion(); + QRegion &operator=(const QRegion &); + bool isEmpty() const; + bool contains(const QPoint &p) const; + bool contains(const QRect &r) const; + void translate(int dx, int dy); + inline void translate(const QPoint &p) { translate(p.x(), p.y()); } + QRegion translated(int dx, int dy) const; + inline QRegion translated(const QPoint &p) const { return translated(p.x(), p.y()); } + QRegion unite(const QRegion &r) const; + QRegion unite(const QRect &r) const; + QRegion intersect(const QRegion &r) const; + QRegion intersect(const QRect &r) const; + QRegion subtract(const QRegion &r) const; + QRegion eor(const QRegion &r) const; + inline QRegion united(const QRegion &r) const { return unite(r); } + inline QRegion united(const QRect &r) const { return unite(r); } + inline QRegion intersected(const QRegion &r) const { return intersect(r); } + inline QRegion intersected(const QRect &r) const { return intersect(r); } + inline QRegion subtracted(const QRegion &r) const { return subtract(r); } + inline QRegion xored(const QRegion &r) const { return eor(r); } + bool intersects(const QRegion &r) const; + bool intersects(const QRect &r) const; + QRect boundingRect() const; + QVector rects() const; + void setRects(const QRect *rect, int num); + int numRects() const; + int rectCount() const; + const QRegion operator|(const QRegion &r) const; + const QRegion operator+(const QRegion &r) const; + const QRegion operator+(const QRect &r) const; + const QRegion operator&(const QRegion &r) const; + const QRegion operator&(const QRect &r) const; + const QRegion operator-(const QRegion &r) const; + const QRegion operator^(const QRegion &r) const; + QRegion& operator|=(const QRegion &r); + QRegion& operator+=(const QRegion &r); + QRegion& operator+=(const QRect &r); + QRegion& operator&=(const QRegion &r); + QRegion& operator&=(const QRect &r); + QRegion& operator-=(const QRegion &r); + QRegion& operator^=(const QRegion &r); + bool operator==(const QRegion &r) const; + inline bool operator!=(const QRegion &r) const { return !(operator==(r)); } + operator QVariant() const; + inline Region handle() const { if(!d->rgn) updateX11Region(); return d->rgn; } + friend QDataStream &operator<<(QDataStream &, const QRegion &); + friend QDataStream &operator>>(QDataStream &, QRegion &); +private: + QRegion copy() const; + void detach(); + void updateX11Region() const; + void *clipRectangles(int &num) const; + friend void *qt_getClipRects(const QRegion &r, int &num); + friend bool qt_region_strictContains(const QRegion ®ion, + const QRect &rect); + friend struct QRegionPrivate; + void exec(const QByteArray &ba, int ver = 0, QDataStream::ByteOrder byteOrder = QDataStream::BigEndian); + struct QRegionData { + QBasicAtomicInt ref; + Region rgn; + void *xrectangles; + QRegionPrivate *qt_rgn; + }; + struct QRegionData *d; + static struct QRegionData shared_empty; + static void cleanUp(QRegionData *x); +}; + QDataStream &operator<<(QDataStream &, const QRegion &); + QDataStream &operator>>(QDataStream &, QRegion &); + QDebug operator<<(QDebug, const QRegion &); +typedef QtValidLicenseForCoreModule QtCoreModule; +class QLine +{ +public: + inline QLine(); + inline QLine(const QPoint &pt1, const QPoint &pt2); + inline QLine(int x1, int y1, int x2, int y2); + inline bool isNull() const; + inline QPoint p1() const; + inline QPoint p2() const; + inline int x1() const; + inline int y1() const; + inline int x2() const; + inline int y2() const; + inline int dx() const; + inline int dy() const; + inline void translate(const QPoint &p); + inline void translate(int dx, int dy); + inline QLine translated(const QPoint &p) const; + inline QLine translated(int dx, int dy) const; + inline void setP1(const QPoint &p1); + inline void setP2(const QPoint &p2); + inline void setPoints(const QPoint &p1, const QPoint &p2); + inline void setLine(int x1, int y1, int x2, int y2); + inline bool operator==(const QLine &d) const; + inline bool operator!=(const QLine &d) const { return !(*this == d); } +private: + QPoint pt1, pt2; +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QLine)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QLine"; } }; +inline QLine::QLine() { } +inline QLine::QLine(const QPoint &pt1_, const QPoint &pt2_) : pt1(pt1_), pt2(pt2_) { } +inline QLine::QLine(int x1pos, int y1pos, int x2pos, int y2pos) : pt1(QPoint(x1pos, y1pos)), pt2(QPoint(x2pos, y2pos)) { } +inline bool QLine::isNull() const +{ + return pt1 == pt2; +} +inline int QLine::x1() const +{ + return pt1.x(); +} +inline int QLine::y1() const +{ + return pt1.y(); +} +inline int QLine::x2() const +{ + return pt2.x(); +} +inline int QLine::y2() const +{ + return pt2.y(); +} +inline QPoint QLine::p1() const +{ + return pt1; +} +inline QPoint QLine::p2() const +{ + return pt2; +} +inline int QLine::dx() const +{ + return pt2.x() - pt1.x(); +} +inline int QLine::dy() const +{ + return pt2.y() - pt1.y(); +} +inline void QLine::translate(const QPoint &point) +{ + pt1 += point; + pt2 += point; +} +inline void QLine::translate(int adx, int ady) +{ + this->translate(QPoint(adx, ady)); +} +inline QLine QLine::translated(const QPoint &p) const +{ + return QLine(pt1 + p, pt2 + p); +} +inline QLine QLine::translated(int adx, int ady) const +{ + return translated(QPoint(adx, ady)); +} +inline void QLine::setP1(const QPoint &aP1) +{ + pt1 = aP1; +} +inline void QLine::setP2(const QPoint &aP2) +{ + pt2 = aP2; +} +inline void QLine::setPoints(const QPoint &aP1, const QPoint &aP2) +{ + pt1 = aP1; + pt2 = aP2; +} +inline void QLine::setLine(int aX1, int aY1, int aX2, int aY2) +{ + pt1 = QPoint(aX1, aY1); + pt2 = QPoint(aX2, aY2); +} +inline bool QLine::operator==(const QLine &d) const +{ + return pt1 == d.pt1 && pt2 == d.pt2; +} + QDebug operator<<(QDebug d, const QLine &p); + QDataStream &operator<<(QDataStream &, const QLine &); + QDataStream &operator>>(QDataStream &, QLine &); +class QLineF { +public: + enum IntersectType { NoIntersection, BoundedIntersection, UnboundedIntersection }; + inline QLineF(); + inline QLineF(const QPointF &pt1, const QPointF &pt2); + inline QLineF(qreal x1, qreal y1, qreal x2, qreal y2); + inline QLineF(const QLine &line) : pt1(line.p1()), pt2(line.p2()) { } + static QLineF fromPolar(qreal length, qreal angle); + bool isNull() const; + inline QPointF p1() const; + inline QPointF p2() const; + inline qreal x1() const; + inline qreal y1() const; + inline qreal x2() const; + inline qreal y2() const; + inline qreal dx() const; + inline qreal dy() const; + qreal length() const; + void setLength(qreal len); + qreal angle() const; + void setAngle(qreal angle); + qreal angleTo(const QLineF &l) const; + QLineF unitVector() const; + QLineF normalVector() const; + IntersectType intersect(const QLineF &l, QPointF *intersectionPoint) const; + qreal angle(const QLineF &l) const; + QPointF pointAt(qreal t) const; + inline void translate(const QPointF &p); + inline void translate(qreal dx, qreal dy); + inline QLineF translated(const QPointF &p) const; + inline QLineF translated(qreal dx, qreal dy) const; + inline void setP1(const QPointF &p1); + inline void setP2(const QPointF &p2); + inline void setPoints(const QPointF &p1, const QPointF &p2); + inline void setLine(qreal x1, qreal y1, qreal x2, qreal y2); + inline bool operator==(const QLineF &d) const; + inline bool operator!=(const QLineF &d) const { return !(*this == d); } + QLine toLine() const; +private: + QPointF pt1, pt2; +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QLineF)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QLineF"; } }; +inline QLineF::QLineF() +{ +} +inline QLineF::QLineF(const QPointF &apt1, const QPointF &apt2) + : pt1(apt1), pt2(apt2) +{ +} +inline QLineF::QLineF(qreal x1pos, qreal y1pos, qreal x2pos, qreal y2pos) + : pt1(x1pos, y1pos), pt2(x2pos, y2pos) +{ +} +inline qreal QLineF::x1() const +{ + return pt1.x(); +} +inline qreal QLineF::y1() const +{ + return pt1.y(); +} +inline qreal QLineF::x2() const +{ + return pt2.x(); +} +inline qreal QLineF::y2() const +{ + return pt2.y(); +} +inline QPointF QLineF::p1() const +{ + return pt1; +} +inline QPointF QLineF::p2() const +{ + return pt2; +} +inline qreal QLineF::dx() const +{ + return pt2.x() - pt1.x(); +} +inline qreal QLineF::dy() const +{ + return pt2.y() - pt1.y(); +} +inline QLineF QLineF::normalVector() const +{ + return QLineF(p1(), p1() + QPointF(dy(), -dx())); +} +inline void QLineF::translate(const QPointF &point) +{ + pt1 += point; + pt2 += point; +} +inline void QLineF::translate(qreal adx, qreal ady) +{ + this->translate(QPointF(adx, ady)); +} +inline QLineF QLineF::translated(const QPointF &p) const +{ + return QLineF(pt1 + p, pt2 + p); +} +inline QLineF QLineF::translated(qreal adx, qreal ady) const +{ + return translated(QPointF(adx, ady)); +} +inline void QLineF::setLength(qreal len) +{ + if (isNull()) + return; + QLineF v = unitVector(); + pt2 = QPointF(pt1.x() + v.dx() * len, pt1.y() + v.dy() * len); +} +inline QPointF QLineF::pointAt(qreal t) const +{ + qreal vx = pt2.x() - pt1.x(); + qreal vy = pt2.y() - pt1.y(); + return QPointF(pt1.x() + vx * t, pt1.y() + vy * t); +} +inline QLine QLineF::toLine() const +{ + return QLine(pt1.toPoint(), pt2.toPoint()); +} +inline void QLineF::setP1(const QPointF &aP1) +{ + pt1 = aP1; +} +inline void QLineF::setP2(const QPointF &aP2) +{ + pt2 = aP2; +} +inline void QLineF::setPoints(const QPointF &aP1, const QPointF &aP2) +{ + pt1 = aP1; + pt2 = aP2; +} +inline void QLineF::setLine(qreal aX1, qreal aY1, qreal aX2, qreal aY2) +{ + pt1 = QPointF(aX1, aY1); + pt2 = QPointF(aX2, aY2); +} +inline bool QLineF::operator==(const QLineF &d) const +{ + return pt1 == d.pt1 && pt2 == d.pt2; +} + QDebug operator<<(QDebug d, const QLineF &p); + QDataStream &operator<<(QDataStream &, const QLineF &); + QDataStream &operator>>(QDataStream &, QLineF &); +typedef QtValidLicenseForGuiModule QtGuiModule; +class QPainterPath; +class QVariant; +class QMatrix +{ +public: + inline explicit QMatrix(Qt::Initialization) {} + QMatrix(); + QMatrix(qreal m11, qreal m12, qreal m21, qreal m22, + qreal dx, qreal dy); + QMatrix(const QMatrix &matrix); + void setMatrix(qreal m11, qreal m12, qreal m21, qreal m22, + qreal dx, qreal dy); + qreal m11() const { return _m11; } + qreal m12() const { return _m12; } + qreal m21() const { return _m21; } + qreal m22() const { return _m22; } + qreal dx() const { return _dx; } + qreal dy() const { return _dy; } + void map(int x, int y, int *tx, int *ty) const; + void map(qreal x, qreal y, qreal *tx, qreal *ty) const; + QRect mapRect(const QRect &) const; + QRectF mapRect(const QRectF &) const; + QPoint map(const QPoint &p) const; + QPointF map(const QPointF&p) const; + QLine map(const QLine &l) const; + QLineF map(const QLineF &l) const; + QPolygonF map(const QPolygonF &a) const; + QPolygon map(const QPolygon &a) const; + QRegion map(const QRegion &r) const; + QPainterPath map(const QPainterPath &p) const; + QPolygon mapToPolygon(const QRect &r) const; + void reset(); + inline bool isIdentity() const; + QMatrix &translate(qreal dx, qreal dy); + QMatrix &scale(qreal sx, qreal sy); + QMatrix &shear(qreal sh, qreal sv); + QMatrix &rotate(qreal a); + bool isInvertible() const { return !qFuzzyIsNull(_m11*_m22 - _m12*_m21); } + qreal determinant() const { return _m11*_m22 - _m12*_m21; } + qreal det() const { return _m11*_m22 - _m12*_m21; } + QMatrix inverted(bool *invertible = 0) const; + bool operator==(const QMatrix &) const; + bool operator!=(const QMatrix &) const; + QMatrix &operator*=(const QMatrix &); + QMatrix operator*(const QMatrix &o) const; + QMatrix &operator=(const QMatrix &); + operator QVariant() const; +private: + inline QMatrix(bool) + : _m11(1.) + , _m12(0.) + , _m21(0.) + , _m22(1.) + , _dx(0.) + , _dy(0.) {} + inline QMatrix(qreal am11, qreal am12, qreal am21, qreal am22, qreal adx, qreal ady, bool) + : _m11(am11) + , _m12(am12) + , _m21(am21) + , _m22(am22) + , _dx(adx) + , _dy(ady) {} + friend class QTransform; + qreal _m11, _m12; + qreal _m21, _m22; + qreal _dx, _dy; +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QMatrix)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QMatrix"; } }; + inline QPoint operator*(const QPoint &p, const QMatrix &m) +{ return m.map(p); } + inline QPointF operator*(const QPointF &p, const QMatrix &m) +{ return m.map(p); } + inline QLineF operator*(const QLineF &l, const QMatrix &m) +{ return m.map(l); } + inline QLine operator*(const QLine &l, const QMatrix &m) +{ return m.map(l); } + inline QPolygon operator *(const QPolygon &a, const QMatrix &m) +{ return m.map(a); } + inline QPolygonF operator *(const QPolygonF &a, const QMatrix &m) +{ return m.map(a); } + inline QRegion operator *(const QRegion &r, const QMatrix &m) +{ return m.map(r); } + QPainterPath operator *(const QPainterPath &p, const QMatrix &m); +inline bool QMatrix::isIdentity() const +{ + return qFuzzyIsNull(_m11 - 1) && qFuzzyIsNull(_m22 - 1) && qFuzzyIsNull(_m12) + && qFuzzyIsNull(_m21) && qFuzzyIsNull(_dx) && qFuzzyIsNull(_dy); +} +inline bool qFuzzyCompare(const QMatrix& m1, const QMatrix& m2) +{ + return qFuzzyCompare(m1.m11(), m2.m11()) + && qFuzzyCompare(m1.m12(), m2.m12()) + && qFuzzyCompare(m1.m21(), m2.m21()) + && qFuzzyCompare(m1.m22(), m2.m22()) + && qFuzzyCompare(m1.dx(), m2.dx()) + && qFuzzyCompare(m1.dy(), m2.dy()); +} + QDataStream &operator<<(QDataStream &, const QMatrix &); + QDataStream &operator>>(QDataStream &, QMatrix &); + QDebug operator<<(QDebug, const QMatrix &); +typedef QtValidLicenseForGuiModule QtGuiModule; +class QFont; +class QPainterPathPrivate; +struct QPainterPathPrivateDeleter; +class QPainterPathData; +class QPainterPathStrokerPrivate; +class QPolygonF; +class QRegion; +class QVectorPath; +class QPainterPath +{ +public: + enum ElementType { + MoveToElement, + LineToElement, + CurveToElement, + CurveToDataElement + }; + class Element { + public: + qreal x; + qreal y; + ElementType type; + bool isMoveTo() const { return type == MoveToElement; } + bool isLineTo() const { return type == LineToElement; } + bool isCurveTo() const { return type == CurveToElement; } + operator QPointF () const { return QPointF(x, y); } + bool operator==(const Element &e) const { return qFuzzyCompare(x, e.x) + && qFuzzyCompare(y, e.y) && type == e.type; } + inline bool operator!=(const Element &e) const { return !operator==(e); } + }; + QPainterPath(); + explicit QPainterPath(const QPointF &startPoint); + QPainterPath(const QPainterPath &other); + QPainterPath &operator=(const QPainterPath &other); + ~QPainterPath(); + void closeSubpath(); + void moveTo(const QPointF &p); + inline void moveTo(qreal x, qreal y); + void lineTo(const QPointF &p); + inline void lineTo(qreal x, qreal y); + void arcMoveTo(const QRectF &rect, qreal angle); + inline void arcMoveTo(qreal x, qreal y, qreal w, qreal h, qreal angle); + void arcTo(const QRectF &rect, qreal startAngle, qreal arcLength); + inline void arcTo(qreal x, qreal y, qreal w, qreal h, qreal startAngle, qreal arcLength); + void cubicTo(const QPointF &ctrlPt1, const QPointF &ctrlPt2, const QPointF &endPt); + inline void cubicTo(qreal ctrlPt1x, qreal ctrlPt1y, qreal ctrlPt2x, qreal ctrlPt2y, + qreal endPtx, qreal endPty); + void quadTo(const QPointF &ctrlPt, const QPointF &endPt); + inline void quadTo(qreal ctrlPtx, qreal ctrlPty, qreal endPtx, qreal endPty); + QPointF currentPosition() const; + void addRect(const QRectF &rect); + inline void addRect(qreal x, qreal y, qreal w, qreal h); + void addEllipse(const QRectF &rect); + inline void addEllipse(qreal x, qreal y, qreal w, qreal h); + inline void addEllipse(const QPointF ¢er, qreal rx, qreal ry); + void addPolygon(const QPolygonF &polygon); + void addText(const QPointF &point, const QFont &f, const QString &text); + inline void addText(qreal x, qreal y, const QFont &f, const QString &text); + void addPath(const QPainterPath &path); + void addRegion(const QRegion ®ion); + void addRoundedRect(const QRectF &rect, qreal xRadius, qreal yRadius, + Qt::SizeMode mode = Qt::AbsoluteSize); + inline void addRoundedRect(qreal x, qreal y, qreal w, qreal h, + qreal xRadius, qreal yRadius, + Qt::SizeMode mode = Qt::AbsoluteSize); + void addRoundRect(const QRectF &rect, int xRnd, int yRnd); + inline void addRoundRect(qreal x, qreal y, qreal w, qreal h, + int xRnd, int yRnd); + inline void addRoundRect(const QRectF &rect, int roundness); + inline void addRoundRect(qreal x, qreal y, qreal w, qreal h, + int roundness); + void connectPath(const QPainterPath &path); + bool contains(const QPointF &pt) const; + bool contains(const QRectF &rect) const; + bool intersects(const QRectF &rect) const; + void translate(qreal dx, qreal dy); + inline void translate(const QPointF &offset); + QPainterPath translated(qreal dx, qreal dy) const; + inline QPainterPath translated(const QPointF &offset) const; + QRectF boundingRect() const; + QRectF controlPointRect() const; + Qt::FillRule fillRule() const; + void setFillRule(Qt::FillRule fillRule); + inline bool isEmpty() const; + QPainterPath toReversed() const; + QList toSubpathPolygons(const QMatrix &matrix = QMatrix()) const; + QList toFillPolygons(const QMatrix &matrix = QMatrix()) const; + QPolygonF toFillPolygon(const QMatrix &matrix = QMatrix()) const; + QList toSubpathPolygons(const QTransform &matrix) const; + QList toFillPolygons(const QTransform &matrix) const; + QPolygonF toFillPolygon(const QTransform &matrix) const; + inline int elementCount() const; + inline const QPainterPath::Element &elementAt(int i) const; + inline void setElementPositionAt(int i, qreal x, qreal y); + qreal length() const; + qreal percentAtLength(qreal t) const; + QPointF pointAtPercent(qreal t) const; + qreal angleAtPercent(qreal t) const; + qreal slopeAtPercent(qreal t) const; + bool intersects(const QPainterPath &p) const; + bool contains(const QPainterPath &p) const; + QPainterPath united(const QPainterPath &r) const; + QPainterPath intersected(const QPainterPath &r) const; + QPainterPath subtracted(const QPainterPath &r) const; + QPainterPath subtractedInverted(const QPainterPath &r) const; + QPainterPath simplified() const; + bool operator==(const QPainterPath &other) const; + bool operator!=(const QPainterPath &other) const; + QPainterPath operator&(const QPainterPath &other) const; + QPainterPath operator|(const QPainterPath &other) const; + QPainterPath operator+(const QPainterPath &other) const; + QPainterPath operator-(const QPainterPath &other) const; + QPainterPath &operator&=(const QPainterPath &other); + QPainterPath &operator|=(const QPainterPath &other); + QPainterPath &operator+=(const QPainterPath &other); + QPainterPath &operator-=(const QPainterPath &other); +private: + QScopedPointer d_ptr; + inline void ensureData() { if (!d_ptr) ensureData_helper(); } + void ensureData_helper(); + inline void detach(); + void detach_helper(); + void setDirty(bool); + void computeBoundingRect() const; + void computeControlPointRect() const; + QPainterPathData *d_func() const { return reinterpret_cast(d_ptr.data()); } + friend class QPainterPathData; + friend class QPainterPathStroker; + friend class QPainterPathStrokerPrivate; + friend class QMatrix; + friend class QTransform; + friend class QVectorPath; + friend const QVectorPath &qtVectorPathForPath(const QPainterPath &); + friend QDataStream &operator<<(QDataStream &, const QPainterPath &); + friend QDataStream &operator>>(QDataStream &, QPainterPath &); +}; +class QPainterPathPrivate +{ +public: + friend class QPainterPath; + friend class QPainterPathData; + friend class QPainterPathStroker; + friend class QPainterPathStrokerPrivate; + friend class QMatrix; + friend class QTransform; + friend class QVectorPath; + friend struct QPainterPathPrivateDeleter; + friend QDataStream &operator<<(QDataStream &, const QPainterPath &); + friend QDataStream &operator>>(QDataStream &, QPainterPath &); +private: + QAtomicInt ref; + QVector elements; +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QPainterPath::Element)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QPainterPath::Element"; } }; + QDataStream &operator<<(QDataStream &, const QPainterPath &); + QDataStream &operator>>(QDataStream &, QPainterPath &); +class QPainterPathStroker +{ + inline QPainterPathStrokerPrivate* d_func() { return reinterpret_cast(qGetPtrHelper(d_ptr)); } inline const QPainterPathStrokerPrivate* d_func() const { return reinterpret_cast(qGetPtrHelper(d_ptr)); } friend class QPainterPathStrokerPrivate; +public: + QPainterPathStroker(); + ~QPainterPathStroker(); + void setWidth(qreal width); + qreal width() const; + void setCapStyle(Qt::PenCapStyle style); + Qt::PenCapStyle capStyle() const; + void setJoinStyle(Qt::PenJoinStyle style); + Qt::PenJoinStyle joinStyle() const; + void setMiterLimit(qreal length); + qreal miterLimit() const; + void setCurveThreshold(qreal threshold); + qreal curveThreshold() const; + void setDashPattern(Qt::PenStyle); + void setDashPattern(const QVector &dashPattern); + QVector dashPattern() const; + void setDashOffset(qreal offset); + qreal dashOffset() const; + QPainterPath createStroke(const QPainterPath &path) const; +private: + friend class QX11PaintEngine; + QScopedPointer d_ptr; +}; +inline void QPainterPath::moveTo(qreal x, qreal y) +{ + moveTo(QPointF(x, y)); +} +inline void QPainterPath::lineTo(qreal x, qreal y) +{ + lineTo(QPointF(x, y)); +} +inline void QPainterPath::arcTo(qreal x, qreal y, qreal w, qreal h, qreal startAngle, qreal arcLength) +{ + arcTo(QRectF(x, y, w, h), startAngle, arcLength); +} +inline void QPainterPath::arcMoveTo(qreal x, qreal y, qreal w, qreal h, qreal angle) +{ + arcMoveTo(QRectF(x, y, w, h), angle); +} +inline void QPainterPath::cubicTo(qreal ctrlPt1x, qreal ctrlPt1y, qreal ctrlPt2x, qreal ctrlPt2y, + qreal endPtx, qreal endPty) +{ + cubicTo(QPointF(ctrlPt1x, ctrlPt1y), QPointF(ctrlPt2x, ctrlPt2y), + QPointF(endPtx, endPty)); +} +inline void QPainterPath::quadTo(qreal ctrlPtx, qreal ctrlPty, qreal endPtx, qreal endPty) +{ + quadTo(QPointF(ctrlPtx, ctrlPty), QPointF(endPtx, endPty)); +} +inline void QPainterPath::addEllipse(qreal x, qreal y, qreal w, qreal h) +{ + addEllipse(QRectF(x, y, w, h)); +} +inline void QPainterPath::addEllipse(const QPointF ¢er, qreal rx, qreal ry) +{ + addEllipse(QRectF(center.x() - rx, center.y() - ry, 2 * rx, 2 * ry)); +} +inline void QPainterPath::addRect(qreal x, qreal y, qreal w, qreal h) +{ + addRect(QRectF(x, y, w, h)); +} +inline void QPainterPath::addRoundedRect(qreal x, qreal y, qreal w, qreal h, + qreal xRadius, qreal yRadius, + Qt::SizeMode mode) +{ + addRoundedRect(QRectF(x, y, w, h), xRadius, yRadius, mode); +} +inline void QPainterPath::addRoundRect(qreal x, qreal y, qreal w, qreal h, + int xRnd, int yRnd) +{ + addRoundRect(QRectF(x, y, w, h), xRnd, yRnd); +} +inline void QPainterPath::addRoundRect(const QRectF &rect, + int roundness) +{ + int xRnd = roundness; + int yRnd = roundness; + if (rect.width() > rect.height()) + xRnd = int(roundness * rect.height()/rect.width()); + else + yRnd = int(roundness * rect.width()/rect.height()); + addRoundRect(rect, xRnd, yRnd); +} +inline void QPainterPath::addRoundRect(qreal x, qreal y, qreal w, qreal h, + int roundness) +{ + addRoundRect(QRectF(x, y, w, h), roundness); +} +inline void QPainterPath::addText(qreal x, qreal y, const QFont &f, const QString &text) +{ + addText(QPointF(x, y), f, text); +} +inline void QPainterPath::translate(const QPointF &offset) +{ translate(offset.x(), offset.y()); } +inline QPainterPath QPainterPath::translated(const QPointF &offset) const +{ return translated(offset.x(), offset.y()); } +inline bool QPainterPath::isEmpty() const +{ + return !d_ptr || (d_ptr->elements.size() == 1 && d_ptr->elements.first().type == MoveToElement); +} +inline int QPainterPath::elementCount() const +{ + return d_ptr ? d_ptr->elements.size() : 0; +} +inline const QPainterPath::Element &QPainterPath::elementAt(int i) const +{ + ((!(d_ptr)) ? qt_assert("d_ptr","/usr/include/qt4/QtGui/qpainterpath.h",397) : qt_noop()); + ((!(i >= 0 && i < elementCount())) ? qt_assert("i >= 0 && i < elementCount()","/usr/include/qt4/QtGui/qpainterpath.h",398) : qt_noop()); + return d_ptr->elements.at(i); +} +inline void QPainterPath::setElementPositionAt(int i, qreal x, qreal y) +{ + ((!(d_ptr)) ? qt_assert("d_ptr","/usr/include/qt4/QtGui/qpainterpath.h",404) : qt_noop()); + ((!(i >= 0 && i < elementCount())) ? qt_assert("i >= 0 && i < elementCount()","/usr/include/qt4/QtGui/qpainterpath.h",405) : qt_noop()); + detach(); + QPainterPath::Element &e = d_ptr->elements[i]; + e.x = x; + e.y = y; +} +inline void QPainterPath::detach() +{ + if (d_ptr->ref != 1) + detach_helper(); + setDirty(true); +} + QDebug operator<<(QDebug, const QPainterPath &); +typedef QtValidLicenseForGuiModule QtGuiModule; +class QVariant; +class QTransform +{ + +public: + enum TransformationType { + TxNone = 0x00, + TxTranslate = 0x01, + TxScale = 0x02, + TxRotate = 0x04, + TxShear = 0x08, + TxProject = 0x10 + }; + inline explicit QTransform(Qt::Initialization) : affine(Qt::Uninitialized) {} + QTransform(); + QTransform(qreal h11, qreal h12, qreal h13, + qreal h21, qreal h22, qreal h23, + qreal h31, qreal h32, qreal h33 = 1.0); + QTransform(qreal h11, qreal h12, qreal h21, + qreal h22, qreal dx, qreal dy); + explicit QTransform(const QMatrix &mtx); + bool isAffine() const; + bool isIdentity() const; + bool isInvertible() const; + bool isScaling() const; + bool isRotating() const; + bool isTranslating() const; + TransformationType type() const; + inline qreal determinant() const; + qreal det() const; + qreal m11() const; + qreal m12() const; + qreal m13() const; + qreal m21() const; + qreal m22() const; + qreal m23() const; + qreal m31() const; + qreal m32() const; + qreal m33() const; + qreal dx() const; + qreal dy() const; + void setMatrix(qreal m11, qreal m12, qreal m13, + qreal m21, qreal m22, qreal m23, + qreal m31, qreal m32, qreal m33); + QTransform inverted(bool *invertible = 0) const; + QTransform adjoint() const; + QTransform transposed() const; + QTransform &translate(qreal dx, qreal dy); + QTransform &scale(qreal sx, qreal sy); + QTransform &shear(qreal sh, qreal sv); + QTransform &rotate(qreal a, Qt::Axis axis = Qt::ZAxis); + QTransform &rotateRadians(qreal a, Qt::Axis axis = Qt::ZAxis); + static bool squareToQuad(const QPolygonF &square, QTransform &result); + static bool quadToSquare(const QPolygonF &quad, QTransform &result); + static bool quadToQuad(const QPolygonF &one, + const QPolygonF &two, + QTransform &result); + bool operator==(const QTransform &) const; + bool operator!=(const QTransform &) const; + QTransform &operator*=(const QTransform &); + QTransform operator*(const QTransform &o) const; + QTransform &operator=(const QTransform &); + operator QVariant() const; + void reset(); + QPoint map(const QPoint &p) const; + QPointF map(const QPointF &p) const; + QLine map(const QLine &l) const; + QLineF map(const QLineF &l) const; + QPolygonF map(const QPolygonF &a) const; + QPolygon map(const QPolygon &a) const; + QRegion map(const QRegion &r) const; + QPainterPath map(const QPainterPath &p) const; + QPolygon mapToPolygon(const QRect &r) const; + QRect mapRect(const QRect &) const; + QRectF mapRect(const QRectF &) const; + void map(int x, int y, int *tx, int *ty) const; + void map(qreal x, qreal y, qreal *tx, qreal *ty) const; + const QMatrix &toAffine() const; + QTransform &operator*=(qreal div); + QTransform &operator/=(qreal div); + QTransform &operator+=(qreal div); + QTransform &operator-=(qreal div); + static QTransform fromTranslate(qreal dx, qreal dy); + static QTransform fromScale(qreal dx, qreal dy); +private: + inline QTransform(qreal h11, qreal h12, qreal h13, + qreal h21, qreal h22, qreal h23, + qreal h31, qreal h32, qreal h33, bool) + : affine(h11, h12, h21, h22, h31, h32, true) + , m_13(h13), m_23(h23), m_33(h33) + , m_type(TxNone) + , m_dirty(TxProject) {} + inline QTransform(bool) + : affine(true) + , m_13(0), m_23(0), m_33(1) + , m_type(TxNone) + , m_dirty(TxNone) {} + inline TransformationType inline_type() const; + QMatrix affine; + qreal m_13; + qreal m_23; + qreal m_33; + mutable uint m_type : 5; + mutable uint m_dirty : 5; + class Private; + Private *d; +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QTransform)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QTransform"; } }; +inline QTransform::TransformationType QTransform::inline_type() const +{ + if (m_dirty == TxNone) + return static_cast(m_type); + return type(); +} +inline bool QTransform::isAffine() const +{ + return inline_type() < TxProject; +} +inline bool QTransform::isIdentity() const +{ + return inline_type() == TxNone; +} +inline bool QTransform::isInvertible() const +{ + return !qFuzzyIsNull(determinant()); +} +inline bool QTransform::isScaling() const +{ + return type() >= TxScale; +} +inline bool QTransform::isRotating() const +{ + return inline_type() >= TxRotate; +} +inline bool QTransform::isTranslating() const +{ + return inline_type() >= TxTranslate; +} +inline qreal QTransform::determinant() const +{ + return affine._m11*(m_33*affine._m22-affine._dy*m_23) - + affine._m21*(m_33*affine._m12-affine._dy*m_13)+affine._dx*(m_23*affine._m12-affine._m22*m_13); +} +inline qreal QTransform::det() const +{ + return determinant(); +} +inline qreal QTransform::m11() const +{ + return affine._m11; +} +inline qreal QTransform::m12() const +{ + return affine._m12; +} +inline qreal QTransform::m13() const +{ + return m_13; +} +inline qreal QTransform::m21() const +{ + return affine._m21; +} +inline qreal QTransform::m22() const +{ + return affine._m22; +} +inline qreal QTransform::m23() const +{ + return m_23; +} +inline qreal QTransform::m31() const +{ + return affine._dx; +} +inline qreal QTransform::m32() const +{ + return affine._dy; +} +inline qreal QTransform::m33() const +{ + return m_33; +} +inline qreal QTransform::dx() const +{ + return affine._dx; +} +inline qreal QTransform::dy() const +{ + return affine._dy; +} +inline QTransform &QTransform::operator*=(qreal num) +{ + if (num == 1.) + return *this; + affine._m11 *= num; + affine._m12 *= num; + m_13 *= num; + affine._m21 *= num; + affine._m22 *= num; + m_23 *= num; + affine._dx *= num; + affine._dy *= num; + m_33 *= num; + m_dirty |= TxScale; + return *this; +} +inline QTransform &QTransform::operator/=(qreal div) +{ + if (div == 0) + return *this; + div = 1/div; + return operator*=(div); +} +inline QTransform &QTransform::operator+=(qreal num) +{ + if (num == 0) + return *this; + affine._m11 += num; + affine._m12 += num; + m_13 += num; + affine._m21 += num; + affine._m22 += num; + m_23 += num; + affine._dx += num; + affine._dy += num; + m_33 += num; + m_dirty |= TxProject; + return *this; +} +inline QTransform &QTransform::operator-=(qreal num) +{ + if (num == 0) + return *this; + affine._m11 -= num; + affine._m12 -= num; + m_13 -= num; + affine._m21 -= num; + affine._m22 -= num; + m_23 -= num; + affine._dx -= num; + affine._dy -= num; + m_33 -= num; + m_dirty |= TxProject; + return *this; +} +inline bool qFuzzyCompare(const QTransform& t1, const QTransform& t2) +{ + return qFuzzyCompare(t1.m11(), t2.m11()) + && qFuzzyCompare(t1.m12(), t2.m12()) + && qFuzzyCompare(t1.m13(), t2.m13()) + && qFuzzyCompare(t1.m21(), t2.m21()) + && qFuzzyCompare(t1.m22(), t2.m22()) + && qFuzzyCompare(t1.m23(), t2.m23()) + && qFuzzyCompare(t1.m31(), t2.m31()) + && qFuzzyCompare(t1.m32(), t2.m32()) + && qFuzzyCompare(t1.m33(), t2.m33()); +} + QDataStream &operator<<(QDataStream &, const QTransform &); + QDataStream &operator>>(QDataStream &, QTransform &); + QDebug operator<<(QDebug, const QTransform &); + inline QPoint operator*(const QPoint &p, const QTransform &m) +{ return m.map(p); } + inline QPointF operator*(const QPointF &p, const QTransform &m) +{ return m.map(p); } + inline QLineF operator*(const QLineF &l, const QTransform &m) +{ return m.map(l); } + inline QLine operator*(const QLine &l, const QTransform &m) +{ return m.map(l); } + inline QPolygon operator *(const QPolygon &a, const QTransform &m) +{ return m.map(a); } + inline QPolygonF operator *(const QPolygonF &a, const QTransform &m) +{ return m.map(a); } + inline QRegion operator *(const QRegion &r, const QTransform &m) +{ return m.map(r); } + inline QPainterPath operator *(const QPainterPath &p, const QTransform &m) +{ return m.map(p); } + inline QTransform operator *(const QTransform &a, qreal n) +{ QTransform t(a); t *= n; return t; } + inline QTransform operator /(const QTransform &a, qreal n) +{ QTransform t(a); t /= n; return t; } + inline QTransform operator +(const QTransform &a, qreal n) +{ QTransform t(a); t += n; return t; } + inline QTransform operator -(const QTransform &a, qreal n) +{ QTransform t(a); t -= n; return t; } +typedef QtValidLicenseForGuiModule QtGuiModule; +class QIODevice; +class QStringList; +class QMatrix; +class QTransform; +class QVariant; +template class QList; +template class QVector; +struct QImageData; +class QImageDataMisc; +class QImageTextKeyLang { +public: + QImageTextKeyLang(const char* k, const char* l) : key(k), lang(l) { } + QImageTextKeyLang() { } + QByteArray key; + QByteArray lang; + bool operator< (const QImageTextKeyLang& other) const + { return key < other.key || (key==other.key && lang < other.lang); } + bool operator== (const QImageTextKeyLang& other) const + { return key==other.key && lang==other.lang; } + inline bool operator!= (const QImageTextKeyLang &other) const + { return !operator==(other); } +}; +class QImage : public QPaintDevice +{ +public: + enum InvertMode { InvertRgb, InvertRgba }; + enum Format { + Format_Invalid, + Format_Mono, + Format_MonoLSB, + Format_Indexed8, + Format_RGB32, + Format_ARGB32, + Format_ARGB32_Premultiplied, + Format_RGB16, + Format_ARGB8565_Premultiplied, + Format_RGB666, + Format_ARGB6666_Premultiplied, + Format_RGB555, + Format_ARGB8555_Premultiplied, + Format_RGB888, + Format_RGB444, + Format_ARGB4444_Premultiplied, + NImageFormats + }; + QImage(); + QImage(const QSize &size, Format format); + QImage(int width, int height, Format format); + QImage(uchar *data, int width, int height, Format format); + QImage(const uchar *data, int width, int height, Format format); + QImage(uchar *data, int width, int height, int bytesPerLine, Format format); + QImage(const uchar *data, int width, int height, int bytesPerLine, Format format); + explicit QImage(const char * const xpm[]); + explicit QImage(const QString &fileName, const char *format = 0); + explicit QImage(const char *fileName, const char *format = 0); + QImage(const QImage &); + ~QImage(); + QImage &operator=(const QImage &); + bool isNull() const; + int devType() const; + bool operator==(const QImage &) const; + bool operator!=(const QImage &) const; + operator QVariant() const; + void detach(); + bool isDetached() const; + QImage copy(const QRect &rect = QRect()) const; + inline QImage copy(int x, int y, int w, int h) const + { return copy(QRect(x, y, w, h)); } + Format format() const; + QImage convertToFormat(Format f, Qt::ImageConversionFlags flags = Qt::AutoColor) const __attribute__ ((warn_unused_result)); + QImage convertToFormat(Format f, const QVector &colorTable, Qt::ImageConversionFlags flags = Qt::AutoColor) const __attribute__ ((warn_unused_result)); + int width() const; + int height() const; + QSize size() const; + QRect rect() const; + int depth() const; + int numColors() const; + int colorCount() const; + QRgb color(int i) const; + void setColor(int i, QRgb c); + void setNumColors(int); + void setColorCount(int); + bool allGray() const; + bool isGrayscale() const; + uchar *bits(); + const uchar *bits() const; + int numBytes() const; + int byteCount() const; + uchar *scanLine(int); + const uchar *scanLine(int) const; + int bytesPerLine() const; + bool valid(int x, int y) const; + bool valid(const QPoint &pt) const; + int pixelIndex(int x, int y) const; + int pixelIndex(const QPoint &pt) const; + QRgb pixel(int x, int y) const; + QRgb pixel(const QPoint &pt) const; + void setPixel(int x, int y, uint index_or_rgb); + void setPixel(const QPoint &pt, uint index_or_rgb); + QVector colorTable() const; + void setColorTable(const QVector colors); + void fill(uint pixel); + bool hasAlphaChannel() const; + void setAlphaChannel(const QImage &alphaChannel); + QImage alphaChannel() const; + QImage createAlphaMask(Qt::ImageConversionFlags flags = Qt::AutoColor) const; + QImage createHeuristicMask(bool clipTight = true) const; + QImage createMaskFromColor(QRgb color, Qt::MaskMode mode = Qt::MaskInColor) const; + inline QImage scaled(int w, int h, Qt::AspectRatioMode aspectMode = Qt::IgnoreAspectRatio, + Qt::TransformationMode mode = Qt::FastTransformation) const + { return scaled(QSize(w, h), aspectMode, mode); } + QImage scaled(const QSize &s, Qt::AspectRatioMode aspectMode = Qt::IgnoreAspectRatio, + Qt::TransformationMode mode = Qt::FastTransformation) const; + QImage scaledToWidth(int w, Qt::TransformationMode mode = Qt::FastTransformation) const; + QImage scaledToHeight(int h, Qt::TransformationMode mode = Qt::FastTransformation) const; + QImage transformed(const QMatrix &matrix, Qt::TransformationMode mode = Qt::FastTransformation) const; + static QMatrix trueMatrix(const QMatrix &, int w, int h); + QImage transformed(const QTransform &matrix, Qt::TransformationMode mode = Qt::FastTransformation) const; + static QTransform trueMatrix(const QTransform &, int w, int h); + QImage mirrored(bool horizontally = false, bool vertically = true) const; + QImage rgbSwapped() const; + void invertPixels(InvertMode = InvertRgb); + bool load(QIODevice *device, const char* format); + bool load(const QString &fileName, const char* format=0); + bool loadFromData(const uchar *buf, int len, const char *format = 0); + inline bool loadFromData(const QByteArray &data, const char* aformat=0) + { return loadFromData(reinterpret_cast(data.constData()), data.size(), aformat); } + bool save(const QString &fileName, const char* format=0, int quality=-1) const; + bool save(QIODevice *device, const char* format=0, int quality=-1) const; + static QImage fromData(const uchar *data, int size, const char *format = 0); + inline static QImage fromData(const QByteArray &data, const char *format = 0) + { return fromData(reinterpret_cast(data.constData()), data.size(), format); } + int serialNumber() const; + qint64 cacheKey() const; + QPaintEngine *paintEngine() const; + int dotsPerMeterX() const; + int dotsPerMeterY() const; + void setDotsPerMeterX(int); + void setDotsPerMeterY(int); + QPoint offset() const; + void setOffset(const QPoint&); + QStringList textKeys() const; + QString text(const QString &key = QString()) const; + void setText(const QString &key, const QString &value); + QString text(const char* key, const char* lang=0) const; + QList textList() const; + QStringList textLanguages() const; + QString text(const QImageTextKeyLang&) const; + void setText(const char* key, const char* lang, const QString&); +public: + virtual int metric(PaintDeviceMetric metric) const; +private: + friend class QWSOnScreenSurface; + QImageData *d; + friend class QRasterPixmapData; + friend class QPixmapCacheEntry; + friend qint64 qt_image_id(const QImage &image); + friend const QVector *qt_image_colortable(const QImage &image); +public: + typedef QImageData * DataPtr; + inline DataPtr &data_ptr() { return d; } +}; +template <> inline bool qIsDetached(QImage &t) { return t.isDetached(); } template <> inline void qSwap(QImage &value1, QImage &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QImage)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QImage"; } }; + inline bool QImage::valid(const QPoint &pt) const { return valid(pt.x(), pt.y()); } + inline int QImage::pixelIndex(const QPoint &pt) const { return pixelIndex(pt.x(), pt.y());} + inline QRgb QImage::pixel(const QPoint &pt) const { return pixel(pt.x(), pt.y()); } + inline void QImage::setPixel(const QPoint &pt, uint index_or_rgb) { setPixel(pt.x(), pt.y(), index_or_rgb); } + QDataStream &operator<<(QDataStream &, const QImage &); + QDataStream &operator>>(QDataStream &, QImage &); +typedef QtValidLicenseForGuiModule QtGuiModule; +class QImageWriter; +class QColor; +class QVariant; +class QX11Info; +class QPixmapData; +class QPixmap : public QPaintDevice +{ +public: + QPixmap(); + explicit QPixmap(QPixmapData *data); + QPixmap(int w, int h); + QPixmap(const QSize &); + QPixmap(const QString& fileName, const char *format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor); + QPixmap(const char * const xpm[]); + QPixmap(const QPixmap &); + ~QPixmap(); + QPixmap &operator=(const QPixmap &); + operator QVariant() const; + bool isNull() const; + int devType() const; + int width() const; + int height() const; + QSize size() const; + QRect rect() const; + int depth() const; + static int defaultDepth(); + void fill(const QColor &fillColor = Qt::white); + void fill(const QWidget *widget, const QPoint &ofs); + inline void fill(const QWidget *widget, int xofs, int yofs) { fill(widget, QPoint(xofs, yofs)); } + QBitmap mask() const; + void setMask(const QBitmap &); + QPixmap alphaChannel() const; + void setAlphaChannel(const QPixmap &); + bool hasAlpha() const; + bool hasAlphaChannel() const; + QBitmap createHeuristicMask(bool clipTight = true) const; + QBitmap createMaskFromColor(const QColor &maskColor) const; + QBitmap createMaskFromColor(const QColor &maskColor, Qt::MaskMode mode) const; + static QPixmap grabWindow(WId, int x=0, int y=0, int w=-1, int h=-1); + static QPixmap grabWidget(QWidget *widget, const QRect &rect); + static inline QPixmap grabWidget(QWidget *widget, int x=0, int y=0, int w=-1, int h=-1) + { return grabWidget(widget, QRect(x, y, w, h)); } + inline QPixmap scaled(int w, int h, Qt::AspectRatioMode aspectMode = Qt::IgnoreAspectRatio, + Qt::TransformationMode mode = Qt::FastTransformation) const + { return scaled(QSize(w, h), aspectMode, mode); } + QPixmap scaled(const QSize &s, Qt::AspectRatioMode aspectMode = Qt::IgnoreAspectRatio, + Qt::TransformationMode mode = Qt::FastTransformation) const; + QPixmap scaledToWidth(int w, Qt::TransformationMode mode = Qt::FastTransformation) const; + QPixmap scaledToHeight(int h, Qt::TransformationMode mode = Qt::FastTransformation) const; + QPixmap transformed(const QMatrix &, Qt::TransformationMode mode = Qt::FastTransformation) const; + static QMatrix trueMatrix(const QMatrix &m, int w, int h); + QPixmap transformed(const QTransform &, Qt::TransformationMode mode = Qt::FastTransformation) const; + static QTransform trueMatrix(const QTransform &m, int w, int h); + QImage toImage() const; + static QPixmap fromImage(const QImage &image, Qt::ImageConversionFlags flags = Qt::AutoColor); + bool load(const QString& fileName, const char *format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor); + bool loadFromData(const uchar *buf, uint len, const char* format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor); + inline bool loadFromData(const QByteArray &data, const char* format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor); + bool save(const QString& fileName, const char* format = 0, int quality = -1) const; + bool save(QIODevice* device, const char* format = 0, int quality = -1) const; + inline QPixmap copy(int x, int y, int width, int height) const; + QPixmap copy(const QRect &rect = QRect()) const; + inline void scroll(int dx, int dy, int x, int y, int width, int height, QRegion *exposed = 0); + void scroll(int dx, int dy, const QRect &rect, QRegion *exposed = 0); + int serialNumber() const; + qint64 cacheKey() const; + bool isDetached() const; + void detach(); + bool isQBitmap() const; + enum ShareMode { ImplicitlyShared, ExplicitlyShared }; + static QPixmap fromX11Pixmap(Qt::HANDLE pixmap, ShareMode mode = ImplicitlyShared); + static int x11SetDefaultScreen(int screen); + void x11SetScreen(int screen); + const QX11Info &x11Info() const; + Qt::HANDLE x11PictureHandle() const; + Qt::HANDLE handle() const; + QPaintEngine *paintEngine() const; + inline bool operator!() const { return isNull(); } +public: + int metric(PaintDeviceMetric) const; +private: + QExplicitlySharedDataPointer data; + bool doImageIO(QImageWriter *io, int quality) const; + enum Type { PixmapType, BitmapType }; + QPixmap(const QSize &s, Type); + void init(int, int, Type = PixmapType); + QPixmap(const QSize &s, int type); + void init(int, int, int); + void deref(); + + friend class QPixmapData; + friend class QX11PixmapData; + friend class QMacPixmapData; + friend class QS60PixmapData; + friend class QBitmap; + friend class QPaintDevice; + friend class QPainter; + friend class QGLWidget; + friend class QX11PaintEngine; + friend class QCoreGraphicsPaintEngine; + friend class QWidgetPrivate; + friend class QRasterPaintEngine; + friend class QRasterBuffer; + friend class QPixmapCacheEntry; + friend QDataStream &operator>>(QDataStream &, QPixmap &); + friend qint64 qt_pixmap_id(const QPixmap &pixmap); +public: + QPixmapData* pixmapData() const; +public: + typedef QExplicitlySharedDataPointer DataPtr; + inline DataPtr &data_ptr() { return data; } +}; +template <> inline bool qIsDetached(QPixmap &t) { return t.isDetached(); } template <> inline void qSwap(QPixmap &value1, QPixmap &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } +inline QPixmap QPixmap::copy(int ax, int ay, int awidth, int aheight) const +{ + return copy(QRect(ax, ay, awidth, aheight)); +} +inline void QPixmap::scroll(int dx, int dy, int ax, int ay, int awidth, int aheight, QRegion *exposed) +{ + scroll(dx, dy, QRect(ax, ay, awidth, aheight), exposed); +} +inline bool QPixmap::loadFromData(const QByteArray &buf, const char *format, + Qt::ImageConversionFlags flags) +{ + return loadFromData(reinterpret_cast(buf.constData()), buf.size(), format, flags); +} + QDataStream &operator<<(QDataStream &, const QPixmap &); + QDataStream &operator>>(QDataStream &, QPixmap &); +typedef QtValidLicenseForGuiModule QtGuiModule; +class QIconPrivate; +class QIconEngine; +class QIconEngineV2; +class QIcon +{ +public: + enum Mode { Normal, Disabled, Active, Selected }; + enum State { On, Off }; + QIcon(); + QIcon(const QPixmap &pixmap); + QIcon(const QIcon &other); + explicit QIcon(const QString &fileName); + explicit QIcon(QIconEngine *engine); + explicit QIcon(QIconEngineV2 *engine); + ~QIcon(); + QIcon &operator=(const QIcon &other); + operator QVariant() const; + QPixmap pixmap(const QSize &size, Mode mode = Normal, State state = Off) const; + inline QPixmap pixmap(int w, int h, Mode mode = Normal, State state = Off) const + { return pixmap(QSize(w, h), mode, state); } + inline QPixmap pixmap(int extent, Mode mode = Normal, State state = Off) const + { return pixmap(QSize(extent, extent), mode, state); } + QSize actualSize(const QSize &size, Mode mode = Normal, State state = Off) const; + void paint(QPainter *painter, const QRect &rect, Qt::Alignment alignment = Qt::AlignCenter, Mode mode = Normal, State state = Off) const; + inline void paint(QPainter *painter, int x, int y, int w, int h, Qt::Alignment alignment = Qt::AlignCenter, Mode mode = Normal, State state = Off) const + { paint(painter, QRect(x, y, w, h), alignment, mode, state); } + bool isNull() const; + bool isDetached() const; + void detach(); + int serialNumber() const; + qint64 cacheKey() const; + void addPixmap(const QPixmap &pixmap, Mode mode = Normal, State state = Off); + void addFile(const QString &fileName, const QSize &size = QSize(), Mode mode = Normal, State state = Off); + QList availableSizes(Mode mode = Normal, State state = Off) const; + static QIcon fromTheme(const QString &name, const QIcon &fallback = QIcon()); + static bool hasThemeIcon(const QString &name); + static QStringList themeSearchPaths(); + static void setThemeSearchPaths(const QStringList &searchpath); + static QString themeName(); + static void setThemeName(const QString &path); + +private: + QIconPrivate *d; + friend QDataStream &operator<<(QDataStream &, const QIcon &); + friend QDataStream &operator>>(QDataStream &, QIcon &); +public: + typedef QIconPrivate * DataPtr; + inline DataPtr &data_ptr() { return d; } +}; +template <> inline bool qIsDetached(QIcon &t) { return t.isDetached(); } template <> inline void qSwap(QIcon &value1, QIcon &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QIcon)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QIcon"; } }; + QDataStream &operator<<(QDataStream &, const QIcon &); + QDataStream &operator>>(QDataStream &, QIcon &); +namespace WebCore { + class Settings; +} +class QWebPage; +class QWebPluginDatabase; +class QWebSettingsPrivate; +class QUrl; +class QWebSettings { +public: + enum FontFamily { + StandardFont, + FixedFont, + SerifFont, + SansSerifFont, + CursiveFont, + FantasyFont + }; + enum WebAttribute { + AutoLoadImages, + JavascriptEnabled, + JavaEnabled, + PluginsEnabled, + PrivateBrowsingEnabled, + JavascriptCanOpenWindows, + JavascriptCanAccessClipboard, + DeveloperExtrasEnabled, + LinksIncludedInFocusChain, + ZoomTextOnly, + PrintElementBackgrounds, + OfflineStorageDatabaseEnabled, + OfflineWebApplicationCacheEnabled, + LocalStorageEnabled, + LocalStorageDatabaseEnabled = LocalStorageEnabled, + LocalContentCanAccessRemoteUrls, + DnsPrefetchEnabled + }; + enum WebGraphic { + MissingImageGraphic, + MissingPluginGraphic, + DefaultFrameIconGraphic, + TextAreaSizeGripCornerGraphic + }; + enum FontSize { + MinimumFontSize, + MinimumLogicalFontSize, + DefaultFontSize, + DefaultFixedFontSize + }; + static QWebSettings *globalSettings(); + void setFontFamily(FontFamily which, const QString &family); + QString fontFamily(FontFamily which) const; + void resetFontFamily(FontFamily which); + void setFontSize(FontSize type, int size); + int fontSize(FontSize type) const; + void resetFontSize(FontSize type); + void setAttribute(WebAttribute attr, bool on); + bool testAttribute(WebAttribute attr) const; + void resetAttribute(WebAttribute attr); + void setUserStyleSheetUrl(const QUrl &location); + QUrl userStyleSheetUrl() const; + void setDefaultTextEncoding(const QString &encoding); + QString defaultTextEncoding() const; + static void setIconDatabasePath(const QString &location); + static QString iconDatabasePath(); + static void clearIconDatabase(); + static QIcon iconForUrl(const QUrl &url); + static void setWebGraphic(WebGraphic type, const QPixmap &graphic); + static QPixmap webGraphic(WebGraphic type); + static void setMaximumPagesInCache(int pages); + static int maximumPagesInCache(); + static void setObjectCacheCapacities(int cacheMinDeadCapacity, int cacheMaxDead, int totalCapacity); + static void setOfflineStoragePath(const QString& path); + static QString offlineStoragePath(); + static void setOfflineStorageDefaultQuota(qint64 maximumSize); + static qint64 offlineStorageDefaultQuota(); + static void setOfflineWebApplicationCachePath(const QString& path); + static QString offlineWebApplicationCachePath(); + static void setOfflineWebApplicationCacheQuota(qint64 maximumSize); + static qint64 offlineWebApplicationCacheQuota(); + void setLocalStoragePath(const QString& path); + QString localStoragePath() const; + static void clearMemoryCaches(); + static void enablePersistentStorage(const QString& path = QString()); + inline QWebSettingsPrivate* handle() const { return d; } +private: + friend class QWebPagePrivate; + friend class QWebSettingsPrivate; + QWebSettings(const QWebSettings &); QWebSettings &operator=(const QWebSettings &); + QWebSettings(); + QWebSettings(WebCore::Settings *settings); + ~QWebSettings(); + QWebSettingsPrivate *d; +}; +typedef QtValidLicenseForCoreModule QtCoreModule; +template +struct QPair +{ + typedef T1 first_type; + typedef T2 second_type; + QPair() : first(T1()), second(T2()) {} + QPair(const T1 &t1, const T2 &t2) : first(t1), second(t2) {} + QPair &operator=(const QPair &other) + { first = other.first; second = other.second; return *this; } + T1 first; + T2 second; +}; +template +inline bool operator==(const QPair &p1, const QPair &p2) +{ return p1.first == p2.first && p1.second == p2.second; } +template +inline bool operator!=(const QPair &p1, const QPair &p2) +{ return !(p1 == p2); } +template +inline bool operator<(const QPair &p1, const QPair &p2) +{ + return p1.first < p2.first || (!(p2.first < p1.first) && p1.second < p2.second); +} +template +inline bool operator>(const QPair &p1, const QPair &p2) +{ + return p2 < p1; +} +template +inline bool operator<=(const QPair &p1, const QPair &p2) +{ + return !(p2 < p1); +} +template +inline bool operator>=(const QPair &p1, const QPair &p2) +{ + return !(p1 < p2); +} +template + QPair qMakePair(const T1 &x, const T2 &y) +{ + return QPair(x, y); +} +template +inline QDataStream& operator>>(QDataStream& s, QPair& p) +{ + s >> p.first >> p.second; + return s; +} +template +inline QDataStream& operator<<(QDataStream& s, const QPair& p) +{ + s << p.first << p.second; + return s; +} +typedef QtValidLicenseForCoreModule QtCoreModule; +class QUrlPrivate; +class QDataStream; +class QUrl +{ +public: + enum ParsingMode { + TolerantMode, + StrictMode + }; + enum FormattingOption { + None = 0x0, + RemoveScheme = 0x1, + RemovePassword = 0x2, + RemoveUserInfo = RemovePassword | 0x4, + RemovePort = 0x8, + RemoveAuthority = RemoveUserInfo | RemovePort | 0x10, + RemovePath = 0x20, + RemoveQuery = 0x40, + RemoveFragment = 0x80, + StripTrailingSlash = 0x10000 + }; + typedef QFlags FormattingOptions; + QUrl(); + QUrl(const QString &url); + QUrl(const QString &url, ParsingMode mode); + QUrl(const QUrl ©); + QUrl &operator =(const QUrl ©); + QUrl &operator =(const QString &url); + ~QUrl(); + void setUrl(const QString &url); + void setUrl(const QString &url, ParsingMode mode); + void setEncodedUrl(const QByteArray &url); + void setEncodedUrl(const QByteArray &url, ParsingMode mode); + bool isValid() const; + bool isEmpty() const; + void clear(); + void setScheme(const QString &scheme); + QString scheme() const; + void setAuthority(const QString &authority); + QString authority() const; + void setUserInfo(const QString &userInfo); + QString userInfo() const; + void setUserName(const QString &userName); + QString userName() const; + void setEncodedUserName(const QByteArray &userName); + QByteArray encodedUserName() const; + void setPassword(const QString &password); + QString password() const; + void setEncodedPassword(const QByteArray &password); + QByteArray encodedPassword() const; + void setHost(const QString &host); + QString host() const; + void setEncodedHost(const QByteArray &host); + QByteArray encodedHost() const; + void setPort(int port); + int port() const; + int port(int defaultPort) const; + void setPath(const QString &path); + QString path() const; + void setEncodedPath(const QByteArray &path); + QByteArray encodedPath() const; + bool hasQuery() const; + void setEncodedQuery(const QByteArray &query); + QByteArray encodedQuery() const; + void setQueryDelimiters(char valueDelimiter, char pairDelimiter); + char queryValueDelimiter() const; + char queryPairDelimiter() const; + void setQueryItems(const QList > &query); + void addQueryItem(const QString &key, const QString &value); + QList > queryItems() const; + bool hasQueryItem(const QString &key) const; + QString queryItemValue(const QString &key) const; + QStringList allQueryItemValues(const QString &key) const; + void removeQueryItem(const QString &key); + void removeAllQueryItems(const QString &key); + void setEncodedQueryItems(const QList > &query); + void addEncodedQueryItem(const QByteArray &key, const QByteArray &value); + QList > encodedQueryItems() const; + bool hasEncodedQueryItem(const QByteArray &key) const; + QByteArray encodedQueryItemValue(const QByteArray &key) const; + QList allEncodedQueryItemValues(const QByteArray &key) const; + void removeEncodedQueryItem(const QByteArray &key); + void removeAllEncodedQueryItems(const QByteArray &key); + void setFragment(const QString &fragment); + QString fragment() const; + void setEncodedFragment(const QByteArray &fragment); + QByteArray encodedFragment() const; + bool hasFragment() const; + QUrl resolved(const QUrl &relative) const; + bool isRelative() const; + bool isParentOf(const QUrl &url) const; + static QUrl fromLocalFile(const QString &localfile); + QString toLocalFile() const; + QString toString(FormattingOptions options = None) const; + QByteArray toEncoded(FormattingOptions options = None) const; + static QUrl fromEncoded(const QByteArray &url); + static QUrl fromEncoded(const QByteArray &url, ParsingMode mode); + static QUrl fromUserInput(const QString &userInput); + void detach(); + bool isDetached() const; + bool operator <(const QUrl &url) const; + bool operator ==(const QUrl &url) const; + bool operator !=(const QUrl &url) const; + static QString fromPercentEncoding(const QByteArray &); + static QByteArray toPercentEncoding(const QString &, + const QByteArray &exclude = QByteArray(), + const QByteArray &include = QByteArray()); + static QString fromPunycode(const QByteArray &); + static QByteArray toPunycode(const QString &); + static QString fromAce(const QByteArray &); + static QByteArray toAce(const QString &); + static QStringList idnWhitelist(); + static void setIdnWhitelist(const QStringList &); + QString errorString() const; +public: +private: + QUrlPrivate *d; +public: + typedef QUrlPrivate * DataPtr; + inline DataPtr &data_ptr() { return d; } +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QUrl)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QUrl"; } }; +template <> inline bool qIsDetached(QUrl &t) { return t.isDetached(); } template <> inline void qSwap(QUrl &value1, QUrl &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } +inline QFlags operator|(QUrl::FormattingOptions::enum_type f1, QUrl::FormattingOptions::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(QUrl::FormattingOptions::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QUrl::FormattingOptions::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } + QDataStream &operator<<(QDataStream &, const QUrl &); + QDataStream &operator>>(QDataStream &, QUrl &); + QDebug operator<<(QDebug, const QUrl &); +typedef QtValidLicenseForCoreModule QtCoreModule; +class QMargins +{ +public: + QMargins(); + QMargins(int left, int top, int right, int bottom); + bool isNull() const; + int left() const; + int top() const; + int right() const; + int bottom() const; + void setLeft(int left); + void setTop(int top); + void setRight(int right); + void setBottom(int bottom); +private: + int m_left; + int m_top; + int m_right; + int m_bottom; + friend inline bool operator==(const QMargins &, const QMargins &); + friend inline bool operator!=(const QMargins &, const QMargins &); +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QMargins)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QMargins"; } }; +inline QMargins::QMargins() +{ m_top = m_bottom = m_left = m_right = 0; } +inline QMargins::QMargins(int aleft, int atop, int aright, int abottom) + : m_left(aleft), m_top(atop), m_right(aright), m_bottom(abottom) {} +inline bool QMargins::isNull() const +{ return m_left==0 && m_top==0 && m_right==0 && m_bottom==0; } +inline int QMargins::left() const +{ return m_left; } +inline int QMargins::top() const +{ return m_top; } +inline int QMargins::right() const +{ return m_right; } +inline int QMargins::bottom() const +{ return m_bottom; } +inline void QMargins::setLeft(int aleft) +{ m_left = aleft; } +inline void QMargins::setTop(int atop) +{ m_top = atop; } +inline void QMargins::setRight(int aright) +{ m_right = aright; } +inline void QMargins::setBottom(int abottom) +{ m_bottom = abottom; } +inline bool operator==(const QMargins &m1, const QMargins &m2) +{ + return + m1.m_left == m2.m_left && + m1.m_top == m2.m_top && + m1.m_right == m2.m_right && + m1.m_bottom == m2.m_bottom; +} +inline bool operator!=(const QMargins &m1, const QMargins &m2) +{ + return + m1.m_left != m2.m_left || + m1.m_top != m2.m_top || + m1.m_right != m2.m_right || + m1.m_bottom != m2.m_bottom; +} + QDebug operator<<(QDebug, const QMargins &); +typedef QtValidLicenseForGuiModule QtGuiModule; +struct QBrushData; +class QPixmap; +class QGradient; +class QVariant; +struct QBrushDataPointerDeleter; +class QBrush +{ +public: + QBrush(); + QBrush(Qt::BrushStyle bs); + QBrush(const QColor &color, Qt::BrushStyle bs=Qt::SolidPattern); + QBrush(Qt::GlobalColor color, Qt::BrushStyle bs=Qt::SolidPattern); + QBrush(const QColor &color, const QPixmap &pixmap); + QBrush(Qt::GlobalColor color, const QPixmap &pixmap); + QBrush(const QPixmap &pixmap); + QBrush(const QImage &image); + QBrush(const QBrush &brush); + QBrush(const QGradient &gradient); + ~QBrush(); + QBrush &operator=(const QBrush &brush); + operator QVariant() const; + inline Qt::BrushStyle style() const; + void setStyle(Qt::BrushStyle); + inline const QMatrix &matrix() const; + void setMatrix(const QMatrix &mat); + inline QTransform transform() const; + void setTransform(const QTransform &); + QPixmap texture() const; + void setTexture(const QPixmap &pixmap); + QImage textureImage() const; + void setTextureImage(const QImage &image); + inline const QColor &color() const; + void setColor(const QColor &color); + inline void setColor(Qt::GlobalColor color); + const QGradient *gradient() const; + bool isOpaque() const; + bool operator==(const QBrush &b) const; + inline bool operator!=(const QBrush &b) const { return !(operator==(b)); } +private: + friend class QX11PaintEngine; + friend class QRasterPaintEngine; + friend class QRasterPaintEnginePrivate; + friend struct QSpanData; + friend class QPainter; + friend bool qHasPixmapTexture(const QBrush& brush); + void detach(Qt::BrushStyle newStyle); + void init(const QColor &color, Qt::BrushStyle bs); + QScopedPointer d; + void cleanUp(QBrushData *x); +public: + inline bool isDetached() const; + typedef QScopedPointer DataPtr; + inline DataPtr &data_ptr() { return d; } +}; +inline void QBrush::setColor(Qt::GlobalColor acolor) +{ setColor(QColor(acolor)); } +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QBrush)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QBrush"; } }; +template <> inline bool qIsDetached(QBrush &t) { return t.isDetached(); } template <> inline void qSwap(QBrush &value1, QBrush &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } + QDataStream &operator<<(QDataStream &, const QBrush &); + QDataStream &operator>>(QDataStream &, QBrush &); + QDebug operator<<(QDebug, const QBrush &); +struct QBrushData +{ + QAtomicInt ref; + Qt::BrushStyle style; + QColor color; + QTransform transform; +}; +inline Qt::BrushStyle QBrush::style() const { return d->style; } +inline const QColor &QBrush::color() const { return d->color; } +inline const QMatrix &QBrush::matrix() const { return d->transform.toAffine(); } +inline QTransform QBrush::transform() const { return d->transform; } +inline bool QBrush::isDetached() const { return d->ref == 1; } +class QGradientPrivate; +typedef QPair QGradientStop; +typedef QVector QGradientStops; +class QGradient +{ + public: static const QMetaObject staticMetaObject; private: + +public: + enum Type { + LinearGradient, + RadialGradient, + ConicalGradient, + NoGradient + }; + enum Spread { + PadSpread, + ReflectSpread, + RepeatSpread + }; + enum CoordinateMode { + LogicalMode, + StretchToDeviceMode, + ObjectBoundingMode + }; + enum InterpolationMode { + ColorInterpolation, + ComponentInterpolation + }; + QGradient(); + Type type() const { return m_type; } + inline void setSpread(Spread spread); + Spread spread() const { return m_spread; } + void setColorAt(qreal pos, const QColor &color); + void setStops(const QGradientStops &stops); + QGradientStops stops() const; + CoordinateMode coordinateMode() const; + void setCoordinateMode(CoordinateMode mode); + InterpolationMode interpolationMode() const; + void setInterpolationMode(InterpolationMode mode); + bool operator==(const QGradient &gradient) const; + inline bool operator!=(const QGradient &other) const + { return !operator==(other); } + bool operator==(const QGradient &gradient); +private: + friend class QLinearGradient; + friend class QRadialGradient; + friend class QConicalGradient; + Type m_type; + Spread m_spread; + QGradientStops m_stops; + union { + struct { + qreal x1, y1, x2, y2; + } linear; + struct { + qreal cx, cy, fx, fy, radius; + } radial; + struct { + qreal cx, cy, angle; + } conical; + } m_data; + void *dummy; +}; +inline void QGradient::setSpread(Spread aspread) +{ m_spread = aspread; } +class QLinearGradient : public QGradient +{ +public: + QLinearGradient(); + QLinearGradient(const QPointF &start, const QPointF &finalStop); + QLinearGradient(qreal xStart, qreal yStart, qreal xFinalStop, qreal yFinalStop); + QPointF start() const; + void setStart(const QPointF &start); + inline void setStart(qreal x, qreal y) { setStart(QPointF(x, y)); } + QPointF finalStop() const; + void setFinalStop(const QPointF &stop); + inline void setFinalStop(qreal x, qreal y) { setFinalStop(QPointF(x, y)); } +}; +class QRadialGradient : public QGradient +{ +public: + QRadialGradient(); + QRadialGradient(const QPointF ¢er, qreal radius, const QPointF &focalPoint); + QRadialGradient(qreal cx, qreal cy, qreal radius, qreal fx, qreal fy); + QRadialGradient(const QPointF ¢er, qreal radius); + QRadialGradient(qreal cx, qreal cy, qreal radius); + QPointF center() const; + void setCenter(const QPointF ¢er); + inline void setCenter(qreal x, qreal y) { setCenter(QPointF(x, y)); } + QPointF focalPoint() const; + void setFocalPoint(const QPointF &focalPoint); + inline void setFocalPoint(qreal x, qreal y) { setFocalPoint(QPointF(x, y)); } + qreal radius() const; + void setRadius(qreal radius); +}; +class QConicalGradient : public QGradient +{ +public: + QConicalGradient(); + QConicalGradient(const QPointF ¢er, qreal startAngle); + QConicalGradient(qreal cx, qreal cy, qreal startAngle); + QPointF center() const; + void setCenter(const QPointF ¢er); + inline void setCenter(qreal x, qreal y) { setCenter(QPointF(x, y)); } + qreal angle() const; + void setAngle(qreal angle); +}; +typedef QtValidLicenseForGuiModule QtGuiModule; +class QPalettePrivate; +class QVariant; +class QPalette +{ + public: static const QMetaObject staticMetaObject; private: + +public: + QPalette(); + QPalette(const QColor &button); + QPalette(Qt::GlobalColor button); + QPalette(const QColor &button, const QColor &window); + QPalette(const QBrush &windowText, const QBrush &button, const QBrush &light, + const QBrush &dark, const QBrush &mid, const QBrush &text, + const QBrush &bright_text, const QBrush &base, const QBrush &window); + QPalette(const QColor &windowText, const QColor &window, const QColor &light, + const QColor &dark, const QColor &mid, const QColor &text, const QColor &base); + QPalette(const QPalette &palette); + ~QPalette(); + QPalette &operator=(const QPalette &palette); + operator QVariant() const; + enum ColorGroup { Active, Disabled, Inactive, NColorGroups, Current, All, Normal = Active }; + enum ColorRole { WindowText, Button, Light, Midlight, Dark, Mid, + Text, BrightText, ButtonText, Base, Window, Shadow, + Highlight, HighlightedText, + Link, LinkVisited, + AlternateBase, + NoRole, + ToolTipBase, ToolTipText, + NColorRoles = ToolTipText + 1, + Foreground = WindowText, Background = Window + }; + inline ColorGroup currentColorGroup() const { return static_cast(current_group); } + inline void setCurrentColorGroup(ColorGroup cg) { current_group = cg; } + inline const QColor &color(ColorGroup cg, ColorRole cr) const + { return brush(cg, cr).color(); } + const QBrush &brush(ColorGroup cg, ColorRole cr) const; + inline void setColor(ColorGroup cg, ColorRole cr, const QColor &color); + inline void setColor(ColorRole cr, const QColor &color); + inline void setBrush(ColorRole cr, const QBrush &brush); + bool isBrushSet(ColorGroup cg, ColorRole cr) const; + void setBrush(ColorGroup cg, ColorRole cr, const QBrush &brush); + void setColorGroup(ColorGroup cr, const QBrush &windowText, const QBrush &button, + const QBrush &light, const QBrush &dark, const QBrush &mid, + const QBrush &text, const QBrush &bright_text, const QBrush &base, + const QBrush &window); + bool isEqual(ColorGroup cr1, ColorGroup cr2) const; + inline const QColor &color(ColorRole cr) const { return color(Current, cr); } + inline const QBrush &brush(ColorRole cr) const { return brush(Current, cr); } + inline const QBrush &foreground() const { return brush(WindowText); } + inline const QBrush &windowText() const { return brush(WindowText); } + inline const QBrush &button() const { return brush(Button); } + inline const QBrush &light() const { return brush(Light); } + inline const QBrush &dark() const { return brush(Dark); } + inline const QBrush &mid() const { return brush(Mid); } + inline const QBrush &text() const { return brush(Text); } + inline const QBrush &base() const { return brush(Base); } + inline const QBrush &alternateBase() const { return brush(AlternateBase); } + inline const QBrush &toolTipBase() const { return brush(ToolTipBase); } + inline const QBrush &toolTipText() const { return brush(ToolTipText); } + inline const QBrush &background() const { return brush(Window); } + inline const QBrush &window() const { return brush(Window); } + inline const QBrush &midlight() const { return brush(Midlight); } + inline const QBrush &brightText() const { return brush(BrightText); } + inline const QBrush &buttonText() const { return brush(ButtonText); } + inline const QBrush &shadow() const { return brush(Shadow); } + inline const QBrush &highlight() const { return brush(Highlight); } + inline const QBrush &highlightedText() const { return brush(HighlightedText); } + inline const QBrush &link() const { return brush(Link); } + inline const QBrush &linkVisited() const { return brush(LinkVisited); } + bool operator==(const QPalette &p) const; + inline bool operator!=(const QPalette &p) const { return !(operator==(p)); } + bool isCopyOf(const QPalette &p) const; + int serialNumber() const; + qint64 cacheKey() const; + QPalette resolve(const QPalette &) const; + inline uint resolve() const { return resolve_mask; } + inline void resolve(uint mask) { resolve_mask = mask; } +private: + void setColorGroup(ColorGroup cr, const QBrush &windowText, const QBrush &button, + const QBrush &light, const QBrush &dark, const QBrush &mid, + const QBrush &text, const QBrush &bright_text, + const QBrush &base, const QBrush &alternate_base, + const QBrush &window, const QBrush &midlight, + const QBrush &button_text, const QBrush &shadow, + const QBrush &highlight, const QBrush &highlighted_text, + const QBrush &link, const QBrush &link_visited); + void setColorGroup(ColorGroup cr, const QBrush &windowText, const QBrush &button, + const QBrush &light, const QBrush &dark, const QBrush &mid, + const QBrush &text, const QBrush &bright_text, + const QBrush &base, const QBrush &alternate_base, + const QBrush &window, const QBrush &midlight, + const QBrush &button_text, const QBrush &shadow, + const QBrush &highlight, const QBrush &highlighted_text, + const QBrush &link, const QBrush &link_visited, + const QBrush &toolTipBase, const QBrush &toolTipText); + void init(); + void detach(); + QPalettePrivate *d; + uint current_group : 4; + uint resolve_mask : 28; + friend QDataStream &operator<<(QDataStream &s, const QPalette &p); +}; +inline void QPalette::setColor(ColorGroup acg, ColorRole acr, + const QColor &acolor) +{ setBrush(acg, acr, QBrush(acolor)); } +inline void QPalette::setColor(ColorRole acr, const QColor &acolor) +{ setColor(All, acr, acolor); } +inline void QPalette::setBrush(ColorRole acr, const QBrush &abrush) +{ setBrush(All, acr, abrush); } + QDataStream &operator<<(QDataStream &ds, const QPalette &p); + QDataStream &operator>>(QDataStream &ds, QPalette &p); +typedef struct FT_FaceRec_* FT_Face; +typedef QtValidLicenseForGuiModule QtGuiModule; +class QFontPrivate; +class QStringList; +class QVariant; +class Q3TextFormatCollection; +class QFont +{ + public: static const QMetaObject staticMetaObject; private: + +public: + enum StyleHint { + Helvetica, SansSerif = Helvetica, + Times, Serif = Times, + Courier, TypeWriter = Courier, + OldEnglish, Decorative = OldEnglish, + System, + AnyStyle + }; + enum StyleStrategy { + PreferDefault = 0x0001, + PreferBitmap = 0x0002, + PreferDevice = 0x0004, + PreferOutline = 0x0008, + ForceOutline = 0x0010, + PreferMatch = 0x0020, + PreferQuality = 0x0040, + PreferAntialias = 0x0080, + NoAntialias = 0x0100, + OpenGLCompatible = 0x0200, + NoFontMerging = 0x8000 + }; + enum Weight { + Light = 25, + Normal = 50, + DemiBold = 63, + Bold = 75, + Black = 87 + }; + enum Style { + StyleNormal, + StyleItalic, + StyleOblique + }; + enum Stretch { + UltraCondensed = 50, + ExtraCondensed = 62, + Condensed = 75, + SemiCondensed = 87, + Unstretched = 100, + SemiExpanded = 112, + Expanded = 125, + ExtraExpanded = 150, + UltraExpanded = 200 + }; + enum Capitalization { + MixedCase, + AllUppercase, + AllLowercase, + SmallCaps, + Capitalize + }; + enum SpacingType { + PercentageSpacing, + AbsoluteSpacing + }; + enum ResolveProperties { + FamilyResolved = 0x0001, + SizeResolved = 0x0002, + StyleHintResolved = 0x0004, + StyleStrategyResolved = 0x0008, + WeightResolved = 0x0010, + StyleResolved = 0x0020, + UnderlineResolved = 0x0040, + OverlineResolved = 0x0080, + StrikeOutResolved = 0x0100, + FixedPitchResolved = 0x0200, + StretchResolved = 0x0400, + KerningResolved = 0x0800, + CapitalizationResolved = 0x1000, + LetterSpacingResolved = 0x2000, + WordSpacingResolved = 0x4000, + AllPropertiesResolved = 0x7fff + }; + QFont(); + QFont(const QString &family, int pointSize = -1, int weight = -1, bool italic = false); + QFont(const QFont &, QPaintDevice *pd); + QFont(const QFont &); + ~QFont(); + QString family() const; + void setFamily(const QString &); + int pointSize() const; + void setPointSize(int); + qreal pointSizeF() const; + void setPointSizeF(qreal); + int pixelSize() const; + void setPixelSize(int); + int weight() const; + void setWeight(int); + inline bool bold() const; + inline void setBold(bool); + void setStyle(Style style); + Style style() const; + inline bool italic() const; + inline void setItalic(bool b); + bool underline() const; + void setUnderline(bool); + bool overline() const; + void setOverline(bool); + bool strikeOut() const; + void setStrikeOut(bool); + bool fixedPitch() const; + void setFixedPitch(bool); + bool kerning() const; + void setKerning(bool); + StyleHint styleHint() const; + StyleStrategy styleStrategy() const; + void setStyleHint(StyleHint, StyleStrategy = PreferDefault); + void setStyleStrategy(StyleStrategy s); + int stretch() const; + void setStretch(int); + qreal letterSpacing() const; + SpacingType letterSpacingType() const; + void setLetterSpacing(SpacingType type, qreal spacing); + qreal wordSpacing() const; + void setWordSpacing(qreal spacing); + void setCapitalization(Capitalization); + Capitalization capitalization() const; + bool rawMode() const; + void setRawMode(bool); + bool exactMatch() const; + QFont &operator=(const QFont &); + bool operator==(const QFont &) const; + bool operator!=(const QFont &) const; + bool operator<(const QFont &) const; + operator QVariant() const; + bool isCopyOf(const QFont &) const; + Qt::HANDLE handle() const; + FT_Face freetypeFace() const; + void setRawName(const QString &); + QString rawName() const; + QString key() const; + QString toString() const; + bool fromString(const QString &); + static QString substitute(const QString &); + static QStringList substitutes(const QString &); + static QStringList substitutions(); + static void insertSubstitution(const QString&, const QString &); + static void insertSubstitutions(const QString&, const QStringList &); + static void removeSubstitution(const QString &); + static void initialize(); + static void cleanup(); + static void cacheStatistics(); + QString defaultFamily() const; + QString lastResortFamily() const; + QString lastResortFont() const; + QFont resolve(const QFont &) const; + inline uint resolve() const { return resolve_mask; } + inline void resolve(uint mask) { resolve_mask = mask; } +private: + QFont(QFontPrivate *); + void detach(); + void x11SetScreen(int screen = -1); + int x11Screen() const; + friend class QFontPrivate; + friend class QFontDialogPrivate; + friend class QFontMetrics; + friend class QFontMetricsF; + friend class QFontInfo; + friend class QPainter; + friend class QPSPrintEngineFont; + friend class QApplication; + friend class QWidget; + friend class QWidgetPrivate; + friend class Q3TextFormatCollection; + friend class QTextLayout; + friend class QTextEngine; + friend class QStackTextEngine; + friend class QTextLine; + friend struct QScriptLine; + friend class QGLContext; + friend class QWin32PaintEngine; + friend class QAlphaPaintEngine; + friend class QPainterPath; + friend class QTextItemInt; + friend class QPicturePaintEngine; + friend class QPainterReplayer; + friend class QPaintBufferEngine; + friend class QCommandLinkButtonPrivate; + friend QDataStream &operator<<(QDataStream &, const QFont &); + friend QDataStream &operator>>(QDataStream &, QFont &); + QExplicitlySharedDataPointer d; + uint resolve_mask; +}; +inline bool QFont::bold() const +{ return weight() > Normal; } +inline void QFont::setBold(bool enable) +{ setWeight(enable ? Bold : Normal); } +inline bool QFont::italic() const +{ + return (style() != StyleNormal); +} +inline void QFont::setItalic(bool b) { + setStyle(b ? StyleItalic : StyleNormal); +} + QDataStream &operator<<(QDataStream &, const QFont &); + QDataStream &operator>>(QDataStream &, QFont &); + QDebug operator<<(QDebug, const QFont &); +typedef QtValidLicenseForGuiModule QtGuiModule; +class QTextCodec; +class QRect; +class QFontMetrics +{ +public: + QFontMetrics(const QFont &); + QFontMetrics(const QFont &, QPaintDevice *pd); + QFontMetrics(const QFontMetrics &); + ~QFontMetrics(); + QFontMetrics &operator=(const QFontMetrics &); + int ascent() const; + int descent() const; + int height() const; + int leading() const; + int lineSpacing() const; + int minLeftBearing() const; + int minRightBearing() const; + int maxWidth() const; + int xHeight() const; + int averageCharWidth() const; + bool inFont(QChar) const; + int leftBearing(QChar) const; + int rightBearing(QChar) const; + int width(const QString &, int len = -1) const; + int width(QChar) const; + int charWidth(const QString &str, int pos) const; + QRect boundingRect(QChar) const; + QRect boundingRect(const QString &text) const; + QRect boundingRect(const QRect &r, int flags, const QString &text, int tabstops=0, int *tabarray=0) const; + inline QRect boundingRect(int x, int y, int w, int h, int flags, const QString &text, + int tabstops=0, int *tabarray=0) const + { return boundingRect(QRect(x, y, w, h), flags, text, tabstops, tabarray); } + QSize size(int flags, const QString& str, int tabstops=0, int *tabarray=0) const; + QRect tightBoundingRect(const QString &text) const; + QString elidedText(const QString &text, Qt::TextElideMode mode, int width, int flags = 0) const; + int underlinePos() const; + int overlinePos() const; + int strikeOutPos() const; + int lineWidth() const; + bool operator==(const QFontMetrics &other); + bool operator==(const QFontMetrics &other) const; + inline bool operator !=(const QFontMetrics &other) { return !operator==(other); } + inline bool operator !=(const QFontMetrics &other) const { return !operator==(other); } +private: + friend class QFontMetricsF; + friend class QStackTextEngine; + QExplicitlySharedDataPointer d; +}; +class QFontMetricsF +{ +public: + QFontMetricsF(const QFont &); + QFontMetricsF(const QFont &, QPaintDevice *pd); + QFontMetricsF(const QFontMetrics &); + QFontMetricsF(const QFontMetricsF &); + ~QFontMetricsF(); + QFontMetricsF &operator=(const QFontMetricsF &); + QFontMetricsF &operator=(const QFontMetrics &); + qreal ascent() const; + qreal descent() const; + qreal height() const; + qreal leading() const; + qreal lineSpacing() const; + qreal minLeftBearing() const; + qreal minRightBearing() const; + qreal maxWidth() const; + qreal xHeight() const; + qreal averageCharWidth() const; + bool inFont(QChar) const; + qreal leftBearing(QChar) const; + qreal rightBearing(QChar) const; + qreal width(const QString &string) const; + qreal width(QChar) const; + QRectF boundingRect(const QString &string) const; + QRectF boundingRect(QChar) const; + QRectF boundingRect(const QRectF &r, int flags, const QString& string, int tabstops=0, int *tabarray=0) const; + QSizeF size(int flags, const QString& str, int tabstops=0, int *tabarray=0) const; + QRectF tightBoundingRect(const QString &text) const; + QString elidedText(const QString &text, Qt::TextElideMode mode, qreal width, int flags = 0) const; + qreal underlinePos() const; + qreal overlinePos() const; + qreal strikeOutPos() const; + qreal lineWidth() const; + bool operator==(const QFontMetricsF &other); + bool operator==(const QFontMetricsF &other) const; + inline bool operator !=(const QFontMetricsF &other) { return !operator==(other); } + inline bool operator !=(const QFontMetricsF &other) const { return !operator==(other); } +private: + QExplicitlySharedDataPointer d; +}; +typedef QtValidLicenseForGuiModule QtGuiModule; +class QFontInfo +{ +public: + QFontInfo(const QFont &); + QFontInfo(const QFontInfo &); + ~QFontInfo(); + QFontInfo &operator=(const QFontInfo &); + QString family() const; + int pixelSize() const; + int pointSize() const; + qreal pointSizeF() const; + bool italic() const; + QFont::Style style() const; + int weight() const; + inline bool bold() const { return weight() > QFont::Normal; } + bool underline() const; + bool overline() const; + bool strikeOut() const; + bool fixedPitch() const; + QFont::StyleHint styleHint() const; + bool rawMode() const; + bool exactMatch() const; +private: + QExplicitlySharedDataPointer d; +}; +typedef QtValidLicenseForGuiModule QtGuiModule; +class QVariant; +class QSizePolicy +{ + public: static const QMetaObject staticMetaObject; private: + +private: + enum SizePolicyMasks { + HSize = 4, + HMask = 0x0f, + VMask = HMask << HSize, + CTShift = 9, + CTSize = 5, + WFHShift = CTShift + CTSize, + CTMask = ((0x1 << CTSize) - 1) << CTShift, + UnusedShift = CTShift + CTSize, + UnusedSize = 2 + }; +public: + enum PolicyFlag { + GrowFlag = 1, + ExpandFlag = 2, + ShrinkFlag = 4, + IgnoreFlag = 8 + }; + enum Policy { + Fixed = 0, + Minimum = GrowFlag, + Maximum = ShrinkFlag, + Preferred = GrowFlag | ShrinkFlag, + MinimumExpanding = GrowFlag | ExpandFlag, + Expanding = GrowFlag | ShrinkFlag | ExpandFlag, + Ignored = ShrinkFlag | GrowFlag | IgnoreFlag + }; + enum ControlType { + DefaultType = 0x00000001, + ButtonBox = 0x00000002, + CheckBox = 0x00000004, + ComboBox = 0x00000008, + Frame = 0x00000010, + GroupBox = 0x00000020, + Label = 0x00000040, + Line = 0x00000080, + LineEdit = 0x00000100, + PushButton = 0x00000200, + RadioButton = 0x00000400, + Slider = 0x00000800, + SpinBox = 0x00001000, + TabWidget = 0x00002000, + ToolButton = 0x00004000 + }; + typedef QFlags ControlTypes; + QSizePolicy() : data(0) { } + QSizePolicy(Policy horizontal, Policy vertical) + : data(horizontal | (vertical << HSize)) { } + QSizePolicy(Policy horizontal, Policy vertical, ControlType type) + : data(horizontal | (vertical << HSize)) { setControlType(type); } + Policy horizontalPolicy() const { return static_cast(data & HMask); } + Policy verticalPolicy() const { return static_cast((data & VMask) >> HSize); } + ControlType controlType() const; + void setHorizontalPolicy(Policy d) { data = (data & ~HMask) | d; } + void setVerticalPolicy(Policy d) { data = (data & ~(HMask << HSize)) | (d << HSize); } + void setControlType(ControlType type); + Qt::Orientations expandingDirections() const { + Qt::Orientations result; + if (verticalPolicy() & ExpandFlag) + result |= Qt::Vertical; + if (horizontalPolicy() & ExpandFlag) + result |= Qt::Horizontal; + return result; + } + void setHeightForWidth(bool b) { data = b ? (data | (1 << 2*HSize)) : (data & ~(1 << 2*HSize)); } + bool hasHeightForWidth() const { return data & (1 << 2*HSize); } + bool operator==(const QSizePolicy& s) const { return data == s.data; } + bool operator!=(const QSizePolicy& s) const { return data != s.data; } + operator QVariant() const; + int horizontalStretch() const { return data >> 24; } + int verticalStretch() const { return (data >> 16) & 0xff; } + void setHorizontalStretch(uchar stretchFactor) { data = (data&0x00ffffff) | (uint(stretchFactor)<<24); } + void setVerticalStretch(uchar stretchFactor) { data = (data&0xff00ffff) | (uint(stretchFactor)<<16); } + void transpose(); +private: + friend QDataStream &operator<<(QDataStream &, const QSizePolicy &); + friend QDataStream &operator>>(QDataStream &, QSizePolicy &); + QSizePolicy(int i) : data(i) { } + quint32 data; +}; +inline QFlags operator|(QSizePolicy::ControlTypes::enum_type f1, QSizePolicy::ControlTypes::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(QSizePolicy::ControlTypes::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QSizePolicy::ControlTypes::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } + QDataStream &operator<<(QDataStream &, const QSizePolicy &); + QDataStream &operator>>(QDataStream &, QSizePolicy &); +inline void QSizePolicy::transpose() { + Policy hData = horizontalPolicy(); + Policy vData = verticalPolicy(); + uchar hStretch = uchar(horizontalStretch()); + uchar vStretch = uchar(verticalStretch()); + setHorizontalPolicy(vData); + setVerticalPolicy(hData); + setHorizontalStretch(vStretch); + setVerticalStretch(hStretch); +} +typedef QtValidLicenseForGuiModule QtGuiModule; +class QVariant; +class QCursorData; +class QBitmap; +class QPixmap; +class QCursor +{ +public: + QCursor(); + QCursor(Qt::CursorShape shape); + QCursor(const QBitmap &bitmap, const QBitmap &mask, int hotX=-1, int hotY=-1); + QCursor(const QPixmap &pixmap, int hotX=-1, int hotY=-1); + QCursor(const QCursor &cursor); + ~QCursor(); + QCursor &operator=(const QCursor &cursor); + operator QVariant() const; + Qt::CursorShape shape() const; + void setShape(Qt::CursorShape newShape); + const QBitmap *bitmap() const; + const QBitmap *mask() const; + QPixmap pixmap() const; + QPoint hotSpot() const; + static QPoint pos(); + static void setPos(int x, int y); + inline static void setPos(const QPoint &p) { setPos(p.x(), p.y()); } + Qt::HANDLE handle() const; + QCursor(Qt::HANDLE cursor); + static int x11Screen(); +private: + QCursorData *d; +}; + QDataStream &operator<<(QDataStream &outS, const QCursor &cursor); + QDataStream &operator>>(QDataStream &inS, QCursor &cursor); +typedef QtValidLicenseForGuiModule QtGuiModule; +class QKeySequence; + QDataStream &operator<<(QDataStream &in, const QKeySequence &ks); + QDataStream &operator>>(QDataStream &out, QKeySequence &ks); +class QVariant; +class QKeySequencePrivate; +class QKeySequence +{ +public: + enum StandardKey { + UnknownKey, + HelpContents, + WhatsThis, + Open, + Close, + Save, + New, + Delete, + Cut, + Copy, + Paste, + Undo, + Redo, + Back, + Forward, + Refresh, + ZoomIn, + ZoomOut, + Print, + AddTab, + NextChild, + PreviousChild, + Find, + FindNext, + FindPrevious, + Replace, + SelectAll, + Bold, + Italic, + Underline, + MoveToNextChar, + MoveToPreviousChar, + MoveToNextWord, + MoveToPreviousWord, + MoveToNextLine, + MoveToPreviousLine, + MoveToNextPage, + MoveToPreviousPage, + MoveToStartOfLine, + MoveToEndOfLine, + MoveToStartOfBlock, + MoveToEndOfBlock, + MoveToStartOfDocument, + MoveToEndOfDocument, + SelectNextChar, + SelectPreviousChar, + SelectNextWord, + SelectPreviousWord, + SelectNextLine, + SelectPreviousLine, + SelectNextPage, + SelectPreviousPage, + SelectStartOfLine, + SelectEndOfLine, + SelectStartOfBlock, + SelectEndOfBlock, + SelectStartOfDocument, + SelectEndOfDocument, + DeleteStartOfWord, + DeleteEndOfWord, + DeleteEndOfLine, + InsertParagraphSeparator, + InsertLineSeparator, + SaveAs, + Preferences, + Quit + }; + QKeySequence(); + QKeySequence(const QString &key); + QKeySequence(int k1, int k2 = 0, int k3 = 0, int k4 = 0); + QKeySequence(const QKeySequence &ks); + QKeySequence(StandardKey key); + ~QKeySequence(); + uint count() const; + bool isEmpty() const; + enum SequenceMatch { + NoMatch, + PartialMatch, + ExactMatch + }; + enum SequenceFormat { + NativeText, + PortableText + }; + QString toString(SequenceFormat format = PortableText) const; + static QKeySequence fromString(const QString &str, SequenceFormat format = PortableText); + SequenceMatch matches(const QKeySequence &seq) const; + static QKeySequence mnemonic(const QString &text); + static QList keyBindings(StandardKey key); + operator QString() const; + operator QVariant() const; + operator int() const; + int operator[](uint i) const; + QKeySequence &operator=(const QKeySequence &other); + bool operator==(const QKeySequence &other) const; + inline bool operator!= (const QKeySequence &other) const + { return !(*this == other); } + bool operator< (const QKeySequence &ks) const; + inline bool operator> (const QKeySequence &other) const + { return other < *this; } + inline bool operator<= (const QKeySequence &other) const + { return !(other < *this); } + inline bool operator>= (const QKeySequence &other) const + { return !(*this < other); } + bool isDetached() const; +private: + static int decodeString(const QString &ks); + static QString encodeString(int key); + int assign(const QString &str); + void setKey(int key, int index); + QKeySequencePrivate *d; + friend QDataStream &operator<<(QDataStream &in, const QKeySequence &ks); + friend QDataStream &operator>>(QDataStream &in, QKeySequence &ks); + friend class Q3AccelManager; + friend class QShortcutMap; + friend class QShortcut; +public: + typedef QKeySequencePrivate * DataPtr; + inline DataPtr &data_ptr() { return d; } +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QKeySequence)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QKeySequence"; } }; +template <> inline bool qIsDetached(QKeySequence &t) { return t.isDetached(); } template <> inline void qSwap(QKeySequence &value1, QKeySequence &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } + QDebug operator<<(QDebug, const QKeySequence &); +typedef QtValidLicenseForGuiModule QtGuiModule; +class QLayout; +class QWSRegionManager; +class QStyle; +class QAction; +class QVariant; +class QActionEvent; +class QMouseEvent; +class QWheelEvent; +class QHoverEvent; +class QKeyEvent; +class QFocusEvent; +class QPaintEvent; +class QMoveEvent; +class QResizeEvent; +class QCloseEvent; +class QContextMenuEvent; +class QInputMethodEvent; +class QTabletEvent; +class QDragEnterEvent; +class QDragMoveEvent; +class QDragLeaveEvent; +class QDropEvent; +class QShowEvent; +class QHideEvent; +class QInputContext; +class QIcon; +class QWindowSurface; +class QLocale; +class QGraphicsProxyWidget; +class QGraphicsEffect; +class QX11Info; +class QWidgetData +{ +public: + WId winid; + uint widget_attributes; + Qt::WindowFlags window_flags; + uint window_state : 4; + uint focus_policy : 4; + uint sizehint_forced :1; + uint is_closing :1; + uint in_show : 1; + uint in_set_window_state : 1; + mutable uint fstrut_dirty : 1; + uint context_menu_policy : 3; + uint window_modality : 2; + uint in_destructor : 1; + uint unused : 13; + QRect crect; + mutable QPalette pal; + QFont fnt; + QRect wrect; +}; +class QWidgetPrivate; +class QWidget : public QObject, public QPaintDevice +{ + public: template inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: + inline QWidgetPrivate* d_func() { return reinterpret_cast(qGetPtrHelper(d_ptr)); } inline const QWidgetPrivate* d_func() const { return reinterpret_cast(qGetPtrHelper(d_ptr)); } friend class QWidgetPrivate; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +public: + enum RenderFlag { + DrawWindowBackground = 0x1, + DrawChildren = 0x2, + IgnoreMask = 0x4 + }; + typedef QFlags RenderFlags; + explicit QWidget(QWidget* parent = 0, Qt::WindowFlags f = 0); + ~QWidget(); + int devType() const; + WId winId() const; + void createWinId(); + inline WId internalWinId() const { return data->winid; } + WId effectiveWinId() const; + QStyle *style() const; + void setStyle(QStyle *); + bool isTopLevel() const; + bool isWindow() const; + bool isModal() const; + Qt::WindowModality windowModality() const; + void setWindowModality(Qt::WindowModality windowModality); + bool isEnabled() const; + bool isEnabledTo(QWidget*) const; + bool isEnabledToTLW() const; +public : + void setEnabled(bool); + void setDisabled(bool); + void setWindowModified(bool); +public: + QRect frameGeometry() const; + const QRect &geometry() const; + QRect normalGeometry() const; + int x() const; + int y() const; + QPoint pos() const; + QSize frameSize() const; + QSize size() const; + inline int width() const; + inline int height() const; + inline QRect rect() const; + QRect childrenRect() const; + QRegion childrenRegion() const; + QSize minimumSize() const; + QSize maximumSize() const; + int minimumWidth() const; + int minimumHeight() const; + int maximumWidth() const; + int maximumHeight() const; + void setMinimumSize(const QSize &); + void setMinimumSize(int minw, int minh); + void setMaximumSize(const QSize &); + void setMaximumSize(int maxw, int maxh); + void setMinimumWidth(int minw); + void setMinimumHeight(int minh); + void setMaximumWidth(int maxw); + void setMaximumHeight(int maxh); + QSize sizeIncrement() const; + void setSizeIncrement(const QSize &); + void setSizeIncrement(int w, int h); + QSize baseSize() const; + void setBaseSize(const QSize &); + void setBaseSize(int basew, int baseh); + void setFixedSize(const QSize &); + void setFixedSize(int w, int h); + void setFixedWidth(int w); + void setFixedHeight(int h); + QPoint mapToGlobal(const QPoint &) const; + QPoint mapFromGlobal(const QPoint &) const; + QPoint mapToParent(const QPoint &) const; + QPoint mapFromParent(const QPoint &) const; + QPoint mapTo(QWidget *, const QPoint &) const; + QPoint mapFrom(QWidget *, const QPoint &) const; + QWidget *window() const; + QWidget *nativeParentWidget() const; + inline QWidget *topLevelWidget() const { return window(); } + const QPalette &palette() const; + void setPalette(const QPalette &); + void setBackgroundRole(QPalette::ColorRole); + QPalette::ColorRole backgroundRole() const; + void setForegroundRole(QPalette::ColorRole); + QPalette::ColorRole foregroundRole() const; + const QFont &font() const; + void setFont(const QFont &); + QFontMetrics fontMetrics() const; + QFontInfo fontInfo() const; + QCursor cursor() const; + void setCursor(const QCursor &); + void unsetCursor(); + void setMouseTracking(bool enable); + bool hasMouseTracking() const; + bool underMouse() const; + void setMask(const QBitmap &); + void setMask(const QRegion &); + QRegion mask() const; + void clearMask(); + void render(QPaintDevice *target, const QPoint &targetOffset = QPoint(), + const QRegion &sourceRegion = QRegion(), + RenderFlags renderFlags = RenderFlags(DrawWindowBackground | DrawChildren)); + void render(QPainter *painter, const QPoint &targetOffset = QPoint(), + const QRegion &sourceRegion = QRegion(), + RenderFlags renderFlags = RenderFlags(DrawWindowBackground | DrawChildren)); + QGraphicsEffect *graphicsEffect() const; + void setGraphicsEffect(QGraphicsEffect *effect); + void grabGesture(Qt::GestureType type, Qt::GestureFlags flags = Qt::GestureFlags()); + void ungrabGesture(Qt::GestureType type); +public : + void setWindowTitle(const QString &); + void setStyleSheet(const QString& styleSheet); +public: + QString styleSheet() const; + QString windowTitle() const; + void setWindowIcon(const QIcon &icon); + QIcon windowIcon() const; + void setWindowIconText(const QString &); + QString windowIconText() const; + void setWindowRole(const QString &); + QString windowRole() const; + void setWindowFilePath(const QString &filePath); + QString windowFilePath() const; + void setWindowOpacity(qreal level); + qreal windowOpacity() const; + bool isWindowModified() const; + void setToolTip(const QString &); + QString toolTip() const; + void setStatusTip(const QString &); + QString statusTip() const; + void setWhatsThis(const QString &); + QString whatsThis() const; + void setLayoutDirection(Qt::LayoutDirection direction); + Qt::LayoutDirection layoutDirection() const; + void unsetLayoutDirection(); + void setLocale(const QLocale &locale); + QLocale locale() const; + void unsetLocale(); + inline bool isRightToLeft() const { return layoutDirection() == Qt::RightToLeft; } + inline bool isLeftToRight() const { return layoutDirection() == Qt::LeftToRight; } +public : + inline void setFocus() { setFocus(Qt::OtherFocusReason); } +public: + bool isActiveWindow() const; + void activateWindow(); + void clearFocus(); + void setFocus(Qt::FocusReason reason); + Qt::FocusPolicy focusPolicy() const; + void setFocusPolicy(Qt::FocusPolicy policy); + bool hasFocus() const; + static void setTabOrder(QWidget *, QWidget *); + void setFocusProxy(QWidget *); + QWidget *focusProxy() const; + Qt::ContextMenuPolicy contextMenuPolicy() const; + void setContextMenuPolicy(Qt::ContextMenuPolicy policy); + void grabMouse(); + void grabMouse(const QCursor &); + void releaseMouse(); + void grabKeyboard(); + void releaseKeyboard(); + int grabShortcut(const QKeySequence &key, Qt::ShortcutContext context = Qt::WindowShortcut); + void releaseShortcut(int id); + void setShortcutEnabled(int id, bool enable = true); + void setShortcutAutoRepeat(int id, bool enable = true); + static QWidget *mouseGrabber(); + static QWidget *keyboardGrabber(); + inline bool updatesEnabled() const; + void setUpdatesEnabled(bool enable); + QGraphicsProxyWidget *graphicsProxyWidget() const; +public : + void update(); + void repaint(); +public: + inline void update(int x, int y, int w, int h); + void update(const QRect&); + void update(const QRegion&); + void repaint(int x, int y, int w, int h); + void repaint(const QRect &); + void repaint(const QRegion &); +public : + virtual void setVisible(bool visible); + inline void setHidden(bool hidden) { setVisible(!hidden); } + inline void show() { setVisible(true); } + inline void hide() { setVisible(false); } + inline void setShown(bool shown) { setVisible(shown); } + void showMinimized(); + void showMaximized(); + void showFullScreen(); + void showNormal(); + bool close(); + void raise(); + void lower(); +public: + void stackUnder(QWidget*); + void move(int x, int y); + void move(const QPoint &); + void resize(int w, int h); + void resize(const QSize &); + inline void setGeometry(int x, int y, int w, int h); + void setGeometry(const QRect &); + QByteArray saveGeometry() const; + bool restoreGeometry(const QByteArray &geometry); + void adjustSize(); + bool isVisible() const; + bool isVisibleTo(QWidget*) const; + inline bool isHidden() const; + bool isMinimized() const; + bool isMaximized() const; + bool isFullScreen() const; + Qt::WindowStates windowState() const; + void setWindowState(Qt::WindowStates state); + void overrideWindowState(Qt::WindowStates state); + virtual QSize sizeHint() const; + virtual QSize minimumSizeHint() const; + QSizePolicy sizePolicy() const; + void setSizePolicy(QSizePolicy); + inline void setSizePolicy(QSizePolicy::Policy horizontal, QSizePolicy::Policy vertical); + virtual int heightForWidth(int) const; + QRegion visibleRegion() const; + void setContentsMargins(int left, int top, int right, int bottom); + void setContentsMargins(const QMargins &margins); + void getContentsMargins(int *left, int *top, int *right, int *bottom) const; + QMargins contentsMargins() const; + QRect contentsRect() const; +public: + QLayout *layout() const; + void setLayout(QLayout *); + void updateGeometry(); + void setParent(QWidget *parent); + void setParent(QWidget *parent, Qt::WindowFlags f); + void scroll(int dx, int dy); + void scroll(int dx, int dy, const QRect&); + QWidget *focusWidget() const; + QWidget *nextInFocusChain() const; + QWidget *previousInFocusChain() const; + bool acceptDrops() const; + void setAcceptDrops(bool on); + void addAction(QAction *action); + void addActions(QList actions); + void insertAction(QAction *before, QAction *action); + void insertActions(QAction *before, QList actions); + void removeAction(QAction *action); + QList actions() const; + QWidget *parentWidget() const; + void setWindowFlags(Qt::WindowFlags type); + inline Qt::WindowFlags windowFlags() const; + void overrideWindowFlags(Qt::WindowFlags type); + inline Qt::WindowType windowType() const; + static QWidget *find(WId); + inline QWidget *childAt(int x, int y) const; + QWidget *childAt(const QPoint &p) const; + const QX11Info &x11Info() const; + Qt::HANDLE x11PictureHandle() const; + Qt::HANDLE handle() const; + void setAttribute(Qt::WidgetAttribute, bool on = true); + inline bool testAttribute(Qt::WidgetAttribute) const; + QPaintEngine *paintEngine() const; + void ensurePolished() const; + QInputContext *inputContext(); + void setInputContext(QInputContext *); + bool isAncestorOf(const QWidget *child) const; + bool autoFillBackground() const; + void setAutoFillBackground(bool enabled); + void setWindowSurface(QWindowSurface *surface); + QWindowSurface *windowSurface() const; +public: + void customContextMenuRequested(const QPoint &pos); +public: + bool event(QEvent *); + virtual void mousePressEvent(QMouseEvent *); + virtual void mouseReleaseEvent(QMouseEvent *); + virtual void mouseDoubleClickEvent(QMouseEvent *); + virtual void mouseMoveEvent(QMouseEvent *); + virtual void wheelEvent(QWheelEvent *); + virtual void keyPressEvent(QKeyEvent *); + virtual void keyReleaseEvent(QKeyEvent *); + virtual void focusInEvent(QFocusEvent *); + virtual void focusOutEvent(QFocusEvent *); + virtual void enterEvent(QEvent *); + virtual void leaveEvent(QEvent *); + virtual void paintEvent(QPaintEvent *); + virtual void moveEvent(QMoveEvent *); + virtual void resizeEvent(QResizeEvent *); + virtual void closeEvent(QCloseEvent *); + virtual void contextMenuEvent(QContextMenuEvent *); + virtual void tabletEvent(QTabletEvent *); + virtual void actionEvent(QActionEvent *); + virtual void dragEnterEvent(QDragEnterEvent *); + virtual void dragMoveEvent(QDragMoveEvent *); + virtual void dragLeaveEvent(QDragLeaveEvent *); + virtual void dropEvent(QDropEvent *); + virtual void showEvent(QShowEvent *); + virtual void hideEvent(QHideEvent *); + virtual bool x11Event(XEvent *); + virtual void changeEvent(QEvent *); + int metric(PaintDeviceMetric) const; + virtual void inputMethodEvent(QInputMethodEvent *); +public: + virtual QVariant inputMethodQuery(Qt::InputMethodQuery) const; + Qt::InputMethodHints inputMethodHints() const; + void setInputMethodHints(Qt::InputMethodHints hints); +public: + void resetInputContext(); +public : + void updateMicroFocus(); +public: + void create(WId = 0, bool initializeWindow = true, + bool destroyOldWindow = true); + void destroy(bool destroyWindow = true, + bool destroySubWindows = true); + virtual bool focusNextPrevChild(bool next); + inline bool focusNextChild() { return focusNextPrevChild(true); } + inline bool focusPreviousChild() { return focusNextPrevChild(false); } +public: + QWidget(QWidgetPrivate &d, QWidget* parent, Qt::WindowFlags f); +private: + bool testAttribute_helper(Qt::WidgetAttribute) const; + QLayout *takeLayout(); + friend class QBackingStoreDevice; + friend class QWidgetBackingStore; + friend class QApplication; + friend class QApplicationPrivate; + friend class QBaseApplication; + friend class QPainter; + friend class QPainterPrivate; + friend class QPixmap; + friend class QFontMetrics; + friend class QFontInfo; + friend class QETWidget; + friend class QLayout; + friend class QWidgetItem; + friend class QWidgetItemV2; + friend class QGLContext; + friend class QGLWidget; + friend class QGLWindowSurface; + friend class QX11PaintEngine; + friend class QWin32PaintEngine; + friend class QShortcutPrivate; + friend class QShortcutMap; + friend class QWindowSurface; + friend class QGraphicsProxyWidget; + friend class QGraphicsProxyWidgetPrivate; + friend class QStyleSheetStyle; + friend struct QWidgetExceptionCleaner; + friend class QGestureManager; + friend class QWinNativePanGestureRecognizer; + friend class QWidgetEffectSourcePrivate; + friend void qt_net_update_user_time(QWidget *tlw, unsigned long timestamp); + friend void qt_net_remove_user_time(QWidget *tlw); + friend QWidgetData *qt_qwidget_data(QWidget *widget); + friend QWidgetPrivate *qt_widget_private(QWidget *widget); +private: + QWidget(const QWidget &); QWidget &operator=(const QWidget &); + + QWidgetData *data; +public: + virtual void styleChange(QStyle&); + virtual void enabledChange(bool); + virtual void paletteChange(const QPalette &); + virtual void fontChange(const QFont &); + virtual void windowActivationChange(bool); + virtual void languageChange(); +}; +inline QFlags operator|(QWidget::RenderFlags::enum_type f1, QWidget::RenderFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(QWidget::RenderFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QWidget::RenderFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +template <> inline QWidget *qobject_cast(QObject *o) +{ + if (!o || !o->isWidgetType()) return 0; + return static_cast(o); +} +template <> inline const QWidget *qobject_cast(const QObject *o) +{ + if (!o || !o->isWidgetType()) return 0; + return static_cast(o); +} +inline QWidget *QWidget::childAt(int ax, int ay) const +{ return childAt(QPoint(ax, ay)); } +inline Qt::WindowType QWidget::windowType() const +{ return static_cast(int(data->window_flags & Qt::WindowType_Mask)); } +inline Qt::WindowFlags QWidget::windowFlags() const +{ return data->window_flags; } +inline bool QWidget::isTopLevel() const +{ return (windowType() & Qt::Window); } +inline bool QWidget::isWindow() const +{ return (windowType() & Qt::Window); } +inline bool QWidget::isEnabled() const +{ return !testAttribute(Qt::WA_Disabled); } +inline bool QWidget::isModal() const +{ return data->window_modality != Qt::NonModal; } +inline bool QWidget::isEnabledToTLW() const +{ return isEnabled(); } +inline int QWidget::minimumWidth() const +{ return minimumSize().width(); } +inline int QWidget::minimumHeight() const +{ return minimumSize().height(); } +inline int QWidget::maximumWidth() const +{ return maximumSize().width(); } +inline int QWidget::maximumHeight() const +{ return maximumSize().height(); } +inline void QWidget::setMinimumSize(const QSize &s) +{ setMinimumSize(s.width(),s.height()); } +inline void QWidget::setMaximumSize(const QSize &s) +{ setMaximumSize(s.width(),s.height()); } +inline void QWidget::setSizeIncrement(const QSize &s) +{ setSizeIncrement(s.width(),s.height()); } +inline void QWidget::setBaseSize(const QSize &s) +{ setBaseSize(s.width(),s.height()); } +inline const QFont &QWidget::font() const +{ return data->fnt; } +inline QFontMetrics QWidget::fontMetrics() const +{ return QFontMetrics(data->fnt); } +inline QFontInfo QWidget::fontInfo() const +{ return QFontInfo(data->fnt); } +inline void QWidget::setMouseTracking(bool enable) +{ setAttribute(Qt::WA_MouseTracking, enable); } +inline bool QWidget::hasMouseTracking() const +{ return testAttribute(Qt::WA_MouseTracking); } +inline bool QWidget::underMouse() const +{ return testAttribute(Qt::WA_UnderMouse); } +inline bool QWidget::updatesEnabled() const +{ return !testAttribute(Qt::WA_UpdatesDisabled); } +inline void QWidget::update(int ax, int ay, int aw, int ah) +{ update(QRect(ax, ay, aw, ah)); } +inline bool QWidget::isVisible() const +{ return testAttribute(Qt::WA_WState_Visible); } +inline bool QWidget::isHidden() const +{ return testAttribute(Qt::WA_WState_Hidden); } +inline void QWidget::move(int ax, int ay) +{ move(QPoint(ax, ay)); } +inline void QWidget::resize(int w, int h) +{ resize(QSize(w, h)); } +inline void QWidget::setGeometry(int ax, int ay, int aw, int ah) +{ setGeometry(QRect(ax, ay, aw, ah)); } +inline QRect QWidget::rect() const +{ return QRect(0,0,data->crect.width(),data->crect.height()); } +inline const QRect &QWidget::geometry() const +{ return data->crect; } +inline QSize QWidget::size() const +{ return data->crect.size(); } +inline int QWidget::width() const +{ return data->crect.width(); } +inline int QWidget::height() const +{ return data->crect.height(); } +inline QWidget *QWidget::parentWidget() const +{ return static_cast(QObject::parent()); } +inline void QWidget::setSizePolicy(QSizePolicy::Policy hor, QSizePolicy::Policy ver) +{ setSizePolicy(QSizePolicy(hor, ver)); } +inline bool QWidget::testAttribute(Qt::WidgetAttribute attribute) const +{ + if (attribute < int(8*sizeof(uint))) + return data->widget_attributes & (1< inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: + + + + + + + + + +public: + enum NavigationType { + NavigationTypeLinkClicked, + NavigationTypeFormSubmitted, + NavigationTypeBackOrForward, + NavigationTypeReload, + NavigationTypeFormResubmitted, + NavigationTypeOther + }; + enum WebAction { + NoWebAction = - 1, + OpenLink, + OpenLinkInNewWindow, + OpenFrameInNewWindow, + DownloadLinkToDisk, + CopyLinkToClipboard, + OpenImageInNewWindow, + DownloadImageToDisk, + CopyImageToClipboard, + Back, + Forward, + Stop, + Reload, + Cut, + Copy, + Paste, + Undo, + Redo, + MoveToNextChar, + MoveToPreviousChar, + MoveToNextWord, + MoveToPreviousWord, + MoveToNextLine, + MoveToPreviousLine, + MoveToStartOfLine, + MoveToEndOfLine, + MoveToStartOfBlock, + MoveToEndOfBlock, + MoveToStartOfDocument, + MoveToEndOfDocument, + SelectNextChar, + SelectPreviousChar, + SelectNextWord, + SelectPreviousWord, + SelectNextLine, + SelectPreviousLine, + SelectStartOfLine, + SelectEndOfLine, + SelectStartOfBlock, + SelectEndOfBlock, + SelectStartOfDocument, + SelectEndOfDocument, + DeleteStartOfWord, + DeleteEndOfWord, + SetTextDirectionDefault, + SetTextDirectionLeftToRight, + SetTextDirectionRightToLeft, + ToggleBold, + ToggleItalic, + ToggleUnderline, + InspectElement, + InsertParagraphSeparator, + InsertLineSeparator, + SelectAll, + ReloadAndBypassCache, + PasteAndMatchStyle, + RemoveFormat, + ToggleStrikethrough, + ToggleSubscript, + ToggleSuperscript, + InsertUnorderedList, + InsertOrderedList, + Indent, + Outdent, + AlignCenter, + AlignJustified, + AlignLeft, + AlignRight, + WebActionCount + }; + enum FindFlag { + FindBackward = 1, + FindCaseSensitively = 2, + FindWrapsAroundDocument = 4, + HighlightAllOccurrences = 8 + }; + typedef QFlags FindFlags; + enum LinkDelegationPolicy { + DontDelegateLinks, + DelegateExternalLinks, + DelegateAllLinks + }; + enum WebWindowType { + WebBrowserWindow, + WebModalDialog + }; + explicit QWebPage(QObject *parent = 0); + ~QWebPage(); + QWebFrame *mainFrame() const; + QWebFrame *currentFrame() const; + QWebFrame* frameAt(const QPoint& pos) const; + QWebHistory *history() const; + QWebSettings *settings() const; + void setView(QWidget *view); + QWidget *view() const; + bool isModified() const; + QUndoStack *undoStack() const; + void setNetworkAccessManager(QNetworkAccessManager *manager); + QNetworkAccessManager *networkAccessManager() const; + void setPluginFactory(QWebPluginFactory *factory); + QWebPluginFactory *pluginFactory() const; + quint64 totalBytes() const; + quint64 bytesReceived() const; + QString selectedText() const; + QAction *action(WebAction action) const; + virtual void triggerAction(WebAction action, bool checked = false); + QSize viewportSize() const; + void setViewportSize(const QSize &size) const; + QSize preferredContentsSize() const; + void setPreferredContentsSize(const QSize &size) const; + virtual bool event(QEvent*); + bool focusNextPrevChild(bool next); + QVariant inputMethodQuery(Qt::InputMethodQuery property) const; + bool findText(const QString &subString, FindFlags options = 0); + void setForwardUnsupportedContent(bool forward); + bool forwardUnsupportedContent() const; + void setLinkDelegationPolicy(LinkDelegationPolicy policy); + LinkDelegationPolicy linkDelegationPolicy() const; + void setPalette(const QPalette &palette); + QPalette palette() const; + void setContentEditable(bool editable); + bool isContentEditable() const; + bool swallowContextMenuEvent(QContextMenuEvent *event); + void updatePositionDependentActions(const QPoint &pos); + QMenu *createStandardContextMenu(); + enum Extension { + ChooseMultipleFilesExtension, + ErrorPageExtension + }; + class ExtensionOption + {}; + class ExtensionReturn + {}; + class ChooseMultipleFilesExtensionOption : public ExtensionOption { + public: + QWebFrame *parentFrame; + QStringList suggestedFileNames; + }; + class ChooseMultipleFilesExtensionReturn : public ExtensionReturn { + public: + QStringList fileNames; + }; + enum ErrorDomain { QtNetwork, Http, WebKit }; + class ErrorPageExtensionOption : public ExtensionOption { + public: + QUrl url; + QWebFrame* frame; + ErrorDomain domain; + int error; + QString errorString; + }; + class ErrorPageExtensionReturn : public ExtensionReturn { + public: + ErrorPageExtensionReturn() : contentType(QLatin1String("text/html")), encoding(QLatin1String("utf-8")) {}; + QString contentType; + QString encoding; + QUrl baseUrl; + QByteArray content; + }; + virtual bool extension(Extension extension, const ExtensionOption *option = 0, ExtensionReturn *output = 0); + virtual bool supportsExtension(Extension extension) const; + inline QWebPagePrivate* handle() const { return d; } +public : + bool shouldInterruptJavaScript(); +public: + void loadStarted(); + void loadProgress(int progress); + void loadFinished(bool ok); + void linkHovered(const QString &link, const QString &title, const QString &textContent); + void statusBarMessage(const QString& text); + void selectionChanged(); + void frameCreated(QWebFrame *frame); + void geometryChangeRequested(const QRect& geom); + void repaintRequested(const QRect& dirtyRect); + void scrollRequested(int dx, int dy, const QRect& scrollViewRect); + void windowCloseRequested(); + void printRequested(QWebFrame *frame); + void linkClicked(const QUrl &url); + void toolBarVisibilityChangeRequested(bool visible); + void statusBarVisibilityChangeRequested(bool visible); + void menuBarVisibilityChangeRequested(bool visible); + void unsupportedContent(QNetworkReply *reply); + void downloadRequested(const QNetworkRequest &request); + void microFocusChanged(); + void contentsChanged(); + void databaseQuotaExceeded(QWebFrame* frame, QString databaseName); + void saveFrameStateRequested(QWebFrame* frame, QWebHistoryItem* item); + void restoreFrameStateRequested(QWebFrame* frame); +public: + virtual QWebPage *createWindow(WebWindowType type); + virtual QObject *createPlugin(const QString &classid, const QUrl &url, const QStringList ¶mNames, const QStringList ¶mValues); + virtual bool acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type); + virtual QString chooseFile(QWebFrame *originatingFrame, const QString& oldFile); + virtual void javaScriptAlert(QWebFrame *originatingFrame, const QString& msg); + virtual bool javaScriptConfirm(QWebFrame *originatingFrame, const QString& msg); + virtual bool javaScriptPrompt(QWebFrame *originatingFrame, const QString& msg, const QString& defaultValue, QString* result); + virtual void javaScriptConsoleMessage(const QString& message, int lineNumber, const QString& sourceID); + virtual QString userAgentForUrl(const QUrl& url) const; +private: + + + + QWebPagePrivate *d; + friend class QWebFrame; + friend class QWebPagePrivate; + friend class QWebView; + friend class QGraphicsWebView; + friend class QWebInspector; + friend class WebCore::ChromeClientQt; + friend class WebCore::EditorClientQt; + friend class WebCore::FrameLoaderClientQt; + friend class WebCore::InspectorClientQt; + friend class WebCore::ResourceHandle; + friend class WebCore::QNetworkReplyHandler; +}; +inline QFlags operator|(QWebPage::FindFlags::enum_type f1, QWebPage::FindFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(QWebPage::FindFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QWebPage::FindFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +extern "C" { +typedef struct +{ + __off_t __pos; + __mbstate_t __state; +} _G_fpos_t; +typedef struct +{ + __off64_t __pos; + __mbstate_t __state; +} _G_fpos64_t; +typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); +typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); +struct _IO_jump_t; struct _IO_FILE; +typedef void _IO_lock_t; +struct _IO_marker { + struct _IO_marker *_next; + struct _IO_FILE *_sbuf; + int _pos; +}; +enum __codecvt_result +{ + __codecvt_ok, + __codecvt_partial, + __codecvt_error, + __codecvt_noconv +}; +struct _IO_FILE { + int _flags; + char* _IO_read_ptr; + char* _IO_read_end; + char* _IO_read_base; + char* _IO_write_base; + char* _IO_write_ptr; + char* _IO_write_end; + char* _IO_buf_base; + char* _IO_buf_end; + char *_IO_save_base; + char *_IO_backup_base; + char *_IO_save_end; + struct _IO_marker *_markers; + struct _IO_FILE *_chain; + int _fileno; + int _flags2; + __off_t _old_offset; + unsigned short _cur_column; + signed char _vtable_offset; + char _shortbuf[1]; + _IO_lock_t *_lock; + __off64_t _offset; + void *__pad1; + void *__pad2; + void *__pad3; + void *__pad4; + size_t __pad5; + int _mode; + char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; +}; +struct _IO_FILE_plus; +extern struct _IO_FILE_plus _IO_2_1_stdin_; +extern struct _IO_FILE_plus _IO_2_1_stdout_; +extern struct _IO_FILE_plus _IO_2_1_stderr_; +typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); +typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, + size_t __n); +typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); +typedef int __io_close_fn (void *__cookie); +typedef __io_read_fn cookie_read_function_t; +typedef __io_write_fn cookie_write_function_t; +typedef __io_seek_fn cookie_seek_function_t; +typedef __io_close_fn cookie_close_function_t; +typedef struct +{ + __io_read_fn *read; + __io_write_fn *write; + __io_seek_fn *seek; + __io_close_fn *close; +} _IO_cookie_io_functions_t; +typedef _IO_cookie_io_functions_t cookie_io_functions_t; +struct _IO_cookie_file; +extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, + void *__cookie, _IO_cookie_io_functions_t __fns); +extern "C" { +extern int __underflow (_IO_FILE *); +extern int __uflow (_IO_FILE *); +extern int __overflow (_IO_FILE *, int); +extern int _IO_getc (_IO_FILE *__fp); +extern int _IO_putc (int __c, _IO_FILE *__fp); +extern int _IO_feof (_IO_FILE *__fp) throw (); +extern int _IO_ferror (_IO_FILE *__fp) throw (); +extern int _IO_peekc_locked (_IO_FILE *__fp); +extern void _IO_flockfile (_IO_FILE *) throw (); +extern void _IO_funlockfile (_IO_FILE *) throw (); +extern int _IO_ftrylockfile (_IO_FILE *) throw (); +extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, + __gnuc_va_list, int *__restrict); +extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, + __gnuc_va_list); +extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); +extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); +extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); +extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); +extern void _IO_free_backup_area (_IO_FILE *) throw (); +} +typedef _G_fpos_t fpos_t; +typedef _G_fpos64_t fpos64_t; +extern struct _IO_FILE *stdin; +extern struct _IO_FILE *stdout; +extern struct _IO_FILE *stderr; +extern int remove (__const char *__filename) throw (); +extern int rename (__const char *__old, __const char *__new) throw (); +extern int renameat (int __oldfd, __const char *__old, int __newfd, + __const char *__new) throw (); +extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__)); +extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__)); +extern char *tmpnam (char *__s) throw () __attribute__ ((__warn_unused_result__)); +extern char *tmpnam_r (char *__s) throw () __attribute__ ((__warn_unused_result__)); +extern char *tempnam (__const char *__dir, __const char *__pfx) + throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); +extern int fclose (FILE *__stream); +extern int fflush (FILE *__stream); +extern int fflush_unlocked (FILE *__stream); +extern int fcloseall (void); +extern FILE *fopen (__const char *__restrict __filename, + __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); +extern FILE *freopen (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern FILE *fopen64 (__const char *__restrict __filename, + __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); +extern FILE *freopen64 (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern FILE *fdopen (int __fd, __const char *__modes) throw () __attribute__ ((__warn_unused_result__)); +extern FILE *fopencookie (void *__restrict __magic_cookie, + __const char *__restrict __modes, + _IO_cookie_io_functions_t __io_funcs) throw () __attribute__ ((__warn_unused_result__)); +extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) + throw () __attribute__ ((__warn_unused_result__)); +extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () __attribute__ ((__warn_unused_result__)); +extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); +extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, + int __modes, size_t __n) throw (); +extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, + size_t __size) throw (); +extern void setlinebuf (FILE *__stream) throw (); +extern int fprintf (FILE *__restrict __stream, + __const char *__restrict __format, ...); +extern int printf (__const char *__restrict __format, ...); +extern int sprintf (char *__restrict __s, + __const char *__restrict __format, ...) throw (); +extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg); +extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); +extern int vsprintf (char *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) throw (); +extern int snprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, ...) + throw () __attribute__ ((__format__ (__printf__, 3, 4))); +extern int vsnprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__printf__, 3, 0))); +extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, + __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__)); +extern int __asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + throw () __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +extern int asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + throw () __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +extern int vdprintf (int __fd, __const char *__restrict __fmt, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 2, 0))); +extern int dprintf (int __fd, __const char *__restrict __fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); +extern int fscanf (FILE *__restrict __stream, + __const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); +extern int scanf (__const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); +extern int sscanf (__const char *__restrict __s, + __const char *__restrict __format, ...) throw (); +extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); +extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); +extern int vsscanf (__const char *__restrict __s, + __const char *__restrict __format, __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__scanf__, 2, 0))); +extern int fgetc (FILE *__stream); +extern int getc (FILE *__stream); +extern int getchar (void); +extern int getc_unlocked (FILE *__stream); +extern int getchar_unlocked (void); +extern int fgetc_unlocked (FILE *__stream); +extern int fputc (int __c, FILE *__stream); +extern int putc (int __c, FILE *__stream); +extern int putchar (int __c); +extern int fputc_unlocked (int __c, FILE *__stream); +extern int putc_unlocked (int __c, FILE *__stream); +extern int putchar_unlocked (int __c); +extern int getw (FILE *__stream); +extern int putw (int __w, FILE *__stream); +extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) + __attribute__ ((__warn_unused_result__)); +extern char *gets (char *__s) __attribute__ ((__warn_unused_result__)); +extern char *fgets_unlocked (char *__restrict __s, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern __ssize_t __getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern __ssize_t getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern __ssize_t getline (char **__restrict __lineptr, + size_t *__restrict __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); +extern int puts (__const char *__s); +extern int ungetc (int __c, FILE *__stream); +extern size_t fread (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t fwrite (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __s) __attribute__ ((__warn_unused_result__)); +extern int fputs_unlocked (__const char *__restrict __s, + FILE *__restrict __stream); +extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern int fseek (FILE *__stream, long int __off, int __whence); +extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)); +extern void rewind (FILE *__stream); +extern int fseeko (FILE *__stream, __off_t __off, int __whence); +extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__)); +extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); +extern int fsetpos (FILE *__stream, __const fpos_t *__pos); +extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); +extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__)); +extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); +extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); +extern void clearerr (FILE *__stream) throw (); +extern int feof (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); +extern int ferror (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); +extern void clearerr_unlocked (FILE *__stream) throw (); +extern int feof_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); +extern int ferror_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); +extern void perror (__const char *__s); +extern int sys_nerr; +extern __const char *__const sys_errlist[]; +extern int _sys_nerr; +extern __const char *__const _sys_errlist[]; +extern int fileno (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); +extern int fileno_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); +extern FILE *popen (__const char *__command, __const char *__modes) __attribute__ ((__warn_unused_result__)); +extern int pclose (FILE *__stream); +extern char *ctermid (char *__s) throw (); +extern char *cuserid (char *__s); +struct obstack; +extern int obstack_printf (struct obstack *__restrict __obstack, + __const char *__restrict __format, ...) + throw () __attribute__ ((__format__ (__printf__, 2, 3))); +extern int obstack_vprintf (struct obstack *__restrict __obstack, + __const char *__restrict __format, + __gnuc_va_list __args) + throw () __attribute__ ((__format__ (__printf__, 2, 0))); +extern void flockfile (FILE *__stream) throw (); +extern int ftrylockfile (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); +extern void funlockfile (FILE *__stream) throw (); +extern __inline __attribute__ ((__gnu_inline__)) int +getchar (void) +{ + return _IO_getc (stdin); +} +extern __inline __attribute__ ((__gnu_inline__)) int +fgetc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} +extern __inline __attribute__ ((__gnu_inline__)) int +getc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} +extern __inline __attribute__ ((__gnu_inline__)) int +getchar_unlocked (void) +{ + return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); +} +extern __inline __attribute__ ((__gnu_inline__)) int +putchar (int __c) +{ + return _IO_putc (__c, stdout); +} +extern __inline __attribute__ ((__gnu_inline__)) int +fputc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} +extern __inline __attribute__ ((__gnu_inline__)) int +putc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} +extern __inline __attribute__ ((__gnu_inline__)) int +putchar_unlocked (int __c) +{ + return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); +} +extern __inline __attribute__ ((__gnu_inline__)) __ssize_t +getline (char **__lineptr, size_t *__n, FILE *__stream) +{ + return __getdelim (__lineptr, __n, '\n', __stream); +} +extern __inline __attribute__ ((__gnu_inline__)) int +feof_unlocked (FILE *__stream) throw () +{ + return (((__stream)->_flags & 0x10) != 0); +} +extern __inline __attribute__ ((__gnu_inline__)) int +ferror_unlocked (FILE *__stream) throw () +{ + return (((__stream)->_flags & 0x20) != 0); +} +extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, + __const char *__restrict __format, ...) throw (); +extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, + __const char *__restrict __format, + __gnuc_va_list __ap) throw (); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +sprintf (char *__restrict __s, __const char *__restrict __fmt, ...) throw () +{ + return __builtin___sprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vsprintf (char *__restrict __s, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () +{ + return __builtin___vsprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} +extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, __const char *__restrict __format, + ...) throw (); +extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, __const char *__restrict __format, + __gnuc_va_list __ap) throw (); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +snprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, ...) throw () +{ + return __builtin___snprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vsnprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () +{ + return __builtin___vsnprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} +extern int __fprintf_chk (FILE *__restrict __stream, int __flag, + __const char *__restrict __format, ...); +extern int __printf_chk (int __flag, __const char *__restrict __format, ...); +extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, + __const char *__restrict __format, __gnuc_va_list __ap); +extern int __vprintf_chk (int __flag, __const char *__restrict __format, + __gnuc_va_list __ap); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +fprintf (FILE *__restrict __stream, __const char *__restrict __fmt, ...) +{ + return __fprintf_chk (__stream, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +printf (__const char *__restrict __fmt, ...) +{ + return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vprintf (__const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vfprintf (FILE *__restrict __stream, + __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap); +} +extern int __asprintf_chk (char **__restrict __ptr, int __flag, + __const char *__restrict __fmt, ...) + throw () __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__)); +extern int __vasprintf_chk (char **__restrict __ptr, int __flag, + __const char *__restrict __fmt, __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__)); +extern int __dprintf_chk (int __fd, int __flag, __const char *__restrict __fmt, + ...) __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __vdprintf_chk (int __fd, int __flag, + __const char *__restrict __fmt, __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 3, 0))); +extern int __obstack_printf_chk (struct obstack *__restrict __obstack, + int __flag, __const char *__restrict __format, + ...) + throw () __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack, + int __flag, + __const char *__restrict __format, + __gnuc_va_list __args) + throw () __attribute__ ((__format__ (__printf__, 3, 0))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +dprintf (int __fd, __const char *__restrict __fmt, ...) +{ + return __dprintf_chk (__fd, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, ...) throw () +{ + return __obstack_printf_chk (__obstack, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vasprintf (char **__restrict __ptr, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () +{ + return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () +{ + return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt, + __ap); +} +extern char *__gets_chk (char *__str, size_t) __attribute__ ((__warn_unused_result__)); +extern char *__gets_warn (char *__str) __asm__ ("" "gets") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use fgets or getline instead, gets can't " "specify buffer size"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +gets (char *__str) +{ + if (__builtin_object_size (__str, 2 > 1) != (size_t) -1) + return __gets_chk (__str, __builtin_object_size (__str, 2 > 1)); + return __gets_warn (__str); +} +extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_alias (__s, __n, __stream); +} +extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + } + return __fread_alias (__ptr, __size, __n, __stream); +} +extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size, + int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked") + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_unlocked_alias (__s, __n, __stream); +} +extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + } + if (__builtin_constant_p (__size) + && __builtin_constant_p (__n) + && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) + && __size * __n <= 8) + { + size_t __cnt = __size * __n; + char *__cptr = (char *) __ptr; + if (__cnt == 0) + return 0; + for (; __cnt > 0; --__cnt) + { + int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++); + if (__c == (-1)) + break; + *__cptr++ = __c; + } + return (__cptr - (char *) __ptr) / __size; + } + return __fread_unlocked_alias (__ptr, __size, __n, __stream); +} +} +extern "C" { +extern int *__errno_location (void) throw () __attribute__ ((__const__)); +extern char *program_invocation_name, *program_invocation_short_name; +} +typedef int error_t; +typedef unsigned char uint8_t; +typedef unsigned short int uint16_t; +typedef unsigned int uint32_t; +typedef unsigned long int uint64_t; +typedef signed char int_least8_t; +typedef short int int_least16_t; +typedef int int_least32_t; +typedef long int int_least64_t; +typedef unsigned char uint_least8_t; +typedef unsigned short int uint_least16_t; +typedef unsigned int uint_least32_t; +typedef unsigned long int uint_least64_t; +typedef signed char int_fast8_t; +typedef long int int_fast16_t; +typedef long int int_fast32_t; +typedef long int int_fast64_t; +typedef unsigned char uint_fast8_t; +typedef unsigned long int uint_fast16_t; +typedef unsigned long int uint_fast32_t; +typedef unsigned long int uint_fast64_t; +typedef unsigned long int uintptr_t; +typedef long int intmax_t; +typedef unsigned long int uintmax_t; +typedef uintptr_t Py_uintptr_t; +typedef intptr_t Py_intptr_t; +typedef ssize_t Py_ssize_t; +extern "C" { +typedef float float_t; +typedef double double_t; +extern double acos (double __x) throw (); extern double __acos (double __x) throw (); +extern double asin (double __x) throw (); extern double __asin (double __x) throw (); +extern double atan (double __x) throw (); extern double __atan (double __x) throw (); +extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw (); +extern double cos (double __x) throw (); extern double __cos (double __x) throw (); +extern double sin (double __x) throw (); extern double __sin (double __x) throw (); +extern double tan (double __x) throw (); extern double __tan (double __x) throw (); +extern double cosh (double __x) throw (); extern double __cosh (double __x) throw (); +extern double sinh (double __x) throw (); extern double __sinh (double __x) throw (); +extern double tanh (double __x) throw (); extern double __tanh (double __x) throw (); +extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw () + ; +extern double acosh (double __x) throw (); extern double __acosh (double __x) throw (); +extern double asinh (double __x) throw (); extern double __asinh (double __x) throw (); +extern double atanh (double __x) throw (); extern double __atanh (double __x) throw (); +extern double exp (double __x) throw (); extern double __exp (double __x) throw (); +extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw (); +extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw (); +extern double log (double __x) throw (); extern double __log (double __x) throw (); +extern double log10 (double __x) throw (); extern double __log10 (double __x) throw (); +extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw (); +extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw (); +extern double pow10 (double __x) throw (); extern double __pow10 (double __x) throw (); +extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw (); +extern double log1p (double __x) throw (); extern double __log1p (double __x) throw (); +extern double logb (double __x) throw (); extern double __logb (double __x) throw (); +extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw (); +extern double log2 (double __x) throw (); extern double __log2 (double __x) throw (); +extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw (); +extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw (); +extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw (); +extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw (); +extern double ceil (double __x) throw () __attribute__ ((__const__)); extern double __ceil (double __x) throw () __attribute__ ((__const__)); +extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__)); +extern double floor (double __x) throw () __attribute__ ((__const__)); extern double __floor (double __x) throw () __attribute__ ((__const__)); +extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw (); +extern int __isinf (double __value) throw () __attribute__ ((__const__)); +extern int __finite (double __value) throw () __attribute__ ((__const__)); +extern int isinf (double __value) throw () __attribute__ ((__const__)); +extern int finite (double __value) throw () __attribute__ ((__const__)); +extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw (); +extern double significand (double __x) throw (); extern double __significand (double __x) throw (); +extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__)); +extern double nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern double __nan (__const char *__tagb) throw () __attribute__ ((__const__)); +extern int __isnan (double __value) throw () __attribute__ ((__const__)); +extern int isnan (double __value) throw () __attribute__ ((__const__)); +extern double j0 (double) throw (); extern double __j0 (double) throw (); +extern double j1 (double) throw (); extern double __j1 (double) throw (); +extern double jn (int, double) throw (); extern double __jn (int, double) throw (); +extern double y0 (double) throw (); extern double __y0 (double) throw (); +extern double y1 (double) throw (); extern double __y1 (double) throw (); +extern double yn (int, double) throw (); extern double __yn (int, double) throw (); +extern double erf (double) throw (); extern double __erf (double) throw (); +extern double erfc (double) throw (); extern double __erfc (double) throw (); +extern double lgamma (double) throw (); extern double __lgamma (double) throw (); +extern double tgamma (double) throw (); extern double __tgamma (double) throw (); +extern double gamma (double) throw (); extern double __gamma (double) throw (); +extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw (); +extern double rint (double __x) throw (); extern double __rint (double __x) throw (); +extern double nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) throw () __attribute__ ((__const__)); +extern double nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); +extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw (); +extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw (); +extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw (); +extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw (); +extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw (); +extern double round (double __x) throw () __attribute__ ((__const__)); extern double __round (double __x) throw () __attribute__ ((__const__)); +extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__)); +extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw (); +extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw (); +extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw (); +extern long int lround (double __x) throw (); extern long int __lround (double __x) throw (); +extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw (); +extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw (); +extern double fmax (double __x, double __y) throw (); extern double __fmax (double __x, double __y) throw (); +extern double fmin (double __x, double __y) throw (); extern double __fmin (double __x, double __y) throw (); +extern int __fpclassify (double __value) throw () + __attribute__ ((__const__)); +extern int __signbit (double __value) throw () + __attribute__ ((__const__)); +extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw (); +extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw (); +extern float acosf (float __x) throw (); extern float __acosf (float __x) throw (); +extern float asinf (float __x) throw (); extern float __asinf (float __x) throw (); +extern float atanf (float __x) throw (); extern float __atanf (float __x) throw (); +extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw (); +extern float cosf (float __x) throw (); extern float __cosf (float __x) throw (); +extern float sinf (float __x) throw (); extern float __sinf (float __x) throw (); +extern float tanf (float __x) throw (); extern float __tanf (float __x) throw (); +extern float coshf (float __x) throw (); extern float __coshf (float __x) throw (); +extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw (); +extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw (); +extern void + sincosf + (float __x, float *__sinx, float *__cosx) throw (); extern void + __sincosf + (float __x, float *__sinx, float *__cosx) throw () + ; +extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw (); +extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw (); +extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw (); +extern float expf (float __x) throw (); extern float __expf (float __x) throw (); +extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw (); +extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw (); +extern float logf (float __x) throw (); extern float __logf (float __x) throw (); +extern float log10f (float __x) throw (); extern float __log10f (float __x) throw (); +extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw (); +extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw (); +extern float pow10f (float __x) throw (); extern float __pow10f (float __x) throw (); +extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw (); +extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw (); +extern float logbf (float __x) throw (); extern float __logbf (float __x) throw (); +extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw (); +extern float log2f (float __x) throw (); extern float __log2f (float __x) throw (); +extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw (); +extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw (); +extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw (); +extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw (); +extern float ceilf (float __x) throw () __attribute__ ((__const__)); extern float __ceilf (float __x) throw () __attribute__ ((__const__)); +extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__)); +extern float floorf (float __x) throw () __attribute__ ((__const__)); extern float __floorf (float __x) throw () __attribute__ ((__const__)); +extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw (); +extern int __isinff (float __value) throw () __attribute__ ((__const__)); +extern int __finitef (float __value) throw () __attribute__ ((__const__)); +extern int isinff (float __value) throw () __attribute__ ((__const__)); +extern int finitef (float __value) throw () __attribute__ ((__const__)); +extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw (); +extern float significandf (float __x) throw (); extern float __significandf (float __x) throw (); +extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__)); +extern float nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) throw () __attribute__ ((__const__)); +extern int __isnanf (float __value) throw () __attribute__ ((__const__)); +extern int isnanf (float __value) throw () __attribute__ ((__const__)); +extern float j0f (float) throw (); extern float __j0f (float) throw (); +extern float j1f (float) throw (); extern float __j1f (float) throw (); +extern float jnf (int, float) throw (); extern float __jnf (int, float) throw (); +extern float y0f (float) throw (); extern float __y0f (float) throw (); +extern float y1f (float) throw (); extern float __y1f (float) throw (); +extern float ynf (int, float) throw (); extern float __ynf (int, float) throw (); +extern float erff (float) throw (); extern float __erff (float) throw (); +extern float erfcf (float) throw (); extern float __erfcf (float) throw (); +extern float lgammaf (float) throw (); extern float __lgammaf (float) throw (); +extern float tgammaf (float) throw (); extern float __tgammaf (float) throw (); +extern float gammaf (float) throw (); extern float __gammaf (float) throw (); +extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw (); +extern float rintf (float __x) throw (); extern float __rintf (float __x) throw (); +extern float nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); +extern float nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); +extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw (); +extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw (); +extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw (); +extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw (); +extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw (); +extern float roundf (float __x) throw () __attribute__ ((__const__)); extern float __roundf (float __x) throw () __attribute__ ((__const__)); +extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__)); +extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw (); +extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw (); +extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw (); +extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw (); +extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw (); +extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw (); +extern float fmaxf (float __x, float __y) throw (); extern float __fmaxf (float __x, float __y) throw (); +extern float fminf (float __x, float __y) throw (); extern float __fminf (float __x, float __y) throw (); +extern int __fpclassifyf (float __value) throw () + __attribute__ ((__const__)); +extern int __signbitf (float __value) throw () + __attribute__ ((__const__)); +extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw (); +extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw (); +extern long double acosl (long double __x) throw (); extern long double __acosl (long double __x) throw (); +extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw (); +extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw (); +extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw (); +extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw (); +extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw (); +extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw (); +extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw (); +extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw (); +extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw (); +extern void + sincosl + (long double __x, long double *__sinx, long double *__cosx) throw (); extern void + __sincosl + (long double __x, long double *__sinx, long double *__cosx) throw () + ; +extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw (); +extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw (); +extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw (); +extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw (); +extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw (); +extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw (); +extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw (); +extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw (); +extern long double modfl (long double __x, long double *__iptr) throw (); extern long double __modfl (long double __x, long double *__iptr) throw (); +extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw (); +extern long double pow10l (long double __x) throw (); extern long double __pow10l (long double __x) throw (); +extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw (); +extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw (); +extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw (); +extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw (); +extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw (); +extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw (); +extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw (); +extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw (); +extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw (); +extern long double ceill (long double __x) throw () __attribute__ ((__const__)); extern long double __ceill (long double __x) throw () __attribute__ ((__const__)); +extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__)); +extern long double floorl (long double __x) throw () __attribute__ ((__const__)); extern long double __floorl (long double __x) throw () __attribute__ ((__const__)); +extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw (); +extern int __isinfl (long double __value) throw () __attribute__ ((__const__)); +extern int __finitel (long double __value) throw () __attribute__ ((__const__)); +extern int isinfl (long double __value) throw () __attribute__ ((__const__)); +extern int finitel (long double __value) throw () __attribute__ ((__const__)); +extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw (); +extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw (); +extern long double copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); +extern long double nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) throw () __attribute__ ((__const__)); +extern int __isnanl (long double __value) throw () __attribute__ ((__const__)); +extern int isnanl (long double __value) throw () __attribute__ ((__const__)); +extern long double j0l (long double) throw (); extern long double __j0l (long double) throw (); +extern long double j1l (long double) throw (); extern long double __j1l (long double) throw (); +extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw (); +extern long double y0l (long double) throw (); extern long double __y0l (long double) throw (); +extern long double y1l (long double) throw (); extern long double __y1l (long double) throw (); +extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw (); +extern long double erfl (long double) throw (); extern long double __erfl (long double) throw (); +extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw (); +extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw (); +extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw (); +extern long double gammal (long double) throw (); extern long double __gammal (long double) throw (); +extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw (); +extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw (); +extern long double nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); +extern long double nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); +extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw (); +extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw (); +extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw (); +extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw (); +extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw (); +extern long double roundl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundl (long double __x) throw () __attribute__ ((__const__)); +extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__)); +extern long double remquol (long double __x, long double __y, int *__quo) throw (); extern long double __remquol (long double __x, long double __y, int *__quo) throw (); +extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw (); +extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw (); +extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw (); +extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw (); +extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw (); +extern long double fmaxl (long double __x, long double __y) throw (); extern long double __fmaxl (long double __x, long double __y) throw (); +extern long double fminl (long double __x, long double __y) throw (); extern long double __fminl (long double __x, long double __y) throw (); +extern int __fpclassifyl (long double __value) throw () + __attribute__ ((__const__)); +extern int __signbitl (long double __value) throw () + __attribute__ ((__const__)); +extern long double fmal (long double __x, long double __y, long double __z) throw (); extern long double __fmal (long double __x, long double __y, long double __z) throw (); +extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw (); +extern int signgam; +enum + { + FP_NAN, + FP_INFINITE, + FP_ZERO, + FP_SUBNORMAL, + FP_NORMAL + }; +typedef enum +{ + _IEEE_ = -1, + _SVID_, + _XOPEN_, + _POSIX_, + _ISOC_ +} _LIB_VERSION_TYPE; +extern _LIB_VERSION_TYPE _LIB_VERSION; +struct __exception + { + int type; + char *name; + double arg1; + double arg2; + double retval; + }; +extern int matherr (struct __exception *__exc) throw (); +extern __inline __attribute__ ((__gnu_inline__)) int +__signbitf (float __x) throw () +{ + int __m; + __asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x)); + return __m & 0x8; +} +extern __inline __attribute__ ((__gnu_inline__)) int +__signbit (double __x) throw () +{ + int __m; + __asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x)); + return __m & 0x80; +} +extern __inline __attribute__ ((__gnu_inline__)) int +__signbitl (long double __x) throw () +{ + __extension__ union { long double __l; int __i[3]; } __u = { __l: __x }; + return (__u.__i[2] & 0x8000) != 0; +} +} +extern "C" { +struct timezone + { + int tz_minuteswest; + int tz_dsttime; + }; +typedef struct timezone *__restrict __timezone_ptr_t; +extern int gettimeofday (struct timeval *__restrict __tv, + __timezone_ptr_t __tz) throw () __attribute__ ((__nonnull__ (1))); +extern int settimeofday (__const struct timeval *__tv, + __const struct timezone *__tz) + throw () __attribute__ ((__nonnull__ (1))); +extern int adjtime (__const struct timeval *__delta, + struct timeval *__olddelta) throw (); +enum __itimer_which + { + ITIMER_REAL = 0, + ITIMER_VIRTUAL = 1, + ITIMER_PROF = 2 + }; +struct itimerval + { + struct timeval it_interval; + struct timeval it_value; + }; +typedef int __itimer_which_t; +extern int getitimer (__itimer_which_t __which, + struct itimerval *__value) throw (); +extern int setitimer (__itimer_which_t __which, + __const struct itimerval *__restrict __new, + struct itimerval *__restrict __old) throw (); +extern int utimes (__const char *__file, __const struct timeval __tvp[2]) + throw () __attribute__ ((__nonnull__ (1))); +extern int lutimes (__const char *__file, __const struct timeval __tvp[2]) + throw () __attribute__ ((__nonnull__ (1))); +extern int futimes (int __fd, __const struct timeval __tvp[2]) throw (); +extern int futimesat (int __fd, __const char *__file, + __const struct timeval __tvp[2]) throw (); +} +extern "C" { +struct stat + { + __dev_t st_dev; + __ino_t st_ino; + __nlink_t st_nlink; + __mode_t st_mode; + __uid_t st_uid; + __gid_t st_gid; + int __pad0; + __dev_t st_rdev; + __off_t st_size; + __blksize_t st_blksize; + __blkcnt_t st_blocks; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; + long int __unused[3]; + }; +struct stat64 + { + __dev_t st_dev; + __ino64_t st_ino; + __nlink_t st_nlink; + __mode_t st_mode; + __uid_t st_uid; + __gid_t st_gid; + int __pad0; + __dev_t st_rdev; + __off_t st_size; + __blksize_t st_blksize; + __blkcnt64_t st_blocks; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; + long int __unused[3]; + }; +extern int stat (__const char *__restrict __file, + struct stat *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int fstat (int __fd, struct stat *__buf) throw () __attribute__ ((__nonnull__ (2))); +extern int stat64 (__const char *__restrict __file, + struct stat64 *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int fstat64 (int __fd, struct stat64 *__buf) throw () __attribute__ ((__nonnull__ (2))); +extern int fstatat (int __fd, __const char *__restrict __file, + struct stat *__restrict __buf, int __flag) + throw () __attribute__ ((__nonnull__ (2, 3))); +extern int fstatat64 (int __fd, __const char *__restrict __file, + struct stat64 *__restrict __buf, int __flag) + throw () __attribute__ ((__nonnull__ (2, 3))); +extern int lstat (__const char *__restrict __file, + struct stat *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int lstat64 (__const char *__restrict __file, + struct stat64 *__restrict __buf) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int chmod (__const char *__file, __mode_t __mode) + throw () __attribute__ ((__nonnull__ (1))); +extern int lchmod (__const char *__file, __mode_t __mode) + throw () __attribute__ ((__nonnull__ (1))); +extern int fchmod (int __fd, __mode_t __mode) throw (); +extern int fchmodat (int __fd, __const char *__file, __mode_t __mode, + int __flag) + throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); +extern __mode_t umask (__mode_t __mask) throw (); +extern __mode_t getumask (void) throw (); +extern int mkdir (__const char *__path, __mode_t __mode) + throw () __attribute__ ((__nonnull__ (1))); +extern int mkdirat (int __fd, __const char *__path, __mode_t __mode) + throw () __attribute__ ((__nonnull__ (2))); +extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev) + throw () __attribute__ ((__nonnull__ (1))); +extern int mknodat (int __fd, __const char *__path, __mode_t __mode, + __dev_t __dev) throw () __attribute__ ((__nonnull__ (2))); +extern int mkfifo (__const char *__path, __mode_t __mode) + throw () __attribute__ ((__nonnull__ (1))); +extern int mkfifoat (int __fd, __const char *__path, __mode_t __mode) + throw () __attribute__ ((__nonnull__ (2))); +extern int utimensat (int __fd, __const char *__path, + __const struct timespec __times[2], + int __flags) + throw () __attribute__ ((__nonnull__ (2))); +extern int futimens (int __fd, __const struct timespec __times[2]) throw (); +extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf) + throw () __attribute__ ((__nonnull__ (3))); +extern int __xstat (int __ver, __const char *__filename, + struct stat *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3))); +extern int __lxstat (int __ver, __const char *__filename, + struct stat *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3))); +extern int __fxstatat (int __ver, int __fildes, __const char *__filename, + struct stat *__stat_buf, int __flag) + throw () __attribute__ ((__nonnull__ (3, 4))); +extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf) + throw () __attribute__ ((__nonnull__ (3))); +extern int __xstat64 (int __ver, __const char *__filename, + struct stat64 *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3))); +extern int __lxstat64 (int __ver, __const char *__filename, + struct stat64 *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3))); +extern int __fxstatat64 (int __ver, int __fildes, __const char *__filename, + struct stat64 *__stat_buf, int __flag) + throw () __attribute__ ((__nonnull__ (3, 4))); +extern int __xmknod (int __ver, __const char *__path, __mode_t __mode, + __dev_t *__dev) throw () __attribute__ ((__nonnull__ (2, 4))); +extern int __xmknodat (int __ver, int __fd, __const char *__path, + __mode_t __mode, __dev_t *__dev) + throw () __attribute__ ((__nonnull__ (3, 5))); +extern __inline __attribute__ ((__gnu_inline__)) int +stat (__const char *__path, struct stat *__statbuf) throw () +{ + return __xstat (1, __path, __statbuf); +} +extern __inline __attribute__ ((__gnu_inline__)) int +lstat (__const char *__path, struct stat *__statbuf) throw () +{ + return __lxstat (1, __path, __statbuf); +} +extern __inline __attribute__ ((__gnu_inline__)) int +fstat (int __fd, struct stat *__statbuf) throw () +{ + return __fxstat (1, __fd, __statbuf); +} +extern __inline __attribute__ ((__gnu_inline__)) int +fstatat (int __fd, __const char *__filename, struct stat *__statbuf, int __flag) throw () +{ + return __fxstatat (1, __fd, __filename, __statbuf, __flag); +} +extern __inline __attribute__ ((__gnu_inline__)) int +mknod (__const char *__path, __mode_t __mode, __dev_t __dev) throw () +{ + return __xmknod (0, __path, __mode, &__dev); +} +extern __inline __attribute__ ((__gnu_inline__)) int +mknodat (int __fd, __const char *__path, __mode_t __mode, __dev_t __dev) throw () +{ + return __xmknodat (0, __fd, __path, __mode, &__dev); +} +extern __inline __attribute__ ((__gnu_inline__)) int +stat64 (__const char *__path, struct stat64 *__statbuf) throw () +{ + return __xstat64 (1, __path, __statbuf); +} +extern __inline __attribute__ ((__gnu_inline__)) int +lstat64 (__const char *__path, struct stat64 *__statbuf) throw () +{ + return __lxstat64 (1, __path, __statbuf); +} +extern __inline __attribute__ ((__gnu_inline__)) int +fstat64 (int __fd, struct stat64 *__statbuf) throw () +{ + return __fxstat64 (1, __fd, __statbuf); +} +extern __inline __attribute__ ((__gnu_inline__)) int +fstatat64 (int __fd, __const char *__filename, struct stat64 *__statbuf, int __flag) throw () +{ + return __fxstatat64 (1, __fd, __filename, __statbuf, __flag); +} +} +extern "C" { +} +extern "C" { +void * PyMem_Malloc(size_t); +void * PyMem_Realloc(void *, size_t); +void PyMem_Free(void *); +} +extern "C" { +typedef struct _object { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; +} PyObject; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; Py_ssize_t ob_size; +} PyVarObject; +typedef PyObject * (*unaryfunc)(PyObject *); +typedef PyObject * (*binaryfunc)(PyObject *, PyObject *); +typedef PyObject * (*ternaryfunc)(PyObject *, PyObject *, PyObject *); +typedef int (*inquiry)(PyObject *); +typedef Py_ssize_t (*lenfunc)(PyObject *); +typedef int (*coercion)(PyObject **, PyObject **); +typedef PyObject *(*intargfunc)(PyObject *, int) __attribute__((__deprecated__)); +typedef PyObject *(*intintargfunc)(PyObject *, int, int) __attribute__((__deprecated__)); +typedef PyObject *(*ssizeargfunc)(PyObject *, Py_ssize_t); +typedef PyObject *(*ssizessizeargfunc)(PyObject *, Py_ssize_t, Py_ssize_t); +typedef int(*intobjargproc)(PyObject *, int, PyObject *); +typedef int(*intintobjargproc)(PyObject *, int, int, PyObject *); +typedef int(*ssizeobjargproc)(PyObject *, Py_ssize_t, PyObject *); +typedef int(*ssizessizeobjargproc)(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *); +typedef int(*objobjargproc)(PyObject *, PyObject *, PyObject *); +typedef int (*getreadbufferproc)(PyObject *, int, void **); +typedef int (*getwritebufferproc)(PyObject *, int, void **); +typedef int (*getsegcountproc)(PyObject *, int *); +typedef int (*getcharbufferproc)(PyObject *, int, char **); +typedef Py_ssize_t (*readbufferproc)(PyObject *, Py_ssize_t, void **); +typedef Py_ssize_t (*writebufferproc)(PyObject *, Py_ssize_t, void **); +typedef Py_ssize_t (*segcountproc)(PyObject *, Py_ssize_t *); +typedef Py_ssize_t (*charbufferproc)(PyObject *, Py_ssize_t, char **); +typedef struct bufferinfo { + void *buf; + PyObject *obj; + Py_ssize_t len; + Py_ssize_t itemsize; + int readonly; + int ndim; + char *format; + Py_ssize_t *shape; + Py_ssize_t *strides; + Py_ssize_t *suboffsets; + void *internal; +} Py_buffer; +typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); +typedef void (*releasebufferproc)(PyObject *, Py_buffer *); +typedef int (*objobjproc)(PyObject *, PyObject *); +typedef int (*visitproc)(PyObject *, void *); +typedef int (*traverseproc)(PyObject *, visitproc, void *); +typedef struct { + binaryfunc nb_add; + binaryfunc nb_subtract; + binaryfunc nb_multiply; + binaryfunc nb_divide; + binaryfunc nb_remainder; + binaryfunc nb_divmod; + ternaryfunc nb_power; + unaryfunc nb_negative; + unaryfunc nb_positive; + unaryfunc nb_absolute; + inquiry nb_nonzero; + unaryfunc nb_invert; + binaryfunc nb_lshift; + binaryfunc nb_rshift; + binaryfunc nb_and; + binaryfunc nb_xor; + binaryfunc nb_or; + coercion nb_coerce; + unaryfunc nb_int; + unaryfunc nb_long; + unaryfunc nb_float; + unaryfunc nb_oct; + unaryfunc nb_hex; + binaryfunc nb_inplace_add; + binaryfunc nb_inplace_subtract; + binaryfunc nb_inplace_multiply; + binaryfunc nb_inplace_divide; + binaryfunc nb_inplace_remainder; + ternaryfunc nb_inplace_power; + binaryfunc nb_inplace_lshift; + binaryfunc nb_inplace_rshift; + binaryfunc nb_inplace_and; + binaryfunc nb_inplace_xor; + binaryfunc nb_inplace_or; + binaryfunc nb_floor_divide; + binaryfunc nb_true_divide; + binaryfunc nb_inplace_floor_divide; + binaryfunc nb_inplace_true_divide; + unaryfunc nb_index; +} PyNumberMethods; +typedef struct { + lenfunc sq_length; + binaryfunc sq_concat; + ssizeargfunc sq_repeat; + ssizeargfunc sq_item; + ssizessizeargfunc sq_slice; + ssizeobjargproc sq_ass_item; + ssizessizeobjargproc sq_ass_slice; + objobjproc sq_contains; + binaryfunc sq_inplace_concat; + ssizeargfunc sq_inplace_repeat; +} PySequenceMethods; +typedef struct { + lenfunc mp_length; + binaryfunc mp_subscript; + objobjargproc mp_ass_subscript; +} PyMappingMethods; +typedef struct { + readbufferproc bf_getreadbuffer; + writebufferproc bf_getwritebuffer; + segcountproc bf_getsegcount; + charbufferproc bf_getcharbuffer; + getbufferproc bf_getbuffer; + releasebufferproc bf_releasebuffer; +} PyBufferProcs; +typedef void (*freefunc)(void *); +typedef void (*destructor)(PyObject *); +typedef int (*printfunc)(PyObject *, FILE *, int); +typedef PyObject *(*getattrfunc)(PyObject *, char *); +typedef PyObject *(*getattrofunc)(PyObject *, PyObject *); +typedef int (*setattrfunc)(PyObject *, char *, PyObject *); +typedef int (*setattrofunc)(PyObject *, PyObject *, PyObject *); +typedef int (*cmpfunc)(PyObject *, PyObject *); +typedef PyObject *(*reprfunc)(PyObject *); +typedef long (*hashfunc)(PyObject *); +typedef PyObject *(*richcmpfunc) (PyObject *, PyObject *, int); +typedef PyObject *(*getiterfunc) (PyObject *); +typedef PyObject *(*iternextfunc) (PyObject *); +typedef PyObject *(*descrgetfunc) (PyObject *, PyObject *, PyObject *); +typedef int (*descrsetfunc) (PyObject *, PyObject *, PyObject *); +typedef int (*initproc)(PyObject *, PyObject *, PyObject *); +typedef PyObject *(*newfunc)(struct _typeobject *, PyObject *, PyObject *); +typedef PyObject *(*allocfunc)(struct _typeobject *, Py_ssize_t); +typedef struct _typeobject { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; Py_ssize_t ob_size; + const char *tp_name; + Py_ssize_t tp_basicsize, tp_itemsize; + destructor tp_dealloc; + printfunc tp_print; + getattrfunc tp_getattr; + setattrfunc tp_setattr; + cmpfunc tp_compare; + reprfunc tp_repr; + PyNumberMethods *tp_as_number; + PySequenceMethods *tp_as_sequence; + PyMappingMethods *tp_as_mapping; + hashfunc tp_hash; + ternaryfunc tp_call; + reprfunc tp_str; + getattrofunc tp_getattro; + setattrofunc tp_setattro; + PyBufferProcs *tp_as_buffer; + long tp_flags; + const char *tp_doc; + traverseproc tp_traverse; + inquiry tp_clear; + richcmpfunc tp_richcompare; + Py_ssize_t tp_weaklistoffset; + getiterfunc tp_iter; + iternextfunc tp_iternext; + struct PyMethodDef *tp_methods; + struct PyMemberDef *tp_members; + struct PyGetSetDef *tp_getset; + struct _typeobject *tp_base; + PyObject *tp_dict; + descrgetfunc tp_descr_get; + descrsetfunc tp_descr_set; + Py_ssize_t tp_dictoffset; + initproc tp_init; + allocfunc tp_alloc; + newfunc tp_new; + freefunc tp_free; + inquiry tp_is_gc; + PyObject *tp_bases; + PyObject *tp_mro; + PyObject *tp_cache; + PyObject *tp_subclasses; + PyObject *tp_weaklist; + destructor tp_del; + unsigned int tp_version_tag; +} PyTypeObject; +typedef struct _heaptypeobject { + PyTypeObject ht_type; + PyNumberMethods as_number; + PyMappingMethods as_mapping; + PySequenceMethods as_sequence; + PyBufferProcs as_buffer; + PyObject *ht_name, *ht_slots; +} PyHeapTypeObject; +int PyType_IsSubtype(PyTypeObject *, PyTypeObject *); +extern PyTypeObject PyType_Type; +extern PyTypeObject PyBaseObject_Type; +extern PyTypeObject PySuper_Type; +int PyType_Ready(PyTypeObject *); +PyObject * PyType_GenericAlloc(PyTypeObject *, Py_ssize_t); +PyObject * PyType_GenericNew(PyTypeObject *, + PyObject *, PyObject *); +PyObject * _PyType_Lookup(PyTypeObject *, PyObject *); +unsigned int PyType_ClearCache(void); +void PyType_Modified(PyTypeObject *); +int PyObject_Print(PyObject *, FILE *, int); +void _PyObject_Dump(PyObject *); +PyObject * PyObject_Repr(PyObject *); +PyObject * _PyObject_Str(PyObject *); +PyObject * PyObject_Str(PyObject *); +PyObject * PyObject_Unicode(PyObject *); +int PyObject_Compare(PyObject *, PyObject *); +PyObject * PyObject_RichCompare(PyObject *, PyObject *, int); +int PyObject_RichCompareBool(PyObject *, PyObject *, int); +PyObject * PyObject_GetAttrString(PyObject *, const char *); +int PyObject_SetAttrString(PyObject *, const char *, PyObject *); +int PyObject_HasAttrString(PyObject *, const char *); +PyObject * PyObject_GetAttr(PyObject *, PyObject *); +int PyObject_SetAttr(PyObject *, PyObject *, PyObject *); +int PyObject_HasAttr(PyObject *, PyObject *); +PyObject ** _PyObject_GetDictPtr(PyObject *); +PyObject * PyObject_SelfIter(PyObject *); +PyObject * PyObject_GenericGetAttr(PyObject *, PyObject *); +int PyObject_GenericSetAttr(PyObject *, + PyObject *, PyObject *); +long PyObject_Hash(PyObject *); +long PyObject_HashNotImplemented(PyObject *); +int PyObject_IsTrue(PyObject *); +int PyObject_Not(PyObject *); +int PyCallable_Check(PyObject *); +int PyNumber_Coerce(PyObject **, PyObject **); +int PyNumber_CoerceEx(PyObject **, PyObject **); +void PyObject_ClearWeakRefs(PyObject *); +extern int _PyObject_SlotCompare(PyObject *, PyObject *); +PyObject * PyObject_Dir(PyObject *); +int Py_ReprEnter(PyObject *); +void Py_ReprLeave(PyObject *); +long _Py_HashDouble(double); +long _Py_HashPointer(void*); +void Py_IncRef(PyObject *); +void Py_DecRef(PyObject *); +extern PyObject _Py_NoneStruct; +extern PyObject _Py_NotImplementedStruct; +extern int _Py_SwappedOp[]; +void _PyTrash_deposit_object(PyObject*); +void _PyTrash_destroy_chain(void); +extern int _PyTrash_delete_nesting; +extern PyObject * _PyTrash_delete_later; +} +extern "C" { +void * PyObject_Malloc(size_t); +void * PyObject_Realloc(void *, size_t); +void PyObject_Free(void *); +PyObject * PyObject_Init(PyObject *, PyTypeObject *); +PyVarObject * PyObject_InitVar(PyVarObject *, + PyTypeObject *, Py_ssize_t); +PyObject * _PyObject_New(PyTypeObject *); +PyVarObject * _PyObject_NewVar(PyTypeObject *, Py_ssize_t); +Py_ssize_t PyGC_Collect(void); +PyVarObject * _PyObject_GC_Resize(PyVarObject *, Py_ssize_t); +typedef union _gc_head { + struct { + union _gc_head *gc_next; + union _gc_head *gc_prev; + Py_ssize_t gc_refs; + } gc; + long double dummy; +} PyGC_Head; +extern PyGC_Head *_PyGC_generation0; +PyObject * _PyObject_GC_Malloc(size_t); +PyObject * _PyObject_GC_New(PyTypeObject *); +PyVarObject * _PyObject_GC_NewVar(PyTypeObject *, Py_ssize_t); +void PyObject_GC_Track(void *); +void PyObject_GC_UnTrack(void *); +void PyObject_GC_Del(void *); +} +extern "C" { +extern int Py_DebugFlag; +extern int Py_VerboseFlag; +extern int Py_InteractiveFlag; +extern int Py_InspectFlag; +extern int Py_OptimizeFlag; +extern int Py_NoSiteFlag; +extern int Py_BytesWarningFlag; +extern int Py_UseClassExceptionsFlag; +extern int Py_FrozenFlag; +extern int Py_TabcheckFlag; +extern int Py_UnicodeFlag; +extern int Py_IgnoreEnvironmentFlag; +extern int Py_DivisionWarningFlag; +extern int Py_DontWriteBytecodeFlag; +extern int Py_NoUserSiteDirectory; +extern int _Py_QnewFlag; +extern int Py_Py3kWarningFlag; +void Py_FatalError(const char *message); +} +typedef unsigned int Py_UCS4; +typedef Py_UCS4 Py_UNICODE; +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + Py_ssize_t length; + Py_UNICODE *str; + long hash; + PyObject *defenc; +} PyUnicodeObject; +extern PyTypeObject PyUnicode_Type; +PyObject* PyUnicodeUCS4_FromUnicode( + const Py_UNICODE *u, + Py_ssize_t size + ); +PyObject* PyUnicodeUCS4_FromStringAndSize( + const char *u, + Py_ssize_t size + ); +PyObject* PyUnicodeUCS4_FromString( + const char *u + ); +Py_UNICODE * PyUnicodeUCS4_AsUnicode( + PyObject *unicode + ); +Py_ssize_t PyUnicodeUCS4_GetSize( + PyObject *unicode + ); +Py_UNICODE PyUnicodeUCS4_GetMax(void); +int PyUnicodeUCS4_Resize( + PyObject **unicode, + Py_ssize_t length + ); +PyObject* PyUnicodeUCS4_FromEncodedObject( + register PyObject *obj, + const char *encoding, + const char *errors + ); +PyObject* PyUnicodeUCS4_FromObject( + register PyObject *obj + ); +PyObject * PyUnicodeUCS4_FromFormatV(const char*, va_list); +PyObject * PyUnicodeUCS4_FromFormat(const char*, ...); +PyObject * _PyUnicode_FormatAdvanced(PyObject *obj, + Py_UNICODE *format_spec, + Py_ssize_t format_spec_len); +PyObject* PyUnicodeUCS4_FromWideChar( + register const wchar_t *w, + Py_ssize_t size + ); +Py_ssize_t PyUnicodeUCS4_AsWideChar( + PyUnicodeObject *unicode, + register wchar_t *w, + Py_ssize_t size + ); +PyObject* PyUnicodeUCS4_FromOrdinal(int ordinal); +int PyUnicodeUCS4_ClearFreelist(void); +PyObject * _PyUnicodeUCS4_AsDefaultEncodedString( + PyObject *, const char *); +const char* PyUnicodeUCS4_GetDefaultEncoding(void); +int PyUnicodeUCS4_SetDefaultEncoding( + const char *encoding + ); +PyObject* PyUnicodeUCS4_Decode( + const char *s, + Py_ssize_t size, + const char *encoding, + const char *errors + ); +PyObject* PyUnicodeUCS4_Encode( + const Py_UNICODE *s, + Py_ssize_t size, + const char *encoding, + const char *errors + ); +PyObject* PyUnicodeUCS4_AsEncodedObject( + PyObject *unicode, + const char *encoding, + const char *errors + ); +PyObject* PyUnicodeUCS4_AsEncodedString( + PyObject *unicode, + const char *encoding, + const char *errors + ); +PyObject* PyUnicode_BuildEncodingMap( + PyObject* string + ); +PyObject* PyUnicode_DecodeUTF7( + const char *string, + Py_ssize_t length, + const char *errors + ); +PyObject* PyUnicode_DecodeUTF7Stateful( + const char *string, + Py_ssize_t length, + const char *errors, + Py_ssize_t *consumed + ); +PyObject* PyUnicode_EncodeUTF7( + const Py_UNICODE *data, + Py_ssize_t length, + int encodeSetO, + int encodeWhiteSpace, + const char *errors + ); +PyObject* PyUnicodeUCS4_DecodeUTF8( + const char *string, + Py_ssize_t length, + const char *errors + ); +PyObject* PyUnicodeUCS4_DecodeUTF8Stateful( + const char *string, + Py_ssize_t length, + const char *errors, + Py_ssize_t *consumed + ); +PyObject* PyUnicodeUCS4_AsUTF8String( + PyObject *unicode + ); +PyObject* PyUnicodeUCS4_EncodeUTF8( + const Py_UNICODE *data, + Py_ssize_t length, + const char *errors + ); +PyObject* PyUnicodeUCS4_DecodeUTF32( + const char *string, + Py_ssize_t length, + const char *errors, + int *byteorder + ); +PyObject* PyUnicodeUCS4_DecodeUTF32Stateful( + const char *string, + Py_ssize_t length, + const char *errors, + int *byteorder, + Py_ssize_t *consumed + ); +PyObject* PyUnicodeUCS4_AsUTF32String( + PyObject *unicode + ); +PyObject* PyUnicodeUCS4_EncodeUTF32( + const Py_UNICODE *data, + Py_ssize_t length, + const char *errors, + int byteorder + ); +PyObject* PyUnicodeUCS4_DecodeUTF16( + const char *string, + Py_ssize_t length, + const char *errors, + int *byteorder + ); +PyObject* PyUnicodeUCS4_DecodeUTF16Stateful( + const char *string, + Py_ssize_t length, + const char *errors, + int *byteorder, + Py_ssize_t *consumed + ); +PyObject* PyUnicodeUCS4_AsUTF16String( + PyObject *unicode + ); +PyObject* PyUnicodeUCS4_EncodeUTF16( + const Py_UNICODE *data, + Py_ssize_t length, + const char *errors, + int byteorder + ); +PyObject* PyUnicodeUCS4_DecodeUnicodeEscape( + const char *string, + Py_ssize_t length, + const char *errors + ); +PyObject* PyUnicodeUCS4_AsUnicodeEscapeString( + PyObject *unicode + ); +PyObject* PyUnicodeUCS4_EncodeUnicodeEscape( + const Py_UNICODE *data, + Py_ssize_t length + ); +PyObject* PyUnicodeUCS4_DecodeRawUnicodeEscape( + const char *string, + Py_ssize_t length, + const char *errors + ); +PyObject* PyUnicodeUCS4_AsRawUnicodeEscapeString( + PyObject *unicode + ); +PyObject* PyUnicodeUCS4_EncodeRawUnicodeEscape( + const Py_UNICODE *data, + Py_ssize_t length + ); +PyObject *_PyUnicode_DecodeUnicodeInternal( + const char *string, + Py_ssize_t length, + const char *errors + ); +PyObject* PyUnicodeUCS4_DecodeLatin1( + const char *string, + Py_ssize_t length, + const char *errors + ); +PyObject* PyUnicodeUCS4_AsLatin1String( + PyObject *unicode + ); +PyObject* PyUnicodeUCS4_EncodeLatin1( + const Py_UNICODE *data, + Py_ssize_t length, + const char *errors + ); +PyObject* PyUnicodeUCS4_DecodeASCII( + const char *string, + Py_ssize_t length, + const char *errors + ); +PyObject* PyUnicodeUCS4_AsASCIIString( + PyObject *unicode + ); +PyObject* PyUnicodeUCS4_EncodeASCII( + const Py_UNICODE *data, + Py_ssize_t length, + const char *errors + ); +PyObject* PyUnicodeUCS4_DecodeCharmap( + const char *string, + Py_ssize_t length, + PyObject *mapping, + const char *errors + ); +PyObject* PyUnicodeUCS4_AsCharmapString( + PyObject *unicode, + PyObject *mapping + ); +PyObject* PyUnicodeUCS4_EncodeCharmap( + const Py_UNICODE *data, + Py_ssize_t length, + PyObject *mapping, + const char *errors + ); +PyObject * PyUnicodeUCS4_TranslateCharmap( + const Py_UNICODE *data, + Py_ssize_t length, + PyObject *table, + const char *errors + ); +int PyUnicodeUCS4_EncodeDecimal( + Py_UNICODE *s, + Py_ssize_t length, + char *output, + const char *errors + ); +PyObject* PyUnicodeUCS4_Concat( + PyObject *left, + PyObject *right + ); +PyObject* PyUnicodeUCS4_Split( + PyObject *s, + PyObject *sep, + Py_ssize_t maxsplit + ); +PyObject* PyUnicodeUCS4_Splitlines( + PyObject *s, + int keepends + ); +PyObject* PyUnicodeUCS4_Partition( + PyObject *s, + PyObject *sep + ); +PyObject* PyUnicodeUCS4_RPartition( + PyObject *s, + PyObject *sep + ); +PyObject* PyUnicodeUCS4_RSplit( + PyObject *s, + PyObject *sep, + Py_ssize_t maxsplit + ); +PyObject * PyUnicodeUCS4_Translate( + PyObject *str, + PyObject *table, + const char *errors + ); +PyObject* PyUnicodeUCS4_Join( + PyObject *separator, + PyObject *seq + ); +Py_ssize_t PyUnicodeUCS4_Tailmatch( + PyObject *str, + PyObject *substr, + Py_ssize_t start, + Py_ssize_t end, + int direction + ); +Py_ssize_t PyUnicodeUCS4_Find( + PyObject *str, + PyObject *substr, + Py_ssize_t start, + Py_ssize_t end, + int direction + ); +Py_ssize_t PyUnicodeUCS4_Count( + PyObject *str, + PyObject *substr, + Py_ssize_t start, + Py_ssize_t end + ); +PyObject * PyUnicodeUCS4_Replace( + PyObject *str, + PyObject *substr, + PyObject *replstr, + Py_ssize_t maxcount + ); +int PyUnicodeUCS4_Compare( + PyObject *left, + PyObject *right + ); +PyObject * PyUnicodeUCS4_RichCompare( + PyObject *left, + PyObject *right, + int op + ); +PyObject * PyUnicodeUCS4_Format( + PyObject *format, + PyObject *args + ); +int PyUnicodeUCS4_Contains( + PyObject *container, + PyObject *element + ); +PyObject * _PyUnicode_XStrip( + PyUnicodeObject *self, + int striptype, + PyObject *sepobj + ); +extern const unsigned char _Py_ascii_whitespace[]; +int _PyUnicodeUCS4_IsLowercase( + Py_UNICODE ch + ); +int _PyUnicodeUCS4_IsUppercase( + Py_UNICODE ch + ); +int _PyUnicodeUCS4_IsTitlecase( + Py_UNICODE ch + ); +int _PyUnicodeUCS4_IsWhitespace( + const Py_UNICODE ch + ); +int _PyUnicodeUCS4_IsLinebreak( + const Py_UNICODE ch + ); +Py_UNICODE _PyUnicodeUCS4_ToLowercase( + Py_UNICODE ch + ); +Py_UNICODE _PyUnicodeUCS4_ToUppercase( + Py_UNICODE ch + ); +Py_UNICODE _PyUnicodeUCS4_ToTitlecase( + Py_UNICODE ch + ); +int _PyUnicodeUCS4_ToDecimalDigit( + Py_UNICODE ch + ); +int _PyUnicodeUCS4_ToDigit( + Py_UNICODE ch + ); +double _PyUnicodeUCS4_ToNumeric( + Py_UNICODE ch + ); +int _PyUnicodeUCS4_IsDecimalDigit( + Py_UNICODE ch + ); +int _PyUnicodeUCS4_IsDigit( + Py_UNICODE ch + ); +int _PyUnicodeUCS4_IsNumeric( + Py_UNICODE ch + ); +int _PyUnicodeUCS4_IsAlpha( + Py_UNICODE ch + ); +} +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + long ob_ival; +} PyIntObject; +extern PyTypeObject PyInt_Type; +PyObject * PyInt_FromString(char*, char**, int); +PyObject * PyInt_FromUnicode(Py_UNICODE*, Py_ssize_t, int); +PyObject * PyInt_FromLong(long); +PyObject * PyInt_FromSize_t(size_t); +PyObject * PyInt_FromSsize_t(Py_ssize_t); +long PyInt_AsLong(PyObject *); +Py_ssize_t PyInt_AsSsize_t(PyObject *); +unsigned long PyInt_AsUnsignedLongMask(PyObject *); +unsigned long long PyInt_AsUnsignedLongLongMask(PyObject *); +long PyInt_GetMax(void); +unsigned long PyOS_strtoul(char *, char **, int); +long PyOS_strtol(char *, char **, int); +int PyInt_ClearFreeList(void); +PyObject* _PyInt_Format(PyIntObject* v, int base, int newstyle); +PyObject * _PyInt_FormatAdvanced(PyObject *obj, + char *format_spec, + Py_ssize_t format_spec_len); +} +extern "C" { +typedef PyIntObject PyBoolObject; +extern PyTypeObject PyBool_Type; +extern PyIntObject _Py_ZeroStruct, _Py_TrueStruct; +PyObject * PyBool_FromLong(long); +} +extern "C" { +typedef struct _longobject PyLongObject; +extern PyTypeObject PyLong_Type; +PyObject * PyLong_FromLong(long); +PyObject * PyLong_FromUnsignedLong(unsigned long); +PyObject * PyLong_FromDouble(double); +PyObject * PyLong_FromSize_t(size_t); +PyObject * PyLong_FromSsize_t(Py_ssize_t); +long PyLong_AsLong(PyObject *); +unsigned long PyLong_AsUnsignedLong(PyObject *); +unsigned long PyLong_AsUnsignedLongMask(PyObject *); +Py_ssize_t PyLong_AsSsize_t(PyObject *); +extern int _PyLong_DigitValue[256]; +double _PyLong_AsScaledDouble(PyObject *vv, int *e); +double PyLong_AsDouble(PyObject *); +PyObject * PyLong_FromVoidPtr(void *); +void * PyLong_AsVoidPtr(PyObject *); +PyObject * PyLong_FromLongLong(long long); +PyObject * PyLong_FromUnsignedLongLong(unsigned long long); +long long PyLong_AsLongLong(PyObject *); +unsigned long long PyLong_AsUnsignedLongLong(PyObject *); +unsigned long long PyLong_AsUnsignedLongLongMask(PyObject *); +PyObject * PyLong_FromString(char *, char **, int); +PyObject * PyLong_FromUnicode(Py_UNICODE*, Py_ssize_t, int); +int _PyLong_Sign(PyObject *v); +size_t _PyLong_NumBits(PyObject *v); +PyObject * _PyLong_FromByteArray( + const unsigned char* bytes, size_t n, + int little_endian, int is_signed); +int _PyLong_AsByteArray(PyLongObject* v, + unsigned char* bytes, size_t n, + int little_endian, int is_signed); +PyObject * _PyLong_Format(PyObject *aa, int base, int addL, int newstyle); +PyObject * _PyLong_FormatAdvanced(PyObject *obj, + char *format_spec, + Py_ssize_t format_spec_len); +} +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + double ob_fval; +} PyFloatObject; +extern PyTypeObject PyFloat_Type; +double PyFloat_GetMax(void); +double PyFloat_GetMin(void); +PyObject * PyFloat_GetInfo(void); +PyObject * PyFloat_FromString(PyObject*, char** junk); +PyObject * PyFloat_FromDouble(double); +double PyFloat_AsDouble(PyObject *); +void PyFloat_AsReprString(char*, PyFloatObject *v); +void PyFloat_AsString(char*, PyFloatObject *v); +int _PyFloat_Pack4(double x, unsigned char *p, int le); +int _PyFloat_Pack8(double x, unsigned char *p, int le); +int _PyFloat_Digits(char *buf, double v, int *signum); +void _PyFloat_DigitsInit(void); +double _PyFloat_Unpack4(const unsigned char *p, int le); +double _PyFloat_Unpack8(const unsigned char *p, int le); +int PyFloat_ClearFreeList(void); +PyObject * _PyFloat_FormatAdvanced(PyObject *obj, + char *format_spec, + Py_ssize_t format_spec_len); +} +extern "C" { +typedef struct { + double real; + double imag; +} Py_complex; +Py_complex _Py_c_sum(Py_complex, Py_complex); +Py_complex _Py_c_diff(Py_complex, Py_complex); +Py_complex _Py_c_neg(Py_complex); +Py_complex _Py_c_prod(Py_complex, Py_complex); +Py_complex _Py_c_quot(Py_complex, Py_complex); +Py_complex _Py_c_pow(Py_complex, Py_complex); +double _Py_c_abs(Py_complex); +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + Py_complex cval; +} PyComplexObject; +extern PyTypeObject PyComplex_Type; +PyObject * PyComplex_FromCComplex(Py_complex); +PyObject * PyComplex_FromDoubles(double real, double imag); +double PyComplex_RealAsDouble(PyObject *op); +double PyComplex_ImagAsDouble(PyObject *op); +Py_complex PyComplex_AsCComplex(PyObject *op); +} +extern "C" { +extern PyTypeObject PyRange_Type; +} +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; Py_ssize_t ob_size; + long ob_shash; + int ob_sstate; + char ob_sval[1]; +} PyStringObject; +extern PyTypeObject PyBaseString_Type; +extern PyTypeObject PyString_Type; +PyObject * PyString_FromStringAndSize(const char *, Py_ssize_t); +PyObject * PyString_FromString(const char *); +PyObject * PyString_FromFormatV(const char*, va_list) + __attribute__((format(printf, 1, 0))); +PyObject * PyString_FromFormat(const char*, ...) + __attribute__((format(printf, 1, 2))); +Py_ssize_t PyString_Size(PyObject *); +char * PyString_AsString(PyObject *); +PyObject * PyString_Repr(PyObject *, int); +void PyString_Concat(PyObject **, PyObject *); +void PyString_ConcatAndDel(PyObject **, PyObject *); +int _PyString_Resize(PyObject **, Py_ssize_t); +int _PyString_Eq(PyObject *, PyObject*); +PyObject * PyString_Format(PyObject *, PyObject *); +PyObject * _PyString_FormatLong(PyObject*, int, int, + int, char**, int*); +PyObject * PyString_DecodeEscape(const char *, Py_ssize_t, + const char *, Py_ssize_t, + const char *); +void PyString_InternInPlace(PyObject **); +void PyString_InternImmortal(PyObject **); +PyObject * PyString_InternFromString(const char *); +void _Py_ReleaseInternedStrings(void); +PyObject * _PyString_Join(PyObject *sep, PyObject *x); +PyObject* PyString_Decode( + const char *s, + Py_ssize_t size, + const char *encoding, + const char *errors + ); +PyObject* PyString_Encode( + const char *s, + Py_ssize_t size, + const char *encoding, + const char *errors + ); +PyObject* PyString_AsEncodedObject( + PyObject *str, + const char *encoding, + const char *errors + ); +PyObject* PyString_AsEncodedString( + PyObject *str, + const char *encoding, + const char *errors + ); +PyObject* PyString_AsDecodedObject( + PyObject *str, + const char *encoding, + const char *errors + ); +PyObject* PyString_AsDecodedString( + PyObject *str, + const char *encoding, + const char *errors + ); +int PyString_AsStringAndSize( + register PyObject *obj, + register char **s, + register Py_ssize_t *len + ); +int _PyString_InsertThousandsGrouping(char *buffer, + Py_ssize_t n_buffer, + Py_ssize_t n_digits, + Py_ssize_t buf_size, + Py_ssize_t *count, + int append_zero_char); +PyObject * _PyBytes_FormatAdvanced(PyObject *obj, + char *format_spec, + Py_ssize_t format_spec_len); +} +extern "C" { +extern PyTypeObject PyBuffer_Type; +PyObject * PyBuffer_FromObject(PyObject *base, + Py_ssize_t offset, Py_ssize_t size); +PyObject * PyBuffer_FromReadWriteObject(PyObject *base, + Py_ssize_t offset, + Py_ssize_t size); +PyObject * PyBuffer_FromMemory(void *ptr, Py_ssize_t size); +PyObject * PyBuffer_FromReadWriteMemory(void *ptr, Py_ssize_t size); +PyObject * PyBuffer_New(Py_ssize_t size); +} +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; Py_ssize_t ob_size; + int ob_exports; + Py_ssize_t ob_alloc; + char *ob_bytes; +} PyByteArrayObject; +extern PyTypeObject PyByteArray_Type; +extern PyTypeObject PyByteArrayIter_Type; +PyObject * PyByteArray_FromObject(PyObject *); +PyObject * PyByteArray_Concat(PyObject *, PyObject *); +PyObject * PyByteArray_FromStringAndSize(const char *, Py_ssize_t); +Py_ssize_t PyByteArray_Size(PyObject *); +char * PyByteArray_AsString(PyObject *); +int PyByteArray_Resize(PyObject *, Py_ssize_t); +extern char _PyByteArray_empty_string[]; +} +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; Py_ssize_t ob_size; + PyObject *ob_item[1]; +} PyTupleObject; +extern PyTypeObject PyTuple_Type; +PyObject * PyTuple_New(Py_ssize_t size); +Py_ssize_t PyTuple_Size(PyObject *); +PyObject * PyTuple_GetItem(PyObject *, Py_ssize_t); +int PyTuple_SetItem(PyObject *, Py_ssize_t, PyObject *); +PyObject * PyTuple_GetSlice(PyObject *, Py_ssize_t, Py_ssize_t); +int _PyTuple_Resize(PyObject **, Py_ssize_t); +PyObject * PyTuple_Pack(Py_ssize_t, ...); +int PyTuple_ClearFreeList(void); +} +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; Py_ssize_t ob_size; + PyObject **ob_item; + Py_ssize_t allocated; +} PyListObject; +extern PyTypeObject PyList_Type; +PyObject * PyList_New(Py_ssize_t size); +Py_ssize_t PyList_Size(PyObject *); +PyObject * PyList_GetItem(PyObject *, Py_ssize_t); +int PyList_SetItem(PyObject *, Py_ssize_t, PyObject *); +int PyList_Insert(PyObject *, Py_ssize_t, PyObject *); +int PyList_Append(PyObject *, PyObject *); +PyObject * PyList_GetSlice(PyObject *, Py_ssize_t, Py_ssize_t); +int PyList_SetSlice(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *); +int PyList_Sort(PyObject *); +int PyList_Reverse(PyObject *); +PyObject * PyList_AsTuple(PyObject *); +PyObject * _PyList_Extend(PyListObject *, PyObject *); +} +extern "C" { +typedef struct { + Py_ssize_t me_hash; + PyObject *me_key; + PyObject *me_value; +} PyDictEntry; +typedef struct _dictobject PyDictObject; +struct _dictobject { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + Py_ssize_t ma_fill; + Py_ssize_t ma_used; + Py_ssize_t ma_mask; + PyDictEntry *ma_table; + PyDictEntry *(*ma_lookup)(PyDictObject *mp, PyObject *key, long hash); + PyDictEntry ma_smalltable[8]; +}; +extern PyTypeObject PyDict_Type; +PyObject * PyDict_New(void); +PyObject * PyDict_GetItem(PyObject *mp, PyObject *key); +int PyDict_SetItem(PyObject *mp, PyObject *key, PyObject *item); +int PyDict_DelItem(PyObject *mp, PyObject *key); +void PyDict_Clear(PyObject *mp); +int PyDict_Next( + PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value); +int _PyDict_Next( + PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value, long *hash); +PyObject * PyDict_Keys(PyObject *mp); +PyObject * PyDict_Values(PyObject *mp); +PyObject * PyDict_Items(PyObject *mp); +Py_ssize_t PyDict_Size(PyObject *mp); +PyObject * PyDict_Copy(PyObject *mp); +int PyDict_Contains(PyObject *mp, PyObject *key); +int _PyDict_Contains(PyObject *mp, PyObject *key, long hash); +PyObject * _PyDict_NewPresized(Py_ssize_t minused); +int PyDict_Update(PyObject *mp, PyObject *other); +int PyDict_Merge(PyObject *mp, + PyObject *other, + int override); +int PyDict_MergeFromSeq2(PyObject *d, + PyObject *seq2, + int override); +PyObject * PyDict_GetItemString(PyObject *dp, const char *key); +int PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item); +int PyDict_DelItemString(PyObject *dp, const char *key); +} +extern "C" { +extern PyTypeObject PyEnum_Type; +extern PyTypeObject PyReversed_Type; +} +extern "C" { +typedef struct { + long hash; + PyObject *key; +} setentry; +typedef struct _setobject PySetObject; +struct _setobject { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + Py_ssize_t fill; + Py_ssize_t used; + Py_ssize_t mask; + setentry *table; + setentry *(*lookup)(PySetObject *so, PyObject *key, long hash); + setentry smalltable[8]; + long hash; + PyObject *weakreflist; +}; +extern PyTypeObject PySet_Type; +extern PyTypeObject PyFrozenSet_Type; +PyObject * PySet_New(PyObject *); +PyObject * PyFrozenSet_New(PyObject *); +Py_ssize_t PySet_Size(PyObject *anyset); +int PySet_Clear(PyObject *set); +int PySet_Contains(PyObject *anyset, PyObject *key); +int PySet_Discard(PyObject *set, PyObject *key); +int PySet_Add(PyObject *set, PyObject *key); +int _PySet_Next(PyObject *set, Py_ssize_t *pos, PyObject **key); +int _PySet_NextEntry(PyObject *set, Py_ssize_t *pos, PyObject **key, long *hash); +PyObject * PySet_Pop(PyObject *set); +int _PySet_Update(PyObject *set, PyObject *iterable); +} +extern "C" { +extern PyTypeObject PyCFunction_Type; +typedef PyObject *(*PyCFunction)(PyObject *, PyObject *); +typedef PyObject *(*PyCFunctionWithKeywords)(PyObject *, PyObject *, + PyObject *); +typedef PyObject *(*PyNoArgsFunction)(PyObject *); +PyCFunction PyCFunction_GetFunction(PyObject *); +PyObject * PyCFunction_GetSelf(PyObject *); +int PyCFunction_GetFlags(PyObject *); +PyObject * PyCFunction_Call(PyObject *, PyObject *, PyObject *); +struct PyMethodDef { + const char *ml_name; + PyCFunction ml_meth; + int ml_flags; + const char *ml_doc; +}; +typedef struct PyMethodDef PyMethodDef; +PyObject * Py_FindMethod(PyMethodDef[], PyObject *, const char *); +PyObject * PyCFunction_NewEx(PyMethodDef *, PyObject *, + PyObject *); +typedef struct PyMethodChain { + PyMethodDef *methods; + struct PyMethodChain *link; +} PyMethodChain; +PyObject * Py_FindMethodInChain(PyMethodChain *, PyObject *, + const char *); +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyMethodDef *m_ml; + PyObject *m_self; + PyObject *m_module; +} PyCFunctionObject; +int PyCFunction_ClearFreeList(void); +} +extern "C" { +extern PyTypeObject PyModule_Type; +PyObject * PyModule_New(const char *); +PyObject * PyModule_GetDict(PyObject *); +char * PyModule_GetName(PyObject *); +char * PyModule_GetFilename(PyObject *); +void _PyModule_Clear(PyObject *); +} +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *func_code; + PyObject *func_globals; + PyObject *func_defaults; + PyObject *func_closure; + PyObject *func_doc; + PyObject *func_name; + PyObject *func_dict; + PyObject *func_weakreflist; + PyObject *func_module; +} PyFunctionObject; +extern PyTypeObject PyFunction_Type; +PyObject * PyFunction_New(PyObject *, PyObject *); +PyObject * PyFunction_GetCode(PyObject *); +PyObject * PyFunction_GetGlobals(PyObject *); +PyObject * PyFunction_GetModule(PyObject *); +PyObject * PyFunction_GetDefaults(PyObject *); +int PyFunction_SetDefaults(PyObject *, PyObject *); +PyObject * PyFunction_GetClosure(PyObject *); +int PyFunction_SetClosure(PyObject *, PyObject *); +extern PyTypeObject PyClassMethod_Type; +extern PyTypeObject PyStaticMethod_Type; +PyObject * PyClassMethod_New(PyObject *); +PyObject * PyStaticMethod_New(PyObject *); +} +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *cl_bases; + PyObject *cl_dict; + PyObject *cl_name; + PyObject *cl_getattr; + PyObject *cl_setattr; + PyObject *cl_delattr; +} PyClassObject; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyClassObject *in_class; + PyObject *in_dict; + PyObject *in_weakreflist; +} PyInstanceObject; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *im_func; + PyObject *im_self; + PyObject *im_class; + PyObject *im_weakreflist; +} PyMethodObject; +extern PyTypeObject PyClass_Type, PyInstance_Type, PyMethod_Type; +PyObject * PyClass_New(PyObject *, PyObject *, PyObject *); +PyObject * PyInstance_New(PyObject *, PyObject *, + PyObject *); +PyObject * PyInstance_NewRaw(PyObject *, PyObject *); +PyObject * PyMethod_New(PyObject *, PyObject *, PyObject *); +PyObject * PyMethod_Function(PyObject *); +PyObject * PyMethod_Self(PyObject *); +PyObject * PyMethod_Class(PyObject *); +PyObject * _PyInstance_Lookup(PyObject *pinst, PyObject *name); +int PyClass_IsSubclass(PyObject *, PyObject *); +int PyMethod_ClearFreeList(void); +} +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + FILE *f_fp; + PyObject *f_name; + PyObject *f_mode; + int (*f_close)(FILE *); + int f_softspace; + int f_binary; + char* f_buf; + char* f_bufend; + char* f_bufptr; + char *f_setbuf; + int f_univ_newline; + int f_newlinetypes; + int f_skipnextlf; + PyObject *f_encoding; + PyObject *f_errors; + PyObject *weakreflist; + int unlocked_count; + int readable; + int writable; +} PyFileObject; +extern PyTypeObject PyFile_Type; +PyObject * PyFile_FromString(char *, char *); +void PyFile_SetBufSize(PyObject *, int); +int PyFile_SetEncoding(PyObject *, const char *); +int PyFile_SetEncodingAndErrors(PyObject *, const char *, char *errors); +PyObject * PyFile_FromFile(FILE *, char *, char *, + int (*)(FILE *)); +FILE * PyFile_AsFile(PyObject *); +void PyFile_IncUseCount(PyFileObject *); +void PyFile_DecUseCount(PyFileObject *); +PyObject * PyFile_Name(PyObject *); +PyObject * PyFile_GetLine(PyObject *, int); +int PyFile_WriteObject(PyObject *, PyObject *, int); +int PyFile_SoftSpace(PyObject *, int); +int PyFile_WriteString(const char *, PyObject *); +int PyObject_AsFileDescriptor(PyObject *); +extern const char * Py_FileSystemDefaultEncoding; +char *Py_UniversalNewlineFgets(char *, int, FILE*, PyObject *); +size_t Py_UniversalNewlineFread(char *, size_t, FILE *, PyObject *); +int _PyFile_SanitizeMode(char *mode); +} +extern "C" { +extern PyTypeObject PyCObject_Type; +PyObject * PyCObject_FromVoidPtr( + void *cobj, void (*destruct)(void*)); +PyObject * PyCObject_FromVoidPtrAndDesc( + void *cobj, void *desc, void (*destruct)(void*,void*)); +void * PyCObject_AsVoidPtr(PyObject *); +void * PyCObject_GetDesc(PyObject *); +void * PyCObject_Import(char *module_name, char *cobject_name); +int PyCObject_SetVoidPtr(PyObject *self, void *cobj); +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + void *cobject; + void *desc; + void (*destructor)(void *); +} PyCObject; +} +extern "C" { +struct _frame; +typedef struct _traceback { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + struct _traceback *tb_next; + struct _frame *tb_frame; + int tb_lasti; + int tb_lineno; +} PyTracebackObject; +int PyTraceBack_Here(struct _frame *); +int PyTraceBack_Print(PyObject *, PyObject *); +int _Py_DisplaySourceLine(PyObject *, const char *, int, int); +extern PyTypeObject PyTraceBack_Type; +} +extern "C" { +extern PyObject _Py_EllipsisObject; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *start, *stop, *step; +} PySliceObject; +extern PyTypeObject PySlice_Type; +extern PyTypeObject PyEllipsis_Type; +PyObject * PySlice_New(PyObject* start, PyObject* stop, + PyObject* step); +PyObject * _PySlice_FromIndices(Py_ssize_t start, Py_ssize_t stop); +int PySlice_GetIndices(PySliceObject *r, Py_ssize_t length, + Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step); +int PySlice_GetIndicesEx(PySliceObject *r, Py_ssize_t length, + Py_ssize_t *start, Py_ssize_t *stop, + Py_ssize_t *step, Py_ssize_t *slicelength); +} +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *ob_ref; +} PyCellObject; +extern PyTypeObject PyCell_Type; +PyObject * PyCell_New(PyObject *); +PyObject * PyCell_Get(PyObject *); +int PyCell_Set(PyObject *, PyObject *); +} +extern "C" { +extern PyTypeObject PySeqIter_Type; +PyObject * PySeqIter_New(PyObject *); +extern PyTypeObject PyCallIter_Type; +PyObject * PyCallIter_New(PyObject *, PyObject *); +} +extern "C" { +struct _frame; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + struct _frame *gi_frame; + int gi_running; + PyObject *gi_code; + PyObject *gi_weakreflist; +} PyGenObject; +extern PyTypeObject PyGen_Type; +PyObject * PyGen_New(struct _frame *); +int PyGen_NeedsFinalizing(PyGenObject *); +} +extern "C" { +typedef PyObject *(*getter)(PyObject *, void *); +typedef int (*setter)(PyObject *, PyObject *, void *); +typedef struct PyGetSetDef { + char *name; + getter get; + setter set; + char *doc; + void *closure; +} PyGetSetDef; +typedef PyObject *(*wrapperfunc)(PyObject *self, PyObject *args, + void *wrapped); +typedef PyObject *(*wrapperfunc_kwds)(PyObject *self, PyObject *args, + void *wrapped, PyObject *kwds); +struct wrapperbase { + char *name; + int offset; + void *function; + wrapperfunc wrapper; + char *doc; + int flags; + PyObject *name_strobj; +}; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; PyTypeObject *d_type; PyObject *d_name; +} PyDescrObject; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; PyTypeObject *d_type; PyObject *d_name; + PyMethodDef *d_method; +} PyMethodDescrObject; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; PyTypeObject *d_type; PyObject *d_name; + struct PyMemberDef *d_member; +} PyMemberDescrObject; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; PyTypeObject *d_type; PyObject *d_name; + PyGetSetDef *d_getset; +} PyGetSetDescrObject; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; PyTypeObject *d_type; PyObject *d_name; + struct wrapperbase *d_base; + void *d_wrapped; +} PyWrapperDescrObject; +extern PyTypeObject PyWrapperDescr_Type; +extern PyTypeObject PyDictProxy_Type; +extern PyTypeObject PyGetSetDescr_Type; +extern PyTypeObject PyMemberDescr_Type; +PyObject * PyDescr_NewMethod(PyTypeObject *, PyMethodDef *); +PyObject * PyDescr_NewClassMethod(PyTypeObject *, PyMethodDef *); +PyObject * PyDescr_NewMember(PyTypeObject *, + struct PyMemberDef *); +PyObject * PyDescr_NewGetSet(PyTypeObject *, + struct PyGetSetDef *); +PyObject * PyDescr_NewWrapper(PyTypeObject *, + struct wrapperbase *, void *); +PyObject * PyDictProxy_New(PyObject *); +PyObject * PyWrapper_New(PyObject *, PyObject *); +extern PyTypeObject PyProperty_Type; +} +extern "C" { +void _PyWarnings_Init(void); +int PyErr_WarnEx(PyObject *, const char *, Py_ssize_t); +int PyErr_WarnExplicit(PyObject *, const char *, const char *, int, + const char *, PyObject *); +} +extern "C" { +typedef struct _PyWeakReference PyWeakReference; +struct _PyWeakReference { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *wr_object; + PyObject *wr_callback; + long hash; + PyWeakReference *wr_prev; + PyWeakReference *wr_next; +}; +extern PyTypeObject _PyWeakref_RefType; +extern PyTypeObject _PyWeakref_ProxyType; +extern PyTypeObject _PyWeakref_CallableProxyType; +PyObject * PyWeakref_NewRef(PyObject *ob, + PyObject *callback); +PyObject * PyWeakref_NewProxy(PyObject *ob, + PyObject *callback); +PyObject * PyWeakref_GetObject(PyObject *ref); +Py_ssize_t _PyWeakref_GetWeakrefCount(PyWeakReference *head); +void _PyWeakref_ClearRef(PyWeakReference *self); +} +extern "C" { +int PyCodec_Register( + PyObject *search_function + ); +PyObject * _PyCodec_Lookup( + const char *encoding + ); +PyObject * PyCodec_Encode( + PyObject *object, + const char *encoding, + const char *errors + ); +PyObject * PyCodec_Decode( + PyObject *object, + const char *encoding, + const char *errors + ); +PyObject * PyCodec_Encoder( + const char *encoding + ); +PyObject * PyCodec_Decoder( + const char *encoding + ); +PyObject * PyCodec_IncrementalEncoder( + const char *encoding, + const char *errors + ); +PyObject * PyCodec_IncrementalDecoder( + const char *encoding, + const char *errors + ); +PyObject * PyCodec_StreamReader( + const char *encoding, + PyObject *stream, + const char *errors + ); +PyObject * PyCodec_StreamWriter( + const char *encoding, + PyObject *stream, + const char *errors + ); +int PyCodec_RegisterError(const char *name, PyObject *error); +PyObject * PyCodec_LookupError(const char *name); +PyObject * PyCodec_StrictErrors(PyObject *exc); +PyObject * PyCodec_IgnoreErrors(PyObject *exc); +PyObject * PyCodec_ReplaceErrors(PyObject *exc); +PyObject * PyCodec_XMLCharRefReplaceErrors(PyObject *exc); +PyObject * PyCodec_BackslashReplaceErrors(PyObject *exc); +} +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *dict; + PyObject *args; + PyObject *message; +} PyBaseExceptionObject; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *dict; + PyObject *args; + PyObject *message; + PyObject *msg; + PyObject *filename; + PyObject *lineno; + PyObject *offset; + PyObject *text; + PyObject *print_file_and_line; +} PySyntaxErrorObject; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *dict; + PyObject *args; + PyObject *message; + PyObject *encoding; + PyObject *object; + Py_ssize_t start; + Py_ssize_t end; + PyObject *reason; +} PyUnicodeErrorObject; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *dict; + PyObject *args; + PyObject *message; + PyObject *code; +} PySystemExitObject; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *dict; + PyObject *args; + PyObject *message; + PyObject *myerrno; + PyObject *strerror; + PyObject *filename; +} PyEnvironmentErrorObject; +void PyErr_SetNone(PyObject *); +void PyErr_SetObject(PyObject *, PyObject *); +void PyErr_SetString(PyObject *, const char *); +PyObject * PyErr_Occurred(void); +void PyErr_Clear(void); +void PyErr_Fetch(PyObject **, PyObject **, PyObject **); +void PyErr_Restore(PyObject *, PyObject *, PyObject *); +int PyErr_GivenExceptionMatches(PyObject *, PyObject *); +int PyErr_ExceptionMatches(PyObject *); +void PyErr_NormalizeException(PyObject**, PyObject**, PyObject**); +extern PyObject * PyExc_BaseException; +extern PyObject * PyExc_Exception; +extern PyObject * PyExc_StopIteration; +extern PyObject * PyExc_GeneratorExit; +extern PyObject * PyExc_StandardError; +extern PyObject * PyExc_ArithmeticError; +extern PyObject * PyExc_LookupError; +extern PyObject * PyExc_AssertionError; +extern PyObject * PyExc_AttributeError; +extern PyObject * PyExc_EOFError; +extern PyObject * PyExc_FloatingPointError; +extern PyObject * PyExc_EnvironmentError; +extern PyObject * PyExc_IOError; +extern PyObject * PyExc_OSError; +extern PyObject * PyExc_ImportError; +extern PyObject * PyExc_IndexError; +extern PyObject * PyExc_KeyError; +extern PyObject * PyExc_KeyboardInterrupt; +extern PyObject * PyExc_MemoryError; +extern PyObject * PyExc_NameError; +extern PyObject * PyExc_OverflowError; +extern PyObject * PyExc_RuntimeError; +extern PyObject * PyExc_NotImplementedError; +extern PyObject * PyExc_SyntaxError; +extern PyObject * PyExc_IndentationError; +extern PyObject * PyExc_TabError; +extern PyObject * PyExc_ReferenceError; +extern PyObject * PyExc_SystemError; +extern PyObject * PyExc_SystemExit; +extern PyObject * PyExc_TypeError; +extern PyObject * PyExc_UnboundLocalError; +extern PyObject * PyExc_UnicodeError; +extern PyObject * PyExc_UnicodeEncodeError; +extern PyObject * PyExc_UnicodeDecodeError; +extern PyObject * PyExc_UnicodeTranslateError; +extern PyObject * PyExc_ValueError; +extern PyObject * PyExc_ZeroDivisionError; +extern PyObject * PyExc_BufferError; +extern PyObject * PyExc_MemoryErrorInst; +extern PyObject * PyExc_RecursionErrorInst; +extern PyObject * PyExc_Warning; +extern PyObject * PyExc_UserWarning; +extern PyObject * PyExc_DeprecationWarning; +extern PyObject * PyExc_PendingDeprecationWarning; +extern PyObject * PyExc_SyntaxWarning; +extern PyObject * PyExc_RuntimeWarning; +extern PyObject * PyExc_FutureWarning; +extern PyObject * PyExc_ImportWarning; +extern PyObject * PyExc_UnicodeWarning; +extern PyObject * PyExc_BytesWarning; +int PyErr_BadArgument(void); +PyObject * PyErr_NoMemory(void); +PyObject * PyErr_SetFromErrno(PyObject *); +PyObject * PyErr_SetFromErrnoWithFilenameObject( + PyObject *, PyObject *); +PyObject * PyErr_SetFromErrnoWithFilename(PyObject *, char *); +PyObject * PyErr_Format(PyObject *, const char *, ...) + __attribute__((format(printf, 2, 3))); +void PyErr_BadInternalCall(void); +void _PyErr_BadInternalCall(char *filename, int lineno); +PyObject * PyErr_NewException(char *name, PyObject *base, + PyObject *dict); +void PyErr_WriteUnraisable(PyObject *); +int PyErr_CheckSignals(void); +void PyErr_SetInterrupt(void); +int PySignal_SetWakeupFd(int fd); +void PyErr_SyntaxLocation(const char *, int); +PyObject * PyErr_ProgramText(const char *, int); +PyObject * PyUnicodeDecodeError_Create( + const char *, const char *, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char *); +PyObject * PyUnicodeEncodeError_Create( + const char *, const Py_UNICODE *, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char *); +PyObject * PyUnicodeTranslateError_Create( + const Py_UNICODE *, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char *); +PyObject * PyUnicodeEncodeError_GetEncoding(PyObject *); +PyObject * PyUnicodeDecodeError_GetEncoding(PyObject *); +PyObject * PyUnicodeEncodeError_GetObject(PyObject *); +PyObject * PyUnicodeDecodeError_GetObject(PyObject *); +PyObject * PyUnicodeTranslateError_GetObject(PyObject *); +int PyUnicodeEncodeError_GetStart(PyObject *, Py_ssize_t *); +int PyUnicodeDecodeError_GetStart(PyObject *, Py_ssize_t *); +int PyUnicodeTranslateError_GetStart(PyObject *, Py_ssize_t *); +int PyUnicodeEncodeError_SetStart(PyObject *, Py_ssize_t); +int PyUnicodeDecodeError_SetStart(PyObject *, Py_ssize_t); +int PyUnicodeTranslateError_SetStart(PyObject *, Py_ssize_t); +int PyUnicodeEncodeError_GetEnd(PyObject *, Py_ssize_t *); +int PyUnicodeDecodeError_GetEnd(PyObject *, Py_ssize_t *); +int PyUnicodeTranslateError_GetEnd(PyObject *, Py_ssize_t *); +int PyUnicodeEncodeError_SetEnd(PyObject *, Py_ssize_t); +int PyUnicodeDecodeError_SetEnd(PyObject *, Py_ssize_t); +int PyUnicodeTranslateError_SetEnd(PyObject *, Py_ssize_t); +PyObject * PyUnicodeEncodeError_GetReason(PyObject *); +PyObject * PyUnicodeDecodeError_GetReason(PyObject *); +PyObject * PyUnicodeTranslateError_GetReason(PyObject *); +int PyUnicodeEncodeError_SetReason( + PyObject *, const char *); +int PyUnicodeDecodeError_SetReason( + PyObject *, const char *); +int PyUnicodeTranslateError_SetReason( + PyObject *, const char *); +int PyOS_snprintf(char *str, size_t size, const char *format, ...) + __attribute__((format(printf, 3, 4))); +int PyOS_vsnprintf(char *str, size_t size, const char *format, va_list va) + __attribute__((format(printf, 3, 0))); +} +extern "C" { +struct _ts; +struct _is; +typedef struct _is { + struct _is *next; + struct _ts *tstate_head; + PyObject *modules; + PyObject *sysdict; + PyObject *builtins; + PyObject *modules_reloading; + PyObject *codec_search_path; + PyObject *codec_search_cache; + PyObject *codec_error_registry; + int dlopenflags; +} PyInterpreterState; +struct _frame; +typedef int (*Py_tracefunc)(PyObject *, struct _frame *, int, PyObject *); +typedef struct _ts { + struct _ts *next; + PyInterpreterState *interp; + struct _frame *frame; + int recursion_depth; + int tracing; + int use_tracing; + Py_tracefunc c_profilefunc; + Py_tracefunc c_tracefunc; + PyObject *c_profileobj; + PyObject *c_traceobj; + PyObject *curexc_type; + PyObject *curexc_value; + PyObject *curexc_traceback; + PyObject *exc_type; + PyObject *exc_value; + PyObject *exc_traceback; + PyObject *dict; + int tick_counter; + int gilstate_counter; + PyObject *async_exc; + long thread_id; +} PyThreadState; +PyInterpreterState * PyInterpreterState_New(void); +void PyInterpreterState_Clear(PyInterpreterState *); +void PyInterpreterState_Delete(PyInterpreterState *); +PyThreadState * PyThreadState_New(PyInterpreterState *); +PyThreadState * _PyThreadState_Prealloc(PyInterpreterState *); +void _PyThreadState_Init(PyThreadState *); +void PyThreadState_Clear(PyThreadState *); +void PyThreadState_Delete(PyThreadState *); +void PyThreadState_DeleteCurrent(void); +PyThreadState * PyThreadState_Get(void); +PyThreadState * PyThreadState_Swap(PyThreadState *); +PyObject * PyThreadState_GetDict(void); +int PyThreadState_SetAsyncExc(long, PyObject *); +extern PyThreadState * _PyThreadState_Current; +typedef + enum {PyGILState_LOCKED, PyGILState_UNLOCKED} + PyGILState_STATE; +PyGILState_STATE PyGILState_Ensure(void); +void PyGILState_Release(PyGILState_STATE); +PyThreadState * PyGILState_GetThisThreadState(void); +PyObject * _PyThread_CurrentFrames(void); +PyInterpreterState * PyInterpreterState_Head(void); +PyInterpreterState * PyInterpreterState_Next(PyInterpreterState *); +PyThreadState * PyInterpreterState_ThreadHead(PyInterpreterState *); +PyThreadState * PyThreadState_Next(PyThreadState *); +typedef struct _frame *(*PyThreadFrameGetter)(PyThreadState *self_); +extern PyThreadFrameGetter _PyThreadState_GetFrame; +} +extern "C" { + typedef struct _arena PyArena; + PyArena * PyArena_New(void); + void PyArena_Free(PyArena *); + void * PyArena_Malloc(PyArena *, size_t size); + int PyArena_AddPyObject(PyArena *, PyObject *); +} +extern "C" { +PyObject * _Py_VaBuildValue_SizeT(const char *, va_list); +int PyArg_Parse(PyObject *, const char *, ...); +int PyArg_ParseTuple(PyObject *, const char *, ...) ; +int PyArg_ParseTupleAndKeywords(PyObject *, PyObject *, + const char *, char **, ...); +int PyArg_UnpackTuple(PyObject *, const char *, Py_ssize_t, Py_ssize_t, ...); +PyObject * Py_BuildValue(const char *, ...); +PyObject * _Py_BuildValue_SizeT(const char *, ...); +int _PyArg_NoKeywords(const char *funcname, PyObject *kw); +int PyArg_VaParse(PyObject *, const char *, va_list); +int PyArg_VaParseTupleAndKeywords(PyObject *, PyObject *, + const char *, char **, va_list); +PyObject * Py_VaBuildValue(const char *, va_list); +int PyModule_AddObject(PyObject *, const char *, PyObject *); +int PyModule_AddIntConstant(PyObject *, const char *, long); +int PyModule_AddStringConstant(PyObject *, const char *, const char *); +PyObject * Py_InitModule4_64(const char *name, PyMethodDef *methods, + const char *doc, PyObject *self, + int apiver); +extern char * _Py_PackageContext; +} +extern "C" { +typedef struct { + int cf_flags; +} PyCompilerFlags; +void Py_SetProgramName(char *); +char * Py_GetProgramName(void); +void Py_SetPythonHome(char *); +char * Py_GetPythonHome(void); +void Py_Initialize(void); +void Py_InitializeEx(int); +void Py_Finalize(void); +int Py_IsInitialized(void); +PyThreadState * Py_NewInterpreter(void); +void Py_EndInterpreter(PyThreadState *); +int PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *); +int PyRun_AnyFileExFlags(FILE *, const char *, int, PyCompilerFlags *); +int PyRun_SimpleStringFlags(const char *, PyCompilerFlags *); +int PyRun_SimpleFileExFlags(FILE *, const char *, int, PyCompilerFlags *); +int PyRun_InteractiveOneFlags(FILE *, const char *, PyCompilerFlags *); +int PyRun_InteractiveLoopFlags(FILE *, const char *, PyCompilerFlags *); +struct _mod * PyParser_ASTFromString(const char *, const char *, + int, PyCompilerFlags *flags, + PyArena *); +struct _mod * PyParser_ASTFromFile(FILE *, const char *, int, + char *, char *, + PyCompilerFlags *, int *, + PyArena *); +struct _node * PyParser_SimpleParseStringFlags(const char *, int, + int); +struct _node * PyParser_SimpleParseFileFlags(FILE *, const char *, + int, int); +PyObject * PyRun_StringFlags(const char *, int, PyObject *, + PyObject *, PyCompilerFlags *); +PyObject * PyRun_FileExFlags(FILE *, const char *, int, + PyObject *, PyObject *, int, + PyCompilerFlags *); +PyObject * Py_CompileStringFlags(const char *, const char *, int, + PyCompilerFlags *); +struct symtable * Py_SymtableString(const char *, const char *, int); +void PyErr_Print(void); +void PyErr_PrintEx(int); +void PyErr_Display(PyObject *, PyObject *, PyObject *); +int Py_AtExit(void (*func)(void)); +void Py_Exit(int); +int Py_FdIsInteractive(FILE *, const char *); +int Py_Main(int argc, char **argv); +char * Py_GetProgramFullPath(void); +char * Py_GetPrefix(void); +char * Py_GetExecPrefix(void); +char * Py_GetPath(void); +const char * Py_GetVersion(void); +const char * Py_GetPlatform(void); +const char * Py_GetCopyright(void); +const char * Py_GetCompiler(void); +const char * Py_GetBuildInfo(void); +const char * _Py_svnversion(void); +const char * Py_SubversionRevision(void); +const char * Py_SubversionShortBranch(void); +PyObject * _PyBuiltin_Init(void); +PyObject * _PySys_Init(void); +void _PyImport_Init(void); +void _PyExc_Init(void); +void _PyImportHooks_Init(void); +int _PyFrame_Init(void); +int _PyInt_Init(void); +void _PyFloat_Init(void); +int PyByteArray_Init(void); +void _PyExc_Fini(void); +void _PyImport_Fini(void); +void PyMethod_Fini(void); +void PyFrame_Fini(void); +void PyCFunction_Fini(void); +void PyDict_Fini(void); +void PyTuple_Fini(void); +void PyList_Fini(void); +void PySet_Fini(void); +void PyString_Fini(void); +void PyInt_Fini(void); +void PyFloat_Fini(void); +void PyOS_FiniInterrupts(void); +void PyByteArray_Fini(void); +char * PyOS_Readline(FILE *, FILE *, char *); +extern int (*PyOS_InputHook)(void); +extern char *(*PyOS_ReadlineFunctionPointer)(FILE *, FILE *, char *); +extern PyThreadState* _PyOS_ReadlineTState; +typedef void (*PyOS_sighandler_t)(int); +PyOS_sighandler_t PyOS_getsig(int); +PyOS_sighandler_t PyOS_setsig(int, PyOS_sighandler_t); +} +extern "C" { +PyObject * PyEval_CallObjectWithKeywords( + PyObject *, PyObject *, PyObject *); +PyObject * PyEval_CallObject(PyObject *, PyObject *); +PyObject * PyEval_CallFunction(PyObject *obj, + const char *format, ...); +PyObject * PyEval_CallMethod(PyObject *obj, + const char *methodname, + const char *format, ...); +void PyEval_SetProfile(Py_tracefunc, PyObject *); +void PyEval_SetTrace(Py_tracefunc, PyObject *); +struct _frame; +PyObject * PyEval_GetBuiltins(void); +PyObject * PyEval_GetGlobals(void); +PyObject * PyEval_GetLocals(void); +struct _frame * PyEval_GetFrame(void); +int PyEval_GetRestricted(void); +int PyEval_MergeCompilerFlags(PyCompilerFlags *cf); +int Py_FlushLine(void); +int Py_AddPendingCall(int (*func)(void *), void *arg); +int Py_MakePendingCalls(void); +void Py_SetRecursionLimit(int); +int Py_GetRecursionLimit(void); +int _Py_CheckRecursiveCall(char *where); +extern int _Py_CheckRecursionLimit; +const char * PyEval_GetFuncName(PyObject *); +const char * PyEval_GetFuncDesc(PyObject *); +PyObject * PyEval_GetCallStats(PyObject *); +PyObject * PyEval_EvalFrame(struct _frame *); +PyObject * PyEval_EvalFrameEx(struct _frame *f, int exc); +extern volatile int _Py_Ticker; +extern int _Py_CheckInterval; +PyThreadState * PyEval_SaveThread(void); +void PyEval_RestoreThread(PyThreadState *); +int PyEval_ThreadsInitialized(void); +void PyEval_InitThreads(void); +void PyEval_AcquireLock(void); +void PyEval_ReleaseLock(void); +void PyEval_AcquireThread(PyThreadState *tstate); +void PyEval_ReleaseThread(PyThreadState *tstate); +void PyEval_ReInitThreads(void); +int _PyEval_SliceIndex(PyObject *, Py_ssize_t *); +} +extern "C" { +PyObject * PySys_GetObject(char *); +int PySys_SetObject(char *, PyObject *); +FILE * PySys_GetFile(char *, FILE *); +void PySys_SetArgv(int, char **); +void PySys_SetPath(char *); +void PySys_WriteStdout(const char *format, ...) + __attribute__((format(printf, 1, 2))); +void PySys_WriteStderr(const char *format, ...) + __attribute__((format(printf, 1, 2))); +extern PyObject * _PySys_TraceFunc, *_PySys_ProfileFunc; +extern int _PySys_CheckInterval; +void PySys_ResetWarnOptions(void); +void PySys_AddWarnOption(char *); +int PySys_HasWarnOptions(void); +} +extern "C" { +int PyOS_InterruptOccurred(void); +void PyOS_InitInterrupts(void); +void PyOS_AfterFork(void); +} +extern "C" { +long PyImport_GetMagicNumber(void); +PyObject * PyImport_ExecCodeModule(char *name, PyObject *co); +PyObject * PyImport_ExecCodeModuleEx( + char *name, PyObject *co, char *pathname); +PyObject * PyImport_GetModuleDict(void); +PyObject * PyImport_AddModule(const char *name); +PyObject * PyImport_ImportModule(const char *name); +PyObject * PyImport_ImportModuleNoBlock(const char *); +PyObject * PyImport_ImportModuleLevel(char *name, + PyObject *globals, PyObject *locals, PyObject *fromlist, int level); +PyObject * PyImport_GetImporter(PyObject *path); +PyObject * PyImport_Import(PyObject *name); +PyObject * PyImport_ReloadModule(PyObject *m); +void PyImport_Cleanup(void); +int PyImport_ImportFrozenModule(char *); +void _PyImport_AcquireLock(void); +int _PyImport_ReleaseLock(void); +struct filedescr * _PyImport_FindModule( + const char *, PyObject *, char *, size_t, FILE **, PyObject **); +int _PyImport_IsScript(struct filedescr *); +void _PyImport_ReInitLock(void); +PyObject *_PyImport_FindExtension(char *, char *); +PyObject *_PyImport_FixupExtension(char *, char *); +struct _inittab { + char *name; + void (*initfunc)(void); +}; +extern PyTypeObject PyNullImporter_Type; +extern struct _inittab * PyImport_Inittab; +int PyImport_AppendInittab(char *name, void (*initfunc)(void)); +int PyImport_ExtendInittab(struct _inittab *newtab); +struct _frozen { + char *name; + unsigned char *code; + int size; +}; +extern struct _frozen * PyImport_FrozenModules; +} +extern "C" { + int PyObject_Cmp(PyObject *o1, PyObject *o2, int *result); + PyObject * PyObject_Call(PyObject *callable_object, + PyObject *args, PyObject *kw); + PyObject * PyObject_CallObject(PyObject *callable_object, + PyObject *args); + PyObject * PyObject_CallFunction(PyObject *callable_object, + char *format, ...); + PyObject * PyObject_CallMethod(PyObject *o, char *m, + char *format, ...); + PyObject * _PyObject_CallFunction_SizeT(PyObject *callable, + char *format, ...); + PyObject * _PyObject_CallMethod_SizeT(PyObject *o, + char *name, + char *format, ...); + PyObject * PyObject_CallFunctionObjArgs(PyObject *callable, + ...); + PyObject * PyObject_CallMethodObjArgs(PyObject *o, + PyObject *m, ...); + PyObject * PyObject_Type(PyObject *o); + Py_ssize_t PyObject_Size(PyObject *o); + Py_ssize_t PyObject_Length(PyObject *o); + Py_ssize_t _PyObject_LengthHint(PyObject *o, Py_ssize_t); + PyObject * PyObject_GetItem(PyObject *o, PyObject *key); + int PyObject_SetItem(PyObject *o, PyObject *key, PyObject *v); + int PyObject_DelItemString(PyObject *o, char *key); + int PyObject_DelItem(PyObject *o, PyObject *key); + int PyObject_AsCharBuffer(PyObject *obj, + const char **buffer, + Py_ssize_t *buffer_len); + int PyObject_CheckReadBuffer(PyObject *obj); + int PyObject_AsReadBuffer(PyObject *obj, + const void **buffer, + Py_ssize_t *buffer_len); + int PyObject_AsWriteBuffer(PyObject *obj, + void **buffer, + Py_ssize_t *buffer_len); + int PyObject_GetBuffer(PyObject *obj, Py_buffer *view, + int flags); + void * PyBuffer_GetPointer(Py_buffer *view, Py_ssize_t *indices); + int PyBuffer_SizeFromFormat(const char *); + int PyBuffer_ToContiguous(void *buf, Py_buffer *view, + Py_ssize_t len, char fort); + int PyBuffer_FromContiguous(Py_buffer *view, void *buf, + Py_ssize_t len, char fort); + int PyObject_CopyData(PyObject *dest, PyObject *src); + int PyBuffer_IsContiguous(Py_buffer *view, char fort); + void PyBuffer_FillContiguousStrides(int ndims, + Py_ssize_t *shape, + Py_ssize_t *strides, + int itemsize, + char fort); + int PyBuffer_FillInfo(Py_buffer *view, PyObject *o, void *buf, + Py_ssize_t len, int readonly, + int flags); + void PyBuffer_Release(Py_buffer *view); + PyObject * PyObject_Format(PyObject* obj, + PyObject *format_spec); + PyObject * PyObject_GetIter(PyObject *); + PyObject * PyIter_Next(PyObject *); + int PyNumber_Check(PyObject *o); + PyObject * PyNumber_Add(PyObject *o1, PyObject *o2); + PyObject * PyNumber_Subtract(PyObject *o1, PyObject *o2); + PyObject * PyNumber_Multiply(PyObject *o1, PyObject *o2); + PyObject * PyNumber_Divide(PyObject *o1, PyObject *o2); + PyObject * PyNumber_FloorDivide(PyObject *o1, PyObject *o2); + PyObject * PyNumber_TrueDivide(PyObject *o1, PyObject *o2); + PyObject * PyNumber_Remainder(PyObject *o1, PyObject *o2); + PyObject * PyNumber_Divmod(PyObject *o1, PyObject *o2); + PyObject * PyNumber_Power(PyObject *o1, PyObject *o2, + PyObject *o3); + PyObject * PyNumber_Negative(PyObject *o); + PyObject * PyNumber_Positive(PyObject *o); + PyObject * PyNumber_Absolute(PyObject *o); + PyObject * PyNumber_Invert(PyObject *o); + PyObject * PyNumber_Lshift(PyObject *o1, PyObject *o2); + PyObject * PyNumber_Rshift(PyObject *o1, PyObject *o2); + PyObject * PyNumber_And(PyObject *o1, PyObject *o2); + PyObject * PyNumber_Xor(PyObject *o1, PyObject *o2); + PyObject * PyNumber_Or(PyObject *o1, PyObject *o2); + PyObject * PyNumber_Index(PyObject *o); + Py_ssize_t PyNumber_AsSsize_t(PyObject *o, PyObject *exc); + PyObject * _PyNumber_ConvertIntegralToInt( + PyObject *integral, + const char* error_format); + PyObject * PyNumber_Int(PyObject *o); + PyObject * PyNumber_Long(PyObject *o); + PyObject * PyNumber_Float(PyObject *o); + PyObject * PyNumber_InPlaceAdd(PyObject *o1, PyObject *o2); + PyObject * PyNumber_InPlaceSubtract(PyObject *o1, PyObject *o2); + PyObject * PyNumber_InPlaceMultiply(PyObject *o1, PyObject *o2); + PyObject * PyNumber_InPlaceDivide(PyObject *o1, PyObject *o2); + PyObject * PyNumber_InPlaceFloorDivide(PyObject *o1, + PyObject *o2); + PyObject * PyNumber_InPlaceTrueDivide(PyObject *o1, + PyObject *o2); + PyObject * PyNumber_InPlaceRemainder(PyObject *o1, PyObject *o2); + PyObject * PyNumber_InPlacePower(PyObject *o1, PyObject *o2, + PyObject *o3); + PyObject * PyNumber_InPlaceLshift(PyObject *o1, PyObject *o2); + PyObject * PyNumber_InPlaceRshift(PyObject *o1, PyObject *o2); + PyObject * PyNumber_InPlaceAnd(PyObject *o1, PyObject *o2); + PyObject * PyNumber_InPlaceXor(PyObject *o1, PyObject *o2); + PyObject * PyNumber_InPlaceOr(PyObject *o1, PyObject *o2); + PyObject * PyNumber_ToBase(PyObject *n, int base); + int PySequence_Check(PyObject *o); + Py_ssize_t PySequence_Size(PyObject *o); + Py_ssize_t PySequence_Length(PyObject *o); + PyObject * PySequence_Concat(PyObject *o1, PyObject *o2); + PyObject * PySequence_Repeat(PyObject *o, Py_ssize_t count); + PyObject * PySequence_GetItem(PyObject *o, Py_ssize_t i); + PyObject * PySequence_GetSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2); + int PySequence_SetItem(PyObject *o, Py_ssize_t i, PyObject *v); + int PySequence_DelItem(PyObject *o, Py_ssize_t i); + int PySequence_SetSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2, + PyObject *v); + int PySequence_DelSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2); + PyObject * PySequence_Tuple(PyObject *o); + PyObject * PySequence_List(PyObject *o); + PyObject * PySequence_Fast(PyObject *o, const char* m); + Py_ssize_t PySequence_Count(PyObject *o, PyObject *value); + int PySequence_Contains(PyObject *seq, PyObject *ob); + Py_ssize_t _PySequence_IterSearch(PyObject *seq, + PyObject *obj, int operation); + int PySequence_In(PyObject *o, PyObject *value); + Py_ssize_t PySequence_Index(PyObject *o, PyObject *value); + PyObject * PySequence_InPlaceConcat(PyObject *o1, PyObject *o2); + PyObject * PySequence_InPlaceRepeat(PyObject *o, Py_ssize_t count); + int PyMapping_Check(PyObject *o); + Py_ssize_t PyMapping_Size(PyObject *o); + Py_ssize_t PyMapping_Length(PyObject *o); + int PyMapping_HasKeyString(PyObject *o, char *key); + int PyMapping_HasKey(PyObject *o, PyObject *key); + PyObject * PyMapping_GetItemString(PyObject *o, char *key); + int PyMapping_SetItemString(PyObject *o, char *key, + PyObject *value); +int PyObject_IsInstance(PyObject *object, PyObject *typeorclass); +int PyObject_IsSubclass(PyObject *object, PyObject *typeorclass); +int _PyObject_RealIsInstance(PyObject *inst, PyObject *cls); +int _PyObject_RealIsSubclass(PyObject *derived, PyObject *cls); +} +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + int co_argcount; + int co_nlocals; + int co_stacksize; + int co_flags; + PyObject *co_code; + PyObject *co_consts; + PyObject *co_names; + PyObject *co_varnames; + PyObject *co_freevars; + PyObject *co_cellvars; + PyObject *co_filename; + PyObject *co_name; + int co_firstlineno; + PyObject *co_lnotab; + void *co_zombieframe; +} PyCodeObject; +extern PyTypeObject PyCode_Type; +PyCodeObject * PyCode_New( + int, int, int, int, PyObject *, PyObject *, PyObject *, PyObject *, + PyObject *, PyObject *, PyObject *, PyObject *, int, PyObject *); +int PyCode_Addr2Line(PyCodeObject *, int); +typedef struct _addr_pair { + int ap_lower; + int ap_upper; +} PyAddrPair; +int PyCode_CheckLineNumber(PyCodeObject* co, + int lasti, PyAddrPair *bounds); +PyObject* PyCode_Optimize(PyObject *code, PyObject* consts, + PyObject *names, PyObject *lineno_obj); +} +extern "C" { +struct _node; +PyCodeObject * PyNode_Compile(struct _node *, const char *); +typedef struct { + int ff_features; + int ff_lineno; +} PyFutureFeatures; +struct _mod; +PyCodeObject * PyAST_Compile(struct _mod *, const char *, + PyCompilerFlags *, PyArena *); +PyFutureFeatures * PyFuture_FromAST(struct _mod *, const char *); +} +extern "C" { +PyObject * PyEval_EvalCode(PyCodeObject *, PyObject *, PyObject *); +PyObject * PyEval_EvalCodeEx(PyCodeObject *co, + PyObject *globals, + PyObject *locals, + PyObject **args, int argc, + PyObject **kwds, int kwdc, + PyObject **defs, int defc, + PyObject *closure); +PyObject * _PyEval_CallTracing(PyObject *func, PyObject *args); +} +extern "C" { +double PyOS_ascii_strtod(const char *str, char **ptr); +double PyOS_ascii_atof(const char *str); +char * PyOS_ascii_formatd(char *buffer, size_t buf_len, const char *format, double d); +} +extern "C" { +int PyOS_mystrnicmp(const char *, const char *, Py_ssize_t); +int PyOS_mystricmp(const char *, const char *); +} +PyObject* _Py_Mangle(PyObject *p, PyObject *name); +extern "C" { +extern "C" { +extern int __sigismember (__const __sigset_t *, int); +extern int __sigaddset (__sigset_t *, int); +extern int __sigdelset (__sigset_t *, int); +extern __inline __attribute__ ((__gnu_inline__)) int __sigismember (__const __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return (__set->__val[__word] & __mask) ? 1 : 0; } +extern __inline __attribute__ ((__gnu_inline__)) int __sigaddset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] |= __mask), 0); } +extern __inline __attribute__ ((__gnu_inline__)) int __sigdelset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] &= ~__mask), 0); } +typedef __sig_atomic_t sig_atomic_t; +typedef union sigval + { + int sival_int; + void *sival_ptr; + } sigval_t; +typedef struct siginfo + { + int si_signo; + int si_errno; + int si_code; + union + { + int _pad[((128 / sizeof (int)) - 4)]; + struct + { + __pid_t si_pid; + __uid_t si_uid; + } _kill; + struct + { + int si_tid; + int si_overrun; + sigval_t si_sigval; + } _timer; + struct + { + __pid_t si_pid; + __uid_t si_uid; + sigval_t si_sigval; + } _rt; + struct + { + __pid_t si_pid; + __uid_t si_uid; + int si_status; + __clock_t si_utime; + __clock_t si_stime; + } _sigchld; + struct + { + void *si_addr; + } _sigfault; + struct + { + long int si_band; + int si_fd; + } _sigpoll; + } _sifields; + } siginfo_t; +enum +{ + SI_ASYNCNL = -60, + SI_TKILL = -6, + SI_SIGIO, + SI_ASYNCIO, + SI_MESGQ, + SI_TIMER, + SI_QUEUE, + SI_USER, + SI_KERNEL = 0x80 +}; +enum +{ + ILL_ILLOPC = 1, + ILL_ILLOPN, + ILL_ILLADR, + ILL_ILLTRP, + ILL_PRVOPC, + ILL_PRVREG, + ILL_COPROC, + ILL_BADSTK +}; +enum +{ + FPE_INTDIV = 1, + FPE_INTOVF, + FPE_FLTDIV, + FPE_FLTOVF, + FPE_FLTUND, + FPE_FLTRES, + FPE_FLTINV, + FPE_FLTSUB +}; +enum +{ + SEGV_MAPERR = 1, + SEGV_ACCERR +}; +enum +{ + BUS_ADRALN = 1, + BUS_ADRERR, + BUS_OBJERR +}; +enum +{ + TRAP_BRKPT = 1, + TRAP_TRACE +}; +enum +{ + CLD_EXITED = 1, + CLD_KILLED, + CLD_DUMPED, + CLD_TRAPPED, + CLD_STOPPED, + CLD_CONTINUED +}; +enum +{ + POLL_IN = 1, + POLL_OUT, + POLL_MSG, + POLL_ERR, + POLL_PRI, + POLL_HUP +}; +typedef struct sigevent + { + sigval_t sigev_value; + int sigev_signo; + int sigev_notify; + union + { + int _pad[((64 / sizeof (int)) - 4)]; + __pid_t _tid; + struct + { + void (*_function) (sigval_t); + void *_attribute; + } _sigev_thread; + } _sigev_un; + } sigevent_t; +enum +{ + SIGEV_SIGNAL = 0, + SIGEV_NONE, + SIGEV_THREAD, + SIGEV_THREAD_ID = 4 +}; +typedef void (*__sighandler_t) (int); +extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) + throw (); +extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler) + throw (); +extern __sighandler_t signal (int __sig, __sighandler_t __handler) + throw (); +extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler) + throw (); +extern int kill (__pid_t __pid, int __sig) throw (); +extern int killpg (__pid_t __pgrp, int __sig) throw (); +extern int raise (int __sig) throw (); +extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) + throw (); +extern int gsignal (int __sig) throw (); +extern void psignal (int __sig, __const char *__s); +extern void psiginfo (__const siginfo_t *__pinfo, __const char *__s); +extern int __sigpause (int __sig_or_mask, int __is_sig); +extern int sigpause (int __sig) __asm__ ("__xpg_sigpause"); +extern int sigblock (int __mask) throw () __attribute__ ((__deprecated__)); +extern int sigsetmask (int __mask) throw () __attribute__ ((__deprecated__)); +extern int siggetmask (void) throw () __attribute__ ((__deprecated__)); +typedef __sighandler_t sighandler_t; +typedef __sighandler_t sig_t; +extern int sigemptyset (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); +extern int sigfillset (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); +extern int sigaddset (sigset_t *__set, int __signo) throw () __attribute__ ((__nonnull__ (1))); +extern int sigdelset (sigset_t *__set, int __signo) throw () __attribute__ ((__nonnull__ (1))); +extern int sigismember (__const sigset_t *__set, int __signo) + throw () __attribute__ ((__nonnull__ (1))); +extern int sigisemptyset (__const sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); +extern int sigandset (sigset_t *__set, __const sigset_t *__left, + __const sigset_t *__right) throw () __attribute__ ((__nonnull__ (1, 2, 3))); +extern int sigorset (sigset_t *__set, __const sigset_t *__left, + __const sigset_t *__right) throw () __attribute__ ((__nonnull__ (1, 2, 3))); +struct sigaction + { + union + { + __sighandler_t sa_handler; + void (*sa_sigaction) (int, siginfo_t *, void *); + } + __sigaction_handler; + __sigset_t sa_mask; + int sa_flags; + void (*sa_restorer) (void); + }; +extern int sigprocmask (int __how, __const sigset_t *__restrict __set, + sigset_t *__restrict __oset) throw (); +extern int sigsuspend (__const sigset_t *__set) __attribute__ ((__nonnull__ (1))); +extern int sigaction (int __sig, __const struct sigaction *__restrict __act, + struct sigaction *__restrict __oact) throw (); +extern int sigpending (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); +extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig) + __attribute__ ((__nonnull__ (1, 2))); +extern int sigwaitinfo (__const sigset_t *__restrict __set, + siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1))); +extern int sigtimedwait (__const sigset_t *__restrict __set, + siginfo_t *__restrict __info, + __const struct timespec *__restrict __timeout) + __attribute__ ((__nonnull__ (1))); +extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val) + throw (); +extern __const char *__const _sys_siglist[65]; +extern __const char *__const sys_siglist[65]; +struct sigvec + { + __sighandler_t sv_handler; + int sv_mask; + int sv_flags; + }; +extern int sigvec (int __sig, __const struct sigvec *__vec, + struct sigvec *__ovec) throw (); +struct _fpreg +{ + unsigned short significand[4]; + unsigned short exponent; +}; +struct _fpxreg +{ + unsigned short significand[4]; + unsigned short exponent; + unsigned short padding[3]; +}; +struct _xmmreg +{ + __uint32_t element[4]; +}; +struct _fpstate +{ + __uint16_t cwd; + __uint16_t swd; + __uint16_t ftw; + __uint16_t fop; + __uint64_t rip; + __uint64_t rdp; + __uint32_t mxcsr; + __uint32_t mxcr_mask; + struct _fpxreg _st[8]; + struct _xmmreg _xmm[16]; + __uint32_t padding[24]; +}; +struct sigcontext +{ + unsigned long r8; + unsigned long r9; + unsigned long r10; + unsigned long r11; + unsigned long r12; + unsigned long r13; + unsigned long r14; + unsigned long r15; + unsigned long rdi; + unsigned long rsi; + unsigned long rbp; + unsigned long rbx; + unsigned long rdx; + unsigned long rax; + unsigned long rcx; + unsigned long rsp; + unsigned long rip; + unsigned long eflags; + unsigned short cs; + unsigned short gs; + unsigned short fs; + unsigned short __pad0; + unsigned long err; + unsigned long trapno; + unsigned long oldmask; + unsigned long cr2; + struct _fpstate * fpstate; + unsigned long __reserved1 [8]; +}; +extern int sigreturn (struct sigcontext *__scp) throw (); +extern int siginterrupt (int __sig, int __interrupt) throw (); +struct sigstack + { + void *ss_sp; + int ss_onstack; + }; +enum +{ + SS_ONSTACK = 1, + SS_DISABLE +}; +typedef struct sigaltstack + { + void *ss_sp; + int ss_flags; + size_t ss_size; + } stack_t; +typedef long int greg_t; +typedef greg_t gregset_t[23]; +enum +{ + REG_R8 = 0, + REG_R9, + REG_R10, + REG_R11, + REG_R12, + REG_R13, + REG_R14, + REG_R15, + REG_RDI, + REG_RSI, + REG_RBP, + REG_RBX, + REG_RDX, + REG_RAX, + REG_RCX, + REG_RSP, + REG_RIP, + REG_EFL, + REG_CSGSFS, + REG_ERR, + REG_TRAPNO, + REG_OLDMASK, + REG_CR2 +}; +struct _libc_fpxreg +{ + unsigned short int significand[4]; + unsigned short int exponent; + unsigned short int padding[3]; +}; +struct _libc_xmmreg +{ + __uint32_t element[4]; +}; +struct _libc_fpstate +{ + __uint16_t cwd; + __uint16_t swd; + __uint16_t ftw; + __uint16_t fop; + __uint64_t rip; + __uint64_t rdp; + __uint32_t mxcsr; + __uint32_t mxcr_mask; + struct _libc_fpxreg _st[8]; + struct _libc_xmmreg _xmm[16]; + __uint32_t padding[24]; +}; +typedef struct _libc_fpstate *fpregset_t; +typedef struct + { + gregset_t gregs; + fpregset_t fpregs; + unsigned long __reserved1 [8]; +} mcontext_t; +typedef struct ucontext + { + unsigned long int uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + __sigset_t uc_sigmask; + struct _libc_fpstate __fpregs_mem; + } ucontext_t; +extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) + throw () __attribute__ ((__deprecated__)); +extern int sigaltstack (__const struct sigaltstack *__restrict __ss, + struct sigaltstack *__restrict __oss) throw (); +extern int sighold (int __sig) throw (); +extern int sigrelse (int __sig) throw (); +extern int sigignore (int __sig) throw (); +extern __sighandler_t sigset (int __sig, __sighandler_t __disp) throw (); +extern int pthread_sigmask (int __how, + __const __sigset_t *__restrict __newmask, + __sigset_t *__restrict __oldmask)throw (); +extern int pthread_kill (pthread_t __threadid, int __signo) throw (); +extern int pthread_sigqueue (pthread_t __threadid, int __signo, + const union sigval __value) throw (); +extern int __libc_current_sigrtmin (void) throw (); +extern int __libc_current_sigrtmax (void) throw (); +} +extern "C" { +struct __jmp_buf_tag + { + __jmp_buf __jmpbuf; + int __mask_was_saved; + __sigset_t __saved_mask; + }; +typedef struct __jmp_buf_tag jmp_buf[1]; +extern int setjmp (jmp_buf __env) throw (); +extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) throw (); +extern int _setjmp (struct __jmp_buf_tag __env[1]) throw (); +extern void longjmp (struct __jmp_buf_tag __env[1], int __val) + throw () __attribute__ ((__noreturn__)); +extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) + throw () __attribute__ ((__noreturn__)); +typedef struct __jmp_buf_tag sigjmp_buf[1]; +extern void siglongjmp (sigjmp_buf __env, int __val) + throw () __attribute__ ((__noreturn__)); +extern void longjmp (struct __jmp_buf_tag __env[1], int __val) throw () __asm__ ("" "__longjmp_chk") + __attribute__ ((__noreturn__)); +extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) throw () __asm__ ("" "__longjmp_chk") + __attribute__ ((__noreturn__)); +extern void siglongjmp (struct __jmp_buf_tag __env[1], int __val) throw () __asm__ ("" "__longjmp_chk") + __attribute__ ((__noreturn__)); +} +extern jmp_buf PyFPE_jbuf; +extern int PyFPE_counter; +extern double PyFPE_dummy(void *); +} + + +namespace std __attribute__ ((__visibility__ ("default"))) { + namespace rel_ops + { + template + inline bool + operator!=(const _Tp& __x, const _Tp& __y) + { return !(__x == __y); } + template + inline bool + operator>(const _Tp& __x, const _Tp& __y) + { return __y < __x; } + template + inline bool + operator<=(const _Tp& __x, const _Tp& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const _Tp& __x, const _Tp& __y) + { return !(__x < __y); } + } +} + + +namespace std __attribute__ ((__visibility__ ("default"))) { + using ::div_t; + using ::ldiv_t; + using ::abort; + using ::abs; + using ::atexit; + using ::atof; + using ::atoi; + using ::atol; + using ::bsearch; + using ::calloc; + using ::div; + using ::exit; + using ::free; + using ::getenv; + using ::labs; + using ::ldiv; + using ::malloc; + using ::mblen; + using ::mbstowcs; + using ::mbtowc; + using ::qsort; + using ::rand; + using ::realloc; + using ::srand; + using ::strtod; + using ::strtol; + using ::strtoul; + using ::system; + using ::wcstombs; + using ::wctomb; + inline long + abs(long __i) { return labs(__i); } + inline ldiv_t + div(long __i, long __j) { return ldiv(__i, __j); } +} +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + using ::lldiv_t; + using ::_Exit; + inline long long + abs(long long __x) { return __x >= 0 ? __x : -__x; } + using ::llabs; + inline lldiv_t + div(long long __n, long long __d) + { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } + using ::lldiv; + using ::atoll; + using ::strtoll; + using ::strtoull; + using ::strtof; + using ::strtold; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + using ::__gnu_cxx::lldiv_t; + using ::__gnu_cxx::_Exit; + using ::__gnu_cxx::abs; + using ::__gnu_cxx::llabs; + using ::__gnu_cxx::div; + using ::__gnu_cxx::lldiv; + using ::__gnu_cxx::atoll; + using ::__gnu_cxx::strtof; + using ::__gnu_cxx::strtoll; + using ::__gnu_cxx::strtoull; + using ::__gnu_cxx::strtold; +} +namespace boost{ + __extension__ typedef long long long_long_type; + __extension__ typedef unsigned long long ulong_long_type; +} +namespace mpl_ { namespace aux {} } +namespace boost { namespace mpl { using namespace mpl_; +namespace aux { using namespace mpl_::aux; } +}} +namespace mpl_ { +template< int N > struct int_; +} +namespace boost { namespace mpl { using ::mpl_::int_; } } +namespace mpl_ { +struct integral_c_tag { static const int value = 0; }; +} +namespace boost { namespace mpl { using ::mpl_::integral_c_tag; } } +namespace mpl_ { +template< int N > +struct int_ +{ + static const int value = N; + typedef int_ type; + typedef int value_type; + typedef integral_c_tag tag; + typedef mpl_::int_< static_cast((value + 1)) > next; + typedef mpl_::int_< static_cast((value - 1)) > prior; + operator int() const { return static_cast(this->value); } +}; +template< int N > +int const mpl_::int_< N >::value; +} +namespace boost { namespace mpl { namespace aux { +template< typename F > struct template_arity; +}}} +namespace mpl_ { +template< bool C_ > struct bool_; +typedef bool_ true_; +typedef bool_ false_; +} +namespace boost { namespace mpl { using ::mpl_::bool_; } } +namespace boost { namespace mpl { using ::mpl_::true_; } } +namespace boost { namespace mpl { using ::mpl_::false_; } } +namespace mpl_ { +template< bool C_ > struct bool_ +{ + static const bool value = C_; + typedef integral_c_tag tag; + typedef bool_ type; + typedef bool value_type; + operator bool() const { return this->value; } +}; +template< bool C_ > +bool const bool_::value; +} +namespace mpl_ { +template< typename T, T N > struct integral_c; +} +namespace boost { namespace mpl { using ::mpl_::integral_c; } } +namespace mpl_ { +template< typename T, T N > +struct integral_c +{ + static const T value = N; + typedef integral_c type; + typedef T value_type; + typedef integral_c_tag tag; + typedef integral_c< T, static_cast((value + 1)) > next; + typedef integral_c< T, static_cast((value - 1)) > prior; + operator T() const { return static_cast(this->value); } +}; +template< typename T, T N > +T const integral_c< T, N >::value; +} +namespace mpl_ { +template< bool C > +struct integral_c +{ + static const bool value = C; + typedef integral_c_tag tag; + typedef integral_c type; + typedef bool value_type; + operator bool() const { return this->value; } +}; +} +namespace boost{ +template +struct integral_constant : public mpl::integral_c +{ + typedef integral_constant type; +}; +template<> struct integral_constant : public mpl::true_ +{ + typedef integral_constant type; +}; +template<> struct integral_constant : public mpl::false_ +{ + typedef integral_constant type; +}; +typedef integral_constant true_type; +typedef integral_constant false_type; +} +namespace boost { +template< typename T, typename U > struct is_same : ::boost::integral_constant { }; +template< typename T > struct is_same< T,T > : ::boost::integral_constant { }; +} +namespace boost { +template< typename T > struct add_const { typedef T const type; }; +template< typename T > struct add_const { typedef T& type; }; +} +namespace boost { +template< typename T > struct add_volatile { typedef T volatile type; }; +template< typename T > struct add_volatile { typedef T& type; }; +} +namespace boost { +template< typename T > struct add_cv { typedef T const volatile type; }; +template< typename T > struct add_cv { typedef T& type; }; +} +namespace boost { +namespace detail { +template struct cv_traits_imp {}; +template +struct cv_traits_imp +{ + static const bool is_const = false; + static const bool is_volatile = false; + typedef T unqualified_type; +}; +template +struct cv_traits_imp +{ + static const bool is_const = true; + static const bool is_volatile = false; + typedef T unqualified_type; +}; +template +struct cv_traits_imp +{ + static const bool is_const = false; + static const bool is_volatile = true; + typedef T unqualified_type; +}; +template +struct cv_traits_imp +{ + static const bool is_const = true; + static const bool is_volatile = true; + typedef T unqualified_type; +}; +} +} +namespace boost { +template< typename T > struct is_reference : ::boost::integral_constant { }; +template< typename T > struct is_reference< T& > : ::boost::integral_constant { }; +} +namespace boost { + template< typename T > struct is_const : ::boost::integral_constant::is_const> { }; +template< typename T > struct is_const< T& > : ::boost::integral_constant { }; +} +namespace boost { + template< typename T > struct is_volatile : ::boost::integral_constant::is_volatile> { }; +template< typename T > struct is_volatile< T& > : ::boost::integral_constant { }; +} + +namespace boost { +namespace detail { +template +struct remove_const_helper +{ + typedef T type; +}; +template +struct remove_const_helper +{ + typedef T volatile type; +}; +template +struct remove_const_impl +{ + typedef typename remove_const_helper< + typename cv_traits_imp::unqualified_type + , ::boost::is_volatile::value + >::type type; +}; +} +template< typename T > struct remove_const { typedef typename boost::detail::remove_const_impl::type type; }; +template< typename T > struct remove_const { typedef T& type; }; +template< typename T, std::size_t N > struct remove_const { typedef T type[N]; }; +template< typename T, std::size_t N > struct remove_const { typedef T volatile type[N]; }; +} + +namespace boost { +namespace detail { +template +struct remove_volatile_helper +{ + typedef T type; +}; +template +struct remove_volatile_helper +{ + typedef T const type; +}; +template +struct remove_volatile_impl +{ + typedef typename remove_volatile_helper< + typename cv_traits_imp::unqualified_type + , ::boost::is_const::value + >::type type; +}; +} +template< typename T > struct remove_volatile { typedef typename boost::detail::remove_volatile_impl::type type; }; +template< typename T > struct remove_volatile { typedef T& type; }; +template< typename T, std::size_t N > struct remove_volatile { typedef T type[N]; }; +template< typename T, std::size_t N > struct remove_volatile { typedef T const type[N]; }; +} + +namespace boost { +template< typename T > struct remove_cv { typedef typename boost::detail::cv_traits_imp::unqualified_type type; }; +template< typename T > struct remove_cv { typedef T& type; }; +template< typename T, std::size_t N > struct remove_cv { typedef T type[N]; }; +template< typename T, std::size_t N > struct remove_cv { typedef T type[N]; }; +template< typename T, std::size_t N > struct remove_cv { typedef T type[N]; }; +} +namespace boost { + template + struct type {}; +} +namespace boost { namespace python { +namespace detail +{ + struct unspecialized {}; +} +template struct base_type_traits + : detail::unspecialized +{}; +template <> +struct base_type_traits +{ + typedef PyObject type; +}; +template <> +struct base_type_traits +{ + typedef PyObject type; +}; +template <> +struct base_type_traits +{ + typedef PyObject type; +}; +}} +namespace boost { namespace python { namespace detail { +typedef char* yes_convertible; +typedef int* no_convertible; +template +struct convertible +{ + static inline no_convertible check(...) { return 0; } + static inline yes_convertible check(Target) { return 0; } +}; +}}} +namespace boost { namespace python { +namespace detail +{ + template inline Target* upcast_impl(Source*, Target*); + template + inline Target* upcast(Source* p, yes_convertible, no_convertible, Target*) + { + return p; + } + template + inline Target* upcast(Source* p, no_convertible, no_convertible, Target*) + { + typedef typename base_type_traits::type base; + return detail::upcast_impl((base*)p, (Target*)0); + } + template + struct upcaster + { + template + static inline T* execute(T* x, T*) { return x; } + }; + template <> + struct upcaster + { + template + static inline Target* execute(Source* x, Target*) + { + return detail::upcast( + x, detail::convertible::check(x) + , detail::convertible::check((Target*)0) + , (Target*)0); + } + }; + template + inline Target* downcast(Source* p, yes_convertible) + { + return static_cast(p); + } + template + inline Target* downcast(Source* p, no_convertible, boost::type* = 0) + { + typedef typename base_type_traits::type base; + return (Target*)detail::downcast(p, convertible::check((base*)0)); + } + template + inline void assert_castable(boost::type* = 0) + { + typedef char must_be_a_complete_type[sizeof(T)]; + } + template + inline Target* upcast_impl(Source* x, Target*) + { + typedef typename add_cv::type src_t; + typedef typename add_cv::type target_t; + bool const same = is_same::value; + return detail::upcaster::execute(x, (Target*)0); + } +} +template +inline Target* upcast(Source* x, Target* = 0) +{ + detail::assert_castable(); + detail::assert_castable(); + return detail::upcast_impl(x, (Target*)0); +} +template +inline Target* downcast(Source* x, Target* = 0) +{ + detail::assert_castable(); + detail::assert_castable(); + return detail::downcast(x, detail::convertible::check((Target*)0)); +} +}} + + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + bool + binary_search(_FIter, _FIter, const _Tp&); + template + bool + binary_search(_FIter, _FIter, const _Tp&, _Compare); + template + _OIter + copy(_IIter, _IIter, _OIter); + template + _BIter2 + copy_backward(_BIter1, _BIter1, _BIter2); + template + pair<_FIter, _FIter> + equal_range(_FIter, _FIter, const _Tp&); + template + pair<_FIter, _FIter> + equal_range(_FIter, _FIter, const _Tp&, _Compare); + template + void + fill(_FIter, _FIter, const _Tp&); + template + _OIter + fill_n(_OIter, _Size, const _Tp&); + template + _FIter1 + find_end(_FIter1, _FIter1, _FIter2, _FIter2); + template + _FIter1 + find_end(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); + template + bool + includes(_IIter1, _IIter1, _IIter2, _IIter2); + template + bool + includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); + template + void + inplace_merge(_BIter, _BIter, _BIter); + template + void + inplace_merge(_BIter, _BIter, _BIter, _Compare); + template + void + iter_swap(_FIter1, _FIter2); + template + _FIter + lower_bound(_FIter, _FIter, const _Tp&); + template + _FIter + lower_bound(_FIter, _FIter, const _Tp&, _Compare); + template + void + make_heap(_RAIter, _RAIter); + template + void + make_heap(_RAIter, _RAIter, _Compare); + template + const _Tp& + max(const _Tp&, const _Tp&); + template + const _Tp& + max(const _Tp&, const _Tp&, _Compare); + template + const _Tp& + min(const _Tp&, const _Tp&); + template + const _Tp& + min(const _Tp&, const _Tp&, _Compare); + template + bool + next_permutation(_BIter, _BIter); + template + bool + next_permutation(_BIter, _BIter, _Compare); + template + _RAIter + partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter); + template + _RAIter + partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter, _Compare); + template + void + pop_heap(_RAIter, _RAIter); + template + void + pop_heap(_RAIter, _RAIter, _Compare); + template + bool + prev_permutation(_BIter, _BIter); + template + bool + prev_permutation(_BIter, _BIter, _Compare); + template + void + push_heap(_RAIter, _RAIter); + template + void + push_heap(_RAIter, _RAIter, _Compare); + template + _FIter + remove(_FIter, _FIter, const _Tp&); + template + _FIter + remove_if(_FIter, _FIter, _Predicate); + template + _OIter + remove_copy(_IIter, _IIter, _OIter, const _Tp&); + template + _OIter + remove_copy_if(_IIter, _IIter, _OIter, _Predicate); + template + _OIter + replace_copy(_IIter, _IIter, _OIter, const _Tp&, const _Tp&); + template + _OIter + replace_copy_if(_Iter, _Iter, _OIter, _Predicate, const _Tp&); + template + void + reverse(_BIter, _BIter); + template + _OIter + reverse_copy(_BIter, _BIter, _OIter); + template + void + rotate(_FIter, _FIter, _FIter); + template + _OIter + rotate_copy(_FIter, _FIter, _FIter, _OIter); + template + void + sort_heap(_RAIter, _RAIter); + template + void + sort_heap(_RAIter, _RAIter, _Compare); + template + _BIter + stable_partition(_BIter, _BIter, _Predicate); + template + void + swap(_Tp&, _Tp&); + template + void + swap(_Tp (&)[_Nm], _Tp (&)[_Nm]); + template + _FIter2 + swap_ranges(_FIter1, _FIter1, _FIter2); + template + _FIter + unique(_FIter, _FIter); + template + _FIter + unique(_FIter, _FIter, _BinaryPredicate); + template + _FIter + upper_bound(_FIter, _FIter, const _Tp&); + template + _FIter + upper_bound(_FIter, _FIter, const _Tp&, _Compare); +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + _FIter + adjacent_find(_FIter, _FIter); + template + _FIter + adjacent_find(_FIter, _FIter, _BinaryPredicate); + template + typename iterator_traits<_IIter>::difference_type + count(_IIter, _IIter, const _Tp&); + template + typename iterator_traits<_IIter>::difference_type + count_if(_IIter, _IIter, _Predicate); + template + bool + equal(_IIter1, _IIter1, _IIter2); + template + bool + equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate); + template + _IIter + find(_IIter, _IIter, const _Tp&); + template + _FIter1 + find_first_of(_FIter1, _FIter1, _FIter2, _FIter2); + template + _FIter1 + find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); + template + _IIter + find_if(_IIter, _IIter, _Predicate); + template + _Funct + for_each(_IIter, _IIter, _Funct); + template + void + generate(_FIter, _FIter, _Generator); + template + _OIter + generate_n(_OIter, _Size, _Generator); + template + bool + lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2); + template + bool + lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); + template + _FIter + max_element(_FIter, _FIter); + template + _FIter + max_element(_FIter, _FIter, _Compare); + template + _OIter + merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + template + _OIter + merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + template + _FIter + min_element(_FIter, _FIter); + template + _FIter + min_element(_FIter, _FIter, _Compare); + template + pair<_IIter1, _IIter2> + mismatch(_IIter1, _IIter1, _IIter2); + template + pair<_IIter1, _IIter2> + mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate); + template + void + nth_element(_RAIter, _RAIter, _RAIter); + template + void + nth_element(_RAIter, _RAIter, _RAIter, _Compare); + template + void + partial_sort(_RAIter, _RAIter, _RAIter); + template + void + partial_sort(_RAIter, _RAIter, _RAIter, _Compare); + template + _BIter + partition(_BIter, _BIter, _Predicate); + template + void + random_shuffle(_RAIter, _RAIter); + template + void + random_shuffle(_RAIter, _RAIter, + _Generator&); + template + void + replace(_FIter, _FIter, const _Tp&, const _Tp&); + template + void + replace_if(_FIter, _FIter, _Predicate, const _Tp&); + template + _FIter1 + search(_FIter1, _FIter1, _FIter2, _FIter2); + template + _FIter1 + search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); + template + _FIter + search_n(_FIter, _FIter, _Size, const _Tp&); + template + _FIter + search_n(_FIter, _FIter, _Size, const _Tp&, _BinaryPredicate); + template + _OIter + set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + template + _OIter + set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + template + _OIter + set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + template + _OIter + set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + template + _OIter + set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + template + _OIter + set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, + _OIter, _Compare); + template + _OIter + set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + template + _OIter + set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + template + void + sort(_RAIter, _RAIter); + template + void + sort(_RAIter, _RAIter, _Compare); + template + void + stable_sort(_RAIter, _RAIter); + template + void + stable_sort(_RAIter, _RAIter, _Compare); + template + _OIter + transform(_IIter, _IIter, _OIter, _UnaryOperation); + template + _OIter + transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation); + template + _OIter + unique_copy(_IIter, _IIter, _OIter); + template + _OIter + unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate); +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + _Distance + __is_heap_until(_RandomAccessIterator __first, _Distance __n) + { + _Distance __parent = 0; + for (_Distance __child = 1; __child < __n; ++__child) + { + if (__first[__parent] < __first[__child]) + return __child; + if ((__child & 1) == 0) + ++__parent; + } + return __n; + } + template + _Distance + __is_heap_until(_RandomAccessIterator __first, _Distance __n, + _Compare __comp) + { + _Distance __parent = 0; + for (_Distance __child = 1; __child < __n; ++__child) + { + if (__comp(__first[__parent], __first[__child])) + return __child; + if ((__child & 1) == 0) + ++__parent; + } + return __n; + } + template + inline bool + __is_heap(_RandomAccessIterator __first, _Distance __n) + { return std::__is_heap_until(__first, __n) == __n; } + template + inline bool + __is_heap(_RandomAccessIterator __first, _Compare __comp, _Distance __n) + { return std::__is_heap_until(__first, __n, __comp) == __n; } + template + inline bool + __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { return std::__is_heap(__first, std::distance(__first, __last)); } + template + inline bool + __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { return std::__is_heap(__first, __comp, std::distance(__first, __last)); } + template + void + __push_heap(_RandomAccessIterator __first, + _Distance __holeIndex, _Distance __topIndex, _Tp __value) + { + _Distance __parent = (__holeIndex - 1) / 2; + while (__holeIndex > __topIndex && *(__first + __parent) < __value) + { + *(__first + __holeIndex) = (*(__first + __parent)); + __holeIndex = __parent; + __parent = (__holeIndex - 1) / 2; + } + *(__first + __holeIndex) = (__value); + } + template + inline void + push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + ; + ; + _ValueType __value = (*(__last - 1)); + std::__push_heap(__first, _DistanceType((__last - __first) - 1), + _DistanceType(0), (__value)); + } + template + void + __push_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __topIndex, _Tp __value, _Compare __comp) + { + _Distance __parent = (__holeIndex - 1) / 2; + while (__holeIndex > __topIndex + && __comp(*(__first + __parent), __value)) + { + *(__first + __holeIndex) = (*(__first + __parent)); + __holeIndex = __parent; + __parent = (__holeIndex - 1) / 2; + } + *(__first + __holeIndex) = (__value); + } + template + inline void + push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + ; + ; + _ValueType __value = (*(__last - 1)); + std::__push_heap(__first, _DistanceType((__last - __first) - 1), + _DistanceType(0), (__value), __comp); + } + template + void + __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __len, _Tp __value) + { + const _Distance __topIndex = __holeIndex; + _Distance __secondChild = __holeIndex; + while (__secondChild < (__len - 1) / 2) + { + __secondChild = 2 * (__secondChild + 1); + if (*(__first + __secondChild) < *(__first + (__secondChild - 1))) + __secondChild--; + *(__first + __holeIndex) = (*(__first + __secondChild)); + __holeIndex = __secondChild; + } + if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2) + { + __secondChild = 2 * (__secondChild + 1); + *(__first + __holeIndex) = (*(__first + (__secondChild - 1))) + ; + __holeIndex = __secondChild - 1; + } + std::__push_heap(__first, __holeIndex, __topIndex, + (__value)); + } + template + inline void + __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _RandomAccessIterator __result) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + _ValueType __value = (*__result); + *__result = (*__first); + std::__adjust_heap(__first, _DistanceType(0), + _DistanceType(__last - __first), + (__value)); + } + template + inline void + pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + ; + ; + --__last; + std::__pop_heap(__first, __last, __last); + } + template + void + __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __len, _Tp __value, _Compare __comp) + { + const _Distance __topIndex = __holeIndex; + _Distance __secondChild = __holeIndex; + while (__secondChild < (__len - 1) / 2) + { + __secondChild = 2 * (__secondChild + 1); + if (__comp(*(__first + __secondChild), + *(__first + (__secondChild - 1)))) + __secondChild--; + *(__first + __holeIndex) = (*(__first + __secondChild)); + __holeIndex = __secondChild; + } + if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2) + { + __secondChild = 2 * (__secondChild + 1); + *(__first + __holeIndex) = (*(__first + (__secondChild - 1))) + ; + __holeIndex = __secondChild - 1; + } + std::__push_heap(__first, __holeIndex, __topIndex, + (__value), __comp); + } + template + inline void + __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _RandomAccessIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + _ValueType __value = (*__result); + *__result = (*__first); + std::__adjust_heap(__first, _DistanceType(0), + _DistanceType(__last - __first), + (__value), __comp); + } + template + inline void + pop_heap(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + + ; + ; + --__last; + std::__pop_heap(__first, __last, __last, __comp); + } + template + void + make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + ; + if (__last - __first < 2) + return; + const _DistanceType __len = __last - __first; + _DistanceType __parent = (__len - 2) / 2; + while (true) + { + _ValueType __value = (*(__first + __parent)); + std::__adjust_heap(__first, __parent, __len, (__value)); + if (__parent == 0) + return; + __parent--; + } + } + template + void + make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + ; + if (__last - __first < 2) + return; + const _DistanceType __len = __last - __first; + _DistanceType __parent = (__len - 2) / 2; + while (true) + { + _ValueType __value = (*(__first + __parent)); + std::__adjust_heap(__first, __parent, __len, (__value), + __comp); + if (__parent == 0) + return; + __parent--; + } + } + template + void + sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + + + ; + ; + while (__last - __first > 1) + { + --__last; + std::__pop_heap(__first, __last, __last); + } + } + template + void + sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + + ; + ; + while (__last - __first > 1) + { + --__last; + std::__pop_heap(__first, __last, __last, __comp); + } + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + pair<_Tp*, ptrdiff_t> + get_temporary_buffer(ptrdiff_t __len) + { + const ptrdiff_t __max = + __gnu_cxx::__numeric_traits::__max / sizeof(_Tp); + if (__len > __max) + __len = __max; + while (__len > 0) + { + _Tp* __tmp = static_cast<_Tp*>(::operator new(__len * sizeof(_Tp), + std::nothrow)); + if (__tmp != 0) + return std::pair<_Tp*, ptrdiff_t>(__tmp, __len); + __len /= 2; + } + return std::pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0); + } + template + inline void + return_temporary_buffer(_Tp* __p) + { ::operator delete(__p, std::nothrow); } + template + class _Temporary_buffer + { + + public: + typedef _Tp value_type; + typedef value_type* pointer; + typedef pointer iterator; + typedef ptrdiff_t size_type; + protected: + size_type _M_original_len; + size_type _M_len; + pointer _M_buffer; + public: + size_type + size() const + { return _M_len; } + size_type + requested_size() const + { return _M_original_len; } + iterator + begin() + { return _M_buffer; } + iterator + end() + { return _M_buffer + _M_len; } + _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last); + ~_Temporary_buffer() + { + std::_Destroy(_M_buffer, _M_buffer + _M_len); + std::return_temporary_buffer(_M_buffer); + } + private: + _Temporary_buffer(const _Temporary_buffer&); + void + operator=(const _Temporary_buffer&); + }; + template + _Temporary_buffer<_ForwardIterator, _Tp>:: + _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) + : _M_original_len(std::distance(__first, __last)), + _M_len(0), _M_buffer(0) + { + try + { + std::pair __p(std::get_temporary_buffer< + value_type>(_M_original_len)); + _M_buffer = __p.first; + _M_len = __p.second; + if(_M_buffer) + std::__uninitialized_construct_range(_M_buffer, _M_buffer + _M_len, + *__first); + } + catch(...) + { + std::return_temporary_buffer(_M_buffer); + _M_buffer = 0; + _M_len = 0; + throw; + } + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + void + __move_median_first(_Iterator __a, _Iterator __b, _Iterator __c) + { + + if (*__a < *__b) + { + if (*__b < *__c) + std::iter_swap(__a, __b); + else if (*__a < *__c) + std::iter_swap(__a, __c); + } + else if (*__a < *__c) + return; + else if (*__b < *__c) + std::iter_swap(__a, __c); + else + std::iter_swap(__a, __b); + } + template + void + __move_median_first(_Iterator __a, _Iterator __b, _Iterator __c, + _Compare __comp) + { + + if (__comp(*__a, *__b)) + { + if (__comp(*__b, *__c)) + std::iter_swap(__a, __b); + else if (__comp(*__a, *__c)) + std::iter_swap(__a, __c); + } + else if (__comp(*__a, *__c)) + return; + else if (__comp(*__b, *__c)) + std::iter_swap(__a, __c); + else + std::iter_swap(__a, __b); + } + template + inline _InputIterator + __find(_InputIterator __first, _InputIterator __last, + const _Tp& __val, input_iterator_tag) + { + while (__first != __last && !(*__first == __val)) + ++__first; + return __first; + } + template + inline _InputIterator + __find_if(_InputIterator __first, _InputIterator __last, + _Predicate __pred, input_iterator_tag) + { + while (__first != __last && !bool(__pred(*__first))) + ++__first; + return __first; + } + template + _RandomAccessIterator + __find(_RandomAccessIterator __first, _RandomAccessIterator __last, + const _Tp& __val, random_access_iterator_tag) + { + typename iterator_traits<_RandomAccessIterator>::difference_type + __trip_count = (__last - __first) >> 2; + for (; __trip_count > 0; --__trip_count) + { + if (*__first == __val) + return __first; + ++__first; + if (*__first == __val) + return __first; + ++__first; + if (*__first == __val) + return __first; + ++__first; + if (*__first == __val) + return __first; + ++__first; + } + switch (__last - __first) + { + case 3: + if (*__first == __val) + return __first; + ++__first; + case 2: + if (*__first == __val) + return __first; + ++__first; + case 1: + if (*__first == __val) + return __first; + ++__first; + case 0: + default: + return __last; + } + } + template + _RandomAccessIterator + __find_if(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Predicate __pred, random_access_iterator_tag) + { + typename iterator_traits<_RandomAccessIterator>::difference_type + __trip_count = (__last - __first) >> 2; + for (; __trip_count > 0; --__trip_count) + { + if (__pred(*__first)) + return __first; + ++__first; + if (__pred(*__first)) + return __first; + ++__first; + if (__pred(*__first)) + return __first; + ++__first; + if (__pred(*__first)) + return __first; + ++__first; + } + switch (__last - __first) + { + case 3: + if (__pred(*__first)) + return __first; + ++__first; + case 2: + if (__pred(*__first)) + return __first; + ++__first; + case 1: + if (__pred(*__first)) + return __first; + ++__first; + case 0: + default: + return __last; + } + } + template + _ForwardIterator + __search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, const _Tp& __val, + std::forward_iterator_tag) + { + __first = std::find(__first, __last, __val); + while (__first != __last) + { + typename iterator_traits<_ForwardIterator>::difference_type + __n = __count; + _ForwardIterator __i = __first; + ++__i; + while (__i != __last && __n != 1 && *__i == __val) + { + ++__i; + --__n; + } + if (__n == 1) + return __first; + if (__i == __last) + return __last; + __first = std::find(++__i, __last, __val); + } + return __last; + } + template + _RandomAccessIter + __search_n(_RandomAccessIter __first, _RandomAccessIter __last, + _Integer __count, const _Tp& __val, + std::random_access_iterator_tag) + { + typedef typename std::iterator_traits<_RandomAccessIter>::difference_type + _DistanceType; + _DistanceType __tailSize = __last - __first; + const _DistanceType __pattSize = __count; + if (__tailSize < __pattSize) + return __last; + const _DistanceType __skipOffset = __pattSize - 1; + _RandomAccessIter __lookAhead = __first + __skipOffset; + __tailSize -= __pattSize; + while (1) + { + while (!(*__lookAhead == __val)) + { + if (__tailSize < __pattSize) + return __last; + __lookAhead += __pattSize; + __tailSize -= __pattSize; + } + _DistanceType __remainder = __skipOffset; + for (_RandomAccessIter __backTrack = __lookAhead - 1; + *__backTrack == __val; --__backTrack) + { + if (--__remainder == 0) + return (__lookAhead - __skipOffset); + } + if (__remainder > __tailSize) + return __last; + __lookAhead += __remainder; + __tailSize -= __remainder; + } + } + template + _ForwardIterator + __search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, const _Tp& __val, + _BinaryPredicate __binary_pred, std::forward_iterator_tag) + { + while (__first != __last && !bool(__binary_pred(*__first, __val))) + ++__first; + while (__first != __last) + { + typename iterator_traits<_ForwardIterator>::difference_type + __n = __count; + _ForwardIterator __i = __first; + ++__i; + while (__i != __last && __n != 1 && bool(__binary_pred(*__i, __val))) + { + ++__i; + --__n; + } + if (__n == 1) + return __first; + if (__i == __last) + return __last; + __first = ++__i; + while (__first != __last + && !bool(__binary_pred(*__first, __val))) + ++__first; + } + return __last; + } + template + _RandomAccessIter + __search_n(_RandomAccessIter __first, _RandomAccessIter __last, + _Integer __count, const _Tp& __val, + _BinaryPredicate __binary_pred, std::random_access_iterator_tag) + { + typedef typename std::iterator_traits<_RandomAccessIter>::difference_type + _DistanceType; + _DistanceType __tailSize = __last - __first; + const _DistanceType __pattSize = __count; + if (__tailSize < __pattSize) + return __last; + const _DistanceType __skipOffset = __pattSize - 1; + _RandomAccessIter __lookAhead = __first + __skipOffset; + __tailSize -= __pattSize; + while (1) + { + while (!bool(__binary_pred(*__lookAhead, __val))) + { + if (__tailSize < __pattSize) + return __last; + __lookAhead += __pattSize; + __tailSize -= __pattSize; + } + _DistanceType __remainder = __skipOffset; + for (_RandomAccessIter __backTrack = __lookAhead - 1; + __binary_pred(*__backTrack, __val); --__backTrack) + { + if (--__remainder == 0) + return (__lookAhead - __skipOffset); + } + if (__remainder > __tailSize) + return __last; + __lookAhead += __remainder; + __tailSize -= __remainder; + } + } + template + _ForwardIterator1 + __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + forward_iterator_tag, forward_iterator_tag) + { + if (__first2 == __last2) + return __last1; + else + { + _ForwardIterator1 __result = __last1; + while (1) + { + _ForwardIterator1 __new_result + = std::search(__first1, __last1, __first2, __last2); + if (__new_result == __last1) + return __result; + else + { + __result = __new_result; + __first1 = __new_result; + ++__first1; + } + } + } + } + template + _ForwardIterator1 + __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + forward_iterator_tag, forward_iterator_tag, + _BinaryPredicate __comp) + { + if (__first2 == __last2) + return __last1; + else + { + _ForwardIterator1 __result = __last1; + while (1) + { + _ForwardIterator1 __new_result + = std::search(__first1, __last1, __first2, + __last2, __comp); + if (__new_result == __last1) + return __result; + else + { + __result = __new_result; + __first1 = __new_result; + ++__first1; + } + } + } + } + template + _BidirectionalIterator1 + __find_end(_BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + bidirectional_iterator_tag, bidirectional_iterator_tag) + { + + + typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; + typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; + _RevIterator1 __rlast1(__first1); + _RevIterator2 __rlast2(__first2); + _RevIterator1 __rresult = std::search(_RevIterator1(__last1), + __rlast1, + _RevIterator2(__last2), + __rlast2); + if (__rresult == __rlast1) + return __last1; + else + { + _BidirectionalIterator1 __result = __rresult.base(); + std::advance(__result, -std::distance(__first2, __last2)); + return __result; + } + } + template + _BidirectionalIterator1 + __find_end(_BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + bidirectional_iterator_tag, bidirectional_iterator_tag, + _BinaryPredicate __comp) + { + + + typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; + typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; + _RevIterator1 __rlast1(__first1); + _RevIterator2 __rlast2(__first2); + _RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1, + _RevIterator2(__last2), __rlast2, + __comp); + if (__rresult == __rlast1) + return __last1; + else + { + _BidirectionalIterator1 __result = __rresult.base(); + std::advance(__result, -std::distance(__first2, __last2)); + return __result; + } + } + template + inline _ForwardIterator1 + find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2) + { + + + + ; + ; + return std::__find_end(__first1, __last1, __first2, __last2, + std::__iterator_category(__first1), + std::__iterator_category(__first2)); + } + template + inline _ForwardIterator1 + find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + _BinaryPredicate __comp) + { + + + + ; + ; + return std::__find_end(__first1, __last1, __first2, __last2, + std::__iterator_category(__first1), + std::__iterator_category(__first2), + __comp); + } + template + _OutputIterator + remove_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, const _Tp& __value) + { + + + + ; + for (; __first != __last; ++__first) + if (!(*__first == __value)) + { + *__result = *__first; + ++__result; + } + return __result; + } + template + _OutputIterator + remove_copy_if(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _Predicate __pred) + { + + + + ; + for (; __first != __last; ++__first) + if (!bool(__pred(*__first))) + { + *__result = *__first; + ++__result; + } + return __result; + } + template + _ForwardIterator + remove(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __value) + { + + + ; + __first = std::find(__first, __last, __value); + if(__first == __last) + return __first; + _ForwardIterator __result = __first; + ++__first; + for(; __first != __last; ++__first) + if(!(*__first == __value)) + { + *__result = (*__first); + ++__result; + } + return __result; + } + template + _ForwardIterator + remove_if(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + + + ; + __first = std::find_if(__first, __last, __pred); + if(__first == __last) + return __first; + _ForwardIterator __result = __first; + ++__first; + for(; __first != __last; ++__first) + if(!bool(__pred(*__first))) + { + *__result = (*__first); + ++__result; + } + return __result; + } + template + _ForwardIterator + unique(_ForwardIterator __first, _ForwardIterator __last) + { + + + ; + __first = std::adjacent_find(__first, __last); + if (__first == __last) + return __last; + _ForwardIterator __dest = __first; + ++__first; + while (++__first != __last) + if (!(*__dest == *__first)) + *++__dest = (*__first); + return ++__dest; + } + template + _ForwardIterator + unique(_ForwardIterator __first, _ForwardIterator __last, + _BinaryPredicate __binary_pred) + { + + + ; + __first = std::adjacent_find(__first, __last, __binary_pred); + if (__first == __last) + return __last; + _ForwardIterator __dest = __first; + ++__first; + while (++__first != __last) + if (!bool(__binary_pred(*__dest, *__first))) + *++__dest = (*__first); + return ++__dest; + } + template + _OutputIterator + __unique_copy(_ForwardIterator __first, _ForwardIterator __last, + _OutputIterator __result, + forward_iterator_tag, output_iterator_tag) + { + _ForwardIterator __next = __first; + *__result = *__first; + while (++__next != __last) + if (!(*__first == *__next)) + { + __first = __next; + *++__result = *__first; + } + return ++__result; + } + template + _OutputIterator + __unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + input_iterator_tag, output_iterator_tag) + { + typename iterator_traits<_InputIterator>::value_type __value = *__first; + *__result = __value; + while (++__first != __last) + if (!(__value == *__first)) + { + __value = *__first; + *++__result = __value; + } + return ++__result; + } + template + _ForwardIterator + __unique_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, + input_iterator_tag, forward_iterator_tag) + { + *__result = *__first; + while (++__first != __last) + if (!(*__result == *__first)) + *++__result = *__first; + return ++__result; + } + template + _OutputIterator + __unique_copy(_ForwardIterator __first, _ForwardIterator __last, + _OutputIterator __result, _BinaryPredicate __binary_pred, + forward_iterator_tag, output_iterator_tag) + { + + _ForwardIterator __next = __first; + *__result = *__first; + while (++__next != __last) + if (!bool(__binary_pred(*__first, *__next))) + { + __first = __next; + *++__result = *__first; + } + return ++__result; + } + template + _OutputIterator + __unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _BinaryPredicate __binary_pred, + input_iterator_tag, output_iterator_tag) + { + + typename iterator_traits<_InputIterator>::value_type __value = *__first; + *__result = __value; + while (++__first != __last) + if (!bool(__binary_pred(__value, *__first))) + { + __value = *__first; + *++__result = __value; + } + return ++__result; + } + template + _ForwardIterator + __unique_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _BinaryPredicate __binary_pred, + input_iterator_tag, forward_iterator_tag) + { + + *__result = *__first; + while (++__first != __last) + if (!bool(__binary_pred(*__result, *__first))) + *++__result = *__first; + return ++__result; + } + template + void + __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last, + bidirectional_iterator_tag) + { + while (true) + if (__first == __last || __first == --__last) + return; + else + { + std::iter_swap(__first, __last); + ++__first; + } + } + template + void + __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last, + random_access_iterator_tag) + { + if (__first == __last) + return; + --__last; + while (__first < __last) + { + std::iter_swap(__first, __last); + ++__first; + --__last; + } + } + template + inline void + reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) + { + + ; + std::__reverse(__first, __last, std::__iterator_category(__first)); + } + template + _OutputIterator + reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, + _OutputIterator __result) + { + + + ; + while (__first != __last) + { + --__last; + *__result = *__last; + ++__result; + } + return __result; + } + template + _EuclideanRingElement + __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n) + { + while (__n != 0) + { + _EuclideanRingElement __t = __m % __n; + __m = __n; + __n = __t; + } + return __m; + } + template + void + __rotate(_ForwardIterator __first, + _ForwardIterator __middle, + _ForwardIterator __last, + forward_iterator_tag) + { + if (__first == __middle || __last == __middle) + return; + _ForwardIterator __first2 = __middle; + do + { + std::iter_swap(__first, __first2); + ++__first; + ++__first2; + if (__first == __middle) + __middle = __first2; + } + while (__first2 != __last); + __first2 = __middle; + while (__first2 != __last) + { + std::iter_swap(__first, __first2); + ++__first; + ++__first2; + if (__first == __middle) + __middle = __first2; + else if (__first2 == __last) + __first2 = __middle; + } + } + template + void + __rotate(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + bidirectional_iterator_tag) + { + + if (__first == __middle || __last == __middle) + return; + std::__reverse(__first, __middle, bidirectional_iterator_tag()); + std::__reverse(__middle, __last, bidirectional_iterator_tag()); + while (__first != __middle && __middle != __last) + { + std::iter_swap(__first, --__last); + ++__first; + } + if (__first == __middle) + std::__reverse(__middle, __last, bidirectional_iterator_tag()); + else + std::__reverse(__first, __middle, bidirectional_iterator_tag()); + } + template + void + __rotate(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last, + random_access_iterator_tag) + { + + if (__first == __middle || __last == __middle) + return; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _Distance; + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + _Distance __n = __last - __first; + _Distance __k = __middle - __first; + if (__k == __n - __k) + { + std::swap_ranges(__first, __middle, __middle); + return; + } + _RandomAccessIterator __p = __first; + for (;;) + { + if (__k < __n - __k) + { + if (__is_pod(_ValueType) && __k == 1) + { + _ValueType __t = (*__p); + std::copy(__p + 1, __p + __n, __p); + *(__p + __n - 1) = (__t); + return; + } + _RandomAccessIterator __q = __p + __k; + for (_Distance __i = 0; __i < __n - __k; ++ __i) + { + std::iter_swap(__p, __q); + ++__p; + ++__q; + } + __n %= __k; + if (__n == 0) + return; + std::swap(__n, __k); + __k = __n - __k; + } + else + { + __k = __n - __k; + if (__is_pod(_ValueType) && __k == 1) + { + _ValueType __t = (*(__p + __n - 1)); + std::copy_backward(__p, __p + __n - 1, __p + __n); + *__p = (__t); + return; + } + _RandomAccessIterator __q = __p + __n; + __p = __q - __k; + for (_Distance __i = 0; __i < __n - __k; ++ __i) + { + --__p; + --__q; + std::iter_swap(__p, __q); + } + __n %= __k; + if (__n == 0) + return; + std::swap(__n, __k); + } + } + } + template + inline void + rotate(_ForwardIterator __first, _ForwardIterator __middle, + _ForwardIterator __last) + { + + ; + ; + typedef typename iterator_traits<_ForwardIterator>::iterator_category + _IterType; + std::__rotate(__first, __middle, __last, _IterType()); + } + template + _OutputIterator + rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, + _ForwardIterator __last, _OutputIterator __result) + { + + + ; + ; + return std::copy(__first, __middle, + std::copy(__middle, __last, __result)); + } + template + _ForwardIterator + __partition(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred, forward_iterator_tag) + { + if (__first == __last) + return __first; + while (__pred(*__first)) + if (++__first == __last) + return __first; + _ForwardIterator __next = __first; + while (++__next != __last) + if (__pred(*__next)) + { + std::iter_swap(__first, __next); + ++__first; + } + return __first; + } + template + _BidirectionalIterator + __partition(_BidirectionalIterator __first, _BidirectionalIterator __last, + _Predicate __pred, bidirectional_iterator_tag) + { + while (true) + { + while (true) + if (__first == __last) + return __first; + else if (__pred(*__first)) + ++__first; + else + break; + --__last; + while (true) + if (__first == __last) + return __first; + else if (!bool(__pred(*__last))) + --__last; + else + break; + std::iter_swap(__first, __last); + ++__first; + } + } + template + _ForwardIterator + __inplace_stable_partition(_ForwardIterator __first, + _ForwardIterator __last, + _Predicate __pred, _Distance __len) + { + if (__len == 1) + return __pred(*__first) ? __last : __first; + _ForwardIterator __middle = __first; + std::advance(__middle, __len / 2); + _ForwardIterator __begin = std::__inplace_stable_partition(__first, + __middle, + __pred, + __len / 2); + _ForwardIterator __end = std::__inplace_stable_partition(__middle, __last, + __pred, + __len + - __len / 2); + std::rotate(__begin, __middle, __end); + std::advance(__begin, std::distance(__middle, __end)); + return __begin; + } + template + _ForwardIterator + __stable_partition_adaptive(_ForwardIterator __first, + _ForwardIterator __last, + _Predicate __pred, _Distance __len, + _Pointer __buffer, + _Distance __buffer_size) + { + if (__len <= __buffer_size) + { + _ForwardIterator __result1 = __first; + _Pointer __result2 = __buffer; + for (; __first != __last; ++__first) + if (__pred(*__first)) + { + *__result1 = (*__first); + ++__result1; + } + else + { + *__result2 = (*__first); + ++__result2; + } + std::copy(__buffer, __result2, __result1); + return __result1; + } + else + { + _ForwardIterator __middle = __first; + std::advance(__middle, __len / 2); + _ForwardIterator __begin = + std::__stable_partition_adaptive(__first, __middle, __pred, + __len / 2, __buffer, + __buffer_size); + _ForwardIterator __end = + std::__stable_partition_adaptive(__middle, __last, __pred, + __len - __len / 2, + __buffer, __buffer_size); + std::rotate(__begin, __middle, __end); + std::advance(__begin, std::distance(__middle, __end)); + return __begin; + } + } + template + _ForwardIterator + stable_partition(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + + + ; + if (__first == __last) + return __first; + else + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + _Temporary_buffer<_ForwardIterator, _ValueType> __buf(__first, + __last); + if (__buf.size() > 0) + return + std::__stable_partition_adaptive(__first, __last, __pred, + _DistanceType(__buf.requested_size()), + __buf.begin(), + _DistanceType(__buf.size())); + else + return + std::__inplace_stable_partition(__first, __last, __pred, + _DistanceType(__buf.requested_size())); + } + } + template + void + __heap_select(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last) + { + std::make_heap(__first, __middle); + for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) + if (*__i < *__first) + std::__pop_heap(__first, __middle, __i); + } + template + void + __heap_select(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last, _Compare __comp) + { + std::make_heap(__first, __middle, __comp); + for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) + if (__comp(*__i, *__first)) + std::__pop_heap(__first, __middle, __i, __comp); + } + template + _RandomAccessIterator + partial_sort_copy(_InputIterator __first, _InputIterator __last, + _RandomAccessIterator __result_first, + _RandomAccessIterator __result_last) + { + typedef typename iterator_traits<_InputIterator>::value_type + _InputValueType; + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _OutputValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + ; + ; + if (__result_first == __result_last) + return __result_last; + _RandomAccessIterator __result_real_last = __result_first; + while(__first != __last && __result_real_last != __result_last) + { + *__result_real_last = *__first; + ++__result_real_last; + ++__first; + } + std::make_heap(__result_first, __result_real_last); + while (__first != __last) + { + if (*__first < *__result_first) + std::__adjust_heap(__result_first, _DistanceType(0), + _DistanceType(__result_real_last + - __result_first), + _InputValueType(*__first)); + ++__first; + } + std::sort_heap(__result_first, __result_real_last); + return __result_real_last; + } + template + _RandomAccessIterator + partial_sort_copy(_InputIterator __first, _InputIterator __last, + _RandomAccessIterator __result_first, + _RandomAccessIterator __result_last, + _Compare __comp) + { + typedef typename iterator_traits<_InputIterator>::value_type + _InputValueType; + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _OutputValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + + ; + ; + if (__result_first == __result_last) + return __result_last; + _RandomAccessIterator __result_real_last = __result_first; + while(__first != __last && __result_real_last != __result_last) + { + *__result_real_last = *__first; + ++__result_real_last; + ++__first; + } + std::make_heap(__result_first, __result_real_last, __comp); + while (__first != __last) + { + if (__comp(*__first, *__result_first)) + std::__adjust_heap(__result_first, _DistanceType(0), + _DistanceType(__result_real_last + - __result_first), + _InputValueType(*__first), + __comp); + ++__first; + } + std::sort_heap(__result_first, __result_real_last, __comp); + return __result_real_last; + } + template + void + __unguarded_linear_insert(_RandomAccessIterator __last) + { + typename iterator_traits<_RandomAccessIterator>::value_type + __val = (*__last); + _RandomAccessIterator __next = __last; + --__next; + while (__val < *__next) + { + *__last = (*__next); + __last = __next; + --__next; + } + *__last = (__val); + } + template + void + __unguarded_linear_insert(_RandomAccessIterator __last, + _Compare __comp) + { + typename iterator_traits<_RandomAccessIterator>::value_type + __val = (*__last); + _RandomAccessIterator __next = __last; + --__next; + while (__comp(__val, *__next)) + { + *__last = (*__next); + __last = __next; + --__next; + } + *__last = (__val); + } + template + void + __insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last) + { + if (__first == __last) + return; + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + { + if (*__i < *__first) + { + typename iterator_traits<_RandomAccessIterator>::value_type + __val = (*__i); + std::copy_backward(__first, __i, __i + 1); + *__first = (__val); + } + else + std::__unguarded_linear_insert(__i); + } + } + template + void + __insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + if (__first == __last) return; + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + { + if (__comp(*__i, *__first)) + { + typename iterator_traits<_RandomAccessIterator>::value_type + __val = (*__i); + std::copy_backward(__first, __i, __i + 1); + *__first = (__val); + } + else + std::__unguarded_linear_insert(__i, __comp); + } + } + template + inline void + __unguarded_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + for (_RandomAccessIterator __i = __first; __i != __last; ++__i) + std::__unguarded_linear_insert(__i); + } + template + inline void + __unguarded_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + for (_RandomAccessIterator __i = __first; __i != __last; ++__i) + std::__unguarded_linear_insert(__i, __comp); + } + enum { _S_threshold = 16 }; + template + void + __final_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last) + { + if (__last - __first > int(_S_threshold)) + { + std::__insertion_sort(__first, __first + int(_S_threshold)); + std::__unguarded_insertion_sort(__first + int(_S_threshold), __last); + } + else + std::__insertion_sort(__first, __last); + } + template + void + __final_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + if (__last - __first > int(_S_threshold)) + { + std::__insertion_sort(__first, __first + int(_S_threshold), __comp); + std::__unguarded_insertion_sort(__first + int(_S_threshold), __last, + __comp); + } + else + std::__insertion_sort(__first, __last, __comp); + } + template + _RandomAccessIterator + __unguarded_partition(_RandomAccessIterator __first, + _RandomAccessIterator __last, const _Tp& __pivot) + { + while (true) + { + while (*__first < __pivot) + ++__first; + --__last; + while (__pivot < *__last) + --__last; + if (!(__first < __last)) + return __first; + std::iter_swap(__first, __last); + ++__first; + } + } + template + _RandomAccessIterator + __unguarded_partition(_RandomAccessIterator __first, + _RandomAccessIterator __last, + const _Tp& __pivot, _Compare __comp) + { + while (true) + { + while (__comp(*__first, __pivot)) + ++__first; + --__last; + while (__comp(__pivot, *__last)) + --__last; + if (!(__first < __last)) + return __first; + std::iter_swap(__first, __last); + ++__first; + } + } + template + inline _RandomAccessIterator + __unguarded_partition_pivot(_RandomAccessIterator __first, + _RandomAccessIterator __last) + { + _RandomAccessIterator __mid = __first + (__last - __first) / 2; + std::__move_median_first(__first, __mid, (__last - 1)); + return std::__unguarded_partition(__first + 1, __last, *__first); + } + template + inline _RandomAccessIterator + __unguarded_partition_pivot(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + _RandomAccessIterator __mid = __first + (__last - __first) / 2; + std::__move_median_first(__first, __mid, (__last - 1), __comp); + return std::__unguarded_partition(__first + 1, __last, *__first, __comp); + } + template + void + __introsort_loop(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Size __depth_limit) + { + while (__last - __first > int(_S_threshold)) + { + if (__depth_limit == 0) + { + std::partial_sort(__first, __last, __last); + return; + } + --__depth_limit; + _RandomAccessIterator __cut = + std::__unguarded_partition_pivot(__first, __last); + std::__introsort_loop(__cut, __last, __depth_limit); + __last = __cut; + } + } + template + void + __introsort_loop(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Size __depth_limit, _Compare __comp) + { + while (__last - __first > int(_S_threshold)) + { + if (__depth_limit == 0) + { + std::partial_sort(__first, __last, __last, __comp); + return; + } + --__depth_limit; + _RandomAccessIterator __cut = + std::__unguarded_partition_pivot(__first, __last, __comp); + std::__introsort_loop(__cut, __last, __depth_limit, __comp); + __last = __cut; + } + } + template + void + __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last, _Size __depth_limit) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + while (__last - __first > 3) + { + if (__depth_limit == 0) + { + std::__heap_select(__first, __nth + 1, __last); + std::iter_swap(__first, __nth); + return; + } + --__depth_limit; + _RandomAccessIterator __cut = + std::__unguarded_partition_pivot(__first, __last); + if (__cut <= __nth) + __first = __cut; + else + __last = __cut; + } + std::__insertion_sort(__first, __last); + } + template + void + __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last, _Size __depth_limit, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + while (__last - __first > 3) + { + if (__depth_limit == 0) + { + std::__heap_select(__first, __nth + 1, __last, __comp); + std::iter_swap(__first, __nth); + return; + } + --__depth_limit; + _RandomAccessIterator __cut = + std::__unguarded_partition_pivot(__first, __last, __comp); + if (__cut <= __nth) + __first = __cut; + else + __last = __cut; + } + std::__insertion_sort(__first, __last, __comp); + } + template + _ForwardIterator + lower_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + + ; + _DistanceType __len = std::distance(__first, __last); + _DistanceType __half; + _ForwardIterator __middle; + while (__len > 0) + { + __half = __len >> 1; + __middle = __first; + std::advance(__middle, __half); + if (__comp(*__middle, __val)) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else + __len = __half; + } + return __first; + } + template + _ForwardIterator + upper_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + ; + _DistanceType __len = std::distance(__first, __last); + _DistanceType __half; + _ForwardIterator __middle; + while (__len > 0) + { + __half = __len >> 1; + __middle = __first; + std::advance(__middle, __half); + if (__val < *__middle) + __len = __half; + else + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + } + return __first; + } + template + _ForwardIterator + upper_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + + ; + _DistanceType __len = std::distance(__first, __last); + _DistanceType __half; + _ForwardIterator __middle; + while (__len > 0) + { + __half = __len >> 1; + __middle = __first; + std::advance(__middle, __half); + if (__comp(__val, *__middle)) + __len = __half; + else + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + } + return __first; + } + template + pair<_ForwardIterator, _ForwardIterator> + equal_range(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + + ; + ; + _DistanceType __len = std::distance(__first, __last); + _DistanceType __half; + _ForwardIterator __middle, __left, __right; + while (__len > 0) + { + __half = __len >> 1; + __middle = __first; + std::advance(__middle, __half); + if (*__middle < __val) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else if (__val < *__middle) + __len = __half; + else + { + __left = std::lower_bound(__first, __middle, __val); + std::advance(__first, __len); + __right = std::upper_bound(++__middle, __first, __val); + return pair<_ForwardIterator, _ForwardIterator>(__left, __right); + } + } + return pair<_ForwardIterator, _ForwardIterator>(__first, __first); + } + template + pair<_ForwardIterator, _ForwardIterator> + equal_range(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, + _Compare __comp) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + + + ; + + ; + _DistanceType __len = std::distance(__first, __last); + _DistanceType __half; + _ForwardIterator __middle, __left, __right; + while (__len > 0) + { + __half = __len >> 1; + __middle = __first; + std::advance(__middle, __half); + if (__comp(*__middle, __val)) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else if (__comp(__val, *__middle)) + __len = __half; + else + { + __left = std::lower_bound(__first, __middle, __val, __comp); + std::advance(__first, __len); + __right = std::upper_bound(++__middle, __first, __val, __comp); + return pair<_ForwardIterator, _ForwardIterator>(__left, __right); + } + } + return pair<_ForwardIterator, _ForwardIterator>(__first, __first); + } + template + bool + binary_search(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + + ; + ; + _ForwardIterator __i = std::lower_bound(__first, __last, __val); + return __i != __last && !(__val < *__i); + } + template + bool + binary_search(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + + + ; + + ; + _ForwardIterator __i = std::lower_bound(__first, __last, __val, __comp); + return __i != __last && !bool(__comp(__val, *__i)); + } + template + _BidirectionalIterator3 + __merge_backward(_BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + _BidirectionalIterator3 __result) + { + if (__first1 == __last1) + return std::copy_backward(__first2, __last2, __result); + if (__first2 == __last2) + return std::copy_backward(__first1, __last1, __result); + --__last1; + --__last2; + while (true) + { + if (*__last2 < *__last1) + { + *--__result = *__last1; + if (__first1 == __last1) + return std::copy_backward(__first2, ++__last2, __result); + --__last1; + } + else + { + *--__result = *__last2; + if (__first2 == __last2) + return std::copy_backward(__first1, ++__last1, __result); + --__last2; + } + } + } + template + _BidirectionalIterator3 + __merge_backward(_BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + _BidirectionalIterator3 __result, + _Compare __comp) + { + if (__first1 == __last1) + return std::copy_backward(__first2, __last2, __result); + if (__first2 == __last2) + return std::copy_backward(__first1, __last1, __result); + --__last1; + --__last2; + while (true) + { + if (__comp(*__last2, *__last1)) + { + *--__result = *__last1; + if (__first1 == __last1) + return std::copy_backward(__first2, ++__last2, __result); + --__last1; + } + else + { + *--__result = *__last2; + if (__first2 == __last2) + return std::copy_backward(__first1, ++__last1, __result); + --__last2; + } + } + } + template + _BidirectionalIterator1 + __rotate_adaptive(_BidirectionalIterator1 __first, + _BidirectionalIterator1 __middle, + _BidirectionalIterator1 __last, + _Distance __len1, _Distance __len2, + _BidirectionalIterator2 __buffer, + _Distance __buffer_size) + { + _BidirectionalIterator2 __buffer_end; + if (__len1 > __len2 && __len2 <= __buffer_size) + { + __buffer_end = std::copy(__middle, __last, __buffer); + std::copy_backward(__first, __middle, __last); + return std::copy(__buffer, __buffer_end, __first); + } + else if (__len1 <= __buffer_size) + { + __buffer_end = std::copy(__first, __middle, __buffer); + std::copy(__middle, __last, __first); + return std::copy_backward(__buffer, __buffer_end, __last); + } + else + { + std::rotate(__first, __middle, __last); + std::advance(__first, std::distance(__middle, __last)); + return __first; + } + } + template + void + __merge_adaptive(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Distance __len1, _Distance __len2, + _Pointer __buffer, _Distance __buffer_size) + { + if (__len1 <= __len2 && __len1 <= __buffer_size) + { + _Pointer __buffer_end = std::copy(__first, __middle, __buffer); + std::merge((__buffer), + (__buffer_end), + (__middle), + (__last), + __first); + } + else if (__len2 <= __buffer_size) + { + _Pointer __buffer_end = std::copy(__middle, __last, __buffer); + std::__merge_backward((__first), + (__middle), + (__buffer), + (__buffer_end), + __last); + } + else + { + _BidirectionalIterator __first_cut = __first; + _BidirectionalIterator __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) + { + __len11 = __len1 / 2; + std::advance(__first_cut, __len11); + __second_cut = std::lower_bound(__middle, __last, + *__first_cut); + __len22 = std::distance(__middle, __second_cut); + } + else + { + __len22 = __len2 / 2; + std::advance(__second_cut, __len22); + __first_cut = std::upper_bound(__first, __middle, + *__second_cut); + __len11 = std::distance(__first, __first_cut); + } + _BidirectionalIterator __new_middle = + std::__rotate_adaptive(__first_cut, __middle, __second_cut, + __len1 - __len11, __len22, __buffer, + __buffer_size); + std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, + __len22, __buffer, __buffer_size); + std::__merge_adaptive(__new_middle, __second_cut, __last, + __len1 - __len11, + __len2 - __len22, __buffer, __buffer_size); + } + } + template + void + __merge_adaptive(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Distance __len1, _Distance __len2, + _Pointer __buffer, _Distance __buffer_size, + _Compare __comp) + { + if (__len1 <= __len2 && __len1 <= __buffer_size) + { + _Pointer __buffer_end = std::copy(__first, __middle, __buffer); + std::merge((__buffer), + (__buffer_end), + (__middle), + (__last), + __first, __comp); + } + else if (__len2 <= __buffer_size) + { + _Pointer __buffer_end = std::copy(__middle, __last, __buffer); + std::__merge_backward((__first), + (__middle), + (__buffer), + (__buffer_end), + __last,__comp); + } + else + { + _BidirectionalIterator __first_cut = __first; + _BidirectionalIterator __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) + { + __len11 = __len1 / 2; + std::advance(__first_cut, __len11); + __second_cut = std::lower_bound(__middle, __last, *__first_cut, + __comp); + __len22 = std::distance(__middle, __second_cut); + } + else + { + __len22 = __len2 / 2; + std::advance(__second_cut, __len22); + __first_cut = std::upper_bound(__first, __middle, *__second_cut, + __comp); + __len11 = std::distance(__first, __first_cut); + } + _BidirectionalIterator __new_middle = + std::__rotate_adaptive(__first_cut, __middle, __second_cut, + __len1 - __len11, __len22, __buffer, + __buffer_size); + std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, + __len22, __buffer, __buffer_size, __comp); + std::__merge_adaptive(__new_middle, __second_cut, __last, + __len1 - __len11, + __len2 - __len22, __buffer, + __buffer_size, __comp); + } + } + template + void + __merge_without_buffer(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Distance __len1, _Distance __len2) + { + if (__len1 == 0 || __len2 == 0) + return; + if (__len1 + __len2 == 2) + { + if (*__middle < *__first) + std::iter_swap(__first, __middle); + return; + } + _BidirectionalIterator __first_cut = __first; + _BidirectionalIterator __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) + { + __len11 = __len1 / 2; + std::advance(__first_cut, __len11); + __second_cut = std::lower_bound(__middle, __last, *__first_cut); + __len22 = std::distance(__middle, __second_cut); + } + else + { + __len22 = __len2 / 2; + std::advance(__second_cut, __len22); + __first_cut = std::upper_bound(__first, __middle, *__second_cut); + __len11 = std::distance(__first, __first_cut); + } + std::rotate(__first_cut, __middle, __second_cut); + _BidirectionalIterator __new_middle = __first_cut; + std::advance(__new_middle, std::distance(__middle, __second_cut)); + std::__merge_without_buffer(__first, __first_cut, __new_middle, + __len11, __len22); + std::__merge_without_buffer(__new_middle, __second_cut, __last, + __len1 - __len11, __len2 - __len22); + } + template + void + __merge_without_buffer(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Distance __len1, _Distance __len2, + _Compare __comp) + { + if (__len1 == 0 || __len2 == 0) + return; + if (__len1 + __len2 == 2) + { + if (__comp(*__middle, *__first)) + std::iter_swap(__first, __middle); + return; + } + _BidirectionalIterator __first_cut = __first; + _BidirectionalIterator __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) + { + __len11 = __len1 / 2; + std::advance(__first_cut, __len11); + __second_cut = std::lower_bound(__middle, __last, *__first_cut, + __comp); + __len22 = std::distance(__middle, __second_cut); + } + else + { + __len22 = __len2 / 2; + std::advance(__second_cut, __len22); + __first_cut = std::upper_bound(__first, __middle, *__second_cut, + __comp); + __len11 = std::distance(__first, __first_cut); + } + std::rotate(__first_cut, __middle, __second_cut); + _BidirectionalIterator __new_middle = __first_cut; + std::advance(__new_middle, std::distance(__middle, __second_cut)); + std::__merge_without_buffer(__first, __first_cut, __new_middle, + __len11, __len22, __comp); + std::__merge_without_buffer(__new_middle, __second_cut, __last, + __len1 - __len11, __len2 - __len22, __comp); + } + template + void + inplace_merge(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last) + { + typedef typename iterator_traits<_BidirectionalIterator>::value_type + _ValueType; + typedef typename iterator_traits<_BidirectionalIterator>::difference_type + _DistanceType; + + + ; + ; + if (__first == __middle || __middle == __last) + return; + _DistanceType __len1 = std::distance(__first, __middle); + _DistanceType __len2 = std::distance(__middle, __last); + _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first, + __last); + if (__buf.begin() == 0) + std::__merge_without_buffer(__first, __middle, __last, __len1, __len2); + else + std::__merge_adaptive(__first, __middle, __last, __len1, __len2, + __buf.begin(), _DistanceType(__buf.size())); + } + template + void + inplace_merge(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_BidirectionalIterator>::value_type + _ValueType; + typedef typename iterator_traits<_BidirectionalIterator>::difference_type + _DistanceType; + + + ; + ; + if (__first == __middle || __middle == __last) + return; + const _DistanceType __len1 = std::distance(__first, __middle); + const _DistanceType __len2 = std::distance(__middle, __last); + _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first, + __last); + if (__buf.begin() == 0) + std::__merge_without_buffer(__first, __middle, __last, __len1, + __len2, __comp); + else + std::__merge_adaptive(__first, __middle, __last, __len1, __len2, + __buf.begin(), _DistanceType(__buf.size()), + __comp); + } + template + void + __merge_sort_loop(_RandomAccessIterator1 __first, + _RandomAccessIterator1 __last, + _RandomAccessIterator2 __result, + _Distance __step_size) + { + const _Distance __two_step = 2 * __step_size; + while (__last - __first >= __two_step) + { + __result = std::merge( + (__first), + (__first + __step_size), + (__first + __step_size), + (__first + __two_step), + __result); + __first += __two_step; + } + __step_size = std::min(_Distance(__last - __first), __step_size); + std::merge((__first), + (__first + __step_size) + , + (__first + __step_size) + , + (__last), + __result); + } + template + void + __merge_sort_loop(_RandomAccessIterator1 __first, + _RandomAccessIterator1 __last, + _RandomAccessIterator2 __result, _Distance __step_size, + _Compare __comp) + { + const _Distance __two_step = 2 * __step_size; + while (__last - __first >= __two_step) + { + __result = std::merge( + (__first), + (__first + __step_size), + (__first + __step_size), + (__first + __two_step), + __result, __comp); + __first += __two_step; + } + __step_size = std::min(_Distance(__last - __first), __step_size); + std::merge((__first), + (__first + __step_size) + , + (__first + __step_size) + , + (__last), + __result, __comp); + } + template + void + __chunk_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Distance __chunk_size) + { + while (__last - __first >= __chunk_size) + { + std::__insertion_sort(__first, __first + __chunk_size); + __first += __chunk_size; + } + std::__insertion_sort(__first, __last); + } + template + void + __chunk_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Distance __chunk_size, _Compare __comp) + { + while (__last - __first >= __chunk_size) + { + std::__insertion_sort(__first, __first + __chunk_size, __comp); + __first += __chunk_size; + } + std::__insertion_sort(__first, __last, __comp); + } + enum { _S_chunk_size = 7 }; + template + void + __merge_sort_with_buffer(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Pointer __buffer) + { + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _Distance; + const _Distance __len = __last - __first; + const _Pointer __buffer_last = __buffer + __len; + _Distance __step_size = _S_chunk_size; + std::__chunk_insertion_sort(__first, __last, __step_size); + while (__step_size < __len) + { + std::__merge_sort_loop(__first, __last, __buffer, __step_size); + __step_size *= 2; + std::__merge_sort_loop(__buffer, __buffer_last, __first, __step_size); + __step_size *= 2; + } + } + template + void + __merge_sort_with_buffer(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Pointer __buffer, _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _Distance; + const _Distance __len = __last - __first; + const _Pointer __buffer_last = __buffer + __len; + _Distance __step_size = _S_chunk_size; + std::__chunk_insertion_sort(__first, __last, __step_size, __comp); + while (__step_size < __len) + { + std::__merge_sort_loop(__first, __last, __buffer, + __step_size, __comp); + __step_size *= 2; + std::__merge_sort_loop(__buffer, __buffer_last, __first, + __step_size, __comp); + __step_size *= 2; + } + } + template + void + __stable_sort_adaptive(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Pointer __buffer, _Distance __buffer_size) + { + const _Distance __len = (__last - __first + 1) / 2; + const _RandomAccessIterator __middle = __first + __len; + if (__len > __buffer_size) + { + std::__stable_sort_adaptive(__first, __middle, + __buffer, __buffer_size); + std::__stable_sort_adaptive(__middle, __last, + __buffer, __buffer_size); + } + else + { + std::__merge_sort_with_buffer(__first, __middle, __buffer); + std::__merge_sort_with_buffer(__middle, __last, __buffer); + } + std::__merge_adaptive(__first, __middle, __last, + _Distance(__middle - __first), + _Distance(__last - __middle), + __buffer, __buffer_size); + } + template + void + __stable_sort_adaptive(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Pointer __buffer, _Distance __buffer_size, + _Compare __comp) + { + const _Distance __len = (__last - __first + 1) / 2; + const _RandomAccessIterator __middle = __first + __len; + if (__len > __buffer_size) + { + std::__stable_sort_adaptive(__first, __middle, __buffer, + __buffer_size, __comp); + std::__stable_sort_adaptive(__middle, __last, __buffer, + __buffer_size, __comp); + } + else + { + std::__merge_sort_with_buffer(__first, __middle, __buffer, __comp); + std::__merge_sort_with_buffer(__middle, __last, __buffer, __comp); + } + std::__merge_adaptive(__first, __middle, __last, + _Distance(__middle - __first), + _Distance(__last - __middle), + __buffer, __buffer_size, + __comp); + } + template + void + __inplace_stable_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last) + { + if (__last - __first < 15) + { + std::__insertion_sort(__first, __last); + return; + } + _RandomAccessIterator __middle = __first + (__last - __first) / 2; + std::__inplace_stable_sort(__first, __middle); + std::__inplace_stable_sort(__middle, __last); + std::__merge_without_buffer(__first, __middle, __last, + __middle - __first, + __last - __middle); + } + template + void + __inplace_stable_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + if (__last - __first < 15) + { + std::__insertion_sort(__first, __last, __comp); + return; + } + _RandomAccessIterator __middle = __first + (__last - __first) / 2; + std::__inplace_stable_sort(__first, __middle, __comp); + std::__inplace_stable_sort(__middle, __last, __comp); + std::__merge_without_buffer(__first, __middle, __last, + __middle - __first, + __last - __middle, + __comp); + } + template + bool + includes(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + ; + ; + while (__first1 != __last1 && __first2 != __last2) + if (*__first2 < *__first1) + return false; + else if(*__first1 < *__first2) + ++__first1; + else + ++__first1, ++__first2; + return __first2 == __last2; + } + template + bool + includes(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + ; + ; + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first2, *__first1)) + return false; + else if(__comp(*__first1, *__first2)) + ++__first1; + else + ++__first1, ++__first2; + return __first2 == __last2; + } + template + bool + next_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last) + { + + + ; + if (__first == __last) + return false; + _BidirectionalIterator __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + for(;;) + { + _BidirectionalIterator __ii = __i; + --__i; + if (*__i < *__ii) + { + _BidirectionalIterator __j = __last; + while (!(*__i < *--__j)) + {} + std::iter_swap(__i, __j); + std::reverse(__ii, __last); + return true; + } + if (__i == __first) + { + std::reverse(__first, __last); + return false; + } + } + } + template + bool + next_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last, _Compare __comp) + { + + + ; + if (__first == __last) + return false; + _BidirectionalIterator __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + for(;;) + { + _BidirectionalIterator __ii = __i; + --__i; + if (__comp(*__i, *__ii)) + { + _BidirectionalIterator __j = __last; + while (!bool(__comp(*__i, *--__j))) + {} + std::iter_swap(__i, __j); + std::reverse(__ii, __last); + return true; + } + if (__i == __first) + { + std::reverse(__first, __last); + return false; + } + } + } + template + bool + prev_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last) + { + + + ; + if (__first == __last) + return false; + _BidirectionalIterator __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + for(;;) + { + _BidirectionalIterator __ii = __i; + --__i; + if (*__ii < *__i) + { + _BidirectionalIterator __j = __last; + while (!(*--__j < *__i)) + {} + std::iter_swap(__i, __j); + std::reverse(__ii, __last); + return true; + } + if (__i == __first) + { + std::reverse(__first, __last); + return false; + } + } + } + template + bool + prev_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last, _Compare __comp) + { + + + ; + if (__first == __last) + return false; + _BidirectionalIterator __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + for(;;) + { + _BidirectionalIterator __ii = __i; + --__i; + if (__comp(*__ii, *__i)) + { + _BidirectionalIterator __j = __last; + while (!bool(__comp(*--__j, *__i))) + {} + std::iter_swap(__i, __j); + std::reverse(__ii, __last); + return true; + } + if (__i == __first) + { + std::reverse(__first, __last); + return false; + } + } + } + template + _OutputIterator + replace_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + const _Tp& __old_value, const _Tp& __new_value) + { + + + + ; + for (; __first != __last; ++__first, ++__result) + if (*__first == __old_value) + *__result = __new_value; + else + *__result = *__first; + return __result; + } + template + _OutputIterator + replace_copy_if(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + _Predicate __pred, const _Tp& __new_value) + { + + + + ; + for (; __first != __last; ++__first, ++__result) + if (__pred(*__first)) + *__result = __new_value; + else + *__result = *__first; + return __result; + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + _Function + for_each(_InputIterator __first, _InputIterator __last, _Function __f) + { + + ; + for (; __first != __last; ++__first) + __f(*__first); + return (__f); + } + template + inline _InputIterator + find(_InputIterator __first, _InputIterator __last, + const _Tp& __val) + { + + + ; + return std::__find(__first, __last, __val, + std::__iterator_category(__first)); + } + template + inline _InputIterator + find_if(_InputIterator __first, _InputIterator __last, + _Predicate __pred) + { + + + ; + return std::__find_if(__first, __last, __pred, + std::__iterator_category(__first)); + } + template + _InputIterator + find_first_of(_InputIterator __first1, _InputIterator __last1, + _ForwardIterator __first2, _ForwardIterator __last2) + { + + + + ; + ; + for (; __first1 != __last1; ++__first1) + for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) + if (*__first1 == *__iter) + return __first1; + return __last1; + } + template + _InputIterator + find_first_of(_InputIterator __first1, _InputIterator __last1, + _ForwardIterator __first2, _ForwardIterator __last2, + _BinaryPredicate __comp) + { + + + + ; + ; + for (; __first1 != __last1; ++__first1) + for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) + if (__comp(*__first1, *__iter)) + return __first1; + return __last1; + } + template + _ForwardIterator + adjacent_find(_ForwardIterator __first, _ForwardIterator __last) + { + + + ; + if (__first == __last) + return __last; + _ForwardIterator __next = __first; + while(++__next != __last) + { + if (*__first == *__next) + return __first; + __first = __next; + } + return __last; + } + template + _ForwardIterator + adjacent_find(_ForwardIterator __first, _ForwardIterator __last, + _BinaryPredicate __binary_pred) + { + + + ; + if (__first == __last) + return __last; + _ForwardIterator __next = __first; + while(++__next != __last) + { + if (__binary_pred(*__first, *__next)) + return __first; + __first = __next; + } + return __last; + } + template + typename iterator_traits<_InputIterator>::difference_type + count(_InputIterator __first, _InputIterator __last, const _Tp& __value) + { + + + ; + typename iterator_traits<_InputIterator>::difference_type __n = 0; + for (; __first != __last; ++__first) + if (*__first == __value) + ++__n; + return __n; + } + template + typename iterator_traits<_InputIterator>::difference_type + count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) + { + + + ; + typename iterator_traits<_InputIterator>::difference_type __n = 0; + for (; __first != __last; ++__first) + if (__pred(*__first)) + ++__n; + return __n; + } + template + _ForwardIterator1 + search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2) + { + + + + ; + ; + if (__first1 == __last1 || __first2 == __last2) + return __first1; + _ForwardIterator2 __p1(__first2); + if (++__p1 == __last2) + return std::find(__first1, __last1, *__first2); + _ForwardIterator2 __p; + _ForwardIterator1 __current = __first1; + for (;;) + { + __first1 = std::find(__first1, __last1, *__first2); + if (__first1 == __last1) + return __last1; + __p = __p1; + __current = __first1; + if (++__current == __last1) + return __last1; + while (*__current == *__p) + { + if (++__p == __last2) + return __first1; + if (++__current == __last1) + return __last1; + } + ++__first1; + } + return __first1; + } + template + _ForwardIterator1 + search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + _BinaryPredicate __predicate) + { + + + + ; + ; + if (__first1 == __last1 || __first2 == __last2) + return __first1; + _ForwardIterator2 __p1(__first2); + if (++__p1 == __last2) + { + while (__first1 != __last1 + && !bool(__predicate(*__first1, *__first2))) + ++__first1; + return __first1; + } + _ForwardIterator2 __p; + _ForwardIterator1 __current = __first1; + for (;;) + { + while (__first1 != __last1 + && !bool(__predicate(*__first1, *__first2))) + ++__first1; + if (__first1 == __last1) + return __last1; + __p = __p1; + __current = __first1; + if (++__current == __last1) + return __last1; + while (__predicate(*__current, *__p)) + { + if (++__p == __last2) + return __first1; + if (++__current == __last1) + return __last1; + } + ++__first1; + } + return __first1; + } + template + _ForwardIterator + search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, const _Tp& __val) + { + + + ; + if (__count <= 0) + return __first; + if (__count == 1) + return std::find(__first, __last, __val); + return std::__search_n(__first, __last, __count, __val, + std::__iterator_category(__first)); + } + template + _ForwardIterator + search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, const _Tp& __val, + _BinaryPredicate __binary_pred) + { + + + ; + if (__count <= 0) + return __first; + if (__count == 1) + { + while (__first != __last && !bool(__binary_pred(*__first, __val))) + ++__first; + return __first; + } + return std::__search_n(__first, __last, __count, __val, __binary_pred, + std::__iterator_category(__first)); + } + template + _OutputIterator + transform(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _UnaryOperation __unary_op) + { + + + ; + for (; __first != __last; ++__first, ++__result) + *__result = __unary_op(*__first); + return __result; + } + template + _OutputIterator + transform(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _OutputIterator __result, + _BinaryOperation __binary_op) + { + + + + ; + for (; __first1 != __last1; ++__first1, ++__first2, ++__result) + *__result = __binary_op(*__first1, *__first2); + return __result; + } + template + void + replace(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __old_value, const _Tp& __new_value) + { + + + + ; + for (; __first != __last; ++__first) + if (*__first == __old_value) + *__first = __new_value; + } + template + void + replace_if(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred, const _Tp& __new_value) + { + + + + ; + for (; __first != __last; ++__first) + if (__pred(*__first)) + *__first = __new_value; + } + template + void + generate(_ForwardIterator __first, _ForwardIterator __last, + _Generator __gen) + { + + + ; + for (; __first != __last; ++__first) + *__first = __gen(); + } + template + _OutputIterator + generate_n(_OutputIterator __first, _Size __n, _Generator __gen) + { + + for (; __n > 0; --__n, ++__first) + *__first = __gen(); + return __first; + } + template + inline _OutputIterator + unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result) + { + + + + ; + if (__first == __last) + return __result; + return std::__unique_copy(__first, __last, __result, + std::__iterator_category(__first), + std::__iterator_category(__result)); + } + template + inline _OutputIterator + unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + _BinaryPredicate __binary_pred) + { + + + ; + if (__first == __last) + return __result; + return std::__unique_copy(__first, __last, __result, __binary_pred, + std::__iterator_category(__first), + std::__iterator_category(__result)); + } + template + inline void + random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + + ; + if (__first != __last) + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + std::iter_swap(__i, __first + (std::rand() % ((__i - __first) + 1))); + } + template + void + random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, + _RandomNumberGenerator& __rand) + { + + ; + if (__first == __last) + return; + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + std::iter_swap(__i, __first + __rand((__i - __first) + 1)); + } + template + inline _ForwardIterator + partition(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + + + ; + return std::__partition(__first, __last, __pred, + std::__iterator_category(__first)); + } + template + inline void + partial_sort(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + ; + ; + std::__heap_select(__first, __middle, __last); + std::sort_heap(__first, __middle); + } + template + inline void + partial_sort(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + ; + ; + std::__heap_select(__first, __middle, __last, __comp); + std::sort_heap(__first, __middle, __comp); + } + template + inline void + nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + ; + ; + if (__first == __last || __nth == __last) + return; + std::__introselect(__first, __nth, __last, + std::__lg(__last - __first) * 2); + } + template + inline void + nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last, _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + ; + ; + if (__first == __last || __nth == __last) + return; + std::__introselect(__first, __nth, __last, + std::__lg(__last - __first) * 2, __comp); + } + template + inline void + sort(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + ; + if (__first != __last) + { + std::__introsort_loop(__first, __last, + std::__lg(__last - __first) * 2); + std::__final_insertion_sort(__first, __last); + } + } + template + inline void + sort(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + ; + if (__first != __last) + { + std::__introsort_loop(__first, __last, + std::__lg(__last - __first) * 2, __comp); + std::__final_insertion_sort(__first, __last, __comp); + } + } + template + _OutputIterator + merge(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + ; + ; + while (__first1 != __last1 && __first2 != __last2) + { + if (*__first2 < *__first1) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + } + ++__result; + } + return std::copy(__first2, __last2, std::copy(__first1, __last1, + __result)); + } + template + _OutputIterator + merge(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + ; + ; + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(*__first2, *__first1)) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + } + ++__result; + } + return std::copy(__first2, __last2, std::copy(__first1, __last1, + __result)); + } + template + inline void + stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + ; + _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first, + __last); + if (__buf.begin() == 0) + std::__inplace_stable_sort(__first, __last); + else + std::__stable_sort_adaptive(__first, __last, __buf.begin(), + _DistanceType(__buf.size())); + } + template + inline void + stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + ; + _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first, + __last); + if (__buf.begin() == 0) + std::__inplace_stable_sort(__first, __last, __comp); + else + std::__stable_sort_adaptive(__first, __last, __buf.begin(), + _DistanceType(__buf.size()), __comp); + } + template + _OutputIterator + set_union(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + ; + ; + while (__first1 != __last1 && __first2 != __last2) + { + if (*__first1 < *__first2) + { + *__result = *__first1; + ++__first1; + } + else if (*__first2 < *__first1) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + ++__first2; + } + ++__result; + } + return std::copy(__first2, __last2, std::copy(__first1, __last1, + __result)); + } + template + _OutputIterator + set_union(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + ; + ; + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(*__first1, *__first2)) + { + *__result = *__first1; + ++__first1; + } + else if (__comp(*__first2, *__first1)) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + ++__first2; + } + ++__result; + } + return std::copy(__first2, __last2, std::copy(__first1, __last1, + __result)); + } + template + _OutputIterator + set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + ; + ; + while (__first1 != __last1 && __first2 != __last2) + if (*__first1 < *__first2) + ++__first1; + else if (*__first2 < *__first1) + ++__first2; + else + { + *__result = *__first1; + ++__first1; + ++__first2; + ++__result; + } + return __result; + } + template + _OutputIterator + set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + ; + ; + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first1, *__first2)) + ++__first1; + else if (__comp(*__first2, *__first1)) + ++__first2; + else + { + *__result = *__first1; + ++__first1; + ++__first2; + ++__result; + } + return __result; + } + template + _OutputIterator + set_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + ; + ; + while (__first1 != __last1 && __first2 != __last2) + if (*__first1 < *__first2) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (*__first2 < *__first1) + ++__first2; + else + { + ++__first1; + ++__first2; + } + return std::copy(__first1, __last1, __result); + } + template + _OutputIterator + set_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + ; + ; + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first1, *__first2)) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (__comp(*__first2, *__first1)) + ++__first2; + else + { + ++__first1; + ++__first2; + } + return std::copy(__first1, __last1, __result); + } + template + _OutputIterator + set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + ; + ; + while (__first1 != __last1 && __first2 != __last2) + if (*__first1 < *__first2) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (*__first2 < *__first1) + { + *__result = *__first2; + ++__first2; + ++__result; + } + else + { + ++__first1; + ++__first2; + } + return std::copy(__first2, __last2, std::copy(__first1, + __last1, __result)); + } + template + _OutputIterator + set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, + _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + ; + ; + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first1, *__first2)) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (__comp(*__first2, *__first1)) + { + *__result = *__first2; + ++__first2; + ++__result; + } + else + { + ++__first1; + ++__first2; + } + return std::copy(__first2, __last2, + std::copy(__first1, __last1, __result)); + } + template + _ForwardIterator + min_element(_ForwardIterator __first, _ForwardIterator __last) + { + + + ; + if (__first == __last) + return __first; + _ForwardIterator __result = __first; + while (++__first != __last) + if (*__first < *__result) + __result = __first; + return __result; + } + template + _ForwardIterator + min_element(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + + + ; + if (__first == __last) + return __first; + _ForwardIterator __result = __first; + while (++__first != __last) + if (__comp(*__first, *__result)) + __result = __first; + return __result; + } + template + _ForwardIterator + max_element(_ForwardIterator __first, _ForwardIterator __last) + { + + + ; + if (__first == __last) + return __first; + _ForwardIterator __result = __first; + while (++__first != __last) + if (*__result < *__first) + __result = __first; + return __result; + } + template + _ForwardIterator + max_element(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + + + ; + if (__first == __last) return __first; + _ForwardIterator __result = __first; + while (++__first != __last) + if (__comp(*__result, *__first)) + __result = __first; + return __result; + } +} + + +namespace +boost + { + namespace + exception_detail + { + template + class + refcount_ptr + { + public: + refcount_ptr(): + px_(0) + { + } + ~refcount_ptr() + { + release(); + } + refcount_ptr( refcount_ptr const & x ): + px_(x.px_) + { + add_ref(); + } + refcount_ptr & + operator=( refcount_ptr const & x ) + { + adopt(x.px_); + return *this; + } + void + adopt( T * px ) + { + release(); + px_=px; + add_ref(); + } + T * + get() const + { + return px_; + } + private: + T * px_; + void + add_ref() + { + if( px_ ) + px_->add_ref(); + } + void + release() + { + if( px_ ) + px_->release(); + } + }; + } + template + class error_info; + typedef error_info throw_function; + typedef error_info throw_file; + typedef error_info throw_line; + template <> + class + error_info + { + public: + typedef char const * value_type; + value_type v_; + explicit + error_info( value_type v ): + v_(v) + { + } + }; + template <> + class + error_info + { + public: + typedef char const * value_type; + value_type v_; + explicit + error_info( value_type v ): + v_(v) + { + } + }; + template <> + class + error_info + { + public: + typedef int value_type; + value_type v_; + explicit + error_info( value_type v ): + v_(v) + { + } + }; + template + E const & operator<<( E const &, error_info const & ); + template + E const & operator<<( E const &, throw_function const & ); + template + E const & operator<<( E const &, throw_file const & ); + template + E const & operator<<( E const &, throw_line const & ); + class exception; + template + class shared_ptr; + namespace + exception_detail + { + class error_info_base; + struct type_info_; + struct + error_info_container + { + virtual char const * diagnostic_information( char const * ) const = 0; + virtual shared_ptr get( type_info_ const & ) const = 0; + virtual void set( shared_ptr const &, type_info_ const & ) = 0; + virtual void add_ref() const = 0; + virtual void release() const = 0; + protected: + ~error_info_container() throw() + { + } + }; + template + struct get_info; + template <> + struct get_info; + template <> + struct get_info; + template <> + struct get_info; + char const * get_diagnostic_information( exception const &, char const * ); + } + class + exception + { + protected: + exception(): + throw_function_(0), + throw_file_(0), + throw_line_(-1) + { + } + virtual ~exception() throw() + = 0 + ; + private: + template + friend E const & operator<<( E const &, throw_function const & ); + template + friend E const & operator<<( E const &, throw_file const & ); + template + friend E const & operator<<( E const &, throw_line const & ); + friend char const * exception_detail::get_diagnostic_information( exception const &, char const * ); + template + friend E const & operator<<( E const &, error_info const & ); + template + friend struct exception_detail::get_info; + friend struct exception_detail::get_info; + friend struct exception_detail::get_info; + friend struct exception_detail::get_info; + mutable exception_detail::refcount_ptr data_; + mutable char const * throw_function_; + mutable char const * throw_file_; + mutable int throw_line_; + }; + inline + exception:: + ~exception() throw() + { + } + template + E const & + operator<<( E const & x, throw_function const & y ) + { + x.throw_function_=y.v_; + return x; + } + template + E const & + operator<<( E const & x, throw_file const & y ) + { + x.throw_file_=y.v_; + return x; + } + template + E const & + operator<<( E const & x, throw_line const & y ) + { + x.throw_line_=y.v_; + return x; + } + namespace + exception_detail + { + template + struct + error_info_injector: + public T, + public exception + { + explicit + error_info_injector( T const & x ): + T(x) + { + } + ~error_info_injector() throw() + { + } + }; + struct large_size { char c[256]; }; + large_size dispatch( exception * ); + struct small_size { }; + small_size dispatch( void * ); + template + struct enable_error_info_helper; + template + struct + enable_error_info_helper + { + typedef T type; + }; + template + struct + enable_error_info_helper + { + typedef error_info_injector type; + }; + template + struct + enable_error_info_return_type + { + typedef typename enable_error_info_helper::type type; + }; + } + template + inline + typename + exception_detail::enable_error_info_return_type::type + enable_error_info( T const & x ) + { + typedef typename exception_detail::enable_error_info_return_type::type rt; + return rt(x); + } + namespace + exception_detail + { + class + clone_base + { + public: + virtual clone_base const * clone() const = 0; + virtual void rethrow() const = 0; + virtual + ~clone_base() throw() + { + } + }; + inline + void + copy_boost_exception( exception * a, exception const * b ) + { + *a = *b; + } + inline + void + copy_boost_exception( void *, void const * ) + { + } + template + class + clone_impl: + public T, + public clone_base + { + public: + explicit + clone_impl( T const & x ): + T(x) + { + copy_boost_exception(this,&x); + } + ~clone_impl() throw() + { + } + private: + clone_base const * + clone() const + { + return new clone_impl(*this); + } + void + rethrow() const + { + throw*this; + } + }; + } + template + inline + exception_detail::clone_impl + enable_current_exception( T const & x ) + { + return exception_detail::clone_impl(x); + } + } +namespace boost +{ +namespace detail +{ +inline void current_function_helper() +{ +} +} +} +namespace boost +{ +inline void throw_exception_assert_compatibility( std::exception const & ) { } +template __attribute__((noreturn)) inline void throw_exception( E const & e ) +{ + throw_exception_assert_compatibility(e); + throw enable_current_exception(enable_error_info(e)); +} +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + class logic_error : public exception + { + string _M_msg; + public: + explicit + logic_error(const string& __arg); + virtual + ~logic_error() throw(); + virtual const char* + what() const throw(); + }; + class domain_error : public logic_error + { + public: + explicit domain_error(const string& __arg); + }; + class invalid_argument : public logic_error + { + public: + explicit invalid_argument(const string& __arg); + }; + class length_error : public logic_error + { + public: + explicit length_error(const string& __arg); + }; + class out_of_range : public logic_error + { + public: + explicit out_of_range(const string& __arg); + }; + class runtime_error : public exception + { + string _M_msg; + public: + explicit + runtime_error(const string& __arg); + virtual + ~runtime_error() throw(); + virtual const char* + what() const throw(); + }; + class range_error : public runtime_error + { + public: + explicit range_error(const string& __arg); + }; + class overflow_error : public runtime_error + { + public: + explicit overflow_error(const string& __arg); + }; + class underflow_error : public runtime_error + { + public: + explicit underflow_error(const string& __arg); + }; +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + class raw_storage_iterator + : public iterator + { + protected: + _OutputIterator _M_iter; + public: + explicit + raw_storage_iterator(_OutputIterator __x) + : _M_iter(__x) {} + raw_storage_iterator& + operator*() { return *this; } + raw_storage_iterator& + operator=(const _Tp& __element) + { + std::_Construct(&*_M_iter, __element); + return *this; + } + raw_storage_iterator<_OutputIterator, _Tp>& + operator++() + { + ++_M_iter; + return *this; + } + raw_storage_iterator<_OutputIterator, _Tp> + operator++(int) + { + raw_storage_iterator<_OutputIterator, _Tp> __tmp = *this; + ++_M_iter; + return __tmp; + } + }; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + struct auto_ptr_ref + { + _Tp1* _M_ptr; + explicit + auto_ptr_ref(_Tp1* __p): _M_ptr(__p) { } + } ; + template + class auto_ptr + { + private: + _Tp* _M_ptr; + public: + typedef _Tp element_type; + explicit + auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { } + auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) { } + template + auto_ptr(auto_ptr<_Tp1>& __a) throw() : _M_ptr(__a.release()) { } + auto_ptr& + operator=(auto_ptr& __a) throw() + { + reset(__a.release()); + return *this; + } + template + auto_ptr& + operator=(auto_ptr<_Tp1>& __a) throw() + { + reset(__a.release()); + return *this; + } + ~auto_ptr() { delete _M_ptr; } + element_type& + operator*() const throw() + { + ; + return *_M_ptr; + } + element_type* + operator->() const throw() + { + ; + return _M_ptr; + } + element_type* + get() const throw() { return _M_ptr; } + element_type* + release() throw() + { + element_type* __tmp = _M_ptr; + _M_ptr = 0; + return __tmp; + } + void + reset(element_type* __p = 0) throw() + { + if (__p != _M_ptr) + { + delete _M_ptr; + _M_ptr = __p; + } + } + auto_ptr(auto_ptr_ref __ref) throw() + : _M_ptr(__ref._M_ptr) { } + auto_ptr& + operator=(auto_ptr_ref __ref) throw() + { + if (__ref._M_ptr != this->get()) + { + delete _M_ptr; + _M_ptr = __ref._M_ptr; + } + return *this; + } + template + operator auto_ptr_ref<_Tp1>() throw() + { return auto_ptr_ref<_Tp1>(this->release()); } + template + operator auto_ptr<_Tp1>() throw() + { return auto_ptr<_Tp1>(this->release()); } + } ; + template<> + class auto_ptr + { + public: + typedef void element_type; + } ; +} + +extern "C++" { +namespace __cxxabiv1 +{ + class __class_type_info; +} +namespace std +{ + class type_info + { + public: + virtual ~type_info(); + const char* name() const + { return __name[0] == '*' ? __name + 1 : __name; } + bool before(const type_info& __arg) const + { return (__name[0] == '*' && __arg.__name[0] == '*') + ? __name < __arg.__name + : __builtin_strcmp (__name, __arg.__name) < 0; } + bool operator==(const type_info& __arg) const + { + return ((__name == __arg.__name) + || (__name[0] != '*' && + __builtin_strcmp (__name, __arg.__name) == 0)); + } + bool operator!=(const type_info& __arg) const + { return !operator==(__arg); } + virtual bool __is_pointer_p() const; + virtual bool __is_function_p() const; + virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj, + unsigned __outer) const; + virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target, + void **__obj_ptr) const; + protected: + const char *__name; + explicit type_info(const char *__n): __name(__n) { } + private: + type_info& operator=(const type_info&); + type_info(const type_info&); + }; + class bad_cast : public exception + { + public: + bad_cast() throw() { } + virtual ~bad_cast() throw(); + virtual const char* what() const throw(); + }; + class bad_typeid : public exception + { + public: + bad_typeid () throw() { } + virtual ~bad_typeid() throw(); + virtual const char* what() const throw(); + }; +} +} +namespace boost +{ +namespace detail +{ +typedef std::type_info sp_typeinfo; +} +} + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + enum float_round_style + { + round_indeterminate = -1, + round_toward_zero = 0, + round_to_nearest = 1, + round_toward_infinity = 2, + round_toward_neg_infinity = 3 + }; + enum float_denorm_style + { + denorm_indeterminate = -1, + denorm_absent = 0, + denorm_present = 1 + }; + struct __numeric_limits_base + { + static const bool is_specialized = false; + static const int digits = 0; + static const int digits10 = 0; + static const bool is_signed = false; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 0; + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + static const bool is_iec559 = false; + static const bool is_bounded = false; + static const bool is_modulo = false; + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + template + struct numeric_limits : public __numeric_limits_base + { + static _Tp min() throw() { return static_cast<_Tp>(0); } + static _Tp max() throw() { return static_cast<_Tp>(0); } + static _Tp epsilon() throw() { return static_cast<_Tp>(0); } + static _Tp round_error() throw() { return static_cast<_Tp>(0); } + static _Tp infinity() throw() { return static_cast<_Tp>(0); } + static _Tp quiet_NaN() throw() { return static_cast<_Tp>(0); } + static _Tp signaling_NaN() throw() { return static_cast<_Tp>(0); } + static _Tp denorm_min() throw() { return static_cast<_Tp>(0); } + }; + template<> + struct numeric_limits + { + static const bool is_specialized = true; + static bool min() throw() + { return false; } + static bool max() throw() + { return true; } + static const int digits = 1; + static const int digits10 = 0; + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static bool epsilon() throw() + { return false; } + static bool round_error() throw() + { return false; } + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + static bool infinity() throw() + { return false; } + static bool quiet_NaN() throw() + { return false; } + static bool signaling_NaN() throw() + { return false; } + static bool denorm_min() throw() + { return false; } + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = false; + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + template<> + struct numeric_limits + { + static const bool is_specialized = true; + static char min() throw() + { return (((char)(-1) < 0) ? (char)1 << (sizeof(char) * 8 - ((char)(-1) < 0)) : (char)0); } + static char max() throw() + { return (((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0); } + static const int digits = (sizeof(char) * 8 - ((char)(-1) < 0)); + static const int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643 / 2136); + static const bool is_signed = ((char)(-1) < 0); + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static char epsilon() throw() + { return 0; } + static char round_error() throw() + { return 0; } + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + static char infinity() throw() + { return char(); } + static char quiet_NaN() throw() + { return char(); } + static char signaling_NaN() throw() + { return char(); } + static char denorm_min() throw() + { return static_cast(0); } + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + template<> + struct numeric_limits + { + static const bool is_specialized = true; + static signed char min() throw() + { return -127 - 1; } + static signed char max() throw() + { return 127; } + static const int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0)); + static const int digits10 = ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643 / 2136); + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static signed char epsilon() throw() + { return 0; } + static signed char round_error() throw() + { return 0; } + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + static signed char infinity() throw() + { return static_cast(0); } + static signed char quiet_NaN() throw() + { return static_cast(0); } + static signed char signaling_NaN() throw() + { return static_cast(0); } + static signed char denorm_min() throw() + { return static_cast(0); } + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + template<> + struct numeric_limits + { + static const bool is_specialized = true; + static unsigned char min() throw() + { return 0; } + static unsigned char max() throw() + { return 127 * 2U + 1; } + static const int digits = (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643 / 2136); + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned char epsilon() throw() + { return 0; } + static unsigned char round_error() throw() + { return 0; } + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + static unsigned char infinity() throw() + { return static_cast(0); } + static unsigned char quiet_NaN() throw() + { return static_cast(0); } + static unsigned char signaling_NaN() throw() + { return static_cast(0); } + static unsigned char denorm_min() throw() + { return static_cast(0); } + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + template<> + struct numeric_limits + { + static const bool is_specialized = true; + static wchar_t min() throw() + { return (((wchar_t)(-1) < 0) ? (wchar_t)1 << (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) : (wchar_t)0); } + static wchar_t max() throw() + { return (((wchar_t)(-1) < 0) ? (((((wchar_t)1 << ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(wchar_t)0); } + static const int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)); + static const int digits10 = ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643 / 2136); + static const bool is_signed = ((wchar_t)(-1) < 0); + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static wchar_t epsilon() throw() + { return 0; } + static wchar_t round_error() throw() + { return 0; } + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + static wchar_t infinity() throw() + { return wchar_t(); } + static wchar_t quiet_NaN() throw() + { return wchar_t(); } + static wchar_t signaling_NaN() throw() + { return wchar_t(); } + static wchar_t denorm_min() throw() + { return wchar_t(); } + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + template<> + struct numeric_limits + { + static const bool is_specialized = true; + static short min() throw() + { return -32767 - 1; } + static short max() throw() + { return 32767; } + static const int digits = (sizeof(short) * 8 - ((short)(-1) < 0)); + static const int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643 / 2136); + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static short epsilon() throw() + { return 0; } + static short round_error() throw() + { return 0; } + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + static short infinity() throw() + { return short(); } + static short quiet_NaN() throw() + { return short(); } + static short signaling_NaN() throw() + { return short(); } + static short denorm_min() throw() + { return short(); } + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + template<> + struct numeric_limits + { + static const bool is_specialized = true; + static unsigned short min() throw() + { return 0; } + static unsigned short max() throw() + { return 32767 * 2U + 1; } + static const int digits = (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643 / 2136); + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned short epsilon() throw() + { return 0; } + static unsigned short round_error() throw() + { return 0; } + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + static unsigned short infinity() throw() + { return static_cast(0); } + static unsigned short quiet_NaN() throw() + { return static_cast(0); } + static unsigned short signaling_NaN() throw() + { return static_cast(0); } + static unsigned short denorm_min() throw() + { return static_cast(0); } + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + template<> + struct numeric_limits + { + static const bool is_specialized = true; + static int min() throw() + { return -2147483647 - 1; } + static int max() throw() + { return 2147483647; } + static const int digits = (sizeof(int) * 8 - ((int)(-1) < 0)); + static const int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643 / 2136); + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static int epsilon() throw() + { return 0; } + static int round_error() throw() + { return 0; } + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + static int infinity() throw() + { return static_cast(0); } + static int quiet_NaN() throw() + { return static_cast(0); } + static int signaling_NaN() throw() + { return static_cast(0); } + static int denorm_min() throw() + { return static_cast(0); } + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + template<> + struct numeric_limits + { + static const bool is_specialized = true; + static unsigned int min() throw() + { return 0; } + static unsigned int max() throw() + { return 2147483647 * 2U + 1; } + static const int digits = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643 / 2136); + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned int epsilon() throw() + { return 0; } + static unsigned int round_error() throw() + { return 0; } + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + static unsigned int infinity() throw() + { return static_cast(0); } + static unsigned int quiet_NaN() throw() + { return static_cast(0); } + static unsigned int signaling_NaN() throw() + { return static_cast(0); } + static unsigned int denorm_min() throw() + { return static_cast(0); } + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + template<> + struct numeric_limits + { + static const bool is_specialized = true; + static long min() throw() + { return -9223372036854775807L - 1; } + static long max() throw() + { return 9223372036854775807L; } + static const int digits = (sizeof(long) * 8 - ((long)(-1) < 0)); + static const int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643 / 2136); + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static long epsilon() throw() + { return 0; } + static long round_error() throw() + { return 0; } + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + static long infinity() throw() + { return static_cast(0); } + static long quiet_NaN() throw() + { return static_cast(0); } + static long signaling_NaN() throw() + { return static_cast(0); } + static long denorm_min() throw() + { return static_cast(0); } + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + template<> + struct numeric_limits + { + static const bool is_specialized = true; + static unsigned long min() throw() + { return 0; } + static unsigned long max() throw() + { return 9223372036854775807L * 2UL + 1; } + static const int digits = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643 / 2136); + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned long epsilon() throw() + { return 0; } + static unsigned long round_error() throw() + { return 0; } + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + static unsigned long infinity() throw() + { return static_cast(0); } + static unsigned long quiet_NaN() throw() + { return static_cast(0); } + static unsigned long signaling_NaN() throw() + { return static_cast(0); } + static unsigned long denorm_min() throw() + { return static_cast(0); } + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + template<> + struct numeric_limits + { + static const bool is_specialized = true; + static long long min() throw() + { return -9223372036854775807LL - 1; } + static long long max() throw() + { return 9223372036854775807LL; } + static const int digits = (sizeof(long long) * 8 - ((long long)(-1) < 0)); + static const int digits10 = ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643 / 2136); + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static long long epsilon() throw() + { return 0; } + static long long round_error() throw() + { return 0; } + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + static long long infinity() throw() + { return static_cast(0); } + static long long quiet_NaN() throw() + { return static_cast(0); } + static long long signaling_NaN() throw() + { return static_cast(0); } + static long long denorm_min() throw() + { return static_cast(0); } + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + template<> + struct numeric_limits + { + static const bool is_specialized = true; + static unsigned long long min() throw() + { return 0; } + static unsigned long long max() throw() + { return 9223372036854775807LL * 2ULL + 1; } + static const int digits = (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643 / 2136); + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned long long epsilon() throw() + { return 0; } + static unsigned long long round_error() throw() + { return 0; } + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + static unsigned long long infinity() throw() + { return static_cast(0); } + static unsigned long long quiet_NaN() throw() + { return static_cast(0); } + static unsigned long long signaling_NaN() throw() + { return static_cast(0); } + static unsigned long long denorm_min() throw() + { return static_cast(0); } + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + template<> + struct numeric_limits + { + static const bool is_specialized = true; + static float min() throw() + { return 1.17549435082228750797e-38F; } + static float max() throw() + { return 3.40282346638528859812e+38F; } + static const int digits = 24; + static const int digits10 = 6; + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 2; + static float epsilon() throw() + { return 1.19209289550781250000e-7F; } + static float round_error() throw() + { return 0.5F; } + static const int min_exponent = (-125); + static const int min_exponent10 = (-37); + static const int max_exponent = 128; + static const int max_exponent10 = 38; + static const bool has_infinity = 1; + static const bool has_quiet_NaN = 1; + static const bool has_signaling_NaN = has_quiet_NaN; + static const float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static const bool has_denorm_loss = false; + static float infinity() throw() + { return __builtin_huge_valf (); } + static float quiet_NaN() throw() + { return __builtin_nanf (""); } + static float signaling_NaN() throw() + { return __builtin_nansf (""); } + static float denorm_min() throw() + { return 1.40129846432481707092e-45F; } + static const bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static const bool is_bounded = true; + static const bool is_modulo = false; + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_to_nearest; + }; + template<> + struct numeric_limits + { + static const bool is_specialized = true; + static double min() throw() + { return ((double)2.22507385850720138309e-308L); } + static double max() throw() + { return ((double)1.79769313486231570815e+308L); } + static const int digits = 53; + static const int digits10 = 15; + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 2; + static double epsilon() throw() + { return ((double)2.22044604925031308085e-16L); } + static double round_error() throw() + { return 0.5; } + static const int min_exponent = (-1021); + static const int min_exponent10 = (-307); + static const int max_exponent = 1024; + static const int max_exponent10 = 308; + static const bool has_infinity = 1; + static const bool has_quiet_NaN = 1; + static const bool has_signaling_NaN = has_quiet_NaN; + static const float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static const bool has_denorm_loss = false; + static double infinity() throw() + { return __builtin_huge_val(); } + static double quiet_NaN() throw() + { return __builtin_nan (""); } + static double signaling_NaN() throw() + { return __builtin_nans (""); } + static double denorm_min() throw() + { return ((double)4.94065645841246544177e-324L); } + static const bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static const bool is_bounded = true; + static const bool is_modulo = false; + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_to_nearest; + }; + template<> + struct numeric_limits + { + static const bool is_specialized = true; + static long double min() throw() + { return 3.36210314311209350626e-4932L; } + static long double max() throw() + { return 1.18973149535723176502e+4932L; } + static const int digits = 64; + static const int digits10 = 18; + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 2; + static long double epsilon() throw() + { return 1.08420217248550443401e-19L; } + static long double round_error() throw() + { return 0.5L; } + static const int min_exponent = (-16381); + static const int min_exponent10 = (-4931); + static const int max_exponent = 16384; + static const int max_exponent10 = 4932; + static const bool has_infinity = 1; + static const bool has_quiet_NaN = 1; + static const bool has_signaling_NaN = has_quiet_NaN; + static const float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static const bool has_denorm_loss + = false; + static long double infinity() throw() + { return __builtin_huge_vall (); } + static long double quiet_NaN() throw() + { return __builtin_nanl (""); } + static long double signaling_NaN() throw() + { return __builtin_nansl (""); } + static long double denorm_min() throw() + { return 3.64519953188247460253e-4951L; } + static const bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static const bool is_bounded = true; + static const bool is_modulo = false; + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_to_nearest; + }; +} +namespace boost +{ + using ::int8_t; + using ::int_least8_t; + using ::int_fast8_t; + using ::uint8_t; + using ::uint_least8_t; + using ::uint_fast8_t; + using ::int16_t; + using ::int_least16_t; + using ::int_fast16_t; + using ::uint16_t; + using ::uint_least16_t; + using ::uint_fast16_t; + using ::int32_t; + using ::int_least32_t; + using ::int_fast32_t; + using ::uint32_t; + using ::uint_least32_t; + using ::uint_fast32_t; + using ::int64_t; + using ::int_least64_t; + using ::int_fast64_t; + using ::uint64_t; + using ::uint_least64_t; + using ::uint_fast64_t; + using ::intmax_t; + using ::uintmax_t; +} +namespace boost +{ + typedef boost::uintmax_t static_min_max_unsigned_type; + typedef boost::intmax_t static_min_max_signed_type; + typedef boost::uintmax_t static_log2_argument_type; + typedef int static_log2_result_type; +template < class T > + class integer_traits; +template < > + class integer_traits< bool >; +template < > + class integer_traits< char >; +template < > + class integer_traits< signed char >; +template < > + class integer_traits< unsigned char >; +template < > + class integer_traits< wchar_t >; +template < > + class integer_traits< short >; +template < > + class integer_traits< unsigned short >; +template < > + class integer_traits< int >; +template < > + class integer_traits< unsigned int >; +template < > + class integer_traits< long >; +template < > + class integer_traits< unsigned long >; +template < > + class integer_traits< ::boost::long_long_type>; +template < > + class integer_traits< ::boost::ulong_long_type >; +template < typename LeastInt > + struct int_fast_t; +template< int Bits > + struct int_t; +template< int Bits > + struct uint_t; + template< boost::long_long_type MaxValue > + struct int_max_value_t; + template< boost::long_long_type MinValue > + struct int_min_value_t; + template< boost::ulong_long_type MaxValue > + struct uint_value_t; +template < std::size_t Bit > + struct high_bit_mask_t; +template < std::size_t Bits > + struct low_bits_mask_t; +template < > + struct low_bits_mask_t< ::std::numeric_limits::digits >; +template < > + struct low_bits_mask_t< ::std::numeric_limits::digits >; +template < > + struct low_bits_mask_t< ::std::numeric_limits::digits >; +template < > + struct low_bits_mask_t< ::std::numeric_limits::digits >; +template + struct static_log2; +template <> struct static_log2<0u>; +template + struct static_signed_min; +template + struct static_signed_max; +template + struct static_unsigned_min; +template + struct static_unsigned_max; +} + +namespace boost { +template +class integer_traits : public std::numeric_limits +{ +public: + static const bool is_integral = false; +}; +namespace detail { +template +class integer_traits_base +{ +public: + static const bool is_integral = true; + static const T const_min = min_val; + static const T const_max = max_val; +}; +template +const bool integer_traits_base::is_integral; +template +const T integer_traits_base::const_min; +template +const T integer_traits_base::const_max; +} +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; +template<> +class integer_traits< ::boost::long_long_type> + : public std::numeric_limits< ::boost::long_long_type>, + public detail::integer_traits_base< ::boost::long_long_type, (-9223372036854775807LL -1), 9223372036854775807LL> +{ }; +template<> +class integer_traits< ::boost::ulong_long_type> + : public std::numeric_limits< ::boost::ulong_long_type>, + public detail::integer_traits_base< ::boost::ulong_long_type, 0, (9223372036854775807LL * 2ULL + 1)> +{ }; +} + +namespace boost +{ + template< typename LeastInt > + struct int_fast_t + { + typedef LeastInt fast; + typedef fast type; + }; + namespace detail{ + template< int Category > struct int_least_helper {}; + template<> struct int_least_helper<1> { typedef boost::long_long_type least; }; + template<> struct int_least_helper<2> { typedef long least; }; + template<> struct int_least_helper<3> { typedef int least; }; + template<> struct int_least_helper<4> { typedef short least; }; + template<> struct int_least_helper<5> { typedef signed char least; }; + template<> struct int_least_helper<6> { typedef boost::ulong_long_type least; }; + template<> struct int_least_helper<7> { typedef unsigned long least; }; + template<> struct int_least_helper<8> { typedef unsigned int least; }; + template<> struct int_least_helper<9> { typedef unsigned short least; }; + template<> struct int_least_helper<10> { typedef unsigned char least; }; + template + struct exact_signed_base_helper{}; + template + struct exact_unsigned_base_helper{}; + template <> struct exact_signed_base_helper { typedef signed char exact; }; + template <> struct exact_unsigned_base_helper { typedef unsigned char exact; }; + template <> struct exact_signed_base_helper { typedef short exact; }; + template <> struct exact_unsigned_base_helper { typedef unsigned short exact; }; + template <> struct exact_signed_base_helper { typedef int exact; }; + template <> struct exact_unsigned_base_helper { typedef unsigned int exact; }; + template <> struct exact_signed_base_helper { typedef long exact; }; + template <> struct exact_unsigned_base_helper { typedef unsigned long exact; }; + } + template< int Bits > + struct int_t : public detail::exact_signed_base_helper + { + typedef typename detail::int_least_helper + < + (Bits-1 <= (int)(sizeof(boost::long_long_type) * 8)) + + (Bits-1 <= ::std::numeric_limits::digits) + + (Bits-1 <= ::std::numeric_limits::digits) + + (Bits-1 <= ::std::numeric_limits::digits) + + (Bits-1 <= ::std::numeric_limits::digits) + >::least least; + typedef typename int_fast_t::type fast; + }; + template< int Bits > + struct uint_t : public detail::exact_unsigned_base_helper + { + typedef typename detail::int_least_helper + < + 5 + + (Bits-1 <= (int)(sizeof(boost::long_long_type) * 8)) + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + + (Bits <= ::std::numeric_limits::digits) + >::least least; + typedef typename int_fast_t::type fast; + }; + template< boost::long_long_type MaxValue > + struct int_max_value_t + { + typedef typename detail::int_least_helper + < + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + >::least least; + typedef typename int_fast_t::type fast; + }; + template< boost::long_long_type MinValue > + struct int_min_value_t + { + typedef typename detail::int_least_helper + < + (MinValue >= ::boost::integer_traits::const_min) + + (MinValue >= ::boost::integer_traits::const_min) + + (MinValue >= ::boost::integer_traits::const_min) + + (MinValue >= ::boost::integer_traits::const_min) + + (MinValue >= ::boost::integer_traits::const_min) + >::least least; + typedef typename int_fast_t::type fast; + }; + template< boost::ulong_long_type MaxValue > + struct uint_value_t + { + typedef typename detail::int_least_helper + < + 5 + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + + (MaxValue <= ::boost::integer_traits::const_max) + >::least least; + typedef typename int_fast_t::type fast; + }; +} +namespace boost { +template< typename T > struct is_void : ::boost::integral_constant { }; +template<> struct is_void< void > : ::boost::integral_constant { }; +template<> struct is_void< void const > : ::boost::integral_constant { }; +template<> struct is_void< void volatile > : ::boost::integral_constant { }; +template<> struct is_void< void const volatile > : ::boost::integral_constant { }; +} +namespace boost { +template< typename T > struct is_integral : ::boost::integral_constant { }; +template<> struct is_integral< unsigned char > : ::boost::integral_constant { }; template<> struct is_integral< unsigned char const > : ::boost::integral_constant { }; template<> struct is_integral< unsigned char volatile > : ::boost::integral_constant { }; template<> struct is_integral< unsigned char const volatile > : ::boost::integral_constant { }; +template<> struct is_integral< unsigned short > : ::boost::integral_constant { }; template<> struct is_integral< unsigned short const > : ::boost::integral_constant { }; template<> struct is_integral< unsigned short volatile > : ::boost::integral_constant { }; template<> struct is_integral< unsigned short const volatile > : ::boost::integral_constant { }; +template<> struct is_integral< unsigned int > : ::boost::integral_constant { }; template<> struct is_integral< unsigned int const > : ::boost::integral_constant { }; template<> struct is_integral< unsigned int volatile > : ::boost::integral_constant { }; template<> struct is_integral< unsigned int const volatile > : ::boost::integral_constant { }; +template<> struct is_integral< unsigned long > : ::boost::integral_constant { }; template<> struct is_integral< unsigned long const > : ::boost::integral_constant { }; template<> struct is_integral< unsigned long volatile > : ::boost::integral_constant { }; template<> struct is_integral< unsigned long const volatile > : ::boost::integral_constant { }; +template<> struct is_integral< signed char > : ::boost::integral_constant { }; template<> struct is_integral< signed char const > : ::boost::integral_constant { }; template<> struct is_integral< signed char volatile > : ::boost::integral_constant { }; template<> struct is_integral< signed char const volatile > : ::boost::integral_constant { }; +template<> struct is_integral< signed short > : ::boost::integral_constant { }; template<> struct is_integral< signed short const > : ::boost::integral_constant { }; template<> struct is_integral< signed short volatile > : ::boost::integral_constant { }; template<> struct is_integral< signed short const volatile > : ::boost::integral_constant { }; +template<> struct is_integral< signed int > : ::boost::integral_constant { }; template<> struct is_integral< signed int const > : ::boost::integral_constant { }; template<> struct is_integral< signed int volatile > : ::boost::integral_constant { }; template<> struct is_integral< signed int const volatile > : ::boost::integral_constant { }; +template<> struct is_integral< signed long > : ::boost::integral_constant { }; template<> struct is_integral< signed long const > : ::boost::integral_constant { }; template<> struct is_integral< signed long volatile > : ::boost::integral_constant { }; template<> struct is_integral< signed long const volatile > : ::boost::integral_constant { }; +template<> struct is_integral< bool > : ::boost::integral_constant { }; template<> struct is_integral< bool const > : ::boost::integral_constant { }; template<> struct is_integral< bool volatile > : ::boost::integral_constant { }; template<> struct is_integral< bool const volatile > : ::boost::integral_constant { }; +template<> struct is_integral< char > : ::boost::integral_constant { }; template<> struct is_integral< char const > : ::boost::integral_constant { }; template<> struct is_integral< char volatile > : ::boost::integral_constant { }; template<> struct is_integral< char const volatile > : ::boost::integral_constant { }; +template<> struct is_integral< wchar_t > : ::boost::integral_constant { }; template<> struct is_integral< wchar_t const > : ::boost::integral_constant { }; template<> struct is_integral< wchar_t volatile > : ::boost::integral_constant { }; template<> struct is_integral< wchar_t const volatile > : ::boost::integral_constant { }; +template<> struct is_integral< ::boost::ulong_long_type > : ::boost::integral_constant { }; template<> struct is_integral< ::boost::ulong_long_type const > : ::boost::integral_constant { }; template<> struct is_integral< ::boost::ulong_long_type volatile > : ::boost::integral_constant { }; template<> struct is_integral< ::boost::ulong_long_type const volatile > : ::boost::integral_constant { }; +template<> struct is_integral< ::boost::long_long_type > : ::boost::integral_constant { }; template<> struct is_integral< ::boost::long_long_type const > : ::boost::integral_constant { }; template<> struct is_integral< ::boost::long_long_type volatile > : ::boost::integral_constant { }; template<> struct is_integral< ::boost::long_long_type const volatile > : ::boost::integral_constant { }; +} +namespace boost { +template< typename T > struct is_float : ::boost::integral_constant { }; +template<> struct is_float< float > : ::boost::integral_constant { }; template<> struct is_float< float const > : ::boost::integral_constant { }; template<> struct is_float< float volatile > : ::boost::integral_constant { }; template<> struct is_float< float const volatile > : ::boost::integral_constant { }; +template<> struct is_float< double > : ::boost::integral_constant { }; template<> struct is_float< double const > : ::boost::integral_constant { }; template<> struct is_float< double volatile > : ::boost::integral_constant { }; template<> struct is_float< double const volatile > : ::boost::integral_constant { }; +template<> struct is_float< long double > : ::boost::integral_constant { }; template<> struct is_float< long double const > : ::boost::integral_constant { }; template<> struct is_float< long double volatile > : ::boost::integral_constant { }; template<> struct is_float< long double const volatile > : ::boost::integral_constant { }; +} +namespace boost { +namespace type_traits { +template +struct ice_or; +template +struct ice_or +{ + static const bool value = true; +}; +template <> +struct ice_or +{ + static const bool value = false; +}; +} +} +namespace boost { +namespace detail { +template< typename T > +struct is_arithmetic_impl +{ + static const bool value = (::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_float::value >::value) + ; +}; +} +template< typename T > struct is_arithmetic : ::boost::integral_constant::value> { }; +} +namespace boost { +template< typename T > struct is_enum : ::boost::integral_constant { }; +} +namespace boost { +namespace type_traits { +template +struct is_mem_fun_pointer_impl +{ + static const bool value = false; +}; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +} +} +namespace boost { +template< typename T > struct is_member_function_pointer : ::boost::integral_constant::type>::value> { }; +} +namespace boost { +template< typename T > struct is_member_pointer : ::boost::integral_constant::value> { }; +template< typename T, typename U > struct is_member_pointer< U T::* > : ::boost::integral_constant { }; +template< typename T, typename U > struct is_member_pointer< U T::*const > : ::boost::integral_constant { }; +template< typename T, typename U > struct is_member_pointer< U T::*volatile > : ::boost::integral_constant { }; +template< typename T, typename U > struct is_member_pointer< U T::*const volatile > : ::boost::integral_constant { }; +} +namespace boost { +namespace type_traits { +template +struct ice_and; +template +struct ice_and +{ + static const bool value = false; +}; +template <> +struct ice_and +{ + static const bool value = true; +}; +} +} +namespace boost { +namespace type_traits { +template +struct ice_not +{ + static const bool value = true; +}; +template <> +struct ice_not +{ + static const bool value = false; +}; +} +} +namespace boost { +namespace detail { +template< typename T > struct is_pointer_helper +{ + static const bool value = false; +}; +template< typename T > struct is_pointer_helper { static const bool value = true; }; +template< typename T > +struct is_pointer_impl +{ + static const bool value = (::boost::type_traits::ice_and< ::boost::detail::is_pointer_helper::type>::value , ::boost::type_traits::ice_not< ::boost::is_member_pointer::value >::value >::value) + ; +}; +} +template< typename T > struct is_pointer : ::boost::integral_constant::value> { }; +} +namespace boost { +namespace detail { +template +struct is_scalar_impl +{ + static const bool value = (::boost::type_traits::ice_or< ::boost::is_arithmetic::value, ::boost::is_enum::value, ::boost::is_pointer::value, ::boost::is_member_pointer::value >::value) + ; +}; +template <> struct is_scalar_impl{ static const bool value = false; }; +template <> struct is_scalar_impl{ static const bool value = false; }; +template <> struct is_scalar_impl{ static const bool value = false; }; +template <> struct is_scalar_impl{ static const bool value = false; }; +} +template< typename T > struct is_scalar : ::boost::integral_constant::value> { }; +} + +namespace boost { +template< typename T > struct is_POD; +namespace detail { +template struct is_pod_impl +{ + static const bool value = (::boost::type_traits::ice_or< ::boost::is_scalar::value, ::boost::is_void::value, __is_pod(T) >::value) + ; +}; +template +struct is_pod_impl + : is_pod_impl +{ +}; +template<> struct is_pod_impl< void > { static const bool value = (true); }; +template<> struct is_pod_impl< void const > { static const bool value = (true); }; +template<> struct is_pod_impl< void volatile > { static const bool value = (true); }; +template<> struct is_pod_impl< void const volatile > { static const bool value = (true); }; +} +template< typename T > struct is_POD : ::boost::integral_constant::value> { }; +template< typename T > struct is_pod : ::boost::integral_constant::value> { }; +} +namespace boost { +namespace detail { +template +struct has_trivial_copy_impl +{ + static const bool value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::is_pod::value, (__has_trivial_copy(T) && !is_reference::value) >::value, ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value >::value) + ; +}; +} +template< typename T > struct has_trivial_copy : ::boost::integral_constant::value> { }; +template< typename T > struct has_trivial_copy_constructor : ::boost::integral_constant::value> { }; +} +namespace boost { +namespace detail { +template +struct has_trivial_dtor_impl +{ + static const bool value = (::boost::type_traits::ice_or< ::boost::is_pod::value, __has_trivial_destructor(T) >::value) + ; +}; +} +template< typename T > struct has_trivial_destructor : ::boost::integral_constant::value> { }; +} + +namespace boost { +template< typename T > struct is_array : ::boost::integral_constant { }; +template< typename T, std::size_t N > struct is_array< T[N] > : ::boost::integral_constant { }; +template< typename T, std::size_t N > struct is_array< T const[N] > : ::boost::integral_constant { }; +template< typename T, std::size_t N > struct is_array< T volatile[N] > : ::boost::integral_constant { }; +template< typename T, std::size_t N > struct is_array< T const volatile[N] > : ::boost::integral_constant { }; +template< typename T > struct is_array< T[] > : ::boost::integral_constant { }; +template< typename T > struct is_array< T const[] > : ::boost::integral_constant { }; +template< typename T > struct is_array< T volatile[] > : ::boost::integral_constant { }; +template< typename T > struct is_array< T const volatile[] > : ::boost::integral_constant { }; +} +namespace boost { +namespace detail { +template struct is_union_impl +{ + static const bool value = __is_union(T); +}; +} +template< typename T > struct is_union : ::boost::integral_constant::value> { }; +} +namespace boost { +namespace type_traits { +typedef char yes_type; +struct no_type +{ + char padding[8]; +}; +} +} +namespace boost { +namespace type_traits { +template +struct ice_eq +{ + static const bool value = (b1 == b2); +}; +template +struct ice_ne +{ + static const bool value = (b1 != b2); +}; +template bool const ice_eq::value; +template bool const ice_ne::value; +} +} +namespace boost +{ +namespace detail +{ +template struct addr_impl_ref +{ + T & v_; + inline addr_impl_ref( T & v ): v_( v ) {} + inline operator T& () const { return v_; } +private: + addr_impl_ref & operator=(const addr_impl_ref &); +}; +template struct addressof_impl +{ + static inline T * f( T & v, long ) + { + return reinterpret_cast( + &const_cast(reinterpret_cast(v))); + } + static inline T * f( T * v, int ) + { + return v; + } +}; +} +template T * addressof( T & v ) +{ + return boost::detail::addressof_impl::f( boost::detail::addr_impl_ref( v ), 0 ); +} +} +namespace boost +{ +template class reference_wrapper +{ +public: + typedef T type; + explicit reference_wrapper(T& t): t_(boost::addressof(t)) {} + operator T& () const { return *t_; } + T& get() const { return *t_; } + T* get_pointer() const { return t_; } +private: + T* t_; +}; +template inline reference_wrapper const ref(T & t) +{ + return reference_wrapper(t); +} +template inline reference_wrapper const cref(T const & t) +{ + return reference_wrapper(t); +} +template +class is_reference_wrapper + : public mpl::false_ +{ +}; +template +class unwrap_reference +{ + public: + typedef T type; +}; +template class is_reference_wrapper< reference_wrapper > : public mpl::true_ { }; template class unwrap_reference< reference_wrapper > { public: typedef T type; }; +template class is_reference_wrapper< reference_wrapper const > : public mpl::true_ { }; template class unwrap_reference< reference_wrapper const > { public: typedef T type; }; +template class is_reference_wrapper< reference_wrapper volatile > : public mpl::true_ { }; template class unwrap_reference< reference_wrapper volatile > { public: typedef T type; }; +template class is_reference_wrapper< reference_wrapper const volatile > : public mpl::true_ { }; template class unwrap_reference< reference_wrapper const volatile > { public: typedef T type; }; +template inline typename unwrap_reference::type& +unwrap_ref(T& t) +{ + return t; +} +template inline T* get_pointer( reference_wrapper const & r ) +{ + return r.get_pointer(); +} +} +namespace boost { namespace mpl { namespace aux { +template< typename T > struct value_type_wknd +{ + typedef typename T::value_type type; +}; +}}} +namespace mpl_ { +struct void_; +} +namespace boost { namespace mpl { using ::mpl_::void_; } } +namespace mpl_ { +struct na +{ + typedef na type; + enum { value = 0 }; +}; +} +namespace boost { namespace mpl { using ::mpl_::na; } } +namespace boost { namespace mpl { +template< typename T > +struct is_na + : false_ +{ +}; +template<> +struct is_na + : true_ +{ +}; +template< typename T > +struct is_not_na + : true_ +{ +}; +template<> +struct is_not_na + : false_ +{ +}; +template< typename T, typename U > struct if_na +{ + typedef T type; +}; +template< typename U > struct if_na +{ + typedef U type; +}; +}} +namespace boost { namespace mpl { +template< + typename T = na + , typename Tag = void_ + , typename Arity = int_< aux::template_arity::value > + > +struct lambda; +}} +namespace boost { namespace mpl { +template< + bool C + , typename T1 + , typename T2 + > +struct if_c +{ + typedef T1 type; +}; +template< + typename T1 + , typename T2 + > +struct if_c +{ + typedef T2 type; +}; +template< + typename T1 = na + , typename T2 = na + , typename T3 = na + > +struct if_ +{ + private: + typedef if_c< + static_cast(T1::value) + , T2 + , T3 + > almost_type_; + public: + typedef typename almost_type_::type type; + +}; +template<> struct if_< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : if_< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< if_< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef if_< na , na , na > result_; typedef if_< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< if_< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< if_< na , na , na > > : int_<-1> { }; } +}} + + +namespace mpl_ { +template< std::size_t N > struct size_t; +} +namespace boost { namespace mpl { using ::mpl_::size_t; } } +namespace mpl_ { +template< std::size_t N > +struct size_t +{ + static const std::size_t value = N; + typedef size_t type; + typedef std::size_t value_type; + typedef integral_c_tag tag; + typedef mpl_::size_t< static_cast((value + 1)) > next; + typedef mpl_::size_t< static_cast((value - 1)) > prior; + operator std::size_t() const { return static_cast(this->value); } +}; +template< std::size_t N > +std::size_t const mpl_::size_t< N >::value; +} + +namespace boost { +template struct alignment_of; +namespace detail { +template +struct alignment_of_hack +{ + char c; + T t; + alignment_of_hack(); +}; +template +struct alignment_logic +{ + static const std::size_t value = A < S ? A : S; +}; +template< typename T > +struct alignment_of_impl +{ + static const std::size_t value = __alignof__(T); +}; +} +template< typename T > struct alignment_of : ::boost::integral_constant::value> { }; +template +struct alignment_of + : alignment_of +{ +}; +template<> struct alignment_of : ::boost::integral_constant { }; +template<> struct alignment_of : ::boost::integral_constant { }; +template<> struct alignment_of : ::boost::integral_constant { }; +template<> struct alignment_of : ::boost::integral_constant { }; +} +namespace boost +{ + template + struct enable_if_c { + typedef T type; + }; + template + struct enable_if_c {}; + template + struct enable_if : public enable_if_c {}; + template + struct lazy_enable_if_c { + typedef typename T::type type; + }; + template + struct lazy_enable_if_c {}; + template + struct lazy_enable_if : public lazy_enable_if_c {}; + template + struct disable_if_c { + typedef T type; + }; + template + struct disable_if_c {}; + template + struct disable_if : public disable_if_c {}; + template + struct lazy_disable_if_c { + typedef typename T::type type; + }; + template + struct lazy_disable_if_c {}; + template + struct lazy_disable_if : public lazy_disable_if_c {}; +} +namespace boost { +template + bool function_equal_impl(const F& f, const G& g, long) + { return f == g; } +template + bool function_equal(const F& f, const G& g) + { return function_equal_impl(f, g, 0); } +} +namespace boost { + class bad_function_call; + template class function; + template + inline void swap(function& f1, function& f2) + { + f1.swap(f2); + } + template class function0; + template class function1; + template class function2; + template class function3; + template + class function4; + template + class function5; + template + class function6; + template + class function7; + template + class function8; + template + class function9; + template + class function10; +} + + +namespace std __attribute__ ((__visibility__ ("default"))) { + using ::memchr; + using ::memcmp; + using ::memcpy; + using ::memmove; + using ::memset; + using ::strcat; + using ::strcmp; + using ::strcoll; + using ::strcpy; + using ::strcspn; + using ::strerror; + using ::strlen; + using ::strncat; + using ::strncmp; + using ::strncpy; + using ::strspn; + using ::strtok; + using ::strxfrm; + using ::strchr; + using ::strpbrk; + using ::strrchr; + using ::strstr; +} +namespace boost { + namespace detail { + namespace function { + class X; + union function_buffer + { + mutable void* obj_ptr; + struct type_t { + const detail::sp_typeinfo* type; + bool const_qualified; + bool volatile_qualified; + } type; + mutable void (*func_ptr)(); + struct bound_memfunc_ptr_t { + void (X::*memfunc_ptr)(int); + void* obj_ptr; + } bound_memfunc_ptr; + struct obj_ref_t { + mutable void* obj_ptr; + bool is_const_qualified; + bool is_volatile_qualified; + } obj_ref; + mutable char data; + }; + struct unusable + { + unusable() {} + template unusable(const T&) {} + }; + template struct function_return_type { typedef T type; }; + template<> + struct function_return_type + { + typedef unusable type; + }; + enum functor_manager_operation_type { + clone_functor_tag, + move_functor_tag, + destroy_functor_tag, + check_functor_type_tag, + get_functor_type_tag + }; + struct function_ptr_tag {}; + struct function_obj_tag {}; + struct member_ptr_tag {}; + struct function_obj_ref_tag {}; + template + class get_function_tag + { + typedef typename mpl::if_c<(is_pointer::value), + function_ptr_tag, + function_obj_tag>::type ptr_or_obj_tag; + typedef typename mpl::if_c<(is_member_pointer::value), + member_ptr_tag, + ptr_or_obj_tag>::type ptr_or_obj_or_mem_tag; + typedef typename mpl::if_c<(is_reference_wrapper::value), + function_obj_ref_tag, + ptr_or_obj_or_mem_tag>::type or_ref_tag; + public: + typedef or_ref_tag type; + }; + template + struct reference_manager + { + static inline void + manage(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + switch (op) { + case clone_functor_tag: + out_buffer.obj_ref.obj_ptr = in_buffer.obj_ref.obj_ptr; + return; + case move_functor_tag: + out_buffer.obj_ref.obj_ptr = in_buffer.obj_ref.obj_ptr; + in_buffer.obj_ref.obj_ptr = 0; + return; + case destroy_functor_tag: + out_buffer.obj_ref.obj_ptr = 0; + return; + case check_functor_type_tag: + { + const detail::sp_typeinfo& check_type + = *out_buffer.type.type; + if ((std::strcmp((check_type).name(),(typeid(F)).name()) == 0) + && (!in_buffer.obj_ref.is_const_qualified + || out_buffer.type.const_qualified) + && (!in_buffer.obj_ref.is_volatile_qualified + || out_buffer.type.volatile_qualified)) + out_buffer.obj_ptr = in_buffer.obj_ref.obj_ptr; + else + out_buffer.obj_ptr = 0; + } + return; + case get_functor_type_tag: + out_buffer.type.type = &typeid(F); + out_buffer.type.const_qualified = in_buffer.obj_ref.is_const_qualified; + out_buffer.type.volatile_qualified = in_buffer.obj_ref.is_volatile_qualified; + return; + } + } + }; + template + struct function_allows_small_object_optimization + { + static const bool value = ((sizeof(F) <= sizeof(function_buffer) && (alignment_of::value % alignment_of::value == 0))) + ; + }; + template + struct functor_wrapper: public F, public A + { + functor_wrapper( F f, A a ): + F(f), + A(a) + { + } + functor_wrapper(const functor_wrapper& f) : + F(static_cast(f)), + A(static_cast(f)) + { + } + }; + template + struct functor_manager_common + { + typedef Functor functor_type; + static inline void + manage_ptr(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + if (op == clone_functor_tag) + out_buffer.func_ptr = in_buffer.func_ptr; + else if (op == move_functor_tag) { + out_buffer.func_ptr = in_buffer.func_ptr; + in_buffer.func_ptr = 0; + } else if (op == destroy_functor_tag) + out_buffer.func_ptr = 0; + else if (op == check_functor_type_tag) { + const detail::sp_typeinfo& check_type + = *out_buffer.type.type; + if ((std::strcmp((check_type).name(),(typeid(Functor)).name()) == 0)) + out_buffer.obj_ptr = &in_buffer.func_ptr; + else + out_buffer.obj_ptr = 0; + } else { + out_buffer.type.type = &typeid(Functor); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + } + } + static inline void + manage_small(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + if (op == clone_functor_tag || op == move_functor_tag) { + const functor_type* in_functor = + reinterpret_cast(&in_buffer.data); + new ((void*)&out_buffer.data) functor_type(*in_functor); + if (op == move_functor_tag) { + reinterpret_cast(&in_buffer.data)->~Functor(); + } + } else if (op == destroy_functor_tag) { + reinterpret_cast(&out_buffer.data)->~Functor(); + } else if (op == check_functor_type_tag) { + const detail::sp_typeinfo& check_type + = *out_buffer.type.type; + if ((std::strcmp((check_type).name(),(typeid(Functor)).name()) == 0)) + out_buffer.obj_ptr = &in_buffer.data; + else + out_buffer.obj_ptr = 0; + } else { + out_buffer.type.type = &typeid(Functor); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + } + } + }; + template + struct functor_manager + { + private: + typedef Functor functor_type; + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, function_ptr_tag) + { + functor_manager_common::manage_ptr(in_buffer,out_buffer,op); + } + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, mpl::true_) + { + functor_manager_common::manage_small(in_buffer,out_buffer,op); + } + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, mpl::false_) + { + if (op == clone_functor_tag) { + const functor_type* f = + (const functor_type*)(in_buffer.obj_ptr); + functor_type* new_f = new functor_type(*f); + out_buffer.obj_ptr = new_f; + } else if (op == move_functor_tag) { + out_buffer.obj_ptr = in_buffer.obj_ptr; + in_buffer.obj_ptr = 0; + } else if (op == destroy_functor_tag) { + functor_type* f = + static_cast(out_buffer.obj_ptr); + delete f; + out_buffer.obj_ptr = 0; + } else if (op == check_functor_type_tag) { + const detail::sp_typeinfo& check_type + = *out_buffer.type.type; + if ((std::strcmp((check_type).name(),(typeid(Functor)).name()) == 0)) + out_buffer.obj_ptr = in_buffer.obj_ptr; + else + out_buffer.obj_ptr = 0; + } else { + out_buffer.type.type = &typeid(Functor); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + } + } + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, function_obj_tag) + { + manager(in_buffer, out_buffer, op, + mpl::bool_<(function_allows_small_object_optimization::value)>()); + } + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, member_ptr_tag) + { + manager(in_buffer, out_buffer, op, mpl::true_()); + } + public: + static inline void + manage(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + typedef typename get_function_tag::type tag_type; + switch (op) { + case get_functor_type_tag: + out_buffer.type.type = &typeid(functor_type); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + return; + default: + manager(in_buffer, out_buffer, op, tag_type()); + return; + } + } + }; + template + struct functor_manager_a + { + private: + typedef Functor functor_type; + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, function_ptr_tag) + { + functor_manager_common::manage_ptr(in_buffer,out_buffer,op); + } + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, mpl::true_) + { + functor_manager_common::manage_small(in_buffer,out_buffer,op); + } + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, mpl::false_) + { + typedef functor_wrapper functor_wrapper_type; + typedef typename Allocator::template rebind::other + wrapper_allocator_type; + typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type; + if (op == clone_functor_tag) { + const functor_wrapper_type* f = + (const functor_wrapper_type*)(in_buffer.obj_ptr); + wrapper_allocator_type wrapper_allocator(static_cast(*f)); + wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1); + wrapper_allocator.construct(copy, *f); + functor_wrapper_type* new_f = static_cast(copy); + out_buffer.obj_ptr = new_f; + } else if (op == move_functor_tag) { + out_buffer.obj_ptr = in_buffer.obj_ptr; + in_buffer.obj_ptr = 0; + } else if (op == destroy_functor_tag) { + functor_wrapper_type* victim = + static_cast(in_buffer.obj_ptr); + wrapper_allocator_type wrapper_allocator(static_cast(*victim)); + wrapper_allocator.destroy(victim); + wrapper_allocator.deallocate(victim,1); + out_buffer.obj_ptr = 0; + } else if (op == check_functor_type_tag) { + const detail::sp_typeinfo& check_type + = *out_buffer.type.type; + if ((std::strcmp((check_type).name(),(typeid(Functor)).name()) == 0)) + out_buffer.obj_ptr = in_buffer.obj_ptr; + else + out_buffer.obj_ptr = 0; + } else { + out_buffer.type.type = &typeid(Functor); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + } + } + static inline void + manager(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op, function_obj_tag) + { + manager(in_buffer, out_buffer, op, + mpl::bool_<(function_allows_small_object_optimization::value)>()); + } + public: + static inline void + manage(const function_buffer& in_buffer, function_buffer& out_buffer, + functor_manager_operation_type op) + { + typedef typename get_function_tag::type tag_type; + switch (op) { + case get_functor_type_tag: + out_buffer.type.type = &typeid(functor_type); + out_buffer.type.const_qualified = false; + out_buffer.type.volatile_qualified = false; + return; + default: + manager(in_buffer, out_buffer, op, tag_type()); + return; + } + } + }; + struct useless_clear_type {}; + struct vtable_base + { + void (*manager)(const function_buffer& in_buffer, + function_buffer& out_buffer, + functor_manager_operation_type op); + }; + } + } +class function_base +{ +public: + function_base() : vtable(0) { } + bool empty() const { return !vtable; } + const detail::sp_typeinfo& target_type() const + { + if (!vtable) return typeid(void); + detail::function::function_buffer type; + get_vtable()->manager(functor, type, detail::function::get_functor_type_tag); + return *type.type.type; + } + template + Functor* target() + { + if (!vtable) return 0; + detail::function::function_buffer type_result; + type_result.type.type = &typeid(Functor); + type_result.type.const_qualified = is_const::value; + type_result.type.volatile_qualified = is_volatile::value; + get_vtable()->manager(functor, type_result, + detail::function::check_functor_type_tag); + return static_cast(type_result.obj_ptr); + } + template + const Functor* target() const + { + if (!vtable) return 0; + detail::function::function_buffer type_result; + type_result.type.type = &typeid(Functor); + type_result.type.const_qualified = true; + type_result.type.volatile_qualified = is_volatile::value; + get_vtable()->manager(functor, type_result, + detail::function::check_functor_type_tag); + return (const Functor*)(type_result.obj_ptr); + } + template + bool contains(const F& f) const + { + if (const F* fp = this->template target()) + { + return function_equal(*fp, f); + } else { + return false; + } + } +public: + detail::function::vtable_base* get_vtable() const { + return reinterpret_cast( + reinterpret_cast(vtable) & ~(std::size_t)0x01); + } + bool has_trivial_copy_and_destroy() const { + return reinterpret_cast(vtable) & 0x01; + } + detail::function::vtable_base* vtable; + mutable detail::function::function_buffer functor; +}; +class bad_function_call : public std::runtime_error +{ +public: + bad_function_call() : std::runtime_error("call to empty boost::function") {} +}; +inline bool operator==(const function_base& f, + detail::function::useless_clear_type*) +{ + return f.empty(); +} +inline bool operator!=(const function_base& f, + detail::function::useless_clear_type*) +{ + return !f.empty(); +} +inline bool operator==(detail::function::useless_clear_type*, + const function_base& f) +{ + return f.empty(); +} +inline bool operator!=(detail::function::useless_clear_type*, + const function_base& f) +{ + return !f.empty(); +} +template + typename ::boost::enable_if_c<(::boost::type_traits::ice_not< (::boost::is_integral::value)>::value), bool>::type + operator==(const function_base& f, Functor g) + { + if (const Functor* fp = f.template target()) + return function_equal(*fp, g); + else return false; + } +template + typename ::boost::enable_if_c<(::boost::type_traits::ice_not< (::boost::is_integral::value)>::value), bool>::type + operator==(Functor g, const function_base& f) + { + if (const Functor* fp = f.template target()) + return function_equal(g, *fp); + else return false; + } +template + typename ::boost::enable_if_c<(::boost::type_traits::ice_not< (::boost::is_integral::value)>::value), bool>::type + operator!=(const function_base& f, Functor g) + { + if (const Functor* fp = f.template target()) + return !function_equal(*fp, g); + else return true; + } +template + typename ::boost::enable_if_c<(::boost::type_traits::ice_not< (::boost::is_integral::value)>::value), bool>::type + operator!=(Functor g, const function_base& f) + { + if (const Functor* fp = f.template target()) + return !function_equal(g, *fp); + else return true; + } +template + typename ::boost::enable_if_c<(::boost::type_traits::ice_not< (::boost::is_integral::value)>::value), bool>::type + operator==(const function_base& f, reference_wrapper g) + { + if (const Functor* fp = f.template target()) + return fp == g.get_pointer(); + else return false; + } +template + typename ::boost::enable_if_c<(::boost::type_traits::ice_not< (::boost::is_integral::value)>::value), bool>::type + operator==(reference_wrapper g, const function_base& f) + { + if (const Functor* fp = f.template target()) + return g.get_pointer() == fp; + else return false; + } +template + typename ::boost::enable_if_c<(::boost::type_traits::ice_not< (::boost::is_integral::value)>::value), bool>::type + operator!=(const function_base& f, reference_wrapper g) + { + if (const Functor* fp = f.template target()) + return fp != g.get_pointer(); + else return true; + } +template + typename ::boost::enable_if_c<(::boost::type_traits::ice_not< (::boost::is_integral::value)>::value), bool>::type + operator!=(reference_wrapper g, const function_base& f) + { + if (const Functor* fp = f.template target()) + return g.get_pointer() != fp; + else return true; + } +namespace detail { + namespace function { + inline bool has_empty_target(const function_base* f) + { + return f->empty(); + } + inline bool has_empty_target(...) + { + return false; + } + } +} +} +namespace boost { +template T * get_pointer(T * p) +{ + return p; +} +template T * get_pointer(std::auto_ptr const& p) +{ + return p.get(); +} +} +namespace boost +{ +namespace _mfi +{ +template class mf0 +{ +public: + typedef R result_type; + typedef T * argument_type; +private: + typedef R ( T::*F) (); + F f_; + template R call(U & u, T const *) const + { + return (u.*f_)(); + } + template R call(U & u, void const *) const + { + return (get_pointer(u)->*f_)(); + } +public: + explicit mf0(F f): f_(f) {} + R operator()(T * p) const + { + return (p->*f_)(); + } + template R operator()(U & u) const + { + U const * p = 0; + return call(u, p); + } + template R operator()(U const & u) const + { + U const * p = 0; + return call(u, p); + } + R operator()(T & t) const + { + return (t.*f_)(); + } + bool operator==(mf0 const & rhs) const + { + return f_ == rhs.f_; + } + bool operator!=(mf0 const & rhs) const + { + return f_ != rhs.f_; + } +}; +template class cmf0 +{ +public: + typedef R result_type; + typedef T const * argument_type; +private: + typedef R ( T::*F) () const; + F f_; + template R call(U & u, T const *) const + { + return (u.*f_)(); + } + template R call(U & u, void const *) const + { + return (get_pointer(u)->*f_)(); + } +public: + explicit cmf0(F f): f_(f) {} + template R operator()(U const & u) const + { + U const * p = 0; + return call(u, p); + } + R operator()(T const & t) const + { + return (t.*f_)(); + } + bool operator==(cmf0 const & rhs) const + { + return f_ == rhs.f_; + } + bool operator!=(cmf0 const & rhs) const + { + return f_ != rhs.f_; + } +}; +template class mf1 +{ +public: + typedef R result_type; + typedef T * first_argument_type; + typedef A1 second_argument_type; +private: + typedef R ( T::*F) (A1); + F f_; + template R call(U & u, T const *, B1 & b1) const + { + return (u.*f_)(b1); + } + template R call(U & u, void const *, B1 & b1) const + { + return (get_pointer(u)->*f_)(b1); + } +public: + explicit mf1(F f): f_(f) {} + R operator()(T * p, A1 a1) const + { + return (p->*f_)(a1); + } + template R operator()(U & u, A1 a1) const + { + U const * p = 0; + return call(u, p, a1); + } + template R operator()(U const & u, A1 a1) const + { + U const * p = 0; + return call(u, p, a1); + } + R operator()(T & t, A1 a1) const + { + return (t.*f_)(a1); + } + bool operator==(mf1 const & rhs) const + { + return f_ == rhs.f_; + } + bool operator!=(mf1 const & rhs) const + { + return f_ != rhs.f_; + } +}; +template class cmf1 +{ +public: + typedef R result_type; + typedef T const * first_argument_type; + typedef A1 second_argument_type; +private: + typedef R ( T::*F) (A1) const; + F f_; + template R call(U & u, T const *, B1 & b1) const + { + return (u.*f_)(b1); + } + template R call(U & u, void const *, B1 & b1) const + { + return (get_pointer(u)->*f_)(b1); + } +public: + explicit cmf1(F f): f_(f) {} + template R operator()(U const & u, A1 a1) const + { + U const * p = 0; + return call(u, p, a1); + } + R operator()(T const & t, A1 a1) const + { + return (t.*f_)(a1); + } + bool operator==(cmf1 const & rhs) const + { + return f_ == rhs.f_; + } + bool operator!=(cmf1 const & rhs) const + { + return f_ != rhs.f_; + } +}; +template class mf2 +{ +public: + typedef R result_type; +private: + typedef R ( T::*F) (A1, A2); + F f_; + template R call(U & u, T const *, B1 & b1, B2 & b2) const + { + return (u.*f_)(b1, b2); + } + template R call(U & u, void const *, B1 & b1, B2 & b2) const + { + return (get_pointer(u)->*f_)(b1, b2); + } +public: + explicit mf2(F f): f_(f) {} + R operator()(T * p, A1 a1, A2 a2) const + { + return (p->*f_)(a1, a2); + } + template R operator()(U & u, A1 a1, A2 a2) const + { + U const * p = 0; + return call(u, p, a1, a2); + } + template R operator()(U const & u, A1 a1, A2 a2) const + { + U const * p = 0; + return call(u, p, a1, a2); + } + R operator()(T & t, A1 a1, A2 a2) const + { + return (t.*f_)(a1, a2); + } + bool operator==(mf2 const & rhs) const + { + return f_ == rhs.f_; + } + bool operator!=(mf2 const & rhs) const + { + return f_ != rhs.f_; + } +}; +template class cmf2 +{ +public: + typedef R result_type; +private: + typedef R ( T::*F) (A1, A2) const; + F f_; + template R call(U & u, T const *, B1 & b1, B2 & b2) const + { + return (u.*f_)(b1, b2); + } + template R call(U & u, void const *, B1 & b1, B2 & b2) const + { + return (get_pointer(u)->*f_)(b1, b2); + } +public: + explicit cmf2(F f): f_(f) {} + template R operator()(U const & u, A1 a1, A2 a2) const + { + U const * p = 0; + return call(u, p, a1, a2); + } + R operator()(T const & t, A1 a1, A2 a2) const + { + return (t.*f_)(a1, a2); + } + bool operator==(cmf2 const & rhs) const + { + return f_ == rhs.f_; + } + bool operator!=(cmf2 const & rhs) const + { + return f_ != rhs.f_; + } +}; +template class mf3 +{ +public: + typedef R result_type; +private: + typedef R ( T::*F) (A1, A2, A3); + F f_; + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3) const + { + return (u.*f_)(b1, b2, b3); + } + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3) const + { + return (get_pointer(u)->*f_)(b1, b2, b3); + } +public: + explicit mf3(F f): f_(f) {} + R operator()(T * p, A1 a1, A2 a2, A3 a3) const + { + return (p->*f_)(a1, a2, a3); + } + template R operator()(U & u, A1 a1, A2 a2, A3 a3) const + { + U const * p = 0; + return call(u, p, a1, a2, a3); + } + template R operator()(U const & u, A1 a1, A2 a2, A3 a3) const + { + U const * p = 0; + return call(u, p, a1, a2, a3); + } + R operator()(T & t, A1 a1, A2 a2, A3 a3) const + { + return (t.*f_)(a1, a2, a3); + } + bool operator==(mf3 const & rhs) const + { + return f_ == rhs.f_; + } + bool operator!=(mf3 const & rhs) const + { + return f_ != rhs.f_; + } +}; +template class cmf3 +{ +public: + typedef R result_type; +private: + typedef R ( T::*F) (A1, A2, A3) const; + F f_; + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3) const + { + return (u.*f_)(b1, b2, b3); + } + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3) const + { + return (get_pointer(u)->*f_)(b1, b2, b3); + } +public: + explicit cmf3(F f): f_(f) {} + template R operator()(U const & u, A1 a1, A2 a2, A3 a3) const + { + U const * p = 0; + return call(u, p, a1, a2, a3); + } + R operator()(T const & t, A1 a1, A2 a2, A3 a3) const + { + return (t.*f_)(a1, a2, a3); + } + bool operator==(cmf3 const & rhs) const + { + return f_ == rhs.f_; + } + bool operator!=(cmf3 const & rhs) const + { + return f_ != rhs.f_; + } +}; +template class mf4 +{ +public: + typedef R result_type; +private: + typedef R ( T::*F) (A1, A2, A3, A4); + F f_; + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const + { + return (u.*f_)(b1, b2, b3, b4); + } + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const + { + return (get_pointer(u)->*f_)(b1, b2, b3, b4); + } +public: + explicit mf4(F f): f_(f) {} + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4) const + { + return (p->*f_)(a1, a2, a3, a4); + } + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4); + } + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4); + } + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4) const + { + return (t.*f_)(a1, a2, a3, a4); + } + bool operator==(mf4 const & rhs) const + { + return f_ == rhs.f_; + } + bool operator!=(mf4 const & rhs) const + { + return f_ != rhs.f_; + } +}; +template class cmf4 +{ +public: + typedef R result_type; +private: + typedef R ( T::*F) (A1, A2, A3, A4) const; + F f_; + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const + { + return (u.*f_)(b1, b2, b3, b4); + } + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const + { + return (get_pointer(u)->*f_)(b1, b2, b3, b4); + } +public: + explicit cmf4(F f): f_(f) {} + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4); + } + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4) const + { + return (t.*f_)(a1, a2, a3, a4); + } + bool operator==(cmf4 const & rhs) const + { + return f_ == rhs.f_; + } + bool operator!=(cmf4 const & rhs) const + { + return f_ != rhs.f_; + } +}; +template class mf5 +{ +public: + typedef R result_type; +private: + typedef R ( T::*F) (A1, A2, A3, A4, A5); + F f_; + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const + { + return (u.*f_)(b1, b2, b3, b4, b5); + } + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const + { + return (get_pointer(u)->*f_)(b1, b2, b3, b4, b5); + } +public: + explicit mf5(F f): f_(f) {} + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + return (p->*f_)(a1, a2, a3, a4, a5); + } + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4, a5); + } + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4, a5); + } + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + return (t.*f_)(a1, a2, a3, a4, a5); + } + bool operator==(mf5 const & rhs) const + { + return f_ == rhs.f_; + } + bool operator!=(mf5 const & rhs) const + { + return f_ != rhs.f_; + } +}; +template class cmf5 +{ +public: + typedef R result_type; +private: + typedef R ( T::*F) (A1, A2, A3, A4, A5) const; + F f_; + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const + { + return (u.*f_)(b1, b2, b3, b4, b5); + } + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const + { + return (get_pointer(u)->*f_)(b1, b2, b3, b4, b5); + } +public: + explicit cmf5(F f): f_(f) {} + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4, a5); + } + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + { + return (t.*f_)(a1, a2, a3, a4, a5); + } + bool operator==(cmf5 const & rhs) const + { + return f_ == rhs.f_; + } + bool operator!=(cmf5 const & rhs) const + { + return f_ != rhs.f_; + } +}; +template class mf6 +{ +public: + typedef R result_type; +private: + typedef R ( T::*F) (A1, A2, A3, A4, A5, A6); + F f_; + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const + { + return (u.*f_)(b1, b2, b3, b4, b5, b6); + } + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const + { + return (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6); + } +public: + explicit mf6(F f): f_(f) {} + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + return (p->*f_)(a1, a2, a3, a4, a5, a6); + } + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4, a5, a6); + } + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4, a5, a6); + } + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + return (t.*f_)(a1, a2, a3, a4, a5, a6); + } + bool operator==(mf6 const & rhs) const + { + return f_ == rhs.f_; + } + bool operator!=(mf6 const & rhs) const + { + return f_ != rhs.f_; + } +}; +template class cmf6 +{ +public: + typedef R result_type; +private: + typedef R ( T::*F) (A1, A2, A3, A4, A5, A6) const; + F f_; + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const + { + return (u.*f_)(b1, b2, b3, b4, b5, b6); + } + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const + { + return (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6); + } +public: + explicit cmf6(F f): f_(f) {} + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4, a5, a6); + } + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + { + return (t.*f_)(a1, a2, a3, a4, a5, a6); + } + bool operator==(cmf6 const & rhs) const + { + return f_ == rhs.f_; + } + bool operator!=(cmf6 const & rhs) const + { + return f_ != rhs.f_; + } +}; +template class mf7 +{ +public: + typedef R result_type; +private: + typedef R ( T::*F) (A1, A2, A3, A4, A5, A6, A7); + F f_; + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const + { + return (u.*f_)(b1, b2, b3, b4, b5, b6, b7); + } + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const + { + return (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7); + } +public: + explicit mf7(F f): f_(f) {} + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + return (p->*f_)(a1, a2, a3, a4, a5, a6, a7); + } + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4, a5, a6, a7); + } + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4, a5, a6, a7); + } + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + return (t.*f_)(a1, a2, a3, a4, a5, a6, a7); + } + bool operator==(mf7 const & rhs) const + { + return f_ == rhs.f_; + } + bool operator!=(mf7 const & rhs) const + { + return f_ != rhs.f_; + } +}; +template class cmf7 +{ +public: + typedef R result_type; +private: + typedef R ( T::*F) (A1, A2, A3, A4, A5, A6, A7) const; + F f_; + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const + { + return (u.*f_)(b1, b2, b3, b4, b5, b6, b7); + } + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const + { + return (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7); + } +public: + explicit cmf7(F f): f_(f) {} + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4, a5, a6, a7); + } + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + { + return (t.*f_)(a1, a2, a3, a4, a5, a6, a7); + } + bool operator==(cmf7 const & rhs) const + { + return f_ == rhs.f_; + } + bool operator!=(cmf7 const & rhs) const + { + return f_ != rhs.f_; + } +}; +template class mf8 +{ +public: + typedef R result_type; +private: + typedef R ( T::*F) (A1, A2, A3, A4, A5, A6, A7, A8); + F f_; + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const + { + return (u.*f_)(b1, b2, b3, b4, b5, b6, b7, b8); + } + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const + { + return (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7, b8); + } +public: + explicit mf8(F f): f_(f) {} + R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + return (p->*f_)(a1, a2, a3, a4, a5, a6, a7, a8); + } + template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4, a5, a6, a7, a8); + } + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4, a5, a6, a7, a8); + } + R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + return (t.*f_)(a1, a2, a3, a4, a5, a6, a7, a8); + } + bool operator==(mf8 const & rhs) const + { + return f_ == rhs.f_; + } + bool operator!=(mf8 const & rhs) const + { + return f_ != rhs.f_; + } +}; +template class cmf8 +{ +public: + typedef R result_type; +private: + typedef R ( T::*F) (A1, A2, A3, A4, A5, A6, A7, A8) const; + F f_; + template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const + { + return (u.*f_)(b1, b2, b3, b4, b5, b6, b7, b8); + } + template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const + { + return (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7, b8); + } +public: + explicit cmf8(F f): f_(f) {} + R operator()(T const * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + return (p->*f_)(a1, a2, a3, a4, a5, a6, a7, a8); + } + template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + U const * p = 0; + return call(u, p, a1, a2, a3, a4, a5, a6, a7, a8); + } + R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const + { + return (t.*f_)(a1, a2, a3, a4, a5, a6, a7, a8); + } + bool operator==(cmf8 const & rhs) const + { + return f_ == rhs.f_; + } + bool operator!=(cmf8 const & rhs) const + { + return f_ != rhs.f_; + } +}; +} +template _mfi::mf0 mem_fn(R ( T::*f) ()) +{ + return _mfi::mf0(f); +} +template _mfi::cmf0 mem_fn(R ( T::*f) () const) +{ + return _mfi::cmf0(f); +} +template _mfi::mf1 mem_fn(R ( T::*f) (A1)) +{ + return _mfi::mf1(f); +} +template _mfi::cmf1 mem_fn(R ( T::*f) (A1) const) +{ + return _mfi::cmf1(f); +} +template _mfi::mf2 mem_fn(R ( T::*f) (A1, A2)) +{ + return _mfi::mf2(f); +} +template _mfi::cmf2 mem_fn(R ( T::*f) (A1, A2) const) +{ + return _mfi::cmf2(f); +} +template _mfi::mf3 mem_fn(R ( T::*f) (A1, A2, A3)) +{ + return _mfi::mf3(f); +} +template _mfi::cmf3 mem_fn(R ( T::*f) (A1, A2, A3) const) +{ + return _mfi::cmf3(f); +} +template _mfi::mf4 mem_fn(R ( T::*f) (A1, A2, A3, A4)) +{ + return _mfi::mf4(f); +} +template _mfi::cmf4 mem_fn(R ( T::*f) (A1, A2, A3, A4) const) +{ + return _mfi::cmf4(f); +} +template _mfi::mf5 mem_fn(R ( T::*f) (A1, A2, A3, A4, A5)) +{ + return _mfi::mf5(f); +} +template _mfi::cmf5 mem_fn(R ( T::*f) (A1, A2, A3, A4, A5) const) +{ + return _mfi::cmf5(f); +} +template _mfi::mf6 mem_fn(R ( T::*f) (A1, A2, A3, A4, A5, A6)) +{ + return _mfi::mf6(f); +} +template _mfi::cmf6 mem_fn(R ( T::*f) (A1, A2, A3, A4, A5, A6) const) +{ + return _mfi::cmf6(f); +} +template _mfi::mf7 mem_fn(R ( T::*f) (A1, A2, A3, A4, A5, A6, A7)) +{ + return _mfi::mf7(f); +} +template _mfi::cmf7 mem_fn(R ( T::*f) (A1, A2, A3, A4, A5, A6, A7) const) +{ + return _mfi::cmf7(f); +} +template _mfi::mf8 mem_fn(R ( T::*f) (A1, A2, A3, A4, A5, A6, A7, A8)) +{ + return _mfi::mf8(f); +} +template _mfi::cmf8 mem_fn(R ( T::*f) (A1, A2, A3, A4, A5, A6, A7, A8) const) +{ + return _mfi::cmf8(f); +} +namespace _mfi +{ +template class dm +{ +public: + typedef R const & result_type; + typedef T const * argument_type; +private: + typedef R (T::*F); + F f_; + template R const & call(U & u, T const *) const + { + return (u.*f_); + } + template R const & call(U & u, void const *) const + { + return (get_pointer(u)->*f_); + } +public: + explicit dm(F f): f_(f) {} + R & operator()(T * p) const + { + return (p->*f_); + } + R const & operator()(T const * p) const + { + return (p->*f_); + } + template R const & operator()(U const & u) const + { + return call(u, &u); + } + R & operator()(T & t) const + { + return (t.*f_); + } + R const & operator()(T const & t) const + { + return (t.*f_); + } + bool operator==(dm const & rhs) const + { + return f_ == rhs.f_; + } + bool operator!=(dm const & rhs) const + { + return f_ != rhs.f_; + } +}; +} +template _mfi::dm mem_fn(R T::*f) +{ + return _mfi::dm(f); +} +} +namespace boost { + namespace detail { + namespace function { + template< + typename FunctionPtr, + typename R + + > + struct function_invoker0 + { + static R invoke(function_buffer& function_ptr + ) + { + FunctionPtr f = reinterpret_cast(function_ptr.func_ptr); + return f(); + } + }; + template< + typename FunctionPtr, + typename R + + > + struct void_function_invoker0 + { + static void + invoke(function_buffer& function_ptr + ) + { + FunctionPtr f = reinterpret_cast(function_ptr.func_ptr); + f(); + } + }; + template< + typename FunctionObj, + typename R + + > + struct function_obj_invoker0 + { + static R invoke(function_buffer& function_obj_ptr + ) + { + FunctionObj* f; + if (function_allows_small_object_optimization::value) + f = reinterpret_cast(&function_obj_ptr.data); + else + f = reinterpret_cast(function_obj_ptr.obj_ptr); + return (*f)(); + } + }; + template< + typename FunctionObj, + typename R + + > + struct void_function_obj_invoker0 + { + static void + invoke(function_buffer& function_obj_ptr + ) + { + FunctionObj* f; + if (function_allows_small_object_optimization::value) + f = reinterpret_cast(&function_obj_ptr.data); + else + f = reinterpret_cast(function_obj_ptr.obj_ptr); + (*f)(); + } + }; + template< + typename FunctionObj, + typename R + + > + struct function_ref_invoker0 + { + static R invoke(function_buffer& function_obj_ptr + ) + { + FunctionObj* f = + reinterpret_cast(function_obj_ptr.obj_ptr); + return (*f)(); + } + }; + template< + typename FunctionObj, + typename R + + > + struct void_function_ref_invoker0 + { + static void + invoke(function_buffer& function_obj_ptr + ) + { + FunctionObj* f = + reinterpret_cast(function_obj_ptr.obj_ptr); + (*f)(); + } + }; + template< + typename FunctionPtr, + typename R + + > + struct get_function_invoker0 + { + typedef typename mpl::if_c<(is_void::value), + void_function_invoker0< + FunctionPtr, + R + + >, + function_invoker0< + FunctionPtr, + R + + > + >::type type; + }; + template< + typename FunctionObj, + typename R + + > + struct get_function_obj_invoker0 + { + typedef typename mpl::if_c<(is_void::value), + void_function_obj_invoker0< + FunctionObj, + R + + >, + function_obj_invoker0< + FunctionObj, + R + + > + >::type type; + }; + template< + typename FunctionObj, + typename R + + > + struct get_function_ref_invoker0 + { + typedef typename mpl::if_c<(is_void::value), + void_function_ref_invoker0< + FunctionObj, + R + + >, + function_ref_invoker0< + FunctionObj, + R + + > + >::type type; + }; + template + struct get_invoker0 { }; + template<> + struct get_invoker0 + { + template + struct apply + { + typedef typename get_function_invoker0< + FunctionPtr, + R + + >::type + invoker_type; + typedef functor_manager manager_type; + }; + template + struct apply_a + { + typedef typename get_function_invoker0< + FunctionPtr, + R + + >::type + invoker_type; + typedef functor_manager manager_type; + }; + }; + template<> + struct get_invoker0 + { + template + struct apply + { + typedef typename get_function_obj_invoker0< + FunctionObj, + R + + >::type + invoker_type; + typedef functor_manager manager_type; + }; + template + struct apply_a + { + typedef typename get_function_obj_invoker0< + FunctionObj, + R + + >::type + invoker_type; + typedef functor_manager_a manager_type; + }; + }; + template<> + struct get_invoker0 + { + template + struct apply + { + typedef typename get_function_ref_invoker0< + typename RefWrapper::type, + R + + >::type + invoker_type; + typedef reference_manager manager_type; + }; + template + struct apply_a + { + typedef typename get_function_ref_invoker0< + typename RefWrapper::type, + R + + >::type + invoker_type; + typedef reference_manager manager_type; + }; + }; + template + struct basic_vtable0 + { + typedef R result_type; + typedef result_type (*invoker_type)(function_buffer& + + ); + template + bool assign_to(F f, function_buffer& functor) + { + typedef typename get_function_tag::type tag; + return assign_to(f, functor, tag()); + } + template + bool assign_to_a(F f, function_buffer& functor, Allocator a) + { + typedef typename get_function_tag::type tag; + return assign_to_a(f, functor, a, tag()); + } + void clear(function_buffer& functor) + { + if (base.manager) + base.manager(functor, functor, destroy_functor_tag); + } + private: + template + bool + assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) + { + this->clear(functor); + if (f) { + functor.func_ptr = (void (*)())(f); + return true; + } else { + return false; + } + } + template + bool + assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) + { + return assign_to(f,functor,function_ptr_tag()); + } + template + void + assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) + { + new ((void*)&functor.data) FunctionObj(f); + } + template + void + assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) + { + assign_functor(f,functor,mpl::true_()); + } + template + void + assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) + { + functor.obj_ptr = new FunctionObj(f); + } + template + void + assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) + { + typedef functor_wrapper functor_wrapper_type; + typedef typename Allocator::template rebind::other + wrapper_allocator_type; + typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type; + wrapper_allocator_type wrapper_allocator(a); + wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1); + wrapper_allocator.construct(copy, functor_wrapper_type(f,a)); + functor_wrapper_type* new_f = static_cast(copy); + functor.obj_ptr = new_f; + } + template + bool + assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) + { + if (!boost::detail::function::has_empty_target(boost::addressof(f))) { + assign_functor(f, functor, + mpl::bool_<(function_allows_small_object_optimization::value)>()); + return true; + } else { + return false; + } + } + template + bool + assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) + { + if (!boost::detail::function::has_empty_target(boost::addressof(f))) { + assign_functor_a(f, functor, a, + mpl::bool_<(function_allows_small_object_optimization::value)>()); + return true; + } else { + return false; + } + } + template + bool + assign_to(const reference_wrapper& f, + function_buffer& functor, function_obj_ref_tag) + { + functor.obj_ref.obj_ptr = (void *)f.get_pointer(); + functor.obj_ref.is_const_qualified = is_const::value; + functor.obj_ref.is_volatile_qualified = is_volatile::value; + return true; + } + template + bool + assign_to_a(const reference_wrapper& f, + function_buffer& functor, Allocator, function_obj_ref_tag) + { + return assign_to(f,functor,function_obj_ref_tag()); + } + public: + vtable_base base; + invoker_type invoker; + }; + } + } + template< + typename R + + > + class function0 : public function_base + { + public: + typedef R result_type; + private: + typedef boost::detail::function::basic_vtable0< + R > + vtable_type; + vtable_type* get_vtable() const { + return reinterpret_cast( + reinterpret_cast(vtable) & ~(std::size_t)0x01); + } + struct clear_type {}; + public: + static const int args = 0; + template + struct sig + { + typedef result_type type; + }; + static const int arity = 0; + + typedef function0 self_type; + function0() : function_base() { } + template + function0(Functor f + ,typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + int>::type = 0 + ) : + function_base() + { + this->assign_to(f); + } + template + function0(Functor f, Allocator a + ,typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + int>::type = 0 + ) : + function_base() + { + this->assign_to_a(f,a); + } + function0(clear_type*) : function_base() { } + function0(const function0& f) : function_base() + { + this->assign_to_own(f); + } + ~function0() { clear(); } + result_type operator()() const; + template + typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + function0&>::type + operator=(Functor f) + { + this->clear(); + { try { + this->assign_to(f); + } catch(...) { + vtable = 0; + throw;; + } + } + return *this; + } + template + void assign(Functor f, Allocator a) + { + this->clear(); + { try{ + this->assign_to_a(f,a); + } catch(...) { + vtable = 0; + throw;; + } + } + } + function0& operator=(clear_type*) + { + this->clear(); + return *this; + } + function0& operator=(const function0& f) + { + if (&f == this) + return *this; + this->clear(); + { try { + this->assign_to_own(f); + } catch(...) { + vtable = 0; + throw;; + } + } + return *this; + } + void swap(function0& other) + { + if (&other == this) + return; + function0 tmp; + tmp.move_assign(*this); + this->move_assign(other); + other.move_assign(tmp); + } + void clear() + { + if (vtable) { + if (!this->has_trivial_copy_and_destroy()) + get_vtable()->clear(this->functor); + vtable = 0; + } + } + private: + struct dummy { + void nonnull() {}; + }; + typedef void (dummy::*safe_bool)(); + public: + operator safe_bool () const + { return (this->empty())? 0 : &dummy::nonnull; } + bool operator!() const + { return this->empty(); } + private: + void assign_to_own(const function0& f) + { + if (!f.empty()) { + this->vtable = f.vtable; + if (this->has_trivial_copy_and_destroy()) + this->functor = f.functor; + else + get_vtable()->base.manager(f.functor, this->functor, + boost::detail::function::clone_functor_tag); + } + } + template + void assign_to(Functor f) + { + using detail::function::vtable_base; + typedef typename detail::function::get_function_tag::type tag; + typedef detail::function::get_invoker0 get_invoker; + typedef typename get_invoker:: + template apply + handler_type; + typedef typename handler_type::invoker_type invoker_type; + typedef typename handler_type::manager_type manager_type; + static vtable_type stored_vtable = + { { &manager_type::manage }, &invoker_type::invoke }; + if (stored_vtable.assign_to(f, functor)) { + std::size_t value = reinterpret_cast(&stored_vtable.base); + if (boost::has_trivial_copy_constructor::value && + boost::has_trivial_destructor::value && + detail::function::function_allows_small_object_optimization::value) + value |= (std::size_t)0x01; + vtable = reinterpret_cast(value); + } else + vtable = 0; + } + template + void assign_to_a(Functor f,Allocator a) + { + using detail::function::vtable_base; + typedef typename detail::function::get_function_tag::type tag; + typedef detail::function::get_invoker0 get_invoker; + typedef typename get_invoker:: + template apply_a + handler_type; + typedef typename handler_type::invoker_type invoker_type; + typedef typename handler_type::manager_type manager_type; + static vtable_type stored_vtable = + { { &manager_type::manage }, &invoker_type::invoke }; + if (stored_vtable.assign_to_a(f, functor, a)) { + std::size_t value = reinterpret_cast(&stored_vtable.base); + if (boost::has_trivial_copy_constructor::value && + boost::has_trivial_destructor::value && + detail::function::function_allows_small_object_optimization::value) + value |= (std::size_t)0x01; + vtable = reinterpret_cast(value); + } else + vtable = 0; + } + void move_assign(function0& f) + { + if (&f == this) + return; + { try { + if (!f.empty()) { + this->vtable = f.vtable; + if (this->has_trivial_copy_and_destroy()) + this->functor = f.functor; + else + get_vtable()->base.manager(f.functor, this->functor, + boost::detail::function::move_functor_tag); + f.vtable = 0; + } else { + clear(); + } + } catch(...) { + vtable = 0; + throw;; + } + } + } + }; + template + inline void swap(function0< + R + + >& f1, + function0< + R + + >& f2) + { + f1.swap(f2); + } + template + typename function0< + R >::result_type + inline + function0 + ::operator()() const + { + if (this->empty()) + boost::throw_exception(bad_function_call()); + return get_vtable()->invoker + (this->functor ); + } +template + void operator==(const function0< + R + >&, + const function0< + R + >&); +template + void operator!=(const function0< + R + >&, + const function0< + R + >& ); +template +class function + : public function0 +{ + typedef function0 base_type; + typedef function self_type; + struct clear_type {}; +public: + function() : base_type() {} + template + function(Functor f + ,typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + int>::type = 0 + ) : + base_type(f) + { + } + template + function(Functor f, Allocator a + ,typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + int>::type = 0 + ) : + base_type(f,a) + { + } + function(clear_type*) : base_type() {} + function(const self_type& f) : base_type(static_cast(f)){} + function(const base_type& f) : base_type(static_cast(f)){} + self_type& operator=(const self_type& f) + { + self_type(f).swap(*this); + return *this; + } + template + typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + self_type&>::type + operator=(Functor f) + { + self_type(f).swap(*this); + return *this; + } + self_type& operator=(clear_type*) + { + this->clear(); + return *this; + } + self_type& operator=(const base_type& f) + { + self_type(f).swap(*this); + return *this; + } +}; +} +namespace boost { namespace python { +struct __attribute__ ((visibility("default"))) error_already_set +{ + virtual ~error_already_set(); +}; + bool handle_exception_impl(function0); +template +bool handle_exception(T f) +{ + return handle_exception_impl(function0(boost::ref(f))); +} +namespace detail { inline void rethrow() { throw; } } +inline void handle_exception() +{ + handle_exception(detail::rethrow); +} + void throw_error_already_set(); +template +inline T* expect_non_null(T* x) +{ + if (x == 0) + throw_error_already_set(); + return x; +} + PyObject* pytype_check(PyTypeObject* pytype, PyObject* source); +}} +namespace boost { +namespace detail { +template +struct has_trivial_assign_impl +{ + static const bool value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::is_pod::value, __has_trivial_assign(T) >::value, ::boost::type_traits::ice_not< ::boost::is_const::value >::value, ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value >::value) + ; +}; +} +template< typename T > struct has_trivial_assign : ::boost::integral_constant::value> { }; +} +namespace boost { +namespace detail { +template +struct has_trivial_ctor_impl +{ + static const bool value = (::boost::type_traits::ice_or< ::boost::is_pod::value, __has_trivial_constructor(T) >::value) + ; +}; +} +template< typename T > struct has_trivial_constructor : ::boost::integral_constant::value> { }; +template< typename T > struct has_trivial_default_constructor : ::boost::integral_constant::value> { }; +} +namespace boost { +namespace detail{ +template +struct has_nothrow_constructor_imp{ + static const bool value = (::boost::type_traits::ice_or< ::boost::has_trivial_constructor::value, __has_nothrow_constructor(T) >::value) + ; +}; +} +template< typename T > struct has_nothrow_constructor : ::boost::integral_constant::value> { }; +template< typename T > struct has_nothrow_default_constructor : ::boost::integral_constant::value> { }; +} +namespace boost { +namespace detail{ +template +struct has_nothrow_copy_imp{ + static const bool value = (::boost::type_traits::ice_or< ::boost::has_trivial_copy::value, (__has_nothrow_copy(T) && !is_volatile::value && !is_reference::value) >::value) + ; +}; +} +template< typename T > struct has_nothrow_copy : ::boost::integral_constant::value> { }; +template< typename T > struct has_nothrow_copy_constructor : ::boost::integral_constant::value> { }; +} +namespace boost { +namespace detail{ +template +struct has_nothrow_assign_imp{ + static const bool value = (::boost::type_traits::ice_or< ::boost::has_trivial_assign::value, (__has_nothrow_assign(T) && !is_volatile::value) >::value) + ; +}; +} +template< typename T > struct has_nothrow_assign : ::boost::integral_constant::value> { }; +} +namespace boost { +namespace detail { +template +struct is_base_and_derived_impl +{ + typedef typename remove_cv::type ncvB; + typedef typename remove_cv::type ncvD; + static const bool value = ((__is_base_of(B,D) && !is_same::value) && ! ::boost::is_same::value); +}; +} +template< typename Base, typename Derived > struct is_base_and_derived : ::boost::integral_constant::value)> { }; +template< typename Base, typename Derived > struct is_base_and_derived< Base&,Derived > : ::boost::integral_constant { }; +template< typename Base, typename Derived > struct is_base_and_derived< Base,Derived& > : ::boost::integral_constant { }; +template< typename Base, typename Derived > struct is_base_and_derived< Base&,Derived& > : ::boost::integral_constant { }; +} +namespace boost { +namespace detail { +template +struct is_class_impl +{ + static const bool value = __is_class(T); +}; +} +template< typename T > struct is_class : ::boost::integral_constant::value> { }; +} +namespace boost { +namespace detail { +template +struct is_fundamental_impl + : ::boost::type_traits::ice_or< + ::boost::is_arithmetic::value + , ::boost::is_void::value + > +{ +}; +} +template< typename T > struct is_fundamental : ::boost::integral_constant::value> { }; +} +namespace boost { +namespace detail { +template +struct is_compound_impl +{ + static const bool value = (::boost::type_traits::ice_not< ::boost::is_fundamental::value >::value) + ; +}; +} +template< typename T > struct is_compound : ::boost::integral_constant::value> { }; +} +namespace boost { +namespace detail { +template +struct add_reference_impl +{ + typedef T& type; +}; +template< typename T > struct add_reference_impl { typedef T& type; }; +template<> struct add_reference_impl { typedef void type; }; +template<> struct add_reference_impl { typedef void const type; }; +template<> struct add_reference_impl { typedef void volatile type; }; +template<> struct add_reference_impl { typedef void const volatile type; }; +} +template< typename T > struct add_reference { typedef typename boost::detail::add_reference_impl::type type; }; +} +namespace boost { +namespace detail{ +template +struct is_abstract_imp +{ + static const bool value = __is_abstract(T); +}; +} +template< typename T > struct is_abstract : ::boost::integral_constant::value> { }; +} +namespace boost { +namespace detail { +struct any_conversion +{ + template any_conversion(const volatile T&); + template any_conversion(T&); +}; +template struct checker +{ + static boost::type_traits::no_type _m_check(any_conversion ...); + static boost::type_traits::yes_type _m_check(T, int); +}; +template +struct is_convertible_basic_impl +{ + static From _m_from; + static bool const value = sizeof( detail::checker::_m_check(_m_from, 0) ) + == sizeof(::boost::type_traits::yes_type); +}; +template +struct is_convertible_impl +{ + typedef typename add_reference::type ref_type; + static const bool value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::detail::is_convertible_basic_impl::value, ::boost::is_void::value >::value, ::boost::type_traits::ice_not< ::boost::is_array::value >::value >::value) + ; +}; +template +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef is_convertible_impl type; + }; +}; +template <> +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef true_type type; + }; +}; +template <> +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef false_type type; + }; +}; +template <> +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef false_type type; + }; +}; +template +struct is_convertible_impl_dispatch_base +{ + typedef is_convertible_impl_select< + ::boost::is_arithmetic::value, + ::boost::is_arithmetic::value, + ::boost::is_abstract::value + > selector; + typedef typename selector::template rebind isc_binder; + typedef typename isc_binder::type type; +}; +template +struct is_convertible_impl_dispatch + : public is_convertible_impl_dispatch_base::type +{}; + template<> struct is_convertible_impl< void,void > { static const bool value = (true); }; template<> struct is_convertible_impl< void,void const > { static const bool value = (true); }; template<> struct is_convertible_impl< void,void volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void,void const volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void const,void > { static const bool value = (true); }; template<> struct is_convertible_impl< void const,void const > { static const bool value = (true); }; template<> struct is_convertible_impl< void const,void volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void const,void const volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void > { static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void const > { static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void const volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void > { static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void const > { static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void volatile > { static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void const volatile > { static const bool value = (true); }; +template< typename To > struct is_convertible_impl< void,To > { static const bool value = (false); }; +template< typename From > struct is_convertible_impl< From,void > { static const bool value = (true); }; +template< typename To > struct is_convertible_impl< void const,To > { static const bool value = (false); }; +template< typename To > struct is_convertible_impl< void volatile,To > { static const bool value = (false); }; +template< typename To > struct is_convertible_impl< void const volatile,To > { static const bool value = (false); }; +template< typename From > struct is_convertible_impl< From,void const > { static const bool value = (true); }; +template< typename From > struct is_convertible_impl< From,void volatile > { static const bool value = (true); }; +template< typename From > struct is_convertible_impl< From,void const volatile > { static const bool value = (true); }; +} +template< typename From, typename To > struct is_convertible : ::boost::integral_constant::value)> { }; +} +namespace boost { +namespace detail { +template +struct empty_helper_t1 : public T +{ + empty_helper_t1(); + int i[256]; +private: + empty_helper_t1(const empty_helper_t1&); + empty_helper_t1& operator=(const empty_helper_t1&); +}; +struct empty_helper_t2 { int i[256]; }; +template +struct empty_helper +{ + static const bool value = false; +}; +template +struct empty_helper +{ + static const bool value = (sizeof(empty_helper_t1) == sizeof(empty_helper_t2)) + ; +}; +template +struct is_empty_impl +{ + typedef typename remove_cv::type cvt; + static const bool value = ( ::boost::type_traits::ice_or< ::boost::detail::empty_helper::value>::value , __is_empty(cvt) >::value ) + ; +}; +template<> struct is_empty_impl< void > { static const bool value = (false); }; +template<> struct is_empty_impl< void const > { static const bool value = (false); }; +template<> struct is_empty_impl< void volatile > { static const bool value = (false); }; +template<> struct is_empty_impl< void const volatile > { static const bool value = (false); }; +} +template< typename T > struct is_empty : ::boost::integral_constant::value> { }; +} +namespace boost { +namespace type_traits { +struct false_result +{ + template struct result_ + { + static const bool value = false; + }; +}; +}} +namespace boost { +namespace type_traits { +template +struct is_function_ptr_helper +{ + static const bool value = false; +}; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +template +struct is_function_ptr_helper { static const bool value = true; }; +} +} +namespace boost { +namespace detail { +template +struct is_function_chooser + : ::boost::type_traits::false_result +{ +}; +template <> +struct is_function_chooser +{ + template< typename T > struct result_ + : ::boost::type_traits::is_function_ptr_helper + { + }; +}; +template +struct is_function_impl + : is_function_chooser< ::boost::is_reference::value > + ::template result_ +{ +}; +} +template< typename T > struct is_function : ::boost::integral_constant::value> { }; +} +namespace boost { +namespace detail { +template +struct is_object_impl +{ + static const bool value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_not< ::boost::is_reference::value>::value, ::boost::type_traits::ice_not< ::boost::is_void::value>::value, ::boost::type_traits::ice_not< ::boost::is_function::value>::value >::value) + ; +}; +} +template< typename T > struct is_object : ::boost::integral_constant::value> { }; +} +namespace boost { +namespace detail { +template +struct is_stateless_impl +{ + static const bool value = (::boost::type_traits::ice_and< ::boost::has_trivial_constructor::value, ::boost::has_trivial_copy::value, ::boost::has_trivial_destructor::value, ::boost::is_class::value, ::boost::is_empty::value >::value) + ; +}; +} +template< typename T > struct is_stateless : ::boost::integral_constant::value> { }; +} +namespace boost { namespace python { +enum tag_t { tag }; +}} +namespace boost { namespace python { namespace detail { +template class borrowed +{ + typedef T type; +}; +template +struct is_borrowed_ptr +{ + static const bool value = false; +}; +template +struct is_borrowed_ptr*> +{ + static const bool value = true; +}; +template +struct is_borrowed_ptr const*> +{ + static const bool value = true; +}; +template +struct is_borrowed_ptr volatile*> +{ + static const bool value = true; +}; +template +struct is_borrowed_ptr const volatile*> +{ + static const bool value = true; +}; +} +template +inline T* get_managed_object(detail::borrowed const volatile* p, tag_t) +{ + return (T*)p; +} +}} +namespace boost { namespace python { +template +inline python::detail::borrowed* borrowed(T* p) +{ + return (detail::borrowed*)p; +} +}} +namespace boost { namespace python { +template class handle; +}} +namespace boost { namespace python { +template +inline T* incref(T* p) +{ + ( ((PyObject*)(python::upcast(p)))->ob_refcnt++); + return p; +} +template +inline T* xincref(T* p) +{ + if ((python::upcast(p)) == __null) ; else ( ((PyObject*)(python::upcast(p)))->ob_refcnt++); + return p; +} +template +inline void decref(T* p) +{ + if ( --((PyObject*)(python::upcast(p)))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(python::upcast(p))))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(python::upcast(p))))); +} +template +inline void xdecref(T* p) +{ + if ((python::upcast(p)) == __null) ; else if ( --((PyObject*)(python::upcast(p)))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(python::upcast(p))))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(python::upcast(p))))); +} +}} +namespace boost { namespace python { namespace detail { +struct new_reference_t; +typedef new_reference_t* new_reference; +struct borrowed_reference_t; +typedef borrowed_reference_t* borrowed_reference; +struct new_non_null_reference_t; +typedef new_non_null_reference_t* new_non_null_reference; +}}} +namespace boost { namespace python { +template struct null_ok; +template +inline null_ok* allow_null(T* p) +{ + return (null_ok*)p; +} +namespace detail +{ + template + inline T* manage_ptr(detail::borrowed >* p, int) + { + return python::xincref((T*)p); + } + template + inline T* manage_ptr(null_ok >* p, int) + { + return python::xincref((T*)p); + } + template + inline T* manage_ptr(detail::borrowed* p, long) + { + return python::incref(expect_non_null((T*)p)); + } + template + inline T* manage_ptr(null_ok* p, long) + { + return (T*)p; + } + template + inline T* manage_ptr(T* p, ...) + { + return expect_non_null(p); + } +} +template +class handle +{ + typedef T* (handle::* bool_type )() const; + public: + typedef T element_type; + public: + handle(); + ~handle(); + template + explicit handle(Y* p) + : m_p( + python::upcast( + detail::manage_ptr(p, 0) + ) + ) + { + } + handle& operator=(handle const& r) + { + python::xdecref(m_p); + m_p = python::xincref(r.m_p); + return *this; + } + template + handle& operator=(handle const & r) + { + python::xdecref(m_p); + m_p = python::xincref(python::upcast(r.get())); + return *this; + } + template + handle(handle const& r) + : m_p(python::xincref(python::upcast(r.get()))) + { + } + handle(handle const& r) + : m_p(python::xincref(r.m_p)) + { + } + T* operator-> () const; + T& operator* () const; + T* get() const; + T* release(); + void reset(); + operator bool_type() const + { + return m_p ? &handle::get : 0; + } + bool operator! () const; + public: + inline handle(detail::borrowed_reference x) + : m_p( + python::incref( + downcast((PyObject*)x) + )) + { + } + private: + T* m_p; +}; +template inline T * get_pointer(python::handle const & p) +{ + return p.get(); +} +using boost::get_pointer; +typedef handle type_handle; +template +class is_handle +{ + public: + static const bool value = false; +}; +template +class is_handle > +{ + public: + static const bool value = true; +}; +template +inline handle::handle() + : m_p(0) +{ +} +template +inline handle::~handle() +{ + python::xdecref(m_p); +} +template +inline T* handle::operator->() const +{ + return m_p; +} +template +inline T& handle::operator*() const +{ + return *m_p; +} +template +inline T* handle::get() const +{ + return m_p; +} +template +inline bool handle::operator!() const +{ + return m_p == 0; +} +template +inline T* handle::release() +{ + T* result = m_p; + m_p = 0; + return result; +} +template +inline void handle::reset() +{ + python::xdecref(m_p); + m_p = 0; +} +template +inline PyObject* get_managed_object(handle const& h, tag_t) +{ + return h.get() ? python::upcast(h.get()) : (&_Py_NoneStruct); +} +}} + +namespace boost { namespace python { +namespace detail +{ + struct keyword + { + keyword(char const* name_=0) + : name(name_) + {} + char const* name; + handle<> default_value; + }; + template struct keywords; + typedef std::pair keyword_range; + template <> + struct keywords<0> + { + static const std::size_t size = 0; + static keyword_range range() { return keyword_range(); } + }; + namespace error + { + template + struct more_keywords_than_function_arguments + { + typedef char too_many_keywords[keywords > function_args ? -1 : 1]; + }; + } +} +}} +namespace boost { namespace mpl { +template< typename Tag > struct at_impl; +template< typename Sequence, typename N > struct at; +}} +namespace boost { namespace mpl { namespace aux { +struct v_iter_tag; +struct vector_tag; +}}} +namespace mpl_ { +template< long N > struct long_; +} +namespace boost { namespace mpl { using ::mpl_::long_; } } +namespace mpl_ { +template< long N > +struct long_ +{ + static const long value = N; + typedef long_ type; + typedef long value_type; + typedef integral_c_tag tag; + typedef mpl_::long_< static_cast((value + 1)) > next; + typedef mpl_::long_< static_cast((value - 1)) > prior; + operator long() const { return static_cast(this->value); } +}; +template< long N > +long const mpl_::long_< N >::value; +} +namespace mpl_ { +struct void_ { typedef void_ type; }; +} +namespace boost { namespace mpl { +template< typename T > +struct is_void_ + : false_ +{ +}; +template<> +struct is_void_ + : true_ +{ +}; +template< typename T > +struct is_not_void_ + : true_ +{ +}; +template<> +struct is_not_void_ + : false_ +{ +}; +template<> struct is_void_< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : is_void_< T1 > { }; }; template< typename Tag > struct lambda< is_void_< na > , Tag , int_<-1> > { typedef false_ is_le; typedef is_void_< na > result_; typedef is_void_< na > type; }; namespace aux { template< typename T1 > struct template_arity< is_void_< T1 > > : int_<1> { }; template<> struct template_arity< is_void_< na > > : int_<-1> { }; } +template<> struct is_not_void_< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : is_not_void_< T1 > { }; }; template< typename Tag > struct lambda< is_not_void_< na > , Tag , int_<-1> > { typedef false_ is_le; typedef is_not_void_< na > result_; typedef is_not_void_< na > type; }; namespace aux { template< typename T1 > struct template_arity< is_not_void_< T1 > > : int_<1> { }; template<> struct template_arity< is_not_void_< na > > : int_<-1> { }; } +}} +namespace boost { namespace mpl { namespace aux { +template< typename T > struct type_wrapper +{ + typedef T type; +}; +template< typename T > struct wrapped_type; +template< typename T > struct wrapped_type< type_wrapper > +{ + typedef T type; +}; +}}} +namespace boost { namespace mpl { +template< typename Vector, long n_ > +struct v_at_impl +{ + typedef long_< (Vector::lower_bound_::value + n_) > index_; + typedef __typeof__( Vector::item_(index_()) ) type; +}; +template< typename Vector, long n_ > +struct v_at + : aux::wrapped_type< typename v_at_impl::type > +{ +}; +template<> +struct at_impl< aux::vector_tag > +{ + template< typename Vector, typename N > struct apply + : v_at< + Vector + , N::value + > + { + }; +}; +}} +namespace boost { namespace mpl { +template< typename Tag > struct front_impl; +template< typename Sequence > struct front; +}} +namespace boost { namespace mpl { +template<> +struct front_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + : v_at + { + }; +}; +}} +namespace boost { namespace mpl { +template< typename Tag > struct push_front_impl; +template< typename Sequence, typename T > struct push_front; +}} +namespace boost { namespace mpl { +template< + typename T = na + > +struct next +{ + typedef typename T::next type; + +}; +template< + typename T = na + > +struct prior +{ + typedef typename T::prior type; + +}; +template<> struct next< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : next< T1 > { }; }; template< typename Tag > struct lambda< next< na > , Tag , int_<-1> > { typedef false_ is_le; typedef next< na > result_; typedef next< na > type; }; namespace aux { template< typename T1 > struct template_arity< next< T1 > > : int_<1> { }; template<> struct template_arity< next< na > > : int_<-1> { }; } +template<> struct prior< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : prior< T1 > { }; }; template< typename Tag > struct lambda< prior< na > , Tag , int_<-1> > { typedef false_ is_le; typedef prior< na > result_; typedef prior< na > type; }; namespace aux { template< typename T1 > struct template_arity< prior< T1 > > : int_<1> { }; template<> struct template_arity< prior< na > > : int_<-1> { }; } +}} +namespace boost { namespace mpl { +template< + typename T + , typename Base + , int at_front = 0 + > +struct v_item + : Base +{ + typedef typename Base::upper_bound_ index_; + typedef typename next::type upper_bound_; + typedef typename next::type size; + typedef Base base; + typedef v_item type; + static aux::type_wrapper item_(index_); + using Base::item_; +}; +template< + typename T + , typename Base + > +struct v_item + : Base +{ + typedef typename prior::type index_; + typedef index_ lower_bound_; + typedef typename next::type size; + typedef Base base; + typedef v_item type; + static aux::type_wrapper item_(index_); + using Base::item_; +}; +template< + typename Base + , int at_front + > +struct v_mask + : Base +{ + typedef typename prior::type index_; + typedef index_ upper_bound_; + typedef typename prior::type size; + typedef Base base; + typedef v_mask type; + static aux::type_wrapper item_(index_); + using Base::item_; +}; +template< + typename Base + > +struct v_mask + : Base +{ + typedef typename Base::lower_bound_ index_; + typedef typename next::type lower_bound_; + typedef typename prior::type size; + typedef Base base; + typedef v_mask type; + static aux::type_wrapper item_(index_); + using Base::item_; +}; +}} +namespace boost { namespace mpl { +template<> +struct push_front_impl< aux::vector_tag > +{ + template< typename Vector, typename T > struct apply + { + typedef v_item type; + }; +}; +}} +namespace boost { namespace mpl { +template< typename Tag > struct pop_front_impl; +template< typename Sequence > struct pop_front; +}} +namespace boost { namespace mpl { +template<> +struct pop_front_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef v_mask type; + }; +}; +}} +namespace boost { namespace mpl { +template< typename Tag > struct push_back_impl; +template< typename Sequence, typename T > struct push_back; +}} +namespace boost { namespace mpl { +template<> +struct push_back_impl< aux::vector_tag > +{ + template< typename Vector, typename T > struct apply + { + typedef v_item type; + }; +}; +}} +namespace boost { namespace mpl { +template< typename Tag > struct pop_back_impl; +template< typename Sequence > struct pop_back; +}} +namespace boost { namespace mpl { +template<> +struct pop_back_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef v_mask type; + }; +}; +}} +namespace boost { namespace mpl { +template< typename Tag > struct back_impl; +template< typename Sequence > struct back; +}} +namespace boost { namespace mpl { +template<> +struct back_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + : v_at< + Vector + , prior::type::value + > + { + }; +}; +}} +namespace boost { namespace mpl { +template< typename Tag > struct clear_impl; +template< typename Sequence > struct clear; +}} +namespace boost { namespace mpl { +struct forward_iterator_tag : int_<0> { typedef forward_iterator_tag type; }; +struct bidirectional_iterator_tag : int_<1> { typedef bidirectional_iterator_tag type; }; +struct random_access_iterator_tag : int_<2> { typedef random_access_iterator_tag type; }; +}} +namespace boost { namespace mpl { namespace aux { +template< typename T > struct integral_rank; +template<> struct integral_rank : int_<1> {}; +template<> struct integral_rank : int_<2> {}; +template<> struct integral_rank : int_<3> {}; +template<> struct integral_rank : int_<4> {}; +template<> struct integral_rank : int_<5> {}; +template<> struct integral_rank : int_<6> {}; +template<> struct integral_rank : int_<7> {}; +template<> struct integral_rank : int_<8> {}; +template<> struct integral_rank : int_<9> {}; +template<> struct integral_rank : int_<10> {}; +template<> struct integral_rank : int_<11> {}; +template<> struct integral_rank : int_<12> {}; +template<> struct integral_rank: int_<13> {}; +template< typename T1, typename T2 > struct largest_int + : if_c< + ( integral_rank::value >= integral_rank::value ) + , T1 + , T2 + > +{ +}; +}}} +namespace boost { namespace mpl { +template< typename SourceTag, typename TargetTag > struct numeric_cast +{ + template< typename N > struct apply; +}; +}} +namespace boost { namespace mpl { namespace aux { +typedef char (&no_tag)[1]; +typedef char (&yes_tag)[2]; +template< bool C_ > struct yes_no_tag +{ + typedef no_tag type; +}; +template<> struct yes_no_tag +{ + typedef yes_tag type; +}; +template< long n > struct weighted_tag +{ + typedef char (&type)[n]; +}; +}}} +namespace boost { namespace mpl { namespace aux { +template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_apply { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; +}}} +namespace boost { namespace mpl { +template< + typename F + , typename has_apply_ = typename aux::has_apply::type + > +struct apply_wrap0 + : F::template apply< > +{ +}; +template< typename F > +struct apply_wrap0< F,true_ > + : F::apply +{ +}; +template< + typename F, typename T1 + > +struct apply_wrap1 + : F::template apply +{ +}; +template< + typename F, typename T1, typename T2 + > +struct apply_wrap2 + : F::template apply< T1,T2 > +{ +}; +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply_wrap3 + : F::template apply< T1,T2,T3 > +{ +}; +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply_wrap4 + : F::template apply< T1,T2,T3,T4 > +{ +}; +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply_wrap5 + : F::template apply< T1,T2,T3,T4,T5 > +{ +}; +}} +namespace boost { namespace mpl { +template< + typename C = na + , typename F1 = na + , typename F2 = na + > +struct eval_if +{ + typedef typename if_::type f_; + typedef typename f_::type type; + +}; +template< + bool C + , typename F1 + , typename F2 + > +struct eval_if_c +{ + typedef typename if_c::type f_; + typedef typename f_::type type; +}; +template<> struct eval_if< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : eval_if< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< eval_if< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef eval_if< na , na , na > result_; typedef eval_if< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< eval_if< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< eval_if< na , na , na > > : int_<-1> { }; } +}} +namespace boost { namespace mpl { namespace aux { +template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_tag { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; +}}} +namespace boost { namespace mpl { +namespace aux { +template< typename T > struct tag_impl +{ + typedef typename T::tag type; +}; +} +template< typename T, typename Default = void_ > struct tag + : if_< + aux::has_tag + , aux::tag_impl + , Default + >::type +{ +}; +}} +namespace boost { namespace mpl { namespace aux { +template< + typename F + , typename Tag1 + , typename Tag2 + > +struct cast1st_impl +{ + template< typename N1, typename N2 > struct apply + : apply_wrap2< + F + , typename apply_wrap1< numeric_cast,N1 >::type + , N2 + > + { + }; +}; +template< + typename F + , typename Tag1 + , typename Tag2 + > +struct cast2nd_impl +{ + template< typename N1, typename N2 > struct apply + : apply_wrap2< + F + , N1 + , typename apply_wrap1< numeric_cast,N2 >::type + > + { + }; +}; +}}} +namespace boost { namespace mpl { namespace aux { +}}} +namespace boost { namespace mpl { namespace aux { +template< typename T > struct msvc_eti_base + : T +{ + msvc_eti_base(); + typedef T type; +}; +template<> struct msvc_eti_base +{ + typedef msvc_eti_base type; + typedef msvc_eti_base first; + typedef msvc_eti_base second; + typedef msvc_eti_base tag; + enum { value = 0 }; +}; +}}} +namespace boost { namespace mpl { +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( Tag1::value + > Tag2::value + ) + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; +template< + typename N1 = na + , typename N2 = na + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ + +}; +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + +}; +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + : plus< plus< N1,N2 >, N3> +{ + +}; +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag::type + , typename plus_tag::type + >::template apply< N1,N2 >::type +{ + +}; +template<> struct plus< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : plus< T1 , T2 > { }; }; template< typename Tag > struct lambda< plus< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef plus< na , na > result_; typedef plus< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< plus< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< plus< na , na > > : int_<-1> { }; } +}} +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( N1::value + + N2::value + ) + > + { + }; +}; +}} +namespace boost { namespace mpl { +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( Tag1::value + > Tag2::value + ) + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; +template< + typename N1 = na + , typename N2 = na + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ + +}; +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + +}; +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + : minus< minus< N1,N2 >, N3> +{ + +}; +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag::type + , typename minus_tag::type + >::template apply< N1,N2 >::type +{ + +}; +template<> struct minus< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : minus< T1 , T2 > { }; }; template< typename Tag > struct lambda< minus< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef minus< na , na > result_; typedef minus< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< minus< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< minus< na , na > > : int_<-1> { }; } +}} +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( N1::value + - N2::value + ) + > + { + }; +}; +}} +namespace boost { namespace mpl { +template< typename Tag > struct advance_impl; +template< typename Iterator, typename N > struct advance; +}} +namespace boost { namespace mpl { +template< typename Tag > struct distance_impl; +template< typename First, typename Last > struct distance; +}} +namespace boost { namespace mpl { +template< + typename Vector + , long n_ + > +struct v_iter +{ + typedef aux::v_iter_tag tag; + typedef random_access_iterator_tag category; + typedef typename v_at::type type; + typedef Vector vector_; + typedef mpl::long_ pos; +}; +template< + typename Vector + , long n_ + > +struct next< v_iter > +{ + typedef v_iter type; +}; +template< + typename Vector + , long n_ + > +struct prior< v_iter > +{ + typedef v_iter type; +}; +template< + typename Vector + , long n_ + , typename Distance + > +struct advance< v_iter,Distance> +{ + typedef v_iter< + Vector + , (n_ + Distance::value) + > type; +}; +template< + typename Vector + , long n_ + , long m_ + > +struct distance< v_iter, v_iter > + : mpl::long_<(m_ - n_)> +{ +}; +}} +namespace boost { namespace mpl { +template< typename Dummy = na > struct vector0; +template<> struct vector0 +{ + typedef aux::vector_tag tag; + typedef vector0 type; + typedef long_<32768> lower_bound_; + typedef lower_bound_ upper_bound_; + typedef long_<0> size; + static aux::type_wrapper item_(...); +}; +}} +namespace boost { namespace mpl { +template<> +struct clear_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; +}} +namespace boost { namespace mpl { +template< typename Tag > struct O1_size_impl; +template< typename Sequence > struct O1_size; +}} +namespace boost { namespace mpl { +template<> +struct O1_size_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + : Vector::size + { + }; +}; +}} +namespace boost { namespace mpl { +template< typename Tag > struct size_impl; +template< typename Sequence > struct size; +}} +namespace boost { namespace mpl { +template<> +struct size_impl< aux::vector_tag > + : O1_size_impl< aux::vector_tag > +{ +}; +}} +namespace boost { namespace mpl { +template< typename Tag > struct empty_impl; +template< typename Sequence > struct empty; +}} +namespace boost { namespace mpl { +template<> +struct empty_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + : is_same< + typename Vector::lower_bound_ + , typename Vector::upper_bound_ + > + { + }; +}; +}} +namespace boost { namespace mpl { +template< typename Tag > struct begin_impl; +template< typename Tag > struct end_impl; +template< typename Sequence > struct begin; +template< typename Sequence > struct end; +}} +namespace boost { namespace mpl { +template<> +struct begin_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef v_iter type; + }; +}; +template<> +struct end_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef v_iter type; + }; +}; +}} +namespace boost { namespace mpl { +template< + typename T0 + > +struct vector1 + : v_item< + T0 + , vector0< > + > +{ + typedef vector1 type; +}; +template< + typename T0, typename T1 + > +struct vector2 + : v_item< + T1 + , vector1 + > +{ + typedef vector2 type; +}; +template< + typename T0, typename T1, typename T2 + > +struct vector3 + : v_item< + T2 + , vector2< T0,T1 > + > +{ + typedef vector3 type; +}; +template< + typename T0, typename T1, typename T2, typename T3 + > +struct vector4 + : v_item< + T3 + , vector3< T0,T1,T2 > + > +{ + typedef vector4 type; +}; +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct vector5 + : v_item< + T4 + , vector4< T0,T1,T2,T3 > + > +{ + typedef vector5 type; +}; +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct vector6 + : v_item< + T5 + , vector5< T0,T1,T2,T3,T4 > + > +{ + typedef vector6 type; +}; +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct vector7 + : v_item< + T6 + , vector6< T0,T1,T2,T3,T4,T5 > + > +{ + typedef vector7 type; +}; +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct vector8 + : v_item< + T7 + , vector7< T0,T1,T2,T3,T4,T5,T6 > + > +{ + typedef vector8 type; +}; +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct vector9 + : v_item< + T8 + , vector8< T0,T1,T2,T3,T4,T5,T6,T7 > + > +{ + typedef vector9 type; +}; +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct vector10 + : v_item< + T9 + , vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > + > +{ + typedef vector10 type; +}; +}} +namespace boost { namespace mpl { +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector11 + : v_item< + T10 + , vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > + > +{ + typedef vector11 type; +}; +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector12 + : v_item< + T11 + , vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > + > +{ + typedef vector12 type; +}; +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector13 + : v_item< + T12 + , vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > + > +{ + typedef vector13 type; +}; +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector14 + : v_item< + T13 + , vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > + > +{ + typedef vector14 type; +}; +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector15 + : v_item< + T14 + , vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > + > +{ + typedef vector15 type; +}; +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector16 + : v_item< + T15 + , vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 > + > +{ + typedef vector16 type; +}; +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector17 + : v_item< + T16 + , vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 > + > +{ + typedef vector17 type; +}; +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector18 + : v_item< + T17 + , vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 > + > +{ + typedef vector18 type; +}; +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector19 + : v_item< + T18 + , vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 > + > +{ + typedef vector19 type; +}; +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector20 + : v_item< + T19 + , vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 > + > +{ + typedef vector20 type; +}; +}} +namespace boost { namespace python { namespace detail { +template < class T0 = mpl::void_ , class T1 = mpl::void_ , class T2 = mpl::void_ , class T3 = mpl::void_ , class T4 = mpl::void_ , class T5 = mpl::void_ , class T6 = mpl::void_ , class T7 = mpl::void_ , class T8 = mpl::void_ , class T9 = mpl::void_ , class T10 = mpl::void_ , class T11 = mpl::void_ , class T12 = mpl::void_ , class T13 = mpl::void_ , class T14 = mpl::void_ , class T15 = mpl::void_ , class T16 = mpl::void_ > +struct type_list + : mpl::vector17< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16> +{ +}; +template < + + > +struct type_list< + + + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector0<> +{ +}; +template < + class T0 + > +struct type_list< + T0 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector1< T0> +{ +}; +template < + class T0 , class T1 + > +struct type_list< + T0 , T1 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector2< T0 , T1> +{ +}; +template < + class T0 , class T1 , class T2 + > +struct type_list< + T0 , T1 , T2 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector3< T0 , T1 , T2> +{ +}; +template < + class T0 , class T1 , class T2 , class T3 + > +struct type_list< + T0 , T1 , T2 , T3 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector4< T0 , T1 , T2 , T3> +{ +}; +template < + class T0 , class T1 , class T2 , class T3 , class T4 + > +struct type_list< + T0 , T1 , T2 , T3 , T4 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector5< T0 , T1 , T2 , T3 , T4> +{ +}; +template < + class T0 , class T1 , class T2 , class T3 , class T4 , class T5 + > +struct type_list< + T0 , T1 , T2 , T3 , T4 , T5 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector6< T0 , T1 , T2 , T3 , T4 , T5> +{ +}; +template < + class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 + > +struct type_list< + T0 , T1 , T2 , T3 , T4 , T5 , T6 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector7< T0 , T1 , T2 , T3 , T4 , T5 , T6> +{ +}; +template < + class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 + > +struct type_list< + T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector8< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7> +{ +}; +template < + class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 + > +struct type_list< + T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector9< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8> +{ +}; +template < + class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 + > +struct type_list< + T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector10< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> +{ +}; +template < + class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 + > +struct type_list< + T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector11< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10> +{ +}; +template < + class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 + > +struct type_list< + T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector12< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11> +{ +}; +template < + class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 + > +struct type_list< + T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 + , + + mpl::void_ , mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector13< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12> +{ +}; +template < + class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 + > +struct type_list< + T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 + , + + mpl::void_ , mpl::void_ , mpl::void_ + > + : mpl::vector14< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13> +{ +}; +template < + class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 + > +struct type_list< + T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 + , + + mpl::void_ , mpl::void_ + > + : mpl::vector15< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14> +{ +}; +template < + class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 , class T15 + > +struct type_list< + T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 + , + + mpl::void_ + > + : mpl::vector16< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15> +{ +}; +}}} +namespace boost { +template< typename T > struct remove_reference { typedef T type; }; +template< typename T > struct remove_reference { typedef T type; }; +} +namespace boost { namespace python { +template class pointer_wrapper +{ + public: + typedef Ptr type; + explicit pointer_wrapper(Ptr x): p_(x) {} + operator Ptr() const { return p_; } + Ptr get() const { return p_; } + private: + Ptr p_; +}; +template +inline pointer_wrapper ptr(T t) +{ + return pointer_wrapper(t); +} +template +class is_pointer_wrapper + : public mpl::false_ +{ +}; +template +class is_pointer_wrapper > + : public mpl::true_ +{ +}; +template +class unwrap_pointer +{ + public: + typedef T type; +}; +template +class unwrap_pointer > +{ + public: + typedef T type; +}; +}} +namespace boost +{ +template < typename MemberType, int UniqueID = 0 > +class base_from_member +{ +protected: + MemberType member; + base_from_member() + : member() + {} + + template < typename T0 > explicit base_from_member( T0 x0 ) : member( x0 ) {} template < typename T0 , typename T1 > explicit base_from_member( T0 x0 , T1 x1 ) : member( x0 , x1 ) {} template < typename T0 , typename T1 , typename T2 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 ) : member( x0 , x1 , x2 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 ) : member( x0 , x1 , x2 , x3 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 ) : member( x0 , x1 , x2 , x3 , x4 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 ) : member( x0 , x1 , x2 , x3 , x4 , x5 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 , T6 x6 ) : member( x0 , x1 , x2 , x3 , x4 , x5 , x6 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 , T6 x6 , T7 x7 ) : member( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 , T6 x6 , T7 x7 , T8 x8 ) : member( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 , T6 x6 , T7 x7 , T8 x8 , T9 x9 ) : member( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 ) {} +}; +} +namespace boost +{ +template inline void checked_delete(T * x) +{ + typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; + (void) sizeof(type_must_be_complete); + delete x; +} +template inline void checked_array_delete(T * x) +{ + typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; + (void) sizeof(type_must_be_complete); + delete [] x; +} +template struct checked_deleter +{ + typedef void result_type; + typedef T * argument_type; + void operator()(T * x) const + { + boost::checked_delete(x); + } +}; +template struct checked_array_deleter +{ + typedef void result_type; + typedef T * argument_type; + void operator()(T * x) const + { + boost::checked_array_delete(x); + } +}; +} +namespace boost { +template +inline T next(T x) { return ++x; } +template +inline T next(T x, Distance n) +{ + std::advance(x, n); + return x; +} +template +inline T prior(T x) { return --x; } +template +inline T prior(T x, Distance n) +{ + std::advance(x, -n); + return x; +} +} +namespace boost { +namespace noncopyable_ +{ + class noncopyable + { + protected: + noncopyable() {} + ~noncopyable() {} + private: + noncopyable( const noncopyable& ); + const noncopyable& operator=( const noncopyable& ); + }; +} +typedef noncopyable_::noncopyable noncopyable; +} + +namespace boost +{ + namespace detail { + template + struct iterator_base : std::iterator {}; + } + template + struct iterator : boost::detail::iterator_base {}; +} +namespace boost { +namespace detail { +template class empty_base { +}; +} +} +namespace boost +{ +template > +struct less_than_comparable2 : B +{ + friend bool operator<=(const T& x, const U& y) { return !static_cast(x > y); } + friend bool operator>=(const T& x, const U& y) { return !static_cast(x < y); } + friend bool operator>(const U& x, const T& y) { return y < x; } + friend bool operator<(const U& x, const T& y) { return y > x; } + friend bool operator<=(const U& x, const T& y) { return !static_cast(y < x); } + friend bool operator>=(const U& x, const T& y) { return !static_cast(y > x); } +}; +template > +struct less_than_comparable1 : B +{ + friend bool operator>(const T& x, const T& y) { return y < x; } + friend bool operator<=(const T& x, const T& y) { return !static_cast(y < x); } + friend bool operator>=(const T& x, const T& y) { return !static_cast(x < y); } +}; +template > +struct equality_comparable2 : B +{ + friend bool operator==(const U& y, const T& x) { return x == y; } + friend bool operator!=(const U& y, const T& x) { return !static_cast(x == y); } + friend bool operator!=(const T& y, const U& x) { return !static_cast(y == x); } +}; +template > +struct equality_comparable1 : B +{ + friend bool operator!=(const T& x, const T& y) { return !static_cast(x == y); } +}; +template > struct multipliable2 : B { friend T operator *( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv *= rhs; return nrv; } friend T operator *( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv *= lhs; return nrv; } }; template > struct multipliable1 : B { friend T operator *( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv *= rhs; return nrv; } }; +template > struct addable2 : B { friend T operator +( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv += rhs; return nrv; } friend T operator +( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv += lhs; return nrv; } }; template > struct addable1 : B { friend T operator +( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv += rhs; return nrv; } }; +template > struct subtractable2 : B { friend T operator -( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv -= rhs; return nrv; } }; template > struct subtractable2_left : B { friend T operator -( const U& lhs, const T& rhs ) { T nrv( lhs ); nrv -= rhs; return nrv; } }; template > struct subtractable1 : B { friend T operator -( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv -= rhs; return nrv; } }; +template > struct dividable2 : B { friend T operator /( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv /= rhs; return nrv; } }; template > struct dividable2_left : B { friend T operator /( const U& lhs, const T& rhs ) { T nrv( lhs ); nrv /= rhs; return nrv; } }; template > struct dividable1 : B { friend T operator /( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv /= rhs; return nrv; } }; +template > struct modable2 : B { friend T operator %( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv %= rhs; return nrv; } }; template > struct modable2_left : B { friend T operator %( const U& lhs, const T& rhs ) { T nrv( lhs ); nrv %= rhs; return nrv; } }; template > struct modable1 : B { friend T operator %( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv %= rhs; return nrv; } }; +template > struct xorable2 : B { friend T operator ^( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv ^= rhs; return nrv; } friend T operator ^( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv ^= lhs; return nrv; } }; template > struct xorable1 : B { friend T operator ^( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv ^= rhs; return nrv; } }; +template > struct andable2 : B { friend T operator &( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv &= rhs; return nrv; } friend T operator &( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv &= lhs; return nrv; } }; template > struct andable1 : B { friend T operator &( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv &= rhs; return nrv; } }; +template > struct orable2 : B { friend T operator |( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv |= rhs; return nrv; } friend T operator |( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv |= lhs; return nrv; } }; template > struct orable1 : B { friend T operator |( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv |= rhs; return nrv; } }; +template > +struct incrementable : B +{ + friend T operator++(T& x, int) + { + incrementable_type nrv(x); + ++x; + return nrv; + } +private: + typedef T incrementable_type; +}; +template > +struct decrementable : B +{ + friend T operator--(T& x, int) + { + decrementable_type nrv(x); + --x; + return nrv; + } +private: + typedef T decrementable_type; +}; +template > +struct dereferenceable : B +{ + P operator->() const + { + return &*static_cast(*this); + } +}; +template > +struct indexable : B +{ + R operator[](I n) const + { + return *(static_cast(*this) + n); + } +}; +template > struct left_shiftable2 : B { friend T operator <<( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv <<= rhs; return nrv; } }; template > struct left_shiftable1 : B { friend T operator <<( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv <<= rhs; return nrv; } }; +template > struct right_shiftable2 : B { friend T operator >>( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv >>= rhs; return nrv; } }; template > struct right_shiftable1 : B { friend T operator >>( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv >>= rhs; return nrv; } }; +template > +struct equivalent2 : B +{ + friend bool operator==(const T& x, const U& y) + { + return !static_cast(x < y) && !static_cast(x > y); + } +}; +template > +struct equivalent1 : B +{ + friend bool operator==(const T&x, const T&y) + { + return !static_cast(x < y) && !static_cast(y < x); + } +}; +template > +struct partially_ordered2 : B +{ + friend bool operator<=(const T& x, const U& y) + { return static_cast(x < y) || static_cast(x == y); } + friend bool operator>=(const T& x, const U& y) + { return static_cast(x > y) || static_cast(x == y); } + friend bool operator>(const U& x, const T& y) + { return y < x; } + friend bool operator<(const U& x, const T& y) + { return y > x; } + friend bool operator<=(const U& x, const T& y) + { return static_cast(y > x) || static_cast(y == x); } + friend bool operator>=(const U& x, const T& y) + { return static_cast(y < x) || static_cast(y == x); } +}; +template > +struct partially_ordered1 : B +{ + friend bool operator>(const T& x, const T& y) + { return y < x; } + friend bool operator<=(const T& x, const T& y) + { return static_cast(x < y) || static_cast(x == y); } + friend bool operator>=(const T& x, const T& y) + { return static_cast(y < x) || static_cast(x == y); } +}; +template > +struct totally_ordered2 + : less_than_comparable2 > {}; +template > +struct totally_ordered1 + : less_than_comparable1 > {}; +template > +struct additive2 + : addable2 > {}; +template > +struct additive1 + : addable1 > {}; +template > +struct multiplicative2 + : multipliable2 > {}; +template > +struct multiplicative1 + : multipliable1 > {}; +template > +struct integer_multiplicative2 + : multiplicative2 > {}; +template > +struct integer_multiplicative1 + : multiplicative1 > {}; +template > +struct arithmetic2 + : additive2 > {}; +template > +struct arithmetic1 + : additive1 > {}; +template > +struct integer_arithmetic2 + : additive2 > {}; +template > +struct integer_arithmetic1 + : additive1 > {}; +template > +struct bitwise2 + : xorable2 > > {}; +template > +struct bitwise1 + : xorable1 > > {}; +template > +struct unit_steppable + : incrementable > {}; +template > +struct shiftable2 + : left_shiftable2 > {}; +template > +struct shiftable1 + : left_shiftable1 > {}; +template > +struct ring_operators2 + : additive2 > > {}; +template > +struct ring_operators1 + : additive1 > {}; +template > +struct ordered_ring_operators2 + : ring_operators2 > {}; +template > +struct ordered_ring_operators1 + : ring_operators1 > {}; +template > +struct field_operators2 + : ring_operators2 > > {}; +template > +struct field_operators1 + : ring_operators1 > {}; +template > +struct ordered_field_operators2 + : field_operators2 > {}; +template > +struct ordered_field_operators1 + : field_operators1 > {}; +template > +struct euclidian_ring_operators2 + : ring_operators2 > > > > {}; +template > +struct euclidian_ring_operators1 + : ring_operators1 > > {}; +template > +struct ordered_euclidian_ring_operators2 + : totally_ordered2 > {}; +template > +struct ordered_euclidian_ring_operators1 + : totally_ordered1 > {}; +template > +struct euclidean_ring_operators2 + : ring_operators2 > > > > {}; +template > +struct euclidean_ring_operators1 + : ring_operators1 > > {}; +template > +struct ordered_euclidean_ring_operators2 + : totally_ordered2 > {}; +template > +struct ordered_euclidean_ring_operators1 + : totally_ordered1 > {}; +template > +struct input_iteratable + : equality_comparable1 > > {}; +template > +struct output_iteratable + : incrementable {}; +template > +struct forward_iteratable + : input_iteratable {}; +template > +struct bidirectional_iteratable + : forward_iteratable > {}; +template > +struct random_access_iteratable + : bidirectional_iteratable > > > {}; +} +namespace boost { +namespace detail { + struct true_t {}; + struct false_t {}; +} +template struct is_chained_base { + typedef ::boost::detail::false_t value; +}; +} +namespace boost { +template ,class O = typename is_chained_base::value > struct less_than_comparable : less_than_comparable2 {}; template struct less_than_comparable : less_than_comparable1 {}; template struct less_than_comparable : less_than_comparable1 {}; template struct is_chained_base< ::boost::less_than_comparable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::less_than_comparable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::less_than_comparable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct equality_comparable : equality_comparable2 {}; template struct equality_comparable : equality_comparable1 {}; template struct equality_comparable : equality_comparable1 {}; template struct is_chained_base< ::boost::equality_comparable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::equality_comparable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::equality_comparable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct multipliable : multipliable2 {}; template struct multipliable : multipliable1 {}; template struct multipliable : multipliable1 {}; template struct is_chained_base< ::boost::multipliable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::multipliable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::multipliable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct addable : addable2 {}; template struct addable : addable1 {}; template struct addable : addable1 {}; template struct is_chained_base< ::boost::addable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::addable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::addable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct subtractable : subtractable2 {}; template struct subtractable : subtractable1 {}; template struct subtractable : subtractable1 {}; template struct is_chained_base< ::boost::subtractable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::subtractable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::subtractable1 > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::subtractable2_left > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct dividable : dividable2 {}; template struct dividable : dividable1 {}; template struct dividable : dividable1 {}; template struct is_chained_base< ::boost::dividable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::dividable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::dividable1 > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::dividable2_left > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct modable : modable2 {}; template struct modable : modable1 {}; template struct modable : modable1 {}; template struct is_chained_base< ::boost::modable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::modable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::modable1 > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::modable2_left > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct xorable : xorable2 {}; template struct xorable : xorable1 {}; template struct xorable : xorable1 {}; template struct is_chained_base< ::boost::xorable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::xorable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::xorable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct andable : andable2 {}; template struct andable : andable1 {}; template struct andable : andable1 {}; template struct is_chained_base< ::boost::andable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::andable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::andable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct orable : orable2 {}; template struct orable : orable1 {}; template struct orable : orable1 {}; template struct is_chained_base< ::boost::orable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::orable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::orable1 > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::incrementable > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::decrementable > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::dereferenceable > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::indexable > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct left_shiftable : left_shiftable2 {}; template struct left_shiftable : left_shiftable1 {}; template struct left_shiftable : left_shiftable1 {}; template struct is_chained_base< ::boost::left_shiftable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::left_shiftable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::left_shiftable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct right_shiftable : right_shiftable2 {}; template struct right_shiftable : right_shiftable1 {}; template struct right_shiftable : right_shiftable1 {}; template struct is_chained_base< ::boost::right_shiftable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::right_shiftable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::right_shiftable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct equivalent : equivalent2 {}; template struct equivalent : equivalent1 {}; template struct equivalent : equivalent1 {}; template struct is_chained_base< ::boost::equivalent > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::equivalent2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::equivalent1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct partially_ordered : partially_ordered2 {}; template struct partially_ordered : partially_ordered1 {}; template struct partially_ordered : partially_ordered1 {}; template struct is_chained_base< ::boost::partially_ordered > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::partially_ordered2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::partially_ordered1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct totally_ordered : totally_ordered2 {}; template struct totally_ordered : totally_ordered1 {}; template struct totally_ordered : totally_ordered1 {}; template struct is_chained_base< ::boost::totally_ordered > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::totally_ordered2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::totally_ordered1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct additive : additive2 {}; template struct additive : additive1 {}; template struct additive : additive1 {}; template struct is_chained_base< ::boost::additive > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::additive2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::additive1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct multiplicative : multiplicative2 {}; template struct multiplicative : multiplicative1 {}; template struct multiplicative : multiplicative1 {}; template struct is_chained_base< ::boost::multiplicative > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::multiplicative2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::multiplicative1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct integer_multiplicative : integer_multiplicative2 {}; template struct integer_multiplicative : integer_multiplicative1 {}; template struct integer_multiplicative : integer_multiplicative1 {}; template struct is_chained_base< ::boost::integer_multiplicative > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::integer_multiplicative2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::integer_multiplicative1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct arithmetic : arithmetic2 {}; template struct arithmetic : arithmetic1 {}; template struct arithmetic : arithmetic1 {}; template struct is_chained_base< ::boost::arithmetic > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::arithmetic2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::arithmetic1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct integer_arithmetic : integer_arithmetic2 {}; template struct integer_arithmetic : integer_arithmetic1 {}; template struct integer_arithmetic : integer_arithmetic1 {}; template struct is_chained_base< ::boost::integer_arithmetic > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::integer_arithmetic2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::integer_arithmetic1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct bitwise : bitwise2 {}; template struct bitwise : bitwise1 {}; template struct bitwise : bitwise1 {}; template struct is_chained_base< ::boost::bitwise > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::bitwise2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::bitwise1 > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::unit_steppable > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct shiftable : shiftable2 {}; template struct shiftable : shiftable1 {}; template struct shiftable : shiftable1 {}; template struct is_chained_base< ::boost::shiftable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::shiftable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::shiftable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct ring_operators : ring_operators2 {}; template struct ring_operators : ring_operators1 {}; template struct ring_operators : ring_operators1 {}; template struct is_chained_base< ::boost::ring_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ring_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ring_operators1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct ordered_ring_operators : ordered_ring_operators2 {}; template struct ordered_ring_operators : ordered_ring_operators1 {}; template struct ordered_ring_operators : ordered_ring_operators1 {}; template struct is_chained_base< ::boost::ordered_ring_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_ring_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_ring_operators1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct field_operators : field_operators2 {}; template struct field_operators : field_operators1 {}; template struct field_operators : field_operators1 {}; template struct is_chained_base< ::boost::field_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::field_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::field_operators1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct ordered_field_operators : ordered_field_operators2 {}; template struct ordered_field_operators : ordered_field_operators1 {}; template struct ordered_field_operators : ordered_field_operators1 {}; template struct is_chained_base< ::boost::ordered_field_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_field_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_field_operators1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct euclidian_ring_operators : euclidian_ring_operators2 {}; template struct euclidian_ring_operators : euclidian_ring_operators1 {}; template struct euclidian_ring_operators : euclidian_ring_operators1 {}; template struct is_chained_base< ::boost::euclidian_ring_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::euclidian_ring_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::euclidian_ring_operators1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct ordered_euclidian_ring_operators : ordered_euclidian_ring_operators2 {}; template struct ordered_euclidian_ring_operators : ordered_euclidian_ring_operators1 {}; template struct ordered_euclidian_ring_operators : ordered_euclidian_ring_operators1 {}; template struct is_chained_base< ::boost::ordered_euclidian_ring_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_euclidian_ring_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_euclidian_ring_operators1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct euclidean_ring_operators : euclidean_ring_operators2 {}; template struct euclidean_ring_operators : euclidean_ring_operators1 {}; template struct euclidean_ring_operators : euclidean_ring_operators1 {}; template struct is_chained_base< ::boost::euclidean_ring_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::euclidean_ring_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::euclidean_ring_operators1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct ordered_euclidean_ring_operators : ordered_euclidean_ring_operators2 {}; template struct ordered_euclidean_ring_operators : ordered_euclidean_ring_operators1 {}; template struct ordered_euclidean_ring_operators : ordered_euclidean_ring_operators1 {}; template struct is_chained_base< ::boost::ordered_euclidean_ring_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_euclidean_ring_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_euclidean_ring_operators1 > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::input_iteratable > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::output_iteratable > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::forward_iteratable > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::bidirectional_iteratable > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::random_access_iteratable > { typedef ::boost::detail::true_t value; }; +template +struct operators2 + : totally_ordered2 > > {}; +template +struct operators : operators2 {}; +template struct operators + : totally_ordered > > > {}; +template +struct input_iterator_helper + : input_iteratable > {}; +template +struct output_iterator_helper + : output_iteratable > +{ + T& operator*() { return static_cast(*this); } + T& operator++() { return static_cast(*this); } +}; +template +struct forward_iterator_helper + : forward_iteratable > {}; +template +struct bidirectional_iterator_helper + : bidirectional_iteratable > {}; +template +struct random_access_iterator_helper + : random_access_iteratable > +{ + friend D requires_difference_operator(const T& x, const T& y) { + return x - y; + } +}; +} + + +namespace boost{ +template struct STATIC_ASSERTION_FAILURE; +template <> struct STATIC_ASSERTION_FAILURE { enum { value = 1 }; }; +template struct static_assert_test{}; +} +namespace boost { namespace python { +bool cxxabi_cxa_demangle_is_broken(); +struct type_info : private totally_ordered +{ + inline type_info(std::type_info const& = typeid(void)); + inline bool operator<(type_info const& rhs) const; + inline bool operator==(type_info const& rhs) const; + char const* name() const; + friend std::ostream& operator<<( + std::ostream&, type_info const&); + private: + typedef char const* base_id_t; + base_id_t m_base_type; +}; +template +inline type_info type_id() +{ + return type_info( + typeid(T) + ); +} +inline type_info::type_info(std::type_info const& id) + : m_base_type( + id.name() + ) +{ +} +inline bool type_info::operator<(type_info const& rhs) const +{ + return std::strcmp(m_base_type, rhs.m_base_type) < 0; +} +inline bool type_info::operator==(type_info const& rhs) const +{ + return !std::strcmp(m_base_type, rhs.m_base_type); +} +namespace detail +{ + char const* gcc_demangle(char const*); +} +inline char const* type_info::name() const +{ + char const* raw_name + = m_base_type + ; + return detail::gcc_demangle(raw_name); +} + std::ostream& operator<<(std::ostream&, type_info const&); +template<> +inline type_info type_id() +{ + return type_info (typeid (void *)); +} +template<> +inline type_info type_id() +{ + return type_info (typeid (void *)); +} +}} + +namespace boost { namespace python { +struct instance_holder : private noncopyable +{ + public: + instance_holder(); + virtual ~instance_holder(); + instance_holder* next() const; + virtual void* holds(type_info, bool null_ptr_only) = 0; + void install(PyObject* inst) throw(); + static void* allocate(PyObject*, std::size_t offset, std::size_t size); + static void deallocate(PyObject*, void* storage) throw(); + private: + instance_holder* m_next; +}; +inline instance_holder* instance_holder::next() const +{ + return m_next; +} +}} +namespace boost { namespace python { namespace objects { + void* find_static_type(void* p, type_info src, type_info dst); + void* find_dynamic_type(void* p, type_info src, type_info dst); +}}} +namespace boost { namespace python { namespace detail { +template struct is_auto_ptr : mpl::false_ { }; template < class T0 > struct is_auto_ptr< std::auto_ptr< T0 > > : mpl::true_ { }; +}}} +namespace boost { namespace python { namespace detail { +template +struct copy_ctor_mutates_rhs + : is_auto_ptr +{ +}; +}}} +namespace boost { namespace python { namespace detail { +template +struct value_arg + : mpl::if_< + copy_ctor_mutates_rhs + , T + , typename add_reference< + typename add_const::type + >::type + > +{}; +}}} +namespace boost { namespace mpl { namespace aux { +template< typename T > struct nested_type_wknd + : T::type +{ +}; +}}} +namespace boost { namespace mpl { +namespace aux { +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct or_impl + : true_ +{ +}; +template< typename T1, typename T2, typename T3, typename T4 > +struct or_impl< false,T1,T2,T3,T4 > + : or_impl< + ::boost::mpl::aux::nested_type_wknd::value + , T2, T3, T4 + , false_ + > +{ +}; +template<> +struct or_impl< + false + , false_, false_, false_, false_ + > + : false_ +{ +}; +} +template< + typename T1 = na + , typename T2 = na + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + : aux::or_impl< + ::boost::mpl::aux::nested_type_wknd::value + , T2, T3, T4, T5 + > +{ + +}; +template<> struct or_< + na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : or_< T1 , T2 > { }; }; template< typename Tag > struct lambda< or_< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef or_< na , na > result_; typedef or_< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< or_< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< or_< na , na > > : int_<-1> { }; } +}} +namespace boost { namespace python { namespace objects { +template +struct reference_to_value +{ + typedef typename add_reference::type>::type reference; + reference_to_value(reference x) : m_value(x) {} + reference get() const { return m_value; } + private: + reference m_value; +}; +template +struct forward + : mpl::if_< + mpl::or_, is_scalar > + , T + , reference_to_value + > +{ +}; +template +struct unforward +{ + typedef typename unwrap_reference::type& type; +}; +template +struct unforward > +{ + typedef T type; +}; +template +struct unforward_cref + : python::detail::value_arg< + typename unwrap_reference::type + > +{ +}; +template +struct unforward_cref > + : add_reference::type> +{ +}; +template +typename reference_to_value::reference +do_unforward(reference_to_value const& x, int) +{ + return x.get(); +} +template +typename reference_wrapper::type& +do_unforward(reference_wrapper const& x, int) +{ + return x.get(); +} +template +T const& do_unforward(T const& x, ...) +{ + return x; +} +}}} +namespace boost { +template< typename T > struct remove_pointer { typedef T type; }; +template< typename T > struct remove_pointer { typedef T type; }; +template< typename T > struct remove_pointer { typedef T type; }; +template< typename T > struct remove_pointer { typedef T type; }; +template< typename T > struct remove_pointer { typedef T type; }; +} +namespace boost { namespace python { +namespace detail +{ + template + struct pointee_impl + { + template struct apply : remove_pointer {}; + }; + template <> + struct pointee_impl + { + template struct apply + { + typedef typename T::element_type type; + }; + }; +} +template +struct pointee + : detail::pointee_impl< + ::boost::is_pointer::value + >::template apply +{ +}; +}} +namespace boost{ +template< typename T > struct is_polymorphic : ::boost::integral_constant { }; +} +namespace boost { namespace python { +class override; +namespace detail +{ + class wrapper_base; + namespace wrapper_base_ + { + inline PyObject* get_owner(wrapper_base const volatile& w); + inline PyObject* + owner_impl(void const volatile* , mpl::false_) + { + return 0; + } + template + inline PyObject* + owner_impl(T const volatile* x, mpl::true_); + template + inline PyObject* + owner(T const volatile* x) + { + return wrapper_base_::owner_impl(x,is_polymorphic()); + } + } + class wrapper_base + { + friend void initialize_wrapper(PyObject* self, wrapper_base* w); + friend PyObject* wrapper_base_::get_owner(wrapper_base const volatile& w); + protected: + wrapper_base() : m_self(0) {} + override get_override( + char const* name, PyTypeObject* class_object) const; + private: + void detach(); + private: + PyObject* m_self; + }; + namespace wrapper_base_ + { + template + inline PyObject* + owner_impl(T const volatile* x, mpl::true_) + { + if (wrapper_base const volatile* w = dynamic_cast(x)) + { + return wrapper_base_::get_owner(*w); + } + return 0; + } + inline PyObject* get_owner(wrapper_base const volatile& w) + { + return w.m_self; + } + } + inline void initialize_wrapper(PyObject* self, wrapper_base* w) + { + w->m_self = self; + } + inline void initialize_wrapper(PyObject* , ...) {} +} +}} +namespace boost { namespace python { namespace detail { +template +inline void force_instantiate(T const&) {} +}}} +namespace boost { namespace mpl { +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; +template< + typename F + > +struct apply0; +template< + typename F, typename T1 + > +struct apply1; +template< + typename F, typename T1, typename T2 + > +struct apply2; +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; +}} +namespace mpl_ { +template< int N > struct arg; +} +namespace boost { namespace mpl { using ::mpl_::arg; } } +namespace boost { namespace mpl { +namespace aux { +template< long C_ > +struct not_impl + : bool_ +{ +}; +} +template< + typename T = na + > +struct not_ + : aux::not_impl< + ::boost::mpl::aux::nested_type_wknd::value + > +{ + +}; +template<> struct not_< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : not_< T1 > { }; }; template< typename Tag > struct lambda< not_< na > , Tag , int_<-1> > { typedef false_ is_le; typedef not_< na > result_; typedef not_< na > type; }; namespace aux { template< typename T1 > struct template_arity< not_< T1 > > : int_<1> { }; template<> struct template_arity< not_< na > > : int_<-1> { }; } +}} + +namespace mpl_ { +struct failed {}; +template< bool C > struct assert { typedef void* type; }; +template<> struct assert { typedef assert type; }; +template< bool C > +int assertion_failed( typename assert::type ); +template< bool C > +struct assertion +{ + static int failed( assert ); +}; +template<> +struct assertion +{ + static int failed( void* ); +}; +struct assert_ +{ + template< typename T1, typename T2 = na, typename T3 = na, typename T4 = na > struct types {}; + static assert_ const arg; + enum relations { equal = 1, not_equal, greater, greater_equal, less, less_equal }; +}; +boost::mpl::aux::weighted_tag<1>::type operator==( assert_, assert_ ); +boost::mpl::aux::weighted_tag<2>::type operator!=( assert_, assert_ ); +boost::mpl::aux::weighted_tag<3>::type operator>( assert_, assert_ ); +boost::mpl::aux::weighted_tag<4>::type operator>=( assert_, assert_ ); +boost::mpl::aux::weighted_tag<5>::type operator<( assert_, assert_ ); +boost::mpl::aux::weighted_tag<6>::type operator<=( assert_, assert_ ); +template< assert_::relations r, long x, long y > struct assert_relation {}; +template< bool > struct assert_arg_pred_impl { typedef int type; }; +template<> struct assert_arg_pred_impl { typedef void* type; }; +template< typename P > struct assert_arg_pred +{ + typedef typename P::type p_type; + typedef typename assert_arg_pred_impl< p_type::value >::type type; +}; +template< typename P > struct assert_arg_pred_not +{ + typedef typename P::type p_type; + enum { p = !p_type::value }; + typedef typename assert_arg_pred_impl

::type type; +}; +template< typename Pred > +failed ************ (Pred::************ + assert_arg( void (*)(Pred), typename assert_arg_pred::type ) + ); +template< typename Pred > +failed ************ (boost::mpl::not_::************ + assert_not_arg( void (*)(Pred), typename assert_arg_pred_not::type ) + ); +template< typename Pred > +assert +assert_arg( void (*)(Pred), typename assert_arg_pred_not::type ); +template< typename Pred > +assert +assert_not_arg( void (*)(Pred), typename assert_arg_pred::type ); +} +namespace mpl_ { +template<> struct arg< -1 > +{ + static const int value = -1; + + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + enum { mpl_assertion_in_line_27 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na))0, 1 ) ) ) }; + }; +}; +template<> struct arg<1> +{ + static const int value = 1; + typedef arg<2> next; + + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + enum { mpl_assertion_in_line_45 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na))0, 1 ) ) ) }; + }; +}; +template<> struct arg<2> +{ + static const int value = 2; + typedef arg<3> next; + + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U2 type; + enum { mpl_assertion_in_line_63 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na))0, 1 ) ) ) }; + }; +}; +template<> struct arg<3> +{ + static const int value = 3; + typedef arg<4> next; + + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U3 type; + enum { mpl_assertion_in_line_81 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na))0, 1 ) ) ) }; + }; +}; +template<> struct arg<4> +{ + static const int value = 4; + typedef arg<5> next; + + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U4 type; + enum { mpl_assertion_in_line_99 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na))0, 1 ) ) ) }; + }; +}; +template<> struct arg<5> +{ + static const int value = 5; + typedef arg<6> next; + + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U5 type; + enum { mpl_assertion_in_line_117 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na))0, 1 ) ) ) }; + }; +}; +} +namespace mpl_ { +typedef arg< -1 > _; +} +namespace boost { namespace mpl { +using ::mpl_::_; +namespace placeholders { +using mpl_::_; +} +}} +namespace mpl_ { +typedef arg<1> _1; +} +namespace boost { namespace mpl { +using ::mpl_::_1; +namespace placeholders { +using mpl_::_1; +} +}} +namespace mpl_ { +typedef arg<2> _2; +} +namespace boost { namespace mpl { +using ::mpl_::_2; +namespace placeholders { +using mpl_::_2; +} +}} +namespace mpl_ { +typedef arg<3> _3; +} +namespace boost { namespace mpl { +using ::mpl_::_3; +namespace placeholders { +using mpl_::_3; +} +}} +namespace mpl_ { +typedef arg<4> _4; +} +namespace boost { namespace mpl { +using ::mpl_::_4; +namespace placeholders { +using mpl_::_4; +} +}} +namespace mpl_ { +typedef arg<5> _5; +} +namespace boost { namespace mpl { +using ::mpl_::_5; +namespace placeholders { +using mpl_::_5; +} +}} +namespace mpl_ { +typedef arg<6> _6; +} +namespace boost { namespace mpl { +using ::mpl_::_6; +namespace placeholders { +using mpl_::_6; +} +}} +namespace boost { namespace mpl { +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct bind; +template< + typename F + > +struct bind0; +template< + typename F, typename T1 + > +struct bind1; +template< + typename F, typename T1, typename T2 + > +struct bind2; +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; +}} +namespace boost { namespace mpl { +template< + typename T = na + , int not_le_ = 0 + > +struct protect : T +{ + typedef protect type; +}; +template<> struct protect< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : protect< T1 > { }; }; +namespace aux { template< typename T1 > struct template_arity< protect< T1 > > : int_<1> { }; template<> struct template_arity< protect< na > > : int_<-1> { }; } +}} +namespace boost { namespace mpl { +namespace aux { +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; +template< + typename T + , typename Arg + > +struct replace_unnamed_arg +{ + typedef Arg next; + typedef T type; +}; +template< + typename Arg + > +struct replace_unnamed_arg< arg< -1 >, Arg > +{ + typedef typename Arg::next next; + typedef Arg type; +}; +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; +} +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + public: + typedef typename apply_wrap0< + f_ + >::type type; + }; +}; +namespace aux { +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; +} +namespace aux { template< typename T1 > struct template_arity< bind0< T1> > : int_<1> { }; } +template< + typename F + > +struct bind< F,na,na,na,na,na > + : bind0 +{ +}; +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + }; +}; +namespace aux { +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; +} +namespace aux { template< typename T1 , typename T2 > struct template_arity< bind1< T1 , T2> > : int_<2> { }; } +template< + typename F, typename T1 + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + }; +}; +namespace aux { +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; +} +namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< bind2< T1 , T2 , T3> > : int_<3> { }; } +template< + typename F, typename T1, typename T2 + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + }; +}; +namespace aux { +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; +} +namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 > struct template_arity< bind3< T1 , T2 , T3 , T4> > : int_<4> { }; } +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + }; +}; +namespace aux { +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; +} +namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< bind4< T1 , T2 , T3 , T4 , T5> > : int_<5> { }; } +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + }; +}; +namespace aux { +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; +} +namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > struct template_arity< bind5< T1 , T2 , T3 , T4 , T5 , T6> > : int_<6> { }; } +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; +template< typename T1, typename T2, typename T3 > struct if_; +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + public: + typedef typename f_::type type; + }; +}; +template< + template< typename T1, typename T2, typename T3 > class F, typename Tag + > +struct quote3; +template< typename T1, typename T2, typename T3 > struct eval_if; +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< eval_if,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + typedef typename eval_if< + typename t1::type + , t2, t3 + >::type f_; + public: + typedef typename f_::type type; + }; +}; +}} +namespace boost { namespace mpl { namespace aux { +template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_type { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; +}}} +namespace boost { namespace mpl { +template< typename T, bool has_type_ > +struct quote_impl +{ + typedef typename T::type type; +}; +template< typename T > +struct quote_impl< T,false > +{ + typedef T type; +}; +template< + template< typename P1 > class F + , typename Tag = void_ + > +struct quote1 +{ + template< typename U1 > struct apply + : quote_impl< + F + , aux::has_type< F >::value + > + { + }; +}; +template< + template< typename P1, typename P2 > class F + , typename Tag = void_ + > +struct quote2 +{ + template< typename U1, typename U2 > struct apply + : quote_impl< + F< U1,U2 > + , aux::has_type< F< U1,U2 > >::value + > + { + }; +}; +template< + template< typename P1, typename P2, typename P3 > class F + , typename Tag = void_ + > +struct quote3 +{ + template< typename U1, typename U2, typename U3 > struct apply + : quote_impl< + F< U1,U2,U3 > + , aux::has_type< F< U1,U2,U3 > >::value + > + { + }; +}; +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename Tag = void_ + > +struct quote4 +{ + template< + typename U1, typename U2, typename U3, typename U4 + > + struct apply + : quote_impl< + F< U1,U2,U3,U4 > + , aux::has_type< F< U1,U2,U3,U4 > >::value + > + { + }; +}; +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename Tag = void_ + > +struct quote5 +{ + template< + typename U1, typename U2, typename U3, typename U4 + , typename U5 + > + struct apply + : quote_impl< + F< U1,U2,U3,U4,U5 > + , aux::has_type< F< U1,U2,U3,U4,U5 > >::value + > + { + }; +}; +}} +namespace boost { namespace mpl { namespace aux { +template< int N > struct arity_tag +{ + typedef char (&type)[N + 1]; +}; +template< + int C1, int C2, int C3, int C4, int C5, int C6 + > +struct max_arity +{ + static const int value = ( C6 > 0 ? C6 : ( C5 > 0 ? C5 : ( C4 > 0 ? C4 : ( C3 > 0 ? C3 : ( C2 > 0 ? C2 : ( C1 > 0 ? C1 : -1 ) ) ) ) ) ) + ; +}; +arity_tag<0>::type arity_helper(...); +template< + template< typename P1 > class F + , typename T1 + > +typename arity_tag<1>::type +arity_helper(type_wrapper< F >, arity_tag<1>); +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + > +typename arity_tag<2>::type +arity_helper(type_wrapper< F< T1,T2 > >, arity_tag<2>); +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + > +typename arity_tag<3>::type +arity_helper(type_wrapper< F< T1,T2,T3 > >, arity_tag<3>); +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + > +typename arity_tag<4>::type +arity_helper(type_wrapper< F< T1,T2,T3,T4 > >, arity_tag<4>); +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + > +typename arity_tag<5>::type +arity_helper(type_wrapper< F< T1,T2,T3,T4,T5 > >, arity_tag<5>); +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6 + > +typename arity_tag<6>::type +arity_helper(type_wrapper< F< T1,T2,T3,T4,T5,T6 > >, arity_tag<6>); +template< typename F, int N > +struct template_arity_impl +{ + static const int value = sizeof(arity_helper(type_wrapper(), arity_tag())) - 1 + ; +}; +template< typename F > +struct template_arity +{ + static const int value = ( max_arity< template_arity_impl< F,1 >::value, template_arity_impl< F,2 >::value, template_arity_impl< F,3 >::value, template_arity_impl< F,4 >::value, template_arity_impl< F,5 >::value, template_arity_impl< F,6 >::value >::value ) + ; + typedef mpl::int_ type; +}; +}}} +namespace boost { namespace mpl { +namespace aux { +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; +} +template< + typename T + , typename Tag + , typename Arity + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; +template< int N, typename Tag > +struct lambda< arg,Tag, int_< -1 > > +{ + typedef true_ is_le; + typedef mpl::arg result_; + typedef mpl::protect type; +}; +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + , int_<1> + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + typedef result_ type; +}; +namespace aux { +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + typedef result_ type; +}; +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + typedef mpl::protect type; +}; +} +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + , int_<1> + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + , int_<2> + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + typedef result_ type; +}; +namespace aux { +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + typedef result_ type; +}; +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + typedef mpl::protect type; +}; +} +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + , int_<2> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + , int_<3> + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + typedef result_ type; +}; +namespace aux { +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + typedef result_ type; +}; +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + typedef mpl::protect type; +}; +} +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + , int_<3> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + , int_<4> + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + typedef result_ type; +}; +namespace aux { +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + typedef result_ type; +}; +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + typedef mpl::protect type; +}; +} +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + , int_<4> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + , int_<5> + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + typedef result_ type; +}; +namespace aux { +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + typedef result_ type; +}; +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + typedef mpl::protect type; +}; +} +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + , int_<5> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + typedef result_ type; +}; +template< typename T, typename Tag > +struct lambda< mpl::protect,Tag, int_<1> > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; +template< + typename F + , typename Tag1 + , typename Tag2 + , typename Arity + > +struct lambda< + lambda< F,Tag1,Arity > + , Tag2 + , int_<3> + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef bind1< quote1, typename l1::result_ > arity_; + typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3; + typedef aux::le_result3 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; +template<> struct lambda< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : lambda< T1 , T2 > { }; }; template< typename Tag > struct lambda< lambda< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef lambda< na , na > result_; typedef lambda< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< lambda< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< lambda< na , na > > : int_<-1> { }; } +}} +namespace boost { namespace mpl { +template< + typename F + > +struct apply0 + : apply_wrap0< + typename lambda::type + > +{ + +}; +template< + typename F + > +struct apply< F,na,na,na,na,na > + : apply0 +{ +}; +template< + typename F, typename T1 + > +struct apply1 + : apply_wrap1< + typename lambda::type + , T1 + > +{ + +}; +template< + typename F, typename T1 + > +struct apply< F,T1,na,na,na,na > + : apply1< F,T1 > +{ +}; +template< + typename F, typename T1, typename T2 + > +struct apply2 + : apply_wrap2< + typename lambda::type + , T1, T2 + > +{ + +}; +template< + typename F, typename T1, typename T2 + > +struct apply< F,T1,T2,na,na,na > + : apply2< F,T1,T2 > +{ +}; +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + : apply_wrap3< + typename lambda::type + , T1, T2, T3 + > +{ + +}; +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply< F,T1,T2,T3,na,na > + : apply3< F,T1,T2,T3 > +{ +}; +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + : apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + > +{ + +}; +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply< F,T1,T2,T3,T4,na > + : apply4< F,T1,T2,T3,T4 > +{ +}; +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + : apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + > +{ + +}; +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply + : apply5< F,T1,T2,T3,T4,T5 > +{ +}; +}} +namespace boost { namespace python { +template class wrapper; +}} +namespace boost { namespace python { namespace objects { +template +struct pointer_holder : instance_holder +{ + typedef Value value_type; + pointer_holder(Pointer); + pointer_holder(PyObject* self ) + : m_p(new Value( + + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } + template< class A0 > + pointer_holder(PyObject* self , A0 a0) + : m_p(new Value( + objects::do_unforward(a0,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } + template< class A0 , class A1 > + pointer_holder(PyObject* self , A0 a0 , A1 a1) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } + template< class A0 , class A1 , class A2 > + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } + template< class A0 , class A1 , class A2 , class A3 > + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } + template< class A0 , class A1 , class A2 , class A3 , class A4 > + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } + template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 > + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } + template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 > + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } + template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 > + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } + template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 > + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } + template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 > + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } + template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 > + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } + template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 > + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } + template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 > + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11 , A12 a12) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) , objects::do_unforward(a12,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } + template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 > + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11 , A12 a12 , A13 a13) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) , objects::do_unforward(a12,0) , objects::do_unforward(a13,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } + template< class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 , class A14 > + pointer_holder(PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11 , A12 a12 , A13 a13 , A14 a14) + : m_p(new Value( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) , objects::do_unforward(a12,0) , objects::do_unforward(a13,0) , objects::do_unforward(a14,0) + )) + { + python::detail::initialize_wrapper(self, get_pointer(this->m_p)); + } + private: + private: + void* holds(type_info, bool null_ptr_only); + template + inline void* holds_wrapped(type_info dst_t, wrapper*,T* p) + { + return python::type_id() == dst_t ? p : 0; + } + inline void* holds_wrapped(type_info, ...) + { + return 0; + } + private: + Pointer m_p; +}; +template +struct pointer_holder_back_reference : instance_holder +{ + private: + typedef typename python::pointee::type held_type; + public: + typedef Value value_type; + pointer_holder_back_reference(Pointer); + pointer_holder_back_reference( + PyObject* p ) + : m_p(new held_type( + p + )) + {} + template < class A0 > + pointer_holder_back_reference( + PyObject* p , A0 a0) + : m_p(new held_type( + p , objects::do_unforward(a0,0) + )) + {} + template < class A0 , class A1 > + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) + )) + {} + template < class A0 , class A1 , class A2 > + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) + )) + {} + template < class A0 , class A1 , class A2 , class A3 > + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) + )) + {} + template < class A0 , class A1 , class A2 , class A3 , class A4 > + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) + )) + {} + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 > + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) + )) + {} + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 > + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) + )) + {} + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 > + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) + )) + {} + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 > + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) + )) + {} + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 > + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) + )) + {} + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 > + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) + )) + {} + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 > + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) + )) + {} + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 > + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11 , A12 a12) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) , objects::do_unforward(a12,0) + )) + {} + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 > + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11 , A12 a12 , A13 a13) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) , objects::do_unforward(a12,0) , objects::do_unforward(a13,0) + )) + {} + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 , class A14 > + pointer_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11 , A12 a12 , A13 a13 , A14 a14) + : m_p(new held_type( + p , objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) , objects::do_unforward(a12,0) , objects::do_unforward(a13,0) , objects::do_unforward(a14,0) + )) + {} + private: + void* holds(type_info, bool null_ptr_only); + private: + Pointer m_p; +}; +template +inline pointer_holder::pointer_holder(Pointer p) + : m_p(p) +{ +} +template +inline pointer_holder_back_reference::pointer_holder_back_reference(Pointer p) + : m_p(p) +{ +} +template +void* pointer_holder::holds(type_info dst_t, bool null_ptr_only) +{ + if (dst_t == python::type_id() + && !(null_ptr_only && get_pointer(this->m_p)) + ) + return &this->m_p; + Value* p + = get_pointer(this->m_p) + ; + if (p == 0) + return 0; + if (void* wrapped = holds_wrapped(dst_t, p, p)) + return wrapped; + type_info src_t = python::type_id(); + return src_t == dst_t ? p : find_dynamic_type(p, src_t, dst_t); +} +template +void* pointer_holder_back_reference::holds(type_info dst_t, bool null_ptr_only) +{ + if (dst_t == python::type_id() + && !(null_ptr_only && get_pointer(this->m_p)) + ) + return &this->m_p; + if (!get_pointer(this->m_p)) + return 0; + Value* p = get_pointer(m_p); + if (dst_t == python::type_id()) + return p; + type_info src_t = python::type_id(); + return src_t == dst_t ? p : find_dynamic_type(p, src_t, dst_t); +} +}}} + +namespace boost { +namespace detail { +class alignment_dummy; +typedef void (*function_ptr)(); +typedef int (alignment_dummy::*member_ptr); +typedef int (alignment_dummy::*member_function_ptr)(); +template +struct lower_alignment_helper +{ + typedef char type; + enum { value = true }; +}; +template +struct lower_alignment_helper +{ + enum { value = (alignment_of::value == target) }; + typedef typename mpl::if_c::type type; +}; +template +struct has_one_T +{ + T data; +}; +template +union lower_alignment +{ + enum { found0 = false }; + + typename lower_alignment_helper< found0,target,char >::type t0; enum { found1 = lower_alignment_helper::value }; typename lower_alignment_helper< found1,target,short >::type t1; enum { found2 = lower_alignment_helper::value }; typename lower_alignment_helper< found2,target,int >::type t2; enum { found3 = lower_alignment_helper::value }; typename lower_alignment_helper< found3,target,long >::type t3; enum { found4 = lower_alignment_helper::value }; typename lower_alignment_helper< found4,target,::boost::long_long_type >::type t4; enum { found5 = lower_alignment_helper::value }; typename lower_alignment_helper< found5,target,float >::type t5; enum { found6 = lower_alignment_helper::value }; typename lower_alignment_helper< found6,target,double >::type t6; enum { found7 = lower_alignment_helper::value }; typename lower_alignment_helper< found7,target,long double >::type t7; enum { found8 = lower_alignment_helper::value }; typename lower_alignment_helper< found8,target,void* >::type t8; enum { found9 = lower_alignment_helper::value }; typename lower_alignment_helper< found9,target,function_ptr >::type t9; enum { found10 = lower_alignment_helper::value }; typename lower_alignment_helper< found10,target,member_ptr >::type t10; enum { found11 = lower_alignment_helper::value }; typename lower_alignment_helper< found11,target,member_function_ptr >::type t11; enum { found12 = lower_alignment_helper::value }; typename lower_alignment_helper< found12,target,boost::detail::has_one_T< char > >::type t12; enum { found13 = lower_alignment_helper >::value }; typename lower_alignment_helper< found13,target,boost::detail::has_one_T< short > >::type t13; enum { found14 = lower_alignment_helper >::value }; typename lower_alignment_helper< found14,target,boost::detail::has_one_T< int > >::type t14; enum { found15 = lower_alignment_helper >::value }; typename lower_alignment_helper< found15,target,boost::detail::has_one_T< long > >::type t15; enum { found16 = lower_alignment_helper >::value }; typename lower_alignment_helper< found16,target,boost::detail::has_one_T< ::boost::long_long_type > >::type t16; enum { found17 = lower_alignment_helper >::value }; typename lower_alignment_helper< found17,target,boost::detail::has_one_T< float > >::type t17; enum { found18 = lower_alignment_helper >::value }; typename lower_alignment_helper< found18,target,boost::detail::has_one_T< double > >::type t18; enum { found19 = lower_alignment_helper >::value }; typename lower_alignment_helper< found19,target,boost::detail::has_one_T< long double > >::type t19; enum { found20 = lower_alignment_helper >::value }; typename lower_alignment_helper< found20,target,boost::detail::has_one_T< void* > >::type t20; enum { found21 = lower_alignment_helper >::value }; typename lower_alignment_helper< found21,target,boost::detail::has_one_T< function_ptr > >::type t21; enum { found22 = lower_alignment_helper >::value }; typename lower_alignment_helper< found22,target,boost::detail::has_one_T< member_ptr > >::type t22; enum { found23 = lower_alignment_helper >::value }; typename lower_alignment_helper< found23,target,boost::detail::has_one_T< member_function_ptr > >::type t23; enum { found24 = lower_alignment_helper >::value }; +}; +union max_align +{ + + char t0; short t1; int t2; long t3; ::boost::long_long_type t4; float t5; double t6; long double t7; void* t8; function_ptr t9; member_ptr t10; member_function_ptr t11; boost::detail::has_one_T< char > t12; boost::detail::has_one_T< short > t13; boost::detail::has_one_T< int > t14; boost::detail::has_one_T< long > t15; boost::detail::has_one_T< ::boost::long_long_type > t16; boost::detail::has_one_T< float > t17; boost::detail::has_one_T< double > t18; boost::detail::has_one_T< long double > t19; boost::detail::has_one_T< void* > t20; boost::detail::has_one_T< function_ptr > t21; boost::detail::has_one_T< member_ptr > t22; boost::detail::has_one_T< member_function_ptr > t23; +}; +template +struct is_aligned +{ + static const bool value = (TAlign >= Align) & (TAlign % Align == 0) + ; +}; +} +template +struct is_pod< ::boost::detail::lower_alignment > +{ + static const std::size_t value = true; +}; +namespace detail{ +template +class type_with_alignment_imp +{ + typedef ::boost::detail::lower_alignment t1; + typedef typename mpl::if_c< + ::boost::detail::is_aligned< ::boost::alignment_of::value,Align >::value + , t1 + , ::boost::detail::max_align + >::type align_t; + static const std::size_t found = alignment_of::value; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((found >= Align) == 0 ? false : true) >)> boost_static_assert_typedef_206; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((found % Align == 0) == 0 ? false : true) >)> boost_static_assert_typedef_207; + public: + typedef align_t type; +}; +} +template +class type_with_alignment + : public ::boost::detail::type_with_alignment_imp +{ +}; +namespace align { +struct __attribute__((__aligned__(2))) a2 {}; +struct __attribute__((__aligned__(4))) a4 {}; +struct __attribute__((__aligned__(8))) a8 {}; +struct __attribute__((__aligned__(16))) a16 {}; +struct __attribute__((__aligned__(32))) a32 {}; +} +template<> class type_with_alignment<1> { public: typedef char type; }; +template<> class type_with_alignment<2> { public: typedef align::a2 type; }; +template<> class type_with_alignment<4> { public: typedef align::a4 type; }; +template<> class type_with_alignment<8> { public: typedef align::a8 type; }; +template<> class type_with_alignment<16> { public: typedef align::a16 type; }; +template<> class type_with_alignment<32> { public: typedef align::a32 type; }; +namespace detail { +template<> struct is_pod_impl< ::boost::align::a2 > { static const bool value = (true); }; +template<> struct is_pod_impl< ::boost::align::a4 > { static const bool value = (true); }; +template<> struct is_pod_impl< ::boost::align::a8 > { static const bool value = (true); }; +template<> struct is_pod_impl< ::boost::align::a16 > { static const bool value = (true); }; +template<> struct is_pod_impl< ::boost::align::a32 > { static const bool value = (true); }; +} +} + +namespace boost { namespace python +{ + struct instance_holder; +}} +namespace boost { namespace python { namespace objects { +template +struct instance +{ + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; Py_ssize_t ob_size; + PyObject* dict; + PyObject* weakrefs; + instance_holder* objects; + typedef typename type_with_alignment< + ::boost::alignment_of::value + >::type align_t; + union + { + align_t align; + char bytes[sizeof(Data)]; + } storage; +}; +template +struct additional_instance_size +{ + typedef instance instance_data; + typedef instance instance_char; + static const std::size_t value = sizeof(instance_data) - __builtin_offsetof (instance_char, storage) + ; +}; +}}} +namespace boost { namespace python { namespace converter { +typedef PyObject* (*to_python_function_t)(void const*); +}}} +namespace boost { namespace python { namespace converter { +struct rvalue_from_python_stage1_data; +typedef void (*constructor_function)(PyObject* source, rvalue_from_python_stage1_data*); +}}} + +namespace boost { namespace python { namespace detail { +struct alignment_dummy; +typedef void (*function_ptr)(); +typedef int (alignment_dummy::*member_ptr); +typedef int (alignment_dummy::*member_function_ptr)(); +template +union aligned_storage +{ + typename mpl::if_c< sizeof(char) <= size, char, char>::type t0; + typename mpl::if_c< sizeof(short) <= size, short, char>::type t1; + typename mpl::if_c< sizeof(int) <= size, int, char>::type t2; + typename mpl::if_c< sizeof(long) <= size, long, char>::type t3; + typename mpl::if_c< sizeof(float) <= size, float, char>::type t4; + typename mpl::if_c< sizeof(double) <= size, double, char>::type t5; + typename mpl::if_c< sizeof(long double) <= size, long double, char>::type t6; + typename mpl::if_c< sizeof(void*) <= size, void*, char>::type t7; + typename mpl::if_c< sizeof(function_ptr) <= size, function_ptr, char>::type t8; + typename mpl::if_c< sizeof(member_ptr) <= size, member_ptr, char>::type t9; + typename mpl::if_c< sizeof(member_function_ptr) <= size, member_function_ptr, char>::type t10; + char bytes[size]; +}; + template struct referent_size; + template + struct referent_size + { + static const std::size_t value = sizeof(T) + ; + }; +template +struct referent_storage +{ + typedef aligned_storage< + ::boost::python::detail::referent_size::value + > type; +}; +}}} +namespace boost { namespace python { namespace detail { +template < + bool array + > struct value_destroyer; +template <> +struct value_destroyer< + false + > +{ + template + static void execute(T const volatile* p) + { + p->T::~T(); + } +}; +template <> +struct value_destroyer< + true + > +{ + template + static void execute(A*, T const volatile* const first) + { + for (T const volatile* p = first; p != first + sizeof(A)/sizeof(T); ++p) + { + value_destroyer< + boost::is_array::value + >::execute(p); + } + } + template + static void execute(T const volatile* p) + { + execute(p, *p); + } +}; +template +inline void destroy_referent_impl(void* p, T& (*)()) +{ + value_destroyer< + (boost::is_array::value) + >::execute((const volatile T*)p); +} +template +inline void destroy_referent(void* p, T(*)() = 0) +{ + destroy_referent_impl(p, (T(*)())0); +} +}}} + +namespace boost { namespace python { namespace converter { +struct rvalue_from_python_stage1_data +{ + void* convertible; + constructor_function construct; +}; +template +struct rvalue_from_python_storage +{ + rvalue_from_python_stage1_data stage1; + typename python::detail::referent_storage< + typename add_reference::type + >::type storage; +}; +template +struct rvalue_from_python_data : rvalue_from_python_storage +{ + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((__builtin_offsetof (rvalue_from_python_storage, stage1) == 0) == 0 ? false : true) >)> boost_static_assert_typedef_99; + rvalue_from_python_data(rvalue_from_python_stage1_data const&); + rvalue_from_python_data(void* convertible); + ~rvalue_from_python_data(); + private: + typedef typename add_reference::type>::type ref_type; +}; +template +inline rvalue_from_python_data::rvalue_from_python_data(rvalue_from_python_stage1_data const& _stage1) +{ + this->stage1 = _stage1; +} +template +inline rvalue_from_python_data::rvalue_from_python_data(void* convertible) +{ + this->stage1.convertible = convertible; +} +template +inline rvalue_from_python_data::~rvalue_from_python_data() +{ + if (this->stage1.convertible == this->storage.bytes) + python::detail::destroy_referent(this->storage.bytes); +} +}}} +namespace boost { namespace python { namespace converter { +typedef void* (*convertible_function)(PyObject*); +}}} +namespace boost { namespace python { namespace converter { +struct registration; +namespace registry +{ + registration const& lookup(type_info); + registration const& lookup_shared_ptr(type_info); + registration const* query(type_info); + void insert(to_python_function_t, type_info, PyTypeObject const* (*to_python_target_type)() = 0); + void insert(void* (*convert)(PyObject*), type_info, PyTypeObject const* (*expected_pytype)() = 0); + void insert( + convertible_function + , constructor_function + , type_info + , PyTypeObject const* (*expected_pytype)() = 0 + ); + void push_back( + convertible_function + , constructor_function + , type_info + , PyTypeObject const* (*expected_pytype)() = 0 + ); +} +}}} +namespace boost { namespace python { namespace converter { +struct lvalue_from_python_chain +{ + convertible_function convert; + lvalue_from_python_chain* next; +}; +struct rvalue_from_python_chain +{ + convertible_function convertible; + constructor_function construct; + PyTypeObject const* (*expected_pytype)(); + rvalue_from_python_chain* next; +}; +struct registration +{ + public: + explicit registration(type_info target, bool is_shared_ptr = false); + ~registration(); + PyObject* to_python(void const volatile*) const; + PyTypeObject* get_class_object() const; + PyTypeObject const* expected_from_python_type() const; + PyTypeObject const* to_python_target_type() const; + public: + const python::type_info target_type; + lvalue_from_python_chain* lvalue_chain; + rvalue_from_python_chain* rvalue_chain; + PyTypeObject* m_class_object; + to_python_function_t m_to_python; + PyTypeObject const* (*m_to_python_target_type)(); + const bool is_shared_ptr; +}; +inline registration::registration(type_info target_type, bool is_shared_ptr) + : target_type(target_type) + , lvalue_chain(0) + , rvalue_chain(0) + , m_class_object(0) + , m_to_python(0) + , m_to_python_target_type(0) + , is_shared_ptr(is_shared_ptr) +{} +inline bool operator<(registration const& lhs, registration const& rhs) +{ + return lhs.target_type < rhs.target_type; +} +}}} +namespace boost { +namespace detail { +template +struct add_pointer_impl +{ + typedef typename remove_reference::type no_ref_type; + typedef no_ref_type* type; +}; +} +template< typename T > struct add_pointer { typedef typename boost::detail::add_pointer_impl::type type; }; +} + +namespace boost { +template< typename T > struct remove_bounds { typedef T type; }; +template< typename T, std::size_t N > struct remove_bounds { typedef T type; }; +template< typename T, std::size_t N > struct remove_bounds { typedef T const type; }; +template< typename T, std::size_t N > struct remove_bounds { typedef T volatile type; }; +template< typename T, std::size_t N > struct remove_bounds { typedef T const volatile type; }; +template< typename T > struct remove_bounds { typedef T type; }; +template< typename T > struct remove_bounds { typedef T const type; }; +template< typename T > struct remove_bounds { typedef T volatile type; }; +template< typename T > struct remove_bounds { typedef T const volatile type; }; +} +namespace boost { +template class shared_ptr; +namespace python { namespace converter { +struct registration; +namespace detail +{ + template + struct registered_base + { + static registration const& converters; + }; +} +template +struct registered + : detail::registered_base< + typename add_reference< + typename add_cv::type + >::type + > +{ +}; +template +struct registered + : registered {}; +namespace detail +{ + inline void + register_shared_ptr0(...) + { + } + template + inline void + register_shared_ptr0(shared_ptr*) + { + registry::lookup_shared_ptr(type_id >()); + } + template + inline void + register_shared_ptr1(T const volatile*) + { + detail::register_shared_ptr0((T*)0); + } + template + inline registration const& + registry_lookup2(T&(*)()) + { + detail::register_shared_ptr1((T*)0); + return registry::lookup(type_id()); + } + template + inline registration const& + registry_lookup1(type) + { + return registry_lookup2((T(*)())0); + } + inline registration const& + registry_lookup1(type) + { + detail::register_shared_ptr1((void*)0); + return registry::lookup(type_id()); + } + template + registration const& registered_base::converters = detail::registry_lookup1(type()); +} +}}} +namespace boost { namespace python { namespace detail { +struct decref_guard +{ + decref_guard(PyObject* o) : obj(o) {} + ~decref_guard() { if ((obj) == __null) ; else if ( --((PyObject*)(obj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(obj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(obj)))); } + void cancel() { obj = 0; } + private: + PyObject* obj; +}; +}}} +namespace boost { namespace python { namespace detail { +inline PyObject* none() { ( ((PyObject*)((&_Py_NoneStruct)))->ob_refcnt++); return (&_Py_NoneStruct); } +}}} +namespace boost { namespace python { namespace objects { +template +struct make_instance_impl +{ + typedef objects::instance instance_t; + template + static inline PyObject* execute(Arg& x) + { + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((is_class::value) == 0 ? false : true) >)> boost_static_assert_typedef_24; + PyTypeObject* type = Derived::get_class_object(x); + if (type == 0) + return python::detail::none(); + PyObject* raw_result = type->tp_alloc( + type, objects::additional_instance_size::value); + if (raw_result != 0) + { + python::detail::decref_guard protect(raw_result); + instance_t* instance = (instance_t*)raw_result; + Derived::construct(&instance->storage, (PyObject*)instance, x)->install(raw_result); + (((PyVarObject*)(instance))->ob_size) = __builtin_offsetof (instance_t, storage); + protect.cancel(); + } + return raw_result; + } +}; +template +struct make_instance + : make_instance_impl > +{ + template + static inline PyTypeObject* get_class_object(U&) + { + return converter::registered::converters.get_class_object(); + } + static inline Holder* construct(void* storage, PyObject* instance, reference_wrapper x) + { + return new (storage) Holder(instance, x); + } +}; +}}} +namespace boost { namespace python { namespace objects { +template +struct make_ptr_instance + : make_instance_impl > +{ + template + static inline Holder* construct(void* storage, PyObject*, Arg& x) + { + return new (storage) Holder(x); + } + template + static inline PyTypeObject* get_class_object(Ptr const& x) + { + return get_class_object_impl(get_pointer(x)); + } + static inline PyTypeObject const* get_pytype() + { + return converter::registered::converters.get_class_object(); + } + private: + template + static inline PyTypeObject* get_class_object_impl(U const volatile* p) + { + if (p == 0) + return 0; + PyTypeObject* derived = get_derived_class_object( + typename is_polymorphic::type(), p); + if (derived) + return derived; + return converter::registered::converters.get_class_object(); + } + template + static inline PyTypeObject* get_derived_class_object(mpl::true_, U const volatile* x) + { + converter::registration const* r = converter::registry::query( + type_info(typeid(*get_pointer(x))) + ); + return r ? r->m_class_object : 0; + } + template + static inline PyTypeObject* get_derived_class_object(mpl::false_, U*) + { + return 0; + } +}; +}}} +namespace boost { namespace python { namespace detail { +template +struct cv_tag +{ + static const bool is_const = is_const_; + static const bool is_volatile = is_const_; +}; +typedef cv_tag cv_unqualified; +typedef cv_tag const_; +typedef cv_tag volatile_; +typedef cv_tag const_volatile_; +template +struct cv_category +{ + typedef cv_tag< + ::boost::is_const::value + , ::boost::is_volatile::value + > type; +}; +}}} +namespace boost { namespace mpl { +namespace aux { +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct and_impl + : false_ +{ +}; +template< typename T1, typename T2, typename T3, typename T4 > +struct and_impl< true,T1,T2,T3,T4 > + : and_impl< + ::boost::mpl::aux::nested_type_wknd::value + , T2, T3, T4 + , true_ + > +{ +}; +template<> +struct and_impl< + true + , true_, true_, true_, true_ + > + : true_ +{ +}; +} +template< + typename T1 = na + , typename T2 = na + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + : aux::and_impl< + ::boost::mpl::aux::nested_type_wknd::value + , T2, T3, T4, T5 + > +{ + +}; +template<> struct and_< + na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : and_< T1 , T2 > { }; }; template< typename Tag > struct lambda< and_< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef and_< na , na > result_; typedef and_< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< and_< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< and_< na , na > > : int_<-1> { }; } +}} +namespace boost { namespace detail { +namespace indirect_traits { +template +struct is_reference_to_const : mpl::false_ +{ +}; +template +struct is_reference_to_const : mpl::true_ +{ +}; +template +struct is_reference_to_function : mpl::false_ +{ +}; +template +struct is_reference_to_function : is_function +{ +}; +template +struct is_pointer_to_function : mpl::false_ +{ +}; +template +struct is_pointer_to_function : is_function +{ +}; +template +struct is_reference_to_member_function_pointer_impl : mpl::false_ +{ +}; +template +struct is_reference_to_member_function_pointer_impl + : is_member_function_pointer::type> +{ +}; +template +struct is_reference_to_member_function_pointer + : is_reference_to_member_function_pointer_impl +{ + +}; +template +struct is_reference_to_function_pointer_aux + : mpl::and_< + is_reference + , is_pointer_to_function< + typename remove_cv< + typename remove_reference::type + >::type + > + > +{ +}; +template +struct is_reference_to_function_pointer + : mpl::if_< + is_reference_to_function + , mpl::false_ + , is_reference_to_function_pointer_aux + >::type +{ +}; +template +struct is_reference_to_non_const + : mpl::and_< + is_reference + , mpl::not_< + is_reference_to_const + > + > +{ +}; +template +struct is_reference_to_volatile : mpl::false_ +{ +}; +template +struct is_reference_to_volatile : mpl::true_ +{ +}; +template +struct is_reference_to_pointer : mpl::false_ +{ +}; +template +struct is_reference_to_pointer : mpl::true_ +{ +}; +template +struct is_reference_to_pointer : mpl::true_ +{ +}; +template +struct is_reference_to_pointer : mpl::true_ +{ +}; +template +struct is_reference_to_pointer : mpl::true_ +{ +}; +template +struct is_reference_to_class + : mpl::and_< + is_reference + , is_class< + typename remove_cv< + typename remove_reference::type + >::type + > + > +{ + +}; +template +struct is_pointer_to_class + : mpl::and_< + is_pointer + , is_class< + typename remove_cv< + typename remove_pointer::type + >::type + > + > +{ + +}; +} +using namespace indirect_traits; +}} +namespace boost { namespace python { +namespace indirect_traits = boost::detail::indirect_traits; +}} +namespace boost { namespace python { namespace detail { +template +inline typename Generator::result_type +unwind_type(U const& p, Generator* = 0); +template +inline typename Generator::result_type +unwind_type(boost::type*p = 0, Generator* = 0); +template +inline typename Generator::result_type +unwind_type_cv(U* p, cv_unqualified, Generator* = 0) +{ + return Generator::execute(p); +} +template +inline typename Generator::result_type +unwind_type_cv(U const* p, const_, Generator* = 0) +{ + return unwind_type(const_cast(p), (Generator*)0); +} +template +inline typename Generator::result_type +unwind_type_cv(U volatile* p, volatile_, Generator* = 0) +{ + return unwind_type(const_cast(p), (Generator*)0); +} +template +inline typename Generator::result_type +unwind_type_cv(U const volatile* p, const_volatile_, Generator* = 0) +{ + return unwind_type(const_cast(p), (Generator*)0); +} +template +inline typename Generator::result_type +unwind_ptr_type(U* p, Generator* = 0) +{ + typedef typename cv_category::type tag; + return unwind_type_cv(p, tag()); +} +template +struct unwind_helper +{ + template + static typename Generator::result_type + execute(U p, Generator* = 0) + { + return unwind_ptr_type(p, (Generator*)0); + } +}; +template <> +struct unwind_helper +{ + template + static typename Generator::result_type + execute(U& p, Generator* = 0) + { + return unwind_ptr_type(&p, (Generator*)0); + } +}; +template +inline typename Generator::result_type +unwind_type(U const& p, Generator*) +{ + return unwind_helper::value>::execute(p, (Generator*)0); +} +enum { direct_ = 0, pointer_ = 1, reference_ = 2, reference_to_pointer_ = 3 }; +template struct unwind_helper2; +template <> +struct unwind_helper2 +{ + template + static typename Generator::result_type + execute(U(*)(), Generator* = 0) + { + return unwind_ptr_type((U*)0, (Generator*)0); + } +}; +template <> +struct unwind_helper2 +{ + template + static typename Generator::result_type + execute(U*(*)(), Generator* = 0) + { + return unwind_ptr_type((U*)0, (Generator*)0); + } +}; +template <> +struct unwind_helper2 +{ + template + static typename Generator::result_type + execute(U&(*)(), Generator* = 0) + { + return unwind_ptr_type((U*)0, (Generator*)0); + } +}; +template <> +struct unwind_helper2 +{ + template + static typename Generator::result_type + execute(U&(*)(), Generator* = 0) + { + return unwind_ptr_type(U(0), (Generator*)0); + } +}; +template +inline typename Generator::result_type +unwind_type(boost::type*, Generator*) +{ + static const int indirection = (boost::is_pointer::value ? pointer_ : 0) + (indirect_traits::is_reference_to_pointer::value ? reference_to_pointer_ : boost::is_reference::value ? reference_ : 0) + ; + return unwind_helper2::execute((U(*)())0,(Generator*)0); +} +}}} +namespace boost { namespace python { +namespace converter +{ +template +struct wrap_pytype +{ + static PyTypeObject const* get_pytype() + { + return python_type; + } +}; +typedef PyTypeObject const* (*pytype_function)(); +namespace detail +{ +struct unwind_type_id_helper{ + typedef python::type_info result_type; + template + static result_type execute(U* ){ + return python::type_id(); + } +}; +template +inline python::type_info unwind_type_id_(boost::type* = 0, mpl::false_ * =0) +{ + return boost::python::detail::unwind_type (); +} +inline python::type_info unwind_type_id_(boost::type* = 0, mpl::true_* =0) +{ + return type_id(); +} +template +inline python::type_info unwind_type_id(boost::type* p= 0) +{ + return unwind_type_id_(p, (mpl::bool_::value >*)0 ); +} +} +template +struct expected_pytype_for_arg +{ + static PyTypeObject const *get_pytype() + { + const converter::registration *r=converter::registry::query( + detail::unwind_type_id_((boost::type*)0, (mpl::bool_::value >*)0 ) + ); + return r ? r->expected_from_python_type(): 0; + } +}; +template +struct registered_pytype +{ + static PyTypeObject const *get_pytype() + { + const converter::registration *r=converter::registry::query( + detail::unwind_type_id_((boost::type*) 0, (mpl::bool_::value >*)0 ) + ); + return r ? r->m_class_object: 0; + } +}; +template +struct registered_pytype_direct +{ + static PyTypeObject const* get_pytype() + { + return registered::converters.m_class_object; + } +}; +template +struct expected_from_python_type : expected_pytype_for_arg{}; +template +struct expected_from_python_type_direct +{ + static PyTypeObject const* get_pytype() + { + return registered::converters.expected_from_python_type(); + } +}; +template +struct to_python_target_type +{ + static PyTypeObject const *get_pytype() + { + const converter::registration *r=converter::registry::query( + detail::unwind_type_id_((boost::type*)0, (mpl::bool_::value >*)0 ) + ); + return r ? r->to_python_target_type(): 0; + } +}; +template +struct to_python_target_type_direct +{ + static PyTypeObject const *get_pytype() + { + return registered::converters.to_python_target_type(); + } +}; +}}} +namespace boost { namespace python { +template +struct to_python_indirect +{ + template + inline PyObject* + operator()(U const& ref) const + { + return this->execute(const_cast(ref), is_pointer()); + } + inline PyTypeObject const* + get_pytype()const + { + return converter::registered_pytype::get_pytype(); + } + private: + template + inline PyObject* execute(U* ptr, mpl::true_) const + { + if (ptr == 0) + return python::detail::none(); + else + return this->execute(*ptr, mpl::false_()); + } + template + inline PyObject* execute(U const& x, mpl::false_) const + { + U* const p = &const_cast(x); + if (is_polymorphic::value) + { + if (PyObject* o = detail::wrapper_base_::owner(p)) + return incref(o); + } + return MakeHolder::execute(p); + } +}; +namespace detail +{ + struct make_owning_holder + { + template + static PyObject* execute(T* p) + { + typedef std::auto_ptr smart_pointer; + typedef objects::pointer_holder holder_t; + smart_pointer ptr(const_cast(p)); + return objects::make_ptr_instance::execute(ptr); + } + }; + struct make_reference_holder + { + template + static PyObject* execute(T* p) + { + typedef objects::pointer_holder holder_t; + T* q = const_cast(p); + return objects::make_ptr_instance::execute(q); + } + }; +} +}} +namespace boost { namespace python { namespace converter { +namespace detail +{ + template + struct pointer_typeid_select + { + template + static inline type_info execute(T*(*)() = 0) + { + return type_id(); + } + }; + template <> + struct pointer_typeid_select + { + template + static inline type_info execute(T* const volatile&(*)() = 0) + { + return type_id(); + } + template + static inline type_info execute(T*volatile&(*)() = 0) + { + return type_id(); + } + template + static inline type_info execute(T*const&(*)() = 0) + { + return type_id(); + } + template + static inline type_info execute(T*&(*)() = 0) + { + return type_id(); + } + }; +} +template +type_info pointer_type_id(T(*)() = 0) +{ + return detail::pointer_typeid_select< + is_reference::value + >::execute((T(*)())0); +} +}}} +namespace boost { namespace python { namespace converter { +struct registration; +template +struct registered_pointee + : registered< + typename remove_pointer< + typename remove_cv< + typename remove_reference::type + >::type + >::type + > +{ +}; +}}} +namespace boost { namespace python { namespace converter { +struct registration; +namespace detail +{ + struct arg_to_python_base + : handle<> + { + arg_to_python_base(void const volatile* source, registration const&); + }; +} +}}} +namespace boost { namespace python { namespace converter { +struct shared_ptr_deleter +{ + shared_ptr_deleter(handle<> owner); + ~shared_ptr_deleter(); + void operator()(void const*); + handle<> owner; +}; +}}} +namespace boost +{ +class bad_weak_ptr: public std::exception +{ +public: + virtual char const * what() const throw() + { + return "tr1::bad_weak_ptr"; + } +}; +} +namespace boost +{ +namespace detail +{ +inline int atomic_exchange_and_add( int * pw, int dv ) +{ + int r; + __asm__ __volatile__ + ( + "lock\n\t" + "xadd %1, %0": + "=m"( *pw ), "=r"( r ): + "m"( *pw ), "1"( dv ): + "memory", "cc" + ); + return r; +} +inline void atomic_increment( int * pw ) +{ + __asm__ + ( + "lock\n\t" + "incl %0": + "=m"( *pw ): + "m"( *pw ): + "cc" + ); +} +inline int atomic_conditional_increment( int * pw ) +{ + int rv, tmp; + __asm__ + ( + "movl %0, %%eax\n\t" + "0:\n\t" + "test %%eax, %%eax\n\t" + "je 1f\n\t" + "movl %%eax, %2\n\t" + "incl %2\n\t" + "lock\n\t" + "cmpxchgl %2, %0\n\t" + "jne 0b\n\t" + "1:": + "=m"( *pw ), "=&a"( rv ), "=&r"( tmp ): + "m"( *pw ): + "cc" + ); + return rv; +} +class sp_counted_base +{ +private: + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + int use_count_; + int weak_count_; +public: + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + virtual ~sp_counted_base() + { + } + virtual void dispose() = 0; + virtual void destroy() + { + delete this; + } + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + bool add_ref_lock() + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + void release() + { + if( atomic_exchange_and_add( &use_count_, -1 ) == 1 ) + { + dispose(); + weak_release(); + } + } + void weak_add_ref() + { + atomic_increment( &weak_count_ ); + } + void weak_release() + { + if( atomic_exchange_and_add( &weak_count_, -1 ) == 1 ) + { + destroy(); + } + } + long use_count() const + { + return static_cast( use_count_ ); + } +}; +} +} + +namespace boost +{ +namespace detail +{ +template class sp_counted_impl_p: public sp_counted_base +{ +private: + X * px_; + sp_counted_impl_p( sp_counted_impl_p const & ); + sp_counted_impl_p & operator= ( sp_counted_impl_p const & ); + typedef sp_counted_impl_p this_type; +public: + explicit sp_counted_impl_p( X * px ): px_( px ) + { + } + virtual void dispose() + { + boost::checked_delete( px_ ); + } + virtual void * get_deleter( detail::sp_typeinfo const & ) + { + return 0; + } +}; +template class sp_counted_impl_pd: public sp_counted_base +{ +private: + P ptr; + D del; + sp_counted_impl_pd( sp_counted_impl_pd const & ); + sp_counted_impl_pd & operator= ( sp_counted_impl_pd const & ); + typedef sp_counted_impl_pd this_type; +public: + sp_counted_impl_pd( P p, D d ): ptr(p), del(d) + { + } + virtual void dispose() + { + del( ptr ); + } + virtual void * get_deleter( detail::sp_typeinfo const & ti ) + { + return ti == typeid(D)? &reinterpret_cast( del ): 0; + } +}; +template class sp_counted_impl_pda: public sp_counted_base +{ +private: + P p_; + D d_; + A a_; + sp_counted_impl_pda( sp_counted_impl_pda const & ); + sp_counted_impl_pda & operator= ( sp_counted_impl_pda const & ); + typedef sp_counted_impl_pda this_type; +public: + sp_counted_impl_pda( P p, D d, A a ): p_( p ), d_( d ), a_( a ) + { + } + virtual void dispose() + { + d_( p_ ); + } + virtual void destroy() + { + typedef typename A::template rebind< this_type >::other A2; + A2 a2( a_ ); + this->~this_type(); + a2.deallocate( this, 1 ); + } + virtual void * get_deleter( detail::sp_typeinfo const & ti ) + { + return ti == typeid(D)? &reinterpret_cast( d_ ): 0; + } +}; +} +} +namespace boost +{ +namespace detail +{ +struct sp_nothrow_tag {}; +class weak_count; +class shared_count +{ +private: + sp_counted_base * pi_; + friend class weak_count; +public: + shared_count(): pi_(0) + { + } + template explicit shared_count( Y * p ): pi_( 0 ) + { + try + { + pi_ = new sp_counted_impl_p( p ); + } + catch(...) + { + boost::checked_delete( p ); + throw; + } + } + template shared_count( P p, D d ): pi_(0) + { + try + { + pi_ = new sp_counted_impl_pd(p, d); + } + catch(...) + { + d(p); + throw; + } + } + template shared_count( P p, D d, A a ): pi_( 0 ) + { + typedef sp_counted_impl_pda impl_type; + typedef typename A::template rebind< impl_type >::other A2; + A2 a2( a ); + try + { + pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); + new( static_cast< void* >( pi_ ) ) impl_type( p, d, a ); + } + catch(...) + { + d( p ); + if( pi_ != 0 ) + { + a2.deallocate( static_cast< impl_type* >( pi_ ), 1 ); + } + throw; + } + } + template + explicit shared_count( std::auto_ptr & r ): pi_( new sp_counted_impl_p( r.get() ) ) + { + r.release(); + } + ~shared_count() + { + if( pi_ != 0 ) pi_->release(); + } + shared_count(shared_count const & r): pi_(r.pi_) + { + if( pi_ != 0 ) pi_->add_ref_copy(); + } + explicit shared_count(weak_count const & r); + shared_count( weak_count const & r, sp_nothrow_tag ); + shared_count & operator= (shared_count const & r) + { + sp_counted_base * tmp = r.pi_; + if( tmp != pi_ ) + { + if( tmp != 0 ) tmp->add_ref_copy(); + if( pi_ != 0 ) pi_->release(); + pi_ = tmp; + } + return *this; + } + void swap(shared_count & r) + { + sp_counted_base * tmp = r.pi_; + r.pi_ = pi_; + pi_ = tmp; + } + long use_count() const + { + return pi_ != 0? pi_->use_count(): 0; + } + bool unique() const + { + return use_count() == 1; + } + bool empty() const + { + return pi_ == 0; + } + friend inline bool operator==(shared_count const & a, shared_count const & b) + { + return a.pi_ == b.pi_; + } + friend inline bool operator<(shared_count const & a, shared_count const & b) + { + return std::less()( a.pi_, b.pi_ ); + } + void * get_deleter( sp_typeinfo const & ti ) const + { + return pi_? pi_->get_deleter( ti ): 0; + } +}; +class weak_count +{ +private: + sp_counted_base * pi_; + friend class shared_count; +public: + weak_count(): pi_(0) + { + } + weak_count(shared_count const & r): pi_(r.pi_) + { + if(pi_ != 0) pi_->weak_add_ref(); + } + weak_count(weak_count const & r): pi_(r.pi_) + { + if(pi_ != 0) pi_->weak_add_ref(); + } + ~weak_count() + { + if(pi_ != 0) pi_->weak_release(); + } + weak_count & operator= (shared_count const & r) + { + sp_counted_base * tmp = r.pi_; + if( tmp != pi_ ) + { + if(tmp != 0) tmp->weak_add_ref(); + if(pi_ != 0) pi_->weak_release(); + pi_ = tmp; + } + return *this; + } + weak_count & operator= (weak_count const & r) + { + sp_counted_base * tmp = r.pi_; + if( tmp != pi_ ) + { + if(tmp != 0) tmp->weak_add_ref(); + if(pi_ != 0) pi_->weak_release(); + pi_ = tmp; + } + return *this; + } + void swap(weak_count & r) + { + sp_counted_base * tmp = r.pi_; + r.pi_ = pi_; + pi_ = tmp; + } + long use_count() const + { + return pi_ != 0? pi_->use_count(): 0; + } + bool empty() const + { + return pi_ == 0; + } + friend inline bool operator==(weak_count const & a, weak_count const & b) + { + return a.pi_ == b.pi_; + } + friend inline bool operator<(weak_count const & a, weak_count const & b) + { + return std::less()(a.pi_, b.pi_); + } +}; +inline shared_count::shared_count( weak_count const & r ): pi_( r.pi_ ) +{ + if( pi_ == 0 || !pi_->add_ref_lock() ) + { + boost::throw_exception( boost::bad_weak_ptr() ); + } +} +inline shared_count::shared_count( weak_count const & r, sp_nothrow_tag ): pi_( r.pi_ ) +{ + if( pi_ != 0 && !pi_->add_ref_lock() ) + { + pi_ = 0; + } +} +} +} +namespace boost +{ +namespace detail +{ +template< class Y, class T > struct sp_convertible +{ + typedef char (&yes) [1]; + typedef char (&no) [2]; + static yes f( T* ); + static no f( ... ); + enum _vt { value = sizeof( f( static_cast(0) ) ) == sizeof(yes) }; +}; +struct sp_empty +{ +}; +template< bool > struct sp_enable_if_convertible_impl; +template<> struct sp_enable_if_convertible_impl +{ + typedef sp_empty type; +}; +template<> struct sp_enable_if_convertible_impl +{ +}; +template< class Y, class T > struct sp_enable_if_convertible: public sp_enable_if_convertible_impl< sp_convertible< Y, T >::value > +{ +}; +} +} +namespace boost +{ +namespace detail +{ +inline void yield( unsigned k ) +{ + if( k < 4 ) + { + } + else if( k < 16 ) + { + __asm__ __volatile__( "rep; nop" : : : "memory" ); + } + else if( k < 32 || k & 1 ) + { + sched_yield(); + } + else + { + struct timespec rqtp = { 0, 0 }; + rqtp.tv_sec = 0; + rqtp.tv_nsec = 1000; + nanosleep( &rqtp, 0 ); + } +} +} +} +namespace boost +{ +namespace detail +{ +class spinlock +{ +public: + int v_; +public: + bool try_lock() + { + int r = __sync_lock_test_and_set( &v_, 1 ); + return r == 0; + } + void lock() + { + for( unsigned k = 0; !try_lock(); ++k ) + { + boost::detail::yield( k ); + } + } + void unlock() + { + __sync_lock_release( &v_ ); + } +public: + class scoped_lock + { + private: + spinlock & sp_; + scoped_lock( scoped_lock const & ); + scoped_lock & operator=( scoped_lock const & ); + public: + explicit scoped_lock( spinlock & sp ): sp_( sp ) + { + sp.lock(); + } + ~scoped_lock() + { + sp_.unlock(); + } + }; +}; +} +} + +namespace boost +{ +namespace detail +{ +template< int I > class spinlock_pool +{ +private: + static spinlock pool_[ 41 ]; +public: + static spinlock & spinlock_for( void const * pv ) + { + std::size_t i = reinterpret_cast< std::size_t >( pv ) % 41; + return pool_[ i ]; + } + class scoped_lock + { + private: + spinlock & sp_; + scoped_lock( scoped_lock const & ); + scoped_lock & operator=( scoped_lock const & ); + public: + explicit scoped_lock( void const * pv ): sp_( spinlock_for( pv ) ) + { + sp_.lock(); + } + ~scoped_lock() + { + sp_.unlock(); + } + }; +}; +template< int I > spinlock spinlock_pool< I >::pool_[ 41 ] = +{ + {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, + {0} +}; +} +} +namespace boost +{ +enum memory_order +{ + memory_order_relaxed = 0, + memory_order_acquire = 1, + memory_order_release = 2, + memory_order_acq_rel = 3, + memory_order_seq_cst = 7, + memory_order_consume = 8 +}; +} +namespace boost +{ +template class shared_ptr; +template class weak_ptr; +template class enable_shared_from_this; +template class enable_shared_from_this2; +namespace detail +{ +struct static_cast_tag {}; +struct const_cast_tag {}; +struct dynamic_cast_tag {}; +struct polymorphic_cast_tag {}; +template struct shared_ptr_traits +{ + typedef T & reference; +}; +template<> struct shared_ptr_traits +{ + typedef void reference; +}; +template<> struct shared_ptr_traits +{ + typedef void reference; +}; +template<> struct shared_ptr_traits +{ + typedef void reference; +}; +template<> struct shared_ptr_traits +{ + typedef void reference; +}; +template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr const * ppx, Y const * py, boost::enable_shared_from_this< T > const * pe ) +{ + if( pe != 0 ) + { + pe->_internal_accept_owner( ppx, const_cast< Y* >( py ) ); + } +} +template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr * ppx, Y const * py, boost::enable_shared_from_this2< T > const * pe ) +{ + if( pe != 0 ) + { + pe->_internal_accept_owner( ppx, const_cast< Y* >( py ) ); + } +} +inline void sp_enable_shared_from_this( ... ) +{ +} +template< class T, class R > struct sp_enable_if_auto_ptr +{ +}; +template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R > +{ + typedef R type; +}; +} +template class shared_ptr +{ +private: + typedef shared_ptr this_type; +public: + typedef T element_type; + typedef T value_type; + typedef T * pointer; + typedef typename boost::detail::shared_ptr_traits::reference reference; + shared_ptr(): px(0), pn() + { + } + template + explicit shared_ptr( Y * p ): px( p ), pn( p ) + { + boost::detail::sp_enable_shared_from_this( this, p, p ); + } + template shared_ptr(Y * p, D d): px(p), pn(p, d) + { + boost::detail::sp_enable_shared_from_this( this, p, p ); + } + template shared_ptr( Y * p, D d, A a ): px( p ), pn( p, d, a ) + { + boost::detail::sp_enable_shared_from_this( this, p, p ); + } + template + explicit shared_ptr(weak_ptr const & r): pn(r.pn) + { + px = r.px; + } + template + shared_ptr( weak_ptr const & r, boost::detail::sp_nothrow_tag ): px( 0 ), pn( r.pn, boost::detail::sp_nothrow_tag() ) + { + if( !pn.empty() ) + { + px = r.px; + } + } + template + shared_ptr( shared_ptr const & r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) + : px( r.px ), pn( r.pn ) + { + } + template< class Y > + shared_ptr( shared_ptr const & r, T * p ): px( p ), pn( r.pn ) + { + } + template + shared_ptr(shared_ptr const & r, boost::detail::static_cast_tag): px(static_cast(r.px)), pn(r.pn) + { + } + template + shared_ptr(shared_ptr const & r, boost::detail::const_cast_tag): px(const_cast(r.px)), pn(r.pn) + { + } + template + shared_ptr(shared_ptr const & r, boost::detail::dynamic_cast_tag): px(dynamic_cast(r.px)), pn(r.pn) + { + if(px == 0) + { + pn = boost::detail::shared_count(); + } + } + template + shared_ptr(shared_ptr const & r, boost::detail::polymorphic_cast_tag): px(dynamic_cast(r.px)), pn(r.pn) + { + if(px == 0) + { + boost::throw_exception(std::bad_cast()); + } + } + template + explicit shared_ptr(std::auto_ptr & r): px(r.get()), pn() + { + Y * tmp = r.get(); + pn = boost::detail::shared_count(r); + boost::detail::sp_enable_shared_from_this( this, tmp, tmp ); + } + template + explicit shared_ptr( Ap r, typename boost::detail::sp_enable_if_auto_ptr::type = 0 ): px( r.get() ), pn() + { + typename Ap::element_type * tmp = r.get(); + pn = boost::detail::shared_count( r ); + boost::detail::sp_enable_shared_from_this( this, tmp, tmp ); + } + shared_ptr & operator=( shared_ptr const & r ) + { + this_type(r).swap(*this); + return *this; + } + template + shared_ptr & operator=(shared_ptr const & r) + { + this_type(r).swap(*this); + return *this; + } + template + shared_ptr & operator=( std::auto_ptr & r ) + { + this_type(r).swap(*this); + return *this; + } + template + typename boost::detail::sp_enable_if_auto_ptr< Ap, shared_ptr & >::type operator=( Ap r ) + { + this_type( r ).swap( *this ); + return *this; + } + void reset() + { + this_type().swap(*this); + } + template void reset(Y * p) + { + (static_cast (0)); + this_type(p).swap(*this); + } + template void reset( Y * p, D d ) + { + this_type( p, d ).swap( *this ); + } + template void reset( Y * p, D d, A a ) + { + this_type( p, d, a ).swap( *this ); + } + template void reset( shared_ptr const & r, T * p ) + { + this_type( r, p ).swap( *this ); + } + reference operator* () const + { + (static_cast (0)); + return *px; + } + T * operator-> () const + { + (static_cast (0)); + return px; + } + T * get() const + { + return px; + } + typedef T * this_type::*unspecified_bool_type; + operator unspecified_bool_type() const + { + return px == 0? 0: &this_type::px; + } + bool operator! () const + { + return px == 0; + } + bool unique() const + { + return pn.unique(); + } + long use_count() const + { + return pn.use_count(); + } + void swap(shared_ptr & other) + { + std::swap(px, other.px); + pn.swap(other.pn); + } + template bool _internal_less(shared_ptr const & rhs) const + { + return pn < rhs.pn; + } + void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const + { + return pn.get_deleter( ti ); + } + bool _internal_equiv( shared_ptr const & r ) const + { + return px == r.px && pn == r.pn; + } +private: + template friend class shared_ptr; + template friend class weak_ptr; + T * px; + boost::detail::shared_count pn; +}; +template inline bool operator==(shared_ptr const & a, shared_ptr const & b) +{ + return a.get() == b.get(); +} +template inline bool operator!=(shared_ptr const & a, shared_ptr const & b) +{ + return a.get() != b.get(); +} +template inline bool operator<(shared_ptr const & a, shared_ptr const & b) +{ + return a._internal_less(b); +} +template inline void swap(shared_ptr & a, shared_ptr & b) +{ + a.swap(b); +} +template shared_ptr static_pointer_cast(shared_ptr const & r) +{ + return shared_ptr(r, boost::detail::static_cast_tag()); +} +template shared_ptr const_pointer_cast(shared_ptr const & r) +{ + return shared_ptr(r, boost::detail::const_cast_tag()); +} +template shared_ptr dynamic_pointer_cast(shared_ptr const & r) +{ + return shared_ptr(r, boost::detail::dynamic_cast_tag()); +} +template shared_ptr shared_static_cast(shared_ptr const & r) +{ + return shared_ptr(r, boost::detail::static_cast_tag()); +} +template shared_ptr shared_dynamic_cast(shared_ptr const & r) +{ + return shared_ptr(r, boost::detail::dynamic_cast_tag()); +} +template shared_ptr shared_polymorphic_cast(shared_ptr const & r) +{ + return shared_ptr(r, boost::detail::polymorphic_cast_tag()); +} +template shared_ptr shared_polymorphic_downcast(shared_ptr const & r) +{ + (static_cast (0)); + return shared_static_cast(r); +} +template inline T * get_pointer(shared_ptr const & p) +{ + return p.get(); +} +template std::basic_ostream & operator<< (std::basic_ostream & os, shared_ptr const & p) +{ + os << p.get(); + return os; +} +template D * get_deleter(shared_ptr const & p) +{ + return static_cast(p._internal_get_deleter(typeid(D))); +} +template inline bool atomic_is_lock_free( shared_ptr const * ) +{ + return false; +} +template shared_ptr atomic_load( shared_ptr const * p ) +{ + boost::detail::spinlock_pool<2>::scoped_lock lock( p ); + return *p; +} +template inline shared_ptr atomic_load_explicit( shared_ptr const * p, memory_order ) +{ + return atomic_load( p ); +} +template void atomic_store( shared_ptr * p, shared_ptr r ) +{ + boost::detail::spinlock_pool<2>::scoped_lock lock( p ); + p->swap( r ); +} +template inline void atomic_store_explicit( shared_ptr * p, shared_ptr r, memory_order ) +{ + atomic_store( p, r ); +} +template shared_ptr atomic_exchange( shared_ptr * p, shared_ptr r ) +{ + boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p ); + sp.lock(); + p->swap( r ); + sp.unlock(); + return r; +} +template shared_ptr atomic_exchange_explicit( shared_ptr * p, shared_ptr r, memory_order ) +{ + return atomic_exchange( p, r ); +} +template bool atomic_compare_exchange( shared_ptr * p, shared_ptr * v, shared_ptr w ) +{ + boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p ); + sp.lock(); + if( p->_internal_equiv( *v ) ) + { + p->swap( w ); + sp.unlock(); + return true; + } + else + { + shared_ptr tmp( *p ); + sp.unlock(); + tmp.swap( *v ); + return false; + } +} +template inline bool atomic_compare_exchange_explicit( shared_ptr * p, shared_ptr * v, shared_ptr w, memory_order , memory_order ) +{ + return atomic_compare_exchange( p, v, w ); +} +} +namespace boost { namespace python { namespace converter { +template +PyObject* shared_ptr_to_python(shared_ptr const& x) +{ + if (!x) + return python::detail::none(); + else if (shared_ptr_deleter* d = boost::get_deleter(x)) + return incref( get_pointer( d->owner ) ); + else + return converter::registered const&>::converters.to_python(&x); +} +}}} +namespace boost { namespace python { +typedef Py_ssize_t ssize_t; +ssize_t const ssize_t_max = ((Py_ssize_t)(((size_t)-1)>>1)); +ssize_t const ssize_t_min = (-((Py_ssize_t)(((size_t)-1)>>1))-1); +}} +namespace boost { namespace mpl { +template< + typename T = na + > +struct identity +{ + typedef T type; + +}; +template< + typename T = na + > +struct make_identity +{ + typedef identity type; + +}; +template<> struct identity< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : identity< T1 > { }; }; template< typename Tag > struct lambda< identity< na > , Tag , int_<-1> > { typedef false_ is_le; typedef identity< na > result_; typedef identity< na > type; }; namespace aux { template< typename T1 > struct template_arity< identity< T1 > > : int_<1> { }; template<> struct template_arity< identity< na > > : int_<-1> { }; } +template<> struct make_identity< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : make_identity< T1 > { }; }; template< typename Tag > struct lambda< make_identity< na > , Tag , int_<-1> > { typedef false_ is_le; typedef make_identity< na > result_; typedef make_identity< na > type; }; namespace aux { template< typename T1 > struct template_arity< make_identity< T1 > > : int_<1> { }; template<> struct template_arity< make_identity< na > > : int_<-1> { }; } +}} +namespace boost { +template +inline T implicit_cast (typename mpl::identity::type x) { + return x; +} +} + + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + _Tp __cmath_power(_Tp, unsigned int); + template + inline _Tp + __pow_helper(_Tp __x, int __n) + { + return __n < 0 + ? _Tp(1)/__cmath_power(__x, -__n) + : __cmath_power(__x, __n); + } + inline double + abs(double __x) + { return __builtin_fabs(__x); } + inline float + abs(float __x) + { return __builtin_fabsf(__x); } + inline long double + abs(long double __x) + { return __builtin_fabsl(__x); } + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + abs(_Tp __x) + { return __builtin_fabs(__x); } + using ::acos; + inline float + acos(float __x) + { return __builtin_acosf(__x); } + inline long double + acos(long double __x) + { return __builtin_acosl(__x); } + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + acos(_Tp __x) + { return __builtin_acos(__x); } + using ::asin; + inline float + asin(float __x) + { return __builtin_asinf(__x); } + inline long double + asin(long double __x) + { return __builtin_asinl(__x); } + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + asin(_Tp __x) + { return __builtin_asin(__x); } + using ::atan; + inline float + atan(float __x) + { return __builtin_atanf(__x); } + inline long double + atan(long double __x) + { return __builtin_atanl(__x); } + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + atan(_Tp __x) + { return __builtin_atan(__x); } + using ::atan2; + inline float + atan2(float __y, float __x) + { return __builtin_atan2f(__y, __x); } + inline long double + atan2(long double __y, long double __x) + { return __builtin_atan2l(__y, __x); } + template + inline + typename __gnu_cxx::__promote_2< + typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value + && __is_arithmetic<_Up>::__value, + _Tp>::__type, _Up>::__type + atan2(_Tp __y, _Up __x) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return atan2(__type(__y), __type(__x)); + } + using ::ceil; + inline float + ceil(float __x) + { return __builtin_ceilf(__x); } + inline long double + ceil(long double __x) + { return __builtin_ceill(__x); } + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + ceil(_Tp __x) + { return __builtin_ceil(__x); } + using ::cos; + inline float + cos(float __x) + { return __builtin_cosf(__x); } + inline long double + cos(long double __x) + { return __builtin_cosl(__x); } + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + cos(_Tp __x) + { return __builtin_cos(__x); } + using ::cosh; + inline float + cosh(float __x) + { return __builtin_coshf(__x); } + inline long double + cosh(long double __x) + { return __builtin_coshl(__x); } + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + cosh(_Tp __x) + { return __builtin_cosh(__x); } + using ::exp; + inline float + exp(float __x) + { return __builtin_expf(__x); } + inline long double + exp(long double __x) + { return __builtin_expl(__x); } + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + exp(_Tp __x) + { return __builtin_exp(__x); } + using ::fabs; + inline float + fabs(float __x) + { return __builtin_fabsf(__x); } + inline long double + fabs(long double __x) + { return __builtin_fabsl(__x); } + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + fabs(_Tp __x) + { return __builtin_fabs(__x); } + using ::floor; + inline float + floor(float __x) + { return __builtin_floorf(__x); } + inline long double + floor(long double __x) + { return __builtin_floorl(__x); } + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + floor(_Tp __x) + { return __builtin_floor(__x); } + using ::fmod; + inline float + fmod(float __x, float __y) + { return __builtin_fmodf(__x, __y); } + inline long double + fmod(long double __x, long double __y) + { return __builtin_fmodl(__x, __y); } + using ::frexp; + inline float + frexp(float __x, int* __exp) + { return __builtin_frexpf(__x, __exp); } + inline long double + frexp(long double __x, int* __exp) + { return __builtin_frexpl(__x, __exp); } + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + frexp(_Tp __x, int* __exp) + { return __builtin_frexp(__x, __exp); } + using ::ldexp; + inline float + ldexp(float __x, int __exp) + { return __builtin_ldexpf(__x, __exp); } + inline long double + ldexp(long double __x, int __exp) + { return __builtin_ldexpl(__x, __exp); } + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + ldexp(_Tp __x, int __exp) + { return __builtin_ldexp(__x, __exp); } + using ::log; + inline float + log(float __x) + { return __builtin_logf(__x); } + inline long double + log(long double __x) + { return __builtin_logl(__x); } + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + log(_Tp __x) + { return __builtin_log(__x); } + using ::log10; + inline float + log10(float __x) + { return __builtin_log10f(__x); } + inline long double + log10(long double __x) + { return __builtin_log10l(__x); } + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + log10(_Tp __x) + { return __builtin_log10(__x); } + using ::modf; + inline float + modf(float __x, float* __iptr) + { return __builtin_modff(__x, __iptr); } + inline long double + modf(long double __x, long double* __iptr) + { return __builtin_modfl(__x, __iptr); } + using ::pow; + inline float + pow(float __x, float __y) + { return __builtin_powf(__x, __y); } + inline long double + pow(long double __x, long double __y) + { return __builtin_powl(__x, __y); } + inline double + pow(double __x, int __i) + { return __builtin_powi(__x, __i); } + inline float + pow(float __x, int __n) + { return __builtin_powif(__x, __n); } + inline long double + pow(long double __x, int __n) + { return __builtin_powil(__x, __n); } + template + inline + typename __gnu_cxx::__promote_2< + typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value + && __is_arithmetic<_Up>::__value, + _Tp>::__type, _Up>::__type + pow(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return pow(__type(__x), __type(__y)); + } + using ::sin; + inline float + sin(float __x) + { return __builtin_sinf(__x); } + inline long double + sin(long double __x) + { return __builtin_sinl(__x); } + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + sin(_Tp __x) + { return __builtin_sin(__x); } + using ::sinh; + inline float + sinh(float __x) + { return __builtin_sinhf(__x); } + inline long double + sinh(long double __x) + { return __builtin_sinhl(__x); } + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + sinh(_Tp __x) + { return __builtin_sinh(__x); } + using ::sqrt; + inline float + sqrt(float __x) + { return __builtin_sqrtf(__x); } + inline long double + sqrt(long double __x) + { return __builtin_sqrtl(__x); } + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + sqrt(_Tp __x) + { return __builtin_sqrt(__x); } + using ::tan; + inline float + tan(float __x) + { return __builtin_tanf(__x); } + inline long double + tan(long double __x) + { return __builtin_tanl(__x); } + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + tan(_Tp __x) + { return __builtin_tan(__x); } + using ::tanh; + inline float + tanh(float __x) + { return __builtin_tanhf(__x); } + inline long double + tanh(long double __x) + { return __builtin_tanhl(__x); } + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + tanh(_Tp __x) + { return __builtin_tanh(__x); } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + fpclassify(_Tp __f) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, + FP_SUBNORMAL, FP_ZERO, __type(__f)); + } + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + isfinite(_Tp __f) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_isfinite(__type(__f)); + } + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + isinf(_Tp __f) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_isinf(__type(__f)); + } + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + isnan(_Tp __f) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_isnan(__type(__f)); + } + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + isnormal(_Tp __f) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_isnormal(__type(__f)); + } + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + signbit(_Tp __f) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_signbit(__type(__f)); + } + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + isgreater(_Tp __f1, _Tp __f2) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_isgreater(__type(__f1), __type(__f2)); + } + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + isgreaterequal(_Tp __f1, _Tp __f2) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_isgreaterequal(__type(__f1), __type(__f2)); + } + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + isless(_Tp __f1, _Tp __f2) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_isless(__type(__f1), __type(__f2)); + } + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + islessequal(_Tp __f1, _Tp __f2) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_islessequal(__type(__f1), __type(__f2)); + } + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + islessgreater(_Tp __f1, _Tp __f2) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_islessgreater(__type(__f1), __type(__f2)); + } + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + isunordered(_Tp __f1, _Tp __f2) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_isunordered(__type(__f1), __type(__f2)); + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + inline _Tp + __cmath_power(_Tp __x, unsigned int __n) + { + _Tp __y = __n % 2 ? __x : _Tp(1); + while (__n >>= 1) + { + __x = __x * __x; + if (__n % 2) + __y = __y * __x; + } + return __y; + } +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + class basic_stringbuf : public basic_streambuf<_CharT, _Traits> + { + public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef _Alloc allocator_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + typedef basic_streambuf __streambuf_type; + typedef basic_string __string_type; + typedef typename __string_type::size_type __size_type; + protected: + ios_base::openmode _M_mode; + __string_type _M_string; + public: + explicit + basic_stringbuf(ios_base::openmode __mode = ios_base::in | ios_base::out) + : __streambuf_type(), _M_mode(__mode), _M_string() + { } + explicit + basic_stringbuf(const __string_type& __str, + ios_base::openmode __mode = ios_base::in | ios_base::out) + : __streambuf_type(), _M_mode(), _M_string(__str.data(), __str.size()) + { _M_stringbuf_init(__mode); } + __string_type + str() const + { + __string_type __ret; + if (this->pptr()) + { + if (this->pptr() > this->egptr()) + __ret = __string_type(this->pbase(), this->pptr()); + else + __ret = __string_type(this->pbase(), this->egptr()); + } + else + __ret = _M_string; + return __ret; + } + void + str(const __string_type& __s) + { + _M_string.assign(__s.data(), __s.size()); + _M_stringbuf_init(_M_mode); + } + protected: + void + _M_stringbuf_init(ios_base::openmode __mode) + { + _M_mode = __mode; + __size_type __len = 0; + if (_M_mode & (ios_base::ate | ios_base::app)) + __len = _M_string.size(); + _M_sync(const_cast(_M_string.data()), 0, __len); + } + virtual streamsize + showmanyc() + { + streamsize __ret = -1; + if (_M_mode & ios_base::in) + { + _M_update_egptr(); + __ret = this->egptr() - this->gptr(); + } + return __ret; + } + virtual int_type + underflow(); + virtual int_type + pbackfail(int_type __c = traits_type::eof()); + virtual int_type + overflow(int_type __c = traits_type::eof()); + virtual __streambuf_type* + setbuf(char_type* __s, streamsize __n) + { + if (__s && __n >= 0) + { + _M_string.clear(); + _M_sync(__s, __n, 0); + } + return this; + } + virtual pos_type + seekoff(off_type __off, ios_base::seekdir __way, + ios_base::openmode __mode = ios_base::in | ios_base::out); + virtual pos_type + seekpos(pos_type __sp, + ios_base::openmode __mode = ios_base::in | ios_base::out); + void + _M_sync(char_type* __base, __size_type __i, __size_type __o); + void + _M_update_egptr() + { + const bool __testin = _M_mode & ios_base::in; + if (this->pptr() && this->pptr() > this->egptr()) + { + if (__testin) + this->setg(this->eback(), this->gptr(), this->pptr()); + else + this->setg(this->pptr(), this->pptr(), this->pptr()); + } + } + }; + template + class basic_istringstream : public basic_istream<_CharT, _Traits> + { + public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef _Alloc allocator_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; + typedef basic_istream __istream_type; + private: + __stringbuf_type _M_stringbuf; + public: + explicit + basic_istringstream(ios_base::openmode __mode = ios_base::in) + : __istream_type(), _M_stringbuf(__mode | ios_base::in) + { this->init(&_M_stringbuf); } + explicit + basic_istringstream(const __string_type& __str, + ios_base::openmode __mode = ios_base::in) + : __istream_type(), _M_stringbuf(__str, __mode | ios_base::in) + { this->init(&_M_stringbuf); } + ~basic_istringstream() + { } + __stringbuf_type* + rdbuf() const + { return const_cast<__stringbuf_type*>(&_M_stringbuf); } + __string_type + str() const + { return _M_stringbuf.str(); } + void + str(const __string_type& __s) + { _M_stringbuf.str(__s); } + }; + template + class basic_ostringstream : public basic_ostream<_CharT, _Traits> + { + public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef _Alloc allocator_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; + typedef basic_ostream __ostream_type; + private: + __stringbuf_type _M_stringbuf; + public: + explicit + basic_ostringstream(ios_base::openmode __mode = ios_base::out) + : __ostream_type(), _M_stringbuf(__mode | ios_base::out) + { this->init(&_M_stringbuf); } + explicit + basic_ostringstream(const __string_type& __str, + ios_base::openmode __mode = ios_base::out) + : __ostream_type(), _M_stringbuf(__str, __mode | ios_base::out) + { this->init(&_M_stringbuf); } + ~basic_ostringstream() + { } + __stringbuf_type* + rdbuf() const + { return const_cast<__stringbuf_type*>(&_M_stringbuf); } + __string_type + str() const + { return _M_stringbuf.str(); } + void + str(const __string_type& __s) + { _M_stringbuf.str(__s); } + }; + template + class basic_stringstream : public basic_iostream<_CharT, _Traits> + { + public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef _Alloc allocator_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; + typedef basic_iostream __iostream_type; + private: + __stringbuf_type _M_stringbuf; + public: + explicit + basic_stringstream(ios_base::openmode __m = ios_base::out | ios_base::in) + : __iostream_type(), _M_stringbuf(__m) + { this->init(&_M_stringbuf); } + explicit + basic_stringstream(const __string_type& __str, + ios_base::openmode __m = ios_base::out | ios_base::in) + : __iostream_type(), _M_stringbuf(__str, __m) + { this->init(&_M_stringbuf); } + ~basic_stringstream() + { } + __stringbuf_type* + rdbuf() const + { return const_cast<__stringbuf_type*>(&_M_stringbuf); } + __string_type + str() const + { return _M_stringbuf.str(); } + void + str(const __string_type& __s) + { _M_stringbuf.str(__s); } + }; +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type + basic_stringbuf<_CharT, _Traits, _Alloc>:: + pbackfail(int_type __c) + { + int_type __ret = traits_type::eof(); + if (this->eback() < this->gptr()) + { + const bool __testeof = traits_type::eq_int_type(__c, __ret); + if (!__testeof) + { + const bool __testeq = traits_type::eq(traits_type:: + to_char_type(__c), + this->gptr()[-1]); + const bool __testout = this->_M_mode & ios_base::out; + if (__testeq || __testout) + { + this->gbump(-1); + if (!__testeq) + *this->gptr() = traits_type::to_char_type(__c); + __ret = __c; + } + } + else + { + this->gbump(-1); + __ret = traits_type::not_eof(__c); + } + } + return __ret; + } + template + typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type + basic_stringbuf<_CharT, _Traits, _Alloc>:: + overflow(int_type __c) + { + const bool __testout = this->_M_mode & ios_base::out; + if (__builtin_expect(!__testout, false)) + return traits_type::eof(); + const bool __testeof = traits_type::eq_int_type(__c, traits_type::eof()); + if (__builtin_expect(__testeof, false)) + return traits_type::not_eof(__c); + const __size_type __capacity = _M_string.capacity(); + const __size_type __max_size = _M_string.max_size(); + const bool __testput = this->pptr() < this->epptr(); + if (__builtin_expect(!__testput && __capacity == __max_size, false)) + return traits_type::eof(); + const char_type __conv = traits_type::to_char_type(__c); + if (!__testput) + { + const __size_type __opt_len = std::max(__size_type(2 * __capacity), + __size_type(512)); + const __size_type __len = std::min(__opt_len, __max_size); + __string_type __tmp; + __tmp.reserve(__len); + if (this->pbase()) + __tmp.assign(this->pbase(), this->epptr() - this->pbase()); + __tmp.push_back(__conv); + _M_string.swap(__tmp); + _M_sync(const_cast(_M_string.data()), + this->gptr() - this->eback(), this->pptr() - this->pbase()); + } + else + *this->pptr() = __conv; + this->pbump(1); + return __c; + } + template + typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type + basic_stringbuf<_CharT, _Traits, _Alloc>:: + underflow() + { + int_type __ret = traits_type::eof(); + const bool __testin = this->_M_mode & ios_base::in; + if (__testin) + { + _M_update_egptr(); + if (this->gptr() < this->egptr()) + __ret = traits_type::to_int_type(*this->gptr()); + } + return __ret; + } + template + typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type + basic_stringbuf<_CharT, _Traits, _Alloc>:: + seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode) + { + pos_type __ret = pos_type(off_type(-1)); + bool __testin = (ios_base::in & this->_M_mode & __mode) != 0; + bool __testout = (ios_base::out & this->_M_mode & __mode) != 0; + const bool __testboth = __testin && __testout && __way != ios_base::cur; + __testin &= !(__mode & ios_base::out); + __testout &= !(__mode & ios_base::in); + const char_type* __beg = __testin ? this->eback() : this->pbase(); + if ((__beg || !__off) && (__testin || __testout || __testboth)) + { + _M_update_egptr(); + off_type __newoffi = __off; + off_type __newoffo = __newoffi; + if (__way == ios_base::cur) + { + __newoffi += this->gptr() - __beg; + __newoffo += this->pptr() - __beg; + } + else if (__way == ios_base::end) + __newoffo = __newoffi += this->egptr() - __beg; + if ((__testin || __testboth) + && __newoffi >= 0 + && this->egptr() - __beg >= __newoffi) + { + this->gbump((__beg + __newoffi) - this->gptr()); + __ret = pos_type(__newoffi); + } + if ((__testout || __testboth) + && __newoffo >= 0 + && this->egptr() - __beg >= __newoffo) + { + this->pbump((__beg + __newoffo) - this->pptr()); + __ret = pos_type(__newoffo); + } + } + return __ret; + } + template + typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type + basic_stringbuf<_CharT, _Traits, _Alloc>:: + seekpos(pos_type __sp, ios_base::openmode __mode) + { + pos_type __ret = pos_type(off_type(-1)); + const bool __testin = (ios_base::in & this->_M_mode & __mode) != 0; + const bool __testout = (ios_base::out & this->_M_mode & __mode) != 0; + const char_type* __beg = __testin ? this->eback() : this->pbase(); + if ((__beg || !off_type(__sp)) && (__testin || __testout)) + { + _M_update_egptr(); + const off_type __pos(__sp); + const bool __testpos = (0 <= __pos + && __pos <= this->egptr() - __beg); + if (__testpos) + { + if (__testin) + this->gbump((__beg + __pos) - this->gptr()); + if (__testout) + this->pbump((__beg + __pos) - this->pptr()); + __ret = __sp; + } + } + return __ret; + } + template + void + basic_stringbuf<_CharT, _Traits, _Alloc>:: + _M_sync(char_type* __base, __size_type __i, __size_type __o) + { + const bool __testin = _M_mode & ios_base::in; + const bool __testout = _M_mode & ios_base::out; + char_type* __endg = __base + _M_string.size(); + char_type* __endp = __base + _M_string.capacity(); + if (__base != _M_string.data()) + { + __endg += __i; + __i = 0; + __endp = __endg; + } + if (__testin) + this->setg(__base, __base + __i, __endg); + if (__testout) + { + this->setp(__base, __endp); + this->pbump(__o); + if (!__testin) + this->setg(__endg, __endg, __endg); + } + } + extern template class basic_stringbuf; + extern template class basic_istringstream; + extern template class basic_ostringstream; + extern template class basic_stringstream; + extern template class basic_stringbuf; + extern template class basic_istringstream; + extern template class basic_ostringstream; + extern template class basic_stringstream; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template class complex; + template<> class complex; + template<> class complex; + template<> class complex; + template _Tp abs(const complex<_Tp>&); + template _Tp arg(const complex<_Tp>&); + template _Tp norm(const complex<_Tp>&); + template complex<_Tp> conj(const complex<_Tp>&); + template complex<_Tp> polar(const _Tp&, const _Tp& = 0); + template complex<_Tp> cos(const complex<_Tp>&); + template complex<_Tp> cosh(const complex<_Tp>&); + template complex<_Tp> exp(const complex<_Tp>&); + template complex<_Tp> log(const complex<_Tp>&); + template complex<_Tp> log10(const complex<_Tp>&); + template complex<_Tp> pow(const complex<_Tp>&, int); + template complex<_Tp> pow(const complex<_Tp>&, const _Tp&); + template complex<_Tp> pow(const complex<_Tp>&, + const complex<_Tp>&); + template complex<_Tp> pow(const _Tp&, const complex<_Tp>&); + template complex<_Tp> sin(const complex<_Tp>&); + template complex<_Tp> sinh(const complex<_Tp>&); + template complex<_Tp> sqrt(const complex<_Tp>&); + template complex<_Tp> tan(const complex<_Tp>&); + template complex<_Tp> tanh(const complex<_Tp>&); + template + struct complex + { + typedef _Tp value_type; + complex(const _Tp& __r = _Tp(), const _Tp& __i = _Tp()) + : _M_real(__r), _M_imag(__i) { } + template + complex(const complex<_Up>& __z) + : _M_real(__z.real()), _M_imag(__z.imag()) { } + _Tp& real() + { return _M_real; } + const _Tp& real() const + { return _M_real; } + _Tp& imag() + { return _M_imag; } + const _Tp& imag() const + { return _M_imag; } + void real(_Tp __val) + { _M_real = __val; } + void imag(_Tp __val) + { _M_imag = __val; } + complex<_Tp>& operator=(const _Tp&); + complex<_Tp>& + operator+=(const _Tp& __t) + { + _M_real += __t; + return *this; + } + complex<_Tp>& + operator-=(const _Tp& __t) + { + _M_real -= __t; + return *this; + } + complex<_Tp>& operator*=(const _Tp&); + complex<_Tp>& operator/=(const _Tp&); + template + complex<_Tp>& operator=(const complex<_Up>&); + template + complex<_Tp>& operator+=(const complex<_Up>&); + template + complex<_Tp>& operator-=(const complex<_Up>&); + template + complex<_Tp>& operator*=(const complex<_Up>&); + template + complex<_Tp>& operator/=(const complex<_Up>&); + const complex& __rep() const + { return *this; } + private: + _Tp _M_real; + _Tp _M_imag; + }; + template + complex<_Tp>& + complex<_Tp>::operator=(const _Tp& __t) + { + _M_real = __t; + _M_imag = _Tp(); + return *this; + } + template + complex<_Tp>& + complex<_Tp>::operator*=(const _Tp& __t) + { + _M_real *= __t; + _M_imag *= __t; + return *this; + } + template + complex<_Tp>& + complex<_Tp>::operator/=(const _Tp& __t) + { + _M_real /= __t; + _M_imag /= __t; + return *this; + } + template + template + complex<_Tp>& + complex<_Tp>::operator=(const complex<_Up>& __z) + { + _M_real = __z.real(); + _M_imag = __z.imag(); + return *this; + } + template + template + complex<_Tp>& + complex<_Tp>::operator+=(const complex<_Up>& __z) + { + _M_real += __z.real(); + _M_imag += __z.imag(); + return *this; + } + template + template + complex<_Tp>& + complex<_Tp>::operator-=(const complex<_Up>& __z) + { + _M_real -= __z.real(); + _M_imag -= __z.imag(); + return *this; + } + template + template + complex<_Tp>& + complex<_Tp>::operator*=(const complex<_Up>& __z) + { + const _Tp __r = _M_real * __z.real() - _M_imag * __z.imag(); + _M_imag = _M_real * __z.imag() + _M_imag * __z.real(); + _M_real = __r; + return *this; + } + template + template + complex<_Tp>& + complex<_Tp>::operator/=(const complex<_Up>& __z) + { + const _Tp __r = _M_real * __z.real() + _M_imag * __z.imag(); + const _Tp __n = std::norm(__z); + _M_imag = (_M_imag * __z.real() - _M_real * __z.imag()) / __n; + _M_real = __r / __n; + return *this; + } + template + inline complex<_Tp> + operator+(const complex<_Tp>& __x, const complex<_Tp>& __y) + { + complex<_Tp> __r = __x; + __r += __y; + return __r; + } + template + inline complex<_Tp> + operator+(const complex<_Tp>& __x, const _Tp& __y) + { + complex<_Tp> __r = __x; + __r += __y; + return __r; + } + template + inline complex<_Tp> + operator+(const _Tp& __x, const complex<_Tp>& __y) + { + complex<_Tp> __r = __y; + __r += __x; + return __r; + } + template + inline complex<_Tp> + operator-(const complex<_Tp>& __x, const complex<_Tp>& __y) + { + complex<_Tp> __r = __x; + __r -= __y; + return __r; + } + template + inline complex<_Tp> + operator-(const complex<_Tp>& __x, const _Tp& __y) + { + complex<_Tp> __r = __x; + __r -= __y; + return __r; + } + template + inline complex<_Tp> + operator-(const _Tp& __x, const complex<_Tp>& __y) + { + complex<_Tp> __r(__x, -__y.imag()); + __r -= __y.real(); + return __r; + } + template + inline complex<_Tp> + operator*(const complex<_Tp>& __x, const complex<_Tp>& __y) + { + complex<_Tp> __r = __x; + __r *= __y; + return __r; + } + template + inline complex<_Tp> + operator*(const complex<_Tp>& __x, const _Tp& __y) + { + complex<_Tp> __r = __x; + __r *= __y; + return __r; + } + template + inline complex<_Tp> + operator*(const _Tp& __x, const complex<_Tp>& __y) + { + complex<_Tp> __r = __y; + __r *= __x; + return __r; + } + template + inline complex<_Tp> + operator/(const complex<_Tp>& __x, const complex<_Tp>& __y) + { + complex<_Tp> __r = __x; + __r /= __y; + return __r; + } + template + inline complex<_Tp> + operator/(const complex<_Tp>& __x, const _Tp& __y) + { + complex<_Tp> __r = __x; + __r /= __y; + return __r; + } + template + inline complex<_Tp> + operator/(const _Tp& __x, const complex<_Tp>& __y) + { + complex<_Tp> __r = __x; + __r /= __y; + return __r; + } + template + inline complex<_Tp> + operator+(const complex<_Tp>& __x) + { return __x; } + template + inline complex<_Tp> + operator-(const complex<_Tp>& __x) + { return complex<_Tp>(-__x.real(), -__x.imag()); } + template + inline bool + operator==(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return __x.real() == __y.real() && __x.imag() == __y.imag(); } + template + inline bool + operator==(const complex<_Tp>& __x, const _Tp& __y) + { return __x.real() == __y && __x.imag() == _Tp(); } + template + inline bool + operator==(const _Tp& __x, const complex<_Tp>& __y) + { return __x == __y.real() && _Tp() == __y.imag(); } + template + inline bool + operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return __x.real() != __y.real() || __x.imag() != __y.imag(); } + template + inline bool + operator!=(const complex<_Tp>& __x, const _Tp& __y) + { return __x.real() != __y || __x.imag() != _Tp(); } + template + inline bool + operator!=(const _Tp& __x, const complex<_Tp>& __y) + { return __x != __y.real() || _Tp() != __y.imag(); } + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) + { + _Tp __re_x, __im_x; + _CharT __ch; + __is >> __ch; + if (__ch == '(') + { + __is >> __re_x >> __ch; + if (__ch == ',') + { + __is >> __im_x >> __ch; + if (__ch == ')') + __x = complex<_Tp>(__re_x, __im_x); + else + __is.setstate(ios_base::failbit); + } + else if (__ch == ')') + __x = __re_x; + else + __is.setstate(ios_base::failbit); + } + else + { + __is.putback(__ch); + __is >> __re_x; + __x = __re_x; + } + return __is; + } + template + basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x) + { + basic_ostringstream<_CharT, _Traits> __s; + __s.flags(__os.flags()); + __s.imbue(__os.getloc()); + __s.precision(__os.precision()); + __s << '(' << __x.real() << ',' << __x.imag() << ')'; + return __os << __s.str(); + } + template + inline _Tp& + real(complex<_Tp>& __z) + { return __z.real(); } + template + inline const _Tp& + real(const complex<_Tp>& __z) + { return __z.real(); } + template + inline _Tp& + imag(complex<_Tp>& __z) + { return __z.imag(); } + template + inline const _Tp& + imag(const complex<_Tp>& __z) + { return __z.imag(); } + template + inline _Tp + __complex_abs(const complex<_Tp>& __z) + { + _Tp __x = __z.real(); + _Tp __y = __z.imag(); + const _Tp __s = std::max(abs(__x), abs(__y)); + if (__s == _Tp()) + return __s; + __x /= __s; + __y /= __s; + return __s * sqrt(__x * __x + __y * __y); + } + inline float + __complex_abs(__complex__ float __z) { return __builtin_cabsf(__z); } + inline double + __complex_abs(__complex__ double __z) { return __builtin_cabs(__z); } + inline long double + __complex_abs(const __complex__ long double& __z) + { return __builtin_cabsl(__z); } + template + inline _Tp + abs(const complex<_Tp>& __z) { return __complex_abs(__z.__rep()); } + template + inline _Tp + __complex_arg(const complex<_Tp>& __z) + { return atan2(__z.imag(), __z.real()); } + inline float + __complex_arg(__complex__ float __z) { return __builtin_cargf(__z); } + inline double + __complex_arg(__complex__ double __z) { return __builtin_carg(__z); } + inline long double + __complex_arg(const __complex__ long double& __z) + { return __builtin_cargl(__z); } + template + inline _Tp + arg(const complex<_Tp>& __z) { return __complex_arg(__z.__rep()); } + template + struct _Norm_helper + { + template + static inline _Tp _S_do_it(const complex<_Tp>& __z) + { + const _Tp __x = __z.real(); + const _Tp __y = __z.imag(); + return __x * __x + __y * __y; + } + }; + template<> + struct _Norm_helper + { + template + static inline _Tp _S_do_it(const complex<_Tp>& __z) + { + _Tp __res = std::abs(__z); + return __res * __res; + } + }; + template + inline _Tp + norm(const complex<_Tp>& __z) + { + return _Norm_helper<__is_floating<_Tp>::__value + && !0>::_S_do_it(__z); + } + template + inline complex<_Tp> + polar(const _Tp& __rho, const _Tp& __theta) + { return complex<_Tp>(__rho * cos(__theta), __rho * sin(__theta)); } + template + inline complex<_Tp> + conj(const complex<_Tp>& __z) + { return complex<_Tp>(__z.real(), -__z.imag()); } + template + inline complex<_Tp> + __complex_cos(const complex<_Tp>& __z) + { + const _Tp __x = __z.real(); + const _Tp __y = __z.imag(); + return complex<_Tp>(cos(__x) * cosh(__y), -sin(__x) * sinh(__y)); + } + inline __complex__ float + __complex_cos(__complex__ float __z) { return __builtin_ccosf(__z); } + inline __complex__ double + __complex_cos(__complex__ double __z) { return __builtin_ccos(__z); } + inline __complex__ long double + __complex_cos(const __complex__ long double& __z) + { return __builtin_ccosl(__z); } + template + inline complex<_Tp> + cos(const complex<_Tp>& __z) { return __complex_cos(__z.__rep()); } + template + inline complex<_Tp> + __complex_cosh(const complex<_Tp>& __z) + { + const _Tp __x = __z.real(); + const _Tp __y = __z.imag(); + return complex<_Tp>(cosh(__x) * cos(__y), sinh(__x) * sin(__y)); + } + inline __complex__ float + __complex_cosh(__complex__ float __z) { return __builtin_ccoshf(__z); } + inline __complex__ double + __complex_cosh(__complex__ double __z) { return __builtin_ccosh(__z); } + inline __complex__ long double + __complex_cosh(const __complex__ long double& __z) + { return __builtin_ccoshl(__z); } + template + inline complex<_Tp> + cosh(const complex<_Tp>& __z) { return __complex_cosh(__z.__rep()); } + template + inline complex<_Tp> + __complex_exp(const complex<_Tp>& __z) + { return std::polar(exp(__z.real()), __z.imag()); } + inline __complex__ float + __complex_exp(__complex__ float __z) { return __builtin_cexpf(__z); } + inline __complex__ double + __complex_exp(__complex__ double __z) { return __builtin_cexp(__z); } + inline __complex__ long double + __complex_exp(const __complex__ long double& __z) + { return __builtin_cexpl(__z); } + template + inline complex<_Tp> + exp(const complex<_Tp>& __z) { return __complex_exp(__z.__rep()); } + template + inline complex<_Tp> + __complex_log(const complex<_Tp>& __z) + { return complex<_Tp>(log(std::abs(__z)), std::arg(__z)); } + inline __complex__ float + __complex_log(__complex__ float __z) { return __builtin_clogf(__z); } + inline __complex__ double + __complex_log(__complex__ double __z) { return __builtin_clog(__z); } + inline __complex__ long double + __complex_log(const __complex__ long double& __z) + { return __builtin_clogl(__z); } + template + inline complex<_Tp> + log(const complex<_Tp>& __z) { return __complex_log(__z.__rep()); } + template + inline complex<_Tp> + log10(const complex<_Tp>& __z) + { return std::log(__z) / log(_Tp(10.0)); } + template + inline complex<_Tp> + __complex_sin(const complex<_Tp>& __z) + { + const _Tp __x = __z.real(); + const _Tp __y = __z.imag(); + return complex<_Tp>(sin(__x) * cosh(__y), cos(__x) * sinh(__y)); + } + inline __complex__ float + __complex_sin(__complex__ float __z) { return __builtin_csinf(__z); } + inline __complex__ double + __complex_sin(__complex__ double __z) { return __builtin_csin(__z); } + inline __complex__ long double + __complex_sin(const __complex__ long double& __z) + { return __builtin_csinl(__z); } + template + inline complex<_Tp> + sin(const complex<_Tp>& __z) { return __complex_sin(__z.__rep()); } + template + inline complex<_Tp> + __complex_sinh(const complex<_Tp>& __z) + { + const _Tp __x = __z.real(); + const _Tp __y = __z.imag(); + return complex<_Tp>(sinh(__x) * cos(__y), cosh(__x) * sin(__y)); + } + inline __complex__ float + __complex_sinh(__complex__ float __z) { return __builtin_csinhf(__z); } + inline __complex__ double + __complex_sinh(__complex__ double __z) { return __builtin_csinh(__z); } + inline __complex__ long double + __complex_sinh(const __complex__ long double& __z) + { return __builtin_csinhl(__z); } + template + inline complex<_Tp> + sinh(const complex<_Tp>& __z) { return __complex_sinh(__z.__rep()); } + template + complex<_Tp> + __complex_sqrt(const complex<_Tp>& __z) + { + _Tp __x = __z.real(); + _Tp __y = __z.imag(); + if (__x == _Tp()) + { + _Tp __t = sqrt(abs(__y) / 2); + return complex<_Tp>(__t, __y < _Tp() ? -__t : __t); + } + else + { + _Tp __t = sqrt(2 * (std::abs(__z) + abs(__x))); + _Tp __u = __t / 2; + return __x > _Tp() + ? complex<_Tp>(__u, __y / __t) + : complex<_Tp>(abs(__y) / __t, __y < _Tp() ? -__u : __u); + } + } + inline __complex__ float + __complex_sqrt(__complex__ float __z) { return __builtin_csqrtf(__z); } + inline __complex__ double + __complex_sqrt(__complex__ double __z) { return __builtin_csqrt(__z); } + inline __complex__ long double + __complex_sqrt(const __complex__ long double& __z) + { return __builtin_csqrtl(__z); } + template + inline complex<_Tp> + sqrt(const complex<_Tp>& __z) { return __complex_sqrt(__z.__rep()); } + template + inline complex<_Tp> + __complex_tan(const complex<_Tp>& __z) + { return std::sin(__z) / std::cos(__z); } + inline __complex__ float + __complex_tan(__complex__ float __z) { return __builtin_ctanf(__z); } + inline __complex__ double + __complex_tan(__complex__ double __z) { return __builtin_ctan(__z); } + inline __complex__ long double + __complex_tan(const __complex__ long double& __z) + { return __builtin_ctanl(__z); } + template + inline complex<_Tp> + tan(const complex<_Tp>& __z) { return __complex_tan(__z.__rep()); } + template + inline complex<_Tp> + __complex_tanh(const complex<_Tp>& __z) + { return std::sinh(__z) / std::cosh(__z); } + inline __complex__ float + __complex_tanh(__complex__ float __z) { return __builtin_ctanhf(__z); } + inline __complex__ double + __complex_tanh(__complex__ double __z) { return __builtin_ctanh(__z); } + inline __complex__ long double + __complex_tanh(const __complex__ long double& __z) + { return __builtin_ctanhl(__z); } + template + inline complex<_Tp> + tanh(const complex<_Tp>& __z) { return __complex_tanh(__z.__rep()); } + template + inline complex<_Tp> + pow(const complex<_Tp>& __z, int __n) + { return std::__pow_helper(__z, __n); } + template + complex<_Tp> + pow(const complex<_Tp>& __x, const _Tp& __y) + { + if (__x.imag() == _Tp() && __x.real() > _Tp()) + return pow(__x.real(), __y); + complex<_Tp> __t = std::log(__x); + return std::polar(exp(__y * __t.real()), __y * __t.imag()); + } + template + inline complex<_Tp> + __complex_pow(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return __x == _Tp() ? _Tp() : std::exp(__y * std::log(__x)); } + inline __complex__ float + __complex_pow(__complex__ float __x, __complex__ float __y) + { return __builtin_cpowf(__x, __y); } + inline __complex__ double + __complex_pow(__complex__ double __x, __complex__ double __y) + { return __builtin_cpow(__x, __y); } + inline __complex__ long double + __complex_pow(const __complex__ long double& __x, + const __complex__ long double& __y) + { return __builtin_cpowl(__x, __y); } + template + inline complex<_Tp> + pow(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return __complex_pow(__x.__rep(), __y.__rep()); } + template + inline complex<_Tp> + pow(const _Tp& __x, const complex<_Tp>& __y) + { + return __x > _Tp() ? std::polar(pow(__x, __y.real()), + __y.imag() * log(__x)) + : std::pow(complex<_Tp>(__x), __y); + } + template<> + struct complex + { + typedef float value_type; + typedef __complex__ float _ComplexT; + complex(_ComplexT __z) : _M_value(__z) { } + complex(float __r = 0.0f, float __i = 0.0f) + { + __real__ _M_value = __r; + __imag__ _M_value = __i; + } + explicit complex(const complex&); + explicit complex(const complex&); + float& real() + { return __real__ _M_value; } + const float& real() const + { return __real__ _M_value; } + float& imag() + { return __imag__ _M_value; } + const float& imag() const + { return __imag__ _M_value; } + void real(float __val) + { __real__ _M_value = __val; } + void imag(float __val) + { __imag__ _M_value = __val; } + complex& + operator=(float __f) + { + __real__ _M_value = __f; + __imag__ _M_value = 0.0f; + return *this; + } + complex& + operator+=(float __f) + { + __real__ _M_value += __f; + return *this; + } + complex& + operator-=(float __f) + { + __real__ _M_value -= __f; + return *this; + } + complex& + operator*=(float __f) + { + _M_value *= __f; + return *this; + } + complex& + operator/=(float __f) + { + _M_value /= __f; + return *this; + } + template + complex& + operator=(const complex<_Tp>& __z) + { + __real__ _M_value = __z.real(); + __imag__ _M_value = __z.imag(); + return *this; + } + template + complex& + operator+=(const complex<_Tp>& __z) + { + __real__ _M_value += __z.real(); + __imag__ _M_value += __z.imag(); + return *this; + } + template + complex& + operator-=(const complex<_Tp>& __z) + { + __real__ _M_value -= __z.real(); + __imag__ _M_value -= __z.imag(); + return *this; + } + template + complex& + operator*=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value *= __t; + return *this; + } + template + complex& + operator/=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value /= __t; + return *this; + } + const _ComplexT& __rep() const { return _M_value; } + private: + _ComplexT _M_value; + }; + template<> + struct complex + { + typedef double value_type; + typedef __complex__ double _ComplexT; + complex(_ComplexT __z) : _M_value(__z) { } + complex(double __r = 0.0, double __i = 0.0) + { + __real__ _M_value = __r; + __imag__ _M_value = __i; + } + complex(const complex& __z) + : _M_value(__z.__rep()) { } + explicit complex(const complex&); + double& real() + { return __real__ _M_value; } + const double& real() const + { return __real__ _M_value; } + double& imag() + { return __imag__ _M_value; } + const double& imag() const + { return __imag__ _M_value; } + void real(double __val) + { __real__ _M_value = __val; } + void imag(double __val) + { __imag__ _M_value = __val; } + complex& + operator=(double __d) + { + __real__ _M_value = __d; + __imag__ _M_value = 0.0; + return *this; + } + complex& + operator+=(double __d) + { + __real__ _M_value += __d; + return *this; + } + complex& + operator-=(double __d) + { + __real__ _M_value -= __d; + return *this; + } + complex& + operator*=(double __d) + { + _M_value *= __d; + return *this; + } + complex& + operator/=(double __d) + { + _M_value /= __d; + return *this; + } + template + complex& + operator=(const complex<_Tp>& __z) + { + __real__ _M_value = __z.real(); + __imag__ _M_value = __z.imag(); + return *this; + } + template + complex& + operator+=(const complex<_Tp>& __z) + { + __real__ _M_value += __z.real(); + __imag__ _M_value += __z.imag(); + return *this; + } + template + complex& + operator-=(const complex<_Tp>& __z) + { + __real__ _M_value -= __z.real(); + __imag__ _M_value -= __z.imag(); + return *this; + } + template + complex& + operator*=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value *= __t; + return *this; + } + template + complex& + operator/=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value /= __t; + return *this; + } + const _ComplexT& __rep() const { return _M_value; } + private: + _ComplexT _M_value; + }; + template<> + struct complex + { + typedef long double value_type; + typedef __complex__ long double _ComplexT; + complex(_ComplexT __z) : _M_value(__z) { } + complex(long double __r = 0.0L, long double __i = 0.0L) + { + __real__ _M_value = __r; + __imag__ _M_value = __i; + } + complex(const complex& __z) + : _M_value(__z.__rep()) { } + complex(const complex& __z) + : _M_value(__z.__rep()) { } + long double& real() + { return __real__ _M_value; } + const long double& real() const + { return __real__ _M_value; } + long double& imag() + { return __imag__ _M_value; } + const long double& imag() const + { return __imag__ _M_value; } + void real(long double __val) + { __real__ _M_value = __val; } + void imag(long double __val) + { __imag__ _M_value = __val; } + complex& + operator=(long double __r) + { + __real__ _M_value = __r; + __imag__ _M_value = 0.0L; + return *this; + } + complex& + operator+=(long double __r) + { + __real__ _M_value += __r; + return *this; + } + complex& + operator-=(long double __r) + { + __real__ _M_value -= __r; + return *this; + } + complex& + operator*=(long double __r) + { + _M_value *= __r; + return *this; + } + complex& + operator/=(long double __r) + { + _M_value /= __r; + return *this; + } + template + complex& + operator=(const complex<_Tp>& __z) + { + __real__ _M_value = __z.real(); + __imag__ _M_value = __z.imag(); + return *this; + } + template + complex& + operator+=(const complex<_Tp>& __z) + { + __real__ _M_value += __z.real(); + __imag__ _M_value += __z.imag(); + return *this; + } + template + complex& + operator-=(const complex<_Tp>& __z) + { + __real__ _M_value -= __z.real(); + __imag__ _M_value -= __z.imag(); + return *this; + } + template + complex& + operator*=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value *= __t; + return *this; + } + template + complex& + operator/=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value /= __t; + return *this; + } + const _ComplexT& __rep() const { return _M_value; } + private: + _ComplexT _M_value; + }; + inline + complex::complex(const complex& __z) + : _M_value(__z.__rep()) { } + inline + complex::complex(const complex& __z) + : _M_value(__z.__rep()) { } + inline + complex::complex(const complex& __z) + : _M_value(__z.__rep()) { } + extern template istream& operator>>(istream&, complex&); + extern template ostream& operator<<(ostream&, const complex&); + extern template istream& operator>>(istream&, complex&); + extern template ostream& operator<<(ostream&, const complex&); + extern template istream& operator>>(istream&, complex&); + extern template ostream& operator<<(ostream&, const complex&); + extern template wistream& operator>>(wistream&, complex&); + extern template wostream& operator<<(wostream&, const complex&); + extern template wistream& operator>>(wistream&, complex&); + extern template wostream& operator<<(wostream&, const complex&); + extern template wistream& operator>>(wistream&, complex&); + extern template wostream& operator<<(wostream&, const complex&); +} +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + template + struct __promote_2, _Up> + { + public: + typedef std::complex::__type> __type; + }; + template + struct __promote_2<_Tp, std::complex<_Up> > + { + public: + typedef std::complex::__type> __type; + }; + template + struct __promote_2, std::complex<_Up> > + { + public: + typedef std::complex::__type> __type; + }; +} +namespace boost { namespace python { +namespace converter +{ + template struct arg_to_python; + PyObject* do_return_to_python(char); + PyObject* do_return_to_python(char const*); + PyObject* do_return_to_python(PyObject*); + PyObject* do_arg_to_python(PyObject*); +} +template struct to_python_value; +namespace detail +{ + struct builtin_to_python + { + static const bool uses_registry = false; + }; +} +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(bool const& x) const { return (::PyBool_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyBool_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(bool const& x) const { return (::PyBool_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyBool_Type); } }; namespace converter { template <> struct arg_to_python< bool > : handle<> { arg_to_python(bool const& x) : python::handle<>(::PyBool_FromLong(x)) {} }; } +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(signed char const& x) const { return (::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(signed char const& x) const { return (::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; namespace converter { template <> struct arg_to_python< signed char > : handle<> { arg_to_python(signed char const& x) : python::handle<>(::PyInt_FromLong(x)) {} }; } template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(unsigned char const& x) const { return (static_cast(x) > static_cast( (std::numeric_limits::max)()) ? ::PyLong_FromUnsignedLong(x) : ::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(unsigned char const& x) const { return (static_cast(x) > static_cast( (std::numeric_limits::max)()) ? ::PyLong_FromUnsignedLong(x) : ::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; namespace converter { template <> struct arg_to_python< unsigned char > : handle<> { arg_to_python(unsigned char const& x) : python::handle<>(static_cast(x) > static_cast( (std::numeric_limits::max)()) ? ::PyLong_FromUnsignedLong(x) : ::PyInt_FromLong(x)) {} }; } +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(signed short const& x) const { return (::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(signed short const& x) const { return (::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; namespace converter { template <> struct arg_to_python< signed short > : handle<> { arg_to_python(signed short const& x) : python::handle<>(::PyInt_FromLong(x)) {} }; } template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(unsigned short const& x) const { return (static_cast(x) > static_cast( (std::numeric_limits::max)()) ? ::PyLong_FromUnsignedLong(x) : ::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(unsigned short const& x) const { return (static_cast(x) > static_cast( (std::numeric_limits::max)()) ? ::PyLong_FromUnsignedLong(x) : ::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; namespace converter { template <> struct arg_to_python< unsigned short > : handle<> { arg_to_python(unsigned short const& x) : python::handle<>(static_cast(x) > static_cast( (std::numeric_limits::max)()) ? ::PyLong_FromUnsignedLong(x) : ::PyInt_FromLong(x)) {} }; } +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(signed int const& x) const { return (::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(signed int const& x) const { return (::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; namespace converter { template <> struct arg_to_python< signed int > : handle<> { arg_to_python(signed int const& x) : python::handle<>(::PyInt_FromLong(x)) {} }; } template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(unsigned int const& x) const { return (static_cast(x) > static_cast( (std::numeric_limits::max)()) ? ::PyLong_FromUnsignedLong(x) : ::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(unsigned int const& x) const { return (static_cast(x) > static_cast( (std::numeric_limits::max)()) ? ::PyLong_FromUnsignedLong(x) : ::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; namespace converter { template <> struct arg_to_python< unsigned int > : handle<> { arg_to_python(unsigned int const& x) : python::handle<>(static_cast(x) > static_cast( (std::numeric_limits::max)()) ? ::PyLong_FromUnsignedLong(x) : ::PyInt_FromLong(x)) {} }; } +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(signed long const& x) const { return (::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(signed long const& x) const { return (::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; namespace converter { template <> struct arg_to_python< signed long > : handle<> { arg_to_python(signed long const& x) : python::handle<>(::PyInt_FromLong(x)) {} }; } template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(unsigned long const& x) const { return (static_cast(x) > static_cast( (std::numeric_limits::max)()) ? ::PyLong_FromUnsignedLong(x) : ::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(unsigned long const& x) const { return (static_cast(x) > static_cast( (std::numeric_limits::max)()) ? ::PyLong_FromUnsignedLong(x) : ::PyInt_FromLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyInt_Type); } }; namespace converter { template <> struct arg_to_python< unsigned long > : handle<> { arg_to_python(unsigned long const& x) : python::handle<>(static_cast(x) > static_cast( (std::numeric_limits::max)()) ? ::PyLong_FromUnsignedLong(x) : ::PyInt_FromLong(x)) {} }; } +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(signed long long const& x) const { return (::PyLong_FromLongLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyLong_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(signed long long const& x) const { return (::PyLong_FromLongLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyLong_Type); } }; namespace converter { template <> struct arg_to_python< signed long long > : handle<> { arg_to_python(signed long long const& x) : python::handle<>(::PyLong_FromLongLong(x)) {} }; } +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(unsigned long long const& x) const { return (::PyLong_FromUnsignedLongLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyLong_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(unsigned long long const& x) const { return (::PyLong_FromUnsignedLongLong(x)); } inline PyTypeObject const* get_pytype() const { return (&PyLong_Type); } }; namespace converter { template <> struct arg_to_python< unsigned long long > : handle<> { arg_to_python(unsigned long long const& x) : python::handle<>(::PyLong_FromUnsignedLongLong(x)) {} }; } +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(char const& x) const { return (converter::do_return_to_python(x)); } inline PyTypeObject const* get_pytype() const { return (&PyString_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(char const& x) const { return (converter::do_return_to_python(x)); } inline PyTypeObject const* get_pytype() const { return (&PyString_Type); } }; namespace converter { template <> struct arg_to_python< char > : handle<> { arg_to_python(char const& x) : python::handle<>(converter::do_return_to_python(x)) {} }; } +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(char const* const& x) const { return (converter::do_return_to_python(x)); } inline PyTypeObject const* get_pytype() const { return (&PyString_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(char const* const& x) const { return (converter::do_return_to_python(x)); } inline PyTypeObject const* get_pytype() const { return (&PyString_Type); } }; namespace converter { template <> struct arg_to_python< char const* > : handle<> { arg_to_python(char const* const& x) : python::handle<>(converter::do_return_to_python(x)) {} }; } +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(std::string const& x) const { return (::PyString_FromStringAndSize(x.data(),implicit_cast(x.size()))); } inline PyTypeObject const* get_pytype() const { return (&PyString_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(std::string const& x) const { return (::PyString_FromStringAndSize(x.data(),implicit_cast(x.size()))); } inline PyTypeObject const* get_pytype() const { return (&PyString_Type); } }; namespace converter { template <> struct arg_to_python< std::string > : handle<> { arg_to_python(std::string const& x) : python::handle<>(::PyString_FromStringAndSize(x.data(),implicit_cast(x.size()))) {} }; } +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(std::wstring const& x) const { return (::PyUnicodeUCS4_FromWideChar(x.data(),implicit_cast(x.size()))); } inline PyTypeObject const* get_pytype() const { return (&PyUnicode_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(std::wstring const& x) const { return (::PyUnicodeUCS4_FromWideChar(x.data(),implicit_cast(x.size()))); } inline PyTypeObject const* get_pytype() const { return (&PyUnicode_Type); } }; namespace converter { template <> struct arg_to_python< std::wstring > : handle<> { arg_to_python(std::wstring const& x) : python::handle<>(::PyUnicodeUCS4_FromWideChar(x.data(),implicit_cast(x.size()))) {} }; } +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(float const& x) const { return (::PyFloat_FromDouble(x)); } inline PyTypeObject const* get_pytype() const { return (&PyFloat_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(float const& x) const { return (::PyFloat_FromDouble(x)); } inline PyTypeObject const* get_pytype() const { return (&PyFloat_Type); } }; namespace converter { template <> struct arg_to_python< float > : handle<> { arg_to_python(float const& x) : python::handle<>(::PyFloat_FromDouble(x)) {} }; } +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(double const& x) const { return (::PyFloat_FromDouble(x)); } inline PyTypeObject const* get_pytype() const { return (&PyFloat_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(double const& x) const { return (::PyFloat_FromDouble(x)); } inline PyTypeObject const* get_pytype() const { return (&PyFloat_Type); } }; namespace converter { template <> struct arg_to_python< double > : handle<> { arg_to_python(double const& x) : python::handle<>(::PyFloat_FromDouble(x)) {} }; } +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(long double const& x) const { return (::PyFloat_FromDouble(x)); } inline PyTypeObject const* get_pytype() const { return (&PyFloat_Type); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(long double const& x) const { return (::PyFloat_FromDouble(x)); } inline PyTypeObject const* get_pytype() const { return (&PyFloat_Type); } }; namespace converter { template <> struct arg_to_python< long double > : handle<> { arg_to_python(long double const& x) : python::handle<>(::PyFloat_FromDouble(x)) {} }; } +template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(PyObject* const& x) const { return (converter::do_return_to_python(x)); } inline PyTypeObject const* get_pytype() const { return (0); } }; template <> struct to_python_value : detail::builtin_to_python { inline PyObject* operator()(PyObject* const& x) const { return (converter::do_return_to_python(x)); } inline PyTypeObject const* get_pytype() const { return (0); } }; +template <> struct to_python_value&> : detail::builtin_to_python { inline PyObject* operator()(std::complex const& x) const { return (::PyComplex_FromDoubles(x.real(), x.imag())); } inline PyTypeObject const* get_pytype() const { return (&PyComplex_Type); } }; template <> struct to_python_value const&> : detail::builtin_to_python { inline PyObject* operator()(std::complex const& x) const { return (::PyComplex_FromDoubles(x.real(), x.imag())); } inline PyTypeObject const* get_pytype() const { return (&PyComplex_Type); } }; namespace converter { template <> struct arg_to_python< std::complex > : handle<> { arg_to_python(std::complex const& x) : python::handle<>(::PyComplex_FromDoubles(x.real(), x.imag())) {} }; } +template <> struct to_python_value&> : detail::builtin_to_python { inline PyObject* operator()(std::complex const& x) const { return (::PyComplex_FromDoubles(x.real(), x.imag())); } inline PyTypeObject const* get_pytype() const { return (&PyComplex_Type); } }; template <> struct to_python_value const&> : detail::builtin_to_python { inline PyObject* operator()(std::complex const& x) const { return (::PyComplex_FromDoubles(x.real(), x.imag())); } inline PyTypeObject const* get_pytype() const { return (&PyComplex_Type); } }; namespace converter { template <> struct arg_to_python< std::complex > : handle<> { arg_to_python(std::complex const& x) : python::handle<>(::PyComplex_FromDoubles(x.real(), x.imag())) {} }; } +template <> struct to_python_value&> : detail::builtin_to_python { inline PyObject* operator()(std::complex const& x) const { return (::PyComplex_FromDoubles(x.real(), x.imag())); } inline PyTypeObject const* get_pytype() const { return (&PyComplex_Type); } }; template <> struct to_python_value const&> : detail::builtin_to_python { inline PyObject* operator()(std::complex const& x) const { return (::PyComplex_FromDoubles(x.real(), x.imag())); } inline PyTypeObject const* get_pytype() const { return (&PyComplex_Type); } }; namespace converter { template <> struct arg_to_python< std::complex > : handle<> { arg_to_python(std::complex const& x) : python::handle<>(::PyComplex_FromDoubles(x.real(), x.imag())) {} }; } +namespace converter +{ + void initialize_builtin_converters(); +} +}} +namespace boost { namespace python { namespace converter { + PyObject* checked_downcast_impl(PyObject*, PyTypeObject*); +template +struct pyobject_type +{ + static bool check(PyObject* x) + { + return ::PyObject_IsInstance(x, (PyObject*)pytype); + } + static Object* checked_downcast(PyObject* x) + { + return python::downcast( + (checked_downcast_impl)(x, pytype) + ); + } + static PyTypeObject const* get_pytype() { return pytype; } +}; +}}} +namespace boost { namespace python { namespace converter { +template struct pyobject_traits; +template <> +struct pyobject_traits +{ + static bool check(PyObject*) { return true; } + static PyObject* checked_downcast(PyObject* x) { return x; } + static PyTypeObject const* get_pytype() { return 0; } +}; +template <> struct pyobject_traits : pyobject_type {}; +template <> struct pyobject_traits : pyobject_type {}; +template <> struct pyobject_traits : pyobject_type {}; +template <> struct pyobject_traits : pyobject_type {}; +template <> struct pyobject_traits : pyobject_type {}; +template <> struct pyobject_traits : pyobject_type {}; +}}} +namespace boost { namespace python +{ + namespace api + { + class object; + } +}} +namespace boost { namespace python { namespace converter { +template +struct handle_object_manager_traits + : pyobject_traits +{ + private: + typedef pyobject_traits base; + public: + static const bool is_specialized = true; + static null_ok* adopt(PyObject* p) + { + return python::allow_null(base::checked_downcast(p)); + } +}; +template +struct default_object_manager_traits +{ + static const bool is_specialized = python::detail::is_borrowed_ptr::value + ; +}; +template +struct object_manager_traits + : mpl::if_c< + is_handle::value + , handle_object_manager_traits + , default_object_manager_traits + >::type +{ +}; +template +struct is_object_manager + : mpl::bool_::is_specialized> +{ +}; +template +struct is_reference_to_object_manager + : mpl::false_ +{ +}; +template +struct is_reference_to_object_manager + : is_object_manager +{ +}; +template +struct is_reference_to_object_manager + : is_object_manager +{ +}; +template +struct is_reference_to_object_manager + : is_object_manager +{ +}; +template +struct is_reference_to_object_manager + : is_object_manager +{ +}; +}}} +namespace boost { namespace python { namespace detail { +template struct value_is_shared_ptr { template struct is_shared_ptr : mpl::false_ { }; template < class T0 > struct is_shared_ptr< shared_ptr< T0 > > : mpl::true_ { }; static const bool value = is_shared_ptr< typename remove_cv< typename remove_reference::type >::type >::value; typedef mpl::bool_ type; }; +}}} +namespace boost { namespace python { +namespace detail +{ +template +struct object_manager_get_pytype +{ + template + static PyTypeObject const* get( U& (*)() =0) + { + return converter::object_manager_traits::get_pytype(); + } +}; +template <> +struct object_manager_get_pytype +{ + template + static PyTypeObject const* get( U const& (*)() =0) + { + return converter::object_manager_traits::get_pytype(); + } +}; + template + struct object_manager_to_python_value + { + typedef typename value_arg::type argument_type; + PyObject* operator()(argument_type) const; + typedef boost::mpl::bool_::value> is_t_handle; + typedef boost::detail::indirect_traits::is_reference_to_const is_t_const; + PyTypeObject const* get_pytype() const { + return get_pytype_aux((is_t_handle*)0); + } + inline static PyTypeObject const* get_pytype_aux(mpl::true_*) {return converter::object_manager_traits::get_pytype();} + inline static PyTypeObject const* get_pytype_aux(mpl::false_* ) + { + return object_manager_get_pytype::get((T(*)())0); + } + static const bool uses_registry = false; + }; + template + struct registry_to_python_value + { + typedef typename value_arg::type argument_type; + PyObject* operator()(argument_type) const; + PyTypeObject const* get_pytype() const {return converter::registered::converters.to_python_target_type();} + static const bool uses_registry = true; + }; + template + struct shared_ptr_to_python_value + { + typedef typename value_arg::type argument_type; + PyObject* operator()(argument_type) const; + PyTypeObject const* get_pytype() const {return get_pytype((boost::type*)0);} + static const bool uses_registry = false; + private: + template + PyTypeObject const* get_pytype(boost::type &> *) const {return converter::registered::converters.to_python_target_type();} + template + PyTypeObject const* get_pytype(boost::type &> *) const {return converter::registered::converters.to_python_target_type();} + }; +} +template +struct to_python_value + : mpl::if_< + detail::value_is_shared_ptr + , detail::shared_ptr_to_python_value + , typename mpl::if_< + mpl::or_< + converter::is_object_manager + , converter::is_reference_to_object_manager + > + , detail::object_manager_to_python_value + , detail::registry_to_python_value + >::type + >::type +{ +}; +namespace detail +{ + template + inline PyObject* registry_to_python_value::operator()(argument_type x) const + { + typedef converter::registered r; + return converter::registered::converters.to_python(&x); + } + template + inline PyObject* object_manager_to_python_value::operator()(argument_type x) const + { + return python::upcast( + python::xincref( + get_managed_object(x, tag)) + ); + } + template + inline PyObject* shared_ptr_to_python_value::operator()(argument_type x) const + { + return converter::shared_ptr_to_python(x); + } +} +}} +namespace boost { namespace python { namespace detail { +typedef int void_result_to_python; +template +struct invoke_tag_ {}; +template +struct invoke_tag + : invoke_tag_< + is_same::value + , is_member_function_pointer::value + > +{ +}; +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f ) +{ + return rc(f( )); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f ) +{ + f( ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc ) +{ + return rc( (tc().*f)() ); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc ) +{ + (tc().*f)(); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 ) +{ + return rc(f( ac0 () )); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 ) +{ + f( ac0 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 ) +{ + return rc( (tc().*f)( ac0 () ) ); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 ) +{ + (tc().*f)( ac0 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 ) +{ + return rc(f( ac0 () , ac1 () )); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 ) +{ + f( ac0 () , ac1 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () ) ); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 ) +{ + (tc().*f)( ac0 () , ac1 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () )); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 ) +{ + f( ac0 () , ac1 () , ac2 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () ) ); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () , ac3 () )); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 ) +{ + f( ac0 () , ac1 () , ac2 () , ac3 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () ) ); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () )); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 ) +{ + f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () ) ); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () )); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 ) +{ + f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () ) ); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () )); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 ) +{ + f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () ) ); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () )); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 ) +{ + f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () ) ); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () )); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 ) +{ + f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () ) ); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () )); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 ) +{ + f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () ) ); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () )); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 ) +{ + f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () ) ); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () )); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 ) +{ + f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () ) ); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 , AC12 & ac12 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () , ac12 () )); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 , AC12 & ac12 ) +{ + f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () , ac12 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 , AC12 & ac12 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () , ac12 () ) ); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 , AC12 & ac12 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () , ac12 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 , AC12 & ac12 , AC13 & ac13 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () , ac12 () , ac13 () )); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 , AC12 & ac12 , AC13 & ac13 ) +{ + f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () , ac12 () , ac13 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 , AC12 & ac12 , AC13 & ac13 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () , ac12 () , ac13 () ) ); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 , AC12 & ac12 , AC13 & ac13 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () , ac12 () , ac13 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 , AC12 & ac12 , AC13 & ac13 , AC14 & ac14 ) +{ + return rc(f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () , ac12 () , ac13 () , ac14 () )); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 , AC12 & ac12 , AC13 & ac13 , AC14 & ac14 ) +{ + f( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () , ac12 () , ac13 () , ac14 () ); + return none(); +} +template +inline PyObject* invoke(invoke_tag_, RC const& rc, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 , AC12 & ac12 , AC13 & ac13 , AC14 & ac14 ) +{ + return rc( (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () , ac12 () , ac13 () , ac14 () ) ); +} +template +inline PyObject* invoke(invoke_tag_, RC const&, F& f, TC& tc , AC0 & ac0 , AC1 & ac1 , AC2 & ac2 , AC3 & ac3 , AC4 & ac4 , AC5 & ac5 , AC6 & ac6 , AC7 & ac7 , AC8 & ac8 , AC9 & ac9 , AC10 & ac10 , AC11 & ac11 , AC12 & ac12 , AC13 & ac13 , AC14 & ac14 ) +{ + (tc().*f)( ac0 () , ac1 () , ac2 () , ac3 () , ac4 () , ac5 () , ac6 () , ac7 () , ac8 () , ac9 () , ac10 () , ac11 () , ac12 () , ac13 () , ac14 () ); + return none(); +} +}}} +namespace boost { namespace mpl { +struct nested_begin_end_tag; +struct non_sequence_tag; +template< typename Sequence > struct sequence_tag; +}} +namespace boost { namespace mpl { namespace aux { +template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_begin { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; +}}} +namespace boost { namespace mpl { +namespace aux { +template< typename Sequence > +struct begin_type +{ + typedef typename Sequence::begin type; +}; +template< typename Sequence > +struct end_type +{ + typedef typename Sequence::end type; +}; +} +template< typename Tag > +struct begin_impl +{ + template< typename Sequence > struct apply + { + typedef typename eval_if, + aux::begin_type, void_>::type type; + }; +}; +template< typename Tag > +struct end_impl +{ + template< typename Sequence > struct apply + { + typedef typename eval_if, + aux::end_type, void_>::type type; + }; +}; +template<> struct begin_impl { template< typename Sequence > struct apply { typedef typename Sequence::begin type; }; }; +template<> struct end_impl { template< typename Sequence > struct apply { typedef typename Sequence::end type; }; }; +template<> struct begin_impl { template< typename Sequence > struct apply { typedef void_ type; }; }; +template<> struct end_impl { template< typename Sequence > struct apply { typedef void_ type; }; }; +template<> struct begin_impl { template< typename Sequence > struct apply { typedef void_ type; }; }; +template<> struct end_impl { template< typename Sequence > struct apply { typedef void_ type; }; }; +}} +namespace boost { namespace mpl { +namespace aux { +template< bool has_tag_, bool has_begin_ > +struct sequence_tag_impl +{ + template< typename Sequence > struct result2_; +}; +template<> struct sequence_tag_impl { template< typename Sequence > struct result2_ { typedef typename Sequence::tag type; }; }; +template<> struct sequence_tag_impl { template< typename Sequence > struct result2_ { typedef typename Sequence::tag type; }; }; +template<> struct sequence_tag_impl { template< typename Sequence > struct result2_ { typedef nested_begin_end_tag type; }; }; +template<> struct sequence_tag_impl { template< typename Sequence > struct result2_ { typedef non_sequence_tag type; }; }; +} +template< + typename Sequence = na + > +struct sequence_tag + : aux::sequence_tag_impl< + ::boost::mpl::aux::has_tag::value + , ::boost::mpl::aux::has_begin::value + >::template result2_ +{ +}; +template<> struct sequence_tag< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : sequence_tag< T1 > { }; }; template< typename Tag > struct lambda< sequence_tag< na > , Tag , int_<-1> > { typedef false_ is_le; typedef sequence_tag< na > result_; typedef sequence_tag< na > type; }; namespace aux { template< typename T1 > struct template_arity< sequence_tag< T1 > > : int_<1> { }; template<> struct template_arity< sequence_tag< na > > : int_<-1> { }; } +}} +namespace boost { namespace mpl { +template< + typename Sequence = na + > +struct begin +{ + typedef typename sequence_tag::type tag_; + typedef typename begin_impl< tag_ > + ::template apply< Sequence >::type type; + +}; +template< + typename Sequence = na + > +struct end +{ + typedef typename sequence_tag::type tag_; + typedef typename end_impl< tag_ > + ::template apply< Sequence >::type type; + +}; +template<> struct begin< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : begin< T1 > { }; }; template< typename Tag > struct lambda< begin< na > , Tag , int_<-1> > { typedef false_ is_le; typedef begin< na > result_; typedef begin< na > type; }; namespace aux { template< typename T1 > struct template_arity< begin< T1 > > : int_<1> { }; template<> struct template_arity< begin< na > > : int_<-1> { }; } +template<> struct end< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : end< T1 > { }; }; template< typename Tag > struct lambda< end< na > , Tag , int_<-1> > { typedef false_ is_le; typedef end< na > result_; typedef end< na > type; }; namespace aux { template< typename T1 > struct template_arity< end< T1 > > : int_<1> { }; template<> struct template_arity< end< na > > : int_<-1> { }; } +}} +namespace boost { namespace mpl { +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( Tag1::value + > Tag2::value + ) + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; +template< + typename N1 = na + , typename N2 = na + > +struct less + : less_impl< + typename less_tag::type + , typename less_tag::type + >::template apply< N1,N2 >::type +{ + +}; +template<> struct less< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : less< T1 , T2 > { }; }; template< typename Tag > struct lambda< less< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef less< na , na > result_; typedef less< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< less< T1 , T2 > > : int_<2> { }; template<> struct template_arity< less< na , na > > : int_<-1> { }; } +}} +namespace boost { namespace mpl { +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : bool_< ( N2::value > N1::value ) > + { + }; +}; +}} +namespace boost { namespace mpl { +template< typename Tag > struct negate_impl; +template< typename T > struct negate_tag +{ + typedef typename T::tag type; +}; +template< + typename N = na + > +struct negate + : negate_impl< + typename negate_tag::type + >::template apply::type +{ + +}; +template<> struct negate< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : negate< T1 > { }; }; template< typename Tag > struct lambda< negate< na > , Tag , int_<-1> > { typedef false_ is_le; typedef negate< na > result_; typedef negate< na > type; }; namespace aux { template< typename T1 > struct template_arity< negate< T1 > > : int_<1> { }; template<> struct template_arity< negate< na > > : int_<-1> { }; } +template<> +struct negate_impl +{ + template< typename N > struct apply + : integral_c< typename N::value_type, (-N::value) > + { + }; +}; +}} +namespace boost { namespace mpl { namespace aux { +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; +}; +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; +}; +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; +}; +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; +}; +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; +}}} +namespace boost { namespace mpl { namespace aux { +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; +}; +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; +}; +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; +}; +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; +}; +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; +}}} +namespace boost { namespace mpl { +template< typename Tag > +struct advance_impl +{ + template< typename Iterator, typename N > struct apply + { + typedef typename less< N,long_<0> >::type backward_; + typedef typename if_< backward_, negate, N >::type offset_; + typedef typename if_< + backward_ + , aux::advance_backward< offset_::value > + , aux::advance_forward< offset_::value > + >::type f_; + typedef typename apply_wrap1::type type; + }; +}; +template< + typename Iterator = na + , typename N = na + > +struct advance + : advance_impl< typename tag::type > + ::template apply +{ +}; +template< + typename Iterator + , long N + > +struct advance_c + : advance_impl< typename tag::type > + ::template apply > +{ +}; +template<> struct advance< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : advance< T1 , T2 > { }; }; template< typename Tag > struct lambda< advance< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef advance< na , na > result_; typedef advance< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< advance< T1 , T2 > > : int_<2> { }; template<> struct template_arity< advance< na , na > > : int_<-1> { }; } +}} +namespace boost { namespace mpl { namespace aux { +template< typename T > struct msvc_type +{ + typedef typename T::type type; +}; +template<> struct msvc_type +{ + typedef int type; +}; +}}} +namespace boost { namespace mpl { +template< + typename Iterator = na + > +struct deref +{ + typedef typename Iterator::type type; + +}; +template<> struct deref< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : deref< T1 > { }; }; template< typename Tag > struct lambda< deref< na > , Tag , int_<-1> > { typedef false_ is_le; typedef deref< na > result_; typedef deref< na > type; }; namespace aux { template< typename T1 > struct template_arity< deref< T1 > > : int_<1> { }; template<> struct template_arity< deref< na > > : int_<-1> { }; } +}} +namespace boost { namespace mpl { +template< typename Tag > +struct at_impl +{ + template< typename Sequence, typename N > struct apply + { + typedef typename advance< + typename begin::type + , N + >::type iter_; + typedef typename deref::type type; + }; +}; + template<> struct at_impl {}; +}} +namespace boost { namespace mpl { +template< + typename Sequence = na + , typename N = na + > +struct at + : at_impl< typename sequence_tag::type > + ::template apply< Sequence,N > +{ + +}; +template< + typename Sequence + , long N + > +struct at_c + : at_impl< typename sequence_tag::type > + ::template apply< Sequence,mpl::long_ > +{ +}; +template<> struct at< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : at< T1 , T2 > { }; }; template< typename Tag > struct lambda< at< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef at< na , na > result_; typedef at< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< at< T1 , T2 > > : int_<2> { }; template<> struct template_arity< at< na , na > > : int_<-1> { }; } +}} +namespace boost { namespace mpl { namespace aux { +template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_size { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; +}}} +namespace boost { namespace mpl { +namespace aux { +template< typename Sequence > struct O1_size_impl + : Sequence::size +{ +}; +} +template< typename Tag > +struct O1_size_impl +{ + template< typename Sequence > struct apply + : if_< + aux::has_size + , aux::O1_size_impl + , long_<-1> + >::type + { + }; +}; +}} +namespace boost { namespace mpl { +template< + typename Sequence = na + > +struct O1_size + : O1_size_impl< typename sequence_tag::type > + ::template apply< Sequence > +{ + +}; +template<> struct O1_size< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : O1_size< T1 > { }; }; template< typename Tag > struct lambda< O1_size< na > , Tag , int_<-1> > { typedef false_ is_le; typedef O1_size< na > result_; typedef O1_size< na > type; }; namespace aux { template< typename T1 > struct template_arity< O1_size< T1 > > : int_<1> { }; template<> struct template_arity< O1_size< na > > : int_<-1> { }; } +}} +namespace boost { namespace mpl { namespace aux { +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef state1 state; + typedef iter1 iterator; +}; +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef state2 state; + typedef iter2 iterator; +}; +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef state3 state; + typedef iter3 iterator; +}; +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + typedef state4 state; + typedef iter4 iterator; +}; +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl +{ + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,First,Last,State,ForwardOp > + : iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > +{ +}; +template< + typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; +}}} +namespace boost { namespace mpl { +template< + typename Sequence = na + , typename State = na + , typename ForwardOp = na + > +struct iter_fold +{ + typedef typename aux::iter_fold_impl< + ::boost::mpl::O1_size::value + , typename begin::type + , typename end::type + , State + , typename lambda::type + >::state type; + +}; +template<> struct iter_fold< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : iter_fold< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< iter_fold< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef iter_fold< na , na , na > result_; typedef iter_fold< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< iter_fold< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< iter_fold< na , na , na > > : int_<-1> { }; } +}} +namespace boost { namespace mpl { +struct iterator_range_tag; +template< + typename First = na + , typename Last = na + > +struct iterator_range +{ + typedef iterator_range_tag tag; + typedef iterator_range type; + typedef First begin; + typedef Last end; + +}; +template<> struct iterator_range< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : iterator_range< T1 , T2 > { }; }; template< typename Tag > struct lambda< iterator_range< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef iterator_range< na , na > result_; typedef iterator_range< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< iterator_range< T1 , T2 > > : int_<2> { }; template<> struct template_arity< iterator_range< na , na > > : int_<-1> { }; } +}} +namespace boost { namespace mpl { +template< typename Tag > struct distance_impl +{ + template< typename First, typename Last > struct apply + : aux::msvc_eti_base< typename iter_fold< + iterator_range + , mpl::long_<0> + , next<> + >::type > + { + }; +}; +template< + typename First = na + , typename Last = na + > +struct distance + : distance_impl< typename tag::type > + ::template apply +{ + +}; +template<> struct distance< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : distance< T1 , T2 > { }; }; template< typename Tag > struct lambda< distance< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef distance< na , na > result_; typedef distance< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< distance< T1 , T2 > > : int_<2> { }; template<> struct template_arity< distance< na , na > > : int_<-1> { }; } +}} +namespace boost { namespace mpl { +template< typename Tag > +struct size_impl +{ + template< typename Sequence > struct apply + : distance< + typename begin::type + , typename end::type + > + { + }; +}; + template<> struct size_impl {}; +}} +namespace boost { namespace mpl { +template< + typename Sequence = na + > +struct size + : aux::msvc_eti_base< + typename size_impl< typename sequence_tag::type > + ::template apply< Sequence >::type + >::type +{ + +}; +template<> struct size< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : size< T1 > { }; }; template< typename Tag > struct lambda< size< na > , Tag , int_<-1> > { typedef false_ is_le; typedef size< na > result_; typedef size< na > type; }; namespace aux { template< typename T1 > struct template_arity< size< T1 > > : int_<1> { }; template<> struct template_arity< size< na > > : int_<-1> { }; } +}} +namespace boost { namespace python { namespace detail { +struct signature_element +{ + char const* basename; + converter::pytype_function pytype_f; + bool lvalue; +}; +struct py_func_sig_info +{ + signature_element const *signature; + signature_element const *ret; +}; +template struct signature_arity; +template <> +struct signature_arity<0> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[0 +2] = { + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + {0,0,0} + }; + return result; + } + }; +}; +template <> +struct signature_arity<1> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[1 +2] = { + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + {0,0,0} + }; + return result; + } + }; +}; +template <> +struct signature_arity<2> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[2 +2] = { + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + {0,0,0} + }; + return result; + } + }; +}; +template <> +struct signature_arity<3> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[3 +2] = { + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + {0,0,0} + }; + return result; + } + }; +}; +template <> +struct signature_arity<4> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[4 +2] = { + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + {0,0,0} + }; + return result; + } + }; +}; +template <> +struct signature_arity<5> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[5 +2] = { + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + {0,0,0} + }; + return result; + } + }; +}; +template <> +struct signature_arity<6> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[6 +2] = { + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + {0,0,0} + }; + return result; + } + }; +}; +template <> +struct signature_arity<7> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[7 +2] = { + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + {0,0,0} + }; + return result; + } + }; +}; +template <> +struct signature_arity<8> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[8 +2] = { + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + {0,0,0} + }; + return result; + } + }; +}; +template <> +struct signature_arity<9> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[9 +2] = { + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + {0,0,0} + }; + return result; + } + }; +}; +template <> +struct signature_arity<10> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[10 +2] = { + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + {0,0,0} + }; + return result; + } + }; +}; +template <> +struct signature_arity<11> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[11 +2] = { + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + {0,0,0} + }; + return result; + } + }; +}; +template <> +struct signature_arity<12> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[12 +2] = { + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + {0,0,0} + }; + return result; + } + }; +}; +template <> +struct signature_arity<13> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[13 +2] = { + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + {0,0,0} + }; + return result; + } + }; +}; +template <> +struct signature_arity<14> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[14 +2] = { + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + {0,0,0} + }; + return result; + } + }; +}; +template <> +struct signature_arity<15> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[15 +2] = { + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + {0,0,0} + }; + return result; + } + }; +}; +template <> +struct signature_arity<16> +{ + template + struct impl + { + static signature_element const* elements() + { + static signature_element const result[16 +2] = { + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + { type_id::type>().name() , &converter::expected_pytype_for_arg::type>::get_pytype , indirect_traits::is_reference_to_non_const::type>::value }, + {0,0,0} + }; + return result; + } + }; +}; +template +struct signature_base_select +{ + enum { arity = mpl::size::value - 1 }; + typedef typename signature_arity::template impl type; +}; +template +struct signature + : signature_base_select::type +{ +}; +}}} +namespace boost { namespace python { namespace converter { +struct registration; + void* get_lvalue_from_python( + PyObject* source, registration const&); + bool implicit_rvalue_convertible_from_python( + PyObject* source, registration const&); + rvalue_from_python_stage1_data rvalue_from_python_stage1( + PyObject* source, registration const&); + void* rvalue_from_python_stage2( + PyObject* source, rvalue_from_python_stage1_data&, registration const&); + void* rvalue_result_from_python( + PyObject*, rvalue_from_python_stage1_data&); + void* reference_result_from_python(PyObject*, registration const&); + void* pointer_result_from_python(PyObject*, registration const&); + void void_result_from_python(PyObject*); + void throw_no_pointer_from_python(PyObject*, registration const&); + void throw_no_reference_from_python(PyObject*, registration const&); +}}} +namespace boost { namespace python { namespace detail { +template +inline U& void_ptr_to_reference(void const volatile* p, U&(*)()) +{ + return *(U*)p; +} +template +inline void write_void_ptr(void const volatile* storage, void* ptr, T*) +{ + *(T**)storage = (T*)ptr; +} +template +inline void write_void_ptr_reference(void const volatile* storage, void* ptr, U&(*)()) +{ + typedef typename remove_cv::type u_stripped; + write_void_ptr(storage, ptr, u_stripped(0)); +} +}}} +namespace boost { namespace python { +namespace api +{ + class object; +} +using api::object; +}} +namespace boost { namespace python { namespace detail { +template +struct dependent +{ + typedef T type; +}; +}}} +namespace boost { namespace python { +template +struct back_reference +{ + private: + typedef typename detail::dependent::type source_t; + public: + typedef T type; + back_reference(PyObject*, T); + source_t const& source() const; + T get() const; + private: + source_t m_source; + T m_value; +}; +template +class is_back_reference +{ + public: + static const bool value = false; +}; +template +class is_back_reference > +{ + public: + static const bool value = true; +}; +template +back_reference::back_reference(PyObject* p, T x) + : m_source(detail::borrowed_reference(p)) + , m_value(x) +{ +} +template +typename back_reference::source_t const& back_reference::source() const +{ + return m_source; +} +template +T back_reference::get() const +{ + return m_value; +} +}} +namespace boost { namespace python { namespace detail { +template +void construct_pointee(void* storage, Arg& x + , T const volatile* + ) +{ + new (storage) T(x); +} +template +void construct_referent_impl(void* storage, Arg& x, T&(*)()) +{ + construct_pointee(storage, x, (T*)0); +} +template +void construct_referent(void* storage, Arg const& x, T(*tag)() = 0) +{ + construct_referent_impl(storage, x, tag); +} +template +void construct_referent(void* storage, Arg& x, T(*tag)() = 0) +{ + construct_referent_impl(storage, x, tag); +} +}}} +namespace boost { namespace python { namespace converter { +template +struct object_manager_value_arg_from_python +{ + typedef T result_type; + object_manager_value_arg_from_python(PyObject*); + bool convertible() const; + T operator()() const; + private: + PyObject* m_source; +}; +template +struct object_manager_ref_arg_from_python +{ + typedef Ref result_type; + object_manager_ref_arg_from_python(PyObject*); + bool convertible() const; + Ref operator()() const; + ~object_manager_ref_arg_from_python(); + private: + typename python::detail::referent_storage::type m_result; +}; +template +inline object_manager_value_arg_from_python::object_manager_value_arg_from_python(PyObject* x) + : m_source(x) +{ +} +template +inline bool object_manager_value_arg_from_python::convertible() const +{ + return object_manager_traits::check(m_source); +} +template +inline T object_manager_value_arg_from_python::operator()() const +{ + return T(python::detail::borrowed_reference(m_source)); +} +template +inline object_manager_ref_arg_from_python::object_manager_ref_arg_from_python(PyObject* x) +{ + python::detail::construct_referent(&m_result.bytes, (python::detail::borrowed_reference)x); +} +template +inline object_manager_ref_arg_from_python::~object_manager_ref_arg_from_python() +{ + python::detail::destroy_referent(this->m_result.bytes); +} +namespace detail +{ + template + inline bool object_manager_ref_check(T const& x) + { + return object_manager_traits::check(get_managed_object(x, tag)); + } +} +template +inline bool object_manager_ref_arg_from_python::convertible() const +{ + return detail::object_manager_ref_check( + python::detail::void_ptr_to_reference(this->m_result.bytes, (Ref(*)())0)); +} +template +inline Ref object_manager_ref_arg_from_python::operator()() const +{ + return python::detail::void_ptr_to_reference( + this->m_result.bytes, (Ref(*)())0); +} +}}} +namespace boost { namespace python +{ + template struct arg_from_python; +}} +namespace boost { namespace python { namespace converter { +template +struct pointer_cref_arg_from_python +{ + typedef T result_type; + pointer_cref_arg_from_python(PyObject*); + T operator()() const; + bool convertible() const; + private: + typename python::detail::referent_storage::type m_result; +}; +struct arg_lvalue_from_python_base +{ + public: + arg_lvalue_from_python_base(void* result); + bool convertible() const; + protected: + void*const& result() const; + private: + void* m_result; +}; +template +struct pointer_arg_from_python : arg_lvalue_from_python_base +{ + typedef T result_type; + pointer_arg_from_python(PyObject*); + T operator()() const; +}; +template +struct reference_arg_from_python : arg_lvalue_from_python_base +{ + typedef T result_type; + reference_arg_from_python(PyObject*); + T operator()() const; +}; +template +struct arg_rvalue_from_python +{ + typedef typename boost::add_reference< + T + >::type result_type; + arg_rvalue_from_python(PyObject*); + bool convertible() const; + typename arg_rvalue_from_python:: + result_type operator()(); + private: + rvalue_from_python_data m_data; + PyObject* m_source; +}; +template +struct back_reference_arg_from_python + : boost::python::arg_from_python +{ + typedef T result_type; + back_reference_arg_from_python(PyObject*); + T operator()(); + private: + typedef boost::python::arg_from_python base; + PyObject* m_source; +}; +template +struct if_2 +{ + typedef typename mpl::eval_if, F>::type type; +}; +template +struct select_arg_from_python +{ + typedef typename if_2< + is_object_manager + , object_manager_value_arg_from_python + , if_2< + is_reference_to_object_manager + , object_manager_ref_arg_from_python + , if_2< + is_pointer + , pointer_arg_from_python + , if_2< + mpl::and_< + indirect_traits::is_reference_to_pointer + , indirect_traits::is_reference_to_const + , mpl::not_ > + > + , pointer_cref_arg_from_python + , if_2< + mpl::or_< + indirect_traits::is_reference_to_non_const + , indirect_traits::is_reference_to_volatile + > + , reference_arg_from_python + , mpl::if_< + boost::python::is_back_reference + , back_reference_arg_from_python + , arg_rvalue_from_python + > + > + > + > + > + >::type type; +}; +inline arg_lvalue_from_python_base::arg_lvalue_from_python_base(void* result) + : m_result(result) +{ +} +inline bool arg_lvalue_from_python_base::convertible() const +{ + return m_result != 0; +} +inline void*const& arg_lvalue_from_python_base::result() const +{ + return m_result; +} +namespace detail +{ + template + struct null_ptr_owner + { + static T value; + }; + template T null_ptr_owner::value = 0; + template + inline U& null_ptr_reference(U&(*)()) + { + return null_ptr_owner::value; + } +} +template +inline pointer_cref_arg_from_python::pointer_cref_arg_from_python(PyObject* p) +{ + python::detail::write_void_ptr_reference( + m_result.bytes + , p == (&_Py_NoneStruct) ? p : converter::get_lvalue_from_python(p, registered_pointee::converters) + , (T(*)())0); +} +template +inline bool pointer_cref_arg_from_python::convertible() const +{ + return python::detail::void_ptr_to_reference(m_result.bytes, (T(*)())0) != 0; +} +template +inline T pointer_cref_arg_from_python::operator()() const +{ + return (*(void**)m_result.bytes == (&_Py_NoneStruct)) + ? detail::null_ptr_reference((T(*)())0) + : python::detail::void_ptr_to_reference(m_result.bytes, (T(*)())0); +} +template +inline pointer_arg_from_python::pointer_arg_from_python(PyObject* p) + : arg_lvalue_from_python_base( + p == (&_Py_NoneStruct) ? p : converter::get_lvalue_from_python(p, registered_pointee::converters)) +{ +} +template +inline T pointer_arg_from_python::operator()() const +{ + return (result() == (&_Py_NoneStruct)) ? 0 : T(result()); +} +template +inline reference_arg_from_python::reference_arg_from_python(PyObject* p) + : arg_lvalue_from_python_base(converter::get_lvalue_from_python(p,registered::converters)) +{ +} +template +inline T reference_arg_from_python::operator()() const +{ + return python::detail::void_ptr_to_reference(result(), (T(*)())0); +} +template +inline arg_rvalue_from_python::arg_rvalue_from_python(PyObject* obj) + : m_data(converter::rvalue_from_python_stage1(obj, registered::converters)) + , m_source(obj) +{ +} +template +inline bool arg_rvalue_from_python::convertible() const +{ + return m_data.stage1.convertible != 0; +} +template +inline typename arg_rvalue_from_python::result_type +arg_rvalue_from_python::operator()() +{ + if (m_data.stage1.construct != 0) + m_data.stage1.construct(m_source, &m_data.stage1); + return python::detail::void_ptr_to_reference(m_data.stage1.convertible, (result_type(*)())0); +} +template +back_reference_arg_from_python::back_reference_arg_from_python(PyObject* x) + : base(x), m_source(x) +{ +} +template +inline T +back_reference_arg_from_python::operator()() +{ + return T(m_source, base::operator()()); +} +}}} +namespace boost { namespace python { +template +struct arg_from_python + : converter::select_arg_from_python< + T + >::type +{ + typedef typename converter::select_arg_from_python< + T + >::type base; + arg_from_python(PyObject*); +}; +template <> +struct arg_from_python +{ + typedef PyObject* result_type; + arg_from_python(PyObject* p) : m_source(p) {} + bool convertible() const { return true; } + PyObject* operator()() const { return m_source; } + private: + PyObject* m_source; +}; +template <> +struct arg_from_python +{ + typedef PyObject* const& result_type; + arg_from_python(PyObject* p) : m_source(p) {} + bool convertible() const { return true; } + PyObject*const& operator()() const { return m_source; } + private: + PyObject* m_source; +}; +template +inline arg_from_python::arg_from_python(PyObject* source) + : base(source) +{ +} +}} +namespace boost { namespace python { namespace converter { +struct context_result_converter {}; +}}} + +namespace boost{ +namespace detail{ +template +struct ct_imp2 +{ + typedef const T& param_type; +}; +template +struct ct_imp2 +{ + typedef const T param_type; +}; +template +struct ct_imp +{ + typedef const T& param_type; +}; +template +struct ct_imp +{ + typedef typename ct_imp2::param_type param_type; +}; +template +struct ct_imp +{ + typedef const T param_type; +}; +} +template +struct call_traits +{ +public: + typedef T value_type; + typedef T& reference; + typedef const T& const_reference; + typedef typename boost::detail::ct_imp< + T, + ::boost::is_pointer::value, + ::boost::is_arithmetic::value + >::param_type param_type; +}; +template +struct call_traits +{ + typedef T& value_type; + typedef T& reference; + typedef const T& const_reference; + typedef T& param_type; +}; +template +struct call_traits +{ +private: + typedef T array_type[BOOST_PP_ITERATION_0]; +public: + typedef const T* value_type; + typedef array_type& reference; + typedef const array_type& const_reference; + typedef const T* const param_type; +}; +template +struct call_traits +{ +private: + typedef const T array_type[BOOST_PP_ITERATION_0]; +public: + typedef const T* value_type; + typedef array_type& reference; + typedef const array_type& const_reference; + typedef const T* const param_type; +}; +} +namespace boost +{ +template +class compressed_pair; +namespace details +{ + template + struct compressed_pair_switch; + template + struct compressed_pair_switch + {static const int value = 0;}; + template + struct compressed_pair_switch + {static const int value = 3;}; + template + struct compressed_pair_switch + {static const int value = 1;}; + template + struct compressed_pair_switch + {static const int value = 2;}; + template + struct compressed_pair_switch + {static const int value = 4;}; + template + struct compressed_pair_switch + {static const int value = 5;}; + template class compressed_pair_imp; + using std::swap; + template + inline void cp_swap(T& t1, T& t2) + { + swap(t1, t2); + } + template + class compressed_pair_imp + { + public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + compressed_pair_imp() {} + compressed_pair_imp(first_param_type x, second_param_type y) + : first_(x), second_(y) {} + compressed_pair_imp(first_param_type x) + : first_(x) {} + compressed_pair_imp(second_param_type y) + : second_(y) {} + first_reference first() {return first_;} + first_const_reference first() const {return first_;} + second_reference second() {return second_;} + second_const_reference second() const {return second_;} + void swap(::boost::compressed_pair& y) + { + cp_swap(first_, y.first()); + cp_swap(second_, y.second()); + } + private: + first_type first_; + second_type second_; + }; + template + class compressed_pair_imp + : protected ::boost::remove_cv::type + { + public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + compressed_pair_imp() {} + compressed_pair_imp(first_param_type x, second_param_type y) + : first_type(x), second_(y) {} + compressed_pair_imp(first_param_type x) + : first_type(x) {} + compressed_pair_imp(second_param_type y) + : second_(y) {} + first_reference first() {return *this;} + first_const_reference first() const {return *this;} + second_reference second() {return second_;} + second_const_reference second() const {return second_;} + void swap(::boost::compressed_pair& y) + { + cp_swap(second_, y.second()); + } + private: + second_type second_; + }; + template + class compressed_pair_imp + : protected ::boost::remove_cv::type + { + public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + compressed_pair_imp() {} + compressed_pair_imp(first_param_type x, second_param_type y) + : second_type(y), first_(x) {} + compressed_pair_imp(first_param_type x) + : first_(x) {} + compressed_pair_imp(second_param_type y) + : second_type(y) {} + first_reference first() {return first_;} + first_const_reference first() const {return first_;} + second_reference second() {return *this;} + second_const_reference second() const {return *this;} + void swap(::boost::compressed_pair& y) + { + cp_swap(first_, y.first()); + } + private: + first_type first_; + }; + template + class compressed_pair_imp + : protected ::boost::remove_cv::type, + protected ::boost::remove_cv::type + { + public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + compressed_pair_imp() {} + compressed_pair_imp(first_param_type x, second_param_type y) + : first_type(x), second_type(y) {} + compressed_pair_imp(first_param_type x) + : first_type(x) {} + compressed_pair_imp(second_param_type y) + : second_type(y) {} + first_reference first() {return *this;} + first_const_reference first() const {return *this;} + second_reference second() {return *this;} + second_const_reference second() const {return *this;} + void swap(::boost::compressed_pair&) {} + }; + template + class compressed_pair_imp + : protected ::boost::remove_cv::type + { + public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + compressed_pair_imp() {} + compressed_pair_imp(first_param_type x, second_param_type y) + : first_type(x), m_second(y) {} + compressed_pair_imp(first_param_type x) + : first_type(x), m_second(x) {} + first_reference first() {return *this;} + first_const_reference first() const {return *this;} + second_reference second() {return m_second;} + second_const_reference second() const {return m_second;} + void swap(::boost::compressed_pair&) {} + private: + T2 m_second; + }; + template + class compressed_pair_imp + { + public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + compressed_pair_imp() {} + compressed_pair_imp(first_param_type x, second_param_type y) + : first_(x), second_(y) {} + compressed_pair_imp(first_param_type x) + : first_(x), second_(x) {} + first_reference first() {return first_;} + first_const_reference first() const {return first_;} + second_reference second() {return second_;} + second_const_reference second() const {return second_;} + void swap(::boost::compressed_pair& y) + { + cp_swap(first_, y.first()); + cp_swap(second_, y.second()); + } + private: + first_type first_; + second_type second_; + }; +} +template +class compressed_pair + : private ::boost::details::compressed_pair_imp::type, typename remove_cv::type>::value, + ::boost::is_empty::value, + ::boost::is_empty::value>::value> +{ +private: + typedef details::compressed_pair_imp::type, typename remove_cv::type>::value, + ::boost::is_empty::value, + ::boost::is_empty::value>::value> base; +public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + compressed_pair() : base() {} + compressed_pair(first_param_type x, second_param_type y) : base(x, y) {} + explicit compressed_pair(first_param_type x) : base(x) {} + explicit compressed_pair(second_param_type y) : base(y) {} + first_reference first() {return base::first();} + first_const_reference first() const {return base::first();} + second_reference second() {return base::second();} + second_const_reference second() const {return base::second();} + void swap(compressed_pair& y) { base::swap(y); } +}; +template +class compressed_pair + : private details::compressed_pair_imp::type, typename remove_cv::type>::value, + ::boost::is_empty::value, + ::boost::is_empty::value>::value> +{ +private: + typedef details::compressed_pair_imp::type, typename remove_cv::type>::value, + ::boost::is_empty::value, + ::boost::is_empty::value>::value> base; +public: + typedef T first_type; + typedef T second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + compressed_pair() : base() {} + compressed_pair(first_param_type x, second_param_type y) : base(x, y) {} + explicit + compressed_pair(first_param_type x) : base(x) {} + first_reference first() {return base::first();} + first_const_reference first() const {return base::first();} + second_reference second() {return base::second();} + second_const_reference second() const {return base::second();} + void swap(::boost::compressed_pair& y) { base::swap(y); } +}; +template +inline +void +swap(compressed_pair& x, compressed_pair& y) +{ + x.swap(y); +} +} +namespace boost { namespace python { namespace detail { +template +inline PyObject* get(mpl::int_, PyObject* const& args_) +{ + return (((PyTupleObject *)(args_))->ob_item[BOOST_PP_ITERATION_0]); +} +inline unsigned arity(PyObject* const& args_) +{ + return (((PyVarObject*)(args_))->ob_size); +} +typedef int void_result_to_python; +template +struct select_result_converter + : mpl::eval_if< + is_same + , mpl::identity + , mpl::apply1 + > +{ +}; +template +inline ResultConverter create_result_converter( + ArgPackage const& args_ + , ResultConverter* + , converter::context_result_converter* +) +{ + return ResultConverter(args_); +} +template +inline ResultConverter create_result_converter( + ArgPackage const& + , ResultConverter* + , ... +) +{ + return ResultConverter(); +} +template +struct converter_target_type +{ + static PyTypeObject const *get_pytype() + { + return create_result_converter((PyObject*)0, (ResultConverter *)0, (ResultConverter *)0).get_pytype(); + } +}; +template < > +struct converter_target_type +{ + static PyTypeObject const *get_pytype() + { + return 0; + } +}; +template struct caller_arity; +template +struct caller; +template <> +struct caller_arity<0> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + PyObject* operator()(PyObject* args_, PyObject*) + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + argument_package inner_args(args_); + if (!m_data.second().precall(inner_args)) + return 0; + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + + ); + return m_data.second().postcall(inner_args, result); + } + static unsigned min_arity() { return 0; } + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + return res; + } + private: + compressed_pair m_data; + }; +}; +template <> +struct caller_arity<1> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + PyObject* operator()(PyObject* args_, PyObject*) + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + argument_package inner_args(args_); + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + if (!m_data.second().precall(inner_args)) + return 0; + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 + ); + return m_data.second().postcall(inner_args, result); + } + static unsigned min_arity() { return 1; } + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + return res; + } + private: + compressed_pair m_data; + }; +}; +template <> +struct caller_arity<2> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + PyObject* operator()(PyObject* args_, PyObject*) + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + argument_package inner_args(args_); + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + if (!m_data.second().precall(inner_args)) + return 0; + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 + ); + return m_data.second().postcall(inner_args, result); + } + static unsigned min_arity() { return 2; } + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + return res; + } + private: + compressed_pair m_data; + }; +}; +template <> +struct caller_arity<3> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + PyObject* operator()(PyObject* args_, PyObject*) + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + argument_package inner_args(args_); + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + if (!m_data.second().precall(inner_args)) + return 0; + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 + ); + return m_data.second().postcall(inner_args, result); + } + static unsigned min_arity() { return 3; } + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + return res; + } + private: + compressed_pair m_data; + }; +}; +template <> +struct caller_arity<4> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + PyObject* operator()(PyObject* args_, PyObject*) + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + argument_package inner_args(args_); + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + if (!m_data.second().precall(inner_args)) + return 0; + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 + ); + return m_data.second().postcall(inner_args, result); + } + static unsigned min_arity() { return 4; } + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + return res; + } + private: + compressed_pair m_data; + }; +}; +template <> +struct caller_arity<5> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + PyObject* operator()(PyObject* args_, PyObject*) + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + argument_package inner_args(args_); + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + typedef typename mpl::next< arg_iter3 >::type arg_iter4; typedef arg_from_python c_t4; c_t4 c4(get(mpl::int_<4>(), inner_args)); if (!c4.convertible()) return 0; + if (!m_data.second().precall(inner_args)) + return 0; + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 , c4 + ); + return m_data.second().postcall(inner_args, result); + } + static unsigned min_arity() { return 5; } + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + return res; + } + private: + compressed_pair m_data; + }; +}; +template <> +struct caller_arity<6> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + PyObject* operator()(PyObject* args_, PyObject*) + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + argument_package inner_args(args_); + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + typedef typename mpl::next< arg_iter3 >::type arg_iter4; typedef arg_from_python c_t4; c_t4 c4(get(mpl::int_<4>(), inner_args)); if (!c4.convertible()) return 0; + typedef typename mpl::next< arg_iter4 >::type arg_iter5; typedef arg_from_python c_t5; c_t5 c5(get(mpl::int_<5>(), inner_args)); if (!c5.convertible()) return 0; + if (!m_data.second().precall(inner_args)) + return 0; + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 , c4 , c5 + ); + return m_data.second().postcall(inner_args, result); + } + static unsigned min_arity() { return 6; } + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + return res; + } + private: + compressed_pair m_data; + }; +}; +template <> +struct caller_arity<7> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + PyObject* operator()(PyObject* args_, PyObject*) + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + argument_package inner_args(args_); + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + typedef typename mpl::next< arg_iter3 >::type arg_iter4; typedef arg_from_python c_t4; c_t4 c4(get(mpl::int_<4>(), inner_args)); if (!c4.convertible()) return 0; + typedef typename mpl::next< arg_iter4 >::type arg_iter5; typedef arg_from_python c_t5; c_t5 c5(get(mpl::int_<5>(), inner_args)); if (!c5.convertible()) return 0; + typedef typename mpl::next< arg_iter5 >::type arg_iter6; typedef arg_from_python c_t6; c_t6 c6(get(mpl::int_<6>(), inner_args)); if (!c6.convertible()) return 0; + if (!m_data.second().precall(inner_args)) + return 0; + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 , c4 , c5 , c6 + ); + return m_data.second().postcall(inner_args, result); + } + static unsigned min_arity() { return 7; } + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + return res; + } + private: + compressed_pair m_data; + }; +}; +template <> +struct caller_arity<8> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + PyObject* operator()(PyObject* args_, PyObject*) + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + argument_package inner_args(args_); + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + typedef typename mpl::next< arg_iter3 >::type arg_iter4; typedef arg_from_python c_t4; c_t4 c4(get(mpl::int_<4>(), inner_args)); if (!c4.convertible()) return 0; + typedef typename mpl::next< arg_iter4 >::type arg_iter5; typedef arg_from_python c_t5; c_t5 c5(get(mpl::int_<5>(), inner_args)); if (!c5.convertible()) return 0; + typedef typename mpl::next< arg_iter5 >::type arg_iter6; typedef arg_from_python c_t6; c_t6 c6(get(mpl::int_<6>(), inner_args)); if (!c6.convertible()) return 0; + typedef typename mpl::next< arg_iter6 >::type arg_iter7; typedef arg_from_python c_t7; c_t7 c7(get(mpl::int_<7>(), inner_args)); if (!c7.convertible()) return 0; + if (!m_data.second().precall(inner_args)) + return 0; + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 , c4 , c5 , c6 , c7 + ); + return m_data.second().postcall(inner_args, result); + } + static unsigned min_arity() { return 8; } + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + return res; + } + private: + compressed_pair m_data; + }; +}; +template <> +struct caller_arity<9> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + PyObject* operator()(PyObject* args_, PyObject*) + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + argument_package inner_args(args_); + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + typedef typename mpl::next< arg_iter3 >::type arg_iter4; typedef arg_from_python c_t4; c_t4 c4(get(mpl::int_<4>(), inner_args)); if (!c4.convertible()) return 0; + typedef typename mpl::next< arg_iter4 >::type arg_iter5; typedef arg_from_python c_t5; c_t5 c5(get(mpl::int_<5>(), inner_args)); if (!c5.convertible()) return 0; + typedef typename mpl::next< arg_iter5 >::type arg_iter6; typedef arg_from_python c_t6; c_t6 c6(get(mpl::int_<6>(), inner_args)); if (!c6.convertible()) return 0; + typedef typename mpl::next< arg_iter6 >::type arg_iter7; typedef arg_from_python c_t7; c_t7 c7(get(mpl::int_<7>(), inner_args)); if (!c7.convertible()) return 0; + typedef typename mpl::next< arg_iter7 >::type arg_iter8; typedef arg_from_python c_t8; c_t8 c8(get(mpl::int_<8>(), inner_args)); if (!c8.convertible()) return 0; + if (!m_data.second().precall(inner_args)) + return 0; + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 , c4 , c5 , c6 , c7 , c8 + ); + return m_data.second().postcall(inner_args, result); + } + static unsigned min_arity() { return 9; } + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + return res; + } + private: + compressed_pair m_data; + }; +}; +template <> +struct caller_arity<10> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + PyObject* operator()(PyObject* args_, PyObject*) + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + argument_package inner_args(args_); + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + typedef typename mpl::next< arg_iter3 >::type arg_iter4; typedef arg_from_python c_t4; c_t4 c4(get(mpl::int_<4>(), inner_args)); if (!c4.convertible()) return 0; + typedef typename mpl::next< arg_iter4 >::type arg_iter5; typedef arg_from_python c_t5; c_t5 c5(get(mpl::int_<5>(), inner_args)); if (!c5.convertible()) return 0; + typedef typename mpl::next< arg_iter5 >::type arg_iter6; typedef arg_from_python c_t6; c_t6 c6(get(mpl::int_<6>(), inner_args)); if (!c6.convertible()) return 0; + typedef typename mpl::next< arg_iter6 >::type arg_iter7; typedef arg_from_python c_t7; c_t7 c7(get(mpl::int_<7>(), inner_args)); if (!c7.convertible()) return 0; + typedef typename mpl::next< arg_iter7 >::type arg_iter8; typedef arg_from_python c_t8; c_t8 c8(get(mpl::int_<8>(), inner_args)); if (!c8.convertible()) return 0; + typedef typename mpl::next< arg_iter8 >::type arg_iter9; typedef arg_from_python c_t9; c_t9 c9(get(mpl::int_<9>(), inner_args)); if (!c9.convertible()) return 0; + if (!m_data.second().precall(inner_args)) + return 0; + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 , c4 , c5 , c6 , c7 , c8 , c9 + ); + return m_data.second().postcall(inner_args, result); + } + static unsigned min_arity() { return 10; } + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + return res; + } + private: + compressed_pair m_data; + }; +}; +template <> +struct caller_arity<11> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + PyObject* operator()(PyObject* args_, PyObject*) + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + argument_package inner_args(args_); + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + typedef typename mpl::next< arg_iter3 >::type arg_iter4; typedef arg_from_python c_t4; c_t4 c4(get(mpl::int_<4>(), inner_args)); if (!c4.convertible()) return 0; + typedef typename mpl::next< arg_iter4 >::type arg_iter5; typedef arg_from_python c_t5; c_t5 c5(get(mpl::int_<5>(), inner_args)); if (!c5.convertible()) return 0; + typedef typename mpl::next< arg_iter5 >::type arg_iter6; typedef arg_from_python c_t6; c_t6 c6(get(mpl::int_<6>(), inner_args)); if (!c6.convertible()) return 0; + typedef typename mpl::next< arg_iter6 >::type arg_iter7; typedef arg_from_python c_t7; c_t7 c7(get(mpl::int_<7>(), inner_args)); if (!c7.convertible()) return 0; + typedef typename mpl::next< arg_iter7 >::type arg_iter8; typedef arg_from_python c_t8; c_t8 c8(get(mpl::int_<8>(), inner_args)); if (!c8.convertible()) return 0; + typedef typename mpl::next< arg_iter8 >::type arg_iter9; typedef arg_from_python c_t9; c_t9 c9(get(mpl::int_<9>(), inner_args)); if (!c9.convertible()) return 0; + typedef typename mpl::next< arg_iter9 >::type arg_iter10; typedef arg_from_python c_t10; c_t10 c10(get(mpl::int_<10>(), inner_args)); if (!c10.convertible()) return 0; + if (!m_data.second().precall(inner_args)) + return 0; + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 , c4 , c5 , c6 , c7 , c8 , c9 , c10 + ); + return m_data.second().postcall(inner_args, result); + } + static unsigned min_arity() { return 11; } + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + return res; + } + private: + compressed_pair m_data; + }; +}; +template <> +struct caller_arity<12> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + PyObject* operator()(PyObject* args_, PyObject*) + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + argument_package inner_args(args_); + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + typedef typename mpl::next< arg_iter3 >::type arg_iter4; typedef arg_from_python c_t4; c_t4 c4(get(mpl::int_<4>(), inner_args)); if (!c4.convertible()) return 0; + typedef typename mpl::next< arg_iter4 >::type arg_iter5; typedef arg_from_python c_t5; c_t5 c5(get(mpl::int_<5>(), inner_args)); if (!c5.convertible()) return 0; + typedef typename mpl::next< arg_iter5 >::type arg_iter6; typedef arg_from_python c_t6; c_t6 c6(get(mpl::int_<6>(), inner_args)); if (!c6.convertible()) return 0; + typedef typename mpl::next< arg_iter6 >::type arg_iter7; typedef arg_from_python c_t7; c_t7 c7(get(mpl::int_<7>(), inner_args)); if (!c7.convertible()) return 0; + typedef typename mpl::next< arg_iter7 >::type arg_iter8; typedef arg_from_python c_t8; c_t8 c8(get(mpl::int_<8>(), inner_args)); if (!c8.convertible()) return 0; + typedef typename mpl::next< arg_iter8 >::type arg_iter9; typedef arg_from_python c_t9; c_t9 c9(get(mpl::int_<9>(), inner_args)); if (!c9.convertible()) return 0; + typedef typename mpl::next< arg_iter9 >::type arg_iter10; typedef arg_from_python c_t10; c_t10 c10(get(mpl::int_<10>(), inner_args)); if (!c10.convertible()) return 0; + typedef typename mpl::next< arg_iter10 >::type arg_iter11; typedef arg_from_python c_t11; c_t11 c11(get(mpl::int_<11>(), inner_args)); if (!c11.convertible()) return 0; + if (!m_data.second().precall(inner_args)) + return 0; + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 , c4 , c5 , c6 , c7 , c8 , c9 , c10 , c11 + ); + return m_data.second().postcall(inner_args, result); + } + static unsigned min_arity() { return 12; } + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + return res; + } + private: + compressed_pair m_data; + }; +}; +template <> +struct caller_arity<13> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + PyObject* operator()(PyObject* args_, PyObject*) + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + argument_package inner_args(args_); + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + typedef typename mpl::next< arg_iter3 >::type arg_iter4; typedef arg_from_python c_t4; c_t4 c4(get(mpl::int_<4>(), inner_args)); if (!c4.convertible()) return 0; + typedef typename mpl::next< arg_iter4 >::type arg_iter5; typedef arg_from_python c_t5; c_t5 c5(get(mpl::int_<5>(), inner_args)); if (!c5.convertible()) return 0; + typedef typename mpl::next< arg_iter5 >::type arg_iter6; typedef arg_from_python c_t6; c_t6 c6(get(mpl::int_<6>(), inner_args)); if (!c6.convertible()) return 0; + typedef typename mpl::next< arg_iter6 >::type arg_iter7; typedef arg_from_python c_t7; c_t7 c7(get(mpl::int_<7>(), inner_args)); if (!c7.convertible()) return 0; + typedef typename mpl::next< arg_iter7 >::type arg_iter8; typedef arg_from_python c_t8; c_t8 c8(get(mpl::int_<8>(), inner_args)); if (!c8.convertible()) return 0; + typedef typename mpl::next< arg_iter8 >::type arg_iter9; typedef arg_from_python c_t9; c_t9 c9(get(mpl::int_<9>(), inner_args)); if (!c9.convertible()) return 0; + typedef typename mpl::next< arg_iter9 >::type arg_iter10; typedef arg_from_python c_t10; c_t10 c10(get(mpl::int_<10>(), inner_args)); if (!c10.convertible()) return 0; + typedef typename mpl::next< arg_iter10 >::type arg_iter11; typedef arg_from_python c_t11; c_t11 c11(get(mpl::int_<11>(), inner_args)); if (!c11.convertible()) return 0; + typedef typename mpl::next< arg_iter11 >::type arg_iter12; typedef arg_from_python c_t12; c_t12 c12(get(mpl::int_<12>(), inner_args)); if (!c12.convertible()) return 0; + if (!m_data.second().precall(inner_args)) + return 0; + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 , c4 , c5 , c6 , c7 , c8 , c9 , c10 , c11 , c12 + ); + return m_data.second().postcall(inner_args, result); + } + static unsigned min_arity() { return 13; } + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + return res; + } + private: + compressed_pair m_data; + }; +}; +template <> +struct caller_arity<14> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + PyObject* operator()(PyObject* args_, PyObject*) + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + argument_package inner_args(args_); + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + typedef typename mpl::next< arg_iter3 >::type arg_iter4; typedef arg_from_python c_t4; c_t4 c4(get(mpl::int_<4>(), inner_args)); if (!c4.convertible()) return 0; + typedef typename mpl::next< arg_iter4 >::type arg_iter5; typedef arg_from_python c_t5; c_t5 c5(get(mpl::int_<5>(), inner_args)); if (!c5.convertible()) return 0; + typedef typename mpl::next< arg_iter5 >::type arg_iter6; typedef arg_from_python c_t6; c_t6 c6(get(mpl::int_<6>(), inner_args)); if (!c6.convertible()) return 0; + typedef typename mpl::next< arg_iter6 >::type arg_iter7; typedef arg_from_python c_t7; c_t7 c7(get(mpl::int_<7>(), inner_args)); if (!c7.convertible()) return 0; + typedef typename mpl::next< arg_iter7 >::type arg_iter8; typedef arg_from_python c_t8; c_t8 c8(get(mpl::int_<8>(), inner_args)); if (!c8.convertible()) return 0; + typedef typename mpl::next< arg_iter8 >::type arg_iter9; typedef arg_from_python c_t9; c_t9 c9(get(mpl::int_<9>(), inner_args)); if (!c9.convertible()) return 0; + typedef typename mpl::next< arg_iter9 >::type arg_iter10; typedef arg_from_python c_t10; c_t10 c10(get(mpl::int_<10>(), inner_args)); if (!c10.convertible()) return 0; + typedef typename mpl::next< arg_iter10 >::type arg_iter11; typedef arg_from_python c_t11; c_t11 c11(get(mpl::int_<11>(), inner_args)); if (!c11.convertible()) return 0; + typedef typename mpl::next< arg_iter11 >::type arg_iter12; typedef arg_from_python c_t12; c_t12 c12(get(mpl::int_<12>(), inner_args)); if (!c12.convertible()) return 0; + typedef typename mpl::next< arg_iter12 >::type arg_iter13; typedef arg_from_python c_t13; c_t13 c13(get(mpl::int_<13>(), inner_args)); if (!c13.convertible()) return 0; + if (!m_data.second().precall(inner_args)) + return 0; + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 , c4 , c5 , c6 , c7 , c8 , c9 , c10 , c11 , c12 , c13 + ); + return m_data.second().postcall(inner_args, result); + } + static unsigned min_arity() { return 14; } + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + return res; + } + private: + compressed_pair m_data; + }; +}; +template <> +struct caller_arity<15> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + PyObject* operator()(PyObject* args_, PyObject*) + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + argument_package inner_args(args_); + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + typedef typename mpl::next< arg_iter3 >::type arg_iter4; typedef arg_from_python c_t4; c_t4 c4(get(mpl::int_<4>(), inner_args)); if (!c4.convertible()) return 0; + typedef typename mpl::next< arg_iter4 >::type arg_iter5; typedef arg_from_python c_t5; c_t5 c5(get(mpl::int_<5>(), inner_args)); if (!c5.convertible()) return 0; + typedef typename mpl::next< arg_iter5 >::type arg_iter6; typedef arg_from_python c_t6; c_t6 c6(get(mpl::int_<6>(), inner_args)); if (!c6.convertible()) return 0; + typedef typename mpl::next< arg_iter6 >::type arg_iter7; typedef arg_from_python c_t7; c_t7 c7(get(mpl::int_<7>(), inner_args)); if (!c7.convertible()) return 0; + typedef typename mpl::next< arg_iter7 >::type arg_iter8; typedef arg_from_python c_t8; c_t8 c8(get(mpl::int_<8>(), inner_args)); if (!c8.convertible()) return 0; + typedef typename mpl::next< arg_iter8 >::type arg_iter9; typedef arg_from_python c_t9; c_t9 c9(get(mpl::int_<9>(), inner_args)); if (!c9.convertible()) return 0; + typedef typename mpl::next< arg_iter9 >::type arg_iter10; typedef arg_from_python c_t10; c_t10 c10(get(mpl::int_<10>(), inner_args)); if (!c10.convertible()) return 0; + typedef typename mpl::next< arg_iter10 >::type arg_iter11; typedef arg_from_python c_t11; c_t11 c11(get(mpl::int_<11>(), inner_args)); if (!c11.convertible()) return 0; + typedef typename mpl::next< arg_iter11 >::type arg_iter12; typedef arg_from_python c_t12; c_t12 c12(get(mpl::int_<12>(), inner_args)); if (!c12.convertible()) return 0; + typedef typename mpl::next< arg_iter12 >::type arg_iter13; typedef arg_from_python c_t13; c_t13 c13(get(mpl::int_<13>(), inner_args)); if (!c13.convertible()) return 0; + typedef typename mpl::next< arg_iter13 >::type arg_iter14; typedef arg_from_python c_t14; c_t14 c14(get(mpl::int_<14>(), inner_args)); if (!c14.convertible()) return 0; + if (!m_data.second().precall(inner_args)) + return 0; + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 , c4 , c5 , c6 , c7 , c8 , c9 , c10 , c11 , c12 , c13 , c14 + ); + return m_data.second().postcall(inner_args, result); + } + static unsigned min_arity() { return 15; } + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + return res; + } + private: + compressed_pair m_data; + }; +}; +template <> +struct caller_arity<16> +{ + template + struct impl + { + impl(F f, Policies p) : m_data(f,p) {} + PyObject* operator()(PyObject* args_, PyObject*) + { + typedef typename mpl::begin::type first; + typedef typename first::type result_t; + typedef typename select_result_converter::type result_converter; + typedef typename Policies::argument_package argument_package; + argument_package inner_args(args_); + typedef typename mpl::next::type arg_iter0; typedef arg_from_python c_t0; c_t0 c0(get(mpl::int_<0>(), inner_args)); if (!c0.convertible()) return 0; + typedef typename mpl::next< arg_iter0 >::type arg_iter1; typedef arg_from_python c_t1; c_t1 c1(get(mpl::int_<1>(), inner_args)); if (!c1.convertible()) return 0; + typedef typename mpl::next< arg_iter1 >::type arg_iter2; typedef arg_from_python c_t2; c_t2 c2(get(mpl::int_<2>(), inner_args)); if (!c2.convertible()) return 0; + typedef typename mpl::next< arg_iter2 >::type arg_iter3; typedef arg_from_python c_t3; c_t3 c3(get(mpl::int_<3>(), inner_args)); if (!c3.convertible()) return 0; + typedef typename mpl::next< arg_iter3 >::type arg_iter4; typedef arg_from_python c_t4; c_t4 c4(get(mpl::int_<4>(), inner_args)); if (!c4.convertible()) return 0; + typedef typename mpl::next< arg_iter4 >::type arg_iter5; typedef arg_from_python c_t5; c_t5 c5(get(mpl::int_<5>(), inner_args)); if (!c5.convertible()) return 0; + typedef typename mpl::next< arg_iter5 >::type arg_iter6; typedef arg_from_python c_t6; c_t6 c6(get(mpl::int_<6>(), inner_args)); if (!c6.convertible()) return 0; + typedef typename mpl::next< arg_iter6 >::type arg_iter7; typedef arg_from_python c_t7; c_t7 c7(get(mpl::int_<7>(), inner_args)); if (!c7.convertible()) return 0; + typedef typename mpl::next< arg_iter7 >::type arg_iter8; typedef arg_from_python c_t8; c_t8 c8(get(mpl::int_<8>(), inner_args)); if (!c8.convertible()) return 0; + typedef typename mpl::next< arg_iter8 >::type arg_iter9; typedef arg_from_python c_t9; c_t9 c9(get(mpl::int_<9>(), inner_args)); if (!c9.convertible()) return 0; + typedef typename mpl::next< arg_iter9 >::type arg_iter10; typedef arg_from_python c_t10; c_t10 c10(get(mpl::int_<10>(), inner_args)); if (!c10.convertible()) return 0; + typedef typename mpl::next< arg_iter10 >::type arg_iter11; typedef arg_from_python c_t11; c_t11 c11(get(mpl::int_<11>(), inner_args)); if (!c11.convertible()) return 0; + typedef typename mpl::next< arg_iter11 >::type arg_iter12; typedef arg_from_python c_t12; c_t12 c12(get(mpl::int_<12>(), inner_args)); if (!c12.convertible()) return 0; + typedef typename mpl::next< arg_iter12 >::type arg_iter13; typedef arg_from_python c_t13; c_t13 c13(get(mpl::int_<13>(), inner_args)); if (!c13.convertible()) return 0; + typedef typename mpl::next< arg_iter13 >::type arg_iter14; typedef arg_from_python c_t14; c_t14 c14(get(mpl::int_<14>(), inner_args)); if (!c14.convertible()) return 0; + typedef typename mpl::next< arg_iter14 >::type arg_iter15; typedef arg_from_python c_t15; c_t15 c15(get(mpl::int_<15>(), inner_args)); if (!c15.convertible()) return 0; + if (!m_data.second().precall(inner_args)) + return 0; + PyObject* result = detail::invoke( + detail::invoke_tag() + , create_result_converter(args_, (result_converter*)0, (result_converter*)0) + , m_data.first() + , c0 , c1 , c2 , c3 , c4 , c5 , c6 , c7 , c8 , c9 , c10 , c11 , c12 , c13 , c14 , c15 + ); + return m_data.second().postcall(inner_args, result); + } + static unsigned min_arity() { return 16; } + static py_func_sig_info signature() + { + const signature_element * sig = detail::signature::elements(); + typedef typename Policies::template extract_return_type::type rtype; + typedef typename select_result_converter::type result_converter; + static const signature_element ret = { + (boost::is_void::value ? "void" : type_id().name()) + , &detail::converter_target_type::get_pytype + , boost::detail::indirect_traits::is_reference_to_non_const::value + }; + py_func_sig_info res = {sig, &ret }; + return res; + } + private: + compressed_pair m_data; + }; +}; +template +struct caller_base_select +{ + enum { arity = mpl::size::value - 1 }; + typedef typename caller_arity::template impl type; +}; +template +struct caller + : caller_base_select::type +{ + typedef typename caller_base_select< + F,CallPolicies,Sig + >::type base; + typedef PyObject* result_type; + caller(F f, CallPolicies p) : base(f,p) {} +}; +}}} +namespace boost { namespace mpl { +template< typename Tag > +struct front_impl +{ + template< typename Sequence > struct apply + { + typedef typename begin::type iter_; + typedef typename deref::type type; + }; +}; + template<> struct front_impl {}; +}} +namespace boost { namespace mpl { +template< + typename Sequence = na + > +struct front + : front_impl< typename sequence_tag::type > + ::template apply< Sequence > +{ + +}; +template<> struct front< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : front< T1 > { }; }; template< typename Tag > struct lambda< front< na > , Tag , int_<-1> > { typedef false_ is_le; typedef front< na > result_; typedef front< na > type; }; namespace aux { template< typename T1 > struct template_arity< front< T1 > > : int_<1> { }; template<> struct template_arity< front< na > > : int_<-1> { }; } +}} +namespace boost { namespace python { +template struct to_python_value; +namespace detail +{ + template struct specify_a_return_value_policy_to_wrap_functions_returning + {} + ; +} +struct default_result_converter; +struct default_call_policies +{ + template + static bool precall(ArgumentPackage const&) + { + return true; + } + template + static PyObject* postcall(ArgumentPackage const&, PyObject* result) + { + return result; + } + typedef default_result_converter result_converter; + typedef PyObject* argument_package; + template + struct extract_return_type : mpl::front + { + }; +}; +struct default_result_converter +{ + template + struct apply + { + typedef typename mpl::if_< + mpl::or_, is_reference > + , detail::specify_a_return_value_policy_to_wrap_functions_returning + , boost::python::to_python_value< + typename detail::value_arg::type + > + >::type type; + }; +}; +template <> +struct default_result_converter::apply +{ + typedef boost::python::to_python_value type; +}; +template <> +struct default_result_converter::apply +{ + typedef boost::python::to_python_value type; +}; +}} +namespace boost { namespace python { namespace objects { +struct py_function_impl_base +{ + virtual ~py_function_impl_base(); + virtual PyObject* operator()(PyObject*, PyObject*) = 0; + virtual unsigned min_arity() const = 0; + virtual unsigned max_arity() const; + virtual python::detail::py_func_sig_info signature() const = 0; +}; +template +struct caller_py_function_impl : py_function_impl_base +{ + caller_py_function_impl(Caller const& caller) + : m_caller(caller) + {} + PyObject* operator()(PyObject* args, PyObject* kw) + { + return m_caller(args, kw); + } + virtual unsigned min_arity() const + { + return m_caller.min_arity(); + } + virtual python::detail::py_func_sig_info signature() const + { + return m_caller.signature(); + } + private: + Caller m_caller; +}; +template +struct signature_py_function_impl : py_function_impl_base +{ + signature_py_function_impl(Caller const& caller) + : m_caller(caller) + {} + PyObject* operator()(PyObject* args, PyObject* kw) + { + return m_caller(args, kw); + } + virtual unsigned min_arity() const + { + return mpl::size::value - 1; + } + virtual python::detail::py_func_sig_info signature() const + { + python::detail::signature_element const* sig = python::detail::signature::elements(); + python::detail::py_func_sig_info res = {sig, sig}; + return res; + } + private: + Caller m_caller; +}; +template +struct full_py_function_impl : py_function_impl_base +{ + full_py_function_impl(Caller const& caller, unsigned min_arity, unsigned max_arity) + : m_caller(caller) + , m_min_arity(min_arity) + , m_max_arity(max_arity > min_arity ? max_arity : min_arity) + {} + PyObject* operator()(PyObject* args, PyObject* kw) + { + return m_caller(args, kw); + } + virtual unsigned min_arity() const + { + return m_min_arity; + } + virtual unsigned max_arity() const + { + return m_max_arity; + } + virtual python::detail::py_func_sig_info signature() const + { + python::detail::signature_element const* sig = python::detail::signature::elements(); + python::detail::py_func_sig_info res = {sig, sig}; + return res; + } + private: + Caller m_caller; + unsigned m_min_arity; + unsigned m_max_arity; +}; +struct py_function +{ + template + py_function(Caller const& caller) + : m_impl(new caller_py_function_impl(caller)) + {} + template + py_function(Caller const& caller, Sig) + : m_impl(new signature_py_function_impl(caller)) + {} + template + py_function(Caller const& caller, Sig, int min_arity, int max_arity = 0) + : m_impl(new full_py_function_impl(caller, min_arity, max_arity)) + {} + py_function(py_function const& rhs) + : m_impl(rhs.m_impl) + {} + PyObject* operator()(PyObject* args, PyObject* kw) const + { + return (*m_impl)(args, kw); + } + unsigned min_arity() const + { + return m_impl->min_arity(); + } + unsigned max_arity() const + { + return m_impl->max_arity(); + } + python::detail::signature_element const* signature() const + { + return m_impl->signature().signature; + } + python::detail::signature_element const& get_return_type() const + { + return *m_impl->signature().ret; + } + private: + mutable std::auto_ptr m_impl; +}; +}}} +namespace boost { namespace python { namespace detail { +template +struct most_derived +{ + typedef typename mpl::if_< + is_convertible + , C1 + , C2 + >::type type; +}; +template < + class RT > +inline mpl::vector1< + RT > +get_signature(RT(*)(), void* = 0) +{ + return mpl::vector1< + RT + >(); +} +template < + class RT, class ClassT > +inline mpl::vector2< + RT, ClassT& > +get_signature(RT(ClassT::*)() ) +{ + return mpl::vector2< + RT, ClassT& + >(); +} +template < + class Target + , class RT + , class ClassT + +> +inline mpl::vector2< + RT + , typename most_derived::type& + +> +get_signature( + RT(ClassT::*)() + , Target* +) +{ + return mpl::vector2< + RT + , typename most_derived::type& + + >(); +} +template < + class RT, class ClassT > +inline mpl::vector2< + RT, ClassT& > +get_signature(RT(ClassT::*)() const) +{ + return mpl::vector2< + RT, ClassT& + >(); +} +template < + class Target + , class RT + , class ClassT + +> +inline mpl::vector2< + RT + , typename most_derived::type& + +> +get_signature( + RT(ClassT::*)() const + , Target* +) +{ + return mpl::vector2< + RT + , typename most_derived::type& + + >(); +} +template < + class RT, class ClassT > +inline mpl::vector2< + RT, ClassT& > +get_signature(RT(ClassT::*)() volatile) +{ + return mpl::vector2< + RT, ClassT& + >(); +} +template < + class Target + , class RT + , class ClassT + +> +inline mpl::vector2< + RT + , typename most_derived::type& + +> +get_signature( + RT(ClassT::*)() volatile + , Target* +) +{ + return mpl::vector2< + RT + , typename most_derived::type& + + >(); +} +template < + class RT, class ClassT > +inline mpl::vector2< + RT, ClassT& > +get_signature(RT(ClassT::*)() const volatile) +{ + return mpl::vector2< + RT, ClassT& + >(); +} +template < + class Target + , class RT + , class ClassT + +> +inline mpl::vector2< + RT + , typename most_derived::type& + +> +get_signature( + RT(ClassT::*)() const volatile + , Target* +) +{ + return mpl::vector2< + RT + , typename most_derived::type& + + >(); +} +template < + class RT , class T0> +inline mpl::vector2< + RT , T0> +get_signature(RT(*)( T0), void* = 0) +{ + return mpl::vector2< + RT , T0 + >(); +} +template < + class RT, class ClassT , class T0> +inline mpl::vector3< + RT, ClassT& , T0> +get_signature(RT(ClassT::*)( T0) ) +{ + return mpl::vector3< + RT, ClassT& , T0 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 +> +inline mpl::vector3< + RT + , typename most_derived::type& + , T0 +> +get_signature( + RT(ClassT::*)( T0) + , Target* +) +{ + return mpl::vector3< + RT + , typename most_derived::type& + , T0 + >(); +} +template < + class RT, class ClassT , class T0> +inline mpl::vector3< + RT, ClassT& , T0> +get_signature(RT(ClassT::*)( T0) const) +{ + return mpl::vector3< + RT, ClassT& , T0 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 +> +inline mpl::vector3< + RT + , typename most_derived::type& + , T0 +> +get_signature( + RT(ClassT::*)( T0) const + , Target* +) +{ + return mpl::vector3< + RT + , typename most_derived::type& + , T0 + >(); +} +template < + class RT, class ClassT , class T0> +inline mpl::vector3< + RT, ClassT& , T0> +get_signature(RT(ClassT::*)( T0) volatile) +{ + return mpl::vector3< + RT, ClassT& , T0 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 +> +inline mpl::vector3< + RT + , typename most_derived::type& + , T0 +> +get_signature( + RT(ClassT::*)( T0) volatile + , Target* +) +{ + return mpl::vector3< + RT + , typename most_derived::type& + , T0 + >(); +} +template < + class RT, class ClassT , class T0> +inline mpl::vector3< + RT, ClassT& , T0> +get_signature(RT(ClassT::*)( T0) const volatile) +{ + return mpl::vector3< + RT, ClassT& , T0 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 +> +inline mpl::vector3< + RT + , typename most_derived::type& + , T0 +> +get_signature( + RT(ClassT::*)( T0) const volatile + , Target* +) +{ + return mpl::vector3< + RT + , typename most_derived::type& + , T0 + >(); +} +template < + class RT , class T0 , class T1> +inline mpl::vector3< + RT , T0 , T1> +get_signature(RT(*)( T0 , T1), void* = 0) +{ + return mpl::vector3< + RT , T0 , T1 + >(); +} +template < + class RT, class ClassT , class T0 , class T1> +inline mpl::vector4< + RT, ClassT& , T0 , T1> +get_signature(RT(ClassT::*)( T0 , T1) ) +{ + return mpl::vector4< + RT, ClassT& , T0 , T1 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 +> +inline mpl::vector4< + RT + , typename most_derived::type& + , T0 , T1 +> +get_signature( + RT(ClassT::*)( T0 , T1) + , Target* +) +{ + return mpl::vector4< + RT + , typename most_derived::type& + , T0 , T1 + >(); +} +template < + class RT, class ClassT , class T0 , class T1> +inline mpl::vector4< + RT, ClassT& , T0 , T1> +get_signature(RT(ClassT::*)( T0 , T1) const) +{ + return mpl::vector4< + RT, ClassT& , T0 , T1 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 +> +inline mpl::vector4< + RT + , typename most_derived::type& + , T0 , T1 +> +get_signature( + RT(ClassT::*)( T0 , T1) const + , Target* +) +{ + return mpl::vector4< + RT + , typename most_derived::type& + , T0 , T1 + >(); +} +template < + class RT, class ClassT , class T0 , class T1> +inline mpl::vector4< + RT, ClassT& , T0 , T1> +get_signature(RT(ClassT::*)( T0 , T1) volatile) +{ + return mpl::vector4< + RT, ClassT& , T0 , T1 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 +> +inline mpl::vector4< + RT + , typename most_derived::type& + , T0 , T1 +> +get_signature( + RT(ClassT::*)( T0 , T1) volatile + , Target* +) +{ + return mpl::vector4< + RT + , typename most_derived::type& + , T0 , T1 + >(); +} +template < + class RT, class ClassT , class T0 , class T1> +inline mpl::vector4< + RT, ClassT& , T0 , T1> +get_signature(RT(ClassT::*)( T0 , T1) const volatile) +{ + return mpl::vector4< + RT, ClassT& , T0 , T1 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 +> +inline mpl::vector4< + RT + , typename most_derived::type& + , T0 , T1 +> +get_signature( + RT(ClassT::*)( T0 , T1) const volatile + , Target* +) +{ + return mpl::vector4< + RT + , typename most_derived::type& + , T0 , T1 + >(); +} +template < + class RT , class T0 , class T1 , class T2> +inline mpl::vector4< + RT , T0 , T1 , T2> +get_signature(RT(*)( T0 , T1 , T2), void* = 0) +{ + return mpl::vector4< + RT , T0 , T1 , T2 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2> +inline mpl::vector5< + RT, ClassT& , T0 , T1 , T2> +get_signature(RT(ClassT::*)( T0 , T1 , T2) ) +{ + return mpl::vector5< + RT, ClassT& , T0 , T1 , T2 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 +> +inline mpl::vector5< + RT + , typename most_derived::type& + , T0 , T1 , T2 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2) + , Target* +) +{ + return mpl::vector5< + RT + , typename most_derived::type& + , T0 , T1 , T2 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2> +inline mpl::vector5< + RT, ClassT& , T0 , T1 , T2> +get_signature(RT(ClassT::*)( T0 , T1 , T2) const) +{ + return mpl::vector5< + RT, ClassT& , T0 , T1 , T2 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 +> +inline mpl::vector5< + RT + , typename most_derived::type& + , T0 , T1 , T2 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2) const + , Target* +) +{ + return mpl::vector5< + RT + , typename most_derived::type& + , T0 , T1 , T2 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2> +inline mpl::vector5< + RT, ClassT& , T0 , T1 , T2> +get_signature(RT(ClassT::*)( T0 , T1 , T2) volatile) +{ + return mpl::vector5< + RT, ClassT& , T0 , T1 , T2 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 +> +inline mpl::vector5< + RT + , typename most_derived::type& + , T0 , T1 , T2 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2) volatile + , Target* +) +{ + return mpl::vector5< + RT + , typename most_derived::type& + , T0 , T1 , T2 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2> +inline mpl::vector5< + RT, ClassT& , T0 , T1 , T2> +get_signature(RT(ClassT::*)( T0 , T1 , T2) const volatile) +{ + return mpl::vector5< + RT, ClassT& , T0 , T1 , T2 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 +> +inline mpl::vector5< + RT + , typename most_derived::type& + , T0 , T1 , T2 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2) const volatile + , Target* +) +{ + return mpl::vector5< + RT + , typename most_derived::type& + , T0 , T1 , T2 + >(); +} +template < + class RT , class T0 , class T1 , class T2 , class T3> +inline mpl::vector5< + RT , T0 , T1 , T2 , T3> +get_signature(RT(*)( T0 , T1 , T2 , T3), void* = 0) +{ + return mpl::vector5< + RT , T0 , T1 , T2 , T3 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3> +inline mpl::vector6< + RT, ClassT& , T0 , T1 , T2 , T3> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3) ) +{ + return mpl::vector6< + RT, ClassT& , T0 , T1 , T2 , T3 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 +> +inline mpl::vector6< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3) + , Target* +) +{ + return mpl::vector6< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3> +inline mpl::vector6< + RT, ClassT& , T0 , T1 , T2 , T3> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3) const) +{ + return mpl::vector6< + RT, ClassT& , T0 , T1 , T2 , T3 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 +> +inline mpl::vector6< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3) const + , Target* +) +{ + return mpl::vector6< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3> +inline mpl::vector6< + RT, ClassT& , T0 , T1 , T2 , T3> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3) volatile) +{ + return mpl::vector6< + RT, ClassT& , T0 , T1 , T2 , T3 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 +> +inline mpl::vector6< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3) volatile + , Target* +) +{ + return mpl::vector6< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3> +inline mpl::vector6< + RT, ClassT& , T0 , T1 , T2 , T3> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3) const volatile) +{ + return mpl::vector6< + RT, ClassT& , T0 , T1 , T2 , T3 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 +> +inline mpl::vector6< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3) const volatile + , Target* +) +{ + return mpl::vector6< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 + >(); +} +template < + class RT , class T0 , class T1 , class T2 , class T3 , class T4> +inline mpl::vector6< + RT , T0 , T1 , T2 , T3 , T4> +get_signature(RT(*)( T0 , T1 , T2 , T3 , T4), void* = 0) +{ + return mpl::vector6< + RT , T0 , T1 , T2 , T3 , T4 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4> +inline mpl::vector7< + RT, ClassT& , T0 , T1 , T2 , T3 , T4> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4) ) +{ + return mpl::vector7< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 +> +inline mpl::vector7< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4) + , Target* +) +{ + return mpl::vector7< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4> +inline mpl::vector7< + RT, ClassT& , T0 , T1 , T2 , T3 , T4> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4) const) +{ + return mpl::vector7< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 +> +inline mpl::vector7< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4) const + , Target* +) +{ + return mpl::vector7< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4> +inline mpl::vector7< + RT, ClassT& , T0 , T1 , T2 , T3 , T4> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4) volatile) +{ + return mpl::vector7< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 +> +inline mpl::vector7< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4) volatile + , Target* +) +{ + return mpl::vector7< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4> +inline mpl::vector7< + RT, ClassT& , T0 , T1 , T2 , T3 , T4> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4) const volatile) +{ + return mpl::vector7< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 +> +inline mpl::vector7< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4) const volatile + , Target* +) +{ + return mpl::vector7< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 + >(); +} +template < + class RT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5> +inline mpl::vector7< + RT , T0 , T1 , T2 , T3 , T4 , T5> +get_signature(RT(*)( T0 , T1 , T2 , T3 , T4 , T5), void* = 0) +{ + return mpl::vector7< + RT , T0 , T1 , T2 , T3 , T4 , T5 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5> +inline mpl::vector8< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5) ) +{ + return mpl::vector8< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 +> +inline mpl::vector8< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5) + , Target* +) +{ + return mpl::vector8< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5> +inline mpl::vector8< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5) const) +{ + return mpl::vector8< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 +> +inline mpl::vector8< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5) const + , Target* +) +{ + return mpl::vector8< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5> +inline mpl::vector8< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5) volatile) +{ + return mpl::vector8< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 +> +inline mpl::vector8< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5) volatile + , Target* +) +{ + return mpl::vector8< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5> +inline mpl::vector8< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile) +{ + return mpl::vector8< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 +> +inline mpl::vector8< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile + , Target* +) +{ + return mpl::vector8< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 + >(); +} +template < + class RT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6> +inline mpl::vector8< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6> +get_signature(RT(*)( T0 , T1 , T2 , T3 , T4 , T5 , T6), void* = 0) +{ + return mpl::vector8< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6> +inline mpl::vector9< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) ) +{ + return mpl::vector9< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 +> +inline mpl::vector9< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) + , Target* +) +{ + return mpl::vector9< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6> +inline mpl::vector9< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const) +{ + return mpl::vector9< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 +> +inline mpl::vector9< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const + , Target* +) +{ + return mpl::vector9< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6> +inline mpl::vector9< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile) +{ + return mpl::vector9< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 +> +inline mpl::vector9< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile + , Target* +) +{ + return mpl::vector9< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6> +inline mpl::vector9< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile) +{ + return mpl::vector9< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 +> +inline mpl::vector9< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile + , Target* +) +{ + return mpl::vector9< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 + >(); +} +template < + class RT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7> +inline mpl::vector9< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7> +get_signature(RT(*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7), void* = 0) +{ + return mpl::vector9< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7> +inline mpl::vector10< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) ) +{ + return mpl::vector10< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 +> +inline mpl::vector10< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) + , Target* +) +{ + return mpl::vector10< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7> +inline mpl::vector10< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const) +{ + return mpl::vector10< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 +> +inline mpl::vector10< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const + , Target* +) +{ + return mpl::vector10< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7> +inline mpl::vector10< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile) +{ + return mpl::vector10< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 +> +inline mpl::vector10< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile + , Target* +) +{ + return mpl::vector10< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7> +inline mpl::vector10< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile) +{ + return mpl::vector10< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 +> +inline mpl::vector10< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile + , Target* +) +{ + return mpl::vector10< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 + >(); +} +template < + class RT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8> +inline mpl::vector10< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8> +get_signature(RT(*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8), void* = 0) +{ + return mpl::vector10< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8> +inline mpl::vector11< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) ) +{ + return mpl::vector11< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 +> +inline mpl::vector11< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) + , Target* +) +{ + return mpl::vector11< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8> +inline mpl::vector11< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const) +{ + return mpl::vector11< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 +> +inline mpl::vector11< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const + , Target* +) +{ + return mpl::vector11< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8> +inline mpl::vector11< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile) +{ + return mpl::vector11< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 +> +inline mpl::vector11< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile + , Target* +) +{ + return mpl::vector11< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8> +inline mpl::vector11< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile) +{ + return mpl::vector11< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 +> +inline mpl::vector11< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile + , Target* +) +{ + return mpl::vector11< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 + >(); +} +template < + class RT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9> +inline mpl::vector11< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> +get_signature(RT(*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9), void* = 0) +{ + return mpl::vector11< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9> +inline mpl::vector12< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) ) +{ + return mpl::vector12< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 +> +inline mpl::vector12< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) + , Target* +) +{ + return mpl::vector12< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9> +inline mpl::vector12< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const) +{ + return mpl::vector12< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 +> +inline mpl::vector12< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const + , Target* +) +{ + return mpl::vector12< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9> +inline mpl::vector12< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile) +{ + return mpl::vector12< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 +> +inline mpl::vector12< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile + , Target* +) +{ + return mpl::vector12< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9> +inline mpl::vector12< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile) +{ + return mpl::vector12< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 +> +inline mpl::vector12< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile + , Target* +) +{ + return mpl::vector12< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 + >(); +} +template < + class RT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10> +inline mpl::vector12< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10> +get_signature(RT(*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10), void* = 0) +{ + return mpl::vector12< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10> +inline mpl::vector13< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) ) +{ + return mpl::vector13< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 +> +inline mpl::vector13< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) + , Target* +) +{ + return mpl::vector13< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10> +inline mpl::vector13< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const) +{ + return mpl::vector13< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 +> +inline mpl::vector13< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const + , Target* +) +{ + return mpl::vector13< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10> +inline mpl::vector13< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile) +{ + return mpl::vector13< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 +> +inline mpl::vector13< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile + , Target* +) +{ + return mpl::vector13< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10> +inline mpl::vector13< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile) +{ + return mpl::vector13< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 +> +inline mpl::vector13< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile + , Target* +) +{ + return mpl::vector13< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 + >(); +} +template < + class RT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11> +inline mpl::vector13< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11> +get_signature(RT(*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11), void* = 0) +{ + return mpl::vector13< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11> +inline mpl::vector14< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) ) +{ + return mpl::vector14< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 +> +inline mpl::vector14< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) + , Target* +) +{ + return mpl::vector14< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11> +inline mpl::vector14< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const) +{ + return mpl::vector14< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 +> +inline mpl::vector14< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const + , Target* +) +{ + return mpl::vector14< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11> +inline mpl::vector14< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile) +{ + return mpl::vector14< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 +> +inline mpl::vector14< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile + , Target* +) +{ + return mpl::vector14< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11> +inline mpl::vector14< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile) +{ + return mpl::vector14< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 +> +inline mpl::vector14< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile + , Target* +) +{ + return mpl::vector14< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 + >(); +} +template < + class RT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12> +inline mpl::vector14< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12> +get_signature(RT(*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12), void* = 0) +{ + return mpl::vector14< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12> +inline mpl::vector15< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) ) +{ + return mpl::vector15< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 +> +inline mpl::vector15< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) + , Target* +) +{ + return mpl::vector15< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12> +inline mpl::vector15< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const) +{ + return mpl::vector15< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 +> +inline mpl::vector15< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const + , Target* +) +{ + return mpl::vector15< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12> +inline mpl::vector15< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile) +{ + return mpl::vector15< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 +> +inline mpl::vector15< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile + , Target* +) +{ + return mpl::vector15< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12> +inline mpl::vector15< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile) +{ + return mpl::vector15< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 +> +inline mpl::vector15< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile + , Target* +) +{ + return mpl::vector15< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 + >(); +} +template < + class RT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13> +inline mpl::vector15< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13> +get_signature(RT(*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13), void* = 0) +{ + return mpl::vector15< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13> +inline mpl::vector16< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) ) +{ + return mpl::vector16< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 +> +inline mpl::vector16< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) + , Target* +) +{ + return mpl::vector16< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13> +inline mpl::vector16< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const) +{ + return mpl::vector16< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 +> +inline mpl::vector16< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const + , Target* +) +{ + return mpl::vector16< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13> +inline mpl::vector16< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile) +{ + return mpl::vector16< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 +> +inline mpl::vector16< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile + , Target* +) +{ + return mpl::vector16< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13> +inline mpl::vector16< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile) +{ + return mpl::vector16< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 +> +inline mpl::vector16< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile + , Target* +) +{ + return mpl::vector16< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 + >(); +} +template < + class RT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> +inline mpl::vector16< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14> +get_signature(RT(*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14), void* = 0) +{ + return mpl::vector16< + RT , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> +inline mpl::vector17< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) ) +{ + return mpl::vector17< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 +> +inline mpl::vector17< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) + , Target* +) +{ + return mpl::vector17< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> +inline mpl::vector17< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const) +{ + return mpl::vector17< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 +> +inline mpl::vector17< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const + , Target* +) +{ + return mpl::vector17< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> +inline mpl::vector17< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile) +{ + return mpl::vector17< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 +> +inline mpl::vector17< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile + , Target* +) +{ + return mpl::vector17< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 + >(); +} +template < + class RT, class ClassT , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> +inline mpl::vector17< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14> +get_signature(RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile) +{ + return mpl::vector17< + RT, ClassT& , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 + >(); +} +template < + class Target + , class RT + , class ClassT + , class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14 +> +inline mpl::vector17< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 +> +get_signature( + RT(ClassT::*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile + , Target* +) +{ + return mpl::vector17< + RT + , typename most_derived::type& + , T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 + >(); +} +}}} +namespace boost { namespace python { namespace objects { + handle<> function_handle_impl(py_function const& f); +template +inline handle<> function_handle(F const& f, Signature) +{ + enum { n_arguments = mpl::size::value - 1 }; + return objects::function_handle_impl( + python::detail::caller< + F,default_call_policies,Signature + >( + f, default_call_policies() + ) + ); +} +template +handle<> make_function_handle(F f) +{ + return objects::function_handle(f, python::detail::get_signature(f)); +} +}}} + +namespace boost { namespace python { namespace detail { +template +struct is_string_literal : mpl::false_ +{ +}; +template +struct is_string_literal : mpl::true_ +{ +}; +}}} +namespace boost { +namespace detail { +template struct function_traits_helper; +template +struct function_traits_helper +{ + static const unsigned arity = 0; + typedef R result_type; +}; +template +struct function_traits_helper +{ + static const unsigned arity = 1; + typedef R result_type; + typedef T1 arg1_type; + typedef T1 argument_type; +}; +template +struct function_traits_helper +{ + static const unsigned arity = 2; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T1 first_argument_type; + typedef T2 second_argument_type; +}; +template +struct function_traits_helper +{ + static const unsigned arity = 3; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; +}; +template +struct function_traits_helper +{ + static const unsigned arity = 4; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; +}; +template +struct function_traits_helper +{ + static const unsigned arity = 5; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; +}; +template +struct function_traits_helper +{ + static const unsigned arity = 6; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; +}; +template +struct function_traits_helper +{ + static const unsigned arity = 7; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; + typedef T7 arg7_type; +}; +template +struct function_traits_helper +{ + static const unsigned arity = 8; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; + typedef T7 arg7_type; + typedef T8 arg8_type; +}; +template +struct function_traits_helper +{ + static const unsigned arity = 9; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; + typedef T7 arg7_type; + typedef T8 arg8_type; + typedef T9 arg9_type; +}; +template +struct function_traits_helper +{ + static const unsigned arity = 10; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; + typedef T7 arg7_type; + typedef T8 arg8_type; + typedef T9 arg9_type; + typedef T10 arg10_type; +}; +} +template +struct function_traits : + public detail::function_traits_helper::type> +{ +}; +} +namespace boost { namespace python { namespace converter { +template struct is_object_manager; +namespace detail +{ + template + struct function_arg_to_python : handle<> + { + function_arg_to_python(T const& x); + }; + template + struct reference_arg_to_python : handle<> + { + reference_arg_to_python(T& x); + private: + static PyObject* get_object(T& x); + }; + template + struct shared_ptr_arg_to_python : handle<> + { + shared_ptr_arg_to_python(T const& x); + private: + static PyObject* get_object(T& x); + }; + template + struct value_arg_to_python : arg_to_python_base + { + value_arg_to_python(T const&); + }; + template + struct pointer_deep_arg_to_python : arg_to_python_base + { + pointer_deep_arg_to_python(Ptr); + }; + template + struct pointer_shallow_arg_to_python : handle<> + { + pointer_shallow_arg_to_python(Ptr); + private: + static PyObject* get_object(Ptr p); + }; + template + struct object_manager_arg_to_python + { + object_manager_arg_to_python(T const& x) : m_src(x) {} + PyObject* get() const + { + return python::upcast(get_managed_object(m_src, tag)); + } + private: + T const& m_src; + }; + template + struct select_arg_to_python + { + typedef typename unwrap_reference::type unwrapped_referent; + typedef typename unwrap_pointer::type unwrapped_ptr; + typedef typename mpl::if_< + python::detail::is_string_literal + , arg_to_python + , typename mpl::if_< + python::detail::value_is_shared_ptr + , shared_ptr_arg_to_python + , typename mpl::if_< + mpl::or_< + is_function + , indirect_traits::is_pointer_to_function + , is_member_function_pointer + > + , function_arg_to_python + , typename mpl::if_< + is_object_manager + , object_manager_arg_to_python + , typename mpl::if_< + is_pointer + , pointer_deep_arg_to_python + , typename mpl::if_< + is_pointer_wrapper + , pointer_shallow_arg_to_python + , typename mpl::if_< + is_reference_wrapper + , reference_arg_to_python + , value_arg_to_python + >::type + >::type + >::type + >::type + >::type + >::type + >::type + type; + }; +} +template +struct arg_to_python + : detail::select_arg_to_python::type +{ + typedef typename detail::select_arg_to_python::type base; + public: + arg_to_python(T const& x); +}; +namespace detail +{ + using python::detail::yes_convertible; + using python::detail::no_convertible; + using python::detail::unspecialized; + template struct cannot_convert_raw_PyObject; + template + struct reject_raw_object_helper + { + static void error(Convertibility) + { + cannot_convert_raw_PyObject::to_python_use_handle_instead(); + } + static void error(...) {} + }; + template + inline void reject_raw_object_ptr(T*) + { + reject_raw_object_helper::error( + python::detail::convertible::check((T*)0)); + typedef typename remove_cv::type value_type; + reject_raw_object_helper::error( + python::detail::convertible::check( + (base_type_traits*)0 + )); + } + template + inline function_arg_to_python::function_arg_to_python(T const& x) + : handle<>(python::objects::make_function_handle(x)) + { + } + template + inline value_arg_to_python::value_arg_to_python(T const& x) + : arg_to_python_base(&x, registered::converters) + { + } + template + inline pointer_deep_arg_to_python::pointer_deep_arg_to_python(Ptr x) + : arg_to_python_base(x, registered_pointee::converters) + { + detail::reject_raw_object_ptr((Ptr)0); + } + template + inline PyObject* reference_arg_to_python::get_object(T& x) + { + to_python_indirect convert; + return convert(x); + } + template + inline reference_arg_to_python::reference_arg_to_python(T& x) + : handle<>(reference_arg_to_python::get_object(x)) + { + } + template + inline shared_ptr_arg_to_python::shared_ptr_arg_to_python(T const& x) + : handle<>(shared_ptr_to_python(x)) + { + } + template + inline pointer_shallow_arg_to_python::pointer_shallow_arg_to_python(Ptr x) + : handle<>(pointer_shallow_arg_to_python::get_object(x)) + { + detail::reject_raw_object_ptr((Ptr)0); + } + template + inline PyObject* pointer_shallow_arg_to_python::get_object(Ptr x) + { + to_python_indirect convert; + return convert(x); + } +} +template +inline arg_to_python::arg_to_python(T const& x) + : base(x) +{} +}}} +namespace boost { namespace python { namespace detail { +struct void_return +{ + void_return() {} + private: + void operator=(void_return const&); +}; +template +struct returnable +{ + typedef T type; +}; +}}} +namespace boost { namespace python { namespace converter { +template struct is_object_manager; +namespace detail +{ + template + struct return_pointer_from_python + { + typedef T result_type; + T operator()(PyObject*) const; + }; + template + struct return_reference_from_python + { + typedef T result_type; + T operator()(PyObject*) const; + }; + template + struct return_rvalue_from_python + { + typedef T result_type; + return_rvalue_from_python(); + result_type operator()(PyObject*); + private: + rvalue_from_python_data m_data; + }; + template + struct return_object_manager_from_python + { + typedef T result_type; + result_type operator()(PyObject*) const; + }; + template + struct select_return_from_python + { + static const bool obj_mgr = is_object_manager::value + ; + static const bool ptr = is_pointer::value + ; + static const bool ref = is_reference::value + ; + typedef typename mpl::if_c< + obj_mgr + , return_object_manager_from_python + , typename mpl::if_c< + ptr + , return_pointer_from_python + , typename mpl::if_c< + ref + , return_reference_from_python + , return_rvalue_from_python + >::type + >::type + >::type type; + }; +} +template +struct return_from_python + : detail::select_return_from_python::type +{ +}; +template <> +struct return_from_python +{ + typedef python::detail::returnable::type result_type; + result_type operator()(PyObject* x) const + { + (void_result_from_python)(x); + } +}; +namespace detail +{ + template + inline return_rvalue_from_python::return_rvalue_from_python() + : m_data( + const_cast(®istered::converters) + ) + { + } + template + inline typename return_rvalue_from_python::result_type + return_rvalue_from_python::operator()(PyObject* obj) + { + handle<> holder(obj); + return *(T*) + (rvalue_result_from_python)(obj, m_data.stage1); + } + template + inline T return_reference_from_python::operator()(PyObject* obj) const + { + return python::detail::void_ptr_to_reference( + (reference_result_from_python)(obj, registered::converters) + , (T(*)())0); + } + template + inline T return_pointer_from_python::operator()(PyObject* obj) const + { + return T( + (pointer_result_from_python)(obj, registered_pointee::converters) + ); + } + template + inline T return_object_manager_from_python::operator()(PyObject* obj) const + { + return T( + object_manager_traits::adopt(expect_non_null(obj)) + ); + } +} +}}} +namespace boost { namespace python { +template < + class R + + > +typename detail::returnable::type +call(PyObject* callable + + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" ")") + + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" ")") + , converter::arg_to_python(a0).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 , class A3 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() , converter::arg_to_python(a11).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() , converter::arg_to_python(a11).get() , converter::arg_to_python(a12).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() , converter::arg_to_python(a11).get() , converter::arg_to_python(a12).get() , converter::arg_to_python(a13).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 , class A14 + > +typename detail::returnable::type +call(PyObject* callable + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallFunction( + callable + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() , converter::arg_to_python(a11).get() , converter::arg_to_python(a12).get() , converter::arg_to_python(a13).get() , converter::arg_to_python(a14).get() + ); + converter::return_from_python converter; + return converter(result); +} +}} +namespace boost { namespace python { +template class def_visitor; +template class class_; +class def_visitor_access +{ + template friend class def_visitor; + template + static void visit(V const& v, classT& c) + { + v.derived_visitor().visit(c); + } + template + static void visit( + V const& v + , classT& c + , char const* name + , OptionalArgs const& options + ) + { + v.derived_visitor().visit(c, name, options); + } +}; +template +class def_visitor +{ + friend class def_visitor_access; + template friend class class_; + template + void visit(classT& c) const + { + def_visitor_access::visit(*this, c); + } + template + void visit(classT& c, char const* name, OptionalArgs const& options) const + { + def_visitor_access::visit(*this, c, name, options); + } + protected: + DerivedVisitor const& derived_visitor() const + { + return static_cast(*this); + } +}; +}} +namespace boost { namespace python { namespace objects { + void add_to_namespace( + object const& name_space, char const* name, object const& attribute); + void add_to_namespace( + object const& name_space, char const* name, object const& attribute, char const* doc); +}}} +namespace boost { namespace python { namespace detail { + struct not_specified {}; +}}} +namespace boost { namespace python { namespace detail { +template +struct def_helper; +}}} +namespace boost { namespace python { +namespace detail +{ + class kwds_proxy; + class args_proxy; +} +namespace converter +{ + template struct arg_to_python; +} +namespace api +{ + template class proxy; + struct const_attribute_policies; + struct attribute_policies; + struct const_objattribute_policies; + struct objattribute_policies; + struct const_item_policies; + struct item_policies; + struct const_slice_policies; + struct slice_policies; + class slice_nil; + typedef proxy const_object_attribute; + typedef proxy object_attribute; + typedef proxy const_object_objattribute; + typedef proxy object_objattribute; + typedef proxy const_object_item; + typedef proxy object_item; + typedef proxy const_object_slice; + typedef proxy object_slice; + template struct is_proxy : mpl::false_ { }; template < class T0 > struct is_proxy< boost::python::api::proxy< T0 > > : mpl::true_ { }; + template struct object_initializer; + class object; + typedef PyObject* (object::*bool_type)() const; + template + class object_operators : public def_visitor + { + protected: + typedef object const& object_cref; + public: + object operator()() const; + template < class A0> + typename detail::dependent::type + operator()( A0 const& a0) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0); + } + template < class A0 , class A1> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1); + } + template < class A0 , class A1 , class A2> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2); + } + template < class A0 , class A1 , class A2 , class A3> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2 , a3); + } + template < class A0 , class A1 , class A2 , class A3 , class A4> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2 , a3 , a4); + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2 , a3 , a4 , a5); + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2 , a3 , a4 , a5 , a6); + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7); + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8); + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9); + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10); + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11); + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12); + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13); + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 , class A14> + typename detail::dependent::type + operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14) const + { + typedef typename detail::dependent::type obj; + U const& self = *static_cast(this); + return call(get_managed_object(self, tag), a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13 , a14); + } + detail::args_proxy operator* () const; + object operator()(detail::args_proxy const &args) const; + object operator()(detail::args_proxy const &args, + detail::kwds_proxy const &kwds) const; + operator bool_type() const; + bool operator!() const; + const_object_attribute attr(char const*) const; + object_attribute attr(char const*); + const_object_objattribute attr(object const&) const; + object_objattribute attr(object const&); + template + object contains(T const& key) const; + const_object_item operator[](object_cref) const; + object_item operator[](object_cref); + template + const_object_item + operator[](T const& key) const + ; + template + object_item + operator[](T const& key) + ; + const_object_slice slice(object_cref, object_cref) const; + object_slice slice(object_cref, object_cref); + const_object_slice slice(slice_nil, object_cref) const; + object_slice slice(slice_nil, object_cref); + const_object_slice slice(object_cref, slice_nil) const; + object_slice slice(object_cref, slice_nil); + const_object_slice slice(slice_nil, slice_nil) const; + object_slice slice(slice_nil, slice_nil); + template + const_object_slice + slice(T const& start, V const& end) const + ; + template + object_slice + slice(T const& start, V const& end) + ; + private: + template + void visit(ClassT& cl, char const* name, python::detail::def_helper const& helper) const + { + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((is_same::value || detail::is_string_literal::value)) == 0 ? false : true) >)> + boost_static_assert_typedef_209; + objects::add_to_namespace(cl, name, this->derived_visitor(), helper.doc()); + } + friend class python::def_visitor_access; + private: + typedef object const& object_cref2; + }; + struct object_base : object_operators + { + inline object_base(object_base const&); + inline object_base(PyObject* ptr); + inline object_base& operator=(object_base const& rhs); + inline ~object_base(); + inline PyObject* ptr() const; + private: + PyObject* m_ptr; + }; + template + struct is_derived + : is_convertible< + typename remove_reference::type* + , U const* + > + {}; + template + typename objects::unforward_cref::type do_unforward_cref(T const& x) + { + return x; + } + class object; + template + PyObject* object_base_initializer(T const& x) + { + typedef typename is_derived< + typename objects::unforward_cref::type + , object + >::type is_obj; + return object_initializer< + typename unwrap_reference::type + >::get( + x + , is_obj() + ); + } + class object : public object_base + { + public: + object(); + template + explicit object( + T const& x + ) + : object_base(object_base_initializer(x)) + { + } + explicit object(handle<> const&); + private: + public: + explicit object(detail::borrowed_reference); + explicit object(detail::new_reference); + explicit object(detail::new_non_null_reference); + }; + template + struct object_initializer_impl + { + static PyObject* + get(object const& x, mpl::true_) + { + return python::incref(x.ptr()); + } + template + static PyObject* + get(T const& x, mpl::false_) + { + return python::incref(converter::arg_to_python(x).get()); + } + }; + template <> + struct object_initializer_impl + { + template + static PyObject* + get(proxy const& x, mpl::false_) + { + return python::incref(x.operator object().ptr()); + } + }; + template <> + struct object_initializer_impl + { + template + static PyObject* + get(T const& x, U) + { + return python::incref(get_managed_object(x, boost::python::tag)); + } + }; + template <> + struct object_initializer_impl + {}; + template + struct object_initializer : object_initializer_impl< + is_proxy::value + , converter::is_object_manager::value + > + {}; +} +using api::object; +template struct extract; +namespace detail +{ +class call_proxy +{ +public: + call_proxy(object target) : m_target(target) {} + operator object() const { return m_target;} + private: + object m_target; +}; +class kwds_proxy : public call_proxy +{ +public: + kwds_proxy(object o = object()) : call_proxy(o) {} +}; +class args_proxy : public call_proxy +{ +public: + args_proxy(object o) : call_proxy(o) {} + kwds_proxy operator* () const { return kwds_proxy(*this);} +}; +} +template +detail::args_proxy api::object_operators::operator* () const +{ + object_cref2 x = *static_cast(this); + return boost::python::detail::args_proxy(x); +} +template +object api::object_operators::operator()(detail::args_proxy const &args) const +{ + U const& self = *static_cast(this); + PyObject *result = PyObject_Call(get_managed_object(self, boost::python::tag), + args.operator object().ptr(), + 0); + return object(boost::python::detail::new_reference(result)); +} +template +object api::object_operators::operator()(detail::args_proxy const &args, + detail::kwds_proxy const &kwds) const +{ + U const& self = *static_cast(this); + PyObject *result = PyObject_Call(get_managed_object(self, boost::python::tag), + args.operator object().ptr(), + kwds.operator object().ptr()); + return object(boost::python::detail::new_reference(result)); +} +template +template +object api::object_operators::contains(T const& key) const +{ + return this->attr("__contains__")(object(key)); +} +inline object::object() + : object_base(python::incref((&_Py_NoneStruct))) +{} +inline api::object_base::object_base(object_base const& rhs) + : m_ptr(python::incref(rhs.m_ptr)) +{} +inline api::object_base::object_base(PyObject* p) + : m_ptr(p) +{} +inline api::object_base& api::object_base::operator=(api::object_base const& rhs) +{ + ( ((PyObject*)(rhs.m_ptr))->ob_refcnt++); + if ( --((PyObject*)(this->m_ptr))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(this->m_ptr)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(this->m_ptr)))); + this->m_ptr = rhs.m_ptr; + return *this; +} +inline api::object_base::~object_base() +{ + if ( --((PyObject*)(m_ptr))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(m_ptr)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(m_ptr)))); +} +inline object::object(detail::borrowed_reference p) + : object_base(python::incref((PyObject*)p)) +{} +inline object::object(detail::new_reference p) + : object_base(expect_non_null((PyObject*)p)) +{} +inline object::object(detail::new_non_null_reference p) + : object_base((PyObject*)p) +{} +inline PyObject* api::object_base::ptr() const +{ + return m_ptr; +} +namespace converter +{ + template struct object_manager_traits; + template <> + struct object_manager_traits + { + static const bool is_specialized = true; + static bool check(PyObject*) { return true; } + static python::detail::new_non_null_reference adopt(PyObject* x) + { + return python::detail::new_non_null_reference(x); + } + static PyTypeObject const *get_pytype() {return 0;} + }; +} +inline PyObject* get_managed_object(object const& x, tag_t) +{ + return x.ptr(); +} +}} +namespace boost { namespace python { namespace api { +class slice_nil : public object +{ + public: + slice_nil() : object() {} +}; +static const slice_nil _ = slice_nil(); +template +struct slice_bound +{ + typedef object type; +}; +template <> +struct slice_bound +{ + typedef slice_nil type; +}; +} +using api::slice_nil; +using api::_; +}} + +namespace boost { namespace python { +typedef detail::keywords<1> arg; +typedef arg arg_; +namespace detail +{ + template + struct keywords_base + { + static const std::size_t size = nkeywords; + keyword_range range() const + { + return keyword_range(elements, elements + nkeywords); + } + keyword elements[nkeywords]; + keywords + operator,(python::arg const &k) const; + keywords + operator,(char const *name) const; + }; + template + struct keywords : keywords_base + { + }; + template <> + struct keywords<1> : keywords_base<1> + { + explicit keywords(char const *name) + { + elements[0].name = name; + } + template + python::arg& operator=(T const& value) + { + object z(value); + elements[0].default_value = handle<>(python::borrowed(object(value).ptr())); + return *this; + } + operator detail::keyword const&() const + { + return elements[0]; + } + }; + template + inline + keywords + keywords_base::operator,(python::arg const &k) const + { + keywords const& l = *static_cast const*>(this); + python::detail::keywords res; + std::copy(l.elements, l.elements+nkeywords, res.elements); + res.elements[nkeywords] = k.elements[0]; + return res; + } + template + inline + keywords + keywords_base::operator,(char const *name) const + { + return this->operator,(python::arg(name)); + } + template + struct is_keywords + { + static const bool value = false; + }; + template + struct is_keywords > + { + static const bool value = true; + }; + template + struct is_reference_to_keywords + { + static const bool is_ref = is_reference::value; + typedef typename remove_reference::type deref; + typedef typename remove_cv::type key_t; + static const bool is_key = is_keywords::value; + static const bool value = (is_ref & is_key); + typedef mpl::bool_ type; + + }; +} +inline detail::keywords<1> args(char const* name) +{ + return detail::keywords<1>(name); +} + inline detail::keywords<2> args( char const* name0 , char const* name1) { detail::keywords<2> result; result.elements[0].name = name0; result.elements[1].name = name1; return result; } + inline detail::keywords<3> args( char const* name0 , char const* name1 , char const* name2) { detail::keywords<3> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; return result; } + inline detail::keywords<4> args( char const* name0 , char const* name1 , char const* name2 , char const* name3) { detail::keywords<4> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; result.elements[3].name = name3; return result; } + inline detail::keywords<5> args( char const* name0 , char const* name1 , char const* name2 , char const* name3 , char const* name4) { detail::keywords<5> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; result.elements[3].name = name3; result.elements[4].name = name4; return result; } + inline detail::keywords<6> args( char const* name0 , char const* name1 , char const* name2 , char const* name3 , char const* name4 , char const* name5) { detail::keywords<6> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; result.elements[3].name = name3; result.elements[4].name = name4; result.elements[5].name = name5; return result; } + inline detail::keywords<7> args( char const* name0 , char const* name1 , char const* name2 , char const* name3 , char const* name4 , char const* name5 , char const* name6) { detail::keywords<7> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; result.elements[3].name = name3; result.elements[4].name = name4; result.elements[5].name = name5; result.elements[6].name = name6; return result; } + inline detail::keywords<8> args( char const* name0 , char const* name1 , char const* name2 , char const* name3 , char const* name4 , char const* name5 , char const* name6 , char const* name7) { detail::keywords<8> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; result.elements[3].name = name3; result.elements[4].name = name4; result.elements[5].name = name5; result.elements[6].name = name6; result.elements[7].name = name7; return result; } + inline detail::keywords<9> args( char const* name0 , char const* name1 , char const* name2 , char const* name3 , char const* name4 , char const* name5 , char const* name6 , char const* name7 , char const* name8) { detail::keywords<9> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; result.elements[3].name = name3; result.elements[4].name = name4; result.elements[5].name = name5; result.elements[6].name = name6; result.elements[7].name = name7; result.elements[8].name = name8; return result; } + inline detail::keywords<10> args( char const* name0 , char const* name1 , char const* name2 , char const* name3 , char const* name4 , char const* name5 , char const* name6 , char const* name7 , char const* name8 , char const* name9) { detail::keywords<10> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; result.elements[3].name = name3; result.elements[4].name = name4; result.elements[5].name = name5; result.elements[6].name = name6; result.elements[7].name = name7; result.elements[8].name = name8; result.elements[9].name = name9; return result; } + inline detail::keywords<11> args( char const* name0 , char const* name1 , char const* name2 , char const* name3 , char const* name4 , char const* name5 , char const* name6 , char const* name7 , char const* name8 , char const* name9 , char const* name10) { detail::keywords<11> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; result.elements[3].name = name3; result.elements[4].name = name4; result.elements[5].name = name5; result.elements[6].name = name6; result.elements[7].name = name7; result.elements[8].name = name8; result.elements[9].name = name9; result.elements[10].name = name10; return result; } + inline detail::keywords<12> args( char const* name0 , char const* name1 , char const* name2 , char const* name3 , char const* name4 , char const* name5 , char const* name6 , char const* name7 , char const* name8 , char const* name9 , char const* name10 , char const* name11) { detail::keywords<12> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; result.elements[3].name = name3; result.elements[4].name = name4; result.elements[5].name = name5; result.elements[6].name = name6; result.elements[7].name = name7; result.elements[8].name = name8; result.elements[9].name = name9; result.elements[10].name = name10; result.elements[11].name = name11; return result; } + inline detail::keywords<13> args( char const* name0 , char const* name1 , char const* name2 , char const* name3 , char const* name4 , char const* name5 , char const* name6 , char const* name7 , char const* name8 , char const* name9 , char const* name10 , char const* name11 , char const* name12) { detail::keywords<13> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; result.elements[3].name = name3; result.elements[4].name = name4; result.elements[5].name = name5; result.elements[6].name = name6; result.elements[7].name = name7; result.elements[8].name = name8; result.elements[9].name = name9; result.elements[10].name = name10; result.elements[11].name = name11; result.elements[12].name = name12; return result; } + inline detail::keywords<14> args( char const* name0 , char const* name1 , char const* name2 , char const* name3 , char const* name4 , char const* name5 , char const* name6 , char const* name7 , char const* name8 , char const* name9 , char const* name10 , char const* name11 , char const* name12 , char const* name13) { detail::keywords<14> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; result.elements[3].name = name3; result.elements[4].name = name4; result.elements[5].name = name5; result.elements[6].name = name6; result.elements[7].name = name7; result.elements[8].name = name8; result.elements[9].name = name9; result.elements[10].name = name10; result.elements[11].name = name11; result.elements[12].name = name12; result.elements[13].name = name13; return result; } + inline detail::keywords<15> args( char const* name0 , char const* name1 , char const* name2 , char const* name3 , char const* name4 , char const* name5 , char const* name6 , char const* name7 , char const* name8 , char const* name9 , char const* name10 , char const* name11 , char const* name12 , char const* name13 , char const* name14) { detail::keywords<15> result; result.elements[0].name = name0; result.elements[1].name = name1; result.elements[2].name = name2; result.elements[3].name = name3; result.elements[4].name = name4; result.elements[5].name = name5; result.elements[6].name = name6; result.elements[7].name = name7; result.elements[8].name = name8; result.elements[9].name = name9; result.elements[10].name = name10; result.elements[11].name = name11; result.elements[12].name = name12; result.elements[13].name = name13; result.elements[14].name = name14; return result; } +}} +namespace boost { namespace python { + template < typename Base0 = mpl::void_ > + struct bases : detail::type_list< Base0 >::type + {}; + namespace detail + { + template struct specifies_bases + : mpl::false_ + { + }; + template < class Base0 > + struct specifies_bases< bases< Base0 > > + : mpl::true_ + { + }; + template > + struct select_bases + : mpl::if_< + specifies_bases + , T + , Prev + > + { + }; + } +}} +namespace boost { namespace python { +template < + class R + + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" ")") + + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" ")") + , converter::arg_to_python(a0).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 , class A3 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() , converter::arg_to_python(a11).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() , converter::arg_to_python(a11).get() , converter::arg_to_python(a12).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() , converter::arg_to_python(a11).get() , converter::arg_to_python(a12).get() , converter::arg_to_python(a13).get() + ); + converter::return_from_python converter; + return converter(result); +} +template < + class R + , class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 , class A14 + > +typename detail::returnable::type +call_method(PyObject* self, char const* name + , A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 + , boost::type* = 0 + ) +{ + PyObject* const result = + PyEval_CallMethod( + self + , const_cast(name) + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() , converter::arg_to_python(a11).get() , converter::arg_to_python(a12).get() , converter::arg_to_python(a13).get() , converter::arg_to_python(a14).get() + ); + converter::return_from_python converter; + return converter(result); +} +}} +namespace boost { namespace python { +template < + class T + , class X1 = ::boost::python::detail::not_specified + , class X2 = ::boost::python::detail::not_specified + , class X3 = ::boost::python::detail::not_specified + > +class class_; +}} + +namespace boost { namespace python { +namespace objects { +struct class_base : python::api::object +{ + class_base( + char const* name + , std::size_t num_types + , type_info const*const types + , char const* doc = 0 + ); + void enable_pickling_(bool getstate_manages_dict); + protected: + void add_property( + char const* name, object const& fget, char const* docstr); + void add_property(char const* name, + object const& fget, object const& fset, char const* docstr); + void add_static_property(char const* name, object const& fget); + void add_static_property(char const* name, object const& fget, object const& fset); + void setattr(char const* name, object const&); + void set_instance_size(std::size_t bytes); + void def_no_init(); + void make_method_static(const char *method_name); +}; +}}} +namespace boost +{ + namespace iterators + { + template + struct enabled + { + template + struct base + { + typedef T type; + }; + }; + template<> + struct enabled + { + template + struct base + { + }; + }; + template + struct enable_if + : enabled<(Cond::value)>::template base + { + }; + } +} +namespace boost { namespace python { namespace api { +template +char is_object_operators_helper(object_operators const*); +typedef char (&no_type)[2]; +no_type is_object_operators_helper(...); +template X* make_ptr(); +template +struct is_object_operators +{ + enum { + value + = (sizeof(api::is_object_operators_helper(api::make_ptr())) + + sizeof(api::is_object_operators_helper(api::make_ptr())) + < 4 + ) + }; + typedef mpl::bool_ type; +}; +template +struct enable_binary + : boost::iterators::enable_if, T> +{}; +template +object object_operators::operator()() const +{ + object_cref2 f = *static_cast(this); + return call(f.ptr()); +} +template +inline +object_operators::operator bool_type() const +{ + object_cref2 x = *static_cast(this); + int is_true = PyObject_IsTrue(x.ptr()); + if (is_true < 0) throw_error_already_set(); + return is_true ? &object::ptr : 0; +} +template +inline bool +object_operators::operator!() const +{ + object_cref2 x = *static_cast(this); + int is_true = PyObject_IsTrue(x.ptr()); + if (is_true < 0) throw_error_already_set(); + return !is_true; +} + object operator >(object const& l, object const& r); template typename enable_binary::type operator >(L const& l, R const& r) { return object(l) > object(r); } + object operator >=(object const& l, object const& r); template typename enable_binary::type operator >=(L const& l, R const& r) { return object(l) >= object(r); } + object operator <(object const& l, object const& r); template typename enable_binary::type operator <(L const& l, R const& r) { return object(l) < object(r); } + object operator <=(object const& l, object const& r); template typename enable_binary::type operator <=(L const& l, R const& r) { return object(l) <= object(r); } + object operator ==(object const& l, object const& r); template typename enable_binary::type operator ==(L const& l, R const& r) { return object(l) == object(r); } + object operator !=(object const& l, object const& r); template typename enable_binary::type operator !=(L const& l, R const& r) { return object(l) != object(r); } + object operator +(object const& l, object const& r); template typename enable_binary::type operator +(L const& l, R const& r) { return object(l) + object(r); } + object operator -(object const& l, object const& r); template typename enable_binary::type operator -(L const& l, R const& r) { return object(l) - object(r); } + object operator *(object const& l, object const& r); template typename enable_binary::type operator *(L const& l, R const& r) { return object(l) * object(r); } + object operator /(object const& l, object const& r); template typename enable_binary::type operator /(L const& l, R const& r) { return object(l) / object(r); } + object operator %(object const& l, object const& r); template typename enable_binary::type operator %(L const& l, R const& r) { return object(l) % object(r); } + object operator <<(object const& l, object const& r); template typename enable_binary::type operator <<(L const& l, R const& r) { return object(l) << object(r); } + object operator >>(object const& l, object const& r); template typename enable_binary::type operator >>(L const& l, R const& r) { return object(l) >> object(r); } + object operator &(object const& l, object const& r); template typename enable_binary::type operator &(L const& l, R const& r) { return object(l) & object(r); } + object operator ^(object const& l, object const& r); template typename enable_binary::type operator ^(L const& l, R const& r) { return object(l) ^ object(r); } + object operator |(object const& l, object const& r); template typename enable_binary::type operator |(L const& l, R const& r) { return object(l) | object(r); } + object& operator +=(object& l, object const& r); template object& operator +=(object& l, R const& r) { return l += object(r); } + object& operator -=(object& l, object const& r); template object& operator -=(object& l, R const& r) { return l -= object(r); } + object& operator *=(object& l, object const& r); template object& operator *=(object& l, R const& r) { return l *= object(r); } + object& operator /=(object& l, object const& r); template object& operator /=(object& l, R const& r) { return l /= object(r); } + object& operator %=(object& l, object const& r); template object& operator %=(object& l, R const& r) { return l %= object(r); } + object& operator <<=(object& l, object const& r); template object& operator <<=(object& l, R const& r) { return l <<= object(r); } + object& operator >>=(object& l, object const& r); template object& operator >>=(object& l, R const& r) { return l >>= object(r); } + object& operator &=(object& l, object const& r); template object& operator &=(object& l, R const& r) { return l &= object(r); } + object& operator ^=(object& l, object const& r); template object& operator ^=(object& l, R const& r) { return l ^= object(r); } + object& operator |=(object& l, object const& r); template object& operator |=(object& l, R const& r) { return l |= object(r); } +}}} +namespace boost { namespace python { namespace api { +template +class proxy : public object_operators > +{ + typedef typename Policies::key_type key_type; + typedef proxy const& assignment_self; + public: + proxy(object const& target, key_type const& key); + operator object() const; + proxy const& operator=(assignment_self) const; + template + inline proxy const& operator=(T const& rhs) const + { + Policies::set(m_target, m_key, object(rhs)); + return *this; + } + public: + void del() const; + private: + object m_target; + key_type m_key; +}; +template +inline void del(proxy const& x) +{ + x.del(); +} +template +inline proxy::proxy(object const& target, key_type const& key) + : m_target(target), m_key(key) +{} +template +inline proxy::operator object() const +{ + return Policies::get(m_target, m_key); +} +template +inline proxy const& proxy::operator=(typename proxy::assignment_self rhs) const +{ + return *this = python::object(rhs); +} +template proxy const& operator +=(proxy const& lhs, R const& rhs) { object old(lhs); return lhs = (old += rhs); } +template proxy const& operator -=(proxy const& lhs, R const& rhs) { object old(lhs); return lhs = (old -= rhs); } +template proxy const& operator *=(proxy const& lhs, R const& rhs) { object old(lhs); return lhs = (old *= rhs); } +template proxy const& operator /=(proxy const& lhs, R const& rhs) { object old(lhs); return lhs = (old /= rhs); } +template proxy const& operator %=(proxy const& lhs, R const& rhs) { object old(lhs); return lhs = (old %= rhs); } +template proxy const& operator <<=(proxy const& lhs, R const& rhs) { object old(lhs); return lhs = (old <<= rhs); } +template proxy const& operator >>=(proxy const& lhs, R const& rhs) { object old(lhs); return lhs = (old >>= rhs); } +template proxy const& operator &=(proxy const& lhs, R const& rhs) { object old(lhs); return lhs = (old &= rhs); } +template proxy const& operator ^=(proxy const& lhs, R const& rhs) { object old(lhs); return lhs = (old ^= rhs); } +template proxy const& operator |=(proxy const& lhs, R const& rhs) { object old(lhs); return lhs = (old |= rhs); } +template +inline void proxy::del() const +{ + Policies::del(m_target, m_key); +} +}}} +namespace boost { namespace python { +namespace api +{ + class object; + object getattr(object const& target, object const& key); + object getattr(object const& target, object const& key, object const& default_); + void setattr(object const& target, object const& key, object const& value); + void delattr(object const& target, object const& key); + object getattr(object const& target, char const* key); + object getattr(object const& target, char const* key, object const& default_); + void setattr(object const& target, char const* key, object const& value); + void delattr(object const& target, char const* key); + object getitem(object const& target, object const& key); + void setitem(object const& target, object const& key, object const& value); + void delitem(object const& target, object const& key); + object getslice(object const& target, handle<> const& begin, handle<> const& end); + void setslice(object const& target, handle<> const& begin, handle<> const& end, object const& value); + void delslice(object const& target, handle<> const& begin, handle<> const& end); +} +using api::getattr; +using api::setattr; +using api::delattr; +using api::getitem; +using api::setitem; +using api::delitem; +using api::getslice; +using api::setslice; +using api::delslice; +}} +namespace boost { namespace python { namespace api { +template +object getattr(Target const& target, Key const& key ) +{ + return getattr(object(target), object(key)); +} +template +object getattr(Target const& target, Key const& key, Default const& default_ ) +{ + return getattr(object(target), object(key), object(default_)); +} +template +void setattr(object const& target, Key const& key, Value const& value ) +{ + setattr(target, object(key), object(value)); +} +template +void delattr(object const& target, Key const& key ) +{ + delattr(target, object(key)); +} +template +object getitem(Target const& target, Key const& key ) +{ + return getitem(object(target), object(key)); +} +template +void setitem(object const& target, Key const& key, Value const& value ) +{ + setitem(target, object(key), object(value)); +} +template +void delitem(object const& target, Key const& key ) +{ + delitem(target, object(key)); +} +template +object getslice(Target const& target, Begin const& begin, End const& end) +{ + return getslice(object(target), object(begin), object(end)); +} +template +void setslice(object const& target, Begin const& begin, End const& end, Value const& value) +{ + setslice(target, object(begin), object(end), object(value)); +} +template +void delslice(object const& target, Begin const& begin, End const& end) +{ + delslice(target, object(begin), object(end)); +} +}}} +namespace boost { namespace python { namespace api { +struct const_attribute_policies +{ + typedef char const* key_type; + static object get(object const& target, char const* key); + static object get(object const& target, object const& key); +}; +struct attribute_policies : const_attribute_policies +{ + static object const& set(object const& target, char const* key, object const& value); + static void del(object const&target, char const* key); +}; +struct const_objattribute_policies +{ + typedef object const key_type; + static object get(object const& target, object const& key); +}; +struct objattribute_policies : const_objattribute_policies +{ + static object const& set(object const& target, object const& key, object const& value); + static void del(object const&target, object const& key); +}; +template +inline object_attribute object_operators::attr(char const* name) +{ + object_cref2 x = *static_cast(this); + return object_attribute(x, name); +} +template +inline const_object_attribute object_operators::attr(char const* name) const +{ + object_cref2 x = *static_cast(this); + return const_object_attribute(x, name); +} +template +inline object_objattribute object_operators::attr(object const& name) +{ + object_cref2 x = *static_cast(this); + return object_objattribute(x, name); +} +template +inline const_object_objattribute object_operators::attr(object const& name) const +{ + object_cref2 x = *static_cast(this); + return const_object_objattribute(x, name); +} +inline object const_attribute_policies::get(object const& target, char const* key) +{ + return python::getattr(target, key); +} +inline object const_objattribute_policies::get(object const& target, object const& key) +{ + return python::getattr(target, key); +} +inline object const& attribute_policies::set( + object const& target + , char const* key + , object const& value) +{ + python::setattr(target, key, value); + return value; +} +inline object const& objattribute_policies::set( + object const& target + , object const& key + , object const& value) +{ + python::setattr(target, key, value); + return value; +} +inline void attribute_policies::del( + object const& target + , char const* key) +{ + python::delattr(target, key); +} +inline void objattribute_policies::del( + object const& target + , object const& key) +{ + python::delattr(target, key); +} +}}} +namespace boost { namespace python { namespace api { +struct const_item_policies +{ + typedef object key_type; + static object get(object const& target, object const& key); +}; +struct item_policies : const_item_policies +{ + static object const& set(object const& target, object const& key, object const& value); + static void del(object const& target, object const& key); +}; +template +inline object_item +object_operators::operator[](object_cref key) +{ + object_cref2 x = *static_cast(this); + return object_item(x, key); +} +template +inline const_object_item +object_operators::operator[](object_cref key) const +{ + object_cref2 x = *static_cast(this); + return const_object_item(x, key); +} +template +template +inline const_object_item +object_operators::operator[](T const& key) const +{ + return (*this)[object(key)]; +} +template +template +inline object_item +object_operators::operator[](T const& key) +{ + return (*this)[object(key)]; +} +inline object const_item_policies::get(object const& target, object const& key) +{ + return getitem(target, key); +} +inline object const& item_policies::set( + object const& target + , object const& key + , object const& value) +{ + setitem(target, key, value); + return value; +} +inline void item_policies::del( + object const& target + , object const& key) +{ + delitem(target, key); +} +}}} +namespace boost { namespace python { namespace api { +struct const_slice_policies +{ + typedef std::pair, handle<> > key_type; + static object get(object const& target, key_type const& key); +}; +struct slice_policies : const_slice_policies +{ + static object const& set(object const& target, key_type const& key, object const& value); + static void del(object const& target, key_type const& key); +}; +template +inline slice_policies::key_type slice_key(T x, U y) +{ + return slice_policies::key_type(handle<>(x), handle<>(y)); +} +template +object_slice +object_operators::slice(object_cref start, object_cref finish) +{ + object_cref2 x = *static_cast(this); + return object_slice(x, api::slice_key(borrowed(start.ptr()), borrowed(finish.ptr()))); +} +template +const_object_slice +object_operators::slice(object_cref start, object_cref finish) const +{ + object_cref2 x = *static_cast(this); + return const_object_slice(x, api::slice_key(borrowed(start.ptr()), borrowed(finish.ptr()))); +} +template +object_slice +object_operators::slice(slice_nil, object_cref finish) +{ + object_cref2 x = *static_cast(this); + return object_slice(x, api::slice_key(allow_null((PyObject*)0), borrowed(finish.ptr()))); +} +template +const_object_slice +object_operators::slice(slice_nil, object_cref finish) const +{ + object_cref2 x = *static_cast(this); + return const_object_slice(x, api::slice_key(allow_null((PyObject*)0), borrowed(finish.ptr()))); +} +template +object_slice +object_operators::slice(slice_nil, slice_nil) +{ + object_cref2 x = *static_cast(this); + return object_slice(x, api::slice_key(allow_null((PyObject*)0), allow_null((PyObject*)0))); +} +template +const_object_slice +object_operators::slice(slice_nil, slice_nil) const +{ + object_cref2 x = *static_cast(this); + return const_object_slice(x, api::slice_key(allow_null((PyObject*)0), allow_null((PyObject*)0))); +} +template +object_slice +object_operators::slice(object_cref start, slice_nil) +{ + object_cref2 x = *static_cast(this); + return object_slice(x, api::slice_key(borrowed(start.ptr()), allow_null((PyObject*)0))); +} +template +const_object_slice +object_operators::slice(object_cref start, slice_nil) const +{ + object_cref2 x = *static_cast(this); + return const_object_slice(x, api::slice_key(borrowed(start.ptr()), allow_null((PyObject*)0))); +} +template +template +inline const_object_slice +object_operators::slice(T const& start, V const& end) const +{ + return this->slice( + typename slice_bound::type(start) + , typename slice_bound::type(end)); +} +template +template +inline object_slice +object_operators::slice(T const& start, V const& end) +{ + return this->slice( + typename slice_bound::type(start) + , typename slice_bound::type(end)); +} +inline object const_slice_policies::get(object const& target, key_type const& key) +{ + return getslice(target, key.first, key.second); +} +inline object const& slice_policies::set( + object const& target + , key_type const& key + , object const& value) +{ + setslice(target, key.first, key.second, value); + return value; +} +inline void slice_policies::del( + object const& target + , key_type const& key) +{ + delslice(target, key.first, key.second); +} +}}} +namespace boost { namespace python { + inline ssize_t len(object const& obj) + { + ssize_t result = PyObject_Size(obj.ptr()); + if (PyErr_Occurred()) throw_error_already_set(); + return result; + } +}} +namespace boost { namespace python { +template +struct return_value_policy : BasePolicy_ +{ + typedef ResultConverterGenerator result_converter; +}; +}} +namespace boost { namespace python { +struct return_by_value +{ + template + struct apply + { + typedef to_python_value< + typename detail::value_arg::type + > type; + }; +}; +}} +namespace boost { namespace python { +namespace detail +{ + template + struct reference_existing_object_requires_a_pointer_or_reference_return_type + {} + ; +} +template struct to_python_value; +struct reference_existing_object +{ + template + struct apply + { + static const bool ok = is_pointer::value || is_reference::value + ; + typedef typename mpl::if_c< + ok + , to_python_indirect + , detail::reference_existing_object_requires_a_pointer_or_reference_return_type + >::type type; + }; +}; +}} +namespace boost { namespace python { namespace objects { + PyObject* make_nurse_and_patient(PyObject* nurse, PyObject* patient); +}}} +namespace boost { namespace python { +namespace detail +{ + template + struct get_prev + { + template + static PyObject* execute(ArgumentPackage const& args, PyObject* = 0) + { + int const pre_n = static_cast(N) - 1; + return detail::get(mpl::int_(), args); + } + }; + template <> + struct get_prev<0> + { + template + static PyObject* execute(ArgumentPackage const&, PyObject* zeroth) + { + return zeroth; + } + }; +} +template < + std::size_t custodian + , std::size_t ward + , class BasePolicy_ = default_call_policies +> +struct with_custodian_and_ward : BasePolicy_ +{ + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((custodian != ward) == 0 ? false : true) >)> boost_static_assert_typedef_45; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((custodian > 0) == 0 ? false : true) >)> boost_static_assert_typedef_46; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((ward > 0) == 0 ? false : true) >)> boost_static_assert_typedef_47; + template + static bool precall(ArgumentPackage const& args_) + { + unsigned arity_ = detail::arity(args_); + if (custodian > arity_ || ward > arity_) + { + PyErr_SetString( + PyExc_IndexError + , "boost::python::with_custodian_and_ward: argument index out of range" + ); + return false; + } + PyObject* patient = detail::get_prev::execute(args_); + PyObject* nurse = detail::get_prev::execute(args_); + PyObject* life_support = python::objects::make_nurse_and_patient(nurse, patient); + if (life_support == 0) + return false; + bool result = BasePolicy_::precall(args_); + if (!result) { + if ( --((PyObject*)(life_support))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(life_support)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(life_support)))); + } + return result; + } +}; +template +struct with_custodian_and_ward_postcall : BasePolicy_ +{ + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((custodian != ward) == 0 ? false : true) >)> boost_static_assert_typedef_82; + template + static PyObject* postcall(ArgumentPackage const& args_, PyObject* result) + { + std::size_t arity_ = detail::arity(args_); + if ( (std::max)(custodian, ward) > arity_ ) + { + PyErr_SetString( + PyExc_IndexError + , "boost::python::with_custodian_and_ward_postcall: argument index out of range" + ); + return 0; + } + PyObject* patient = detail::get_prev::execute(args_, result); + PyObject* nurse = detail::get_prev::execute(args_, result); + if (nurse == 0) return 0; + result = BasePolicy_::postcall(args_, result); + if (result == 0) + return 0; + if (python::objects::make_nurse_and_patient(nurse, patient) == 0) + { + if ((result) == __null) ; else if ( --((PyObject*)(result))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(result)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(result)))); + return 0; + } + return result; + } +}; +}} +namespace boost { namespace python { +namespace detail +{ + template + struct return_internal_reference_owner_arg_must_be_greater_than_zero + {} + ; +} +template +struct return_internal_reference + : with_custodian_and_ward_postcall<0, owner_arg, BasePolicy_> +{ + private: + static const bool legal = owner_arg > 0; + public: + typedef typename mpl::if_c< + legal + , reference_existing_object + , detail::return_internal_reference_owner_arg_must_be_greater_than_zero + >::type result_converter; +}; +}} +namespace boost { + namespace detail { + namespace function { + template< + typename FunctionPtr, + typename R , + typename T0 , typename T1 + > + struct function_invoker2 + { + static R invoke(function_buffer& function_ptr , + T0 a0 , T1 a1) + { + FunctionPtr f = reinterpret_cast(function_ptr.func_ptr); + return f( a0 , a1); + } + }; + template< + typename FunctionPtr, + typename R , + typename T0 , typename T1 + > + struct void_function_invoker2 + { + static void + invoke(function_buffer& function_ptr , + T0 a0 , T1 a1) + { + FunctionPtr f = reinterpret_cast(function_ptr.func_ptr); + f( a0 , a1); + } + }; + template< + typename FunctionObj, + typename R , + typename T0 , typename T1 + > + struct function_obj_invoker2 + { + static R invoke(function_buffer& function_obj_ptr , + T0 a0 , T1 a1) + { + FunctionObj* f; + if (function_allows_small_object_optimization::value) + f = reinterpret_cast(&function_obj_ptr.data); + else + f = reinterpret_cast(function_obj_ptr.obj_ptr); + return (*f)( a0 , a1); + } + }; + template< + typename FunctionObj, + typename R , + typename T0 , typename T1 + > + struct void_function_obj_invoker2 + { + static void + invoke(function_buffer& function_obj_ptr , + T0 a0 , T1 a1) + { + FunctionObj* f; + if (function_allows_small_object_optimization::value) + f = reinterpret_cast(&function_obj_ptr.data); + else + f = reinterpret_cast(function_obj_ptr.obj_ptr); + (*f)( a0 , a1); + } + }; + template< + typename FunctionObj, + typename R , + typename T0 , typename T1 + > + struct function_ref_invoker2 + { + static R invoke(function_buffer& function_obj_ptr , + T0 a0 , T1 a1) + { + FunctionObj* f = + reinterpret_cast(function_obj_ptr.obj_ptr); + return (*f)( a0 , a1); + } + }; + template< + typename FunctionObj, + typename R , + typename T0 , typename T1 + > + struct void_function_ref_invoker2 + { + static void + invoke(function_buffer& function_obj_ptr , + T0 a0 , T1 a1) + { + FunctionObj* f = + reinterpret_cast(function_obj_ptr.obj_ptr); + (*f)( a0 , a1); + } + }; + template< + typename MemberPtr, + typename R , + typename T0 , typename T1 + > + struct function_mem_invoker2 + { + static R invoke(function_buffer& function_obj_ptr , + T0 a0 , T1 a1) + { + MemberPtr* f = + reinterpret_cast(&function_obj_ptr.data); + return boost::mem_fn(*f)( a0 , a1); + } + }; + template< + typename MemberPtr, + typename R , + typename T0 , typename T1 + > + struct function_void_mem_invoker2 + { + static void + invoke(function_buffer& function_obj_ptr , + T0 a0 , T1 a1) + { + MemberPtr* f = + reinterpret_cast(&function_obj_ptr.data); + boost::mem_fn(*f)( a0 , a1); + } + }; + template< + typename FunctionPtr, + typename R , + typename T0 , typename T1 + > + struct get_function_invoker2 + { + typedef typename mpl::if_c<(is_void::value), + void_function_invoker2< + FunctionPtr, + R , + T0 , T1 + >, + function_invoker2< + FunctionPtr, + R , + T0 , T1 + > + >::type type; + }; + template< + typename FunctionObj, + typename R , + typename T0 , typename T1 + > + struct get_function_obj_invoker2 + { + typedef typename mpl::if_c<(is_void::value), + void_function_obj_invoker2< + FunctionObj, + R , + T0 , T1 + >, + function_obj_invoker2< + FunctionObj, + R , + T0 , T1 + > + >::type type; + }; + template< + typename FunctionObj, + typename R , + typename T0 , typename T1 + > + struct get_function_ref_invoker2 + { + typedef typename mpl::if_c<(is_void::value), + void_function_ref_invoker2< + FunctionObj, + R , + T0 , T1 + >, + function_ref_invoker2< + FunctionObj, + R , + T0 , T1 + > + >::type type; + }; + template< + typename MemberPtr, + typename R , + typename T0 , typename T1 + > + struct get_member_invoker2 + { + typedef typename mpl::if_c<(is_void::value), + function_void_mem_invoker2< + MemberPtr, + R , + T0 , T1 + >, + function_mem_invoker2< + MemberPtr, + R , + T0 , T1 + > + >::type type; + }; + template + struct get_invoker2 { }; + template<> + struct get_invoker2 + { + template + struct apply + { + typedef typename get_function_invoker2< + FunctionPtr, + R , + T0 , T1 + >::type + invoker_type; + typedef functor_manager manager_type; + }; + template + struct apply_a + { + typedef typename get_function_invoker2< + FunctionPtr, + R , + T0 , T1 + >::type + invoker_type; + typedef functor_manager manager_type; + }; + }; + template<> + struct get_invoker2 + { + template + struct apply + { + typedef typename get_member_invoker2< + MemberPtr, + R , + T0 , T1 + >::type + invoker_type; + typedef functor_manager manager_type; + }; + template + struct apply_a + { + typedef typename get_member_invoker2< + MemberPtr, + R , + T0 , T1 + >::type + invoker_type; + typedef functor_manager manager_type; + }; + }; + template<> + struct get_invoker2 + { + template + struct apply + { + typedef typename get_function_obj_invoker2< + FunctionObj, + R , + T0 , T1 + >::type + invoker_type; + typedef functor_manager manager_type; + }; + template + struct apply_a + { + typedef typename get_function_obj_invoker2< + FunctionObj, + R , + T0 , T1 + >::type + invoker_type; + typedef functor_manager_a manager_type; + }; + }; + template<> + struct get_invoker2 + { + template + struct apply + { + typedef typename get_function_ref_invoker2< + typename RefWrapper::type, + R , + T0 , T1 + >::type + invoker_type; + typedef reference_manager manager_type; + }; + template + struct apply_a + { + typedef typename get_function_ref_invoker2< + typename RefWrapper::type, + R , + T0 , T1 + >::type + invoker_type; + typedef reference_manager manager_type; + }; + }; + template + struct basic_vtable2 + { + typedef R result_type; + typedef result_type (*invoker_type)(function_buffer& + , + T0 , T1); + template + bool assign_to(F f, function_buffer& functor) + { + typedef typename get_function_tag::type tag; + return assign_to(f, functor, tag()); + } + template + bool assign_to_a(F f, function_buffer& functor, Allocator a) + { + typedef typename get_function_tag::type tag; + return assign_to_a(f, functor, a, tag()); + } + void clear(function_buffer& functor) + { + if (base.manager) + base.manager(functor, functor, destroy_functor_tag); + } + private: + template + bool + assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) + { + this->clear(functor); + if (f) { + functor.func_ptr = (void (*)())(f); + return true; + } else { + return false; + } + } + template + bool + assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) + { + return assign_to(f,functor,function_ptr_tag()); + } + template + bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) + { + if (f) { + this->assign_to(mem_fn(f), functor); + return true; + } else { + return false; + } + } + template + bool assign_to_a(MemberPtr f, function_buffer& functor, Allocator a, member_ptr_tag) + { + if (f) { + this->assign_to_a(mem_fn(f), functor, a); + return true; + } else { + return false; + } + } + template + void + assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) + { + new ((void*)&functor.data) FunctionObj(f); + } + template + void + assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) + { + assign_functor(f,functor,mpl::true_()); + } + template + void + assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) + { + functor.obj_ptr = new FunctionObj(f); + } + template + void + assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) + { + typedef functor_wrapper functor_wrapper_type; + typedef typename Allocator::template rebind::other + wrapper_allocator_type; + typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type; + wrapper_allocator_type wrapper_allocator(a); + wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1); + wrapper_allocator.construct(copy, functor_wrapper_type(f,a)); + functor_wrapper_type* new_f = static_cast(copy); + functor.obj_ptr = new_f; + } + template + bool + assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) + { + if (!boost::detail::function::has_empty_target(boost::addressof(f))) { + assign_functor(f, functor, + mpl::bool_<(function_allows_small_object_optimization::value)>()); + return true; + } else { + return false; + } + } + template + bool + assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) + { + if (!boost::detail::function::has_empty_target(boost::addressof(f))) { + assign_functor_a(f, functor, a, + mpl::bool_<(function_allows_small_object_optimization::value)>()); + return true; + } else { + return false; + } + } + template + bool + assign_to(const reference_wrapper& f, + function_buffer& functor, function_obj_ref_tag) + { + functor.obj_ref.obj_ptr = (void *)f.get_pointer(); + functor.obj_ref.is_const_qualified = is_const::value; + functor.obj_ref.is_volatile_qualified = is_volatile::value; + return true; + } + template + bool + assign_to_a(const reference_wrapper& f, + function_buffer& functor, Allocator, function_obj_ref_tag) + { + return assign_to(f,functor,function_obj_ref_tag()); + } + public: + vtable_base base; + invoker_type invoker; + }; + } + } + template< + typename R , + typename T0 , typename T1 + > + class function2 : public function_base + , public std::binary_function + { + public: + typedef R result_type; + private: + typedef boost::detail::function::basic_vtable2< + R , T0 , T1> + vtable_type; + vtable_type* get_vtable() const { + return reinterpret_cast( + reinterpret_cast(vtable) & ~(std::size_t)0x01); + } + struct clear_type {}; + public: + static const int args = 2; + template + struct sig + { + typedef result_type type; + }; + typedef T0 first_argument_type; + typedef T1 second_argument_type; + static const int arity = 2; + typedef T0 arg1_type; typedef T1 arg2_type; + typedef function2 self_type; + function2() : function_base() { } + template + function2(Functor f + ,typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + int>::type = 0 + ) : + function_base() + { + this->assign_to(f); + } + template + function2(Functor f, Allocator a + ,typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + int>::type = 0 + ) : + function_base() + { + this->assign_to_a(f,a); + } + function2(clear_type*) : function_base() { } + function2(const function2& f) : function_base() + { + this->assign_to_own(f); + } + ~function2() { clear(); } + result_type operator()( T0 a0 , T1 a1) const; + template + typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + function2&>::type + operator=(Functor f) + { + this->clear(); + { try { + this->assign_to(f); + } catch(...) { + vtable = 0; + throw;; + } + } + return *this; + } + template + void assign(Functor f, Allocator a) + { + this->clear(); + { try{ + this->assign_to_a(f,a); + } catch(...) { + vtable = 0; + throw;; + } + } + } + function2& operator=(clear_type*) + { + this->clear(); + return *this; + } + function2& operator=(const function2& f) + { + if (&f == this) + return *this; + this->clear(); + { try { + this->assign_to_own(f); + } catch(...) { + vtable = 0; + throw;; + } + } + return *this; + } + void swap(function2& other) + { + if (&other == this) + return; + function2 tmp; + tmp.move_assign(*this); + this->move_assign(other); + other.move_assign(tmp); + } + void clear() + { + if (vtable) { + if (!this->has_trivial_copy_and_destroy()) + get_vtable()->clear(this->functor); + vtable = 0; + } + } + private: + struct dummy { + void nonnull() {}; + }; + typedef void (dummy::*safe_bool)(); + public: + operator safe_bool () const + { return (this->empty())? 0 : &dummy::nonnull; } + bool operator!() const + { return this->empty(); } + private: + void assign_to_own(const function2& f) + { + if (!f.empty()) { + this->vtable = f.vtable; + if (this->has_trivial_copy_and_destroy()) + this->functor = f.functor; + else + get_vtable()->base.manager(f.functor, this->functor, + boost::detail::function::clone_functor_tag); + } + } + template + void assign_to(Functor f) + { + using detail::function::vtable_base; + typedef typename detail::function::get_function_tag::type tag; + typedef detail::function::get_invoker2 get_invoker; + typedef typename get_invoker:: + template apply + handler_type; + typedef typename handler_type::invoker_type invoker_type; + typedef typename handler_type::manager_type manager_type; + static vtable_type stored_vtable = + { { &manager_type::manage }, &invoker_type::invoke }; + if (stored_vtable.assign_to(f, functor)) { + std::size_t value = reinterpret_cast(&stored_vtable.base); + if (boost::has_trivial_copy_constructor::value && + boost::has_trivial_destructor::value && + detail::function::function_allows_small_object_optimization::value) + value |= (std::size_t)0x01; + vtable = reinterpret_cast(value); + } else + vtable = 0; + } + template + void assign_to_a(Functor f,Allocator a) + { + using detail::function::vtable_base; + typedef typename detail::function::get_function_tag::type tag; + typedef detail::function::get_invoker2 get_invoker; + typedef typename get_invoker:: + template apply_a + handler_type; + typedef typename handler_type::invoker_type invoker_type; + typedef typename handler_type::manager_type manager_type; + static vtable_type stored_vtable = + { { &manager_type::manage }, &invoker_type::invoke }; + if (stored_vtable.assign_to_a(f, functor, a)) { + std::size_t value = reinterpret_cast(&stored_vtable.base); + if (boost::has_trivial_copy_constructor::value && + boost::has_trivial_destructor::value && + detail::function::function_allows_small_object_optimization::value) + value |= (std::size_t)0x01; + vtable = reinterpret_cast(value); + } else + vtable = 0; + } + void move_assign(function2& f) + { + if (&f == this) + return; + { try { + if (!f.empty()) { + this->vtable = f.vtable; + if (this->has_trivial_copy_and_destroy()) + this->functor = f.functor; + else + get_vtable()->base.manager(f.functor, this->functor, + boost::detail::function::move_functor_tag); + f.vtable = 0; + } else { + clear(); + } + } catch(...) { + vtable = 0; + throw;; + } + } + } + }; + template + inline void swap(function2< + R , + T0 , T1 + >& f1, + function2< + R , + T0 , T1 + >& f2) + { + f1.swap(f2); + } + template + typename function2< + R , T0 , T1>::result_type + inline + function2 + ::operator()( T0 a0 , T1 a1) const + { + if (this->empty()) + boost::throw_exception(bad_function_call()); + return get_vtable()->invoker + (this->functor , a0 , a1); + } +template + void operator==(const function2< + R , + T0 , T1>&, + const function2< + R , + T0 , T1>&); +template + void operator!=(const function2< + R , + T0 , T1>&, + const function2< + R , + T0 , T1>& ); +template +class function + : public function2 +{ + typedef function2 base_type; + typedef function self_type; + struct clear_type {}; +public: + function() : base_type() {} + template + function(Functor f + ,typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + int>::type = 0 + ) : + base_type(f) + { + } + template + function(Functor f, Allocator a + ,typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + int>::type = 0 + ) : + base_type(f,a) + { + } + function(clear_type*) : base_type() {} + function(const self_type& f) : base_type(static_cast(f)){} + function(const base_type& f) : base_type(static_cast(f)){} + self_type& operator=(const self_type& f) + { + self_type(f).swap(*this); + return *this; + } + template + typename enable_if_c< + (boost::type_traits::ice_not< + (is_integral::value)>::value), + self_type&>::type + operator=(Functor f) + { + self_type(f).swap(*this); + return *this; + } + self_type& operator=(clear_type*) + { + this->clear(); + return *this; + } + self_type& operator=(const base_type& f) + { + self_type(f).swap(*this); + return *this; + } +}; +} +namespace boost { namespace python { +namespace objects +{ + api::object function_object( + py_function const& f + , python::detail::keyword_range const&); + api::object function_object( + py_function const& f + , python::detail::keyword_range const&); + api::object function_object(py_function const& f); + void add_to_namespace( + object const& name_space, char const* name, object const& attribute); + void add_to_namespace( + object const& name_space, char const* name, object const& attribute, char const* doc); +} +}} +namespace boost { namespace python { +namespace detail +{ + template + object make_function_aux( + F f + , CallPolicies const& p + , Sig const& + ) + { + return objects::function_object( + detail::caller(f, p) + ); + } + template + object make_function_aux( + F f + , CallPolicies const& p + , Sig const& + , detail::keyword_range const& kw + , NumKeywords + ) + { + enum { arity = mpl::size::value - 1 }; + typedef typename detail::error::more_keywords_than_function_arguments< + NumKeywords::value, arity + >::too_many_keywords assertion; + return objects::function_object( + detail::caller(f, p) + , kw); + } + template + object make_function_dispatch(F f, CallPolicies const& policies, Keywords const& kw, mpl::true_) + { + return detail::make_function_aux( + f + , policies + , detail::get_signature(f) + , kw.range() + , mpl::int_() + ); + } + template + object make_function_dispatch(F f, CallPolicies const& policies, Signature const& sig, mpl::false_) + { + return detail::make_function_aux( + f + , policies + , sig + ); + } + } +template +object make_function(F f) +{ + return detail::make_function_aux( + f,default_call_policies(), detail::get_signature(f)); +} +template +object make_function(F f, CallPolicies const& policies) +{ + return detail::make_function_aux( + f, policies, detail::get_signature(f)); +} +template +object make_function( + F f + , CallPolicies const& policies + , KeywordsOrSignature const& keywords_or_signature) +{ + typedef typename + detail::is_reference_to_keywords::type + is_kw; + return detail::make_function_dispatch( + f + , policies + , keywords_or_signature + , is_kw() + ); +} +template +object make_function( + F f + , CallPolicies const& policies + , Keywords const& kw + , Signature const& sig + ) +{ + return detail::make_function_aux( + f + , policies + , sig + , kw.range() + , mpl::int_() + ); +} +}} +namespace boost { namespace python { +namespace detail +{ + template + struct member + { + public: + member(Data Class::*which) : m_which(which) {} + Data& operator()(Class& c) const + { + return c.*m_which; + } + void operator()(Class& c, typename value_arg::type d) const + { + c.*m_which = d; + } + private: + Data Class::*m_which; + }; + template + struct datum + { + public: + datum(Data *which) : m_which(which) {} + Data& operator()() const + { + return *m_which; + } + void operator()(typename value_arg::type d) const + { + *m_which = d; + } + private: + Data *m_which; + }; + template + struct default_getter_by_ref + : mpl::and_< + mpl::bool_< + to_python_value< + typename value_arg::type + >::uses_registry + > + , indirect_traits::is_reference_to_class< + typename value_arg::type + > + > + { + }; + template + struct default_member_getter_policy + : mpl::if_< + default_getter_by_ref + , return_internal_reference<> + , return_value_policy + > + {}; + template + struct default_datum_getter_policy + : mpl::if_< + default_getter_by_ref + , return_value_policy + , return_value_policy + > + {}; + template + inline object make_getter(D* d, Policies const& policies, mpl::false_, int) + { + return python::make_function( + detail::datum(d), policies, mpl::vector1() + ); + } + template + inline object make_getter(D* d, not_specified, mpl::false_, long) + { + typedef typename default_datum_getter_policy::type policies; + return detail::make_getter(d, policies(), mpl::false_(), 0); + } + template + inline object make_getter(D C::*pm, Policies const& policies, mpl::true_, int) + { + typedef C Class; + return python::make_function( + detail::member(pm) + , policies + , mpl::vector2() + ); + } + template + inline object make_getter(D C::*pm, not_specified, mpl::true_, long) + { + typedef typename default_member_getter_policy::type policies; + return detail::make_getter(pm, policies(), mpl::true_(), 0); + } + template + inline object make_getter(D& d, P& p, mpl::false_, ...) + { + return detail::make_getter(&d, p, mpl::false_(), 0L); + } + template + inline object make_setter(D* p, Policies const& policies, mpl::false_, int) + { + return python::make_function( + detail::datum(p), policies, mpl::vector2() + ); + } + template + inline object make_setter(D C::*pm, Policies const& policies, mpl::true_, int) + { + return python::make_function( + detail::member(pm) + , policies + , mpl::vector3() + ); + } + template + inline object make_setter(D& x, Policies const& policies, mpl::false_, ...) + { + return detail::make_setter(&x, policies, mpl::false_(), 0L); + } +} +template +inline object make_getter(D& d, Policies const& policies) +{ + return detail::make_getter(d, policies, is_member_pointer(), 0L); +} +template +inline object make_getter(D const& d, Policies const& policies) +{ + return detail::make_getter(d, policies, is_member_pointer(), 0L); +} +template +inline object make_getter(D& x) +{ + detail::not_specified policy + = detail::not_specified(); + return detail::make_getter(x, policy, is_member_pointer(), 0L); +} +template +inline object make_getter(D const& d) +{ + detail::not_specified policy + = detail::not_specified(); + return detail::make_getter(d, policy, is_member_pointer(), 0L); +} +template +inline object make_setter(D& x, Policies const& policies) +{ + return detail::make_setter(x, policies, is_member_pointer(), 0); +} +template +inline object make_setter(D const& x, Policies const& policies) +{ + return detail::make_setter(x, policies, is_member_pointer(), 0); +} +template +inline object make_setter(D& x) +{ + return detail::make_setter(x, default_call_policies(), is_member_pointer(), 0); +} +template +inline object make_setter(D const& x) +{ + return detail::make_setter(x, default_call_policies(), is_member_pointer(), 0); +} +}} + +namespace boost { namespace python { namespace objects { +template struct make_holder; +template <> +struct make_holder<0> +{ + template + struct apply + { + static void execute( + PyObject *p + ) + { + typedef instance instance_t; + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p ))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +template <> +struct make_holder<1> +{ + template + struct apply + { + typedef typename mpl::begin::type iter0; + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + static void execute( + PyObject *p + , t0 a0) + { + typedef instance instance_t; + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +template <> +struct make_holder<2> +{ + template + struct apply + { + typedef typename mpl::begin::type iter0; + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + static void execute( + PyObject *p + , t0 a0 , t1 a1) + { + typedef instance instance_t; + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +template <> +struct make_holder<3> +{ + template + struct apply + { + typedef typename mpl::begin::type iter0; + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + static void execute( + PyObject *p + , t0 a0 , t1 a1 , t2 a2) + { + typedef instance instance_t; + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +template <> +struct make_holder<4> +{ + template + struct apply + { + typedef typename mpl::begin::type iter0; + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + typedef typename mpl::deref::type t3; typedef typename forward::type f3; typedef typename mpl::next::type iter4; + static void execute( + PyObject *p + , t0 a0 , t1 a1 , t2 a2 , t3 a3) + { + typedef instance instance_t; + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2) , f3(a3)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +template <> +struct make_holder<5> +{ + template + struct apply + { + typedef typename mpl::begin::type iter0; + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + typedef typename mpl::deref::type t3; typedef typename forward::type f3; typedef typename mpl::next::type iter4; + typedef typename mpl::deref::type t4; typedef typename forward::type f4; typedef typename mpl::next::type iter5; + static void execute( + PyObject *p + , t0 a0 , t1 a1 , t2 a2 , t3 a3 , t4 a4) + { + typedef instance instance_t; + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2) , f3(a3) , f4(a4)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +template <> +struct make_holder<6> +{ + template + struct apply + { + typedef typename mpl::begin::type iter0; + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + typedef typename mpl::deref::type t3; typedef typename forward::type f3; typedef typename mpl::next::type iter4; + typedef typename mpl::deref::type t4; typedef typename forward::type f4; typedef typename mpl::next::type iter5; + typedef typename mpl::deref::type t5; typedef typename forward::type f5; typedef typename mpl::next::type iter6; + static void execute( + PyObject *p + , t0 a0 , t1 a1 , t2 a2 , t3 a3 , t4 a4 , t5 a5) + { + typedef instance instance_t; + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2) , f3(a3) , f4(a4) , f5(a5)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +template <> +struct make_holder<7> +{ + template + struct apply + { + typedef typename mpl::begin::type iter0; + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + typedef typename mpl::deref::type t3; typedef typename forward::type f3; typedef typename mpl::next::type iter4; + typedef typename mpl::deref::type t4; typedef typename forward::type f4; typedef typename mpl::next::type iter5; + typedef typename mpl::deref::type t5; typedef typename forward::type f5; typedef typename mpl::next::type iter6; + typedef typename mpl::deref::type t6; typedef typename forward::type f6; typedef typename mpl::next::type iter7; + static void execute( + PyObject *p + , t0 a0 , t1 a1 , t2 a2 , t3 a3 , t4 a4 , t5 a5 , t6 a6) + { + typedef instance instance_t; + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2) , f3(a3) , f4(a4) , f5(a5) , f6(a6)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +template <> +struct make_holder<8> +{ + template + struct apply + { + typedef typename mpl::begin::type iter0; + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + typedef typename mpl::deref::type t3; typedef typename forward::type f3; typedef typename mpl::next::type iter4; + typedef typename mpl::deref::type t4; typedef typename forward::type f4; typedef typename mpl::next::type iter5; + typedef typename mpl::deref::type t5; typedef typename forward::type f5; typedef typename mpl::next::type iter6; + typedef typename mpl::deref::type t6; typedef typename forward::type f6; typedef typename mpl::next::type iter7; + typedef typename mpl::deref::type t7; typedef typename forward::type f7; typedef typename mpl::next::type iter8; + static void execute( + PyObject *p + , t0 a0 , t1 a1 , t2 a2 , t3 a3 , t4 a4 , t5 a5 , t6 a6 , t7 a7) + { + typedef instance instance_t; + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2) , f3(a3) , f4(a4) , f5(a5) , f6(a6) , f7(a7)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +template <> +struct make_holder<9> +{ + template + struct apply + { + typedef typename mpl::begin::type iter0; + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + typedef typename mpl::deref::type t3; typedef typename forward::type f3; typedef typename mpl::next::type iter4; + typedef typename mpl::deref::type t4; typedef typename forward::type f4; typedef typename mpl::next::type iter5; + typedef typename mpl::deref::type t5; typedef typename forward::type f5; typedef typename mpl::next::type iter6; + typedef typename mpl::deref::type t6; typedef typename forward::type f6; typedef typename mpl::next::type iter7; + typedef typename mpl::deref::type t7; typedef typename forward::type f7; typedef typename mpl::next::type iter8; + typedef typename mpl::deref::type t8; typedef typename forward::type f8; typedef typename mpl::next::type iter9; + static void execute( + PyObject *p + , t0 a0 , t1 a1 , t2 a2 , t3 a3 , t4 a4 , t5 a5 , t6 a6 , t7 a7 , t8 a8) + { + typedef instance instance_t; + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2) , f3(a3) , f4(a4) , f5(a5) , f6(a6) , f7(a7) , f8(a8)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +template <> +struct make_holder<10> +{ + template + struct apply + { + typedef typename mpl::begin::type iter0; + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + typedef typename mpl::deref::type t3; typedef typename forward::type f3; typedef typename mpl::next::type iter4; + typedef typename mpl::deref::type t4; typedef typename forward::type f4; typedef typename mpl::next::type iter5; + typedef typename mpl::deref::type t5; typedef typename forward::type f5; typedef typename mpl::next::type iter6; + typedef typename mpl::deref::type t6; typedef typename forward::type f6; typedef typename mpl::next::type iter7; + typedef typename mpl::deref::type t7; typedef typename forward::type f7; typedef typename mpl::next::type iter8; + typedef typename mpl::deref::type t8; typedef typename forward::type f8; typedef typename mpl::next::type iter9; + typedef typename mpl::deref::type t9; typedef typename forward::type f9; typedef typename mpl::next::type iter10; + static void execute( + PyObject *p + , t0 a0 , t1 a1 , t2 a2 , t3 a3 , t4 a4 , t5 a5 , t6 a6 , t7 a7 , t8 a8 , t9 a9) + { + typedef instance instance_t; + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2) , f3(a3) , f4(a4) , f5(a5) , f6(a6) , f7(a7) , f8(a8) , f9(a9)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +template <> +struct make_holder<11> +{ + template + struct apply + { + typedef typename mpl::begin::type iter0; + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + typedef typename mpl::deref::type t3; typedef typename forward::type f3; typedef typename mpl::next::type iter4; + typedef typename mpl::deref::type t4; typedef typename forward::type f4; typedef typename mpl::next::type iter5; + typedef typename mpl::deref::type t5; typedef typename forward::type f5; typedef typename mpl::next::type iter6; + typedef typename mpl::deref::type t6; typedef typename forward::type f6; typedef typename mpl::next::type iter7; + typedef typename mpl::deref::type t7; typedef typename forward::type f7; typedef typename mpl::next::type iter8; + typedef typename mpl::deref::type t8; typedef typename forward::type f8; typedef typename mpl::next::type iter9; + typedef typename mpl::deref::type t9; typedef typename forward::type f9; typedef typename mpl::next::type iter10; + typedef typename mpl::deref::type t10; typedef typename forward::type f10; typedef typename mpl::next::type iter11; + static void execute( + PyObject *p + , t0 a0 , t1 a1 , t2 a2 , t3 a3 , t4 a4 , t5 a5 , t6 a6 , t7 a7 , t8 a8 , t9 a9 , t10 a10) + { + typedef instance instance_t; + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2) , f3(a3) , f4(a4) , f5(a5) , f6(a6) , f7(a7) , f8(a8) , f9(a9) , f10(a10)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +template <> +struct make_holder<12> +{ + template + struct apply + { + typedef typename mpl::begin::type iter0; + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + typedef typename mpl::deref::type t3; typedef typename forward::type f3; typedef typename mpl::next::type iter4; + typedef typename mpl::deref::type t4; typedef typename forward::type f4; typedef typename mpl::next::type iter5; + typedef typename mpl::deref::type t5; typedef typename forward::type f5; typedef typename mpl::next::type iter6; + typedef typename mpl::deref::type t6; typedef typename forward::type f6; typedef typename mpl::next::type iter7; + typedef typename mpl::deref::type t7; typedef typename forward::type f7; typedef typename mpl::next::type iter8; + typedef typename mpl::deref::type t8; typedef typename forward::type f8; typedef typename mpl::next::type iter9; + typedef typename mpl::deref::type t9; typedef typename forward::type f9; typedef typename mpl::next::type iter10; + typedef typename mpl::deref::type t10; typedef typename forward::type f10; typedef typename mpl::next::type iter11; + typedef typename mpl::deref::type t11; typedef typename forward::type f11; typedef typename mpl::next::type iter12; + static void execute( + PyObject *p + , t0 a0 , t1 a1 , t2 a2 , t3 a3 , t4 a4 , t5 a5 , t6 a6 , t7 a7 , t8 a8 , t9 a9 , t10 a10 , t11 a11) + { + typedef instance instance_t; + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2) , f3(a3) , f4(a4) , f5(a5) , f6(a6) , f7(a7) , f8(a8) , f9(a9) , f10(a10) , f11(a11)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +template <> +struct make_holder<13> +{ + template + struct apply + { + typedef typename mpl::begin::type iter0; + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + typedef typename mpl::deref::type t3; typedef typename forward::type f3; typedef typename mpl::next::type iter4; + typedef typename mpl::deref::type t4; typedef typename forward::type f4; typedef typename mpl::next::type iter5; + typedef typename mpl::deref::type t5; typedef typename forward::type f5; typedef typename mpl::next::type iter6; + typedef typename mpl::deref::type t6; typedef typename forward::type f6; typedef typename mpl::next::type iter7; + typedef typename mpl::deref::type t7; typedef typename forward::type f7; typedef typename mpl::next::type iter8; + typedef typename mpl::deref::type t8; typedef typename forward::type f8; typedef typename mpl::next::type iter9; + typedef typename mpl::deref::type t9; typedef typename forward::type f9; typedef typename mpl::next::type iter10; + typedef typename mpl::deref::type t10; typedef typename forward::type f10; typedef typename mpl::next::type iter11; + typedef typename mpl::deref::type t11; typedef typename forward::type f11; typedef typename mpl::next::type iter12; + typedef typename mpl::deref::type t12; typedef typename forward::type f12; typedef typename mpl::next::type iter13; + static void execute( + PyObject *p + , t0 a0 , t1 a1 , t2 a2 , t3 a3 , t4 a4 , t5 a5 , t6 a6 , t7 a7 , t8 a8 , t9 a9 , t10 a10 , t11 a11 , t12 a12) + { + typedef instance instance_t; + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2) , f3(a3) , f4(a4) , f5(a5) , f6(a6) , f7(a7) , f8(a8) , f9(a9) , f10(a10) , f11(a11) , f12(a12)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +template <> +struct make_holder<14> +{ + template + struct apply + { + typedef typename mpl::begin::type iter0; + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + typedef typename mpl::deref::type t3; typedef typename forward::type f3; typedef typename mpl::next::type iter4; + typedef typename mpl::deref::type t4; typedef typename forward::type f4; typedef typename mpl::next::type iter5; + typedef typename mpl::deref::type t5; typedef typename forward::type f5; typedef typename mpl::next::type iter6; + typedef typename mpl::deref::type t6; typedef typename forward::type f6; typedef typename mpl::next::type iter7; + typedef typename mpl::deref::type t7; typedef typename forward::type f7; typedef typename mpl::next::type iter8; + typedef typename mpl::deref::type t8; typedef typename forward::type f8; typedef typename mpl::next::type iter9; + typedef typename mpl::deref::type t9; typedef typename forward::type f9; typedef typename mpl::next::type iter10; + typedef typename mpl::deref::type t10; typedef typename forward::type f10; typedef typename mpl::next::type iter11; + typedef typename mpl::deref::type t11; typedef typename forward::type f11; typedef typename mpl::next::type iter12; + typedef typename mpl::deref::type t12; typedef typename forward::type f12; typedef typename mpl::next::type iter13; + typedef typename mpl::deref::type t13; typedef typename forward::type f13; typedef typename mpl::next::type iter14; + static void execute( + PyObject *p + , t0 a0 , t1 a1 , t2 a2 , t3 a3 , t4 a4 , t5 a5 , t6 a6 , t7 a7 , t8 a8 , t9 a9 , t10 a10 , t11 a11 , t12 a12 , t13 a13) + { + typedef instance instance_t; + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2) , f3(a3) , f4(a4) , f5(a5) , f6(a6) , f7(a7) , f8(a8) , f9(a9) , f10(a10) , f11(a11) , f12(a12) , f13(a13)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +template <> +struct make_holder<15> +{ + template + struct apply + { + typedef typename mpl::begin::type iter0; + typedef typename mpl::deref::type t0; typedef typename forward::type f0; typedef typename mpl::next::type iter1; + typedef typename mpl::deref::type t1; typedef typename forward::type f1; typedef typename mpl::next::type iter2; + typedef typename mpl::deref::type t2; typedef typename forward::type f2; typedef typename mpl::next::type iter3; + typedef typename mpl::deref::type t3; typedef typename forward::type f3; typedef typename mpl::next::type iter4; + typedef typename mpl::deref::type t4; typedef typename forward::type f4; typedef typename mpl::next::type iter5; + typedef typename mpl::deref::type t5; typedef typename forward::type f5; typedef typename mpl::next::type iter6; + typedef typename mpl::deref::type t6; typedef typename forward::type f6; typedef typename mpl::next::type iter7; + typedef typename mpl::deref::type t7; typedef typename forward::type f7; typedef typename mpl::next::type iter8; + typedef typename mpl::deref::type t8; typedef typename forward::type f8; typedef typename mpl::next::type iter9; + typedef typename mpl::deref::type t9; typedef typename forward::type f9; typedef typename mpl::next::type iter10; + typedef typename mpl::deref::type t10; typedef typename forward::type f10; typedef typename mpl::next::type iter11; + typedef typename mpl::deref::type t11; typedef typename forward::type f11; typedef typename mpl::next::type iter12; + typedef typename mpl::deref::type t12; typedef typename forward::type f12; typedef typename mpl::next::type iter13; + typedef typename mpl::deref::type t13; typedef typename forward::type f13; typedef typename mpl::next::type iter14; + typedef typename mpl::deref::type t14; typedef typename forward::type f14; typedef typename mpl::next::type iter15; + static void execute( + PyObject *p + , t0 a0 , t1 a1 , t2 a2 , t3 a3 , t4 a4 , t5 a5 , t6 a6 , t7 a7 , t8 a8 , t9 a9 , t10 a10 , t11 a11 , t12 a12 , t13 a13 , t14 a14) + { + typedef instance instance_t; + void* memory = Holder::allocate(p, __builtin_offsetof (instance_t, storage), sizeof(Holder)); + try { + (new (memory) Holder( + p , f0(a0) , f1(a1) , f2(a2) , f3(a3) , f4(a4) , f5(a5) , f6(a6) , f7(a7) , f8(a8) , f9(a9) , f10(a10) , f11(a11) , f12(a12) , f13(a13) , f14(a14)))->install(p); + } + catch(...) { + Holder::deallocate(p, memory); + throw; + } + } + }; +}; +}}} +namespace boost { namespace python { namespace detail { +template +object make_keyword_range_function( + F f + , Policies const& policies + , keyword_range const& kw) +{ + return detail::make_function_aux( + f, policies, detail::get_signature(f), kw, mpl::int_<0>()); +} +template +object make_keyword_range_function( + F f + , Policies const& policies + , keyword_range const& kw + , Signature const& sig) +{ + return detail::make_function_aux( + f, policies, sig, kw, mpl::int_<0>()); +} +template +object make_keyword_range_constructor( + CallPolicies const& policies + , detail::keyword_range const& kw + , Holder* = 0 + , ArgList* = 0, Arity* = 0) +{ + return detail::make_keyword_range_function( + objects::make_holder + ::template apply::execute + , policies + , kw); +} +}}} +namespace boost { namespace mpl { +template< typename Tag > +struct empty_impl +{ + template< typename Sequence > struct apply + : is_same< + typename begin::type + , typename end::type + > + { + }; +}; + template<> struct empty_impl {}; +}} +namespace boost { namespace mpl { +template< + typename Sequence = na + > +struct empty + : empty_impl< typename sequence_tag::type > + ::template apply< Sequence > +{ + +}; +template<> struct empty< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : empty< T1 > { }; }; template< typename Tag > struct lambda< empty< na > , Tag , int_<-1> > { typedef false_ is_le; typedef empty< na > result_; typedef empty< na > type; }; namespace aux { template< typename T1 > struct template_arity< empty< T1 > > : int_<1> { }; template<> struct template_arity< empty< na > > : int_<-1> { }; } +}} +namespace boost { namespace mpl { +template< + typename Iterator1 + , typename LastIterator1 + , typename Iterator2 + > +struct joint_iter +{ + typedef Iterator1 base; + typedef forward_iterator_tag category; +}; +template< + typename LastIterator1 + , typename Iterator2 + > +struct joint_iter +{ + typedef Iterator2 base; + typedef forward_iterator_tag category; +}; +template< typename I1, typename L1, typename I2 > +struct deref< joint_iter > +{ + typedef typename joint_iter::base base_; + typedef typename deref::type type; +}; +template< typename I1, typename L1, typename I2 > +struct next< joint_iter > +{ + typedef joint_iter< typename mpl::next::type,L1,I2 > type; +}; +template< typename L1, typename I2 > +struct next< joint_iter > +{ + typedef joint_iter< L1,L1,typename mpl::next::type > type; +}; +template< typename T1 , typename T2 , typename T3 , typename Tag > struct lambda< joint_iter< T1 , T2 , T3 > , Tag , int_<3> > { typedef false_ is_le; typedef joint_iter< T1 , T2 , T3 > result_; typedef result_ type; }; +}} +namespace boost { namespace mpl { +namespace aux { +struct joint_view_tag; +} +template<> +struct size_impl< aux::joint_view_tag > +{ + template < typename JointView > struct apply + : plus< + size + , size + > + {}; +}; +template< + typename Sequence1_ = na + , typename Sequence2_ = na + > +struct joint_view +{ + typedef typename mpl::begin::type first1_; + typedef typename mpl::end::type last1_; + typedef typename mpl::begin::type first2_; + typedef typename mpl::end::type last2_; + typedef Sequence1_ sequence1_; + typedef Sequence2_ sequence2_; + typedef joint_view type; + typedef aux::joint_view_tag tag; + typedef joint_iter begin; + typedef joint_iter end; +}; +template<> struct joint_view< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : joint_view< T1 , T2 > { }; }; template< typename Tag > struct lambda< joint_view< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef joint_view< na , na > result_; typedef joint_view< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< joint_view< T1 , T2 > > : int_<2> { }; template<> struct template_arity< joint_view< na , na > > : int_<-1> { }; } +}} +namespace boost { namespace mpl { +template< typename Tag > +struct back_impl +{ + template< typename Sequence > struct apply + { + typedef typename end::type end_; + typedef typename prior::type last_; + typedef typename deref::type type; + }; +}; + template<> struct back_impl {}; +}} +namespace boost { namespace mpl { +template< + typename Sequence = na + > +struct back + : back_impl< typename sequence_tag::type > + ::template apply< Sequence > +{ + +}; +template<> struct back< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : back< T1 > { }; }; template< typename Tag > struct lambda< back< na > , Tag , int_<-1> > { typedef false_ is_le; typedef back< na > result_; typedef back< na > type; }; namespace aux { template< typename T1 > struct template_arity< back< T1 > > : int_<1> { }; template<> struct template_arity< back< na > > : int_<-1> { }; } +}} +namespace boost { namespace python { +template < class T0 = mpl::void_ , class T1 = mpl::void_ , class T2 = mpl::void_ , class T3 = mpl::void_ , class T4 = mpl::void_ , class T5 = mpl::void_ , class T6 = mpl::void_ , class T7 = mpl::void_ , class T8 = mpl::void_ , class T9 = mpl::void_ , class T10 = mpl::void_ , class T11 = mpl::void_ , class T12 = mpl::void_ , class T13 = mpl::void_ , class T14 = mpl::void_ > +class init; +template < class T0 = mpl::void_ , class T1 = mpl::void_ , class T2 = mpl::void_ , class T3 = mpl::void_ , class T4 = mpl::void_ , class T5 = mpl::void_ , class T6 = mpl::void_ , class T7 = mpl::void_ , class T8 = mpl::void_ , class T9 = mpl::void_ , class T10 = mpl::void_ , class T11 = mpl::void_ , class T12 = mpl::void_ , class T13 = mpl::void_ , class T14 = mpl::void_ > +struct optional; +namespace detail +{ + namespace error + { + template + struct more_keywords_than_init_arguments + { + typedef char too_many_keywords[init_args - keywords >= 0 ? 1 : -1]; + }; + } + template + struct is_optional + : mpl::false_ + {}; + template < class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> + struct is_optional > + : mpl::true_ + {}; + template + struct define_class_init_helper; +} +template +struct init_base : def_visitor +{ + init_base(char const* doc_, detail::keyword_range const& keywords_) + : m_doc(doc_), m_keywords(keywords_) + {} + init_base(char const* doc_) + : m_doc(doc_) + {} + DerivedT const& derived() const + { + return *static_cast(this); + } + char const* doc_string() const + { + return m_doc; + } + detail::keyword_range const& keywords() const + { + return m_keywords; + } + static default_call_policies call_policies() + { + return default_call_policies(); + } + private: + template + void visit(classT& cl) const + { + typedef typename DerivedT::signature signature; + typedef typename DerivedT::n_arguments n_arguments; + typedef typename DerivedT::n_defaults n_defaults; + detail::define_class_init_helper::apply( + cl + , derived().call_policies() + , signature() + , n_arguments() + , derived().doc_string() + , derived().keywords()); + } + friend class python::def_visitor_access; + private: + char const* m_doc; + detail::keyword_range m_keywords; +}; +template +class init_with_call_policies + : public init_base > +{ + typedef init_base > base; + public: + typedef typename InitT::n_arguments n_arguments; + typedef typename InitT::n_defaults n_defaults; + typedef typename InitT::signature signature; + init_with_call_policies( + CallPoliciesT const& policies_ + , char const* doc_ + , detail::keyword_range const& keywords + ) + : base(doc_, keywords) + , m_policies(policies_) + {} + CallPoliciesT const& call_policies() const + { + return this->m_policies; + } + private: + CallPoliciesT m_policies; +}; +namespace detail +{ + template + struct drop1 + : mpl::iterator_range< + typename mpl::begin::type + , typename mpl::prior< + typename mpl::end::type + >::type + > + {}; +} +template < class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> +class init : public init_base > +{ + typedef init_base > base; + public: + typedef init< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14> self_t; + init(char const* doc_ = 0) + : base(doc_) + { + } + template + init(char const* doc_, detail::keywords const& kw) + : base(doc_, kw.range()) + { + typedef typename detail::error::more_keywords_than_init_arguments< + N, n_arguments::value + 1 + >::too_many_keywords assertion; + } + template + init(detail::keywords const& kw, char const* doc_ = 0) + : base(doc_, kw.range()) + { + typedef typename detail::error::more_keywords_than_init_arguments< + N, n_arguments::value + 1 + >::too_many_keywords assertion; + } + template + init_with_call_policies + operator[](CallPoliciesT const& policies) const + { + return init_with_call_policies( + policies, this->doc_string(), this->keywords()); + } + typedef detail::type_list< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14> signature_; + typedef detail::is_optional< + typename mpl::eval_if< + mpl::empty + , mpl::false_ + , mpl::back + >::type + > back_is_optional; + typedef typename mpl::eval_if< + back_is_optional + , mpl::back + , mpl::vector0<> + >::type optional_args; + typedef typename mpl::eval_if< + back_is_optional + , mpl::if_< + mpl::empty + , detail::drop1 + , mpl::joint_view< + detail::drop1 + , optional_args + > + > + , signature_ + >::type signature; + typedef mpl::size n_defaults; + typedef mpl::size n_arguments; +}; +template < class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 , class T9 , class T10 , class T11 , class T12 , class T13 , class T14> +struct optional + : detail::type_list< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14> +{ +}; +namespace detail +{ + template + inline void def_init_aux( + ClassT& cl + , Signature const& + , NArgs + , CallPoliciesT const& policies + , char const* doc + , detail::keyword_range const& keywords_ + ) + { + cl.def( + "__init__" + , detail::make_keyword_range_constructor( + policies + , keywords_ + , (typename ClassT::metadata::holder*)0 + ) + , doc + ); + } + template + struct define_class_init_helper + { + template + static void apply( + ClassT& cl + , CallPoliciesT const& policies + , Signature const& args + , NArgs + , char const* doc + , detail::keyword_range keywords) + { + detail::def_init_aux(cl, args, NArgs(), policies, doc, keywords); + if (keywords.second > keywords.first) + --keywords.second; + typedef typename mpl::prior::type next_nargs; + define_class_init_helper::apply( + cl, policies, Signature(), next_nargs(), doc, keywords); + } + }; + template <> + struct define_class_init_helper<0> { + template + static void apply( + ClassT& cl + , CallPoliciesT const& policies + , Signature const& args + , NArgs + , char const* doc + , detail::keyword_range const& keywords) + { + detail::def_init_aux(cl, args, NArgs(), policies, doc, keywords); + } + }; +} +}} +namespace boost { namespace python { namespace converter { +template +struct shared_ptr_from_python +{ + shared_ptr_from_python() + { + converter::registry::insert(&convertible, &construct, type_id >() + , &converter::expected_from_python_type_direct::get_pytype + ); + } + private: + static void* convertible(PyObject* p) + { + if (p == (&_Py_NoneStruct)) + return p; + return converter::get_lvalue_from_python(p, registered::converters); + } + static void construct(PyObject* source, rvalue_from_python_stage1_data* data) + { + void* const storage = ((converter::rvalue_from_python_storage >*)data)->storage.bytes; + if (data->convertible == source) + new (storage) shared_ptr(); + else + { + boost::shared_ptr hold_convertible_ref_count( + (void*)0, shared_ptr_deleter(handle<>(borrowed(source))) ); + new (storage) shared_ptr( + hold_convertible_ref_count, + static_cast(data->convertible)); + } + data->convertible = storage; + } +}; +}}} +namespace boost { namespace python { namespace objects { +typedef type_info class_id; +using python::type_id; +typedef std::pair dynamic_id_t; +typedef dynamic_id_t (*dynamic_id_function)(void*); + void register_dynamic_id_aux( + class_id static_id, dynamic_id_function get_dynamic_id); + void add_cast( + class_id src_t, class_id dst_t, void* (*cast)(void*), bool is_downcast); +template +struct polymorphic_id_generator +{ + static dynamic_id_t execute(void* p_) + { + T* p = static_cast(p_); + return std::make_pair(dynamic_cast(p), class_id(typeid(*p))); + } +}; +template +struct non_polymorphic_id_generator +{ + static dynamic_id_t execute(void* p_) + { + return std::make_pair(p_, python::type_id()); + } +}; +template +struct dynamic_id_generator + : mpl::if_< + boost::is_polymorphic + , boost::python::objects::polymorphic_id_generator + , boost::python::objects::non_polymorphic_id_generator + > +{}; +template +void register_dynamic_id(T* = 0) +{ + typedef typename dynamic_id_generator::type generator; + register_dynamic_id_aux( + python::type_id(), &generator::execute); +} +template +struct dynamic_cast_generator +{ + static void* execute(void* source) + { + return dynamic_cast( + static_cast(source)); + } +}; +template +struct implicit_cast_generator +{ + static void* execute(void* source) + { + Target* result = static_cast(source); + return result; + } +}; +template +struct cast_generator + : mpl::if_< + is_base_and_derived + , implicit_cast_generator + , dynamic_cast_generator + > +{ +}; +template +inline void register_conversion( + bool is_downcast = ::boost::is_base_and_derived::value + , Source* = 0, Target* = 0) +{ + typedef typename cast_generator::type generator; + add_cast( + python::type_id() + , python::type_id() + , &generator::execute + , is_downcast + ); +} +}}} +namespace boost { namespace python { namespace converter { +template +struct as_to_python_function +{ + template + static void convert_function_must_take_value_or_const_reference(U(*)(T), int, T* = 0) {} + template + static void convert_function_must_take_value_or_const_reference(U(*)(T const&), long ...) {} + static PyObject* convert(void const* x) + { + convert_function_must_take_value_or_const_reference(&ToPython::convert, 1L); + return ToPython::convert(*const_cast(static_cast(x))); + } + static PyTypeObject const * get_pytype() { return ToPython::get_pytype(); } +}; +}}} +namespace boost { namespace python { +template < class T, class Conversion, bool has_get_pytype=false > +struct to_python_converter +{ + typedef boost::mpl::bool_ HasGetPytype; + static PyTypeObject const* get_pytype_1(boost::mpl::true_ *) + { + return Conversion::get_pytype(); + } + static PyTypeObject const* get_pytype_1(boost::mpl::false_ *) + { + return 0; + } + static PyTypeObject const* get_pytype_impl() + { + return get_pytype_1((HasGetPytype*)0); + } + to_python_converter(); +}; +template +to_python_converter::to_python_converter() +{ + typedef converter::as_to_python_function< + T, Conversion + > normalized; + converter::registry::insert( + &normalized::convert + , type_id() + , &get_pytype_impl + ); +} +}} +namespace boost { namespace python { namespace objects { +template +struct class_cref_wrapper + : to_python_converter ,true> +{ + static PyObject* convert(Src const& x) + { + return MakeInstance::execute(boost::ref(x)); + } + static PyTypeObject const *get_pytype() { return converter::registered_pytype_direct::get_pytype(); } +}; +template +struct class_value_wrapper + : to_python_converter ,true> +{ + static PyObject* convert(Src x) + { + return MakeInstance::execute(x); + } + static PyTypeObject const *get_pytype() { return MakeInstance::get_pytype(); } +}; +}}} +namespace boost { namespace python { namespace objects { +struct no_back_reference; +template struct value_holder_generator; +}}} +namespace boost { namespace python { +namespace api +{ + class object; +} +namespace converter +{ + template + struct extract_pointer + { + typedef Ptr result_type; + extract_pointer(PyObject*); + bool check() const; + Ptr operator()() const; + private: + PyObject* m_source; + void* m_result; + }; + template + struct extract_reference + { + typedef Ref result_type; + extract_reference(PyObject*); + bool check() const; + Ref operator()() const; + private: + PyObject* m_source; + void* m_result; + }; + template + struct extract_rvalue : private noncopyable + { + typedef typename mpl::if_< + python::detail::copy_ctor_mutates_rhs + , T& + , typename call_traits::param_type + >::type result_type; + extract_rvalue(PyObject*); + bool check() const; + result_type operator()() const; + private: + PyObject* m_source; + mutable rvalue_from_python_data m_data; + }; + template + struct extract_object_manager + { + typedef T result_type; + extract_object_manager(PyObject*); + bool check() const; + result_type operator()() const; + private: + PyObject* m_source; + }; + template + struct select_extract + { + static const bool obj_mgr = is_object_manager::value + ; + static const bool ptr = is_pointer::value + ; + static const bool ref = is_reference::value + ; + typedef typename mpl::if_c< + obj_mgr + , extract_object_manager + , typename mpl::if_c< + ptr + , extract_pointer + , typename mpl::if_c< + ref + , extract_reference + , extract_rvalue + >::type + >::type + >::type type; + }; +} +template +struct extract + : converter::select_extract::type +{ + private: + typedef typename converter::select_extract::type base; + public: + typedef typename base::result_type result_type; + operator result_type() const + { + return (*this)(); + } + extract(PyObject*); + extract(api::object const&); +}; +template +inline extract::extract(PyObject* o) + : base(o) +{ +} +template +inline extract::extract(api::object const& o) + : base(o.ptr()) +{ +} +namespace converter +{ + template + inline extract_rvalue::extract_rvalue(PyObject* x) + : m_source(x) + , m_data( + (rvalue_from_python_stage1)(x, registered::converters) + ) + { + } + template + inline bool + extract_rvalue::check() const + { + return m_data.stage1.convertible; + } + template + inline typename extract_rvalue::result_type + extract_rvalue::operator()() const + { + return *(T*)( + m_data.stage1.convertible == m_data.storage.bytes + ? m_data.storage.bytes + : (rvalue_from_python_stage2)(m_source, m_data.stage1, registered::converters) + ); + } + template + inline extract_reference::extract_reference(PyObject* obj) + : m_source(obj) + , m_result( + (get_lvalue_from_python)(obj, registered::converters) + ) + { + } + template + inline bool extract_reference::check() const + { + return m_result != 0; + } + template + inline Ref extract_reference::operator()() const + { + if (m_result == 0) + (throw_no_reference_from_python)(m_source, registered::converters); + return python::detail::void_ptr_to_reference(m_result, (Ref(*)())0); + } + template + inline extract_pointer::extract_pointer(PyObject* obj) + : m_source(obj) + , m_result( + obj == (&_Py_NoneStruct) ? 0 : (get_lvalue_from_python)(obj, registered_pointee::converters) + ) + { + } + template + inline bool extract_pointer::check() const + { + return m_source == (&_Py_NoneStruct) || m_result != 0; + } + template + inline Ptr extract_pointer::operator()() const + { + if (m_result == 0 && m_source != (&_Py_NoneStruct)) + (throw_no_pointer_from_python)(m_source, registered_pointee::converters); + return Ptr(m_result); + } + template + inline extract_object_manager::extract_object_manager(PyObject* obj) + : m_source(obj) + { + } + template + inline bool extract_object_manager::check() const + { + return object_manager_traits::check(m_source); + } + template + inline T extract_object_manager::operator()() const + { + return T( + object_manager_traits::adopt(python::incref(m_source)) + ); + } +} +}} +namespace boost { namespace python { +class override; +namespace detail +{ + class wrapper_base; + class method_result + { + private: + friend class boost::python::override; + explicit method_result(PyObject* x) + : m_obj(x) + {} + public: + template + operator T() + { + converter::return_from_python converter; + return converter(m_obj.release()); + } + template + operator T&() const + { + converter::return_from_python converter; + return converter(const_cast&>(m_obj).release()); + } + template + T as(type* = 0) + { + converter::return_from_python converter; + return converter(m_obj.release()); + } + template + T unchecked(type* = 0) + { + return extract(m_obj)(); + } + private: + mutable handle<> m_obj; + }; +} +class override : public object +{ + private: + friend class detail::wrapper_base; + override(handle<> x) + : object(x) + {} + public: + detail::method_result + operator()() const + { + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("()") + )); + return x; + } +template < + class A0 + > +detail::method_result +operator()( A0 const& a0 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" ")") + , converter::arg_to_python(a0).get() + )); + return x; +} +template < + class A0 , class A1 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() + )); + return x; +} +template < + class A0 , class A1 , class A2 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() + )); + return x; +} +template < + class A0 , class A1 , class A2 , class A3 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() + )); + return x; +} +template < + class A0 , class A1 , class A2 , class A3 , class A4 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() + )); + return x; +} +template < + class A0 , class A1 , class A2 , class A3 , class A4 , class A5 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() + )); + return x; +} +template < + class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() + )); + return x; +} +template < + class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() + )); + return x; +} +template < + class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() + )); + return x; +} +template < + class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() + )); + return x; +} +template < + class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() + )); + return x; +} +template < + class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() , converter::arg_to_python(a11).get() + )); + return x; +} +template < + class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() , converter::arg_to_python(a11).get() , converter::arg_to_python(a12).get() + )); + return x; +} +template < + class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() , converter::arg_to_python(a11).get() , converter::arg_to_python(a12).get() , converter::arg_to_python(a13).get() + )); + return x; +} +template < + class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 , class A14 + > +detail::method_result +operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 ) const +{ + detail::method_result x( + PyEval_CallFunction( + this->ptr() + , const_cast("(" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" "O" ")") + , converter::arg_to_python(a0).get() , converter::arg_to_python(a1).get() , converter::arg_to_python(a2).get() , converter::arg_to_python(a3).get() , converter::arg_to_python(a4).get() , converter::arg_to_python(a5).get() , converter::arg_to_python(a6).get() , converter::arg_to_python(a7).get() , converter::arg_to_python(a8).get() , converter::arg_to_python(a9).get() , converter::arg_to_python(a10).get() , converter::arg_to_python(a11).get() , converter::arg_to_python(a12).get() , converter::arg_to_python(a13).get() , converter::arg_to_python(a14).get() + )); + return x; +} +}; +}} +namespace boost { namespace python { +template +class wrapper : public detail::wrapper_base +{ + public: + typedef T _wrapper_wrapped_type_; + protected: + override get_override(char const* name) const + { + typedef detail::wrapper_base base; + converter::registration const& r + = converter::registered::converters; + PyTypeObject* type = r.get_class_object(); + return this->base::get_override(name, type); + } +}; +}} +namespace boost { namespace python { namespace objects { +template +struct value_holder : instance_holder +{ + typedef Value held_type; + typedef Value value_type; + value_holder( + PyObject* self ) + : m_held( + + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } + template < class A0> + value_holder( + PyObject* self , A0 a0) + : m_held( + objects::do_unforward(a0,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } + template < class A0 , class A1> + value_holder( + PyObject* self , A0 a0 , A1 a1) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } + template < class A0 , class A1 , class A2> + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } + template < class A0 , class A1 , class A2 , class A3> + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } + template < class A0 , class A1 , class A2 , class A3 , class A4> + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5> + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6> + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7> + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8> + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9> + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10> + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11> + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12> + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11 , A12 a12) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) , objects::do_unforward(a12,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13> + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11 , A12 a12 , A13 a13) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) , objects::do_unforward(a12,0) , objects::do_unforward(a13,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 , class A14> + value_holder( + PyObject* self , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11 , A12 a12 , A13 a13 , A14 a14) + : m_held( + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) , objects::do_unforward(a12,0) , objects::do_unforward(a13,0) , objects::do_unforward(a14,0) + ) + { + python::detail::initialize_wrapper(self, boost::addressof(this->m_held)); + } + private: + void* holds(type_info, bool null_ptr_only); + template + inline void* holds_wrapped(type_info dst_t, wrapper*,T* p) + { + return python::type_id() == dst_t ? p : 0; + } + inline void* holds_wrapped(type_info, ...) + { + return 0; + } + private: + Value m_held; +}; +template +struct value_holder_back_reference : instance_holder +{ + typedef Held held_type; + typedef Value value_type; + value_holder_back_reference( + PyObject* p ) + : m_held( + p + + ) + { + } + template < class A0> + value_holder_back_reference( + PyObject* p , A0 a0) + : m_held( + p , + objects::do_unforward(a0,0) + ) + { + } + template < class A0 , class A1> + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) + ) + { + } + template < class A0 , class A1 , class A2> + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) + ) + { + } + template < class A0 , class A1 , class A2 , class A3> + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) + ) + { + } + template < class A0 , class A1 , class A2 , class A3 , class A4> + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) + ) + { + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5> + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) + ) + { + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6> + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) + ) + { + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7> + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) + ) + { + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8> + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) + ) + { + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9> + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) + ) + { + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10> + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) + ) + { + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11> + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) + ) + { + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12> + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11 , A12 a12) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) , objects::do_unforward(a12,0) + ) + { + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13> + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11 , A12 a12 , A13 a13) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) , objects::do_unforward(a12,0) , objects::do_unforward(a13,0) + ) + { + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 , class A14> + value_holder_back_reference( + PyObject* p , A0 a0 , A1 a1 , A2 a2 , A3 a3 , A4 a4 , A5 a5 , A6 a6 , A7 a7 , A8 a8 , A9 a9 , A10 a10 , A11 a11 , A12 a12 , A13 a13 , A14 a14) + : m_held( + p , + objects::do_unforward(a0,0) , objects::do_unforward(a1,0) , objects::do_unforward(a2,0) , objects::do_unforward(a3,0) , objects::do_unforward(a4,0) , objects::do_unforward(a5,0) , objects::do_unforward(a6,0) , objects::do_unforward(a7,0) , objects::do_unforward(a8,0) , objects::do_unforward(a9,0) , objects::do_unforward(a10,0) , objects::do_unforward(a11,0) , objects::do_unforward(a12,0) , objects::do_unforward(a13,0) , objects::do_unforward(a14,0) + ) + { + } +private: + void* holds(type_info, bool null_ptr_only); + private: + Held m_held; +}; +template +void* value_holder::holds(type_info dst_t, bool ) +{ + if (void* wrapped = holds_wrapped(dst_t, boost::addressof(m_held), boost::addressof(m_held))) + return wrapped; + type_info src_t = python::type_id(); + return src_t == dst_t ? boost::addressof(m_held) + : find_static_type(boost::addressof(m_held), src_t, dst_t); +} +template +void* value_holder_back_reference::holds( + type_info dst_t, bool ) +{ + type_info src_t = python::type_id(); + Value* x = &m_held; + if (dst_t == src_t) + return x; + else if (dst_t == python::type_id()) + return &m_held; + else + return find_static_type(x, src_t, dst_t); +} +}}} +namespace boost { namespace python { +template +struct has_back_reference + : mpl::false_ +{ +}; +}} +namespace boost { namespace mpl { +template< + typename T = na + > +struct is_sequence + : not_< is_same< typename begin::type, void_ > > +{ + +}; +template<> struct is_sequence< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : is_sequence< T1 > { }; }; template< typename Tag > struct lambda< is_sequence< na > , Tag , int_<-1> > { typedef false_ is_le; typedef is_sequence< na > result_; typedef is_sequence< na > type; }; namespace aux { template< typename T1 > struct template_arity< is_sequence< T1 > > : int_<1> { }; template<> struct template_arity< is_sequence< na > > : int_<-1> { }; } +}} +namespace boost { namespace mpl { namespace aux { +template< typename F > +inline +F& unwrap(F& f, long) +{ + return f; +} +template< typename F > +inline +F& +unwrap(reference_wrapper& f, int) +{ + return f; +} +template< typename F > +inline +F& +unwrap(reference_wrapper const& f, int) +{ + return f; +} +}}} + +namespace boost { +namespace detail { namespace aligned_storage { +static const std::size_t alignment_of_max_align = ::boost::alignment_of::value + ; +template < + std::size_t size_ + , std::size_t alignment_ +> +struct aligned_storage_imp +{ + union data_t + { + char buf[size_]; + typename mpl::eval_if_c< + alignment_ == std::size_t(-1) + , mpl::identity + , type_with_alignment + >::type align_; + } data_; + void* address() const { return const_cast(this); } +}; +template< std::size_t alignment_ > +struct aligned_storage_imp<0u,alignment_> +{ + void* address() const { return 0; } +}; +}} +template < + std::size_t size_ + , std::size_t alignment_ = std::size_t(-1) +> +class aligned_storage : + private + detail::aligned_storage::aligned_storage_imp +{ +public: + typedef detail::aligned_storage::aligned_storage_imp type; + static const std::size_t size = size_ + ; + static const std::size_t alignment = ( alignment_ == std::size_t(-1) ? ::boost::detail::aligned_storage::alignment_of_max_align : alignment_ ) + ; +private: + aligned_storage(const aligned_storage&); + aligned_storage& operator=(const aligned_storage&); +public: + aligned_storage() + { + } + ~aligned_storage() + { + } +public: + void* address() + { + return static_cast(this)->address(); + } + const void* address() const + { + return static_cast(this)->address(); + } +}; +template +struct is_pod > + : ::boost::integral_constant +{ + +}; +} + +namespace boost_swap_impl +{ + template + void swap_impl(T& left, T& right) + { + using namespace std; + swap(left,right); + } + template + void swap_impl(T (& left)[N], T (& right)[N]) + { + for (std::size_t i = 0; i < N; ++i) + { + ::boost_swap_impl::swap_impl(left[i], right[i]); + } + } +} +namespace boost +{ + template + void swap(T1& left, T2& right) + { + ::boost_swap_impl::swap_impl(left, right); + } +} + + +namespace boost { +template +class value_initialized +{ + private : + struct wrapper + { + typename + remove_const::type data; + }; + mutable + typename + aligned_storage::value>::type x; + wrapper * wrapper_address() const + { + return static_cast( static_cast(&x)); + } + public : + value_initialized() + { + std::memset(&x, 0, sizeof(x)); + new (wrapper_address()) wrapper(); + } + value_initialized(value_initialized const & arg) + { + new (wrapper_address()) wrapper( static_cast(*(arg.wrapper_address()))); + } + value_initialized & operator=(value_initialized const & arg) + { + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((! is_const::value) == 0 ? false : true) >)> boost_static_assert_typedef_84; + *wrapper_address() = static_cast(*(arg.wrapper_address())); + return *this; + } + ~value_initialized() + { + wrapper_address()->wrapper::~wrapper(); + } + T const & data() const + { + return wrapper_address()->data; + } + T& data() + { + return wrapper_address()->data; + } + void swap(value_initialized & arg) + { + ::boost::swap( this->data(), arg.data() ); + } + operator T const &() const { return this->data(); } + operator T&() { return this->data(); } +} ; +template +T const& get ( value_initialized const& x ) +{ + return x.data() ; +} +template +T& get ( value_initialized& x ) +{ + return x.data() ; +} +template +void swap ( value_initialized & lhs, value_initialized & rhs ) +{ + lhs.swap(rhs) ; +} +class initialized_value_t +{ + public : + template operator T() const + { + return get( value_initialized() ); + } +}; +initialized_value_t const initialized_value = {} ; +} +namespace boost { namespace mpl { +namespace aux { +template< bool done = true > +struct for_each_impl +{ + template< + typename Iterator + , typename LastIterator + , typename TransformFunc + , typename F + > + static void execute( + Iterator* + , LastIterator* + , TransformFunc* + , F + ) + { + } +}; +template<> +struct for_each_impl +{ + template< + typename Iterator + , typename LastIterator + , typename TransformFunc + , typename F + > + static void execute( + Iterator* + , LastIterator* + , TransformFunc* + , F f + ) + { + typedef typename deref::type item; + typedef typename apply1::type arg; + value_initialized x; + aux::unwrap(f, 0)(boost::get(x)); + typedef typename mpl::next::type iter; + for_each_impl::value> + ::execute( static_cast(0), static_cast(0), static_cast(0), f); + } +}; +} +template< + typename Sequence + , typename TransformOp + , typename F + > +inline +void for_each(F f, Sequence* = 0, TransformOp* = 0) +{ + enum { mpl_assertion_in_line_95 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_arg( (void (*) ( is_sequence ))0, 1 ) ) ) }; + typedef typename begin::type first; + typedef typename end::type last; + aux::for_each_impl< boost::is_same::value > + ::execute(static_cast(0), static_cast(0), static_cast(0), f); +} +template< + typename Sequence + , typename F + > +inline +void for_each(F f, Sequence* = 0) +{ + for_each >(f); +} +}} +namespace boost { namespace mpl { +namespace aux { +template< typename T, int is_last_ > +struct sel_iter; +template< typename T > +struct sel_iter +{ + typedef random_access_iterator_tag category; + typedef sel_iter next; + typedef T type; +}; +template< typename T > +struct sel_iter +{ + typedef random_access_iterator_tag category; + typedef sel_iter prior; +}; +} +template< typename T, int is_last_, typename Distance > +struct advance< aux::sel_iter,Distance> +{ + typedef aux::sel_iter< + T + , ( is_last_ + Distance::value ) + > type; +}; +template< + typename T + , int l1 + , int l2 + > +struct distance< aux::sel_iter, aux::sel_iter > + : int_<( l2 - l1 )> +{ +}; +}} +namespace boost { namespace mpl { +template< + typename T = na + > +struct single_view + : iterator_range< + aux::sel_iter + , aux::sel_iter + > +{ +}; +template<> struct single_view< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : single_view< T1 > { }; }; template< typename Tag > struct lambda< single_view< na > , Tag , int_<-1> > { typedef false_ is_le; typedef single_view< na > result_; typedef single_view< na > type; }; namespace aux { template< typename T1 > struct template_arity< single_view< T1 > > : int_<1> { }; template<> struct template_arity< single_view< na > > : int_<-1> { }; } +}} +namespace boost { namespace python { namespace objects { +void copy_class_object(type_info const& src, type_info const& dst); +template +struct register_base_of +{ + template + inline void operator()(Base*) const + { + enum { mpl_assertion_in_line_57 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (is_same))0, 1 ) ) ) }; + register_dynamic_id(); + register_conversion(false); + this->register_downcast((Base*)0, is_polymorphic()); + } + private: + static inline void register_downcast(void*, mpl::false_) {} + template + static inline void register_downcast(Base*, mpl::true_) + { + register_conversion(true); + } +}; +template +inline void register_shared_ptr_from_python_and_casts(T*, Bases) +{ + python::detail::force_instantiate(converter::shared_ptr_from_python()); + register_dynamic_id(); + mpl::for_each(register_base_of(), (Bases*)0, (add_pointer*)0); +} +template +struct select_held_type + : mpl::if_< + mpl::or_< + python::detail::specifies_bases + , is_same + > + , Prev + , T + > +{ +}; +template < + class T + , class X1 + , class X2 + , class X3 +> +struct class_metadata +{ + typedef typename select_held_type< + X1 + , typename select_held_type< + X2 + , typename select_held_type< + X3 + , python::detail::not_specified + >::type + >::type + >::type held_type_arg; + typedef typename python::detail::select_bases< + X1 + , typename python::detail::select_bases< + X2 + , typename python::detail::select_bases< + X3 + , python::bases<> + >::type + >::type + >::type bases; + typedef mpl::or_< + is_same + , is_same + , is_same + > is_noncopyable; + typedef typename mpl::if_< + is_same, T, held_type_arg + >::type held_type; + typedef is_convertible use_value_holder; + typedef typename mpl::eval_if< + use_value_holder + , mpl::identity + , pointee + >::type wrapped; + typedef mpl::or_< + has_back_reference + , is_same + , is_base_and_derived + > use_back_reference; + typedef typename mpl::eval_if< + use_back_reference + , mpl::if_< + use_value_holder + , value_holder_back_reference + , pointer_holder_back_reference + > + , mpl::if_< + use_value_holder + , value_holder + , pointer_holder + > + >::type holder; + inline static void register_() + { + class_metadata::register_aux((T*)0); + } + private: + template + inline static void register_aux(python::wrapper*) + { + typedef typename mpl::not_ >::type use_callback; + class_metadata::register_aux2((T2*)0, use_callback()); + } + inline static void register_aux(void*) + { + typedef typename is_base_and_derived::type use_callback; + class_metadata::register_aux2((T*)0, use_callback()); + } + template + inline static void register_aux2(T2*, Callback) + { + objects::register_shared_ptr_from_python_and_casts((T2*)0, bases()); + class_metadata::maybe_register_callback_class((T2*)0, Callback()); + class_metadata::maybe_register_class_to_python((T2*)0, is_noncopyable()); + class_metadata::maybe_register_pointer_to_python( + (T2*)0, (use_value_holder*)0, (use_back_reference*)0); + } + inline static void maybe_register_pointer_to_python(...) {} + inline static void maybe_register_pointer_to_python(void*,void*,mpl::true_*) + { + objects::copy_class_object(python::type_id(), python::type_id >()); + objects::copy_class_object(python::type_id(), python::type_id >()); + } + template + inline static void maybe_register_pointer_to_python(T2*, mpl::false_*, mpl::false_*) + { + python::detail::force_instantiate( + objects::class_value_wrapper< + held_type + , make_ptr_instance > + >() + ); + objects::copy_class_object(python::type_id(), python::type_id()); + } + inline static void maybe_register_class_to_python(void*, mpl::true_) {} + template + inline static void maybe_register_class_to_python(T2*, mpl::false_) + { + python::detail::force_instantiate(class_cref_wrapper >()); + objects::copy_class_object(python::type_id(), python::type_id()); + } + inline static void maybe_register_callback_class(void*, mpl::false_) {} + template + inline static void maybe_register_callback_class(T2*, mpl::true_) + { + objects::register_shared_ptr_from_python_and_casts( + (wrapped*)0, mpl::single_view()); + objects::copy_class_object(python::type_id(), python::type_id()); + } +}; +}}} +namespace boost { namespace python { +namespace api +{ + class object; +} +using api::object; +class tuple; + object const& make_instance_reduce_function(); +struct pickle_suite; +namespace error_messages { + template + struct missing_pickle_suite_function_or_incorrect_signature {}; + inline void must_be_derived_from_pickle_suite(pickle_suite const&) {} +} +namespace detail { struct pickle_suite_registration; } +struct pickle_suite +{ + private: + struct inaccessible {}; + friend struct detail::pickle_suite_registration; + public: + static inaccessible* getinitargs() { return 0; } + static inaccessible* getstate() { return 0; } + static inaccessible* setstate() { return 0; } + static bool getstate_manages_dict() { return false; } +}; +namespace detail { + struct pickle_suite_registration + { + typedef pickle_suite::inaccessible inaccessible; + template + static + void + register_( + Class_& cl, + tuple (*getinitargs_fn)(Tgetinitargs), + inaccessible* (* )(), + inaccessible* (* )(), + bool) + { + cl.enable_pickling_(false); + cl.def("__getinitargs__", getinitargs_fn); + } + template + static + void + register_( + Class_& cl, + inaccessible* (* )(), + Rgetstate (*getstate_fn)(Tgetstate), + void (*setstate_fn)(Tsetstate, Ttuple), + bool getstate_manages_dict) + { + cl.enable_pickling_(getstate_manages_dict); + cl.def("__getstate__", getstate_fn); + cl.def("__setstate__", setstate_fn); + } + template + static + void + register_( + Class_& cl, + tuple (*getinitargs_fn)(Tgetinitargs), + Rgetstate (*getstate_fn)(Tgetstate), + void (*setstate_fn)(Tsetstate, Ttuple), + bool getstate_manages_dict) + { + cl.enable_pickling_(getstate_manages_dict); + cl.def("__getinitargs__", getinitargs_fn); + cl.def("__getstate__", getstate_fn); + cl.def("__setstate__", setstate_fn); + } + template + static + void + register_( + Class_&, + ...) + { + typedef typename + error_messages::missing_pickle_suite_function_or_incorrect_signature< + Class_>::error_type error_type; + } + }; + template + struct pickle_suite_finalize + : PickleSuiteType, + pickle_suite_registration + {}; +} +}} +namespace boost { namespace python { namespace detail { +struct overloads_base; +template +inline void define_with_defaults(char const* name, OverloadsT const&, NameSpaceT&, SigT const&); +}}} +namespace boost { namespace python { namespace detail { +enum operator_id +{ + op_add, + op_sub, + op_mul, + op_div, + op_mod, + op_divmod, + op_pow, + op_lshift, + op_rshift, + op_and, + op_xor, + op_or, + op_neg, + op_pos, + op_abs, + op_invert, + op_int, + op_long, + op_float, + op_str, + op_cmp, + op_gt, + op_ge, + op_lt, + op_le, + op_eq, + op_ne, + op_iadd, + op_isub, + op_imul, + op_idiv, + op_imod, + op_ilshift, + op_irshift, + op_iand, + op_ixor, + op_ior, + op_complex, + op_nonzero, + op_repr +}; +}}} +namespace boost { +namespace tuples { +struct null_type {}; +namespace detail { + inline const null_type cnull() { return null_type(); } +template struct IF { typedef Then RET; }; +template struct IF { + typedef Else RET; +}; +} +template struct cons; +template < + class T0 = null_type, class T1 = null_type, class T2 = null_type, + class T3 = null_type, class T4 = null_type, class T5 = null_type, + class T6 = null_type, class T7 = null_type, class T8 = null_type, + class T9 = null_type> +class tuple; +template struct length; +namespace detail { +template +class generate_error; +template< int N > +struct get_class { + template + inline static RET get(const cons& t) + { + return get_class::template get(t.tail); + } + template + inline static RET get(cons& t) + { + return get_class::template get(t.tail); + } +}; +template<> +struct get_class<0> { + template + inline static RET get(const cons& t) + { + return t.head; + } + template + inline static RET get(cons& t) + { + return t.head; + } +}; +} +template +struct element +{ +private: + typedef typename T::tail_type Next; +public: + typedef typename element::type type; +}; +template +struct element<0,T> +{ + typedef typename T::head_type type; +}; +template +struct element +{ +private: + typedef typename T::tail_type Next; + typedef typename element::type unqualified_type; +public: + typedef typename boost::add_const::type type; +}; +template +struct element<0,const T> +{ + typedef typename boost::add_const::type type; +}; +template struct access_traits { + typedef const T& const_type; + typedef T& non_const_type; + typedef const typename boost::remove_cv::type& parameter_type; +}; +template struct access_traits { + typedef T& const_type; + typedef T& non_const_type; + typedef T& parameter_type; +}; +template +inline typename access_traits< + typename element >::type + >::non_const_type +get(cons& c ) { + return detail::get_class::template + get< + typename access_traits< + typename element >::type + >::non_const_type, + HT,TT + >(c); +} +template +inline typename access_traits< + typename element >::type + >::const_type +get(const cons& c ) { + return detail::get_class::template + get< + typename access_traits< + typename element >::type + >::const_type, + HT,TT + >(c); +} +namespace detail { +template class non_storeable_type { + non_storeable_type(); +}; +template struct wrap_non_storeable_type { + typedef typename IF< + ::boost::is_function::value, non_storeable_type, T + >::RET type; +}; +template <> struct wrap_non_storeable_type { + typedef non_storeable_type type; +}; +} +template +struct cons { + typedef HT head_type; + typedef TT tail_type; + typedef typename + detail::wrap_non_storeable_type::type stored_head_type; + stored_head_type head; + tail_type tail; + typename access_traits::non_const_type + get_head() { return head; } + typename access_traits::non_const_type + get_tail() { return tail; } + typename access_traits::const_type + get_head() const { return head; } + typename access_traits::const_type + get_tail() const { return tail; } + cons() : head(), tail() {} + cons(typename access_traits::parameter_type h, + const tail_type& t) + : head (h), tail(t) {} + template + cons( T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, + T6& t6, T7& t7, T8& t8, T9& t9, T10& t10 ) + : head (t1), + tail (t2, t3, t4, t5, t6, t7, t8, t9, t10, detail::cnull()) + {} + template + cons( const null_type& , T2& t2, T3& t3, T4& t4, T5& t5, + T6& t6, T7& t7, T8& t8, T9& t9, T10& t10 ) + : head (), + tail (t2, t3, t4, t5, t6, t7, t8, t9, t10, detail::cnull()) + {} + template + cons( const cons& u ) : head(u.head), tail(u.tail) {} + template + cons& operator=( const cons& u ) { + head=u.head; tail=u.tail; return *this; + } + cons& operator=(const cons& u) { + head = u.head; tail = u.tail; return *this; + } + template + cons& operator=( const std::pair& u ) { + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((length::value == 2) == 0 ? false : true) >)> boost_static_assert_typedef_388; + head = u.first; tail.head = u.second; return *this; + } + template + typename access_traits< + typename element >::type + >::non_const_type + get() { + return boost::tuples::get(*this); + } + template + typename access_traits< + typename element >::type + >::const_type + get() const { + return boost::tuples::get(*this); + } +}; +template +struct cons { + typedef HT head_type; + typedef null_type tail_type; + typedef cons self_type; + typedef typename + detail::wrap_non_storeable_type::type stored_head_type; + stored_head_type head; + typename access_traits::non_const_type + get_head() { return head; } + null_type get_tail() { return null_type(); } + typename access_traits::const_type + get_head() const { return head; } + const null_type get_tail() const { return null_type(); } + cons() : head() {} + cons(typename access_traits::parameter_type h, + const null_type& = null_type()) + : head (h) {} + template + cons(T1& t1, const null_type&, const null_type&, const null_type&, + const null_type&, const null_type&, const null_type&, + const null_type&, const null_type&, const null_type&) + : head (t1) {} + cons(const null_type&, + const null_type&, const null_type&, const null_type&, + const null_type&, const null_type&, const null_type&, + const null_type&, const null_type&, const null_type&) + : head () {} + template + cons( const cons& u ) : head(u.head) {} + template + cons& operator=(const cons& u ) + { head = u.head; return *this; } + cons& operator=(const cons& u) { head = u.head; return *this; } + template + typename access_traits< + typename element::type + >::non_const_type + get() { + return boost::tuples::get(*this); + } + template + typename access_traits< + typename element::type + >::const_type + get() const { + return boost::tuples::get(*this); + } +}; +template +struct length { + static const int value = 1 + length::value; +}; +template<> +struct length > { + static const int value = 0; +}; +template<> +struct length const> { + static const int value = 0; +}; +template<> +struct length { + static const int value = 0; +}; +template<> +struct length { + static const int value = 0; +}; +namespace detail { +template +struct map_tuple_to_cons +{ + typedef cons::type + > type; +}; +template <> +struct map_tuple_to_cons +{ + typedef null_type type; +}; +} +template +class tuple : + public detail::map_tuple_to_cons::type +{ +public: + typedef typename + detail::map_tuple_to_cons::type inherited; + typedef typename inherited::head_type head_type; + typedef typename inherited::tail_type tail_type; + tuple() {} + tuple(typename access_traits::parameter_type t0) + : inherited(t0, detail::cnull(), detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull()) {} + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1) + : inherited(t0, t1, detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull()) {} + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1, + typename access_traits::parameter_type t2) + : inherited(t0, t1, t2, detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull()) {} + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1, + typename access_traits::parameter_type t2, + typename access_traits::parameter_type t3) + : inherited(t0, t1, t2, t3, detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull(), + detail::cnull()) {} + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1, + typename access_traits::parameter_type t2, + typename access_traits::parameter_type t3, + typename access_traits::parameter_type t4) + : inherited(t0, t1, t2, t3, t4, detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull()) {} + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1, + typename access_traits::parameter_type t2, + typename access_traits::parameter_type t3, + typename access_traits::parameter_type t4, + typename access_traits::parameter_type t5) + : inherited(t0, t1, t2, t3, t4, t5, detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull()) {} + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1, + typename access_traits::parameter_type t2, + typename access_traits::parameter_type t3, + typename access_traits::parameter_type t4, + typename access_traits::parameter_type t5, + typename access_traits::parameter_type t6) + : inherited(t0, t1, t2, t3, t4, t5, t6, detail::cnull(), + detail::cnull(), detail::cnull()) {} + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1, + typename access_traits::parameter_type t2, + typename access_traits::parameter_type t3, + typename access_traits::parameter_type t4, + typename access_traits::parameter_type t5, + typename access_traits::parameter_type t6, + typename access_traits::parameter_type t7) + : inherited(t0, t1, t2, t3, t4, t5, t6, t7, detail::cnull(), + detail::cnull()) {} + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1, + typename access_traits::parameter_type t2, + typename access_traits::parameter_type t3, + typename access_traits::parameter_type t4, + typename access_traits::parameter_type t5, + typename access_traits::parameter_type t6, + typename access_traits::parameter_type t7, + typename access_traits::parameter_type t8) + : inherited(t0, t1, t2, t3, t4, t5, t6, t7, t8, detail::cnull()) {} + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1, + typename access_traits::parameter_type t2, + typename access_traits::parameter_type t3, + typename access_traits::parameter_type t4, + typename access_traits::parameter_type t5, + typename access_traits::parameter_type t6, + typename access_traits::parameter_type t7, + typename access_traits::parameter_type t8, + typename access_traits::parameter_type t9) + : inherited(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) {} + template + tuple(const cons& p) : inherited(p) {} + template + tuple& operator=(const cons& k) { + inherited::operator=(k); + return *this; + } + template + tuple& operator=(const std::pair& k) { + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((length::value == 2) == 0 ? false : true) >)> boost_static_assert_typedef_645; + this->head = k.first; + this->tail.head = k.second; + return *this; + } +}; +template <> +class tuple : + public null_type +{ +public: + typedef null_type inherited; +}; +namespace detail { +struct swallow_assign { + template + swallow_assign const& operator=(const T&) const { + return *this; + } +}; +} +detail::swallow_assign const ignore = detail::swallow_assign(); +template +struct make_tuple_traits { + typedef T type; +}; +template +struct make_tuple_traits { + typedef typename + detail::generate_error:: + do_not_use_with_reference_type error; +}; +template struct make_tuple_traits { + typedef const T (&type)[n]; +}; +template +struct make_tuple_traits { + typedef const T (&type)[n]; +}; +template struct make_tuple_traits { + typedef const volatile T (&type)[n]; +}; +template +struct make_tuple_traits { + typedef const volatile T (&type)[n]; +}; +template +struct make_tuple_traits >{ + typedef T& type; +}; +template +struct make_tuple_traits >{ + typedef T& type; +}; +namespace detail { +template < + class T0 = null_type, class T1 = null_type, class T2 = null_type, + class T3 = null_type, class T4 = null_type, class T5 = null_type, + class T6 = null_type, class T7 = null_type, class T8 = null_type, + class T9 = null_type +> +struct make_tuple_mapper { + typedef + tuple::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type> type; +}; +} +inline tuple<> make_tuple() { + return tuple<>(); +} +template +inline typename detail::make_tuple_mapper::type +make_tuple(const T0& t0) { + typedef typename detail::make_tuple_mapper::type t; + return t(t0); +} +template +inline typename detail::make_tuple_mapper::type +make_tuple(const T0& t0, const T1& t1) { + typedef typename detail::make_tuple_mapper::type t; + return t(t0, t1); +} +template +inline typename detail::make_tuple_mapper::type +make_tuple(const T0& t0, const T1& t1, const T2& t2) { + typedef typename detail::make_tuple_mapper::type t; + return t(t0, t1, t2); +} +template +inline typename detail::make_tuple_mapper::type +make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3) { + typedef typename detail::make_tuple_mapper::type t; + return t(t0, t1, t2, t3); +} +template +inline typename detail::make_tuple_mapper::type +make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, + const T4& t4) { + typedef typename detail::make_tuple_mapper::type t; + return t(t0, t1, t2, t3, t4); +} +template +inline typename detail::make_tuple_mapper::type +make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, + const T4& t4, const T5& t5) { + typedef typename detail::make_tuple_mapper::type t; + return t(t0, t1, t2, t3, t4, t5); +} +template +inline typename detail::make_tuple_mapper::type +make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, + const T4& t4, const T5& t5, const T6& t6) { + typedef typename detail::make_tuple_mapper + ::type t; + return t(t0, t1, t2, t3, t4, t5, t6); +} +template +inline typename detail::make_tuple_mapper::type +make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, + const T4& t4, const T5& t5, const T6& t6, const T7& t7) { + typedef typename detail::make_tuple_mapper + ::type t; + return t(t0, t1, t2, t3, t4, t5, t6, t7); +} +template +inline typename detail::make_tuple_mapper + ::type +make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, + const T4& t4, const T5& t5, const T6& t6, const T7& t7, + const T8& t8) { + typedef typename detail::make_tuple_mapper + ::type t; + return t(t0, t1, t2, t3, t4, t5, t6, t7, t8); +} +template +inline typename detail::make_tuple_mapper + ::type +make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, + const T4& t4, const T5& t5, const T6& t6, const T7& t7, + const T8& t8, const T9& t9) { + typedef typename detail::make_tuple_mapper + ::type t; + return t(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9); +} +template +inline tuple tie(T1& t1) { + return tuple (t1); +} +template +inline tuple tie(T1& t1, T2& t2) { + return tuple (t1, t2); +} +template +inline tuple tie(T1& t1, T2& t2, T3& t3) { + return tuple (t1, t2, t3); +} +template +inline tuple tie(T1& t1, T2& t2, T3& t3, T4& t4) { + return tuple (t1, t2, t3, t4); +} +template +inline tuple +tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5) { + return tuple (t1, t2, t3, t4, t5); +} +template +inline tuple +tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6) { + return tuple (t1, t2, t3, t4, t5, t6); +} +template +inline tuple +tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7) { + return tuple (t1, t2, t3, t4, t5, t6, t7); +} +template +inline tuple +tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8) { + return tuple + (t1, t2, t3, t4, t5, t6, t7, t8); +} +template +inline tuple +tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, + T9& t9) { + return tuple + (t1, t2, t3, t4, t5, t6, t7, t8, t9); +} +template +inline tuple +tie(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, + T9& t9, T10& t10) { + return tuple + (t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); +} +} +} +namespace boost { +using tuples::tuple; +using tuples::make_tuple; +using tuples::tie; +using tuples::get; +} +namespace boost { namespace python { +struct default_call_policies; +namespace detail +{ + template + struct tuple_extract; + template + struct tuple_extract_impl + { + template + struct apply + { + typedef typename Tuple::head_type result_type; + static typename Tuple::head_type extract(Tuple const& x) + { + return x.get_head(); + } + }; + }; + template <> + struct tuple_extract_impl + { + template + struct apply + { + typedef tuple_extract next; + typedef typename next::result_type result_type; + static result_type extract(Tuple const& x) + { + return next::extract(x.get_tail()); + } + }; + }; + template + struct tuple_extract_base_select + { + typedef typename Tuple::head_type head_type; + typedef typename mpl::apply1::type>::type match_t; + static const bool match = match_t::value; + typedef typename tuple_extract_impl::template apply type; + }; + template + struct tuple_extract + : tuple_extract_base_select< + Tuple + , typename mpl::lambda::type + >::type + { + }; + template + struct doc_extract + : tuple_extract< + Tuple + , mpl::not_< + mpl::or_< + indirect_traits::is_reference_to_class + , indirect_traits::is_reference_to_member_function_pointer + > + > + > + { + }; + template + struct keyword_extract + : tuple_extract > + { + }; + template + struct policy_extract + : tuple_extract< + Tuple + , mpl::and_< + mpl::not_ > + , indirect_traits::is_reference_to_class + , mpl::not_ > + > + > + { + }; + template + struct default_implementation_extract + : tuple_extract< + Tuple + , indirect_traits::is_reference_to_member_function_pointer + > + { + }; + template + struct def_helper + { + typedef boost::tuples::tuple< + T1 const& + , T2 const& + , T3 const& + , T4 const& + , default_call_policies + , detail::keywords<0> + , char const* + , void(not_specified::*)() + > all_t; + def_helper(T1 const& a1) : m_all(a1,m_nil,m_nil,m_nil) {} + def_helper(T1 const& a1, T2 const& a2) : m_all(a1,a2,m_nil,m_nil) {} + def_helper(T1 const& a1, T2 const& a2, T3 const& a3) : m_all(a1,a2,a3,m_nil) {} + def_helper(T1 const& a1, T2 const& a2, T3 const& a3, T4 const& a4) : m_all(a1,a2,a3,a4) {} + private: + typedef typename default_implementation_extract::result_type default_implementation_t; + public: + static const bool has_default_implementation = ( !is_same::value) + ; + public: + char const* doc() const + { + return doc_extract::extract(m_all); + } + typename keyword_extract::result_type keywords() const + { + return keyword_extract::extract(m_all); + } + typename policy_extract::result_type policies() const + { + return policy_extract::extract(m_all); + } + default_implementation_t default_implementation() const + { + return default_implementation_extract::extract(m_all); + } + private: + all_t m_all; + not_specified m_nil; + }; +} +}} +namespace boost { namespace python { +template class wrapper; +namespace detail { +template +inline type_info unwrap_type_id(T*, ...) +{ + return type_id(); +} +template +inline type_info unwrap_type_id(U*, wrapper*) +{ + return type_id(); +} +}}} +namespace boost { namespace python { +template class wrapper; +namespace detail +{ + typedef char (&is_not_wrapper)[2]; + is_not_wrapper is_wrapper_helper(...); + template + char is_wrapper_helper(wrapper const volatile*); + template + struct is_wrapper + : mpl::bool_<(sizeof(detail::is_wrapper_helper((T*)0)) == 1)> + {}; +}}} +namespace boost { namespace python { namespace detail { +template +struct unwrap_wrapper_helper +{ + typedef typename T::_wrapper_wrapped_type_ type; +}; +template +struct unwrap_wrapper_ + : mpl::eval_if,unwrap_wrapper_helper,mpl::identity > +{}; +template +typename unwrap_wrapper_::type* +unwrap_wrapper(T*) +{ + return 0; +} +}}} +namespace boost { namespace python { +template class def_visitor; +enum no_init_t { no_init }; +namespace detail +{ + struct write_type_id + { + write_type_id(type_info**p) : p(p) {} + template + void operator()(T*) const + { + *(*p)++ = type_id(); + } + type_info** p; + }; + template + struct is_data_member_pointer + : mpl::and_< + is_member_pointer + , mpl::not_ > + > + {}; + namespace error + { + template struct assertion_failed { }; + template struct assertion_ok { typedef C failed; }; + template + struct assertion + : mpl::if_, assertion_failed >::type + {}; + template + void not_a_derived_class_member(Default) {} + template + struct virtual_function_default + { + template + static void + must_be_derived_class_member(Default const&) + { + typedef typename assertion > >::failed test0; + typedef typename assertion >::failed test1; + typedef typename assertion >::failed test2; + not_a_derived_class_member(Fn()); + } + }; + } +} +template < + class W + , class X1 + , class X2 + , class X3 + > +class class_ : public objects::class_base +{ + public: + typedef objects::class_base base; + typedef class_ self; + typedef typename objects::class_metadata metadata; + typedef W wrapped_type; + private: + struct id_vector + { + typedef typename metadata::bases bases; + id_vector() + { + ids[0] = detail::unwrap_type_id((W*)0, (W*)0); + type_info* p = ids + 1; + mpl::for_each(detail::write_type_id(&p), (bases*)0, (add_pointer*)0); + } + static const std::size_t size = mpl::size::value + 1 + ; + type_info ids[size]; + }; + friend struct id_vector; + public: + class_(char const* name, char const* doc = 0); + class_(char const* name, no_init_t); + class_(char const* name, char const* doc, no_init_t); + template + inline class_(char const* name, init_base const& i) + : base(name, id_vector::size, id_vector().ids) + { + this->initialize(i); + } + template + inline class_(char const* name, char const* doc, init_base const& i) + : base(name, id_vector::size, id_vector().ids, doc) + { + this->initialize(i); + } + public: + template + self& def(def_visitor const& visitor) + { + visitor.visit(*this); + return *this; + } + template + self& def(char const* name, F f) + { + this->def_impl( + detail::unwrap_wrapper((W*)0) + , name, f, detail::def_helper(0), &f); + return *this; + } + template + self& def(char const* name, A1 a1, A2 const& a2) + { + this->def_maybe_overloads(name, a1, a2, &a2); + return *this; + } + template + self& def(char const* name, Fn fn, A1 const& a1, A2 const& a2) + { + this->def_impl( + detail::unwrap_wrapper((W*)0) + , name, fn + , detail::def_helper(a1,a2) + , &fn); + return *this; + } + template + self& def(char const* name, Fn fn, A1 const& a1, A2 const& a2, A3 const& a3) + { + this->def_impl( + detail::unwrap_wrapper((W*)0) + , name, fn + , detail::def_helper(a1,a2,a3) + , &fn); + return *this; + } + template + self& def_readonly(char const* name, D const& d, char const* doc=0) + { + return this->def_readonly_impl(name, d, doc ); + } + template + self& def_readwrite(char const* name, D const& d, char const* doc=0) + { + return this->def_readwrite_impl(name, d, doc ); + } + template + self& def_readonly(char const* name, D& d, char const* doc=0) + { + return this->def_readonly_impl(name, d, doc ); + } + template + self& def_readwrite(char const* name, D& d, char const* doc=0) + { + return this->def_readwrite_impl(name, d, doc ); + } + template + self& add_property(char const* name, Get fget, char const* docstr = 0) + { + base::add_property(name, this->make_getter(fget), docstr); + return *this; + } + template + self& add_property(char const* name, Get fget, Set fset, char const* docstr = 0) + { + base::add_property( + name, this->make_getter(fget), this->make_setter(fset), docstr); + return *this; + } + template + self& add_static_property(char const* name, Get fget) + { + base::add_static_property(name, object(fget)); + return *this; + } + template + self& add_static_property(char const* name, Get fget, Set fset) + { + base::add_static_property(name, object(fget), object(fset)); + return *this; + } + template + self& setattr(char const* name, U const& x) + { + this->base::setattr(name, object(x)); + return *this; + } + template + self& def_pickle(PickleSuiteType const& x) + { + error_messages::must_be_derived_from_pickle_suite(x); + detail::pickle_suite_finalize::register_( + *this, + &PickleSuiteType::getinitargs, + &PickleSuiteType::getstate, + &PickleSuiteType::setstate, + PickleSuiteType::getstate_manages_dict()); + return *this; + } + self& enable_pickling() + { + this->base::enable_pickling_(false); + return *this; + } + self& staticmethod(char const* name) + { + this->make_method_static(name); + return *this; + } + private: + template + object make_getter(F f) + { + typedef typename api::is_object_operators::type is_obj_or_proxy; + return this->make_fn_impl( + detail::unwrap_wrapper((W*)0) + , f, is_obj_or_proxy(), (char*)0, detail::is_data_member_pointer() + ); + } + template + object make_setter(F f) + { + typedef typename api::is_object_operators::type is_obj_or_proxy; + return this->make_fn_impl( + detail::unwrap_wrapper((W*)0) + , f, is_obj_or_proxy(), (int*)0, detail::is_data_member_pointer() + ); + } + template + object make_fn_impl(T*, F const& f, mpl::false_, void*, mpl::false_) + { + return python::make_function(f, default_call_policies(), detail::get_signature(f, (T*)0)); + } + template + object make_fn_impl(T*, D B::*pm_, mpl::false_, char*, mpl::true_) + { + D T::*pm = pm_; + return python::make_getter(pm); + } + template + object make_fn_impl(T*, D B::*pm_, mpl::false_, int*, mpl::true_) + { + D T::*pm = pm_; + return python::make_setter(pm); + } + template + object make_fn_impl(T*, F const& x, mpl::true_, void*, mpl::false_) + { + return x; + } + template + self& def_readonly_impl( + char const* name, D B::*pm_, char const* doc ) + { + return this->add_property(name, pm_, doc); + } + template + self& def_readwrite_impl( + char const* name, D B::*pm_, char const* doc ) + { + return this->add_property(name, pm_, pm_, doc); + } + template + self& def_readonly_impl( + char const* name, D& d, char const* ) + { + return this->add_static_property(name, python::make_getter(d)); + } + template + self& def_readwrite_impl( + char const* name, D& d, char const* ) + { + return this->add_static_property(name, python::make_getter(d), python::make_setter(d)); + } + template + inline void initialize(DefVisitor const& i) + { + metadata::register_(); + typedef typename metadata::holder holder; + this->set_instance_size( objects::additional_instance_size::value ); + this->def(i); + } + inline void initialize(no_init_t) + { + metadata::register_(); + this->def_no_init(); + } + template + inline void def_impl( + T* + , char const* name + , LeafVisitor + , Helper const& helper + , def_visitor const* v + ) + { + v->visit(*this, name, helper); + } + template + inline void def_impl( + T* + , char const* name + , Fn fn + , Helper const& helper + , ... + ) + { + objects::add_to_namespace( + *this + , name + , make_function( + fn + , helper.policies() + , helper.keywords() + , detail::get_signature(fn, (T*)0) + ) + , helper.doc() + ); + this->def_default(name, fn, helper, mpl::bool_()); + } + template + inline void def_default( + char const* name + , Fn + , Helper const& helper + , mpl::bool_) + { + detail::error::virtual_function_default::must_be_derived_class_member( + helper.default_implementation()); + objects::add_to_namespace( + *this, name, + make_function( + helper.default_implementation(), helper.policies(), helper.keywords()) + ); + } + template + inline void def_default(char const*, Fn, Helper const&, mpl::bool_) + { } + template + void def_maybe_overloads( + char const* name + , SigT sig + , OverloadsT const& overloads + , detail::overloads_base const*) + { + detail::define_with_defaults( + name, overloads, *this, detail::get_signature(sig)); + } + template + void def_maybe_overloads( + char const* name + , Fn fn + , A1 const& a1 + , ...) + { + this->def_impl( + detail::unwrap_wrapper((W*)0) + , name + , fn + , detail::def_helper(a1) + , &fn + ); + } +}; +template +inline class_::class_(char const* name, char const* doc) + : base(name, id_vector::size, id_vector().ids, doc) +{ + this->initialize(init<>()); +} +template +inline class_::class_(char const* name, no_init_t) + : base(name, id_vector::size, id_vector().ids) +{ + this->initialize(no_init); +} +template +inline class_::class_(char const* name, char const* doc, no_init_t) + : base(name, id_vector::size, id_vector().ids, doc) +{ + this->initialize(no_init); +} +}} +namespace boost { namespace python { +namespace detail +{ + template + struct copy_const_reference_expects_a_const_reference_return_type + {} + ; +} +template struct to_python_value; +struct copy_const_reference +{ + template + struct apply + { + typedef typename mpl::if_c< + indirect_traits::is_reference_to_const::value + , to_python_value + , detail::copy_const_reference_expects_a_const_reference_return_type + >::type type; + }; +}; +}} +namespace boost { namespace python { +namespace detail +{ + template + struct copy_non_const_reference_expects_a_non_const_reference_return_type + {} + ; +} +template struct to_python_value; +struct copy_non_const_reference +{ + template + struct apply + { + typedef typename mpl::if_c< + indirect_traits::is_reference_to_non_const::value + , to_python_value + , detail::copy_non_const_reference_expects_a_non_const_reference_return_type + >::type type; + }; +}; +}} +namespace boost { namespace python { +namespace detail +{ + extern PyObject* current_scope; +} +class scope + : public object +{ + public: + inline scope(scope const&); + inline scope(object const&); + inline scope(); + inline ~scope(); + private: + PyObject* m_previous_scope; + private: + void operator=(scope const&); +}; +inline scope::scope(object const& new_scope) + : object(new_scope) + , m_previous_scope(detail::current_scope) +{ + detail::current_scope = python::incref(new_scope.ptr()); +} +inline scope::scope() + : object(detail::borrowed_reference( + detail::current_scope ? detail::current_scope : (&_Py_NoneStruct) + )) + , m_previous_scope(python::xincref(detail::current_scope)) +{ +} +inline scope::~scope() +{ + python::xdecref(detail::current_scope); + detail::current_scope = m_previous_scope; +} +namespace converter +{ + template <> + struct object_manager_traits + : object_manager_traits + { + }; +} +inline scope::scope(scope const& new_scope) + : object(new_scope) + , m_previous_scope(detail::current_scope) +{ + detail::current_scope = python::incref(new_scope.ptr()); +} +}} +namespace boost { namespace python { namespace detail { +void scope_setattr_doc(char const* name, object const& obj, char const* doc); +}}} +namespace boost { namespace python { +namespace detail +{ + namespace error + { + template struct multiple_functions_passed_to_def; + template <> struct multiple_functions_passed_to_def { typedef char type; }; + } + template + void def_from_helper( + char const* name, F const& fn, Helper const& helper) + { + typedef typename error::multiple_functions_passed_to_def< + Helper::has_default_implementation + >::type assertion; + detail::scope_setattr_doc( + name, boost::python::make_function( + fn + , helper.policies() + , helper.keywords()) + , helper.doc() + ); + } + template + void + def_maybe_overloads( + char const* name + , Fn fn + , A1 const& a1 + , ...) + { + detail::def_from_helper(name, fn, def_helper(a1)); + } + template + void def_maybe_overloads( + char const* name + , SigT sig + , StubsT const& stubs + , detail::overloads_base const*) + { + scope current; + detail::define_with_defaults( + name, stubs, current, detail::get_signature(sig)); + } + template + object make_function1(T fn, ...) { return make_function(fn); } + inline + object make_function1(object const& x, object const*) { return x; } +} +template +void def(char const* name, Fn fn) +{ + detail::scope_setattr_doc(name, detail::make_function1(fn, &fn), 0); +} +template +void def(char const* name, Arg1T arg1, Arg2T const& arg2) +{ + detail::def_maybe_overloads(name, arg1, arg2, &arg2); +} +template +void def(char const* name, F f, A1 const& a1, A2 const& a2) +{ + detail::def_from_helper(name, f, detail::def_helper(a1,a2)); +} +template +void def(char const* name, F f, A1 const& a1, A2 const& a2, A3 const& a3) +{ + detail::def_from_helper(name, f, detail::def_helper(a1,a2,a3)); +} +}} +namespace boost { namespace python { namespace converter { +template struct object_manager_traits; +template +struct pytype_object_manager_traits + : pyobject_type +{ + static const bool is_specialized = true; + static inline python::detail::new_reference adopt(PyObject*); +}; +template +inline python::detail::new_reference pytype_object_manager_traits::adopt(PyObject* x) +{ + return python::detail::new_reference(python::pytype_check(pytype, x)); +} +}}} +namespace boost { namespace python { +namespace detail +{ + struct list_base : object + { + void append(object_cref); + ssize_t count(object_cref value) const; + void extend(object_cref sequence); + long index(object_cref value) const; + void insert(ssize_t index, object_cref); + void insert(object const& index, object_cref); + object pop(); + object pop(ssize_t index); + object pop(object const& index); + void remove(object_cref value); + void reverse(); + void sort(); + void sort(object_cref cmpfunc); + protected: + list_base(); + explicit list_base(object_cref sequence); + inline explicit list_base(python::detail::borrowed_reference p) : object(p) {} inline explicit list_base(python::detail::new_reference p) : object(p) {} inline explicit list_base(python::detail::new_non_null_reference p) : object(p) {} + private: + static detail::new_non_null_reference call(object const&); + }; +} +class list : public detail::list_base +{ + typedef detail::list_base base; + public: + list() {} + template + explicit list(T const& sequence) + : base(object(sequence)) + { + } + template + void append(T const& x) + { + base::append(object(x)); + } + template + long count(T const& value) const + { + return base::count(object(value)); + } + template + void extend(T const& x) + { + base::extend(object(x)); + } + template + long index(T const& x) const + { + return base::index(object(x)); + } + template + void insert(ssize_t index, T const& x) + { + base::insert(index, object(x)); + } + template + void insert(object const& index, T const& x) + { + base::insert(index, object(x)); + } + object pop() { return base::pop(); } + object pop(ssize_t index) { return base::pop(index); } + template + object pop(T const& index) + { + return base::pop(object(index)); + } + template + void remove(T const& value) + { + base::remove(object(value)); + } + void sort() { base::sort(); } + template + void sort(T const& value) + { + base::sort(object(value)); + } + public: + inline explicit list(python::detail::borrowed_reference p) : base(p) {} inline explicit list(python::detail::new_reference p) : base(p) {} inline explicit list(python::detail::new_non_null_reference p) : base(p) {} +}; +namespace converter +{ + template <> + struct object_manager_traits + : pytype_object_manager_traits<&PyList_Type,list> + { + }; +} +}} +namespace boost { namespace python { +namespace detail +{ + struct tuple_base : object + { + protected: + tuple_base(); + tuple_base(object_cref sequence); + inline explicit tuple_base(python::detail::borrowed_reference p) : object(p) {} inline explicit tuple_base(python::detail::new_reference p) : object(p) {} inline explicit tuple_base(python::detail::new_non_null_reference p) : object(p) {} + private: + static detail::new_reference call(object const&); + }; +} +class tuple : public detail::tuple_base +{ + typedef detail::tuple_base base; + public: + tuple() {} + template + explicit tuple(T const& sequence) + : base(object(sequence)) + { + } + public: + inline explicit tuple(python::detail::borrowed_reference p) : base(p) {} inline explicit tuple(python::detail::new_reference p) : base(p) {} inline explicit tuple(python::detail::new_non_null_reference p) : base(p) {} +}; +namespace converter +{ + template <> + struct object_manager_traits + : pytype_object_manager_traits<&PyTuple_Type,tuple> + { + }; +} +inline tuple make_tuple() { return tuple(); } + template < class A0> + tuple + make_tuple( A0 const& a0) + { + tuple result((detail::new_reference)::PyTuple_New(1)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); + return result; + } + template < class A0 , class A1> + tuple + make_tuple( A0 const& a0 , A1 const& a1) + { + tuple result((detail::new_reference)::PyTuple_New(2)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); + return result; + } + template < class A0 , class A1 , class A2> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2) + { + tuple result((detail::new_reference)::PyTuple_New(3)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); + return result; + } + template < class A0 , class A1 , class A2 , class A3> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3) + { + tuple result((detail::new_reference)::PyTuple_New(4)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[3] = python::incref(python::object(a3).ptr())); + return result; + } + template < class A0 , class A1 , class A2 , class A3 , class A4> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4) + { + tuple result((detail::new_reference)::PyTuple_New(5)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[3] = python::incref(python::object(a3).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[4] = python::incref(python::object(a4).ptr())); + return result; + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5) + { + tuple result((detail::new_reference)::PyTuple_New(6)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[3] = python::incref(python::object(a3).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[4] = python::incref(python::object(a4).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[5] = python::incref(python::object(a5).ptr())); + return result; + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6) + { + tuple result((detail::new_reference)::PyTuple_New(7)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[3] = python::incref(python::object(a3).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[4] = python::incref(python::object(a4).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[5] = python::incref(python::object(a5).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[6] = python::incref(python::object(a6).ptr())); + return result; + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7) + { + tuple result((detail::new_reference)::PyTuple_New(8)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[3] = python::incref(python::object(a3).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[4] = python::incref(python::object(a4).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[5] = python::incref(python::object(a5).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[6] = python::incref(python::object(a6).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[7] = python::incref(python::object(a7).ptr())); + return result; + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8) + { + tuple result((detail::new_reference)::PyTuple_New(9)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[3] = python::incref(python::object(a3).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[4] = python::incref(python::object(a4).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[5] = python::incref(python::object(a5).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[6] = python::incref(python::object(a6).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[7] = python::incref(python::object(a7).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[8] = python::incref(python::object(a8).ptr())); + return result; + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9) + { + tuple result((detail::new_reference)::PyTuple_New(10)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[3] = python::incref(python::object(a3).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[4] = python::incref(python::object(a4).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[5] = python::incref(python::object(a5).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[6] = python::incref(python::object(a6).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[7] = python::incref(python::object(a7).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[8] = python::incref(python::object(a8).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[9] = python::incref(python::object(a9).ptr())); + return result; + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10) + { + tuple result((detail::new_reference)::PyTuple_New(11)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[3] = python::incref(python::object(a3).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[4] = python::incref(python::object(a4).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[5] = python::incref(python::object(a5).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[6] = python::incref(python::object(a6).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[7] = python::incref(python::object(a7).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[8] = python::incref(python::object(a8).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[9] = python::incref(python::object(a9).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[10] = python::incref(python::object(a10).ptr())); + return result; + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11) + { + tuple result((detail::new_reference)::PyTuple_New(12)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[3] = python::incref(python::object(a3).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[4] = python::incref(python::object(a4).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[5] = python::incref(python::object(a5).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[6] = python::incref(python::object(a6).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[7] = python::incref(python::object(a7).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[8] = python::incref(python::object(a8).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[9] = python::incref(python::object(a9).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[10] = python::incref(python::object(a10).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[11] = python::incref(python::object(a11).ptr())); + return result; + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12) + { + tuple result((detail::new_reference)::PyTuple_New(13)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[3] = python::incref(python::object(a3).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[4] = python::incref(python::object(a4).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[5] = python::incref(python::object(a5).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[6] = python::incref(python::object(a6).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[7] = python::incref(python::object(a7).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[8] = python::incref(python::object(a8).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[9] = python::incref(python::object(a9).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[10] = python::incref(python::object(a10).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[11] = python::incref(python::object(a11).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[12] = python::incref(python::object(a12).ptr())); + return result; + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13) + { + tuple result((detail::new_reference)::PyTuple_New(14)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[3] = python::incref(python::object(a3).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[4] = python::incref(python::object(a4).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[5] = python::incref(python::object(a5).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[6] = python::incref(python::object(a6).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[7] = python::incref(python::object(a7).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[8] = python::incref(python::object(a8).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[9] = python::incref(python::object(a9).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[10] = python::incref(python::object(a10).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[11] = python::incref(python::object(a11).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[12] = python::incref(python::object(a12).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[13] = python::incref(python::object(a13).ptr())); + return result; + } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 , class A14> + tuple + make_tuple( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14) + { + tuple result((detail::new_reference)::PyTuple_New(15)); + (((PyTupleObject *)(result.ptr()))->ob_item[0] = python::incref(python::object(a0).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[1] = python::incref(python::object(a1).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[2] = python::incref(python::object(a2).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[3] = python::incref(python::object(a3).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[4] = python::incref(python::object(a4).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[5] = python::incref(python::object(a5).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[6] = python::incref(python::object(a6).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[7] = python::incref(python::object(a7).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[8] = python::incref(python::object(a8).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[9] = python::incref(python::object(a9).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[10] = python::incref(python::object(a10).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[11] = python::incref(python::object(a11).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[12] = python::incref(python::object(a12).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[13] = python::incref(python::object(a13).ptr())); (((PyTupleObject *)(result.ptr()))->ob_item[14] = python::incref(python::object(a14).ptr())); + return result; + } +}} +namespace boost { namespace python { +class dict; +namespace detail +{ + struct dict_base : object + { + void clear(); + dict copy(); + object get(object_cref k) const; + object get(object_cref k, object_cref d) const; + bool has_key(object_cref k) const; + list items() const; + object iteritems() const; + object iterkeys() const; + object itervalues() const; + list keys() const; + tuple popitem(); + object setdefault(object_cref k); + object setdefault(object_cref k, object_cref d); + void update(object_cref E); + list values() const; + protected: + dict_base(); + explicit dict_base(object_cref data); + inline explicit dict_base(python::detail::borrowed_reference p) : object(p) {} inline explicit dict_base(python::detail::new_reference p) : object(p) {} inline explicit dict_base(python::detail::new_non_null_reference p) : object(p) {} + private: + static detail::new_reference call(object const&); + }; +} +class dict : public detail::dict_base +{ + typedef detail::dict_base base; + public: + dict() {} + template + explicit dict(T const& data) + : base(object(data)) + { + } + template + object get(T const& k) const + { + return base::get(object(k)); + } + template + object get(T1 const& k, T2 const& d) const + { + return base::get(object(k),object(d)); + } + template + bool has_key(T const& k) const + { + return base::has_key(object(k)); + } + template + object setdefault(T const& k) + { + return base::setdefault(object(k)); + } + template + object setdefault(T1 const& k, T2 const& d) + { + return base::setdefault(object(k),object(d)); + } + template + void update(T const& E) + { + base::update(object(E)); + } + public: + inline explicit dict(python::detail::borrowed_reference p) : base(p) {} inline explicit dict(python::detail::new_reference p) : base(p) {} inline explicit dict(python::detail::new_non_null_reference p) : base(p) {} +}; +namespace converter +{ + template <> + struct object_manager_traits + : pytype_object_manager_traits<&PyDict_Type,dict> + { + }; +} +}} +namespace boost { namespace python { namespace objects { +struct function : PyObject +{ + function( + py_function const& + , python::detail::keyword const* names_and_defaults + , unsigned num_keywords); + ~function(); + PyObject* call(PyObject*, PyObject*) const; + static void add_to_namespace( + object const& name_space, char const* name, object const& attribute); + static void add_to_namespace( + object const& name_space, char const* name, object const& attribute, char const* doc); + object const& doc() const; + void doc(object const& x); + object const& name() const; + private: + object signature(bool show_return_type=false) const; + object signatures(bool show_return_type=false) const; + void argument_error(PyObject* args, PyObject* keywords) const; + void add_overload(handle const&); + private: + py_function m_fn; + handle m_overloads; + object m_name; + object m_namespace; + object m_doc; + object m_arg_names; + unsigned m_nkeyword_values; + friend class function_doc_signature_generator; +}; +inline object const& function::doc() const +{ + return this->m_doc; +} +inline void function::doc(object const& x) +{ + this->m_doc = x; +} +inline object const& function::name() const +{ + return this->m_name; +} +}}} +namespace boost { namespace python { +class docstring_options : boost::noncopyable +{ + public: + docstring_options(bool show_all=true) + { + previous_show_user_defined_ = show_user_defined_; + previous_show_py_signatures_ = show_py_signatures_; + previous_show_cpp_signatures_ = show_cpp_signatures_; + show_user_defined_ = show_all; + show_cpp_signatures_ = show_all; + show_py_signatures_ = show_all; + } + docstring_options(bool show_user_defined, bool show_signatures) + { + previous_show_user_defined_ = show_user_defined_; + previous_show_cpp_signatures_ = show_cpp_signatures_; + previous_show_py_signatures_ = show_py_signatures_; + show_user_defined_ = show_user_defined; + show_cpp_signatures_ = show_signatures; + show_py_signatures_ = show_signatures; + } + docstring_options(bool show_user_defined, bool show_py_signatures, bool show_cpp_signatures) + { + previous_show_user_defined_ = show_user_defined_; + previous_show_cpp_signatures_ = show_cpp_signatures_; + previous_show_py_signatures_ = show_py_signatures_; + show_user_defined_ = show_user_defined; + show_cpp_signatures_ = show_cpp_signatures; + show_py_signatures_ = show_py_signatures; + } + ~docstring_options() + { + show_user_defined_ = previous_show_user_defined_; + show_cpp_signatures_ = previous_show_cpp_signatures_; + show_py_signatures_ = previous_show_py_signatures_; + } + void + disable_user_defined() { show_user_defined_ = false; } + void + enable_user_defined() { show_user_defined_ = true; } + void + disable_py_signatures() + { + show_py_signatures_ = false; + } + void + enable_py_signatures() + { + show_py_signatures_ = true; + } + void + disable_cpp_signatures() + { + show_cpp_signatures_ = false; + } + void + enable_cpp_signatures() + { + show_cpp_signatures_ = true; + } + void + disable_signatures() + { + show_cpp_signatures_ = false; + show_py_signatures_ = false; + } + void + enable_signatures() + { + show_cpp_signatures_ = true; + show_py_signatures_ = true; + } + void + disable_all() + { + show_user_defined_ = false; + show_cpp_signatures_ = false; + show_py_signatures_ = false; + } + void + enable_all() + { + show_user_defined_ = true; + show_cpp_signatures_ = true; + show_py_signatures_ = true; + } + friend struct objects::function; + private: + static volatile bool show_user_defined_; + static volatile bool show_cpp_signatures_; + static volatile bool show_py_signatures_; + bool previous_show_user_defined_; + bool previous_show_cpp_signatures_; + bool previous_show_py_signatures_; +}; +}} +namespace boost { namespace python { namespace objects { +struct enum_base : python::api::object +{ + protected: + enum_base( + char const* name + , converter::to_python_function_t + , converter::convertible_function + , converter::constructor_function + , type_info + , const char *doc = 0 + ); + void add_value(char const* name, long value); + void export_values(); + static PyObject* to_python(PyTypeObject* type, long x); +}; +}}} +namespace boost { namespace python { +template +struct enum_ : public objects::enum_base +{ + typedef objects::enum_base base; + enum_(char const* name, char const* doc = 0); + inline enum_& value(char const* name, T); + inline enum_& export_values(); + private: + static PyObject* to_python(void const* x); + static void* convertible_from_python(PyObject* obj); + static void construct(PyObject* obj, converter::rvalue_from_python_stage1_data* data); +}; +template +inline enum_::enum_(char const* name, char const* doc ) + : base( + name + , &enum_::to_python + , &enum_::convertible_from_python + , &enum_::construct + , type_id() + , doc + ) +{ +} +template +PyObject* enum_::to_python(void const* x) +{ + return base::to_python( + converter::registered::converters.m_class_object + , static_cast(*(T const*)x)); +} +template +void* enum_::convertible_from_python(PyObject* obj) +{ + return PyObject_IsInstance( + obj + , upcast( + converter::registered::converters.m_class_object)) + ? obj : 0; +} +template +void enum_::construct(PyObject* obj, converter::rvalue_from_python_stage1_data* data) +{ + T x = static_cast((((PyIntObject *)(obj))->ob_ival)); + void* const storage = ((converter::rvalue_from_python_storage*)data)->storage.bytes; + new (storage) T(x); + data->convertible = storage; +} +template +inline enum_& enum_::value(char const* name, T x) +{ + this->add_value(name, static_cast(x)); + return *this; +} +template +inline enum_& enum_::export_values() +{ + this->base::export_values(); + return *this; +} +}} +namespace boost +{ +template< class T > struct is_placeholder +{ + enum _vt { value = 0 }; +}; +} +namespace boost +{ +template< int I > struct arg +{ + arg() + { + } + template< class T > arg( T const & ) + { + typedef char T_must_be_placeholder[ I == is_placeholder::value? 1: -1 ]; + } +}; +template< int I > bool operator==( arg const &, arg const & ) +{ + return true; +} +template< int I > struct is_placeholder< arg > +{ + enum _vt { value = I }; +}; +template< int I > struct is_placeholder< arg (*) () > +{ + enum _vt { value = I }; +}; +} +namespace boost { + template + inline void visit_each(Visitor& visitor, const T& t, long) + { + visitor(t); + } + template + inline void visit_each(Visitor& visitor, const T& t) + { + visit_each(visitor, t, 0); + } +} +namespace boost +{ +namespace _bi +{ +template struct storage1 +{ + explicit storage1( A1 a1 ): a1_( a1 ) {} + template void accept(V & v) const + { + visit_each(v, a1_, 0); + } + A1 a1_; +}; +template struct storage1< boost::arg > +{ + explicit storage1( boost::arg ) {} + template void accept(V &) const { } + static boost::arg a1_() { return boost::arg(); } +}; +template struct storage1< boost::arg (*) () > +{ + explicit storage1( boost::arg (*) () ) {} + template void accept(V &) const { } + static boost::arg a1_() { return boost::arg(); } +}; +template struct storage2: public storage1 +{ + typedef storage1 inherited; + storage2( A1 a1, A2 a2 ): storage1( a1 ), a2_( a2 ) {} + template void accept(V & v) const + { + inherited::accept(v); + visit_each(v, a2_, 0); + } + A2 a2_; +}; +template struct storage2< A1, boost::arg >: public storage1 +{ + typedef storage1 inherited; + storage2( A1 a1, boost::arg ): storage1( a1 ) {} + template void accept(V & v) const + { + inherited::accept(v); + } + static boost::arg a2_() { return boost::arg(); } +}; +template struct storage2< A1, boost::arg (*) () >: public storage1 +{ + typedef storage1 inherited; + storage2( A1 a1, boost::arg (*) () ): storage1( a1 ) {} + template void accept(V & v) const + { + inherited::accept(v); + } + static boost::arg a2_() { return boost::arg(); } +}; +template struct storage3: public storage2< A1, A2 > +{ + typedef storage2 inherited; + storage3( A1 a1, A2 a2, A3 a3 ): storage2( a1, a2 ), a3_( a3 ) {} + template void accept(V & v) const + { + inherited::accept(v); + visit_each(v, a3_, 0); + } + A3 a3_; +}; +template struct storage3< A1, A2, boost::arg >: public storage2< A1, A2 > +{ + typedef storage2 inherited; + storage3( A1 a1, A2 a2, boost::arg ): storage2( a1, a2 ) {} + template void accept(V & v) const + { + inherited::accept(v); + } + static boost::arg a3_() { return boost::arg(); } +}; +template struct storage3< A1, A2, boost::arg (*) () >: public storage2< A1, A2 > +{ + typedef storage2 inherited; + storage3( A1 a1, A2 a2, boost::arg (*) () ): storage2( a1, a2 ) {} + template void accept(V & v) const + { + inherited::accept(v); + } + static boost::arg a3_() { return boost::arg(); } +}; +template struct storage4: public storage3< A1, A2, A3 > +{ + typedef storage3 inherited; + storage4( A1 a1, A2 a2, A3 a3, A4 a4 ): storage3( a1, a2, a3 ), a4_( a4 ) {} + template void accept(V & v) const + { + inherited::accept(v); + visit_each(v, a4_, 0); + } + A4 a4_; +}; +template struct storage4< A1, A2, A3, boost::arg >: public storage3< A1, A2, A3 > +{ + typedef storage3 inherited; + storage4( A1 a1, A2 a2, A3 a3, boost::arg ): storage3( a1, a2, a3 ) {} + template void accept(V & v) const + { + inherited::accept(v); + } + static boost::arg a4_() { return boost::arg(); } +}; +template struct storage4< A1, A2, A3, boost::arg (*) () >: public storage3< A1, A2, A3 > +{ + typedef storage3 inherited; + storage4( A1 a1, A2 a2, A3 a3, boost::arg (*) () ): storage3( a1, a2, a3 ) {} + template void accept(V & v) const + { + inherited::accept(v); + } + static boost::arg a4_() { return boost::arg(); } +}; +template struct storage5: public storage4< A1, A2, A3, A4 > +{ + typedef storage4 inherited; + storage5( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5 ): storage4( a1, a2, a3, a4 ), a5_( a5 ) {} + template void accept(V & v) const + { + inherited::accept(v); + visit_each(v, a5_, 0); + } + A5 a5_; +}; +template struct storage5< A1, A2, A3, A4, boost::arg >: public storage4< A1, A2, A3, A4 > +{ + typedef storage4 inherited; + storage5( A1 a1, A2 a2, A3 a3, A4 a4, boost::arg ): storage4( a1, a2, a3, a4 ) {} + template void accept(V & v) const + { + inherited::accept(v); + } + static boost::arg a5_() { return boost::arg(); } +}; +template struct storage5< A1, A2, A3, A4, boost::arg (*) () >: public storage4< A1, A2, A3, A4 > +{ + typedef storage4 inherited; + storage5( A1 a1, A2 a2, A3 a3, A4 a4, boost::arg (*) () ): storage4( a1, a2, a3, a4 ) {} + template void accept(V & v) const + { + inherited::accept(v); + } + static boost::arg a5_() { return boost::arg(); } +}; +template struct storage6: public storage5< A1, A2, A3, A4, A5 > +{ + typedef storage5 inherited; + storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6 ): storage5( a1, a2, a3, a4, a5 ), a6_( a6 ) {} + template void accept(V & v) const + { + inherited::accept(v); + visit_each(v, a6_, 0); + } + A6 a6_; +}; +template struct storage6< A1, A2, A3, A4, A5, boost::arg >: public storage5< A1, A2, A3, A4, A5 > +{ + typedef storage5 inherited; + storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, boost::arg ): storage5( a1, a2, a3, a4, a5 ) {} + template void accept(V & v) const + { + inherited::accept(v); + } + static boost::arg a6_() { return boost::arg(); } +}; +template struct storage6< A1, A2, A3, A4, A5, boost::arg (*) () >: public storage5< A1, A2, A3, A4, A5 > +{ + typedef storage5 inherited; + storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, boost::arg (*) () ): storage5( a1, a2, a3, a4, a5 ) {} + template void accept(V & v) const + { + inherited::accept(v); + } + static boost::arg a6_() { return boost::arg(); } +}; +template struct storage7: public storage6< A1, A2, A3, A4, A5, A6 > +{ + typedef storage6 inherited; + storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7 ): storage6( a1, a2, a3, a4, a5, a6 ), a7_( a7 ) {} + template void accept(V & v) const + { + inherited::accept(v); + visit_each(v, a7_, 0); + } + A7 a7_; +}; +template struct storage7< A1, A2, A3, A4, A5, A6, boost::arg >: public storage6< A1, A2, A3, A4, A5, A6 > +{ + typedef storage6 inherited; + storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, boost::arg ): storage6( a1, a2, a3, a4, a5, a6 ) {} + template void accept(V & v) const + { + inherited::accept(v); + } + static boost::arg a7_() { return boost::arg(); } +}; +template struct storage7< A1, A2, A3, A4, A5, A6, boost::arg (*) () >: public storage6< A1, A2, A3, A4, A5, A6 > +{ + typedef storage6 inherited; + storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, boost::arg (*) () ): storage6( a1, a2, a3, a4, a5, a6 ) {} + template void accept(V & v) const + { + inherited::accept(v); + } + static boost::arg a7_() { return boost::arg(); } +}; +template struct storage8: public storage7< A1, A2, A3, A4, A5, A6, A7 > +{ + typedef storage7 inherited; + storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8 ): storage7( a1, a2, a3, a4, a5, a6, a7 ), a8_( a8 ) {} + template void accept(V & v) const + { + inherited::accept(v); + visit_each(v, a8_, 0); + } + A8 a8_; +}; +template struct storage8< A1, A2, A3, A4, A5, A6, A7, boost::arg >: public storage7< A1, A2, A3, A4, A5, A6, A7 > +{ + typedef storage7 inherited; + storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, boost::arg ): storage7( a1, a2, a3, a4, a5, a6, a7 ) {} + template void accept(V & v) const + { + inherited::accept(v); + } + static boost::arg a8_() { return boost::arg(); } +}; +template struct storage8< A1, A2, A3, A4, A5, A6, A7, boost::arg (*) () >: public storage7< A1, A2, A3, A4, A5, A6, A7 > +{ + typedef storage7 inherited; + storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, boost::arg (*) () ): storage7( a1, a2, a3, a4, a5, a6, a7 ) {} + template void accept(V & v) const + { + inherited::accept(v); + } + static boost::arg a8_() { return boost::arg(); } +}; +template struct storage9: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > +{ + typedef storage8 inherited; + storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9 ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ), a9_( a9 ) {} + template void accept(V & v) const + { + inherited::accept(v); + visit_each(v, a9_, 0); + } + A9 a9_; +}; +template struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, boost::arg >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > +{ + typedef storage8 inherited; + storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, boost::arg ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ) {} + template void accept(V & v) const + { + inherited::accept(v); + } + static boost::arg a9_() { return boost::arg(); } +}; +template struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, boost::arg (*) () >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > +{ + typedef storage8 inherited; + storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, boost::arg (*) () ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ) {} + template void accept(V & v) const + { + inherited::accept(v); + } + static boost::arg a9_() { return boost::arg(); } +}; +} +} +namespace boost +{ +template class weak_ptr; +namespace _bi +{ +template struct result_traits +{ + typedef R type; +}; +struct unspecified {}; +template struct result_traits +{ + typedef typename F::result_type type; +}; +template struct result_traits< unspecified, reference_wrapper > +{ + typedef typename F::result_type type; +}; +template bool ref_compare( T const & a, T const & b, long ) +{ + return a == b; +} +template bool ref_compare( arg const &, arg const &, int ) +{ + return true; +} +template bool ref_compare( arg (*) (), arg (*) (), int ) +{ + return true; +} +template bool ref_compare( reference_wrapper const & a, reference_wrapper const & b, int ) +{ + return a.get_pointer() == b.get_pointer(); +} +template class bind_t; +template bool ref_compare( bind_t const & a, bind_t const & b, int ) +{ + return a.compare( b ); +} +template class value +{ +public: + value(T const & t): t_(t) {} + T & get() { return t_; } + T const & get() const { return t_; } + bool operator==(value const & rhs) const + { + return t_ == rhs.t_; + } +private: + T t_; +}; +template bool ref_compare( value< weak_ptr > const & a, value< weak_ptr > const & b, int ) +{ + return !(a.get() < b.get()) && !(b.get() < a.get()); +} +template class type {}; +template struct unwrapper +{ + static inline F & unwrap( F & f, long ) + { + return f; + } + template static inline F2 & unwrap( reference_wrapper rf, int ) + { + return rf.get(); + } + template static inline _mfi::dm unwrap( R T::* pm, int ) + { + return _mfi::dm( pm ); + } +}; +class list0 +{ +public: + list0() {} + template T & operator[] (_bi::value & v) const { return v.get(); } + template T const & operator[] (_bi::value const & v) const { return v.get(); } + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + template R operator()(type, F & f, A &, long) + { + return unwrapper::unwrap(f, 0)(); + } + template R operator()(type, F const & f, A &, long) const + { + return unwrapper::unwrap(f, 0)(); + } + template void operator()(type, F & f, A &, int) + { + unwrapper::unwrap(f, 0)(); + } + template void operator()(type, F const & f, A &, int) const + { + unwrapper::unwrap(f, 0)(); + } + template void accept(V &) const + { + } + bool operator==(list0 const &) const + { + return true; + } +}; +template< class A1 > class list1: private storage1< A1 > +{ +private: + typedef storage1< A1 > base_type; +public: + explicit list1( A1 a1 ): base_type( a1 ) {} + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + template T & operator[] ( _bi::value & v ) const { return v.get(); } + template T const & operator[] ( _bi::value const & v ) const { return v.get(); } + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_]); + } + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_]); + } + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_]); + } + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_]); + } + template void accept(V & v) const + { + base_type::accept(v); + } + bool operator==(list1 const & rhs) const + { + return ref_compare(base_type::a1_, rhs.a1_, 0); + } +}; +struct logical_and; +struct logical_or; +template< class A1, class A2 > class list2: private storage2< A1, A2 > +{ +private: + typedef storage2< A1, A2 > base_type; +public: + list2( A1 a1, A2 a2 ): base_type( a1, a2 ) {} + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + template T & operator[] (_bi::value & v) const { return v.get(); } + template T const & operator[] (_bi::value const & v) const { return v.get(); } + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); + } + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); + } + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); + } + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); + } + template bool operator()( type, logical_and & , A & a, int ) + { + return a[ base_type::a1_ ] && a[ base_type::a2_ ]; + } + template bool operator()( type, logical_and const & , A & a, int ) const + { + return a[ base_type::a1_ ] && a[ base_type::a2_ ]; + } + template bool operator()( type, logical_or & , A & a, int ) + { + return a[ base_type::a1_ ] || a[ base_type::a2_ ]; + } + template bool operator()( type, logical_or const & , A & a, int ) const + { + return a[ base_type::a1_ ] || a[ base_type::a2_ ]; + } + template void accept(V & v) const + { + base_type::accept(v); + } + bool operator==(list2 const & rhs) const + { + return ref_compare(base_type::a1_, rhs.a1_, 0) && ref_compare(base_type::a2_, rhs.a2_, 0); + } +}; +template< class A1, class A2, class A3 > class list3: private storage3< A1, A2, A3 > +{ +private: + typedef storage3< A1, A2, A3 > base_type; +public: + list3( A1 a1, A2 a2, A3 a3 ): base_type( a1, a2, a3 ) {} + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + template T & operator[] (_bi::value & v) const { return v.get(); } + template T const & operator[] (_bi::value const & v) const { return v.get(); } + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); + } + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); + } + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); + } + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); + } + template void accept(V & v) const + { + base_type::accept(v); + } + bool operator==(list3 const & rhs) const + { + return + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ); + } +}; +template< class A1, class A2, class A3, class A4 > class list4: private storage4< A1, A2, A3, A4 > +{ +private: + typedef storage4< A1, A2, A3, A4 > base_type; +public: + list4( A1 a1, A2 a2, A3 a3, A4 a4 ): base_type( a1, a2, a3, a4 ) {} + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A4 operator[] (boost::arg<4>) const { return base_type::a4_; } + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } + template T & operator[] (_bi::value & v) const { return v.get(); } + template T const & operator[] (_bi::value const & v) const { return v.get(); } + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); + } + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); + } + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); + } + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); + } + template void accept(V & v) const + { + base_type::accept(v); + } + bool operator==(list4 const & rhs) const + { + return + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ) && + ref_compare( base_type::a4_, rhs.a4_, 0 ); + } +}; +template< class A1, class A2, class A3, class A4, class A5 > class list5: private storage5< A1, A2, A3, A4, A5 > +{ +private: + typedef storage5< A1, A2, A3, A4, A5 > base_type; +public: + list5( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5 ): base_type( a1, a2, a3, a4, a5 ) {} + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A4 operator[] (boost::arg<4>) const { return base_type::a4_; } + A5 operator[] (boost::arg<5>) const { return base_type::a5_; } + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } + A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } + template T & operator[] (_bi::value & v) const { return v.get(); } + template T const & operator[] (_bi::value const & v) const { return v.get(); } + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); + } + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); + } + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); + } + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); + } + template void accept(V & v) const + { + base_type::accept(v); + } + bool operator==(list5 const & rhs) const + { + return + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ) && + ref_compare( base_type::a4_, rhs.a4_, 0 ) && + ref_compare( base_type::a5_, rhs.a5_, 0 ); + } +}; +template class list6: private storage6< A1, A2, A3, A4, A5, A6 > +{ +private: + typedef storage6< A1, A2, A3, A4, A5, A6 > base_type; +public: + list6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6 ): base_type( a1, a2, a3, a4, a5, a6 ) {} + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A4 operator[] (boost::arg<4>) const { return base_type::a4_; } + A5 operator[] (boost::arg<5>) const { return base_type::a5_; } + A6 operator[] (boost::arg<6>) const { return base_type::a6_; } + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } + A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } + A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } + template T & operator[] (_bi::value & v) const { return v.get(); } + template T const & operator[] (_bi::value const & v) const { return v.get(); } + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); + } + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); + } + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); + } + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); + } + template void accept(V & v) const + { + base_type::accept(v); + } + bool operator==(list6 const & rhs) const + { + return + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ) && + ref_compare( base_type::a4_, rhs.a4_, 0 ) && + ref_compare( base_type::a5_, rhs.a5_, 0 ) && + ref_compare( base_type::a6_, rhs.a6_, 0 ); + } +}; +template class list7: private storage7< A1, A2, A3, A4, A5, A6, A7 > +{ +private: + typedef storage7< A1, A2, A3, A4, A5, A6, A7 > base_type; +public: + list7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7 ): base_type( a1, a2, a3, a4, a5, a6, a7 ) {} + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A4 operator[] (boost::arg<4>) const { return base_type::a4_; } + A5 operator[] (boost::arg<5>) const { return base_type::a5_; } + A6 operator[] (boost::arg<6>) const { return base_type::a6_; } + A7 operator[] (boost::arg<7>) const { return base_type::a7_; } + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } + A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } + A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } + A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } + template T & operator[] (_bi::value & v) const { return v.get(); } + template T const & operator[] (_bi::value const & v) const { return v.get(); } + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); + } + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); + } + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); + } + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); + } + template void accept(V & v) const + { + base_type::accept(v); + } + bool operator==(list7 const & rhs) const + { + return + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ) && + ref_compare( base_type::a4_, rhs.a4_, 0 ) && + ref_compare( base_type::a5_, rhs.a5_, 0 ) && + ref_compare( base_type::a6_, rhs.a6_, 0 ) && + ref_compare( base_type::a7_, rhs.a7_, 0 ); + } +}; +template< class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > class list8: private storage8< A1, A2, A3, A4, A5, A6, A7, A8 > +{ +private: + typedef storage8< A1, A2, A3, A4, A5, A6, A7, A8 > base_type; +public: + list8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8 ): base_type( a1, a2, a3, a4, a5, a6, a7, a8 ) {} + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A4 operator[] (boost::arg<4>) const { return base_type::a4_; } + A5 operator[] (boost::arg<5>) const { return base_type::a5_; } + A6 operator[] (boost::arg<6>) const { return base_type::a6_; } + A7 operator[] (boost::arg<7>) const { return base_type::a7_; } + A8 operator[] (boost::arg<8>) const { return base_type::a8_; } + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } + A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } + A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } + A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } + A8 operator[] (boost::arg<8> (*) ()) const { return base_type::a8_; } + template T & operator[] (_bi::value & v) const { return v.get(); } + template T const & operator[] (_bi::value const & v) const { return v.get(); } + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); + } + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); + } + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); + } + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); + } + template void accept(V & v) const + { + base_type::accept(v); + } + bool operator==(list8 const & rhs) const + { + return + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ) && + ref_compare( base_type::a4_, rhs.a4_, 0 ) && + ref_compare( base_type::a5_, rhs.a5_, 0 ) && + ref_compare( base_type::a6_, rhs.a6_, 0 ) && + ref_compare( base_type::a7_, rhs.a7_, 0 ) && + ref_compare( base_type::a8_, rhs.a8_, 0 ); + } +}; +template class list9: private storage9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > +{ +private: + typedef storage9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > base_type; +public: + list9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9 ): base_type( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) {} + A1 operator[] (boost::arg<1>) const { return base_type::a1_; } + A2 operator[] (boost::arg<2>) const { return base_type::a2_; } + A3 operator[] (boost::arg<3>) const { return base_type::a3_; } + A4 operator[] (boost::arg<4>) const { return base_type::a4_; } + A5 operator[] (boost::arg<5>) const { return base_type::a5_; } + A6 operator[] (boost::arg<6>) const { return base_type::a6_; } + A7 operator[] (boost::arg<7>) const { return base_type::a7_; } + A8 operator[] (boost::arg<8>) const { return base_type::a8_; } + A9 operator[] (boost::arg<9>) const { return base_type::a9_; } + A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } + A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } + A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } + A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } + A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } + A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } + A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } + A8 operator[] (boost::arg<8> (*) ()) const { return base_type::a8_; } + A9 operator[] (boost::arg<9> (*) ()) const { return base_type::a9_; } + template T & operator[] (_bi::value & v) const { return v.get(); } + template T const & operator[] (_bi::value const & v) const { return v.get(); } + template T & operator[] (reference_wrapper const & v) const { return v.get(); } + template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + template R operator()(type, F & f, A & a, long) + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); + } + template R operator()(type, F const & f, A & a, long) const + { + return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); + } + template void operator()(type, F & f, A & a, int) + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); + } + template void operator()(type, F const & f, A & a, int) const + { + unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); + } + template void accept(V & v) const + { + base_type::accept(v); + } + bool operator==(list9 const & rhs) const + { + return + ref_compare( base_type::a1_, rhs.a1_, 0 ) && + ref_compare( base_type::a2_, rhs.a2_, 0 ) && + ref_compare( base_type::a3_, rhs.a3_, 0 ) && + ref_compare( base_type::a4_, rhs.a4_, 0 ) && + ref_compare( base_type::a5_, rhs.a5_, 0 ) && + ref_compare( base_type::a6_, rhs.a6_, 0 ) && + ref_compare( base_type::a7_, rhs.a7_, 0 ) && + ref_compare( base_type::a8_, rhs.a8_, 0 ) && + ref_compare( base_type::a9_, rhs.a9_, 0 ); + } +}; +template class bind_t +{ +public: + typedef bind_t this_type; + bind_t(F f, L const & l): f_(f), l_(l) {} + typedef typename result_traits::type result_type; + result_type operator()() + { + list0 a; + return l_(type(), f_, a, 0); + } + result_type operator()() const + { + list0 a; + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 & a1) + { + list1 a(a1); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 & a1) const + { + list1 a(a1); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 const & a1) + { + list1 a(a1); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 const & a1) const + { + list1 a(a1); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 & a1, A2 & a2) + { + list2 a(a1, a2); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 & a1, A2 & a2) const + { + list2 a(a1, a2); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 const & a1, A2 & a2) + { + list2 a(a1, a2); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 const & a1, A2 & a2) const + { + list2 a(a1, a2); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 & a1, A2 const & a2) + { + list2 a(a1, a2); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 & a1, A2 const & a2) const + { + list2 a(a1, a2); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 const & a1, A2 const & a2) + { + list2 a(a1, a2); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 const & a1, A2 const & a2) const + { + list2 a(a1, a2); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3) + { + list3 a(a1, a2, a3); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3) const + { + list3 a(a1, a2, a3); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) + { + list3 a(a1, a2, a3); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) const + { + list3 a(a1, a2, a3); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) + { + list4 a(a1, a2, a3, a4); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) const + { + list4 a(a1, a2, a3, a4); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) + { + list4 a(a1, a2, a3, a4); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) const + { + list4 a(a1, a2, a3, a4); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) + { + list5 a(a1, a2, a3, a4, a5); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) const + { + list5 a(a1, a2, a3, a4, a5); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) + { + list5 a(a1, a2, a3, a4, a5); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) const + { + list5 a(a1, a2, a3, a4, a5); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) + { + list6 a(a1, a2, a3, a4, a5, a6); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) const + { + list6 a(a1, a2, a3, a4, a5, a6); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) + { + list6 a(a1, a2, a3, a4, a5, a6); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) const + { + list6 a(a1, a2, a3, a4, a5, a6); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) + { + list7 a(a1, a2, a3, a4, a5, a6, a7); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) const + { + list7 a(a1, a2, a3, a4, a5, a6, a7); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) + { + list7 a(a1, a2, a3, a4, a5, a6, a7); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) const + { + list7 a(a1, a2, a3, a4, a5, a6, a7); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) + { + list8 a(a1, a2, a3, a4, a5, a6, a7, a8); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) const + { + list8 a(a1, a2, a3, a4, a5, a6, a7, a8); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) + { + list8 a(a1, a2, a3, a4, a5, a6, a7, a8); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) const + { + list8 a(a1, a2, a3, a4, a5, a6, a7, a8); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) + { + list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) const + { + list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) + { + list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); + return l_(type(), f_, a, 0); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) const + { + list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); + return l_(type(), f_, a, 0); + } + template result_type eval(A & a) + { + return l_(type(), f_, a, 0); + } + template result_type eval(A & a) const + { + return l_(type(), f_, a, 0); + } + template void accept(V & v) const + { + using boost::visit_each; + visit_each(v, f_, 0); + l_.accept(v); + } + bool compare(this_type const & rhs) const + { + return ref_compare(f_, rhs.f_, 0) && l_ == rhs.l_; + } +private: + F f_; + L l_; +}; +template bool function_equal( bind_t const & a, bind_t const & b ) +{ + return a.compare(b); +} +template< class T, int I > struct add_value_2 +{ + typedef boost::arg type; +}; +template< class T > struct add_value_2< T, 0 > +{ + typedef _bi::value< T > type; +}; +template struct add_value +{ + typedef typename add_value_2< T, boost::is_placeholder< T >::value >::type type; +}; +template struct add_value< value > +{ + typedef _bi::value type; +}; +template struct add_value< reference_wrapper > +{ + typedef reference_wrapper type; +}; +template struct add_value< arg > +{ + typedef boost::arg type; +}; +template struct add_value< arg (*) () > +{ + typedef boost::arg (*type) (); +}; +template struct add_value< bind_t > +{ + typedef bind_t type; +}; +template struct list_av_1 +{ + typedef typename add_value::type B1; + typedef list1 type; +}; +template struct list_av_2 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef list2 type; +}; +template struct list_av_3 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef list3 type; +}; +template struct list_av_4 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef typename add_value::type B4; + typedef list4 type; +}; +template struct list_av_5 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef typename add_value::type B4; + typedef typename add_value::type B5; + typedef list5 type; +}; +template struct list_av_6 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef typename add_value::type B4; + typedef typename add_value::type B5; + typedef typename add_value::type B6; + typedef list6 type; +}; +template struct list_av_7 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef typename add_value::type B4; + typedef typename add_value::type B5; + typedef typename add_value::type B6; + typedef typename add_value::type B7; + typedef list7 type; +}; +template struct list_av_8 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef typename add_value::type B4; + typedef typename add_value::type B5; + typedef typename add_value::type B6; + typedef typename add_value::type B7; + typedef typename add_value::type B8; + typedef list8 type; +}; +template struct list_av_9 +{ + typedef typename add_value::type B1; + typedef typename add_value::type B2; + typedef typename add_value::type B3; + typedef typename add_value::type B4; + typedef typename add_value::type B5; + typedef typename add_value::type B6; + typedef typename add_value::type B7; + typedef typename add_value::type B8; + typedef typename add_value::type B9; + typedef list9 type; +}; +struct logical_not +{ + template bool operator()(V const & v) const { return !v; } +}; +template + bind_t< bool, logical_not, list1< bind_t > > + operator! (bind_t const & f) +{ + typedef list1< bind_t > list_type; + return bind_t ( logical_not(), list_type(f) ); +} +struct equal { template bool operator()(V const & v, W const & w) const { return v == w; } }; template bind_t< bool, equal, list2< bind_t, typename add_value::type > > operator == (bind_t const & f, A2 a2) { typedef typename add_value::type B2; typedef list2< bind_t, B2> list_type; return bind_t ( equal(), list_type(f, a2) ); } +struct not_equal { template bool operator()(V const & v, W const & w) const { return v != w; } }; template bind_t< bool, not_equal, list2< bind_t, typename add_value::type > > operator != (bind_t const & f, A2 a2) { typedef typename add_value::type B2; typedef list2< bind_t, B2> list_type; return bind_t ( not_equal(), list_type(f, a2) ); } +struct less { template bool operator()(V const & v, W const & w) const { return v < w; } }; template bind_t< bool, less, list2< bind_t, typename add_value::type > > operator < (bind_t const & f, A2 a2) { typedef typename add_value::type B2; typedef list2< bind_t, B2> list_type; return bind_t ( less(), list_type(f, a2) ); } +struct less_equal { template bool operator()(V const & v, W const & w) const { return v <= w; } }; template bind_t< bool, less_equal, list2< bind_t, typename add_value::type > > operator <= (bind_t const & f, A2 a2) { typedef typename add_value::type B2; typedef list2< bind_t, B2> list_type; return bind_t ( less_equal(), list_type(f, a2) ); } +struct greater { template bool operator()(V const & v, W const & w) const { return v > w; } }; template bind_t< bool, greater, list2< bind_t, typename add_value::type > > operator > (bind_t const & f, A2 a2) { typedef typename add_value::type B2; typedef list2< bind_t, B2> list_type; return bind_t ( greater(), list_type(f, a2) ); } +struct greater_equal { template bool operator()(V const & v, W const & w) const { return v >= w; } }; template bind_t< bool, greater_equal, list2< bind_t, typename add_value::type > > operator >= (bind_t const & f, A2 a2) { typedef typename add_value::type B2; typedef list2< bind_t, B2> list_type; return bind_t ( greater_equal(), list_type(f, a2) ); } +struct logical_and { template bool operator()(V const & v, W const & w) const { return v && w; } }; template bind_t< bool, logical_and, list2< bind_t, typename add_value::type > > operator && (bind_t const & f, A2 a2) { typedef typename add_value::type B2; typedef list2< bind_t, B2> list_type; return bind_t ( logical_and(), list_type(f, a2) ); } +struct logical_or { template bool operator()(V const & v, W const & w) const { return v || w; } }; template bind_t< bool, logical_or, list2< bind_t, typename add_value::type > > operator || (bind_t const & f, A2 a2) { typedef typename add_value::type B2; typedef list2< bind_t, B2> list_type; return bind_t ( logical_or(), list_type(f, a2) ); } +template void visit_each( V & v, value const & t, int ) +{ + using boost::visit_each; + visit_each( v, t.get(), 0 ); +} +template void visit_each( V & v, bind_t const & t, int ) +{ + t.accept( v ); +} +} +template< class T > struct is_bind_expression +{ + enum _vt { value = 0 }; +}; +template< class R, class F, class L > struct is_bind_expression< _bi::bind_t< R, F, L > > +{ + enum _vt { value = 1 }; +}; +template + _bi::bind_t + bind(F f) +{ + typedef _bi::list0 list_type; + return _bi::bind_t (f, list_type()); +} +template + _bi::bind_t::type> + bind(F f, A1 a1) +{ + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t (f, list_type(a1)); +} +template + _bi::bind_t::type> + bind(F f, A1 a1, A2 a2) +{ + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t (f, list_type(a1, a2)); +} +template + _bi::bind_t::type> + bind(F f, A1 a1, A2 a2, A3 a3) +{ + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3)); +} +template + _bi::bind_t::type> + bind(F f, A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4)); +} +template + _bi::bind_t::type> + bind(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); +} +template + _bi::bind_t::type> + bind(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); +} +template + _bi::bind_t::type> + bind(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); +} +template + _bi::bind_t::type> + bind(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} +template + _bi::bind_t::type> + bind(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} +template + _bi::bind_t + bind(boost::type, F f) +{ + typedef _bi::list0 list_type; + return _bi::bind_t (f, list_type()); +} +template + _bi::bind_t::type> + bind(boost::type, F f, A1 a1) +{ + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t (f, list_type(a1)); +} +template + _bi::bind_t::type> + bind(boost::type, F f, A1 a1, A2 a2) +{ + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t (f, list_type(a1, a2)); +} +template + _bi::bind_t::type> + bind(boost::type, F f, A1 a1, A2 a2, A3 a3) +{ + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3)); +} +template + _bi::bind_t::type> + bind(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4)); +} +template + _bi::bind_t::type> + bind(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); +} +template + _bi::bind_t::type> + bind(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); +} +template + _bi::bind_t::type> + bind(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); +} +template + _bi::bind_t::type> + bind(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} +template + _bi::bind_t::type> + bind(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} +template + _bi::bind_t<_bi::unspecified, F, _bi::list0> + bind(F f) +{ + typedef _bi::list0 list_type; + return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type()); +} +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_1::type> + bind(F f, A1 a1) +{ + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1)); +} +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_2::type> + bind(F f, A1 a1, A2 a2) +{ + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1, a2)); +} +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_3::type> + bind(F f, A1 a1, A2 a2, A3 a3) +{ + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3)); +} +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_4::type> + bind(F f, A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4)); +} +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_5::type> + bind(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5)); +} +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_6::type> + bind(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6)); +} +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_7::type> + bind(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7)); +} +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_8::type> + bind(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} +template + _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_9::type> + bind(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} +template + _bi::bind_t + bind( R ( *f) ()) +{ + typedef R ( *F) (); + typedef _bi::list0 list_type; + return _bi::bind_t (f, list_type()); +} +template + _bi::bind_t::type> + bind( R ( *f) (B1), A1 a1) +{ + typedef R ( *F) (B1); + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t (f, list_type(a1)); +} +template + _bi::bind_t::type> + bind( R ( *f) (B1, B2), A1 a1, A2 a2) +{ + typedef R ( *F) (B1, B2); + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t (f, list_type(a1, a2)); +} +template + _bi::bind_t::type> + bind( R ( *f) (B1, B2, B3), A1 a1, A2 a2, A3 a3) +{ + typedef R ( *F) (B1, B2, B3); + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3)); +} +template + _bi::bind_t::type> + bind( R ( *f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef R ( *F) (B1, B2, B3, B4); + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4)); +} +template + _bi::bind_t::type> + bind( R ( *f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef R ( *F) (B1, B2, B3, B4, B5); + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); +} +template + _bi::bind_t::type> + bind( R ( *f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef R ( *F) (B1, B2, B3, B4, B5, B6); + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); +} +template + _bi::bind_t::type> + bind( R ( *f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef R ( *F) (B1, B2, B3, B4, B5, B6, B7); + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); +} +template + _bi::bind_t::type> + bind( R ( *f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef R ( *F) (B1, B2, B3, B4, B5, B6, B7, B8); + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} +template + _bi::bind_t::type> + bind( R ( *f) (B1, B2, B3, B4, B5, B6, B7, B8, B9), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef R ( *F) (B1, B2, B3, B4, B5, B6, B7, B8, B9); + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} +template + _bi::bind_t, typename _bi::list_av_1::type> + bind(R ( T::*f) (), A1 a1) +{ + typedef _mfi::mf0 F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t(F(f), list_type(a1)); +} +template + _bi::bind_t, typename _bi::list_av_1::type> + bind(R ( T::*f) () const, A1 a1) +{ + typedef _mfi::cmf0 F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t(F(f), list_type(a1)); +} +template + _bi::bind_t, typename _bi::list_av_2::type> + bind(R ( T::*f) (B1), A1 a1, A2 a2) +{ + typedef _mfi::mf1 F; + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2)); +} +template + _bi::bind_t, typename _bi::list_av_2::type> + bind(R ( T::*f) (B1) const, A1 a1, A2 a2) +{ + typedef _mfi::cmf1 F; + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2)); +} +template + _bi::bind_t, typename _bi::list_av_3::type> + bind(R ( T::*f) (B1, B2), A1 a1, A2 a2, A3 a3) +{ + typedef _mfi::mf2 F; + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3)); +} +template + _bi::bind_t, typename _bi::list_av_3::type> + bind(R ( T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3) +{ + typedef _mfi::cmf2 F; + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3)); +} +template + _bi::bind_t, typename _bi::list_av_4::type> + bind(R ( T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef _mfi::mf3 F; + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); +} +template + _bi::bind_t, typename _bi::list_av_4::type> + bind(R ( T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef _mfi::cmf3 F; + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); +} +template + _bi::bind_t, typename _bi::list_av_5::type> + bind(R ( T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef _mfi::mf4 F; + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); +} +template + _bi::bind_t, typename _bi::list_av_5::type> + bind(R ( T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef _mfi::cmf4 F; + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); +} +template + _bi::bind_t, typename _bi::list_av_6::type> + bind(R ( T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef _mfi::mf5 F; + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); +} +template + _bi::bind_t, typename _bi::list_av_6::type> + bind(R ( T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef _mfi::cmf5 F; + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); +} +template + _bi::bind_t, typename _bi::list_av_7::type> + bind(R ( T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef _mfi::mf6 F; + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); +} +template + _bi::bind_t, typename _bi::list_av_7::type> + bind(R ( T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef _mfi::cmf6 F; + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); +} +template + _bi::bind_t, typename _bi::list_av_8::type> + bind(R ( T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef _mfi::mf7 F; + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} +template + _bi::bind_t, typename _bi::list_av_8::type> + bind(R ( T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef _mfi::cmf7 F; + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} +template + _bi::bind_t, typename _bi::list_av_9::type> + bind(R ( T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef _mfi::mf8 F; + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} +template + _bi::bind_t, typename _bi::list_av_9::type> + bind(R ( T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef _mfi::cmf8 F; + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} +template + _bi::bind_t, typename _bi::list_av_1::type> + bind(boost::type, R ( T::*f) (), A1 a1) +{ + typedef _mfi::mf0 F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t(F(f), list_type(a1)); +} +template + _bi::bind_t, typename _bi::list_av_1::type> + bind(boost::type, R ( T::*f) () const, A1 a1) +{ + typedef _mfi::cmf0 F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t(F(f), list_type(a1)); +} +template + _bi::bind_t, typename _bi::list_av_2::type> + bind(boost::type, R ( T::*f) (B1), A1 a1, A2 a2) +{ + typedef _mfi::mf1 F; + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2)); +} +template + _bi::bind_t, typename _bi::list_av_2::type> + bind(boost::type, R ( T::*f) (B1) const, A1 a1, A2 a2) +{ + typedef _mfi::cmf1 F; + typedef typename _bi::list_av_2::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2)); +} +template + _bi::bind_t, typename _bi::list_av_3::type> + bind(boost::type, R ( T::*f) (B1, B2), A1 a1, A2 a2, A3 a3) +{ + typedef _mfi::mf2 F; + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3)); +} +template + _bi::bind_t, typename _bi::list_av_3::type> + bind(boost::type, R ( T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3) +{ + typedef _mfi::cmf2 F; + typedef typename _bi::list_av_3::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3)); +} +template + _bi::bind_t, typename _bi::list_av_4::type> + bind(boost::type, R ( T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef _mfi::mf3 F; + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); +} +template + _bi::bind_t, typename _bi::list_av_4::type> + bind(boost::type, R ( T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4) +{ + typedef _mfi::cmf3 F; + typedef typename _bi::list_av_4::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); +} +template + _bi::bind_t, typename _bi::list_av_5::type> + bind(boost::type, R ( T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef _mfi::mf4 F; + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); +} +template + _bi::bind_t, typename _bi::list_av_5::type> + bind(boost::type, R ( T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) +{ + typedef _mfi::cmf4 F; + typedef typename _bi::list_av_5::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); +} +template + _bi::bind_t, typename _bi::list_av_6::type> + bind(boost::type, R ( T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef _mfi::mf5 F; + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); +} +template + _bi::bind_t, typename _bi::list_av_6::type> + bind(boost::type, R ( T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) +{ + typedef _mfi::cmf5 F; + typedef typename _bi::list_av_6::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); +} +template + _bi::bind_t, typename _bi::list_av_7::type> + bind(boost::type, R ( T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef _mfi::mf6 F; + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); +} +template + _bi::bind_t, typename _bi::list_av_7::type> + bind(boost::type, R ( T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) +{ + typedef _mfi::cmf6 F; + typedef typename _bi::list_av_7::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); +} +template + _bi::bind_t, typename _bi::list_av_8::type> + bind(boost::type, R ( T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef _mfi::mf7 F; + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} +template + _bi::bind_t, typename _bi::list_av_8::type> + bind(boost::type, R ( T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) +{ + typedef _mfi::cmf7 F; + typedef typename _bi::list_av_8::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); +} +template + _bi::bind_t, typename _bi::list_av_9::type> + bind(boost::type, R ( T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef _mfi::mf8 F; + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} +template + _bi::bind_t, typename _bi::list_av_9::type> + bind(boost::type, R ( T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) +{ + typedef _mfi::cmf8 F; + typedef typename _bi::list_av_9::type list_type; + return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); +} +namespace _bi +{ +template< class Pm, int I > struct add_cref; +template< class M, class T > struct add_cref< M T::*, 0 > +{ + typedef M type; +}; +template< class M, class T > struct add_cref< M T::*, 1 > +{ + typedef M const & type; +}; +template< class R, class T > struct add_cref< R (T::*) (), 1 > +{ + typedef void type; +}; +template< class R, class T > struct add_cref< R (T::*) () const, 1 > +{ + typedef void type; +}; +template struct isref +{ + enum value_type { value = 0 }; +}; +template struct isref< R& > +{ + enum value_type { value = 1 }; +}; +template struct isref< R* > +{ + enum value_type { value = 1 }; +}; +template struct dm_result +{ + typedef typename add_cref< Pm, 1 >::type type; +}; +template struct dm_result< Pm, bind_t > +{ + typedef typename bind_t::result_type result_type; + typedef typename add_cref< Pm, isref< result_type >::value >::type type; +}; +} +template< class A1, class M, class T > +_bi::bind_t< + typename _bi::dm_result< M T::*, A1 >::type, + _mfi::dm, + typename _bi::list_av_1::type +> +bind( M T::*f, A1 a1 ) +{ + typedef typename _bi::dm_result< M T::*, A1 >::type result_type; + typedef _mfi::dm F; + typedef typename _bi::list_av_1::type list_type; + return _bi::bind_t< result_type, F, list_type >( F( f ), list_type( a1 ) ); +} +} +namespace +{ +boost::arg<1> _1; +boost::arg<2> _2; +boost::arg<3> _3; +boost::arg<4> _4; +boost::arg<5> _5; +boost::arg<6> _6; +boost::arg<7> _7; +boost::arg<8> _8; +boost::arg<9> _9; +} +namespace boost { namespace python { namespace detail { +struct exception_handler; +typedef function2 const&> handler_function; +struct exception_handler +{ + private: + public: + explicit exception_handler(handler_function const& impl); + inline bool handle(function0 const& f) const; + bool operator()(function0 const& f) const; + static exception_handler* chain; + private: + static exception_handler* tail; + handler_function m_impl; + exception_handler* m_next; +}; +inline bool exception_handler::handle(function0 const& f) const +{ + return this->m_impl(*this, f); +} + void register_exception_handler(handler_function const& f); +}}} +namespace boost { namespace python { namespace detail { +template +struct translate_exception +{ + typedef typename add_reference< + typename add_const::type + >::type exception_cref; + inline bool operator()( + exception_handler const& handler + , function0 const& f + , typename call_traits::param_type translate) const + { + try + { + return handler(f); + } + catch(exception_cref e) + { + translate(e); + return true; + } + } +}; +}}} +namespace boost { namespace python { +template +void register_exception_translator(Translate translate, boost::type* = 0) +{ + detail::register_exception_handler( + bind(detail::translate_exception(), _1, _2, translate) + ); +} +}} +namespace boost { namespace python { +class str; +namespace detail +{ + struct str_base : object + { + str capitalize() const; + str center(object_cref width) const; + long count(object_cref sub) const; + long count(object_cref sub, object_cref start) const; + long count(object_cref sub, object_cref start, object_cref end) const; + object decode() const; + object decode(object_cref encoding) const; + object decode(object_cref encoding, object_cref errors) const; + object encode() const; + object encode(object_cref encoding) const; + object encode(object_cref encoding, object_cref errors) const; + bool endswith(object_cref suffix) const; + bool endswith(object_cref suffix, object_cref start) const; + bool endswith(object_cref suffix, object_cref start, object_cref end) const; + str expandtabs() const; + str expandtabs(object_cref tabsize) const; + long find(object_cref sub) const; + long find(object_cref sub, object_cref start) const; + long find(object_cref sub, object_cref start, object_cref end) const; + long index(object_cref sub) const; + long index(object_cref sub, object_cref start) const; + long index(object_cref sub, object_cref start, object_cref end) const; + bool isalnum() const; + bool isalpha() const; + bool isdigit() const; + bool islower() const; + bool isspace() const; + bool istitle() const; + bool isupper() const; + str join(object_cref sequence) const; + str ljust(object_cref width) const; + str lower() const; + str lstrip() const; + str replace(object_cref old, object_cref new_) const; + str replace(object_cref old, object_cref new_, object_cref maxsplit) const; + long rfind(object_cref sub) const; + long rfind(object_cref sub, object_cref start) const; + long rfind(object_cref sub, object_cref start, object_cref end) const; + long rindex(object_cref sub) const; + long rindex(object_cref sub, object_cref start) const; + long rindex(object_cref sub, object_cref start, object_cref end) const; + str rjust(object_cref width) const; + str rstrip() const; + list split() const; + list split(object_cref sep) const; + list split(object_cref sep, object_cref maxsplit) const; + list splitlines() const; + list splitlines(object_cref keepends) const; + bool startswith(object_cref prefix) const; + bool startswith(object_cref prefix, object_cref start) const; + bool startswith(object_cref prefix, object_cref start, object_cref end) const; + str strip() const; + str swapcase() const; + str title() const; + str translate(object_cref table) const; + str translate(object_cref table, object_cref deletechars) const; + str upper() const; + protected: + str_base(); + str_base(const char* s); + str_base(char const* start, char const* finish); + str_base(char const* start, std::size_t length); + explicit str_base(object_cref other); + inline explicit str_base(python::detail::borrowed_reference p) : object(p) {} inline explicit str_base(python::detail::new_reference p) : object(p) {} inline explicit str_base(python::detail::new_non_null_reference p) : object(p) {} + private: + static new_reference call(object const&); + }; +} +class str : public detail::str_base +{ + typedef detail::str_base base; + public: + str() {} + str(const char* s) : base(s) {} + str(char const* start, char const* finish) + : base(start, finish) + {} + str(char const* start, std::size_t length) + : base(start, length) + {} + template + explicit str(T const& other) + : base(object(other)) + { + } + template + str center(T const& width) const + { + return base::center(object(width)); + } + template + long count(T const& sub) const + { + return base::count(object(sub)); + } + template + long count(T1 const& sub,T2 const& start) const + { + return base::count(object(sub), object(start)); + } + template + long count(T1 const& sub,T2 const& start, T3 const& end) const + { + return base::count(object(sub), object(start)); + } + object decode() const { return base::decode(); } + template + object decode(T const& encoding) const + { + return base::decode(object(encoding)); + } + template + object decode(T1 const& encoding, T2 const& errors) const + { + return base::decode(object(encoding),object(errors)); + } + object encode() const { return base::encode(); } + template + object encode(T const& encoding) const + { + return base::encode(object(encoding)); + } + template + object encode(T1 const& encoding, T2 const& errors) const + { + return base::encode(object(encoding),object(errors)); + } + template + bool endswith(T const& suffix) const + { + return base::endswith(object(suffix)); + } + template + bool endswith(T1 const& suffix, T2 const& start) const + { + return base::endswith(object(suffix), object(start)); + } + template + bool endswith(T1 const& suffix, T2 const& start, T3 const& end) const + { + return base::endswith(object(suffix), object(start), object(end)); + } + str expandtabs() const { return base::expandtabs(); } + template + str expandtabs(T const& tabsize) const + { + return base::expandtabs(object(tabsize)); + } + template + long find(T const& sub) const + { + return base::find(object(sub)); + } + template + long find(T1 const& sub, T2 const& start) const + { + return base::find(object(sub), object(start)); + } + template + long find(T1 const& sub, T2 const& start, T3 const& end) const + { + return base::find(object(sub), object(start), object(end)); + } + template + long index(T const& sub) const + { + return base::index(object(sub)); + } + template + long index(T1 const& sub, T2 const& start) const + { + return base::index(object(sub), object(start)); + } + template + long index(T1 const& sub, T2 const& start, T3 const& end) const + { + return base::index(object(sub), object(start), object(end)); + } + template + str join(T const& sequence) const + { + return base::join(object(sequence)); + } + template + str ljust(T const& width) const + { + return base::ljust(object(width)); + } + template + str replace(T1 const& old, T2 const& new_) const + { + return base::replace(object(old),object(new_)); + } + template + str replace(T1 const& old, T2 const& new_, T3 const& maxsplit) const + { + return base::replace(object(old),object(new_), object(maxsplit)); + } + template + long rfind(T const& sub) const + { + return base::rfind(object(sub)); + } + template + long rfind(T1 const& sub, T2 const& start) const + { + return base::rfind(object(sub), object(start)); + } + template + long rfind(T1 const& sub, T2 const& start, T3 const& end) const + { + return base::rfind(object(sub), object(start), object(end)); + } + template + long rindex(T const& sub) const + { + return base::rindex(object(sub)); + } + template + long rindex(T1 const& sub, T2 const& start) const + { + return base::rindex(object(sub), object(start)); + } + template + long rindex(T1 const& sub, T2 const& start, T3 const& end) const + { + return base::rindex(object(sub), object(start), object(end)); + } + template + str rjust(T const& width) const + { + return base::rjust(object(width)); + } + list split() const { return base::split(); } + template + list split(T const& sep) const + { + return base::split(object(sep)); + } + template + list split(T1 const& sep, T2 const& maxsplit) const + { + return base::split(object(sep), object(maxsplit)); + } + list splitlines() const { return base::splitlines(); } + template + list splitlines(T const& keepends) const + { + return base::splitlines(object(keepends)); + } + template + bool startswith(T const& prefix) const + { + return base::startswith(object(prefix)); + } + template + bool startswith(T1 const& prefix, T2 const& start) const + { + return base::startswith(object(prefix), object(start)); + } + template + bool startswith(T1 const& prefix, T2 const& start, T3 const& end) const + { + return base::startswith(object(prefix), object(start), object(end)); + } + template + str translate(T const& table) const + { + return base::translate(object(table)); + } + template + str translate(T1 const& table, T2 const& deletechars) const + { + return base::translate(object(table), object(deletechars)); + } + public: + inline explicit str(python::detail::borrowed_reference p) : base(p) {} inline explicit str(python::detail::new_reference p) : base(p) {} inline explicit str(python::detail::new_non_null_reference p) : base(p) {} +}; +namespace converter +{ + template <> + struct object_manager_traits + : pytype_object_manager_traits<&PyString_Type,str> + { + }; +} +}} +namespace boost +{ +namespace python +{ +object +eval(str string, object global = object(), object local = object()); +object +exec_statement(str string, object global = object(), object local = object()); +object +exec(str string, object global = object(), object local = object()); +object +exec_file(str filename, object global = object(), object local = object()); +} +} +namespace boost { namespace python { namespace converter { +template +struct implicit +{ + static void* convertible(PyObject* obj) + { + return implicit_rvalue_convertible_from_python(obj, registered::converters) + ? obj : 0; + } + static void construct(PyObject* obj, rvalue_from_python_stage1_data* data) + { + void* storage = ((rvalue_from_python_storage*)data)->storage.bytes; + arg_from_python get_source(obj); + bool convertible = get_source.convertible(); + ((void)(convertible)); + new (storage) Target(get_source()); + data->convertible = storage; + } +}; +}}} +namespace boost { namespace python { +template +void implicitly_convertible(boost::type* = 0, boost::type* = 0) +{ + typedef converter::implicit functions; + converter::registry::push_back( + &functions::convertible + , &functions::construct + , type_id() + , &converter::expected_from_python_type_direct::get_pytype + ); +} +}} +namespace boost +{ +namespace python +{ +object import(str name); +} +} +namespace boost { namespace python { namespace detail { +template +void(* target(R (*)()) )() +{ + return 0; +} +template +A0(* target(R (*)( A0)) )() +{ + return 0; +} +template +A0(* target(R (*)( A0 , A1)) )() +{ + return 0; +} +template +A0(* target(R (*)( A0 , A1 , A2)) )() +{ + return 0; +} +template +A0(* target(R (*)( A0 , A1 , A2 , A3)) )() +{ + return 0; +} +template +A0(* target(R (*)( A0 , A1 , A2 , A3 , A4)) )() +{ + return 0; +} +template +A0(* target(R (*)( A0 , A1 , A2 , A3 , A4 , A5)) )() +{ + return 0; +} +template +A0(* target(R (*)( A0 , A1 , A2 , A3 , A4 , A5 , A6)) )() +{ + return 0; +} +template +A0(* target(R (*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7)) )() +{ + return 0; +} +template +A0(* target(R (*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8)) )() +{ + return 0; +} +template +A0(* target(R (*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9)) )() +{ + return 0; +} +template +A0(* target(R (*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10)) )() +{ + return 0; +} +template +A0(* target(R (*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11)) )() +{ + return 0; +} +template +A0(* target(R (*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12)) )() +{ + return 0; +} +template +A0(* target(R (*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13)) )() +{ + return 0; +} +template +A0(* target(R (*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14)) )() +{ + return 0; +} +template +T& (* target(R (T::*)() ) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0) ) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1) ) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2) ) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3) ) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4) ) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5) ) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6) ) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7) ) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8) ) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9) ) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10) ) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11) ) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12) ) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13) ) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14) ) )() +{ + return 0; +} +template +T& (* target(R (T::*)() const) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0) const) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1) const) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2) const) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3) const) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4) const) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5) const) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6) const) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7) const) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8) const) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9) const) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10) const) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11) const) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12) const) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13) const) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14) const) )() +{ + return 0; +} +template +T& (* target(R (T::*)() volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0) volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1) volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2) volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3) volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4) volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5) volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6) volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7) volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8) volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9) volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10) volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11) volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12) volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13) volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14) volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)() const volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0) const volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1) const volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2) const volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3) const volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4) const volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5) const volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6) const volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7) const volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8) const volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9) const volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10) const volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11) const volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12) const volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13) const volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)( A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14) const volatile) )() +{ + return 0; +} +template +T& (* target(R (T::*)) )() { return 0; } +}}} +namespace boost { namespace python { namespace objects { + object const& identity_function(); + void stop_iteration_error(); +}}} +namespace boost { namespace python { namespace objects { + type_handle registered_class_object(type_info id); + type_handle class_metatype(); + type_handle class_type(); +}}} +namespace boost { namespace detail { +template +struct iterator_traits + : std::iterator_traits +{}; +using std::distance; +}} +namespace boost { namespace python { namespace objects { +typedef return_value_policy default_iterator_call_policies; +template +struct iterator_range +{ + iterator_range(object sequence, Iterator start, Iterator finish); + typedef boost::detail::iterator_traits traits_t; + struct next + { + typedef typename mpl::if_< + is_reference< + typename traits_t::reference + > + , typename traits_t::reference + , typename traits_t::value_type + >::type result_type; + result_type + operator()(iterator_range& self) + { + if (self.m_start == self.m_finish) + stop_iteration_error(); + return *self.m_start++; + } + }; + typedef next next_fn; + object m_sequence; + Iterator m_start; + Iterator m_finish; +}; +namespace detail +{ + template + object demand_iterator_class(char const* name, Iterator* = 0, NextPolicies const& policies = NextPolicies()) + { + typedef iterator_range range_; + handle<> class_obj( + objects::registered_class_object(python::type_id())); + if (class_obj.get() != 0) + return object(class_obj); + typedef typename range_::next_fn next_fn; + typedef typename next_fn::result_type result_type; + return class_(name, no_init) + .def("__iter__", identity_function()) + .def( + "next" + , make_function( + next_fn() + , policies + , mpl::vector2() + )); + } + template < + class Target + , class Iterator + , class Accessor1 + , class Accessor2 + , class NextPolicies + > + struct py_iter_ + { + py_iter_(Accessor1 const& get_start, Accessor2 const& get_finish) + : m_get_start(get_start) + , m_get_finish(get_finish) + {} + iterator_range + operator()(back_reference x) const + { + detail::demand_iterator_class("iterator", (Iterator*)0, NextPolicies()); + return iterator_range( + x.source() + , m_get_start(x.get()) + , m_get_finish(x.get()) + ); + } + private: + Accessor1 m_get_start; + Accessor2 m_get_finish; + }; + template + inline object make_iterator_function( + Accessor1 const& get_start + , Accessor2 const& get_finish + , NextPolicies const& + , Iterator const& (*)() + , boost::type* + , int + ) + { + return make_function( + py_iter_(get_start, get_finish) + , default_call_policies() + , mpl::vector2, back_reference >() + ); + } + template + inline object make_iterator_function( + Accessor1 const& get_start + , Accessor2 const& get_finish + , NextPolicies const& next_policies + , Iterator& (*)() + , boost::type* + , ...) + { + return make_iterator_function( + get_start + , get_finish + , next_policies + , (Iterator const&(*)())0 + , (boost::type*)0 + , 0 + ); + } +} +template +inline object make_iterator_function( + Accessor1 const& get_start + , Accessor2 const& get_finish + , NextPolicies const& next_policies + , boost::type* = 0 +) +{ + typedef typename Accessor1::result_type iterator; + typedef typename add_const::type iterator_const; + typedef typename add_reference::type iterator_cref; + return detail::make_iterator_function( + get_start + , get_finish + , next_policies + , (iterator_cref(*)())0 + , (boost::type*)0 + , 0 + ); +} +template +inline iterator_range::iterator_range( + object sequence, Iterator start, Iterator finish) + : m_sequence(sequence), m_start(start), m_finish(finish) +{ +} +}}} +namespace boost +{ +namespace _bi +{ +template class protected_bind_t +{ +public: + typedef typename F::result_type result_type; + explicit protected_bind_t(F f): f_(f) + { + } + result_type operator()() + { + return f_(); + } + result_type operator()() const + { + return f_(); + } + template result_type operator()(A1 & a1) + { + return f_(a1); + } + template result_type operator()(A1 & a1) const + { + return f_(a1); + } + template result_type operator()(const A1 & a1) + { + return f_(a1); + } + template result_type operator()(const A1 & a1) const + { + return f_(a1); + } + template result_type operator()(A1 & a1, A2 & a2) + { + return f_(a1, a2); + } + template result_type operator()(A1 & a1, A2 & a2) const + { + return f_(a1, a2); + } + template result_type operator()(A1 const & a1, A2 & a2) + { + return f_(a1, a2); + } + template result_type operator()(A1 const & a1, A2 & a2) const + { + return f_(a1, a2); + } + template result_type operator()(A1 & a1, A2 const & a2) + { + return f_(a1, a2); + } + template result_type operator()(A1 & a1, A2 const & a2) const + { + return f_(a1, a2); + } + template result_type operator()(A1 const & a1, A2 const & a2) + { + return f_(a1, a2); + } + template result_type operator()(A1 const & a1, A2 const & a2) const + { + return f_(a1, a2); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3) + { + return f_(a1, a2, a3); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3) const + { + return f_(a1, a2, a3); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) + { + return f_(a1, a2, a3); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) const + { + return f_(a1, a2, a3); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) + { + return f_(a1, a2, a3, a4); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) const + { + return f_(a1, a2, a3, a4); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) + { + return f_(a1, a2, a3, a4); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) const + { + return f_(a1, a2, a3, a4); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) + { + return f_(a1, a2, a3, a4, a5); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) const + { + return f_(a1, a2, a3, a4, a5); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) + { + return f_(a1, a2, a3, a4, a5); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) const + { + return f_(a1, a2, a3, a4, a5); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) + { + return f_(a1, a2, a3, a4, a5, a6); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) const + { + return f_(a1, a2, a3, a4, a5, a6); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) + { + return f_(a1, a2, a3, a4, a5, a6); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) const + { + return f_(a1, a2, a3, a4, a5, a6); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) + { + return f_(a1, a2, a3, a4, a5, a6, a7); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) const + { + return f_(a1, a2, a3, a4, a5, a6, a7); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) + { + return f_(a1, a2, a3, a4, a5, a6, a7); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) const + { + return f_(a1, a2, a3, a4, a5, a6, a7); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) + { + return f_(a1, a2, a3, a4, a5, a6, a7, a8); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) const + { + return f_(a1, a2, a3, a4, a5, a6, a7, a8); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) + { + return f_(a1, a2, a3, a4, a5, a6, a7, a8); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) const + { + return f_(a1, a2, a3, a4, a5, a6, a7, a8); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) + { + return f_(a1, a2, a3, a4, a5, a6, a7, a8, a9); + } + template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) const + { + return f_(a1, a2, a3, a4, a5, a6, a7, a8, a9); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) + { + return f_(a1, a2, a3, a4, a5, a6, a7, a8, a9); + } + template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) const + { + return f_(a1, a2, a3, a4, a5, a6, a7, a8, a9); + } +private: + F f_; +}; +} +template _bi::protected_bind_t protect(F f) +{ + return _bi::protected_bind_t(f); +} +} +namespace boost { namespace python { +namespace detail +{ + template + inline object make_iterator( + Accessor1 get_start + , Accessor2 get_finish + , NextPolicies next_policies + , Target&(*)() + ) + { + return objects::make_iterator_function( + boost::protect(boost::bind(get_start, _1)) + , boost::protect(boost::bind(get_finish, _1)) + , next_policies + ); + } + template + struct iterators_impl + { + template + struct apply + { + typedef typename T::iterator iterator; + static iterator begin(T& x) { return x.begin(); } + static iterator end(T& x) { return x.end(); } + }; + }; + template <> + struct iterators_impl + { + template + struct apply + { + typedef typename T::const_iterator iterator; + static iterator begin(T& x) { return x.begin(); } + static iterator end(T& x) { return x.end(); } + }; + }; +} +template +struct iterators + : detail::iterators_impl< + boost::is_const::value + >::template apply +{ +}; +template +object range(Accessor1 start, Accessor2 finish) +{ + return detail::make_iterator( + start, finish + , objects::default_iterator_call_policies() + , detail::target(start) + ); +} +template +object range(Accessor1 start, Accessor2 finish, NextPolicies* = 0) +{ + return detail::make_iterator(start, finish, NextPolicies(), detail::target(start)); +} +template +object range(Accessor1 start, Accessor2 finish, NextPolicies* = 0, boost::type* = 0) +{ + return detail::make_iterator(start, finish, NextPolicies(), (Target&(*)())0); +} +template +struct iterator : object +{ + iterator() + : object( + python::range( + &iterators::begin, &iterators::end + )) + { + } +}; +}} +namespace boost { namespace python { +namespace detail +{ + struct long_base : object + { + protected: + long_base(); + explicit long_base(object_cref rhs); + explicit long_base(object_cref rhs, object_cref base); + inline explicit long_base(python::detail::borrowed_reference p) : object(p) {} inline explicit long_base(python::detail::new_reference p) : object(p) {} inline explicit long_base(python::detail::new_non_null_reference p) : object(p) {} + private: + static detail::new_non_null_reference call(object const&); + static detail::new_non_null_reference call(object const&, object const&); + }; +} +class long_ : public detail::long_base +{ + typedef detail::long_base base; + public: + long_() {} + template + explicit long_(T const& rhs) + : detail::long_base(object(rhs)) + { + } + template + explicit long_(T const& rhs, U const& base) + : detail::long_base(object(rhs), object(base)) + { + } + public: + inline explicit long_(python::detail::borrowed_reference p) : base(p) {} inline explicit long_(python::detail::new_reference p) : base(p) {} inline explicit long_(python::detail::new_non_null_reference p) : base(p) {} +}; +namespace converter +{ + template <> + struct object_manager_traits + : pytype_object_manager_traits<&PyLong_Type,long_> + { + }; +} +}} +namespace boost { namespace python { +namespace detail +{ + template + inline type_info extractor_type_id(T&(*)(U)) + { + return type_id(); + } + template + struct normalized_extractor + { + static inline void* execute(PyObject* op) + { + typedef typename boost::add_reference::type param; + return &Extractor::execute( + boost::python::detail::void_ptr_to_reference( + op, (param(*)())0 ) + ); + } + }; + template + inline normalized_extractor + normalize(T(*)(U), Extractor* = 0) + { + return normalized_extractor(); + } +} +template +struct extract_member +{ + static MemberType& execute(InstanceType& c) + { + (void)(((PyObject*)(&c))->ob_type); + return c.*member; + } +}; +template +struct extract_identity +{ + static InstanceType& execute(InstanceType& c) + { + (void)(((PyObject*)(&c))->ob_type); + return c; + } +}; +template +struct lvalue_from_pytype +{ + lvalue_from_pytype() + { + converter::registry::insert + ( &extract + , detail::extractor_type_id(&Extractor::execute) + , &get_pytype + ); + } + private: + static void* extract(PyObject* op) + { + return ((((PyObject*)(op))->ob_type) == (const_cast(python_type)) || PyType_IsSubtype((((PyObject*)(op))->ob_type), (const_cast(python_type)))) + ? const_cast( + static_cast( + detail::normalize(&Extractor::execute).execute(op))) + : 0 + ; + } + static PyTypeObject const*get_pytype() { return python_type; } +}; +}} +namespace boost { namespace mpl { +struct has_push_front_arg {}; +template< typename Tag > +struct push_front_impl +{ + template< typename Sequence, typename T > struct apply + { + struct REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST; typedef struct + REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST45 + : boost::mpl::assert_ { static boost::mpl::failed ************ (REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST::************ assert_arg()) ( Sequence ) { return 0; } } + mpl_assert_arg45 + ; enum { mpl_assertion_in_line_45 = sizeof( boost::mpl::assertion_failed<(( boost::is_same< T, has_push_front_arg >::value ))>( mpl_assert_arg45::assert_arg() ) ) } + ; + }; +}; +template< typename Tag > +struct has_push_front_impl +{ + template< typename Seq > struct apply + : aux::has_type< push_front< Seq, has_push_front_arg > > + { + }; +}; + template<> struct push_front_impl {}; + template<> struct has_push_front_impl {}; +}} +namespace boost { namespace mpl { +template< + typename Sequence = na + , typename T = na + > +struct push_front + : push_front_impl< typename sequence_tag::type > + ::template apply< Sequence,T > +{ + +}; +template< + typename Sequence = na + > +struct has_push_front + : has_push_front_impl< typename sequence_tag::type > + ::template apply< Sequence > +{ + +}; +template<> struct push_front< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : push_front< T1 , T2 > { }; }; template< typename Tag > struct lambda< push_front< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef push_front< na , na > result_; typedef push_front< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< push_front< T1 , T2 > > : int_<2> { }; template<> struct template_arity< push_front< na , na > > : int_<-1> { }; } +template<> struct has_push_front< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : has_push_front< T1 > { }; }; template< typename Tag > struct lambda< has_push_front< na > , Tag , int_<-1> > { typedef false_ is_le; typedef has_push_front< na > result_; typedef has_push_front< na > type; }; namespace aux { template< typename T1 > struct template_arity< has_push_front< T1 > > : int_<1> { }; template<> struct template_arity< has_push_front< na > > : int_<-1> { }; } +}} +namespace boost { namespace mpl { +template< typename Tag > +struct pop_front_impl +{ + template< typename Sequence > struct apply + ; +}; + template<> struct pop_front_impl {}; +}} +namespace boost { namespace mpl { +template< + typename Sequence = na + > +struct pop_front + : pop_front_impl< typename sequence_tag::type > + ::template apply< Sequence > +{ + +}; +template<> struct pop_front< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : pop_front< T1 > { }; }; template< typename Tag > struct lambda< pop_front< na > , Tag , int_<-1> > { typedef false_ is_le; typedef pop_front< na > result_; typedef pop_front< na > type; }; namespace aux { template< typename T1 > struct template_arity< pop_front< T1 > > : int_<1> { }; template<> struct template_arity< pop_front< na > > : int_<-1> { }; } +}} +namespace boost { namespace python { +namespace detail +{ + template + struct install_holder : converter::context_result_converter + { + install_holder(PyObject* args_) + : m_self(PyTuple_GetItem(args_, 0)) {} + PyObject* operator()(T x) const + { + dispatch(x, is_pointer()); + return none(); + } + private: + template + void dispatch(U* x, mpl::true_) const + { + std::auto_ptr owner(x); + dispatch(owner, mpl::false_()); + } + template + void dispatch(Ptr x, mpl::false_) const + { + typedef typename pointee::type value_type; + typedef objects::pointer_holder holder; + typedef objects::instance instance_t; + void* memory = holder::allocate(this->m_self, __builtin_offsetof (instance_t, storage), sizeof(holder)); + try { + (new (memory) holder(x))->install(this->m_self); + } + catch(...) { + holder::deallocate(this->m_self, memory); + throw; + } + } + PyObject* m_self; + }; + struct constructor_result_converter + { + template + struct apply + { + typedef install_holder type; + }; + }; + template + struct offset_args + { + offset_args(BaseArgs base_) : base(base_) {} + BaseArgs base; + }; + template + inline PyObject* get(mpl::int_, offset_args const& args_) + { + return get(mpl::int_<(N+Offset::value)>(), args_.base); + } + template + inline unsigned arity(offset_args const& args_) + { + return arity(args_.base) - Offset::value; + } + template + struct constructor_policy : BasePolicy_ + { + constructor_policy(BasePolicy_ base) : BasePolicy_(base) {} + struct MAKE_CONSTRUCTOR_SUPPLIES_ITS_OWN_RESULT_CONVERTER_THAT_WOULD_OVERRIDE_YOURS; typedef struct + MAKE_CONSTRUCTOR_SUPPLIES_ITS_OWN_RESULT_CONVERTER_THAT_WOULD_OVERRIDE_YOURS122 + : boost::mpl::assert_ { static boost::mpl::failed ************ (MAKE_CONSTRUCTOR_SUPPLIES_ITS_OWN_RESULT_CONVERTER_THAT_WOULD_OVERRIDE_YOURS::************ assert_arg()) (typename BasePolicy_::result_converter) { return 0; } } + mpl_assert_arg122 + ; enum { mpl_assertion_in_line_122 = sizeof( boost::mpl::assertion_failed<((is_same< typename BasePolicy_::result_converter , default_result_converter >::value))>( mpl_assert_arg122::assert_arg() ) ) } + ; + typedef constructor_result_converter result_converter; + typedef offset_args > argument_package; + }; + template + struct outer_constructor_signature + { + typedef typename mpl::pop_front::type inner_args; + typedef typename mpl::push_front::type outer_args; + typedef typename mpl::push_front::type type; + }; + template <> + struct outer_constructor_signature + { + typedef int type; + }; + template + object make_constructor_aux( + F f + , CallPolicies const& p + , Sig const& + ) + { + typedef typename outer_constructor_signature::type outer_signature; + typedef constructor_policy inner_policy; + return objects::function_object( + objects::py_function( + detail::caller(f, inner_policy(p)) + , outer_signature() + ) + ); + } + template + object make_constructor_aux( + F f + , CallPolicies const& p + , Sig const& + , detail::keyword_range const& kw + , NumKeywords + ) + { + enum { arity = mpl::size::value - 1 }; + typedef typename detail::error::more_keywords_than_function_arguments< + NumKeywords::value, arity + >::too_many_keywords assertion; + typedef typename outer_constructor_signature::type outer_signature; + typedef constructor_policy inner_policy; + return objects::function_object( + objects::py_function( + detail::caller(f, inner_policy(p)) + , outer_signature() + ) + , kw + ); + } + template + object make_constructor_dispatch(F f, CallPolicies const& policies, Keywords const& kw, mpl::true_) + { + return detail::make_constructor_aux( + f + , policies + , detail::get_signature(f) + , kw.range() + , mpl::int_() + ); + } + template + object make_constructor_dispatch(F f, CallPolicies const& policies, Signature const& sig, mpl::false_) + { + return detail::make_constructor_aux( + f + , policies + , sig + ); + } +} +template +object make_constructor(F f) +{ + return detail::make_constructor_aux( + f,default_call_policies(), detail::get_signature(f)); +} +template +object make_constructor(F f, CallPolicies const& policies) +{ + return detail::make_constructor_aux( + f, policies, detail::get_signature(f)); +} +template +object make_constructor( + F f + , CallPolicies const& policies + , KeywordsOrSignature const& keywords_or_signature) +{ + typedef typename + detail::is_reference_to_keywords::type + is_kw; + return detail::make_constructor_dispatch( + f + , policies + , keywords_or_signature + , is_kw() + ); +} +template +object make_constructor( + F f + , CallPolicies const& policies + , Keywords const& kw + , Signature const& sig + ) +{ + return detail::make_constructor_aux( + f + , policies + , sig + , kw.range() + , mpl::int_() + ); +} +}} +namespace boost { namespace python { +namespace detail +{ + template + struct manage_new_object_requires_a_pointer_return_type + {} + ; +} +struct manage_new_object +{ + template + struct apply + { + typedef typename mpl::if_c< + boost::is_pointer::value + , to_python_indirect + , detail::manage_new_object_requires_a_pointer_return_type + >::type type; + }; +}; +}} +namespace boost { namespace python { namespace detail { + PyObject* init_module(char const* name, void(*)()); +}}} +namespace boost { namespace python { namespace numeric { +class array; +namespace aux +{ + struct array_base : object + { + array_base( object const& x0); + array_base( object const& x0 , object const& x1); + array_base( object const& x0 , object const& x1 , object const& x2); + array_base( object const& x0 , object const& x1 , object const& x2 , object const& x3); + array_base( object const& x0 , object const& x1 , object const& x2 , object const& x3 , object const& x4); + array_base( object const& x0 , object const& x1 , object const& x2 , object const& x3 , object const& x4 , object const& x5); + array_base( object const& x0 , object const& x1 , object const& x2 , object const& x3 , object const& x4 , object const& x5 , object const& x6); + object argmax(long axis=-1); + object argmin(long axis=-1); + object argsort(long axis=-1); + object astype(object const& type = object()); + void byteswap(); + object copy() const; + object diagonal(long offset = 0, long axis1 = 0, long axis2 = 1) const; + void info() const; + bool is_c_array() const; + bool isbyteswapped() const; + array new_(object type) const; + void sort(); + object trace(long offset = 0, long axis1 = 0, long axis2 = 1) const; + object type() const; + char typecode() const; + object factory( + object const& sequence = object() + , object const& typecode = object() + , bool copy = true + , bool savespace = false + , object type = object() + , object shape = object()); + object getflat() const; + long getrank() const; + object getshape() const; + bool isaligned() const; + bool iscontiguous() const; + long itemsize() const; + long nelements() const; + object nonzero() const; + void put(object const& indices, object const& values); + void ravel(); + object repeat(object const& repeats, long axis=0); + void resize(object const& shape); + void setflat(object const& flat); + void setshape(object const& shape); + void swapaxes(long axis1, long axis2); + object take(object const& sequence, long axis = 0) const; + void tofile(object const& file) const; + str tostring() const; + void transpose(object const& axes = object()); + object view() const; + public: + inline explicit array_base(python::detail::borrowed_reference p) : object(p) {} inline explicit array_base(python::detail::new_reference p) : object(p) {} inline explicit array_base(python::detail::new_non_null_reference p) : object(p) {}; + }; + struct array_object_manager_traits + { + static bool check(PyObject* obj); + static detail::new_non_null_reference adopt(PyObject* obj); + static PyTypeObject const* get_pytype() ; + }; +} +class array : public aux::array_base +{ + typedef aux::array_base base; + public: + object astype() { return base::astype(); } + template + object astype(Type const& type_) + { + return base::astype(object(type_)); + } + template + array new_(Type const& type_) const + { + return base::new_(object(type_)); + } + template + void resize(Sequence const& x) + { + base::resize(object(x)); + } + void resize( long x0) { resize(make_tuple( x0)); } + void resize( long x0 , long x1) { resize(make_tuple( x0 , x1)); } + void resize( long x0 , long x1 , long x2) { resize(make_tuple( x0 , x1 , x2)); } + void resize( long x0 , long x1 , long x2 , long x3) { resize(make_tuple( x0 , x1 , x2 , x3)); } + void resize( long x0 , long x1 , long x2 , long x3 , long x4) { resize(make_tuple( x0 , x1 , x2 , x3 , x4)); } + void resize( long x0 , long x1 , long x2 , long x3 , long x4 , long x5) { resize(make_tuple( x0 , x1 , x2 , x3 , x4 , x5)); } + void resize( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6) { resize(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6)); } + void resize( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7) { resize(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7)); } + void resize( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8) { resize(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8)); } + void resize( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8 , long x9) { resize(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9)); } + void resize( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8 , long x9 , long x10) { resize(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 , x10)); } + void resize( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8 , long x9 , long x10 , long x11) { resize(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 , x10 , x11)); } + void resize( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8 , long x9 , long x10 , long x11 , long x12) { resize(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 , x10 , x11 , x12)); } + void resize( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8 , long x9 , long x10 , long x11 , long x12 , long x13) { resize(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 , x10 , x11 , x12 , x13)); } + void resize( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8 , long x9 , long x10 , long x11 , long x12 , long x13 , long x14) { resize(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 , x10 , x11 , x12 , x13 , x14)); } + template + void setshape(Sequence const& x) + { + base::setshape(object(x)); + } + void setshape( long x0) { setshape(make_tuple( x0)); } + void setshape( long x0 , long x1) { setshape(make_tuple( x0 , x1)); } + void setshape( long x0 , long x1 , long x2) { setshape(make_tuple( x0 , x1 , x2)); } + void setshape( long x0 , long x1 , long x2 , long x3) { setshape(make_tuple( x0 , x1 , x2 , x3)); } + void setshape( long x0 , long x1 , long x2 , long x3 , long x4) { setshape(make_tuple( x0 , x1 , x2 , x3 , x4)); } + void setshape( long x0 , long x1 , long x2 , long x3 , long x4 , long x5) { setshape(make_tuple( x0 , x1 , x2 , x3 , x4 , x5)); } + void setshape( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6) { setshape(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6)); } + void setshape( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7) { setshape(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7)); } + void setshape( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8) { setshape(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8)); } + void setshape( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8 , long x9) { setshape(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9)); } + void setshape( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8 , long x9 , long x10) { setshape(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 , x10)); } + void setshape( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8 , long x9 , long x10 , long x11) { setshape(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 , x10 , x11)); } + void setshape( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8 , long x9 , long x10 , long x11 , long x12) { setshape(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 , x10 , x11 , x12)); } + void setshape( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8 , long x9 , long x10 , long x11 , long x12 , long x13) { setshape(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 , x10 , x11 , x12 , x13)); } + void setshape( long x0 , long x1 , long x2 , long x3 , long x4 , long x5 , long x6 , long x7 , long x8 , long x9 , long x10 , long x11 , long x12 , long x13 , long x14) { setshape(make_tuple( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 , x10 , x11 , x12 , x13 , x14)); } + template + void put(Indices const& indices, Values const& values) + { + base::put(object(indices), object(values)); + } + template + object take(Sequence const& sequence, long axis = 0) + { + return base::take(object(sequence), axis); + } + template + void tofile(File const& f) const + { + base::tofile(object(f)); + } + object factory() + { + return base::factory(); + } + template + object factory(Sequence const& sequence) + { + return base::factory(object(sequence)); + } + template + object factory( + Sequence const& sequence + , Typecode const& typecode_ + , bool copy = true + , bool savespace = false + ) + { + return base::factory(object(sequence), object(typecode_), copy, savespace); + } + template + object factory( + Sequence const& sequence + , Typecode const& typecode_ + , bool copy + , bool savespace + , Type const& type + ) + { + return base::factory(object(sequence), object(typecode_), copy, savespace, object(type)); + } + template + object factory( + Sequence const& sequence + , Typecode const& typecode_ + , bool copy + , bool savespace + , Type const& type + , Shape const& shape + ) + { + return base::factory(object(sequence), object(typecode_), copy, savespace, object(type), object(shape)); + } + template < class T0> explicit array( T0 const& x0) : base( object(x0)) {} + template < class T0 , class T1> explicit array( T0 const& x0 , T1 const& x1) : base( object(x0) , object(x1)) {} + template < class T0 , class T1 , class T2> explicit array( T0 const& x0 , T1 const& x1 , T2 const& x2) : base( object(x0) , object(x1) , object(x2)) {} + template < class T0 , class T1 , class T2 , class T3> explicit array( T0 const& x0 , T1 const& x1 , T2 const& x2 , T3 const& x3) : base( object(x0) , object(x1) , object(x2) , object(x3)) {} + template < class T0 , class T1 , class T2 , class T3 , class T4> explicit array( T0 const& x0 , T1 const& x1 , T2 const& x2 , T3 const& x3 , T4 const& x4) : base( object(x0) , object(x1) , object(x2) , object(x3) , object(x4)) {} + template < class T0 , class T1 , class T2 , class T3 , class T4 , class T5> explicit array( T0 const& x0 , T1 const& x1 , T2 const& x2 , T3 const& x3 , T4 const& x4 , T5 const& x5) : base( object(x0) , object(x1) , object(x2) , object(x3) , object(x4) , object(x5)) {} + template < class T0 , class T1 , class T2 , class T3 , class T4 , class T5 , class T6> explicit array( T0 const& x0 , T1 const& x1 , T2 const& x2 , T3 const& x3 , T4 const& x4 , T5 const& x5 , T6 const& x6) : base( object(x0) , object(x1) , object(x2) , object(x3) , object(x4) , object(x5) , object(x6)) {} + static void set_module_and_type(char const* package_name = 0, char const* type_attribute_name = 0); + static std::string get_module_name(); + public: + inline explicit array(python::detail::borrowed_reference p) : base(p) {} inline explicit array(python::detail::new_reference p) : base(p) {} inline explicit array(python::detail::new_non_null_reference p) : base(p) {}; +}; +} +namespace converter +{ + template <> + struct object_manager_traits< numeric::array > + : numeric::aux::array_object_manager_traits + { + static const bool is_specialized = true; + }; +} +}} +namespace boost { namespace python { namespace detail { + extern "C" + { + inline void dealloc(PyObject* self) + { + PyObject_Free(self); + } + } +}}} +namespace boost { namespace python { +template +struct opaque +{ + opaque() + { + if (type_object.tp_name == 0) + { + type_object.tp_name = const_cast(type_id().name()); + if (PyType_Ready (&type_object) < 0) + { + throw error_already_set(); + } + this->register_self(); + } + } + static opaque instance; +private: + static void* extract(PyObject* op) + { + return ((((PyObject*)(op))->ob_type) == (&type_object) || PyType_IsSubtype((((PyObject*)(op))->ob_type), (&type_object))) + ? static_cast(implicit_cast(op))->x + : 0 + ; + } + static PyObject* wrap(void const* px) + { + Pointee* x = *static_cast(px); + if (x == 0) + return detail::none(); + if ( python_instance *o = ( (python_instance *) _PyObject_New(&type_object) ) ) + { + o->x = x; + return static_cast(implicit_cast(o)); + } + else + { + throw error_already_set(); + } + } + void register_self() + { + converter::registration const *existing = + converter::registry::query (type_id()); + if ((existing == 0) || (existing->m_to_python == 0)) + { + converter::registry::insert(&extract, type_id(), &get_pytype); + converter::registry::insert(&wrap, type_id(), &get_pytype); + } + } + struct python_instance + { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + Pointee* x; + }; + static PyTypeObject type_object; + static PyTypeObject const *get_pytype(){return &type_object; } +}; +template +opaque opaque::instance; +template +PyTypeObject opaque::type_object = +{ + 1, __null, 0, + 0, + sizeof( typename opaque::python_instance ), + 0, + ::boost::python::detail::dealloc, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 +}; +}} +namespace boost { namespace python { +namespace self_ns +{ + struct self_t {}; + extern self_t self; +} +using self_ns::self_t; +using self_ns::self; +}} +namespace boost { namespace python { +template struct other +{ + typedef T type; +}; +namespace detail +{ + template + class is_other + { + public: + static const bool value = false; + }; + template + class is_other > + { + public: + static const bool value = true; + }; + template + class unwrap_other + { + public: + typedef T type; + }; + template + class unwrap_other > + { + public: + typedef T type; + }; +} +}} + + +namespace boost { +namespace detail{ +template +struct is_signed_values +{ + typedef typename remove_cv::type no_cv_t; + static const no_cv_t minus_one = (static_cast(-1)); + static const no_cv_t zero = (static_cast(0)); +}; +template +struct is_signed_helper +{ + typedef typename remove_cv::type no_cv_t; + static const bool value = (!(::boost::detail::is_signed_values::minus_one > boost::detail::is_signed_values::zero)); +}; +template +struct is_signed_select_helper +{ + template + struct rebind + { + typedef is_signed_helper type; + }; +}; +template <> +struct is_signed_select_helper +{ + template + struct rebind + { + typedef false_type type; + }; +}; +template +struct is_signed_imp +{ + typedef is_signed_select_helper< + ::boost::type_traits::ice_or< + ::boost::is_integral::value, + ::boost::is_enum::value>::value + > selector; + typedef typename selector::template rebind binder; + typedef typename binder::type type; + static const bool value = type::value; +}; +} +template< typename T > struct is_signed : ::boost::integral_constant::value> { }; +} +namespace boost { +namespace detail{ +template +struct is_unsigned_values +{ + typedef typename remove_cv::type no_cv_t; + static const no_cv_t minus_one = (static_cast(-1)); + static const no_cv_t zero = (static_cast(0)); +}; +template +struct is_ununsigned_helper +{ + static const bool value = (::boost::detail::is_unsigned_values::minus_one > ::boost::detail::is_unsigned_values::zero); +}; +template +struct is_ununsigned_select_helper +{ + template + struct rebind + { + typedef is_ununsigned_helper type; + }; +}; +template <> +struct is_ununsigned_select_helper +{ + template + struct rebind + { + typedef false_type type; + }; +}; +template +struct is_unsigned_imp +{ + typedef is_ununsigned_select_helper< + ::boost::type_traits::ice_or< + ::boost::is_integral::value, + ::boost::is_enum::value>::value + > selector; + typedef typename selector::template rebind binder; + typedef typename binder::type type; + static const bool value = type::value; +}; +} +template< typename T > struct is_unsigned : ::boost::integral_constant::value> { }; +} +namespace boost { +namespace detail { +template +struct make_unsigned_imp +{ + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_enum::value>::value)) == 0 ? false : true) >)> + boost_static_assert_typedef_39; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((::boost::type_traits::ice_not< ::boost::is_same< typename remove_cv::type, bool>::value>::value)) == 0 ? false : true) >)> + boost_static_assert_typedef_43; + typedef typename remove_cv::type t_no_cv; + typedef typename mpl::if_c< + (::boost::type_traits::ice_and< + ::boost::is_unsigned::value, + ::boost::is_integral::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value >::value), + T, + typename mpl::if_c< + (::boost::type_traits::ice_and< + ::boost::is_integral::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value> + ::value), + typename mpl::if_< + is_same, + unsigned char, + typename mpl::if_< + is_same, + unsigned short, + typename mpl::if_< + is_same, + unsigned int, + typename mpl::if_< + is_same, + unsigned long, + boost::ulong_long_type + >::type + >::type + >::type + >::type, + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned char), + unsigned char, + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned short), + unsigned short, + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned int), + unsigned int, + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned long), + unsigned long, + boost::ulong_long_type + >::type + >::type + >::type + >::type + >::type + >::type base_integer_type; + typedef typename mpl::if_< + is_const, + typename add_const::type, + base_integer_type + >::type const_base_integer_type; + typedef typename mpl::if_< + is_volatile, + typename add_volatile::type, + const_base_integer_type + >::type type; +}; +} +template< typename T > struct make_unsigned { typedef typename boost::detail::make_unsigned_imp::type type; }; +} + +namespace boost { namespace detail { +class lcast_abstract_stub {}; +template +struct lcast_precision +{ + typedef typename boost::mpl::if_< + boost::is_abstract + , std::numeric_limits + , std::numeric_limits + >::type limits; + static const bool use_default_precision = !limits::is_specialized || limits::is_exact + ; + static const bool is_specialized_bin = !use_default_precision && limits::radix == 2 && limits::digits > 0 + ; + static const bool is_specialized_dec = !use_default_precision && limits::radix == 10 && limits::digits10 > 0 + ; + static const std::streamsize streamsize_max = boost::integer_traits::const_max + ; + static const unsigned int precision_dec = limits::digits10 + 1U; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((!is_specialized_dec || precision_dec <= streamsize_max + 0UL) == 0 ? false : true) >)> + boost_static_assert_typedef_79; + static const unsigned long precision_bin = 2UL + limits::digits * 30103UL / 100000UL + ; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((!is_specialized_bin || (limits::digits + 0UL < (9223372036854775807L * 2UL + 1UL) / 30103UL && precision_bin > limits::digits10 + 0UL && precision_bin <= streamsize_max + 0UL)) == 0 ? false : true) >)> + boost_static_assert_typedef_89; + static const std::streamsize value = is_specialized_bin ? precision_bin : is_specialized_dec ? precision_dec : 6 + ; +}; +template +inline std::streamsize lcast_get_precision(T* = 0) +{ + return lcast_precision::value; +} +template +inline void lcast_set_precision(std::ios_base& stream, T*) +{ + stream.precision(lcast_get_precision()); +} +template +inline void lcast_set_precision(std::ios_base& stream, Source*, Target*) +{ + std::streamsize const s = lcast_get_precision((Source*)0); + std::streamsize const t = lcast_get_precision((Target*)0); + stream.precision(s > t ? s : t); +} +}} + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + using ::clock_t; + using ::time_t; + using ::tm; + using ::clock; + using ::difftime; + using ::mktime; + using ::time; + using ::asctime; + using ::ctime; + using ::gmtime; + using ::localtime; + using ::strftime; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + class time_base + { + public: + enum dateorder { no_order, dmy, mdy, ymd, ydm }; + }; + template + struct __timepunct_cache : public locale::facet + { + static const _CharT* _S_timezones[14]; + const _CharT* _M_date_format; + const _CharT* _M_date_era_format; + const _CharT* _M_time_format; + const _CharT* _M_time_era_format; + const _CharT* _M_date_time_format; + const _CharT* _M_date_time_era_format; + const _CharT* _M_am; + const _CharT* _M_pm; + const _CharT* _M_am_pm_format; + const _CharT* _M_day1; + const _CharT* _M_day2; + const _CharT* _M_day3; + const _CharT* _M_day4; + const _CharT* _M_day5; + const _CharT* _M_day6; + const _CharT* _M_day7; + const _CharT* _M_aday1; + const _CharT* _M_aday2; + const _CharT* _M_aday3; + const _CharT* _M_aday4; + const _CharT* _M_aday5; + const _CharT* _M_aday6; + const _CharT* _M_aday7; + const _CharT* _M_month01; + const _CharT* _M_month02; + const _CharT* _M_month03; + const _CharT* _M_month04; + const _CharT* _M_month05; + const _CharT* _M_month06; + const _CharT* _M_month07; + const _CharT* _M_month08; + const _CharT* _M_month09; + const _CharT* _M_month10; + const _CharT* _M_month11; + const _CharT* _M_month12; + const _CharT* _M_amonth01; + const _CharT* _M_amonth02; + const _CharT* _M_amonth03; + const _CharT* _M_amonth04; + const _CharT* _M_amonth05; + const _CharT* _M_amonth06; + const _CharT* _M_amonth07; + const _CharT* _M_amonth08; + const _CharT* _M_amonth09; + const _CharT* _M_amonth10; + const _CharT* _M_amonth11; + const _CharT* _M_amonth12; + bool _M_allocated; + __timepunct_cache(size_t __refs = 0) : facet(__refs), + _M_date_format(__null), _M_date_era_format(__null), _M_time_format(__null), + _M_time_era_format(__null), _M_date_time_format(__null), + _M_date_time_era_format(__null), _M_am(__null), _M_pm(__null), + _M_am_pm_format(__null), _M_day1(__null), _M_day2(__null), _M_day3(__null), + _M_day4(__null), _M_day5(__null), _M_day6(__null), _M_day7(__null), + _M_aday1(__null), _M_aday2(__null), _M_aday3(__null), _M_aday4(__null), + _M_aday5(__null), _M_aday6(__null), _M_aday7(__null), _M_month01(__null), + _M_month02(__null), _M_month03(__null), _M_month04(__null), _M_month05(__null), + _M_month06(__null), _M_month07(__null), _M_month08(__null), _M_month09(__null), + _M_month10(__null), _M_month11(__null), _M_month12(__null), _M_amonth01(__null), + _M_amonth02(__null), _M_amonth03(__null), _M_amonth04(__null), + _M_amonth05(__null), _M_amonth06(__null), _M_amonth07(__null), + _M_amonth08(__null), _M_amonth09(__null), _M_amonth10(__null), + _M_amonth11(__null), _M_amonth12(__null), _M_allocated(false) + { } + ~__timepunct_cache(); + void + _M_cache(const locale& __loc); + private: + __timepunct_cache& + operator=(const __timepunct_cache&); + explicit + __timepunct_cache(const __timepunct_cache&); + }; + template + __timepunct_cache<_CharT>::~__timepunct_cache() + { + if (_M_allocated) + { + } + } + template<> + const char* + __timepunct_cache::_S_timezones[14]; + template<> + const wchar_t* + __timepunct_cache::_S_timezones[14]; + template + const _CharT* __timepunct_cache<_CharT>::_S_timezones[14]; + template + class __timepunct : public locale::facet + { + public: + typedef _CharT __char_type; + typedef basic_string<_CharT> __string_type; + typedef __timepunct_cache<_CharT> __cache_type; + protected: + __cache_type* _M_data; + __c_locale _M_c_locale_timepunct; + const char* _M_name_timepunct; + public: + static locale::id id; + explicit + __timepunct(size_t __refs = 0); + explicit + __timepunct(__cache_type* __cache, size_t __refs = 0); + explicit + __timepunct(__c_locale __cloc, const char* __s, size_t __refs = 0); + void + _M_put(_CharT* __s, size_t __maxlen, const _CharT* __format, + const tm* __tm) const throw (); + void + _M_date_formats(const _CharT** __date) const + { + __date[0] = _M_data->_M_date_format; + __date[1] = _M_data->_M_date_era_format; + } + void + _M_time_formats(const _CharT** __time) const + { + __time[0] = _M_data->_M_time_format; + __time[1] = _M_data->_M_time_era_format; + } + void + _M_date_time_formats(const _CharT** __dt) const + { + __dt[0] = _M_data->_M_date_time_format; + __dt[1] = _M_data->_M_date_time_era_format; + } + void + _M_am_pm_format(const _CharT* __ampm) const + { __ampm = _M_data->_M_am_pm_format; } + void + _M_am_pm(const _CharT** __ampm) const + { + __ampm[0] = _M_data->_M_am; + __ampm[1] = _M_data->_M_pm; + } + void + _M_days(const _CharT** __days) const + { + __days[0] = _M_data->_M_day1; + __days[1] = _M_data->_M_day2; + __days[2] = _M_data->_M_day3; + __days[3] = _M_data->_M_day4; + __days[4] = _M_data->_M_day5; + __days[5] = _M_data->_M_day6; + __days[6] = _M_data->_M_day7; + } + void + _M_days_abbreviated(const _CharT** __days) const + { + __days[0] = _M_data->_M_aday1; + __days[1] = _M_data->_M_aday2; + __days[2] = _M_data->_M_aday3; + __days[3] = _M_data->_M_aday4; + __days[4] = _M_data->_M_aday5; + __days[5] = _M_data->_M_aday6; + __days[6] = _M_data->_M_aday7; + } + void + _M_months(const _CharT** __months) const + { + __months[0] = _M_data->_M_month01; + __months[1] = _M_data->_M_month02; + __months[2] = _M_data->_M_month03; + __months[3] = _M_data->_M_month04; + __months[4] = _M_data->_M_month05; + __months[5] = _M_data->_M_month06; + __months[6] = _M_data->_M_month07; + __months[7] = _M_data->_M_month08; + __months[8] = _M_data->_M_month09; + __months[9] = _M_data->_M_month10; + __months[10] = _M_data->_M_month11; + __months[11] = _M_data->_M_month12; + } + void + _M_months_abbreviated(const _CharT** __months) const + { + __months[0] = _M_data->_M_amonth01; + __months[1] = _M_data->_M_amonth02; + __months[2] = _M_data->_M_amonth03; + __months[3] = _M_data->_M_amonth04; + __months[4] = _M_data->_M_amonth05; + __months[5] = _M_data->_M_amonth06; + __months[6] = _M_data->_M_amonth07; + __months[7] = _M_data->_M_amonth08; + __months[8] = _M_data->_M_amonth09; + __months[9] = _M_data->_M_amonth10; + __months[10] = _M_data->_M_amonth11; + __months[11] = _M_data->_M_amonth12; + } + protected: + virtual + ~__timepunct(); + void + _M_initialize_timepunct(__c_locale __cloc = __null); + }; + template + locale::id __timepunct<_CharT>::id; + template<> + void + __timepunct::_M_initialize_timepunct(__c_locale __cloc); + template<> + void + __timepunct::_M_put(char*, size_t, const char*, const tm*) const throw (); + template<> + void + __timepunct::_M_initialize_timepunct(__c_locale __cloc); + template<> + void + __timepunct::_M_put(wchar_t*, size_t, const wchar_t*, + const tm*) const throw (); +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + __timepunct<_CharT>::__timepunct(size_t __refs) + : facet(__refs), _M_data(__null), _M_c_locale_timepunct(__null), + _M_name_timepunct(_S_get_c_name()) + { _M_initialize_timepunct(); } + template + __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) + : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(__null), + _M_name_timepunct(_S_get_c_name()) + { _M_initialize_timepunct(); } + template + __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, + size_t __refs) + : facet(__refs), _M_data(__null), _M_c_locale_timepunct(__null), + _M_name_timepunct(__null) + { + if (__builtin_strcmp(__s, _S_get_c_name()) != 0) + { + const size_t __len = __builtin_strlen(__s) + 1; + char* __tmp = new char[__len]; + __builtin_memcpy(__tmp, __s, __len); + _M_name_timepunct = __tmp; + } + else + _M_name_timepunct = _S_get_c_name(); + try + { _M_initialize_timepunct(__cloc); } + catch(...) + { + if (_M_name_timepunct != _S_get_c_name()) + delete [] _M_name_timepunct; + throw; + } + } + template + __timepunct<_CharT>::~__timepunct() + { + if (_M_name_timepunct != _S_get_c_name()) + delete [] _M_name_timepunct; + delete _M_data; + _S_destroy_c_locale(_M_c_locale_timepunct); + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + class time_get : public locale::facet, public time_base + { + public: + typedef _CharT char_type; + typedef _InIter iter_type; + typedef basic_string<_CharT> __string_type; + static locale::id id; + explicit + time_get(size_t __refs = 0) + : facet (__refs) { } + dateorder + date_order() const + { return this->do_date_order(); } + iter_type + get_time(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { return this->do_get_time(__beg, __end, __io, __err, __tm); } + iter_type + get_date(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { return this->do_get_date(__beg, __end, __io, __err, __tm); } + iter_type + get_weekday(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { return this->do_get_weekday(__beg, __end, __io, __err, __tm); } + iter_type + get_monthname(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { return this->do_get_monthname(__beg, __end, __io, __err, __tm); } + iter_type + get_year(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { return this->do_get_year(__beg, __end, __io, __err, __tm); } + protected: + virtual + ~time_get() { } + virtual dateorder + do_date_order() const; + virtual iter_type + do_get_time(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const; + virtual iter_type + do_get_date(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const; + virtual iter_type + do_get_weekday(iter_type __beg, iter_type __end, ios_base&, + ios_base::iostate& __err, tm* __tm) const; + virtual iter_type + do_get_monthname(iter_type __beg, iter_type __end, ios_base&, + ios_base::iostate& __err, tm* __tm) const; + virtual iter_type + do_get_year(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const; + iter_type + _M_extract_num(iter_type __beg, iter_type __end, int& __member, + int __min, int __max, size_t __len, + ios_base& __io, ios_base::iostate& __err) const; + iter_type + _M_extract_name(iter_type __beg, iter_type __end, int& __member, + const _CharT** __names, size_t __indexlen, + ios_base& __io, ios_base::iostate& __err) const; + iter_type + _M_extract_wday_or_month(iter_type __beg, iter_type __end, int& __member, + const _CharT** __names, size_t __indexlen, + ios_base& __io, ios_base::iostate& __err) const; + iter_type + _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm, + const _CharT* __format) const; + }; + template + locale::id time_get<_CharT, _InIter>::id; + template + class time_get_byname : public time_get<_CharT, _InIter> + { + public: + typedef _CharT char_type; + typedef _InIter iter_type; + explicit + time_get_byname(const char*, size_t __refs = 0) + : time_get<_CharT, _InIter>(__refs) { } + protected: + virtual + ~time_get_byname() { } + }; + template + class time_put : public locale::facet + { + public: + typedef _CharT char_type; + typedef _OutIter iter_type; + static locale::id id; + explicit + time_put(size_t __refs = 0) + : facet(__refs) { } + iter_type + put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, + const _CharT* __beg, const _CharT* __end) const; + iter_type + put(iter_type __s, ios_base& __io, char_type __fill, + const tm* __tm, char __format, char __mod = 0) const + { return this->do_put(__s, __io, __fill, __tm, __format, __mod); } + protected: + virtual + ~time_put() + { } + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, + char __format, char __mod) const; + }; + template + locale::id time_put<_CharT, _OutIter>::id; + template + class time_put_byname : public time_put<_CharT, _OutIter> + { + public: + typedef _CharT char_type; + typedef _OutIter iter_type; + explicit + time_put_byname(const char*, size_t __refs = 0) + : time_put<_CharT, _OutIter>(__refs) + { }; + protected: + virtual + ~time_put_byname() { } + }; + class money_base + { + public: + enum part { none, space, symbol, sign, value }; + struct pattern { char field[4]; }; + static const pattern _S_default_pattern; + enum + { + _S_minus, + _S_zero, + _S_end = 11 + }; + static const char* _S_atoms; + __attribute__ ((__const__)) static pattern + _S_construct_pattern(char __precedes, char __space, char __posn) throw (); + }; + template + struct __moneypunct_cache : public locale::facet + { + const char* _M_grouping; + size_t _M_grouping_size; + bool _M_use_grouping; + _CharT _M_decimal_point; + _CharT _M_thousands_sep; + const _CharT* _M_curr_symbol; + size_t _M_curr_symbol_size; + const _CharT* _M_positive_sign; + size_t _M_positive_sign_size; + const _CharT* _M_negative_sign; + size_t _M_negative_sign_size; + int _M_frac_digits; + money_base::pattern _M_pos_format; + money_base::pattern _M_neg_format; + _CharT _M_atoms[money_base::_S_end]; + bool _M_allocated; + __moneypunct_cache(size_t __refs = 0) : facet(__refs), + _M_grouping(__null), _M_grouping_size(0), _M_use_grouping(false), + _M_decimal_point(_CharT()), _M_thousands_sep(_CharT()), + _M_curr_symbol(__null), _M_curr_symbol_size(0), + _M_positive_sign(__null), _M_positive_sign_size(0), + _M_negative_sign(__null), _M_negative_sign_size(0), + _M_frac_digits(0), + _M_pos_format(money_base::pattern()), + _M_neg_format(money_base::pattern()), _M_allocated(false) + { } + ~__moneypunct_cache(); + void + _M_cache(const locale& __loc); + private: + __moneypunct_cache& + operator=(const __moneypunct_cache&); + explicit + __moneypunct_cache(const __moneypunct_cache&); + }; + template + __moneypunct_cache<_CharT, _Intl>::~__moneypunct_cache() + { + if (_M_allocated) + { + delete [] _M_grouping; + delete [] _M_curr_symbol; + delete [] _M_positive_sign; + delete [] _M_negative_sign; + } + } + template + class moneypunct : public locale::facet, public money_base + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + typedef __moneypunct_cache<_CharT, _Intl> __cache_type; + private: + __cache_type* _M_data; + public: + static const bool intl = _Intl; + static locale::id id; + explicit + moneypunct(size_t __refs = 0) : facet(__refs), _M_data(__null) + { _M_initialize_moneypunct(); } + explicit + moneypunct(__cache_type* __cache, size_t __refs = 0) + : facet(__refs), _M_data(__cache) + { _M_initialize_moneypunct(); } + explicit + moneypunct(__c_locale __cloc, const char* __s, size_t __refs = 0) + : facet(__refs), _M_data(__null) + { _M_initialize_moneypunct(__cloc, __s); } + char_type + decimal_point() const + { return this->do_decimal_point(); } + char_type + thousands_sep() const + { return this->do_thousands_sep(); } + string + grouping() const + { return this->do_grouping(); } + string_type + curr_symbol() const + { return this->do_curr_symbol(); } + string_type + positive_sign() const + { return this->do_positive_sign(); } + string_type + negative_sign() const + { return this->do_negative_sign(); } + int + frac_digits() const + { return this->do_frac_digits(); } + pattern + pos_format() const + { return this->do_pos_format(); } + pattern + neg_format() const + { return this->do_neg_format(); } + protected: + virtual + ~moneypunct(); + virtual char_type + do_decimal_point() const + { return _M_data->_M_decimal_point; } + virtual char_type + do_thousands_sep() const + { return _M_data->_M_thousands_sep; } + virtual string + do_grouping() const + { return _M_data->_M_grouping; } + virtual string_type + do_curr_symbol() const + { return _M_data->_M_curr_symbol; } + virtual string_type + do_positive_sign() const + { return _M_data->_M_positive_sign; } + virtual string_type + do_negative_sign() const + { return _M_data->_M_negative_sign; } + virtual int + do_frac_digits() const + { return _M_data->_M_frac_digits; } + virtual pattern + do_pos_format() const + { return _M_data->_M_pos_format; } + virtual pattern + do_neg_format() const + { return _M_data->_M_neg_format; } + void + _M_initialize_moneypunct(__c_locale __cloc = __null, + const char* __name = __null); + }; + template + locale::id moneypunct<_CharT, _Intl>::id; + template + const bool moneypunct<_CharT, _Intl>::intl; + template<> + moneypunct::~moneypunct(); + template<> + moneypunct::~moneypunct(); + template<> + void + moneypunct::_M_initialize_moneypunct(__c_locale, const char*); + template<> + void + moneypunct::_M_initialize_moneypunct(__c_locale, const char*); + template<> + moneypunct::~moneypunct(); + template<> + moneypunct::~moneypunct(); + template<> + void + moneypunct::_M_initialize_moneypunct(__c_locale, + const char*); + template<> + void + moneypunct::_M_initialize_moneypunct(__c_locale, + const char*); + template + class moneypunct_byname : public moneypunct<_CharT, _Intl> + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + static const bool intl = _Intl; + explicit + moneypunct_byname(const char* __s, size_t __refs = 0) + : moneypunct<_CharT, _Intl>(__refs) + { + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + __c_locale __tmp; + this->_S_create_c_locale(__tmp, __s); + this->_M_initialize_moneypunct(__tmp); + this->_S_destroy_c_locale(__tmp); + } + } + protected: + virtual + ~moneypunct_byname() { } + }; + template + const bool moneypunct_byname<_CharT, _Intl>::intl; + template + class money_get : public locale::facet + { + public: + typedef _CharT char_type; + typedef _InIter iter_type; + typedef basic_string<_CharT> string_type; + static locale::id id; + explicit + money_get(size_t __refs = 0) : facet(__refs) { } + iter_type + get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, + ios_base::iostate& __err, long double& __units) const + { return this->do_get(__s, __end, __intl, __io, __err, __units); } + iter_type + get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, + ios_base::iostate& __err, string_type& __digits) const + { return this->do_get(__s, __end, __intl, __io, __err, __digits); } + protected: + virtual + ~money_get() { } + virtual iter_type + do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, + ios_base::iostate& __err, long double& __units) const; + virtual iter_type + do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, + ios_base::iostate& __err, string_type& __digits) const; + template + iter_type + _M_extract(iter_type __s, iter_type __end, ios_base& __io, + ios_base::iostate& __err, string& __digits) const; + }; + template + locale::id money_get<_CharT, _InIter>::id; + template + class money_put : public locale::facet + { + public: + typedef _CharT char_type; + typedef _OutIter iter_type; + typedef basic_string<_CharT> string_type; + static locale::id id; + explicit + money_put(size_t __refs = 0) : facet(__refs) { } + iter_type + put(iter_type __s, bool __intl, ios_base& __io, + char_type __fill, long double __units) const + { return this->do_put(__s, __intl, __io, __fill, __units); } + iter_type + put(iter_type __s, bool __intl, ios_base& __io, + char_type __fill, const string_type& __digits) const + { return this->do_put(__s, __intl, __io, __fill, __digits); } + protected: + virtual + ~money_put() { } + virtual iter_type + do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, + long double __units) const; + virtual iter_type + do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, + const string_type& __digits) const; + template + iter_type + _M_insert(iter_type __s, ios_base& __io, char_type __fill, + const string_type& __digits) const; + }; + template + locale::id money_put<_CharT, _OutIter>::id; + struct messages_base + { + typedef int catalog; + }; + template + class messages : public locale::facet, public messages_base + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + protected: + __c_locale _M_c_locale_messages; + const char* _M_name_messages; + public: + static locale::id id; + explicit + messages(size_t __refs = 0); + explicit + messages(__c_locale __cloc, const char* __s, size_t __refs = 0); + catalog + open(const basic_string& __s, const locale& __loc) const + { return this->do_open(__s, __loc); } + catalog + open(const basic_string&, const locale&, const char*) const; + string_type + get(catalog __c, int __set, int __msgid, const string_type& __s) const + { return this->do_get(__c, __set, __msgid, __s); } + void + close(catalog __c) const + { return this->do_close(__c); } + protected: + virtual + ~messages(); + virtual catalog + do_open(const basic_string&, const locale&) const; + virtual string_type + do_get(catalog, int, int, const string_type& __dfault) const; + virtual void + do_close(catalog) const; + char* + _M_convert_to_char(const string_type& __msg) const + { + return reinterpret_cast(const_cast<_CharT*>(__msg.c_str())); + } + string_type + _M_convert_from_char(char*) const + { + return string_type(); + } + }; + template + locale::id messages<_CharT>::id; + template<> + string + messages::do_get(catalog, int, int, const string&) const; + template<> + wstring + messages::do_get(catalog, int, int, const wstring&) const; + template + class messages_byname : public messages<_CharT> + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + explicit + messages_byname(const char* __s, size_t __refs = 0); + protected: + virtual + ~messages_byname() + { } + }; +} +extern "C" { +extern char *gettext (__const char *__msgid) + throw () __attribute__ ((__format_arg__ (1))); +extern char *dgettext (__const char *__domainname, __const char *__msgid) + throw () __attribute__ ((__format_arg__ (2))); +extern char *__dgettext (__const char *__domainname, __const char *__msgid) + throw () __attribute__ ((__format_arg__ (2))); +extern char *dcgettext (__const char *__domainname, + __const char *__msgid, int __category) + throw () __attribute__ ((__format_arg__ (2))); +extern char *__dcgettext (__const char *__domainname, + __const char *__msgid, int __category) + throw () __attribute__ ((__format_arg__ (2))); +extern char *ngettext (__const char *__msgid1, __const char *__msgid2, + unsigned long int __n) + throw () __attribute__ ((__format_arg__ (1))) __attribute__ ((__format_arg__ (2))); +extern char *dngettext (__const char *__domainname, __const char *__msgid1, + __const char *__msgid2, unsigned long int __n) + throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); +extern char *dcngettext (__const char *__domainname, __const char *__msgid1, + __const char *__msgid2, unsigned long int __n, + int __category) + throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); +extern char *textdomain (__const char *__domainname) throw (); +extern char *bindtextdomain (__const char *__domainname, + __const char *__dirname) throw (); +extern char *bind_textdomain_codeset (__const char *__domainname, + __const char *__codeset) throw (); +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + messages<_CharT>::messages(size_t __refs) + : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), + _M_name_messages(_S_get_c_name()) + { } + template + messages<_CharT>::messages(__c_locale __cloc, const char* __s, + size_t __refs) + : facet(__refs), _M_c_locale_messages(__null), _M_name_messages(__null) + { + if (__builtin_strcmp(__s, _S_get_c_name()) != 0) + { + const size_t __len = __builtin_strlen(__s) + 1; + char* __tmp = new char[__len]; + __builtin_memcpy(__tmp, __s, __len); + _M_name_messages = __tmp; + } + else + _M_name_messages = _S_get_c_name(); + _M_c_locale_messages = _S_clone_c_locale(__cloc); + } + template + typename messages<_CharT>::catalog + messages<_CharT>::open(const basic_string& __s, const locale& __loc, + const char* __dir) const + { + bindtextdomain(__s.c_str(), __dir); + return this->do_open(__s, __loc); + } + template + messages<_CharT>::~messages() + { + if (_M_name_messages != _S_get_c_name()) + delete [] _M_name_messages; + _S_destroy_c_locale(_M_c_locale_messages); + } + template + typename messages<_CharT>::catalog + messages<_CharT>::do_open(const basic_string& __s, + const locale&) const + { + textdomain(__s.c_str()); + return 0; + } + template + void + messages<_CharT>::do_close(catalog) const + { } + template + messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) + : messages<_CharT>(__refs) + { + if (this->_M_name_messages != locale::facet::_S_get_c_name()) + { + delete [] this->_M_name_messages; + if (__builtin_strcmp(__s, locale::facet::_S_get_c_name()) != 0) + { + const size_t __len = __builtin_strlen(__s) + 1; + char* __tmp = new char[__len]; + __builtin_memcpy(__tmp, __s, __len); + this->_M_name_messages = __tmp; + } + else + this->_M_name_messages = locale::facet::_S_get_c_name(); + } + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + this->_S_destroy_c_locale(this->_M_c_locale_messages); + this->_S_create_c_locale(this->_M_c_locale_messages, __s); + } + } +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + class codecvt_base + { + public: + enum result + { + ok, + partial, + error, + noconv + }; + }; + template + class __codecvt_abstract_base + : public locale::facet, public codecvt_base + { + public: + typedef codecvt_base::result result; + typedef _InternT intern_type; + typedef _ExternT extern_type; + typedef _StateT state_type; + result + out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const + { + return this->do_out(__state, __from, __from_end, __from_next, + __to, __to_end, __to_next); + } + result + unshift(state_type& __state, extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const + { return this->do_unshift(__state, __to,__to_end,__to_next); } + result + in(state_type& __state, const extern_type* __from, + const extern_type* __from_end, const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const + { + return this->do_in(__state, __from, __from_end, __from_next, + __to, __to_end, __to_next); + } + int + encoding() const throw() + { return this->do_encoding(); } + bool + always_noconv() const throw() + { return this->do_always_noconv(); } + int + length(state_type& __state, const extern_type* __from, + const extern_type* __end, size_t __max) const + { return this->do_length(__state, __from, __end, __max); } + int + max_length() const throw() + { return this->do_max_length(); } + protected: + explicit + __codecvt_abstract_base(size_t __refs = 0) : locale::facet(__refs) { } + virtual + ~__codecvt_abstract_base() { } + virtual result + do_out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const = 0; + virtual result + do_unshift(state_type& __state, extern_type* __to, + extern_type* __to_end, extern_type*& __to_next) const = 0; + virtual result + do_in(state_type& __state, const extern_type* __from, + const extern_type* __from_end, const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const = 0; + virtual int + do_encoding() const throw() = 0; + virtual bool + do_always_noconv() const throw() = 0; + virtual int + do_length(state_type&, const extern_type* __from, + const extern_type* __end, size_t __max) const = 0; + virtual int + do_max_length() const throw() = 0; + }; + template + class codecvt + : public __codecvt_abstract_base<_InternT, _ExternT, _StateT> + { + public: + typedef codecvt_base::result result; + typedef _InternT intern_type; + typedef _ExternT extern_type; + typedef _StateT state_type; + protected: + __c_locale _M_c_locale_codecvt; + public: + static locale::id id; + explicit + codecvt(size_t __refs = 0) + : __codecvt_abstract_base<_InternT, _ExternT, _StateT> (__refs) { } + explicit + codecvt(__c_locale __cloc, size_t __refs = 0); + protected: + virtual + ~codecvt() { } + virtual result + do_out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const; + virtual result + do_unshift(state_type& __state, extern_type* __to, + extern_type* __to_end, extern_type*& __to_next) const; + virtual result + do_in(state_type& __state, const extern_type* __from, + const extern_type* __from_end, const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const; + virtual int + do_encoding() const throw(); + virtual bool + do_always_noconv() const throw(); + virtual int + do_length(state_type&, const extern_type* __from, + const extern_type* __end, size_t __max) const; + virtual int + do_max_length() const throw(); + }; + template + locale::id codecvt<_InternT, _ExternT, _StateT>::id; + template<> + class codecvt + : public __codecvt_abstract_base + { + public: + typedef char intern_type; + typedef char extern_type; + typedef mbstate_t state_type; + protected: + __c_locale _M_c_locale_codecvt; + public: + static locale::id id; + explicit + codecvt(size_t __refs = 0); + explicit + codecvt(__c_locale __cloc, size_t __refs = 0); + protected: + virtual + ~codecvt(); + virtual result + do_out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const; + virtual result + do_unshift(state_type& __state, extern_type* __to, + extern_type* __to_end, extern_type*& __to_next) const; + virtual result + do_in(state_type& __state, const extern_type* __from, + const extern_type* __from_end, const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const; + virtual int + do_encoding() const throw(); + virtual bool + do_always_noconv() const throw(); + virtual int + do_length(state_type&, const extern_type* __from, + const extern_type* __end, size_t __max) const; + virtual int + do_max_length() const throw(); + }; + template<> + class codecvt + : public __codecvt_abstract_base + { + public: + typedef wchar_t intern_type; + typedef char extern_type; + typedef mbstate_t state_type; + protected: + __c_locale _M_c_locale_codecvt; + public: + static locale::id id; + explicit + codecvt(size_t __refs = 0); + explicit + codecvt(__c_locale __cloc, size_t __refs = 0); + protected: + virtual + ~codecvt(); + virtual result + do_out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const; + virtual result + do_unshift(state_type& __state, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const; + virtual result + do_in(state_type& __state, + const extern_type* __from, const extern_type* __from_end, + const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const; + virtual + int do_encoding() const throw(); + virtual + bool do_always_noconv() const throw(); + virtual + int do_length(state_type&, const extern_type* __from, + const extern_type* __end, size_t __max) const; + virtual int + do_max_length() const throw(); + }; + template + class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT> + { + public: + explicit + codecvt_byname(const char* __s, size_t __refs = 0) + : codecvt<_InternT, _ExternT, _StateT>(__refs) + { + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + this->_S_destroy_c_locale(this->_M_c_locale_codecvt); + this->_S_create_c_locale(this->_M_c_locale_codecvt, __s); + } + } + protected: + virtual + ~codecvt_byname() { } + }; + extern template class codecvt_byname; + extern template + const codecvt& + use_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template class codecvt_byname; + extern template + const codecvt& + use_facet >(const locale&); + extern template + bool + has_facet >(const locale&); +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + struct __use_cache<__moneypunct_cache<_CharT, _Intl> > + { + const __moneypunct_cache<_CharT, _Intl>* + operator() (const locale& __loc) const + { + const size_t __i = moneypunct<_CharT, _Intl>::id._M_id(); + const locale::facet** __caches = __loc._M_impl->_M_caches; + if (!__caches[__i]) + { + __moneypunct_cache<_CharT, _Intl>* __tmp = __null; + try + { + __tmp = new __moneypunct_cache<_CharT, _Intl>; + __tmp->_M_cache(__loc); + } + catch(...) + { + delete __tmp; + throw; + } + __loc._M_impl->_M_install_cache(__tmp, __i); + } + return static_cast< + const __moneypunct_cache<_CharT, _Intl>*>(__caches[__i]); + } + }; + template + void + __moneypunct_cache<_CharT, _Intl>::_M_cache(const locale& __loc) + { + _M_allocated = true; + const moneypunct<_CharT, _Intl>& __mp = + use_facet >(__loc); + _M_decimal_point = __mp.decimal_point(); + _M_thousands_sep = __mp.thousands_sep(); + _M_frac_digits = __mp.frac_digits(); + char* __grouping = 0; + _CharT* __curr_symbol = 0; + _CharT* __positive_sign = 0; + _CharT* __negative_sign = 0; + try + { + _M_grouping_size = __mp.grouping().size(); + __grouping = new char[_M_grouping_size]; + __mp.grouping().copy(__grouping, _M_grouping_size); + _M_grouping = __grouping; + _M_use_grouping = (_M_grouping_size + && static_cast(_M_grouping[0]) > 0 + && (_M_grouping[0] + != __gnu_cxx::__numeric_traits::__max)); + _M_curr_symbol_size = __mp.curr_symbol().size(); + __curr_symbol = new _CharT[_M_curr_symbol_size]; + __mp.curr_symbol().copy(__curr_symbol, _M_curr_symbol_size); + _M_curr_symbol = __curr_symbol; + _M_positive_sign_size = __mp.positive_sign().size(); + __positive_sign = new _CharT[_M_positive_sign_size]; + __mp.positive_sign().copy(__positive_sign, _M_positive_sign_size); + _M_positive_sign = __positive_sign; + _M_negative_sign_size = __mp.negative_sign().size(); + __negative_sign = new _CharT[_M_negative_sign_size]; + __mp.negative_sign().copy(__negative_sign, _M_negative_sign_size); + _M_negative_sign = __negative_sign; + _M_pos_format = __mp.pos_format(); + _M_neg_format = __mp.neg_format(); + const ctype<_CharT>& __ct = use_facet >(__loc); + __ct.widen(money_base::_S_atoms, + money_base::_S_atoms + money_base::_S_end, _M_atoms); + } + catch(...) + { + delete [] __grouping; + delete [] __curr_symbol; + delete [] __positive_sign; + delete [] __negative_sign; + throw; + } + } + template + template + _InIter + money_get<_CharT, _InIter>:: + _M_extract(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, string& __units) const + { + typedef char_traits<_CharT> __traits_type; + typedef typename string_type::size_type size_type; + typedef money_base::part part; + typedef __moneypunct_cache<_CharT, _Intl> __cache_type; + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + __use_cache<__cache_type> __uc; + const __cache_type* __lc = __uc(__loc); + const char_type* __lit = __lc->_M_atoms; + bool __negative = false; + size_type __sign_size = 0; + const bool __mandatory_sign = (__lc->_M_positive_sign_size + && __lc->_M_negative_sign_size); + string __grouping_tmp; + if (__lc->_M_use_grouping) + __grouping_tmp.reserve(32); + int __last_pos = 0; + int __n = 0; + bool __testvalid = true; + bool __testdecfound = false; + string __res; + __res.reserve(32); + const char_type* __lit_zero = __lit + money_base::_S_zero; + const money_base::pattern __p = __lc->_M_neg_format; + for (int __i = 0; __i < 4 && __testvalid; ++__i) + { + const part __which = static_cast(__p.field[__i]); + switch (__which) + { + case money_base::symbol: + if (__io.flags() & ios_base::showbase || __sign_size > 1 + || __i == 0 + || (__i == 1 && (__mandatory_sign + || (static_cast(__p.field[0]) + == money_base::sign) + || (static_cast(__p.field[2]) + == money_base::space))) + || (__i == 2 && ((static_cast(__p.field[3]) + == money_base::value) + || (__mandatory_sign + && (static_cast(__p.field[3]) + == money_base::sign))))) + { + const size_type __len = __lc->_M_curr_symbol_size; + size_type __j = 0; + for (; __beg != __end && __j < __len + && *__beg == __lc->_M_curr_symbol[__j]; + ++__beg, ++__j); + if (__j != __len + && (__j || __io.flags() & ios_base::showbase)) + __testvalid = false; + } + break; + case money_base::sign: + if (__lc->_M_positive_sign_size && __beg != __end + && *__beg == __lc->_M_positive_sign[0]) + { + __sign_size = __lc->_M_positive_sign_size; + ++__beg; + } + else if (__lc->_M_negative_sign_size && __beg != __end + && *__beg == __lc->_M_negative_sign[0]) + { + __negative = true; + __sign_size = __lc->_M_negative_sign_size; + ++__beg; + } + else if (__lc->_M_positive_sign_size + && !__lc->_M_negative_sign_size) + __negative = true; + else if (__mandatory_sign) + __testvalid = false; + break; + case money_base::value: + for (; __beg != __end; ++__beg) + { + const char_type __c = *__beg; + const char_type* __q = __traits_type::find(__lit_zero, + 10, __c); + if (__q != 0) + { + __res += money_base::_S_atoms[__q - __lit]; + ++__n; + } + else if (__c == __lc->_M_decimal_point + && !__testdecfound) + { + if (__lc->_M_frac_digits <= 0) + break; + __last_pos = __n; + __n = 0; + __testdecfound = true; + } + else if (__lc->_M_use_grouping + && __c == __lc->_M_thousands_sep + && !__testdecfound) + { + if (__n) + { + __grouping_tmp += static_cast(__n); + __n = 0; + } + else + { + __testvalid = false; + break; + } + } + else + break; + } + if (__res.empty()) + __testvalid = false; + break; + case money_base::space: + if (__beg != __end && __ctype.is(ctype_base::space, *__beg)) + ++__beg; + else + __testvalid = false; + case money_base::none: + if (__i != 3) + for (; __beg != __end + && __ctype.is(ctype_base::space, *__beg); ++__beg); + break; + } + } + if (__sign_size > 1 && __testvalid) + { + const char_type* __sign = __negative ? __lc->_M_negative_sign + : __lc->_M_positive_sign; + size_type __i = 1; + for (; __beg != __end && __i < __sign_size + && *__beg == __sign[__i]; ++__beg, ++__i); + if (__i != __sign_size) + __testvalid = false; + } + if (__testvalid) + { + if (__res.size() > 1) + { + const size_type __first = __res.find_first_not_of('0'); + const bool __only_zeros = __first == string::npos; + if (__first) + __res.erase(0, __only_zeros ? __res.size() - 1 : __first); + } + if (__negative && __res[0] != '0') + __res.insert(__res.begin(), '-'); + if (__grouping_tmp.size()) + { + __grouping_tmp += static_cast(__testdecfound ? __last_pos + : __n); + if (!std::__verify_grouping(__lc->_M_grouping, + __lc->_M_grouping_size, + __grouping_tmp)) + __err |= ios_base::failbit; + } + if (__testdecfound && __n != __lc->_M_frac_digits) + __testvalid = false; + } + if (!__testvalid) + __err |= ios_base::failbit; + else + __units.swap(__res); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + template + _InIter + money_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, + ios_base::iostate& __err, long double& __units) const + { + string __str; + __beg = __intl ? _M_extract(__beg, __end, __io, __err, __str) + : _M_extract(__beg, __end, __io, __err, __str); + std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale()); + return __beg; + } + template + _InIter + money_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, + ios_base::iostate& __err, string_type& __digits) const + { + typedef typename string::size_type size_type; + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + string __str; + __beg = __intl ? _M_extract(__beg, __end, __io, __err, __str) + : _M_extract(__beg, __end, __io, __err, __str); + const size_type __len = __str.size(); + if (__len) + { + __digits.resize(__len); + __ctype.widen(__str.data(), __str.data() + __len, &__digits[0]); + } + return __beg; + } + template + template + _OutIter + money_put<_CharT, _OutIter>:: + _M_insert(iter_type __s, ios_base& __io, char_type __fill, + const string_type& __digits) const + { + typedef typename string_type::size_type size_type; + typedef money_base::part part; + typedef __moneypunct_cache<_CharT, _Intl> __cache_type; + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + __use_cache<__cache_type> __uc; + const __cache_type* __lc = __uc(__loc); + const char_type* __lit = __lc->_M_atoms; + const char_type* __beg = __digits.data(); + money_base::pattern __p; + const char_type* __sign; + size_type __sign_size; + if (!(*__beg == __lit[money_base::_S_minus])) + { + __p = __lc->_M_pos_format; + __sign = __lc->_M_positive_sign; + __sign_size = __lc->_M_positive_sign_size; + } + else + { + __p = __lc->_M_neg_format; + __sign = __lc->_M_negative_sign; + __sign_size = __lc->_M_negative_sign_size; + if (__digits.size()) + ++__beg; + } + size_type __len = __ctype.scan_not(ctype_base::digit, __beg, + __beg + __digits.size()) - __beg; + if (__len) + { + string_type __value; + __value.reserve(2 * __len); + long __paddec = __len - __lc->_M_frac_digits; + if (__paddec > 0) + { + if (__lc->_M_frac_digits < 0) + __paddec = __len; + if (__lc->_M_grouping_size) + { + __value.assign(2 * __paddec, char_type()); + _CharT* __vend = + std::__add_grouping(&__value[0], __lc->_M_thousands_sep, + __lc->_M_grouping, + __lc->_M_grouping_size, + __beg, __beg + __paddec); + __value.erase(__vend - &__value[0]); + } + else + __value.assign(__beg, __paddec); + } + if (__lc->_M_frac_digits > 0) + { + __value += __lc->_M_decimal_point; + if (__paddec >= 0) + __value.append(__beg + __paddec, __lc->_M_frac_digits); + else + { + __value.append(-__paddec, __lit[money_base::_S_zero]); + __value.append(__beg, __len); + } + } + const ios_base::fmtflags __f = __io.flags() + & ios_base::adjustfield; + __len = __value.size() + __sign_size; + __len += ((__io.flags() & ios_base::showbase) + ? __lc->_M_curr_symbol_size : 0); + string_type __res; + __res.reserve(2 * __len); + const size_type __width = static_cast(__io.width()); + const bool __testipad = (__f == ios_base::internal + && __len < __width); + for (int __i = 0; __i < 4; ++__i) + { + const part __which = static_cast(__p.field[__i]); + switch (__which) + { + case money_base::symbol: + if (__io.flags() & ios_base::showbase) + __res.append(__lc->_M_curr_symbol, + __lc->_M_curr_symbol_size); + break; + case money_base::sign: + if (__sign_size) + __res += __sign[0]; + break; + case money_base::value: + __res += __value; + break; + case money_base::space: + if (__testipad) + __res.append(__width - __len, __fill); + else + __res += __fill; + break; + case money_base::none: + if (__testipad) + __res.append(__width - __len, __fill); + break; + } + } + if (__sign_size > 1) + __res.append(__sign + 1, __sign_size - 1); + __len = __res.size(); + if (__width > __len) + { + if (__f == ios_base::left) + __res.append(__width - __len, __fill); + else + __res.insert(0, __width - __len, __fill); + __len = __width; + } + __s = std::__write(__s, __res.data(), __len); + } + __io.width(0); + return __s; + } + template + _OutIter + money_put<_CharT, _OutIter>:: + do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, + long double __units) const + { + const locale __loc = __io.getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + int __cs_size = 64; + char* __cs = static_cast(__builtin_alloca(__cs_size)); + int __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, + "%.*Lf", 0, __units); + if (__len >= __cs_size) + { + __cs_size = __len + 1; + __cs = static_cast(__builtin_alloca(__cs_size)); + __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, + "%.*Lf", 0, __units); + } + string_type __digits(__len, char_type()); + __ctype.widen(__cs, __cs + __len, &__digits[0]); + return __intl ? _M_insert(__s, __io, __fill, __digits) + : _M_insert(__s, __io, __fill, __digits); + } + template + _OutIter + money_put<_CharT, _OutIter>:: + do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, + const string_type& __digits) const + { return __intl ? _M_insert(__s, __io, __fill, __digits) + : _M_insert(__s, __io, __fill, __digits); } + template + time_base::dateorder + time_get<_CharT, _InIter>::do_date_order() const + { return time_base::no_order; } + template + _InIter + time_get<_CharT, _InIter>:: + _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm, + const _CharT* __format) const + { + const locale& __loc = __io._M_getloc(); + const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); + const ctype<_CharT>& __ctype = use_facet >(__loc); + const size_t __len = char_traits<_CharT>::length(__format); + ios_base::iostate __tmperr = ios_base::goodbit; + for (size_t __i = 0; __beg != __end && __i < __len && !__tmperr; ++__i) + { + if (__ctype.narrow(__format[__i], 0) == '%') + { + char __c = __ctype.narrow(__format[++__i], 0); + int __mem = 0; + if (__c == 'E' || __c == 'O') + __c = __ctype.narrow(__format[++__i], 0); + switch (__c) + { + const char* __cs; + _CharT __wcs[10]; + case 'a': + const char_type* __days1[7]; + __tp._M_days_abbreviated(__days1); + __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days1, + 7, __io, __tmperr); + break; + case 'A': + const char_type* __days2[7]; + __tp._M_days(__days2); + __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days2, + 7, __io, __tmperr); + break; + case 'h': + case 'b': + const char_type* __months1[12]; + __tp._M_months_abbreviated(__months1); + __beg = _M_extract_name(__beg, __end, __tm->tm_mon, + __months1, 12, __io, __tmperr); + break; + case 'B': + const char_type* __months2[12]; + __tp._M_months(__months2); + __beg = _M_extract_name(__beg, __end, __tm->tm_mon, + __months2, 12, __io, __tmperr); + break; + case 'c': + const char_type* __dt[2]; + __tp._M_date_time_formats(__dt); + __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, + __tm, __dt[0]); + break; + case 'd': + __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 1, 31, 2, + __io, __tmperr); + break; + case 'e': + if (__ctype.is(ctype_base::space, *__beg)) + __beg = _M_extract_num(++__beg, __end, __tm->tm_mday, 1, 9, + 1, __io, __tmperr); + else + __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 10, 31, + 2, __io, __tmperr); + break; + case 'D': + __cs = "%m/%d/%y"; + __ctype.widen(__cs, __cs + 9, __wcs); + __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, + __tm, __wcs); + break; + case 'H': + __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 0, 23, 2, + __io, __tmperr); + break; + case 'I': + __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 1, 12, 2, + __io, __tmperr); + break; + case 'm': + __beg = _M_extract_num(__beg, __end, __mem, 1, 12, 2, + __io, __tmperr); + if (!__tmperr) + __tm->tm_mon = __mem - 1; + break; + case 'M': + __beg = _M_extract_num(__beg, __end, __tm->tm_min, 0, 59, 2, + __io, __tmperr); + break; + case 'n': + if (__ctype.narrow(*__beg, 0) == '\n') + ++__beg; + else + __tmperr |= ios_base::failbit; + break; + case 'R': + __cs = "%H:%M"; + __ctype.widen(__cs, __cs + 6, __wcs); + __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, + __tm, __wcs); + break; + case 'S': + __beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 60, 2, + __io, __tmperr); + break; + case 't': + if (__ctype.narrow(*__beg, 0) == '\t') + ++__beg; + else + __tmperr |= ios_base::failbit; + break; + case 'T': + __cs = "%H:%M:%S"; + __ctype.widen(__cs, __cs + 9, __wcs); + __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, + __tm, __wcs); + break; + case 'x': + const char_type* __dates[2]; + __tp._M_date_formats(__dates); + __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, + __tm, __dates[0]); + break; + case 'X': + const char_type* __times[2]; + __tp._M_time_formats(__times); + __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, + __tm, __times[0]); + break; + case 'y': + case 'C': + case 'Y': + __beg = _M_extract_num(__beg, __end, __mem, 0, 9999, 4, + __io, __tmperr); + if (!__tmperr) + __tm->tm_year = __mem < 0 ? __mem + 100 : __mem - 1900; + break; + case 'Z': + if (__ctype.is(ctype_base::upper, *__beg)) + { + int __tmp; + __beg = _M_extract_name(__beg, __end, __tmp, + __timepunct_cache<_CharT>::_S_timezones, + 14, __io, __tmperr); + if (__beg != __end && !__tmperr && __tmp == 0 + && (*__beg == __ctype.widen('-') + || *__beg == __ctype.widen('+'))) + { + __beg = _M_extract_num(__beg, __end, __tmp, 0, 23, 2, + __io, __tmperr); + __beg = _M_extract_num(__beg, __end, __tmp, 0, 59, 2, + __io, __tmperr); + } + } + else + __tmperr |= ios_base::failbit; + break; + default: + __tmperr |= ios_base::failbit; + } + } + else + { + if (__format[__i] == *__beg) + ++__beg; + else + __tmperr |= ios_base::failbit; + } + } + if (__tmperr) + __err |= ios_base::failbit; + return __beg; + } + template + _InIter + time_get<_CharT, _InIter>:: + _M_extract_num(iter_type __beg, iter_type __end, int& __member, + int __min, int __max, size_t __len, + ios_base& __io, ios_base::iostate& __err) const + { + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + int __mult = __len == 2 ? 10 : (__len == 4 ? 1000 : 1); + ++__min; + size_t __i = 0; + int __value = 0; + for (; __beg != __end && __i < __len; ++__beg, ++__i) + { + const char __c = __ctype.narrow(*__beg, '*'); + if (__c >= '0' && __c <= '9') + { + __value = __value * 10 + (__c - '0'); + const int __valuec = __value * __mult; + if (__valuec > __max || __valuec + __mult < __min) + break; + __mult /= 10; + } + else + break; + } + if (__i == __len) + __member = __value; + else if (__len == 4 && __i == 2) + __member = __value - 100; + else + __err |= ios_base::failbit; + return __beg; + } + template + _InIter + time_get<_CharT, _InIter>:: + _M_extract_name(iter_type __beg, iter_type __end, int& __member, + const _CharT** __names, size_t __indexlen, + ios_base& __io, ios_base::iostate& __err) const + { + typedef char_traits<_CharT> __traits_type; + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + int* __matches = static_cast(__builtin_alloca(sizeof(int) + * __indexlen)); + size_t __nmatches = 0; + size_t __pos = 0; + bool __testvalid = true; + const char_type* __name; + if (__beg != __end) + { + const char_type __c = *__beg; + for (size_t __i1 = 0; __i1 < __indexlen; ++__i1) + if (__c == __names[__i1][0] + || __c == __ctype.toupper(__names[__i1][0])) + __matches[__nmatches++] = __i1; + } + while (__nmatches > 1) + { + size_t __minlen = __traits_type::length(__names[__matches[0]]); + for (size_t __i2 = 1; __i2 < __nmatches; ++__i2) + __minlen = std::min(__minlen, + __traits_type::length(__names[__matches[__i2]])); + ++__beg, ++__pos; + if (__pos < __minlen && __beg != __end) + for (size_t __i3 = 0; __i3 < __nmatches;) + { + __name = __names[__matches[__i3]]; + if (!(__name[__pos] == *__beg)) + __matches[__i3] = __matches[--__nmatches]; + else + ++__i3; + } + else + break; + } + if (__nmatches == 1) + { + ++__beg, ++__pos; + __name = __names[__matches[0]]; + const size_t __len = __traits_type::length(__name); + while (__pos < __len && __beg != __end && __name[__pos] == *__beg) + ++__beg, ++__pos; + if (__len == __pos) + __member = __matches[0]; + else + __testvalid = false; + } + else + __testvalid = false; + if (!__testvalid) + __err |= ios_base::failbit; + return __beg; + } + template + _InIter + time_get<_CharT, _InIter>:: + _M_extract_wday_or_month(iter_type __beg, iter_type __end, int& __member, + const _CharT** __names, size_t __indexlen, + ios_base& __io, ios_base::iostate& __err) const + { + typedef char_traits<_CharT> __traits_type; + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + int* __matches = static_cast(__builtin_alloca(2 * sizeof(int) + * __indexlen)); + size_t __nmatches = 0; + size_t* __matches_lengths = 0; + size_t __pos = 0; + if (__beg != __end) + { + const char_type __c = *__beg; + for (size_t __i = 0; __i < 2 * __indexlen; ++__i) + if (__c == __names[__i][0] + || __c == __ctype.toupper(__names[__i][0])) + __matches[__nmatches++] = __i; + } + if (__nmatches) + { + ++__beg, ++__pos; + __matches_lengths + = static_cast(__builtin_alloca(sizeof(size_t) + * __nmatches)); + for (size_t __i = 0; __i < __nmatches; ++__i) + __matches_lengths[__i] + = __traits_type::length(__names[__matches[__i]]); + } + for (; __beg != __end; ++__beg, ++__pos) + { + size_t __nskipped = 0; + const char_type __c = *__beg; + for (size_t __i = 0; __i < __nmatches;) + { + const char_type* __name = __names[__matches[__i]]; + if (__pos >= __matches_lengths[__i]) + ++__nskipped, ++__i; + else if (!(__name[__pos] == __c)) + { + --__nmatches; + __matches[__i] = __matches[__nmatches]; + __matches_lengths[__i] = __matches_lengths[__nmatches]; + } + else + ++__i; + } + if (__nskipped == __nmatches) + break; + } + if ((__nmatches == 1 && __matches_lengths[0] == __pos) + || (__nmatches == 2 && (__matches_lengths[0] == __pos + || __matches_lengths[1] == __pos))) + __member = (__matches[0] >= __indexlen + ? __matches[0] - __indexlen : __matches[0]); + else + __err |= ios_base::failbit; + return __beg; + } + template + _InIter + time_get<_CharT, _InIter>:: + do_get_time(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { + const locale& __loc = __io._M_getloc(); + const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); + const char_type* __times[2]; + __tp._M_time_formats(__times); + __beg = _M_extract_via_format(__beg, __end, __io, __err, + __tm, __times[0]); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + template + _InIter + time_get<_CharT, _InIter>:: + do_get_date(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { + const locale& __loc = __io._M_getloc(); + const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); + const char_type* __dates[2]; + __tp._M_date_formats(__dates); + __beg = _M_extract_via_format(__beg, __end, __io, __err, + __tm, __dates[0]); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + template + _InIter + time_get<_CharT, _InIter>:: + do_get_weekday(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { + typedef char_traits<_CharT> __traits_type; + const locale& __loc = __io._M_getloc(); + const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); + const ctype<_CharT>& __ctype = use_facet >(__loc); + const char_type* __days[14]; + __tp._M_days_abbreviated(__days); + __tp._M_days(__days + 7); + int __tmpwday; + ios_base::iostate __tmperr = ios_base::goodbit; + __beg = _M_extract_wday_or_month(__beg, __end, __tmpwday, __days, 7, + __io, __tmperr); + if (!__tmperr) + __tm->tm_wday = __tmpwday; + else + __err |= ios_base::failbit; + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + template + _InIter + time_get<_CharT, _InIter>:: + do_get_monthname(iter_type __beg, iter_type __end, + ios_base& __io, ios_base::iostate& __err, tm* __tm) const + { + typedef char_traits<_CharT> __traits_type; + const locale& __loc = __io._M_getloc(); + const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); + const ctype<_CharT>& __ctype = use_facet >(__loc); + const char_type* __months[24]; + __tp._M_months_abbreviated(__months); + __tp._M_months(__months + 12); + int __tmpmon; + ios_base::iostate __tmperr = ios_base::goodbit; + __beg = _M_extract_wday_or_month(__beg, __end, __tmpmon, __months, 12, + __io, __tmperr); + if (!__tmperr) + __tm->tm_mon = __tmpmon; + else + __err |= ios_base::failbit; + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + template + _InIter + time_get<_CharT, _InIter>:: + do_get_year(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + int __tmpyear; + ios_base::iostate __tmperr = ios_base::goodbit; + __beg = _M_extract_num(__beg, __end, __tmpyear, 0, 9999, 4, + __io, __tmperr); + if (!__tmperr) + __tm->tm_year = __tmpyear < 0 ? __tmpyear + 100 : __tmpyear - 1900; + else + __err |= ios_base::failbit; + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + template + _OutIter + time_put<_CharT, _OutIter>:: + put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, + const _CharT* __beg, const _CharT* __end) const + { + const locale& __loc = __io._M_getloc(); + ctype<_CharT> const& __ctype = use_facet >(__loc); + for (; __beg != __end; ++__beg) + if (__ctype.narrow(*__beg, 0) != '%') + { + *__s = *__beg; + ++__s; + } + else if (++__beg != __end) + { + char __format; + char __mod = 0; + const char __c = __ctype.narrow(*__beg, 0); + if (__c != 'E' && __c != 'O') + __format = __c; + else if (++__beg != __end) + { + __mod = __c; + __format = __ctype.narrow(*__beg, 0); + } + else + break; + __s = this->do_put(__s, __io, __fill, __tm, __format, __mod); + } + else + break; + return __s; + } + template + _OutIter + time_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type, const tm* __tm, + char __format, char __mod) const + { + const locale& __loc = __io._M_getloc(); + ctype<_CharT> const& __ctype = use_facet >(__loc); + __timepunct<_CharT> const& __tp = use_facet<__timepunct<_CharT> >(__loc); + const size_t __maxlen = 128; + char_type __res[__maxlen]; + char_type __fmt[4]; + __fmt[0] = __ctype.widen('%'); + if (!__mod) + { + __fmt[1] = __format; + __fmt[2] = char_type(); + } + else + { + __fmt[1] = __mod; + __fmt[2] = __format; + __fmt[3] = char_type(); + } + __tp._M_put(__res, __maxlen, __fmt, __tm); + return std::__write(__s, __res, char_traits::length(__res)); + } + extern template class moneypunct; + extern template class moneypunct; + extern template class moneypunct_byname; + extern template class moneypunct_byname; + extern template class money_get; + extern template class money_put; + extern template class __timepunct; + extern template class time_put; + extern template class time_put_byname; + extern template class time_get; + extern template class time_get_byname; + extern template class messages; + extern template class messages_byname; + extern template + const moneypunct& + use_facet >(const locale&); + extern template + const moneypunct& + use_facet >(const locale&); + extern template + const money_put& + use_facet >(const locale&); + extern template + const money_get& + use_facet >(const locale&); + extern template + const __timepunct& + use_facet<__timepunct >(const locale&); + extern template + const time_put& + use_facet >(const locale&); + extern template + const time_get& + use_facet >(const locale&); + extern template + const messages& + use_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet<__timepunct >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template class moneypunct; + extern template class moneypunct; + extern template class moneypunct_byname; + extern template class moneypunct_byname; + extern template class money_get; + extern template class money_put; + extern template class __timepunct; + extern template class time_put; + extern template class time_put_byname; + extern template class time_get; + extern template class time_get_byname; + extern template class messages; + extern template class messages_byname; + extern template + const moneypunct& + use_facet >(const locale&); + extern template + const moneypunct& + use_facet >(const locale&); + extern template + const money_put& + use_facet >(const locale&); + extern template + const money_get& + use_facet >(const locale&); + extern template + const __timepunct& + use_facet<__timepunct >(const locale&); + extern template + const time_put& + use_facet >(const locale&); + extern template + const time_get& + use_facet >(const locale&); + extern template + const messages& + use_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet<__timepunct >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); +} +namespace boost +{ + class bad_lexical_cast : public std::bad_cast + { + public: + bad_lexical_cast() : + source(&typeid(void)), target(&typeid(void)) + { + } + bad_lexical_cast( + const std::type_info &source_type_arg, + const std::type_info &target_type_arg) : + source(&source_type_arg), target(&target_type_arg) + { + } + const std::type_info &source_type() const + { + return *source; + } + const std::type_info &target_type() const + { + return *target; + } + virtual const char *what() const throw() + { + return "bad lexical cast: " + "source type value could not be interpreted as target"; + } + virtual ~bad_lexical_cast() throw() + { + } + private: + const std::type_info *source; + const std::type_info *target; + }; + namespace detail + { + template + struct stream_char + { + typedef char type; + }; + template + struct stream_char< std::basic_string > + { + typedef CharT type; + }; + template<> + struct stream_char + { + typedef wchar_t type; + }; + template<> + struct stream_char + { + typedef wchar_t type; + }; + template<> + struct stream_char + { + typedef wchar_t type; + }; + template + struct widest_char + { + typedef TargetChar type; + }; + template<> + struct widest_char + { + typedef wchar_t type; + }; + } + namespace detail + { + template + struct deduce_char_traits + { + typedef std::char_traits type; + }; + template + struct deduce_char_traits< CharT + , std::basic_string + , Source + > + { + typedef Traits type; + }; + template + struct deduce_char_traits< CharT + , Target + , std::basic_string + > + { + typedef Traits type; + }; + template + struct deduce_char_traits< CharT + , std::basic_string + , std::basic_string + > + { + typedef Traits type; + }; + } + namespace detail + { + template< class CharT + , class Source + > + struct lcast_src_length + { + static const std::size_t value = 0; + static void check_coverage() {} + }; + template<> + struct lcast_src_length + { + static const std::size_t value = 1; + static void check_coverage() {} + }; + template<> + struct lcast_src_length + { + static const std::size_t value = 1; + static void check_coverage() {} + }; + template<> + struct lcast_src_length + { + static const std::size_t value = 1; + static void check_coverage() {} + }; + template<> + struct lcast_src_length + { + static const std::size_t value = 1; + static void check_coverage() {} + }; + template<> + struct lcast_src_length + { + static const std::size_t value = 1; + static void check_coverage() {} + }; + template<> + struct lcast_src_length + { + static const std::size_t value = 1; + static void check_coverage() {} + }; + template<> + struct lcast_src_length + { + static const std::size_t value = 1; + static void check_coverage() {} + }; + template<> + struct lcast_src_length + { + static const std::size_t value = 1; + static void check_coverage() {} + }; + template<> + struct lcast_src_length + { + static const std::size_t value = 1; + static void check_coverage() {} + }; + template + struct lcast_src_length< CharT, std::basic_string > + { + static const std::size_t value = 1; + static void check_coverage() {} + }; + template + struct lcast_src_length_integral + { + static const std::size_t value = std::numeric_limits::is_signed + std::numeric_limits::is_specialized + std::numeric_limits::digits10 * 2 + ; + }; + template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; + template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; + template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; + template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; + template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; + template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; + template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; + template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; + template + struct lcast_src_length_floating + { + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((std::numeric_limits::max_exponent10 <= 999999L && std::numeric_limits::min_exponent10 >= -999999L) == 0 ? false : true) >)> + boost_static_assert_typedef_401; + static const std::size_t value = 5 + lcast_precision::value + 6 + ; + }; + template<> + struct lcast_src_length + : lcast_src_length_floating + { + static void check_coverage() {} + }; + template<> + struct lcast_src_length + : lcast_src_length_floating + { + static void check_coverage() {} + }; + template<> + struct lcast_src_length + : lcast_src_length_floating + { + static void check_coverage() {} + }; + template<> + struct lcast_src_length + : lcast_src_length_floating + { + static void check_coverage() {} + }; + template<> + struct lcast_src_length + : lcast_src_length_floating + { + static void check_coverage() {} + }; + template<> + struct lcast_src_length + : lcast_src_length_floating + { + static void check_coverage() {} + }; + } + namespace detail + { + template struct lcast_char_constants; + template<> + struct lcast_char_constants + { + static const char zero = '0'; + static const char minus = '-'; + }; + template<> + struct lcast_char_constants + { + static const wchar_t zero = L'0'; + static const wchar_t minus = L'-'; + }; + } + namespace detail + { + struct lexical_streambuf_fake + { + }; + } + namespace detail + { + template + inline + typename make_unsigned::type lcast_to_unsigned(T value) + { + typedef typename make_unsigned::type result_type; + result_type uvalue = static_cast(value); + return value < 0 ? -uvalue : uvalue; + } + } + namespace detail + { + template + CharT* lcast_put_unsigned(T n, CharT* finish) + { + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((!std::numeric_limits::is_signed) == 0 ? false : true) >)> boost_static_assert_typedef_512; + std::locale loc; + typedef std::numpunct numpunct; + numpunct const& np = std::use_facet< numpunct >(loc); + std::string const& grouping = np.grouping(); + std::string::size_type const grouping_size = grouping.size(); + CharT thousands_sep = grouping_size ? np.thousands_sep() : 0; + std::string::size_type group = 0; + char last_grp_size = grouping[0] <= 0 ? 127 : grouping[0]; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((std::numeric_limits::digits10 < 127) == 0 ? false : true) >)> boost_static_assert_typedef_529; + char left = last_grp_size; + typedef typename Traits::int_type int_type; + CharT const czero = lcast_char_constants::zero; + int_type const zero = Traits::to_int_type(czero); + do + { + if(left == 0) + { + ++group; + if(group < grouping_size) + { + char const grp_size = grouping[group]; + last_grp_size = grp_size <= 0 ? 127 : grp_size; + } + left = last_grp_size; + --finish; + Traits::assign(*finish, thousands_sep); + } + --left; + --finish; + int_type const digit = static_cast(n % 10U); + Traits::assign(*finish, Traits::to_char_type(zero + digit)); + n /= 10; + } while(n); + return finish; + } + } + namespace detail + { + template + class lexical_stream + { + private: + typedef typename widest_char< + typename stream_char::type, + typename stream_char::type>::type char_type; + typedef Traits traits_type; + public: + lexical_stream(char_type* = 0, char_type* = 0) + { + stream.unsetf(std::ios::skipws); + lcast_set_precision(stream, static_cast(0), static_cast(0) ); + } + ~lexical_stream() + { + } + bool operator<<(const Source &input) + { + return !(stream << input).fail(); + } + template + bool operator>>(InputStreamable &output) + { + return !is_pointer::value && + stream >> output && + stream.get() == + traits_type::eof(); + } + bool operator>>(std::basic_string& output) + { + stream.str().swap(output); + return true; + } + template + bool operator>>(std::basic_string& out) + { + std::basic_string str(stream.str()); + out.assign(str.begin(), str.end()); + return true; + } + private: + std::basic_stringstream stream; + }; + } + namespace detail + { + template< class CharT + , class Base + , class Traits + > + class lexical_stream_limited_src : public Base + { + CharT* start; + CharT* finish; + private: + static void widen_and_assign(char*p, char ch) + { + Traits::assign(*p, ch); + } + static void widen_and_assign(wchar_t* p, char ch) + { + std::locale loc; + wchar_t w = std::use_facet< std::ctype >(loc).widen(ch); + Traits::assign(*p, w); + } + static void widen_and_assign(wchar_t* p, wchar_t ch) + { + Traits::assign(*p, ch); + } + static void widen_and_assign(char*, wchar_t ch); + template + bool lcast_put(const OutputStreamable& input) + { + this->setp(start, finish); + std::basic_ostream stream(static_cast(this)); + lcast_set_precision(stream, static_cast(0)); + bool const result = !(stream << input).fail(); + finish = this->pptr(); + return result; + } + lexical_stream_limited_src(lexical_stream_limited_src const&); + void operator=(lexical_stream_limited_src const&); + public: + lexical_stream_limited_src(CharT* sta, CharT* fin) + : start(sta) + , finish(fin) + {} + public: + template + bool operator<<(std::basic_string const& str) + { + start = const_cast(str.data()); + finish = start + str.length(); + return true; + } + bool operator<<(bool); + bool operator<<(char); + bool operator<<(wchar_t); + bool operator<<(CharT const*); + bool operator<<(short); + bool operator<<(int); + bool operator<<(long); + bool operator<<(unsigned short); + bool operator<<(unsigned int); + bool operator<<(unsigned long); + bool operator<<(boost::ulong_long_type); + bool operator<<(boost::long_long_type ); + bool operator<<(float); + bool operator<<(double); + bool operator<<(long double); + public: + template + bool operator>>(InputStreamable& output) + { + if(is_pointer::value) + return false; + this->setg(start, start, finish); + std::basic_istream stream(static_cast(this)); + stream.unsetf(std::ios::skipws); + lcast_set_precision(stream, static_cast(0)); + return stream >> output && + stream.get() == + Traits::eof(); + } + bool operator>>(CharT&); + template + bool operator>>(std::basic_string& str) + { + str.assign(start, finish); + return true; + } + }; + template + inline bool lexical_stream_limited_src::operator<<( + bool value) + { + typedef typename Traits::int_type int_type; + CharT const czero = lcast_char_constants::zero; + int_type const zero = Traits::to_int_type(czero); + Traits::assign(*start, Traits::to_char_type(zero + value)); + finish = start + 1; + return true; + } + template + inline bool lexical_stream_limited_src::operator<<( + char ch) + { + widen_and_assign(start, ch); + finish = start + 1; + return true; + } + template + inline bool lexical_stream_limited_src::operator<<( + wchar_t ch) + { + widen_and_assign(start, ch); + finish = start + 1; + return true; + } + template + inline bool lexical_stream_limited_src::operator<<( + short n) + { + start = lcast_put_unsigned(lcast_to_unsigned(n), finish); + if(n < 0) + { + --start; + CharT const minus = lcast_char_constants::minus; + Traits::assign(*start, minus); + } + return true; + } + template + inline bool lexical_stream_limited_src::operator<<( + int n) + { + start = lcast_put_unsigned(lcast_to_unsigned(n), finish); + if(n < 0) + { + --start; + CharT const minus = lcast_char_constants::minus; + Traits::assign(*start, minus); + } + return true; + } + template + inline bool lexical_stream_limited_src::operator<<( + long n) + { + start = lcast_put_unsigned(lcast_to_unsigned(n), finish); + if(n < 0) + { + --start; + CharT const minus = lcast_char_constants::minus; + Traits::assign(*start, minus); + } + return true; + } + template + inline bool lexical_stream_limited_src::operator<<( + boost::long_long_type n) + { + start = lcast_put_unsigned(lcast_to_unsigned(n), finish); + if(n < 0) + { + --start; + CharT const minus = lcast_char_constants::minus; + Traits::assign(*start, minus); + } + return true; + } + template + inline bool lexical_stream_limited_src::operator<<( + unsigned short n) + { + start = lcast_put_unsigned(n, finish); + return true; + } + template + inline bool lexical_stream_limited_src::operator<<( + unsigned int n) + { + start = lcast_put_unsigned(n, finish); + return true; + } + template + inline bool lexical_stream_limited_src::operator<<( + unsigned long n) + { + start = lcast_put_unsigned(n, finish); + return true; + } + template + inline bool lexical_stream_limited_src::operator<<( + boost::ulong_long_type n) + { + start = lcast_put_unsigned(n, finish); + return true; + } + template + inline bool lexical_stream_limited_src::operator<<( + float val) + { + return this->lcast_put(val); + } + template + inline bool lexical_stream_limited_src::operator<<( + double val) + { + return this->lcast_put(val); + } + template + inline bool lexical_stream_limited_src::operator<<( + long double val) + { + return this->lcast_put(val); + } + template + inline bool lexical_stream_limited_src::operator<<( + CharT const* str) + { + start = const_cast(str); + finish = start + Traits::length(str); + return true; + } + template + inline bool lexical_stream_limited_src::operator>>( + CharT& output) + { + bool const ok = (finish - start == 1); + if(ok) + Traits::assign(output, *start); + return ok; + } + } + namespace detail + { + template + struct lcast_streambuf_for_source + { + static const bool value = false; + }; + template<> + struct lcast_streambuf_for_source + { + static const bool value = true; + }; + template<> + struct lcast_streambuf_for_source + { + static const bool value = true; + }; + template<> + struct lcast_streambuf_for_source + { + static const bool value = true; + }; + } + namespace detail + { + template + struct lcast_streambuf_for_target + { + static const bool value = true; + }; + template<> + struct lcast_streambuf_for_target + { + static const bool value = false; + }; + template<> + struct lcast_streambuf_for_target + { + static const bool value = false; + }; + template + struct lcast_streambuf_for_target< + std::basic_string > + { + static const bool value = false; + }; + template + struct lcast_streambuf_for_target< + std::basic_string > + { + static const bool value = false; + }; + } + namespace detail + { + template + struct array_to_pointer_decay + { + typedef T type; + }; + template + struct array_to_pointer_decay + { + typedef const T * type; + }; + template< typename Target + , typename Source + , bool Unlimited + , typename CharT + > + Target lexical_cast( + typename boost::call_traits::param_type arg, + CharT* buf, std::size_t src_len) + { + typedef typename + deduce_char_traits::type traits; + typedef typename boost::mpl::if_c< + lcast_streambuf_for_target::value || + lcast_streambuf_for_source::value + , std::basic_streambuf + , lexical_streambuf_fake + >::type base; + typename boost::mpl::if_c< + Unlimited + , detail::lexical_stream + , detail::lexical_stream_limited_src + >::type interpreter(buf, buf + src_len); + Target result; + if(!(interpreter << arg && interpreter >> result)) + throw_exception(bad_lexical_cast(typeid(Source), typeid(Target))); + return result; + } + } + template + inline Target lexical_cast(const Source &arg) + { + typedef typename detail::array_to_pointer_decay::type src; + typedef typename detail::widest_char< + typename detail::stream_char::type + , typename detail::stream_char::type + >::type char_type; + typedef detail::lcast_src_length lcast_src_length; + std::size_t const src_len = lcast_src_length::value; + char_type buf[src_len + 1]; + lcast_src_length::check_coverage(); + return detail::lexical_cast(arg, buf, src_len); + } +} +namespace boost { namespace python { +namespace detail +{ + template + PyObject* convert_result(T const& x) + { + return converter::arg_to_python(x).release(); + } + template struct operator_l + { + template struct apply; + }; + template struct operator_r + { + template struct apply; + }; + template struct operator_1 + { + template struct apply; + }; + template + struct operator_l_inner + : operator_l::template apply + {}; + template + struct operator_r_inner + : operator_r::template apply + {}; + template + struct operator_1_inner + : operator_1::template apply + {}; + template + struct binary_op : operator_l + { + template + struct apply : operator_l_inner + { + }; + }; + template + struct binary_op_l : operator_l + { + template + struct apply : operator_l_inner + { + }; + }; + template + struct binary_op_r : operator_r + { + template + struct apply : operator_r_inner + { + }; + }; + template + struct unary_op : operator_1 + { + template + struct apply : operator_1_inner + { + }; + }; + template + struct operator_ + : def_visitor > + { + private: + template + void visit(ClassT& cl) const + { + typedef typename mpl::eval_if< + is_same + , mpl::if_< + is_same + , binary_op + , binary_op_l< + id + , typename unwrap_other::type + > + > + , mpl::if_< + is_same + , unary_op + , binary_op_r< + id + , typename unwrap_other::type + > + > + >::type generator; + cl.def( + generator::name() + , &generator::template apply< + typename ClassT::wrapped_type + >::execute + ); + } + friend class python::def_visitor_access; + }; +} +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l + r); } }; static char const* name() { return "__" "add" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l + r); } }; static char const* name() { return "__" "radd" "__"; } }; } namespace self_ns { template inline detail::operator_ operator +(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l - r); } }; static char const* name() { return "__" "sub" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l - r); } }; static char const* name() { return "__" "rsub" "__"; } }; } namespace self_ns { template inline detail::operator_ operator -(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l * r); } }; static char const* name() { return "__" "mul" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l * r); } }; static char const* name() { return "__" "rmul" "__"; } }; } namespace self_ns { template inline detail::operator_ operator *(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l / r); } }; static char const* name() { return "__" "div" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l / r); } }; static char const* name() { return "__" "rdiv" "__"; } }; } namespace self_ns { template inline detail::operator_ operator /(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l % r); } }; static char const* name() { return "__" "mod" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l % r); } }; static char const* name() { return "__" "rmod" "__"; } }; } namespace self_ns { template inline detail::operator_ operator %(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l << r); } }; static char const* name() { return "__" "lshift" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l << r); } }; static char const* name() { return "__" "rlshift" "__"; } }; } namespace self_ns { template inline detail::operator_ operator <<(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l >> r); } }; static char const* name() { return "__" "rshift" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l >> r); } }; static char const* name() { return "__" "rrshift" "__"; } }; } namespace self_ns { template inline detail::operator_ operator >>(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l & r); } }; static char const* name() { return "__" "and" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l & r); } }; static char const* name() { return "__" "rand" "__"; } }; } namespace self_ns { template inline detail::operator_ operator &(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l ^ r); } }; static char const* name() { return "__" "xor" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l ^ r); } }; static char const* name() { return "__" "rxor" "__"; } }; } namespace self_ns { template inline detail::operator_ operator ^(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l | r); } }; static char const* name() { return "__" "or" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l | r); } }; static char const* name() { return "__" "ror" "__"; } }; } namespace self_ns { template inline detail::operator_ operator |(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l > r); } }; static char const* name() { return "__" "gt" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l > r); } }; static char const* name() { return "__" "lt" "__"; } }; } namespace self_ns { template inline detail::operator_ operator >(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l >= r); } }; static char const* name() { return "__" "ge" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l >= r); } }; static char const* name() { return "__" "le" "__"; } }; } namespace self_ns { template inline detail::operator_ operator >=(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l < r); } }; static char const* name() { return "__" "lt" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l < r); } }; static char const* name() { return "__" "gt" "__"; } }; } namespace self_ns { template inline detail::operator_ operator <(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l <= r); } }; static char const* name() { return "__" "le" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l <= r); } }; static char const* name() { return "__" "ge" "__"; } }; } namespace self_ns { template inline detail::operator_ operator <=(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l == r); } }; static char const* name() { return "__" "eq" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l == r); } }; static char const* name() { return "__" "eq" "__"; } }; } namespace self_ns { template inline detail::operator_ operator ==(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(l != r); } }; static char const* name() { return "__" "ne" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(l != r); } }; static char const* name() { return "__" "ne" "__"; } }; } namespace self_ns { template inline detail::operator_ operator !=(L const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(lhs& l, rhs const& r) { return detail::convert_result(pow(l,r)); } }; static char const* name() { return "__" "pow" "__"; } }; template <> struct operator_r { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(rhs& r, lhs const& l) { return detail::convert_result(pow(l,r)); } }; static char const* name() { return "__" "rpow" "__"; } }; } +namespace self_ns +{ + template + inline detail::operator_ + pow(L const&, R const&) + { + return detail::operator_(); + } +} +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(back_reference l, rhs const& r) { l.get() += r; return python::incref(l.source().ptr()); } }; static char const* name() { return "__" "iadd" "__"; } }; } namespace self_ns { template inline detail::operator_ operator +=(self_t const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(back_reference l, rhs const& r) { l.get() -= r; return python::incref(l.source().ptr()); } }; static char const* name() { return "__" "isub" "__"; } }; } namespace self_ns { template inline detail::operator_ operator -=(self_t const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(back_reference l, rhs const& r) { l.get() *= r; return python::incref(l.source().ptr()); } }; static char const* name() { return "__" "imul" "__"; } }; } namespace self_ns { template inline detail::operator_ operator *=(self_t const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(back_reference l, rhs const& r) { l.get() /= r; return python::incref(l.source().ptr()); } }; static char const* name() { return "__" "idiv" "__"; } }; } namespace self_ns { template inline detail::operator_ operator /=(self_t const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(back_reference l, rhs const& r) { l.get() %= r; return python::incref(l.source().ptr()); } }; static char const* name() { return "__" "imod" "__"; } }; } namespace self_ns { template inline detail::operator_ operator %=(self_t const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(back_reference l, rhs const& r) { l.get() <<= r; return python::incref(l.source().ptr()); } }; static char const* name() { return "__" "ilshift" "__"; } }; } namespace self_ns { template inline detail::operator_ operator <<=(self_t const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(back_reference l, rhs const& r) { l.get() >>= r; return python::incref(l.source().ptr()); } }; static char const* name() { return "__" "irshift" "__"; } }; } namespace self_ns { template inline detail::operator_ operator >>=(self_t const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(back_reference l, rhs const& r) { l.get() &= r; return python::incref(l.source().ptr()); } }; static char const* name() { return "__" "iand" "__"; } }; } namespace self_ns { template inline detail::operator_ operator &=(self_t const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(back_reference l, rhs const& r) { l.get() ^= r; return python::incref(l.source().ptr()); } }; static char const* name() { return "__" "ixor" "__"; } }; } namespace self_ns { template inline detail::operator_ operator ^=(self_t const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_l { template struct apply { typedef typename unwrap_wrapper_::type lhs; typedef typename unwrap_wrapper_::type rhs; static PyObject* execute(back_reference l, rhs const& r) { l.get() |= r; return python::incref(l.source().ptr()); } }; static char const* name() { return "__" "ior" "__"; } }; } namespace self_ns { template inline detail::operator_ operator |=(self_t const&, R const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_1 { template struct apply { typedef typename unwrap_wrapper_::type self_t; static PyObject* execute(self_t& x) { return detail::convert_result(-(x)); } }; static char const* name() { return "__" "neg" "__"; } }; } namespace self_ns { inline detail::operator_ operator-(self_t const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_1 { template struct apply { typedef typename unwrap_wrapper_::type self_t; static PyObject* execute(self_t& x) { return detail::convert_result(+(x)); } }; static char const* name() { return "__" "pos" "__"; } }; } namespace self_ns { inline detail::operator_ operator+(self_t const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_1 { template struct apply { typedef typename unwrap_wrapper_::type self_t; static PyObject* execute(self_t& x) { return detail::convert_result(abs(x)); } }; static char const* name() { return "__" "abs" "__"; } }; } namespace self_ns { inline detail::operator_ abs(self_t const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_1 { template struct apply { typedef typename unwrap_wrapper_::type self_t; static PyObject* execute(self_t& x) { return detail::convert_result(~(x)); } }; static char const* name() { return "__" "invert" "__"; } }; } namespace self_ns { inline detail::operator_ operator~(self_t const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_1 { template struct apply { typedef typename unwrap_wrapper_::type self_t; static PyObject* execute(self_t& x) { return detail::convert_result(!!(x)); } }; static char const* name() { return "__" "nonzero" "__"; } }; } namespace self_ns { inline detail::operator_ operator!(self_t const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_1 { template struct apply { typedef typename unwrap_wrapper_::type self_t; static PyObject* execute(self_t& x) { return detail::convert_result(long(x)); } }; static char const* name() { return "__" "int" "__"; } }; } namespace self_ns { inline detail::operator_ int_(self_t const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_1 { template struct apply { typedef typename unwrap_wrapper_::type self_t; static PyObject* execute(self_t& x) { return detail::convert_result(PyLong_FromLong(x)); } }; static char const* name() { return "__" "long" "__"; } }; } namespace self_ns { inline detail::operator_ long_(self_t const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_1 { template struct apply { typedef typename unwrap_wrapper_::type self_t; static PyObject* execute(self_t& x) { return detail::convert_result(double(x)); } }; static char const* name() { return "__" "float" "__"; } }; } namespace self_ns { inline detail::operator_ float_(self_t const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_1 { template struct apply { typedef typename unwrap_wrapper_::type self_t; static PyObject* execute(self_t& x) { return detail::convert_result(std::complex(x)); } }; static char const* name() { return "__" "complex" "__"; } }; } namespace self_ns { inline detail::operator_ complex_(self_t const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_1 { template struct apply { typedef typename unwrap_wrapper_::type self_t; static PyObject* execute(self_t& x) { return detail::convert_result(lexical_cast(x)); } }; static char const* name() { return "__" "str" "__"; } }; } namespace self_ns { inline detail::operator_ str(self_t const&) { return detail::operator_(); } } +namespace detail { template <> struct operator_1 { template struct apply { typedef typename unwrap_wrapper_::type self_t; static PyObject* execute(self_t& x) { return detail::convert_result(lexical_cast(x)); } }; static char const* name() { return "__" "repr" "__"; } }; } namespace self_ns { inline detail::operator_ repr(self_t const&) { return detail::operator_(); } } +}} + +namespace boost { namespace python { +namespace detail +{ + struct overloads_base + { + overloads_base(char const* doc_) + : m_doc(doc_) {} + overloads_base(char const* doc_, detail::keyword_range const& kw) + : m_doc(doc_), m_keywords(kw) {} + char const* doc_string() const + { + return m_doc; + } + detail::keyword_range const& keywords() const + { + return m_keywords; + } + private: + char const* m_doc; + detail::keyword_range m_keywords; + }; + template + struct overloads_proxy + : public overloads_base + { + typedef typename OverloadsT::non_void_return_type non_void_return_type; + typedef typename OverloadsT::void_return_type void_return_type; + overloads_proxy( + CallPoliciesT const& policies_ + , char const* doc + , keyword_range const& kw + ) + : overloads_base(doc, kw) + , policies(policies_) + {} + CallPoliciesT + call_policies() const + { + return policies; + } + CallPoliciesT policies; + }; + template + struct overloads_common + : public overloads_base + { + overloads_common(char const* doc) + : overloads_base(doc) {} + overloads_common(char const* doc, keyword_range const& kw) + : overloads_base(doc, kw) {} + default_call_policies + call_policies() const + { + return default_call_policies(); + } + template + overloads_proxy + operator[](CallPoliciesT const& policies) const + { + return overloads_proxy( + policies, this->doc_string(), this->keywords()); + } + }; +}}} +namespace boost { +template< typename T > struct has_nothrow_destructor : ::boost::integral_constant::value> { }; +} +namespace boost { +template< typename T > struct has_virtual_destructor : ::boost::integral_constant { }; +} +namespace boost { + namespace detail{ + template + struct is_base_of_imp + { + typedef typename remove_cv::type ncvB; + typedef typename remove_cv::type ncvD; + static const bool value = (::boost::type_traits::ice_or< (::boost::detail::is_base_and_derived_impl::value), (::boost::type_traits::ice_and< ::boost::is_same::value, ::boost::is_class::value>::value)>::value) + ; + }; + } +template< typename Base, typename Derived > struct is_base_of : ::boost::integral_constant::value)> { }; +template< typename Base, typename Derived > struct is_base_of< Base&,Derived > : ::boost::integral_constant { }; +template< typename Base, typename Derived > struct is_base_of< Base,Derived& > : ::boost::integral_constant { }; +template< typename Base, typename Derived > struct is_base_of< Base&,Derived& > : ::boost::integral_constant { }; +} +namespace boost { +template< typename T > struct is_floating_point : ::boost::integral_constant { }; +template<> struct is_floating_point< float > : ::boost::integral_constant { }; template<> struct is_floating_point< float const > : ::boost::integral_constant { }; template<> struct is_floating_point< float volatile > : ::boost::integral_constant { }; template<> struct is_floating_point< float const volatile > : ::boost::integral_constant { }; +template<> struct is_floating_point< double > : ::boost::integral_constant { }; template<> struct is_floating_point< double const > : ::boost::integral_constant { }; template<> struct is_floating_point< double volatile > : ::boost::integral_constant { }; template<> struct is_floating_point< double const volatile > : ::boost::integral_constant { }; +template<> struct is_floating_point< long double > : ::boost::integral_constant { }; template<> struct is_floating_point< long double const > : ::boost::integral_constant { }; template<> struct is_floating_point< long double volatile > : ::boost::integral_constant { }; template<> struct is_floating_point< long double const volatile > : ::boost::integral_constant { }; +} +namespace boost { +namespace detail{ +template +struct is_member_object_pointer_impl +{ + static const bool value = (::boost::type_traits::ice_and< ::boost::is_member_pointer::value, ::boost::type_traits::ice_not< ::boost::is_member_function_pointer::value >::value >::value ) + ; +}; +} +template< typename T > struct is_member_object_pointer : ::boost::integral_constant::value> { }; +} + +namespace boost { +namespace detail{ +template +struct rank_imp +{ + static const std::size_t value = N; +}; +template +struct rank_imp +{ + static const std::size_t value = (::boost::detail::rank_imp::value); +}; +template +struct rank_imp +{ + static const std::size_t value = (::boost::detail::rank_imp::value); +}; +template +struct rank_imp +{ + static const std::size_t value = (::boost::detail::rank_imp::value); +}; +template +struct rank_imp +{ + static const std::size_t value = (::boost::detail::rank_imp::value); +}; +template +struct rank_imp +{ + static const std::size_t value = (::boost::detail::rank_imp::value); +}; +template +struct rank_imp +{ + static const std::size_t value = (::boost::detail::rank_imp::value); +}; +template +struct rank_imp +{ + static const std::size_t value = (::boost::detail::rank_imp::value); +}; +template +struct rank_imp +{ + static const std::size_t value = (::boost::detail::rank_imp::value); +}; +} +template< typename T > struct rank : ::boost::integral_constant::value)> { }; +} + +namespace boost { +namespace detail{ +template +struct extent_imp +{ + static const std::size_t value = 0; +}; +template +struct extent_imp +{ + static const std::size_t value = (::boost::detail::extent_imp::value); +}; +template +struct extent_imp +{ + static const std::size_t value = (::boost::detail::extent_imp::value); +}; +template +struct extent_imp +{ + static const std::size_t value = (::boost::detail::extent_imp::value); +}; +template +struct extent_imp +{ + static const std::size_t value = (::boost::detail::extent_imp::value); +}; +template +struct extent_imp +{ + static const std::size_t value = R; +}; +template +struct extent_imp +{ + static const std::size_t value = R; +}; +template +struct extent_imp +{ + static const std::size_t value = R; +}; +template +struct extent_imp +{ + static const std::size_t value = R; +}; +template +struct extent_imp +{ + static const std::size_t value = (::boost::detail::extent_imp::value); +}; +template +struct extent_imp +{ + static const std::size_t value = (::boost::detail::extent_imp::value); +}; +template +struct extent_imp +{ + static const std::size_t value = (::boost::detail::extent_imp::value); +}; +template +struct extent_imp +{ + static const std::size_t value = (::boost::detail::extent_imp::value); +}; +template +struct extent_imp +{ + static const std::size_t value = 0; +}; +template +struct extent_imp +{ + static const std::size_t value = 0; +}; +template +struct extent_imp +{ + static const std::size_t value = 0; +}; +template +struct extent_imp +{ + static const std::size_t value = 0; +}; +} +template +struct extent + : public ::boost::integral_constant::value> +{ + +}; +} + +namespace boost { +template< typename T > struct remove_extent { typedef T type; }; +template< typename T, std::size_t N > struct remove_extent { typedef T type; }; +template< typename T, std::size_t N > struct remove_extent { typedef T const type; }; +template< typename T, std::size_t N > struct remove_extent { typedef T volatile type; }; +template< typename T, std::size_t N > struct remove_extent { typedef T const volatile type; }; +template< typename T > struct remove_extent { typedef T type; }; +template< typename T > struct remove_extent { typedef T const type; }; +template< typename T > struct remove_extent { typedef T volatile type; }; +template< typename T > struct remove_extent { typedef T const volatile type; }; +} + +namespace boost { +template< typename T > struct remove_all_extents { typedef T type; }; +template< typename T, std::size_t N > struct remove_all_extents { typedef typename boost::remove_all_extents::type type; }; +template< typename T, std::size_t N > struct remove_all_extents { typedef typename boost::remove_all_extents::type type; }; +template< typename T, std::size_t N > struct remove_all_extents { typedef typename boost::remove_all_extents::type type; }; +template< typename T, std::size_t N > struct remove_all_extents { typedef typename boost::remove_all_extents::type type; }; +template< typename T > struct remove_all_extents { typedef typename boost::remove_all_extents::type type; }; +template< typename T > struct remove_all_extents { typedef typename boost::remove_all_extents::type type; }; +template< typename T > struct remove_all_extents { typedef typename boost::remove_all_extents::type type; }; +template< typename T > struct remove_all_extents { typedef typename boost::remove_all_extents::type type; }; +} +namespace boost { +namespace type_traits { namespace detail { +template +struct floating_point_promotion +{ + typedef T type; +}; +template<> +struct floating_point_promotion +{ + typedef double type; +}; +template<> +struct floating_point_promotion +{ + typedef double const type; +}; +template<> +struct floating_point_promotion +{ + typedef double volatile type; +}; +template<> +struct floating_point_promotion +{ + typedef double const volatile type; +}; +} } +template< typename T > struct floating_point_promotion { typedef typename boost::type_traits::detail::floating_point_promotion::type type; }; +} +namespace boost { +namespace type_traits { namespace detail { +template struct need_promotion : boost::is_enum {}; +template<> struct need_promotion : true_type {}; +template<> struct need_promotion : true_type {}; +template<> struct need_promotion : true_type {}; +template<> struct need_promotion : true_type {}; +template<> struct need_promotion : true_type {}; +template<> struct need_promotion : integral_constant {}; +template<> struct need_promotion : integral_constant {}; +template<> struct need_promotion : true_type {}; +template<> struct need_promotion : true_type {}; +template struct promote_from_index; +template<> struct promote_from_index<1,0,0> { typedef int type; }; template<> struct promote_from_index<1,0,1> { typedef int volatile type; }; template<> struct promote_from_index<1,1,0> { typedef int const type; }; template<> struct promote_from_index<1,1,1> { typedef int const volatile type; }; +template<> struct promote_from_index<2,0,0> { typedef unsigned int type; }; template<> struct promote_from_index<2,0,1> { typedef unsigned int volatile type; }; template<> struct promote_from_index<2,1,0> { typedef unsigned int const type; }; template<> struct promote_from_index<2,1,1> { typedef unsigned int const volatile type; }; +template<> struct promote_from_index<3,0,0> { typedef long type; }; template<> struct promote_from_index<3,0,1> { typedef long volatile type; }; template<> struct promote_from_index<3,1,0> { typedef long const type; }; template<> struct promote_from_index<3,1,1> { typedef long const volatile type; }; +template<> struct promote_from_index<4,0,0> { typedef unsigned long type; }; template<> struct promote_from_index<4,0,1> { typedef unsigned long volatile type; }; template<> struct promote_from_index<4,1,0> { typedef unsigned long const type; }; template<> struct promote_from_index<4,1,1> { typedef unsigned long const volatile type; }; +template<> struct promote_from_index<5,0,0> { typedef boost::long_long_type type; }; template<> struct promote_from_index<5,0,1> { typedef boost::long_long_type volatile type; }; template<> struct promote_from_index<5,1,0> { typedef boost::long_long_type const type; }; template<> struct promote_from_index<5,1,1> { typedef boost::long_long_type const volatile type; }; +template<> struct promote_from_index<6,0,0> { typedef boost::ulong_long_type type; }; template<> struct promote_from_index<6,0,1> { typedef boost::ulong_long_type volatile type; }; template<> struct promote_from_index<6,1,0> { typedef boost::ulong_long_type const type; }; template<> struct promote_from_index<6,1,1> { typedef boost::ulong_long_type const volatile type; }; +template +struct sized_type_for_promotion +{ + typedef char (&type)[N]; +}; +sized_type_for_promotion<1>::type promoted_index_tester(int); +sized_type_for_promotion<2>::type promoted_index_tester(unsigned int); +sized_type_for_promotion<3>::type promoted_index_tester(long); +sized_type_for_promotion<4>::type promoted_index_tester(unsigned long); +sized_type_for_promotion<5>::type promoted_index_tester(boost::long_long_type); +sized_type_for_promotion<6>::type promoted_index_tester(boost::ulong_long_type); +template +struct promoted_index +{ + static T testee; + static const int value = sizeof(promoted_index_tester(+testee)); +}; +template +struct integral_promotion_impl +{ + typedef typename promote_from_index< + (boost::type_traits::detail::promoted_index::value) + , (boost::is_const::value) + , (boost::is_volatile::value) + >::type type; +}; +template +struct integral_promotion + : boost::mpl::eval_if< + need_promotion::type> + , integral_promotion_impl + , boost::mpl::identity + > +{ +}; +} } +template< typename T > struct integral_promotion { typedef typename boost::type_traits::detail::integral_promotion::type type; }; +} +namespace boost { +namespace detail { +template +struct promote_impl + : integral_promotion< + typename floating_point_promotion::type + > +{ +}; +} +template< typename T > struct promote { typedef typename boost::detail::promote_impl::type type; }; +} +namespace boost { +namespace detail { +template +struct make_signed_imp +{ + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_enum::value>::value)) == 0 ? false : true) >)> + boost_static_assert_typedef_39; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((::boost::type_traits::ice_not< ::boost::is_same< typename remove_cv::type, bool>::value>::value)) == 0 ? false : true) >)> + boost_static_assert_typedef_43; + typedef typename remove_cv::type t_no_cv; + typedef typename mpl::if_c< + (::boost::type_traits::ice_and< + ::boost::is_signed::value, + ::boost::is_integral::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value >::value), + T, + typename mpl::if_c< + (::boost::type_traits::ice_and< + ::boost::is_integral::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value> + ::value), + typename mpl::if_< + is_same, + signed char, + typename mpl::if_< + is_same, + signed short, + typename mpl::if_< + is_same, + int, + typename mpl::if_< + is_same, + long, + boost::long_long_type + >::type + >::type + >::type + >::type, + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned char), + signed char, + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned short), + signed short, + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned int), + int, + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned long), + long, + boost::long_long_type + >::type + >::type + >::type + >::type + >::type + >::type base_integer_type; + typedef typename mpl::if_< + is_const, + typename add_const::type, + base_integer_type + >::type const_base_integer_type; + typedef typename mpl::if_< + is_volatile, + typename add_volatile::type, + const_base_integer_type + >::type type; +}; +} +template< typename T > struct make_signed { typedef typename boost::detail::make_signed_imp::type type; }; +} +namespace boost +{ + template< class T > + struct decay + { + private: + typedef typename remove_reference::type Ty; + public: + typedef typename mpl::eval_if< + is_array, + mpl::identity::type*>, + typename mpl::eval_if< + is_function, + add_pointer, + mpl::identity + > + >::type type; + }; +} +namespace boost { +namespace detail{ +struct is_convertible_from_tester +{ + template + is_convertible_from_tester(const std::complex&); +}; +} +template< typename T > struct is_complex : ::boost::integral_constant::value)> { }; +} +namespace boost { namespace python { +struct module; +namespace objects +{ + struct class_base; +} +namespace detail +{ + template + static void name_space_def( + NameSpaceT& name_space + , char const* name + , Func f + , keyword_range const& kw + , CallPolicies const& policies + , char const* doc + , objects::class_base* + ) + { + typedef typename NameSpaceT::wrapped_type wrapped_type; + objects::add_to_namespace( + name_space, name, + detail::make_keyword_range_function( + f, policies, kw, get_signature(f, (wrapped_type*)0)) + , doc + ); + } + template + static void name_space_def( + object& name_space + , char const* name + , Func f + , keyword_range const& kw + , CallPolicies const& policies + , char const* doc + , ... + ) + { + scope within(name_space); + detail::scope_setattr_doc( + name + , detail::make_keyword_range_function(f, policies, kw) + , doc); + } + template + static void name_space_def( + NameSpaceT& name_space + , char const* name + , Func f + , keyword_range const& kw + , CallPolicies const& policies + , char const* doc + , module* + ) + { + name_space.def(name, f, policies, doc); + } + template + struct define_stub_function {}; +template <> +struct define_stub_function<0> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_0 + , kw + , policies + , doc + , &name_space); + } +}; +template <> +struct define_stub_function<1> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_1 + , kw + , policies + , doc + , &name_space); + } +}; +template <> +struct define_stub_function<2> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_2 + , kw + , policies + , doc + , &name_space); + } +}; +template <> +struct define_stub_function<3> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_3 + , kw + , policies + , doc + , &name_space); + } +}; +template <> +struct define_stub_function<4> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_4 + , kw + , policies + , doc + , &name_space); + } +}; +template <> +struct define_stub_function<5> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_5 + , kw + , policies + , doc + , &name_space); + } +}; +template <> +struct define_stub_function<6> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_6 + , kw + , policies + , doc + , &name_space); + } +}; +template <> +struct define_stub_function<7> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_7 + , kw + , policies + , doc + , &name_space); + } +}; +template <> +struct define_stub_function<8> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_8 + , kw + , policies + , doc + , &name_space); + } +}; +template <> +struct define_stub_function<9> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_9 + , kw + , policies + , doc + , &name_space); + } +}; +template <> +struct define_stub_function<10> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_10 + , kw + , policies + , doc + , &name_space); + } +}; +template <> +struct define_stub_function<11> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_11 + , kw + , policies + , doc + , &name_space); + } +}; +template <> +struct define_stub_function<12> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_12 + , kw + , policies + , doc + , &name_space); + } +}; +template <> +struct define_stub_function<13> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_13 + , kw + , policies + , doc + , &name_space); + } +}; +template <> +struct define_stub_function<14> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_14 + , kw + , policies + , doc + , &name_space); + } +}; +template <> +struct define_stub_function<15> { + template + static void define( + char const* name + , StubsT const& + , keyword_range const& kw + , CallPolicies const& policies + , NameSpaceT& name_space + , char const* doc) + { + detail::name_space_def( + name_space + , name + , &StubsT::func_15 + , kw + , policies + , doc + , &name_space); + } +}; + template + struct define_with_defaults_helper { + template + static void + def( + char const* name, + StubsT stubs, + keyword_range kw, + CallPolicies const& policies, + NameSpaceT& name_space, + char const* doc) + { + define_stub_function::define(name, stubs, kw, policies, name_space, doc); + if (kw.second > kw.first) + --kw.second; + define_with_defaults_helper::def(name, stubs, kw, policies, name_space, doc); + } + }; + template <> + struct define_with_defaults_helper<0> { + template + static void + def( + char const* name, + StubsT stubs, + keyword_range const& kw, + CallPolicies const& policies, + NameSpaceT& name_space, + char const* doc) + { + define_stub_function<0>::define(name, stubs, kw, policies, name_space, doc); + } + }; + template + inline void + define_with_defaults( + char const* name, + OverloadsT const& overloads, + NameSpaceT& name_space, + SigT const&) + { + typedef typename mpl::front::type return_type; + typedef typename OverloadsT::void_return_type void_return_type; + typedef typename OverloadsT::non_void_return_type non_void_return_type; + typedef typename mpl::if_c< + boost::is_same::value + , void_return_type + , non_void_return_type + >::type stubs_type; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((stubs_type::max_args) <= mpl::size::value) == 0 ? false : true) >)> + boost_static_assert_typedef_247; + typedef typename stubs_type::template gen gen_type; + define_with_defaults_helper::def( + name + , gen_type() + , overloads.keywords() + , overloads.call_policies() + , name_space + , overloads.doc_string()); + } +} +}} +namespace boost { namespace python { namespace detail { +template +struct nullary_function_adaptor +{ + nullary_function_adaptor(NullaryFunction fn) + : m_fn(fn) + {} + void operator()() const { m_fn(); } + template < class A0> void operator()( A0 const& ) const { m_fn(); } + template < class A0 , class A1> void operator()( A0 const& , A1 const& ) const { m_fn(); } + template < class A0 , class A1 , class A2> void operator()( A0 const& , A1 const& , A2 const& ) const { m_fn(); } + template < class A0 , class A1 , class A2 , class A3> void operator()( A0 const& , A1 const& , A2 const& , A3 const& ) const { m_fn(); } + template < class A0 , class A1 , class A2 , class A3 , class A4> void operator()( A0 const& , A1 const& , A2 const& , A3 const& , A4 const& ) const { m_fn(); } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5> void operator()( A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& ) const { m_fn(); } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6> void operator()( A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& ) const { m_fn(); } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7> void operator()( A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& ) const { m_fn(); } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8> void operator()( A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& ) const { m_fn(); } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9> void operator()( A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& ) const { m_fn(); } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10> void operator()( A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& ) const { m_fn(); } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11> void operator()( A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& ) const { m_fn(); } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12> void operator()( A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& ) const { m_fn(); } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13> void operator()( A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const& ) const { m_fn(); } + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12 , class A13 , class A14> void operator()( A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const& , A14 const& ) const { m_fn(); } + private: + NullaryFunction m_fn; +}; +}}} +namespace boost { namespace python { +namespace detail +{ + void pure_virtual_called(); + template + struct replace_front2 + { + typedef typename mpl::push_front< + typename mpl::push_front< + typename mpl::pop_front< + typename mpl::pop_front< + S + >::type + >::type + , T2 + >::type + , T1 + >::type type; + }; + template + typename replace_front2::type + error_signature(S ) + { + typedef typename replace_front2::type r; + return r(); + } + template + struct pure_virtual_visitor + : def_visitor > + { + pure_virtual_visitor(PointerToMemberFunction pmf) + : m_pmf(pmf) + {} + private: + friend class python::def_visitor_access; + template + void visit(C_& c, char const* name, Options& options) const + { + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((!Options::has_default_implementation) == 0 ? false : true) >)> boost_static_assert_typedef_80; + c.def( + name + , m_pmf + , options.doc() + , options.keywords() + , options.policies() + ); + typedef typename C_::metadata::held_type held_type; + c.def( + name + , make_function( + detail::nullary_function_adaptor(pure_virtual_called) + , default_call_policies() + , detail::error_signature(detail::get_signature(m_pmf)) + ) + ); + } + private: + PointerToMemberFunction m_pmf; + }; +} +template +detail::pure_virtual_visitor +pure_virtual(PointerToMemberFunction pmf) +{ + return detail::pure_virtual_visitor(pmf); +} +}} +namespace boost { namespace python { +template +void register_ptr_to_python() +{ + typedef typename boost::python::pointee

::type X; + objects::class_value_wrapper< + P + , objects::make_ptr_instance< + X + , objects::pointer_holder + > + >(); +} +}} + +namespace boost { namespace python { +namespace detail +{ + template + struct return_arg_pos_argument_must_be_positive + {} + ; + struct return_none + { + template struct apply + { + struct type + { + static bool convertible() + { + return true; + } + PyObject *operator()( typename value_arg::type ) const + { + return none(); + } + PyTypeObject const *get_pytype() const { return converter::expected_pytype_for_arg::get_pytype() ; } + }; + }; + }; +} +template < + std::size_t arg_pos=1 + , class Base = default_call_policies +> +struct return_arg : Base +{ + private: + static const bool legal = arg_pos > 0; + public: + typedef typename mpl::if_c< + legal + , detail::return_none + , detail::return_arg_pos_argument_must_be_positive + >::type result_converter; + template + static PyObject* postcall(ArgumentPackage const& args, PyObject* result) + { + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((arg_pos > 0) == 0 ? false : true) >)> boost_static_assert_typedef_85; + result = Base::postcall(args,result); + if (!result) + return 0; + if ( --((PyObject*)(result))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(result)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(result)))); + return incref( detail::get(mpl::int_(),args) ); + } + template + struct extract_return_type : mpl::at_c + { + }; +}; +template < + class Base = default_call_policies + > +struct return_self + : return_arg<1,Base> +{}; +}} +namespace boost { namespace python { +namespace detail +{ + template + static void opaque_pointee(Pointee const volatile*) + { + force_instantiate(opaque::instance); + } +} +struct return_opaque_pointer +{ + template + struct apply + { + struct RETURN_OPAQUE_POINTER_EXPECTS_A_POINTER_TYPE; typedef struct RETURN_OPAQUE_POINTER_EXPECTS_A_POINTER_TYPE34 : boost::mpl::assert_ { static boost::mpl::failed ************ (RETURN_OPAQUE_POINTER_EXPECTS_A_POINTER_TYPE::************ assert_arg()) (R) { return 0; } } mpl_assert_arg34; enum { mpl_assertion_in_line_34 = sizeof( boost::mpl::assertion_failed<(is_pointer::value)>( mpl_assert_arg34::assert_arg() ) ) }; + struct type : + boost::python::to_python_value< + typename detail::value_arg::type + > + { + type() { detail::opaque_pointee(R()); } + }; + }; +}; +}} + +namespace boost { namespace python { +namespace detail +{ + template + struct raw_dispatcher + { + raw_dispatcher(F f) : f(f) {} + PyObject* operator()(PyObject* args, PyObject* keywords) + { + return incref( + object( + f( + tuple(borrowed_reference(args)) + , keywords ? dict(borrowed_reference(keywords)) : dict() + ) + ).ptr() + ); + } + private: + F f; + }; + object make_raw_function(objects::py_function); +} +template +object raw_function(F f, std::size_t min_args = 0) +{ + return detail::make_raw_function( + objects::py_function( + detail::raw_dispatcher(f) + , mpl::vector1() + , min_args + , (std::numeric_limits::max)() + ) + ); +} +}} +namespace boost { +template +struct iterator_value +{ + typedef typename boost::detail::iterator_traits::value_type type; +}; +template +struct iterator_reference +{ + typedef typename boost::detail::iterator_traits::reference type; +}; +template +struct iterator_pointer +{ + typedef typename boost::detail::iterator_traits::pointer type; +}; +template +struct iterator_difference +{ + typedef typename boost::detail::iterator_traits::difference_type type; +}; +template +struct iterator_category +{ + typedef typename boost::detail::iterator_traits::iterator_category type; +}; +} +namespace boost { namespace python { +namespace detail +{ + class slice_base : public object + { + public: + object start() const; + object stop() const; + object step() const; + protected: + explicit slice_base(PyObject*, PyObject*, PyObject*); + inline explicit slice_base(python::detail::borrowed_reference p) : object(p) {} inline explicit slice_base(python::detail::new_reference p) : object(p) {} inline explicit slice_base(python::detail::new_non_null_reference p) : object(p) {} + }; +} +class slice : public detail::slice_base +{ + typedef detail::slice_base base; + public: + slice() : base(0,0,0) {} + template + slice( Integer1 start, Integer2 stop) + : base( object(start).ptr(), object(stop).ptr(), 0 ) + {} + template + slice( Integer1 start, Integer2 stop, Integer3 stride) + : base( object(start).ptr(), object(stop).ptr(), object(stride).ptr() ) + {} + template + struct range + { + RandomAccessIterator start; + RandomAccessIterator stop; + typename iterator_difference::type step; + }; + template + slice::range + get_indicies( const RandomAccessIterator& begin, + const RandomAccessIterator& end) const + { + slice::range ret; + typedef typename iterator_difference::type difference_type; + difference_type max_dist = boost::detail::distance(begin, end); + object slice_start = this->start(); + object slice_stop = this->stop(); + object slice_step = this->step(); + if (slice_step == object()) { + ret.step = 1; + } + else { + ret.step = extract( slice_step); + if (ret.step == 0) { + PyErr_SetString( PyExc_IndexError, "step size cannot be zero."); + throw_error_already_set(); + } + } + if (slice_start == object()) { + if (ret.step < 0) { + ret.start = end; + --ret.start; + } + else + ret.start = begin; + } + else { + difference_type i = extract( slice_start); + if (i >= max_dist && ret.step > 0) + throw std::invalid_argument( "Zero-length slice"); + if (i >= 0) { + ret.start = begin; + using std::min; + std::advance( ret.start, min (i, max_dist-1)); + } + else { + if (i < -max_dist && ret.step < 0) + throw std::invalid_argument( "Zero-length slice"); + ret.start = end; + std::advance( ret.start, (-i < max_dist) ? i : -max_dist ); + } + } + if (slice_stop == object()) { + if (ret.step < 0) { + ret.stop = begin; + } + else { + ret.stop = end; + std::advance( ret.stop, -1); + } + } + else { + difference_type i = extract(slice_stop); + if (ret.step < 0) { + if (i+1 >= max_dist || i == -1) + throw std::invalid_argument( "Zero-length slice"); + if (i >= 0) { + ret.stop = begin; + std::advance( ret.stop, i+1); + } + else { + ret.stop = end; + std::advance( ret.stop, (-i < max_dist) ? i : -max_dist); + } + } + else { + if (i == 0 || -i >= max_dist) + throw std::invalid_argument( "Zero-length slice"); + if (i > 0) { + ret.stop = begin; + std::advance( ret.stop, (std::min)( i-1, max_dist-1)); + } + else { + ret.stop = end; + std::advance( ret.stop, i-1); + } + } + } + typename iterator_difference::type final_dist = + boost::detail::distance( ret.start, ret.stop); + if (final_dist == 0) + return ret; + if ((final_dist > 0) != (ret.step > 0)) + throw std::invalid_argument( "Zero-length slice."); + if (final_dist < 0) { + difference_type remainder = -final_dist % -ret.step; + std::advance( ret.stop, remainder); + } + else { + difference_type remainder = final_dist % ret.step; + std::advance( ret.stop, -remainder); + } + return ret; + } + public: + inline explicit slice(python::detail::borrowed_reference p) : detail::slice_base(p) {} inline explicit slice(python::detail::new_reference p) : detail::slice_base(p) {} inline explicit slice(python::detail::new_non_null_reference p) : detail::slice_base(p) {} +}; +namespace converter { +template<> +struct object_manager_traits + : pytype_object_manager_traits<&PySlice_Type, slice> +{ +}; +} +} } +namespace boost +{ +template class scoped_ptr +{ +private: + T * px; + scoped_ptr(scoped_ptr const &); + scoped_ptr & operator=(scoped_ptr const &); + typedef scoped_ptr this_type; + void operator==( scoped_ptr const& ) const; + void operator!=( scoped_ptr const& ) const; +public: + typedef T element_type; + explicit scoped_ptr( T * p = 0 ): px( p ) + { + } + explicit scoped_ptr( std::auto_ptr p ): px( p.release() ) + { + } + ~scoped_ptr() + { + boost::checked_delete( px ); + } + void reset(T * p = 0) + { + (static_cast (0)); + this_type(p).swap(*this); + } + T & operator*() const + { + (static_cast (0)); + return *px; + } + T * operator->() const + { + (static_cast (0)); + return px; + } + T * get() const + { + return px; + } + typedef T * this_type::*unspecified_bool_type; + operator unspecified_bool_type() const + { + return px == 0? 0: &this_type::px; + } + bool operator! () const + { + return px == 0; + } + void swap(scoped_ptr & b) + { + T * tmp = b.px; + b.px = px; + px = tmp; + } +}; +template inline void swap(scoped_ptr & a, scoped_ptr & b) +{ + a.swap(b); +} +template inline T * get_pointer(scoped_ptr const & p) +{ + return p.get(); +} +} +namespace boost { namespace detail { +template +ForwardIter lower_bound(ForwardIter first, ForwardIter last, + const Tp& val) +{ + typedef detail::iterator_traits traits; + typename traits::difference_type len = boost::detail::distance(first, last); + typename traits::difference_type half; + ForwardIter middle; + while (len > 0) { + half = len >> 1; + middle = first; + std::advance(middle, half); + if (*middle < val) { + first = middle; + ++first; + len = len - half - 1; + } + else + len = half; + } + return first; +} +template +ForwardIter lower_bound(ForwardIter first, ForwardIter last, + const Tp& val, Compare comp) +{ + typedef detail::iterator_traits traits; + typename traits::difference_type len = boost::detail::distance(first, last); + typename traits::difference_type half; + ForwardIter middle; + while (len > 0) { + half = len >> 1; + middle = first; + std::advance(middle, half); + if (comp(*middle, val)) { + first = middle; + ++first; + len = len - half - 1; + } + else + len = half; + } + return first; +} +template +ForwardIter upper_bound(ForwardIter first, ForwardIter last, + const Tp& val) +{ + typedef detail::iterator_traits traits; + typename traits::difference_type len = boost::detail::distance(first, last); + typename traits::difference_type half; + ForwardIter middle; + while (len > 0) { + half = len >> 1; + middle = first; + std::advance(middle, half); + if (val < *middle) + len = half; + else { + first = middle; + ++first; + len = len - half - 1; + } + } + return first; +} +template +ForwardIter upper_bound(ForwardIter first, ForwardIter last, + const Tp& val, Compare comp) +{ + typedef detail::iterator_traits traits; + typename traits::difference_type len = boost::detail::distance(first, last); + typename traits::difference_type half; + ForwardIter middle; + while (len > 0) { + half = len >> 1; + middle = first; + std::advance(middle, half); + if (comp(val, *middle)) + len = half; + else { + first = middle; + ++first; + len = len - half - 1; + } + } + return first; +} +template +std::pair +equal_range(ForwardIter first, ForwardIter last, const Tp& val) +{ + typedef detail::iterator_traits traits; + typename traits::difference_type len = boost::detail::distance(first, last); + typename traits::difference_type half; + ForwardIter middle, left, right; + while (len > 0) { + half = len >> 1; + middle = first; + std::advance(middle, half); + if (*middle < val) { + first = middle; + ++first; + len = len - half - 1; + } + else if (val < *middle) + len = half; + else { + left = boost::detail::lower_bound(first, middle, val); + std::advance(first, len); + right = boost::detail::upper_bound(++middle, first, val); + return std::pair(left, right); + } + } + return std::pair(first, first); +} +template +std::pair +equal_range(ForwardIter first, ForwardIter last, const Tp& val, + Compare comp) +{ + typedef detail::iterator_traits traits; + typename traits::difference_type len = boost::detail::distance(first, last); + typename traits::difference_type half; + ForwardIter middle, left, right; + while (len > 0) { + half = len >> 1; + middle = first; + std::advance(middle, half); + if (comp(*middle, val)) { + first = middle; + ++first; + len = len - half - 1; + } + else if (comp(val, *middle)) + len = half; + else { + left = boost::detail::lower_bound(first, middle, val, comp); + std::advance(first, len); + right = boost::detail::upper_bound(++middle, first, val, comp); + return std::pair(left, right); + } + } + return std::pair(first, first); +} +template +bool binary_search(ForwardIter first, ForwardIter last, + const Tp& val) { + ForwardIter i = boost::detail::lower_bound(first, last, val); + return i != last && !(val < *i); +} +template +bool binary_search(ForwardIter first, ForwardIter last, + const Tp& val, + Compare comp) { + ForwardIter i = boost::detail::lower_bound(first, last, val, comp); + return i != last && !comp(val, *i); +} +}} +namespace boost { namespace mpl { +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( Tag1::value + > Tag2::value + ) + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; +template< + typename N1 = na + , typename N2 = na + > +struct equal_to + : equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + >::template apply< N1,N2 >::type +{ + +}; +template<> struct equal_to< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : equal_to< T1 , T2 > { }; }; template< typename Tag > struct lambda< equal_to< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef equal_to< na , na > result_; typedef equal_to< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< equal_to< T1 , T2 > > : int_<2> { }; template<> struct template_arity< equal_to< na , na > > : int_<-1> { }; } +}} +namespace boost { namespace mpl { +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : bool_< ( N1::value == N2::value ) > + { + }; +}; +}} +namespace boost { namespace numeric { namespace convdetail +{ + template< class T1, class T2> + struct equal_to + { + enum { x = ( T1::value == T2::value ) }; + static const bool value = x; + typedef mpl::bool_ type; + }; + template + struct ct_switch4 + { + typedef mpl::identity Case0TypeQ ; + typedef mpl::identity Case1TypeQ ; + typedef equal_to is_case0 ; + typedef equal_to is_case1 ; + typedef equal_to is_case2 ; + typedef mpl::if_ choose_2_3Q ; + typedef mpl::eval_if choose_1_2_3Q ; + typedef typename + mpl::eval_if::type + type ; + } ; + template + struct for_both + { + typedef mpl::identity TF_Q ; + typedef mpl::identity TT_Q ; + typedef typename mpl::not_::type not_expr0 ; + typedef typename mpl::not_::type not_expr1 ; + typedef typename mpl::and_::type caseTT ; + typedef typename mpl::and_::type caseTF ; + typedef typename mpl::and_::type caseFT ; + typedef mpl::if_ choose_FT_FF_Q ; + typedef mpl::eval_if choose_TF_FT_FF_Q ; + typedef typename mpl::eval_if::type type ; + } ; +} } } +namespace boost { namespace numeric +{ + enum int_float_mixture_enum + { + integral_to_integral + ,integral_to_float + ,float_to_integral + ,float_to_float + } ; +} } +namespace boost { namespace numeric { namespace convdetail +{ + typedef mpl::integral_c int2int_c ; + typedef mpl::integral_c int2float_c ; + typedef mpl::integral_c float2int_c ; + typedef mpl::integral_c float2float_c ; + template + struct get_int_float_mixture + { + typedef mpl::bool_< ::std::numeric_limits::is_integer > S_int ; + typedef mpl::bool_< ::std::numeric_limits::is_integer > T_int ; + typedef typename + for_both::type + type ; + } ; + template + struct for_int_float_mixture + { + typedef typename + ct_switch4::type + type ; + } ; +} } } +namespace boost { namespace numeric +{ + enum sign_mixture_enum + { + unsigned_to_unsigned + ,signed_to_signed + ,signed_to_unsigned + ,unsigned_to_signed + } ; +} } +namespace boost { namespace numeric { namespace convdetail +{ + typedef mpl::integral_c unsig2unsig_c ; + typedef mpl::integral_c sig2sig_c ; + typedef mpl::integral_c sig2unsig_c ; + typedef mpl::integral_c unsig2sig_c ; + template + struct get_sign_mixture + { + typedef mpl::bool_< ::std::numeric_limits::is_signed > S_signed ; + typedef mpl::bool_< ::std::numeric_limits::is_signed > T_signed ; + typedef typename + for_both::type + type ; + } ; + template + struct for_sign_mixture + { + typedef typename + ct_switch4::type + type ; + } ; +} } } +namespace boost { namespace numeric +{ + enum udt_builtin_mixture_enum + { + builtin_to_builtin + ,builtin_to_udt + ,udt_to_builtin + ,udt_to_udt + } ; +} } +namespace boost { namespace numeric { namespace convdetail +{ + typedef mpl::integral_c builtin2builtin_c ; + typedef mpl::integral_c builtin2udt_c ; + typedef mpl::integral_c udt2builtin_c ; + typedef mpl::integral_c udt2udt_c ; + template + struct for_udt_builtin_mixture + { + typedef typename + ct_switch4::type + type ; + } ; + template + struct get_udt_builtin_mixture + { + typedef is_arithmetic S_builtin ; + typedef is_arithmetic T_builtin ; + typedef typename + for_both::type + type ; + } ; +} } } +namespace boost { namespace mpl { +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( Tag1::value + > Tag2::value + ) + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; +template< + typename N1 = na + , typename N2 = na + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ + +}; +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + : times< times< times< N1,N2 >, N3>, N4> +{ + +}; +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + : times< times< N1,N2 >, N3> +{ + +}; +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag::type + , typename times_tag::type + >::template apply< N1,N2 >::type +{ + +}; +template<> struct times< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : times< T1 , T2 > { }; }; template< typename Tag > struct lambda< times< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef times< na , na > result_; typedef times< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< times< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< times< na , na > > : int_<-1> { }; } +}} +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( N1::value + * N2::value + ) + > + { + }; +}; +}} +namespace boost { namespace mpl { +template< + typename N1 = na , typename N2 = na , typename N3 = na , typename N4 = na , typename N5 = na + > +struct multiplies + : times< N1 , N2 , N3 , N4 , N5 > +{ + +}; +template<> struct multiplies< na , na , na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct apply : multiplies< T1 , T2 , T3 , T4 , T5 > { }; }; template< typename Tag > struct lambda< multiplies< na , na , na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef multiplies< na , na , na , na , na > result_; typedef multiplies< na , na , na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< multiplies< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< multiplies< na , na , na , na , na > > : int_<-1> { }; } +}} +namespace boost { namespace numeric { namespace convdetail +{ + template + struct subranged_Sig2Unsig + { + typedef mpl::true_ type ; + } ; + template + struct subranged_Unsig2Sig + { + typedef mpl::int_< ::std::numeric_limits::digits > S_digits ; + typedef mpl::int_< ::std::numeric_limits::digits > T_digits ; + typedef typename T_digits::next u_T_digits ; + typedef mpl::int_<2> Two ; + typedef typename mpl::multiplies::type S_digits_times_2 ; + typedef typename mpl::less::type type ; + } ; + template + struct subranged_SameSign + { + typedef mpl::int_< ::std::numeric_limits::digits > S_digits ; + typedef mpl::int_< ::std::numeric_limits::digits > T_digits ; + typedef typename mpl::less::type type ; + } ; + template + struct subranged_Int2Float + { + typedef mpl::false_ type ; + } ; + template + struct subranged_Float2Int + { + typedef mpl::true_ type ; + } ; + template + struct subranged_Float2Float + { + typedef mpl::int_< ::std::numeric_limits::digits > S_mantisa ; + typedef mpl::int_< ::std::numeric_limits::digits > T_mantisa ; + typedef mpl::int_< ::std::numeric_limits::max_exponent > S_exponent ; + typedef mpl::int_< ::std::numeric_limits::max_exponent > T_exponent ; + typedef typename mpl::less::type T_smaller_exponent ; + typedef typename mpl::equal_to::type equal_exponents ; + typedef mpl::less T_smaller_mantisa ; + typedef mpl::eval_if not_bigger_exponent_case ; + typedef typename + mpl::eval_if::type + type ; + } ; + template + struct subranged_Udt2BuiltIn + { + typedef mpl::true_ type ; + } ; + template + struct subranged_BuiltIn2Udt + { + typedef mpl::false_ type ; + } ; + template + struct subranged_Udt2Udt + { + typedef mpl::false_ type ; + } ; + template + struct get_subranged_Int2Int + { + typedef subranged_SameSign Sig2Sig ; + typedef subranged_Sig2Unsig Sig2Unsig ; + typedef subranged_Unsig2Sig Unsig2Sig ; + typedef Sig2Sig Unsig2Unsig ; + typedef typename get_sign_mixture::type sign_mixture ; + typedef typename + for_sign_mixture::type + type ; + } ; + template + struct get_subranged_BuiltIn2BuiltIn + { + typedef get_subranged_Int2Int Int2IntQ ; + typedef subranged_Int2Float Int2Float ; + typedef subranged_Float2Int Float2Int ; + typedef subranged_Float2Float Float2Float ; + typedef mpl::identity Int2FloatQ ; + typedef mpl::identity Float2IntQ ; + typedef mpl::identity Float2FloatQ ; + typedef typename get_int_float_mixture::type int_float_mixture ; + typedef for_int_float_mixture for_ ; + typedef typename for_::type selected ; + typedef typename selected::type type ; + } ; + template + struct get_subranged + { + typedef get_subranged_BuiltIn2BuiltIn BuiltIn2BuiltInQ ; + typedef subranged_BuiltIn2Udt BuiltIn2Udt ; + typedef subranged_Udt2BuiltIn Udt2BuiltIn ; + typedef subranged_Udt2Udt Udt2Udt ; + typedef mpl::identity BuiltIn2UdtQ ; + typedef mpl::identity Udt2BuiltInQ ; + typedef mpl::identity Udt2UdtQ ; + typedef typename get_udt_builtin_mixture::type udt_builtin_mixture ; + typedef typename + for_udt_builtin_mixture::type + selected ; + typedef typename selected::type selected2 ; + typedef typename selected2::type type ; + } ; + template + struct get_is_subranged + { + typedef get_subranged non_trivial_case ; + typedef mpl::identity trivial_case ; + typedef is_same is_trivial ; + typedef typename mpl::if_::type selected ; + typedef typename selected::type type ; + } ; +} } } +namespace boost { namespace numeric { namespace convdetail +{ + template + struct non_trivial_traits_impl + { + typedef typename get_int_float_mixture ::type int_float_mixture ; + typedef typename get_sign_mixture ::type sign_mixture ; + typedef typename get_udt_builtin_mixture ::type udt_builtin_mixture ; + typedef typename get_is_subranged::type subranged ; + typedef mpl::false_ trivial ; + typedef T target_type ; + typedef S source_type ; + typedef T result_type ; + typedef typename mpl::if_< is_arithmetic, S, S const&>::type argument_type ; + typedef typename mpl::if_::type supertype ; + typedef typename mpl::if_::type subtype ; + } ; + template + struct trivial_traits_impl + { + typedef typename get_int_float_mixture ::type int_float_mixture ; + typedef typename get_sign_mixture ::type sign_mixture ; + typedef typename get_udt_builtin_mixture::type udt_builtin_mixture ; + typedef mpl::false_ subranged ; + typedef mpl::true_ trivial ; + typedef N target_type ; + typedef N source_type ; + typedef N const& result_type ; + typedef N const& argument_type ; + typedef N supertype ; + typedef N subtype ; + } ; + template + struct get_conversion_traits + { + typedef typename remove_cv::type target_type ; + typedef typename remove_cv::type source_type ; + typedef typename is_same::type is_trivial ; + typedef trivial_traits_impl trivial_imp ; + typedef non_trivial_traits_impl non_trivial_imp ; + typedef typename mpl::if_::type type ; + } ; +} } } +namespace boost { namespace numeric +{ +template +struct conversion_traits + : convdetail::get_conversion_traits::type +{ +} ; +} } + +namespace boost { namespace numeric +{ +template +struct Trunc +{ + typedef S source_type ; + typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; + static source_type nearbyint ( argument_type s ) + { + using std::floor ; + using std::ceil ; + return s < static_cast(0) ? ceil(s) : floor(s) ; + } + typedef mpl::integral_c< std::float_round_style, std::round_toward_zero> round_style ; +} ; +template +struct Floor +{ + typedef S source_type ; + typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; + static source_type nearbyint ( argument_type s ) + { + using std::floor ; + return floor(s) ; + } + typedef mpl::integral_c< std::float_round_style, std::round_toward_neg_infinity> round_style ; +} ; +template +struct Ceil +{ + typedef S source_type ; + typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; + static source_type nearbyint ( argument_type s ) + { + using std::ceil ; + return ceil(s) ; + } + typedef mpl::integral_c< std::float_round_style, std::round_toward_infinity> round_style ; +} ; +template +struct RoundEven +{ + typedef S source_type ; + typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; + static source_type nearbyint ( argument_type s ) + { + using std::floor ; + using std::ceil ; + S prev = floor(s); + S next = ceil(s); + S rt = (s - prev) - (next - s); + S const zero(0.0); + S const two(2.0); + if ( rt < zero ) + return prev; + else if ( rt > zero ) + return next; + else + { + bool is_prev_even = two * floor(prev / two) == prev ; + return ( is_prev_even ? prev : next ) ; + } + } + typedef mpl::integral_c< std::float_round_style, std::round_to_nearest> round_style ; +} ; +enum range_check_result +{ + cInRange = 0 , + cNegOverflow = 1 , + cPosOverflow = 2 +} ; +class bad_numeric_cast : public std::bad_cast +{ + public: + virtual const char * what() const throw() + { return "bad numeric conversion: overflow"; } +}; +class negative_overflow : public bad_numeric_cast +{ + public: + virtual const char * what() const throw() + { return "bad numeric conversion: negative overflow"; } +}; +class positive_overflow : public bad_numeric_cast +{ + public: + virtual const char * what() const throw() + { return "bad numeric conversion: positive overflow"; } +}; +struct def_overflow_handler +{ + void operator() ( range_check_result r ) + { + if ( r == cNegOverflow ) + throw negative_overflow() ; + else if ( r == cPosOverflow ) + throw positive_overflow() ; + } +} ; +struct silent_overflow_handler +{ + void operator() ( range_check_result ) {} +} ; +template +struct raw_converter +{ + typedef typename Traits::result_type result_type ; + typedef typename Traits::argument_type argument_type ; + static result_type low_level_convert ( argument_type s ) { return static_cast(s) ; } +} ; +struct UseInternalRangeChecker {} ; +} } +namespace boost { namespace numeric { namespace boundsdetail +{ + template + class Integral + { + typedef std::numeric_limits limits ; + public : + static N lowest () { return limits::min (); } + static N highest () { return limits::max (); } + static N smallest() { return static_cast(1); } + } ; + template + class Float + { + typedef std::numeric_limits limits ; + public : + static N lowest () { return static_cast(-limits::max ()) ; } + static N highest () { return limits::max (); } + static N smallest() { return limits::min (); } + } ; + template + struct get_impl + { + typedef mpl::bool_< ::std::numeric_limits::is_integer > is_int ; + typedef Integral impl_int ; + typedef Float impl_float ; + typedef typename mpl::if_::type type ; + } ; +} } } +namespace boost { namespace numeric +{ +template +struct bounds : boundsdetail::get_impl::type +{} ; +} } +namespace boost { namespace numeric { namespace convdetail +{ + typedef mpl::integral_c round2zero_c ; + typedef mpl::integral_c round2nearest_c ; + typedef mpl::integral_c round2inf_c ; + typedef mpl::integral_c round2neg_inf_c ; + template + struct for_round_style + { + typedef ct_switch4 selector ; + typedef typename selector::type type ; + } ; + struct non_applicable { typedef mpl::false_ do_apply ; } ; + struct applicable { typedef mpl::true_ do_apply ; } ; + template + struct LT_LoT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + static range_check_result apply ( argument_type s ) + { + return s < static_cast(bounds::lowest()) ? cNegOverflow : cInRange ; + } + } ; + template + struct LT_Zero : applicable + { + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + static range_check_result apply ( argument_type s ) + { + return s < static_cast(0) ? cNegOverflow : cInRange ; + } + } ; + template + struct LE_PrevLoT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + static range_check_result apply ( argument_type s ) + { + return s <= static_cast(bounds::lowest()) - static_cast(1.0) + ? cNegOverflow : cInRange ; + } + } ; + template + struct LT_HalfPrevLoT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + static range_check_result apply ( argument_type s ) + { + return s < static_cast(bounds::lowest()) - static_cast(0.5) + ? cNegOverflow : cInRange ; + } + } ; + template + struct GT_HiT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + static range_check_result apply ( argument_type s ) + { + return s > static_cast(bounds::highest()) + ? cPosOverflow : cInRange ; + } + } ; + template + struct GE_SuccHiT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + static range_check_result apply ( argument_type s ) + { + return s >= static_cast(bounds::highest()) + static_cast(1.0) + ? cPosOverflow : cInRange ; + } + } ; + template + struct GT_HalfSuccHiT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + static range_check_result apply ( argument_type s ) + { + return s >= static_cast(bounds::highest()) + static_cast(0.5) + ? cPosOverflow : cInRange ; + } + } ; + template + struct applyBoth + { + typedef typename PredA::argument_type argument_type ; + static range_check_result apply ( argument_type s ) + { + range_check_result r = PredA::apply(s) ; + if ( r == cInRange ) + r = PredB::apply(s); + return r ; + } + } ; + template + struct combine + { + typedef applyBoth Both ; + typedef void NNone ; + typedef typename PredA::do_apply do_applyA ; + typedef typename PredB::do_apply do_applyB ; + typedef typename for_both::type type ; + } ; + template + struct dummy_range_checker + { + typedef typename Traits::argument_type argument_type ; + static range_check_result out_of_range ( argument_type ) { return cInRange ; } + static void validate_range ( argument_type ) {} + } ; + template + struct generic_range_checker + { + typedef OverflowHandler overflow_handler ; + typedef typename Traits::argument_type argument_type ; + static range_check_result out_of_range ( argument_type s ) + { + typedef typename combine::type Predicate ; + return Predicate::apply(s); + } + static void validate_range ( argument_type s ) + { OverflowHandler()( out_of_range(s) ) ; } + } ; + template + struct GetRC_Sig2Sig_or_Unsig2Unsig + { + typedef dummy_range_checker Dummy ; + typedef LT_LoT Pred1 ; + typedef GT_HiT Pred2 ; + typedef generic_range_checker Normal ; + typedef typename Traits::subranged subranged ; + typedef typename mpl::if_::type type ; + } ; + template + struct GetRC_Sig2Unsig + { + typedef LT_Zero Pred1 ; + typedef GT_HiT Pred2 ; + typedef generic_range_checker ChoiceA ; + typedef generic_range_checker ChoiceB ; + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename subranged_Unsig2Sig::type oposite_subranged ; + typedef typename mpl::not_::type positively_subranged ; + typedef typename mpl::if_::type type ; + } ; + template + struct GetRC_Unsig2Sig + { + typedef GT_HiT Pred1 ; + typedef generic_range_checker type ; + } ; + template + struct GetRC_Int2Int + { + typedef GetRC_Sig2Sig_or_Unsig2Unsig Sig2SigQ ; + typedef GetRC_Sig2Unsig Sig2UnsigQ ; + typedef GetRC_Unsig2Sig Unsig2SigQ ; + typedef Sig2SigQ Unsig2UnsigQ ; + typedef typename Traits::sign_mixture sign_mixture ; + typedef typename + for_sign_mixture::type + selector ; + typedef typename selector::type type ; + } ; + template + struct GetRC_Int2Float + { + typedef dummy_range_checker type ; + } ; + template + struct GetRC_Float2Int + { + typedef LE_PrevLoT Pred1 ; + typedef GE_SuccHiT Pred2 ; + typedef LT_HalfPrevLoT Pred3 ; + typedef GT_HalfSuccHiT Pred4 ; + typedef GT_HiT Pred5 ; + typedef LT_LoT Pred6 ; + typedef generic_range_checker ToZero ; + typedef generic_range_checker ToNearest ; + typedef generic_range_checker ToInf ; + typedef generic_range_checker ToNegInf ; + typedef typename Float2IntRounder::round_style round_style ; + typedef typename for_round_style::type type ; + } ; + template + struct GetRC_Float2Float + { + typedef dummy_range_checker Dummy ; + typedef LT_LoT Pred1 ; + typedef GT_HiT Pred2 ; + typedef generic_range_checker Normal ; + typedef typename Traits::subranged subranged ; + typedef typename mpl::if_::type type ; + } ; + template + struct GetRC_BuiltIn2BuiltIn + { + typedef GetRC_Int2Int Int2IntQ ; + typedef GetRC_Int2Float Int2FloatQ ; + typedef GetRC_Float2Int Float2IntQ ; + typedef GetRC_Float2Float Float2FloatQ ; + typedef typename Traits::int_float_mixture int_float_mixture ; + typedef typename for_int_float_mixture::type selector ; + typedef typename selector::type type ; + } ; + template + struct GetRC + { + typedef GetRC_BuiltIn2BuiltIn BuiltIn2BuiltInQ ; + typedef dummy_range_checker Dummy ; + typedef mpl::identity DummyQ ; + typedef typename Traits::udt_builtin_mixture udt_builtin_mixture ; + typedef typename for_udt_builtin_mixture::type selector ; + typedef typename selector::type type ; + } ; + template + struct trivial_converter_impl : public std::unary_function< typename Traits::argument_type + ,typename Traits::result_type + > + ,public dummy_range_checker + { + typedef Traits traits ; + typedef typename Traits::source_type source_type ; + typedef typename Traits::argument_type argument_type ; + typedef typename Traits::result_type result_type ; + static result_type low_level_convert ( argument_type s ) { return s ; } + static source_type nearbyint ( argument_type s ) { return s ; } + static result_type convert ( argument_type s ) { return s ; } + } ; + template + struct rounding_converter : public std::unary_function< typename Traits::argument_type + ,typename Traits::result_type + > + ,public RangeChecker + ,public Float2IntRounder + ,public RawConverter + { + typedef RangeChecker RangeCheckerBase ; + typedef Float2IntRounder Float2IntRounderBase ; + typedef RawConverter RawConverterBase ; + typedef Traits traits ; + typedef typename Traits::source_type source_type ; + typedef typename Traits::argument_type argument_type ; + typedef typename Traits::result_type result_type ; + static result_type convert ( argument_type s ) + { + RangeCheckerBase::validate_range(s); + source_type s1 = Float2IntRounderBase::nearbyint(s); + return RawConverterBase::low_level_convert(s1); + } + } ; + template + struct non_rounding_converter : public std::unary_function< typename Traits::argument_type + ,typename Traits::result_type + > + ,public RangeChecker + ,public RawConverter + { + typedef RangeChecker RangeCheckerBase ; + typedef RawConverter RawConverterBase ; + typedef Traits traits ; + typedef typename Traits::source_type source_type ; + typedef typename Traits::argument_type argument_type ; + typedef typename Traits::result_type result_type ; + static source_type nearbyint ( argument_type s ) { return s ; } + static result_type convert ( argument_type s ) + { + RangeCheckerBase::validate_range(s); + return RawConverterBase::low_level_convert(s); + } + } ; + template + struct get_non_trivial_converter + { + typedef GetRC InternalRangeCheckerQ ; + typedef is_same use_internal_RC ; + typedef mpl::identity UserRangeCheckerQ ; + typedef typename + mpl::eval_if::type + RangeChecker ; + typedef non_rounding_converter NonRounding ; + typedef rounding_converter Rounding ; + typedef mpl::identity NonRoundingQ ; + typedef mpl::identity RoundingQ ; + typedef typename Traits::int_float_mixture int_float_mixture ; + typedef typename + for_int_float_mixture::type + selector ; + typedef typename selector::type type ; + } ; + template< class Traits + ,class OverflowHandler + ,class Float2IntRounder + ,class RawConverter + ,class UserRangeChecker + > + struct get_converter_impl + { + typedef trivial_converter_impl Trivial ; + typedef mpl::identity TrivialQ ; + typedef get_non_trivial_converter< Traits + ,OverflowHandler + ,Float2IntRounder + ,RawConverter + ,UserRangeChecker + > NonTrivialQ ; + typedef typename Traits::trivial trivial ; + typedef typename mpl::eval_if::type type ; + } ; +} } } +namespace boost { namespace numeric +{ +template, + class OverflowHandler = def_overflow_handler, + class Float2IntRounder = Trunc< typename Traits::source_type> , + class RawConverter = raw_converter, + class UserRangeChecker = UseInternalRangeChecker + > +struct converter : convdetail::get_converter_impl::type +{ + typedef Traits traits ; + typedef typename Traits::argument_type argument_type ; + typedef typename Traits::result_type result_type ; + result_type operator() ( argument_type s ) const { return this->convert(s) ; } +} ; +template , + class UserRangeChecker = UseInternalRangeChecker + > +struct make_converter_from +{ + template, + class RawConverter = raw_converter + > + struct to + { + typedef converter type ; + } ; +} ; +} } +namespace boost +{ + template + inline + Target numeric_cast ( Source arg ) + { + typedef boost::numeric::converter Converter ; + return Converter::convert(arg); + } + using numeric::bad_numeric_cast; +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + enum _Rb_tree_color { _S_red = false, _S_black = true }; + struct _Rb_tree_node_base + { + typedef _Rb_tree_node_base* _Base_ptr; + typedef const _Rb_tree_node_base* _Const_Base_ptr; + _Rb_tree_color _M_color; + _Base_ptr _M_parent; + _Base_ptr _M_left; + _Base_ptr _M_right; + static _Base_ptr + _S_minimum(_Base_ptr __x) + { + while (__x->_M_left != 0) __x = __x->_M_left; + return __x; + } + static _Const_Base_ptr + _S_minimum(_Const_Base_ptr __x) + { + while (__x->_M_left != 0) __x = __x->_M_left; + return __x; + } + static _Base_ptr + _S_maximum(_Base_ptr __x) + { + while (__x->_M_right != 0) __x = __x->_M_right; + return __x; + } + static _Const_Base_ptr + _S_maximum(_Const_Base_ptr __x) + { + while (__x->_M_right != 0) __x = __x->_M_right; + return __x; + } + }; + template + struct _Rb_tree_node : public _Rb_tree_node_base + { + typedef _Rb_tree_node<_Val>* _Link_type; + _Val _M_value_field; + }; + __attribute__ ((__pure__)) _Rb_tree_node_base* + _Rb_tree_increment(_Rb_tree_node_base* __x) throw (); + __attribute__ ((__pure__)) const _Rb_tree_node_base* + _Rb_tree_increment(const _Rb_tree_node_base* __x) throw (); + __attribute__ ((__pure__)) _Rb_tree_node_base* + _Rb_tree_decrement(_Rb_tree_node_base* __x) throw (); + __attribute__ ((__pure__)) const _Rb_tree_node_base* + _Rb_tree_decrement(const _Rb_tree_node_base* __x) throw (); + template + struct _Rb_tree_iterator + { + typedef _Tp value_type; + typedef _Tp& reference; + typedef _Tp* pointer; + typedef bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + typedef _Rb_tree_iterator<_Tp> _Self; + typedef _Rb_tree_node_base::_Base_ptr _Base_ptr; + typedef _Rb_tree_node<_Tp>* _Link_type; + _Rb_tree_iterator() + : _M_node() { } + explicit + _Rb_tree_iterator(_Link_type __x) + : _M_node(__x) { } + reference + operator*() const + { return static_cast<_Link_type>(_M_node)->_M_value_field; } + pointer + operator->() const + { return &static_cast<_Link_type>(_M_node)->_M_value_field; } + _Self& + operator++() + { + _M_node = _Rb_tree_increment(_M_node); + return *this; + } + _Self + operator++(int) + { + _Self __tmp = *this; + _M_node = _Rb_tree_increment(_M_node); + return __tmp; + } + _Self& + operator--() + { + _M_node = _Rb_tree_decrement(_M_node); + return *this; + } + _Self + operator--(int) + { + _Self __tmp = *this; + _M_node = _Rb_tree_decrement(_M_node); + return __tmp; + } + bool + operator==(const _Self& __x) const + { return _M_node == __x._M_node; } + bool + operator!=(const _Self& __x) const + { return _M_node != __x._M_node; } + _Base_ptr _M_node; + }; + template + struct _Rb_tree_const_iterator + { + typedef _Tp value_type; + typedef const _Tp& reference; + typedef const _Tp* pointer; + typedef _Rb_tree_iterator<_Tp> iterator; + typedef bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + typedef _Rb_tree_const_iterator<_Tp> _Self; + typedef _Rb_tree_node_base::_Const_Base_ptr _Base_ptr; + typedef const _Rb_tree_node<_Tp>* _Link_type; + _Rb_tree_const_iterator() + : _M_node() { } + explicit + _Rb_tree_const_iterator(_Link_type __x) + : _M_node(__x) { } + _Rb_tree_const_iterator(const iterator& __it) + : _M_node(__it._M_node) { } + reference + operator*() const + { return static_cast<_Link_type>(_M_node)->_M_value_field; } + pointer + operator->() const + { return &static_cast<_Link_type>(_M_node)->_M_value_field; } + _Self& + operator++() + { + _M_node = _Rb_tree_increment(_M_node); + return *this; + } + _Self + operator++(int) + { + _Self __tmp = *this; + _M_node = _Rb_tree_increment(_M_node); + return __tmp; + } + _Self& + operator--() + { + _M_node = _Rb_tree_decrement(_M_node); + return *this; + } + _Self + operator--(int) + { + _Self __tmp = *this; + _M_node = _Rb_tree_decrement(_M_node); + return __tmp; + } + bool + operator==(const _Self& __x) const + { return _M_node == __x._M_node; } + bool + operator!=(const _Self& __x) const + { return _M_node != __x._M_node; } + _Base_ptr _M_node; + }; + template + inline bool + operator==(const _Rb_tree_iterator<_Val>& __x, + const _Rb_tree_const_iterator<_Val>& __y) + { return __x._M_node == __y._M_node; } + template + inline bool + operator!=(const _Rb_tree_iterator<_Val>& __x, + const _Rb_tree_const_iterator<_Val>& __y) + { return __x._M_node != __y._M_node; } + void + _Rb_tree_insert_and_rebalance(const bool __insert_left, + _Rb_tree_node_base* __x, + _Rb_tree_node_base* __p, + _Rb_tree_node_base& __header) throw (); + _Rb_tree_node_base* + _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z, + _Rb_tree_node_base& __header) throw (); + template > + class _Rb_tree + { + typedef typename _Alloc::template rebind<_Rb_tree_node<_Val> >::other + _Node_allocator; + protected: + typedef _Rb_tree_node_base* _Base_ptr; + typedef const _Rb_tree_node_base* _Const_Base_ptr; + public: + typedef _Key key_type; + typedef _Val value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef _Rb_tree_node<_Val>* _Link_type; + typedef const _Rb_tree_node<_Val>* _Const_Link_type; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Alloc allocator_type; + _Node_allocator& + _M_get_Node_allocator() + { return *static_cast<_Node_allocator*>(&this->_M_impl); } + const _Node_allocator& + _M_get_Node_allocator() const + { return *static_cast(&this->_M_impl); } + allocator_type + get_allocator() const + { return allocator_type(_M_get_Node_allocator()); } + protected: + _Link_type + _M_get_node() + { return _M_impl._Node_allocator::allocate(1); } + void + _M_put_node(_Link_type __p) + { _M_impl._Node_allocator::deallocate(__p, 1); } + _Link_type + _M_create_node(const value_type& __x) + { + _Link_type __tmp = _M_get_node(); + try + { get_allocator().construct(&__tmp->_M_value_field, __x); } + catch(...) + { + _M_put_node(__tmp); + throw; + } + return __tmp; + } + void + _M_destroy_node(_Link_type __p) + { + get_allocator().destroy(&__p->_M_value_field); + _M_put_node(__p); + } + _Link_type + _M_clone_node(_Const_Link_type __x) + { + _Link_type __tmp = _M_create_node(__x->_M_value_field); + __tmp->_M_color = __x->_M_color; + __tmp->_M_left = 0; + __tmp->_M_right = 0; + return __tmp; + } + protected: + template + struct _Rb_tree_impl : public _Node_allocator + { + _Key_compare _M_key_compare; + _Rb_tree_node_base _M_header; + size_type _M_node_count; + _Rb_tree_impl() + : _Node_allocator(), _M_key_compare(), _M_header(), + _M_node_count(0) + { _M_initialize(); } + _Rb_tree_impl(const _Key_compare& __comp, const _Node_allocator& __a) + : _Node_allocator(__a), _M_key_compare(__comp), _M_header(), + _M_node_count(0) + { _M_initialize(); } + private: + void + _M_initialize() + { + this->_M_header._M_color = _S_red; + this->_M_header._M_parent = 0; + this->_M_header._M_left = &this->_M_header; + this->_M_header._M_right = &this->_M_header; + } + }; + _Rb_tree_impl<_Compare> _M_impl; + protected: + _Base_ptr& + _M_root() + { return this->_M_impl._M_header._M_parent; } + _Const_Base_ptr + _M_root() const + { return this->_M_impl._M_header._M_parent; } + _Base_ptr& + _M_leftmost() + { return this->_M_impl._M_header._M_left; } + _Const_Base_ptr + _M_leftmost() const + { return this->_M_impl._M_header._M_left; } + _Base_ptr& + _M_rightmost() + { return this->_M_impl._M_header._M_right; } + _Const_Base_ptr + _M_rightmost() const + { return this->_M_impl._M_header._M_right; } + _Link_type + _M_begin() + { return static_cast<_Link_type>(this->_M_impl._M_header._M_parent); } + _Const_Link_type + _M_begin() const + { + return static_cast<_Const_Link_type> + (this->_M_impl._M_header._M_parent); + } + _Link_type + _M_end() + { return static_cast<_Link_type>(&this->_M_impl._M_header); } + _Const_Link_type + _M_end() const + { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); } + static const_reference + _S_value(_Const_Link_type __x) + { return __x->_M_value_field; } + static const _Key& + _S_key(_Const_Link_type __x) + { return _KeyOfValue()(_S_value(__x)); } + static _Link_type + _S_left(_Base_ptr __x) + { return static_cast<_Link_type>(__x->_M_left); } + static _Const_Link_type + _S_left(_Const_Base_ptr __x) + { return static_cast<_Const_Link_type>(__x->_M_left); } + static _Link_type + _S_right(_Base_ptr __x) + { return static_cast<_Link_type>(__x->_M_right); } + static _Const_Link_type + _S_right(_Const_Base_ptr __x) + { return static_cast<_Const_Link_type>(__x->_M_right); } + static const_reference + _S_value(_Const_Base_ptr __x) + { return static_cast<_Const_Link_type>(__x)->_M_value_field; } + static const _Key& + _S_key(_Const_Base_ptr __x) + { return _KeyOfValue()(_S_value(__x)); } + static _Base_ptr + _S_minimum(_Base_ptr __x) + { return _Rb_tree_node_base::_S_minimum(__x); } + static _Const_Base_ptr + _S_minimum(_Const_Base_ptr __x) + { return _Rb_tree_node_base::_S_minimum(__x); } + static _Base_ptr + _S_maximum(_Base_ptr __x) + { return _Rb_tree_node_base::_S_maximum(__x); } + static _Const_Base_ptr + _S_maximum(_Const_Base_ptr __x) + { return _Rb_tree_node_base::_S_maximum(__x); } + public: + typedef _Rb_tree_iterator iterator; + typedef _Rb_tree_const_iterator const_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + private: + iterator + _M_insert_(_Const_Base_ptr __x, _Const_Base_ptr __y, + const value_type& __v); + iterator + _M_insert_lower(_Base_ptr __x, _Base_ptr __y, const value_type& __v); + iterator + _M_insert_equal_lower(const value_type& __x); + _Link_type + _M_copy(_Const_Link_type __x, _Link_type __p); + void + _M_erase(_Link_type __x); + iterator + _M_lower_bound(_Link_type __x, _Link_type __y, + const _Key& __k); + const_iterator + _M_lower_bound(_Const_Link_type __x, _Const_Link_type __y, + const _Key& __k) const; + iterator + _M_upper_bound(_Link_type __x, _Link_type __y, + const _Key& __k); + const_iterator + _M_upper_bound(_Const_Link_type __x, _Const_Link_type __y, + const _Key& __k) const; + public: + _Rb_tree() { } + _Rb_tree(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_impl(__comp, __a) { } + _Rb_tree(const _Rb_tree& __x) + : _M_impl(__x._M_impl._M_key_compare, __x._M_get_Node_allocator()) + { + if (__x._M_root() != 0) + { + _M_root() = _M_copy(__x._M_begin(), _M_end()); + _M_leftmost() = _S_minimum(_M_root()); + _M_rightmost() = _S_maximum(_M_root()); + _M_impl._M_node_count = __x._M_impl._M_node_count; + } + } + ~_Rb_tree() + { _M_erase(_M_begin()); } + _Rb_tree& + operator=(const _Rb_tree& __x); + _Compare + key_comp() const + { return _M_impl._M_key_compare; } + iterator + begin() + { + return iterator(static_cast<_Link_type> + (this->_M_impl._M_header._M_left)); + } + const_iterator + begin() const + { + return const_iterator(static_cast<_Const_Link_type> + (this->_M_impl._M_header._M_left)); + } + iterator + end() + { return iterator(static_cast<_Link_type>(&this->_M_impl._M_header)); } + const_iterator + end() const + { + return const_iterator(static_cast<_Const_Link_type> + (&this->_M_impl._M_header)); + } + reverse_iterator + rbegin() + { return reverse_iterator(end()); } + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(end()); } + reverse_iterator + rend() + { return reverse_iterator(begin()); } + const_reverse_iterator + rend() const + { return const_reverse_iterator(begin()); } + bool + empty() const + { return _M_impl._M_node_count == 0; } + size_type + size() const + { return _M_impl._M_node_count; } + size_type + max_size() const + { return _M_get_Node_allocator().max_size(); } + void + swap(_Rb_tree& __t); + pair + _M_insert_unique(const value_type& __x); + iterator + _M_insert_equal(const value_type& __x); + iterator + _M_insert_unique_(const_iterator __position, const value_type& __x); + iterator + _M_insert_equal_(const_iterator __position, const value_type& __x); + template + void + _M_insert_unique(_InputIterator __first, _InputIterator __last); + template + void + _M_insert_equal(_InputIterator __first, _InputIterator __last); + void + erase(iterator __position); + void + erase(const_iterator __position); + size_type + erase(const key_type& __x); + void + erase(iterator __first, iterator __last); + void + erase(const_iterator __first, const_iterator __last); + void + erase(const key_type* __first, const key_type* __last); + void + clear() + { + _M_erase(_M_begin()); + _M_leftmost() = _M_end(); + _M_root() = 0; + _M_rightmost() = _M_end(); + _M_impl._M_node_count = 0; + } + iterator + find(const key_type& __k); + const_iterator + find(const key_type& __k) const; + size_type + count(const key_type& __k) const; + iterator + lower_bound(const key_type& __k) + { return _M_lower_bound(_M_begin(), _M_end(), __k); } + const_iterator + lower_bound(const key_type& __k) const + { return _M_lower_bound(_M_begin(), _M_end(), __k); } + iterator + upper_bound(const key_type& __k) + { return _M_upper_bound(_M_begin(), _M_end(), __k); } + const_iterator + upper_bound(const key_type& __k) const + { return _M_upper_bound(_M_begin(), _M_end(), __k); } + pair + equal_range(const key_type& __k); + pair + equal_range(const key_type& __k) const; + bool + __rb_verify() const; + }; + template + inline bool + operator==(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { + return __x.size() == __y.size() + && std::equal(__x.begin(), __x.end(), __y.begin()); + } + template + inline bool + operator<(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { + return std::lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); + } + template + inline bool + operator!=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { return __y < __x; } + template + inline bool + operator<=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { return !(__x < __y); } + template + inline void + swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { __x.swap(__y); } + template + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + operator=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x) + { + if (this != &__x) + { + clear(); + _M_impl._M_key_compare = __x._M_impl._M_key_compare; + if (__x._M_root() != 0) + { + _M_root() = _M_copy(__x._M_begin(), _M_end()); + _M_leftmost() = _S_minimum(_M_root()); + _M_rightmost() = _S_maximum(_M_root()); + _M_impl._M_node_count = __x._M_impl._M_node_count; + } + } + return *this; + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_(_Const_Base_ptr __x, _Const_Base_ptr __p, const _Val& __v) + { + bool __insert_left = (__x != 0 || __p == _M_end() + || _M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key(__p))); + _Link_type __z = _M_create_node(__v); + _Rb_tree_insert_and_rebalance(__insert_left, __z, + const_cast<_Base_ptr>(__p), + this->_M_impl._M_header); + ++_M_impl._M_node_count; + return iterator(__z); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_lower(_Base_ptr __x, _Base_ptr __p, const _Val& __v) + { + bool __insert_left = (__x != 0 || __p == _M_end() + || !_M_impl._M_key_compare(_S_key(__p), + _KeyOfValue()(__v))); + _Link_type __z = _M_create_node(__v); + _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, + this->_M_impl._M_header); + ++_M_impl._M_node_count; + return iterator(__z); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_equal_lower(const _Val& __v) + { + _Link_type __x = _M_begin(); + _Link_type __y = _M_end(); + while (__x != 0) + { + __y = __x; + __x = !_M_impl._M_key_compare(_S_key(__x), _KeyOfValue()(__v)) ? + _S_left(__x) : _S_right(__x); + } + return _M_insert_lower(__x, __y, __v); + } + template + typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::_Link_type + _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>:: + _M_copy(_Const_Link_type __x, _Link_type __p) + { + _Link_type __top = _M_clone_node(__x); + __top->_M_parent = __p; + try + { + if (__x->_M_right) + __top->_M_right = _M_copy(_S_right(__x), __top); + __p = __top; + __x = _S_left(__x); + while (__x != 0) + { + _Link_type __y = _M_clone_node(__x); + __p->_M_left = __y; + __y->_M_parent = __p; + if (__x->_M_right) + __y->_M_right = _M_copy(_S_right(__x), __y); + __p = __y; + __x = _S_left(__x); + } + } + catch(...) + { + _M_erase(__top); + throw; + } + return __top; + } + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_erase(_Link_type __x) + { + while (__x != 0) + { + _M_erase(_S_right(__x)); + _Link_type __y = _S_left(__x); + _M_destroy_node(__x); + __x = __y; + } + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_lower_bound(_Link_type __x, _Link_type __y, + const _Key& __k) + { + while (__x != 0) + if (!_M_impl._M_key_compare(_S_key(__x), __k)) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + return iterator(__y); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::const_iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_lower_bound(_Const_Link_type __x, _Const_Link_type __y, + const _Key& __k) const + { + while (__x != 0) + if (!_M_impl._M_key_compare(_S_key(__x), __k)) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + return const_iterator(__y); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_upper_bound(_Link_type __x, _Link_type __y, + const _Key& __k) + { + while (__x != 0) + if (_M_impl._M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + return iterator(__y); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::const_iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_upper_bound(_Const_Link_type __x, _Const_Link_type __y, + const _Key& __k) const + { + while (__x != 0) + if (_M_impl._M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + return const_iterator(__y); + } + template + pair::iterator, + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::iterator> + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + equal_range(const _Key& __k) + { + _Link_type __x = _M_begin(); + _Link_type __y = _M_end(); + while (__x != 0) + { + if (_M_impl._M_key_compare(_S_key(__x), __k)) + __x = _S_right(__x); + else if (_M_impl._M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + { + _Link_type __xu(__x), __yu(__y); + __y = __x, __x = _S_left(__x); + __xu = _S_right(__xu); + return pair(_M_lower_bound(__x, __y, __k), + _M_upper_bound(__xu, __yu, __k)); + } + } + return pair(iterator(__y), + iterator(__y)); + } + template + pair::const_iterator, + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::const_iterator> + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + equal_range(const _Key& __k) const + { + _Const_Link_type __x = _M_begin(); + _Const_Link_type __y = _M_end(); + while (__x != 0) + { + if (_M_impl._M_key_compare(_S_key(__x), __k)) + __x = _S_right(__x); + else if (_M_impl._M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + { + _Const_Link_type __xu(__x), __yu(__y); + __y = __x, __x = _S_left(__x); + __xu = _S_right(__xu); + return pair(_M_lower_bound(__x, __y, __k), + _M_upper_bound(__xu, __yu, __k)); + } + } + return pair(const_iterator(__y), + const_iterator(__y)); + } + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __t) + { + if (_M_root() == 0) + { + if (__t._M_root() != 0) + { + _M_root() = __t._M_root(); + _M_leftmost() = __t._M_leftmost(); + _M_rightmost() = __t._M_rightmost(); + _M_root()->_M_parent = _M_end(); + __t._M_root() = 0; + __t._M_leftmost() = __t._M_end(); + __t._M_rightmost() = __t._M_end(); + } + } + else if (__t._M_root() == 0) + { + __t._M_root() = _M_root(); + __t._M_leftmost() = _M_leftmost(); + __t._M_rightmost() = _M_rightmost(); + __t._M_root()->_M_parent = __t._M_end(); + _M_root() = 0; + _M_leftmost() = _M_end(); + _M_rightmost() = _M_end(); + } + else + { + std::swap(_M_root(),__t._M_root()); + std::swap(_M_leftmost(),__t._M_leftmost()); + std::swap(_M_rightmost(),__t._M_rightmost()); + _M_root()->_M_parent = _M_end(); + __t._M_root()->_M_parent = __t._M_end(); + } + std::swap(this->_M_impl._M_node_count, __t._M_impl._M_node_count); + std::swap(this->_M_impl._M_key_compare, __t._M_impl._M_key_compare); + std::__alloc_swap<_Node_allocator>:: + _S_do_it(_M_get_Node_allocator(), __t._M_get_Node_allocator()); + } + template + pair::iterator, bool> + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_unique(const _Val& __v) + { + _Link_type __x = _M_begin(); + _Link_type __y = _M_end(); + bool __comp = true; + while (__x != 0) + { + __y = __x; + __comp = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x)); + __x = __comp ? _S_left(__x) : _S_right(__x); + } + iterator __j = iterator(__y); + if (__comp) + { + if (__j == begin()) + return pair(_M_insert_(__x, __y, __v), true); + else + --__j; + } + if (_M_impl._M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v))) + return pair(_M_insert_(__x, __y, __v), true); + return pair(__j, false); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_equal(const _Val& __v) + { + _Link_type __x = _M_begin(); + _Link_type __y = _M_end(); + while (__x != 0) + { + __y = __x; + __x = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x)) ? + _S_left(__x) : _S_right(__x); + } + return _M_insert_(__x, __y, __v); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_unique_(const_iterator __position, const _Val& __v) + { + if (__position._M_node == _M_end()) + { + if (size() > 0 + && _M_impl._M_key_compare(_S_key(_M_rightmost()), + _KeyOfValue()(__v))) + return _M_insert_(0, _M_rightmost(), __v); + else + return _M_insert_unique(__v).first; + } + else if (_M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key(__position._M_node))) + { + const_iterator __before = __position; + if (__position._M_node == _M_leftmost()) + return _M_insert_(_M_leftmost(), _M_leftmost(), __v); + else if (_M_impl._M_key_compare(_S_key((--__before)._M_node), + _KeyOfValue()(__v))) + { + if (_S_right(__before._M_node) == 0) + return _M_insert_(0, __before._M_node, __v); + else + return _M_insert_(__position._M_node, + __position._M_node, __v); + } + else + return _M_insert_unique(__v).first; + } + else if (_M_impl._M_key_compare(_S_key(__position._M_node), + _KeyOfValue()(__v))) + { + const_iterator __after = __position; + if (__position._M_node == _M_rightmost()) + return _M_insert_(0, _M_rightmost(), __v); + else if (_M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key((++__after)._M_node))) + { + if (_S_right(__position._M_node) == 0) + return _M_insert_(0, __position._M_node, __v); + else + return _M_insert_(__after._M_node, __after._M_node, __v); + } + else + return _M_insert_unique(__v).first; + } + else + return iterator(static_cast<_Link_type> + (const_cast<_Base_ptr>(__position._M_node))); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_equal_(const_iterator __position, const _Val& __v) + { + if (__position._M_node == _M_end()) + { + if (size() > 0 + && !_M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key(_M_rightmost()))) + return _M_insert_(0, _M_rightmost(), __v); + else + return _M_insert_equal(__v); + } + else if (!_M_impl._M_key_compare(_S_key(__position._M_node), + _KeyOfValue()(__v))) + { + const_iterator __before = __position; + if (__position._M_node == _M_leftmost()) + return _M_insert_(_M_leftmost(), _M_leftmost(), __v); + else if (!_M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key((--__before)._M_node))) + { + if (_S_right(__before._M_node) == 0) + return _M_insert_(0, __before._M_node, __v); + else + return _M_insert_(__position._M_node, + __position._M_node, __v); + } + else + return _M_insert_equal(__v); + } + else + { + const_iterator __after = __position; + if (__position._M_node == _M_rightmost()) + return _M_insert_(0, _M_rightmost(), __v); + else if (!_M_impl._M_key_compare(_S_key((++__after)._M_node), + _KeyOfValue()(__v))) + { + if (_S_right(__position._M_node) == 0) + return _M_insert_(0, __position._M_node, __v); + else + return _M_insert_(__after._M_node, __after._M_node, __v); + } + else + return _M_insert_equal_lower(__v); + } + } + template + template + void + _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: + _M_insert_unique(_II __first, _II __last) + { + for (; __first != __last; ++__first) + _M_insert_unique_(end(), *__first); + } + template + template + void + _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: + _M_insert_equal(_II __first, _II __last) + { + for (; __first != __last; ++__first) + _M_insert_equal_(end(), *__first); + } + template + inline void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(iterator __position) + { + _Link_type __y = + static_cast<_Link_type>(_Rb_tree_rebalance_for_erase + (__position._M_node, + this->_M_impl._M_header)); + _M_destroy_node(__y); + --_M_impl._M_node_count; + } + template + inline void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(const_iterator __position) + { + _Link_type __y = + static_cast<_Link_type>(_Rb_tree_rebalance_for_erase + (const_cast<_Base_ptr>(__position._M_node), + this->_M_impl._M_header)); + _M_destroy_node(__y); + --_M_impl._M_node_count; + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(const _Key& __x) + { + pair __p = equal_range(__x); + const size_type __old_size = size(); + erase(__p.first, __p.second); + return __old_size - size(); + } + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(iterator __first, iterator __last) + { + if (__first == begin() && __last == end()) + clear(); + else + while (__first != __last) + erase(__first++); + } + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(const_iterator __first, const_iterator __last) + { + if (__first == begin() && __last == end()) + clear(); + else + while (__first != __last) + erase(__first++); + } + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(const _Key* __first, const _Key* __last) + { + while (__first != __last) + erase(*__first++); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + find(const _Key& __k) + { + iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k); + return (__j == end() + || _M_impl._M_key_compare(__k, + _S_key(__j._M_node))) ? end() : __j; + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::const_iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + find(const _Key& __k) const + { + const_iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k); + return (__j == end() + || _M_impl._M_key_compare(__k, + _S_key(__j._M_node))) ? end() : __j; + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + count(const _Key& __k) const + { + pair __p = equal_range(__k); + const size_type __n = std::distance(__p.first, __p.second); + return __n; + } + __attribute__ ((__pure__)) unsigned int + _Rb_tree_black_count(const _Rb_tree_node_base* __node, + const _Rb_tree_node_base* __root) throw (); + template + bool + _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::__rb_verify() const + { + if (_M_impl._M_node_count == 0 || begin() == end()) + return _M_impl._M_node_count == 0 && begin() == end() + && this->_M_impl._M_header._M_left == _M_end() + && this->_M_impl._M_header._M_right == _M_end(); + unsigned int __len = _Rb_tree_black_count(_M_leftmost(), _M_root()); + for (const_iterator __it = begin(); __it != end(); ++__it) + { + _Const_Link_type __x = static_cast<_Const_Link_type>(__it._M_node); + _Const_Link_type __L = _S_left(__x); + _Const_Link_type __R = _S_right(__x); + if (__x->_M_color == _S_red) + if ((__L && __L->_M_color == _S_red) + || (__R && __R->_M_color == _S_red)) + return false; + if (__L && _M_impl._M_key_compare(_S_key(__x), _S_key(__L))) + return false; + if (__R && _M_impl._M_key_compare(_S_key(__R), _S_key(__x))) + return false; + if (!__L && !__R && _Rb_tree_black_count(__x, _M_root()) != __len) + return false; + } + if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root())) + return false; + if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root())) + return false; + return true; + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template , + typename _Alloc = std::allocator > > + class map + { + public: + typedef _Key key_type; + typedef _Tp mapped_type; + typedef std::pair value_type; + typedef _Compare key_compare; + typedef _Alloc allocator_type; + private: + typedef typename _Alloc::value_type _Alloc_value_type; + + + + public: + class value_compare + : public std::binary_function + { + friend class map<_Key, _Tp, _Compare, _Alloc>; + protected: + _Compare comp; + value_compare(_Compare __c) + : comp(__c) { } + public: + bool operator()(const value_type& __x, const value_type& __y) const + { return comp(__x.first, __y.first); } + }; + private: + typedef typename _Alloc::template rebind::other + _Pair_alloc_type; + typedef _Rb_tree, + key_compare, _Pair_alloc_type> _Rep_type; + _Rep_type _M_t; + public: + typedef typename _Pair_alloc_type::pointer pointer; + typedef typename _Pair_alloc_type::const_pointer const_pointer; + typedef typename _Pair_alloc_type::reference reference; + typedef typename _Pair_alloc_type::const_reference const_reference; + typedef typename _Rep_type::iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + typedef typename _Rep_type::reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; + map() + : _M_t() { } + explicit + map(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) { } + map(const map& __x) + : _M_t(__x._M_t) { } + template + map(_InputIterator __first, _InputIterator __last) + : _M_t() + { _M_t._M_insert_unique(__first, __last); } + template + map(_InputIterator __first, _InputIterator __last, + const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) + { _M_t._M_insert_unique(__first, __last); } + map& + operator=(const map& __x) + { + _M_t = __x._M_t; + return *this; + } + allocator_type + get_allocator() const + { return _M_t.get_allocator(); } + iterator + begin() + { return _M_t.begin(); } + const_iterator + begin() const + { return _M_t.begin(); } + iterator + end() + { return _M_t.end(); } + const_iterator + end() const + { return _M_t.end(); } + reverse_iterator + rbegin() + { return _M_t.rbegin(); } + const_reverse_iterator + rbegin() const + { return _M_t.rbegin(); } + reverse_iterator + rend() + { return _M_t.rend(); } + const_reverse_iterator + rend() const + { return _M_t.rend(); } + bool + empty() const + { return _M_t.empty(); } + size_type + size() const + { return _M_t.size(); } + size_type + max_size() const + { return _M_t.max_size(); } + mapped_type& + operator[](const key_type& __k) + { + iterator __i = lower_bound(__k); + if (__i == end() || key_comp()(__k, (*__i).first)) + __i = insert(__i, value_type(__k, mapped_type())); + return (*__i).second; + } + mapped_type& + at(const key_type& __k) + { + iterator __i = lower_bound(__k); + if (__i == end() || key_comp()(__k, (*__i).first)) + __throw_out_of_range(("map::at")); + return (*__i).second; + } + const mapped_type& + at(const key_type& __k) const + { + const_iterator __i = lower_bound(__k); + if (__i == end() || key_comp()(__k, (*__i).first)) + __throw_out_of_range(("map::at")); + return (*__i).second; + } + std::pair + insert(const value_type& __x) + { return _M_t._M_insert_unique(__x); } + iterator + insert(iterator __position, const value_type& __x) + { return _M_t._M_insert_unique_(__position, __x); } + template + void + insert(_InputIterator __first, _InputIterator __last) + { _M_t._M_insert_unique(__first, __last); } + void + erase(iterator __position) + { _M_t.erase(__position); } + size_type + erase(const key_type& __x) + { return _M_t.erase(__x); } + void + erase(iterator __first, iterator __last) + { _M_t.erase(__first, __last); } + void + swap(map& __x) + { _M_t.swap(__x._M_t); } + void + clear() + { _M_t.clear(); } + key_compare + key_comp() const + { return _M_t.key_comp(); } + value_compare + value_comp() const + { return value_compare(_M_t.key_comp()); } + iterator + find(const key_type& __x) + { return _M_t.find(__x); } + const_iterator + find(const key_type& __x) const + { return _M_t.find(__x); } + size_type + count(const key_type& __x) const + { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } + iterator + lower_bound(const key_type& __x) + { return _M_t.lower_bound(__x); } + const_iterator + lower_bound(const key_type& __x) const + { return _M_t.lower_bound(__x); } + iterator + upper_bound(const key_type& __x) + { return _M_t.upper_bound(__x); } + const_iterator + upper_bound(const key_type& __x) const + { return _M_t.upper_bound(__x); } + std::pair + equal_range(const key_type& __x) + { return _M_t.equal_range(__x); } + std::pair + equal_range(const key_type& __x) const + { return _M_t.equal_range(__x); } + template + friend bool + operator==(const map<_K1, _T1, _C1, _A1>&, + const map<_K1, _T1, _C1, _A1>&); + template + friend bool + operator<(const map<_K1, _T1, _C1, _A1>&, + const map<_K1, _T1, _C1, _A1>&); + }; + template + inline bool + operator==(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return __x._M_t == __y._M_t; } + template + inline bool + operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return __x._M_t < __y._M_t; } + template + inline bool + operator!=(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return __y < __x; } + template + inline bool + operator<=(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__x < __y); } + template + inline void + swap(map<_Key, _Tp, _Compare, _Alloc>& __x, + map<_Key, _Tp, _Compare, _Alloc>& __y) + { __x.swap(__y); } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template , + typename _Alloc = std::allocator > > + class multimap + { + public: + typedef _Key key_type; + typedef _Tp mapped_type; + typedef std::pair value_type; + typedef _Compare key_compare; + typedef _Alloc allocator_type; + private: + typedef typename _Alloc::value_type _Alloc_value_type; + + + + public: + class value_compare + : public std::binary_function + { + friend class multimap<_Key, _Tp, _Compare, _Alloc>; + protected: + _Compare comp; + value_compare(_Compare __c) + : comp(__c) { } + public: + bool operator()(const value_type& __x, const value_type& __y) const + { return comp(__x.first, __y.first); } + }; + private: + typedef typename _Alloc::template rebind::other + _Pair_alloc_type; + typedef _Rb_tree, + key_compare, _Pair_alloc_type> _Rep_type; + _Rep_type _M_t; + public: + typedef typename _Pair_alloc_type::pointer pointer; + typedef typename _Pair_alloc_type::const_pointer const_pointer; + typedef typename _Pair_alloc_type::reference reference; + typedef typename _Pair_alloc_type::const_reference const_reference; + typedef typename _Rep_type::iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + typedef typename _Rep_type::reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; + multimap() + : _M_t() { } + explicit + multimap(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) { } + multimap(const multimap& __x) + : _M_t(__x._M_t) { } + template + multimap(_InputIterator __first, _InputIterator __last) + : _M_t() + { _M_t._M_insert_equal(__first, __last); } + template + multimap(_InputIterator __first, _InputIterator __last, + const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) + { _M_t._M_insert_equal(__first, __last); } + multimap& + operator=(const multimap& __x) + { + _M_t = __x._M_t; + return *this; + } + allocator_type + get_allocator() const + { return _M_t.get_allocator(); } + iterator + begin() + { return _M_t.begin(); } + const_iterator + begin() const + { return _M_t.begin(); } + iterator + end() + { return _M_t.end(); } + const_iterator + end() const + { return _M_t.end(); } + reverse_iterator + rbegin() + { return _M_t.rbegin(); } + const_reverse_iterator + rbegin() const + { return _M_t.rbegin(); } + reverse_iterator + rend() + { return _M_t.rend(); } + const_reverse_iterator + rend() const + { return _M_t.rend(); } + bool + empty() const + { return _M_t.empty(); } + size_type + size() const + { return _M_t.size(); } + size_type + max_size() const + { return _M_t.max_size(); } + iterator + insert(const value_type& __x) + { return _M_t._M_insert_equal(__x); } + iterator + insert(iterator __position, const value_type& __x) + { return _M_t._M_insert_equal_(__position, __x); } + template + void + insert(_InputIterator __first, _InputIterator __last) + { _M_t._M_insert_equal(__first, __last); } + void + erase(iterator __position) + { _M_t.erase(__position); } + size_type + erase(const key_type& __x) + { return _M_t.erase(__x); } + void + erase(iterator __first, iterator __last) + { _M_t.erase(__first, __last); } + void + swap(multimap& __x) + { _M_t.swap(__x._M_t); } + void + clear() + { _M_t.clear(); } + key_compare + key_comp() const + { return _M_t.key_comp(); } + value_compare + value_comp() const + { return value_compare(_M_t.key_comp()); } + iterator + find(const key_type& __x) + { return _M_t.find(__x); } + const_iterator + find(const key_type& __x) const + { return _M_t.find(__x); } + size_type + count(const key_type& __x) const + { return _M_t.count(__x); } + iterator + lower_bound(const key_type& __x) + { return _M_t.lower_bound(__x); } + const_iterator + lower_bound(const key_type& __x) const + { return _M_t.lower_bound(__x); } + iterator + upper_bound(const key_type& __x) + { return _M_t.upper_bound(__x); } + const_iterator + upper_bound(const key_type& __x) const + { return _M_t.upper_bound(__x); } + std::pair + equal_range(const key_type& __x) + { return _M_t.equal_range(__x); } + std::pair + equal_range(const key_type& __x) const + { return _M_t.equal_range(__x); } + template + friend bool + operator==(const multimap<_K1, _T1, _C1, _A1>&, + const multimap<_K1, _T1, _C1, _A1>&); + template + friend bool + operator<(const multimap<_K1, _T1, _C1, _A1>&, + const multimap<_K1, _T1, _C1, _A1>&); + }; + template + inline bool + operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return __x._M_t == __y._M_t; } + template + inline bool + operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return __x._M_t < __y._M_t; } + template + inline bool + operator!=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return __y < __x; } + template + inline bool + operator<=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__x < __y); } + template + inline void + swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x, + multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { __x.swap(__y); } +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + extern istream cin; + extern ostream cout; + extern ostream cerr; + extern ostream clog; + extern wistream wcin; + extern wostream wcout; + extern wostream wcerr; + extern wostream wclog; + static ios_base::Init __ioinit; +} +namespace boost { namespace python { namespace detail { + template + struct compare_proxy_index + { + template + bool operator()(PyObject* prox, Index i) const + { + typedef typename Proxy::policies_type policies_type; + Proxy& proxy = extract(prox)(); + return policies_type:: + compare_index(proxy.get_container(), proxy.get_index(), i); + } + }; + template + class proxy_group + { + public: + typedef typename std::vector::const_iterator const_iterator; + typedef typename std::vector::iterator iterator; + typedef typename Proxy::index_type index_type; + typedef typename Proxy::policies_type policies_type; + iterator + first_proxy(index_type i) + { + return boost::detail::lower_bound( + proxies.begin(), proxies.end(), + i, compare_proxy_index()); + } + void + remove(Proxy& proxy) + { + for (iterator iter = first_proxy(proxy.get_index()); + iter != proxies.end(); ++iter) + { + if (&extract(*iter)() == &proxy) + { + proxies.erase(iter); + break; + } + } + ; + } + void + add(PyObject* prox) + { + ; + proxies.insert( + first_proxy(extract(prox)().get_index()), prox); + ; + } + void + erase(index_type i, mpl::false_) + { + ; + replace(i, i+1, 0); + ; + } + void + erase(index_type i, mpl::true_) + { + ; + iterator iter = first_proxy(i); + extract p(*iter); + if (iter != proxies.end() && p().get_index() == i) + { + extract p(*iter); + p().detach(); + proxies.erase(iter); + } + ; + } + void + erase(index_type from, index_type to) + { + ; + replace(from, to, 0); + ; + } + void + replace( + index_type from, + index_type to, + typename std::vector::size_type len) + { + ; + iterator left = first_proxy(from); + iterator right = proxies.end(); + for (iterator iter = left; iter != right; ++iter) + { + if (extract(*iter)().get_index() > to) + { + right = iter; + break; + } + extract p(*iter); + p().detach(); + } + typename std::vector::size_type + offset = left-proxies.begin(); + proxies.erase(left, right); + right = proxies.begin()+offset; + while (right != proxies.end()) + { + typedef typename Proxy::container_type::difference_type difference_type; + extract p(*right); + p().set_index( + extract(*right)().get_index() + - (difference_type(to) - from - len) + ); + ++right; + } + ; + } + PyObject* + find(index_type i) + { + ; + iterator iter = first_proxy(i); + if (iter != proxies.end() + && extract(*iter)().get_index() == i) + { + ; + return *iter; + } + ; + return 0; + } + typename std::vector::size_type + size() const + { + ; + return proxies.size(); + } + private: + std::vector proxies; + }; + template + class proxy_links + { + public: + typedef std::map > links_t; + typedef typename Proxy::index_type index_type; + void + remove(Proxy& proxy) + { + typename links_t::iterator r = links.find(&proxy.get_container()); + if (r != links.end()) + { + r->second.remove(proxy); + if (r->second.size() == 0) + links.erase(r); + } + } + void + add(PyObject* prox, Container& container) + { + links[&container].add(prox); + } + template + void erase(Container& container, index_type i, NoSlice no_slice) + { + typename links_t::iterator r = links.find(&container); + if (r != links.end()) + { + r->second.erase(i, no_slice); + if (r->second.size() == 0) + links.erase(r); + } + } + void + erase(Container& container, index_type from, index_type to) + { + typename links_t::iterator r = links.find(&container); + if (r != links.end()) + { + r->second.erase(from, to); + if (r->second.size() == 0) + links.erase(r); + } + } + void + replace( + Container& container, + index_type from, index_type to, index_type len) + { + typename links_t::iterator r = links.find(&container); + if (r != links.end()) + { + r->second.replace(from, to, len); + if (r->second.size() == 0) + links.erase(r); + } + } + PyObject* + find(Container& container, index_type i) + { + typename links_t::iterator r = links.find(&container); + if (r != links.end()) + return r->second.find(i); + return 0; + } + private: + links_t links; + }; + template + class container_element + { + public: + typedef Index index_type; + typedef Container container_type; + typedef typename Policies::data_type element_type; + typedef Policies policies_type; + typedef container_element self_t; + typedef proxy_group links_type; + container_element(object container, Index index) + : ptr() + , container(container) + , index(index) + { + } + container_element(container_element const& ce) + : ptr(ce.ptr.get() == 0 ? 0 : new element_type(*ce.ptr.get())) + , container(ce.container) + , index(ce.index) + { + } + ~container_element() + { + if (!is_detached()) + get_links().remove(*this); + } + element_type& operator*() const + { + if (is_detached()) + return *get_pointer(ptr); + return Policies::get_item(get_container(), index); + } + element_type* get() const + { + if (is_detached()) + return get_pointer(ptr); + return &Policies::get_item(get_container(), index); + } + void + detach() + { + if (!is_detached()) + { + ptr.reset( + new element_type( + Policies::get_item(get_container(), index))); + container = object(); + } + } + bool + is_detached() const + { + return get_pointer(ptr) != 0; + } + Container& + get_container() const + { + return extract(container)(); + } + Index + get_index() const + { + return index; + } + void + set_index(Index i) + { + index = i; + } + static proxy_links& + get_links() + { + static proxy_links links; + return links; + } + private: + container_element& operator=(container_element const& ce); + scoped_ptr ptr; + object container; + Index index; + }; + template < + class Container + , class DerivedPolicies + , class ContainerElement + , class Index + > + struct no_proxy_helper + { + static void + register_container_element() + { + } + template + static object + base_get_item_helper(DataType const& p, mpl::true_) + { + return object(ptr(p)); + } + template + static object + base_get_item_helper(DataType const& x, mpl::false_) + { + return object(x); + } + static object + base_get_item_(back_reference const& container, PyObject* i) + { + return base_get_item_helper( + DerivedPolicies::get_item( + container.get(), DerivedPolicies:: + convert_index(container.get(), i)) + , is_pointer() + ); + } + static void + base_replace_indexes( + Container& , Index , + Index , Index ) + { + } + template + static void + base_erase_index( + Container& , Index , NoSlice ) + { + } + static void + base_erase_indexes(Container& , Index , Index ) + { + } + }; + template < + class Container + , class DerivedPolicies + , class ContainerElement + , class Index + > + struct proxy_helper + { + static void + register_container_element() + { + register_ptr_to_python(); + } + static object + base_get_item_(back_reference const& container, PyObject* i) + { + Index idx = DerivedPolicies::convert_index(container.get(), i); + if (PyObject* shared = + ContainerElement::get_links().find(container.get(), idx)) + { + handle<> h(python::borrowed(shared)); + return object(h); + } + else + { + object prox(ContainerElement(container.source(), idx)); + ContainerElement:: + get_links().add(prox.ptr(), container.get()); + return prox; + } + } + static void + base_replace_indexes( + Container& container, Index from, + Index to, Index n) + { + ContainerElement::get_links().replace(container, from, to, n); + } + template + static void + base_erase_index( + Container& container, Index i, NoSlice no_slice) + { + ContainerElement::get_links().erase(container, i, no_slice); + } + static void + base_erase_indexes( + Container& container, Index from, Index to) + { + ContainerElement::get_links().erase(container, from, to); + } + }; + template < + class Container + , class DerivedPolicies + , class ProxyHandler + , class Data + , class Index + > + struct slice_helper + { + static object + base_get_slice(Container& container, PySliceObject* slice) + { + Index from, to; + base_get_slice_data(container, slice, from, to); + return DerivedPolicies::get_slice(container, from, to); + } + static void + base_get_slice_data( + Container& container, PySliceObject* slice, Index& from_, Index& to_) + { + if ((&_Py_NoneStruct) != slice->step) { + PyErr_SetString( PyExc_IndexError, "slice step size not supported."); + throw_error_already_set(); + } + Index min_index = DerivedPolicies::get_min_index(container); + Index max_index = DerivedPolicies::get_max_index(container); + if ((&_Py_NoneStruct) == slice->start) { + from_ = min_index; + } + else { + long from = extract( slice->start); + if (from < 0) + from += max_index; + if (from < 0) + from = 0; + from_ = boost::numeric_cast(from); + if (from_ > max_index) + from_ = max_index; + } + if ((&_Py_NoneStruct) == slice->stop) { + to_ = max_index; + } + else { + long to = extract( slice->stop); + if (to < 0) + to += max_index; + if (to < 0) + to = 0; + to_ = boost::numeric_cast(to); + if (to_ > max_index) + to_ = max_index; + } + } + static void + base_set_slice(Container& container, PySliceObject* slice, PyObject* v) + { + Index from, to; + base_get_slice_data(container, slice, from, to); + extract elem(v); + if (elem.check()) + { + ProxyHandler::base_replace_indexes(container, from, to, 1); + DerivedPolicies::set_slice(container, from, to, elem()); + } + else + { + extract elem(v); + if (elem.check()) + { + ProxyHandler::base_replace_indexes(container, from, to, 1); + DerivedPolicies::set_slice(container, from, to, elem()); + } + else + { + handle<> l_(python::borrowed(v)); + object l(l_); + std::vector temp; + for (int i = 0; i < l.attr("__len__")(); i++) + { + object elem(l[i]); + extract x(elem); + if (x.check()) + { + temp.push_back(x()); + } + else + { + extract x(elem); + if (x.check()) + { + temp.push_back(x()); + } + else + { + PyErr_SetString(PyExc_TypeError, + "Invalid sequence element"); + throw_error_already_set(); + } + } + } + ProxyHandler::base_replace_indexes(container, from, to, + temp.end()-temp.begin()); + DerivedPolicies::set_slice(container, from, to, + temp.begin(), temp.end()); + } + } + } + static void + base_delete_slice(Container& container, PySliceObject* slice) + { + Index from, to; + base_get_slice_data(container, slice, from, to); + ProxyHandler::base_erase_indexes(container, from, to); + DerivedPolicies::delete_slice(container, from, to); + } + }; + template < + class Container + , class DerivedPolicies + , class ProxyHandler + , class Data + , class Index + > + struct no_slice_helper + { + static void + slicing_not_suported() + { + PyErr_SetString(PyExc_RuntimeError, "Slicing not supported"); + throw_error_already_set(); + } + static object + base_get_slice(Container& , PySliceObject* ) + { + slicing_not_suported(); + return object(); + } + static void + base_set_slice(Container& , PySliceObject* , PyObject* ) + { + slicing_not_suported(); + } + static void + base_delete_slice(Container& , PySliceObject* ) + { + slicing_not_suported(); + } + }; + template + inline typename Policies::data_type* + get_pointer( + python::detail::container_element const& p) + { + return p.get(); + } + using boost::python::get_pointer; + using boost::get_pointer; +}} +} +namespace boost { namespace python { + template < + class Container + , class DerivedPolicies + , bool NoProxy = false + , bool NoSlice = false + , class Data = typename Container::value_type + , class Index = typename Container::size_type + , class Key = typename Container::value_type + > + class indexing_suite + : public def_visitor< + indexing_suite< + Container + , DerivedPolicies + , NoProxy + , NoSlice + , Data + , Index + , Key + > > + { + private: + typedef mpl::or_< + mpl::bool_ + , mpl::not_ > + , typename mpl::or_< + is_same + , is_same > + , is_same > + , is_same > >::type> + no_proxy; + typedef detail::container_element + container_element_t; + typedef return_internal_reference<> return_policy; + typedef typename mpl::if_< + no_proxy + , iterator + , iterator >::type + def_iterator; + typedef typename mpl::if_< + no_proxy + , detail::no_proxy_helper< + Container + , DerivedPolicies + , container_element_t + , Index> + , detail::proxy_helper< + Container + , DerivedPolicies + , container_element_t + , Index> >::type + proxy_handler; + typedef typename mpl::if_< + mpl::bool_ + , detail::no_slice_helper< + Container + , DerivedPolicies + , proxy_handler + , Data + , Index> + , detail::slice_helper< + Container + , DerivedPolicies + , proxy_handler + , Data + , Index> >::type + slice_handler; + public: + template + void visit(Class& cl) const + { + proxy_handler::register_container_element(); + cl + .def("__len__", base_size) + .def("__setitem__", &base_set_item) + .def("__delitem__", &base_delete_item) + .def("__getitem__", &base_get_item) + .def("__contains__", &base_contains) + .def("__iter__", def_iterator()) + ; + DerivedPolicies::extension_def(cl); + } + template + static void + extension_def(Class& cl) + { + } + private: + static object + base_get_item(back_reference container, PyObject* i) + { + if (((((PyObject*)(i))->ob_type) == &PySlice_Type)) + return slice_handler::base_get_slice( + container.get(), static_cast(static_cast(i))); + return proxy_handler::base_get_item_(container, i); + } + static void + base_set_item(Container& container, PyObject* i, PyObject* v) + { + if (((((PyObject*)(i))->ob_type) == &PySlice_Type)) + { + slice_handler::base_set_slice(container, + static_cast(static_cast(i)), v); + } + else + { + extract elem(v); + if (elem.check()) + { + DerivedPolicies:: + set_item(container, + DerivedPolicies:: + convert_index(container, i), elem()); + } + else + { + extract elem(v); + if (elem.check()) + { + DerivedPolicies:: + set_item(container, + DerivedPolicies:: + convert_index(container, i), elem()); + } + else + { + PyErr_SetString(PyExc_TypeError, "Invalid assignment"); + throw_error_already_set(); + } + } + } + } + static void + base_delete_item(Container& container, PyObject* i) + { + if (((((PyObject*)(i))->ob_type) == &PySlice_Type)) + { + slice_handler::base_delete_slice( + container, static_cast(static_cast(i))); + return; + } + Index index = DerivedPolicies::convert_index(container, i); + proxy_handler::base_erase_index(container, index, mpl::bool_()); + DerivedPolicies::delete_item(container, index); + } + static size_t + base_size(Container& container) + { + return DerivedPolicies::size(container); + } + static bool + base_contains(Container& container, PyObject* key) + { + extract x(key); + if (x.check()) + { + return DerivedPolicies::contains(container, x()); + } + else + { + extract x(key); + if (x.check()) + return DerivedPolicies::contains(container, x()); + else + return false; + } + } + }; +}} + +namespace boost +{ + namespace range_detail + { + using type_traits::yes_type; + using type_traits::no_type; + yes_type is_string_impl( const char* const ); + yes_type is_string_impl( const wchar_t* const ); + no_type is_string_impl( ... ); + template< std::size_t sz > + yes_type is_char_array_impl( char (&boost_range_array)[sz] ); + template< std::size_t sz > + yes_type is_char_array_impl( const char (&boost_range_array)[sz] ); + no_type is_char_array_impl( ... ); + template< std::size_t sz > + yes_type is_wchar_t_array_impl( wchar_t (&boost_range_array)[sz] ); + template< std::size_t sz > + yes_type is_wchar_t_array_impl( const wchar_t (&boost_range_array)[sz] ); + no_type is_wchar_t_array_impl( ... ); + yes_type is_char_ptr_impl( char* const ); + no_type is_char_ptr_impl( ... ); + yes_type is_const_char_ptr_impl( const char* const ); + no_type is_const_char_ptr_impl( ... ); + yes_type is_wchar_t_ptr_impl( wchar_t* const ); + no_type is_wchar_t_ptr_impl( ... ); + yes_type is_const_wchar_t_ptr_impl( const wchar_t* const ); + no_type is_const_wchar_t_ptr_impl( ... ); + template< typename Iterator > + yes_type is_pair_impl( const std::pair* ); + no_type is_pair_impl( ... ); + struct char_or_wchar_t_array_tag {}; + } +} + +namespace boost +{ + namespace range_detail + { + typedef mpl::int_<1>::type std_container_; + typedef mpl::int_<2>::type std_pair_; + typedef mpl::int_<3>::type const_std_pair_; + typedef mpl::int_<4>::type array_; + typedef mpl::int_<5>::type const_array_; + typedef mpl::int_<6>::type char_array_; + typedef mpl::int_<7>::type wchar_t_array_; + typedef mpl::int_<8>::type char_ptr_; + typedef mpl::int_<9>::type const_char_ptr_; + typedef mpl::int_<10>::type wchar_t_ptr_; + typedef mpl::int_<11>::type const_wchar_t_ptr_; + typedef mpl::int_<12>::type string_; + template< typename C > + struct range_helper + { + static C* c; + static C ptr; + static const bool is_pair_ = sizeof( boost::range_detail::is_pair_impl( c ) ) == sizeof( yes_type ); + static const bool is_char_ptr_ = sizeof( boost::range_detail::is_char_ptr_impl( ptr ) ) == sizeof( yes_type ); + static const bool is_const_char_ptr_ = sizeof( boost::range_detail::is_const_char_ptr_impl( ptr ) ) == sizeof( yes_type ); + static const bool is_wchar_t_ptr_ = sizeof( boost::range_detail::is_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ); + static const bool is_const_wchar_t_ptr_ = sizeof( boost::range_detail::is_const_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ); + static const bool is_char_array_ = sizeof( boost::range_detail::is_char_array_impl( ptr ) ) == sizeof( yes_type ); + static const bool is_wchar_t_array_ = sizeof( boost::range_detail::is_wchar_t_array_impl( ptr ) ) == sizeof( yes_type ); + static const bool is_string_ = (boost::type_traits::ice_or::value ); + static const bool is_array_ = boost::is_array::value; + }; + template< typename C > + class range + { + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_pair_, + boost::range_detail::std_pair_, + void >::type pair_t; + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_array_, + boost::range_detail::array_, + pair_t >::type array_t; + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_string_, + boost::range_detail::string_, + array_t >::type string_t; + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_const_char_ptr_, + boost::range_detail::const_char_ptr_, + string_t >::type const_char_ptr_t; + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_char_ptr_, + boost::range_detail::char_ptr_, + const_char_ptr_t >::type char_ptr_t; + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_const_wchar_t_ptr_, + boost::range_detail::const_wchar_t_ptr_, + char_ptr_t >::type const_wchar_ptr_t; + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_wchar_t_ptr_, + boost::range_detail::wchar_t_ptr_, + const_wchar_ptr_t >::type wchar_ptr_t; + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_wchar_t_array_, + boost::range_detail::wchar_t_array_, + wchar_ptr_t >::type wchar_array_t; + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_char_array_, + boost::range_detail::char_array_, + wchar_array_t >::type char_array_t; + public: + typedef typename boost::mpl::if_c< ::boost::is_void::value, + boost::range_detail::std_container_, + char_array_t >::type type; + }; + } +} + +namespace boost +{ + namespace range_detail + { + template + inline void boost_range_silence_warning( const T& ) { } + inline const char* str_end( const char* s, const char* ) + { + return s + strlen( s ); + } + inline const wchar_t* str_end( const wchar_t* s, const wchar_t* ) + { + return s + wcslen( s ); + } + template< class Char > + inline Char* str_end( Char* s ) + { + return const_cast( str_end( s, s ) ); + } + template< class T, std::size_t sz > + inline T* array_end( T (&boost_range_array)[sz] ) + { + return boost_range_array + sz; + } + template< class T, std::size_t sz > + inline const T* array_end( const T (&boost_range_array)[sz] ) + { + return boost_range_array + sz; + } + template< class Char > + inline std::size_t str_size( const Char* const& s ) + { + return str_end( s ) - s; + } + template< class T, std::size_t sz > + inline std::size_t array_size( T (&boost_range_array)[sz] ) + { + boost_range_silence_warning( boost_range_array ); + return sz; + } + template< class T, std::size_t sz > + inline std::size_t array_size( const T (&boost_range_array)[sz] ) + { + boost_range_silence_warning( boost_range_array ); + return sz; + } + } +} + +namespace boost +{ + template< typename C > + struct range_mutable_iterator + { + typedef typename C::iterator type; + }; + template< typename Iterator > + struct range_mutable_iterator< std::pair > + { + typedef Iterator type; + }; + template< typename T, std::size_t sz > + struct range_mutable_iterator< T[sz] > + { + typedef T* type; + }; +} + +namespace boost +{ + template< typename C > + struct range_const_iterator + { + typedef typename C::const_iterator type; + }; + template< typename Iterator > + struct range_const_iterator< std::pair > + { + typedef Iterator type; + }; + template< typename T, std::size_t sz > + struct range_const_iterator< T[sz] > + { + typedef const T* type; + }; +} +namespace boost +{ + template< typename C > + struct range_iterator + { + typedef typename + mpl::eval_if_c< is_const::value, + range_const_iterator< typename remove_const::type >, + range_mutable_iterator >::type type; + }; +} +namespace boost +{ +namespace range_detail +{ + template< typename C > + inline typename range_iterator::type + range_end( C& c ) + { + return c.end(); + } + template< typename Iterator > + inline Iterator range_end( const std::pair& p ) + { + return p.second; + } + template< typename Iterator > + inline Iterator range_end( std::pair& p ) + { + return p.second; + } + template< typename T, std::size_t sz > + inline const T* range_end( const T (&a)[sz] ) + { + return range_detail::array_end( a ); + } + template< typename T, std::size_t sz > + inline T* range_end( T (&a)[sz] ) + { + return range_detail::array_end( a ); + } +} +template< class T > +inline typename range_iterator::type end( T& r ) +{ + using namespace range_detail; + return range_end( r ); +} +template< class T > +inline typename range_iterator::type end( const T& r ) +{ + using namespace range_detail; + return range_end( r ); +} +} +namespace boost +{ + template< class T > + inline typename range_iterator::type + const_end( const T& r ) + { + return boost::end( r ); + } +} +namespace boost +{ +namespace range_detail +{ + template< typename C > + inline typename range_iterator::type + range_begin( C& c ) + { + return c.begin(); + } + template< typename Iterator > + inline Iterator range_begin( const std::pair& p ) + { + return p.first; + } + template< typename Iterator > + inline Iterator range_begin( std::pair& p ) + { + return p.first; + } + template< typename T, std::size_t sz > + inline const T* range_begin( const T (&a)[sz] ) + { + return a; + } + template< typename T, std::size_t sz > + inline T* range_begin( T (&a)[sz] ) + { + return a; + } +} +template< class T > +inline typename range_iterator::type begin( T& r ) +{ + using namespace range_detail; + return range_begin( r ); +} +template< class T > +inline typename range_iterator::type begin( const T& r ) +{ + using namespace range_detail; + return range_begin( r ); +} +} +namespace boost +{ + template< class T > + inline typename range_iterator::type + const_begin( const T& r ) + { + return boost::begin( r ); + } +} +namespace boost { +struct no_traversal_tag {}; +struct incrementable_traversal_tag + : no_traversal_tag +{ +}; +struct single_pass_traversal_tag + : incrementable_traversal_tag +{ +}; +struct forward_traversal_tag + : single_pass_traversal_tag +{ +}; +struct bidirectional_traversal_tag + : forward_traversal_tag +{ +}; +struct random_access_traversal_tag + : bidirectional_traversal_tag +{ +}; +namespace detail +{ + template + struct old_category_to_traversal + : mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , void + > + > + > + > + > + {}; + template + struct pure_traversal_tag + : mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , void + > + > + > + > + > + { + }; +} +template +struct iterator_category_to_traversal + : mpl::eval_if< + is_convertible + , mpl::identity + , boost::detail::old_category_to_traversal + > +{}; +template +struct iterator_traversal + : iterator_category_to_traversal< + typename boost::detail::iterator_traits::iterator_category + > +{}; +} +namespace boost +{ + template + struct is_interoperable + : mpl::or_< + is_convertible< A, B > + , is_convertible< B, A > > + { + }; +} +namespace boost { struct use_default; } +namespace boost { namespace detail { +struct input_output_iterator_tag + : std::input_iterator_tag +{ + operator std::output_iterator_tag() const + { + return std::output_iterator_tag(); + } +}; +template +struct iterator_writability_disabled + : mpl::or_< + is_const + , boost::detail::indirect_traits::is_reference_to_const + , is_const + > +{}; +template +struct iterator_facade_default_category + : mpl::eval_if< + mpl::and_< + is_reference + , is_convertible + > + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::if_< + is_convertible + , std::bidirectional_iterator_tag + , std::forward_iterator_tag + > + > + , typename mpl::eval_if< + mpl::and_< + is_convertible + , is_convertible + > + , mpl::identity + , mpl::identity + > + > +{ +}; +template +struct is_iterator_category + : mpl::or_< + is_convertible + , is_convertible + > +{ +}; +template +struct is_iterator_traversal + : is_convertible +{}; +template +struct iterator_category_with_traversal + : Category, Traversal +{ + enum { mpl_assertion_in_line_149 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) ( is_convertible< typename iterator_category_to_traversal::type , Traversal >))0, 1 ) ) ) } + ; + enum { mpl_assertion_in_line_151 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_arg( (void (*) (is_iterator_category))0, 1 ) ) ) }; + enum { mpl_assertion_in_line_152 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (is_iterator_category))0, 1 ) ) ) }; + enum { mpl_assertion_in_line_153 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (is_iterator_traversal))0, 1 ) ) ) }; + enum { mpl_assertion_in_line_155 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_arg( (void (*) (is_iterator_traversal))0, 1 ) ) ) }; +}; +template +struct facade_iterator_category_impl +{ + enum { mpl_assertion_in_line_166 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (is_iterator_category))0, 1 ) ) ) }; + typedef typename iterator_facade_default_category< + Traversal,ValueParam,Reference + >::type category; + typedef typename mpl::if_< + is_same< + Traversal + , typename iterator_category_to_traversal::type + > + , category + , iterator_category_with_traversal + >::type type; +}; +template +struct facade_iterator_category + : mpl::eval_if< + is_iterator_category + , mpl::identity + , facade_iterator_category_impl + > +{ +}; +}} +namespace boost { namespace mpl { +template< typename Value > struct always +{ + template< + typename T + , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na + > + struct apply + { + typedef Value type; + }; +}; +}} +namespace boost +{ + template class iterator_facade; + namespace detail + { + struct always_bool2 + { + template + struct apply + { + typedef bool type; + }; + }; + template < + class Facade1 + , class Facade2 + , class Return + > + struct enable_if_interoperable + : ::boost::iterators::enable_if< + mpl::or_< + is_convertible + , is_convertible + > + , Return + > + {}; + template < + class ValueParam + , class CategoryOrTraversal + , class Reference + , class Difference + > + struct iterator_facade_types + { + typedef typename facade_iterator_category< + CategoryOrTraversal, ValueParam, Reference + >::type iterator_category; + typedef typename remove_const::type value_type; + typedef typename mpl::eval_if< + boost::detail::iterator_writability_disabled + , add_pointer + , add_pointer + >::type pointer; + }; + template + class postfix_increment_proxy + { + typedef typename iterator_value::type value_type; + public: + explicit postfix_increment_proxy(Iterator const& x) + : stored_value(*x) + {} + value_type& + operator*() const + { + return this->stored_value; + } + private: + mutable value_type stored_value; + }; + template + class writable_postfix_increment_proxy + { + typedef typename iterator_value::type value_type; + public: + explicit writable_postfix_increment_proxy(Iterator const& x) + : stored_value(*x) + , stored_iterator(x) + {} + writable_postfix_increment_proxy const& + operator*() const + { + return *this; + } + operator value_type&() const + { + return stored_value; + } + template + T const& operator=(T const& x) const + { + *this->stored_iterator = x; + return x; + } + template + T& operator=(T& x) const + { + *this->stored_iterator = x; + return x; + } + operator Iterator const&() const + { + return stored_iterator; + } + private: + mutable value_type stored_value; + Iterator stored_iterator; + }; + template + struct is_non_proxy_reference + : is_convertible< + typename remove_reference::type + const volatile* + , Value const volatile* + > + {}; + template + struct postfix_increment_result + : mpl::eval_if< + mpl::and_< + is_convertible + , mpl::not_< + is_convertible< + typename iterator_category_to_traversal::type + , forward_traversal_tag + > + > + > + , mpl::if_< + is_non_proxy_reference + , postfix_increment_proxy + , writable_postfix_increment_proxy + > + , mpl::identity + > + {}; + template + struct operator_arrow_proxy + { + operator_arrow_proxy(T const* px) : m_value(*px) {} + T* operator->() const { return &m_value; } + operator T*() const { return &m_value; } + mutable T m_value; + }; + template + struct operator_arrow_result + { + typedef typename mpl::if_< + is_reference + , Pointer + , operator_arrow_proxy + >::type type; + static type make(Reference x) + { + return implicit_cast(&x); + } + }; + template + class operator_brackets_proxy + { + typedef typename Iterator::reference reference; + typedef typename Iterator::value_type value_type; + public: + operator_brackets_proxy(Iterator const& iter) + : m_iter(iter) + {} + operator reference() const + { + return *m_iter; + } + operator_brackets_proxy& operator=(value_type const& val) + { + *m_iter = val; + return *this; + } + private: + Iterator m_iter; + }; + template + struct use_operator_brackets_proxy + : mpl::not_< + mpl::and_< + boost::is_POD + , iterator_writability_disabled + > + > + {}; + template + struct operator_brackets_result + { + typedef typename mpl::if_< + use_operator_brackets_proxy + , operator_brackets_proxy + , Value + >::type type; + }; + template + operator_brackets_proxy make_operator_brackets_result(Iterator const& iter, mpl::true_) + { + return operator_brackets_proxy(iter); + } + template + typename Iterator::value_type make_operator_brackets_result(Iterator const& iter, mpl::false_) + { + return *iter; + } + struct choose_difference_type + { + template + struct apply + : + mpl::eval_if< + is_convertible + , iterator_difference + , iterator_difference + > + {}; + }; + } + class iterator_core_access + { + template friend class iterator_facade; + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator ==( iterator_facade const& lhs , iterator_facade const& rhs); + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator !=( iterator_facade const& lhs , iterator_facade const& rhs); + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator <( iterator_facade const& lhs , iterator_facade const& rhs); + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator >( iterator_facade const& lhs , iterator_facade const& rhs); + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator <=( iterator_facade const& lhs , iterator_facade const& rhs); + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator >=( iterator_facade const& lhs , iterator_facade const& rhs); + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator -( iterator_facade const& lhs , iterator_facade const& rhs) + ; + template friend inline Derived operator+ (iterator_facade const& , typename Derived::difference_type) + ; + template friend inline Derived operator+ (typename Derived::difference_type , iterator_facade const&) + ; + template + static typename Facade::reference dereference(Facade const& f) + { + return f.dereference(); + } + template + static void increment(Facade& f) + { + f.increment(); + } + template + static void decrement(Facade& f) + { + f.decrement(); + } + template + static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::true_) + { + return f1.equal(f2); + } + template + static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::false_) + { + return f2.equal(f1); + } + template + static void advance(Facade& f, typename Facade::difference_type n) + { + f.advance(n); + } + template + static typename Facade1::difference_type distance_from( + Facade1 const& f1, Facade2 const& f2, mpl::true_) + { + return -f1.distance_to(f2); + } + template + static typename Facade2::difference_type distance_from( + Facade1 const& f1, Facade2 const& f2, mpl::false_) + { + return f2.distance_to(f1); + } + template + static I& derived(iterator_facade& facade) + { + return *static_cast(&facade); + } + template + static I const& derived(iterator_facade const& facade) + { + return *static_cast(&facade); + } + private: + iterator_core_access(); + }; + template < + class Derived + , class Value + , class CategoryOrTraversal + , class Reference = Value& + , class Difference = std::ptrdiff_t + > + class iterator_facade + { + private: + Derived& derived() + { + return *static_cast(this); + } + Derived const& derived() const + { + return *static_cast(this); + } + typedef boost::detail::iterator_facade_types< + Value, CategoryOrTraversal, Reference, Difference + > associated_types; + protected: + typedef iterator_facade iterator_facade_; + public: + typedef typename associated_types::value_type value_type; + typedef Reference reference; + typedef Difference difference_type; + typedef typename associated_types::pointer pointer; + typedef typename associated_types::iterator_category iterator_category; + reference operator*() const + { + return iterator_core_access::dereference(this->derived()); + } + typename boost::detail::operator_arrow_result< + value_type + , reference + , pointer + >::type + operator->() const + { + return boost::detail::operator_arrow_result< + value_type + , reference + , pointer + >::make(*this->derived()); + } + typename boost::detail::operator_brackets_result::type + operator[](difference_type n) const + { + typedef boost::detail::use_operator_brackets_proxy use_proxy; + return boost::detail::make_operator_brackets_result( + this->derived() + n + , use_proxy() + ); + } + Derived& operator++() + { + iterator_core_access::increment(this->derived()); + return this->derived(); + } + Derived& operator--() + { + iterator_core_access::decrement(this->derived()); + return this->derived(); + } + Derived operator--(int) + { + Derived tmp(this->derived()); + --*this; + return tmp; + } + Derived& operator+=(difference_type n) + { + iterator_core_access::advance(this->derived(), n); + return this->derived(); + } + Derived& operator-=(difference_type n) + { + iterator_core_access::advance(this->derived(), -n); + return this->derived(); + } + Derived operator-(difference_type x) const + { + Derived result(this->derived()); + return result -= x; + } + }; + template + inline typename boost::detail::postfix_increment_result::type + operator++( + iterator_facade& i + , int + ) + { + typename boost::detail::postfix_increment_result::type + tmp(*static_cast(&i)); + ++i; + return tmp; + } + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator ==( iterator_facade const& lhs , iterator_facade const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> boost_static_assert_typedef_836; return iterator_core_access::equal( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator !=( iterator_facade const& lhs , iterator_facade const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> boost_static_assert_typedef_837; return ! iterator_core_access::equal( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator <( iterator_facade const& lhs , iterator_facade const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> boost_static_assert_typedef_839; return 0 > iterator_core_access::distance_from( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator >( iterator_facade const& lhs , iterator_facade const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> boost_static_assert_typedef_840; return 0 < iterator_core_access::distance_from( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator <=( iterator_facade const& lhs , iterator_facade const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> boost_static_assert_typedef_841; return 0 >= iterator_core_access::distance_from( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator >=( iterator_facade const& lhs , iterator_facade const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> boost_static_assert_typedef_842; return 0 <= iterator_core_access::distance_from( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator -( iterator_facade const& lhs , iterator_facade const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> + boost_static_assert_typedef_851 + ; return iterator_core_access::distance_from( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } +template inline Derived operator+ ( iterator_facade const& i , typename Derived::difference_type n ) { Derived tmp(static_cast(i)); return tmp += n; } +template inline Derived operator+ ( typename Derived::difference_type n , iterator_facade const& i ) { Derived tmp(static_cast(i)); return tmp += n; } +} +namespace boost +{ + struct use_default; + template + struct is_convertible + : mpl::false_ {}; + namespace detail + { + struct enable_type; + } + template + struct enable_if_convertible + : iterators::enable_if< + is_convertible + , boost::detail::enable_type + > + {}; + namespace detail + { + template + struct ia_dflt_help + : mpl::eval_if< + is_same + , DefaultNullaryFn + , mpl::identity + > + { + }; + template < + class Derived + , class Base + , class Value + , class Traversal + , class Reference + , class Difference + > + struct iterator_adaptor_base + { + typedef iterator_facade< + Derived + , typename boost::detail::ia_dflt_help< + Value + , mpl::eval_if< + is_same + , iterator_value + , remove_reference + > + >::type + , typename boost::detail::ia_dflt_help< + Traversal + , iterator_traversal + >::type + , typename boost::detail::ia_dflt_help< + Reference + , mpl::eval_if< + is_same + , iterator_reference + , add_reference + > + >::type + , typename boost::detail::ia_dflt_help< + Difference, iterator_difference + >::type + > + type; + }; + template + inline void iterator_adaptor_assert_traversal () + { + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((is_convertible::value)) == 0 ? false : true) >)> boost_static_assert_typedef_230; + } + } + template < + class Derived + , class Base + , class Value = use_default + , class Traversal = use_default + , class Reference = use_default + , class Difference = use_default + > + class iterator_adaptor + : public boost::detail::iterator_adaptor_base< + Derived, Base, Value, Traversal, Reference, Difference + >::type + { + friend class iterator_core_access; + protected: + typedef typename boost::detail::iterator_adaptor_base< + Derived, Base, Value, Traversal, Reference, Difference + >::type super_t; + public: + iterator_adaptor() {} + explicit iterator_adaptor(Base const &iter) + : m_iterator(iter) + { + } + typedef Base base_type; + Base const& base() const + { return m_iterator; } + protected: + typedef iterator_adaptor iterator_adaptor_; + Base const& base_reference() const + { return m_iterator; } + Base& base_reference() + { return m_iterator; } + private: + typename super_t::reference dereference() const + { return *m_iterator; } + template < + class OtherDerived, class OtherIterator, class V, class C, class R, class D + > + bool equal(iterator_adaptor const& x) const + { + return m_iterator == x.base(); + } + typedef typename iterator_category_to_traversal< + typename super_t::iterator_category + >::type my_traversal; + void advance(typename super_t::difference_type n) + { + boost::detail::iterator_adaptor_assert_traversal(); + m_iterator += n; + } + void increment() { ++m_iterator; } + void decrement() + { + boost::detail::iterator_adaptor_assert_traversal(); + --m_iterator; + } + template < + class OtherDerived, class OtherIterator, class V, class C, class R, class D + > + typename super_t::difference_type distance_to( + iterator_adaptor const& y) const + { + boost::detail::iterator_adaptor_assert_traversal(); + return y.base() - m_iterator; + } + private: + Base m_iterator; + }; +} +namespace boost +{ + template + class reverse_iterator + : public iterator_adaptor< reverse_iterator, Iterator > + { + typedef iterator_adaptor< reverse_iterator, Iterator > super_t; + friend class iterator_core_access; + public: + reverse_iterator() {} + explicit reverse_iterator(Iterator x) + : super_t(x) {} + template + reverse_iterator( + reverse_iterator const& r + , typename enable_if_convertible::type* = 0 + ) + : super_t(r.base()) + {} + private: + typename super_t::reference dereference() const { return *boost::prior(this->base()); } + void increment() { --this->base_reference(); } + void decrement() { ++this->base_reference(); } + void advance(typename super_t::difference_type n) + { + this->base_reference() += -n; + } + template + typename super_t::difference_type + distance_to(reverse_iterator const& y) const + { + return this->base_reference() - y.base(); + } + }; + template + reverse_iterator make_reverse_iterator(BidirectionalIterator x) + { + return reverse_iterator(x); + } +} +namespace boost +{ + template< typename C > + struct range_reverse_iterator + { + typedef reverse_iterator< + typename range_iterator::type > type; + }; +} +namespace boost +{ +template< class C > +inline typename range_reverse_iterator::type +rend( C& c ) +{ + typedef typename range_reverse_iterator::type + iter_type; + return iter_type( boost::begin( c ) ); +} +template< class C > +inline typename range_reverse_iterator::type +rend( const C& c ) +{ + typedef typename range_reverse_iterator::type + iter_type; + return iter_type( boost::begin( c ) ); +} +template< class T > +inline typename range_reverse_iterator::type +const_rend( const T& r ) +{ + return boost::rend( r ); +} +} +namespace boost +{ +template< class C > +inline typename range_reverse_iterator::type +rbegin( C& c ) +{ + typedef typename range_reverse_iterator::type + iter_type; + return iter_type( boost::end( c ) ); +} +template< class C > +inline typename range_reverse_iterator::type +rbegin( const C& c ) +{ + typedef typename range_reverse_iterator::type + iter_type; + return iter_type( boost::end( c ) ); +} +template< class T > +inline typename range_reverse_iterator::type +const_rbegin( const T& r ) +{ + return boost::rbegin( r ); +} +} +enum boost_foreach_argument_dependent_lookup_hack +{ + boost_foreach_argument_dependent_lookup_hack_value +}; +namespace boost +{ +template +class iterator_range; +template +class sub_range; +namespace + Q_FOREACH +{ + template + inline std::pair in_range(T begin, T end) + { + return std::make_pair(begin, end); + } + typedef boost_foreach_argument_dependent_lookup_hack tag; + template + struct is_lightweight_proxy + : boost::mpl::false_ + { + }; + template + struct is_noncopyable + : boost::mpl::or_< + boost::is_abstract + , boost::is_base_and_derived + > + { + }; +} +} +template +inline boost:: + Q_FOREACH + ::is_lightweight_proxy * +boost_foreach_is_lightweight_proxy(T *&, boost:: + Q_FOREACH + ::tag) { return 0; } +template +inline boost::mpl::true_ * +boost_foreach_is_lightweight_proxy(std::pair *&, boost:: + Q_FOREACH + ::tag) { return 0; } +template +inline boost::mpl::true_ * +boost_foreach_is_lightweight_proxy(boost::iterator_range *&, boost:: + Q_FOREACH + ::tag) { return 0; } +template +inline boost::mpl::true_ * +boost_foreach_is_lightweight_proxy(boost::sub_range *&, boost:: + Q_FOREACH + ::tag) { return 0; } +template +inline boost::mpl::true_ * +boost_foreach_is_lightweight_proxy(T **&, boost:: + Q_FOREACH + ::tag) { return 0; } +template +inline boost:: + Q_FOREACH + ::is_noncopyable * +boost_foreach_is_noncopyable(T *&, boost:: + Q_FOREACH + ::tag) { return 0; } +namespace boost +{ +namespace foreach_detail_ +{ +template +inline boost::mpl::and_ *and_(Bool1 *, Bool2 *) { return 0; } +template +inline boost::mpl::and_ *and_(Bool1 *, Bool2 *, Bool3 *) { return 0; } +template +inline boost::mpl::or_ *or_(Bool1 *, Bool2 *) { return 0; } +template +inline boost::mpl::or_ *or_(Bool1 *, Bool2 *, Bool3 *) { return 0; } +template +inline boost::mpl::not_ *not_(Bool1 *) { return 0; } +template +inline boost::mpl::false_ *is_rvalue_(T &, int) { return 0; } +template +inline boost::mpl::true_ *is_rvalue_(T const &, ...) { return 0; } +template +inline boost::is_array *is_array_(T const &) { return 0; } +template +inline boost::is_const *is_const_(T &) { return 0; } +template +inline boost::mpl::true_ *is_const_(T const &) { return 0; } +struct auto_any_base +{ + operator bool() const + { + return false; + } +}; +template +struct auto_any : auto_any_base +{ + auto_any(T const &t) + : item(t) + { + } + mutable T item; +}; +typedef auto_any_base const &auto_any_t; +template +inline typename boost::mpl::if_::type &auto_any_cast(auto_any_t a) +{ + return static_cast const &>(a).item; +} +typedef boost::mpl::true_ const_; +template +struct type2type + : boost::mpl::if_ +{ +}; +template +struct wrap_cstr +{ + typedef T type; +}; +template<> +struct wrap_cstr +{ + typedef wrap_cstr type; + typedef char *iterator; + typedef char *const_iterator; +}; +template<> +struct wrap_cstr +{ + typedef wrap_cstr type; + typedef char const *iterator; + typedef char const *const_iterator; +}; +template<> +struct wrap_cstr +{ + typedef wrap_cstr type; + typedef wchar_t *iterator; + typedef wchar_t *const_iterator; +}; +template<> +struct wrap_cstr +{ + typedef wrap_cstr type; + typedef wchar_t const *iterator; + typedef wchar_t const *const_iterator; +}; +template +struct is_char_array + : mpl::and_< + is_array + , mpl::or_< + is_convertible + , is_convertible + > + > +{}; +template +struct foreach_iterator +{ + struct IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING; typedef struct IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING352 : boost::mpl::assert_ { static boost::mpl::failed ************ (IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING::************ assert_arg()) (T&) { return 0; } } mpl_assert_arg352; enum { mpl_assertion_in_line_352 = sizeof( boost::mpl::assertion_failed<((!is_char_array::value))>( mpl_assert_arg352::assert_arg() ) ) }; + typedef typename wrap_cstr::type container; + typedef typename boost::mpl::eval_if< + C + , range_const_iterator + , range_mutable_iterator + >::type type; +}; +template +struct foreach_reverse_iterator +{ + struct IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING; typedef struct IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING383 : boost::mpl::assert_ { static boost::mpl::failed ************ (IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING::************ assert_arg()) (T&) { return 0; } } mpl_assert_arg383; enum { mpl_assertion_in_line_383 = sizeof( boost::mpl::assertion_failed<((!is_char_array::value))>( mpl_assert_arg383::assert_arg() ) ) }; + typedef typename wrap_cstr::type container; + typedef typename boost::mpl::eval_if< + C + , range_reverse_iterator + , range_reverse_iterator + >::type type; +}; +template +struct foreach_reference + : iterator_reference::type> +{ +}; +template +inline type2type *encode_type(T &, boost::mpl::false_ *) { return 0; } +template +inline type2type *encode_type(T const &, boost::mpl::true_ *) { return 0; } +inline bool set_false(bool &b) +{ + b = false; + return false; +} +template +inline T *&to_ptr(T const &) +{ + static T *t = 0; + return t; +} +template +inline T &derefof(T *t) +{ + return reinterpret_cast( + *const_cast( + reinterpret_cast(t) + ) + ); +} +template +struct rvalue_probe +{ + struct private_type_ {}; + typedef typename boost::mpl::if_< + boost::mpl::or_, boost::is_array >, private_type_, T + >::type value_type; + operator value_type() { return *reinterpret_cast(this); } + operator T &() const { return *reinterpret_cast(const_cast(this)); } +}; +template +rvalue_probe const make_probe(T const &) +{ + return rvalue_probe(); +} +template +inline auto_any contain(T const &t, boost::mpl::true_ *) +{ + return t; +} +template +inline auto_any contain(T &t, boost::mpl::false_ *) +{ + return boost::addressof(t); +} +template +inline auto_any::type> +begin(auto_any_t col, type2type *, boost::mpl::true_ *) +{ + return boost::begin(auto_any_cast(col)); +} +template +inline auto_any::type> +begin(auto_any_t col, type2type *, boost::mpl::false_ *) +{ + typedef typename type2type::type type; + typedef typename foreach_iterator::type iterator; + return iterator(boost::begin(derefof(auto_any_cast(col)))); +} +template +inline auto_any +begin(auto_any_t col, type2type *, boost::mpl::true_ *) +{ + return auto_any_cast(col); +} +template +inline auto_any::type> +end(auto_any_t col, type2type *, boost::mpl::true_ *) +{ + return boost::end(auto_any_cast(col)); +} +template +inline auto_any::type> +end(auto_any_t col, type2type *, boost::mpl::false_ *) +{ + typedef typename type2type::type type; + typedef typename foreach_iterator::type iterator; + return iterator(boost::end(derefof(auto_any_cast(col)))); +} +template +inline auto_any +end(auto_any_t col, type2type *, boost::mpl::true_ *) +{ + return 0; +} +template +inline bool done(auto_any_t cur, auto_any_t end, type2type *) +{ + typedef typename foreach_iterator::type iter_t; + return auto_any_cast(cur) == auto_any_cast(end); +} +template +inline bool done(auto_any_t cur, auto_any_t, type2type *) +{ + return ! *auto_any_cast(cur); +} +template +inline void next(auto_any_t cur, type2type *) +{ + typedef typename foreach_iterator::type iter_t; + ++auto_any_cast(cur); +} +template +inline typename foreach_reference::type +deref(auto_any_t cur, type2type *) +{ + typedef typename foreach_iterator::type iter_t; + return *auto_any_cast(cur); +} +template +inline auto_any::type> +rbegin(auto_any_t col, type2type *, boost::mpl::true_ *) +{ + return boost::rbegin(auto_any_cast(col)); +} +template +inline auto_any::type> +rbegin(auto_any_t col, type2type *, boost::mpl::false_ *) +{ + typedef typename type2type::type type; + typedef typename foreach_reverse_iterator::type iterator; + return iterator(boost::rbegin(derefof(auto_any_cast(col)))); +} +template +inline auto_any > +rbegin(auto_any_t col, type2type *, boost::mpl::true_ *) +{ + T *p = auto_any_cast(col); + while(0 != *p) + ++p; + return reverse_iterator(p); +} +template +inline auto_any::type> +rend(auto_any_t col, type2type *, boost::mpl::true_ *) +{ + return boost::rend(auto_any_cast(col)); +} +template +inline auto_any::type> +rend(auto_any_t col, type2type *, boost::mpl::false_ *) +{ + typedef typename type2type::type type; + typedef typename foreach_reverse_iterator::type iterator; + return iterator(boost::rend(derefof(auto_any_cast(col)))); +} +template +inline auto_any > +rend(auto_any_t col, type2type *, boost::mpl::true_ *) +{ + return reverse_iterator(auto_any_cast(col)); +} +template +inline bool rdone(auto_any_t cur, auto_any_t end, type2type *) +{ + typedef typename foreach_reverse_iterator::type iter_t; + return auto_any_cast(cur) == auto_any_cast(end); +} +template +inline void rnext(auto_any_t cur, type2type *) +{ + typedef typename foreach_reverse_iterator::type iter_t; + ++auto_any_cast(cur); +} +template +inline typename foreach_reference::type +rderef(auto_any_t cur, type2type *) +{ + typedef typename foreach_reverse_iterator::type iter_t; + return *auto_any_cast(cur); +} +} +} +namespace boost { namespace python { namespace objects { +struct stl_input_iterator_impl +{ + stl_input_iterator_impl(); + stl_input_iterator_impl(boost::python::object const &ob); + void increment(); + bool equal(stl_input_iterator_impl const &that) const; + boost::python::handle<> const ¤t() const; +private: + boost::python::object it_; + boost::python::handle<> ob_; +}; +}}} +namespace boost { namespace python +{ +template +struct stl_input_iterator + : boost::iterator_facade< + stl_input_iterator + , ValueT + , std::input_iterator_tag + , ValueT + > +{ + stl_input_iterator() + : impl_() + { + } + stl_input_iterator(boost::python::object const &ob) + : impl_(ob) + { + } +private: + friend class boost::iterator_core_access; + void increment() + { + this->impl_.increment(); + } + ValueT dereference() const + { + return extract(this->impl_.current().get())(); + } + bool equal(stl_input_iterator const &that) const + { + return this->impl_.equal(that.impl_); + } + objects::stl_input_iterator_impl impl_; +}; +}} +namespace boost { namespace python { namespace container_utils { + template + void + extend_container(Container& container, object l) + { + typedef typename Container::value_type data_type; + if (boost::foreach_detail_::auto_any_t + _foreach_col30 + = boost::foreach_detail_::contain( (std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() )) , (true ? 0 : boost::foreach_detail_::or_( boost::foreach_detail_::and_( boost::foreach_detail_::not_(boost::foreach_detail_::is_array_(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ))) , (true ? 0 : boost::foreach_detail_::is_rvalue_( (true ? boost::foreach_detail_::make_probe(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() )) : (std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ))), 0))) , boost::foreach_detail_::and_( boost::foreach_detail_::not_(boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() )) , boost_foreach_argument_dependent_lookup_hack_value)) , boost_foreach_is_lightweight_proxy( boost::foreach_detail_::to_ptr(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() )) , boost_foreach_argument_dependent_lookup_hack_value)))))) {} else if (boost::foreach_detail_::auto_any_t + _foreach_cur30 + = boost::foreach_detail_::begin( + _foreach_col30 + , (true ? 0 : boost::foreach_detail_::encode_type(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ), boost::foreach_detail_::is_const_(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() )))) , (true ? 0 : boost::foreach_detail_::or_( boost::foreach_detail_::and_( boost::foreach_detail_::not_(boost::foreach_detail_::is_array_(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ))) , (true ? 0 : boost::foreach_detail_::is_rvalue_( (true ? boost::foreach_detail_::make_probe(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() )) : (std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ))), 0))) , boost::foreach_detail_::and_( boost::foreach_detail_::not_(boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() )) , boost_foreach_argument_dependent_lookup_hack_value)) , boost_foreach_is_lightweight_proxy( boost::foreach_detail_::to_ptr(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() )) , boost_foreach_argument_dependent_lookup_hack_value)))))) {} else if (boost::foreach_detail_::auto_any_t + _foreach_end30 + = boost::foreach_detail_::end( + _foreach_col30 + , (true ? 0 : boost::foreach_detail_::encode_type(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ), boost::foreach_detail_::is_const_(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() )))) , (true ? 0 : boost::foreach_detail_::or_( boost::foreach_detail_::and_( boost::foreach_detail_::not_(boost::foreach_detail_::is_array_(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ))) , (true ? 0 : boost::foreach_detail_::is_rvalue_( (true ? boost::foreach_detail_::make_probe(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() )) : (std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ))), 0))) , boost::foreach_detail_::and_( boost::foreach_detail_::not_(boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() )) , boost_foreach_argument_dependent_lookup_hack_value)) , boost_foreach_is_lightweight_proxy( boost::foreach_detail_::to_ptr(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() )) , boost_foreach_argument_dependent_lookup_hack_value)))))) {} else for (bool + _foreach_continue30 + = true; + _foreach_continue30 + && !boost::foreach_detail_::done( + _foreach_cur30 + , + _foreach_end30 + , (true ? 0 : boost::foreach_detail_::encode_type(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ), boost::foreach_detail_::is_const_(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ))))); + _foreach_continue30 + ? boost::foreach_detail_::next( + _foreach_cur30 + , (true ? 0 : boost::foreach_detail_::encode_type(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ), boost::foreach_detail_::is_const_(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ))))) : (void)0) if (boost::foreach_detail_::set_false( + _foreach_continue30 + )) {} else for (object elem = boost::foreach_detail_::deref( + _foreach_cur30 + , (true ? 0 : boost::foreach_detail_::encode_type(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ), boost::foreach_detail_::is_const_(std::make_pair( boost::python::stl_input_iterator(l), boost::python::stl_input_iterator() ))))); ! + _foreach_continue30 + ; + _foreach_continue30 + = true) + { + extract x(elem); + if (x.check()) + { + container.push_back(x()); + } + else + { + extract x(elem); + if (x.check()) + { + container.push_back(x()); + } + else + { + PyErr_SetString(PyExc_TypeError, "Incompatible Data Type"); + throw_error_already_set(); + } + } + } + } +}}} +namespace PySide +{ +template< typename FLAG > +void __attribute__ ((visibility("internal"))) declare_qflags(const char *flag_name) +{ + boost::python::class_< FLAG >(flag_name, boost::python::init()) + .def(boost::python::init< boost::python::optional< int > >()) + .def(boost::python::init< typename FLAG::enum_type >()) + .def(boost::python::self & int()) + .def(boost::python::self == boost::python::self) + .def(boost::python::self == int()) + .def(boost::python::self &= int()) + .def(int_(boost::python::self)) + .def(~boost::python::self) + .def(boost::python::self |= boost::python::self) + .def(boost::python::self ^= boost::python::self) + .def(boost::python::self != boost::python::self) + .def(!boost::python::self) + .def(boost::python::self | boost::python::self) + .def(boost::python::self ^ boost::python::self) + ; + boost::python::implicitly_convertible(); +} +template< typename FLAG > +void __attribute__ ((visibility("internal"))) declare_int_qflags(const char *flag_name) +{ + boost::python::class_< FLAG >(flag_name, boost::python::init()) + .def(boost::python::init< boost::python::optional< int > >()) + .def(boost::python::init< typename FLAG::enum_type >()) + .def(boost::python::self & int()) + .def(boost::python::self &= int()) + .def(int_(boost::python::self)) + .def(~boost::python::self) + .def(boost::python::self |= boost::python::self) + .def(boost::python::self ^= boost::python::self) + .def(!boost::python::self) + .def(boost::python::self | boost::python::self) + .def(boost::python::self ^ boost::python::self) + ; + boost::python::implicitly_convertible(); +} +}; + +namespace PySide +{ +class __attribute__ ((visibility("default"))) wrapper +{ + public: + PyObject* py_object() { return m_self; } + void keep_cpp_ref(); + virtual ~wrapper(); + protected: + wrapper(PyObject *self); + boost::python::object get_override(const char* base_class_name, const char* method_name) const; + private: + wrapper() {} + wrapper(wrapper &) {} + PyObject *m_self; + bool m_has_cpp_ref; +}; +} +typedef QtValidLicenseForCoreModule QtCoreModule; +class QBitArray; +class QByteArray; +class QString; +class QStringRef; +inline uint qHash(char key) { return uint(key); } +inline uint qHash(uchar key) { return uint(key); } +inline uint qHash(signed char key) { return uint(key); } +inline uint qHash(ushort key) { return uint(key); } +inline uint qHash(short key) { return uint(key); } +inline uint qHash(uint key) { return key; } +inline uint qHash(int key) { return uint(key); } +inline uint qHash(ulong key) +{ + if (sizeof(ulong) > sizeof(uint)) { + return uint(((key >> (8 * sizeof(uint) - 1)) ^ key) & (~0U)); + } else { + return uint(key & (~0U)); + } +} +inline uint qHash(long key) { return qHash(ulong(key)); } +inline uint qHash(quint64 key) +{ + if (sizeof(quint64) > sizeof(uint)) { + return uint(((key >> (8 * sizeof(uint) - 1)) ^ key) & (~0U)); + } else { + return uint(key & (~0U)); + } +} +inline uint qHash(qint64 key) { return qHash(quint64(key)); } +inline uint qHash(QChar key) { return qHash(key.unicode()); } + uint qHash(const QByteArray &key); + uint qHash(const QString &key); + uint qHash(const QStringRef &key); + uint qHash(const QBitArray &key); +template inline uint qHash(const T *key) +{ + return qHash(reinterpret_cast(key)); +} +template inline uint qHash(const QPair &key) +{ + uint h1 = qHash(key.first); + uint h2 = qHash(key.second); + return ((h1 << 16) | (h1 >> 16)) ^ h2; +} +struct QHashData +{ + struct Node { + Node *next; + uint h; + }; + Node *fakeNext; + Node **buckets; + QBasicAtomicInt ref; + int size; + int nodeSize; + short userNumBits; + short numBits; + int numBuckets; + uint sharable : 1; + uint strictAlignment : 1; + uint reserved : 30; + void *allocateNode(); + void *allocateNode(int nodeAlign); + void freeNode(void *node); + QHashData *detach_helper(void (*node_duplicate)(Node *, void *), int nodeSize); + QHashData *detach_helper2(void (*node_duplicate)(Node *, void *), void (*node_delete)(Node *), + int nodeSize, int nodeAlign); + void mightGrow(); + bool willGrow(); + void hasShrunk(); + void rehash(int hint); + void free_helper(void (*node_delete)(Node *)); + void destroyAndFree(); + Node *firstNode(); + static Node *nextNode(Node *node); + static Node *previousNode(Node *node); + static QHashData shared_null; +}; +inline void QHashData::mightGrow() +{ + if (size >= numBuckets) + rehash(numBits + 1); +} +inline bool QHashData::willGrow() +{ + if (size >= numBuckets) { + rehash(numBits + 1); + return true; + } else { + return false; + } +} +inline void QHashData::hasShrunk() +{ + if (size <= (numBuckets >> 3) && numBits > userNumBits) { + try { + rehash(qMax(int(numBits) - 2, int(userNumBits))); + } catch (const std::bad_alloc &) { + } + } +} +inline QHashData::Node *QHashData::firstNode() +{ + Node *e = reinterpret_cast(this); + Node **bucket = buckets; + int n = numBuckets; + while (n--) { + if (*bucket != e) + return *bucket; + ++bucket; + } + return e; +} +struct QHashDummyValue +{ +}; +inline bool operator==(const QHashDummyValue & , const QHashDummyValue & ) +{ + return true; +} +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE | Q_DUMMY_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE | Q_DUMMY_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QHashDummyValue)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE | Q_DUMMY_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QHashDummyValue"; } }; +template +struct QHashDummyNode +{ + QHashDummyNode *next; + uint h; + Key key; + inline QHashDummyNode(const Key &key0) : key(key0) {} +}; +template +struct QHashNode +{ + QHashNode *next; + uint h; + Key key; + T value; + inline QHashNode(const Key &key0) : key(key0) {} + inline QHashNode(const Key &key0, const T &value0) : key(key0), value(value0) {} + inline bool same_key(uint h0, const Key &key0) { return h0 == h && key0 == key; } +}; +template struct QHashDummyNode { QHashDummyNode *next; union { uint h; short key; }; inline QHashDummyNode(short ) {} }; template struct QHashNode { QHashNode *next; union { uint h; short key; }; T value; inline QHashNode(short ) {} inline QHashNode(short , const T &value0) : value(value0) {} inline bool same_key(uint h0, short) { return h0 == h; } }; +template struct QHashDummyNode { QHashDummyNode *next; union { uint h; ushort key; }; inline QHashDummyNode(ushort ) {} }; template struct QHashNode { QHashNode *next; union { uint h; ushort key; }; T value; inline QHashNode(ushort ) {} inline QHashNode(ushort , const T &value0) : value(value0) {} inline bool same_key(uint h0, ushort) { return h0 == h; } }; +template struct QHashDummyNode { QHashDummyNode *next; union { uint h; int key; }; inline QHashDummyNode(int ) {} }; template struct QHashNode { QHashNode *next; union { uint h; int key; }; T value; inline QHashNode(int ) {} inline QHashNode(int , const T &value0) : value(value0) {} inline bool same_key(uint h0, int) { return h0 == h; } }; +template struct QHashDummyNode { QHashDummyNode *next; union { uint h; uint key; }; inline QHashDummyNode(uint ) {} }; template struct QHashNode { QHashNode *next; union { uint h; uint key; }; T value; inline QHashNode(uint ) {} inline QHashNode(uint , const T &value0) : value(value0) {} inline bool same_key(uint h0, uint) { return h0 == h; } }; +template +class QHash +{ + typedef QHashDummyNode DummyNode; + typedef QHashNode Node; + union { + QHashData *d; + QHashNode *e; + }; + static inline Node *concrete(QHashData::Node *node) { + return reinterpret_cast(node); + } + static inline int alignOfNode() { return qMax(sizeof(void*), __alignof__(Node)); } + static inline int alignOfDummyNode() { return qMax(sizeof(void*), __alignof__(DummyNode)); } +public: + inline QHash() : d(&QHashData::shared_null) { d->ref.ref(); } + inline QHash(const QHash &other) : d(other.d) { d->ref.ref(); if (!d->sharable) detach(); } + inline ~QHash() { if (!d->ref.deref()) freeData(d); } + QHash &operator=(const QHash &other); + bool operator==(const QHash &other) const; + inline bool operator!=(const QHash &other) const { return !(*this == other); } + inline int size() const { return d->size; } + inline bool isEmpty() const { return d->size == 0; } + inline int capacity() const { return d->numBuckets; } + void reserve(int size); + inline void squeeze() { reserve(1); } + inline void detach() { if (d->ref != 1) detach_helper(); } + inline bool isDetached() const { return d->ref == 1; } + inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; } + void clear(); + int remove(const Key &key); + T take(const Key &key); + bool contains(const Key &key) const; + const Key key(const T &value) const; + const Key key(const T &value, const Key &defaultKey) const; + const T value(const Key &key) const; + const T value(const Key &key, const T &defaultValue) const; + T &operator[](const Key &key); + const T operator[](const Key &key) const; + QList uniqueKeys() const; + QList keys() const; + QList keys(const T &value) const; + QList values() const; + QList values(const Key &key) const; + int count(const Key &key) const; + class const_iterator; + class iterator + { + friend class const_iterator; + QHashData::Node *i; + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + typedef T value_type; + typedef T *pointer; + typedef T &reference; + inline operator Node *() const { return concrete(i); } + inline iterator() : i(0) { } + explicit inline iterator(void *node) : i(reinterpret_cast(node)) { } + inline const Key &key() const { return concrete(i)->key; } + inline T &value() const { return concrete(i)->value; } + inline T &operator*() const { return concrete(i)->value; } + inline T *operator->() const { return &concrete(i)->value; } + inline bool operator==(const iterator &o) const { return i == o.i; } + inline bool operator!=(const iterator &o) const { return i != o.i; } + inline iterator &operator++() { + i = QHashData::nextNode(i); + return *this; + } + inline iterator operator++(int) { + iterator r = *this; + i = QHashData::nextNode(i); + return r; + } + inline iterator &operator--() { + i = QHashData::previousNode(i); + return *this; + } + inline iterator operator--(int) { + iterator r = *this; + i = QHashData::previousNode(i); + return r; + } + inline iterator operator+(int j) const + { iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; } + inline iterator operator-(int j) const { return operator+(-j); } + inline iterator &operator+=(int j) { return *this = *this + j; } + inline iterator &operator-=(int j) { return *this = *this - j; } + public: + inline bool operator==(const const_iterator &o) const + { return i == o.i; } + inline bool operator!=(const const_iterator &o) const + { return i != o.i; } + private: + inline operator bool() const { return false; } + }; + friend class iterator; + class const_iterator + { + friend class iterator; + QHashData::Node *i; + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + typedef T value_type; + typedef const T *pointer; + typedef const T &reference; + inline operator Node *() const { return concrete(i); } + inline const_iterator() : i(0) { } + explicit inline const_iterator(void *node) + : i(reinterpret_cast(node)) { } + inline const_iterator(const iterator &o) + { i = o.i; } + inline const Key &key() const { return concrete(i)->key; } + inline const T &value() const { return concrete(i)->value; } + inline const T &operator*() const { return concrete(i)->value; } + inline const T *operator->() const { return &concrete(i)->value; } + inline bool operator==(const const_iterator &o) const { return i == o.i; } + inline bool operator!=(const const_iterator &o) const { return i != o.i; } + inline const_iterator &operator++() { + i = QHashData::nextNode(i); + return *this; + } + inline const_iterator operator++(int) { + const_iterator r = *this; + i = QHashData::nextNode(i); + return r; + } + inline const_iterator &operator--() { + i = QHashData::previousNode(i); + return *this; + } + inline const_iterator operator--(int) { + const_iterator r = *this; + i = QHashData::previousNode(i); + return r; + } + inline const_iterator operator+(int j) const + { const_iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; } + inline const_iterator operator-(int j) const { return operator+(-j); } + inline const_iterator &operator+=(int j) { return *this = *this + j; } + inline const_iterator &operator-=(int j) { return *this = *this - j; } + private: + inline operator bool() const { return false; } + }; + friend class const_iterator; + inline iterator begin() { detach(); return iterator(d->firstNode()); } + inline const_iterator begin() const { return const_iterator(d->firstNode()); } + inline const_iterator constBegin() const { return const_iterator(d->firstNode()); } + inline iterator end() { detach(); return iterator(e); } + inline const_iterator end() const { return const_iterator(e); } + inline const_iterator constEnd() const { return const_iterator(e); } + iterator erase(iterator it); + typedef iterator Iterator; + typedef const_iterator ConstIterator; + inline int count() const { return d->size; } + iterator find(const Key &key); + const_iterator find(const Key &key) const; + const_iterator constFind(const Key &key) const; + iterator insert(const Key &key, const T &value); + iterator insertMulti(const Key &key, const T &value); + QHash &unite(const QHash &other); + typedef T mapped_type; + typedef Key key_type; + typedef ptrdiff_t difference_type; + typedef int size_type; + inline bool empty() const { return isEmpty(); } +private: + void detach_helper(); + void freeData(QHashData *d); + Node **findNode(const Key &key, uint *hp = 0) const; + Node *createNode(uint h, const Key &key, const T &value, Node **nextNode); + void deleteNode(Node *node); + static void deleteNode2(QHashData::Node *node); + static void duplicateNode(QHashData::Node *originalNode, void *newNode); +}; +template +inline void QHash::deleteNode(Node *node) +{ + deleteNode2(reinterpret_cast(node)); + d->freeNode(node); +} +template +inline void QHash::deleteNode2(QHashData::Node *node) +{ + concrete(node)->~Node(); +} +template +inline void QHash::duplicateNode(QHashData::Node *node, void *newNode) +{ + Node *concreteNode = concrete(node); + if (QTypeInfo::isDummy) { + (void) new (newNode) DummyNode(concreteNode->key); + } else { + (void) new (newNode) Node(concreteNode->key, concreteNode->value); + } +} +template +inline typename QHash::Node * +QHash::createNode(uint ah, const Key &akey, const T &avalue, Node **anextNode) +{ + Node *node; + if (QTypeInfo::isDummy) { + node = reinterpret_cast(new (d->allocateNode(alignOfDummyNode())) DummyNode(akey)); + } else { + node = new (d->allocateNode(alignOfNode())) Node(akey, avalue); + } + node->h = ah; + node->next = *anextNode; + *anextNode = node; + ++d->size; + return node; +} +template +inline QHash &QHash::unite(const QHash &other) +{ + QHash copy(other); + const_iterator it = copy.constEnd(); + while (it != copy.constBegin()) { + --it; + insertMulti(it.key(), it.value()); + } + return *this; +} +template + void QHash::freeData(QHashData *x) +{ + x->free_helper(deleteNode2); +} +template +inline void QHash::clear() +{ + *this = QHash(); +} +template + void QHash::detach_helper() +{ + QHashData *x = d->detach_helper2(duplicateNode, deleteNode2, + QTypeInfo::isDummy ? sizeof(DummyNode) : sizeof(Node), + QTypeInfo::isDummy ? alignOfDummyNode() : alignOfNode()); + if (!d->ref.deref()) + freeData(d); + d = x; +} +template +inline QHash &QHash::operator=(const QHash &other) +{ + if (d != other.d) { + other.d->ref.ref(); + if (!d->ref.deref()) + freeData(d); + d = other.d; + if (!d->sharable) + detach_helper(); + } + return *this; +} +template +inline const T QHash::value(const Key &akey) const +{ + Node *node; + if (d->size == 0 || (node = *findNode(akey)) == e) { + return T(); + } else { + return node->value; + } +} +template +inline const T QHash::value(const Key &akey, const T &adefaultValue) const +{ + Node *node; + if (d->size == 0 || (node = *findNode(akey)) == e) { + return adefaultValue; + } else { + return node->value; + } +} +template + QList QHash::uniqueKeys() const +{ + QList res; + const_iterator i = begin(); + if (i != end()) { + for (;;) { + const Key &aKey = i.key(); + res.append(aKey); + do { + if (++i == end()) + goto break_out_of_outer_loop; + } while (aKey == i.key()); + } + } +break_out_of_outer_loop: + return res; +} +template + QList QHash::keys() const +{ + QList res; + const_iterator i = begin(); + while (i != end()) { + res.append(i.key()); + ++i; + } + return res; +} +template + QList QHash::keys(const T &avalue) const +{ + QList res; + const_iterator i = begin(); + while (i != end()) { + if (i.value() == avalue) + res.append(i.key()); + ++i; + } + return res; +} +template + const Key QHash::key(const T &avalue) const +{ + return key(avalue, Key()); +} +template + const Key QHash::key(const T &avalue, const Key &defaultValue) const +{ + const_iterator i = begin(); + while (i != end()) { + if (i.value() == avalue) + return i.key(); + ++i; + } + return defaultValue; +} +template + QList QHash::values() const +{ + QList res; + const_iterator i = begin(); + while (i != end()) { + res.append(i.value()); + ++i; + } + return res; +} +template + QList QHash::values(const Key &akey) const +{ + QList res; + Node *node = *findNode(akey); + if (node != e) { + do { + res.append(node->value); + } while ((node = node->next) != e && node->key == akey); + } + return res; +} +template + int QHash::count(const Key &akey) const +{ + int cnt = 0; + Node *node = *findNode(akey); + if (node != e) { + do { + ++cnt; + } while ((node = node->next) != e && node->key == akey); + } + return cnt; +} +template +inline const T QHash::operator[](const Key &akey) const +{ + return value(akey); +} +template +inline T &QHash::operator[](const Key &akey) +{ + detach(); + uint h; + Node **node = findNode(akey, &h); + if (*node == e) { + if (d->willGrow()) + node = findNode(akey, &h); + return createNode(h, akey, T(), node)->value; + } + return (*node)->value; +} +template +inline typename QHash::iterator QHash::insert(const Key &akey, + const T &avalue) +{ + detach(); + uint h; + Node **node = findNode(akey, &h); + if (*node == e) { + if (d->willGrow()) + node = findNode(akey, &h); + return iterator(createNode(h, akey, avalue, node)); + } + if (!QTypeInfo::isDummy) + (*node)->value = avalue; + return iterator(*node); +} +template +inline typename QHash::iterator QHash::insertMulti(const Key &akey, + const T &avalue) +{ + detach(); + d->willGrow(); + uint h; + Node **nextNode = findNode(akey, &h); + return iterator(createNode(h, akey, avalue, nextNode)); +} +template + int QHash::remove(const Key &akey) +{ + if (isEmpty()) + return 0; + detach(); + int oldSize = d->size; + Node **node = findNode(akey); + if (*node != e) { + bool deleteNext = true; + do { + Node *next = (*node)->next; + deleteNext = (next != e && next->key == (*node)->key); + deleteNode(*node); + *node = next; + --d->size; + } while (deleteNext); + d->hasShrunk(); + } + return oldSize - d->size; +} +template + T QHash::take(const Key &akey) +{ + if (isEmpty()) + return T(); + detach(); + Node **node = findNode(akey); + if (*node != e) { + T t = (*node)->value; + Node *next = (*node)->next; + deleteNode(*node); + *node = next; + --d->size; + d->hasShrunk(); + return t; + } + return T(); +} +template + typename QHash::iterator QHash::erase(iterator it) +{ + if (it == iterator(e)) + return it; + iterator ret = it; + ++ret; + Node *node = it; + Node **node_ptr = reinterpret_cast(&d->buckets[node->h % d->numBuckets]); + while (*node_ptr != node) + node_ptr = &(*node_ptr)->next; + *node_ptr = node->next; + deleteNode(node); + --d->size; + return ret; +} +template +inline void QHash::reserve(int asize) +{ + detach(); + d->rehash(-qMax(asize, 1)); +} +template +inline typename QHash::const_iterator QHash::find(const Key &akey) const +{ + return const_iterator(*findNode(akey)); +} +template +inline typename QHash::const_iterator QHash::constFind(const Key &akey) const +{ + return const_iterator(*findNode(akey)); +} +template +inline typename QHash::iterator QHash::find(const Key &akey) +{ + detach(); + return iterator(*findNode(akey)); +} +template +inline bool QHash::contains(const Key &akey) const +{ + return *findNode(akey) != e; +} +template + typename QHash::Node **QHash::findNode(const Key &akey, + uint *ahp) const +{ + Node **node; + uint h = qHash(akey); + if (d->numBuckets) { + node = reinterpret_cast(&d->buckets[h % d->numBuckets]); + ((!(*node == e || (*node)->next)) ? qt_assert("*node == e || (*node)->next","/usr/include/qt4/QtCore/qhash.h",879) : qt_noop()); + while (*node != e && !(*node)->same_key(h, akey)) + node = &(*node)->next; + } else { + node = const_cast(reinterpret_cast(&e)); + } + if (ahp) + *ahp = h; + return node; +} +template + bool QHash::operator==(const QHash &other) const +{ + if (size() != other.size()) + return false; + if (d == other.d) + return true; + const_iterator it = begin(); + while (it != end()) { + const Key &akey = it.key(); + const_iterator it2 = other.find(akey); + do { + if (it2 == other.end() || !(it2.key() == akey)) + return false; + if (!QTypeInfo::isDummy && !(it.value() == it2.value())) + return false; + ++it; + ++it2; + } while (it != end() && it.key() == akey); + } + return true; +} +template +class QMultiHash : public QHash +{ +public: + QMultiHash() {} + QMultiHash(const QHash &other) : QHash(other) {} + inline typename QHash::iterator replace(const Key &key, const T &value) + { return QHash::insert(key, value); } + inline typename QHash::iterator insert(const Key &key, const T &value) + { return QHash::insertMulti(key, value); } + inline QMultiHash &operator+=(const QMultiHash &other) + { unite(other); return *this; } + inline QMultiHash operator+(const QMultiHash &other) const + { QMultiHash result = *this; result += other; return result; } + using QHash::contains; + using QHash::remove; + using QHash::count; + using QHash::find; + using QHash::constFind; + bool contains(const Key &key, const T &value) const; + int remove(const Key &key, const T &value); + int count(const Key &key, const T &value) const; + typename QHash::iterator find(const Key &key, const T &value) { + typename QHash::iterator i(find(key)); + typename QHash::iterator end(this->end()); + while (i != end && i.key() == key) { + if (i.value() == value) + return i; + ++i; + } + return end; + } + typename QHash::const_iterator find(const Key &key, const T &value) const { + typename QHash::const_iterator i(constFind(key)); + typename QHash::const_iterator end(QHash::constEnd()); + while (i != end && i.key() == key) { + if (i.value() == value) + return i; + ++i; + } + return end; + } + typename QHash::const_iterator constFind(const Key &key, const T &value) const + { return find(key, value); } +private: + T &operator[](const Key &key); + const T operator[](const Key &key) const; +}; +template +inline bool QMultiHash::contains(const Key &key, const T &value) const +{ + return constFind(key, value) != QHash::constEnd(); +} +template +inline int QMultiHash::remove(const Key &key, const T &value) +{ + int n = 0; + typename QHash::iterator i(find(key)); + typename QHash::iterator end(QHash::end()); + while (i != end && i.key() == key) { + if (i.value() == value) { + i = erase(i); + ++n; + } else { + ++i; + } + } + return n; +} +template +inline int QMultiHash::count(const Key &key, const T &value) const +{ + int n = 0; + typename QHash::const_iterator i(constFind(key)); + typename QHash::const_iterator end(QHash::constEnd()); + while (i != end && i.key() == key) { + if (i.value() == value) + ++n; + ++i; + } + return n; +} +template class QHashIterator { typedef typename QHash::const_iterator const_iterator; typedef const_iterator Item; QHash c; const_iterator i, n; inline bool item_exists() const { return n != c.constEnd(); } public: inline QHashIterator(const QHash &container) : c(container), i(c.constBegin()), n(c.constEnd()) {} inline QHashIterator &operator=(const QHash &container) { c = container; i = c.constBegin(); n = c.constEnd(); return *this; } inline void toFront() { i = c.constBegin(); n = c.constEnd(); } inline void toBack() { i = c.constEnd(); n = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline Item next() { n = i++; return n; } inline Item peekNext() const { return i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline Item previous() { n = --i; return n; } inline Item peekPrevious() const { const_iterator p = i; return --p; } inline const T &value() const { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qhash.h",1033) : qt_noop()); return *n; } inline const Key &key() const { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qhash.h",1033) : qt_noop()); return n.key(); } inline bool findNext(const T &t) { while ((n = i) != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(n = --i) == t) return true; n = c.constEnd(); return false; } }; +template class QMutableHashIterator { typedef typename QHash::iterator iterator; typedef typename QHash::const_iterator const_iterator; typedef iterator Item; QHash *c; iterator i, n; inline bool item_exists() const { return const_iterator(n) != c->constEnd(); } public: inline QMutableHashIterator(QHash &container) : c(&container) { c->setSharable(false); i = c->begin(); n = c->end(); } inline ~QMutableHashIterator() { c->setSharable(true); } inline QMutableHashIterator &operator=(QHash &container) { c->setSharable(true); c = &container; c->setSharable(false); i = c->begin(); n = c->end(); return *this; } inline void toFront() { i = c->begin(); n = c->end(); } inline void toBack() { i = c->end(); n = c->end(); } inline bool hasNext() const { return const_iterator(i) != c->constEnd(); } inline Item next() { n = i++; return n; } inline Item peekNext() const { return i; } inline bool hasPrevious() const { return const_iterator(i) != c->constBegin(); } inline Item previous() { n = --i; return n; } inline Item peekPrevious() const { iterator p = i; return --p; } inline void remove() { if (const_iterator(n) != c->constEnd()) { i = c->erase(n); n = c->end(); } } inline void setValue(const T &t) { if (const_iterator(n) != c->constEnd()) *n = t; } inline T &value() { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qhash.h",1034) : qt_noop()); return *n; } inline const T &value() const { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qhash.h",1034) : qt_noop()); return *n; } inline const Key &key() const { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qhash.h",1034) : qt_noop()); return n.key(); } inline bool findNext(const T &t) { while (const_iterator(n = i) != c->constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (const_iterator(i) != c->constBegin()) if (*(n = --i) == t) return true; n = c->end(); return false; } }; +typedef QtValidLicenseForCoreModule QtCoreModule; +struct QMapData +{ + struct Node { + Node *backward; + Node *forward[1]; + }; + enum { LastLevel = 11, Sparseness = 3 }; + QMapData *backward; + QMapData *forward[QMapData::LastLevel + 1]; + QBasicAtomicInt ref; + int topLevel; + int size; + uint randomBits; + uint insertInOrder : 1; + uint sharable : 1; + uint strictAlignment : 1; + uint reserved : 29; + static QMapData *createData(); + static QMapData *createData(int alignment); + void continueFreeData(int offset); + Node *node_create(Node *update[], int offset); + Node *node_create(Node *update[], int offset, int alignment); + void node_delete(Node *update[], int offset, Node *node); + static QMapData shared_null; +}; +template inline bool qMapLessThanKey(const Key &key1, const Key &key2) +{ + return key1 < key2; +} +template inline bool qMapLessThanKey(Ptr *key1, Ptr *key2) +{ + ((!(sizeof(quintptr) == sizeof(Ptr *))) ? qt_assert("sizeof(quintptr) == sizeof(Ptr *)","/usr/include/qt4/QtCore/qmap.h",113) : qt_noop()); + return quintptr(key1) < quintptr(key2); +} +template inline bool qMapLessThanKey(const Ptr *key1, const Ptr *key2) +{ + ((!(sizeof(quintptr) == sizeof(const Ptr *))) ? qt_assert("sizeof(quintptr) == sizeof(const Ptr *)","/usr/include/qt4/QtCore/qmap.h",119) : qt_noop()); + return quintptr(key1) < quintptr(key2); +} +template +struct QMapNode { + Key key; + T value; + QMapData::Node *backward; + QMapData::Node *forward[1]; +}; +template +struct QMapPayloadNode +{ + Key key; + T value; + QMapData::Node *backward; +}; +template +class QMap +{ + typedef QMapNode Node; + typedef QMapPayloadNode PayloadNode; + union { + QMapData *d; + QMapData::Node *e; + }; + static inline int payload() { return sizeof(PayloadNode) - sizeof(QMapData::Node *); } + static inline int alignment() { + return int(qMax(sizeof(void*), __alignof__(Node))); + } + static inline Node *concrete(QMapData::Node *node) { + return reinterpret_cast(reinterpret_cast(node) - payload()); + } +public: + inline QMap() : d(&QMapData::shared_null) { d->ref.ref(); } + inline QMap(const QMap &other) : d(other.d) + { d->ref.ref(); if (!d->sharable) detach(); } + inline ~QMap() { if (!d) return; if (!d->ref.deref()) freeData(d); } + QMap &operator=(const QMap &other); + explicit QMap(const typename std::map &other); + std::map toStdMap() const; + bool operator==(const QMap &other) const; + inline bool operator!=(const QMap &other) const { return !(*this == other); } + inline int size() const { return d->size; } + inline bool isEmpty() const { return d->size == 0; } + inline void detach() { if (d->ref != 1) detach_helper(); } + inline bool isDetached() const { return d->ref == 1; } + inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; } + inline void setInsertInOrder(bool ordered) { d->insertInOrder = ordered; } + void clear(); + int remove(const Key &key); + T take(const Key &key); + bool contains(const Key &key) const; + const Key key(const T &value) const; + const Key key(const T &value, const Key &defaultKey) const; + const T value(const Key &key) const; + const T value(const Key &key, const T &defaultValue) const; + T &operator[](const Key &key); + const T operator[](const Key &key) const; + QList uniqueKeys() const; + QList keys() const; + QList keys(const T &value) const; + QList values() const; + QList values(const Key &key) const; + int count(const Key &key) const; + class const_iterator; + class iterator + { + friend class const_iterator; + QMapData::Node *i; + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + typedef T value_type; + typedef T *pointer; + typedef T &reference; + inline operator QMapData::Node *() const { return i; } + inline iterator() : i(0) { } + inline iterator(QMapData::Node *node) : i(node) { } + inline const Key &key() const { return concrete(i)->key; } + inline T &value() const { return concrete(i)->value; } + inline T &operator*() const { return concrete(i)->value; } + inline T *operator->() const { return &concrete(i)->value; } + inline bool operator==(const iterator &o) const { return i == o.i; } + inline bool operator!=(const iterator &o) const { return i != o.i; } + inline iterator &operator++() { + i = i->forward[0]; + return *this; + } + inline iterator operator++(int) { + iterator r = *this; + i = i->forward[0]; + return r; + } + inline iterator &operator--() { + i = i->backward; + return *this; + } + inline iterator operator--(int) { + iterator r = *this; + i = i->backward; + return r; + } + inline iterator operator+(int j) const + { iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; } + inline iterator operator-(int j) const { return operator+(-j); } + inline iterator &operator+=(int j) { return *this = *this + j; } + inline iterator &operator-=(int j) { return *this = *this - j; } + public: + inline bool operator==(const const_iterator &o) const + { return i == o.i; } + inline bool operator!=(const const_iterator &o) const + { return i != o.i; } + private: + inline operator bool() const { return false; } + }; + friend class iterator; + class const_iterator + { + friend class iterator; + QMapData::Node *i; + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + typedef T value_type; + typedef const T *pointer; + typedef const T &reference; + inline operator QMapData::Node *() const { return i; } + inline const_iterator() : i(0) { } + inline const_iterator(QMapData::Node *node) : i(node) { } + inline const_iterator(const iterator &o) + { i = o.i; } + inline const Key &key() const { return concrete(i)->key; } + inline const T &value() const { return concrete(i)->value; } + inline const T &operator*() const { return concrete(i)->value; } + inline const T *operator->() const { return &concrete(i)->value; } + inline bool operator==(const const_iterator &o) const { return i == o.i; } + inline bool operator!=(const const_iterator &o) const { return i != o.i; } + inline const_iterator &operator++() { + i = i->forward[0]; + return *this; + } + inline const_iterator operator++(int) { + const_iterator r = *this; + i = i->forward[0]; + return r; + } + inline const_iterator &operator--() { + i = i->backward; + return *this; + } + inline const_iterator operator--(int) { + const_iterator r = *this; + i = i->backward; + return r; + } + inline const_iterator operator+(int j) const + { const_iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; } + inline const_iterator operator-(int j) const { return operator+(-j); } + inline const_iterator &operator+=(int j) { return *this = *this + j; } + inline const_iterator &operator-=(int j) { return *this = *this - j; } + private: + inline operator bool() const { return false; } + }; + friend class const_iterator; + inline iterator begin() { detach(); return iterator(e->forward[0]); } + inline const_iterator begin() const { return const_iterator(e->forward[0]); } + inline const_iterator constBegin() const { return const_iterator(e->forward[0]); } + inline iterator end() { + detach(); + return iterator(e); + } + inline const_iterator end() const { return const_iterator(e); } + inline const_iterator constEnd() const { return const_iterator(e); } + iterator erase(iterator it); + typedef iterator Iterator; + typedef const_iterator ConstIterator; + inline int count() const { return d->size; } + iterator find(const Key &key); + const_iterator find(const Key &key) const; + const_iterator constFind(const Key &key) const; + iterator lowerBound(const Key &key); + const_iterator lowerBound(const Key &key) const; + iterator upperBound(const Key &key); + const_iterator upperBound(const Key &key) const; + iterator insert(const Key &key, const T &value); + iterator insertMulti(const Key &key, const T &value); + QMap &unite(const QMap &other); + typedef Key key_type; + typedef T mapped_type; + typedef ptrdiff_t difference_type; + typedef int size_type; + inline bool empty() const { return isEmpty(); } +private: + void detach_helper(); + void freeData(QMapData *d); + QMapData::Node *findNode(const Key &key) const; + QMapData::Node *mutableFindNode(QMapData::Node *update[], const Key &key) const; + QMapData::Node *node_create(QMapData *d, QMapData::Node *update[], const Key &key, + const T &value); +}; +template +inline QMap &QMap::operator=(const QMap &other) +{ + if (d != other.d) { + other.d->ref.ref(); + if (!d->ref.deref()) + freeData(d); + d = other.d; + if (!d->sharable) + detach_helper(); + } + return *this; +} +template +inline void QMap::clear() +{ + *this = QMap(); +} +template +inline typename QMapData::Node * +QMap::node_create(QMapData *adt, QMapData::Node *aupdate[], const Key &akey, const T &avalue) +{ + QMapData::Node *abstractNode = adt->node_create(aupdate, payload(), alignment()); + try { + Node *concreteNode = concrete(abstractNode); + new (&concreteNode->key) Key(akey); + try { + new (&concreteNode->value) T(avalue); + } catch (...) { + concreteNode->key.~Key(); + throw; + } + } catch (...) { + adt->node_delete(aupdate, payload(), abstractNode); + throw; + } + return abstractNode; +} +template +inline QMapData::Node *QMap::findNode(const Key &akey) const +{ + QMapData::Node *cur = e; + QMapData::Node *next = e; + for (int i = d->topLevel; i >= 0; i--) { + while ((next = cur->forward[i]) != e && qMapLessThanKey(concrete(next)->key, akey)) + cur = next; + } + if (next != e && !qMapLessThanKey(akey, concrete(next)->key)) { + return next; + } else { + return e; + } +} +template +inline const T QMap::value(const Key &akey) const +{ + QMapData::Node *node; + if (d->size == 0 || (node = findNode(akey)) == e) { + return T(); + } else { + return concrete(node)->value; + } +} +template +inline const T QMap::value(const Key &akey, const T &adefaultValue) const +{ + QMapData::Node *node; + if (d->size == 0 || (node = findNode(akey)) == e) { + return adefaultValue; + } else { + return concrete(node)->value; + } +} +template +inline const T QMap::operator[](const Key &akey) const +{ + return value(akey); +} +template +inline T &QMap::operator[](const Key &akey) +{ + detach(); + QMapData::Node *update[QMapData::LastLevel + 1]; + QMapData::Node *node = mutableFindNode(update, akey); + if (node == e) + node = node_create(d, update, akey, T()); + return concrete(node)->value; +} +template +inline int QMap::count(const Key &akey) const +{ + int cnt = 0; + QMapData::Node *node = findNode(akey); + if (node != e) { + do { + ++cnt; + node = node->forward[0]; + } while (node != e && !qMapLessThanKey(akey, concrete(node)->key)); + } + return cnt; +} +template +inline bool QMap::contains(const Key &akey) const +{ + return findNode(akey) != e; +} +template +inline typename QMap::iterator QMap::insert(const Key &akey, + const T &avalue) +{ + detach(); + QMapData::Node *update[QMapData::LastLevel + 1]; + QMapData::Node *node = mutableFindNode(update, akey); + if (node == e) { + node = node_create(d, update, akey, avalue); + } else { + concrete(node)->value = avalue; + } + return iterator(node); +} +template +inline typename QMap::iterator QMap::insertMulti(const Key &akey, + const T &avalue) +{ + detach(); + QMapData::Node *update[QMapData::LastLevel + 1]; + mutableFindNode(update, akey); + return iterator(node_create(d, update, akey, avalue)); +} +template +inline typename QMap::const_iterator QMap::find(const Key &akey) const +{ + return const_iterator(findNode(akey)); +} +template +inline typename QMap::const_iterator QMap::constFind(const Key &akey) const +{ + return const_iterator(findNode(akey)); +} +template +inline typename QMap::iterator QMap::find(const Key &akey) +{ + detach(); + return iterator(findNode(akey)); +} +template +inline QMap &QMap::unite(const QMap &other) +{ + QMap copy(other); + const_iterator it = copy.constEnd(); + const const_iterator b = copy.constBegin(); + while (it != b) { + --it; + insertMulti(it.key(), it.value()); + } + return *this; +} +template + void QMap::freeData(QMapData *x) +{ + if (QTypeInfo::isComplex || QTypeInfo::isComplex) { + QMapData *cur = x; + QMapData *next = cur->forward[0]; + while (next != x) { + cur = next; + next = cur->forward[0]; + Node *concreteNode = concrete(reinterpret_cast(cur)); + concreteNode->key.~Key(); + concreteNode->value.~T(); + } + } + x->continueFreeData(payload()); +} +template + int QMap::remove(const Key &akey) +{ + detach(); + QMapData::Node *update[QMapData::LastLevel + 1]; + QMapData::Node *cur = e; + QMapData::Node *next = e; + int oldSize = d->size; + for (int i = d->topLevel; i >= 0; i--) { + while ((next = cur->forward[i]) != e && qMapLessThanKey(concrete(next)->key, akey)) + cur = next; + update[i] = cur; + } + if (next != e && !qMapLessThanKey(akey, concrete(next)->key)) { + bool deleteNext = true; + do { + cur = next; + next = cur->forward[0]; + deleteNext = (next != e && !qMapLessThanKey(concrete(cur)->key, concrete(next)->key)); + concrete(cur)->key.~Key(); + concrete(cur)->value.~T(); + d->node_delete(update, payload(), cur); + } while (deleteNext); + } + return oldSize - d->size; +} +template + T QMap::take(const Key &akey) +{ + detach(); + QMapData::Node *update[QMapData::LastLevel + 1]; + QMapData::Node *cur = e; + QMapData::Node *next = e; + for (int i = d->topLevel; i >= 0; i--) { + while ((next = cur->forward[i]) != e && qMapLessThanKey(concrete(next)->key, akey)) + cur = next; + update[i] = cur; + } + if (next != e && !qMapLessThanKey(akey, concrete(next)->key)) { + T t = concrete(next)->value; + concrete(next)->key.~Key(); + concrete(next)->value.~T(); + d->node_delete(update, payload(), next); + return t; + } + return T(); +} +template + typename QMap::iterator QMap::erase(iterator it) +{ + QMapData::Node *update[QMapData::LastLevel + 1]; + QMapData::Node *cur = e; + QMapData::Node *next = e; + if (it == iterator(e)) + return it; + for (int i = d->topLevel; i >= 0; i--) { + while ((next = cur->forward[i]) != e && qMapLessThanKey(concrete(next)->key, it.key())) + cur = next; + update[i] = cur; + } + while (next != e) { + cur = next; + next = cur->forward[0]; + if (cur == it) { + concrete(cur)->key.~Key(); + concrete(cur)->value.~T(); + d->node_delete(update, payload(), cur); + return iterator(next); + } + for (int i = 0; i <= d->topLevel; ++i) { + if (update[i]->forward[i] != cur) + break; + update[i] = cur; + } + } + return end(); +} +template + void QMap::detach_helper() +{ + union { QMapData *d; QMapData::Node *e; } x; + x.d = QMapData::createData(alignment()); + if (d->size) { + x.d->insertInOrder = true; + QMapData::Node *update[QMapData::LastLevel + 1]; + QMapData::Node *cur = e->forward[0]; + update[0] = x.e; + while (cur != e) { + try { + Node *concreteNode = concrete(cur); + node_create(x.d, update, concreteNode->key, concreteNode->value); + } catch (...) { + freeData(x.d); + throw; + } + cur = cur->forward[0]; + } + x.d->insertInOrder = false; + } + if (!d->ref.deref()) + freeData(d); + d = x.d; +} +template + QMapData::Node *QMap::mutableFindNode(QMapData::Node *aupdate[], + const Key &akey) const +{ + QMapData::Node *cur = e; + QMapData::Node *next = e; + for (int i = d->topLevel; i >= 0; i--) { + while ((next = cur->forward[i]) != e && qMapLessThanKey(concrete(next)->key, akey)) + cur = next; + aupdate[i] = cur; + } + if (next != e && !qMapLessThanKey(akey, concrete(next)->key)) { + return next; + } else { + return e; + } +} +template + QList QMap::uniqueKeys() const +{ + QList res; + const_iterator i = begin(); + if (i != end()) { + for (;;) { + const Key &aKey = i.key(); + res.append(aKey); + do { + if (++i == end()) + goto break_out_of_outer_loop; + } while (!(aKey < i.key())); + } + } +break_out_of_outer_loop: + return res; +} +template + QList QMap::keys() const +{ + QList res; + const_iterator i = begin(); + while (i != end()) { + res.append(i.key()); + ++i; + } + return res; +} +template + QList QMap::keys(const T &avalue) const +{ + QList res; + const_iterator i = begin(); + while (i != end()) { + if (i.value() == avalue) + res.append(i.key()); + ++i; + } + return res; +} +template + const Key QMap::key(const T &avalue) const +{ + return key(avalue, Key()); +} +template + const Key QMap::key(const T &avalue, const Key &defaultKey) const +{ + const_iterator i = begin(); + while (i != end()) { + if (i.value() == avalue) + return i.key(); + ++i; + } + return defaultKey; +} +template + QList QMap::values() const +{ + QList res; + const_iterator i = begin(); + while (i != end()) { + res.append(i.value()); + ++i; + } + return res; +} +template + QList QMap::values(const Key &akey) const +{ + QList res; + QMapData::Node *node = findNode(akey); + if (node != e) { + do { + res.append(concrete(node)->value); + node = node->forward[0]; + } while (node != e && !qMapLessThanKey(akey, concrete(node)->key)); + } + return res; +} +template +inline typename QMap::const_iterator +QMap::lowerBound(const Key &akey) const +{ + QMapData::Node *update[QMapData::LastLevel + 1]; + mutableFindNode(update, akey); + return const_iterator(update[0]->forward[0]); +} +template +inline typename QMap::iterator QMap::lowerBound(const Key &akey) +{ + detach(); + return static_cast(const_cast(this)->lowerBound(akey)); +} +template +inline typename QMap::const_iterator +QMap::upperBound(const Key &akey) const +{ + QMapData::Node *update[QMapData::LastLevel + 1]; + mutableFindNode(update, akey); + QMapData::Node *node = update[0]->forward[0]; + while (node != e && !qMapLessThanKey(akey, concrete(node)->key)) + node = node->forward[0]; + return const_iterator(node); +} +template +inline typename QMap::iterator QMap::upperBound(const Key &akey) +{ + detach(); + return static_cast(const_cast(this)->upperBound(akey)); +} +template + bool QMap::operator==(const QMap &other) const +{ + if (size() != other.size()) + return false; + if (d == other.d) + return true; + const_iterator it1 = begin(); + const_iterator it2 = other.begin(); + while (it1 != end()) { + if (!(it1.value() == it2.value()) || qMapLessThanKey(it1.key(), it2.key()) || qMapLessThanKey(it2.key(), it1.key())) + return false; + ++it2; + ++it1; + } + return true; +} +template + QMap::QMap(const std::map &other) +{ + d = QMapData::createData(alignment()); + d->insertInOrder = true; + typename std::map::const_iterator it = other.end(); + while (it != other.begin()) { + --it; + insert((*it).first, (*it).second); + } + d->insertInOrder = false; +} +template + std::map QMap::toStdMap() const +{ + std::map map; + const_iterator it = end(); + while (it != begin()) { + --it; + map.insert(std::pair(it.key(), it.value())); + } + return map; +} +template +class QMultiMap : public QMap +{ +public: + QMultiMap() {} + QMultiMap(const QMap &other) : QMap(other) {} + inline typename QMap::iterator replace(const Key &key, const T &value) + { return QMap::insert(key, value); } + inline typename QMap::iterator insert(const Key &key, const T &value) + { return QMap::insertMulti(key, value); } + inline QMultiMap &operator+=(const QMultiMap &other) + { unite(other); return *this; } + inline QMultiMap operator+(const QMultiMap &other) const + { QMultiMap result = *this; result += other; return result; } + using QMap::contains; + using QMap::remove; + using QMap::count; + using QMap::find; + using QMap::constFind; + bool contains(const Key &key, const T &value) const; + int remove(const Key &key, const T &value); + int count(const Key &key, const T &value) const; + typename QMap::iterator find(const Key &key, const T &value) { + typename QMap::iterator i(find(key)); + typename QMap::iterator end(this->end()); + while (i != end && !qMapLessThanKey(key, i.key())) { + if (i.value() == value) + return i; + ++i; + } + return end; + } + typename QMap::const_iterator find(const Key &key, const T &value) const { + typename QMap::const_iterator i(constFind(key)); + typename QMap::const_iterator end(QMap::constEnd()); + while (i != end && !qMapLessThanKey(key, i.key())) { + if (i.value() == value) + return i; + ++i; + } + return end; + } + typename QMap::const_iterator constFind(const Key &key, const T &value) const + { return find(key, value); } +private: + T &operator[](const Key &key); + const T operator[](const Key &key) const; +}; +template +inline bool QMultiMap::contains(const Key &key, const T &value) const +{ + return constFind(key, value) != QMap::constEnd(); +} +template +inline int QMultiMap::remove(const Key &key, const T &value) +{ + int n = 0; + typename QMap::iterator i(find(key)); + typename QMap::iterator end(QMap::end()); + while (i != end && !qMapLessThanKey(key, i.key())) { + if (i.value() == value) { + i = erase(i); + ++n; + } else { + ++i; + } + } + return n; +} +template +inline int QMultiMap::count(const Key &key, const T &value) const +{ + int n = 0; + typename QMap::const_iterator i(constFind(key)); + typename QMap::const_iterator end(QMap::constEnd()); + while (i != end && !qMapLessThanKey(key, i.key())) { + if (i.value() == value) + ++n; + ++i; + } + return n; +} +template class QMapIterator { typedef typename QMap::const_iterator const_iterator; typedef const_iterator Item; QMap c; const_iterator i, n; inline bool item_exists() const { return n != c.constEnd(); } public: inline QMapIterator(const QMap &container) : c(container), i(c.constBegin()), n(c.constEnd()) {} inline QMapIterator &operator=(const QMap &container) { c = container; i = c.constBegin(); n = c.constEnd(); return *this; } inline void toFront() { i = c.constBegin(); n = c.constEnd(); } inline void toBack() { i = c.constEnd(); n = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline Item next() { n = i++; return n; } inline Item peekNext() const { return i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline Item previous() { n = --i; return n; } inline Item peekPrevious() const { const_iterator p = i; return --p; } inline const T &value() const { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qmap.h",1059) : qt_noop()); return *n; } inline const Key &key() const { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qmap.h",1059) : qt_noop()); return n.key(); } inline bool findNext(const T &t) { while ((n = i) != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(n = --i) == t) return true; n = c.constEnd(); return false; } }; +template class QMutableMapIterator { typedef typename QMap::iterator iterator; typedef typename QMap::const_iterator const_iterator; typedef iterator Item; QMap *c; iterator i, n; inline bool item_exists() const { return const_iterator(n) != c->constEnd(); } public: inline QMutableMapIterator(QMap &container) : c(&container) { c->setSharable(false); i = c->begin(); n = c->end(); } inline ~QMutableMapIterator() { c->setSharable(true); } inline QMutableMapIterator &operator=(QMap &container) { c->setSharable(true); c = &container; c->setSharable(false); i = c->begin(); n = c->end(); return *this; } inline void toFront() { i = c->begin(); n = c->end(); } inline void toBack() { i = c->end(); n = c->end(); } inline bool hasNext() const { return const_iterator(i) != c->constEnd(); } inline Item next() { n = i++; return n; } inline Item peekNext() const { return i; } inline bool hasPrevious() const { return const_iterator(i) != c->constBegin(); } inline Item previous() { n = --i; return n; } inline Item peekPrevious() const { iterator p = i; return --p; } inline void remove() { if (const_iterator(n) != c->constEnd()) { i = c->erase(n); n = c->end(); } } inline void setValue(const T &t) { if (const_iterator(n) != c->constEnd()) *n = t; } inline T &value() { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qmap.h",1060) : qt_noop()); return *n; } inline const T &value() const { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qmap.h",1060) : qt_noop()); return *n; } inline const Key &key() const { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qmap.h",1060) : qt_noop()); return n.key(); } inline bool findNext(const T &t) { while (const_iterator(n = i) != c->constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (const_iterator(i) != c->constBegin()) if (*(n = --i) == t) return true; n = c->end(); return false; } }; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QDataStream; +class QDate; +class QDateTime; +class QTime; +class QVariant; +class QTextStream; +class QTextStreamPrivate; +class QLocale; +class QSystemLocale +{ +public: + QSystemLocale(); + virtual ~QSystemLocale(); + enum QueryType { + LanguageId, + CountryId, + DecimalPoint, + GroupSeparator, + ZeroDigit, + NegativeSign, + DateFormatLong, + DateFormatShort, + TimeFormatLong, + TimeFormatShort, + DayNameLong, + DayNameShort, + MonthNameLong, + MonthNameShort, + DateToStringLong, + DateToStringShort, + TimeToStringLong, + TimeToStringShort, + DateTimeFormatLong, + DateTimeFormatShort, + DateTimeToStringLong, + DateTimeToStringShort, + MeasurementSystem, + PositiveSign, + AMText, + PMText + }; + virtual QVariant query(QueryType type, QVariant in) const; + virtual QLocale fallbackLocale() const; +private: + QSystemLocale(bool); + friend QSystemLocale *QSystemLocale_globalSystemLocale(); +}; +struct QLocalePrivate; +class QLocale +{ + public: static const QMetaObject staticMetaObject; private: + + + friend class QString; + friend class QByteArray; + friend class QIntValidator; + friend class QDoubleValidator; + friend class QTextStream; + friend class QTextStreamPrivate; +public: + enum Language { + C = 1, + Abkhazian = 2, + Afan = 3, + Afar = 4, + Afrikaans = 5, + Albanian = 6, + Amharic = 7, + Arabic = 8, + Armenian = 9, + Assamese = 10, + Aymara = 11, + Azerbaijani = 12, + Bashkir = 13, + Basque = 14, + Bengali = 15, + Bhutani = 16, + Bihari = 17, + Bislama = 18, + Breton = 19, + Bulgarian = 20, + Burmese = 21, + Byelorussian = 22, + Cambodian = 23, + Catalan = 24, + Chinese = 25, + Corsican = 26, + Croatian = 27, + Czech = 28, + Danish = 29, + Dutch = 30, + English = 31, + Esperanto = 32, + Estonian = 33, + Faroese = 34, + FijiLanguage = 35, + Finnish = 36, + French = 37, + Frisian = 38, + Gaelic = 39, + Galician = 40, + Georgian = 41, + German = 42, + Greek = 43, + Greenlandic = 44, + Guarani = 45, + Gujarati = 46, + Hausa = 47, + Hebrew = 48, + Hindi = 49, + Hungarian = 50, + Icelandic = 51, + Indonesian = 52, + Interlingua = 53, + Interlingue = 54, + Inuktitut = 55, + Inupiak = 56, + Irish = 57, + Italian = 58, + Japanese = 59, + Javanese = 60, + Kannada = 61, + Kashmiri = 62, + Kazakh = 63, + Kinyarwanda = 64, + Kirghiz = 65, + Korean = 66, + Kurdish = 67, + Kurundi = 68, + Laothian = 69, + Latin = 70, + Latvian = 71, + Lingala = 72, + Lithuanian = 73, + Macedonian = 74, + Malagasy = 75, + Malay = 76, + Malayalam = 77, + Maltese = 78, + Maori = 79, + Marathi = 80, + Moldavian = 81, + Mongolian = 82, + NauruLanguage = 83, + Nepali = 84, + Norwegian = 85, + NorwegianBokmal = Norwegian, + Occitan = 86, + Oriya = 87, + Pashto = 88, + Persian = 89, + Polish = 90, + Portuguese = 91, + Punjabi = 92, + Quechua = 93, + RhaetoRomance = 94, + Romanian = 95, + Russian = 96, + Samoan = 97, + Sangho = 98, + Sanskrit = 99, + Serbian = 100, + SerboCroatian = 101, + Sesotho = 102, + Setswana = 103, + Shona = 104, + Sindhi = 105, + Singhalese = 106, + Siswati = 107, + Slovak = 108, + Slovenian = 109, + Somali = 110, + Spanish = 111, + Sundanese = 112, + Swahili = 113, + Swedish = 114, + Tagalog = 115, + Tajik = 116, + Tamil = 117, + Tatar = 118, + Telugu = 119, + Thai = 120, + Tibetan = 121, + Tigrinya = 122, + TongaLanguage = 123, + Tsonga = 124, + Turkish = 125, + Turkmen = 126, + Twi = 127, + Uigur = 128, + Ukrainian = 129, + Urdu = 130, + Uzbek = 131, + Vietnamese = 132, + Volapuk = 133, + Welsh = 134, + Wolof = 135, + Xhosa = 136, + Yiddish = 137, + Yoruba = 138, + Zhuang = 139, + Zulu = 140, + NorwegianNynorsk = 141, + Nynorsk = NorwegianNynorsk, + Bosnian = 142, + Divehi = 143, + Manx = 144, + Cornish = 145, + Akan = 146, + Konkani = 147, + Ga = 148, + Igbo = 149, + Kamba = 150, + Syriac = 151, + Blin = 152, + Geez = 153, + Koro = 154, + Sidamo = 155, + Atsam = 156, + Tigre = 157, + Jju = 158, + Friulian = 159, + Venda = 160, + Ewe = 161, + Walamo = 162, + Hawaiian = 163, + Tyap = 164, + Chewa = 165, + LastLanguage = Chewa + }; + enum Country { + AnyCountry = 0, + Afghanistan = 1, + Albania = 2, + Algeria = 3, + AmericanSamoa = 4, + Andorra = 5, + Angola = 6, + Anguilla = 7, + Antarctica = 8, + AntiguaAndBarbuda = 9, + Argentina = 10, + Armenia = 11, + Aruba = 12, + Australia = 13, + Austria = 14, + Azerbaijan = 15, + Bahamas = 16, + Bahrain = 17, + Bangladesh = 18, + Barbados = 19, + Belarus = 20, + Belgium = 21, + Belize = 22, + Benin = 23, + Bermuda = 24, + Bhutan = 25, + Bolivia = 26, + BosniaAndHerzegowina = 27, + Botswana = 28, + BouvetIsland = 29, + Brazil = 30, + BritishIndianOceanTerritory = 31, + BruneiDarussalam = 32, + Bulgaria = 33, + BurkinaFaso = 34, + Burundi = 35, + Cambodia = 36, + Cameroon = 37, + Canada = 38, + CapeVerde = 39, + CaymanIslands = 40, + CentralAfricanRepublic = 41, + Chad = 42, + Chile = 43, + China = 44, + ChristmasIsland = 45, + CocosIslands = 46, + Colombia = 47, + Comoros = 48, + DemocraticRepublicOfCongo = 49, + PeoplesRepublicOfCongo = 50, + CookIslands = 51, + CostaRica = 52, + IvoryCoast = 53, + Croatia = 54, + Cuba = 55, + Cyprus = 56, + CzechRepublic = 57, + Denmark = 58, + Djibouti = 59, + Dominica = 60, + DominicanRepublic = 61, + EastTimor = 62, + Ecuador = 63, + Egypt = 64, + ElSalvador = 65, + EquatorialGuinea = 66, + Eritrea = 67, + Estonia = 68, + Ethiopia = 69, + FalklandIslands = 70, + FaroeIslands = 71, + FijiCountry = 72, + Finland = 73, + France = 74, + MetropolitanFrance = 75, + FrenchGuiana = 76, + FrenchPolynesia = 77, + FrenchSouthernTerritories = 78, + Gabon = 79, + Gambia = 80, + Georgia = 81, + Germany = 82, + Ghana = 83, + Gibraltar = 84, + Greece = 85, + Greenland = 86, + Grenada = 87, + Guadeloupe = 88, + Guam = 89, + Guatemala = 90, + Guinea = 91, + GuineaBissau = 92, + Guyana = 93, + Haiti = 94, + HeardAndMcDonaldIslands = 95, + Honduras = 96, + HongKong = 97, + Hungary = 98, + Iceland = 99, + India = 100, + Indonesia = 101, + Iran = 102, + Iraq = 103, + Ireland = 104, + Israel = 105, + Italy = 106, + Jamaica = 107, + Japan = 108, + Jordan = 109, + Kazakhstan = 110, + Kenya = 111, + Kiribati = 112, + DemocraticRepublicOfKorea = 113, + RepublicOfKorea = 114, + Kuwait = 115, + Kyrgyzstan = 116, + Lao = 117, + Latvia = 118, + Lebanon = 119, + Lesotho = 120, + Liberia = 121, + LibyanArabJamahiriya = 122, + Liechtenstein = 123, + Lithuania = 124, + Luxembourg = 125, + Macau = 126, + Macedonia = 127, + Madagascar = 128, + Malawi = 129, + Malaysia = 130, + Maldives = 131, + Mali = 132, + Malta = 133, + MarshallIslands = 134, + Martinique = 135, + Mauritania = 136, + Mauritius = 137, + Mayotte = 138, + Mexico = 139, + Micronesia = 140, + Moldova = 141, + Monaco = 142, + Mongolia = 143, + Montserrat = 144, + Morocco = 145, + Mozambique = 146, + Myanmar = 147, + Namibia = 148, + NauruCountry = 149, + Nepal = 150, + Netherlands = 151, + NetherlandsAntilles = 152, + NewCaledonia = 153, + NewZealand = 154, + Nicaragua = 155, + Niger = 156, + Nigeria = 157, + Niue = 158, + NorfolkIsland = 159, + NorthernMarianaIslands = 160, + Norway = 161, + Oman = 162, + Pakistan = 163, + Palau = 164, + PalestinianTerritory = 165, + Panama = 166, + PapuaNewGuinea = 167, + Paraguay = 168, + Peru = 169, + Philippines = 170, + Pitcairn = 171, + Poland = 172, + Portugal = 173, + PuertoRico = 174, + Qatar = 175, + Reunion = 176, + Romania = 177, + RussianFederation = 178, + Rwanda = 179, + SaintKittsAndNevis = 180, + StLucia = 181, + StVincentAndTheGrenadines = 182, + Samoa = 183, + SanMarino = 184, + SaoTomeAndPrincipe = 185, + SaudiArabia = 186, + Senegal = 187, + Seychelles = 188, + SierraLeone = 189, + Singapore = 190, + Slovakia = 191, + Slovenia = 192, + SolomonIslands = 193, + Somalia = 194, + SouthAfrica = 195, + SouthGeorgiaAndTheSouthSandwichIslands = 196, + Spain = 197, + SriLanka = 198, + StHelena = 199, + StPierreAndMiquelon = 200, + Sudan = 201, + Suriname = 202, + SvalbardAndJanMayenIslands = 203, + Swaziland = 204, + Sweden = 205, + Switzerland = 206, + SyrianArabRepublic = 207, + Taiwan = 208, + Tajikistan = 209, + Tanzania = 210, + Thailand = 211, + Togo = 212, + Tokelau = 213, + TongaCountry = 214, + TrinidadAndTobago = 215, + Tunisia = 216, + Turkey = 217, + Turkmenistan = 218, + TurksAndCaicosIslands = 219, + Tuvalu = 220, + Uganda = 221, + Ukraine = 222, + UnitedArabEmirates = 223, + UnitedKingdom = 224, + UnitedStates = 225, + UnitedStatesMinorOutlyingIslands = 226, + Uruguay = 227, + Uzbekistan = 228, + Vanuatu = 229, + VaticanCityState = 230, + Venezuela = 231, + VietNam = 232, + BritishVirginIslands = 233, + USVirginIslands = 234, + WallisAndFutunaIslands = 235, + WesternSahara = 236, + Yemen = 237, + Yugoslavia = 238, + Zambia = 239, + Zimbabwe = 240, + SerbiaAndMontenegro = 241, + LastCountry = SerbiaAndMontenegro + }; + enum MeasurementSystem { MetricSystem, ImperialSystem }; + enum FormatType { LongFormat, ShortFormat, NarrowFormat }; + enum NumberOption { + OmitGroupSeparator = 0x01, + RejectGroupSeparator = 0x02 + }; + typedef QFlags NumberOptions; + QLocale(); + QLocale(const QString &name); + QLocale(Language language, Country country = AnyCountry); + QLocale(const QLocale &other); + QLocale &operator=(const QLocale &other); + Language language() const; + Country country() const; + QString name() const; + short toShort(const QString &s, bool *ok = 0, int base = 0) const; + ushort toUShort(const QString &s, bool *ok = 0, int base = 0) const; + int toInt(const QString &s, bool *ok = 0, int base = 0) const; + uint toUInt(const QString &s, bool *ok = 0, int base = 0) const; + qlonglong toLongLong(const QString &s, bool *ok = 0, int base = 0) const; + qlonglong toULongLong(const QString &s, bool *ok = 0, int base = 0) const; + float toFloat(const QString &s, bool *ok = 0) const; + double toDouble(const QString &s, bool *ok = 0) const; + QString toString(qlonglong i) const; + QString toString(qulonglong i) const; + inline QString toString(short i) const; + inline QString toString(ushort i) const; + inline QString toString(int i) const; + inline QString toString(uint i) const; + QString toString(double i, char f = 'g', int prec = 6) const; + inline QString toString(float i, char f = 'g', int prec = 6) const; + QString toString(const QDate &date, const QString &formatStr) const; + QString toString(const QDate &date, FormatType format = LongFormat) const; + QString toString(const QTime &time, const QString &formatStr) const; + QString toString(const QTime &time, FormatType format = LongFormat) const; + QString toString(const QDateTime &dateTime, FormatType format = LongFormat) const; + QString toString(const QDateTime &dateTime, const QString &format) const; + QString dateFormat(FormatType format = LongFormat) const; + QString timeFormat(FormatType format = LongFormat) const; + QString dateTimeFormat(FormatType format = LongFormat) const; + QDate toDate(const QString &string, FormatType = LongFormat) const; + QTime toTime(const QString &string, FormatType = LongFormat) const; + QDateTime toDateTime(const QString &string, FormatType format = LongFormat) const; + QDate toDate(const QString &string, const QString &format) const; + QTime toTime(const QString &string, const QString &format) const; + QDateTime toDateTime(const QString &string, const QString &format) const; + QChar decimalPoint() const; + QChar groupSeparator() const; + QChar percent() const; + QChar zeroDigit() const; + QChar negativeSign() const; + QChar positiveSign() const; + QChar exponential() const; + QString monthName(int, FormatType format = LongFormat) const; + QString standaloneMonthName(int, FormatType format = LongFormat) const; + QString dayName(int, FormatType format = LongFormat) const; + QString standaloneDayName(int, FormatType format = LongFormat) const; + QString amText() const; + QString pmText() const; + MeasurementSystem measurementSystem() const; + inline bool operator==(const QLocale &other) const; + inline bool operator!=(const QLocale &other) const; + static QString languageToString(Language language); + static QString countryToString(Country country); + static void setDefault(const QLocale &locale); + static QLocale c() { return QLocale(C); } + static QLocale system(); + static QList countriesForLanguage(Language lang); + void setNumberOptions(NumberOptions options); + NumberOptions numberOptions() const; + struct Data { + quint16 index; + quint16 numberOptions; + } + ; +private: + friend struct QLocalePrivate; + union { + void *v; + Data p; + }; + const QLocalePrivate *d() const; +}; +template <> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QLocale)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QLocale"; } }; +inline QFlags operator|(QLocale::NumberOptions::enum_type f1, QLocale::NumberOptions::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(QLocale::NumberOptions::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QLocale::NumberOptions::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QString QLocale::toString(short i) const + { return toString(qlonglong(i)); } +inline QString QLocale::toString(ushort i) const + { return toString(qulonglong(i)); } +inline QString QLocale::toString(int i) const + { return toString(qlonglong(i)); } +inline QString QLocale::toString(uint i) const + { return toString(qulonglong(i)); } +inline QString QLocale::toString(float i, char f, int prec) const + { return toString(double(i), f, prec); } +inline bool QLocale::operator==(const QLocale &other) const + { return d() == other.d() && numberOptions() == other.numberOptions(); } +inline bool QLocale::operator!=(const QLocale &other) const + { return d() != other.d() || numberOptions() != other.numberOptions(); } + QDataStream &operator<<(QDataStream &, const QLocale &); + QDataStream &operator>>(QDataStream &, QLocale &); +typedef QtValidLicenseForCoreModule QtCoreModule; +class QTextCodec; +class QTextDecoder; +class QTextStreamPrivate; +class QTextStream +{ + inline QTextStreamPrivate* d_func() { return reinterpret_cast(qGetPtrHelper(d_ptr)); } inline const QTextStreamPrivate* d_func() const { return reinterpret_cast(qGetPtrHelper(d_ptr)); } friend class QTextStreamPrivate; +public: + enum RealNumberNotation { + SmartNotation, + FixedNotation, + ScientificNotation + }; + enum FieldAlignment { + AlignLeft, + AlignRight, + AlignCenter, + AlignAccountingStyle + }; + enum Status { + Ok, + ReadPastEnd, + ReadCorruptData + }; + enum NumberFlag { + ShowBase = 0x1, + ForcePoint = 0x2, + ForceSign = 0x4, + UppercaseBase = 0x8, + UppercaseDigits = 0x10 + }; + typedef QFlags NumberFlags; + QTextStream(); + explicit QTextStream(QIODevice *device); + explicit QTextStream(FILE *fileHandle, QIODevice::OpenMode openMode = QIODevice::ReadWrite); + explicit QTextStream(QString *string, QIODevice::OpenMode openMode = QIODevice::ReadWrite); + explicit QTextStream(QByteArray *array, QIODevice::OpenMode openMode = QIODevice::ReadWrite); + explicit QTextStream(const QByteArray &array, QIODevice::OpenMode openMode = QIODevice::ReadOnly); + virtual ~QTextStream(); + void setCodec(QTextCodec *codec); + void setCodec(const char *codecName); + QTextCodec *codec() const; + void setAutoDetectUnicode(bool enabled); + bool autoDetectUnicode() const; + void setGenerateByteOrderMark(bool generate); + bool generateByteOrderMark() const; + void setLocale(const QLocale &locale); + QLocale locale() const; + void setDevice(QIODevice *device); + QIODevice *device() const; + void setString(QString *string, QIODevice::OpenMode openMode = QIODevice::ReadWrite); + QString *string() const; + Status status() const; + void setStatus(Status status); + void resetStatus(); + bool atEnd() const; + void reset(); + void flush(); + bool seek(qint64 pos); + qint64 pos() const; + void skipWhiteSpace(); + QString readLine(qint64 maxlen = 0); + QString readAll(); + QString read(qint64 maxlen); + void setFieldAlignment(FieldAlignment alignment); + FieldAlignment fieldAlignment() const; + void setPadChar(QChar ch); + QChar padChar() const; + void setFieldWidth(int width); + int fieldWidth() const; + void setNumberFlags(NumberFlags flags); + NumberFlags numberFlags() const; + void setIntegerBase(int base); + int integerBase() const; + void setRealNumberNotation(RealNumberNotation notation); + RealNumberNotation realNumberNotation() const; + void setRealNumberPrecision(int precision); + int realNumberPrecision() const; + QTextStream &operator>>(QChar &ch); + QTextStream &operator>>(char &ch); + QTextStream &operator>>(signed short &i); + QTextStream &operator>>(unsigned short &i); + QTextStream &operator>>(signed int &i); + QTextStream &operator>>(unsigned int &i); + QTextStream &operator>>(signed long &i); + QTextStream &operator>>(unsigned long &i); + QTextStream &operator>>(qlonglong &i); + QTextStream &operator>>(qulonglong &i); + QTextStream &operator>>(float &f); + QTextStream &operator>>(double &f); + QTextStream &operator>>(QString &s); + QTextStream &operator>>(QByteArray &array); + QTextStream &operator>>(char *c); + QTextStream &operator<<(QBool b); + QTextStream &operator<<(QChar ch); + QTextStream &operator<<(char ch); + QTextStream &operator<<(signed short i); + QTextStream &operator<<(unsigned short i); + QTextStream &operator<<(signed int i); + QTextStream &operator<<(unsigned int i); + QTextStream &operator<<(signed long i); + QTextStream &operator<<(unsigned long i); + QTextStream &operator<<(qlonglong i); + QTextStream &operator<<(qulonglong i); + QTextStream &operator<<(float f); + QTextStream &operator<<(double f); + QTextStream &operator<<(const QString &s); + QTextStream &operator<<(const QByteArray &array); + QTextStream &operator<<(const char *c); + QTextStream &operator<<(const void *ptr); +private: + QTextStream(const QTextStream &); QTextStream &operator=(const QTextStream &); + QScopedPointer d_ptr; +}; +inline QFlags operator|(QTextStream::NumberFlags::enum_type f1, QTextStream::NumberFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(QTextStream::NumberFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QTextStream::NumberFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +typedef QTextStream & (*QTextStreamFunction)(QTextStream &); +typedef void (QTextStream::*QTSMFI)(int); +typedef void (QTextStream::*QTSMFC)(QChar); +class QTextStreamManipulator +{ +public: + QTextStreamManipulator(QTSMFI m, int a) { mf = m; mc = 0; arg = a; } + QTextStreamManipulator(QTSMFC m, QChar c) { mf = 0; mc = m; ch = c; arg = -1; } + void exec(QTextStream &s) { if (mf) { (s.*mf)(arg); } else { (s.*mc)(ch); } } +private: + QTSMFI mf; + QTSMFC mc; + int arg; + QChar ch; +}; +inline QTextStream &operator>>(QTextStream &s, QTextStreamFunction f) +{ return (*f)(s); } +inline QTextStream &operator<<(QTextStream &s, QTextStreamFunction f) +{ return (*f)(s); } +inline QTextStream &operator<<(QTextStream &s, QTextStreamManipulator m) +{ m.exec(s); return s; } + QTextStream &bin(QTextStream &s); + QTextStream &oct(QTextStream &s); + QTextStream &dec(QTextStream &s); + QTextStream &hex(QTextStream &s); + QTextStream &showbase(QTextStream &s); + QTextStream &forcesign(QTextStream &s); + QTextStream &forcepoint(QTextStream &s); + QTextStream &noshowbase(QTextStream &s); + QTextStream &noforcesign(QTextStream &s); + QTextStream &noforcepoint(QTextStream &s); + QTextStream &uppercasebase(QTextStream &s); + QTextStream &uppercasedigits(QTextStream &s); + QTextStream &lowercasebase(QTextStream &s); + QTextStream &lowercasedigits(QTextStream &s); + QTextStream &fixed(QTextStream &s); + QTextStream &scientific(QTextStream &s); + QTextStream &left(QTextStream &s); + QTextStream &right(QTextStream &s); + QTextStream ¢er(QTextStream &s); + QTextStream &endl(QTextStream &s); + QTextStream &flush(QTextStream &s); + QTextStream &reset(QTextStream &s); + QTextStream &bom(QTextStream &s); + QTextStream &ws(QTextStream &s); +inline QTextStreamManipulator qSetFieldWidth(int width) +{ + QTSMFI func = &QTextStream::setFieldWidth; + return QTextStreamManipulator(func,width); +} +inline QTextStreamManipulator qSetPadChar(QChar ch) +{ + QTSMFC func = &QTextStream::setPadChar; + return QTextStreamManipulator(func, ch); +} +inline QTextStreamManipulator qSetRealNumberPrecision(int precision) +{ + QTSMFI func = &QTextStream::setRealNumberPrecision; + return QTextStreamManipulator(func, precision); +} +typedef QtValidLicenseForCoreModule QtCoreModule; +template +class QSet +{ + typedef QHash Hash; +public: + inline QSet() {} + inline QSet(const QSet &other) : q_hash(other.q_hash) {} + inline QSet &operator=(const QSet &other) + { q_hash = other.q_hash; return *this; } + inline bool operator==(const QSet &other) const + { return q_hash == other.q_hash; } + inline bool operator!=(const QSet &other) const + { return q_hash != other.q_hash; } + inline int size() const { return q_hash.size(); } + inline bool isEmpty() const { return q_hash.isEmpty(); } + inline int capacity() const { return q_hash.capacity(); } + inline void reserve(int size); + inline void squeeze() { q_hash.squeeze(); } + inline void detach() { q_hash.detach(); } + inline bool isDetached() const { return q_hash.isDetached(); } + inline void setSharable(bool sharable) { q_hash.setSharable(sharable); } + inline void clear() { q_hash.clear(); } + inline bool remove(const T &value) { return q_hash.remove(value) != 0; } + inline bool contains(const T &value) const { return q_hash.contains(value); } + bool contains(const QSet &set) const; + class const_iterator; + class iterator + { + typedef QHash Hash; + typename Hash::iterator i; + friend class const_iterator; + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + typedef T value_type; + typedef const T *pointer; + typedef const T &reference; + inline iterator() {} + inline iterator(typename Hash::iterator o) : i(o) {} + inline iterator(const iterator &o) : i(o.i) {} + inline iterator &operator=(const iterator &o) { i = o.i; return *this; } + inline const T &operator*() const { return i.key(); } + inline const T *operator->() const { return &i.key(); } + inline bool operator==(const iterator &o) const { return i == o.i; } + inline bool operator!=(const iterator &o) const { return i != o.i; } + inline bool operator==(const const_iterator &o) const + { return i == o.i; } + inline bool operator!=(const const_iterator &o) const + { return i != o.i; } + inline iterator &operator++() { ++i; return *this; } + inline iterator operator++(int) { iterator r = *this; ++i; return r; } + inline iterator &operator--() { --i; return *this; } + inline iterator operator--(int) { iterator r = *this; --i; return r; } + inline iterator operator+(int j) const { return i + j; } + inline iterator operator-(int j) const { return i - j; } + inline iterator &operator+=(int j) { i += j; return *this; } + inline iterator &operator-=(int j) { i -= j; return *this; } + }; + class const_iterator + { + typedef QHash Hash; + typename Hash::const_iterator i; + friend class iterator; + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + typedef T value_type; + typedef const T *pointer; + typedef const T &reference; + inline const_iterator() {} + inline const_iterator(typename Hash::const_iterator o) : i(o) {} + inline const_iterator(const const_iterator &o) : i(o.i) {} + inline const_iterator(const iterator &o) + : i(o.i) {} + inline const_iterator &operator=(const const_iterator &o) { i = o.i; return *this; } + inline const T &operator*() const { return i.key(); } + inline const T *operator->() const { return &i.key(); } + inline bool operator==(const const_iterator &o) const { return i == o.i; } + inline bool operator!=(const const_iterator &o) const { return i != o.i; } + inline const_iterator &operator++() { ++i; return *this; } + inline const_iterator operator++(int) { const_iterator r = *this; ++i; return r; } + inline const_iterator &operator--() { --i; return *this; } + inline const_iterator operator--(int) { const_iterator r = *this; --i; return r; } + inline const_iterator operator+(int j) const { return i + j; } + inline const_iterator operator-(int j) const { return i - j; } + inline const_iterator &operator+=(int j) { i += j; return *this; } + inline const_iterator &operator-=(int j) { i -= j; return *this; } + }; + inline iterator begin() { return q_hash.begin(); } + inline const_iterator begin() const { return q_hash.begin(); } + inline const_iterator constBegin() const { return q_hash.constBegin(); } + inline iterator end() { return q_hash.end(); } + inline const_iterator end() const { return q_hash.end(); } + inline const_iterator constEnd() const { return q_hash.constEnd(); } + iterator erase(iterator i) + { return q_hash.erase(reinterpret_cast(i)); } + typedef iterator Iterator; + typedef const_iterator ConstIterator; + inline int count() const { return q_hash.count(); } + inline const_iterator insert(const T &value) + { return static_cast(q_hash.insert(value, + QHashDummyValue())); } + iterator find(const T &value) { return q_hash.find(value); } + const_iterator find(const T &value) const { return q_hash.find(value); } + inline const_iterator constFind(const T &value) const { return find(value); } + QSet &unite(const QSet &other); + QSet &intersect(const QSet &other); + QSet &subtract(const QSet &other); + typedef T key_type; + typedef T value_type; + typedef value_type *pointer; + typedef const value_type *const_pointer; + typedef value_type &reference; + typedef const value_type &const_reference; + typedef ptrdiff_t difference_type; + typedef int size_type; + inline bool empty() const { return isEmpty(); } + inline QSet &operator<<(const T &value) { insert(value); return *this; } + inline QSet &operator|=(const QSet &other) { unite(other); return *this; } + inline QSet &operator|=(const T &value) { insert(value); return *this; } + inline QSet &operator&=(const QSet &other) { intersect(other); return *this; } + inline QSet &operator&=(const T &value) + { QSet result; if (contains(value)) result.insert(value); return (*this = result); } + inline QSet &operator+=(const QSet &other) { unite(other); return *this; } + inline QSet &operator+=(const T &value) { insert(value); return *this; } + inline QSet &operator-=(const QSet &other) { subtract(other); return *this; } + inline QSet &operator-=(const T &value) { remove(value); return *this; } + inline QSet operator|(const QSet &other) const + { QSet result = *this; result |= other; return result; } + inline QSet operator&(const QSet &other) const + { QSet result = *this; result &= other; return result; } + inline QSet operator+(const QSet &other) const + { QSet result = *this; result += other; return result; } + inline QSet operator-(const QSet &other) const + { QSet result = *this; result -= other; return result; } + inline QSet operator|(const QSet &other) + { QSet result = *this; result |= other; return result; } + inline QSet operator&(const QSet &other) + { QSet result = *this; result &= other; return result; } + inline QSet operator+(const QSet &other) + { QSet result = *this; result += other; return result; } + inline QSet operator-(const QSet &other) + { QSet result = *this; result -= other; return result; } + QList toList() const; + inline QList values() const { return toList(); } + static QSet fromList(const QList &list); +private: + Hash q_hash; +}; +template +inline void QSet::reserve(int asize) { q_hash.reserve(asize); } +template +inline QSet &QSet::unite(const QSet &other) +{ + QSet copy(other); + typename QSet::const_iterator i = copy.constEnd(); + while (i != copy.constBegin()) { + --i; + insert(*i); + } + return *this; +} +template +inline QSet &QSet::intersect(const QSet &other) +{ + QSet copy1(*this); + QSet copy2(other); + typename QSet::const_iterator i = copy1.constEnd(); + while (i != copy1.constBegin()) { + --i; + if (!copy2.contains(*i)) + remove(*i); + } + return *this; +} +template +inline QSet &QSet::subtract(const QSet &other) +{ + QSet copy1(*this); + QSet copy2(other); + typename QSet::const_iterator i = copy1.constEnd(); + while (i != copy1.constBegin()) { + --i; + if (copy2.contains(*i)) + remove(*i); + } + return *this; +} +template +inline bool QSet::contains(const QSet &other) const +{ + typename QSet::const_iterator i = other.constBegin(); + while (i != other.constEnd()) { + if (!contains(*i)) + return false; + ++i; + } + return true; +} +template + QList QSet::toList() const +{ + QList result; + typename QSet::const_iterator i = constBegin(); + while (i != constEnd()) { + result.append(*i); + ++i; + } + return result; +} +template + QSet QList::toSet() const +{ + QSet result; + result.reserve(size()); + for (int i = 0; i < size(); ++i) + result.insert(at(i)); + return result; +} +template +QSet QSet::fromList(const QList &list) +{ + return list.toSet(); +} +template +QList QList::fromSet(const QSet &set) +{ + return set.toList(); +} +template class QSetIterator { typedef typename QSet::const_iterator const_iterator; QSet c; const_iterator i; public: inline QSetIterator(const QSet &container) : c(container), i(c.constBegin()) {} inline QSetIterator &operator=(const QSet &container) { c = container; i = c.constBegin(); return *this; } inline void toFront() { i = c.constBegin(); } inline void toBack() { i = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline const T &next() { return *i++; } inline const T &peekNext() const { return *i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline const T &previous() { return *--i; } inline const T &peekPrevious() const { const_iterator p = i; return *--p; } inline bool findNext(const T &t) { while (i != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(--i) == t) return true; return false; } }; +template +class QMutableSetIterator +{ + typedef typename QSet::iterator iterator; + QSet *c; + iterator i, n; + inline bool item_exists() const { return n != c->constEnd(); } +public: + inline QMutableSetIterator(QSet &container) + : c(&container) + { c->setSharable(false); i = c->begin(); n = c->end(); } + inline ~QMutableSetIterator() + { c->setSharable(true); } + inline QMutableSetIterator &operator=(QSet &container) + { c->setSharable(true); c = &container; c->setSharable(false); + i = c->begin(); n = c->end(); return *this; } + inline void toFront() { i = c->begin(); n = c->end(); } + inline void toBack() { i = c->end(); n = i; } + inline bool hasNext() const { return c->constEnd() != i; } + inline const T &next() { n = i++; return *n; } + inline const T &peekNext() const { return *i; } + inline bool hasPrevious() const { return c->constBegin() != i; } + inline const T &previous() { n = --i; return *n; } + inline const T &peekPrevious() const { iterator p = i; return *--p; } + inline void remove() + { if (c->constEnd() != n) { i = c->erase(n); n = c->end(); } } + inline const T &value() const { ((!(item_exists())) ? qt_assert("item_exists()","/usr/include/qt4/QtCore/qset.h",354) : qt_noop()); return *n; } + inline bool findNext(const T &t) + { while (c->constEnd() != (n = i)) if (*i++ == t) return true; return false; } + inline bool findPrevious(const T &t) + { while (c->constBegin() != i) if (*(n = --i) == t) return true; + n = c->end(); return false; } +}; +typedef QtValidLicenseForCoreModule QtCoreModule; +struct QContiguousCacheData +{ + QBasicAtomicInt ref; + int alloc; + int count; + int start; + int offset; + uint sharable : 1; + uint reserved : 31; + static QContiguousCacheData *allocate(int size, int alignment); + static void free(QContiguousCacheData *data); +}; +template +struct QContiguousCacheTypedData: private QContiguousCacheData +{ + T array[1]; + static inline void free(QContiguousCacheTypedData *data) { QContiguousCacheData::free(data); } +}; +template +class QContiguousCache { + typedef QContiguousCacheTypedData Data; + union { QContiguousCacheData *d; QContiguousCacheTypedData *p; }; +public: + typedef T value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef ptrdiff_t difference_type; + typedef int size_type; + explicit QContiguousCache(int capacity = 0); + QContiguousCache(const QContiguousCache &v) : d(v.d) { d->ref.ref(); if (!d->sharable) detach_helper(); } + inline ~QContiguousCache() { if (!d) return; if (!d->ref.deref()) free(p); } + inline void detach() { if (d->ref != 1) detach_helper(); } + inline bool isDetached() const { return d->ref == 1; } + inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; } + QContiguousCache &operator=(const QContiguousCache &other); + bool operator==(const QContiguousCache &other) const; + inline bool operator!=(const QContiguousCache &other) const { return !(*this == other); } + inline int capacity() const {return d->alloc; } + inline int count() const { return d->count; } + inline int size() const { return d->count; } + inline bool isEmpty() const { return d->count == 0; } + inline bool isFull() const { return d->count == d->alloc; } + inline int available() const { return d->alloc - d->count; } + void clear(); + void setCapacity(int size); + const T &at(int pos) const; + T &operator[](int i); + const T &operator[](int i) const; + void append(const T &value); + void prepend(const T &value); + void insert(int pos, const T &value); + inline bool containsIndex(int pos) const { return pos >= d->offset && pos - d->offset < d->count; } + inline int firstIndex() const { return d->offset; } + inline int lastIndex() const { return d->offset + d->count - 1; } + inline const T &first() const { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qcontiguouscache.h",139) : qt_noop()); return p->array[d->start]; } + inline const T &last() const { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qcontiguouscache.h",140) : qt_noop()); return p->array[(d->start + d->count -1) % d->alloc]; } + inline T &first() { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qcontiguouscache.h",141) : qt_noop()); detach(); return p->array[d->start]; } + inline T &last() { ((!(!isEmpty())) ? qt_assert("!isEmpty()","/usr/include/qt4/QtCore/qcontiguouscache.h",142) : qt_noop()); detach(); return p->array[(d->start + d->count -1) % d->alloc]; } + void removeFirst(); + T takeFirst(); + void removeLast(); + T takeLast(); + inline bool areIndexesValid() const + { return d->offset >= 0 && d->offset < 2147483647 - d->count && (d->offset % d->alloc) == d->start; } + inline void normalizeIndexes() { d->offset = d->start; } +private: + void detach_helper(); + QContiguousCacheData *malloc(int aalloc); + void free(Data *x); + int sizeOfTypedData() { + return reinterpret_cast(&(reinterpret_cast(this))->array[1]) - reinterpret_cast(this); + } + int alignOfTypedData() const + { + return qMax(sizeof(void*), __alignof__(Data)); + } +}; +template +void QContiguousCache::detach_helper() +{ + union { QContiguousCacheData *d; QContiguousCacheTypedData *p; } x; + x.d = malloc(d->alloc); + x.d->ref = 1; + x.d->count = d->count; + x.d->start = d->start; + x.d->offset = d->offset; + x.d->alloc = d->alloc; + x.d->sharable = true; + x.d->reserved = 0; + T *dest = x.p->array + x.d->start; + T *src = p->array + d->start; + int oldcount = x.d->count; + while (oldcount--) { + if (QTypeInfo::isComplex) { + new (dest) T(*src); + } else { + *dest = *src; + } + dest++; + if (dest == x.p->array + x.d->alloc) + dest = x.p->array; + src++; + if (src == p->array + d->alloc) + src = p->array; + } + if (!d->ref.deref()) + free(p); + d = x.d; +} +template +void QContiguousCache::setCapacity(int asize) +{ + if (asize == d->alloc) + return; + detach(); + union { QContiguousCacheData *d; QContiguousCacheTypedData *p; } x; + x.d = malloc(asize); + x.d->alloc = asize; + x.d->count = qMin(d->count, asize); + x.d->offset = d->offset + d->count - x.d->count; + x.d->start = x.d->offset % x.d->alloc; + T *dest = x.p->array + (x.d->start + x.d->count-1) % x.d->alloc; + T *src = p->array + (d->start + d->count-1) % d->alloc; + int oldcount = x.d->count; + while (oldcount--) { + if (QTypeInfo::isComplex) { + new (dest) T(*src); + } else { + *dest = *src; + } + if (dest == x.p->array) + dest = x.p->array + x.d->alloc; + dest--; + if (src == p->array) + src = p->array + d->alloc; + src--; + } + free(p); + d = x.d; +} +template +void QContiguousCache::clear() +{ + if (d->ref == 1) { + if (QTypeInfo::isComplex) { + int oldcount = d->count; + T * i = p->array + d->start; + T * e = p->array + d->alloc; + while (oldcount--) { + i->~T(); + i++; + if (i == e) + i = p->array; + } + } + d->count = d->start = d->offset = 0; + } else { + union { QContiguousCacheData *d; QContiguousCacheTypedData *p; } x; + x.d = malloc(d->alloc); + x.d->ref = 1; + x.d->alloc = d->alloc; + x.d->count = x.d->start = x.d->offset = 0; + x.d->sharable = true; + if (!d->ref.deref()) free(p); + d = x.d; + } +} +template +inline QContiguousCacheData *QContiguousCache::malloc(int aalloc) +{ + return QContiguousCacheData::allocate(sizeOfTypedData() + (aalloc - 1) * sizeof(T), alignOfTypedData()); +} +template +QContiguousCache::QContiguousCache(int cap) +{ + d = malloc(cap); + d->ref = 1; + d->alloc = cap; + d->count = d->start = d->offset = 0; + d->sharable = true; +} +template +QContiguousCache &QContiguousCache::operator=(const QContiguousCache &other) +{ + other.d->ref.ref(); + if (!d->ref.deref()) + free(d); + d = other.d; + if (!d->sharable) + detach_helper(); + return *this; +} +template +bool QContiguousCache::operator==(const QContiguousCache &other) const +{ + if (other.d == d) + return true; + if (other.d->start != d->start + || other.d->count != d->count + || other.d->offset != d->offset + || other.d->alloc != d->alloc) + return false; + for (int i = firstIndex(); i <= lastIndex(); ++i) + if (!(at(i) == other.at(i))) + return false; + return true; +} +template +void QContiguousCache::free(Data *x) +{ + if (QTypeInfo::isComplex) { + int oldcount = d->count; + T * i = p->array + d->start; + T * e = p->array + d->alloc; + while (oldcount--) { + i->~T(); + i++; + if (i == e) + i = p->array; + } + } + x->free(x); +} +template +void QContiguousCache::append(const T &value) +{ + detach(); + if (QTypeInfo::isComplex) { + if (d->count == d->alloc) + (p->array + (d->start+d->count) % d->alloc)->~T(); + new (p->array + (d->start+d->count) % d->alloc) T(value); + } else { + p->array[(d->start+d->count) % d->alloc] = value; + } + if (d->count == d->alloc) { + d->start++; + d->start %= d->alloc; + d->offset++; + } else { + d->count++; + } +} +template +void QContiguousCache::prepend(const T &value) +{ + detach(); + if (d->start) + d->start--; + else + d->start = d->alloc-1; + d->offset--; + if (d->count != d->alloc) + d->count++; + else + if (d->count == d->alloc) + (p->array + d->start)->~T(); + if (QTypeInfo::isComplex) + new (p->array + d->start) T(value); + else + p->array[d->start] = value; +} +template +void QContiguousCache::insert(int pos, const T &value) +{ + ((!(pos >= 0 && pos < 2147483647)) ? qt_assert_x("QContiguousCache::insert", "index out of range","/usr/include/qt4/QtCore/qcontiguouscache.h",380) : qt_noop()); + detach(); + if (containsIndex(pos)) { + if(QTypeInfo::isComplex) + new (p->array + pos % d->alloc) T(value); + else + p->array[pos % d->alloc] = value; + } else if (pos == d->offset-1) + prepend(value); + else if (pos == d->offset+d->count) + append(value); + else { + clear(); + d->offset = pos; + d->start = pos % d->alloc; + d->count = 1; + if (QTypeInfo::isComplex) + new (p->array + d->start) T(value); + else + p->array[d->start] = value; + } +} +template +inline const T &QContiguousCache::at(int pos) const +{ ((!(pos >= d->offset && pos - d->offset < d->count)) ? qt_assert_x("QContiguousCache::at", "index out of range","/usr/include/qt4/QtCore/qcontiguouscache.h",406) : qt_noop()); return p->array[pos % d->alloc]; } +template +inline const T &QContiguousCache::operator[](int pos) const +{ ((!(pos >= d->offset && pos - d->offset < d->count)) ? qt_assert_x("QContiguousCache::at", "index out of range","/usr/include/qt4/QtCore/qcontiguouscache.h",409) : qt_noop()); return p->array[pos % d->alloc]; } +template +inline T &QContiguousCache::operator[](int pos) +{ + detach(); + if (!containsIndex(pos)) + insert(pos, T()); + return p->array[pos % d->alloc]; +} +template +inline void QContiguousCache::removeFirst() +{ + ((!(d->count > 0)) ? qt_assert("d->count > 0","/usr/include/qt4/QtCore/qcontiguouscache.h",423) : qt_noop()); + detach(); + d->count--; + if (QTypeInfo::isComplex) + (p->array + d->start)->~T(); + d->start = (d->start + 1) % d->alloc; + d->offset++; +} +template +inline void QContiguousCache::removeLast() +{ + ((!(d->count > 0)) ? qt_assert("d->count > 0","/usr/include/qt4/QtCore/qcontiguouscache.h",435) : qt_noop()); + detach(); + d->count--; + if (QTypeInfo::isComplex) + (p->array + (d->start + d->count) % d->alloc)->~T(); +} +template +inline T QContiguousCache::takeFirst() +{ T t = first(); removeFirst(); return t; } +template +inline T QContiguousCache::takeLast() +{ T t = last(); removeLast(); return t; } +typedef QtValidLicenseForCoreModule QtCoreModule; +class QDebug +{ + struct Stream { + Stream(QIODevice *device) : ts(device), ref(1), type(QtDebugMsg), space(true), message_output(false) {} + Stream(QString *string) : ts(string, QIODevice::WriteOnly), ref(1), type(QtDebugMsg), space(true), message_output(false) {} + Stream(QtMsgType t) : ts(&buffer, QIODevice::WriteOnly), ref(1), type(t), space(true), message_output(true) {} + QTextStream ts; + QString buffer; + int ref; + QtMsgType type; + bool space; + bool message_output; + } *stream; +public: + inline QDebug(QIODevice *device) : stream(new Stream(device)) {} + inline QDebug(QString *string) : stream(new Stream(string)) {} + inline QDebug(QtMsgType t) : stream(new Stream(t)) {} + inline QDebug(const QDebug &o):stream(o.stream) { ++stream->ref; } + inline QDebug &operator=(const QDebug &other); + inline ~QDebug() { + if (!--stream->ref) { + if(stream->message_output) { + try { + qt_message_output(stream->type, stream->buffer.toLocal8Bit().data()); + } catch (std::bad_alloc&) { } + } + delete stream; + } + } + inline QDebug &space() { stream->space = true; stream->ts << ' '; return *this; } + inline QDebug &nospace() { stream->space = false; return *this; } + inline QDebug &maybeSpace() { if (stream->space) stream->ts << ' '; return *this; } + inline QDebug &operator<<(QChar t) { stream->ts << '\'' << t << '\''; return maybeSpace(); } + inline QDebug &operator<<(QBool t) { stream->ts << (bool(t != 0) ? "true" : "false"); return maybeSpace(); } + inline QDebug &operator<<(bool t) { stream->ts << (t ? "true" : "false"); return maybeSpace(); } + inline QDebug &operator<<(char t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(signed short t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(unsigned short t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(signed int t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(unsigned int t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(signed long t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(unsigned long t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(qint64 t) + { stream->ts << QString::number(t); return maybeSpace(); } + inline QDebug &operator<<(quint64 t) + { stream->ts << QString::number(t); return maybeSpace(); } + inline QDebug &operator<<(float t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(double t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(const char* t) { stream->ts << QString::fromAscii(t); return maybeSpace(); } + inline QDebug &operator<<(const QString & t) { stream->ts << '\"' << t << '\"'; return maybeSpace(); } + inline QDebug &operator<<(const QStringRef & t) { return operator<<(t.toString()); } + inline QDebug &operator<<(const QLatin1String &t) { stream->ts << '\"' << t.latin1() << '\"'; return maybeSpace(); } + inline QDebug &operator<<(const QByteArray & t) { stream->ts << '\"' << t << '\"'; return maybeSpace(); } + inline QDebug &operator<<(const void * t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(QTextStreamFunction f) { + stream->ts << f; + return *this; + } + inline QDebug &operator<<(QTextStreamManipulator m) + { stream->ts << m; return *this; } +}; +class QNoDebug +{ +public: + inline QNoDebug(){} + inline QNoDebug(const QDebug &){} + inline ~QNoDebug(){} + inline QNoDebug &operator<<(QTextStreamFunction) { return *this; } + inline QNoDebug &operator<<(QTextStreamManipulator) { return *this; } + inline QNoDebug &space() { return *this; } + inline QNoDebug &nospace() { return *this; } + inline QNoDebug &maybeSpace() { return *this; } + template + inline QNoDebug &operator<<(const T &) { return *this; } +}; + inline QDebug qCritical() { return QDebug(QtCriticalMsg); } +inline QDebug &QDebug::operator=(const QDebug &other) +{ + if (this != &other) { + QDebug copy(other); + qSwap(stream, copy.stream); + } + return *this; +} +template +inline QDebug operator<<(QDebug debug, const QList &list) +{ + debug.nospace() << '('; + for (typename QList::size_type i = 0; i < list.count(); ++i) { + if (i) + debug << ", "; + debug << list.at(i); + } + debug << ')'; + return debug.space(); +} +template +inline QDebug operator<<(QDebug debug, const QVector &vec) +{ + debug.nospace() << "QVector"; + return operator<<(debug, vec.toList()); +} +template +inline QDebug operator<<(QDebug debug, const QMap &map) +{ + debug.nospace() << "QMap("; + for (typename QMap::const_iterator it = map.constBegin(); + it != map.constEnd(); ++it) { + debug << '(' << it.key() << ", " << it.value() << ')'; + } + debug << ')'; + return debug.space(); +} +template +inline QDebug operator<<(QDebug debug, const QHash &hash) +{ + debug.nospace() << "QHash("; + for (typename QHash::const_iterator it = hash.constBegin(); + it != hash.constEnd(); ++it) + debug << '(' << it.key() << ", " << it.value() << ')'; + debug << ')'; + return debug.space(); +} +template +inline QDebug operator<<(QDebug debug, const QPair &pair) +{ + debug.nospace() << "QPair(" << pair.first << ',' << pair.second << ')'; + return debug.space(); +} +template +inline QDebug operator<<(QDebug debug, const QSet &set) +{ + debug.nospace() << "QSet"; + return operator<<(debug, set.toList()); +} +template +inline QDebug operator<<(QDebug debug, const QContiguousCache &cache) +{ + debug.nospace() << "QContiguousCache("; + for (int i = cache.firstIndex(); i <= cache.lastIndex(); ++i) { + debug << cache[i]; + if (i != cache.lastIndex()) + debug << ", "; + } + debug << ')'; + return debug.space(); +} + inline QDebug qDebug() { return QDebug(QtDebugMsg); } + inline QDebug qWarning() { return QDebug(QtWarningMsg); } +namespace PySide +{ +class __attribute__ ((visibility("default"))) qptr_base +{ +public: + enum construction_mode { + none = 0x00000000, + check_cache = 0x00000001, + no_check_cache = 0x00000002, + wrapper_pointer = 0x00000004, + no_wrapper_pointer = 0x00000008 + }; + qptr_base(void* cpp_obj, PyObject *py_obj, void (*deleter)(void*), int mode); + qptr_base(const qptr_base& other); + qptr_base() : m_data(0) {} + virtual ~qptr_base(); + static void invalidate(void *cpp_obj, bool cleanup = false); + static bool exists(void *cpp_obj); + bool is_null() const; + qptr_base& operator=(const qptr_base& other); + bool + operator==(const qptr_base& other) + { + return m_data == other.m_data; + } + void acquire_ownership(); + void release_ownership(); + bool has_ownership(); + bool is_wrapper() const; + void add_cpp_ref(); + void remove_cpp_ref(); + bool has_cpp_ref(); + void add_child(qptr_base &child); + void remove_child(qptr_base &child); + void remove_parent(); + PyObject* get_pyobject(); + void set_pyobject(PyObject *py_obj); + void release(); + bool has_parent(); + int children_count(); + int refcount(); + static inline int list_size() { return m_cpp_to_qptrs.size(); } + void* raw_ptr() const; +protected: + bool ptr_assert() const; + void destroy(); + void invalidate(); + void invalidate(bool invalidate_ptr); + class qptr_base_private; + mutable qptr_base_private* m_data; + static QHash m_cpp_to_qptrs; + explicit qptr_base(qptr_base::qptr_base_private* data); + qptr_base_private* create_copy() const; +}; +template +inline __attribute__ ((visibility("internal"))) +void delete_pointer(T *p) +{ + delete p; +} +template +inline __attribute__ ((visibility("internal"))) +void delete_pointer_helper(void* p) +{ + T *ptr = reinterpret_cast(p); + delete_pointer(ptr); +} +template +class __attribute__ ((visibility("internal"))) qptr : public qptr_base +{ +public: + typedef T element_type; + typedef T value_type; + typedef T * pointer; +public: + qptr(T* ptr, int mode = c_mode) + : qptr_base(get_void_pointer(ptr), + (mode & wrapper_pointer ? extract_pyobject(ptr, boost::is_polymorphic()) : 0 ), + &delete_pointer_helper, mode) + { + } + template + qptr(const qptr& ptr) : qptr_base(ptr) + { + } + qptr(T* ptr, PyObject* py_obj) + : qptr_base(get_void_pointer(ptr), py_obj, &delete_pointer_helper, no_check_cache | no_wrapper_pointer) + { + } + qptr(PyObject* py_obj) + : qptr_base(get_void_pointer(boost::python::extract(py_obj)), py_obj, + &delete_pointer_helper, c_mode) + { + } + template + qptr& + operator=(const qptr& ptr) + { + if ( m_data != ptr.m_data ) { + release(); + m_data = ptr.create_copy(); + } + return *this; + } + inline T& + operator*() const + { + return *get(); + } + inline T* + operator->() const + { + return get(); + } + inline T* + get() const + { + ptr_assert(); + return reinterpret_cast(raw_ptr()); + } + ~qptr() + { + if (!is_null() && refcount() == 1 && has_cpp_ref()) { + notify_ptr_del(reinterpret_cast(raw_ptr()), boost::is_polymorphic()); + } + } + static inline void* get_void_pointer(T* pointer) + { + return get_void_pointer(pointer, boost::is_polymorphic()); + } +private: + static inline PyObject* + extract_pyobject(T* ptr, boost::mpl::false_) + { + return 0; + } + static inline PyObject* + extract_pyobject(T* ptr, boost::mpl::true_) + { + PySide::wrapper *w = dynamic_cast(ptr); + if (w) + return w->py_object(); + else + return 0; + } + static inline void + notify_ptr_del(T* ptr, boost::mpl::false_) + { + } + static inline void + notify_ptr_del(T* ptr, boost::mpl::true_) + { + PySide::wrapper *w = dynamic_cast(ptr); + if (w) + w->keep_cpp_ref(); + } + static inline void* + get_void_pointer(T* ptr, boost::mpl::false_) + { + return static_cast(ptr); + } + static inline void* + get_void_pointer(T* ptr, boost::mpl::true_) + { + boost::python::objects::dynamic_id_t base_id = + boost::python::objects::polymorphic_id_generator::execute(ptr); + return base_id.first; + } +}; +template +inline __attribute__ ((visibility("internal"))) T* +get_pointer(qptr const& p){ + return p.get(); +} +} +namespace PySide +{ +template < + class T + , class BasePolicy_ = boost::python::default_call_policies> +struct __attribute__ ((visibility("internal"))) register_wrapper_object : BasePolicy_ +{ + template + static PyObject* + postcall(ArgumentPackage const& args_, PyObject* result) + { + result = BasePolicy_::postcall(args_, result); + if (result) { + PyObject* py_self = + boost::python::detail::get_prev<1>::execute(args_, result); + qptr ptr_parent(py_self); + } + return result; + } +}; +template < + std::size_t parent + , std::size_t child + , class T_PARENT + , class T_CHILD + , class BasePolicy_ = boost::python::default_call_policies + , class T = void> +struct __attribute__ ((visibility("internal"))) parent_policy_add : BasePolicy_ +{ + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((parent != child) == 0 ? false : true) >)> boost_static_assert_typedef_81; + template + static PyObject* + postcall(ArgumentPackage const& args_, PyObject* result) + { + unsigned arity_ = boost::python::detail::arity(args_); + if ((std::max)(parent, child) > arity_) { + return BasePolicy_::postcall(args_, result); + } + result = BasePolicy_::postcall(args_, result); + if (result) { + PyObject* py_parent = (&_Py_NoneStruct); + if (parent <= arity_) + py_parent = boost::python::detail::get_prev::execute(args_, result); + PyObject* py_child = boost::python::detail::get_prev::execute(args_, result); + if (py_child == (&_Py_NoneStruct)) { + return result; + } else if (py_parent == (&_Py_NoneStruct)) { + qptr ptr_child(py_child); + ptr_child.remove_parent(); + } else { + qptr ptr_parent(py_parent); + qptr ptr_child(py_child); + if (ptr_parent.is_wrapper()) { + ptr_parent.add_child(ptr_child); + } else { + ptr_child.add_cpp_ref(); + } + } + } + return result; + } +}; +template < std::size_t parent + , std::size_t child + , class T_PARENT + , class BasePolicy_ + , class T> +struct __attribute__ ((visibility("internal"))) parent_policy_add, BasePolicy_ > : BasePolicy_ +{ + template + static PyObject* + postcall(ArgumentPackage const& args_, PyObject* result) + { + unsigned arity_ = boost::python::detail::arity(args_); + if ((std::max)(parent, child) > arity_) { + return BasePolicy_::postcall(args_, result); + } + result = BasePolicy_::postcall(args_, result); + if (result) { + PyObject* py_parent = (&_Py_NoneStruct); + if (parent <= arity_) + py_parent = boost::python::detail::get_prev::execute(args_, result); + PyObject* py_child = boost::python::detail::get_prev::execute(args_, result); + if (py_child == (&_Py_NoneStruct) || !((((((PyObject*)(py_child))->ob_type))->tp_flags & ((1L<<25))) != 0)) { + return result; + } else if (py_parent == (&_Py_NoneStruct)) { + Py_ssize_t max = PyList_Size(py_child); + for (Py_ssize_t i = 0; i < max; ++i) { + qptr ptr_child(PyList_GetItem(py_child, i)); + ptr_child.remove_parent(); + } + } else { + Py_ssize_t max = PyList_Size(py_child); + qptr ptr_parent(py_parent); + for (Py_ssize_t i = 0; i < max; ++i) { + qptr ptr_child(PyList_GetItem(py_child, i)); + if (ptr_parent.is_wrapper()) { + ptr_parent.add_child(ptr_child); + } else { + ptr_child.add_cpp_ref(); + } + } + } + } + return result; + } +}; +template < + std::size_t arg_index + , bool release_ownership + , class T + , class BasePolicy_ = boost::python::default_call_policies> +struct __attribute__ ((visibility("internal"))) transfer_ownership : BasePolicy_ +{ + template + static PyObject* + postcall(ArgumentPackage const& args_, PyObject* result) + { + unsigned arity_ = boost::python::detail::arity(args_); + if (arg_index > arity_) { + PyErr_SetString(PyExc_IndexError, + "PySide::transfer_ownership: argument index out of range"); + return 0; + } + result = BasePolicy_::postcall(args_, result); + if (result) { + PyObject* py_arg = boost::python::detail::get_prev::execute(args_, result); + qptr ptr_child(py_arg); + if (release_ownership) + ptr_child.release_ownership(); + else + ptr_child.acquire_ownership(); + } + return result; + } +}; +template < + std::size_t parent + , std::size_t child + , class T_PARENT + , class T_CHILD + , class BasePolicy_ = boost::python::default_call_policies + , class T = void> +struct __attribute__ ((visibility("internal"))) parent_policy_remove : BasePolicy_ +{ + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((parent != child) == 0 ? false : true) >)> boost_static_assert_typedef_232; + template + static PyObject* + postcall(ArgumentPackage const& args_, PyObject* result) + { + unsigned arity_ = boost::python::detail::arity(args_); + if ((std::max)(parent, child) > arity_) { + PyErr_SetString(PyExc_IndexError, + "PyQt::parent_policy_remove: argument index out of range"); + return 0; + } + result = BasePolicy_::postcall(args_, result); + if (result) { + PyObject* py_parent = 0; + if (parent <= arity_) + py_parent = boost::python::detail::get_prev::execute(args_, result); + PyObject* py_child = boost::python::detail::get_prev::execute(args_, result); + qptr ptr_parent(py_parent); + qptr ptr_child(py_child); + if (ptr_parent.is_wrapper()) { + ptr_child.remove_parent(); + } else { + ptr_child.remove_cpp_ref(); + } + } + return result; + } +}; +template < std::size_t parent + , std::size_t child + , class T_PARENT + , class BasePolicy_ + , class T> +struct __attribute__ ((visibility("internal"))) parent_policy_remove, BasePolicy_> : BasePolicy_ +{ + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((parent != child) == 0 ? false : true) >)> boost_static_assert_typedef_274; + template + static PyObject* + postcall(ArgumentPackage const& args_, PyObject* result) + { + unsigned arity_ = boost::python::detail::arity(args_); + if ((std::max)(parent, child) > arity_) { + PyErr_SetString(PyExc_IndexError, + "PyQt::parent_policy_remove: argument index out of range"); + return 0; + } + result = BasePolicy_::postcall(args_, result); + if (result) { + PyObject* py_parent = 0; + if (parent <= arity_) + py_parent = boost::python::detail::get_prev::execute(args_, result); + PyObject* py_child = boost::python::detail::get_prev::execute(args_, result); + if (((((((PyObject*)(py_child))->ob_type))->tp_flags & ((1L<<25))) != 0)) { + qptr ptr_parent(py_parent); + uint max = PyList_Size(py_child); + for (Py_ssize_t i = 0; i < max; ++i) { + qptr ptr_child(PyList_GetItem(py_child, i)); + if (ptr_parent.is_wrapper()) { + ptr_child.remove_parent(); + } else { + ptr_child.remove_cpp_ref(); + } + } + } + } + return result; + } +}; +template +struct __attribute__ ((visibility("internal"))) make_ptr_reference_holder +{ + template + static PyObject* + execute(T* p) + { + if(p == 0) + { + return boost::python::incref((&_Py_NoneStruct)); + } + qptr ptr(const_cast(p)); + PyObject *ret = ptr.get_pyobject(); + if (ret) + return boost::python::incref(ret); + ptr.set_pyobject(execute_impl(p)); + if (cpp_ownership) { + ptr.release_ownership(); + } + return ptr.get_pyobject(); + } + template + static PyObject* + execute_impl(T* p) + { + typedef qptr smart_pointer; + typedef boost::python::objects::pointer_holder holder_t; + smart_pointer ptr(const_cast(p)); + PyObject *ret = boost::python::objects::make_ptr_instance::execute(ptr); + ptr.set_pyobject(ret); + return ret; + } +}; +template +struct __attribute__ ((visibility("internal"))) return_ptr_object +{ + template + struct apply + { + typedef typename boost::mpl::if_c< + boost::is_pointer::value + , boost::python::to_python_indirect > + , boost::python::detail::reference_existing_object_requires_a_pointer_or_reference_return_type + >::type type; + }; +}; +struct __attribute__ ((visibility("internal"))) reference_ptr_object +{ + template + struct apply + { + static const bool ok = boost::is_pointer::value || boost::is_reference::value + ; + typedef typename boost::mpl::if_c< + ok + , boost::python::to_python_indirect > + , boost::python::detail::reference_existing_object_requires_a_pointer_or_reference_return_type + >::type type; + }; +}; +template < std::size_t parent_arg + , std::size_t child_arg + , class T_PARENT + , class T_CHILD + , class BasePolicy_ = boost::python::default_call_policies + , class T = void > +struct __attribute__ ((visibility("internal"))) return_object + : parent_policy_add +{ + private: + static const bool legal = parent_arg > 0; + public: + typedef typename boost::mpl::if_c< + legal + , reference_ptr_object + , boost::python::detail::return_internal_reference_owner_arg_must_be_greater_than_zero + >::type result_converter; +}; +template < std::size_t parent_arg + , std::size_t child_arg + , class T_PARENT + , class BasePolicy_ + , class T > +struct __attribute__ ((visibility("internal"))) return_object, BasePolicy_> +: parent_policy_add, BasePolicy_, T> +{ +}; +template +inline boost::python::handle<> +ptr(T* data, bool take_ownership = false) +{ + if (data == 0) + return boost::python::handle<>(boost::python::incref((&_Py_NoneStruct))); + PyObject *ret; + if (take_ownership) { + boost::python::to_python_indirect > + convert; + ret = convert(data); + } else { + boost::python::to_python_indirect > + convert; + ret = convert(data); + } + return boost::python::handle<>(ret); +} +} +namespace PySide +{ +template +class __attribute__ ((visibility("internal"))) qcontainer_indexing_suite; +template +class __attribute__ ((visibility("internal"))) final_qcontainer_derived_policies + : public qcontainer_indexing_suite > +{}; +template > +class __attribute__ ((visibility("internal"))) qcontainer_indexing_suite + : public boost::python::indexing_suite +{ +public: + typedef typename Container::value_type data_type; + typedef typename Container::value_type key_type; + typedef typename Container::size_type index_type; + typedef typename Container::size_type size_type; + typedef typename Container::difference_type difference_type; + static typename boost::mpl::if_, + data_type&, + data_type>::type + get_item(Container& container, index_type i) + { + return container[i]; + } + static boost::python::object + get_slice(Container& container, index_type from, index_type to) + { + if (from > to) + return boost::python::object(Container()); + return boost::python::object(container.mid(from, to-from)); + } + static void + set_item(Container& container, index_type i, data_type const& v) + { + container[i] = v; + } + static void + set_slice(Container& container, index_type from, + index_type to, data_type const& v) + { + if (from > to) + return; + container.erase(container.begin()+from, container.end()+to); + container.insert(container.begin()+from, v); + } + template + static void + set_slice(Container& container, index_type from, + index_type to, Iter first, Iter last) + { + if (from > to) { + std::copy(first, last, container.begin()+from); + } else { + container.erase(container.begin()+from, container.end()+to); + std::copy(first, last, container.begin()+from); + } + } + static void + delete_item(Container& container, index_type i) + { + container.erase(container.begin()+i); + } + static void + delete_slice(Container& container, index_type from, index_type to) + { + if (from > to) + return; + container.erase(container.begin()+from, container.begin()+to); + } + static size_t + size(Container& container) + { + return container.size(); + } + static bool + contains(Container& container, key_type const& key) + { + return std::find(container.begin(), container.end(), key) + != container.end(); + } + static index_type + convert_index(Container& container, PyObject* i_) + { + boost::python::extract i(i_); + if (i.check()) { + long index = i(); + if (index < 0) + index += DerivedPolicies::size(container); + if (index >= long(container.size()) || index < 0) { + PyErr_SetString(PyExc_IndexError, "Index out of range"); + boost::python::throw_error_already_set(); + } + return index; + } + PyErr_SetString(PyExc_TypeError, "Invalid index type"); + boost::python::throw_error_already_set(); + return index_type(); + } + static index_type + get_min_index(Container& ) + { + return 0; + } + static index_type + get_max_index(Container& container) + { + return container.size(); + } + static bool + compare_index(Container& , index_type a, index_type b) + { + return a < b; + } + static void + append(Container& container, data_type const& v) + { + container.push_back(v); + } +}; +} +namespace PySide +{ +class __attribute__ ((visibility("default"))) thread_support +{ +private: + static bool m_enabled; + thread_support() {} +public: + static void init(); + static void shutdown(); + static inline bool enabled(); +}; +class __attribute__ ((visibility("default"))) thread_locker +{ +private: + PyThreadState *m_thread_state; + PyGILState_STATE m_gstate; +public: + thread_locker(); + ~thread_locker(); +}; +class __attribute__ ((visibility("default"))) py_allow_threads +{ +private: + PyThreadState *_save; +public: + py_allow_threads(); + ~py_allow_threads(); +}; +} +namespace PySide +{ +class __attribute__ ((visibility("internal"))) type_details +{ + typedef boost::python::object(*func_cpp_to_python_type)(void*); + typedef QGenericArgument(*func_python_to_cpp_type)(const boost::python::object&, const char*); + typedef void(*func_delete_type)(void*); + type_details() {} + type_details(const type_details&); + type_details& operator=(const type_details&); +public: + template + static type_details* + create_object_type_details(const char* type_name) { + type_details* self = new type_details(); + self->m_type_name = type_name; + self->m_type_object = boost::python::converter::registry::query(boost::python::type_id())->get_class_object(); + self->m_func_cpp_to_python = &objecttype_to_python; + self->m_func_python_to_cpp = &python_to_objecttype; + self->m_func_delete = 0; + return self; + } + template + static type_details* + create_value_type_details(const char* type_name) { + type_details* self = new type_details(); + self->m_type_name = type_name; + self->m_type_object = boost::python::converter::registry::query(boost::python::type_id())->get_class_object(); + self->m_func_cpp_to_python = &valuetype_to_python; + self->m_func_python_to_cpp = &python_to_value_type; + self->m_func_delete = &func_delete_data; + return self; + } + template + static type_details* + create_native_type_details(const char* type_name) { + type_details* self = new type_details(); + self->m_type_name = type_name; + self->m_type_object = 0; + self->m_func_cpp_to_python = &native_to_python; + self->m_func_python_to_cpp = &python_to_value_type; + self->m_func_delete = &func_delete_data; + return self; + } + template + static type_details* + create_container_type_details(const char* type_name) { + type_details* self = new type_details(); + self->m_type_name = type_name; + self->m_type_object = 0; + self->m_func_cpp_to_python = &container_to_python; + self->m_func_python_to_cpp = &python_to_container; + self->m_func_delete = &func_delete_data; + return self; + } + boost::python::object + to_python(void *data) const + { + return m_func_cpp_to_python(data); + } + QGenericArgument + to_cpp(const boost::python::object &obj) const + { + return m_func_python_to_cpp(obj, m_type_name); + } + const PyTypeObject* + get_python_type_object() const + { + return m_type_object; + } + void + delete_data(QGenericArgument &arg) const + { + if (m_func_delete) + m_func_delete(arg.data()); + } +private: + const char* m_type_name; + const PyTypeObject *m_type_object; + func_cpp_to_python_type m_func_cpp_to_python; + func_python_to_cpp_type m_func_python_to_cpp; + func_delete_type m_func_delete; + template + static boost::python::object + objecttype_to_python(void* p) + { + T* obj = *(reinterpret_cast< T*(*)>(p)); + boost::python::object py_obj(PySide::ptr(obj)); + if (!py_obj.ptr()) + { + fprintf(stderr, "Fail to create python object from object in adress: %p\n", obj); + py_obj = boost::python::object(); + } + else + { + boost::python::incref(py_obj.ptr()); + } + return py_obj; + } + template + static QGenericArgument + python_to_objecttype(const boost::python::object &obj, const char *type_name) + { + T val = boost::python::extract(obj); + return QGenericArgument(type_name, val); + } + template + static boost::python::object + valuetype_to_python(void* p) + { + T* val = reinterpret_cast(p); + return boost::python::object(val); + } + template + static QGenericArgument + python_to_value_type(const boost::python::object& obj, const char *type_name) + { + T* val = new T(boost::python::extract(obj)); + return QGenericArgument(type_name, static_cast(val)); + } + template + static QGenericArgument + python_to_container(const boost::python::object& obj, const char* type_name) + { + T* val = new T(boost::python::extract(obj)); + return QGenericArgument(type_name, static_cast(val)); + } + template + static boost::python::object + container_to_python(void* p) + { + return boost::python::object(reinterpret_cast(p)); + } + template + static boost::python::object + container_value_to_python(T t) + { + return valuetype_to_python(&t); + } + template + static boost::python::object + container_value_to_python(T* t) + { + return objecttype_to_python(&t); + } + template + static void + func_delete_data(void *data) + { + delete reinterpret_cast(data); + } + template + static boost::python::object + native_to_python(void* p) + { + T* val = new T(*reinterpret_cast(p)); + return boost::python::object(*val); + } +}; +} +namespace PySide +{ +class __attribute__ ((visibility("default"))) type_manager +{ +public: + static type_manager& instance(); + ~type_manager(); + boost::python::object to_python(const QString &name, void *data); + QGenericArgument to_cpp(const QString &name, const boost::python::object &obj); + void delete_data(QGenericArgument &arg); + template + void __attribute__ ((visibility("internal"))) + register_object_type(const char* type_name) + { + m_type_map[type_name] = type_details::create_object_type_details(type_name); + } + template + void __attribute__ ((visibility("internal"))) + register_value_type(const char* type_name) + { + m_type_map[type_name] = type_details::create_value_type_details(type_name); + } + template + void __attribute__ ((visibility("internal"))) + register_native_type(const char* type_name) + { + m_type_map[type_name] = type_details::create_native_type_details(type_name); + } + template + void __attribute__ ((visibility("internal"))) + register_container_type(const char* type_name) + { + m_type_map[type_name] = type_details::create_container_type_details(type_name); + } + bool __attribute__ ((visibility("internal"))) + register_converter(const char* type_name) { + QString key(type_name); + if (m_registered_converters.contains(key)) + return false; + m_registered_converters << key; + return true; + } + const type_details* + get_type_details(const char* type_name) + { + return m_type_map[type_name]; + } +private: + QSet m_registered_converters; + QHash m_type_map; + type_manager(); + type_manager(const type_manager&); +}; +} +class QObject; +namespace PySide +{ +class signal_holder; +class pyqt_signal; +class pyqt_slot; +class trigger; +struct signal_manager_data; +class __attribute__ ((visibility("default"))) signal_manager +{ +public: + static signal_manager& instance(); + bool connect(QObject* src, const pyqt_signal& signal, + boost::python::object& callable, Qt::ConnectionType type = Qt::AutoConnection); + bool connect(QObject* sender, const pyqt_signal& signal, + QObject* receiver, const pyqt_slot& slot, Qt::ConnectionType type = Qt::AutoConnection); + bool disconnect(QObject* src, const pyqt_signal& signal, + boost::python::object& callable); + bool disconnect(QObject* sender, const pyqt_signal& signal, + QObject* receiver, + const pyqt_slot& slot); + int dynamicsignal_receivers(const QObject *sender, + const pyqt_signal &signal, + int offset) const; + QList signals_of(const QObject* obj); + void register_dynamic_signal(QObject *src, const pyqt_signal& signal, + trigger* trigger, int slot_id); + QObject* register_dynamic_signal(QObject *parent, + QObject *sender, + const pyqt_signal& signal, + const pyqt_signal& receiver); + QObject* register_dynamic_slot(QObject *parent, + const boost::python::object &callback, + QString &slot_name); + const QMetaObject* get_dynamic_metaobject(QObject* obj); + void unregister_qobj(QObject* obj); + void emit_(QObject *src, const pyqt_signal& signal, + const boost::python::object& args); + ~signal_manager(); + void register_sender(QObject* sender); + void unregister_sender(); + QObject* sender(); +private: + signal_manager_data *m_data; + trigger* find_trigger(QObject* src); + trigger* get_trigger(const QObject *src) const; + void emit_dynamic_signal(QObject *source, const pyqt_signal& signal, + const boost::python::object& args); + void emit_native_signal(QObject *source, int signal_index, + const pyqt_signal& signal, + const boost::python::object& args); + void parse_objects_to_qarguments(const QStringList &args_type, + const boost::python::object &argv, + QList &q_args); + signal_manager(); + signal_manager(const signal_manager&); + signal_manager& operator=(const signal_manager&); +}; +class __attribute__ ((visibility("internal"))) set_sender +{ + signal_manager& m_sm; +public: + set_sender(QObject* sender) : m_sm(signal_manager::instance()) + { + m_sm.register_sender(sender); + } + ~set_sender() + { + m_sm.unregister_sender(); + } +}; +} +using namespace PySide; +class __attribute__ ((visibility("internal"))) qwebpage_extensionoption_wrapper : public QWebPage::ExtensionOption, public PySide::wrapper +{ +private: + typedef boost::python::class_< QWebPage::ExtensionOption, PySide::qptr < qwebpage_extensionoption_wrapper, qptr_base::no_check_cache | qptr_base::wrapper_pointer> > class_type; +public: + qwebpage_extensionoption_wrapper(PyObject *py_self, const QWebPage::ExtensionOption& self) : QWebPage::ExtensionOption(self), wrapper(py_self) + { + } + qwebpage_extensionoption_wrapper(PyObject *py_self); + ~qwebpage_extensionoption_wrapper(); + static void define_python_class() throw(); +}; +using namespace boost; +using namespace PySide; +qwebpage_extensionoption_wrapper::qwebpage_extensionoption_wrapper(PyObject *py_self) + : QWebPage::ExtensionOption(), wrapper(py_self) +{ +} +qwebpage_extensionoption_wrapper::~qwebpage_extensionoption_wrapper() +{ + PySide::qptr_base::invalidate(PySide::qptr::get_void_pointer(this)); +} +void qwebpage_extensionoption_wrapper::define_python_class() throw() { + class_type python_cls("ExtensionOption", python::init< > ()); + python::scope qwebpage_extensionoption_wrapper_scope(python_cls); + python::implicitly_convertible< PySide::qptr, PySide::qptr >(); + python_cls.def(python::init()); + type_manager::instance().register_value_type("QWebPage::ExtensionOption"); +} diff --git a/321197/pyside.ii.2 b/321197/pyside.ii.2 new file mode 100644 index 0000000..21b604c --- /dev/null +++ b/321197/pyside.ii.2 @@ -0,0 +1,498 @@ + typedef long unsigned int size_t; + namespace std __attribute__ ((__visibility__ ("default"))) { + using ::size_t; + } + class QString { + public: inline QString(); + inline QString(const char *ch) : d(fromAscii_helper(ch)) { + } + private: struct Data { + }; + Data *d; + static Data *fromAscii_helper(const char *str, int size = -1); + }; + class QGenericArgument { + }; + class QObject { + }; + class QWebPage : public QObject { + public: template inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { + } + class ExtensionOption { + }; + }; + extern "C" { + typedef struct _object { + } + PyObject; + typedef struct { + } + PyVarObject; + typedef struct bufferinfo { + } + PyTypeObject; + typedef struct { + } + PyListObject; + } + namespace boost{ + __extension__ typedef long long long_long_type; + } + namespace mpl_ { + namespace aux { + } + } + namespace boost { + namespace mpl { + using namespace mpl_; + } + } + namespace mpl_ { + template< bool C_ > struct bool_; + typedef bool_ false_; + template< bool C_ > struct bool_ { + static const bool value = C_; + }; + template< typename T, T N > struct integral_c { + static const T value = N; + }; + } + namespace boost{ + template struct integral_constant : public mpl::integral_c { + }; + namespace detail { + template struct cv_traits_imp { + typedef T unqualified_type; + }; + } + template< typename T > struct is_reference : ::boost::integral_constant { + }; + template< typename T > struct remove_cv { + typedef typename boost::detail::cv_traits_imp::unqualified_type type; + }; + namespace python { + namespace detail { + typedef char* yes_convertible; + typedef int* no_convertible; + template struct convertible { + }; + } + namespace detail { + template inline Target* upcast(Source* p, yes_convertible, no_convertible, Target*) { + } + } + } + } + extern "C++" { + namespace std { + class type_info { + }; + } + struct __numeric_limits_base { + }; + } + namespace boost { + template< typename T > struct is_integral : ::boost::integral_constant { + }; + template< typename T > struct is_float : ::boost::integral_constant { + }; + namespace type_traits { + template struct ice_or; + template <> struct ice_or { + static const bool value = false; + }; + } + namespace detail { + template< typename T > struct is_arithmetic_impl { + static const bool value = (::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_float::value >::value) ; + }; + } + template< typename T > struct is_arithmetic : ::boost::integral_constant::value> { + }; + namespace type_traits { + template struct is_mem_fun_pointer_impl { + static const bool value = false; + }; + } + template< typename T > struct is_member_function_pointer : ::boost::integral_constant::type>::value> { + }; + template< typename T > struct is_member_pointer : ::boost::integral_constant::value> { + }; + namespace type_traits { + template struct ice_and; + template struct ice_and { + static const bool value = false; + }; + template struct ice_not { + static const bool value = true; + }; + } + namespace detail { + template< typename T > struct is_pointer_helper { + static const bool value = false; + }; + template< typename T > struct is_pointer_impl { + static const bool value = (::boost::type_traits::ice_and< ::boost::detail::is_pointer_helper::type>::value , ::boost::type_traits::ice_not< ::boost::is_member_pointer::value >::value >::value) ; + }; + } + template< typename T > struct is_pointer : ::boost::integral_constant::value> { + }; + template class unwrap_reference { + }; + struct na { + }; + } + namespace boost { + namespace mpl { + template< bool C , typename T1 , typename T2 > struct if_c { + typedef T2 type; + }; + template< typename T1 = na , typename T2 = na , typename T3 = na > struct if_ { + private: typedef if_c< static_cast(T1::value) , T2 , T3 > almost_type_; + public: typedef typename almost_type_::type type; + }; + } + namespace detail { + template struct is_class_impl { + }; + } + namespace detail{ + struct false_result { + }; + } + namespace python { + namespace detail { + template class borrowed { + }; + template struct is_borrowed_ptr { + static const bool value = false; + }; + } + template class handle; + template inline T* incref(T* p) { + } + template struct null_ok; + namespace detail { + template inline T* manage_ptr(detail::borrowed >* p, int) { + } + } + template class handle { + }; + template class is_handle { + public: static const bool value = false; + }; + } + } + namespace mpl_ { + } + namespace boost { + namespace mpl { + template< typename T , typename Base , int at_front = 0 > struct v_item : Base { + }; + } + namespace mpl { + template< typename Dummy = na > struct vector0; + template< typename T0 > struct vector1 : v_item< T0 , vector0< > > { + }; + template< typename T0, typename T1 > struct vector2 : v_item< T1 , vector1 > { + }; + template< typename T0, typename T1, typename T2 > struct vector3 : v_item< T2 , vector2< T0,T1 > > { + }; + template< typename T0, typename T1, typename T2, typename T3 > struct vector4 : v_item< T3 , vector3< T0,T1,T2 > > { + }; + template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector5 : v_item< T4 , vector4< T0,T1,T2,T3 > > { + }; + template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector6 : v_item< T5 , vector5< T0,T1,T2,T3,T4 > > { + }; + template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector7 : v_item< T6 , vector6< T0,T1,T2,T3,T4,T5 > > { + }; + template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector8 : v_item< T7 , vector7< T0,T1,T2,T3,T4,T5,T6 > > { + }; + template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector9 : v_item< T8 , vector8< T0,T1,T2,T3,T4,T5,T6,T7 > > { + }; + } + namespace noncopyable_ { + class noncopyable { + }; + } + typedef noncopyable_::noncopyable noncopyable; + namespace detail { + template class empty_base { + }; + } + template > struct less_than_comparable2 : B { + }; + template > struct equality_comparable2 : B { + }; + template > struct totally_ordered2 : less_than_comparable2 > { + }; + namespace python { + struct instance_holder : private noncopyable { + }; + namespace detail { + template struct is_auto_ptr : mpl::false_ { + }; + } + namespace detail { + template struct copy_ctor_mutates_rhs : is_auto_ptr { + }; + } + } + namespace python { + namespace detail { + template struct pointee_impl { + }; + }; + }; + namespace python { + namespace detail { + } + } + namespace mpl { + namespace aux { + template< long C_ > struct not_impl : bool_ { + }; + } + } + namespace python { + namespace objects { + template struct pointer_holder_back_reference : instance_holder { + pointer_holder_back_reference(Pointer); + private: Pointer m_p; + }; + template inline pointer_holder_back_reference::pointer_holder_back_reference(Pointer p) : m_p(p) { + } + } + } + namespace detail { + class alignment_dummy; + typedef void (*function_ptr)(); + typedef int (alignment_dummy::*member_ptr); + typedef int (alignment_dummy::*member_function_ptr)(); + template struct lower_alignment_helper { + }; + template struct has_one_T { + }; + template union lower_alignment { + enum { + found0 = false }; + enum { + found1 = lower_alignment_helper::value }; + enum { + found2 = lower_alignment_helper::value }; + enum { + found3 = lower_alignment_helper::value }; + enum { + found4 = lower_alignment_helper::value }; + enum { + found5 = lower_alignment_helper::value }; + enum { + found6 = lower_alignment_helper::value }; + enum { + found7 = lower_alignment_helper::value }; + enum { + found8 = lower_alignment_helper::value }; + enum { + found9 = lower_alignment_helper::value }; + enum { + found10 = lower_alignment_helper::value }; + enum { + found11 = lower_alignment_helper::value }; + enum { + found12 = lower_alignment_helper::value }; + enum { + found13 = lower_alignment_helper >::value }; + enum { + found14 = lower_alignment_helper >::value }; + enum { + found15 = lower_alignment_helper >::value }; + enum { + found16 = lower_alignment_helper >::value }; + enum { + found17 = lower_alignment_helper >::value }; + enum { + found18 = lower_alignment_helper >::value }; + enum { + found19 = lower_alignment_helper >::value }; + enum { + found20 = lower_alignment_helper >::value }; + }; + } + namespace python { + namespace detail { + template union aligned_storage { + }; + } + namespace converter { + template struct rvalue_from_python_storage { + }; + template struct rvalue_from_python_data : rvalue_from_python_storage { + ~rvalue_from_python_data(); + }; + namespace detail { + }; + } + } + namespace mpl { + namespace aux { + }; + } + namespace python { + namespace detail { + enum { + }; + } + template struct to_python_indirect { + }; + namespace detail { + struct make_owning_holder { + }; + namespace detail { + } + } + namespace converter { + template struct pyobject_type { + static bool check(PyObject* x) { + } + }; + template struct pyobject_traits; + template struct handle_object_manager_traits : pyobject_traits { + static null_ok* adopt(PyObject* p) { + } + }; + template struct default_object_manager_traits { + static const bool is_specialized = python::detail::is_borrowed_ptr::value ; + }; + template struct object_manager_traits : mpl::if_c< is_handle::value , handle_object_manager_traits , default_object_manager_traits >::type { + }; + template struct is_object_manager : mpl::bool_::is_specialized> { + }; + } + namespace detail { + template struct value_is_shared_ptr { + }; + } + } + namespace python { + namespace detail { + struct signature_element { + }; + template struct signature_arity; + template <> struct signature_arity<11> { + template struct impl { + }; + }; + } + namespace api { + class object; + } + using api::object; + namespace detail { + template struct dependent { + }; + } + } + namespace detail{ + template struct ct_imp { + typedef const T& param_type; + }; + } + template struct call_traits { + typedef typename boost::detail::ct_imp< T, ::boost::is_pointer::value, ::boost::is_arithmetic::value >::param_type param_type; + }; + namespace python { + namespace detail { + } + namespace converter { + namespace detail { + template struct return_object_manager_from_python { + typedef T result_type; + result_type operator()(PyObject*) const; + }; + template inline T return_object_manager_from_python::operator()(PyObject* obj) const { + } + } + } + template class def_visitor { + }; + namespace api { + template class object_operators : public def_visitor { + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12> typename detail::dependent::type operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12) const { + } + }; + struct object_base : object_operators { + }; + } + namespace converter { + template struct extract_pointer { + }; + template struct extract_reference { + }; + template struct extract_rvalue : private noncopyable { + typedef typename mpl::if_< python::detail::copy_ctor_mutates_rhs , T& , typename call_traits::param_type >::type result_type; + mutable rvalue_from_python_data m_data; + }; + template struct extract_object_manager { + }; + template struct select_extract { + static const bool obj_mgr = is_object_manager::value ; + static const bool ptr = is_pointer::value ; + static const bool ref = is_reference::value ; + typedef typename mpl::if_c< obj_mgr , extract_object_manager , typename mpl::if_c< ptr , extract_pointer , typename mpl::if_c< ref , extract_reference , extract_rvalue >::type >::type >::type type; + }; + } + template struct extract : converter::select_extract::type { + private: typedef typename converter::select_extract::type base; + public: typedef typename base::result_type result_type; + operator result_type() const { + } + extract(api::object const&); + }; + } + } + namespace PySide { + class __attribute__ ((visibility("default"))) wrapper { + }; + } + struct QHashData { + static QHashData shared_null; + }; + template class QHash { + union { + QHashData *d; + }; + public: inline QHash() : d(&QHashData::shared_null) { + } + T &operator[](const Key &key); + }; + namespace PySide { + template inline boost::python::handle<> ptr(T* data, bool take_ownership = false) { + } + class __attribute__ ((visibility("internal"))) type_details { + typedef QGenericArgument(*func_python_to_cpp_type)(const boost::python::object&, const char*); + public: template static type_details* create_object_type_details(const char* type_name) { + } + template static type_details* create_value_type_details(const char* type_name) { + type_details* self = new type_details(); + self->m_func_python_to_cpp = &python_to_value_type; + } + func_python_to_cpp_type m_func_python_to_cpp; + template static QGenericArgument python_to_value_type(const boost::python::object& obj, const char *type_name) { + T* val = new T(boost::python::extract(obj)); + } + }; + class __attribute__ ((visibility("default"))) type_manager { + public: static type_manager& instance(); + template void __attribute__ ((visibility("internal"))) register_value_type(const char* type_name) { + m_type_map[type_name] = type_details::create_value_type_details(type_name); + } + QHash m_type_map; + }; + } + using namespace PySide; + class __attribute__ ((visibility("internal"))) qwebpage_extensionoption_wrapper : public QWebPage::ExtensionOption, public PySide::wrapper { + static void define_python_class() throw(); + }; + void qwebpage_extensionoption_wrapper::define_python_class() throw() { + type_manager::instance().register_value_type("QWebPage::ExtensionOption"); + } diff --git a/321197/pyside.ii.3 b/321197/pyside.ii.3 new file mode 100644 index 0000000..19cd9b1 --- /dev/null +++ b/321197/pyside.ii.3 @@ -0,0 +1,379 @@ +class QString { + public: + inline QString(const char *ch) : d(fromAscii_helper(ch)) {} + private: struct Data {}; + Data *d; + static Data *fromAscii_helper(const char *str, int size = -1); +}; +class QGenericArgument {}; +class QObject {}; +class QWebPage : public QObject { + public: template inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const {} + class ExtensionOption {}; +}; + typedef struct {} PyObject; + typedef struct {} PyTypeObject; + +namespace mpl_ { + namespace aux {} + template< bool C_ > struct bool_; + typedef bool_ false_; + template< bool C_ > struct bool_ { static const bool value = C_; }; + template< typename T, T N > struct integral_c { static const T value = N; }; +} +namespace boost { + typedef long long long_long_type; + namespace mpl { using namespace mpl_; } +} +namespace boost { + template struct integral_constant : public mpl::integral_c { +}; +namespace detail { + template struct cv_traits_imp { + typedef T unqualified_type; + }; +} + + template< typename T > struct is_reference : ::boost::integral_constant {}; + template< typename T > struct remove_cv { + typedef typename boost::detail::cv_traits_imp::unqualified_type type; + }; + +namespace python { + namespace detail { + typedef char* yes_convertible; + typedef int* no_convertible; + template struct convertible {}; + template inline Target* upcast(Source* p, yes_convertible, no_convertible, Target*) {} + } + } + } + + namespace boost { + template< typename T > struct is_integral : ::boost::integral_constant {}; + template< typename T > struct is_float : ::boost::integral_constant {}; + namespace type_traits { + template struct ice_or; + template <> struct ice_or { + static const bool value = false; + }; + } + namespace detail { + template< typename T > struct is_arithmetic_impl { + static const bool value = (::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_float::value >::value) ; + }; + } + template< typename T > struct is_arithmetic : ::boost::integral_constant::value> { + }; + namespace type_traits { + template struct is_mem_fun_pointer_impl { + static const bool value = false; + }; + } + template< typename T > struct is_member_function_pointer : ::boost::integral_constant::type>::value> { + }; + template< typename T > struct is_member_pointer : ::boost::integral_constant::value> { + }; + namespace type_traits { + template struct ice_and; + template struct ice_and { + static const bool value = false; + }; + template struct ice_not { + static const bool value = true; + }; + } + namespace detail { + template< typename T > struct is_pointer_helper { + static const bool value = false; + }; + template< typename T > struct is_pointer_impl { + static const bool value = (::boost::type_traits::ice_and< ::boost::detail::is_pointer_helper::type>::value , ::boost::type_traits::ice_not< ::boost::is_member_pointer::value >::value >::value) ; + }; + } + template< typename T > struct is_pointer : ::boost::integral_constant::value> { + }; + template class unwrap_reference { + }; + struct na {}; + } + namespace boost { + namespace mpl { + template< bool C , typename T1 , typename T2 > struct if_c { typedef T2 type; }; + template< typename T1 = na , typename T2 = na , typename T3 = na > struct if_ { + private: typedef if_c< static_cast(T1::value) , T2 , T3 > almost_type_; + public: typedef typename almost_type_::type type; + }; + } + namespace detail { + template struct is_class_impl { + }; + } + namespace python { + namespace detail { + template class borrowed { + }; + template struct is_borrowed_ptr { + static const bool value = false; + }; + } + template class handle; + template inline T* incref(T* p) { + } + template struct null_ok; + namespace detail { + template inline T* manage_ptr(detail::borrowed >* p, int) { + } + } + template class handle { + }; + template class is_handle { + public: static const bool value = false; + }; + } + } + namespace boost { + namespace mpl { + template< typename T , typename Base , int at_front = 0 > struct v_item : Base { + }; + } + namespace mpl { + template< typename Dummy = na > struct vector0; + template< typename T0 > struct vector1 : v_item< T0 , vector0< > > { + }; + template< typename T0, typename T1 > struct vector2 : v_item< T1 , vector1 > { + }; + template< typename T0, typename T1, typename T2 > struct vector3 : v_item< T2 , vector2< T0,T1 > > { + }; + template< typename T0, typename T1, typename T2, typename T3 > struct vector4 : v_item< T3 , vector3< T0,T1,T2 > > { + }; + template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector5 : v_item< T4 , vector4< T0,T1,T2,T3 > > { + }; + template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector6 : v_item< T5 , vector5< T0,T1,T2,T3,T4 > > { + }; + template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector7 : v_item< T6 , vector6< T0,T1,T2,T3,T4,T5 > > { + }; + template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector8 : v_item< T7 , vector7< T0,T1,T2,T3,T4,T5,T6 > > { + }; + template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector9 : v_item< T8 , vector8< T0,T1,T2,T3,T4,T5,T6,T7 > > { + }; + } + namespace noncopyable_ { + class noncopyable { + }; + } + typedef noncopyable_::noncopyable noncopyable; + namespace detail { + template class empty_base { + }; + } + template > struct less_than_comparable2 : B { + }; + template > struct equality_comparable2 : B { + }; + template > struct totally_ordered2 : less_than_comparable2 > { + }; + namespace python { + struct instance_holder : private noncopyable { + }; + namespace detail { + template struct is_auto_ptr : mpl::false_ { + }; + } + namespace detail { + template struct copy_ctor_mutates_rhs : is_auto_ptr { + }; + } + } + namespace python { + namespace detail { + template struct pointee_impl { + }; + }; + }; + namespace python { + namespace detail { + } + } + namespace mpl { + namespace aux { + template< long C_ > struct not_impl : bool_ { + }; + } + } + namespace python { + namespace objects { + template struct pointer_holder_back_reference : instance_holder { + pointer_holder_back_reference(Pointer); + private: Pointer m_p; + }; + template inline pointer_holder_back_reference::pointer_holder_back_reference(Pointer p) : m_p(p) { + } + } + } + namespace detail { + class alignment_dummy; + typedef void (*function_ptr)(); + typedef int (alignment_dummy::*member_ptr); + typedef int (alignment_dummy::*member_function_ptr)(); + template struct lower_alignment_helper { + }; + template struct has_one_T { + }; + template union lower_alignment { + }; + } + namespace python { + namespace detail { + template union aligned_storage { + }; + } + namespace converter { + template struct rvalue_from_python_storage { + }; + template struct rvalue_from_python_data : rvalue_from_python_storage { + ~rvalue_from_python_data(); + }; + } + } + namespace python { + template struct to_python_indirect { + }; + namespace converter { + template struct pyobject_type { + static bool check(PyObject* x) { + } + }; + template struct pyobject_traits; + template struct handle_object_manager_traits : pyobject_traits { + static null_ok* adopt(PyObject* p) { + } + }; + template struct default_object_manager_traits { + static const bool is_specialized = python::detail::is_borrowed_ptr::value ; + }; + template struct object_manager_traits : mpl::if_c< is_handle::value , handle_object_manager_traits , default_object_manager_traits >::type { + }; + template struct is_object_manager : mpl::bool_::is_specialized> { + }; + } + namespace detail { + template struct value_is_shared_ptr { + }; + } + } + namespace python { + namespace detail { + struct signature_element { + }; + template struct signature_arity; + template <> struct signature_arity<11> { + template struct impl { + }; + }; + } + namespace api { + class object; + } + using api::object; + namespace detail { + template struct dependent { + }; + } + } + namespace detail{ + template struct ct_imp { + typedef const T& param_type; + }; + } + template struct call_traits { + typedef typename boost::detail::ct_imp< T, ::boost::is_pointer::value, ::boost::is_arithmetic::value >::param_type param_type; + }; + namespace python { + namespace detail { + } + namespace converter { + namespace detail { + template struct return_object_manager_from_python { + typedef T result_type; + result_type operator()(PyObject*) const; + }; + template inline T return_object_manager_from_python::operator()(PyObject* obj) const { + } + } + } + template class def_visitor { + }; + namespace api { + template class object_operators : public def_visitor { + template < class A0 , class A1 , class A2 , class A3 , class A4 , class A5 , class A6 , class A7 , class A8 , class A9 , class A10 , class A11 , class A12> typename detail::dependent::type operator()( A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12) const { + } + }; + struct object_base : object_operators { + }; + } + namespace converter { + template struct extract_pointer { + }; + template struct extract_reference { + }; + template struct extract_rvalue : private noncopyable { + typedef typename mpl::if_< python::detail::copy_ctor_mutates_rhs , T& , typename call_traits::param_type >::type result_type; + mutable rvalue_from_python_data m_data; + }; + template struct extract_object_manager { + }; + template struct select_extract { + static const bool obj_mgr = is_object_manager::value ; + static const bool ptr = is_pointer::value ; + static const bool ref = is_reference::value ; + typedef typename mpl::if_c< obj_mgr , extract_object_manager , typename mpl::if_c< ptr , extract_pointer , typename mpl::if_c< ref , extract_reference , extract_rvalue >::type >::type >::type type; + }; + } + template struct extract : converter::select_extract::type { + private: typedef typename converter::select_extract::type base; + public: typedef typename base::result_type result_type; + operator result_type() const {} + extract(api::object const&); + }; + } + } + +struct QHashData { static QHashData shared_null; }; + template class QHash { + QHashData *d; + public: inline QHash() : d(&QHashData::shared_null) {} + T &operator[](const Key &key); + }; + + namespace PySide { + class wrapper {}; + template inline boost::python::handle<> ptr(T* data, bool take_ownership = false) {} + class type_details { + typedef QGenericArgument(*func_python_to_cpp_type)(const boost::python::object&, const char*); + public: template static type_details* create_object_type_details(const char* type_name) {} + template static type_details* create_value_type_details(const char* type_name) { + type_details* self = new type_details(); + self->m_func_python_to_cpp = &python_to_value_type; + } + func_python_to_cpp_type m_func_python_to_cpp; + template static QGenericArgument python_to_value_type(const boost::python::object& obj, const char *type_name) { + T* val = new T(boost::python::extract(obj)); + } + }; + + class type_manager { + public: static type_manager& instance(); + template void register_value_type(const char* type_name) { + m_type_map[type_name] = type_details::create_value_type_details(type_name); + } + QHash m_type_map; + }; + } + using namespace PySide; + class qwebpage_extensionoption_wrapper : public QWebPage::ExtensionOption, public PySide::wrapper { + static void define_python_class() throw(); + }; + void qwebpage_extensionoption_wrapper::define_python_class() throw() { + type_manager::instance().register_value_type("QWebPage::ExtensionOption"); + } diff --git a/321197/pyside.ii.4 b/321197/pyside.ii.4 new file mode 100644 index 0000000..2e8ba41 --- /dev/null +++ b/321197/pyside.ii.4 @@ -0,0 +1,221 @@ +class QString { + public: inline QString(const char *ch) : d(fromAscii_helper(ch)) { + } + private: struct Data { + }; + Data *d; + static Data *fromAscii_helper(const char *str, int size = -1); + }; + class QGenericArgument { + }; + class QObject { + }; + class QWebPage : public QObject { + public: template inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { + } + class ExtensionOption { + }; + } + PyObject; + namespace mpl_ { + template< bool C_ > struct bool_; + typedef bool_ false_; + template< bool C_ > struct bool_ { + static const bool value = C_; + }; + template< typename T, T N > struct integral_c { + static const T value = N; + }; + } + namespace boost { + namespace mpl { + using namespace mpl_; + } + template struct integral_constant : public mpl::integral_c { + }; + namespace detail { + template struct cv_traits_imp { + typedef T unqualified_type; + }; + } + template< typename T > struct is_reference : ::boost::integral_constant { + }; + template< typename T > struct remove_cv { + typedef typename boost::detail::cv_traits_imp::unqualified_type type; + }; + template< typename T > struct is_integral : ::boost::integral_constant { + }; + template< typename T > struct is_float : ::boost::integral_constant { + }; + namespace type_traits { + template struct ice_or; + template <> struct ice_or { + static const bool value = false; + }; + } + namespace detail { + template< typename T > struct is_arithmetic_impl { + static const bool value = (::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_float::value >::value) ; + }; + } + template< typename T > struct is_arithmetic : ::boost::integral_constant::value> { + }; + namespace type_traits { + template struct is_mem_fun_pointer_impl { + static const bool value = false; + }; + } + template< typename T > struct is_member_function_pointer : ::boost::integral_constant::type>::value> { + }; + template< typename T > struct is_member_pointer : ::boost::integral_constant::value> { + }; + namespace type_traits { + template struct ice_and; + template struct ice_and { + static const bool value = false; + }; + template struct ice_not { + static const bool value = true; + }; + } + namespace detail { + template< typename T > struct is_pointer_helper { + static const bool value = false; + }; + template< typename T > struct is_pointer_impl { + static const bool value = (::boost::type_traits::ice_and< ::boost::detail::is_pointer_helper::type>::value , ::boost::type_traits::ice_not< ::boost::is_member_pointer::value >::value >::value) ; + }; + } + template< typename T > struct is_pointer : ::boost::integral_constant::value> { + }; + struct na { + }; + namespace mpl { + template< bool C , typename T1 , typename T2 > struct if_c { + typedef T2 type; + }; + template< typename T1 = na , typename T2 = na , typename T3 = na > struct if_ { + private: typedef if_c< static_cast(T1::value) , T2 , T3 > almost_type_; + public: typedef typename almost_type_::type type; + }; + } + namespace python { + namespace detail { + template struct is_borrowed_ptr { + static const bool value = false; + }; + } + template class is_handle { + public: static const bool value = false; + }; + } + namespace noncopyable_ { + class noncopyable { + }; + } + typedef noncopyable_::noncopyable noncopyable; + namespace python { + namespace detail { + template struct is_auto_ptr : mpl::false_ { + }; + template struct copy_ctor_mutates_rhs : is_auto_ptr { + }; + } + namespace converter { + template struct rvalue_from_python_storage { + }; + template struct rvalue_from_python_data : rvalue_from_python_storage { + ~rvalue_from_python_data(); + }; + template struct pyobject_traits; + template struct handle_object_manager_traits : pyobject_traits { + }; + template struct default_object_manager_traits { + static const bool is_specialized = python::detail::is_borrowed_ptr::value ; + }; + template struct object_manager_traits : mpl::if_c< is_handle::value , handle_object_manager_traits , default_object_manager_traits >::type { + }; + template struct is_object_manager : mpl::bool_::is_specialized> { + }; + } + namespace api { + class object; + } + using api::object; + } + namespace detail{ + template struct ct_imp { + typedef const T& param_type; + }; + } + template struct call_traits { + typedef typename boost::detail::ct_imp< T, ::boost::is_pointer::value, ::boost::is_arithmetic::value >::param_type param_type; + }; + namespace python { + namespace converter { + template struct extract_pointer { + }; + template struct extract_reference { + }; + template struct extract_rvalue : private noncopyable { + typedef typename mpl::if_< python::detail::copy_ctor_mutates_rhs , T& , typename call_traits::param_type >::type result_type; + mutable rvalue_from_python_data m_data; + }; + template struct extract_object_manager { + }; + template struct select_extract { + static const bool obj_mgr = is_object_manager::value ; + static const bool ptr = is_pointer::value ; + static const bool ref = is_reference::value ; + typedef typename mpl::if_c< obj_mgr , extract_object_manager , typename mpl::if_c< ptr , extract_pointer , typename mpl::if_c< ref , extract_reference , extract_rvalue >::type >::type >::type type; + }; + } + template struct extract : converter::select_extract::type { + private: typedef typename converter::select_extract::type base; + public: typedef typename base::result_type result_type; + operator result_type() const { + } + extract(api::object const&); + }; + } + } + struct QHashData { + static QHashData shared_null; + }; + template class QHash { + QHashData *d; + public: inline QHash() : d(&QHashData::shared_null) { + } + T &operator[](const Key &key); + }; + namespace PySide { + class wrapper { + }; + class type_details { + typedef QGenericArgument(*func_python_to_cpp_type)(const boost::python::object&, const char*); + public: template static type_details* create_object_type_details(const char* type_name) { + } + template static type_details* create_value_type_details(const char* type_name) { + type_details* self = new type_details(); + self->m_func_python_to_cpp = &python_to_value_type; + } + func_python_to_cpp_type m_func_python_to_cpp; + template static QGenericArgument python_to_value_type(const boost::python::object& obj, const char *type_name) { + T* val = new T(boost::python::extract(obj)); + } + }; + class type_manager { + public: static type_manager& instance(); + template void register_value_type(const char* type_name) { + m_type_map[type_name] = type_details::create_value_type_details(type_name); + } + QHash m_type_map; + }; + } + using namespace PySide; + class qwebpage_extensionoption_wrapper : public QWebPage::ExtensionOption, public PySide::wrapper { + static void define_python_class() throw(); + }; + void qwebpage_extensionoption_wrapper::define_python_class() throw() { + type_manager::instance().register_value_type("QWebPage::ExtensionOption"); + } diff --git a/321197/pyside.ii.5 b/321197/pyside.ii.5 new file mode 100644 index 0000000..4597816 --- /dev/null +++ b/321197/pyside.ii.5 @@ -0,0 +1,192 @@ +class QString { + public: inline QString(const char *ch); +}; +class QGenericArgument {}; + class QObject { }; +class QWebPage : public QObject { + public: template inline void qt_check_for_QOBJECT_macro(const T &_q_argument); + class ExtensionOption { }; + }; + +namespace boost { + namespace mpl { + template< bool C_ > struct bool_; + typedef bool_ false_; + template< bool C_ > struct bool_ { static const bool value = C_; }; + template< typename T, T N > struct integral_c { static const T value = N; }; + } + template struct integral_constant : public mpl::integral_c { }; + + namespace detail { + template struct cv_traits_imp { typedef T unqualified_type; }; + } + template< typename T > struct is_reference : ::boost::integral_constant { }; + template< typename T > struct remove_cv { typedef typename boost::detail::cv_traits_imp type; }; + template< typename T > struct is_integral : ::boost::integral_constant { }; + template< typename T > struct is_float : ::boost::integral_constant { }; + namespace type_traits { + template struct ice_or; + template <> struct ice_or { static const bool value = false; }; + } + namespace detail { + template< typename T > struct is_arithmetic_impl { static const bool value = (::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_float::value >::value) ; }; + } + + template< typename T > struct is_arithmetic : ::boost::integral_constant::value> {}; + +namespace type_traits { + template struct is_mem_fun_pointer_impl { static const bool value = false; }; + template struct ice_and; + template struct ice_and { + static const bool value = false; + }; + template struct ice_not { + static const bool value = true; + }; + } + template< typename T > struct is_member_function_pointer : ::boost::integral_constant::type>::value> { }; + template< typename T > struct is_member_pointer : ::boost::integral_constant::value> { }; + + namespace detail { + template< typename T > struct is_pointer_helper { + static const bool value = false; + }; + template< typename T > struct is_pointer_impl { + static const bool value = (::boost::type_traits::ice_and< ::boost::detail::is_pointer_helper::type>::value , ::boost::type_traits::ice_not< ::boost::is_member_pointer::value >::value >::value) ; + }; + } + template< typename T > struct is_pointer : ::boost::integral_constant::value> { + }; + struct na { + }; + namespace mpl { + template< bool C , typename T1 , typename T2 > struct if_c { + typedef T2 type; + }; + template< typename T1 = na , typename T2 = na , typename T3 = na > struct if_ { + private: typedef if_c< static_cast(T1::value) , T2 , T3 > almost_type_; + public: typedef typename almost_type_::type type; + }; + } + namespace python { + namespace detail { + template struct is_borrowed_ptr { + static const bool value = false; + }; + } + template class is_handle { + public: static const bool value = false; + }; + } + namespace noncopyable_ { + class noncopyable { + }; + } + typedef noncopyable_::noncopyable noncopyable; + namespace python { + namespace detail { + template struct is_auto_ptr : mpl::false_ { + }; + template struct copy_ctor_mutates_rhs : is_auto_ptr { + }; + } + namespace converter { + template struct rvalue_from_python_storage { + }; + template struct rvalue_from_python_data : rvalue_from_python_storage { + ~rvalue_from_python_data(); + }; + template struct pyobject_traits; + template struct handle_object_manager_traits : pyobject_traits { + }; + template struct default_object_manager_traits { + static const bool is_specialized = python::detail::is_borrowed_ptr::value ; + }; + template struct object_manager_traits : mpl::if_c< is_handle::value , handle_object_manager_traits , default_object_manager_traits >::type { + }; + template struct is_object_manager : mpl::bool_::is_specialized> { + }; + } + namespace api { + class object; + } + using api::object; + } + namespace detail{ + template struct ct_imp { + typedef const T& param_type; + }; + } + template struct call_traits { + typedef typename boost::detail::ct_imp< T, ::boost::is_pointer::value, ::boost::is_arithmetic::value >::param_type param_type; + }; + namespace python { + namespace converter { + template struct extract_pointer { + }; + template struct extract_reference { + }; + template struct extract_rvalue : private noncopyable { + typedef typename mpl::if_< python::detail::copy_ctor_mutates_rhs , T& , typename call_traits::param_type >::type result_type; + mutable rvalue_from_python_data m_data; + }; + template struct extract_object_manager { + }; + template struct select_extract { + static const bool obj_mgr = is_object_manager::value ; + static const bool ptr = is_pointer::value ; + static const bool ref = is_reference::value ; + typedef typename mpl::if_c< obj_mgr , extract_object_manager , typename mpl::if_c< ptr , extract_pointer , typename mpl::if_c< ref , extract_reference , extract_rvalue >::type >::type >::type type; + }; + } + template struct extract : converter::select_extract::type { + private: typedef typename converter::select_extract::type base; + public: typedef typename base::result_type result_type; + operator result_type() const { + } + extract(api::object const&); + }; + } + } + struct QHashData { + static QHashData shared_null; + }; + template class QHash { + QHashData *d; + public: inline QHash() : d(&QHashData::shared_null) { + } + T &operator[](const Key &key); + }; + namespace PySide { + class wrapper { + }; + class type_details { + typedef QGenericArgument(*func_python_to_cpp_type)(const boost::python::object&, const char*); + public: template static type_details* create_object_type_details(const char* type_name) { + } + template static type_details* create_value_type_details(const char* type_name) { + type_details* self = new type_details(); + self->m_func_python_to_cpp = &python_to_value_type; + } + func_python_to_cpp_type m_func_python_to_cpp; + template static QGenericArgument python_to_value_type(const boost::python::object& obj, const char *type_name) { + T* val = new T(boost::python::extract(obj)); + } + }; + class type_manager { + public: static type_manager& instance(); + template void register_value_type(const char* type_name) { + m_type_map[type_name] = type_details::create_value_type_details(type_name); + } + QHash m_type_map; + }; + } + using namespace PySide; + class qwebpage_extensionoption_wrapper : +public PySide::wrapper +{ + static void define_python_class(); + }; + void qwebpage_extensionoption_wrapper::define_python_class() { + type_manager::instance().register_value_type("QWebPage::ExtensionOption"); + } diff --git a/321197/pyside.ii.6 b/321197/pyside.ii.6 new file mode 100644 index 0000000..783cc78 --- /dev/null +++ b/321197/pyside.ii.6 @@ -0,0 +1,179 @@ +class QString { public: inline QString(const char *ch); }; +class QGenericArgument {}; +class QWebPage { + public: + template inline void qt_check_for_QOBJECT_macro(const T &_q_argument); + class ExtensionOption {}; +}; +namespace boost { + namespace mpl { + template< bool C_ > struct bool_; + typedef bool_ false_; + template< bool C_ > struct bool_ { + static const bool value = C_; + }; + template< typename T, T N > struct integral_c { + static const T value = N; + }; + } + template struct integral_constant + : public mpl::integral_c + {}; + + namespace detail { + template struct cv_traits_imp {}; + } + + template< typename T > struct is_reference : ::boost::integral_constant {}; + template< typename T > struct remove_cv { + typedef typename boost::detail::cv_traits_imp type; + }; + template< typename T > struct is_integral : ::boost::integral_constant {}; + template< typename T > struct is_float : ::boost::integral_constant {}; + namespace type_traits { + template struct ice_or; + template <> struct ice_or { + static const bool value = false; + }; + } + + namespace detail { + template< typename T > struct is_arithmetic_impl { + static const bool value = (::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_float::value >::value); + }; + } + + template< typename T > struct is_arithmetic : ::boost::integral_constant::value> {}; + + namespace type_traits { + template struct is_mem_fun_pointer_impl { + static const bool value = false; + }; + template struct ice_and; + template struct ice_and { + static const bool value = false; + }; + template struct ice_not { + static const bool value = true; + }; + } + template< typename T > struct is_member_function_pointer : ::boost::integral_constant::type>::value> {}; + template< typename T > struct is_member_pointer : ::boost::integral_constant::value> {}; + + namespace detail { + template< typename T > struct is_pointer_helper { + static const bool value = false; + }; + template< typename T > struct is_pointer_impl { + static const bool value = (::boost::type_traits::ice_and< ::boost::detail::is_pointer_helper::type>::value , ::boost::type_traits::ice_not< ::boost::is_member_pointer::value >::value >::value); + }; + } + template< typename T > struct is_pointer : ::boost::integral_constant::value> {}; + + struct na {}; + + namespace mpl { + template< bool C , typename T1 , typename T2 > struct if_c { typedef T2 type; }; + + template< typename T1 = na , typename T2 = na , typename T3 = na > struct if_ { + private: typedef if_c< static_cast(T1::value) , T2 , T3 > almost_type_; + public: typedef typename almost_type_::type type; + }; + } + + namespace python { + template class is_handle { + public: static const bool value = false; + }; + namespace detail { + template struct is_borrowed_ptr { + static const bool value = false; + }; + template struct is_auto_ptr : mpl::false_ {}; + template struct copy_ctor_mutates_rhs : is_auto_ptr {}; + } + + namespace converter { + template struct rvalue_from_python_storage {}; + template struct rvalue_from_python_data : rvalue_from_python_storage { ~rvalue_from_python_data(); }; + + template struct pyobject_traits; + template struct handle_object_manager_traits : pyobject_traits {}; + template struct default_object_manager_traits { + static const bool is_specialized = python::detail::is_borrowed_ptr::value; + }; + + template struct object_manager_traits : mpl::if_c< is_handle::value , handle_object_manager_traits , default_object_manager_traits >::type {}; + template struct is_object_manager : mpl::bool_::is_specialized> {}; + } + + class object; + } + + namespace detail { + template struct ct_imp { typedef const T& param_type; }; + } + + template struct call_traits { + typedef typename boost::detail::ct_imp< T, ::boost::is_pointer::value, ::boost::is_arithmetic::value >::param_type param_type; + }; + + namespace python { + namespace converter { + template struct extract_pointer {}; + template struct extract_reference {}; + template struct extract_rvalue { + typedef typename mpl::if_< python::detail::copy_ctor_mutates_rhs , T& , typename call_traits::param_type >::type result_type; + mutable rvalue_from_python_data m_data; + }; + template struct extract_object_manager {}; + template struct select_extract { + static const bool obj_mgr = is_object_manager::value; + static const bool ptr = is_pointer::value; + static const bool ref = is_reference::value; + typedef typename mpl::if_c< obj_mgr , extract_object_manager , typename mpl::if_c< ptr , extract_pointer , typename mpl::if_c< ref , extract_reference , extract_rvalue >::type >::type >::type type; + }; + } + template struct extract : converter::select_extract::type { + private: typedef typename converter::select_extract::type base; + public: typedef typename base::result_type result_type; + operator result_type() const {} + extract(object const&); + }; + } +} +struct QHashData { + static QHashData shared_null; +}; +template class QHash { + public: inline QHash() { } + T &operator[](const Key &key); +}; + class type_details { + typedef QGenericArgument(*func_python_to_cpp_type)(const boost::python::object&, const char*); + public: template static type_details* create_object_type_details(const char* type_name) {} + + template static type_details* create_value_type_details(const char* type_name) { + type_details* self = new type_details(); + self->m_func_python_to_cpp = &python_to_value_type; + } + func_python_to_cpp_type m_func_python_to_cpp; + template static QGenericArgument python_to_value_type(const boost::python::object& obj, const char *type_name) { + T* val = new T(boost::python::extract(obj)); + } + }; + + class type_manager { + public: static type_manager& instance(); + template void register_value_type(const char* type_name) { + m_type_map[type_name] = type_details::create_value_type_details(type_name); + } + QHash m_type_map; + }; +class qwebpage_extensionoption_wrapper +{ +static void define_python_class(); +}; +void qwebpage_extensionoption_wrapper::define_python_class() { +type_manager::instance().register_value_type("QWebPage::ExtensionOption"); +} diff --git a/321197/pyside.ii.7 b/321197/pyside.ii.7 new file mode 100644 index 0000000..51c7385 --- /dev/null +++ b/321197/pyside.ii.7 @@ -0,0 +1,58 @@ +class QString { public: inline QString(const int i);}; +class QGenericArgument {}; +class ExtensionOption {}; + template< typename T2 > struct if_ { + typedef T2 type; + }; + template struct c_imp { + typedef const T& param_type; + }; + template struct call_traits { + typedef typename c_imp< T >::param_type param_type; + }; + class object; + template struct rvalue_from_python_storage {}; + template struct rvalue_from_python_data : rvalue_from_python_storage { + ~rvalue_from_python_data(); + }; + template struct extract_rvalue { + typedef typename if_::param_type >::type result_type; + mutable rvalue_from_python_data m_data; + }; + template struct select_extract { + typedef typename if_< extract_rvalue >::type type; + }; + + template struct extract : select_extract::type { + private: typedef typename select_extract::type base; + public: typedef typename base::result_type result_type; + operator result_type() const {} + extract(object const&); + }; + +template class QHash { + public: inline QHash() {} + T &operator[](const Key &key); +}; +class type_details { + typedef QGenericArgument(*func_python_to_cpp_type)(const object&); + public: + template static type_details* create_value_type_details() { + type_details* self = new type_details(); + self->m_func_python_to_cpp = &python_to_value_type; + } + func_python_to_cpp_type m_func_python_to_cpp; + template static QGenericArgument python_to_value_type(const object& obj) { + T* val = new T(extract(obj)); + } +}; +class type_manager { + public: static type_manager& instance(); + template void register_value_type() { + m_type_map[0] = type_details::create_value_type_details(); + } + QHash m_type_map; +}; +void foo() { + type_manager::instance().register_value_type(); +} diff --git a/321197/pyside.ii.8 b/321197/pyside.ii.8 new file mode 100644 index 0000000..470bec8 --- /dev/null +++ b/321197/pyside.ii.8 @@ -0,0 +1,65 @@ +class QString { + public:inline QString(const int i); +}; +class QGenericArgument { +}; +class ExtensionOption { +}; +template < typename T2 > struct if_ { + typedef T2 type; +}; +template < typename T > struct c_imp { + typedef const T & param_type; +}; +template < typename T > struct call_traits { + typedef typename c_imp < T >::param_type param_type; +}; +class object; +template < class T > struct rvalue_from_python_data { + ~rvalue_from_python_data(); +}; +template < class T > struct extract_rvalue { + typedef typename if_ < typename call_traits < + T >::param_type >::type result_type; + mutable rvalue_from_python_data < T > m_data; +}; +template < class T > struct select_extract { + typedef typename if_ < extract_rvalue < T > >::type type; +}; +template < class T > struct extract:select_extract < T >::type { + private:typedef typename select_extract < T >::type base; + public:typedef typename base::result_type result_type; + operator result_type() const { + } extract(object const &); +}; +template < class Key, class T > class QHash { + public:inline QHash() { + } + T & operator[](const Key & key); +}; + +class type_details { + typedef QGenericArgument(*func_python_to_cpp_type) (const object &); + public: template < typename T > + static type_details *create_value_type_details() { + type_details *self = new type_details(); + self->m_func_python_to_cpp = &python_to_value_type < T >; + } func_python_to_cpp_type m_func_python_to_cpp; + template < class T > + static QGenericArgument python_to_value_type(const object & obj) { + T *val = new T(extract < T > (obj)); + } +}; + +class type_manager { + public:static type_manager & instance(); + template < typename T > void register_value_type() { + m_type_map[0] = + type_details::create_value_type_details < T > (); + } QHash < QString, type_details * >m_type_map; +}; + +void foo() +{ + type_manager::instance().register_value_type < ExtensionOption > (); +} diff --git a/321197/reduce-ice b/321197/reduce-ice new file mode 100755 index 0000000..9e32ad4 --- /dev/null +++ b/321197/reduce-ice @@ -0,0 +1,13 @@ +#!/bin/bash +# +# Run like: +# multidelta -level=# ./reduce-ice $FILE +# levels: 0 0 1 1 2 2 10 10 +# + +FILE=pyside.ii +CC=g++-4.5.0 +CFLAGS="" +STRING="internal compiler error: Segmentation fault" + +$CC -pipe -c $CFLAGS $FILE 2>&1 | grep "$STRING" diff --git a/321325/lgc_pg-scenarios.pre.i b/321325/lgc_pg-scenarios.pre.i new file mode 100644 index 0000000..3c9ba0b --- /dev/null +++ b/321325/lgc_pg-scenarios.pre.i @@ -0,0 +1,23 @@ +void scen_create_random_weather(void *dest_file, void *scen_file, int month, + int turns) +{ + int i; + int init_cond = 0; + int weather[turns]; + weather[0] = (init_cond == 1) ? 0 : 2; + if (month < 3 || month == 12) { + for (i = 0; i < turns; i++) + if (weather[i] == 2) + weather[i]++; + } + fprintf(dest_file, "weather»"); + i = 0; + while (i < turns) { + fprintf(dest_file, "%s", + weather[i] == 0 ? "fair" : weather[i] == + 1 ? "clouds" : weather[i] == 2 ? "rain" : "snow"); + if (i < turns - 1) + fprintf(dest_file, "°"); + i++; + } +} diff --git a/321325/lgc_pg-scenarios.pre.i.0 b/321325/lgc_pg-scenarios.pre.i.0 new file mode 100644 index 0000000..f380b2b --- /dev/null +++ b/321325/lgc_pg-scenarios.pre.i.0 @@ -0,0 +1,5459 @@ +# 1 "scenarios.c" +# 1 "" +# 1 "" +# 1 "scenarios.c" +# 18 "scenarios.c" +# 1 "/usr/include/stdio.h" 1 3 4 +# 28 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/features.h" 1 3 4 +# 347 "/usr/include/features.h" 3 4 +# 1 "/usr/include/sys/cdefs.h" 1 3 4 +# 353 "/usr/include/sys/cdefs.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 354 "/usr/include/sys/cdefs.h" 2 3 4 +# 348 "/usr/include/features.h" 2 3 4 +# 371 "/usr/include/features.h" 3 4 +# 1 "/usr/include/gnu/stubs.h" 1 3 4 + + + +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 5 "/usr/include/gnu/stubs.h" 2 3 4 + + +# 1 "/usr/include/gnu/stubs-32.h" 1 3 4 +# 8 "/usr/include/gnu/stubs.h" 2 3 4 +# 372 "/usr/include/features.h" 2 3 4 +# 29 "/usr/include/stdio.h" 2 3 4 + + + + + +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 211 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stddef.h" 3 4 +typedef unsigned int size_t; +# 35 "/usr/include/stdio.h" 2 3 4 + +# 1 "/usr/include/bits/types.h" 1 3 4 +# 28 "/usr/include/bits/types.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 29 "/usr/include/bits/types.h" 2 3 4 + + +typedef unsigned char __u_char; +typedef unsigned short int __u_short; +typedef unsigned int __u_int; +typedef unsigned long int __u_long; + + +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; + + + + +__extension__ typedef signed long long int __int64_t; +__extension__ typedef unsigned long long int __uint64_t; + + + + + + + +__extension__ typedef long long int __quad_t; +__extension__ typedef unsigned long long int __u_quad_t; +# 131 "/usr/include/bits/types.h" 3 4 +# 1 "/usr/include/bits/typesizes.h" 1 3 4 +# 132 "/usr/include/bits/types.h" 2 3 4 + + +__extension__ typedef __u_quad_t __dev_t; +__extension__ typedef unsigned int __uid_t; +__extension__ typedef unsigned int __gid_t; +__extension__ typedef unsigned long int __ino_t; +__extension__ typedef __u_quad_t __ino64_t; +__extension__ typedef unsigned int __mode_t; +__extension__ typedef unsigned int __nlink_t; +__extension__ typedef long int __off_t; +__extension__ typedef __quad_t __off64_t; +__extension__ typedef int __pid_t; +__extension__ typedef struct { int __val[2]; } __fsid_t; +__extension__ typedef long int __clock_t; +__extension__ typedef unsigned long int __rlim_t; +__extension__ typedef __u_quad_t __rlim64_t; +__extension__ typedef unsigned int __id_t; +__extension__ typedef long int __time_t; +__extension__ typedef unsigned int __useconds_t; +__extension__ typedef long int __suseconds_t; + +__extension__ typedef int __daddr_t; +__extension__ typedef long int __swblk_t; +__extension__ typedef int __key_t; + + +__extension__ typedef int __clockid_t; + + +__extension__ typedef void * __timer_t; + + +__extension__ typedef long int __blksize_t; + + + + +__extension__ typedef long int __blkcnt_t; +__extension__ typedef __quad_t __blkcnt64_t; + + +__extension__ typedef unsigned long int __fsblkcnt_t; +__extension__ typedef __u_quad_t __fsblkcnt64_t; + + +__extension__ typedef unsigned long int __fsfilcnt_t; +__extension__ typedef __u_quad_t __fsfilcnt64_t; + +__extension__ typedef int __ssize_t; + + + +typedef __off64_t __loff_t; +typedef __quad_t *__qaddr_t; +typedef char *__caddr_t; + + +__extension__ typedef int __intptr_t; + + +__extension__ typedef unsigned int __socklen_t; +# 37 "/usr/include/stdio.h" 2 3 4 +# 45 "/usr/include/stdio.h" 3 4 +struct _IO_FILE; + + + +typedef struct _IO_FILE FILE; + + + + + +# 65 "/usr/include/stdio.h" 3 4 +typedef struct _IO_FILE __FILE; +# 75 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/libio.h" 1 3 4 +# 32 "/usr/include/libio.h" 3 4 +# 1 "/usr/include/_G_config.h" 1 3 4 +# 15 "/usr/include/_G_config.h" 3 4 +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 16 "/usr/include/_G_config.h" 2 3 4 + + + + +# 1 "/usr/include/wchar.h" 1 3 4 +# 83 "/usr/include/wchar.h" 3 4 +typedef struct +{ + int __count; + union + { + + unsigned int __wch; + + + + char __wchb[4]; + } __value; +} __mbstate_t; +# 21 "/usr/include/_G_config.h" 2 3 4 + +typedef struct +{ + __off_t __pos; + __mbstate_t __state; +} _G_fpos_t; +typedef struct +{ + __off64_t __pos; + __mbstate_t __state; +} _G_fpos64_t; +# 53 "/usr/include/_G_config.h" 3 4 +typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); +typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); +# 33 "/usr/include/libio.h" 2 3 4 +# 53 "/usr/include/libio.h" 3 4 +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stdarg.h" 1 3 4 +# 40 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stdarg.h" 3 4 +typedef __builtin_va_list __gnuc_va_list; +# 54 "/usr/include/libio.h" 2 3 4 +# 170 "/usr/include/libio.h" 3 4 +struct _IO_jump_t; struct _IO_FILE; +# 180 "/usr/include/libio.h" 3 4 +typedef void _IO_lock_t; + + + + + +struct _IO_marker { + struct _IO_marker *_next; + struct _IO_FILE *_sbuf; + + + + int _pos; +# 203 "/usr/include/libio.h" 3 4 +}; + + +enum __codecvt_result +{ + __codecvt_ok, + __codecvt_partial, + __codecvt_error, + __codecvt_noconv +}; +# 271 "/usr/include/libio.h" 3 4 +struct _IO_FILE { + int _flags; + + + + + char* _IO_read_ptr; + char* _IO_read_end; + char* _IO_read_base; + char* _IO_write_base; + char* _IO_write_ptr; + char* _IO_write_end; + char* _IO_buf_base; + char* _IO_buf_end; + + char *_IO_save_base; + char *_IO_backup_base; + char *_IO_save_end; + + struct _IO_marker *_markers; + + struct _IO_FILE *_chain; + + int _fileno; + + + + int _flags2; + + __off_t _old_offset; + + + + unsigned short _cur_column; + signed char _vtable_offset; + char _shortbuf[1]; + + + + _IO_lock_t *_lock; +# 319 "/usr/include/libio.h" 3 4 + __off64_t _offset; +# 328 "/usr/include/libio.h" 3 4 + void *__pad1; + void *__pad2; + void *__pad3; + void *__pad4; + size_t __pad5; + + int _mode; + + char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; + +}; + + +typedef struct _IO_FILE _IO_FILE; + + +struct _IO_FILE_plus; + +extern struct _IO_FILE_plus _IO_2_1_stdin_; +extern struct _IO_FILE_plus _IO_2_1_stdout_; +extern struct _IO_FILE_plus _IO_2_1_stderr_; +# 364 "/usr/include/libio.h" 3 4 +typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); + + + + + + + +typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, + size_t __n); + + + + + + + +typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); + + +typedef int __io_close_fn (void *__cookie); + + + + +typedef __io_read_fn cookie_read_function_t; +typedef __io_write_fn cookie_write_function_t; +typedef __io_seek_fn cookie_seek_function_t; +typedef __io_close_fn cookie_close_function_t; + + +typedef struct +{ + __io_read_fn *read; + __io_write_fn *write; + __io_seek_fn *seek; + __io_close_fn *close; +} _IO_cookie_io_functions_t; +typedef _IO_cookie_io_functions_t cookie_io_functions_t; + +struct _IO_cookie_file; + + +extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, + void *__cookie, _IO_cookie_io_functions_t __fns); + + + + + + + +extern int __underflow (_IO_FILE *); +extern int __uflow (_IO_FILE *); +extern int __overflow (_IO_FILE *, int); +# 460 "/usr/include/libio.h" 3 4 +extern int _IO_getc (_IO_FILE *__fp); +extern int _IO_putc (int __c, _IO_FILE *__fp); +extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__)); +extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__)); + +extern int _IO_peekc_locked (_IO_FILE *__fp); + + + + + +extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__)); +extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__)); +extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__)); +# 490 "/usr/include/libio.h" 3 4 +extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, + __gnuc_va_list, int *__restrict); +extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, + __gnuc_va_list); +extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); +extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); + +extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); +extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); + +extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__)); +# 76 "/usr/include/stdio.h" 2 3 4 + + + + +typedef __gnuc_va_list va_list; +# 89 "/usr/include/stdio.h" 3 4 + + +typedef _G_fpos_t fpos_t; + + + + + +typedef _G_fpos64_t fpos64_t; +# 141 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/bits/stdio_lim.h" 1 3 4 +# 142 "/usr/include/stdio.h" 2 3 4 + + + +extern struct _IO_FILE *stdin; +extern struct _IO_FILE *stdout; +extern struct _IO_FILE *stderr; + + + + + + + +extern int remove (__const char *__filename) __attribute__ ((__nothrow__)); + +extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__)); + + + + +extern int renameat (int __oldfd, __const char *__old, int __newfd, + __const char *__new) __attribute__ ((__nothrow__)); + + + + + + + + +extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__)); +# 182 "/usr/include/stdio.h" 3 4 +extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__)); + + + +extern char *tmpnam (char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + + +extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +# 204 "/usr/include/stdio.h" 3 4 +extern char *tempnam (__const char *__dir, __const char *__pfx) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fclose (FILE *__stream); + + + + +extern int fflush (FILE *__stream); + +# 229 "/usr/include/stdio.h" 3 4 +extern int fflush_unlocked (FILE *__stream); +# 239 "/usr/include/stdio.h" 3 4 +extern int fcloseall (void); + + + + + + + + + +extern FILE *fopen (__const char *__restrict __filename, + __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *freopen (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +# 272 "/usr/include/stdio.h" 3 4 + + +extern FILE *fopen64 (__const char *__restrict __filename, + __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); +extern FILE *freopen64 (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + + +extern FILE *fopencookie (void *__restrict __magic_cookie, + __const char *__restrict __modes, + _IO_cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) + __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + + + +extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__)); + + + +extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, + int __modes, size_t __n) __attribute__ ((__nothrow__)); + + + + + +extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, + size_t __size) __attribute__ ((__nothrow__)); + + +extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__)); + + + + + + + + +extern int fprintf (FILE *__restrict __stream, + __const char *__restrict __format, ...); + + + + +extern int printf (__const char *__restrict __format, ...); + +extern int sprintf (char *__restrict __s, + __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); + + + + + +extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg); + + + + +extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); + +extern int vsprintf (char *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) __attribute__ ((__nothrow__)); + + + + + +extern int snprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); + +extern int vsnprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); + + + + + + +extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, + __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__)); +extern int __asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +extern int asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +# 394 "/usr/include/stdio.h" 3 4 +extern int vdprintf (int __fd, __const char *__restrict __fmt, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 2, 0))); +extern int dprintf (int __fd, __const char *__restrict __fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); + + + + + + + + +extern int fscanf (FILE *__restrict __stream, + __const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); + + + + +extern int scanf (__const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); + +extern int sscanf (__const char *__restrict __s, + __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); +# 445 "/usr/include/stdio.h" 3 4 + + + + + + + + +extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); + + +extern int vsscanf (__const char *__restrict __s, + __const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__scanf__, 2, 0))); +# 504 "/usr/include/stdio.h" 3 4 + + + + + + + + + +extern int fgetc (FILE *__stream); +extern int getc (FILE *__stream); + + + + + +extern int getchar (void); + +# 532 "/usr/include/stdio.h" 3 4 +extern int getc_unlocked (FILE *__stream); +extern int getchar_unlocked (void); +# 543 "/usr/include/stdio.h" 3 4 +extern int fgetc_unlocked (FILE *__stream); + + + + + + + + + + + +extern int fputc (int __c, FILE *__stream); +extern int putc (int __c, FILE *__stream); + + + + + +extern int putchar (int __c); + +# 576 "/usr/include/stdio.h" 3 4 +extern int fputc_unlocked (int __c, FILE *__stream); + + + + + + + +extern int putc_unlocked (int __c, FILE *__stream); +extern int putchar_unlocked (int __c); + + + + + + +extern int getw (FILE *__stream); + + +extern int putw (int __w, FILE *__stream); + + + + + + + + +extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) + __attribute__ ((__warn_unused_result__)); + + + + + + +extern char *gets (char *__s) __attribute__ ((__warn_unused_result__)); + +# 622 "/usr/include/stdio.h" 3 4 +extern char *fgets_unlocked (char *__restrict __s, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +# 638 "/usr/include/stdio.h" 3 4 +extern __ssize_t __getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern __ssize_t getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern __ssize_t getline (char **__restrict __lineptr, + size_t *__restrict __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); + + + + + +extern int puts (__const char *__s); + + + + + + +extern int ungetc (int __c, FILE *__stream); + + + + + + +extern size_t fread (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + +extern size_t fwrite (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __s) __attribute__ ((__warn_unused_result__)); + +# 699 "/usr/include/stdio.h" 3 4 +extern int fputs_unlocked (__const char *__restrict __s, + FILE *__restrict __stream); +# 710 "/usr/include/stdio.h" 3 4 +extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fseek (FILE *__stream, long int __off, int __whence); + + + + +extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)); + + + + +extern void rewind (FILE *__stream); + +# 746 "/usr/include/stdio.h" 3 4 +extern int fseeko (FILE *__stream, __off_t __off, int __whence); + + + + +extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__)); +# 765 "/usr/include/stdio.h" 3 4 + + + + + + +extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); + + + + +extern int fsetpos (FILE *__stream, __const fpos_t *__pos); +# 788 "/usr/include/stdio.h" 3 4 + + + +extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); +extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__)); +extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); +extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); + + + + +extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__)); + +extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + +extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + +extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__)); +extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern void perror (__const char *__s); + + + + + + +# 1 "/usr/include/bits/sys_errlist.h" 1 3 4 +# 27 "/usr/include/bits/sys_errlist.h" 3 4 +extern int sys_nerr; +extern __const char *__const sys_errlist[]; + + +extern int _sys_nerr; +extern __const char *__const _sys_errlist[]; +# 827 "/usr/include/stdio.h" 2 3 4 + + + + +extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + +extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +# 846 "/usr/include/stdio.h" 3 4 +extern FILE *popen (__const char *__command, __const char *__modes) __attribute__ ((__warn_unused_result__)); + + + + + +extern int pclose (FILE *__stream); + + + + + +extern char *ctermid (char *__s) __attribute__ ((__nothrow__)); + + + + + +extern char *cuserid (char *__s); + + + + +struct obstack; + + +extern int obstack_printf (struct obstack *__restrict __obstack, + __const char *__restrict __format, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))); +extern int obstack_vprintf (struct obstack *__restrict __obstack, + __const char *__restrict __format, + __gnuc_va_list __args) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))); + + + + + + + +extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__)); + + + +extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + +extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__)); +# 907 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/bits/stdio.h" 1 3 4 +# 44 "/usr/include/bits/stdio.h" 3 4 +extern __inline int +getchar (void) +{ + return _IO_getc (stdin); +} + + + + +extern __inline int +fgetc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} + + + + + +extern __inline int +getc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} + + +extern __inline int +getchar_unlocked (void) +{ + return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); +} + + + + +extern __inline int +putchar (int __c) +{ + return _IO_putc (__c, stdout); +} + + + + +extern __inline int +fputc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} + + + + + +extern __inline int +putc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} + + +extern __inline int +putchar_unlocked (int __c) +{ + return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); +} + + + + + +extern __inline __ssize_t +getline (char **__lineptr, size_t *__n, FILE *__stream) +{ + return __getdelim (__lineptr, __n, '\n', __stream); +} + + + + + +extern __inline int +__attribute__ ((__nothrow__)) feof_unlocked (FILE *__stream) +{ + return (((__stream)->_flags & 0x10) != 0); +} + + +extern __inline int +__attribute__ ((__nothrow__)) ferror_unlocked (FILE *__stream) +{ + return (((__stream)->_flags & 0x20) != 0); +} +# 908 "/usr/include/stdio.h" 2 3 4 + + +# 1 "/usr/include/bits/stdio2.h" 1 3 4 +# 24 "/usr/include/bits/stdio2.h" 3 4 +extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, + __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); +extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, + __const char *__restrict __format, + __gnuc_va_list __ap) __attribute__ ((__nothrow__)); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__nothrow__)) sprintf (char *__restrict __s, __const char *__restrict __fmt, ...) +{ + return __builtin___sprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__nothrow__)) vsprintf (char *__restrict __s, __const char *__restrict __fmt, __gnuc_va_list __ap) + +{ + return __builtin___vsprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} + + + +extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, __const char *__restrict __format, + ...) __attribute__ ((__nothrow__)); +extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, __const char *__restrict __format, + __gnuc_va_list __ap) __attribute__ ((__nothrow__)); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__nothrow__)) snprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, ...) + +{ + return __builtin___snprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__nothrow__)) vsnprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, __gnuc_va_list __ap) + +{ + return __builtin___vsnprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} + + + + + +extern int __fprintf_chk (FILE *__restrict __stream, int __flag, + __const char *__restrict __format, ...); +extern int __printf_chk (int __flag, __const char *__restrict __format, ...); +extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, + __const char *__restrict __format, __gnuc_va_list __ap); +extern int __vprintf_chk (int __flag, __const char *__restrict __format, + __gnuc_va_list __ap); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +fprintf (FILE *__restrict __stream, __const char *__restrict __fmt, ...) +{ + return __fprintf_chk (__stream, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +printf (__const char *__restrict __fmt, ...) +{ + return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); +} + + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +vprintf (__const char *__restrict __fmt, __gnuc_va_list __ap) +{ + + return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap); + + + +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +vfprintf (FILE *__restrict __stream, + __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap); +} + + + +extern int __asprintf_chk (char **__restrict __ptr, int __flag, + __const char *__restrict __fmt, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__)); +extern int __vasprintf_chk (char **__restrict __ptr, int __flag, + __const char *__restrict __fmt, __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__)); +extern int __dprintf_chk (int __fd, int __flag, __const char *__restrict __fmt, + ...) __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __vdprintf_chk (int __fd, int __flag, + __const char *__restrict __fmt, __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 3, 0))); +extern int __obstack_printf_chk (struct obstack *__restrict __obstack, + int __flag, __const char *__restrict __format, + ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack, + int __flag, + __const char *__restrict __format, + __gnuc_va_list __args) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__nothrow__)) asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__nothrow__)) __asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) + +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +dprintf (int __fd, __const char *__restrict __fmt, ...) +{ + return __dprintf_chk (__fd, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__nothrow__)) obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, ...) + +{ + return __obstack_printf_chk (__obstack, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +# 195 "/usr/include/bits/stdio2.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__nothrow__)) vasprintf (char **__restrict __ptr, __const char *__restrict __fmt, __gnuc_va_list __ap) + +{ + return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__nothrow__)) obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, __gnuc_va_list __ap) + +{ + return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt, + __ap); +} + + + + + +extern char *__gets_chk (char *__str, size_t) __attribute__ ((__warn_unused_result__)); +extern char *__gets_warn (char *__str) __asm__ ("" "gets") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use fgets or getline instead, gets can't " "specify buffer size"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * +gets (char *__str) +{ + if (__builtin_object_size (__str, 2 > 1) != (size_t) -1) + return __gets_chk (__str, __builtin_object_size (__str, 2 > 1)); + return __gets_warn (__str); +} + +extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") + + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_alias (__s, __n, __stream); +} + +extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") + + + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk") + + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + } + return __fread_alias (__ptr, __size, __n, __stream); +} + + +extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size, + int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked") + + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_unlocked_alias (__s, __n, __stream); +} + + + + +extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") + + + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk") + + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + } + + + if (__builtin_constant_p (__size) + && __builtin_constant_p (__n) + && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) + && __size * __n <= 8) + { + size_t __cnt = __size * __n; + char *__cptr = (char *) __ptr; + if (__cnt == 0) + return 0; + + for (; __cnt > 0; --__cnt) + { + int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++); + if (__c == (-1)) + break; + *__cptr++ = __c; + } + return (__cptr - (char *) __ptr) / __size; + } + + return __fread_unlocked_alias (__ptr, __size, __n, __stream); +} +# 911 "/usr/include/stdio.h" 2 3 4 + + + + + + +# 19 "scenarios.c" 2 +# 1 "/usr/include/stdlib.h" 1 3 4 +# 33 "/usr/include/stdlib.h" 3 4 +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 323 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stddef.h" 3 4 +typedef long int wchar_t; +# 34 "/usr/include/stdlib.h" 2 3 4 + + + + + + + + +# 1 "/usr/include/bits/waitflags.h" 1 3 4 +# 43 "/usr/include/stdlib.h" 2 3 4 +# 1 "/usr/include/bits/waitstatus.h" 1 3 4 +# 65 "/usr/include/bits/waitstatus.h" 3 4 +# 1 "/usr/include/endian.h" 1 3 4 +# 37 "/usr/include/endian.h" 3 4 +# 1 "/usr/include/bits/endian.h" 1 3 4 +# 38 "/usr/include/endian.h" 2 3 4 +# 61 "/usr/include/endian.h" 3 4 +# 1 "/usr/include/bits/byteswap.h" 1 3 4 +# 62 "/usr/include/endian.h" 2 3 4 +# 66 "/usr/include/bits/waitstatus.h" 2 3 4 + +union wait + { + int w_status; + struct + { + + unsigned int __w_termsig:7; + unsigned int __w_coredump:1; + unsigned int __w_retcode:8; + unsigned int:16; + + + + + + + + } __wait_terminated; + struct + { + + unsigned int __w_stopval:8; + unsigned int __w_stopsig:8; + unsigned int:16; + + + + + + + } __wait_stopped; + }; +# 44 "/usr/include/stdlib.h" 2 3 4 +# 68 "/usr/include/stdlib.h" 3 4 +typedef union + { + union wait *__uptr; + int *__iptr; + } __WAIT_STATUS __attribute__ ((__transparent_union__)); +# 96 "/usr/include/stdlib.h" 3 4 + + +typedef struct + { + int quot; + int rem; + } div_t; + + + +typedef struct + { + long int quot; + long int rem; + } ldiv_t; + + + + + + + +__extension__ typedef struct + { + long long int quot; + long long int rem; + } lldiv_t; + + +# 140 "/usr/include/stdlib.h" 3 4 +extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + +extern double atof (__const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern int atoi (__const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern long int atol (__const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +__extension__ extern long long int atoll (__const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern double strtod (__const char *__restrict __nptr, + char **__restrict __endptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern float strtof (__const char *__restrict __nptr, + char **__restrict __endptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern long double strtold (__const char *__restrict __nptr, + char **__restrict __endptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern long int strtol (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern unsigned long int strtoul (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +__extension__ +extern long long int strtoq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtouq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +__extension__ +extern long long int strtoll (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtoull (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +# 236 "/usr/include/stdlib.h" 3 4 +# 1 "/usr/include/xlocale.h" 1 3 4 +# 28 "/usr/include/xlocale.h" 3 4 +typedef struct __locale_struct +{ + + struct locale_data *__locales[13]; + + + const unsigned short int *__ctype_b; + const int *__ctype_tolower; + const int *__ctype_toupper; + + + const char *__names[13]; +} *__locale_t; + + +typedef __locale_t locale_t; +# 237 "/usr/include/stdlib.h" 2 3 4 + + + +extern long int strtol_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +extern unsigned long int strtoul_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern long long int strtoll_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtoull_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +extern double strtod_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + +extern float strtof_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + +extern long double strtold_l (__const char *__restrict __nptr, + char **__restrict __endptr, + __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + + + + + +extern __inline double +__attribute__ ((__nothrow__)) atof (__const char *__nptr) +{ + return strtod (__nptr, (char **) ((void *)0)); +} +extern __inline int +__attribute__ ((__nothrow__)) atoi (__const char *__nptr) +{ + return (int) strtol (__nptr, (char **) ((void *)0), 10); +} +extern __inline long int +__attribute__ ((__nothrow__)) atol (__const char *__nptr) +{ + return strtol (__nptr, (char **) ((void *)0), 10); +} + + + + +__extension__ extern __inline long long int +__attribute__ ((__nothrow__)) atoll (__const char *__nptr) +{ + return strtoll (__nptr, (char **) ((void *)0), 10); +} + +# 311 "/usr/include/stdlib.h" 3 4 +extern char *l64a (long int __n) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + +extern long int a64l (__const char *__s) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +# 1 "/usr/include/sys/types.h" 1 3 4 +# 29 "/usr/include/sys/types.h" 3 4 + + + + + + +typedef __u_char u_char; +typedef __u_short u_short; +typedef __u_int u_int; +typedef __u_long u_long; +typedef __quad_t quad_t; +typedef __u_quad_t u_quad_t; +typedef __fsid_t fsid_t; + + + + +typedef __loff_t loff_t; + + + +typedef __ino_t ino_t; + + + + + + +typedef __ino64_t ino64_t; + + + + +typedef __dev_t dev_t; + + + + +typedef __gid_t gid_t; + + + + +typedef __mode_t mode_t; + + + + +typedef __nlink_t nlink_t; + + + + +typedef __uid_t uid_t; + + + + + +typedef __off_t off_t; + + + + + + +typedef __off64_t off64_t; + + + + +typedef __pid_t pid_t; + + + + +typedef __id_t id_t; + + + + +typedef __ssize_t ssize_t; + + + + + +typedef __daddr_t daddr_t; +typedef __caddr_t caddr_t; + + + + + +typedef __key_t key_t; +# 133 "/usr/include/sys/types.h" 3 4 +# 1 "/usr/include/time.h" 1 3 4 +# 58 "/usr/include/time.h" 3 4 + + +typedef __clock_t clock_t; + + + +# 74 "/usr/include/time.h" 3 4 + + +typedef __time_t time_t; + + + +# 92 "/usr/include/time.h" 3 4 +typedef __clockid_t clockid_t; +# 104 "/usr/include/time.h" 3 4 +typedef __timer_t timer_t; +# 134 "/usr/include/sys/types.h" 2 3 4 + + + +typedef __useconds_t useconds_t; + + + +typedef __suseconds_t suseconds_t; + + + + + +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 148 "/usr/include/sys/types.h" 2 3 4 + + + +typedef unsigned long int ulong; +typedef unsigned short int ushort; +typedef unsigned int uint; +# 195 "/usr/include/sys/types.h" 3 4 +typedef int int8_t __attribute__ ((__mode__ (__QI__))); +typedef int int16_t __attribute__ ((__mode__ (__HI__))); +typedef int int32_t __attribute__ ((__mode__ (__SI__))); +typedef int int64_t __attribute__ ((__mode__ (__DI__))); + + +typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); +typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); + +typedef int register_t __attribute__ ((__mode__ (__word__))); +# 220 "/usr/include/sys/types.h" 3 4 +# 1 "/usr/include/sys/select.h" 1 3 4 +# 31 "/usr/include/sys/select.h" 3 4 +# 1 "/usr/include/bits/select.h" 1 3 4 +# 32 "/usr/include/sys/select.h" 2 3 4 + + +# 1 "/usr/include/bits/sigset.h" 1 3 4 +# 24 "/usr/include/bits/sigset.h" 3 4 +typedef int __sig_atomic_t; + + + + +typedef struct + { + unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; + } __sigset_t; +# 35 "/usr/include/sys/select.h" 2 3 4 + + + +typedef __sigset_t sigset_t; + + + + + +# 1 "/usr/include/time.h" 1 3 4 +# 120 "/usr/include/time.h" 3 4 +struct timespec + { + __time_t tv_sec; + long int tv_nsec; + }; +# 45 "/usr/include/sys/select.h" 2 3 4 + +# 1 "/usr/include/bits/time.h" 1 3 4 +# 69 "/usr/include/bits/time.h" 3 4 +struct timeval + { + __time_t tv_sec; + __suseconds_t tv_usec; + }; +# 47 "/usr/include/sys/select.h" 2 3 4 +# 55 "/usr/include/sys/select.h" 3 4 +typedef long int __fd_mask; +# 67 "/usr/include/sys/select.h" 3 4 +typedef struct + { + + + + __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; + + + + + + } fd_set; + + + + + + +typedef __fd_mask fd_mask; +# 99 "/usr/include/sys/select.h" 3 4 + +# 109 "/usr/include/sys/select.h" 3 4 +extern int select (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + struct timeval *__restrict __timeout); +# 121 "/usr/include/sys/select.h" 3 4 +extern int pselect (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + const struct timespec *__restrict __timeout, + const __sigset_t *__restrict __sigmask); + + + +# 221 "/usr/include/sys/types.h" 2 3 4 + + +# 1 "/usr/include/sys/sysmacros.h" 1 3 4 +# 30 "/usr/include/sys/sysmacros.h" 3 4 +__extension__ +extern unsigned int gnu_dev_major (unsigned long long int __dev) + __attribute__ ((__nothrow__)); +__extension__ +extern unsigned int gnu_dev_minor (unsigned long long int __dev) + __attribute__ ((__nothrow__)); +__extension__ +extern unsigned long long int gnu_dev_makedev (unsigned int __major, + unsigned int __minor) + __attribute__ ((__nothrow__)); + + +__extension__ extern __inline unsigned int +__attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev) +{ + return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); +} + +__extension__ extern __inline unsigned int +__attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev) +{ + return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); +} + +__extension__ extern __inline unsigned long long int +__attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor) +{ + return ((__minor & 0xff) | ((__major & 0xfff) << 8) + | (((unsigned long long int) (__minor & ~0xff)) << 12) + | (((unsigned long long int) (__major & ~0xfff)) << 32)); +} +# 224 "/usr/include/sys/types.h" 2 3 4 + + + + +typedef __blksize_t blksize_t; + + + + + + +typedef __blkcnt_t blkcnt_t; + + + +typedef __fsblkcnt_t fsblkcnt_t; + + + +typedef __fsfilcnt_t fsfilcnt_t; +# 262 "/usr/include/sys/types.h" 3 4 +typedef __blkcnt64_t blkcnt64_t; +typedef __fsblkcnt64_t fsblkcnt64_t; +typedef __fsfilcnt64_t fsfilcnt64_t; + + + + + +# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 +# 36 "/usr/include/bits/pthreadtypes.h" 3 4 +typedef unsigned long int pthread_t; + + +typedef union +{ + char __size[36]; + long int __align; +} pthread_attr_t; + + +typedef struct __pthread_internal_slist +{ + struct __pthread_internal_slist *__next; +} __pthread_slist_t; + + + + +typedef union +{ + struct __pthread_mutex_s + { + int __lock; + unsigned int __count; + int __owner; + + + int __kind; + unsigned int __nusers; + __extension__ union + { + int __spins; + __pthread_slist_t __list; + }; + } __data; + char __size[24]; + long int __align; +} pthread_mutex_t; + +typedef union +{ + char __size[4]; + long int __align; +} pthread_mutexattr_t; + + + + +typedef union +{ + struct + { + int __lock; + unsigned int __futex; + __extension__ unsigned long long int __total_seq; + __extension__ unsigned long long int __wakeup_seq; + __extension__ unsigned long long int __woken_seq; + void *__mutex; + unsigned int __nwaiters; + unsigned int __broadcast_seq; + } __data; + char __size[48]; + __extension__ long long int __align; +} pthread_cond_t; + +typedef union +{ + char __size[4]; + long int __align; +} pthread_condattr_t; + + + +typedef unsigned int pthread_key_t; + + + +typedef int pthread_once_t; + + + + + +typedef union +{ + struct + { + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + + + unsigned char __flags; + unsigned char __shared; + unsigned char __pad1; + unsigned char __pad2; + int __writer; + } __data; + char __size[32]; + long int __align; +} pthread_rwlock_t; + +typedef union +{ + char __size[8]; + long int __align; +} pthread_rwlockattr_t; + + + + + +typedef volatile int pthread_spinlock_t; + + + + +typedef union +{ + char __size[20]; + long int __align; +} pthread_barrier_t; + +typedef union +{ + char __size[4]; + int __align; +} pthread_barrierattr_t; +# 271 "/usr/include/sys/types.h" 2 3 4 + + + +# 321 "/usr/include/stdlib.h" 2 3 4 + + + + + + +extern long int random (void) __attribute__ ((__nothrow__)); + + +extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__)); + + + + + +extern char *initstate (unsigned int __seed, char *__statebuf, + size_t __statelen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + +extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + + +struct random_data + { + int32_t *fptr; + int32_t *rptr; + int32_t *state; + int rand_type; + int rand_deg; + int rand_sep; + int32_t *end_ptr; + }; + +extern int random_r (struct random_data *__restrict __buf, + int32_t *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int srandom_r (unsigned int __seed, struct random_data *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + +extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, + size_t __statelen, + struct random_data *__restrict __buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); + +extern int setstate_r (char *__restrict __statebuf, + struct random_data *__restrict __buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern int rand (void) __attribute__ ((__nothrow__)); + +extern void srand (unsigned int __seed) __attribute__ ((__nothrow__)); + + + + +extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__)); + + + + + + + +extern double drand48 (void) __attribute__ ((__nothrow__)); +extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern long int lrand48 (void) __attribute__ ((__nothrow__)); +extern long int nrand48 (unsigned short int __xsubi[3]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern long int mrand48 (void) __attribute__ ((__nothrow__)); +extern long int jrand48 (unsigned short int __xsubi[3]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern void srand48 (long int __seedval) __attribute__ ((__nothrow__)); +extern unsigned short int *seed48 (unsigned short int __seed16v[3]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +struct drand48_data + { + unsigned short int __x[3]; + unsigned short int __old_x[3]; + unsigned short int __c; + unsigned short int __init; + unsigned long long int __a; + }; + + +extern int drand48_r (struct drand48_data *__restrict __buffer, + double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int erand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int lrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int nrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int mrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int jrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int srand48_r (long int __seedval, struct drand48_data *__buffer) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + +extern int seed48_r (unsigned short int __seed16v[3], + struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int lcong48_r (unsigned short int __param[7], + struct drand48_data *__buffer) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + + + + +extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + +extern void *calloc (size_t __nmemb, size_t __size) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + + + + + + + +extern void *realloc (void *__ptr, size_t __size) + __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + +extern void free (void *__ptr) __attribute__ ((__nothrow__)); + + + + +extern void cfree (void *__ptr) __attribute__ ((__nothrow__)); + + + +# 1 "/usr/include/alloca.h" 1 3 4 +# 25 "/usr/include/alloca.h" 3 4 +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 26 "/usr/include/alloca.h" 2 3 4 + + + + + + + +extern void *alloca (size_t __size) __attribute__ ((__nothrow__)); + + + + + + +# 498 "/usr/include/stdlib.h" 2 3 4 + + + + +extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + +extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +extern void abort (void) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + +extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +# 527 "/usr/include/stdlib.h" 3 4 +extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern void exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + + + + + +extern void quick_exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + + + + + +extern void _Exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + + + + +extern char *getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *__secure_getenv (__const char *__name) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int putenv (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int setenv (__const char *__name, __const char *__value, int __replace) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + +extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__)); + + + + + + +extern int clearenv (void) __attribute__ ((__nothrow__)); +# 604 "/usr/include/stdlib.h" 3 4 +extern char *mktemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 615 "/usr/include/stdlib.h" 3 4 +extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 625 "/usr/include/stdlib.h" 3 4 +extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 637 "/usr/include/stdlib.h" 3 4 +extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 647 "/usr/include/stdlib.h" 3 4 +extern int mkstemps64 (char *__template, int __suffixlen) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 658 "/usr/include/stdlib.h" 3 4 +extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 669 "/usr/include/stdlib.h" 3 4 +extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 679 "/usr/include/stdlib.h" 3 4 +extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 689 "/usr/include/stdlib.h" 3 4 +extern int mkostemps (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 701 "/usr/include/stdlib.h" 3 4 +extern int mkostemps64 (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + + + + + +extern int system (__const char *__command) __attribute__ ((__warn_unused_result__)); + + + + + + +extern char *canonicalize_file_name (__const char *__name) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 729 "/usr/include/stdlib.h" 3 4 +extern char *realpath (__const char *__restrict __name, + char *__restrict __resolved) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + + + +typedef int (*__compar_fn_t) (__const void *, __const void *); + + +typedef __compar_fn_t comparison_fn_t; + + + +typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *); + + + + + +extern void *bsearch (__const void *__key, __const void *__base, + size_t __nmemb, size_t __size, __compar_fn_t __compar) + __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__)); + + + +extern void qsort (void *__base, size_t __nmemb, size_t __size, + __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); + +extern void qsort_r (void *__base, size_t __nmemb, size_t __size, + __compar_d_fn_t __compar, void *__arg) + __attribute__ ((__nonnull__ (1, 4))); + + + + +extern int abs (int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern long int labs (long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + +__extension__ extern long long int llabs (long long int __x) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern div_t div (int __numer, int __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern ldiv_t ldiv (long int __numer, long int __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + + +__extension__ extern lldiv_t lldiv (long long int __numer, + long long int __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + +# 802 "/usr/include/stdlib.h" 3 4 +extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *gcvt (double __value, int __ndigit, char *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *qecvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qfcvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qgcvt (long double __value, int __ndigit, char *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); + + + + +extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); +extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); + +extern int qecvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); +extern int qfcvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); + + + + + + + +extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + +extern int mbtowc (wchar_t *__restrict __pwc, + __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + +extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + +extern size_t mbstowcs (wchar_t *__restrict __pwcs, + __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)); + +extern size_t wcstombs (char *__restrict __s, + __const wchar_t *__restrict __pwcs, size_t __n) + __attribute__ ((__nothrow__)); + + + + + + + + +extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 890 "/usr/include/stdlib.h" 3 4 +extern int getsubopt (char **__restrict __optionp, + char *__const *__restrict __tokens, + char **__restrict __valuep) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__)); + + + + + +extern void setkey (__const char *__key) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern int grantpt (int __fd) __attribute__ ((__nothrow__)); + + + +extern int unlockpt (int __fd) __attribute__ ((__nothrow__)); + + + + +extern char *ptsname (int __fd) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + + + +extern int ptsname_r (int __fd, char *__buf, size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + +extern int getpt (void); + + + + + + +extern int getloadavg (double __loadavg[], int __nelem) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +# 1 "/usr/include/bits/stdlib.h" 1 3 4 +# 24 "/usr/include/bits/stdlib.h" 3 4 +extern char *__realpath_chk (__const char *__restrict __name, + char *__restrict __resolved, + size_t __resolvedlen) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern char *__realpath_alias (__const char *__restrict __name, char *__restrict __resolved) __asm__ ("" "realpath") __attribute__ ((__nothrow__)) + + __attribute__ ((__warn_unused_result__)); +extern char *__realpath_chk_warn (__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __asm__ ("" "__realpath_chk") __attribute__ ((__nothrow__)) + + + __attribute__ ((__warn_unused_result__)) + __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * +__attribute__ ((__nothrow__)) realpath (__const char *__restrict __name, char *__restrict __resolved) +{ + if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1) + { + + + + + return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); + } + + return __realpath_alias (__name, __resolved); +} + + +extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, + size_t __nreal) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ptsname_r") __attribute__ ((__nothrow__)) + + __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nothrow__)) + + + __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__nothrow__)) ptsname_r (int __fd, char *__buf, size_t __buflen) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __ptsname_r_alias (__fd, __buf, __buflen); +} + + +extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int __wctomb_alias (char *__s, wchar_t __wchar) __asm__ ("" "wctomb") __attribute__ ((__nothrow__)) + __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) int +__attribute__ ((__nothrow__)) wctomb (char *__s, wchar_t __wchar) +{ + + + + + + + + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) + return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1)); + return __wctomb_alias (__s, __wchar); +} + + +extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, + __const char *__restrict __src, + size_t __len, size_t __dstlen) __attribute__ ((__nothrow__)); +extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__)) + + + ; +extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__mbstowcs_chk") __attribute__ ((__nothrow__)) + + + + __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) size_t +__attribute__ ((__nothrow__)) mbstowcs (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __mbstowcs_chk (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + + if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) + return __mbstowcs_chk_warn (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + } + return __mbstowcs_alias (__dst, __src, __len); +} + + +extern size_t __wcstombs_chk (char *__restrict __dst, + __const wchar_t *__restrict __src, + size_t __len, size_t __dstlen) __attribute__ ((__nothrow__)); +extern size_t __wcstombs_alias (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) __asm__ ("" "wcstombs") __attribute__ ((__nothrow__)) + + + ; +extern size_t __wcstombs_chk_warn (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__wcstombs_chk") __attribute__ ((__nothrow__)) + + + + __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len"))); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) size_t +__attribute__ ((__nothrow__)) wcstombs (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + if (__len > __builtin_object_size (__dst, 2 > 1)) + return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + } + return __wcstombs_alias (__dst, __src, __len); +} +# 950 "/usr/include/stdlib.h" 2 3 4 +# 958 "/usr/include/stdlib.h" 3 4 + +# 20 "scenarios.c" 2 +# 1 "/usr/include/string.h" 1 3 4 +# 28 "/usr/include/string.h" 3 4 + + + + + +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 34 "/usr/include/string.h" 2 3 4 + + + + + + + + + +extern void *memcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern void *memmove (void *__dest, __const void *__src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, + int __c, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 94 "/usr/include/string.h" 3 4 +extern void *memchr (__const void *__s, int __c, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +# 108 "/usr/include/string.h" 3 4 +extern void *rawmemchr (__const void *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +# 119 "/usr/include/string.h" 3 4 +extern void *memrchr (__const void *__s, int __c, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + +extern char *strncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern char *strcat (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + +extern char *strncat (char *__restrict __dest, __const char *__restrict __src, + size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strcmp (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strcoll (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern size_t strxfrm (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + +# 164 "/usr/include/string.h" 3 4 +extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); + +extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, + __locale_t __l) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); + + + + +extern char *strdup (__const char *__s) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern char *strndup (__const char *__string, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); +# 208 "/usr/include/string.h" 3 4 + +# 233 "/usr/include/string.h" 3 4 +extern char *strchr (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +# 260 "/usr/include/string.h" 3 4 +extern char *strrchr (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +# 274 "/usr/include/string.h" 3 4 +extern char *strchrnul (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern size_t strcspn (__const char *__s, __const char *__reject) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern size_t strspn (__const char *__s, __const char *__accept) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 312 "/usr/include/string.h" 3 4 +extern char *strpbrk (__const char *__s, __const char *__accept) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 340 "/usr/include/string.h" 3 4 +extern char *strstr (__const char *__haystack, __const char *__needle) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern char *strtok (char *__restrict __s, __const char *__restrict __delim) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + + +extern char *__strtok_r (char *__restrict __s, + __const char *__restrict __delim, + char **__restrict __save_ptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); + +extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, + char **__restrict __save_ptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); +# 371 "/usr/include/string.h" 3 4 +extern char *strcasestr (__const char *__haystack, __const char *__needle) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + + +extern void *memmem (__const void *__haystack, size_t __haystacklen, + __const void *__needle, size_t __needlelen) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); + + + +extern void *__mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern void *mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern size_t strlen (__const char *__s) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern size_t strnlen (__const char *__string, size_t __maxlen) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern char *strerror (int __errnum) __attribute__ ((__nothrow__)); + +# 436 "/usr/include/string.h" 3 4 +extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + + + +extern char *strerror_l (int __errnum, __locale_t __l) __attribute__ ((__nothrow__)); + + + + + +extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern void bcopy (__const void *__src, void *__dest, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 487 "/usr/include/string.h" 3 4 +extern char *index (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +# 515 "/usr/include/string.h" 3 4 +extern char *rindex (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + +extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + +extern int ffsl (long int __l) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + +__extension__ extern int ffsll (long long int __ll) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + +extern int strcasecmp (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern int strcasecmp_l (__const char *__s1, __const char *__s2, + __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); + +extern int strncasecmp_l (__const char *__s1, __const char *__s2, + size_t __n, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); + + + + + +extern char *strsep (char **__restrict __stringp, + __const char *__restrict __delim) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern char *strsignal (int __sig) __attribute__ ((__nothrow__)); + + +extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern char *__stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int strverscmp (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern char *strfry (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +# 604 "/usr/include/string.h" 3 4 +extern char *basename (__const char *__filename) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +# 632 "/usr/include/string.h" 3 4 +# 1 "/usr/include/bits/string.h" 1 3 4 +# 633 "/usr/include/string.h" 2 3 4 + + +# 1 "/usr/include/bits/string2.h" 1 3 4 +# 394 "/usr/include/bits/string2.h" 3 4 +extern void *__rawmemchr (const void *__s, int __c); +# 969 "/usr/include/bits/string2.h" 3 4 +extern __inline size_t __strcspn_c1 (__const char *__s, int __reject); +extern __inline size_t +__strcspn_c1 (__const char *__s, int __reject) +{ + register size_t __result = 0; + while (__s[__result] != '\0' && __s[__result] != __reject) + ++__result; + return __result; +} + +extern __inline size_t __strcspn_c2 (__const char *__s, int __reject1, + int __reject2); +extern __inline size_t +__strcspn_c2 (__const char *__s, int __reject1, int __reject2) +{ + register size_t __result = 0; + while (__s[__result] != '\0' && __s[__result] != __reject1 + && __s[__result] != __reject2) + ++__result; + return __result; +} + +extern __inline size_t __strcspn_c3 (__const char *__s, int __reject1, + int __reject2, int __reject3); +extern __inline size_t +__strcspn_c3 (__const char *__s, int __reject1, int __reject2, + int __reject3) +{ + register size_t __result = 0; + while (__s[__result] != '\0' && __s[__result] != __reject1 + && __s[__result] != __reject2 && __s[__result] != __reject3) + ++__result; + return __result; +} +# 1045 "/usr/include/bits/string2.h" 3 4 +extern __inline size_t __strspn_c1 (__const char *__s, int __accept); +extern __inline size_t +__strspn_c1 (__const char *__s, int __accept) +{ + register size_t __result = 0; + + while (__s[__result] == __accept) + ++__result; + return __result; +} + +extern __inline size_t __strspn_c2 (__const char *__s, int __accept1, + int __accept2); +extern __inline size_t +__strspn_c2 (__const char *__s, int __accept1, int __accept2) +{ + register size_t __result = 0; + + while (__s[__result] == __accept1 || __s[__result] == __accept2) + ++__result; + return __result; +} + +extern __inline size_t __strspn_c3 (__const char *__s, int __accept1, + int __accept2, int __accept3); +extern __inline size_t +__strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) +{ + register size_t __result = 0; + + while (__s[__result] == __accept1 || __s[__result] == __accept2 + || __s[__result] == __accept3) + ++__result; + return __result; +} +# 1121 "/usr/include/bits/string2.h" 3 4 +extern __inline char *__strpbrk_c2 (__const char *__s, int __accept1, + int __accept2); +extern __inline char * +__strpbrk_c2 (__const char *__s, int __accept1, int __accept2) +{ + + while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) + ++__s; + return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; +} + +extern __inline char *__strpbrk_c3 (__const char *__s, int __accept1, + int __accept2, int __accept3); +extern __inline char * +__strpbrk_c3 (__const char *__s, int __accept1, int __accept2, + int __accept3) +{ + + while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 + && *__s != __accept3) + ++__s; + return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; +} +# 1172 "/usr/include/bits/string2.h" 3 4 +extern __inline char *__strtok_r_1c (char *__s, char __sep, char **__nextp); +extern __inline char * +__strtok_r_1c (char *__s, char __sep, char **__nextp) +{ + char *__result; + if (__s == ((void *)0)) + __s = *__nextp; + while (*__s == __sep) + ++__s; + __result = ((void *)0); + if (*__s != '\0') + { + __result = __s++; + while (*__s != '\0') + if (*__s++ == __sep) + { + __s[-1] = '\0'; + break; + } + } + *__nextp = __s; + return __result; +} +# 1204 "/usr/include/bits/string2.h" 3 4 +extern char *__strsep_g (char **__stringp, __const char *__delim); +# 1222 "/usr/include/bits/string2.h" 3 4 +extern __inline char *__strsep_1c (char **__s, char __reject); +extern __inline char * +__strsep_1c (char **__s, char __reject) +{ + register char *__retval = *__s; + if (__retval != ((void *)0) && (*__s = (__extension__ (__builtin_constant_p (__reject) && !__builtin_constant_p (__retval) && (__reject) == '\0' ? (char *) __rawmemchr (__retval, __reject) : __builtin_strchr (__retval, __reject)))) != ((void *)0)) + *(*__s)++ = '\0'; + return __retval; +} + +extern __inline char *__strsep_2c (char **__s, char __reject1, char __reject2); +extern __inline char * +__strsep_2c (char **__s, char __reject1, char __reject2) +{ + register char *__retval = *__s; + if (__retval != ((void *)0)) + { + register char *__cp = __retval; + while (1) + { + if (*__cp == '\0') + { + __cp = ((void *)0); + break; + } + if (*__cp == __reject1 || *__cp == __reject2) + { + *__cp++ = '\0'; + break; + } + ++__cp; + } + *__s = __cp; + } + return __retval; +} + +extern __inline char *__strsep_3c (char **__s, char __reject1, char __reject2, + char __reject3); +extern __inline char * +__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) +{ + register char *__retval = *__s; + if (__retval != ((void *)0)) + { + register char *__cp = __retval; + while (1) + { + if (*__cp == '\0') + { + __cp = ((void *)0); + break; + } + if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) + { + *__cp++ = '\0'; + break; + } + ++__cp; + } + *__s = __cp; + } + return __retval; +} +# 1303 "/usr/include/bits/string2.h" 3 4 +extern char *__strdup (__const char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); +# 1322 "/usr/include/bits/string2.h" 3 4 +extern char *__strndup (__const char *__string, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); +# 636 "/usr/include/string.h" 2 3 4 + + + + +# 1 "/usr/include/bits/string3.h" 1 3 4 +# 23 "/usr/include/bits/string3.h" 3 4 +extern void __warn_memset_zero_len (void) __attribute__((__warning__ ("memset used with constant zero length parameter; this could be due to transposed parameters"))) + ; +# 48 "/usr/include/bits/string3.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void * +__attribute__ ((__nothrow__)) memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) + +{ + return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void * +__attribute__ ((__nothrow__)) memmove (void *__restrict __dest, __const void *__restrict __src, size_t __len) + +{ + return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void * +__attribute__ ((__nothrow__)) mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) + +{ + return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} +# 77 "/usr/include/bits/string3.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void * +__attribute__ ((__nothrow__)) memset (void *__dest, int __ch, size_t __len) +{ + if (__builtin_constant_p (__len) && __len == 0 + && (!__builtin_constant_p (__ch) || __ch != 0)) + { + __warn_memset_zero_len (); + return __dest; + } + return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void +__attribute__ ((__nothrow__)) bcopy (__const void *__restrict __src, void *__restrict __dest, size_t __len) + +{ + (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void +__attribute__ ((__nothrow__)) bzero (void *__dest, size_t __len) +{ + (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * +__attribute__ ((__nothrow__)) strcpy (char *__restrict __dest, __const char *__restrict __src) +{ + return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * +__attribute__ ((__nothrow__)) stpcpy (char *__restrict __dest, __const char *__restrict __src) +{ + return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * +__attribute__ ((__nothrow__)) strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __len) + +{ + return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); +} + + +extern char *__stpncpy_chk (char *__dest, __const char *__src, size_t __n, + size_t __destlen) __attribute__ ((__nothrow__)); +extern char *__stpncpy_alias (char *__dest, __const char *__src, size_t __n) __asm__ ("" "stpncpy") __attribute__ ((__nothrow__)) + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * +__attribute__ ((__nothrow__)) stpncpy (char *__dest, __const char *__src, size_t __n) +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1 + && (!__builtin_constant_p (__n) || __n <= __builtin_object_size (__dest, 2 > 1))) + return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1)); + return __stpncpy_alias (__dest, __src, __n); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * +__attribute__ ((__nothrow__)) strcat (char *__restrict __dest, __const char *__restrict __src) +{ + return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * +__attribute__ ((__nothrow__)) strncat (char *__restrict __dest, __const char *__restrict __src, size_t __len) + +{ + return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); +} +# 641 "/usr/include/string.h" 2 3 4 + + + + +# 21 "scenarios.c" 2 + +# 1 "/usr/include/sys/stat.h" 1 3 4 +# 39 "/usr/include/sys/stat.h" 3 4 +# 1 "/usr/include/time.h" 1 3 4 +# 40 "/usr/include/sys/stat.h" 2 3 4 +# 105 "/usr/include/sys/stat.h" 3 4 + + +# 1 "/usr/include/bits/stat.h" 1 3 4 +# 36 "/usr/include/bits/stat.h" 3 4 +struct stat + { + __dev_t st_dev; + unsigned short int __pad1; + + __ino_t st_ino; + + + + __mode_t st_mode; + __nlink_t st_nlink; + __uid_t st_uid; + __gid_t st_gid; + __dev_t st_rdev; + unsigned short int __pad2; + + __off_t st_size; + + + + __blksize_t st_blksize; + + + __blkcnt_t st_blocks; +# 70 "/usr/include/bits/stat.h" 3 4 + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; +# 85 "/usr/include/bits/stat.h" 3 4 + unsigned long int __unused4; + unsigned long int __unused5; + + + + }; + + +struct stat64 + { + __dev_t st_dev; + unsigned int __pad1; + + __ino_t __st_ino; + __mode_t st_mode; + __nlink_t st_nlink; + __uid_t st_uid; + __gid_t st_gid; + __dev_t st_rdev; + unsigned int __pad2; + __off64_t st_size; + __blksize_t st_blksize; + + __blkcnt64_t st_blocks; + + + + + + + + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; +# 127 "/usr/include/bits/stat.h" 3 4 + __ino64_t st_ino; + }; +# 108 "/usr/include/sys/stat.h" 2 3 4 +# 209 "/usr/include/sys/stat.h" 3 4 +extern int stat (__const char *__restrict __file, + struct stat *__restrict __buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int fstat (int __fd, struct stat *__buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +# 228 "/usr/include/sys/stat.h" 3 4 +extern int stat64 (__const char *__restrict __file, + struct stat64 *__restrict __buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int fstat64 (int __fd, struct stat64 *__buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + + + + + +extern int fstatat (int __fd, __const char *__restrict __file, + struct stat *__restrict __buf, int __flag) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); +# 253 "/usr/include/sys/stat.h" 3 4 +extern int fstatat64 (int __fd, __const char *__restrict __file, + struct stat64 *__restrict __buf, int __flag) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); + + + + + + + +extern int lstat (__const char *__restrict __file, + struct stat *__restrict __buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +# 276 "/usr/include/sys/stat.h" 3 4 +extern int lstat64 (__const char *__restrict __file, + struct stat64 *__restrict __buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern int chmod (__const char *__file, __mode_t __mode) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int lchmod (__const char *__file, __mode_t __mode) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + +extern int fchmod (int __fd, __mode_t __mode) __attribute__ ((__nothrow__)); + + + + + +extern int fchmodat (int __fd, __const char *__file, __mode_t __mode, + int __flag) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); + + + + + + +extern __mode_t umask (__mode_t __mask) __attribute__ ((__nothrow__)); + + + + +extern __mode_t getumask (void) __attribute__ ((__nothrow__)); + + + +extern int mkdir (__const char *__path, __mode_t __mode) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int mkdirat (int __fd, __const char *__path, __mode_t __mode) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + + + + +extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int mknodat (int __fd, __const char *__path, __mode_t __mode, + __dev_t __dev) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + + + +extern int mkfifo (__const char *__path, __mode_t __mode) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int mkfifoat (int __fd, __const char *__path, __mode_t __mode) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + + + +extern int utimensat (int __fd, __const char *__path, + __const struct timespec __times[2], + int __flags) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + + +extern int futimens (int __fd, __const struct timespec __times[2]) __attribute__ ((__nothrow__)); +# 399 "/usr/include/sys/stat.h" 3 4 +extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))); +extern int __xstat (int __ver, __const char *__filename, + struct stat *__stat_buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); +extern int __lxstat (int __ver, __const char *__filename, + struct stat *__stat_buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); +extern int __fxstatat (int __ver, int __fildes, __const char *__filename, + struct stat *__stat_buf, int __flag) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))); +# 432 "/usr/include/sys/stat.h" 3 4 +extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))); +extern int __xstat64 (int __ver, __const char *__filename, + struct stat64 *__stat_buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); +extern int __lxstat64 (int __ver, __const char *__filename, + struct stat64 *__stat_buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); +extern int __fxstatat64 (int __ver, int __fildes, __const char *__filename, + struct stat64 *__stat_buf, int __flag) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))); + +extern int __xmknod (int __ver, __const char *__path, __mode_t __mode, + __dev_t *__dev) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); + +extern int __xmknodat (int __ver, int __fd, __const char *__path, + __mode_t __mode, __dev_t *__dev) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 5))); + + + + +extern __inline int +__attribute__ ((__nothrow__)) stat (__const char *__path, struct stat *__statbuf) +{ + return __xstat (3, __path, __statbuf); +} + + +extern __inline int +__attribute__ ((__nothrow__)) lstat (__const char *__path, struct stat *__statbuf) +{ + return __lxstat (3, __path, __statbuf); +} + + +extern __inline int +__attribute__ ((__nothrow__)) fstat (int __fd, struct stat *__statbuf) +{ + return __fxstat (3, __fd, __statbuf); +} + + +extern __inline int +__attribute__ ((__nothrow__)) fstatat (int __fd, __const char *__filename, struct stat *__statbuf, int __flag) + +{ + return __fxstatat (3, __fd, __filename, __statbuf, __flag); +} + + + +extern __inline int +__attribute__ ((__nothrow__)) mknod (__const char *__path, __mode_t __mode, __dev_t __dev) +{ + return __xmknod (1, __path, __mode, &__dev); +} + + + +extern __inline int +__attribute__ ((__nothrow__)) mknodat (int __fd, __const char *__path, __mode_t __mode, __dev_t __dev) + +{ + return __xmknodat (1, __fd, __path, __mode, &__dev); +} + + + + + +extern __inline int +__attribute__ ((__nothrow__)) stat64 (__const char *__path, struct stat64 *__statbuf) +{ + return __xstat64 (3, __path, __statbuf); +} + + +extern __inline int +__attribute__ ((__nothrow__)) lstat64 (__const char *__path, struct stat64 *__statbuf) +{ + return __lxstat64 (3, __path, __statbuf); +} + + +extern __inline int +__attribute__ ((__nothrow__)) fstat64 (int __fd, struct stat64 *__statbuf) +{ + return __fxstat64 (3, __fd, __statbuf); +} + + +extern __inline int +__attribute__ ((__nothrow__)) fstatat64 (int __fd, __const char *__filename, struct stat64 *__statbuf, int __flag) + +{ + return __fxstatat64 (3, __fd, __filename, __statbuf, __flag); +} + + + + + + + +# 23 "scenarios.c" 2 +# 1 "/usr/include/SDL/SDL_endian.h" 1 +# 31 "/usr/include/SDL/SDL_endian.h" +# 1 "/usr/include/SDL/SDL_stdinc.h" 1 +# 30 "/usr/include/SDL/SDL_stdinc.h" +# 1 "/usr/include/SDL/SDL_config.h" 1 +# 30 "/usr/include/SDL/SDL_config.h" +# 1 "/usr/include/SDL/SDL_platform.h" 1 +# 31 "/usr/include/SDL/SDL_config.h" 2 +# 31 "/usr/include/SDL/SDL_stdinc.h" 2 +# 41 "/usr/include/SDL/SDL_stdinc.h" +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 149 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stddef.h" 3 4 +typedef int ptrdiff_t; +# 42 "/usr/include/SDL/SDL_stdinc.h" 2 +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stdarg.h" 1 3 4 +# 43 "/usr/include/SDL/SDL_stdinc.h" 2 +# 63 "/usr/include/SDL/SDL_stdinc.h" +# 1 "/usr/include/strings.h" 1 3 4 +# 64 "/usr/include/SDL/SDL_stdinc.h" 2 + + +# 1 "/usr/include/inttypes.h" 1 3 4 +# 28 "/usr/include/inttypes.h" 3 4 +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stdint.h" 1 3 4 + + +# 1 "/usr/include/stdint.h" 1 3 4 +# 27 "/usr/include/stdint.h" 3 4 +# 1 "/usr/include/bits/wchar.h" 1 3 4 +# 28 "/usr/include/stdint.h" 2 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 29 "/usr/include/stdint.h" 2 3 4 +# 49 "/usr/include/stdint.h" 3 4 +typedef unsigned char uint8_t; +typedef unsigned short int uint16_t; + +typedef unsigned int uint32_t; + + + + + +__extension__ +typedef unsigned long long int uint64_t; + + + + + + +typedef signed char int_least8_t; +typedef short int int_least16_t; +typedef int int_least32_t; + + + +__extension__ +typedef long long int int_least64_t; + + + +typedef unsigned char uint_least8_t; +typedef unsigned short int uint_least16_t; +typedef unsigned int uint_least32_t; + + + +__extension__ +typedef unsigned long long int uint_least64_t; + + + + + + +typedef signed char int_fast8_t; + + + + + +typedef int int_fast16_t; +typedef int int_fast32_t; +__extension__ +typedef long long int int_fast64_t; + + + +typedef unsigned char uint_fast8_t; + + + + + +typedef unsigned int uint_fast16_t; +typedef unsigned int uint_fast32_t; +__extension__ +typedef unsigned long long int uint_fast64_t; +# 126 "/usr/include/stdint.h" 3 4 +typedef int intptr_t; + + +typedef unsigned int uintptr_t; +# 138 "/usr/include/stdint.h" 3 4 +__extension__ +typedef long long int intmax_t; +__extension__ +typedef unsigned long long int uintmax_t; +# 4 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stdint.h" 2 3 4 +# 29 "/usr/include/inttypes.h" 2 3 4 + + + + + + +typedef long int __gwchar_t; +# 274 "/usr/include/inttypes.h" 3 4 + +# 288 "/usr/include/inttypes.h" 3 4 +typedef struct + { + long long int quot; + long long int rem; + } imaxdiv_t; + + + + + +extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern intmax_t strtoimax (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) __attribute__ ((__nothrow__)); + + +extern uintmax_t strtoumax (__const char *__restrict __nptr, + char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__)); + + +extern intmax_t wcstoimax (__const __gwchar_t *__restrict __nptr, + __gwchar_t **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)); + + +extern uintmax_t wcstoumax (__const __gwchar_t *__restrict __nptr, + __gwchar_t ** __restrict __endptr, int __base) + __attribute__ ((__nothrow__)); +# 379 "/usr/include/inttypes.h" 3 4 +__extension__ +extern long long int __strtoll_internal (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern __inline intmax_t +__attribute__ ((__nothrow__)) strtoimax (__const char *__restrict nptr, char **__restrict endptr, int base) + +{ + return __strtoll_internal (nptr, endptr, base, 0); +} + +__extension__ +extern unsigned long long int __strtoull_internal (__const char * + __restrict __nptr, + char ** + __restrict __endptr, + int __base, + int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern __inline uintmax_t +__attribute__ ((__nothrow__)) strtoumax (__const char *__restrict nptr, char **__restrict endptr, int base) + +{ + return __strtoull_internal (nptr, endptr, base, 0); +} + +__extension__ +extern long long int __wcstoll_internal (__const __gwchar_t * + __restrict __nptr, + __gwchar_t **__restrict __endptr, + int __base, int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern __inline intmax_t +__attribute__ ((__nothrow__)) wcstoimax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) + +{ + return __wcstoll_internal (nptr, endptr, base, 0); +} + + +__extension__ +extern unsigned long long int __wcstoull_internal (__const __gwchar_t * + __restrict __nptr, + __gwchar_t ** + __restrict __endptr, + int __base, + int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern __inline uintmax_t +__attribute__ ((__nothrow__)) wcstoumax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) + +{ + return __wcstoull_internal (nptr, endptr, base, 0); +} + + + + + +# 67 "/usr/include/SDL/SDL_stdinc.h" 2 + + + + +# 1 "/usr/include/ctype.h" 1 3 4 +# 30 "/usr/include/ctype.h" 3 4 + +# 48 "/usr/include/ctype.h" 3 4 +enum +{ + _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), + _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), + _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), + _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), + _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), + _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), + _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), + _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), + _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), + _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), + _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), + _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) +}; +# 81 "/usr/include/ctype.h" 3 4 +extern __const unsigned short int **__ctype_b_loc (void) + __attribute__ ((__nothrow__)) __attribute__ ((__const)); +extern __const __int32_t **__ctype_tolower_loc (void) + __attribute__ ((__nothrow__)) __attribute__ ((__const)); +extern __const __int32_t **__ctype_toupper_loc (void) + __attribute__ ((__nothrow__)) __attribute__ ((__const)); +# 96 "/usr/include/ctype.h" 3 4 + + + + + + +extern int isalnum (int) __attribute__ ((__nothrow__)); +extern int isalpha (int) __attribute__ ((__nothrow__)); +extern int iscntrl (int) __attribute__ ((__nothrow__)); +extern int isdigit (int) __attribute__ ((__nothrow__)); +extern int islower (int) __attribute__ ((__nothrow__)); +extern int isgraph (int) __attribute__ ((__nothrow__)); +extern int isprint (int) __attribute__ ((__nothrow__)); +extern int ispunct (int) __attribute__ ((__nothrow__)); +extern int isspace (int) __attribute__ ((__nothrow__)); +extern int isupper (int) __attribute__ ((__nothrow__)); +extern int isxdigit (int) __attribute__ ((__nothrow__)); + + + +extern int tolower (int __c) __attribute__ ((__nothrow__)); + + +extern int toupper (int __c) __attribute__ ((__nothrow__)); + + + + + + + + +extern int isblank (int) __attribute__ ((__nothrow__)); + + + + + + +extern int isctype (int __c, int __mask) __attribute__ ((__nothrow__)); + + + + + + +extern int isascii (int __c) __attribute__ ((__nothrow__)); + + + +extern int toascii (int __c) __attribute__ ((__nothrow__)); + + + +extern int _toupper (int) __attribute__ ((__nothrow__)); +extern int _tolower (int) __attribute__ ((__nothrow__)); +# 190 "/usr/include/ctype.h" 3 4 +extern __inline int +__attribute__ ((__nothrow__)) tolower (int __c) +{ + return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c; +} + +extern __inline int +__attribute__ ((__nothrow__)) toupper (int __c) +{ + return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c; +} +# 247 "/usr/include/ctype.h" 3 4 +extern int isalnum_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isalpha_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int iscntrl_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isdigit_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int islower_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isgraph_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isprint_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int ispunct_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isspace_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isupper_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isxdigit_l (int, __locale_t) __attribute__ ((__nothrow__)); + +extern int isblank_l (int, __locale_t) __attribute__ ((__nothrow__)); + + + +extern int __tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); +extern int tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); + + +extern int __toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); +extern int toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); +# 323 "/usr/include/ctype.h" 3 4 + +# 72 "/usr/include/SDL/SDL_stdinc.h" 2 + + +# 1 "/usr/include/iconv.h" 1 3 4 +# 24 "/usr/include/iconv.h" 3 4 +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.5.0/include/stddef.h" 1 3 4 +# 25 "/usr/include/iconv.h" 2 3 4 + + + + + +typedef void *iconv_t; + + + + + + + +extern iconv_t iconv_open (__const char *__tocode, __const char *__fromcode); + + + + +extern size_t iconv (iconv_t __cd, char **__restrict __inbuf, + size_t *__restrict __inbytesleft, + char **__restrict __outbuf, + size_t *__restrict __outbytesleft); + + + + + +extern int iconv_close (iconv_t __cd); + + +# 75 "/usr/include/SDL/SDL_stdinc.h" 2 +# 93 "/usr/include/SDL/SDL_stdinc.h" +typedef enum { + SDL_FALSE = 0, + SDL_TRUE = 1 +} SDL_bool; + +typedef int8_t Sint8; +typedef uint8_t Uint8; +typedef int16_t Sint16; +typedef uint16_t Uint16; +typedef int32_t Sint32; +typedef uint32_t Uint32; + + +typedef int64_t Sint64; + +typedef uint64_t Uint64; +# 125 "/usr/include/SDL/SDL_stdinc.h" +typedef int SDL_dummy_uint8[(sizeof(Uint8) == 1) * 2 - 1]; +typedef int SDL_dummy_sint8[(sizeof(Sint8) == 1) * 2 - 1]; +typedef int SDL_dummy_uint16[(sizeof(Uint16) == 2) * 2 - 1]; +typedef int SDL_dummy_sint16[(sizeof(Sint16) == 2) * 2 - 1]; +typedef int SDL_dummy_uint32[(sizeof(Uint32) == 4) * 2 - 1]; +typedef int SDL_dummy_sint32[(sizeof(Sint32) == 4) * 2 - 1]; +typedef int SDL_dummy_uint64[(sizeof(Uint64) == 8) * 2 - 1]; +typedef int SDL_dummy_sint64[(sizeof(Sint64) == 8) * 2 - 1]; +# 146 "/usr/include/SDL/SDL_stdinc.h" +typedef enum { + DUMMY_ENUM_VALUE +} SDL_DUMMY_ENUM; + + +typedef int SDL_dummy_enum[(sizeof(SDL_DUMMY_ENUM) == sizeof(int)) * 2 - 1]; + + + +# 1 "/usr/include/SDL/begin_code.h" 1 +# 156 "/usr/include/SDL/SDL_stdinc.h" 2 +# 403 "/usr/include/SDL/SDL_stdinc.h" +extern __attribute__ ((visibility("default"))) size_t SDL_strlcpy(char *dst, const char *src, size_t maxlen); + + + + + +extern __attribute__ ((visibility("default"))) size_t SDL_strlcat(char *dst, const char *src, size_t maxlen); +# 421 "/usr/include/SDL/SDL_stdinc.h" +extern __attribute__ ((visibility("default"))) char * SDL_strrev(char *string); + + + + + +extern __attribute__ ((visibility("default"))) char * SDL_strupr(char *string); + + + + + +extern __attribute__ ((visibility("default"))) char * SDL_strlwr(char *string); +# 467 "/usr/include/SDL/SDL_stdinc.h" +extern __attribute__ ((visibility("default"))) char * SDL_ltoa(long value, char *string, int radix); +# 479 "/usr/include/SDL/SDL_stdinc.h" +extern __attribute__ ((visibility("default"))) char * SDL_ultoa(unsigned long value, char *string, int radix); +# 499 "/usr/include/SDL/SDL_stdinc.h" +extern __attribute__ ((visibility("default"))) char* SDL_lltoa(Sint64 value, char *string, int radix); + + + + + +extern __attribute__ ((visibility("default"))) char* SDL_ulltoa(Uint64 value, char *string, int radix); +# 605 "/usr/include/SDL/SDL_stdinc.h" +extern __attribute__ ((visibility("default"))) size_t SDL_iconv(iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft); + + + +extern __attribute__ ((visibility("default"))) char * SDL_iconv_string(const char *tocode, const char *fromcode, const char *inbuf, size_t inbytesleft); +# 618 "/usr/include/SDL/SDL_stdinc.h" +# 1 "/usr/include/SDL/close_code.h" 1 +# 619 "/usr/include/SDL/SDL_stdinc.h" 2 +# 32 "/usr/include/SDL/SDL_endian.h" 2 +# 54 "/usr/include/SDL/SDL_endian.h" +# 1 "/usr/include/SDL/begin_code.h" 1 +# 55 "/usr/include/SDL/SDL_endian.h" 2 +# 70 "/usr/include/SDL/SDL_endian.h" +static __inline__ Uint16 SDL_Swap16(Uint16 x) +{ + __asm__("xchgb %b0,%h0" : "=q" (x) : "0" (x)); + return x; +} +# 103 "/usr/include/SDL/SDL_endian.h" +static __inline__ Uint32 SDL_Swap32(Uint32 x) +{ + __asm__("bswap %0" : "=r" (x) : "0" (x)); + return x; +} +# 139 "/usr/include/SDL/SDL_endian.h" +static __inline__ Uint64 SDL_Swap64(Uint64 x) +{ + union { + struct { Uint32 a,b; } s; + Uint64 u; + } v; + v.u = x; + __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1" + : "=r" (v.s.a), "=r" (v.s.b) + : "0" (v.s.a), "1" (v.s.b)); + return v.u; +} +# 207 "/usr/include/SDL/SDL_endian.h" +# 1 "/usr/include/SDL/close_code.h" 1 +# 208 "/usr/include/SDL/SDL_endian.h" 2 +# 24 "scenarios.c" 2 +# 1 "units.h" 1 +# 29 "units.h" +int units_find_panzequp(); + + + + + + +int units_find_tacicons(); + + + + + + + +int units_convert_database( char *tac_icons ); + + + + + + + +int units_convert_graphics( char *tac_icons ); +# 25 "scenarios.c" 2 +# 1 "misc.h" 1 +# 21 "misc.h" +# 1 "../config.h" 1 +# 22 "misc.h" 2 +# 46 "misc.h" +typedef struct { + int limit; + int cur; +} Delay; + + +inline void set_delay( Delay *delay, int ms ); + + +inline void reset_delay( Delay *delay ); + + +inline int timed_out( Delay *delay, int ms ); + + +int get_dist( int x1, int y1, int x2, int y2 ); + + +void set_random_seed(); + + +void get_coord( char *str, int *x, int *y ); + + +typedef struct { + char **lines; + int count; +} Text; + +Text* create_text( char *str, int char_width ); + +void delete_text( Text *text ); + + + + + + +void delete_string_list( char ***list, int *count ); + + + + + + + +typedef struct { char *string; int flag; } StrToFlag; + + + + + + +int check_flag( char *name, StrToFlag *fct ); + + + + + + +int get_close_hex_pos( int x, int y, int id, int *dest_x, int *dest_y ); + + + + + + +int is_close( int x1, int y1, int x2, int y2 ); + + + + + + +void strcpy_lt( char *dest, char *src, int limit ); + + + + + + +char *strlower( const char *str ); + + + + + + +FILE *open_file( const char *name ); + + + + + + +void copy( char *sname, char *dname ); +int copy_pg_bmp( char *src, char *dest ); + + + + + + +const char *get_gamedir(void); +# 26 "scenarios.c" 2 +# 1 "scenarios.h" 1 +# 28 "scenarios.h" +int scenarios_convert( int scen_id ); +# 27 "scenarios.c" 2 +# 1 "parser.h" 1 +# 22 "parser.h" +# 1 "list.h" 1 +# 30 "list.h" +typedef struct _List_Entry { + struct _List_Entry *next; + struct _List_Entry *prev; + void *item; +} List_Entry; +typedef struct { + int auto_delete; + int count; + List_Entry head; + List_Entry tail; + void (*callback)(void*); + List_Entry *cur_entry; +} List; +# 53 "list.h" +enum { LIST_NO_AUTO_DELETE = 0, LIST_AUTO_DELETE }; +enum { LIST_NO_CALLBACK = 0 }; +List *list_create( int auto_delete, void (*callback)(void*) ); + + + + + +void list_delete( List *list ); + + + + + + +void list_clear( List *list ); + + + + + + +int list_insert( List *list, void *item, int pos ); + + + + + +int list_add( List *list, void *item ); + + + + + + + +int list_delete_pos( List *list, int pos ); + + + + + + + +int list_delete_item( List *list, void *item ); + + + + + +int list_delete_entry( List *list, List_Entry *entry ); + + + + + + +void* list_get( List *list, int pos ); + + + + + + +int list_check( List *list, void *item ); + + + + + + + +void* list_first( List *list ); + + + + + + + +void* list_last( List *list ); + + + + + + +void* list_current( List *list ); + + + + + +void list_reset( List *list ); + + + + + + +void* list_next( List *list ); + + + + + + +void* list_prev( List *list ); + + + + + + + +int list_delete_current( List *list ); + + + + + + +int list_empty( List *list ); + + + + + + +List_Entry *list_entry( List *list, void *item ); + + + + + + + +void list_transfer( List *source, List *dest, void *item ); + + + + + +void *list_dequeue( List *list ); +# 23 "parser.h" 2 +# 79 "parser.h" +typedef struct { + char *name; + List *values; + List *entries; +} PData; +# 93 "parser.h" +List* parser_split_string( char *string, char *symbols ); + + + + + + + +List *parser_explode_string( char *string, char c ); +# 110 "parser.h" +PData* parser_read_file( char *tree_name, char *fname ); + + + + + + +void parser_free( PData **pdata ); +# 135 "parser.h" +int parser_get_pdata ( PData *pd, char *name, PData **result ); +int parser_get_entries( PData *pd, char *name, List **result ); +int parser_get_values ( PData *pd, char *name, List **result ); +int parser_get_value ( PData *pd, char *name, char **result, int index ); +int parser_get_int ( PData *pd, char *name, int *result ); +int parser_get_double ( PData *pd, char *name, double *result ); +int parser_get_string ( PData *pd, char *name, char **result ); + + + + + + +char* parser_get_error( void ); +# 28 "scenarios.c" 2 + + + + + + +extern char *source_path; +extern char *dest_path; +extern char *custom_name; +extern int nation_count; +extern char *nations[]; + +int unit_entry_used[1000]; +# 82 "scenarios.c" +char *fnames[] = { + "Poland", + "Warsaw", + "Norway", + "LowCountries", + "France", + "Sealion40", + "NorthAfrica", + "MiddleEast", + "ElAlamein", + "Caucasus", + "Sealion43", + "Torch", + "Husky", + "Anzio", + "D-Day", + "Anvil", + "Ardennes", + "Cobra", + "MarketGarden", + "BerlinWest", + "Balkans", + "Crete", + "Barbarossa", + "Kiev", + "Moscow41", + "Sevastapol", + "Moscow42", + "Stalingrad", + "Kharkov", + "Kursk", + "Moscow43", + "Byelorussia", + "Budapest", + "BerlinEast", + "Berlin", + "Washington", + "EarlyMoscow", + "SealionPlus" +}; + + + + + + +char *ai_modules[] = { + + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default", + "default", "default" +}; + + + + + +int prestige_per_turn[] = { + + 0, 20, + 0, 20, + 0, 40, + 0, 48, + 0, 45, + 0, 84, + 0, 45, + 0, 70, + 0, 63, + 0, 85, + 0, 103, + 0, 0, + 71, 0, + 47, 0, + 70, 0, + 48, 0, + 0, 75, + 48, 0, + 61, 0, + 70, 0, + 0, 101, + 0, 45, + 0, 60, + 0, 80, + 0, 115, + 0, 63, + 0, 105, + 0, 95, + 0, 55, + 0, 115, + 0, 122, + 47, 0, + 0, 0, + 70, 0, + 82, 0, + 0, 115, + 0, 135, + 0, 85 +}; +# 228 "scenarios.c" +int seed; +void random_seed( int _seed ) +{ + seed = _seed; +} +int random_get( int low, int high ) +{ + int p1 = 1103515245; + int p2 = 12345; + seed = ( seed * p1 + p2 ) % 2147483647; + return ( ( abs( seed ) / 3 ) % ( high - low + 1 ) ) + low; +} +# 248 "scenarios.c" +int scen_add_flags( FILE *dest_file, FILE *scen_file, int id ) +{ + FILE *map_file; + char path[512]; + int width, height, ibuf; + int x, y, i, obj; + int vic_hexes[40]; + int obj_count = 0; + + memset( vic_hexes, 0, sizeof(int) * 40 ); + fseek( scen_file, 37, 0 ); + for ( i = 0; i < 20; i++ ) { + fread( &vic_hexes[i * 2], 2, 1, scen_file ); + vic_hexes[i * 2] = (vic_hexes[i * 2]); + fread( &vic_hexes[i * 2 + 1], 2, 1, scen_file ); + vic_hexes[i * 2 + 1] = (vic_hexes[i * 2 + 1]); + if ( vic_hexes[i * 2] >= 1000 || vic_hexes[i * 2] < 0 ) + break; + obj_count++; + } + + sprintf( path, "%s/MAP%02i.SET", source_path, id ); + if ( ( map_file = fopen( path, "r" ) ) == 0 ) { + sprintf( path, "%s/map%02i.set", source_path, id ); + if ( ( map_file = fopen( path, "r" ) ) == 0 ) { + fprintf( stderr, "%s: file not found\n", path ); + return 0; + } + } + + width = height = 0; + fseek( map_file, 101, 0 ); + fread( &width, 2, 1, map_file ); + width = (width); + fseek( map_file, 103, 0 ); + fread( &height, 2, 1, map_file ); + height = (height); + width++; height++; + + fseek( map_file, 123 + 3 * width * height, 0 ); + for ( y = 0; y < height; y++ ) { + for ( x = 0; x < width; x++ ) { + ibuf = 0; fread( &ibuf, 1, 1, map_file ); + if ( ibuf > 0 ) { + obj = 0; + for ( i = 0; i < obj_count; i++ ) + if ( vic_hexes[i * 2] == x && vic_hexes[i * 2 + 1] == y ) { + obj = 1; break; + } + fprintf( dest_file, "\n", x, y, nations[(ibuf - 1) * 3], obj ); + } + } + } + return 1; +} +# 324 "scenarios.c" +void scen_create_random_weather( FILE *dest_file, FILE *scen_file, int month, int turns ) +{ + float month_mod[13] = { 0, 1.7, 1.6, 1.0, 2.0, 1.2, 0.7, 0.5, 0.6, 1.4, 1.7, 2.2, 1.7 }; + int med_weather[4] = { 0, 16, 24, 36 }; + int bad_weather[4] = { 0, 8, 12, 18 }; + int i, result; + int init_cond = 0, region = 0; + int weather[turns]; + memset( weather, 0, sizeof( int ) * turns ); + + fseek( scen_file, 16, 0 ); + fread( &init_cond, 1, 1, scen_file ); + fread( ®ion, 1, 1, scen_file ); + + + random_seed( month * turns + ( region + 1 ) * ( init_cond + 1 ) ); + for ( i = 0; i < turns; i++ ) { + result = random_get( 1, 100 ); + if ( result <= (int)( month_mod[month] * bad_weather[region] ) ) + weather[i] = 2; + else + if ( result <= (int)( month_mod[month] * med_weather[region] ) ) + weather[i] = 1; + } + + + weather[0] = (init_cond==1)?0:2; + + if ( month < 3 || month == 12 ) { + for ( i = 0; i < turns; i++ ) + if ( weather[i] == 2 ) + weather[i]++; + } + + + fprintf( dest_file, "weather»" ); + i = 0; + while ( i < turns ) { + fprintf( dest_file, "%s", weather[i]==0?"fair":weather[i]==1?"clouds":weather[i]==2?"rain":"snow" ); + if ( i < turns - 1 ) + fprintf( dest_file, "°" ); + i++; + } + fprintf( dest_file, "\n" ); +} + + + + + + + +void scen_create_pg_weather( FILE *dest_file, int scen_id, FILE *scen_file, int turns ) +{ + + char *weathers[] = { + "fffffroRff", + "ffffffffffffrooorRff", + "fffforRRRmfffforRROffffff", + "fffffffrROooffffffffffooroffff", + "ffffffffffffoorfffffffffff", + "ffffffooorfffff", + "", + "", + "", + "ffffffffffffffrooooofffsoSISSi", + "fffffffffffffoo", + "", + "ffffffffooorRffffffff", + "fffforofffffff", + "", + "ooofffffffforRoffffffff", + "SISSSSSSSIISISSiffsSSSSISSSISSII", + "ffffffffffffffrooffffffff", + "fffffroRooffffff", + "ffroorfffffff", + "ffffffffffforooffffffffoo", + "fffffffffroRR", + "ffffffffoorofffffffffff", + "fffffffffoorofffffffffffrooo", + "fffffsooSSSiffffsSffff", + "ffffffffffforofff", + "fffooooosSfffsoSIffffoo", + "ffffffffffffforoooffffffffffffo", + "ffsoSSiffroooroRffffsS", + "fffffffffffffoorofff", + "ffffooosfffffosSSSIif", + "ffffffffffffffrooffffff", + "fffffoorRRRmffffosSf", + "ffffoosofffoo", + "fffroRofffrRM", + "fffffffffffffrffffffff", + "ffffffffffsooofffffoosos", + "ffffffroforofff" + }; + int i; + char w[32]; + if (strlen(weathers[scen_id])>0&&strlen(weathers[scen_id])!=turns) + fprintf(stderr,"ERROR: scen %d: mismatch in length of weather (%d) and turn number (%d)\n", + scen_id,strlen(weathers[scen_id]),turns); + + fprintf( dest_file, "weather»" ); + i = 0; + while ( i < turns ) { + if (weathers[0]==0) + strcpy(w,"fair"); + else + { + w[0] = weathers[scen_id][i]; w[1] = 0; + if (w[0]=='f') strcpy(w,"fair"); + else if (w[0]=='o') strcpy(w,"clouds"); + else if (w[0]=='R') strcpy(w,"rain"); + else if (w[0]=='S') strcpy(w,"snow"); + } + fprintf( dest_file, "%s", w ); + if ( i < turns - 1 ) + fprintf( dest_file, "°" ); + i++; + } + fprintf( dest_file, "\n" ); +} + + + + + + +void scen_create_unit( int scen_id, FILE *dest_file, FILE *scen_file ) +{ + int id = 0, nation = 0, x = 0, y = 0, str = 0, entr = 0, exp = 0, trsp_id = 0, org_trsp_id = 0; + + + fread( &id, 2, 1, scen_file ); + id = (id); + fread( &org_trsp_id, 2, 1, scen_file ); + org_trsp_id = (org_trsp_id); + fread( &nation, 1, 1, scen_file ); nation--; + fread( &trsp_id, 2, 1, scen_file ); + trsp_id = (trsp_id); + fread( &x, 2, 1, scen_file ); + x = (x); + fread( &y, 2, 1, scen_file ); + y = (y); + fread( &str, 1, 1, scen_file ); + fread( &entr, 1, 1, scen_file ); + fread( &exp, 1, 1, scen_file ); + + if (scen_id==23) + { + if (x==7&&y==14) trsp_id = 86; + if (x==8&&y==23) trsp_id = 86; + } + + unit_entry_used[id - 1] = 1; + if ( trsp_id ) + unit_entry_used[trsp_id - 1] = 1; + else + if ( org_trsp_id ) + unit_entry_used[org_trsp_id - 1] = 1; + + fprintf( dest_file, "\n" ); +} + + + + + + +int major_limits[] = { + + + + -1, + 3, + 7, + 5, + 6, + 13, + 3, + 4, + 5, + 3, + 12, + 3, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1, + 3, + 2, + 10, + 8, + 4, + 3, + 6, + 13, + 4, + -1, + 5, + -1, + 5, + -1, + -1, + 7, + 5, + 3, +}; + + + + +void scen_add_vic_conds( FILE *file, int id ) +{ +# 563 "scenarios.c" + if ( id == 15 || id == 16 || id == 17 ) + fprintf( file, "\n\n>\n", major_limits[id] ); + fprintf( file, "result»%s\n", "major" ); + fprintf( file, "message»%s\n", "Axis Major Victory" ); + fprintf( file, ">\n" ); + fprintf( file, "\n>\n" ); + fprintf( file, "result»%s\n", "minor" ); + fprintf( file, "message»%s\n", "Axis Minor Victory" ); + fprintf( file, ">\n" ); + fprintf( file, "\n" ); + } + else + if ( id == 17 ) { + + fprintf( file, "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + ">\n" ); + fprintf( file, "result»%s\n", "minor" ); + fprintf( file, "message»%s\n", "Axis Minor Victory" ); + fprintf( file, ">\n" ); + + fprintf( file, "\n>\n" ); + fprintf( file, "result»%s\n", "major" ); + fprintf( file, "message»%s\n", "Axis Major Victory" ); + fprintf( file, ">\n" ); + + fprintf( file, "\n" ); + } + else { + + fprintf( file, "\n\n>\n" ); + break; + case 13: + fprintf( file, "\n>\n" ); + break; + case 14: + fprintf( file, "\n\n>\n" ); + break; + case 15: + fprintf( file, "\n>\n" ); + break; + case 16: + fprintf( file, "\n>\n" ); + break; + case 18: + fprintf( file, "\n>\n" ); + break; + case 19: + fprintf( file, "\n>\n" ); + break; + case 20: + fprintf( file, "\n\n>\n" ); + break; + case 30: + fprintf( file, "\n>\n" ); + break; + case 32: + fprintf( file, "\n>\n" ); + break; + case 34: + fprintf( file, "\n\n>\n" ); + break; + case 35: + fprintf( file, "\n>\n" ); + break; + } + fprintf( file, "result»%s\n", "defeat" ); + fprintf( file, "message»%s\n", "Axis Defeat" ); + fprintf( file, ">\n" ); + + fprintf( file, "\n" + "\n" + "\n" + ">\n" ); + } + else if ( id == 16 ) + { + + fprintf( file, "\n" + "\n" + "\n" + "\n" + "\n" + ">\n" ); + } + else + { + + fprintf( file, "\n>\n" ); + } + fprintf( file, "result»%s\n", "major" ); + fprintf( file, "message»%s\n", "Axis Major Victory" ); + fprintf( file, ">\n" ); + fprintf( file, "\n" ); + } + + fprintf( file, ">\n" ); +} +# 708 "scenarios.c" +int scenarios_convert( int scen_id ) +{ + int i, j; + char dummy[256]; + int day, month, year, turns, turns_per_day, days_per_turn, ibuf; + int unit_offset, unit_count; + int axis_orient, axis_strat, allied_strat; + int deploy_fields_count; + int prest_bucket[2], prest_int[2], prest_start[2], prest_per_turn[2]; + char path[512]; + FILE *dest_file = 0, *scen_file = 0, *aux_file = 0; + PData *pd = 0, *reinf, *unit; + int def_str, def_exp, def_entr; + char *str; + printf( " scenarios...\n" ); + sprintf( path, "%s/scenarios/pg", dest_path ); + mkdir( path, (0400|0200|0100) | (0400 >> 3) | (0100 >> 3) | ((0400 >> 3) >> 3) | ((0100 >> 3) >> 3) ); + if ( scen_id == -1 ) { + + sprintf( path, "%s/scenarios/pg/.order", dest_path ); + aux_file = fopen( path, "w" ); + if ( aux_file ) { + for (i = 0; i < sizeof fnames/sizeof fnames[0]; i++) + fprintf( aux_file, "%s\n", fnames[i] ); + fclose( aux_file ); + } else + fprintf( stderr, "Could not write sort order to %s\n", path ); + + + sprintf( path, "%s/convdata/reinf", get_gamedir() ); + if ( ( pd = parser_read_file( "reinforcements", path ) ) == 0 ) { + fprintf( stderr, "%s\n", parser_get_error() ); + goto failure; + } + + } + + for ( i = (( scen_id == -1 ) ? 1 : scen_id); + i < (( scen_id == -1 ) ? 38 : scen_id) + 1; i++ ) { + + if ( scen_id == -1 ) + sprintf( path, "%s/scenarios/pg/%s", dest_path, fnames[i - 1] ); + else + sprintf( path, "%s/scenarios/pg/%s", dest_path, custom_name ); + if ( ( dest_file = fopen( path, "w" ) ) == 0 ) { + fprintf( stderr, "%s: access denied\n", path ); + goto failure; + } + + fprintf( dest_file, "@\n" ); + if ( scen_id == -1 ) { + if ( ( aux_file = open_file( "SCENSTAT.BIN" ) ) == 0 ) + goto failure; + fseek( aux_file, 40 + (i - 1) * 14, 0 ); + fread( dummy, 14, 1, aux_file ); + fprintf( dest_file, "name»%s\n", dummy ); + fseek( aux_file, 600 + (i - 1) * 160 , 0 ); + fread( dummy, 160, 1, aux_file ); + fprintf( dest_file, "desc»%s\n", dummy ); + fprintf( dest_file, "authors»Strategic Simulation Inc.\n" ); + fclose( aux_file ); + } + else { + fprintf( dest_file, "name»%s\n", custom_name ); + fprintf( dest_file, "desc»none\n" ); + fprintf( dest_file, "authors»nobody\n" ); + } + + sprintf( path, "GAME%03i.SCN", i ); + if ( ( scen_file = open_file( path ) ) == 0 ) + goto failure; + + fseek( scen_file, 22, 0 ); + day = 0; fread( &day, 1, 1, scen_file ); + month = 0; fread( &month, 1, 1, scen_file ); + year = 0; fread( &year, 1, 1, scen_file ); + fprintf( dest_file, "date»%02i.%02i.19%i\n", day, month, year ); + + fseek( scen_file, 21, 0 ); + turns = 0; fread( &turns, 1, 1, scen_file ); + fprintf( dest_file, "turns»%i\n", turns ); + fseek( scen_file, 25, 0 ); + turns_per_day = 0; fread( &turns_per_day, 1, 1, scen_file ); + fprintf( dest_file, "turns_per_day»%i\n", turns_per_day ); + days_per_turn = 0; fread( &days_per_turn, 1, 1, scen_file ); + if ( turns_per_day == 0 && days_per_turn == 0 ) + days_per_turn = 1; + fprintf( dest_file, "days_per_turn»%i\n", days_per_turn ); + + fprintf( dest_file, "domain»pg\n" ); + + fprintf( dest_file, "nation_db»pg.ndb\n" ); + + if ( scen_id == -1 || !units_find_panzequp() ) + fprintf( dest_file, "\n" ); + + + + + + + + if ( scen_id == -1 ) + fprintf( dest_file, "map»pg/map%02i\n", i ); + + if (scen_id==-1) + scen_create_pg_weather( dest_file, i-1, scen_file, turns ); + else + scen_create_random_weather( dest_file, scen_file, month, turns ); + + fprintf( dest_file, "\n" ); + + fseek( scen_file, 117, 0 ); + ibuf = 0; fread( &ibuf, 1, 1, scen_file ); + unit_offset = ibuf * 4 + 135; + + if ( scen_id == -1 ) + { + fseek( scen_file, 27, 0 ); fread( &dummy, 6, 1, scen_file ); + prest_bucket[0] = dummy[0] + 256*dummy[1]; + prest_bucket[1] = dummy[2] + 256*dummy[3]; + prest_int[0] = dummy[4]; + prest_int[1] = dummy[5]; + fseek( scen_file, 0x75, 0 ); fread( &dummy, 1, 1, scen_file ); + fseek( scen_file, dummy[0]*4+0x77, 0 ); fread( &dummy, 4, 1, scen_file ); + prest_start[0] = dummy[0] + 256 * dummy[1]; + prest_start[1] = dummy[2] + 256 * dummy[3]; + + + + + + prest_per_turn[0] = prestige_per_turn[(i-1)*2]; + prest_per_turn[1] = prestige_per_turn[(i-1)*2+1]; + + prest_start[0] += prest_per_turn[0]; + prest_start[1] += prest_per_turn[1]; + } + else + { + prest_bucket[0] = prest_bucket[1] = 0; + prest_int[0] = prest_int[1] = 0; + prest_start[0] = prest_start[1] = 0; + prest_per_turn[0] = prest_per_turn[1] = 0; + } + + fprintf( dest_file, "\n", ibuf - 1 ); + + fseek( scen_file, unit_offset - 4, 0 ); + ibuf = 0; fread( &ibuf, 2, 1, scen_file ); + ibuf = (ibuf); + if ( ibuf ) + fprintf( dest_file, "\n", ibuf - 1 ); + fprintf( dest_file, ">\n" ); + fprintf( dest_file, ">\n" ); + + if ( axis_orient == 1 ) + sprintf( dummy, "left" ); + else + sprintf( dummy, "right" ); + if ( axis_strat == 1 ) + allied_strat = -1; + else + allied_strat = 1; + fprintf( dest_file, "\n", ibuf - 1 ); + + fseek( scen_file, unit_offset - 2, 0 ); + ibuf = 0; fread( &ibuf, 2, 1, scen_file ); + ibuf = (ibuf); + if ( ibuf ) + fprintf( dest_file, "\n", ibuf - 1 ); + fprintf( dest_file, ">\n" ); + fprintf( dest_file, ">\n" ); + fprintf( dest_file, ">\n" ); + + if ( scen_id == -1 ) + scen_add_vic_conds( dest_file, i ); + else { + + + fprintf( dest_file, "\n>\n", + (axis_strat > 0) ? "axis" : "allies" ); + fprintf( dest_file, "result»victory\n" ); + fprintf( dest_file, "message»%s\n", + (axis_strat > 0) ? "Axis Victory" : "Allied Victory" ); + fprintf( dest_file, ">\n" ); + fprintf( dest_file, " 0) ? "Axis Defeat" : "Allied Defeat" ); + fprintf( dest_file, ">\n" ); + fprintf( dest_file, ">\n" ); + } + + fseek( scen_file, 117, 0 ); + ibuf = 0; fread( &ibuf, 2, 1, scen_file ); + deploy_fields_count = (ibuf); + fprintf( dest_file, "\n" ); + if (scen_id==-1&&i==19) + fprintf( dest_file, "\n" ); + else + fprintf( dest_file, "\n" ); + fprintf( dest_file, ">\n" ); + + + + memset( unit_entry_used, 0, sizeof( unit_entry_used ) ); + + fseek( scen_file, 33, 0 ); + ibuf = 0; fread( &ibuf, 1, 1, scen_file ); + unit_count = ibuf; + ibuf = 0; fread( &ibuf, 1, 1, scen_file ); + unit_count += ibuf; + ibuf = 0; fread( &ibuf, 1, 1, scen_file ); + unit_count += ibuf; + + fseek( scen_file, unit_offset, 0 ); + fprintf( dest_file, "entries ); + while ( ( unit = list_next( reinf->entries ) ) ) + if ( !__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ("unit") && __builtin_constant_p (unit->name) && (__s1_len = strlen ("unit"), __s2_len = strlen (unit->name), (!((size_t)(const void *)(("unit") + 1) - (size_t)(const void *)("unit") == 1) || __s1_len >= 4) && (!((size_t)(const void *)((unit->name) + 1) - (size_t)(const void *)(unit->name) == 1) || __s2_len >= 4)) ? __builtin_strcmp ("unit", unit->name) : (__builtin_constant_p ("unit") && ((size_t)(const void *)(("unit") + 1) - (size_t)(const void *)("unit") == 1) && (__s1_len = strlen ("unit"), __s1_len < 4) ? (__builtin_constant_p (unit->name) && ((size_t)(const void *)((unit->name) + 1) - (size_t)(const void *)(unit->name) == 1) ? __builtin_strcmp ("unit", unit->name) : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) (unit->name); register int __result = (((__const unsigned char *) (__const char *) ("unit"))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) ("unit"))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) ("unit"))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) ("unit"))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (unit->name) && ((size_t)(const void *)((unit->name) + 1) - (size_t)(const void *)(unit->name) == 1) && (__s2_len = strlen (unit->name), __s2_len < 4) ? (__builtin_constant_p ("unit") && ((size_t)(const void *)(("unit") + 1) - (size_t)(const void *)("unit") == 1) ? __builtin_strcmp ("unit", unit->name) : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) ("unit"); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) (unit->name))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) (unit->name))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) (unit->name))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) (unit->name))[3]); } } __result; }))) : __builtin_strcmp ("unit", unit->name)))); }) ) { + + fprintf( dest_file, "\n" ); + } + } + } + fprintf( dest_file, ">\n" ); + fclose( scen_file ); + fclose( dest_file ); + } + parser_free( &pd ); + return 1; +failure: + parser_free( &pd ); + if ( aux_file ) fclose( aux_file ); + if ( scen_file ) fclose( scen_file ); + if ( dest_file ) fclose( dest_file ); + return 0; +} diff --git a/321325/lgc_pg-scenarios.pre.i.1 b/321325/lgc_pg-scenarios.pre.i.1 new file mode 100644 index 0000000..81c72fd --- /dev/null +++ b/321325/lgc_pg-scenarios.pre.i.1 @@ -0,0 +1,28 @@ +void scen_create_random_weather(void * dest_file, void * scen_file, int month, + int turns) +{ + float month_mod[13] = { + 0, 8, 12, 18 + }; + int i; + int result; + int init_cond = 0; + int region = 0; + int weather[turns]; + weather[0] = (init_cond == 1) ? 0 : 2; + if (month < 3 || month == 12) { + for (i = 0; i < turns; i++) + if (weather[i] == 2) + weather[i]++; + } + fprintf(dest_file, "weather»"); + i = 0; + while (i < turns) { + fprintf(dest_file, "%s", + weather[i] == 0 ? "fair" : weather[i] == + 1 ? "clouds" : weather[i] == 2 ? "rain" : "snow"); + if (i < turns - 1) + fprintf(dest_file, "°"); + i++; + } +} diff --git a/321325/reduce-ice b/321325/reduce-ice new file mode 100755 index 0000000..19e6f9d --- /dev/null +++ b/321325/reduce-ice @@ -0,0 +1,13 @@ +#!/bin/bash +# +# Run like: +# multidelta -level=# ./reduce-ice $FILE +# levels: 0 0 1 1 2 2 10 10 +# + +FILE=lgc_pg-scenarios.pre.i +CC=gcc-4.5.0 +CFLAGS="-O2 -m32" +STRING="internal compiler error: Segmentation fault" + +$CC -pipe -c $CFLAGS $FILE 2>&1 | grep "$STRING" diff --git a/326285/libtest.so b/326285/libtest.so new file mode 100755 index 0000000000000000000000000000000000000000..9cf5d6bdb377a0e14d7f18cfe0628b147e2b7c75 GIT binary patch literal 5837 zcmeHLO>Yxt5FW=#2qBPd)elq<>?JK6y0TMJAym;g!HJOqQGrS+m(5~t;xutg?X3h= zrP51P#3kayf8k=am-YuBRTT#$gk&Tx96&jBJM->5o3&Y2QKg=`Bkj(-&wRZ*JL}|~ zAIeJ$L%AG*@^qeLRmexktSTN@DlnU+voy;0Nt!UWBYUbhq^`yRC$f!=e*8 z=QXPbQl7J;4`3wwNwflBllSd}eL*!RjQz`S%(7!!5sG|S^d>$v06)sO#9!41M|`R^ zH-aL$ZaeU*n{Ktf>8^PjTLzvc*ROej$J!h1wpg?RhPG=Qi*!HoJW@|kIP>R(P2tpI zzE7T!7MsnX>q1-JicWmOo*bXN<&bVB6*vdS6>4-J|)6n73O*T;7XUum7=vkFf zR)MSnSp~8RWEIFNkX0b7KvseOO$FpUB_#h#3%&X)YzqHP*Eqv=^e})k6AlOCV$Aeu z#ORQ6IhP3Ov4pylwprs$0X_b&$9e93V@0$JLtXz@4Cm_p_#f)V7w6~C*{2r$?V#DT z&p0zq!M<5^3a2BP$Z6kh1l|qiK`Y{QNbB3*I(4sIC#QCMo6RB~w8&}sTb^@sDW0preM8PaycCUp{6`_6GkB{FI{)*~E~xF_tvL z5@HL8J_AP{$sxVopZ^?V5)C7_x0hd`2e?0$= z<_BMap>pgW@G=XscXdn5m()TFhP?2{{w2Pc#QyqScXeW7YZx&2gL|wH|9DQJhGUvQ z`ZGzo9pfYTTYMpR((WVm|2he>41d6~M(uzJU(p{TOO-NylaSaq`r;sCY5D8#v4Y8u zSbXo#A1hLXJnt6YVN#vv9pn4z#d#+w50mGv>7?Q#aliM*86_*_q0;7D;+N;Dpx=7q z9E|&^7axy*|9f%#wb(Yj#6Kjem9hW)?e9{|_>jG{z+r>z3W@DktC z=5&jUr_JN84#2Muz+H{Ms&y{#+EC!PgQ8O<;nU3B3twF>UAj0=?&8w&TxrQ&URbzV dzUE#l%`KJP^nsqt`I3{oXt*Z>J(&Vd)87mv0QUd@ literal 0 HcmV?d00001 diff --git a/326285/test1.c b/326285/test1.c new file mode 100644 index 0000000..c5bc64c --- /dev/null +++ b/326285/test1.c @@ -0,0 +1 @@ +void doit1() { char buff[256] ; } diff --git a/326285/test2.c b/326285/test2.c new file mode 100644 index 0000000..f92ef70 --- /dev/null +++ b/326285/test2.c @@ -0,0 +1 @@ +void doit2() { char buff[256] ; } diff --git a/332927/crash.c b/332927/crash.c new file mode 100644 index 0000000..6a8ff58 --- /dev/null +++ b/332927/crash.c @@ -0,0 +1,23 @@ +#include +#include +#include +#include + +#if ( __WORD_BITS__ == 32 ) +typedef Elf32_auxv_t auxv_t; +#else +typedef Elf64_auxv_t auxv_t; +#endif + +int main( int argc, char const* argv[] ) +{ + auxv_t *auxv; + for( ; *argv; argv++ ) ; /* skip argv... */ + argv++; /* skip null */ + for( ; *argv; argv++ ) ; /* skip envp... */ + argv++; /* skip null */ + for ( auxv = (auxv_t *)argv; auxv->a_type != AT_NULL; auxv++ ) + printf( "auxv: type %zu, value 0x%zx\n", auxv->a_type, auxv->a_un.a_val ); + getpwnam( "root" ); + return 0; +} diff --git a/334889/Makefile b/334889/Makefile new file mode 100644 index 0000000..b8aef51 --- /dev/null +++ b/334889/Makefile @@ -0,0 +1,3 @@ +FILES = boxdraw smbios console +OBJS = $(FILES:%=%.o) +libfoo.a: libfoo.a($(OBJS)) diff --git a/334889/boxdraw.c b/334889/boxdraw.c new file mode 100644 index 0000000..e69de29 diff --git a/334889/console.c b/334889/console.c new file mode 100644 index 0000000..e69de29 diff --git a/334889/libfoo.a b/334889/libfoo.a new file mode 100644 index 0000000000000000000000000000000000000000..63c971e9f9ae896dc297e0e63a7298122b06b907 GIT binary patch literal 2054 zcmeHI%}T>S5S}*mFP^*!UbZI{+cjxZi6SLXYA@o=dy_QKB56t!u%3JkAHk!Krca^*Y4aOclC2t7PDoyjkaajHe*H_D(;L~%k-fRC|Hi9$ub-LhMZnFdwB{lY@>W!n@LhWc~=_NH2?P?=OJ(1jdHFTh)Ff|J?~?7=p` zpx3)%Cxc*`L=m%ihns9>a-+d!lb~sE^qgjH03JVuiR+zPMLqvyk$m&7Td9Mp0%wd%MNUsL>!f+bY>#~9ef zwJyJbTsq&tRTM{nv!WAi$|aGyQ?S#3*naA)77F z5u+aM;37?Om?`|`R-gYOF10W6q*Bk9epORm4L&|qKVfazy>e7r`6QITszc=8Di;t) z!;`;>9BLo*IP@k_yc}=#`+R4=7mRJ@TlUqFhN9KZ*D+4tg8Bv>g(soP-^};l&UgBU PC!3G@-_ExfY9GD;OwoXJ literal 0 HcmV?d00001 diff --git a/334889/smbios.c b/334889/smbios.c new file mode 100644 index 0000000..e69de29 diff --git a/353816/busybox.c b/353816/busybox.c new file mode 100644 index 0000000..f7abb0e --- /dev/null +++ b/353816/busybox.c @@ -0,0 +1,3 @@ +#include +char buf[8192]; +main(int argc, char **argv) { memmove(buf, buf + argc, argc % 4); } diff --git a/353816/busybox.i b/353816/busybox.i new file mode 100644 index 0000000..d4f8960 --- /dev/null +++ b/353816/busybox.i @@ -0,0 +1,21 @@ +typedef long unsigned int size_t; +extern __inline __attribute__ ((__always_inline__)) + __attribute__ ((__gnu_inline__, __artificial__)) +void * + __attribute__ ((__nothrow__)) memmove(void *__dest, const void *__src, + size_t __len) +{ + return __builtin___memmove_chk(__dest, __src, __len, + __builtin_object_size(__dest, 0)); +}; + +char bb_common_bufsiz1[8192]; +int main(int argc __attribute__ ((__unused__)), char **argv) +{ + while (*argv) { + size_t buf_len = 0; + size_t max_len = 50; + memmove(bb_common_bufsiz1, + bb_common_bufsiz1 + buf_len - max_len, max_len); + } +} diff --git a/353816/busybox.i.0 b/353816/busybox.i.0 new file mode 100644 index 0000000..2ce5dd7 --- /dev/null +++ b/353816/busybox.i.0 @@ -0,0 +1,5336 @@ +typedef signed char int8_t; +typedef short int int16_t; +typedef int int32_t; +typedef long int int64_t; +typedef unsigned char uint8_t; +typedef unsigned short int uint16_t; +typedef unsigned int uint32_t; +typedef unsigned long int uint64_t; +typedef signed char int_least8_t; +typedef short int int_least16_t; +typedef int int_least32_t; +typedef long int int_least64_t; +typedef unsigned char uint_least8_t; +typedef unsigned short int uint_least16_t; +typedef unsigned int uint_least32_t; +typedef unsigned long int uint_least64_t; +typedef signed char int_fast8_t; +typedef long int int_fast16_t; +typedef long int int_fast32_t; +typedef long int int_fast64_t; +typedef unsigned char uint_fast8_t; +typedef unsigned long int uint_fast16_t; +typedef unsigned long int uint_fast32_t; +typedef unsigned long int uint_fast64_t; +typedef long int intptr_t; +typedef unsigned long int uintptr_t; +typedef long int intmax_t; +typedef unsigned long int uintmax_t; +typedef int bb__aliased_int __attribute__((__may_alias__)); +typedef uint16_t bb__aliased_uint16_t __attribute__((__may_alias__)); +typedef uint32_t bb__aliased_uint32_t __attribute__((__may_alias__)); +typedef signed char smallint; +typedef unsigned char smalluint; +typedef unsigned char __u_char; +typedef unsigned short int __u_short; +typedef unsigned int __u_int; +typedef unsigned long int __u_long; +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; +typedef signed long int __int64_t; +typedef unsigned long int __uint64_t; +typedef long int __quad_t; +typedef unsigned long int __u_quad_t; +typedef unsigned long int __dev_t; +typedef unsigned int __uid_t; +typedef unsigned int __gid_t; +typedef unsigned long int __ino_t; +typedef unsigned long int __ino64_t; +typedef unsigned int __mode_t; +typedef unsigned long int __nlink_t; +typedef long int __off_t; +typedef long int __off64_t; +typedef int __pid_t; +typedef struct { int __val[2]; } __fsid_t; +typedef long int __clock_t; +typedef unsigned long int __rlim_t; +typedef unsigned long int __rlim64_t; +typedef unsigned int __id_t; +typedef long int __time_t; +typedef unsigned int __useconds_t; +typedef long int __suseconds_t; +typedef int __daddr_t; +typedef long int __swblk_t; +typedef int __key_t; +typedef int __clockid_t; +typedef void * __timer_t; +typedef long int __blksize_t; +typedef long int __blkcnt_t; +typedef long int __blkcnt64_t; +typedef unsigned long int __fsblkcnt_t; +typedef unsigned long int __fsblkcnt64_t; +typedef unsigned long int __fsfilcnt_t; +typedef unsigned long int __fsfilcnt64_t; +typedef long int __ssize_t; +typedef __off64_t __loff_t; +typedef __quad_t *__qaddr_t; +typedef char *__caddr_t; +typedef long int __intptr_t; +typedef unsigned int __socklen_t; +enum +{ + _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), + _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), + _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), + _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), + _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), + _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), + _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), + _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), + _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), + _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), + _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), + _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) +}; +extern const unsigned short int **__ctype_b_loc (void) + __attribute__ ((__nothrow__)) __attribute__ ((const)); +extern const __int32_t **__ctype_tolower_loc (void) + __attribute__ ((__nothrow__)) __attribute__ ((const)); +extern const __int32_t **__ctype_toupper_loc (void) + __attribute__ ((__nothrow__)) __attribute__ ((const)); +extern int isalnum (int) __attribute__ ((__nothrow__)); +extern int isalpha (int) __attribute__ ((__nothrow__)); +extern int iscntrl (int) __attribute__ ((__nothrow__)); +extern int isdigit (int) __attribute__ ((__nothrow__)); +extern int islower (int) __attribute__ ((__nothrow__)); +extern int isgraph (int) __attribute__ ((__nothrow__)); +extern int isprint (int) __attribute__ ((__nothrow__)); +extern int ispunct (int) __attribute__ ((__nothrow__)); +extern int isspace (int) __attribute__ ((__nothrow__)); +extern int isupper (int) __attribute__ ((__nothrow__)); +extern int isxdigit (int) __attribute__ ((__nothrow__)); +extern int tolower (int __c) __attribute__ ((__nothrow__)); +extern int toupper (int __c) __attribute__ ((__nothrow__)); +extern int isblank (int) __attribute__ ((__nothrow__)); +extern int isctype (int __c, int __mask) __attribute__ ((__nothrow__)); +extern int isascii (int __c) __attribute__ ((__nothrow__)); +extern int toascii (int __c) __attribute__ ((__nothrow__)); +extern int _toupper (int) __attribute__ ((__nothrow__)); +extern int _tolower (int) __attribute__ ((__nothrow__)); +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) tolower (int __c) +{ + return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c; +} +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) toupper (int __c) +{ + return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c; +} +typedef struct __locale_struct +{ + struct __locale_data *__locales[13]; + const unsigned short int *__ctype_b; + const int *__ctype_tolower; + const int *__ctype_toupper; + const char *__names[13]; +} *__locale_t; +typedef __locale_t locale_t; +extern int isalnum_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isalpha_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int iscntrl_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isdigit_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int islower_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isgraph_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isprint_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int ispunct_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isspace_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isupper_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isxdigit_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isblank_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int __tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); +extern int tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); +extern int __toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); +extern int toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); +typedef __ino64_t ino_t; +typedef __ino64_t ino64_t; +struct dirent + { + __ino64_t d_ino; + __off64_t d_off; + unsigned short int d_reclen; + unsigned char d_type; + char d_name[256]; + }; +struct dirent64 + { + __ino64_t d_ino; + __off64_t d_off; + unsigned short int d_reclen; + unsigned char d_type; + char d_name[256]; + }; +enum + { + DT_UNKNOWN = 0, + DT_FIFO = 1, + DT_CHR = 2, + DT_DIR = 4, + DT_BLK = 6, + DT_REG = 8, + DT_LNK = 10, + DT_SOCK = 12, + DT_WHT = 14 + }; +typedef struct __dirstream DIR; +extern DIR *opendir (const char *__name) __attribute__ ((__nonnull__ (1))); +extern DIR *fdopendir (int __fd); +extern int closedir (DIR *__dirp) __attribute__ ((__nonnull__ (1))); +extern struct dirent *readdir (DIR *__dirp) __asm__ ("" "readdir64") + __attribute__ ((__nonnull__ (1))); +extern struct dirent64 *readdir64 (DIR *__dirp) __attribute__ ((__nonnull__ (1))); +extern int readdir_r (DIR *__restrict __dirp, struct dirent *__restrict __entry, struct dirent **__restrict __result) __asm__ ("" "readdir64_r") + __attribute__ ((__nonnull__ (1, 2, 3))); +extern int readdir64_r (DIR *__restrict __dirp, + struct dirent64 *__restrict __entry, + struct dirent64 **__restrict __result) + __attribute__ ((__nonnull__ (1, 2, 3))); +extern void rewinddir (DIR *__dirp) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern void seekdir (DIR *__dirp, long int __pos) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern long int telldir (DIR *__dirp) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int dirfd (DIR *__dirp) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +typedef long unsigned int size_t; +extern int scandir (const char *__restrict __dir, struct dirent ***__restrict __namelist, int (*__selector) (const struct dirent *), int (*__cmp) (const struct dirent **, const struct dirent **)) __asm__ ("" "scandir64") + __attribute__ ((__nonnull__ (1, 2))); +extern int scandir64 (const char *__restrict __dir, + struct dirent64 ***__restrict __namelist, + int (*__selector) (const struct dirent64 *), + int (*__cmp) (const struct dirent64 **, + const struct dirent64 **)) + __attribute__ ((__nonnull__ (1, 2))); +extern int alphasort (const struct dirent **__e1, const struct dirent **__e2) __asm__ ("" "alphasort64") __attribute__ ((__nothrow__)) + __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern int alphasort64 (const struct dirent64 **__e1, + const struct dirent64 **__e2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern __ssize_t getdirentries (int __fd, char *__restrict __buf, size_t __nbytes, __off64_t *__restrict __basep) __asm__ ("" "getdirentries64") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (2, 4))); +extern __ssize_t getdirentries64 (int __fd, char *__restrict __buf, + size_t __nbytes, + __off64_t *__restrict __basep) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); +extern int versionsort (const struct dirent **__e1, const struct dirent **__e2) __asm__ ("" "versionsort64") __attribute__ ((__nothrow__)) + __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern int versionsort64 (const struct dirent64 **__e1, + const struct dirent64 **__e2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern int *__errno_location (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern char *program_invocation_name, *program_invocation_short_name; +typedef int error_t; +typedef __u_char u_char; +typedef __u_short u_short; +typedef __u_int u_int; +typedef __u_long u_long; +typedef __quad_t quad_t; +typedef __u_quad_t u_quad_t; +typedef __fsid_t fsid_t; +typedef __loff_t loff_t; +typedef __dev_t dev_t; +typedef __gid_t gid_t; +typedef __mode_t mode_t; +typedef __nlink_t nlink_t; +typedef __uid_t uid_t; +typedef __off64_t off_t; +typedef __off64_t off64_t; +typedef __pid_t pid_t; +typedef __id_t id_t; +typedef __ssize_t ssize_t; +typedef __daddr_t daddr_t; +typedef __caddr_t caddr_t; +typedef __key_t key_t; +typedef __clock_t clock_t; +typedef __time_t time_t; +typedef __clockid_t clockid_t; +typedef __timer_t timer_t; +typedef __useconds_t useconds_t; +typedef __suseconds_t suseconds_t; +typedef unsigned long int ulong; +typedef unsigned short int ushort; +typedef unsigned int uint; +typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); +typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); +typedef int register_t __attribute__ ((__mode__ (__word__))); +typedef int __sig_atomic_t; +typedef struct + { + unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; + } __sigset_t; +typedef __sigset_t sigset_t; +struct timespec + { + __time_t tv_sec; + long int tv_nsec; + }; +struct timeval + { + __time_t tv_sec; + __suseconds_t tv_usec; + }; +typedef long int __fd_mask; +typedef struct + { + __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; + } fd_set; +typedef __fd_mask fd_mask; +extern int select (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + struct timeval *__restrict __timeout); +extern int pselect (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + const struct timespec *__restrict __timeout, + const __sigset_t *__restrict __sigmask); +__extension__ +extern unsigned int gnu_dev_major (unsigned long long int __dev) + __attribute__ ((__nothrow__)); +__extension__ +extern unsigned int gnu_dev_minor (unsigned long long int __dev) + __attribute__ ((__nothrow__)); +__extension__ +extern unsigned long long int gnu_dev_makedev (unsigned int __major, + unsigned int __minor) + __attribute__ ((__nothrow__)); +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int +__attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev) +{ + return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); +} +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int +__attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev) +{ + return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); +} +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned long long int +__attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor) +{ + return ((__minor & 0xff) | ((__major & 0xfff) << 8) + | (((unsigned long long int) (__minor & ~0xff)) << 12) + | (((unsigned long long int) (__major & ~0xfff)) << 32)); +} +typedef __blksize_t blksize_t; +typedef __blkcnt64_t blkcnt_t; +typedef __fsblkcnt64_t fsblkcnt_t; +typedef __fsfilcnt64_t fsfilcnt_t; +typedef __blkcnt64_t blkcnt64_t; +typedef __fsblkcnt64_t fsblkcnt64_t; +typedef __fsfilcnt64_t fsfilcnt64_t; +typedef unsigned long int pthread_t; +typedef union +{ + char __size[56]; + long int __align; +} pthread_attr_t; +typedef struct __pthread_internal_list +{ + struct __pthread_internal_list *__prev; + struct __pthread_internal_list *__next; +} __pthread_list_t; +typedef union +{ + struct __pthread_mutex_s + { + int __lock; + unsigned int __count; + int __owner; + unsigned int __nusers; + int __kind; + int __spins; + __pthread_list_t __list; + } __data; + char __size[40]; + long int __align; +} pthread_mutex_t; +typedef union +{ + char __size[4]; + int __align; +} pthread_mutexattr_t; +typedef union +{ + struct + { + int __lock; + unsigned int __futex; + __extension__ unsigned long long int __total_seq; + __extension__ unsigned long long int __wakeup_seq; + __extension__ unsigned long long int __woken_seq; + void *__mutex; + unsigned int __nwaiters; + unsigned int __broadcast_seq; + } __data; + char __size[48]; + __extension__ long long int __align; +} pthread_cond_t; +typedef union +{ + char __size[4]; + int __align; +} pthread_condattr_t; +typedef unsigned int pthread_key_t; +typedef int pthread_once_t; +typedef union +{ + struct + { + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + int __writer; + int __shared; + unsigned long int __pad1; + unsigned long int __pad2; + unsigned int __flags; + } __data; + char __size[56]; + long int __align; +} pthread_rwlock_t; +typedef union +{ + char __size[8]; + long int __align; +} pthread_rwlockattr_t; +typedef volatile int pthread_spinlock_t; +typedef union +{ + char __size[32]; + long int __align; +} pthread_barrier_t; +typedef union +{ + char __size[4]; + int __align; +} pthread_barrierattr_t; +struct iovec + { + void *iov_base; + size_t iov_len; + }; +struct flock + { + short int l_type; + short int l_whence; + __off64_t l_start; + __off64_t l_len; + __pid_t l_pid; + }; +struct flock64 + { + short int l_type; + short int l_whence; + __off64_t l_start; + __off64_t l_len; + __pid_t l_pid; + }; +enum __pid_type + { + F_OWNER_TID = 0, + F_OWNER_PID, + F_OWNER_PGRP, + F_OWNER_GID = F_OWNER_PGRP + }; +struct f_owner_ex + { + enum __pid_type type; + __pid_t pid; + }; +extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) + __attribute__ ((__nothrow__)); +extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count, + unsigned int __flags); +extern ssize_t vmsplice (int __fdout, const struct iovec *__iov, + size_t __count, unsigned int __flags); +extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, + unsigned int __flags); +extern ssize_t tee (int __fdin, int __fdout, size_t __len, + unsigned int __flags); +extern int fallocate (int __fd, int __mode, __off64_t __offset, __off64_t __len) __asm__ ("" "fallocate64") + ; +extern int fallocate64 (int __fd, int __mode, __off64_t __offset, + __off64_t __len); +struct stat + { + __dev_t st_dev; + __ino_t st_ino; + __nlink_t st_nlink; + __mode_t st_mode; + __uid_t st_uid; + __gid_t st_gid; + int __pad0; + __dev_t st_rdev; + __off_t st_size; + __blksize_t st_blksize; + __blkcnt_t st_blocks; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; + long int __unused[3]; + }; +struct stat64 + { + __dev_t st_dev; + __ino64_t st_ino; + __nlink_t st_nlink; + __mode_t st_mode; + __uid_t st_uid; + __gid_t st_gid; + int __pad0; + __dev_t st_rdev; + __off_t st_size; + __blksize_t st_blksize; + __blkcnt64_t st_blocks; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; + long int __unused[3]; + }; +extern int fcntl (int __fd, int __cmd, ...); +extern int open (const char *__file, int __oflag, ...) __asm__ ("" "open64") + __attribute__ ((__nonnull__ (1))); +extern int open64 (const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1))); +extern int openat (int __fd, const char *__file, int __oflag, ...) __asm__ ("" "openat64") + __attribute__ ((__nonnull__ (2))); +extern int openat64 (int __fd, const char *__file, int __oflag, ...) + __attribute__ ((__nonnull__ (2))); +extern int creat (const char *__file, __mode_t __mode) __asm__ ("" "creat64") + __attribute__ ((__nonnull__ (1))); +extern int creat64 (const char *__file, __mode_t __mode) __attribute__ ((__nonnull__ (1))); +extern int lockf (int __fd, int __cmd, __off64_t __len) __asm__ ("" "lockf64"); +extern int lockf64 (int __fd, int __cmd, __off64_t __len); +extern int posix_fadvise (int __fd, __off64_t __offset, __off64_t __len, int __advise) __asm__ ("" "posix_fadvise64") __attribute__ ((__nothrow__)) + ; +extern int posix_fadvise64 (int __fd, __off64_t __offset, __off64_t __len, + int __advise) __attribute__ ((__nothrow__)); +extern int posix_fallocate (int __fd, __off64_t __offset, __off64_t __len) __asm__ ("" "posix_fallocate64") + ; +extern int posix_fallocate64 (int __fd, __off64_t __offset, __off64_t __len); +extern int __open_2 (const char *__path, int __oflag) __asm__ ("" "__open64_2") + __attribute__ ((__nonnull__ (1))); +extern int __open_alias (const char *__path, int __oflag, ...) __asm__ ("" "open64") + __attribute__ ((__nonnull__ (1))); +extern void __open_too_many_args (void) __attribute__((__error__ ("open can be called either with 2 or 3 arguments, not more"))) + ; +extern void __open_missing_mode (void) __attribute__((__error__ ("open with O_CREAT in second argument needs 3 arguments"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +open (const char *__path, int __oflag, ...) +{ + if (__builtin_va_arg_pack_len () > 1) + __open_too_many_args (); + if (__builtin_constant_p (__oflag)) + { + if ((__oflag & 0100) != 0 && __builtin_va_arg_pack_len () < 1) + { + __open_missing_mode (); + return __open_2 (__path, __oflag); + } + return __open_alias (__path, __oflag, __builtin_va_arg_pack ()); + } + if (__builtin_va_arg_pack_len () < 1) + return __open_2 (__path, __oflag); + return __open_alias (__path, __oflag, __builtin_va_arg_pack ()); +} +extern int __open64_2 (const char *__path, int __oflag) __attribute__ ((__nonnull__ (1))); +extern int __open64_alias (const char *__path, int __oflag, ...) __asm__ ("" "open64") + __attribute__ ((__nonnull__ (1))); +extern void __open64_too_many_args (void) __attribute__((__error__ ("open64 can be called either with 2 or 3 arguments, not more"))) + ; +extern void __open64_missing_mode (void) __attribute__((__error__ ("open64 with O_CREAT in second argument needs 3 arguments"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +open64 (const char *__path, int __oflag, ...) +{ + if (__builtin_va_arg_pack_len () > 1) + __open64_too_many_args (); + if (__builtin_constant_p (__oflag)) + { + if ((__oflag & 0100) != 0 && __builtin_va_arg_pack_len () < 1) + { + __open64_missing_mode (); + return __open64_2 (__path, __oflag); + } + return __open64_alias (__path, __oflag, __builtin_va_arg_pack ()); + } + if (__builtin_va_arg_pack_len () < 1) + return __open64_2 (__path, __oflag); + return __open64_alias (__path, __oflag, __builtin_va_arg_pack ()); +} +extern int __openat_2 (int __fd, const char *__path, int __oflag) __asm__ ("" "__openat64_2") + __attribute__ ((__nonnull__ (2))); +extern int __openat_alias (int __fd, const char *__path, int __oflag, ...) __asm__ ("" "openat64") + __attribute__ ((__nonnull__ (2))); +extern void __openat_too_many_args (void) __attribute__((__error__ ("openat can be called either with 3 or 4 arguments, not more"))) + ; +extern void __openat_missing_mode (void) __attribute__((__error__ ("openat with O_CREAT in third argument needs 4 arguments"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +openat (int __fd, const char *__path, int __oflag, ...) +{ + if (__builtin_va_arg_pack_len () > 1) + __openat_too_many_args (); + if (__builtin_constant_p (__oflag)) + { + if ((__oflag & 0100) != 0 && __builtin_va_arg_pack_len () < 1) + { + __openat_missing_mode (); + return __openat_2 (__fd, __path, __oflag); + } + return __openat_alias (__fd, __path, __oflag, __builtin_va_arg_pack ()); + } + if (__builtin_va_arg_pack_len () < 1) + return __openat_2 (__fd, __path, __oflag); + return __openat_alias (__fd, __path, __oflag, __builtin_va_arg_pack ()); +} +extern int __openat64_2 (int __fd, const char *__path, int __oflag) + __attribute__ ((__nonnull__ (2))); +extern int __openat64_alias (int __fd, const char *__path, int __oflag, ...) __asm__ ("" "openat64") + __attribute__ ((__nonnull__ (2))); +extern void __openat64_too_many_args (void) __attribute__((__error__ ("openat64 can be called either with 3 or 4 arguments, not more"))) + ; +extern void __openat64_missing_mode (void) __attribute__((__error__ ("openat64 with O_CREAT in third argument needs 4 arguments"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +openat64 (int __fd, const char *__path, int __oflag, ...) +{ + if (__builtin_va_arg_pack_len () > 1) + __openat64_too_many_args (); + if (__builtin_constant_p (__oflag)) + { + if ((__oflag & 0100) != 0 && __builtin_va_arg_pack_len () < 1) + { + __openat64_missing_mode (); + return __openat64_2 (__fd, __path, __oflag); + } + return __openat64_alias (__fd, __path, __oflag, __builtin_va_arg_pack ()); + } + if (__builtin_va_arg_pack_len () < 1) + return __openat64_2 (__fd, __path, __oflag); + return __openat64_alias (__fd, __path, __oflag, __builtin_va_arg_pack ()); +} +typedef int __gwchar_t; +typedef struct + { + long int quot; + long int rem; + } imaxdiv_t; +extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern intmax_t strtoimax (const char *__restrict __nptr, + char **__restrict __endptr, int __base) __attribute__ ((__nothrow__)); +extern uintmax_t strtoumax (const char *__restrict __nptr, + char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__)); +extern intmax_t wcstoimax (const __gwchar_t *__restrict __nptr, + __gwchar_t **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)); +extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr, + __gwchar_t ** __restrict __endptr, int __base) + __attribute__ ((__nothrow__)); +extern long int __strtol_internal (const char *__restrict __nptr, + char **__restrict __endptr, + int __base, int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern __inline __attribute__ ((__gnu_inline__)) intmax_t +__attribute__ ((__nothrow__)) strtoimax (const char *__restrict nptr, char **__restrict endptr, int base) +{ + return __strtol_internal (nptr, endptr, base, 0); +} +extern unsigned long int __strtoul_internal (const char * + __restrict __nptr, + char ** __restrict __endptr, + int __base, int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern __inline __attribute__ ((__gnu_inline__)) uintmax_t +__attribute__ ((__nothrow__)) strtoumax (const char *__restrict nptr, char **__restrict endptr, int base) +{ + return __strtoul_internal (nptr, endptr, base, 0); +} +extern long int __wcstol_internal (const __gwchar_t * __restrict __nptr, + __gwchar_t **__restrict __endptr, + int __base, int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern __inline __attribute__ ((__gnu_inline__)) intmax_t +__attribute__ ((__nothrow__)) wcstoimax (const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) +{ + return __wcstol_internal (nptr, endptr, base, 0); +} +extern unsigned long int __wcstoul_internal (const __gwchar_t * + __restrict __nptr, + __gwchar_t ** + __restrict __endptr, + int __base, int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern __inline __attribute__ ((__gnu_inline__)) uintmax_t +__attribute__ ((__nothrow__)) wcstoumax (const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) +{ + return __wcstoul_internal (nptr, endptr, base, 0); +} +extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count) + __attribute__ ((__warn_unused_result__)); +extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count) + __attribute__ ((__warn_unused_result__)); +extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count, __off64_t __offset) __asm__ ("" "preadv64") + __attribute__ ((__warn_unused_result__)); +extern ssize_t pwritev (int __fd, const struct iovec *__iovec, int __count, __off64_t __offset) __asm__ ("" "pwritev64") + __attribute__ ((__warn_unused_result__)); +extern ssize_t preadv64 (int __fd, const struct iovec *__iovec, int __count, + __off64_t __offset) __attribute__ ((__warn_unused_result__)); +extern ssize_t pwritev64 (int __fd, const struct iovec *__iovec, int __count, + __off64_t __offset) __attribute__ ((__warn_unused_result__)); +typedef __socklen_t socklen_t; +enum __socket_type +{ + SOCK_STREAM = 1, + SOCK_DGRAM = 2, + SOCK_RAW = 3, + SOCK_RDM = 4, + SOCK_SEQPACKET = 5, + SOCK_DCCP = 6, + SOCK_PACKET = 10, + SOCK_CLOEXEC = 02000000, + SOCK_NONBLOCK = 04000 +}; +typedef unsigned short int sa_family_t; +struct sockaddr + { + sa_family_t sa_family; + char sa_data[14]; + }; +struct sockaddr_storage + { + sa_family_t ss_family; + unsigned long int __ss_align; + char __ss_padding[(128 - (2 * sizeof (unsigned long int)))]; + }; +enum + { + MSG_OOB = 0x01, + MSG_PEEK = 0x02, + MSG_DONTROUTE = 0x04, + MSG_TRYHARD = MSG_DONTROUTE, + MSG_CTRUNC = 0x08, + MSG_PROXY = 0x10, + MSG_TRUNC = 0x20, + MSG_DONTWAIT = 0x40, + MSG_EOR = 0x80, + MSG_WAITALL = 0x100, + MSG_FIN = 0x200, + MSG_SYN = 0x400, + MSG_CONFIRM = 0x800, + MSG_RST = 0x1000, + MSG_ERRQUEUE = 0x2000, + MSG_NOSIGNAL = 0x4000, + MSG_MORE = 0x8000, + MSG_WAITFORONE = 0x10000, + MSG_CMSG_CLOEXEC = 0x40000000 + }; +struct msghdr + { + void *msg_name; + socklen_t msg_namelen; + struct iovec *msg_iov; + size_t msg_iovlen; + void *msg_control; + size_t msg_controllen; + int msg_flags; + }; +struct mmsghdr + { + struct msghdr msg_hdr; + unsigned int msg_len; + }; +struct cmsghdr + { + size_t cmsg_len; + int cmsg_level; + int cmsg_type; + __extension__ unsigned char __cmsg_data []; + }; +extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, + struct cmsghdr *__cmsg) __attribute__ ((__nothrow__)); +extern __inline __attribute__ ((__gnu_inline__)) struct cmsghdr * +__attribute__ ((__nothrow__)) __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) +{ + if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) + return 0; + __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg + + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1))); + if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control + + __mhdr->msg_controllen) + || ((unsigned char *) __cmsg + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1)) + > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) + return 0; + return __cmsg; +} +enum + { + SCM_RIGHTS = 0x01 + , SCM_CREDENTIALS = 0x02 + }; +struct ucred +{ + pid_t pid; + uid_t uid; + gid_t gid; +}; +struct linger + { + int l_onoff; + int l_linger; + }; +extern int recvmmsg (int __fd, struct mmsghdr *__vmessages, + unsigned int __vlen, int __flags, + const struct timespec *__tmo); +struct osockaddr + { + unsigned short int sa_family; + unsigned char sa_data[14]; + }; +enum +{ + SHUT_RD = 0, + SHUT_WR, + SHUT_RDWR +}; +typedef union { struct sockaddr *__restrict __sockaddr__; struct sockaddr_at *__restrict __sockaddr_at__; struct sockaddr_ax25 *__restrict __sockaddr_ax25__; struct sockaddr_dl *__restrict __sockaddr_dl__; struct sockaddr_eon *__restrict __sockaddr_eon__; struct sockaddr_in *__restrict __sockaddr_in__; struct sockaddr_in6 *__restrict __sockaddr_in6__; struct sockaddr_inarp *__restrict __sockaddr_inarp__; struct sockaddr_ipx *__restrict __sockaddr_ipx__; struct sockaddr_iso *__restrict __sockaddr_iso__; struct sockaddr_ns *__restrict __sockaddr_ns__; struct sockaddr_un *__restrict __sockaddr_un__; struct sockaddr_x25 *__restrict __sockaddr_x25__; + } __SOCKADDR_ARG __attribute__ ((__transparent_union__)); +typedef union { const struct sockaddr *__restrict __sockaddr__; const struct sockaddr_at *__restrict __sockaddr_at__; const struct sockaddr_ax25 *__restrict __sockaddr_ax25__; const struct sockaddr_dl *__restrict __sockaddr_dl__; const struct sockaddr_eon *__restrict __sockaddr_eon__; const struct sockaddr_in *__restrict __sockaddr_in__; const struct sockaddr_in6 *__restrict __sockaddr_in6__; const struct sockaddr_inarp *__restrict __sockaddr_inarp__; const struct sockaddr_ipx *__restrict __sockaddr_ipx__; const struct sockaddr_iso *__restrict __sockaddr_iso__; const struct sockaddr_ns *__restrict __sockaddr_ns__; const struct sockaddr_un *__restrict __sockaddr_un__; const struct sockaddr_x25 *__restrict __sockaddr_x25__; + } __CONST_SOCKADDR_ARG __attribute__ ((__transparent_union__)); +extern int socket (int __domain, int __type, int __protocol) __attribute__ ((__nothrow__)); +extern int socketpair (int __domain, int __type, int __protocol, + int __fds[2]) __attribute__ ((__nothrow__)); +extern int bind (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len) + __attribute__ ((__nothrow__)); +extern int getsockname (int __fd, __SOCKADDR_ARG __addr, + socklen_t *__restrict __len) __attribute__ ((__nothrow__)); +extern int connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len); +extern int getpeername (int __fd, __SOCKADDR_ARG __addr, + socklen_t *__restrict __len) __attribute__ ((__nothrow__)); +extern ssize_t send (int __fd, const void *__buf, size_t __n, int __flags); +extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags); +extern ssize_t sendto (int __fd, const void *__buf, size_t __n, + int __flags, __CONST_SOCKADDR_ARG __addr, + socklen_t __addr_len); +extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n, + int __flags, __SOCKADDR_ARG __addr, + socklen_t *__restrict __addr_len); +extern ssize_t sendmsg (int __fd, const struct msghdr *__message, + int __flags); +extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags); +extern int getsockopt (int __fd, int __level, int __optname, + void *__restrict __optval, + socklen_t *__restrict __optlen) __attribute__ ((__nothrow__)); +extern int setsockopt (int __fd, int __level, int __optname, + const void *__optval, socklen_t __optlen) __attribute__ ((__nothrow__)); +extern int listen (int __fd, int __n) __attribute__ ((__nothrow__)); +extern int accept (int __fd, __SOCKADDR_ARG __addr, + socklen_t *__restrict __addr_len); +extern int accept4 (int __fd, __SOCKADDR_ARG __addr, + socklen_t *__restrict __addr_len, int __flags); +extern int shutdown (int __fd, int __how) __attribute__ ((__nothrow__)); +extern int sockatmark (int __fd) __attribute__ ((__nothrow__)); +extern int isfdtype (int __fd, int __fdtype) __attribute__ ((__nothrow__)); +extern ssize_t __recv_chk (int __fd, void *__buf, size_t __n, size_t __buflen, + int __flags); +extern ssize_t __recv_alias (int __fd, void *__buf, size_t __n, int __flags) __asm__ ("" "recv") + ; +extern ssize_t __recv_chk_warn (int __fd, void *__buf, size_t __n, size_t __buflen, int __flags) __asm__ ("" "__recv_chk") + __attribute__((__warning__ ("recv called with bigger length than size of destination " "buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) ssize_t +recv (int __fd, void *__buf, size_t __n, int __flags) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __recv_chk (__fd, __buf, __n, __builtin_object_size (__buf, 0), __flags); + if (__n > __builtin_object_size (__buf, 0)) + return __recv_chk_warn (__fd, __buf, __n, __builtin_object_size (__buf, 0), __flags); + } + return __recv_alias (__fd, __buf, __n, __flags); +} +extern ssize_t __recvfrom_chk (int __fd, void *__restrict __buf, size_t __n, + size_t __buflen, int __flags, + __SOCKADDR_ARG __addr, + socklen_t *__restrict __addr_len); +extern ssize_t __recvfrom_alias (int __fd, void *__restrict __buf, size_t __n, int __flags, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len) __asm__ ("" "recvfrom") + ; +extern ssize_t __recvfrom_chk_warn (int __fd, void *__restrict __buf, size_t __n, size_t __buflen, int __flags, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len) __asm__ ("" "__recvfrom_chk") + __attribute__((__warning__ ("recvfrom called with bigger length than size of " "destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) ssize_t +recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags, + __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __recvfrom_chk (__fd, __buf, __n, __builtin_object_size (__buf, 0), __flags, + __addr, __addr_len); + if (__n > __builtin_object_size (__buf, 0)) + return __recvfrom_chk_warn (__fd, __buf, __n, __builtin_object_size (__buf, 0), __flags, + __addr, __addr_len); + } + return __recvfrom_alias (__fd, __buf, __n, __flags, __addr, __addr_len); +} +enum + { + IPPROTO_IP = 0, + IPPROTO_HOPOPTS = 0, + IPPROTO_ICMP = 1, + IPPROTO_IGMP = 2, + IPPROTO_IPIP = 4, + IPPROTO_TCP = 6, + IPPROTO_EGP = 8, + IPPROTO_PUP = 12, + IPPROTO_UDP = 17, + IPPROTO_IDP = 22, + IPPROTO_TP = 29, + IPPROTO_DCCP = 33, + IPPROTO_IPV6 = 41, + IPPROTO_ROUTING = 43, + IPPROTO_FRAGMENT = 44, + IPPROTO_RSVP = 46, + IPPROTO_GRE = 47, + IPPROTO_ESP = 50, + IPPROTO_AH = 51, + IPPROTO_ICMPV6 = 58, + IPPROTO_NONE = 59, + IPPROTO_DSTOPTS = 60, + IPPROTO_MTP = 92, + IPPROTO_ENCAP = 98, + IPPROTO_PIM = 103, + IPPROTO_COMP = 108, + IPPROTO_SCTP = 132, + IPPROTO_UDPLITE = 136, + IPPROTO_RAW = 255, + IPPROTO_MAX + }; +typedef uint16_t in_port_t; +enum + { + IPPORT_ECHO = 7, + IPPORT_DISCARD = 9, + IPPORT_SYSTAT = 11, + IPPORT_DAYTIME = 13, + IPPORT_NETSTAT = 15, + IPPORT_FTP = 21, + IPPORT_TELNET = 23, + IPPORT_SMTP = 25, + IPPORT_TIMESERVER = 37, + IPPORT_NAMESERVER = 42, + IPPORT_WHOIS = 43, + IPPORT_MTP = 57, + IPPORT_TFTP = 69, + IPPORT_RJE = 77, + IPPORT_FINGER = 79, + IPPORT_TTYLINK = 87, + IPPORT_SUPDUP = 95, + IPPORT_EXECSERVER = 512, + IPPORT_LOGINSERVER = 513, + IPPORT_CMDSERVER = 514, + IPPORT_EFSSERVER = 520, + IPPORT_BIFFUDP = 512, + IPPORT_WHOSERVER = 513, + IPPORT_ROUTESERVER = 520, + IPPORT_RESERVED = 1024, + IPPORT_USERRESERVED = 5000 + }; +typedef uint32_t in_addr_t; +struct in_addr + { + in_addr_t s_addr; + }; +struct in6_addr + { + union + { + uint8_t __u6_addr8[16]; + uint16_t __u6_addr16[8]; + uint32_t __u6_addr32[4]; + } __in6_u; + }; +extern const struct in6_addr in6addr_any; +extern const struct in6_addr in6addr_loopback; +struct sockaddr_in + { + sa_family_t sin_family; + in_port_t sin_port; + struct in_addr sin_addr; + unsigned char sin_zero[sizeof (struct sockaddr) - + (sizeof (unsigned short int)) - + sizeof (in_port_t) - + sizeof (struct in_addr)]; + }; +struct sockaddr_in6 + { + sa_family_t sin6_family; + in_port_t sin6_port; + uint32_t sin6_flowinfo; + struct in6_addr sin6_addr; + uint32_t sin6_scope_id; + }; +struct ip_mreq + { + struct in_addr imr_multiaddr; + struct in_addr imr_interface; + }; +struct ip_mreq_source + { + struct in_addr imr_multiaddr; + struct in_addr imr_interface; + struct in_addr imr_sourceaddr; + }; +struct ipv6_mreq + { + struct in6_addr ipv6mr_multiaddr; + unsigned int ipv6mr_interface; + }; +struct group_req + { + uint32_t gr_interface; + struct sockaddr_storage gr_group; + }; +struct group_source_req + { + uint32_t gsr_interface; + struct sockaddr_storage gsr_group; + struct sockaddr_storage gsr_source; + }; +struct ip_msfilter + { + struct in_addr imsf_multiaddr; + struct in_addr imsf_interface; + uint32_t imsf_fmode; + uint32_t imsf_numsrc; + struct in_addr imsf_slist[1]; + }; +struct group_filter + { + uint32_t gf_interface; + struct sockaddr_storage gf_group; + uint32_t gf_fmode; + uint32_t gf_numsrc; + struct sockaddr_storage gf_slist[1]; +}; +struct ip_opts + { + struct in_addr ip_dst; + char ip_opts[40]; + }; +struct ip_mreqn + { + struct in_addr imr_multiaddr; + struct in_addr imr_address; + int imr_ifindex; + }; +struct in_pktinfo + { + int ipi_ifindex; + struct in_addr ipi_spec_dst; + struct in_addr ipi_addr; + }; +extern uint32_t ntohl (uint32_t __netlong) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern uint16_t ntohs (uint16_t __netshort) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern uint32_t htonl (uint32_t __hostlong) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern uint16_t htons (uint16_t __hostshort) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) __attribute__ ((__nothrow__)); +extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in) + __attribute__ ((__nothrow__)); +struct in6_pktinfo + { + struct in6_addr ipi6_addr; + unsigned int ipi6_ifindex; + }; +struct ip6_mtuinfo + { + struct sockaddr_in6 ip6m_addr; + uint32_t ip6m_mtu; + }; +extern int inet6_option_space (int __nbytes) + __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); +extern int inet6_option_init (void *__bp, struct cmsghdr **__cmsgp, + int __type) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); +extern int inet6_option_append (struct cmsghdr *__cmsg, + const uint8_t *__typep, int __multx, + int __plusy) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); +extern uint8_t *inet6_option_alloc (struct cmsghdr *__cmsg, int __datalen, + int __multx, int __plusy) + __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); +extern int inet6_option_next (const struct cmsghdr *__cmsg, + uint8_t **__tptrp) + __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); +extern int inet6_option_find (const struct cmsghdr *__cmsg, + uint8_t **__tptrp, int __type) + __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); +extern int inet6_opt_init (void *__extbuf, socklen_t __extlen) __attribute__ ((__nothrow__)); +extern int inet6_opt_append (void *__extbuf, socklen_t __extlen, int __offset, + uint8_t __type, socklen_t __len, uint8_t __align, + void **__databufp) __attribute__ ((__nothrow__)); +extern int inet6_opt_finish (void *__extbuf, socklen_t __extlen, int __offset) + __attribute__ ((__nothrow__)); +extern int inet6_opt_set_val (void *__databuf, int __offset, void *__val, + socklen_t __vallen) __attribute__ ((__nothrow__)); +extern int inet6_opt_next (void *__extbuf, socklen_t __extlen, int __offset, + uint8_t *__typep, socklen_t *__lenp, + void **__databufp) __attribute__ ((__nothrow__)); +extern int inet6_opt_find (void *__extbuf, socklen_t __extlen, int __offset, + uint8_t __type, socklen_t *__lenp, + void **__databufp) __attribute__ ((__nothrow__)); +extern int inet6_opt_get_val (void *__databuf, int __offset, void *__val, + socklen_t __vallen) __attribute__ ((__nothrow__)); +extern socklen_t inet6_rth_space (int __type, int __segments) __attribute__ ((__nothrow__)); +extern void *inet6_rth_init (void *__bp, socklen_t __bp_len, int __type, + int __segments) __attribute__ ((__nothrow__)); +extern int inet6_rth_add (void *__bp, const struct in6_addr *__addr) __attribute__ ((__nothrow__)); +extern int inet6_rth_reverse (const void *__in, void *__out) __attribute__ ((__nothrow__)); +extern int inet6_rth_segments (const void *__bp) __attribute__ ((__nothrow__)); +extern struct in6_addr *inet6_rth_getaddr (const void *__bp, int __index) + __attribute__ ((__nothrow__)); +extern int getipv4sourcefilter (int __s, struct in_addr __interface_addr, + struct in_addr __group, uint32_t *__fmode, + uint32_t *__numsrc, struct in_addr *__slist) + __attribute__ ((__nothrow__)); +extern int setipv4sourcefilter (int __s, struct in_addr __interface_addr, + struct in_addr __group, uint32_t __fmode, + uint32_t __numsrc, + const struct in_addr *__slist) + __attribute__ ((__nothrow__)); +extern int getsourcefilter (int __s, uint32_t __interface_addr, + const struct sockaddr *__group, + socklen_t __grouplen, uint32_t *__fmode, + uint32_t *__numsrc, + struct sockaddr_storage *__slist) __attribute__ ((__nothrow__)); +extern int setsourcefilter (int __s, uint32_t __interface_addr, + const struct sockaddr *__group, + socklen_t __grouplen, uint32_t __fmode, + uint32_t __numsrc, + const struct sockaddr_storage *__slist) __attribute__ ((__nothrow__)); +struct rpcent +{ + char *r_name; + char **r_aliases; + int r_number; +}; +extern void setrpcent (int __stayopen) __attribute__ ((__nothrow__)); +extern void endrpcent (void) __attribute__ ((__nothrow__)); +extern struct rpcent *getrpcbyname (const char *__name) __attribute__ ((__nothrow__)); +extern struct rpcent *getrpcbynumber (int __number) __attribute__ ((__nothrow__)); +extern struct rpcent *getrpcent (void) __attribute__ ((__nothrow__)); +extern int getrpcbyname_r (const char *__name, struct rpcent *__result_buf, + char *__buffer, size_t __buflen, + struct rpcent **__result) __attribute__ ((__nothrow__)); +extern int getrpcbynumber_r (int __number, struct rpcent *__result_buf, + char *__buffer, size_t __buflen, + struct rpcent **__result) __attribute__ ((__nothrow__)); +extern int getrpcent_r (struct rpcent *__result_buf, char *__buffer, + size_t __buflen, struct rpcent **__result) __attribute__ ((__nothrow__)); +typedef union sigval + { + int sival_int; + void *sival_ptr; + } sigval_t; +typedef struct sigevent + { + sigval_t sigev_value; + int sigev_signo; + int sigev_notify; + union + { + int _pad[((64 / sizeof (int)) - 4)]; + __pid_t _tid; + struct + { + void (*_function) (sigval_t); + void *_attribute; + } _sigev_thread; + } _sigev_un; + } sigevent_t; +enum +{ + SIGEV_SIGNAL = 0, + SIGEV_NONE, + SIGEV_THREAD, + SIGEV_THREAD_ID = 4 +}; +struct netent +{ + char *n_name; + char **n_aliases; + int n_addrtype; + uint32_t n_net; +}; +extern int *__h_errno_location (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern void herror (const char *__str) __attribute__ ((__nothrow__)); +extern const char *hstrerror (int __err_num) __attribute__ ((__nothrow__)); +struct hostent +{ + char *h_name; + char **h_aliases; + int h_addrtype; + int h_length; + char **h_addr_list; +}; +extern void sethostent (int __stay_open); +extern void endhostent (void); +extern struct hostent *gethostent (void); +extern struct hostent *gethostbyaddr (const void *__addr, __socklen_t __len, + int __type); +extern struct hostent *gethostbyname (const char *__name); +extern struct hostent *gethostbyname2 (const char *__name, int __af); +extern int gethostent_r (struct hostent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct hostent **__restrict __result, + int *__restrict __h_errnop); +extern int gethostbyaddr_r (const void *__restrict __addr, __socklen_t __len, + int __type, + struct hostent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct hostent **__restrict __result, + int *__restrict __h_errnop); +extern int gethostbyname_r (const char *__restrict __name, + struct hostent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct hostent **__restrict __result, + int *__restrict __h_errnop); +extern int gethostbyname2_r (const char *__restrict __name, int __af, + struct hostent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct hostent **__restrict __result, + int *__restrict __h_errnop); +extern void setnetent (int __stay_open); +extern void endnetent (void); +extern struct netent *getnetent (void); +extern struct netent *getnetbyaddr (uint32_t __net, int __type); +extern struct netent *getnetbyname (const char *__name); +extern int getnetent_r (struct netent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct netent **__restrict __result, + int *__restrict __h_errnop); +extern int getnetbyaddr_r (uint32_t __net, int __type, + struct netent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct netent **__restrict __result, + int *__restrict __h_errnop); +extern int getnetbyname_r (const char *__restrict __name, + struct netent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct netent **__restrict __result, + int *__restrict __h_errnop); +struct servent +{ + char *s_name; + char **s_aliases; + int s_port; + char *s_proto; +}; +extern void setservent (int __stay_open); +extern void endservent (void); +extern struct servent *getservent (void); +extern struct servent *getservbyname (const char *__name, + const char *__proto); +extern struct servent *getservbyport (int __port, const char *__proto); +extern int getservent_r (struct servent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct servent **__restrict __result); +extern int getservbyname_r (const char *__restrict __name, + const char *__restrict __proto, + struct servent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct servent **__restrict __result); +extern int getservbyport_r (int __port, const char *__restrict __proto, + struct servent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct servent **__restrict __result); +struct protoent +{ + char *p_name; + char **p_aliases; + int p_proto; +}; +extern void setprotoent (int __stay_open); +extern void endprotoent (void); +extern struct protoent *getprotoent (void); +extern struct protoent *getprotobyname (const char *__name); +extern struct protoent *getprotobynumber (int __proto); +extern int getprotoent_r (struct protoent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct protoent **__restrict __result); +extern int getprotobyname_r (const char *__restrict __name, + struct protoent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct protoent **__restrict __result); +extern int getprotobynumber_r (int __proto, + struct protoent *__restrict __result_buf, + char *__restrict __buf, size_t __buflen, + struct protoent **__restrict __result); +extern int setnetgrent (const char *__netgroup); +extern void endnetgrent (void); +extern int getnetgrent (char **__restrict __hostp, + char **__restrict __userp, + char **__restrict __domainp); +extern int innetgr (const char *__netgroup, const char *__host, + const char *__user, const char *__domain); +extern int getnetgrent_r (char **__restrict __hostp, + char **__restrict __userp, + char **__restrict __domainp, + char *__restrict __buffer, size_t __buflen); +extern int rcmd (char **__restrict __ahost, unsigned short int __rport, + const char *__restrict __locuser, + const char *__restrict __remuser, + const char *__restrict __cmd, int *__restrict __fd2p); +extern int rcmd_af (char **__restrict __ahost, unsigned short int __rport, + const char *__restrict __locuser, + const char *__restrict __remuser, + const char *__restrict __cmd, int *__restrict __fd2p, + sa_family_t __af); +extern int rexec (char **__restrict __ahost, int __rport, + const char *__restrict __name, + const char *__restrict __pass, + const char *__restrict __cmd, int *__restrict __fd2p); +extern int rexec_af (char **__restrict __ahost, int __rport, + const char *__restrict __name, + const char *__restrict __pass, + const char *__restrict __cmd, int *__restrict __fd2p, + sa_family_t __af); +extern int ruserok (const char *__rhost, int __suser, + const char *__remuser, const char *__locuser); +extern int ruserok_af (const char *__rhost, int __suser, + const char *__remuser, const char *__locuser, + sa_family_t __af); +extern int iruserok (uint32_t __raddr, int __suser, + const char *__remuser, const char *__locuser); +extern int iruserok_af (const void *__raddr, int __suser, + const char *__remuser, const char *__locuser, + sa_family_t __af); +extern int rresvport (int *__alport); +extern int rresvport_af (int *__alport, sa_family_t __af); +struct addrinfo +{ + int ai_flags; + int ai_family; + int ai_socktype; + int ai_protocol; + socklen_t ai_addrlen; + struct sockaddr *ai_addr; + char *ai_canonname; + struct addrinfo *ai_next; +}; +struct gaicb +{ + const char *ar_name; + const char *ar_service; + const struct addrinfo *ar_request; + struct addrinfo *ar_result; + int __return; + int __unused[5]; +}; +extern int getaddrinfo (const char *__restrict __name, + const char *__restrict __service, + const struct addrinfo *__restrict __req, + struct addrinfo **__restrict __pai); +extern void freeaddrinfo (struct addrinfo *__ai) __attribute__ ((__nothrow__)); +extern const char *gai_strerror (int __ecode) __attribute__ ((__nothrow__)); +extern int getnameinfo (const struct sockaddr *__restrict __sa, + socklen_t __salen, char *__restrict __host, + socklen_t __hostlen, char *__restrict __serv, + socklen_t __servlen, unsigned int __flags); +extern int getaddrinfo_a (int __mode, struct gaicb *__list[__restrict], + int __ent, struct sigevent *__restrict __sig); +extern int gai_suspend (const struct gaicb *const __list[], int __ent, + const struct timespec *__timeout); +extern int gai_error (struct gaicb *__req) __attribute__ ((__nothrow__)); +extern int gai_cancel (struct gaicb *__gaicbp) __attribute__ ((__nothrow__)); +typedef long int __jmp_buf[8]; +struct __jmp_buf_tag + { + __jmp_buf __jmpbuf; + int __mask_was_saved; + __sigset_t __saved_mask; + }; +typedef struct __jmp_buf_tag jmp_buf[1]; +extern int setjmp (jmp_buf __env) __attribute__ ((__nothrow__)); +extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __attribute__ ((__nothrow__)); +extern int _setjmp (struct __jmp_buf_tag __env[1]) __attribute__ ((__nothrow__)); +extern void longjmp (struct __jmp_buf_tag __env[1], int __val) + __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); +extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) + __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); +typedef struct __jmp_buf_tag sigjmp_buf[1]; +extern void siglongjmp (sigjmp_buf __env, int __val) + __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); +extern void longjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) + __attribute__ ((__noreturn__)); +extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) + __attribute__ ((__noreturn__)); +extern void siglongjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) + __attribute__ ((__noreturn__)); +extern int __sigismember (const __sigset_t *, int); +extern int __sigaddset (__sigset_t *, int); +extern int __sigdelset (__sigset_t *, int); +extern __inline __attribute__ ((__gnu_inline__)) int __sigismember (const __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return (__set->__val[__word] & __mask) ? 1 : 0; } +extern __inline __attribute__ ((__gnu_inline__)) int __sigaddset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] |= __mask), 0); } +extern __inline __attribute__ ((__gnu_inline__)) int __sigdelset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] &= ~__mask), 0); } +typedef __sig_atomic_t sig_atomic_t; +typedef struct siginfo + { + int si_signo; + int si_errno; + int si_code; + union + { + int _pad[((128 / sizeof (int)) - 4)]; + struct + { + __pid_t si_pid; + __uid_t si_uid; + } _kill; + struct + { + int si_tid; + int si_overrun; + sigval_t si_sigval; + } _timer; + struct + { + __pid_t si_pid; + __uid_t si_uid; + sigval_t si_sigval; + } _rt; + struct + { + __pid_t si_pid; + __uid_t si_uid; + int si_status; + __clock_t si_utime; + __clock_t si_stime; + } _sigchld; + struct + { + void *si_addr; + } _sigfault; + struct + { + long int si_band; + int si_fd; + } _sigpoll; + } _sifields; + } siginfo_t; +enum +{ + SI_ASYNCNL = -60, + SI_TKILL = -6, + SI_SIGIO, + SI_ASYNCIO, + SI_MESGQ, + SI_TIMER, + SI_QUEUE, + SI_USER, + SI_KERNEL = 0x80 +}; +enum +{ + ILL_ILLOPC = 1, + ILL_ILLOPN, + ILL_ILLADR, + ILL_ILLTRP, + ILL_PRVOPC, + ILL_PRVREG, + ILL_COPROC, + ILL_BADSTK +}; +enum +{ + FPE_INTDIV = 1, + FPE_INTOVF, + FPE_FLTDIV, + FPE_FLTOVF, + FPE_FLTUND, + FPE_FLTRES, + FPE_FLTINV, + FPE_FLTSUB +}; +enum +{ + SEGV_MAPERR = 1, + SEGV_ACCERR +}; +enum +{ + BUS_ADRALN = 1, + BUS_ADRERR, + BUS_OBJERR +}; +enum +{ + TRAP_BRKPT = 1, + TRAP_TRACE +}; +enum +{ + CLD_EXITED = 1, + CLD_KILLED, + CLD_DUMPED, + CLD_TRAPPED, + CLD_STOPPED, + CLD_CONTINUED +}; +enum +{ + POLL_IN = 1, + POLL_OUT, + POLL_MSG, + POLL_ERR, + POLL_PRI, + POLL_HUP +}; +typedef void (*__sighandler_t) (int); +extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) + __attribute__ ((__nothrow__)); +extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler) + __attribute__ ((__nothrow__)); +extern __sighandler_t signal (int __sig, __sighandler_t __handler) + __attribute__ ((__nothrow__)); +extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler) + __attribute__ ((__nothrow__)); +extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__)); +extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__)); +extern int raise (int __sig) __attribute__ ((__nothrow__)); +extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) + __attribute__ ((__nothrow__)); +extern int gsignal (int __sig) __attribute__ ((__nothrow__)); +extern void psignal (int __sig, const char *__s); +extern void psiginfo (const siginfo_t *__pinfo, const char *__s); +extern int __sigpause (int __sig_or_mask, int __is_sig); +extern int sigpause (int __sig) __asm__ ("__xpg_sigpause"); +extern int sigblock (int __mask) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); +extern int sigsetmask (int __mask) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); +extern int siggetmask (void) __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); +typedef __sighandler_t sighandler_t; +typedef __sighandler_t sig_t; +extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int sigismember (const sigset_t *__set, int __signo) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int sigisemptyset (const sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int sigandset (sigset_t *__set, const sigset_t *__left, + const sigset_t *__right) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))); +extern int sigorset (sigset_t *__set, const sigset_t *__left, + const sigset_t *__right) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))); +struct sigaction + { + union + { + __sighandler_t sa_handler; + void (*sa_sigaction) (int, siginfo_t *, void *); + } + __sigaction_handler; + __sigset_t sa_mask; + int sa_flags; + void (*sa_restorer) (void); + }; +extern int sigprocmask (int __how, const sigset_t *__restrict __set, + sigset_t *__restrict __oset) __attribute__ ((__nothrow__)); +extern int sigsuspend (const sigset_t *__set) __attribute__ ((__nonnull__ (1))); +extern int sigaction (int __sig, const struct sigaction *__restrict __act, + struct sigaction *__restrict __oact) __attribute__ ((__nothrow__)); +extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig) + __attribute__ ((__nonnull__ (1, 2))); +extern int sigwaitinfo (const sigset_t *__restrict __set, + siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1))); +extern int sigtimedwait (const sigset_t *__restrict __set, + siginfo_t *__restrict __info, + const struct timespec *__restrict __timeout) + __attribute__ ((__nonnull__ (1))); +extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val) + __attribute__ ((__nothrow__)); +extern const char *const _sys_siglist[65]; +extern const char *const sys_siglist[65]; +struct sigvec + { + __sighandler_t sv_handler; + int sv_mask; + int sv_flags; + }; +extern int sigvec (int __sig, const struct sigvec *__vec, + struct sigvec *__ovec) __attribute__ ((__nothrow__)); +struct _fpreg +{ + unsigned short significand[4]; + unsigned short exponent; +}; +struct _fpxreg +{ + unsigned short significand[4]; + unsigned short exponent; + unsigned short padding[3]; +}; +struct _xmmreg +{ + __uint32_t element[4]; +}; +struct _fpstate +{ + __uint16_t cwd; + __uint16_t swd; + __uint16_t ftw; + __uint16_t fop; + __uint64_t rip; + __uint64_t rdp; + __uint32_t mxcsr; + __uint32_t mxcr_mask; + struct _fpxreg _st[8]; + struct _xmmreg _xmm[16]; + __uint32_t padding[24]; +}; +struct sigcontext +{ + unsigned long r8; + unsigned long r9; + unsigned long r10; + unsigned long r11; + unsigned long r12; + unsigned long r13; + unsigned long r14; + unsigned long r15; + unsigned long rdi; + unsigned long rsi; + unsigned long rbp; + unsigned long rbx; + unsigned long rdx; + unsigned long rax; + unsigned long rcx; + unsigned long rsp; + unsigned long rip; + unsigned long eflags; + unsigned short cs; + unsigned short gs; + unsigned short fs; + unsigned short __pad0; + unsigned long err; + unsigned long trapno; + unsigned long oldmask; + unsigned long cr2; + struct _fpstate * fpstate; + unsigned long __reserved1 [8]; +}; +extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__)); +extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__)); +struct sigstack + { + void *ss_sp; + int ss_onstack; + }; +enum +{ + SS_ONSTACK = 1, + SS_DISABLE +}; +typedef struct sigaltstack + { + void *ss_sp; + int ss_flags; + size_t ss_size; + } stack_t; +typedef long int greg_t; +typedef greg_t gregset_t[23]; +enum +{ + REG_R8 = 0, + REG_R9, + REG_R10, + REG_R11, + REG_R12, + REG_R13, + REG_R14, + REG_R15, + REG_RDI, + REG_RSI, + REG_RBP, + REG_RBX, + REG_RDX, + REG_RAX, + REG_RCX, + REG_RSP, + REG_RIP, + REG_EFL, + REG_CSGSFS, + REG_ERR, + REG_TRAPNO, + REG_OLDMASK, + REG_CR2 +}; +struct _libc_fpxreg +{ + unsigned short int significand[4]; + unsigned short int exponent; + unsigned short int padding[3]; +}; +struct _libc_xmmreg +{ + __uint32_t element[4]; +}; +struct _libc_fpstate +{ + __uint16_t cwd; + __uint16_t swd; + __uint16_t ftw; + __uint16_t fop; + __uint64_t rip; + __uint64_t rdp; + __uint32_t mxcsr; + __uint32_t mxcr_mask; + struct _libc_fpxreg _st[8]; + struct _libc_xmmreg _xmm[16]; + __uint32_t padding[24]; +}; +typedef struct _libc_fpstate *fpregset_t; +typedef struct + { + gregset_t gregs; + fpregset_t fpregs; + unsigned long __reserved1 [8]; +} mcontext_t; +typedef struct ucontext + { + unsigned long int uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + __sigset_t uc_sigmask; + struct _libc_fpstate __fpregs_mem; + } ucontext_t; +extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) + __attribute__ ((__nothrow__)) __attribute__ ((__deprecated__)); +extern int sigaltstack (const struct sigaltstack *__restrict __ss, + struct sigaltstack *__restrict __oss) __attribute__ ((__nothrow__)); +extern int sighold (int __sig) __attribute__ ((__nothrow__)); +extern int sigrelse (int __sig) __attribute__ ((__nothrow__)); +extern int sigignore (int __sig) __attribute__ ((__nothrow__)); +extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __attribute__ ((__nothrow__)); +extern int pthread_sigmask (int __how, + const __sigset_t *__restrict __newmask, + __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__)); +extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__)); +extern int pthread_sigqueue (pthread_t __threadid, int __signo, + const union sigval __value) __attribute__ ((__nothrow__)); +extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__)); +extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__)); +struct _IO_FILE; +typedef struct _IO_FILE FILE; +typedef struct _IO_FILE __FILE; +typedef struct +{ + int __count; + union + { + unsigned int __wch; + char __wchb[4]; + } __value; +} __mbstate_t; +typedef struct +{ + __off_t __pos; + __mbstate_t __state; +} _G_fpos_t; +typedef struct +{ + __off64_t __pos; + __mbstate_t __state; +} _G_fpos64_t; +typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); +typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); +typedef __builtin_va_list __gnuc_va_list; +struct _IO_jump_t; struct _IO_FILE; +typedef void _IO_lock_t; +struct _IO_marker { + struct _IO_marker *_next; + struct _IO_FILE *_sbuf; + int _pos; +}; +enum __codecvt_result +{ + __codecvt_ok, + __codecvt_partial, + __codecvt_error, + __codecvt_noconv +}; +struct _IO_FILE { + int _flags; + char* _IO_read_ptr; + char* _IO_read_end; + char* _IO_read_base; + char* _IO_write_base; + char* _IO_write_ptr; + char* _IO_write_end; + char* _IO_buf_base; + char* _IO_buf_end; + char *_IO_save_base; + char *_IO_backup_base; + char *_IO_save_end; + struct _IO_marker *_markers; + struct _IO_FILE *_chain; + int _fileno; + int _flags2; + __off_t _old_offset; + unsigned short _cur_column; + signed char _vtable_offset; + char _shortbuf[1]; + _IO_lock_t *_lock; + __off64_t _offset; + void *__pad1; + void *__pad2; + void *__pad3; + void *__pad4; + size_t __pad5; + int _mode; + char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; +}; +typedef struct _IO_FILE _IO_FILE; +struct _IO_FILE_plus; +extern struct _IO_FILE_plus _IO_2_1_stdin_; +extern struct _IO_FILE_plus _IO_2_1_stdout_; +extern struct _IO_FILE_plus _IO_2_1_stderr_; +typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); +typedef __ssize_t __io_write_fn (void *__cookie, const char *__buf, + size_t __n); +typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); +typedef int __io_close_fn (void *__cookie); +typedef __io_read_fn cookie_read_function_t; +typedef __io_write_fn cookie_write_function_t; +typedef __io_seek_fn cookie_seek_function_t; +typedef __io_close_fn cookie_close_function_t; +typedef struct +{ + __io_read_fn *read; + __io_write_fn *write; + __io_seek_fn *seek; + __io_close_fn *close; +} _IO_cookie_io_functions_t; +typedef _IO_cookie_io_functions_t cookie_io_functions_t; +struct _IO_cookie_file; +extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, + void *__cookie, _IO_cookie_io_functions_t __fns); +extern int __underflow (_IO_FILE *); +extern int __uflow (_IO_FILE *); +extern int __overflow (_IO_FILE *, int); +extern int _IO_getc (_IO_FILE *__fp); +extern int _IO_putc (int __c, _IO_FILE *__fp); +extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__)); +extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__)); +extern int _IO_peekc_locked (_IO_FILE *__fp); +extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__)); +extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__)); +extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__)); +extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, + __gnuc_va_list, int *__restrict); +extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, + __gnuc_va_list); +extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); +extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); +extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); +extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); +extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__)); +typedef __gnuc_va_list va_list; +typedef _G_fpos64_t fpos_t; +typedef _G_fpos64_t fpos64_t; +extern struct _IO_FILE *stdin; +extern struct _IO_FILE *stdout; +extern struct _IO_FILE *stderr; +extern int remove (const char *__filename) __attribute__ ((__nothrow__)); +extern int rename (const char *__old, const char *__new) __attribute__ ((__nothrow__)); +extern int renameat (int __oldfd, const char *__old, int __newfd, + const char *__new) __attribute__ ((__nothrow__)); +extern FILE *tmpfile (void) __asm__ ("" "tmpfile64") __attribute__ ((__warn_unused_result__)); +extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__)); +extern char *tmpnam (char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern char *tempnam (const char *__dir, const char *__pfx) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); +extern int fclose (FILE *__stream); +extern int fflush (FILE *__stream); +extern int fflush_unlocked (FILE *__stream); +extern int fcloseall (void); +extern FILE *fopen (const char *__restrict __filename, const char *__restrict __modes) __asm__ ("" "fopen64") + __attribute__ ((__warn_unused_result__)); +extern FILE *freopen (const char *__restrict __filename, const char *__restrict __modes, FILE *__restrict __stream) __asm__ ("" "freopen64") + __attribute__ ((__warn_unused_result__)); +extern FILE *fopen64 (const char *__restrict __filename, + const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); +extern FILE *freopen64 (const char *__restrict __filename, + const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern FILE *fdopen (int __fd, const char *__modes) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern FILE *fopencookie (void *__restrict __magic_cookie, + const char *__restrict __modes, + _IO_cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern FILE *fmemopen (void *__s, size_t __len, const char *__modes) + __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__)); +extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, + int __modes, size_t __n) __attribute__ ((__nothrow__)); +extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, + size_t __size) __attribute__ ((__nothrow__)); +extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__)); +extern int fprintf (FILE *__restrict __stream, + const char *__restrict __format, ...); +extern int printf (const char *__restrict __format, ...); +extern int sprintf (char *__restrict __s, + const char *__restrict __format, ...) __attribute__ ((__nothrow__)); +extern int vfprintf (FILE *__restrict __s, const char *__restrict __format, + __gnuc_va_list __arg); +extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg); +extern int vsprintf (char *__restrict __s, const char *__restrict __format, + __gnuc_va_list __arg) __attribute__ ((__nothrow__)); +extern int snprintf (char *__restrict __s, size_t __maxlen, + const char *__restrict __format, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); +extern int vsnprintf (char *__restrict __s, size_t __maxlen, + const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); +extern int vasprintf (char **__restrict __ptr, const char *__restrict __f, + __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__)); +extern int __asprintf (char **__restrict __ptr, + const char *__restrict __fmt, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +extern int asprintf (char **__restrict __ptr, + const char *__restrict __fmt, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +extern int vdprintf (int __fd, const char *__restrict __fmt, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 2, 0))); +extern int dprintf (int __fd, const char *__restrict __fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); +extern int fscanf (FILE *__restrict __stream, + const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); +extern int scanf (const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); +extern int sscanf (const char *__restrict __s, + const char *__restrict __format, ...) __attribute__ ((__nothrow__)); +extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); +extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); +extern int vsscanf (const char *__restrict __s, + const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__scanf__, 2, 0))); +extern int fgetc (FILE *__stream); +extern int getc (FILE *__stream); +extern int getchar (void); +extern int getc_unlocked (FILE *__stream); +extern int getchar_unlocked (void); +extern int fgetc_unlocked (FILE *__stream); +extern int fputc (int __c, FILE *__stream); +extern int putc (int __c, FILE *__stream); +extern int putchar (int __c); +extern int fputc_unlocked (int __c, FILE *__stream); +extern int putc_unlocked (int __c, FILE *__stream); +extern int putchar_unlocked (int __c); +extern int getw (FILE *__stream); +extern int putw (int __w, FILE *__stream); +extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) + __attribute__ ((__warn_unused_result__)); +extern char *gets (char *__s) __attribute__ ((__warn_unused_result__)); +extern char *fgets_unlocked (char *__restrict __s, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern __ssize_t __getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern __ssize_t getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern __ssize_t getline (char **__restrict __lineptr, + size_t *__restrict __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern int fputs (const char *__restrict __s, FILE *__restrict __stream); +extern int puts (const char *__s); +extern int ungetc (int __c, FILE *__stream); +extern size_t fread (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t fwrite (const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __s) __attribute__ ((__warn_unused_result__)); +extern int fputs_unlocked (const char *__restrict __s, + FILE *__restrict __stream); +extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern int fseek (FILE *__stream, long int __off, int __whence); +extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)); +extern void rewind (FILE *__stream); +extern int fseeko (FILE *__stream, __off64_t __off, int __whence) __asm__ ("" "fseeko64") + ; +extern __off64_t ftello (FILE *__stream) __asm__ ("" "ftello64"); +extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos) __asm__ ("" "fgetpos64") + ; +extern int fsetpos (FILE *__stream, const fpos_t *__pos) __asm__ ("" "fsetpos64") + ; +extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); +extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__)); +extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); +extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos); +extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__)); +extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__)); +extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern void perror (const char *__s); +extern int sys_nerr; +extern const char *const sys_errlist[]; +extern int _sys_nerr; +extern const char *const _sys_errlist[]; +extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern FILE *popen (const char *__command, const char *__modes) __attribute__ ((__warn_unused_result__)); +extern int pclose (FILE *__stream); +extern char *ctermid (char *__s) __attribute__ ((__nothrow__)); +extern char *cuserid (char *__s); +struct obstack; +extern int obstack_printf (struct obstack *__restrict __obstack, + const char *__restrict __format, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))); +extern int obstack_vprintf (struct obstack *__restrict __obstack, + const char *__restrict __format, + __gnuc_va_list __args) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))); +extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__)); +extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__)); +extern __inline __attribute__ ((__gnu_inline__)) int +getchar (void) +{ + return _IO_getc (stdin); +} +extern __inline __attribute__ ((__gnu_inline__)) int +fgetc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} +extern __inline __attribute__ ((__gnu_inline__)) int +getc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} +extern __inline __attribute__ ((__gnu_inline__)) int +getchar_unlocked (void) +{ + return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); +} +extern __inline __attribute__ ((__gnu_inline__)) int +putchar (int __c) +{ + return _IO_putc (__c, stdout); +} +extern __inline __attribute__ ((__gnu_inline__)) int +fputc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} +extern __inline __attribute__ ((__gnu_inline__)) int +putc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} +extern __inline __attribute__ ((__gnu_inline__)) int +putchar_unlocked (int __c) +{ + return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); +} +extern __inline __attribute__ ((__gnu_inline__)) __ssize_t +getline (char **__lineptr, size_t *__n, FILE *__stream) +{ + return __getdelim (__lineptr, __n, '\n', __stream); +} +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) feof_unlocked (FILE *__stream) +{ + return (((__stream)->_flags & 0x10) != 0); +} +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) ferror_unlocked (FILE *__stream) +{ + return (((__stream)->_flags & 0x20) != 0); +} +extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, + const char *__restrict __format, ...) __attribute__ ((__nothrow__)); +extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, + const char *__restrict __format, + __gnuc_va_list __ap) __attribute__ ((__nothrow__)); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) sprintf (char *__restrict __s, const char *__restrict __fmt, ...) +{ + return __builtin___sprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) vsprintf (char *__restrict __s, const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __builtin___vsprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} +extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, const char *__restrict __format, + ...) __attribute__ ((__nothrow__)); +extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, const char *__restrict __format, + __gnuc_va_list __ap) __attribute__ ((__nothrow__)); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) snprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, ...) +{ + return __builtin___snprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) vsnprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __builtin___vsnprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} +extern int __fprintf_chk (FILE *__restrict __stream, int __flag, + const char *__restrict __format, ...); +extern int __printf_chk (int __flag, const char *__restrict __format, ...); +extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, + const char *__restrict __format, __gnuc_va_list __ap); +extern int __vprintf_chk (int __flag, const char *__restrict __format, + __gnuc_va_list __ap); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...) +{ + return __fprintf_chk (__stream, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +printf (const char *__restrict __fmt, ...) +{ + return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vprintf (const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vfprintf (FILE *__restrict __stream, + const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap); +} +extern int __asprintf_chk (char **__restrict __ptr, int __flag, + const char *__restrict __fmt, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__)); +extern int __vasprintf_chk (char **__restrict __ptr, int __flag, + const char *__restrict __fmt, __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__)); +extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt, + ...) __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __vdprintf_chk (int __fd, int __flag, + const char *__restrict __fmt, __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 3, 0))); +extern int __obstack_printf_chk (struct obstack *__restrict __obstack, + int __flag, const char *__restrict __format, + ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack, + int __flag, + const char *__restrict __format, + __gnuc_va_list __args) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) __asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +dprintf (int __fd, const char *__restrict __fmt, ...) +{ + return __dprintf_chk (__fd, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) obstack_printf (struct obstack *__restrict __obstack, const char *__restrict __fmt, ...) +{ + return __obstack_printf_chk (__obstack, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) vasprintf (char **__restrict __ptr, const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) obstack_vprintf (struct obstack *__restrict __obstack, const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt, + __ap); +} +extern char *__gets_chk (char *__str, size_t) __attribute__ ((__warn_unused_result__)); +extern char *__gets_warn (char *__str) __asm__ ("" "gets") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use fgets or getline instead, gets can't " "specify buffer size"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +gets (char *__str) +{ + if (__builtin_object_size (__str, 2 > 1) != (size_t) -1) + return __gets_chk (__str, __builtin_object_size (__str, 2 > 1)); + return __gets_warn (__str); +} +extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_alias (__s, __n, __stream); +} +extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + } + return __fread_alias (__ptr, __size, __n, __stream); +} +extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size, + int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked") + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_unlocked_alias (__s, __n, __stream); +} +extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + } + if (__builtin_constant_p (__size) + && __builtin_constant_p (__n) + && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) + && __size * __n <= 8) + { + size_t __cnt = __size * __n; + char *__cptr = (char *) __ptr; + if (__cnt == 0) + return 0; + for (; __cnt > 0; --__cnt) + { + int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++); + if (__c == (-1)) + break; + *__cptr++ = __c; + } + return (__cptr - (char *) __ptr) / __size; + } + return __fread_unlocked_alias (__ptr, __size, __n, __stream); +} +typedef int wchar_t; +union wait + { + int w_status; + struct + { + unsigned int __w_termsig:7; + unsigned int __w_coredump:1; + unsigned int __w_retcode:8; + unsigned int:16; + } __wait_terminated; + struct + { + unsigned int __w_stopval:8; + unsigned int __w_stopsig:8; + unsigned int:16; + } __wait_stopped; + }; +typedef union + { + union wait *__uptr; + int *__iptr; + } __WAIT_STATUS __attribute__ ((__transparent_union__)); +typedef struct + { + int quot; + int rem; + } div_t; +typedef struct + { + long int quot; + long int rem; + } ldiv_t; +__extension__ typedef struct + { + long long int quot; + long long int rem; + } lldiv_t; +extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern double atof (const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int atoi (const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern long int atol (const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +__extension__ extern long long int atoll (const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern double strtod (const char *__restrict __nptr, + char **__restrict __endptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern float strtof (const char *__restrict __nptr, + char **__restrict __endptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern long double strtold (const char *__restrict __nptr, + char **__restrict __endptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern long int strtol (const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern unsigned long int strtoul (const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +__extension__ +extern long long int strtoq (const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +__extension__ +extern unsigned long long int strtouq (const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +__extension__ +extern long long int strtoll (const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +__extension__ +extern unsigned long long int strtoull (const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern long int strtol_l (const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); +extern unsigned long int strtoul_l (const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); +__extension__ +extern long long int strtoll_l (const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); +__extension__ +extern unsigned long long int strtoull_l (const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); +extern double strtod_l (const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); +extern float strtof_l (const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); +extern long double strtold_l (const char *__restrict __nptr, + char **__restrict __endptr, + __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); +extern __inline __attribute__ ((__gnu_inline__)) double +__attribute__ ((__nothrow__)) atof (const char *__nptr) +{ + return strtod (__nptr, (char **) ((void *)0)); +} +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) atoi (const char *__nptr) +{ + return (int) strtol (__nptr, (char **) ((void *)0), 10); +} +extern __inline __attribute__ ((__gnu_inline__)) long int +__attribute__ ((__nothrow__)) atol (const char *__nptr) +{ + return strtol (__nptr, (char **) ((void *)0), 10); +} +__extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int +__attribute__ ((__nothrow__)) atoll (const char *__nptr) +{ + return strtoll (__nptr, (char **) ((void *)0), 10); +} +extern char *l64a (long int __n) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern long int a64l (const char *__s) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern long int random (void) __attribute__ ((__nothrow__)); +extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__)); +extern char *initstate (unsigned int __seed, char *__statebuf, + size_t __statelen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +struct random_data + { + int32_t *fptr; + int32_t *rptr; + int32_t *state; + int rand_type; + int rand_deg; + int rand_sep; + int32_t *end_ptr; + }; +extern int random_r (struct random_data *__restrict __buf, + int32_t *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int srandom_r (unsigned int __seed, struct random_data *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, + size_t __statelen, + struct random_data *__restrict __buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); +extern int setstate_r (char *__restrict __statebuf, + struct random_data *__restrict __buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int rand (void) __attribute__ ((__nothrow__)); +extern void srand (unsigned int __seed) __attribute__ ((__nothrow__)); +extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__)); +extern double drand48 (void) __attribute__ ((__nothrow__)); +extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern long int lrand48 (void) __attribute__ ((__nothrow__)); +extern long int nrand48 (unsigned short int __xsubi[3]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern long int mrand48 (void) __attribute__ ((__nothrow__)); +extern long int jrand48 (unsigned short int __xsubi[3]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern void srand48 (long int __seedval) __attribute__ ((__nothrow__)); +extern unsigned short int *seed48 (unsigned short int __seed16v[3]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +struct drand48_data + { + unsigned short int __x[3]; + unsigned short int __old_x[3]; + unsigned short int __c; + unsigned short int __init; + unsigned long long int __a; + }; +extern int drand48_r (struct drand48_data *__restrict __buffer, + double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int erand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int lrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int nrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int mrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int jrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int srand48_r (long int __seedval, struct drand48_data *__buffer) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int seed48_r (unsigned short int __seed16v[3], + struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int lcong48_r (unsigned short int __param[7], + struct drand48_data *__buffer) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); +extern void *calloc (size_t __nmemb, size_t __size) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); +extern void *realloc (void *__ptr, size_t __size) + __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern void free (void *__ptr) __attribute__ ((__nothrow__)); +extern void cfree (void *__ptr) __attribute__ ((__nothrow__)); +extern void *alloca (size_t __size) __attribute__ ((__nothrow__)); +extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); +extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern void abort (void) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); +extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern void exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); +extern void quick_exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); +extern void _Exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); +extern char *getenv (const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern char *__secure_getenv (const char *__name) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int putenv (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int setenv (const char *__name, const char *__value, int __replace) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int unsetenv (const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int clearenv (void) __attribute__ ((__nothrow__)); +extern char *mktemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkstemp (char *__template) __asm__ ("" "mkstemp64") + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkstemps (char *__template, int __suffixlen) __asm__ ("" "mkstemps64") + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkstemps64 (char *__template, int __suffixlen) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkostemp (char *__template, int __flags) __asm__ ("" "mkostemp64") + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkostemps (char *__template, int __suffixlen, int __flags) __asm__ ("" "mkostemps64") + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkostemps64 (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int system (const char *__command) __attribute__ ((__warn_unused_result__)); +extern char *canonicalize_file_name (const char *__name) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern char *realpath (const char *__restrict __name, + char *__restrict __resolved) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +typedef int (*__compar_fn_t) (const void *, const void *); +typedef __compar_fn_t comparison_fn_t; +typedef int (*__compar_d_fn_t) (const void *, const void *, void *); +extern void *bsearch (const void *__key, const void *__base, + size_t __nmemb, size_t __size, __compar_fn_t __compar) + __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__)); +extern void qsort (void *__base, size_t __nmemb, size_t __size, + __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); +extern void qsort_r (void *__base, size_t __nmemb, size_t __size, + __compar_d_fn_t __compar, void *__arg) + __attribute__ ((__nonnull__ (1, 4))); +extern int abs (int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern long int labs (long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +__extension__ extern long long int llabs (long long int __x) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern div_t div (int __numer, int __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern ldiv_t ldiv (long int __numer, long int __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +__extension__ extern lldiv_t lldiv (long long int __numer, + long long int __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *gcvt (double __value, int __ndigit, char *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); +extern char *qecvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qfcvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qgcvt (long double __value, int __ndigit, char *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); +extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); +extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); +extern int qecvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); +extern int qfcvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); +extern int mblen (const char *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int mbtowc (wchar_t *__restrict __pwc, + const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern size_t mbstowcs (wchar_t *__restrict __pwcs, + const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)); +extern size_t wcstombs (char *__restrict __s, + const wchar_t *__restrict __pwcs, size_t __n) + __attribute__ ((__nothrow__)); +extern int rpmatch (const char *__response) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int getsubopt (char **__restrict __optionp, + char *const *__restrict __tokens, + char **__restrict __valuep) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__)); +extern void setkey (const char *__key) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__)); +extern int grantpt (int __fd) __attribute__ ((__nothrow__)); +extern int unlockpt (int __fd) __attribute__ ((__nothrow__)); +extern char *ptsname (int __fd) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int ptsname_r (int __fd, char *__buf, size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int getpt (void); +extern int getloadavg (double __loadavg[], int __nelem) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern char *__realpath_chk (const char *__restrict __name, + char *__restrict __resolved, + size_t __resolvedlen) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern char *__realpath_alias (const char *__restrict __name, char *__restrict __resolved) __asm__ ("" "realpath") __attribute__ ((__nothrow__)) + __attribute__ ((__warn_unused_result__)); +extern char *__realpath_chk_warn (const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __asm__ ("" "__realpath_chk") __attribute__ ((__nothrow__)) + __attribute__ ((__warn_unused_result__)) + __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +__attribute__ ((__nothrow__)) realpath (const char *__restrict __name, char *__restrict __resolved) +{ + if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1) + { + if (__builtin_object_size (__resolved, 2 > 1) < 4096) + return __realpath_chk_warn (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); + return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); + } + return __realpath_alias (__name, __resolved); +} +extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, + size_t __nreal) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ptsname_r") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) ptsname_r (int __fd, char *__buf, size_t __buflen) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __ptsname_r_alias (__fd, __buf, __buflen); +} +extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int __wctomb_alias (char *__s, wchar_t __wchar) __asm__ ("" "wctomb") __attribute__ ((__nothrow__)) + __attribute__ ((__warn_unused_result__)); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) int +__attribute__ ((__nothrow__)) wctomb (char *__s, wchar_t __wchar) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) + return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1)); + return __wctomb_alias (__s, __wchar); +} +extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, + const char *__restrict __src, + size_t __len, size_t __dstlen) __attribute__ ((__nothrow__)); +extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__)) + ; +extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__mbstowcs_chk") __attribute__ ((__nothrow__)) + __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +__attribute__ ((__nothrow__)) mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __mbstowcs_chk (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) + return __mbstowcs_chk_warn (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + } + return __mbstowcs_alias (__dst, __src, __len); +} +extern size_t __wcstombs_chk (char *__restrict __dst, + const wchar_t *__restrict __src, + size_t __len, size_t __dstlen) __attribute__ ((__nothrow__)); +extern size_t __wcstombs_alias (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len) __asm__ ("" "wcstombs") __attribute__ ((__nothrow__)) + ; +extern size_t __wcstombs_chk_warn (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__wcstombs_chk") __attribute__ ((__nothrow__)) + __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len"))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +__attribute__ ((__nothrow__)) wcstombs (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len) +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + if (__len > __builtin_object_size (__dst, 2 > 1)) + return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + } + return __wcstombs_alias (__dst, __src, __len); +} +typedef long int ptrdiff_t; +extern void *memcpy (void *__restrict __dest, + const void *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern void *memmove (void *__dest, const void *__src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern void *memccpy (void *__restrict __dest, const void *__restrict __src, + int __c, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int memcmp (const void *__s1, const void *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern void *memchr (const void *__s, int __c, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern void *rawmemchr (const void *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern void *memrchr (const void *__s, int __c, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern char *strcpy (char *__restrict __dest, const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *strncpy (char *__restrict __dest, + const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *strcat (char *__restrict __dest, const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *strncat (char *__restrict __dest, const char *__restrict __src, + size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int strcmp (const char *__s1, const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern int strncmp (const char *__s1, const char *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern int strcoll (const char *__s1, const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern size_t strxfrm (char *__restrict __dest, + const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int strcoll_l (const char *__s1, const char *__s2, __locale_t __l) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); +extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n, + __locale_t __l) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); +extern char *strdup (const char *__s) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); +extern char *strndup (const char *__string, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); +extern char *strchr (const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern char *strrchr (const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern char *strchrnul (const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern size_t strcspn (const char *__s, const char *__reject) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern size_t strspn (const char *__s, const char *__accept) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *strpbrk (const char *__s, const char *__accept) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *strstr (const char *__haystack, const char *__needle) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *strtok (char *__restrict __s, const char *__restrict __delim) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern char *__strtok_r (char *__restrict __s, + const char *__restrict __delim, + char **__restrict __save_ptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); +extern char *strtok_r (char *__restrict __s, const char *__restrict __delim, + char **__restrict __save_ptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); +extern char *strcasestr (const char *__haystack, const char *__needle) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern void *memmem (const void *__haystack, size_t __haystacklen, + const void *__needle, size_t __needlelen) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); +extern void *__mempcpy (void *__restrict __dest, + const void *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern void *mempcpy (void *__restrict __dest, + const void *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern size_t strlen (const char *__s) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern size_t strnlen (const char *__string, size_t __maxlen) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern char *strerror (int __errnum) __attribute__ ((__nothrow__)); +extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern char *strerror_l (int __errnum, __locale_t __l) __attribute__ ((__nothrow__)); +extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern void bcopy (const void *__src, void *__dest, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int bcmp (const void *__s1, const void *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *index (const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern char *rindex (const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern int ffsl (long int __l) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +__extension__ extern int ffsll (long long int __ll) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern int strcasecmp (const char *__s1, const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern int strncasecmp (const char *__s1, const char *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern int strcasecmp_l (const char *__s1, const char *__s2, + __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); +extern int strncasecmp_l (const char *__s1, const char *__s2, + size_t __n, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); +extern char *strsep (char **__restrict __stringp, + const char *__restrict __delim) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *strsignal (int __sig) __attribute__ ((__nothrow__)); +extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *stpcpy (char *__restrict __dest, const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *__stpncpy (char *__restrict __dest, + const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *stpncpy (char *__restrict __dest, + const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int strverscmp (const char *__s1, const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *strfry (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern char *basename (const char *__filename) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern void *__rawmemchr (const void *__s, int __c); +extern __inline __attribute__ ((__gnu_inline__)) size_t __strcspn_c1 (const char *__s, int __reject); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strcspn_c1 (const char *__s, int __reject) +{ + register size_t __result = 0; + while (__s[__result] != '\0' && __s[__result] != __reject) + ++__result; + return __result; +} +extern __inline __attribute__ ((__gnu_inline__)) size_t __strcspn_c2 (const char *__s, int __reject1, + int __reject2); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strcspn_c2 (const char *__s, int __reject1, int __reject2) +{ + register size_t __result = 0; + while (__s[__result] != '\0' && __s[__result] != __reject1 + && __s[__result] != __reject2) + ++__result; + return __result; +} +extern __inline __attribute__ ((__gnu_inline__)) size_t __strcspn_c3 (const char *__s, int __reject1, + int __reject2, int __reject3); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strcspn_c3 (const char *__s, int __reject1, int __reject2, + int __reject3) +{ + register size_t __result = 0; + while (__s[__result] != '\0' && __s[__result] != __reject1 + && __s[__result] != __reject2 && __s[__result] != __reject3) + ++__result; + return __result; +} +extern __inline __attribute__ ((__gnu_inline__)) size_t __strspn_c1 (const char *__s, int __accept); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strspn_c1 (const char *__s, int __accept) +{ + register size_t __result = 0; + while (__s[__result] == __accept) + ++__result; + return __result; +} +extern __inline __attribute__ ((__gnu_inline__)) size_t __strspn_c2 (const char *__s, int __accept1, + int __accept2); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strspn_c2 (const char *__s, int __accept1, int __accept2) +{ + register size_t __result = 0; + while (__s[__result] == __accept1 || __s[__result] == __accept2) + ++__result; + return __result; +} +extern __inline __attribute__ ((__gnu_inline__)) size_t __strspn_c3 (const char *__s, int __accept1, + int __accept2, int __accept3); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strspn_c3 (const char *__s, int __accept1, int __accept2, int __accept3) +{ + register size_t __result = 0; + while (__s[__result] == __accept1 || __s[__result] == __accept2 + || __s[__result] == __accept3) + ++__result; + return __result; +} +extern __inline __attribute__ ((__gnu_inline__)) char *__strpbrk_c2 (const char *__s, int __accept1, + int __accept2); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strpbrk_c2 (const char *__s, int __accept1, int __accept2) +{ + while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) + ++__s; + return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; +} +extern __inline __attribute__ ((__gnu_inline__)) char *__strpbrk_c3 (const char *__s, int __accept1, + int __accept2, int __accept3); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strpbrk_c3 (const char *__s, int __accept1, int __accept2, + int __accept3) +{ + while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 + && *__s != __accept3) + ++__s; + return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; +} +extern __inline __attribute__ ((__gnu_inline__)) char *__strtok_r_1c (char *__s, char __sep, char **__nextp); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strtok_r_1c (char *__s, char __sep, char **__nextp) +{ + char *__result; + if (__s == ((void *)0)) + __s = *__nextp; + while (*__s == __sep) + ++__s; + __result = ((void *)0); + if (*__s != '\0') + { + __result = __s++; + while (*__s != '\0') + if (*__s++ == __sep) + { + __s[-1] = '\0'; + break; + } + } + *__nextp = __s; + return __result; +} +extern char *__strsep_g (char **__stringp, const char *__delim); +extern __inline __attribute__ ((__gnu_inline__)) char *__strsep_1c (char **__s, char __reject); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strsep_1c (char **__s, char __reject) +{ + register char *__retval = *__s; + if (__retval != ((void *)0) && (*__s = (__extension__ (__builtin_constant_p (__reject) && !__builtin_constant_p (__retval) && (__reject) == '\0' ? (char *) __rawmemchr (__retval, __reject) : __builtin_strchr (__retval, __reject)))) != ((void *)0)) + *(*__s)++ = '\0'; + return __retval; +} +extern __inline __attribute__ ((__gnu_inline__)) char *__strsep_2c (char **__s, char __reject1, char __reject2); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strsep_2c (char **__s, char __reject1, char __reject2) +{ + register char *__retval = *__s; + if (__retval != ((void *)0)) + { + register char *__cp = __retval; + while (1) + { + if (*__cp == '\0') + { + __cp = ((void *)0); + break; + } + if (*__cp == __reject1 || *__cp == __reject2) + { + *__cp++ = '\0'; + break; + } + ++__cp; + } + *__s = __cp; + } + return __retval; +} +extern __inline __attribute__ ((__gnu_inline__)) char *__strsep_3c (char **__s, char __reject1, char __reject2, + char __reject3); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) +{ + register char *__retval = *__s; + if (__retval != ((void *)0)) + { + register char *__cp = __retval; + while (1) + { + if (*__cp == '\0') + { + __cp = ((void *)0); + break; + } + if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) + { + *__cp++ = '\0'; + break; + } + ++__cp; + } + *__s = __cp; + } + return __retval; +} +extern char *__strdup (const char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); +extern char *__strndup (const char *__string, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); +extern void __warn_memset_zero_len (void) __attribute__((__warning__ ("memset used with constant zero length parameter; this could be due to transposed parameters"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +__attribute__ ((__nothrow__)) memcpy (void *__restrict __dest, const void *__restrict __src, size_t __len) +{ + return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +__attribute__ ((__nothrow__)) memmove (void *__dest, const void *__src, size_t __len) +{ + return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +__attribute__ ((__nothrow__)) mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __len) +{ + return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +__attribute__ ((__nothrow__)) memset (void *__dest, int __ch, size_t __len) +{ + if (__builtin_constant_p (__len) && __len == 0 + && (!__builtin_constant_p (__ch) || __ch != 0)) + { + __warn_memset_zero_len (); + return __dest; + } + return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void +__attribute__ ((__nothrow__)) bcopy (const void *__src, void *__dest, size_t __len) +{ + (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void +__attribute__ ((__nothrow__)) bzero (void *__dest, size_t __len) +{ + (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__nothrow__)) strcpy (char *__restrict __dest, const char *__restrict __src) +{ + return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__nothrow__)) stpcpy (char *__restrict __dest, const char *__restrict __src) +{ + return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__nothrow__)) strncpy (char *__restrict __dest, const char *__restrict __src, size_t __len) +{ + return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); +} +extern char *__stpncpy_chk (char *__dest, const char *__src, size_t __n, + size_t __destlen) __attribute__ ((__nothrow__)); +extern char *__stpncpy_alias (char *__dest, const char *__src, size_t __n) __asm__ ("" "stpncpy") __attribute__ ((__nothrow__)) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__nothrow__)) stpncpy (char *__dest, const char *__src, size_t __n) +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1 + && (!__builtin_constant_p (__n) || __n <= __builtin_object_size (__dest, 2 > 1))) + return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1)); + return __stpncpy_alias (__dest, __src, __n); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__nothrow__)) strcat (char *__restrict __dest, const char *__restrict __src) +{ + return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__nothrow__)) strncat (char *__restrict __dest, const char *__restrict __src, size_t __len) +{ + return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); +} +typedef unsigned long int nfds_t; +struct pollfd + { + int fd; + short int events; + short int revents; + }; +extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout); +extern int ppoll (struct pollfd *__fds, nfds_t __nfds, + const struct timespec *__timeout, + const __sigset_t *__ss); +struct winsize + { + unsigned short int ws_row; + unsigned short int ws_col; + unsigned short int ws_xpixel; + unsigned short int ws_ypixel; + }; +struct termio + { + unsigned short int c_iflag; + unsigned short int c_oflag; + unsigned short int c_cflag; + unsigned short int c_lflag; + unsigned char c_line; + unsigned char c_cc[8]; +}; +extern int ioctl (int __fd, unsigned long int __request, ...) __attribute__ ((__nothrow__)); +extern void * mmap (void *__addr, size_t __len, int __prot, int __flags, int __fd, __off64_t __offset) __asm__ ("" "mmap64") __attribute__ ((__nothrow__)) + ; +extern void *mmap64 (void *__addr, size_t __len, int __prot, + int __flags, int __fd, __off64_t __offset) __attribute__ ((__nothrow__)); +extern int munmap (void *__addr, size_t __len) __attribute__ ((__nothrow__)); +extern int mprotect (void *__addr, size_t __len, int __prot) __attribute__ ((__nothrow__)); +extern int msync (void *__addr, size_t __len, int __flags); +extern int madvise (void *__addr, size_t __len, int __advice) __attribute__ ((__nothrow__)); +extern int posix_madvise (void *__addr, size_t __len, int __advice) __attribute__ ((__nothrow__)); +extern int mlock (const void *__addr, size_t __len) __attribute__ ((__nothrow__)); +extern int munlock (const void *__addr, size_t __len) __attribute__ ((__nothrow__)); +extern int mlockall (int __flags) __attribute__ ((__nothrow__)); +extern int munlockall (void) __attribute__ ((__nothrow__)); +extern int mincore (void *__start, size_t __len, unsigned char *__vec) + __attribute__ ((__nothrow__)); +extern void *mremap (void *__addr, size_t __old_len, size_t __new_len, + int __flags, ...) __attribute__ ((__nothrow__)); +extern int remap_file_pages (void *__start, size_t __size, int __prot, + size_t __pgoff, int __flags) __attribute__ ((__nothrow__)); +extern int shm_open (const char *__name, int __oflag, mode_t __mode); +extern int shm_unlink (const char *__name); +extern int stat (const char *__restrict __file, struct stat *__restrict __buf) __asm__ ("" "stat64") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (1, 2))); +extern int fstat (int __fd, struct stat *__buf) __asm__ ("" "fstat64") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (2))); +extern int stat64 (const char *__restrict __file, + struct stat64 *__restrict __buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int fstat64 (int __fd, struct stat64 *__buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int fstatat (int __fd, const char *__restrict __file, struct stat *__restrict __buf, int __flag) __asm__ ("" "fstatat64") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (2, 3))); +extern int fstatat64 (int __fd, const char *__restrict __file, + struct stat64 *__restrict __buf, int __flag) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); +extern int lstat (const char *__restrict __file, struct stat *__restrict __buf) __asm__ ("" "lstat64") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (1, 2))); +extern int lstat64 (const char *__restrict __file, + struct stat64 *__restrict __buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int chmod (const char *__file, __mode_t __mode) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int lchmod (const char *__file, __mode_t __mode) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int fchmod (int __fd, __mode_t __mode) __attribute__ ((__nothrow__)); +extern int fchmodat (int __fd, const char *__file, __mode_t __mode, + int __flag) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); +extern __mode_t umask (__mode_t __mask) __attribute__ ((__nothrow__)); +extern __mode_t getumask (void) __attribute__ ((__nothrow__)); +extern int mkdir (const char *__path, __mode_t __mode) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int mkdirat (int __fd, const char *__path, __mode_t __mode) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int mknodat (int __fd, const char *__path, __mode_t __mode, + __dev_t __dev) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int mkfifo (const char *__path, __mode_t __mode) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int mkfifoat (int __fd, const char *__path, __mode_t __mode) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int utimensat (int __fd, const char *__path, + const struct timespec __times[2], + int __flags) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int futimens (int __fd, const struct timespec __times[2]) __attribute__ ((__nothrow__)); +extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf) __asm__ ("" "__fxstat64") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (3))); +extern int __xstat (int __ver, const char *__filename, struct stat *__stat_buf) __asm__ ("" "__xstat64") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (2, 3))); +extern int __lxstat (int __ver, const char *__filename, struct stat *__stat_buf) __asm__ ("" "__lxstat64") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (2, 3))); +extern int __fxstatat (int __ver, int __fildes, const char *__filename, struct stat *__stat_buf, int __flag) __asm__ ("" "__fxstatat64") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (3, 4))); +extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))); +extern int __xstat64 (int __ver, const char *__filename, + struct stat64 *__stat_buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); +extern int __lxstat64 (int __ver, const char *__filename, + struct stat64 *__stat_buf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); +extern int __fxstatat64 (int __ver, int __fildes, const char *__filename, + struct stat64 *__stat_buf, int __flag) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))); +extern int __xmknod (int __ver, const char *__path, __mode_t __mode, + __dev_t *__dev) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); +extern int __xmknodat (int __ver, int __fd, const char *__path, + __mode_t __mode, __dev_t *__dev) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 5))); +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) stat (const char *__path, struct stat *__statbuf) +{ + return __xstat (1, __path, __statbuf); +} +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) lstat (const char *__path, struct stat *__statbuf) +{ + return __lxstat (1, __path, __statbuf); +} +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) fstat (int __fd, struct stat *__statbuf) +{ + return __fxstat (1, __fd, __statbuf); +} +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) fstatat (int __fd, const char *__filename, struct stat *__statbuf, int __flag) +{ + return __fxstatat (1, __fd, __filename, __statbuf, __flag); +} +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) mknod (const char *__path, __mode_t __mode, __dev_t __dev) +{ + return __xmknod (0, __path, __mode, &__dev); +} +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) mknodat (int __fd, const char *__path, __mode_t __mode, __dev_t __dev) +{ + return __xmknodat (0, __fd, __path, __mode, &__dev); +} +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) stat64 (const char *__path, struct stat64 *__statbuf) +{ + return __xstat64 (1, __path, __statbuf); +} +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) lstat64 (const char *__path, struct stat64 *__statbuf) +{ + return __lxstat64 (1, __path, __statbuf); +} +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) fstat64 (int __fd, struct stat64 *__statbuf) +{ + return __fxstat64 (1, __fd, __statbuf); +} +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) fstatat64 (int __fd, const char *__filename, struct stat64 *__statbuf, int __flag) +{ + return __fxstatat64 (1, __fd, __filename, __statbuf, __flag); +} +struct timezone + { + int tz_minuteswest; + int tz_dsttime; + }; +typedef struct timezone *__restrict __timezone_ptr_t; +extern int gettimeofday (struct timeval *__restrict __tv, + __timezone_ptr_t __tz) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int settimeofday (const struct timeval *__tv, + const struct timezone *__tz) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int adjtime (const struct timeval *__delta, + struct timeval *__olddelta) __attribute__ ((__nothrow__)); +enum __itimer_which + { + ITIMER_REAL = 0, + ITIMER_VIRTUAL = 1, + ITIMER_PROF = 2 + }; +struct itimerval + { + struct timeval it_interval; + struct timeval it_value; + }; +typedef enum __itimer_which __itimer_which_t; +extern int getitimer (__itimer_which_t __which, + struct itimerval *__value) __attribute__ ((__nothrow__)); +extern int setitimer (__itimer_which_t __which, + const struct itimerval *__restrict __new, + struct itimerval *__restrict __old) __attribute__ ((__nothrow__)); +extern int utimes (const char *__file, const struct timeval __tvp[2]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int lutimes (const char *__file, const struct timeval __tvp[2]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int futimes (int __fd, const struct timeval __tvp[2]) __attribute__ ((__nothrow__)); +extern int futimesat (int __fd, const char *__file, + const struct timeval __tvp[2]) __attribute__ ((__nothrow__)); +enum __rlimit_resource +{ + RLIMIT_CPU = 0, + RLIMIT_FSIZE = 1, + RLIMIT_DATA = 2, + RLIMIT_STACK = 3, + RLIMIT_CORE = 4, + __RLIMIT_RSS = 5, + RLIMIT_NOFILE = 7, + __RLIMIT_OFILE = RLIMIT_NOFILE, + RLIMIT_AS = 9, + __RLIMIT_NPROC = 6, + __RLIMIT_MEMLOCK = 8, + __RLIMIT_LOCKS = 10, + __RLIMIT_SIGPENDING = 11, + __RLIMIT_MSGQUEUE = 12, + __RLIMIT_NICE = 13, + __RLIMIT_RTPRIO = 14, + __RLIMIT_NLIMITS = 15, + __RLIM_NLIMITS = __RLIMIT_NLIMITS +}; +typedef __rlim64_t rlim_t; +typedef __rlim64_t rlim64_t; +struct rlimit + { + rlim_t rlim_cur; + rlim_t rlim_max; + }; +struct rlimit64 + { + rlim64_t rlim_cur; + rlim64_t rlim_max; + }; +enum __rusage_who +{ + RUSAGE_SELF = 0, + RUSAGE_CHILDREN = -1 + , + RUSAGE_THREAD = 1 +}; +struct rusage + { + struct timeval ru_utime; + struct timeval ru_stime; + long int ru_maxrss; + long int ru_ixrss; + long int ru_idrss; + long int ru_isrss; + long int ru_minflt; + long int ru_majflt; + long int ru_nswap; + long int ru_inblock; + long int ru_oublock; + long int ru_msgsnd; + long int ru_msgrcv; + long int ru_nsignals; + long int ru_nvcsw; + long int ru_nivcsw; + }; +enum __priority_which +{ + PRIO_PROCESS = 0, + PRIO_PGRP = 1, + PRIO_USER = 2 +}; +extern int prlimit (__pid_t __pid, enum __rlimit_resource __resource, const struct rlimit *__new_limit, struct rlimit *__old_limit) __asm__ ("" "prlimit64") __attribute__ ((__nothrow__)) + ; +extern int prlimit64 (__pid_t __pid, enum __rlimit_resource __resource, + const struct rlimit64 *__new_limit, + struct rlimit64 *__old_limit) __attribute__ ((__nothrow__)); +typedef enum __rlimit_resource __rlimit_resource_t; +typedef enum __rusage_who __rusage_who_t; +typedef enum __priority_which __priority_which_t; +extern int getrlimit (__rlimit_resource_t __resource, struct rlimit *__rlimits) __asm__ ("" "getrlimit64") __attribute__ ((__nothrow__)) + ; +extern int getrlimit64 (__rlimit_resource_t __resource, + struct rlimit64 *__rlimits) __attribute__ ((__nothrow__)); +extern int setrlimit (__rlimit_resource_t __resource, const struct rlimit *__rlimits) __asm__ ("" "setrlimit64") __attribute__ ((__nothrow__)) + ; +extern int setrlimit64 (__rlimit_resource_t __resource, + const struct rlimit64 *__rlimits) __attribute__ ((__nothrow__)); +extern int getrusage (__rusage_who_t __who, struct rusage *__usage) __attribute__ ((__nothrow__)); +extern int getpriority (__priority_which_t __which, id_t __who) __attribute__ ((__nothrow__)); +extern int setpriority (__priority_which_t __which, id_t __who, int __prio) + __attribute__ ((__nothrow__)); +typedef enum +{ + P_ALL, + P_PID, + P_PGID +} idtype_t; +extern __pid_t wait (__WAIT_STATUS __stat_loc); +extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options); +extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop, + int __options); +struct rusage; +extern __pid_t wait3 (__WAIT_STATUS __stat_loc, int __options, + struct rusage * __usage) __attribute__ ((__nothrow__)); +extern __pid_t wait4 (__pid_t __pid, __WAIT_STATUS __stat_loc, int __options, + struct rusage *__usage) __attribute__ ((__nothrow__)); +typedef unsigned char cc_t; +typedef unsigned int speed_t; +typedef unsigned int tcflag_t; +struct termios + { + tcflag_t c_iflag; + tcflag_t c_oflag; + tcflag_t c_cflag; + tcflag_t c_lflag; + cc_t c_line; + cc_t c_cc[32]; + speed_t c_ispeed; + speed_t c_ospeed; + }; +extern speed_t cfgetospeed (const struct termios *__termios_p) __attribute__ ((__nothrow__)); +extern speed_t cfgetispeed (const struct termios *__termios_p) __attribute__ ((__nothrow__)); +extern int cfsetospeed (struct termios *__termios_p, speed_t __speed) __attribute__ ((__nothrow__)); +extern int cfsetispeed (struct termios *__termios_p, speed_t __speed) __attribute__ ((__nothrow__)); +extern int cfsetspeed (struct termios *__termios_p, speed_t __speed) __attribute__ ((__nothrow__)); +extern int tcgetattr (int __fd, struct termios *__termios_p) __attribute__ ((__nothrow__)); +extern int tcsetattr (int __fd, int __optional_actions, + const struct termios *__termios_p) __attribute__ ((__nothrow__)); +extern void cfmakeraw (struct termios *__termios_p) __attribute__ ((__nothrow__)); +extern int tcsendbreak (int __fd, int __duration) __attribute__ ((__nothrow__)); +extern int tcdrain (int __fd); +extern int tcflush (int __fd, int __queue_selector) __attribute__ ((__nothrow__)); +extern int tcflow (int __fd, int __action) __attribute__ ((__nothrow__)); +extern __pid_t tcgetsid (int __fd) __attribute__ ((__nothrow__)); +struct tm +{ + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; + long int tm_gmtoff; + const char *tm_zone; +}; +struct itimerspec + { + struct timespec it_interval; + struct timespec it_value; + }; +struct sigevent; +extern clock_t clock (void) __attribute__ ((__nothrow__)); +extern time_t time (time_t *__timer) __attribute__ ((__nothrow__)); +extern double difftime (time_t __time1, time_t __time0) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__)); +extern size_t strftime (char *__restrict __s, size_t __maxsize, + const char *__restrict __format, + const struct tm *__restrict __tp) __attribute__ ((__nothrow__)); +extern char *strptime (const char *__restrict __s, + const char *__restrict __fmt, struct tm *__tp) + __attribute__ ((__nothrow__)); +extern size_t strftime_l (char *__restrict __s, size_t __maxsize, + const char *__restrict __format, + const struct tm *__restrict __tp, + __locale_t __loc) __attribute__ ((__nothrow__)); +extern char *strptime_l (const char *__restrict __s, + const char *__restrict __fmt, struct tm *__tp, + __locale_t __loc) __attribute__ ((__nothrow__)); +extern struct tm *gmtime (const time_t *__timer) __attribute__ ((__nothrow__)); +extern struct tm *localtime (const time_t *__timer) __attribute__ ((__nothrow__)); +extern struct tm *gmtime_r (const time_t *__restrict __timer, + struct tm *__restrict __tp) __attribute__ ((__nothrow__)); +extern struct tm *localtime_r (const time_t *__restrict __timer, + struct tm *__restrict __tp) __attribute__ ((__nothrow__)); +extern char *asctime (const struct tm *__tp) __attribute__ ((__nothrow__)); +extern char *ctime (const time_t *__timer) __attribute__ ((__nothrow__)); +extern char *asctime_r (const struct tm *__restrict __tp, + char *__restrict __buf) __attribute__ ((__nothrow__)); +extern char *ctime_r (const time_t *__restrict __timer, + char *__restrict __buf) __attribute__ ((__nothrow__)); +extern char *__tzname[2]; +extern int __daylight; +extern long int __timezone; +extern char *tzname[2]; +extern void tzset (void) __attribute__ ((__nothrow__)); +extern int daylight; +extern long int timezone; +extern int stime (const time_t *__when) __attribute__ ((__nothrow__)); +extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__)); +extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__)); +extern int dysize (int __year) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern int nanosleep (const struct timespec *__requested_time, + struct timespec *__remaining); +extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__)); +extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__)); +extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp) + __attribute__ ((__nothrow__)); +extern int clock_nanosleep (clockid_t __clock_id, int __flags, + const struct timespec *__req, + struct timespec *__rem); +extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__)); +extern int timer_create (clockid_t __clock_id, + struct sigevent *__restrict __evp, + timer_t *__restrict __timerid) __attribute__ ((__nothrow__)); +extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__)); +extern int timer_settime (timer_t __timerid, int __flags, + const struct itimerspec *__restrict __value, + struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__)); +extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) + __attribute__ ((__nothrow__)); +extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__)); +extern int getdate_err; +extern struct tm *getdate (const char *__string); +extern int getdate_r (const char *__restrict __string, + struct tm *__restrict __resbufp); +extern int access (const char *__name, int __type) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int euidaccess (const char *__name, int __type) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int eaccess (const char *__name, int __type) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int faccessat (int __fd, const char *__file, int __type, int __flag) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); +extern __off64_t lseek (int __fd, __off64_t __offset, int __whence) __asm__ ("" "lseek64") __attribute__ ((__nothrow__)) + ; +extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) + __attribute__ ((__nothrow__)); +extern int close (int __fd); +extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__)); +extern ssize_t write (int __fd, const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__)); +extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") + __attribute__ ((__warn_unused_result__)); +extern ssize_t pwrite (int __fd, const void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pwrite64") + __attribute__ ((__warn_unused_result__)); +extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset) __attribute__ ((__warn_unused_result__)); +extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n, + __off64_t __offset) __attribute__ ((__warn_unused_result__)); +extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int pipe2 (int __pipedes[2], int __flags) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__)); +extern unsigned int sleep (unsigned int __seconds); +extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) + __attribute__ ((__nothrow__)); +extern int usleep (__useconds_t __useconds); +extern int pause (void); +extern int chown (const char *__file, __uid_t __owner, __gid_t __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int lchown (const char *__file, __uid_t __owner, __gid_t __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int fchownat (int __fd, const char *__file, __uid_t __owner, + __gid_t __group, int __flag) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); +extern int chdir (const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int fchdir (int __fd) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern char *get_current_dir_name (void) __attribute__ ((__nothrow__)); +extern char *getwd (char *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)); +extern int dup (int __fd) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__)); +extern int dup3 (int __fd, int __fd2, int __flags) __attribute__ ((__nothrow__)); +extern char **__environ; +extern char **environ; +extern int execve (const char *__path, char *const __argv[], + char *const __envp[]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int fexecve (int __fd, char *const __argv[], char *const __envp[]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int execv (const char *__path, char *const __argv[]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int execle (const char *__path, const char *__arg, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int execl (const char *__path, const char *__arg, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int execvp (const char *__file, char *const __argv[]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int execlp (const char *__file, const char *__arg, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int execvpe (const char *__file, char *const __argv[], + char *const __envp[]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int nice (int __inc) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern void _exit (int __status) __attribute__ ((__noreturn__)); +enum + { + _PC_LINK_MAX, + _PC_MAX_CANON, + _PC_MAX_INPUT, + _PC_NAME_MAX, + _PC_PATH_MAX, + _PC_PIPE_BUF, + _PC_CHOWN_RESTRICTED, + _PC_NO_TRUNC, + _PC_VDISABLE, + _PC_SYNC_IO, + _PC_ASYNC_IO, + _PC_PRIO_IO, + _PC_SOCK_MAXBUF, + _PC_FILESIZEBITS, + _PC_REC_INCR_XFER_SIZE, + _PC_REC_MAX_XFER_SIZE, + _PC_REC_MIN_XFER_SIZE, + _PC_REC_XFER_ALIGN, + _PC_ALLOC_SIZE_MIN, + _PC_SYMLINK_MAX, + _PC_2_SYMLINKS + }; +enum + { + _SC_ARG_MAX, + _SC_CHILD_MAX, + _SC_CLK_TCK, + _SC_NGROUPS_MAX, + _SC_OPEN_MAX, + _SC_STREAM_MAX, + _SC_TZNAME_MAX, + _SC_JOB_CONTROL, + _SC_SAVED_IDS, + _SC_REALTIME_SIGNALS, + _SC_PRIORITY_SCHEDULING, + _SC_TIMERS, + _SC_ASYNCHRONOUS_IO, + _SC_PRIORITIZED_IO, + _SC_SYNCHRONIZED_IO, + _SC_FSYNC, + _SC_MAPPED_FILES, + _SC_MEMLOCK, + _SC_MEMLOCK_RANGE, + _SC_MEMORY_PROTECTION, + _SC_MESSAGE_PASSING, + _SC_SEMAPHORES, + _SC_SHARED_MEMORY_OBJECTS, + _SC_AIO_LISTIO_MAX, + _SC_AIO_MAX, + _SC_AIO_PRIO_DELTA_MAX, + _SC_DELAYTIMER_MAX, + _SC_MQ_OPEN_MAX, + _SC_MQ_PRIO_MAX, + _SC_VERSION, + _SC_PAGESIZE, + _SC_RTSIG_MAX, + _SC_SEM_NSEMS_MAX, + _SC_SEM_VALUE_MAX, + _SC_SIGQUEUE_MAX, + _SC_TIMER_MAX, + _SC_BC_BASE_MAX, + _SC_BC_DIM_MAX, + _SC_BC_SCALE_MAX, + _SC_BC_STRING_MAX, + _SC_COLL_WEIGHTS_MAX, + _SC_EQUIV_CLASS_MAX, + _SC_EXPR_NEST_MAX, + _SC_LINE_MAX, + _SC_RE_DUP_MAX, + _SC_CHARCLASS_NAME_MAX, + _SC_2_VERSION, + _SC_2_C_BIND, + _SC_2_C_DEV, + _SC_2_FORT_DEV, + _SC_2_FORT_RUN, + _SC_2_SW_DEV, + _SC_2_LOCALEDEF, + _SC_PII, + _SC_PII_XTI, + _SC_PII_SOCKET, + _SC_PII_INTERNET, + _SC_PII_OSI, + _SC_POLL, + _SC_SELECT, + _SC_UIO_MAXIOV, + _SC_IOV_MAX = _SC_UIO_MAXIOV, + _SC_PII_INTERNET_STREAM, + _SC_PII_INTERNET_DGRAM, + _SC_PII_OSI_COTS, + _SC_PII_OSI_CLTS, + _SC_PII_OSI_M, + _SC_T_IOV_MAX, + _SC_THREADS, + _SC_THREAD_SAFE_FUNCTIONS, + _SC_GETGR_R_SIZE_MAX, + _SC_GETPW_R_SIZE_MAX, + _SC_LOGIN_NAME_MAX, + _SC_TTY_NAME_MAX, + _SC_THREAD_DESTRUCTOR_ITERATIONS, + _SC_THREAD_KEYS_MAX, + _SC_THREAD_STACK_MIN, + _SC_THREAD_THREADS_MAX, + _SC_THREAD_ATTR_STACKADDR, + _SC_THREAD_ATTR_STACKSIZE, + _SC_THREAD_PRIORITY_SCHEDULING, + _SC_THREAD_PRIO_INHERIT, + _SC_THREAD_PRIO_PROTECT, + _SC_THREAD_PROCESS_SHARED, + _SC_NPROCESSORS_CONF, + _SC_NPROCESSORS_ONLN, + _SC_PHYS_PAGES, + _SC_AVPHYS_PAGES, + _SC_ATEXIT_MAX, + _SC_PASS_MAX, + _SC_XOPEN_VERSION, + _SC_XOPEN_XCU_VERSION, + _SC_XOPEN_UNIX, + _SC_XOPEN_CRYPT, + _SC_XOPEN_ENH_I18N, + _SC_XOPEN_SHM, + _SC_2_CHAR_TERM, + _SC_2_C_VERSION, + _SC_2_UPE, + _SC_XOPEN_XPG2, + _SC_XOPEN_XPG3, + _SC_XOPEN_XPG4, + _SC_CHAR_BIT, + _SC_CHAR_MAX, + _SC_CHAR_MIN, + _SC_INT_MAX, + _SC_INT_MIN, + _SC_LONG_BIT, + _SC_WORD_BIT, + _SC_MB_LEN_MAX, + _SC_NZERO, + _SC_SSIZE_MAX, + _SC_SCHAR_MAX, + _SC_SCHAR_MIN, + _SC_SHRT_MAX, + _SC_SHRT_MIN, + _SC_UCHAR_MAX, + _SC_UINT_MAX, + _SC_ULONG_MAX, + _SC_USHRT_MAX, + _SC_NL_ARGMAX, + _SC_NL_LANGMAX, + _SC_NL_MSGMAX, + _SC_NL_NMAX, + _SC_NL_SETMAX, + _SC_NL_TEXTMAX, + _SC_XBS5_ILP32_OFF32, + _SC_XBS5_ILP32_OFFBIG, + _SC_XBS5_LP64_OFF64, + _SC_XBS5_LPBIG_OFFBIG, + _SC_XOPEN_LEGACY, + _SC_XOPEN_REALTIME, + _SC_XOPEN_REALTIME_THREADS, + _SC_ADVISORY_INFO, + _SC_BARRIERS, + _SC_BASE, + _SC_C_LANG_SUPPORT, + _SC_C_LANG_SUPPORT_R, + _SC_CLOCK_SELECTION, + _SC_CPUTIME, + _SC_THREAD_CPUTIME, + _SC_DEVICE_IO, + _SC_DEVICE_SPECIFIC, + _SC_DEVICE_SPECIFIC_R, + _SC_FD_MGMT, + _SC_FIFO, + _SC_PIPE, + _SC_FILE_ATTRIBUTES, + _SC_FILE_LOCKING, + _SC_FILE_SYSTEM, + _SC_MONOTONIC_CLOCK, + _SC_MULTI_PROCESS, + _SC_SINGLE_PROCESS, + _SC_NETWORKING, + _SC_READER_WRITER_LOCKS, + _SC_SPIN_LOCKS, + _SC_REGEXP, + _SC_REGEX_VERSION, + _SC_SHELL, + _SC_SIGNALS, + _SC_SPAWN, + _SC_SPORADIC_SERVER, + _SC_THREAD_SPORADIC_SERVER, + _SC_SYSTEM_DATABASE, + _SC_SYSTEM_DATABASE_R, + _SC_TIMEOUTS, + _SC_TYPED_MEMORY_OBJECTS, + _SC_USER_GROUPS, + _SC_USER_GROUPS_R, + _SC_2_PBS, + _SC_2_PBS_ACCOUNTING, + _SC_2_PBS_LOCATE, + _SC_2_PBS_MESSAGE, + _SC_2_PBS_TRACK, + _SC_SYMLOOP_MAX, + _SC_STREAMS, + _SC_2_PBS_CHECKPOINT, + _SC_V6_ILP32_OFF32, + _SC_V6_ILP32_OFFBIG, + _SC_V6_LP64_OFF64, + _SC_V6_LPBIG_OFFBIG, + _SC_HOST_NAME_MAX, + _SC_TRACE, + _SC_TRACE_EVENT_FILTER, + _SC_TRACE_INHERIT, + _SC_TRACE_LOG, + _SC_LEVEL1_ICACHE_SIZE, + _SC_LEVEL1_ICACHE_ASSOC, + _SC_LEVEL1_ICACHE_LINESIZE, + _SC_LEVEL1_DCACHE_SIZE, + _SC_LEVEL1_DCACHE_ASSOC, + _SC_LEVEL1_DCACHE_LINESIZE, + _SC_LEVEL2_CACHE_SIZE, + _SC_LEVEL2_CACHE_ASSOC, + _SC_LEVEL2_CACHE_LINESIZE, + _SC_LEVEL3_CACHE_SIZE, + _SC_LEVEL3_CACHE_ASSOC, + _SC_LEVEL3_CACHE_LINESIZE, + _SC_LEVEL4_CACHE_SIZE, + _SC_LEVEL4_CACHE_ASSOC, + _SC_LEVEL4_CACHE_LINESIZE, + _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, + _SC_RAW_SOCKETS, + _SC_V7_ILP32_OFF32, + _SC_V7_ILP32_OFFBIG, + _SC_V7_LP64_OFF64, + _SC_V7_LPBIG_OFFBIG, + _SC_SS_REPL_MAX, + _SC_TRACE_EVENT_NAME_MAX, + _SC_TRACE_NAME_MAX, + _SC_TRACE_SYS_MAX, + _SC_TRACE_USER_EVENT_MAX, + _SC_XOPEN_STREAMS, + _SC_THREAD_ROBUST_PRIO_INHERIT, + _SC_THREAD_ROBUST_PRIO_PROTECT + }; +enum + { + _CS_PATH, + _CS_V6_WIDTH_RESTRICTED_ENVS, + _CS_GNU_LIBC_VERSION, + _CS_GNU_LIBPTHREAD_VERSION, + _CS_V5_WIDTH_RESTRICTED_ENVS, + _CS_V7_WIDTH_RESTRICTED_ENVS, + _CS_LFS_CFLAGS = 1000, + _CS_LFS_LDFLAGS, + _CS_LFS_LIBS, + _CS_LFS_LINTFLAGS, + _CS_LFS64_CFLAGS, + _CS_LFS64_LDFLAGS, + _CS_LFS64_LIBS, + _CS_LFS64_LINTFLAGS, + _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, + _CS_XBS5_ILP32_OFF32_LDFLAGS, + _CS_XBS5_ILP32_OFF32_LIBS, + _CS_XBS5_ILP32_OFF32_LINTFLAGS, + _CS_XBS5_ILP32_OFFBIG_CFLAGS, + _CS_XBS5_ILP32_OFFBIG_LDFLAGS, + _CS_XBS5_ILP32_OFFBIG_LIBS, + _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, + _CS_XBS5_LP64_OFF64_CFLAGS, + _CS_XBS5_LP64_OFF64_LDFLAGS, + _CS_XBS5_LP64_OFF64_LIBS, + _CS_XBS5_LP64_OFF64_LINTFLAGS, + _CS_XBS5_LPBIG_OFFBIG_CFLAGS, + _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, + _CS_XBS5_LPBIG_OFFBIG_LIBS, + _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, + _CS_POSIX_V6_ILP32_OFF32_CFLAGS, + _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, + _CS_POSIX_V6_ILP32_OFF32_LIBS, + _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, + _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, + _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, + _CS_POSIX_V6_ILP32_OFFBIG_LIBS, + _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, + _CS_POSIX_V6_LP64_OFF64_CFLAGS, + _CS_POSIX_V6_LP64_OFF64_LDFLAGS, + _CS_POSIX_V6_LP64_OFF64_LIBS, + _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, + _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, + _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, + _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, + _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, + _CS_POSIX_V7_ILP32_OFF32_CFLAGS, + _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, + _CS_POSIX_V7_ILP32_OFF32_LIBS, + _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, + _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, + _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, + _CS_POSIX_V7_ILP32_OFFBIG_LIBS, + _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, + _CS_POSIX_V7_LP64_OFF64_CFLAGS, + _CS_POSIX_V7_LP64_OFF64_LDFLAGS, + _CS_POSIX_V7_LP64_OFF64_LIBS, + _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, + _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, + _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, + _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, + _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, + _CS_V6_ENV, + _CS_V7_ENV + }; +extern long int pathconf (const char *__path, int __name) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__)); +extern long int sysconf (int __name) __attribute__ ((__nothrow__)); +extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__)); +extern __pid_t getpid (void) __attribute__ ((__nothrow__)); +extern __pid_t getppid (void) __attribute__ ((__nothrow__)); +extern __pid_t getpgrp (void) __attribute__ ((__nothrow__)); +extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__)); +extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__)); +extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__)); +extern int setpgrp (void) __attribute__ ((__nothrow__)); +extern __pid_t setsid (void) __attribute__ ((__nothrow__)); +extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__)); +extern __uid_t getuid (void) __attribute__ ((__nothrow__)); +extern __uid_t geteuid (void) __attribute__ ((__nothrow__)); +extern __gid_t getgid (void) __attribute__ ((__nothrow__)); +extern __gid_t getegid (void) __attribute__ ((__nothrow__)); +extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int group_member (__gid_t __gid) __attribute__ ((__nothrow__)); +extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__)); +extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__)); +extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__)); +extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__)); +extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__)); +extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__)); +extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) + __attribute__ ((__nothrow__)); +extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) + __attribute__ ((__nothrow__)); +extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) + __attribute__ ((__nothrow__)); +extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) + __attribute__ ((__nothrow__)); +extern __pid_t fork (void) __attribute__ ((__nothrow__)); +extern __pid_t vfork (void) __attribute__ ((__nothrow__)); +extern char *ttyname (int __fd) __attribute__ ((__nothrow__)); +extern int ttyname_r (int __fd, char *__buf, size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); +extern int isatty (int __fd) __attribute__ ((__nothrow__)); +extern int ttyslot (void) __attribute__ ((__nothrow__)); +extern int link (const char *__from, const char *__to) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); +extern int linkat (int __fromfd, const char *__from, int __tofd, + const char *__to, int __flags) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__)); +extern int symlink (const char *__from, const char *__to) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); +extern ssize_t readlink (const char *__restrict __path, + char *__restrict __buf, size_t __len) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); +extern int symlinkat (const char *__from, int __tofd, + const char *__to) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); +extern ssize_t readlinkat (int __fd, const char *__restrict __path, + char *__restrict __buf, size_t __len) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); +extern int unlink (const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int unlinkat (int __fd, const char *__name, int __flag) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int rmdir (const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__)); +extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__)); +extern char *getlogin (void); +extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); +extern int setlogin (const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern char *optarg; +extern int optind; +extern int opterr; +extern int optopt; +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) + __attribute__ ((__nothrow__)); +extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int sethostname (const char *__name, size_t __len) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int sethostid (long int __id) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int getdomainname (char *__name, size_t __len) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int setdomainname (const char *__name, size_t __len) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int vhangup (void) __attribute__ ((__nothrow__)); +extern int revoke (const char *__file) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int profil (unsigned short int *__sample_buffer, size_t __size, + size_t __offset, unsigned int __scale) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int acct (const char *__name) __attribute__ ((__nothrow__)); +extern char *getusershell (void) __attribute__ ((__nothrow__)); +extern void endusershell (void) __attribute__ ((__nothrow__)); +extern void setusershell (void) __attribute__ ((__nothrow__)); +extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int chroot (const char *__path) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1))); +extern int fsync (int __fd); +extern long int gethostid (void); +extern void sync (void) __attribute__ ((__nothrow__)); +extern int getpagesize (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern int getdtablesize (void) __attribute__ ((__nothrow__)); +extern int truncate (const char *__file, __off64_t __length) __asm__ ("" "truncate64") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int truncate64 (const char *__file, __off64_t __length) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int ftruncate (int __fd, __off64_t __length) __asm__ ("" "ftruncate64") __attribute__ ((__nothrow__)) + __attribute__ ((__warn_unused_result__)); +extern int ftruncate64 (int __fd, __off64_t __length) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int brk (void *__addr) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__)); +extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__)); +extern int fdatasync (int __fildes); +extern char *crypt (const char *__key, const char *__salt) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern void encrypt (char *__block, int __edflag) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern void swab (const void *__restrict __from, void *__restrict __to, + ssize_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *ctermid (char *__s) __attribute__ ((__nothrow__)); +extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes, + size_t __buflen) __attribute__ ((__warn_unused_result__)); +extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read") + __attribute__ ((__warn_unused_result__)); +extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t +read (int __fd, void *__buf, size_t __nbytes) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__nbytes)) + return __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); + if (__nbytes > __builtin_object_size (__buf, 0)) + return __read_chk_warn (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); + } + return __read_alias (__fd, __buf, __nbytes); +} +extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes, + __off_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread") + __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") + __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread called with bigger length than size of " "the destination buffer"))) + ; +extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread64 called with bigger length than size of " "the destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t +pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__nbytes)) + return __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)); + if ( __nbytes > __builtin_object_size (__buf, 0)) + return __pread64_chk_warn (__fd, __buf, __nbytes, __offset, + __builtin_object_size (__buf, 0)); + } + return __pread64_alias (__fd, __buf, __nbytes, __offset); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t +pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__nbytes)) + return __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)); + if ( __nbytes > __builtin_object_size (__buf, 0)) + return __pread64_chk_warn (__fd, __buf, __nbytes, __offset, + __builtin_object_size (__buf, 0)); + } + return __pread64_alias (__fd, __buf, __nbytes, __offset); +} +extern ssize_t __readlink_chk (const char *__restrict __path, + char *__restrict __buf, size_t __len, + size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlink_alias (const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlink") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlink_chk_warn (const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlink_chk") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t +__attribute__ ((__nothrow__)) readlink (const char *__restrict __path, char *__restrict __buf, size_t __len) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + if ( __len > __builtin_object_size (__buf, 2 > 1)) + return __readlink_chk_warn (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + } + return __readlink_alias (__path, __buf, __len); +} +extern ssize_t __readlinkat_chk (int __fd, const char *__restrict __path, + char *__restrict __buf, size_t __len, + size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlinkat_alias (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlinkat") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlinkat_chk_warn (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlinkat_chk") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t +__attribute__ ((__nothrow__)) readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __readlinkat_chk (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + if (__len > __builtin_object_size (__buf, 2 > 1)) + return __readlinkat_chk_warn (__fd, __path, __buf, __len, + __builtin_object_size (__buf, 2 > 1)); + } + return __readlinkat_alias (__fd, __path, __buf, __len); +} +extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern char *__getcwd_alias (char *__buf, size_t __size) __asm__ ("" "getcwd") __attribute__ ((__nothrow__)) + __attribute__ ((__warn_unused_result__)); +extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) __asm__ ("" "__getcwd_chk") __attribute__ ((__nothrow__)) + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +__attribute__ ((__nothrow__)) getcwd (char *__buf, size_t __size) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__size)) + return __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1)); + if (__size > __builtin_object_size (__buf, 2 > 1)) + return __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1)); + } + return __getcwd_alias (__buf, __size); +} +extern char *__getwd_chk (char *__buf, size_t buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern char *__getwd_warn (char *__buf) __asm__ ("" "getwd") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char * +__attribute__ ((__nothrow__)) getwd (char *__buf) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1)); + return __getwd_warn (__buf); +} +extern size_t __confstr_chk (int __name, char *__buf, size_t __len, + size_t __buflen) __attribute__ ((__nothrow__)); +extern size_t __confstr_alias (int __name, char *__buf, size_t __len) __asm__ ("" "confstr") __attribute__ ((__nothrow__)) + ; +extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) __asm__ ("" "__confstr_chk") __attribute__ ((__nothrow__)) + __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +__attribute__ ((__nothrow__)) confstr (int __name, char *__buf, size_t __len) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + if (__builtin_object_size (__buf, 2 > 1) < __len) + return __confstr_chk_warn (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + } + return __confstr_alias (__name, __buf, __len); +} +extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen) + __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int __getgroups_alias (int __size, __gid_t __list[]) __asm__ ("" "getgroups") __attribute__ ((__nothrow__)) + __attribute__ ((__warn_unused_result__)); +extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) __asm__ ("" "__getgroups_chk") __attribute__ ((__nothrow__)) + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) getgroups (int __size, __gid_t __list[]) +{ + if (__builtin_object_size (__list, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__size) || __size < 0) + return __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1)); + if (__size * sizeof (__gid_t) > __builtin_object_size (__list, 2 > 1)) + return __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1)); + } + return __getgroups_alias (__size, __list); +} +extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen, + size_t __nreal) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ttyname_r") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (2))); +extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ttyname_r_chk") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) ttyname_r (int __fd, char *__buf, size_t __buflen) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __ttyname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __ttyname_r_alias (__fd, __buf, __buflen); +} +extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal) + __attribute__ ((__nonnull__ (1))); +extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r") + __attribute__ ((__nonnull__ (1))); +extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk") + __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +getlogin_r (char *__buf, size_t __buflen) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __getlogin_r_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __getlogin_r_alias (__buf, __buflen); +} +extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int __gethostname_alias (char *__buf, size_t __buflen) __asm__ ("" "gethostname") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (1))); +extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__gethostname_chk") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) gethostname (char *__buf, size_t __buflen) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __gethostname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __gethostname_alias (__buf, __buflen); +} +extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int __getdomainname_alias (char *__buf, size_t __buflen) __asm__ ("" "getdomainname") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getdomainname_chk") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) getdomainname (char *__buf, size_t __buflen) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __getdomainname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __getdomainname_alias (__buf, __buflen); +} +struct mntent + { + char *mnt_fsname; + char *mnt_dir; + char *mnt_type; + char *mnt_opts; + int mnt_freq; + int mnt_passno; + }; +extern FILE *setmntent (const char *__file, const char *__mode) __attribute__ ((__nothrow__)); +extern struct mntent *getmntent (FILE *__stream) __attribute__ ((__nothrow__)); +extern struct mntent *getmntent_r (FILE *__restrict __stream, + struct mntent *__restrict __result, + char *__restrict __buffer, + int __bufsize) __attribute__ ((__nothrow__)); +extern int addmntent (FILE *__restrict __stream, + const struct mntent *__restrict __mnt) __attribute__ ((__nothrow__)); +extern int endmntent (FILE *__stream) __attribute__ ((__nothrow__)); +extern char *hasmntopt (const struct mntent *__mnt, + const char *__opt) __attribute__ ((__nothrow__)); +struct statfs + { + long int f_type; + long int f_bsize; + __fsblkcnt64_t f_blocks; + __fsblkcnt64_t f_bfree; + __fsblkcnt64_t f_bavail; + __fsfilcnt64_t f_files; + __fsfilcnt64_t f_ffree; + __fsid_t f_fsid; + long int f_namelen; + long int f_frsize; + long int f_flags; + long int f_spare[4]; + }; +struct statfs64 + { + long int f_type; + long int f_bsize; + __fsblkcnt64_t f_blocks; + __fsblkcnt64_t f_bfree; + __fsblkcnt64_t f_bavail; + __fsfilcnt64_t f_files; + __fsfilcnt64_t f_ffree; + __fsid_t f_fsid; + long int f_namelen; + long int f_frsize; + long int f_flags; + long int f_spare[4]; + }; +extern int statfs (const char *__file, struct statfs *__buf) __asm__ ("" "statfs64") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (1, 2))); +extern int statfs64 (const char *__file, struct statfs64 *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int fstatfs (int __fildes, struct statfs *__buf) __asm__ ("" "fstatfs64") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (2))); +extern int fstatfs64 (int __fildes, struct statfs64 *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +struct passwd +{ + char *pw_name; + char *pw_passwd; + __uid_t pw_uid; + __gid_t pw_gid; + char *pw_gecos; + char *pw_dir; + char *pw_shell; +}; +extern void setpwent (void); +extern void endpwent (void); +extern struct passwd *getpwent (void); +extern struct passwd *fgetpwent (FILE *__stream); +extern int putpwent (const struct passwd *__restrict __p, + FILE *__restrict __f); +extern struct passwd *getpwuid (__uid_t __uid); +extern struct passwd *getpwnam (const char *__name); +extern int getpwent_r (struct passwd *__restrict __resultbuf, + char *__restrict __buffer, size_t __buflen, + struct passwd **__restrict __result); +extern int getpwuid_r (__uid_t __uid, + struct passwd *__restrict __resultbuf, + char *__restrict __buffer, size_t __buflen, + struct passwd **__restrict __result); +extern int getpwnam_r (const char *__restrict __name, + struct passwd *__restrict __resultbuf, + char *__restrict __buffer, size_t __buflen, + struct passwd **__restrict __result); +extern int fgetpwent_r (FILE *__restrict __stream, + struct passwd *__restrict __resultbuf, + char *__restrict __buffer, size_t __buflen, + struct passwd **__restrict __result); +extern int getpw (__uid_t __uid, char *__buffer); +struct group + { + char *gr_name; + char *gr_passwd; + __gid_t gr_gid; + char **gr_mem; + }; +extern void setgrent (void); +extern void endgrent (void); +extern struct group *getgrent (void); +extern struct group *fgetgrent (FILE *__stream); +extern int putgrent (const struct group *__restrict __p, + FILE *__restrict __f); +extern struct group *getgrgid (__gid_t __gid); +extern struct group *getgrnam (const char *__name); +extern int getgrent_r (struct group *__restrict __resultbuf, + char *__restrict __buffer, size_t __buflen, + struct group **__restrict __result); +extern int getgrgid_r (__gid_t __gid, struct group *__restrict __resultbuf, + char *__restrict __buffer, size_t __buflen, + struct group **__restrict __result); +extern int getgrnam_r (const char *__restrict __name, + struct group *__restrict __resultbuf, + char *__restrict __buffer, size_t __buflen, + struct group **__restrict __result); +extern int fgetgrent_r (FILE *__restrict __stream, + struct group *__restrict __resultbuf, + char *__restrict __buffer, size_t __buflen, + struct group **__restrict __result); +extern int setgroups (size_t __n, const __gid_t *__groups) __attribute__ ((__nothrow__)); +extern int getgrouplist (const char *__user, __gid_t __group, + __gid_t *__groups, int *__ngroups); +extern int initgroups (const char *__user, __gid_t __group); +extern in_addr_t inet_addr (const char *__cp) __attribute__ ((__nothrow__)); +extern in_addr_t inet_lnaof (struct in_addr __in) __attribute__ ((__nothrow__)); +extern struct in_addr inet_makeaddr (in_addr_t __net, in_addr_t __host) + __attribute__ ((__nothrow__)); +extern in_addr_t inet_netof (struct in_addr __in) __attribute__ ((__nothrow__)); +extern in_addr_t inet_network (const char *__cp) __attribute__ ((__nothrow__)); +extern char *inet_ntoa (struct in_addr __in) __attribute__ ((__nothrow__)); +extern int inet_pton (int __af, const char *__restrict __cp, + void *__restrict __buf) __attribute__ ((__nothrow__)); +extern const char *inet_ntop (int __af, const void *__restrict __cp, + char *__restrict __buf, socklen_t __len) + __attribute__ ((__nothrow__)); +extern int inet_aton (const char *__cp, struct in_addr *__inp) __attribute__ ((__nothrow__)); +extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) __attribute__ ((__nothrow__)); +extern char *inet_net_ntop (int __af, const void *__cp, int __bits, + char *__buf, size_t __len) __attribute__ ((__nothrow__)); +extern int inet_net_pton (int __af, const char *__cp, + void *__buf, size_t __len) __attribute__ ((__nothrow__)); +extern unsigned int inet_nsap_addr (const char *__cp, + unsigned char *__buf, int __len) __attribute__ ((__nothrow__)); +extern char *inet_nsap_ntoa (int __len, const unsigned char *__cp, + char *__buf) __attribute__ ((__nothrow__)); +extern char **environ; +int klogctl(int type, char *b, int len); +char *dirname(char *path); +struct sysinfo { + long uptime; + unsigned long loads[3]; + unsigned long totalram; + unsigned long freeram; + unsigned long sharedram; + unsigned long bufferram; + unsigned long totalswap; + unsigned long freeswap; + unsigned short procs; + unsigned short pad; + unsigned long totalhigh; + unsigned long freehigh; + unsigned int mem_unit; + char _f[20 - 2 * sizeof(long) - sizeof(int)]; +}; +int sysinfo(struct sysinfo* info); +typedef unsigned long uoff_t; +extern int *const bb_errno; +unsigned long long monotonic_ns(void) ; +unsigned long long monotonic_us(void) ; +unsigned long long monotonic_ms(void) ; +unsigned monotonic_sec(void) ; +extern void chomp(char *s) ; +extern void trim(char *s) ; +extern char *skip_whitespace(const char *) ; +extern char *skip_non_whitespace(const char *) ; +extern char *skip_dev_pfx(const char *tty_name) ; +extern char *strrstr(const char *haystack, const char *needle) ; +extern const char *bb_mode_string(mode_t mode) ; +extern int is_directory(const char *name, int followLinks, struct stat *statBuf) ; +enum { + FILEUTILS_PRESERVE_STATUS = 1 << 0, + FILEUTILS_DEREFERENCE = 1 << 1, + FILEUTILS_RECUR = 1 << 2, + FILEUTILS_FORCE = 1 << 3, + FILEUTILS_INTERACTIVE = 1 << 4, + FILEUTILS_MAKE_HARDLINK = 1 << 5, + FILEUTILS_MAKE_SOFTLINK = 1 << 6, + FILEUTILS_DEREF_SOFTLINK = 1 << 7, + FILEUTILS_DEREFERENCE_L0 = 1 << 8, +}; +extern int remove_file(const char *path, int flags) ; +extern int copy_file(const char *source, const char *dest, int flags) ; +enum { + ACTION_RECURSE = (1 << 0), + ACTION_FOLLOWLINKS = (1 << 1), + ACTION_FOLLOWLINKS_L0 = (1 << 2), + ACTION_DEPTHFIRST = (1 << 3), + ACTION_QUIET = (1 << 5), + ACTION_DANGLING_OK = (1 << 6), +}; +typedef uint8_t recurse_flags_t; +extern int recursive_action(const char *fileName, unsigned flags, + int (*fileAction)(const char *fileName, struct stat* statbuf, void* userData, int depth), + int (*dirAction)(const char *fileName, struct stat* statbuf, void* userData, int depth), + void* userData, unsigned depth) ; +extern int device_open(const char *device, int mode) ; +enum { GETPTY_BUFSIZE = 16 }; +extern int xgetpty(char *line) ; +extern int get_console_fd_or_die(void) ; +extern void console_make_active(int fd, const int vt_num) ; +extern char *find_block_device(const char *path) ; +extern off_t bb_copyfd_eof(int fd1, int fd2) ; +extern off_t bb_copyfd_size(int fd1, int fd2, off_t size) ; +extern void bb_copyfd_exact_size(int fd1, int fd2, off_t size) ; +extern void complain_copyfd_and_die(off_t sz) __attribute__ ((__noreturn__)) ; +extern char bb_process_escape_sequence(const char **ptr) ; +char* strcpy_and_process_escape_sequences(char *dst, const char *src) ; +extern char *bb_get_last_path_component_strip(char *path) ; +extern char *bb_get_last_path_component_nostrip(const char *path) ; +int ndelay_on(int fd) ; +int ndelay_off(int fd) ; +int close_on_exec_on(int fd) ; +void xdup2(int, int) ; +void xmove_fd(int, int) ; +DIR *xopendir(const char *path) ; +DIR *warn_opendir(const char *path) ; +char *xmalloc_realpath(const char *path) __attribute__ ((malloc)); +char *xmalloc_readlink(const char *path) __attribute__ ((malloc)); +char *xmalloc_readlink_or_warn(const char *path) __attribute__ ((malloc)); +char *xrealloc_getcwd_or_warn(char *cwd) ; +char *xmalloc_follow_symlinks(const char *path) __attribute__ ((malloc)); +enum { + BB_FATAL_SIGS = (int)(0 + + (1LL << 1) + + (1LL << 2) + + (1LL << 15) + + (1LL << 13) + + (1LL << 3) + + (1LL << 6) + + (1LL << 14) + + (1LL << 26) + + (1LL << 24) + + (1LL << 25) + + (1LL << 10) + + (1LL << 12) + + 0), +}; +void bb_signals(int sigs, void (*f)(int)) ; +void bb_signals_recursive_norestart(int sigs, void (*f)(int)) ; +void signal_no_SA_RESTART_empty_mask(int sig, void (*handler)(int)) ; +void signal_SA_RESTART_empty_mask(int sig, void (*handler)(int)) ; +void wait_for_any_sig(void) ; +void kill_myself_with_sig(int sig) __attribute__ ((__noreturn__)) ; +void sig_block(int sig) ; +void sig_unblock(int sig) ; +int sigaction_set(int sig, const struct sigaction *act) ; +int sigprocmask_allsigs(int how) ; +smallint bb_got_signal; +void record_signo(int signo); +void xsetgid(gid_t gid) ; +void xsetuid(uid_t uid) ; +void xchdir(const char *path) ; +void xchroot(const char *path) ; +void xsetenv(const char *key, const char *value) ; +void bb_unsetenv(const char *key) ; +void bb_unsetenv_and_free(char *key) ; +void xunlink(const char *pathname) ; +void xstat(const char *pathname, struct stat *buf) ; +void xfstat(int fd, struct stat *buf, const char *errmsg) ; +int xopen(const char *pathname, int flags) ; +int xopen_nonblocking(const char *pathname) ; +int xopen3(const char *pathname, int flags, int mode) ; +int open_or_warn(const char *pathname, int flags) ; +int open3_or_warn(const char *pathname, int flags, int mode) ; +int open_or_warn_stdin(const char *pathname) ; +int xopen_stdin(const char *pathname) ; +void xrename(const char *oldpath, const char *newpath) ; +int rename_or_warn(const char *oldpath, const char *newpath) ; +off_t xlseek(int fd, off_t offset, int whence) ; +int xmkstemp(char *template) ; +off_t fdlength(int fd) ; +uoff_t get_volume_size_in_bytes(int fd, + const char *override, + unsigned override_units, + int extend); +void xpipe(int filedes[2]) ; +struct fd_pair { int rd; int wr; }; +typedef int8_t socktype_t; +typedef int8_t family_t; +struct BUG_too_small { + char BUG_socktype_t_too_small[(0 + | SOCK_STREAM + | SOCK_DGRAM + | SOCK_RDM + | SOCK_SEQPACKET + | SOCK_RAW + ) <= 127 ? 1 : -1]; + char BUG_family_t_too_small[(0 + | 0 + | 2 + | 10 + | 1 + | 17 + | 16 + ) <= 127 ? 1 : -1]; +}; +void parse_datestr(const char *date_str, struct tm *ptm) ; +time_t validate_tm_time(const char *date_str, struct tm *ptm) ; +int xsocket(int domain, int type, int protocol) ; +void xbind(int sockfd, struct sockaddr *my_addr, socklen_t addrlen) ; +void xlisten(int s, int backlog) ; +void xconnect(int s, const struct sockaddr *s_addr, socklen_t addrlen) ; +ssize_t xsendto(int s, const void *buf, size_t len, const struct sockaddr *to, + socklen_t tolen) ; +void setsockopt_reuseaddr(int fd) ; +int setsockopt_broadcast(int fd) ; +int setsockopt_bindtodevice(int fd, const char *iface) ; +unsigned bb_lookup_port(const char *port, const char *protocol, unsigned default_port) ; +typedef struct len_and_sockaddr { + socklen_t len; + union { + struct sockaddr sa; + struct sockaddr_in sin; + } u; +} len_and_sockaddr; +enum { + LSA_LEN_SIZE = __builtin_offsetof (len_and_sockaddr, u), + LSA_SIZEOF_SA = sizeof( + union { + struct sockaddr sa; + struct sockaddr_in sin; + } + ) +}; +int xsocket_type(len_and_sockaddr **lsap, int sock_type) ; +int xsocket_stream(len_and_sockaddr **lsap) ; +int create_and_bind_stream_or_die(const char *bindaddr, int port) ; +int create_and_bind_dgram_or_die(const char *bindaddr, int port) ; +int create_and_connect_stream_or_die(const char *peer, int port) ; +int xconnect_stream(const len_and_sockaddr *lsa) ; +len_and_sockaddr *get_sock_lsa(int fd) __attribute__ ((malloc)); +len_and_sockaddr *get_peer_lsa(int fd) __attribute__ ((malloc)); +len_and_sockaddr* host2sockaddr(const char *host, int port) __attribute__ ((malloc)); +len_and_sockaddr* xhost2sockaddr(const char *host, int port) __attribute__ ((malloc)); +len_and_sockaddr* xdotted2sockaddr(const char *host, int port) __attribute__ ((malloc)); +void set_nport(len_and_sockaddr *lsa, unsigned port) ; +int get_nport(const struct sockaddr *sa) ; +char* xmalloc_sockaddr2host(const struct sockaddr *sa) __attribute__ ((malloc)); +char* xmalloc_sockaddr2host_noport(const struct sockaddr *sa) __attribute__ ((malloc)); +char* xmalloc_sockaddr2hostonly_noport(const struct sockaddr *sa) __attribute__ ((malloc)); +char* xmalloc_sockaddr2dotted(const struct sockaddr *sa) __attribute__ ((malloc)); +char* xmalloc_sockaddr2dotted_noport(const struct sockaddr *sa) __attribute__ ((malloc)); +struct hostent *xgethostbyname(const char *name) ; +void socket_want_pktinfo(int fd) ; +ssize_t send_to_from(int fd, void *buf, size_t len, int flags, + const struct sockaddr *to, + const struct sockaddr *from, + socklen_t tolen) ; +ssize_t recv_from_to(int fd, void *buf, size_t len, int flags, + struct sockaddr *from, + struct sockaddr *to, + socklen_t sa_size) ; +char *xstrdup(const char *s) __attribute__ ((malloc)); +char *xstrndup(const char *s, int n) __attribute__ ((malloc)); +void overlapping_strcpy(char *dst, const char *src) ; +char *safe_strncpy(char *dst, const char *src, size_t size) ; +char *strncpy_IFNAMSIZ(char *dst, const char *src) ; +int bb_putchar(int ch) ; +int bb_putchar_stderr(char ch) ; +char *xasprintf(const char *format, ...) __attribute__ ((format(printf, 1, 2))) __attribute__ ((malloc)); +typedef struct uni_stat_t { + unsigned byte_count; + unsigned unicode_count; + unsigned unicode_width; +} uni_stat_t; +const char* printable_string(uni_stat_t *stats, const char *str); +enum { PRINTABLE_META = 0x100 }; +void fputc_printable(int ch, FILE *file) ; +void *malloc_or_warn(size_t size) __attribute__ ((malloc)); +void *xmalloc(size_t size) __attribute__ ((malloc)); +void *xzalloc(size_t size) __attribute__ ((malloc)); +void *xrealloc(void *old, size_t size) ; +void* xrealloc_vector_helper(void *vector, unsigned sizeof_and_shift, int idx) ; +extern ssize_t safe_read(int fd, void *buf, size_t count) ; +extern ssize_t nonblock_safe_read(int fd, void *buf, size_t count) ; +extern ssize_t full_read(int fd, void *buf, size_t count) ; +extern void xread(int fd, void *buf, size_t count) ; +extern unsigned char xread_char(int fd) ; +extern ssize_t read_close(int fd, void *buf, size_t maxsz) ; +extern ssize_t open_read_close(const char *filename, void *buf, size_t maxsz) ; +extern char *xmalloc_reads(int fd, char *pfx, size_t *maxsz_p) ; +extern void *xmalloc_read(int fd, size_t *maxsz_p) __attribute__ ((malloc)); +extern void *xmalloc_open_read_close(const char *filename, size_t *maxsz_p) __attribute__ ((malloc)); +extern void setup_unzip_on_fd(int fd ) ; +extern int open_zipped(const char *fname) ; +extern void *xmalloc_open_zipped_read_close(const char *fname, size_t *maxsz_p) __attribute__ ((malloc)); +extern void *xmalloc_xopen_read_close(const char *filename, size_t *maxsz_p) __attribute__ ((malloc)); +extern ssize_t safe_write(int fd, const void *buf, size_t count) ; +extern ssize_t full_write(int fd, const void *buf, size_t count) ; +extern void xwrite(int fd, const void *buf, size_t count) ; +extern void xwrite_str(int fd, const char *str) ; +extern ssize_t full_write1_str(const char *str) ; +extern ssize_t full_write2_str(const char *str) ; +extern void xopen_xwrite_close(const char* file, const char *str) ; +extern void xclose(int fd) ; +extern void xprint_and_close_file(FILE *file) ; +extern char *bb_get_chunk_from_file(FILE *file, int *end) ; +extern char *bb_get_chunk_with_continuation(FILE *file, int *end, int *lineno) ; +extern char *xmalloc_fgets_str(FILE *file, const char *terminating_string) __attribute__ ((malloc)); +extern char *xmalloc_fgets_str_len(FILE *file, const char *terminating_string, size_t *maxsz_p) __attribute__ ((malloc)); +extern char *xmalloc_fgetline_str(FILE *file, const char *terminating_string) __attribute__ ((malloc)); +extern char *xmalloc_fgets(FILE *file) __attribute__ ((malloc)); +extern char *xmalloc_fgetline(FILE *file) __attribute__ ((malloc)); +void die_if_ferror(FILE *file, const char *msg) ; +void die_if_ferror_stdout(void) ; +int fflush_all(void) ; +void fflush_stdout_and_exit(int retval) __attribute__ ((__noreturn__)) ; +int fclose_if_not_stdin(FILE *file) ; +FILE* xfopen(const char *filename, const char *mode) ; +FILE* fopen_or_warn(const char *filename, const char *mode) ; +FILE* xfopen_stdin(const char *filename) ; +FILE* fopen_or_warn_stdin(const char *filename) ; +FILE* fopen_for_read(const char *path) ; +FILE* xfopen_for_read(const char *path) ; +FILE* fopen_for_write(const char *path) ; +FILE* xfopen_for_write(const char *path) ; +FILE* xfdopen_for_read(int fd) ; +FILE* xfdopen_for_write(int fd) ; +int bb_pstrcmp(const void *a, const void *b) ; +void qsort_string_vector(char **sv, unsigned count) ; +int safe_poll(struct pollfd *ufds, nfds_t nfds, int timeout_ms) ; +char *safe_gethostname(void) ; +char *safe_getdomainname(void) ; +char* str_tolower(char *str) ; +char *utoa(unsigned n) ; +char *itoa(int n) ; +char *utoa_to_buf(unsigned n, char *buf, unsigned buflen) ; +char *itoa_to_buf(int n, char *buf, unsigned buflen) ; +void smart_ulltoa4(unsigned long long ul, char buf[4], const char *scale) ; +void smart_ulltoa5(unsigned long long ul, char buf[5], const char *scale) ; +const char *make_human_readable_str(unsigned long long size, + unsigned long block_size, unsigned long display_unit) ; +char *bin2hex(char *buf, const char *cp, int count) ; +char* hex2bin(char *dst, const char *str, int count) ; +void generate_uuid(uint8_t *buf) ; +struct suffix_mult { + char suffix[4]; + unsigned mult; +}; +unsigned long long xstrtoull_range_sfx(const char *str, int b, unsigned long long l, unsigned long long u, const struct suffix_mult *sfx) ; unsigned long long xstrtoull_range(const char *str, int b, unsigned long long l, unsigned long long u) ; unsigned long long xstrtoull_sfx(const char *str, int b, const struct suffix_mult *sfx) ; unsigned long long xstrtoull(const char *str, int b) ; unsigned long long xatoull_range_sfx(const char *str, unsigned long long l, unsigned long long u, const struct suffix_mult *sfx) ; unsigned long long xatoull_range(const char *str, unsigned long long l, unsigned long long u) ; unsigned long long xatoull_sfx(const char *str, const struct suffix_mult *sfx) ; unsigned long long xatoull(const char *str) ; long long xstrtoll_range_sfx(const char *str, int b, long long l, long long u, const struct suffix_mult *sfx) ; long long xstrtoll_range(const char *str, int b, long long l, long long u) ; long long xstrtoll(const char *str, int b) ; long long xatoll_range_sfx(const char *str, long long l, long long u, const struct suffix_mult *sfx) ; long long xatoll_range(const char *str, long long l, long long u) ; long long xatoll_sfx(const char *str, const struct suffix_mult *sfx) ; long long xatoll(const char *str) ; +static __attribute__ ((always_inline)) __inline__ unsigned long xstrtoul_range_sfx(const char *str, int b, unsigned long l, unsigned long u, const struct suffix_mult *sfx) { return xstrtoull_range_sfx(str, b, l, u, sfx); } static __attribute__ ((always_inline)) __inline__ unsigned long xstrtoul_range(const char *str, int b, unsigned long l, unsigned long u) { return xstrtoull_range(str, b, l, u); } static __attribute__ ((always_inline)) __inline__ unsigned long xstrtoul_sfx(const char *str, int b, const struct suffix_mult *sfx) { return xstrtoull_sfx(str, b, sfx); } static __attribute__ ((always_inline)) __inline__ unsigned long xstrtoul(const char *str, int b) { return xstrtoull(str, b); } static __attribute__ ((always_inline)) __inline__ unsigned long xatoul_range_sfx(const char *str, unsigned long l, unsigned long u, const struct suffix_mult *sfx) { return xatoull_range_sfx(str, l, u, sfx); } static __attribute__ ((always_inline)) __inline__ unsigned long xatoul_range(const char *str, unsigned long l, unsigned long u) { return xatoull_range(str, l, u); } static __attribute__ ((always_inline)) __inline__ unsigned long xatoul_sfx(const char *str, const struct suffix_mult *sfx) { return xatoull_sfx(str, sfx); } static __attribute__ ((always_inline)) __inline__ unsigned long xatoul(const char *str) { return xatoull(str); } static __attribute__ ((always_inline)) __inline__ long xstrtol_range_sfx(const char *str, int b, long l, long u, const struct suffix_mult *sfx) { return xstrtoll_range_sfx(str, b, l, u, sfx); } static __attribute__ ((always_inline)) __inline__ long xstrtol_range(const char *str, int b, long l, long u) { return xstrtoll_range(str, b, l, u); } static __attribute__ ((always_inline)) __inline__ long xstrtol(const char *str, int b) { return xstrtoll(str, b); } static __attribute__ ((always_inline)) __inline__ long xatol_range_sfx(const char *str, long l, long u, const struct suffix_mult *sfx) { return xatoll_range_sfx(str, l, u, sfx); } static __attribute__ ((always_inline)) __inline__ long xatol_range(const char *str, long l, long u) { return xatoll_range(str, l, u); } static __attribute__ ((always_inline)) __inline__ long xatol_sfx(const char *str, const struct suffix_mult *sfx) { return xatoll_sfx(str, sfx); } static __attribute__ ((always_inline)) __inline__ long xatol(const char *str) { return xatoll(str); } +unsigned int xstrtou_range_sfx(const char *str, int b, unsigned int l, unsigned int u, const struct suffix_mult *sfx) ; unsigned int xstrtou_range(const char *str, int b, unsigned int l, unsigned int u) ; unsigned int xstrtou_sfx(const char *str, int b, const struct suffix_mult *sfx) ; unsigned int xstrtou(const char *str, int b) ; unsigned int xatou_range_sfx(const char *str, unsigned int l, unsigned int u, const struct suffix_mult *sfx) ; unsigned int xatou_range(const char *str, unsigned int l, unsigned int u) ; unsigned int xatou_sfx(const char *str, const struct suffix_mult *sfx) ; unsigned int xatou(const char *str) ; int xstrtoi_range_sfx(const char *str, int b, int l, int u, const struct suffix_mult *sfx) ; int xstrtoi_range(const char *str, int b, int l, int u) ; int xstrtoi(const char *str, int b) ; int xatoi_range_sfx(const char *str, int l, int u, const struct suffix_mult *sfx) ; int xatoi_range(const char *str, int l, int u) ; int xatoi_sfx(const char *str, const struct suffix_mult *sfx) ; int xatoi(const char *str) ; +uint32_t BUG_xatou32_unimplemented(void); +static __attribute__ ((always_inline)) __inline__ uint32_t xatou32(const char *numstr) +{ + if ((2147483647 * 2U + 1U) == 0xffffffff) + return xatou(numstr); + if ((9223372036854775807L * 2UL + 1UL) == 0xffffffff) + return xatoul(numstr); + return BUG_xatou32_unimplemented(); +} +unsigned long long bb_strtoull(const char *arg, char **endp, int base) ; +long long bb_strtoll(const char *arg, char **endp, int base) ; +static __attribute__ ((always_inline)) __inline__ +unsigned long bb_strtoul(const char *arg, char **endp, int base) +{ return bb_strtoull(arg, endp, base); } +static __attribute__ ((always_inline)) __inline__ +long bb_strtol(const char *arg, char **endp, int base) +{ return bb_strtoll(arg, endp, base); } +unsigned bb_strtou(const char *arg, char **endp, int base) ; +int bb_strtoi(const char *arg, char **endp, int base) ; +uint32_t BUG_bb_strtou32_unimplemented(void); +static __attribute__ ((always_inline)) __inline__ +uint32_t bb_strtou32(const char *arg, char **endp, int base) +{ + if (sizeof(uint32_t) == sizeof(unsigned)) + return bb_strtou(arg, endp, base); + if (sizeof(uint32_t) == sizeof(unsigned long)) + return bb_strtoul(arg, endp, base); + return BUG_bb_strtou32_unimplemented(); +} +double bb_strtod(const char *arg, char **endp) ; +int xatoi_positive(const char *numstr) ; +uint16_t xatou16(const char *numstr) ; +long xuname2uid(const char *name) ; +long xgroup2gid(const char *name) ; +unsigned long get_ug_id(const char *s, long (*xname2id)(const char *)) ; +struct bb_uidgid_t { + uid_t uid; + gid_t gid; +}; +int get_uidgid(struct bb_uidgid_t*, const char*, int numeric_ok) ; +void xget_uidgid(struct bb_uidgid_t*, const char*) ; +void parse_chown_usergroup_or_die(struct bb_uidgid_t *u, char *user_group) ; +struct passwd* xgetpwnam(const char *name) ; +struct group* xgetgrnam(const char *name) ; +struct passwd* xgetpwuid(uid_t uid) ; +struct group* xgetgrgid(gid_t gid) ; +char* xuid2uname(uid_t uid) ; +char* xgid2group(gid_t gid) ; +char* uid2uname(uid_t uid) ; +char* gid2group(gid_t gid) ; +char* uid2uname_utoa(long uid) ; +char* gid2group_utoa(long gid) ; +const char* get_cached_username(uid_t uid) ; +const char* get_cached_groupname(gid_t gid) ; +void clear_username_cache(void) ; +enum { USERNAME_MAX_SIZE = 16 - sizeof(int) }; +void write_new_utmp(pid_t pid, int new_type, const char *tty_name, const char *username, const char *hostname); +void update_utmp(pid_t pid, int new_type, const char *tty_name, const char *username, const char *hostname); +int execable_file(const char *name) ; +char *find_execable(const char *filename, char **PATHp) ; +int exists_execable(const char *filename) ; +int bb_execvp(const char *file, char *const argv[]) ; +int BB_EXECVP_or_die(char **argv) __attribute__ ((__noreturn__)) ; +pid_t xfork(void) ; +pid_t spawn(char **argv) ; +pid_t xspawn(char **argv) ; +pid_t safe_waitpid(pid_t pid, int *wstat, int options) ; +pid_t wait_any_nohang(int *wstat) ; +int wait4pid(pid_t pid) ; +int spawn_and_wait(char **argv) ; +struct nofork_save_area { + jmp_buf die_jmp; + const char *applet_name; + uint32_t option_mask32; + int die_sleep; + uint8_t xfunc_error_retval; + smallint saved; +}; +void save_nofork_data(struct nofork_save_area *save) ; +void restore_nofork_data(struct nofork_save_area *save) ; +int run_nofork_applet(int applet_no, char **argv) ; +int run_nofork_applet_prime(struct nofork_save_area *old, int applet_no, char **argv) ; +enum { + DAEMON_CHDIR_ROOT = 1, + DAEMON_DEVNULL_STDIO = 2, + DAEMON_CLOSE_EXTRA_FDS = 4, + DAEMON_ONLY_SANITIZE = 8, +}; + enum { re_execed = 0 }; +void bb_daemonize_or_rexec(int flags) ; +void bb_sanitize_stdio(void) ; +int sanitize_env_if_suid(void) ; +char* single_argv(char **argv) ; +extern const char *const bb_argv_dash[]; +extern const char *opt_complementary; +extern const char *applet_long_options; +extern uint32_t option_mask32; +extern uint32_t getopt32(char **argv, const char *applet_opts, ...) ; +typedef struct llist_t { + char *data; + struct llist_t *link; +} llist_t; +void llist_add_to(llist_t **old_head, void *data) ; +void llist_add_to_end(llist_t **list_head, void *data) ; +void *llist_pop(llist_t **elm) ; +void llist_unlink(llist_t **head, llist_t *elm) ; +void llist_free(llist_t *elm, void (*freeit)(void *data)) ; +llist_t *llist_rev(llist_t *list) ; +llist_t *llist_find_str(llist_t *first, const char *str) ; +extern smallint wrote_pidfile; +void write_pidfile(const char *path) ; +enum { + LOGMODE_NONE = 0, + LOGMODE_STDIO = (1 << 0), + LOGMODE_SYSLOG = (1 << 1) * 0, + LOGMODE_BOTH = LOGMODE_SYSLOG + LOGMODE_STDIO, +}; +extern const char *msg_eol; +extern smallint logmode; +extern int die_sleep; +extern uint8_t xfunc_error_retval; +extern jmp_buf die_jmp; +extern void xfunc_die(void) __attribute__ ((__noreturn__)) ; +extern void bb_show_usage(void) __attribute__ ((__noreturn__)) ; +extern void bb_error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) ; +extern void bb_error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) ; +extern void bb_perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) ; +extern void bb_simple_perror_msg(const char *s) ; +extern void bb_perror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) ; +extern void bb_simple_perror_msg_and_die(const char *s) __attribute__ ((__noreturn__)) ; +extern void bb_herror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) ; +extern void bb_herror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2))) ; +extern void bb_perror_nomsg_and_die(void) __attribute__ ((__noreturn__)) ; +extern void bb_perror_nomsg(void) ; +extern void bb_info_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2))) ; +extern void bb_verror_msg(const char *s, va_list p, const char *strerr) ; +int bb_cat(char** argv); +int echo_main(int argc, char** argv) ; +int printf_main(int argc, char **argv) ; +int test_main(int argc, char **argv) ; +int kill_main(int argc, char **argv) ; +int chown_main(int argc, char **argv) ; +int ls_main(int argc, char **argv) ; +int gunzip_main(int argc, char **argv) ; +int bunzip2_main(int argc, char **argv) ; +int create_icmp_socket(void) ; +int create_icmp6_socket(void) ; +struct aftype { + const char *name; + const char *title; + int af; + int alen; + char* (*print)(unsigned char *); + const char* (*sprint)(struct sockaddr *, int numeric); + int (*input)( const char *bufp, struct sockaddr *); + void (*herror)(char *text); + int (*rprint)(int options); + int (*rinput)(int typ, int ext, char **argv); + int (*getmask)(char *src, struct sockaddr *mask, char *name); +}; +struct hwtype { + const char *name; + const char *title; + int type; + int alen; + char* (*print)(unsigned char *); + int (*input)(const char *, struct sockaddr *); + int (*activate)(int fd); + int suppress_null_addr; +}; +extern smallint interface_opt_a; +int display_interfaces(char *ifname) ; +int in_ib(const char *bufp, struct sockaddr *sap) ; +const struct aftype *get_aftype(const char *name) ; +const struct hwtype *get_hwtype(const char *name) ; +const struct hwtype *get_hwntype(int type) ; +extern int find_applet_by_name(const char *name) ; +extern void run_applet_and_exit(const char *name, char **argv) ; +extern void run_applet_no_and_exit(int a, char **argv) __attribute__ ((__noreturn__)) ; +extern int match_fstype(const struct mntent *mt, const char *fstypes) ; +extern struct mntent *find_mount_point(const char *name, int subdir_too) ; +extern void erase_mtab(const char * name) ; +extern unsigned int tty_baud_to_value(speed_t speed) ; +extern speed_t tty_value_to_baud(unsigned int value) ; +extern void bb_warn_ignoring_args(char *arg) ; +extern int get_linux_version_code(void) ; +extern char *query_loop(const char *device) ; +extern int del_loop(const char *device) ; +extern int set_loop(char **devname, const char *file, unsigned long long offset) ; +char *bb_ask_stdin(const char * prompt) ; +char *bb_ask(const int fd, int timeout, const char * prompt) ; +int bb_ask_confirmation(void) ; +int bb_parse_mode(const char* s, mode_t* theMode) ; +enum { + PARSE_COLLAPSE = 0x00010000, + PARSE_TRIM = 0x00020000, + PARSE_GREEDY = 0x00040000, + PARSE_MIN_DIE = 0x00100000, + PARSE_KEEP_COPY = 0x00200000 * 0, + PARSE_NORMAL = PARSE_COLLAPSE | PARSE_TRIM | PARSE_GREEDY, +}; +typedef struct parser_t { + FILE *fp; + char *line; + char *data; + int lineno; +} parser_t; +parser_t* config_open(const char *filename) ; +parser_t* config_open2(const char *filename, FILE* (*fopen_func)(const char *path)) ; +int config_read(parser_t *parser, char **tokens, unsigned flags, const char *delims) ; +void config_close(parser_t *parser) ; +char *concat_path_file(const char *path, const char *filename) ; +char *concat_subpath_file(const char *path, const char *filename) ; +const char *bb_basename(const char *name) ; +char *last_char_is(const char *s, int c) ; +int bb_make_directory(char *path, long mode, int flags) ; +int get_signum(const char *name) ; +const char *get_signame(int number) ; +void print_signames(void) ; +char *bb_simplify_path(const char *path) ; +char *bb_simplify_abs_path_inplace(char *path) ; +extern void bb_do_delay(int seconds) ; +extern void change_identity(const struct passwd *pw) ; +extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) __attribute__ ((__noreturn__)) ; +extern void selinux_or_die(void) ; +extern void setup_environment(const char *shell, int flags, const struct passwd *pw) ; +extern int correct_password(const struct passwd *pw) ; +extern char *pw_encrypt(const char *clear, const char *salt) ; +extern int obscure(const char *old, const char *newval, const struct passwd *pwdp) ; +extern int crypt_make_salt(char *p, int cnt, int rnd) ; +extern int update_passwd(const char *filename, const char *username, const char *data) + ; +int index_in_str_array(const char *const string_array[], const char *key) ; +int index_in_strings(const char *strings, const char *key) ; +int index_in_substr_array(const char *const string_array[], const char *key) ; +int index_in_substrings(const char *strings, const char *key) ; +const char *nth_string(const char *strings, int n) ; +extern void print_login_issue(const char *issue_file, const char *tty) ; +extern void print_login_prompt(void) ; +char *xmalloc_ttyname(int fd) __attribute__ ((malloc)); +int get_terminal_width_height(int fd, unsigned *width, unsigned *height) ; +int tcsetattr_stdin_TCSANOW(const struct termios *tp) ; +int ioctl_or_perror(int fd, unsigned request, void *argp, const char *fmt,...) __attribute__ ((format (printf, 4, 5))) ; +int ioctl_or_perror_and_die(int fd, unsigned request, void *argp, const char *fmt,...) __attribute__ ((format (printf, 4, 5))) ; +int bb_ioctl_or_warn(int fd, unsigned request, void *argp, const char *ioctl_name) ; +int bb_xioctl(int fd, unsigned request, void *argp, const char *ioctl_name) ; +char *is_in_ino_dev_hashtable(const struct stat *statbuf) ; +void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name) ; +void reset_ino_dev_hashtable(void) ; +unsigned long long bb_makedev(unsigned int major, unsigned int minor) ; +enum { + KEYCODE_UP = -2, + KEYCODE_DOWN = -3, + KEYCODE_RIGHT = -4, + KEYCODE_LEFT = -5, + KEYCODE_HOME = -6, + KEYCODE_END = -7, + KEYCODE_INSERT = -8, + KEYCODE_DELETE = -9, + KEYCODE_PAGEUP = -10, + KEYCODE_PAGEDOWN = -11, + KEYCODE_CTRL_UP = KEYCODE_UP & ~0x40, + KEYCODE_CTRL_DOWN = KEYCODE_DOWN & ~0x40, + KEYCODE_CTRL_RIGHT = KEYCODE_RIGHT & ~0x40, + KEYCODE_CTRL_LEFT = KEYCODE_LEFT & ~0x40, + KEYCODE_CURSOR_POS = -0x100, + KEYCODE_BUFFER_SIZE = 16 +}; +int64_t read_key(int fd, char *buffer, int timeout) ; +void read_key_ungets(char *buffer, const char *str, unsigned len) ; +typedef struct line_input_t { + int flags; + const char *path_lookup; + int cnt_history; + int cur_history; + unsigned cnt_history_in_file; + const char *hist_file; + char *history[(255 + 0) + 1]; +} line_input_t; +enum { + DO_HISTORY = 1 * ((255 + 0) > 0), + SAVE_HISTORY = 2 * ((255 + 0) > 0) * 1, + TAB_COMPLETION = 4 * 1, + USERNAME_COMPLETION = 8 * 1, + VI_MODE = 0x10 * 1, + WITH_PATH_LOOKUP = 0x20, + FOR_SHELL = DO_HISTORY | SAVE_HISTORY | TAB_COMPLETION | USERNAME_COMPLETION, +}; +line_input_t *new_line_input_t(int flags) ; +int read_line_input(const char* prompt, char* command, int maxsize, line_input_t *state) ; +enum { COMM_LEN = 16 }; +struct smaprec { + unsigned long mapped_rw; + unsigned long mapped_ro; + unsigned long shared_clean; + unsigned long shared_dirty; + unsigned long private_clean; + unsigned long private_dirty; + unsigned long stack; + unsigned long smap_pss, smap_swap; + unsigned long smap_size; + unsigned long smap_start; + char smap_mode[5]; + char *smap_name; +}; +int procps_read_smaps(pid_t pid, struct smaprec *total) + ; +typedef struct procps_status_t { + DIR *dir; + uint8_t shift_pages_to_bytes; + uint8_t shift_pages_to_kb; + uint16_t argv_len; + char *argv0; + char *exe; + unsigned long vsz, rss; + unsigned long stime, utime; + unsigned long start_time; + unsigned pid; + unsigned ppid; + unsigned pgid; + unsigned sid; + unsigned uid; + unsigned gid; + unsigned tty_major,tty_minor; + char state[4]; + char comm[COMM_LEN]; +} procps_status_t; +enum { + PSSCAN_PID = 1 << 0, + PSSCAN_PPID = 1 << 1, + PSSCAN_PGID = 1 << 2, + PSSCAN_SID = 1 << 3, + PSSCAN_UIDGID = 1 << 4, + PSSCAN_COMM = 1 << 5, + PSSCAN_ARGV0 = 1 << 7, + PSSCAN_EXE = 1 << 8, + PSSCAN_STATE = 1 << 9, + PSSCAN_VSZ = 1 << 10, + PSSCAN_RSS = 1 << 11, + PSSCAN_STIME = 1 << 12, + PSSCAN_UTIME = 1 << 13, + PSSCAN_TTY = 1 << 14, + PSSCAN_SMAPS = (1 << 15) * 0, + PSSCAN_ARGVN = (1 << 16) * (0 + || 0 || 0 + || 0 + || 0 + ), + PSSCAN_CONTEXT = (1 << 17) * 0, + PSSCAN_START_TIME = 1 << 18, + PSSCAN_CPU = (1 << 19) * 0, + PSSCAN_NICE = (1 << 20) * 0, + PSSCAN_RUIDGID = (1 << 21) * 0, + PSSCAN_TASKS = (1 << 22) * 0, + PSSCAN_STAT = PSSCAN_PPID | PSSCAN_PGID | PSSCAN_SID + | PSSCAN_COMM | PSSCAN_STATE + | PSSCAN_VSZ | PSSCAN_RSS + | PSSCAN_STIME | PSSCAN_UTIME | PSSCAN_START_TIME + | PSSCAN_TTY | PSSCAN_NICE + | PSSCAN_CPU +}; +void free_procps_scan(procps_status_t* sp) ; +procps_status_t* procps_scan(procps_status_t* sp, int flags) ; +void read_cmdline(char *buf, int size, unsigned pid, const char *comm) ; +pid_t *find_pid_by_name(const char* procName) ; +pid_t *pidlist_reverse(pid_t *pidList) ; +int starts_with_cpu(const char *str) ; +unsigned get_cpu_count(void) ; +extern const char bb_uuenc_tbl_base64[]; +extern const char bb_uuenc_tbl_std[]; +void bb_uuencode(char *store, const void *s, int length, const char *tbl) ; +enum { + BASE64_FLAG_UU_STOP = 0x100, + BASE64_FLAG_NO_STOP_CHAR = 0x80, +}; +void read_base64(FILE *src_stream, FILE *dst_stream, int flags); +typedef struct md5_ctx_t { + uint8_t wbuffer[64]; + void (*process_block)(struct md5_ctx_t*) ; + uint64_t total64; + uint32_t hash[8]; +} md5_ctx_t; +typedef struct md5_ctx_t sha1_ctx_t; +typedef struct md5_ctx_t sha256_ctx_t; +typedef struct sha512_ctx_t { + uint64_t total64[2]; + uint64_t hash[8]; + uint8_t wbuffer[128]; +} sha512_ctx_t; +void md5_begin(md5_ctx_t *ctx) ; +void md5_hash(md5_ctx_t *ctx, const void *data, size_t length) ; +void md5_end(md5_ctx_t *ctx, void *resbuf) ; +void sha1_begin(sha1_ctx_t *ctx) ; +void sha1_end(sha1_ctx_t *ctx, void *resbuf) ; +void sha256_begin(sha256_ctx_t *ctx) ; +void sha512_begin(sha512_ctx_t *ctx) ; +void sha512_hash(sha512_ctx_t *ctx, const void *buffer, size_t len) ; +void sha512_end(sha512_ctx_t *ctx, void *resbuf) ; +extern uint32_t *global_crc32_table; +uint32_t *crc32_filltable(uint32_t *tbl256, int endian) ; +uint32_t crc32_block_endian1(uint32_t val, const void *buf, unsigned len, uint32_t *crc_table) ; +uint32_t crc32_block_endian0(uint32_t val, const void *buf, unsigned len, uint32_t *crc_table) ; +typedef struct masks_labels_t { + const char *labels; + const int masks[]; +} masks_labels_t; +int print_flags_separated(const int *masks, const char *labels, + int flags, const char *separator) ; +int print_flags(const masks_labels_t *ml, int flags) ; +typedef struct bb_progress_t { + off_t lastsize; + unsigned lastupdate_sec; + unsigned start_sec; + smallint inited; +} bb_progress_t; +void bb_progress_init(bb_progress_t *p) ; +void bb_progress_update(bb_progress_t *p, const char *curfile, + off_t beg_range, off_t transferred, + off_t totalsize) ; +extern const char *applet_name; +extern const char bb_banner[]; +extern const char bb_msg_memory_exhausted[]; +extern const char bb_msg_invalid_date[]; +extern const char bb_msg_unknown[]; +extern const char bb_msg_can_not_create_raw_socket[]; +extern const char bb_msg_perm_denied_are_you_root[]; +extern const char bb_msg_you_must_be_root[]; +extern const char bb_msg_requires_arg[]; +extern const char bb_msg_invalid_arg[]; +extern const char bb_msg_standard_input[]; +extern const char bb_msg_standard_output[]; +extern const char bb_hexdigits_upcase[]; +extern const char bb_path_wtmp_file[]; +extern const char bb_busybox_exec_path[]; +extern const char bb_PATH_root_path[]; +extern const int const_int_0; +extern const int const_int_1; +enum { COMMON_BUFSIZE = (8192 >= 256*sizeof(void*) ? 8192 +1 : 256*sizeof(void*)) }; +char bb_common_bufsiz1[COMMON_BUFSIZE]; +struct globals; +extern struct globals *const ptr_to_globals; +extern const char bb_default_login_shell[]; +static __attribute__ ((always_inline)) __inline__ int bb_ascii_isalnum(unsigned char a) +{ + unsigned char b = a - '0'; + if (b <= 9) + return (b <= 9); + b = (a|0x20) - 'a'; + return b <= 'z' - 'a'; +} +static __attribute__ ((always_inline)) __inline__ int bb_ascii_isxdigit(unsigned char a) +{ + unsigned char b = a - '0'; + if (b <= 9) + return (b <= 9); + b = (a|0x20) - 'a'; + return b <= 'f' - 'a'; +} +static __attribute__ ((always_inline)) __inline__ unsigned char bb_ascii_toupper(unsigned char a) +{ + unsigned char b = a - 'a'; + if (b <= ('z' - 'a')) + a -= 'a' - 'A'; + return a; +} +static __attribute__ ((always_inline)) __inline__ unsigned char bb_ascii_tolower(unsigned char a) +{ + unsigned char b = a - 'A'; + if (b <= ('Z' - 'A')) + a += 'a' - 'A'; + return a; +} +enum { + ERR_OK = 0, + ERR_MEM, + ERR_IO, + ERR_TIMEOUT, + ERR_ABORT, +}; +static void signal_handler(__attribute__ ((__unused__)) int signo) +{ + bb_got_signal = ERR_IO; +} +/* +static size_t unescape(char *s) +{ + char *start = s; + char *p = s; + while (*s) { + char c = *s; + if ('\\' == c) { + c = *++s; + if (c) { + if ('N' == c) { + c = '\0'; + } else if ('s' == c) { + c = ' '; + } else { + c = bb_process_escape_sequence((const char **)&s); + s--; + } + } + } else if ('^' == c) { + c = *++s-'@'; + } + *p++ = c; + s++; + } + *p = '\0'; + return p - start; +} +*/ +int main(int argc __attribute__ ((__unused__)), char **argv) +{ + int record_fd = -1; + _Bool echo = 0; + llist_t *aborts = ((void *)0); + int timeout = 45*1000; + enum { + DIR_HANGUP = 0, + DIR_ABORT, + DIR_TIMEOUT, + DIR_ECHO, + DIR_SAY, + DIR_RECORD, + }; + argv++; + while (*argv) { + int key; + if (key >= 0) { + char *arg = *++argv; + _Bool onoff = (0 != __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ("OFF") && __builtin_constant_p (arg) && (__s1_len = strlen ("OFF"), __s2_len = strlen (arg), (!((size_t)(const void *)(("OFF") + 1) - (size_t)(const void *)("OFF") == 1) || __s1_len >= 4) && (!((size_t)(const void *)((arg) + 1) - (size_t)(const void *)(arg) == 1) || __s2_len >= 4)) ? __builtin_strcmp ("OFF", arg) : (__builtin_constant_p ("OFF") && ((size_t)(const void *)(("OFF") + 1) - (size_t)(const void *)("OFF") == 1) && (__s1_len = strlen ("OFF"), __s1_len < 4) ? (__builtin_constant_p (arg) && ((size_t)(const void *)((arg) + 1) - (size_t)(const void *)(arg) == 1) ? __builtin_strcmp ("OFF", arg) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (arg); register int __result = (((const unsigned char *) (const char *) ("OFF"))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((const unsigned char *) (const char *) ("OFF"))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((const unsigned char *) (const char *) ("OFF"))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((const unsigned char *) (const char *) ("OFF"))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (arg) && ((size_t)(const void *)((arg) + 1) - (size_t)(const void *)(arg) == 1) && (__s2_len = strlen (arg), __s2_len < 4) ? (__builtin_constant_p ("OFF") && ((size_t)(const void *)(("OFF") + 1) - (size_t)(const void *)("OFF") == 1) ? __builtin_strcmp ("OFF", arg) : (__extension__ ({ const unsigned char *__s1 = (const unsigned char *) (const char *) ("OFF"); register int __result = __s1[0] - ((const unsigned char *) (const char *) (arg))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((const unsigned char *) (const char *) (arg))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((const unsigned char *) (const char *) (arg))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((const unsigned char *) (const char *) (arg))[3]); } } __result; }))) : __builtin_strcmp ("OFF", arg)))); })); + if (DIR_HANGUP == key) { + signal(1, onoff ? signal_handler : ((__sighandler_t) 1)); + + } else if (DIR_TIMEOUT == key) { + timeout = atoi(arg) * 1000; + if (!timeout) + timeout = 45*1000; + } else if (DIR_ECHO == key) { + echo = onoff; + } else if (DIR_RECORD == key) { + if (record_fd > 0) + close(record_fd); + } else if (DIR_SAY == key) { + } + argv++; + } else { + int expect_len; + size_t buf_len = 0; + size_t max_len = 50; + struct pollfd pfd; + char *expect = *argv++; + if (!expect) + goto expect_done; +// expect_len = unescape(expect); + if (expect_len > max_len) + max_len = expect_len; + if (!expect_len) + goto expect_done; + if (max_len >= COMMON_BUFSIZE) { + bb_got_signal = ERR_MEM; + goto expect_done; + } + pfd.fd = 0; + pfd.events = 0x001; + while (!bb_got_signal + && poll(&pfd, 1, timeout) > 0 + && (pfd.revents & 0x001) + ) { + llist_t *l; + ssize_t delta; + if (read(0, bb_common_bufsiz1+buf_len, 1) > 0) { + buf_len++; + if (buf_len > COMMON_BUFSIZE) { + memmove(bb_common_bufsiz1, bb_common_bufsiz1+buf_len-max_len, max_len); + buf_len = max_len; + } + } + for (l = aborts, bb_got_signal = ERR_ABORT; l; l = l->link, ++bb_got_signal) { + size_t len = strlen(l->data); + delta = buf_len-len; + if (delta >= 0 && !memcmp(bb_common_bufsiz1+delta, l->data, len)) + goto expect_done; + } + bb_got_signal = ERR_OK; + delta = buf_len - expect_len; + if (delta >= 0 && !memcmp(bb_common_bufsiz1+delta, expect, expect_len)) + goto expect_done; + } + bb_got_signal = ERR_TIMEOUT; + expect_done: + if (bb_got_signal) + break; + if (*argv) { + char *loaded = ((void *)0); + size_t len; + char *buf = *argv++; + if ('@' == *buf) { + } +// len = unescape(buf); + alarm(timeout); + pfd.fd = 1; + pfd.events = 0x004; + alarm(0); + if (len) + bb_got_signal = ERR_IO; + if (loaded) + free(loaded); + if (bb_got_signal) + break; + } + } + } + return bb_got_signal; +} diff --git a/353816/busybox.i.1 b/353816/busybox.i.1 new file mode 100644 index 0000000..47e4ea4 --- /dev/null +++ b/353816/busybox.i.1 @@ -0,0 +1,38 @@ + +typedef long unsigned int size_t; +extern __inline __attribute__ ((__always_inline__)) + __attribute__ ((__gnu_inline__, __artificial__)) +void * + __attribute__ ((__nothrow__)) memmove(void *__dest, const void *__src, + size_t __len) +{ + return __builtin___memmove_chk(__dest, __src, __len, + __builtin_object_size(__dest, 0)); +} + +struct pollfd { + short int revents; +}; +char bb_got_signal; +char bb_common_bufsiz1[8192]; +int main(int argc __attribute__ ((__unused__)), char **argv) +{ + int timeout = 45 * 1000; + while (*argv) { + char *arg = *++argv; + size_t buf_len = 0; + size_t max_len = 50; + struct pollfd pfd; + while (!bb_got_signal && poll(&pfd, 1, timeout) > 0 + && (pfd.revents & 0x001)) { + if (read(0, bb_common_bufsiz1 + buf_len, 1) > 0) { + if (buf_len > sizeof(bb_common_bufsiz1)) { + memmove(bb_common_bufsiz1, + bb_common_bufsiz1 + + buf_len - max_len, + max_len); + } + } + } + } +} diff --git a/353816/busybox.i.2 b/353816/busybox.i.2 new file mode 100644 index 0000000..d8b0929 --- /dev/null +++ b/353816/busybox.i.2 @@ -0,0 +1,31 @@ + +typedef long unsigned int size_t; +extern __inline __attribute__ ((__always_inline__)) + __attribute__ ((__gnu_inline__, __artificial__)) +void * + __attribute__ ((__nothrow__)) memmove(void *__dest, const void *__src, + size_t __len) +{ + return __builtin___memmove_chk(__dest, __src, __len, + __builtin_object_size(__dest, 0)); +} + +struct pollfd { + short int revents; +}; +char bb_got_signal; +char bb_common_bufsiz1[8192]; +int main(int argc __attribute__ ((__unused__)), char **argv) +{ + int timeout = 45 * 1000; + while (*argv) { + char *arg = *++argv; + size_t buf_len = 0; + size_t max_len = 50; + struct pollfd pfd; + memmove(bb_common_bufsiz1, + bb_common_bufsiz1 + + buf_len - max_len, + max_len); + } +} diff --git a/353816/reduce-ice b/353816/reduce-ice new file mode 100755 index 0000000..3e79756 --- /dev/null +++ b/353816/reduce-ice @@ -0,0 +1,13 @@ +#!/bin/bash +# +# Run like: +# multidelta -level=# ./reduce-ice $FILE +# levels: 0 0 1 1 2 2 10 10 +# + +FILE=busybox.i +CC=gcc +CFLAGS="" +STRING="undefined reference to.*__memmove_chk_ssse3" + +$CC -pipe -static $CFLAGS $FILE 2>&1 | grep "$STRING" diff --git a/360229/reduce-ice b/360229/reduce-ice new file mode 100755 index 0000000..ce68bbb --- /dev/null +++ b/360229/reduce-ice @@ -0,0 +1,13 @@ +#!/bin/bash +# +# Run like: +# multidelta -level=# ./reduce-ice $FILE +# levels: 0 0 1 1 2 2 10 10 +# + +FILE=xapian_wrap.i +CC=g++-4.4.4 +CFLAGS="" +STRING="internal compiler error.*partition_view_bitmap" + +$CC -pipe -c $CFLAGS $FILE 2>&1 | grep "$STRING" diff --git a/360229/xapian_wrap.i b/360229/xapian_wrap.i new file mode 100644 index 0000000..8f9f1ff --- /dev/null +++ b/360229/xapian_wrap.i @@ -0,0 +1,34 @@ +namespace x { + namespace Internal { + template < class T > class RefCntPtr { + public: + T *operator->() const; + T *get() const; + }; + template < class T > inline T * RefCntPtr < T >::get() const {} + } + + class iter { + public: + class Internal; + x::Internal::RefCntPtr < Internal > internal; + }; + bool operator == (const x::iter &a, const x::iter &b) { + return a.internal.get() == b.internal.get(); + } +} + +bool equals(x::iter const *self, x::iter const &other) +{ + return *self == other; +} + +bool f() +{ + x::iter * arg1, *arg2; + bool result; + try { + result = equals((x::iter const *)arg1, (x::iter const &)*arg2); + } catch (...) {} + return result; +} diff --git a/360229/xapian_wrap.i.0 b/360229/xapian_wrap.i.0 new file mode 100644 index 0000000..9d11b4c --- /dev/null +++ b/360229/xapian_wrap.i.0 @@ -0,0 +1,63091 @@ +template class SwigValueWrapper { + struct SwigMovePointer { + T *ptr; + SwigMovePointer(T *p) : ptr(p) { } + ~SwigMovePointer() { delete ptr; } + SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } + } pointer; + SwigValueWrapper& operator=(const SwigValueWrapper& rhs); + SwigValueWrapper(const SwigValueWrapper& rhs); +public: + SwigValueWrapper() : pointer(0) { } + SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } + operator T&() const { return *pointer.ptr; } + T *operator&() { return pointer.ptr; } +}; +template T SwigValueInit() { + return T(); +} +extern "C" { +typedef long unsigned int size_t; +typedef unsigned char __u_char; +typedef unsigned short int __u_short; +typedef unsigned int __u_int; +typedef unsigned long int __u_long; +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; +typedef signed long int __int64_t; +typedef unsigned long int __uint64_t; +typedef long int __quad_t; +typedef unsigned long int __u_quad_t; +typedef unsigned long int __dev_t; +typedef unsigned int __uid_t; +typedef unsigned int __gid_t; +typedef unsigned long int __ino_t; +typedef unsigned long int __ino64_t; +typedef unsigned int __mode_t; +typedef unsigned long int __nlink_t; +typedef long int __off_t; +typedef long int __off64_t; +typedef int __pid_t; +typedef struct { int __val[2]; } __fsid_t; +typedef long int __clock_t; +typedef unsigned long int __rlim_t; +typedef unsigned long int __rlim64_t; +typedef unsigned int __id_t; +typedef long int __time_t; +typedef unsigned int __useconds_t; +typedef long int __suseconds_t; +typedef int __daddr_t; +typedef long int __swblk_t; +typedef int __key_t; +typedef int __clockid_t; +typedef void * __timer_t; +typedef long int __blksize_t; +typedef long int __blkcnt_t; +typedef long int __blkcnt64_t; +typedef unsigned long int __fsblkcnt_t; +typedef unsigned long int __fsblkcnt64_t; +typedef unsigned long int __fsfilcnt_t; +typedef unsigned long int __fsfilcnt64_t; +typedef long int __ssize_t; +typedef __off64_t __loff_t; +typedef __quad_t *__qaddr_t; +typedef char *__caddr_t; +typedef long int __intptr_t; +typedef unsigned int __socklen_t; +struct _IO_FILE; +typedef struct _IO_FILE FILE; +typedef struct _IO_FILE __FILE; +typedef struct +{ + int __count; + union + { + unsigned int __wch; + char __wchb[4]; + } __value; +} __mbstate_t; +typedef struct +{ + __off_t __pos; + __mbstate_t __state; +} _G_fpos_t; +typedef struct +{ + __off64_t __pos; + __mbstate_t __state; +} _G_fpos64_t; +typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); +typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); +typedef __builtin_va_list __gnuc_va_list; +struct _IO_jump_t; struct _IO_FILE; +typedef void _IO_lock_t; +struct _IO_marker { + struct _IO_marker *_next; + struct _IO_FILE *_sbuf; + int _pos; +}; +enum __codecvt_result +{ + __codecvt_ok, + __codecvt_partial, + __codecvt_error, + __codecvt_noconv +}; +struct _IO_FILE { + int _flags; + char* _IO_read_ptr; + char* _IO_read_end; + char* _IO_read_base; + char* _IO_write_base; + char* _IO_write_ptr; + char* _IO_write_end; + char* _IO_buf_base; + char* _IO_buf_end; + char *_IO_save_base; + char *_IO_backup_base; + char *_IO_save_end; + struct _IO_marker *_markers; + struct _IO_FILE *_chain; + int _fileno; + int _flags2; + __off_t _old_offset; + unsigned short _cur_column; + signed char _vtable_offset; + char _shortbuf[1]; + _IO_lock_t *_lock; + __off64_t _offset; + void *__pad1; + void *__pad2; + void *__pad3; + void *__pad4; + size_t __pad5; + int _mode; + char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; +}; +struct _IO_FILE_plus; +extern struct _IO_FILE_plus _IO_2_1_stdin_; +extern struct _IO_FILE_plus _IO_2_1_stdout_; +extern struct _IO_FILE_plus _IO_2_1_stderr_; +typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); +typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, + size_t __n); +typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); +typedef int __io_close_fn (void *__cookie); +typedef __io_read_fn cookie_read_function_t; +typedef __io_write_fn cookie_write_function_t; +typedef __io_seek_fn cookie_seek_function_t; +typedef __io_close_fn cookie_close_function_t; +typedef struct +{ + __io_read_fn *read; + __io_write_fn *write; + __io_seek_fn *seek; + __io_close_fn *close; +} _IO_cookie_io_functions_t; +typedef _IO_cookie_io_functions_t cookie_io_functions_t; +struct _IO_cookie_file; +extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, + void *__cookie, _IO_cookie_io_functions_t __fns); +extern "C" { +extern int __underflow (_IO_FILE *); +extern int __uflow (_IO_FILE *); +extern int __overflow (_IO_FILE *, int); +extern int _IO_getc (_IO_FILE *__fp); +extern int _IO_putc (int __c, _IO_FILE *__fp); +extern int _IO_feof (_IO_FILE *__fp) throw (); +extern int _IO_ferror (_IO_FILE *__fp) throw (); +extern int _IO_peekc_locked (_IO_FILE *__fp); +extern void _IO_flockfile (_IO_FILE *) throw (); +extern void _IO_funlockfile (_IO_FILE *) throw (); +extern int _IO_ftrylockfile (_IO_FILE *) throw (); +extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, + __gnuc_va_list, int *__restrict); +extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, + __gnuc_va_list); +extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); +extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); +extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); +extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); +extern void _IO_free_backup_area (_IO_FILE *) throw (); +} +typedef __gnuc_va_list va_list; +typedef _G_fpos64_t fpos_t; +typedef _G_fpos64_t fpos64_t; +extern struct _IO_FILE *stdin; +extern struct _IO_FILE *stdout; +extern struct _IO_FILE *stderr; +extern int remove (__const char *__filename) throw (); +extern int rename (__const char *__old, __const char *__new) throw (); +extern int renameat (int __oldfd, __const char *__old, int __newfd, + __const char *__new) throw (); +extern FILE *tmpfile (void) __asm__ ("" "tmpfile64") ; +extern FILE *tmpfile64 (void) ; +extern char *tmpnam (char *__s) throw () ; +extern char *tmpnam_r (char *__s) throw () ; +extern char *tempnam (__const char *__dir, __const char *__pfx) + throw () __attribute__ ((__malloc__)) ; +extern int fclose (FILE *__stream); +extern int fflush (FILE *__stream); +extern int fflush_unlocked (FILE *__stream); +extern int fcloseall (void); +extern FILE *fopen (__const char *__restrict __filename, __const char *__restrict __modes) __asm__ ("" "fopen64") + ; +extern FILE *freopen (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) __asm__ ("" "freopen64") + ; +extern FILE *fopen64 (__const char *__restrict __filename, + __const char *__restrict __modes) ; +extern FILE *freopen64 (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) ; +extern FILE *fdopen (int __fd, __const char *__modes) throw () ; +extern FILE *fopencookie (void *__restrict __magic_cookie, + __const char *__restrict __modes, + _IO_cookie_io_functions_t __io_funcs) throw () ; +extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) + throw () ; +extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () ; +extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); +extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, + int __modes, size_t __n) throw (); +extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, + size_t __size) throw (); +extern void setlinebuf (FILE *__stream) throw (); +extern int fprintf (FILE *__restrict __stream, + __const char *__restrict __format, ...); +extern int printf (__const char *__restrict __format, ...); +extern int sprintf (char *__restrict __s, + __const char *__restrict __format, ...) throw (); +extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg); +extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); +extern int vsprintf (char *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) throw (); +extern int snprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, ...) + throw () __attribute__ ((__format__ (__printf__, 3, 4))); +extern int vsnprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__printf__, 3, 0))); +extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, + __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__printf__, 2, 0))) ; +extern int __asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + throw () __attribute__ ((__format__ (__printf__, 2, 3))) ; +extern int asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + throw () __attribute__ ((__format__ (__printf__, 2, 3))) ; +extern int vdprintf (int __fd, __const char *__restrict __fmt, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 2, 0))); +extern int dprintf (int __fd, __const char *__restrict __fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); +extern int fscanf (FILE *__restrict __stream, + __const char *__restrict __format, ...) ; +extern int scanf (__const char *__restrict __format, ...) ; +extern int sscanf (__const char *__restrict __s, + __const char *__restrict __format, ...) throw (); +extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 2, 0))) ; +extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 1, 0))) ; +extern int vsscanf (__const char *__restrict __s, + __const char *__restrict __format, __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__scanf__, 2, 0))); +extern int fgetc (FILE *__stream); +extern int getc (FILE *__stream); +extern int getchar (void); +extern int getc_unlocked (FILE *__stream); +extern int getchar_unlocked (void); +extern int fgetc_unlocked (FILE *__stream); +extern int fputc (int __c, FILE *__stream); +extern int putc (int __c, FILE *__stream); +extern int putchar (int __c); +extern int fputc_unlocked (int __c, FILE *__stream); +extern int putc_unlocked (int __c, FILE *__stream); +extern int putchar_unlocked (int __c); +extern int getw (FILE *__stream); +extern int putw (int __w, FILE *__stream); +extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) + ; +extern char *gets (char *__s) ; +extern char *fgets_unlocked (char *__restrict __s, int __n, + FILE *__restrict __stream) ; +extern __ssize_t __getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) ; +extern __ssize_t getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) ; +extern __ssize_t getline (char **__restrict __lineptr, + size_t *__restrict __n, + FILE *__restrict __stream) ; +extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); +extern int puts (__const char *__s); +extern int ungetc (int __c, FILE *__stream); +extern size_t fread (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) ; +extern size_t fwrite (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __s) ; +extern int fputs_unlocked (__const char *__restrict __s, + FILE *__restrict __stream); +extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) ; +extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) ; +extern int fseek (FILE *__stream, long int __off, int __whence); +extern long int ftell (FILE *__stream) ; +extern void rewind (FILE *__stream); +extern int fseeko (FILE *__stream, __off64_t __off, int __whence) __asm__ ("" "fseeko64"); +extern __off64_t ftello (FILE *__stream) __asm__ ("" "ftello64"); +extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos) __asm__ ("" "fgetpos64"); +extern int fsetpos (FILE *__stream, __const fpos_t *__pos) __asm__ ("" "fsetpos64"); +extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); +extern __off64_t ftello64 (FILE *__stream) ; +extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); +extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); +extern void clearerr (FILE *__stream) throw (); +extern int feof (FILE *__stream) throw () ; +extern int ferror (FILE *__stream) throw () ; +extern void clearerr_unlocked (FILE *__stream) throw (); +extern int feof_unlocked (FILE *__stream) throw () ; +extern int ferror_unlocked (FILE *__stream) throw () ; +extern void perror (__const char *__s); +extern int sys_nerr; +extern __const char *__const sys_errlist[]; +extern int _sys_nerr; +extern __const char *__const _sys_errlist[]; +extern int fileno (FILE *__stream) throw () ; +extern int fileno_unlocked (FILE *__stream) throw () ; +extern FILE *popen (__const char *__command, __const char *__modes) ; +extern int pclose (FILE *__stream); +extern char *ctermid (char *__s) throw (); +extern char *cuserid (char *__s); +struct obstack; +extern int obstack_printf (struct obstack *__restrict __obstack, + __const char *__restrict __format, ...) + throw () __attribute__ ((__format__ (__printf__, 2, 3))); +extern int obstack_vprintf (struct obstack *__restrict __obstack, + __const char *__restrict __format, + __gnuc_va_list __args) + throw () __attribute__ ((__format__ (__printf__, 2, 0))); +extern void flockfile (FILE *__stream) throw (); +extern int ftrylockfile (FILE *__stream) throw () ; +extern void funlockfile (FILE *__stream) throw (); +} +extern "C" { +extern void *memcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void *memmove (void *__dest, __const void *__src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, + int __c, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1))); +extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern "C++" +{ +extern void *memchr (void *__s, int __c, size_t __n) + throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const void *memchr (__const void *__s, int __c, size_t __n) + throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +} +extern "C++" void *rawmemchr (void *__s, int __c) + throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" __const void *rawmemchr (__const void *__s, int __c) + throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" void *memrchr (void *__s, int __c, size_t __n) + throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" __const void *memrchr (__const void *__s, int __c, size_t __n) + throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *strncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *strcat (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *strncat (char *__restrict __dest, __const char *__restrict __src, + size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int strcmp (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern int strcoll (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern size_t strxfrm (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (2))); +typedef struct __locale_struct +{ + struct locale_data *__locales[13]; + const unsigned short int *__ctype_b; + const int *__ctype_tolower; + const int *__ctype_toupper; + const char *__names[13]; +} *__locale_t; +typedef __locale_t locale_t; +extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); +extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, + __locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4))); +extern char *strdup (__const char *__s) + throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); +extern char *strndup (__const char *__string, size_t __n) + throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); +extern "C++" +{ +extern char *strchr (char *__s, int __c) + throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *strchr (__const char *__s, int __c) + throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +} +extern "C++" +{ +extern char *strrchr (char *__s, int __c) + throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *strrchr (__const char *__s, int __c) + throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +} +extern "C++" char *strchrnul (char *__s, int __c) + throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" __const char *strchrnul (__const char *__s, int __c) + throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern size_t strcspn (__const char *__s, __const char *__reject) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern size_t strspn (__const char *__s, __const char *__accept) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern "C++" +{ +extern char *strpbrk (char *__s, __const char *__accept) + throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern __const char *strpbrk (__const char *__s, __const char *__accept) + throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +} +extern "C++" +{ +extern char *strstr (char *__haystack, __const char *__needle) + throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern __const char *strstr (__const char *__haystack, + __const char *__needle) + throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +} +extern char *strtok (char *__restrict __s, __const char *__restrict __delim) + throw () __attribute__ ((__nonnull__ (2))); +extern char *__strtok_r (char *__restrict __s, + __const char *__restrict __delim, + char **__restrict __save_ptr) + throw () __attribute__ ((__nonnull__ (2, 3))); +extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, + char **__restrict __save_ptr) + throw () __attribute__ ((__nonnull__ (2, 3))); +extern "C++" char *strcasestr (char *__haystack, __const char *__needle) + throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern "C++" __const char *strcasestr (__const char *__haystack, + __const char *__needle) + throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern void *memmem (__const void *__haystack, size_t __haystacklen, + __const void *__needle, size_t __needlelen) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); +extern void *__mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void *mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern size_t strlen (__const char *__s) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern size_t strnlen (__const char *__string, size_t __maxlen) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern char *strerror (int __errnum) throw (); +extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) + throw () __attribute__ ((__nonnull__ (2))); +extern char *strerror_l (int __errnum, __locale_t __l) throw (); +extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); +extern void bcopy (__const void *__src, void *__dest, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); +extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern "C++" +{ +extern char *index (char *__s, int __c) + throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *index (__const char *__s, int __c) + throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +} +extern "C++" +{ +extern char *rindex (char *__s, int __c) + throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *rindex (__const char *__s, int __c) + throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +} +extern int ffs (int __i) throw () __attribute__ ((__const__)); +extern int ffsl (long int __l) throw () __attribute__ ((__const__)); +__extension__ extern int ffsll (long long int __ll) + throw () __attribute__ ((__const__)); +extern int strcasecmp (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern int strcasecmp_l (__const char *__s1, __const char *__s2, + __locale_t __loc) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); +extern int strncasecmp_l (__const char *__s1, __const char *__s2, + size_t __n, __locale_t __loc) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); +extern char *strsep (char **__restrict __stringp, + __const char *__restrict __delim) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *strsignal (int __sig) throw (); +extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *__stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int strverscmp (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1))); +extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); +extern "C++" char *basename (char *__filename) + throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); +extern "C++" __const char *basename (__const char *__filename) + throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); +} +extern "C" { +extern int *__errno_location (void) throw () __attribute__ ((__const__)); +extern char *program_invocation_name, *program_invocation_short_name; +} +typedef int error_t; +extern "C" { +union wait + { + int w_status; + struct + { + unsigned int __w_termsig:7; + unsigned int __w_coredump:1; + unsigned int __w_retcode:8; + unsigned int:16; + } __wait_terminated; + struct + { + unsigned int __w_stopval:8; + unsigned int __w_stopsig:8; + unsigned int:16; + } __wait_stopped; + }; +typedef struct + { + int quot; + int rem; + } div_t; +typedef struct + { + long int quot; + long int rem; + } ldiv_t; +__extension__ typedef struct + { + long long int quot; + long long int rem; + } lldiv_t; +extern size_t __ctype_get_mb_cur_max (void) throw () ; +extern double atof (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; +extern int atoi (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; +extern long int atol (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; +__extension__ extern long long int atoll (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; +extern double strtod (__const char *__restrict __nptr, + char **__restrict __endptr) + throw () __attribute__ ((__nonnull__ (1))) ; +extern float strtof (__const char *__restrict __nptr, + char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ; +extern long double strtold (__const char *__restrict __nptr, + char **__restrict __endptr) + throw () __attribute__ ((__nonnull__ (1))) ; +extern long int strtol (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) ; +extern unsigned long int strtoul (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) ; +__extension__ +extern long long int strtoq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) ; +__extension__ +extern unsigned long long int strtouq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) ; +__extension__ +extern long long int strtoll (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) ; +__extension__ +extern unsigned long long int strtoull (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) ; +extern long int strtol_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ; +extern unsigned long int strtoul_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 4))) ; +__extension__ +extern long long int strtoll_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 4))) ; +__extension__ +extern unsigned long long int strtoull_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 4))) ; +extern double strtod_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 3))) ; +extern float strtof_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 3))) ; +extern long double strtold_l (__const char *__restrict __nptr, + char **__restrict __endptr, + __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 3))) ; +extern char *l64a (long int __n) throw () ; +extern long int a64l (__const char *__s) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ; +extern "C" { +typedef __u_char u_char; +typedef __u_short u_short; +typedef __u_int u_int; +typedef __u_long u_long; +typedef __quad_t quad_t; +typedef __u_quad_t u_quad_t; +typedef __fsid_t fsid_t; +typedef __loff_t loff_t; +typedef __ino64_t ino_t; +typedef __ino64_t ino64_t; +typedef __dev_t dev_t; +typedef __gid_t gid_t; +typedef __mode_t mode_t; +typedef __nlink_t nlink_t; +typedef __uid_t uid_t; +typedef __off64_t off_t; +typedef __off64_t off64_t; +typedef __pid_t pid_t; +typedef __id_t id_t; +typedef __ssize_t ssize_t; +typedef __daddr_t daddr_t; +typedef __caddr_t caddr_t; +typedef __key_t key_t; +typedef __clock_t clock_t; +typedef __time_t time_t; +typedef __clockid_t clockid_t; +typedef __timer_t timer_t; +typedef __useconds_t useconds_t; +typedef __suseconds_t suseconds_t; +typedef unsigned long int ulong; +typedef unsigned short int ushort; +typedef unsigned int uint; +typedef int int8_t __attribute__ ((__mode__ (__QI__))); +typedef int int16_t __attribute__ ((__mode__ (__HI__))); +typedef int int32_t __attribute__ ((__mode__ (__SI__))); +typedef int int64_t __attribute__ ((__mode__ (__DI__))); +typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); +typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); +typedef int register_t __attribute__ ((__mode__ (__word__))); +typedef int __sig_atomic_t; +typedef struct + { + unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; + } __sigset_t; +typedef __sigset_t sigset_t; +struct timespec + { + __time_t tv_sec; + long int tv_nsec; + }; +struct timeval + { + __time_t tv_sec; + __suseconds_t tv_usec; + }; +typedef long int __fd_mask; +typedef struct + { + __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; + } fd_set; +typedef __fd_mask fd_mask; +extern "C" { +extern int select (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + struct timeval *__restrict __timeout); +extern int pselect (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + const struct timespec *__restrict __timeout, + const __sigset_t *__restrict __sigmask); +} +__extension__ +extern unsigned int gnu_dev_major (unsigned long long int __dev) + throw (); +__extension__ +extern unsigned int gnu_dev_minor (unsigned long long int __dev) + throw (); +__extension__ +extern unsigned long long int gnu_dev_makedev (unsigned int __major, + unsigned int __minor) + throw (); +typedef __blksize_t blksize_t; +typedef __blkcnt64_t blkcnt_t; +typedef __fsblkcnt64_t fsblkcnt_t; +typedef __fsfilcnt64_t fsfilcnt_t; +typedef __blkcnt64_t blkcnt64_t; +typedef __fsblkcnt64_t fsblkcnt64_t; +typedef __fsfilcnt64_t fsfilcnt64_t; +typedef unsigned long int pthread_t; +typedef union +{ + char __size[56]; + long int __align; +} pthread_attr_t; +typedef struct __pthread_internal_list +{ + struct __pthread_internal_list *__prev; + struct __pthread_internal_list *__next; +} __pthread_list_t; +typedef union +{ + struct __pthread_mutex_s + { + int __lock; + unsigned int __count; + int __owner; + unsigned int __nusers; + int __kind; + int __spins; + __pthread_list_t __list; + } __data; + char __size[40]; + long int __align; +} pthread_mutex_t; +typedef union +{ + char __size[4]; + int __align; +} pthread_mutexattr_t; +typedef union +{ + struct + { + int __lock; + unsigned int __futex; + __extension__ unsigned long long int __total_seq; + __extension__ unsigned long long int __wakeup_seq; + __extension__ unsigned long long int __woken_seq; + void *__mutex; + unsigned int __nwaiters; + unsigned int __broadcast_seq; + } __data; + char __size[48]; + __extension__ long long int __align; +} pthread_cond_t; +typedef union +{ + char __size[4]; + int __align; +} pthread_condattr_t; +typedef unsigned int pthread_key_t; +typedef int pthread_once_t; +typedef union +{ + struct + { + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + int __writer; + int __shared; + unsigned long int __pad1; + unsigned long int __pad2; + unsigned int __flags; + } __data; + char __size[56]; + long int __align; +} pthread_rwlock_t; +typedef union +{ + char __size[8]; + long int __align; +} pthread_rwlockattr_t; +typedef volatile int pthread_spinlock_t; +typedef union +{ + char __size[32]; + long int __align; +} pthread_barrier_t; +typedef union +{ + char __size[4]; + int __align; +} pthread_barrierattr_t; +} +extern long int random (void) throw (); +extern void srandom (unsigned int __seed) throw (); +extern char *initstate (unsigned int __seed, char *__statebuf, + size_t __statelen) throw () __attribute__ ((__nonnull__ (2))); +extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1))); +struct random_data + { + int32_t *fptr; + int32_t *rptr; + int32_t *state; + int rand_type; + int rand_deg; + int rand_sep; + int32_t *end_ptr; + }; +extern int random_r (struct random_data *__restrict __buf, + int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int srandom_r (unsigned int __seed, struct random_data *__buf) + throw () __attribute__ ((__nonnull__ (2))); +extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, + size_t __statelen, + struct random_data *__restrict __buf) + throw () __attribute__ ((__nonnull__ (2, 4))); +extern int setstate_r (char *__restrict __statebuf, + struct random_data *__restrict __buf) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int rand (void) throw (); +extern void srand (unsigned int __seed) throw (); +extern int rand_r (unsigned int *__seed) throw (); +extern double drand48 (void) throw (); +extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); +extern long int lrand48 (void) throw (); +extern long int nrand48 (unsigned short int __xsubi[3]) + throw () __attribute__ ((__nonnull__ (1))); +extern long int mrand48 (void) throw (); +extern long int jrand48 (unsigned short int __xsubi[3]) + throw () __attribute__ ((__nonnull__ (1))); +extern void srand48 (long int __seedval) throw (); +extern unsigned short int *seed48 (unsigned short int __seed16v[3]) + throw () __attribute__ ((__nonnull__ (1))); +extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1))); +struct drand48_data + { + unsigned short int __x[3]; + unsigned short int __old_x[3]; + unsigned short int __c; + unsigned short int __init; + unsigned long long int __a; + }; +extern int drand48_r (struct drand48_data *__restrict __buffer, + double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int erand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int lrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int nrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int mrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int jrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int srand48_r (long int __seedval, struct drand48_data *__buffer) + throw () __attribute__ ((__nonnull__ (2))); +extern int seed48_r (unsigned short int __seed16v[3], + struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int lcong48_r (unsigned short int __param[7], + struct drand48_data *__buffer) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) ; +extern void *calloc (size_t __nmemb, size_t __size) + throw () __attribute__ ((__malloc__)) ; +extern void *realloc (void *__ptr, size_t __size) + throw () __attribute__ ((__warn_unused_result__)); +extern void free (void *__ptr) throw (); +extern void cfree (void *__ptr) throw (); +extern "C" { +extern void *alloca (size_t __size) throw (); +} +extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) ; +extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) + throw () __attribute__ ((__nonnull__ (1))) ; +extern void abort (void) throw () __attribute__ ((__noreturn__)); +extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1))); +extern "C++" int at_quick_exit (void (*__func) (void)) + throw () __asm ("at_quick_exit") __attribute__ ((__nonnull__ (1))); +extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) + throw () __attribute__ ((__nonnull__ (1))); +extern void exit (int __status) throw () __attribute__ ((__noreturn__)); +extern void quick_exit (int __status) throw () __attribute__ ((__noreturn__)); +extern void _Exit (int __status) throw () __attribute__ ((__noreturn__)); +extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ; +extern char *__secure_getenv (__const char *__name) + throw () __attribute__ ((__nonnull__ (1))) ; +extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1))); +extern int setenv (__const char *__name, __const char *__value, int __replace) + throw () __attribute__ ((__nonnull__ (2))); +extern int unsetenv (__const char *__name) throw (); +extern int clearenv (void) throw (); +extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ; +extern int mkstemp (char *__template) __asm__ ("" "mkstemp64") + __attribute__ ((__nonnull__ (1))) ; +extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ; +extern int mkstemps (char *__template, int __suffixlen) __asm__ ("" "mkstemps64") __attribute__ ((__nonnull__ (1))) ; +extern int mkstemps64 (char *__template, int __suffixlen) + __attribute__ ((__nonnull__ (1))) ; +extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ; +extern int mkostemp (char *__template, int __flags) __asm__ ("" "mkostemp64") + __attribute__ ((__nonnull__ (1))) ; +extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ; +extern int mkostemps (char *__template, int __suffixlen, int __flags) __asm__ ("" "mkostemps64") + __attribute__ ((__nonnull__ (1))) ; +extern int mkostemps64 (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) ; +extern int system (__const char *__command) ; +extern char *canonicalize_file_name (__const char *__name) + throw () __attribute__ ((__nonnull__ (1))) ; +extern char *realpath (__const char *__restrict __name, + char *__restrict __resolved) throw () ; +typedef int (*__compar_fn_t) (__const void *, __const void *); +typedef __compar_fn_t comparison_fn_t; +typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *); +extern void *bsearch (__const void *__key, __const void *__base, + size_t __nmemb, size_t __size, __compar_fn_t __compar) + __attribute__ ((__nonnull__ (1, 2, 5))) ; +extern void qsort (void *__base, size_t __nmemb, size_t __size, + __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); +extern void qsort_r (void *__base, size_t __nmemb, size_t __size, + __compar_d_fn_t __compar, void *__arg) + __attribute__ ((__nonnull__ (1, 4))); +extern int abs (int __x) throw () __attribute__ ((__const__)) ; +extern long int labs (long int __x) throw () __attribute__ ((__const__)) ; +__extension__ extern long long int llabs (long long int __x) + throw () __attribute__ ((__const__)) ; +extern div_t div (int __numer, int __denom) + throw () __attribute__ ((__const__)) ; +extern ldiv_t ldiv (long int __numer, long int __denom) + throw () __attribute__ ((__const__)) ; +__extension__ extern lldiv_t lldiv (long long int __numer, + long long int __denom) + throw () __attribute__ ((__const__)) ; +extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; +extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ; +extern char *gcvt (double __value, int __ndigit, char *__buf) + throw () __attribute__ ((__nonnull__ (3))) ; +extern char *qecvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + throw () __attribute__ ((__nonnull__ (3, 4))) ; +extern char *qfcvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + throw () __attribute__ ((__nonnull__ (3, 4))) ; +extern char *qgcvt (long double __value, int __ndigit, char *__buf) + throw () __attribute__ ((__nonnull__ (3))) ; +extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); +extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); +extern int qecvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (3, 4, 5))); +extern int qfcvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (3, 4, 5))); +extern int mblen (__const char *__s, size_t __n) throw () ; +extern int mbtowc (wchar_t *__restrict __pwc, + __const char *__restrict __s, size_t __n) throw () ; +extern int wctomb (char *__s, wchar_t __wchar) throw () ; +extern size_t mbstowcs (wchar_t *__restrict __pwcs, + __const char *__restrict __s, size_t __n) throw (); +extern size_t wcstombs (char *__restrict __s, + __const wchar_t *__restrict __pwcs, size_t __n) + throw (); +extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) ; +extern int getsubopt (char **__restrict __optionp, + char *__const *__restrict __tokens, + char **__restrict __valuep) + throw () __attribute__ ((__nonnull__ (1, 2, 3))) ; +extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1))); +extern int posix_openpt (int __oflag) ; +extern int grantpt (int __fd) throw (); +extern int unlockpt (int __fd) throw (); +extern char *ptsname (int __fd) throw () ; +extern int ptsname_r (int __fd, char *__buf, size_t __buflen) + throw () __attribute__ ((__nonnull__ (2))); +extern int getpt (void); +extern int getloadavg (double __loadavg[], int __nelem) + throw () __attribute__ ((__nonnull__ (1))); +} +extern "C" { +typedef __intptr_t intptr_t; +typedef __socklen_t socklen_t; +extern int access (__const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); +extern int euidaccess (__const char *__name, int __type) + throw () __attribute__ ((__nonnull__ (1))); +extern int eaccess (__const char *__name, int __type) + throw () __attribute__ ((__nonnull__ (1))); +extern int faccessat (int __fd, __const char *__file, int __type, int __flag) + throw () __attribute__ ((__nonnull__ (2))) ; +extern __off64_t lseek (int __fd, __off64_t __offset, int __whence) throw () __asm__ ("" "lseek64"); +extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) + throw (); +extern int close (int __fd); +extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ; +extern ssize_t write (int __fd, __const void *__buf, size_t __n) ; +extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") ; +extern ssize_t pwrite (int __fd, __const void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pwrite64") ; +extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset) ; +extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n, + __off64_t __offset) ; +extern int pipe (int __pipedes[2]) throw () ; +extern int pipe2 (int __pipedes[2], int __flags) throw () ; +extern unsigned int alarm (unsigned int __seconds) throw (); +extern unsigned int sleep (unsigned int __seconds); +extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) + throw (); +extern int usleep (__useconds_t __useconds); +extern int pause (void); +extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) + throw () __attribute__ ((__nonnull__ (1))) ; +extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw () ; +extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) + throw () __attribute__ ((__nonnull__ (1))) ; +extern int fchownat (int __fd, __const char *__file, __uid_t __owner, + __gid_t __group, int __flag) + throw () __attribute__ ((__nonnull__ (2))) ; +extern int chdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) ; +extern int fchdir (int __fd) throw () ; +extern char *getcwd (char *__buf, size_t __size) throw () ; +extern char *get_current_dir_name (void) throw (); +extern char *getwd (char *__buf) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) ; +extern int dup (int __fd) throw () ; +extern int dup2 (int __fd, int __fd2) throw (); +extern int dup3 (int __fd, int __fd2, int __flags) throw (); +extern char **__environ; +extern char **environ; +extern int execve (__const char *__path, char *__const __argv[], + char *__const __envp[]) throw () __attribute__ ((__nonnull__ (1))); +extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[]) + throw (); +extern int execv (__const char *__path, char *__const __argv[]) + throw () __attribute__ ((__nonnull__ (1))); +extern int execle (__const char *__path, __const char *__arg, ...) + throw () __attribute__ ((__nonnull__ (1))); +extern int execl (__const char *__path, __const char *__arg, ...) + throw () __attribute__ ((__nonnull__ (1))); +extern int execvp (__const char *__file, char *__const __argv[]) + throw () __attribute__ ((__nonnull__ (1))); +extern int execlp (__const char *__file, __const char *__arg, ...) + throw () __attribute__ ((__nonnull__ (1))); +extern int execvpe (__const char *__file, char *__const __argv[], + char *__const __envp[]) + throw () __attribute__ ((__nonnull__ (1))); +extern int nice (int __inc) throw () ; +extern void _exit (int __status) __attribute__ ((__noreturn__)); +enum + { + _PC_LINK_MAX, + _PC_MAX_CANON, + _PC_MAX_INPUT, + _PC_NAME_MAX, + _PC_PATH_MAX, + _PC_PIPE_BUF, + _PC_CHOWN_RESTRICTED, + _PC_NO_TRUNC, + _PC_VDISABLE, + _PC_SYNC_IO, + _PC_ASYNC_IO, + _PC_PRIO_IO, + _PC_SOCK_MAXBUF, + _PC_FILESIZEBITS, + _PC_REC_INCR_XFER_SIZE, + _PC_REC_MAX_XFER_SIZE, + _PC_REC_MIN_XFER_SIZE, + _PC_REC_XFER_ALIGN, + _PC_ALLOC_SIZE_MIN, + _PC_SYMLINK_MAX, + _PC_2_SYMLINKS + }; +enum + { + _SC_ARG_MAX, + _SC_CHILD_MAX, + _SC_CLK_TCK, + _SC_NGROUPS_MAX, + _SC_OPEN_MAX, + _SC_STREAM_MAX, + _SC_TZNAME_MAX, + _SC_JOB_CONTROL, + _SC_SAVED_IDS, + _SC_REALTIME_SIGNALS, + _SC_PRIORITY_SCHEDULING, + _SC_TIMERS, + _SC_ASYNCHRONOUS_IO, + _SC_PRIORITIZED_IO, + _SC_SYNCHRONIZED_IO, + _SC_FSYNC, + _SC_MAPPED_FILES, + _SC_MEMLOCK, + _SC_MEMLOCK_RANGE, + _SC_MEMORY_PROTECTION, + _SC_MESSAGE_PASSING, + _SC_SEMAPHORES, + _SC_SHARED_MEMORY_OBJECTS, + _SC_AIO_LISTIO_MAX, + _SC_AIO_MAX, + _SC_AIO_PRIO_DELTA_MAX, + _SC_DELAYTIMER_MAX, + _SC_MQ_OPEN_MAX, + _SC_MQ_PRIO_MAX, + _SC_VERSION, + _SC_PAGESIZE, + _SC_RTSIG_MAX, + _SC_SEM_NSEMS_MAX, + _SC_SEM_VALUE_MAX, + _SC_SIGQUEUE_MAX, + _SC_TIMER_MAX, + _SC_BC_BASE_MAX, + _SC_BC_DIM_MAX, + _SC_BC_SCALE_MAX, + _SC_BC_STRING_MAX, + _SC_COLL_WEIGHTS_MAX, + _SC_EQUIV_CLASS_MAX, + _SC_EXPR_NEST_MAX, + _SC_LINE_MAX, + _SC_RE_DUP_MAX, + _SC_CHARCLASS_NAME_MAX, + _SC_2_VERSION, + _SC_2_C_BIND, + _SC_2_C_DEV, + _SC_2_FORT_DEV, + _SC_2_FORT_RUN, + _SC_2_SW_DEV, + _SC_2_LOCALEDEF, + _SC_PII, + _SC_PII_XTI, + _SC_PII_SOCKET, + _SC_PII_INTERNET, + _SC_PII_OSI, + _SC_POLL, + _SC_SELECT, + _SC_UIO_MAXIOV, + _SC_IOV_MAX = _SC_UIO_MAXIOV, + _SC_PII_INTERNET_STREAM, + _SC_PII_INTERNET_DGRAM, + _SC_PII_OSI_COTS, + _SC_PII_OSI_CLTS, + _SC_PII_OSI_M, + _SC_T_IOV_MAX, + _SC_THREADS, + _SC_THREAD_SAFE_FUNCTIONS, + _SC_GETGR_R_SIZE_MAX, + _SC_GETPW_R_SIZE_MAX, + _SC_LOGIN_NAME_MAX, + _SC_TTY_NAME_MAX, + _SC_THREAD_DESTRUCTOR_ITERATIONS, + _SC_THREAD_KEYS_MAX, + _SC_THREAD_STACK_MIN, + _SC_THREAD_THREADS_MAX, + _SC_THREAD_ATTR_STACKADDR, + _SC_THREAD_ATTR_STACKSIZE, + _SC_THREAD_PRIORITY_SCHEDULING, + _SC_THREAD_PRIO_INHERIT, + _SC_THREAD_PRIO_PROTECT, + _SC_THREAD_PROCESS_SHARED, + _SC_NPROCESSORS_CONF, + _SC_NPROCESSORS_ONLN, + _SC_PHYS_PAGES, + _SC_AVPHYS_PAGES, + _SC_ATEXIT_MAX, + _SC_PASS_MAX, + _SC_XOPEN_VERSION, + _SC_XOPEN_XCU_VERSION, + _SC_XOPEN_UNIX, + _SC_XOPEN_CRYPT, + _SC_XOPEN_ENH_I18N, + _SC_XOPEN_SHM, + _SC_2_CHAR_TERM, + _SC_2_C_VERSION, + _SC_2_UPE, + _SC_XOPEN_XPG2, + _SC_XOPEN_XPG3, + _SC_XOPEN_XPG4, + _SC_CHAR_BIT, + _SC_CHAR_MAX, + _SC_CHAR_MIN, + _SC_INT_MAX, + _SC_INT_MIN, + _SC_LONG_BIT, + _SC_WORD_BIT, + _SC_MB_LEN_MAX, + _SC_NZERO, + _SC_SSIZE_MAX, + _SC_SCHAR_MAX, + _SC_SCHAR_MIN, + _SC_SHRT_MAX, + _SC_SHRT_MIN, + _SC_UCHAR_MAX, + _SC_UINT_MAX, + _SC_ULONG_MAX, + _SC_USHRT_MAX, + _SC_NL_ARGMAX, + _SC_NL_LANGMAX, + _SC_NL_MSGMAX, + _SC_NL_NMAX, + _SC_NL_SETMAX, + _SC_NL_TEXTMAX, + _SC_XBS5_ILP32_OFF32, + _SC_XBS5_ILP32_OFFBIG, + _SC_XBS5_LP64_OFF64, + _SC_XBS5_LPBIG_OFFBIG, + _SC_XOPEN_LEGACY, + _SC_XOPEN_REALTIME, + _SC_XOPEN_REALTIME_THREADS, + _SC_ADVISORY_INFO, + _SC_BARRIERS, + _SC_BASE, + _SC_C_LANG_SUPPORT, + _SC_C_LANG_SUPPORT_R, + _SC_CLOCK_SELECTION, + _SC_CPUTIME, + _SC_THREAD_CPUTIME, + _SC_DEVICE_IO, + _SC_DEVICE_SPECIFIC, + _SC_DEVICE_SPECIFIC_R, + _SC_FD_MGMT, + _SC_FIFO, + _SC_PIPE, + _SC_FILE_ATTRIBUTES, + _SC_FILE_LOCKING, + _SC_FILE_SYSTEM, + _SC_MONOTONIC_CLOCK, + _SC_MULTI_PROCESS, + _SC_SINGLE_PROCESS, + _SC_NETWORKING, + _SC_READER_WRITER_LOCKS, + _SC_SPIN_LOCKS, + _SC_REGEXP, + _SC_REGEX_VERSION, + _SC_SHELL, + _SC_SIGNALS, + _SC_SPAWN, + _SC_SPORADIC_SERVER, + _SC_THREAD_SPORADIC_SERVER, + _SC_SYSTEM_DATABASE, + _SC_SYSTEM_DATABASE_R, + _SC_TIMEOUTS, + _SC_TYPED_MEMORY_OBJECTS, + _SC_USER_GROUPS, + _SC_USER_GROUPS_R, + _SC_2_PBS, + _SC_2_PBS_ACCOUNTING, + _SC_2_PBS_LOCATE, + _SC_2_PBS_MESSAGE, + _SC_2_PBS_TRACK, + _SC_SYMLOOP_MAX, + _SC_STREAMS, + _SC_2_PBS_CHECKPOINT, + _SC_V6_ILP32_OFF32, + _SC_V6_ILP32_OFFBIG, + _SC_V6_LP64_OFF64, + _SC_V6_LPBIG_OFFBIG, + _SC_HOST_NAME_MAX, + _SC_TRACE, + _SC_TRACE_EVENT_FILTER, + _SC_TRACE_INHERIT, + _SC_TRACE_LOG, + _SC_LEVEL1_ICACHE_SIZE, + _SC_LEVEL1_ICACHE_ASSOC, + _SC_LEVEL1_ICACHE_LINESIZE, + _SC_LEVEL1_DCACHE_SIZE, + _SC_LEVEL1_DCACHE_ASSOC, + _SC_LEVEL1_DCACHE_LINESIZE, + _SC_LEVEL2_CACHE_SIZE, + _SC_LEVEL2_CACHE_ASSOC, + _SC_LEVEL2_CACHE_LINESIZE, + _SC_LEVEL3_CACHE_SIZE, + _SC_LEVEL3_CACHE_ASSOC, + _SC_LEVEL3_CACHE_LINESIZE, + _SC_LEVEL4_CACHE_SIZE, + _SC_LEVEL4_CACHE_ASSOC, + _SC_LEVEL4_CACHE_LINESIZE, + _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, + _SC_RAW_SOCKETS, + _SC_V7_ILP32_OFF32, + _SC_V7_ILP32_OFFBIG, + _SC_V7_LP64_OFF64, + _SC_V7_LPBIG_OFFBIG, + _SC_SS_REPL_MAX, + _SC_TRACE_EVENT_NAME_MAX, + _SC_TRACE_NAME_MAX, + _SC_TRACE_SYS_MAX, + _SC_TRACE_USER_EVENT_MAX, + _SC_XOPEN_STREAMS, + _SC_THREAD_ROBUST_PRIO_INHERIT, + _SC_THREAD_ROBUST_PRIO_PROTECT + }; +enum + { + _CS_PATH, + _CS_V6_WIDTH_RESTRICTED_ENVS, + _CS_GNU_LIBC_VERSION, + _CS_GNU_LIBPTHREAD_VERSION, + _CS_V5_WIDTH_RESTRICTED_ENVS, + _CS_V7_WIDTH_RESTRICTED_ENVS, + _CS_LFS_CFLAGS = 1000, + _CS_LFS_LDFLAGS, + _CS_LFS_LIBS, + _CS_LFS_LINTFLAGS, + _CS_LFS64_CFLAGS, + _CS_LFS64_LDFLAGS, + _CS_LFS64_LIBS, + _CS_LFS64_LINTFLAGS, + _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, + _CS_XBS5_ILP32_OFF32_LDFLAGS, + _CS_XBS5_ILP32_OFF32_LIBS, + _CS_XBS5_ILP32_OFF32_LINTFLAGS, + _CS_XBS5_ILP32_OFFBIG_CFLAGS, + _CS_XBS5_ILP32_OFFBIG_LDFLAGS, + _CS_XBS5_ILP32_OFFBIG_LIBS, + _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, + _CS_XBS5_LP64_OFF64_CFLAGS, + _CS_XBS5_LP64_OFF64_LDFLAGS, + _CS_XBS5_LP64_OFF64_LIBS, + _CS_XBS5_LP64_OFF64_LINTFLAGS, + _CS_XBS5_LPBIG_OFFBIG_CFLAGS, + _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, + _CS_XBS5_LPBIG_OFFBIG_LIBS, + _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, + _CS_POSIX_V6_ILP32_OFF32_CFLAGS, + _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, + _CS_POSIX_V6_ILP32_OFF32_LIBS, + _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, + _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, + _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, + _CS_POSIX_V6_ILP32_OFFBIG_LIBS, + _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, + _CS_POSIX_V6_LP64_OFF64_CFLAGS, + _CS_POSIX_V6_LP64_OFF64_LDFLAGS, + _CS_POSIX_V6_LP64_OFF64_LIBS, + _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, + _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, + _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, + _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, + _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, + _CS_POSIX_V7_ILP32_OFF32_CFLAGS, + _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, + _CS_POSIX_V7_ILP32_OFF32_LIBS, + _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, + _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, + _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, + _CS_POSIX_V7_ILP32_OFFBIG_LIBS, + _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, + _CS_POSIX_V7_LP64_OFF64_CFLAGS, + _CS_POSIX_V7_LP64_OFF64_LDFLAGS, + _CS_POSIX_V7_LP64_OFF64_LIBS, + _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, + _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, + _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, + _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, + _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS + }; +extern long int pathconf (__const char *__path, int __name) + throw () __attribute__ ((__nonnull__ (1))); +extern long int fpathconf (int __fd, int __name) throw (); +extern long int sysconf (int __name) throw (); +extern size_t confstr (int __name, char *__buf, size_t __len) throw (); +extern __pid_t getpid (void) throw (); +extern __pid_t getppid (void) throw (); +extern __pid_t getpgrp (void) throw (); +extern __pid_t __getpgid (__pid_t __pid) throw (); +extern __pid_t getpgid (__pid_t __pid) throw (); +extern int setpgid (__pid_t __pid, __pid_t __pgid) throw (); +extern int setpgrp (void) throw (); +extern __pid_t setsid (void) throw (); +extern __pid_t getsid (__pid_t __pid) throw (); +extern __uid_t getuid (void) throw (); +extern __uid_t geteuid (void) throw (); +extern __gid_t getgid (void) throw (); +extern __gid_t getegid (void) throw (); +extern int getgroups (int __size, __gid_t __list[]) throw () ; +extern int group_member (__gid_t __gid) throw (); +extern int setuid (__uid_t __uid) throw (); +extern int setreuid (__uid_t __ruid, __uid_t __euid) throw (); +extern int seteuid (__uid_t __uid) throw (); +extern int setgid (__gid_t __gid) throw (); +extern int setregid (__gid_t __rgid, __gid_t __egid) throw (); +extern int setegid (__gid_t __gid) throw (); +extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) + throw (); +extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) + throw (); +extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) + throw (); +extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) + throw (); +extern __pid_t fork (void) throw (); +extern __pid_t vfork (void) throw (); +extern char *ttyname (int __fd) throw (); +extern int ttyname_r (int __fd, char *__buf, size_t __buflen) + throw () __attribute__ ((__nonnull__ (2))) ; +extern int isatty (int __fd) throw (); +extern int ttyslot (void) throw (); +extern int link (__const char *__from, __const char *__to) + throw () __attribute__ ((__nonnull__ (1, 2))) ; +extern int linkat (int __fromfd, __const char *__from, int __tofd, + __const char *__to, int __flags) + throw () __attribute__ ((__nonnull__ (2, 4))) ; +extern int symlink (__const char *__from, __const char *__to) + throw () __attribute__ ((__nonnull__ (1, 2))) ; +extern ssize_t readlink (__const char *__restrict __path, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (1, 2))) ; +extern int symlinkat (__const char *__from, int __tofd, + __const char *__to) throw () __attribute__ ((__nonnull__ (1, 3))) ; +extern ssize_t readlinkat (int __fd, __const char *__restrict __path, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (2, 3))) ; +extern int unlink (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); +extern int unlinkat (int __fd, __const char *__name, int __flag) + throw () __attribute__ ((__nonnull__ (2))); +extern int rmdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))); +extern __pid_t tcgetpgrp (int __fd) throw (); +extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw (); +extern char *getlogin (void); +extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); +extern int setlogin (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); +extern "C" { +extern char *optarg; +extern int optind; +extern int opterr; +extern int optopt; +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) + throw (); +} +extern int gethostname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))); +extern int sethostname (__const char *__name, size_t __len) + throw () __attribute__ ((__nonnull__ (1))) ; +extern int sethostid (long int __id) throw () ; +extern int getdomainname (char *__name, size_t __len) + throw () __attribute__ ((__nonnull__ (1))) ; +extern int setdomainname (__const char *__name, size_t __len) + throw () __attribute__ ((__nonnull__ (1))) ; +extern int vhangup (void) throw (); +extern int revoke (__const char *__file) throw () __attribute__ ((__nonnull__ (1))) ; +extern int profil (unsigned short int *__sample_buffer, size_t __size, + size_t __offset, unsigned int __scale) + throw () __attribute__ ((__nonnull__ (1))); +extern int acct (__const char *__name) throw (); +extern char *getusershell (void) throw (); +extern void endusershell (void) throw (); +extern void setusershell (void) throw (); +extern int daemon (int __nochdir, int __noclose) throw () ; +extern int chroot (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) ; +extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1))); +extern int fsync (int __fd); +extern long int gethostid (void); +extern void sync (void) throw (); +extern int getpagesize (void) throw () __attribute__ ((__const__)); +extern int getdtablesize (void) throw (); +extern int truncate (__const char *__file, __off64_t __length) throw () __asm__ ("" "truncate64") __attribute__ ((__nonnull__ (1))) ; +extern int truncate64 (__const char *__file, __off64_t __length) + throw () __attribute__ ((__nonnull__ (1))) ; +extern int ftruncate (int __fd, __off64_t __length) throw () __asm__ ("" "ftruncate64") ; +extern int ftruncate64 (int __fd, __off64_t __length) throw () ; +extern int brk (void *__addr) throw () ; +extern void *sbrk (intptr_t __delta) throw (); +extern long int syscall (long int __sysno, ...) throw (); +extern int lockf (int __fd, int __cmd, __off64_t __len) __asm__ ("" "lockf64") ; +extern int lockf64 (int __fd, int __cmd, __off64_t __len) ; +extern int fdatasync (int __fildes); +extern char *crypt (__const char *__key, __const char *__salt) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void encrypt (char *__block, int __edflag) throw () __attribute__ ((__nonnull__ (1))); +extern void swab (__const void *__restrict __from, void *__restrict __to, + ssize_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *ctermid (char *__s) throw (); +} +extern "C" { +extern void __assert_fail (__const char *__assertion, __const char *__file, + unsigned int __line, __const char *__function) + throw () __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, __const char *__file, + unsigned int __line, + __const char *__function) + throw () __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + throw () __attribute__ ((__noreturn__)); +} +typedef unsigned char uint8_t; +typedef unsigned short int uint16_t; +typedef unsigned int uint32_t; +typedef unsigned long int uint64_t; +typedef signed char int_least8_t; +typedef short int int_least16_t; +typedef int int_least32_t; +typedef long int int_least64_t; +typedef unsigned char uint_least8_t; +typedef unsigned short int uint_least16_t; +typedef unsigned int uint_least32_t; +typedef unsigned long int uint_least64_t; +typedef signed char int_fast8_t; +typedef long int int_fast16_t; +typedef long int int_fast32_t; +typedef long int int_fast64_t; +typedef unsigned char uint_fast8_t; +typedef unsigned long int uint_fast16_t; +typedef unsigned long int uint_fast32_t; +typedef unsigned long int uint_fast64_t; +typedef unsigned long int uintptr_t; +typedef long int intmax_t; +typedef unsigned long int uintmax_t; +typedef uintptr_t Py_uintptr_t; +typedef intptr_t Py_intptr_t; +typedef ssize_t Py_ssize_t; +extern "C" { +typedef float float_t; +typedef double double_t; +extern double acos (double __x) throw (); extern double __acos (double __x) throw (); +extern double asin (double __x) throw (); extern double __asin (double __x) throw (); +extern double atan (double __x) throw (); extern double __atan (double __x) throw (); +extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw (); +extern double cos (double __x) throw (); extern double __cos (double __x) throw (); +extern double sin (double __x) throw (); extern double __sin (double __x) throw (); +extern double tan (double __x) throw (); extern double __tan (double __x) throw (); +extern double cosh (double __x) throw (); extern double __cosh (double __x) throw (); +extern double sinh (double __x) throw (); extern double __sinh (double __x) throw (); +extern double tanh (double __x) throw (); extern double __tanh (double __x) throw (); +extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw (); +extern double acosh (double __x) throw (); extern double __acosh (double __x) throw (); +extern double asinh (double __x) throw (); extern double __asinh (double __x) throw (); +extern double atanh (double __x) throw (); extern double __atanh (double __x) throw (); +extern double exp (double __x) throw (); extern double __exp (double __x) throw (); +extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw (); +extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw (); +extern double log (double __x) throw (); extern double __log (double __x) throw (); +extern double log10 (double __x) throw (); extern double __log10 (double __x) throw (); +extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw (); +extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw (); +extern double pow10 (double __x) throw (); extern double __pow10 (double __x) throw (); +extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw (); +extern double log1p (double __x) throw (); extern double __log1p (double __x) throw (); +extern double logb (double __x) throw (); extern double __logb (double __x) throw (); +extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw (); +extern double log2 (double __x) throw (); extern double __log2 (double __x) throw (); +extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw (); +extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw (); +extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw (); +extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw (); +extern double ceil (double __x) throw () __attribute__ ((__const__)); extern double __ceil (double __x) throw () __attribute__ ((__const__)); +extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__)); +extern double floor (double __x) throw () __attribute__ ((__const__)); extern double __floor (double __x) throw () __attribute__ ((__const__)); +extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw (); +extern int __isinf (double __value) throw () __attribute__ ((__const__)); +extern int __finite (double __value) throw () __attribute__ ((__const__)); +extern int isinf (double __value) throw () __attribute__ ((__const__)); +extern int finite (double __value) throw () __attribute__ ((__const__)); +extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw (); +extern double significand (double __x) throw (); extern double __significand (double __x) throw (); +extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__)); +extern double nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern double __nan (__const char *__tagb) throw () __attribute__ ((__const__)); +extern int __isnan (double __value) throw () __attribute__ ((__const__)); +extern int isnan (double __value) throw () __attribute__ ((__const__)); +extern double j0 (double) throw (); extern double __j0 (double) throw (); +extern double j1 (double) throw (); extern double __j1 (double) throw (); +extern double jn (int, double) throw (); extern double __jn (int, double) throw (); +extern double y0 (double) throw (); extern double __y0 (double) throw (); +extern double y1 (double) throw (); extern double __y1 (double) throw (); +extern double yn (int, double) throw (); extern double __yn (int, double) throw (); +extern double erf (double) throw (); extern double __erf (double) throw (); +extern double erfc (double) throw (); extern double __erfc (double) throw (); +extern double lgamma (double) throw (); extern double __lgamma (double) throw (); +extern double tgamma (double) throw (); extern double __tgamma (double) throw (); +extern double gamma (double) throw (); extern double __gamma (double) throw (); +extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw (); +extern double rint (double __x) throw (); extern double __rint (double __x) throw (); +extern double nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) throw () __attribute__ ((__const__)); +extern double nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); +extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw (); +extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw (); +extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw (); +extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw (); +extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw (); +extern double round (double __x) throw () __attribute__ ((__const__)); extern double __round (double __x) throw () __attribute__ ((__const__)); +extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__)); +extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw (); +extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw (); +extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw (); +extern long int lround (double __x) throw (); extern long int __lround (double __x) throw (); +extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw (); +extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw (); +extern double fmax (double __x, double __y) throw (); extern double __fmax (double __x, double __y) throw (); +extern double fmin (double __x, double __y) throw (); extern double __fmin (double __x, double __y) throw (); +extern int __fpclassify (double __value) throw () + __attribute__ ((__const__)); +extern int __signbit (double __value) throw () + __attribute__ ((__const__)); +extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw (); +extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw (); +extern float acosf (float __x) throw (); extern float __acosf (float __x) throw (); +extern float asinf (float __x) throw (); extern float __asinf (float __x) throw (); +extern float atanf (float __x) throw (); extern float __atanf (float __x) throw (); +extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw (); +extern float cosf (float __x) throw (); extern float __cosf (float __x) throw (); +extern float sinf (float __x) throw (); extern float __sinf (float __x) throw (); +extern float tanf (float __x) throw (); extern float __tanf (float __x) throw (); +extern float coshf (float __x) throw (); extern float __coshf (float __x) throw (); +extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw (); +extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw (); +extern void sincosf (float __x, float *__sinx, float *__cosx) throw (); extern void __sincosf (float __x, float *__sinx, float *__cosx) throw (); +extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw (); +extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw (); +extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw (); +extern float expf (float __x) throw (); extern float __expf (float __x) throw (); +extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw (); +extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw (); +extern float logf (float __x) throw (); extern float __logf (float __x) throw (); +extern float log10f (float __x) throw (); extern float __log10f (float __x) throw (); +extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw (); +extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw (); +extern float pow10f (float __x) throw (); extern float __pow10f (float __x) throw (); +extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw (); +extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw (); +extern float logbf (float __x) throw (); extern float __logbf (float __x) throw (); +extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw (); +extern float log2f (float __x) throw (); extern float __log2f (float __x) throw (); +extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw (); +extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw (); +extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw (); +extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw (); +extern float ceilf (float __x) throw () __attribute__ ((__const__)); extern float __ceilf (float __x) throw () __attribute__ ((__const__)); +extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__)); +extern float floorf (float __x) throw () __attribute__ ((__const__)); extern float __floorf (float __x) throw () __attribute__ ((__const__)); +extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw (); +extern int __isinff (float __value) throw () __attribute__ ((__const__)); +extern int __finitef (float __value) throw () __attribute__ ((__const__)); +extern int isinff (float __value) throw () __attribute__ ((__const__)); +extern int finitef (float __value) throw () __attribute__ ((__const__)); +extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw (); +extern float significandf (float __x) throw (); extern float __significandf (float __x) throw (); +extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__)); +extern float nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) throw () __attribute__ ((__const__)); +extern int __isnanf (float __value) throw () __attribute__ ((__const__)); +extern int isnanf (float __value) throw () __attribute__ ((__const__)); +extern float j0f (float) throw (); extern float __j0f (float) throw (); +extern float j1f (float) throw (); extern float __j1f (float) throw (); +extern float jnf (int, float) throw (); extern float __jnf (int, float) throw (); +extern float y0f (float) throw (); extern float __y0f (float) throw (); +extern float y1f (float) throw (); extern float __y1f (float) throw (); +extern float ynf (int, float) throw (); extern float __ynf (int, float) throw (); +extern float erff (float) throw (); extern float __erff (float) throw (); +extern float erfcf (float) throw (); extern float __erfcf (float) throw (); +extern float lgammaf (float) throw (); extern float __lgammaf (float) throw (); +extern float tgammaf (float) throw (); extern float __tgammaf (float) throw (); +extern float gammaf (float) throw (); extern float __gammaf (float) throw (); +extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw (); +extern float rintf (float __x) throw (); extern float __rintf (float __x) throw (); +extern float nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); +extern float nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); +extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw (); +extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw (); +extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw (); +extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw (); +extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw (); +extern float roundf (float __x) throw () __attribute__ ((__const__)); extern float __roundf (float __x) throw () __attribute__ ((__const__)); +extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__)); +extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw (); +extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw (); +extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw (); +extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw (); +extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw (); +extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw (); +extern float fmaxf (float __x, float __y) throw (); extern float __fmaxf (float __x, float __y) throw (); +extern float fminf (float __x, float __y) throw (); extern float __fminf (float __x, float __y) throw (); +extern int __fpclassifyf (float __value) throw () + __attribute__ ((__const__)); +extern int __signbitf (float __value) throw () + __attribute__ ((__const__)); +extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw (); +extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw (); +extern long double acosl (long double __x) throw (); extern long double __acosl (long double __x) throw (); +extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw (); +extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw (); +extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw (); +extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw (); +extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw (); +extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw (); +extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw (); +extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw (); +extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw (); +extern void sincosl (long double __x, long double *__sinx, long double *__cosx) throw (); extern void __sincosl (long double __x, long double *__sinx, long double *__cosx) throw (); +extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw (); +extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw (); +extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw (); +extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw (); +extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw (); +extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw (); +extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw (); +extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw (); +extern long double modfl (long double __x, long double *__iptr) throw (); extern long double __modfl (long double __x, long double *__iptr) throw (); +extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw (); +extern long double pow10l (long double __x) throw (); extern long double __pow10l (long double __x) throw (); +extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw (); +extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw (); +extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw (); +extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw (); +extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw (); +extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw (); +extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw (); +extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw (); +extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw (); +extern long double ceill (long double __x) throw () __attribute__ ((__const__)); extern long double __ceill (long double __x) throw () __attribute__ ((__const__)); +extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__)); +extern long double floorl (long double __x) throw () __attribute__ ((__const__)); extern long double __floorl (long double __x) throw () __attribute__ ((__const__)); +extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw (); +extern int __isinfl (long double __value) throw () __attribute__ ((__const__)); +extern int __finitel (long double __value) throw () __attribute__ ((__const__)); +extern int isinfl (long double __value) throw () __attribute__ ((__const__)); +extern int finitel (long double __value) throw () __attribute__ ((__const__)); +extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw (); +extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw (); +extern long double copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); +extern long double nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) throw () __attribute__ ((__const__)); +extern int __isnanl (long double __value) throw () __attribute__ ((__const__)); +extern int isnanl (long double __value) throw () __attribute__ ((__const__)); +extern long double j0l (long double) throw (); extern long double __j0l (long double) throw (); +extern long double j1l (long double) throw (); extern long double __j1l (long double) throw (); +extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw (); +extern long double y0l (long double) throw (); extern long double __y0l (long double) throw (); +extern long double y1l (long double) throw (); extern long double __y1l (long double) throw (); +extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw (); +extern long double erfl (long double) throw (); extern long double __erfl (long double) throw (); +extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw (); +extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw (); +extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw (); +extern long double gammal (long double) throw (); extern long double __gammal (long double) throw (); +extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw (); +extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw (); +extern long double nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); +extern long double nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); +extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw (); +extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw (); +extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw (); +extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw (); +extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw (); +extern long double roundl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundl (long double __x) throw () __attribute__ ((__const__)); +extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__)); +extern long double remquol (long double __x, long double __y, int *__quo) throw (); extern long double __remquol (long double __x, long double __y, int *__quo) throw (); +extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw (); +extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw (); +extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw (); +extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw (); +extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw (); +extern long double fmaxl (long double __x, long double __y) throw (); extern long double __fmaxl (long double __x, long double __y) throw (); +extern long double fminl (long double __x, long double __y) throw (); extern long double __fminl (long double __x, long double __y) throw (); +extern int __fpclassifyl (long double __value) throw () + __attribute__ ((__const__)); +extern int __signbitl (long double __value) throw () + __attribute__ ((__const__)); +extern long double fmal (long double __x, long double __y, long double __z) throw (); extern long double __fmal (long double __x, long double __y, long double __z) throw (); +extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw (); +extern int signgam; +enum + { + FP_NAN, + FP_INFINITE, + FP_ZERO, + FP_SUBNORMAL, + FP_NORMAL + }; +typedef enum +{ + _IEEE_ = -1, + _SVID_, + _XOPEN_, + _POSIX_, + _ISOC_ +} _LIB_VERSION_TYPE; +extern _LIB_VERSION_TYPE _LIB_VERSION; +struct __exception + { + int type; + char *name; + double arg1; + double arg2; + double retval; + }; +extern int matherr (struct __exception *__exc) throw (); +} +extern "C" { +struct timezone + { + int tz_minuteswest; + int tz_dsttime; + }; +typedef struct timezone *__restrict __timezone_ptr_t; +extern int gettimeofday (struct timeval *__restrict __tv, + __timezone_ptr_t __tz) throw () __attribute__ ((__nonnull__ (1))); +extern int settimeofday (__const struct timeval *__tv, + __const struct timezone *__tz) + throw () __attribute__ ((__nonnull__ (1))); +extern int adjtime (__const struct timeval *__delta, + struct timeval *__olddelta) throw (); +enum __itimer_which + { + ITIMER_REAL = 0, + ITIMER_VIRTUAL = 1, + ITIMER_PROF = 2 + }; +struct itimerval + { + struct timeval it_interval; + struct timeval it_value; + }; +typedef int __itimer_which_t; +extern int getitimer (__itimer_which_t __which, + struct itimerval *__value) throw (); +extern int setitimer (__itimer_which_t __which, + __const struct itimerval *__restrict __new, + struct itimerval *__restrict __old) throw (); +extern int utimes (__const char *__file, __const struct timeval __tvp[2]) + throw () __attribute__ ((__nonnull__ (1))); +extern int lutimes (__const char *__file, __const struct timeval __tvp[2]) + throw () __attribute__ ((__nonnull__ (1))); +extern int futimes (int __fd, __const struct timeval __tvp[2]) throw (); +extern int futimesat (int __fd, __const char *__file, + __const struct timeval __tvp[2]) throw (); +} +extern "C" { +struct tm +{ + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; + long int tm_gmtoff; + __const char *tm_zone; +}; +struct itimerspec + { + struct timespec it_interval; + struct timespec it_value; + }; +struct sigevent; +extern clock_t clock (void) throw (); +extern time_t time (time_t *__timer) throw (); +extern double difftime (time_t __time1, time_t __time0) + throw () __attribute__ ((__const__)); +extern time_t mktime (struct tm *__tp) throw (); +extern size_t strftime (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp) throw (); +extern char *strptime (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp) + throw (); +extern size_t strftime_l (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp, + __locale_t __loc) throw (); +extern char *strptime_l (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp, + __locale_t __loc) throw (); +extern struct tm *gmtime (__const time_t *__timer) throw (); +extern struct tm *localtime (__const time_t *__timer) throw (); +extern struct tm *gmtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) throw (); +extern struct tm *localtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) throw (); +extern char *asctime (__const struct tm *__tp) throw (); +extern char *ctime (__const time_t *__timer) throw (); +extern char *asctime_r (__const struct tm *__restrict __tp, + char *__restrict __buf) throw (); +extern char *ctime_r (__const time_t *__restrict __timer, + char *__restrict __buf) throw (); +extern char *__tzname[2]; +extern int __daylight; +extern long int __timezone; +extern char *tzname[2]; +extern void tzset (void) throw (); +extern int daylight; +extern long int timezone; +extern int stime (__const time_t *__when) throw (); +extern time_t timegm (struct tm *__tp) throw (); +extern time_t timelocal (struct tm *__tp) throw (); +extern int dysize (int __year) throw () __attribute__ ((__const__)); +extern int nanosleep (__const struct timespec *__requested_time, + struct timespec *__remaining); +extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw (); +extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw (); +extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) + throw (); +extern int clock_nanosleep (clockid_t __clock_id, int __flags, + __const struct timespec *__req, + struct timespec *__rem); +extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw (); +extern int timer_create (clockid_t __clock_id, + struct sigevent *__restrict __evp, + timer_t *__restrict __timerid) throw (); +extern int timer_delete (timer_t __timerid) throw (); +extern int timer_settime (timer_t __timerid, int __flags, + __const struct itimerspec *__restrict __value, + struct itimerspec *__restrict __ovalue) throw (); +extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) + throw (); +extern int timer_getoverrun (timer_t __timerid) throw (); +extern int getdate_err; +extern struct tm *getdate (__const char *__string); +extern int getdate_r (__const char *__restrict __string, + struct tm *__restrict __resbufp); +} +extern "C" { +struct stat + { + __dev_t st_dev; + __ino_t st_ino; + __nlink_t st_nlink; + __mode_t st_mode; + __uid_t st_uid; + __gid_t st_gid; + int __pad0; + __dev_t st_rdev; + __off_t st_size; + __blksize_t st_blksize; + __blkcnt_t st_blocks; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; + long int __unused[3]; + }; +struct stat64 + { + __dev_t st_dev; + __ino64_t st_ino; + __nlink_t st_nlink; + __mode_t st_mode; + __uid_t st_uid; + __gid_t st_gid; + int __pad0; + __dev_t st_rdev; + __off_t st_size; + __blksize_t st_blksize; + __blkcnt64_t st_blocks; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; + long int __unused[3]; + }; +extern int stat (__const char *__restrict __file, struct stat *__restrict __buf) throw () __asm__ ("" "stat64") + __attribute__ ((__nonnull__ (1, 2))); +extern int fstat (int __fd, struct stat *__buf) throw () __asm__ ("" "fstat64") + __attribute__ ((__nonnull__ (2))); +extern int stat64 (__const char *__restrict __file, + struct stat64 *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int fstat64 (int __fd, struct stat64 *__buf) throw () __attribute__ ((__nonnull__ (2))); +extern int fstatat (int __fd, __const char *__restrict __file, struct stat *__restrict __buf, int __flag) throw () __asm__ ("" "fstatat64") __attribute__ ((__nonnull__ (2, 3))); +extern int fstatat64 (int __fd, __const char *__restrict __file, + struct stat64 *__restrict __buf, int __flag) + throw () __attribute__ ((__nonnull__ (2, 3))); +extern int lstat (__const char *__restrict __file, struct stat *__restrict __buf) throw () __asm__ ("" "lstat64") + __attribute__ ((__nonnull__ (1, 2))); +extern int lstat64 (__const char *__restrict __file, + struct stat64 *__restrict __buf) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int chmod (__const char *__file, __mode_t __mode) + throw () __attribute__ ((__nonnull__ (1))); +extern int lchmod (__const char *__file, __mode_t __mode) + throw () __attribute__ ((__nonnull__ (1))); +extern int fchmod (int __fd, __mode_t __mode) throw (); +extern int fchmodat (int __fd, __const char *__file, __mode_t __mode, + int __flag) + throw () __attribute__ ((__nonnull__ (2))) ; +extern __mode_t umask (__mode_t __mask) throw (); +extern __mode_t getumask (void) throw (); +extern int mkdir (__const char *__path, __mode_t __mode) + throw () __attribute__ ((__nonnull__ (1))); +extern int mkdirat (int __fd, __const char *__path, __mode_t __mode) + throw () __attribute__ ((__nonnull__ (2))); +extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev) + throw () __attribute__ ((__nonnull__ (1))); +extern int mknodat (int __fd, __const char *__path, __mode_t __mode, + __dev_t __dev) throw () __attribute__ ((__nonnull__ (2))); +extern int mkfifo (__const char *__path, __mode_t __mode) + throw () __attribute__ ((__nonnull__ (1))); +extern int mkfifoat (int __fd, __const char *__path, __mode_t __mode) + throw () __attribute__ ((__nonnull__ (2))); +extern int utimensat (int __fd, __const char *__path, + __const struct timespec __times[2], + int __flags) + throw () __attribute__ ((__nonnull__ (2))); +extern int futimens (int __fd, __const struct timespec __times[2]) throw (); +extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf) throw () __asm__ ("" "__fxstat64") + __attribute__ ((__nonnull__ (3))); +extern int __xstat (int __ver, __const char *__filename, struct stat *__stat_buf) throw () __asm__ ("" "__xstat64") + __attribute__ ((__nonnull__ (2, 3))); +extern int __lxstat (int __ver, __const char *__filename, struct stat *__stat_buf) throw () __asm__ ("" "__lxstat64") + __attribute__ ((__nonnull__ (2, 3))); +extern int __fxstatat (int __ver, int __fildes, __const char *__filename, struct stat *__stat_buf, int __flag) throw () __asm__ ("" "__fxstatat64") __attribute__ ((__nonnull__ (3, 4))); +extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf) + throw () __attribute__ ((__nonnull__ (3))); +extern int __xstat64 (int __ver, __const char *__filename, + struct stat64 *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3))); +extern int __lxstat64 (int __ver, __const char *__filename, + struct stat64 *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3))); +extern int __fxstatat64 (int __ver, int __fildes, __const char *__filename, + struct stat64 *__stat_buf, int __flag) + throw () __attribute__ ((__nonnull__ (3, 4))); +extern int __xmknod (int __ver, __const char *__path, __mode_t __mode, + __dev_t *__dev) throw () __attribute__ ((__nonnull__ (2, 4))); +extern int __xmknodat (int __ver, int __fd, __const char *__path, + __mode_t __mode, __dev_t *__dev) + throw () __attribute__ ((__nonnull__ (3, 5))); +} +extern "C" { +} +extern "C" { +void * PyMem_Malloc(size_t); +void * PyMem_Realloc(void *, size_t); +void PyMem_Free(void *); +} +extern "C" { +typedef struct _object { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; +} PyObject; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; Py_ssize_t ob_size; +} PyVarObject; +typedef PyObject * (*unaryfunc)(PyObject *); +typedef PyObject * (*binaryfunc)(PyObject *, PyObject *); +typedef PyObject * (*ternaryfunc)(PyObject *, PyObject *, PyObject *); +typedef int (*inquiry)(PyObject *); +typedef Py_ssize_t (*lenfunc)(PyObject *); +typedef int (*coercion)(PyObject **, PyObject **); +typedef PyObject *(*intargfunc)(PyObject *, int) __attribute__((__deprecated__)); +typedef PyObject *(*intintargfunc)(PyObject *, int, int) __attribute__((__deprecated__)); +typedef PyObject *(*ssizeargfunc)(PyObject *, Py_ssize_t); +typedef PyObject *(*ssizessizeargfunc)(PyObject *, Py_ssize_t, Py_ssize_t); +typedef int(*intobjargproc)(PyObject *, int, PyObject *); +typedef int(*intintobjargproc)(PyObject *, int, int, PyObject *); +typedef int(*ssizeobjargproc)(PyObject *, Py_ssize_t, PyObject *); +typedef int(*ssizessizeobjargproc)(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *); +typedef int(*objobjargproc)(PyObject *, PyObject *, PyObject *); +typedef int (*getreadbufferproc)(PyObject *, int, void **); +typedef int (*getwritebufferproc)(PyObject *, int, void **); +typedef int (*getsegcountproc)(PyObject *, int *); +typedef int (*getcharbufferproc)(PyObject *, int, char **); +typedef Py_ssize_t (*readbufferproc)(PyObject *, Py_ssize_t, void **); +typedef Py_ssize_t (*writebufferproc)(PyObject *, Py_ssize_t, void **); +typedef Py_ssize_t (*segcountproc)(PyObject *, Py_ssize_t *); +typedef Py_ssize_t (*charbufferproc)(PyObject *, Py_ssize_t, char **); +typedef struct bufferinfo { + void *buf; + PyObject *obj; + Py_ssize_t len; + Py_ssize_t itemsize; + int readonly; + int ndim; + char *format; + Py_ssize_t *shape; + Py_ssize_t *strides; + Py_ssize_t *suboffsets; + void *internal; +} Py_buffer; +typedef int (*getbufferproc)(PyObject *, Py_buffer *, int); +typedef void (*releasebufferproc)(PyObject *, Py_buffer *); +typedef int (*objobjproc)(PyObject *, PyObject *); +typedef int (*visitproc)(PyObject *, void *); +typedef int (*traverseproc)(PyObject *, visitproc, void *); +typedef struct { + binaryfunc nb_add; + binaryfunc nb_subtract; + binaryfunc nb_multiply; + binaryfunc nb_divide; + binaryfunc nb_remainder; + binaryfunc nb_divmod; + ternaryfunc nb_power; + unaryfunc nb_negative; + unaryfunc nb_positive; + unaryfunc nb_absolute; + inquiry nb_nonzero; + unaryfunc nb_invert; + binaryfunc nb_lshift; + binaryfunc nb_rshift; + binaryfunc nb_and; + binaryfunc nb_xor; + binaryfunc nb_or; + coercion nb_coerce; + unaryfunc nb_int; + unaryfunc nb_long; + unaryfunc nb_float; + unaryfunc nb_oct; + unaryfunc nb_hex; + binaryfunc nb_inplace_add; + binaryfunc nb_inplace_subtract; + binaryfunc nb_inplace_multiply; + binaryfunc nb_inplace_divide; + binaryfunc nb_inplace_remainder; + ternaryfunc nb_inplace_power; + binaryfunc nb_inplace_lshift; + binaryfunc nb_inplace_rshift; + binaryfunc nb_inplace_and; + binaryfunc nb_inplace_xor; + binaryfunc nb_inplace_or; + binaryfunc nb_floor_divide; + binaryfunc nb_true_divide; + binaryfunc nb_inplace_floor_divide; + binaryfunc nb_inplace_true_divide; + unaryfunc nb_index; +} PyNumberMethods; +typedef struct { + lenfunc sq_length; + binaryfunc sq_concat; + ssizeargfunc sq_repeat; + ssizeargfunc sq_item; + ssizessizeargfunc sq_slice; + ssizeobjargproc sq_ass_item; + ssizessizeobjargproc sq_ass_slice; + objobjproc sq_contains; + binaryfunc sq_inplace_concat; + ssizeargfunc sq_inplace_repeat; +} PySequenceMethods; +typedef struct { + lenfunc mp_length; + binaryfunc mp_subscript; + objobjargproc mp_ass_subscript; +} PyMappingMethods; +typedef struct { + readbufferproc bf_getreadbuffer; + writebufferproc bf_getwritebuffer; + segcountproc bf_getsegcount; + charbufferproc bf_getcharbuffer; + getbufferproc bf_getbuffer; + releasebufferproc bf_releasebuffer; +} PyBufferProcs; +typedef void (*freefunc)(void *); +typedef void (*destructor)(PyObject *); +typedef int (*printfunc)(PyObject *, FILE *, int); +typedef PyObject *(*getattrfunc)(PyObject *, char *); +typedef PyObject *(*getattrofunc)(PyObject *, PyObject *); +typedef int (*setattrfunc)(PyObject *, char *, PyObject *); +typedef int (*setattrofunc)(PyObject *, PyObject *, PyObject *); +typedef int (*cmpfunc)(PyObject *, PyObject *); +typedef PyObject *(*reprfunc)(PyObject *); +typedef long (*hashfunc)(PyObject *); +typedef PyObject *(*richcmpfunc) (PyObject *, PyObject *, int); +typedef PyObject *(*getiterfunc) (PyObject *); +typedef PyObject *(*iternextfunc) (PyObject *); +typedef PyObject *(*descrgetfunc) (PyObject *, PyObject *, PyObject *); +typedef int (*descrsetfunc) (PyObject *, PyObject *, PyObject *); +typedef int (*initproc)(PyObject *, PyObject *, PyObject *); +typedef PyObject *(*newfunc)(struct _typeobject *, PyObject *, PyObject *); +typedef PyObject *(*allocfunc)(struct _typeobject *, Py_ssize_t); +typedef struct _typeobject { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; Py_ssize_t ob_size; + const char *tp_name; + Py_ssize_t tp_basicsize, tp_itemsize; + destructor tp_dealloc; + printfunc tp_print; + getattrfunc tp_getattr; + setattrfunc tp_setattr; + cmpfunc tp_compare; + reprfunc tp_repr; + PyNumberMethods *tp_as_number; + PySequenceMethods *tp_as_sequence; + PyMappingMethods *tp_as_mapping; + hashfunc tp_hash; + ternaryfunc tp_call; + reprfunc tp_str; + getattrofunc tp_getattro; + setattrofunc tp_setattro; + PyBufferProcs *tp_as_buffer; + long tp_flags; + const char *tp_doc; + traverseproc tp_traverse; + inquiry tp_clear; + richcmpfunc tp_richcompare; + Py_ssize_t tp_weaklistoffset; + getiterfunc tp_iter; + iternextfunc tp_iternext; + struct PyMethodDef *tp_methods; + struct PyMemberDef *tp_members; + struct PyGetSetDef *tp_getset; + struct _typeobject *tp_base; + PyObject *tp_dict; + descrgetfunc tp_descr_get; + descrsetfunc tp_descr_set; + Py_ssize_t tp_dictoffset; + initproc tp_init; + allocfunc tp_alloc; + newfunc tp_new; + freefunc tp_free; + inquiry tp_is_gc; + PyObject *tp_bases; + PyObject *tp_mro; + PyObject *tp_cache; + PyObject *tp_subclasses; + PyObject *tp_weaklist; + destructor tp_del; + unsigned int tp_version_tag; +} PyTypeObject; +typedef struct _heaptypeobject { + PyTypeObject ht_type; + PyNumberMethods as_number; + PyMappingMethods as_mapping; + PySequenceMethods as_sequence; + PyBufferProcs as_buffer; + PyObject *ht_name, *ht_slots; +} PyHeapTypeObject; +int PyType_IsSubtype(PyTypeObject *, PyTypeObject *); +extern PyTypeObject PyType_Type; +extern PyTypeObject PyBaseObject_Type; +extern PyTypeObject PySuper_Type; +int PyType_Ready(PyTypeObject *); +PyObject * PyType_GenericAlloc(PyTypeObject *, Py_ssize_t); +PyObject * PyType_GenericNew(PyTypeObject *, + PyObject *, PyObject *); +PyObject * _PyType_Lookup(PyTypeObject *, PyObject *); +unsigned int PyType_ClearCache(void); +void PyType_Modified(PyTypeObject *); +int PyObject_Print(PyObject *, FILE *, int); +void _PyObject_Dump(PyObject *); +PyObject * PyObject_Repr(PyObject *); +PyObject * _PyObject_Str(PyObject *); +PyObject * PyObject_Str(PyObject *); +PyObject * PyObject_Unicode(PyObject *); +int PyObject_Compare(PyObject *, PyObject *); +PyObject * PyObject_RichCompare(PyObject *, PyObject *, int); +int PyObject_RichCompareBool(PyObject *, PyObject *, int); +PyObject * PyObject_GetAttrString(PyObject *, const char *); +int PyObject_SetAttrString(PyObject *, const char *, PyObject *); +int PyObject_HasAttrString(PyObject *, const char *); +PyObject * PyObject_GetAttr(PyObject *, PyObject *); +int PyObject_SetAttr(PyObject *, PyObject *, PyObject *); +int PyObject_HasAttr(PyObject *, PyObject *); +PyObject ** _PyObject_GetDictPtr(PyObject *); +PyObject * PyObject_SelfIter(PyObject *); +PyObject * PyObject_GenericGetAttr(PyObject *, PyObject *); +int PyObject_GenericSetAttr(PyObject *, + PyObject *, PyObject *); +long PyObject_Hash(PyObject *); +long PyObject_HashNotImplemented(PyObject *); +int PyObject_IsTrue(PyObject *); +int PyObject_Not(PyObject *); +int PyCallable_Check(PyObject *); +int PyNumber_Coerce(PyObject **, PyObject **); +int PyNumber_CoerceEx(PyObject **, PyObject **); +void PyObject_ClearWeakRefs(PyObject *); +extern int _PyObject_SlotCompare(PyObject *, PyObject *); +PyObject * PyObject_Dir(PyObject *); +int Py_ReprEnter(PyObject *); +void Py_ReprLeave(PyObject *); +long _Py_HashDouble(double); +long _Py_HashPointer(void*); +void Py_IncRef(PyObject *); +void Py_DecRef(PyObject *); +extern PyObject _Py_NoneStruct; +extern PyObject _Py_NotImplementedStruct; +extern int _Py_SwappedOp[]; +void _PyTrash_deposit_object(PyObject*); +void _PyTrash_destroy_chain(void); +extern int _PyTrash_delete_nesting; +extern PyObject * _PyTrash_delete_later; +} +extern "C" { +void * PyObject_Malloc(size_t); +void * PyObject_Realloc(void *, size_t); +void PyObject_Free(void *); +PyObject * PyObject_Init(PyObject *, PyTypeObject *); +PyVarObject * PyObject_InitVar(PyVarObject *, + PyTypeObject *, Py_ssize_t); +PyObject * _PyObject_New(PyTypeObject *); +PyVarObject * _PyObject_NewVar(PyTypeObject *, Py_ssize_t); +Py_ssize_t PyGC_Collect(void); +PyVarObject * _PyObject_GC_Resize(PyVarObject *, Py_ssize_t); +typedef union _gc_head { + struct { + union _gc_head *gc_next; + union _gc_head *gc_prev; + Py_ssize_t gc_refs; + } gc; + long double dummy; +} PyGC_Head; +extern PyGC_Head *_PyGC_generation0; +PyObject * _PyObject_GC_Malloc(size_t); +PyObject * _PyObject_GC_New(PyTypeObject *); +PyVarObject * _PyObject_GC_NewVar(PyTypeObject *, Py_ssize_t); +void PyObject_GC_Track(void *); +void PyObject_GC_UnTrack(void *); +void PyObject_GC_Del(void *); +} +extern "C" { +extern int Py_DebugFlag; +extern int Py_VerboseFlag; +extern int Py_InteractiveFlag; +extern int Py_InspectFlag; +extern int Py_OptimizeFlag; +extern int Py_NoSiteFlag; +extern int Py_BytesWarningFlag; +extern int Py_UseClassExceptionsFlag; +extern int Py_FrozenFlag; +extern int Py_TabcheckFlag; +extern int Py_UnicodeFlag; +extern int Py_IgnoreEnvironmentFlag; +extern int Py_DivisionWarningFlag; +extern int Py_DontWriteBytecodeFlag; +extern int Py_NoUserSiteDirectory; +extern int _Py_QnewFlag; +extern int Py_Py3kWarningFlag; +void Py_FatalError(const char *message); +} +extern "C" { +enum +{ + _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), + _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), + _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), + _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), + _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), + _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), + _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), + _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), + _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), + _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), + _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), + _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) +}; +extern __const unsigned short int **__ctype_b_loc (void) + throw () __attribute__ ((__const)); +extern __const __int32_t **__ctype_tolower_loc (void) + throw () __attribute__ ((__const)); +extern __const __int32_t **__ctype_toupper_loc (void) + throw () __attribute__ ((__const)); +extern int isalnum (int) throw (); +extern int isalpha (int) throw (); +extern int iscntrl (int) throw (); +extern int isdigit (int) throw (); +extern int islower (int) throw (); +extern int isgraph (int) throw (); +extern int isprint (int) throw (); +extern int ispunct (int) throw (); +extern int isspace (int) throw (); +extern int isupper (int) throw (); +extern int isxdigit (int) throw (); +extern int tolower (int __c) throw (); +extern int toupper (int __c) throw (); +extern int isblank (int) throw (); +extern int isctype (int __c, int __mask) throw (); +extern int isascii (int __c) throw (); +extern int toascii (int __c) throw (); +extern int _toupper (int) throw (); +extern int _tolower (int) throw (); +extern int isalnum_l (int, __locale_t) throw (); +extern int isalpha_l (int, __locale_t) throw (); +extern int iscntrl_l (int, __locale_t) throw (); +extern int isdigit_l (int, __locale_t) throw (); +extern int islower_l (int, __locale_t) throw (); +extern int isgraph_l (int, __locale_t) throw (); +extern int isprint_l (int, __locale_t) throw (); +extern int ispunct_l (int, __locale_t) throw (); +extern int isspace_l (int, __locale_t) throw (); +extern int isupper_l (int, __locale_t) throw (); +extern int isxdigit_l (int, __locale_t) throw (); +extern int isblank_l (int, __locale_t) throw (); +extern int __tolower_l (int __c, __locale_t __l) throw (); +extern int tolower_l (int __c, __locale_t __l) throw (); +extern int __toupper_l (int __c, __locale_t __l) throw (); +extern int toupper_l (int __c, __locale_t __l) throw (); +} +typedef unsigned int wint_t; +typedef __mbstate_t mbstate_t; +extern "C" { +struct tm; +extern wchar_t *wcscpy (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src) throw (); +extern wchar_t *wcsncpy (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n) + throw (); +extern wchar_t *wcscat (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src) throw (); +extern wchar_t *wcsncat (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n) + throw (); +extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2) + throw () __attribute__ ((__pure__)); +extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) + throw () __attribute__ ((__pure__)); +extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) throw (); +extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2, + size_t __n) throw (); +extern int wcscasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, + __locale_t __loc) throw (); +extern int wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, + size_t __n, __locale_t __loc) throw (); +extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) throw (); +extern size_t wcsxfrm (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) throw (); +extern int wcscoll_l (__const wchar_t *__s1, __const wchar_t *__s2, + __locale_t __loc) throw (); +extern size_t wcsxfrm_l (wchar_t *__s1, __const wchar_t *__s2, + size_t __n, __locale_t __loc) throw (); +extern wchar_t *wcsdup (__const wchar_t *__s) throw () __attribute__ ((__malloc__)); +extern "C++" wchar_t *wcschr (wchar_t *__wcs, wchar_t __wc) + throw () __asm ("wcschr") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc) + throw () __asm ("wcschr") __attribute__ ((__pure__)); +extern "C++" wchar_t *wcsrchr (wchar_t *__wcs, wchar_t __wc) + throw () __asm ("wcsrchr") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc) + throw () __asm ("wcsrchr") __attribute__ ((__pure__)); +extern wchar_t *wcschrnul (__const wchar_t *__s, wchar_t __wc) + throw () __attribute__ ((__pure__)); +extern size_t wcscspn (__const wchar_t *__wcs, __const wchar_t *__reject) + throw () __attribute__ ((__pure__)); +extern size_t wcsspn (__const wchar_t *__wcs, __const wchar_t *__accept) + throw () __attribute__ ((__pure__)); +extern "C++" wchar_t *wcspbrk (wchar_t *__wcs, __const wchar_t *__accept) + throw () __asm ("wcspbrk") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcspbrk (__const wchar_t *__wcs, + __const wchar_t *__accept) + throw () __asm ("wcspbrk") __attribute__ ((__pure__)); +extern "C++" wchar_t *wcsstr (wchar_t *__haystack, __const wchar_t *__needle) + throw () __asm ("wcsstr") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcsstr (__const wchar_t *__haystack, + __const wchar_t *__needle) + throw () __asm ("wcsstr") __attribute__ ((__pure__)); +extern wchar_t *wcstok (wchar_t *__restrict __s, + __const wchar_t *__restrict __delim, + wchar_t **__restrict __ptr) throw (); +extern size_t wcslen (__const wchar_t *__s) throw () __attribute__ ((__pure__)); +extern "C++" wchar_t *wcswcs (wchar_t *__haystack, __const wchar_t *__needle) + throw () __asm ("wcswcs") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcswcs (__const wchar_t *__haystack, + __const wchar_t *__needle) + throw () __asm ("wcswcs") __attribute__ ((__pure__)); +extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen) + throw () __attribute__ ((__pure__)); +extern "C++" wchar_t *wmemchr (wchar_t *__s, wchar_t __c, size_t __n) + throw () __asm ("wmemchr") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, + size_t __n) + throw () __asm ("wmemchr") __attribute__ ((__pure__)); +extern int wmemcmp (__const wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) + throw () __attribute__ ((__pure__)); +extern wchar_t *wmemcpy (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) throw (); +extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n) + throw (); +extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw (); +extern wchar_t *wmempcpy (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) + throw (); +extern wint_t btowc (int __c) throw (); +extern int wctob (wint_t __c) throw (); +extern int mbsinit (__const mbstate_t *__ps) throw () __attribute__ ((__pure__)); +extern size_t mbrtowc (wchar_t *__restrict __pwc, + __const char *__restrict __s, size_t __n, + mbstate_t *__p) throw (); +extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, + mbstate_t *__restrict __ps) throw (); +extern size_t __mbrlen (__const char *__restrict __s, size_t __n, + mbstate_t *__restrict __ps) throw (); +extern size_t mbrlen (__const char *__restrict __s, size_t __n, + mbstate_t *__restrict __ps) throw (); +extern size_t mbsrtowcs (wchar_t *__restrict __dst, + __const char **__restrict __src, size_t __len, + mbstate_t *__restrict __ps) throw (); +extern size_t wcsrtombs (char *__restrict __dst, + __const wchar_t **__restrict __src, size_t __len, + mbstate_t *__restrict __ps) throw (); +extern size_t mbsnrtowcs (wchar_t *__restrict __dst, + __const char **__restrict __src, size_t __nmc, + size_t __len, mbstate_t *__restrict __ps) throw (); +extern size_t wcsnrtombs (char *__restrict __dst, + __const wchar_t **__restrict __src, + size_t __nwc, size_t __len, + mbstate_t *__restrict __ps) throw (); +extern int wcwidth (wchar_t __c) throw (); +extern int wcswidth (__const wchar_t *__s, size_t __n) throw (); +extern double wcstod (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) throw (); +extern float wcstof (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) throw (); +extern long double wcstold (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) throw (); +extern long int wcstol (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) throw (); +extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + throw (); +__extension__ +extern long long int wcstoll (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + throw (); +__extension__ +extern unsigned long long int wcstoull (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base) throw (); +__extension__ +extern long long int wcstoq (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + throw (); +__extension__ +extern unsigned long long int wcstouq (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base) throw (); +extern long int wcstol_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base, + __locale_t __loc) throw (); +extern unsigned long int wcstoul_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, __locale_t __loc) throw (); +__extension__ +extern long long int wcstoll_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, __locale_t __loc) throw (); +__extension__ +extern unsigned long long int wcstoull_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, __locale_t __loc) + throw (); +extern double wcstod_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, __locale_t __loc) + throw (); +extern float wcstof_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, __locale_t __loc) + throw (); +extern long double wcstold_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + __locale_t __loc) throw (); +extern wchar_t *wcpcpy (wchar_t *__dest, __const wchar_t *__src) throw (); +extern wchar_t *wcpncpy (wchar_t *__dest, __const wchar_t *__src, size_t __n) + throw (); +extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) throw (); +extern int fwide (__FILE *__fp, int __mode) throw (); +extern int fwprintf (__FILE *__restrict __stream, + __const wchar_t *__restrict __format, ...) + ; +extern int wprintf (__const wchar_t *__restrict __format, ...) + ; +extern int swprintf (wchar_t *__restrict __s, size_t __n, + __const wchar_t *__restrict __format, ...) + throw () ; +extern int vfwprintf (__FILE *__restrict __s, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; +extern int vwprintf (__const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; +extern int vswprintf (wchar_t *__restrict __s, size_t __n, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + throw () ; +extern int fwscanf (__FILE *__restrict __stream, + __const wchar_t *__restrict __format, ...) + ; +extern int wscanf (__const wchar_t *__restrict __format, ...) + ; +extern int swscanf (__const wchar_t *__restrict __s, + __const wchar_t *__restrict __format, ...) + throw () ; +extern int vfwscanf (__FILE *__restrict __s, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; +extern int vwscanf (__const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; +extern int vswscanf (__const wchar_t *__restrict __s, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + throw () ; +extern wint_t fgetwc (__FILE *__stream); +extern wint_t getwc (__FILE *__stream); +extern wint_t getwchar (void); +extern wint_t fputwc (wchar_t __wc, __FILE *__stream); +extern wint_t putwc (wchar_t __wc, __FILE *__stream); +extern wint_t putwchar (wchar_t __wc); +extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n, + __FILE *__restrict __stream); +extern int fputws (__const wchar_t *__restrict __ws, + __FILE *__restrict __stream); +extern wint_t ungetwc (wint_t __wc, __FILE *__stream); +extern wint_t getwc_unlocked (__FILE *__stream); +extern wint_t getwchar_unlocked (void); +extern wint_t fgetwc_unlocked (__FILE *__stream); +extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream); +extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream); +extern wint_t putwchar_unlocked (wchar_t __wc); +extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n, + __FILE *__restrict __stream); +extern int fputws_unlocked (__const wchar_t *__restrict __ws, + __FILE *__restrict __stream); +extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize, + __const wchar_t *__restrict __format, + __const struct tm *__restrict __tp) throw (); +extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, + __const wchar_t *__restrict __format, + __const struct tm *__restrict __tp, + __locale_t __loc) throw (); +} +typedef unsigned int Py_UCS4; +typedef Py_UCS4 Py_UNICODE; +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + Py_ssize_t length; + Py_UNICODE *str; + long hash; + PyObject *defenc; +} PyUnicodeObject; +extern PyTypeObject PyUnicode_Type; +PyObject* PyUnicodeUCS4_FromUnicode( + const Py_UNICODE *u, + Py_ssize_t size + ); +PyObject* PyUnicodeUCS4_FromStringAndSize( + const char *u, + Py_ssize_t size + ); +PyObject* PyUnicodeUCS4_FromString( + const char *u + ); +Py_UNICODE * PyUnicodeUCS4_AsUnicode( + PyObject *unicode + ); +Py_ssize_t PyUnicodeUCS4_GetSize( + PyObject *unicode + ); +Py_UNICODE PyUnicodeUCS4_GetMax(void); +int PyUnicodeUCS4_Resize( + PyObject **unicode, + Py_ssize_t length + ); +PyObject* PyUnicodeUCS4_FromEncodedObject( + register PyObject *obj, + const char *encoding, + const char *errors + ); +PyObject* PyUnicodeUCS4_FromObject( + register PyObject *obj + ); +PyObject * PyUnicodeUCS4_FromFormatV(const char*, va_list); +PyObject * PyUnicodeUCS4_FromFormat(const char*, ...); +PyObject * _PyUnicode_FormatAdvanced(PyObject *obj, + Py_UNICODE *format_spec, + Py_ssize_t format_spec_len); +PyObject* PyUnicodeUCS4_FromWideChar( + register const wchar_t *w, + Py_ssize_t size + ); +Py_ssize_t PyUnicodeUCS4_AsWideChar( + PyUnicodeObject *unicode, + register wchar_t *w, + Py_ssize_t size + ); +PyObject* PyUnicodeUCS4_FromOrdinal(int ordinal); +int PyUnicodeUCS4_ClearFreelist(void); +PyObject * _PyUnicodeUCS4_AsDefaultEncodedString( + PyObject *, const char *); +const char* PyUnicodeUCS4_GetDefaultEncoding(void); +int PyUnicodeUCS4_SetDefaultEncoding( + const char *encoding + ); +PyObject* PyUnicodeUCS4_Decode( + const char *s, + Py_ssize_t size, + const char *encoding, + const char *errors + ); +PyObject* PyUnicodeUCS4_Encode( + const Py_UNICODE *s, + Py_ssize_t size, + const char *encoding, + const char *errors + ); +PyObject* PyUnicodeUCS4_AsEncodedObject( + PyObject *unicode, + const char *encoding, + const char *errors + ); +PyObject* PyUnicodeUCS4_AsEncodedString( + PyObject *unicode, + const char *encoding, + const char *errors + ); +PyObject* PyUnicode_BuildEncodingMap( + PyObject* string + ); +PyObject* PyUnicode_DecodeUTF7( + const char *string, + Py_ssize_t length, + const char *errors + ); +PyObject* PyUnicode_DecodeUTF7Stateful( + const char *string, + Py_ssize_t length, + const char *errors, + Py_ssize_t *consumed + ); +PyObject* PyUnicode_EncodeUTF7( + const Py_UNICODE *data, + Py_ssize_t length, + int encodeSetO, + int encodeWhiteSpace, + const char *errors + ); +PyObject* PyUnicodeUCS4_DecodeUTF8( + const char *string, + Py_ssize_t length, + const char *errors + ); +PyObject* PyUnicodeUCS4_DecodeUTF8Stateful( + const char *string, + Py_ssize_t length, + const char *errors, + Py_ssize_t *consumed + ); +PyObject* PyUnicodeUCS4_AsUTF8String( + PyObject *unicode + ); +PyObject* PyUnicodeUCS4_EncodeUTF8( + const Py_UNICODE *data, + Py_ssize_t length, + const char *errors + ); +PyObject* PyUnicodeUCS4_DecodeUTF32( + const char *string, + Py_ssize_t length, + const char *errors, + int *byteorder + ); +PyObject* PyUnicodeUCS4_DecodeUTF32Stateful( + const char *string, + Py_ssize_t length, + const char *errors, + int *byteorder, + Py_ssize_t *consumed + ); +PyObject* PyUnicodeUCS4_AsUTF32String( + PyObject *unicode + ); +PyObject* PyUnicodeUCS4_EncodeUTF32( + const Py_UNICODE *data, + Py_ssize_t length, + const char *errors, + int byteorder + ); +PyObject* PyUnicodeUCS4_DecodeUTF16( + const char *string, + Py_ssize_t length, + const char *errors, + int *byteorder + ); +PyObject* PyUnicodeUCS4_DecodeUTF16Stateful( + const char *string, + Py_ssize_t length, + const char *errors, + int *byteorder, + Py_ssize_t *consumed + ); +PyObject* PyUnicodeUCS4_AsUTF16String( + PyObject *unicode + ); +PyObject* PyUnicodeUCS4_EncodeUTF16( + const Py_UNICODE *data, + Py_ssize_t length, + const char *errors, + int byteorder + ); +PyObject* PyUnicodeUCS4_DecodeUnicodeEscape( + const char *string, + Py_ssize_t length, + const char *errors + ); +PyObject* PyUnicodeUCS4_AsUnicodeEscapeString( + PyObject *unicode + ); +PyObject* PyUnicodeUCS4_EncodeUnicodeEscape( + const Py_UNICODE *data, + Py_ssize_t length + ); +PyObject* PyUnicodeUCS4_DecodeRawUnicodeEscape( + const char *string, + Py_ssize_t length, + const char *errors + ); +PyObject* PyUnicodeUCS4_AsRawUnicodeEscapeString( + PyObject *unicode + ); +PyObject* PyUnicodeUCS4_EncodeRawUnicodeEscape( + const Py_UNICODE *data, + Py_ssize_t length + ); +PyObject *_PyUnicode_DecodeUnicodeInternal( + const char *string, + Py_ssize_t length, + const char *errors + ); +PyObject* PyUnicodeUCS4_DecodeLatin1( + const char *string, + Py_ssize_t length, + const char *errors + ); +PyObject* PyUnicodeUCS4_AsLatin1String( + PyObject *unicode + ); +PyObject* PyUnicodeUCS4_EncodeLatin1( + const Py_UNICODE *data, + Py_ssize_t length, + const char *errors + ); +PyObject* PyUnicodeUCS4_DecodeASCII( + const char *string, + Py_ssize_t length, + const char *errors + ); +PyObject* PyUnicodeUCS4_AsASCIIString( + PyObject *unicode + ); +PyObject* PyUnicodeUCS4_EncodeASCII( + const Py_UNICODE *data, + Py_ssize_t length, + const char *errors + ); +PyObject* PyUnicodeUCS4_DecodeCharmap( + const char *string, + Py_ssize_t length, + PyObject *mapping, + const char *errors + ); +PyObject* PyUnicodeUCS4_AsCharmapString( + PyObject *unicode, + PyObject *mapping + ); +PyObject* PyUnicodeUCS4_EncodeCharmap( + const Py_UNICODE *data, + Py_ssize_t length, + PyObject *mapping, + const char *errors + ); +PyObject * PyUnicodeUCS4_TranslateCharmap( + const Py_UNICODE *data, + Py_ssize_t length, + PyObject *table, + const char *errors + ); +int PyUnicodeUCS4_EncodeDecimal( + Py_UNICODE *s, + Py_ssize_t length, + char *output, + const char *errors + ); +PyObject* PyUnicodeUCS4_Concat( + PyObject *left, + PyObject *right + ); +PyObject* PyUnicodeUCS4_Split( + PyObject *s, + PyObject *sep, + Py_ssize_t maxsplit + ); +PyObject* PyUnicodeUCS4_Splitlines( + PyObject *s, + int keepends + ); +PyObject* PyUnicodeUCS4_Partition( + PyObject *s, + PyObject *sep + ); +PyObject* PyUnicodeUCS4_RPartition( + PyObject *s, + PyObject *sep + ); +PyObject* PyUnicodeUCS4_RSplit( + PyObject *s, + PyObject *sep, + Py_ssize_t maxsplit + ); +PyObject * PyUnicodeUCS4_Translate( + PyObject *str, + PyObject *table, + const char *errors + ); +PyObject* PyUnicodeUCS4_Join( + PyObject *separator, + PyObject *seq + ); +Py_ssize_t PyUnicodeUCS4_Tailmatch( + PyObject *str, + PyObject *substr, + Py_ssize_t start, + Py_ssize_t end, + int direction + ); +Py_ssize_t PyUnicodeUCS4_Find( + PyObject *str, + PyObject *substr, + Py_ssize_t start, + Py_ssize_t end, + int direction + ); +Py_ssize_t PyUnicodeUCS4_Count( + PyObject *str, + PyObject *substr, + Py_ssize_t start, + Py_ssize_t end + ); +PyObject * PyUnicodeUCS4_Replace( + PyObject *str, + PyObject *substr, + PyObject *replstr, + Py_ssize_t maxcount + ); +int PyUnicodeUCS4_Compare( + PyObject *left, + PyObject *right + ); +PyObject * PyUnicodeUCS4_RichCompare( + PyObject *left, + PyObject *right, + int op + ); +PyObject * PyUnicodeUCS4_Format( + PyObject *format, + PyObject *args + ); +int PyUnicodeUCS4_Contains( + PyObject *container, + PyObject *element + ); +PyObject * _PyUnicode_XStrip( + PyUnicodeObject *self, + int striptype, + PyObject *sepobj + ); +extern const unsigned char _Py_ascii_whitespace[]; +int _PyUnicodeUCS4_IsLowercase( + Py_UNICODE ch + ); +int _PyUnicodeUCS4_IsUppercase( + Py_UNICODE ch + ); +int _PyUnicodeUCS4_IsTitlecase( + Py_UNICODE ch + ); +int _PyUnicodeUCS4_IsWhitespace( + const Py_UNICODE ch + ); +int _PyUnicodeUCS4_IsLinebreak( + const Py_UNICODE ch + ); +Py_UNICODE _PyUnicodeUCS4_ToLowercase( + Py_UNICODE ch + ); +Py_UNICODE _PyUnicodeUCS4_ToUppercase( + Py_UNICODE ch + ); +Py_UNICODE _PyUnicodeUCS4_ToTitlecase( + Py_UNICODE ch + ); +int _PyUnicodeUCS4_ToDecimalDigit( + Py_UNICODE ch + ); +int _PyUnicodeUCS4_ToDigit( + Py_UNICODE ch + ); +double _PyUnicodeUCS4_ToNumeric( + Py_UNICODE ch + ); +int _PyUnicodeUCS4_IsDecimalDigit( + Py_UNICODE ch + ); +int _PyUnicodeUCS4_IsDigit( + Py_UNICODE ch + ); +int _PyUnicodeUCS4_IsNumeric( + Py_UNICODE ch + ); +int _PyUnicodeUCS4_IsAlpha( + Py_UNICODE ch + ); +} +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + long ob_ival; +} PyIntObject; +extern PyTypeObject PyInt_Type; +PyObject * PyInt_FromString(char*, char**, int); +PyObject * PyInt_FromUnicode(Py_UNICODE*, Py_ssize_t, int); +PyObject * PyInt_FromLong(long); +PyObject * PyInt_FromSize_t(size_t); +PyObject * PyInt_FromSsize_t(Py_ssize_t); +long PyInt_AsLong(PyObject *); +Py_ssize_t PyInt_AsSsize_t(PyObject *); +unsigned long PyInt_AsUnsignedLongMask(PyObject *); +unsigned long long PyInt_AsUnsignedLongLongMask(PyObject *); +long PyInt_GetMax(void); +unsigned long PyOS_strtoul(char *, char **, int); +long PyOS_strtol(char *, char **, int); +int PyInt_ClearFreeList(void); +PyObject* _PyInt_Format(PyIntObject* v, int base, int newstyle); +PyObject * _PyInt_FormatAdvanced(PyObject *obj, + char *format_spec, + Py_ssize_t format_spec_len); +} +extern "C" { +typedef PyIntObject PyBoolObject; +extern PyTypeObject PyBool_Type; +extern PyIntObject _Py_ZeroStruct, _Py_TrueStruct; +PyObject * PyBool_FromLong(long); +} +extern "C" { +typedef struct _longobject PyLongObject; +extern PyTypeObject PyLong_Type; +PyObject * PyLong_FromLong(long); +PyObject * PyLong_FromUnsignedLong(unsigned long); +PyObject * PyLong_FromDouble(double); +PyObject * PyLong_FromSize_t(size_t); +PyObject * PyLong_FromSsize_t(Py_ssize_t); +long PyLong_AsLong(PyObject *); +unsigned long PyLong_AsUnsignedLong(PyObject *); +unsigned long PyLong_AsUnsignedLongMask(PyObject *); +Py_ssize_t PyLong_AsSsize_t(PyObject *); +extern int _PyLong_DigitValue[256]; +double _PyLong_AsScaledDouble(PyObject *vv, int *e); +double PyLong_AsDouble(PyObject *); +PyObject * PyLong_FromVoidPtr(void *); +void * PyLong_AsVoidPtr(PyObject *); +PyObject * PyLong_FromLongLong(long long); +PyObject * PyLong_FromUnsignedLongLong(unsigned long long); +long long PyLong_AsLongLong(PyObject *); +unsigned long long PyLong_AsUnsignedLongLong(PyObject *); +unsigned long long PyLong_AsUnsignedLongLongMask(PyObject *); +PyObject * PyLong_FromString(char *, char **, int); +PyObject * PyLong_FromUnicode(Py_UNICODE*, Py_ssize_t, int); +int _PyLong_Sign(PyObject *v); +size_t _PyLong_NumBits(PyObject *v); +PyObject * _PyLong_FromByteArray( + const unsigned char* bytes, size_t n, + int little_endian, int is_signed); +int _PyLong_AsByteArray(PyLongObject* v, + unsigned char* bytes, size_t n, + int little_endian, int is_signed); +PyObject * _PyLong_Format(PyObject *aa, int base, int addL, int newstyle); +PyObject * _PyLong_FormatAdvanced(PyObject *obj, + char *format_spec, + Py_ssize_t format_spec_len); +} +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + double ob_fval; +} PyFloatObject; +extern PyTypeObject PyFloat_Type; +double PyFloat_GetMax(void); +double PyFloat_GetMin(void); +PyObject * PyFloat_GetInfo(void); +PyObject * PyFloat_FromString(PyObject*, char** junk); +PyObject * PyFloat_FromDouble(double); +double PyFloat_AsDouble(PyObject *); +void PyFloat_AsReprString(char*, PyFloatObject *v); +void PyFloat_AsString(char*, PyFloatObject *v); +int _PyFloat_Pack4(double x, unsigned char *p, int le); +int _PyFloat_Pack8(double x, unsigned char *p, int le); +int _PyFloat_Digits(char *buf, double v, int *signum); +void _PyFloat_DigitsInit(void); +double _PyFloat_Unpack4(const unsigned char *p, int le); +double _PyFloat_Unpack8(const unsigned char *p, int le); +int PyFloat_ClearFreeList(void); +PyObject * _PyFloat_FormatAdvanced(PyObject *obj, + char *format_spec, + Py_ssize_t format_spec_len); +} +extern "C" { +typedef struct { + double real; + double imag; +} Py_complex; +Py_complex _Py_c_sum(Py_complex, Py_complex); +Py_complex _Py_c_diff(Py_complex, Py_complex); +Py_complex _Py_c_neg(Py_complex); +Py_complex _Py_c_prod(Py_complex, Py_complex); +Py_complex _Py_c_quot(Py_complex, Py_complex); +Py_complex _Py_c_pow(Py_complex, Py_complex); +double _Py_c_abs(Py_complex); +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + Py_complex cval; +} PyComplexObject; +extern PyTypeObject PyComplex_Type; +PyObject * PyComplex_FromCComplex(Py_complex); +PyObject * PyComplex_FromDoubles(double real, double imag); +double PyComplex_RealAsDouble(PyObject *op); +double PyComplex_ImagAsDouble(PyObject *op); +Py_complex PyComplex_AsCComplex(PyObject *op); +} +extern "C" { +extern PyTypeObject PyRange_Type; +} +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; Py_ssize_t ob_size; + long ob_shash; + int ob_sstate; + char ob_sval[1]; +} PyStringObject; +extern PyTypeObject PyBaseString_Type; +extern PyTypeObject PyString_Type; +PyObject * PyString_FromStringAndSize(const char *, Py_ssize_t); +PyObject * PyString_FromString(const char *); +PyObject * PyString_FromFormatV(const char*, va_list) + __attribute__((format(printf, 1, 0))); +PyObject * PyString_FromFormat(const char*, ...) + __attribute__((format(printf, 1, 2))); +Py_ssize_t PyString_Size(PyObject *); +char * PyString_AsString(PyObject *); +PyObject * PyString_Repr(PyObject *, int); +void PyString_Concat(PyObject **, PyObject *); +void PyString_ConcatAndDel(PyObject **, PyObject *); +int _PyString_Resize(PyObject **, Py_ssize_t); +int _PyString_Eq(PyObject *, PyObject*); +PyObject * PyString_Format(PyObject *, PyObject *); +PyObject * _PyString_FormatLong(PyObject*, int, int, + int, char**, int*); +PyObject * PyString_DecodeEscape(const char *, Py_ssize_t, + const char *, Py_ssize_t, + const char *); +void PyString_InternInPlace(PyObject **); +void PyString_InternImmortal(PyObject **); +PyObject * PyString_InternFromString(const char *); +void _Py_ReleaseInternedStrings(void); +PyObject * _PyString_Join(PyObject *sep, PyObject *x); +PyObject* PyString_Decode( + const char *s, + Py_ssize_t size, + const char *encoding, + const char *errors + ); +PyObject* PyString_Encode( + const char *s, + Py_ssize_t size, + const char *encoding, + const char *errors + ); +PyObject* PyString_AsEncodedObject( + PyObject *str, + const char *encoding, + const char *errors + ); +PyObject* PyString_AsEncodedString( + PyObject *str, + const char *encoding, + const char *errors + ); +PyObject* PyString_AsDecodedObject( + PyObject *str, + const char *encoding, + const char *errors + ); +PyObject* PyString_AsDecodedString( + PyObject *str, + const char *encoding, + const char *errors + ); +int PyString_AsStringAndSize( + register PyObject *obj, + register char **s, + register Py_ssize_t *len + ); +int _PyString_InsertThousandsGrouping(char *buffer, + Py_ssize_t n_buffer, + Py_ssize_t n_digits, + Py_ssize_t buf_size, + Py_ssize_t *count, + int append_zero_char); +PyObject * _PyBytes_FormatAdvanced(PyObject *obj, + char *format_spec, + Py_ssize_t format_spec_len); +} +extern "C" { +extern PyTypeObject PyBuffer_Type; +PyObject * PyBuffer_FromObject(PyObject *base, + Py_ssize_t offset, Py_ssize_t size); +PyObject * PyBuffer_FromReadWriteObject(PyObject *base, + Py_ssize_t offset, + Py_ssize_t size); +PyObject * PyBuffer_FromMemory(void *ptr, Py_ssize_t size); +PyObject * PyBuffer_FromReadWriteMemory(void *ptr, Py_ssize_t size); +PyObject * PyBuffer_New(Py_ssize_t size); +} +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; Py_ssize_t ob_size; + int ob_exports; + Py_ssize_t ob_alloc; + char *ob_bytes; +} PyByteArrayObject; +extern PyTypeObject PyByteArray_Type; +extern PyTypeObject PyByteArrayIter_Type; +PyObject * PyByteArray_FromObject(PyObject *); +PyObject * PyByteArray_Concat(PyObject *, PyObject *); +PyObject * PyByteArray_FromStringAndSize(const char *, Py_ssize_t); +Py_ssize_t PyByteArray_Size(PyObject *); +char * PyByteArray_AsString(PyObject *); +int PyByteArray_Resize(PyObject *, Py_ssize_t); +extern char _PyByteArray_empty_string[]; +} +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; Py_ssize_t ob_size; + PyObject *ob_item[1]; +} PyTupleObject; +extern PyTypeObject PyTuple_Type; +PyObject * PyTuple_New(Py_ssize_t size); +Py_ssize_t PyTuple_Size(PyObject *); +PyObject * PyTuple_GetItem(PyObject *, Py_ssize_t); +int PyTuple_SetItem(PyObject *, Py_ssize_t, PyObject *); +PyObject * PyTuple_GetSlice(PyObject *, Py_ssize_t, Py_ssize_t); +int _PyTuple_Resize(PyObject **, Py_ssize_t); +PyObject * PyTuple_Pack(Py_ssize_t, ...); +int PyTuple_ClearFreeList(void); +} +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; Py_ssize_t ob_size; + PyObject **ob_item; + Py_ssize_t allocated; +} PyListObject; +extern PyTypeObject PyList_Type; +PyObject * PyList_New(Py_ssize_t size); +Py_ssize_t PyList_Size(PyObject *); +PyObject * PyList_GetItem(PyObject *, Py_ssize_t); +int PyList_SetItem(PyObject *, Py_ssize_t, PyObject *); +int PyList_Insert(PyObject *, Py_ssize_t, PyObject *); +int PyList_Append(PyObject *, PyObject *); +PyObject * PyList_GetSlice(PyObject *, Py_ssize_t, Py_ssize_t); +int PyList_SetSlice(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *); +int PyList_Sort(PyObject *); +int PyList_Reverse(PyObject *); +PyObject * PyList_AsTuple(PyObject *); +PyObject * _PyList_Extend(PyListObject *, PyObject *); +} +extern "C" { +typedef struct { + Py_ssize_t me_hash; + PyObject *me_key; + PyObject *me_value; +} PyDictEntry; +typedef struct _dictobject PyDictObject; +struct _dictobject { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + Py_ssize_t ma_fill; + Py_ssize_t ma_used; + Py_ssize_t ma_mask; + PyDictEntry *ma_table; + PyDictEntry *(*ma_lookup)(PyDictObject *mp, PyObject *key, long hash); + PyDictEntry ma_smalltable[8]; +}; +extern PyTypeObject PyDict_Type; +PyObject * PyDict_New(void); +PyObject * PyDict_GetItem(PyObject *mp, PyObject *key); +int PyDict_SetItem(PyObject *mp, PyObject *key, PyObject *item); +int PyDict_DelItem(PyObject *mp, PyObject *key); +void PyDict_Clear(PyObject *mp); +int PyDict_Next( + PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value); +int _PyDict_Next( + PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value, long *hash); +PyObject * PyDict_Keys(PyObject *mp); +PyObject * PyDict_Values(PyObject *mp); +PyObject * PyDict_Items(PyObject *mp); +Py_ssize_t PyDict_Size(PyObject *mp); +PyObject * PyDict_Copy(PyObject *mp); +int PyDict_Contains(PyObject *mp, PyObject *key); +int _PyDict_Contains(PyObject *mp, PyObject *key, long hash); +PyObject * _PyDict_NewPresized(Py_ssize_t minused); +int PyDict_Update(PyObject *mp, PyObject *other); +int PyDict_Merge(PyObject *mp, + PyObject *other, + int override); +int PyDict_MergeFromSeq2(PyObject *d, + PyObject *seq2, + int override); +PyObject * PyDict_GetItemString(PyObject *dp, const char *key); +int PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item); +int PyDict_DelItemString(PyObject *dp, const char *key); +} +extern "C" { +extern PyTypeObject PyEnum_Type; +extern PyTypeObject PyReversed_Type; +} +extern "C" { +typedef struct { + long hash; + PyObject *key; +} setentry; +typedef struct _setobject PySetObject; +struct _setobject { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + Py_ssize_t fill; + Py_ssize_t used; + Py_ssize_t mask; + setentry *table; + setentry *(*lookup)(PySetObject *so, PyObject *key, long hash); + setentry smalltable[8]; + long hash; + PyObject *weakreflist; +}; +extern PyTypeObject PySet_Type; +extern PyTypeObject PyFrozenSet_Type; +PyObject * PySet_New(PyObject *); +PyObject * PyFrozenSet_New(PyObject *); +Py_ssize_t PySet_Size(PyObject *anyset); +int PySet_Clear(PyObject *set); +int PySet_Contains(PyObject *anyset, PyObject *key); +int PySet_Discard(PyObject *set, PyObject *key); +int PySet_Add(PyObject *set, PyObject *key); +int _PySet_Next(PyObject *set, Py_ssize_t *pos, PyObject **key); +int _PySet_NextEntry(PyObject *set, Py_ssize_t *pos, PyObject **key, long *hash); +PyObject * PySet_Pop(PyObject *set); +int _PySet_Update(PyObject *set, PyObject *iterable); +} +extern "C" { +extern PyTypeObject PyCFunction_Type; +typedef PyObject *(*PyCFunction)(PyObject *, PyObject *); +typedef PyObject *(*PyCFunctionWithKeywords)(PyObject *, PyObject *, + PyObject *); +typedef PyObject *(*PyNoArgsFunction)(PyObject *); +PyCFunction PyCFunction_GetFunction(PyObject *); +PyObject * PyCFunction_GetSelf(PyObject *); +int PyCFunction_GetFlags(PyObject *); +PyObject * PyCFunction_Call(PyObject *, PyObject *, PyObject *); +struct PyMethodDef { + const char *ml_name; + PyCFunction ml_meth; + int ml_flags; + const char *ml_doc; +}; +typedef struct PyMethodDef PyMethodDef; +PyObject * Py_FindMethod(PyMethodDef[], PyObject *, const char *); +PyObject * PyCFunction_NewEx(PyMethodDef *, PyObject *, + PyObject *); +typedef struct PyMethodChain { + PyMethodDef *methods; + struct PyMethodChain *link; +} PyMethodChain; +PyObject * Py_FindMethodInChain(PyMethodChain *, PyObject *, + const char *); +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyMethodDef *m_ml; + PyObject *m_self; + PyObject *m_module; +} PyCFunctionObject; +int PyCFunction_ClearFreeList(void); +} +extern "C" { +extern PyTypeObject PyModule_Type; +PyObject * PyModule_New(const char *); +PyObject * PyModule_GetDict(PyObject *); +char * PyModule_GetName(PyObject *); +char * PyModule_GetFilename(PyObject *); +void _PyModule_Clear(PyObject *); +} +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *func_code; + PyObject *func_globals; + PyObject *func_defaults; + PyObject *func_closure; + PyObject *func_doc; + PyObject *func_name; + PyObject *func_dict; + PyObject *func_weakreflist; + PyObject *func_module; +} PyFunctionObject; +extern PyTypeObject PyFunction_Type; +PyObject * PyFunction_New(PyObject *, PyObject *); +PyObject * PyFunction_GetCode(PyObject *); +PyObject * PyFunction_GetGlobals(PyObject *); +PyObject * PyFunction_GetModule(PyObject *); +PyObject * PyFunction_GetDefaults(PyObject *); +int PyFunction_SetDefaults(PyObject *, PyObject *); +PyObject * PyFunction_GetClosure(PyObject *); +int PyFunction_SetClosure(PyObject *, PyObject *); +extern PyTypeObject PyClassMethod_Type; +extern PyTypeObject PyStaticMethod_Type; +PyObject * PyClassMethod_New(PyObject *); +PyObject * PyStaticMethod_New(PyObject *); +} +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *cl_bases; + PyObject *cl_dict; + PyObject *cl_name; + PyObject *cl_getattr; + PyObject *cl_setattr; + PyObject *cl_delattr; +} PyClassObject; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyClassObject *in_class; + PyObject *in_dict; + PyObject *in_weakreflist; +} PyInstanceObject; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *im_func; + PyObject *im_self; + PyObject *im_class; + PyObject *im_weakreflist; +} PyMethodObject; +extern PyTypeObject PyClass_Type, PyInstance_Type, PyMethod_Type; +PyObject * PyClass_New(PyObject *, PyObject *, PyObject *); +PyObject * PyInstance_New(PyObject *, PyObject *, + PyObject *); +PyObject * PyInstance_NewRaw(PyObject *, PyObject *); +PyObject * PyMethod_New(PyObject *, PyObject *, PyObject *); +PyObject * PyMethod_Function(PyObject *); +PyObject * PyMethod_Self(PyObject *); +PyObject * PyMethod_Class(PyObject *); +PyObject * _PyInstance_Lookup(PyObject *pinst, PyObject *name); +int PyClass_IsSubclass(PyObject *, PyObject *); +int PyMethod_ClearFreeList(void); +} +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + FILE *f_fp; + PyObject *f_name; + PyObject *f_mode; + int (*f_close)(FILE *); + int f_softspace; + int f_binary; + char* f_buf; + char* f_bufend; + char* f_bufptr; + char *f_setbuf; + int f_univ_newline; + int f_newlinetypes; + int f_skipnextlf; + PyObject *f_encoding; + PyObject *f_errors; + PyObject *weakreflist; + int unlocked_count; + int readable; + int writable; +} PyFileObject; +extern PyTypeObject PyFile_Type; +PyObject * PyFile_FromString(char *, char *); +void PyFile_SetBufSize(PyObject *, int); +int PyFile_SetEncoding(PyObject *, const char *); +int PyFile_SetEncodingAndErrors(PyObject *, const char *, char *errors); +PyObject * PyFile_FromFile(FILE *, char *, char *, + int (*)(FILE *)); +FILE * PyFile_AsFile(PyObject *); +void PyFile_IncUseCount(PyFileObject *); +void PyFile_DecUseCount(PyFileObject *); +PyObject * PyFile_Name(PyObject *); +PyObject * PyFile_GetLine(PyObject *, int); +int PyFile_WriteObject(PyObject *, PyObject *, int); +int PyFile_SoftSpace(PyObject *, int); +int PyFile_WriteString(const char *, PyObject *); +int PyObject_AsFileDescriptor(PyObject *); +extern const char * Py_FileSystemDefaultEncoding; +char *Py_UniversalNewlineFgets(char *, int, FILE*, PyObject *); +size_t Py_UniversalNewlineFread(char *, size_t, FILE *, PyObject *); +int _PyFile_SanitizeMode(char *mode); +} +extern "C" { +extern PyTypeObject PyCObject_Type; +PyObject * PyCObject_FromVoidPtr( + void *cobj, void (*destruct)(void*)); +PyObject * PyCObject_FromVoidPtrAndDesc( + void *cobj, void *desc, void (*destruct)(void*,void*)); +void * PyCObject_AsVoidPtr(PyObject *); +void * PyCObject_GetDesc(PyObject *); +void * PyCObject_Import(char *module_name, char *cobject_name); +int PyCObject_SetVoidPtr(PyObject *self, void *cobj); +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + void *cobject; + void *desc; + void (*destructor)(void *); +} PyCObject; +} +extern "C" { +struct _frame; +typedef struct _traceback { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + struct _traceback *tb_next; + struct _frame *tb_frame; + int tb_lasti; + int tb_lineno; +} PyTracebackObject; +int PyTraceBack_Here(struct _frame *); +int PyTraceBack_Print(PyObject *, PyObject *); +int _Py_DisplaySourceLine(PyObject *, const char *, int, int); +extern PyTypeObject PyTraceBack_Type; +} +extern "C" { +extern PyObject _Py_EllipsisObject; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *start, *stop, *step; +} PySliceObject; +extern PyTypeObject PySlice_Type; +extern PyTypeObject PyEllipsis_Type; +PyObject * PySlice_New(PyObject* start, PyObject* stop, + PyObject* step); +PyObject * _PySlice_FromIndices(Py_ssize_t start, Py_ssize_t stop); +int PySlice_GetIndices(PySliceObject *r, Py_ssize_t length, + Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step); +int PySlice_GetIndicesEx(PySliceObject *r, Py_ssize_t length, + Py_ssize_t *start, Py_ssize_t *stop, + Py_ssize_t *step, Py_ssize_t *slicelength); +} +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *ob_ref; +} PyCellObject; +extern PyTypeObject PyCell_Type; +PyObject * PyCell_New(PyObject *); +PyObject * PyCell_Get(PyObject *); +int PyCell_Set(PyObject *, PyObject *); +} +extern "C" { +extern PyTypeObject PySeqIter_Type; +PyObject * PySeqIter_New(PyObject *); +extern PyTypeObject PyCallIter_Type; +PyObject * PyCallIter_New(PyObject *, PyObject *); +} +extern "C" { +struct _frame; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + struct _frame *gi_frame; + int gi_running; + PyObject *gi_code; + PyObject *gi_weakreflist; +} PyGenObject; +extern PyTypeObject PyGen_Type; +PyObject * PyGen_New(struct _frame *); +int PyGen_NeedsFinalizing(PyGenObject *); +} +extern "C" { +typedef PyObject *(*getter)(PyObject *, void *); +typedef int (*setter)(PyObject *, PyObject *, void *); +typedef struct PyGetSetDef { + char *name; + getter get; + setter set; + char *doc; + void *closure; +} PyGetSetDef; +typedef PyObject *(*wrapperfunc)(PyObject *self, PyObject *args, + void *wrapped); +typedef PyObject *(*wrapperfunc_kwds)(PyObject *self, PyObject *args, + void *wrapped, PyObject *kwds); +struct wrapperbase { + char *name; + int offset; + void *function; + wrapperfunc wrapper; + char *doc; + int flags; + PyObject *name_strobj; +}; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; PyTypeObject *d_type; PyObject *d_name; +} PyDescrObject; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; PyTypeObject *d_type; PyObject *d_name; + PyMethodDef *d_method; +} PyMethodDescrObject; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; PyTypeObject *d_type; PyObject *d_name; + struct PyMemberDef *d_member; +} PyMemberDescrObject; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; PyTypeObject *d_type; PyObject *d_name; + PyGetSetDef *d_getset; +} PyGetSetDescrObject; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; PyTypeObject *d_type; PyObject *d_name; + struct wrapperbase *d_base; + void *d_wrapped; +} PyWrapperDescrObject; +extern PyTypeObject PyWrapperDescr_Type; +extern PyTypeObject PyDictProxy_Type; +extern PyTypeObject PyGetSetDescr_Type; +extern PyTypeObject PyMemberDescr_Type; +PyObject * PyDescr_NewMethod(PyTypeObject *, PyMethodDef *); +PyObject * PyDescr_NewClassMethod(PyTypeObject *, PyMethodDef *); +PyObject * PyDescr_NewMember(PyTypeObject *, + struct PyMemberDef *); +PyObject * PyDescr_NewGetSet(PyTypeObject *, + struct PyGetSetDef *); +PyObject * PyDescr_NewWrapper(PyTypeObject *, + struct wrapperbase *, void *); +PyObject * PyDictProxy_New(PyObject *); +PyObject * PyWrapper_New(PyObject *, PyObject *); +extern PyTypeObject PyProperty_Type; +} +extern "C" { +void _PyWarnings_Init(void); +int PyErr_WarnEx(PyObject *, const char *, Py_ssize_t); +int PyErr_WarnExplicit(PyObject *, const char *, const char *, int, + const char *, PyObject *); +} +extern "C" { +typedef struct _PyWeakReference PyWeakReference; +struct _PyWeakReference { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *wr_object; + PyObject *wr_callback; + long hash; + PyWeakReference *wr_prev; + PyWeakReference *wr_next; +}; +extern PyTypeObject _PyWeakref_RefType; +extern PyTypeObject _PyWeakref_ProxyType; +extern PyTypeObject _PyWeakref_CallableProxyType; +PyObject * PyWeakref_NewRef(PyObject *ob, + PyObject *callback); +PyObject * PyWeakref_NewProxy(PyObject *ob, + PyObject *callback); +PyObject * PyWeakref_GetObject(PyObject *ref); +Py_ssize_t _PyWeakref_GetWeakrefCount(PyWeakReference *head); +void _PyWeakref_ClearRef(PyWeakReference *self); +} +extern "C" { +int PyCodec_Register( + PyObject *search_function + ); +PyObject * _PyCodec_Lookup( + const char *encoding + ); +PyObject * PyCodec_Encode( + PyObject *object, + const char *encoding, + const char *errors + ); +PyObject * PyCodec_Decode( + PyObject *object, + const char *encoding, + const char *errors + ); +PyObject * PyCodec_Encoder( + const char *encoding + ); +PyObject * PyCodec_Decoder( + const char *encoding + ); +PyObject * PyCodec_IncrementalEncoder( + const char *encoding, + const char *errors + ); +PyObject * PyCodec_IncrementalDecoder( + const char *encoding, + const char *errors + ); +PyObject * PyCodec_StreamReader( + const char *encoding, + PyObject *stream, + const char *errors + ); +PyObject * PyCodec_StreamWriter( + const char *encoding, + PyObject *stream, + const char *errors + ); +int PyCodec_RegisterError(const char *name, PyObject *error); +PyObject * PyCodec_LookupError(const char *name); +PyObject * PyCodec_StrictErrors(PyObject *exc); +PyObject * PyCodec_IgnoreErrors(PyObject *exc); +PyObject * PyCodec_ReplaceErrors(PyObject *exc); +PyObject * PyCodec_XMLCharRefReplaceErrors(PyObject *exc); +PyObject * PyCodec_BackslashReplaceErrors(PyObject *exc); +} +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *dict; + PyObject *args; + PyObject *message; +} PyBaseExceptionObject; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *dict; + PyObject *args; + PyObject *message; + PyObject *msg; + PyObject *filename; + PyObject *lineno; + PyObject *offset; + PyObject *text; + PyObject *print_file_and_line; +} PySyntaxErrorObject; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *dict; + PyObject *args; + PyObject *message; + PyObject *encoding; + PyObject *object; + Py_ssize_t start; + Py_ssize_t end; + PyObject *reason; +} PyUnicodeErrorObject; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *dict; + PyObject *args; + PyObject *message; + PyObject *code; +} PySystemExitObject; +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + PyObject *dict; + PyObject *args; + PyObject *message; + PyObject *myerrno; + PyObject *strerror; + PyObject *filename; +} PyEnvironmentErrorObject; +void PyErr_SetNone(PyObject *); +void PyErr_SetObject(PyObject *, PyObject *); +void PyErr_SetString(PyObject *, const char *); +PyObject * PyErr_Occurred(void); +void PyErr_Clear(void); +void PyErr_Fetch(PyObject **, PyObject **, PyObject **); +void PyErr_Restore(PyObject *, PyObject *, PyObject *); +int PyErr_GivenExceptionMatches(PyObject *, PyObject *); +int PyErr_ExceptionMatches(PyObject *); +void PyErr_NormalizeException(PyObject**, PyObject**, PyObject**); +extern PyObject * PyExc_BaseException; +extern PyObject * PyExc_Exception; +extern PyObject * PyExc_StopIteration; +extern PyObject * PyExc_GeneratorExit; +extern PyObject * PyExc_StandardError; +extern PyObject * PyExc_ArithmeticError; +extern PyObject * PyExc_LookupError; +extern PyObject * PyExc_AssertionError; +extern PyObject * PyExc_AttributeError; +extern PyObject * PyExc_EOFError; +extern PyObject * PyExc_FloatingPointError; +extern PyObject * PyExc_EnvironmentError; +extern PyObject * PyExc_IOError; +extern PyObject * PyExc_OSError; +extern PyObject * PyExc_ImportError; +extern PyObject * PyExc_IndexError; +extern PyObject * PyExc_KeyError; +extern PyObject * PyExc_KeyboardInterrupt; +extern PyObject * PyExc_MemoryError; +extern PyObject * PyExc_NameError; +extern PyObject * PyExc_OverflowError; +extern PyObject * PyExc_RuntimeError; +extern PyObject * PyExc_NotImplementedError; +extern PyObject * PyExc_SyntaxError; +extern PyObject * PyExc_IndentationError; +extern PyObject * PyExc_TabError; +extern PyObject * PyExc_ReferenceError; +extern PyObject * PyExc_SystemError; +extern PyObject * PyExc_SystemExit; +extern PyObject * PyExc_TypeError; +extern PyObject * PyExc_UnboundLocalError; +extern PyObject * PyExc_UnicodeError; +extern PyObject * PyExc_UnicodeEncodeError; +extern PyObject * PyExc_UnicodeDecodeError; +extern PyObject * PyExc_UnicodeTranslateError; +extern PyObject * PyExc_ValueError; +extern PyObject * PyExc_ZeroDivisionError; +extern PyObject * PyExc_BufferError; +extern PyObject * PyExc_MemoryErrorInst; +extern PyObject * PyExc_RecursionErrorInst; +extern PyObject * PyExc_Warning; +extern PyObject * PyExc_UserWarning; +extern PyObject * PyExc_DeprecationWarning; +extern PyObject * PyExc_PendingDeprecationWarning; +extern PyObject * PyExc_SyntaxWarning; +extern PyObject * PyExc_RuntimeWarning; +extern PyObject * PyExc_FutureWarning; +extern PyObject * PyExc_ImportWarning; +extern PyObject * PyExc_UnicodeWarning; +extern PyObject * PyExc_BytesWarning; +int PyErr_BadArgument(void); +PyObject * PyErr_NoMemory(void); +PyObject * PyErr_SetFromErrno(PyObject *); +PyObject * PyErr_SetFromErrnoWithFilenameObject( + PyObject *, PyObject *); +PyObject * PyErr_SetFromErrnoWithFilename(PyObject *, char *); +PyObject * PyErr_Format(PyObject *, const char *, ...) + __attribute__((format(printf, 2, 3))); +void PyErr_BadInternalCall(void); +void _PyErr_BadInternalCall(char *filename, int lineno); +PyObject * PyErr_NewException(char *name, PyObject *base, + PyObject *dict); +void PyErr_WriteUnraisable(PyObject *); +int PyErr_CheckSignals(void); +void PyErr_SetInterrupt(void); +int PySignal_SetWakeupFd(int fd); +void PyErr_SyntaxLocation(const char *, int); +PyObject * PyErr_ProgramText(const char *, int); +PyObject * PyUnicodeDecodeError_Create( + const char *, const char *, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char *); +PyObject * PyUnicodeEncodeError_Create( + const char *, const Py_UNICODE *, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char *); +PyObject * PyUnicodeTranslateError_Create( + const Py_UNICODE *, Py_ssize_t, Py_ssize_t, Py_ssize_t, const char *); +PyObject * PyUnicodeEncodeError_GetEncoding(PyObject *); +PyObject * PyUnicodeDecodeError_GetEncoding(PyObject *); +PyObject * PyUnicodeEncodeError_GetObject(PyObject *); +PyObject * PyUnicodeDecodeError_GetObject(PyObject *); +PyObject * PyUnicodeTranslateError_GetObject(PyObject *); +int PyUnicodeEncodeError_GetStart(PyObject *, Py_ssize_t *); +int PyUnicodeDecodeError_GetStart(PyObject *, Py_ssize_t *); +int PyUnicodeTranslateError_GetStart(PyObject *, Py_ssize_t *); +int PyUnicodeEncodeError_SetStart(PyObject *, Py_ssize_t); +int PyUnicodeDecodeError_SetStart(PyObject *, Py_ssize_t); +int PyUnicodeTranslateError_SetStart(PyObject *, Py_ssize_t); +int PyUnicodeEncodeError_GetEnd(PyObject *, Py_ssize_t *); +int PyUnicodeDecodeError_GetEnd(PyObject *, Py_ssize_t *); +int PyUnicodeTranslateError_GetEnd(PyObject *, Py_ssize_t *); +int PyUnicodeEncodeError_SetEnd(PyObject *, Py_ssize_t); +int PyUnicodeDecodeError_SetEnd(PyObject *, Py_ssize_t); +int PyUnicodeTranslateError_SetEnd(PyObject *, Py_ssize_t); +PyObject * PyUnicodeEncodeError_GetReason(PyObject *); +PyObject * PyUnicodeDecodeError_GetReason(PyObject *); +PyObject * PyUnicodeTranslateError_GetReason(PyObject *); +int PyUnicodeEncodeError_SetReason( + PyObject *, const char *); +int PyUnicodeDecodeError_SetReason( + PyObject *, const char *); +int PyUnicodeTranslateError_SetReason( + PyObject *, const char *); +int PyOS_snprintf(char *str, size_t size, const char *format, ...) + __attribute__((format(printf, 3, 4))); +int PyOS_vsnprintf(char *str, size_t size, const char *format, va_list va) + __attribute__((format(printf, 3, 0))); +} +extern "C" { +struct _ts; +struct _is; +typedef struct _is { + struct _is *next; + struct _ts *tstate_head; + PyObject *modules; + PyObject *sysdict; + PyObject *builtins; + PyObject *modules_reloading; + PyObject *codec_search_path; + PyObject *codec_search_cache; + PyObject *codec_error_registry; + int dlopenflags; +} PyInterpreterState; +struct _frame; +typedef int (*Py_tracefunc)(PyObject *, struct _frame *, int, PyObject *); +typedef struct _ts { + struct _ts *next; + PyInterpreterState *interp; + struct _frame *frame; + int recursion_depth; + int tracing; + int use_tracing; + Py_tracefunc c_profilefunc; + Py_tracefunc c_tracefunc; + PyObject *c_profileobj; + PyObject *c_traceobj; + PyObject *curexc_type; + PyObject *curexc_value; + PyObject *curexc_traceback; + PyObject *exc_type; + PyObject *exc_value; + PyObject *exc_traceback; + PyObject *dict; + int tick_counter; + int gilstate_counter; + PyObject *async_exc; + long thread_id; +} PyThreadState; +PyInterpreterState * PyInterpreterState_New(void); +void PyInterpreterState_Clear(PyInterpreterState *); +void PyInterpreterState_Delete(PyInterpreterState *); +PyThreadState * PyThreadState_New(PyInterpreterState *); +PyThreadState * _PyThreadState_Prealloc(PyInterpreterState *); +void _PyThreadState_Init(PyThreadState *); +void PyThreadState_Clear(PyThreadState *); +void PyThreadState_Delete(PyThreadState *); +void PyThreadState_DeleteCurrent(void); +PyThreadState * PyThreadState_Get(void); +PyThreadState * PyThreadState_Swap(PyThreadState *); +PyObject * PyThreadState_GetDict(void); +int PyThreadState_SetAsyncExc(long, PyObject *); +extern PyThreadState * _PyThreadState_Current; +typedef + enum {PyGILState_LOCKED, PyGILState_UNLOCKED} + PyGILState_STATE; +PyGILState_STATE PyGILState_Ensure(void); +void PyGILState_Release(PyGILState_STATE); +PyThreadState * PyGILState_GetThisThreadState(void); +PyObject * _PyThread_CurrentFrames(void); +PyInterpreterState * PyInterpreterState_Head(void); +PyInterpreterState * PyInterpreterState_Next(PyInterpreterState *); +PyThreadState * PyInterpreterState_ThreadHead(PyInterpreterState *); +PyThreadState * PyThreadState_Next(PyThreadState *); +typedef struct _frame *(*PyThreadFrameGetter)(PyThreadState *self_); +extern PyThreadFrameGetter _PyThreadState_GetFrame; +} +extern "C" { + typedef struct _arena PyArena; + PyArena * PyArena_New(void); + void PyArena_Free(PyArena *); + void * PyArena_Malloc(PyArena *, size_t size); + int PyArena_AddPyObject(PyArena *, PyObject *); +} +extern "C" { +PyObject * _Py_VaBuildValue_SizeT(const char *, va_list); +int PyArg_Parse(PyObject *, const char *, ...); +int PyArg_ParseTuple(PyObject *, const char *, ...) ; +int PyArg_ParseTupleAndKeywords(PyObject *, PyObject *, + const char *, char **, ...); +int PyArg_UnpackTuple(PyObject *, const char *, Py_ssize_t, Py_ssize_t, ...); +PyObject * Py_BuildValue(const char *, ...); +PyObject * _Py_BuildValue_SizeT(const char *, ...); +int _PyArg_NoKeywords(const char *funcname, PyObject *kw); +int PyArg_VaParse(PyObject *, const char *, va_list); +int PyArg_VaParseTupleAndKeywords(PyObject *, PyObject *, + const char *, char **, va_list); +PyObject * Py_VaBuildValue(const char *, va_list); +int PyModule_AddObject(PyObject *, const char *, PyObject *); +int PyModule_AddIntConstant(PyObject *, const char *, long); +int PyModule_AddStringConstant(PyObject *, const char *, const char *); +PyObject * Py_InitModule4_64(const char *name, PyMethodDef *methods, + const char *doc, PyObject *self, + int apiver); +extern char * _Py_PackageContext; +} +extern "C" { +typedef struct { + int cf_flags; +} PyCompilerFlags; +void Py_SetProgramName(char *); +char * Py_GetProgramName(void); +void Py_SetPythonHome(char *); +char * Py_GetPythonHome(void); +void Py_Initialize(void); +void Py_InitializeEx(int); +void Py_Finalize(void); +int Py_IsInitialized(void); +PyThreadState * Py_NewInterpreter(void); +void Py_EndInterpreter(PyThreadState *); +int PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *); +int PyRun_AnyFileExFlags(FILE *, const char *, int, PyCompilerFlags *); +int PyRun_SimpleStringFlags(const char *, PyCompilerFlags *); +int PyRun_SimpleFileExFlags(FILE *, const char *, int, PyCompilerFlags *); +int PyRun_InteractiveOneFlags(FILE *, const char *, PyCompilerFlags *); +int PyRun_InteractiveLoopFlags(FILE *, const char *, PyCompilerFlags *); +struct _mod * PyParser_ASTFromString(const char *, const char *, + int, PyCompilerFlags *flags, + PyArena *); +struct _mod * PyParser_ASTFromFile(FILE *, const char *, int, + char *, char *, + PyCompilerFlags *, int *, + PyArena *); +struct _node * PyParser_SimpleParseStringFlags(const char *, int, + int); +struct _node * PyParser_SimpleParseFileFlags(FILE *, const char *, + int, int); +PyObject * PyRun_StringFlags(const char *, int, PyObject *, + PyObject *, PyCompilerFlags *); +PyObject * PyRun_FileExFlags(FILE *, const char *, int, + PyObject *, PyObject *, int, + PyCompilerFlags *); +PyObject * Py_CompileStringFlags(const char *, const char *, int, + PyCompilerFlags *); +struct symtable * Py_SymtableString(const char *, const char *, int); +void PyErr_Print(void); +void PyErr_PrintEx(int); +void PyErr_Display(PyObject *, PyObject *, PyObject *); +int Py_AtExit(void (*func)(void)); +void Py_Exit(int); +int Py_FdIsInteractive(FILE *, const char *); +int Py_Main(int argc, char **argv); +char * Py_GetProgramFullPath(void); +char * Py_GetPrefix(void); +char * Py_GetExecPrefix(void); +char * Py_GetPath(void); +const char * Py_GetVersion(void); +const char * Py_GetPlatform(void); +const char * Py_GetCopyright(void); +const char * Py_GetCompiler(void); +const char * Py_GetBuildInfo(void); +const char * _Py_svnversion(void); +const char * Py_SubversionRevision(void); +const char * Py_SubversionShortBranch(void); +PyObject * _PyBuiltin_Init(void); +PyObject * _PySys_Init(void); +void _PyImport_Init(void); +void _PyExc_Init(void); +void _PyImportHooks_Init(void); +int _PyFrame_Init(void); +int _PyInt_Init(void); +void _PyFloat_Init(void); +int PyByteArray_Init(void); +void _PyExc_Fini(void); +void _PyImport_Fini(void); +void PyMethod_Fini(void); +void PyFrame_Fini(void); +void PyCFunction_Fini(void); +void PyDict_Fini(void); +void PyTuple_Fini(void); +void PyList_Fini(void); +void PySet_Fini(void); +void PyString_Fini(void); +void PyInt_Fini(void); +void PyFloat_Fini(void); +void PyOS_FiniInterrupts(void); +void PyByteArray_Fini(void); +char * PyOS_Readline(FILE *, FILE *, char *); +extern int (*PyOS_InputHook)(void); +extern char *(*PyOS_ReadlineFunctionPointer)(FILE *, FILE *, char *); +extern PyThreadState* _PyOS_ReadlineTState; +typedef void (*PyOS_sighandler_t)(int); +PyOS_sighandler_t PyOS_getsig(int); +PyOS_sighandler_t PyOS_setsig(int, PyOS_sighandler_t); +} +extern "C" { +PyObject * PyEval_CallObjectWithKeywords( + PyObject *, PyObject *, PyObject *); +PyObject * PyEval_CallObject(PyObject *, PyObject *); +PyObject * PyEval_CallFunction(PyObject *obj, + const char *format, ...); +PyObject * PyEval_CallMethod(PyObject *obj, + const char *methodname, + const char *format, ...); +void PyEval_SetProfile(Py_tracefunc, PyObject *); +void PyEval_SetTrace(Py_tracefunc, PyObject *); +struct _frame; +PyObject * PyEval_GetBuiltins(void); +PyObject * PyEval_GetGlobals(void); +PyObject * PyEval_GetLocals(void); +struct _frame * PyEval_GetFrame(void); +int PyEval_GetRestricted(void); +int PyEval_MergeCompilerFlags(PyCompilerFlags *cf); +int Py_FlushLine(void); +int Py_AddPendingCall(int (*func)(void *), void *arg); +int Py_MakePendingCalls(void); +void Py_SetRecursionLimit(int); +int Py_GetRecursionLimit(void); +int _Py_CheckRecursiveCall(char *where); +extern int _Py_CheckRecursionLimit; +const char * PyEval_GetFuncName(PyObject *); +const char * PyEval_GetFuncDesc(PyObject *); +PyObject * PyEval_GetCallStats(PyObject *); +PyObject * PyEval_EvalFrame(struct _frame *); +PyObject * PyEval_EvalFrameEx(struct _frame *f, int exc); +extern volatile int _Py_Ticker; +extern int _Py_CheckInterval; +PyThreadState * PyEval_SaveThread(void); +void PyEval_RestoreThread(PyThreadState *); +int PyEval_ThreadsInitialized(void); +void PyEval_InitThreads(void); +void PyEval_AcquireLock(void); +void PyEval_ReleaseLock(void); +void PyEval_AcquireThread(PyThreadState *tstate); +void PyEval_ReleaseThread(PyThreadState *tstate); +void PyEval_ReInitThreads(void); +int _PyEval_SliceIndex(PyObject *, Py_ssize_t *); +} +extern "C" { +PyObject * PySys_GetObject(char *); +int PySys_SetObject(char *, PyObject *); +FILE * PySys_GetFile(char *, FILE *); +void PySys_SetArgv(int, char **); +void PySys_SetArgvEx(int, char **, int); +void PySys_SetPath(char *); +void PySys_WriteStdout(const char *format, ...) + __attribute__((format(printf, 1, 2))); +void PySys_WriteStderr(const char *format, ...) + __attribute__((format(printf, 1, 2))); +extern PyObject * _PySys_TraceFunc, *_PySys_ProfileFunc; +extern int _PySys_CheckInterval; +void PySys_ResetWarnOptions(void); +void PySys_AddWarnOption(char *); +int PySys_HasWarnOptions(void); +} +extern "C" { +int PyOS_InterruptOccurred(void); +void PyOS_InitInterrupts(void); +void PyOS_AfterFork(void); +} +extern "C" { +long PyImport_GetMagicNumber(void); +PyObject * PyImport_ExecCodeModule(char *name, PyObject *co); +PyObject * PyImport_ExecCodeModuleEx( + char *name, PyObject *co, char *pathname); +PyObject * PyImport_GetModuleDict(void); +PyObject * PyImport_AddModule(const char *name); +PyObject * PyImport_ImportModule(const char *name); +PyObject * PyImport_ImportModuleNoBlock(const char *); +PyObject * PyImport_ImportModuleLevel(char *name, + PyObject *globals, PyObject *locals, PyObject *fromlist, int level); +PyObject * PyImport_GetImporter(PyObject *path); +PyObject * PyImport_Import(PyObject *name); +PyObject * PyImport_ReloadModule(PyObject *m); +void PyImport_Cleanup(void); +int PyImport_ImportFrozenModule(char *); +void _PyImport_AcquireLock(void); +int _PyImport_ReleaseLock(void); +struct filedescr * _PyImport_FindModule( + const char *, PyObject *, char *, size_t, FILE **, PyObject **); +int _PyImport_IsScript(struct filedescr *); +void _PyImport_ReInitLock(void); +PyObject *_PyImport_FindExtension(char *, char *); +PyObject *_PyImport_FixupExtension(char *, char *); +struct _inittab { + char *name; + void (*initfunc)(void); +}; +extern PyTypeObject PyNullImporter_Type; +extern struct _inittab * PyImport_Inittab; +int PyImport_AppendInittab(char *name, void (*initfunc)(void)); +int PyImport_ExtendInittab(struct _inittab *newtab); +struct _frozen { + char *name; + unsigned char *code; + int size; +}; +extern struct _frozen * PyImport_FrozenModules; +} +extern "C" { + int PyObject_Cmp(PyObject *o1, PyObject *o2, int *result); + PyObject * PyObject_Call(PyObject *callable_object, + PyObject *args, PyObject *kw); + PyObject * PyObject_CallObject(PyObject *callable_object, + PyObject *args); + PyObject * PyObject_CallFunction(PyObject *callable_object, + char *format, ...); + PyObject * PyObject_CallMethod(PyObject *o, char *m, + char *format, ...); + PyObject * _PyObject_CallFunction_SizeT(PyObject *callable, + char *format, ...); + PyObject * _PyObject_CallMethod_SizeT(PyObject *o, + char *name, + char *format, ...); + PyObject * PyObject_CallFunctionObjArgs(PyObject *callable, + ...); + PyObject * PyObject_CallMethodObjArgs(PyObject *o, + PyObject *m, ...); + PyObject * PyObject_Type(PyObject *o); + Py_ssize_t PyObject_Size(PyObject *o); + Py_ssize_t PyObject_Length(PyObject *o); + Py_ssize_t _PyObject_LengthHint(PyObject *o, Py_ssize_t); + PyObject * PyObject_GetItem(PyObject *o, PyObject *key); + int PyObject_SetItem(PyObject *o, PyObject *key, PyObject *v); + int PyObject_DelItemString(PyObject *o, char *key); + int PyObject_DelItem(PyObject *o, PyObject *key); + int PyObject_AsCharBuffer(PyObject *obj, + const char **buffer, + Py_ssize_t *buffer_len); + int PyObject_CheckReadBuffer(PyObject *obj); + int PyObject_AsReadBuffer(PyObject *obj, + const void **buffer, + Py_ssize_t *buffer_len); + int PyObject_AsWriteBuffer(PyObject *obj, + void **buffer, + Py_ssize_t *buffer_len); + int PyObject_GetBuffer(PyObject *obj, Py_buffer *view, + int flags); + void * PyBuffer_GetPointer(Py_buffer *view, Py_ssize_t *indices); + int PyBuffer_SizeFromFormat(const char *); + int PyBuffer_ToContiguous(void *buf, Py_buffer *view, + Py_ssize_t len, char fort); + int PyBuffer_FromContiguous(Py_buffer *view, void *buf, + Py_ssize_t len, char fort); + int PyObject_CopyData(PyObject *dest, PyObject *src); + int PyBuffer_IsContiguous(Py_buffer *view, char fort); + void PyBuffer_FillContiguousStrides(int ndims, + Py_ssize_t *shape, + Py_ssize_t *strides, + int itemsize, + char fort); + int PyBuffer_FillInfo(Py_buffer *view, PyObject *o, void *buf, + Py_ssize_t len, int readonly, + int flags); + void PyBuffer_Release(Py_buffer *view); + PyObject * PyObject_Format(PyObject* obj, + PyObject *format_spec); + PyObject * PyObject_GetIter(PyObject *); + PyObject * PyIter_Next(PyObject *); + int PyNumber_Check(PyObject *o); + PyObject * PyNumber_Add(PyObject *o1, PyObject *o2); + PyObject * PyNumber_Subtract(PyObject *o1, PyObject *o2); + PyObject * PyNumber_Multiply(PyObject *o1, PyObject *o2); + PyObject * PyNumber_Divide(PyObject *o1, PyObject *o2); + PyObject * PyNumber_FloorDivide(PyObject *o1, PyObject *o2); + PyObject * PyNumber_TrueDivide(PyObject *o1, PyObject *o2); + PyObject * PyNumber_Remainder(PyObject *o1, PyObject *o2); + PyObject * PyNumber_Divmod(PyObject *o1, PyObject *o2); + PyObject * PyNumber_Power(PyObject *o1, PyObject *o2, + PyObject *o3); + PyObject * PyNumber_Negative(PyObject *o); + PyObject * PyNumber_Positive(PyObject *o); + PyObject * PyNumber_Absolute(PyObject *o); + PyObject * PyNumber_Invert(PyObject *o); + PyObject * PyNumber_Lshift(PyObject *o1, PyObject *o2); + PyObject * PyNumber_Rshift(PyObject *o1, PyObject *o2); + PyObject * PyNumber_And(PyObject *o1, PyObject *o2); + PyObject * PyNumber_Xor(PyObject *o1, PyObject *o2); + PyObject * PyNumber_Or(PyObject *o1, PyObject *o2); + PyObject * PyNumber_Index(PyObject *o); + Py_ssize_t PyNumber_AsSsize_t(PyObject *o, PyObject *exc); + PyObject * _PyNumber_ConvertIntegralToInt( + PyObject *integral, + const char* error_format); + PyObject * PyNumber_Int(PyObject *o); + PyObject * PyNumber_Long(PyObject *o); + PyObject * PyNumber_Float(PyObject *o); + PyObject * PyNumber_InPlaceAdd(PyObject *o1, PyObject *o2); + PyObject * PyNumber_InPlaceSubtract(PyObject *o1, PyObject *o2); + PyObject * PyNumber_InPlaceMultiply(PyObject *o1, PyObject *o2); + PyObject * PyNumber_InPlaceDivide(PyObject *o1, PyObject *o2); + PyObject * PyNumber_InPlaceFloorDivide(PyObject *o1, + PyObject *o2); + PyObject * PyNumber_InPlaceTrueDivide(PyObject *o1, + PyObject *o2); + PyObject * PyNumber_InPlaceRemainder(PyObject *o1, PyObject *o2); + PyObject * PyNumber_InPlacePower(PyObject *o1, PyObject *o2, + PyObject *o3); + PyObject * PyNumber_InPlaceLshift(PyObject *o1, PyObject *o2); + PyObject * PyNumber_InPlaceRshift(PyObject *o1, PyObject *o2); + PyObject * PyNumber_InPlaceAnd(PyObject *o1, PyObject *o2); + PyObject * PyNumber_InPlaceXor(PyObject *o1, PyObject *o2); + PyObject * PyNumber_InPlaceOr(PyObject *o1, PyObject *o2); + PyObject * PyNumber_ToBase(PyObject *n, int base); + int PySequence_Check(PyObject *o); + Py_ssize_t PySequence_Size(PyObject *o); + Py_ssize_t PySequence_Length(PyObject *o); + PyObject * PySequence_Concat(PyObject *o1, PyObject *o2); + PyObject * PySequence_Repeat(PyObject *o, Py_ssize_t count); + PyObject * PySequence_GetItem(PyObject *o, Py_ssize_t i); + PyObject * PySequence_GetSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2); + int PySequence_SetItem(PyObject *o, Py_ssize_t i, PyObject *v); + int PySequence_DelItem(PyObject *o, Py_ssize_t i); + int PySequence_SetSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2, + PyObject *v); + int PySequence_DelSlice(PyObject *o, Py_ssize_t i1, Py_ssize_t i2); + PyObject * PySequence_Tuple(PyObject *o); + PyObject * PySequence_List(PyObject *o); + PyObject * PySequence_Fast(PyObject *o, const char* m); + Py_ssize_t PySequence_Count(PyObject *o, PyObject *value); + int PySequence_Contains(PyObject *seq, PyObject *ob); + Py_ssize_t _PySequence_IterSearch(PyObject *seq, + PyObject *obj, int operation); + int PySequence_In(PyObject *o, PyObject *value); + Py_ssize_t PySequence_Index(PyObject *o, PyObject *value); + PyObject * PySequence_InPlaceConcat(PyObject *o1, PyObject *o2); + PyObject * PySequence_InPlaceRepeat(PyObject *o, Py_ssize_t count); + int PyMapping_Check(PyObject *o); + Py_ssize_t PyMapping_Size(PyObject *o); + Py_ssize_t PyMapping_Length(PyObject *o); + int PyMapping_HasKeyString(PyObject *o, char *key); + int PyMapping_HasKey(PyObject *o, PyObject *key); + PyObject * PyMapping_GetItemString(PyObject *o, char *key); + int PyMapping_SetItemString(PyObject *o, char *key, + PyObject *value); +int PyObject_IsInstance(PyObject *object, PyObject *typeorclass); +int PyObject_IsSubclass(PyObject *object, PyObject *typeorclass); +int _PyObject_RealIsInstance(PyObject *inst, PyObject *cls); +int _PyObject_RealIsSubclass(PyObject *derived, PyObject *cls); +} +extern "C" { +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + int co_argcount; + int co_nlocals; + int co_stacksize; + int co_flags; + PyObject *co_code; + PyObject *co_consts; + PyObject *co_names; + PyObject *co_varnames; + PyObject *co_freevars; + PyObject *co_cellvars; + PyObject *co_filename; + PyObject *co_name; + int co_firstlineno; + PyObject *co_lnotab; + void *co_zombieframe; +} PyCodeObject; +extern PyTypeObject PyCode_Type; +PyCodeObject * PyCode_New( + int, int, int, int, PyObject *, PyObject *, PyObject *, PyObject *, + PyObject *, PyObject *, PyObject *, PyObject *, int, PyObject *); +int PyCode_Addr2Line(PyCodeObject *, int); +typedef struct _addr_pair { + int ap_lower; + int ap_upper; +} PyAddrPair; +int PyCode_CheckLineNumber(PyCodeObject* co, + int lasti, PyAddrPair *bounds); +PyObject* PyCode_Optimize(PyObject *code, PyObject* consts, + PyObject *names, PyObject *lineno_obj); +} +extern "C" { +struct _node; +PyCodeObject * PyNode_Compile(struct _node *, const char *); +typedef struct { + int ff_features; + int ff_lineno; +} PyFutureFeatures; +struct _mod; +PyCodeObject * PyAST_Compile(struct _mod *, const char *, + PyCompilerFlags *, PyArena *); +PyFutureFeatures * PyFuture_FromAST(struct _mod *, const char *); +} +extern "C" { +PyObject * PyEval_EvalCode(PyCodeObject *, PyObject *, PyObject *); +PyObject * PyEval_EvalCodeEx(PyCodeObject *co, + PyObject *globals, + PyObject *locals, + PyObject **args, int argc, + PyObject **kwds, int kwdc, + PyObject **defs, int defc, + PyObject *closure); +PyObject * _PyEval_CallTracing(PyObject *func, PyObject *args); +} +extern "C" { +double PyOS_ascii_strtod(const char *str, char **ptr); +double PyOS_ascii_atof(const char *str); +char * PyOS_ascii_formatd(char *buffer, size_t buf_len, const char *format, double d); +} +extern "C" { +int PyOS_mystrnicmp(const char *, const char *, Py_ssize_t); +int PyOS_mystricmp(const char *, const char *); +} +PyObject* _Py_Mangle(PyObject *p, PyObject *name); +extern "C" { +extern "C" { +extern int __sigismember (__const __sigset_t *, int); +extern int __sigaddset (__sigset_t *, int); +extern int __sigdelset (__sigset_t *, int); +typedef __sig_atomic_t sig_atomic_t; +typedef union sigval + { + int sival_int; + void *sival_ptr; + } sigval_t; +typedef struct siginfo + { + int si_signo; + int si_errno; + int si_code; + union + { + int _pad[((128 / sizeof (int)) - 4)]; + struct + { + __pid_t si_pid; + __uid_t si_uid; + } _kill; + struct + { + int si_tid; + int si_overrun; + sigval_t si_sigval; + } _timer; + struct + { + __pid_t si_pid; + __uid_t si_uid; + sigval_t si_sigval; + } _rt; + struct + { + __pid_t si_pid; + __uid_t si_uid; + int si_status; + __clock_t si_utime; + __clock_t si_stime; + } _sigchld; + struct + { + void *si_addr; + } _sigfault; + struct + { + long int si_band; + int si_fd; + } _sigpoll; + } _sifields; + } siginfo_t; +enum +{ + SI_ASYNCNL = -60, + SI_TKILL = -6, + SI_SIGIO, + SI_ASYNCIO, + SI_MESGQ, + SI_TIMER, + SI_QUEUE, + SI_USER, + SI_KERNEL = 0x80 +}; +enum +{ + ILL_ILLOPC = 1, + ILL_ILLOPN, + ILL_ILLADR, + ILL_ILLTRP, + ILL_PRVOPC, + ILL_PRVREG, + ILL_COPROC, + ILL_BADSTK +}; +enum +{ + FPE_INTDIV = 1, + FPE_INTOVF, + FPE_FLTDIV, + FPE_FLTOVF, + FPE_FLTUND, + FPE_FLTRES, + FPE_FLTINV, + FPE_FLTSUB +}; +enum +{ + SEGV_MAPERR = 1, + SEGV_ACCERR +}; +enum +{ + BUS_ADRALN = 1, + BUS_ADRERR, + BUS_OBJERR +}; +enum +{ + TRAP_BRKPT = 1, + TRAP_TRACE +}; +enum +{ + CLD_EXITED = 1, + CLD_KILLED, + CLD_DUMPED, + CLD_TRAPPED, + CLD_STOPPED, + CLD_CONTINUED +}; +enum +{ + POLL_IN = 1, + POLL_OUT, + POLL_MSG, + POLL_ERR, + POLL_PRI, + POLL_HUP +}; +typedef struct sigevent + { + sigval_t sigev_value; + int sigev_signo; + int sigev_notify; + union + { + int _pad[((64 / sizeof (int)) - 4)]; + __pid_t _tid; + struct + { + void (*_function) (sigval_t); + void *_attribute; + } _sigev_thread; + } _sigev_un; + } sigevent_t; +enum +{ + SIGEV_SIGNAL = 0, + SIGEV_NONE, + SIGEV_THREAD, + SIGEV_THREAD_ID = 4 +}; +typedef void (*__sighandler_t) (int); +extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) + throw (); +extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler) + throw (); +extern __sighandler_t signal (int __sig, __sighandler_t __handler) + throw (); +extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler) + throw (); +extern int kill (__pid_t __pid, int __sig) throw (); +extern int killpg (__pid_t __pgrp, int __sig) throw (); +extern int raise (int __sig) throw (); +extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) + throw (); +extern int gsignal (int __sig) throw (); +extern void psignal (int __sig, __const char *__s); +extern void psiginfo (__const siginfo_t *__pinfo, __const char *__s); +extern int __sigpause (int __sig_or_mask, int __is_sig); +extern int sigpause (int __sig) __asm__ ("__xpg_sigpause"); +extern int sigblock (int __mask) throw () __attribute__ ((__deprecated__)); +extern int sigsetmask (int __mask) throw () __attribute__ ((__deprecated__)); +extern int siggetmask (void) throw () __attribute__ ((__deprecated__)); +typedef __sighandler_t sighandler_t; +typedef __sighandler_t sig_t; +extern int sigemptyset (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); +extern int sigfillset (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); +extern int sigaddset (sigset_t *__set, int __signo) throw () __attribute__ ((__nonnull__ (1))); +extern int sigdelset (sigset_t *__set, int __signo) throw () __attribute__ ((__nonnull__ (1))); +extern int sigismember (__const sigset_t *__set, int __signo) + throw () __attribute__ ((__nonnull__ (1))); +extern int sigisemptyset (__const sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); +extern int sigandset (sigset_t *__set, __const sigset_t *__left, + __const sigset_t *__right) throw () __attribute__ ((__nonnull__ (1, 2, 3))); +extern int sigorset (sigset_t *__set, __const sigset_t *__left, + __const sigset_t *__right) throw () __attribute__ ((__nonnull__ (1, 2, 3))); +struct sigaction + { + union + { + __sighandler_t sa_handler; + void (*sa_sigaction) (int, siginfo_t *, void *); + } + __sigaction_handler; + __sigset_t sa_mask; + int sa_flags; + void (*sa_restorer) (void); + }; +extern int sigprocmask (int __how, __const sigset_t *__restrict __set, + sigset_t *__restrict __oset) throw (); +extern int sigsuspend (__const sigset_t *__set) __attribute__ ((__nonnull__ (1))); +extern int sigaction (int __sig, __const struct sigaction *__restrict __act, + struct sigaction *__restrict __oact) throw (); +extern int sigpending (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); +extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig) + __attribute__ ((__nonnull__ (1, 2))); +extern int sigwaitinfo (__const sigset_t *__restrict __set, + siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1))); +extern int sigtimedwait (__const sigset_t *__restrict __set, + siginfo_t *__restrict __info, + __const struct timespec *__restrict __timeout) + __attribute__ ((__nonnull__ (1))); +extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val) + throw (); +extern __const char *__const _sys_siglist[65]; +extern __const char *__const sys_siglist[65]; +struct sigvec + { + __sighandler_t sv_handler; + int sv_mask; + int sv_flags; + }; +extern int sigvec (int __sig, __const struct sigvec *__vec, + struct sigvec *__ovec) throw (); +struct _fpreg +{ + unsigned short significand[4]; + unsigned short exponent; +}; +struct _fpxreg +{ + unsigned short significand[4]; + unsigned short exponent; + unsigned short padding[3]; +}; +struct _xmmreg +{ + __uint32_t element[4]; +}; +struct _fpstate +{ + __uint16_t cwd; + __uint16_t swd; + __uint16_t ftw; + __uint16_t fop; + __uint64_t rip; + __uint64_t rdp; + __uint32_t mxcsr; + __uint32_t mxcr_mask; + struct _fpxreg _st[8]; + struct _xmmreg _xmm[16]; + __uint32_t padding[24]; +}; +struct sigcontext +{ + unsigned long r8; + unsigned long r9; + unsigned long r10; + unsigned long r11; + unsigned long r12; + unsigned long r13; + unsigned long r14; + unsigned long r15; + unsigned long rdi; + unsigned long rsi; + unsigned long rbp; + unsigned long rbx; + unsigned long rdx; + unsigned long rax; + unsigned long rcx; + unsigned long rsp; + unsigned long rip; + unsigned long eflags; + unsigned short cs; + unsigned short gs; + unsigned short fs; + unsigned short __pad0; + unsigned long err; + unsigned long trapno; + unsigned long oldmask; + unsigned long cr2; + struct _fpstate * fpstate; + unsigned long __reserved1 [8]; +}; +extern int sigreturn (struct sigcontext *__scp) throw (); +extern int siginterrupt (int __sig, int __interrupt) throw (); +struct sigstack + { + void *ss_sp; + int ss_onstack; + }; +enum +{ + SS_ONSTACK = 1, + SS_DISABLE +}; +typedef struct sigaltstack + { + void *ss_sp; + int ss_flags; + size_t ss_size; + } stack_t; +typedef long int greg_t; +typedef greg_t gregset_t[23]; +enum +{ + REG_R8 = 0, + REG_R9, + REG_R10, + REG_R11, + REG_R12, + REG_R13, + REG_R14, + REG_R15, + REG_RDI, + REG_RSI, + REG_RBP, + REG_RBX, + REG_RDX, + REG_RAX, + REG_RCX, + REG_RSP, + REG_RIP, + REG_EFL, + REG_CSGSFS, + REG_ERR, + REG_TRAPNO, + REG_OLDMASK, + REG_CR2 +}; +struct _libc_fpxreg +{ + unsigned short int significand[4]; + unsigned short int exponent; + unsigned short int padding[3]; +}; +struct _libc_xmmreg +{ + __uint32_t element[4]; +}; +struct _libc_fpstate +{ + __uint16_t cwd; + __uint16_t swd; + __uint16_t ftw; + __uint16_t fop; + __uint64_t rip; + __uint64_t rdp; + __uint32_t mxcsr; + __uint32_t mxcr_mask; + struct _libc_fpxreg _st[8]; + struct _libc_xmmreg _xmm[16]; + __uint32_t padding[24]; +}; +typedef struct _libc_fpstate *fpregset_t; +typedef struct + { + gregset_t gregs; + fpregset_t fpregs; + unsigned long __reserved1 [8]; +} mcontext_t; +typedef struct ucontext + { + unsigned long int uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + __sigset_t uc_sigmask; + struct _libc_fpstate __fpregs_mem; + } ucontext_t; +extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) + throw () __attribute__ ((__deprecated__)); +extern int sigaltstack (__const struct sigaltstack *__restrict __ss, + struct sigaltstack *__restrict __oss) throw (); +extern int sighold (int __sig) throw (); +extern int sigrelse (int __sig) throw (); +extern int sigignore (int __sig) throw (); +extern __sighandler_t sigset (int __sig, __sighandler_t __disp) throw (); +extern int pthread_sigmask (int __how, + __const __sigset_t *__restrict __newmask, + __sigset_t *__restrict __oldmask)throw (); +extern int pthread_kill (pthread_t __threadid, int __signo) throw (); +extern int pthread_sigqueue (pthread_t __threadid, int __signo, + const union sigval __value) throw (); +extern int __libc_current_sigrtmin (void) throw (); +extern int __libc_current_sigrtmax (void) throw (); +} +extern "C" { +typedef long int __jmp_buf[8]; +struct __jmp_buf_tag + { + __jmp_buf __jmpbuf; + int __mask_was_saved; + __sigset_t __saved_mask; + }; +typedef struct __jmp_buf_tag jmp_buf[1]; +extern int setjmp (jmp_buf __env) throw (); +extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) throw (); +extern int _setjmp (struct __jmp_buf_tag __env[1]) throw (); +extern void longjmp (struct __jmp_buf_tag __env[1], int __val) + throw () __attribute__ ((__noreturn__)); +extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) + throw () __attribute__ ((__noreturn__)); +typedef struct __jmp_buf_tag sigjmp_buf[1]; +extern void siglongjmp (sigjmp_buf __env, int __val) + throw () __attribute__ ((__noreturn__)); +} +extern jmp_buf PyFPE_jbuf; +extern int PyFPE_counter; +extern double PyFPE_dummy(void *); +} +extern "C" { +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); +typedef struct swig_type_info { + const char *name; + const char *str; + swig_dycast_func dcast; + struct swig_cast_info *cast; + void *clientdata; + int owndata; +} swig_type_info; +typedef struct swig_cast_info { + swig_type_info *type; + swig_converter_func converter; + struct swig_cast_info *next; + struct swig_cast_info *prev; +} swig_cast_info; +typedef struct swig_module_info { + swig_type_info **types; + size_t size; + struct swig_module_info *next; + swig_type_info **type_initial; + swig_cast_info **cast_initial; + void *clientdata; +} swig_module_info; +static __attribute__ ((__unused__)) int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (int)((l1 - f1) - (l2 - f2)); +} +static __attribute__ ((__unused__)) int +SWIG_TypeEquiv(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; +} +static __attribute__ ((__unused__)) int +SWIG_TypeCompare(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; +} +static __attribute__ ((__unused__)) swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} +static __attribute__ ((__unused__)) swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} +static __attribute__ ((__unused__)) inline void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} +static __attribute__ ((__unused__)) swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} +static __attribute__ ((__unused__)) inline const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} +static __attribute__ ((__unused__)) const char * +SWIG_TypePrettyName(const swig_type_info *type) { + if (!type) return __null; + if (type->str != __null) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} +static __attribute__ ((__unused__)) void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + ti->clientdata = clientdata; + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +static __attribute__ ((__unused__)) void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} +static __attribute__ ((__unused__)) swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + register size_t l = 0; + register size_t r = iter->size - 1; + do { + register size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + register int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} +static __attribute__ ((__unused__)) swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + swig_module_info *iter = start; + do { + register size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + return 0; +} +static __attribute__ ((__unused__)) char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + register const unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + register unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} +static __attribute__ ((__unused__)) const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + register unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + register char d = *(c++); + register unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = ((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = ((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} +static __attribute__ ((__unused__)) char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} +static __attribute__ ((__unused__)) const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} +static __attribute__ ((__unused__)) char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} +static __attribute__ ((__unused__)) const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} +} +static __attribute__ ((__unused__)) char* +SWIG_Python_str_AsChar(PyObject *str) +{ + return PyString_AsString(str); +} +static __attribute__ ((__unused__)) PyObject* +SWIG_Python_str_FromChar(const char *c) +{ + return PyString_FromString(c); +} +static __attribute__ ((__unused__)) PyObject* +SWIG_Python_ErrorType(int code) { + PyObject* type = 0; + switch(code) { + case -12: + type = PyExc_MemoryError; + break; + case -2: + type = PyExc_IOError; + break; + case -3: + type = PyExc_RuntimeError; + break; + case -4: + type = PyExc_IndexError; + break; + case -5: + type = PyExc_TypeError; + break; + case -6: + type = PyExc_ZeroDivisionError; + break; + case -7: + type = PyExc_OverflowError; + break; + case -8: + type = PyExc_SyntaxError; + break; + case -9: + type = PyExc_ValueError; + break; + case -10: + type = PyExc_SystemError; + break; + case -11: + type = PyExc_AttributeError; + break; + default: + type = PyExc_RuntimeError; + } + return type; +} +static __attribute__ ((__unused__)) void +SWIG_Python_AddErrorMsg(const char* mesg) +{ + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); + if (value) { + char *tmp; + PyObject *old_str = PyObject_Str(value); + PyErr_Clear(); + if ((type) == __null) ; else ( ((PyObject*)(type))->ob_refcnt++); + PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); + ; + if ( --((PyObject*)(old_str))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(old_str)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(old_str)))); + if ( --((PyObject*)(value))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(value)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(value)))); + } else { + PyErr_SetString(PyExc_RuntimeError, mesg); + } +} + class SWIG_Python_Thread_Block { + bool status; + PyGILState_STATE state; + public: + void end() { if (status) { PyGILState_Release(state); status = false;} } + SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} + ~SWIG_Python_Thread_Block() { end(); } + }; + class SWIG_Python_Thread_Allow { + bool status; + PyThreadState *save; + public: + void end() { if (status) { PyEval_RestoreThread(save); status = false; }} + SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} + ~SWIG_Python_Thread_Allow() { end(); } + }; +extern "C" { +typedef struct swig_const_info { + int type; + char *name; + long lvalue; + double dvalue; + void *pvalue; + swig_type_info **ptype; +} swig_const_info; +static __attribute__ ((__unused__)) PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func) +{ + return __null; +} +} +static __attribute__ ((__unused__)) void +SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { + SWIG_Python_Thread_Block _swig_thread_block; + PyErr_SetObject(errtype, obj); + if ( --((PyObject*)(obj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(obj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(obj)))); + _swig_thread_block.end(); +} +static __attribute__ ((__unused__)) void +SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { + SWIG_Python_Thread_Block _swig_thread_block; + PyErr_SetString(errtype, (char *) msg); + _swig_thread_block.end(); +} +static __attribute__ ((__unused__)) void +SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { + PyDict_SetItemString(d, (char*) name, obj); + if ( --((PyObject*)(obj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(obj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(obj)))); +} +static __attribute__ ((__unused__)) PyObject* +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { + if (!result) { + result = obj; + } else if (result == (&_Py_NoneStruct)) { + if ( --((PyObject*)(result))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(result)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(result)))); + result = obj; + } else { + if (!((((((PyObject*)(result))->ob_type))->tp_flags & ((1L<<25))) != 0)) { + PyObject *o2 = result; + result = PyList_New(1); + PyList_SetItem(result, 0, o2); + } + PyList_Append(result,obj); + if ( --((PyObject*)(obj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(obj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(obj)))); + } + return result; +} +static __attribute__ ((__unused__)) int +SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) +{ + if (!args) { + if (!min && !max) { + return 1; + } else { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", + name, (min == max ? "" : "at least "), (int)min); + return 0; + } + } + if (!((((((PyObject*)(args))->ob_type))->tp_flags & ((1L<<26))) != 0)) { + PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); + return 0; + } else { + register Py_ssize_t l = (((PyVarObject*)(args))->ob_size); + if (l < min) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at least "), (int)min, (int)l); + return 0; + } else if (l > max) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at most "), (int)max, (int)l); + return 0; + } else { + register int i; + for (i = 0; i < l; ++i) { + objs[i] = (((PyTupleObject *)(args))->ob_item[i]); + } + for (; l < max; ++l) { + objs[l] = 0; + } + return i + 1; + } + } +} +extern "C" { +static __attribute__ ((__unused__)) inline PyObject * +SWIG_Py_Void(void) +{ + PyObject *none = (&_Py_NoneStruct); + ( ((PyObject*)(none))->ob_refcnt++); + return none; +} +typedef struct { + PyObject *klass; + PyObject *newraw; + PyObject *newargs; + PyObject *destroy; + int delargs; + int implicitconv; +} SwigPyClientData; +static __attribute__ ((__unused__)) inline int +SWIG_Python_CheckImplicit(swig_type_info *ty) +{ + SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; + return data ? data->implicitconv : 0; +} +static __attribute__ ((__unused__)) inline PyObject * +SWIG_Python_ExceptionType(swig_type_info *desc) { + SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; + PyObject *klass = data ? data->klass : 0; + return (klass ? klass : PyExc_RuntimeError); +} +static __attribute__ ((__unused__)) SwigPyClientData * +SwigPyClientData_New(PyObject* obj) +{ + if (!obj) { + return 0; + } else { + SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); + data->klass = obj; + ( ((PyObject*)(data->klass))->ob_refcnt++); + if (((obj)->ob_type == &PyClass_Type)) { + data->newraw = 0; + data->newargs = obj; + ( ((PyObject*)(obj))->ob_refcnt++); + } else { + data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); + if (data->newraw) { + ( ((PyObject*)(data->newraw))->ob_refcnt++); + data->newargs = PyTuple_New(1); + PyTuple_SetItem(data->newargs, 0, obj); + } else { + data->newargs = obj; + } + ( ((PyObject*)(data->newargs))->ob_refcnt++); + } + data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); + if (PyErr_Occurred()) { + PyErr_Clear(); + data->destroy = 0; + } + if (data->destroy) { + int flags; + ( ((PyObject*)(data->destroy))->ob_refcnt++); + flags = (((PyCFunctionObject *)data->destroy) -> m_ml -> ml_flags); + data->delargs = !(flags & (0x0008)); + } else { + data->delargs = 0; + } + data->implicitconv = 0; + return data; + } +} +static __attribute__ ((__unused__)) void +SwigPyClientData_Del(SwigPyClientData* data) +{ + if ((data->newraw) == __null) ; else if ( --((PyObject*)(data->newraw))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(data->newraw)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(data->newraw)))); + if ((data->newargs) == __null) ; else if ( --((PyObject*)(data->newargs))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(data->newargs)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(data->newargs)))); + if ((data->destroy) == __null) ; else if ( --((PyObject*)(data->destroy))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(data->destroy)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(data->destroy)))); +} +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + void *ptr; + swig_type_info *ty; + int own; + PyObject *next; +} SwigPyObject; +static __attribute__ ((__unused__)) PyObject * +SwigPyObject_long(SwigPyObject *v) +{ + return PyLong_FromVoidPtr(v->ptr); +} +static __attribute__ ((__unused__)) PyObject * +SwigPyObject_format(const char* fmt, SwigPyObject *v) +{ + PyObject *res = __null; + PyObject *args = PyTuple_New(1); + if (args) { + if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { + PyObject *ofmt = SWIG_Python_str_FromChar(fmt); + if (ofmt) { + res = PyString_Format(ofmt,args); + if ( --((PyObject*)(ofmt))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(ofmt)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(ofmt)))); + } + if ( --((PyObject*)(args))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(args)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(args)))); + } + } + return res; +} +static __attribute__ ((__unused__)) PyObject * +SwigPyObject_oct(SwigPyObject *v) +{ + return SwigPyObject_format("%o",v); +} +static __attribute__ ((__unused__)) PyObject * +SwigPyObject_hex(SwigPyObject *v) +{ + return SwigPyObject_format("%x",v); +} +static __attribute__ ((__unused__)) PyObject * +SwigPyObject_repr(SwigPyObject *v) +{ + const char *name = SWIG_TypePrettyName(v->ty); + PyObject *repr = PyString_FromFormat("", name, v); + if (v->next) { + PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); + PyString_ConcatAndDel(&repr,nrep); + } + return repr; +} +static __attribute__ ((__unused__)) int +SwigPyObject_print(SwigPyObject *v, FILE *fp, int ) +{ + char *str; + PyObject *repr = SwigPyObject_repr(v); + if (repr) { + str = SWIG_Python_str_AsChar(repr); + fputs(str, fp); + ; + if ( --((PyObject*)(repr))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(repr)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(repr)))); + return 0; + } else { + return 1; + } +} +static __attribute__ ((__unused__)) PyObject * +SwigPyObject_str(SwigPyObject *v) +{ + char result[1024]; + return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? + SWIG_Python_str_FromChar(result) : 0; +} +static __attribute__ ((__unused__)) int +SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) +{ + void *i = v->ptr; + void *j = w->ptr; + return (i < j) ? -1 : ((i > j) ? 1 : 0); +} +static __attribute__ ((__unused__)) PyObject* +SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) +{ + PyObject* res; + if( op != 2 && op != 3 ) { + ( ((PyObject*)((&_Py_NotImplementedStruct)))->ob_refcnt++); + return (&_Py_NotImplementedStruct); + } + if( (SwigPyObject_compare(v, w)==0) == (op == 2) ) + res = ((PyObject *) &_Py_TrueStruct); + else + res = ((PyObject *) &_Py_ZeroStruct); + ( ((PyObject*)(res))->ob_refcnt++); + return res; +} +static __attribute__ ((__unused__)) PyTypeObject* _PySwigObject_type(void); +static __attribute__ ((__unused__)) PyTypeObject* +SwigPyObject_type(void) { + static PyTypeObject *type = _PySwigObject_type(); + return type; +} +static __attribute__ ((__unused__)) inline int +SwigPyObject_Check(PyObject *op) { + return ((((PyObject*)(op))->ob_type) == SwigPyObject_type()) + || (strcmp((((PyObject*)(op))->ob_type)->tp_name,"SwigPyObject") == 0); +} +static __attribute__ ((__unused__)) PyObject * +SwigPyObject_New(void *ptr, swig_type_info *ty, int own); +static __attribute__ ((__unused__)) void +SwigPyObject_dealloc(PyObject *v) +{ + SwigPyObject *sobj = (SwigPyObject *) v; + PyObject *next = sobj->next; + if (sobj->own == 0x1) { + swig_type_info *ty = sobj->ty; + SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; + PyObject *destroy = data ? data->destroy : 0; + if (destroy) { + PyObject *res; + if (data->delargs) { + PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); + res = PyObject_CallFunctionObjArgs(destroy, tmp, __null);; + if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); + } else { + PyCFunction meth = (((PyCFunctionObject *)destroy) -> m_ml -> ml_meth); + PyObject *mself = (((PyCFunctionObject *)destroy) -> m_self); + res = ((*meth)(mself, v)); + } + if ((res) == __null) ; else if ( --((PyObject*)(res))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(res)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(res)))); + } + else { + const char *name = SWIG_TypePrettyName(ty); + printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); + } + } + if ((next) == __null) ; else if ( --((PyObject*)(next))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(next)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(next)))); + PyObject_Free(v); +} +static __attribute__ ((__unused__)) PyObject* +SwigPyObject_append(PyObject* v, PyObject* next) +{ + SwigPyObject *sobj = (SwigPyObject *) v; + if (!SwigPyObject_Check(next)) { + return __null; + } + sobj->next = next; + ( ((PyObject*)(next))->ob_refcnt++); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject* +SwigPyObject_next(PyObject* v) +{ + SwigPyObject *sobj = (SwigPyObject *) v; + if (sobj->next) { + ( ((PyObject*)(sobj->next))->ob_refcnt++); + return sobj->next; + } else { + return SWIG_Py_Void(); + } +} +static __attribute__ ((__unused__)) PyObject* +SwigPyObject_disown(PyObject *v) +{ + SwigPyObject *sobj = (SwigPyObject *)v; + sobj->own = 0; + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject* +SwigPyObject_acquire(PyObject *v) +{ + SwigPyObject *sobj = (SwigPyObject *)v; + sobj->own = 0x1; + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject* +SwigPyObject_own(PyObject *v, PyObject *args) +{ + PyObject *val = 0; + if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) + { + return __null; + } + else + { + SwigPyObject *sobj = (SwigPyObject *)v; + PyObject *obj = PyBool_FromLong(sobj->own); + if (val) { + if (PyObject_IsTrue(val)) { + SwigPyObject_acquire(v); + } else { + SwigPyObject_disown(v); + } + } + return obj; + } +} +static PyMethodDef +swigobject_methods[] = { + {(char *)"disown", (PyCFunction)SwigPyObject_disown, 0x0004, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, 0x0004, (char *)"aquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)SwigPyObject_own, 0x0001, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)SwigPyObject_append, 0x0008, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)SwigPyObject_next, 0x0004, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, 0x0004, (char *)"returns object representation"}, + {0, 0, 0, 0} +}; +static __attribute__ ((__unused__)) PyTypeObject* +_PySwigObject_type(void) { + static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; + static PyNumberMethods SwigPyObject_as_number = { + (binaryfunc)0, + (binaryfunc)0, + (binaryfunc)0, + (binaryfunc)0, + (binaryfunc)0, + (binaryfunc)0, + (ternaryfunc)0, + (unaryfunc)0, + (unaryfunc)0, + (unaryfunc)0, + (inquiry)0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + (unaryfunc)SwigPyObject_long, + (unaryfunc)SwigPyObject_long, + (unaryfunc)0, + (unaryfunc)SwigPyObject_oct, + (unaryfunc)SwigPyObject_hex, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + }; + static PyTypeObject swigpyobject_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp + = { + 1, __null, + 0, + (char *)"SwigPyObject", + sizeof(SwigPyObject), + 0, + (destructor)SwigPyObject_dealloc, + (printfunc)SwigPyObject_print, + (getattrfunc)0, + (setattrfunc)0, + (cmpfunc)SwigPyObject_compare, + (reprfunc)SwigPyObject_repr, + &SwigPyObject_as_number, + 0, + 0, + (hashfunc)0, + (ternaryfunc)0, + (reprfunc)SwigPyObject_str, + PyObject_GenericGetAttr, + 0, + 0, + ( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<17) | 0), + swigobject_doc, + 0, + 0, + (richcmpfunc)SwigPyObject_richcompare, + 0, + 0, + 0, + swigobject_methods, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + }; + swigpyobject_type = tmp; + swigpyobject_type.ob_type = &PyType_Type; + type_init = 1; + } + return &swigpyobject_type; +} +static __attribute__ ((__unused__)) PyObject * +SwigPyObject_New(void *ptr, swig_type_info *ty, int own) +{ + SwigPyObject *sobj = ( (SwigPyObject *) PyObject_Init( (PyObject *) PyObject_Malloc( ( (SwigPyObject_type())->tp_basicsize ) ), (SwigPyObject_type())) ); + if (sobj) { + sobj->ptr = ptr; + sobj->ty = ty; + sobj->own = own; + sobj->next = 0; + } + return (PyObject *)sobj; +} +typedef struct { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + void *pack; + swig_type_info *ty; + size_t size; +} SwigPyPacked; +static __attribute__ ((__unused__)) int +SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int ) +{ + char result[1024]; + fputs("pack, v->size, 0, sizeof(result))) { + fputs("at ", fp); + fputs(result, fp); + } + fputs(v->ty->name,fp); + fputs(">", fp); + return 0; +} +static __attribute__ ((__unused__)) PyObject * +SwigPyPacked_repr(SwigPyPacked *v) +{ + char result[1024]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { + return PyString_FromFormat("", result, v->ty->name); + } else { + return PyString_FromFormat("", v->ty->name); + } +} +static __attribute__ ((__unused__)) PyObject * +SwigPyPacked_str(SwigPyPacked *v) +{ + char result[1024]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ + return PyString_FromFormat("%s%s", result, v->ty->name); + } else { + return SWIG_Python_str_FromChar(v->ty->name); + } +} +static __attribute__ ((__unused__)) int +SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) +{ + size_t i = v->size; + size_t j = w->size; + int s = (i < j) ? -1 : ((i > j) ? 1 : 0); + return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); +} +static __attribute__ ((__unused__)) PyTypeObject* _PySwigPacked_type(void); +static __attribute__ ((__unused__)) PyTypeObject* +SwigPyPacked_type(void) { + static PyTypeObject *type = _PySwigPacked_type(); + return type; +} +static __attribute__ ((__unused__)) inline int +SwigPyPacked_Check(PyObject *op) { + return ((op)->ob_type == _PySwigPacked_type()) + || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); +} +static __attribute__ ((__unused__)) void +SwigPyPacked_dealloc(PyObject *v) +{ + if (SwigPyPacked_Check(v)) { + SwigPyPacked *sobj = (SwigPyPacked *) v; + free(sobj->pack); + } + PyObject_Free(v); +} +static __attribute__ ((__unused__)) PyTypeObject* +_PySwigPacked_type(void) { + static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; + static PyTypeObject swigpypacked_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp + = { + 1, __null, + 0, + (char *)"SwigPyPacked", + sizeof(SwigPyPacked), + 0, + (destructor)SwigPyPacked_dealloc, + (printfunc)SwigPyPacked_print, + (getattrfunc)0, + (setattrfunc)0, + (cmpfunc)SwigPyPacked_compare, + (reprfunc)SwigPyPacked_repr, + 0, + 0, + 0, + (hashfunc)0, + (ternaryfunc)0, + (reprfunc)SwigPyPacked_str, + PyObject_GenericGetAttr, + 0, + 0, + ( (1L<<0) | (1L<<1) | (1L<<3) | (1L<<5) | (1L<<6) | (1L<<7) | (1L<<8) | 0 | (1L<<17) | 0), + swigpacked_doc, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + }; + swigpypacked_type = tmp; + swigpypacked_type.ob_type = &PyType_Type; + type_init = 1; + } + return &swigpypacked_type; +} +static __attribute__ ((__unused__)) PyObject * +SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) +{ + SwigPyPacked *sobj = ( (SwigPyPacked *) PyObject_Init( (PyObject *) PyObject_Malloc( ( (SwigPyPacked_type())->tp_basicsize ) ), (SwigPyPacked_type())) ); + if (sobj) { + void *pack = malloc(size); + if (pack) { + memcpy(pack, ptr, size); + sobj->pack = pack; + sobj->ty = ty; + sobj->size = size; + } else { + PyObject_Free((PyObject *) sobj); + sobj = 0; + } + } + return (PyObject *) sobj; +} +static __attribute__ ((__unused__)) swig_type_info * +SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) +{ + if (SwigPyPacked_Check(obj)) { + SwigPyPacked *sobj = (SwigPyPacked *)obj; + if (sobj->size != size) return 0; + memcpy(ptr, sobj->pack, size); + return sobj->ty; + } else { + return 0; + } +} +static __attribute__ ((__unused__)) inline PyObject * +_SWIG_This(void) +{ + return SWIG_Python_str_FromChar("this"); +} +static __attribute__ ((__unused__)) PyObject * +SWIG_This(void) +{ + static PyObject *swig_this = _SWIG_This(); + return swig_this; +} +static __attribute__ ((__unused__)) SwigPyObject * +SWIG_Python_GetSwigThis(PyObject *pyobj) +{ + if (SwigPyObject_Check(pyobj)) { + return (SwigPyObject *) pyobj; + } else { + PyObject *obj = 0; + if (((pyobj)->ob_type == &PyInstance_Type)) { + obj = _PyInstance_Lookup(pyobj, SWIG_This()); + } else { + PyObject **dictptr = _PyObject_GetDictPtr(pyobj); + if (dictptr != __null) { + PyObject *dict = *dictptr; + obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; + } else { + if ((((((PyObject*)(pyobj))->ob_type) == &_PyWeakref_ProxyType) || ((((PyObject*)(pyobj))->ob_type) == &_PyWeakref_CallableProxyType))) { + PyObject *wobj = (((PyWeakReference *)(pyobj))->wr_object); + return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; + } + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + if ( --((PyObject*)(obj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(obj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(obj)))); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } + } + } + if (obj && !SwigPyObject_Check(obj)) { + return SWIG_Python_GetSwigThis(obj); + } + return (SwigPyObject *)obj; + } +} +static __attribute__ ((__unused__)) int +SWIG_Python_AcquirePtr(PyObject *obj, int own) { + if (own == 0x1) { + SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); + if (sobj) { + int oldown = sobj->own; + sobj->own = own; + return oldown; + } + } + return 0; +} +static __attribute__ ((__unused__)) int +SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { + if (!obj) return (-1); + if (obj == (&_Py_NoneStruct)) { + if (ptr) *ptr = 0; + return (0); + } else { + SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); + if (own) + *own = 0; + while (sobj) { + void *vptr = sobj->ptr; + if (ty) { + swig_type_info *to = sobj->ty; + if (to == ty) { + if (ptr) *ptr = vptr; + break; + } else { + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) { + sobj = (SwigPyObject *)sobj->next; + } else { + if (ptr) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + if (newmemory == 0x2) { + ((own) ? static_cast (0) : __assert_fail ("own", "modern/xapian_wrap.cc", 2183, __PRETTY_FUNCTION__)); + if (own) + *own = *own | 0x2; + } + } + break; + } + } + } else { + if (ptr) *ptr = vptr; + break; + } + } + if (sobj) { + if (own) + *own = *own | sobj->own; + if (flags & 0x1) { + sobj->own = 0; + } + return (0); + } else { + int res = (-1); + if (flags & (0x1 << 1)) { + SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; + if (data && !data->implicitconv) { + PyObject *klass = data->klass; + if (klass) { + PyObject *impconv; + data->implicitconv = 1; + impconv = PyObject_CallFunctionObjArgs(klass, obj, __null);; + data->implicitconv = 0; + if (PyErr_Occurred()) { + PyErr_Clear(); + impconv = 0; + } + if (impconv) { + SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); + if (iobj) { + void *vptr; + res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); + if ((res >= 0)) { + if (ptr) { + *ptr = vptr; + iobj->own = 0; + res = (res); + res = ((res >= 0) ? (res | ((1 << 8) << 1)) : res); + } else { + res = (res); + } + } + } + if ( --((PyObject*)(impconv))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(impconv)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(impconv)))); + } + } + } + } + return res; + } + } +} +static __attribute__ ((__unused__)) int +SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { + if (!((((PyObject*)(obj))->ob_type) == &PyCFunction_Type)) { + return SWIG_Python_ConvertPtrAndOwn(obj, ptr, ty, 0, 0); + } else { + void *vptr = 0; + const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); + const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; + if (desc) { + desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; + if (!desc) return (-1); + } + if (ty) { + swig_cast_info *tc = SWIG_TypeCheck(desc,ty); + if (tc) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + ((!newmemory) ? static_cast (0) : __assert_fail ("!newmemory", "modern/xapian_wrap.cc", 2266, __PRETTY_FUNCTION__)); + } else { + return (-1); + } + } else { + *ptr = vptr; + } + return (0); + } +} +static __attribute__ ((__unused__)) int +SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { + swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); + if (!to) return (-1); + if (ty) { + if (to != ty) { + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) return (-1); + } + } + return (0); +} +static __attribute__ ((__unused__)) PyObject* +SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) +{ + PyObject *inst = 0; + PyObject *newraw = data->newraw; + if (newraw) { + inst = PyObject_Call(newraw, data->newargs, __null); + if (inst) { + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != __null) { + PyObject *dict = *dictptr; + if (dict == __null) { + dict = PyDict_New(); + *dictptr = dict; + PyDict_SetItem(dict, SWIG_This(), swig_this); + } + } + } + } else { + PyObject *dict = PyDict_New(); + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + if ( --((PyObject*)(dict))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(dict)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(dict)))); + } + return inst; +} +static __attribute__ ((__unused__)) void +SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) +{ + PyObject *dict; + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != __null) { + dict = *dictptr; + if (dict == __null) { + dict = PyDict_New(); + *dictptr = dict; + } + PyDict_SetItem(dict, SWIG_This(), swig_this); + return; + } + dict = PyObject_GetAttrString(inst, (char*)"__dict__"); + PyDict_SetItem(dict, SWIG_This(), swig_this); + if ( --((PyObject*)(dict))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(dict)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(dict)))); +} +static __attribute__ ((__unused__)) PyObject * +SWIG_Python_InitShadowInstance(PyObject *args) { + PyObject *obj[2]; + if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) { + return __null; + } else { + SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); + if (sthis) { + SwigPyObject_append((PyObject*) sthis, obj[1]); + } else { + SWIG_Python_SetSwigThis(obj[0], obj[1]); + } + return SWIG_Py_Void(); + } +} +static __attribute__ ((__unused__)) PyObject * +SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) { + if (!ptr) { + return SWIG_Py_Void(); + } else { + int own = (flags & 0x1) ? 0x1 : 0; + PyObject *robj = SwigPyObject_New(ptr, type, own); + SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; + if (clientdata && !(flags & (0x1 << 1))) { + PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); + if (inst) { + if ( --((PyObject*)(robj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(robj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(robj)))); + robj = inst; + } + } + return robj; + } +} +static __attribute__ ((__unused__)) inline PyObject * +SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { + return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) swig_module_info * +SWIG_Python_GetModule(void) { + static void *type_pointer = (void *)0; + if (!type_pointer) { + type_pointer = PyCObject_Import((char*)"swig_runtime_data" "4", + (char*)"type_pointer" ); + if (PyErr_Occurred()) { + PyErr_Clear(); + type_pointer = (void *)0; + } + } + return (swig_module_info *) type_pointer; +} +static __attribute__ ((__unused__)) void +SWIG_Python_DestroyModule(void *vptr) +{ + swig_module_info *swig_module = (swig_module_info *) vptr; + swig_type_info **types = swig_module->types; + size_t i; + for (i =0; i < swig_module->size; ++i) { + swig_type_info *ty = types[i]; + if (ty->owndata) { + SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; + if (data) SwigPyClientData_Del(data); + } + } + if ( --((PyObject*)(SWIG_This()))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(SWIG_This())))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(SWIG_This())))); +} +static __attribute__ ((__unused__)) void +SWIG_Python_SetModule(swig_module_info *swig_module) { + static PyMethodDef swig_empty_runtime_method_table[] = { {__null, __null, 0, __null} }; + PyObject *module = Py_InitModule4_64((char*)"swig_runtime_data" "4", swig_empty_runtime_method_table, (char *)__null, (PyObject *)__null, 1013); + PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); + if (pointer && module) { + PyModule_AddObject(module, (char*)"type_pointer" , pointer); + } else { + if ((pointer) == __null) ; else if ( --((PyObject*)(pointer))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(pointer)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(pointer)))); + } +} +static __attribute__ ((__unused__)) PyObject * +SWIG_Python_TypeCache(void) { + static PyObject *cache = PyDict_New(); + return cache; +} +static __attribute__ ((__unused__)) swig_type_info * +SWIG_Python_TypeQuery(const char *type) +{ + PyObject *cache = SWIG_Python_TypeCache(); + PyObject *key = SWIG_Python_str_FromChar(type); + PyObject *obj = PyDict_GetItem(cache, key); + swig_type_info *descriptor; + if (obj) { + descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); + } else { + swig_module_info *swig_module = SWIG_Python_GetModule(); + descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); + if (descriptor) { + obj = PyCObject_FromVoidPtr(descriptor, __null); + PyDict_SetItem(cache, key, obj); + if ( --((PyObject*)(obj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(obj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(obj)))); + } + } + if ( --((PyObject*)(key))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(key)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(key)))); + return descriptor; +} +static __attribute__ ((__unused__)) int +SWIG_Python_AddErrMesg(const char* mesg, int infront) +{ + if (PyErr_Occurred()) { + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + PyErr_Fetch(&type, &value, &traceback); + if (value) { + char *tmp; + PyObject *old_str = PyObject_Str(value); + if ((type) == __null) ; else ( ((PyObject*)(type))->ob_refcnt++); + PyErr_Clear(); + if (infront) { + PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); + } else { + PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); + } + ; + if ( --((PyObject*)(old_str))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(old_str)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(old_str)))); + } + return 1; + } else { + return 0; + } +} +static __attribute__ ((__unused__)) int +SWIG_Python_ArgFail(int argnum) +{ + if (PyErr_Occurred()) { + char mesg[256]; + PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); + return SWIG_Python_AddErrMesg(mesg, 1); + } else { + return 0; + } +} +static __attribute__ ((__unused__)) inline const char * +SwigPyObject_GetDesc(PyObject *self) +{ + SwigPyObject *v = (SwigPyObject *)self; + swig_type_info *ty = v ? v->ty : 0; + return ty ? ty->str : (char*)""; +} +static __attribute__ ((__unused__)) void +SWIG_Python_TypeError(const char *type, PyObject *obj) +{ + if (type) { + { + const char *otype = (obj ? obj->ob_type->tp_name : 0); + if (otype) { + PyObject *str = PyObject_Str(obj); + const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; + if (cstr) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", + type, otype, cstr); + ; + } else { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", + type, otype); + } + if ((str) == __null) ; else if ( --((PyObject*)(str))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(str)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(str)))); + return; + } + } + PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); + } else { + PyErr_Format(PyExc_TypeError, "unexpected type is received"); + } +} +static __attribute__ ((__unused__)) void * +SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) { + void *result; + if (SWIG_Python_ConvertPtrAndOwn(obj, &result, ty, flags, 0) == -1) { + PyErr_Clear(); + } + return result; +} +} + + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + class allocator; + template + struct char_traits; + template, + typename _Alloc = allocator<_CharT> > + class basic_string; + template<> struct char_traits; + typedef basic_string string; + template<> struct char_traits; + typedef basic_string wstring; +} + + +typedef long int ptrdiff_t; +namespace std __attribute__ ((__visibility__ ("default"))) { + using ::ptrdiff_t; + using ::size_t; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + void + __throw_bad_exception(void) __attribute__((__noreturn__)); + void + __throw_bad_alloc(void) __attribute__((__noreturn__)); + void + __throw_bad_cast(void) __attribute__((__noreturn__)); + void + __throw_bad_typeid(void) __attribute__((__noreturn__)); + void + __throw_logic_error(const char*) __attribute__((__noreturn__)); + void + __throw_domain_error(const char*) __attribute__((__noreturn__)); + void + __throw_invalid_argument(const char*) __attribute__((__noreturn__)); + void + __throw_length_error(const char*) __attribute__((__noreturn__)); + void + __throw_out_of_range(const char*) __attribute__((__noreturn__)); + void + __throw_runtime_error(const char*) __attribute__((__noreturn__)); + void + __throw_range_error(const char*) __attribute__((__noreturn__)); + void + __throw_overflow_error(const char*) __attribute__((__noreturn__)); + void + __throw_underflow_error(const char*) __attribute__((__noreturn__)); + void + __throw_ios_failure(const char*) __attribute__((__noreturn__)); + void + __throw_system_error(int) __attribute__((__noreturn__)); +} + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + template + class __normal_iterator; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + struct __true_type { }; + struct __false_type { }; + template + struct __truth_type + { typedef __false_type __type; }; + template<> + struct __truth_type + { typedef __true_type __type; }; + template + struct __traitor + { + enum { __value = bool(_Sp::__value) || bool(_Tp::__value) }; + typedef typename __truth_type<__value>::__type __type; + }; + template + struct __are_same + { + enum { __value = 0 }; + typedef __false_type __type; + }; + template + struct __are_same<_Tp, _Tp> + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template + struct __is_void + { + enum { __value = 0 }; + typedef __false_type __type; + }; + template<> + struct __is_void + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template + struct __is_integer + { + enum { __value = 0 }; + typedef __false_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template + struct __is_floating + { + enum { __value = 0 }; + typedef __false_type __type; + }; + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template + struct __is_pointer + { + enum { __value = 0 }; + typedef __false_type __type; + }; + template + struct __is_pointer<_Tp*> + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template + struct __is_normal_iterator + { + enum { __value = 0 }; + typedef __false_type __type; + }; + template + struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator, + _Container> > + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template + struct __is_arithmetic + : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > + { }; + template + struct __is_fundamental + : public __traitor<__is_void<_Tp>, __is_arithmetic<_Tp> > + { }; + template + struct __is_scalar + : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > + { }; + template + struct __is_char + { + enum { __value = 0 }; + typedef __false_type __type; + }; + template<> + struct __is_char + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_char + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template + struct __is_byte + { + enum { __value = 0 }; + typedef __false_type __type; + }; + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template + struct __is_move_iterator + { + enum { __value = 0 }; + typedef __false_type __type; + }; +} + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + template + struct __enable_if + { }; + template + struct __enable_if + { typedef _Tp __type; }; + template + struct __conditional_type + { typedef _Iftrue __type; }; + template + struct __conditional_type + { typedef _Iffalse __type; }; + template + struct __add_unsigned + { + private: + typedef __enable_if::__value, _Tp> __if_type; + public: + typedef typename __if_type::__type __type; + }; + template<> + struct __add_unsigned + { typedef unsigned char __type; }; + template<> + struct __add_unsigned + { typedef unsigned char __type; }; + template<> + struct __add_unsigned + { typedef unsigned short __type; }; + template<> + struct __add_unsigned + { typedef unsigned int __type; }; + template<> + struct __add_unsigned + { typedef unsigned long __type; }; + template<> + struct __add_unsigned + { typedef unsigned long long __type; }; + template<> + struct __add_unsigned; + template<> + struct __add_unsigned; + template + struct __remove_unsigned + { + private: + typedef __enable_if::__value, _Tp> __if_type; + public: + typedef typename __if_type::__type __type; + }; + template<> + struct __remove_unsigned + { typedef signed char __type; }; + template<> + struct __remove_unsigned + { typedef signed char __type; }; + template<> + struct __remove_unsigned + { typedef short __type; }; + template<> + struct __remove_unsigned + { typedef int __type; }; + template<> + struct __remove_unsigned + { typedef long __type; }; + template<> + struct __remove_unsigned + { typedef long long __type; }; + template<> + struct __remove_unsigned; + template<> + struct __remove_unsigned; + template + inline bool + __is_null_pointer(_Type* __ptr) + { return __ptr == 0; } + template + inline bool + __is_null_pointer(_Type) + { return false; } + template::__value> + struct __promote + { typedef double __type; }; + template + struct __promote<_Tp, false> + { typedef _Tp __type; }; + template + struct __promote_2 + { + private: + typedef typename __promote<_Tp>::__type __type1; + typedef typename __promote<_Up>::__type __type2; + public: + typedef __typeof__(__type1() + __type2()) __type; + }; + template + struct __promote_3 + { + private: + typedef typename __promote<_Tp>::__type __type1; + typedef typename __promote<_Up>::__type __type2; + typedef typename __promote<_Vp>::__type __type3; + public: + typedef __typeof__(__type1() + __type2() + __type3()) __type; + }; + template + struct __promote_4 + { + private: + typedef typename __promote<_Tp>::__type __type1; + typedef typename __promote<_Up>::__type __type2; + typedef typename __promote<_Vp>::__type __type3; + typedef typename __promote<_Wp>::__type __type4; + public: + typedef __typeof__(__type1() + __type2() + __type3() + __type4()) __type; + }; +} + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + template + struct __numeric_traits_integer + { + static const _Value __min = (((_Value)(-1) < 0) ? (_Value)1 << (sizeof(_Value) * 8 - ((_Value)(-1) < 0)) : (_Value)0); + static const _Value __max = (((_Value)(-1) < 0) ? (((((_Value)1 << ((sizeof(_Value) * 8 - ((_Value)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(_Value)0); + static const bool __is_signed = ((_Value)(-1) < 0); + static const int __digits = (sizeof(_Value) * 8 - ((_Value)(-1) < 0)); + }; + template + const _Value __numeric_traits_integer<_Value>::__min; + template + const _Value __numeric_traits_integer<_Value>::__max; + template + const bool __numeric_traits_integer<_Value>::__is_signed; + template + const int __numeric_traits_integer<_Value>::__digits; + template + struct __numeric_traits_floating + { + static const int __max_digits10 = (2 + (std::__are_same<_Value, float>::__value ? 24 : std::__are_same<_Value, double>::__value ? 53 : 64) * 3010 / 10000); + static const bool __is_signed = true; + static const int __digits10 = (std::__are_same<_Value, float>::__value ? 6 : std::__are_same<_Value, double>::__value ? 15 : 18); + static const int __max_exponent10 = (std::__are_same<_Value, float>::__value ? 38 : std::__are_same<_Value, double>::__value ? 308 : 4932); + }; + template + const int __numeric_traits_floating<_Value>::__max_digits10; + template + const bool __numeric_traits_floating<_Value>::__is_signed; + template + const int __numeric_traits_floating<_Value>::__digits10; + template + const int __numeric_traits_floating<_Value>::__max_exponent10; + template + struct __numeric_traits + : public __conditional_type::__value, + __numeric_traits_integer<_Value>, + __numeric_traits_floating<_Value> >::__type + { }; +} + + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + inline void + swap(_Tp& __a, _Tp& __b) + { + + _Tp __tmp = (__a); + __a = (__b); + __b = (__tmp); + } + template + inline void + swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) + { + for (size_t __n = 0; __n < _Nm; ++__n) + swap(__a[__n], __b[__n]); + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + struct pair + { + typedef _T1 first_type; + typedef _T2 second_type; + _T1 first; + _T2 second; + pair() + : first(), second() { } + pair(const _T1& __a, const _T2& __b) + : first(__a), second(__b) { } + template + pair(const pair<_U1, _U2>& __p) + : first(__p.first), + second(__p.second) { } + }; + template + inline bool + operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __x.first == __y.first && __x.second == __y.second; } + template + inline bool + operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __x.first < __y.first + || (!(__y.first < __x.first) && __x.second < __y.second); } + template + inline bool + operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __y < __x; } + template + inline bool + operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return !(__x < __y); } + template + inline pair<_T1, _T2> + make_pair(_T1 __x, _T2 __y) + { return pair<_T1, _T2>(__x, __y); } +} + + +namespace std __attribute__ ((__visibility__ ("default"))) { + struct input_iterator_tag { }; + struct output_iterator_tag { }; + struct forward_iterator_tag : public input_iterator_tag { }; + struct bidirectional_iterator_tag : public forward_iterator_tag { }; + struct random_access_iterator_tag : public bidirectional_iterator_tag { }; + template + struct iterator + { + typedef _Category iterator_category; + typedef _Tp value_type; + typedef _Distance difference_type; + typedef _Pointer pointer; + typedef _Reference reference; + }; + template + struct iterator_traits + { + typedef typename _Iterator::iterator_category iterator_category; + typedef typename _Iterator::value_type value_type; + typedef typename _Iterator::difference_type difference_type; + typedef typename _Iterator::pointer pointer; + typedef typename _Iterator::reference reference; + }; + template + struct iterator_traits<_Tp*> + { + typedef random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef _Tp& reference; + }; + template + struct iterator_traits + { + typedef random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef ptrdiff_t difference_type; + typedef const _Tp* pointer; + typedef const _Tp& reference; + }; + template + inline typename iterator_traits<_Iter>::iterator_category + __iterator_category(const _Iter&) + { return typename iterator_traits<_Iter>::iterator_category(); } +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + inline typename iterator_traits<_InputIterator>::difference_type + __distance(_InputIterator __first, _InputIterator __last, + input_iterator_tag) + { + + typename iterator_traits<_InputIterator>::difference_type __n = 0; + while (__first != __last) + { + ++__first; + ++__n; + } + return __n; + } + template + inline typename iterator_traits<_RandomAccessIterator>::difference_type + __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, + random_access_iterator_tag) + { + + return __last - __first; + } + template + inline typename iterator_traits<_InputIterator>::difference_type + distance(_InputIterator __first, _InputIterator __last) + { + return std::__distance(__first, __last, + std::__iterator_category(__first)); + } + template + inline void + __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) + { + + while (__n--) + ++__i; + } + template + inline void + __advance(_BidirectionalIterator& __i, _Distance __n, + bidirectional_iterator_tag) + { + + if (__n > 0) + while (__n--) + ++__i; + else + while (__n++) + --__i; + } + template + inline void + __advance(_RandomAccessIterator& __i, _Distance __n, + random_access_iterator_tag) + { + + __i += __n; + } + template + inline void + advance(_InputIterator& __i, _Distance __n) + { + typename iterator_traits<_InputIterator>::difference_type __d = __n; + std::__advance(__i, __d, std::__iterator_category(__i)); + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + class reverse_iterator + : public iterator::iterator_category, + typename iterator_traits<_Iterator>::value_type, + typename iterator_traits<_Iterator>::difference_type, + typename iterator_traits<_Iterator>::pointer, + typename iterator_traits<_Iterator>::reference> + { + protected: + _Iterator current; + public: + typedef _Iterator iterator_type; + typedef typename iterator_traits<_Iterator>::difference_type + difference_type; + typedef typename iterator_traits<_Iterator>::reference reference; + typedef typename iterator_traits<_Iterator>::pointer pointer; + public: + reverse_iterator() : current() { } + explicit + reverse_iterator(iterator_type __x) : current(__x) { } + reverse_iterator(const reverse_iterator& __x) + : current(__x.current) { } + template + reverse_iterator(const reverse_iterator<_Iter>& __x) + : current(__x.base()) { } + iterator_type + base() const + { return current; } + reference + operator*() const + { + _Iterator __tmp = current; + return *--__tmp; + } + pointer + operator->() const + { return &(operator*()); } + reverse_iterator& + operator++() + { + --current; + return *this; + } + reverse_iterator + operator++(int) + { + reverse_iterator __tmp = *this; + --current; + return __tmp; + } + reverse_iterator& + operator--() + { + ++current; + return *this; + } + reverse_iterator + operator--(int) + { + reverse_iterator __tmp = *this; + ++current; + return __tmp; + } + reverse_iterator + operator+(difference_type __n) const + { return reverse_iterator(current - __n); } + reverse_iterator& + operator+=(difference_type __n) + { + current -= __n; + return *this; + } + reverse_iterator + operator-(difference_type __n) const + { return reverse_iterator(current + __n); } + reverse_iterator& + operator-=(difference_type __n) + { + current += __n; + return *this; + } + reference + operator[](difference_type __n) const + { return *(*this + __n); } + }; + template + inline bool + operator==(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return __x.base() == __y.base(); } + template + inline bool + operator<(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return __y.base() < __x.base(); } + template + inline bool + operator!=(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return __y < __x; } + template + inline bool + operator<=(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return !(__x < __y); } + template + inline typename reverse_iterator<_Iterator>::difference_type + operator-(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return __y.base() - __x.base(); } + template + inline reverse_iterator<_Iterator> + operator+(typename reverse_iterator<_Iterator>::difference_type __n, + const reverse_iterator<_Iterator>& __x) + { return reverse_iterator<_Iterator>(__x.base() - __n); } + template + inline bool + operator==(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __x.base() == __y.base(); } + template + inline bool + operator<(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __y.base() < __x.base(); } + template + inline bool + operator!=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __y < __x; } + template + inline bool + operator<=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return !(__x < __y); } + template + inline typename reverse_iterator<_IteratorL>::difference_type + operator-(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __y.base() - __x.base(); } + template + class back_insert_iterator + : public iterator + { + protected: + _Container* container; + public: + typedef _Container container_type; + explicit + back_insert_iterator(_Container& __x) : container(&__x) { } + back_insert_iterator& + operator=(typename _Container::const_reference __value) + { + container->push_back(__value); + return *this; + } + back_insert_iterator& + operator*() + { return *this; } + back_insert_iterator& + operator++() + { return *this; } + back_insert_iterator + operator++(int) + { return *this; } + }; + template + inline back_insert_iterator<_Container> + back_inserter(_Container& __x) + { return back_insert_iterator<_Container>(__x); } + template + class front_insert_iterator + : public iterator + { + protected: + _Container* container; + public: + typedef _Container container_type; + explicit front_insert_iterator(_Container& __x) : container(&__x) { } + front_insert_iterator& + operator=(typename _Container::const_reference __value) + { + container->push_front(__value); + return *this; + } + front_insert_iterator& + operator*() + { return *this; } + front_insert_iterator& + operator++() + { return *this; } + front_insert_iterator + operator++(int) + { return *this; } + }; + template + inline front_insert_iterator<_Container> + front_inserter(_Container& __x) + { return front_insert_iterator<_Container>(__x); } + template + class insert_iterator + : public iterator + { + protected: + _Container* container; + typename _Container::iterator iter; + public: + typedef _Container container_type; + insert_iterator(_Container& __x, typename _Container::iterator __i) + : container(&__x), iter(__i) {} + insert_iterator& + operator=(typename _Container::const_reference __value) + { + iter = container->insert(iter, __value); + ++iter; + return *this; + } + insert_iterator& + operator*() + { return *this; } + insert_iterator& + operator++() + { return *this; } + insert_iterator& + operator++(int) + { return *this; } + }; + template + inline insert_iterator<_Container> + inserter(_Container& __x, _Iterator __i) + { + return insert_iterator<_Container>(__x, + typename _Container::iterator(__i)); + } +} +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + using std::iterator_traits; + using std::iterator; + template + class __normal_iterator + { + protected: + _Iterator _M_current; + public: + typedef _Iterator iterator_type; + typedef typename iterator_traits<_Iterator>::iterator_category + iterator_category; + typedef typename iterator_traits<_Iterator>::value_type value_type; + typedef typename iterator_traits<_Iterator>::difference_type + difference_type; + typedef typename iterator_traits<_Iterator>::reference reference; + typedef typename iterator_traits<_Iterator>::pointer pointer; + __normal_iterator() : _M_current(_Iterator()) { } + explicit + __normal_iterator(const _Iterator& __i) : _M_current(__i) { } + template + __normal_iterator(const __normal_iterator<_Iter, + typename __enable_if< + (std::__are_same<_Iter, typename _Container::pointer>::__value), + _Container>::__type>& __i) + : _M_current(__i.base()) { } + reference + operator*() const + { return *_M_current; } + pointer + operator->() const + { return _M_current; } + __normal_iterator& + operator++() + { + ++_M_current; + return *this; + } + __normal_iterator + operator++(int) + { return __normal_iterator(_M_current++); } + __normal_iterator& + operator--() + { + --_M_current; + return *this; + } + __normal_iterator + operator--(int) + { return __normal_iterator(_M_current--); } + reference + operator[](const difference_type& __n) const + { return _M_current[__n]; } + __normal_iterator& + operator+=(const difference_type& __n) + { _M_current += __n; return *this; } + __normal_iterator + operator+(const difference_type& __n) const + { return __normal_iterator(_M_current + __n); } + __normal_iterator& + operator-=(const difference_type& __n) + { _M_current -= __n; return *this; } + __normal_iterator + operator-(const difference_type& __n) const + { return __normal_iterator(_M_current - __n); } + const _Iterator& + base() const + { return _M_current; } + }; + template + inline bool + operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() == __rhs.base(); } + template + inline bool + operator==(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() == __rhs.base(); } + template + inline bool + operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() != __rhs.base(); } + template + inline bool + operator!=(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() != __rhs.base(); } + template + inline bool + operator<(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() < __rhs.base(); } + template + inline bool + operator<(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() < __rhs.base(); } + template + inline bool + operator>(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() > __rhs.base(); } + template + inline bool + operator>(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() > __rhs.base(); } + template + inline bool + operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() <= __rhs.base(); } + template + inline bool + operator<=(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() <= __rhs.base(); } + template + inline bool + operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() >= __rhs.base(); } + template + inline bool + operator>=(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() >= __rhs.base(); } + template + inline typename __normal_iterator<_IteratorL, _Container>::difference_type + operator-(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() - __rhs.base(); } + template + inline typename __normal_iterator<_Iterator, _Container>::difference_type + operator-(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() - __rhs.base(); } + template + inline __normal_iterator<_Iterator, _Container> + operator+(typename __normal_iterator<_Iterator, _Container>::difference_type + __n, const __normal_iterator<_Iterator, _Container>& __i) + { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } +} +namespace std +{ + namespace __debug { } +} +namespace __gnu_debug +{ + using namespace std::__debug; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + struct __iter_swap + { + template + static void + iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) + { + typedef typename iterator_traits<_ForwardIterator1>::value_type + _ValueType1; + _ValueType1 __tmp = (*__a); + *__a = (*__b); + *__b = (__tmp); + } + }; + template<> + struct __iter_swap + { + template + static void + iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) + { + swap(*__a, *__b); + } + }; + template + inline void + iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) + { + typedef typename iterator_traits<_ForwardIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_ForwardIterator2>::value_type + _ValueType2; + + + + + typedef typename iterator_traits<_ForwardIterator1>::reference + _ReferenceType1; + typedef typename iterator_traits<_ForwardIterator2>::reference + _ReferenceType2; + std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value + && __are_same<_ValueType1&, _ReferenceType1>::__value + && __are_same<_ValueType2&, _ReferenceType2>::__value>:: + iter_swap(__a, __b); + } + template + _ForwardIterator2 + swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2) + { + + + ; + for (; __first1 != __last1; ++__first1, ++__first2) + std::iter_swap(__first1, __first2); + return __first2; + } + template + inline const _Tp& + min(const _Tp& __a, const _Tp& __b) + { + + if (__b < __a) + return __b; + return __a; + } + template + inline const _Tp& + max(const _Tp& __a, const _Tp& __b) + { + + if (__a < __b) + return __b; + return __a; + } + template + inline const _Tp& + min(const _Tp& __a, const _Tp& __b, _Compare __comp) + { + if (__comp(__b, __a)) + return __b; + return __a; + } + template + inline const _Tp& + max(const _Tp& __a, const _Tp& __b, _Compare __comp) + { + if (__comp(__a, __b)) + return __b; + return __a; + } + template::__value> + struct __niter_base + { + static _Iterator + __b(_Iterator __it) + { return __it; } + }; + template + struct __niter_base<_Iterator, true> + { + static typename _Iterator::iterator_type + __b(_Iterator __it) + { return __it.base(); } + }; + template::__value> + struct __miter_base + { + static _Iterator + __b(_Iterator __it) + { return __it; } + }; + template + struct __miter_base<_Iterator, true> + { + static typename _Iterator::iterator_type + __b(_Iterator __it) + { return __it.base(); } + }; + template + struct __copy_move + { + template + static _OI + __copy_m(_II __first, _II __last, _OI __result) + { + for (; __first != __last; ++__result, ++__first) + *__result = *__first; + return __result; + } + }; + template<> + struct __copy_move + { + template + static _OI + __copy_m(_II __first, _II __last, _OI __result) + { + typedef typename iterator_traits<_II>::difference_type _Distance; + for(_Distance __n = __last - __first; __n > 0; --__n) + { + *__result = *__first; + ++__first; + ++__result; + } + return __result; + } + }; + template + struct __copy_move<_IsMove, true, random_access_iterator_tag> + { + template + static _Tp* + __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result) + { + __builtin_memmove(__result, __first, + sizeof(_Tp) * (__last - __first)); + return __result + (__last - __first); + } + }; + template + inline _OI + __copy_move_a(_II __first, _II __last, _OI __result) + { + typedef typename iterator_traits<_II>::value_type _ValueTypeI; + typedef typename iterator_traits<_OI>::value_type _ValueTypeO; + typedef typename iterator_traits<_II>::iterator_category _Category; + const bool __simple = (__is_pod(_ValueTypeI) + && __is_pointer<_II>::__value + && __is_pointer<_OI>::__value + && __are_same<_ValueTypeI, _ValueTypeO>::__value); + return std::__copy_move<_IsMove, __simple, + _Category>::__copy_m(__first, __last, __result); + } + template + struct char_traits; + template + class istreambuf_iterator; + template + class ostreambuf_iterator; + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type + __copy_move_a2(_CharT*, _CharT*, + ostreambuf_iterator<_CharT, char_traits<_CharT> >); + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type + __copy_move_a2(const _CharT*, const _CharT*, + ostreambuf_iterator<_CharT, char_traits<_CharT> >); + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + _CharT*>::__type + __copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >, + istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*); + template + inline _OI + __copy_move_a2(_II __first, _II __last, _OI __result) + { + return _OI(std::__copy_move_a<_IsMove> + (std::__niter_base<_II>::__b(__first), + std::__niter_base<_II>::__b(__last), + std::__niter_base<_OI>::__b(__result))); + } + template + inline _OI + copy(_II __first, _II __last, _OI __result) + { + + + ; + return (std::__copy_move_a2<__is_move_iterator<_II>::__value> + (std::__miter_base<_II>::__b(__first), + std::__miter_base<_II>::__b(__last), __result)); + } + template + struct __copy_move_backward + { + template + static _BI2 + __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) + { + while (__first != __last) + *--__result = *--__last; + return __result; + } + }; + template<> + struct __copy_move_backward + { + template + static _BI2 + __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) + { + typename iterator_traits<_BI1>::difference_type __n; + for (__n = __last - __first; __n > 0; --__n) + *--__result = *--__last; + return __result; + } + }; + template + struct __copy_move_backward<_IsMove, true, random_access_iterator_tag> + { + template + static _Tp* + __copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result) + { + const ptrdiff_t _Num = __last - __first; + __builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num); + return __result - _Num; + } + }; + template + inline _BI2 + __copy_move_backward_a(_BI1 __first, _BI1 __last, _BI2 __result) + { + typedef typename iterator_traits<_BI1>::value_type _ValueType1; + typedef typename iterator_traits<_BI2>::value_type _ValueType2; + typedef typename iterator_traits<_BI1>::iterator_category _Category; + const bool __simple = (__is_pod(_ValueType1) + && __is_pointer<_BI1>::__value + && __is_pointer<_BI2>::__value + && __are_same<_ValueType1, _ValueType2>::__value); + return std::__copy_move_backward<_IsMove, __simple, + _Category>::__copy_move_b(__first, + __last, + __result); + } + template + inline _BI2 + __copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result) + { + return _BI2(std::__copy_move_backward_a<_IsMove> + (std::__niter_base<_BI1>::__b(__first), + std::__niter_base<_BI1>::__b(__last), + std::__niter_base<_BI2>::__b(__result))); + } + template + inline _BI2 + copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) + { + + + + ; + return (std::__copy_move_backward_a2<__is_move_iterator<_BI1>::__value> + (std::__miter_base<_BI1>::__b(__first), + std::__miter_base<_BI1>::__b(__last), __result)); + } + template + inline typename + __gnu_cxx::__enable_if::__value, void>::__type + __fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __value) + { + for (; __first != __last; ++__first) + *__first = __value; + } + template + inline typename + __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type + __fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __value) + { + const _Tp __tmp = __value; + for (; __first != __last; ++__first) + *__first = __tmp; + } + template + inline typename + __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type + __fill_a(_Tp* __first, _Tp* __last, const _Tp& __c) + { + const _Tp __tmp = __c; + __builtin_memset(__first, static_cast(__tmp), + __last - __first); + } + template + inline void + fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) + { + + ; + std::__fill_a(std::__niter_base<_ForwardIterator>::__b(__first), + std::__niter_base<_ForwardIterator>::__b(__last), __value); + } + template + inline typename + __gnu_cxx::__enable_if::__value, _OutputIterator>::__type + __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) + { + for (; __n > 0; --__n, ++__first) + *__first = __value; + return __first; + } + template + inline typename + __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type + __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) + { + const _Tp __tmp = __value; + for (; __n > 0; --__n, ++__first) + *__first = __tmp; + return __first; + } + template + inline typename + __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, _Tp*>::__type + __fill_n_a(_Tp* __first, _Size __n, const _Tp& __c) + { + std::__fill_a(__first, __first + __n, __c); + return __first + __n; + } + template + inline _OI + fill_n(_OI __first, _Size __n, const _Tp& __value) + { + + return _OI(std::__fill_n_a(std::__niter_base<_OI>::__b(__first), + __n, __value)); + } + template + struct __equal + { + template + static bool + equal(_II1 __first1, _II1 __last1, _II2 __first2) + { + for (; __first1 != __last1; ++__first1, ++__first2) + if (!(*__first1 == *__first2)) + return false; + return true; + } + }; + template<> + struct __equal + { + template + static bool + equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2) + { + return !__builtin_memcmp(__first1, __first2, sizeof(_Tp) + * (__last1 - __first1)); + } + }; + template + inline bool + __equal_aux(_II1 __first1, _II1 __last1, _II2 __first2) + { + typedef typename iterator_traits<_II1>::value_type _ValueType1; + typedef typename iterator_traits<_II2>::value_type _ValueType2; + const bool __simple = (__is_integer<_ValueType1>::__value + && __is_pointer<_II1>::__value + && __is_pointer<_II2>::__value + && __are_same<_ValueType1, _ValueType2>::__value); + return std::__equal<__simple>::equal(__first1, __last1, __first2); + } + template + struct __lc_rai + { + template + static _II1 + __newlast1(_II1, _II1 __last1, _II2, _II2) + { return __last1; } + template + static bool + __cnd2(_II __first, _II __last) + { return __first != __last; } + }; + template<> + struct __lc_rai + { + template + static _RAI1 + __newlast1(_RAI1 __first1, _RAI1 __last1, + _RAI2 __first2, _RAI2 __last2) + { + const typename iterator_traits<_RAI1>::difference_type + __diff1 = __last1 - __first1; + const typename iterator_traits<_RAI2>::difference_type + __diff2 = __last2 - __first2; + return __diff2 < __diff1 ? __first1 + __diff2 : __last1; + } + template + static bool + __cnd2(_RAI, _RAI) + { return true; } + }; + template + struct __lexicographical_compare + { + template + static bool __lc(_II1, _II1, _II2, _II2); + }; + template + template + bool + __lexicographical_compare<_BoolType>:: + __lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) + { + typedef typename iterator_traits<_II1>::iterator_category _Category1; + typedef typename iterator_traits<_II2>::iterator_category _Category2; + typedef std::__lc_rai<_Category1, _Category2> __rai_type; + __last1 = __rai_type::__newlast1(__first1, __last1, + __first2, __last2); + for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); + ++__first1, ++__first2) + { + if (*__first1 < *__first2) + return true; + if (*__first2 < *__first1) + return false; + } + return __first1 == __last1 && __first2 != __last2; + } + template<> + struct __lexicographical_compare + { + template + static bool + __lc(const _Tp* __first1, const _Tp* __last1, + const _Up* __first2, const _Up* __last2) + { + const size_t __len1 = __last1 - __first1; + const size_t __len2 = __last2 - __first2; + const int __result = __builtin_memcmp(__first1, __first2, + std::min(__len1, __len2)); + return __result != 0 ? __result < 0 : __len1 < __len2; + } + }; + template + inline bool + __lexicographical_compare_aux(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2) + { + typedef typename iterator_traits<_II1>::value_type _ValueType1; + typedef typename iterator_traits<_II2>::value_type _ValueType2; + const bool __simple = + (__is_byte<_ValueType1>::__value && __is_byte<_ValueType2>::__value + && !__gnu_cxx::__numeric_traits<_ValueType1>::__is_signed + && !__gnu_cxx::__numeric_traits<_ValueType2>::__is_signed + && __is_pointer<_II1>::__value + && __is_pointer<_II2>::__value); + return std::__lexicographical_compare<__simple>::__lc(__first1, __last1, + __first2, __last2); + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + inline bool + equal(_II1 __first1, _II1 __last1, _II2 __first2) + { + + + + ; + return std::__equal_aux(std::__niter_base<_II1>::__b(__first1), + std::__niter_base<_II1>::__b(__last1), + std::__niter_base<_II2>::__b(__first2)); + } + template + inline bool + equal(_IIter1 __first1, _IIter1 __last1, + _IIter2 __first2, _BinaryPredicate __binary_pred) + { + + + ; + for (; __first1 != __last1; ++__first1, ++__first2) + if (!bool(__binary_pred(*__first1, *__first2))) + return false; + return true; + } + template + inline bool + lexicographical_compare(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2) + { + typedef typename iterator_traits<_II1>::value_type _ValueType1; + typedef typename iterator_traits<_II2>::value_type _ValueType2; + + + + + ; + ; + return std::__lexicographical_compare_aux + (std::__niter_base<_II1>::__b(__first1), + std::__niter_base<_II1>::__b(__last1), + std::__niter_base<_II2>::__b(__first2), + std::__niter_base<_II2>::__b(__last2)); + } + template + bool + lexicographical_compare(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2, _Compare __comp) + { + typedef typename iterator_traits<_II1>::iterator_category _Category1; + typedef typename iterator_traits<_II2>::iterator_category _Category2; + typedef std::__lc_rai<_Category1, _Category2> __rai_type; + + + ; + ; + __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2); + for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); + ++__first1, ++__first2) + { + if (__comp(*__first1, *__first2)) + return true; + if (__comp(*__first2, *__first1)) + return false; + } + return __first1 == __last1 && __first2 != __last2; + } + template + pair<_InputIterator1, _InputIterator2> + mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2) + { + + + + ; + while (__first1 != __last1 && *__first1 == *__first2) + { + ++__first1; + ++__first2; + } + return pair<_InputIterator1, _InputIterator2>(__first1, __first2); + } + template + pair<_InputIterator1, _InputIterator2> + mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _BinaryPredicate __binary_pred) + { + + + ; + while (__first1 != __last1 && bool(__binary_pred(*__first1, *__first2))) + { + ++__first1; + ++__first2; + } + return pair<_InputIterator1, _InputIterator2>(__first1, __first2); + } +} + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + using ::mbstate_t; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + using ::wint_t; + using ::btowc; + using ::fgetwc; + using ::fgetws; + using ::fputwc; + using ::fputws; + using ::fwide; + using ::fwprintf; + using ::fwscanf; + using ::getwc; + using ::getwchar; + using ::mbrlen; + using ::mbrtowc; + using ::mbsinit; + using ::mbsrtowcs; + using ::putwc; + using ::putwchar; + using ::swprintf; + using ::swscanf; + using ::ungetwc; + using ::vfwprintf; + using ::vfwscanf; + using ::vswprintf; + using ::vswscanf; + using ::vwprintf; + using ::vwscanf; + using ::wcrtomb; + using ::wcscat; + using ::wcscmp; + using ::wcscoll; + using ::wcscpy; + using ::wcscspn; + using ::wcsftime; + using ::wcslen; + using ::wcsncat; + using ::wcsncmp; + using ::wcsncpy; + using ::wcsrtombs; + using ::wcsspn; + using ::wcstod; + using ::wcstof; + using ::wcstok; + using ::wcstol; + using ::wcstoul; + using ::wcsxfrm; + using ::wctob; + using ::wmemcmp; + using ::wmemcpy; + using ::wmemmove; + using ::wmemset; + using ::wprintf; + using ::wscanf; + using ::wcschr; + using ::wcspbrk; + using ::wcsrchr; + using ::wcsstr; + using ::wmemchr; +} +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + using ::wcstold; + using ::wcstoll; + using ::wcstoull; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + using ::__gnu_cxx::wcstold; + using ::__gnu_cxx::wcstoll; + using ::__gnu_cxx::wcstoull; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + typedef long streamoff; + typedef ptrdiff_t streamsize; + template + class fpos + { + private: + streamoff _M_off; + _StateT _M_state; + public: + fpos() + : _M_off(0), _M_state() { } + fpos(streamoff __off) + : _M_off(__off), _M_state() { } + operator streamoff() const { return _M_off; } + void + state(_StateT __st) + { _M_state = __st; } + _StateT + state() const + { return _M_state; } + fpos& + operator+=(streamoff __off) + { + _M_off += __off; + return *this; + } + fpos& + operator-=(streamoff __off) + { + _M_off -= __off; + return *this; + } + fpos + operator+(streamoff __off) const + { + fpos __pos(*this); + __pos += __off; + return __pos; + } + fpos + operator-(streamoff __off) const + { + fpos __pos(*this); + __pos -= __off; + return __pos; + } + streamoff + operator-(const fpos& __other) const + { return _M_off - __other._M_off; } + }; + template + inline bool + operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) + { return streamoff(__lhs) == streamoff(__rhs); } + template + inline bool + operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) + { return streamoff(__lhs) != streamoff(__rhs); } + typedef fpos streampos; + typedef fpos wstreampos; +} + + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + template + struct _Char_types + { + typedef unsigned long int_type; + typedef std::streampos pos_type; + typedef std::streamoff off_type; + typedef std::mbstate_t state_type; + }; + template + struct char_traits + { + typedef _CharT char_type; + typedef typename _Char_types<_CharT>::int_type int_type; + typedef typename _Char_types<_CharT>::pos_type pos_type; + typedef typename _Char_types<_CharT>::off_type off_type; + typedef typename _Char_types<_CharT>::state_type state_type; + static void + assign(char_type& __c1, const char_type& __c2) + { __c1 = __c2; } + static bool + eq(const char_type& __c1, const char_type& __c2) + { return __c1 == __c2; } + static bool + lt(const char_type& __c1, const char_type& __c2) + { return __c1 < __c2; } + static int + compare(const char_type* __s1, const char_type* __s2, std::size_t __n); + static std::size_t + length(const char_type* __s); + static const char_type* + find(const char_type* __s, std::size_t __n, const char_type& __a); + static char_type* + move(char_type* __s1, const char_type* __s2, std::size_t __n); + static char_type* + copy(char_type* __s1, const char_type* __s2, std::size_t __n); + static char_type* + assign(char_type* __s, std::size_t __n, char_type __a); + static char_type + to_char_type(const int_type& __c) + { return static_cast(__c); } + static int_type + to_int_type(const char_type& __c) + { return static_cast(__c); } + static bool + eq_int_type(const int_type& __c1, const int_type& __c2) + { return __c1 == __c2; } + static int_type + eof() + { return static_cast((-1)); } + static int_type + not_eof(const int_type& __c) + { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); } + }; + template + int + char_traits<_CharT>:: + compare(const char_type* __s1, const char_type* __s2, std::size_t __n) + { + for (std::size_t __i = 0; __i < __n; ++__i) + if (lt(__s1[__i], __s2[__i])) + return -1; + else if (lt(__s2[__i], __s1[__i])) + return 1; + return 0; + } + template + std::size_t + char_traits<_CharT>:: + length(const char_type* __p) + { + std::size_t __i = 0; + while (!eq(__p[__i], char_type())) + ++__i; + return __i; + } + template + const typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + find(const char_type* __s, std::size_t __n, const char_type& __a) + { + for (std::size_t __i = 0; __i < __n; ++__i) + if (eq(__s[__i], __a)) + return __s + __i; + return 0; + } + template + typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + move(char_type* __s1, const char_type* __s2, std::size_t __n) + { + return static_cast<_CharT*>(__builtin_memmove(__s1, __s2, + __n * sizeof(char_type))); + } + template + typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + copy(char_type* __s1, const char_type* __s2, std::size_t __n) + { + std::copy(__s2, __s2 + __n, __s1); + return __s1; + } + template + typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + assign(char_type* __s, std::size_t __n, char_type __a) + { + std::fill_n(__s, __n, __a); + return __s; + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + struct char_traits : public __gnu_cxx::char_traits<_CharT> + { }; + template<> + struct char_traits + { + typedef char char_type; + typedef int int_type; + typedef streampos pos_type; + typedef streamoff off_type; + typedef mbstate_t state_type; + static void + assign(char_type& __c1, const char_type& __c2) + { __c1 = __c2; } + static bool + eq(const char_type& __c1, const char_type& __c2) + { return __c1 == __c2; } + static bool + lt(const char_type& __c1, const char_type& __c2) + { return __c1 < __c2; } + static int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { return __builtin_memcmp(__s1, __s2, __n); } + static size_t + length(const char_type* __s) + { return __builtin_strlen(__s); } + static const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { return static_cast(__builtin_memchr(__s, __a, __n)); } + static char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { return static_cast(__builtin_memmove(__s1, __s2, __n)); } + static char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { return static_cast(__builtin_memcpy(__s1, __s2, __n)); } + static char_type* + assign(char_type* __s, size_t __n, char_type __a) + { return static_cast(__builtin_memset(__s, __a, __n)); } + static char_type + to_char_type(const int_type& __c) + { return static_cast(__c); } + static int_type + to_int_type(const char_type& __c) + { return static_cast(static_cast(__c)); } + static bool + eq_int_type(const int_type& __c1, const int_type& __c2) + { return __c1 == __c2; } + static int_type + eof() + { return static_cast((-1)); } + static int_type + not_eof(const int_type& __c) + { return (__c == eof()) ? 0 : __c; } + }; + template<> + struct char_traits + { + typedef wchar_t char_type; + typedef wint_t int_type; + typedef streamoff off_type; + typedef wstreampos pos_type; + typedef mbstate_t state_type; + static void + assign(char_type& __c1, const char_type& __c2) + { __c1 = __c2; } + static bool + eq(const char_type& __c1, const char_type& __c2) + { return __c1 == __c2; } + static bool + lt(const char_type& __c1, const char_type& __c2) + { return __c1 < __c2; } + static int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { return wmemcmp(__s1, __s2, __n); } + static size_t + length(const char_type* __s) + { return wcslen(__s); } + static const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { return wmemchr(__s, __a, __n); } + static char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { return wmemmove(__s1, __s2, __n); } + static char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { return wmemcpy(__s1, __s2, __n); } + static char_type* + assign(char_type* __s, size_t __n, char_type __a) + { return wmemset(__s, __a, __n); } + static char_type + to_char_type(const int_type& __c) + { return char_type(__c); } + static int_type + to_int_type(const char_type& __c) + { return int_type(__c); } + static bool + eq_int_type(const int_type& __c1, const int_type& __c2) + { return __c1 == __c2; } + static int_type + eof() + { return static_cast((0xffffffffu)); } + static int_type + not_eof(const int_type& __c) + { return eq_int_type(__c, eof()) ? 0 : __c; } + }; +} + +extern "C++" { +namespace std +{ + class exception + { + public: + exception() throw() { } + virtual ~exception() throw(); + virtual const char* what() const throw(); + }; + class bad_exception : public exception + { + public: + bad_exception() throw() { } + virtual ~bad_exception() throw(); + virtual const char* what() const throw(); + }; + typedef void (*terminate_handler) (); + typedef void (*unexpected_handler) (); + terminate_handler set_terminate(terminate_handler) throw(); + void terminate() __attribute__ ((__noreturn__)); + unexpected_handler set_unexpected(unexpected_handler) throw(); + void unexpected() __attribute__ ((__noreturn__)); + bool uncaught_exception() throw(); +} +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + void __verbose_terminate_handler(); +} +} +extern "C++" { +namespace std +{ + class bad_alloc : public exception + { + public: + bad_alloc() throw() { } + virtual ~bad_alloc() throw(); + virtual const char* what() const throw(); + }; + struct nothrow_t { }; + extern const nothrow_t nothrow; + typedef void (*new_handler)(); + new_handler set_new_handler(new_handler) throw(); +} +void* operator new(std::size_t) throw (std::bad_alloc); +void* operator new[](std::size_t) throw (std::bad_alloc); +void operator delete(void*) throw(); +void operator delete[](void*) throw(); +void* operator new(std::size_t, const std::nothrow_t&) throw(); +void* operator new[](std::size_t, const std::nothrow_t&) throw(); +void operator delete(void*, const std::nothrow_t&) throw(); +void operator delete[](void*, const std::nothrow_t&) throw(); +inline void* operator new(std::size_t, void* __p) throw() { return __p; } +inline void* operator new[](std::size_t, void* __p) throw() { return __p; } +inline void operator delete (void*, void*) throw() { } +inline void operator delete[](void*, void*) throw() { } +} +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + using std::size_t; + using std::ptrdiff_t; + template + class new_allocator + { + public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef const _Tp* const_pointer; + typedef _Tp& reference; + typedef const _Tp& const_reference; + typedef _Tp value_type; + template + struct rebind + { typedef new_allocator<_Tp1> other; }; + new_allocator() throw() { } + new_allocator(const new_allocator&) throw() { } + template + new_allocator(const new_allocator<_Tp1>&) throw() { } + ~new_allocator() throw() { } + pointer + address(reference __x) const { return &__x; } + const_pointer + address(const_reference __x) const { return &__x; } + pointer + allocate(size_type __n, const void* = 0) + { + if (__builtin_expect(__n > this->max_size(), false)) + std::__throw_bad_alloc(); + return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); + } + void + deallocate(pointer __p, size_type) + { ::operator delete(__p); } + size_type + max_size() const throw() + { return size_t(-1) / sizeof(_Tp); } + void + construct(pointer __p, const _Tp& __val) + { ::new((void *)__p) _Tp(__val); } + void + destroy(pointer __p) { __p->~_Tp(); } + }; + template + inline bool + operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&) + { return true; } + template + inline bool + operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&) + { return false; } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + class allocator; + template<> + class allocator + { + public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef void* pointer; + typedef const void* const_pointer; + typedef void value_type; + template + struct rebind + { typedef allocator<_Tp1> other; }; + }; + template + class allocator: public __gnu_cxx::new_allocator<_Tp> + { + public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef const _Tp* const_pointer; + typedef _Tp& reference; + typedef const _Tp& const_reference; + typedef _Tp value_type; + template + struct rebind + { typedef allocator<_Tp1> other; }; + allocator() throw() { } + allocator(const allocator& __a) throw() + : __gnu_cxx::new_allocator<_Tp>(__a) { } + template + allocator(const allocator<_Tp1>&) throw() { } + ~allocator() throw() { } + }; + template + inline bool + operator==(const allocator<_T1>&, const allocator<_T2>&) + { return true; } + template + inline bool + operator==(const allocator<_Tp>&, const allocator<_Tp>&) + { return true; } + template + inline bool + operator!=(const allocator<_T1>&, const allocator<_T2>&) + { return false; } + template + inline bool + operator!=(const allocator<_Tp>&, const allocator<_Tp>&) + { return false; } + extern template class allocator; + extern template class allocator; + template + struct __alloc_swap + { static void _S_do_it(_Alloc&, _Alloc&) { } }; + template + struct __alloc_swap<_Alloc, false> + { + static void + _S_do_it(_Alloc& __one, _Alloc& __two) + { + if (__one != __two) + swap(__one, __two); + } + }; + template + struct __alloc_neq + { + static bool + _S_do_it(const _Alloc&, const _Alloc&) + { return false; } + }; + template + struct __alloc_neq<_Alloc, false> + { + static bool + _S_do_it(const _Alloc& __one, const _Alloc& __two) + { return __one != __two; } + }; +} + + + +enum +{ + __LC_CTYPE = 0, + __LC_NUMERIC = 1, + __LC_TIME = 2, + __LC_COLLATE = 3, + __LC_MONETARY = 4, + __LC_MESSAGES = 5, + __LC_ALL = 6, + __LC_PAPER = 7, + __LC_NAME = 8, + __LC_ADDRESS = 9, + __LC_TELEPHONE = 10, + __LC_MEASUREMENT = 11, + __LC_IDENTIFICATION = 12 +}; +extern "C" { +struct lconv +{ + char *decimal_point; + char *thousands_sep; + char *grouping; + char *int_curr_symbol; + char *currency_symbol; + char *mon_decimal_point; + char *mon_thousands_sep; + char *mon_grouping; + char *positive_sign; + char *negative_sign; + char int_frac_digits; + char frac_digits; + char p_cs_precedes; + char p_sep_by_space; + char n_cs_precedes; + char n_sep_by_space; + char p_sign_posn; + char n_sign_posn; + char int_p_cs_precedes; + char int_p_sep_by_space; + char int_n_cs_precedes; + char int_n_sep_by_space; + char int_p_sign_posn; + char int_n_sign_posn; +}; +extern char *setlocale (int __category, __const char *__locale) throw (); +extern struct lconv *localeconv (void) throw (); +extern __locale_t newlocale (int __category_mask, __const char *__locale, + __locale_t __base) throw (); +extern __locale_t duplocale (__locale_t __dataset) throw (); +extern void freelocale (__locale_t __dataset) throw (); +extern __locale_t uselocale (__locale_t __dataset) throw (); +} +namespace std __attribute__ ((__visibility__ ("default"))) { + using ::lconv; + using ::setlocale; + using ::localeconv; +} + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + extern "C" __typeof(uselocale) __uselocale; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + typedef __locale_t __c_locale; + inline int + __convert_from_v(const __c_locale& __cloc __attribute__ ((__unused__)), + char* __out, + const int __size __attribute__ ((__unused__)), + const char* __fmt, ...) + { + __c_locale __old = __gnu_cxx::__uselocale(__cloc); + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); + __builtin_va_end(__args); + __gnu_cxx::__uselocale(__old); + return __ret; + } +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template > + class basic_ios; + template > + class basic_streambuf; + template > + class basic_istream; + template > + class basic_ostream; + template > + class basic_iostream; + template, + typename _Alloc = allocator<_CharT> > + class basic_stringbuf; + template, + typename _Alloc = allocator<_CharT> > + class basic_istringstream; + template, + typename _Alloc = allocator<_CharT> > + class basic_ostringstream; + template, + typename _Alloc = allocator<_CharT> > + class basic_stringstream; + template > + class basic_filebuf; + template > + class basic_ifstream; + template > + class basic_ofstream; + template > + class basic_fstream; + template > + class istreambuf_iterator; + template > + class ostreambuf_iterator; + class ios_base; + typedef basic_ios ios; + typedef basic_streambuf streambuf; + typedef basic_istream istream; + typedef basic_ostream ostream; + typedef basic_iostream iostream; + typedef basic_stringbuf stringbuf; + typedef basic_istringstream istringstream; + typedef basic_ostringstream ostringstream; + typedef basic_stringstream stringstream; + typedef basic_filebuf filebuf; + typedef basic_ifstream ifstream; + typedef basic_ofstream ofstream; + typedef basic_fstream fstream; + typedef basic_ios wios; + typedef basic_streambuf wstreambuf; + typedef basic_istream wistream; + typedef basic_ostream wostream; + typedef basic_iostream wiostream; + typedef basic_stringbuf wstringbuf; + typedef basic_istringstream wistringstream; + typedef basic_ostringstream wostringstream; + typedef basic_stringstream wstringstream; + typedef basic_filebuf wfilebuf; + typedef basic_ifstream wifstream; + typedef basic_ofstream wofstream; + typedef basic_fstream wfstream; +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + using ::isalnum; + using ::isalpha; + using ::iscntrl; + using ::isdigit; + using ::isgraph; + using ::islower; + using ::isprint; + using ::ispunct; + using ::isspace; + using ::isupper; + using ::isxdigit; + using ::tolower; + using ::toupper; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + class locale; + template + bool + has_facet(const locale&) throw(); + template + const _Facet& + use_facet(const locale&); + template + bool + isspace(_CharT, const locale&); + template + bool + isprint(_CharT, const locale&); + template + bool + iscntrl(_CharT, const locale&); + template + bool + isupper(_CharT, const locale&); + template + bool + islower(_CharT, const locale&); + template + bool + isalpha(_CharT, const locale&); + template + bool + isdigit(_CharT, const locale&); + template + bool + ispunct(_CharT, const locale&); + template + bool + isxdigit(_CharT, const locale&); + template + bool + isalnum(_CharT, const locale&); + template + bool + isgraph(_CharT, const locale&); + template + _CharT + toupper(_CharT, const locale&); + template + _CharT + tolower(_CharT, const locale&); + class ctype_base; + template + class ctype; + template<> class ctype; + template<> class ctype; + template + class ctype_byname; + class codecvt_base; + template + class codecvt; + template<> class codecvt; + template<> class codecvt; + template + class codecvt_byname; + template > + class num_get; + template > + class num_put; + template class numpunct; + template class numpunct_byname; + template + class collate; + template class + collate_byname; + class time_base; + template > + class time_get; + template > + class time_get_byname; + template > + class time_put; + template > + class time_put_byname; + class money_base; + template > + class money_get; + template > + class money_put; + template + class moneypunct; + template + class moneypunct_byname; + class messages_base; + template + class messages; + template + class messages_byname; +} + +namespace __cxxabiv1 +{ + class __forced_unwind + { + virtual ~__forced_unwind() throw(); + virtual void __pure_dummy() = 0; + }; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + inline void + __ostream_write(basic_ostream<_CharT, _Traits>& __out, + const _CharT* __s, streamsize __n) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + const streamsize __put = __out.rdbuf()->sputn(__s, __n); + if (__put != __n) + __out.setstate(__ios_base::badbit); + } + template + inline void + __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + const _CharT __c = __out.fill(); + for (; __n > 0; --__n) + { + const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c); + if (_Traits::eq_int_type(__put, _Traits::eof())) + { + __out.setstate(__ios_base::badbit); + break; + } + } + } + template + basic_ostream<_CharT, _Traits>& + __ostream_insert(basic_ostream<_CharT, _Traits>& __out, + const _CharT* __s, streamsize __n) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + typename __ostream_type::sentry __cerb(__out); + if (__cerb) + { + try + { + const streamsize __w = __out.width(); + if (__w > __n) + { + const bool __left = ((__out.flags() + & __ios_base::adjustfield) + == __ios_base::left); + if (!__left) + __ostream_fill(__out, __w - __n); + if (__out.good()) + __ostream_write(__out, __s, __n); + if (__left && __out.good()) + __ostream_fill(__out, __w - __n); + } + else + __ostream_write(__out, __s, __n); + __out.width(0); + } + catch(__cxxabiv1::__forced_unwind&) + { + __out._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { __out._M_setstate(__ios_base::badbit); } + } + return __out; + } + extern template ostream& __ostream_insert(ostream&, const char*, streamsize); + extern template wostream& __ostream_insert(wostream&, const wchar_t*, + streamsize); +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + struct unary_function + { + typedef _Arg argument_type; + typedef _Result result_type; + }; + template + struct binary_function + { + typedef _Arg1 first_argument_type; + typedef _Arg2 second_argument_type; + typedef _Result result_type; + }; + template + struct plus : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x + __y; } + }; + template + struct minus : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x - __y; } + }; + template + struct multiplies : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x * __y; } + }; + template + struct divides : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x / __y; } + }; + template + struct modulus : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x % __y; } + }; + template + struct negate : public unary_function<_Tp, _Tp> + { + _Tp + operator()(const _Tp& __x) const + { return -__x; } + }; + template + struct equal_to : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x == __y; } + }; + template + struct not_equal_to : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x != __y; } + }; + template + struct greater : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x > __y; } + }; + template + struct less : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x < __y; } + }; + template + struct greater_equal : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x >= __y; } + }; + template + struct less_equal : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x <= __y; } + }; + template + struct logical_and : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x && __y; } + }; + template + struct logical_or : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x || __y; } + }; + template + struct logical_not : public unary_function<_Tp, bool> + { + bool + operator()(const _Tp& __x) const + { return !__x; } + }; + template + struct bit_and : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x & __y; } + }; + template + struct bit_or : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x | __y; } + }; + template + struct bit_xor : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x ^ __y; } + }; + template + class unary_negate + : public unary_function + { + protected: + _Predicate _M_pred; + public: + explicit + unary_negate(const _Predicate& __x) : _M_pred(__x) { } + bool + operator()(const typename _Predicate::argument_type& __x) const + { return !_M_pred(__x); } + }; + template + inline unary_negate<_Predicate> + not1(const _Predicate& __pred) + { return unary_negate<_Predicate>(__pred); } + template + class binary_negate + : public binary_function + { + protected: + _Predicate _M_pred; + public: + explicit + binary_negate(const _Predicate& __x) : _M_pred(__x) { } + bool + operator()(const typename _Predicate::first_argument_type& __x, + const typename _Predicate::second_argument_type& __y) const + { return !_M_pred(__x, __y); } + }; + template + inline binary_negate<_Predicate> + not2(const _Predicate& __pred) + { return binary_negate<_Predicate>(__pred); } + template + class pointer_to_unary_function : public unary_function<_Arg, _Result> + { + protected: + _Result (*_M_ptr)(_Arg); + public: + pointer_to_unary_function() { } + explicit + pointer_to_unary_function(_Result (*__x)(_Arg)) + : _M_ptr(__x) { } + _Result + operator()(_Arg __x) const + { return _M_ptr(__x); } + }; + template + inline pointer_to_unary_function<_Arg, _Result> + ptr_fun(_Result (*__x)(_Arg)) + { return pointer_to_unary_function<_Arg, _Result>(__x); } + template + class pointer_to_binary_function + : public binary_function<_Arg1, _Arg2, _Result> + { + protected: + _Result (*_M_ptr)(_Arg1, _Arg2); + public: + pointer_to_binary_function() { } + explicit + pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) + : _M_ptr(__x) { } + _Result + operator()(_Arg1 __x, _Arg2 __y) const + { return _M_ptr(__x, __y); } + }; + template + inline pointer_to_binary_function<_Arg1, _Arg2, _Result> + ptr_fun(_Result (*__x)(_Arg1, _Arg2)) + { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); } + template + struct _Identity : public unary_function<_Tp,_Tp> + { + _Tp& + operator()(_Tp& __x) const + { return __x; } + const _Tp& + operator()(const _Tp& __x) const + { return __x; } + }; + template + struct _Select1st : public unary_function<_Pair, + typename _Pair::first_type> + { + typename _Pair::first_type& + operator()(_Pair& __x) const + { return __x.first; } + const typename _Pair::first_type& + operator()(const _Pair& __x) const + { return __x.first; } + }; + template + struct _Select2nd : public unary_function<_Pair, + typename _Pair::second_type> + { + typename _Pair::second_type& + operator()(_Pair& __x) const + { return __x.second; } + const typename _Pair::second_type& + operator()(const _Pair& __x) const + { return __x.second; } + }; + template + class mem_fun_t : public unary_function<_Tp*, _Ret> + { + public: + explicit + mem_fun_t(_Ret (_Tp::*__pf)()) + : _M_f(__pf) { } + _Ret + operator()(_Tp* __p) const + { return (__p->*_M_f)(); } + private: + _Ret (_Tp::*_M_f)(); + }; + template + class const_mem_fun_t : public unary_function + { + public: + explicit + const_mem_fun_t(_Ret (_Tp::*__pf)() const) + : _M_f(__pf) { } + _Ret + operator()(const _Tp* __p) const + { return (__p->*_M_f)(); } + private: + _Ret (_Tp::*_M_f)() const; + }; + template + class mem_fun_ref_t : public unary_function<_Tp, _Ret> + { + public: + explicit + mem_fun_ref_t(_Ret (_Tp::*__pf)()) + : _M_f(__pf) { } + _Ret + operator()(_Tp& __r) const + { return (__r.*_M_f)(); } + private: + _Ret (_Tp::*_M_f)(); + }; + template + class const_mem_fun_ref_t : public unary_function<_Tp, _Ret> + { + public: + explicit + const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) + : _M_f(__pf) { } + _Ret + operator()(const _Tp& __r) const + { return (__r.*_M_f)(); } + private: + _Ret (_Tp::*_M_f)() const; + }; + template + class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret> + { + public: + explicit + mem_fun1_t(_Ret (_Tp::*__pf)(_Arg)) + : _M_f(__pf) { } + _Ret + operator()(_Tp* __p, _Arg __x) const + { return (__p->*_M_f)(__x); } + private: + _Ret (_Tp::*_M_f)(_Arg); + }; + template + class const_mem_fun1_t : public binary_function + { + public: + explicit + const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const) + : _M_f(__pf) { } + _Ret + operator()(const _Tp* __p, _Arg __x) const + { return (__p->*_M_f)(__x); } + private: + _Ret (_Tp::*_M_f)(_Arg) const; + }; + template + class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> + { + public: + explicit + mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg)) + : _M_f(__pf) { } + _Ret + operator()(_Tp& __r, _Arg __x) const + { return (__r.*_M_f)(__x); } + private: + _Ret (_Tp::*_M_f)(_Arg); + }; + template + class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> + { + public: + explicit + const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const) + : _M_f(__pf) { } + _Ret + operator()(const _Tp& __r, _Arg __x) const + { return (__r.*_M_f)(__x); } + private: + _Ret (_Tp::*_M_f)(_Arg) const; + }; + template + inline mem_fun_t<_Ret, _Tp> + mem_fun(_Ret (_Tp::*__f)()) + { return mem_fun_t<_Ret, _Tp>(__f); } + template + inline const_mem_fun_t<_Ret, _Tp> + mem_fun(_Ret (_Tp::*__f)() const) + { return const_mem_fun_t<_Ret, _Tp>(__f); } + template + inline mem_fun_ref_t<_Ret, _Tp> + mem_fun_ref(_Ret (_Tp::*__f)()) + { return mem_fun_ref_t<_Ret, _Tp>(__f); } + template + inline const_mem_fun_ref_t<_Ret, _Tp> + mem_fun_ref(_Ret (_Tp::*__f)() const) + { return const_mem_fun_ref_t<_Ret, _Tp>(__f); } + template + inline mem_fun1_t<_Ret, _Tp, _Arg> + mem_fun(_Ret (_Tp::*__f)(_Arg)) + { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); } + template + inline const_mem_fun1_t<_Ret, _Tp, _Arg> + mem_fun(_Ret (_Tp::*__f)(_Arg) const) + { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); } + template + inline mem_fun1_ref_t<_Ret, _Tp, _Arg> + mem_fun_ref(_Ret (_Tp::*__f)(_Arg)) + { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } + template + inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg> + mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const) + { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + class binder1st + : public unary_function + { + protected: + _Operation op; + typename _Operation::first_argument_type value; + public: + binder1st(const _Operation& __x, + const typename _Operation::first_argument_type& __y) + : op(__x), value(__y) { } + typename _Operation::result_type + operator()(const typename _Operation::second_argument_type& __x) const + { return op(value, __x); } + typename _Operation::result_type + operator()(typename _Operation::second_argument_type& __x) const + { return op(value, __x); } + } ; + template + inline binder1st<_Operation> + bind1st(const _Operation& __fn, const _Tp& __x) + { + typedef typename _Operation::first_argument_type _Arg1_type; + return binder1st<_Operation>(__fn, _Arg1_type(__x)); + } + template + class binder2nd + : public unary_function + { + protected: + _Operation op; + typename _Operation::second_argument_type value; + public: + binder2nd(const _Operation& __x, + const typename _Operation::second_argument_type& __y) + : op(__x), value(__y) { } + typename _Operation::result_type + operator()(const typename _Operation::first_argument_type& __x) const + { return op(__x, value); } + typename _Operation::result_type + operator()(typename _Operation::first_argument_type& __x) const + { return op(__x, value); } + } ; + template + inline binder2nd<_Operation> + bind2nd(const _Operation& __fn, const _Tp& __x) + { + typedef typename _Operation::second_argument_type _Arg2_type; + return binder2nd<_Operation>(__fn, _Arg2_type(__x)); + } +} + +struct sched_param + { + int __sched_priority; + }; +extern "C" { +extern int clone (int (*__fn) (void *__arg), void *__child_stack, + int __flags, void *__arg, ...) throw (); +extern int unshare (int __flags) throw (); +extern int sched_getcpu (void) throw (); +} +struct __sched_param + { + int __sched_priority; + }; +typedef unsigned long int __cpu_mask; +typedef struct +{ + __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; +} cpu_set_t; +extern "C" { +extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) + throw (); +extern cpu_set_t *__sched_cpualloc (size_t __count) throw () ; +extern void __sched_cpufree (cpu_set_t *__set) throw (); +} +extern "C" { +extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param) + throw (); +extern int sched_getparam (__pid_t __pid, struct sched_param *__param) throw (); +extern int sched_setscheduler (__pid_t __pid, int __policy, + __const struct sched_param *__param) throw (); +extern int sched_getscheduler (__pid_t __pid) throw (); +extern int sched_yield (void) throw (); +extern int sched_get_priority_max (int __algorithm) throw (); +extern int sched_get_priority_min (int __algorithm) throw (); +extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) throw (); +extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, + __const cpu_set_t *__cpuset) throw (); +extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, + cpu_set_t *__cpuset) throw (); +} +enum +{ + PTHREAD_CREATE_JOINABLE, + PTHREAD_CREATE_DETACHED +}; +enum +{ + PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_ADAPTIVE_NP + , + PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL + , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP +}; +enum +{ + PTHREAD_MUTEX_STALLED, + PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, + PTHREAD_MUTEX_ROBUST, + PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST +}; +enum +{ + PTHREAD_PRIO_NONE, + PTHREAD_PRIO_INHERIT, + PTHREAD_PRIO_PROTECT +}; +enum +{ + PTHREAD_RWLOCK_PREFER_READER_NP, + PTHREAD_RWLOCK_PREFER_WRITER_NP, + PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, + PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP +}; +enum +{ + PTHREAD_INHERIT_SCHED, + PTHREAD_EXPLICIT_SCHED +}; +enum +{ + PTHREAD_SCOPE_SYSTEM, + PTHREAD_SCOPE_PROCESS +}; +enum +{ + PTHREAD_PROCESS_PRIVATE, + PTHREAD_PROCESS_SHARED +}; +struct _pthread_cleanup_buffer +{ + void (*__routine) (void *); + void *__arg; + int __canceltype; + struct _pthread_cleanup_buffer *__prev; +}; +enum +{ + PTHREAD_CANCEL_ENABLE, + PTHREAD_CANCEL_DISABLE +}; +enum +{ + PTHREAD_CANCEL_DEFERRED, + PTHREAD_CANCEL_ASYNCHRONOUS +}; +extern "C" { +extern int pthread_create (pthread_t *__restrict __newthread, + __const pthread_attr_t *__restrict __attr, + void *(*__start_routine) (void *), + void *__restrict __arg) throw () __attribute__ ((__nonnull__ (1, 3))); +extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); +extern int pthread_join (pthread_t __th, void **__thread_return); +extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) throw (); +extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, + __const struct timespec *__abstime); +extern int pthread_detach (pthread_t __th) throw (); +extern pthread_t pthread_self (void) throw () __attribute__ ((__const__)); +extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) throw (); +extern int pthread_attr_init (pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_destroy (pthread_attr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, + int *__detachstate) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, + int __detachstate) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, + size_t *__guardsize) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setguardsize (pthread_attr_t *__attr, + size_t __guardsize) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict + __attr, + struct sched_param *__restrict __param) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, + __const struct sched_param *__restrict + __param) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict + __attr, int *__restrict __policy) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict + __attr, int *__restrict __inherit) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, + int __inherit) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, + int *__restrict __scope) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict + __attr, void **__restrict __stackaddr) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); +extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, + void *__stackaddr) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); +extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict + __attr, size_t *__restrict __stacksize) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setstacksize (pthread_attr_t *__attr, + size_t __stacksize) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, + void **__restrict __stackaddr, + size_t *__restrict __stacksize) + throw () __attribute__ ((__nonnull__ (1, 2, 3))); +extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, + size_t __stacksize) throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, + size_t __cpusetsize, + __const cpu_set_t *__cpuset) + throw () __attribute__ ((__nonnull__ (1, 3))); +extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr, + size_t __cpusetsize, + cpu_set_t *__cpuset) + throw () __attribute__ ((__nonnull__ (1, 3))); +extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) + throw () __attribute__ ((__nonnull__ (2))); +extern int pthread_setschedparam (pthread_t __target_thread, int __policy, + __const struct sched_param *__param) + throw () __attribute__ ((__nonnull__ (3))); +extern int pthread_getschedparam (pthread_t __target_thread, + int *__restrict __policy, + struct sched_param *__restrict __param) + throw () __attribute__ ((__nonnull__ (2, 3))); +extern int pthread_setschedprio (pthread_t __target_thread, int __prio) + throw (); +extern int pthread_getconcurrency (void) throw (); +extern int pthread_setconcurrency (int __level) throw (); +extern int pthread_yield (void) throw (); +extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, + __const cpu_set_t *__cpuset) + throw () __attribute__ ((__nonnull__ (3))); +extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, + cpu_set_t *__cpuset) + throw () __attribute__ ((__nonnull__ (3))); +extern int pthread_once (pthread_once_t *__once_control, + void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_setcancelstate (int __state, int *__oldstate); +extern int pthread_setcanceltype (int __type, int *__oldtype); +extern int pthread_cancel (pthread_t __th); +extern void pthread_testcancel (void); +typedef struct +{ + struct + { + __jmp_buf __cancel_jmp_buf; + int __mask_was_saved; + } __cancel_jmp_buf[1]; + void *__pad[4]; +} __pthread_unwind_buf_t __attribute__ ((__aligned__)); +struct __pthread_cleanup_frame +{ + void (*__cancel_routine) (void *); + void *__cancel_arg; + int __do_it; + int __cancel_type; +}; +class __pthread_cleanup_class +{ + void (*__cancel_routine) (void *); + void *__cancel_arg; + int __do_it; + int __cancel_type; + public: + __pthread_cleanup_class (void (*__fct) (void *), void *__arg) + : __cancel_routine (__fct), __cancel_arg (__arg), __do_it (1) { } + ~__pthread_cleanup_class () { if (__do_it) __cancel_routine (__cancel_arg); } + void __setdoit (int __newval) { __do_it = __newval; } + void __defer () { pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, + &__cancel_type); } + void __restore () const { pthread_setcanceltype (__cancel_type, 0); } +}; +struct __jmp_buf_tag; +extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) throw (); +extern int pthread_mutex_init (pthread_mutex_t *__mutex, + __const pthread_mutexattr_t *__mutexattr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutex_lock (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, + __const struct timespec *__restrict + __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutex_getprioceiling (__const pthread_mutex_t * + __restrict __mutex, + int *__restrict __prioceiling) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, + int __prioceiling, + int *__restrict __old_ceiling) + throw () __attribute__ ((__nonnull__ (1, 3))); +extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __pshared) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, + int __pshared) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict + __attr, int *__restrict __kind) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __protocol) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, + int __protocol) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __prioceiling) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, + int __prioceiling) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr, + int *__robustness) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr, + int *__robustness) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, + int __robustness) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, + int __robustness) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, + __const pthread_rwlockattr_t *__restrict + __attr) throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, + __const struct timespec *__restrict + __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, + __const struct timespec *__restrict + __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * + __restrict __attr, + int *__restrict __pshared) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, + int __pshared) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t * + __restrict __attr, + int *__restrict __pref) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, + int __pref) throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_cond_init (pthread_cond_t *__restrict __cond, + __const pthread_condattr_t *__restrict + __cond_attr) throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_cond_destroy (pthread_cond_t *__cond) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_cond_signal (pthread_cond_t *__cond) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_cond_broadcast (pthread_cond_t *__cond) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex) + __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex, + __const struct timespec *__restrict + __abstime) __attribute__ ((__nonnull__ (1, 2, 3))); +extern int pthread_condattr_init (pthread_condattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_condattr_destroy (pthread_condattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_condattr_getpshared (__const pthread_condattr_t * + __restrict __attr, + int *__restrict __pshared) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, + int __pshared) throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_condattr_getclock (__const pthread_condattr_t * + __restrict __attr, + __clockid_t *__restrict __clock_id) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_condattr_setclock (pthread_condattr_t *__attr, + __clockid_t __clock_id) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_spin_destroy (pthread_spinlock_t *__lock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_spin_lock (pthread_spinlock_t *__lock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_spin_trylock (pthread_spinlock_t *__lock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_spin_unlock (pthread_spinlock_t *__lock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, + __const pthread_barrierattr_t *__restrict + __attr, unsigned int __count) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_barrier_wait (pthread_barrier_t *__barrier) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * + __restrict __attr, + int *__restrict __pshared) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, + int __pshared) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_key_create (pthread_key_t *__key, + void (*__destr_function) (void *)) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_key_delete (pthread_key_t __key) throw (); +extern void *pthread_getspecific (pthread_key_t __key) throw (); +extern int pthread_setspecific (pthread_key_t __key, + __const void *__pointer) throw () ; +extern int pthread_getcpuclockid (pthread_t __thread_id, + __clockid_t *__clock_id) + throw () __attribute__ ((__nonnull__ (2))); +extern int pthread_atfork (void (*__prepare) (void), + void (*__parent) (void), + void (*__child) (void)) throw (); +} +typedef pthread_t __gthread_t; +typedef pthread_key_t __gthread_key_t; +typedef pthread_once_t __gthread_once_t; +typedef pthread_mutex_t __gthread_mutex_t; +typedef pthread_mutex_t __gthread_recursive_mutex_t; +typedef pthread_cond_t __gthread_cond_t; +typedef struct timespec __gthread_time_t; +static __typeof(pthread_once) __gthrw_pthread_once __attribute__ ((__weakref__("pthread_once"))); +static __typeof(pthread_getspecific) __gthrw_pthread_getspecific __attribute__ ((__weakref__("pthread_getspecific"))); +static __typeof(pthread_setspecific) __gthrw_pthread_setspecific __attribute__ ((__weakref__("pthread_setspecific"))); +static __typeof(pthread_create) __gthrw_pthread_create __attribute__ ((__weakref__("pthread_create"))); +static __typeof(pthread_join) __gthrw_pthread_join __attribute__ ((__weakref__("pthread_join"))); +static __typeof(pthread_equal) __gthrw_pthread_equal __attribute__ ((__weakref__("pthread_equal"))); +static __typeof(pthread_self) __gthrw_pthread_self __attribute__ ((__weakref__("pthread_self"))); +static __typeof(pthread_detach) __gthrw_pthread_detach __attribute__ ((__weakref__("pthread_detach"))); +static __typeof(pthread_cancel) __gthrw_pthread_cancel __attribute__ ((__weakref__("pthread_cancel"))); +static __typeof(sched_yield) __gthrw_sched_yield __attribute__ ((__weakref__("sched_yield"))); +static __typeof(pthread_mutex_lock) __gthrw_pthread_mutex_lock __attribute__ ((__weakref__("pthread_mutex_lock"))); +static __typeof(pthread_mutex_trylock) __gthrw_pthread_mutex_trylock __attribute__ ((__weakref__("pthread_mutex_trylock"))); +static __typeof(pthread_mutex_timedlock) __gthrw_pthread_mutex_timedlock __attribute__ ((__weakref__("pthread_mutex_timedlock"))); +static __typeof(pthread_mutex_unlock) __gthrw_pthread_mutex_unlock __attribute__ ((__weakref__("pthread_mutex_unlock"))); +static __typeof(pthread_mutex_init) __gthrw_pthread_mutex_init __attribute__ ((__weakref__("pthread_mutex_init"))); +static __typeof(pthread_mutex_destroy) __gthrw_pthread_mutex_destroy __attribute__ ((__weakref__("pthread_mutex_destroy"))); +static __typeof(pthread_cond_broadcast) __gthrw_pthread_cond_broadcast __attribute__ ((__weakref__("pthread_cond_broadcast"))); +static __typeof(pthread_cond_signal) __gthrw_pthread_cond_signal __attribute__ ((__weakref__("pthread_cond_signal"))); +static __typeof(pthread_cond_wait) __gthrw_pthread_cond_wait __attribute__ ((__weakref__("pthread_cond_wait"))); +static __typeof(pthread_cond_timedwait) __gthrw_pthread_cond_timedwait __attribute__ ((__weakref__("pthread_cond_timedwait"))); +static __typeof(pthread_cond_destroy) __gthrw_pthread_cond_destroy __attribute__ ((__weakref__("pthread_cond_destroy"))); +static __typeof(pthread_key_create) __gthrw_pthread_key_create __attribute__ ((__weakref__("pthread_key_create"))); +static __typeof(pthread_key_delete) __gthrw_pthread_key_delete __attribute__ ((__weakref__("pthread_key_delete"))); +static __typeof(pthread_mutexattr_init) __gthrw_pthread_mutexattr_init __attribute__ ((__weakref__("pthread_mutexattr_init"))); +static __typeof(pthread_mutexattr_settype) __gthrw_pthread_mutexattr_settype __attribute__ ((__weakref__("pthread_mutexattr_settype"))); +static __typeof(pthread_mutexattr_destroy) __gthrw_pthread_mutexattr_destroy __attribute__ ((__weakref__("pthread_mutexattr_destroy"))); +static inline int +__gthread_active_p (void) +{ + static void *const __gthread_active_ptr + = __extension__ (void *) &__gthrw_pthread_cancel; + return __gthread_active_ptr != 0; +} +static inline int +__gthread_create (__gthread_t *__threadid, void *(*__func) (void*), + void *__args) +{ + return __gthrw_pthread_create (__threadid, __null, __func, __args); +} +static inline int +__gthread_join (__gthread_t __threadid, void **__value_ptr) +{ + return __gthrw_pthread_join (__threadid, __value_ptr); +} +static inline int +__gthread_detach (__gthread_t __threadid) +{ + return __gthrw_pthread_detach (__threadid); +} +static inline int +__gthread_equal (__gthread_t __t1, __gthread_t __t2) +{ + return __gthrw_pthread_equal (__t1, __t2); +} +static inline __gthread_t +__gthread_self (void) +{ + return __gthrw_pthread_self (); +} +static inline int +__gthread_yield (void) +{ + return __gthrw_sched_yield (); +} +static inline int +__gthread_once (__gthread_once_t *__once, void (*__func) (void)) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_once (__once, __func); + else + return -1; +} +static inline int +__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *)) +{ + return __gthrw_pthread_key_create (__key, __dtor); +} +static inline int +__gthread_key_delete (__gthread_key_t __key) +{ + return __gthrw_pthread_key_delete (__key); +} +static inline void * +__gthread_getspecific (__gthread_key_t __key) +{ + return __gthrw_pthread_getspecific (__key); +} +static inline int +__gthread_setspecific (__gthread_key_t __key, const void *__ptr) +{ + return __gthrw_pthread_setspecific (__key, __ptr); +} +static inline int +__gthread_mutex_destroy (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_destroy (__mutex); + else + return 0; +} +static inline int +__gthread_mutex_lock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_lock (__mutex); + else + return 0; +} +static inline int +__gthread_mutex_trylock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_trylock (__mutex); + else + return 0; +} +static inline int +__gthread_mutex_timedlock (__gthread_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_timedlock (__mutex, __abs_timeout); + else + return 0; +} +static inline int +__gthread_mutex_unlock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_unlock (__mutex); + else + return 0; +} +static inline int +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_lock (__mutex); +} +static inline int +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_trylock (__mutex); +} +static inline int +__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return __gthread_mutex_timedlock (__mutex, __abs_timeout); +} +static inline int +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_unlock (__mutex); +} +static inline int +__gthread_cond_broadcast (__gthread_cond_t *__cond) +{ + return __gthrw_pthread_cond_broadcast (__cond); +} +static inline int +__gthread_cond_signal (__gthread_cond_t *__cond) +{ + return __gthrw_pthread_cond_signal (__cond); +} +static inline int +__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex) +{ + return __gthrw_pthread_cond_wait (__cond, __mutex); +} +static inline int +__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return __gthrw_pthread_cond_timedwait (__cond, __mutex, __abs_timeout); +} +static inline int +__gthread_cond_wait_recursive (__gthread_cond_t *__cond, + __gthread_recursive_mutex_t *__mutex) +{ + return __gthread_cond_wait (__cond, __mutex); +} +static inline int +__gthread_cond_timedwait_recursive (__gthread_cond_t *__cond, + __gthread_recursive_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return __gthread_cond_timedwait (__cond, __mutex, __abs_timeout); +} +static inline int +__gthread_cond_destroy (__gthread_cond_t* __cond) +{ + return __gthrw_pthread_cond_destroy (__cond); +} +typedef int _Atomic_word; +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + static inline _Atomic_word + __exchange_and_add(volatile _Atomic_word* __mem, int __val) + { return __sync_fetch_and_add(__mem, __val); } + static inline void + __atomic_add(volatile _Atomic_word* __mem, int __val) + { __sync_fetch_and_add(__mem, __val); } + static inline _Atomic_word + __exchange_and_add_single(_Atomic_word* __mem, int __val) + { + _Atomic_word __result = *__mem; + *__mem += __val; + return __result; + } + static inline void + __atomic_add_single(_Atomic_word* __mem, int __val) + { *__mem += __val; } + static inline _Atomic_word + __attribute__ ((__unused__)) + __exchange_and_add_dispatch(_Atomic_word* __mem, int __val) + { + if (__gthread_active_p()) + return __exchange_and_add(__mem, __val); + else + return __exchange_and_add_single(__mem, __val); + } + static inline void + __attribute__ ((__unused__)) + __atomic_add_dispatch(_Atomic_word* __mem, int __val) + { + if (__gthread_active_p()) + __atomic_add(__mem, __val); + else + __atomic_add_single(__mem, __val); + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + class basic_string + { + typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type; + public: + typedef _Traits traits_type; + typedef typename _Traits::char_type value_type; + typedef _Alloc allocator_type; + typedef typename _CharT_alloc_type::size_type size_type; + typedef typename _CharT_alloc_type::difference_type difference_type; + typedef typename _CharT_alloc_type::reference reference; + typedef typename _CharT_alloc_type::const_reference const_reference; + typedef typename _CharT_alloc_type::pointer pointer; + typedef typename _CharT_alloc_type::const_pointer const_pointer; + typedef __gnu_cxx::__normal_iterator iterator; + typedef __gnu_cxx::__normal_iterator + const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + private: + struct _Rep_base + { + size_type _M_length; + size_type _M_capacity; + _Atomic_word _M_refcount; + }; + struct _Rep : _Rep_base + { + typedef typename _Alloc::template rebind::other _Raw_bytes_alloc; + static const size_type _S_max_size; + static const _CharT _S_terminal; + static size_type _S_empty_rep_storage[]; + static _Rep& + _S_empty_rep() + { + void* __p = reinterpret_cast(&_S_empty_rep_storage); + return *reinterpret_cast<_Rep*>(__p); + } + bool + _M_is_leaked() const + { return this->_M_refcount < 0; } + bool + _M_is_shared() const + { return this->_M_refcount > 0; } + void + _M_set_leaked() + { this->_M_refcount = -1; } + void + _M_set_sharable() + { this->_M_refcount = 0; } + void + _M_set_length_and_sharable(size_type __n) + { + if (__builtin_expect(this != &_S_empty_rep(), false)) + { + this->_M_set_sharable(); + this->_M_length = __n; + traits_type::assign(this->_M_refdata()[__n], _S_terminal); + } + } + _CharT* + _M_refdata() throw() + { return reinterpret_cast<_CharT*>(this + 1); } + _CharT* + _M_grab(const _Alloc& __alloc1, const _Alloc& __alloc2) + { + return (!_M_is_leaked() && __alloc1 == __alloc2) + ? _M_refcopy() : _M_clone(__alloc1); + } + static _Rep* + _S_create(size_type, size_type, const _Alloc&); + void + _M_dispose(const _Alloc& __a) + { + if (__builtin_expect(this != &_S_empty_rep(), false)) + if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount, + -1) <= 0) + _M_destroy(__a); + } + void + _M_destroy(const _Alloc&) throw(); + _CharT* + _M_refcopy() throw() + { + if (__builtin_expect(this != &_S_empty_rep(), false)) + __gnu_cxx::__atomic_add_dispatch(&this->_M_refcount, 1); + return _M_refdata(); + } + _CharT* + _M_clone(const _Alloc&, size_type __res = 0); + }; + struct _Alloc_hider : _Alloc + { + _Alloc_hider(_CharT* __dat, const _Alloc& __a) + : _Alloc(__a), _M_p(__dat) { } + _CharT* _M_p; + }; + public: + static const size_type npos = static_cast(-1); + private: + mutable _Alloc_hider _M_dataplus; + _CharT* + _M_data() const + { return _M_dataplus._M_p; } + _CharT* + _M_data(_CharT* __p) + { return (_M_dataplus._M_p = __p); } + _Rep* + _M_rep() const + { return &((reinterpret_cast<_Rep*> (_M_data()))[-1]); } + iterator + _M_ibegin() const + { return iterator(_M_data()); } + iterator + _M_iend() const + { return iterator(_M_data() + this->size()); } + void + _M_leak() + { + if (!_M_rep()->_M_is_leaked()) + _M_leak_hard(); + } + size_type + _M_check(size_type __pos, const char* __s) const + { + if (__pos > this->size()) + __throw_out_of_range((__s)); + return __pos; + } + void + _M_check_length(size_type __n1, size_type __n2, const char* __s) const + { + if (this->max_size() - (this->size() - __n1) < __n2) + __throw_length_error((__s)); + } + size_type + _M_limit(size_type __pos, size_type __off) const + { + const bool __testoff = __off < this->size() - __pos; + return __testoff ? __off : this->size() - __pos; + } + bool + _M_disjunct(const _CharT* __s) const + { + return (less()(__s, _M_data()) + || less()(_M_data() + this->size(), __s)); + } + static void + _M_copy(_CharT* __d, const _CharT* __s, size_type __n) + { + if (__n == 1) + traits_type::assign(*__d, *__s); + else + traits_type::copy(__d, __s, __n); + } + static void + _M_move(_CharT* __d, const _CharT* __s, size_type __n) + { + if (__n == 1) + traits_type::assign(*__d, *__s); + else + traits_type::move(__d, __s, __n); + } + static void + _M_assign(_CharT* __d, size_type __n, _CharT __c) + { + if (__n == 1) + traits_type::assign(*__d, __c); + else + traits_type::assign(__d, __n, __c); + } + template + static void + _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) + { + for (; __k1 != __k2; ++__k1, ++__p) + traits_type::assign(*__p, *__k1); + } + static void + _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) + { _S_copy_chars(__p, __k1.base(), __k2.base()); } + static void + _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) + { _S_copy_chars(__p, __k1.base(), __k2.base()); } + static void + _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) + { _M_copy(__p, __k1, __k2 - __k1); } + static void + _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) + { _M_copy(__p, __k1, __k2 - __k1); } + static int + _S_compare(size_type __n1, size_type __n2) + { + const difference_type __d = difference_type(__n1 - __n2); + if (__d > __gnu_cxx::__numeric_traits::__max) + return __gnu_cxx::__numeric_traits::__max; + else if (__d < __gnu_cxx::__numeric_traits::__min) + return __gnu_cxx::__numeric_traits::__min; + else + return int(__d); + } + void + _M_mutate(size_type __pos, size_type __len1, size_type __len2); + void + _M_leak_hard(); + static _Rep& + _S_empty_rep() + { return _Rep::_S_empty_rep(); } + public: + inline + basic_string(); + explicit + basic_string(const _Alloc& __a); + basic_string(const basic_string& __str); + basic_string(const basic_string& __str, size_type __pos, + size_type __n = npos); + basic_string(const basic_string& __str, size_type __pos, + size_type __n, const _Alloc& __a); + basic_string(const _CharT* __s, size_type __n, + const _Alloc& __a = _Alloc()); + basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()); + basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()); + template + basic_string(_InputIterator __beg, _InputIterator __end, + const _Alloc& __a = _Alloc()); + ~basic_string() + { _M_rep()->_M_dispose(this->get_allocator()); } + basic_string& + operator=(const basic_string& __str) + { return this->assign(__str); } + basic_string& + operator=(const _CharT* __s) + { return this->assign(__s); } + basic_string& + operator=(_CharT __c) + { + this->assign(1, __c); + return *this; + } + iterator + begin() + { + _M_leak(); + return iterator(_M_data()); + } + const_iterator + begin() const + { return const_iterator(_M_data()); } + iterator + end() + { + _M_leak(); + return iterator(_M_data() + this->size()); + } + const_iterator + end() const + { return const_iterator(_M_data() + this->size()); } + reverse_iterator + rbegin() + { return reverse_iterator(this->end()); } + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(this->end()); } + reverse_iterator + rend() + { return reverse_iterator(this->begin()); } + const_reverse_iterator + rend() const + { return const_reverse_iterator(this->begin()); } + public: + size_type + size() const + { return _M_rep()->_M_length; } + size_type + length() const + { return _M_rep()->_M_length; } + size_type + max_size() const + { return _Rep::_S_max_size; } + void + resize(size_type __n, _CharT __c); + void + resize(size_type __n) + { this->resize(__n, _CharT()); } + size_type + capacity() const + { return _M_rep()->_M_capacity; } + void + reserve(size_type __res_arg = 0); + void + clear() + { _M_mutate(0, this->size(), 0); } + bool + empty() const + { return this->size() == 0; } + const_reference + operator[] (size_type __pos) const + { + ; + return _M_data()[__pos]; + } + reference + operator[](size_type __pos) + { + ; + ; + _M_leak(); + return _M_data()[__pos]; + } + const_reference + at(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range(("basic_string::at")); + return _M_data()[__n]; + } + reference + at(size_type __n) + { + if (__n >= size()) + __throw_out_of_range(("basic_string::at")); + _M_leak(); + return _M_data()[__n]; + } + basic_string& + operator+=(const basic_string& __str) + { return this->append(__str); } + basic_string& + operator+=(const _CharT* __s) + { return this->append(__s); } + basic_string& + operator+=(_CharT __c) + { + this->push_back(__c); + return *this; + } + basic_string& + append(const basic_string& __str); + basic_string& + append(const basic_string& __str, size_type __pos, size_type __n); + basic_string& + append(const _CharT* __s, size_type __n); + basic_string& + append(const _CharT* __s) + { + ; + return this->append(__s, traits_type::length(__s)); + } + basic_string& + append(size_type __n, _CharT __c); + template + basic_string& + append(_InputIterator __first, _InputIterator __last) + { return this->replace(_M_iend(), _M_iend(), __first, __last); } + void + push_back(_CharT __c) + { + const size_type __len = 1 + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + this->reserve(__len); + traits_type::assign(_M_data()[this->size()], __c); + _M_rep()->_M_set_length_and_sharable(__len); + } + basic_string& + assign(const basic_string& __str); + basic_string& + assign(const basic_string& __str, size_type __pos, size_type __n) + { return this->assign(__str._M_data() + + __str._M_check(__pos, "basic_string::assign"), + __str._M_limit(__pos, __n)); } + basic_string& + assign(const _CharT* __s, size_type __n); + basic_string& + assign(const _CharT* __s) + { + ; + return this->assign(__s, traits_type::length(__s)); + } + basic_string& + assign(size_type __n, _CharT __c) + { return _M_replace_aux(size_type(0), this->size(), __n, __c); } + template + basic_string& + assign(_InputIterator __first, _InputIterator __last) + { return this->replace(_M_ibegin(), _M_iend(), __first, __last); } + void + insert(iterator __p, size_type __n, _CharT __c) + { this->replace(__p, __p, __n, __c); } + template + void + insert(iterator __p, _InputIterator __beg, _InputIterator __end) + { this->replace(__p, __p, __beg, __end); } + basic_string& + insert(size_type __pos1, const basic_string& __str) + { return this->insert(__pos1, __str, size_type(0), __str.size()); } + basic_string& + insert(size_type __pos1, const basic_string& __str, + size_type __pos2, size_type __n) + { return this->insert(__pos1, __str._M_data() + + __str._M_check(__pos2, "basic_string::insert"), + __str._M_limit(__pos2, __n)); } + basic_string& + insert(size_type __pos, const _CharT* __s, size_type __n); + basic_string& + insert(size_type __pos, const _CharT* __s) + { + ; + return this->insert(__pos, __s, traits_type::length(__s)); + } + basic_string& + insert(size_type __pos, size_type __n, _CharT __c) + { return _M_replace_aux(_M_check(__pos, "basic_string::insert"), + size_type(0), __n, __c); } + iterator + insert(iterator __p, _CharT __c) + { + ; + const size_type __pos = __p - _M_ibegin(); + _M_replace_aux(__pos, size_type(0), size_type(1), __c); + _M_rep()->_M_set_leaked(); + return iterator(_M_data() + __pos); + } + basic_string& + erase(size_type __pos = 0, size_type __n = npos) + { + _M_mutate(_M_check(__pos, "basic_string::erase"), + _M_limit(__pos, __n), size_type(0)); + return *this; + } + iterator + erase(iterator __position) + { + ; + const size_type __pos = __position - _M_ibegin(); + _M_mutate(__pos, size_type(1), size_type(0)); + _M_rep()->_M_set_leaked(); + return iterator(_M_data() + __pos); + } + iterator + erase(iterator __first, iterator __last); + basic_string& + replace(size_type __pos, size_type __n, const basic_string& __str) + { return this->replace(__pos, __n, __str._M_data(), __str.size()); } + basic_string& + replace(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2) + { return this->replace(__pos1, __n1, __str._M_data() + + __str._M_check(__pos2, "basic_string::replace"), + __str._M_limit(__pos2, __n2)); } + basic_string& + replace(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2); + basic_string& + replace(size_type __pos, size_type __n1, const _CharT* __s) + { + ; + return this->replace(__pos, __n1, __s, traits_type::length(__s)); + } + basic_string& + replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) + { return _M_replace_aux(_M_check(__pos, "basic_string::replace"), + _M_limit(__pos, __n1), __n2, __c); } + basic_string& + replace(iterator __i1, iterator __i2, const basic_string& __str) + { return this->replace(__i1, __i2, __str._M_data(), __str.size()); } + basic_string& + replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n) + { + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n); + } + basic_string& + replace(iterator __i1, iterator __i2, const _CharT* __s) + { + ; + return this->replace(__i1, __i2, __s, traits_type::length(__s)); + } + basic_string& + replace(iterator __i1, iterator __i2, size_type __n, _CharT __c) + { + ; + return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c); + } + template + basic_string& + replace(iterator __i1, iterator __i2, + _InputIterator __k1, _InputIterator __k2) + { + ; + ; + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral()); + } + basic_string& + replace(iterator __i1, iterator __i2, _CharT* __k1, _CharT* __k2) + { + ; + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, + __k1, __k2 - __k1); + } + basic_string& + replace(iterator __i1, iterator __i2, + const _CharT* __k1, const _CharT* __k2) + { + ; + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, + __k1, __k2 - __k1); + } + basic_string& + replace(iterator __i1, iterator __i2, iterator __k1, iterator __k2) + { + ; + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, + __k1.base(), __k2 - __k1); + } + basic_string& + replace(iterator __i1, iterator __i2, + const_iterator __k1, const_iterator __k2) + { + ; + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, + __k1.base(), __k2 - __k1); + } + private: + template + basic_string& + _M_replace_dispatch(iterator __i1, iterator __i2, _Integer __n, + _Integer __val, __true_type) + { return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __val); } + template + basic_string& + _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, + _InputIterator __k2, __false_type); + basic_string& + _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, + _CharT __c); + basic_string& + _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, + size_type __n2); + template + static _CharT* + _S_construct_aux(_InIterator __beg, _InIterator __end, + const _Alloc& __a, __false_type) + { + typedef typename iterator_traits<_InIterator>::iterator_category _Tag; + return _S_construct(__beg, __end, __a, _Tag()); + } + template + static _CharT* + _S_construct_aux(_Integer __beg, _Integer __end, + const _Alloc& __a, __true_type) + { return _S_construct(static_cast(__beg), __end, __a); } + template + static _CharT* + _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a) + { + typedef typename std::__is_integer<_InIterator>::__type _Integral; + return _S_construct_aux(__beg, __end, __a, _Integral()); + } + template + static _CharT* + _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, + input_iterator_tag); + template + static _CharT* + _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a, + forward_iterator_tag); + static _CharT* + _S_construct(size_type __req, _CharT __c, const _Alloc& __a); + public: + size_type + copy(_CharT* __s, size_type __n, size_type __pos = 0) const; + void + swap(basic_string& __s); + const _CharT* + c_str() const + { return _M_data(); } + const _CharT* + data() const + { return _M_data(); } + allocator_type + get_allocator() const + { return _M_dataplus; } + size_type + find(const _CharT* __s, size_type __pos, size_type __n) const; + size_type + find(const basic_string& __str, size_type __pos = 0) const + { return this->find(__str.data(), __pos, __str.size()); } + size_type + find(const _CharT* __s, size_type __pos = 0) const + { + ; + return this->find(__s, __pos, traits_type::length(__s)); + } + size_type + find(_CharT __c, size_type __pos = 0) const; + size_type + rfind(const basic_string& __str, size_type __pos = npos) const + { return this->rfind(__str.data(), __pos, __str.size()); } + size_type + rfind(const _CharT* __s, size_type __pos, size_type __n) const; + size_type + rfind(const _CharT* __s, size_type __pos = npos) const + { + ; + return this->rfind(__s, __pos, traits_type::length(__s)); + } + size_type + rfind(_CharT __c, size_type __pos = npos) const; + size_type + find_first_of(const basic_string& __str, size_type __pos = 0) const + { return this->find_first_of(__str.data(), __pos, __str.size()); } + size_type + find_first_of(const _CharT* __s, size_type __pos, size_type __n) const; + size_type + find_first_of(const _CharT* __s, size_type __pos = 0) const + { + ; + return this->find_first_of(__s, __pos, traits_type::length(__s)); + } + size_type + find_first_of(_CharT __c, size_type __pos = 0) const + { return this->find(__c, __pos); } + size_type + find_last_of(const basic_string& __str, size_type __pos = npos) const + { return this->find_last_of(__str.data(), __pos, __str.size()); } + size_type + find_last_of(const _CharT* __s, size_type __pos, size_type __n) const; + size_type + find_last_of(const _CharT* __s, size_type __pos = npos) const + { + ; + return this->find_last_of(__s, __pos, traits_type::length(__s)); + } + size_type + find_last_of(_CharT __c, size_type __pos = npos) const + { return this->rfind(__c, __pos); } + size_type + find_first_not_of(const basic_string& __str, size_type __pos = 0) const + { return this->find_first_not_of(__str.data(), __pos, __str.size()); } + size_type + find_first_not_of(const _CharT* __s, size_type __pos, + size_type __n) const; + size_type + find_first_not_of(const _CharT* __s, size_type __pos = 0) const + { + ; + return this->find_first_not_of(__s, __pos, traits_type::length(__s)); + } + size_type + find_first_not_of(_CharT __c, size_type __pos = 0) const; + size_type + find_last_not_of(const basic_string& __str, size_type __pos = npos) const + { return this->find_last_not_of(__str.data(), __pos, __str.size()); } + size_type + find_last_not_of(const _CharT* __s, size_type __pos, + size_type __n) const; + size_type + find_last_not_of(const _CharT* __s, size_type __pos = npos) const + { + ; + return this->find_last_not_of(__s, __pos, traits_type::length(__s)); + } + size_type + find_last_not_of(_CharT __c, size_type __pos = npos) const; + basic_string + substr(size_type __pos = 0, size_type __n = npos) const + { return basic_string(*this, + _M_check(__pos, "basic_string::substr"), __n); } + int + compare(const basic_string& __str) const + { + const size_type __size = this->size(); + const size_type __osize = __str.size(); + const size_type __len = std::min(__size, __osize); + int __r = traits_type::compare(_M_data(), __str.data(), __len); + if (!__r) + __r = _S_compare(__size, __osize); + return __r; + } + int + compare(size_type __pos, size_type __n, const basic_string& __str) const; + int + compare(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2) const; + int + compare(const _CharT* __s) const; + int + compare(size_type __pos, size_type __n1, const _CharT* __s) const; + int + compare(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) const; + }; + template + inline basic_string<_CharT, _Traits, _Alloc>:: + basic_string() + : _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) { } + template + basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + basic_string<_CharT, _Traits, _Alloc> __str(__lhs); + __str.append(__rhs); + return __str; + } + template + basic_string<_CharT,_Traits,_Alloc> + operator+(const _CharT* __lhs, + const basic_string<_CharT,_Traits,_Alloc>& __rhs); + template + basic_string<_CharT,_Traits,_Alloc> + operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { + basic_string<_CharT, _Traits, _Alloc> __str(__lhs); + __str.append(__rhs); + return __str; + } + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) + { + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + __string_type __str(__lhs); + __str.append(__size_type(1), __rhs); + return __str; + } + template + inline bool + operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) == 0; } + template + inline + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, bool>::__type + operator==(const basic_string<_CharT>& __lhs, + const basic_string<_CharT>& __rhs) + { return (__lhs.size() == __rhs.size() + && !std::char_traits<_CharT>::compare(__lhs.data(), __rhs.data(), + __lhs.size())); } + template + inline bool + operator==(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) == 0; } + template + inline bool + operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) == 0; } + template + inline bool + operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return !(__lhs == __rhs); } + template + inline bool + operator!=(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return !(__lhs == __rhs); } + template + inline bool + operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return !(__lhs == __rhs); } + template + inline bool + operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) < 0; } + template + inline bool + operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) < 0; } + template + inline bool + operator<(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) > 0; } + template + inline bool + operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) > 0; } + template + inline bool + operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) > 0; } + template + inline bool + operator>(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) < 0; } + template + inline bool + operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) <= 0; } + template + inline bool + operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) <= 0; } + template + inline bool + operator<=(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) >= 0; } + template + inline bool + operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) >= 0; } + template + inline bool + operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) >= 0; } + template + inline bool + operator>=(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) <= 0; } + template + inline void + swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, + basic_string<_CharT, _Traits, _Alloc>& __rhs) + { __lhs.swap(__rhs); } + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str); + template<> + basic_istream& + operator>>(basic_istream& __is, basic_string& __str); + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, + const basic_string<_CharT, _Traits, _Alloc>& __str) + { + return __ostream_insert(__os, __str.data(), __str.size()); + } + template + basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim); + template + inline basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str) + { return getline(__is, __str, __is.widen('\n')); } + template<> + basic_istream& + getline(basic_istream& __in, basic_string& __str, + char __delim); + template<> + basic_istream& + getline(basic_istream& __in, basic_string& __str, + wchar_t __delim); +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + const typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + _Rep::_S_max_size = (((npos - sizeof(_Rep_base))/sizeof(_CharT)) - 1) / 4; + template + const _CharT + basic_string<_CharT, _Traits, _Alloc>:: + _Rep::_S_terminal = _CharT(); + template + const typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>::npos; + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_empty_rep_storage[ + (sizeof(_Rep_base) + sizeof(_CharT) + sizeof(size_type) - 1) / + sizeof(size_type)]; + template + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>:: + _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, + input_iterator_tag) + { + if (__beg == __end && __a == _Alloc()) + return _S_empty_rep()._M_refdata(); + _CharT __buf[128]; + size_type __len = 0; + while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT)) + { + __buf[__len++] = *__beg; + ++__beg; + } + _Rep* __r = _Rep::_S_create(__len, size_type(0), __a); + _M_copy(__r->_M_refdata(), __buf, __len); + try + { + while (__beg != __end) + { + if (__len == __r->_M_capacity) + { + _Rep* __another = _Rep::_S_create(__len + 1, __len, __a); + _M_copy(__another->_M_refdata(), __r->_M_refdata(), __len); + __r->_M_destroy(__a); + __r = __another; + } + __r->_M_refdata()[__len++] = *__beg; + ++__beg; + } + } + catch(...) + { + __r->_M_destroy(__a); + throw; + } + __r->_M_set_length_and_sharable(__len); + return __r->_M_refdata(); + } + template + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>:: + _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, + forward_iterator_tag) + { + if (__beg == __end && __a == _Alloc()) + return _S_empty_rep()._M_refdata(); + if (__builtin_expect(__gnu_cxx::__is_null_pointer(__beg) + && __beg != __end, 0)) + __throw_logic_error(("basic_string::_S_construct NULL not valid")); + const size_type __dnew = static_cast(std::distance(__beg, + __end)); + _Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a); + try + { _S_copy_chars(__r->_M_refdata(), __beg, __end); } + catch(...) + { + __r->_M_destroy(__a); + throw; + } + __r->_M_set_length_and_sharable(__dnew); + return __r->_M_refdata(); + } + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>:: + _S_construct(size_type __n, _CharT __c, const _Alloc& __a) + { + if (__n == 0 && __a == _Alloc()) + return _S_empty_rep()._M_refdata(); + _Rep* __r = _Rep::_S_create(__n, size_type(0), __a); + if (__n) + _M_assign(__r->_M_refdata(), __n, __c); + __r->_M_set_length_and_sharable(__n); + return __r->_M_refdata(); + } + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const basic_string& __str) + : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(__str.get_allocator()), + __str.get_allocator()), + __str.get_allocator()) + { } + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const _Alloc& __a) + : _M_dataplus(_S_construct(size_type(), _CharT(), __a), __a) + { } + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const basic_string& __str, size_type __pos, size_type __n) + : _M_dataplus(_S_construct(__str._M_data() + + __str._M_check(__pos, + "basic_string::basic_string"), + __str._M_data() + __str._M_limit(__pos, __n) + + __pos, _Alloc()), _Alloc()) + { } + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const basic_string& __str, size_type __pos, + size_type __n, const _Alloc& __a) + : _M_dataplus(_S_construct(__str._M_data() + + __str._M_check(__pos, + "basic_string::basic_string"), + __str._M_data() + __str._M_limit(__pos, __n) + + __pos, __a), __a) + { } + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const _CharT* __s, size_type __n, const _Alloc& __a) + : _M_dataplus(_S_construct(__s, __s + __n, __a), __a) + { } + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const _CharT* __s, const _Alloc& __a) + : _M_dataplus(_S_construct(__s, __s ? __s + traits_type::length(__s) : + __s + npos, __a), __a) + { } + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(size_type __n, _CharT __c, const _Alloc& __a) + : _M_dataplus(_S_construct(__n, __c, __a), __a) + { } + template + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a) + : _M_dataplus(_S_construct(__beg, __end, __a), __a) + { } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + assign(const basic_string& __str) + { + if (_M_rep() != __str._M_rep()) + { + const allocator_type __a = this->get_allocator(); + _CharT* __tmp = __str._M_rep()->_M_grab(__a, __str.get_allocator()); + _M_rep()->_M_dispose(__a); + _M_data(__tmp); + } + return *this; + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + assign(const _CharT* __s, size_type __n) + { + ; + _M_check_length(this->size(), __n, "basic_string::assign"); + if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) + return _M_replace_safe(size_type(0), this->size(), __s, __n); + else + { + const size_type __pos = __s - _M_data(); + if (__pos >= __n) + _M_copy(_M_data(), __s, __n); + else if (__pos) + _M_move(_M_data(), __s, __n); + _M_rep()->_M_set_length_and_sharable(__n); + return *this; + } + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + append(size_type __n, _CharT __c) + { + if (__n) + { + _M_check_length(size_type(0), __n, "basic_string::append"); + const size_type __len = __n + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + this->reserve(__len); + _M_assign(_M_data() + this->size(), __n, __c); + _M_rep()->_M_set_length_and_sharable(__len); + } + return *this; + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + append(const _CharT* __s, size_type __n) + { + ; + if (__n) + { + _M_check_length(size_type(0), __n, "basic_string::append"); + const size_type __len = __n + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + { + if (_M_disjunct(__s)) + this->reserve(__len); + else + { + const size_type __off = __s - _M_data(); + this->reserve(__len); + __s = _M_data() + __off; + } + } + _M_copy(_M_data() + this->size(), __s, __n); + _M_rep()->_M_set_length_and_sharable(__len); + } + return *this; + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + append(const basic_string& __str) + { + const size_type __size = __str.size(); + if (__size) + { + const size_type __len = __size + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + this->reserve(__len); + _M_copy(_M_data() + this->size(), __str._M_data(), __size); + _M_rep()->_M_set_length_and_sharable(__len); + } + return *this; + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + append(const basic_string& __str, size_type __pos, size_type __n) + { + __str._M_check(__pos, "basic_string::append"); + __n = __str._M_limit(__pos, __n); + if (__n) + { + const size_type __len = __n + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + this->reserve(__len); + _M_copy(_M_data() + this->size(), __str._M_data() + __pos, __n); + _M_rep()->_M_set_length_and_sharable(__len); + } + return *this; + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + insert(size_type __pos, const _CharT* __s, size_type __n) + { + ; + _M_check(__pos, "basic_string::insert"); + _M_check_length(size_type(0), __n, "basic_string::insert"); + if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) + return _M_replace_safe(__pos, size_type(0), __s, __n); + else + { + const size_type __off = __s - _M_data(); + _M_mutate(__pos, 0, __n); + __s = _M_data() + __off; + _CharT* __p = _M_data() + __pos; + if (__s + __n <= __p) + _M_copy(__p, __s, __n); + else if (__s >= __p) + _M_copy(__p, __s + __n, __n); + else + { + const size_type __nleft = __p - __s; + _M_copy(__p, __s, __nleft); + _M_copy(__p + __nleft, __p + __n, __n - __nleft); + } + return *this; + } + } + template + typename basic_string<_CharT, _Traits, _Alloc>::iterator + basic_string<_CharT, _Traits, _Alloc>:: + erase(iterator __first, iterator __last) + { + ; + const size_type __size = __last - __first; + if (__size) + { + const size_type __pos = __first - _M_ibegin(); + _M_mutate(__pos, __size, size_type(0)); + _M_rep()->_M_set_leaked(); + return iterator(_M_data() + __pos); + } + else + return __first; + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + replace(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) + { + ; + _M_check(__pos, "basic_string::replace"); + __n1 = _M_limit(__pos, __n1); + _M_check_length(__n1, __n2, "basic_string::replace"); + bool __left; + if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) + return _M_replace_safe(__pos, __n1, __s, __n2); + else if ((__left = __s + __n2 <= _M_data() + __pos) + || _M_data() + __pos + __n1 <= __s) + { + size_type __off = __s - _M_data(); + __left ? __off : (__off += __n2 - __n1); + _M_mutate(__pos, __n1, __n2); + _M_copy(_M_data() + __pos, _M_data() + __off, __n2); + return *this; + } + else + { + const basic_string __tmp(__s, __n2); + return _M_replace_safe(__pos, __n1, __tmp._M_data(), __n2); + } + } + template + void + basic_string<_CharT, _Traits, _Alloc>::_Rep:: + _M_destroy(const _Alloc& __a) throw () + { + const size_type __size = sizeof(_Rep_base) + + (this->_M_capacity + 1) * sizeof(_CharT); + _Raw_bytes_alloc(__a).deallocate(reinterpret_cast(this), __size); + } + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_leak_hard() + { + if (_M_rep() == &_S_empty_rep()) + return; + if (_M_rep()->_M_is_shared()) + _M_mutate(0, 0, 0); + _M_rep()->_M_set_leaked(); + } + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_mutate(size_type __pos, size_type __len1, size_type __len2) + { + const size_type __old_size = this->size(); + const size_type __new_size = __old_size + __len2 - __len1; + const size_type __how_much = __old_size - __pos - __len1; + if (__new_size > this->capacity() || _M_rep()->_M_is_shared()) + { + const allocator_type __a = get_allocator(); + _Rep* __r = _Rep::_S_create(__new_size, this->capacity(), __a); + if (__pos) + _M_copy(__r->_M_refdata(), _M_data(), __pos); + if (__how_much) + _M_copy(__r->_M_refdata() + __pos + __len2, + _M_data() + __pos + __len1, __how_much); + _M_rep()->_M_dispose(__a); + _M_data(__r->_M_refdata()); + } + else if (__how_much && __len1 != __len2) + { + _M_move(_M_data() + __pos + __len2, + _M_data() + __pos + __len1, __how_much); + } + _M_rep()->_M_set_length_and_sharable(__new_size); + } + template + void + basic_string<_CharT, _Traits, _Alloc>:: + reserve(size_type __res) + { + if (__res != this->capacity() || _M_rep()->_M_is_shared()) + { + if (__res < this->size()) + __res = this->size(); + const allocator_type __a = get_allocator(); + _CharT* __tmp = _M_rep()->_M_clone(__a, __res - this->size()); + _M_rep()->_M_dispose(__a); + _M_data(__tmp); + } + } + template + void + basic_string<_CharT, _Traits, _Alloc>:: + swap(basic_string& __s) + { + if (_M_rep()->_M_is_leaked()) + _M_rep()->_M_set_sharable(); + if (__s._M_rep()->_M_is_leaked()) + __s._M_rep()->_M_set_sharable(); + if (this->get_allocator() == __s.get_allocator()) + { + _CharT* __tmp = _M_data(); + _M_data(__s._M_data()); + __s._M_data(__tmp); + } + else + { + const basic_string __tmp1(_M_ibegin(), _M_iend(), + __s.get_allocator()); + const basic_string __tmp2(__s._M_ibegin(), __s._M_iend(), + this->get_allocator()); + *this = __tmp2; + __s = __tmp1; + } + } + template + typename basic_string<_CharT, _Traits, _Alloc>::_Rep* + basic_string<_CharT, _Traits, _Alloc>::_Rep:: + _S_create(size_type __capacity, size_type __old_capacity, + const _Alloc& __alloc) + { + if (__capacity > _S_max_size) + __throw_length_error(("basic_string::_S_create")); + const size_type __pagesize = 4096; + const size_type __malloc_header_size = 4 * sizeof(void*); + if (__capacity > __old_capacity && __capacity < 2 * __old_capacity) + __capacity = 2 * __old_capacity; + size_type __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); + const size_type __adj_size = __size + __malloc_header_size; + if (__adj_size > __pagesize && __capacity > __old_capacity) + { + const size_type __extra = __pagesize - __adj_size % __pagesize; + __capacity += __extra / sizeof(_CharT); + if (__capacity > _S_max_size) + __capacity = _S_max_size; + __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); + } + void* __place = _Raw_bytes_alloc(__alloc).allocate(__size); + _Rep *__p = new (__place) _Rep; + __p->_M_capacity = __capacity; + __p->_M_set_sharable(); + return __p; + } + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>::_Rep:: + _M_clone(const _Alloc& __alloc, size_type __res) + { + const size_type __requested_cap = this->_M_length + __res; + _Rep* __r = _Rep::_S_create(__requested_cap, this->_M_capacity, + __alloc); + if (this->_M_length) + _M_copy(__r->_M_refdata(), _M_refdata(), this->_M_length); + __r->_M_set_length_and_sharable(this->_M_length); + return __r->_M_refdata(); + } + template + void + basic_string<_CharT, _Traits, _Alloc>:: + resize(size_type __n, _CharT __c) + { + const size_type __size = this->size(); + _M_check_length(__size, __n, "basic_string::resize"); + if (__size < __n) + this->append(__n - __size, __c); + else if (__n < __size) + this->erase(__n); + } + template + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, + _InputIterator __k2, __false_type) + { + const basic_string __s(__k1, __k2); + const size_type __n1 = __i2 - __i1; + _M_check_length(__n1, __s.size(), "basic_string::_M_replace_dispatch"); + return _M_replace_safe(__i1 - _M_ibegin(), __n1, __s._M_data(), + __s.size()); + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, + _CharT __c) + { + _M_check_length(__n1, __n2, "basic_string::_M_replace_aux"); + _M_mutate(__pos1, __n1, __n2); + if (__n2) + _M_assign(_M_data() + __pos1, __n2, __c); + return *this; + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, + size_type __n2) + { + _M_mutate(__pos1, __n1, __n2); + if (__n2) + _M_copy(_M_data() + __pos1, __s, __n2); + return *this; + } + template + basic_string<_CharT, _Traits, _Alloc> + operator+(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + ; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + const __size_type __len = _Traits::length(__lhs); + __string_type __str; + __str.reserve(__len + __rhs.size()); + __str.append(__lhs, __len); + __str.append(__rhs); + return __str; + } + template + basic_string<_CharT, _Traits, _Alloc> + operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + __string_type __str; + const __size_type __len = __rhs.size(); + __str.reserve(__len + 1); + __str.append(__size_type(1), __lhs); + __str.append(__rhs); + return __str; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + copy(_CharT* __s, size_type __n, size_type __pos) const + { + _M_check(__pos, "basic_string::copy"); + __n = _M_limit(__pos, __n); + ; + if (__n) + _M_copy(__s, _M_data() + __pos, __n); + return __n; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + const size_type __size = this->size(); + const _CharT* __data = _M_data(); + if (__n == 0) + return __pos <= __size ? __pos : npos; + if (__n <= __size) + { + for (; __pos <= __size - __n; ++__pos) + if (traits_type::eq(__data[__pos], __s[0]) + && traits_type::compare(__data + __pos + 1, + __s + 1, __n - 1) == 0) + return __pos; + } + return npos; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find(_CharT __c, size_type __pos) const + { + size_type __ret = npos; + const size_type __size = this->size(); + if (__pos < __size) + { + const _CharT* __data = _M_data(); + const size_type __n = __size - __pos; + const _CharT* __p = traits_type::find(__data + __pos, __n, __c); + if (__p) + __ret = __p - __data; + } + return __ret; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + rfind(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + const size_type __size = this->size(); + if (__n <= __size) + { + __pos = std::min(size_type(__size - __n), __pos); + const _CharT* __data = _M_data(); + do + { + if (traits_type::compare(__data + __pos, __s, __n) == 0) + return __pos; + } + while (__pos-- > 0); + } + return npos; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + rfind(_CharT __c, size_type __pos) const + { + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + for (++__size; __size-- > 0; ) + if (traits_type::eq(_M_data()[__size], __c)) + return __size; + } + return npos; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_of(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + for (; __n && __pos < this->size(); ++__pos) + { + const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]); + if (__p) + return __pos; + } + return npos; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_of(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + size_type __size = this->size(); + if (__size && __n) + { + if (--__size > __pos) + __size = __pos; + do + { + if (traits_type::find(__s, __n, _M_data()[__size])) + return __size; + } + while (__size-- != 0); + } + return npos; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + for (; __pos < this->size(); ++__pos) + if (!traits_type::find(__s, __n, _M_data()[__pos])) + return __pos; + return npos; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_not_of(_CharT __c, size_type __pos) const + { + for (; __pos < this->size(); ++__pos) + if (!traits_type::eq(_M_data()[__pos], __c)) + return __pos; + return npos; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + do + { + if (!traits_type::find(__s, __n, _M_data()[__size])) + return __size; + } + while (__size--); + } + return npos; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_not_of(_CharT __c, size_type __pos) const + { + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + do + { + if (!traits_type::eq(_M_data()[__size], __c)) + return __size; + } + while (__size--); + } + return npos; + } + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n, const basic_string& __str) const + { + _M_check(__pos, "basic_string::compare"); + __n = _M_limit(__pos, __n); + const size_type __osize = __str.size(); + const size_type __len = std::min(__n, __osize); + int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len); + if (!__r) + __r = _S_compare(__n, __osize); + return __r; + } + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2) const + { + _M_check(__pos1, "basic_string::compare"); + __str._M_check(__pos2, "basic_string::compare"); + __n1 = _M_limit(__pos1, __n1); + __n2 = __str._M_limit(__pos2, __n2); + const size_type __len = std::min(__n1, __n2); + int __r = traits_type::compare(_M_data() + __pos1, + __str.data() + __pos2, __len); + if (!__r) + __r = _S_compare(__n1, __n2); + return __r; + } + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(const _CharT* __s) const + { + ; + const size_type __size = this->size(); + const size_type __osize = traits_type::length(__s); + const size_type __len = std::min(__size, __osize); + int __r = traits_type::compare(_M_data(), __s, __len); + if (!__r) + __r = _S_compare(__size, __osize); + return __r; + } + template + int + basic_string <_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n1, const _CharT* __s) const + { + ; + _M_check(__pos, "basic_string::compare"); + __n1 = _M_limit(__pos, __n1); + const size_type __osize = traits_type::length(__s); + const size_type __len = std::min(__n1, __osize); + int __r = traits_type::compare(_M_data() + __pos, __s, __len); + if (!__r) + __r = _S_compare(__n1, __osize); + return __r; + } + template + int + basic_string <_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) const + { + ; + _M_check(__pos, "basic_string::compare"); + __n1 = _M_limit(__pos, __n1); + const size_type __len = std::min(__n1, __n2); + int __r = traits_type::compare(_M_data() + __pos, __s, __len); + if (!__r) + __r = _S_compare(__n1, __n2); + return __r; + } + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, + basic_string<_CharT, _Traits, _Alloc>& __str) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __istream_type::ios_base __ios_base; + typedef typename __istream_type::int_type __int_type; + typedef typename __string_type::size_type __size_type; + typedef ctype<_CharT> __ctype_type; + typedef typename __ctype_type::ctype_base __ctype_base; + __size_type __extracted = 0; + typename __ios_base::iostate __err = __ios_base::goodbit; + typename __istream_type::sentry __cerb(__in, false); + if (__cerb) + { + try + { + __str.erase(); + _CharT __buf[128]; + __size_type __len = 0; + const streamsize __w = __in.width(); + const __size_type __n = __w > 0 ? static_cast<__size_type>(__w) + : __str.max_size(); + const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); + const __int_type __eof = _Traits::eof(); + __int_type __c = __in.rdbuf()->sgetc(); + while (__extracted < __n + && !_Traits::eq_int_type(__c, __eof) + && !__ct.is(__ctype_base::space, + _Traits::to_char_type(__c))) + { + if (__len == sizeof(__buf) / sizeof(_CharT)) + { + __str.append(__buf, sizeof(__buf) / sizeof(_CharT)); + __len = 0; + } + __buf[__len++] = _Traits::to_char_type(__c); + ++__extracted; + __c = __in.rdbuf()->snextc(); + } + __str.append(__buf, __len); + if (_Traits::eq_int_type(__c, __eof)) + __err |= __ios_base::eofbit; + __in.width(0); + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { + __in._M_setstate(__ios_base::badbit); + } + } + if (!__extracted) + __err |= __ios_base::failbit; + if (__err) + __in.setstate(__err); + return __in; + } + template + basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __in, + basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __istream_type::ios_base __ios_base; + typedef typename __istream_type::int_type __int_type; + typedef typename __string_type::size_type __size_type; + __size_type __extracted = 0; + const __size_type __n = __str.max_size(); + typename __ios_base::iostate __err = __ios_base::goodbit; + typename __istream_type::sentry __cerb(__in, true); + if (__cerb) + { + try + { + __str.erase(); + const __int_type __idelim = _Traits::to_int_type(__delim); + const __int_type __eof = _Traits::eof(); + __int_type __c = __in.rdbuf()->sgetc(); + while (__extracted < __n + && !_Traits::eq_int_type(__c, __eof) + && !_Traits::eq_int_type(__c, __idelim)) + { + __str += _Traits::to_char_type(__c); + ++__extracted; + __c = __in.rdbuf()->snextc(); + } + if (_Traits::eq_int_type(__c, __eof)) + __err |= __ios_base::eofbit; + else if (_Traits::eq_int_type(__c, __idelim)) + { + ++__extracted; + __in.rdbuf()->sbumpc(); + } + else + __err |= __ios_base::failbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { + __in._M_setstate(__ios_base::badbit); + } + } + if (!__extracted) + __err |= __ios_base::failbit; + if (__err) + __in.setstate(__err); + return __in; + } + extern template class basic_string; + extern template + basic_istream& + operator>>(basic_istream&, string&); + extern template + basic_ostream& + operator<<(basic_ostream&, const string&); + extern template + basic_istream& + getline(basic_istream&, string&, char); + extern template + basic_istream& + getline(basic_istream&, string&); + extern template class basic_string; + extern template + basic_istream& + operator>>(basic_istream&, wstring&); + extern template + basic_ostream& + operator<<(basic_ostream&, const wstring&); + extern template + basic_istream& + getline(basic_istream&, wstring&, wchar_t); + extern template + basic_istream& + getline(basic_istream&, wstring&); +} + + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + class locale + { + public: + typedef int category; + class facet; + class id; + class _Impl; + friend class facet; + friend class _Impl; + template + friend bool + has_facet(const locale&) throw(); + template + friend const _Facet& + use_facet(const locale&); + template + friend struct __use_cache; + static const category none = 0; + static const category ctype = 1L << 0; + static const category numeric = 1L << 1; + static const category collate = 1L << 2; + static const category time = 1L << 3; + static const category monetary = 1L << 4; + static const category messages = 1L << 5; + static const category all = (ctype | numeric | collate | + time | monetary | messages); + locale() throw(); + locale(const locale& __other) throw(); + explicit + locale(const char* __s); + locale(const locale& __base, const char* __s, category __cat); + locale(const locale& __base, const locale& __add, category __cat); + template + locale(const locale& __other, _Facet* __f); + ~locale() throw(); + const locale& + operator=(const locale& __other) throw(); + template + locale + combine(const locale& __other) const; + string + name() const; + bool + operator==(const locale& __other) const throw (); + bool + operator!=(const locale& __other) const throw () + { return !(this->operator==(__other)); } + template + bool + operator()(const basic_string<_Char, _Traits, _Alloc>& __s1, + const basic_string<_Char, _Traits, _Alloc>& __s2) const; + static locale + global(const locale&); + static const locale& + classic(); + private: + _Impl* _M_impl; + static _Impl* _S_classic; + static _Impl* _S_global; + static const char* const* const _S_categories; + enum { _S_categories_size = 6 + 6 }; + static __gthread_once_t _S_once; + explicit + locale(_Impl*) throw(); + static void + _S_initialize(); + static void + _S_initialize_once(); + static category + _S_normalize_category(category); + void + _M_coalesce(const locale& __base, const locale& __add, category __cat); + }; + class locale::facet + { + private: + friend class locale; + friend class locale::_Impl; + mutable _Atomic_word _M_refcount; + static __c_locale _S_c_locale; + static const char _S_c_name[2]; + static __gthread_once_t _S_once; + static void + _S_initialize_once(); + protected: + explicit + facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0) + { } + virtual + ~facet(); + static void + _S_create_c_locale(__c_locale& __cloc, const char* __s, + __c_locale __old = 0); + static __c_locale + _S_clone_c_locale(__c_locale& __cloc); + static void + _S_destroy_c_locale(__c_locale& __cloc); + static __c_locale + _S_get_c_locale(); + static const char* + _S_get_c_name(); + private: + void + _M_add_reference() const throw() + { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } + void + _M_remove_reference() const throw() + { + if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) + { + try + { delete this; } + catch(...) + { } + } + } + facet(const facet&); + facet& + operator=(const facet&); + }; + class locale::id + { + private: + friend class locale; + friend class locale::_Impl; + template + friend const _Facet& + use_facet(const locale&); + template + friend bool + has_facet(const locale&) throw (); + mutable size_t _M_index; + static _Atomic_word _S_refcount; + void + operator=(const id&); + id(const id&); + public: + id() { } + size_t + _M_id() const; + }; + class locale::_Impl + { + public: + friend class locale; + friend class locale::facet; + template + friend bool + has_facet(const locale&) throw(); + template + friend const _Facet& + use_facet(const locale&); + template + friend struct __use_cache; + private: + _Atomic_word _M_refcount; + const facet** _M_facets; + size_t _M_facets_size; + const facet** _M_caches; + char** _M_names; + static const locale::id* const _S_id_ctype[]; + static const locale::id* const _S_id_numeric[]; + static const locale::id* const _S_id_collate[]; + static const locale::id* const _S_id_time[]; + static const locale::id* const _S_id_monetary[]; + static const locale::id* const _S_id_messages[]; + static const locale::id* const* const _S_facet_categories[]; + void + _M_add_reference() throw() + { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } + void + _M_remove_reference() throw() + { + if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) + { + try + { delete this; } + catch(...) + { } + } + } + _Impl(const _Impl&, size_t); + _Impl(const char*, size_t); + _Impl(size_t) throw(); + ~_Impl() throw(); + _Impl(const _Impl&); + void + operator=(const _Impl&); + bool + _M_check_same_name() + { + bool __ret = true; + if (_M_names[1]) + for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i) + __ret = __builtin_strcmp(_M_names[__i], _M_names[__i + 1]) == 0; + return __ret; + } + void + _M_replace_categories(const _Impl*, category); + void + _M_replace_category(const _Impl*, const locale::id* const*); + void + _M_replace_facet(const _Impl*, const locale::id*); + void + _M_install_facet(const locale::id*, const facet*); + template + void + _M_init_facet(_Facet* __facet) + { _M_install_facet(&_Facet::id, __facet); } + void + _M_install_cache(const facet*, size_t); + }; + template + bool + has_facet(const locale& __loc) throw(); + template + const _Facet& + use_facet(const locale& __loc); + template + class collate : public locale::facet + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + protected: + __c_locale _M_c_locale_collate; + public: + static locale::id id; + explicit + collate(size_t __refs = 0) + : facet(__refs), _M_c_locale_collate(_S_get_c_locale()) + { } + explicit + collate(__c_locale __cloc, size_t __refs = 0) + : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc)) + { } + int + compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const + { return this->do_compare(__lo1, __hi1, __lo2, __hi2); } + string_type + transform(const _CharT* __lo, const _CharT* __hi) const + { return this->do_transform(__lo, __hi); } + long + hash(const _CharT* __lo, const _CharT* __hi) const + { return this->do_hash(__lo, __hi); } + int + _M_compare(const _CharT*, const _CharT*) const; + size_t + _M_transform(_CharT*, const _CharT*, size_t) const; + protected: + virtual + ~collate() + { _S_destroy_c_locale(_M_c_locale_collate); } + virtual int + do_compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const; + virtual string_type + do_transform(const _CharT* __lo, const _CharT* __hi) const; + virtual long + do_hash(const _CharT* __lo, const _CharT* __hi) const; + }; + template + locale::id collate<_CharT>::id; + template<> + int + collate::_M_compare(const char*, const char*) const; + template<> + size_t + collate::_M_transform(char*, const char*, size_t) const; + template<> + int + collate::_M_compare(const wchar_t*, const wchar_t*) const; + template<> + size_t + collate::_M_transform(wchar_t*, const wchar_t*, size_t) const; + template + class collate_byname : public collate<_CharT> + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + explicit + collate_byname(const char* __s, size_t __refs = 0) + : collate<_CharT>(__refs) + { + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + this->_S_destroy_c_locale(this->_M_c_locale_collate); + this->_S_create_c_locale(this->_M_c_locale_collate, __s); + } + } + protected: + virtual + ~collate_byname() { } + }; +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + locale:: + locale(const locale& __other, _Facet* __f) + { + _M_impl = new _Impl(*__other._M_impl, 1); + try + { _M_impl->_M_install_facet(&_Facet::id, __f); } + catch(...) + { + _M_impl->_M_remove_reference(); + throw; + } + delete [] _M_impl->_M_names[0]; + _M_impl->_M_names[0] = 0; + } + template + locale + locale:: + combine(const locale& __other) const + { + _Impl* __tmp = new _Impl(*_M_impl, 1); + try + { + __tmp->_M_replace_facet(__other._M_impl, &_Facet::id); + } + catch(...) + { + __tmp->_M_remove_reference(); + throw; + } + return locale(__tmp); + } + template + bool + locale:: + operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1, + const basic_string<_CharT, _Traits, _Alloc>& __s2) const + { + typedef std::collate<_CharT> __collate_type; + const __collate_type& __collate = use_facet<__collate_type>(*this); + return (__collate.compare(__s1.data(), __s1.data() + __s1.length(), + __s2.data(), __s2.data() + __s2.length()) < 0); + } + template + bool + has_facet(const locale& __loc) throw() + { + const size_t __i = _Facet::id._M_id(); + const locale::facet** __facets = __loc._M_impl->_M_facets; + return (__i < __loc._M_impl->_M_facets_size + && dynamic_cast(__facets[__i])); + } + template + const _Facet& + use_facet(const locale& __loc) + { + const size_t __i = _Facet::id._M_id(); + const locale::facet** __facets = __loc._M_impl->_M_facets; + if (__i >= __loc._M_impl->_M_facets_size || !__facets[__i]) + __throw_bad_cast(); + return dynamic_cast(*__facets[__i]); + } + template + int + collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const + { return 0; } + template + size_t + collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const + { return 0; } + template + int + collate<_CharT>:: + do_compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const + { + const string_type __one(__lo1, __hi1); + const string_type __two(__lo2, __hi2); + const _CharT* __p = __one.c_str(); + const _CharT* __pend = __one.data() + __one.length(); + const _CharT* __q = __two.c_str(); + const _CharT* __qend = __two.data() + __two.length(); + for (;;) + { + const int __res = _M_compare(__p, __q); + if (__res) + return __res; + __p += char_traits<_CharT>::length(__p); + __q += char_traits<_CharT>::length(__q); + if (__p == __pend && __q == __qend) + return 0; + else if (__p == __pend) + return -1; + else if (__q == __qend) + return 1; + __p++; + __q++; + } + } + template + typename collate<_CharT>::string_type + collate<_CharT>:: + do_transform(const _CharT* __lo, const _CharT* __hi) const + { + string_type __ret; + const string_type __str(__lo, __hi); + const _CharT* __p = __str.c_str(); + const _CharT* __pend = __str.data() + __str.length(); + size_t __len = (__hi - __lo) * 2; + _CharT* __c = new _CharT[__len]; + try + { + for (;;) + { + size_t __res = _M_transform(__c, __p, __len); + if (__res >= __len) + { + __len = __res + 1; + delete [] __c, __c = 0; + __c = new _CharT[__len]; + __res = _M_transform(__c, __p, __len); + } + __ret.append(__c, __res); + __p += char_traits<_CharT>::length(__p); + if (__p == __pend) + break; + __p++; + __ret.push_back(_CharT()); + } + } + catch(...) + { + delete [] __c; + throw; + } + delete [] __c; + return __ret; + } + template + long + collate<_CharT>:: + do_hash(const _CharT* __lo, const _CharT* __hi) const + { + unsigned long __val = 0; + for (; __lo < __hi; ++__lo) + __val = + *__lo + ((__val << 7) + | (__val >> (__gnu_cxx::__numeric_traits:: + __digits - 7))); + return static_cast(__val); + } + extern template class collate; + extern template class collate_byname; + extern template + const collate& + use_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template class collate; + extern template class collate_byname; + extern template + const collate& + use_facet >(const locale&); + extern template + bool + has_facet >(const locale&); +} +namespace std __attribute__ ((__visibility__ ("default"))) { + enum _Ios_Fmtflags + { + _S_boolalpha = 1L << 0, + _S_dec = 1L << 1, + _S_fixed = 1L << 2, + _S_hex = 1L << 3, + _S_internal = 1L << 4, + _S_left = 1L << 5, + _S_oct = 1L << 6, + _S_right = 1L << 7, + _S_scientific = 1L << 8, + _S_showbase = 1L << 9, + _S_showpoint = 1L << 10, + _S_showpos = 1L << 11, + _S_skipws = 1L << 12, + _S_unitbuf = 1L << 13, + _S_uppercase = 1L << 14, + _S_adjustfield = _S_left | _S_right | _S_internal, + _S_basefield = _S_dec | _S_oct | _S_hex, + _S_floatfield = _S_scientific | _S_fixed, + _S_ios_fmtflags_end = 1L << 16 + }; + inline _Ios_Fmtflags + operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) & static_cast(__b)); } + inline _Ios_Fmtflags + operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) | static_cast(__b)); } + inline _Ios_Fmtflags + operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) ^ static_cast(__b)); } + inline _Ios_Fmtflags& + operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a | __b; } + inline _Ios_Fmtflags& + operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a & __b; } + inline _Ios_Fmtflags& + operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a ^ __b; } + inline _Ios_Fmtflags + operator~(_Ios_Fmtflags __a) + { return _Ios_Fmtflags(~static_cast(__a)); } + enum _Ios_Openmode + { + _S_app = 1L << 0, + _S_ate = 1L << 1, + _S_bin = 1L << 2, + _S_in = 1L << 3, + _S_out = 1L << 4, + _S_trunc = 1L << 5, + _S_ios_openmode_end = 1L << 16 + }; + inline _Ios_Openmode + operator&(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) & static_cast(__b)); } + inline _Ios_Openmode + operator|(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) | static_cast(__b)); } + inline _Ios_Openmode + operator^(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) ^ static_cast(__b)); } + inline _Ios_Openmode& + operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a | __b; } + inline _Ios_Openmode& + operator&=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a & __b; } + inline _Ios_Openmode& + operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a ^ __b; } + inline _Ios_Openmode + operator~(_Ios_Openmode __a) + { return _Ios_Openmode(~static_cast(__a)); } + enum _Ios_Iostate + { + _S_goodbit = 0, + _S_badbit = 1L << 0, + _S_eofbit = 1L << 1, + _S_failbit = 1L << 2, + _S_ios_iostate_end = 1L << 16 + }; + inline _Ios_Iostate + operator&(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) & static_cast(__b)); } + inline _Ios_Iostate + operator|(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) | static_cast(__b)); } + inline _Ios_Iostate + operator^(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) ^ static_cast(__b)); } + inline _Ios_Iostate& + operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a | __b; } + inline _Ios_Iostate& + operator&=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a & __b; } + inline _Ios_Iostate& + operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a ^ __b; } + inline _Ios_Iostate + operator~(_Ios_Iostate __a) + { return _Ios_Iostate(~static_cast(__a)); } + enum _Ios_Seekdir + { + _S_beg = 0, + _S_cur = 1, + _S_end = 2, + _S_ios_seekdir_end = 1L << 16 + }; + class ios_base + { + public: + class failure : public exception + { + public: + explicit + failure(const string& __str) throw(); + virtual + ~failure() throw(); + virtual const char* + what() const throw(); + private: + string _M_msg; + }; + typedef _Ios_Fmtflags fmtflags; + static const fmtflags boolalpha = _S_boolalpha; + static const fmtflags dec = _S_dec; + static const fmtflags fixed = _S_fixed; + static const fmtflags hex = _S_hex; + static const fmtflags internal = _S_internal; + static const fmtflags left = _S_left; + static const fmtflags oct = _S_oct; + static const fmtflags right = _S_right; + static const fmtflags scientific = _S_scientific; + static const fmtflags showbase = _S_showbase; + static const fmtflags showpoint = _S_showpoint; + static const fmtflags showpos = _S_showpos; + static const fmtflags skipws = _S_skipws; + static const fmtflags unitbuf = _S_unitbuf; + static const fmtflags uppercase = _S_uppercase; + static const fmtflags adjustfield = _S_adjustfield; + static const fmtflags basefield = _S_basefield; + static const fmtflags floatfield = _S_floatfield; + typedef _Ios_Iostate iostate; + static const iostate badbit = _S_badbit; + static const iostate eofbit = _S_eofbit; + static const iostate failbit = _S_failbit; + static const iostate goodbit = _S_goodbit; + typedef _Ios_Openmode openmode; + static const openmode app = _S_app; + static const openmode ate = _S_ate; + static const openmode binary = _S_bin; + static const openmode in = _S_in; + static const openmode out = _S_out; + static const openmode trunc = _S_trunc; + typedef _Ios_Seekdir seekdir; + static const seekdir beg = _S_beg; + static const seekdir cur = _S_cur; + static const seekdir end = _S_end; + typedef int io_state; + typedef int open_mode; + typedef int seek_dir; + typedef std::streampos streampos; + typedef std::streamoff streamoff; + enum event + { + erase_event, + imbue_event, + copyfmt_event + }; + typedef void (*event_callback) (event, ios_base&, int); + void + register_callback(event_callback __fn, int __index); + protected: + streamsize _M_precision; + streamsize _M_width; + fmtflags _M_flags; + iostate _M_exception; + iostate _M_streambuf_state; + struct _Callback_list + { + _Callback_list* _M_next; + ios_base::event_callback _M_fn; + int _M_index; + _Atomic_word _M_refcount; + _Callback_list(ios_base::event_callback __fn, int __index, + _Callback_list* __cb) + : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { } + void + _M_add_reference() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } + int + _M_remove_reference() + { return __gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1); } + }; + _Callback_list* _M_callbacks; + void + _M_call_callbacks(event __ev) throw(); + void + _M_dispose_callbacks(void); + struct _Words + { + void* _M_pword; + long _M_iword; + _Words() : _M_pword(0), _M_iword(0) { } + }; + _Words _M_word_zero; + enum { _S_local_word_size = 8 }; + _Words _M_local_word[_S_local_word_size]; + int _M_word_size; + _Words* _M_word; + _Words& + _M_grow_words(int __index, bool __iword); + locale _M_ios_locale; + void + _M_init(); + public: + class Init + { + friend class ios_base; + public: + Init(); + ~Init(); + private: + static _Atomic_word _S_refcount; + static bool _S_synced_with_stdio; + }; + fmtflags + flags() const + { return _M_flags; } + fmtflags + flags(fmtflags __fmtfl) + { + fmtflags __old = _M_flags; + _M_flags = __fmtfl; + return __old; + } + fmtflags + setf(fmtflags __fmtfl) + { + fmtflags __old = _M_flags; + _M_flags |= __fmtfl; + return __old; + } + fmtflags + setf(fmtflags __fmtfl, fmtflags __mask) + { + fmtflags __old = _M_flags; + _M_flags &= ~__mask; + _M_flags |= (__fmtfl & __mask); + return __old; + } + void + unsetf(fmtflags __mask) + { _M_flags &= ~__mask; } + streamsize + precision() const + { return _M_precision; } + streamsize + precision(streamsize __prec) + { + streamsize __old = _M_precision; + _M_precision = __prec; + return __old; + } + streamsize + width() const + { return _M_width; } + streamsize + width(streamsize __wide) + { + streamsize __old = _M_width; + _M_width = __wide; + return __old; + } + static bool + sync_with_stdio(bool __sync = true); + locale + imbue(const locale& __loc); + locale + getloc() const + { return _M_ios_locale; } + const locale& + _M_getloc() const + { return _M_ios_locale; } + static int + xalloc() throw(); + long& + iword(int __ix) + { + _Words& __word = (__ix < _M_word_size) + ? _M_word[__ix] : _M_grow_words(__ix, true); + return __word._M_iword; + } + void*& + pword(int __ix) + { + _Words& __word = (__ix < _M_word_size) + ? _M_word[__ix] : _M_grow_words(__ix, false); + return __word._M_pword; + } + virtual ~ios_base(); + protected: + ios_base(); + private: + ios_base(const ios_base&); + ios_base& + operator=(const ios_base&); + }; + inline ios_base& + boolalpha(ios_base& __base) + { + __base.setf(ios_base::boolalpha); + return __base; + } + inline ios_base& + noboolalpha(ios_base& __base) + { + __base.unsetf(ios_base::boolalpha); + return __base; + } + inline ios_base& + showbase(ios_base& __base) + { + __base.setf(ios_base::showbase); + return __base; + } + inline ios_base& + noshowbase(ios_base& __base) + { + __base.unsetf(ios_base::showbase); + return __base; + } + inline ios_base& + showpoint(ios_base& __base) + { + __base.setf(ios_base::showpoint); + return __base; + } + inline ios_base& + noshowpoint(ios_base& __base) + { + __base.unsetf(ios_base::showpoint); + return __base; + } + inline ios_base& + showpos(ios_base& __base) + { + __base.setf(ios_base::showpos); + return __base; + } + inline ios_base& + noshowpos(ios_base& __base) + { + __base.unsetf(ios_base::showpos); + return __base; + } + inline ios_base& + skipws(ios_base& __base) + { + __base.setf(ios_base::skipws); + return __base; + } + inline ios_base& + noskipws(ios_base& __base) + { + __base.unsetf(ios_base::skipws); + return __base; + } + inline ios_base& + uppercase(ios_base& __base) + { + __base.setf(ios_base::uppercase); + return __base; + } + inline ios_base& + nouppercase(ios_base& __base) + { + __base.unsetf(ios_base::uppercase); + return __base; + } + inline ios_base& + unitbuf(ios_base& __base) + { + __base.setf(ios_base::unitbuf); + return __base; + } + inline ios_base& + nounitbuf(ios_base& __base) + { + __base.unsetf(ios_base::unitbuf); + return __base; + } + inline ios_base& + internal(ios_base& __base) + { + __base.setf(ios_base::internal, ios_base::adjustfield); + return __base; + } + inline ios_base& + left(ios_base& __base) + { + __base.setf(ios_base::left, ios_base::adjustfield); + return __base; + } + inline ios_base& + right(ios_base& __base) + { + __base.setf(ios_base::right, ios_base::adjustfield); + return __base; + } + inline ios_base& + dec(ios_base& __base) + { + __base.setf(ios_base::dec, ios_base::basefield); + return __base; + } + inline ios_base& + hex(ios_base& __base) + { + __base.setf(ios_base::hex, ios_base::basefield); + return __base; + } + inline ios_base& + oct(ios_base& __base) + { + __base.setf(ios_base::oct, ios_base::basefield); + return __base; + } + inline ios_base& + fixed(ios_base& __base) + { + __base.setf(ios_base::fixed, ios_base::floatfield); + return __base; + } + inline ios_base& + scientific(ios_base& __base) + { + __base.setf(ios_base::scientific, ios_base::floatfield); + return __base; + } +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + streamsize + __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*, + basic_streambuf<_CharT, _Traits>*, bool&); + template + class basic_streambuf + { + public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + typedef basic_streambuf __streambuf_type; + friend class basic_ios; + friend class basic_istream; + friend class basic_ostream; + friend class istreambuf_iterator; + friend class ostreambuf_iterator; + friend streamsize + __copy_streambufs_eof<>(__streambuf_type*, __streambuf_type*, bool&); + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + _CharT2*>::__type + __copy_move_a2(istreambuf_iterator<_CharT2>, + istreambuf_iterator<_CharT2>, _CharT2*); + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + istreambuf_iterator<_CharT2> >::__type + find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + const _CharT2&); + template + friend basic_istream<_CharT2, _Traits2>& + operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*); + template + friend basic_istream<_CharT2, _Traits2>& + operator>>(basic_istream<_CharT2, _Traits2>&, + basic_string<_CharT2, _Traits2, _Alloc>&); + template + friend basic_istream<_CharT2, _Traits2>& + getline(basic_istream<_CharT2, _Traits2>&, + basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2); + protected: + char_type* _M_in_beg; + char_type* _M_in_cur; + char_type* _M_in_end; + char_type* _M_out_beg; + char_type* _M_out_cur; + char_type* _M_out_end; + locale _M_buf_locale; + public: + virtual + ~basic_streambuf() + { } + locale + pubimbue(const locale &__loc) + { + locale __tmp(this->getloc()); + this->imbue(__loc); + _M_buf_locale = __loc; + return __tmp; + } + locale + getloc() const + { return _M_buf_locale; } + __streambuf_type* + pubsetbuf(char_type* __s, streamsize __n) + { return this->setbuf(__s, __n); } + pos_type + pubseekoff(off_type __off, ios_base::seekdir __way, + ios_base::openmode __mode = ios_base::in | ios_base::out) + { return this->seekoff(__off, __way, __mode); } + pos_type + pubseekpos(pos_type __sp, + ios_base::openmode __mode = ios_base::in | ios_base::out) + { return this->seekpos(__sp, __mode); } + int + pubsync() { return this->sync(); } + streamsize + in_avail() + { + const streamsize __ret = this->egptr() - this->gptr(); + return __ret ? __ret : this->showmanyc(); + } + int_type + snextc() + { + int_type __ret = traits_type::eof(); + if (__builtin_expect(!traits_type::eq_int_type(this->sbumpc(), + __ret), true)) + __ret = this->sgetc(); + return __ret; + } + int_type + sbumpc() + { + int_type __ret; + if (__builtin_expect(this->gptr() < this->egptr(), true)) + { + __ret = traits_type::to_int_type(*this->gptr()); + this->gbump(1); + } + else + __ret = this->uflow(); + return __ret; + } + int_type + sgetc() + { + int_type __ret; + if (__builtin_expect(this->gptr() < this->egptr(), true)) + __ret = traits_type::to_int_type(*this->gptr()); + else + __ret = this->underflow(); + return __ret; + } + streamsize + sgetn(char_type* __s, streamsize __n) + { return this->xsgetn(__s, __n); } + int_type + sputbackc(char_type __c) + { + int_type __ret; + const bool __testpos = this->eback() < this->gptr(); + if (__builtin_expect(!__testpos || + !traits_type::eq(__c, this->gptr()[-1]), false)) + __ret = this->pbackfail(traits_type::to_int_type(__c)); + else + { + this->gbump(-1); + __ret = traits_type::to_int_type(*this->gptr()); + } + return __ret; + } + int_type + sungetc() + { + int_type __ret; + if (__builtin_expect(this->eback() < this->gptr(), true)) + { + this->gbump(-1); + __ret = traits_type::to_int_type(*this->gptr()); + } + else + __ret = this->pbackfail(); + return __ret; + } + int_type + sputc(char_type __c) + { + int_type __ret; + if (__builtin_expect(this->pptr() < this->epptr(), true)) + { + *this->pptr() = __c; + this->pbump(1); + __ret = traits_type::to_int_type(__c); + } + else + __ret = this->overflow(traits_type::to_int_type(__c)); + return __ret; + } + streamsize + sputn(const char_type* __s, streamsize __n) + { return this->xsputn(__s, __n); } + protected: + basic_streambuf() + : _M_in_beg(0), _M_in_cur(0), _M_in_end(0), + _M_out_beg(0), _M_out_cur(0), _M_out_end(0), + _M_buf_locale(locale()) + { } + char_type* + eback() const { return _M_in_beg; } + char_type* + gptr() const { return _M_in_cur; } + char_type* + egptr() const { return _M_in_end; } + void + gbump(int __n) { _M_in_cur += __n; } + void + setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) + { + _M_in_beg = __gbeg; + _M_in_cur = __gnext; + _M_in_end = __gend; + } + char_type* + pbase() const { return _M_out_beg; } + char_type* + pptr() const { return _M_out_cur; } + char_type* + epptr() const { return _M_out_end; } + void + pbump(int __n) { _M_out_cur += __n; } + void + setp(char_type* __pbeg, char_type* __pend) + { + _M_out_beg = _M_out_cur = __pbeg; + _M_out_end = __pend; + } + virtual void + imbue(const locale&) + { } + virtual basic_streambuf* + setbuf(char_type*, streamsize) + { return this; } + virtual pos_type + seekoff(off_type, ios_base::seekdir, + ios_base::openmode = ios_base::in | ios_base::out) + { return pos_type(off_type(-1)); } + virtual pos_type + seekpos(pos_type, + ios_base::openmode = ios_base::in | ios_base::out) + { return pos_type(off_type(-1)); } + virtual int + sync() { return 0; } + virtual streamsize + showmanyc() { return 0; } + virtual streamsize + xsgetn(char_type* __s, streamsize __n); + virtual int_type + underflow() + { return traits_type::eof(); } + virtual int_type + uflow() + { + int_type __ret = traits_type::eof(); + const bool __testeof = traits_type::eq_int_type(this->underflow(), + __ret); + if (!__testeof) + { + __ret = traits_type::to_int_type(*this->gptr()); + this->gbump(1); + } + return __ret; + } + virtual int_type + pbackfail(int_type = traits_type::eof()) + { return traits_type::eof(); } + virtual streamsize + xsputn(const char_type* __s, streamsize __n); + virtual int_type + overflow(int_type = traits_type::eof()) + { return traits_type::eof(); } + public: + void + stossc() + { + if (this->gptr() < this->egptr()) + this->gbump(1); + else + this->uflow(); + } + private: + basic_streambuf(const __streambuf_type& __sb) + : _M_in_beg(__sb._M_in_beg), _M_in_cur(__sb._M_in_cur), + _M_in_end(__sb._M_in_end), _M_out_beg(__sb._M_out_beg), + _M_out_cur(__sb._M_out_cur), _M_out_end(__sb._M_out_cur), + _M_buf_locale(__sb._M_buf_locale) + { } + __streambuf_type& + operator=(const __streambuf_type&) { return *this; }; + }; + template<> + streamsize + __copy_streambufs_eof(basic_streambuf* __sbin, + basic_streambuf* __sbout, bool& __ineof); + template<> + streamsize + __copy_streambufs_eof(basic_streambuf* __sbin, + basic_streambuf* __sbout, bool& __ineof); +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + streamsize + basic_streambuf<_CharT, _Traits>:: + xsgetn(char_type* __s, streamsize __n) + { + streamsize __ret = 0; + while (__ret < __n) + { + const streamsize __buf_len = this->egptr() - this->gptr(); + if (__buf_len) + { + const streamsize __remaining = __n - __ret; + const streamsize __len = std::min(__buf_len, __remaining); + traits_type::copy(__s, this->gptr(), __len); + __ret += __len; + __s += __len; + this->gbump(__len); + } + if (__ret < __n) + { + const int_type __c = this->uflow(); + if (!traits_type::eq_int_type(__c, traits_type::eof())) + { + traits_type::assign(*__s++, traits_type::to_char_type(__c)); + ++__ret; + } + else + break; + } + } + return __ret; + } + template + streamsize + basic_streambuf<_CharT, _Traits>:: + xsputn(const char_type* __s, streamsize __n) + { + streamsize __ret = 0; + while (__ret < __n) + { + const streamsize __buf_len = this->epptr() - this->pptr(); + if (__buf_len) + { + const streamsize __remaining = __n - __ret; + const streamsize __len = std::min(__buf_len, __remaining); + traits_type::copy(this->pptr(), __s, __len); + __ret += __len; + __s += __len; + this->pbump(__len); + } + if (__ret < __n) + { + int_type __c = this->overflow(traits_type::to_int_type(*__s)); + if (!traits_type::eq_int_type(__c, traits_type::eof())) + { + ++__ret; + ++__s; + } + else + break; + } + } + return __ret; + } + template + streamsize + __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>* __sbin, + basic_streambuf<_CharT, _Traits>* __sbout, + bool& __ineof) + { + streamsize __ret = 0; + __ineof = true; + typename _Traits::int_type __c = __sbin->sgetc(); + while (!_Traits::eq_int_type(__c, _Traits::eof())) + { + __c = __sbout->sputc(_Traits::to_char_type(__c)); + if (_Traits::eq_int_type(__c, _Traits::eof())) + { + __ineof = false; + break; + } + ++__ret; + __c = __sbin->snextc(); + } + return __ret; + } + template + inline streamsize + __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, + basic_streambuf<_CharT, _Traits>* __sbout) + { + bool __ineof; + return __copy_streambufs_eof(__sbin, __sbout, __ineof); + } + extern template class basic_streambuf; + extern template + streamsize + __copy_streambufs(basic_streambuf*, + basic_streambuf*); + extern template + streamsize + __copy_streambufs_eof(basic_streambuf*, + basic_streambuf*, bool&); + extern template class basic_streambuf; + extern template + streamsize + __copy_streambufs(basic_streambuf*, + basic_streambuf*); + extern template + streamsize + __copy_streambufs_eof(basic_streambuf*, + basic_streambuf*, bool&); +} + + + +typedef unsigned long int wctype_t; +enum +{ + __ISwupper = 0, + __ISwlower = 1, + __ISwalpha = 2, + __ISwdigit = 3, + __ISwxdigit = 4, + __ISwspace = 5, + __ISwprint = 6, + __ISwgraph = 7, + __ISwblank = 8, + __ISwcntrl = 9, + __ISwpunct = 10, + __ISwalnum = 11, + _ISwupper = ((__ISwupper) < 8 ? (int) ((1UL << (__ISwupper)) << 24) : ((__ISwupper) < 16 ? (int) ((1UL << (__ISwupper)) << 8) : ((__ISwupper) < 24 ? (int) ((1UL << (__ISwupper)) >> 8) : (int) ((1UL << (__ISwupper)) >> 24)))), + _ISwlower = ((__ISwlower) < 8 ? (int) ((1UL << (__ISwlower)) << 24) : ((__ISwlower) < 16 ? (int) ((1UL << (__ISwlower)) << 8) : ((__ISwlower) < 24 ? (int) ((1UL << (__ISwlower)) >> 8) : (int) ((1UL << (__ISwlower)) >> 24)))), + _ISwalpha = ((__ISwalpha) < 8 ? (int) ((1UL << (__ISwalpha)) << 24) : ((__ISwalpha) < 16 ? (int) ((1UL << (__ISwalpha)) << 8) : ((__ISwalpha) < 24 ? (int) ((1UL << (__ISwalpha)) >> 8) : (int) ((1UL << (__ISwalpha)) >> 24)))), + _ISwdigit = ((__ISwdigit) < 8 ? (int) ((1UL << (__ISwdigit)) << 24) : ((__ISwdigit) < 16 ? (int) ((1UL << (__ISwdigit)) << 8) : ((__ISwdigit) < 24 ? (int) ((1UL << (__ISwdigit)) >> 8) : (int) ((1UL << (__ISwdigit)) >> 24)))), + _ISwxdigit = ((__ISwxdigit) < 8 ? (int) ((1UL << (__ISwxdigit)) << 24) : ((__ISwxdigit) < 16 ? (int) ((1UL << (__ISwxdigit)) << 8) : ((__ISwxdigit) < 24 ? (int) ((1UL << (__ISwxdigit)) >> 8) : (int) ((1UL << (__ISwxdigit)) >> 24)))), + _ISwspace = ((__ISwspace) < 8 ? (int) ((1UL << (__ISwspace)) << 24) : ((__ISwspace) < 16 ? (int) ((1UL << (__ISwspace)) << 8) : ((__ISwspace) < 24 ? (int) ((1UL << (__ISwspace)) >> 8) : (int) ((1UL << (__ISwspace)) >> 24)))), + _ISwprint = ((__ISwprint) < 8 ? (int) ((1UL << (__ISwprint)) << 24) : ((__ISwprint) < 16 ? (int) ((1UL << (__ISwprint)) << 8) : ((__ISwprint) < 24 ? (int) ((1UL << (__ISwprint)) >> 8) : (int) ((1UL << (__ISwprint)) >> 24)))), + _ISwgraph = ((__ISwgraph) < 8 ? (int) ((1UL << (__ISwgraph)) << 24) : ((__ISwgraph) < 16 ? (int) ((1UL << (__ISwgraph)) << 8) : ((__ISwgraph) < 24 ? (int) ((1UL << (__ISwgraph)) >> 8) : (int) ((1UL << (__ISwgraph)) >> 24)))), + _ISwblank = ((__ISwblank) < 8 ? (int) ((1UL << (__ISwblank)) << 24) : ((__ISwblank) < 16 ? (int) ((1UL << (__ISwblank)) << 8) : ((__ISwblank) < 24 ? (int) ((1UL << (__ISwblank)) >> 8) : (int) ((1UL << (__ISwblank)) >> 24)))), + _ISwcntrl = ((__ISwcntrl) < 8 ? (int) ((1UL << (__ISwcntrl)) << 24) : ((__ISwcntrl) < 16 ? (int) ((1UL << (__ISwcntrl)) << 8) : ((__ISwcntrl) < 24 ? (int) ((1UL << (__ISwcntrl)) >> 8) : (int) ((1UL << (__ISwcntrl)) >> 24)))), + _ISwpunct = ((__ISwpunct) < 8 ? (int) ((1UL << (__ISwpunct)) << 24) : ((__ISwpunct) < 16 ? (int) ((1UL << (__ISwpunct)) << 8) : ((__ISwpunct) < 24 ? (int) ((1UL << (__ISwpunct)) >> 8) : (int) ((1UL << (__ISwpunct)) >> 24)))), + _ISwalnum = ((__ISwalnum) < 8 ? (int) ((1UL << (__ISwalnum)) << 24) : ((__ISwalnum) < 16 ? (int) ((1UL << (__ISwalnum)) << 8) : ((__ISwalnum) < 24 ? (int) ((1UL << (__ISwalnum)) >> 8) : (int) ((1UL << (__ISwalnum)) >> 24)))) +}; +extern "C" { +extern int iswalnum (wint_t __wc) throw (); +extern int iswalpha (wint_t __wc) throw (); +extern int iswcntrl (wint_t __wc) throw (); +extern int iswdigit (wint_t __wc) throw (); +extern int iswgraph (wint_t __wc) throw (); +extern int iswlower (wint_t __wc) throw (); +extern int iswprint (wint_t __wc) throw (); +extern int iswpunct (wint_t __wc) throw (); +extern int iswspace (wint_t __wc) throw (); +extern int iswupper (wint_t __wc) throw (); +extern int iswxdigit (wint_t __wc) throw (); +extern int iswblank (wint_t __wc) throw (); +extern wctype_t wctype (__const char *__property) throw (); +extern int iswctype (wint_t __wc, wctype_t __desc) throw (); +typedef __const __int32_t *wctrans_t; +extern wint_t towlower (wint_t __wc) throw (); +extern wint_t towupper (wint_t __wc) throw (); +} +extern "C" { +extern wctrans_t wctrans (__const char *__property) throw (); +extern wint_t towctrans (wint_t __wc, wctrans_t __desc) throw (); +extern int iswalnum_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswalpha_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswcntrl_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswdigit_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswgraph_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswlower_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswprint_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswpunct_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswspace_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswupper_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswxdigit_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswblank_l (wint_t __wc, __locale_t __locale) throw (); +extern wctype_t wctype_l (__const char *__property, __locale_t __locale) + throw (); +extern int iswctype_l (wint_t __wc, wctype_t __desc, __locale_t __locale) + throw (); +extern wint_t towlower_l (wint_t __wc, __locale_t __locale) throw (); +extern wint_t towupper_l (wint_t __wc, __locale_t __locale) throw (); +extern wctrans_t wctrans_l (__const char *__property, __locale_t __locale) + throw (); +extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc, + __locale_t __locale) throw (); +} +namespace std __attribute__ ((__visibility__ ("default"))) { + using ::wctrans_t; + using ::wctype_t; + using ::wint_t; + using ::iswalnum; + using ::iswalpha; + using ::iswblank; + using ::iswcntrl; + using ::iswctype; + using ::iswdigit; + using ::iswgraph; + using ::iswlower; + using ::iswprint; + using ::iswpunct; + using ::iswspace; + using ::iswupper; + using ::iswxdigit; + using ::towctrans; + using ::towlower; + using ::towupper; + using ::wctrans; + using ::wctype; +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + struct ctype_base + { + typedef const int* __to_type; + typedef unsigned short mask; + static const mask upper = _ISupper; + static const mask lower = _ISlower; + static const mask alpha = _ISalpha; + static const mask digit = _ISdigit; + static const mask xdigit = _ISxdigit; + static const mask space = _ISspace; + static const mask print = _ISprint; + static const mask graph = _ISalpha | _ISdigit | _ISpunct; + static const mask cntrl = _IScntrl; + static const mask punct = _ISpunct; + static const mask alnum = _ISalpha | _ISdigit; + }; +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + class istreambuf_iterator + : public iterator + { + public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename _Traits::int_type int_type; + typedef basic_streambuf<_CharT, _Traits> streambuf_type; + typedef basic_istream<_CharT, _Traits> istream_type; + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + ostreambuf_iterator<_CharT2> >::__type + copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + ostreambuf_iterator<_CharT2>); + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + _CharT2*>::__type + __copy_move_a2(istreambuf_iterator<_CharT2>, + istreambuf_iterator<_CharT2>, _CharT2*); + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + istreambuf_iterator<_CharT2> >::__type + find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + const _CharT2&); + private: + mutable streambuf_type* _M_sbuf; + mutable int_type _M_c; + public: + istreambuf_iterator() throw() + : _M_sbuf(0), _M_c(traits_type::eof()) { } + istreambuf_iterator(istream_type& __s) throw() + : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { } + istreambuf_iterator(streambuf_type* __s) throw() + : _M_sbuf(__s), _M_c(traits_type::eof()) { } + char_type + operator*() const + { + return traits_type::to_char_type(_M_get()); + } + istreambuf_iterator& + operator++() + { + ; + if (_M_sbuf) + { + _M_sbuf->sbumpc(); + _M_c = traits_type::eof(); + } + return *this; + } + istreambuf_iterator + operator++(int) + { + ; + istreambuf_iterator __old = *this; + if (_M_sbuf) + { + __old._M_c = _M_sbuf->sbumpc(); + _M_c = traits_type::eof(); + } + return __old; + } + bool + equal(const istreambuf_iterator& __b) const + { return _M_at_eof() == __b._M_at_eof(); } + private: + int_type + _M_get() const + { + const int_type __eof = traits_type::eof(); + int_type __ret = __eof; + if (_M_sbuf) + { + if (!traits_type::eq_int_type(_M_c, __eof)) + __ret = _M_c; + else if (!traits_type::eq_int_type((__ret = _M_sbuf->sgetc()), + __eof)) + _M_c = __ret; + else + _M_sbuf = 0; + } + return __ret; + } + bool + _M_at_eof() const + { + const int_type __eof = traits_type::eof(); + return traits_type::eq_int_type(_M_get(), __eof); + } + }; + template + inline bool + operator==(const istreambuf_iterator<_CharT, _Traits>& __a, + const istreambuf_iterator<_CharT, _Traits>& __b) + { return __a.equal(__b); } + template + inline bool + operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, + const istreambuf_iterator<_CharT, _Traits>& __b) + { return !__a.equal(__b); } + template + class ostreambuf_iterator + : public iterator + { + public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_streambuf<_CharT, _Traits> streambuf_type; + typedef basic_ostream<_CharT, _Traits> ostream_type; + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + ostreambuf_iterator<_CharT2> >::__type + copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + ostreambuf_iterator<_CharT2>); + private: + streambuf_type* _M_sbuf; + bool _M_failed; + public: + ostreambuf_iterator(ostream_type& __s) throw () + : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { } + ostreambuf_iterator(streambuf_type* __s) throw () + : _M_sbuf(__s), _M_failed(!_M_sbuf) { } + ostreambuf_iterator& + operator=(_CharT __c) + { + if (!_M_failed && + _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof())) + _M_failed = true; + return *this; + } + ostreambuf_iterator& + operator*() + { return *this; } + ostreambuf_iterator& + operator++(int) + { return *this; } + ostreambuf_iterator& + operator++() + { return *this; } + bool + failed() const throw() + { return _M_failed; } + ostreambuf_iterator& + _M_put(const _CharT* __ws, streamsize __len) + { + if (__builtin_expect(!_M_failed, true) + && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len, + false)) + _M_failed = true; + return *this; + } + }; + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT> >::__type + copy(istreambuf_iterator<_CharT> __first, + istreambuf_iterator<_CharT> __last, + ostreambuf_iterator<_CharT> __result) + { + if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed) + { + bool __ineof; + __copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof); + if (!__ineof) + __result._M_failed = true; + } + return __result; + } + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT> >::__type + __copy_move_a2(_CharT* __first, _CharT* __last, + ostreambuf_iterator<_CharT> __result) + { + const streamsize __num = __last - __first; + if (__num > 0) + __result._M_put(__first, __num); + return __result; + } + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT> >::__type + __copy_move_a2(const _CharT* __first, const _CharT* __last, + ostreambuf_iterator<_CharT> __result) + { + const streamsize __num = __last - __first; + if (__num > 0) + __result._M_put(__first, __num); + return __result; + } + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + _CharT*>::__type + __copy_move_a2(istreambuf_iterator<_CharT> __first, + istreambuf_iterator<_CharT> __last, _CharT* __result) + { + typedef istreambuf_iterator<_CharT> __is_iterator_type; + typedef typename __is_iterator_type::traits_type traits_type; + typedef typename __is_iterator_type::streambuf_type streambuf_type; + typedef typename traits_type::int_type int_type; + if (__first._M_sbuf && !__last._M_sbuf) + { + streambuf_type* __sb = __first._M_sbuf; + int_type __c = __sb->sgetc(); + while (!traits_type::eq_int_type(__c, traits_type::eof())) + { + const streamsize __n = __sb->egptr() - __sb->gptr(); + if (__n > 1) + { + traits_type::copy(__result, __sb->gptr(), __n); + __sb->gbump(__n); + __result += __n; + __c = __sb->underflow(); + } + else + { + *__result++ = traits_type::to_char_type(__c); + __c = __sb->snextc(); + } + } + } + return __result; + } + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + istreambuf_iterator<_CharT> >::__type + find(istreambuf_iterator<_CharT> __first, + istreambuf_iterator<_CharT> __last, const _CharT& __val) + { + typedef istreambuf_iterator<_CharT> __is_iterator_type; + typedef typename __is_iterator_type::traits_type traits_type; + typedef typename __is_iterator_type::streambuf_type streambuf_type; + typedef typename traits_type::int_type int_type; + if (__first._M_sbuf && !__last._M_sbuf) + { + const int_type __ival = traits_type::to_int_type(__val); + streambuf_type* __sb = __first._M_sbuf; + int_type __c = __sb->sgetc(); + while (!traits_type::eq_int_type(__c, traits_type::eof()) + && !traits_type::eq_int_type(__c, __ival)) + { + streamsize __n = __sb->egptr() - __sb->gptr(); + if (__n > 1) + { + const _CharT* __p = traits_type::find(__sb->gptr(), + __n, __val); + if (__p) + __n = __p - __sb->gptr(); + __sb->gbump(__n); + __c = __sb->sgetc(); + } + else + __c = __sb->snextc(); + } + if (!traits_type::eq_int_type(__c, traits_type::eof())) + __first._M_c = __c; + else + __first._M_sbuf = 0; + } + return __first; + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + void + __convert_to_v(const char* __in, _Tv& __out, ios_base::iostate& __err, + const __c_locale& __cloc); + template<> + void + __convert_to_v(const char*, float&, ios_base::iostate&, + const __c_locale&); + template<> + void + __convert_to_v(const char*, double&, ios_base::iostate&, + const __c_locale&); + template<> + void + __convert_to_v(const char*, long double&, ios_base::iostate&, + const __c_locale&); + template + struct __pad + { + static void + _S_pad(ios_base& __io, _CharT __fill, _CharT* __news, + const _CharT* __olds, streamsize __newlen, streamsize __oldlen); + }; + template + _CharT* + __add_grouping(_CharT* __s, _CharT __sep, + const char* __gbeg, size_t __gsize, + const _CharT* __first, const _CharT* __last); + template + inline + ostreambuf_iterator<_CharT> + __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len) + { + __s._M_put(__ws, __len); + return __s; + } + template + inline + _OutIter + __write(_OutIter __s, const _CharT* __ws, int __len) + { + for (int __j = 0; __j < __len; __j++, ++__s) + *__s = __ws[__j]; + return __s; + } + template + class __ctype_abstract_base : public locale::facet, public ctype_base + { + public: + typedef _CharT char_type; + bool + is(mask __m, char_type __c) const + { return this->do_is(__m, __c); } + const char_type* + is(const char_type *__lo, const char_type *__hi, mask *__vec) const + { return this->do_is(__lo, __hi, __vec); } + const char_type* + scan_is(mask __m, const char_type* __lo, const char_type* __hi) const + { return this->do_scan_is(__m, __lo, __hi); } + const char_type* + scan_not(mask __m, const char_type* __lo, const char_type* __hi) const + { return this->do_scan_not(__m, __lo, __hi); } + char_type + toupper(char_type __c) const + { return this->do_toupper(__c); } + const char_type* + toupper(char_type *__lo, const char_type* __hi) const + { return this->do_toupper(__lo, __hi); } + char_type + tolower(char_type __c) const + { return this->do_tolower(__c); } + const char_type* + tolower(char_type* __lo, const char_type* __hi) const + { return this->do_tolower(__lo, __hi); } + char_type + widen(char __c) const + { return this->do_widen(__c); } + const char* + widen(const char* __lo, const char* __hi, char_type* __to) const + { return this->do_widen(__lo, __hi, __to); } + char + narrow(char_type __c, char __dfault) const + { return this->do_narrow(__c, __dfault); } + const char_type* + narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char *__to) const + { return this->do_narrow(__lo, __hi, __dfault, __to); } + protected: + explicit + __ctype_abstract_base(size_t __refs = 0): facet(__refs) { } + virtual + ~__ctype_abstract_base() { } + virtual bool + do_is(mask __m, char_type __c) const = 0; + virtual const char_type* + do_is(const char_type* __lo, const char_type* __hi, + mask* __vec) const = 0; + virtual const char_type* + do_scan_is(mask __m, const char_type* __lo, + const char_type* __hi) const = 0; + virtual const char_type* + do_scan_not(mask __m, const char_type* __lo, + const char_type* __hi) const = 0; + virtual char_type + do_toupper(char_type) const = 0; + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const = 0; + virtual char_type + do_tolower(char_type) const = 0; + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const = 0; + virtual char_type + do_widen(char) const = 0; + virtual const char* + do_widen(const char* __lo, const char* __hi, + char_type* __dest) const = 0; + virtual char + do_narrow(char_type, char __dfault) const = 0; + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char* __dest) const = 0; + }; + template + class ctype : public __ctype_abstract_base<_CharT> + { + public: + typedef _CharT char_type; + typedef typename __ctype_abstract_base<_CharT>::mask mask; + static locale::id id; + explicit + ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { } + protected: + virtual + ~ctype(); + virtual bool + do_is(mask __m, char_type __c) const; + virtual const char_type* + do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; + virtual const char_type* + do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; + virtual const char_type* + do_scan_not(mask __m, const char_type* __lo, + const char_type* __hi) const; + virtual char_type + do_toupper(char_type __c) const; + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const; + virtual char_type + do_tolower(char_type __c) const; + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const; + virtual char_type + do_widen(char __c) const; + virtual const char* + do_widen(const char* __lo, const char* __hi, char_type* __dest) const; + virtual char + do_narrow(char_type, char __dfault) const; + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char* __dest) const; + }; + template + locale::id ctype<_CharT>::id; + template<> + class ctype : public locale::facet, public ctype_base + { + public: + typedef char char_type; + protected: + __c_locale _M_c_locale_ctype; + bool _M_del; + __to_type _M_toupper; + __to_type _M_tolower; + const mask* _M_table; + mutable char _M_widen_ok; + mutable char _M_widen[1 + static_cast(-1)]; + mutable char _M_narrow[1 + static_cast(-1)]; + mutable char _M_narrow_ok; + public: + static locale::id id; + static const size_t table_size = 1 + static_cast(-1); + explicit + ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0); + explicit + ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false, + size_t __refs = 0); + inline bool + is(mask __m, char __c) const; + inline const char* + is(const char* __lo, const char* __hi, mask* __vec) const; + inline const char* + scan_is(mask __m, const char* __lo, const char* __hi) const; + inline const char* + scan_not(mask __m, const char* __lo, const char* __hi) const; + char_type + toupper(char_type __c) const + { return this->do_toupper(__c); } + const char_type* + toupper(char_type *__lo, const char_type* __hi) const + { return this->do_toupper(__lo, __hi); } + char_type + tolower(char_type __c) const + { return this->do_tolower(__c); } + const char_type* + tolower(char_type* __lo, const char_type* __hi) const + { return this->do_tolower(__lo, __hi); } + char_type + widen(char __c) const + { + if (_M_widen_ok) + return _M_widen[static_cast(__c)]; + this->_M_widen_init(); + return this->do_widen(__c); + } + const char* + widen(const char* __lo, const char* __hi, char_type* __to) const + { + if (_M_widen_ok == 1) + { + __builtin_memcpy(__to, __lo, __hi - __lo); + return __hi; + } + if (!_M_widen_ok) + _M_widen_init(); + return this->do_widen(__lo, __hi, __to); + } + char + narrow(char_type __c, char __dfault) const + { + if (_M_narrow[static_cast(__c)]) + return _M_narrow[static_cast(__c)]; + const char __t = do_narrow(__c, __dfault); + if (__t != __dfault) + _M_narrow[static_cast(__c)] = __t; + return __t; + } + const char_type* + narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char *__to) const + { + if (__builtin_expect(_M_narrow_ok == 1, true)) + { + __builtin_memcpy(__to, __lo, __hi - __lo); + return __hi; + } + if (!_M_narrow_ok) + _M_narrow_init(); + return this->do_narrow(__lo, __hi, __dfault, __to); + } + const mask* + table() const throw() + { return _M_table; } + static const mask* + classic_table() throw(); + protected: + virtual + ~ctype(); + virtual char_type + do_toupper(char_type) const; + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const; + virtual char_type + do_tolower(char_type) const; + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const; + virtual char_type + do_widen(char __c) const + { return __c; } + virtual const char* + do_widen(const char* __lo, const char* __hi, char_type* __dest) const + { + __builtin_memcpy(__dest, __lo, __hi - __lo); + return __hi; + } + virtual char + do_narrow(char_type __c, char) const + { return __c; } + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char, char* __dest) const + { + __builtin_memcpy(__dest, __lo, __hi - __lo); + return __hi; + } + private: + void _M_narrow_init() const; + void _M_widen_init() const; + }; + template<> + class ctype : public __ctype_abstract_base + { + public: + typedef wchar_t char_type; + typedef wctype_t __wmask_type; + protected: + __c_locale _M_c_locale_ctype; + bool _M_narrow_ok; + char _M_narrow[128]; + wint_t _M_widen[1 + static_cast(-1)]; + mask _M_bit[16]; + __wmask_type _M_wmask[16]; + public: + static locale::id id; + explicit + ctype(size_t __refs = 0); + explicit + ctype(__c_locale __cloc, size_t __refs = 0); + protected: + __wmask_type + _M_convert_to_wmask(const mask __m) const; + virtual + ~ctype(); + virtual bool + do_is(mask __m, char_type __c) const; + virtual const char_type* + do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; + virtual const char_type* + do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; + virtual const char_type* + do_scan_not(mask __m, const char_type* __lo, + const char_type* __hi) const; + virtual char_type + do_toupper(char_type) const; + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const; + virtual char_type + do_tolower(char_type) const; + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const; + virtual char_type + do_widen(char) const; + virtual const char* + do_widen(const char* __lo, const char* __hi, char_type* __dest) const; + virtual char + do_narrow(char_type, char __dfault) const; + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char* __dest) const; + void + _M_initialize_ctype(); + }; + template + class ctype_byname : public ctype<_CharT> + { + public: + typedef typename ctype<_CharT>::mask mask; + explicit + ctype_byname(const char* __s, size_t __refs = 0); + protected: + virtual + ~ctype_byname() { }; + }; + template<> + class ctype_byname : public ctype + { + public: + explicit + ctype_byname(const char* __s, size_t __refs = 0); + protected: + virtual + ~ctype_byname(); + }; + template<> + class ctype_byname : public ctype + { + public: + explicit + ctype_byname(const char* __s, size_t __refs = 0); + protected: + virtual + ~ctype_byname(); + }; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + bool + ctype:: + is(mask __m, char __c) const + { return _M_table[static_cast(__c)] & __m; } + const char* + ctype:: + is(const char* __low, const char* __high, mask* __vec) const + { + while (__low < __high) + *__vec++ = _M_table[static_cast(*__low++)]; + return __high; + } + const char* + ctype:: + scan_is(mask __m, const char* __low, const char* __high) const + { + while (__low < __high + && !(_M_table[static_cast(*__low)] & __m)) + ++__low; + return __low; + } + const char* + ctype:: + scan_not(mask __m, const char* __low, const char* __high) const + { + while (__low < __high + && (_M_table[static_cast(*__low)] & __m) != 0) + ++__low; + return __low; + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + class __num_base + { + public: + enum + { + _S_ominus, + _S_oplus, + _S_ox, + _S_oX, + _S_odigits, + _S_odigits_end = _S_odigits + 16, + _S_oudigits = _S_odigits_end, + _S_oudigits_end = _S_oudigits + 16, + _S_oe = _S_odigits + 14, + _S_oE = _S_oudigits + 14, + _S_oend = _S_oudigits_end + }; + static const char* _S_atoms_out; + static const char* _S_atoms_in; + enum + { + _S_iminus, + _S_iplus, + _S_ix, + _S_iX, + _S_izero, + _S_ie = _S_izero + 14, + _S_iE = _S_izero + 20, + _S_iend = 26 + }; + static void + _S_format_float(const ios_base& __io, char* __fptr, char __mod); + }; + template + struct __numpunct_cache : public locale::facet + { + const char* _M_grouping; + size_t _M_grouping_size; + bool _M_use_grouping; + const _CharT* _M_truename; + size_t _M_truename_size; + const _CharT* _M_falsename; + size_t _M_falsename_size; + _CharT _M_decimal_point; + _CharT _M_thousands_sep; + _CharT _M_atoms_out[__num_base::_S_oend]; + _CharT _M_atoms_in[__num_base::_S_iend]; + bool _M_allocated; + __numpunct_cache(size_t __refs = 0) : facet(__refs), + _M_grouping(__null), _M_grouping_size(0), _M_use_grouping(false), + _M_truename(__null), _M_truename_size(0), _M_falsename(__null), + _M_falsename_size(0), _M_decimal_point(_CharT()), + _M_thousands_sep(_CharT()), _M_allocated(false) + { } + ~__numpunct_cache(); + void + _M_cache(const locale& __loc); + private: + __numpunct_cache& + operator=(const __numpunct_cache&); + explicit + __numpunct_cache(const __numpunct_cache&); + }; + template + __numpunct_cache<_CharT>::~__numpunct_cache() + { + if (_M_allocated) + { + delete [] _M_grouping; + delete [] _M_truename; + delete [] _M_falsename; + } + } + template + class numpunct : public locale::facet + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + typedef __numpunct_cache<_CharT> __cache_type; + protected: + __cache_type* _M_data; + public: + static locale::id id; + explicit + numpunct(size_t __refs = 0) : facet(__refs), _M_data(__null) + { _M_initialize_numpunct(); } + explicit + numpunct(__cache_type* __cache, size_t __refs = 0) + : facet(__refs), _M_data(__cache) + { _M_initialize_numpunct(); } + explicit + numpunct(__c_locale __cloc, size_t __refs = 0) + : facet(__refs), _M_data(__null) + { _M_initialize_numpunct(__cloc); } + char_type + decimal_point() const + { return this->do_decimal_point(); } + char_type + thousands_sep() const + { return this->do_thousands_sep(); } + string + grouping() const + { return this->do_grouping(); } + string_type + truename() const + { return this->do_truename(); } + string_type + falsename() const + { return this->do_falsename(); } + protected: + virtual + ~numpunct(); + virtual char_type + do_decimal_point() const + { return _M_data->_M_decimal_point; } + virtual char_type + do_thousands_sep() const + { return _M_data->_M_thousands_sep; } + virtual string + do_grouping() const + { return _M_data->_M_grouping; } + virtual string_type + do_truename() const + { return _M_data->_M_truename; } + virtual string_type + do_falsename() const + { return _M_data->_M_falsename; } + void + _M_initialize_numpunct(__c_locale __cloc = __null); + }; + template + locale::id numpunct<_CharT>::id; + template<> + numpunct::~numpunct(); + template<> + void + numpunct::_M_initialize_numpunct(__c_locale __cloc); + template<> + numpunct::~numpunct(); + template<> + void + numpunct::_M_initialize_numpunct(__c_locale __cloc); + template + class numpunct_byname : public numpunct<_CharT> + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + explicit + numpunct_byname(const char* __s, size_t __refs = 0) + : numpunct<_CharT>(__refs) + { + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + __c_locale __tmp; + this->_S_create_c_locale(__tmp, __s); + this->_M_initialize_numpunct(__tmp); + this->_S_destroy_c_locale(__tmp); + } + } + protected: + virtual + ~numpunct_byname() { } + }; + template + class num_get : public locale::facet + { + public: + typedef _CharT char_type; + typedef _InIter iter_type; + static locale::id id; + explicit + num_get(size_t __refs = 0) : facet(__refs) { } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, bool& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned short& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned int& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long long& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long long& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, float& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, double& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long double& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, void*& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + protected: + virtual ~num_get() { } + iter_type + _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&, + string&) const; + template + iter_type + _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&, + _ValueT&) const; + template + typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, int>::__type + _M_find(const _CharT2*, size_t __len, _CharT2 __c) const + { + int __ret = -1; + if (__len <= 10) + { + if (__c >= _CharT2('0') && __c < _CharT2(_CharT2('0') + __len)) + __ret = __c - _CharT2('0'); + } + else + { + if (__c >= _CharT2('0') && __c <= _CharT2('9')) + __ret = __c - _CharT2('0'); + else if (__c >= _CharT2('a') && __c <= _CharT2('f')) + __ret = 10 + (__c - _CharT2('a')); + else if (__c >= _CharT2('A') && __c <= _CharT2('F')) + __ret = 10 + (__c - _CharT2('A')); + } + return __ret; + } + template + typename __gnu_cxx::__enable_if::__value, + int>::__type + _M_find(const _CharT2* __zero, size_t __len, _CharT2 __c) const + { + int __ret = -1; + const char_type* __q = char_traits<_CharT2>::find(__zero, __len, __c); + if (__q) + { + __ret = __q - __zero; + if (__ret > 15) + __ret -= 6; + } + return __ret; + } + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const; + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned short& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned int& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long long& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long long& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + float&) const; + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + double&) const; + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + long double&) const; + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + void*&) const; + }; + template + locale::id num_get<_CharT, _InIter>::id; + template + class num_put : public locale::facet + { + public: + typedef _CharT char_type; + typedef _OutIter iter_type; + static locale::id id; + explicit + num_put(size_t __refs = 0) : facet(__refs) { } + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, bool __v) const + { return this->do_put(__s, __f, __fill, __v); } + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, long __v) const + { return this->do_put(__s, __f, __fill, __v); } + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + unsigned long __v) const + { return this->do_put(__s, __f, __fill, __v); } + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, long long __v) const + { return this->do_put(__s, __f, __fill, __v); } + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + unsigned long long __v) const + { return this->do_put(__s, __f, __fill, __v); } + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, double __v) const + { return this->do_put(__s, __f, __fill, __v); } + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + long double __v) const + { return this->do_put(__s, __f, __fill, __v); } + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + const void* __v) const + { return this->do_put(__s, __f, __fill, __v); } + protected: + template + iter_type + _M_insert_float(iter_type, ios_base& __io, char_type __fill, + char __mod, _ValueT __v) const; + void + _M_group_float(const char* __grouping, size_t __grouping_size, + char_type __sep, const char_type* __p, char_type* __new, + char_type* __cs, int& __len) const; + template + iter_type + _M_insert_int(iter_type, ios_base& __io, char_type __fill, + _ValueT __v) const; + void + _M_group_int(const char* __grouping, size_t __grouping_size, + char_type __sep, ios_base& __io, char_type* __new, + char_type* __cs, int& __len) const; + void + _M_pad(char_type __fill, streamsize __w, ios_base& __io, + char_type* __new, const char_type* __cs, int& __len) const; + virtual + ~num_put() { }; + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, bool __v) const; + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const + { return _M_insert_int(__s, __io, __fill, __v); } + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, + unsigned long __v) const + { return _M_insert_int(__s, __io, __fill, __v); } + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, + long long __v) const + { return _M_insert_int(__s, __io, __fill, __v); } + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, + unsigned long long __v) const + { return _M_insert_int(__s, __io, __fill, __v); } + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, double __v) const; + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, long double __v) const; + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, const void* __v) const; + }; + template + locale::id num_put<_CharT, _OutIter>::id; + template + inline bool + isspace(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::space, __c); } + template + inline bool + isprint(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::print, __c); } + template + inline bool + iscntrl(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::cntrl, __c); } + template + inline bool + isupper(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::upper, __c); } + template + inline bool + islower(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::lower, __c); } + template + inline bool + isalpha(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::alpha, __c); } + template + inline bool + isdigit(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::digit, __c); } + template + inline bool + ispunct(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::punct, __c); } + template + inline bool + isxdigit(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::xdigit, __c); } + template + inline bool + isalnum(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::alnum, __c); } + template + inline bool + isgraph(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::graph, __c); } + template + inline _CharT + toupper(_CharT __c, const locale& __loc) + { return use_facet >(__loc).toupper(__c); } + template + inline _CharT + tolower(_CharT __c, const locale& __loc) + { return use_facet >(__loc).tolower(__c); } +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + struct __use_cache + { + const _Facet* + operator() (const locale& __loc) const; + }; + template + struct __use_cache<__numpunct_cache<_CharT> > + { + const __numpunct_cache<_CharT>* + operator() (const locale& __loc) const + { + const size_t __i = numpunct<_CharT>::id._M_id(); + const locale::facet** __caches = __loc._M_impl->_M_caches; + if (!__caches[__i]) + { + __numpunct_cache<_CharT>* __tmp = __null; + try + { + __tmp = new __numpunct_cache<_CharT>; + __tmp->_M_cache(__loc); + } + catch(...) + { + delete __tmp; + throw; + } + __loc._M_impl->_M_install_cache(__tmp, __i); + } + return static_cast*>(__caches[__i]); + } + }; + template + void + __numpunct_cache<_CharT>::_M_cache(const locale& __loc) + { + _M_allocated = true; + const numpunct<_CharT>& __np = use_facet >(__loc); + _M_grouping_size = __np.grouping().size(); + char* __grouping = new char[_M_grouping_size]; + __np.grouping().copy(__grouping, _M_grouping_size); + _M_grouping = __grouping; + _M_use_grouping = (_M_grouping_size + && static_cast(_M_grouping[0]) > 0 + && (_M_grouping[0] + != __gnu_cxx::__numeric_traits::__max)); + _M_truename_size = __np.truename().size(); + _CharT* __truename = new _CharT[_M_truename_size]; + __np.truename().copy(__truename, _M_truename_size); + _M_truename = __truename; + _M_falsename_size = __np.falsename().size(); + _CharT* __falsename = new _CharT[_M_falsename_size]; + __np.falsename().copy(__falsename, _M_falsename_size); + _M_falsename = __falsename; + _M_decimal_point = __np.decimal_point(); + _M_thousands_sep = __np.thousands_sep(); + const ctype<_CharT>& __ct = use_facet >(__loc); + __ct.widen(__num_base::_S_atoms_out, + __num_base::_S_atoms_out + __num_base::_S_oend, _M_atoms_out); + __ct.widen(__num_base::_S_atoms_in, + __num_base::_S_atoms_in + __num_base::_S_iend, _M_atoms_in); + } + bool + __verify_grouping(const char* __grouping, size_t __grouping_size, + const string& __grouping_tmp); + template + _InIter + num_get<_CharT, _InIter>:: + _M_extract_float(_InIter __beg, _InIter __end, ios_base& __io, + ios_base::iostate& __err, string& __xtrc) const + { + typedef char_traits<_CharT> __traits_type; + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + const _CharT* __lit = __lc->_M_atoms_in; + char_type __c = char_type(); + bool __testeof = __beg == __end; + if (!__testeof) + { + __c = *__beg; + const bool __plus = __c == __lit[__num_base::_S_iplus]; + if ((__plus || __c == __lit[__num_base::_S_iminus]) + && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + && !(__c == __lc->_M_decimal_point)) + { + __xtrc += __plus ? '+' : '-'; + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + } + bool __found_mantissa = false; + int __sep_pos = 0; + while (!__testeof) + { + if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + || __c == __lc->_M_decimal_point) + break; + else if (__c == __lit[__num_base::_S_izero]) + { + if (!__found_mantissa) + { + __xtrc += '0'; + __found_mantissa = true; + } + ++__sep_pos; + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + else + break; + } + bool __found_dec = false; + bool __found_sci = false; + string __found_grouping; + if (__lc->_M_use_grouping) + __found_grouping.reserve(32); + const char_type* __lit_zero = __lit + __num_base::_S_izero; + if (!__lc->_M_allocated) + while (!__testeof) + { + const int __digit = _M_find(__lit_zero, 10, __c); + if (__digit != -1) + { + __xtrc += '0' + __digit; + __found_mantissa = true; + } + else if (__c == __lc->_M_decimal_point + && !__found_dec && !__found_sci) + { + __xtrc += '.'; + __found_dec = true; + } + else if ((__c == __lit[__num_base::_S_ie] + || __c == __lit[__num_base::_S_iE]) + && !__found_sci && __found_mantissa) + { + __xtrc += 'e'; + __found_sci = true; + if (++__beg != __end) + { + __c = *__beg; + const bool __plus = __c == __lit[__num_base::_S_iplus]; + if (__plus || __c == __lit[__num_base::_S_iminus]) + __xtrc += __plus ? '+' : '-'; + else + continue; + } + else + { + __testeof = true; + break; + } + } + else + break; + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + else + while (!__testeof) + { + if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + { + if (!__found_dec && !__found_sci) + { + if (__sep_pos) + { + __found_grouping += static_cast(__sep_pos); + __sep_pos = 0; + } + else + { + __xtrc.clear(); + break; + } + } + else + break; + } + else if (__c == __lc->_M_decimal_point) + { + if (!__found_dec && !__found_sci) + { + if (__found_grouping.size()) + __found_grouping += static_cast(__sep_pos); + __xtrc += '.'; + __found_dec = true; + } + else + break; + } + else + { + const char_type* __q = + __traits_type::find(__lit_zero, 10, __c); + if (__q) + { + __xtrc += '0' + (__q - __lit_zero); + __found_mantissa = true; + ++__sep_pos; + } + else if ((__c == __lit[__num_base::_S_ie] + || __c == __lit[__num_base::_S_iE]) + && !__found_sci && __found_mantissa) + { + if (__found_grouping.size() && !__found_dec) + __found_grouping += static_cast(__sep_pos); + __xtrc += 'e'; + __found_sci = true; + if (++__beg != __end) + { + __c = *__beg; + const bool __plus = __c == __lit[__num_base::_S_iplus]; + if ((__plus || __c == __lit[__num_base::_S_iminus]) + && !(__lc->_M_use_grouping + && __c == __lc->_M_thousands_sep) + && !(__c == __lc->_M_decimal_point)) + __xtrc += __plus ? '+' : '-'; + else + continue; + } + else + { + __testeof = true; + break; + } + } + else + break; + } + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + if (__found_grouping.size()) + { + if (!__found_dec && !__found_sci) + __found_grouping += static_cast(__sep_pos); + if (!std::__verify_grouping(__lc->_M_grouping, + __lc->_M_grouping_size, + __found_grouping)) + __err = ios_base::failbit; + } + return __beg; + } + template + template + _InIter + num_get<_CharT, _InIter>:: + _M_extract_int(_InIter __beg, _InIter __end, ios_base& __io, + ios_base::iostate& __err, _ValueT& __v) const + { + typedef char_traits<_CharT> __traits_type; + using __gnu_cxx::__add_unsigned; + typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + const _CharT* __lit = __lc->_M_atoms_in; + char_type __c = char_type(); + const ios_base::fmtflags __basefield = __io.flags() + & ios_base::basefield; + const bool __oct = __basefield == ios_base::oct; + int __base = __oct ? 8 : (__basefield == ios_base::hex ? 16 : 10); + bool __testeof = __beg == __end; + bool __negative = false; + if (!__testeof) + { + __c = *__beg; + __negative = __c == __lit[__num_base::_S_iminus]; + if ((__negative || __c == __lit[__num_base::_S_iplus]) + && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + && !(__c == __lc->_M_decimal_point)) + { + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + } + bool __found_zero = false; + int __sep_pos = 0; + while (!__testeof) + { + if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + || __c == __lc->_M_decimal_point) + break; + else if (__c == __lit[__num_base::_S_izero] + && (!__found_zero || __base == 10)) + { + __found_zero = true; + ++__sep_pos; + if (__basefield == 0) + __base = 8; + if (__base == 8) + __sep_pos = 0; + } + else if (__found_zero + && (__c == __lit[__num_base::_S_ix] + || __c == __lit[__num_base::_S_iX])) + { + if (__basefield == 0) + __base = 16; + if (__base == 16) + { + __found_zero = false; + __sep_pos = 0; + } + else + break; + } + else + break; + if (++__beg != __end) + { + __c = *__beg; + if (!__found_zero) + break; + } + else + __testeof = true; + } + const size_t __len = (__base == 16 ? __num_base::_S_iend + - __num_base::_S_izero : __base); + string __found_grouping; + if (__lc->_M_use_grouping) + __found_grouping.reserve(32); + bool __testfail = false; + bool __testoverflow = false; + const __unsigned_type __max = + (__negative && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) + ? -__gnu_cxx::__numeric_traits<_ValueT>::__min + : __gnu_cxx::__numeric_traits<_ValueT>::__max; + const __unsigned_type __smax = __max / __base; + __unsigned_type __result = 0; + int __digit = 0; + const char_type* __lit_zero = __lit + __num_base::_S_izero; + if (!__lc->_M_allocated) + while (!__testeof) + { + __digit = _M_find(__lit_zero, __len, __c); + if (__digit == -1) + break; + if (__result > __smax) + __testoverflow = true; + else + { + __result *= __base; + __testoverflow |= __result > __max - __digit; + __result += __digit; + ++__sep_pos; + } + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + else + while (!__testeof) + { + if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + { + if (__sep_pos) + { + __found_grouping += static_cast(__sep_pos); + __sep_pos = 0; + } + else + { + __testfail = true; + break; + } + } + else if (__c == __lc->_M_decimal_point) + break; + else + { + const char_type* __q = + __traits_type::find(__lit_zero, __len, __c); + if (!__q) + break; + __digit = __q - __lit_zero; + if (__digit > 15) + __digit -= 6; + if (__result > __smax) + __testoverflow = true; + else + { + __result *= __base; + __testoverflow |= __result > __max - __digit; + __result += __digit; + ++__sep_pos; + } + } + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + if (__found_grouping.size()) + { + __found_grouping += static_cast(__sep_pos); + if (!std::__verify_grouping(__lc->_M_grouping, + __lc->_M_grouping_size, + __found_grouping)) + __err = ios_base::failbit; + } + if ((!__sep_pos && !__found_zero && !__found_grouping.size()) + || __testfail) + { + __v = 0; + __err = ios_base::failbit; + } + else if (__testoverflow) + { + if (__negative + && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) + __v = __gnu_cxx::__numeric_traits<_ValueT>::__min; + else + __v = __gnu_cxx::__numeric_traits<_ValueT>::__max; + __err = ios_base::failbit; + } + else + __v = __negative ? -__result : __result; + if (__testeof) + __err |= ios_base::eofbit; + return __beg; + } + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, bool& __v) const + { + if (!(__io.flags() & ios_base::boolalpha)) + { + long __l = -1; + __beg = _M_extract_int(__beg, __end, __io, __err, __l); + if (__l == 0 || __l == 1) + __v = bool(__l); + else + { + __v = true; + __err = ios_base::failbit; + if (__beg == __end) + __err |= ios_base::eofbit; + } + } + else + { + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + bool __testf = true; + bool __testt = true; + bool __donef = __lc->_M_falsename_size == 0; + bool __donet = __lc->_M_truename_size == 0; + bool __testeof = false; + size_t __n = 0; + while (!__donef || !__donet) + { + if (__beg == __end) + { + __testeof = true; + break; + } + const char_type __c = *__beg; + if (!__donef) + __testf = __c == __lc->_M_falsename[__n]; + if (!__testf && __donet) + break; + if (!__donet) + __testt = __c == __lc->_M_truename[__n]; + if (!__testt && __donef) + break; + if (!__testt && !__testf) + break; + ++__n; + ++__beg; + __donef = !__testf || __n >= __lc->_M_falsename_size; + __donet = !__testt || __n >= __lc->_M_truename_size; + } + if (__testf && __n == __lc->_M_falsename_size && __n) + { + __v = false; + if (__testt && __n == __lc->_M_truename_size) + __err = ios_base::failbit; + else + __err = __testeof ? ios_base::eofbit : ios_base::goodbit; + } + else if (__testt && __n == __lc->_M_truename_size && __n) + { + __v = true; + __err = __testeof ? ios_base::eofbit : ios_base::goodbit; + } + else + { + __v = false; + __err = ios_base::failbit; + if (__testeof) + __err |= ios_base::eofbit; + } + } + return __beg; + } + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, float& __v) const + { + string __xtrc; + __xtrc.reserve(32); + __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); + std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, double& __v) const + { + string __xtrc; + __xtrc.reserve(32); + __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); + std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long double& __v) const + { + string __xtrc; + __xtrc.reserve(32); + __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); + std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, void*& __v) const + { + typedef ios_base::fmtflags fmtflags; + const fmtflags __fmt = __io.flags(); + __io.flags((__fmt & ~ios_base::basefield) | ios_base::hex); + typedef __gnu_cxx::__conditional_type<(sizeof(void*) + <= sizeof(unsigned long)), + unsigned long, unsigned long long>::__type _UIntPtrType; + _UIntPtrType __ul; + __beg = _M_extract_int(__beg, __end, __io, __err, __ul); + __io.flags(__fmt); + __v = reinterpret_cast(__ul); + return __beg; + } + template + void + num_put<_CharT, _OutIter>:: + _M_pad(_CharT __fill, streamsize __w, ios_base& __io, + _CharT* __new, const _CharT* __cs, int& __len) const + { + __pad<_CharT, char_traits<_CharT> >::_S_pad(__io, __fill, __new, + __cs, __w, __len); + __len = static_cast(__w); + } + template + int + __int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit, + ios_base::fmtflags __flags, bool __dec) + { + _CharT* __buf = __bufend; + if (__builtin_expect(__dec, true)) + { + do + { + *--__buf = __lit[(__v % 10) + __num_base::_S_odigits]; + __v /= 10; + } + while (__v != 0); + } + else if ((__flags & ios_base::basefield) == ios_base::oct) + { + do + { + *--__buf = __lit[(__v & 0x7) + __num_base::_S_odigits]; + __v >>= 3; + } + while (__v != 0); + } + else + { + const bool __uppercase = __flags & ios_base::uppercase; + const int __case_offset = __uppercase ? __num_base::_S_oudigits + : __num_base::_S_odigits; + do + { + *--__buf = __lit[(__v & 0xf) + __case_offset]; + __v >>= 4; + } + while (__v != 0); + } + return __bufend - __buf; + } + template + void + num_put<_CharT, _OutIter>:: + _M_group_int(const char* __grouping, size_t __grouping_size, _CharT __sep, + ios_base&, _CharT* __new, _CharT* __cs, int& __len) const + { + _CharT* __p = std::__add_grouping(__new, __sep, __grouping, + __grouping_size, __cs, __cs + __len); + __len = __p - __new; + } + template + template + _OutIter + num_put<_CharT, _OutIter>:: + _M_insert_int(_OutIter __s, ios_base& __io, _CharT __fill, + _ValueT __v) const + { + using __gnu_cxx::__add_unsigned; + typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + const _CharT* __lit = __lc->_M_atoms_out; + const ios_base::fmtflags __flags = __io.flags(); + const int __ilen = 5 * sizeof(_ValueT); + _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __ilen)); + const ios_base::fmtflags __basefield = __flags & ios_base::basefield; + const bool __dec = (__basefield != ios_base::oct + && __basefield != ios_base::hex); + const __unsigned_type __u = ((__v > 0 || !__dec) + ? __unsigned_type(__v) + : -__unsigned_type(__v)); + int __len = __int_to_char(__cs + __ilen, __u, __lit, __flags, __dec); + __cs += __ilen - __len; + if (__lc->_M_use_grouping) + { + _CharT* __cs2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * (__len + 1) + * 2)); + _M_group_int(__lc->_M_grouping, __lc->_M_grouping_size, + __lc->_M_thousands_sep, __io, __cs2 + 2, __cs, __len); + __cs = __cs2 + 2; + } + if (__builtin_expect(__dec, true)) + { + if (__v >= 0) + { + if (bool(__flags & ios_base::showpos) + && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) + *--__cs = __lit[__num_base::_S_oplus], ++__len; + } + else + *--__cs = __lit[__num_base::_S_ominus], ++__len; + } + else if (bool(__flags & ios_base::showbase) && __v) + { + if (__basefield == ios_base::oct) + *--__cs = __lit[__num_base::_S_odigits], ++__len; + else + { + const bool __uppercase = __flags & ios_base::uppercase; + *--__cs = __lit[__num_base::_S_ox + __uppercase]; + *--__cs = __lit[__num_base::_S_odigits]; + __len += 2; + } + } + const streamsize __w = __io.width(); + if (__w > static_cast(__len)) + { + _CharT* __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __w)); + _M_pad(__fill, __w, __io, __cs3, __cs, __len); + __cs = __cs3; + } + __io.width(0); + return std::__write(__s, __cs, __len); + } + template + void + num_put<_CharT, _OutIter>:: + _M_group_float(const char* __grouping, size_t __grouping_size, + _CharT __sep, const _CharT* __p, _CharT* __new, + _CharT* __cs, int& __len) const + { + const int __declen = __p ? __p - __cs : __len; + _CharT* __p2 = std::__add_grouping(__new, __sep, __grouping, + __grouping_size, + __cs, __cs + __declen); + int __newlen = __p2 - __new; + if (__p) + { + char_traits<_CharT>::copy(__p2, __p, __len - __declen); + __newlen += __len - __declen; + } + __len = __newlen; + } + template + template + _OutIter + num_put<_CharT, _OutIter>:: + _M_insert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod, + _ValueT __v) const + { + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + const streamsize __prec = __io.precision() < 0 ? 6 : __io.precision(); + const int __max_digits = + __gnu_cxx::__numeric_traits<_ValueT>::__digits10; + int __len; + char __fbuf[16]; + __num_base::_S_format_float(__io, __fbuf, __mod); + int __cs_size = __max_digits * 3; + char* __cs = static_cast(__builtin_alloca(__cs_size)); + __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, + __fbuf, __prec, __v); + if (__len >= __cs_size) + { + __cs_size = __len + 1; + __cs = static_cast(__builtin_alloca(__cs_size)); + __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, + __fbuf, __prec, __v); + } + const ctype<_CharT>& __ctype = use_facet >(__loc); + _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __len)); + __ctype.widen(__cs, __cs + __len, __ws); + _CharT* __wp = 0; + const char* __p = char_traits::find(__cs, __len, '.'); + if (__p) + { + __wp = __ws + (__p - __cs); + *__wp = __lc->_M_decimal_point; + } + if (__lc->_M_use_grouping + && (__wp || __len < 3 || (__cs[1] <= '9' && __cs[2] <= '9' + && __cs[1] >= '0' && __cs[2] >= '0'))) + { + _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __len * 2)); + streamsize __off = 0; + if (__cs[0] == '-' || __cs[0] == '+') + { + __off = 1; + __ws2[0] = __ws[0]; + __len -= 1; + } + _M_group_float(__lc->_M_grouping, __lc->_M_grouping_size, + __lc->_M_thousands_sep, __wp, __ws2 + __off, + __ws + __off, __len); + __len += __off; + __ws = __ws2; + } + const streamsize __w = __io.width(); + if (__w > static_cast(__len)) + { + _CharT* __ws3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __w)); + _M_pad(__fill, __w, __io, __ws3, __ws, __len); + __ws = __ws3; + } + __io.width(0); + return std::__write(__s, __ws, __len); + } + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const + { + const ios_base::fmtflags __flags = __io.flags(); + if ((__flags & ios_base::boolalpha) == 0) + { + const long __l = __v; + __s = _M_insert_int(__s, __io, __fill, __l); + } + else + { + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + const _CharT* __name = __v ? __lc->_M_truename + : __lc->_M_falsename; + int __len = __v ? __lc->_M_truename_size + : __lc->_M_falsename_size; + const streamsize __w = __io.width(); + if (__w > static_cast(__len)) + { + const streamsize __plen = __w - __len; + _CharT* __ps + = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __plen)); + char_traits<_CharT>::assign(__ps, __plen, __fill); + __io.width(0); + if ((__flags & ios_base::adjustfield) == ios_base::left) + { + __s = std::__write(__s, __name, __len); + __s = std::__write(__s, __ps, __plen); + } + else + { + __s = std::__write(__s, __ps, __plen); + __s = std::__write(__s, __name, __len); + } + return __s; + } + __io.width(0); + __s = std::__write(__s, __name, __len); + } + return __s; + } + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const + { return _M_insert_float(__s, __io, __fill, char(), __v); } + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, + long double __v) const + { return _M_insert_float(__s, __io, __fill, 'L', __v); } + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, + const void* __v) const + { + const ios_base::fmtflags __flags = __io.flags(); + const ios_base::fmtflags __fmt = ~(ios_base::basefield + | ios_base::uppercase); + __io.flags((__flags & __fmt) | (ios_base::hex | ios_base::showbase)); + typedef __gnu_cxx::__conditional_type<(sizeof(const void*) + <= sizeof(unsigned long)), + unsigned long, unsigned long long>::__type _UIntPtrType; + __s = _M_insert_int(__s, __io, __fill, + reinterpret_cast<_UIntPtrType>(__v)); + __io.flags(__flags); + return __s; + } + template + void + __pad<_CharT, _Traits>::_S_pad(ios_base& __io, _CharT __fill, + _CharT* __news, const _CharT* __olds, + streamsize __newlen, streamsize __oldlen) + { + const size_t __plen = static_cast(__newlen - __oldlen); + const ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield; + if (__adjust == ios_base::left) + { + _Traits::copy(__news, __olds, __oldlen); + _Traits::assign(__news + __oldlen, __plen, __fill); + return; + } + size_t __mod = 0; + if (__adjust == ios_base::internal) + { + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + if (__ctype.widen('-') == __olds[0] + || __ctype.widen('+') == __olds[0]) + { + __news[0] = __olds[0]; + __mod = 1; + ++__news; + } + else if (__ctype.widen('0') == __olds[0] + && __oldlen > 1 + && (__ctype.widen('x') == __olds[1] + || __ctype.widen('X') == __olds[1])) + { + __news[0] = __olds[0]; + __news[1] = __olds[1]; + __mod = 2; + __news += 2; + } + } + _Traits::assign(__news, __plen, __fill); + _Traits::copy(__news + __plen, __olds + __mod, __oldlen - __mod); + } + template + _CharT* + __add_grouping(_CharT* __s, _CharT __sep, + const char* __gbeg, size_t __gsize, + const _CharT* __first, const _CharT* __last) + { + size_t __idx = 0; + size_t __ctr = 0; + while (__last - __first > __gbeg[__idx] + && static_cast(__gbeg[__idx]) > 0 + && __gbeg[__idx] != __gnu_cxx::__numeric_traits::__max) + { + __last -= __gbeg[__idx]; + __idx < __gsize - 1 ? ++__idx : ++__ctr; + } + while (__first != __last) + *__s++ = *__first++; + while (__ctr--) + { + *__s++ = __sep; + for (char __i = __gbeg[__idx]; __i > 0; --__i) + *__s++ = *__first++; + } + while (__idx--) + { + *__s++ = __sep; + for (char __i = __gbeg[__idx]; __i > 0; --__i) + *__s++ = *__first++; + } + return __s; + } + extern template class numpunct; + extern template class numpunct_byname; + extern template class num_get; + extern template class num_put; + extern template class ctype_byname; + extern template + const ctype& + use_facet >(const locale&); + extern template + const numpunct& + use_facet >(const locale&); + extern template + const num_put& + use_facet >(const locale&); + extern template + const num_get& + use_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template class numpunct; + extern template class numpunct_byname; + extern template class num_get; + extern template class num_put; + extern template class ctype_byname; + extern template + const ctype& + use_facet >(const locale&); + extern template + const numpunct& + use_facet >(const locale&); + extern template + const num_put& + use_facet >(const locale&); + extern template + const num_get& + use_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + inline const _Facet& + __check_facet(const _Facet* __f) + { + if (!__f) + __throw_bad_cast(); + return *__f; + } + template + class basic_ios : public ios_base + { + public: + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + typedef ctype<_CharT> __ctype_type; + typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > + __num_put_type; + typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > + __num_get_type; + protected: + basic_ostream<_CharT, _Traits>* _M_tie; + mutable char_type _M_fill; + mutable bool _M_fill_init; + basic_streambuf<_CharT, _Traits>* _M_streambuf; + const __ctype_type* _M_ctype; + const __num_put_type* _M_num_put; + const __num_get_type* _M_num_get; + public: + operator void*() const + { return this->fail() ? 0 : const_cast(this); } + bool + operator!() const + { return this->fail(); } + iostate + rdstate() const + { return _M_streambuf_state; } + void + clear(iostate __state = goodbit); + void + setstate(iostate __state) + { this->clear(this->rdstate() | __state); } + void + _M_setstate(iostate __state) + { + _M_streambuf_state |= __state; + if (this->exceptions() & __state) + throw; + } + bool + good() const + { return this->rdstate() == 0; } + bool + eof() const + { return (this->rdstate() & eofbit) != 0; } + bool + fail() const + { return (this->rdstate() & (badbit | failbit)) != 0; } + bool + bad() const + { return (this->rdstate() & badbit) != 0; } + iostate + exceptions() const + { return _M_exception; } + void + exceptions(iostate __except) + { + _M_exception = __except; + this->clear(_M_streambuf_state); + } + explicit + basic_ios(basic_streambuf<_CharT, _Traits>* __sb) + : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0), + _M_ctype(0), _M_num_put(0), _M_num_get(0) + { this->init(__sb); } + virtual + ~basic_ios() { } + basic_ostream<_CharT, _Traits>* + tie() const + { return _M_tie; } + basic_ostream<_CharT, _Traits>* + tie(basic_ostream<_CharT, _Traits>* __tiestr) + { + basic_ostream<_CharT, _Traits>* __old = _M_tie; + _M_tie = __tiestr; + return __old; + } + basic_streambuf<_CharT, _Traits>* + rdbuf() const + { return _M_streambuf; } + basic_streambuf<_CharT, _Traits>* + rdbuf(basic_streambuf<_CharT, _Traits>* __sb); + basic_ios& + copyfmt(const basic_ios& __rhs); + char_type + fill() const + { + if (!_M_fill_init) + { + _M_fill = this->widen(' '); + _M_fill_init = true; + } + return _M_fill; + } + char_type + fill(char_type __ch) + { + char_type __old = this->fill(); + _M_fill = __ch; + return __old; + } + locale + imbue(const locale& __loc); + char + narrow(char_type __c, char __dfault) const + { return __check_facet(_M_ctype).narrow(__c, __dfault); } + char_type + widen(char __c) const + { return __check_facet(_M_ctype).widen(__c); } + protected: + basic_ios() + : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false), + _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0) + { } + void + init(basic_streambuf<_CharT, _Traits>* __sb); + void + _M_cache_locale(const locale& __loc); + }; +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + void + basic_ios<_CharT, _Traits>::clear(iostate __state) + { + if (this->rdbuf()) + _M_streambuf_state = __state; + else + _M_streambuf_state = __state | badbit; + if (this->exceptions() & this->rdstate()) + __throw_ios_failure(("basic_ios::clear")); + } + template + basic_streambuf<_CharT, _Traits>* + basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb) + { + basic_streambuf<_CharT, _Traits>* __old = _M_streambuf; + _M_streambuf = __sb; + this->clear(); + return __old; + } + template + basic_ios<_CharT, _Traits>& + basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs) + { + if (this != &__rhs) + { + _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ? + _M_local_word : new _Words[__rhs._M_word_size]; + _Callback_list* __cb = __rhs._M_callbacks; + if (__cb) + __cb->_M_add_reference(); + _M_call_callbacks(erase_event); + if (_M_word != _M_local_word) + { + delete [] _M_word; + _M_word = 0; + } + _M_dispose_callbacks(); + _M_callbacks = __cb; + for (int __i = 0; __i < __rhs._M_word_size; ++__i) + __words[__i] = __rhs._M_word[__i]; + _M_word = __words; + _M_word_size = __rhs._M_word_size; + this->flags(__rhs.flags()); + this->width(__rhs.width()); + this->precision(__rhs.precision()); + this->tie(__rhs.tie()); + this->fill(__rhs.fill()); + _M_ios_locale = __rhs.getloc(); + _M_cache_locale(_M_ios_locale); + _M_call_callbacks(copyfmt_event); + this->exceptions(__rhs.exceptions()); + } + return *this; + } + template + locale + basic_ios<_CharT, _Traits>::imbue(const locale& __loc) + { + locale __old(this->getloc()); + ios_base::imbue(__loc); + _M_cache_locale(__loc); + if (this->rdbuf() != 0) + this->rdbuf()->pubimbue(__loc); + return __old; + } + template + void + basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb) + { + ios_base::_M_init(); + _M_cache_locale(_M_ios_locale); + _M_fill = _CharT(); + _M_fill_init = false; + _M_tie = 0; + _M_exception = goodbit; + _M_streambuf = __sb; + _M_streambuf_state = __sb ? goodbit : badbit; + } + template + void + basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc) + { + if (__builtin_expect(has_facet<__ctype_type>(__loc), true)) + _M_ctype = &use_facet<__ctype_type>(__loc); + else + _M_ctype = 0; + if (__builtin_expect(has_facet<__num_put_type>(__loc), true)) + _M_num_put = &use_facet<__num_put_type>(__loc); + else + _M_num_put = 0; + if (__builtin_expect(has_facet<__num_get_type>(__loc), true)) + _M_num_get = &use_facet<__num_get_type>(__loc); + else + _M_num_get = 0; + } + extern template class basic_ios; + extern template class basic_ios; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + class basic_ostream : virtual public basic_ios<_CharT, _Traits> + { + public: + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef basic_ios<_CharT, _Traits> __ios_type; + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > + __num_put_type; + typedef ctype<_CharT> __ctype_type; + explicit + basic_ostream(__streambuf_type* __sb) + { this->init(__sb); } + virtual + ~basic_ostream() { } + class sentry; + friend class sentry; + __ostream_type& + operator<<(__ostream_type& (*__pf)(__ostream_type&)) + { + return __pf(*this); + } + __ostream_type& + operator<<(__ios_type& (*__pf)(__ios_type&)) + { + __pf(*this); + return *this; + } + __ostream_type& + operator<<(ios_base& (*__pf) (ios_base&)) + { + __pf(*this); + return *this; + } + __ostream_type& + operator<<(long __n) + { return _M_insert(__n); } + __ostream_type& + operator<<(unsigned long __n) + { return _M_insert(__n); } + __ostream_type& + operator<<(bool __n) + { return _M_insert(__n); } + __ostream_type& + operator<<(short __n); + __ostream_type& + operator<<(unsigned short __n) + { + return _M_insert(static_cast(__n)); + } + __ostream_type& + operator<<(int __n); + __ostream_type& + operator<<(unsigned int __n) + { + return _M_insert(static_cast(__n)); + } + __ostream_type& + operator<<(long long __n) + { return _M_insert(__n); } + __ostream_type& + operator<<(unsigned long long __n) + { return _M_insert(__n); } + __ostream_type& + operator<<(double __f) + { return _M_insert(__f); } + __ostream_type& + operator<<(float __f) + { + return _M_insert(static_cast(__f)); + } + __ostream_type& + operator<<(long double __f) + { return _M_insert(__f); } + __ostream_type& + operator<<(const void* __p) + { return _M_insert(__p); } + __ostream_type& + operator<<(__streambuf_type* __sb); + __ostream_type& + put(char_type __c); + void + _M_write(const char_type* __s, streamsize __n) + { + const streamsize __put = this->rdbuf()->sputn(__s, __n); + if (__put != __n) + this->setstate(ios_base::badbit); + } + __ostream_type& + write(const char_type* __s, streamsize __n); + __ostream_type& + flush(); + pos_type + tellp(); + __ostream_type& + seekp(pos_type); + __ostream_type& + seekp(off_type, ios_base::seekdir); + protected: + basic_ostream() + { this->init(0); } + template + __ostream_type& + _M_insert(_ValueT __v); + }; + template + class basic_ostream<_CharT, _Traits>::sentry + { + bool _M_ok; + basic_ostream<_CharT, _Traits>& _M_os; + public: + explicit + sentry(basic_ostream<_CharT, _Traits>& __os); + ~sentry() + { + if (bool(_M_os.flags() & ios_base::unitbuf) && !uncaught_exception()) + { + if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1) + _M_os.setstate(ios_base::badbit); + } + } + operator bool() const + { return _M_ok; } + }; + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) + { return __ostream_insert(__out, &__c, 1); } + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) + { return (__out << __out.widen(__c)); } + template + inline basic_ostream& + operator<<(basic_ostream& __out, char __c) + { return __ostream_insert(__out, &__c, 1); } + template + inline basic_ostream& + operator<<(basic_ostream& __out, signed char __c) + { return (__out << static_cast(__c)); } + template + inline basic_ostream& + operator<<(basic_ostream& __out, unsigned char __c) + { return (__out << static_cast(__c)); } + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) + { + if (!__s) + __out.setstate(ios_base::badbit); + else + __ostream_insert(__out, __s, + static_cast(_Traits::length(__s))); + return __out; + } + template + basic_ostream<_CharT, _Traits> & + operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s); + template + inline basic_ostream& + operator<<(basic_ostream& __out, const char* __s) + { + if (!__s) + __out.setstate(ios_base::badbit); + else + __ostream_insert(__out, __s, + static_cast(_Traits::length(__s))); + return __out; + } + template + inline basic_ostream& + operator<<(basic_ostream& __out, const signed char* __s) + { return (__out << reinterpret_cast(__s)); } + template + inline basic_ostream & + operator<<(basic_ostream& __out, const unsigned char* __s) + { return (__out << reinterpret_cast(__s)); } + template + inline basic_ostream<_CharT, _Traits>& + endl(basic_ostream<_CharT, _Traits>& __os) + { return flush(__os.put(__os.widen('\n'))); } + template + inline basic_ostream<_CharT, _Traits>& + ends(basic_ostream<_CharT, _Traits>& __os) + { return __os.put(_CharT()); } + template + inline basic_ostream<_CharT, _Traits>& + flush(basic_ostream<_CharT, _Traits>& __os) + { return __os.flush(); } +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + basic_ostream<_CharT, _Traits>::sentry:: + sentry(basic_ostream<_CharT, _Traits>& __os) + : _M_ok(false), _M_os(__os) + { + if (__os.tie() && __os.good()) + __os.tie()->flush(); + if (__os.good()) + _M_ok = true; + else + __os.setstate(ios_base::failbit); + } + template + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + _M_insert(_ValueT __v) + { + sentry __cerb(*this); + if (__cerb) + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + try + { + const __num_put_type& __np = __check_facet(this->_M_num_put); + if (__np.put(*this, *this, this->fill(), __v).failed()) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + operator<<(short __n) + { + const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; + if (__fmt == ios_base::oct || __fmt == ios_base::hex) + return _M_insert(static_cast(static_cast(__n))); + else + return _M_insert(static_cast(__n)); + } + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + operator<<(int __n) + { + const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; + if (__fmt == ios_base::oct || __fmt == ios_base::hex) + return _M_insert(static_cast(static_cast(__n))); + else + return _M_insert(static_cast(__n)); + } + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + operator<<(__streambuf_type* __sbin) + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + sentry __cerb(*this); + if (__cerb && __sbin) + { + try + { + if (!__copy_streambufs(__sbin, this->rdbuf())) + __err |= ios_base::failbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::failbit); } + } + else if (!__sbin) + __err |= ios_base::badbit; + if (__err) + this->setstate(__err); + return *this; + } + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + put(char_type __c) + { + sentry __cerb(*this); + if (__cerb) + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + try + { + const int_type __put = this->rdbuf()->sputc(__c); + if (traits_type::eq_int_type(__put, traits_type::eof())) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + write(const _CharT* __s, streamsize __n) + { + sentry __cerb(*this); + if (__cerb) + { + try + { _M_write(__s, __n); } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + return *this; + } + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + flush() + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + try + { + if (this->rdbuf() && this->rdbuf()->pubsync() == -1) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + template + typename basic_ostream<_CharT, _Traits>::pos_type + basic_ostream<_CharT, _Traits>:: + tellp() + { + pos_type __ret = pos_type(-1); + try + { + if (!this->fail()) + __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + return __ret; + } + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + seekp(pos_type __pos) + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + try + { + if (!this->fail()) + { + const pos_type __p = this->rdbuf()->pubseekpos(__pos, + ios_base::out); + if (__p == pos_type(off_type(-1))) + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + seekp(off_type __off, ios_base::seekdir __dir) + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + try + { + if (!this->fail()) + { + const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, + ios_base::out); + if (__p == pos_type(off_type(-1))) + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + template + basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) + { + if (!__s) + __out.setstate(ios_base::badbit); + else + { + const size_t __clen = char_traits::length(__s); + try + { + struct __ptr_guard + { + _CharT *__p; + __ptr_guard (_CharT *__ip): __p(__ip) { } + ~__ptr_guard() { delete[] __p; } + _CharT* __get() { return __p; } + } __pg (new _CharT[__clen]); + _CharT *__ws = __pg.__get(); + for (size_t __i = 0; __i < __clen; ++__i) + __ws[__i] = __out.widen(__s[__i]); + __ostream_insert(__out, __ws, __clen); + } + catch(__cxxabiv1::__forced_unwind&) + { + __out._M_setstate(ios_base::badbit); + throw; + } + catch(...) + { __out._M_setstate(ios_base::badbit); } + } + return __out; + } + extern template class basic_ostream; + extern template ostream& endl(ostream&); + extern template ostream& ends(ostream&); + extern template ostream& flush(ostream&); + extern template ostream& operator<<(ostream&, char); + extern template ostream& operator<<(ostream&, unsigned char); + extern template ostream& operator<<(ostream&, signed char); + extern template ostream& operator<<(ostream&, const char*); + extern template ostream& operator<<(ostream&, const unsigned char*); + extern template ostream& operator<<(ostream&, const signed char*); + extern template ostream& ostream::_M_insert(long); + extern template ostream& ostream::_M_insert(unsigned long); + extern template ostream& ostream::_M_insert(bool); + extern template ostream& ostream::_M_insert(long long); + extern template ostream& ostream::_M_insert(unsigned long long); + extern template ostream& ostream::_M_insert(double); + extern template ostream& ostream::_M_insert(long double); + extern template ostream& ostream::_M_insert(const void*); + extern template class basic_ostream; + extern template wostream& endl(wostream&); + extern template wostream& ends(wostream&); + extern template wostream& flush(wostream&); + extern template wostream& operator<<(wostream&, wchar_t); + extern template wostream& operator<<(wostream&, char); + extern template wostream& operator<<(wostream&, const wchar_t*); + extern template wostream& operator<<(wostream&, const char*); + extern template wostream& wostream::_M_insert(long); + extern template wostream& wostream::_M_insert(unsigned long); + extern template wostream& wostream::_M_insert(bool); + extern template wostream& wostream::_M_insert(long long); + extern template wostream& wostream::_M_insert(unsigned long long); + extern template wostream& wostream::_M_insert(double); + extern template wostream& wostream::_M_insert(long double); + extern template wostream& wostream::_M_insert(const void*); +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + class basic_istream : virtual public basic_ios<_CharT, _Traits> + { + public: + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef basic_ios<_CharT, _Traits> __ios_type; + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > + __num_get_type; + typedef ctype<_CharT> __ctype_type; + protected: + streamsize _M_gcount; + public: + explicit + basic_istream(__streambuf_type* __sb) + : _M_gcount(streamsize(0)) + { this->init(__sb); } + virtual + ~basic_istream() + { _M_gcount = streamsize(0); } + class sentry; + friend class sentry; + __istream_type& + operator>>(__istream_type& (*__pf)(__istream_type&)) + { return __pf(*this); } + __istream_type& + operator>>(__ios_type& (*__pf)(__ios_type&)) + { + __pf(*this); + return *this; + } + __istream_type& + operator>>(ios_base& (*__pf)(ios_base&)) + { + __pf(*this); + return *this; + } + __istream_type& + operator>>(bool& __n) + { return _M_extract(__n); } + __istream_type& + operator>>(short& __n); + __istream_type& + operator>>(unsigned short& __n) + { return _M_extract(__n); } + __istream_type& + operator>>(int& __n); + __istream_type& + operator>>(unsigned int& __n) + { return _M_extract(__n); } + __istream_type& + operator>>(long& __n) + { return _M_extract(__n); } + __istream_type& + operator>>(unsigned long& __n) + { return _M_extract(__n); } + __istream_type& + operator>>(long long& __n) + { return _M_extract(__n); } + __istream_type& + operator>>(unsigned long long& __n) + { return _M_extract(__n); } + __istream_type& + operator>>(float& __f) + { return _M_extract(__f); } + __istream_type& + operator>>(double& __f) + { return _M_extract(__f); } + __istream_type& + operator>>(long double& __f) + { return _M_extract(__f); } + __istream_type& + operator>>(void*& __p) + { return _M_extract(__p); } + __istream_type& + operator>>(__streambuf_type* __sb); + streamsize + gcount() const + { return _M_gcount; } + int_type + get(); + __istream_type& + get(char_type& __c); + __istream_type& + get(char_type* __s, streamsize __n, char_type __delim); + __istream_type& + get(char_type* __s, streamsize __n) + { return this->get(__s, __n, this->widen('\n')); } + __istream_type& + get(__streambuf_type& __sb, char_type __delim); + __istream_type& + get(__streambuf_type& __sb) + { return this->get(__sb, this->widen('\n')); } + __istream_type& + getline(char_type* __s, streamsize __n, char_type __delim); + __istream_type& + getline(char_type* __s, streamsize __n) + { return this->getline(__s, __n, this->widen('\n')); } + __istream_type& + ignore(); + __istream_type& + ignore(streamsize __n); + __istream_type& + ignore(streamsize __n, int_type __delim); + int_type + peek(); + __istream_type& + read(char_type* __s, streamsize __n); + streamsize + readsome(char_type* __s, streamsize __n); + __istream_type& + putback(char_type __c); + __istream_type& + unget(); + int + sync(); + pos_type + tellg(); + __istream_type& + seekg(pos_type); + __istream_type& + seekg(off_type, ios_base::seekdir); + protected: + basic_istream() + : _M_gcount(streamsize(0)) + { this->init(0); } + template + __istream_type& + _M_extract(_ValueT& __v); + }; + template<> + basic_istream& + basic_istream:: + getline(char_type* __s, streamsize __n, char_type __delim); + template<> + basic_istream& + basic_istream:: + ignore(streamsize __n); + template<> + basic_istream& + basic_istream:: + ignore(streamsize __n, int_type __delim); + template<> + basic_istream& + basic_istream:: + getline(char_type* __s, streamsize __n, char_type __delim); + template<> + basic_istream& + basic_istream:: + ignore(streamsize __n); + template<> + basic_istream& + basic_istream:: + ignore(streamsize __n, int_type __delim); + template + class basic_istream<_CharT, _Traits>::sentry + { + public: + typedef _Traits traits_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef typename __istream_type::__ctype_type __ctype_type; + typedef typename _Traits::int_type __int_type; + explicit + sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false); + operator bool() const + { return _M_ok; } + private: + bool _M_ok; + }; + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c); + template + inline basic_istream& + operator>>(basic_istream& __in, unsigned char& __c) + { return (__in >> reinterpret_cast(__c)); } + template + inline basic_istream& + operator>>(basic_istream& __in, signed char& __c) + { return (__in >> reinterpret_cast(__c)); } + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s); + template<> + basic_istream& + operator>>(basic_istream& __in, char* __s); + template + inline basic_istream& + operator>>(basic_istream& __in, unsigned char* __s) + { return (__in >> reinterpret_cast(__s)); } + template + inline basic_istream& + operator>>(basic_istream& __in, signed char* __s) + { return (__in >> reinterpret_cast(__s)); } + template + class basic_iostream + : public basic_istream<_CharT, _Traits>, + public basic_ostream<_CharT, _Traits> + { + public: + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_ostream<_CharT, _Traits> __ostream_type; + explicit + basic_iostream(basic_streambuf<_CharT, _Traits>* __sb) + : __istream_type(__sb), __ostream_type(__sb) { } + virtual + ~basic_iostream() { } + protected: + basic_iostream() + : __istream_type(), __ostream_type() { } + }; + template + basic_istream<_CharT, _Traits>& + ws(basic_istream<_CharT, _Traits>& __is); +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + basic_istream<_CharT, _Traits>::sentry:: + sentry(basic_istream<_CharT, _Traits>& __in, bool __noskip) : _M_ok(false) + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + if (__in.good()) + { + if (__in.tie()) + __in.tie()->flush(); + if (!__noskip && bool(__in.flags() & ios_base::skipws)) + { + const __int_type __eof = traits_type::eof(); + __streambuf_type* __sb = __in.rdbuf(); + __int_type __c = __sb->sgetc(); + const __ctype_type& __ct = __check_facet(__in._M_ctype); + while (!traits_type::eq_int_type(__c, __eof) + && __ct.is(ctype_base::space, + traits_type::to_char_type(__c))) + __c = __sb->snextc(); + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + } + } + if (__in.good() && __err == ios_base::goodbit) + _M_ok = true; + else + { + __err |= ios_base::failbit; + __in.setstate(__err); + } + } + template + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + _M_extract(_ValueT& __v) + { + sentry __cerb(*this, false); + if (__cerb) + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + try + { + const __num_get_type& __ng = __check_facet(this->_M_num_get); + __ng.get(*this, 0, *this, __err, __v); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(short& __n) + { + long __l; + _M_extract(__l); + if (!this->fail()) + { + if (__gnu_cxx::__numeric_traits::__min <= __l + && __l <= __gnu_cxx::__numeric_traits::__max) + __n = short(__l); + else + this->setstate(ios_base::failbit); + } + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(int& __n) + { + long __l; + _M_extract(__l); + if (!this->fail()) + { + if (__gnu_cxx::__numeric_traits::__min <= __l + && __l <= __gnu_cxx::__numeric_traits::__max) + __n = int(__l); + else + this->setstate(ios_base::failbit); + } + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(__streambuf_type* __sbout) + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + sentry __cerb(*this, false); + if (__cerb && __sbout) + { + try + { + bool __ineof; + if (!__copy_streambufs_eof(this->rdbuf(), __sbout, __ineof)) + __err |= ios_base::failbit; + if (__ineof) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::failbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::failbit); } + } + else if (!__sbout) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + template + typename basic_istream<_CharT, _Traits>::int_type + basic_istream<_CharT, _Traits>:: + get(void) + { + const int_type __eof = traits_type::eof(); + int_type __c = __eof; + _M_gcount = 0; + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + sentry __cerb(*this, true); + if (__cerb) + { + try + { + __c = this->rdbuf()->sbumpc(); + if (!traits_type::eq_int_type(__c, __eof)) + _M_gcount = 1; + else + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return __c; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + get(char_type& __c) + { + _M_gcount = 0; + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __cb = this->rdbuf()->sbumpc(); + if (!traits_type::eq_int_type(__cb, traits_type::eof())) + { + _M_gcount = 1; + __c = traits_type::to_char_type(__cb); + } + else + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + get(char_type* __s, streamsize __n, char_type __delim) + { + _M_gcount = 0; + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __idelim = traits_type::to_int_type(__delim); + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sgetc(); + while (_M_gcount + 1 < __n + && !traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __idelim)) + { + *__s++ = traits_type::to_char_type(__c); + ++_M_gcount; + __c = __sb->snextc(); + } + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + if (__n > 0) + *__s = char_type(); + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + get(__streambuf_type& __sb, char_type __delim) + { + _M_gcount = 0; + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __idelim = traits_type::to_int_type(__delim); + const int_type __eof = traits_type::eof(); + __streambuf_type* __this_sb = this->rdbuf(); + int_type __c = __this_sb->sgetc(); + char_type __c2 = traits_type::to_char_type(__c); + while (!traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __idelim) + && !traits_type::eq_int_type(__sb.sputc(__c2), __eof)) + { + ++_M_gcount; + __c = __this_sb->snextc(); + __c2 = traits_type::to_char_type(__c); + } + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + getline(char_type* __s, streamsize __n, char_type __delim) + { + _M_gcount = 0; + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __idelim = traits_type::to_int_type(__delim); + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sgetc(); + while (_M_gcount + 1 < __n + && !traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __idelim)) + { + *__s++ = traits_type::to_char_type(__c); + __c = __sb->snextc(); + ++_M_gcount; + } + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + else + { + if (traits_type::eq_int_type(__c, __idelim)) + { + __sb->sbumpc(); + ++_M_gcount; + } + else + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + if (__n > 0) + *__s = char_type(); + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + ignore(void) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + if (traits_type::eq_int_type(__sb->sbumpc(), __eof)) + __err |= ios_base::eofbit; + else + _M_gcount = 1; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + ignore(streamsize __n) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb && __n > 0) + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sgetc(); + bool __large_ignore = false; + while (true) + { + while (_M_gcount < __n + && !traits_type::eq_int_type(__c, __eof)) + { + ++_M_gcount; + __c = __sb->snextc(); + } + if (__n == __gnu_cxx::__numeric_traits::__max + && !traits_type::eq_int_type(__c, __eof)) + { + _M_gcount = + __gnu_cxx::__numeric_traits::__min; + __large_ignore = true; + } + else + break; + } + if (__large_ignore) + _M_gcount = __gnu_cxx::__numeric_traits::__max; + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + ignore(streamsize __n, int_type __delim) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb && __n > 0) + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sgetc(); + bool __large_ignore = false; + while (true) + { + while (_M_gcount < __n + && !traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __delim)) + { + ++_M_gcount; + __c = __sb->snextc(); + } + if (__n == __gnu_cxx::__numeric_traits::__max + && !traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __delim)) + { + _M_gcount = + __gnu_cxx::__numeric_traits::__min; + __large_ignore = true; + } + else + break; + } + if (__large_ignore) + _M_gcount = __gnu_cxx::__numeric_traits::__max; + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + else if (traits_type::eq_int_type(__c, __delim)) + { + if (_M_gcount + < __gnu_cxx::__numeric_traits::__max) + ++_M_gcount; + __sb->sbumpc(); + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + typename basic_istream<_CharT, _Traits>::int_type + basic_istream<_CharT, _Traits>:: + peek(void) + { + int_type __c = traits_type::eof(); + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + try + { + __c = this->rdbuf()->sgetc(); + if (traits_type::eq_int_type(__c, traits_type::eof())) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return __c; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + read(char_type* __s, streamsize __n) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + try + { + _M_gcount = this->rdbuf()->sgetn(__s, __n); + if (_M_gcount != __n) + __err |= (ios_base::eofbit | ios_base::failbit); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + streamsize + basic_istream<_CharT, _Traits>:: + readsome(char_type* __s, streamsize __n) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + try + { + const streamsize __num = this->rdbuf()->in_avail(); + if (__num > 0) + _M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n)); + else if (__num == -1) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return _M_gcount; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + putback(char_type __c) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + if (!__sb + || traits_type::eq_int_type(__sb->sputbackc(__c), __eof)) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + unget(void) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + if (!__sb + || traits_type::eq_int_type(__sb->sungetc(), __eof)) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + int + basic_istream<_CharT, _Traits>:: + sync(void) + { + int __ret = -1; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + try + { + __streambuf_type* __sb = this->rdbuf(); + if (__sb) + { + if (__sb->pubsync() == -1) + __err |= ios_base::badbit; + else + __ret = 0; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return __ret; + } + template + typename basic_istream<_CharT, _Traits>::pos_type + basic_istream<_CharT, _Traits>:: + tellg(void) + { + pos_type __ret = pos_type(-1); + try + { + if (!this->fail()) + __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, + ios_base::in); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + return __ret; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + seekg(pos_type __pos) + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + try + { + if (!this->fail()) + { + const pos_type __p = this->rdbuf()->pubseekpos(__pos, + ios_base::in); + if (__p == pos_type(off_type(-1))) + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + seekg(off_type __off, ios_base::seekdir __dir) + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + try + { + if (!this->fail()) + { + const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, + ios_base::in); + if (__p == pos_type(off_type(-1))) + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef typename __istream_type::int_type __int_type; + typename __istream_type::sentry __cerb(__in, false); + if (__cerb) + { + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + try + { + const __int_type __cb = __in.rdbuf()->sbumpc(); + if (!_Traits::eq_int_type(__cb, _Traits::eof())) + __c = _Traits::to_char_type(__cb); + else + __err |= (ios_base::eofbit | ios_base::failbit); + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(ios_base::badbit); + throw; + } + catch(...) + { __in._M_setstate(ios_base::badbit); } + if (__err) + __in.setstate(__err); + } + return __in; + } + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef typename _Traits::int_type int_type; + typedef _CharT char_type; + typedef ctype<_CharT> __ctype_type; + streamsize __extracted = 0; + ios_base::iostate __err = ios_base::iostate(ios_base::goodbit); + typename __istream_type::sentry __cerb(__in, false); + if (__cerb) + { + try + { + streamsize __num = __in.width(); + if (__num <= 0) + __num = __gnu_cxx::__numeric_traits::__max; + const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); + const int_type __eof = _Traits::eof(); + __streambuf_type* __sb = __in.rdbuf(); + int_type __c = __sb->sgetc(); + while (__extracted < __num - 1 + && !_Traits::eq_int_type(__c, __eof) + && !__ct.is(ctype_base::space, + _Traits::to_char_type(__c))) + { + *__s++ = _Traits::to_char_type(__c); + ++__extracted; + __c = __sb->snextc(); + } + if (_Traits::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + *__s = char_type(); + __in.width(0); + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(ios_base::badbit); + throw; + } + catch(...) + { __in._M_setstate(ios_base::badbit); } + } + if (!__extracted) + __err |= ios_base::failbit; + if (__err) + __in.setstate(__err); + return __in; + } + template + basic_istream<_CharT, _Traits>& + ws(basic_istream<_CharT, _Traits>& __in) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef typename __istream_type::int_type __int_type; + typedef ctype<_CharT> __ctype_type; + const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); + const __int_type __eof = _Traits::eof(); + __streambuf_type* __sb = __in.rdbuf(); + __int_type __c = __sb->sgetc(); + while (!_Traits::eq_int_type(__c, __eof) + && __ct.is(ctype_base::space, _Traits::to_char_type(__c))) + __c = __sb->snextc(); + if (_Traits::eq_int_type(__c, __eof)) + __in.setstate(ios_base::eofbit); + return __in; + } + extern template class basic_istream; + extern template istream& ws(istream&); + extern template istream& operator>>(istream&, char&); + extern template istream& operator>>(istream&, char*); + extern template istream& operator>>(istream&, unsigned char&); + extern template istream& operator>>(istream&, signed char&); + extern template istream& operator>>(istream&, unsigned char*); + extern template istream& operator>>(istream&, signed char*); + extern template istream& istream::_M_extract(unsigned short&); + extern template istream& istream::_M_extract(unsigned int&); + extern template istream& istream::_M_extract(long&); + extern template istream& istream::_M_extract(unsigned long&); + extern template istream& istream::_M_extract(bool&); + extern template istream& istream::_M_extract(long long&); + extern template istream& istream::_M_extract(unsigned long long&); + extern template istream& istream::_M_extract(float&); + extern template istream& istream::_M_extract(double&); + extern template istream& istream::_M_extract(long double&); + extern template istream& istream::_M_extract(void*&); + extern template class basic_iostream; + extern template class basic_istream; + extern template wistream& ws(wistream&); + extern template wistream& operator>>(wistream&, wchar_t&); + extern template wistream& operator>>(wistream&, wchar_t*); + extern template wistream& wistream::_M_extract(unsigned short&); + extern template wistream& wistream::_M_extract(unsigned int&); + extern template wistream& wistream::_M_extract(long&); + extern template wistream& wistream::_M_extract(unsigned long&); + extern template wistream& wistream::_M_extract(bool&); + extern template wistream& wistream::_M_extract(long long&); + extern template wistream& wistream::_M_extract(unsigned long long&); + extern template wistream& wistream::_M_extract(float&); + extern template wistream& wistream::_M_extract(double&); + extern template wistream& wistream::_M_extract(long double&); + extern template wistream& wistream::_M_extract(void*&); + extern template class basic_iostream; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + extern istream cin; + extern ostream cout; + extern ostream cerr; + extern ostream clog; + extern wistream wcin; + extern wostream wcout; + extern wostream wcerr; + extern wostream wclog; + static ios_base::Init __ioinit; +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + inline void + _Construct(_T1* __p, const _T2& __value) + { + ::new(static_cast(__p)) _T1(__value); + } + template + inline void + _Destroy(_Tp* __pointer) + { __pointer->~_Tp(); } + template + struct _Destroy_aux + { + template + static void + __destroy(_ForwardIterator __first, _ForwardIterator __last) + { + for (; __first != __last; ++__first) + std::_Destroy(&*__first); + } + }; + template<> + struct _Destroy_aux + { + template + static void + __destroy(_ForwardIterator, _ForwardIterator) { } + }; + template + inline void + _Destroy(_ForwardIterator __first, _ForwardIterator __last) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _Value_type; + std::_Destroy_aux<__has_trivial_destructor(_Value_type)>:: + __destroy(__first, __last); + } + template class allocator; + template + void + _Destroy(_ForwardIterator __first, _ForwardIterator __last, + _Allocator& __alloc) + { + for (; __first != __last; ++__first) + __alloc.destroy(&*__first); + } + template + inline void + _Destroy(_ForwardIterator __first, _ForwardIterator __last, + allocator<_Tp>&) + { + _Destroy(__first, __last); + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + struct __uninitialized_copy + { + template + static _ForwardIterator + uninitialized_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { + _ForwardIterator __cur = __result; + try + { + for (; __first != __last; ++__first, ++__cur) + ::new(static_cast(&*__cur)) typename + iterator_traits<_ForwardIterator>::value_type(*__first); + return __cur; + } + catch(...) + { + std::_Destroy(__result, __cur); + throw; + } + } + }; + template<> + struct __uninitialized_copy + { + template + static _ForwardIterator + uninitialized_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { return std::copy(__first, __last, __result); } + }; + template + inline _ForwardIterator + uninitialized_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { + typedef typename iterator_traits<_InputIterator>::value_type + _ValueType1; + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType2; + return std::__uninitialized_copy<(__is_pod(_ValueType1) + && __is_pod(_ValueType2))>:: + uninitialized_copy(__first, __last, __result); + } + template + struct __uninitialized_fill + { + template + static void + uninitialized_fill(_ForwardIterator __first, + _ForwardIterator __last, const _Tp& __x) + { + _ForwardIterator __cur = __first; + try + { + for (; __cur != __last; ++__cur) + std::_Construct(&*__cur, __x); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + template<> + struct __uninitialized_fill + { + template + static void + uninitialized_fill(_ForwardIterator __first, + _ForwardIterator __last, const _Tp& __x) + { std::fill(__first, __last, __x); } + }; + template + inline void + uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + std::__uninitialized_fill<__is_pod(_ValueType)>:: + uninitialized_fill(__first, __last, __x); + } + template + struct __uninitialized_fill_n + { + template + static void + uninitialized_fill_n(_ForwardIterator __first, _Size __n, + const _Tp& __x) + { + _ForwardIterator __cur = __first; + try + { + for (; __n > 0; --__n, ++__cur) + std::_Construct(&*__cur, __x); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + template<> + struct __uninitialized_fill_n + { + template + static void + uninitialized_fill_n(_ForwardIterator __first, _Size __n, + const _Tp& __x) + { std::fill_n(__first, __n, __x); } + }; + template + inline void + uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + std::__uninitialized_fill_n<__is_pod(_ValueType)>:: + uninitialized_fill_n(__first, __n, __x); + } + template + _ForwardIterator + __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _Allocator& __alloc) + { + _ForwardIterator __cur = __result; + try + { + for (; __first != __last; ++__first, ++__cur) + __alloc.construct(&*__cur, *__first); + return __cur; + } + catch(...) + { + std::_Destroy(__result, __cur, __alloc); + throw; + } + } + template + inline _ForwardIterator + __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, allocator<_Tp>&) + { return std::uninitialized_copy(__first, __last, __result); } + template + inline _ForwardIterator + __uninitialized_move_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _Allocator& __alloc) + { + return std::__uninitialized_copy_a((__first), + (__last), + __result, __alloc); + } + template + void + __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x, _Allocator& __alloc) + { + _ForwardIterator __cur = __first; + try + { + for (; __cur != __last; ++__cur) + __alloc.construct(&*__cur, __x); + } + catch(...) + { + std::_Destroy(__first, __cur, __alloc); + throw; + } + } + template + inline void + __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x, allocator<_Tp2>&) + { std::uninitialized_fill(__first, __last, __x); } + template + void + __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, + const _Tp& __x, _Allocator& __alloc) + { + _ForwardIterator __cur = __first; + try + { + for (; __n > 0; --__n, ++__cur) + __alloc.construct(&*__cur, __x); + } + catch(...) + { + std::_Destroy(__first, __cur, __alloc); + throw; + } + } + template + inline void + __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, + const _Tp& __x, allocator<_Tp2>&) + { std::uninitialized_fill_n(__first, __n, __x); } + template + inline _ForwardIterator + __uninitialized_copy_move(_InputIterator1 __first1, + _InputIterator1 __last1, + _InputIterator2 __first2, + _InputIterator2 __last2, + _ForwardIterator __result, + _Allocator& __alloc) + { + _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1, + __result, + __alloc); + try + { + return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc); + } + catch(...) + { + std::_Destroy(__result, __mid, __alloc); + throw; + } + } + template + inline _ForwardIterator + __uninitialized_move_copy(_InputIterator1 __first1, + _InputIterator1 __last1, + _InputIterator2 __first2, + _InputIterator2 __last2, + _ForwardIterator __result, + _Allocator& __alloc) + { + _ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1, + __result, + __alloc); + try + { + return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc); + } + catch(...) + { + std::_Destroy(__result, __mid, __alloc); + throw; + } + } + template + inline _ForwardIterator + __uninitialized_fill_move(_ForwardIterator __result, _ForwardIterator __mid, + const _Tp& __x, _InputIterator __first, + _InputIterator __last, _Allocator& __alloc) + { + std::__uninitialized_fill_a(__result, __mid, __x, __alloc); + try + { + return std::__uninitialized_move_a(__first, __last, __mid, __alloc); + } + catch(...) + { + std::_Destroy(__result, __mid, __alloc); + throw; + } + } + template + inline void + __uninitialized_move_fill(_InputIterator __first1, _InputIterator __last1, + _ForwardIterator __first2, + _ForwardIterator __last2, const _Tp& __x, + _Allocator& __alloc) + { + _ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1, + __first2, + __alloc); + try + { + std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc); + } + catch(...) + { + std::_Destroy(__first2, __mid2, __alloc); + throw; + } + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + struct _Vector_base + { + typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; + struct _Vector_impl + : public _Tp_alloc_type + { + typename _Tp_alloc_type::pointer _M_start; + typename _Tp_alloc_type::pointer _M_finish; + typename _Tp_alloc_type::pointer _M_end_of_storage; + _Vector_impl() + : _Tp_alloc_type(), _M_start(0), _M_finish(0), _M_end_of_storage(0) + { } + _Vector_impl(_Tp_alloc_type const& __a) + : _Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0) + { } + }; + public: + typedef _Alloc allocator_type; + _Tp_alloc_type& + _M_get_Tp_allocator() + { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); } + const _Tp_alloc_type& + _M_get_Tp_allocator() const + { return *static_cast(&this->_M_impl); } + allocator_type + get_allocator() const + { return allocator_type(_M_get_Tp_allocator()); } + _Vector_base() + : _M_impl() { } + _Vector_base(const allocator_type& __a) + : _M_impl(__a) { } + _Vector_base(size_t __n, const allocator_type& __a) + : _M_impl(__a) + { + this->_M_impl._M_start = this->_M_allocate(__n); + this->_M_impl._M_finish = this->_M_impl._M_start; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + } + ~_Vector_base() + { _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); } + public: + _Vector_impl _M_impl; + typename _Tp_alloc_type::pointer + _M_allocate(size_t __n) + { return __n != 0 ? _M_impl.allocate(__n) : 0; } + void + _M_deallocate(typename _Tp_alloc_type::pointer __p, size_t __n) + { + if (__p) + _M_impl.deallocate(__p, __n); + } + }; + template > + class vector : protected _Vector_base<_Tp, _Alloc> + { + typedef typename _Alloc::value_type _Alloc_value_type; + + + typedef _Vector_base<_Tp, _Alloc> _Base; + typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; + public: + typedef _Tp value_type; + typedef typename _Tp_alloc_type::pointer pointer; + typedef typename _Tp_alloc_type::const_pointer const_pointer; + typedef typename _Tp_alloc_type::reference reference; + typedef typename _Tp_alloc_type::const_reference const_reference; + typedef __gnu_cxx::__normal_iterator iterator; + typedef __gnu_cxx::__normal_iterator + const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Alloc allocator_type; + protected: + using _Base::_M_allocate; + using _Base::_M_deallocate; + using _Base::_M_impl; + using _Base::_M_get_Tp_allocator; + public: + vector() + : _Base() { } + explicit + vector(const allocator_type& __a) + : _Base(__a) { } + explicit + vector(size_type __n, const value_type& __value = value_type(), + const allocator_type& __a = allocator_type()) + : _Base(__n, __a) + { _M_fill_initialize(__n, __value); } + vector(const vector& __x) + : _Base(__x.size(), __x._M_get_Tp_allocator()) + { this->_M_impl._M_finish = + std::__uninitialized_copy_a(__x.begin(), __x.end(), + this->_M_impl._M_start, + _M_get_Tp_allocator()); + } + template + vector(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_initialize_dispatch(__first, __last, _Integral()); + } + ~vector() + { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); } + vector& + operator=(const vector& __x); + void + assign(size_type __n, const value_type& __val) + { _M_fill_assign(__n, __val); } + template + void + assign(_InputIterator __first, _InputIterator __last) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } + using _Base::get_allocator; + iterator + begin() + { return iterator(this->_M_impl._M_start); } + const_iterator + begin() const + { return const_iterator(this->_M_impl._M_start); } + iterator + end() + { return iterator(this->_M_impl._M_finish); } + const_iterator + end() const + { return const_iterator(this->_M_impl._M_finish); } + reverse_iterator + rbegin() + { return reverse_iterator(end()); } + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(end()); } + reverse_iterator + rend() + { return reverse_iterator(begin()); } + const_reverse_iterator + rend() const + { return const_reverse_iterator(begin()); } + size_type + size() const + { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); } + size_type + max_size() const + { return _M_get_Tp_allocator().max_size(); } + void + resize(size_type __new_size, value_type __x = value_type()) + { + if (__new_size < size()) + _M_erase_at_end(this->_M_impl._M_start + __new_size); + else + insert(end(), __new_size - size(), __x); + } + size_type + capacity() const + { return size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); } + bool + empty() const + { return begin() == end(); } + void + reserve(size_type __n); + reference + operator[](size_type __n) + { return *(this->_M_impl._M_start + __n); } + const_reference + operator[](size_type __n) const + { return *(this->_M_impl._M_start + __n); } + protected: + void + _M_range_check(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range(("vector::_M_range_check")); + } + public: + reference + at(size_type __n) + { + _M_range_check(__n); + return (*this)[__n]; + } + const_reference + at(size_type __n) const + { + _M_range_check(__n); + return (*this)[__n]; + } + reference + front() + { return *begin(); } + const_reference + front() const + { return *begin(); } + reference + back() + { return *(end() - 1); } + const_reference + back() const + { return *(end() - 1); } + pointer + data() + { return pointer(this->_M_impl._M_start); } + const_pointer + data() const + { return const_pointer(this->_M_impl._M_start); } + void + push_back(const value_type& __x) + { + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + { + this->_M_impl.construct(this->_M_impl._M_finish, __x); + ++this->_M_impl._M_finish; + } + else + _M_insert_aux(end(), __x); + } + void + pop_back() + { + --this->_M_impl._M_finish; + this->_M_impl.destroy(this->_M_impl._M_finish); + } + iterator + insert(iterator __position, const value_type& __x); + void + insert(iterator __position, size_type __n, const value_type& __x) + { _M_fill_insert(__position, __n, __x); } + template + void + insert(iterator __position, _InputIterator __first, + _InputIterator __last) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_insert_dispatch(__position, __first, __last, _Integral()); + } + iterator + erase(iterator __position); + iterator + erase(iterator __first, iterator __last); + void + swap(vector& __x) + { + std::swap(this->_M_impl._M_start, __x._M_impl._M_start); + std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); + std::swap(this->_M_impl._M_end_of_storage, + __x._M_impl._M_end_of_storage); + std::__alloc_swap<_Tp_alloc_type>::_S_do_it(_M_get_Tp_allocator(), + __x._M_get_Tp_allocator()); + } + void + clear() + { _M_erase_at_end(this->_M_impl._M_start); } + protected: + template + pointer + _M_allocate_and_copy(size_type __n, + _ForwardIterator __first, _ForwardIterator __last) + { + pointer __result = this->_M_allocate(__n); + try + { + std::__uninitialized_copy_a(__first, __last, __result, + _M_get_Tp_allocator()); + return __result; + } + catch(...) + { + _M_deallocate(__result, __n); + throw; + } + } + template + void + _M_initialize_dispatch(_Integer __n, _Integer __value, __true_type) + { + this->_M_impl._M_start = _M_allocate(static_cast(__n)); + this->_M_impl._M_end_of_storage = + this->_M_impl._M_start + static_cast(__n); + _M_fill_initialize(static_cast(__n), __value); + } + template + void + _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { + typedef typename std::iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_range_initialize(__first, __last, _IterCategory()); + } + template + void + _M_range_initialize(_InputIterator __first, + _InputIterator __last, std::input_iterator_tag) + { + for (; __first != __last; ++__first) + push_back(*__first); + } + template + void + _M_range_initialize(_ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag) + { + const size_type __n = std::distance(__first, __last); + this->_M_impl._M_start = this->_M_allocate(__n); + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + this->_M_impl._M_finish = + std::__uninitialized_copy_a(__first, __last, + this->_M_impl._M_start, + _M_get_Tp_allocator()); + } + void + _M_fill_initialize(size_type __n, const value_type& __value) + { + std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value, + _M_get_Tp_allocator()); + this->_M_impl._M_finish = this->_M_impl._M_end_of_storage; + } + template + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } + template + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { + typedef typename std::iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_assign_aux(__first, __last, _IterCategory()); + } + template + void + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag); + template + void + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag); + void + _M_fill_assign(size_type __n, const value_type& __val); + template + void + _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, + __true_type) + { _M_fill_insert(__pos, __n, __val); } + template + void + _M_insert_dispatch(iterator __pos, _InputIterator __first, + _InputIterator __last, __false_type) + { + typedef typename std::iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_range_insert(__pos, __first, __last, _IterCategory()); + } + template + void + _M_range_insert(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag); + template + void + _M_range_insert(iterator __pos, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag); + void + _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); + void + _M_insert_aux(iterator __position, const value_type& __x); + size_type + _M_check_len(size_type __n, const char* __s) const + { + if (max_size() - size() < __n) + __throw_length_error((__s)); + const size_type __len = size() + std::max(size(), __n); + return (__len < size() || __len > max_size()) ? max_size() : __len; + } + void + _M_erase_at_end(pointer __pos) + { + std::_Destroy(__pos, this->_M_impl._M_finish, _M_get_Tp_allocator()); + this->_M_impl._M_finish = __pos; + } + }; + template + inline bool + operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return (__x.size() == __y.size() + && std::equal(__x.begin(), __x.end(), __y.begin())); } + template + inline bool + operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return std::lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); } + template + inline bool + operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return __y < __x; } + template + inline bool + operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return !(__x < __y); } + template + inline void + swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) + { __x.swap(__y); } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + typedef unsigned long _Bit_type; + enum { _S_word_bit = int(8 * sizeof(_Bit_type)) }; + struct _Bit_reference + { + _Bit_type * _M_p; + _Bit_type _M_mask; + _Bit_reference(_Bit_type * __x, _Bit_type __y) + : _M_p(__x), _M_mask(__y) { } + _Bit_reference() : _M_p(0), _M_mask(0) { } + operator bool() const + { return !!(*_M_p & _M_mask); } + _Bit_reference& + operator=(bool __x) + { + if (__x) + *_M_p |= _M_mask; + else + *_M_p &= ~_M_mask; + return *this; + } + _Bit_reference& + operator=(const _Bit_reference& __x) + { return *this = bool(__x); } + bool + operator==(const _Bit_reference& __x) const + { return bool(*this) == bool(__x); } + bool + operator<(const _Bit_reference& __x) const + { return !bool(*this) && bool(__x); } + void + flip() + { *_M_p ^= _M_mask; } + }; + struct _Bit_iterator_base + : public std::iterator + { + _Bit_type * _M_p; + unsigned int _M_offset; + _Bit_iterator_base(_Bit_type * __x, unsigned int __y) + : _M_p(__x), _M_offset(__y) { } + void + _M_bump_up() + { + if (_M_offset++ == int(_S_word_bit) - 1) + { + _M_offset = 0; + ++_M_p; + } + } + void + _M_bump_down() + { + if (_M_offset-- == 0) + { + _M_offset = int(_S_word_bit) - 1; + --_M_p; + } + } + void + _M_incr(ptrdiff_t __i) + { + difference_type __n = __i + _M_offset; + _M_p += __n / int(_S_word_bit); + __n = __n % int(_S_word_bit); + if (__n < 0) + { + __n += int(_S_word_bit); + --_M_p; + } + _M_offset = static_cast(__n); + } + bool + operator==(const _Bit_iterator_base& __i) const + { return _M_p == __i._M_p && _M_offset == __i._M_offset; } + bool + operator<(const _Bit_iterator_base& __i) const + { + return _M_p < __i._M_p + || (_M_p == __i._M_p && _M_offset < __i._M_offset); + } + bool + operator!=(const _Bit_iterator_base& __i) const + { return !(*this == __i); } + bool + operator>(const _Bit_iterator_base& __i) const + { return __i < *this; } + bool + operator<=(const _Bit_iterator_base& __i) const + { return !(__i < *this); } + bool + operator>=(const _Bit_iterator_base& __i) const + { return !(*this < __i); } + }; + inline ptrdiff_t + operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) + { + return (int(_S_word_bit) * (__x._M_p - __y._M_p) + + __x._M_offset - __y._M_offset); + } + struct _Bit_iterator : public _Bit_iterator_base + { + typedef _Bit_reference reference; + typedef _Bit_reference* pointer; + typedef _Bit_iterator iterator; + _Bit_iterator() : _Bit_iterator_base(0, 0) { } + _Bit_iterator(_Bit_type * __x, unsigned int __y) + : _Bit_iterator_base(__x, __y) { } + reference + operator*() const + { return reference(_M_p, 1UL << _M_offset); } + iterator& + operator++() + { + _M_bump_up(); + return *this; + } + iterator + operator++(int) + { + iterator __tmp = *this; + _M_bump_up(); + return __tmp; + } + iterator& + operator--() + { + _M_bump_down(); + return *this; + } + iterator + operator--(int) + { + iterator __tmp = *this; + _M_bump_down(); + return __tmp; + } + iterator& + operator+=(difference_type __i) + { + _M_incr(__i); + return *this; + } + iterator& + operator-=(difference_type __i) + { + *this += -__i; + return *this; + } + iterator + operator+(difference_type __i) const + { + iterator __tmp = *this; + return __tmp += __i; + } + iterator + operator-(difference_type __i) const + { + iterator __tmp = *this; + return __tmp -= __i; + } + reference + operator[](difference_type __i) const + { return *(*this + __i); } + }; + inline _Bit_iterator + operator+(ptrdiff_t __n, const _Bit_iterator& __x) + { return __x + __n; } + struct _Bit_const_iterator : public _Bit_iterator_base + { + typedef bool reference; + typedef bool const_reference; + typedef const bool* pointer; + typedef _Bit_const_iterator const_iterator; + _Bit_const_iterator() : _Bit_iterator_base(0, 0) { } + _Bit_const_iterator(_Bit_type * __x, unsigned int __y) + : _Bit_iterator_base(__x, __y) { } + _Bit_const_iterator(const _Bit_iterator& __x) + : _Bit_iterator_base(__x._M_p, __x._M_offset) { } + const_reference + operator*() const + { return _Bit_reference(_M_p, 1UL << _M_offset); } + const_iterator& + operator++() + { + _M_bump_up(); + return *this; + } + const_iterator + operator++(int) + { + const_iterator __tmp = *this; + _M_bump_up(); + return __tmp; + } + const_iterator& + operator--() + { + _M_bump_down(); + return *this; + } + const_iterator + operator--(int) + { + const_iterator __tmp = *this; + _M_bump_down(); + return __tmp; + } + const_iterator& + operator+=(difference_type __i) + { + _M_incr(__i); + return *this; + } + const_iterator& + operator-=(difference_type __i) + { + *this += -__i; + return *this; + } + const_iterator + operator+(difference_type __i) const + { + const_iterator __tmp = *this; + return __tmp += __i; + } + const_iterator + operator-(difference_type __i) const + { + const_iterator __tmp = *this; + return __tmp -= __i; + } + const_reference + operator[](difference_type __i) const + { return *(*this + __i); } + }; + inline _Bit_const_iterator + operator+(ptrdiff_t __n, const _Bit_const_iterator& __x) + { return __x + __n; } + inline void + __fill_bvector(_Bit_iterator __first, _Bit_iterator __last, bool __x) + { + for (; __first != __last; ++__first) + *__first = __x; + } + inline void + fill(_Bit_iterator __first, _Bit_iterator __last, const bool& __x) + { + if (__first._M_p != __last._M_p) + { + std::fill(__first._M_p + 1, __last._M_p, __x ? ~0 : 0); + __fill_bvector(__first, _Bit_iterator(__first._M_p + 1, 0), __x); + __fill_bvector(_Bit_iterator(__last._M_p, 0), __last, __x); + } + else + __fill_bvector(__first, __last, __x); + } + template + struct _Bvector_base + { + typedef typename _Alloc::template rebind<_Bit_type>::other + _Bit_alloc_type; + struct _Bvector_impl + : public _Bit_alloc_type + { + _Bit_iterator _M_start; + _Bit_iterator _M_finish; + _Bit_type* _M_end_of_storage; + _Bvector_impl() + : _Bit_alloc_type(), _M_start(), _M_finish(), _M_end_of_storage(0) + { } + _Bvector_impl(const _Bit_alloc_type& __a) + : _Bit_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage(0) + { } + }; + public: + typedef _Alloc allocator_type; + _Bit_alloc_type& + _M_get_Bit_allocator() + { return *static_cast<_Bit_alloc_type*>(&this->_M_impl); } + const _Bit_alloc_type& + _M_get_Bit_allocator() const + { return *static_cast(&this->_M_impl); } + allocator_type + get_allocator() const + { return allocator_type(_M_get_Bit_allocator()); } + _Bvector_base() + : _M_impl() { } + _Bvector_base(const allocator_type& __a) + : _M_impl(__a) { } + ~_Bvector_base() + { this->_M_deallocate(); } + protected: + _Bvector_impl _M_impl; + _Bit_type* + _M_allocate(size_t __n) + { return _M_impl.allocate((__n + int(_S_word_bit) - 1) + / int(_S_word_bit)); } + void + _M_deallocate() + { + if (_M_impl._M_start._M_p) + _M_impl.deallocate(_M_impl._M_start._M_p, + _M_impl._M_end_of_storage - _M_impl._M_start._M_p); + } + }; +} +namespace std __attribute__ ((__visibility__ ("default"))) { +template + class vector : protected _Bvector_base<_Alloc> + { + typedef _Bvector_base<_Alloc> _Base; + public: + typedef bool value_type; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Bit_reference reference; + typedef bool const_reference; + typedef _Bit_reference* pointer; + typedef const bool* const_pointer; + typedef _Bit_iterator iterator; + typedef _Bit_const_iterator const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef _Alloc allocator_type; + allocator_type get_allocator() const + { return _Base::get_allocator(); } + protected: + using _Base::_M_allocate; + using _Base::_M_deallocate; + using _Base::_M_get_Bit_allocator; + public: + vector() + : _Base() { } + explicit + vector(const allocator_type& __a) + : _Base(__a) { } + explicit + vector(size_type __n, const bool& __value = bool(), + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + _M_initialize(__n); + std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage, + __value ? ~0 : 0); + } + vector(const vector& __x) + : _Base(__x._M_get_Bit_allocator()) + { + _M_initialize(__x.size()); + _M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start); + } + template + vector(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_initialize_dispatch(__first, __last, _Integral()); + } + ~vector() { } + vector& + operator=(const vector& __x) + { + if (&__x == this) + return *this; + if (__x.size() > capacity()) + { + this->_M_deallocate(); + _M_initialize(__x.size()); + } + this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(), + begin()); + return *this; + } + void + assign(size_type __n, const bool& __x) + { _M_fill_assign(__n, __x); } + template + void + assign(_InputIterator __first, _InputIterator __last) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } + iterator + begin() + { return this->_M_impl._M_start; } + const_iterator + begin() const + { return this->_M_impl._M_start; } + iterator + end() + { return this->_M_impl._M_finish; } + const_iterator + end() const + { return this->_M_impl._M_finish; } + reverse_iterator + rbegin() + { return reverse_iterator(end()); } + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(end()); } + reverse_iterator + rend() + { return reverse_iterator(begin()); } + const_reverse_iterator + rend() const + { return const_reverse_iterator(begin()); } + size_type + size() const + { return size_type(end() - begin()); } + size_type + max_size() const + { + const size_type __isize = + __gnu_cxx::__numeric_traits::__max + - int(_S_word_bit) + 1; + const size_type __asize = _M_get_Bit_allocator().max_size(); + return (__asize <= __isize / int(_S_word_bit) + ? __asize * int(_S_word_bit) : __isize); + } + size_type + capacity() const + { return size_type(const_iterator(this->_M_impl._M_end_of_storage, 0) + - begin()); } + bool + empty() const + { return begin() == end(); } + reference + operator[](size_type __n) + { + return *iterator(this->_M_impl._M_start._M_p + + __n / int(_S_word_bit), __n % int(_S_word_bit)); + } + const_reference + operator[](size_type __n) const + { + return *const_iterator(this->_M_impl._M_start._M_p + + __n / int(_S_word_bit), __n % int(_S_word_bit)); + } + protected: + void + _M_range_check(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range(("vector::_M_range_check")); + } + public: + reference + at(size_type __n) + { _M_range_check(__n); return (*this)[__n]; } + const_reference + at(size_type __n) const + { _M_range_check(__n); return (*this)[__n]; } + void + reserve(size_type __n); + reference + front() + { return *begin(); } + const_reference + front() const + { return *begin(); } + reference + back() + { return *(end() - 1); } + const_reference + back() const + { return *(end() - 1); } + void + data() { } + void + push_back(bool __x) + { + if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage) + *this->_M_impl._M_finish++ = __x; + else + _M_insert_aux(end(), __x); + } + void + swap(vector& __x) + { + std::swap(this->_M_impl._M_start, __x._M_impl._M_start); + std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); + std::swap(this->_M_impl._M_end_of_storage, + __x._M_impl._M_end_of_storage); + std::__alloc_swap:: + _S_do_it(_M_get_Bit_allocator(), __x._M_get_Bit_allocator()); + } + static void + swap(reference __x, reference __y) + { + bool __tmp = __x; + __x = __y; + __y = __tmp; + } + iterator + insert(iterator __position, const bool& __x = bool()) + { + const difference_type __n = __position - begin(); + if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage + && __position == end()) + *this->_M_impl._M_finish++ = __x; + else + _M_insert_aux(__position, __x); + return begin() + __n; + } + template + void + insert(iterator __position, + _InputIterator __first, _InputIterator __last) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_insert_dispatch(__position, __first, __last, _Integral()); + } + void + insert(iterator __position, size_type __n, const bool& __x) + { _M_fill_insert(__position, __n, __x); } + void + pop_back() + { --this->_M_impl._M_finish; } + iterator + erase(iterator __position) + { + if (__position + 1 != end()) + std::copy(__position + 1, end(), __position); + --this->_M_impl._M_finish; + return __position; + } + iterator + erase(iterator __first, iterator __last) + { + _M_erase_at_end(std::copy(__last, end(), __first)); + return __first; + } + void + resize(size_type __new_size, bool __x = bool()) + { + if (__new_size < size()) + _M_erase_at_end(begin() + difference_type(__new_size)); + else + insert(end(), __new_size - size(), __x); + } + void + flip() + { + for (_Bit_type * __p = this->_M_impl._M_start._M_p; + __p != this->_M_impl._M_end_of_storage; ++__p) + *__p = ~*__p; + } + void + clear() + { _M_erase_at_end(begin()); } + protected: + iterator + _M_copy_aligned(const_iterator __first, const_iterator __last, + iterator __result) + { + _Bit_type* __q = std::copy(__first._M_p, __last._M_p, __result._M_p); + return std::copy(const_iterator(__last._M_p, 0), __last, + iterator(__q, 0)); + } + void + _M_initialize(size_type __n) + { + _Bit_type* __q = this->_M_allocate(__n); + this->_M_impl._M_end_of_storage = (__q + + ((__n + int(_S_word_bit) - 1) + / int(_S_word_bit))); + this->_M_impl._M_start = iterator(__q, 0); + this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n); + } + template + void + _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) + { + _M_initialize(static_cast(__n)); + std::fill(this->_M_impl._M_start._M_p, + this->_M_impl._M_end_of_storage, __x ? ~0 : 0); + } + template + void + _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { _M_initialize_range(__first, __last, + std::__iterator_category(__first)); } + template + void + _M_initialize_range(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + for (; __first != __last; ++__first) + push_back(*__first); + } + template + void + _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __n = std::distance(__first, __last); + _M_initialize(__n); + std::copy(__first, __last, this->_M_impl._M_start); + } + template + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } + template + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } + void + _M_fill_assign(size_t __n, bool __x) + { + if (__n > size()) + { + std::fill(this->_M_impl._M_start._M_p, + this->_M_impl._M_end_of_storage, __x ? ~0 : 0); + insert(end(), __n - size(), __x); + } + else + { + _M_erase_at_end(begin() + __n); + std::fill(this->_M_impl._M_start._M_p, + this->_M_impl._M_end_of_storage, __x ? ~0 : 0); + } + } + template + void + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + iterator __cur = begin(); + for (; __first != __last && __cur != end(); ++__cur, ++__first) + *__cur = *__first; + if (__first == __last) + _M_erase_at_end(__cur); + else + insert(end(), __first, __last); + } + template + void + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __len = std::distance(__first, __last); + if (__len < size()) + _M_erase_at_end(std::copy(__first, __last, begin())); + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, size()); + std::copy(__first, __mid, begin()); + insert(end(), __mid, __last); + } + } + template + void + _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, + __true_type) + { _M_fill_insert(__pos, __n, __x); } + template + void + _M_insert_dispatch(iterator __pos, + _InputIterator __first, _InputIterator __last, + __false_type) + { _M_insert_range(__pos, __first, __last, + std::__iterator_category(__first)); } + void + _M_fill_insert(iterator __position, size_type __n, bool __x); + template + void + _M_insert_range(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag) + { + for (; __first != __last; ++__first) + { + __pos = insert(__pos, *__first); + ++__pos; + } + } + template + void + _M_insert_range(iterator __position, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag); + void + _M_insert_aux(iterator __position, bool __x); + size_type + _M_check_len(size_type __n, const char* __s) const + { + if (max_size() - size() < __n) + __throw_length_error((__s)); + const size_type __len = size() + std::max(size(), __n); + return (__len < size() || __len > max_size()) ? max_size() : __len; + } + void + _M_erase_at_end(iterator __pos) + { this->_M_impl._M_finish = __pos; } + }; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + void + vector<_Tp, _Alloc>:: + reserve(size_type __n) + { + if (__n > this->max_size()) + __throw_length_error(("vector::reserve")); + if (this->capacity() < __n) + { + const size_type __old_size = size(); + pointer __tmp = _M_allocate_and_copy(__n, + (this->_M_impl._M_start), + (this->_M_impl._M_finish)); + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __tmp; + this->_M_impl._M_finish = __tmp + __old_size; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + } + } + template + typename vector<_Tp, _Alloc>::iterator + vector<_Tp, _Alloc>:: + insert(iterator __position, const value_type& __x) + { + const size_type __n = __position - begin(); + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage + && __position == end()) + { + this->_M_impl.construct(this->_M_impl._M_finish, __x); + ++this->_M_impl._M_finish; + } + else + { + _M_insert_aux(__position, __x); + } + return iterator(this->_M_impl._M_start + __n); + } + template + typename vector<_Tp, _Alloc>::iterator + vector<_Tp, _Alloc>:: + erase(iterator __position) + { + if (__position + 1 != end()) + std::copy(__position + 1, end(), __position); + --this->_M_impl._M_finish; + this->_M_impl.destroy(this->_M_impl._M_finish); + return __position; + } + template + typename vector<_Tp, _Alloc>::iterator + vector<_Tp, _Alloc>:: + erase(iterator __first, iterator __last) + { + if (__last != end()) + std::copy(__last, end(), __first); + _M_erase_at_end(__first.base() + (end() - __last)); + return __first; + } + template + vector<_Tp, _Alloc>& + vector<_Tp, _Alloc>:: + operator=(const vector<_Tp, _Alloc>& __x) + { + if (&__x != this) + { + const size_type __xlen = __x.size(); + if (__xlen > capacity()) + { + pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(), + __x.end()); + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __tmp; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen; + } + else if (size() >= __xlen) + { + std::_Destroy(std::copy(__x.begin(), __x.end(), begin()), + end(), _M_get_Tp_allocator()); + } + else + { + std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(), + this->_M_impl._M_start); + std::__uninitialized_copy_a(__x._M_impl._M_start + size(), + __x._M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + } + this->_M_impl._M_finish = this->_M_impl._M_start + __xlen; + } + return *this; + } + template + void + vector<_Tp, _Alloc>:: + _M_fill_assign(size_t __n, const value_type& __val) + { + if (__n > capacity()) + { + vector __tmp(__n, __val, _M_get_Tp_allocator()); + __tmp.swap(*this); + } + else if (__n > size()) + { + std::fill(begin(), end(), __val); + std::__uninitialized_fill_n_a(this->_M_impl._M_finish, + __n - size(), __val, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n - size(); + } + else + _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val)); + } + template + template + void + vector<_Tp, _Alloc>:: + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + pointer __cur(this->_M_impl._M_start); + for (; __first != __last && __cur != this->_M_impl._M_finish; + ++__cur, ++__first) + *__cur = *__first; + if (__first == __last) + _M_erase_at_end(__cur); + else + insert(end(), __first, __last); + } + template + template + void + vector<_Tp, _Alloc>:: + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __len = std::distance(__first, __last); + if (__len > capacity()) + { + pointer __tmp(_M_allocate_and_copy(__len, __first, __last)); + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __tmp; + this->_M_impl._M_finish = this->_M_impl._M_start + __len; + this->_M_impl._M_end_of_storage = this->_M_impl._M_finish; + } + else if (size() >= __len) + _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start)); + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, size()); + std::copy(__first, __mid, this->_M_impl._M_start); + this->_M_impl._M_finish = + std::__uninitialized_copy_a(__mid, __last, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + } + } + template + void + vector<_Tp, _Alloc>:: + _M_insert_aux(iterator __position, const _Tp& __x) + { + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + { + this->_M_impl.construct(this->_M_impl._M_finish, + (*(this->_M_impl._M_finish - 1))); + ++this->_M_impl._M_finish; + _Tp __x_copy = __x; + std::copy_backward(__position.base(), this->_M_impl._M_finish - 2, this->_M_impl._M_finish - 1); + *__position = __x_copy; + } + else + { + const size_type __len = + _M_check_len(size_type(1), "vector::_M_insert_aux"); + const size_type __elems_before = __position - begin(); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + try + { + this->_M_impl.construct(__new_start + __elems_before, + __x); + __new_finish = 0; + __new_finish = + std::__uninitialized_move_a(this->_M_impl._M_start, + __position.base(), __new_start, + _M_get_Tp_allocator()); + ++__new_finish; + __new_finish = + std::__uninitialized_move_a(__position.base(), + this->_M_impl._M_finish, + __new_finish, + _M_get_Tp_allocator()); + } + catch(...) + { + if (!__new_finish) + this->_M_impl.destroy(__new_start + __elems_before); + else + std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + } + template + void + vector<_Tp, _Alloc>:: + _M_fill_insert(iterator __position, size_type __n, const value_type& __x) + { + if (__n != 0) + { + if (size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_finish) >= __n) + { + value_type __x_copy = __x; + const size_type __elems_after = end() - __position; + pointer __old_finish(this->_M_impl._M_finish); + if (__elems_after > __n) + { + std::__uninitialized_move_a(this->_M_impl._M_finish - __n, + this->_M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n; + std::copy_backward(__position.base(), __old_finish - __n, __old_finish); + std::fill(__position.base(), __position.base() + __n, + __x_copy); + } + else + { + std::__uninitialized_fill_n_a(this->_M_impl._M_finish, + __n - __elems_after, + __x_copy, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n - __elems_after; + std::__uninitialized_move_a(__position.base(), __old_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __elems_after; + std::fill(__position.base(), __old_finish, __x_copy); + } + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_fill_insert"); + const size_type __elems_before = __position - begin(); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + try + { + std::__uninitialized_fill_n_a(__new_start + __elems_before, + __n, __x, + _M_get_Tp_allocator()); + __new_finish = 0; + __new_finish = + std::__uninitialized_move_a(this->_M_impl._M_start, + __position.base(), + __new_start, + _M_get_Tp_allocator()); + __new_finish += __n; + __new_finish = + std::__uninitialized_move_a(__position.base(), + this->_M_impl._M_finish, + __new_finish, + _M_get_Tp_allocator()); + } + catch(...) + { + if (!__new_finish) + std::_Destroy(__new_start + __elems_before, + __new_start + __elems_before + __n, + _M_get_Tp_allocator()); + else + std::_Destroy(__new_start, __new_finish, + _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + } + } + template + template + void + vector<_Tp, _Alloc>:: + _M_range_insert(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag) + { + for (; __first != __last; ++__first) + { + __pos = insert(__pos, *__first); + ++__pos; + } + } + template + template + void + vector<_Tp, _Alloc>:: + _M_range_insert(iterator __position, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag) + { + if (__first != __last) + { + const size_type __n = std::distance(__first, __last); + if (size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_finish) >= __n) + { + const size_type __elems_after = end() - __position; + pointer __old_finish(this->_M_impl._M_finish); + if (__elems_after > __n) + { + std::__uninitialized_move_a(this->_M_impl._M_finish - __n, + this->_M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n; + std::copy_backward(__position.base(), __old_finish - __n, __old_finish); + std::copy(__first, __last, __position); + } + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, __elems_after); + std::__uninitialized_copy_a(__mid, __last, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n - __elems_after; + std::__uninitialized_move_a(__position.base(), + __old_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __elems_after; + std::copy(__first, __mid, __position); + } + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_range_insert"); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + try + { + __new_finish = + std::__uninitialized_move_a(this->_M_impl._M_start, + __position.base(), + __new_start, + _M_get_Tp_allocator()); + __new_finish = + std::__uninitialized_copy_a(__first, __last, + __new_finish, + _M_get_Tp_allocator()); + __new_finish = + std::__uninitialized_move_a(__position.base(), + this->_M_impl._M_finish, + __new_finish, + _M_get_Tp_allocator()); + } + catch(...) + { + std::_Destroy(__new_start, __new_finish, + _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + } + } + template + void + vector:: + reserve(size_type __n) + { + if (__n > this->max_size()) + __throw_length_error(("vector::reserve")); + if (this->capacity() < __n) + { + _Bit_type* __q = this->_M_allocate(__n); + this->_M_impl._M_finish = _M_copy_aligned(begin(), end(), + iterator(__q, 0)); + this->_M_deallocate(); + this->_M_impl._M_start = iterator(__q, 0); + this->_M_impl._M_end_of_storage = (__q + (__n + int(_S_word_bit) - 1) + / int(_S_word_bit)); + } + } + template + void + vector:: + _M_fill_insert(iterator __position, size_type __n, bool __x) + { + if (__n == 0) + return; + if (capacity() - size() >= __n) + { + std::copy_backward(__position, end(), + this->_M_impl._M_finish + difference_type(__n)); + std::fill(__position, __position + difference_type(__n), __x); + this->_M_impl._M_finish += difference_type(__n); + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_fill_insert"); + _Bit_type * __q = this->_M_allocate(__len); + iterator __i = _M_copy_aligned(begin(), __position, + iterator(__q, 0)); + std::fill(__i, __i + difference_type(__n), __x); + this->_M_impl._M_finish = std::copy(__position, end(), + __i + difference_type(__n)); + this->_M_deallocate(); + this->_M_impl._M_end_of_storage = (__q + ((__len + + int(_S_word_bit) - 1) + / int(_S_word_bit))); + this->_M_impl._M_start = iterator(__q, 0); + } + } + template + template + void + vector:: + _M_insert_range(iterator __position, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag) + { + if (__first != __last) + { + size_type __n = std::distance(__first, __last); + if (capacity() - size() >= __n) + { + std::copy_backward(__position, end(), + this->_M_impl._M_finish + + difference_type(__n)); + std::copy(__first, __last, __position); + this->_M_impl._M_finish += difference_type(__n); + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_insert_range"); + _Bit_type * __q = this->_M_allocate(__len); + iterator __i = _M_copy_aligned(begin(), __position, + iterator(__q, 0)); + __i = std::copy(__first, __last, __i); + this->_M_impl._M_finish = std::copy(__position, end(), __i); + this->_M_deallocate(); + this->_M_impl._M_end_of_storage = (__q + + ((__len + + int(_S_word_bit) - 1) + / int(_S_word_bit))); + this->_M_impl._M_start = iterator(__q, 0); + } + } + } + template + void + vector:: + _M_insert_aux(iterator __position, bool __x) + { + if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage) + { + std::copy_backward(__position, this->_M_impl._M_finish, + this->_M_impl._M_finish + 1); + *__position = __x; + ++this->_M_impl._M_finish; + } + else + { + const size_type __len = + _M_check_len(size_type(1), "vector::_M_insert_aux"); + _Bit_type * __q = this->_M_allocate(__len); + iterator __i = _M_copy_aligned(begin(), __position, + iterator(__q, 0)); + *__i++ = __x; + this->_M_impl._M_finish = std::copy(__position, end(), __i); + this->_M_deallocate(); + this->_M_impl._M_end_of_storage = (__q + ((__len + + int(_S_word_bit) - 1) + / int(_S_word_bit))); + this->_M_impl._M_start = iterator(__q, 0); + } + } +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + enum _Rb_tree_color { _S_red = false, _S_black = true }; + struct _Rb_tree_node_base + { + typedef _Rb_tree_node_base* _Base_ptr; + typedef const _Rb_tree_node_base* _Const_Base_ptr; + _Rb_tree_color _M_color; + _Base_ptr _M_parent; + _Base_ptr _M_left; + _Base_ptr _M_right; + static _Base_ptr + _S_minimum(_Base_ptr __x) + { + while (__x->_M_left != 0) __x = __x->_M_left; + return __x; + } + static _Const_Base_ptr + _S_minimum(_Const_Base_ptr __x) + { + while (__x->_M_left != 0) __x = __x->_M_left; + return __x; + } + static _Base_ptr + _S_maximum(_Base_ptr __x) + { + while (__x->_M_right != 0) __x = __x->_M_right; + return __x; + } + static _Const_Base_ptr + _S_maximum(_Const_Base_ptr __x) + { + while (__x->_M_right != 0) __x = __x->_M_right; + return __x; + } + }; + template + struct _Rb_tree_node : public _Rb_tree_node_base + { + typedef _Rb_tree_node<_Val>* _Link_type; + _Val _M_value_field; + }; + _Rb_tree_node_base* + _Rb_tree_increment(_Rb_tree_node_base* __x); + const _Rb_tree_node_base* + _Rb_tree_increment(const _Rb_tree_node_base* __x); + _Rb_tree_node_base* + _Rb_tree_decrement(_Rb_tree_node_base* __x); + const _Rb_tree_node_base* + _Rb_tree_decrement(const _Rb_tree_node_base* __x); + template + struct _Rb_tree_iterator + { + typedef _Tp value_type; + typedef _Tp& reference; + typedef _Tp* pointer; + typedef bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + typedef _Rb_tree_iterator<_Tp> _Self; + typedef _Rb_tree_node_base::_Base_ptr _Base_ptr; + typedef _Rb_tree_node<_Tp>* _Link_type; + _Rb_tree_iterator() + : _M_node() { } + explicit + _Rb_tree_iterator(_Link_type __x) + : _M_node(__x) { } + reference + operator*() const + { return static_cast<_Link_type>(_M_node)->_M_value_field; } + pointer + operator->() const + { return &static_cast<_Link_type>(_M_node)->_M_value_field; } + _Self& + operator++() + { + _M_node = _Rb_tree_increment(_M_node); + return *this; + } + _Self + operator++(int) + { + _Self __tmp = *this; + _M_node = _Rb_tree_increment(_M_node); + return __tmp; + } + _Self& + operator--() + { + _M_node = _Rb_tree_decrement(_M_node); + return *this; + } + _Self + operator--(int) + { + _Self __tmp = *this; + _M_node = _Rb_tree_decrement(_M_node); + return __tmp; + } + bool + operator==(const _Self& __x) const + { return _M_node == __x._M_node; } + bool + operator!=(const _Self& __x) const + { return _M_node != __x._M_node; } + _Base_ptr _M_node; + }; + template + struct _Rb_tree_const_iterator + { + typedef _Tp value_type; + typedef const _Tp& reference; + typedef const _Tp* pointer; + typedef _Rb_tree_iterator<_Tp> iterator; + typedef bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + typedef _Rb_tree_const_iterator<_Tp> _Self; + typedef _Rb_tree_node_base::_Const_Base_ptr _Base_ptr; + typedef const _Rb_tree_node<_Tp>* _Link_type; + _Rb_tree_const_iterator() + : _M_node() { } + explicit + _Rb_tree_const_iterator(_Link_type __x) + : _M_node(__x) { } + _Rb_tree_const_iterator(const iterator& __it) + : _M_node(__it._M_node) { } + reference + operator*() const + { return static_cast<_Link_type>(_M_node)->_M_value_field; } + pointer + operator->() const + { return &static_cast<_Link_type>(_M_node)->_M_value_field; } + _Self& + operator++() + { + _M_node = _Rb_tree_increment(_M_node); + return *this; + } + _Self + operator++(int) + { + _Self __tmp = *this; + _M_node = _Rb_tree_increment(_M_node); + return __tmp; + } + _Self& + operator--() + { + _M_node = _Rb_tree_decrement(_M_node); + return *this; + } + _Self + operator--(int) + { + _Self __tmp = *this; + _M_node = _Rb_tree_decrement(_M_node); + return __tmp; + } + bool + operator==(const _Self& __x) const + { return _M_node == __x._M_node; } + bool + operator!=(const _Self& __x) const + { return _M_node != __x._M_node; } + _Base_ptr _M_node; + }; + template + inline bool + operator==(const _Rb_tree_iterator<_Val>& __x, + const _Rb_tree_const_iterator<_Val>& __y) + { return __x._M_node == __y._M_node; } + template + inline bool + operator!=(const _Rb_tree_iterator<_Val>& __x, + const _Rb_tree_const_iterator<_Val>& __y) + { return __x._M_node != __y._M_node; } + void + _Rb_tree_insert_and_rebalance(const bool __insert_left, + _Rb_tree_node_base* __x, + _Rb_tree_node_base* __p, + _Rb_tree_node_base& __header); + _Rb_tree_node_base* + _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z, + _Rb_tree_node_base& __header); + template > + class _Rb_tree + { + typedef typename _Alloc::template rebind<_Rb_tree_node<_Val> >::other + _Node_allocator; + protected: + typedef _Rb_tree_node_base* _Base_ptr; + typedef const _Rb_tree_node_base* _Const_Base_ptr; + public: + typedef _Key key_type; + typedef _Val value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef _Rb_tree_node<_Val>* _Link_type; + typedef const _Rb_tree_node<_Val>* _Const_Link_type; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Alloc allocator_type; + _Node_allocator& + _M_get_Node_allocator() + { return *static_cast<_Node_allocator*>(&this->_M_impl); } + const _Node_allocator& + _M_get_Node_allocator() const + { return *static_cast(&this->_M_impl); } + allocator_type + get_allocator() const + { return allocator_type(_M_get_Node_allocator()); } + protected: + _Link_type + _M_get_node() + { return _M_impl._Node_allocator::allocate(1); } + void + _M_put_node(_Link_type __p) + { _M_impl._Node_allocator::deallocate(__p, 1); } + _Link_type + _M_create_node(const value_type& __x) + { + _Link_type __tmp = _M_get_node(); + try + { get_allocator().construct(&__tmp->_M_value_field, __x); } + catch(...) + { + _M_put_node(__tmp); + throw; + } + return __tmp; + } + void + _M_destroy_node(_Link_type __p) + { + get_allocator().destroy(&__p->_M_value_field); + _M_put_node(__p); + } + _Link_type + _M_clone_node(_Const_Link_type __x) + { + _Link_type __tmp = _M_create_node(__x->_M_value_field); + __tmp->_M_color = __x->_M_color; + __tmp->_M_left = 0; + __tmp->_M_right = 0; + return __tmp; + } + protected: + template + struct _Rb_tree_impl : public _Node_allocator + { + _Key_compare _M_key_compare; + _Rb_tree_node_base _M_header; + size_type _M_node_count; + _Rb_tree_impl() + : _Node_allocator(), _M_key_compare(), _M_header(), + _M_node_count(0) + { _M_initialize(); } + _Rb_tree_impl(const _Key_compare& __comp, const _Node_allocator& __a) + : _Node_allocator(__a), _M_key_compare(__comp), _M_header(), + _M_node_count(0) + { _M_initialize(); } + private: + void + _M_initialize() + { + this->_M_header._M_color = _S_red; + this->_M_header._M_parent = 0; + this->_M_header._M_left = &this->_M_header; + this->_M_header._M_right = &this->_M_header; + } + }; + _Rb_tree_impl<_Compare> _M_impl; + protected: + _Base_ptr& + _M_root() + { return this->_M_impl._M_header._M_parent; } + _Const_Base_ptr + _M_root() const + { return this->_M_impl._M_header._M_parent; } + _Base_ptr& + _M_leftmost() + { return this->_M_impl._M_header._M_left; } + _Const_Base_ptr + _M_leftmost() const + { return this->_M_impl._M_header._M_left; } + _Base_ptr& + _M_rightmost() + { return this->_M_impl._M_header._M_right; } + _Const_Base_ptr + _M_rightmost() const + { return this->_M_impl._M_header._M_right; } + _Link_type + _M_begin() + { return static_cast<_Link_type>(this->_M_impl._M_header._M_parent); } + _Const_Link_type + _M_begin() const + { + return static_cast<_Const_Link_type> + (this->_M_impl._M_header._M_parent); + } + _Link_type + _M_end() + { return static_cast<_Link_type>(&this->_M_impl._M_header); } + _Const_Link_type + _M_end() const + { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); } + static const_reference + _S_value(_Const_Link_type __x) + { return __x->_M_value_field; } + static const _Key& + _S_key(_Const_Link_type __x) + { return _KeyOfValue()(_S_value(__x)); } + static _Link_type + _S_left(_Base_ptr __x) + { return static_cast<_Link_type>(__x->_M_left); } + static _Const_Link_type + _S_left(_Const_Base_ptr __x) + { return static_cast<_Const_Link_type>(__x->_M_left); } + static _Link_type + _S_right(_Base_ptr __x) + { return static_cast<_Link_type>(__x->_M_right); } + static _Const_Link_type + _S_right(_Const_Base_ptr __x) + { return static_cast<_Const_Link_type>(__x->_M_right); } + static const_reference + _S_value(_Const_Base_ptr __x) + { return static_cast<_Const_Link_type>(__x)->_M_value_field; } + static const _Key& + _S_key(_Const_Base_ptr __x) + { return _KeyOfValue()(_S_value(__x)); } + static _Base_ptr + _S_minimum(_Base_ptr __x) + { return _Rb_tree_node_base::_S_minimum(__x); } + static _Const_Base_ptr + _S_minimum(_Const_Base_ptr __x) + { return _Rb_tree_node_base::_S_minimum(__x); } + static _Base_ptr + _S_maximum(_Base_ptr __x) + { return _Rb_tree_node_base::_S_maximum(__x); } + static _Const_Base_ptr + _S_maximum(_Const_Base_ptr __x) + { return _Rb_tree_node_base::_S_maximum(__x); } + public: + typedef _Rb_tree_iterator iterator; + typedef _Rb_tree_const_iterator const_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + private: + iterator + _M_insert_(_Const_Base_ptr __x, _Const_Base_ptr __y, + const value_type& __v); + iterator + _M_insert_lower(_Base_ptr __x, _Base_ptr __y, const value_type& __v); + iterator + _M_insert_equal_lower(const value_type& __x); + _Link_type + _M_copy(_Const_Link_type __x, _Link_type __p); + void + _M_erase(_Link_type __x); + iterator + _M_lower_bound(_Link_type __x, _Link_type __y, + const _Key& __k); + const_iterator + _M_lower_bound(_Const_Link_type __x, _Const_Link_type __y, + const _Key& __k) const; + iterator + _M_upper_bound(_Link_type __x, _Link_type __y, + const _Key& __k); + const_iterator + _M_upper_bound(_Const_Link_type __x, _Const_Link_type __y, + const _Key& __k) const; + public: + _Rb_tree() { } + _Rb_tree(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_impl(__comp, __a) { } + _Rb_tree(const _Rb_tree& __x) + : _M_impl(__x._M_impl._M_key_compare, __x._M_get_Node_allocator()) + { + if (__x._M_root() != 0) + { + _M_root() = _M_copy(__x._M_begin(), _M_end()); + _M_leftmost() = _S_minimum(_M_root()); + _M_rightmost() = _S_maximum(_M_root()); + _M_impl._M_node_count = __x._M_impl._M_node_count; + } + } + ~_Rb_tree() + { _M_erase(_M_begin()); } + _Rb_tree& + operator=(const _Rb_tree& __x); + _Compare + key_comp() const + { return _M_impl._M_key_compare; } + iterator + begin() + { + return iterator(static_cast<_Link_type> + (this->_M_impl._M_header._M_left)); + } + const_iterator + begin() const + { + return const_iterator(static_cast<_Const_Link_type> + (this->_M_impl._M_header._M_left)); + } + iterator + end() + { return iterator(static_cast<_Link_type>(&this->_M_impl._M_header)); } + const_iterator + end() const + { + return const_iterator(static_cast<_Const_Link_type> + (&this->_M_impl._M_header)); + } + reverse_iterator + rbegin() + { return reverse_iterator(end()); } + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(end()); } + reverse_iterator + rend() + { return reverse_iterator(begin()); } + const_reverse_iterator + rend() const + { return const_reverse_iterator(begin()); } + bool + empty() const + { return _M_impl._M_node_count == 0; } + size_type + size() const + { return _M_impl._M_node_count; } + size_type + max_size() const + { return _M_get_Node_allocator().max_size(); } + void + swap(_Rb_tree& __t); + pair + _M_insert_unique(const value_type& __x); + iterator + _M_insert_equal(const value_type& __x); + iterator + _M_insert_unique_(const_iterator __position, const value_type& __x); + iterator + _M_insert_equal_(const_iterator __position, const value_type& __x); + template + void + _M_insert_unique(_InputIterator __first, _InputIterator __last); + template + void + _M_insert_equal(_InputIterator __first, _InputIterator __last); + void + erase(iterator __position); + void + erase(const_iterator __position); + size_type + erase(const key_type& __x); + void + erase(iterator __first, iterator __last); + void + erase(const_iterator __first, const_iterator __last); + void + erase(const key_type* __first, const key_type* __last); + void + clear() + { + _M_erase(_M_begin()); + _M_leftmost() = _M_end(); + _M_root() = 0; + _M_rightmost() = _M_end(); + _M_impl._M_node_count = 0; + } + iterator + find(const key_type& __k); + const_iterator + find(const key_type& __k) const; + size_type + count(const key_type& __k) const; + iterator + lower_bound(const key_type& __k) + { return _M_lower_bound(_M_begin(), _M_end(), __k); } + const_iterator + lower_bound(const key_type& __k) const + { return _M_lower_bound(_M_begin(), _M_end(), __k); } + iterator + upper_bound(const key_type& __k) + { return _M_upper_bound(_M_begin(), _M_end(), __k); } + const_iterator + upper_bound(const key_type& __k) const + { return _M_upper_bound(_M_begin(), _M_end(), __k); } + pair + equal_range(const key_type& __k); + pair + equal_range(const key_type& __k) const; + bool + __rb_verify() const; + }; + template + inline bool + operator==(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { + return __x.size() == __y.size() + && std::equal(__x.begin(), __x.end(), __y.begin()); + } + template + inline bool + operator<(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { + return std::lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); + } + template + inline bool + operator!=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { return __y < __x; } + template + inline bool + operator<=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { return !(__x < __y); } + template + inline void + swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { __x.swap(__y); } + template + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + operator=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x) + { + if (this != &__x) + { + clear(); + _M_impl._M_key_compare = __x._M_impl._M_key_compare; + if (__x._M_root() != 0) + { + _M_root() = _M_copy(__x._M_begin(), _M_end()); + _M_leftmost() = _S_minimum(_M_root()); + _M_rightmost() = _S_maximum(_M_root()); + _M_impl._M_node_count = __x._M_impl._M_node_count; + } + } + return *this; + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_(_Const_Base_ptr __x, _Const_Base_ptr __p, const _Val& __v) + { + bool __insert_left = (__x != 0 || __p == _M_end() + || _M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key(__p))); + _Link_type __z = _M_create_node(__v); + _Rb_tree_insert_and_rebalance(__insert_left, __z, + const_cast<_Base_ptr>(__p), + this->_M_impl._M_header); + ++_M_impl._M_node_count; + return iterator(__z); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_lower(_Base_ptr __x, _Base_ptr __p, const _Val& __v) + { + bool __insert_left = (__x != 0 || __p == _M_end() + || !_M_impl._M_key_compare(_S_key(__p), + _KeyOfValue()(__v))); + _Link_type __z = _M_create_node(__v); + _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, + this->_M_impl._M_header); + ++_M_impl._M_node_count; + return iterator(__z); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_equal_lower(const _Val& __v) + { + _Link_type __x = _M_begin(); + _Link_type __y = _M_end(); + while (__x != 0) + { + __y = __x; + __x = !_M_impl._M_key_compare(_S_key(__x), _KeyOfValue()(__v)) ? + _S_left(__x) : _S_right(__x); + } + return _M_insert_lower(__x, __y, __v); + } + template + typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::_Link_type + _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>:: + _M_copy(_Const_Link_type __x, _Link_type __p) + { + _Link_type __top = _M_clone_node(__x); + __top->_M_parent = __p; + try + { + if (__x->_M_right) + __top->_M_right = _M_copy(_S_right(__x), __top); + __p = __top; + __x = _S_left(__x); + while (__x != 0) + { + _Link_type __y = _M_clone_node(__x); + __p->_M_left = __y; + __y->_M_parent = __p; + if (__x->_M_right) + __y->_M_right = _M_copy(_S_right(__x), __y); + __p = __y; + __x = _S_left(__x); + } + } + catch(...) + { + _M_erase(__top); + throw; + } + return __top; + } + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_erase(_Link_type __x) + { + while (__x != 0) + { + _M_erase(_S_right(__x)); + _Link_type __y = _S_left(__x); + _M_destroy_node(__x); + __x = __y; + } + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_lower_bound(_Link_type __x, _Link_type __y, + const _Key& __k) + { + while (__x != 0) + if (!_M_impl._M_key_compare(_S_key(__x), __k)) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + return iterator(__y); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::const_iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_lower_bound(_Const_Link_type __x, _Const_Link_type __y, + const _Key& __k) const + { + while (__x != 0) + if (!_M_impl._M_key_compare(_S_key(__x), __k)) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + return const_iterator(__y); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_upper_bound(_Link_type __x, _Link_type __y, + const _Key& __k) + { + while (__x != 0) + if (_M_impl._M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + return iterator(__y); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::const_iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_upper_bound(_Const_Link_type __x, _Const_Link_type __y, + const _Key& __k) const + { + while (__x != 0) + if (_M_impl._M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + return const_iterator(__y); + } + template + pair::iterator, + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::iterator> + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + equal_range(const _Key& __k) + { + _Link_type __x = _M_begin(); + _Link_type __y = _M_end(); + while (__x != 0) + { + if (_M_impl._M_key_compare(_S_key(__x), __k)) + __x = _S_right(__x); + else if (_M_impl._M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + { + _Link_type __xu(__x), __yu(__y); + __y = __x, __x = _S_left(__x); + __xu = _S_right(__xu); + return pair(_M_lower_bound(__x, __y, __k), + _M_upper_bound(__xu, __yu, __k)); + } + } + return pair(iterator(__y), + iterator(__y)); + } + template + pair::const_iterator, + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::const_iterator> + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + equal_range(const _Key& __k) const + { + _Const_Link_type __x = _M_begin(); + _Const_Link_type __y = _M_end(); + while (__x != 0) + { + if (_M_impl._M_key_compare(_S_key(__x), __k)) + __x = _S_right(__x); + else if (_M_impl._M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + { + _Const_Link_type __xu(__x), __yu(__y); + __y = __x, __x = _S_left(__x); + __xu = _S_right(__xu); + return pair(_M_lower_bound(__x, __y, __k), + _M_upper_bound(__xu, __yu, __k)); + } + } + return pair(const_iterator(__y), + const_iterator(__y)); + } + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __t) + { + if (_M_root() == 0) + { + if (__t._M_root() != 0) + { + _M_root() = __t._M_root(); + _M_leftmost() = __t._M_leftmost(); + _M_rightmost() = __t._M_rightmost(); + _M_root()->_M_parent = _M_end(); + __t._M_root() = 0; + __t._M_leftmost() = __t._M_end(); + __t._M_rightmost() = __t._M_end(); + } + } + else if (__t._M_root() == 0) + { + __t._M_root() = _M_root(); + __t._M_leftmost() = _M_leftmost(); + __t._M_rightmost() = _M_rightmost(); + __t._M_root()->_M_parent = __t._M_end(); + _M_root() = 0; + _M_leftmost() = _M_end(); + _M_rightmost() = _M_end(); + } + else + { + std::swap(_M_root(),__t._M_root()); + std::swap(_M_leftmost(),__t._M_leftmost()); + std::swap(_M_rightmost(),__t._M_rightmost()); + _M_root()->_M_parent = _M_end(); + __t._M_root()->_M_parent = __t._M_end(); + } + std::swap(this->_M_impl._M_node_count, __t._M_impl._M_node_count); + std::swap(this->_M_impl._M_key_compare, __t._M_impl._M_key_compare); + std::__alloc_swap<_Node_allocator>:: + _S_do_it(_M_get_Node_allocator(), __t._M_get_Node_allocator()); + } + template + pair::iterator, bool> + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_unique(const _Val& __v) + { + _Link_type __x = _M_begin(); + _Link_type __y = _M_end(); + bool __comp = true; + while (__x != 0) + { + __y = __x; + __comp = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x)); + __x = __comp ? _S_left(__x) : _S_right(__x); + } + iterator __j = iterator(__y); + if (__comp) + { + if (__j == begin()) + return pair(_M_insert_(__x, __y, __v), true); + else + --__j; + } + if (_M_impl._M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v))) + return pair(_M_insert_(__x, __y, __v), true); + return pair(__j, false); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_equal(const _Val& __v) + { + _Link_type __x = _M_begin(); + _Link_type __y = _M_end(); + while (__x != 0) + { + __y = __x; + __x = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x)) ? + _S_left(__x) : _S_right(__x); + } + return _M_insert_(__x, __y, __v); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_unique_(const_iterator __position, const _Val& __v) + { + if (__position._M_node == _M_end()) + { + if (size() > 0 + && _M_impl._M_key_compare(_S_key(_M_rightmost()), + _KeyOfValue()(__v))) + return _M_insert_(0, _M_rightmost(), __v); + else + return _M_insert_unique(__v).first; + } + else if (_M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key(__position._M_node))) + { + const_iterator __before = __position; + if (__position._M_node == _M_leftmost()) + return _M_insert_(_M_leftmost(), _M_leftmost(), __v); + else if (_M_impl._M_key_compare(_S_key((--__before)._M_node), + _KeyOfValue()(__v))) + { + if (_S_right(__before._M_node) == 0) + return _M_insert_(0, __before._M_node, __v); + else + return _M_insert_(__position._M_node, + __position._M_node, __v); + } + else + return _M_insert_unique(__v).first; + } + else if (_M_impl._M_key_compare(_S_key(__position._M_node), + _KeyOfValue()(__v))) + { + const_iterator __after = __position; + if (__position._M_node == _M_rightmost()) + return _M_insert_(0, _M_rightmost(), __v); + else if (_M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key((++__after)._M_node))) + { + if (_S_right(__position._M_node) == 0) + return _M_insert_(0, __position._M_node, __v); + else + return _M_insert_(__after._M_node, __after._M_node, __v); + } + else + return _M_insert_unique(__v).first; + } + else + return iterator(static_cast<_Link_type> + (const_cast<_Base_ptr>(__position._M_node))); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_equal_(const_iterator __position, const _Val& __v) + { + if (__position._M_node == _M_end()) + { + if (size() > 0 + && !_M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key(_M_rightmost()))) + return _M_insert_(0, _M_rightmost(), __v); + else + return _M_insert_equal(__v); + } + else if (!_M_impl._M_key_compare(_S_key(__position._M_node), + _KeyOfValue()(__v))) + { + const_iterator __before = __position; + if (__position._M_node == _M_leftmost()) + return _M_insert_(_M_leftmost(), _M_leftmost(), __v); + else if (!_M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key((--__before)._M_node))) + { + if (_S_right(__before._M_node) == 0) + return _M_insert_(0, __before._M_node, __v); + else + return _M_insert_(__position._M_node, + __position._M_node, __v); + } + else + return _M_insert_equal(__v); + } + else + { + const_iterator __after = __position; + if (__position._M_node == _M_rightmost()) + return _M_insert_(0, _M_rightmost(), __v); + else if (!_M_impl._M_key_compare(_S_key((++__after)._M_node), + _KeyOfValue()(__v))) + { + if (_S_right(__position._M_node) == 0) + return _M_insert_(0, __position._M_node, __v); + else + return _M_insert_(__after._M_node, __after._M_node, __v); + } + else + return _M_insert_equal_lower(__v); + } + } + template + template + void + _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: + _M_insert_unique(_II __first, _II __last) + { + for (; __first != __last; ++__first) + _M_insert_unique_(end(), *__first); + } + template + template + void + _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: + _M_insert_equal(_II __first, _II __last) + { + for (; __first != __last; ++__first) + _M_insert_equal_(end(), *__first); + } + template + inline void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(iterator __position) + { + _Link_type __y = + static_cast<_Link_type>(_Rb_tree_rebalance_for_erase + (__position._M_node, + this->_M_impl._M_header)); + _M_destroy_node(__y); + --_M_impl._M_node_count; + } + template + inline void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(const_iterator __position) + { + _Link_type __y = + static_cast<_Link_type>(_Rb_tree_rebalance_for_erase + (const_cast<_Base_ptr>(__position._M_node), + this->_M_impl._M_header)); + _M_destroy_node(__y); + --_M_impl._M_node_count; + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(const _Key& __x) + { + pair __p = equal_range(__x); + const size_type __old_size = size(); + erase(__p.first, __p.second); + return __old_size - size(); + } + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(iterator __first, iterator __last) + { + if (__first == begin() && __last == end()) + clear(); + else + while (__first != __last) + erase(__first++); + } + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(const_iterator __first, const_iterator __last) + { + if (__first == begin() && __last == end()) + clear(); + else + while (__first != __last) + erase(__first++); + } + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(const _Key* __first, const _Key* __last) + { + while (__first != __last) + erase(*__first++); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + find(const _Key& __k) + { + iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k); + return (__j == end() + || _M_impl._M_key_compare(__k, + _S_key(__j._M_node))) ? end() : __j; + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::const_iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + find(const _Key& __k) const + { + const_iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k); + return (__j == end() + || _M_impl._M_key_compare(__k, + _S_key(__j._M_node))) ? end() : __j; + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + count(const _Key& __k) const + { + pair __p = equal_range(__k); + const size_type __n = std::distance(__p.first, __p.second); + return __n; + } + unsigned int + _Rb_tree_black_count(const _Rb_tree_node_base* __node, + const _Rb_tree_node_base* __root); + template + bool + _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::__rb_verify() const + { + if (_M_impl._M_node_count == 0 || begin() == end()) + return _M_impl._M_node_count == 0 && begin() == end() + && this->_M_impl._M_header._M_left == _M_end() + && this->_M_impl._M_header._M_right == _M_end(); + unsigned int __len = _Rb_tree_black_count(_M_leftmost(), _M_root()); + for (const_iterator __it = begin(); __it != end(); ++__it) + { + _Const_Link_type __x = static_cast<_Const_Link_type>(__it._M_node); + _Const_Link_type __L = _S_left(__x); + _Const_Link_type __R = _S_right(__x); + if (__x->_M_color == _S_red) + if ((__L && __L->_M_color == _S_red) + || (__R && __R->_M_color == _S_red)) + return false; + if (__L && _M_impl._M_key_compare(_S_key(__x), _S_key(__L))) + return false; + if (__R && _M_impl._M_key_compare(_S_key(__R), _S_key(__x))) + return false; + if (!__L && !__R && _Rb_tree_black_count(__x, _M_root()) != __len) + return false; + } + if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root())) + return false; + if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root())) + return false; + return true; + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template , + typename _Alloc = std::allocator > > + class map + { + public: + typedef _Key key_type; + typedef _Tp mapped_type; + typedef std::pair value_type; + typedef _Compare key_compare; + typedef _Alloc allocator_type; + private: + typedef typename _Alloc::value_type _Alloc_value_type; + + + + public: + class value_compare + : public std::binary_function + { + friend class map<_Key, _Tp, _Compare, _Alloc>; + protected: + _Compare comp; + value_compare(_Compare __c) + : comp(__c) { } + public: + bool operator()(const value_type& __x, const value_type& __y) const + { return comp(__x.first, __y.first); } + }; + private: + typedef typename _Alloc::template rebind::other + _Pair_alloc_type; + typedef _Rb_tree, + key_compare, _Pair_alloc_type> _Rep_type; + _Rep_type _M_t; + public: + typedef typename _Pair_alloc_type::pointer pointer; + typedef typename _Pair_alloc_type::const_pointer const_pointer; + typedef typename _Pair_alloc_type::reference reference; + typedef typename _Pair_alloc_type::const_reference const_reference; + typedef typename _Rep_type::iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + typedef typename _Rep_type::reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; + map() + : _M_t() { } + explicit + map(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) { } + map(const map& __x) + : _M_t(__x._M_t) { } + template + map(_InputIterator __first, _InputIterator __last) + : _M_t() + { _M_t._M_insert_unique(__first, __last); } + template + map(_InputIterator __first, _InputIterator __last, + const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) + { _M_t._M_insert_unique(__first, __last); } + map& + operator=(const map& __x) + { + _M_t = __x._M_t; + return *this; + } + allocator_type + get_allocator() const + { return _M_t.get_allocator(); } + iterator + begin() + { return _M_t.begin(); } + const_iterator + begin() const + { return _M_t.begin(); } + iterator + end() + { return _M_t.end(); } + const_iterator + end() const + { return _M_t.end(); } + reverse_iterator + rbegin() + { return _M_t.rbegin(); } + const_reverse_iterator + rbegin() const + { return _M_t.rbegin(); } + reverse_iterator + rend() + { return _M_t.rend(); } + const_reverse_iterator + rend() const + { return _M_t.rend(); } + bool + empty() const + { return _M_t.empty(); } + size_type + size() const + { return _M_t.size(); } + size_type + max_size() const + { return _M_t.max_size(); } + mapped_type& + operator[](const key_type& __k) + { + iterator __i = lower_bound(__k); + if (__i == end() || key_comp()(__k, (*__i).first)) + __i = insert(__i, value_type(__k, mapped_type())); + return (*__i).second; + } + mapped_type& + at(const key_type& __k) + { + iterator __i = lower_bound(__k); + if (__i == end() || key_comp()(__k, (*__i).first)) + __throw_out_of_range(("map::at")); + return (*__i).second; + } + const mapped_type& + at(const key_type& __k) const + { + const_iterator __i = lower_bound(__k); + if (__i == end() || key_comp()(__k, (*__i).first)) + __throw_out_of_range(("map::at")); + return (*__i).second; + } + std::pair + insert(const value_type& __x) + { return _M_t._M_insert_unique(__x); } + iterator + insert(iterator __position, const value_type& __x) + { return _M_t._M_insert_unique_(__position, __x); } + template + void + insert(_InputIterator __first, _InputIterator __last) + { _M_t._M_insert_unique(__first, __last); } + void + erase(iterator __position) + { _M_t.erase(__position); } + size_type + erase(const key_type& __x) + { return _M_t.erase(__x); } + void + erase(iterator __first, iterator __last) + { _M_t.erase(__first, __last); } + void + swap(map& __x) + { _M_t.swap(__x._M_t); } + void + clear() + { _M_t.clear(); } + key_compare + key_comp() const + { return _M_t.key_comp(); } + value_compare + value_comp() const + { return value_compare(_M_t.key_comp()); } + iterator + find(const key_type& __x) + { return _M_t.find(__x); } + const_iterator + find(const key_type& __x) const + { return _M_t.find(__x); } + size_type + count(const key_type& __x) const + { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } + iterator + lower_bound(const key_type& __x) + { return _M_t.lower_bound(__x); } + const_iterator + lower_bound(const key_type& __x) const + { return _M_t.lower_bound(__x); } + iterator + upper_bound(const key_type& __x) + { return _M_t.upper_bound(__x); } + const_iterator + upper_bound(const key_type& __x) const + { return _M_t.upper_bound(__x); } + std::pair + equal_range(const key_type& __x) + { return _M_t.equal_range(__x); } + std::pair + equal_range(const key_type& __x) const + { return _M_t.equal_range(__x); } + template + friend bool + operator==(const map<_K1, _T1, _C1, _A1>&, + const map<_K1, _T1, _C1, _A1>&); + template + friend bool + operator<(const map<_K1, _T1, _C1, _A1>&, + const map<_K1, _T1, _C1, _A1>&); + }; + template + inline bool + operator==(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return __x._M_t == __y._M_t; } + template + inline bool + operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return __x._M_t < __y._M_t; } + template + inline bool + operator!=(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return __y < __x; } + template + inline bool + operator<=(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__x < __y); } + template + inline void + swap(map<_Key, _Tp, _Compare, _Alloc>& __x, + map<_Key, _Tp, _Compare, _Alloc>& __y) + { __x.swap(__y); } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template , + typename _Alloc = std::allocator > > + class multimap + { + public: + typedef _Key key_type; + typedef _Tp mapped_type; + typedef std::pair value_type; + typedef _Compare key_compare; + typedef _Alloc allocator_type; + private: + typedef typename _Alloc::value_type _Alloc_value_type; + + + + public: + class value_compare + : public std::binary_function + { + friend class multimap<_Key, _Tp, _Compare, _Alloc>; + protected: + _Compare comp; + value_compare(_Compare __c) + : comp(__c) { } + public: + bool operator()(const value_type& __x, const value_type& __y) const + { return comp(__x.first, __y.first); } + }; + private: + typedef typename _Alloc::template rebind::other + _Pair_alloc_type; + typedef _Rb_tree, + key_compare, _Pair_alloc_type> _Rep_type; + _Rep_type _M_t; + public: + typedef typename _Pair_alloc_type::pointer pointer; + typedef typename _Pair_alloc_type::const_pointer const_pointer; + typedef typename _Pair_alloc_type::reference reference; + typedef typename _Pair_alloc_type::const_reference const_reference; + typedef typename _Rep_type::iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + typedef typename _Rep_type::reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; + multimap() + : _M_t() { } + explicit + multimap(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) { } + multimap(const multimap& __x) + : _M_t(__x._M_t) { } + template + multimap(_InputIterator __first, _InputIterator __last) + : _M_t() + { _M_t._M_insert_equal(__first, __last); } + template + multimap(_InputIterator __first, _InputIterator __last, + const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) + { _M_t._M_insert_equal(__first, __last); } + multimap& + operator=(const multimap& __x) + { + _M_t = __x._M_t; + return *this; + } + allocator_type + get_allocator() const + { return _M_t.get_allocator(); } + iterator + begin() + { return _M_t.begin(); } + const_iterator + begin() const + { return _M_t.begin(); } + iterator + end() + { return _M_t.end(); } + const_iterator + end() const + { return _M_t.end(); } + reverse_iterator + rbegin() + { return _M_t.rbegin(); } + const_reverse_iterator + rbegin() const + { return _M_t.rbegin(); } + reverse_iterator + rend() + { return _M_t.rend(); } + const_reverse_iterator + rend() const + { return _M_t.rend(); } + bool + empty() const + { return _M_t.empty(); } + size_type + size() const + { return _M_t.size(); } + size_type + max_size() const + { return _M_t.max_size(); } + iterator + insert(const value_type& __x) + { return _M_t._M_insert_equal(__x); } + iterator + insert(iterator __position, const value_type& __x) + { return _M_t._M_insert_equal_(__position, __x); } + template + void + insert(_InputIterator __first, _InputIterator __last) + { _M_t._M_insert_equal(__first, __last); } + void + erase(iterator __position) + { _M_t.erase(__position); } + size_type + erase(const key_type& __x) + { return _M_t.erase(__x); } + void + erase(iterator __first, iterator __last) + { _M_t.erase(__first, __last); } + void + swap(multimap& __x) + { _M_t.swap(__x._M_t); } + void + clear() + { _M_t.clear(); } + key_compare + key_comp() const + { return _M_t.key_comp(); } + value_compare + value_comp() const + { return value_compare(_M_t.key_comp()); } + iterator + find(const key_type& __x) + { return _M_t.find(__x); } + const_iterator + find(const key_type& __x) const + { return _M_t.find(__x); } + size_type + count(const key_type& __x) const + { return _M_t.count(__x); } + iterator + lower_bound(const key_type& __x) + { return _M_t.lower_bound(__x); } + const_iterator + lower_bound(const key_type& __x) const + { return _M_t.lower_bound(__x); } + iterator + upper_bound(const key_type& __x) + { return _M_t.upper_bound(__x); } + const_iterator + upper_bound(const key_type& __x) const + { return _M_t.upper_bound(__x); } + std::pair + equal_range(const key_type& __x) + { return _M_t.equal_range(__x); } + std::pair + equal_range(const key_type& __x) const + { return _M_t.equal_range(__x); } + template + friend bool + operator==(const multimap<_K1, _T1, _C1, _A1>&, + const multimap<_K1, _T1, _C1, _A1>&); + template + friend bool + operator<(const multimap<_K1, _T1, _C1, _A1>&, + const multimap<_K1, _T1, _C1, _A1>&); + }; + template + inline bool + operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return __x._M_t == __y._M_t; } + template + inline bool + operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return __x._M_t < __y._M_t; } + template + inline bool + operator!=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return __y < __x; } + template + inline bool + operator<=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__x < __y); } + template + inline void + swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x, + multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { __x.swap(__y); } +} +extern "C" { + struct swig_type_info; +} +namespace Swig { + struct GCItem + { + virtual ~GCItem() {} + virtual int get_own() const + { + return 0; + } + }; + struct GCItem_var + { + GCItem_var(GCItem *item = 0) : _item(item) + { + } + GCItem_var& operator=(GCItem *item) + { + GCItem *tmp = _item; + _item = item; + delete tmp; + return *this; + } + ~GCItem_var() + { + delete _item; + } + GCItem * operator->() const + { + return _item; + } + private: + GCItem *_item; + }; + struct GCItem_Object : GCItem + { + GCItem_Object(int own) : _own(own) + { + } + virtual ~GCItem_Object() + { + } + int get_own() const + { + return _own; + } + private: + int _own; + }; + template + struct GCItem_T : GCItem + { + GCItem_T(Type *ptr) : _ptr(ptr) + { + } + virtual ~GCItem_T() + { + delete _ptr; + } + private: + Type *_ptr; + }; + template + struct GCArray_T : GCItem + { + GCArray_T(Type *ptr) : _ptr(ptr) + { + } + virtual ~GCArray_T() + { + delete[] _ptr; + } + private: + Type *_ptr; + }; + class DirectorException { + protected: + std::string swig_msg; + public: + DirectorException(PyObject *error, const char* hdr ="", const char* msg ="") + : swig_msg(hdr) + { + SWIG_Python_Thread_Block _swig_thread_block; + if (strlen(msg)) { + swig_msg += " "; + swig_msg += msg; + } + if (!PyErr_Occurred()) { + PyErr_SetString(error, getMessage()); + } + _swig_thread_block.end(); + } + const char *getMessage() const + { + return swig_msg.c_str(); + } + static void raise(PyObject *error, const char *msg) + { + throw DirectorException(error, msg); + } + static void raise(const char *msg) + { + raise(PyExc_RuntimeError, msg); + } + }; + class UnknownExceptionHandler + { + static void handler() { + try { + throw; + } catch (DirectorException& e) { + std::cerr << "Swig Director exception caught:" << std::endl + << e.getMessage() << std::endl; + } catch (std::exception& e) { + std::cerr << "std::exception caught: "<< e.what() << std::endl; + } catch (...) { + std::cerr << "Unknown exception caught." << std::endl; + } + std::cerr << std::endl + << "Python interpreter traceback:" << std::endl; + PyErr_Print(); + std::cerr << std::endl; + std::cerr << "This exception was caught by the SWIG unexpected exception handler." << std::endl + << "Try using %feature(\"director:except\") to avoid reaching this point." << std::endl + << std::endl + << "Exception is being re-thrown, program will like abort/terminate." << std::endl; + throw; + } + public: + std::unexpected_handler old; + UnknownExceptionHandler(std::unexpected_handler nh = handler) + { + old = std::set_unexpected(nh); + } + ~UnknownExceptionHandler() + { + std::set_unexpected(old); + } + }; + class DirectorTypeMismatchException : public Swig::DirectorException { + public: + DirectorTypeMismatchException(PyObject *error, const char* msg="") + : Swig::DirectorException(error, "Swig director type mismatch", msg) + { + } + DirectorTypeMismatchException(const char* msg="") + : Swig::DirectorException(PyExc_TypeError, "Swig director type mismatch", msg) + { + } + static void raise(PyObject *error, const char *msg) + { + throw DirectorTypeMismatchException(error, msg); + } + static void raise(const char *msg) + { + throw DirectorTypeMismatchException(msg); + } + }; + class DirectorMethodException : public Swig::DirectorException { + public: + DirectorMethodException(const char* msg = "") + : DirectorException(PyExc_RuntimeError, "Swig director method error.", msg) + { + } + static void raise(const char *msg) + { + throw DirectorMethodException(msg); + } + }; + class DirectorPureVirtualException : public Swig::DirectorException + { + public: + DirectorPureVirtualException(const char* msg = "") + : DirectorException(PyExc_RuntimeError, "Swig director pure virtual method called", msg) + { + } + static void raise(const char *msg) + { + throw DirectorPureVirtualException(msg); + } + }; +typedef void *PyThread_type_lock; +typedef void *PyThread_type_sema; +extern "C" { +void PyThread_init_thread(void); +long PyThread_start_new_thread(void (*)(void *), void *); +void PyThread_exit_thread(void); +void PyThread__PyThread_exit_thread(void); +long PyThread_get_thread_ident(void); +PyThread_type_lock PyThread_allocate_lock(void); +void PyThread_free_lock(PyThread_type_lock); +int PyThread_acquire_lock(PyThread_type_lock, int); +void PyThread_release_lock(PyThread_type_lock); +size_t PyThread_get_stacksize(void); +int PyThread_set_stacksize(size_t); +int PyThread_create_key(void); +void PyThread_delete_key(int); +int PyThread_set_key_value(int, void *); +void * PyThread_get_key_value(int); +void PyThread_delete_key_value(int key); +void PyThread_ReInitTLS(void); +} + class Guard + { + PyThread_type_lock & mutex_; + public: + Guard(PyThread_type_lock & mutex) : mutex_(mutex) + { + PyThread_acquire_lock(mutex_, 1); + } + ~Guard() + { + PyThread_release_lock(mutex_); + } + }; + class Director { + private: + PyObject* swig_self; + mutable bool swig_disown_flag; + void swig_decref() const { + if (swig_disown_flag) { + SWIG_Python_Thread_Block _swig_thread_block; + if ( --((PyObject*)(swig_self))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(swig_self)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(swig_self)))); + _swig_thread_block.end(); + } + } + public: + Director(PyObject* self) : swig_self(self), swig_disown_flag(false) { + swig_incref(); + } + virtual ~Director() { + swig_decref(); + } + PyObject *swig_get_self() const { + return swig_self; + } + void swig_disown() const { + if (!swig_disown_flag) { + swig_disown_flag=true; + swig_incref(); + } + } + void swig_incref() const { + if (swig_disown_flag) { + ( ((PyObject*)(swig_self))->ob_refcnt++); + } + } + virtual bool swig_get_inner(const char* ) const { + return true; + } + virtual void swig_set_inner(const char* , bool ) const { + } + private: + typedef std::map ownership_map; + mutable ownership_map owner; + static PyThread_type_lock swig_mutex_own; + public: + template + void swig_acquire_ownership_array(Type *vptr) const + { + if (vptr) { + Guard _guard(swig_mutex_own); + owner[vptr] = new GCArray_T(vptr); + } + } + template + void swig_acquire_ownership(Type *vptr) const + { + if (vptr) { + Guard _guard(swig_mutex_own); + owner[vptr] = new GCItem_T(vptr); + } + } + void swig_acquire_ownership_obj(void *vptr, int own) const + { + if (vptr && own) { + Guard _guard(swig_mutex_own); + owner[vptr] = new GCItem_Object(own); + } + } + int swig_release_ownership(void *vptr) const + { + int own = 0; + if (vptr) { + Guard _guard(swig_mutex_own); + ownership_map::iterator iter = owner.find(vptr); + if (iter != owner.end()) { + own = iter->second->get_own(); + owner.erase(iter); + } + } + return own; + } + }; + PyThread_type_lock Director::swig_mutex_own = PyThread_allocate_lock(); +} +static swig_type_info *swig_types[82]; +static swig_module_info swig_module = {swig_types, 81, 0, 0, 0, 0}; + +namespace std __attribute__ ((__visibility__ ("default"))) { + class logic_error : public exception + { + string _M_msg; + public: + explicit + logic_error(const string& __arg); + virtual + ~logic_error() throw(); + virtual const char* + what() const throw(); + }; + class domain_error : public logic_error + { + public: + explicit domain_error(const string& __arg); + }; + class invalid_argument : public logic_error + { + public: + explicit invalid_argument(const string& __arg); + }; + class length_error : public logic_error + { + public: + explicit length_error(const string& __arg); + }; + class out_of_range : public logic_error + { + public: + explicit out_of_range(const string& __arg); + }; + class runtime_error : public exception + { + string _M_msg; + public: + explicit + runtime_error(const string& __arg); + virtual + ~runtime_error() throw(); + virtual const char* + what() const throw(); + }; + class range_error : public runtime_error + { + public: + explicit range_error(const string& __arg); + }; + class overflow_error : public runtime_error + { + public: + explicit overflow_error(const string& __arg); + }; + class underflow_error : public runtime_error + { + public: + explicit underflow_error(const string& __arg); + }; +} +namespace swig { + class SwigPtr_PyObject { + protected: + PyObject *_obj; + public: + SwigPtr_PyObject() :_obj(0) + { + } + SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) + { + if ((_obj) == __null) ; else ( ((PyObject*)(_obj))->ob_refcnt++); + } + SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj) + { + if (initial_ref) { + if ((_obj) == __null) ; else ( ((PyObject*)(_obj))->ob_refcnt++); + } + } + SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) + { + if ((item._obj) == __null) ; else ( ((PyObject*)(item._obj))->ob_refcnt++); + if ((_obj) == __null) ; else if ( --((PyObject*)(_obj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(_obj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(_obj)))); + _obj = item._obj; + return *this; + } + ~SwigPtr_PyObject() + { + if ((_obj) == __null) ; else if ( --((PyObject*)(_obj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(_obj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(_obj)))); + } + operator PyObject *() const + { + return _obj; + } + PyObject *operator->() const + { + return _obj; + } + }; +} +namespace swig { + struct SwigVar_PyObject : SwigPtr_PyObject { + SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { } + SwigVar_PyObject & operator = (PyObject* obj) + { + if ((_obj) == __null) ; else if ( --((PyObject*)(_obj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(_obj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(_obj)))); + _obj = obj; + return *this; + } + }; +} +namespace Xapian { +typedef unsigned doccount; +typedef int doccount_diff; +typedef unsigned docid; +typedef double doclength; +typedef int percent; +typedef unsigned termcount; +typedef int termcount_diff; +typedef unsigned termpos; +typedef int termpos_diff; +typedef unsigned timeout; +typedef unsigned valueno; +typedef int valueno_diff; +typedef double weight; +const valueno BAD_VALUENO = static_cast(-1); +} +namespace Xapian { +class ErrorHandler; +class __attribute__((visibility("default"))) Error { + friend class ErrorHandler; + std::string msg; + std::string context; + const char * type; + int my_errno; + mutable std::string error_string; + bool already_handled; + void operator=(const Error &o); + protected: + Error(const std::string &msg_, const std::string &context_, + const char * type_, const char * error_string_); + Error(const std::string &msg_, const std::string &context_, + const char * type_, int errno_) + : msg(msg_), context(context_), type(type_), my_errno(errno_), + error_string(), already_handled(false) { } + public: + const char * get_type() const { return type; } + const std::string & get_msg() const { return msg; } + const std::string & get_context() const { return context; } + const char * get_error_string() const; + std::string get_description() const; +}; +class __attribute__((visibility("default"))) LogicError : public Error { + protected: + LogicError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_) + : Error(msg_, context_, type_, error_string_) {} + LogicError(const std::string &msg_, const std::string &context_, const char * type_, int errno_) + : Error(msg_, context_, type_, errno_) {} +}; +class __attribute__((visibility("default"))) RuntimeError : public Error { + protected: + RuntimeError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_) + : Error(msg_, context_, type_, error_string_) {} + RuntimeError(const std::string &msg_, const std::string &context_, const char * type_, int errno_) + : Error(msg_, context_, type_, errno_) {} +}; +class __attribute__((visibility("default"))) AssertionError : public LogicError { + public: + AssertionError(const std::string &msg_, const std::string &context_, const char * error_string_) + : LogicError(msg_, context_, "AssertionError", error_string_) {} + explicit AssertionError(const std::string &msg_, const std::string &context_ = std::string(), int errno_ = 0) + : LogicError(msg_, context_, "AssertionError", errno_) {} + AssertionError(const std::string &msg_, int errno_) + : LogicError(msg_, std::string(), "AssertionError", errno_) {} + protected: + AssertionError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_) + : LogicError(msg_, context_, type_, error_string_) {} + AssertionError(const std::string &msg_, const std::string &context_, const char * type_, int errno_) + : LogicError(msg_, context_, type_, errno_) {} +}; +class __attribute__((visibility("default"))) InvalidArgumentError : public LogicError { + public: + InvalidArgumentError(const std::string &msg_, const std::string &context_, const char * error_string_) + : LogicError(msg_, context_, "InvalidArgumentError", error_string_) {} + explicit InvalidArgumentError(const std::string &msg_, const std::string &context_ = std::string(), int errno_ = 0) + : LogicError(msg_, context_, "InvalidArgumentError", errno_) {} + InvalidArgumentError(const std::string &msg_, int errno_) + : LogicError(msg_, std::string(), "InvalidArgumentError", errno_) {} + protected: + InvalidArgumentError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_) + : LogicError(msg_, context_, type_, error_string_) {} + InvalidArgumentError(const std::string &msg_, const std::string &context_, const char * type_, int errno_) + : LogicError(msg_, context_, type_, errno_) {} +}; +class __attribute__((visibility("default"))) InvalidOperationError : public LogicError { + public: + InvalidOperationError(const std::string &msg_, const std::string &context_, const char * error_string_) + : LogicError(msg_, context_, "InvalidOperationError", error_string_) {} + explicit InvalidOperationError(const std::string &msg_, const std::string &context_ = std::string(), int errno_ = 0) + : LogicError(msg_, context_, "InvalidOperationError", errno_) {} + InvalidOperationError(const std::string &msg_, int errno_) + : LogicError(msg_, std::string(), "InvalidOperationError", errno_) {} + protected: + InvalidOperationError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_) + : LogicError(msg_, context_, type_, error_string_) {} + InvalidOperationError(const std::string &msg_, const std::string &context_, const char * type_, int errno_) + : LogicError(msg_, context_, type_, errno_) {} +}; +class __attribute__((visibility("default"))) UnimplementedError : public LogicError { + public: + UnimplementedError(const std::string &msg_, const std::string &context_, const char * error_string_) + : LogicError(msg_, context_, "UnimplementedError", error_string_) {} + explicit UnimplementedError(const std::string &msg_, const std::string &context_ = std::string(), int errno_ = 0) + : LogicError(msg_, context_, "UnimplementedError", errno_) {} + UnimplementedError(const std::string &msg_, int errno_) + : LogicError(msg_, std::string(), "UnimplementedError", errno_) {} + protected: + UnimplementedError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_) + : LogicError(msg_, context_, type_, error_string_) {} + UnimplementedError(const std::string &msg_, const std::string &context_, const char * type_, int errno_) + : LogicError(msg_, context_, type_, errno_) {} +}; +class __attribute__((visibility("default"))) DatabaseError : public RuntimeError { + public: + DatabaseError(const std::string &msg_, const std::string &context_, const char * error_string_) + : RuntimeError(msg_, context_, "DatabaseError", error_string_) {} + explicit DatabaseError(const std::string &msg_, const std::string &context_ = std::string(), int errno_ = 0) + : RuntimeError(msg_, context_, "DatabaseError", errno_) {} + DatabaseError(const std::string &msg_, int errno_) + : RuntimeError(msg_, std::string(), "DatabaseError", errno_) {} + protected: + DatabaseError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_) + : RuntimeError(msg_, context_, type_, error_string_) {} + DatabaseError(const std::string &msg_, const std::string &context_, const char * type_, int errno_) + : RuntimeError(msg_, context_, type_, errno_) {} +}; +class __attribute__((visibility("default"))) DatabaseCorruptError : public DatabaseError { + public: + DatabaseCorruptError(const std::string &msg_, const std::string &context_, const char * error_string_) + : DatabaseError(msg_, context_, "DatabaseCorruptError", error_string_) {} + explicit DatabaseCorruptError(const std::string &msg_, const std::string &context_ = std::string(), int errno_ = 0) + : DatabaseError(msg_, context_, "DatabaseCorruptError", errno_) {} + DatabaseCorruptError(const std::string &msg_, int errno_) + : DatabaseError(msg_, std::string(), "DatabaseCorruptError", errno_) {} + protected: + DatabaseCorruptError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_) + : DatabaseError(msg_, context_, type_, error_string_) {} + DatabaseCorruptError(const std::string &msg_, const std::string &context_, const char * type_, int errno_) + : DatabaseError(msg_, context_, type_, errno_) {} +}; +class __attribute__((visibility("default"))) DatabaseCreateError : public DatabaseError { + public: + DatabaseCreateError(const std::string &msg_, const std::string &context_, const char * error_string_) + : DatabaseError(msg_, context_, "DatabaseCreateError", error_string_) {} + explicit DatabaseCreateError(const std::string &msg_, const std::string &context_ = std::string(), int errno_ = 0) + : DatabaseError(msg_, context_, "DatabaseCreateError", errno_) {} + DatabaseCreateError(const std::string &msg_, int errno_) + : DatabaseError(msg_, std::string(), "DatabaseCreateError", errno_) {} + protected: + DatabaseCreateError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_) + : DatabaseError(msg_, context_, type_, error_string_) {} + DatabaseCreateError(const std::string &msg_, const std::string &context_, const char * type_, int errno_) + : DatabaseError(msg_, context_, type_, errno_) {} +}; +class __attribute__((visibility("default"))) DatabaseLockError : public DatabaseError { + public: + DatabaseLockError(const std::string &msg_, const std::string &context_, const char * error_string_) + : DatabaseError(msg_, context_, "DatabaseLockError", error_string_) {} + explicit DatabaseLockError(const std::string &msg_, const std::string &context_ = std::string(), int errno_ = 0) + : DatabaseError(msg_, context_, "DatabaseLockError", errno_) {} + DatabaseLockError(const std::string &msg_, int errno_) + : DatabaseError(msg_, std::string(), "DatabaseLockError", errno_) {} + protected: + DatabaseLockError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_) + : DatabaseError(msg_, context_, type_, error_string_) {} + DatabaseLockError(const std::string &msg_, const std::string &context_, const char * type_, int errno_) + : DatabaseError(msg_, context_, type_, errno_) {} +}; +class __attribute__((visibility("default"))) DatabaseModifiedError : public DatabaseError { + public: + DatabaseModifiedError(const std::string &msg_, const std::string &context_, const char * error_string_) + : DatabaseError(msg_, context_, "DatabaseModifiedError", error_string_) {} + explicit DatabaseModifiedError(const std::string &msg_, const std::string &context_ = std::string(), int errno_ = 0) + : DatabaseError(msg_, context_, "DatabaseModifiedError", errno_) {} + DatabaseModifiedError(const std::string &msg_, int errno_) + : DatabaseError(msg_, std::string(), "DatabaseModifiedError", errno_) {} + protected: + DatabaseModifiedError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_) + : DatabaseError(msg_, context_, type_, error_string_) {} + DatabaseModifiedError(const std::string &msg_, const std::string &context_, const char * type_, int errno_) + : DatabaseError(msg_, context_, type_, errno_) {} +}; +class __attribute__((visibility("default"))) DatabaseOpeningError : public DatabaseError { + public: + DatabaseOpeningError(const std::string &msg_, const std::string &context_, const char * error_string_) + : DatabaseError(msg_, context_, "DatabaseOpeningError", error_string_) {} + explicit DatabaseOpeningError(const std::string &msg_, const std::string &context_ = std::string(), int errno_ = 0) + : DatabaseError(msg_, context_, "DatabaseOpeningError", errno_) {} + DatabaseOpeningError(const std::string &msg_, int errno_) + : DatabaseError(msg_, std::string(), "DatabaseOpeningError", errno_) {} + protected: + DatabaseOpeningError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_) + : DatabaseError(msg_, context_, type_, error_string_) {} + DatabaseOpeningError(const std::string &msg_, const std::string &context_, const char * type_, int errno_) + : DatabaseError(msg_, context_, type_, errno_) {} +}; +class __attribute__((visibility("default"))) DatabaseVersionError : public DatabaseOpeningError { + public: + DatabaseVersionError(const std::string &msg_, const std::string &context_, const char * error_string_) + : DatabaseOpeningError(msg_, context_, "DatabaseVersionError", error_string_) {} + explicit DatabaseVersionError(const std::string &msg_, const std::string &context_ = std::string(), int errno_ = 0) + : DatabaseOpeningError(msg_, context_, "DatabaseVersionError", errno_) {} + DatabaseVersionError(const std::string &msg_, int errno_) + : DatabaseOpeningError(msg_, std::string(), "DatabaseVersionError", errno_) {} + protected: + DatabaseVersionError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_) + : DatabaseOpeningError(msg_, context_, type_, error_string_) {} + DatabaseVersionError(const std::string &msg_, const std::string &context_, const char * type_, int errno_) + : DatabaseOpeningError(msg_, context_, type_, errno_) {} +}; +class __attribute__((visibility("default"))) DocNotFoundError : public RuntimeError { + public: + DocNotFoundError(const std::string &msg_, const std::string &context_, const char * error_string_) + : RuntimeError(msg_, context_, "DocNotFoundError", error_string_) {} + explicit DocNotFoundError(const std::string &msg_, const std::string &context_ = std::string(), int errno_ = 0) + : RuntimeError(msg_, context_, "DocNotFoundError", errno_) {} + DocNotFoundError(const std::string &msg_, int errno_) + : RuntimeError(msg_, std::string(), "DocNotFoundError", errno_) {} + protected: + DocNotFoundError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_) + : RuntimeError(msg_, context_, type_, error_string_) {} + DocNotFoundError(const std::string &msg_, const std::string &context_, const char * type_, int errno_) + : RuntimeError(msg_, context_, type_, errno_) {} +}; +class __attribute__((visibility("default"))) FeatureUnavailableError : public RuntimeError { + public: + FeatureUnavailableError(const std::string &msg_, const std::string &context_, const char * error_string_) + : RuntimeError(msg_, context_, "FeatureUnavailableError", error_string_) {} + explicit FeatureUnavailableError(const std::string &msg_, const std::string &context_ = std::string(), int errno_ = 0) + : RuntimeError(msg_, context_, "FeatureUnavailableError", errno_) {} + FeatureUnavailableError(const std::string &msg_, int errno_) + : RuntimeError(msg_, std::string(), "FeatureUnavailableError", errno_) {} + protected: + FeatureUnavailableError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_) + : RuntimeError(msg_, context_, type_, error_string_) {} + FeatureUnavailableError(const std::string &msg_, const std::string &context_, const char * type_, int errno_) + : RuntimeError(msg_, context_, type_, errno_) {} +}; +class __attribute__((visibility("default"))) InternalError : public RuntimeError { + public: + InternalError(const std::string &msg_, const std::string &context_, const char * error_string_) + : RuntimeError(msg_, context_, "InternalError", error_string_) {} + explicit InternalError(const std::string &msg_, const std::string &context_ = std::string(), int errno_ = 0) + : RuntimeError(msg_, context_, "InternalError", errno_) {} + InternalError(const std::string &msg_, int errno_) + : RuntimeError(msg_, std::string(), "InternalError", errno_) {} + protected: + InternalError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_) + : RuntimeError(msg_, context_, type_, error_string_) {} + InternalError(const std::string &msg_, const std::string &context_, const char * type_, int errno_) + : RuntimeError(msg_, context_, type_, errno_) {} +}; +class __attribute__((visibility("default"))) NetworkError : public RuntimeError { + public: + NetworkError(const std::string &msg_, const std::string &context_, const char * error_string_) + : RuntimeError(msg_, context_, "NetworkError", error_string_) {} + explicit NetworkError(const std::string &msg_, const std::string &context_ = std::string(), int errno_ = 0) + : RuntimeError(msg_, context_, "NetworkError", errno_) {} + NetworkError(const std::string &msg_, int errno_) + : RuntimeError(msg_, std::string(), "NetworkError", errno_) {} + protected: + NetworkError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_) + : RuntimeError(msg_, context_, type_, error_string_) {} + NetworkError(const std::string &msg_, const std::string &context_, const char * type_, int errno_) + : RuntimeError(msg_, context_, type_, errno_) {} +}; +class __attribute__((visibility("default"))) NetworkTimeoutError : public NetworkError { + public: + NetworkTimeoutError(const std::string &msg_, const std::string &context_, const char * error_string_) + : NetworkError(msg_, context_, "NetworkTimeoutError", error_string_) {} + explicit NetworkTimeoutError(const std::string &msg_, const std::string &context_ = std::string(), int errno_ = 0) + : NetworkError(msg_, context_, "NetworkTimeoutError", errno_) {} + NetworkTimeoutError(const std::string &msg_, int errno_) + : NetworkError(msg_, std::string(), "NetworkTimeoutError", errno_) {} + protected: + NetworkTimeoutError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_) + : NetworkError(msg_, context_, type_, error_string_) {} + NetworkTimeoutError(const std::string &msg_, const std::string &context_, const char * type_, int errno_) + : NetworkError(msg_, context_, type_, errno_) {} +}; +class __attribute__((visibility("default"))) QueryParserError : public RuntimeError { + public: + QueryParserError(const std::string &msg_, const std::string &context_, const char * error_string_) + : RuntimeError(msg_, context_, "QueryParserError", error_string_) {} + explicit QueryParserError(const std::string &msg_, const std::string &context_ = std::string(), int errno_ = 0) + : RuntimeError(msg_, context_, "QueryParserError", errno_) {} + QueryParserError(const std::string &msg_, int errno_) + : RuntimeError(msg_, std::string(), "QueryParserError", errno_) {} + protected: + QueryParserError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_) + : RuntimeError(msg_, context_, type_, error_string_) {} + QueryParserError(const std::string &msg_, const std::string &context_, const char * type_, int errno_) + : RuntimeError(msg_, context_, type_, errno_) {} +}; +class __attribute__((visibility("default"))) SerialisationError : public RuntimeError { + public: + SerialisationError(const std::string &msg_, const std::string &context_, const char * error_string_) + : RuntimeError(msg_, context_, "SerialisationError", error_string_) {} + explicit SerialisationError(const std::string &msg_, const std::string &context_ = std::string(), int errno_ = 0) + : RuntimeError(msg_, context_, "SerialisationError", errno_) {} + SerialisationError(const std::string &msg_, int errno_) + : RuntimeError(msg_, std::string(), "SerialisationError", errno_) {} + protected: + SerialisationError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_) + : RuntimeError(msg_, context_, type_, error_string_) {} + SerialisationError(const std::string &msg_, const std::string &context_, const char * type_, int errno_) + : RuntimeError(msg_, context_, type_, errno_) {} +}; +class __attribute__((visibility("default"))) RangeError : public RuntimeError { + public: + RangeError(const std::string &msg_, const std::string &context_, const char * error_string_) + : RuntimeError(msg_, context_, "RangeError", error_string_) {} + explicit RangeError(const std::string &msg_, const std::string &context_ = std::string(), int errno_ = 0) + : RuntimeError(msg_, context_, "RangeError", errno_) {} + RangeError(const std::string &msg_, int errno_) + : RuntimeError(msg_, std::string(), "RangeError", errno_) {} + protected: + RangeError(const std::string &msg_, const std::string &context_, const char * type_, const char * error_string_) + : RuntimeError(msg_, context_, type_, error_string_) {} + RangeError(const std::string &msg_, const std::string &context_, const char * type_, int errno_) + : RuntimeError(msg_, context_, type_, errno_) {} +}; +} +namespace Xapian { +class Error; +class __attribute__((visibility("default"))) ErrorHandler { + void operator=(const ErrorHandler &); + ErrorHandler(const Xapian::ErrorHandler &); + virtual bool handle_error(Xapian::Error &error) = 0; + public: + ErrorHandler() {} + virtual ~ErrorHandler(); + void operator()(Xapian::Error &error); +}; +} +namespace Xapian { +namespace Internal { +class RefCntBase { + protected: + RefCntBase(const RefCntBase &) : ref_count(0) { } + public: + RefCntBase() : ref_count(0) { } + typedef unsigned int ref_count_t; + mutable ref_count_t ref_count; +}; +template +class RefCntPtr { + private: + T *dest; + public: + T *operator->() const; + T &operator*() const; + T *get() const; + RefCntPtr(T *dest_); + RefCntPtr(); + RefCntPtr(const RefCntPtr &other); + void operator=(const RefCntPtr &other); + void operator=(T *dest_); + ~RefCntPtr(); + template + RefCntPtr(const RefCntPtr &other); +}; +template +inline RefCntPtr::RefCntPtr(T *dest_) : dest(dest_) +{ + if (dest) ++dest->ref_count; +} +template +inline RefCntPtr::RefCntPtr() : dest(0) +{ +} +template +inline RefCntPtr::RefCntPtr(const RefCntPtr &other) : dest(other.dest) +{ + if (dest) ++dest->ref_count; +} +template +inline void RefCntPtr::operator=(const RefCntPtr &other) { + operator=(other.dest); +} +template +inline void RefCntPtr::operator=(T *dest_) { + if (dest == dest_) return; + T *old_dest = dest; + dest = dest_; + if (dest) ++dest->ref_count; + if (old_dest && --old_dest->ref_count == 0) delete old_dest; +} +template +inline RefCntPtr::~RefCntPtr() +{ + if (dest && --dest->ref_count == 0) { + T * condemned = dest; + dest = 0; + delete condemned; + } +} +template +template +inline +RefCntPtr::RefCntPtr(const RefCntPtr &other) + : dest(other.get()) +{ + if (dest) ++dest->ref_count; +} +template +inline T *RefCntPtr::operator->() const +{ + return dest; +} +template +inline T &RefCntPtr::operator*() const +{ + return *dest; +} +template +inline T *RefCntPtr::get() const +{ + return dest; +} +} +} + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + template, typename _Dist = ptrdiff_t> + class istream_iterator + : public iterator + { + public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_istream<_CharT, _Traits> istream_type; + private: + istream_type* _M_stream; + _Tp _M_value; + bool _M_ok; + public: + istream_iterator() + : _M_stream(0), _M_value(), _M_ok(false) {} + istream_iterator(istream_type& __s) + : _M_stream(&__s) + { _M_read(); } + istream_iterator(const istream_iterator& __obj) + : _M_stream(__obj._M_stream), _M_value(__obj._M_value), + _M_ok(__obj._M_ok) + { } + const _Tp& + operator*() const + { + ; + return _M_value; + } + const _Tp* + operator->() const { return &(operator*()); } + istream_iterator& + operator++() + { + ; + _M_read(); + return *this; + } + istream_iterator + operator++(int) + { + ; + istream_iterator __tmp = *this; + _M_read(); + return __tmp; + } + bool + _M_equal(const istream_iterator& __x) const + { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); } + private: + void + _M_read() + { + _M_ok = (_M_stream && *_M_stream) ? true : false; + if (_M_ok) + { + *_M_stream >> _M_value; + _M_ok = *_M_stream ? true : false; + } + } + }; + template + inline bool + operator==(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, + const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) + { return __x._M_equal(__y); } + template + inline bool + operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, + const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) + { return !__x._M_equal(__y); } + template > + class ostream_iterator + : public iterator + { + public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_ostream<_CharT, _Traits> ostream_type; + private: + ostream_type* _M_stream; + const _CharT* _M_string; + public: + ostream_iterator(ostream_type& __s) : _M_stream(&__s), _M_string(0) {} + ostream_iterator(ostream_type& __s, const _CharT* __c) + : _M_stream(&__s), _M_string(__c) { } + ostream_iterator(const ostream_iterator& __obj) + : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { } + ostream_iterator& + operator=(const _Tp& __value) + { + ; + *_M_stream << __value; + if (_M_string) *_M_stream << _M_string; + return *this; + } + ostream_iterator& + operator*() + { return *this; } + ostream_iterator& + operator++() + { return *this; } + ostream_iterator& + operator++(int) + { return *this; } + }; +} +namespace Xapian { +template +class DerefWrapper_ { + void operator=(const DerefWrapper_ &); + T res; + public: + explicit DerefWrapper_(const T &res_) : res(res_) { } + const T & operator*() const { return res; } +}; +} +namespace Xapian { +class Database; +class PostingIterator; +class TermIterator; +class __attribute__((visibility("default"))) PositionIterator { + private: + friend class PostingIterator; + friend class TermIterator; + friend class Database; + public: + class Internal; + Xapian::Internal::RefCntPtr internal; + friend bool operator==(const PositionIterator &a, const PositionIterator &b); + explicit PositionIterator(Internal *internal_); + PositionIterator(); + ~PositionIterator(); + PositionIterator(const PositionIterator &o); + void operator=(const PositionIterator &o); + Xapian::termpos operator *() const; + PositionIterator & operator++(); + DerefWrapper_ operator++(int) { + Xapian::termpos tmp = **this; + operator++(); + return DerefWrapper_(tmp); + } + void skip_to(Xapian::termpos pos); + std::string get_description() const; + typedef std::input_iterator_tag iterator_category; + typedef Xapian::termpos value_type; + typedef Xapian::termpos_diff difference_type; + typedef Xapian::termpos * pointer; + typedef Xapian::termpos & reference; +}; +inline bool +operator==(const PositionIterator &a, const PositionIterator &b) +{ + return (a.internal.get() == b.internal.get()); +} +inline bool +operator!=(const PositionIterator &a, const PositionIterator &b) +{ + return !(a == b); +} +} +namespace Xapian { +class Database; +class __attribute__((visibility("default"))) TermIterator { + public: + class Internal; + Xapian::Internal::RefCntPtr internal; + explicit TermIterator(Internal *internal_); + TermIterator(); + ~TermIterator(); + TermIterator(const TermIterator &other); + void operator=(const TermIterator &other); + std::string operator *() const; + TermIterator & operator++(); + DerefWrapper_ operator++(int) { + const std::string & term(**this); + operator++(); + return DerefWrapper_(term); + } + void skip_to(const std::string & tname); + Xapian::termcount get_wdf() const; + Xapian::doccount get_termfreq() const; + Xapian::termcount positionlist_count() const; + PositionIterator positionlist_begin() const; + PositionIterator positionlist_end() const { + return PositionIterator(__null); + } + std::string get_description() const; + typedef std::input_iterator_tag iterator_category; + typedef std::string value_type; + typedef Xapian::termcount_diff difference_type; + typedef std::string * pointer; + typedef std::string & reference; +}; +inline bool +operator==(const TermIterator &a, const TermIterator &b) +{ + return (a.internal.get() == b.internal.get()); +} +inline bool +operator!=(const TermIterator &a, const TermIterator &b) +{ + return !(a == b); +} +} +namespace Xapian { +class ValueIteratorEnd_ { }; +class __attribute__((visibility("default"))) ValueIterator { + public: + class Internal; + Xapian::Internal::RefCntPtr internal; + explicit ValueIterator(Internal *internal_); + ValueIterator(const ValueIterator & o); + ValueIterator(const ValueIteratorEnd_ &); + ValueIterator & operator=(const ValueIterator & o); + ValueIterator & operator=(const ValueIteratorEnd_ &); + ValueIterator(); + ~ValueIterator(); + std::string operator*() const; + ValueIterator & operator++(); + DerefWrapper_ operator++(int) { + const std::string & value(**this); + operator++(); + return DerefWrapper_(value); + } + Xapian::docid get_docid() const; + Xapian::valueno get_valueno() const; + void skip_to(Xapian::docid docid_or_slot); + bool check(Xapian::docid docid); + std::string get_description() const; + typedef std::input_iterator_tag iterator_category; + typedef std::string value_type; + typedef Xapian::doccount_diff difference_type; + typedef std::string * pointer; + typedef std::string & reference; +}; +inline bool +operator==(const ValueIterator &a, const ValueIterator &b) +{ + return a.internal.get() == b.internal.get(); +} +inline bool +operator==(const ValueIterator &a, const ValueIteratorEnd_ &) +{ + return a.internal.get() == __null; +} +inline bool +operator==(const ValueIteratorEnd_ &a, const ValueIterator &b) +{ + return b == a; +} +inline bool +operator==(const ValueIteratorEnd_ &, const ValueIteratorEnd_ &) +{ + return true; +} +inline bool +operator!=(const ValueIterator &a, const ValueIterator &b) +{ + return !(a == b); +} +inline bool +operator!=(const ValueIterator &a, const ValueIteratorEnd_ &b) +{ + return !(a == b); +} +inline bool +operator!=(const ValueIteratorEnd_ &a, const ValueIterator &b) +{ + return !(a == b); +} +inline bool +operator!=(const ValueIteratorEnd_ &a, const ValueIteratorEnd_ &b) +{ + return !(a == b); +} +} +namespace Xapian { +class __attribute__((visibility("default"))) Document { + public: + class Internal; + Xapian::Internal::RefCntPtr internal; + explicit Document(Internal *internal_); + Document(const Document &other); + void operator=(const Document &other); + Document(); + ~Document(); + std::string get_value(Xapian::valueno valueno) const; + void add_value(Xapian::valueno valueno, const std::string &value); + void remove_value(Xapian::valueno valueno); + void clear_values(); + std::string get_data() const; + void set_data(const std::string &data); + void add_posting(const std::string & tname, + Xapian::termpos tpos, + Xapian::termcount wdfinc = 1); + void add_term(const std::string & tname, Xapian::termcount wdfinc = 1); + void add_boolean_term(const std::string & term) { add_term(term, 0); } + void remove_posting(const std::string & tname, + Xapian::termpos tpos, + Xapian::termcount wdfdec = 1); + void remove_term(const std::string & tname); + void clear_terms(); + Xapian::termcount termlist_count() const; + TermIterator termlist_begin() const; + TermIterator termlist_end() const { + return TermIterator(__null); + } + Xapian::termcount values_count() const; + ValueIterator values_begin() const; + ValueIteratorEnd_ values_end() const { + return ValueIteratorEnd_(); + } + docid get_docid() const; + std::string serialise() const; + static Document unserialise(const std::string &s); + std::string get_description() const; +}; +} +namespace Xapian { +class Database; +class __attribute__((visibility("default"))) PostingIterator { + public: + class Internal; + Xapian::Internal::RefCntPtr internal; + private: + friend class Database; + explicit PostingIterator(Internal *internal_); + public: + friend bool operator==(const PostingIterator &a, + const PostingIterator &b); + PostingIterator(); + ~PostingIterator(); + PostingIterator(const PostingIterator &other); + void operator=(const PostingIterator &other); + PostingIterator & operator++(); + DerefWrapper_ operator++(int) { + Xapian::docid tmp = **this; + operator++(); + return DerefWrapper_(tmp); + } + void skip_to(Xapian::docid did); + Xapian::docid operator *() const; + Xapian::termcount get_doclength() const; + Xapian::termcount get_wdf() const; + PositionIterator positionlist_begin() const; + PositionIterator positionlist_end() const { + return PositionIterator(__null); + } + std::string get_description() const; + typedef std::input_iterator_tag iterator_category; + typedef Xapian::docid value_type; + typedef Xapian::doccount_diff difference_type; + typedef Xapian::docid * pointer; + typedef Xapian::docid & reference; +}; +inline bool operator==(const PostingIterator &a, const PostingIterator &b) +{ + return (a.internal.get() == b.internal.get()); +} +inline bool operator!=(const PostingIterator &a, const PostingIterator &b) +{ + return !(a == b); +} +} +namespace Xapian { +class __attribute__((visibility("default"))) Database { + public: + class Internal; + std::vector > internal; + Document::Internal * get_document_lazily(Xapian::docid did) const; + void add_database(const Database & database); + Database(); + explicit Database(const std::string &path); + explicit Database(Internal *internal); + virtual ~Database(); + Database(const Database &other); + void operator=(const Database &other); + void reopen(); + virtual void close(); + virtual std::string get_description() const; + PostingIterator postlist_begin(const std::string &tname) const; + PostingIterator postlist_end(const std::string &) const { + return PostingIterator(__null); + } + TermIterator termlist_begin(Xapian::docid did) const; + TermIterator termlist_end(Xapian::docid) const { + return TermIterator(__null); + } + bool has_positions() const; + PositionIterator positionlist_begin(Xapian::docid did, const std::string &tname) const; + PositionIterator positionlist_end(Xapian::docid, const std::string &) const { + return PositionIterator(__null); + } + TermIterator allterms_begin() const; + TermIterator allterms_end() const { + return TermIterator(__null); + } + TermIterator allterms_begin(const std::string & prefix) const; + TermIterator allterms_end(const std::string &) const { + return TermIterator(__null); + } + Xapian::doccount get_doccount() const; + Xapian::docid get_lastdocid() const; + Xapian::doclength get_avlength() const; + Xapian::doccount get_termfreq(const std::string & tname) const; + bool term_exists(const std::string & tname) const; + Xapian::termcount get_collection_freq(const std::string & tname) const; + Xapian::doccount get_value_freq(Xapian::valueno valno) const; + std::string get_value_lower_bound(Xapian::valueno valno) const; + std::string get_value_upper_bound(Xapian::valueno valno) const; + Xapian::termcount get_doclength_lower_bound() const; + Xapian::termcount get_doclength_upper_bound() const; + Xapian::termcount get_wdf_upper_bound(const std::string & term) const; + ValueIterator valuestream_begin(Xapian::valueno slot) const; + ValueIteratorEnd_ valuestream_end(Xapian::valueno) const { + return ValueIteratorEnd_(); + } + Xapian::termcount get_doclength(Xapian::docid did) const; + void keep_alive(); + Xapian::Document get_document(Xapian::docid did) const; + std::string get_spelling_suggestion(const std::string &word, + unsigned max_edit_distance = 2) const; + Xapian::TermIterator spellings_begin() const; + Xapian::TermIterator spellings_end() const { + return Xapian::TermIterator(__null); + } + Xapian::TermIterator synonyms_begin(const std::string &term) const; + Xapian::TermIterator synonyms_end(const std::string &) const { + return Xapian::TermIterator(__null); + } + Xapian::TermIterator synonym_keys_begin(const std::string &prefix = std::string()) const; + Xapian::TermIterator synonym_keys_end(const std::string & = std::string()) const { + return Xapian::TermIterator(__null); + } + std::string get_metadata(const std::string & key) const; + Xapian::TermIterator metadata_keys_begin(const std::string &prefix = std::string()) const; + Xapian::TermIterator metadata_keys_end(const std::string & = std::string()) const { + return Xapian::TermIterator(__null); + } + std::string get_uuid() const; +}; +class __attribute__((visibility("default"))) WritableDatabase : public Database { + public: + virtual ~WritableDatabase(); + WritableDatabase(); + WritableDatabase(const std::string &path, int action); + explicit WritableDatabase(Database::Internal *internal); + WritableDatabase(const WritableDatabase &other); + void operator=(const WritableDatabase &other); + void commit(); + void flush() { commit(); } + void begin_transaction(bool flushed=true); + void commit_transaction(); + void cancel_transaction(); + Xapian::docid add_document(const Xapian::Document & document); + void delete_document(Xapian::docid did); + void delete_document(const std::string & unique_term); + void replace_document(Xapian::docid did, + const Xapian::Document & document); + Xapian::docid replace_document(const std::string & unique_term, + const Xapian::Document & document); + void add_spelling(const std::string & word, + Xapian::termcount freqinc = 1) const; + void remove_spelling(const std::string & word, + Xapian::termcount freqdec = 1) const; + void add_synonym(const std::string & term, + const std::string & synonym) const; + void remove_synonym(const std::string & term, + const std::string & synonym) const; + void clear_synonyms(const std::string & term) const; + void set_metadata(const std::string & key, const std::string & value); + std::string get_description() const; +}; +const int DB_CREATE_OR_OPEN = 1; +const int DB_CREATE = 2; +const int DB_CREATE_OR_OVERWRITE = 3; +const int DB_OPEN = 4; +} +namespace Xapian { +class Database; +class WritableDatabase; +namespace Auto { +__attribute__((visibility("default"))) +Database open_stub(const std::string &file); +__attribute__((visibility("default"))) +WritableDatabase open_stub(const std::string &file, int action); +} +namespace InMemory { +__attribute__((visibility("default"))) +WritableDatabase open(); +} +namespace Brass { +__attribute__((visibility("default"))) +Database open(const std::string &dir); +__attribute__((visibility("default"))) +WritableDatabase +open(const std::string &dir, int action, int block_size = 8192); +} +namespace Chert { +__attribute__((visibility("default"))) +Database open(const std::string &dir); +__attribute__((visibility("default"))) +WritableDatabase +open(const std::string &dir, int action, int block_size = 8192); +} +namespace Flint { +__attribute__((visibility("default"))) +Database open(const std::string &dir); +__attribute__((visibility("default"))) +WritableDatabase +open(const std::string &dir, int action, int block_size = 8192); +} +namespace Remote { +__attribute__((visibility("default"))) +Database open(const std::string &host, unsigned int port, Xapian::timeout timeout = 10000, Xapian::timeout connect_timeout = 10000); +__attribute__((visibility("default"))) +WritableDatabase open_writable(const std::string &host, unsigned int port, Xapian::timeout timeout = 0, Xapian::timeout connect_timeout = 10000); +__attribute__((visibility("default"))) +Database open(const std::string &program, const std::string &args, Xapian::timeout timeout = 10000); +__attribute__((visibility("default"))) +WritableDatabase open_writable(const std::string &program, const std::string &args, Xapian::timeout timeout = 0); +} +} +namespace Xapian { +class __attribute__((visibility("default"))) Utf8Iterator { + const unsigned char *p; + const unsigned char *end; + mutable unsigned seqlen; + void calculate_sequence_length() const; + unsigned get_char() const; + Utf8Iterator(const unsigned char *p_, const unsigned char *end_, unsigned seqlen_) + : p(p_), end(end_), seqlen(seqlen_) { } + public: + const char * raw() const { + return reinterpret_cast(p ? p : end); + } + size_t left() const { return p ? end - p : 0; } + void assign(const char *p_, size_t len) { + if (len) { + p = reinterpret_cast(p_); + end = p + len; + seqlen = 0; + } else { + p = __null; + } + } + void assign(const std::string &s) { assign(s.data(), s.size()); } + explicit Utf8Iterator(const char *p_); + Utf8Iterator(const char *p_, size_t len) { assign(p_, len); } + Utf8Iterator(const std::string &s) { assign(s.data(), s.size()); } + Utf8Iterator() : p(__null), end(0), seqlen(0) { } + unsigned operator*() const; + Utf8Iterator operator++(int) { + if (seqlen == 0) calculate_sequence_length(); + const unsigned char *old_p = p; + unsigned old_seqlen = seqlen; + p += seqlen; + if (p == end) p = __null; + seqlen = 0; + return Utf8Iterator(old_p, end, old_seqlen); + } + Utf8Iterator & operator++() { + if (seqlen == 0) calculate_sequence_length(); + p += seqlen; + if (p == end) p = __null; + seqlen = 0; + return *this; + } + bool operator==(const Utf8Iterator &other) const { return p == other.p; } + bool operator!=(const Utf8Iterator &other) const { return p != other.p; } + typedef std::input_iterator_tag iterator_category; + typedef unsigned value_type; + typedef size_t difference_type; + typedef const unsigned * pointer; + typedef const unsigned & reference; +}; +namespace Unicode { +typedef enum { + UNASSIGNED, + UPPERCASE_LETTER, + LOWERCASE_LETTER, + TITLECASE_LETTER, + MODIFIER_LETTER, + OTHER_LETTER, + NON_SPACING_MARK, + ENCLOSING_MARK, + COMBINING_SPACING_MARK, + DECIMAL_DIGIT_NUMBER, + LETTER_NUMBER, + OTHER_NUMBER, + SPACE_SEPARATOR, + LINE_SEPARATOR, + PARAGRAPH_SEPARATOR, + CONTROL, + FORMAT, + PRIVATE_USE, + SURROGATE, + CONNECTOR_PUNCTUATION, + DASH_PUNCTUATION, + OPEN_PUNCTUATION, + CLOSE_PUNCTUATION, + INITIAL_QUOTE_PUNCTUATION, + FINAL_QUOTE_PUNCTUATION, + OTHER_PUNCTUATION, + MATH_SYMBOL, + CURRENCY_SYMBOL, + MODIFIER_SYMBOL, + OTHER_SYMBOL +} category; +namespace Internal { + __attribute__((visibility("default"))) + int get_character_info(unsigned ch); + inline int get_case_type(int info) { return ((info & 0xe0) >> 5); } + inline category get_category(int info) { return static_cast(info & 0x1f); } + inline int get_delta(int info) { + return (info >= 0) ? (info >> 15) : (~(~info >> 15)); + } +} +__attribute__((visibility("default"))) +unsigned nonascii_to_utf8(unsigned ch, char * buf); +inline unsigned to_utf8(unsigned ch, char *buf) { + if (ch < 128) { + *buf = static_cast(ch); + return 1; + } + return Xapian::Unicode::nonascii_to_utf8(ch, buf); +} +inline void append_utf8(std::string &s, unsigned ch) { + char buf[4]; + s.append(buf, to_utf8(ch, buf)); +} +inline category get_category(unsigned ch) { + if (ch >= 0x110000) return Xapian::Unicode::UNASSIGNED; + return Internal::get_category(Internal::get_character_info(ch)); +} +inline bool is_wordchar(unsigned ch) { + const unsigned int WORDCHAR_MASK = + (1 << Xapian::Unicode::UPPERCASE_LETTER) | + (1 << Xapian::Unicode::LOWERCASE_LETTER) | + (1 << Xapian::Unicode::TITLECASE_LETTER) | + (1 << Xapian::Unicode::MODIFIER_LETTER) | + (1 << Xapian::Unicode::OTHER_LETTER) | + (1 << Xapian::Unicode::NON_SPACING_MARK) | + (1 << Xapian::Unicode::ENCLOSING_MARK) | + (1 << Xapian::Unicode::COMBINING_SPACING_MARK) | + (1 << Xapian::Unicode::DECIMAL_DIGIT_NUMBER) | + (1 << Xapian::Unicode::LETTER_NUMBER) | + (1 << Xapian::Unicode::OTHER_NUMBER) | + (1 << Xapian::Unicode::CONNECTOR_PUNCTUATION); + return ((WORDCHAR_MASK >> get_category(ch)) & 1); +} +inline bool is_whitespace(unsigned ch) { + const unsigned int WHITESPACE_MASK = + (1 << Xapian::Unicode::CONTROL) | + (1 << Xapian::Unicode::SPACE_SEPARATOR) | + (1 << Xapian::Unicode::LINE_SEPARATOR) | + (1 << Xapian::Unicode::PARAGRAPH_SEPARATOR); + return ((WHITESPACE_MASK >> get_category(ch)) & 1); +} +inline bool is_currency(unsigned ch) { + return (get_category(ch) == Xapian::Unicode::CURRENCY_SYMBOL); +} +inline unsigned tolower(unsigned ch) { + int info; + if (ch >= 0x110000 || !(Internal::get_case_type((info = Xapian::Unicode::Internal::get_character_info(ch))) & 2)) + return ch; + return ch + Internal::get_delta(info); +} +inline unsigned toupper(unsigned ch) { + int info; + if (ch >= 0x110000 || !(Internal::get_case_type((info = Xapian::Unicode::Internal::get_character_info(ch))) & 4)) + return ch; + return ch - Internal::get_delta(info); +} +inline std::string +tolower(const std::string &term) +{ + std::string result; + result.reserve(term.size()); + for (Utf8Iterator i(term); i != Utf8Iterator(); ++i) { + append_utf8(result, tolower(*i)); + } + return result; +} +inline std::string +toupper(const std::string &term) +{ + std::string result; + result.reserve(term.size()); + for (Utf8Iterator i(term); i != Utf8Iterator(); ++i) { + append_utf8(result, toupper(*i)); + } + return result; +} +} +} +namespace Xapian { +class Document; +class Stem; +class Stopper; +class WritableDatabase; +class __attribute__((visibility("default"))) TermGenerator { + public: + class Internal; + Xapian::Internal::RefCntPtr internal; + TermGenerator(const TermGenerator & o); + TermGenerator & operator=(const TermGenerator & o); + TermGenerator(); + ~TermGenerator(); + void set_stemmer(const Xapian::Stem & stemmer); + void set_stopper(const Xapian::Stopper *stop = __null); + void set_document(const Xapian::Document & doc); + const Xapian::Document & get_document() const; + void set_database(const Xapian::WritableDatabase &db); + enum flags { + FLAG_SPELLING = 128 + }; + flags set_flags(flags toggle, flags mask = flags(0)); + void index_text(const Xapian::Utf8Iterator & itor, + Xapian::termcount weight = 1, + const std::string & prefix = std::string()); + void index_text(const std::string & text, + Xapian::termcount weight = 1, + const std::string & prefix = std::string()) { + return index_text(Utf8Iterator(text), weight, prefix); + } + void index_text_without_positions(const Xapian::Utf8Iterator & itor, + Xapian::termcount weight = 1, + const std::string & prefix = std::string()); + void index_text_without_positions(const std::string & text, + Xapian::termcount weight = 1, + const std::string & prefix = std::string()) { + return index_text_without_positions(Utf8Iterator(text), weight, prefix); + } + void increase_termpos(Xapian::termcount delta = 100); + Xapian::termcount get_termpos() const; + void set_termpos(Xapian::termcount termpos); + std::string get_description() const; +}; +} +namespace Xapian { +class Document; +class __attribute__((visibility("default"))) KeyMaker { + public: + virtual std::string operator()(const Xapian::Document & doc) const = 0; + virtual ~KeyMaker(); +}; +class __attribute__((visibility("default"))) MultiValueKeyMaker : public KeyMaker { + std::vector > valnos; + public: + MultiValueKeyMaker() { } + template + MultiValueKeyMaker(Iterator begin, Iterator end) { + while (begin != end) add_value(*begin++); + } + virtual std::string operator()(const Xapian::Document & doc) const; + void add_value(Xapian::valueno valno, bool reverse = false) { + valnos.push_back(std::make_pair(valno, reverse)); + } +}; +class __attribute__((visibility("default"))) Sorter : public KeyMaker { }; +class __attribute__((visibility("default"))) MultiValueSorter : public Sorter { + std::vector > valnos; + public: + MultiValueSorter() { } + template + MultiValueSorter(Iterator begin, Iterator end) { + while (begin != end) add(*begin++); + } + virtual std::string operator()(const Xapian::Document & doc) const; + void add(Xapian::valueno valno, bool forward = true) { + valnos.push_back(std::make_pair(valno, forward)); + } +}; +} +namespace Xapian { +class Database; +class Document; +class ErrorHandler; +class ExpandDecider; +class MatchSpy; +class MSetIterator; +class Query; +class Weight; +class __attribute__((visibility("default"))) MSet { + public: + class Internal; + Xapian::Internal::RefCntPtr internal; + explicit MSet(MSet::Internal * internal_); + MSet(); + ~MSet(); + MSet(const MSet & other); + void operator=(const MSet &other); + void fetch(const MSetIterator &begin, const MSetIterator &end) const; + void fetch(const MSetIterator &item) const; + void fetch() const; + Xapian::percent convert_to_percent(Xapian::weight wt) const; + Xapian::percent convert_to_percent(const MSetIterator &it) const; + Xapian::doccount get_termfreq(const std::string &tname) const; + Xapian::weight get_termweight(const std::string &tname) const; + Xapian::doccount get_firstitem() const; + Xapian::doccount get_matches_lower_bound() const; + Xapian::doccount get_matches_estimated() const; + Xapian::doccount get_matches_upper_bound() const; + Xapian::doccount get_uncollapsed_matches_lower_bound() const; + Xapian::doccount get_uncollapsed_matches_estimated() const; + Xapian::doccount get_uncollapsed_matches_upper_bound() const; + Xapian::weight get_max_possible() const; + Xapian::weight get_max_attained() const; + Xapian::doccount size() const; + Xapian::doccount max_size() const { return size(); } + bool empty() const; + void swap(MSet & other); + MSetIterator begin() const; + MSetIterator end() const; + MSetIterator back() const; + MSetIterator operator[](Xapian::doccount i) const; + typedef MSetIterator value_type; + typedef MSetIterator iterator; + typedef MSetIterator const_iterator; + typedef MSetIterator & reference; + typedef MSetIterator & const_reference; + typedef MSetIterator * pointer; + typedef Xapian::doccount_diff difference_type; + typedef Xapian::doccount size_type; + std::string get_description() const; +}; +class __attribute__((visibility("default"))) MSetIterator { + private: + friend class MSet; + friend bool operator==(const MSetIterator &a, const MSetIterator &b); + friend bool operator!=(const MSetIterator &a, const MSetIterator &b); + MSetIterator(Xapian::doccount index_, const MSet & mset_) + : index(index_), mset(mset_) { } + Xapian::doccount index; + MSet mset; + public: + MSetIterator() : index(0), mset() { } + MSetIterator(const MSetIterator &other) { + index = other.index; + mset = other.mset; + } + void operator=(const MSetIterator &other) { + index = other.index; + mset = other.mset; + } + MSetIterator & operator++() { + ++index; + return *this; + } + MSetIterator operator++(int) { + MSetIterator tmp = *this; + ++index; + return tmp; + } + MSetIterator & operator--() { + --index; + return *this; + } + MSetIterator operator--(int) { + MSetIterator tmp = *this; + --index; + return tmp; + } + Xapian::docid operator*() const; + Xapian::Document get_document() const; + Xapian::doccount get_rank() const { + return mset.get_firstitem() + index; + } + Xapian::weight get_weight() const; + std::string get_collapse_key() const; + Xapian::doccount get_collapse_count() const; + Xapian::percent get_percent() const; + std::string get_description() const; + typedef std::bidirectional_iterator_tag iterator_category; + typedef Xapian::docid value_type; + typedef Xapian::doccount_diff difference_type; + typedef Xapian::docid * pointer; + typedef Xapian::docid & reference; +}; +inline bool operator==(const MSetIterator &a, const MSetIterator &b) +{ + return (a.index == b.index); +} +inline bool operator!=(const MSetIterator &a, const MSetIterator &b) +{ + return (a.index != b.index); +} +class ESetIterator; +class __attribute__((visibility("default"))) ESet { + public: + class Internal; + Xapian::Internal::RefCntPtr internal; + ESet(); + ~ESet(); + ESet(const ESet & other); + void operator=(const ESet &other); + Xapian::termcount get_ebound() const; + Xapian::termcount size() const; + Xapian::termcount max_size() const { return size(); } + bool empty() const; + void swap(ESet & other); + ESetIterator begin() const; + ESetIterator end() const; + ESetIterator back() const; + ESetIterator operator[](Xapian::termcount i) const; + std::string get_description() const; +}; +class __attribute__((visibility("default"))) ESetIterator { + private: + friend class ESet; + friend bool operator==(const ESetIterator &a, const ESetIterator &b); + friend bool operator!=(const ESetIterator &a, const ESetIterator &b); + ESetIterator(Xapian::termcount index_, const ESet & eset_) + : index(index_), eset(eset_) { } + Xapian::termcount index; + ESet eset; + public: + ESetIterator() : index(0), eset() { } + ESetIterator(const ESetIterator &other) { + index = other.index; + eset = other.eset; + } + void operator=(const ESetIterator &other) { + index = other.index; + eset = other.eset; + } + ESetIterator & operator++() { + ++index; + return *this; + } + ESetIterator operator++(int) { + ESetIterator tmp = *this; + ++index; + return tmp; + } + ESetIterator & operator--() { + --index; + return *this; + } + ESetIterator operator--(int) { + ESetIterator tmp = *this; + --index; + return tmp; + } + const std::string & operator *() const; + Xapian::weight get_weight() const; + std::string get_description() const; + typedef std::bidirectional_iterator_tag iterator_category; + typedef std::string value_type; + typedef Xapian::termcount_diff difference_type; + typedef std::string * pointer; + typedef std::string & reference; +}; +inline bool operator==(const ESetIterator &a, const ESetIterator &b) +{ + return (a.index == b.index); +} +inline bool operator!=(const ESetIterator &a, const ESetIterator &b) +{ + return (a.index != b.index); +} +class __attribute__((visibility("default"))) RSet { + public: + class Internal; + Xapian::Internal::RefCntPtr internal; + RSet(const RSet &rset); + void operator=(const RSet &rset); + RSet(); + ~RSet(); + Xapian::doccount size() const; + bool empty() const; + void add_document(Xapian::docid did); + void add_document(const Xapian::MSetIterator & i) { add_document(*i); } + void remove_document(Xapian::docid did); + void remove_document(const Xapian::MSetIterator & i) { remove_document(*i); } + bool contains(Xapian::docid did) const; + bool contains(const Xapian::MSetIterator & i) const { return contains(*i); } + std::string get_description() const; +}; +class __attribute__((visibility("default"))) MatchDecider { + public: + virtual bool operator()(const Xapian::Document &doc) const = 0; + virtual ~MatchDecider(); +}; +class __attribute__((visibility("default"))) Enquire { + public: + Enquire(const Enquire & other); + void operator=(const Enquire & other); + class Internal; + Xapian::Internal::RefCntPtr internal; + explicit Enquire(const Database &database, ErrorHandler * errorhandler_ = 0); + ~Enquire(); + void set_query(const Xapian::Query & query, Xapian::termcount qlen = 0); + const Xapian::Query & get_query() const; + void add_matchspy(MatchSpy * spy); + void clear_matchspies(); + void set_weighting_scheme(const Weight &weight_); + void set_collapse_key(Xapian::valueno collapse_key, + Xapian::doccount collapse_max = 1); + typedef enum { + ASCENDING = 1, + DESCENDING = 0, + DONT_CARE = 2 + } docid_order; + void set_docid_order(docid_order order); + void set_cutoff(Xapian::percent percent_cutoff, Xapian::weight weight_cutoff = 0); + void set_sort_by_relevance(); + void set_sort_by_value(Xapian::valueno sort_key, bool reverse); + void set_sort_by_value(Xapian::valueno sort_key); + void set_sort_by_key(Xapian::KeyMaker * sorter, bool reverse); + void set_sort_by_key(Xapian::KeyMaker * sorter); + void set_sort_by_value_then_relevance(Xapian::valueno sort_key, + bool reverse); + void set_sort_by_value_then_relevance(Xapian::valueno sort_key); + void set_sort_by_key_then_relevance(Xapian::KeyMaker * sorter, + bool reverse); + void set_sort_by_key_then_relevance(Xapian::KeyMaker * sorter); + void set_sort_by_relevance_then_value(Xapian::valueno sort_key, + bool reverse); + void set_sort_by_relevance_then_value(Xapian::valueno sort_key); + void set_sort_by_relevance_then_key(Xapian::KeyMaker * sorter, + bool reverse); + void set_sort_by_relevance_then_key(Xapian::KeyMaker * sorter); + MSet get_mset(Xapian::doccount first, Xapian::doccount maxitems, + Xapian::doccount checkatleast = 0, + const RSet * omrset = 0, + const MatchDecider * mdecider = 0) const; + MSet get_mset(Xapian::doccount first, Xapian::doccount maxitems, Xapian::doccount checkatleast, const RSet * omrset, const MatchDecider * mdecider, const MatchDecider * matchspy) const; + MSet get_mset(Xapian::doccount first, Xapian::doccount maxitems, + const RSet * omrset, + const MatchDecider * mdecider = 0) const { + return get_mset(first, maxitems, 0, omrset, mdecider); + } + static const int INCLUDE_QUERY_TERMS = 1; + static const int USE_EXACT_TERMFREQ = 2; + ESet get_eset(Xapian::termcount maxitems, + const RSet & omrset, + int flags = 0, + double k = 1.0, + const Xapian::ExpandDecider * edecider = 0) const; + inline ESet get_eset(Xapian::termcount maxitems, const RSet & omrset, + const Xapian::ExpandDecider * edecider) const { + return get_eset(maxitems, omrset, 0, 1.0, edecider); + } + TermIterator get_matching_terms_begin(Xapian::docid did) const; + TermIterator get_matching_terms_end(Xapian::docid ) const { + return TermIterator(__null); + } + TermIterator get_matching_terms_begin(const MSetIterator &it) const; + TermIterator get_matching_terms_end(const MSetIterator & ) const { + return TermIterator(__null); + } + std::string get_description() const; +}; +inline void +Enquire::set_sort_by_value(Xapian::valueno sort_key) +{ + return set_sort_by_value(sort_key, true); +} +inline void +Enquire::set_sort_by_key(Xapian::KeyMaker * sorter) +{ + return set_sort_by_key(sorter, true); +} +inline void +Enquire::set_sort_by_value_then_relevance(Xapian::valueno sort_key) +{ + return set_sort_by_value_then_relevance(sort_key, true); +} +inline void +Enquire::set_sort_by_key_then_relevance(Xapian::KeyMaker * sorter) +{ + return set_sort_by_key_then_relevance(sorter, true); +} +inline void +Enquire::set_sort_by_relevance_then_value(Xapian::valueno sort_key) +{ + return set_sort_by_relevance_then_value(sort_key, true); +} +inline void +Enquire::set_sort_by_relevance_then_key(Xapian::KeyMaker * sorter) +{ + return set_sort_by_relevance_then_key(sorter, true); +} +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template, + typename _Alloc = std::allocator<_Key> > + class set + { + typedef typename _Alloc::value_type _Alloc_value_type; + + + + public: + typedef _Key key_type; + typedef _Key value_type; + typedef _Compare key_compare; + typedef _Compare value_compare; + typedef _Alloc allocator_type; + private: + typedef typename _Alloc::template rebind<_Key>::other _Key_alloc_type; + typedef _Rb_tree, + key_compare, _Key_alloc_type> _Rep_type; + _Rep_type _M_t; + public: + typedef typename _Key_alloc_type::pointer pointer; + typedef typename _Key_alloc_type::const_pointer const_pointer; + typedef typename _Key_alloc_type::reference reference; + typedef typename _Key_alloc_type::const_reference const_reference; + typedef typename _Rep_type::const_iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::const_reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + set() + : _M_t() { } + explicit + set(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) { } + template + set(_InputIterator __first, _InputIterator __last) + : _M_t() + { _M_t._M_insert_unique(__first, __last); } + template + set(_InputIterator __first, _InputIterator __last, + const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) + { _M_t._M_insert_unique(__first, __last); } + set(const set& __x) + : _M_t(__x._M_t) { } + set& + operator=(const set& __x) + { + _M_t = __x._M_t; + return *this; + } + key_compare + key_comp() const + { return _M_t.key_comp(); } + value_compare + value_comp() const + { return _M_t.key_comp(); } + allocator_type + get_allocator() const + { return _M_t.get_allocator(); } + iterator + begin() const + { return _M_t.begin(); } + iterator + end() const + { return _M_t.end(); } + reverse_iterator + rbegin() const + { return _M_t.rbegin(); } + reverse_iterator + rend() const + { return _M_t.rend(); } + bool + empty() const + { return _M_t.empty(); } + size_type + size() const + { return _M_t.size(); } + size_type + max_size() const + { return _M_t.max_size(); } + void + swap(set& __x) + { _M_t.swap(__x._M_t); } + std::pair + insert(const value_type& __x) + { + std::pair __p = + _M_t._M_insert_unique(__x); + return std::pair(__p.first, __p.second); + } + iterator + insert(iterator __position, const value_type& __x) + { return _M_t._M_insert_unique_(__position, __x); } + template + void + insert(_InputIterator __first, _InputIterator __last) + { _M_t._M_insert_unique(__first, __last); } + void + erase(iterator __position) + { _M_t.erase(__position); } + size_type + erase(const key_type& __x) + { return _M_t.erase(__x); } + void + erase(iterator __first, iterator __last) + { _M_t.erase(__first, __last); } + void + clear() + { _M_t.clear(); } + size_type + count(const key_type& __x) const + { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } + iterator + find(const key_type& __x) + { return _M_t.find(__x); } + const_iterator + find(const key_type& __x) const + { return _M_t.find(__x); } + iterator + lower_bound(const key_type& __x) + { return _M_t.lower_bound(__x); } + const_iterator + lower_bound(const key_type& __x) const + { return _M_t.lower_bound(__x); } + iterator + upper_bound(const key_type& __x) + { return _M_t.upper_bound(__x); } + const_iterator + upper_bound(const key_type& __x) const + { return _M_t.upper_bound(__x); } + std::pair + equal_range(const key_type& __x) + { return _M_t.equal_range(__x); } + std::pair + equal_range(const key_type& __x) const + { return _M_t.equal_range(__x); } + template + friend bool + operator==(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&); + template + friend bool + operator<(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&); + }; + template + inline bool + operator==(const set<_Key, _Compare, _Alloc>& __x, + const set<_Key, _Compare, _Alloc>& __y) + { return __x._M_t == __y._M_t; } + template + inline bool + operator<(const set<_Key, _Compare, _Alloc>& __x, + const set<_Key, _Compare, _Alloc>& __y) + { return __x._M_t < __y._M_t; } + template + inline bool + operator!=(const set<_Key, _Compare, _Alloc>& __x, + const set<_Key, _Compare, _Alloc>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const set<_Key, _Compare, _Alloc>& __x, + const set<_Key, _Compare, _Alloc>& __y) + { return __y < __x; } + template + inline bool + operator<=(const set<_Key, _Compare, _Alloc>& __x, + const set<_Key, _Compare, _Alloc>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const set<_Key, _Compare, _Alloc>& __x, + const set<_Key, _Compare, _Alloc>& __y) + { return !(__x < __y); } + template + inline void + swap(set<_Key, _Compare, _Alloc>& __x, set<_Key, _Compare, _Alloc>& __y) + { __x.swap(__y); } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template , + typename _Alloc = std::allocator<_Key> > + class multiset + { + typedef typename _Alloc::value_type _Alloc_value_type; + + + + public: + typedef _Key key_type; + typedef _Key value_type; + typedef _Compare key_compare; + typedef _Compare value_compare; + typedef _Alloc allocator_type; + private: + typedef typename _Alloc::template rebind<_Key>::other _Key_alloc_type; + typedef _Rb_tree, + key_compare, _Key_alloc_type> _Rep_type; + _Rep_type _M_t; + public: + typedef typename _Key_alloc_type::pointer pointer; + typedef typename _Key_alloc_type::const_pointer const_pointer; + typedef typename _Key_alloc_type::reference reference; + typedef typename _Key_alloc_type::const_reference const_reference; + typedef typename _Rep_type::const_iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::const_reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + multiset() + : _M_t() { } + explicit + multiset(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) { } + template + multiset(_InputIterator __first, _InputIterator __last) + : _M_t() + { _M_t._M_insert_equal(__first, __last); } + template + multiset(_InputIterator __first, _InputIterator __last, + const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) + { _M_t._M_insert_equal(__first, __last); } + multiset(const multiset& __x) + : _M_t(__x._M_t) { } + multiset& + operator=(const multiset& __x) + { + _M_t = __x._M_t; + return *this; + } + key_compare + key_comp() const + { return _M_t.key_comp(); } + value_compare + value_comp() const + { return _M_t.key_comp(); } + allocator_type + get_allocator() const + { return _M_t.get_allocator(); } + iterator + begin() const + { return _M_t.begin(); } + iterator + end() const + { return _M_t.end(); } + reverse_iterator + rbegin() const + { return _M_t.rbegin(); } + reverse_iterator + rend() const + { return _M_t.rend(); } + bool + empty() const + { return _M_t.empty(); } + size_type + size() const + { return _M_t.size(); } + size_type + max_size() const + { return _M_t.max_size(); } + void + swap(multiset& __x) + { _M_t.swap(__x._M_t); } + iterator + insert(const value_type& __x) + { return _M_t._M_insert_equal(__x); } + iterator + insert(iterator __position, const value_type& __x) + { return _M_t._M_insert_equal_(__position, __x); } + template + void + insert(_InputIterator __first, _InputIterator __last) + { _M_t._M_insert_equal(__first, __last); } + void + erase(iterator __position) + { _M_t.erase(__position); } + size_type + erase(const key_type& __x) + { return _M_t.erase(__x); } + void + erase(iterator __first, iterator __last) + { _M_t.erase(__first, __last); } + void + clear() + { _M_t.clear(); } + size_type + count(const key_type& __x) const + { return _M_t.count(__x); } + iterator + find(const key_type& __x) + { return _M_t.find(__x); } + const_iterator + find(const key_type& __x) const + { return _M_t.find(__x); } + iterator + lower_bound(const key_type& __x) + { return _M_t.lower_bound(__x); } + const_iterator + lower_bound(const key_type& __x) const + { return _M_t.lower_bound(__x); } + iterator + upper_bound(const key_type& __x) + { return _M_t.upper_bound(__x); } + const_iterator + upper_bound(const key_type& __x) const + { return _M_t.upper_bound(__x); } + std::pair + equal_range(const key_type& __x) + { return _M_t.equal_range(__x); } + std::pair + equal_range(const key_type& __x) const + { return _M_t.equal_range(__x); } + template + friend bool + operator==(const multiset<_K1, _C1, _A1>&, + const multiset<_K1, _C1, _A1>&); + template + friend bool + operator< (const multiset<_K1, _C1, _A1>&, + const multiset<_K1, _C1, _A1>&); + }; + template + inline bool + operator==(const multiset<_Key, _Compare, _Alloc>& __x, + const multiset<_Key, _Compare, _Alloc>& __y) + { return __x._M_t == __y._M_t; } + template + inline bool + operator<(const multiset<_Key, _Compare, _Alloc>& __x, + const multiset<_Key, _Compare, _Alloc>& __y) + { return __x._M_t < __y._M_t; } + template + inline bool + operator!=(const multiset<_Key, _Compare, _Alloc>& __x, + const multiset<_Key, _Compare, _Alloc>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const multiset<_Key,_Compare,_Alloc>& __x, + const multiset<_Key,_Compare,_Alloc>& __y) + { return __y < __x; } + template + inline bool + operator<=(const multiset<_Key, _Compare, _Alloc>& __x, + const multiset<_Key, _Compare, _Alloc>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const multiset<_Key, _Compare, _Alloc>& __x, + const multiset<_Key, _Compare, _Alloc>& __y) + { return !(__x < __y); } + template + inline void + swap(multiset<_Key, _Compare, _Alloc>& __x, + multiset<_Key, _Compare, _Alloc>& __y) + { __x.swap(__y); } +} +namespace Xapian { +class __attribute__((visibility("default"))) ExpandDecider { + public: + virtual bool operator()(const std::string &term) const = 0; + virtual ~ExpandDecider(); +}; +class __attribute__((visibility("default"))) ExpandDeciderAnd : public ExpandDecider { + const ExpandDecider &first, &second; + public: + ExpandDeciderAnd(const ExpandDecider &first_, + const ExpandDecider &second_) + : first(first_), second(second_) { } + ExpandDeciderAnd(const ExpandDecider *first_, + const ExpandDecider *second_) + : first(*first_), second(*second_) { } + virtual bool operator()(const std::string &term) const; +}; +class __attribute__((visibility("default"))) ExpandDeciderFilterTerms : public ExpandDecider { + std::set rejects; + public: + template + ExpandDeciderFilterTerms(Iterator reject_begin, Iterator reject_end) + : rejects(reject_begin, reject_end) { } + virtual bool operator()(const std::string &term) const; +}; +} +namespace Xapian { +class Document; +class Registry; +class __attribute__((visibility("default"))) MatchSpy { + private: + void operator=(const MatchSpy &); + MatchSpy(const MatchSpy &); + protected: + MatchSpy() {} + public: + virtual ~MatchSpy(); + virtual void operator()(const Xapian::Document &doc, + Xapian::weight wt) = 0; + virtual MatchSpy * clone() const; + virtual std::string name() const; + virtual std::string serialise() const; + virtual MatchSpy * unserialise(const std::string & s, + const Registry & context) const; + virtual std::string serialise_results() const; + virtual void merge_results(const std::string & s); + virtual std::string get_description() const; +}; +class __attribute__((visibility("default"))) ValueCountMatchSpy : public MatchSpy { + public: + struct Internal; + struct __attribute__((visibility("default"))) Internal + : public Xapian::Internal::RefCntBase + { + Xapian::valueno slot; + Xapian::doccount total; + std::map values; + Internal() : slot(Xapian::BAD_VALUENO), total(0) {} + Internal(Xapian::valueno slot_) : slot(slot_), total(0) {} + }; + protected: + Xapian::Internal::RefCntPtr internal; + public: + ValueCountMatchSpy() : internal() {} + ValueCountMatchSpy(Xapian::valueno slot_) + : internal(new Internal(slot_)) {} + size_t get_total() const { + return internal->total; + } + TermIterator values_begin() const; + TermIterator values_end() const { + return TermIterator(__null); + } + TermIterator top_values_begin(size_t maxvalues) const; + TermIterator top_values_end(size_t) const { + return TermIterator(__null); + } + void operator()(const Xapian::Document &doc, Xapian::weight wt); + virtual MatchSpy * clone() const; + virtual std::string name() const; + virtual std::string serialise() const; + virtual MatchSpy * unserialise(const std::string & s, + const Registry & context) const; + virtual std::string serialise_results() const; + virtual void merge_results(const std::string & s); + virtual std::string get_description() const; +}; +} +namespace Xapian { +class __attribute__((visibility("default"))) PostingSource { + void operator=(const PostingSource &); + PostingSource(const PostingSource &); + double max_weight_; + void * matcher_; + protected: + PostingSource() : max_weight_(0), matcher_(__null) { } + void set_maxweight(Xapian::weight max_weight); + public: + void register_matcher_(void * matcher) { matcher_ = matcher; } + virtual ~PostingSource(); + virtual Xapian::doccount get_termfreq_min() const = 0; + virtual Xapian::doccount get_termfreq_est() const = 0; + virtual Xapian::doccount get_termfreq_max() const = 0; + Xapian::weight get_maxweight() const { return max_weight_; } + virtual Xapian::weight get_weight() const; + virtual Xapian::docid get_docid() const = 0; + virtual void next(Xapian::weight min_wt) = 0; + virtual void skip_to(Xapian::docid did, Xapian::weight min_wt); + virtual bool check(Xapian::docid did, Xapian::weight min_wt); + virtual bool at_end() const = 0; + virtual PostingSource * clone() const; + virtual std::string name() const; + virtual std::string serialise() const; + virtual PostingSource * unserialise(const std::string &s) const; + virtual void init(const Database & db) = 0; + virtual std::string get_description() const; +}; +class __attribute__((visibility("default"))) ValuePostingSource : public PostingSource { + protected: + Xapian::Database db; + Xapian::valueno slot; + Xapian::ValueIterator value_it; + bool started; + Xapian::doccount termfreq_min; + Xapian::doccount termfreq_est; + Xapian::doccount termfreq_max; + public: + ValuePostingSource(Xapian::valueno slot_); + Xapian::doccount get_termfreq_min() const; + Xapian::doccount get_termfreq_est() const; + Xapian::doccount get_termfreq_max() const; + void next(Xapian::weight min_wt); + void skip_to(Xapian::docid min_docid, Xapian::weight min_wt); + bool check(Xapian::docid min_docid, Xapian::weight min_wt); + bool at_end() const; + Xapian::docid get_docid() const; + void init(const Database & db_); +}; +class __attribute__((visibility("default"))) ValueWeightPostingSource + : public ValuePostingSource { + public: + ValueWeightPostingSource(Xapian::valueno slot_); + Xapian::weight get_weight() const; + ValueWeightPostingSource * clone() const; + std::string name() const; + std::string serialise() const; + ValueWeightPostingSource * unserialise(const std::string &s) const; + void init(const Database & db_); + std::string get_description() const; +}; +class __attribute__((visibility("default"))) DecreasingValueWeightPostingSource + : public Xapian::ValueWeightPostingSource { + protected: + Xapian::docid range_start; + Xapian::docid range_end; + double curr_weight; + bool items_at_end; + void skip_if_in_range(Xapian::weight min_wt); + public: + DecreasingValueWeightPostingSource(Xapian::valueno slot_, + Xapian::docid range_start_ = 0, + Xapian::docid range_end_ = 0); + Xapian::weight get_weight() const; + DecreasingValueWeightPostingSource * clone() const; + std::string name() const; + std::string serialise() const; + DecreasingValueWeightPostingSource * unserialise(const std::string &s) const; + void init(const Xapian::Database & db_); + void next(Xapian::weight min_wt); + void skip_to(Xapian::docid min_docid, Xapian::weight min_wt); + bool check(Xapian::docid min_docid, Xapian::weight min_wt); + std::string get_description() const; +}; +class __attribute__((visibility("default"))) ValueMapPostingSource + : public ValuePostingSource { + double default_weight; + double max_weight_in_map; + std::map weight_map; + public: + ValueMapPostingSource(Xapian::valueno slot_); + void add_mapping(const std::string &key, double weight); + void clear_mappings(); + void set_default_weight(double wt); + Xapian::weight get_weight() const; + ValueMapPostingSource * clone() const; + std::string name() const; + std::string serialise() const; + ValueMapPostingSource * unserialise(const std::string &s) const; + void init(const Database & db_); + std::string get_description() const; +}; +class __attribute__((visibility("default"))) FixedWeightPostingSource : public PostingSource { + Xapian::Database db; + Xapian::doccount termfreq; + Xapian::PostingIterator it; + bool started; + Xapian::docid check_docid; + public: + FixedWeightPostingSource(Xapian::weight wt); + Xapian::doccount get_termfreq_min() const; + Xapian::doccount get_termfreq_est() const; + Xapian::doccount get_termfreq_max() const; + Xapian::weight get_weight() const; + void next(Xapian::weight min_wt); + void skip_to(Xapian::docid min_docid, Xapian::weight min_wt); + bool check(Xapian::docid min_docid, Xapian::weight min_wt); + bool at_end() const; + Xapian::docid get_docid() const; + FixedWeightPostingSource * clone() const; + std::string name() const; + std::string serialise() const; + FixedWeightPostingSource * unserialise(const std::string &s) const; + void init(const Database & db_); + std::string get_description() const; +}; +} +class LocalSubMatch; +class MultiMatch; +class QueryOptimiser; +struct SortPosName; +namespace Xapian { +class PostingSource; +class Registry; +class __attribute__((visibility("default"))) Query { + public: + class Internal; + Xapian::Internal::RefCntPtr internal; + typedef enum { + OP_AND, + OP_OR, + OP_AND_NOT, + OP_XOR, + OP_AND_MAYBE, + OP_FILTER, + OP_NEAR, + OP_PHRASE, + OP_VALUE_RANGE, + OP_SCALE_WEIGHT, + OP_ELITE_SET, + OP_VALUE_GE, + OP_VALUE_LE, + OP_SYNONYM + } op; + Query(const Query & copyme); + Query & operator=(const Query & copyme); + Query(); + ~Query(); + Query(const std::string & tname_, Xapian::termcount wqf_ = 1, + Xapian::termpos pos_ = 0); + Query(Query::op op_, const Query & left, const Query & right); + Query(Query::op op_, + const std::string & left, const std::string & right); + template + Query(Query::op op_, Iterator qbegin, Iterator qend, + Xapian::termcount parameter = 0); + Query(Query::op op_, Xapian::Query q, double parameter); + Query(Query::op op_, Xapian::valueno valno, + const std::string &begin, const std::string &end); + Query(Query::op op_, Xapian::valueno valno, const std::string &value); + explicit Query(Xapian::PostingSource * external_source); + static const Xapian::Query MatchAll; + static const Xapian::Query MatchNothing; + Xapian::termcount get_length() const; + TermIterator get_terms_begin() const; + TermIterator get_terms_end() const { + return TermIterator(__null); + } + bool empty() const; + std::string serialise() const; + static Query unserialise(const std::string &s); + static Query unserialise(const std::string & s, + const Registry & registry); + std::string get_description() const; + private: + void add_subquery(const Query & subq); + void add_subquery(const Query * subq); + void add_subquery(const std::string & tname); + void start_construction(Query::op op_, Xapian::termcount parameter); + void end_construction(); + void abort_construction(); +}; +template +Query::Query(Query::op op_, Iterator qbegin, Iterator qend, termcount parameter) + : internal(0) +{ + try { + start_construction(op_, parameter); + while (qbegin != qend) { + add_subquery(*qbegin); + ++qbegin; + } + end_construction(); + } catch (...) { + abort_construction(); + throw; + } +} +class __attribute__((visibility("default"))) Query::Internal : public Xapian::Internal::RefCntBase { + friend class ::LocalSubMatch; + friend class ::MultiMatch; + friend class ::QueryOptimiser; + friend struct ::SortPosName; + friend class Query; + public: + static const int OP_LEAF = -1; + static const int OP_EXTERNAL_SOURCE = -2; + typedef std::vector subquery_list; + typedef int op_t; + private: + Xapian::Query::Internal::op_t op; + subquery_list subqs; + Xapian::termcount parameter; + std::string tname; + std::string str_parameter; + Xapian::termpos term_pos; + Xapian::PostingSource * external_source; + bool external_source_owned; + void initialise_from_copy(const Query::Internal & copyme); + void accumulate_terms( + std::vector > &terms) const; + Internal * simplify_query(); + void validate_query() const; + bool simplify_matchnothing(); + static std::string get_op_name(Xapian::Query::Internal::op_t op); + void collapse_subqs(); + Xapian::Query::Internal * flatten_subqs(); + std::string serialise(Xapian::termpos & curpos) const; + public: + Internal(const Query::Internal & copyme); + void operator=(const Query::Internal & copyme); + explicit Internal(const std::string & tname_, Xapian::termcount wqf_ = 1, + Xapian::termpos term_pos_ = 0); + Internal(op_t op_, Xapian::termcount parameter); + Internal(op_t op_, Xapian::valueno valno, + const std::string &begin, const std::string &end); + Internal(op_t op_, Xapian::valueno valno, const std::string &value); + explicit Internal(Xapian::PostingSource * external_source_, bool owned); + ~Internal(); + static Xapian::Query::Internal * unserialise(const std::string &s, + const Registry & registry); + void add_subquery(const Query::Internal * subq); + void add_subquery_nocopy(Query::Internal * subq); + void set_dbl_parameter(double dbl_parameter_); + double get_dbl_parameter() const; + Query::Internal * end_construction(); + std::string serialise() const { + Xapian::termpos curpos = 1; + return serialise(curpos); + } + std::string get_description() const; + Xapian::termcount get_parameter() const { return parameter; } + Xapian::termcount get_wqf() const { return parameter; } + Xapian::termcount get_length() const; + TermIterator get_terms() const; +}; +} +namespace Xapian { +class Database; +class Stem; +class __attribute__((visibility("default"))) Stopper { + public: + virtual bool operator()(const std::string & term) const = 0; + virtual ~Stopper() { } + virtual std::string get_description() const; +}; +class __attribute__((visibility("default"))) SimpleStopper : public Stopper { + std::set stop_words; + public: + SimpleStopper() { } + template + SimpleStopper(Iterator begin, Iterator end) : stop_words(begin, end) { } + void add(const std::string & word) { stop_words.insert(word); } + virtual bool operator()(const std::string & term) const { + return stop_words.find(term) != stop_words.end(); + } + virtual std::string get_description() const; +}; +struct __attribute__((visibility("default"))) ValueRangeProcessor { + virtual ~ValueRangeProcessor(); + virtual Xapian::valueno operator()(std::string &begin, std::string &end) = 0; +}; +class __attribute__((visibility("default"))) StringValueRangeProcessor : public ValueRangeProcessor { + protected: + Xapian::valueno valno; + private: + bool prefix; + std::string str; + public: + StringValueRangeProcessor(Xapian::valueno valno_) + : valno(valno_), str() { } + StringValueRangeProcessor(Xapian::valueno valno_, const std::string &str_, + bool prefix_ = true) + : valno(valno_), prefix(prefix_), str(str_) { } + Xapian::valueno operator()(std::string &, std::string &); +}; +class __attribute__((visibility("default"))) DateValueRangeProcessor : public StringValueRangeProcessor { + bool prefer_mdy; + int epoch_year; + public: + DateValueRangeProcessor(Xapian::valueno valno_, bool prefer_mdy_ = false, + int epoch_year_ = 1970) + : StringValueRangeProcessor(valno_), + prefer_mdy(prefer_mdy_), epoch_year(epoch_year_) { } + DateValueRangeProcessor(Xapian::valueno valno_, const std::string &str_, + bool prefix_ = true, + bool prefer_mdy_ = false, int epoch_year_ = 1970) + : StringValueRangeProcessor(valno_, str_, prefix_), + prefer_mdy(prefer_mdy_), epoch_year(epoch_year_) { } + Xapian::valueno operator()(std::string &begin, std::string &end); +}; +class __attribute__((visibility("default"))) NumberValueRangeProcessor : public StringValueRangeProcessor { + public: + NumberValueRangeProcessor(Xapian::valueno valno_) + : StringValueRangeProcessor(valno_) { } + NumberValueRangeProcessor(Xapian::valueno valno_, const std::string &str_, + bool prefix_ = true) + : StringValueRangeProcessor(valno_, str_, prefix_) { } + Xapian::valueno operator()(std::string &begin, std::string &end); +}; +class __attribute__((visibility("default"))) QueryParser { + public: + class Internal; + Xapian::Internal::RefCntPtr internal; + typedef enum { + FLAG_BOOLEAN = 1, + FLAG_PHRASE = 2, + FLAG_LOVEHATE = 4, + FLAG_BOOLEAN_ANY_CASE = 8, + FLAG_WILDCARD = 16, + FLAG_PURE_NOT = 32, + FLAG_PARTIAL = 64, + FLAG_SPELLING_CORRECTION = 128, + FLAG_SYNONYM = 256, + FLAG_AUTO_SYNONYMS = 512, + FLAG_AUTO_MULTIWORD_SYNONYMS = 1024 | FLAG_AUTO_SYNONYMS, + FLAG_DEFAULT = FLAG_PHRASE|FLAG_BOOLEAN|FLAG_LOVEHATE + } feature_flag; + typedef enum { STEM_NONE, STEM_SOME, STEM_ALL } stem_strategy; + QueryParser(const QueryParser & o); + QueryParser & operator=(const QueryParser & o); + QueryParser(); + ~QueryParser(); + void set_stemmer(const Xapian::Stem & stemmer); + void set_stemming_strategy(stem_strategy strategy); + void set_stopper(const Stopper *stop = __null); + void set_default_op(Query::op default_op); + Query::op get_default_op() const; + void set_database(const Database &db); + Query parse_query(const std::string &query_string, + unsigned flags = FLAG_DEFAULT, + const std::string &default_prefix = std::string()); + void add_prefix(const std::string &field, const std::string &prefix); + void add_boolean_prefix(const std::string &field, const std::string &prefix, + bool exclusive); + void add_boolean_prefix(const std::string &field, const std::string &prefix); + TermIterator stoplist_begin() const; + TermIterator stoplist_end() const { + return TermIterator(__null); + } + TermIterator unstem_begin(const std::string &term) const; + TermIterator unstem_end(const std::string &) const { + return TermIterator(__null); + } + void add_valuerangeprocessor(Xapian::ValueRangeProcessor * vrproc); + std::string get_corrected_query_string() const; + std::string get_description() const; +}; +__attribute__((visibility("default"))) +std::string sortable_serialise(double value); +__attribute__((visibility("default"))) +double sortable_unserialise(const std::string & value); +} +namespace Xapian { +class Document; +class __attribute__((visibility("default"))) ValueSetMatchDecider : public MatchDecider { + std::set testset; + valueno valuenum; + bool inclusive; + public: + ValueSetMatchDecider(Xapian::valueno slot, bool inclusive_) + : valuenum(slot), inclusive(inclusive_) { } + void add_value(const std::string& value) + { + testset.insert(value); + } + void remove_value(const std::string& value) + { + testset.erase(value); + } + bool operator()(const Xapian::Document& doc) const; +}; +} +namespace Xapian { +class __attribute__((visibility("default"))) Weight { + protected: + typedef enum { + COLLECTION_SIZE = 1, + RSET_SIZE = 2, + AVERAGE_LENGTH = 4, + TERMFREQ = 8, + RELTERMFREQ = 16, + QUERY_LENGTH = 32, + WQF = 64, + WDF = 128, + DOC_LENGTH = 256, + DOC_LENGTH_MIN = 512, + DOC_LENGTH_MAX = 1024, + WDF_MAX = 2048 + } stat_flags; + void need_stat(stat_flags flag) { + stats_needed = stat_flags(stats_needed | flag); + } + virtual void init(double factor) = 0; + private: + void operator=(const Weight &); + stat_flags stats_needed; + Xapian::doccount collection_size_; + Xapian::doccount rset_size_; + Xapian::doclength average_length_; + Xapian::doccount termfreq_; + Xapian::doccount reltermfreq_; + Xapian::termcount query_length_; + Xapian::termcount wqf_; + Xapian::termcount doclength_lower_bound_; + Xapian::termcount doclength_upper_bound_; + Xapian::termcount wdf_upper_bound_; + public: + class Internal; + virtual ~Weight(); + virtual Weight * clone() const = 0; + virtual std::string name() const; + virtual std::string serialise() const; + virtual Weight * unserialise(const std::string & s) const; + virtual Xapian::weight get_sumpart(Xapian::termcount wdf, + Xapian::termcount doclen) const = 0; + virtual Xapian::weight get_maxpart() const = 0; + virtual Xapian::weight get_sumextra(Xapian::termcount doclen) const = 0; + virtual Xapian::weight get_maxextra() const = 0; + void init_(const Internal & stats, Xapian::termcount query_len_, + const std::string & term, Xapian::termcount wqf_, + double factor); + void init_(const Internal & stats, Xapian::termcount query_len_, + double factor, Xapian::doccount termfreq, + Xapian::doccount reltermfreq); + void init_(const Internal & stats, Xapian::termcount query_len_); + bool get_sumpart_needs_doclength_() const { + return stats_needed & DOC_LENGTH; + } + bool get_sumpart_needs_wdf_() const { + return stats_needed & WDF; + } + protected: + Weight(const Weight &); + Weight() : stats_needed() { } + Xapian::doccount get_collection_size() const { return collection_size_; } + Xapian::doccount get_rset_size() const { return rset_size_; } + Xapian::doclength get_average_length() const { return average_length_; } + Xapian::doccount get_termfreq() const { return termfreq_; } + Xapian::doccount get_reltermfreq() const { return reltermfreq_; } + Xapian::termcount get_query_length() const { return query_length_; } + Xapian::termcount get_wqf() const { return wqf_; } + Xapian::termcount get_doclength_upper_bound() const { + return doclength_upper_bound_; + } + Xapian::termcount get_doclength_lower_bound() const { + return doclength_lower_bound_; + } + Xapian::termcount get_wdf_upper_bound() const { + return wdf_upper_bound_; + } +}; +class __attribute__((visibility("default"))) BoolWeight : public Weight { + BoolWeight * clone() const; + void init(double factor); + public: + BoolWeight() { } + std::string name() const; + std::string serialise() const; + BoolWeight * unserialise(const std::string & s) const; + Xapian::weight get_sumpart(Xapian::termcount wdf, + Xapian::termcount doclen) const; + Xapian::weight get_maxpart() const; + Xapian::weight get_sumextra(Xapian::termcount doclen) const; + Xapian::weight get_maxextra() const; +}; +class __attribute__((visibility("default"))) BM25Weight : public Weight { + mutable Xapian::doclength len_factor; + mutable Xapian::weight termweight; + double param_k1, param_k2, param_k3, param_b; + Xapian::doclength param_min_normlen; + BM25Weight * clone() const; + void init(double factor); + public: + BM25Weight(double k1, double k2, double k3, double b, double min_normlen) + : param_k1(k1), param_k2(k2), param_k3(k3), param_b(b), + param_min_normlen(min_normlen) + { + if (param_k1 < 0) param_k1 = 0; + if (param_k2 < 0) param_k2 = 0; + if (param_k3 < 0) param_k3 = 0; + if (param_b < 0) { + param_b = 0; + } else if (param_b > 1) { + param_b = 1; + } + need_stat(COLLECTION_SIZE); + need_stat(RSET_SIZE); + need_stat(TERMFREQ); + need_stat(RELTERMFREQ); + need_stat(WDF); + need_stat(WDF_MAX); + need_stat(WDF); + if (param_k2 != 0 || (param_k1 != 0 && param_b != 0)) { + need_stat(DOC_LENGTH_MIN); + need_stat(AVERAGE_LENGTH); + } + if (param_k1 != 0 && param_b != 0) need_stat(DOC_LENGTH); + if (param_k2 != 0) need_stat(QUERY_LENGTH); + if (param_k3 != 0) need_stat(WQF); + } + BM25Weight() + : param_k1(1), param_k2(0), param_k3(1), param_b(0.5), + param_min_normlen(0.5) + { + need_stat(COLLECTION_SIZE); + need_stat(RSET_SIZE); + need_stat(TERMFREQ); + need_stat(RELTERMFREQ); + need_stat(WDF); + need_stat(WDF_MAX); + need_stat(WDF); + need_stat(DOC_LENGTH_MIN); + need_stat(AVERAGE_LENGTH); + need_stat(DOC_LENGTH); + need_stat(WQF); + } + std::string name() const; + std::string serialise() const; + BM25Weight * unserialise(const std::string & s) const; + Xapian::weight get_sumpart(Xapian::termcount wdf, + Xapian::termcount doclen) const; + Xapian::weight get_maxpart() const; + Xapian::weight get_sumextra(Xapian::termcount doclen) const; + Xapian::weight get_maxextra() const; +}; +class __attribute__((visibility("default"))) TradWeight : public Weight { + mutable Xapian::doclength len_factor; + mutable Xapian::weight termweight; + double param_k; + TradWeight * clone() const; + void init(double factor); + public: + explicit TradWeight(double k = 1.0) : param_k(k) { + if (param_k < 0) param_k = 0; + if (param_k != 0.0) { + need_stat(AVERAGE_LENGTH); + need_stat(DOC_LENGTH); + } + need_stat(COLLECTION_SIZE); + need_stat(RSET_SIZE); + need_stat(TERMFREQ); + need_stat(RELTERMFREQ); + need_stat(DOC_LENGTH_MIN); + need_stat(WDF); + need_stat(WDF_MAX); + need_stat(WDF); + } + std::string name() const; + std::string serialise() const; + TradWeight * unserialise(const std::string & s) const; + Xapian::weight get_sumpart(Xapian::termcount wdf, + Xapian::termcount doclen) const; + Xapian::weight get_maxpart() const; + Xapian::weight get_sumextra(Xapian::termcount doclen) const; + Xapian::weight get_maxextra() const; +}; +} +namespace Xapian { +struct __attribute__((visibility("default"))) StemImplementation + : public Xapian::Internal::RefCntBase +{ + virtual ~StemImplementation(); + virtual std::string operator()(const std::string & word) = 0; + virtual std::string get_description() const = 0; +}; +class __attribute__((visibility("default"))) Stem { + public: + Xapian::Internal::RefCntPtr internal; + Stem(const Stem & o); + void operator=(const Stem & o); + Stem(); + explicit Stem(const std::string &language); + explicit Stem(StemImplementation * p); + ~Stem(); + std::string operator()(const std::string &word) const; + std::string get_description() const; + static std::string get_available_languages(); +}; +} +namespace Xapian { +class MatchSpy; +class PostingSource; +class Weight; +class __attribute__((visibility("default"))) Registry { + public: + class Internal; + private: + Xapian::Internal::RefCntPtr internal; + public: + Registry(const Registry & other); + Registry & operator=(const Registry & other); + Registry(); + ~Registry(); + void register_weighting_scheme(const Xapian::Weight &wt); + const Xapian::Weight * + get_weighting_scheme(const std::string & name) const; + void register_posting_source(const Xapian::PostingSource &source); + const Xapian::PostingSource * + get_posting_source(const std::string & name) const; + void register_match_spy(const Xapian::MatchSpy &spy); + const Xapian::MatchSpy * + get_match_spy(const std::string & name) const; +}; +} +namespace Xapian { +class __attribute__((visibility("default"))) Compactor { + public: + class Internal; + typedef enum { STANDARD, FULL, FULLER } compaction_level; + private: + Xapian::Internal::RefCntPtr internal; + public: + Compactor(); + virtual ~Compactor(); + void set_block_size(size_t block_size); + void set_renumber(bool renumber); + void set_multipass(bool multipass); + void set_compaction_level(compaction_level compaction); + void set_destdir(const std::string & destdir); + void add_source(const std::string & srcdir); + void compact(); + virtual void + set_status(const std::string & table, const std::string & status); + virtual std::string + resolve_duplicate_metadata(const std::string & key, + size_t num_tags, const std::string tags[]); +}; +} +namespace Xapian { +__attribute__((visibility("default"))) +const char * version_string(); +__attribute__((visibility("default"))) +int major_version(); +__attribute__((visibility("default"))) +int minor_version(); +__attribute__((visibility("default"))) +int revision(); +} +using namespace std; +namespace Xapian { +} +namespace swig { + struct stop_iteration { + }; + struct SwigPyIterator { + private: + SwigPtr_PyObject _seq; + protected: + SwigPyIterator(PyObject *seq) : _seq(seq) + { + } + public: + virtual ~SwigPyIterator() {} + virtual PyObject *value() const = 0; + virtual SwigPyIterator *incr(size_t n = 1) = 0; + virtual SwigPyIterator *decr(size_t = 1) + { + throw stop_iteration(); + } + virtual ptrdiff_t distance(const SwigPyIterator & ) const + { + throw std::invalid_argument("operation not supported"); + } + virtual bool equal (const SwigPyIterator & ) const + { + throw std::invalid_argument("operation not supported"); + } + virtual SwigPyIterator *copy() const = 0; + PyObject *next() + { + SWIG_Python_Thread_Block _swig_thread_block; + PyObject *obj = value(); + incr(); + _swig_thread_block.end(); + return obj; + } + PyObject *__next__() + { + return next(); + } + PyObject *previous() + { + SWIG_Python_Thread_Block _swig_thread_block; + decr(); + PyObject *obj = value(); + _swig_thread_block.end(); + return obj; + } + SwigPyIterator *advance(ptrdiff_t n) + { + return (n > 0) ? incr(n) : decr(-n); + } + bool operator == (const SwigPyIterator& x) const + { + return equal(x); + } + bool operator != (const SwigPyIterator& x) const + { + return ! operator==(x); + } + SwigPyIterator& operator += (ptrdiff_t n) + { + return *advance(n); + } + SwigPyIterator& operator -= (ptrdiff_t n) + { + return *advance(-n); + } + SwigPyIterator* operator + (ptrdiff_t n) const + { + return copy()->advance(n); + } + SwigPyIterator* operator - (ptrdiff_t n) const + { + return copy()->advance(-n); + } + ptrdiff_t operator - (const SwigPyIterator& x) const + { + return x.distance(*this); + } + static swig_type_info* descriptor() { + static int init = 0; + static swig_type_info* desc = 0; + if (!init) { + desc = SWIG_Python_TypeQuery("swig::SwigPyIterator *"); + init = 1; + } + return desc; + } + }; +} +static __attribute__ ((__unused__)) int +SWIG_AsVal_double (PyObject *obj, double *val) +{ + int res = -5; + if (((((PyObject*)(obj))->ob_type) == (&PyFloat_Type) || PyType_IsSubtype((((PyObject*)(obj))->ob_type), (&PyFloat_Type)))) { + if (val) *val = PyFloat_AsDouble(obj); + return (0); + } else if (((((obj)->ob_type)->tp_flags & ((1L<<23))) != 0)) { + if (val) *val = PyInt_AsLong(obj); + return (0); + } else if (((((((PyObject*)(obj))->ob_type))->tp_flags & ((1L<<24))) != 0)) { + double v = PyLong_AsDouble(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return (0); + } else { + PyErr_Clear(); + } + } + return res; +} +static __attribute__ ((__unused__)) inline int +SWIG_CanCastAsInteger(double *d, double min, double max) { + double x = *d; + if ((min <= x && x <= max)) { + double fx = floor(x); + double cx = ceil(x); + double rd = ((x - fx) < 0.5) ? fx : cx; + if (((*__errno_location ()) == 33) || ((*__errno_location ()) == 34)) { + (*__errno_location ()) = 0; + } else { + double summ, reps, diff; + if (rd < x) { + diff = x - rd; + } else if (rd > x) { + diff = rd - x; + } else { + return 1; + } + summ = rd + x; + reps = diff/summ; + if (reps < 8*2.2204460492503131e-16) { + *d = rd; + return 1; + } + } + } + return 0; +} +static __attribute__ ((__unused__)) int +SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) +{ + if (((((obj)->ob_type)->tp_flags & ((1L<<23))) != 0)) { + long v = PyInt_AsLong(obj); + if (v >= 0) { + if (val) *val = v; + return (0); + } else { + return -7; + } + } else if (((((((PyObject*)(obj))->ob_type))->tp_flags & ((1L<<24))) != 0)) { + unsigned long v = PyLong_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return (0); + } else { + PyErr_Clear(); + } + } + return -5; +} +static __attribute__ ((__unused__)) inline int +SWIG_AsVal_size_t (PyObject * obj, size_t *val) +{ + unsigned long v; + int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); + if ((res >= 0) && val) *val = static_cast< size_t >(v); + return res; +} +static __attribute__ ((__unused__)) inline PyObject * +SWIG_From_ptrdiff_t (ptrdiff_t value) +{ + return PyInt_FromLong (static_cast< long >(value)); +} +static __attribute__ ((__unused__)) inline PyObject* + SWIG_From_bool (bool value) +{ + return PyBool_FromLong(value ? 1 : 0); +} +static __attribute__ ((__unused__)) int +SWIG_AsVal_long (PyObject *obj, long* val) +{ + if (((((obj)->ob_type)->tp_flags & ((1L<<23))) != 0)) { + if (val) *val = PyInt_AsLong(obj); + return (0); + } else if (((((((PyObject*)(obj))->ob_type))->tp_flags & ((1L<<24))) != 0)) { + long v = PyLong_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return (0); + } else { + PyErr_Clear(); + } + } + return -5; +} +static __attribute__ ((__unused__)) inline int +SWIG_AsVal_ptrdiff_t (PyObject * obj, ptrdiff_t *val) +{ + long v; + int res = SWIG_AsVal_long (obj, val ? &v : 0); + if ((res >= 0) && val) *val = static_cast< ptrdiff_t >(v); + return res; +} + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + using ::div_t; + using ::ldiv_t; + using ::abort; + using ::abs; + using ::atexit; + using ::atof; + using ::atoi; + using ::atol; + using ::bsearch; + using ::calloc; + using ::div; + using ::exit; + using ::free; + using ::getenv; + using ::labs; + using ::ldiv; + using ::malloc; + using ::mblen; + using ::mbstowcs; + using ::mbtowc; + using ::qsort; + using ::rand; + using ::realloc; + using ::srand; + using ::strtod; + using ::strtol; + using ::strtoul; + using ::system; + using ::wcstombs; + using ::wctomb; + inline long + abs(long __i) { return labs(__i); } + inline ldiv_t + div(long __i, long __j) { return ldiv(__i, __j); } +} +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + using ::lldiv_t; + using ::_Exit; + inline long long + abs(long long __x) { return __x >= 0 ? __x : -__x; } + using ::llabs; + inline lldiv_t + div(long long __n, long long __d) + { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } + using ::lldiv; + using ::atoll; + using ::strtoll; + using ::strtoull; + using ::strtof; + using ::strtold; +} +namespace std __attribute__ ((__visibility__ ("default"))) { + using ::__gnu_cxx::lldiv_t; + using ::__gnu_cxx::_Exit; + using ::__gnu_cxx::abs; + using ::__gnu_cxx::llabs; + using ::__gnu_cxx::div; + using ::__gnu_cxx::lldiv; + using ::__gnu_cxx::atoll; + using ::__gnu_cxx::strtof; + using ::__gnu_cxx::strtoll; + using ::__gnu_cxx::strtoull; + using ::__gnu_cxx::strtold; +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + template + bool + binary_search(_FIter, _FIter, const _Tp&); + template + bool + binary_search(_FIter, _FIter, const _Tp&, _Compare); + template + _OIter + copy(_IIter, _IIter, _OIter); + template + _BIter2 + copy_backward(_BIter1, _BIter1, _BIter2); + template + pair<_FIter, _FIter> + equal_range(_FIter, _FIter, const _Tp&); + template + pair<_FIter, _FIter> + equal_range(_FIter, _FIter, const _Tp&, _Compare); + template + void + fill(_FIter, _FIter, const _Tp&); + template + _OIter + fill_n(_OIter, _Size, const _Tp&); + template + _FIter1 + find_end(_FIter1, _FIter1, _FIter2, _FIter2); + template + _FIter1 + find_end(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); + template + bool + includes(_IIter1, _IIter1, _IIter2, _IIter2); + template + bool + includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); + template + void + inplace_merge(_BIter, _BIter, _BIter); + template + void + inplace_merge(_BIter, _BIter, _BIter, _Compare); + template + void + iter_swap(_FIter1, _FIter2); + template + _FIter + lower_bound(_FIter, _FIter, const _Tp&); + template + _FIter + lower_bound(_FIter, _FIter, const _Tp&, _Compare); + template + void + make_heap(_RAIter, _RAIter); + template + void + make_heap(_RAIter, _RAIter, _Compare); + template + const _Tp& + max(const _Tp&, const _Tp&); + template + const _Tp& + max(const _Tp&, const _Tp&, _Compare); + template + const _Tp& + min(const _Tp&, const _Tp&); + template + const _Tp& + min(const _Tp&, const _Tp&, _Compare); + template + bool + next_permutation(_BIter, _BIter); + template + bool + next_permutation(_BIter, _BIter, _Compare); + template + _RAIter + partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter); + template + _RAIter + partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter, _Compare); + template + void + pop_heap(_RAIter, _RAIter); + template + void + pop_heap(_RAIter, _RAIter, _Compare); + template + bool + prev_permutation(_BIter, _BIter); + template + bool + prev_permutation(_BIter, _BIter, _Compare); + template + void + push_heap(_RAIter, _RAIter); + template + void + push_heap(_RAIter, _RAIter, _Compare); + template + _FIter + remove(_FIter, _FIter, const _Tp&); + template + _FIter + remove_if(_FIter, _FIter, _Predicate); + template + _OIter + remove_copy(_IIter, _IIter, _OIter, const _Tp&); + template + _OIter + remove_copy_if(_IIter, _IIter, _OIter, _Predicate); + template + _OIter + replace_copy(_IIter, _IIter, _OIter, const _Tp&, const _Tp&); + template + _OIter + replace_copy_if(_Iter, _Iter, _OIter, _Predicate, const _Tp&); + template + void + reverse(_BIter, _BIter); + template + _OIter + reverse_copy(_BIter, _BIter, _OIter); + template + void + rotate(_FIter, _FIter, _FIter); + template + _OIter + rotate_copy(_FIter, _FIter, _FIter, _OIter); + template + void + sort_heap(_RAIter, _RAIter); + template + void + sort_heap(_RAIter, _RAIter, _Compare); + template + _BIter + stable_partition(_BIter, _BIter, _Predicate); + template + void + swap(_Tp&, _Tp&); + template + void + swap(_Tp (&)[_Nm], _Tp (&)[_Nm]); + template + _FIter2 + swap_ranges(_FIter1, _FIter1, _FIter2); + template + _FIter + unique(_FIter, _FIter); + template + _FIter + unique(_FIter, _FIter, _BinaryPredicate); + template + _FIter + upper_bound(_FIter, _FIter, const _Tp&); + template + _FIter + upper_bound(_FIter, _FIter, const _Tp&, _Compare); +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + _FIter + adjacent_find(_FIter, _FIter); + template + _FIter + adjacent_find(_FIter, _FIter, _BinaryPredicate); + template + typename iterator_traits<_IIter>::difference_type + count(_IIter, _IIter, const _Tp&); + template + typename iterator_traits<_IIter>::difference_type + count_if(_IIter, _IIter, _Predicate); + template + bool + equal(_IIter1, _IIter1, _IIter2); + template + bool + equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate); + template + _IIter + find(_IIter, _IIter, const _Tp&); + template + _FIter1 + find_first_of(_FIter1, _FIter1, _FIter2, _FIter2); + template + _FIter1 + find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); + template + _IIter + find_if(_IIter, _IIter, _Predicate); + template + _Funct + for_each(_IIter, _IIter, _Funct); + template + void + generate(_FIter, _FIter, _Generator); + template + _OIter + generate_n(_OIter, _Size, _Generator); + template + bool + lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2); + template + bool + lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); + template + _FIter + max_element(_FIter, _FIter); + template + _FIter + max_element(_FIter, _FIter, _Compare); + template + _OIter + merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + template + _OIter + merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + template + _FIter + min_element(_FIter, _FIter); + template + _FIter + min_element(_FIter, _FIter, _Compare); + template + pair<_IIter1, _IIter2> + mismatch(_IIter1, _IIter1, _IIter2); + template + pair<_IIter1, _IIter2> + mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate); + template + void + nth_element(_RAIter, _RAIter, _RAIter); + template + void + nth_element(_RAIter, _RAIter, _RAIter, _Compare); + template + void + partial_sort(_RAIter, _RAIter, _RAIter); + template + void + partial_sort(_RAIter, _RAIter, _RAIter, _Compare); + template + _BIter + partition(_BIter, _BIter, _Predicate); + template + void + random_shuffle(_RAIter, _RAIter); + template + void + random_shuffle(_RAIter, _RAIter, _Generator&); + template + void + replace(_FIter, _FIter, const _Tp&, const _Tp&); + template + void + replace_if(_FIter, _FIter, _Predicate, const _Tp&); + template + _FIter1 + search(_FIter1, _FIter1, _FIter2, _FIter2); + template + _FIter1 + search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); + template + _FIter + search_n(_FIter, _FIter, _Size, const _Tp&); + template + _FIter + search_n(_FIter, _FIter, _Size, const _Tp&, _BinaryPredicate); + template + _OIter + set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + template + _OIter + set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + template + _OIter + set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + template + _OIter + set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + template + _OIter + set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + template + _OIter + set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, + _OIter, _Compare); + template + _OIter + set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + template + _OIter + set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + template + void + sort(_RAIter, _RAIter); + template + void + sort(_RAIter, _RAIter, _Compare); + template + void + stable_sort(_RAIter, _RAIter); + template + void + stable_sort(_RAIter, _RAIter, _Compare); + template + _OIter + transform(_IIter, _IIter, _OIter, _UnaryOperation); + template + _OIter + transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation); + template + _OIter + unique_copy(_IIter, _IIter, _OIter); + template + _OIter + unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate); +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + _Distance + __is_heap_until(_RandomAccessIterator __first, _Distance __n) + { + _Distance __parent = 0; + for (_Distance __child = 1; __child < __n; ++__child) + { + if (__first[__parent] < __first[__child]) + return __child; + if ((__child & 1) == 0) + ++__parent; + } + return __n; + } + template + _Distance + __is_heap_until(_RandomAccessIterator __first, _Distance __n, + _Compare __comp) + { + _Distance __parent = 0; + for (_Distance __child = 1; __child < __n; ++__child) + { + if (__comp(__first[__parent], __first[__child])) + return __child; + if ((__child & 1) == 0) + ++__parent; + } + return __n; + } + template + inline bool + __is_heap(_RandomAccessIterator __first, _Distance __n) + { return std::__is_heap_until(__first, __n) == __n; } + template + inline bool + __is_heap(_RandomAccessIterator __first, _Compare __comp, _Distance __n) + { return std::__is_heap_until(__first, __n, __comp) == __n; } + template + inline bool + __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { return std::__is_heap(__first, std::distance(__first, __last)); } + template + inline bool + __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { return std::__is_heap(__first, __comp, std::distance(__first, __last)); } + template + void + __push_heap(_RandomAccessIterator __first, + _Distance __holeIndex, _Distance __topIndex, _Tp __value) + { + _Distance __parent = (__holeIndex - 1) / 2; + while (__holeIndex > __topIndex && *(__first + __parent) < __value) + { + *(__first + __holeIndex) = (*(__first + __parent)); + __holeIndex = __parent; + __parent = (__holeIndex - 1) / 2; + } + *(__first + __holeIndex) = (__value); + } + template + inline void + push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + ; + ; + _ValueType __value = (*(__last - 1)); + std::__push_heap(__first, _DistanceType((__last - __first) - 1), + _DistanceType(0), (__value)); + } + template + void + __push_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __topIndex, _Tp __value, _Compare __comp) + { + _Distance __parent = (__holeIndex - 1) / 2; + while (__holeIndex > __topIndex + && __comp(*(__first + __parent), __value)) + { + *(__first + __holeIndex) = (*(__first + __parent)); + __holeIndex = __parent; + __parent = (__holeIndex - 1) / 2; + } + *(__first + __holeIndex) = (__value); + } + template + inline void + push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + ; + ; + _ValueType __value = (*(__last - 1)); + std::__push_heap(__first, _DistanceType((__last - __first) - 1), + _DistanceType(0), (__value), __comp); + } + template + void + __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __len, _Tp __value) + { + const _Distance __topIndex = __holeIndex; + _Distance __secondChild = __holeIndex; + while (__secondChild < (__len - 1) / 2) + { + __secondChild = 2 * (__secondChild + 1); + if (*(__first + __secondChild) < *(__first + (__secondChild - 1))) + __secondChild--; + *(__first + __holeIndex) = (*(__first + __secondChild)); + __holeIndex = __secondChild; + } + if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2) + { + __secondChild = 2 * (__secondChild + 1); + *(__first + __holeIndex) = (*(__first + (__secondChild - 1))); + __holeIndex = __secondChild - 1; + } + std::__push_heap(__first, __holeIndex, __topIndex, + (__value)); + } + template + inline void + __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _RandomAccessIterator __result) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + _ValueType __value = (*__result); + *__result = (*__first); + std::__adjust_heap(__first, _DistanceType(0), + _DistanceType(__last - __first), + (__value)); + } + template + inline void + pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + ; + ; + --__last; + std::__pop_heap(__first, __last, __last); + } + template + void + __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __len, _Tp __value, _Compare __comp) + { + const _Distance __topIndex = __holeIndex; + _Distance __secondChild = __holeIndex; + while (__secondChild < (__len - 1) / 2) + { + __secondChild = 2 * (__secondChild + 1); + if (__comp(*(__first + __secondChild), + *(__first + (__secondChild - 1)))) + __secondChild--; + *(__first + __holeIndex) = (*(__first + __secondChild)); + __holeIndex = __secondChild; + } + if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2) + { + __secondChild = 2 * (__secondChild + 1); + *(__first + __holeIndex) = (*(__first + (__secondChild - 1))); + __holeIndex = __secondChild - 1; + } + std::__push_heap(__first, __holeIndex, __topIndex, + (__value), __comp); + } + template + inline void + __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _RandomAccessIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + _ValueType __value = (*__result); + *__result = (*__first); + std::__adjust_heap(__first, _DistanceType(0), + _DistanceType(__last - __first), + (__value), __comp); + } + template + inline void + pop_heap(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + + ; + ; + --__last; + std::__pop_heap(__first, __last, __last, __comp); + } + template + void + make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + ; + if (__last - __first < 2) + return; + const _DistanceType __len = __last - __first; + _DistanceType __parent = (__len - 2) / 2; + while (true) + { + _ValueType __value = (*(__first + __parent)); + std::__adjust_heap(__first, __parent, __len, (__value)); + if (__parent == 0) + return; + __parent--; + } + } + template + void + make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + ; + if (__last - __first < 2) + return; + const _DistanceType __len = __last - __first; + _DistanceType __parent = (__len - 2) / 2; + while (true) + { + _ValueType __value = (*(__first + __parent)); + std::__adjust_heap(__first, __parent, __len, (__value), + __comp); + if (__parent == 0) + return; + __parent--; + } + } + template + void + sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + + + ; + ; + while (__last - __first > 1) + { + --__last; + std::__pop_heap(__first, __last, __last); + } + } + template + void + sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + + ; + ; + while (__last - __first > 1) + { + --__last; + std::__pop_heap(__first, __last, __last, __comp); + } + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + pair<_Tp*, ptrdiff_t> + get_temporary_buffer(ptrdiff_t __len) + { + const ptrdiff_t __max = + __gnu_cxx::__numeric_traits::__max / sizeof(_Tp); + if (__len > __max) + __len = __max; + while (__len > 0) + { + _Tp* __tmp = static_cast<_Tp*>(::operator new(__len * sizeof(_Tp), + std::nothrow)); + if (__tmp != 0) + return std::pair<_Tp*, ptrdiff_t>(__tmp, __len); + __len /= 2; + } + return std::pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0); + } + template + inline void + return_temporary_buffer(_Tp* __p) + { ::operator delete(__p, std::nothrow); } + template + class _Temporary_buffer + { + + public: + typedef _Tp value_type; + typedef value_type* pointer; + typedef pointer iterator; + typedef ptrdiff_t size_type; + protected: + size_type _M_original_len; + size_type _M_len; + pointer _M_buffer; + public: + size_type + size() const + { return _M_len; } + size_type + requested_size() const + { return _M_original_len; } + iterator + begin() + { return _M_buffer; } + iterator + end() + { return _M_buffer + _M_len; } + _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last); + ~_Temporary_buffer() + { + std::_Destroy(_M_buffer, _M_buffer + _M_len); + std::return_temporary_buffer(_M_buffer); + } + private: + _Temporary_buffer(const _Temporary_buffer&); + void + operator=(const _Temporary_buffer&); + }; + template + _Temporary_buffer<_ForwardIterator, _Tp>:: + _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) + : _M_original_len(std::distance(__first, __last)), + _M_len(0), _M_buffer(0) + { + try + { + std::pair __p(std::get_temporary_buffer< + value_type>(_M_original_len)); + _M_buffer = __p.first; + _M_len = __p.second; + if (!__is_pod(_Tp) && _M_len > 0) + std::uninitialized_fill_n(_M_buffer, _M_len, *__first); + } + catch(...) + { + std::return_temporary_buffer(_M_buffer); + _M_buffer = 0; + _M_len = 0; + throw; + } + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + inline const _Tp& + __median(const _Tp& __a, const _Tp& __b, const _Tp& __c) + { + + if (__a < __b) + if (__b < __c) + return __b; + else if (__a < __c) + return __c; + else + return __a; + else if (__a < __c) + return __a; + else if (__b < __c) + return __c; + else + return __b; + } + template + inline const _Tp& + __median(const _Tp& __a, const _Tp& __b, const _Tp& __c, _Compare __comp) + { + + if (__comp(__a, __b)) + if (__comp(__b, __c)) + return __b; + else if (__comp(__a, __c)) + return __c; + else + return __a; + else if (__comp(__a, __c)) + return __a; + else if (__comp(__b, __c)) + return __c; + else + return __b; + } + template + inline _InputIterator + __find(_InputIterator __first, _InputIterator __last, + const _Tp& __val, input_iterator_tag) + { + while (__first != __last && !(*__first == __val)) + ++__first; + return __first; + } + template + inline _InputIterator + __find_if(_InputIterator __first, _InputIterator __last, + _Predicate __pred, input_iterator_tag) + { + while (__first != __last && !bool(__pred(*__first))) + ++__first; + return __first; + } + template + _RandomAccessIterator + __find(_RandomAccessIterator __first, _RandomAccessIterator __last, + const _Tp& __val, random_access_iterator_tag) + { + typename iterator_traits<_RandomAccessIterator>::difference_type + __trip_count = (__last - __first) >> 2; + for (; __trip_count > 0; --__trip_count) + { + if (*__first == __val) + return __first; + ++__first; + if (*__first == __val) + return __first; + ++__first; + if (*__first == __val) + return __first; + ++__first; + if (*__first == __val) + return __first; + ++__first; + } + switch (__last - __first) + { + case 3: + if (*__first == __val) + return __first; + ++__first; + case 2: + if (*__first == __val) + return __first; + ++__first; + case 1: + if (*__first == __val) + return __first; + ++__first; + case 0: + default: + return __last; + } + } + template + _RandomAccessIterator + __find_if(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Predicate __pred, random_access_iterator_tag) + { + typename iterator_traits<_RandomAccessIterator>::difference_type + __trip_count = (__last - __first) >> 2; + for (; __trip_count > 0; --__trip_count) + { + if (__pred(*__first)) + return __first; + ++__first; + if (__pred(*__first)) + return __first; + ++__first; + if (__pred(*__first)) + return __first; + ++__first; + if (__pred(*__first)) + return __first; + ++__first; + } + switch (__last - __first) + { + case 3: + if (__pred(*__first)) + return __first; + ++__first; + case 2: + if (__pred(*__first)) + return __first; + ++__first; + case 1: + if (__pred(*__first)) + return __first; + ++__first; + case 0: + default: + return __last; + } + } + template + _ForwardIterator + __search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, const _Tp& __val, + std::forward_iterator_tag) + { + __first = std::find(__first, __last, __val); + while (__first != __last) + { + typename iterator_traits<_ForwardIterator>::difference_type + __n = __count; + _ForwardIterator __i = __first; + ++__i; + while (__i != __last && __n != 1 && *__i == __val) + { + ++__i; + --__n; + } + if (__n == 1) + return __first; + if (__i == __last) + return __last; + __first = std::find(++__i, __last, __val); + } + return __last; + } + template + _RandomAccessIter + __search_n(_RandomAccessIter __first, _RandomAccessIter __last, + _Integer __count, const _Tp& __val, + std::random_access_iterator_tag) + { + typedef typename std::iterator_traits<_RandomAccessIter>::difference_type + _DistanceType; + _DistanceType __tailSize = __last - __first; + const _DistanceType __pattSize = __count; + if (__tailSize < __pattSize) + return __last; + const _DistanceType __skipOffset = __pattSize - 1; + _RandomAccessIter __lookAhead = __first + __skipOffset; + __tailSize -= __pattSize; + while (1) + { + while (!(*__lookAhead == __val)) + { + if (__tailSize < __pattSize) + return __last; + __lookAhead += __pattSize; + __tailSize -= __pattSize; + } + _DistanceType __remainder = __skipOffset; + for (_RandomAccessIter __backTrack = __lookAhead - 1; + *__backTrack == __val; --__backTrack) + { + if (--__remainder == 0) + return (__lookAhead - __skipOffset); + } + if (__remainder > __tailSize) + return __last; + __lookAhead += __remainder; + __tailSize -= __remainder; + } + } + template + _ForwardIterator + __search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, const _Tp& __val, + _BinaryPredicate __binary_pred, std::forward_iterator_tag) + { + while (__first != __last && !bool(__binary_pred(*__first, __val))) + ++__first; + while (__first != __last) + { + typename iterator_traits<_ForwardIterator>::difference_type + __n = __count; + _ForwardIterator __i = __first; + ++__i; + while (__i != __last && __n != 1 && bool(__binary_pred(*__i, __val))) + { + ++__i; + --__n; + } + if (__n == 1) + return __first; + if (__i == __last) + return __last; + __first = ++__i; + while (__first != __last + && !bool(__binary_pred(*__first, __val))) + ++__first; + } + return __last; + } + template + _RandomAccessIter + __search_n(_RandomAccessIter __first, _RandomAccessIter __last, + _Integer __count, const _Tp& __val, + _BinaryPredicate __binary_pred, std::random_access_iterator_tag) + { + typedef typename std::iterator_traits<_RandomAccessIter>::difference_type + _DistanceType; + _DistanceType __tailSize = __last - __first; + const _DistanceType __pattSize = __count; + if (__tailSize < __pattSize) + return __last; + const _DistanceType __skipOffset = __pattSize - 1; + _RandomAccessIter __lookAhead = __first + __skipOffset; + __tailSize -= __pattSize; + while (1) + { + while (!bool(__binary_pred(*__lookAhead, __val))) + { + if (__tailSize < __pattSize) + return __last; + __lookAhead += __pattSize; + __tailSize -= __pattSize; + } + _DistanceType __remainder = __skipOffset; + for (_RandomAccessIter __backTrack = __lookAhead - 1; + __binary_pred(*__backTrack, __val); --__backTrack) + { + if (--__remainder == 0) + return (__lookAhead - __skipOffset); + } + if (__remainder > __tailSize) + return __last; + __lookAhead += __remainder; + __tailSize -= __remainder; + } + } + template + _ForwardIterator1 + __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + forward_iterator_tag, forward_iterator_tag) + { + if (__first2 == __last2) + return __last1; + else + { + _ForwardIterator1 __result = __last1; + while (1) + { + _ForwardIterator1 __new_result + = std::search(__first1, __last1, __first2, __last2); + if (__new_result == __last1) + return __result; + else + { + __result = __new_result; + __first1 = __new_result; + ++__first1; + } + } + } + } + template + _ForwardIterator1 + __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + forward_iterator_tag, forward_iterator_tag, + _BinaryPredicate __comp) + { + if (__first2 == __last2) + return __last1; + else + { + _ForwardIterator1 __result = __last1; + while (1) + { + _ForwardIterator1 __new_result + = std::search(__first1, __last1, __first2, + __last2, __comp); + if (__new_result == __last1) + return __result; + else + { + __result = __new_result; + __first1 = __new_result; + ++__first1; + } + } + } + } + template + _BidirectionalIterator1 + __find_end(_BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + bidirectional_iterator_tag, bidirectional_iterator_tag) + { + + + typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; + typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; + _RevIterator1 __rlast1(__first1); + _RevIterator2 __rlast2(__first2); + _RevIterator1 __rresult = std::search(_RevIterator1(__last1), + __rlast1, + _RevIterator2(__last2), + __rlast2); + if (__rresult == __rlast1) + return __last1; + else + { + _BidirectionalIterator1 __result = __rresult.base(); + std::advance(__result, -std::distance(__first2, __last2)); + return __result; + } + } + template + _BidirectionalIterator1 + __find_end(_BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + bidirectional_iterator_tag, bidirectional_iterator_tag, + _BinaryPredicate __comp) + { + + + typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; + typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; + _RevIterator1 __rlast1(__first1); + _RevIterator2 __rlast2(__first2); + _RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1, + _RevIterator2(__last2), __rlast2, + __comp); + if (__rresult == __rlast1) + return __last1; + else + { + _BidirectionalIterator1 __result = __rresult.base(); + std::advance(__result, -std::distance(__first2, __last2)); + return __result; + } + } + template + inline _ForwardIterator1 + find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2) + { + + + + ; + ; + return std::__find_end(__first1, __last1, __first2, __last2, + std::__iterator_category(__first1), + std::__iterator_category(__first2)); + } + template + inline _ForwardIterator1 + find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + _BinaryPredicate __comp) + { + + + + ; + ; + return std::__find_end(__first1, __last1, __first2, __last2, + std::__iterator_category(__first1), + std::__iterator_category(__first2), + __comp); + } + template + _OutputIterator + remove_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, const _Tp& __value) + { + + + + ; + for (; __first != __last; ++__first) + if (!(*__first == __value)) + { + *__result = *__first; + ++__result; + } + return __result; + } + template + _OutputIterator + remove_copy_if(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _Predicate __pred) + { + + + + ; + for (; __first != __last; ++__first) + if (!bool(__pred(*__first))) + { + *__result = *__first; + ++__result; + } + return __result; + } + template + _ForwardIterator + remove(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __value) + { + + + ; + __first = std::find(__first, __last, __value); + if(__first == __last) + return __first; + _ForwardIterator __result = __first; + ++__first; + for(; __first != __last; ++__first) + if(!(*__first == __value)) + { + *__result = (*__first); + ++__result; + } + return __result; + } + template + _ForwardIterator + remove_if(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + + + ; + __first = std::find_if(__first, __last, __pred); + if(__first == __last) + return __first; + _ForwardIterator __result = __first; + ++__first; + for(; __first != __last; ++__first) + if(!bool(__pred(*__first))) + { + *__result = (*__first); + ++__result; + } + return __result; + } + template + _ForwardIterator + unique(_ForwardIterator __first, _ForwardIterator __last) + { + + + ; + __first = std::adjacent_find(__first, __last); + if (__first == __last) + return __last; + _ForwardIterator __dest = __first; + ++__first; + while (++__first != __last) + if (!(*__dest == *__first)) + *++__dest = (*__first); + return ++__dest; + } + template + _ForwardIterator + unique(_ForwardIterator __first, _ForwardIterator __last, + _BinaryPredicate __binary_pred) + { + + + ; + __first = std::adjacent_find(__first, __last, __binary_pred); + if (__first == __last) + return __last; + _ForwardIterator __dest = __first; + ++__first; + while (++__first != __last) + if (!bool(__binary_pred(*__dest, *__first))) + *++__dest = (*__first); + return ++__dest; + } + template + _OutputIterator + __unique_copy(_ForwardIterator __first, _ForwardIterator __last, + _OutputIterator __result, + forward_iterator_tag, output_iterator_tag) + { + _ForwardIterator __next = __first; + *__result = *__first; + while (++__next != __last) + if (!(*__first == *__next)) + { + __first = __next; + *++__result = *__first; + } + return ++__result; + } + template + _OutputIterator + __unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + input_iterator_tag, output_iterator_tag) + { + typename iterator_traits<_InputIterator>::value_type __value = *__first; + *__result = __value; + while (++__first != __last) + if (!(__value == *__first)) + { + __value = *__first; + *++__result = __value; + } + return ++__result; + } + template + _ForwardIterator + __unique_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, + input_iterator_tag, forward_iterator_tag) + { + *__result = *__first; + while (++__first != __last) + if (!(*__result == *__first)) + *++__result = *__first; + return ++__result; + } + template + _OutputIterator + __unique_copy(_ForwardIterator __first, _ForwardIterator __last, + _OutputIterator __result, _BinaryPredicate __binary_pred, + forward_iterator_tag, output_iterator_tag) + { + + _ForwardIterator __next = __first; + *__result = *__first; + while (++__next != __last) + if (!bool(__binary_pred(*__first, *__next))) + { + __first = __next; + *++__result = *__first; + } + return ++__result; + } + template + _OutputIterator + __unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _BinaryPredicate __binary_pred, + input_iterator_tag, output_iterator_tag) + { + + typename iterator_traits<_InputIterator>::value_type __value = *__first; + *__result = __value; + while (++__first != __last) + if (!bool(__binary_pred(__value, *__first))) + { + __value = *__first; + *++__result = __value; + } + return ++__result; + } + template + _ForwardIterator + __unique_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _BinaryPredicate __binary_pred, + input_iterator_tag, forward_iterator_tag) + { + + *__result = *__first; + while (++__first != __last) + if (!bool(__binary_pred(*__result, *__first))) + *++__result = *__first; + return ++__result; + } + template + void + __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last, + bidirectional_iterator_tag) + { + while (true) + if (__first == __last || __first == --__last) + return; + else + { + std::iter_swap(__first, __last); + ++__first; + } + } + template + void + __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last, + random_access_iterator_tag) + { + if (__first == __last) + return; + --__last; + while (__first < __last) + { + std::iter_swap(__first, __last); + ++__first; + --__last; + } + } + template + inline void + reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) + { + + ; + std::__reverse(__first, __last, std::__iterator_category(__first)); + } + template + _OutputIterator + reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, + _OutputIterator __result) + { + + + ; + while (__first != __last) + { + --__last; + *__result = *__last; + ++__result; + } + return __result; + } + template + _EuclideanRingElement + __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n) + { + while (__n != 0) + { + _EuclideanRingElement __t = __m % __n; + __m = __n; + __n = __t; + } + return __m; + } + template + void + __rotate(_ForwardIterator __first, + _ForwardIterator __middle, + _ForwardIterator __last, + forward_iterator_tag) + { + if (__first == __middle || __last == __middle) + return; + _ForwardIterator __first2 = __middle; + do + { + std::iter_swap(__first, __first2); + ++__first; + ++__first2; + if (__first == __middle) + __middle = __first2; + } + while (__first2 != __last); + __first2 = __middle; + while (__first2 != __last) + { + std::iter_swap(__first, __first2); + ++__first; + ++__first2; + if (__first == __middle) + __middle = __first2; + else if (__first2 == __last) + __first2 = __middle; + } + } + template + void + __rotate(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + bidirectional_iterator_tag) + { + + if (__first == __middle || __last == __middle) + return; + std::__reverse(__first, __middle, bidirectional_iterator_tag()); + std::__reverse(__middle, __last, bidirectional_iterator_tag()); + while (__first != __middle && __middle != __last) + { + std::iter_swap(__first, --__last); + ++__first; + } + if (__first == __middle) + std::__reverse(__middle, __last, bidirectional_iterator_tag()); + else + std::__reverse(__first, __middle, bidirectional_iterator_tag()); + } + template + void + __rotate(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last, + random_access_iterator_tag) + { + + if (__first == __middle || __last == __middle) + return; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _Distance; + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + const _Distance __n = __last - __first; + const _Distance __k = __middle - __first; + const _Distance __l = __n - __k; + if (__k == __l) + { + std::swap_ranges(__first, __middle, __middle); + return; + } + const _Distance __d = std::__gcd(__n, __k); + for (_Distance __i = 0; __i < __d; __i++) + { + _ValueType __tmp = (*__first); + _RandomAccessIterator __p = __first; + if (__k < __l) + { + for (_Distance __j = 0; __j < __l / __d; __j++) + { + if (__p > __first + __l) + { + *__p = (*(__p - __l)); + __p -= __l; + } + *__p = (*(__p + __k)); + __p += __k; + } + } + else + { + for (_Distance __j = 0; __j < __k / __d - 1; __j ++) + { + if (__p < __last - __k) + { + *__p = (*(__p + __k)); + __p += __k; + } + *__p = (*(__p - __l)); + __p -= __l; + } + } + *__p = (__tmp); + ++__first; + } + } + template + inline void + rotate(_ForwardIterator __first, _ForwardIterator __middle, + _ForwardIterator __last) + { + + ; + ; + typedef typename iterator_traits<_ForwardIterator>::iterator_category + _IterType; + std::__rotate(__first, __middle, __last, _IterType()); + } + template + _OutputIterator + rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, + _ForwardIterator __last, _OutputIterator __result) + { + + + ; + ; + return std::copy(__first, __middle, + std::copy(__middle, __last, __result)); + } + template + _ForwardIterator + __partition(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred, forward_iterator_tag) + { + if (__first == __last) + return __first; + while (__pred(*__first)) + if (++__first == __last) + return __first; + _ForwardIterator __next = __first; + while (++__next != __last) + if (__pred(*__next)) + { + std::iter_swap(__first, __next); + ++__first; + } + return __first; + } + template + _BidirectionalIterator + __partition(_BidirectionalIterator __first, _BidirectionalIterator __last, + _Predicate __pred, bidirectional_iterator_tag) + { + while (true) + { + while (true) + if (__first == __last) + return __first; + else if (__pred(*__first)) + ++__first; + else + break; + --__last; + while (true) + if (__first == __last) + return __first; + else if (!bool(__pred(*__last))) + --__last; + else + break; + std::iter_swap(__first, __last); + ++__first; + } + } + template + _ForwardIterator + __inplace_stable_partition(_ForwardIterator __first, + _ForwardIterator __last, + _Predicate __pred, _Distance __len) + { + if (__len == 1) + return __pred(*__first) ? __last : __first; + _ForwardIterator __middle = __first; + std::advance(__middle, __len / 2); + _ForwardIterator __begin = std::__inplace_stable_partition(__first, + __middle, + __pred, + __len / 2); + _ForwardIterator __end = std::__inplace_stable_partition(__middle, __last, + __pred, + __len + - __len / 2); + std::rotate(__begin, __middle, __end); + std::advance(__begin, std::distance(__middle, __end)); + return __begin; + } + template + _ForwardIterator + __stable_partition_adaptive(_ForwardIterator __first, + _ForwardIterator __last, + _Predicate __pred, _Distance __len, + _Pointer __buffer, + _Distance __buffer_size) + { + if (__len <= __buffer_size) + { + _ForwardIterator __result1 = __first; + _Pointer __result2 = __buffer; + for (; __first != __last; ++__first) + if (__pred(*__first)) + { + *__result1 = *__first; + ++__result1; + } + else + { + *__result2 = *__first; + ++__result2; + } + std::copy(__buffer, __result2, __result1); + return __result1; + } + else + { + _ForwardIterator __middle = __first; + std::advance(__middle, __len / 2); + _ForwardIterator __begin = + std::__stable_partition_adaptive(__first, __middle, __pred, + __len / 2, __buffer, + __buffer_size); + _ForwardIterator __end = + std::__stable_partition_adaptive(__middle, __last, __pred, + __len - __len / 2, + __buffer, __buffer_size); + std::rotate(__begin, __middle, __end); + std::advance(__begin, std::distance(__middle, __end)); + return __begin; + } + } + template + _ForwardIterator + stable_partition(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + + + ; + if (__first == __last) + return __first; + else + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + _Temporary_buffer<_ForwardIterator, _ValueType> __buf(__first, + __last); + if (__buf.size() > 0) + return + std::__stable_partition_adaptive(__first, __last, __pred, + _DistanceType(__buf.requested_size()), + __buf.begin(), + _DistanceType(__buf.size())); + else + return + std::__inplace_stable_partition(__first, __last, __pred, + _DistanceType(__buf.requested_size())); + } + } + template + void + __heap_select(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last) + { + std::make_heap(__first, __middle); + for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) + if (*__i < *__first) + std::__pop_heap(__first, __middle, __i); + } + template + void + __heap_select(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last, _Compare __comp) + { + std::make_heap(__first, __middle, __comp); + for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) + if (__comp(*__i, *__first)) + std::__pop_heap(__first, __middle, __i, __comp); + } + template + _RandomAccessIterator + partial_sort_copy(_InputIterator __first, _InputIterator __last, + _RandomAccessIterator __result_first, + _RandomAccessIterator __result_last) + { + typedef typename iterator_traits<_InputIterator>::value_type + _InputValueType; + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _OutputValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + ; + ; + if (__result_first == __result_last) + return __result_last; + _RandomAccessIterator __result_real_last = __result_first; + while(__first != __last && __result_real_last != __result_last) + { + *__result_real_last = *__first; + ++__result_real_last; + ++__first; + } + std::make_heap(__result_first, __result_real_last); + while (__first != __last) + { + if (*__first < *__result_first) + std::__adjust_heap(__result_first, _DistanceType(0), + _DistanceType(__result_real_last + - __result_first), + _InputValueType(*__first)); + ++__first; + } + std::sort_heap(__result_first, __result_real_last); + return __result_real_last; + } + template + _RandomAccessIterator + partial_sort_copy(_InputIterator __first, _InputIterator __last, + _RandomAccessIterator __result_first, + _RandomAccessIterator __result_last, + _Compare __comp) + { + typedef typename iterator_traits<_InputIterator>::value_type + _InputValueType; + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _OutputValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + + ; + ; + if (__result_first == __result_last) + return __result_last; + _RandomAccessIterator __result_real_last = __result_first; + while(__first != __last && __result_real_last != __result_last) + { + *__result_real_last = *__first; + ++__result_real_last; + ++__first; + } + std::make_heap(__result_first, __result_real_last, __comp); + while (__first != __last) + { + if (__comp(*__first, *__result_first)) + std::__adjust_heap(__result_first, _DistanceType(0), + _DistanceType(__result_real_last + - __result_first), + _InputValueType(*__first), + __comp); + ++__first; + } + std::sort_heap(__result_first, __result_real_last, __comp); + return __result_real_last; + } + template + void + __unguarded_linear_insert(_RandomAccessIterator __last, _Tp __val) + { + _RandomAccessIterator __next = __last; + --__next; + while (__val < *__next) + { + *__last = *__next; + __last = __next; + --__next; + } + *__last = __val; + } + template + void + __unguarded_linear_insert(_RandomAccessIterator __last, _Tp __val, + _Compare __comp) + { + _RandomAccessIterator __next = __last; + --__next; + while (__comp(__val, *__next)) + { + *__last = *__next; + __last = __next; + --__next; + } + *__last = __val; + } + template + void + __insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last) + { + if (__first == __last) + return; + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + { + typename iterator_traits<_RandomAccessIterator>::value_type + __val = *__i; + if (__val < *__first) + { + std::copy_backward(__first, __i, __i + 1); + *__first = __val; + } + else + std::__unguarded_linear_insert(__i, __val); + } + } + template + void + __insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + if (__first == __last) return; + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + { + typename iterator_traits<_RandomAccessIterator>::value_type + __val = *__i; + if (__comp(__val, *__first)) + { + std::copy_backward(__first, __i, __i + 1); + *__first = __val; + } + else + std::__unguarded_linear_insert(__i, __val, __comp); + } + } + template + inline void + __unguarded_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + for (_RandomAccessIterator __i = __first; __i != __last; ++__i) + std::__unguarded_linear_insert(__i, _ValueType(*__i)); + } + template + inline void + __unguarded_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + for (_RandomAccessIterator __i = __first; __i != __last; ++__i) + std::__unguarded_linear_insert(__i, _ValueType(*__i), __comp); + } + enum { _S_threshold = 16 }; + template + void + __final_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last) + { + if (__last - __first > int(_S_threshold)) + { + std::__insertion_sort(__first, __first + int(_S_threshold)); + std::__unguarded_insertion_sort(__first + int(_S_threshold), __last); + } + else + std::__insertion_sort(__first, __last); + } + template + void + __final_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + if (__last - __first > int(_S_threshold)) + { + std::__insertion_sort(__first, __first + int(_S_threshold), __comp); + std::__unguarded_insertion_sort(__first + int(_S_threshold), __last, + __comp); + } + else + std::__insertion_sort(__first, __last, __comp); + } + template + _RandomAccessIterator + __unguarded_partition(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Tp __pivot) + { + while (true) + { + while (*__first < __pivot) + ++__first; + --__last; + while (__pivot < *__last) + --__last; + if (!(__first < __last)) + return __first; + std::iter_swap(__first, __last); + ++__first; + } + } + template + _RandomAccessIterator + __unguarded_partition(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Tp __pivot, _Compare __comp) + { + while (true) + { + while (__comp(*__first, __pivot)) + ++__first; + --__last; + while (__comp(__pivot, *__last)) + --__last; + if (!(__first < __last)) + return __first; + std::iter_swap(__first, __last); + ++__first; + } + } + template + void + __introsort_loop(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Size __depth_limit) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + while (__last - __first > int(_S_threshold)) + { + if (__depth_limit == 0) + { + std::partial_sort(__first, __last, __last); + return; + } + --__depth_limit; + _RandomAccessIterator __cut = + std::__unguarded_partition(__first, __last, + _ValueType(std::__median(*__first, + *(__first + + (__last + - __first) + / 2), + *(__last + - 1)))); + std::__introsort_loop(__cut, __last, __depth_limit); + __last = __cut; + } + } + template + void + __introsort_loop(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Size __depth_limit, _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + while (__last - __first > int(_S_threshold)) + { + if (__depth_limit == 0) + { + std::partial_sort(__first, __last, __last, __comp); + return; + } + --__depth_limit; + _RandomAccessIterator __cut = + std::__unguarded_partition(__first, __last, + _ValueType(std::__median(*__first, + *(__first + + (__last + - __first) + / 2), + *(__last - 1), + __comp)), + __comp); + std::__introsort_loop(__cut, __last, __depth_limit, __comp); + __last = __cut; + } + } + template + inline _Size + __lg(_Size __n) + { + _Size __k; + for (__k = 0; __n != 0; __n >>= 1) + ++__k; + return __k - 1; + } + inline int + __lg(int __n) + { return sizeof(int) * 8 - 1 - __builtin_clz(__n); } + inline long + __lg(long __n) + { return sizeof(long) * 8 - 1 - __builtin_clzl(__n); } + inline long long + __lg(long long __n) + { return sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } + template + void + __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last, _Size __depth_limit) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + while (__last - __first > 3) + { + if (__depth_limit == 0) + { + std::__heap_select(__first, __nth + 1, __last); + std::iter_swap(__first, __nth); + return; + } + --__depth_limit; + _RandomAccessIterator __cut = + std::__unguarded_partition(__first, __last, + _ValueType(std::__median(*__first, + *(__first + + (__last + - __first) + / 2), + *(__last + - 1)))); + if (__cut <= __nth) + __first = __cut; + else + __last = __cut; + } + std::__insertion_sort(__first, __last); + } + template + void + __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last, _Size __depth_limit, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + while (__last - __first > 3) + { + if (__depth_limit == 0) + { + std::__heap_select(__first, __nth + 1, __last, __comp); + std::iter_swap(__first, __nth); + return; + } + --__depth_limit; + _RandomAccessIterator __cut = + std::__unguarded_partition(__first, __last, + _ValueType(std::__median(*__first, + *(__first + + (__last + - __first) + / 2), + *(__last - 1), + __comp)), + __comp); + if (__cut <= __nth) + __first = __cut; + else + __last = __cut; + } + std::__insertion_sort(__first, __last, __comp); + } + template + _ForwardIterator + lower_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + ; + _DistanceType __len = std::distance(__first, __last); + _DistanceType __half; + _ForwardIterator __middle; + while (__len > 0) + { + __half = __len >> 1; + __middle = __first; + std::advance(__middle, __half); + if (*__middle < __val) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else + __len = __half; + } + return __first; + } + template + _ForwardIterator + lower_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + ; + _DistanceType __len = std::distance(__first, __last); + _DistanceType __half; + _ForwardIterator __middle; + while (__len > 0) + { + __half = __len >> 1; + __middle = __first; + std::advance(__middle, __half); + if (__comp(*__middle, __val)) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else + __len = __half; + } + return __first; + } + template + _ForwardIterator + upper_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + ; + _DistanceType __len = std::distance(__first, __last); + _DistanceType __half; + _ForwardIterator __middle; + while (__len > 0) + { + __half = __len >> 1; + __middle = __first; + std::advance(__middle, __half); + if (__val < *__middle) + __len = __half; + else + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + } + return __first; + } + template + _ForwardIterator + upper_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + ; + _DistanceType __len = std::distance(__first, __last); + _DistanceType __half; + _ForwardIterator __middle; + while (__len > 0) + { + __half = __len >> 1; + __middle = __first; + std::advance(__middle, __half); + if (__comp(__val, *__middle)) + __len = __half; + else + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + } + return __first; + } + template + pair<_ForwardIterator, _ForwardIterator> + equal_range(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + + ; + ; + _DistanceType __len = std::distance(__first, __last); + _DistanceType __half; + _ForwardIterator __middle, __left, __right; + while (__len > 0) + { + __half = __len >> 1; + __middle = __first; + std::advance(__middle, __half); + if (*__middle < __val) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else if (__val < *__middle) + __len = __half; + else + { + __left = std::lower_bound(__first, __middle, __val); + std::advance(__first, __len); + __right = std::upper_bound(++__middle, __first, __val); + return pair<_ForwardIterator, _ForwardIterator>(__left, __right); + } + } + return pair<_ForwardIterator, _ForwardIterator>(__first, __first); + } + template + pair<_ForwardIterator, _ForwardIterator> + equal_range(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, + _Compare __comp) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + + ; + ; + _DistanceType __len = std::distance(__first, __last); + _DistanceType __half; + _ForwardIterator __middle, __left, __right; + while (__len > 0) + { + __half = __len >> 1; + __middle = __first; + std::advance(__middle, __half); + if (__comp(*__middle, __val)) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else if (__comp(__val, *__middle)) + __len = __half; + else + { + __left = std::lower_bound(__first, __middle, __val, __comp); + std::advance(__first, __len); + __right = std::upper_bound(++__middle, __first, __val, __comp); + return pair<_ForwardIterator, _ForwardIterator>(__left, __right); + } + } + return pair<_ForwardIterator, _ForwardIterator>(__first, __first); + } + template + bool + binary_search(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + + ; + ; + _ForwardIterator __i = std::lower_bound(__first, __last, __val); + return __i != __last && !(__val < *__i); + } + template + bool + binary_search(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + + ; + ; + _ForwardIterator __i = std::lower_bound(__first, __last, __val, __comp); + return __i != __last && !bool(__comp(__val, *__i)); + } + template + _BidirectionalIterator3 + __merge_backward(_BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + _BidirectionalIterator3 __result) + { + if (__first1 == __last1) + return std::copy_backward(__first2, __last2, __result); + if (__first2 == __last2) + return std::copy_backward(__first1, __last1, __result); + --__last1; + --__last2; + while (true) + { + if (*__last2 < *__last1) + { + *--__result = *__last1; + if (__first1 == __last1) + return std::copy_backward(__first2, ++__last2, __result); + --__last1; + } + else + { + *--__result = *__last2; + if (__first2 == __last2) + return std::copy_backward(__first1, ++__last1, __result); + --__last2; + } + } + } + template + _BidirectionalIterator3 + __merge_backward(_BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + _BidirectionalIterator3 __result, + _Compare __comp) + { + if (__first1 == __last1) + return std::copy_backward(__first2, __last2, __result); + if (__first2 == __last2) + return std::copy_backward(__first1, __last1, __result); + --__last1; + --__last2; + while (true) + { + if (__comp(*__last2, *__last1)) + { + *--__result = *__last1; + if (__first1 == __last1) + return std::copy_backward(__first2, ++__last2, __result); + --__last1; + } + else + { + *--__result = *__last2; + if (__first2 == __last2) + return std::copy_backward(__first1, ++__last1, __result); + --__last2; + } + } + } + template + _BidirectionalIterator1 + __rotate_adaptive(_BidirectionalIterator1 __first, + _BidirectionalIterator1 __middle, + _BidirectionalIterator1 __last, + _Distance __len1, _Distance __len2, + _BidirectionalIterator2 __buffer, + _Distance __buffer_size) + { + _BidirectionalIterator2 __buffer_end; + if (__len1 > __len2 && __len2 <= __buffer_size) + { + __buffer_end = std::copy(__middle, __last, __buffer); + std::copy_backward(__first, __middle, __last); + return std::copy(__buffer, __buffer_end, __first); + } + else if (__len1 <= __buffer_size) + { + __buffer_end = std::copy(__first, __middle, __buffer); + std::copy(__middle, __last, __first); + return std::copy_backward(__buffer, __buffer_end, __last); + } + else + { + std::rotate(__first, __middle, __last); + std::advance(__first, std::distance(__middle, __last)); + return __first; + } + } + template + void + __merge_adaptive(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Distance __len1, _Distance __len2, + _Pointer __buffer, _Distance __buffer_size) + { + if (__len1 <= __len2 && __len1 <= __buffer_size) + { + _Pointer __buffer_end = std::copy(__first, __middle, __buffer); + std::merge(__buffer, __buffer_end, __middle, __last, + __first); + } + else if (__len2 <= __buffer_size) + { + _Pointer __buffer_end = std::copy(__middle, __last, __buffer); + std::__merge_backward(__first, __middle, __buffer, + __buffer_end, __last); + } + else + { + _BidirectionalIterator __first_cut = __first; + _BidirectionalIterator __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) + { + __len11 = __len1 / 2; + std::advance(__first_cut, __len11); + __second_cut = std::lower_bound(__middle, __last, + *__first_cut); + __len22 = std::distance(__middle, __second_cut); + } + else + { + __len22 = __len2 / 2; + std::advance(__second_cut, __len22); + __first_cut = std::upper_bound(__first, __middle, + *__second_cut); + __len11 = std::distance(__first, __first_cut); + } + _BidirectionalIterator __new_middle = + std::__rotate_adaptive(__first_cut, __middle, __second_cut, + __len1 - __len11, __len22, __buffer, + __buffer_size); + std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, + __len22, __buffer, __buffer_size); + std::__merge_adaptive(__new_middle, __second_cut, __last, + __len1 - __len11, + __len2 - __len22, __buffer, __buffer_size); + } + } + template + void + __merge_adaptive(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Distance __len1, _Distance __len2, + _Pointer __buffer, _Distance __buffer_size, + _Compare __comp) + { + if (__len1 <= __len2 && __len1 <= __buffer_size) + { + _Pointer __buffer_end = std::copy(__first, __middle, __buffer); + std::merge(__buffer, __buffer_end, __middle, __last, + __first, __comp); + } + else if (__len2 <= __buffer_size) + { + _Pointer __buffer_end = std::copy(__middle, __last, __buffer); + std::__merge_backward(__first, __middle, __buffer, __buffer_end, + __last, __comp); + } + else + { + _BidirectionalIterator __first_cut = __first; + _BidirectionalIterator __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) + { + __len11 = __len1 / 2; + std::advance(__first_cut, __len11); + __second_cut = std::lower_bound(__middle, __last, *__first_cut, + __comp); + __len22 = std::distance(__middle, __second_cut); + } + else + { + __len22 = __len2 / 2; + std::advance(__second_cut, __len22); + __first_cut = std::upper_bound(__first, __middle, *__second_cut, + __comp); + __len11 = std::distance(__first, __first_cut); + } + _BidirectionalIterator __new_middle = + std::__rotate_adaptive(__first_cut, __middle, __second_cut, + __len1 - __len11, __len22, __buffer, + __buffer_size); + std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, + __len22, __buffer, __buffer_size, __comp); + std::__merge_adaptive(__new_middle, __second_cut, __last, + __len1 - __len11, + __len2 - __len22, __buffer, + __buffer_size, __comp); + } + } + template + void + __merge_without_buffer(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Distance __len1, _Distance __len2) + { + if (__len1 == 0 || __len2 == 0) + return; + if (__len1 + __len2 == 2) + { + if (*__middle < *__first) + std::iter_swap(__first, __middle); + return; + } + _BidirectionalIterator __first_cut = __first; + _BidirectionalIterator __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) + { + __len11 = __len1 / 2; + std::advance(__first_cut, __len11); + __second_cut = std::lower_bound(__middle, __last, *__first_cut); + __len22 = std::distance(__middle, __second_cut); + } + else + { + __len22 = __len2 / 2; + std::advance(__second_cut, __len22); + __first_cut = std::upper_bound(__first, __middle, *__second_cut); + __len11 = std::distance(__first, __first_cut); + } + std::rotate(__first_cut, __middle, __second_cut); + _BidirectionalIterator __new_middle = __first_cut; + std::advance(__new_middle, std::distance(__middle, __second_cut)); + std::__merge_without_buffer(__first, __first_cut, __new_middle, + __len11, __len22); + std::__merge_without_buffer(__new_middle, __second_cut, __last, + __len1 - __len11, __len2 - __len22); + } + template + void + __merge_without_buffer(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Distance __len1, _Distance __len2, + _Compare __comp) + { + if (__len1 == 0 || __len2 == 0) + return; + if (__len1 + __len2 == 2) + { + if (__comp(*__middle, *__first)) + std::iter_swap(__first, __middle); + return; + } + _BidirectionalIterator __first_cut = __first; + _BidirectionalIterator __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) + { + __len11 = __len1 / 2; + std::advance(__first_cut, __len11); + __second_cut = std::lower_bound(__middle, __last, *__first_cut, + __comp); + __len22 = std::distance(__middle, __second_cut); + } + else + { + __len22 = __len2 / 2; + std::advance(__second_cut, __len22); + __first_cut = std::upper_bound(__first, __middle, *__second_cut, + __comp); + __len11 = std::distance(__first, __first_cut); + } + std::rotate(__first_cut, __middle, __second_cut); + _BidirectionalIterator __new_middle = __first_cut; + std::advance(__new_middle, std::distance(__middle, __second_cut)); + std::__merge_without_buffer(__first, __first_cut, __new_middle, + __len11, __len22, __comp); + std::__merge_without_buffer(__new_middle, __second_cut, __last, + __len1 - __len11, __len2 - __len22, __comp); + } + template + void + inplace_merge(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last) + { + typedef typename iterator_traits<_BidirectionalIterator>::value_type + _ValueType; + typedef typename iterator_traits<_BidirectionalIterator>::difference_type + _DistanceType; + + + ; + ; + if (__first == __middle || __middle == __last) + return; + _DistanceType __len1 = std::distance(__first, __middle); + _DistanceType __len2 = std::distance(__middle, __last); + _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first, + __last); + if (__buf.begin() == 0) + std::__merge_without_buffer(__first, __middle, __last, __len1, __len2); + else + std::__merge_adaptive(__first, __middle, __last, __len1, __len2, + __buf.begin(), _DistanceType(__buf.size())); + } + template + void + inplace_merge(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_BidirectionalIterator>::value_type + _ValueType; + typedef typename iterator_traits<_BidirectionalIterator>::difference_type + _DistanceType; + + + ; + ; + if (__first == __middle || __middle == __last) + return; + const _DistanceType __len1 = std::distance(__first, __middle); + const _DistanceType __len2 = std::distance(__middle, __last); + _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first, + __last); + if (__buf.begin() == 0) + std::__merge_without_buffer(__first, __middle, __last, __len1, + __len2, __comp); + else + std::__merge_adaptive(__first, __middle, __last, __len1, __len2, + __buf.begin(), _DistanceType(__buf.size()), + __comp); + } + template + void + __merge_sort_loop(_RandomAccessIterator1 __first, + _RandomAccessIterator1 __last, + _RandomAccessIterator2 __result, + _Distance __step_size) + { + const _Distance __two_step = 2 * __step_size; + while (__last - __first >= __two_step) + { + __result = std::merge(__first, __first + __step_size, + __first + __step_size, + __first + __two_step, + __result); + __first += __two_step; + } + __step_size = std::min(_Distance(__last - __first), __step_size); + std::merge(__first, __first + __step_size, + __first + __step_size, __last, + __result); + } + template + void + __merge_sort_loop(_RandomAccessIterator1 __first, + _RandomAccessIterator1 __last, + _RandomAccessIterator2 __result, _Distance __step_size, + _Compare __comp) + { + const _Distance __two_step = 2 * __step_size; + while (__last - __first >= __two_step) + { + __result = std::merge(__first, __first + __step_size, + __first + __step_size, __first + __two_step, + __result, + __comp); + __first += __two_step; + } + __step_size = std::min(_Distance(__last - __first), __step_size); + std::merge(__first, __first + __step_size, + __first + __step_size, __last, __result, __comp); + } + template + void + __chunk_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Distance __chunk_size) + { + while (__last - __first >= __chunk_size) + { + std::__insertion_sort(__first, __first + __chunk_size); + __first += __chunk_size; + } + std::__insertion_sort(__first, __last); + } + template + void + __chunk_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Distance __chunk_size, _Compare __comp) + { + while (__last - __first >= __chunk_size) + { + std::__insertion_sort(__first, __first + __chunk_size, __comp); + __first += __chunk_size; + } + std::__insertion_sort(__first, __last, __comp); + } + enum { _S_chunk_size = 7 }; + template + void + __merge_sort_with_buffer(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Pointer __buffer) + { + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _Distance; + const _Distance __len = __last - __first; + const _Pointer __buffer_last = __buffer + __len; + _Distance __step_size = _S_chunk_size; + std::__chunk_insertion_sort(__first, __last, __step_size); + while (__step_size < __len) + { + std::__merge_sort_loop(__first, __last, __buffer, __step_size); + __step_size *= 2; + std::__merge_sort_loop(__buffer, __buffer_last, __first, __step_size); + __step_size *= 2; + } + } + template + void + __merge_sort_with_buffer(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Pointer __buffer, _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _Distance; + const _Distance __len = __last - __first; + const _Pointer __buffer_last = __buffer + __len; + _Distance __step_size = _S_chunk_size; + std::__chunk_insertion_sort(__first, __last, __step_size, __comp); + while (__step_size < __len) + { + std::__merge_sort_loop(__first, __last, __buffer, + __step_size, __comp); + __step_size *= 2; + std::__merge_sort_loop(__buffer, __buffer_last, __first, + __step_size, __comp); + __step_size *= 2; + } + } + template + void + __stable_sort_adaptive(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Pointer __buffer, _Distance __buffer_size) + { + const _Distance __len = (__last - __first + 1) / 2; + const _RandomAccessIterator __middle = __first + __len; + if (__len > __buffer_size) + { + std::__stable_sort_adaptive(__first, __middle, + __buffer, __buffer_size); + std::__stable_sort_adaptive(__middle, __last, + __buffer, __buffer_size); + } + else + { + std::__merge_sort_with_buffer(__first, __middle, __buffer); + std::__merge_sort_with_buffer(__middle, __last, __buffer); + } + std::__merge_adaptive(__first, __middle, __last, + _Distance(__middle - __first), + _Distance(__last - __middle), + __buffer, __buffer_size); + } + template + void + __stable_sort_adaptive(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Pointer __buffer, _Distance __buffer_size, + _Compare __comp) + { + const _Distance __len = (__last - __first + 1) / 2; + const _RandomAccessIterator __middle = __first + __len; + if (__len > __buffer_size) + { + std::__stable_sort_adaptive(__first, __middle, __buffer, + __buffer_size, __comp); + std::__stable_sort_adaptive(__middle, __last, __buffer, + __buffer_size, __comp); + } + else + { + std::__merge_sort_with_buffer(__first, __middle, __buffer, __comp); + std::__merge_sort_with_buffer(__middle, __last, __buffer, __comp); + } + std::__merge_adaptive(__first, __middle, __last, + _Distance(__middle - __first), + _Distance(__last - __middle), + __buffer, __buffer_size, + __comp); + } + template + void + __inplace_stable_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last) + { + if (__last - __first < 15) + { + std::__insertion_sort(__first, __last); + return; + } + _RandomAccessIterator __middle = __first + (__last - __first) / 2; + std::__inplace_stable_sort(__first, __middle); + std::__inplace_stable_sort(__middle, __last); + std::__merge_without_buffer(__first, __middle, __last, + __middle - __first, + __last - __middle); + } + template + void + __inplace_stable_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + if (__last - __first < 15) + { + std::__insertion_sort(__first, __last, __comp); + return; + } + _RandomAccessIterator __middle = __first + (__last - __first) / 2; + std::__inplace_stable_sort(__first, __middle, __comp); + std::__inplace_stable_sort(__middle, __last, __comp); + std::__merge_without_buffer(__first, __middle, __last, + __middle - __first, + __last - __middle, + __comp); + } + template + bool + includes(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + ; + ; + while (__first1 != __last1 && __first2 != __last2) + if (*__first2 < *__first1) + return false; + else if(*__first1 < *__first2) + ++__first1; + else + ++__first1, ++__first2; + return __first2 == __last2; + } + template + bool + includes(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + ; + ; + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first2, *__first1)) + return false; + else if(__comp(*__first1, *__first2)) + ++__first1; + else + ++__first1, ++__first2; + return __first2 == __last2; + } + template + bool + next_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last) + { + + + ; + if (__first == __last) + return false; + _BidirectionalIterator __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + for(;;) + { + _BidirectionalIterator __ii = __i; + --__i; + if (*__i < *__ii) + { + _BidirectionalIterator __j = __last; + while (!(*__i < *--__j)) + {} + std::iter_swap(__i, __j); + std::reverse(__ii, __last); + return true; + } + if (__i == __first) + { + std::reverse(__first, __last); + return false; + } + } + } + template + bool + next_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last, _Compare __comp) + { + + + ; + if (__first == __last) + return false; + _BidirectionalIterator __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + for(;;) + { + _BidirectionalIterator __ii = __i; + --__i; + if (__comp(*__i, *__ii)) + { + _BidirectionalIterator __j = __last; + while (!bool(__comp(*__i, *--__j))) + {} + std::iter_swap(__i, __j); + std::reverse(__ii, __last); + return true; + } + if (__i == __first) + { + std::reverse(__first, __last); + return false; + } + } + } + template + bool + prev_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last) + { + + + ; + if (__first == __last) + return false; + _BidirectionalIterator __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + for(;;) + { + _BidirectionalIterator __ii = __i; + --__i; + if (*__ii < *__i) + { + _BidirectionalIterator __j = __last; + while (!(*--__j < *__i)) + {} + std::iter_swap(__i, __j); + std::reverse(__ii, __last); + return true; + } + if (__i == __first) + { + std::reverse(__first, __last); + return false; + } + } + } + template + bool + prev_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last, _Compare __comp) + { + + + ; + if (__first == __last) + return false; + _BidirectionalIterator __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + for(;;) + { + _BidirectionalIterator __ii = __i; + --__i; + if (__comp(*__ii, *__i)) + { + _BidirectionalIterator __j = __last; + while (!bool(__comp(*--__j, *__i))) + {} + std::iter_swap(__i, __j); + std::reverse(__ii, __last); + return true; + } + if (__i == __first) + { + std::reverse(__first, __last); + return false; + } + } + } + template + _OutputIterator + replace_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + const _Tp& __old_value, const _Tp& __new_value) + { + + + + ; + for (; __first != __last; ++__first, ++__result) + if (*__first == __old_value) + *__result = __new_value; + else + *__result = *__first; + return __result; + } + template + _OutputIterator + replace_copy_if(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + _Predicate __pred, const _Tp& __new_value) + { + + + + ; + for (; __first != __last; ++__first, ++__result) + if (__pred(*__first)) + *__result = __new_value; + else + *__result = *__first; + return __result; + } +} +namespace std __attribute__ ((__visibility__ ("default"))) { + template + _Function + for_each(_InputIterator __first, _InputIterator __last, _Function __f) + { + + ; + for (; __first != __last; ++__first) + __f(*__first); + return __f; + } + template + inline _InputIterator + find(_InputIterator __first, _InputIterator __last, + const _Tp& __val) + { + + + ; + return std::__find(__first, __last, __val, + std::__iterator_category(__first)); + } + template + inline _InputIterator + find_if(_InputIterator __first, _InputIterator __last, + _Predicate __pred) + { + + + ; + return std::__find_if(__first, __last, __pred, + std::__iterator_category(__first)); + } + template + _InputIterator + find_first_of(_InputIterator __first1, _InputIterator __last1, + _ForwardIterator __first2, _ForwardIterator __last2) + { + + + + ; + ; + for (; __first1 != __last1; ++__first1) + for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) + if (*__first1 == *__iter) + return __first1; + return __last1; + } + template + _InputIterator + find_first_of(_InputIterator __first1, _InputIterator __last1, + _ForwardIterator __first2, _ForwardIterator __last2, + _BinaryPredicate __comp) + { + + + + ; + ; + for (; __first1 != __last1; ++__first1) + for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) + if (__comp(*__first1, *__iter)) + return __first1; + return __last1; + } + template + _ForwardIterator + adjacent_find(_ForwardIterator __first, _ForwardIterator __last) + { + + + ; + if (__first == __last) + return __last; + _ForwardIterator __next = __first; + while(++__next != __last) + { + if (*__first == *__next) + return __first; + __first = __next; + } + return __last; + } + template + _ForwardIterator + adjacent_find(_ForwardIterator __first, _ForwardIterator __last, + _BinaryPredicate __binary_pred) + { + + + ; + if (__first == __last) + return __last; + _ForwardIterator __next = __first; + while(++__next != __last) + { + if (__binary_pred(*__first, *__next)) + return __first; + __first = __next; + } + return __last; + } + template + typename iterator_traits<_InputIterator>::difference_type + count(_InputIterator __first, _InputIterator __last, const _Tp& __value) + { + + + ; + typename iterator_traits<_InputIterator>::difference_type __n = 0; + for (; __first != __last; ++__first) + if (*__first == __value) + ++__n; + return __n; + } + template + typename iterator_traits<_InputIterator>::difference_type + count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) + { + + + ; + typename iterator_traits<_InputIterator>::difference_type __n = 0; + for (; __first != __last; ++__first) + if (__pred(*__first)) + ++__n; + return __n; + } + template + _ForwardIterator1 + search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2) + { + + + + ; + ; + if (__first1 == __last1 || __first2 == __last2) + return __first1; + _ForwardIterator2 __p1(__first2); + if (++__p1 == __last2) + return std::find(__first1, __last1, *__first2); + _ForwardIterator2 __p; + _ForwardIterator1 __current = __first1; + for (;;) + { + __first1 = std::find(__first1, __last1, *__first2); + if (__first1 == __last1) + return __last1; + __p = __p1; + __current = __first1; + if (++__current == __last1) + return __last1; + while (*__current == *__p) + { + if (++__p == __last2) + return __first1; + if (++__current == __last1) + return __last1; + } + ++__first1; + } + return __first1; + } + template + _ForwardIterator1 + search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + _BinaryPredicate __predicate) + { + + + + ; + ; + if (__first1 == __last1 || __first2 == __last2) + return __first1; + _ForwardIterator2 __p1(__first2); + if (++__p1 == __last2) + { + while (__first1 != __last1 + && !bool(__predicate(*__first1, *__first2))) + ++__first1; + return __first1; + } + _ForwardIterator2 __p; + _ForwardIterator1 __current = __first1; + for (;;) + { + while (__first1 != __last1 + && !bool(__predicate(*__first1, *__first2))) + ++__first1; + if (__first1 == __last1) + return __last1; + __p = __p1; + __current = __first1; + if (++__current == __last1) + return __last1; + while (__predicate(*__current, *__p)) + { + if (++__p == __last2) + return __first1; + if (++__current == __last1) + return __last1; + } + ++__first1; + } + return __first1; + } + template + _ForwardIterator + search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, const _Tp& __val) + { + + + ; + if (__count <= 0) + return __first; + if (__count == 1) + return std::find(__first, __last, __val); + return std::__search_n(__first, __last, __count, __val, + std::__iterator_category(__first)); + } + template + _ForwardIterator + search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, const _Tp& __val, + _BinaryPredicate __binary_pred) + { + + + ; + if (__count <= 0) + return __first; + if (__count == 1) + { + while (__first != __last && !bool(__binary_pred(*__first, __val))) + ++__first; + return __first; + } + return std::__search_n(__first, __last, __count, __val, __binary_pred, + std::__iterator_category(__first)); + } + template + _OutputIterator + transform(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _UnaryOperation __unary_op) + { + + + ; + for (; __first != __last; ++__first, ++__result) + *__result = __unary_op(*__first); + return __result; + } + template + _OutputIterator + transform(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _OutputIterator __result, + _BinaryOperation __binary_op) + { + + + + ; + for (; __first1 != __last1; ++__first1, ++__first2, ++__result) + *__result = __binary_op(*__first1, *__first2); + return __result; + } + template + void + replace(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __old_value, const _Tp& __new_value) + { + + + + ; + for (; __first != __last; ++__first) + if (*__first == __old_value) + *__first = __new_value; + } + template + void + replace_if(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred, const _Tp& __new_value) + { + + + + ; + for (; __first != __last; ++__first) + if (__pred(*__first)) + *__first = __new_value; + } + template + void + generate(_ForwardIterator __first, _ForwardIterator __last, + _Generator __gen) + { + + + ; + for (; __first != __last; ++__first) + *__first = __gen(); + } + template + _OutputIterator + generate_n(_OutputIterator __first, _Size __n, _Generator __gen) + { + + for (; __n > 0; --__n, ++__first) + *__first = __gen(); + return __first; + } + template + inline _OutputIterator + unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result) + { + + + + ; + if (__first == __last) + return __result; + return std::__unique_copy(__first, __last, __result, + std::__iterator_category(__first), + std::__iterator_category(__result)); + } + template + inline _OutputIterator + unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + _BinaryPredicate __binary_pred) + { + + + ; + if (__first == __last) + return __result; + return std::__unique_copy(__first, __last, __result, __binary_pred, + std::__iterator_category(__first), + std::__iterator_category(__result)); + } + template + inline void + random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + + ; + if (__first != __last) + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + std::iter_swap(__i, __first + (std::rand() % ((__i - __first) + 1))); + } + template + void + random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, + _RandomNumberGenerator& __rand) + { + + ; + if (__first == __last) + return; + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + std::iter_swap(__i, __first + __rand((__i - __first) + 1)); + } + template + inline _ForwardIterator + partition(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + + + ; + return std::__partition(__first, __last, __pred, + std::__iterator_category(__first)); + } + template + inline void + partial_sort(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + ; + ; + std::__heap_select(__first, __middle, __last); + std::sort_heap(__first, __middle); + } + template + inline void + partial_sort(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + ; + ; + std::__heap_select(__first, __middle, __last, __comp); + std::sort_heap(__first, __middle, __comp); + } + template + inline void + nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + ; + ; + if (__first == __last || __nth == __last) + return; + std::__introselect(__first, __nth, __last, + std::__lg(__last - __first) * 2); + } + template + inline void + nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last, _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + ; + ; + if (__first == __last || __nth == __last) + return; + std::__introselect(__first, __nth, __last, + std::__lg(__last - __first) * 2, __comp); + } + template + inline void + sort(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + ; + if (__first != __last) + { + std::__introsort_loop(__first, __last, + std::__lg(__last - __first) * 2); + std::__final_insertion_sort(__first, __last); + } + } + template + inline void + sort(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + ; + if (__first != __last) + { + std::__introsort_loop(__first, __last, + std::__lg(__last - __first) * 2, __comp); + std::__final_insertion_sort(__first, __last, __comp); + } + } + template + _OutputIterator + merge(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + ; + ; + while (__first1 != __last1 && __first2 != __last2) + { + if (*__first2 < *__first1) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + } + ++__result; + } + return std::copy(__first2, __last2, std::copy(__first1, __last1, + __result)); + } + template + _OutputIterator + merge(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + ; + ; + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(*__first2, *__first1)) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + } + ++__result; + } + return std::copy(__first2, __last2, std::copy(__first1, __last1, + __result)); + } + template + inline void + stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + ; + _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first, + __last); + if (__buf.begin() == 0) + std::__inplace_stable_sort(__first, __last); + else + std::__stable_sort_adaptive(__first, __last, __buf.begin(), + _DistanceType(__buf.size())); + } + template + inline void + stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + ; + _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first, + __last); + if (__buf.begin() == 0) + std::__inplace_stable_sort(__first, __last, __comp); + else + std::__stable_sort_adaptive(__first, __last, __buf.begin(), + _DistanceType(__buf.size()), __comp); + } + template + _OutputIterator + set_union(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + ; + ; + while (__first1 != __last1 && __first2 != __last2) + { + if (*__first1 < *__first2) + { + *__result = *__first1; + ++__first1; + } + else if (*__first2 < *__first1) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + ++__first2; + } + ++__result; + } + return std::copy(__first2, __last2, std::copy(__first1, __last1, + __result)); + } + template + _OutputIterator + set_union(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + ; + ; + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(*__first1, *__first2)) + { + *__result = *__first1; + ++__first1; + } + else if (__comp(*__first2, *__first1)) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + ++__first2; + } + ++__result; + } + return std::copy(__first2, __last2, std::copy(__first1, __last1, + __result)); + } + template + _OutputIterator + set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + ; + ; + while (__first1 != __last1 && __first2 != __last2) + if (*__first1 < *__first2) + ++__first1; + else if (*__first2 < *__first1) + ++__first2; + else + { + *__result = *__first1; + ++__first1; + ++__first2; + ++__result; + } + return __result; + } + template + _OutputIterator + set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + ; + ; + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first1, *__first2)) + ++__first1; + else if (__comp(*__first2, *__first1)) + ++__first2; + else + { + *__result = *__first1; + ++__first1; + ++__first2; + ++__result; + } + return __result; + } + template + _OutputIterator + set_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + ; + ; + while (__first1 != __last1 && __first2 != __last2) + if (*__first1 < *__first2) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (*__first2 < *__first1) + ++__first2; + else + { + ++__first1; + ++__first2; + } + return std::copy(__first1, __last1, __result); + } + template + _OutputIterator + set_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + ; + ; + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first1, *__first2)) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (__comp(*__first2, *__first1)) + ++__first2; + else + { + ++__first1; + ++__first2; + } + return std::copy(__first1, __last1, __result); + } + template + _OutputIterator + set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + ; + ; + while (__first1 != __last1 && __first2 != __last2) + if (*__first1 < *__first2) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (*__first2 < *__first1) + { + *__result = *__first2; + ++__first2; + ++__result; + } + else + { + ++__first1; + ++__first2; + } + return std::copy(__first2, __last2, std::copy(__first1, + __last1, __result)); + } + template + _OutputIterator + set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, + _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + ; + ; + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first1, *__first2)) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (__comp(*__first2, *__first1)) + { + *__result = *__first2; + ++__first2; + ++__result; + } + else + { + ++__first1; + ++__first2; + } + return std::copy(__first2, __last2, + std::copy(__first1, __last1, __result)); + } + template + _ForwardIterator + min_element(_ForwardIterator __first, _ForwardIterator __last) + { + + + ; + if (__first == __last) + return __first; + _ForwardIterator __result = __first; + while (++__first != __last) + if (*__first < *__result) + __result = __first; + return __result; + } + template + _ForwardIterator + min_element(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + + + ; + if (__first == __last) + return __first; + _ForwardIterator __result = __first; + while (++__first != __last) + if (__comp(*__first, *__result)) + __result = __first; + return __result; + } + template + _ForwardIterator + max_element(_ForwardIterator __first, _ForwardIterator __last) + { + + + ; + if (__first == __last) + return __first; + _ForwardIterator __result = __first; + while (++__first != __last) + if (*__result < *__first) + __result = __first; + return __result; + } + template + _ForwardIterator + max_element(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + + + ; + if (__first == __last) return __first; + _ForwardIterator __result = __first; + while (++__first != __last) + if (__comp(*__result, *__first)) + __result = __first; + return __result; + } +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + namespace rel_ops + { + template + inline bool + operator!=(const _Tp& __x, const _Tp& __y) + { return !(__x == __y); } + template + inline bool + operator>(const _Tp& __x, const _Tp& __y) + { return __y < __x; } + template + inline bool + operator<=(const _Tp& __x, const _Tp& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const _Tp& __x, const _Tp& __y) + { return !(__x < __y); } + } +} +static __attribute__ ((__unused__)) inline PyObject* +SWIG_From_unsigned_SS_long (unsigned long value) +{ + return (value > 9223372036854775807L) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value)); +} +static __attribute__ ((__unused__)) inline PyObject * +SWIG_From_unsigned_SS_int (unsigned int value) +{ + return SWIG_From_unsigned_SS_long (value); +} +namespace Xapian { + Query *get_py_query(PyObject *obj) { + PyObject * mythis = PyObject_GetAttrString(obj, "this"); + if (!mythis) + return 0; + Query * retval = 0; + int res = SWIG_Python_ConvertPtrAndOwn(mythis, (void **)&retval, swig_types[40], 0, 0); + if (!(res >= 0)) { + retval = 0; + } + if ( --((PyObject*)(mythis))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(mythis)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(mythis)))); + return retval; + } +} +static __attribute__ ((__unused__)) inline PyObject * +SWIG_From_int (int value) +{ + return PyInt_FromLong (value); +} +PyObject *Xapian_MSet_items_get(Xapian::MSet *mset) +{ + PyObject *retval = PyList_New(mset->size()); + if (retval == 0) { + return __null; + } + Py_ssize_t idx = 0; + for (Xapian::MSetIterator i = mset->begin(); i != mset->end(); ++i) { + PyObject *t = PyTuple_New(4); + if (!t) { + if ( --((PyObject*)(retval))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(retval)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(retval)))); + return __null; + } + (((PyListObject *)(retval))->ob_item[idx++] = (t)); + (((PyTupleObject *)(t))->ob_item[0] = PyInt_FromLong(*i)); + (((PyTupleObject *)(t))->ob_item[1] = PyFloat_FromDouble(i.get_weight())); + (((PyTupleObject *)(t))->ob_item[2] = PyInt_FromLong(i.get_rank())); + (((PyTupleObject *)(t))->ob_item[3] = PyInt_FromLong(i.get_percent())); + } + return retval; +} +PyObject *Xapian_ESet_items_get(Xapian::ESet *eset) +{ + PyObject *retval = PyList_New(eset->size()); + if (retval == 0) { + return __null; + } + Py_ssize_t idx = 0; + for (Xapian::ESetIterator i = eset->begin(); i != eset->end(); ++i) { + PyObject *t = PyTuple_New(2); + if (!t) { + if ( --((PyObject*)(retval))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(retval)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(retval)))); + return __null; + } + (((PyListObject *)(retval))->ob_item[idx++] = (t)); + PyObject * str = PyString_FromStringAndSize((*i).data(), (*i).size()); + if (str == 0) { + if ( --((PyObject*)(retval))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(retval)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(retval)))); + return __null; + } + (((PyTupleObject *)(t))->ob_item[0] = str); + (((PyTupleObject *)(t))->ob_item[1] = PyFloat_FromDouble(i.get_weight())); + } + return retval; +} +static __attribute__ ((__unused__)) int +SWIG_AsPtr_std_string (PyObject * obj, std::string **val); +static __attribute__ ((__unused__)) int +SWIG_anystring_as_ptr(PyObject ** obj, std::string **val) +{ + if (((((((PyObject*)(*obj))->ob_type))->tp_flags & ((1L<<28))) != 0)) { + PyObject * strobj = PyUnicodeUCS4_EncodeUTF8((((PyUnicodeObject *)(*obj))->str), (((PyUnicodeObject *)(*obj))->length), "ignore"); + if (strobj == __null) return (-1); + int res = SWIG_AsPtr_std_string(strobj, val); + if ( --((PyObject*)(strobj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(strobj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(strobj)))); + return res; + } else { + return SWIG_AsPtr_std_string(*obj, val); + } +} +static __attribute__ ((__unused__)) swig_type_info* +SWIG_pchar_descriptor(void) +{ + static int init = 0; + static swig_type_info* info = 0; + if (!init) { + info = SWIG_Python_TypeQuery("_p_char"); + init = 1; + } + return info; +} +static __attribute__ ((__unused__)) inline PyObject * +SWIG_FromCharPtrAndSize(const char* carray, size_t size) +{ + if (carray) { + if (size > 2147483647) { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + return pchar_descriptor ? + SWIG_Python_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); + } else { + return PyString_FromStringAndSize(carray, static_cast< int >(size)); + } + } else { + return SWIG_Py_Void(); + } +} +static __attribute__ ((__unused__)) inline PyObject * +SWIG_FromCharPtr(const char *cptr) +{ + return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); +} +static __attribute__ ((__unused__)) inline PyObject * +SWIG_From_std_string (const std::string& s) +{ + if (s.size()) { + return SWIG_FromCharPtrAndSize(s.data(), s.size()); + } else { + return SWIG_FromCharPtrAndSize(s.c_str(), 0); + } +} +static __attribute__ ((__unused__)) std::string Xapian_Error___str__(Xapian::Error const *self){ + std::string desc(self->get_msg()); + if (!self->get_context().empty()) { + desc += " (context: "; + desc += self->get_context(); + desc += ')'; + } + if (self->get_error_string()) { + desc += " ("; + desc += self->get_error_string(); + desc += ')'; + } + return desc; + } +static __attribute__ ((__unused__)) int +SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) +{ + if (((((((PyObject*)(obj))->ob_type))->tp_flags & ((1L<<27))) != 0)) + { + char *cstr; Py_ssize_t len; + PyString_AsStringAndSize(obj, &cstr, &len); + if (cptr) { + if (alloc) { + if (*alloc == ((0) | ((1 << 8) << 1))) + { + *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1))); + *alloc = ((0) | ((1 << 8) << 1)); + } + else { + *cptr = cstr; + *alloc = ((0)); + } + } else { + *cptr = SWIG_Python_str_AsChar(obj); + } + } + if (psize) *psize = len + 1; + return (0); + } else { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + if (pchar_descriptor) { + void* vptr = 0; + if (SWIG_Python_ConvertPtrAndOwn(obj, &vptr, pchar_descriptor, 0, 0) == (0)) { + if (cptr) *cptr = (char *) vptr; + if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; + if (alloc) *alloc = ((0)); + return (0); + } + } + } + return -5; +} +static __attribute__ ((__unused__)) int +SWIG_AsVal_int (PyObject * obj, int *val) +{ + long v; + int res = SWIG_AsVal_long (obj, &v); + if ((res >= 0)) { + if ((v < (-2147483647 - 1) || v > 2147483647)) { + return -7; + } else { + if (val) *val = static_cast< int >(v); + } + } + return res; +} +namespace Xapian { +__attribute__ ((visibility("default"))) void SetPythonException() { + try { + throw; + } catch (Swig::DirectorException &e) { + } catch (const Xapian::RangeError &e) { + SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(swig_types[44]), SWIG_Python_NewPointerObj((new Xapian::RangeError(e)), swig_types[44], 0x1)); + } catch (const Xapian::SerialisationError &e) { + SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(swig_types[47]), SWIG_Python_NewPointerObj((new Xapian::SerialisationError(e)), swig_types[47], 0x1)); + } catch (const Xapian::QueryParserError &e) { + SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(swig_types[42]), SWIG_Python_NewPointerObj((new Xapian::QueryParserError(e)), swig_types[42], 0x1)); + } catch (const Xapian::NetworkTimeoutError &e) { + SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(swig_types[35]), SWIG_Python_NewPointerObj((new Xapian::NetworkTimeoutError(e)), swig_types[35], 0x1)); + } catch (const Xapian::NetworkError &e) { + SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(swig_types[34]), SWIG_Python_NewPointerObj((new Xapian::NetworkError(e)), swig_types[34], 0x1)); + } catch (const Xapian::InternalError &e) { + SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(swig_types[23]), SWIG_Python_NewPointerObj((new Xapian::InternalError(e)), swig_types[23], 0x1)); + } catch (const Xapian::FeatureUnavailableError &e) { + SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(swig_types[21]), SWIG_Python_NewPointerObj((new Xapian::FeatureUnavailableError(e)), swig_types[21], 0x1)); + } catch (const Xapian::DocNotFoundError &e) { + SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(swig_types[14]), SWIG_Python_NewPointerObj((new Xapian::DocNotFoundError(e)), swig_types[14], 0x1)); + } catch (const Xapian::DatabaseVersionError &e) { + SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(swig_types[11]), SWIG_Python_NewPointerObj((new Xapian::DatabaseVersionError(e)), swig_types[11], 0x1)); + } catch (const Xapian::DatabaseOpeningError &e) { + SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(swig_types[10]), SWIG_Python_NewPointerObj((new Xapian::DatabaseOpeningError(e)), swig_types[10], 0x1)); + } catch (const Xapian::DatabaseModifiedError &e) { + SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(swig_types[9]), SWIG_Python_NewPointerObj((new Xapian::DatabaseModifiedError(e)), swig_types[9], 0x1)); + } catch (const Xapian::DatabaseLockError &e) { + SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(swig_types[8]), SWIG_Python_NewPointerObj((new Xapian::DatabaseLockError(e)), swig_types[8], 0x1)); + } catch (const Xapian::DatabaseCreateError &e) { + SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(swig_types[6]), SWIG_Python_NewPointerObj((new Xapian::DatabaseCreateError(e)), swig_types[6], 0x1)); + } catch (const Xapian::DatabaseCorruptError &e) { + SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(swig_types[5]), SWIG_Python_NewPointerObj((new Xapian::DatabaseCorruptError(e)), swig_types[5], 0x1)); + } catch (const Xapian::DatabaseError &e) { + SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(swig_types[7]), SWIG_Python_NewPointerObj((new Xapian::DatabaseError(e)), swig_types[7], 0x1)); + } catch (const Xapian::UnimplementedError &e) { + SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(swig_types[57]), SWIG_Python_NewPointerObj((new Xapian::UnimplementedError(e)), swig_types[57], 0x1)); + } catch (const Xapian::InvalidOperationError &e) { + SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(swig_types[25]), SWIG_Python_NewPointerObj((new Xapian::InvalidOperationError(e)), swig_types[25], 0x1)); + } catch (const Xapian::InvalidArgumentError &e) { + SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(swig_types[24]), SWIG_Python_NewPointerObj((new Xapian::InvalidArgumentError(e)), swig_types[24], 0x1)); + } catch (const Xapian::AssertionError &e) { + SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(swig_types[0]), SWIG_Python_NewPointerObj((new Xapian::AssertionError(e)), swig_types[0], 0x1)); + } catch (const Xapian::RuntimeError &e) { + SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(swig_types[46]), SWIG_Python_NewPointerObj((new Xapian::RuntimeError(e)), swig_types[46], 0x1)); + } catch (const Xapian::LogicError &e) { + SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(swig_types[27]), SWIG_Python_NewPointerObj((new Xapian::LogicError(e)), swig_types[27], 0x1)); + } catch (const Xapian::Error &e) { + SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(swig_types[19]), SWIG_Python_NewPointerObj((new Xapian::Error(e)), swig_types[19], 0x1)); + } catch (const std::exception& e) { + SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-3), e.what()); + } catch (...) { + SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-1), "unknown error in Xapian"); + } +} +}; +static __attribute__ ((__unused__)) Xapian::termpos Xapian_PositionIterator_get_termpos(Xapian::PositionIterator const *self){ + return *(*self); + } +static __attribute__ ((__unused__)) void Xapian_PositionIterator_next(Xapian::PositionIterator *self){ ++(*self); } +static __attribute__ ((__unused__)) bool Xapian_PositionIterator_equals(Xapian::PositionIterator const *self,Xapian::PositionIterator const &other){ + return (*self) == other; + } +static __attribute__ ((__unused__)) int +SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) +{ + unsigned long v; + int res = SWIG_AsVal_unsigned_SS_long (obj, &v); + if ((res >= 0)) { + if ((v > (2147483647 * 2U + 1U))) { + return -7; + } else { + if (val) *val = static_cast< unsigned int >(v); + } + } + return res; +} +static __attribute__ ((__unused__)) bool Xapian_PositionIterator___eq__(Xapian::PositionIterator *self,Xapian::PositionIterator const &other){ + return (*self)==other; + } +static __attribute__ ((__unused__)) bool Xapian_PositionIterator___ne__(Xapian::PositionIterator *self,Xapian::PositionIterator const &other){ + return (*self)!=other; + } +static __attribute__ ((__unused__)) bool Xapian_PostingIterator___eq__(Xapian::PostingIterator *self,Xapian::PostingIterator const &other){ + return (*self)==other; + } +static __attribute__ ((__unused__)) bool Xapian_PostingIterator___ne__(Xapian::PostingIterator *self,Xapian::PostingIterator const &other){ + return (*self)!=other; + } +static __attribute__ ((__unused__)) Xapian::docid Xapian_PostingIterator_get_docid(Xapian::PostingIterator const *self){ + return *(*self); + } +static __attribute__ ((__unused__)) void Xapian_PostingIterator_next(Xapian::PostingIterator *self){ ++(*self); } +static __attribute__ ((__unused__)) bool Xapian_PostingIterator_equals(Xapian::PostingIterator const *self,Xapian::PostingIterator const &other){ + return (*self) == other; + } +static __attribute__ ((__unused__)) std::string Xapian_TermIterator_get_term(Xapian::TermIterator const *self){ + return *(*self); + } +static __attribute__ ((__unused__)) void Xapian_TermIterator_next(Xapian::TermIterator *self){ ++(*self); } +static __attribute__ ((__unused__)) bool Xapian_TermIterator_equals(Xapian::TermIterator const *self,Xapian::TermIterator const &other){ + return (*self) == other; + } +static __attribute__ ((__unused__)) bool Xapian_TermIterator___eq__(Xapian::TermIterator *self,Xapian::TermIterator const &other){ + return (*self)==other; + } +static __attribute__ ((__unused__)) bool Xapian_TermIterator___ne__(Xapian::TermIterator *self,Xapian::TermIterator const &other){ + return (*self)!=other; + } +static __attribute__ ((__unused__)) std::string Xapian_ValueIterator_get_value(Xapian::ValueIterator const *self){ + return *(*self); + } +static __attribute__ ((__unused__)) void Xapian_ValueIterator_next(Xapian::ValueIterator *self){ ++(*self); } +static __attribute__ ((__unused__)) bool Xapian_ValueIterator_equals(Xapian::ValueIterator const *self,Xapian::ValueIterator const &other){ + return (*self) == other; + } +static __attribute__ ((__unused__)) bool Xapian_ValueIterator___eq__(Xapian::ValueIterator *self,Xapian::ValueIterator const &other){ + return (*self)==other; + } +static __attribute__ ((__unused__)) bool Xapian_ValueIterator___ne__(Xapian::ValueIterator *self,Xapian::ValueIterator const &other){ + return (*self)!=other; + } +static __attribute__ ((__unused__)) int +SWIG_AsVal_bool (PyObject *obj, bool *val) +{ + int r = PyObject_IsTrue(obj); + if (r == -1) + return (-1); + if (val) *val = r ? true : false; + return (0); +} +static __attribute__ ((__unused__)) int +SWIG_AsPtr_std_string (PyObject * obj, std::string **val) +{ + char* buf = 0 ; size_t size = 0; int alloc = ((0)); + if (((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)) >= 0)) { + if (buf) { + if (val) *val = new std::string(buf, size - 1); + if (alloc == ((0) | ((1 << 8) << 1))) delete[] buf; + return ((0) | ((1 << 8) << 1)); + } else { + if (val) *val = 0; + return ((0)); + } + } else { + static int init = 0; + static swig_type_info* descriptor = 0; + if (!init) { + descriptor = SWIG_Python_TypeQuery("std::string" " *"); + init = 1; + } + if (descriptor) { + std::string *vptr; + int res = SWIG_Python_ConvertPtrAndOwn(obj, (void**)&vptr, descriptor, 0, 0); + if ((res >= 0) && val) *val = vptr; + return res; + } + } + return (-1); +} +static __attribute__ ((__unused__)) Xapian::MSetIterator Xapian_MSet_get_hit(Xapian::MSet const *self,Xapian::doccount i){ + return ((*self)[i]); + } +static __attribute__ ((__unused__)) int Xapian_MSet_get_document_percentage(Xapian::MSet const *self,Xapian::doccount i){ + return (*self).convert_to_percent( ((*self)[i]) ); + } +static __attribute__ ((__unused__)) Xapian::Document const Xapian_MSet_get_document(Xapian::MSet const *self,Xapian::doccount i){ + return ((*self)[i]).get_document(); + } +static __attribute__ ((__unused__)) Xapian::docid Xapian_MSet_get_docid(Xapian::MSet const *self,Xapian::doccount i){ + return *((*self)[i]); + } +static __attribute__ ((__unused__)) int Xapian_MSet___cmp__(Xapian::MSet *self,Xapian::MSet const &other){ + if (self->get_max_possible() != other.get_max_possible()) { + return (self->get_max_possible() < other.get_max_possible())? -1 : 1; + } + if (self->size() != other.size()) { + return (self->size() < other.size())? -1 : 1; + } + for (size_t i=0; isize(); ++i) { + if (*(*self)[i] != *other[i]) { + return (*(*self)[i] < *other[i])? -1 : 1; + } + if ((*self)[i].get_weight() != other[i].get_weight()) { + return ((*self)[i].get_weight() < other[i].get_weight())? -1 : 1; + } + } + return 0; + } +static __attribute__ ((__unused__)) Xapian::docid Xapian_MSetIterator_get_docid(Xapian::MSetIterator const *self){ + return *(*self); + } +static __attribute__ ((__unused__)) void Xapian_MSetIterator_next(Xapian::MSetIterator *self){ ++(*self); } +static __attribute__ ((__unused__)) void Xapian_MSetIterator_prev(Xapian::MSetIterator *self){ --(*self); } +static __attribute__ ((__unused__)) bool Xapian_MSetIterator_equals(Xapian::MSetIterator const *self,Xapian::MSetIterator const &other){ + return (*self) == other; + } +static __attribute__ ((__unused__)) bool Xapian_MSetIterator___eq__(Xapian::MSetIterator *self,Xapian::MSetIterator const &other){ + return (*self)==other; + } +static __attribute__ ((__unused__)) bool Xapian_MSetIterator___ne__(Xapian::MSetIterator *self,Xapian::MSetIterator const &other){ + return (*self)!=other; + } +static __attribute__ ((__unused__)) std::string Xapian_ESetIterator_get_term(Xapian::ESetIterator const *self){ + return *(*self); + } +static __attribute__ ((__unused__)) void Xapian_ESetIterator_next(Xapian::ESetIterator *self){ ++(*self); } +static __attribute__ ((__unused__)) void Xapian_ESetIterator_prev(Xapian::ESetIterator *self){ --(*self); } +static __attribute__ ((__unused__)) bool Xapian_ESetIterator_equals(Xapian::ESetIterator const *self,Xapian::ESetIterator const &other){ + return (*self) == other; + } +static __attribute__ ((__unused__)) bool Xapian_ESetIterator___eq__(Xapian::ESetIterator *self,Xapian::ESetIterator const &other){ + return (*self)==other; + } +static __attribute__ ((__unused__)) bool Xapian_ESetIterator___ne__(Xapian::ESetIterator *self,Xapian::ESetIterator const &other){ + return (*self)!=other; + } +static __attribute__ ((__unused__)) std::pair< Xapian::TermIterator,Xapian::TermIterator > Xapian_Enquire_get_matching_terms(Xapian::Enquire const *self,Xapian::MSetIterator const &hit){ + return make_pair(self->get_matching_terms_begin(hit), + self->get_matching_terms_end(hit)); + } +static __attribute__ ((__unused__)) inline PyObject * +SWIG_From_size_t (size_t value) +{ + return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value)); +} +static __attribute__ ((__unused__)) Xapian::Query *new_Xapian_Query__SWIG_13(Xapian::Query::op op,std::vector< Xapian::Query > const &subqs,Xapian::termcount param=0){ + return new Xapian::Query(op, subqs.begin(), subqs.end(), param); + } +class SwigDirector_PostingSource : public Xapian::PostingSource, public Swig::Director { +public: + SwigDirector_PostingSource(PyObject *self); + virtual ~SwigDirector_PostingSource(); + virtual Xapian::doccount get_termfreq_min() const; + virtual Xapian::doccount get_termfreq_est() const; + virtual Xapian::doccount get_termfreq_max() const; + virtual Xapian::weight get_weight() const; + virtual Xapian::docid get_docid() const; + virtual void next(Xapian::weight min_wt); + virtual void skip_to(Xapian::docid did, Xapian::weight min_wt); + virtual bool check(Xapian::docid did, Xapian::weight min_wt); + virtual bool at_end() const; + virtual Xapian::PostingSource *clone() const; + virtual std::string name() const; + virtual std::string serialise() const; + virtual Xapian::PostingSource *unserialise(std::string const &s) const; + virtual void init(Xapian::Database const &db); + virtual std::string get_description() const; +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} +private: + mutable std::map inner; + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::SwigVar_PyObject name = SWIG_Python_str_FromChar(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == __null) { + std::string msg = "Method in class PostingSource doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::SwigVar_PyObject vtable[12]; +}; +class SwigDirector_MatchDecider : public Xapian::MatchDecider, public Swig::Director { +public: + SwigDirector_MatchDecider(PyObject *self); + virtual bool operator ()(Xapian::Document const &doc) const; + virtual ~SwigDirector_MatchDecider(); +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} +private: + mutable std::map inner; + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::SwigVar_PyObject name = SWIG_Python_str_FromChar(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == __null) { + std::string msg = "Method in class MatchDecider doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::SwigVar_PyObject vtable[1]; +}; +class SwigDirector_ExpandDecider : public Xapian::ExpandDecider, public Swig::Director { +public: + SwigDirector_ExpandDecider(PyObject *self); + virtual bool operator ()(std::string const &term) const; + virtual ~SwigDirector_ExpandDecider(); +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} +private: + mutable std::map inner; + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::SwigVar_PyObject name = SWIG_Python_str_FromChar(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == __null) { + std::string msg = "Method in class ExpandDecider doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::SwigVar_PyObject vtable[1]; +}; +class SwigDirector_MatchSpy : public Xapian::MatchSpy, public Swig::Director { +public: + SwigDirector_MatchSpy(PyObject *self); + virtual ~SwigDirector_MatchSpy(); + virtual void operator ()(Xapian::Document const &doc, Xapian::weight wt); + virtual Xapian::MatchSpy *clone() const; + virtual std::string name() const; + virtual std::string serialise() const; + virtual Xapian::MatchSpy *unserialise(std::string const &s, Xapian::Registry const &context) const; + virtual std::string serialise_results() const; + virtual void merge_results(std::string const &s); + virtual std::string get_description() const; +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} +private: + mutable std::map inner; + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::SwigVar_PyObject name = SWIG_Python_str_FromChar(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == __null) { + std::string msg = "Method in class MatchSpy doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::SwigVar_PyObject vtable[4]; +}; +class SwigDirector_Stopper : public Xapian::Stopper, public Swig::Director { +public: + SwigDirector_Stopper(PyObject *self); + virtual bool operator ()(std::string const &term) const; + virtual ~SwigDirector_Stopper(); + virtual std::string get_description() const; +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} +private: + mutable std::map inner; + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::SwigVar_PyObject name = SWIG_Python_str_FromChar(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == __null) { + std::string msg = "Method in class Stopper doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::SwigVar_PyObject vtable[2]; +}; +struct SwigDirector_ValueRangeProcessor : public Xapian::ValueRangeProcessor, public Swig::Director { +public: + SwigDirector_ValueRangeProcessor(PyObject *self); + virtual ~SwigDirector_ValueRangeProcessor(); + virtual Xapian::valueno operator ()(std::string &begin, std::string &end); +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} +private: + mutable std::map inner; + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::SwigVar_PyObject name = SWIG_Python_str_FromChar(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == __null) { + std::string msg = "Method in class ValueRangeProcessor doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::SwigVar_PyObject vtable[1]; +}; +struct SwigDirector_StemImplementation : public Xapian::StemImplementation, public Swig::Director { +public: + SwigDirector_StemImplementation(PyObject *self); + virtual ~SwigDirector_StemImplementation(); + virtual std::string operator ()(std::string const &word); + virtual std::string get_description() const; +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} +private: + mutable std::map inner; + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::SwigVar_PyObject name = SWIG_Python_str_FromChar(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == __null) { + std::string msg = "Method in class StemImplementation doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::SwigVar_PyObject vtable[2]; +}; +class SwigDirector_KeyMaker : public Xapian::KeyMaker, public Swig::Director { +public: + SwigDirector_KeyMaker(PyObject *self); + virtual std::string operator ()(Xapian::Document const &doc) const; + virtual ~SwigDirector_KeyMaker(); +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} +private: + mutable std::map inner; + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::SwigVar_PyObject name = SWIG_Python_str_FromChar(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == __null) { + std::string msg = "Method in class KeyMaker doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::SwigVar_PyObject vtable[1]; +}; +class SwigDirector_Compactor : public Xapian::Compactor, public Swig::Director { +public: + SwigDirector_Compactor(PyObject *self); + virtual ~SwigDirector_Compactor(); + virtual void set_status(std::string const &table, std::string const &status); + virtual std::string resolve_duplicate_metadata(std::string const &key, size_t num_tags, std::string const tags[]); +public: + bool swig_get_inner(const char* name) const { + std::map::const_iterator iv = inner.find(name); + return (iv != inner.end() ? iv->second : false); + } + void swig_set_inner(const char* name, bool val) const + { inner[name] = val;} +private: + mutable std::map inner; + PyObject *swig_get_method(size_t method_index, const char *method_name) const { + PyObject *method = vtable[method_index]; + if (!method) { + swig::SwigVar_PyObject name = SWIG_Python_str_FromChar(method_name); + method = PyObject_GetAttr(swig_get_self(), name); + if (method == __null) { + std::string msg = "Method in class Compactor doesn't exist, undefined "; + msg += method_name; + Swig::DirectorMethodException::raise(msg.c_str()); + } + vtable[method_index] = method; + }; + return method; + } +private: + mutable swig::SwigVar_PyObject vtable[2]; +}; +SwigDirector_PostingSource::SwigDirector_PostingSource(PyObject *self): Xapian::PostingSource(), Swig::Director(self) { + ; +} +SwigDirector_PostingSource::~SwigDirector_PostingSource() { +} +Xapian::doccount SwigDirector_PostingSource::get_termfreq_min() const { + Xapian::doccount c_result; + SWIG_Python_Thread_Block _swig_thread_block; + { + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call PostingSource.__init__."); + } + const size_t swig_method_index = 0; + const char * const swig_method_name = "get_termfreq_min"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject args = PyTuple_New(0); + swig::SwigVar_PyObject result = PyObject_Call(method, (PyObject*) args, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + unsigned int swig_val; + int swig_res = SWIG_AsVal_unsigned_SS_int(result, &swig_val); + if (!(swig_res >= 0)) { + Swig::DirectorTypeMismatchException::raise(SWIG_Python_ErrorType(((swig_res != (-1)) ? swig_res : -5)), "in output value of type '""Xapian::doccount""'"); + } + c_result = static_cast< Xapian::doccount >(swig_val); + } + _swig_thread_block.end(); + return (Xapian::doccount) c_result; +} +Xapian::doccount SwigDirector_PostingSource::get_termfreq_est() const { + Xapian::doccount c_result; + SWIG_Python_Thread_Block _swig_thread_block; + { + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call PostingSource.__init__."); + } + const size_t swig_method_index = 1; + const char * const swig_method_name = "get_termfreq_est"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject args = PyTuple_New(0); + swig::SwigVar_PyObject result = PyObject_Call(method, (PyObject*) args, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + unsigned int swig_val; + int swig_res = SWIG_AsVal_unsigned_SS_int(result, &swig_val); + if (!(swig_res >= 0)) { + Swig::DirectorTypeMismatchException::raise(SWIG_Python_ErrorType(((swig_res != (-1)) ? swig_res : -5)), "in output value of type '""Xapian::doccount""'"); + } + c_result = static_cast< Xapian::doccount >(swig_val); + } + _swig_thread_block.end(); + return (Xapian::doccount) c_result; +} +Xapian::doccount SwigDirector_PostingSource::get_termfreq_max() const { + Xapian::doccount c_result; + SWIG_Python_Thread_Block _swig_thread_block; + { + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call PostingSource.__init__."); + } + const size_t swig_method_index = 2; + const char * const swig_method_name = "get_termfreq_max"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject args = PyTuple_New(0); + swig::SwigVar_PyObject result = PyObject_Call(method, (PyObject*) args, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + unsigned int swig_val; + int swig_res = SWIG_AsVal_unsigned_SS_int(result, &swig_val); + if (!(swig_res >= 0)) { + Swig::DirectorTypeMismatchException::raise(SWIG_Python_ErrorType(((swig_res != (-1)) ? swig_res : -5)), "in output value of type '""Xapian::doccount""'"); + } + c_result = static_cast< Xapian::doccount >(swig_val); + } + _swig_thread_block.end(); + return (Xapian::doccount) c_result; +} +Xapian::weight SwigDirector_PostingSource::get_weight() const { + Xapian::weight c_result; + SWIG_Python_Thread_Block _swig_thread_block; + { + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call PostingSource.__init__."); + } + const size_t swig_method_index = 3; + const char * const swig_method_name = "get_weight"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject args = PyTuple_New(0); + swig::SwigVar_PyObject result = PyObject_Call(method, (PyObject*) args, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + double swig_val; + int swig_res = SWIG_AsVal_double(result, &swig_val); + if (!(swig_res >= 0)) { + Swig::DirectorTypeMismatchException::raise(SWIG_Python_ErrorType(((swig_res != (-1)) ? swig_res : -5)), "in output value of type '""Xapian::weight""'"); + } + c_result = static_cast< Xapian::weight >(swig_val); + } + _swig_thread_block.end(); + return (Xapian::weight) c_result; +} +Xapian::docid SwigDirector_PostingSource::get_docid() const { + Xapian::docid c_result; + SWIG_Python_Thread_Block _swig_thread_block; + { + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call PostingSource.__init__."); + } + const size_t swig_method_index = 4; + const char * const swig_method_name = "get_docid"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject args = PyTuple_New(0); + swig::SwigVar_PyObject result = PyObject_Call(method, (PyObject*) args, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + unsigned int swig_val; + int swig_res = SWIG_AsVal_unsigned_SS_int(result, &swig_val); + if (!(swig_res >= 0)) { + Swig::DirectorTypeMismatchException::raise(SWIG_Python_ErrorType(((swig_res != (-1)) ? swig_res : -5)), "in output value of type '""Xapian::docid""'"); + } + c_result = static_cast< Xapian::docid >(swig_val); + } + _swig_thread_block.end(); + return (Xapian::docid) c_result; +} +void SwigDirector_PostingSource::next(Xapian::weight min_wt) { + SWIG_Python_Thread_Block _swig_thread_block; + { + swig::SwigVar_PyObject obj0; + obj0 = PyFloat_FromDouble(static_cast< double >(min_wt)); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call PostingSource.__init__."); + } + const size_t swig_method_index = 5; + const char * const swig_method_name = "next"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + } + _swig_thread_block.end(); +} +void SwigDirector_PostingSource::skip_to(Xapian::docid did, Xapian::weight min_wt) { + SWIG_Python_Thread_Block _swig_thread_block; + { + swig::SwigVar_PyObject obj0; + obj0 = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(did)); + swig::SwigVar_PyObject obj1; + obj1 = PyFloat_FromDouble(static_cast< double >(min_wt)); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call PostingSource.__init__."); + } + const size_t swig_method_index = 6; + const char * const swig_method_name = "skip_to"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0,(PyObject *)obj1, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + } + _swig_thread_block.end(); +} +bool SwigDirector_PostingSource::check(Xapian::docid did, Xapian::weight min_wt) { + bool c_result; + SWIG_Python_Thread_Block _swig_thread_block; + { + swig::SwigVar_PyObject obj0; + obj0 = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(did)); + swig::SwigVar_PyObject obj1; + obj1 = PyFloat_FromDouble(static_cast< double >(min_wt)); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call PostingSource.__init__."); + } + const size_t swig_method_index = 7; + const char * const swig_method_name = "check"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0,(PyObject *)obj1, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + bool swig_val; + int swig_res = SWIG_AsVal_bool(result, &swig_val); + if (!(swig_res >= 0)) { + Swig::DirectorTypeMismatchException::raise(SWIG_Python_ErrorType(((swig_res != (-1)) ? swig_res : -5)), "in output value of type '""bool""'"); + } + c_result = static_cast< bool >(swig_val); + } + _swig_thread_block.end(); + return (bool) c_result; +} +bool SwigDirector_PostingSource::at_end() const { + bool c_result; + SWIG_Python_Thread_Block _swig_thread_block; + { + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call PostingSource.__init__."); + } + const size_t swig_method_index = 8; + const char * const swig_method_name = "at_end"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject args = PyTuple_New(0); + swig::SwigVar_PyObject result = PyObject_Call(method, (PyObject*) args, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + bool swig_val; + int swig_res = SWIG_AsVal_bool(result, &swig_val); + if (!(swig_res >= 0)) { + Swig::DirectorTypeMismatchException::raise(SWIG_Python_ErrorType(((swig_res != (-1)) ? swig_res : -5)), "in output value of type '""bool""'"); + } + c_result = static_cast< bool >(swig_val); + } + _swig_thread_block.end(); + return (bool) c_result; +} +Xapian::PostingSource *SwigDirector_PostingSource::clone() const { + return Xapian::PostingSource::clone(); +} +std::string SwigDirector_PostingSource::name() const { + std::string c_result; + SWIG_Python_Thread_Block _swig_thread_block; + { + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call PostingSource.__init__."); + } + const size_t swig_method_index = 9; + const char * const swig_method_name = "name"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject args = PyTuple_New(0); + swig::SwigVar_PyObject result = PyObject_Call(method, (PyObject*) args, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + std::string *swig_optr = 0; + int swig_ores; + { + PyObject * tmp = result; + ( ((PyObject*)(tmp))->ob_refcnt++); + swig_ores = SWIG_anystring_as_ptr(&tmp, &swig_optr); + if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); + } + if (!(swig_ores >= 0) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_Python_ErrorType((((swig_optr ? swig_ores : -5) != (-1)) ? (swig_optr ? swig_ores : -5) : -5)), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (((swig_ores >= 0) && (swig_ores & ((1 << 8) << 1)))) delete swig_optr; + } + _swig_thread_block.end(); + return (std::string) c_result; +} +std::string SwigDirector_PostingSource::serialise() const { + return Xapian::PostingSource::serialise(); +} +Xapian::PostingSource *SwigDirector_PostingSource::unserialise(std::string const &s) const { + return Xapian::PostingSource::unserialise(s); +} +void SwigDirector_PostingSource::init(Xapian::Database const &db) { + SWIG_Python_Thread_Block _swig_thread_block; + { + swig::SwigVar_PyObject obj0; + obj0 = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(&db)), swig_types[4], 0); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call PostingSource.__init__."); + } + const size_t swig_method_index = 10; + const char * const swig_method_name = "init"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + } + _swig_thread_block.end(); +} +std::string SwigDirector_PostingSource::get_description() const { + std::string c_result; + SWIG_Python_Thread_Block _swig_thread_block; + { + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call PostingSource.__init__."); + } + const size_t swig_method_index = 11; + const char * const swig_method_name = "__str__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject args = PyTuple_New(0); + swig::SwigVar_PyObject result = PyObject_Call(method, (PyObject*) args, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + std::string *swig_optr = 0; + int swig_ores; + { + PyObject * tmp = result; + ( ((PyObject*)(tmp))->ob_refcnt++); + swig_ores = SWIG_anystring_as_ptr(&tmp, &swig_optr); + if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); + } + if (!(swig_ores >= 0) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_Python_ErrorType((((swig_optr ? swig_ores : -5) != (-1)) ? (swig_optr ? swig_ores : -5) : -5)), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (((swig_ores >= 0) && (swig_ores & ((1 << 8) << 1)))) delete swig_optr; + } + _swig_thread_block.end(); + return (std::string) c_result; +} +SwigDirector_MatchDecider::SwigDirector_MatchDecider(PyObject *self): Xapian::MatchDecider(), Swig::Director(self) { + ; +} +bool SwigDirector_MatchDecider::operator ()(Xapian::Document const &doc) const { + bool c_result; + SWIG_Python_Thread_Block _swig_thread_block; + { + swig::SwigVar_PyObject obj0; + obj0 = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(&doc)), swig_types[15], 0); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call MatchDecider.__init__."); + } + const size_t swig_method_index = 0; + const char * const swig_method_name = "__call__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + bool swig_val; + int swig_res = SWIG_AsVal_bool(result, &swig_val); + if (!(swig_res >= 0)) { + Swig::DirectorTypeMismatchException::raise(SWIG_Python_ErrorType(((swig_res != (-1)) ? swig_res : -5)), "in output value of type '""bool""'"); + } + c_result = static_cast< bool >(swig_val); + } + _swig_thread_block.end(); + return (bool) c_result; +} +SwigDirector_MatchDecider::~SwigDirector_MatchDecider() { +} +SwigDirector_ExpandDecider::SwigDirector_ExpandDecider(PyObject *self): Xapian::ExpandDecider(), Swig::Director(self) { + ; +} +bool SwigDirector_ExpandDecider::operator ()(std::string const &term) const { + bool c_result; + SWIG_Python_Thread_Block _swig_thread_block; + { + swig::SwigVar_PyObject obj0; + obj0 = SWIG_From_std_string(static_cast< std::string >(term)); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ExpandDecider.__init__."); + } + const size_t swig_method_index = 0; + const char * const swig_method_name = "__call__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + bool swig_val; + int swig_res = SWIG_AsVal_bool(result, &swig_val); + if (!(swig_res >= 0)) { + Swig::DirectorTypeMismatchException::raise(SWIG_Python_ErrorType(((swig_res != (-1)) ? swig_res : -5)), "in output value of type '""bool""'"); + } + c_result = static_cast< bool >(swig_val); + } + _swig_thread_block.end(); + return (bool) c_result; +} +SwigDirector_ExpandDecider::~SwigDirector_ExpandDecider() { +} +SwigDirector_MatchSpy::SwigDirector_MatchSpy(PyObject *self): Xapian::MatchSpy(), Swig::Director(self) { + ; +} +SwigDirector_MatchSpy::~SwigDirector_MatchSpy() { +} +void SwigDirector_MatchSpy::operator ()(Xapian::Document const &doc, Xapian::weight wt) { + SWIG_Python_Thread_Block _swig_thread_block; + { + swig::SwigVar_PyObject obj0; + obj0 = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(&doc)), swig_types[15], 0); + swig::SwigVar_PyObject obj1; + obj1 = PyFloat_FromDouble(static_cast< double >(wt)); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call MatchSpy.__init__."); + } + const size_t swig_method_index = 0; + const char * const swig_method_name = "__call__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0,(PyObject *)obj1, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + } + _swig_thread_block.end(); +} +Xapian::MatchSpy *SwigDirector_MatchSpy::clone() const { + return Xapian::MatchSpy::clone(); +} +std::string SwigDirector_MatchSpy::name() const { + std::string c_result; + SWIG_Python_Thread_Block _swig_thread_block; + { + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call MatchSpy.__init__."); + } + const size_t swig_method_index = 1; + const char * const swig_method_name = "name"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject args = PyTuple_New(0); + swig::SwigVar_PyObject result = PyObject_Call(method, (PyObject*) args, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + std::string *swig_optr = 0; + int swig_ores; + { + PyObject * tmp = result; + ( ((PyObject*)(tmp))->ob_refcnt++); + swig_ores = SWIG_anystring_as_ptr(&tmp, &swig_optr); + if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); + } + if (!(swig_ores >= 0) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_Python_ErrorType((((swig_optr ? swig_ores : -5) != (-1)) ? (swig_optr ? swig_ores : -5) : -5)), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (((swig_ores >= 0) && (swig_ores & ((1 << 8) << 1)))) delete swig_optr; + } + _swig_thread_block.end(); + return (std::string) c_result; +} +std::string SwigDirector_MatchSpy::serialise() const { + return Xapian::MatchSpy::serialise(); +} +Xapian::MatchSpy *SwigDirector_MatchSpy::unserialise(std::string const &s, Xapian::Registry const &context) const { + return Xapian::MatchSpy::unserialise(s,context); +} +std::string SwigDirector_MatchSpy::serialise_results() const { + return Xapian::MatchSpy::serialise_results(); +} +void SwigDirector_MatchSpy::merge_results(std::string const &s) { + SWIG_Python_Thread_Block _swig_thread_block; + { + swig::SwigVar_PyObject obj0; + obj0 = SWIG_From_std_string(static_cast< std::string >(s)); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call MatchSpy.__init__."); + } + const size_t swig_method_index = 2; + const char * const swig_method_name = "merge_results"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + } + _swig_thread_block.end(); +} +std::string SwigDirector_MatchSpy::get_description() const { + std::string c_result; + SWIG_Python_Thread_Block _swig_thread_block; + { + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call MatchSpy.__init__."); + } + const size_t swig_method_index = 3; + const char * const swig_method_name = "__str__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject args = PyTuple_New(0); + swig::SwigVar_PyObject result = PyObject_Call(method, (PyObject*) args, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + std::string *swig_optr = 0; + int swig_ores; + { + PyObject * tmp = result; + ( ((PyObject*)(tmp))->ob_refcnt++); + swig_ores = SWIG_anystring_as_ptr(&tmp, &swig_optr); + if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); + } + if (!(swig_ores >= 0) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_Python_ErrorType((((swig_optr ? swig_ores : -5) != (-1)) ? (swig_optr ? swig_ores : -5) : -5)), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (((swig_ores >= 0) && (swig_ores & ((1 << 8) << 1)))) delete swig_optr; + } + _swig_thread_block.end(); + return (std::string) c_result; +} +SwigDirector_Stopper::SwigDirector_Stopper(PyObject *self): Xapian::Stopper(), Swig::Director(self) { + ; +} +bool SwigDirector_Stopper::operator ()(std::string const &term) const { + bool c_result; + SWIG_Python_Thread_Block _swig_thread_block; + { + swig::SwigVar_PyObject obj0; + obj0 = SWIG_From_std_string(static_cast< std::string >(term)); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call Stopper.__init__."); + } + const size_t swig_method_index = 0; + const char * const swig_method_name = "__call__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + bool swig_val; + int swig_res = SWIG_AsVal_bool(result, &swig_val); + if (!(swig_res >= 0)) { + Swig::DirectorTypeMismatchException::raise(SWIG_Python_ErrorType(((swig_res != (-1)) ? swig_res : -5)), "in output value of type '""bool""'"); + } + c_result = static_cast< bool >(swig_val); + } + _swig_thread_block.end(); + return (bool) c_result; +} +SwigDirector_Stopper::~SwigDirector_Stopper() { +} +std::string SwigDirector_Stopper::get_description() const { + std::string c_result; + SWIG_Python_Thread_Block _swig_thread_block; + { + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call Stopper.__init__."); + } + const size_t swig_method_index = 1; + const char * const swig_method_name = "__str__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject args = PyTuple_New(0); + swig::SwigVar_PyObject result = PyObject_Call(method, (PyObject*) args, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + std::string *swig_optr = 0; + int swig_ores; + { + PyObject * tmp = result; + ( ((PyObject*)(tmp))->ob_refcnt++); + swig_ores = SWIG_anystring_as_ptr(&tmp, &swig_optr); + if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); + } + if (!(swig_ores >= 0) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_Python_ErrorType((((swig_optr ? swig_ores : -5) != (-1)) ? (swig_optr ? swig_ores : -5) : -5)), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (((swig_ores >= 0) && (swig_ores & ((1 << 8) << 1)))) delete swig_optr; + } + _swig_thread_block.end(); + return (std::string) c_result; +} +SwigDirector_ValueRangeProcessor::SwigDirector_ValueRangeProcessor(PyObject *self): Xapian::ValueRangeProcessor(), Swig::Director(self) { + ; +} +SwigDirector_ValueRangeProcessor::~SwigDirector_ValueRangeProcessor() { +} +Xapian::valueno SwigDirector_ValueRangeProcessor::operator ()(std::string &begin, std::string &end) { + Xapian::valueno c_result; + SWIG_Python_Thread_Block _swig_thread_block; + { + swig::SwigVar_PyObject obj0; + obj0 = SWIG_From_std_string(static_cast< std::string >(begin)); + swig::SwigVar_PyObject obj1; + obj1 = SWIG_From_std_string(static_cast< std::string >(end)); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ValueRangeProcessor.__init__."); + } + const size_t swig_method_index = 0; + const char * const swig_method_name = "__call__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0,(PyObject *)obj1, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + if (!((((((PyObject*)(result))->ob_type))->tp_flags & ((1L<<26))) != 0)) { + Swig::DirectorTypeMismatchException::raise(SWIG_Python_ErrorType(((-5 != (-1)) ? -5 : -5)), "in output value of type '""(Xapian::valueno, std::string, std::string)""'"); + } + if (PyTuple_Size(result) != 3) { + Swig::DirectorTypeMismatchException::raise(SWIG_Python_ErrorType(((-4 != (-1)) ? -4 : -5)), "in output value of type '""(Xapian::valueno, std::string, std::string)""'"); + } + unsigned int swig_val; + int swig_res = SWIG_AsVal_unsigned_SS_int((((PyTupleObject *)((PyObject *)result))->ob_item[0]), &swig_val); + if (!(swig_res >= 0)) { + Swig::DirectorTypeMismatchException::raise(SWIG_Python_ErrorType(((swig_res != (-1)) ? swig_res : -5)), "in output value of type '""(Xapian::valueno, std::string, std::string)""'"); + } + c_result = static_cast< Xapian::valueno >(swig_val); + std::string *ptr = (std::string *)0; + swig_res = SWIG_AsPtr_std_string((((PyTupleObject *)((PyObject *)result))->ob_item[1]), &ptr); + if (!(swig_res >= 0) || !ptr) { + delete ptr; + ptr = (std::string *)0; + Swig::DirectorTypeMismatchException::raise(SWIG_Python_ErrorType((((ptr ? swig_res : -5) != (-1)) ? (ptr ? swig_res : -5) : -5)), "in output value of type '""(Xapian::valueno, std::string, std::string)""'"); + } + begin = *ptr; + delete ptr; + ptr = (std::string *)0; + swig_res = SWIG_AsPtr_std_string((((PyTupleObject *)((PyObject *)result))->ob_item[2]), &ptr); + if (!(swig_res >= 0) || !ptr) { + delete ptr; + ptr = (std::string *)0; + Swig::DirectorTypeMismatchException::raise(SWIG_Python_ErrorType((((ptr ? swig_res : -5) != (-1)) ? (ptr ? swig_res : -5) : -5)), "in output value of type '""(Xapian::valueno, std::string, std::string)""'"); + } + end = *ptr; + delete ptr; + ptr = (std::string *)0; + } + _swig_thread_block.end(); + return (Xapian::valueno) c_result; +} +SwigDirector_StemImplementation::SwigDirector_StemImplementation(PyObject *self): Xapian::StemImplementation(), Swig::Director(self) { + ; +} +SwigDirector_StemImplementation::~SwigDirector_StemImplementation() { +} +std::string SwigDirector_StemImplementation::operator ()(std::string const &word) { + std::string c_result; + SWIG_Python_Thread_Block _swig_thread_block; + { + swig::SwigVar_PyObject obj0; + obj0 = SWIG_From_std_string(static_cast< std::string >(word)); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call StemImplementation.__init__."); + } + const size_t swig_method_index = 0; + const char * const swig_method_name = "__call__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + std::string *swig_optr = 0; + int swig_ores; + { + PyObject * tmp = result; + ( ((PyObject*)(tmp))->ob_refcnt++); + swig_ores = SWIG_anystring_as_ptr(&tmp, &swig_optr); + if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); + } + if (!(swig_ores >= 0) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_Python_ErrorType((((swig_optr ? swig_ores : -5) != (-1)) ? (swig_optr ? swig_ores : -5) : -5)), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (((swig_ores >= 0) && (swig_ores & ((1 << 8) << 1)))) delete swig_optr; + } + _swig_thread_block.end(); + return (std::string) c_result; +} +std::string SwigDirector_StemImplementation::get_description() const { + std::string c_result; + SWIG_Python_Thread_Block _swig_thread_block; + { + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call StemImplementation.__init__."); + } + const size_t swig_method_index = 1; + const char * const swig_method_name = "__str__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject args = PyTuple_New(0); + swig::SwigVar_PyObject result = PyObject_Call(method, (PyObject*) args, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + std::string *swig_optr = 0; + int swig_ores; + { + PyObject * tmp = result; + ( ((PyObject*)(tmp))->ob_refcnt++); + swig_ores = SWIG_anystring_as_ptr(&tmp, &swig_optr); + if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); + } + if (!(swig_ores >= 0) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_Python_ErrorType((((swig_optr ? swig_ores : -5) != (-1)) ? (swig_optr ? swig_ores : -5) : -5)), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (((swig_ores >= 0) && (swig_ores & ((1 << 8) << 1)))) delete swig_optr; + } + _swig_thread_block.end(); + return (std::string) c_result; +} +SwigDirector_KeyMaker::SwigDirector_KeyMaker(PyObject *self): Xapian::KeyMaker(), Swig::Director(self) { + ; +} +std::string SwigDirector_KeyMaker::operator ()(Xapian::Document const &doc) const { + std::string c_result; + SWIG_Python_Thread_Block _swig_thread_block; + { + swig::SwigVar_PyObject obj0; + obj0 = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(&doc)), swig_types[15], 0); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call KeyMaker.__init__."); + } + const size_t swig_method_index = 0; + const char * const swig_method_name = "__call__"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + std::string *swig_optr = 0; + int swig_ores; + { + PyObject * tmp = result; + ( ((PyObject*)(tmp))->ob_refcnt++); + swig_ores = SWIG_anystring_as_ptr(&tmp, &swig_optr); + if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); + } + if (!(swig_ores >= 0) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_Python_ErrorType((((swig_optr ? swig_ores : -5) != (-1)) ? (swig_optr ? swig_ores : -5) : -5)), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (((swig_ores >= 0) && (swig_ores & ((1 << 8) << 1)))) delete swig_optr; + } + _swig_thread_block.end(); + return (std::string) c_result; +} +SwigDirector_KeyMaker::~SwigDirector_KeyMaker() { +} +SwigDirector_Compactor::SwigDirector_Compactor(PyObject *self): Xapian::Compactor(), Swig::Director(self) { + ; +} +SwigDirector_Compactor::~SwigDirector_Compactor() { +} +void SwigDirector_Compactor::set_status(std::string const &table, std::string const &status) { + SWIG_Python_Thread_Block _swig_thread_block; + { + swig::SwigVar_PyObject obj0; + obj0 = SWIG_From_std_string(static_cast< std::string >(table)); + swig::SwigVar_PyObject obj1; + obj1 = SWIG_From_std_string(static_cast< std::string >(status)); + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call Compactor.__init__."); + } + const size_t swig_method_index = 0; + const char * const swig_method_name = "set_status"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0,(PyObject *)obj1, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + } + _swig_thread_block.end(); +} +std::string SwigDirector_Compactor::resolve_duplicate_metadata(std::string const &key, size_t num_tags, std::string const tags[]) { + std::string c_result; + SWIG_Python_Thread_Block _swig_thread_block; + { + swig::SwigVar_PyObject obj0; + obj0 = SWIG_From_std_string(static_cast< std::string >(key)); + swig::SwigVar_PyObject obj1; + { + PyObject * result = PyList_New(num_tags); + if (result == 0) { + return __null; + } + for (size_t i = 0; i != num_tags; ++i) { + PyObject * str = PyString_FromStringAndSize(tags[i].data(), tags[i].size()); + if (str == 0) { + if ( --((PyObject*)(result))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(result)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(result)))); + return __null; + } + (((PyListObject *)(result))->ob_item[i] = (str)); + } + obj1 = result; + } + if (!swig_get_self()) { + Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call Compactor.__init__."); + } + const size_t swig_method_index = 1; + const char * const swig_method_name = "resolve_duplicate_metadata"; + PyObject* method = swig_get_method(swig_method_index, swig_method_name); + swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0,(PyObject *)obj1, __null); + if (result == __null) { + PyObject *error = PyErr_Occurred(); + { + if (error != __null) { + throw Swig::DirectorMethodException(); + } + } + } + std::string *swig_optr = 0; + int swig_ores; + { + PyObject * tmp = result; + ( ((PyObject*)(tmp))->ob_refcnt++); + swig_ores = SWIG_anystring_as_ptr(&tmp, &swig_optr); + if ( --((PyObject*)(tmp))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(tmp)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(tmp)))); + } + if (!(swig_ores >= 0) || !swig_optr) { + Swig::DirectorTypeMismatchException::raise(SWIG_Python_ErrorType((((swig_optr ? swig_ores : -5) != (-1)) ? (swig_optr ? swig_ores : -5) : -5)), "in output value of type '""std::string""'"); + } + c_result = *swig_optr; + if (((swig_ores >= 0) && (swig_ores & ((1 << 8) << 1)))) delete swig_optr; + } + _swig_thread_block.end(); + return (std::string) c_result; +} +extern "C" { +static __attribute__ ((__unused__)) PyObject *_wrap_delete_SwigPyIterator(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[79], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_SwigPyIterator" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + delete arg1; + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_SwigPyIterator_value(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[79], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "SwigPyIterator_value" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + try { + result = (PyObject *)((swig::SwigPyIterator const *)arg1)->value(); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_Python_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = result; + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_SwigPyIterator_incr__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + swig::SwigPyIterator *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[79], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "SwigPyIterator_incr" "', argument " "2"" of type '" "size_t""'"); goto fail; } while(0); + } + arg2 = static_cast< size_t >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + try { + result = (swig::SwigPyIterator *)(arg1)->incr(arg2); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_Python_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[79], 0 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_SwigPyIterator_incr__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[79], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + try { + result = (swig::SwigPyIterator *)(arg1)->incr(); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_Python_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[79], 0 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_SwigPyIterator_incr(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + if (!(argc = SWIG_Python_UnpackTuple(args,"SwigPyIterator_incr",0,2,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_SwigPyIterator_incr__SWIG_1(self, argc, argv); + } + if (argc == 2) { + return _wrap_SwigPyIterator_incr__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SwigPyIterator_incr'.\n" + " Possible C/C++ prototypes are:\n" + " incr(swig::SwigPyIterator *,size_t)\n" + " incr(swig::SwigPyIterator *)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_SwigPyIterator_decr__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + swig::SwigPyIterator *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[79], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "SwigPyIterator_decr" "', argument " "2"" of type '" "size_t""'"); goto fail; } while(0); + } + arg2 = static_cast< size_t >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + try { + result = (swig::SwigPyIterator *)(arg1)->decr(arg2); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_Python_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[79], 0 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_SwigPyIterator_decr__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + swig::SwigPyIterator *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[79], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + try { + result = (swig::SwigPyIterator *)(arg1)->decr(); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_Python_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[79], 0 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_SwigPyIterator_decr(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + if (!(argc = SWIG_Python_UnpackTuple(args,"SwigPyIterator_decr",0,2,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_SwigPyIterator_decr__SWIG_1(self, argc, argv); + } + if (argc == 2) { + return _wrap_SwigPyIterator_decr__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'SwigPyIterator_decr'.\n" + " Possible C/C++ prototypes are:\n" + " decr(swig::SwigPyIterator *,size_t)\n" + " decr(swig::SwigPyIterator *)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_SwigPyIterator_distance(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + swig::SwigPyIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + ptrdiff_t result; + if (!SWIG_Python_UnpackTuple(args,"SwigPyIterator_distance",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[79], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "SwigPyIterator_distance" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[79], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + try { + result = ((swig::SwigPyIterator const *)arg1)->distance((swig::SwigPyIterator const &)*arg2); + } + catch(std::invalid_argument &_e) { + SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(swig_types[76]), SWIG_Python_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))), swig_types[76], 0x1)); goto fail; + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_SwigPyIterator_equal(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + swig::SwigPyIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"SwigPyIterator_equal",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[79], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "SwigPyIterator_equal" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[79], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + try { + result = (bool)((swig::SwigPyIterator const *)arg1)->equal((swig::SwigPyIterator const &)*arg2); + } + catch(std::invalid_argument &_e) { + SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(swig_types[76]), SWIG_Python_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))), swig_types[76], 0x1)); goto fail; + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_SwigPyIterator_copy(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + swig::SwigPyIterator *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[79], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "SwigPyIterator_copy" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->copy(); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[79], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_SwigPyIterator_next(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[79], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "SwigPyIterator_next" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + try { + result = (PyObject *)(arg1)->next(); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_Python_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = result; + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_SwigPyIterator___next__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[79], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "SwigPyIterator___next__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + try { + result = (PyObject *)(arg1)->__next__(); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_Python_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = result; + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_SwigPyIterator_previous(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[79], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "SwigPyIterator_previous" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + try { + result = (PyObject *)(arg1)->previous(); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_Python_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = result; + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_SwigPyIterator_advance(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + swig::SwigPyIterator *result = 0 ; + if (!SWIG_Python_UnpackTuple(args,"SwigPyIterator_advance",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[79], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "SwigPyIterator_advance" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "SwigPyIterator_advance" "', argument " "2"" of type '" "ptrdiff_t""'"); goto fail; } while(0); + } + arg2 = static_cast< ptrdiff_t >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + try { + result = (swig::SwigPyIterator *)(arg1)->advance(arg2); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_Python_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[79], 0 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_SwigPyIterator___eq__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + swig::SwigPyIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"SwigPyIterator___eq__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[79], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "SwigPyIterator___eq__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[79], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (bool)((swig::SwigPyIterator const *)arg1)->operator ==((swig::SwigPyIterator const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_SwigPyIterator___ne__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + swig::SwigPyIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"SwigPyIterator___ne__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[79], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "SwigPyIterator___ne__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[79], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (bool)((swig::SwigPyIterator const *)arg1)->operator !=((swig::SwigPyIterator const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_SwigPyIterator___iadd__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + swig::SwigPyIterator *result = 0 ; + if (!SWIG_Python_UnpackTuple(args,"SwigPyIterator___iadd__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[79], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "SwigPyIterator___iadd__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "SwigPyIterator___iadd__" "', argument " "2"" of type '" "ptrdiff_t""'"); goto fail; } while(0); + } + arg2 = static_cast< ptrdiff_t >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + try { + result = (swig::SwigPyIterator *) &(arg1)->operator +=(arg2); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_Python_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[79], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_SwigPyIterator___isub__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + swig::SwigPyIterator *result = 0 ; + if (!SWIG_Python_UnpackTuple(args,"SwigPyIterator___isub__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[79], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "SwigPyIterator___isub__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "SwigPyIterator___isub__" "', argument " "2"" of type '" "ptrdiff_t""'"); goto fail; } while(0); + } + arg2 = static_cast< ptrdiff_t >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + try { + result = (swig::SwigPyIterator *) &(arg1)->operator -=(arg2); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_Python_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[79], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_SwigPyIterator___add__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + swig::SwigPyIterator *result = 0 ; + if (!SWIG_Python_UnpackTuple(args,"SwigPyIterator___add__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[79], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "SwigPyIterator___add__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "SwigPyIterator___add__" "', argument " "2"" of type '" "ptrdiff_t""'"); goto fail; } while(0); + } + arg2 = static_cast< ptrdiff_t >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + try { + result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator +(arg2); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_Python_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[79], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_SwigPyIterator___sub____SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + ptrdiff_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + ptrdiff_t val2 ; + int ecode2 = 0 ; + swig::SwigPyIterator *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[79], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "ptrdiff_t""'"); goto fail; } while(0); + } + arg2 = static_cast< ptrdiff_t >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + try { + result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator -(arg2); + } + catch(swig::stop_iteration &_e) { + { + (void)_e; + SWIG_Python_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void()); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[79], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_SwigPyIterator___sub____SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ; + swig::SwigPyIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + ptrdiff_t result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[79], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[79], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = ((swig::SwigPyIterator const *)arg1)->operator -((swig::SwigPyIterator const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_SwigPyIterator___sub__(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + if (!(argc = SWIG_Python_UnpackTuple(args,"SwigPyIterator___sub__",0,2,argv))) goto fail; + --argc; + if (argc == 2) { + int _v = 0; + { + int res = SWIG_Python_ConvertPtrAndOwn(argv[1], 0, swig_types[79], 0, 0); + _v = ((res >= 0) ? 1 : 0); + } + if (!_v) goto check_1; + return _wrap_SwigPyIterator___sub____SWIG_1(self, argc, argv); + } +check_1: + if (argc == 2) { + return _wrap_SwigPyIterator___sub____SWIG_0(self, argc, argv); + } +fail: + ( ((PyObject*)((&_Py_NotImplementedStruct)))->ob_refcnt++); + return (&_Py_NotImplementedStruct); +} +static __attribute__ ((__unused__)) PyObject *SwigPyIterator_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[79], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *_wrap_Error_get_type(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Error *arg1 = (Xapian::Error *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[19], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Error_get_type" "', argument " "1"" of type '" "Xapian::Error const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Error * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (char *)((Xapian::Error const *)arg1)->get_type(); + _swig_thread_allow.end(); + } + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Error_get_msg(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Error *arg1 = (Xapian::Error *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[19], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Error_get_msg" "', argument " "1"" of type '" "Xapian::Error const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Error * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (std::string *) &((Xapian::Error const *)arg1)->get_msg(); + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Error_get_context(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Error *arg1 = (Xapian::Error *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[19], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Error_get_context" "', argument " "1"" of type '" "Xapian::Error const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Error * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (std::string *) &((Xapian::Error const *)arg1)->get_context(); + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(*result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Error_get_error_string(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Error *arg1 = (Xapian::Error *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + char *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[19], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Error_get_error_string" "', argument " "1"" of type '" "Xapian::Error const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Error * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (char *)((Xapian::Error const *)arg1)->get_error_string(); + _swig_thread_allow.end(); + } + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Error___str__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Error *arg1 = (Xapian::Error *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[19], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Error___str__" "', argument " "1"" of type '" "Xapian::Error const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Error * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = Xapian_Error___str__((Xapian::Error const *)arg1); + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_Error(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Error *arg1 = (Xapian::Error *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[19], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_Error" "', argument " "1"" of type '" "Xapian::Error *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Error * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *Error_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[19], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_LogicError(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::LogicError *arg1 = (Xapian::LogicError *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[27], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_LogicError" "', argument " "1"" of type '" "Xapian::LogicError *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::LogicError * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *LogicError_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[27], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_RuntimeError(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::RuntimeError *arg1 = (Xapian::RuntimeError *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[46], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_RuntimeError" "', argument " "1"" of type '" "Xapian::RuntimeError *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::RuntimeError * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *RuntimeError_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[46], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_AssertionError__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + Xapian::AssertionError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_AssertionError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_AssertionError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_AssertionError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_AssertionError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, __null, &alloc3); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "new_AssertionError" "', argument " "3"" of type '" "char const *""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< char * >(buf3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::AssertionError *)new Xapian::AssertionError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[0], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_AssertionError__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int arg3 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int val3 ; + int ecode3 = 0 ; + Xapian::AssertionError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_AssertionError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_AssertionError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_AssertionError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_AssertionError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_AssertionError" "', argument " "3"" of type '" "int""'"); goto fail; } while(0); + } + arg3 = static_cast< int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::AssertionError *)new Xapian::AssertionError((std::string const &)*arg1,(std::string const &)*arg2,arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[0], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_AssertionError__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + Xapian::AssertionError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_AssertionError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_AssertionError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_AssertionError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_AssertionError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::AssertionError *)new Xapian::AssertionError((std::string const &)*arg1,(std::string const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[0], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_AssertionError__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::AssertionError *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_AssertionError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_AssertionError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::AssertionError *)new Xapian::AssertionError((std::string const &)*arg1); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[0], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_AssertionError__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + Xapian::AssertionError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_AssertionError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_AssertionError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_AssertionError" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::AssertionError *)new Xapian::AssertionError((std::string const &)*arg1,arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[0], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_AssertionError(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_AssertionError",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_new_AssertionError__SWIG_3(self, argc, argv); + } + if (argc == 2) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_2; + return _wrap_new_AssertionError__SWIG_4(self, argc, argv); + } +check_2: + if (argc == 2) { + return _wrap_new_AssertionError__SWIG_2(self, argc, argv); + } + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[2], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_4; + return _wrap_new_AssertionError__SWIG_1(self, argc, argv); + } +check_4: + if (argc == 3) { + return _wrap_new_AssertionError__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_AssertionError'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::AssertionError(std::string const &,std::string const &,char const *)\n" + " Xapian::AssertionError(std::string const &,std::string const &,int)\n" + " Xapian::AssertionError(std::string const &,std::string const &)\n" + " Xapian::AssertionError(std::string const &)\n" + " Xapian::AssertionError(std::string const &,int)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_AssertionError(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::AssertionError *arg1 = (Xapian::AssertionError *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[0], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_AssertionError" "', argument " "1"" of type '" "Xapian::AssertionError *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::AssertionError * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *AssertionError_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[0], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *AssertionError_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_InvalidArgumentError__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + Xapian::InvalidArgumentError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_InvalidArgumentError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_InvalidArgumentError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_InvalidArgumentError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_InvalidArgumentError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, __null, &alloc3); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "new_InvalidArgumentError" "', argument " "3"" of type '" "char const *""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< char * >(buf3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::InvalidArgumentError *)new Xapian::InvalidArgumentError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[24], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_InvalidArgumentError__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int arg3 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int val3 ; + int ecode3 = 0 ; + Xapian::InvalidArgumentError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_InvalidArgumentError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_InvalidArgumentError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_InvalidArgumentError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_InvalidArgumentError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_InvalidArgumentError" "', argument " "3"" of type '" "int""'"); goto fail; } while(0); + } + arg3 = static_cast< int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::InvalidArgumentError *)new Xapian::InvalidArgumentError((std::string const &)*arg1,(std::string const &)*arg2,arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[24], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_InvalidArgumentError__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + Xapian::InvalidArgumentError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_InvalidArgumentError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_InvalidArgumentError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_InvalidArgumentError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_InvalidArgumentError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::InvalidArgumentError *)new Xapian::InvalidArgumentError((std::string const &)*arg1,(std::string const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[24], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_InvalidArgumentError__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::InvalidArgumentError *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_InvalidArgumentError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_InvalidArgumentError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::InvalidArgumentError *)new Xapian::InvalidArgumentError((std::string const &)*arg1); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[24], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_InvalidArgumentError__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + Xapian::InvalidArgumentError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_InvalidArgumentError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_InvalidArgumentError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_InvalidArgumentError" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::InvalidArgumentError *)new Xapian::InvalidArgumentError((std::string const &)*arg1,arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[24], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_InvalidArgumentError(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_InvalidArgumentError",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_new_InvalidArgumentError__SWIG_3(self, argc, argv); + } + if (argc == 2) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_2; + return _wrap_new_InvalidArgumentError__SWIG_4(self, argc, argv); + } +check_2: + if (argc == 2) { + return _wrap_new_InvalidArgumentError__SWIG_2(self, argc, argv); + } + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[2], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_4; + return _wrap_new_InvalidArgumentError__SWIG_1(self, argc, argv); + } +check_4: + if (argc == 3) { + return _wrap_new_InvalidArgumentError__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_InvalidArgumentError'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::InvalidArgumentError(std::string const &,std::string const &,char const *)\n" + " Xapian::InvalidArgumentError(std::string const &,std::string const &,int)\n" + " Xapian::InvalidArgumentError(std::string const &,std::string const &)\n" + " Xapian::InvalidArgumentError(std::string const &)\n" + " Xapian::InvalidArgumentError(std::string const &,int)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_InvalidArgumentError(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::InvalidArgumentError *arg1 = (Xapian::InvalidArgumentError *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[24], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_InvalidArgumentError" "', argument " "1"" of type '" "Xapian::InvalidArgumentError *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::InvalidArgumentError * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *InvalidArgumentError_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[24], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *InvalidArgumentError_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_InvalidOperationError__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + Xapian::InvalidOperationError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_InvalidOperationError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_InvalidOperationError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_InvalidOperationError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_InvalidOperationError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, __null, &alloc3); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "new_InvalidOperationError" "', argument " "3"" of type '" "char const *""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< char * >(buf3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::InvalidOperationError *)new Xapian::InvalidOperationError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[25], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_InvalidOperationError__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int arg3 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int val3 ; + int ecode3 = 0 ; + Xapian::InvalidOperationError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_InvalidOperationError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_InvalidOperationError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_InvalidOperationError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_InvalidOperationError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_InvalidOperationError" "', argument " "3"" of type '" "int""'"); goto fail; } while(0); + } + arg3 = static_cast< int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::InvalidOperationError *)new Xapian::InvalidOperationError((std::string const &)*arg1,(std::string const &)*arg2,arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[25], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_InvalidOperationError__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + Xapian::InvalidOperationError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_InvalidOperationError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_InvalidOperationError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_InvalidOperationError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_InvalidOperationError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::InvalidOperationError *)new Xapian::InvalidOperationError((std::string const &)*arg1,(std::string const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[25], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_InvalidOperationError__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::InvalidOperationError *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_InvalidOperationError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_InvalidOperationError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::InvalidOperationError *)new Xapian::InvalidOperationError((std::string const &)*arg1); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[25], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_InvalidOperationError__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + Xapian::InvalidOperationError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_InvalidOperationError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_InvalidOperationError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_InvalidOperationError" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::InvalidOperationError *)new Xapian::InvalidOperationError((std::string const &)*arg1,arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[25], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_InvalidOperationError(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_InvalidOperationError",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_new_InvalidOperationError__SWIG_3(self, argc, argv); + } + if (argc == 2) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_2; + return _wrap_new_InvalidOperationError__SWIG_4(self, argc, argv); + } +check_2: + if (argc == 2) { + return _wrap_new_InvalidOperationError__SWIG_2(self, argc, argv); + } + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[2], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_4; + return _wrap_new_InvalidOperationError__SWIG_1(self, argc, argv); + } +check_4: + if (argc == 3) { + return _wrap_new_InvalidOperationError__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_InvalidOperationError'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::InvalidOperationError(std::string const &,std::string const &,char const *)\n" + " Xapian::InvalidOperationError(std::string const &,std::string const &,int)\n" + " Xapian::InvalidOperationError(std::string const &,std::string const &)\n" + " Xapian::InvalidOperationError(std::string const &)\n" + " Xapian::InvalidOperationError(std::string const &,int)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_InvalidOperationError(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::InvalidOperationError *arg1 = (Xapian::InvalidOperationError *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[25], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_InvalidOperationError" "', argument " "1"" of type '" "Xapian::InvalidOperationError *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::InvalidOperationError * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *InvalidOperationError_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[25], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *InvalidOperationError_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_UnimplementedError__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + Xapian::UnimplementedError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_UnimplementedError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_UnimplementedError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_UnimplementedError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_UnimplementedError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, __null, &alloc3); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "new_UnimplementedError" "', argument " "3"" of type '" "char const *""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< char * >(buf3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::UnimplementedError *)new Xapian::UnimplementedError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[57], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_UnimplementedError__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int arg3 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int val3 ; + int ecode3 = 0 ; + Xapian::UnimplementedError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_UnimplementedError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_UnimplementedError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_UnimplementedError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_UnimplementedError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_UnimplementedError" "', argument " "3"" of type '" "int""'"); goto fail; } while(0); + } + arg3 = static_cast< int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::UnimplementedError *)new Xapian::UnimplementedError((std::string const &)*arg1,(std::string const &)*arg2,arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[57], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_UnimplementedError__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + Xapian::UnimplementedError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_UnimplementedError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_UnimplementedError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_UnimplementedError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_UnimplementedError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::UnimplementedError *)new Xapian::UnimplementedError((std::string const &)*arg1,(std::string const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[57], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_UnimplementedError__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::UnimplementedError *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_UnimplementedError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_UnimplementedError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::UnimplementedError *)new Xapian::UnimplementedError((std::string const &)*arg1); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[57], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_UnimplementedError__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + Xapian::UnimplementedError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_UnimplementedError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_UnimplementedError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_UnimplementedError" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::UnimplementedError *)new Xapian::UnimplementedError((std::string const &)*arg1,arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[57], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_UnimplementedError(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_UnimplementedError",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_new_UnimplementedError__SWIG_3(self, argc, argv); + } + if (argc == 2) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_2; + return _wrap_new_UnimplementedError__SWIG_4(self, argc, argv); + } +check_2: + if (argc == 2) { + return _wrap_new_UnimplementedError__SWIG_2(self, argc, argv); + } + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[2], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_4; + return _wrap_new_UnimplementedError__SWIG_1(self, argc, argv); + } +check_4: + if (argc == 3) { + return _wrap_new_UnimplementedError__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_UnimplementedError'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::UnimplementedError(std::string const &,std::string const &,char const *)\n" + " Xapian::UnimplementedError(std::string const &,std::string const &,int)\n" + " Xapian::UnimplementedError(std::string const &,std::string const &)\n" + " Xapian::UnimplementedError(std::string const &)\n" + " Xapian::UnimplementedError(std::string const &,int)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_UnimplementedError(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::UnimplementedError *arg1 = (Xapian::UnimplementedError *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[57], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_UnimplementedError" "', argument " "1"" of type '" "Xapian::UnimplementedError *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::UnimplementedError * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *UnimplementedError_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[57], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *UnimplementedError_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseError__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + Xapian::DatabaseError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DatabaseError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, __null, &alloc3); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "new_DatabaseError" "', argument " "3"" of type '" "char const *""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< char * >(buf3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseError *)new Xapian::DatabaseError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[7], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseError__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int arg3 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int val3 ; + int ecode3 = 0 ; + Xapian::DatabaseError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DatabaseError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_DatabaseError" "', argument " "3"" of type '" "int""'"); goto fail; } while(0); + } + arg3 = static_cast< int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseError *)new Xapian::DatabaseError((std::string const &)*arg1,(std::string const &)*arg2,arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[7], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseError__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + Xapian::DatabaseError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DatabaseError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseError *)new Xapian::DatabaseError((std::string const &)*arg1,(std::string const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[7], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseError__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::DatabaseError *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseError *)new Xapian::DatabaseError((std::string const &)*arg1); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[7], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseError__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + Xapian::DatabaseError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_DatabaseError" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseError *)new Xapian::DatabaseError((std::string const &)*arg1,arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[7], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseError(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_DatabaseError",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_new_DatabaseError__SWIG_3(self, argc, argv); + } + if (argc == 2) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_2; + return _wrap_new_DatabaseError__SWIG_4(self, argc, argv); + } +check_2: + if (argc == 2) { + return _wrap_new_DatabaseError__SWIG_2(self, argc, argv); + } + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[2], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_4; + return _wrap_new_DatabaseError__SWIG_1(self, argc, argv); + } +check_4: + if (argc == 3) { + return _wrap_new_DatabaseError__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DatabaseError'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::DatabaseError(std::string const &,std::string const &,char const *)\n" + " Xapian::DatabaseError(std::string const &,std::string const &,int)\n" + " Xapian::DatabaseError(std::string const &,std::string const &)\n" + " Xapian::DatabaseError(std::string const &)\n" + " Xapian::DatabaseError(std::string const &,int)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_DatabaseError(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::DatabaseError *arg1 = (Xapian::DatabaseError *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[7], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_DatabaseError" "', argument " "1"" of type '" "Xapian::DatabaseError *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::DatabaseError * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *DatabaseError_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[7], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *DatabaseError_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseCorruptError__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + Xapian::DatabaseCorruptError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseCorruptError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseCorruptError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DatabaseCorruptError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseCorruptError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, __null, &alloc3); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "new_DatabaseCorruptError" "', argument " "3"" of type '" "char const *""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< char * >(buf3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseCorruptError *)new Xapian::DatabaseCorruptError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[5], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseCorruptError__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int arg3 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int val3 ; + int ecode3 = 0 ; + Xapian::DatabaseCorruptError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseCorruptError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseCorruptError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DatabaseCorruptError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseCorruptError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_DatabaseCorruptError" "', argument " "3"" of type '" "int""'"); goto fail; } while(0); + } + arg3 = static_cast< int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseCorruptError *)new Xapian::DatabaseCorruptError((std::string const &)*arg1,(std::string const &)*arg2,arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[5], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseCorruptError__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + Xapian::DatabaseCorruptError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseCorruptError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseCorruptError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DatabaseCorruptError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseCorruptError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseCorruptError *)new Xapian::DatabaseCorruptError((std::string const &)*arg1,(std::string const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[5], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseCorruptError__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::DatabaseCorruptError *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseCorruptError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseCorruptError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseCorruptError *)new Xapian::DatabaseCorruptError((std::string const &)*arg1); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[5], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseCorruptError__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + Xapian::DatabaseCorruptError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseCorruptError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseCorruptError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_DatabaseCorruptError" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseCorruptError *)new Xapian::DatabaseCorruptError((std::string const &)*arg1,arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[5], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseCorruptError(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_DatabaseCorruptError",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_new_DatabaseCorruptError__SWIG_3(self, argc, argv); + } + if (argc == 2) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_2; + return _wrap_new_DatabaseCorruptError__SWIG_4(self, argc, argv); + } +check_2: + if (argc == 2) { + return _wrap_new_DatabaseCorruptError__SWIG_2(self, argc, argv); + } + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[2], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_4; + return _wrap_new_DatabaseCorruptError__SWIG_1(self, argc, argv); + } +check_4: + if (argc == 3) { + return _wrap_new_DatabaseCorruptError__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DatabaseCorruptError'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::DatabaseCorruptError(std::string const &,std::string const &,char const *)\n" + " Xapian::DatabaseCorruptError(std::string const &,std::string const &,int)\n" + " Xapian::DatabaseCorruptError(std::string const &,std::string const &)\n" + " Xapian::DatabaseCorruptError(std::string const &)\n" + " Xapian::DatabaseCorruptError(std::string const &,int)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_DatabaseCorruptError(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::DatabaseCorruptError *arg1 = (Xapian::DatabaseCorruptError *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[5], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_DatabaseCorruptError" "', argument " "1"" of type '" "Xapian::DatabaseCorruptError *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::DatabaseCorruptError * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *DatabaseCorruptError_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[5], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *DatabaseCorruptError_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseCreateError__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + Xapian::DatabaseCreateError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseCreateError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseCreateError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DatabaseCreateError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseCreateError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, __null, &alloc3); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "new_DatabaseCreateError" "', argument " "3"" of type '" "char const *""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< char * >(buf3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseCreateError *)new Xapian::DatabaseCreateError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[6], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseCreateError__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int arg3 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int val3 ; + int ecode3 = 0 ; + Xapian::DatabaseCreateError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseCreateError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseCreateError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DatabaseCreateError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseCreateError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_DatabaseCreateError" "', argument " "3"" of type '" "int""'"); goto fail; } while(0); + } + arg3 = static_cast< int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseCreateError *)new Xapian::DatabaseCreateError((std::string const &)*arg1,(std::string const &)*arg2,arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[6], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseCreateError__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + Xapian::DatabaseCreateError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseCreateError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseCreateError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DatabaseCreateError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseCreateError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseCreateError *)new Xapian::DatabaseCreateError((std::string const &)*arg1,(std::string const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[6], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseCreateError__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::DatabaseCreateError *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseCreateError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseCreateError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseCreateError *)new Xapian::DatabaseCreateError((std::string const &)*arg1); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[6], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseCreateError__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + Xapian::DatabaseCreateError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseCreateError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseCreateError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_DatabaseCreateError" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseCreateError *)new Xapian::DatabaseCreateError((std::string const &)*arg1,arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[6], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseCreateError(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_DatabaseCreateError",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_new_DatabaseCreateError__SWIG_3(self, argc, argv); + } + if (argc == 2) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_2; + return _wrap_new_DatabaseCreateError__SWIG_4(self, argc, argv); + } +check_2: + if (argc == 2) { + return _wrap_new_DatabaseCreateError__SWIG_2(self, argc, argv); + } + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[2], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_4; + return _wrap_new_DatabaseCreateError__SWIG_1(self, argc, argv); + } +check_4: + if (argc == 3) { + return _wrap_new_DatabaseCreateError__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DatabaseCreateError'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::DatabaseCreateError(std::string const &,std::string const &,char const *)\n" + " Xapian::DatabaseCreateError(std::string const &,std::string const &,int)\n" + " Xapian::DatabaseCreateError(std::string const &,std::string const &)\n" + " Xapian::DatabaseCreateError(std::string const &)\n" + " Xapian::DatabaseCreateError(std::string const &,int)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_DatabaseCreateError(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::DatabaseCreateError *arg1 = (Xapian::DatabaseCreateError *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[6], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_DatabaseCreateError" "', argument " "1"" of type '" "Xapian::DatabaseCreateError *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::DatabaseCreateError * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *DatabaseCreateError_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[6], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *DatabaseCreateError_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseLockError__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + Xapian::DatabaseLockError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseLockError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseLockError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DatabaseLockError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseLockError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, __null, &alloc3); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "new_DatabaseLockError" "', argument " "3"" of type '" "char const *""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< char * >(buf3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseLockError *)new Xapian::DatabaseLockError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[8], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseLockError__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int arg3 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int val3 ; + int ecode3 = 0 ; + Xapian::DatabaseLockError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseLockError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseLockError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DatabaseLockError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseLockError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_DatabaseLockError" "', argument " "3"" of type '" "int""'"); goto fail; } while(0); + } + arg3 = static_cast< int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseLockError *)new Xapian::DatabaseLockError((std::string const &)*arg1,(std::string const &)*arg2,arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[8], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseLockError__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + Xapian::DatabaseLockError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseLockError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseLockError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DatabaseLockError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseLockError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseLockError *)new Xapian::DatabaseLockError((std::string const &)*arg1,(std::string const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[8], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseLockError__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::DatabaseLockError *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseLockError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseLockError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseLockError *)new Xapian::DatabaseLockError((std::string const &)*arg1); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[8], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseLockError__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + Xapian::DatabaseLockError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseLockError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseLockError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_DatabaseLockError" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseLockError *)new Xapian::DatabaseLockError((std::string const &)*arg1,arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[8], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseLockError(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_DatabaseLockError",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_new_DatabaseLockError__SWIG_3(self, argc, argv); + } + if (argc == 2) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_2; + return _wrap_new_DatabaseLockError__SWIG_4(self, argc, argv); + } +check_2: + if (argc == 2) { + return _wrap_new_DatabaseLockError__SWIG_2(self, argc, argv); + } + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[2], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_4; + return _wrap_new_DatabaseLockError__SWIG_1(self, argc, argv); + } +check_4: + if (argc == 3) { + return _wrap_new_DatabaseLockError__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DatabaseLockError'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::DatabaseLockError(std::string const &,std::string const &,char const *)\n" + " Xapian::DatabaseLockError(std::string const &,std::string const &,int)\n" + " Xapian::DatabaseLockError(std::string const &,std::string const &)\n" + " Xapian::DatabaseLockError(std::string const &)\n" + " Xapian::DatabaseLockError(std::string const &,int)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_DatabaseLockError(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::DatabaseLockError *arg1 = (Xapian::DatabaseLockError *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[8], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_DatabaseLockError" "', argument " "1"" of type '" "Xapian::DatabaseLockError *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::DatabaseLockError * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *DatabaseLockError_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[8], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *DatabaseLockError_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseModifiedError__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + Xapian::DatabaseModifiedError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseModifiedError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseModifiedError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DatabaseModifiedError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseModifiedError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, __null, &alloc3); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "new_DatabaseModifiedError" "', argument " "3"" of type '" "char const *""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< char * >(buf3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseModifiedError *)new Xapian::DatabaseModifiedError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[9], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseModifiedError__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int arg3 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int val3 ; + int ecode3 = 0 ; + Xapian::DatabaseModifiedError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseModifiedError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseModifiedError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DatabaseModifiedError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseModifiedError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_DatabaseModifiedError" "', argument " "3"" of type '" "int""'"); goto fail; } while(0); + } + arg3 = static_cast< int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseModifiedError *)new Xapian::DatabaseModifiedError((std::string const &)*arg1,(std::string const &)*arg2,arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[9], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseModifiedError__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + Xapian::DatabaseModifiedError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseModifiedError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseModifiedError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DatabaseModifiedError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseModifiedError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseModifiedError *)new Xapian::DatabaseModifiedError((std::string const &)*arg1,(std::string const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[9], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseModifiedError__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::DatabaseModifiedError *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseModifiedError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseModifiedError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseModifiedError *)new Xapian::DatabaseModifiedError((std::string const &)*arg1); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[9], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseModifiedError__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + Xapian::DatabaseModifiedError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseModifiedError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseModifiedError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_DatabaseModifiedError" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseModifiedError *)new Xapian::DatabaseModifiedError((std::string const &)*arg1,arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[9], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseModifiedError(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_DatabaseModifiedError",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_new_DatabaseModifiedError__SWIG_3(self, argc, argv); + } + if (argc == 2) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_2; + return _wrap_new_DatabaseModifiedError__SWIG_4(self, argc, argv); + } +check_2: + if (argc == 2) { + return _wrap_new_DatabaseModifiedError__SWIG_2(self, argc, argv); + } + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[2], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_4; + return _wrap_new_DatabaseModifiedError__SWIG_1(self, argc, argv); + } +check_4: + if (argc == 3) { + return _wrap_new_DatabaseModifiedError__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DatabaseModifiedError'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::DatabaseModifiedError(std::string const &,std::string const &,char const *)\n" + " Xapian::DatabaseModifiedError(std::string const &,std::string const &,int)\n" + " Xapian::DatabaseModifiedError(std::string const &,std::string const &)\n" + " Xapian::DatabaseModifiedError(std::string const &)\n" + " Xapian::DatabaseModifiedError(std::string const &,int)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_DatabaseModifiedError(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::DatabaseModifiedError *arg1 = (Xapian::DatabaseModifiedError *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[9], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_DatabaseModifiedError" "', argument " "1"" of type '" "Xapian::DatabaseModifiedError *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::DatabaseModifiedError * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *DatabaseModifiedError_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[9], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *DatabaseModifiedError_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseOpeningError__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + Xapian::DatabaseOpeningError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseOpeningError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseOpeningError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DatabaseOpeningError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseOpeningError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, __null, &alloc3); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "new_DatabaseOpeningError" "', argument " "3"" of type '" "char const *""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< char * >(buf3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseOpeningError *)new Xapian::DatabaseOpeningError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[10], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseOpeningError__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int arg3 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int val3 ; + int ecode3 = 0 ; + Xapian::DatabaseOpeningError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseOpeningError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseOpeningError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DatabaseOpeningError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseOpeningError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_DatabaseOpeningError" "', argument " "3"" of type '" "int""'"); goto fail; } while(0); + } + arg3 = static_cast< int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseOpeningError *)new Xapian::DatabaseOpeningError((std::string const &)*arg1,(std::string const &)*arg2,arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[10], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseOpeningError__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + Xapian::DatabaseOpeningError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseOpeningError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseOpeningError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DatabaseOpeningError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseOpeningError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseOpeningError *)new Xapian::DatabaseOpeningError((std::string const &)*arg1,(std::string const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[10], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseOpeningError__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::DatabaseOpeningError *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseOpeningError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseOpeningError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseOpeningError *)new Xapian::DatabaseOpeningError((std::string const &)*arg1); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[10], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseOpeningError__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + Xapian::DatabaseOpeningError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseOpeningError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseOpeningError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_DatabaseOpeningError" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseOpeningError *)new Xapian::DatabaseOpeningError((std::string const &)*arg1,arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[10], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseOpeningError(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_DatabaseOpeningError",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_new_DatabaseOpeningError__SWIG_3(self, argc, argv); + } + if (argc == 2) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_2; + return _wrap_new_DatabaseOpeningError__SWIG_4(self, argc, argv); + } +check_2: + if (argc == 2) { + return _wrap_new_DatabaseOpeningError__SWIG_2(self, argc, argv); + } + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[2], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_4; + return _wrap_new_DatabaseOpeningError__SWIG_1(self, argc, argv); + } +check_4: + if (argc == 3) { + return _wrap_new_DatabaseOpeningError__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DatabaseOpeningError'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::DatabaseOpeningError(std::string const &,std::string const &,char const *)\n" + " Xapian::DatabaseOpeningError(std::string const &,std::string const &,int)\n" + " Xapian::DatabaseOpeningError(std::string const &,std::string const &)\n" + " Xapian::DatabaseOpeningError(std::string const &)\n" + " Xapian::DatabaseOpeningError(std::string const &,int)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_DatabaseOpeningError(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::DatabaseOpeningError *arg1 = (Xapian::DatabaseOpeningError *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[10], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_DatabaseOpeningError" "', argument " "1"" of type '" "Xapian::DatabaseOpeningError *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::DatabaseOpeningError * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *DatabaseOpeningError_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[10], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *DatabaseOpeningError_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseVersionError__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + Xapian::DatabaseVersionError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseVersionError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseVersionError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DatabaseVersionError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseVersionError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, __null, &alloc3); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "new_DatabaseVersionError" "', argument " "3"" of type '" "char const *""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< char * >(buf3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseVersionError *)new Xapian::DatabaseVersionError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[11], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseVersionError__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int arg3 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int val3 ; + int ecode3 = 0 ; + Xapian::DatabaseVersionError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseVersionError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseVersionError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DatabaseVersionError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseVersionError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_DatabaseVersionError" "', argument " "3"" of type '" "int""'"); goto fail; } while(0); + } + arg3 = static_cast< int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseVersionError *)new Xapian::DatabaseVersionError((std::string const &)*arg1,(std::string const &)*arg2,arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[11], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseVersionError__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + Xapian::DatabaseVersionError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseVersionError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseVersionError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DatabaseVersionError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseVersionError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseVersionError *)new Xapian::DatabaseVersionError((std::string const &)*arg1,(std::string const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[11], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseVersionError__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::DatabaseVersionError *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseVersionError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseVersionError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseVersionError *)new Xapian::DatabaseVersionError((std::string const &)*arg1); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[11], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseVersionError__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + Xapian::DatabaseVersionError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DatabaseVersionError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DatabaseVersionError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_DatabaseVersionError" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DatabaseVersionError *)new Xapian::DatabaseVersionError((std::string const &)*arg1,arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[11], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DatabaseVersionError(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_DatabaseVersionError",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_new_DatabaseVersionError__SWIG_3(self, argc, argv); + } + if (argc == 2) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_2; + return _wrap_new_DatabaseVersionError__SWIG_4(self, argc, argv); + } +check_2: + if (argc == 2) { + return _wrap_new_DatabaseVersionError__SWIG_2(self, argc, argv); + } + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[2], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_4; + return _wrap_new_DatabaseVersionError__SWIG_1(self, argc, argv); + } +check_4: + if (argc == 3) { + return _wrap_new_DatabaseVersionError__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DatabaseVersionError'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::DatabaseVersionError(std::string const &,std::string const &,char const *)\n" + " Xapian::DatabaseVersionError(std::string const &,std::string const &,int)\n" + " Xapian::DatabaseVersionError(std::string const &,std::string const &)\n" + " Xapian::DatabaseVersionError(std::string const &)\n" + " Xapian::DatabaseVersionError(std::string const &,int)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_DatabaseVersionError(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::DatabaseVersionError *arg1 = (Xapian::DatabaseVersionError *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[11], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_DatabaseVersionError" "', argument " "1"" of type '" "Xapian::DatabaseVersionError *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::DatabaseVersionError * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *DatabaseVersionError_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[11], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *DatabaseVersionError_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DocNotFoundError__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + Xapian::DocNotFoundError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DocNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DocNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DocNotFoundError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DocNotFoundError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, __null, &alloc3); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "new_DocNotFoundError" "', argument " "3"" of type '" "char const *""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< char * >(buf3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DocNotFoundError *)new Xapian::DocNotFoundError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[14], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DocNotFoundError__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int arg3 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int val3 ; + int ecode3 = 0 ; + Xapian::DocNotFoundError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DocNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DocNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DocNotFoundError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DocNotFoundError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_DocNotFoundError" "', argument " "3"" of type '" "int""'"); goto fail; } while(0); + } + arg3 = static_cast< int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DocNotFoundError *)new Xapian::DocNotFoundError((std::string const &)*arg1,(std::string const &)*arg2,arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[14], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DocNotFoundError__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + Xapian::DocNotFoundError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DocNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DocNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DocNotFoundError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DocNotFoundError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DocNotFoundError *)new Xapian::DocNotFoundError((std::string const &)*arg1,(std::string const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[14], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DocNotFoundError__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::DocNotFoundError *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DocNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DocNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DocNotFoundError *)new Xapian::DocNotFoundError((std::string const &)*arg1); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[14], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DocNotFoundError__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + Xapian::DocNotFoundError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_DocNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DocNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_DocNotFoundError" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::DocNotFoundError *)new Xapian::DocNotFoundError((std::string const &)*arg1,arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[14], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DocNotFoundError(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_DocNotFoundError",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_new_DocNotFoundError__SWIG_3(self, argc, argv); + } + if (argc == 2) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_2; + return _wrap_new_DocNotFoundError__SWIG_4(self, argc, argv); + } +check_2: + if (argc == 2) { + return _wrap_new_DocNotFoundError__SWIG_2(self, argc, argv); + } + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[2], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_4; + return _wrap_new_DocNotFoundError__SWIG_1(self, argc, argv); + } +check_4: + if (argc == 3) { + return _wrap_new_DocNotFoundError__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DocNotFoundError'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::DocNotFoundError(std::string const &,std::string const &,char const *)\n" + " Xapian::DocNotFoundError(std::string const &,std::string const &,int)\n" + " Xapian::DocNotFoundError(std::string const &,std::string const &)\n" + " Xapian::DocNotFoundError(std::string const &)\n" + " Xapian::DocNotFoundError(std::string const &,int)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_DocNotFoundError(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::DocNotFoundError *arg1 = (Xapian::DocNotFoundError *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[14], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_DocNotFoundError" "', argument " "1"" of type '" "Xapian::DocNotFoundError *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::DocNotFoundError * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *DocNotFoundError_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[14], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *DocNotFoundError_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_FeatureUnavailableError__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + Xapian::FeatureUnavailableError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_FeatureUnavailableError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_FeatureUnavailableError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_FeatureUnavailableError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_FeatureUnavailableError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, __null, &alloc3); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "new_FeatureUnavailableError" "', argument " "3"" of type '" "char const *""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< char * >(buf3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::FeatureUnavailableError *)new Xapian::FeatureUnavailableError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[21], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_FeatureUnavailableError__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int arg3 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int val3 ; + int ecode3 = 0 ; + Xapian::FeatureUnavailableError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_FeatureUnavailableError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_FeatureUnavailableError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_FeatureUnavailableError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_FeatureUnavailableError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_FeatureUnavailableError" "', argument " "3"" of type '" "int""'"); goto fail; } while(0); + } + arg3 = static_cast< int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::FeatureUnavailableError *)new Xapian::FeatureUnavailableError((std::string const &)*arg1,(std::string const &)*arg2,arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[21], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_FeatureUnavailableError__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + Xapian::FeatureUnavailableError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_FeatureUnavailableError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_FeatureUnavailableError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_FeatureUnavailableError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_FeatureUnavailableError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::FeatureUnavailableError *)new Xapian::FeatureUnavailableError((std::string const &)*arg1,(std::string const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[21], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_FeatureUnavailableError__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::FeatureUnavailableError *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_FeatureUnavailableError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_FeatureUnavailableError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::FeatureUnavailableError *)new Xapian::FeatureUnavailableError((std::string const &)*arg1); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[21], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_FeatureUnavailableError__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + Xapian::FeatureUnavailableError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_FeatureUnavailableError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_FeatureUnavailableError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_FeatureUnavailableError" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::FeatureUnavailableError *)new Xapian::FeatureUnavailableError((std::string const &)*arg1,arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[21], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_FeatureUnavailableError(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_FeatureUnavailableError",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_new_FeatureUnavailableError__SWIG_3(self, argc, argv); + } + if (argc == 2) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_2; + return _wrap_new_FeatureUnavailableError__SWIG_4(self, argc, argv); + } +check_2: + if (argc == 2) { + return _wrap_new_FeatureUnavailableError__SWIG_2(self, argc, argv); + } + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[2], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_4; + return _wrap_new_FeatureUnavailableError__SWIG_1(self, argc, argv); + } +check_4: + if (argc == 3) { + return _wrap_new_FeatureUnavailableError__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_FeatureUnavailableError'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::FeatureUnavailableError(std::string const &,std::string const &,char const *)\n" + " Xapian::FeatureUnavailableError(std::string const &,std::string const &,int)\n" + " Xapian::FeatureUnavailableError(std::string const &,std::string const &)\n" + " Xapian::FeatureUnavailableError(std::string const &)\n" + " Xapian::FeatureUnavailableError(std::string const &,int)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_FeatureUnavailableError(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::FeatureUnavailableError *arg1 = (Xapian::FeatureUnavailableError *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[21], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_FeatureUnavailableError" "', argument " "1"" of type '" "Xapian::FeatureUnavailableError *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::FeatureUnavailableError * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *FeatureUnavailableError_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[21], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *FeatureUnavailableError_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_InternalError__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + Xapian::InternalError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_InternalError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_InternalError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_InternalError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_InternalError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, __null, &alloc3); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "new_InternalError" "', argument " "3"" of type '" "char const *""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< char * >(buf3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::InternalError *)new Xapian::InternalError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[23], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_InternalError__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int arg3 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int val3 ; + int ecode3 = 0 ; + Xapian::InternalError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_InternalError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_InternalError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_InternalError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_InternalError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_InternalError" "', argument " "3"" of type '" "int""'"); goto fail; } while(0); + } + arg3 = static_cast< int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::InternalError *)new Xapian::InternalError((std::string const &)*arg1,(std::string const &)*arg2,arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[23], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_InternalError__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + Xapian::InternalError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_InternalError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_InternalError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_InternalError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_InternalError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::InternalError *)new Xapian::InternalError((std::string const &)*arg1,(std::string const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[23], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_InternalError__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::InternalError *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_InternalError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_InternalError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::InternalError *)new Xapian::InternalError((std::string const &)*arg1); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[23], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_InternalError__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + Xapian::InternalError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_InternalError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_InternalError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_InternalError" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::InternalError *)new Xapian::InternalError((std::string const &)*arg1,arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[23], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_InternalError(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_InternalError",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_new_InternalError__SWIG_3(self, argc, argv); + } + if (argc == 2) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_2; + return _wrap_new_InternalError__SWIG_4(self, argc, argv); + } +check_2: + if (argc == 2) { + return _wrap_new_InternalError__SWIG_2(self, argc, argv); + } + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[2], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_4; + return _wrap_new_InternalError__SWIG_1(self, argc, argv); + } +check_4: + if (argc == 3) { + return _wrap_new_InternalError__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_InternalError'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::InternalError(std::string const &,std::string const &,char const *)\n" + " Xapian::InternalError(std::string const &,std::string const &,int)\n" + " Xapian::InternalError(std::string const &,std::string const &)\n" + " Xapian::InternalError(std::string const &)\n" + " Xapian::InternalError(std::string const &,int)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_InternalError(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::InternalError *arg1 = (Xapian::InternalError *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[23], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_InternalError" "', argument " "1"" of type '" "Xapian::InternalError *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::InternalError * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *InternalError_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[23], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *InternalError_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_NetworkError__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + Xapian::NetworkError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_NetworkError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_NetworkError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_NetworkError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_NetworkError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, __null, &alloc3); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "new_NetworkError" "', argument " "3"" of type '" "char const *""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< char * >(buf3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::NetworkError *)new Xapian::NetworkError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[34], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_NetworkError__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int arg3 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int val3 ; + int ecode3 = 0 ; + Xapian::NetworkError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_NetworkError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_NetworkError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_NetworkError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_NetworkError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_NetworkError" "', argument " "3"" of type '" "int""'"); goto fail; } while(0); + } + arg3 = static_cast< int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::NetworkError *)new Xapian::NetworkError((std::string const &)*arg1,(std::string const &)*arg2,arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[34], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_NetworkError__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + Xapian::NetworkError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_NetworkError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_NetworkError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_NetworkError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_NetworkError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::NetworkError *)new Xapian::NetworkError((std::string const &)*arg1,(std::string const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[34], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_NetworkError__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::NetworkError *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_NetworkError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_NetworkError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::NetworkError *)new Xapian::NetworkError((std::string const &)*arg1); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[34], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_NetworkError__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + Xapian::NetworkError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_NetworkError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_NetworkError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_NetworkError" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::NetworkError *)new Xapian::NetworkError((std::string const &)*arg1,arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[34], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_NetworkError(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_NetworkError",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_new_NetworkError__SWIG_3(self, argc, argv); + } + if (argc == 2) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_2; + return _wrap_new_NetworkError__SWIG_4(self, argc, argv); + } +check_2: + if (argc == 2) { + return _wrap_new_NetworkError__SWIG_2(self, argc, argv); + } + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[2], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_4; + return _wrap_new_NetworkError__SWIG_1(self, argc, argv); + } +check_4: + if (argc == 3) { + return _wrap_new_NetworkError__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_NetworkError'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::NetworkError(std::string const &,std::string const &,char const *)\n" + " Xapian::NetworkError(std::string const &,std::string const &,int)\n" + " Xapian::NetworkError(std::string const &,std::string const &)\n" + " Xapian::NetworkError(std::string const &)\n" + " Xapian::NetworkError(std::string const &,int)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_NetworkError(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::NetworkError *arg1 = (Xapian::NetworkError *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[34], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_NetworkError" "', argument " "1"" of type '" "Xapian::NetworkError *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::NetworkError * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *NetworkError_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[34], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *NetworkError_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_NetworkTimeoutError__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + Xapian::NetworkTimeoutError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_NetworkTimeoutError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_NetworkTimeoutError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_NetworkTimeoutError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_NetworkTimeoutError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, __null, &alloc3); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "new_NetworkTimeoutError" "', argument " "3"" of type '" "char const *""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< char * >(buf3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::NetworkTimeoutError *)new Xapian::NetworkTimeoutError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[35], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_NetworkTimeoutError__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int arg3 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int val3 ; + int ecode3 = 0 ; + Xapian::NetworkTimeoutError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_NetworkTimeoutError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_NetworkTimeoutError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_NetworkTimeoutError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_NetworkTimeoutError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_NetworkTimeoutError" "', argument " "3"" of type '" "int""'"); goto fail; } while(0); + } + arg3 = static_cast< int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::NetworkTimeoutError *)new Xapian::NetworkTimeoutError((std::string const &)*arg1,(std::string const &)*arg2,arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[35], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_NetworkTimeoutError__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + Xapian::NetworkTimeoutError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_NetworkTimeoutError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_NetworkTimeoutError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_NetworkTimeoutError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_NetworkTimeoutError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::NetworkTimeoutError *)new Xapian::NetworkTimeoutError((std::string const &)*arg1,(std::string const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[35], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_NetworkTimeoutError__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::NetworkTimeoutError *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_NetworkTimeoutError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_NetworkTimeoutError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::NetworkTimeoutError *)new Xapian::NetworkTimeoutError((std::string const &)*arg1); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[35], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_NetworkTimeoutError__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + Xapian::NetworkTimeoutError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_NetworkTimeoutError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_NetworkTimeoutError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_NetworkTimeoutError" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::NetworkTimeoutError *)new Xapian::NetworkTimeoutError((std::string const &)*arg1,arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[35], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_NetworkTimeoutError(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_NetworkTimeoutError",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_new_NetworkTimeoutError__SWIG_3(self, argc, argv); + } + if (argc == 2) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_2; + return _wrap_new_NetworkTimeoutError__SWIG_4(self, argc, argv); + } +check_2: + if (argc == 2) { + return _wrap_new_NetworkTimeoutError__SWIG_2(self, argc, argv); + } + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[2], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_4; + return _wrap_new_NetworkTimeoutError__SWIG_1(self, argc, argv); + } +check_4: + if (argc == 3) { + return _wrap_new_NetworkTimeoutError__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_NetworkTimeoutError'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::NetworkTimeoutError(std::string const &,std::string const &,char const *)\n" + " Xapian::NetworkTimeoutError(std::string const &,std::string const &,int)\n" + " Xapian::NetworkTimeoutError(std::string const &,std::string const &)\n" + " Xapian::NetworkTimeoutError(std::string const &)\n" + " Xapian::NetworkTimeoutError(std::string const &,int)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_NetworkTimeoutError(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::NetworkTimeoutError *arg1 = (Xapian::NetworkTimeoutError *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[35], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_NetworkTimeoutError" "', argument " "1"" of type '" "Xapian::NetworkTimeoutError *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::NetworkTimeoutError * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *NetworkTimeoutError_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[35], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *NetworkTimeoutError_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_QueryParserError__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + Xapian::QueryParserError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_QueryParserError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_QueryParserError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_QueryParserError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_QueryParserError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, __null, &alloc3); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "new_QueryParserError" "', argument " "3"" of type '" "char const *""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< char * >(buf3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::QueryParserError *)new Xapian::QueryParserError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[42], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_QueryParserError__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int arg3 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int val3 ; + int ecode3 = 0 ; + Xapian::QueryParserError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_QueryParserError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_QueryParserError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_QueryParserError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_QueryParserError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_QueryParserError" "', argument " "3"" of type '" "int""'"); goto fail; } while(0); + } + arg3 = static_cast< int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::QueryParserError *)new Xapian::QueryParserError((std::string const &)*arg1,(std::string const &)*arg2,arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[42], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_QueryParserError__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + Xapian::QueryParserError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_QueryParserError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_QueryParserError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_QueryParserError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_QueryParserError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::QueryParserError *)new Xapian::QueryParserError((std::string const &)*arg1,(std::string const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[42], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_QueryParserError__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::QueryParserError *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_QueryParserError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_QueryParserError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::QueryParserError *)new Xapian::QueryParserError((std::string const &)*arg1); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[42], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_QueryParserError__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + Xapian::QueryParserError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_QueryParserError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_QueryParserError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_QueryParserError" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::QueryParserError *)new Xapian::QueryParserError((std::string const &)*arg1,arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[42], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_QueryParserError(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_QueryParserError",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_new_QueryParserError__SWIG_3(self, argc, argv); + } + if (argc == 2) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_2; + return _wrap_new_QueryParserError__SWIG_4(self, argc, argv); + } +check_2: + if (argc == 2) { + return _wrap_new_QueryParserError__SWIG_2(self, argc, argv); + } + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[2], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_4; + return _wrap_new_QueryParserError__SWIG_1(self, argc, argv); + } +check_4: + if (argc == 3) { + return _wrap_new_QueryParserError__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_QueryParserError'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::QueryParserError(std::string const &,std::string const &,char const *)\n" + " Xapian::QueryParserError(std::string const &,std::string const &,int)\n" + " Xapian::QueryParserError(std::string const &,std::string const &)\n" + " Xapian::QueryParserError(std::string const &)\n" + " Xapian::QueryParserError(std::string const &,int)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_QueryParserError(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::QueryParserError *arg1 = (Xapian::QueryParserError *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[42], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_QueryParserError" "', argument " "1"" of type '" "Xapian::QueryParserError *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::QueryParserError * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *QueryParserError_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[42], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *QueryParserError_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_SerialisationError__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + Xapian::SerialisationError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_SerialisationError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_SerialisationError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_SerialisationError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_SerialisationError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, __null, &alloc3); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "new_SerialisationError" "', argument " "3"" of type '" "char const *""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< char * >(buf3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::SerialisationError *)new Xapian::SerialisationError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[47], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_SerialisationError__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int arg3 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int val3 ; + int ecode3 = 0 ; + Xapian::SerialisationError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_SerialisationError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_SerialisationError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_SerialisationError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_SerialisationError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_SerialisationError" "', argument " "3"" of type '" "int""'"); goto fail; } while(0); + } + arg3 = static_cast< int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::SerialisationError *)new Xapian::SerialisationError((std::string const &)*arg1,(std::string const &)*arg2,arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[47], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_SerialisationError__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + Xapian::SerialisationError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_SerialisationError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_SerialisationError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_SerialisationError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_SerialisationError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::SerialisationError *)new Xapian::SerialisationError((std::string const &)*arg1,(std::string const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[47], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_SerialisationError__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::SerialisationError *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_SerialisationError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_SerialisationError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::SerialisationError *)new Xapian::SerialisationError((std::string const &)*arg1); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[47], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_SerialisationError__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + Xapian::SerialisationError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_SerialisationError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_SerialisationError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_SerialisationError" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::SerialisationError *)new Xapian::SerialisationError((std::string const &)*arg1,arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[47], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_SerialisationError(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_SerialisationError",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_new_SerialisationError__SWIG_3(self, argc, argv); + } + if (argc == 2) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_2; + return _wrap_new_SerialisationError__SWIG_4(self, argc, argv); + } +check_2: + if (argc == 2) { + return _wrap_new_SerialisationError__SWIG_2(self, argc, argv); + } + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[2], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_4; + return _wrap_new_SerialisationError__SWIG_1(self, argc, argv); + } +check_4: + if (argc == 3) { + return _wrap_new_SerialisationError__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_SerialisationError'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::SerialisationError(std::string const &,std::string const &,char const *)\n" + " Xapian::SerialisationError(std::string const &,std::string const &,int)\n" + " Xapian::SerialisationError(std::string const &,std::string const &)\n" + " Xapian::SerialisationError(std::string const &)\n" + " Xapian::SerialisationError(std::string const &,int)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_SerialisationError(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::SerialisationError *arg1 = (Xapian::SerialisationError *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[47], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_SerialisationError" "', argument " "1"" of type '" "Xapian::SerialisationError *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::SerialisationError * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *SerialisationError_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[47], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *SerialisationError_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_RangeError__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + char *arg3 = (char *) 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + Xapian::RangeError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_RangeError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_RangeError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_RangeError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_RangeError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, __null, &alloc3); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "new_RangeError" "', argument " "3"" of type '" "char const *""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< char * >(buf3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::RangeError *)new Xapian::RangeError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[44], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (alloc3 == ((0) | ((1 << 8) << 1))) delete[] buf3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_RangeError__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int arg3 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + int val3 ; + int ecode3 = 0 ; + Xapian::RangeError *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_RangeError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_RangeError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_RangeError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_RangeError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_RangeError" "', argument " "3"" of type '" "int""'"); goto fail; } while(0); + } + arg3 = static_cast< int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::RangeError *)new Xapian::RangeError((std::string const &)*arg1,(std::string const &)*arg2,arg3); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[44], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_RangeError__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + Xapian::RangeError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_RangeError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_RangeError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_RangeError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_RangeError" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::RangeError *)new Xapian::RangeError((std::string const &)*arg1,(std::string const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[44], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_RangeError__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::RangeError *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_RangeError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_RangeError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::RangeError *)new Xapian::RangeError((std::string const &)*arg1); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[44], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_RangeError__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + Xapian::RangeError *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_RangeError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_RangeError" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_RangeError" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (Xapian::RangeError *)new Xapian::RangeError((std::string const &)*arg1,arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[44], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_RangeError(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_RangeError",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_new_RangeError__SWIG_3(self, argc, argv); + } + if (argc == 2) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_2; + return _wrap_new_RangeError__SWIG_4(self, argc, argv); + } +check_2: + if (argc == 2) { + return _wrap_new_RangeError__SWIG_2(self, argc, argv); + } + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[2], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_4; + return _wrap_new_RangeError__SWIG_1(self, argc, argv); + } +check_4: + if (argc == 3) { + return _wrap_new_RangeError__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_RangeError'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::RangeError(std::string const &,std::string const &,char const *)\n" + " Xapian::RangeError(std::string const &,std::string const &,int)\n" + " Xapian::RangeError(std::string const &,std::string const &)\n" + " Xapian::RangeError(std::string const &)\n" + " Xapian::RangeError(std::string const &,int)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_RangeError(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::RangeError *arg1 = (Xapian::RangeError *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[44], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_RangeError" "', argument " "1"" of type '" "Xapian::RangeError *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::RangeError * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *RangeError_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[44], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *RangeError_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_version_string(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + char *result = 0 ; + if (!SWIG_Python_UnpackTuple(args,"version_string",0,0,0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (char *)Xapian::version_string(); + _swig_thread_allow.end(); + } + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_major_version(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + int result; + if (!SWIG_Python_UnpackTuple(args,"major_version",0,0,0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (int)Xapian::major_version(); + _swig_thread_allow.end(); + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_minor_version(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + int result; + if (!SWIG_Python_UnpackTuple(args,"minor_version",0,0,0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (int)Xapian::minor_version(); + _swig_thread_allow.end(); + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_revision(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + int result; + if (!SWIG_Python_UnpackTuple(args,"revision",0,0,0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (int)Xapian::revision(); + _swig_thread_allow.end(); + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_PositionIterator__SWIG_0(PyObject *, int nobjs, PyObject **) { + PyObject *resultobj = 0; + Xapian::PositionIterator *result = 0 ; + if ((nobjs < 0) || (nobjs > 0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::PositionIterator *)new Xapian::PositionIterator(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[37], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_PositionIterator__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::PositionIterator *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Xapian::PositionIterator *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[37], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_PositionIterator" "', argument " "1"" of type '" "Xapian::PositionIterator const &""'"); goto fail; } while(0); + } + if (!argp1) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_PositionIterator" "', argument " "1"" of type '" "Xapian::PositionIterator const &""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::PositionIterator *)new Xapian::PositionIterator((Xapian::PositionIterator const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[37], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_PositionIterator(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_PositionIterator",0,1,argv))) goto fail; + --argc; + if (argc == 0) { + return _wrap_new_PositionIterator__SWIG_0(self, argc, argv); + } + if (argc == 1) { + return _wrap_new_PositionIterator__SWIG_1(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_PositionIterator'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::PositionIterator()\n" + " Xapian::PositionIterator(Xapian::PositionIterator const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_PositionIterator(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[37], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_PositionIterator" "', argument " "1"" of type '" "Xapian::PositionIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PositionIterator_get_termpos(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::termpos result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[37], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PositionIterator_get_termpos" "', argument " "1"" of type '" "Xapian::PositionIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::termpos)Xapian_PositionIterator_get_termpos((Xapian::PositionIterator const *)arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PositionIterator_next(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[37], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PositionIterator_next" "', argument " "1"" of type '" "Xapian::PositionIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + Xapian_PositionIterator_next(arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PositionIterator_equals(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ; + Xapian::PositionIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"PositionIterator_equals",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[37], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PositionIterator_equals" "', argument " "1"" of type '" "Xapian::PositionIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[37], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "PositionIterator_equals" "', argument " "2"" of type '" "Xapian::PositionIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "PositionIterator_equals" "', argument " "2"" of type '" "Xapian::PositionIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::PositionIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (bool)Xapian_PositionIterator_equals((Xapian::PositionIterator const *)arg1,(Xapian::PositionIterator const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PositionIterator_skip_to(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ; + Xapian::termpos arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"PositionIterator_skip_to",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[37], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PositionIterator_skip_to" "', argument " "1"" of type '" "Xapian::PositionIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "PositionIterator_skip_to" "', argument " "2"" of type '" "Xapian::termpos""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::termpos >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->skip_to(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PositionIterator___str__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[37], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PositionIterator___str__" "', argument " "1"" of type '" "Xapian::PositionIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::PositionIterator const *)arg1)->get_description(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PositionIterator___eq__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ; + Xapian::PositionIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"PositionIterator___eq__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[37], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PositionIterator___eq__" "', argument " "1"" of type '" "Xapian::PositionIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[37], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "PositionIterator___eq__" "', argument " "2"" of type '" "Xapian::PositionIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "PositionIterator___eq__" "', argument " "2"" of type '" "Xapian::PositionIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::PositionIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (bool)Xapian_PositionIterator___eq__(arg1,(Xapian::PositionIterator const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PositionIterator___ne__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ; + Xapian::PositionIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"PositionIterator___ne__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[37], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PositionIterator___ne__" "', argument " "1"" of type '" "Xapian::PositionIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[37], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "PositionIterator___ne__" "', argument " "2"" of type '" "Xapian::PositionIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "PositionIterator___ne__" "', argument " "2"" of type '" "Xapian::PositionIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::PositionIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (bool)Xapian_PositionIterator___ne__(arg1,(Xapian::PositionIterator const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *PositionIterator_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[37], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *PositionIterator_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_PostingIterator__SWIG_0(PyObject *, int nobjs, PyObject **) { + PyObject *resultobj = 0; + Xapian::PostingIterator *result = 0 ; + if ((nobjs < 0) || (nobjs > 0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::PostingIterator *)new Xapian::PostingIterator(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[38], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_PostingIterator(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[38], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_PostingIterator" "', argument " "1"" of type '" "Xapian::PostingIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_PostingIterator__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::PostingIterator *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Xapian::PostingIterator *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[38], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_PostingIterator" "', argument " "1"" of type '" "Xapian::PostingIterator const &""'"); goto fail; } while(0); + } + if (!argp1) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_PostingIterator" "', argument " "1"" of type '" "Xapian::PostingIterator const &""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::PostingIterator *)new Xapian::PostingIterator((Xapian::PostingIterator const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[38], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_PostingIterator(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_PostingIterator",0,1,argv))) goto fail; + --argc; + if (argc == 0) { + return _wrap_new_PostingIterator__SWIG_0(self, argc, argv); + } + if (argc == 1) { + return _wrap_new_PostingIterator__SWIG_1(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_PostingIterator'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::PostingIterator()\n" + " Xapian::PostingIterator(Xapian::PostingIterator const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PostingIterator_skip_to(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ; + Xapian::docid arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"PostingIterator_skip_to",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[38], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PostingIterator_skip_to" "', argument " "1"" of type '" "Xapian::PostingIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "PostingIterator_skip_to" "', argument " "2"" of type '" "Xapian::docid""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::docid >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->skip_to(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PostingIterator_get_doclength(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::termcount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[38], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PostingIterator_get_doclength" "', argument " "1"" of type '" "Xapian::PostingIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::termcount)((Xapian::PostingIterator const *)arg1)->get_doclength(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PostingIterator_get_wdf(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::termcount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[38], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PostingIterator_get_wdf" "', argument " "1"" of type '" "Xapian::PostingIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::termcount)((Xapian::PostingIterator const *)arg1)->get_wdf(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PostingIterator_positionlist_begin(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::PositionIterator result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[38], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PostingIterator_positionlist_begin" "', argument " "1"" of type '" "Xapian::PostingIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::PostingIterator const *)arg1)->positionlist_begin(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), swig_types[37], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PostingIterator_positionlist_end(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::PositionIterator result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[38], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PostingIterator_positionlist_end" "', argument " "1"" of type '" "Xapian::PostingIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::PostingIterator const *)arg1)->positionlist_end(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), swig_types[37], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PostingIterator___str__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[38], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PostingIterator___str__" "', argument " "1"" of type '" "Xapian::PostingIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::PostingIterator const *)arg1)->get_description(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PostingIterator___eq__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ; + Xapian::PostingIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"PostingIterator___eq__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[38], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PostingIterator___eq__" "', argument " "1"" of type '" "Xapian::PostingIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[38], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "PostingIterator___eq__" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "PostingIterator___eq__" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::PostingIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (bool)Xapian_PostingIterator___eq__(arg1,(Xapian::PostingIterator const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PostingIterator___ne__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ; + Xapian::PostingIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"PostingIterator___ne__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[38], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PostingIterator___ne__" "', argument " "1"" of type '" "Xapian::PostingIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[38], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "PostingIterator___ne__" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "PostingIterator___ne__" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::PostingIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (bool)Xapian_PostingIterator___ne__(arg1,(Xapian::PostingIterator const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PostingIterator_get_docid(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::docid result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[38], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PostingIterator_get_docid" "', argument " "1"" of type '" "Xapian::PostingIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::docid)Xapian_PostingIterator_get_docid((Xapian::PostingIterator const *)arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PostingIterator_next(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[38], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PostingIterator_next" "', argument " "1"" of type '" "Xapian::PostingIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + Xapian_PostingIterator_next(arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PostingIterator_equals(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ; + Xapian::PostingIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"PostingIterator_equals",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[38], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PostingIterator_equals" "', argument " "1"" of type '" "Xapian::PostingIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[38], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "PostingIterator_equals" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "PostingIterator_equals" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::PostingIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (bool)Xapian_PostingIterator_equals((Xapian::PostingIterator const *)arg1,(Xapian::PostingIterator const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *PostingIterator_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[38], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *PostingIterator_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap___eq__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingIterator *arg1 = 0 ; + Xapian::PostingIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"__eq__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[38], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "__eq__" "', argument " "1"" of type '" "Xapian::PostingIterator const &""'"); goto fail; } while(0); + } + if (!argp1) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "__eq__" "', argument " "1"" of type '" "Xapian::PostingIterator const &""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[38], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "__eq__" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "__eq__" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::PostingIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (bool)Xapian::operator ==((Xapian::PostingIterator const &)*arg1,(Xapian::PostingIterator const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap___ne__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingIterator *arg1 = 0 ; + Xapian::PostingIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"__ne__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[38], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "__ne__" "', argument " "1"" of type '" "Xapian::PostingIterator const &""'"); goto fail; } while(0); + } + if (!argp1) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "__ne__" "', argument " "1"" of type '" "Xapian::PostingIterator const &""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[38], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "__ne__" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "__ne__" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::PostingIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (bool)Xapian::operator !=((Xapian::PostingIterator const &)*arg1,(Xapian::PostingIterator const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_TermIterator__SWIG_0(PyObject *, int nobjs, PyObject **) { + PyObject *resultobj = 0; + Xapian::TermIterator *result = 0 ; + if ((nobjs < 0) || (nobjs > 0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::TermIterator *)new Xapian::TermIterator(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[55], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_TermIterator__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::TermIterator *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Xapian::TermIterator *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[55], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_TermIterator" "', argument " "1"" of type '" "Xapian::TermIterator const &""'"); goto fail; } while(0); + } + if (!argp1) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_TermIterator" "', argument " "1"" of type '" "Xapian::TermIterator const &""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::TermIterator *)new Xapian::TermIterator((Xapian::TermIterator const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[55], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_TermIterator(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_TermIterator",0,1,argv))) goto fail; + --argc; + if (argc == 0) { + return _wrap_new_TermIterator__SWIG_0(self, argc, argv); + } + if (argc == 1) { + return _wrap_new_TermIterator__SWIG_1(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_TermIterator'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::TermIterator()\n" + " Xapian::TermIterator(Xapian::TermIterator const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_TermIterator(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[55], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_TermIterator" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermIterator_get_term(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[55], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermIterator_get_term" "', argument " "1"" of type '" "Xapian::TermIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian_TermIterator_get_term((Xapian::TermIterator const *)arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermIterator_next(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[55], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermIterator_next" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + Xapian_TermIterator_next(arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermIterator_equals(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ; + Xapian::TermIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"TermIterator_equals",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[55], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermIterator_equals" "', argument " "1"" of type '" "Xapian::TermIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[55], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "TermIterator_equals" "', argument " "2"" of type '" "Xapian::TermIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "TermIterator_equals" "', argument " "2"" of type '" "Xapian::TermIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::TermIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (bool)Xapian_TermIterator_equals((Xapian::TermIterator const *)arg1,(Xapian::TermIterator const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermIterator_skip_to(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"TermIterator_skip_to",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[55], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermIterator_skip_to" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "TermIterator_skip_to" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "TermIterator_skip_to" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->skip_to((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermIterator_get_wdf(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::termcount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[55], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermIterator_get_wdf" "', argument " "1"" of type '" "Xapian::TermIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::termcount)((Xapian::TermIterator const *)arg1)->get_wdf(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermIterator_get_termfreq(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::doccount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[55], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermIterator_get_termfreq" "', argument " "1"" of type '" "Xapian::TermIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::doccount)((Xapian::TermIterator const *)arg1)->get_termfreq(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermIterator_positionlist_begin(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::PositionIterator result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[55], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermIterator_positionlist_begin" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (arg1)->positionlist_begin(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), swig_types[37], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermIterator_positionlist_end(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::PositionIterator result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[55], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermIterator_positionlist_end" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (arg1)->positionlist_end(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), swig_types[37], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermIterator___str__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[55], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermIterator___str__" "', argument " "1"" of type '" "Xapian::TermIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::TermIterator const *)arg1)->get_description(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermIterator___eq__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ; + Xapian::TermIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"TermIterator___eq__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[55], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermIterator___eq__" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[55], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "TermIterator___eq__" "', argument " "2"" of type '" "Xapian::TermIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "TermIterator___eq__" "', argument " "2"" of type '" "Xapian::TermIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::TermIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (bool)Xapian_TermIterator___eq__(arg1,(Xapian::TermIterator const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermIterator___ne__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ; + Xapian::TermIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"TermIterator___ne__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[55], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermIterator___ne__" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[55], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "TermIterator___ne__" "', argument " "2"" of type '" "Xapian::TermIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "TermIterator___ne__" "', argument " "2"" of type '" "Xapian::TermIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::TermIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (bool)Xapian_TermIterator___ne__(arg1,(Xapian::TermIterator const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *TermIterator_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[55], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *TermIterator_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_ValueIterator__SWIG_0(PyObject *, int nobjs, PyObject **) { + PyObject *resultobj = 0; + Xapian::ValueIterator *result = 0 ; + if ((nobjs < 0) || (nobjs > 0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::ValueIterator *)new Xapian::ValueIterator(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[59], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_ValueIterator__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::ValueIterator *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Xapian::ValueIterator *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[59], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_ValueIterator" "', argument " "1"" of type '" "Xapian::ValueIterator const &""'"); goto fail; } while(0); + } + if (!argp1) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_ValueIterator" "', argument " "1"" of type '" "Xapian::ValueIterator const &""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::ValueIterator *)new Xapian::ValueIterator((Xapian::ValueIterator const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[59], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_ValueIterator(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_ValueIterator",0,1,argv))) goto fail; + --argc; + if (argc == 0) { + return _wrap_new_ValueIterator__SWIG_0(self, argc, argv); + } + if (argc == 1) { + return _wrap_new_ValueIterator__SWIG_1(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ValueIterator'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::ValueIterator()\n" + " Xapian::ValueIterator(Xapian::ValueIterator const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_ValueIterator(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[59], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_ValueIterator" "', argument " "1"" of type '" "Xapian::ValueIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ValueIterator_get_value(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[59], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ValueIterator_get_value" "', argument " "1"" of type '" "Xapian::ValueIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian_ValueIterator_get_value((Xapian::ValueIterator const *)arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ValueIterator_next(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[59], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ValueIterator_next" "', argument " "1"" of type '" "Xapian::ValueIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + Xapian_ValueIterator_next(arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ValueIterator_equals(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ; + Xapian::ValueIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"ValueIterator_equals",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[59], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ValueIterator_equals" "', argument " "1"" of type '" "Xapian::ValueIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[59], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "ValueIterator_equals" "', argument " "2"" of type '" "Xapian::ValueIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "ValueIterator_equals" "', argument " "2"" of type '" "Xapian::ValueIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::ValueIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (bool)Xapian_ValueIterator_equals((Xapian::ValueIterator const *)arg1,(Xapian::ValueIterator const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ValueIterator_get_docid(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::docid result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[59], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ValueIterator_get_docid" "', argument " "1"" of type '" "Xapian::ValueIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::docid)((Xapian::ValueIterator const *)arg1)->get_docid(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ValueIterator_get_valueno(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::valueno result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[59], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ValueIterator_get_valueno" "', argument " "1"" of type '" "Xapian::ValueIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::valueno)((Xapian::ValueIterator const *)arg1)->get_valueno(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ValueIterator_skip_to(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ; + Xapian::docid arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"ValueIterator_skip_to",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[59], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ValueIterator_skip_to" "', argument " "1"" of type '" "Xapian::ValueIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "ValueIterator_skip_to" "', argument " "2"" of type '" "Xapian::docid""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::docid >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->skip_to(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ValueIterator_check(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ; + Xapian::docid arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"ValueIterator_check",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[59], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ValueIterator_check" "', argument " "1"" of type '" "Xapian::ValueIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "ValueIterator_check" "', argument " "2"" of type '" "Xapian::docid""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::docid >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (bool)(arg1)->check(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ValueIterator___str__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[59], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ValueIterator___str__" "', argument " "1"" of type '" "Xapian::ValueIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::ValueIterator const *)arg1)->get_description(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ValueIterator___eq__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ; + Xapian::ValueIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"ValueIterator___eq__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[59], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ValueIterator___eq__" "', argument " "1"" of type '" "Xapian::ValueIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[59], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "ValueIterator___eq__" "', argument " "2"" of type '" "Xapian::ValueIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "ValueIterator___eq__" "', argument " "2"" of type '" "Xapian::ValueIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::ValueIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (bool)Xapian_ValueIterator___eq__(arg1,(Xapian::ValueIterator const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ValueIterator___ne__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ; + Xapian::ValueIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"ValueIterator___ne__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[59], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ValueIterator___ne__" "', argument " "1"" of type '" "Xapian::ValueIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[59], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "ValueIterator___ne__" "', argument " "2"" of type '" "Xapian::ValueIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "ValueIterator___ne__" "', argument " "2"" of type '" "Xapian::ValueIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::ValueIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (bool)Xapian_ValueIterator___ne__(arg1,(Xapian::ValueIterator const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *ValueIterator_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[59], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *ValueIterator_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Document__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Xapian::Document *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_Document" "', argument " "1"" of type '" "Xapian::Document const &""'"); goto fail; } while(0); + } + if (!argp1) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_Document" "', argument " "1"" of type '" "Xapian::Document const &""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Document *)new Xapian::Document((Xapian::Document const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[15], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Document__SWIG_1(PyObject *, int nobjs, PyObject **) { + PyObject *resultobj = 0; + Xapian::Document *result = 0 ; + if ((nobjs < 0) || (nobjs > 0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Document *)new Xapian::Document(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[15], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Document(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_Document",0,1,argv))) goto fail; + --argc; + if (argc == 0) { + return _wrap_new_Document__SWIG_1(self, argc, argv); + } + if (argc == 1) { + return _wrap_new_Document__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Document'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::Document(Xapian::Document const &)\n" + " Xapian::Document()\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_Document(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_Document" "', argument " "1"" of type '" "Xapian::Document *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_get_value(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + Xapian::valueno arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + std::string result; + if (!SWIG_Python_UnpackTuple(args,"Document_get_value",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document_get_value" "', argument " "1"" of type '" "Xapian::Document const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Document_get_value" "', argument " "2"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::valueno >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Document const *)arg1)->get_value(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_add_value(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + Xapian::valueno arg2 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int res3 = ((0)) ; + PyObject *swig_obj[3] ; + if (!SWIG_Python_UnpackTuple(args,"Document_add_value",3,3,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document_add_value" "', argument " "1"" of type '" "Xapian::Document *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Document_add_value" "', argument " "2"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::valueno >(val2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_anystring_as_ptr(&(swig_obj[2]), &ptr); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "Document_add_value" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Document_add_value" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg3 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->add_value(arg2,(std::string const &)*arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + return resultobj; +fail: + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_remove_value(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + Xapian::valueno arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"Document_remove_value",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document_remove_value" "', argument " "1"" of type '" "Xapian::Document *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Document_remove_value" "', argument " "2"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::valueno >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->remove_value(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_clear_values(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document_clear_values" "', argument " "1"" of type '" "Xapian::Document *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->clear_values(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_get_data(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document_get_data" "', argument " "1"" of type '" "Xapian::Document const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Document const *)arg1)->get_data(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_set_data(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"Document_set_data",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document_set_data" "', argument " "1"" of type '" "Xapian::Document *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Document_set_data" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Document_set_data" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_data((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_add_posting__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + std::string *arg2 = 0 ; + Xapian::termpos arg3 ; + Xapian::termcount arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + unsigned int val3 ; + int ecode3 = 0 ; + unsigned int val4 ; + int ecode4 = 0 ; + if ((nobjs < 4) || (nobjs > 4)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document_add_posting" "', argument " "1"" of type '" "Xapian::Document *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Document_add_posting" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Document_add_posting" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "Document_add_posting" "', argument " "3"" of type '" "Xapian::termpos""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::termpos >(val3); + ecode4 = SWIG_AsVal_unsigned_SS_int(swig_obj[3], &val4); + if (!(ecode4 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode4 != (-1)) ? ecode4 : -5)), "in method '" "Document_add_posting" "', argument " "4"" of type '" "Xapian::termcount""'"); goto fail; } while(0); + } + arg4 = static_cast< Xapian::termcount >(val4); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->add_posting((std::string const &)*arg2,arg3,arg4); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_add_posting__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + std::string *arg2 = 0 ; + Xapian::termpos arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + unsigned int val3 ; + int ecode3 = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document_add_posting" "', argument " "1"" of type '" "Xapian::Document *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Document_add_posting" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Document_add_posting" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "Document_add_posting" "', argument " "3"" of type '" "Xapian::termpos""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::termpos >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->add_posting((std::string const &)*arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_add_posting(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + if (!(argc = SWIG_Python_UnpackTuple(args,"Document_add_posting",0,4,argv))) goto fail; + --argc; + if (argc == 3) { + return _wrap_Document_add_posting__SWIG_1(self, argc, argv); + } + if (argc == 4) { + return _wrap_Document_add_posting__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Document_add_posting'.\n" + " Possible C/C++ prototypes are:\n" + " add_posting(Xapian::Document *,std::string const &,Xapian::termpos,Xapian::termcount)\n" + " add_posting(Xapian::Document *,std::string const &,Xapian::termpos)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_add_term__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + std::string *arg2 = 0 ; + Xapian::termcount arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + unsigned int val3 ; + int ecode3 = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document_add_term" "', argument " "1"" of type '" "Xapian::Document *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Document_add_term" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Document_add_term" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "Document_add_term" "', argument " "3"" of type '" "Xapian::termcount""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::termcount >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->add_term((std::string const &)*arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_add_term__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document_add_term" "', argument " "1"" of type '" "Xapian::Document *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Document_add_term" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Document_add_term" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->add_term((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_add_term(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"Document_add_term",0,3,argv))) goto fail; + --argc; + if (argc == 2) { + return _wrap_Document_add_term__SWIG_1(self, argc, argv); + } + if (argc == 3) { + return _wrap_Document_add_term__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Document_add_term'.\n" + " Possible C/C++ prototypes are:\n" + " add_term(Xapian::Document *,std::string const &,Xapian::termcount)\n" + " add_term(Xapian::Document *,std::string const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_add_boolean_term(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"Document_add_boolean_term",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document_add_boolean_term" "', argument " "1"" of type '" "Xapian::Document *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Document_add_boolean_term" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Document_add_boolean_term" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->add_boolean_term((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_remove_posting__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + std::string *arg2 = 0 ; + Xapian::termpos arg3 ; + Xapian::termcount arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + unsigned int val3 ; + int ecode3 = 0 ; + unsigned int val4 ; + int ecode4 = 0 ; + if ((nobjs < 4) || (nobjs > 4)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document_remove_posting" "', argument " "1"" of type '" "Xapian::Document *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Document_remove_posting" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Document_remove_posting" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "Document_remove_posting" "', argument " "3"" of type '" "Xapian::termpos""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::termpos >(val3); + ecode4 = SWIG_AsVal_unsigned_SS_int(swig_obj[3], &val4); + if (!(ecode4 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode4 != (-1)) ? ecode4 : -5)), "in method '" "Document_remove_posting" "', argument " "4"" of type '" "Xapian::termcount""'"); goto fail; } while(0); + } + arg4 = static_cast< Xapian::termcount >(val4); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->remove_posting((std::string const &)*arg2,arg3,arg4); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_remove_posting__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + std::string *arg2 = 0 ; + Xapian::termpos arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + unsigned int val3 ; + int ecode3 = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document_remove_posting" "', argument " "1"" of type '" "Xapian::Document *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Document_remove_posting" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Document_remove_posting" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "Document_remove_posting" "', argument " "3"" of type '" "Xapian::termpos""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::termpos >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->remove_posting((std::string const &)*arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_remove_posting(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + if (!(argc = SWIG_Python_UnpackTuple(args,"Document_remove_posting",0,4,argv))) goto fail; + --argc; + if (argc == 3) { + return _wrap_Document_remove_posting__SWIG_1(self, argc, argv); + } + if (argc == 4) { + return _wrap_Document_remove_posting__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Document_remove_posting'.\n" + " Possible C/C++ prototypes are:\n" + " remove_posting(Xapian::Document *,std::string const &,Xapian::termpos,Xapian::termcount)\n" + " remove_posting(Xapian::Document *,std::string const &,Xapian::termpos)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_remove_term(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"Document_remove_term",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document_remove_term" "', argument " "1"" of type '" "Xapian::Document *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Document_remove_term" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Document_remove_term" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->remove_term((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_clear_terms(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document_clear_terms" "', argument " "1"" of type '" "Xapian::Document *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->clear_terms(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_termlist_count(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::termcount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document_termlist_count" "', argument " "1"" of type '" "Xapian::Document const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::termcount)((Xapian::Document const *)arg1)->termlist_count(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_termlist_begin(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::TermIterator result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document_termlist_begin" "', argument " "1"" of type '" "Xapian::Document const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Document const *)arg1)->termlist_begin(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_termlist_end(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::TermIterator result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document_termlist_end" "', argument " "1"" of type '" "Xapian::Document const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Document const *)arg1)->termlist_end(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_values_count(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::termcount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document_values_count" "', argument " "1"" of type '" "Xapian::Document const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::termcount)((Xapian::Document const *)arg1)->values_count(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_values_begin(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::ValueIterator result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document_values_begin" "', argument " "1"" of type '" "Xapian::Document const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Document const *)arg1)->values_begin(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::ValueIterator(static_cast< const Xapian::ValueIterator& >(result))), swig_types[59], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_values_end(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::ValueIterator result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document_values_end" "', argument " "1"" of type '" "Xapian::Document const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Document const *)arg1)->values_end(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::ValueIterator(static_cast< const Xapian::ValueIterator& >(result))), swig_types[59], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_get_docid(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::docid result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document_get_docid" "', argument " "1"" of type '" "Xapian::Document const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::docid)((Xapian::Document const *)arg1)->get_docid(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_serialise(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document_serialise" "', argument " "1"" of type '" "Xapian::Document const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Document const *)arg1)->serialise(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document_unserialise(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + PyObject *swig_obj[1] ; + Xapian::Document result; + if (!args) goto fail; + swig_obj[0] = args; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document_unserialise" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Document_unserialise" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::Document::unserialise((std::string const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::Document(static_cast< const Xapian::Document& >(result))), swig_types[15], 0x1 | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Document___str__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Document *arg1 = (Xapian::Document *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[15], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Document___str__" "', argument " "1"" of type '" "Xapian::Document const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Document * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Document const *)arg1)->get_description(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *Document_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[15], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *Document_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_PostingSource(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + PyObject *swig_obj[1] ; + Xapian::PostingSource *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + arg1 = swig_obj[0]; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + if ( arg1 != (&_Py_NoneStruct) ) { + result = (Xapian::PostingSource *)new SwigDirector_PostingSource(arg1); + } else { + SWIG_Python_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); + goto fail; + } + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[39], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_PostingSource(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[39], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_PostingSource" "', argument " "1"" of type '" "Xapian::PostingSource *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PostingSource_get_termfreq_min(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Swig::Director *director = 0; + bool upcall = false; + Xapian::doccount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[39], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PostingSource_get_termfreq_min" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1); + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::get_termfreq_min"); + } else { + result = (Xapian::doccount)((Xapian::PostingSource const *)arg1)->get_termfreq_min(); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PostingSource_get_termfreq_est(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Swig::Director *director = 0; + bool upcall = false; + Xapian::doccount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[39], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PostingSource_get_termfreq_est" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1); + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::get_termfreq_est"); + } else { + result = (Xapian::doccount)((Xapian::PostingSource const *)arg1)->get_termfreq_est(); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PostingSource_get_termfreq_max(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Swig::Director *director = 0; + bool upcall = false; + Xapian::doccount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[39], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PostingSource_get_termfreq_max" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1); + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::get_termfreq_max"); + } else { + result = (Xapian::doccount)((Xapian::PostingSource const *)arg1)->get_termfreq_max(); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PostingSource_get_maxweight(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::weight result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[39], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PostingSource_get_maxweight" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::weight)((Xapian::PostingSource const *)arg1)->get_maxweight(); + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = PyFloat_FromDouble(static_cast< double >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PostingSource_get_weight(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Swig::Director *director = 0; + bool upcall = false; + Xapian::weight result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[39], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PostingSource_get_weight" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1); + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + result = (Xapian::weight)((Xapian::PostingSource const *)arg1)->Xapian::PostingSource::get_weight(); + } else { + result = (Xapian::weight)((Xapian::PostingSource const *)arg1)->get_weight(); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = PyFloat_FromDouble(static_cast< double >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PostingSource_get_docid(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Swig::Director *director = 0; + bool upcall = false; + Xapian::docid result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[39], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PostingSource_get_docid" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1); + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::get_docid"); + } else { + result = (Xapian::docid)((Xapian::PostingSource const *)arg1)->get_docid(); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PostingSource_next(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ; + Xapian::weight arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + Swig::Director *director = 0; + bool upcall = false; + if (!SWIG_Python_UnpackTuple(args,"PostingSource_next",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[39], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PostingSource_next" "', argument " "1"" of type '" "Xapian::PostingSource *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "PostingSource_next" "', argument " "2"" of type '" "Xapian::weight""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::weight >(val2); + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::next"); + } else { + (arg1)->next(arg2); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PostingSource_skip_to(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ; + Xapian::docid arg2 ; + Xapian::weight arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + Swig::Director *director = 0; + bool upcall = false; + if (!SWIG_Python_UnpackTuple(args,"PostingSource_skip_to",3,3,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[39], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PostingSource_skip_to" "', argument " "1"" of type '" "Xapian::PostingSource *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "PostingSource_skip_to" "', argument " "2"" of type '" "Xapian::docid""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::docid >(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "PostingSource_skip_to" "', argument " "3"" of type '" "Xapian::weight""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::weight >(val3); + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + (arg1)->Xapian::PostingSource::skip_to(arg2,arg3); + } else { + (arg1)->skip_to(arg2,arg3); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PostingSource_check(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ; + Xapian::docid arg2 ; + Xapian::weight arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + Swig::Director *director = 0; + bool upcall = false; + bool result; + if (!SWIG_Python_UnpackTuple(args,"PostingSource_check",3,3,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[39], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PostingSource_check" "', argument " "1"" of type '" "Xapian::PostingSource *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "PostingSource_check" "', argument " "2"" of type '" "Xapian::docid""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::docid >(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "PostingSource_check" "', argument " "3"" of type '" "Xapian::weight""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::weight >(val3); + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + result = (bool)(arg1)->Xapian::PostingSource::check(arg2,arg3); + } else { + result = (bool)(arg1)->check(arg2,arg3); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PostingSource_at_end(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Swig::Director *director = 0; + bool upcall = false; + bool result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[39], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PostingSource_at_end" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1); + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::at_end"); + } else { + result = (bool)((Xapian::PostingSource const *)arg1)->at_end(); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PostingSource_name(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Swig::Director *director = 0; + bool upcall = false; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[39], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PostingSource_name" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1); + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + result = ((Xapian::PostingSource const *)arg1)->Xapian::PostingSource::name(); + } else { + result = ((Xapian::PostingSource const *)arg1)->name(); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PostingSource_init(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ; + Xapian::Database *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + Swig::Director *director = 0; + bool upcall = false; + if (!SWIG_Python_UnpackTuple(args,"PostingSource_init",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[39], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PostingSource_init" "', argument " "1"" of type '" "Xapian::PostingSource *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[4], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "PostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "PostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::Database * >(argp2); + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::init"); + } else { + (arg1)->init((Xapian::Database const &)*arg2); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_PostingSource___str__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Swig::Director *director = 0; + bool upcall = false; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[39], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "PostingSource___str__" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1); + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + result = ((Xapian::PostingSource const *)arg1)->Xapian::PostingSource::get_description(); + } else { + result = ((Xapian::PostingSource const *)arg1)->get_description(); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_disown_PostingSource(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[39], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "disown_PostingSource" "', argument " "1"" of type '" "Xapian::PostingSource *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *PostingSource_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[39], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *PostingSource_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_ValuePostingSource(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::valueno arg1 ; + unsigned int val1 ; + int ecode1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::ValuePostingSource *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_ValuePostingSource" "', argument " "1"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::valueno >(val1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::ValuePostingSource *)new Xapian::ValuePostingSource(arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[61], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_ValuePostingSource(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[61], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_ValuePostingSource" "', argument " "1"" of type '" "Xapian::ValuePostingSource *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *ValuePostingSource_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[61], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *ValuePostingSource_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_ValueWeightPostingSource(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::valueno arg1 ; + unsigned int val1 ; + int ecode1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::ValueWeightPostingSource *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_ValueWeightPostingSource" "', argument " "1"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::valueno >(val1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::ValueWeightPostingSource *)new Xapian::ValueWeightPostingSource(arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[64], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_ValueWeightPostingSource(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[64], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_ValueWeightPostingSource" "', argument " "1"" of type '" "Xapian::ValueWeightPostingSource *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueWeightPostingSource * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *ValueWeightPostingSource_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[64], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *ValueWeightPostingSource_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DecreasingValueWeightPostingSource__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::valueno arg1 ; + Xapian::docid arg2 ; + Xapian::docid arg3 ; + unsigned int val1 ; + int ecode1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + Xapian::DecreasingValueWeightPostingSource *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_DecreasingValueWeightPostingSource" "', argument " "1"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::valueno >(val1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_DecreasingValueWeightPostingSource" "', argument " "2"" of type '" "Xapian::docid""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::docid >(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_DecreasingValueWeightPostingSource" "', argument " "3"" of type '" "Xapian::docid""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::docid >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::DecreasingValueWeightPostingSource *)new Xapian::DecreasingValueWeightPostingSource(arg1,arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[13], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DecreasingValueWeightPostingSource__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::valueno arg1 ; + Xapian::docid arg2 ; + unsigned int val1 ; + int ecode1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + Xapian::DecreasingValueWeightPostingSource *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_DecreasingValueWeightPostingSource" "', argument " "1"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::valueno >(val1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_DecreasingValueWeightPostingSource" "', argument " "2"" of type '" "Xapian::docid""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::docid >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::DecreasingValueWeightPostingSource *)new Xapian::DecreasingValueWeightPostingSource(arg1,arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[13], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DecreasingValueWeightPostingSource__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::valueno arg1 ; + unsigned int val1 ; + int ecode1 = 0 ; + Xapian::DecreasingValueWeightPostingSource *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_DecreasingValueWeightPostingSource" "', argument " "1"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::valueno >(val1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::DecreasingValueWeightPostingSource *)new Xapian::DecreasingValueWeightPostingSource(arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[13], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DecreasingValueWeightPostingSource(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_DecreasingValueWeightPostingSource",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_new_DecreasingValueWeightPostingSource__SWIG_2(self, argc, argv); + } + if (argc == 2) { + return _wrap_new_DecreasingValueWeightPostingSource__SWIG_1(self, argc, argv); + } + if (argc == 3) { + return _wrap_new_DecreasingValueWeightPostingSource__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DecreasingValueWeightPostingSource'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::DecreasingValueWeightPostingSource(Xapian::valueno,Xapian::docid,Xapian::docid)\n" + " Xapian::DecreasingValueWeightPostingSource(Xapian::valueno,Xapian::docid)\n" + " Xapian::DecreasingValueWeightPostingSource(Xapian::valueno)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_DecreasingValueWeightPostingSource(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[13], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_DecreasingValueWeightPostingSource" "', argument " "1"" of type '" "Xapian::DecreasingValueWeightPostingSource *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *DecreasingValueWeightPostingSource_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[13], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *DecreasingValueWeightPostingSource_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_ValueMapPostingSource(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::valueno arg1 ; + unsigned int val1 ; + int ecode1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::ValueMapPostingSource *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_ValueMapPostingSource" "', argument " "1"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::valueno >(val1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::ValueMapPostingSource *)new Xapian::ValueMapPostingSource(arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[60], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ValueMapPostingSource_add_mapping(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ; + std::string *arg2 = 0 ; + double arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + double val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + if (!SWIG_Python_UnpackTuple(args,"ValueMapPostingSource_add_mapping",3,3,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[60], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ValueMapPostingSource_add_mapping" "', argument " "1"" of type '" "Xapian::ValueMapPostingSource *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "ValueMapPostingSource_add_mapping" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "ValueMapPostingSource_add_mapping" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "ValueMapPostingSource_add_mapping" "', argument " "3"" of type '" "double""'"); goto fail; } while(0); + } + arg3 = static_cast< double >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->add_mapping((std::string const &)*arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ValueMapPostingSource_clear_mappings(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[60], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ValueMapPostingSource_clear_mappings" "', argument " "1"" of type '" "Xapian::ValueMapPostingSource *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->clear_mappings(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ValueMapPostingSource_set_default_weight(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"ValueMapPostingSource_set_default_weight",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[60], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ValueMapPostingSource_set_default_weight" "', argument " "1"" of type '" "Xapian::ValueMapPostingSource *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "ValueMapPostingSource_set_default_weight" "', argument " "2"" of type '" "double""'"); goto fail; } while(0); + } + arg2 = static_cast< double >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_default_weight(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_ValueMapPostingSource(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[60], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_ValueMapPostingSource" "', argument " "1"" of type '" "Xapian::ValueMapPostingSource *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *ValueMapPostingSource_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[60], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *ValueMapPostingSource_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_FixedWeightPostingSource(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::weight arg1 ; + double val1 ; + int ecode1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::FixedWeightPostingSource *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_FixedWeightPostingSource" "', argument " "1"" of type '" "Xapian::weight""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::weight >(val1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::FixedWeightPostingSource *)new Xapian::FixedWeightPostingSource(arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[22], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_FixedWeightPostingSource(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[22], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_FixedWeightPostingSource" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *FixedWeightPostingSource_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[22], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *FixedWeightPostingSource_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_MSet__SWIG_0(PyObject *, int nobjs, PyObject **) { + PyObject *resultobj = 0; + Xapian::MSet *result = 0 ; + if ((nobjs < 0) || (nobjs > 0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::MSet *)new Xapian::MSet(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[28], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_MSet__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Xapian::MSet *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_MSet" "', argument " "1"" of type '" "Xapian::MSet const &""'"); goto fail; } while(0); + } + if (!argp1) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_MSet" "', argument " "1"" of type '" "Xapian::MSet const &""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::MSet *)new Xapian::MSet((Xapian::MSet const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[28], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_MSet(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_MSet",0,1,argv))) goto fail; + --argc; + if (argc == 0) { + return _wrap_new_MSet__SWIG_0(self, argc, argv); + } + if (argc == 1) { + return _wrap_new_MSet__SWIG_1(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_MSet'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::MSet()\n" + " Xapian::MSet(Xapian::MSet const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_MSet(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_MSet" "', argument " "1"" of type '" "Xapian::MSet *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_fetch__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + Xapian::MSetIterator *arg2 = 0 ; + Xapian::MSetIterator *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_fetch" "', argument " "1"" of type '" "Xapian::MSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[29], 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "MSet_fetch" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "MSet_fetch" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2); + res3 = SWIG_Python_ConvertPtrAndOwn(swig_obj[2], &argp3, swig_types[29], 0, 0); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "MSet_fetch" "', argument " "3"" of type '" "Xapian::MSetIterator &""'"); goto fail; } while(0); + } + if (!argp3) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "MSet_fetch" "', argument " "3"" of type '" "Xapian::MSetIterator &""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< Xapian::MSetIterator * >(argp3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + ((Xapian::MSet const *)arg1)->fetch(*arg2,*arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_fetch__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + Xapian::MSetIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_fetch" "', argument " "1"" of type '" "Xapian::MSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[29], 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "MSet_fetch" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "MSet_fetch" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + ((Xapian::MSet const *)arg1)->fetch(*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_fetch__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_fetch" "', argument " "1"" of type '" "Xapian::MSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + ((Xapian::MSet const *)arg1)->fetch(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_fetch(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"MSet_fetch",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_MSet_fetch__SWIG_2(self, argc, argv); + } + if (argc == 2) { + return _wrap_MSet_fetch__SWIG_1(self, argc, argv); + } + if (argc == 3) { + return _wrap_MSet_fetch__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'MSet_fetch'.\n" + " Possible C/C++ prototypes are:\n" + " fetch(Xapian::MSet const *,Xapian::MSetIterator &,Xapian::MSetIterator &)\n" + " fetch(Xapian::MSet const *,Xapian::MSetIterator &)\n" + " fetch(Xapian::MSet const *)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_convert_to_percent__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + Xapian::weight arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + Xapian::percent result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_convert_to_percent" "', argument " "1"" of type '" "Xapian::MSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "MSet_convert_to_percent" "', argument " "2"" of type '" "Xapian::weight""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::weight >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::percent)((Xapian::MSet const *)arg1)->convert_to_percent(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_convert_to_percent__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + Xapian::MSetIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + Xapian::percent result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_convert_to_percent" "', argument " "1"" of type '" "Xapian::MSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[29], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "MSet_convert_to_percent" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "MSet_convert_to_percent" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::percent)((Xapian::MSet const *)arg1)->convert_to_percent((Xapian::MSetIterator const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_convert_to_percent(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + if (!(argc = SWIG_Python_UnpackTuple(args,"MSet_convert_to_percent",0,2,argv))) goto fail; + --argc; + if (argc == 2) { + int _v = 0; + { + int res = SWIG_Python_ConvertPtrAndOwn(argv[1], 0, swig_types[29], 0, 0); + _v = ((res >= 0) ? 1 : 0); + } + if (!_v) goto check_1; + return _wrap_MSet_convert_to_percent__SWIG_1(self, argc, argv); + } +check_1: + if (argc == 2) { + return _wrap_MSet_convert_to_percent__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'MSet_convert_to_percent'.\n" + " Possible C/C++ prototypes are:\n" + " convert_to_percent(Xapian::MSet const *,Xapian::weight)\n" + " convert_to_percent(Xapian::MSet const *,Xapian::MSetIterator const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_get_termfreq(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + std::string arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[2] ; + Xapian::doccount result; + if (!SWIG_Python_UnpackTuple(args,"MSet_get_termfreq",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_get_termfreq" "', argument " "1"" of type '" "Xapian::MSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res >= 0) || !ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType((((ptr ? res : -5) != (-1)) ? (ptr ? res : -5) : -5)), "in method '" "MSet_get_termfreq" "', argument " "2"" of type '" "std::string""'"); goto fail; } while(0); + } + arg2 = *ptr; + if (((res >= 0) && (res & ((1 << 8) << 1)))) delete ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_termfreq(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_get_termweight(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + std::string arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[2] ; + Xapian::weight result; + if (!SWIG_Python_UnpackTuple(args,"MSet_get_termweight",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_get_termweight" "', argument " "1"" of type '" "Xapian::MSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res >= 0) || !ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType((((ptr ? res : -5) != (-1)) ? (ptr ? res : -5) : -5)), "in method '" "MSet_get_termweight" "', argument " "2"" of type '" "std::string""'"); goto fail; } while(0); + } + arg2 = *ptr; + if (((res >= 0) && (res & ((1 << 8) << 1)))) delete ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::weight)((Xapian::MSet const *)arg1)->get_termweight(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = PyFloat_FromDouble(static_cast< double >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_get_firstitem(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::doccount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_get_firstitem" "', argument " "1"" of type '" "Xapian::MSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_firstitem(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_get_matches_lower_bound(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::doccount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_get_matches_lower_bound" "', argument " "1"" of type '" "Xapian::MSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_matches_lower_bound(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_get_matches_estimated(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::doccount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_get_matches_estimated" "', argument " "1"" of type '" "Xapian::MSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_matches_estimated(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_get_matches_upper_bound(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::doccount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_get_matches_upper_bound" "', argument " "1"" of type '" "Xapian::MSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_matches_upper_bound(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_get_uncollapsed_matches_lower_bound(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::doccount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_get_uncollapsed_matches_lower_bound" "', argument " "1"" of type '" "Xapian::MSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_uncollapsed_matches_lower_bound(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_get_uncollapsed_matches_estimated(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::doccount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_get_uncollapsed_matches_estimated" "', argument " "1"" of type '" "Xapian::MSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_uncollapsed_matches_estimated(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_get_uncollapsed_matches_upper_bound(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::doccount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_get_uncollapsed_matches_upper_bound" "', argument " "1"" of type '" "Xapian::MSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_uncollapsed_matches_upper_bound(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_get_max_possible(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::weight result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_get_max_possible" "', argument " "1"" of type '" "Xapian::MSet *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::weight)(arg1)->get_max_possible(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = PyFloat_FromDouble(static_cast< double >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_get_max_attained(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::weight result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_get_max_attained" "', argument " "1"" of type '" "Xapian::MSet *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::weight)(arg1)->get_max_attained(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = PyFloat_FromDouble(static_cast< double >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_size(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::doccount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_size" "', argument " "1"" of type '" "Xapian::MSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::doccount)((Xapian::MSet const *)arg1)->size(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_empty(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_empty" "', argument " "1"" of type '" "Xapian::MSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (bool)((Xapian::MSet const *)arg1)->empty(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_begin(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::MSetIterator result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_begin" "', argument " "1"" of type '" "Xapian::MSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::MSet const *)arg1)->begin(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::MSetIterator(static_cast< const Xapian::MSetIterator& >(result))), swig_types[29], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_end(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::MSetIterator result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_end" "', argument " "1"" of type '" "Xapian::MSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::MSet const *)arg1)->end(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::MSetIterator(static_cast< const Xapian::MSetIterator& >(result))), swig_types[29], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_back(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::MSetIterator result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_back" "', argument " "1"" of type '" "Xapian::MSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::MSet const *)arg1)->back(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::MSetIterator(static_cast< const Xapian::MSetIterator& >(result))), swig_types[29], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet__get_hit_internal(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + Xapian::doccount arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + Xapian::MSetIterator result; + if (!SWIG_Python_UnpackTuple(args,"MSet__get_hit_internal",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet__get_hit_internal" "', argument " "1"" of type '" "Xapian::MSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "MSet__get_hit_internal" "', argument " "2"" of type '" "Xapian::doccount""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::doccount >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian_MSet_get_hit((Xapian::MSet const *)arg1,arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::MSetIterator(static_cast< const Xapian::MSetIterator& >(result))), swig_types[29], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_get_document_percentage(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + Xapian::doccount arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + int result; + if (!SWIG_Python_UnpackTuple(args,"MSet_get_document_percentage",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_get_document_percentage" "', argument " "1"" of type '" "Xapian::MSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "MSet_get_document_percentage" "', argument " "2"" of type '" "Xapian::doccount""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::doccount >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (int)Xapian_MSet_get_document_percentage((Xapian::MSet const *)arg1,arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_get_document(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + Xapian::doccount arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + Xapian::Document result; + if (!SWIG_Python_UnpackTuple(args,"MSet_get_document",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_get_document" "', argument " "1"" of type '" "Xapian::MSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "MSet_get_document" "', argument " "2"" of type '" "Xapian::doccount""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::doccount >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian_MSet_get_document((Xapian::MSet const *)arg1,arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::Document(static_cast< const Xapian::Document& >(result))), swig_types[15], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_get_docid(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + Xapian::doccount arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + Xapian::docid result; + if (!SWIG_Python_UnpackTuple(args,"MSet_get_docid",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_get_docid" "', argument " "1"" of type '" "Xapian::MSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "MSet_get_docid" "', argument " "2"" of type '" "Xapian::doccount""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::doccount >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::docid)Xapian_MSet_get_docid((Xapian::MSet const *)arg1,arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet___str__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet___str__" "', argument " "1"" of type '" "Xapian::MSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::MSet const *)arg1)->get_description(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet_items_get(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet_items_get" "', argument " "1"" of type '" "Xapian::MSet *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + result = (PyObject *)Xapian_MSet_items_get(arg1); + resultobj = result; + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSet___cmp__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSet *arg1 = (Xapian::MSet *) 0 ; + Xapian::MSet *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + int result; + if (!SWIG_Python_UnpackTuple(args,"MSet___cmp__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[28], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSet___cmp__" "', argument " "1"" of type '" "Xapian::MSet *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSet * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[28], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "MSet___cmp__" "', argument " "2"" of type '" "Xapian::MSet const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "MSet___cmp__" "', argument " "2"" of type '" "Xapian::MSet const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::MSet * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (int)Xapian_MSet___cmp__(arg1,(Xapian::MSet const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *MSet_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[28], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *MSet_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_MSetIterator__SWIG_0(PyObject *, int nobjs, PyObject **) { + PyObject *resultobj = 0; + Xapian::MSetIterator *result = 0 ; + if ((nobjs < 0) || (nobjs > 0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::MSetIterator *)new Xapian::MSetIterator(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[29], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_MSetIterator__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::MSetIterator *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Xapian::MSetIterator *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[29], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_MSetIterator" "', argument " "1"" of type '" "Xapian::MSetIterator const &""'"); goto fail; } while(0); + } + if (!argp1) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_MSetIterator" "', argument " "1"" of type '" "Xapian::MSetIterator const &""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::MSetIterator *)new Xapian::MSetIterator((Xapian::MSetIterator const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[29], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_MSetIterator(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_MSetIterator",0,1,argv))) goto fail; + --argc; + if (argc == 0) { + return _wrap_new_MSetIterator__SWIG_0(self, argc, argv); + } + if (argc == 1) { + return _wrap_new_MSetIterator__SWIG_1(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_MSetIterator'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::MSetIterator()\n" + " Xapian::MSetIterator(Xapian::MSetIterator const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_MSetIterator(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[29], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_MSetIterator" "', argument " "1"" of type '" "Xapian::MSetIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSetIterator_get_docid(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::docid result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[29], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSetIterator_get_docid" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::docid)Xapian_MSetIterator_get_docid((Xapian::MSetIterator const *)arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSetIterator_next(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[29], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSetIterator_next" "', argument " "1"" of type '" "Xapian::MSetIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + Xapian_MSetIterator_next(arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSetIterator_prev(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[29], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSetIterator_prev" "', argument " "1"" of type '" "Xapian::MSetIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + Xapian_MSetIterator_prev(arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSetIterator_equals(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ; + Xapian::MSetIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"MSetIterator_equals",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[29], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSetIterator_equals" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[29], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "MSetIterator_equals" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "MSetIterator_equals" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (bool)Xapian_MSetIterator_equals((Xapian::MSetIterator const *)arg1,(Xapian::MSetIterator const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSetIterator_get_document(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::Document result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[29], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSetIterator_get_document" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::MSetIterator const *)arg1)->get_document(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::Document(static_cast< const Xapian::Document& >(result))), swig_types[15], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSetIterator_get_rank(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::doccount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[29], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSetIterator_get_rank" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::doccount)((Xapian::MSetIterator const *)arg1)->get_rank(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSetIterator_get_weight(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::weight result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[29], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSetIterator_get_weight" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::weight)((Xapian::MSetIterator const *)arg1)->get_weight(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = PyFloat_FromDouble(static_cast< double >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSetIterator_get_collapse_key(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[29], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSetIterator_get_collapse_key" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::MSetIterator const *)arg1)->get_collapse_key(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSetIterator_get_collapse_count(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::doccount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[29], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSetIterator_get_collapse_count" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::doccount)((Xapian::MSetIterator const *)arg1)->get_collapse_count(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSetIterator_get_percent(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::percent result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[29], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSetIterator_get_percent" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::percent)((Xapian::MSetIterator const *)arg1)->get_percent(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSetIterator___str__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[29], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSetIterator___str__" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::MSetIterator const *)arg1)->get_description(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSetIterator___eq__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ; + Xapian::MSetIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"MSetIterator___eq__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[29], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSetIterator___eq__" "', argument " "1"" of type '" "Xapian::MSetIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[29], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "MSetIterator___eq__" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "MSetIterator___eq__" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (bool)Xapian_MSetIterator___eq__(arg1,(Xapian::MSetIterator const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MSetIterator___ne__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ; + Xapian::MSetIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"MSetIterator___ne__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[29], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MSetIterator___ne__" "', argument " "1"" of type '" "Xapian::MSetIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[29], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "MSetIterator___ne__" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "MSetIterator___ne__" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (bool)Xapian_MSetIterator___ne__(arg1,(Xapian::MSetIterator const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *MSetIterator_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[29], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *MSetIterator_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_ESet__SWIG_0(PyObject *, int nobjs, PyObject **) { + PyObject *resultobj = 0; + Xapian::ESet *result = 0 ; + if ((nobjs < 0) || (nobjs > 0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::ESet *)new Xapian::ESet(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[16], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_ESet__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::ESet *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Xapian::ESet *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[16], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_ESet" "', argument " "1"" of type '" "Xapian::ESet const &""'"); goto fail; } while(0); + } + if (!argp1) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_ESet" "', argument " "1"" of type '" "Xapian::ESet const &""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ESet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::ESet *)new Xapian::ESet((Xapian::ESet const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[16], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_ESet(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_ESet",0,1,argv))) goto fail; + --argc; + if (argc == 0) { + return _wrap_new_ESet__SWIG_0(self, argc, argv); + } + if (argc == 1) { + return _wrap_new_ESet__SWIG_1(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ESet'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::ESet()\n" + " Xapian::ESet(Xapian::ESet const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_ESet(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ESet *arg1 = (Xapian::ESet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[16], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_ESet" "', argument " "1"" of type '" "Xapian::ESet *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ESet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ESet_get_ebound(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ESet *arg1 = (Xapian::ESet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::termcount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[16], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ESet_get_ebound" "', argument " "1"" of type '" "Xapian::ESet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ESet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::termcount)((Xapian::ESet const *)arg1)->get_ebound(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ESet_size(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ESet *arg1 = (Xapian::ESet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::termcount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[16], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ESet_size" "', argument " "1"" of type '" "Xapian::ESet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ESet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::termcount)((Xapian::ESet const *)arg1)->size(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ESet_empty(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ESet *arg1 = (Xapian::ESet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[16], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ESet_empty" "', argument " "1"" of type '" "Xapian::ESet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ESet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (bool)((Xapian::ESet const *)arg1)->empty(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ESet_begin(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ESet *arg1 = (Xapian::ESet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::ESetIterator result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[16], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ESet_begin" "', argument " "1"" of type '" "Xapian::ESet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ESet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::ESet const *)arg1)->begin(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::ESetIterator(static_cast< const Xapian::ESetIterator& >(result))), swig_types[17], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ESet_end(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ESet *arg1 = (Xapian::ESet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::ESetIterator result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[16], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ESet_end" "', argument " "1"" of type '" "Xapian::ESet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ESet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::ESet const *)arg1)->end(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::ESetIterator(static_cast< const Xapian::ESetIterator& >(result))), swig_types[17], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ESet_back(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ESet *arg1 = (Xapian::ESet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::ESetIterator result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[16], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ESet_back" "', argument " "1"" of type '" "Xapian::ESet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ESet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::ESet const *)arg1)->back(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::ESetIterator(static_cast< const Xapian::ESetIterator& >(result))), swig_types[17], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ESet___str__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ESet *arg1 = (Xapian::ESet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[16], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ESet___str__" "', argument " "1"" of type '" "Xapian::ESet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ESet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::ESet const *)arg1)->get_description(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ESet_items_get(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ESet *arg1 = (Xapian::ESet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + PyObject *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[16], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ESet_items_get" "', argument " "1"" of type '" "Xapian::ESet *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ESet * >(argp1); + result = (PyObject *)Xapian_ESet_items_get(arg1); + resultobj = result; + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *ESet_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[16], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *ESet_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_ESetIterator__SWIG_0(PyObject *, int nobjs, PyObject **) { + PyObject *resultobj = 0; + Xapian::ESetIterator *result = 0 ; + if ((nobjs < 0) || (nobjs > 0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::ESetIterator *)new Xapian::ESetIterator(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[17], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_ESetIterator__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::ESetIterator *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Xapian::ESetIterator *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[17], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_ESetIterator" "', argument " "1"" of type '" "Xapian::ESetIterator const &""'"); goto fail; } while(0); + } + if (!argp1) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_ESetIterator" "', argument " "1"" of type '" "Xapian::ESetIterator const &""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::ESetIterator *)new Xapian::ESetIterator((Xapian::ESetIterator const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[17], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_ESetIterator(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_ESetIterator",0,1,argv))) goto fail; + --argc; + if (argc == 0) { + return _wrap_new_ESetIterator__SWIG_0(self, argc, argv); + } + if (argc == 1) { + return _wrap_new_ESetIterator__SWIG_1(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ESetIterator'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::ESetIterator()\n" + " Xapian::ESetIterator(Xapian::ESetIterator const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_ESetIterator(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[17], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_ESetIterator" "', argument " "1"" of type '" "Xapian::ESetIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ESetIterator_get_term(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[17], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ESetIterator_get_term" "', argument " "1"" of type '" "Xapian::ESetIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian_ESetIterator_get_term((Xapian::ESetIterator const *)arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ESetIterator_next(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[17], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ESetIterator_next" "', argument " "1"" of type '" "Xapian::ESetIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + Xapian_ESetIterator_next(arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ESetIterator_prev(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[17], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ESetIterator_prev" "', argument " "1"" of type '" "Xapian::ESetIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + Xapian_ESetIterator_prev(arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ESetIterator_equals(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ; + Xapian::ESetIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"ESetIterator_equals",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[17], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ESetIterator_equals" "', argument " "1"" of type '" "Xapian::ESetIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[17], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "ESetIterator_equals" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "ESetIterator_equals" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (bool)Xapian_ESetIterator_equals((Xapian::ESetIterator const *)arg1,(Xapian::ESetIterator const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ESetIterator_get_weight(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::weight result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[17], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ESetIterator_get_weight" "', argument " "1"" of type '" "Xapian::ESetIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::weight)((Xapian::ESetIterator const *)arg1)->get_weight(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = PyFloat_FromDouble(static_cast< double >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ESetIterator___str__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[17], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ESetIterator___str__" "', argument " "1"" of type '" "Xapian::ESetIterator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::ESetIterator const *)arg1)->get_description(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ESetIterator___eq__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ; + Xapian::ESetIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"ESetIterator___eq__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[17], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ESetIterator___eq__" "', argument " "1"" of type '" "Xapian::ESetIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[17], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "ESetIterator___eq__" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "ESetIterator___eq__" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (bool)Xapian_ESetIterator___eq__(arg1,(Xapian::ESetIterator const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ESetIterator___ne__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ; + Xapian::ESetIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"ESetIterator___ne__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[17], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ESetIterator___ne__" "', argument " "1"" of type '" "Xapian::ESetIterator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[17], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "ESetIterator___ne__" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "ESetIterator___ne__" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + result = (bool)Xapian_ESetIterator___ne__(arg1,(Xapian::ESetIterator const &)*arg2); + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *ESetIterator_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[17], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *ESetIterator_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_RSet__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::RSet *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Xapian::RSet *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[43], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_RSet" "', argument " "1"" of type '" "Xapian::RSet const &""'"); goto fail; } while(0); + } + if (!argp1) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_RSet" "', argument " "1"" of type '" "Xapian::RSet const &""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::RSet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::RSet *)new Xapian::RSet((Xapian::RSet const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[43], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_RSet__SWIG_1(PyObject *, int nobjs, PyObject **) { + PyObject *resultobj = 0; + Xapian::RSet *result = 0 ; + if ((nobjs < 0) || (nobjs > 0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::RSet *)new Xapian::RSet(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[43], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_RSet(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_RSet",0,1,argv))) goto fail; + --argc; + if (argc == 0) { + return _wrap_new_RSet__SWIG_1(self, argc, argv); + } + if (argc == 1) { + return _wrap_new_RSet__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_RSet'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::RSet(Xapian::RSet const &)\n" + " Xapian::RSet()\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_RSet(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::RSet *arg1 = (Xapian::RSet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[43], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_RSet" "', argument " "1"" of type '" "Xapian::RSet *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::RSet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_RSet_size(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::RSet *arg1 = (Xapian::RSet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::doccount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[43], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "RSet_size" "', argument " "1"" of type '" "Xapian::RSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::RSet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::doccount)((Xapian::RSet const *)arg1)->size(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_RSet_empty(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::RSet *arg1 = (Xapian::RSet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[43], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "RSet_empty" "', argument " "1"" of type '" "Xapian::RSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::RSet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (bool)((Xapian::RSet const *)arg1)->empty(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_RSet_add_document__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::RSet *arg1 = (Xapian::RSet *) 0 ; + Xapian::docid arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[43], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "RSet_add_document" "', argument " "1"" of type '" "Xapian::RSet *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::RSet * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "RSet_add_document" "', argument " "2"" of type '" "Xapian::docid""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::docid >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->add_document(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_RSet_add_document__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::RSet *arg1 = (Xapian::RSet *) 0 ; + Xapian::MSetIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[43], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "RSet_add_document" "', argument " "1"" of type '" "Xapian::RSet *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::RSet * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[29], 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "RSet_add_document" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "RSet_add_document" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->add_document(*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_RSet_add_document(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + if (!(argc = SWIG_Python_UnpackTuple(args,"RSet_add_document",0,2,argv))) goto fail; + --argc; + if (argc == 2) { + int _v = 0; + { + void *vptr = 0; + int res = SWIG_Python_ConvertPtrAndOwn(argv[1], &vptr, swig_types[29], 0, 0); + _v = ((res >= 0) ? 1 : 0); + } + if (!_v) goto check_1; + return _wrap_RSet_add_document__SWIG_1(self, argc, argv); + } +check_1: + if (argc == 2) { + return _wrap_RSet_add_document__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'RSet_add_document'.\n" + " Possible C/C++ prototypes are:\n" + " add_document(Xapian::RSet *,Xapian::docid)\n" + " add_document(Xapian::RSet *,Xapian::MSetIterator &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_RSet_remove_document__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::RSet *arg1 = (Xapian::RSet *) 0 ; + Xapian::docid arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[43], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "RSet_remove_document" "', argument " "1"" of type '" "Xapian::RSet *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::RSet * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "RSet_remove_document" "', argument " "2"" of type '" "Xapian::docid""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::docid >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->remove_document(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_RSet_remove_document__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::RSet *arg1 = (Xapian::RSet *) 0 ; + Xapian::MSetIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[43], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "RSet_remove_document" "', argument " "1"" of type '" "Xapian::RSet *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::RSet * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[29], 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "RSet_remove_document" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "RSet_remove_document" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->remove_document(*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_RSet_remove_document(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + if (!(argc = SWIG_Python_UnpackTuple(args,"RSet_remove_document",0,2,argv))) goto fail; + --argc; + if (argc == 2) { + int _v = 0; + { + void *vptr = 0; + int res = SWIG_Python_ConvertPtrAndOwn(argv[1], &vptr, swig_types[29], 0, 0); + _v = ((res >= 0) ? 1 : 0); + } + if (!_v) goto check_1; + return _wrap_RSet_remove_document__SWIG_1(self, argc, argv); + } +check_1: + if (argc == 2) { + return _wrap_RSet_remove_document__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'RSet_remove_document'.\n" + " Possible C/C++ prototypes are:\n" + " remove_document(Xapian::RSet *,Xapian::docid)\n" + " remove_document(Xapian::RSet *,Xapian::MSetIterator &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_RSet_contains__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::RSet *arg1 = (Xapian::RSet *) 0 ; + Xapian::docid arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + bool result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[43], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "RSet_contains" "', argument " "1"" of type '" "Xapian::RSet *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::RSet * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "RSet_contains" "', argument " "2"" of type '" "Xapian::docid""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::docid >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (bool)(arg1)->contains(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_RSet_contains__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::RSet *arg1 = (Xapian::RSet *) 0 ; + Xapian::MSetIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[43], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "RSet_contains" "', argument " "1"" of type '" "Xapian::RSet *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::RSet * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[29], 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "RSet_contains" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "RSet_contains" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (bool)(arg1)->contains(*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_RSet_contains(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + if (!(argc = SWIG_Python_UnpackTuple(args,"RSet_contains",0,2,argv))) goto fail; + --argc; + if (argc == 2) { + int _v = 0; + { + void *vptr = 0; + int res = SWIG_Python_ConvertPtrAndOwn(argv[1], &vptr, swig_types[29], 0, 0); + _v = ((res >= 0) ? 1 : 0); + } + if (!_v) goto check_1; + return _wrap_RSet_contains__SWIG_1(self, argc, argv); + } +check_1: + if (argc == 2) { + return _wrap_RSet_contains__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'RSet_contains'.\n" + " Possible C/C++ prototypes are:\n" + " contains(Xapian::RSet *,Xapian::docid)\n" + " contains(Xapian::RSet *,Xapian::MSetIterator &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_RSet___str__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::RSet *arg1 = (Xapian::RSet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[43], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "RSet___str__" "', argument " "1"" of type '" "Xapian::RSet const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::RSet * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::RSet const *)arg1)->get_description(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *RSet_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[43], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *RSet_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_MatchDecider___call__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MatchDecider *arg1 = (Xapian::MatchDecider *) 0 ; + Xapian::Document *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + Swig::Director *director = 0; + bool upcall = false; + bool result; + if (!SWIG_Python_UnpackTuple(args,"MatchDecider___call__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[30], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MatchDecider___call__" "', argument " "1"" of type '" "Xapian::MatchDecider const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MatchDecider * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[15], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "MatchDecider___call__" "', argument " "2"" of type '" "Xapian::Document const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "MatchDecider___call__" "', argument " "2"" of type '" "Xapian::Document const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::Document * >(argp2); + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + Swig::DirectorPureVirtualException::raise("Xapian::MatchDecider::operator ()"); + } else { + result = (bool)((Xapian::MatchDecider const *)arg1)->operator ()((Xapian::Document const &)*arg2); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_MatchDecider(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MatchDecider *arg1 = (Xapian::MatchDecider *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[30], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_MatchDecider" "', argument " "1"" of type '" "Xapian::MatchDecider *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MatchDecider * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_MatchDecider(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + PyObject *swig_obj[1] ; + Xapian::MatchDecider *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + arg1 = swig_obj[0]; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + if ( arg1 != (&_Py_NoneStruct) ) { + result = (Xapian::MatchDecider *)new SwigDirector_MatchDecider(arg1); + } else { + SWIG_Python_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); + goto fail; + } + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[30], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_disown_MatchDecider(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MatchDecider *arg1 = (Xapian::MatchDecider *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[30], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "disown_MatchDecider" "', argument " "1"" of type '" "Xapian::MatchDecider *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MatchDecider * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *MatchDecider_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[30], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *MatchDecider_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_ExpandDecider___call__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ExpandDecider *arg1 = (Xapian::ExpandDecider *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + Swig::Director *director = 0; + bool upcall = false; + bool result; + if (!SWIG_Python_UnpackTuple(args,"ExpandDecider___call__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[20], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ExpandDecider___call__" "', argument " "1"" of type '" "Xapian::ExpandDecider const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ExpandDecider * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "ExpandDecider___call__" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "ExpandDecider___call__" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + Swig::DirectorPureVirtualException::raise("Xapian::ExpandDecider::operator ()"); + } else { + result = (bool)((Xapian::ExpandDecider const *)arg1)->operator ()((std::string const &)*arg2); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_ExpandDecider(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ExpandDecider *arg1 = (Xapian::ExpandDecider *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[20], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_ExpandDecider" "', argument " "1"" of type '" "Xapian::ExpandDecider *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ExpandDecider * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_ExpandDecider(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + PyObject *swig_obj[1] ; + Xapian::ExpandDecider *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + arg1 = swig_obj[0]; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + if ( arg1 != (&_Py_NoneStruct) ) { + result = (Xapian::ExpandDecider *)new SwigDirector_ExpandDecider(arg1); + } else { + SWIG_Python_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); + goto fail; + } + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[20], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_disown_ExpandDecider(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ExpandDecider *arg1 = (Xapian::ExpandDecider *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[20], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "disown_ExpandDecider" "', argument " "1"" of type '" "Xapian::ExpandDecider *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ExpandDecider * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *ExpandDecider_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[20], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *ExpandDecider_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Enquire(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::Enquire *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_Enquire" "', argument " "1"" of type '" "Xapian::Database const &""'"); goto fail; } while(0); + } + if (!argp1) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_Enquire" "', argument " "1"" of type '" "Xapian::Database const &""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Enquire *)new Xapian::Enquire((Xapian::Database const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[18], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_Enquire(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_Enquire" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_query__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::Query *arg2 = 0 ; + Xapian::termcount arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_set_query" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[40], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Enquire_set_query" "', argument " "2"" of type '" "Xapian::Query const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Enquire_set_query" "', argument " "2"" of type '" "Xapian::Query const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::Query * >(argp2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "Enquire_set_query" "', argument " "3"" of type '" "Xapian::termcount""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::termcount >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_query((Xapian::Query const &)*arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_query__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::Query *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_set_query" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[40], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Enquire_set_query" "', argument " "2"" of type '" "Xapian::Query const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Enquire_set_query" "', argument " "2"" of type '" "Xapian::Query const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::Query * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_query((Xapian::Query const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_query(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_set_query",0,3,argv))) goto fail; + --argc; + if (argc == 2) { + return _wrap_Enquire_set_query__SWIG_1(self, argc, argv); + } + if (argc == 3) { + return _wrap_Enquire_set_query__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Enquire_set_query'.\n" + " Possible C/C++ prototypes are:\n" + " set_query(Xapian::Enquire *,Xapian::Query const &,Xapian::termcount)\n" + " set_query(Xapian::Enquire *,Xapian::Query const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_get_query(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::Query *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_get_query" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Query *) &(arg1)->get_query(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[40], 0 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_add_matchspy(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::MatchSpy *arg2 = (Xapian::MatchSpy *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"Enquire_add_matchspy",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_add_matchspy" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[31], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Enquire_add_matchspy" "', argument " "2"" of type '" "Xapian::MatchSpy *""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::MatchSpy * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->add_matchspy(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_clear_matchspies(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_clear_matchspies" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->clear_matchspies(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_weighting_scheme(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::Weight *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"Enquire_set_weighting_scheme",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_set_weighting_scheme" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[65], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Enquire_set_weighting_scheme" "', argument " "2"" of type '" "Xapian::Weight const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Enquire_set_weighting_scheme" "', argument " "2"" of type '" "Xapian::Weight const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::Weight * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_weighting_scheme((Xapian::Weight const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_collapse_key__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::valueno arg2 ; + Xapian::doccount arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_set_collapse_key" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_set_collapse_key" "', argument " "2"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::valueno >(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "Enquire_set_collapse_key" "', argument " "3"" of type '" "Xapian::doccount""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::doccount >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_collapse_key(arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_collapse_key__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::valueno arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_set_collapse_key" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_set_collapse_key" "', argument " "2"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::valueno >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_collapse_key(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_collapse_key(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_set_collapse_key",0,3,argv))) goto fail; + --argc; + if (argc == 2) { + return _wrap_Enquire_set_collapse_key__SWIG_1(self, argc, argv); + } + if (argc == 3) { + return _wrap_Enquire_set_collapse_key__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Enquire_set_collapse_key'.\n" + " Possible C/C++ prototypes are:\n" + " set_collapse_key(Xapian::Enquire *,Xapian::valueno,Xapian::doccount)\n" + " set_collapse_key(Xapian::Enquire *,Xapian::valueno)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_docid_order(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::Enquire::docid_order arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"Enquire_set_docid_order",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_set_docid_order" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_set_docid_order" "', argument " "2"" of type '" "Xapian::Enquire::docid_order""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::Enquire::docid_order >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_docid_order(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_cutoff__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + int arg2 ; + Xapian::weight arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_set_cutoff" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_set_cutoff" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "Enquire_set_cutoff" "', argument " "3"" of type '" "Xapian::weight""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::weight >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_cutoff(arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_cutoff__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_set_cutoff" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_set_cutoff" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_cutoff(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_cutoff(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_set_cutoff",0,3,argv))) goto fail; + --argc; + if (argc == 2) { + return _wrap_Enquire_set_cutoff__SWIG_1(self, argc, argv); + } + if (argc == 3) { + return _wrap_Enquire_set_cutoff__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Enquire_set_cutoff'.\n" + " Possible C/C++ prototypes are:\n" + " set_cutoff(Xapian::Enquire *,int,Xapian::weight)\n" + " set_cutoff(Xapian::Enquire *,int)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_sort_by_relevance(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_set_sort_by_relevance" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_sort_by_relevance(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_sort_by_value__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::valueno arg2 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_set_sort_by_value" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_set_sort_by_value" "', argument " "2"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::valueno >(val2); + ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "Enquire_set_sort_by_value" "', argument " "3"" of type '" "bool""'"); goto fail; } while(0); + } + arg3 = static_cast< bool >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_sort_by_value(arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_sort_by_value__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::valueno arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_set_sort_by_value" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_set_sort_by_value" "', argument " "2"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::valueno >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_sort_by_value(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_sort_by_value(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_set_sort_by_value",0,3,argv))) goto fail; + --argc; + if (argc == 2) { + return _wrap_Enquire_set_sort_by_value__SWIG_1(self, argc, argv); + } + if (argc == 3) { + return _wrap_Enquire_set_sort_by_value__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Enquire_set_sort_by_value'.\n" + " Possible C/C++ prototypes are:\n" + " set_sort_by_value(Xapian::Enquire *,Xapian::valueno,bool)\n" + " set_sort_by_value(Xapian::Enquire *,Xapian::valueno)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_sort_by_value_then_relevance__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::valueno arg2 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_set_sort_by_value_then_relevance" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_set_sort_by_value_then_relevance" "', argument " "2"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::valueno >(val2); + ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "Enquire_set_sort_by_value_then_relevance" "', argument " "3"" of type '" "bool""'"); goto fail; } while(0); + } + arg3 = static_cast< bool >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_sort_by_value_then_relevance(arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_sort_by_value_then_relevance__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::valueno arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_set_sort_by_value_then_relevance" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_set_sort_by_value_then_relevance" "', argument " "2"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::valueno >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_sort_by_value_then_relevance(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_sort_by_value_then_relevance(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_set_sort_by_value_then_relevance",0,3,argv))) goto fail; + --argc; + if (argc == 2) { + return _wrap_Enquire_set_sort_by_value_then_relevance__SWIG_1(self, argc, argv); + } + if (argc == 3) { + return _wrap_Enquire_set_sort_by_value_then_relevance__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Enquire_set_sort_by_value_then_relevance'.\n" + " Possible C/C++ prototypes are:\n" + " set_sort_by_value_then_relevance(Xapian::Enquire *,Xapian::valueno,bool)\n" + " set_sort_by_value_then_relevance(Xapian::Enquire *,Xapian::valueno)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_sort_by_relevance_then_value__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::valueno arg2 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_set_sort_by_relevance_then_value" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_set_sort_by_relevance_then_value" "', argument " "2"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::valueno >(val2); + ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "Enquire_set_sort_by_relevance_then_value" "', argument " "3"" of type '" "bool""'"); goto fail; } while(0); + } + arg3 = static_cast< bool >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_sort_by_relevance_then_value(arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_sort_by_relevance_then_value__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::valueno arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_set_sort_by_relevance_then_value" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_set_sort_by_relevance_then_value" "', argument " "2"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::valueno >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_sort_by_relevance_then_value(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_sort_by_relevance_then_value(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_set_sort_by_relevance_then_value",0,3,argv))) goto fail; + --argc; + if (argc == 2) { + return _wrap_Enquire_set_sort_by_relevance_then_value__SWIG_1(self, argc, argv); + } + if (argc == 3) { + return _wrap_Enquire_set_sort_by_relevance_then_value__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Enquire_set_sort_by_relevance_then_value'.\n" + " Possible C/C++ prototypes are:\n" + " set_sort_by_relevance_then_value(Xapian::Enquire *,Xapian::valueno,bool)\n" + " set_sort_by_relevance_then_value(Xapian::Enquire *,Xapian::valueno)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_sort_by_key__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::KeyMaker *arg2 = (Xapian::KeyMaker *) 0 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_set_sort_by_key" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[26], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Enquire_set_sort_by_key" "', argument " "2"" of type '" "Xapian::KeyMaker *""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::KeyMaker * >(argp2); + ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "Enquire_set_sort_by_key" "', argument " "3"" of type '" "bool""'"); goto fail; } while(0); + } + arg3 = static_cast< bool >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_sort_by_key(arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_sort_by_key__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::Sorter *arg2 = (Xapian::Sorter *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_set_sort_by_key" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[49], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Enquire_set_sort_by_key" "', argument " "2"" of type '" "Xapian::Sorter *""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::Sorter * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_sort_by_key(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_sort_by_key(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_set_sort_by_key",0,3,argv))) goto fail; + --argc; + if (argc == 2) { + return _wrap_Enquire_set_sort_by_key__SWIG_1(self, argc, argv); + } + if (argc == 3) { + return _wrap_Enquire_set_sort_by_key__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Enquire_set_sort_by_key'.\n" + " Possible C/C++ prototypes are:\n" + " set_sort_by_key(Xapian::Enquire *,Xapian::KeyMaker *,bool)\n" + " set_sort_by_key(Xapian::Enquire *,Xapian::Sorter *)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_sort_by_key_then_relevance__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::KeyMaker *arg2 = (Xapian::KeyMaker *) 0 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_set_sort_by_key_then_relevance" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[26], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Enquire_set_sort_by_key_then_relevance" "', argument " "2"" of type '" "Xapian::KeyMaker *""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::KeyMaker * >(argp2); + ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "Enquire_set_sort_by_key_then_relevance" "', argument " "3"" of type '" "bool""'"); goto fail; } while(0); + } + arg3 = static_cast< bool >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_sort_by_key_then_relevance(arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_sort_by_key_then_relevance__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::Sorter *arg2 = (Xapian::Sorter *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_set_sort_by_key_then_relevance" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[49], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Enquire_set_sort_by_key_then_relevance" "', argument " "2"" of type '" "Xapian::Sorter *""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::Sorter * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_sort_by_key_then_relevance(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_sort_by_key_then_relevance(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_set_sort_by_key_then_relevance",0,3,argv))) goto fail; + --argc; + if (argc == 2) { + return _wrap_Enquire_set_sort_by_key_then_relevance__SWIG_1(self, argc, argv); + } + if (argc == 3) { + return _wrap_Enquire_set_sort_by_key_then_relevance__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Enquire_set_sort_by_key_then_relevance'.\n" + " Possible C/C++ prototypes are:\n" + " set_sort_by_key_then_relevance(Xapian::Enquire *,Xapian::KeyMaker *,bool)\n" + " set_sort_by_key_then_relevance(Xapian::Enquire *,Xapian::Sorter *)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_sort_by_relevance_then_key__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::KeyMaker *arg2 = (Xapian::KeyMaker *) 0 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_set_sort_by_relevance_then_key" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[26], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Enquire_set_sort_by_relevance_then_key" "', argument " "2"" of type '" "Xapian::KeyMaker *""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::KeyMaker * >(argp2); + ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "Enquire_set_sort_by_relevance_then_key" "', argument " "3"" of type '" "bool""'"); goto fail; } while(0); + } + arg3 = static_cast< bool >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_sort_by_relevance_then_key(arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_sort_by_relevance_then_key__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::Sorter *arg2 = (Xapian::Sorter *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_set_sort_by_relevance_then_key" "', argument " "1"" of type '" "Xapian::Enquire *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[49], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Enquire_set_sort_by_relevance_then_key" "', argument " "2"" of type '" "Xapian::Sorter *""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::Sorter * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_sort_by_relevance_then_key(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_set_sort_by_relevance_then_key(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_set_sort_by_relevance_then_key",0,3,argv))) goto fail; + --argc; + if (argc == 2) { + return _wrap_Enquire_set_sort_by_relevance_then_key__SWIG_1(self, argc, argv); + } + if (argc == 3) { + return _wrap_Enquire_set_sort_by_relevance_then_key__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Enquire_set_sort_by_relevance_then_key'.\n" + " Possible C/C++ prototypes are:\n" + " set_sort_by_relevance_then_key(Xapian::Enquire *,Xapian::KeyMaker *,bool)\n" + " set_sort_by_relevance_then_key(Xapian::Enquire *,Xapian::Sorter *)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_get_mset__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::doccount arg2 ; + Xapian::doccount arg3 ; + Xapian::doccount arg4 ; + Xapian::RSet *arg5 = (Xapian::RSet *) 0 ; + Xapian::MatchDecider *arg6 = (Xapian::MatchDecider *) 0 ; + Xapian::MatchDecider *arg7 = (Xapian::MatchDecider *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + unsigned int val4 ; + int ecode4 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + void *argp6 = 0 ; + int res6 = 0 ; + void *argp7 = 0 ; + int res7 = 0 ; + Xapian::MSet result; + if ((nobjs < 7) || (nobjs > 7)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_get_mset" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_get_mset" "', argument " "2"" of type '" "Xapian::doccount""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::doccount >(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "Enquire_get_mset" "', argument " "3"" of type '" "Xapian::doccount""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::doccount >(val3); + ecode4 = SWIG_AsVal_unsigned_SS_int(swig_obj[3], &val4); + if (!(ecode4 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode4 != (-1)) ? ecode4 : -5)), "in method '" "Enquire_get_mset" "', argument " "4"" of type '" "Xapian::doccount""'"); goto fail; } while(0); + } + arg4 = static_cast< Xapian::doccount >(val4); + res5 = SWIG_Python_ConvertPtrAndOwn(swig_obj[4], &argp5, swig_types[43], 0 | 0, 0); + if (!(res5 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res5 != (-1)) ? res5 : -5)), "in method '" "Enquire_get_mset" "', argument " "5"" of type '" "Xapian::RSet const *""'"); goto fail; } while(0); + } + arg5 = reinterpret_cast< Xapian::RSet * >(argp5); + res6 = SWIG_Python_ConvertPtrAndOwn(swig_obj[5], &argp6, swig_types[30], 0 | 0, 0); + if (!(res6 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res6 != (-1)) ? res6 : -5)), "in method '" "Enquire_get_mset" "', argument " "6"" of type '" "Xapian::MatchDecider const *""'"); goto fail; } while(0); + } + arg6 = reinterpret_cast< Xapian::MatchDecider * >(argp6); + res7 = SWIG_Python_ConvertPtrAndOwn(swig_obj[6], &argp7, swig_types[30], 0 | 0, 0); + if (!(res7 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res7 != (-1)) ? res7 : -5)), "in method '" "Enquire_get_mset" "', argument " "7"" of type '" "Xapian::MatchDecider const *""'"); goto fail; } while(0); + } + arg7 = reinterpret_cast< Xapian::MatchDecider * >(argp7); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4,(Xapian::RSet const *)arg5,(Xapian::MatchDecider const *)arg6,(Xapian::MatchDecider const *)arg7); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), swig_types[28], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_get_mset__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::doccount arg2 ; + Xapian::doccount arg3 ; + Xapian::doccount arg4 ; + Xapian::RSet *arg5 = (Xapian::RSet *) 0 ; + Xapian::MatchDecider *arg6 = (Xapian::MatchDecider *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + unsigned int val4 ; + int ecode4 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + void *argp6 = 0 ; + int res6 = 0 ; + Xapian::MSet result; + if ((nobjs < 6) || (nobjs > 6)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_get_mset" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_get_mset" "', argument " "2"" of type '" "Xapian::doccount""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::doccount >(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "Enquire_get_mset" "', argument " "3"" of type '" "Xapian::doccount""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::doccount >(val3); + ecode4 = SWIG_AsVal_unsigned_SS_int(swig_obj[3], &val4); + if (!(ecode4 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode4 != (-1)) ? ecode4 : -5)), "in method '" "Enquire_get_mset" "', argument " "4"" of type '" "Xapian::doccount""'"); goto fail; } while(0); + } + arg4 = static_cast< Xapian::doccount >(val4); + res5 = SWIG_Python_ConvertPtrAndOwn(swig_obj[4], &argp5, swig_types[43], 0 | 0, 0); + if (!(res5 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res5 != (-1)) ? res5 : -5)), "in method '" "Enquire_get_mset" "', argument " "5"" of type '" "Xapian::RSet const *""'"); goto fail; } while(0); + } + arg5 = reinterpret_cast< Xapian::RSet * >(argp5); + res6 = SWIG_Python_ConvertPtrAndOwn(swig_obj[5], &argp6, swig_types[30], 0 | 0, 0); + if (!(res6 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res6 != (-1)) ? res6 : -5)), "in method '" "Enquire_get_mset" "', argument " "6"" of type '" "Xapian::MatchDecider const *""'"); goto fail; } while(0); + } + arg6 = reinterpret_cast< Xapian::MatchDecider * >(argp6); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4,(Xapian::RSet const *)arg5,(Xapian::MatchDecider const *)arg6); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), swig_types[28], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_get_mset__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::doccount arg2 ; + Xapian::doccount arg3 ; + Xapian::doccount arg4 ; + Xapian::RSet *arg5 = (Xapian::RSet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + unsigned int val4 ; + int ecode4 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + Xapian::MSet result; + if ((nobjs < 5) || (nobjs > 5)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_get_mset" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_get_mset" "', argument " "2"" of type '" "Xapian::doccount""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::doccount >(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "Enquire_get_mset" "', argument " "3"" of type '" "Xapian::doccount""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::doccount >(val3); + ecode4 = SWIG_AsVal_unsigned_SS_int(swig_obj[3], &val4); + if (!(ecode4 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode4 != (-1)) ? ecode4 : -5)), "in method '" "Enquire_get_mset" "', argument " "4"" of type '" "Xapian::doccount""'"); goto fail; } while(0); + } + arg4 = static_cast< Xapian::doccount >(val4); + res5 = SWIG_Python_ConvertPtrAndOwn(swig_obj[4], &argp5, swig_types[43], 0 | 0, 0); + if (!(res5 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res5 != (-1)) ? res5 : -5)), "in method '" "Enquire_get_mset" "', argument " "5"" of type '" "Xapian::RSet const *""'"); goto fail; } while(0); + } + arg5 = reinterpret_cast< Xapian::RSet * >(argp5); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4,(Xapian::RSet const *)arg5); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), swig_types[28], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_get_mset__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::doccount arg2 ; + Xapian::doccount arg3 ; + Xapian::doccount arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + unsigned int val4 ; + int ecode4 = 0 ; + Xapian::MSet result; + if ((nobjs < 4) || (nobjs > 4)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_get_mset" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_get_mset" "', argument " "2"" of type '" "Xapian::doccount""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::doccount >(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "Enquire_get_mset" "', argument " "3"" of type '" "Xapian::doccount""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::doccount >(val3); + ecode4 = SWIG_AsVal_unsigned_SS_int(swig_obj[3], &val4); + if (!(ecode4 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode4 != (-1)) ? ecode4 : -5)), "in method '" "Enquire_get_mset" "', argument " "4"" of type '" "Xapian::doccount""'"); goto fail; } while(0); + } + arg4 = static_cast< Xapian::doccount >(val4); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), swig_types[28], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_get_mset__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::doccount arg2 ; + Xapian::doccount arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + Xapian::MSet result; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_get_mset" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_get_mset" "', argument " "2"" of type '" "Xapian::doccount""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::doccount >(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "Enquire_get_mset" "', argument " "3"" of type '" "Xapian::doccount""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::doccount >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), swig_types[28], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_get_mset__SWIG_5(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::doccount arg2 ; + Xapian::doccount arg3 ; + Xapian::RSet *arg4 = (Xapian::RSet *) 0 ; + Xapian::MatchDecider *arg5 = (Xapian::MatchDecider *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + void *argp5 = 0 ; + int res5 = 0 ; + Xapian::MSet result; + if ((nobjs < 5) || (nobjs > 5)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_get_mset" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_get_mset" "', argument " "2"" of type '" "Xapian::doccount""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::doccount >(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "Enquire_get_mset" "', argument " "3"" of type '" "Xapian::doccount""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::doccount >(val3); + res4 = SWIG_Python_ConvertPtrAndOwn(swig_obj[3], &argp4, swig_types[43], 0 | 0, 0); + if (!(res4 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res4 != (-1)) ? res4 : -5)), "in method '" "Enquire_get_mset" "', argument " "4"" of type '" "Xapian::RSet const *""'"); goto fail; } while(0); + } + arg4 = reinterpret_cast< Xapian::RSet * >(argp4); + res5 = SWIG_Python_ConvertPtrAndOwn(swig_obj[4], &argp5, swig_types[30], 0 | 0, 0); + if (!(res5 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res5 != (-1)) ? res5 : -5)), "in method '" "Enquire_get_mset" "', argument " "5"" of type '" "Xapian::MatchDecider const *""'"); goto fail; } while(0); + } + arg5 = reinterpret_cast< Xapian::MatchDecider * >(argp5); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,(Xapian::RSet const *)arg4,(Xapian::MatchDecider const *)arg5); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), swig_types[28], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_get_mset__SWIG_6(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::doccount arg2 ; + Xapian::doccount arg3 ; + Xapian::RSet *arg4 = (Xapian::RSet *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + Xapian::MSet result; + if ((nobjs < 4) || (nobjs > 4)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_get_mset" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_get_mset" "', argument " "2"" of type '" "Xapian::doccount""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::doccount >(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "Enquire_get_mset" "', argument " "3"" of type '" "Xapian::doccount""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::doccount >(val3); + res4 = SWIG_Python_ConvertPtrAndOwn(swig_obj[3], &argp4, swig_types[43], 0 | 0, 0); + if (!(res4 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res4 != (-1)) ? res4 : -5)), "in method '" "Enquire_get_mset" "', argument " "4"" of type '" "Xapian::RSet const *""'"); goto fail; } while(0); + } + arg4 = reinterpret_cast< Xapian::RSet * >(argp4); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,(Xapian::RSet const *)arg4); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), swig_types[28], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_get_mset(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[8]; + if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_get_mset",0,7,argv))) goto fail; + --argc; + if (argc == 3) { + return _wrap_Enquire_get_mset__SWIG_4(self, argc, argv); + } + if (argc == 4) { + int _v = 0; + { + void *vptr = 0; + int res = SWIG_Python_ConvertPtrAndOwn(argv[3], &vptr, swig_types[43], 0, 0); + _v = ((res >= 0) ? 1 : 0); + } + if (!_v) goto check_2; + return _wrap_Enquire_get_mset__SWIG_6(self, argc, argv); + } +check_2: + if (argc == 4) { + return _wrap_Enquire_get_mset__SWIG_3(self, argc, argv); + } + if (argc == 5) { + int _v = 0; + { + void *vptr = 0; + int res = SWIG_Python_ConvertPtrAndOwn(argv[3], &vptr, swig_types[43], 0, 0); + _v = ((res >= 0) ? 1 : 0); + } + if (!_v) goto check_4; + { + void *vptr = 0; + int res = SWIG_Python_ConvertPtrAndOwn(argv[4], &vptr, swig_types[30], 0, 0); + _v = ((res >= 0) ? 1 : 0); + } + if (!_v) goto check_4; + return _wrap_Enquire_get_mset__SWIG_5(self, argc, argv); + } +check_4: + if (argc == 5) { + return _wrap_Enquire_get_mset__SWIG_2(self, argc, argv); + } + if (argc == 6) { + return _wrap_Enquire_get_mset__SWIG_1(self, argc, argv); + } + if (argc == 7) { + return _wrap_Enquire_get_mset__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Enquire_get_mset'.\n" + " Possible C/C++ prototypes are:\n" + " get_mset(Xapian::Enquire const *,Xapian::doccount,Xapian::doccount,Xapian::doccount,Xapian::RSet const *,Xapian::MatchDecider const *,Xapian::MatchDecider const *)\n" + " get_mset(Xapian::Enquire const *,Xapian::doccount,Xapian::doccount,Xapian::doccount,Xapian::RSet const *,Xapian::MatchDecider const *)\n" + " get_mset(Xapian::Enquire const *,Xapian::doccount,Xapian::doccount,Xapian::doccount,Xapian::RSet const *)\n" + " get_mset(Xapian::Enquire const *,Xapian::doccount,Xapian::doccount,Xapian::doccount)\n" + " get_mset(Xapian::Enquire const *,Xapian::doccount,Xapian::doccount)\n" + " get_mset(Xapian::Enquire const *,Xapian::doccount,Xapian::doccount,Xapian::RSet const *,Xapian::MatchDecider const *)\n" + " get_mset(Xapian::Enquire const *,Xapian::doccount,Xapian::doccount,Xapian::RSet const *)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_get_eset__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::termcount arg2 ; + Xapian::RSet *arg3 = 0 ; + int arg4 ; + double arg5 ; + Xapian::ExpandDecider *arg6 = (Xapian::ExpandDecider *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + void *argp6 = 0 ; + int res6 = 0 ; + Xapian::ESet result; + if ((nobjs < 6) || (nobjs > 6)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_get_eset" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_get_eset" "', argument " "2"" of type '" "Xapian::termcount""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::termcount >(val2); + res3 = SWIG_Python_ConvertPtrAndOwn(swig_obj[2], &argp3, swig_types[43], 0 | 0, 0); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "Enquire_get_eset" "', argument " "3"" of type '" "Xapian::RSet const &""'"); goto fail; } while(0); + } + if (!argp3) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Enquire_get_eset" "', argument " "3"" of type '" "Xapian::RSet const &""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< Xapian::RSet * >(argp3); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); + if (!(ecode4 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode4 != (-1)) ? ecode4 : -5)), "in method '" "Enquire_get_eset" "', argument " "4"" of type '" "int""'"); goto fail; } while(0); + } + arg4 = static_cast< int >(val4); + ecode5 = SWIG_AsVal_double(swig_obj[4], &val5); + if (!(ecode5 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode5 != (-1)) ? ecode5 : -5)), "in method '" "Enquire_get_eset" "', argument " "5"" of type '" "double""'"); goto fail; } while(0); + } + arg5 = static_cast< double >(val5); + res6 = SWIG_Python_ConvertPtrAndOwn(swig_obj[5], &argp6, swig_types[20], 0 | 0, 0); + if (!(res6 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res6 != (-1)) ? res6 : -5)), "in method '" "Enquire_get_eset" "', argument " "6"" of type '" "Xapian::ExpandDecider const *""'"); goto fail; } while(0); + } + arg6 = reinterpret_cast< Xapian::ExpandDecider * >(argp6); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4,arg5,(Xapian::ExpandDecider const *)arg6); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), swig_types[16], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_get_eset__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::termcount arg2 ; + Xapian::RSet *arg3 = 0 ; + int arg4 ; + double arg5 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + Xapian::ESet result; + if ((nobjs < 5) || (nobjs > 5)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_get_eset" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_get_eset" "', argument " "2"" of type '" "Xapian::termcount""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::termcount >(val2); + res3 = SWIG_Python_ConvertPtrAndOwn(swig_obj[2], &argp3, swig_types[43], 0 | 0, 0); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "Enquire_get_eset" "', argument " "3"" of type '" "Xapian::RSet const &""'"); goto fail; } while(0); + } + if (!argp3) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Enquire_get_eset" "', argument " "3"" of type '" "Xapian::RSet const &""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< Xapian::RSet * >(argp3); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); + if (!(ecode4 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode4 != (-1)) ? ecode4 : -5)), "in method '" "Enquire_get_eset" "', argument " "4"" of type '" "int""'"); goto fail; } while(0); + } + arg4 = static_cast< int >(val4); + ecode5 = SWIG_AsVal_double(swig_obj[4], &val5); + if (!(ecode5 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode5 != (-1)) ? ecode5 : -5)), "in method '" "Enquire_get_eset" "', argument " "5"" of type '" "double""'"); goto fail; } while(0); + } + arg5 = static_cast< double >(val5); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4,arg5); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), swig_types[16], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_get_eset__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::termcount arg2 ; + Xapian::RSet *arg3 = 0 ; + int arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int val4 ; + int ecode4 = 0 ; + Xapian::ESet result; + if ((nobjs < 4) || (nobjs > 4)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_get_eset" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_get_eset" "', argument " "2"" of type '" "Xapian::termcount""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::termcount >(val2); + res3 = SWIG_Python_ConvertPtrAndOwn(swig_obj[2], &argp3, swig_types[43], 0 | 0, 0); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "Enquire_get_eset" "', argument " "3"" of type '" "Xapian::RSet const &""'"); goto fail; } while(0); + } + if (!argp3) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Enquire_get_eset" "', argument " "3"" of type '" "Xapian::RSet const &""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< Xapian::RSet * >(argp3); + ecode4 = SWIG_AsVal_int(swig_obj[3], &val4); + if (!(ecode4 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode4 != (-1)) ? ecode4 : -5)), "in method '" "Enquire_get_eset" "', argument " "4"" of type '" "int""'"); goto fail; } while(0); + } + arg4 = static_cast< int >(val4); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), swig_types[16], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_get_eset__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::termcount arg2 ; + Xapian::RSet *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + Xapian::ESet result; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_get_eset" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_get_eset" "', argument " "2"" of type '" "Xapian::termcount""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::termcount >(val2); + res3 = SWIG_Python_ConvertPtrAndOwn(swig_obj[2], &argp3, swig_types[43], 0 | 0, 0); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "Enquire_get_eset" "', argument " "3"" of type '" "Xapian::RSet const &""'"); goto fail; } while(0); + } + if (!argp3) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Enquire_get_eset" "', argument " "3"" of type '" "Xapian::RSet const &""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< Xapian::RSet * >(argp3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), swig_types[16], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_get_eset__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::termcount arg2 ; + Xapian::RSet *arg3 = 0 ; + Xapian::ExpandDecider *arg4 = (Xapian::ExpandDecider *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + Xapian::ESet result; + if ((nobjs < 4) || (nobjs > 4)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_get_eset" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_get_eset" "', argument " "2"" of type '" "Xapian::termcount""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::termcount >(val2); + res3 = SWIG_Python_ConvertPtrAndOwn(swig_obj[2], &argp3, swig_types[43], 0 | 0, 0); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "Enquire_get_eset" "', argument " "3"" of type '" "Xapian::RSet const &""'"); goto fail; } while(0); + } + if (!argp3) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Enquire_get_eset" "', argument " "3"" of type '" "Xapian::RSet const &""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< Xapian::RSet * >(argp3); + res4 = SWIG_Python_ConvertPtrAndOwn(swig_obj[3], &argp4, swig_types[20], 0 | 0, 0); + if (!(res4 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res4 != (-1)) ? res4 : -5)), "in method '" "Enquire_get_eset" "', argument " "4"" of type '" "Xapian::ExpandDecider const *""'"); goto fail; } while(0); + } + arg4 = reinterpret_cast< Xapian::ExpandDecider * >(argp4); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,(Xapian::ExpandDecider const *)arg4); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), swig_types[16], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_get_eset(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[7]; + if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_get_eset",0,6,argv))) goto fail; + --argc; + if (argc == 3) { + return _wrap_Enquire_get_eset__SWIG_3(self, argc, argv); + } + if (argc == 4) { + int _v = 0; + { + void *vptr = 0; + int res = SWIG_Python_ConvertPtrAndOwn(argv[3], &vptr, swig_types[20], 0, 0); + _v = ((res >= 0) ? 1 : 0); + } + if (!_v) goto check_2; + return _wrap_Enquire_get_eset__SWIG_4(self, argc, argv); + } +check_2: + if (argc == 4) { + return _wrap_Enquire_get_eset__SWIG_2(self, argc, argv); + } + if (argc == 5) { + return _wrap_Enquire_get_eset__SWIG_1(self, argc, argv); + } + if (argc == 6) { + return _wrap_Enquire_get_eset__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Enquire_get_eset'.\n" + " Possible C/C++ prototypes are:\n" + " get_eset(Xapian::Enquire const *,Xapian::termcount,Xapian::RSet const &,int,double,Xapian::ExpandDecider const *)\n" + " get_eset(Xapian::Enquire const *,Xapian::termcount,Xapian::RSet const &,int,double)\n" + " get_eset(Xapian::Enquire const *,Xapian::termcount,Xapian::RSet const &,int)\n" + " get_eset(Xapian::Enquire const *,Xapian::termcount,Xapian::RSet const &)\n" + " get_eset(Xapian::Enquire const *,Xapian::termcount,Xapian::RSet const &,Xapian::ExpandDecider const *)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_get_matching_terms_begin__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::docid arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + Xapian::TermIterator result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_get_matching_terms_begin" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_get_matching_terms_begin" "', argument " "2"" of type '" "Xapian::docid""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::docid >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Enquire const *)arg1)->get_matching_terms_begin(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_get_matching_terms_end__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::docid arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + Xapian::TermIterator result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_get_matching_terms_end" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Enquire_get_matching_terms_end" "', argument " "2"" of type '" "Xapian::docid""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::docid >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Enquire const *)arg1)->get_matching_terms_end(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_get_matching_terms_begin__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::MSetIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + Xapian::TermIterator result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_get_matching_terms_begin" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[29], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Enquire_get_matching_terms_begin" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Enquire_get_matching_terms_begin" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Enquire const *)arg1)->get_matching_terms_begin((Xapian::MSetIterator const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_get_matching_terms_begin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_get_matching_terms_begin",0,2,argv))) goto fail; + --argc; + if (argc == 2) { + int _v = 0; + { + int res = SWIG_Python_ConvertPtrAndOwn(argv[1], 0, swig_types[29], 0, 0); + _v = ((res >= 0) ? 1 : 0); + } + if (!_v) goto check_1; + return _wrap_Enquire_get_matching_terms_begin__SWIG_1(self, argc, argv); + } +check_1: + if (argc == 2) { + return _wrap_Enquire_get_matching_terms_begin__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Enquire_get_matching_terms_begin'.\n" + " Possible C/C++ prototypes are:\n" + " get_matching_terms_begin(Xapian::Enquire const *,Xapian::docid)\n" + " get_matching_terms_begin(Xapian::Enquire const *,Xapian::MSetIterator const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_get_matching_terms_end__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::MSetIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + Xapian::TermIterator result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_get_matching_terms_end" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[29], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Enquire_get_matching_terms_end" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Enquire_get_matching_terms_end" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Enquire const *)arg1)->get_matching_terms_end((Xapian::MSetIterator const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_get_matching_terms_end(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_get_matching_terms_end",0,2,argv))) goto fail; + --argc; + if (argc == 2) { + int _v = 0; + { + int res = SWIG_Python_ConvertPtrAndOwn(argv[1], 0, swig_types[29], 0, 0); + _v = ((res >= 0) ? 1 : 0); + } + if (!_v) goto check_1; + return _wrap_Enquire_get_matching_terms_end__SWIG_1(self, argc, argv); + } +check_1: + if (argc == 2) { + return _wrap_Enquire_get_matching_terms_end__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Enquire_get_matching_terms_end'.\n" + " Possible C/C++ prototypes are:\n" + " get_matching_terms_end(Xapian::Enquire const *,Xapian::docid)\n" + " get_matching_terms_end(Xapian::Enquire const *,Xapian::MSetIterator const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire_get_matching_terms(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + Xapian::MSetIterator *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + std::pair< Xapian::TermIterator,Xapian::TermIterator > result; + if (!SWIG_Python_UnpackTuple(args,"Enquire_get_matching_terms",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire_get_matching_terms" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[29], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Enquire_get_matching_terms" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Enquire_get_matching_terms" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian_Enquire_get_matching_terms((Xapian::Enquire const *)arg1,(Xapian::MSetIterator const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + { + resultobj = PyList_New(0); + if (resultobj == 0) { + return __null; + } + for (Xapian::TermIterator i = (&result)->first; i != (&result)->second; ++i) { + PyObject * str = PyString_FromStringAndSize((*i).data(), (*i).size()); + if (str == 0) return __null; + if (PyList_Append(resultobj, str) == -1) { + if ( --((PyObject*)(str))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(str)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(str)))); + return __null; + } + if ( --((PyObject*)(str))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(str)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(str)))); + } + } + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Enquire___str__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[18], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Enquire___str__" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Enquire * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Enquire const *)arg1)->get_description(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *Enquire_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[18], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *Enquire_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Registry__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Registry *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Xapian::Registry *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[45], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_Registry" "', argument " "1"" of type '" "Xapian::Registry const &""'"); goto fail; } while(0); + } + if (!argp1) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_Registry" "', argument " "1"" of type '" "Xapian::Registry const &""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Registry * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Registry *)new Xapian::Registry((Xapian::Registry const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[45], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Registry__SWIG_1(PyObject *, int nobjs, PyObject **) { + PyObject *resultobj = 0; + Xapian::Registry *result = 0 ; + if ((nobjs < 0) || (nobjs > 0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Registry *)new Xapian::Registry(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[45], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Registry(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_Registry",0,1,argv))) goto fail; + --argc; + if (argc == 0) { + return _wrap_new_Registry__SWIG_1(self, argc, argv); + } + if (argc == 1) { + return _wrap_new_Registry__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Registry'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::Registry(Xapian::Registry const &)\n" + " Xapian::Registry()\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_Registry(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Registry *arg1 = (Xapian::Registry *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[45], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_Registry" "', argument " "1"" of type '" "Xapian::Registry *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Registry * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Registry_register_weighting_scheme(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Registry *arg1 = (Xapian::Registry *) 0 ; + Xapian::Weight *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"Registry_register_weighting_scheme",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[45], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Registry_register_weighting_scheme" "', argument " "1"" of type '" "Xapian::Registry *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Registry * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[65], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Registry_register_weighting_scheme" "', argument " "2"" of type '" "Xapian::Weight const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Registry_register_weighting_scheme" "', argument " "2"" of type '" "Xapian::Weight const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::Weight * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->register_weighting_scheme((Xapian::Weight const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Registry_get_weighting_scheme(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Registry *arg1 = (Xapian::Registry *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + Xapian::Weight *result = 0 ; + if (!SWIG_Python_UnpackTuple(args,"Registry_get_weighting_scheme",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[45], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Registry_get_weighting_scheme" "', argument " "1"" of type '" "Xapian::Registry const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Registry * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Registry_get_weighting_scheme" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Registry_get_weighting_scheme" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Weight *)((Xapian::Registry const *)arg1)->get_weighting_scheme((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[65], 0 | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Registry_register_posting_source(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Registry *arg1 = (Xapian::Registry *) 0 ; + Xapian::PostingSource *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"Registry_register_posting_source",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[45], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Registry_register_posting_source" "', argument " "1"" of type '" "Xapian::Registry *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Registry * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[39], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Registry_register_posting_source" "', argument " "2"" of type '" "Xapian::PostingSource const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Registry_register_posting_source" "', argument " "2"" of type '" "Xapian::PostingSource const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::PostingSource * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->register_posting_source((Xapian::PostingSource const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Registry_get_posting_source(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Registry *arg1 = (Xapian::Registry *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + Swig::Director *director = 0; + Xapian::PostingSource *result = 0 ; + if (!SWIG_Python_UnpackTuple(args,"Registry_get_posting_source",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[45], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Registry_get_posting_source" "', argument " "1"" of type '" "Xapian::Registry const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Registry * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Registry_get_posting_source" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Registry_get_posting_source" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::PostingSource *)((Xapian::Registry const *)arg1)->get_posting_source((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + director = dynamic_cast(result); + if (director) { + resultobj = director->swig_get_self(); + ( ((PyObject*)(resultobj))->ob_refcnt++); + } else { + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[39], 0 | 0); + } + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Registry_register_match_spy(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Registry *arg1 = (Xapian::Registry *) 0 ; + Xapian::MatchSpy *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"Registry_register_match_spy",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[45], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Registry_register_match_spy" "', argument " "1"" of type '" "Xapian::Registry *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Registry * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[31], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Registry_register_match_spy" "', argument " "2"" of type '" "Xapian::MatchSpy const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Registry_register_match_spy" "', argument " "2"" of type '" "Xapian::MatchSpy const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::MatchSpy * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->register_match_spy((Xapian::MatchSpy const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Registry_get_match_spy(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Registry *arg1 = (Xapian::Registry *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + Xapian::MatchSpy *result = 0 ; + if (!SWIG_Python_UnpackTuple(args,"Registry_get_match_spy",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[45], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Registry_get_match_spy" "', argument " "1"" of type '" "Xapian::Registry const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Registry * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Registry_get_match_spy" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Registry_get_match_spy" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::MatchSpy *)((Xapian::Registry const *)arg1)->get_match_spy((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[31], 0 | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *Registry_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[45], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *Registry_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_Weight(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Weight *arg1 = (Xapian::Weight *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[65], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_Weight" "', argument " "1"" of type '" "Xapian::Weight *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Weight * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Weight_name(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Weight *arg1 = (Xapian::Weight *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[65], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Weight_name" "', argument " "1"" of type '" "Xapian::Weight const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Weight * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Weight const *)arg1)->name(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Weight_get_sumpart(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Weight *arg1 = (Xapian::Weight *) 0 ; + Xapian::termcount arg2 ; + Xapian::termcount arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + Xapian::weight result; + if (!SWIG_Python_UnpackTuple(args,"Weight_get_sumpart",3,3,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[65], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Weight_get_sumpart" "', argument " "1"" of type '" "Xapian::Weight const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Weight * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Weight_get_sumpart" "', argument " "2"" of type '" "Xapian::termcount""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::termcount >(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "Weight_get_sumpart" "', argument " "3"" of type '" "Xapian::termcount""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::termcount >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::weight)((Xapian::Weight const *)arg1)->get_sumpart(arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = PyFloat_FromDouble(static_cast< double >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Weight_get_maxpart(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Weight *arg1 = (Xapian::Weight *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::weight result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[65], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Weight_get_maxpart" "', argument " "1"" of type '" "Xapian::Weight const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Weight * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::weight)((Xapian::Weight const *)arg1)->get_maxpart(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = PyFloat_FromDouble(static_cast< double >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Weight_get_sumextra(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Weight *arg1 = (Xapian::Weight *) 0 ; + Xapian::termcount arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + Xapian::weight result; + if (!SWIG_Python_UnpackTuple(args,"Weight_get_sumextra",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[65], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Weight_get_sumextra" "', argument " "1"" of type '" "Xapian::Weight const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Weight * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Weight_get_sumextra" "', argument " "2"" of type '" "Xapian::termcount""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::termcount >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::weight)((Xapian::Weight const *)arg1)->get_sumextra(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = PyFloat_FromDouble(static_cast< double >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Weight_get_maxextra(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Weight *arg1 = (Xapian::Weight *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::weight result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[65], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Weight_get_maxextra" "', argument " "1"" of type '" "Xapian::Weight const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Weight * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::weight)((Xapian::Weight const *)arg1)->get_maxextra(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = PyFloat_FromDouble(static_cast< double >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Weight_get_sumpart_needs_doclength_(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Weight *arg1 = (Xapian::Weight *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[65], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Weight_get_sumpart_needs_doclength_" "', argument " "1"" of type '" "Xapian::Weight const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Weight * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (bool)((Xapian::Weight const *)arg1)->get_sumpart_needs_doclength_(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Weight_get_sumpart_needs_wdf_(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Weight *arg1 = (Xapian::Weight *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[65], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Weight_get_sumpart_needs_wdf_" "', argument " "1"" of type '" "Xapian::Weight const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Weight * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (bool)((Xapian::Weight const *)arg1)->get_sumpart_needs_wdf_(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *Weight_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[65], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_BoolWeight(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::BoolWeight *result = 0 ; + if (!SWIG_Python_UnpackTuple(args,"new_BoolWeight",0,0,0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::BoolWeight *)new Xapian::BoolWeight(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[2], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_BoolWeight(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[2], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_BoolWeight" "', argument " "1"" of type '" "Xapian::BoolWeight *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::BoolWeight * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *BoolWeight_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[2], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *BoolWeight_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_BM25Weight__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + double arg1 ; + double arg2 ; + double arg3 ; + double arg4 ; + double arg5 ; + double val1 ; + int ecode1 = 0 ; + double val2 ; + int ecode2 = 0 ; + double val3 ; + int ecode3 = 0 ; + double val4 ; + int ecode4 = 0 ; + double val5 ; + int ecode5 = 0 ; + Xapian::BM25Weight *result = 0 ; + if ((nobjs < 5) || (nobjs > 5)) goto fail; + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_BM25Weight" "', argument " "1"" of type '" "double""'"); goto fail; } while(0); + } + arg1 = static_cast< double >(val1); + ecode2 = SWIG_AsVal_double(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_BM25Weight" "', argument " "2"" of type '" "double""'"); goto fail; } while(0); + } + arg2 = static_cast< double >(val2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_BM25Weight" "', argument " "3"" of type '" "double""'"); goto fail; } while(0); + } + arg3 = static_cast< double >(val3); + ecode4 = SWIG_AsVal_double(swig_obj[3], &val4); + if (!(ecode4 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode4 != (-1)) ? ecode4 : -5)), "in method '" "new_BM25Weight" "', argument " "4"" of type '" "double""'"); goto fail; } while(0); + } + arg4 = static_cast< double >(val4); + ecode5 = SWIG_AsVal_double(swig_obj[4], &val5); + if (!(ecode5 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode5 != (-1)) ? ecode5 : -5)), "in method '" "new_BM25Weight" "', argument " "5"" of type '" "double""'"); goto fail; } while(0); + } + arg5 = static_cast< double >(val5); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::BM25Weight *)new Xapian::BM25Weight(arg1,arg2,arg3,arg4,arg5); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[1], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_BM25Weight__SWIG_1(PyObject *, int nobjs, PyObject **) { + PyObject *resultobj = 0; + Xapian::BM25Weight *result = 0 ; + if ((nobjs < 0) || (nobjs > 0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::BM25Weight *)new Xapian::BM25Weight(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[1], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_BM25Weight(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[6]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_BM25Weight",0,5,argv))) goto fail; + --argc; + if (argc == 0) { + return _wrap_new_BM25Weight__SWIG_1(self, argc, argv); + } + if (argc == 5) { + return _wrap_new_BM25Weight__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_BM25Weight'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::BM25Weight(double,double,double,double,double)\n" + " Xapian::BM25Weight()\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_BM25Weight(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[1], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_BM25Weight" "', argument " "1"" of type '" "Xapian::BM25Weight *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::BM25Weight * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *BM25Weight_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[1], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *BM25Weight_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_TradWeight__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + double arg1 ; + double val1 ; + int ecode1 = 0 ; + Xapian::TradWeight *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_TradWeight" "', argument " "1"" of type '" "double""'"); goto fail; } while(0); + } + arg1 = static_cast< double >(val1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::TradWeight *)new Xapian::TradWeight(arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[56], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_TradWeight__SWIG_1(PyObject *, int nobjs, PyObject **) { + PyObject *resultobj = 0; + Xapian::TradWeight *result = 0 ; + if ((nobjs < 0) || (nobjs > 0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::TradWeight *)new Xapian::TradWeight(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[56], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_TradWeight(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_TradWeight",0,1,argv))) goto fail; + --argc; + if (argc == 0) { + return _wrap_new_TradWeight__SWIG_1(self, argc, argv); + } + if (argc == 1) { + return _wrap_new_TradWeight__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_TradWeight'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::TradWeight(double)\n" + " Xapian::TradWeight()\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_TradWeight(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[56], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_TradWeight" "', argument " "1"" of type '" "Xapian::TradWeight *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TradWeight * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *TradWeight_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[56], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *TradWeight_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_MatchSpy(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + PyObject *swig_obj[1] ; + Xapian::MatchSpy *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + arg1 = swig_obj[0]; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + if ( arg1 != (&_Py_NoneStruct) ) { + result = (Xapian::MatchSpy *)new SwigDirector_MatchSpy(arg1); + } else { + SWIG_Python_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); + goto fail; + } + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[31], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_MatchSpy(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[31], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_MatchSpy" "', argument " "1"" of type '" "Xapian::MatchSpy *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MatchSpy___call__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ; + Xapian::Document *arg2 = 0 ; + Xapian::weight arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + PyObject *swig_obj[3] ; + Swig::Director *director = 0; + bool upcall = false; + if (!SWIG_Python_UnpackTuple(args,"MatchSpy___call__",3,3,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[31], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MatchSpy___call__" "', argument " "1"" of type '" "Xapian::MatchSpy *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[15], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "MatchSpy___call__" "', argument " "2"" of type '" "Xapian::Document const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "MatchSpy___call__" "', argument " "2"" of type '" "Xapian::Document const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::Document * >(argp2); + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "MatchSpy___call__" "', argument " "3"" of type '" "Xapian::weight""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::weight >(val3); + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + Swig::DirectorPureVirtualException::raise("Xapian::MatchSpy::operator ()"); + } else { + (arg1)->operator ()((Xapian::Document const &)*arg2,arg3); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MatchSpy_name(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Swig::Director *director = 0; + bool upcall = false; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[31], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MatchSpy_name" "', argument " "1"" of type '" "Xapian::MatchSpy const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1); + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + result = ((Xapian::MatchSpy const *)arg1)->Xapian::MatchSpy::name(); + } else { + result = ((Xapian::MatchSpy const *)arg1)->name(); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MatchSpy_merge_results(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + Swig::Director *director = 0; + bool upcall = false; + if (!SWIG_Python_UnpackTuple(args,"MatchSpy_merge_results",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[31], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MatchSpy_merge_results" "', argument " "1"" of type '" "Xapian::MatchSpy *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "MatchSpy_merge_results" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "MatchSpy_merge_results" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + (arg1)->Xapian::MatchSpy::merge_results((std::string const &)*arg2); + } else { + (arg1)->merge_results((std::string const &)*arg2); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MatchSpy___str__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Swig::Director *director = 0; + bool upcall = false; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[31], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MatchSpy___str__" "', argument " "1"" of type '" "Xapian::MatchSpy const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1); + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + result = ((Xapian::MatchSpy const *)arg1)->Xapian::MatchSpy::get_description(); + } else { + result = ((Xapian::MatchSpy const *)arg1)->get_description(); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_disown_MatchSpy(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[31], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "disown_MatchSpy" "', argument " "1"" of type '" "Xapian::MatchSpy *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *MatchSpy_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[31], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *MatchSpy_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_ValueCountMatchSpy__SWIG_0(PyObject *, int nobjs, PyObject **) { + PyObject *resultobj = 0; + Xapian::ValueCountMatchSpy *result = 0 ; + if ((nobjs < 0) || (nobjs > 0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::ValueCountMatchSpy *)new Xapian::ValueCountMatchSpy(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[58], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_ValueCountMatchSpy__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::valueno arg1 ; + unsigned int val1 ; + int ecode1 = 0 ; + Xapian::ValueCountMatchSpy *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_ValueCountMatchSpy" "', argument " "1"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::valueno >(val1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::ValueCountMatchSpy *)new Xapian::ValueCountMatchSpy(arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[58], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_ValueCountMatchSpy(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_ValueCountMatchSpy",0,1,argv))) goto fail; + --argc; + if (argc == 0) { + return _wrap_new_ValueCountMatchSpy__SWIG_0(self, argc, argv); + } + if (argc == 1) { + return _wrap_new_ValueCountMatchSpy__SWIG_1(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ValueCountMatchSpy'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::ValueCountMatchSpy()\n" + " Xapian::ValueCountMatchSpy(Xapian::valueno)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ValueCountMatchSpy_get_total(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + size_t result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[58], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ValueCountMatchSpy_get_total" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::ValueCountMatchSpy const *)arg1)->get_total(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_size_t(static_cast< size_t >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ValueCountMatchSpy_values_begin(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::TermIterator result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[58], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ValueCountMatchSpy_values_begin" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::ValueCountMatchSpy const *)arg1)->values_begin(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ValueCountMatchSpy_values_end(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::TermIterator result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[58], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ValueCountMatchSpy_values_end" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::ValueCountMatchSpy const *)arg1)->values_end(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ValueCountMatchSpy_top_values_begin(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + Xapian::TermIterator result; + if (!SWIG_Python_UnpackTuple(args,"ValueCountMatchSpy_top_values_begin",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[58], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ValueCountMatchSpy_top_values_begin" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "ValueCountMatchSpy_top_values_begin" "', argument " "2"" of type '" "size_t""'"); goto fail; } while(0); + } + arg2 = static_cast< size_t >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::ValueCountMatchSpy const *)arg1)->top_values_begin(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ValueCountMatchSpy_top_values_end(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + Xapian::TermIterator result; + if (!SWIG_Python_UnpackTuple(args,"ValueCountMatchSpy_top_values_end",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[58], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ValueCountMatchSpy_top_values_end" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "ValueCountMatchSpy_top_values_end" "', argument " "2"" of type '" "size_t""'"); goto fail; } while(0); + } + arg2 = static_cast< size_t >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::ValueCountMatchSpy const *)arg1)->top_values_end(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_ValueCountMatchSpy(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[58], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_ValueCountMatchSpy" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *ValueCountMatchSpy_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[58], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *ValueCountMatchSpy_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_add_database(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + Xapian::Database *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"Database_add_database",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_add_database" "', argument " "1"" of type '" "Xapian::Database *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[4], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Database_add_database" "', argument " "2"" of type '" "Xapian::Database const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Database_add_database" "', argument " "2"" of type '" "Xapian::Database const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::Database * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->add_database((Xapian::Database const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Database__SWIG_0(PyObject *, int nobjs, PyObject **) { + PyObject *resultobj = 0; + Xapian::Database *result = 0 ; + if ((nobjs < 0) || (nobjs > 0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Database *)new Xapian::Database(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[4], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Database__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::Database *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_Database" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_Database" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Database *)new Xapian::Database((std::string const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[4], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_Database(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_Database" "', argument " "1"" of type '" "Xapian::Database *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Database__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Xapian::Database *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_Database" "', argument " "1"" of type '" "Xapian::Database const &""'"); goto fail; } while(0); + } + if (!argp1) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_Database" "', argument " "1"" of type '" "Xapian::Database const &""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Database *)new Xapian::Database((Xapian::Database const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[4], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Database(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_Database",0,1,argv))) goto fail; + --argc; + if (argc == 0) { + return _wrap_new_Database__SWIG_0(self, argc, argv); + } + if (argc == 1) { + int _v = 0; + { + int res = SWIG_Python_ConvertPtrAndOwn(argv[0], 0, swig_types[4], 0, 0); + _v = ((res >= 0) ? 1 : 0); + } + if (!_v) goto check_2; + return _wrap_new_Database__SWIG_2(self, argc, argv); + } +check_2: + if (argc == 1) { + return _wrap_new_Database__SWIG_1(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Database'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::Database()\n" + " Xapian::Database(std::string const &)\n" + " Xapian::Database(Xapian::Database const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_reopen(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_reopen" "', argument " "1"" of type '" "Xapian::Database *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->reopen(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_close(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_close" "', argument " "1"" of type '" "Xapian::Database *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->close(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database___str__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database___str__" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->get_description(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_postlist_begin(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + Xapian::PostingIterator result; + if (!SWIG_Python_UnpackTuple(args,"Database_postlist_begin",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_postlist_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Database_postlist_begin" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Database_postlist_begin" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->postlist_begin((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::PostingIterator(static_cast< const Xapian::PostingIterator& >(result))), swig_types[38], 0x1 | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_postlist_end(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + Xapian::PostingIterator result; + if (!SWIG_Python_UnpackTuple(args,"Database_postlist_end",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_postlist_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Database_postlist_end" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Database_postlist_end" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->postlist_end((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::PostingIterator(static_cast< const Xapian::PostingIterator& >(result))), swig_types[38], 0x1 | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_termlist_begin(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + Xapian::docid arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + Xapian::TermIterator result; + if (!SWIG_Python_UnpackTuple(args,"Database_termlist_begin",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_termlist_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Database_termlist_begin" "', argument " "2"" of type '" "Xapian::docid""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::docid >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->termlist_begin(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_termlist_end(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + Xapian::docid arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + Xapian::TermIterator result; + if (!SWIG_Python_UnpackTuple(args,"Database_termlist_end",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_termlist_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Database_termlist_end" "', argument " "2"" of type '" "Xapian::docid""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::docid >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->termlist_end(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_positionlist_begin(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + Xapian::docid arg2 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int res3 = ((0)) ; + PyObject *swig_obj[3] ; + Xapian::PositionIterator result; + if (!SWIG_Python_UnpackTuple(args,"Database_positionlist_begin",3,3,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_positionlist_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Database_positionlist_begin" "', argument " "2"" of type '" "Xapian::docid""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::docid >(val2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_anystring_as_ptr(&(swig_obj[2]), &ptr); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "Database_positionlist_begin" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Database_positionlist_begin" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg3 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->positionlist_begin(arg2,(std::string const &)*arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), swig_types[37], 0x1 | 0); + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + return resultobj; +fail: + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_positionlist_end(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + Xapian::docid arg2 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int res3 = ((0)) ; + PyObject *swig_obj[3] ; + Xapian::PositionIterator result; + if (!SWIG_Python_UnpackTuple(args,"Database_positionlist_end",3,3,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_positionlist_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Database_positionlist_end" "', argument " "2"" of type '" "Xapian::docid""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::docid >(val2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_anystring_as_ptr(&(swig_obj[2]), &ptr); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "Database_positionlist_end" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Database_positionlist_end" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg3 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->positionlist_end(arg2,(std::string const &)*arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), swig_types[37], 0x1 | 0); + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + return resultobj; +fail: + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_allterms_begin__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Xapian::TermIterator result; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_allterms_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->allterms_begin(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_allterms_end__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Xapian::TermIterator result; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_allterms_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->allterms_end(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_allterms_begin__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + Xapian::TermIterator result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_allterms_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Database_allterms_begin" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Database_allterms_begin" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->allterms_begin((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_allterms_begin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + if (!(argc = SWIG_Python_UnpackTuple(args,"Database_allterms_begin",0,2,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_Database_allterms_begin__SWIG_0(self, argc, argv); + } + if (argc == 2) { + return _wrap_Database_allterms_begin__SWIG_1(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Database_allterms_begin'.\n" + " Possible C/C++ prototypes are:\n" + " allterms_begin(Xapian::Database const *)\n" + " allterms_begin(Xapian::Database const *,std::string const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_allterms_end__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + Xapian::TermIterator result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_allterms_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Database_allterms_end" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Database_allterms_end" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->allterms_end((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_allterms_end(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + if (!(argc = SWIG_Python_UnpackTuple(args,"Database_allterms_end",0,2,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_Database_allterms_end__SWIG_0(self, argc, argv); + } + if (argc == 2) { + return _wrap_Database_allterms_end__SWIG_1(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Database_allterms_end'.\n" + " Possible C/C++ prototypes are:\n" + " allterms_end(Xapian::Database const *)\n" + " allterms_end(Xapian::Database const *,std::string const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_get_doccount(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::doccount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_get_doccount" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::doccount)((Xapian::Database const *)arg1)->get_doccount(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_get_lastdocid(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::docid result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_get_lastdocid" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::docid)((Xapian::Database const *)arg1)->get_lastdocid(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_get_avlength(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::doclength result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_get_avlength" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::doclength)((Xapian::Database const *)arg1)->get_avlength(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = PyFloat_FromDouble(static_cast< double >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_get_termfreq(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + Xapian::doccount result; + if (!SWIG_Python_UnpackTuple(args,"Database_get_termfreq",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_get_termfreq" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Database_get_termfreq" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Database_get_termfreq" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::doccount)((Xapian::Database const *)arg1)->get_termfreq((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_term_exists(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + bool result; + if (!SWIG_Python_UnpackTuple(args,"Database_term_exists",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_term_exists" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Database_term_exists" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Database_term_exists" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (bool)((Xapian::Database const *)arg1)->term_exists((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_get_collection_freq(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + Xapian::termcount result; + if (!SWIG_Python_UnpackTuple(args,"Database_get_collection_freq",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_get_collection_freq" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Database_get_collection_freq" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Database_get_collection_freq" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_collection_freq((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_get_value_freq(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + Xapian::valueno arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + Xapian::doccount result; + if (!SWIG_Python_UnpackTuple(args,"Database_get_value_freq",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_get_value_freq" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Database_get_value_freq" "', argument " "2"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::valueno >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::doccount)((Xapian::Database const *)arg1)->get_value_freq(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_get_value_lower_bound(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + Xapian::valueno arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + std::string result; + if (!SWIG_Python_UnpackTuple(args,"Database_get_value_lower_bound",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_get_value_lower_bound" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Database_get_value_lower_bound" "', argument " "2"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::valueno >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->get_value_lower_bound(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_get_value_upper_bound(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + Xapian::valueno arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + std::string result; + if (!SWIG_Python_UnpackTuple(args,"Database_get_value_upper_bound",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_get_value_upper_bound" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Database_get_value_upper_bound" "', argument " "2"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::valueno >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->get_value_upper_bound(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_get_doclength_lower_bound(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::termcount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_get_doclength_lower_bound" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_doclength_lower_bound(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_get_doclength_upper_bound(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::termcount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_get_doclength_upper_bound" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_doclength_upper_bound(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_get_wdf_upper_bound(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + Xapian::termcount result; + if (!SWIG_Python_UnpackTuple(args,"Database_get_wdf_upper_bound",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_get_wdf_upper_bound" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Database_get_wdf_upper_bound" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Database_get_wdf_upper_bound" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_wdf_upper_bound((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_valuestream_begin(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + Xapian::valueno arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + Xapian::ValueIterator result; + if (!SWIG_Python_UnpackTuple(args,"Database_valuestream_begin",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_valuestream_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Database_valuestream_begin" "', argument " "2"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::valueno >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->valuestream_begin(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::ValueIterator(static_cast< const Xapian::ValueIterator& >(result))), swig_types[59], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_valuestream_end(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + Xapian::valueno arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + Xapian::ValueIterator result; + if (!SWIG_Python_UnpackTuple(args,"Database_valuestream_end",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_valuestream_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Database_valuestream_end" "', argument " "2"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::valueno >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->valuestream_end(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::ValueIterator(static_cast< const Xapian::ValueIterator& >(result))), swig_types[59], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_get_doclength(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + Xapian::docid arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + Xapian::doclength result; + if (!SWIG_Python_UnpackTuple(args,"Database_get_doclength",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_get_doclength" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Database_get_doclength" "', argument " "2"" of type '" "Xapian::docid""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::docid >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::doclength)((Xapian::Database const *)arg1)->get_doclength(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = PyFloat_FromDouble(static_cast< double >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_keep_alive(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_keep_alive" "', argument " "1"" of type '" "Xapian::Database *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->keep_alive(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_get_document(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + Xapian::docid arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + Xapian::Document result; + if (!SWIG_Python_UnpackTuple(args,"Database_get_document",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_get_document" "', argument " "1"" of type '" "Xapian::Database *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Database_get_document" "', argument " "2"" of type '" "Xapian::docid""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::docid >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (arg1)->get_document(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::Document(static_cast< const Xapian::Document& >(result))), swig_types[15], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_get_spelling_suggestion__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + std::string *arg2 = 0 ; + unsigned int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + unsigned int val3 ; + int ecode3 = 0 ; + std::string result; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_get_spelling_suggestion" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Database_get_spelling_suggestion" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Database_get_spelling_suggestion" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "Database_get_spelling_suggestion" "', argument " "3"" of type '" "unsigned int""'"); goto fail; } while(0); + } + arg3 = static_cast< unsigned int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->get_spelling_suggestion((std::string const &)*arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_get_spelling_suggestion__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + std::string result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_get_spelling_suggestion" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Database_get_spelling_suggestion" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Database_get_spelling_suggestion" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->get_spelling_suggestion((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_get_spelling_suggestion(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"Database_get_spelling_suggestion",0,3,argv))) goto fail; + --argc; + if (argc == 2) { + return _wrap_Database_get_spelling_suggestion__SWIG_1(self, argc, argv); + } + if (argc == 3) { + return _wrap_Database_get_spelling_suggestion__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Database_get_spelling_suggestion'.\n" + " Possible C/C++ prototypes are:\n" + " get_spelling_suggestion(Xapian::Database const *,std::string const &,unsigned int)\n" + " get_spelling_suggestion(Xapian::Database const *,std::string const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_spellings_begin(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::TermIterator result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_spellings_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->spellings_begin(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_spellings_end(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::TermIterator result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_spellings_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->spellings_end(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_synonyms_begin(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + Xapian::TermIterator result; + if (!SWIG_Python_UnpackTuple(args,"Database_synonyms_begin",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_synonyms_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Database_synonyms_begin" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Database_synonyms_begin" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->synonyms_begin((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_synonyms_end(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + Xapian::TermIterator result; + if (!SWIG_Python_UnpackTuple(args,"Database_synonyms_end",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_synonyms_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Database_synonyms_end" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Database_synonyms_end" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->synonyms_end((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_synonym_keys_begin__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + Xapian::TermIterator result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_synonym_keys_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Database_synonym_keys_begin" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Database_synonym_keys_begin" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->synonym_keys_begin((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_synonym_keys_begin__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Xapian::TermIterator result; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_synonym_keys_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->synonym_keys_begin(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_synonym_keys_begin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + if (!(argc = SWIG_Python_UnpackTuple(args,"Database_synonym_keys_begin",0,2,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_Database_synonym_keys_begin__SWIG_1(self, argc, argv); + } + if (argc == 2) { + return _wrap_Database_synonym_keys_begin__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Database_synonym_keys_begin'.\n" + " Possible C/C++ prototypes are:\n" + " synonym_keys_begin(Xapian::Database const *,std::string const &)\n" + " synonym_keys_begin(Xapian::Database const *)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_synonym_keys_end__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + Xapian::TermIterator result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_synonym_keys_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Database_synonym_keys_end" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Database_synonym_keys_end" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->synonym_keys_end((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_synonym_keys_end__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Xapian::TermIterator result; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_synonym_keys_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->synonym_keys_end(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_synonym_keys_end(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + if (!(argc = SWIG_Python_UnpackTuple(args,"Database_synonym_keys_end",0,2,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_Database_synonym_keys_end__SWIG_1(self, argc, argv); + } + if (argc == 2) { + return _wrap_Database_synonym_keys_end__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Database_synonym_keys_end'.\n" + " Possible C/C++ prototypes are:\n" + " synonym_keys_end(Xapian::Database const *,std::string const &)\n" + " synonym_keys_end(Xapian::Database const *)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_get_metadata(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + std::string result; + if (!SWIG_Python_UnpackTuple(args,"Database_get_metadata",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_get_metadata" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Database_get_metadata" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Database_get_metadata" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->get_metadata((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database__metadata_keys_begin__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + Xapian::TermIterator result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database__metadata_keys_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Database__metadata_keys_begin" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Database__metadata_keys_begin" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->metadata_keys_begin((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database__metadata_keys_begin__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Xapian::TermIterator result; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database__metadata_keys_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->metadata_keys_begin(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database__metadata_keys_begin(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + if (!(argc = SWIG_Python_UnpackTuple(args,"Database__metadata_keys_begin",0,2,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_Database__metadata_keys_begin__SWIG_1(self, argc, argv); + } + if (argc == 2) { + return _wrap_Database__metadata_keys_begin__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Database__metadata_keys_begin'.\n" + " Possible C/C++ prototypes are:\n" + " metadata_keys_begin(Xapian::Database const *,std::string const &)\n" + " metadata_keys_begin(Xapian::Database const *)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database__metadata_keys_end__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + Xapian::TermIterator result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database__metadata_keys_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Database__metadata_keys_end" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Database__metadata_keys_end" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->metadata_keys_end((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database__metadata_keys_end__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Xapian::TermIterator result; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database__metadata_keys_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->metadata_keys_end(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database__metadata_keys_end(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + if (!(argc = SWIG_Python_UnpackTuple(args,"Database__metadata_keys_end",0,2,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_Database__metadata_keys_end__SWIG_1(self, argc, argv); + } + if (argc == 2) { + return _wrap_Database__metadata_keys_end__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Database__metadata_keys_end'.\n" + " Possible C/C++ prototypes are:\n" + " metadata_keys_end(Xapian::Database const *,std::string const &)\n" + " metadata_keys_end(Xapian::Database const *)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Database_get_uuid(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Database *arg1 = (Xapian::Database *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[4], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Database_get_uuid" "', argument " "1"" of type '" "Xapian::Database const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Database * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Database const *)arg1)->get_uuid(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *Database_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[4], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *Database_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_WritableDatabase(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[66], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_WritableDatabase" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_WritableDatabase__SWIG_0(PyObject *, int nobjs, PyObject **) { + PyObject *resultobj = 0; + Xapian::WritableDatabase *result = 0 ; + if ((nobjs < 0) || (nobjs > 0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[66], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_WritableDatabase__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + Xapian::WritableDatabase *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_WritableDatabase" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_WritableDatabase" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_WritableDatabase" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase((std::string const &)*arg1,arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[66], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_WritableDatabase__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::WritableDatabase *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Xapian::WritableDatabase *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[66], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_WritableDatabase" "', argument " "1"" of type '" "Xapian::WritableDatabase const &""'"); goto fail; } while(0); + } + if (!argp1) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_WritableDatabase" "', argument " "1"" of type '" "Xapian::WritableDatabase const &""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase((Xapian::WritableDatabase const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[66], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_WritableDatabase(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_WritableDatabase",0,2,argv))) goto fail; + --argc; + if (argc == 0) { + return _wrap_new_WritableDatabase__SWIG_0(self, argc, argv); + } + if (argc == 1) { + return _wrap_new_WritableDatabase__SWIG_2(self, argc, argv); + } + if (argc == 2) { + return _wrap_new_WritableDatabase__SWIG_1(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_WritableDatabase'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::WritableDatabase()\n" + " Xapian::WritableDatabase(std::string const &,int)\n" + " Xapian::WritableDatabase(Xapian::WritableDatabase const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase_commit(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[66], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "WritableDatabase_commit" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->commit(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase_flush(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[66], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "WritableDatabase_flush" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->flush(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase_begin_transaction__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[66], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "WritableDatabase_begin_transaction" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "WritableDatabase_begin_transaction" "', argument " "2"" of type '" "bool""'"); goto fail; } while(0); + } + arg2 = static_cast< bool >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->begin_transaction(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase_begin_transaction__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[66], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "WritableDatabase_begin_transaction" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->begin_transaction(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase_begin_transaction(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + if (!(argc = SWIG_Python_UnpackTuple(args,"WritableDatabase_begin_transaction",0,2,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_WritableDatabase_begin_transaction__SWIG_1(self, argc, argv); + } + if (argc == 2) { + return _wrap_WritableDatabase_begin_transaction__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'WritableDatabase_begin_transaction'.\n" + " Possible C/C++ prototypes are:\n" + " begin_transaction(Xapian::WritableDatabase *,bool)\n" + " begin_transaction(Xapian::WritableDatabase *)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase_commit_transaction(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[66], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "WritableDatabase_commit_transaction" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->commit_transaction(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase_cancel_transaction(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[66], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "WritableDatabase_cancel_transaction" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->cancel_transaction(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase_add_document(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ; + Xapian::Document *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + Xapian::docid result; + if (!SWIG_Python_UnpackTuple(args,"WritableDatabase_add_document",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[66], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "WritableDatabase_add_document" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[15], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "WritableDatabase_add_document" "', argument " "2"" of type '" "Xapian::Document const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "WritableDatabase_add_document" "', argument " "2"" of type '" "Xapian::Document const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::Document * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::docid)(arg1)->add_document((Xapian::Document const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase_delete_document__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ; + Xapian::docid arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[66], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "WritableDatabase_delete_document" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "WritableDatabase_delete_document" "', argument " "2"" of type '" "Xapian::docid""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::docid >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->delete_document(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase_replace_document__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ; + Xapian::docid arg2 ; + Xapian::Document *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[66], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "WritableDatabase_replace_document" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "WritableDatabase_replace_document" "', argument " "2"" of type '" "Xapian::docid""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::docid >(val2); + res3 = SWIG_Python_ConvertPtrAndOwn(swig_obj[2], &argp3, swig_types[15], 0 | 0, 0); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "WritableDatabase_replace_document" "', argument " "3"" of type '" "Xapian::Document const &""'"); goto fail; } while(0); + } + if (!argp3) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "WritableDatabase_replace_document" "', argument " "3"" of type '" "Xapian::Document const &""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< Xapian::Document * >(argp3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->replace_document(arg2,(Xapian::Document const &)*arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase_delete_document__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[66], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "WritableDatabase_delete_document" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "WritableDatabase_delete_document" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "WritableDatabase_delete_document" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->delete_document((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase_delete_document(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + if (!(argc = SWIG_Python_UnpackTuple(args,"WritableDatabase_delete_document",0,2,argv))) goto fail; + --argc; + if (argc == 2) { + int _v = 0; + { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_1; + return _wrap_WritableDatabase_delete_document__SWIG_0(self, argc, argv); + } +check_1: + if (argc == 2) { + return _wrap_WritableDatabase_delete_document__SWIG_1(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'WritableDatabase_delete_document'.\n" + " Possible C/C++ prototypes are:\n" + " delete_document(Xapian::WritableDatabase *,Xapian::docid)\n" + " delete_document(Xapian::WritableDatabase *,std::string const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase_replace_document__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ; + std::string *arg2 = 0 ; + Xapian::Document *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + void *argp3 = 0 ; + int res3 = 0 ; + Xapian::docid result; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[66], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "WritableDatabase_replace_document" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "WritableDatabase_replace_document" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "WritableDatabase_replace_document" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + res3 = SWIG_Python_ConvertPtrAndOwn(swig_obj[2], &argp3, swig_types[15], 0 | 0, 0); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "WritableDatabase_replace_document" "', argument " "3"" of type '" "Xapian::Document const &""'"); goto fail; } while(0); + } + if (!argp3) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "WritableDatabase_replace_document" "', argument " "3"" of type '" "Xapian::Document const &""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< Xapian::Document * >(argp3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::docid)(arg1)->replace_document((std::string const &)*arg2,(Xapian::Document const &)*arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase_replace_document(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"WritableDatabase_replace_document",0,3,argv))) goto fail; + --argc; + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_1; + return _wrap_WritableDatabase_replace_document__SWIG_0(self, argc, argv); + } +check_1: + if (argc == 3) { + return _wrap_WritableDatabase_replace_document__SWIG_1(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'WritableDatabase_replace_document'.\n" + " Possible C/C++ prototypes are:\n" + " replace_document(Xapian::WritableDatabase *,Xapian::docid,Xapian::Document const &)\n" + " replace_document(Xapian::WritableDatabase *,std::string const &,Xapian::Document const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase_add_spelling__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ; + std::string *arg2 = 0 ; + Xapian::termcount arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + unsigned int val3 ; + int ecode3 = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[66], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "WritableDatabase_add_spelling" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "WritableDatabase_add_spelling" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "WritableDatabase_add_spelling" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "WritableDatabase_add_spelling" "', argument " "3"" of type '" "Xapian::termcount""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::termcount >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + ((Xapian::WritableDatabase const *)arg1)->add_spelling((std::string const &)*arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase_add_spelling__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[66], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "WritableDatabase_add_spelling" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "WritableDatabase_add_spelling" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "WritableDatabase_add_spelling" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + ((Xapian::WritableDatabase const *)arg1)->add_spelling((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase_add_spelling(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"WritableDatabase_add_spelling",0,3,argv))) goto fail; + --argc; + if (argc == 2) { + return _wrap_WritableDatabase_add_spelling__SWIG_1(self, argc, argv); + } + if (argc == 3) { + return _wrap_WritableDatabase_add_spelling__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'WritableDatabase_add_spelling'.\n" + " Possible C/C++ prototypes are:\n" + " add_spelling(Xapian::WritableDatabase const *,std::string const &,Xapian::termcount)\n" + " add_spelling(Xapian::WritableDatabase const *,std::string const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase_remove_spelling__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ; + std::string *arg2 = 0 ; + Xapian::termcount arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + unsigned int val3 ; + int ecode3 = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[66], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "WritableDatabase_remove_spelling" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "WritableDatabase_remove_spelling" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "WritableDatabase_remove_spelling" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "WritableDatabase_remove_spelling" "', argument " "3"" of type '" "Xapian::termcount""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::termcount >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + ((Xapian::WritableDatabase const *)arg1)->remove_spelling((std::string const &)*arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase_remove_spelling__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[66], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "WritableDatabase_remove_spelling" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "WritableDatabase_remove_spelling" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "WritableDatabase_remove_spelling" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + ((Xapian::WritableDatabase const *)arg1)->remove_spelling((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase_remove_spelling(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"WritableDatabase_remove_spelling",0,3,argv))) goto fail; + --argc; + if (argc == 2) { + return _wrap_WritableDatabase_remove_spelling__SWIG_1(self, argc, argv); + } + if (argc == 3) { + return _wrap_WritableDatabase_remove_spelling__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'WritableDatabase_remove_spelling'.\n" + " Possible C/C++ prototypes are:\n" + " remove_spelling(Xapian::WritableDatabase const *,std::string const &,Xapian::termcount)\n" + " remove_spelling(Xapian::WritableDatabase const *,std::string const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase_add_synonym(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + int res3 = ((0)) ; + PyObject *swig_obj[3] ; + if (!SWIG_Python_UnpackTuple(args,"WritableDatabase_add_synonym",3,3,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[66], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "WritableDatabase_add_synonym" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "WritableDatabase_add_synonym" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "WritableDatabase_add_synonym" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_anystring_as_ptr(&(swig_obj[2]), &ptr); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "WritableDatabase_add_synonym" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "WritableDatabase_add_synonym" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg3 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + ((Xapian::WritableDatabase const *)arg1)->add_synonym((std::string const &)*arg2,(std::string const &)*arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase_remove_synonym(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + int res3 = ((0)) ; + PyObject *swig_obj[3] ; + if (!SWIG_Python_UnpackTuple(args,"WritableDatabase_remove_synonym",3,3,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[66], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "WritableDatabase_remove_synonym" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "WritableDatabase_remove_synonym" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "WritableDatabase_remove_synonym" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_anystring_as_ptr(&(swig_obj[2]), &ptr); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "WritableDatabase_remove_synonym" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "WritableDatabase_remove_synonym" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg3 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + ((Xapian::WritableDatabase const *)arg1)->remove_synonym((std::string const &)*arg2,(std::string const &)*arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase_clear_synonyms(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"WritableDatabase_clear_synonyms",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[66], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "WritableDatabase_clear_synonyms" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "WritableDatabase_clear_synonyms" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "WritableDatabase_clear_synonyms" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + ((Xapian::WritableDatabase const *)arg1)->clear_synonyms((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase_set_metadata(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + int res3 = ((0)) ; + PyObject *swig_obj[3] ; + if (!SWIG_Python_UnpackTuple(args,"WritableDatabase_set_metadata",3,3,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[66], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "WritableDatabase_set_metadata" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "WritableDatabase_set_metadata" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "WritableDatabase_set_metadata" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_anystring_as_ptr(&(swig_obj[2]), &ptr); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "WritableDatabase_set_metadata" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "WritableDatabase_set_metadata" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg3 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_metadata((std::string const &)*arg2,(std::string const &)*arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_WritableDatabase___str__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[66], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "WritableDatabase___str__" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::WritableDatabase const *)arg1)->get_description(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *WritableDatabase_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[66], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *WritableDatabase_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_open_stub(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + PyObject *swig_obj[1] ; + Xapian::Database result; + if (!args) goto fail; + swig_obj[0] = args; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "open_stub" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "open_stub" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::Auto::open_stub((std::string const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), swig_types[4], 0x1 | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_brass_open__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::Database result; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "brass_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "brass_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::Brass::open((std::string const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), swig_types[4], 0x1 | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_brass_open__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int arg3 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + Xapian::WritableDatabase result; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "brass_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "brass_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "brass_open" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "brass_open" "', argument " "3"" of type '" "int""'"); goto fail; } while(0); + } + arg3 = static_cast< int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::Brass::open((std::string const &)*arg1,arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), swig_types[66], 0x1 | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_brass_open__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + Xapian::WritableDatabase result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "brass_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "brass_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "brass_open" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::Brass::open((std::string const &)*arg1,arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), swig_types[66], 0x1 | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_brass_open(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"brass_open",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_brass_open__SWIG_0(self, argc, argv); + } + if (argc == 2) { + return _wrap_brass_open__SWIG_2(self, argc, argv); + } + if (argc == 3) { + return _wrap_brass_open__SWIG_1(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'brass_open'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::Brass::open(std::string const &)\n" + " Xapian::Brass::open(std::string const &,int,int)\n" + " Xapian::Brass::open(std::string const &,int)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_chert_open__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::Database result; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "chert_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "chert_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::Chert::open((std::string const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), swig_types[4], 0x1 | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_chert_open__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int arg3 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + Xapian::WritableDatabase result; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "chert_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "chert_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "chert_open" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "chert_open" "', argument " "3"" of type '" "int""'"); goto fail; } while(0); + } + arg3 = static_cast< int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::Chert::open((std::string const &)*arg1,arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), swig_types[66], 0x1 | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_chert_open__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + Xapian::WritableDatabase result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "chert_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "chert_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "chert_open" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::Chert::open((std::string const &)*arg1,arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), swig_types[66], 0x1 | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_chert_open(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"chert_open",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_chert_open__SWIG_0(self, argc, argv); + } + if (argc == 2) { + return _wrap_chert_open__SWIG_2(self, argc, argv); + } + if (argc == 3) { + return _wrap_chert_open__SWIG_1(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'chert_open'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::Chert::open(std::string const &)\n" + " Xapian::Chert::open(std::string const &,int,int)\n" + " Xapian::Chert::open(std::string const &,int)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_flint_open__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::Database result; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "flint_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "flint_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::Flint::open((std::string const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), swig_types[4], 0x1 | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_flint_open__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int arg3 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + Xapian::WritableDatabase result; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "flint_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "flint_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "flint_open" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "flint_open" "', argument " "3"" of type '" "int""'"); goto fail; } while(0); + } + arg3 = static_cast< int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::Flint::open((std::string const &)*arg1,arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), swig_types[66], 0x1 | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_flint_open__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int arg2 ; + int res1 = ((0)) ; + int val2 ; + int ecode2 = 0 ; + Xapian::WritableDatabase result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "flint_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "flint_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "flint_open" "', argument " "2"" of type '" "int""'"); goto fail; } while(0); + } + arg2 = static_cast< int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::Flint::open((std::string const &)*arg1,arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), swig_types[66], 0x1 | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_flint_open(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"flint_open",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_flint_open__SWIG_0(self, argc, argv); + } + if (argc == 2) { + return _wrap_flint_open__SWIG_2(self, argc, argv); + } + if (argc == 3) { + return _wrap_flint_open__SWIG_1(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'flint_open'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::Flint::open(std::string const &)\n" + " Xapian::Flint::open(std::string const &,int,int)\n" + " Xapian::Flint::open(std::string const &,int)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_inmemory_open(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::WritableDatabase result; + if (!SWIG_Python_UnpackTuple(args,"inmemory_open",0,0,0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::InMemory::open(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), swig_types[66], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_remote_open__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + unsigned int arg2 ; + Xapian::timeout arg3 ; + Xapian::timeout arg4 ; + int res1 = ((0)) ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + unsigned int val4 ; + int ecode4 = 0 ; + Xapian::Database result; + if ((nobjs < 4) || (nobjs > 4)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "remote_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "remote_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "remote_open" "', argument " "2"" of type '" "unsigned int""'"); goto fail; } while(0); + } + arg2 = static_cast< unsigned int >(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "remote_open" "', argument " "3"" of type '" "Xapian::timeout""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::timeout >(val3); + ecode4 = SWIG_AsVal_unsigned_SS_int(swig_obj[3], &val4); + if (!(ecode4 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode4 != (-1)) ? ecode4 : -5)), "in method '" "remote_open" "', argument " "4"" of type '" "Xapian::timeout""'"); goto fail; } while(0); + } + arg4 = static_cast< Xapian::timeout >(val4); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::Remote::open((std::string const &)*arg1,arg2,arg3,arg4); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), swig_types[4], 0x1 | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_remote_open__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + unsigned int arg2 ; + Xapian::timeout arg3 ; + int res1 = ((0)) ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + Xapian::Database result; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "remote_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "remote_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "remote_open" "', argument " "2"" of type '" "unsigned int""'"); goto fail; } while(0); + } + arg2 = static_cast< unsigned int >(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "remote_open" "', argument " "3"" of type '" "Xapian::timeout""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::timeout >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::Remote::open((std::string const &)*arg1,arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), swig_types[4], 0x1 | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_remote_open__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + unsigned int arg2 ; + int res1 = ((0)) ; + unsigned int val2 ; + int ecode2 = 0 ; + Xapian::Database result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "remote_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "remote_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "remote_open" "', argument " "2"" of type '" "unsigned int""'"); goto fail; } while(0); + } + arg2 = static_cast< unsigned int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::Remote::open((std::string const &)*arg1,arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), swig_types[4], 0x1 | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_remote_open_writable__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + unsigned int arg2 ; + Xapian::timeout arg3 ; + Xapian::timeout arg4 ; + int res1 = ((0)) ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + unsigned int val4 ; + int ecode4 = 0 ; + Xapian::WritableDatabase result; + if ((nobjs < 4) || (nobjs > 4)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "remote_open_writable" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "remote_open_writable" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "remote_open_writable" "', argument " "2"" of type '" "unsigned int""'"); goto fail; } while(0); + } + arg2 = static_cast< unsigned int >(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "remote_open_writable" "', argument " "3"" of type '" "Xapian::timeout""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::timeout >(val3); + ecode4 = SWIG_AsVal_unsigned_SS_int(swig_obj[3], &val4); + if (!(ecode4 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode4 != (-1)) ? ecode4 : -5)), "in method '" "remote_open_writable" "', argument " "4"" of type '" "Xapian::timeout""'"); goto fail; } while(0); + } + arg4 = static_cast< Xapian::timeout >(val4); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2,arg3,arg4); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), swig_types[66], 0x1 | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_remote_open_writable__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + unsigned int arg2 ; + Xapian::timeout arg3 ; + int res1 = ((0)) ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + Xapian::WritableDatabase result; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "remote_open_writable" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "remote_open_writable" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "remote_open_writable" "', argument " "2"" of type '" "unsigned int""'"); goto fail; } while(0); + } + arg2 = static_cast< unsigned int >(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "remote_open_writable" "', argument " "3"" of type '" "Xapian::timeout""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::timeout >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), swig_types[66], 0x1 | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_remote_open_writable__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + unsigned int arg2 ; + int res1 = ((0)) ; + unsigned int val2 ; + int ecode2 = 0 ; + Xapian::WritableDatabase result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "remote_open_writable" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "remote_open_writable" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "remote_open_writable" "', argument " "2"" of type '" "unsigned int""'"); goto fail; } while(0); + } + arg2 = static_cast< unsigned int >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), swig_types[66], 0x1 | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_remote_open__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + Xapian::timeout arg3 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + unsigned int val3 ; + int ecode3 = 0 ; + Xapian::Database result; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "remote_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "remote_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "remote_open" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "remote_open" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "remote_open" "', argument " "3"" of type '" "Xapian::timeout""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::timeout >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::Remote::open((std::string const &)*arg1,(std::string const &)*arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), swig_types[4], 0x1 | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_remote_open__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + Xapian::Database result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "remote_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "remote_open" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "remote_open" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "remote_open" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::Remote::open((std::string const &)*arg1,(std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), swig_types[4], 0x1 | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_remote_open(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + if (!(argc = SWIG_Python_UnpackTuple(args,"remote_open",0,4,argv))) goto fail; + --argc; + if (argc == 2) { + int _v = 0; + { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_1; + return _wrap_remote_open__SWIG_2(self, argc, argv); + } +check_1: + if (argc == 2) { + return _wrap_remote_open__SWIG_4(self, argc, argv); + } + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_3; + return _wrap_remote_open__SWIG_1(self, argc, argv); + } +check_3: + if (argc == 3) { + return _wrap_remote_open__SWIG_3(self, argc, argv); + } + if (argc == 4) { + return _wrap_remote_open__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'remote_open'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::Remote::open(std::string const &,unsigned int,Xapian::timeout,Xapian::timeout)\n" + " Xapian::Remote::open(std::string const &,unsigned int,Xapian::timeout)\n" + " Xapian::Remote::open(std::string const &,unsigned int)\n" + " Xapian::Remote::open(std::string const &,std::string const &,Xapian::timeout)\n" + " Xapian::Remote::open(std::string const &,std::string const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_remote_open_writable__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + Xapian::timeout arg3 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + unsigned int val3 ; + int ecode3 = 0 ; + Xapian::WritableDatabase result; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "remote_open_writable" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "remote_open_writable" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "remote_open_writable" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "remote_open_writable" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "remote_open_writable" "', argument " "3"" of type '" "Xapian::timeout""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::timeout >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::Remote::open_writable((std::string const &)*arg1,(std::string const &)*arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), swig_types[66], 0x1 | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_remote_open_writable__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + std::string *arg2 = 0 ; + int res1 = ((0)) ; + int res2 = ((0)) ; + Xapian::WritableDatabase result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "remote_open_writable" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "remote_open_writable" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "remote_open_writable" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "remote_open_writable" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::Remote::open_writable((std::string const &)*arg1,(std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), swig_types[66], 0x1 | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_remote_open_writable(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + if (!(argc = SWIG_Python_UnpackTuple(args,"remote_open_writable",0,4,argv))) goto fail; + --argc; + if (argc == 2) { + int _v = 0; + { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_1; + return _wrap_remote_open_writable__SWIG_2(self, argc, argv); + } +check_1: + if (argc == 2) { + return _wrap_remote_open_writable__SWIG_4(self, argc, argv); + } + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_3; + return _wrap_remote_open_writable__SWIG_1(self, argc, argv); + } +check_3: + if (argc == 3) { + return _wrap_remote_open_writable__SWIG_3(self, argc, argv); + } + if (argc == 4) { + return _wrap_remote_open_writable__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'remote_open_writable'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::Remote::open_writable(std::string const &,unsigned int,Xapian::timeout,Xapian::timeout)\n" + " Xapian::Remote::open_writable(std::string const &,unsigned int,Xapian::timeout)\n" + " Xapian::Remote::open_writable(std::string const &,unsigned int)\n" + " Xapian::Remote::open_writable(std::string const &,std::string const &,Xapian::timeout)\n" + " Xapian::Remote::open_writable(std::string const &,std::string const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Query__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Query *arg1 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Xapian::Query *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[40], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query const &""'"); goto fail; } while(0); + } + if (!argp1) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query const &""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Query * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Query *)new Xapian::Query((Xapian::Query const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[40], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Query__SWIG_1(PyObject *, int nobjs, PyObject **) { + PyObject *resultobj = 0; + Xapian::Query *result = 0 ; + if ((nobjs < 0) || (nobjs > 0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Query *)new Xapian::Query(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[40], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_Query(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Query *arg1 = (Xapian::Query *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[40], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_Query" "', argument " "1"" of type '" "Xapian::Query *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Query * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Query__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + Xapian::termcount arg2 ; + Xapian::termpos arg3 ; + int res1 = ((0)) ; + unsigned int val2 ; + int ecode2 = 0 ; + unsigned int val3 ; + int ecode3 = 0 ; + Xapian::Query *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_Query" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_Query" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::termcount""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::termcount >(val2); + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_Query" "', argument " "3"" of type '" "Xapian::termpos""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::termpos >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Query *)new Xapian::Query((std::string const &)*arg1,arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[40], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Query__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + Xapian::termcount arg2 ; + int res1 = ((0)) ; + unsigned int val2 ; + int ecode2 = 0 ; + Xapian::Query *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_Query" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_Query" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::termcount""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::termcount >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Query *)new Xapian::Query((std::string const &)*arg1,arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[40], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Query__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::Query *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_Query" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_Query" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Query *)new Xapian::Query((std::string const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[40], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Query__SWIG_5(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Query::op arg1 ; + Xapian::Query *arg2 = 0 ; + Xapian::Query *arg3 = 0 ; + int val1 ; + int ecode1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + Xapian::Query *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query::op""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::Query::op >(val1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[40], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::Query const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::Query const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::Query * >(argp2); + res3 = SWIG_Python_ConvertPtrAndOwn(swig_obj[2], &argp3, swig_types[40], 0 | 0, 0); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "new_Query" "', argument " "3"" of type '" "Xapian::Query const &""'"); goto fail; } while(0); + } + if (!argp3) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_Query" "', argument " "3"" of type '" "Xapian::Query const &""'"); goto fail; } while(0); + } + arg3 = reinterpret_cast< Xapian::Query * >(argp3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Query *)new Xapian::Query(arg1,(Xapian::Query const &)*arg2,(Xapian::Query const &)*arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[40], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Query__SWIG_6(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Query::op arg1 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + int val1 ; + int ecode1 = 0 ; + int res2 = ((0)) ; + int res3 = ((0)) ; + Xapian::Query *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query::op""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::Query::op >(val1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_Query" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_Query" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_anystring_as_ptr(&(swig_obj[2]), &ptr); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "new_Query" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_Query" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg3 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Query *)new Xapian::Query(arg1,(std::string const &)*arg2,(std::string const &)*arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[40], ((0x1 << 1) | 0x1) | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Query__SWIG_9(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Query::op arg1 ; + Xapian::Query arg2 ; + double arg3 ; + int val1 ; + int ecode1 = 0 ; + void *argp2 ; + int res2 = 0 ; + double val3 ; + int ecode3 = 0 ; + Xapian::Query *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query::op""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::Query::op >(val1); + { + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[40], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::Query""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::Query""'"); goto fail; } while(0); + } else { + Xapian::Query * temp = reinterpret_cast< Xapian::Query * >(argp2); + arg2 = *temp; + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete temp; + } + } + ecode3 = SWIG_AsVal_double(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_Query" "', argument " "3"" of type '" "double""'"); goto fail; } while(0); + } + arg3 = static_cast< double >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Query *)new Xapian::Query(arg1,arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[40], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Query__SWIG_10(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Query::op arg1 ; + Xapian::valueno arg2 ; + std::string *arg3 = 0 ; + std::string *arg4 = 0 ; + int val1 ; + int ecode1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int res3 = ((0)) ; + int res4 = ((0)) ; + Xapian::Query *result = 0 ; + if ((nobjs < 4) || (nobjs > 4)) goto fail; + ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query::op""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::Query::op >(val1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::valueno >(val2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_anystring_as_ptr(&(swig_obj[2]), &ptr); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "new_Query" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_Query" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg3 = ptr; + } + { + std::string *ptr = (std::string *)0; + res4 = SWIG_anystring_as_ptr(&(swig_obj[3]), &ptr); + if (!(res4 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res4 != (-1)) ? res4 : -5)), "in method '" "new_Query" "', argument " "4"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_Query" "', argument " "4"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg4 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Query *)new Xapian::Query(arg1,arg2,(std::string const &)*arg3,(std::string const &)*arg4); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[40], ((0x1 << 1) | 0x1) | 0); + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + if (((res4 >= 0) && (res4 & ((1 << 8) << 1)))) delete arg4; + return resultobj; +fail: + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + if (((res4 >= 0) && (res4 & ((1 << 8) << 1)))) delete arg4; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Query__SWIG_11(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Query::op arg1 ; + Xapian::valueno arg2 ; + std::string *arg3 = 0 ; + int val1 ; + int ecode1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int res3 = ((0)) ; + Xapian::Query *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query::op""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::Query::op >(val1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::valueno >(val2); + { + std::string *ptr = (std::string *)0; + res3 = SWIG_anystring_as_ptr(&(swig_obj[2]), &ptr); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "new_Query" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_Query" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg3 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Query *)new Xapian::Query(arg1,arg2,(std::string const &)*arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[40], ((0x1 << 1) | 0x1) | 0); + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + return resultobj; +fail: + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Query__SWIG_12(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Xapian::Query *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[39], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::PostingSource *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Query *)new Xapian::Query(arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[40], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Query_get_length(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Query *arg1 = (Xapian::Query *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::termcount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[40], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Query_get_length" "', argument " "1"" of type '" "Xapian::Query const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Query * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::termcount)((Xapian::Query const *)arg1)->get_length(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Query_get_terms_begin(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Query *arg1 = (Xapian::Query *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::TermIterator result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[40], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Query_get_terms_begin" "', argument " "1"" of type '" "Xapian::Query const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Query * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Query const *)arg1)->get_terms_begin(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Query_get_terms_end(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Query *arg1 = (Xapian::Query *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::TermIterator result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[40], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Query_get_terms_end" "', argument " "1"" of type '" "Xapian::Query const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Query * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Query const *)arg1)->get_terms_end(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Query_empty(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Query *arg1 = (Xapian::Query *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + bool result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[40], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Query_empty" "', argument " "1"" of type '" "Xapian::Query const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Query * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (bool)((Xapian::Query const *)arg1)->empty(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Query_serialise(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Query *arg1 = (Xapian::Query *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[40], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Query_serialise" "', argument " "1"" of type '" "Xapian::Query const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Query * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Query const *)arg1)->serialise(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Query_unserialise__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::Query result; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Query_unserialise" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Query_unserialise" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::Query::unserialise((std::string const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), swig_types[40], 0x1 | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Query_unserialise__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + Xapian::Registry *arg2 = 0 ; + int res1 = ((0)) ; + void *argp2 = 0 ; + int res2 = 0 ; + Xapian::Query result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Query_unserialise" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Query_unserialise" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[45], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Query_unserialise" "', argument " "2"" of type '" "Xapian::Registry const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Query_unserialise" "', argument " "2"" of type '" "Xapian::Registry const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::Registry * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::Query::unserialise((std::string const &)*arg1,(Xapian::Registry const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), swig_types[40], 0x1 | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Query_unserialise(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + if (!(argc = SWIG_Python_UnpackTuple(args,"Query_unserialise",0,2,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_Query_unserialise__SWIG_0(self, argc, argv); + } + if (argc == 2) { + return _wrap_Query_unserialise__SWIG_1(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Query_unserialise'.\n" + " Possible C/C++ prototypes are:\n" + " unserialise(std::string const &)\n" + " Xapian::Query::unserialise(std::string const &,Xapian::Registry const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Query___str__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Query *arg1 = (Xapian::Query *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[40], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Query___str__" "', argument " "1"" of type '" "Xapian::Query const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Query * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Query const *)arg1)->get_description(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Query__SWIG_13(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Query::op arg1 ; + std::vector< Xapian::Query > *arg2 = 0 ; + Xapian::termcount arg3 ; + int val1 ; + int ecode1 = 0 ; + vector< Xapian::Query > v2 ; + unsigned int val3 ; + int ecode3 = 0 ; + Xapian::Query *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query::op""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::Query::op >(val1); + { + PyObject * fastseq = PySequence_Fast(swig_obj[1], "expected sequence of strings or queries"); + if (!fastseq) { + goto fail; + } + int numitems = (((((((PyObject*)(fastseq))->ob_type))->tp_flags & ((1L<<25))) != 0) ? (((PyVarObject*)(fastseq))->ob_size) : (((PyVarObject*)(fastseq))->ob_size)); + v2.reserve(numitems); + for (int i = 0; i < numitems; ++i) { + PyObject *obj = (((((((PyObject*)(fastseq))->ob_type))->tp_flags & ((1L<<25))) != 0) ? (((PyListObject *)(fastseq))->ob_item[i]) : (((PyTupleObject *)(fastseq))->ob_item[i])); + PyObject *decrefme = __null; + if (((((((PyObject*)(obj))->ob_type))->tp_flags & ((1L<<28))) != 0)) { + PyObject *strobj = PyUnicodeUCS4_EncodeUTF8((((PyUnicodeObject *)(obj))->str), (((PyUnicodeObject *)(obj))->length), "ignore"); + if (!strobj) goto fail; + obj = strobj; + decrefme = strobj; + } + if (((((((PyObject*)(obj))->ob_type))->tp_flags & ((1L<<27))) != 0)) + { + char * p; + Py_ssize_t len; + (void)PyString_AsStringAndSize(obj, &p, &len); + v2.push_back(Xapian::Query(string(p, len))); + } else { + Xapian::Query *subqp = Xapian::get_py_query(obj); + if (!subqp) { + PyErr_SetString(PyExc_TypeError, "expected string or query"); + if ((decrefme) == __null) ; else if ( --((PyObject*)(decrefme))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(decrefme)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(decrefme)))); + goto fail; + } + v2.push_back(*subqp); + } + if ((decrefme) == __null) ; else if ( --((PyObject*)(decrefme))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(decrefme)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(decrefme)))); + } + arg2 = &v2; + if ( --((PyObject*)(fastseq))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(fastseq)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(fastseq)))); + } + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_Query" "', argument " "3"" of type '" "Xapian::termcount""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::termcount >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Query *)new_Xapian_Query__SWIG_13(arg1,(std::vector< Xapian::Query > const &)*arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[40], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Query__SWIG_14(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::Query::op arg1 ; + std::vector< Xapian::Query > *arg2 = 0 ; + int val1 ; + int ecode1 = 0 ; + vector< Xapian::Query > v2 ; + Xapian::Query *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + ecode1 = SWIG_AsVal_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query::op""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::Query::op >(val1); + { + PyObject * fastseq = PySequence_Fast(swig_obj[1], "expected sequence of strings or queries"); + if (!fastseq) { + goto fail; + } + int numitems = (((((((PyObject*)(fastseq))->ob_type))->tp_flags & ((1L<<25))) != 0) ? (((PyVarObject*)(fastseq))->ob_size) : (((PyVarObject*)(fastseq))->ob_size)); + v2.reserve(numitems); + for (int i = 0; i < numitems; ++i) { + PyObject *obj = (((((((PyObject*)(fastseq))->ob_type))->tp_flags & ((1L<<25))) != 0) ? (((PyListObject *)(fastseq))->ob_item[i]) : (((PyTupleObject *)(fastseq))->ob_item[i])); + PyObject *decrefme = __null; + if (((((((PyObject*)(obj))->ob_type))->tp_flags & ((1L<<28))) != 0)) { + PyObject *strobj = PyUnicodeUCS4_EncodeUTF8((((PyUnicodeObject *)(obj))->str), (((PyUnicodeObject *)(obj))->length), "ignore"); + if (!strobj) goto fail; + obj = strobj; + decrefme = strobj; + } + if (((((((PyObject*)(obj))->ob_type))->tp_flags & ((1L<<27))) != 0)) + { + char * p; + Py_ssize_t len; + (void)PyString_AsStringAndSize(obj, &p, &len); + v2.push_back(Xapian::Query(string(p, len))); + } else { + Xapian::Query *subqp = Xapian::get_py_query(obj); + if (!subqp) { + PyErr_SetString(PyExc_TypeError, "expected string or query"); + if ((decrefme) == __null) ; else if ( --((PyObject*)(decrefme))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(decrefme)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(decrefme)))); + goto fail; + } + v2.push_back(*subqp); + } + if ((decrefme) == __null) ; else if ( --((PyObject*)(decrefme))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(decrefme)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(decrefme)))); + } + arg2 = &v2; + if ( --((PyObject*)(fastseq))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(fastseq)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(fastseq)))); + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Query *)new_Xapian_Query__SWIG_13(arg1,(std::vector< Xapian::Query > const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[40], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Query(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_Query",0,4,argv))) goto fail; + --argc; + if (argc == 0) { + return _wrap_new_Query__SWIG_1(self, argc, argv); + } + if (argc == 1) { + int _v = 0; + { + int res = SWIG_Python_ConvertPtrAndOwn(argv[0], 0, swig_types[40], 0, 0); + _v = ((res >= 0) ? 1 : 0); + } + if (!_v) goto check_2; + return _wrap_new_Query__SWIG_0(self, argc, argv); + } +check_2: + if (argc == 1) { + int _v = 0; + { + void *vptr = 0; + int res = SWIG_Python_ConvertPtrAndOwn(argv[0], &vptr, swig_types[39], 0, 0); + _v = ((res >= 0) ? 1 : 0); + } + if (!_v) goto check_3; + return _wrap_new_Query__SWIG_12(self, argc, argv); + } +check_3: + if (argc == 1) { + return _wrap_new_Query__SWIG_4(self, argc, argv); + } + if (argc == 2) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[0], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_5; + { + { + if (!PySequence_Check(argv[1])) { + _v = 0; + } else { + _v = 1; + PyObject * fastseq = PySequence_Fast(argv[1], "expected sequence of strings or queries"); + if (!fastseq) { + goto fail; + } + int numitems = (((((((PyObject*)(fastseq))->ob_type))->tp_flags & ((1L<<25))) != 0) ? (((PyVarObject*)(fastseq))->ob_size) : (((PyVarObject*)(fastseq))->ob_size)); + for (int i = 0; i < numitems; ++i) { + PyObject *obj = (((((((PyObject*)(fastseq))->ob_type))->tp_flags & ((1L<<25))) != 0) ? (((PyListObject *)(fastseq))->ob_item[i]) : (((PyTupleObject *)(fastseq))->ob_item[i])); + if (!((((((PyObject*)(obj))->ob_type))->tp_flags & ((1L<<28))) != 0) && + !((((((PyObject*)(obj))->ob_type))->tp_flags & ((1L<<27))) != 0) && + !Xapian::get_py_query(obj)) { + _v = 0; + break; + } + } + if ( --((PyObject*)(fastseq))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(fastseq)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(fastseq)))); + } + } + } + if (!_v) goto check_5; + return _wrap_new_Query__SWIG_14(self, argc, argv); + } +check_5: + if (argc == 2) { + return _wrap_new_Query__SWIG_3(self, argc, argv); + } + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[0], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_7; + { + int res = SWIG_Python_ConvertPtrAndOwn(argv[1], 0, swig_types[40], 0, 0); + _v = ((res >= 0) ? 1 : 0); + } + if (!_v) goto check_7; + { + int res = SWIG_Python_ConvertPtrAndOwn(argv[2], 0, swig_types[40], 0, 0); + _v = ((res >= 0) ? 1 : 0); + } + if (!_v) goto check_7; + return _wrap_new_Query__SWIG_5(self, argc, argv); + } +check_7: + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[0], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_8; + { + int res = SWIG_Python_ConvertPtrAndOwn(argv[1], 0, swig_types[40], 0, 0); + _v = ((res >= 0) ? 1 : 0); + } + if (!_v) goto check_8; + { + { + int res = SWIG_AsVal_double(argv[2], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_8; + return _wrap_new_Query__SWIG_9(self, argc, argv); + } +check_8: + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[0], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_9; + { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[1], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_9; + { + int res = SWIG_anystring_as_ptr(&(argv[2]), (std::string**)(0)); + _v = ((res >= 0) ? 1 : 0); + } + if (!_v) goto check_9; + return _wrap_new_Query__SWIG_11(self, argc, argv); + } +check_9: + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[0], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_10; + { + { + if (!PySequence_Check(argv[1])) { + _v = 0; + } else { + _v = 1; + PyObject * fastseq = PySequence_Fast(argv[1], "expected sequence of strings or queries"); + if (!fastseq) { + goto fail; + } + int numitems = (((((((PyObject*)(fastseq))->ob_type))->tp_flags & ((1L<<25))) != 0) ? (((PyVarObject*)(fastseq))->ob_size) : (((PyVarObject*)(fastseq))->ob_size)); + for (int i = 0; i < numitems; ++i) { + PyObject *obj = (((((((PyObject*)(fastseq))->ob_type))->tp_flags & ((1L<<25))) != 0) ? (((PyListObject *)(fastseq))->ob_item[i]) : (((PyTupleObject *)(fastseq))->ob_item[i])); + if (!((((((PyObject*)(obj))->ob_type))->tp_flags & ((1L<<28))) != 0) && + !((((((PyObject*)(obj))->ob_type))->tp_flags & ((1L<<27))) != 0) && + !Xapian::get_py_query(obj)) { + _v = 0; + break; + } + } + if ( --((PyObject*)(fastseq))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(fastseq)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(fastseq)))); + } + } + } + if (!_v) goto check_10; + { + { + int res = SWIG_AsVal_unsigned_SS_int(argv[2], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_10; + return _wrap_new_Query__SWIG_13(self, argc, argv); + } +check_10: + if (argc == 3) { + int _v = 0; + { + { + int res = SWIG_AsVal_int(argv[0], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_11; + { + int res = SWIG_anystring_as_ptr(&(argv[1]), (std::string**)(0)); + _v = ((res >= 0) ? 1 : 0); + } + if (!_v) goto check_11; + { + int res = SWIG_anystring_as_ptr(&(argv[2]), (std::string**)(0)); + _v = ((res >= 0) ? 1 : 0); + } + if (!_v) goto check_11; + return _wrap_new_Query__SWIG_6(self, argc, argv); + } +check_11: + if (argc == 3) { + return _wrap_new_Query__SWIG_2(self, argc, argv); + } + if (argc == 4) { + return _wrap_new_Query__SWIG_10(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Query'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::Query(Xapian::Query const &)\n" + " Xapian::Query()\n" + " Xapian::Query(std::string const &,Xapian::termcount,Xapian::termpos)\n" + " Xapian::Query(std::string const &,Xapian::termcount)\n" + " Xapian::Query(std::string const &)\n" + " Xapian::Query(Xapian::Query::op,Xapian::Query const &,Xapian::Query const &)\n" + " Xapian::Query(Xapian::Query::op,std::string const &,std::string const &)\n" + " Xapian::Query(Xapian::Query::op,Xapian::Query,double)\n" + " Xapian::Query(Xapian::Query::op,Xapian::valueno,std::string const &,std::string const &)\n" + " Xapian::Query(Xapian::Query::op,Xapian::valueno,std::string const &)\n" + " Xapian::Query(Xapian::PostingSource *)\n" + " Xapian::Query(Xapian::Query::op,std::vector< Xapian::Query > const &,Xapian::termcount)\n" + " Xapian::Query(Xapian::Query::op,std::vector< Xapian::Query > const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *Query_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[40], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *Query_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_Stopper___call__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + Swig::Director *director = 0; + bool upcall = false; + bool result; + if (!SWIG_Python_UnpackTuple(args,"Stopper___call__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[52], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Stopper___call__" "', argument " "1"" of type '" "Xapian::Stopper const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Stopper * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Stopper___call__" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Stopper___call__" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + Swig::DirectorPureVirtualException::raise("Xapian::Stopper::operator ()"); + } else { + result = (bool)((Xapian::Stopper const *)arg1)->operator ()((std::string const &)*arg2); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_From_bool(static_cast< bool >(result)); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_Stopper(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[52], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_Stopper" "', argument " "1"" of type '" "Xapian::Stopper *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Stopper * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Stopper___str__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Swig::Director *director = 0; + bool upcall = false; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[52], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Stopper___str__" "', argument " "1"" of type '" "Xapian::Stopper const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Stopper * >(argp1); + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + result = ((Xapian::Stopper const *)arg1)->Xapian::Stopper::get_description(); + } else { + result = ((Xapian::Stopper const *)arg1)->get_description(); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Stopper(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + PyObject *swig_obj[1] ; + Xapian::Stopper *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + arg1 = swig_obj[0]; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + if ( arg1 != (&_Py_NoneStruct) ) { + result = (Xapian::Stopper *)new SwigDirector_Stopper(arg1); + } else { + SWIG_Python_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); + goto fail; + } + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[52], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_disown_Stopper(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[52], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "disown_Stopper" "', argument " "1"" of type '" "Xapian::Stopper *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Stopper * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *Stopper_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[52], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *Stopper_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_SimpleStopper(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::SimpleStopper *result = 0 ; + if (!SWIG_Python_UnpackTuple(args,"new_SimpleStopper",0,0,0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::SimpleStopper *)new Xapian::SimpleStopper(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[48], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_SimpleStopper_add(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"SimpleStopper_add",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[48], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "SimpleStopper_add" "', argument " "1"" of type '" "Xapian::SimpleStopper *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::SimpleStopper * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "SimpleStopper_add" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "SimpleStopper_add" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->add((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_SimpleStopper(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[48], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_SimpleStopper" "', argument " "1"" of type '" "Xapian::SimpleStopper *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::SimpleStopper * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *SimpleStopper_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[48], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *SimpleStopper_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_ValueRangeProcessor(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueRangeProcessor *arg1 = (Xapian::ValueRangeProcessor *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[62], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_ValueRangeProcessor" "', argument " "1"" of type '" "Xapian::ValueRangeProcessor *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueRangeProcessor * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ValueRangeProcessor___call__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueRangeProcessor *arg1 = (Xapian::ValueRangeProcessor *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + std::string temp2 ; + std::string temp3 ; + PyObject *swig_obj[3] ; + Swig::Director *director = 0; + bool upcall = false; + Xapian::valueno result; + if (!SWIG_Python_UnpackTuple(args,"ValueRangeProcessor___call__",3,3,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[62], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ValueRangeProcessor___call__" "', argument " "1"" of type '" "Xapian::ValueRangeProcessor *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueRangeProcessor * >(argp1); + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(swig_obj[1], &ptr); + if (!(res >= 0) || !ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType((((ptr ? res : -5) != (-1)) ? (ptr ? res : -5) : -5)), "in method '" "ValueRangeProcessor___call__" "', argument " "2"" of type '" "std::string &""'"); goto fail; } while(0); + } + temp2 = *ptr; + arg2 = &temp2; + if (((res >= 0) && (res & ((1 << 8) << 1)))) delete ptr; + } + { + std::string *ptr = (std::string *)0; + int res = SWIG_AsPtr_std_string(swig_obj[2], &ptr); + if (!(res >= 0) || !ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType((((ptr ? res : -5) != (-1)) ? (ptr ? res : -5) : -5)), "in method '" "ValueRangeProcessor___call__" "', argument " "3"" of type '" "std::string &""'"); goto fail; } while(0); + } + temp3 = *ptr; + arg3 = &temp3; + if (((res >= 0) && (res & ((1 << 8) << 1)))) delete ptr; + } + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + Swig::DirectorPureVirtualException::raise("Xapian::ValueRangeProcessor::operator ()"); + } else { + result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + { + PyObject * str; + PyObject * newresult; + newresult = PyTuple_New(3); + if (newresult == 0) { + if ( --((PyObject*)(resultobj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(resultobj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(resultobj)))); + resultobj = __null; + goto fail; + } + (((PyTupleObject *)(newresult))->ob_item[0] = resultobj); + resultobj = newresult; + str = PyString_FromStringAndSize(arg2->data(), arg2->size()); + if (str == 0) { + if ( --((PyObject*)(resultobj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(resultobj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(resultobj)))); + resultobj = __null; + goto fail; + } + (((PyTupleObject *)(resultobj))->ob_item[1] = str); + str = PyString_FromStringAndSize(arg3->data(), arg3->size()); + if (str == 0) { + if ( --((PyObject*)(resultobj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(resultobj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(resultobj)))); + resultobj = __null; + goto fail; + } + (((PyTupleObject *)(resultobj))->ob_item[2] = str); + } + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_ValueRangeProcessor(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + PyObject *swig_obj[1] ; + Xapian::ValueRangeProcessor *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + arg1 = swig_obj[0]; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + if ( arg1 != (&_Py_NoneStruct) ) { + result = (Xapian::ValueRangeProcessor *)new SwigDirector_ValueRangeProcessor(arg1); + } else { + SWIG_Python_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); + goto fail; + } + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[62], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_disown_ValueRangeProcessor(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueRangeProcessor *arg1 = (Xapian::ValueRangeProcessor *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[62], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "disown_ValueRangeProcessor" "', argument " "1"" of type '" "Xapian::ValueRangeProcessor *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueRangeProcessor * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *ValueRangeProcessor_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[62], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *ValueRangeProcessor_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_StringValueRangeProcessor__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::valueno arg1 ; + unsigned int val1 ; + int ecode1 = 0 ; + Xapian::StringValueRangeProcessor *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_StringValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::valueno >(val1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::StringValueRangeProcessor *)new Xapian::StringValueRangeProcessor(arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[53], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_StringValueRangeProcessor__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::valueno arg1 ; + std::string *arg2 = 0 ; + bool arg3 ; + unsigned int val1 ; + int ecode1 = 0 ; + int res2 = ((0)) ; + bool val3 ; + int ecode3 = 0 ; + Xapian::StringValueRangeProcessor *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_StringValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::valueno >(val1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_StringValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_StringValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_StringValueRangeProcessor" "', argument " "3"" of type '" "bool""'"); goto fail; } while(0); + } + arg3 = static_cast< bool >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::StringValueRangeProcessor *)new Xapian::StringValueRangeProcessor(arg1,(std::string const &)*arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[53], ((0x1 << 1) | 0x1) | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_StringValueRangeProcessor__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::valueno arg1 ; + std::string *arg2 = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + int res2 = ((0)) ; + Xapian::StringValueRangeProcessor *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_StringValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::valueno >(val1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_StringValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_StringValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::StringValueRangeProcessor *)new Xapian::StringValueRangeProcessor(arg1,(std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[53], ((0x1 << 1) | 0x1) | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_StringValueRangeProcessor(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_StringValueRangeProcessor",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_new_StringValueRangeProcessor__SWIG_0(self, argc, argv); + } + if (argc == 2) { + return _wrap_new_StringValueRangeProcessor__SWIG_2(self, argc, argv); + } + if (argc == 3) { + return _wrap_new_StringValueRangeProcessor__SWIG_1(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_StringValueRangeProcessor'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::StringValueRangeProcessor(Xapian::valueno)\n" + " Xapian::StringValueRangeProcessor(Xapian::valueno,std::string const &,bool)\n" + " Xapian::StringValueRangeProcessor(Xapian::valueno,std::string const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_StringValueRangeProcessor(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::StringValueRangeProcessor *arg1 = (Xapian::StringValueRangeProcessor *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[53], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_StringValueRangeProcessor" "', argument " "1"" of type '" "Xapian::StringValueRangeProcessor *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::StringValueRangeProcessor * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *StringValueRangeProcessor_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[53], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *StringValueRangeProcessor_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DateValueRangeProcessor__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::valueno arg1 ; + bool arg2 ; + int arg3 ; + unsigned int val1 ; + int ecode1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + Xapian::DateValueRangeProcessor *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_DateValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::valueno >(val1); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_DateValueRangeProcessor" "', argument " "2"" of type '" "bool""'"); goto fail; } while(0); + } + arg2 = static_cast< bool >(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_DateValueRangeProcessor" "', argument " "3"" of type '" "int""'"); goto fail; } while(0); + } + arg3 = static_cast< int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[12], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DateValueRangeProcessor__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::valueno arg1 ; + bool arg2 ; + unsigned int val1 ; + int ecode1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + Xapian::DateValueRangeProcessor *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_DateValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::valueno >(val1); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_DateValueRangeProcessor" "', argument " "2"" of type '" "bool""'"); goto fail; } while(0); + } + arg2 = static_cast< bool >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[12], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DateValueRangeProcessor__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::valueno arg1 ; + unsigned int val1 ; + int ecode1 = 0 ; + Xapian::DateValueRangeProcessor *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_DateValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::valueno >(val1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[12], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DateValueRangeProcessor__SWIG_3(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::valueno arg1 ; + std::string *arg2 = 0 ; + bool arg3 ; + bool arg4 ; + int arg5 ; + unsigned int val1 ; + int ecode1 = 0 ; + int res2 = ((0)) ; + bool val3 ; + int ecode3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + Xapian::DateValueRangeProcessor *result = 0 ; + if ((nobjs < 5) || (nobjs > 5)) goto fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_DateValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::valueno >(val1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DateValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DateValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_DateValueRangeProcessor" "', argument " "3"" of type '" "bool""'"); goto fail; } while(0); + } + arg3 = static_cast< bool >(val3); + ecode4 = SWIG_AsVal_bool(swig_obj[3], &val4); + if (!(ecode4 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode4 != (-1)) ? ecode4 : -5)), "in method '" "new_DateValueRangeProcessor" "', argument " "4"" of type '" "bool""'"); goto fail; } while(0); + } + arg4 = static_cast< bool >(val4); + ecode5 = SWIG_AsVal_int(swig_obj[4], &val5); + if (!(ecode5 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode5 != (-1)) ? ecode5 : -5)), "in method '" "new_DateValueRangeProcessor" "', argument " "5"" of type '" "int""'"); goto fail; } while(0); + } + arg5 = static_cast< int >(val5); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2,arg3,arg4,arg5); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[12], ((0x1 << 1) | 0x1) | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DateValueRangeProcessor__SWIG_4(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::valueno arg1 ; + std::string *arg2 = 0 ; + bool arg3 ; + bool arg4 ; + unsigned int val1 ; + int ecode1 = 0 ; + int res2 = ((0)) ; + bool val3 ; + int ecode3 = 0 ; + bool val4 ; + int ecode4 = 0 ; + Xapian::DateValueRangeProcessor *result = 0 ; + if ((nobjs < 4) || (nobjs > 4)) goto fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_DateValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::valueno >(val1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DateValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DateValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_DateValueRangeProcessor" "', argument " "3"" of type '" "bool""'"); goto fail; } while(0); + } + arg3 = static_cast< bool >(val3); + ecode4 = SWIG_AsVal_bool(swig_obj[3], &val4); + if (!(ecode4 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode4 != (-1)) ? ecode4 : -5)), "in method '" "new_DateValueRangeProcessor" "', argument " "4"" of type '" "bool""'"); goto fail; } while(0); + } + arg4 = static_cast< bool >(val4); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2,arg3,arg4); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[12], ((0x1 << 1) | 0x1) | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DateValueRangeProcessor__SWIG_5(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::valueno arg1 ; + std::string *arg2 = 0 ; + bool arg3 ; + unsigned int val1 ; + int ecode1 = 0 ; + int res2 = ((0)) ; + bool val3 ; + int ecode3 = 0 ; + Xapian::DateValueRangeProcessor *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_DateValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::valueno >(val1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DateValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DateValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_DateValueRangeProcessor" "', argument " "3"" of type '" "bool""'"); goto fail; } while(0); + } + arg3 = static_cast< bool >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[12], ((0x1 << 1) | 0x1) | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DateValueRangeProcessor__SWIG_6(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::valueno arg1 ; + std::string *arg2 = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + int res2 = ((0)) ; + Xapian::DateValueRangeProcessor *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_DateValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::valueno >(val1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_DateValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_DateValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[12], ((0x1 << 1) | 0x1) | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_DateValueRangeProcessor(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[6]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_DateValueRangeProcessor",0,5,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_new_DateValueRangeProcessor__SWIG_2(self, argc, argv); + } + if (argc == 2) { + int _v = 0; + { + int res = SWIG_anystring_as_ptr(&(argv[1]), (std::string**)(0)); + _v = ((res >= 0) ? 1 : 0); + } + if (!_v) goto check_2; + return _wrap_new_DateValueRangeProcessor__SWIG_6(self, argc, argv); + } +check_2: + if (argc == 2) { + return _wrap_new_DateValueRangeProcessor__SWIG_1(self, argc, argv); + } + if (argc == 3) { + int _v = 0; + { + int res = SWIG_anystring_as_ptr(&(argv[1]), (std::string**)(0)); + _v = ((res >= 0) ? 1 : 0); + } + if (!_v) goto check_4; + { + { + int res = SWIG_AsVal_bool(argv[2], __null); + _v = ((res >= 0) ? 1 : 0); + } + } + if (!_v) goto check_4; + return _wrap_new_DateValueRangeProcessor__SWIG_5(self, argc, argv); + } +check_4: + if (argc == 3) { + return _wrap_new_DateValueRangeProcessor__SWIG_0(self, argc, argv); + } + if (argc == 4) { + return _wrap_new_DateValueRangeProcessor__SWIG_4(self, argc, argv); + } + if (argc == 5) { + return _wrap_new_DateValueRangeProcessor__SWIG_3(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_DateValueRangeProcessor'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::DateValueRangeProcessor(Xapian::valueno,bool,int)\n" + " Xapian::DateValueRangeProcessor(Xapian::valueno,bool)\n" + " Xapian::DateValueRangeProcessor(Xapian::valueno)\n" + " Xapian::DateValueRangeProcessor(Xapian::valueno,std::string const &,bool,bool,int)\n" + " Xapian::DateValueRangeProcessor(Xapian::valueno,std::string const &,bool,bool)\n" + " Xapian::DateValueRangeProcessor(Xapian::valueno,std::string const &,bool)\n" + " Xapian::DateValueRangeProcessor(Xapian::valueno,std::string const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_DateValueRangeProcessor(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::DateValueRangeProcessor *arg1 = (Xapian::DateValueRangeProcessor *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[12], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_DateValueRangeProcessor" "', argument " "1"" of type '" "Xapian::DateValueRangeProcessor *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::DateValueRangeProcessor * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *DateValueRangeProcessor_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[12], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *DateValueRangeProcessor_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_NumberValueRangeProcessor__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::valueno arg1 ; + unsigned int val1 ; + int ecode1 = 0 ; + Xapian::NumberValueRangeProcessor *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_NumberValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::valueno >(val1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::NumberValueRangeProcessor *)new Xapian::NumberValueRangeProcessor(arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[36], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_NumberValueRangeProcessor__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::valueno arg1 ; + std::string *arg2 = 0 ; + bool arg3 ; + unsigned int val1 ; + int ecode1 = 0 ; + int res2 = ((0)) ; + bool val3 ; + int ecode3 = 0 ; + Xapian::NumberValueRangeProcessor *result = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_NumberValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::valueno >(val1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_NumberValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_NumberValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "new_NumberValueRangeProcessor" "', argument " "3"" of type '" "bool""'"); goto fail; } while(0); + } + arg3 = static_cast< bool >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::NumberValueRangeProcessor *)new Xapian::NumberValueRangeProcessor(arg1,(std::string const &)*arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[36], ((0x1 << 1) | 0x1) | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_NumberValueRangeProcessor__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::valueno arg1 ; + std::string *arg2 = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + int res2 = ((0)) ; + Xapian::NumberValueRangeProcessor *result = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_NumberValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::valueno >(val1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "new_NumberValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_NumberValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::NumberValueRangeProcessor *)new Xapian::NumberValueRangeProcessor(arg1,(std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[36], ((0x1 << 1) | 0x1) | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_NumberValueRangeProcessor(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_NumberValueRangeProcessor",0,3,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_new_NumberValueRangeProcessor__SWIG_0(self, argc, argv); + } + if (argc == 2) { + return _wrap_new_NumberValueRangeProcessor__SWIG_2(self, argc, argv); + } + if (argc == 3) { + return _wrap_new_NumberValueRangeProcessor__SWIG_1(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_NumberValueRangeProcessor'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::NumberValueRangeProcessor(Xapian::valueno)\n" + " Xapian::NumberValueRangeProcessor(Xapian::valueno,std::string const &,bool)\n" + " Xapian::NumberValueRangeProcessor(Xapian::valueno,std::string const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_NumberValueRangeProcessor(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::NumberValueRangeProcessor *arg1 = (Xapian::NumberValueRangeProcessor *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[36], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_NumberValueRangeProcessor" "', argument " "1"" of type '" "Xapian::NumberValueRangeProcessor *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::NumberValueRangeProcessor * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *NumberValueRangeProcessor_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[36], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *NumberValueRangeProcessor_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_QueryParser(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::QueryParser *result = 0 ; + if (!SWIG_Python_UnpackTuple(args,"new_QueryParser",0,0,0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::QueryParser *)new Xapian::QueryParser(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[41], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_QueryParser(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[41], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_QueryParser" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_QueryParser_set_stemmer(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ; + Xapian::Stem *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"QueryParser_set_stemmer",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[41], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "QueryParser_set_stemmer" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[50], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "QueryParser_set_stemmer" "', argument " "2"" of type '" "Xapian::Stem const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "QueryParser_set_stemmer" "', argument " "2"" of type '" "Xapian::Stem const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::Stem * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_stemmer((Xapian::Stem const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_QueryParser_set_stemming_strategy(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ; + Xapian::QueryParser::stem_strategy arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"QueryParser_set_stemming_strategy",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[41], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "QueryParser_set_stemming_strategy" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "QueryParser_set_stemming_strategy" "', argument " "2"" of type '" "Xapian::QueryParser::stem_strategy""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::QueryParser::stem_strategy >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_stemming_strategy(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_QueryParser_set_stopper__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ; + Xapian::Stopper *arg2 = (Xapian::Stopper *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[41], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "QueryParser_set_stopper" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[52], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "QueryParser_set_stopper" "', argument " "2"" of type '" "Xapian::Stopper const *""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::Stopper * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_stopper((Xapian::Stopper const *)arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_QueryParser_set_stopper__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[41], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "QueryParser_set_stopper" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_stopper(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_QueryParser_set_stopper(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + if (!(argc = SWIG_Python_UnpackTuple(args,"QueryParser_set_stopper",0,2,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_QueryParser_set_stopper__SWIG_1(self, argc, argv); + } + if (argc == 2) { + return _wrap_QueryParser_set_stopper__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'QueryParser_set_stopper'.\n" + " Possible C/C++ prototypes are:\n" + " set_stopper(Xapian::QueryParser *,Xapian::Stopper const *)\n" + " set_stopper(Xapian::QueryParser *)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_QueryParser_set_default_op(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ; + Xapian::Query::op arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"QueryParser_set_default_op",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[41], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "QueryParser_set_default_op" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "QueryParser_set_default_op" "', argument " "2"" of type '" "Xapian::Query::op""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::Query::op >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_default_op(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_QueryParser_get_default_op(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::Query::op result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[41], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "QueryParser_get_default_op" "', argument " "1"" of type '" "Xapian::QueryParser const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Query::op)((Xapian::QueryParser const *)arg1)->get_default_op(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_QueryParser_set_database(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ; + Xapian::Database *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"QueryParser_set_database",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[41], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "QueryParser_set_database" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[4], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "QueryParser_set_database" "', argument " "2"" of type '" "Xapian::Database const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "QueryParser_set_database" "', argument " "2"" of type '" "Xapian::Database const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::Database * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_database((Xapian::Database const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_QueryParser_parse_query__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ; + std::string *arg2 = 0 ; + unsigned int arg3 ; + std::string *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + unsigned int val3 ; + int ecode3 = 0 ; + int res4 = ((0)) ; + Xapian::Query result; + if ((nobjs < 4) || (nobjs > 4)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[41], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "QueryParser_parse_query" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "QueryParser_parse_query" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "QueryParser_parse_query" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "QueryParser_parse_query" "', argument " "3"" of type '" "unsigned int""'"); goto fail; } while(0); + } + arg3 = static_cast< unsigned int >(val3); + { + std::string *ptr = (std::string *)0; + res4 = SWIG_anystring_as_ptr(&(swig_obj[3]), &ptr); + if (!(res4 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res4 != (-1)) ? res4 : -5)), "in method '" "QueryParser_parse_query" "', argument " "4"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "QueryParser_parse_query" "', argument " "4"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg4 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (arg1)->parse_query((std::string const &)*arg2,arg3,(std::string const &)*arg4); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), swig_types[40], 0x1 | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (((res4 >= 0) && (res4 & ((1 << 8) << 1)))) delete arg4; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (((res4 >= 0) && (res4 & ((1 << 8) << 1)))) delete arg4; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_QueryParser_parse_query__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ; + std::string *arg2 = 0 ; + unsigned int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + unsigned int val3 ; + int ecode3 = 0 ; + Xapian::Query result; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[41], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "QueryParser_parse_query" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "QueryParser_parse_query" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "QueryParser_parse_query" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "QueryParser_parse_query" "', argument " "3"" of type '" "unsigned int""'"); goto fail; } while(0); + } + arg3 = static_cast< unsigned int >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (arg1)->parse_query((std::string const &)*arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), swig_types[40], 0x1 | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_QueryParser_parse_query__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + Xapian::Query result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[41], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "QueryParser_parse_query" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "QueryParser_parse_query" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "QueryParser_parse_query" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (arg1)->parse_query((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), swig_types[40], 0x1 | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_QueryParser_parse_query(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + if (!(argc = SWIG_Python_UnpackTuple(args,"QueryParser_parse_query",0,4,argv))) goto fail; + --argc; + if (argc == 2) { + return _wrap_QueryParser_parse_query__SWIG_2(self, argc, argv); + } + if (argc == 3) { + return _wrap_QueryParser_parse_query__SWIG_1(self, argc, argv); + } + if (argc == 4) { + return _wrap_QueryParser_parse_query__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'QueryParser_parse_query'.\n" + " Possible C/C++ prototypes are:\n" + " parse_query(Xapian::QueryParser *,std::string const &,unsigned int,std::string const &)\n" + " parse_query(Xapian::QueryParser *,std::string const &,unsigned int)\n" + " parse_query(Xapian::QueryParser *,std::string const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_QueryParser_add_prefix(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + int res3 = ((0)) ; + PyObject *swig_obj[3] ; + if (!SWIG_Python_UnpackTuple(args,"QueryParser_add_prefix",3,3,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[41], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "QueryParser_add_prefix" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "QueryParser_add_prefix" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "QueryParser_add_prefix" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_anystring_as_ptr(&(swig_obj[2]), &ptr); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "QueryParser_add_prefix" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "QueryParser_add_prefix" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg3 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->add_prefix((std::string const &)*arg2,(std::string const &)*arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_QueryParser_add_boolean_prefix__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + bool arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + int res3 = ((0)) ; + bool val4 ; + int ecode4 = 0 ; + if ((nobjs < 4) || (nobjs > 4)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[41], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "QueryParser_add_boolean_prefix" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "QueryParser_add_boolean_prefix" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "QueryParser_add_boolean_prefix" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_anystring_as_ptr(&(swig_obj[2]), &ptr); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "QueryParser_add_boolean_prefix" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "QueryParser_add_boolean_prefix" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg3 = ptr; + } + ecode4 = SWIG_AsVal_bool(swig_obj[3], &val4); + if (!(ecode4 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode4 != (-1)) ? ecode4 : -5)), "in method '" "QueryParser_add_boolean_prefix" "', argument " "4"" of type '" "bool""'"); goto fail; } while(0); + } + arg4 = static_cast< bool >(val4); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->add_boolean_prefix((std::string const &)*arg2,(std::string const &)*arg3,arg4); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_QueryParser_add_boolean_prefix__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + int res3 = ((0)) ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[41], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "QueryParser_add_boolean_prefix" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "QueryParser_add_boolean_prefix" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "QueryParser_add_boolean_prefix" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_anystring_as_ptr(&(swig_obj[2]), &ptr); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "QueryParser_add_boolean_prefix" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "QueryParser_add_boolean_prefix" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg3 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->add_boolean_prefix((std::string const &)*arg2,(std::string const &)*arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_QueryParser_add_boolean_prefix(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + if (!(argc = SWIG_Python_UnpackTuple(args,"QueryParser_add_boolean_prefix",0,4,argv))) goto fail; + --argc; + if (argc == 3) { + return _wrap_QueryParser_add_boolean_prefix__SWIG_1(self, argc, argv); + } + if (argc == 4) { + return _wrap_QueryParser_add_boolean_prefix__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'QueryParser_add_boolean_prefix'.\n" + " Possible C/C++ prototypes are:\n" + " add_boolean_prefix(Xapian::QueryParser *,std::string const &,std::string const &,bool)\n" + " add_boolean_prefix(Xapian::QueryParser *,std::string const &,std::string const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_QueryParser_stoplist_begin(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::TermIterator result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[41], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "QueryParser_stoplist_begin" "', argument " "1"" of type '" "Xapian::QueryParser const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::QueryParser const *)arg1)->stoplist_begin(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_QueryParser_stoplist_end(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::TermIterator result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[41], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "QueryParser_stoplist_end" "', argument " "1"" of type '" "Xapian::QueryParser const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::QueryParser const *)arg1)->stoplist_end(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_QueryParser_unstem_begin(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + Xapian::TermIterator result; + if (!SWIG_Python_UnpackTuple(args,"QueryParser_unstem_begin",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[41], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "QueryParser_unstem_begin" "', argument " "1"" of type '" "Xapian::QueryParser const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "QueryParser_unstem_begin" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "QueryParser_unstem_begin" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::QueryParser const *)arg1)->unstem_begin((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_QueryParser_unstem_end(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + Xapian::TermIterator result; + if (!SWIG_Python_UnpackTuple(args,"QueryParser_unstem_end",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[41], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "QueryParser_unstem_end" "', argument " "1"" of type '" "Xapian::QueryParser const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "QueryParser_unstem_end" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "QueryParser_unstem_end" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::QueryParser const *)arg1)->unstem_end((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), swig_types[55], 0x1 | 0); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_QueryParser_add_valuerangeprocessor(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ; + Xapian::ValueRangeProcessor *arg2 = (Xapian::ValueRangeProcessor *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"QueryParser_add_valuerangeprocessor",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[41], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "QueryParser_add_valuerangeprocessor" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[62], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "QueryParser_add_valuerangeprocessor" "', argument " "2"" of type '" "Xapian::ValueRangeProcessor *""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::ValueRangeProcessor * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->add_valuerangeprocessor(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_QueryParser_get_corrected_query_string(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[41], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "QueryParser_get_corrected_query_string" "', argument " "1"" of type '" "Xapian::QueryParser const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::QueryParser const *)arg1)->get_corrected_query_string(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_QueryParser___str__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[41], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "QueryParser___str__" "', argument " "1"" of type '" "Xapian::QueryParser const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::QueryParser const *)arg1)->get_description(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *QueryParser_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[41], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *QueryParser_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_sortable_serialise(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + double arg1 ; + double val1 ; + int ecode1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + ecode1 = SWIG_AsVal_double(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "sortable_serialise" "', argument " "1"" of type '" "double""'"); goto fail; } while(0); + } + arg1 = static_cast< double >(val1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::sortable_serialise(arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_sortable_unserialise(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + PyObject *swig_obj[1] ; + double result; + if (!args) goto fail; + swig_obj[0] = args; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "sortable_unserialise" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "sortable_unserialise" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (double)Xapian::sortable_unserialise((std::string const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = PyFloat_FromDouble(static_cast< double >(result)); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_StemImplementation(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[51], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_StemImplementation" "', argument " "1"" of type '" "Xapian::StemImplementation *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::StemImplementation * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_StemImplementation___call__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + Swig::Director *director = 0; + bool upcall = false; + std::string result; + if (!SWIG_Python_UnpackTuple(args,"StemImplementation___call__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[51], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "StemImplementation___call__" "', argument " "1"" of type '" "Xapian::StemImplementation *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::StemImplementation * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "StemImplementation___call__" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "StemImplementation___call__" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + Swig::DirectorPureVirtualException::raise("Xapian::StemImplementation::operator ()"); + } else { + result = (arg1)->operator ()((std::string const &)*arg2); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_StemImplementation___str__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Swig::Director *director = 0; + bool upcall = false; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[51], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "StemImplementation___str__" "', argument " "1"" of type '" "Xapian::StemImplementation const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::StemImplementation * >(argp1); + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + Swig::DirectorPureVirtualException::raise("Xapian::StemImplementation::get_description"); + } else { + result = ((Xapian::StemImplementation const *)arg1)->get_description(); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_StemImplementation(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + PyObject *swig_obj[1] ; + Xapian::StemImplementation *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + arg1 = swig_obj[0]; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + if ( arg1 != (&_Py_NoneStruct) ) { + result = (Xapian::StemImplementation *)new SwigDirector_StemImplementation(arg1); + } else { + SWIG_Python_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); + goto fail; + } + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[51], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_disown_StemImplementation(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[51], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "disown_StemImplementation" "', argument " "1"" of type '" "Xapian::StemImplementation *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::StemImplementation * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *StemImplementation_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[51], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *StemImplementation_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Stem__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + std::string *arg1 = 0 ; + int res1 = ((0)) ; + Xapian::Stem *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + { + std::string *ptr = (std::string *)0; + res1 = SWIG_anystring_as_ptr(&(swig_obj[0]), &ptr); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_Stem" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "new_Stem" "', argument " "1"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg1 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Stem *)new Xapian::Stem((std::string const &)*arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[50], ((0x1 << 1) | 0x1) | 0); + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return resultobj; +fail: + if (((res1 >= 0) && (res1 & ((1 << 8) << 1)))) delete arg1; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Stem__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + Xapian::Stem *result = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[51], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "new_Stem" "', argument " "1"" of type '" "Xapian::StemImplementation *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::StemImplementation * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Stem *)new Xapian::Stem(arg1); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[50], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Stem(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + if (!(argc = SWIG_Python_UnpackTuple(args,"new_Stem",0,1,argv))) goto fail; + --argc; + if (argc == 1) { + int _v = 0; + { + void *vptr = 0; + int res = SWIG_Python_ConvertPtrAndOwn(argv[0], &vptr, swig_types[51], 0, 0); + _v = ((res >= 0) ? 1 : 0); + } + if (!_v) goto check_1; + return _wrap_new_Stem__SWIG_1(self, argc, argv); + } +check_1: + if (argc == 1) { + return _wrap_new_Stem__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Stem'.\n" + " Possible C/C++ prototypes are:\n" + " Xapian::Stem(std::string const &)\n" + " Xapian::Stem(Xapian::StemImplementation *)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_Stem(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Stem *arg1 = (Xapian::Stem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[50], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_Stem" "', argument " "1"" of type '" "Xapian::Stem *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Stem * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Stem___call__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Stem *arg1 = (Xapian::Stem *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + std::string result; + if (!SWIG_Python_UnpackTuple(args,"Stem___call__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[50], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Stem___call__" "', argument " "1"" of type '" "Xapian::Stem const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Stem * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Stem___call__" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Stem___call__" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Stem const *)arg1)->operator ()((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Stem___str__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Stem *arg1 = (Xapian::Stem *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[50], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Stem___str__" "', argument " "1"" of type '" "Xapian::Stem const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Stem * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::Stem const *)arg1)->get_description(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Stem_get_available_languages(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + std::string result; + if (!SWIG_Python_UnpackTuple(args,"Stem_get_available_languages",0,0,0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = Xapian::Stem::get_available_languages(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *Stem_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[50], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *Stem_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_TermGenerator(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::TermGenerator *result = 0 ; + if (!SWIG_Python_UnpackTuple(args,"new_TermGenerator",0,0,0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::TermGenerator *)new Xapian::TermGenerator(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[54], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_TermGenerator(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[54], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_TermGenerator" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermGenerator_set_stemmer(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ; + Xapian::Stem *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"TermGenerator_set_stemmer",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[54], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermGenerator_set_stemmer" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[50], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "TermGenerator_set_stemmer" "', argument " "2"" of type '" "Xapian::Stem const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "TermGenerator_set_stemmer" "', argument " "2"" of type '" "Xapian::Stem const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::Stem * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_stemmer((Xapian::Stem const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermGenerator_set_stopper__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ; + Xapian::Stopper *arg2 = (Xapian::Stopper *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[54], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermGenerator_set_stopper" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[52], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "TermGenerator_set_stopper" "', argument " "2"" of type '" "Xapian::Stopper const *""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::Stopper * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_stopper((Xapian::Stopper const *)arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermGenerator_set_stopper__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[54], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermGenerator_set_stopper" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_stopper(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermGenerator_set_stopper(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + if (!(argc = SWIG_Python_UnpackTuple(args,"TermGenerator_set_stopper",0,2,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_TermGenerator_set_stopper__SWIG_1(self, argc, argv); + } + if (argc == 2) { + return _wrap_TermGenerator_set_stopper__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TermGenerator_set_stopper'.\n" + " Possible C/C++ prototypes are:\n" + " set_stopper(Xapian::TermGenerator *,Xapian::Stopper const *)\n" + " set_stopper(Xapian::TermGenerator *)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermGenerator_set_document(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ; + Xapian::Document *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"TermGenerator_set_document",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[54], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermGenerator_set_document" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[15], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "TermGenerator_set_document" "', argument " "2"" of type '" "Xapian::Document const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "TermGenerator_set_document" "', argument " "2"" of type '" "Xapian::Document const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::Document * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_document((Xapian::Document const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermGenerator_get_document(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::Document *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[54], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermGenerator_get_document" "', argument " "1"" of type '" "Xapian::TermGenerator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::Document *) &((Xapian::TermGenerator const *)arg1)->get_document(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[15], 0 | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermGenerator_set_database(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ; + Xapian::WritableDatabase *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"TermGenerator_set_database",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[54], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermGenerator_set_database" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[66], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "TermGenerator_set_database" "', argument " "2"" of type '" "Xapian::WritableDatabase const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "TermGenerator_set_database" "', argument " "2"" of type '" "Xapian::WritableDatabase const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::WritableDatabase * >(argp2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_database((Xapian::WritableDatabase const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermGenerator_set_flags__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ; + Xapian::TermGenerator::flags arg2 ; + Xapian::TermGenerator::flags arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + Xapian::TermGenerator::flags result; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[54], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermGenerator_set_flags" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "TermGenerator_set_flags" "', argument " "2"" of type '" "Xapian::TermGenerator::flags""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::TermGenerator::flags >(val2); + ecode3 = SWIG_AsVal_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "TermGenerator_set_flags" "', argument " "3"" of type '" "Xapian::TermGenerator::flags""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::TermGenerator::flags >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::TermGenerator::flags)(arg1)->set_flags(arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermGenerator_set_flags__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ; + Xapian::TermGenerator::flags arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + Xapian::TermGenerator::flags result; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[54], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermGenerator_set_flags" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "TermGenerator_set_flags" "', argument " "2"" of type '" "Xapian::TermGenerator::flags""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::TermGenerator::flags >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::TermGenerator::flags)(arg1)->set_flags(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermGenerator_set_flags(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"TermGenerator_set_flags",0,3,argv))) goto fail; + --argc; + if (argc == 2) { + return _wrap_TermGenerator_set_flags__SWIG_1(self, argc, argv); + } + if (argc == 3) { + return _wrap_TermGenerator_set_flags__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TermGenerator_set_flags'.\n" + " Possible C/C++ prototypes are:\n" + " set_flags(Xapian::TermGenerator *,Xapian::TermGenerator::flags,Xapian::TermGenerator::flags)\n" + " set_flags(Xapian::TermGenerator *,Xapian::TermGenerator::flags)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermGenerator_index_text__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ; + std::string *arg2 = 0 ; + Xapian::termcount arg3 ; + std::string *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + unsigned int val3 ; + int ecode3 = 0 ; + int res4 = ((0)) ; + if ((nobjs < 4) || (nobjs > 4)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[54], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermGenerator_index_text" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "TermGenerator_index_text" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "TermGenerator_index_text" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "TermGenerator_index_text" "', argument " "3"" of type '" "Xapian::termcount""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::termcount >(val3); + { + std::string *ptr = (std::string *)0; + res4 = SWIG_anystring_as_ptr(&(swig_obj[3]), &ptr); + if (!(res4 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res4 != (-1)) ? res4 : -5)), "in method '" "TermGenerator_index_text" "', argument " "4"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "TermGenerator_index_text" "', argument " "4"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg4 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->index_text((std::string const &)*arg2,arg3,(std::string const &)*arg4); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (((res4 >= 0) && (res4 & ((1 << 8) << 1)))) delete arg4; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (((res4 >= 0) && (res4 & ((1 << 8) << 1)))) delete arg4; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermGenerator_index_text__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ; + std::string *arg2 = 0 ; + Xapian::termcount arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + unsigned int val3 ; + int ecode3 = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[54], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermGenerator_index_text" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "TermGenerator_index_text" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "TermGenerator_index_text" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "TermGenerator_index_text" "', argument " "3"" of type '" "Xapian::termcount""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::termcount >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->index_text((std::string const &)*arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermGenerator_index_text__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[54], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermGenerator_index_text" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "TermGenerator_index_text" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "TermGenerator_index_text" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->index_text((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermGenerator_index_text(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + if (!(argc = SWIG_Python_UnpackTuple(args,"TermGenerator_index_text",0,4,argv))) goto fail; + --argc; + if (argc == 2) { + return _wrap_TermGenerator_index_text__SWIG_2(self, argc, argv); + } + if (argc == 3) { + return _wrap_TermGenerator_index_text__SWIG_1(self, argc, argv); + } + if (argc == 4) { + return _wrap_TermGenerator_index_text__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TermGenerator_index_text'.\n" + " Possible C/C++ prototypes are:\n" + " index_text(Xapian::TermGenerator *,std::string const &,Xapian::termcount,std::string const &)\n" + " index_text(Xapian::TermGenerator *,std::string const &,Xapian::termcount)\n" + " index_text(Xapian::TermGenerator *,std::string const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermGenerator_index_text_without_positions__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ; + std::string *arg2 = 0 ; + Xapian::termcount arg3 ; + std::string *arg4 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + unsigned int val3 ; + int ecode3 = 0 ; + int res4 = ((0)) ; + if ((nobjs < 4) || (nobjs > 4)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[54], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermGenerator_index_text_without_positions" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "TermGenerator_index_text_without_positions" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "TermGenerator_index_text_without_positions" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "TermGenerator_index_text_without_positions" "', argument " "3"" of type '" "Xapian::termcount""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::termcount >(val3); + { + std::string *ptr = (std::string *)0; + res4 = SWIG_anystring_as_ptr(&(swig_obj[3]), &ptr); + if (!(res4 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res4 != (-1)) ? res4 : -5)), "in method '" "TermGenerator_index_text_without_positions" "', argument " "4"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "TermGenerator_index_text_without_positions" "', argument " "4"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg4 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->index_text_without_positions((std::string const &)*arg2,arg3,(std::string const &)*arg4); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (((res4 >= 0) && (res4 & ((1 << 8) << 1)))) delete arg4; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (((res4 >= 0) && (res4 & ((1 << 8) << 1)))) delete arg4; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermGenerator_index_text_without_positions__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ; + std::string *arg2 = 0 ; + Xapian::termcount arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + unsigned int val3 ; + int ecode3 = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[54], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermGenerator_index_text_without_positions" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "TermGenerator_index_text_without_positions" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "TermGenerator_index_text_without_positions" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "TermGenerator_index_text_without_positions" "', argument " "3"" of type '" "Xapian::termcount""'"); goto fail; } while(0); + } + arg3 = static_cast< Xapian::termcount >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->index_text_without_positions((std::string const &)*arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermGenerator_index_text_without_positions__SWIG_2(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[54], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermGenerator_index_text_without_positions" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "TermGenerator_index_text_without_positions" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "TermGenerator_index_text_without_positions" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->index_text_without_positions((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermGenerator_index_text_without_positions(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + if (!(argc = SWIG_Python_UnpackTuple(args,"TermGenerator_index_text_without_positions",0,4,argv))) goto fail; + --argc; + if (argc == 2) { + return _wrap_TermGenerator_index_text_without_positions__SWIG_2(self, argc, argv); + } + if (argc == 3) { + return _wrap_TermGenerator_index_text_without_positions__SWIG_1(self, argc, argv); + } + if (argc == 4) { + return _wrap_TermGenerator_index_text_without_positions__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TermGenerator_index_text_without_positions'.\n" + " Possible C/C++ prototypes are:\n" + " index_text_without_positions(Xapian::TermGenerator *,std::string const &,Xapian::termcount,std::string const &)\n" + " index_text_without_positions(Xapian::TermGenerator *,std::string const &,Xapian::termcount)\n" + " index_text_without_positions(Xapian::TermGenerator *,std::string const &)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermGenerator_increase_termpos__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ; + Xapian::termcount arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[54], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermGenerator_increase_termpos" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "TermGenerator_increase_termpos" "', argument " "2"" of type '" "Xapian::termcount""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::termcount >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->increase_termpos(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermGenerator_increase_termpos__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + if ((nobjs < 1) || (nobjs > 1)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[54], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermGenerator_increase_termpos" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->increase_termpos(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermGenerator_increase_termpos(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + if (!(argc = SWIG_Python_UnpackTuple(args,"TermGenerator_increase_termpos",0,2,argv))) goto fail; + --argc; + if (argc == 1) { + return _wrap_TermGenerator_increase_termpos__SWIG_1(self, argc, argv); + } + if (argc == 2) { + return _wrap_TermGenerator_increase_termpos__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'TermGenerator_increase_termpos'.\n" + " Possible C/C++ prototypes are:\n" + " increase_termpos(Xapian::TermGenerator *,Xapian::termcount)\n" + " increase_termpos(Xapian::TermGenerator *)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermGenerator_get_termpos(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + Xapian::termcount result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[54], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermGenerator_get_termpos" "', argument " "1"" of type '" "Xapian::TermGenerator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::termcount)((Xapian::TermGenerator const *)arg1)->get_termpos(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermGenerator_set_termpos(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ; + Xapian::termcount arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"TermGenerator_set_termpos",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[54], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermGenerator_set_termpos" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "TermGenerator_set_termpos" "', argument " "2"" of type '" "Xapian::termcount""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::termcount >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_termpos(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_TermGenerator___str__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + std::string result; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[54], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "TermGenerator___str__" "', argument " "1"" of type '" "Xapian::TermGenerator const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = ((Xapian::TermGenerator const *)arg1)->get_description(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *TermGenerator_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[54], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *TermGenerator_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_KeyMaker___call__(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::KeyMaker *arg1 = (Xapian::KeyMaker *) 0 ; + Xapian::Document *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject *swig_obj[2] ; + Swig::Director *director = 0; + bool upcall = false; + std::string result; + if (!SWIG_Python_UnpackTuple(args,"KeyMaker___call__",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[26], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "KeyMaker___call__" "', argument " "1"" of type '" "Xapian::KeyMaker const *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::KeyMaker * >(argp1); + res2 = SWIG_Python_ConvertPtrAndOwn(swig_obj[1], &argp2, swig_types[15], 0 | 0, 0); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "KeyMaker___call__" "', argument " "2"" of type '" "Xapian::Document const &""'"); goto fail; } while(0); + } + if (!argp2) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "KeyMaker___call__" "', argument " "2"" of type '" "Xapian::Document const &""'"); goto fail; } while(0); + } + arg2 = reinterpret_cast< Xapian::Document * >(argp2); + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + Swig::DirectorPureVirtualException::raise("Xapian::KeyMaker::operator ()"); + } else { + result = ((Xapian::KeyMaker const *)arg1)->operator ()((Xapian::Document const &)*arg2); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_KeyMaker(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::KeyMaker *arg1 = (Xapian::KeyMaker *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[26], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_KeyMaker" "', argument " "1"" of type '" "Xapian::KeyMaker *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::KeyMaker * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_KeyMaker(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + PyObject *swig_obj[1] ; + Xapian::KeyMaker *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + arg1 = swig_obj[0]; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + if ( arg1 != (&_Py_NoneStruct) ) { + result = (Xapian::KeyMaker *)new SwigDirector_KeyMaker(arg1); + } else { + SWIG_Python_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); + goto fail; + } + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[26], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_disown_KeyMaker(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::KeyMaker *arg1 = (Xapian::KeyMaker *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[26], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "disown_KeyMaker" "', argument " "1"" of type '" "Xapian::KeyMaker *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::KeyMaker * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *KeyMaker_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[26], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *KeyMaker_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_MultiValueKeyMaker(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MultiValueKeyMaker *result = 0 ; + if (!SWIG_Python_UnpackTuple(args,"new_MultiValueKeyMaker",0,0,0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::MultiValueKeyMaker *)new Xapian::MultiValueKeyMaker(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[32], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MultiValueKeyMaker_add_value__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ; + Xapian::valueno arg2 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[32], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MultiValueKeyMaker_add_value" "', argument " "1"" of type '" "Xapian::MultiValueKeyMaker *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MultiValueKeyMaker * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "MultiValueKeyMaker_add_value" "', argument " "2"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::valueno >(val2); + ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "MultiValueKeyMaker_add_value" "', argument " "3"" of type '" "bool""'"); goto fail; } while(0); + } + arg3 = static_cast< bool >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->add_value(arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MultiValueKeyMaker_add_value__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ; + Xapian::valueno arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[32], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MultiValueKeyMaker_add_value" "', argument " "1"" of type '" "Xapian::MultiValueKeyMaker *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MultiValueKeyMaker * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "MultiValueKeyMaker_add_value" "', argument " "2"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::valueno >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->add_value(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MultiValueKeyMaker_add_value(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"MultiValueKeyMaker_add_value",0,3,argv))) goto fail; + --argc; + if (argc == 2) { + return _wrap_MultiValueKeyMaker_add_value__SWIG_1(self, argc, argv); + } + if (argc == 3) { + return _wrap_MultiValueKeyMaker_add_value__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'MultiValueKeyMaker_add_value'.\n" + " Possible C/C++ prototypes are:\n" + " add_value(Xapian::MultiValueKeyMaker *,Xapian::valueno,bool)\n" + " add_value(Xapian::MultiValueKeyMaker *,Xapian::valueno)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_MultiValueKeyMaker(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[32], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_MultiValueKeyMaker" "', argument " "1"" of type '" "Xapian::MultiValueKeyMaker *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MultiValueKeyMaker * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *MultiValueKeyMaker_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[32], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *MultiValueKeyMaker_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_Sorter(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Sorter *arg1 = (Xapian::Sorter *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[49], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_Sorter" "', argument " "1"" of type '" "Xapian::Sorter *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Sorter * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *Sorter_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[49], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_MultiValueSorter(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MultiValueSorter *result = 0 ; + if (!SWIG_Python_UnpackTuple(args,"new_MultiValueSorter",0,0,0)) goto fail; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::MultiValueSorter *)new Xapian::MultiValueSorter(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[33], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MultiValueSorter_add__SWIG_0(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::MultiValueSorter *arg1 = (Xapian::MultiValueSorter *) 0 ; + Xapian::valueno arg2 ; + bool arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + bool val3 ; + int ecode3 = 0 ; + if ((nobjs < 3) || (nobjs > 3)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[33], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MultiValueSorter_add" "', argument " "1"" of type '" "Xapian::MultiValueSorter *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MultiValueSorter * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "MultiValueSorter_add" "', argument " "2"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::valueno >(val2); + ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "MultiValueSorter_add" "', argument " "3"" of type '" "bool""'"); goto fail; } while(0); + } + arg3 = static_cast< bool >(val3); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->add(arg2,arg3); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MultiValueSorter_add__SWIG_1(PyObject *, int nobjs, PyObject **swig_obj) { + PyObject *resultobj = 0; + Xapian::MultiValueSorter *arg1 = (Xapian::MultiValueSorter *) 0 ; + Xapian::valueno arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + if ((nobjs < 2) || (nobjs > 2)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[33], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "MultiValueSorter_add" "', argument " "1"" of type '" "Xapian::MultiValueSorter *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MultiValueSorter * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "MultiValueSorter_add" "', argument " "2"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::valueno >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->add(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_MultiValueSorter_add(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + if (!(argc = SWIG_Python_UnpackTuple(args,"MultiValueSorter_add",0,3,argv))) goto fail; + --argc; + if (argc == 2) { + return _wrap_MultiValueSorter_add__SWIG_1(self, argc, argv); + } + if (argc == 3) { + return _wrap_MultiValueSorter_add__SWIG_0(self, argc, argv); + } +fail: + SWIG_Python_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'MultiValueSorter_add'.\n" + " Possible C/C++ prototypes are:\n" + " add(Xapian::MultiValueSorter *,Xapian::valueno,bool)\n" + " add(Xapian::MultiValueSorter *,Xapian::valueno)\n"); + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_MultiValueSorter(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::MultiValueSorter *arg1 = (Xapian::MultiValueSorter *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[33], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_MultiValueSorter" "', argument " "1"" of type '" "Xapian::MultiValueSorter *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::MultiValueSorter * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *MultiValueSorter_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[33], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *MultiValueSorter_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_ValueSetMatchDecider(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::valueno arg1 ; + bool arg2 ; + unsigned int val1 ; + int ecode1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + Xapian::ValueSetMatchDecider *result = 0 ; + if (!SWIG_Python_UnpackTuple(args,"new_ValueSetMatchDecider",2,2,swig_obj)) goto fail; + ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[0], &val1); + if (!(ecode1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode1 != (-1)) ? ecode1 : -5)), "in method '" "new_ValueSetMatchDecider" "', argument " "1"" of type '" "Xapian::valueno""'"); goto fail; } while(0); + } + arg1 = static_cast< Xapian::valueno >(val1); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "new_ValueSetMatchDecider" "', argument " "2"" of type '" "bool""'"); goto fail; } while(0); + } + arg2 = static_cast< bool >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + result = (Xapian::ValueSetMatchDecider *)new Xapian::ValueSetMatchDecider(arg1,arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[63], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ValueSetMatchDecider_add_value(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"ValueSetMatchDecider_add_value",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[63], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ValueSetMatchDecider_add_value" "', argument " "1"" of type '" "Xapian::ValueSetMatchDecider *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueSetMatchDecider * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "ValueSetMatchDecider_add_value" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "ValueSetMatchDecider_add_value" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->add_value((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_ValueSetMatchDecider_remove_value(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"ValueSetMatchDecider_remove_value",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[63], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "ValueSetMatchDecider_remove_value" "', argument " "1"" of type '" "Xapian::ValueSetMatchDecider *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueSetMatchDecider * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "ValueSetMatchDecider_remove_value" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "ValueSetMatchDecider_remove_value" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->remove_value((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_ValueSetMatchDecider(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[63], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_ValueSetMatchDecider" "', argument " "1"" of type '" "Xapian::ValueSetMatchDecider *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::ValueSetMatchDecider * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *ValueSetMatchDecider_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[63], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *ValueSetMatchDecider_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static __attribute__ ((__unused__)) PyObject *_wrap_new_Compactor(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + PyObject *arg1 = (PyObject *) 0 ; + PyObject *swig_obj[1] ; + Xapian::Compactor *result = 0 ; + if (!args) goto fail; + swig_obj[0] = args; + arg1 = swig_obj[0]; + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + if ( arg1 != (&_Py_NoneStruct) ) { + result = (Xapian::Compactor *)new SwigDirector_Compactor(arg1); + } else { + result = (Xapian::Compactor *)new Xapian::Compactor(); + } + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Python_NewPointerObj(const_cast< void * >(static_cast< const void * >(result)), swig_types[3], ((0x1 << 1) | 0x1) | 0); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_delete_Compactor(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[3], 0x1 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "delete_Compactor" "', argument " "1"" of type '" "Xapian::Compactor *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Compactor * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + delete arg1; + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Compactor_set_block_size(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ; + size_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + size_t val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"Compactor_set_block_size",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[3], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Compactor_set_block_size" "', argument " "1"" of type '" "Xapian::Compactor *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Compactor * >(argp1); + ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Compactor_set_block_size" "', argument " "2"" of type '" "size_t""'"); goto fail; } while(0); + } + arg2 = static_cast< size_t >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_block_size(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Compactor_set_renumber(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"Compactor_set_renumber",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[3], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Compactor_set_renumber" "', argument " "1"" of type '" "Xapian::Compactor *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Compactor * >(argp1); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Compactor_set_renumber" "', argument " "2"" of type '" "bool""'"); goto fail; } while(0); + } + arg2 = static_cast< bool >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_renumber(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Compactor_set_multipass(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ; + bool arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"Compactor_set_multipass",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[3], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Compactor_set_multipass" "', argument " "1"" of type '" "Xapian::Compactor *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Compactor * >(argp1); + ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Compactor_set_multipass" "', argument " "2"" of type '" "bool""'"); goto fail; } while(0); + } + arg2 = static_cast< bool >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_multipass(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Compactor_set_compaction_level(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ; + Xapian::Compactor::compaction_level arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"Compactor_set_compaction_level",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[3], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Compactor_set_compaction_level" "', argument " "1"" of type '" "Xapian::Compactor *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Compactor * >(argp1); + ecode2 = SWIG_AsVal_int(swig_obj[1], &val2); + if (!(ecode2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode2 != (-1)) ? ecode2 : -5)), "in method '" "Compactor_set_compaction_level" "', argument " "2"" of type '" "Xapian::Compactor::compaction_level""'"); goto fail; } while(0); + } + arg2 = static_cast< Xapian::Compactor::compaction_level >(val2); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_compaction_level(arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Compactor_set_destdir(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"Compactor_set_destdir",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[3], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Compactor_set_destdir" "', argument " "1"" of type '" "Xapian::Compactor *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Compactor * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Compactor_set_destdir" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Compactor_set_destdir" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->set_destdir((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Compactor_add_source(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ; + std::string *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + PyObject *swig_obj[2] ; + if (!SWIG_Python_UnpackTuple(args,"Compactor_add_source",2,2,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[3], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Compactor_add_source" "', argument " "1"" of type '" "Xapian::Compactor *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Compactor * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Compactor_add_source" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Compactor_add_source" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->add_source((std::string const &)*arg2); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Compactor_compact(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[3], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Compactor_compact" "', argument " "1"" of type '" "Xapian::Compactor *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Compactor * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + try { + (arg1)->compact(); + } catch (...) { + _swig_thread_allow.end(); + Xapian::SetPythonException(); + goto fail; + } + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Compactor_set_status(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ; + std::string *arg2 = 0 ; + std::string *arg3 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + int res3 = ((0)) ; + PyObject *swig_obj[3] ; + Swig::Director *director = 0; + bool upcall = false; + if (!SWIG_Python_UnpackTuple(args,"Compactor_set_status",3,3,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[3], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Compactor_set_status" "', argument " "1"" of type '" "Xapian::Compactor *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Compactor * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Compactor_set_status" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Compactor_set_status" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + { + std::string *ptr = (std::string *)0; + res3 = SWIG_anystring_as_ptr(&(swig_obj[2]), &ptr); + if (!(res3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res3 != (-1)) ? res3 : -5)), "in method '" "Compactor_set_status" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Compactor_set_status" "', argument " "3"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg3 = ptr; + } + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + (arg1)->Xapian::Compactor::set_status((std::string const &)*arg2,(std::string const &)*arg3); + } else { + (arg1)->set_status((std::string const &)*arg2,(std::string const &)*arg3); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_Py_Void(); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + if (((res3 >= 0) && (res3 & ((1 << 8) << 1)))) delete arg3; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_Compactor_resolve_duplicate_metadata(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ; + std::string *arg2 = 0 ; + size_t arg3 ; + std::string *arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 = ((0)) ; + size_t val3 ; + int ecode3 = 0 ; + void *argp4 = 0 ; + int res4 = 0 ; + PyObject *swig_obj[4] ; + Swig::Director *director = 0; + bool upcall = false; + std::string result; + if (!SWIG_Python_UnpackTuple(args,"Compactor_resolve_duplicate_metadata",4,4,swig_obj)) goto fail; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[3], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "Compactor_resolve_duplicate_metadata" "', argument " "1"" of type '" "Xapian::Compactor *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Compactor * >(argp1); + { + std::string *ptr = (std::string *)0; + res2 = SWIG_anystring_as_ptr(&(swig_obj[1]), &ptr); + if (!(res2 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res2 != (-1)) ? res2 : -5)), "in method '" "Compactor_resolve_duplicate_metadata" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + if (!ptr) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(-9), "invalid null reference " "in method '" "Compactor_resolve_duplicate_metadata" "', argument " "2"" of type '" "std::string const &""'"); goto fail; } while(0); + } + arg2 = ptr; + } + ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3); + if (!(ecode3 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((ecode3 != (-1)) ? ecode3 : -5)), "in method '" "Compactor_resolve_duplicate_metadata" "', argument " "3"" of type '" "size_t""'"); goto fail; } while(0); + } + arg3 = static_cast< size_t >(val3); + res4 = SWIG_Python_ConvertPtrAndOwn(swig_obj[3], &argp4, swig_types[77], 0 | 0, 0); + if (!(res4 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res4 != (-1)) ? res4 : -5)), "in method '" "Compactor_resolve_duplicate_metadata" "', argument " "4"" of type '" "std::string const []""'"); goto fail; } while(0); + } + arg4 = reinterpret_cast< std::string * >(argp4); + director = dynamic_cast(arg1); + upcall = (director && (director->swig_get_self()==swig_obj[0])); + try { + { + try { + if (upcall) { + result = (arg1)->Xapian::Compactor::resolve_duplicate_metadata((std::string const &)*arg2,arg3,(std::string const (*))arg4); + } else { + result = (arg1)->resolve_duplicate_metadata((std::string const &)*arg2,arg3,(std::string const (*))arg4); + } + } catch (...) { + Xapian::SetPythonException(); + goto fail; + } + } + } catch (Swig::DirectorException&) { + goto fail; + } + resultobj = SWIG_From_std_string(static_cast< std::string >(result)); + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return resultobj; +fail: + if (((res2 >= 0) && (res2 & ((1 << 8) << 1)))) delete arg2; + return __null; +} +static __attribute__ ((__unused__)) PyObject *_wrap_disown_Compactor(PyObject *, PyObject *args) { + PyObject *resultobj = 0; + Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject *swig_obj[1] ; + if (!args) goto fail; + swig_obj[0] = args; + res1 = SWIG_Python_ConvertPtrAndOwn(swig_obj[0], &argp1, swig_types[3], 0 | 0, 0); + if (!(res1 >= 0)) { + do { SWIG_Python_SetErrorMsg(SWIG_Python_ErrorType(((res1 != (-1)) ? res1 : -5)), "in method '" "disown_Compactor" "', argument " "1"" of type '" "Xapian::Compactor *""'"); goto fail; } while(0); + } + arg1 = reinterpret_cast< Xapian::Compactor * >(argp1); + { + SWIG_Python_Thread_Allow _swig_thread_allow; + { + Swig::Director *director = dynamic_cast(arg1); + if (director) director->swig_disown(); + } + _swig_thread_allow.end(); + } + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return __null; +} +static __attribute__ ((__unused__)) PyObject *Compactor_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return __null; + SWIG_TypeNewClientData(swig_types[3], SwigPyClientData_New(obj)); + return SWIG_Py_Void(); +} +static __attribute__ ((__unused__)) PyObject *Compactor_swiginit(PyObject *, PyObject *args) { + return SWIG_Python_InitShadowInstance(args); +} +static PyMethodDef SwigMethods[] = { + { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, 0x0008, __null}, + { (char *)"delete_SwigPyIterator", (PyCFunction)_wrap_delete_SwigPyIterator, 0x0008, __null}, + { (char *)"SwigPyIterator_value", (PyCFunction)_wrap_SwigPyIterator_value, 0x0008, __null}, + { (char *)"SwigPyIterator_incr", _wrap_SwigPyIterator_incr, 0x0001, __null}, + { (char *)"SwigPyIterator_decr", _wrap_SwigPyIterator_decr, 0x0001, __null}, + { (char *)"SwigPyIterator_distance", _wrap_SwigPyIterator_distance, 0x0001, __null}, + { (char *)"SwigPyIterator_equal", _wrap_SwigPyIterator_equal, 0x0001, __null}, + { (char *)"SwigPyIterator_copy", (PyCFunction)_wrap_SwigPyIterator_copy, 0x0008, __null}, + { (char *)"SwigPyIterator_next", (PyCFunction)_wrap_SwigPyIterator_next, 0x0008, __null}, + { (char *)"SwigPyIterator___next__", (PyCFunction)_wrap_SwigPyIterator___next__, 0x0008, __null}, + { (char *)"SwigPyIterator_previous", (PyCFunction)_wrap_SwigPyIterator_previous, 0x0008, __null}, + { (char *)"SwigPyIterator_advance", _wrap_SwigPyIterator_advance, 0x0001, __null}, + { (char *)"SwigPyIterator___eq__", _wrap_SwigPyIterator___eq__, 0x0001, __null}, + { (char *)"SwigPyIterator___ne__", _wrap_SwigPyIterator___ne__, 0x0001, __null}, + { (char *)"SwigPyIterator___iadd__", _wrap_SwigPyIterator___iadd__, 0x0001, __null}, + { (char *)"SwigPyIterator___isub__", _wrap_SwigPyIterator___isub__, 0x0001, __null}, + { (char *)"SwigPyIterator___add__", _wrap_SwigPyIterator___add__, 0x0001, __null}, + { (char *)"SwigPyIterator___sub__", _wrap_SwigPyIterator___sub__, 0x0001, __null}, + { (char *)"SwigPyIterator_swigregister", SwigPyIterator_swigregister, 0x0001, __null}, + { (char *)"Error_get_type", (PyCFunction)_wrap_Error_get_type, 0x0008, (char *)"\n" + "The type of this error (e.g. \"DocNotFoundError\".).\n" + "\n" + "const char* Xapian::Error::get_type() const \n" + ""}, + { (char *)"Error_get_msg", (PyCFunction)_wrap_Error_get_msg, 0x0008, (char *)"\n" + "Message giving details of the error, intended for human consumption.\n" + "\n" + "const std::string& Xapian::Error::get_msg() const \n" + ""}, + { (char *)"Error_get_context", (PyCFunction)_wrap_Error_get_context, 0x0008, (char *)"\n" + "Optional context information.\n" + "\n" + "const std::string& Xapian::Error::get_context() const\n" + "\n" + "This context is intended for use by Xapian::ErrorHandler (for example\n" + "so it can know which remote server is unreliable and report the\n" + "problem and remove that server from those being searched). But it's\n" + "typically a plain-text string, and so also fit for human consumption.\n" + "\n" + ""}, + { (char *)"Error_get_error_string", (PyCFunction)_wrap_Error_get_error_string, 0x0008, (char *)"\n" + "Returns any system error string associated with this exception.\n" + "\n" + "const char* Xapian::Error::get_error_string() const\n" + "\n" + "The system error string may come from errno, h_errno (on UNIX), or\n" + "GetLastError() (on MS Windows). If there is no associated system error\n" + "string, NULL is returned. \n" + ""}, + { (char *)"Error___str__", (PyCFunction)_wrap_Error___str__, 0x0008, __null}, + { (char *)"delete_Error", (PyCFunction)_wrap_delete_Error, 0x0008, __null}, + { (char *)"Error_swigregister", Error_swigregister, 0x0001, __null}, + { (char *)"delete_LogicError", (PyCFunction)_wrap_delete_LogicError, 0x0008, __null}, + { (char *)"LogicError_swigregister", LogicError_swigregister, 0x0001, __null}, + { (char *)"delete_RuntimeError", (PyCFunction)_wrap_delete_RuntimeError, 0x0008, __null}, + { (char *)"RuntimeError_swigregister", RuntimeError_swigregister, 0x0001, __null}, + { (char *)"new_AssertionError", _wrap_new_AssertionError, 0x0001, (char *)"\n" + "Construct from message and errno value.\n" + "\n" + "Xapian::AssertionError::AssertionError(const std::string &msg_, int\n" + "errno_) \n" + ""}, + { (char *)"delete_AssertionError", (PyCFunction)_wrap_delete_AssertionError, 0x0008, __null}, + { (char *)"AssertionError_swigregister", AssertionError_swigregister, 0x0001, __null}, + { (char *)"AssertionError_swiginit", AssertionError_swiginit, 0x0001, __null}, + { (char *)"new_InvalidArgumentError", _wrap_new_InvalidArgumentError, 0x0001, (char *)"\n" + "Construct from message and errno value.\n" + "\n" + "Xapian::InvalidArgumentError::InvalidArgumentError(const std::string\n" + "&msg_, int errno_) \n" + ""}, + { (char *)"delete_InvalidArgumentError", (PyCFunction)_wrap_delete_InvalidArgumentError, 0x0008, __null}, + { (char *)"InvalidArgumentError_swigregister", InvalidArgumentError_swigregister, 0x0001, __null}, + { (char *)"InvalidArgumentError_swiginit", InvalidArgumentError_swiginit, 0x0001, __null}, + { (char *)"new_InvalidOperationError", _wrap_new_InvalidOperationError, 0x0001, (char *)"\n" + "Construct from message and errno value.\n" + "\n" + "Xapian::InvalidOperationError::InvalidOperationError(const std::string\n" + "&msg_, int errno_) \n" + ""}, + { (char *)"delete_InvalidOperationError", (PyCFunction)_wrap_delete_InvalidOperationError, 0x0008, __null}, + { (char *)"InvalidOperationError_swigregister", InvalidOperationError_swigregister, 0x0001, __null}, + { (char *)"InvalidOperationError_swiginit", InvalidOperationError_swiginit, 0x0001, __null}, + { (char *)"new_UnimplementedError", _wrap_new_UnimplementedError, 0x0001, (char *)"\n" + "Construct from message and errno value.\n" + "\n" + "Xapian::UnimplementedError::UnimplementedError(const std::string\n" + "&msg_, int errno_) \n" + ""}, + { (char *)"delete_UnimplementedError", (PyCFunction)_wrap_delete_UnimplementedError, 0x0008, __null}, + { (char *)"UnimplementedError_swigregister", UnimplementedError_swigregister, 0x0001, __null}, + { (char *)"UnimplementedError_swiginit", UnimplementedError_swiginit, 0x0001, __null}, + { (char *)"new_DatabaseError", _wrap_new_DatabaseError, 0x0001, (char *)"\n" + "Construct from message and errno value.\n" + "\n" + "Xapian::DatabaseError::DatabaseError(const std::string &msg_, int\n" + "errno_) \n" + ""}, + { (char *)"delete_DatabaseError", (PyCFunction)_wrap_delete_DatabaseError, 0x0008, __null}, + { (char *)"DatabaseError_swigregister", DatabaseError_swigregister, 0x0001, __null}, + { (char *)"DatabaseError_swiginit", DatabaseError_swiginit, 0x0001, __null}, + { (char *)"new_DatabaseCorruptError", _wrap_new_DatabaseCorruptError, 0x0001, (char *)"\n" + "Construct from message and errno value.\n" + "\n" + "Xapian::DatabaseCorruptError::DatabaseCorruptError(const std::string\n" + "&msg_, int errno_) \n" + ""}, + { (char *)"delete_DatabaseCorruptError", (PyCFunction)_wrap_delete_DatabaseCorruptError, 0x0008, __null}, + { (char *)"DatabaseCorruptError_swigregister", DatabaseCorruptError_swigregister, 0x0001, __null}, + { (char *)"DatabaseCorruptError_swiginit", DatabaseCorruptError_swiginit, 0x0001, __null}, + { (char *)"new_DatabaseCreateError", _wrap_new_DatabaseCreateError, 0x0001, (char *)"\n" + "Construct from message and errno value.\n" + "\n" + "Xapian::DatabaseCreateError::DatabaseCreateError(const std::string\n" + "&msg_, int errno_) \n" + ""}, + { (char *)"delete_DatabaseCreateError", (PyCFunction)_wrap_delete_DatabaseCreateError, 0x0008, __null}, + { (char *)"DatabaseCreateError_swigregister", DatabaseCreateError_swigregister, 0x0001, __null}, + { (char *)"DatabaseCreateError_swiginit", DatabaseCreateError_swiginit, 0x0001, __null}, + { (char *)"new_DatabaseLockError", _wrap_new_DatabaseLockError, 0x0001, (char *)"\n" + "Construct from message and errno value.\n" + "\n" + "Xapian::DatabaseLockError::DatabaseLockError(const std::string &msg_,\n" + "int errno_) \n" + ""}, + { (char *)"delete_DatabaseLockError", (PyCFunction)_wrap_delete_DatabaseLockError, 0x0008, __null}, + { (char *)"DatabaseLockError_swigregister", DatabaseLockError_swigregister, 0x0001, __null}, + { (char *)"DatabaseLockError_swiginit", DatabaseLockError_swiginit, 0x0001, __null}, + { (char *)"new_DatabaseModifiedError", _wrap_new_DatabaseModifiedError, 0x0001, (char *)"\n" + "Construct from message and errno value.\n" + "\n" + "Xapian::DatabaseModifiedError::DatabaseModifiedError(const std::string\n" + "&msg_, int errno_) \n" + ""}, + { (char *)"delete_DatabaseModifiedError", (PyCFunction)_wrap_delete_DatabaseModifiedError, 0x0008, __null}, + { (char *)"DatabaseModifiedError_swigregister", DatabaseModifiedError_swigregister, 0x0001, __null}, + { (char *)"DatabaseModifiedError_swiginit", DatabaseModifiedError_swiginit, 0x0001, __null}, + { (char *)"new_DatabaseOpeningError", _wrap_new_DatabaseOpeningError, 0x0001, (char *)"\n" + "Construct from message and errno value.\n" + "\n" + "Xapian::DatabaseOpeningError::DatabaseOpeningError(const std::string\n" + "&msg_, int errno_) \n" + ""}, + { (char *)"delete_DatabaseOpeningError", (PyCFunction)_wrap_delete_DatabaseOpeningError, 0x0008, __null}, + { (char *)"DatabaseOpeningError_swigregister", DatabaseOpeningError_swigregister, 0x0001, __null}, + { (char *)"DatabaseOpeningError_swiginit", DatabaseOpeningError_swiginit, 0x0001, __null}, + { (char *)"new_DatabaseVersionError", _wrap_new_DatabaseVersionError, 0x0001, (char *)"\n" + "Construct from message and errno value.\n" + "\n" + "Xapian::DatabaseVersionError::DatabaseVersionError(const std::string\n" + "&msg_, int errno_) \n" + ""}, + { (char *)"delete_DatabaseVersionError", (PyCFunction)_wrap_delete_DatabaseVersionError, 0x0008, __null}, + { (char *)"DatabaseVersionError_swigregister", DatabaseVersionError_swigregister, 0x0001, __null}, + { (char *)"DatabaseVersionError_swiginit", DatabaseVersionError_swiginit, 0x0001, __null}, + { (char *)"new_DocNotFoundError", _wrap_new_DocNotFoundError, 0x0001, (char *)"\n" + "Construct from message and errno value.\n" + "\n" + "Xapian::DocNotFoundError::DocNotFoundError(const std::string &msg_,\n" + "int errno_) \n" + ""}, + { (char *)"delete_DocNotFoundError", (PyCFunction)_wrap_delete_DocNotFoundError, 0x0008, __null}, + { (char *)"DocNotFoundError_swigregister", DocNotFoundError_swigregister, 0x0001, __null}, + { (char *)"DocNotFoundError_swiginit", DocNotFoundError_swiginit, 0x0001, __null}, + { (char *)"new_FeatureUnavailableError", _wrap_new_FeatureUnavailableError, 0x0001, (char *)"\n" + "Construct from message and errno value.\n" + "\n" + "Xapian::FeatureUnavailableError::FeatureUnavailableError(const\n" + "std::string &msg_, int errno_) \n" + ""}, + { (char *)"delete_FeatureUnavailableError", (PyCFunction)_wrap_delete_FeatureUnavailableError, 0x0008, __null}, + { (char *)"FeatureUnavailableError_swigregister", FeatureUnavailableError_swigregister, 0x0001, __null}, + { (char *)"FeatureUnavailableError_swiginit", FeatureUnavailableError_swiginit, 0x0001, __null}, + { (char *)"new_InternalError", _wrap_new_InternalError, 0x0001, (char *)"\n" + "Construct from message and errno value.\n" + "\n" + "Xapian::InternalError::InternalError(const std::string &msg_, int\n" + "errno_) \n" + ""}, + { (char *)"delete_InternalError", (PyCFunction)_wrap_delete_InternalError, 0x0008, __null}, + { (char *)"InternalError_swigregister", InternalError_swigregister, 0x0001, __null}, + { (char *)"InternalError_swiginit", InternalError_swiginit, 0x0001, __null}, + { (char *)"new_NetworkError", _wrap_new_NetworkError, 0x0001, (char *)"\n" + "Construct from message and errno value.\n" + "\n" + "Xapian::NetworkError::NetworkError(const std::string &msg_, int\n" + "errno_) \n" + ""}, + { (char *)"delete_NetworkError", (PyCFunction)_wrap_delete_NetworkError, 0x0008, __null}, + { (char *)"NetworkError_swigregister", NetworkError_swigregister, 0x0001, __null}, + { (char *)"NetworkError_swiginit", NetworkError_swiginit, 0x0001, __null}, + { (char *)"new_NetworkTimeoutError", _wrap_new_NetworkTimeoutError, 0x0001, (char *)"\n" + "Construct from message and errno value.\n" + "\n" + "Xapian::NetworkTimeoutError::NetworkTimeoutError(const std::string\n" + "&msg_, int errno_) \n" + ""}, + { (char *)"delete_NetworkTimeoutError", (PyCFunction)_wrap_delete_NetworkTimeoutError, 0x0008, __null}, + { (char *)"NetworkTimeoutError_swigregister", NetworkTimeoutError_swigregister, 0x0001, __null}, + { (char *)"NetworkTimeoutError_swiginit", NetworkTimeoutError_swiginit, 0x0001, __null}, + { (char *)"new_QueryParserError", _wrap_new_QueryParserError, 0x0001, (char *)"\n" + "Construct from message and errno value.\n" + "\n" + "Xapian::QueryParserError::QueryParserError(const std::string &msg_,\n" + "int errno_) \n" + ""}, + { (char *)"delete_QueryParserError", (PyCFunction)_wrap_delete_QueryParserError, 0x0008, __null}, + { (char *)"QueryParserError_swigregister", QueryParserError_swigregister, 0x0001, __null}, + { (char *)"QueryParserError_swiginit", QueryParserError_swiginit, 0x0001, __null}, + { (char *)"new_SerialisationError", _wrap_new_SerialisationError, 0x0001, (char *)"\n" + "Construct from message and errno value.\n" + "\n" + "Xapian::SerialisationError::SerialisationError(const std::string\n" + "&msg_, int errno_) \n" + ""}, + { (char *)"delete_SerialisationError", (PyCFunction)_wrap_delete_SerialisationError, 0x0008, __null}, + { (char *)"SerialisationError_swigregister", SerialisationError_swigregister, 0x0001, __null}, + { (char *)"SerialisationError_swiginit", SerialisationError_swiginit, 0x0001, __null}, + { (char *)"new_RangeError", _wrap_new_RangeError, 0x0001, (char *)"\n" + "Construct from message and errno value.\n" + "\n" + "Xapian::RangeError::RangeError(const std::string &msg_, int errno_) \n" + ""}, + { (char *)"delete_RangeError", (PyCFunction)_wrap_delete_RangeError, 0x0008, __null}, + { (char *)"RangeError_swigregister", RangeError_swigregister, 0x0001, __null}, + { (char *)"RangeError_swiginit", RangeError_swiginit, 0x0001, __null}, + { (char *)"version_string", (PyCFunction)_wrap_version_string, 0x0004, __null}, + { (char *)"major_version", (PyCFunction)_wrap_major_version, 0x0004, __null}, + { (char *)"minor_version", (PyCFunction)_wrap_minor_version, 0x0004, __null}, + { (char *)"revision", (PyCFunction)_wrap_revision, 0x0004, __null}, + { (char *)"new_PositionIterator", _wrap_new_PositionIterator, 0x0001, (char *)"\n" + "Copying is allowed.\n" + "\n" + "Xapian::PositionIterator::PositionIterator(const PositionIterator &o)\n" + "\n" + "The internals are reference counted, so copying is also cheap. \n" + ""}, + { (char *)"delete_PositionIterator", (PyCFunction)_wrap_delete_PositionIterator, 0x0008, (char *)"\n" + "Destructor.\n" + "\n" + "Xapian::PositionIterator::~PositionIterator() \n" + ""}, + { (char *)"PositionIterator_get_termpos", (PyCFunction)_wrap_PositionIterator_get_termpos, 0x0008, __null}, + { (char *)"PositionIterator_next", (PyCFunction)_wrap_PositionIterator_next, 0x0008, __null}, + { (char *)"PositionIterator_equals", _wrap_PositionIterator_equals, 0x0001, __null}, + { (char *)"PositionIterator_skip_to", _wrap_PositionIterator_skip_to, 0x0001, (char *)"\n" + "Advance the iterator to the specified termpos.\n" + "\n" + "void Xapian::PositionIterator::skip_to(Xapian::termpos pos)\n" + "\n" + "If the specified termpos isn't in the list, position ourselves on the\n" + "first termpos after it (or at_end() if no greater term positions are\n" + "present). \n" + ""}, + { (char *)"PositionIterator___str__", (PyCFunction)_wrap_PositionIterator___str__, 0x0008, (char *)"\n" + "Return a string describing this object.\n" + "\n" + "std::string Xapian::PositionIterator::get_description() const \n" + ""}, + { (char *)"PositionIterator___eq__", _wrap_PositionIterator___eq__, 0x0001, __null}, + { (char *)"PositionIterator___ne__", _wrap_PositionIterator___ne__, 0x0001, __null}, + { (char *)"PositionIterator_swigregister", PositionIterator_swigregister, 0x0001, __null}, + { (char *)"PositionIterator_swiginit", PositionIterator_swiginit, 0x0001, __null}, + { (char *)"delete_PostingIterator", (PyCFunction)_wrap_delete_PostingIterator, 0x0008, (char *)"\n" + "Destructor.\n" + "\n" + "Xapian::PostingIterator::~PostingIterator() \n" + ""}, + { (char *)"new_PostingIterator", _wrap_new_PostingIterator, 0x0001, (char *)"\n" + "Copying is allowed.\n" + "\n" + "Xapian::PostingIterator::PostingIterator(const PostingIterator &other)\n" + "\n" + "The internals are reference counted, so copying is also cheap. \n" + ""}, + { (char *)"PostingIterator_skip_to", _wrap_PostingIterator_skip_to, 0x0001, (char *)"\n" + "Advance the iterator to the specified docid.\n" + "\n" + "void Xapian::PostingIterator::skip_to(Xapian::docid did)\n" + "\n" + "If the specified docid isn't in the list, position ourselves on the\n" + "first document after it (or at_end() if no greater docids are\n" + "present). \n" + ""}, + { (char *)"PostingIterator_get_doclength", (PyCFunction)_wrap_PostingIterator_get_doclength, 0x0008, (char *)"\n" + "Get the length of the document at the current position in the\n" + "postlist.\n" + "\n" + "Xapian::termcount Xapian::PostingIterator::get_doclength() const\n" + "\n" + "This information may be stored in the postlist, in which case this\n" + "lookup should be extremely fast (indeed, not require further disk\n" + "access). If the information is not present in the postlist, it will be\n" + "retrieved from the database, at a greater performance cost. \n" + ""}, + { (char *)"PostingIterator_get_wdf", (PyCFunction)_wrap_PostingIterator_get_wdf, 0x0008, (char *)"\n" + "Get the within document frequency of the document at the current\n" + "position in the postlist.\n" + "\n" + "Xapian::termcount Xapian::PostingIterator::get_wdf() const \n" + ""}, + { (char *)"PostingIterator_positionlist_begin", (PyCFunction)_wrap_PostingIterator_positionlist_begin, 0x0008, (char *)"\n" + "Return PositionIterator pointing to start of positionlist for current\n" + "document.\n" + "\n" + "PositionIterator Xapian::PostingIterator::positionlist_begin() const\n" + "\n" + ""}, + { (char *)"PostingIterator_positionlist_end", (PyCFunction)_wrap_PostingIterator_positionlist_end, 0x0008, (char *)"\n" + "Return PositionIterator pointing to end of positionlist for current\n" + "document.\n" + "\n" + "PositionIterator Xapian::PostingIterator::positionlist_end() const \n" + ""}, + { (char *)"PostingIterator___str__", (PyCFunction)_wrap_PostingIterator___str__, 0x0008, (char *)"\n" + "Return a string describing this object.\n" + "\n" + "std::string Xapian::PostingIterator::get_description() const \n" + ""}, + { (char *)"PostingIterator___eq__", _wrap_PostingIterator___eq__, 0x0001, __null}, + { (char *)"PostingIterator___ne__", _wrap_PostingIterator___ne__, 0x0001, __null}, + { (char *)"PostingIterator_get_docid", (PyCFunction)_wrap_PostingIterator_get_docid, 0x0008, __null}, + { (char *)"PostingIterator_next", (PyCFunction)_wrap_PostingIterator_next, 0x0008, __null}, + { (char *)"PostingIterator_equals", _wrap_PostingIterator_equals, 0x0001, __null}, + { (char *)"PostingIterator_swigregister", PostingIterator_swigregister, 0x0001, __null}, + { (char *)"PostingIterator_swiginit", PostingIterator_swiginit, 0x0001, __null}, + { (char *)"__eq__", _wrap___eq__, 0x0001, __null}, + { (char *)"__ne__", _wrap___ne__, 0x0001, __null}, + { (char *)"new_TermIterator", _wrap_new_TermIterator, 0x0001, (char *)"\n" + "Copying is allowed.\n" + "\n" + "Xapian::TermIterator::TermIterator(const TermIterator &other)\n" + "\n" + "The internals are reference counted, so copying is also cheap. \n" + ""}, + { (char *)"delete_TermIterator", (PyCFunction)_wrap_delete_TermIterator, 0x0008, (char *)"\n" + "Destructor.\n" + "\n" + "Xapian::TermIterator::~TermIterator() \n" + ""}, + { (char *)"TermIterator_get_term", (PyCFunction)_wrap_TermIterator_get_term, 0x0008, __null}, + { (char *)"TermIterator_next", (PyCFunction)_wrap_TermIterator_next, 0x0008, __null}, + { (char *)"TermIterator_equals", _wrap_TermIterator_equals, 0x0001, __null}, + { (char *)"TermIterator_skip_to", _wrap_TermIterator_skip_to, 0x0001, (char *)"\n" + "Advance the iterator to the specified term.\n" + "\n" + "void Xapian::TermIterator::skip_to(const std::string &tname)\n" + "\n" + "If the specified term isn't in the list, position ourselves on the\n" + "first term after it (or at_end() if no greater terms are present). \n" + ""}, + { (char *)"TermIterator_get_wdf", (PyCFunction)_wrap_TermIterator_get_wdf, 0x0008, (char *)"\n" + "Return the wdf of the current term (if meaningful).\n" + "\n" + "Xapian::termcount Xapian::TermIterator::get_wdf() const\n" + "\n" + "The wdf (within document frequency) is the number of occurences of a\n" + "term in a particular document. \n" + ""}, + { (char *)"TermIterator_get_termfreq", (PyCFunction)_wrap_TermIterator_get_termfreq, 0x0008, (char *)"\n" + "Return the term frequency of the current term (if meaningful).\n" + "\n" + "Xapian::doccount Xapian::TermIterator::get_termfreq() const\n" + "\n" + "The term frequency is the number of documents which a term indexes. \n" + ""}, + { (char *)"TermIterator_positionlist_begin", (PyCFunction)_wrap_TermIterator_positionlist_begin, 0x0008, (char *)"\n" + "Return PositionIterator pointing to start of positionlist for current\n" + "term.\n" + "\n" + "PositionIterator Xapian::TermIterator::positionlist_begin() const \n" + ""}, + { (char *)"TermIterator_positionlist_end", (PyCFunction)_wrap_TermIterator_positionlist_end, 0x0008, (char *)"\n" + "Return PositionIterator pointing to end of positionlist for current\n" + "term.\n" + "\n" + "PositionIterator Xapian::TermIterator::positionlist_end() const \n" + ""}, + { (char *)"TermIterator___str__", (PyCFunction)_wrap_TermIterator___str__, 0x0008, (char *)"\n" + "Return a string describing this object.\n" + "\n" + "std::string Xapian::TermIterator::get_description() const \n" + ""}, + { (char *)"TermIterator___eq__", _wrap_TermIterator___eq__, 0x0001, __null}, + { (char *)"TermIterator___ne__", _wrap_TermIterator___ne__, 0x0001, __null}, + { (char *)"TermIterator_swigregister", TermIterator_swigregister, 0x0001, __null}, + { (char *)"TermIterator_swiginit", TermIterator_swiginit, 0x0001, __null}, + { (char *)"new_ValueIterator", _wrap_new_ValueIterator, 0x0001, (char *)"\n" + "Default constructor.\n" + "\n" + "Xapian::ValueIterator::ValueIterator()\n" + "\n" + "Creates an uninitialised iterator, which can't be used before being\n" + "assigned to, but is sometimes syntactically convenient. \n" + ""}, + { (char *)"delete_ValueIterator", (PyCFunction)_wrap_delete_ValueIterator, 0x0008, (char *)"\n" + "Destructor.\n" + "\n" + "Xapian::ValueIterator::~ValueIterator() \n" + ""}, + { (char *)"ValueIterator_get_value", (PyCFunction)_wrap_ValueIterator_get_value, 0x0008, __null}, + { (char *)"ValueIterator_next", (PyCFunction)_wrap_ValueIterator_next, 0x0008, __null}, + { (char *)"ValueIterator_equals", _wrap_ValueIterator_equals, 0x0001, __null}, + { (char *)"ValueIterator_get_docid", (PyCFunction)_wrap_ValueIterator_get_docid, 0x0008, (char *)"\n" + "Return the docid at the current position.\n" + "\n" + "Xapian::docid Xapian::ValueIterator::get_docid() const\n" + "\n" + "If we're iterating over values of a document, this method will throw\n" + "Xapian::InvalidOperationError. \n" + ""}, + { (char *)"ValueIterator_get_valueno", (PyCFunction)_wrap_ValueIterator_get_valueno, 0x0008, (char *)"\n" + "Return the value slot number for the current position.\n" + "\n" + "Xapian::valueno Xapian::ValueIterator::get_valueno() const\n" + "\n" + "If the iterator is over all values in a slot, this returns that slot's\n" + "number. If the iterator is over the values in a particular document,\n" + "it returns the number of each slot in turn. \n" + ""}, + { (char *)"ValueIterator_skip_to", _wrap_ValueIterator_skip_to, 0x0001, (char *)"\n" + "Advance the iterator to document id or value slot docid_or_slot.\n" + "\n" + "void Xapian::ValueIterator::skip_to(Xapian::docid docid_or_slot)\n" + "\n" + "If this iterator is over values in a document, then this method\n" + "advances the iterator to value slot docid_or_slot, or the first slot\n" + "after it if there is no value in slot slot.\n" + "\n" + "If this iterator is over values in a particular slot, then this method\n" + "advances the iterator to document id docid_or_slot, or the first\n" + "document id after it if there is no value in the slot we're iterating\n" + "over for document docid_or_slot.\n" + "\n" + "Note: The \"two-faced\" nature of this method is due to how C++\n" + "overloading works. Xapian::docid and Xapian::valueno are both typedefs\n" + "for the same unsigned integer type, so overloading can't distinguish\n" + "them. \n" + ""}, + { (char *)"ValueIterator_check", _wrap_ValueIterator_check, 0x0001, (char *)"\n" + "Check if the specified docid occurs.\n" + "\n" + "bool Xapian::ValueIterator::check(Xapian::docid docid)\n" + "\n" + "The caller is required to ensure that the specified document id did\n" + "actually exists in the database.\n" + "\n" + "This method acts like skip_to() if that can be done at little extra\n" + "cost, in which case it then returns true. This is how brass and chert\n" + "databases behave because they store values in streams which allow for\n" + "an efficient implementation of skip_to().\n" + "\n" + "Otherwise it simply checks if a particular docid is present. If it is,\n" + "it returns true. If it isn't, it returns false, and leaves the\n" + "position unspecified (and hence the result of calling methods which\n" + "depends on the current position, such as get_docid(), are also\n" + "unspecified). In this state, next() will advance to the first matching\n" + "position after document did, and skip_to() will act as it would if the\n" + "position was the first matching position after document did.\n" + "\n" + "Currently the inmemory, flint, and remote backends behave in the\n" + "latter way because they don't support streamed values and so skip_to()\n" + "must check each document it skips over which is significantly slower.\n" + "\n" + ""}, + { (char *)"ValueIterator___str__", (PyCFunction)_wrap_ValueIterator___str__, 0x0008, (char *)"\n" + "Return a string describing this object.\n" + "\n" + "std::string Xapian::ValueIterator::get_description() const \n" + ""}, + { (char *)"ValueIterator___eq__", _wrap_ValueIterator___eq__, 0x0001, __null}, + { (char *)"ValueIterator___ne__", _wrap_ValueIterator___ne__, 0x0001, __null}, + { (char *)"ValueIterator_swigregister", ValueIterator_swigregister, 0x0001, __null}, + { (char *)"ValueIterator_swiginit", ValueIterator_swiginit, 0x0001, __null}, + { (char *)"new_Document", _wrap_new_Document, 0x0001, (char *)"\n" + "Make a new empty Document.\n" + "\n" + "Xapian::Document::Document() \n" + ""}, + { (char *)"delete_Document", (PyCFunction)_wrap_delete_Document, 0x0008, (char *)"\n" + "Destructor.\n" + "\n" + "Xapian::Document::~Document() \n" + ""}, + { (char *)"Document_get_value", _wrap_Document_get_value, 0x0001, (char *)"\n" + "Get value by number.\n" + "\n" + "std::string Xapian::Document::get_value(Xapian::valueno valueno) const\n" + "\n" + "Returns an empty string if no value with the given number is present\n" + "in the document.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "valueno: The number of the value. \n" + ""}, + { (char *)"Document_add_value", _wrap_Document_add_value, 0x0001, (char *)"\n" + "Add a new value.\n" + "\n" + "void Xapian::Document::add_value(Xapian::valueno valueno, const\n" + "std::string &value)\n" + "\n" + "The new value will replace any existing value with the same number (or\n" + "if the new value is empty, it will remove any existing value with the\n" + "same number). \n" + ""}, + { (char *)"Document_remove_value", _wrap_Document_remove_value, 0x0001, (char *)"\n" + "Remove any value with the given number.\n" + "\n" + "void Xapian::Document::remove_value(Xapian::valueno valueno) \n" + ""}, + { (char *)"Document_clear_values", (PyCFunction)_wrap_Document_clear_values, 0x0008, (char *)"\n" + "Remove all values associated with the document.\n" + "\n" + "void Xapian::Document::clear_values() \n" + ""}, + { (char *)"Document_get_data", (PyCFunction)_wrap_Document_get_data, 0x0008, (char *)"\n" + "Get data stored in the document.\n" + "\n" + "std::string Xapian::Document::get_data() const\n" + "\n" + "This is a potentially expensive operation, and shouldn't normally be\n" + "used in a match decider functor. Put data for use by match deciders in\n" + "a value instead. \n" + ""}, + { (char *)"Document_set_data", _wrap_Document_set_data, 0x0001, (char *)"\n" + "Set data stored in the document.\n" + "\n" + "void Xapian::Document::set_data(const std::string &data) \n" + ""}, + { (char *)"Document_add_posting", _wrap_Document_add_posting, 0x0001, (char *)"\n" + "Add an occurrence of a term at a particular position.\n" + "\n" + "void Xapian::Document::add_posting(const std::string &tname,\n" + "Xapian::termpos tpos, Xapian::termcount wdfinc=1)\n" + "\n" + "Multiple occurrences of the term at the same position are represented\n" + "only once in the positional information, but do increase the wdf.\n" + "\n" + "If the term is not already in the document, it will be added to it.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "tname: The name of the term.\n" + "\n" + "tpos: The position of the term.\n" + "\n" + "wdfinc: The increment that will be applied to the wdf for this term.\n" + "\n" + ""}, + { (char *)"Document_add_term", _wrap_Document_add_term, 0x0001, (char *)"\n" + "Add a term to the document, without positional information.\n" + "\n" + "void Xapian::Document::add_term(const std::string &tname,\n" + "Xapian::termcount wdfinc=1)\n" + "\n" + "Any existing positional information for the term will be left\n" + "unmodified.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "tname: The name of the term.\n" + "\n" + "wdfinc: The increment that will be applied to the wdf for this term\n" + "(default: 1). \n" + ""}, + { (char *)"Document_add_boolean_term", _wrap_Document_add_boolean_term, 0x0001, (char *)"\n" + "Add a boolean filter term to the document.\n" + "\n" + "void Xapian::Document::add_boolean_term(const std::string &term)\n" + "\n" + "This method adds term to the document with wdf of 0 - this is\n" + "generally what you want for a term used for boolean filtering as the\n" + "wdf of such terms is ignored, and it doesn't make sense for them to\n" + "contribute to the document's length.\n" + "\n" + "If the specified term already indexes this document, this method has\n" + "no effect.\n" + "\n" + "It is exactly the same as add_term(term, 0).\n" + "\n" + "This method was added in Xapian 1.0.18.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "term: The term to add. \n" + ""}, + { (char *)"Document_remove_posting", _wrap_Document_remove_posting, 0x0001, (char *)"\n" + "Remove a posting of a term from the document.\n" + "\n" + "void Xapian::Document::remove_posting(const std::string &tname,\n" + "Xapian::termpos tpos, Xapian::termcount wdfdec=1)\n" + "\n" + "Note that the term will still index the document even if all\n" + "occurrences are removed. To remove a term from a document completely,\n" + "use remove_term().\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "tname: The name of the term.\n" + "\n" + "tpos: The position of the term.\n" + "\n" + "wdfdec: The decrement that will be applied to the wdf when removing\n" + "this posting. The wdf will not go below the value of 0.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "Xapian::InvalidArgumentError: will be thrown if the term is not at\n" + "the position specified in the position list for this term in this\n" + "document.\n" + "\n" + "Xapian::InvalidArgumentError: will be thrown if the term is not in\n" + "the document \n" + ""}, + { (char *)"Document_remove_term", _wrap_Document_remove_term, 0x0001, (char *)"\n" + "Remove a term and all postings associated with it.\n" + "\n" + "void Xapian::Document::remove_term(const std::string &tname)\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "tname: The name of the term.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "Xapian::InvalidArgumentError: will be thrown if the term is not in\n" + "the document \n" + ""}, + { (char *)"Document_clear_terms", (PyCFunction)_wrap_Document_clear_terms, 0x0008, (char *)"\n" + "Remove all terms (and postings) from the document.\n" + "\n" + "void Xapian::Document::clear_terms() \n" + ""}, + { (char *)"Document_termlist_count", (PyCFunction)_wrap_Document_termlist_count, 0x0008, (char *)"\n" + "The length of the termlist - i.e.\n" + "\n" + "Xapian::termcount Xapian::Document::termlist_count() const\n" + "\n" + "the number of different terms which index this document. \n" + ""}, + { (char *)"Document_termlist_begin", (PyCFunction)_wrap_Document_termlist_begin, 0x0008, (char *)"\n" + "Iterator for the terms in this document.\n" + "\n" + "TermIterator Xapian::Document::termlist_begin() const \n" + ""}, + { (char *)"Document_termlist_end", (PyCFunction)_wrap_Document_termlist_end, 0x0008, (char *)"\n" + "Equivalent end iterator for termlist_begin().\n" + "\n" + "TermIterator Xapian::Document::termlist_end() const \n" + ""}, + { (char *)"Document_values_count", (PyCFunction)_wrap_Document_values_count, 0x0008, (char *)"\n" + "Count the values in this document.\n" + "\n" + "Xapian::termcount Xapian::Document::values_count() const \n" + ""}, + { (char *)"Document_values_begin", (PyCFunction)_wrap_Document_values_begin, 0x0008, (char *)"\n" + "Iterator for the values in this document.\n" + "\n" + "ValueIterator Xapian::Document::values_begin() const \n" + ""}, + { (char *)"Document_values_end", (PyCFunction)_wrap_Document_values_end, 0x0008, (char *)"\n" + "Equivalent end iterator for values_begin().\n" + "\n" + "ValueIteratorEnd_ Xapian::Document::values_end() const \n" + ""}, + { (char *)"Document_get_docid", (PyCFunction)_wrap_Document_get_docid, 0x0008, (char *)"\n" + "Get the document id which is associated with this document (if any).\n" + "\n" + "docid Xapian::Document::get_docid() const\n" + "\n" + "NB If multiple databases are being searched together, then this will\n" + "be the document id in the individual database, not the merged\n" + "database!\n" + "\n" + "If this document came from a database, return the document id in that\n" + "database. Otherwise, return 0 (in Xapian 1.0.22/1.2.4 or later; prior\n" + "to this the returned value was uninitialised). \n" + ""}, + { (char *)"Document_serialise", (PyCFunction)_wrap_Document_serialise, 0x0008, (char *)"\n" + "Serialise document into a string.\n" + "\n" + "std::string Xapian::Document::serialise() const\n" + "\n" + "The document representation may change between Xapian releases: even\n" + "between minor versions. However, it is guaranteed not to change if the\n" + "remote database protocol has not changed between releases. \n" + ""}, + { (char *)"Document_unserialise", (PyCFunction)_wrap_Document_unserialise, 0x0008, __null}, + { (char *)"Document___str__", (PyCFunction)_wrap_Document___str__, 0x0008, (char *)"\n" + "Return a string describing this object.\n" + "\n" + "std::string Xapian::Document::get_description() const \n" + ""}, + { (char *)"Document_swigregister", Document_swigregister, 0x0001, __null}, + { (char *)"Document_swiginit", Document_swiginit, 0x0001, __null}, + { (char *)"new_PostingSource", (PyCFunction)_wrap_new_PostingSource, 0x0008, __null}, + { (char *)"delete_PostingSource", (PyCFunction)_wrap_delete_PostingSource, 0x0008, (char *)"\n" + "virtual\n" + "Xapian::PostingSource::~PostingSource() \n" + ""}, + { (char *)"PostingSource_get_termfreq_min", (PyCFunction)_wrap_PostingSource_get_termfreq_min, 0x0008, (char *)"\n" + "A lower bound on the number of documents this object can return.\n" + "\n" + "virtual Xapian::doccount Xapian::PostingSource::get_termfreq_min()\n" + "const =0\n" + "\n" + "Xapian will always call init() on a PostingSource before calling this\n" + "for the first time. \n" + ""}, + { (char *)"PostingSource_get_termfreq_est", (PyCFunction)_wrap_PostingSource_get_termfreq_est, 0x0008, (char *)"\n" + "An estimate of the number of documents this object can return.\n" + "\n" + "virtual Xapian::doccount Xapian::PostingSource::get_termfreq_est()\n" + "const =0\n" + "\n" + "It must always be true that:\n" + "\n" + "get_termfreq_min() <= get_termfreq_est() <= get_termfreq_max()\n" + "\n" + "Xapian will always call init() on a PostingSource before calling this\n" + "for the first time. \n" + ""}, + { (char *)"PostingSource_get_termfreq_max", (PyCFunction)_wrap_PostingSource_get_termfreq_max, 0x0008, (char *)"\n" + "An upper bound on the number of documents this object can return.\n" + "\n" + "virtual Xapian::doccount Xapian::PostingSource::get_termfreq_max()\n" + "const =0\n" + "\n" + "Xapian will always call init() on a PostingSource before calling this\n" + "for the first time. \n" + ""}, + { (char *)"PostingSource_get_maxweight", (PyCFunction)_wrap_PostingSource_get_maxweight, 0x0008, (char *)"\n" + "Return the currently set upper bound on what get_weight() can return.\n" + "\n" + "Xapian::weight Xapian::PostingSource::get_maxweight() const \n" + ""}, + { (char *)"PostingSource_get_weight", (PyCFunction)_wrap_PostingSource_get_weight, 0x0008, (char *)"\n" + "Return the weight contribution for the current document.\n" + "\n" + "virtual Xapian::weight Xapian::PostingSource::get_weight() const\n" + "\n" + "This default implementation always returns 0, for convenience when\n" + "implementing \"weight-less\" PostingSource subclasses.\n" + "\n" + "This method may assume that it will only be called when there is a\n" + "\"current document\". In detail: Xapian will always call init() on a\n" + "PostingSource before calling this for the first time. It will also\n" + "only call this if the PostingSource reports that it is pointing to a\n" + "valid document (ie, it will not call it before calling at least one of\n" + "next(), skip_to() or check(), and will ensure that the PostingSource\n" + "is not at the end by calling at_end()). \n" + ""}, + { (char *)"PostingSource_get_docid", (PyCFunction)_wrap_PostingSource_get_docid, 0x0008, (char *)"\n" + "Return the current docid.\n" + "\n" + "virtual Xapian::docid Xapian::PostingSource::get_docid() const =0\n" + "\n" + "This method may assume that it will only be called when there is a\n" + "\"current document\". See get_weight() for details.\n" + "\n" + "Note: in the case of a multi-database search, the returned docid\n" + "should be in the single subdatabase relevant to this posting source.\n" + "See the init() method for details. \n" + ""}, + { (char *)"PostingSource_next", _wrap_PostingSource_next, 0x0001, (char *)"\n" + "Advance the current position to the next matching document.\n" + "\n" + "virtual void Xapian::PostingSource::next(Xapian::weight min_wt)=0\n" + "\n" + "The PostingSource starts before the first entry in the list, so next()\n" + "must be called before any methods which need the context of the\n" + "current position.\n" + "\n" + "Xapian will always call init() on a PostingSource before calling this\n" + "for the first time.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "min_wt: The minimum weight contribution that is needed (this is just\n" + "a hint which subclasses may ignore). \n" + ""}, + { (char *)"PostingSource_skip_to", _wrap_PostingSource_skip_to, 0x0001, (char *)"\n" + "Advance to the specified docid.\n" + "\n" + "virtual void Xapian::PostingSource::skip_to(Xapian::docid did,\n" + "Xapian::weight min_wt)\n" + "\n" + "If the specified docid isn't in the list, position ourselves on the\n" + "first document after it (or at_end() if no greater docids are\n" + "present).\n" + "\n" + "If the current position is already the specified docid, this method\n" + "will leave the position unmodified.\n" + "\n" + "If the specified docid is earlier than the current position, the\n" + "behaviour is unspecified. A sensible behaviour would be to leave the\n" + "current position unmodified, but it is also reasonable to move to the\n" + "specified docid.\n" + "\n" + "The default implementation calls next() repeatedly, which works but\n" + "skip_to() can often be implemented much more efficiently.\n" + "\n" + "Xapian will always call init() on a PostingSource before calling this\n" + "for the first time.\n" + "\n" + "Note: in the case of a multi-database search, the docid specified is\n" + "the docid in the single subdatabase relevant to this posting source.\n" + "See the init() method for details.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "min_wt: The minimum weight contribution that is needed (this is just\n" + "a hint which subclasses may ignore). \n" + ""}, + { (char *)"PostingSource_check", _wrap_PostingSource_check, 0x0001, (char *)"\n" + "Check if the specified docid occurs.\n" + "\n" + "virtual bool Xapian::PostingSource::check(Xapian::docid did,\n" + "Xapian::weight min_wt)\n" + "\n" + "The caller is required to ensure that the specified document id did\n" + "actually exists in the database. If it does, it must move to that\n" + "document id, and return true. If it does not, it may either:\n" + "\n" + "return true, having moved to a definite position (including\n" + "\"at_end\"), which must be the same position as skip_to() would have\n" + "moved to.\n" + "\n" + "or\n" + "\n" + "return false, having moved to an \"indeterminate\" position, such that\n" + "a subsequent call to next() or skip_to() will move to the next\n" + "matching position after did.\n" + "\n" + "Generally, this method should act like skip_to() and return true if\n" + "that can be done at little extra cost.\n" + "\n" + "Otherwise it should simply check if a particular docid is present,\n" + "returning true if it is, and false if it isn't.\n" + "\n" + "The default implementation calls skip_to() and always returns true.\n" + "\n" + "Xapian will always call init() on a PostingSource before calling this\n" + "for the first time.\n" + "\n" + "Note: in the case of a multi-database search, the docid specified is\n" + "the docid in the single subdatabase relevant to this posting source.\n" + "See the init() method for details. \n" + ""}, + { (char *)"PostingSource_at_end", (PyCFunction)_wrap_PostingSource_at_end, 0x0008, (char *)"\n" + "Return true if the current position is past the last entry in this\n" + "list.\n" + "\n" + "virtual bool Xapian::PostingSource::at_end() const =0\n" + "\n" + "At least one of next(), skip_to() or check() will be called before\n" + "this method is first called. \n" + ""}, + { (char *)"PostingSource_name", (PyCFunction)_wrap_PostingSource_name, 0x0008, (char *)"\n" + "Name of the posting source class.\n" + "\n" + "virtual std::string Xapian::PostingSource::name() const\n" + "\n" + "This is used when serialising and unserialising posting sources; for\n" + "example, for performing remote searches.\n" + "\n" + "If the subclass is in a C++ namespace, the namespace should be\n" + "included in the name, using \"::\" as a separator. For example, for a\n" + "PostingSource subclass called \"FooPostingSource\" in the \"Xapian\"\n" + "namespace the result of this call should be\n" + "\"Xapian::FooPostingSource\".\n" + "\n" + "This should only be implemented if serialise() and unserialise() are\n" + "also implemented. The default implementation returns an empty string.\n" + "\n" + "If this returns an empty string, Xapian will assume that serialise()\n" + "and unserialise() are not implemented. \n" + ""}, + { (char *)"PostingSource_init", _wrap_PostingSource_init, 0x0001, (char *)"\n" + "Set this PostingSource to the start of the list of postings.\n" + "\n" + "virtual void Xapian::PostingSource::init(const Database &db)=0\n" + "\n" + "This is called automatically by the matcher prior to each query being\n" + "processed.\n" + "\n" + "If a PostingSource is used for multiple searches, init() will\n" + "therefore be called multiple times, and must handle this by using the\n" + "database passed in the most recent call.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "db: The database which the PostingSource should iterate through.\n" + "\n" + "Note: the database supplied to this method must not be modified: in\n" + "particular, the reopen() method should not be called on it.\n" + "\n" + "Note: in the case of a multi-database search, a separate PostingSource\n" + "will be used for each database (the separate PostingSources will be\n" + "obtained using clone()), and each PostingSource will be passed one of\n" + "the sub-databases as the db parameter here. The db parameter will\n" + "therefore always refer to a single database. All docids passed to, or\n" + "returned from, the PostingSource refer to docids in that single\n" + "database, rather than in the multi- database. \n" + ""}, + { (char *)"PostingSource___str__", (PyCFunction)_wrap_PostingSource___str__, 0x0008, (char *)"\n" + "Return a string describing this object.\n" + "\n" + "virtual std::string Xapian::PostingSource::get_description() const\n" + "\n" + "This default implementation returns a generic answer. This default it\n" + "provided to avoid forcing those deriving their own PostingSource\n" + "subclass from having to implement this (they may not care what\n" + "get_description() gives for their subclass). \n" + ""}, + { (char *)"disown_PostingSource", (PyCFunction)_wrap_disown_PostingSource, 0x0008, __null}, + { (char *)"PostingSource_swigregister", PostingSource_swigregister, 0x0001, __null}, + { (char *)"PostingSource_swiginit", PostingSource_swiginit, 0x0001, __null}, + { (char *)"new_ValuePostingSource", (PyCFunction)_wrap_new_ValuePostingSource, 0x0008, (char *)"\n" + "Construct a ValuePostingSource.\n" + "\n" + "Xapian::ValuePostingSource::ValuePostingSource(Xapian::valueno slot_)\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "slot_: The value slot to read values from. \n" + ""}, + { (char *)"delete_ValuePostingSource", (PyCFunction)_wrap_delete_ValuePostingSource, 0x0008, __null}, + { (char *)"ValuePostingSource_swigregister", ValuePostingSource_swigregister, 0x0001, __null}, + { (char *)"ValuePostingSource_swiginit", ValuePostingSource_swiginit, 0x0001, __null}, + { (char *)"new_ValueWeightPostingSource", (PyCFunction)_wrap_new_ValueWeightPostingSource, 0x0008, (char *)"\n" + "Construct a ValueWeightPostingSource.\n" + "\n" + "Xapian::ValueWeightPostingSource::ValueWeightPostingSource(Xapian::valueno\n" + "slot_)\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "slot_: The value slot to read values from. \n" + ""}, + { (char *)"delete_ValueWeightPostingSource", (PyCFunction)_wrap_delete_ValueWeightPostingSource, 0x0008, __null}, + { (char *)"ValueWeightPostingSource_swigregister", ValueWeightPostingSource_swigregister, 0x0001, __null}, + { (char *)"ValueWeightPostingSource_swiginit", ValueWeightPostingSource_swiginit, 0x0001, __null}, + { (char *)"new_DecreasingValueWeightPostingSource", _wrap_new_DecreasingValueWeightPostingSource, 0x0001, (char *)"\n" + "Xapian::DecreasingValueWeightPostingSource::DecreasingValueWeightPostingSource(Xapian::valueno\n" + "slot_, Xapian::docid range_start_=0, Xapian::docid range_end_=0) \n" + ""}, + { (char *)"delete_DecreasingValueWeightPostingSource", (PyCFunction)_wrap_delete_DecreasingValueWeightPostingSource, 0x0008, __null}, + { (char *)"DecreasingValueWeightPostingSource_swigregister", DecreasingValueWeightPostingSource_swigregister, 0x0001, __null}, + { (char *)"DecreasingValueWeightPostingSource_swiginit", DecreasingValueWeightPostingSource_swiginit, 0x0001, __null}, + { (char *)"new_ValueMapPostingSource", (PyCFunction)_wrap_new_ValueMapPostingSource, 0x0008, (char *)"\n" + "Construct a ValueWeightPostingSource.\n" + "\n" + "Xapian::ValueMapPostingSource::ValueMapPostingSource(Xapian::valueno\n" + "slot_)\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "slot_: The value slot to read values from. \n" + ""}, + { (char *)"ValueMapPostingSource_add_mapping", _wrap_ValueMapPostingSource_add_mapping, 0x0001, (char *)"\n" + "Add a mapping.\n" + "\n" + "void Xapian::ValueMapPostingSource::add_mapping(const std::string\n" + "&key, double weight)\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "key: The key looked up from the value slot.\n" + "\n" + "weight: The weight to give this key. \n" + ""}, + { (char *)"ValueMapPostingSource_clear_mappings", (PyCFunction)_wrap_ValueMapPostingSource_clear_mappings, 0x0008, (char *)"\n" + "Clear all mappings.\n" + "\n" + "void Xapian::ValueMapPostingSource::clear_mappings() \n" + ""}, + { (char *)"ValueMapPostingSource_set_default_weight", _wrap_ValueMapPostingSource_set_default_weight, 0x0001, (char *)"\n" + "Set a default weight for document values not in the map.\n" + "\n" + "void Xapian::ValueMapPostingSource::set_default_weight(double wt) \n" + ""}, + { (char *)"delete_ValueMapPostingSource", (PyCFunction)_wrap_delete_ValueMapPostingSource, 0x0008, __null}, + { (char *)"ValueMapPostingSource_swigregister", ValueMapPostingSource_swigregister, 0x0001, __null}, + { (char *)"ValueMapPostingSource_swiginit", ValueMapPostingSource_swiginit, 0x0001, __null}, + { (char *)"new_FixedWeightPostingSource", (PyCFunction)_wrap_new_FixedWeightPostingSource, 0x0008, (char *)"\n" + "Construct a FixedWeightPostingSource.\n" + "\n" + "Xapian::FixedWeightPostingSource::FixedWeightPostingSource(Xapian::weight\n" + "wt)\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "wt: The fixed weight to return. \n" + ""}, + { (char *)"delete_FixedWeightPostingSource", (PyCFunction)_wrap_delete_FixedWeightPostingSource, 0x0008, __null}, + { (char *)"FixedWeightPostingSource_swigregister", FixedWeightPostingSource_swigregister, 0x0001, __null}, + { (char *)"FixedWeightPostingSource_swiginit", FixedWeightPostingSource_swiginit, 0x0001, __null}, + { (char *)"new_MSet", _wrap_new_MSet, 0x0001, (char *)"\n" + "Copying is allowed (and is cheap).\n" + "\n" + "Xapian::MSet::MSet(const MSet &other) \n" + ""}, + { (char *)"delete_MSet", (PyCFunction)_wrap_delete_MSet, 0x0008, (char *)"\n" + "Destroy a Xapian::MSet.\n" + "\n" + "Xapian::MSet::~MSet() \n" + ""}, + { (char *)"MSet_fetch", _wrap_MSet_fetch, 0x0001, (char *)"\n" + "Fetch all the items in the MSet.\n" + "\n" + "void Xapian::MSet::fetch() const \n" + ""}, + { (char *)"MSet_convert_to_percent", _wrap_MSet_convert_to_percent, 0x0001, (char *)"\n" + "Return the percentage score for a particular item.\n" + "\n" + "Xapian::percent Xapian::MSet::convert_to_percent(const MSetIterator\n" + "&it) const \n" + ""}, + { (char *)"MSet_get_termfreq", _wrap_MSet_get_termfreq, 0x0001, (char *)"\n" + "Return the term frequency of the given query term.\n" + "\n" + "Xapian::doccount Xapian::MSet::get_termfreq(const std::string &tname)\n" + "const\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "tname: The term to look for.\n" + "\n" + "This is sometimes more efficient than asking the database directly for\n" + "the term frequency - in particular, if the term was in the query, its\n" + "frequency will usually be cached in the MSet. \n" + ""}, + { (char *)"MSet_get_termweight", _wrap_MSet_get_termweight, 0x0001, (char *)"\n" + "Return the term weight of the given query term.\n" + "\n" + "Xapian::weight Xapian::MSet::get_termweight(const std::string &tname)\n" + "const\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "tname: The term to look for.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "Xapian::InvalidArgumentError: is thrown if the term was not in the\n" + "query. \n" + ""}, + { (char *)"MSet_get_firstitem", (PyCFunction)_wrap_MSet_get_firstitem, 0x0008, (char *)"\n" + "The index of the first item in the result which was put into the MSet.\n" + "\n" + "Xapian::doccount Xapian::MSet::get_firstitem() const\n" + "\n" + "This corresponds to the parameter \"first\" specified in\n" + "Xapian::Enquire::get_mset(). A value of 0 corresponds to the highest\n" + "result being the first item in the MSet. \n" + ""}, + { (char *)"MSet_get_matches_lower_bound", (PyCFunction)_wrap_MSet_get_matches_lower_bound, 0x0008, (char *)"\n" + "A lower bound on the number of documents in the database which match\n" + "the query.\n" + "\n" + "Xapian::doccount Xapian::MSet::get_matches_lower_bound() const\n" + "\n" + "This figure takes into account collapsing of duplicates, and weighting\n" + "cutoff values.\n" + "\n" + "This number is usually considerably less than the actual number of\n" + "documents which match the query. \n" + ""}, + { (char *)"MSet_get_matches_estimated", (PyCFunction)_wrap_MSet_get_matches_estimated, 0x0008, (char *)"\n" + "An estimate for the number of documents in the database which match\n" + "the query.\n" + "\n" + "Xapian::doccount Xapian::MSet::get_matches_estimated() const\n" + "\n" + "This figure takes into account collapsing of duplicates, and weighting\n" + "cutoff values.\n" + "\n" + "This value is returned because there is sometimes a request to display\n" + "such information. However, our experience is that presenting this\n" + "value to users causes them to worry about the large number of results,\n" + "rather than how useful those at the top of the result set are, and is\n" + "thus undesirable. \n" + ""}, + { (char *)"MSet_get_matches_upper_bound", (PyCFunction)_wrap_MSet_get_matches_upper_bound, 0x0008, (char *)"\n" + "An upper bound on the number of documents in the database which match\n" + "the query.\n" + "\n" + "Xapian::doccount Xapian::MSet::get_matches_upper_bound() const\n" + "\n" + "This figure takes into account collapsing of duplicates, and weighting\n" + "cutoff values.\n" + "\n" + "This number is usually considerably greater than the actual number of\n" + "documents which match the query. \n" + ""}, + { (char *)"MSet_get_uncollapsed_matches_lower_bound", (PyCFunction)_wrap_MSet_get_uncollapsed_matches_lower_bound, 0x0008, (char *)"\n" + "A lower bound on the number of documents in the database which would\n" + "match the query if collapsing wasn't used.\n" + "\n" + "Xapian::doccount Xapian::MSet::get_uncollapsed_matches_lower_bound()\n" + "const \n" + ""}, + { (char *)"MSet_get_uncollapsed_matches_estimated", (PyCFunction)_wrap_MSet_get_uncollapsed_matches_estimated, 0x0008, (char *)"\n" + "A estimate of the number of documents in the database which would\n" + "match the query if collapsing wasn't used.\n" + "\n" + "Xapian::doccount Xapian::MSet::get_uncollapsed_matches_estimated()\n" + "const \n" + ""}, + { (char *)"MSet_get_uncollapsed_matches_upper_bound", (PyCFunction)_wrap_MSet_get_uncollapsed_matches_upper_bound, 0x0008, (char *)"\n" + "A upper bound on the number of documents in the database which would\n" + "match the query if collapsing wasn't used.\n" + "\n" + "Xapian::doccount Xapian::MSet::get_uncollapsed_matches_upper_bound()\n" + "const \n" + ""}, + { (char *)"MSet_get_max_possible", (PyCFunction)_wrap_MSet_get_max_possible, 0x0008, (char *)"\n" + "The maximum possible weight in the MSet.\n" + "\n" + "Xapian::weight Xapian::MSet::get_max_possible() const\n" + "\n" + "This weight is likely not to be attained in the set of results, but\n" + "represents an upper bound on the weight which a document could attain\n" + "for the given query. \n" + ""}, + { (char *)"MSet_get_max_attained", (PyCFunction)_wrap_MSet_get_max_attained, 0x0008, (char *)"\n" + "The greatest weight which is attained by any document in the database.\n" + "\n" + "Xapian::weight Xapian::MSet::get_max_attained() const\n" + "\n" + "If firstitem == 0 and the primary ordering is by relevance, this is\n" + "the weight of the first entry in the MSet.\n" + "\n" + "If no documents are found by the query, this will be 0.\n" + "\n" + "Note that calculation of max_attained requires calculation of at least\n" + "one result item - therefore, if no items were requested when the query\n" + "was performed (by specifying maxitems = 0 in\n" + "Xapian::Enquire::get_mset()), this value will be 0. \n" + ""}, + { (char *)"MSet_size", (PyCFunction)_wrap_MSet_size, 0x0008, (char *)"\n" + "The number of items in this MSet.\n" + "\n" + "Xapian::doccount Xapian::MSet::size() const \n" + ""}, + { (char *)"MSet_empty", (PyCFunction)_wrap_MSet_empty, 0x0008, (char *)"\n" + "Test if this MSet is empty.\n" + "\n" + "bool Xapian::MSet::empty() const \n" + ""}, + { (char *)"MSet_begin", (PyCFunction)_wrap_MSet_begin, 0x0008, (char *)"\n" + "Iterator for the items in this MSet.\n" + "\n" + "MSetIterator Xapian::MSet::begin() const \n" + ""}, + { (char *)"MSet_end", (PyCFunction)_wrap_MSet_end, 0x0008, (char *)"\n" + "End iterator corresponding to begin().\n" + "\n" + "MSetIterator Xapian::MSet::end() const \n" + ""}, + { (char *)"MSet_back", (PyCFunction)_wrap_MSet_back, 0x0008, (char *)"\n" + "Iterator pointing to the last element of this MSet.\n" + "\n" + "MSetIterator Xapian::MSet::back() const \n" + ""}, + { (char *)"MSet__get_hit_internal", _wrap_MSet__get_hit_internal, 0x0001, (char *)"\n" + "Get an item from the MSet.\n" + "\n" + "The supplied index is relative to the start of the MSet, not the absolute rank\n" + "of the item. \n" + ""}, + { (char *)"MSet_get_document_percentage", _wrap_MSet_get_document_percentage, 0x0001, __null}, + { (char *)"MSet_get_document", _wrap_MSet_get_document, 0x0001, __null}, + { (char *)"MSet_get_docid", _wrap_MSet_get_docid, 0x0001, __null}, + { (char *)"MSet___str__", (PyCFunction)_wrap_MSet___str__, 0x0008, (char *)"\n" + "Return a string describing this object.\n" + "\n" + "std::string Xapian::MSet::get_description() const \n" + ""}, + { (char *)"MSet_items_get", (PyCFunction)_wrap_MSet_items_get, 0x0008, __null}, + { (char *)"MSet___cmp__", _wrap_MSet___cmp__, 0x0001, __null}, + { (char *)"MSet_swigregister", MSet_swigregister, 0x0001, __null}, + { (char *)"MSet_swiginit", MSet_swiginit, 0x0001, __null}, + { (char *)"new_MSetIterator", _wrap_new_MSetIterator, 0x0001, (char *)"\n" + "Copying is allowed (and is cheap).\n" + "\n" + "Xapian::MSetIterator::MSetIterator(const MSetIterator &other) \n" + ""}, + { (char *)"delete_MSetIterator", (PyCFunction)_wrap_delete_MSetIterator, 0x0008, __null}, + { (char *)"MSetIterator_get_docid", (PyCFunction)_wrap_MSetIterator_get_docid, 0x0008, __null}, + { (char *)"MSetIterator_next", (PyCFunction)_wrap_MSetIterator_next, 0x0008, __null}, + { (char *)"MSetIterator_prev", (PyCFunction)_wrap_MSetIterator_prev, 0x0008, __null}, + { (char *)"MSetIterator_equals", _wrap_MSetIterator_equals, 0x0001, __null}, + { (char *)"MSetIterator_get_document", (PyCFunction)_wrap_MSetIterator_get_document, 0x0008, (char *)"\n" + "Get a Xapian::Document object for the current position.\n" + "\n" + "Xapian::Document Xapian::MSetIterator::get_document() const\n" + "\n" + "This method returns a Xapian::Document object which provides the\n" + "information about the document pointed to by the MSetIterator.\n" + "\n" + "If the underlying database has suitable support, using this call\n" + "(rather than asking the database for a document based on its document\n" + "ID) will enable the system to ensure that the correct data is\n" + "returned, and that the document has not been deleted or changed since\n" + "the query was performed.\n" + "\n" + "A Xapian::Document object containing the document data.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "Xapian::DocNotFoundError: The document specified could not be found\n" + "in the database. \n" + ""}, + { (char *)"MSetIterator_get_rank", (PyCFunction)_wrap_MSetIterator_get_rank, 0x0008, (char *)"\n" + "Get the rank of the document at the current position.\n" + "\n" + "Xapian::doccount Xapian::MSetIterator::get_rank() const\n" + "\n" + "The rank is the position that this document is at in the ordered list\n" + "of results of the query. The result is 0-based - i.e. the top-ranked\n" + "document has a rank of 0. \n" + ""}, + { (char *)"MSetIterator_get_weight", (PyCFunction)_wrap_MSetIterator_get_weight, 0x0008, (char *)"\n" + "Get the weight of the document at the current position.\n" + "\n" + "Xapian::weight Xapian::MSetIterator::get_weight() const \n" + ""}, + { (char *)"MSetIterator_get_collapse_key", (PyCFunction)_wrap_MSetIterator_get_collapse_key, 0x0008, (char *)"\n" + "Get the collapse key for this document.\n" + "\n" + "std::string Xapian::MSetIterator::get_collapse_key() const \n" + ""}, + { (char *)"MSetIterator_get_collapse_count", (PyCFunction)_wrap_MSetIterator_get_collapse_count, 0x0008, (char *)"\n" + "Get an estimate of the number of documents that have been collapsed\n" + "into this one.\n" + "\n" + "Xapian::doccount Xapian::MSetIterator::get_collapse_count() const\n" + "\n" + "The estimate will always be less than or equal to the actual number of\n" + "other documents satisfying the match criteria with the same collapse\n" + "key as this document.\n" + "\n" + "This method may return 0 even though there are other documents with\n" + "the same collapse key which satisfying the match criteria. However if\n" + "this method returns non-zero, there definitely are other such\n" + "documents. So this method may be used to inform the user that there\n" + "are \"at least N other matches in this group\", or to control whether\n" + "to offer a \"show other documents in this group\" feature (but note\n" + "that it may not offer it in every case where it would show other\n" + "documents). \n" + ""}, + { (char *)"MSetIterator_get_percent", (PyCFunction)_wrap_MSetIterator_get_percent, 0x0008, (char *)"\n" + "This returns the weight of the document as a percentage score.\n" + "\n" + "Xapian::percent Xapian::MSetIterator::get_percent() const\n" + "\n" + "The return value will be an integer in the range 0 to 100: 0 meaning\n" + "that the item did not match the query at all.\n" + "\n" + "The intention is that the highest weighted document will get 100 if it\n" + "matches all the weight-contributing terms in the query. However,\n" + "currently it may get a lower percentage score if you use a\n" + "MatchDecider and the sorting is primarily by value. In this case, the\n" + "percentage for a particular document may vary depending on the first,\n" + "max_size, and checkatleast parameters passed to Enquire::get_mset()\n" + "(this bug is hard to fix without having to apply the MatchDecider to\n" + "potentially many more documents, which is potentially costly). \n" + ""}, + { (char *)"MSetIterator___str__", (PyCFunction)_wrap_MSetIterator___str__, 0x0008, (char *)"\n" + "Return a string describing this object.\n" + "\n" + "std::string Xapian::MSetIterator::get_description() const \n" + ""}, + { (char *)"MSetIterator___eq__", _wrap_MSetIterator___eq__, 0x0001, __null}, + { (char *)"MSetIterator___ne__", _wrap_MSetIterator___ne__, 0x0001, __null}, + { (char *)"MSetIterator_swigregister", MSetIterator_swigregister, 0x0001, __null}, + { (char *)"MSetIterator_swiginit", MSetIterator_swiginit, 0x0001, __null}, + { (char *)"new_ESet", _wrap_new_ESet, 0x0001, (char *)"\n" + "Copying is allowed (and is cheap).\n" + "\n" + "Xapian::ESet::ESet(const ESet &other) \n" + ""}, + { (char *)"delete_ESet", (PyCFunction)_wrap_delete_ESet, 0x0008, (char *)"\n" + "Destructor.\n" + "\n" + "Xapian::ESet::~ESet() \n" + ""}, + { (char *)"ESet_get_ebound", (PyCFunction)_wrap_ESet_get_ebound, 0x0008, (char *)"\n" + "A lower bound on the number of terms which are in the full set of\n" + "results of the expand.\n" + "\n" + "Xapian::termcount Xapian::ESet::get_ebound() const\n" + "\n" + "This will be greater than or equal to size() \n" + ""}, + { (char *)"ESet_size", (PyCFunction)_wrap_ESet_size, 0x0008, (char *)"\n" + "The number of terms in this E-Set.\n" + "\n" + "Xapian::termcount Xapian::ESet::size() const \n" + ""}, + { (char *)"ESet_empty", (PyCFunction)_wrap_ESet_empty, 0x0008, (char *)"\n" + "Test if this E-Set is empty.\n" + "\n" + "bool Xapian::ESet::empty() const \n" + ""}, + { (char *)"ESet_begin", (PyCFunction)_wrap_ESet_begin, 0x0008, (char *)"\n" + "Iterator for the terms in this E-Set.\n" + "\n" + "ESetIterator Xapian::ESet::begin() const \n" + ""}, + { (char *)"ESet_end", (PyCFunction)_wrap_ESet_end, 0x0008, (char *)"\n" + "End iterator corresponding to begin().\n" + "\n" + "ESetIterator Xapian::ESet::end() const \n" + ""}, + { (char *)"ESet_back", (PyCFunction)_wrap_ESet_back, 0x0008, (char *)"\n" + "Iterator pointing to the last element of this E-Set.\n" + "\n" + "ESetIterator Xapian::ESet::back() const \n" + ""}, + { (char *)"ESet___str__", (PyCFunction)_wrap_ESet___str__, 0x0008, (char *)"\n" + "Return a string describing this object.\n" + "\n" + "std::string Xapian::ESet::get_description() const \n" + ""}, + { (char *)"ESet_items_get", (PyCFunction)_wrap_ESet_items_get, 0x0008, __null}, + { (char *)"ESet_swigregister", ESet_swigregister, 0x0001, __null}, + { (char *)"ESet_swiginit", ESet_swiginit, 0x0001, __null}, + { (char *)"new_ESetIterator", _wrap_new_ESetIterator, 0x0001, (char *)"\n" + "Copying is allowed (and is cheap).\n" + "\n" + "Xapian::ESetIterator::ESetIterator(const ESetIterator &other) \n" + ""}, + { (char *)"delete_ESetIterator", (PyCFunction)_wrap_delete_ESetIterator, 0x0008, __null}, + { (char *)"ESetIterator_get_term", (PyCFunction)_wrap_ESetIterator_get_term, 0x0008, __null}, + { (char *)"ESetIterator_next", (PyCFunction)_wrap_ESetIterator_next, 0x0008, __null}, + { (char *)"ESetIterator_prev", (PyCFunction)_wrap_ESetIterator_prev, 0x0008, __null}, + { (char *)"ESetIterator_equals", _wrap_ESetIterator_equals, 0x0001, __null}, + { (char *)"ESetIterator_get_weight", (PyCFunction)_wrap_ESetIterator_get_weight, 0x0008, (char *)"\n" + "Get the weight of the term at the current position.\n" + "\n" + "Xapian::weight Xapian::ESetIterator::get_weight() const \n" + ""}, + { (char *)"ESetIterator___str__", (PyCFunction)_wrap_ESetIterator___str__, 0x0008, (char *)"\n" + "Return a string describing this object.\n" + "\n" + "std::string Xapian::ESetIterator::get_description() const \n" + ""}, + { (char *)"ESetIterator___eq__", _wrap_ESetIterator___eq__, 0x0001, __null}, + { (char *)"ESetIterator___ne__", _wrap_ESetIterator___ne__, 0x0001, __null}, + { (char *)"ESetIterator_swigregister", ESetIterator_swigregister, 0x0001, __null}, + { (char *)"ESetIterator_swiginit", ESetIterator_swiginit, 0x0001, __null}, + { (char *)"new_RSet", _wrap_new_RSet, 0x0001, (char *)"\n" + "Default constructor.\n" + "\n" + "Xapian::RSet::RSet() \n" + ""}, + { (char *)"delete_RSet", (PyCFunction)_wrap_delete_RSet, 0x0008, (char *)"\n" + "Destructor.\n" + "\n" + "Xapian::RSet::~RSet() \n" + ""}, + { (char *)"RSet_size", (PyCFunction)_wrap_RSet_size, 0x0008, (char *)"\n" + "The number of documents in this R-Set.\n" + "\n" + "Xapian::doccount Xapian::RSet::size() const \n" + ""}, + { (char *)"RSet_empty", (PyCFunction)_wrap_RSet_empty, 0x0008, (char *)"\n" + "Test if this R-Set is empty.\n" + "\n" + "bool Xapian::RSet::empty() const \n" + ""}, + { (char *)"RSet_add_document", _wrap_RSet_add_document, 0x0001, (char *)"\n" + "Add a document to the relevance set.\n" + "\n" + "void Xapian::RSet::add_document(const Xapian::MSetIterator &i) \n" + ""}, + { (char *)"RSet_remove_document", _wrap_RSet_remove_document, 0x0001, (char *)"\n" + "Remove a document from the relevance set.\n" + "\n" + "void Xapian::RSet::remove_document(const Xapian::MSetIterator &i) \n" + ""}, + { (char *)"RSet_contains", _wrap_RSet_contains, 0x0001, (char *)"\n" + "Test if a given document in the relevance set.\n" + "\n" + "bool Xapian::RSet::contains(const Xapian::MSetIterator &i) const \n" + ""}, + { (char *)"RSet___str__", (PyCFunction)_wrap_RSet___str__, 0x0008, (char *)"\n" + "Return a string describing this object.\n" + "\n" + "std::string Xapian::RSet::get_description() const \n" + ""}, + { (char *)"RSet_swigregister", RSet_swigregister, 0x0001, __null}, + { (char *)"RSet_swiginit", RSet_swiginit, 0x0001, __null}, + { (char *)"MatchDecider___call__", _wrap_MatchDecider___call__, 0x0001, __null}, + { (char *)"delete_MatchDecider", (PyCFunction)_wrap_delete_MatchDecider, 0x0008, (char *)"\n" + "Destructor.\n" + "\n" + "virtual Xapian::MatchDecider::~MatchDecider() \n" + ""}, + { (char *)"new_MatchDecider", (PyCFunction)_wrap_new_MatchDecider, 0x0008, __null}, + { (char *)"disown_MatchDecider", (PyCFunction)_wrap_disown_MatchDecider, 0x0008, __null}, + { (char *)"MatchDecider_swigregister", MatchDecider_swigregister, 0x0001, __null}, + { (char *)"MatchDecider_swiginit", MatchDecider_swiginit, 0x0001, __null}, + { (char *)"ExpandDecider___call__", _wrap_ExpandDecider___call__, 0x0001, __null}, + { (char *)"delete_ExpandDecider", (PyCFunction)_wrap_delete_ExpandDecider, 0x0008, (char *)"\n" + "Virtual destructor, because we have virtual methods.\n" + "\n" + "virtual Xapian::ExpandDecider::~ExpandDecider() \n" + ""}, + { (char *)"new_ExpandDecider", (PyCFunction)_wrap_new_ExpandDecider, 0x0008, __null}, + { (char *)"disown_ExpandDecider", (PyCFunction)_wrap_disown_ExpandDecider, 0x0008, __null}, + { (char *)"ExpandDecider_swigregister", ExpandDecider_swigregister, 0x0001, __null}, + { (char *)"ExpandDecider_swiginit", ExpandDecider_swiginit, 0x0001, __null}, + { (char *)"new_Enquire", (PyCFunction)_wrap_new_Enquire, 0x0008, (char *)"\n" + "Create a Xapian::Enquire object.\n" + "\n" + "Xapian::Enquire::Enquire(const Database &database, ErrorHandler\n" + "*errorhandler_=0)\n" + "\n" + "This specification cannot be changed once the Xapian::Enquire is\n" + "opened: you must create a new Xapian::Enquire object to access a\n" + "different database, or set of databases.\n" + "\n" + "The database supplied must have been initialised (ie, must not be the\n" + "result of calling the Database::Database() constructor). If you need\n" + "to handle a situation where you have no index gracefully, a database\n" + "created with InMemory::open() can be passed here, which represents a\n" + "completely empty database.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "database: Specification of the database or databases to use.\n" + "\n" + "errorhandler_: A pointer to the error handler to use. Ownership of\n" + "the object pointed to is not assumed by the Xapian::Enquire object -\n" + "the user should delete the Xapian::ErrorHandler object after the\n" + "Xapian::Enquire object is deleted. To use no error handler, this\n" + "parameter should be 0.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "Xapian::InvalidArgumentError: will be thrown if an initialised\n" + "Database object is supplied. \n" + ""}, + { (char *)"delete_Enquire", (PyCFunction)_wrap_delete_Enquire, 0x0008, (char *)"\n" + "Close the Xapian::Enquire object.\n" + "\n" + "Xapian::Enquire::~Enquire() \n" + ""}, + { (char *)"Enquire_set_query", _wrap_Enquire_set_query, 0x0001, (char *)"\n" + "Set the query to run.\n" + "\n" + "void Xapian::Enquire::set_query(const Xapian::Query &query,\n" + "Xapian::termcount qlen=0)\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "query: the new query to run.\n" + "\n" + "qlen: the query length to use in weight calculations - by default the\n" + "sum of the wqf of all terms is used. \n" + ""}, + { (char *)"Enquire_get_query", (PyCFunction)_wrap_Enquire_get_query, 0x0008, (char *)"\n" + "Get the query which has been set.\n" + "\n" + "const Xapian::Query& Xapian::Enquire::get_query() const\n" + "\n" + "This is only valid after set_query() has been called.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "Xapian::InvalidArgumentError: will be thrown if query has not yet\n" + "been set. \n" + ""}, + { (char *)"Enquire_add_matchspy", _wrap_Enquire_add_matchspy, 0x0001, (char *)"\n" + "Add a matchspy.\n" + "\n" + "void Xapian::Enquire::add_matchspy(MatchSpy *spy)\n" + "\n" + "This matchspy will be called with some of the documents which match\n" + "the query, during the match process. Exactly which of the matching\n" + "documents are passed to it depends on exactly when certain\n" + "optimisations occur during the match process, but it can be controlled\n" + "to some extent by setting the checkatleast parameter to get_mset().\n" + "\n" + "In particular, if there are enough matching documents, at least the\n" + "number specified by checkatleast will be passed to the matchspy. This\n" + "means that you can force the matchspy to be shown all matching\n" + "documents by setting checkatleast to the number of documents in the\n" + "database.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "spy: The MatchSpy subclass to add. The caller must ensure that this\n" + "remains valid while the Enquire object remains active, or until\n" + "clear_matchspies() is called. \n" + ""}, + { (char *)"Enquire_clear_matchspies", (PyCFunction)_wrap_Enquire_clear_matchspies, 0x0008, (char *)"\n" + "Remove all the matchspies.\n" + "\n" + "void Xapian::Enquire::clear_matchspies() \n" + ""}, + { (char *)"Enquire_set_weighting_scheme", _wrap_Enquire_set_weighting_scheme, 0x0001, (char *)"\n" + "Set the weighting scheme to use for queries.\n" + "\n" + "void Xapian::Enquire::set_weighting_scheme(const Weight &weight_)\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "weight_: the new weighting scheme. If no weighting scheme is\n" + "specified, the default is BM25 with the default parameters. \n" + ""}, + { (char *)"Enquire_set_collapse_key", _wrap_Enquire_set_collapse_key, 0x0001, (char *)"\n" + "Set the collapse key to use for queries.\n" + "\n" + "void Xapian::Enquire::set_collapse_key(Xapian::valueno collapse_key,\n" + "Xapian::doccount collapse_max=1)\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "collapse_key: value number to collapse on - at most one MSet entry\n" + "with each particular value will be returned (default is\n" + "Xapian::BAD_VALUENO which means no collapsing).\n" + "\n" + "collapse_max: Max number of items with the same key to leave after\n" + "collapsing (default 1).\n" + "\n" + "The MSet returned by get_mset() will have only the \"best\" (at most)\n" + "collapse_max entries with each particular value of collapse_key\n" + "(\"best\" being highest ranked - i.e. highest weight or highest\n" + "sorting key).\n" + "\n" + "An example use might be to create a value for each document containing\n" + "an MD5 hash of the document contents. Then duplicate documents from\n" + "different sources can be eliminated at search time by collapsing with\n" + "collapse_max = 1 (it's better to eliminate duplicates at index time,\n" + "but this may not be always be possible - for example the search may be\n" + "over more than one Xapian database).\n" + "\n" + "Another use is to group matches in a particular category (e.g. you\n" + "might collapse a mailing list search on the Subject: so that there's\n" + "only one result per discussion thread). In this case you can use\n" + "get_collapse_count() to give the user some idea how many other results\n" + "there are. And if you index the Subject: as a boolean term as well as\n" + "putting it in a value, you can offer a link to a non-collapsed search\n" + "restricted to that thread using a boolean filter. \n" + ""}, + { (char *)"Enquire_set_docid_order", _wrap_Enquire_set_docid_order, 0x0001, (char *)"\n" + "Set the direction in which documents are ordered by document id in the\n" + "returned MSet.\n" + "\n" + "void Xapian::Enquire::set_docid_order(docid_order order)\n" + "\n" + "This order only has an effect on documents which would otherwise have\n" + "equal rank. For a weighted probabilistic match with no sort value,\n" + "this means documents with equal weight. For a boolean match, with no\n" + "sort value, this means all documents. And if a sort value is used,\n" + "this means documents with equal sort value (and also equal weight if\n" + "ordering on relevance after the sort).\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "order: This can be: Xapian::Enquire::ASCENDING docids sort in\n" + "ascending order (default)\n" + "\n" + "Xapian::Enquire::DESCENDING docids sort in descending order\n" + "\n" + "Xapian::Enquire::DONT_CARE docids sort in whatever order is most\n" + "efficient for the backend\n" + "\n" + "Note: If you add documents in strict date order, then a boolean search\n" + "- i.e. set_weighting_scheme(Xapian::BoolWeight()) - with\n" + "set_docid_order(Xapian::Enquire::DESCENDING) is a very efficient way\n" + "to perform \"sort by date, newest first\". \n" + ""}, + { (char *)"Enquire_set_cutoff", _wrap_Enquire_set_cutoff, 0x0001, (char *)"\n" + "Set the percentage and/or weight cutoffs.\n" + "\n" + "void Xapian::Enquire::set_cutoff(Xapian::percent percent_cutoff,\n" + "Xapian::weight weight_cutoff=0)\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "percent_cutoff: Minimum percentage score for returned documents. If a\n" + "document has a lower percentage score than this, it will not appear in\n" + "the MSet. If your intention is to return only matches which contain\n" + "all the terms in the query, then it's more efficient to use\n" + "Xapian::Query::OP_AND instead of Xapian::Query::OP_OR in the query\n" + "than to use set_cutoff(100). (default 0 => no percentage cut-off).\n" + "\n" + "weight_cutoff: Minimum weight for a document to be returned. If a\n" + "document has a lower score that this, it will not appear in the MSet.\n" + "It is usually only possible to choose an appropriate weight for cutoff\n" + "based on the results of a previous run of the same query; this is thus\n" + "mainly useful for alerting operations. The other potential use is with\n" + "a user specified weighting scheme. (default 0 => no weight cut-off).\n" + "\n" + ""}, + { (char *)"Enquire_set_sort_by_relevance", (PyCFunction)_wrap_Enquire_set_sort_by_relevance, 0x0008, (char *)"\n" + "Set the sorting to be by relevance only.\n" + "\n" + "void Xapian::Enquire::set_sort_by_relevance()\n" + "\n" + "This is the default. \n" + ""}, + { (char *)"Enquire_set_sort_by_value", _wrap_Enquire_set_sort_by_value, 0x0001, (char *)"\n" + "void\n" + "Xapian::Enquire::set_sort_by_value(Xapian::valueno sort_key) \n" + ""}, + { (char *)"Enquire_set_sort_by_value_then_relevance", _wrap_Enquire_set_sort_by_value_then_relevance, 0x0001, (char *)"\n" + "void\n" + "Xapian::Enquire::set_sort_by_value_then_relevance(Xapian::valueno\n" + "sort_key) \n" + ""}, + { (char *)"Enquire_set_sort_by_relevance_then_value", _wrap_Enquire_set_sort_by_relevance_then_value, 0x0001, (char *)"\n" + "void\n" + "Xapian::Enquire::set_sort_by_relevance_then_value(Xapian::valueno\n" + "sort_key) \n" + ""}, + { (char *)"Enquire_set_sort_by_key", _wrap_Enquire_set_sort_by_key, 0x0001, (char *)"\n" + "void\n" + "Xapian::Enquire::set_sort_by_key(Xapian::KeyMaker *sorter) \n" + ""}, + { (char *)"Enquire_set_sort_by_key_then_relevance", _wrap_Enquire_set_sort_by_key_then_relevance, 0x0001, (char *)"\n" + "void\n" + "Xapian::Enquire::set_sort_by_key_then_relevance(Xapian::KeyMaker\n" + "*sorter) \n" + ""}, + { (char *)"Enquire_set_sort_by_relevance_then_key", _wrap_Enquire_set_sort_by_relevance_then_key, 0x0001, (char *)"\n" + "void\n" + "Xapian::Enquire::set_sort_by_relevance_then_key(Xapian::KeyMaker\n" + "*sorter) \n" + ""}, + { (char *)"Enquire_get_mset", _wrap_Enquire_get_mset, 0x0001, (char *)"\n" + "MSet\n" + "Xapian::Enquire::get_mset(Xapian::doccount first, Xapian::doccount\n" + "maxitems, const RSet *omrset, const MatchDecider *mdecider=0) const \n" + ""}, + { (char *)"Enquire_get_eset", _wrap_Enquire_get_eset, 0x0001, (char *)"\n" + "Get the expand set for the given rset.\n" + "\n" + "ESet Xapian::Enquire::get_eset(Xapian::termcount maxitems, const RSet\n" + "&omrset, const Xapian::ExpandDecider *edecider) const\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "maxitems: the maximum number of items to return.\n" + "\n" + "omrset: the relevance set to use when performing the expand\n" + "operation.\n" + "\n" + "edecider: a decision functor to use to decide whether a given term\n" + "should be put in the ESet\n" + "\n" + "An ESet object containing the results of the expand.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "Xapian::InvalidArgumentError: See class documentation. \n" + ""}, + { (char *)"Enquire_get_matching_terms_begin", _wrap_Enquire_get_matching_terms_begin, 0x0001, (char *)"\n" + "Get terms which match a given document, by match set item.\n" + "\n" + "TermIterator Xapian::Enquire::get_matching_terms_begin(const\n" + "MSetIterator &it) const\n" + "\n" + "This method returns the terms in the current query which match the\n" + "given document.\n" + "\n" + "If the underlying database has suitable support, using this call\n" + "(rather than passing a Xapian::docid) will enable the system to ensure\n" + "that the correct data is returned, and that the document has not been\n" + "deleted or changed since the query was performed.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "it: The iterator for which to retrieve the matching terms.\n" + "\n" + "An iterator returning the terms which match the document. The terms\n" + "will be returned (as far as this makes any sense) in the same order as\n" + "the terms in the query. Terms will not occur more than once, even if\n" + "they do in the query.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "Xapian::InvalidArgumentError: See class documentation.\n" + "\n" + "Xapian::DocNotFoundError: The document specified could not be found\n" + "in the database. \n" + ""}, + { (char *)"Enquire_get_matching_terms_end", _wrap_Enquire_get_matching_terms_end, 0x0001, (char *)"\n" + "End iterator corresponding to get_matching_terms_begin().\n" + "\n" + "TermIterator Xapian::Enquire::get_matching_terms_end(const\n" + "MSetIterator &) const \n" + ""}, + { (char *)"Enquire_get_matching_terms", _wrap_Enquire_get_matching_terms, 0x0001, __null}, + { (char *)"Enquire___str__", (PyCFunction)_wrap_Enquire___str__, 0x0008, (char *)"\n" + "Return a string describing this object.\n" + "\n" + "std::string Xapian::Enquire::get_description() const \n" + ""}, + { (char *)"Enquire_swigregister", Enquire_swigregister, 0x0001, __null}, + { (char *)"Enquire_swiginit", Enquire_swiginit, 0x0001, __null}, + { (char *)"new_Registry", _wrap_new_Registry, 0x0001, (char *)"\n" + "Default constructor.\n" + "\n" + "Xapian::Registry::Registry()\n" + "\n" + "The registry will contain all standard subclasses of user-subclassable\n" + "classes. \n" + ""}, + { (char *)"delete_Registry", (PyCFunction)_wrap_delete_Registry, 0x0008, (char *)"Xapian::Registry::~Registry() "}, + { (char *)"Registry_register_weighting_scheme", _wrap_Registry_register_weighting_scheme, 0x0001, (char *)"\n" + "Register a weighting scheme.\n" + "\n" + "void Xapian::Registry::register_weighting_scheme(const Xapian::Weight\n" + "&wt) \n" + ""}, + { (char *)"Registry_get_weighting_scheme", _wrap_Registry_get_weighting_scheme, 0x0001, (char *)"\n" + "Get the weighting scheme given a name.\n" + "\n" + "const Xapian::Weight* Xapian::Registry::get_weighting_scheme(const\n" + "std::string &name) const\n" + "\n" + "The returned weighting scheme is owned by the registry object.\n" + "\n" + "Returns NULL if the weighting scheme could not be found. \n" + ""}, + { (char *)"Registry_register_posting_source", _wrap_Registry_register_posting_source, 0x0001, (char *)"\n" + "Register a user-defined posting source class.\n" + "\n" + "void Xapian::Registry::register_posting_source(const\n" + "Xapian::PostingSource &source) \n" + ""}, + { (char *)"Registry_get_posting_source", _wrap_Registry_get_posting_source, 0x0001, (char *)"\n" + "Get a posting source given a name.\n" + "\n" + "const Xapian::PostingSource*\n" + "Xapian::Registry::get_posting_source(const std::string &name) const\n" + "\n" + "The returned posting source is owned by the registry object.\n" + "\n" + "Returns NULL if the posting source could not be found. \n" + ""}, + { (char *)"Registry_register_match_spy", _wrap_Registry_register_match_spy, 0x0001, (char *)"\n" + "Register a user-defined match spy class.\n" + "\n" + "void Xapian::Registry::register_match_spy(const Xapian::MatchSpy &spy)\n" + "\n" + ""}, + { (char *)"Registry_get_match_spy", _wrap_Registry_get_match_spy, 0x0001, (char *)"\n" + "Get a match spy given a name.\n" + "\n" + "const Xapian::MatchSpy* Xapian::Registry::get_match_spy(const\n" + "std::string &name) const\n" + "\n" + "The returned match spy is owned by the registry object.\n" + "\n" + "Returns NULL if the match spy could not be found. \n" + ""}, + { (char *)"Registry_swigregister", Registry_swigregister, 0x0001, __null}, + { (char *)"Registry_swiginit", Registry_swiginit, 0x0001, __null}, + { (char *)"delete_Weight", (PyCFunction)_wrap_delete_Weight, 0x0008, (char *)"\n" + "Virtual destructor, because we have virtual methods.\n" + "\n" + "virtual Xapian::Weight::~Weight() \n" + ""}, + { (char *)"Weight_name", (PyCFunction)_wrap_Weight_name, 0x0008, (char *)"\n" + "Return the name of this weighting scheme.\n" + "\n" + "virtual std::string Xapian::Weight::name() const\n" + "\n" + "This name is used by the remote backend. It is passed along with the\n" + "serialised parameters to the remote server so that it knows which\n" + "class to create.\n" + "\n" + "Return the full namespace-qualified name of your class here - if your\n" + "class is called FooWeight, return \"FooWeight\" from this method (\n" + "Xapian::BM25Weight returns \"Xapian::BM25Weight\" here).\n" + "\n" + "If you don't want to support the remote backend, you can use the\n" + "default implementation which simply returns an empty string. \n" + ""}, + { (char *)"Weight_get_sumpart", _wrap_Weight_get_sumpart, 0x0001, (char *)"\n" + "Calculate the weight contribution for this object's term to a\n" + "document.\n" + "\n" + "virtual Xapian::weight Xapian::Weight::get_sumpart(Xapian::termcount\n" + "wdf, Xapian::termcount doclen) const =0\n" + "\n" + "The parameters give information about the document which may be used\n" + "in the calculations:\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "wdf: The within document frequency of the term in the document.\n" + "\n" + "doclen: The document's length (unnormalised). \n" + ""}, + { (char *)"Weight_get_maxpart", (PyCFunction)_wrap_Weight_get_maxpart, 0x0008, (char *)"\n" + "Return an upper bound on what get_sumpart() can return for any\n" + "document.\n" + "\n" + "virtual Xapian::weight Xapian::Weight::get_maxpart() const =0\n" + "\n" + "This information is used by the matcher to perform various\n" + "optimisations, so strive to make the bound as tight as possible. \n" + ""}, + { (char *)"Weight_get_sumextra", _wrap_Weight_get_sumextra, 0x0001, (char *)"\n" + "Calculate the term-independent weight component for a document.\n" + "\n" + "virtual Xapian::weight Xapian::Weight::get_sumextra(Xapian::termcount\n" + "doclen) const =0\n" + "\n" + "The parameter gives information about the document which may be used\n" + "in the calculations:\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "doclen: The document's length (unnormalised). \n" + ""}, + { (char *)"Weight_get_maxextra", (PyCFunction)_wrap_Weight_get_maxextra, 0x0008, (char *)"\n" + "Return an upper bound on what get_sumextra() can return for any\n" + "document.\n" + "\n" + "virtual Xapian::weight Xapian::Weight::get_maxextra() const =0\n" + "\n" + "This information is used by the matcher to perform various\n" + "optimisations, so strive to make the bound as tight as possible. \n" + ""}, + { (char *)"Weight_get_sumpart_needs_doclength_", (PyCFunction)_wrap_Weight_get_sumpart_needs_doclength_, 0x0008, __null}, + { (char *)"Weight_get_sumpart_needs_wdf_", (PyCFunction)_wrap_Weight_get_sumpart_needs_wdf_, 0x0008, __null}, + { (char *)"Weight_swigregister", Weight_swigregister, 0x0001, __null}, + { (char *)"new_BoolWeight", (PyCFunction)_wrap_new_BoolWeight, 0x0004, (char *)"\n" + "Construct a BoolWeight.\n" + "\n" + "Xapian::BoolWeight::BoolWeight() \n" + ""}, + { (char *)"delete_BoolWeight", (PyCFunction)_wrap_delete_BoolWeight, 0x0008, __null}, + { (char *)"BoolWeight_swigregister", BoolWeight_swigregister, 0x0001, __null}, + { (char *)"BoolWeight_swiginit", BoolWeight_swiginit, 0x0001, __null}, + { (char *)"new_BM25Weight", _wrap_new_BM25Weight, 0x0001, (char *)"Xapian::BM25Weight::BM25Weight() "}, + { (char *)"delete_BM25Weight", (PyCFunction)_wrap_delete_BM25Weight, 0x0008, __null}, + { (char *)"BM25Weight_swigregister", BM25Weight_swigregister, 0x0001, __null}, + { (char *)"BM25Weight_swiginit", BM25Weight_swiginit, 0x0001, __null}, + { (char *)"new_TradWeight", _wrap_new_TradWeight, 0x0001, (char *)"\n" + "Construct a TradWeight.\n" + "\n" + "Xapian::TradWeight::TradWeight(double k=1.0)\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "k: A non-negative parameter controlling how influential within-\n" + "document- frequency (wdf) and document length are. k=0 means that wdf\n" + "and document length don't affect the weights. The larger k1 is, the\n" + "more they do. (default 1) \n" + ""}, + { (char *)"delete_TradWeight", (PyCFunction)_wrap_delete_TradWeight, 0x0008, __null}, + { (char *)"TradWeight_swigregister", TradWeight_swigregister, 0x0001, __null}, + { (char *)"TradWeight_swiginit", TradWeight_swiginit, 0x0001, __null}, + { (char *)"new_MatchSpy", (PyCFunction)_wrap_new_MatchSpy, 0x0008, __null}, + { (char *)"delete_MatchSpy", (PyCFunction)_wrap_delete_MatchSpy, 0x0008, (char *)"\n" + "Virtual destructor, because we have virtual methods.\n" + "\n" + "virtual Xapian::MatchSpy::~MatchSpy() \n" + ""}, + { (char *)"MatchSpy___call__", _wrap_MatchSpy___call__, 0x0001, __null}, + { (char *)"MatchSpy_name", (PyCFunction)_wrap_MatchSpy_name, 0x0008, (char *)"\n" + "Return the name of this match spy.\n" + "\n" + "virtual std::string Xapian::MatchSpy::name() const\n" + "\n" + "This name is used by the remote backend. It is passed with the\n" + "serialised parameters to the remote server so that it knows which\n" + "class to create.\n" + "\n" + "Return the full namespace-qualified name of your class here - if your\n" + "class is called MyApp::FooMatchSpy, return \"MyApp::FooMatchSpy\" from\n" + "this method.\n" + "\n" + "If you don't want to support the remote backend in your match spy, you\n" + "can use the default implementation which simply throws\n" + "Xapian::UnimplementedError. \n" + ""}, + { (char *)"MatchSpy_merge_results", _wrap_MatchSpy_merge_results, 0x0001, (char *)"\n" + "Unserialise some results, and merge them into this matchspy.\n" + "\n" + "virtual void Xapian::MatchSpy::merge_results(const std::string &s)\n" + "\n" + "The order in which results are merged should not be significant, since\n" + "this order is not specified (and will vary depending on the speed of\n" + "the search in each sub-database).\n" + "\n" + "If you don't want to support the remote backend in your match spy, you\n" + "can use the default implementation which simply throws\n" + "Xapian::UnimplementedError. \n" + ""}, + { (char *)"MatchSpy___str__", (PyCFunction)_wrap_MatchSpy___str__, 0x0008, (char *)"\n" + "Return a string describing this object.\n" + "\n" + "virtual std::string Xapian::MatchSpy::get_description() const\n" + "\n" + "This default implementation returns a generic answer, to avoid forcing\n" + "those deriving their own MatchSpy subclasses from having to implement\n" + "this (they may not care what get_description() gives for their\n" + "subclass). \n" + ""}, + { (char *)"disown_MatchSpy", (PyCFunction)_wrap_disown_MatchSpy, 0x0008, __null}, + { (char *)"MatchSpy_swigregister", MatchSpy_swigregister, 0x0001, __null}, + { (char *)"MatchSpy_swiginit", MatchSpy_swiginit, 0x0001, __null}, + { (char *)"new_ValueCountMatchSpy", _wrap_new_ValueCountMatchSpy, 0x0001, (char *)"\n" + "Construct a MatchSpy which counts the values in a particular slot.\n" + "\n" + "Xapian::ValueCountMatchSpy::ValueCountMatchSpy(Xapian::valueno slot_)\n" + "\n" + ""}, + { (char *)"ValueCountMatchSpy_get_total", (PyCFunction)_wrap_ValueCountMatchSpy_get_total, 0x0008, (char *)"\n" + "Return the total number of documents tallied.\n" + "\n" + "size_t Xapian::ValueCountMatchSpy::get_total() const \n" + ""}, + { (char *)"ValueCountMatchSpy_values_begin", (PyCFunction)_wrap_ValueCountMatchSpy_values_begin, 0x0008, (char *)"\n" + "Get an iterator over the values seen in the slot.\n" + "\n" + "TermIterator Xapian::ValueCountMatchSpy::values_begin() const\n" + "\n" + "Items will be returned in ascending alphabetical order.\n" + "\n" + "During the iteration, the frequency of the current value can be\n" + "obtained with the get_termfreq() method on the iterator. \n" + ""}, + { (char *)"ValueCountMatchSpy_values_end", (PyCFunction)_wrap_ValueCountMatchSpy_values_end, 0x0008, (char *)"\n" + "End iterator corresponding to values_begin().\n" + "\n" + "TermIterator Xapian::ValueCountMatchSpy::values_end() const \n" + ""}, + { (char *)"ValueCountMatchSpy_top_values_begin", _wrap_ValueCountMatchSpy_top_values_begin, 0x0001, (char *)"\n" + "Get an iterator over the most frequent values seen in the slot.\n" + "\n" + "TermIterator Xapian::ValueCountMatchSpy::top_values_begin(size_t\n" + "maxvalues) const\n" + "\n" + "Items will be returned in descending order of frequency. Values with\n" + "the same frequency will be returned in ascending alphabetical order.\n" + "\n" + "During the iteration, the frequency of the current value can be\n" + "obtained with the get_termfreq() method on the iterator.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "maxvalues: The maximum number of values to return. \n" + ""}, + { (char *)"ValueCountMatchSpy_top_values_end", _wrap_ValueCountMatchSpy_top_values_end, 0x0001, (char *)"\n" + "End iterator corresponding to top_values_begin().\n" + "\n" + "TermIterator Xapian::ValueCountMatchSpy::top_values_end(size_t) const\n" + "\n" + ""}, + { (char *)"delete_ValueCountMatchSpy", (PyCFunction)_wrap_delete_ValueCountMatchSpy, 0x0008, __null}, + { (char *)"ValueCountMatchSpy_swigregister", ValueCountMatchSpy_swigregister, 0x0001, __null}, + { (char *)"ValueCountMatchSpy_swiginit", ValueCountMatchSpy_swiginit, 0x0001, __null}, + { (char *)"Database_add_database", _wrap_Database_add_database, 0x0001, (char *)"\n" + "Add an existing database (or group of databases) to those accessed by\n" + "this object.\n" + "\n" + "void Xapian::Database::add_database(const Database &database)\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "database: the database(s) to add. \n" + ""}, + { (char *)"delete_Database", (PyCFunction)_wrap_delete_Database, 0x0008, (char *)"\n" + "Destroy this handle on the database.\n" + "\n" + "virtual Xapian::Database::~Database()\n" + "\n" + "If there are no copies of this object remaining, the database(s) will\n" + "be closed. \n" + ""}, + { (char *)"new_Database", _wrap_new_Database, 0x0001, (char *)"\n" + "Copying is allowed.\n" + "\n" + "Xapian::Database::Database(const Database &other)\n" + "\n" + "The internals are reference counted, so copying is cheap. \n" + ""}, + { (char *)"Database_reopen", (PyCFunction)_wrap_Database_reopen, 0x0008, (char *)"\n" + "Re-open the database.\n" + "\n" + "void Xapian::Database::reopen()\n" + "\n" + "This re-opens the database(s) to the latest available version(s). It\n" + "can be used either to make sure the latest results are returned, or to\n" + "recover from a Xapian::DatabaseModifiedError.\n" + "\n" + "Calling reopen() on a database which has been closed (with close())\n" + "will always raise a Xapian::DatabaseError. \n" + ""}, + { (char *)"Database_close", (PyCFunction)_wrap_Database_close, 0x0008, (char *)"\n" + "Close the database.\n" + "\n" + "virtual void Xapian::Database::close()\n" + "\n" + "This closes the database and releases all file handles held by the\n" + "database.\n" + "\n" + "This is a permanent close of the database: calling reopen() after\n" + "closing a database will not reopen it, and will raise an exception.\n" + "\n" + "Calling close() on a database which is already closed has no effect\n" + "(and doesn't raise an exception).\n" + "\n" + "After this call, calls made to methods of the database (other than\n" + "close() or the destructor), or to objects associated with the database\n" + "will behave in one of the following ways (but which behaviour happens\n" + "may vary between releases, and between database backends):\n" + "\n" + "raise a Xapian::DatabaseError indicating that the database is closed.\n" + "\n" + "behave exactly as they would have done if the database had not been\n" + "closed (by using cached data).\n" + "\n" + "To summarise - you should not rely on the exception being raised, or\n" + "the normal result being available, but if you do get a result, it will\n" + "be correct. \n" + ""}, + { (char *)"Database___str__", (PyCFunction)_wrap_Database___str__, 0x0008, (char *)"\n" + "Return a string describing this object.\n" + "\n" + "virtual std::string Xapian::Database::get_description() const \n" + ""}, + { (char *)"Database_postlist_begin", _wrap_Database_postlist_begin, 0x0001, (char *)"\n" + "An iterator pointing to the start of the postlist for a given term.\n" + "\n" + "PostingIterator Xapian::Database::postlist_begin(const std::string\n" + "&tname) const\n" + "\n" + "If the term name is the empty string, the iterator returned will list\n" + "all the documents in the database. Such an iterator will always return\n" + "a WDF value of 1, since there is no obvious meaning for this quantity\n" + "in this case. \n" + ""}, + { (char *)"Database_postlist_end", _wrap_Database_postlist_end, 0x0001, (char *)"\n" + "Corresponding end iterator to postlist_begin().\n" + "\n" + "PostingIterator Xapian::Database::postlist_end(const std::string &)\n" + "const \n" + ""}, + { (char *)"Database_termlist_begin", _wrap_Database_termlist_begin, 0x0001, (char *)"\n" + "An iterator pointing to the start of the termlist for a given\n" + "document.\n" + "\n" + "TermIterator Xapian::Database::termlist_begin(Xapian::docid did) const\n" + "\n" + ""}, + { (char *)"Database_termlist_end", _wrap_Database_termlist_end, 0x0001, (char *)"\n" + "Corresponding end iterator to termlist_begin().\n" + "\n" + "TermIterator Xapian::Database::termlist_end(Xapian::docid) const \n" + ""}, + { (char *)"Database_positionlist_begin", _wrap_Database_positionlist_begin, 0x0001, (char *)"\n" + "An iterator pointing to the start of the position list for a given\n" + "term in a given document.\n" + "\n" + "PositionIterator Xapian::Database::positionlist_begin(Xapian::docid\n" + "did, const std::string &tname) const \n" + ""}, + { (char *)"Database_positionlist_end", _wrap_Database_positionlist_end, 0x0001, (char *)"\n" + "Corresponding end iterator to positionlist_begin().\n" + "\n" + "PositionIterator Xapian::Database::positionlist_end(Xapian::docid,\n" + "const std::string &) const \n" + ""}, + { (char *)"Database_allterms_begin", _wrap_Database_allterms_begin, 0x0001, (char *)"\n" + "An iterator which runs across all terms with a given prefix.\n" + "\n" + "TermIterator Xapian::Database::allterms_begin(const std::string\n" + "&prefix) const\n" + "\n" + "This is functionally similar to getting an iterator with\n" + "allterms_begin() and then calling skip_to(prefix) on that iterator to\n" + "move to the start of the prefix, but is more convenient (because it\n" + "detects the end of the prefixed terms), and may be more efficient than\n" + "simply calling skip_to() after opening the iterator, particularly for\n" + "remote databases.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "prefix: The prefix to restrict the returned terms to. \n" + ""}, + { (char *)"Database_allterms_end", _wrap_Database_allterms_end, 0x0001, (char *)"\n" + "Corresponding end iterator to allterms_begin(prefix).\n" + "\n" + "TermIterator Xapian::Database::allterms_end(const std::string &) const\n" + "\n" + ""}, + { (char *)"Database_get_doccount", (PyCFunction)_wrap_Database_get_doccount, 0x0008, (char *)"\n" + "Get the number of documents in the database.\n" + "\n" + "Xapian::doccount Xapian::Database::get_doccount() const \n" + ""}, + { (char *)"Database_get_lastdocid", (PyCFunction)_wrap_Database_get_lastdocid, 0x0008, (char *)"\n" + "Get the highest document id which has been used in the database.\n" + "\n" + "Xapian::docid Xapian::Database::get_lastdocid() const \n" + ""}, + { (char *)"Database_get_avlength", (PyCFunction)_wrap_Database_get_avlength, 0x0008, (char *)"\n" + "Get the average length of the documents in the database.\n" + "\n" + "Xapian::doclength Xapian::Database::get_avlength() const \n" + ""}, + { (char *)"Database_get_termfreq", _wrap_Database_get_termfreq, 0x0001, (char *)"\n" + "Get the number of documents in the database indexed by a given term.\n" + "\n" + "Xapian::doccount Xapian::Database::get_termfreq(const std::string\n" + "&tname) const \n" + ""}, + { (char *)"Database_term_exists", _wrap_Database_term_exists, 0x0001, (char *)"\n" + "Check if a given term exists in the database.\n" + "\n" + "bool Xapian::Database::term_exists(const std::string &tname) const\n" + "\n" + "Return true if and only if the term exists in the database. This is\n" + "the same as (get_termfreq(tname) != 0), but will often be more\n" + "efficient. \n" + ""}, + { (char *)"Database_get_collection_freq", _wrap_Database_get_collection_freq, 0x0001, (char *)"\n" + "Return the total number of occurrences of the given term.\n" + "\n" + "Xapian::termcount Xapian::Database::get_collection_freq(const\n" + "std::string &tname) const\n" + "\n" + "This is the sum of the number of occurrences of the term in each\n" + "document it indexes: i.e., the sum of the within document frequencies\n" + "of the term.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "tname: The term whose collection frequency is being requested. \n" + ""}, + { (char *)"Database_get_value_freq", _wrap_Database_get_value_freq, 0x0001, (char *)"\n" + "Return the frequency of a given value slot.\n" + "\n" + "Xapian::doccount Xapian::Database::get_value_freq(Xapian::valueno\n" + "valno) const\n" + "\n" + "This is the number of documents which have a (non-empty) value stored\n" + "in the slot.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "valno: The value slot to examine.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "UnimplementedError: The frequency of the value isn't available for\n" + "this database type. \n" + ""}, + { (char *)"Database_get_value_lower_bound", _wrap_Database_get_value_lower_bound, 0x0001, (char *)"\n" + "Get a lower bound on the values stored in the given value slot.\n" + "\n" + "std::string Xapian::Database::get_value_lower_bound(Xapian::valueno\n" + "valno) const\n" + "\n" + "If there are no values stored in the given value slot, this will\n" + "return an empty string.\n" + "\n" + "If the lower bound isn't available for the given database type, this\n" + "will return the lowest possible bound - the empty string.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "valno: The value slot to examine. \n" + ""}, + { (char *)"Database_get_value_upper_bound", _wrap_Database_get_value_upper_bound, 0x0001, (char *)"\n" + "Get an upper bound on the values stored in the given value slot.\n" + "\n" + "std::string Xapian::Database::get_value_upper_bound(Xapian::valueno\n" + "valno) const\n" + "\n" + "If there are no values stored in the given value slot, this will\n" + "return an empty string.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "valno: The value slot to examine.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "UnimplementedError: The upper bound of the values isn't available for\n" + "this database type. \n" + ""}, + { (char *)"Database_get_doclength_lower_bound", (PyCFunction)_wrap_Database_get_doclength_lower_bound, 0x0008, (char *)"\n" + "Get a lower bound on the length of a document in this DB.\n" + "\n" + "Xapian::termcount Xapian::Database::get_doclength_lower_bound() const\n" + "\n" + "This bound does not include any zero-length documents. \n" + ""}, + { (char *)"Database_get_doclength_upper_bound", (PyCFunction)_wrap_Database_get_doclength_upper_bound, 0x0008, (char *)"\n" + "Get an upper bound on the length of a document in this DB.\n" + "\n" + "Xapian::termcount Xapian::Database::get_doclength_upper_bound() const\n" + "\n" + ""}, + { (char *)"Database_get_wdf_upper_bound", _wrap_Database_get_wdf_upper_bound, 0x0001, (char *)"\n" + "Get an upper bound on the wdf of term term.\n" + "\n" + "Xapian::termcount Xapian::Database::get_wdf_upper_bound(const\n" + "std::string &term) const \n" + ""}, + { (char *)"Database_valuestream_begin", _wrap_Database_valuestream_begin, 0x0001, (char *)"\n" + "Return an iterator over the value in slot slot for each document.\n" + "\n" + "ValueIterator Xapian::Database::valuestream_begin(Xapian::valueno\n" + "slot) const \n" + ""}, + { (char *)"Database_valuestream_end", _wrap_Database_valuestream_end, 0x0001, (char *)"\n" + "Return end iterator corresponding to valuestream_begin().\n" + "\n" + "ValueIteratorEnd_ Xapian::Database::valuestream_end(Xapian::valueno)\n" + "const \n" + ""}, + { (char *)"Database_get_doclength", _wrap_Database_get_doclength, 0x0001, (char *)"\n" + "Get the length of a document.\n" + "\n" + "Xapian::termcount Xapian::Database::get_doclength(Xapian::docid did)\n" + "const \n" + ""}, + { (char *)"Database_keep_alive", (PyCFunction)_wrap_Database_keep_alive, 0x0008, (char *)"\n" + "Send a \"keep-alive\" to remote databases to stop them timing out.\n" + "\n" + "void Xapian::Database::keep_alive()\n" + "\n" + "Has no effect on non-remote databases. \n" + ""}, + { (char *)"Database_get_document", _wrap_Database_get_document, 0x0001, (char *)"\n" + "Get a document from the database, given its document id.\n" + "\n" + "Xapian::Document Xapian::Database::get_document(Xapian::docid did)\n" + "const\n" + "\n" + "This method returns a Xapian::Document object which provides the\n" + "information about a document.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "did: The document id of the document to retrieve.\n" + "\n" + "A Xapian::Document object containing the document data\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "Xapian::DocNotFoundError: The document specified could not be found\n" + "in the database. \n" + ""}, + { (char *)"Database_get_spelling_suggestion", _wrap_Database_get_spelling_suggestion, 0x0001, (char *)"\n" + "Suggest a spelling correction.\n" + "\n" + "std::string Xapian::Database::get_spelling_suggestion(const\n" + "std::string &word, unsigned max_edit_distance=2) const\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "word: The potentially misspelled word.\n" + "\n" + "max_edit_distance: Only consider words which are at most\n" + "max_edit_distance edits from word. An edit is a character insertion,\n" + "deletion, or the transposition of two adjacent characters (default is\n" + "2). \n" + ""}, + { (char *)"Database_spellings_begin", (PyCFunction)_wrap_Database_spellings_begin, 0x0008, (char *)"\n" + "An iterator which returns all the spelling correction targets.\n" + "\n" + "Xapian::TermIterator Xapian::Database::spellings_begin() const\n" + "\n" + "This returns all the words which are considered as targets for the\n" + "spelling correction algorithm. The frequency of each word is available\n" + "as the term frequency of each entry in the returned iterator. \n" + ""}, + { (char *)"Database_spellings_end", (PyCFunction)_wrap_Database_spellings_end, 0x0008, (char *)"\n" + "Corresponding end iterator to spellings_begin().\n" + "\n" + "Xapian::TermIterator Xapian::Database::spellings_end() const \n" + ""}, + { (char *)"Database_synonyms_begin", _wrap_Database_synonyms_begin, 0x0001, (char *)"\n" + "An iterator which returns all the synonyms for a given term.\n" + "\n" + "Xapian::TermIterator Xapian::Database::synonyms_begin(const\n" + "std::string &term) const\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "term: The term to return synonyms for. \n" + ""}, + { (char *)"Database_synonyms_end", _wrap_Database_synonyms_end, 0x0001, (char *)"\n" + "Corresponding end iterator to synonyms_begin(term).\n" + "\n" + "Xapian::TermIterator Xapian::Database::synonyms_end(const std::string\n" + "&) const \n" + ""}, + { (char *)"Database_synonym_keys_begin", _wrap_Database_synonym_keys_begin, 0x0001, (char *)"\n" + "An iterator which returns all terms which have synonyms.\n" + "\n" + "Xapian::TermIterator Xapian::Database::synonym_keys_begin(const\n" + "std::string &prefix=std::string()) const\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "prefix: If non-empty, only terms with this prefix are returned. \n" + ""}, + { (char *)"Database_synonym_keys_end", _wrap_Database_synonym_keys_end, 0x0001, (char *)"\n" + "Corresponding end iterator to synonym_keys_begin(prefix).\n" + "\n" + "Xapian::TermIterator Xapian::Database::synonym_keys_end(const\n" + "std::string &=std::string()) const \n" + ""}, + { (char *)"Database_get_metadata", _wrap_Database_get_metadata, 0x0001, (char *)"\n" + "Get the user-specified metadata associated with a given key.\n" + "\n" + "std::string Xapian::Database::get_metadata(const std::string &key)\n" + "const\n" + "\n" + "User-specified metadata allows you to store arbitrary information in\n" + "the form of (key,tag) pairs. See WritableDatabase::set_metadata() for\n" + "more information.\n" + "\n" + "When invoked on a Xapian::Database object representing multiple\n" + "databases, currently only the metadata for the first is considered but\n" + "this behaviour may change in the future.\n" + "\n" + "If there is no piece of metadata associated with the specified key, an\n" + "empty string is returned (this applies even for backends which don't\n" + "support metadata).\n" + "\n" + "Empty keys are not valid, and specifying one will cause an exception.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "key: The key of the metadata item to access.\n" + "\n" + "The retrieved metadata item's value.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "Xapian::InvalidArgumentError: will be thrown if the key supplied is\n" + "empty. \n" + ""}, + { (char *)"Database__metadata_keys_begin", _wrap_Database__metadata_keys_begin, 0x0001, (char *)"\n" + "An iterator which returns all user-specified metadata keys.\n" + "\n" + "Xapian::TermIterator Xapian::Database::metadata_keys_begin(const\n" + "std::string &prefix=std::string()) const\n" + "\n" + "When invoked on a Xapian::Database object representing multiple\n" + "databases, currently only the metadata for the first is considered but\n" + "this behaviour may change in the future.\n" + "\n" + "If the backend doesn't support metadata, then this method returns an\n" + "iterator which compares equal to that returned by metadata_keys_end().\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "prefix: If non-empty, only keys with this prefix are returned.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "Xapian::UnimplementedError: will be thrown if the backend implements\n" + "user-specified metadata, but doesn't implement iterating its keys\n" + "(currently this happens for the InMemory backend). \n" + ""}, + { (char *)"Database__metadata_keys_end", _wrap_Database__metadata_keys_end, 0x0001, (char *)"\n" + "Corresponding end iterator to metadata_keys_begin().\n" + "\n" + "Xapian::TermIterator Xapian::Database::metadata_keys_end(const\n" + "std::string &=std::string()) const \n" + ""}, + { (char *)"Database_get_uuid", (PyCFunction)_wrap_Database_get_uuid, 0x0008, (char *)"\n" + "Get a UUID for the database.\n" + "\n" + "std::string Xapian::Database::get_uuid() const\n" + "\n" + "The UUID will persist for the lifetime of the database.\n" + "\n" + "Replicas (eg, made with the replication protocol, or by copying all\n" + "the database files) will have the same UUID. However, copies (made\n" + "with copydatabase, or xapian-compact) will have different UUIDs.\n" + "\n" + "If the backend does not support UUIDs or this database has no\n" + "subdatabases, the UUID will be empty.\n" + "\n" + "If this database has multiple sub-databases, the UUID string will\n" + "contain the UUIDs of all the sub-databases. \n" + ""}, + { (char *)"Database_swigregister", Database_swigregister, 0x0001, __null}, + { (char *)"Database_swiginit", Database_swiginit, 0x0001, __null}, + { (char *)"delete_WritableDatabase", (PyCFunction)_wrap_delete_WritableDatabase, 0x0008, (char *)"\n" + "Destroy this handle on the database.\n" + "\n" + "virtual Xapian::WritableDatabase::~WritableDatabase()\n" + "\n" + "If there are no copies of this object remaining, the database will be\n" + "closed. If there are any transactions in progress these will be\n" + "aborted as if cancel_transaction had been called. \n" + ""}, + { (char *)"new_WritableDatabase", _wrap_new_WritableDatabase, 0x0001, (char *)"\n" + "Copying is allowed.\n" + "\n" + "Xapian::WritableDatabase::WritableDatabase(const WritableDatabase\n" + "&other)\n" + "\n" + "The internals are reference counted, so copying is cheap. \n" + ""}, + { (char *)"WritableDatabase_commit", (PyCFunction)_wrap_WritableDatabase_commit, 0x0008, (char *)"\n" + "Commit any pending modifications made to the database.\n" + "\n" + "void Xapian::WritableDatabase::commit()\n" + "\n" + "For efficiency reasons, when performing multiple updates to a database\n" + "it is best (indeed, almost essential) to make as many modifications as\n" + "memory will permit in a single pass through the database. To ensure\n" + "this, Xapian batches up modifications.\n" + "\n" + "This method may be called at any time to commit any pending\n" + "modifications to the database.\n" + "\n" + "If any of the modifications fail, an exception will be thrown and the\n" + "database will be left in a state in which each separate addition,\n" + "replacement or deletion operation has either been fully performed or\n" + "not performed at all: it is then up to the application to work out\n" + "which operations need to be repeated.\n" + "\n" + "It's not valid to call commit() within a transaction.\n" + "\n" + "Beware of calling commit() too frequently: this will make indexing\n" + "take much longer.\n" + "\n" + "Note that commit() need not be called explicitly: it will be called\n" + "automatically when the database is closed, or when a sufficient number\n" + "of modifications have been made. By default, this is every 10000\n" + "documents added, deleted, or modified. This value is rather\n" + "conservative, and if you have a machine with plenty of memory, you can\n" + "improve indexing throughput dramatically by setting\n" + "XAPIAN_FLUSH_THRESHOLD in the environment to a larger value.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "Xapian::DatabaseError: will be thrown if a problem occurs while\n" + "modifying the database.\n" + "\n" + "Xapian::DatabaseCorruptError: will be thrown if the database is in a\n" + "corrupt state. \n" + ""}, + { (char *)"WritableDatabase_flush", (PyCFunction)_wrap_WritableDatabase_flush, 0x0008, (char *)"\n" + "Pre-1.1.0 name for commit().\n" + "\n" + "void Xapian::WritableDatabase::flush()\n" + "\n" + "Use commit() instead in new code. This alias may be deprecated in the\n" + "future. \n" + ""}, + { (char *)"WritableDatabase_begin_transaction", _wrap_WritableDatabase_begin_transaction, 0x0001, (char *)"\n" + "Begin a transaction.\n" + "\n" + "void Xapian::WritableDatabase::begin_transaction(bool flushed=true)\n" + "\n" + "In Xapian a transaction is a group of modifications to the database\n" + "which are linked such that either all will be applied simultaneously\n" + "or none will be applied at all. Even in the case of a power failure,\n" + "this characteristic should be preserved (as long as the filesystem\n" + "isn't corrupted, etc).\n" + "\n" + "A transaction is started with begin_transaction() and can either be\n" + "committed by calling commit_transaction() or aborted by calling\n" + "cancel_transaction().\n" + "\n" + "By default, a transaction implicitly calls commit() before and after\n" + "so that the modifications stand and fall without affecting\n" + "modifications before or after.\n" + "\n" + "The downside of these implicit calls to commit() is that small\n" + "transactions can harm indexing performance in the same way that\n" + "explicitly calling commit() frequently can.\n" + "\n" + "If you're applying atomic groups of changes and only wish to ensure\n" + "that each group is either applied or not applied, then you can prevent\n" + "the automatic commit() before and after the transaction by starting\n" + "the transaction with begin_transaction(false). However, if\n" + "cancel_transaction is called (or if commit_transaction isn't called\n" + "before the WritableDatabase object is destroyed) then any changes\n" + "which were pending before the transaction began will also be\n" + "discarded.\n" + "\n" + "Transactions aren't currently supported by the InMemory backend.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "Xapian::UnimplementedError: will be thrown if transactions are not\n" + "available for this database type.\n" + "\n" + "Xapian::InvalidOperationError: will be thrown if this is called at an\n" + "invalid time, such as when a transaction is already in progress. \n" + ""}, + { (char *)"WritableDatabase_commit_transaction", (PyCFunction)_wrap_WritableDatabase_commit_transaction, 0x0008, (char *)"\n" + "Complete the transaction currently in progress.\n" + "\n" + "void Xapian::WritableDatabase::commit_transaction()\n" + "\n" + "If this method completes successfully and this is a flushed\n" + "transaction, all the database modifications made during the\n" + "transaction will have been committed to the database.\n" + "\n" + "If an error occurs, an exception will be thrown, and none of the\n" + "modifications made to the database during the transaction will have\n" + "been applied to the database.\n" + "\n" + "In all cases the transaction will no longer be in progress.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "Xapian::DatabaseError: will be thrown if a problem occurs while\n" + "modifying the database.\n" + "\n" + "Xapian::DatabaseCorruptError: will be thrown if the database is in a\n" + "corrupt state.\n" + "\n" + "Xapian::InvalidOperationError: will be thrown if a transaction is not\n" + "currently in progress.\n" + "\n" + "Xapian::UnimplementedError: will be thrown if transactions are not\n" + "available for this database type. \n" + ""}, + { (char *)"WritableDatabase_cancel_transaction", (PyCFunction)_wrap_WritableDatabase_cancel_transaction, 0x0008, (char *)"\n" + "Abort the transaction currently in progress, discarding the pending\n" + "modifications made to the database.\n" + "\n" + "void Xapian::WritableDatabase::cancel_transaction()\n" + "\n" + "If an error occurs in this method, an exception will be thrown, but\n" + "the transaction will be cancelled anyway.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "Xapian::DatabaseError: will be thrown if a problem occurs while\n" + "modifying the database.\n" + "\n" + "Xapian::DatabaseCorruptError: will be thrown if the database is in a\n" + "corrupt state.\n" + "\n" + "Xapian::InvalidOperationError: will be thrown if a transaction is not\n" + "currently in progress.\n" + "\n" + "Xapian::UnimplementedError: will be thrown if transactions are not\n" + "available for this database type. \n" + ""}, + { (char *)"WritableDatabase_add_document", _wrap_WritableDatabase_add_document, 0x0001, (char *)"\n" + "Add a new document to the database.\n" + "\n" + "Xapian::docid Xapian::WritableDatabase::add_document(const\n" + "Xapian::Document &document)\n" + "\n" + "This method adds the specified document to the database, returning a\n" + "newly allocated document ID. Automatically allocated document IDs come\n" + "from a per-database monotonically increasing counter, so IDs from\n" + "deleted documents won't be reused.\n" + "\n" + "If you want to specify the document ID to be used, you should call\n" + "replace_document() instead.\n" + "\n" + "Note that changes to the database won't be immediately committed to\n" + "disk; see commit() for more details.\n" + "\n" + "As with all database modification operations, the effect is atomic:\n" + "the document will either be fully added, or the document fails to be\n" + "added and an exception is thrown (possibly at a later time when\n" + "commit() is called or the database is closed).\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "document: The new document to be added.\n" + "\n" + "The document ID of the newly added document.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "Xapian::DatabaseError: will be thrown if a problem occurs while\n" + "writing to the database.\n" + "\n" + "Xapian::DatabaseCorruptError: will be thrown if the database is in a\n" + "corrupt state. \n" + ""}, + { (char *)"WritableDatabase_delete_document", _wrap_WritableDatabase_delete_document, 0x0001, (char *)"\n" + "Delete any documents indexed by a term from the database.\n" + "\n" + "void Xapian::WritableDatabase::delete_document(const std::string\n" + "&unique_term)\n" + "\n" + "This method removes any documents indexed by the specified term from\n" + "the database.\n" + "\n" + "A major use is for convenience when UIDs from another system are\n" + "mapped to terms in Xapian, although this method has other uses (for\n" + "example, you could add a \"deletion date\" term to documents at index\n" + "time and use this method to delete all documents due for deletion on a\n" + "particular date).\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "unique_term: The term to remove references to.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "Xapian::DatabaseError: will be thrown if a problem occurs while\n" + "writing to the database.\n" + "\n" + "Xapian::DatabaseCorruptError: will be thrown if the database is in a\n" + "corrupt state. \n" + ""}, + { (char *)"WritableDatabase_replace_document", _wrap_WritableDatabase_replace_document, 0x0001, (char *)"\n" + "Replace any documents matching a term.\n" + "\n" + "Xapian::docid Xapian::WritableDatabase::replace_document(const\n" + "std::string &unique_term, const Xapian::Document &document)\n" + "\n" + "This method replaces any documents indexed by the specified term with\n" + "the specified document. If any documents are indexed by the term, the\n" + "lowest document ID will be used for the document, otherwise a new\n" + "document ID will be generated as for add_document.\n" + "\n" + "One common use is to allow UIDs from another system to easily be\n" + "mapped to terms in Xapian. Note that this method doesn't automatically\n" + "add unique_term as a term, so you'll need to call\n" + "document.add_term(unique_term) first when using replace_document() in\n" + "this way.\n" + "\n" + "Another possible use is to allow groups of documents to be marked for\n" + "later deletion - for example, you could add a \"deletion date\" term\n" + "to documents at index time and use this method to easily and\n" + "efficiently delete all documents due for deletion on a particular\n" + "date.\n" + "\n" + "Note that changes to the database won't be immediately committed to\n" + "disk; see commit() for more details.\n" + "\n" + "As with all database modification operations, the effect is atomic:\n" + "the document(s) will either be fully replaced, or the document(s) fail\n" + "to be replaced and an exception is thrown (possibly at a later time\n" + "when commit() is called or the database is closed).\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "unique_term: The \"unique\" term.\n" + "\n" + "document: The new document.\n" + "\n" + "The document ID that document was given.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "Xapian::DatabaseError: will be thrown if a problem occurs while\n" + "writing to the database.\n" + "\n" + "Xapian::DatabaseCorruptError: will be thrown if the database is in a\n" + "corrupt state. \n" + ""}, + { (char *)"WritableDatabase_add_spelling", _wrap_WritableDatabase_add_spelling, 0x0001, (char *)"\n" + "Add a word to the spelling dictionary.\n" + "\n" + "void Xapian::WritableDatabase::add_spelling(const std::string &word,\n" + "Xapian::termcount freqinc=1) const\n" + "\n" + "If the word is already present, its frequency is increased.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "word: The word to add.\n" + "\n" + "freqinc: How much to increase its frequency by (default 1). \n" + ""}, + { (char *)"WritableDatabase_remove_spelling", _wrap_WritableDatabase_remove_spelling, 0x0001, (char *)"\n" + "Remove a word from the spelling dictionary.\n" + "\n" + "void Xapian::WritableDatabase::remove_spelling(const std::string\n" + "&word, Xapian::termcount freqdec=1) const\n" + "\n" + "The word's frequency is decreased, and if would become zero or less\n" + "then the word is removed completely.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "word: The word to remove.\n" + "\n" + "freqdec: How much to decrease its frequency by (default 1). \n" + ""}, + { (char *)"WritableDatabase_add_synonym", _wrap_WritableDatabase_add_synonym, 0x0001, (char *)"\n" + "Add a synonym for a term.\n" + "\n" + "void Xapian::WritableDatabase::add_synonym(const std::string &term,\n" + "const std::string &synonym) const\n" + "\n" + "If synonym is already a synonym for term, then no action is taken. \n" + ""}, + { (char *)"WritableDatabase_remove_synonym", _wrap_WritableDatabase_remove_synonym, 0x0001, (char *)"\n" + "Remove a synonym for a term.\n" + "\n" + "void Xapian::WritableDatabase::remove_synonym(const std::string &term,\n" + "const std::string &synonym) const\n" + "\n" + "If synonym isn't a synonym for term, then no action is taken. \n" + ""}, + { (char *)"WritableDatabase_clear_synonyms", _wrap_WritableDatabase_clear_synonyms, 0x0001, (char *)"\n" + "Remove all synonyms for a term.\n" + "\n" + "void Xapian::WritableDatabase::clear_synonyms(const std::string &term)\n" + "const\n" + "\n" + "If term has no synonyms, no action is taken. \n" + ""}, + { (char *)"WritableDatabase_set_metadata", _wrap_WritableDatabase_set_metadata, 0x0001, (char *)"\n" + "Set the user-specified metadata associated with a given key.\n" + "\n" + "void Xapian::WritableDatabase::set_metadata(const std::string &key,\n" + "const std::string &value)\n" + "\n" + "This method sets the metadata value associated with a given key. If\n" + "there is already a metadata value stored in the database with the same\n" + "key, the old value is replaced. If you want to delete an existing item\n" + "of metadata, just set its value to the empty string.\n" + "\n" + "User-specified metadata allows you to store arbitrary information in\n" + "the form of (key,tag) pairs.\n" + "\n" + "There's no hard limit on the number of metadata items, or the size of\n" + "the metadata values. Metadata keys have a limited length, which\n" + "depends on the backend. We recommend limiting them to 200 bytes. Empty\n" + "keys are not valid, and specifying one will cause an exception.\n" + "\n" + "Metadata modifications are committed to disk in the same way as\n" + "modifications to the documents in the database are: i.e.,\n" + "modifications are atomic, and won't be committed to disk immediately\n" + "(see commit() for more details). This allows metadata to be used to\n" + "link databases with versioned external resources by storing the\n" + "appropriate version number in a metadata item.\n" + "\n" + "You can also use the metadata to store arbitrary extra information\n" + "associated with terms, documents, or postings by encoding the termname\n" + "and/or document id into the metadata key.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "key: The key of the metadata item to set.\n" + "\n" + "value: The value of the metadata item to set.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "Xapian::DatabaseError: will be thrown if a problem occurs while\n" + "writing to the database.\n" + "\n" + "Xapian::DatabaseCorruptError: will be thrown if the database is in a\n" + "corrupt state.\n" + "\n" + "Xapian::InvalidArgumentError: will be thrown if the key supplied is\n" + "empty.\n" + "\n" + "Xapian::UnimplementedError: will be thrown if the database backend in\n" + "use doesn't support user- specified metadata. \n" + ""}, + { (char *)"WritableDatabase___str__", (PyCFunction)_wrap_WritableDatabase___str__, 0x0008, (char *)"\n" + "Return a string describing this object.\n" + "\n" + "std::string Xapian::WritableDatabase::get_description() const \n" + ""}, + { (char *)"WritableDatabase_swigregister", WritableDatabase_swigregister, 0x0001, __null}, + { (char *)"WritableDatabase_swiginit", WritableDatabase_swiginit, 0x0001, __null}, + { (char *)"open_stub", (PyCFunction)_wrap_open_stub, 0x0008, (char *)"\n" + "Construct a WritableDatabase object for a stub database file.\n" + "\n" + "WritableDatabase Xapian::Auto::open_stub(const std::string &file, int\n" + "action)\n" + "\n" + "The stub database file must contain serialised parameters for exactly\n" + "one database.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "file: pathname of the stub database file. \n" + ""}, + { (char *)"brass_open", _wrap_brass_open, 0x0001, (char *)"\n" + "Construct a Database object for update access to a Brass database.\n" + "\n" + "WritableDatabase Xapian::Brass::open(const std::string &dir, int\n" + "action, int block_size=8192)\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "dir: pathname of the directory containing the database.\n" + "\n" + "action: determines handling of existing/non-existing database:\n" + "Xapian::DB_CREATE fail if database already exist, otherwise create new\n" + "database.\n" + "\n" + "Xapian::DB_CREATE_OR_OPEN open existing database, or create new\n" + "database if none exists.\n" + "\n" + "Xapian::DB_CREATE_OR_OVERWRITE overwrite existing database, or create\n" + "new database if none exists.\n" + "\n" + "Xapian::DB_OPEN open existing database, failing if none exists.\n" + "\n" + "block_size: the Btree blocksize to use (in bytes), which must be a\n" + "power of two between 2048 and 65536 (inclusive). The default (also\n" + "used if an invalid value if passed) is 8192 bytes. This parameter is\n" + "ignored when opening an existing database. \n" + ""}, + { (char *)"chert_open", _wrap_chert_open, 0x0001, (char *)"\n" + "Construct a Database object for update access to a Chert database.\n" + "\n" + "WritableDatabase Xapian::Chert::open(const std::string &dir, int\n" + "action, int block_size=8192)\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "dir: pathname of the directory containing the database.\n" + "\n" + "action: determines handling of existing/non-existing database:\n" + "Xapian::DB_CREATE fail if database already exist, otherwise create new\n" + "database.\n" + "\n" + "Xapian::DB_CREATE_OR_OPEN open existing database, or create new\n" + "database if none exists.\n" + "\n" + "Xapian::DB_CREATE_OR_OVERWRITE overwrite existing database, or create\n" + "new database if none exists.\n" + "\n" + "Xapian::DB_OPEN open existing database, failing if none exists.\n" + "\n" + "block_size: the Btree blocksize to use (in bytes), which must be a\n" + "power of two between 2048 and 65536 (inclusive). The default (also\n" + "used if an invalid value if passed) is 8192 bytes. This parameter is\n" + "ignored when opening an existing database. \n" + ""}, + { (char *)"flint_open", _wrap_flint_open, 0x0001, (char *)"\n" + "Construct a Database object for update access to a Flint database.\n" + "\n" + "WritableDatabase Xapian::Flint::open(const std::string &dir, int\n" + "action, int block_size=8192)\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "dir: pathname of the directory containing the database.\n" + "\n" + "action: determines handling of existing/non-existing database:\n" + "Xapian::DB_CREATE fail if database already exist, otherwise create new\n" + "database.\n" + "\n" + "Xapian::DB_CREATE_OR_OPEN open existing database, or create new\n" + "database if none exists.\n" + "\n" + "Xapian::DB_CREATE_OR_OVERWRITE overwrite existing database, or create\n" + "new database if none exists.\n" + "\n" + "Xapian::DB_OPEN open existing database, failing if none exists.\n" + "\n" + "block_size: the Btree blocksize to use (in bytes), which must be a\n" + "power of two between 2048 and 65536 (inclusive). The default (also\n" + "used if an invalid value if passed) is 8192 bytes. This parameter is\n" + "ignored when opening an existing database. \n" + ""}, + { (char *)"inmemory_open", (PyCFunction)_wrap_inmemory_open, 0x0004, (char *)"\n" + "Construct a WritableDatabase object for a new, empty InMemory\n" + "database.\n" + "\n" + "WritableDatabase Xapian::InMemory::open()\n" + "\n" + "Only a writable InMemory database can be created, since a read-only\n" + "one would always remain empty. \n" + ""}, + { (char *)"remote_open", _wrap_remote_open, 0x0001, (char *)"\n" + "Construct a Database object for read-only access to a remote database\n" + "accessed via a program.\n" + "\n" + "Database Xapian::Remote::open(const std::string &program, const\n" + "std::string &args, Xapian::timeout timeout=10000)\n" + "\n" + "Access to the remote database is done by running an external program\n" + "and communicating with it on stdin/stdout.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "program: the external program to run.\n" + "\n" + "args: space-separated list of arguments to pass to program.\n" + "\n" + "timeout: timeout in milliseconds. If this timeout is exceeded for any\n" + "individual operation on the remote database then\n" + "Xapian::NetworkTimeoutError is thrown. A timeout of 0 means don't\n" + "timeout. (Default is 10000ms, which is 10 seconds). \n" + ""}, + { (char *)"remote_open_writable", _wrap_remote_open_writable, 0x0001, (char *)"\n" + "Construct a WritableDatabase object for update access to a remote\n" + "database accessed via a program.\n" + "\n" + "WritableDatabase Xapian::Remote::open_writable(const std::string\n" + "&program, const std::string &args, Xapian::timeout timeout=0)\n" + "\n" + "Access to the remote database is done by running an external program\n" + "and communicating with it on stdin/stdout.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "program: the external program to run.\n" + "\n" + "args: space-separated list of arguments to pass to program.\n" + "\n" + "timeout: timeout in milliseconds. If this timeout is exceeded for any\n" + "individual operation on the remote database then\n" + "Xapian::NetworkTimeoutError is thrown. (Default is 0, which means\n" + "don't timeout). \n" + ""}, + { (char *)"delete_Query", (PyCFunction)_wrap_delete_Query, 0x0008, (char *)"\n" + "Destructor.\n" + "\n" + "Xapian::Query::~Query() \n" + ""}, + { (char *)"Query_get_length", (PyCFunction)_wrap_Query_get_length, 0x0008, (char *)"\n" + "Get the length of the query, used by some ranking formulae.\n" + "\n" + "Xapian::termcount Xapian::Query::get_length() const\n" + "\n" + "This value is calculated automatically - if you want to override it\n" + "you can pass a different value to Enquire::set_query(). \n" + ""}, + { (char *)"Query_get_terms_begin", (PyCFunction)_wrap_Query_get_terms_begin, 0x0008, (char *)"\n" + "Return a Xapian::TermIterator returning all the terms in the query, in\n" + "order of termpos.\n" + "\n" + "TermIterator Xapian::Query::get_terms_begin() const\n" + "\n" + "If multiple terms have the same term position, their order is\n" + "unspecified. Duplicates (same term and termpos) will be removed. \n" + ""}, + { (char *)"Query_get_terms_end", (PyCFunction)_wrap_Query_get_terms_end, 0x0008, (char *)"\n" + "Return a Xapian::TermIterator to the end of the list of terms in the\n" + "query.\n" + "\n" + "TermIterator Xapian::Query::get_terms_end() const \n" + ""}, + { (char *)"Query_empty", (PyCFunction)_wrap_Query_empty, 0x0008, (char *)"\n" + "Test if the query is empty (i.e.\n" + "\n" + "bool Xapian::Query::empty() const\n" + "\n" + "was constructed using the default ctor or with an empty iterator\n" + "ctor). \n" + ""}, + { (char *)"Query_serialise", (PyCFunction)_wrap_Query_serialise, 0x0008, (char *)"\n" + "Serialise query into a string.\n" + "\n" + "std::string Xapian::Query::serialise() const\n" + "\n" + "The query representation may change between Xapian releases: even\n" + "between minor versions. However, it is guaranteed not to change unless\n" + "the remote database protocol has also changed between releases. \n" + ""}, + { (char *)"Query_unserialise", _wrap_Query_unserialise, 0x0001, __null}, + { (char *)"Query___str__", (PyCFunction)_wrap_Query___str__, 0x0008, (char *)"\n" + "Return a string describing this object.\n" + "\n" + "std::string Xapian::Query::get_description() const \n" + ""}, + { (char *)"new_Query", _wrap_new_Query, 0x0001, (char *)"\n" + "Construct an external source query.\n" + "\n" + "Xapian::Query::Query(Xapian::PostingSource *external_source)\n" + "\n" + "An attempt to clone the posting source will be made immediately, so if\n" + "the posting source supports clone(), the source supplied may be safely\n" + "deallocated after this call. If the source does not support clone(),\n" + "the caller must ensure that the posting source remains valid until the\n" + "Query is deallocated.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "external_source: The source to use in the query. \n" + ""}, + { (char *)"Query_swigregister", Query_swigregister, 0x0001, __null}, + { (char *)"Query_swiginit", Query_swiginit, 0x0001, __null}, + { (char *)"Stopper___call__", _wrap_Stopper___call__, 0x0001, __null}, + { (char *)"delete_Stopper", (PyCFunction)_wrap_delete_Stopper, 0x0008, (char *)"\n" + "Class has virtual methods, so provide a virtual destructor.\n" + "\n" + "virtual Xapian::Stopper::~Stopper() \n" + ""}, + { (char *)"Stopper___str__", (PyCFunction)_wrap_Stopper___str__, 0x0008, (char *)"\n" + "Return a string describing this object.\n" + "\n" + "virtual std::string Xapian::Stopper::get_description() const \n" + ""}, + { (char *)"new_Stopper", (PyCFunction)_wrap_new_Stopper, 0x0008, __null}, + { (char *)"disown_Stopper", (PyCFunction)_wrap_disown_Stopper, 0x0008, __null}, + { (char *)"Stopper_swigregister", Stopper_swigregister, 0x0001, __null}, + { (char *)"Stopper_swiginit", Stopper_swiginit, 0x0001, __null}, + { (char *)"new_SimpleStopper", (PyCFunction)_wrap_new_SimpleStopper, 0x0004, (char *)"\n" + "Initialise from a pair of iterators.\n" + "\n" + "Xapian::SimpleStopper::SimpleStopper(Iterator begin, Iterator end) \n" + ""}, + { (char *)"SimpleStopper_add", _wrap_SimpleStopper_add, 0x0001, (char *)"\n" + "Add a single stop word.\n" + "\n" + "void Xapian::SimpleStopper::add(const std::string &word) \n" + ""}, + { (char *)"delete_SimpleStopper", (PyCFunction)_wrap_delete_SimpleStopper, 0x0008, __null}, + { (char *)"SimpleStopper_swigregister", SimpleStopper_swigregister, 0x0001, __null}, + { (char *)"SimpleStopper_swiginit", SimpleStopper_swiginit, 0x0001, __null}, + { (char *)"delete_ValueRangeProcessor", (PyCFunction)_wrap_delete_ValueRangeProcessor, 0x0008, (char *)"\n" + "Destructor.\n" + "\n" + "virtual Xapian::ValueRangeProcessor::~ValueRangeProcessor() \n" + ""}, + { (char *)"ValueRangeProcessor___call__", _wrap_ValueRangeProcessor___call__, 0x0001, __null}, + { (char *)"new_ValueRangeProcessor", (PyCFunction)_wrap_new_ValueRangeProcessor, 0x0008, __null}, + { (char *)"disown_ValueRangeProcessor", (PyCFunction)_wrap_disown_ValueRangeProcessor, 0x0008, __null}, + { (char *)"ValueRangeProcessor_swigregister", ValueRangeProcessor_swigregister, 0x0001, __null}, + { (char *)"ValueRangeProcessor_swiginit", ValueRangeProcessor_swiginit, 0x0001, __null}, + { (char *)"new_StringValueRangeProcessor", _wrap_new_StringValueRangeProcessor, 0x0001, (char *)"\n" + "Constructor.\n" + "\n" + "Xapian::StringValueRangeProcessor::StringValueRangeProcessor(Xapian::valueno\n" + "valno_, const std::string &str_, bool prefix_=true)\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "valno_: The value number to return from operator().\n" + "\n" + "str_: A string to look for to recognise values as belonging to this\n" + "range.\n" + "\n" + "prefix_: Flag specifying whether to check for str_ as a prefix or a\n" + "suffix. \n" + ""}, + { (char *)"delete_StringValueRangeProcessor", (PyCFunction)_wrap_delete_StringValueRangeProcessor, 0x0008, __null}, + { (char *)"StringValueRangeProcessor_swigregister", StringValueRangeProcessor_swigregister, 0x0001, __null}, + { (char *)"StringValueRangeProcessor_swiginit", StringValueRangeProcessor_swiginit, 0x0001, __null}, + { (char *)"new_DateValueRangeProcessor", _wrap_new_DateValueRangeProcessor, 0x0001, (char *)"\n" + "Constructor.\n" + "\n" + "Xapian::DateValueRangeProcessor::DateValueRangeProcessor(Xapian::valueno\n" + "valno_, const std::string &str_, bool prefix_=true, bool\n" + "prefer_mdy_=false, int epoch_year_=1970)\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "valno_: The value number to return from operator().\n" + "\n" + "str_: A string to look for to recognise values as belonging to this\n" + "date range.\n" + "\n" + "prefix_: Whether to look for the string at the start or end of the\n" + "values. If true, the string is a prefix; if false, the string is a\n" + "suffix (default: true).\n" + "\n" + "prefer_mdy_: Should ambiguous dates be interpreted as month/day/year\n" + "rather than day/month/year? (default: false)\n" + "\n" + "epoch_year_: Year to use as the epoch for dates with 2 digit years\n" + "(default: 1970, so 1/1/69 is 2069 while 1/1/70 is 1970).\n" + "\n" + "The string supplied in str_ is used by operator() to decide whether\n" + "the pair of strings supplied to it constitute a valid range. If\n" + "prefix_ is true, the first value in a range must begin with str_ (and\n" + "the second value may optionally begin with str_); if prefix_ is false,\n" + "the second value in a range must end with str_ (and the first value\n" + "may optionally end with str_).\n" + "\n" + "If str_ is empty, the setting of prefix_ is irrelevant, and no special\n" + "strings are required at the start or end of the strings defining the\n" + "range.\n" + "\n" + "The remainder of both strings defining the endpoints must be valid\n" + "dates.\n" + "\n" + "For example, if str_ is \"created:\" and prefix_ is true, and the\n" + "range processor has been added to the queryparser, the queryparser\n" + "will accept \"created:1/1/2000..31/12/2001\". \n" + ""}, + { (char *)"delete_DateValueRangeProcessor", (PyCFunction)_wrap_delete_DateValueRangeProcessor, 0x0008, __null}, + { (char *)"DateValueRangeProcessor_swigregister", DateValueRangeProcessor_swigregister, 0x0001, __null}, + { (char *)"DateValueRangeProcessor_swiginit", DateValueRangeProcessor_swiginit, 0x0001, __null}, + { (char *)"new_NumberValueRangeProcessor", _wrap_new_NumberValueRangeProcessor, 0x0001, (char *)"\n" + "Constructor.\n" + "\n" + "Xapian::NumberValueRangeProcessor::NumberValueRangeProcessor(Xapian::valueno\n" + "valno_, const std::string &str_, bool prefix_=true)\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "valno_: The value number to return from operator().\n" + "\n" + "str_: A string to look for to recognise values as belonging to this\n" + "numeric range.\n" + "\n" + "prefix_: Whether to look for the string at the start or end of the\n" + "values. If true, the string is a prefix; if false, the string is a\n" + "suffix (default: true).\n" + "\n" + "The string supplied in str_ is used by operator() to decide whether\n" + "the pair of strings supplied to it constitute a valid range. If\n" + "prefix_ is true, the first value in a range must begin with str_ (and\n" + "the second value may optionally begin with str_); if prefix_ is false,\n" + "the second value in a range must end with str_ (and the first value\n" + "may optionally end with str_).\n" + "\n" + "If str_ is empty, the setting of prefix_ is irrelevant, and no special\n" + "strings are required at the start or end of the strings defining the\n" + "range.\n" + "\n" + "The remainder of both strings defining the endpoints must be valid\n" + "floating point numbers. (FIXME: define format recognised).\n" + "\n" + "For example, if str_ is \"$\" and prefix_ is true, and the range\n" + "processor has been added to the queryparser, the queryparser will\n" + "accept \"$10..50\" or \"$10..$50\", but not \"10..50\" or \"10..$50\"\n" + "as valid ranges. If str_ is \"kg\" and prefix_ is false, the\n" + "queryparser will accept \"10..50kg\" or \"10kg..50kg\", but not\n" + "\"10..50\" or \"10kg..50\" as valid ranges. \n" + ""}, + { (char *)"delete_NumberValueRangeProcessor", (PyCFunction)_wrap_delete_NumberValueRangeProcessor, 0x0008, __null}, + { (char *)"NumberValueRangeProcessor_swigregister", NumberValueRangeProcessor_swigregister, 0x0001, __null}, + { (char *)"NumberValueRangeProcessor_swiginit", NumberValueRangeProcessor_swiginit, 0x0001, __null}, + { (char *)"new_QueryParser", (PyCFunction)_wrap_new_QueryParser, 0x0004, (char *)"\n" + "Default constructor.\n" + "\n" + "Xapian::QueryParser::QueryParser() \n" + ""}, + { (char *)"delete_QueryParser", (PyCFunction)_wrap_delete_QueryParser, 0x0008, (char *)"\n" + "Destructor.\n" + "\n" + "Xapian::QueryParser::~QueryParser() \n" + ""}, + { (char *)"QueryParser_set_stemmer", _wrap_QueryParser_set_stemmer, 0x0001, (char *)"\n" + "Set the stemmer.\n" + "\n" + "void Xapian::QueryParser::set_stemmer(const Xapian::Stem &stemmer)\n" + "\n" + "This sets the stemming algorithm which will be used by the query\n" + "parser. Note that the stemming algorithm will only be used according\n" + "to the stemming strategy set by set_stemming_strategy(), which\n" + "defaults to STEM_NONE. Therefore, to use a stemming algorithm, you\n" + "will also need to call set_stemming_strategy() with a value other than\n" + "STEM_NONE. \n" + ""}, + { (char *)"QueryParser_set_stemming_strategy", _wrap_QueryParser_set_stemming_strategy, 0x0001, (char *)"\n" + "Set the stemming strategy.\n" + "\n" + "void Xapian::QueryParser::set_stemming_strategy(stem_strategy\n" + "strategy)\n" + "\n" + "This controls how the query parser will apply the stemming algorithm.\n" + "The default value is STEM_NONE. The possible values are:\n" + "\n" + "STEM_NONE: Don't perform any stemming.\n" + "\n" + "STEM_SOME: Search for stemmed forms of terms except for those which\n" + "start with a capital letter, or are followed by certain characters\n" + "(currently: (/@<>=*[{\" ), or are used with operators which need\n" + "positional information. Stemmed terms are prefixed with 'Z'.\n" + "\n" + "STEM_ALL: Search for stemmed forms of all words (note: no 'Z' prefix\n" + "is added).\n" + "\n" + "Note that the stemming algorithm is only applied to words in\n" + "probabilistic fields - boolean filter terms are never stemmed. \n" + ""}, + { (char *)"QueryParser_set_stopper", _wrap_QueryParser_set_stopper, 0x0001, (char *)"\n" + "Set the stopper.\n" + "\n" + "void Xapian::QueryParser::set_stopper(const Stopper *stop=NULL) \n" + ""}, + { (char *)"QueryParser_set_default_op", _wrap_QueryParser_set_default_op, 0x0001, (char *)"\n" + "Set the default operator.\n" + "\n" + "void Xapian::QueryParser::set_default_op(Query::op default_op)\n" + "\n" + "This operator is used to combine non-filter query items when no\n" + "explicit operator is used.\n" + "\n" + "The most useful values for this are OP_OR (the default) and OP_AND.\n" + "OP_NEAR and OP_PHRASE can also be useful.\n" + "\n" + "So for example, 'weather forecast' is parsed as if it were 'weather OR\n" + "forecast' by default. \n" + ""}, + { (char *)"QueryParser_get_default_op", (PyCFunction)_wrap_QueryParser_get_default_op, 0x0008, (char *)"\n" + "Get the current default operator.\n" + "\n" + "Query::op Xapian::QueryParser::get_default_op() const \n" + ""}, + { (char *)"QueryParser_set_database", _wrap_QueryParser_set_database, 0x0001, (char *)"\n" + "Specify the database being searched.\n" + "\n" + "void Xapian::QueryParser::set_database(const Database &db)\n" + "\n" + "The database is used for wildcard expansion (FLAG_WILDCARD and\n" + "FLAG_PARTIAL), spelling correction (FLAG_SPELLING_CORRECTION), and\n" + "synonyms (FLAG_SYNONYM, FLAG_AUTO_SYNONYMS, and\n" + "FLAG_AUTO_MULTIWORD_SYNONYMS). \n" + ""}, + { (char *)"QueryParser_parse_query", _wrap_QueryParser_parse_query, 0x0001, (char *)"\n" + "Parse a query.\n" + "\n" + "Query Xapian::QueryParser::parse_query(const std::string\n" + "&query_string, unsigned flags=FLAG_DEFAULT, const std::string\n" + "&default_prefix=std::string())\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "query_string: A free-text query as entered by a user\n" + "\n" + "flags: Zero or more Query::feature_flag specifying what features the\n" + "QueryParser should support. Combine multiple values with bitwise-or\n" + "(|) (default FLAG_DEFAULT).\n" + "\n" + "default_prefix: The default term prefix to use (default none). For\n" + "example, you can pass \"A\" when parsing an \"Author\" field.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "If: the query string can't be parsed, then Xapian::QueryParserError\n" + "is thrown. You can get an English error message to report to the user\n" + "by catching it and calling get_msg() on the caught exception. The\n" + "current possible values (in case you want to translate them) are:\n" + "\n" + "Unknown range operation\n" + "\n" + "parse error\n" + "\n" + "Syntax: AND \n" + "\n" + "Syntax: AND NOT \n" + "\n" + "Syntax: NOT \n" + "\n" + "Syntax: OR \n" + "\n" + "Syntax: XOR \n" + ""}, + { (char *)"QueryParser_add_prefix", _wrap_QueryParser_add_prefix, 0x0001, (char *)"\n" + "Add a probabilistic term prefix.\n" + "\n" + "void Xapian::QueryParser::add_prefix(const std::string &field, const\n" + "std::string &prefix)\n" + "\n" + "For example:\n" + "\n" + "This allows the user to search for author:Orwell which will be\n" + "converted to a search for the term \"Aorwell\".\n" + "\n" + "Multiple fields can be mapped to the same prefix. For example, you can\n" + "make title: and subject: aliases for each other.\n" + "\n" + "As of 1.0.4, you can call this method multiple times with the same\n" + "value of field to allow a single field to be mapped to multiple\n" + "prefixes. Multiple terms being generated for such a field, and\n" + "combined with Xapian::Query::OP_OR.\n" + "\n" + "If any prefixes are specified for the empty field name (i.e. you call\n" + "this method with an empty string as the first parameter) these\n" + "prefixes will be used for terms without a field specifier. If you do\n" + "this and also specify the default_prefix parameter to parse_query(),\n" + "then the default_prefix parameter will override.\n" + "\n" + "If the prefix parameter is empty, then \"field:word\" will produce the\n" + "term \"word\" (and this can be one of several prefixes for a\n" + "particular field, or for terms without a field specifier).\n" + "\n" + "If you call add_prefix() and add_boolean_prefix() for the same value\n" + "of field, a Xapian::InvalidOperationError exception will be thrown.\n" + "\n" + "In 1.0.3 and earlier, subsequent calls to this method with the same\n" + "value of field had no effect.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "field: The user visible field name\n" + "\n" + "prefix: The term prefix to map this to \n" + ""}, + { (char *)"QueryParser_add_boolean_prefix", _wrap_QueryParser_add_boolean_prefix, 0x0001, (char *)"\n" + "void\n" + "Xapian::QueryParser::add_boolean_prefix(const std::string &field,\n" + "const std::string &prefix) \n" + ""}, + { (char *)"QueryParser_stoplist_begin", (PyCFunction)_wrap_QueryParser_stoplist_begin, 0x0008, (char *)"\n" + "Iterate over terms omitted from the query as stopwords.\n" + "\n" + "TermIterator Xapian::QueryParser::stoplist_begin() const \n" + ""}, + { (char *)"QueryParser_stoplist_end", (PyCFunction)_wrap_QueryParser_stoplist_end, 0x0008, (char *)"TermIterator Xapian::QueryParser::stoplist_end() const "}, + { (char *)"QueryParser_unstem_begin", _wrap_QueryParser_unstem_begin, 0x0001, (char *)"\n" + "Iterate over unstemmed forms of the given (stemmed) term used in the\n" + "query.\n" + "\n" + "TermIterator Xapian::QueryParser::unstem_begin(const std::string\n" + "&term) const \n" + ""}, + { (char *)"QueryParser_unstem_end", _wrap_QueryParser_unstem_end, 0x0001, (char *)"\n" + "TermIterator\n" + "Xapian::QueryParser::unstem_end(const std::string &) const \n" + ""}, + { (char *)"QueryParser_add_valuerangeprocessor", _wrap_QueryParser_add_valuerangeprocessor, 0x0001, (char *)"\n" + "Register a ValueRangeProcessor.\n" + "\n" + "void\n" + "Xapian::QueryParser::add_valuerangeprocessor(Xapian::ValueRangeProcessor\n" + "*vrproc) \n" + ""}, + { (char *)"QueryParser_get_corrected_query_string", (PyCFunction)_wrap_QueryParser_get_corrected_query_string, 0x0008, (char *)"\n" + "Get the spelling-corrected query string.\n" + "\n" + "std::string Xapian::QueryParser::get_corrected_query_string() const\n" + "\n" + "This will only be set if FLAG_SPELLING_CORRECTION is specified when\n" + "QueryParser::parse_query() was last called.\n" + "\n" + "If there were no corrections, an empty string is returned. \n" + ""}, + { (char *)"QueryParser___str__", (PyCFunction)_wrap_QueryParser___str__, 0x0008, (char *)"\n" + "Return a string describing this object.\n" + "\n" + "std::string Xapian::QueryParser::get_description() const \n" + ""}, + { (char *)"QueryParser_swigregister", QueryParser_swigregister, 0x0001, __null}, + { (char *)"QueryParser_swiginit", QueryParser_swiginit, 0x0001, __null}, + { (char *)"sortable_serialise", (PyCFunction)_wrap_sortable_serialise, 0x0008, __null}, + { (char *)"sortable_unserialise", (PyCFunction)_wrap_sortable_unserialise, 0x0008, __null}, + { (char *)"delete_StemImplementation", (PyCFunction)_wrap_delete_StemImplementation, 0x0008, (char *)"\n" + "Virtual destructor.\n" + "\n" + "virtual Xapian::StemImplementation::~StemImplementation() \n" + ""}, + { (char *)"StemImplementation___call__", _wrap_StemImplementation___call__, 0x0001, __null}, + { (char *)"StemImplementation___str__", (PyCFunction)_wrap_StemImplementation___str__, 0x0008, (char *)"\n" + "Return a string describing this object.\n" + "\n" + "virtual std::string Xapian::StemImplementation::get_description()\n" + "const =0 \n" + ""}, + { (char *)"new_StemImplementation", (PyCFunction)_wrap_new_StemImplementation, 0x0008, __null}, + { (char *)"disown_StemImplementation", (PyCFunction)_wrap_disown_StemImplementation, 0x0008, __null}, + { (char *)"StemImplementation_swigregister", StemImplementation_swigregister, 0x0001, __null}, + { (char *)"StemImplementation_swiginit", StemImplementation_swiginit, 0x0001, __null}, + { (char *)"new_Stem", _wrap_new_Stem, 0x0001, (char *)"\n" + "Construct a Xapian::Stem object with a user-provided stemming\n" + "algorithm.\n" + "\n" + "Xapian::Stem::Stem(StemImplementation *p)\n" + "\n" + "You can subclass Xapian::StemImplementation to implement your own\n" + "stemming algorithm (or to wrap a third-party algorithm) and then wrap\n" + "your implementation in a Xapian::Stem object to pass to the Xapian\n" + "API.\n" + "\n" + "The StemImplementation object is reference counted, and so will be\n" + "automatically deleted by the Xapian::Stem wrapper when no longer\n" + "required. \n" + ""}, + { (char *)"delete_Stem", (PyCFunction)_wrap_delete_Stem, 0x0008, (char *)"\n" + "Destructor.\n" + "\n" + "Xapian::Stem::~Stem() \n" + ""}, + { (char *)"Stem___call__", _wrap_Stem___call__, 0x0001, __null}, + { (char *)"Stem___str__", (PyCFunction)_wrap_Stem___str__, 0x0008, (char *)"\n" + "Return a string describing this object.\n" + "\n" + "std::string Xapian::Stem::get_description() const \n" + ""}, + { (char *)"Stem_get_available_languages", (PyCFunction)_wrap_Stem_get_available_languages, 0x0004, __null}, + { (char *)"Stem_swigregister", Stem_swigregister, 0x0001, __null}, + { (char *)"Stem_swiginit", Stem_swiginit, 0x0001, __null}, + { (char *)"new_TermGenerator", (PyCFunction)_wrap_new_TermGenerator, 0x0004, (char *)"\n" + "Default constructor.\n" + "\n" + "Xapian::TermGenerator::TermGenerator() \n" + ""}, + { (char *)"delete_TermGenerator", (PyCFunction)_wrap_delete_TermGenerator, 0x0008, (char *)"\n" + "Destructor.\n" + "\n" + "Xapian::TermGenerator::~TermGenerator() \n" + ""}, + { (char *)"TermGenerator_set_stemmer", _wrap_TermGenerator_set_stemmer, 0x0001, (char *)"\n" + "Set the Xapian::Stem object to be used for generating stemmed terms.\n" + "\n" + "void Xapian::TermGenerator::set_stemmer(const Xapian::Stem &stemmer)\n" + "\n" + ""}, + { (char *)"TermGenerator_set_stopper", _wrap_TermGenerator_set_stopper, 0x0001, (char *)"\n" + "Set the Xapian::Stopper object to be used for identifying stopwords.\n" + "\n" + "void Xapian::TermGenerator::set_stopper(const Xapian::Stopper\n" + "*stop=NULL)\n" + "\n" + "Stemmed forms of stopwords aren't indexed, but unstemmed forms still\n" + "are so that searches for phrases including stop words still work. \n" + ""}, + { (char *)"TermGenerator_set_document", _wrap_TermGenerator_set_document, 0x0001, (char *)"\n" + "Set the current document.\n" + "\n" + "void Xapian::TermGenerator::set_document(const Xapian::Document &doc)\n" + "\n" + ""}, + { (char *)"TermGenerator_get_document", (PyCFunction)_wrap_TermGenerator_get_document, 0x0008, (char *)"\n" + "Get the current document.\n" + "\n" + "const Xapian::Document& Xapian::TermGenerator::get_document() const \n" + ""}, + { (char *)"TermGenerator_set_database", _wrap_TermGenerator_set_database, 0x0001, (char *)"\n" + "Set the database to index spelling data to.\n" + "\n" + "void Xapian::TermGenerator::set_database(const\n" + "Xapian::WritableDatabase &db) \n" + ""}, + { (char *)"TermGenerator_set_flags", _wrap_TermGenerator_set_flags, 0x0001, (char *)"\n" + "Set flags.\n" + "\n" + "flags Xapian::TermGenerator::set_flags(flags toggle, flags\n" + "mask=flags(0))\n" + "\n" + "The new value of flags is: (flags & mask) ^ toggle\n" + "\n" + "To just set the flags, pass the new flags in toggle and the default\n" + "value for mask.\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "toggle: Flags to XOR.\n" + "\n" + "mask: Flags to AND with first.\n" + "\n" + "The old flags setting. \n" + ""}, + { (char *)"TermGenerator_index_text", _wrap_TermGenerator_index_text, 0x0001, (char *)"\n" + "Index some text in a std::string.\n" + "\n" + "void Xapian::TermGenerator::index_text(const std::string &text,\n" + "Xapian::termcount weight=1, const std::string &prefix=std::string())\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "weight: The wdf increment (default 1).\n" + "\n" + "prefix: The term prefix to use (default is no prefix). \n" + ""}, + { (char *)"TermGenerator_index_text_without_positions", _wrap_TermGenerator_index_text_without_positions, 0x0001, (char *)"\n" + "Index some text in a std::string without positional information.\n" + "\n" + "void Xapian::TermGenerator::index_text_without_positions(const\n" + "std::string &text, Xapian::termcount weight=1, const std::string\n" + "&prefix=std::string())\n" + "\n" + "Just like index_text, but no positional information is generated. This\n" + "means that the database will be significantly smaller, but that phrase\n" + "searching and NEAR won't be supported. \n" + ""}, + { (char *)"TermGenerator_increase_termpos", _wrap_TermGenerator_increase_termpos, 0x0001, (char *)"\n" + "Increase the termpos used by index_text by delta.\n" + "\n" + "void Xapian::TermGenerator::increase_termpos(Xapian::termcount\n" + "delta=100)\n" + "\n" + "This can be used to prevent phrase searches from spanning two\n" + "unconnected blocks of text (e.g. the title and body text). \n" + ""}, + { (char *)"TermGenerator_get_termpos", (PyCFunction)_wrap_TermGenerator_get_termpos, 0x0008, (char *)"\n" + "Get the current term position.\n" + "\n" + "Xapian::termcount Xapian::TermGenerator::get_termpos() const \n" + ""}, + { (char *)"TermGenerator_set_termpos", _wrap_TermGenerator_set_termpos, 0x0001, (char *)"\n" + "Set the current term position.\n" + "\n" + "void Xapian::TermGenerator::set_termpos(Xapian::termcount termpos) \n" + ""}, + { (char *)"TermGenerator___str__", (PyCFunction)_wrap_TermGenerator___str__, 0x0008, (char *)"\n" + "Return a string describing this object.\n" + "\n" + "std::string Xapian::TermGenerator::get_description() const \n" + ""}, + { (char *)"TermGenerator_swigregister", TermGenerator_swigregister, 0x0001, __null}, + { (char *)"TermGenerator_swiginit", TermGenerator_swiginit, 0x0001, __null}, + { (char *)"KeyMaker___call__", _wrap_KeyMaker___call__, 0x0001, __null}, + { (char *)"delete_KeyMaker", (PyCFunction)_wrap_delete_KeyMaker, 0x0008, (char *)"\n" + "Virtual destructor, because we have virtual methods.\n" + "\n" + "virtual Xapian::KeyMaker::~KeyMaker() \n" + ""}, + { (char *)"new_KeyMaker", (PyCFunction)_wrap_new_KeyMaker, 0x0008, __null}, + { (char *)"disown_KeyMaker", (PyCFunction)_wrap_disown_KeyMaker, 0x0008, __null}, + { (char *)"KeyMaker_swigregister", KeyMaker_swigregister, 0x0001, __null}, + { (char *)"KeyMaker_swiginit", KeyMaker_swiginit, 0x0001, __null}, + { (char *)"new_MultiValueKeyMaker", (PyCFunction)_wrap_new_MultiValueKeyMaker, 0x0004, (char *)"\n" + "Xapian::MultiValueKeyMaker::MultiValueKeyMaker(Iterator begin,\n" + "Iterator end) \n" + ""}, + { (char *)"MultiValueKeyMaker_add_value", _wrap_MultiValueKeyMaker_add_value, 0x0001, (char *)"\n" + "void\n" + "Xapian::MultiValueKeyMaker::add_value(Xapian::valueno valno, bool\n" + "reverse=false) \n" + ""}, + { (char *)"delete_MultiValueKeyMaker", (PyCFunction)_wrap_delete_MultiValueKeyMaker, 0x0008, __null}, + { (char *)"MultiValueKeyMaker_swigregister", MultiValueKeyMaker_swigregister, 0x0001, __null}, + { (char *)"MultiValueKeyMaker_swiginit", MultiValueKeyMaker_swiginit, 0x0001, __null}, + { (char *)"delete_Sorter", (PyCFunction)_wrap_delete_Sorter, 0x0008, __null}, + { (char *)"Sorter_swigregister", Sorter_swigregister, 0x0001, __null}, + { (char *)"new_MultiValueSorter", (PyCFunction)_wrap_new_MultiValueSorter, 0x0004, (char *)"\n" + "Xapian::MultiValueSorter::MultiValueSorter(Iterator begin, Iterator\n" + "end) \n" + ""}, + { (char *)"MultiValueSorter_add", _wrap_MultiValueSorter_add, 0x0001, (char *)"\n" + "void\n" + "Xapian::MultiValueSorter::add(Xapian::valueno valno, bool\n" + "forward=true) \n" + ""}, + { (char *)"delete_MultiValueSorter", (PyCFunction)_wrap_delete_MultiValueSorter, 0x0008, __null}, + { (char *)"MultiValueSorter_swigregister", MultiValueSorter_swigregister, 0x0001, __null}, + { (char *)"MultiValueSorter_swiginit", MultiValueSorter_swiginit, 0x0001, __null}, + { (char *)"new_ValueSetMatchDecider", _wrap_new_ValueSetMatchDecider, 0x0001, (char *)"\n" + "Construct a ValueSetMatchDecider.\n" + "\n" + "Xapian::ValueSetMatchDecider::ValueSetMatchDecider(Xapian::valueno\n" + "slot, bool inclusive_)\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "slot: The value slot number to look in.\n" + "\n" + "inclusive_: If true, match decider accepts documents which have a\n" + "value in the specified slot which is a member of the test set; if\n" + "false, match decider accepts documents which do not have a value in\n" + "the specified slot. \n" + ""}, + { (char *)"ValueSetMatchDecider_add_value", _wrap_ValueSetMatchDecider_add_value, 0x0001, (char *)"\n" + "Add a value to the test set.\n" + "\n" + "void Xapian::ValueSetMatchDecider::add_value(const std::string &value)\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "value: The value to add to the test set. \n" + ""}, + { (char *)"ValueSetMatchDecider_remove_value", _wrap_ValueSetMatchDecider_remove_value, 0x0001, (char *)"\n" + "Remove a value from the test set.\n" + "\n" + "void Xapian::ValueSetMatchDecider::remove_value(const std::string\n" + "&value)\n" + "\n" + "Parameters:\n" + "-----------\n" + "\n" + "value: The value to remove from the test set. \n" + ""}, + { (char *)"delete_ValueSetMatchDecider", (PyCFunction)_wrap_delete_ValueSetMatchDecider, 0x0008, __null}, + { (char *)"ValueSetMatchDecider_swigregister", ValueSetMatchDecider_swigregister, 0x0001, __null}, + { (char *)"ValueSetMatchDecider_swiginit", ValueSetMatchDecider_swiginit, 0x0001, __null}, + { (char *)"new_Compactor", (PyCFunction)_wrap_new_Compactor, 0x0008, (char *)"Xapian::Compactor::Compactor() "}, + { (char *)"delete_Compactor", (PyCFunction)_wrap_delete_Compactor, 0x0008, (char *)"\n" + "virtual\n" + "Xapian::Compactor::~Compactor() \n" + ""}, + { (char *)"Compactor_set_block_size", _wrap_Compactor_set_block_size, 0x0001, (char *)"\n" + "Set the block size to use for tables in the output database.\n" + "\n" + "void Xapian::Compactor::set_block_size(size_t block_size)\n" + "\n" + "Valid block sizes are currently powers of two between 2048 and 65536,\n" + "with the default being 8192, but the valid sizes and default may\n" + "change in the future. \n" + ""}, + { (char *)"Compactor_set_renumber", _wrap_Compactor_set_renumber, 0x0001, (char *)"\n" + "Set whether to preserve existing document id values.\n" + "\n" + "void Xapian::Compactor::set_renumber(bool renumber)\n" + "\n" + "The default is true, which means that document ids will be renumbered\n" + "- currently by applying the same offset to all the document ids in a\n" + "particular source database.\n" + "\n" + "If false, then the document ids must be unique over all source\n" + "databases. Currently the ranges of document ids in each source must\n" + "not overlap either, though this restriction may be removed in the\n" + "future. \n" + ""}, + { (char *)"Compactor_set_multipass", _wrap_Compactor_set_multipass, 0x0001, (char *)"\n" + "Set whether to merge postlists in multiple passes.\n" + "\n" + "void Xapian::Compactor::set_multipass(bool multipass)\n" + "\n" + "Default is false. If set to true and merging more than 3 databases,\n" + "merge the postlists in multiple passes, which is generally faster but\n" + "requires more disk space for temporary files. \n" + ""}, + { (char *)"Compactor_set_compaction_level", _wrap_Compactor_set_compaction_level, 0x0001, (char *)"\n" + "Set the compaction level.\n" + "\n" + "void Xapian::Compactor::set_compaction_level(compaction_level\n" + "compaction)\n" + "\n" + "Values are: Xapian::Compactor::STANDARD - Don't split items\n" + "unnecessarily.\n" + "\n" + "Xapian::Compactor::FULL - Split items whenever it saves space (the\n" + "default).\n" + "\n" + "Xapian::Compactor::FULLER - Allow oversize items to save more space.\n" + "\n" + "FULLER isn't recommended if you ever plan to update the compacted\n" + "database. \n" + ""}, + { (char *)"Compactor_set_destdir", _wrap_Compactor_set_destdir, 0x0001, (char *)"\n" + "Set where to write the output.\n" + "\n" + "void Xapian::Compactor::set_destdir(const std::string &destdir)\n" + "\n" + "This can be the same as an input if that input is a stub database (in\n" + "which case it will be updated atomically). \n" + ""}, + { (char *)"Compactor_add_source", _wrap_Compactor_add_source, 0x0001, (char *)"\n" + "Add a source database.\n" + "\n" + "void Xapian::Compactor::add_source(const std::string &srcdir) \n" + ""}, + { (char *)"Compactor_compact", (PyCFunction)_wrap_Compactor_compact, 0x0008, (char *)"\n" + "Perform the actual compaction/merging operation.\n" + "\n" + "void Xapian::Compactor::compact() \n" + ""}, + { (char *)"Compactor_set_status", _wrap_Compactor_set_status, 0x0001, (char *)"\n" + "Update progress.\n" + "\n" + "virtual void Xapian::Compactor::set_status(const std::string &table,\n" + "const std::string &status)\n" + "\n" + "Subclass this method if you want to get progress updates during\n" + "compaction. This is called for each table first with empty status, And\n" + "then one or more times with non-empty status.\n" + "\n" + "The default implementation does nothing. \n" + ""}, + { (char *)"Compactor_resolve_duplicate_metadata", _wrap_Compactor_resolve_duplicate_metadata, 0x0001, (char *)"\n" + "Resolve multiple user metadata entries with the same key.\n" + "\n" + "virtual std::string\n" + "Xapian::Compactor::resolve_duplicate_metadata(const std::string &key,\n" + "size_t num_tags, const std::string tags[])\n" + "\n" + "When merging, if the same user metadata key is set in more than one\n" + "input, then this method is called to allow this to be resolving in an\n" + "appropriate way.\n" + "\n" + "The default implementation just returns tags[0].\n" + "\n" + "For multipass this will currently get called multiple times for the\n" + "same key if there are duplicates to resolve in each pass, but this may\n" + "change in the future. \n" + ""}, + { (char *)"disown_Compactor", (PyCFunction)_wrap_disown_Compactor, 0x0008, __null}, + { (char *)"Compactor_swigregister", Compactor_swigregister, 0x0001, __null}, + { (char *)"Compactor_swiginit", Compactor_swiginit, 0x0001, __null}, + { __null, __null, 0, __null } +}; +static void *_p_Xapian__WritableDatabaseTo_p_Xapian__Database(void *x, int *) { + return (void *)((Xapian::Database *) ((Xapian::WritableDatabase *) x)); +} +static void *_p_Xapian__ValueSetMatchDeciderTo_p_Xapian__MatchDecider(void *x, int *) { + return (void *)((Xapian::MatchDecider *) ((Xapian::ValueSetMatchDecider *) x)); +} +static void *_p_Xapian__NetworkTimeoutErrorTo_p_Xapian__NetworkError(void *x, int *) { + return (void *)((Xapian::NetworkError *) ((Xapian::NetworkTimeoutError *) x)); +} +static void *_p_Xapian__MultiValueSorterTo_p_Xapian__Sorter(void *x, int *) { + return (void *)((Xapian::Sorter *) ((Xapian::MultiValueSorter *) x)); +} +static void *_p_Xapian__SorterTo_p_Xapian__KeyMaker(void *x, int *) { + return (void *)((Xapian::KeyMaker *) ((Xapian::Sorter *) x)); +} +static void *_p_Xapian__MultiValueSorterTo_p_Xapian__KeyMaker(void *x, int *) { + return (void *)((Xapian::KeyMaker *) (Xapian::Sorter *) ((Xapian::MultiValueSorter *) x)); +} +static void *_p_Xapian__MultiValueKeyMakerTo_p_Xapian__KeyMaker(void *x, int *) { + return (void *)((Xapian::KeyMaker *) ((Xapian::MultiValueKeyMaker *) x)); +} +static void *_p_Xapian__AssertionErrorTo_p_Xapian__LogicError(void *x, int *) { + return (void *)((Xapian::LogicError *) ((Xapian::AssertionError *) x)); +} +static void *_p_Xapian__InvalidOperationErrorTo_p_Xapian__LogicError(void *x, int *) { + return (void *)((Xapian::LogicError *) ((Xapian::InvalidOperationError *) x)); +} +static void *_p_Xapian__UnimplementedErrorTo_p_Xapian__LogicError(void *x, int *) { + return (void *)((Xapian::LogicError *) ((Xapian::UnimplementedError *) x)); +} +static void *_p_Xapian__InvalidArgumentErrorTo_p_Xapian__LogicError(void *x, int *) { + return (void *)((Xapian::LogicError *) ((Xapian::InvalidArgumentError *) x)); +} +static void *_p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValueWeightPostingSource(void *x, int *) { + return (void *)((Xapian::ValueWeightPostingSource *) ((Xapian::DecreasingValueWeightPostingSource *) x)); +} +static void *_p_Xapian__ValueWeightPostingSourceTo_p_Xapian__ValuePostingSource(void *x, int *) { + return (void *)((Xapian::ValuePostingSource *) ((Xapian::ValueWeightPostingSource *) x)); +} +static void *_p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValuePostingSource(void *x, int *) { + return (void *)((Xapian::ValuePostingSource *) (Xapian::ValueWeightPostingSource *) ((Xapian::DecreasingValueWeightPostingSource *) x)); +} +static void *_p_Xapian__ValueMapPostingSourceTo_p_Xapian__ValuePostingSource(void *x, int *) { + return (void *)((Xapian::ValuePostingSource *) ((Xapian::ValueMapPostingSource *) x)); +} +static void *_p_Xapian__ValuePostingSourceTo_p_Xapian__PostingSource(void *x, int *) { + return (void *)((Xapian::PostingSource *) ((Xapian::ValuePostingSource *) x)); +} +static void *_p_Xapian__ValueWeightPostingSourceTo_p_Xapian__PostingSource(void *x, int *) { + return (void *)((Xapian::PostingSource *) (Xapian::ValuePostingSource *) ((Xapian::ValueWeightPostingSource *) x)); +} +static void *_p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__PostingSource(void *x, int *) { + return (void *)((Xapian::PostingSource *) (Xapian::ValuePostingSource *)(Xapian::ValueWeightPostingSource *) ((Xapian::DecreasingValueWeightPostingSource *) x)); +} +static void *_p_Xapian__ValueMapPostingSourceTo_p_Xapian__PostingSource(void *x, int *) { + return (void *)((Xapian::PostingSource *) (Xapian::ValuePostingSource *) ((Xapian::ValueMapPostingSource *) x)); +} +static void *_p_Xapian__FixedWeightPostingSourceTo_p_Xapian__PostingSource(void *x, int *) { + return (void *)((Xapian::PostingSource *) ((Xapian::FixedWeightPostingSource *) x)); +} +static void *_p_Xapian__BoolWeightTo_p_Xapian__Weight(void *x, int *) { + return (void *)((Xapian::Weight *) ((Xapian::BoolWeight *) x)); +} +static void *_p_Xapian__TradWeightTo_p_Xapian__Weight(void *x, int *) { + return (void *)((Xapian::Weight *) ((Xapian::TradWeight *) x)); +} +static void *_p_Xapian__BM25WeightTo_p_Xapian__Weight(void *x, int *) { + return (void *)((Xapian::Weight *) ((Xapian::BM25Weight *) x)); +} +static void *_p_Xapian__ValueCountMatchSpyTo_p_Xapian__MatchSpy(void *x, int *) { + return (void *)((Xapian::MatchSpy *) ((Xapian::ValueCountMatchSpy *) x)); +} +static void *_p_Xapian__SimpleStopperTo_p_Xapian__Stopper(void *x, int *) { + return (void *)((Xapian::Stopper *) ((Xapian::SimpleStopper *) x)); +} +static void *_p_Xapian__DatabaseVersionErrorTo_p_Xapian__DatabaseOpeningError(void *x, int *) { + return (void *)((Xapian::DatabaseOpeningError *) ((Xapian::DatabaseVersionError *) x)); +} +static void *_p_Xapian__DatabaseVersionErrorTo_p_Xapian__DatabaseError(void *x, int *) { + return (void *)((Xapian::DatabaseError *) (Xapian::DatabaseOpeningError *) ((Xapian::DatabaseVersionError *) x)); +} +static void *_p_Xapian__DatabaseLockErrorTo_p_Xapian__DatabaseError(void *x, int *) { + return (void *)((Xapian::DatabaseError *) ((Xapian::DatabaseLockError *) x)); +} +static void *_p_Xapian__DatabaseModifiedErrorTo_p_Xapian__DatabaseError(void *x, int *) { + return (void *)((Xapian::DatabaseError *) ((Xapian::DatabaseModifiedError *) x)); +} +static void *_p_Xapian__DatabaseOpeningErrorTo_p_Xapian__DatabaseError(void *x, int *) { + return (void *)((Xapian::DatabaseError *) ((Xapian::DatabaseOpeningError *) x)); +} +static void *_p_Xapian__DatabaseCreateErrorTo_p_Xapian__DatabaseError(void *x, int *) { + return (void *)((Xapian::DatabaseError *) ((Xapian::DatabaseCreateError *) x)); +} +static void *_p_Xapian__DatabaseCorruptErrorTo_p_Xapian__DatabaseError(void *x, int *) { + return (void *)((Xapian::DatabaseError *) ((Xapian::DatabaseCorruptError *) x)); +} +static void *_p_Xapian__DocNotFoundErrorTo_p_Xapian__RuntimeError(void *x, int *) { + return (void *)((Xapian::RuntimeError *) ((Xapian::DocNotFoundError *) x)); +} +static void *_p_Xapian__DatabaseLockErrorTo_p_Xapian__RuntimeError(void *x, int *) { + return (void *)((Xapian::RuntimeError *) (Xapian::DatabaseError *) ((Xapian::DatabaseLockError *) x)); +} +static void *_p_Xapian__NetworkTimeoutErrorTo_p_Xapian__RuntimeError(void *x, int *) { + return (void *)((Xapian::RuntimeError *) (Xapian::NetworkError *) ((Xapian::NetworkTimeoutError *) x)); +} +static void *_p_Xapian__FeatureUnavailableErrorTo_p_Xapian__RuntimeError(void *x, int *) { + return (void *)((Xapian::RuntimeError *) ((Xapian::FeatureUnavailableError *) x)); +} +static void *_p_Xapian__DatabaseCreateErrorTo_p_Xapian__RuntimeError(void *x, int *) { + return (void *)((Xapian::RuntimeError *) (Xapian::DatabaseError *) ((Xapian::DatabaseCreateError *) x)); +} +static void *_p_Xapian__InternalErrorTo_p_Xapian__RuntimeError(void *x, int *) { + return (void *)((Xapian::RuntimeError *) ((Xapian::InternalError *) x)); +} +static void *_p_Xapian__DatabaseModifiedErrorTo_p_Xapian__RuntimeError(void *x, int *) { + return (void *)((Xapian::RuntimeError *) (Xapian::DatabaseError *) ((Xapian::DatabaseModifiedError *) x)); +} +static void *_p_Xapian__DatabaseErrorTo_p_Xapian__RuntimeError(void *x, int *) { + return (void *)((Xapian::RuntimeError *) ((Xapian::DatabaseError *) x)); +} +static void *_p_Xapian__DatabaseOpeningErrorTo_p_Xapian__RuntimeError(void *x, int *) { + return (void *)((Xapian::RuntimeError *) (Xapian::DatabaseError *) ((Xapian::DatabaseOpeningError *) x)); +} +static void *_p_Xapian__RangeErrorTo_p_Xapian__RuntimeError(void *x, int *) { + return (void *)((Xapian::RuntimeError *) ((Xapian::RangeError *) x)); +} +static void *_p_Xapian__SerialisationErrorTo_p_Xapian__RuntimeError(void *x, int *) { + return (void *)((Xapian::RuntimeError *) ((Xapian::SerialisationError *) x)); +} +static void *_p_Xapian__DatabaseVersionErrorTo_p_Xapian__RuntimeError(void *x, int *) { + return (void *)((Xapian::RuntimeError *) (Xapian::DatabaseError *)(Xapian::DatabaseOpeningError *) ((Xapian::DatabaseVersionError *) x)); +} +static void *_p_Xapian__NetworkErrorTo_p_Xapian__RuntimeError(void *x, int *) { + return (void *)((Xapian::RuntimeError *) ((Xapian::NetworkError *) x)); +} +static void *_p_Xapian__DatabaseCorruptErrorTo_p_Xapian__RuntimeError(void *x, int *) { + return (void *)((Xapian::RuntimeError *) (Xapian::DatabaseError *) ((Xapian::DatabaseCorruptError *) x)); +} +static void *_p_Xapian__QueryParserErrorTo_p_Xapian__RuntimeError(void *x, int *) { + return (void *)((Xapian::RuntimeError *) ((Xapian::QueryParserError *) x)); +} +static void *_p_Xapian__StringValueRangeProcessorTo_p_Xapian__ValueRangeProcessor(void *x, int *) { + return (void *)((Xapian::ValueRangeProcessor *) ((Xapian::StringValueRangeProcessor *) x)); +} +static void *_p_Xapian__DateValueRangeProcessorTo_p_Xapian__ValueRangeProcessor(void *x, int *) { + return (void *)((Xapian::ValueRangeProcessor *) (Xapian::StringValueRangeProcessor *) ((Xapian::DateValueRangeProcessor *) x)); +} +static void *_p_Xapian__NumberValueRangeProcessorTo_p_Xapian__ValueRangeProcessor(void *x, int *) { + return (void *)((Xapian::ValueRangeProcessor *) (Xapian::StringValueRangeProcessor *) ((Xapian::NumberValueRangeProcessor *) x)); +} +static void *_p_Xapian__DateValueRangeProcessorTo_p_Xapian__StringValueRangeProcessor(void *x, int *) { + return (void *)((Xapian::StringValueRangeProcessor *) ((Xapian::DateValueRangeProcessor *) x)); +} +static void *_p_Xapian__NumberValueRangeProcessorTo_p_Xapian__StringValueRangeProcessor(void *x, int *) { + return (void *)((Xapian::StringValueRangeProcessor *) ((Xapian::NumberValueRangeProcessor *) x)); +} +static void *_p_Xapian__DocNotFoundErrorTo_p_Xapian__Error(void *x, int *) { + return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::DocNotFoundError *) x)); +} +static void *_p_Xapian__DatabaseLockErrorTo_p_Xapian__Error(void *x, int *) { + return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::DatabaseError *) ((Xapian::DatabaseLockError *) x)); +} +static void *_p_Xapian__LogicErrorTo_p_Xapian__Error(void *x, int *) { + return (void *)((Xapian::Error *) ((Xapian::LogicError *) x)); +} +static void *_p_Xapian__DatabaseCreateErrorTo_p_Xapian__Error(void *x, int *) { + return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::DatabaseError *) ((Xapian::DatabaseCreateError *) x)); +} +static void *_p_Xapian__FeatureUnavailableErrorTo_p_Xapian__Error(void *x, int *) { + return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::FeatureUnavailableError *) x)); +} +static void *_p_Xapian__NetworkTimeoutErrorTo_p_Xapian__Error(void *x, int *) { + return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::NetworkError *) ((Xapian::NetworkTimeoutError *) x)); +} +static void *_p_Xapian__InternalErrorTo_p_Xapian__Error(void *x, int *) { + return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::InternalError *) x)); +} +static void *_p_Xapian__DatabaseModifiedErrorTo_p_Xapian__Error(void *x, int *) { + return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::DatabaseError *) ((Xapian::DatabaseModifiedError *) x)); +} +static void *_p_Xapian__UnimplementedErrorTo_p_Xapian__Error(void *x, int *) { + return (void *)((Xapian::Error *) (Xapian::LogicError *) ((Xapian::UnimplementedError *) x)); +} +static void *_p_Xapian__DatabaseErrorTo_p_Xapian__Error(void *x, int *) { + return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::DatabaseError *) x)); +} +static void *_p_Xapian__RuntimeErrorTo_p_Xapian__Error(void *x, int *) { + return (void *)((Xapian::Error *) ((Xapian::RuntimeError *) x)); +} +static void *_p_Xapian__DatabaseOpeningErrorTo_p_Xapian__Error(void *x, int *) { + return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::DatabaseError *) ((Xapian::DatabaseOpeningError *) x)); +} +static void *_p_Xapian__RangeErrorTo_p_Xapian__Error(void *x, int *) { + return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::RangeError *) x)); +} +static void *_p_Xapian__DatabaseVersionErrorTo_p_Xapian__Error(void *x, int *) { + return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::DatabaseError *)(Xapian::DatabaseOpeningError *) ((Xapian::DatabaseVersionError *) x)); +} +static void *_p_Xapian__InvalidOperationErrorTo_p_Xapian__Error(void *x, int *) { + return (void *)((Xapian::Error *) (Xapian::LogicError *) ((Xapian::InvalidOperationError *) x)); +} +static void *_p_Xapian__AssertionErrorTo_p_Xapian__Error(void *x, int *) { + return (void *)((Xapian::Error *) (Xapian::LogicError *) ((Xapian::AssertionError *) x)); +} +static void *_p_Xapian__SerialisationErrorTo_p_Xapian__Error(void *x, int *) { + return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::SerialisationError *) x)); +} +static void *_p_Xapian__NetworkErrorTo_p_Xapian__Error(void *x, int *) { + return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::NetworkError *) x)); +} +static void *_p_Xapian__DatabaseCorruptErrorTo_p_Xapian__Error(void *x, int *) { + return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::DatabaseError *) ((Xapian::DatabaseCorruptError *) x)); +} +static void *_p_Xapian__InvalidArgumentErrorTo_p_Xapian__Error(void *x, int *) { + return (void *)((Xapian::Error *) (Xapian::LogicError *) ((Xapian::InvalidArgumentError *) x)); +} +static void *_p_Xapian__QueryParserErrorTo_p_Xapian__Error(void *x, int *) { + return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::QueryParserError *) x)); +} +static swig_type_info _swigt__p_Xapian__AssertionError = {"_p_Xapian__AssertionError", "Xapian::AssertionError *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__BM25Weight = {"_p_Xapian__BM25Weight", "Xapian::BM25Weight *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__BoolWeight = {"_p_Xapian__BoolWeight", "Xapian::BoolWeight *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__Compactor = {"_p_Xapian__Compactor", "Xapian::Compactor *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__Database = {"_p_Xapian__Database", "Xapian::Database *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__DatabaseCorruptError = {"_p_Xapian__DatabaseCorruptError", "Xapian::DatabaseCorruptError *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__DatabaseCreateError = {"_p_Xapian__DatabaseCreateError", "Xapian::DatabaseCreateError *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__DatabaseError = {"_p_Xapian__DatabaseError", "Xapian::DatabaseError *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__DatabaseLockError = {"_p_Xapian__DatabaseLockError", "Xapian::DatabaseLockError *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__DatabaseModifiedError = {"_p_Xapian__DatabaseModifiedError", "Xapian::DatabaseModifiedError *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__DatabaseOpeningError = {"_p_Xapian__DatabaseOpeningError", "Xapian::DatabaseOpeningError *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__DatabaseVersionError = {"_p_Xapian__DatabaseVersionError", "Xapian::DatabaseVersionError *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__DateValueRangeProcessor = {"_p_Xapian__DateValueRangeProcessor", "Xapian::DateValueRangeProcessor *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__DecreasingValueWeightPostingSource = {"_p_Xapian__DecreasingValueWeightPostingSource", "Xapian::DecreasingValueWeightPostingSource *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__DocNotFoundError = {"_p_Xapian__DocNotFoundError", "Xapian::DocNotFoundError *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__Document = {"_p_Xapian__Document", "Xapian::Document *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__ESet = {"_p_Xapian__ESet", "Xapian::ESet *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__ESetIterator = {"_p_Xapian__ESetIterator", "Xapian::ESetIterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__Enquire = {"_p_Xapian__Enquire", "Xapian::Enquire *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__Error = {"_p_Xapian__Error", "Xapian::Error *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__ExpandDecider = {"_p_Xapian__ExpandDecider", "Xapian::ExpandDecider *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__FeatureUnavailableError = {"_p_Xapian__FeatureUnavailableError", "Xapian::FeatureUnavailableError *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__FixedWeightPostingSource = {"_p_Xapian__FixedWeightPostingSource", "Xapian::FixedWeightPostingSource *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__InternalError = {"_p_Xapian__InternalError", "Xapian::InternalError *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__InvalidArgumentError = {"_p_Xapian__InvalidArgumentError", "Xapian::InvalidArgumentError *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__InvalidOperationError = {"_p_Xapian__InvalidOperationError", "Xapian::InvalidOperationError *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__KeyMaker = {"_p_Xapian__KeyMaker", "Xapian::KeyMaker *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__LogicError = {"_p_Xapian__LogicError", "Xapian::LogicError *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__MSet = {"_p_Xapian__MSet", "Xapian::MSet *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__MSetIterator = {"_p_Xapian__MSetIterator", "Xapian::MSetIterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__MatchDecider = {"_p_Xapian__MatchDecider", "Xapian::MatchDecider *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__MatchSpy = {"_p_Xapian__MatchSpy", "Xapian::MatchSpy *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__MultiValueKeyMaker = {"_p_Xapian__MultiValueKeyMaker", "Xapian::MultiValueKeyMaker *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__MultiValueSorter = {"_p_Xapian__MultiValueSorter", "Xapian::MultiValueSorter *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__NetworkError = {"_p_Xapian__NetworkError", "Xapian::NetworkError *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__NetworkTimeoutError = {"_p_Xapian__NetworkTimeoutError", "Xapian::NetworkTimeoutError *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__NumberValueRangeProcessor = {"_p_Xapian__NumberValueRangeProcessor", "Xapian::NumberValueRangeProcessor *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__PositionIterator = {"_p_Xapian__PositionIterator", "Xapian::PositionIterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__PostingIterator = {"_p_Xapian__PostingIterator", "Xapian::PostingIterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__PostingSource = {"_p_Xapian__PostingSource", "Xapian::PostingSource *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__Query = {"_p_Xapian__Query", "Xapian::Query *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__QueryParser = {"_p_Xapian__QueryParser", "Xapian::QueryParser *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__QueryParserError = {"_p_Xapian__QueryParserError", "Xapian::QueryParserError *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__RSet = {"_p_Xapian__RSet", "Xapian::RSet *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__RangeError = {"_p_Xapian__RangeError", "Xapian::RangeError *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__Registry = {"_p_Xapian__Registry", "Xapian::Registry *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__RuntimeError = {"_p_Xapian__RuntimeError", "Xapian::RuntimeError *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__SerialisationError = {"_p_Xapian__SerialisationError", "Xapian::SerialisationError *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__SimpleStopper = {"_p_Xapian__SimpleStopper", "Xapian::SimpleStopper *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__Sorter = {"_p_Xapian__Sorter", "Xapian::Sorter *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__Stem = {"_p_Xapian__Stem", "Xapian::Stem *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__StemImplementation = {"_p_Xapian__StemImplementation", "Xapian::StemImplementation *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__Stopper = {"_p_Xapian__Stopper", "Xapian::Stopper *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__StringValueRangeProcessor = {"_p_Xapian__StringValueRangeProcessor", "Xapian::StringValueRangeProcessor *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__TermGenerator = {"_p_Xapian__TermGenerator", "Xapian::TermGenerator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__TermIterator = {"_p_Xapian__TermIterator", "Xapian::TermIterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__TradWeight = {"_p_Xapian__TradWeight", "Xapian::TradWeight *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__UnimplementedError = {"_p_Xapian__UnimplementedError", "Xapian::UnimplementedError *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__ValueCountMatchSpy = {"_p_Xapian__ValueCountMatchSpy", "Xapian::ValueCountMatchSpy *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__ValueIterator = {"_p_Xapian__ValueIterator", "Xapian::ValueIterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__ValueMapPostingSource = {"_p_Xapian__ValueMapPostingSource", "Xapian::ValueMapPostingSource *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__ValuePostingSource = {"_p_Xapian__ValuePostingSource", "Xapian::ValuePostingSource *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__ValueRangeProcessor = {"_p_Xapian__ValueRangeProcessor", "Xapian::ValueRangeProcessor *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__ValueSetMatchDecider = {"_p_Xapian__ValueSetMatchDecider", "Xapian::ValueSetMatchDecider *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__ValueWeightPostingSource = {"_p_Xapian__ValueWeightPostingSource", "Xapian::ValueWeightPostingSource *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__Weight = {"_p_Xapian__Weight", "Xapian::Weight *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Xapian__WritableDatabase = {"_p_Xapian__WritableDatabase", "Xapian::WritableDatabase *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_compaction_level = {"_p_compaction_level", "compaction_level *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_docid_order = {"_p_docid_order", "docid_order *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_double = {"_p_double", "Xapian::doclength *|double *|Xapian::weight *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_feature_flag = {"_p_feature_flag", "feature_flag *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_first_type = {"_p_first_type", "first_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int = {"_p_int", "int *|Xapian::doccount_diff *|Xapian::termcount_diff *|Xapian::termpos_diff *|Xapian::valueno_diff *|Xapian::percent *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_op = {"_p_op", "op *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_second_type = {"_p_second_type", "second_type *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_std__string = {"_p_std__string", "std::string *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_stem_strategy = {"_p_stem_strategy", "stem_strategy *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_swig__SwigPyIterator = {"_p_swig__SwigPyIterator", "swig::SwigPyIterator *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "Xapian::timeout *|unsigned int *|Xapian::doccount *|Xapian::termcount *|Xapian::valueno *|Xapian::docid *|Xapian::termpos *", 0, 0, (void*)0, 0}; +static swig_type_info *swig_type_initial[] = { + &_swigt__p_Xapian__AssertionError, + &_swigt__p_Xapian__BM25Weight, + &_swigt__p_Xapian__BoolWeight, + &_swigt__p_Xapian__Compactor, + &_swigt__p_Xapian__Database, + &_swigt__p_Xapian__DatabaseCorruptError, + &_swigt__p_Xapian__DatabaseCreateError, + &_swigt__p_Xapian__DatabaseError, + &_swigt__p_Xapian__DatabaseLockError, + &_swigt__p_Xapian__DatabaseModifiedError, + &_swigt__p_Xapian__DatabaseOpeningError, + &_swigt__p_Xapian__DatabaseVersionError, + &_swigt__p_Xapian__DateValueRangeProcessor, + &_swigt__p_Xapian__DecreasingValueWeightPostingSource, + &_swigt__p_Xapian__DocNotFoundError, + &_swigt__p_Xapian__Document, + &_swigt__p_Xapian__ESet, + &_swigt__p_Xapian__ESetIterator, + &_swigt__p_Xapian__Enquire, + &_swigt__p_Xapian__Error, + &_swigt__p_Xapian__ExpandDecider, + &_swigt__p_Xapian__FeatureUnavailableError, + &_swigt__p_Xapian__FixedWeightPostingSource, + &_swigt__p_Xapian__InternalError, + &_swigt__p_Xapian__InvalidArgumentError, + &_swigt__p_Xapian__InvalidOperationError, + &_swigt__p_Xapian__KeyMaker, + &_swigt__p_Xapian__LogicError, + &_swigt__p_Xapian__MSet, + &_swigt__p_Xapian__MSetIterator, + &_swigt__p_Xapian__MatchDecider, + &_swigt__p_Xapian__MatchSpy, + &_swigt__p_Xapian__MultiValueKeyMaker, + &_swigt__p_Xapian__MultiValueSorter, + &_swigt__p_Xapian__NetworkError, + &_swigt__p_Xapian__NetworkTimeoutError, + &_swigt__p_Xapian__NumberValueRangeProcessor, + &_swigt__p_Xapian__PositionIterator, + &_swigt__p_Xapian__PostingIterator, + &_swigt__p_Xapian__PostingSource, + &_swigt__p_Xapian__Query, + &_swigt__p_Xapian__QueryParser, + &_swigt__p_Xapian__QueryParserError, + &_swigt__p_Xapian__RSet, + &_swigt__p_Xapian__RangeError, + &_swigt__p_Xapian__Registry, + &_swigt__p_Xapian__RuntimeError, + &_swigt__p_Xapian__SerialisationError, + &_swigt__p_Xapian__SimpleStopper, + &_swigt__p_Xapian__Sorter, + &_swigt__p_Xapian__Stem, + &_swigt__p_Xapian__StemImplementation, + &_swigt__p_Xapian__Stopper, + &_swigt__p_Xapian__StringValueRangeProcessor, + &_swigt__p_Xapian__TermGenerator, + &_swigt__p_Xapian__TermIterator, + &_swigt__p_Xapian__TradWeight, + &_swigt__p_Xapian__UnimplementedError, + &_swigt__p_Xapian__ValueCountMatchSpy, + &_swigt__p_Xapian__ValueIterator, + &_swigt__p_Xapian__ValueMapPostingSource, + &_swigt__p_Xapian__ValuePostingSource, + &_swigt__p_Xapian__ValueRangeProcessor, + &_swigt__p_Xapian__ValueSetMatchDecider, + &_swigt__p_Xapian__ValueWeightPostingSource, + &_swigt__p_Xapian__Weight, + &_swigt__p_Xapian__WritableDatabase, + &_swigt__p_char, + &_swigt__p_compaction_level, + &_swigt__p_docid_order, + &_swigt__p_double, + &_swigt__p_feature_flag, + &_swigt__p_first_type, + &_swigt__p_int, + &_swigt__p_op, + &_swigt__p_second_type, + &_swigt__p_std__invalid_argument, + &_swigt__p_std__string, + &_swigt__p_stem_strategy, + &_swigt__p_swig__SwigPyIterator, + &_swigt__p_unsigned_int, +}; +static swig_cast_info _swigc__p_Xapian__AssertionError[] = { {&_swigt__p_Xapian__AssertionError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__BM25Weight[] = { {&_swigt__p_Xapian__BM25Weight, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__BoolWeight[] = { {&_swigt__p_Xapian__BoolWeight, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__Compactor[] = { {&_swigt__p_Xapian__Compactor, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__Database[] = { {&_swigt__p_Xapian__Database, 0, 0, 0}, {&_swigt__p_Xapian__WritableDatabase, _p_Xapian__WritableDatabaseTo_p_Xapian__Database, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__DatabaseCorruptError[] = { {&_swigt__p_Xapian__DatabaseCorruptError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__DatabaseCreateError[] = { {&_swigt__p_Xapian__DatabaseCreateError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__DatabaseError[] = { {&_swigt__p_Xapian__DatabaseVersionError, _p_Xapian__DatabaseVersionErrorTo_p_Xapian__DatabaseError, 0, 0}, {&_swigt__p_Xapian__DatabaseLockError, _p_Xapian__DatabaseLockErrorTo_p_Xapian__DatabaseError, 0, 0}, {&_swigt__p_Xapian__DatabaseModifiedError, _p_Xapian__DatabaseModifiedErrorTo_p_Xapian__DatabaseError, 0, 0}, {&_swigt__p_Xapian__DatabaseOpeningError, _p_Xapian__DatabaseOpeningErrorTo_p_Xapian__DatabaseError, 0, 0}, {&_swigt__p_Xapian__DatabaseError, 0, 0, 0}, {&_swigt__p_Xapian__DatabaseCreateError, _p_Xapian__DatabaseCreateErrorTo_p_Xapian__DatabaseError, 0, 0}, {&_swigt__p_Xapian__DatabaseCorruptError, _p_Xapian__DatabaseCorruptErrorTo_p_Xapian__DatabaseError, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__DatabaseLockError[] = { {&_swigt__p_Xapian__DatabaseLockError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__DatabaseModifiedError[] = { {&_swigt__p_Xapian__DatabaseModifiedError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__DatabaseOpeningError[] = { {&_swigt__p_Xapian__DatabaseVersionError, _p_Xapian__DatabaseVersionErrorTo_p_Xapian__DatabaseOpeningError, 0, 0}, {&_swigt__p_Xapian__DatabaseOpeningError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__DatabaseVersionError[] = { {&_swigt__p_Xapian__DatabaseVersionError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__DateValueRangeProcessor[] = { {&_swigt__p_Xapian__DateValueRangeProcessor, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__DecreasingValueWeightPostingSource[] = { {&_swigt__p_Xapian__DecreasingValueWeightPostingSource, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__DocNotFoundError[] = { {&_swigt__p_Xapian__DocNotFoundError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__Document[] = { {&_swigt__p_Xapian__Document, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__ESet[] = { {&_swigt__p_Xapian__ESet, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__ESetIterator[] = { {&_swigt__p_Xapian__ESetIterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__Enquire[] = { {&_swigt__p_Xapian__Enquire, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__Error[] = { {&_swigt__p_Xapian__DocNotFoundError, _p_Xapian__DocNotFoundErrorTo_p_Xapian__Error, 0, 0}, {&_swigt__p_Xapian__DatabaseLockError, _p_Xapian__DatabaseLockErrorTo_p_Xapian__Error, 0, 0}, {&_swigt__p_Xapian__LogicError, _p_Xapian__LogicErrorTo_p_Xapian__Error, 0, 0}, {&_swigt__p_Xapian__NetworkTimeoutError, _p_Xapian__NetworkTimeoutErrorTo_p_Xapian__Error, 0, 0}, {&_swigt__p_Xapian__DatabaseCreateError, _p_Xapian__DatabaseCreateErrorTo_p_Xapian__Error, 0, 0}, {&_swigt__p_Xapian__FeatureUnavailableError, _p_Xapian__FeatureUnavailableErrorTo_p_Xapian__Error, 0, 0}, {&_swigt__p_Xapian__InternalError, _p_Xapian__InternalErrorTo_p_Xapian__Error, 0, 0}, {&_swigt__p_Xapian__DatabaseModifiedError, _p_Xapian__DatabaseModifiedErrorTo_p_Xapian__Error, 0, 0}, {&_swigt__p_Xapian__UnimplementedError, _p_Xapian__UnimplementedErrorTo_p_Xapian__Error, 0, 0}, {&_swigt__p_Xapian__RangeError, _p_Xapian__RangeErrorTo_p_Xapian__Error, 0, 0}, {&_swigt__p_Xapian__RuntimeError, _p_Xapian__RuntimeErrorTo_p_Xapian__Error, 0, 0}, {&_swigt__p_Xapian__DatabaseError, _p_Xapian__DatabaseErrorTo_p_Xapian__Error, 0, 0}, {&_swigt__p_Xapian__DatabaseOpeningError, _p_Xapian__DatabaseOpeningErrorTo_p_Xapian__Error, 0, 0}, {&_swigt__p_Xapian__InvalidOperationError, _p_Xapian__InvalidOperationErrorTo_p_Xapian__Error, 0, 0}, {&_swigt__p_Xapian__AssertionError, _p_Xapian__AssertionErrorTo_p_Xapian__Error, 0, 0}, {&_swigt__p_Xapian__DatabaseVersionError, _p_Xapian__DatabaseVersionErrorTo_p_Xapian__Error, 0, 0}, {&_swigt__p_Xapian__SerialisationError, _p_Xapian__SerialisationErrorTo_p_Xapian__Error, 0, 0}, {&_swigt__p_Xapian__Error, 0, 0, 0}, {&_swigt__p_Xapian__NetworkError, _p_Xapian__NetworkErrorTo_p_Xapian__Error, 0, 0}, {&_swigt__p_Xapian__InvalidArgumentError, _p_Xapian__InvalidArgumentErrorTo_p_Xapian__Error, 0, 0}, {&_swigt__p_Xapian__DatabaseCorruptError, _p_Xapian__DatabaseCorruptErrorTo_p_Xapian__Error, 0, 0}, {&_swigt__p_Xapian__QueryParserError, _p_Xapian__QueryParserErrorTo_p_Xapian__Error, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__ExpandDecider[] = { {&_swigt__p_Xapian__ExpandDecider, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__FeatureUnavailableError[] = { {&_swigt__p_Xapian__FeatureUnavailableError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__FixedWeightPostingSource[] = { {&_swigt__p_Xapian__FixedWeightPostingSource, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__InternalError[] = { {&_swigt__p_Xapian__InternalError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__InvalidArgumentError[] = { {&_swigt__p_Xapian__InvalidArgumentError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__InvalidOperationError[] = { {&_swigt__p_Xapian__InvalidOperationError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__KeyMaker[] = { {&_swigt__p_Xapian__Sorter, _p_Xapian__SorterTo_p_Xapian__KeyMaker, 0, 0}, {&_swigt__p_Xapian__MultiValueSorter, _p_Xapian__MultiValueSorterTo_p_Xapian__KeyMaker, 0, 0}, {&_swigt__p_Xapian__KeyMaker, 0, 0, 0}, {&_swigt__p_Xapian__MultiValueKeyMaker, _p_Xapian__MultiValueKeyMakerTo_p_Xapian__KeyMaker, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__LogicError[] = { {&_swigt__p_Xapian__AssertionError, _p_Xapian__AssertionErrorTo_p_Xapian__LogicError, 0, 0}, {&_swigt__p_Xapian__InvalidOperationError, _p_Xapian__InvalidOperationErrorTo_p_Xapian__LogicError, 0, 0}, {&_swigt__p_Xapian__UnimplementedError, _p_Xapian__UnimplementedErrorTo_p_Xapian__LogicError, 0, 0}, {&_swigt__p_Xapian__LogicError, 0, 0, 0}, {&_swigt__p_Xapian__InvalidArgumentError, _p_Xapian__InvalidArgumentErrorTo_p_Xapian__LogicError, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__MSet[] = { {&_swigt__p_Xapian__MSet, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__MSetIterator[] = { {&_swigt__p_Xapian__MSetIterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__MatchDecider[] = { {&_swigt__p_Xapian__MatchDecider, 0, 0, 0}, {&_swigt__p_Xapian__ValueSetMatchDecider, _p_Xapian__ValueSetMatchDeciderTo_p_Xapian__MatchDecider, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__MatchSpy[] = { {&_swigt__p_Xapian__MatchSpy, 0, 0, 0}, {&_swigt__p_Xapian__ValueCountMatchSpy, _p_Xapian__ValueCountMatchSpyTo_p_Xapian__MatchSpy, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__MultiValueKeyMaker[] = { {&_swigt__p_Xapian__MultiValueKeyMaker, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__MultiValueSorter[] = { {&_swigt__p_Xapian__MultiValueSorter, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__NetworkError[] = { {&_swigt__p_Xapian__NetworkError, 0, 0, 0}, {&_swigt__p_Xapian__NetworkTimeoutError, _p_Xapian__NetworkTimeoutErrorTo_p_Xapian__NetworkError, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__NetworkTimeoutError[] = { {&_swigt__p_Xapian__NetworkTimeoutError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__NumberValueRangeProcessor[] = { {&_swigt__p_Xapian__NumberValueRangeProcessor, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__PositionIterator[] = { {&_swigt__p_Xapian__PositionIterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__PostingIterator[] = { {&_swigt__p_Xapian__PostingIterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__PostingSource[] = { {&_swigt__p_Xapian__PostingSource, 0, 0, 0}, {&_swigt__p_Xapian__ValuePostingSource, _p_Xapian__ValuePostingSourceTo_p_Xapian__PostingSource, 0, 0}, {&_swigt__p_Xapian__ValueWeightPostingSource, _p_Xapian__ValueWeightPostingSourceTo_p_Xapian__PostingSource, 0, 0}, {&_swigt__p_Xapian__DecreasingValueWeightPostingSource, _p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__PostingSource, 0, 0}, {&_swigt__p_Xapian__ValueMapPostingSource, _p_Xapian__ValueMapPostingSourceTo_p_Xapian__PostingSource, 0, 0}, {&_swigt__p_Xapian__FixedWeightPostingSource, _p_Xapian__FixedWeightPostingSourceTo_p_Xapian__PostingSource, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__Query[] = { {&_swigt__p_Xapian__Query, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__QueryParser[] = { {&_swigt__p_Xapian__QueryParser, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__QueryParserError[] = { {&_swigt__p_Xapian__QueryParserError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__RSet[] = { {&_swigt__p_Xapian__RSet, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__RangeError[] = { {&_swigt__p_Xapian__RangeError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__Registry[] = { {&_swigt__p_Xapian__Registry, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__RuntimeError[] = { {&_swigt__p_Xapian__DocNotFoundError, _p_Xapian__DocNotFoundErrorTo_p_Xapian__RuntimeError, 0, 0}, {&_swigt__p_Xapian__DatabaseLockError, _p_Xapian__DatabaseLockErrorTo_p_Xapian__RuntimeError, 0, 0}, {&_swigt__p_Xapian__NetworkTimeoutError, _p_Xapian__NetworkTimeoutErrorTo_p_Xapian__RuntimeError, 0, 0}, {&_swigt__p_Xapian__FeatureUnavailableError, _p_Xapian__FeatureUnavailableErrorTo_p_Xapian__RuntimeError, 0, 0}, {&_swigt__p_Xapian__DatabaseCreateError, _p_Xapian__DatabaseCreateErrorTo_p_Xapian__RuntimeError, 0, 0}, {&_swigt__p_Xapian__InternalError, _p_Xapian__InternalErrorTo_p_Xapian__RuntimeError, 0, 0}, {&_swigt__p_Xapian__DatabaseModifiedError, _p_Xapian__DatabaseModifiedErrorTo_p_Xapian__RuntimeError, 0, 0}, {&_swigt__p_Xapian__DatabaseError, _p_Xapian__DatabaseErrorTo_p_Xapian__RuntimeError, 0, 0}, {&_swigt__p_Xapian__RangeError, _p_Xapian__RangeErrorTo_p_Xapian__RuntimeError, 0, 0}, {&_swigt__p_Xapian__RuntimeError, 0, 0, 0}, {&_swigt__p_Xapian__DatabaseOpeningError, _p_Xapian__DatabaseOpeningErrorTo_p_Xapian__RuntimeError, 0, 0}, {&_swigt__p_Xapian__SerialisationError, _p_Xapian__SerialisationErrorTo_p_Xapian__RuntimeError, 0, 0}, {&_swigt__p_Xapian__DatabaseVersionError, _p_Xapian__DatabaseVersionErrorTo_p_Xapian__RuntimeError, 0, 0}, {&_swigt__p_Xapian__NetworkError, _p_Xapian__NetworkErrorTo_p_Xapian__RuntimeError, 0, 0}, {&_swigt__p_Xapian__DatabaseCorruptError, _p_Xapian__DatabaseCorruptErrorTo_p_Xapian__RuntimeError, 0, 0}, {&_swigt__p_Xapian__QueryParserError, _p_Xapian__QueryParserErrorTo_p_Xapian__RuntimeError, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__SerialisationError[] = { {&_swigt__p_Xapian__SerialisationError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__SimpleStopper[] = { {&_swigt__p_Xapian__SimpleStopper, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__Sorter[] = { {&_swigt__p_Xapian__Sorter, 0, 0, 0}, {&_swigt__p_Xapian__MultiValueSorter, _p_Xapian__MultiValueSorterTo_p_Xapian__Sorter, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__Stem[] = { {&_swigt__p_Xapian__Stem, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__StemImplementation[] = { {&_swigt__p_Xapian__StemImplementation, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__Stopper[] = { {&_swigt__p_Xapian__Stopper, 0, 0, 0}, {&_swigt__p_Xapian__SimpleStopper, _p_Xapian__SimpleStopperTo_p_Xapian__Stopper, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__StringValueRangeProcessor[] = { {&_swigt__p_Xapian__StringValueRangeProcessor, 0, 0, 0}, {&_swigt__p_Xapian__DateValueRangeProcessor, _p_Xapian__DateValueRangeProcessorTo_p_Xapian__StringValueRangeProcessor, 0, 0}, {&_swigt__p_Xapian__NumberValueRangeProcessor, _p_Xapian__NumberValueRangeProcessorTo_p_Xapian__StringValueRangeProcessor, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__TermGenerator[] = { {&_swigt__p_Xapian__TermGenerator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__TermIterator[] = { {&_swigt__p_Xapian__TermIterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__TradWeight[] = { {&_swigt__p_Xapian__TradWeight, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__UnimplementedError[] = { {&_swigt__p_Xapian__UnimplementedError, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__ValueCountMatchSpy[] = { {&_swigt__p_Xapian__ValueCountMatchSpy, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__ValueIterator[] = { {&_swigt__p_Xapian__ValueIterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__ValueMapPostingSource[] = { {&_swigt__p_Xapian__ValueMapPostingSource, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__ValuePostingSource[] = { {&_swigt__p_Xapian__ValuePostingSource, 0, 0, 0}, {&_swigt__p_Xapian__ValueWeightPostingSource, _p_Xapian__ValueWeightPostingSourceTo_p_Xapian__ValuePostingSource, 0, 0}, {&_swigt__p_Xapian__DecreasingValueWeightPostingSource, _p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValuePostingSource, 0, 0}, {&_swigt__p_Xapian__ValueMapPostingSource, _p_Xapian__ValueMapPostingSourceTo_p_Xapian__ValuePostingSource, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__ValueRangeProcessor[] = { {&_swigt__p_Xapian__ValueRangeProcessor, 0, 0, 0}, {&_swigt__p_Xapian__StringValueRangeProcessor, _p_Xapian__StringValueRangeProcessorTo_p_Xapian__ValueRangeProcessor, 0, 0}, {&_swigt__p_Xapian__DateValueRangeProcessor, _p_Xapian__DateValueRangeProcessorTo_p_Xapian__ValueRangeProcessor, 0, 0}, {&_swigt__p_Xapian__NumberValueRangeProcessor, _p_Xapian__NumberValueRangeProcessorTo_p_Xapian__ValueRangeProcessor, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__ValueSetMatchDecider[] = { {&_swigt__p_Xapian__ValueSetMatchDecider, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__ValueWeightPostingSource[] = { {&_swigt__p_Xapian__ValueWeightPostingSource, 0, 0, 0}, {&_swigt__p_Xapian__DecreasingValueWeightPostingSource, _p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValueWeightPostingSource, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__Weight[] = { {&_swigt__p_Xapian__BoolWeight, _p_Xapian__BoolWeightTo_p_Xapian__Weight, 0, 0}, {&_swigt__p_Xapian__TradWeight, _p_Xapian__TradWeightTo_p_Xapian__Weight, 0, 0}, {&_swigt__p_Xapian__Weight, 0, 0, 0}, {&_swigt__p_Xapian__BM25Weight, _p_Xapian__BM25WeightTo_p_Xapian__Weight, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Xapian__WritableDatabase[] = { {&_swigt__p_Xapian__WritableDatabase, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_compaction_level[] = { {&_swigt__p_compaction_level, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_docid_order[] = { {&_swigt__p_docid_order, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_feature_flag[] = { {&_swigt__p_feature_flag, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_first_type[] = { {&_swigt__p_first_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_op[] = { {&_swigt__p_op, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_second_type[] = { {&_swigt__p_second_type, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__invalid_argument[] = { {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_std__string[] = { {&_swigt__p_std__string, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_stem_strategy[] = { {&_swigt__p_stem_strategy, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_swig__SwigPyIterator[] = { {&_swigt__p_swig__SwigPyIterator, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info *swig_cast_initial[] = { + _swigc__p_Xapian__AssertionError, + _swigc__p_Xapian__BM25Weight, + _swigc__p_Xapian__BoolWeight, + _swigc__p_Xapian__Compactor, + _swigc__p_Xapian__Database, + _swigc__p_Xapian__DatabaseCorruptError, + _swigc__p_Xapian__DatabaseCreateError, + _swigc__p_Xapian__DatabaseError, + _swigc__p_Xapian__DatabaseLockError, + _swigc__p_Xapian__DatabaseModifiedError, + _swigc__p_Xapian__DatabaseOpeningError, + _swigc__p_Xapian__DatabaseVersionError, + _swigc__p_Xapian__DateValueRangeProcessor, + _swigc__p_Xapian__DecreasingValueWeightPostingSource, + _swigc__p_Xapian__DocNotFoundError, + _swigc__p_Xapian__Document, + _swigc__p_Xapian__ESet, + _swigc__p_Xapian__ESetIterator, + _swigc__p_Xapian__Enquire, + _swigc__p_Xapian__Error, + _swigc__p_Xapian__ExpandDecider, + _swigc__p_Xapian__FeatureUnavailableError, + _swigc__p_Xapian__FixedWeightPostingSource, + _swigc__p_Xapian__InternalError, + _swigc__p_Xapian__InvalidArgumentError, + _swigc__p_Xapian__InvalidOperationError, + _swigc__p_Xapian__KeyMaker, + _swigc__p_Xapian__LogicError, + _swigc__p_Xapian__MSet, + _swigc__p_Xapian__MSetIterator, + _swigc__p_Xapian__MatchDecider, + _swigc__p_Xapian__MatchSpy, + _swigc__p_Xapian__MultiValueKeyMaker, + _swigc__p_Xapian__MultiValueSorter, + _swigc__p_Xapian__NetworkError, + _swigc__p_Xapian__NetworkTimeoutError, + _swigc__p_Xapian__NumberValueRangeProcessor, + _swigc__p_Xapian__PositionIterator, + _swigc__p_Xapian__PostingIterator, + _swigc__p_Xapian__PostingSource, + _swigc__p_Xapian__Query, + _swigc__p_Xapian__QueryParser, + _swigc__p_Xapian__QueryParserError, + _swigc__p_Xapian__RSet, + _swigc__p_Xapian__RangeError, + _swigc__p_Xapian__Registry, + _swigc__p_Xapian__RuntimeError, + _swigc__p_Xapian__SerialisationError, + _swigc__p_Xapian__SimpleStopper, + _swigc__p_Xapian__Sorter, + _swigc__p_Xapian__Stem, + _swigc__p_Xapian__StemImplementation, + _swigc__p_Xapian__Stopper, + _swigc__p_Xapian__StringValueRangeProcessor, + _swigc__p_Xapian__TermGenerator, + _swigc__p_Xapian__TermIterator, + _swigc__p_Xapian__TradWeight, + _swigc__p_Xapian__UnimplementedError, + _swigc__p_Xapian__ValueCountMatchSpy, + _swigc__p_Xapian__ValueIterator, + _swigc__p_Xapian__ValueMapPostingSource, + _swigc__p_Xapian__ValuePostingSource, + _swigc__p_Xapian__ValueRangeProcessor, + _swigc__p_Xapian__ValueSetMatchDecider, + _swigc__p_Xapian__ValueWeightPostingSource, + _swigc__p_Xapian__Weight, + _swigc__p_Xapian__WritableDatabase, + _swigc__p_char, + _swigc__p_compaction_level, + _swigc__p_docid_order, + _swigc__p_double, + _swigc__p_feature_flag, + _swigc__p_first_type, + _swigc__p_int, + _swigc__p_op, + _swigc__p_second_type, + _swigc__p_std__invalid_argument, + _swigc__p_std__string, + _swigc__p_stem_strategy, + _swigc__p_swig__SwigPyIterator, + _swigc__p_unsigned_int, +}; +static swig_const_info swig_const_table[] = { +{0, 0, 0, 0.0, 0, 0}}; +} +extern "C" { +static __attribute__ ((__unused__)) void +SWIG_InitializeModule(void *clientdata) { + size_t i; + swig_module_info *module_head, *iter; + int found, init; + clientdata = clientdata; + if (swig_module.next==0) { + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + init = 1; + } else { + init = 0; + } + module_head = SWIG_Python_GetModule(); + if (!module_head) { + SWIG_Python_SetModule(&swig_module); + module_head = &swig_module; + } else { + found=0; + iter=module_head; + do { + if (iter==&swig_module) { + found=1; + break; + } + iter=iter->next; + } while (iter!= module_head); + if (found) return; + swig_module.next = module_head->next; + module_head->next = &swig_module; + } + if (init == 0) return; + for (i = 0; i < swig_module.size; ++i) { + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; + if (swig_module.next != &swig_module) { + type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); + } + if (type) { + if (swig_module.type_initial[i]->clientdata) { + type->clientdata = swig_module.type_initial[i]->clientdata; + } + } else { + type = swig_module.type_initial[i]; + } + cast = swig_module.cast_initial[i]; + while (cast->type) { + ret = 0; + if (swig_module.next != &swig_module) { + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); + } + if (ret) { + if (type == swig_module.type_initial[i]) { + cast->type = ret; + ret = 0; + } else { + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); + if (!ocast) ret = 0; + } + } + if (!ret) { + if (type->cast) { + type->cast->prev = cast; + cast->next = type->cast; + } + type->cast = cast; + } + cast++; + } + swig_module.types[i] = type; + } + swig_module.types[i] = 0; +} +static __attribute__ ((__unused__)) void +SWIG_PropagateClientData(void) { + size_t i; + swig_cast_info *equiv; + static int init_run = 0; + if (init_run) return; + init_run = 1; + for (i = 0; i < swig_module.size; i++) { + if (swig_module.types[i]->clientdata) { + equiv = swig_module.types[i]->cast; + while (equiv) { + if (!equiv->converter) { + if (equiv->type && !equiv->type->clientdata) + SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); + } + equiv = equiv->next; + } + } + } +} +} +extern "C" { + typedef struct swig_globalvar { + char *name; + PyObject *(*get_attr)(void); + int (*set_attr)(PyObject *); + struct swig_globalvar *next; + } swig_globalvar; + typedef struct swig_varlinkobject { + Py_ssize_t ob_refcnt; struct _typeobject *ob_type; + swig_globalvar *vars; + } swig_varlinkobject; + static __attribute__ ((__unused__)) PyObject * + swig_varlink_repr(swig_varlinkobject *) { + return PyString_FromString(""); + } + static __attribute__ ((__unused__)) PyObject * + swig_varlink_str(swig_varlinkobject *v) { + PyObject *str = PyString_FromString("("); + swig_globalvar *var; + for (var = v->vars; var; var=var->next) { + PyString_ConcatAndDel(&str,PyString_FromString(var->name)); + if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); + } + PyString_ConcatAndDel(&str,PyString_FromString(")")); + return str; + } + static __attribute__ ((__unused__)) int + swig_varlink_print(swig_varlinkobject *v, FILE *fp, int ) { + char *tmp; + PyObject *str = swig_varlink_str(v); + fprintf(fp,"Swig global variables "); + fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); + ; + if ( --((PyObject*)(str))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(str)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(str)))); + return 0; + } + static __attribute__ ((__unused__)) void + swig_varlink_dealloc(swig_varlinkobject *v) { + swig_globalvar *var = v->vars; + while (var) { + swig_globalvar *n = var->next; + free(var->name); + free(var); + var = n; + } + } + static __attribute__ ((__unused__)) PyObject * + swig_varlink_getattr(swig_varlinkobject *v, char *n) { + PyObject *res = __null; + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + res = (*var->get_attr)(); + break; + } + var = var->next; + } + if (res == __null && !PyErr_Occurred()) { + PyErr_SetString(PyExc_NameError,"Unknown C global variable"); + } + return res; + } + static __attribute__ ((__unused__)) int + swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { + int res = 1; + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + res = (*var->set_attr)(p); + break; + } + var = var->next; + } + if (res == 1 && !PyErr_Occurred()) { + PyErr_SetString(PyExc_NameError,"Unknown C global variable"); + } + return res; + } + static __attribute__ ((__unused__)) PyTypeObject* + swig_varlink_type(void) { + static char varlink__doc__[] = "Swig var link object"; + static PyTypeObject varlink_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp + = { + 1, __null, + 0, + (char *)"swigvarlink", + sizeof(swig_varlinkobject), + 0, + (destructor) swig_varlink_dealloc, + (printfunc) swig_varlink_print, + (getattrfunc) swig_varlink_getattr, + (setattrfunc) swig_varlink_setattr, + 0, + (reprfunc) swig_varlink_repr, + 0, + 0, + 0, + 0, + 0, + (reprfunc) swig_varlink_str, + 0, + 0, + 0, + 0, + varlink__doc__, + 0, + 0, + 0, + 0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0, + }; + varlink_type = tmp; + varlink_type.ob_type = &PyType_Type; + type_init = 1; + } + return &varlink_type; + } + static __attribute__ ((__unused__)) PyObject * + SWIG_Python_newvarlink(void) { + swig_varlinkobject *result = ( (swig_varlinkobject *) PyObject_Init( (PyObject *) PyObject_Malloc( ( (swig_varlink_type())->tp_basicsize ) ), (swig_varlink_type())) ); + if (result) { + result->vars = 0; + } + return ((PyObject*) result); + } + static __attribute__ ((__unused__)) void + SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { + swig_varlinkobject *v = (swig_varlinkobject *) p; + swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); + if (gv) { + size_t size = strlen(name)+1; + gv->name = (char *)malloc(size); + if (gv->name) { + strncpy(gv->name,name,size); + gv->get_attr = get_attr; + gv->set_attr = set_attr; + gv->next = v->vars; + } + } + v->vars = gv; + } + static __attribute__ ((__unused__)) PyObject * + SWIG_globals(void) { + static PyObject *_SWIG_globals = 0; + if (!_SWIG_globals) _SWIG_globals = SWIG_Python_newvarlink(); + return _SWIG_globals; + } + static __attribute__ ((__unused__)) void + SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { + PyObject *obj = 0; + size_t i; + for (i = 0; constants[i].type; ++i) { + switch(constants[i].type) { + case 4: + obj = SWIG_Python_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype, 0); + break; + case 5: + obj = SWIG_Python_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); + break; + default: + obj = 0; + break; + } + if (obj) { + PyDict_SetItemString(d, constants[i].name, obj); + if ( --((PyObject*)(obj))->ob_refcnt != 0) ; else ( (*(((PyObject*)((PyObject *)(obj)))->ob_type)->tp_dealloc)((PyObject *)((PyObject *)(obj)))); + } + } + } + static __attribute__ ((__unused__)) void + SWIG_Python_FixMethods(PyMethodDef *methods, + swig_const_info *const_table, + swig_type_info **types, + swig_type_info **types_initial) { + size_t i; + for (i = 0; methods[i].ml_name; ++i) { + const char *c = methods[i].ml_doc; + if (c && (c = strstr(c, "swig_ptr: "))) { + int j; + swig_const_info *ci = 0; + const char *name = c + 10; + for (j = 0; const_table[j].type; ++j) { + if (strncmp(const_table[j].name, name, + strlen(const_table[j].name)) == 0) { + ci = &(const_table[j]); + break; + } + } + if (ci) { + size_t shift = (ci->ptype) - types; + swig_type_info *ty = types_initial[shift]; + size_t ldoc = (c - methods[i].ml_doc); + size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; + char *ndoc = (char*)malloc(ldoc + lptr + 10); + if (ndoc) { + char *buff = ndoc; + void *ptr = (ci->type == 4) ? ci->pvalue : 0; + if (ptr) { + strncpy(buff, methods[i].ml_doc, ldoc); + buff += ldoc; + strncpy(buff, "swig_ptr: ", 10); + buff += 10; + SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); + methods[i].ml_doc = ndoc; + } + } + } + } + } + } +} +extern "C" +__attribute__ ((visibility("default"))) +void +init_xapian(void) { + PyObject *m, *d; + SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); + m = Py_InitModule4_64((char *) "_xapian", SwigMethods, (char *)__null, (PyObject *)__null, 1013); + d = PyModule_GetDict(m); + SWIG_InitializeModule(0); + SWIG_Python_InstallConstants(d, swig_const_table); + SWIG_Python_SetConstant(d, "BAD_VALUENO",SWIG_From_unsigned_SS_int(static_cast< unsigned int >(Xapian::BAD_VALUENO))); + SWIG_Python_SetConstant(d, "MSET_DID",SWIG_From_int(static_cast< int >(0))); + SWIG_Python_SetConstant(d, "MSET_WT",SWIG_From_int(static_cast< int >(1))); + SWIG_Python_SetConstant(d, "MSET_RANK",SWIG_From_int(static_cast< int >(2))); + SWIG_Python_SetConstant(d, "MSET_PERCENT",SWIG_From_int(static_cast< int >(3))); + SWIG_Python_SetConstant(d, "MSET_DOCUMENT",SWIG_From_int(static_cast< int >(4))); + SWIG_Python_SetConstant(d, "ESET_TNAME",SWIG_From_int(static_cast< int >(0))); + SWIG_Python_SetConstant(d, "ESET_WT",SWIG_From_int(static_cast< int >(1))); + SWIG_Python_SetConstant(d, "Enquire_ASCENDING",SWIG_From_int(static_cast< int >(Xapian::Enquire::ASCENDING))); + SWIG_Python_SetConstant(d, "Enquire_DESCENDING",SWIG_From_int(static_cast< int >(Xapian::Enquire::DESCENDING))); + SWIG_Python_SetConstant(d, "Enquire_DONT_CARE",SWIG_From_int(static_cast< int >(Xapian::Enquire::DONT_CARE))); + SWIG_Python_SetConstant(d, "Enquire_INCLUDE_QUERY_TERMS",SWIG_From_int(static_cast< int >(Xapian::Enquire::INCLUDE_QUERY_TERMS))); + SWIG_Python_SetConstant(d, "Enquire_USE_EXACT_TERMFREQ",SWIG_From_int(static_cast< int >(Xapian::Enquire::USE_EXACT_TERMFREQ))); + SWIG_Python_SetConstant(d, "DB_CREATE_OR_OPEN",SWIG_From_int(static_cast< int >(Xapian::DB_CREATE_OR_OPEN))); + SWIG_Python_SetConstant(d, "DB_CREATE",SWIG_From_int(static_cast< int >(Xapian::DB_CREATE))); + SWIG_Python_SetConstant(d, "DB_CREATE_OR_OVERWRITE",SWIG_From_int(static_cast< int >(Xapian::DB_CREATE_OR_OVERWRITE))); + SWIG_Python_SetConstant(d, "DB_OPEN",SWIG_From_int(static_cast< int >(Xapian::DB_OPEN))); + SWIG_Python_SetConstant(d, "Query_OP_AND",SWIG_From_int(static_cast< int >(Xapian::Query::OP_AND))); + SWIG_Python_SetConstant(d, "Query_OP_OR",SWIG_From_int(static_cast< int >(Xapian::Query::OP_OR))); + SWIG_Python_SetConstant(d, "Query_OP_AND_NOT",SWIG_From_int(static_cast< int >(Xapian::Query::OP_AND_NOT))); + SWIG_Python_SetConstant(d, "Query_OP_XOR",SWIG_From_int(static_cast< int >(Xapian::Query::OP_XOR))); + SWIG_Python_SetConstant(d, "Query_OP_AND_MAYBE",SWIG_From_int(static_cast< int >(Xapian::Query::OP_AND_MAYBE))); + SWIG_Python_SetConstant(d, "Query_OP_FILTER",SWIG_From_int(static_cast< int >(Xapian::Query::OP_FILTER))); + SWIG_Python_SetConstant(d, "Query_OP_NEAR",SWIG_From_int(static_cast< int >(Xapian::Query::OP_NEAR))); + SWIG_Python_SetConstant(d, "Query_OP_PHRASE",SWIG_From_int(static_cast< int >(Xapian::Query::OP_PHRASE))); + SWIG_Python_SetConstant(d, "Query_OP_VALUE_RANGE",SWIG_From_int(static_cast< int >(Xapian::Query::OP_VALUE_RANGE))); + SWIG_Python_SetConstant(d, "Query_OP_SCALE_WEIGHT",SWIG_From_int(static_cast< int >(Xapian::Query::OP_SCALE_WEIGHT))); + SWIG_Python_SetConstant(d, "Query_OP_ELITE_SET",SWIG_From_int(static_cast< int >(Xapian::Query::OP_ELITE_SET))); + SWIG_Python_SetConstant(d, "Query_OP_VALUE_GE",SWIG_From_int(static_cast< int >(Xapian::Query::OP_VALUE_GE))); + SWIG_Python_SetConstant(d, "Query_OP_VALUE_LE",SWIG_From_int(static_cast< int >(Xapian::Query::OP_VALUE_LE))); + SWIG_Python_SetConstant(d, "Query_OP_SYNONYM",SWIG_From_int(static_cast< int >(Xapian::Query::OP_SYNONYM))); + SWIG_Python_SetConstant(d, "QueryParser_FLAG_BOOLEAN",SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_BOOLEAN))); + SWIG_Python_SetConstant(d, "QueryParser_FLAG_PHRASE",SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_PHRASE))); + SWIG_Python_SetConstant(d, "QueryParser_FLAG_LOVEHATE",SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_LOVEHATE))); + SWIG_Python_SetConstant(d, "QueryParser_FLAG_BOOLEAN_ANY_CASE",SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_BOOLEAN_ANY_CASE))); + SWIG_Python_SetConstant(d, "QueryParser_FLAG_WILDCARD",SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_WILDCARD))); + SWIG_Python_SetConstant(d, "QueryParser_FLAG_PURE_NOT",SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_PURE_NOT))); + SWIG_Python_SetConstant(d, "QueryParser_FLAG_PARTIAL",SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_PARTIAL))); + SWIG_Python_SetConstant(d, "QueryParser_FLAG_SPELLING_CORRECTION",SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_SPELLING_CORRECTION))); + SWIG_Python_SetConstant(d, "QueryParser_FLAG_SYNONYM",SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_SYNONYM))); + SWIG_Python_SetConstant(d, "QueryParser_FLAG_AUTO_SYNONYMS",SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_AUTO_SYNONYMS))); + SWIG_Python_SetConstant(d, "QueryParser_FLAG_AUTO_MULTIWORD_SYNONYMS",SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_AUTO_MULTIWORD_SYNONYMS))); + SWIG_Python_SetConstant(d, "QueryParser_FLAG_DEFAULT",SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_DEFAULT))); + SWIG_Python_SetConstant(d, "QueryParser_STEM_NONE",SWIG_From_int(static_cast< int >(Xapian::QueryParser::STEM_NONE))); + SWIG_Python_SetConstant(d, "QueryParser_STEM_SOME",SWIG_From_int(static_cast< int >(Xapian::QueryParser::STEM_SOME))); + SWIG_Python_SetConstant(d, "QueryParser_STEM_ALL",SWIG_From_int(static_cast< int >(Xapian::QueryParser::STEM_ALL))); + SWIG_Python_SetConstant(d, "TermGenerator_FLAG_SPELLING",SWIG_From_int(static_cast< int >(Xapian::TermGenerator::FLAG_SPELLING))); + SWIG_Python_SetConstant(d, "Compactor_STANDARD",SWIG_From_int(static_cast< int >(Xapian::Compactor::STANDARD))); + SWIG_Python_SetConstant(d, "Compactor_FULL",SWIG_From_int(static_cast< int >(Xapian::Compactor::FULL))); + SWIG_Python_SetConstant(d, "Compactor_FULLER",SWIG_From_int(static_cast< int >(Xapian::Compactor::FULLER))); + PyEval_InitThreads(); + return; +} diff --git a/360229/xapian_wrap.i.1 b/360229/xapian_wrap.i.1 new file mode 100644 index 0000000..a616f8d --- /dev/null +++ b/360229/xapian_wrap.i.1 @@ -0,0 +1,59 @@ +extern "C" { + typedef struct { + } *__locale_t; + typedef struct _object { + } PyObject; +} namespace Xapian { + namespace Internal { + template < class T > class RefCntPtr { + public:T * operator->()const; + T *get() const; + }; + template < class T > inline T * RefCntPtr < T >::get() const { + }} class __attribute__ ((visibility("default"))) PositionIterator { + public:class Internal; + Xapian::Internal::RefCntPtr < Internal > internal; + }; + inline bool operator==(const PositionIterator & a, + const PositionIterator & b) { + return (a.internal.get() == b.internal.get()); + }; +} + +static __attribute__ ((__unused__)) +inline PyObject *SWIG_From_bool(bool value) +{ +} + +namespace Xapian { + __attribute__ ((visibility("default"))) void SetPythonException() { +}}; +static __attribute__ ((__unused__)) +bool Xapian_PositionIterator_equals(Xapian::PositionIterator const *self, + Xapian::PositionIterator const &other) +{ + return (*self) == other; +}; + +extern "C" { + static + __attribute__ ((__unused__)) PyObject + *_wrap_PositionIterator_equals(PyObject *, PyObject * args) { + PyObject *resultobj = 0; + Xapian::PositionIterator * arg1 = + (Xapian::PositionIterator *) 0; + Xapian::PositionIterator * arg2 = 0; + bool result; + { + { + try { + result = + (bool) + Xapian_PositionIterator_equals((Xapian::PositionIterator const *)arg1, (Xapian::PositionIterator const &)*arg2); + } catch(...) { + } + } + } + resultobj = SWIG_From_bool(static_cast < bool > (result)); + } +} diff --git a/360229/xapian_wrap.i.2 b/360229/xapian_wrap.i.2 new file mode 100644 index 0000000..c2a73d8 --- /dev/null +++ b/360229/xapian_wrap.i.2 @@ -0,0 +1,35 @@ +namespace Xapian { + namespace Internal { + template < class T > class RefCntPtr { + public: + T *operator->() const; + T *get() const; + }; + template < class T > inline T * RefCntPtr < T >::get() const {} + } + + class iter { + public: + class Internal; + Xapian::Internal::RefCntPtr < Internal > internal; + }; + + bool operator == (const Xapian::iter &a, const Xapian::iter &b) { + return (a.internal.get() == b.internal.get()); + }; +} + +bool equals(Xapian::iter const *self, + Xapian::iter const &other) +{ + return *self == other; +} + +bool f() { + Xapian::iter *arg1, *arg2; + bool result; + try { + result = equals((Xapian::iter const *)arg1, (Xapian::iter const &)*arg2); + } catch(...) {} + return result; +} diff --git a/388835/aesni-intel_glue.i b/388835/aesni-intel_glue.i new file mode 100644 index 0000000..e5099bd --- /dev/null +++ b/388835/aesni-intel_glue.i @@ -0,0 +1,32 @@ +__attribute__ ((always_inline)) __attribute__ ((pure)) +int cpu_has(unsigned short bit) +{ + asm goto ("1: jmp %l[t_no]\n" "2:\n" ".section .altinstructions,\"a\"\n" + ".balign 4\n" ".long 1b\n" ".long 0\n" ".word %P0\n" ".byte 2b - 1b\n" ".byte 0\n" + ".previous\n"::"i" (bit)::t_no); + return 1; + t_no:return 0; +} + +union thread_xstate { + int swd; + int xstate_bv; +}; + +void aes_decrypt(union thread_xstate *state) +{ + if (fpu_usable()) { + decrypt(); + return; + } + + if (__builtin_constant_p(cpu_has(154)) ? cpu_has(154) : cpu_has(154)) { + if (state->xstate_bv) + return; + } else if (cpu_has(24)) {} + + if (state->swd) + asm volatile ("fnclex"); +} + +void (*funcptr)(void) = aes_decrypt; diff --git a/388835/aesni-intel_glue.i.0 b/388835/aesni-intel_glue.i.0 new file mode 100644 index 0000000..c666785 --- /dev/null +++ b/388835/aesni-intel_glue.i.0 @@ -0,0 +1,21716 @@ +typedef __signed__ char __s8; +typedef unsigned char __u8; +typedef __signed__ short __s16; +typedef unsigned short __u16; +typedef __signed__ int __s32; +typedef unsigned int __u32; +__extension__ typedef __signed__ long long __s64; +__extension__ typedef unsigned long long __u64; +typedef signed char s8; +typedef unsigned char u8; +typedef signed short s16; +typedef unsigned short u16; +typedef signed int s32; +typedef unsigned int u32; +typedef signed long long s64; +typedef unsigned long long u64; +typedef unsigned short umode_t; +struct ftrace_branch_data { + const char *func; + const char *file; + unsigned line; + union { + struct { + unsigned long correct; + unsigned long incorrect; + }; + struct { + unsigned long miss; + unsigned long hit; + }; + unsigned long miss_hit[2]; + }; +}; +void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); +enum { + false = 0, + true = 1 +}; +typedef struct { + unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))]; +} __kernel_fd_set; +typedef void (*__kernel_sighandler_t)(int); +typedef int __kernel_key_t; +typedef int __kernel_mqd_t; +typedef unsigned long __kernel_ino_t; +typedef unsigned short __kernel_mode_t; +typedef unsigned short __kernel_nlink_t; +typedef long __kernel_off_t; +typedef int __kernel_pid_t; +typedef unsigned short __kernel_ipc_pid_t; +typedef unsigned short __kernel_uid_t; +typedef unsigned short __kernel_gid_t; +typedef unsigned int __kernel_size_t; +typedef int __kernel_ssize_t; +typedef int __kernel_ptrdiff_t; +typedef long __kernel_time_t; +typedef long __kernel_suseconds_t; +typedef long __kernel_clock_t; +typedef int __kernel_timer_t; +typedef int __kernel_clockid_t; +typedef int __kernel_daddr_t; +typedef char * __kernel_caddr_t; +typedef unsigned short __kernel_uid16_t; +typedef unsigned short __kernel_gid16_t; +typedef unsigned int __kernel_uid32_t; +typedef unsigned int __kernel_gid32_t; +typedef unsigned short __kernel_old_uid_t; +typedef unsigned short __kernel_old_gid_t; +typedef unsigned short __kernel_old_dev_t; +typedef long long __kernel_loff_t; +typedef struct { + int val[2]; +} __kernel_fsid_t; +typedef __u32 __kernel_dev_t; +typedef __kernel_fd_set fd_set; +typedef __kernel_dev_t dev_t; +typedef __kernel_ino_t ino_t; +typedef __kernel_mode_t mode_t; +typedef __kernel_nlink_t nlink_t; +typedef __kernel_off_t off_t; +typedef __kernel_pid_t pid_t; +typedef __kernel_daddr_t daddr_t; +typedef __kernel_key_t key_t; +typedef __kernel_suseconds_t suseconds_t; +typedef __kernel_timer_t timer_t; +typedef __kernel_clockid_t clockid_t; +typedef __kernel_mqd_t mqd_t; +typedef _Bool bool; +typedef __kernel_uid32_t uid_t; +typedef __kernel_gid32_t gid_t; +typedef __kernel_uid16_t uid16_t; +typedef __kernel_gid16_t gid16_t; +typedef unsigned long uintptr_t; +typedef __kernel_old_uid_t old_uid_t; +typedef __kernel_old_gid_t old_gid_t; +typedef __kernel_loff_t loff_t; +typedef __kernel_size_t size_t; +typedef __kernel_ssize_t ssize_t; +typedef __kernel_ptrdiff_t ptrdiff_t; +typedef __kernel_time_t time_t; +typedef __kernel_clock_t clock_t; +typedef __kernel_caddr_t caddr_t; +typedef unsigned char u_char; +typedef unsigned short u_short; +typedef unsigned int u_int; +typedef unsigned long u_long; +typedef unsigned char unchar; +typedef unsigned short ushort; +typedef unsigned int uint; +typedef unsigned long ulong; +typedef __u8 u_int8_t; +typedef __s8 int8_t; +typedef __u16 u_int16_t; +typedef __s16 int16_t; +typedef __u32 u_int32_t; +typedef __s32 int32_t; +typedef __u8 uint8_t; +typedef __u16 uint16_t; +typedef __u32 uint32_t; +typedef __u64 uint64_t; +typedef __u64 u_int64_t; +typedef __s64 int64_t; +typedef u64 sector_t; +typedef u64 blkcnt_t; +typedef u64 dma_addr_t; +typedef __u16 __le16; +typedef __u16 __be16; +typedef __u32 __le32; +typedef __u32 __be32; +typedef __u64 __le64; +typedef __u64 __be64; +typedef __u16 __sum16; +typedef __u32 __wsum; +typedef unsigned gfp_t; +typedef unsigned fmode_t; +typedef u64 phys_addr_t; +typedef phys_addr_t resource_size_t; +typedef struct { + int counter; +} atomic_t; +struct list_head { + struct list_head *next, *prev; +}; +struct hlist_head { + struct hlist_node *first; +}; +struct hlist_node { + struct hlist_node *next, **pprev; +}; +struct ustat { + __kernel_daddr_t f_tfree; + __kernel_ino_t f_tinode; + char f_fname[6]; + char f_fpack[6]; +}; +struct timespec; +struct compat_timespec; +struct restart_block { + long (*fn)(struct restart_block *); + union { + struct { + u32 *uaddr; + u32 val; + u32 flags; + u32 bitset; + u64 time; + u32 *uaddr2; + } futex; + struct { + clockid_t clockid; + struct timespec *rmtp; + u64 expires; + } nanosleep; + struct { + struct pollfd *ufds; + int nfds; + int has_timeout; + unsigned long tv_sec; + unsigned long tv_nsec; + } poll; + }; +}; +extern long do_no_restart_syscall(struct restart_block *parm); +extern unsigned int __sw_hweight8(unsigned int w); +extern unsigned int __sw_hweight16(unsigned int w); +extern unsigned int __sw_hweight32(unsigned int w); +extern unsigned long __sw_hweight64(__u64 w); +struct alt_instr { + u8 *instr; + u8 *replacement; + u16 cpuid; + u8 instrlen; + u8 replacementlen; +}; +extern void alternative_instructions(void); +extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end); +struct module; +extern void alternatives_smp_module_add(struct module *mod, char *name, + void *locks, void *locks_end, + void *text, void *text_end); +extern void alternatives_smp_module_del(struct module *mod); +extern void alternatives_smp_switch(int smp); +extern int alternatives_text_reserved(void *start, void *end); +extern bool skip_smp_alternatives; +extern const char * const x86_cap_flags[10*32]; +extern const char * const x86_power_flags[32]; +static inline __attribute__((always_inline)) __attribute__((always_inline)) __attribute__((pure)) bool __static_cpu_has(u16 bit) +{ + asm goto("1: jmp %l[t_no]\n" + "2:\n" + ".section .altinstructions,\"a\"\n" + " " ".balign 4" " " "\n" + " " ".long" " " "1b\n" + " " ".long" " " "0\n" + " .word %P0\n" + " .byte 2b - 1b\n" + " .byte 0\n" + ".previous\n" + : : "i" (bit) : : t_no); + return true; + t_no: + return false; +} +struct paravirt_patch_site; +void apply_paravirt(struct paravirt_patch_site *start, + struct paravirt_patch_site *end); +extern void *text_poke_early(void *addr, const void *opcode, size_t len); +struct text_poke_param { + void *addr; + const void *opcode; + size_t len; +}; +extern void *text_poke(void *addr, const void *opcode, size_t len); +extern void *text_poke_smp(void *addr, const void *opcode, size_t len); +extern void text_poke_smp_batch(struct text_poke_param *params, int n); +static inline __attribute__((always_inline)) __attribute__((always_inline)) void +set_bit(unsigned int nr, volatile unsigned long *addr) +{ + if (__builtin_constant_p((((__builtin_constant_p(nr))))) ? !!(((__builtin_constant_p(nr)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/bitops.h", .line = 62, }; ______r = !!(((__builtin_constant_p(nr)))); ______f.miss_hit[______r]++; ______r; })) { + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "orb %1,%0" + : "+m" (*(volatile long *) ((void *)(addr) + ((nr)>>3))) + : "iq" ((u8)(1 << ((nr) & 7))) + : "memory"); + } else { + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "bts %1,%0" + : "+m" (*(volatile long *) (addr)) : "Ir" (nr) : "memory"); + } +} +static inline __attribute__((always_inline)) void __set_bit(int nr, volatile unsigned long *addr) +{ + asm volatile("bts %1,%0" : "+m" (*(volatile long *) (addr)) : "Ir" (nr) : "memory"); +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) void +clear_bit(int nr, volatile unsigned long *addr) +{ + if (__builtin_constant_p((((__builtin_constant_p(nr))))) ? !!(((__builtin_constant_p(nr)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/bitops.h", .line = 100, }; ______r = !!(((__builtin_constant_p(nr)))); ______f.miss_hit[______r]++; ______r; })) { + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "andb %1,%0" + : "+m" (*(volatile long *) ((void *)(addr) + ((nr)>>3))) + : "iq" ((u8)~(1 << ((nr) & 7)))); + } else { + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "btr %1,%0" + : "+m" (*(volatile long *) (addr)) + : "Ir" (nr)); + } +} +static inline __attribute__((always_inline)) void clear_bit_unlock(unsigned nr, volatile unsigned long *addr) +{ + __asm__ __volatile__("": : :"memory"); + clear_bit(nr, addr); +} +static inline __attribute__((always_inline)) void __clear_bit(int nr, volatile unsigned long *addr) +{ + asm volatile("btr %1,%0" : "+m" (*(volatile long *) (addr)) : "Ir" (nr)); +} +static inline __attribute__((always_inline)) void __clear_bit_unlock(unsigned nr, volatile unsigned long *addr) +{ + __asm__ __volatile__("": : :"memory"); + __clear_bit(nr, addr); +} +static inline __attribute__((always_inline)) void __change_bit(int nr, volatile unsigned long *addr) +{ + asm volatile("btc %1,%0" : "+m" (*(volatile long *) (addr)) : "Ir" (nr)); +} +static inline __attribute__((always_inline)) void change_bit(int nr, volatile unsigned long *addr) +{ + if (__builtin_constant_p((((__builtin_constant_p(nr))))) ? !!(((__builtin_constant_p(nr)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/bitops.h", .line = 176, }; ______r = !!(((__builtin_constant_p(nr)))); ______f.miss_hit[______r]++; ______r; })) { + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "xorb %1,%0" + : "+m" (*(volatile long *) ((void *)(addr) + ((nr)>>3))) + : "iq" ((u8)(1 << ((nr) & 7)))); + } else { + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "btc %1,%0" + : "+m" (*(volatile long *) (addr)) + : "Ir" (nr)); + } +} +static inline __attribute__((always_inline)) int test_and_set_bit(int nr, volatile unsigned long *addr) +{ + int oldbit; + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "bts %2,%1\n\t" + "sbb %0,%0" : "=r" (oldbit), "+m" (*(volatile long *) (addr)) : "Ir" (nr) : "memory"); + return oldbit; +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) int +test_and_set_bit_lock(int nr, volatile unsigned long *addr) +{ + return test_and_set_bit(nr, addr); +} +static inline __attribute__((always_inline)) int __test_and_set_bit(int nr, volatile unsigned long *addr) +{ + int oldbit; + asm("bts %2,%1\n\t" + "sbb %0,%0" + : "=r" (oldbit), "+m" (*(volatile long *) (addr)) + : "Ir" (nr)); + return oldbit; +} +static inline __attribute__((always_inline)) int test_and_clear_bit(int nr, volatile unsigned long *addr) +{ + int oldbit; + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "btr %2,%1\n\t" + "sbb %0,%0" + : "=r" (oldbit), "+m" (*(volatile long *) (addr)) : "Ir" (nr) : "memory"); + return oldbit; +} +static inline __attribute__((always_inline)) int __test_and_clear_bit(int nr, volatile unsigned long *addr) +{ + int oldbit; + asm volatile("btr %2,%1\n\t" + "sbb %0,%0" + : "=r" (oldbit), "+m" (*(volatile long *) (addr)) + : "Ir" (nr)); + return oldbit; +} +static inline __attribute__((always_inline)) int __test_and_change_bit(int nr, volatile unsigned long *addr) +{ + int oldbit; + asm volatile("btc %2,%1\n\t" + "sbb %0,%0" + : "=r" (oldbit), "+m" (*(volatile long *) (addr)) + : "Ir" (nr) : "memory"); + return oldbit; +} +static inline __attribute__((always_inline)) int test_and_change_bit(int nr, volatile unsigned long *addr) +{ + int oldbit; + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "btc %2,%1\n\t" + "sbb %0,%0" + : "=r" (oldbit), "+m" (*(volatile long *) (addr)) : "Ir" (nr) : "memory"); + return oldbit; +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) int constant_test_bit(unsigned int nr, const volatile unsigned long *addr) +{ + return ((1UL << (nr % 32)) & + (addr[nr / 32])) != 0; +} +static inline __attribute__((always_inline)) int variable_test_bit(int nr, volatile const unsigned long *addr) +{ + int oldbit; + asm volatile("bt %2,%1\n\t" + "sbb %0,%0" + : "=r" (oldbit) + : "m" (*(unsigned long *)addr), "Ir" (nr)); + return oldbit; +} +static inline __attribute__((always_inline)) unsigned long __ffs(unsigned long word) +{ + asm("bsf %1,%0" + : "=r" (word) + : "rm" (word)); + return word; +} +static inline __attribute__((always_inline)) unsigned long ffz(unsigned long word) +{ + asm("bsf %1,%0" + : "=r" (word) + : "r" (~word)); + return word; +} +static inline __attribute__((always_inline)) unsigned long __fls(unsigned long word) +{ + asm("bsr %1,%0" + : "=r" (word) + : "rm" (word)); + return word; +} +static inline __attribute__((always_inline)) int ffs(int x) +{ + int r; + asm("bsfl %1,%0\n\t" + "cmovzl %2,%0" + : "=r" (r) : "rm" (x), "r" (-1)); + return r + 1; +} +static inline __attribute__((always_inline)) int fls(int x) +{ + int r; + asm("bsrl %1,%0\n\t" + "cmovzl %2,%0" + : "=&r" (r) : "rm" (x), "rm" (-1)); + return r + 1; +} +extern unsigned long find_next_bit(const unsigned long *addr, unsigned long + size, unsigned long offset); +extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned + long size, unsigned long offset); +extern unsigned long find_first_bit(const unsigned long *addr, + unsigned long size); +extern unsigned long find_first_zero_bit(const unsigned long *addr, + unsigned long size); +static inline __attribute__((always_inline)) int sched_find_first_bit(const unsigned long *b) +{ + if (__builtin_constant_p(((b[0]))) ? !!((b[0])) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/asm-generic/bitops/sched.h", .line = 19, }; ______r = !!((b[0])); ______f.miss_hit[______r]++; ______r; })) + return __ffs(b[0]); + if (__builtin_constant_p(((b[1]))) ? !!((b[1])) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/asm-generic/bitops/sched.h", .line = 21, }; ______r = !!((b[1])); ______f.miss_hit[______r]++; ______r; })) + return __ffs(b[1]) + 32; + if (__builtin_constant_p(((b[2]))) ? !!((b[2])) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/asm-generic/bitops/sched.h", .line = 23, }; ______r = !!((b[2])); ______f.miss_hit[______r]++; ______r; })) + return __ffs(b[2]) + 64; + return __ffs(b[3]) + 96; +} +static inline __attribute__((always_inline)) unsigned int __arch_hweight32(unsigned int w) +{ + unsigned int res = 0; + asm ("661:\n\t" "call __sw_hweight32" "\n662:\n" ".section .altinstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "661b\n" " " ".long" " " "663f\n" " .word " "(4*32+23)" "\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .discard,\"aw\",@progbits\n" " .byte 0xff + (664f-663f) - (662b-661b)\n" ".previous\n" ".section .altinstr_replacement, \"ax\"\n" "663:\n\t" ".byte 0xf3,0x0f,0xb8,0xc0" "\n664:\n" ".previous" + : "=""a" (res) + : "a" (w)); + return res; +} +static inline __attribute__((always_inline)) unsigned int __arch_hweight16(unsigned int w) +{ + return __arch_hweight32(w & 0xffff); +} +static inline __attribute__((always_inline)) unsigned int __arch_hweight8(unsigned int w) +{ + return __arch_hweight32(w & 0xff); +} +static inline __attribute__((always_inline)) unsigned long __arch_hweight64(__u64 w) +{ + unsigned long res = 0; + return __arch_hweight32((u32)w) + + __arch_hweight32((u32)(w >> 32)); + return res; +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) int fls64(__u64 x) +{ + __u32 h = x >> 32; + if (__builtin_constant_p(((h))) ? !!((h)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/asm-generic/bitops/fls64.h", .line = 21, }; ______r = !!((h)); ______f.miss_hit[______r]++; ______r; })) + return fls(h) + 32; + return fls(x); +} +static inline __attribute__((always_inline)) __attribute__((__const__)) __u32 __arch_swab32(__u32 val) +{ + asm("bswap %0" : "=r" (val) : "0" (val)); + return val; +} +static inline __attribute__((always_inline)) __attribute__((__const__)) __u64 __arch_swab64(__u64 val) +{ + union { + struct { + __u32 a; + __u32 b; + } s; + __u64 u; + } v; + v.u = val; + asm("bswapl %0 ; bswapl %1 ; xchgl %0,%1" + : "=r" (v.s.a), "=r" (v.s.b) + : "0" (v.s.a), "1" (v.s.b)); + return v.u; +} +static inline __attribute__((always_inline)) __attribute__((__const__)) __u16 __fswab16(__u16 val) +{ + return ((__u16)( (((__u16)(val) & (__u16)0x00ffU) << 8) | (((__u16)(val) & (__u16)0xff00U) >> 8))); +} +static inline __attribute__((always_inline)) __attribute__((__const__)) __u32 __fswab32(__u32 val) +{ + return __arch_swab32(val); +} +static inline __attribute__((always_inline)) __attribute__((__const__)) __u64 __fswab64(__u64 val) +{ + return __arch_swab64(val); +} +static inline __attribute__((always_inline)) __attribute__((__const__)) __u32 __fswahw32(__u32 val) +{ + return ((__u32)( (((__u32)(val) & (__u32)0x0000ffffUL) << 16) | (((__u32)(val) & (__u32)0xffff0000UL) >> 16))); +} +static inline __attribute__((always_inline)) __attribute__((__const__)) __u32 __fswahb32(__u32 val) +{ + return ((__u32)( (((__u32)(val) & (__u32)0x00ff00ffUL) << 8) | (((__u32)(val) & (__u32)0xff00ff00UL) >> 8))); +} +static inline __attribute__((always_inline)) __u16 __swab16p(const __u16 *p) +{ + return (__builtin_constant_p((__u16)(*p)) ? ((__u16)( (((__u16)(*p) & (__u16)0x00ffU) << 8) | (((__u16)(*p) & (__u16)0xff00U) >> 8))) : __fswab16(*p)); +} +static inline __attribute__((always_inline)) __u32 __swab32p(const __u32 *p) +{ + return (__builtin_constant_p((__u32)(*p)) ? ((__u32)( (((__u32)(*p) & (__u32)0x000000ffUL) << 24) | (((__u32)(*p) & (__u32)0x0000ff00UL) << 8) | (((__u32)(*p) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(*p) & (__u32)0xff000000UL) >> 24))) : __fswab32(*p)); +} +static inline __attribute__((always_inline)) __u64 __swab64p(const __u64 *p) +{ + return (__builtin_constant_p((__u64)(*p)) ? ((__u64)( (((__u64)(*p) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(*p) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(*p) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(*p) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(*p) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(*p) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(*p) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(*p) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(*p)); +} +static inline __attribute__((always_inline)) __u32 __swahw32p(const __u32 *p) +{ + return (__builtin_constant_p((__u32)(*p)) ? ((__u32)( (((__u32)(*p) & (__u32)0x0000ffffUL) << 16) | (((__u32)(*p) & (__u32)0xffff0000UL) >> 16))) : __fswahw32(*p)); +} +static inline __attribute__((always_inline)) __u32 __swahb32p(const __u32 *p) +{ + return (__builtin_constant_p((__u32)(*p)) ? ((__u32)( (((__u32)(*p) & (__u32)0x00ff00ffUL) << 8) | (((__u32)(*p) & (__u32)0xff00ff00UL) >> 8))) : __fswahb32(*p)); +} +static inline __attribute__((always_inline)) void __swab16s(__u16 *p) +{ + *p = __swab16p(p); +} +static inline __attribute__((always_inline)) void __swab32s(__u32 *p) +{ + *p = __swab32p(p); +} +static inline __attribute__((always_inline)) void __swab64s(__u64 *p) +{ + *p = __swab64p(p); +} +static inline __attribute__((always_inline)) void __swahw32s(__u32 *p) +{ + *p = __swahw32p(p); +} +static inline __attribute__((always_inline)) void __swahb32s(__u32 *p) +{ + *p = __swahb32p(p); +} +static inline __attribute__((always_inline)) __le64 __cpu_to_le64p(const __u64 *p) +{ + return ( __le64)*p; +} +static inline __attribute__((always_inline)) __u64 __le64_to_cpup(const __le64 *p) +{ + return ( __u64)*p; +} +static inline __attribute__((always_inline)) __le32 __cpu_to_le32p(const __u32 *p) +{ + return ( __le32)*p; +} +static inline __attribute__((always_inline)) __u32 __le32_to_cpup(const __le32 *p) +{ + return ( __u32)*p; +} +static inline __attribute__((always_inline)) __le16 __cpu_to_le16p(const __u16 *p) +{ + return ( __le16)*p; +} +static inline __attribute__((always_inline)) __u16 __le16_to_cpup(const __le16 *p) +{ + return ( __u16)*p; +} +static inline __attribute__((always_inline)) __be64 __cpu_to_be64p(const __u64 *p) +{ + return ( __be64)__swab64p(p); +} +static inline __attribute__((always_inline)) __u64 __be64_to_cpup(const __be64 *p) +{ + return __swab64p((__u64 *)p); +} +static inline __attribute__((always_inline)) __be32 __cpu_to_be32p(const __u32 *p) +{ + return ( __be32)__swab32p(p); +} +static inline __attribute__((always_inline)) __u32 __be32_to_cpup(const __be32 *p) +{ + return __swab32p((__u32 *)p); +} +static inline __attribute__((always_inline)) __be16 __cpu_to_be16p(const __u16 *p) +{ + return ( __be16)__swab16p(p); +} +static inline __attribute__((always_inline)) __u16 __be16_to_cpup(const __be16 *p) +{ + return __swab16p((__u16 *)p); +} +static inline __attribute__((always_inline)) void le16_add_cpu(__le16 *var, u16 val) +{ + *var = (( __le16)(__u16)((( __u16)(__le16)(*var)) + val)); +} +static inline __attribute__((always_inline)) void le32_add_cpu(__le32 *var, u32 val) +{ + *var = (( __le32)(__u32)((( __u32)(__le32)(*var)) + val)); +} +static inline __attribute__((always_inline)) void le64_add_cpu(__le64 *var, u64 val) +{ + *var = (( __le64)(__u64)((( __u64)(__le64)(*var)) + val)); +} +static inline __attribute__((always_inline)) void be16_add_cpu(__be16 *var, u16 val) +{ + *var = (( __be16)(__builtin_constant_p((__u16)(((__builtin_constant_p((__u16)(( __u16)(__be16)(*var))) ? ((__u16)( (((__u16)(( __u16)(__be16)(*var)) & (__u16)0x00ffU) << 8) | (((__u16)(( __u16)(__be16)(*var)) & (__u16)0xff00U) >> 8))) : __fswab16(( __u16)(__be16)(*var))) + val))) ? ((__u16)( (((__u16)(((__builtin_constant_p((__u16)(( __u16)(__be16)(*var))) ? ((__u16)( (((__u16)(( __u16)(__be16)(*var)) & (__u16)0x00ffU) << 8) | (((__u16)(( __u16)(__be16)(*var)) & (__u16)0xff00U) >> 8))) : __fswab16(( __u16)(__be16)(*var))) + val)) & (__u16)0x00ffU) << 8) | (((__u16)(((__builtin_constant_p((__u16)(( __u16)(__be16)(*var))) ? ((__u16)( (((__u16)(( __u16)(__be16)(*var)) & (__u16)0x00ffU) << 8) | (((__u16)(( __u16)(__be16)(*var)) & (__u16)0xff00U) >> 8))) : __fswab16(( __u16)(__be16)(*var))) + val)) & (__u16)0xff00U) >> 8))) : __fswab16(((__builtin_constant_p((__u16)(( __u16)(__be16)(*var))) ? ((__u16)( (((__u16)(( __u16)(__be16)(*var)) & (__u16)0x00ffU) << 8) | (((__u16)(( __u16)(__be16)(*var)) & (__u16)0xff00U) >> 8))) : __fswab16(( __u16)(__be16)(*var))) + val)))); +} +static inline __attribute__((always_inline)) void be32_add_cpu(__be32 *var, u32 val) +{ + *var = (( __be32)(__builtin_constant_p((__u32)(((__builtin_constant_p((__u32)(( __u32)(__be32)(*var))) ? ((__u32)( (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(*var))) + val))) ? ((__u32)( (((__u32)(((__builtin_constant_p((__u32)(( __u32)(__be32)(*var))) ? ((__u32)( (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(*var))) + val)) & (__u32)0x000000ffUL) << 24) | (((__u32)(((__builtin_constant_p((__u32)(( __u32)(__be32)(*var))) ? ((__u32)( (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(*var))) + val)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(((__builtin_constant_p((__u32)(( __u32)(__be32)(*var))) ? ((__u32)( (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(*var))) + val)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(((__builtin_constant_p((__u32)(( __u32)(__be32)(*var))) ? ((__u32)( (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(*var))) + val)) & (__u32)0xff000000UL) >> 24))) : __fswab32(((__builtin_constant_p((__u32)(( __u32)(__be32)(*var))) ? ((__u32)( (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x000000ffUL) << 24) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x0000ff00UL) << 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(( __u32)(__be32)(*var)) & (__u32)0xff000000UL) >> 24))) : __fswab32(( __u32)(__be32)(*var))) + val)))); +} +static inline __attribute__((always_inline)) void be64_add_cpu(__be64 *var, u64 val) +{ + *var = (( __be64)(__builtin_constant_p((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val))) ? ((__u64)( (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(((__builtin_constant_p((__u64)(( __u64)(__be64)(*var))) ? ((__u64)( (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(( __u64)(__be64)(*var)) & (__u64)0xff00000000000000ULL) >> 56))) : __fswab64(( __u64)(__be64)(*var))) + val)))); +} +static inline __attribute__((always_inline)) unsigned long find_next_zero_bit_le(const void *addr, + unsigned long size, unsigned long offset) +{ + return find_next_zero_bit(addr, size, offset); +} +static inline __attribute__((always_inline)) unsigned long find_next_bit_le(const void *addr, + unsigned long size, unsigned long offset) +{ + return find_next_bit(addr, size, offset); +} +static inline __attribute__((always_inline)) unsigned long find_first_zero_bit_le(const void *addr, + unsigned long size) +{ + return find_first_zero_bit(addr, size); +} +static inline __attribute__((always_inline)) int test_bit_le(int nr, const void *addr) +{ + return (__builtin_constant_p((nr ^ 0)) ? constant_test_bit((nr ^ 0), (addr)) : variable_test_bit((nr ^ 0), (addr))); +} +static inline __attribute__((always_inline)) void __set_bit_le(int nr, void *addr) +{ + __set_bit(nr ^ 0, addr); +} +static inline __attribute__((always_inline)) void __clear_bit_le(int nr, void *addr) +{ + __clear_bit(nr ^ 0, addr); +} +static inline __attribute__((always_inline)) int test_and_set_bit_le(int nr, void *addr) +{ + return test_and_set_bit(nr ^ 0, addr); +} +static inline __attribute__((always_inline)) int test_and_clear_bit_le(int nr, void *addr) +{ + return test_and_clear_bit(nr ^ 0, addr); +} +static inline __attribute__((always_inline)) int __test_and_set_bit_le(int nr, void *addr) +{ + return __test_and_set_bit(nr ^ 0, addr); +} +static inline __attribute__((always_inline)) int __test_and_clear_bit_le(int nr, void *addr) +{ + return __test_and_clear_bit(nr ^ 0, addr); +} +static __inline__ __attribute__((always_inline)) int get_bitmask_order(unsigned int count) +{ + int order; + order = fls(count); + return order; +} +static __inline__ __attribute__((always_inline)) int get_count_order(unsigned int count) +{ + int order; + order = fls(count) - 1; + if (__builtin_constant_p(((count & (count - 1)))) ? !!((count & (count - 1))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bitops.h", .line = 42, }; ______r = !!((count & (count - 1))); ______f.miss_hit[______r]++; ______r; })) + order++; + return order; +} +static inline __attribute__((always_inline)) unsigned long hweight_long(unsigned long w) +{ + return sizeof(w) == 4 ? (__builtin_constant_p(w) ? ((( (!!((w) & (1ULL << 0))) + (!!((w) & (1ULL << 1))) + (!!((w) & (1ULL << 2))) + (!!((w) & (1ULL << 3))) + (!!((w) & (1ULL << 4))) + (!!((w) & (1ULL << 5))) + (!!((w) & (1ULL << 6))) + (!!((w) & (1ULL << 7))) ) + ( (!!(((w) >> 8) & (1ULL << 0))) + (!!(((w) >> 8) & (1ULL << 1))) + (!!(((w) >> 8) & (1ULL << 2))) + (!!(((w) >> 8) & (1ULL << 3))) + (!!(((w) >> 8) & (1ULL << 4))) + (!!(((w) >> 8) & (1ULL << 5))) + (!!(((w) >> 8) & (1ULL << 6))) + (!!(((w) >> 8) & (1ULL << 7))) )) + (( (!!(((w) >> 16) & (1ULL << 0))) + (!!(((w) >> 16) & (1ULL << 1))) + (!!(((w) >> 16) & (1ULL << 2))) + (!!(((w) >> 16) & (1ULL << 3))) + (!!(((w) >> 16) & (1ULL << 4))) + (!!(((w) >> 16) & (1ULL << 5))) + (!!(((w) >> 16) & (1ULL << 6))) + (!!(((w) >> 16) & (1ULL << 7))) ) + ( (!!((((w) >> 16) >> 8) & (1ULL << 0))) + (!!((((w) >> 16) >> 8) & (1ULL << 1))) + (!!((((w) >> 16) >> 8) & (1ULL << 2))) + (!!((((w) >> 16) >> 8) & (1ULL << 3))) + (!!((((w) >> 16) >> 8) & (1ULL << 4))) + (!!((((w) >> 16) >> 8) & (1ULL << 5))) + (!!((((w) >> 16) >> 8) & (1ULL << 6))) + (!!((((w) >> 16) >> 8) & (1ULL << 7))) ))) : __arch_hweight32(w)) : (__builtin_constant_p(w) ? (((( (!!((w) & (1ULL << 0))) + (!!((w) & (1ULL << 1))) + (!!((w) & (1ULL << 2))) + (!!((w) & (1ULL << 3))) + (!!((w) & (1ULL << 4))) + (!!((w) & (1ULL << 5))) + (!!((w) & (1ULL << 6))) + (!!((w) & (1ULL << 7))) ) + ( (!!(((w) >> 8) & (1ULL << 0))) + (!!(((w) >> 8) & (1ULL << 1))) + (!!(((w) >> 8) & (1ULL << 2))) + (!!(((w) >> 8) & (1ULL << 3))) + (!!(((w) >> 8) & (1ULL << 4))) + (!!(((w) >> 8) & (1ULL << 5))) + (!!(((w) >> 8) & (1ULL << 6))) + (!!(((w) >> 8) & (1ULL << 7))) )) + (( (!!(((w) >> 16) & (1ULL << 0))) + (!!(((w) >> 16) & (1ULL << 1))) + (!!(((w) >> 16) & (1ULL << 2))) + (!!(((w) >> 16) & (1ULL << 3))) + (!!(((w) >> 16) & (1ULL << 4))) + (!!(((w) >> 16) & (1ULL << 5))) + (!!(((w) >> 16) & (1ULL << 6))) + (!!(((w) >> 16) & (1ULL << 7))) ) + ( (!!((((w) >> 16) >> 8) & (1ULL << 0))) + (!!((((w) >> 16) >> 8) & (1ULL << 1))) + (!!((((w) >> 16) >> 8) & (1ULL << 2))) + (!!((((w) >> 16) >> 8) & (1ULL << 3))) + (!!((((w) >> 16) >> 8) & (1ULL << 4))) + (!!((((w) >> 16) >> 8) & (1ULL << 5))) + (!!((((w) >> 16) >> 8) & (1ULL << 6))) + (!!((((w) >> 16) >> 8) & (1ULL << 7))) ))) + ((( (!!(((w) >> 32) & (1ULL << 0))) + (!!(((w) >> 32) & (1ULL << 1))) + (!!(((w) >> 32) & (1ULL << 2))) + (!!(((w) >> 32) & (1ULL << 3))) + (!!(((w) >> 32) & (1ULL << 4))) + (!!(((w) >> 32) & (1ULL << 5))) + (!!(((w) >> 32) & (1ULL << 6))) + (!!(((w) >> 32) & (1ULL << 7))) ) + ( (!!((((w) >> 32) >> 8) & (1ULL << 0))) + (!!((((w) >> 32) >> 8) & (1ULL << 1))) + (!!((((w) >> 32) >> 8) & (1ULL << 2))) + (!!((((w) >> 32) >> 8) & (1ULL << 3))) + (!!((((w) >> 32) >> 8) & (1ULL << 4))) + (!!((((w) >> 32) >> 8) & (1ULL << 5))) + (!!((((w) >> 32) >> 8) & (1ULL << 6))) + (!!((((w) >> 32) >> 8) & (1ULL << 7))) )) + (( (!!((((w) >> 32) >> 16) & (1ULL << 0))) + (!!((((w) >> 32) >> 16) & (1ULL << 1))) + (!!((((w) >> 32) >> 16) & (1ULL << 2))) + (!!((((w) >> 32) >> 16) & (1ULL << 3))) + (!!((((w) >> 32) >> 16) & (1ULL << 4))) + (!!((((w) >> 32) >> 16) & (1ULL << 5))) + (!!((((w) >> 32) >> 16) & (1ULL << 6))) + (!!((((w) >> 32) >> 16) & (1ULL << 7))) ) + ( (!!(((((w) >> 32) >> 16) >> 8) & (1ULL << 0))) + (!!(((((w) >> 32) >> 16) >> 8) & (1ULL << 1))) + (!!(((((w) >> 32) >> 16) >> 8) & (1ULL << 2))) + (!!(((((w) >> 32) >> 16) >> 8) & (1ULL << 3))) + (!!(((((w) >> 32) >> 16) >> 8) & (1ULL << 4))) + (!!(((((w) >> 32) >> 16) >> 8) & (1ULL << 5))) + (!!(((((w) >> 32) >> 16) >> 8) & (1ULL << 6))) + (!!(((((w) >> 32) >> 16) >> 8) & (1ULL << 7))) )))) : __arch_hweight64(w)); +} +static inline __attribute__((always_inline)) __u32 rol32(__u32 word, unsigned int shift) +{ + return (word << shift) | (word >> (32 - shift)); +} +static inline __attribute__((always_inline)) __u32 ror32(__u32 word, unsigned int shift) +{ + return (word >> shift) | (word << (32 - shift)); +} +static inline __attribute__((always_inline)) __u16 rol16(__u16 word, unsigned int shift) +{ + return (word << shift) | (word >> (16 - shift)); +} +static inline __attribute__((always_inline)) __u16 ror16(__u16 word, unsigned int shift) +{ + return (word >> shift) | (word << (16 - shift)); +} +static inline __attribute__((always_inline)) __u8 rol8(__u8 word, unsigned int shift) +{ + return (word << shift) | (word >> (8 - shift)); +} +static inline __attribute__((always_inline)) __u8 ror8(__u8 word, unsigned int shift) +{ + return (word >> shift) | (word << (8 - shift)); +} +static inline __attribute__((always_inline)) __s32 sign_extend32(__u32 value, int index) +{ + __u8 shift = 31 - index; + return (__s32)(value << shift) >> shift; +} +static inline __attribute__((always_inline)) unsigned fls_long(unsigned long l) +{ + if (__builtin_constant_p(((sizeof(l) == 4))) ? !!((sizeof(l) == 4)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bitops.h", .line = 125, }; ______r = !!((sizeof(l) == 4)); ______f.miss_hit[______r]++; ______r; })) + return fls(l); + return fls64(l); +} +static inline __attribute__((always_inline)) unsigned long __ffs64(u64 word) +{ + if (__builtin_constant_p(((((u32)word) == 0UL))) ? !!((((u32)word) == 0UL)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bitops.h", .line = 141, }; ______r = !!((((u32)word) == 0UL)); ______f.miss_hit[______r]++; ______r; })) + return __ffs((u32)(word >> 32)) + 32; + return __ffs((unsigned long)word); +} +extern unsigned long find_last_bit(const unsigned long *addr, + unsigned long size); +extern unsigned int __VMALLOC_RESERVE; +extern int sysctl_legacy_va_layout; +extern void find_low_pfn_range(void); +extern void setup_bootmem_allocator(void); +extern int devmem_is_allowed(unsigned long pagenr); +extern unsigned long max_low_pfn_mapped; +extern unsigned long max_pfn_mapped; +static inline __attribute__((always_inline)) phys_addr_t get_max_mapped(void) +{ + return (phys_addr_t)max_pfn_mapped << 12; +} +extern unsigned long init_memory_mapping(unsigned long start, + unsigned long end); +extern void initmem_init(void); +extern void free_initmem(void); +typedef __builtin_va_list __gnuc_va_list; +typedef __gnuc_va_list va_list; +extern char *strndup_user(const char *, long); +extern void *memdup_user(const void *, size_t); +extern char *strcpy(char *dest, const char *src); +extern char *strncpy(char *dest, const char *src, size_t count); +extern char *strcat(char *dest, const char *src); +extern char *strncat(char *dest, const char *src, size_t count); +extern int strcmp(const char *cs, const char *ct); +extern int strncmp(const char *cs, const char *ct, size_t count); +extern char *strchr(const char *s, int c); +extern size_t strlen(const char *s); +static inline __attribute__((always_inline)) __attribute__((always_inline)) void *__memcpy(void *to, const void *from, size_t n) +{ + int d0, d1, d2; + asm volatile("rep ; movsl\n\t" + "movl %4,%%ecx\n\t" + "andl $3,%%ecx\n\t" + "jz 1f\n\t" + "rep ; movsb\n\t" + "1:" + : "=&c" (d0), "=&D" (d1), "=&S" (d2) + : "0" (n / 4), "g" (n), "1" ((long)to), "2" ((long)from) + : "memory"); + return to; +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) void *__constant_memcpy(void *to, const void *from, + size_t n) +{ + long esi, edi; + if (__builtin_constant_p(((!n))) ? !!((!n)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/string_32.h", .line = 55, }; ______r = !!((!n)); ______f.miss_hit[______r]++; ______r; })) + return to; + switch (n) { + case 1: + *(char *)to = *(char *)from; + return to; + case 2: + *(short *)to = *(short *)from; + return to; + case 4: + *(int *)to = *(int *)from; + return to; + case 3: + *(short *)to = *(short *)from; + *((char *)to + 2) = *((char *)from + 2); + return to; + case 5: + *(int *)to = *(int *)from; + *((char *)to + 4) = *((char *)from + 4); + return to; + case 6: + *(int *)to = *(int *)from; + *((short *)to + 2) = *((short *)from + 2); + return to; + case 8: + *(int *)to = *(int *)from; + *((int *)to + 1) = *((int *)from + 1); + return to; + } + esi = (long)from; + edi = (long)to; + if (__builtin_constant_p(((n >= 5 * 4))) ? !!((n >= 5 * 4)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/string_32.h", .line = 88, }; ______r = !!((n >= 5 * 4)); ______f.miss_hit[______r]++; ______r; })) { + int ecx; + asm volatile("rep ; movsl" + : "=&c" (ecx), "=&D" (edi), "=&S" (esi) + : "0" (n / 4), "1" (edi), "2" (esi) + : "memory" + ); + } else { + if (__builtin_constant_p(((n >= 4 * 4))) ? !!((n >= 4 * 4)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/string_32.h", .line = 98, }; ______r = !!((n >= 4 * 4)); ______f.miss_hit[______r]++; ______r; })) + asm volatile("movsl" + : "=&D"(edi), "=&S"(esi) + : "0"(edi), "1"(esi) + : "memory"); + if (__builtin_constant_p(((n >= 3 * 4))) ? !!((n >= 3 * 4)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/string_32.h", .line = 103, }; ______r = !!((n >= 3 * 4)); ______f.miss_hit[______r]++; ______r; })) + asm volatile("movsl" + : "=&D"(edi), "=&S"(esi) + : "0"(edi), "1"(esi) + : "memory"); + if (__builtin_constant_p(((n >= 2 * 4))) ? !!((n >= 2 * 4)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/string_32.h", .line = 108, }; ______r = !!((n >= 2 * 4)); ______f.miss_hit[______r]++; ______r; })) + asm volatile("movsl" + : "=&D"(edi), "=&S"(esi) + : "0"(edi), "1"(esi) + : "memory"); + if (__builtin_constant_p(((n >= 1 * 4))) ? !!((n >= 1 * 4)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/string_32.h", .line = 113, }; ______r = !!((n >= 1 * 4)); ______f.miss_hit[______r]++; ______r; })) + asm volatile("movsl" + : "=&D"(edi), "=&S"(esi) + : "0"(edi), "1"(esi) + : "memory"); + } + switch (n % 4) { + case 0: + return to; + case 1: + asm volatile("movsb" + : "=&D"(edi), "=&S"(esi) + : "0"(edi), "1"(esi) + : "memory"); + return to; + case 2: + asm volatile("movsw" + : "=&D"(edi), "=&S"(esi) + : "0"(edi), "1"(esi) + : "memory"); + return to; + default: + asm volatile("movsw\n\tmovsb" + : "=&D"(edi), "=&S"(esi) + : "0"(edi), "1"(esi) + : "memory"); + return to; + } +} +void *memmove(void *dest, const void *src, size_t n); +extern void *memchr(const void *cs, int c, size_t count); +static inline __attribute__((always_inline)) void *__memset_generic(void *s, char c, size_t count) +{ + int d0, d1; + asm volatile("rep\n\t" + "stosb" + : "=&c" (d0), "=&D" (d1) + : "a" (c), "1" (s), "0" (count) + : "memory"); + return s; +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) +void *__constant_c_memset(void *s, unsigned long c, size_t count) +{ + int d0, d1; + asm volatile("rep ; stosl\n\t" + "testb $2,%b3\n\t" + "je 1f\n\t" + "stosw\n" + "1:\ttestb $1,%b3\n\t" + "je 2f\n\t" + "stosb\n" + "2:" + : "=&c" (d0), "=&D" (d1) + : "a" (c), "q" (count), "0" (count/4), "1" ((long)s) + : "memory"); + return s; +} +extern size_t strnlen(const char *s, size_t count); +extern char *strstr(const char *cs, const char *ct); +static inline __attribute__((always_inline)) __attribute__((always_inline)) +void *__constant_c_and_count_memset(void *s, unsigned long pattern, + size_t count) +{ + switch (count) { + case 0: + return s; + case 1: + *(unsigned char *)s = pattern & 0xff; + return s; + case 2: + *(unsigned short *)s = pattern & 0xffff; + return s; + case 3: + *(unsigned short *)s = pattern & 0xffff; + *((unsigned char *)s + 2) = pattern & 0xff; + return s; + case 4: + *(unsigned long *)s = pattern; + return s; + } + { + int d0, d1; + unsigned long eax = pattern; + switch (count % 4) { + case 0: + asm volatile("rep ; stosl" "" : "=&c" (d0), "=&D" (d1) : "a" (eax), "0" (count/4), "1" ((long)s) : "memory"); + return s; + case 1: + asm volatile("rep ; stosl" "\n\tstosb" : "=&c" (d0), "=&D" (d1) : "a" (eax), "0" (count/4), "1" ((long)s) : "memory"); + return s; + case 2: + asm volatile("rep ; stosl" "\n\tstosw" : "=&c" (d0), "=&D" (d1) : "a" (eax), "0" (count/4), "1" ((long)s) : "memory"); + return s; + default: + asm volatile("rep ; stosl" "\n\tstosw\n\tstosb" : "=&c" (d0), "=&D" (d1) : "a" (eax), "0" (count/4), "1" ((long)s) : "memory"); + return s; + } + } +} +extern void *memscan(void *addr, int c, size_t size); +size_t strlcpy(char *, const char *, size_t); +extern size_t strlcat(char *, const char *, __kernel_size_t); +extern int strnicmp(const char *, const char *, __kernel_size_t); +extern int strcasecmp(const char *s1, const char *s2); +extern int strncasecmp(const char *s1, const char *s2, size_t n); +extern char * strnchr(const char *, size_t, int); +extern char * strrchr(const char *,int); +extern char * __attribute__((warn_unused_result)) skip_spaces(const char *); +extern char *strim(char *); +static inline __attribute__((always_inline)) __attribute__((warn_unused_result)) char *strstrip(char *str) +{ + return strim(str); +} +extern char * strnstr(const char *, const char *, size_t); +extern char * strpbrk(const char *,const char *); +extern char * strsep(char **,const char *); +extern __kernel_size_t strspn(const char *,const char *); +extern __kernel_size_t strcspn(const char *,const char *); +extern int __builtin_memcmp(const void *,const void *,__kernel_size_t); +extern char *kstrdup(const char *s, gfp_t gfp); +extern char *kstrndup(const char *s, size_t len, gfp_t gfp); +extern void *kmemdup(const void *src, size_t len, gfp_t gfp); +extern char **argv_split(gfp_t gfp, const char *str, int *argcp); +extern void argv_free(char **argv); +extern bool sysfs_streq(const char *s1, const char *s2); +extern int strtobool(const char *s, bool *res); +int vbin_printf(u32 *bin_buf, size_t size, const char *fmt, va_list args); +int bstr_printf(char *buf, size_t size, const char *fmt, const u32 *bin_buf); +int bprintf(u32 *bin_buf, size_t size, const char *fmt, ...) __attribute__((format(printf,3,4))); +extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos, + const void *from, size_t available); +static inline __attribute__((always_inline)) bool strstarts(const char *str, const char *prefix) +{ + return strncmp(str, prefix, strlen(prefix)) == 0; +} +static inline __attribute__((always_inline)) void clear_page(void *page) +{ + __builtin_memset(page, 0, ((1UL) << 12)); +} +static inline __attribute__((always_inline)) void copy_page(void *to, void *from) +{ + __builtin_memcpy(to, from, ((1UL) << 12)); +} +struct page; +static inline __attribute__((always_inline)) void clear_user_page(void *page, unsigned long vaddr, + struct page *pg) +{ + clear_page(page); +} +static inline __attribute__((always_inline)) void copy_user_page(void *to, void *from, unsigned long vaddr, + struct page *topage) +{ + copy_page(to, from); +} +extern bool __virt_addr_valid(unsigned long kaddr); +static inline __attribute__((always_inline)) __attribute__((__const__)) int get_order(unsigned long size) +{ + int order; + size = (size - 1) >> (12 - 1); + order = -1; + do { + size >>= 1; + order++; + } while (size); + return order; +} +struct task_struct; +struct exec_domain; +struct task_struct; +struct mm_struct; +struct vm86_regs { + long ebx; + long ecx; + long edx; + long esi; + long edi; + long ebp; + long eax; + long __null_ds; + long __null_es; + long __null_fs; + long __null_gs; + long orig_eax; + long eip; + unsigned short cs, __csh; + long eflags; + long esp; + unsigned short ss, __ssh; + unsigned short es, __esh; + unsigned short ds, __dsh; + unsigned short fs, __fsh; + unsigned short gs, __gsh; +}; +struct revectored_struct { + unsigned long __map[8]; +}; +struct vm86_struct { + struct vm86_regs regs; + unsigned long flags; + unsigned long screen_bitmap; + unsigned long cpu_type; + struct revectored_struct int_revectored; + struct revectored_struct int21_revectored; +}; +struct vm86plus_info_struct { + unsigned long force_return_for_pic:1; + unsigned long vm86dbg_active:1; + unsigned long vm86dbg_TFpendig:1; + unsigned long unused:28; + unsigned long is_vm86pus:1; + unsigned char vm86dbg_intxxtab[32]; +}; +struct vm86plus_struct { + struct vm86_regs regs; + unsigned long flags; + unsigned long screen_bitmap; + unsigned long cpu_type; + struct revectored_struct int_revectored; + struct revectored_struct int21_revectored; + struct vm86plus_info_struct vm86plus; +}; +extern const char early_idt_handlers[32][10]; +struct pt_regs { + unsigned long bx; + unsigned long cx; + unsigned long dx; + unsigned long si; + unsigned long di; + unsigned long bp; + unsigned long ax; + unsigned long ds; + unsigned long es; + unsigned long fs; + unsigned long gs; + unsigned long orig_ax; + unsigned long ip; + unsigned long cs; + unsigned long flags; + unsigned long sp; + unsigned long ss; +}; +typedef int (*initcall_t)(void); +typedef void (*exitcall_t)(void); +extern initcall_t __con_initcall_start[], __con_initcall_end[]; +extern initcall_t __security_initcall_start[], __security_initcall_end[]; +typedef void (*ctor_fn_t)(void); +extern int do_one_initcall(initcall_t fn); +extern char __attribute__ ((__section__(".init.data"))) boot_command_line[]; +extern char *saved_command_line; +extern unsigned int reset_devices; +void setup_arch(char **); +void prepare_namespace(void); +extern void (*late_time_init)(void); +extern int initcall_debug; +struct cpuinfo_x86; +struct task_struct; +extern unsigned long profile_pc(struct pt_regs *regs); +extern unsigned long +convert_ip_to_linear(struct task_struct *child, struct pt_regs *regs); +extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, + int error_code, int si_code); +void signal_fault(struct pt_regs *regs, void *frame, char *where); +extern long syscall_trace_enter(struct pt_regs *); +extern void syscall_trace_leave(struct pt_regs *); +static inline __attribute__((always_inline)) unsigned long regs_return_value(struct pt_regs *regs) +{ + return regs->ax; +} +static inline __attribute__((always_inline)) int user_mode(struct pt_regs *regs) +{ + return (regs->cs & 0x3) == 0x3; +} +static inline __attribute__((always_inline)) int user_mode_vm(struct pt_regs *regs) +{ + return ((regs->cs & 0x3) | (regs->flags & 0x00020000)) >= + 0x3; +} +static inline __attribute__((always_inline)) int v8086_mode(struct pt_regs *regs) +{ + return (regs->flags & 0x00020000); +} +static inline __attribute__((always_inline)) unsigned long kernel_stack_pointer(struct pt_regs *regs) +{ + return (unsigned long)(®s->sp); +} +static inline __attribute__((always_inline)) unsigned long instruction_pointer(struct pt_regs *regs) +{ + return ((regs)->ip); +} +static inline __attribute__((always_inline)) void instruction_pointer_set(struct pt_regs *regs, + unsigned long val) +{ + (((regs)->ip) = (val)); +} +static inline __attribute__((always_inline)) unsigned long user_stack_pointer(struct pt_regs *regs) +{ + return ((regs)->sp); +} +static inline __attribute__((always_inline)) void user_stack_pointer_set(struct pt_regs *regs, + unsigned long val) +{ + (((regs)->sp) = (val)); +} +static inline __attribute__((always_inline)) unsigned long frame_pointer(struct pt_regs *regs) +{ + return ((regs)->bp); +} +static inline __attribute__((always_inline)) void frame_pointer_set(struct pt_regs *regs, + unsigned long val) +{ + (((regs)->bp) = (val)); +} +extern int regs_query_register_offset(const char *name); +extern const char *regs_query_register_name(unsigned int offset); +static inline __attribute__((always_inline)) unsigned long regs_get_register(struct pt_regs *regs, + unsigned int offset) +{ + if (__builtin_constant_p((((__builtin_constant_p(offset > (__builtin_offsetof(struct pt_regs,ss))) ? !!(offset > (__builtin_offsetof(struct pt_regs,ss))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/ptrace.h", .line = 229, }; ______r = __builtin_expect(!!(offset > (__builtin_offsetof(struct pt_regs,ss))), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(offset > (__builtin_offsetof(struct pt_regs,ss))) ? !!(offset > (__builtin_offsetof(struct pt_regs,ss))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/ptrace.h", .line = 229, }; ______r = __builtin_expect(!!(offset > (__builtin_offsetof(struct pt_regs,ss))), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/ptrace.h", .line = 229, }; ______r = !!(((__builtin_constant_p(offset > (__builtin_offsetof(struct pt_regs,ss))) ? !!(offset > (__builtin_offsetof(struct pt_regs,ss))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/ptrace.h", .line = 229, }; ______r = __builtin_expect(!!(offset > (__builtin_offsetof(struct pt_regs,ss))), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + return 0; + return *(unsigned long *)((unsigned long)regs + offset); +} +static inline __attribute__((always_inline)) int regs_within_kernel_stack(struct pt_regs *regs, + unsigned long addr) +{ + return ((addr & ~((((1UL) << 12) << 1) - 1)) == + (kernel_stack_pointer(regs) & ~((((1UL) << 12) << 1) - 1))); +} +static inline __attribute__((always_inline)) unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, + unsigned int n) +{ + unsigned long *addr = (unsigned long *)kernel_stack_pointer(regs); + addr += n; + if (__builtin_constant_p(((regs_within_kernel_stack(regs, (unsigned long)addr)))) ? !!((regs_within_kernel_stack(regs, (unsigned long)addr))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/ptrace.h", .line = 263, }; ______r = !!((regs_within_kernel_stack(regs, (unsigned long)addr))); ______f.miss_hit[______r]++; ______r; })) + return *addr; + else + return 0; +} +struct user_desc; +extern int do_get_thread_area(struct task_struct *p, int idx, + struct user_desc *info); +extern int do_set_thread_area(struct task_struct *p, int idx, + struct user_desc *info, int can_allocate); +struct kernel_vm86_regs { + struct pt_regs pt; + unsigned short es, __esh; + unsigned short ds, __dsh; + unsigned short fs, __fsh; + unsigned short gs, __gsh; +}; +struct kernel_vm86_struct { + struct kernel_vm86_regs regs; + unsigned long flags; + unsigned long screen_bitmap; + unsigned long cpu_type; + struct revectored_struct int_revectored; + struct revectored_struct int21_revectored; + struct vm86plus_info_struct vm86plus; + struct pt_regs *regs32; +}; +void handle_vm86_fault(struct kernel_vm86_regs *, long); +int handle_vm86_trap(struct kernel_vm86_regs *, long, int); +struct pt_regs *save_v86_state(struct kernel_vm86_regs *); +struct task_struct; +void release_vm86_irqs(struct task_struct *); +struct math_emu_info { + long ___orig_eip; + union { + struct pt_regs *regs; + struct kernel_vm86_regs *vm86; + }; +}; +struct _fpx_sw_bytes { + __u32 magic1; + __u32 extended_size; + __u64 xstate_bv; + __u32 xstate_size; + __u32 padding[7]; +}; +struct _fpreg { + unsigned short significand[4]; + unsigned short exponent; +}; +struct _fpxreg { + unsigned short significand[4]; + unsigned short exponent; + unsigned short padding[3]; +}; +struct _xmmreg { + unsigned long element[4]; +}; +struct _fpstate { + unsigned long cw; + unsigned long sw; + unsigned long tag; + unsigned long ipoff; + unsigned long cssel; + unsigned long dataoff; + unsigned long datasel; + struct _fpreg _st[8]; + unsigned short status; + unsigned short magic; + unsigned long _fxsr_env[6]; + unsigned long mxcsr; + unsigned long reserved; + struct _fpxreg _fxsr_st[8]; + struct _xmmreg _xmm[8]; + unsigned long padding1[44]; + union { + unsigned long padding2[12]; + struct _fpx_sw_bytes sw_reserved; + }; +}; +struct sigcontext { + unsigned short gs, __gsh; + unsigned short fs, __fsh; + unsigned short es, __esh; + unsigned short ds, __dsh; + unsigned long di; + unsigned long si; + unsigned long bp; + unsigned long sp; + unsigned long bx; + unsigned long dx; + unsigned long cx; + unsigned long ax; + unsigned long trapno; + unsigned long err; + unsigned long ip; + unsigned short cs, __csh; + unsigned long flags; + unsigned long sp_at_signal; + unsigned short ss, __ssh; + void *fpstate; + unsigned long oldmask; + unsigned long cr2; +}; +struct _xsave_hdr { + __u64 xstate_bv; + __u64 reserved1[2]; + __u64 reserved2[5]; +}; +struct _ymmh_state { + __u32 ymmh_space[64]; +}; +struct _xstate { + struct _fpstate fpstate; + struct _xsave_hdr xstate_hdr; + struct _ymmh_state ymmh; +}; +extern __attribute__((const, noreturn)) +int ____ilog2_NaN(void); +static inline __attribute__((always_inline)) __attribute__((const)) +int __ilog2_u32(u32 n) +{ + return fls(n) - 1; +} +static inline __attribute__((always_inline)) __attribute__((const)) +int __ilog2_u64(u64 n) +{ + return fls64(n) - 1; +} +static inline __attribute__((always_inline)) __attribute__((const)) +bool is_power_of_2(unsigned long n) +{ + return (n != 0 && ((n & (n - 1)) == 0)); +} +static inline __attribute__((always_inline)) __attribute__((const)) +unsigned long __roundup_pow_of_two(unsigned long n) +{ + return 1UL << fls_long(n - 1); +} +static inline __attribute__((always_inline)) __attribute__((const)) +unsigned long __rounddown_pow_of_two(unsigned long n) +{ + return 1UL << (fls_long(n) - 1); +} +extern const char linux_banner[]; +extern const char linux_proc_banner[]; +extern int console_printk[]; +static inline __attribute__((always_inline)) void console_silent(void) +{ + (console_printk[0]) = 0; +} +static inline __attribute__((always_inline)) void console_verbose(void) +{ + if (__builtin_constant_p((((console_printk[0])))) ? !!(((console_printk[0]))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/printk.h", .line = 41, }; ______r = !!(((console_printk[0]))); ______f.miss_hit[______r]++; ______r; })) + (console_printk[0]) = 15; +} +struct va_format { + const char *fmt; + va_list *va; +}; +static inline __attribute__((always_inline)) __attribute__ ((format (printf, 1, 2))) +int no_printk(const char *fmt, ...) +{ + return 0; +} +extern __attribute__((regparm(0))) __attribute__ ((format (printf, 1, 2))) +void early_printk(const char *fmt, ...); +extern int printk_needs_cpu(int cpu); +extern void printk_tick(void); + __attribute__((regparm(0))) __attribute__ ((format (printf, 1, 0))) +int vprintk(const char *fmt, va_list args); + __attribute__((regparm(0))) __attribute__ ((format (printf, 1, 2))) __attribute__((__cold__)) +int printk(const char *fmt, ...); +extern int __printk_ratelimit(const char *func); +extern bool printk_timed_ratelimit(unsigned long *caller_jiffies, + unsigned int interval_msec); +extern int printk_delay_msec; +extern int dmesg_restrict; +extern int kptr_restrict; +void log_buf_kexec_setup(void); +void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) setup_log_buf(int early); +extern void dump_stack(void) __attribute__((__cold__)); +enum { + DUMP_PREFIX_NONE, + DUMP_PREFIX_ADDRESS, + DUMP_PREFIX_OFFSET +}; +extern void hex_dump_to_buffer(const void *buf, size_t len, + int rowsize, int groupsize, + char *linebuf, size_t linebuflen, bool ascii); +extern void print_hex_dump(const char *level, const char *prefix_str, + int prefix_type, int rowsize, int groupsize, + const void *buf, size_t len, bool ascii); +extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type, + const void *buf, size_t len); +extern long long dynamic_debug_enabled; +extern long long dynamic_debug_enabled2; +struct _ddebug { + const char *modname; + const char *function; + const char *filename; + const char *format; + unsigned int lineno:24; + unsigned int flags:8; + char enabled; +} __attribute__((aligned(8))); +int ddebug_add_module(struct _ddebug *tab, unsigned int n, + const char *modname); +static inline __attribute__((always_inline)) int ddebug_remove_module(const char *mod) +{ + return 0; +} +struct bug_entry { + unsigned long bug_addr; + const char *file; + unsigned short line; + unsigned short flags; +}; +extern void warn_slowpath_fmt(const char *file, const int line, + const char *fmt, ...) __attribute__((format(printf, 3, 4))); +extern void warn_slowpath_fmt_taint(const char *file, const int line, + unsigned taint, const char *fmt, ...) + __attribute__((format(printf, 4, 5))); +extern void warn_slowpath_null(const char *file, const int line); +static inline __attribute__((always_inline)) u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder) +{ + union { + u64 v64; + u32 v32[2]; + } d = { dividend }; + u32 upper; + upper = d.v32[1]; + d.v32[1] = 0; + if (__builtin_constant_p(((upper >= divisor))) ? !!((upper >= divisor)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/div64.h", .line = 46, }; ______r = !!((upper >= divisor)); ______f.miss_hit[______r]++; ______r; })) { + d.v32[1] = upper / divisor; + upper %= divisor; + } + asm ("divl %2" : "=a" (d.v32[0]), "=d" (*remainder) : + "rm" (divisor), "0" (d.v32[0]), "1" (upper)); + return d.v64; +} +struct completion; +struct pt_regs; +struct user; + void __might_sleep(const char *file, int line, int preempt_offset); +void might_fault(void); +extern struct atomic_notifier_head panic_notifier_list; +extern long (*panic_blink)(int state); + void panic(const char * fmt, ...) + __attribute__ ((noreturn, format (printf, 1, 2))) __attribute__((__cold__)); +extern void oops_enter(void); +extern void oops_exit(void); +void print_oops_end_marker(void); +extern int oops_may_print(void); + void do_exit(long error_code) + __attribute__((noreturn)); + void complete_and_exit(struct completion *, long) + __attribute__((noreturn)); +int __attribute__((warn_unused_result)) _kstrtoul(const char *s, unsigned int base, unsigned long *res); +int __attribute__((warn_unused_result)) _kstrtol(const char *s, unsigned int base, long *res); +int __attribute__((warn_unused_result)) kstrtoull(const char *s, unsigned int base, unsigned long long *res); +int __attribute__((warn_unused_result)) kstrtoll(const char *s, unsigned int base, long long *res); +static inline __attribute__((always_inline)) int __attribute__((warn_unused_result)) kstrtoul(const char *s, unsigned int base, unsigned long *res) +{ + if (__builtin_constant_p(((sizeof(unsigned long) == sizeof(unsigned long long) && __alignof__(unsigned long) == __alignof__(unsigned long long)))) ? !!((sizeof(unsigned long) == sizeof(unsigned long long) && __alignof__(unsigned long) == __alignof__(unsigned long long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/linux/kernel.h" + , .line = + 204 + , }; ______r = !!((sizeof(unsigned long) == sizeof(unsigned long long) && __alignof__(unsigned long) == __alignof__(unsigned long long))); ______f.miss_hit[______r]++; ______r; })) + return kstrtoull(s, base, (unsigned long long *)res); + else + return _kstrtoul(s, base, res); +} +static inline __attribute__((always_inline)) int __attribute__((warn_unused_result)) kstrtol(const char *s, unsigned int base, long *res) +{ + if (__builtin_constant_p(((sizeof(long) == sizeof(long long) && __alignof__(long) == __alignof__(long long)))) ? !!((sizeof(long) == sizeof(long long) && __alignof__(long) == __alignof__(long long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/linux/kernel.h" + , .line = + 217 + , }; ______r = !!((sizeof(long) == sizeof(long long) && __alignof__(long) == __alignof__(long long))); ______f.miss_hit[______r]++; ______r; })) + return kstrtoll(s, base, (long long *)res); + else + return _kstrtol(s, base, res); +} +int __attribute__((warn_unused_result)) kstrtouint(const char *s, unsigned int base, unsigned int *res); +int __attribute__((warn_unused_result)) kstrtoint(const char *s, unsigned int base, int *res); +static inline __attribute__((always_inline)) int __attribute__((warn_unused_result)) kstrtou64(const char *s, unsigned int base, u64 *res) +{ + return kstrtoull(s, base, res); +} +static inline __attribute__((always_inline)) int __attribute__((warn_unused_result)) kstrtos64(const char *s, unsigned int base, s64 *res) +{ + return kstrtoll(s, base, res); +} +static inline __attribute__((always_inline)) int __attribute__((warn_unused_result)) kstrtou32(const char *s, unsigned int base, u32 *res) +{ + return kstrtouint(s, base, res); +} +static inline __attribute__((always_inline)) int __attribute__((warn_unused_result)) kstrtos32(const char *s, unsigned int base, s32 *res) +{ + return kstrtoint(s, base, res); +} +int __attribute__((warn_unused_result)) kstrtou16(const char *s, unsigned int base, u16 *res); +int __attribute__((warn_unused_result)) kstrtos16(const char *s, unsigned int base, s16 *res); +int __attribute__((warn_unused_result)) kstrtou8(const char *s, unsigned int base, u8 *res); +int __attribute__((warn_unused_result)) kstrtos8(const char *s, unsigned int base, s8 *res); +int __attribute__((warn_unused_result)) kstrtoull_from_user(const char *s, size_t count, unsigned int base, unsigned long long *res); +int __attribute__((warn_unused_result)) kstrtoll_from_user(const char *s, size_t count, unsigned int base, long long *res); +int __attribute__((warn_unused_result)) kstrtoul_from_user(const char *s, size_t count, unsigned int base, unsigned long *res); +int __attribute__((warn_unused_result)) kstrtol_from_user(const char *s, size_t count, unsigned int base, long *res); +int __attribute__((warn_unused_result)) kstrtouint_from_user(const char *s, size_t count, unsigned int base, unsigned int *res); +int __attribute__((warn_unused_result)) kstrtoint_from_user(const char *s, size_t count, unsigned int base, int *res); +int __attribute__((warn_unused_result)) kstrtou16_from_user(const char *s, size_t count, unsigned int base, u16 *res); +int __attribute__((warn_unused_result)) kstrtos16_from_user(const char *s, size_t count, unsigned int base, s16 *res); +int __attribute__((warn_unused_result)) kstrtou8_from_user(const char *s, size_t count, unsigned int base, u8 *res); +int __attribute__((warn_unused_result)) kstrtos8_from_user(const char *s, size_t count, unsigned int base, s8 *res); +static inline __attribute__((always_inline)) int __attribute__((warn_unused_result)) kstrtou64_from_user(const char *s, size_t count, unsigned int base, u64 *res) +{ + return kstrtoull_from_user(s, count, base, res); +} +static inline __attribute__((always_inline)) int __attribute__((warn_unused_result)) kstrtos64_from_user(const char *s, size_t count, unsigned int base, s64 *res) +{ + return kstrtoll_from_user(s, count, base, res); +} +static inline __attribute__((always_inline)) int __attribute__((warn_unused_result)) kstrtou32_from_user(const char *s, size_t count, unsigned int base, u32 *res) +{ + return kstrtouint_from_user(s, count, base, res); +} +static inline __attribute__((always_inline)) int __attribute__((warn_unused_result)) kstrtos32_from_user(const char *s, size_t count, unsigned int base, s32 *res) +{ + return kstrtoint_from_user(s, count, base, res); +} +extern unsigned long simple_strtoul(const char *,char **,unsigned int); +extern long simple_strtol(const char *,char **,unsigned int); +extern unsigned long long simple_strtoull(const char *,char **,unsigned int); +extern long long simple_strtoll(const char *,char **,unsigned int); +extern int sprintf(char * buf, const char * fmt, ...) + __attribute__ ((format (printf, 2, 3))); +extern int vsprintf(char *buf, const char *, va_list) + __attribute__ ((format (printf, 2, 0))); +extern int snprintf(char * buf, size_t size, const char * fmt, ...) + __attribute__ ((format (printf, 3, 4))); +extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) + __attribute__ ((format (printf, 3, 0))); +extern int scnprintf(char * buf, size_t size, const char * fmt, ...) + __attribute__ ((format (printf, 3, 4))); +extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args) + __attribute__ ((format (printf, 3, 0))); +extern char *kasprintf(gfp_t gfp, const char *fmt, ...) + __attribute__ ((format (printf, 2, 3))); +extern char *kvasprintf(gfp_t gfp, const char *fmt, va_list args); +extern int sscanf(const char *, const char *, ...) + __attribute__ ((format (scanf, 2, 3))); +extern int vsscanf(const char *, const char *, va_list) + __attribute__ ((format (scanf, 2, 0))); +extern int get_option(char **str, int *pint); +extern char *get_options(const char *str, int nints, int *ints); +extern unsigned long long memparse(const char *ptr, char **retptr); +extern int core_kernel_text(unsigned long addr); +extern int core_kernel_data(unsigned long addr); +extern int __kernel_text_address(unsigned long addr); +extern int kernel_text_address(unsigned long addr); +extern int func_ptr_is_kernel_text(void *ptr); +struct pid; +extern struct pid *session_of_pgrp(struct pid *pgrp); +unsigned long int_sqrt(unsigned long); +extern void bust_spinlocks(int yes); +extern void wake_up_klogd(void); +extern int oops_in_progress; +extern int panic_timeout; +extern int panic_on_oops; +extern int panic_on_unrecovered_nmi; +extern int panic_on_io_nmi; +extern const char *print_tainted(void); +extern void add_taint(unsigned flag); +extern int test_taint(unsigned flag); +extern unsigned long get_taint(void); +extern int root_mountflags; +extern bool early_boot_irqs_disabled; +extern enum system_states { + SYSTEM_BOOTING, + SYSTEM_RUNNING, + SYSTEM_HALT, + SYSTEM_POWER_OFF, + SYSTEM_RESTART, + SYSTEM_SUSPEND_DISK, +} system_state; +extern const char hex_asc[]; +static inline __attribute__((always_inline)) char *pack_hex_byte(char *buf, u8 byte) +{ + *buf++ = hex_asc[((byte) & 0xf0) >> 4]; + *buf++ = hex_asc[((byte) & 0x0f)]; + return buf; +} +extern int hex_to_bin(char ch); +extern void hex2bin(u8 *dst, const char *src, size_t count); +void tracing_on(void); +void tracing_off(void); +void tracing_off_permanent(void); +int tracing_is_on(void); +enum ftrace_dump_mode { + DUMP_NONE, + DUMP_ALL, + DUMP_ORIG, +}; +extern void tracing_start(void); +extern void tracing_stop(void); +extern void ftrace_off_permanent(void); +static inline __attribute__((always_inline)) void __attribute__ ((format (printf, 1, 2))) +____trace_printk_check_format(const char *fmt, ...) +{ +} +extern int +__trace_bprintk(unsigned long ip, const char *fmt, ...) + __attribute__ ((format (printf, 2, 3))); +extern int +__trace_printk(unsigned long ip, const char *fmt, ...) + __attribute__ ((format (printf, 2, 3))); +extern void trace_dump_stack(void); +extern int +__ftrace_vbprintk(unsigned long ip, const char *fmt, va_list ap); +extern int +__ftrace_vprintk(unsigned long ip, const char *fmt, va_list ap); +extern void ftrace_dump(enum ftrace_dump_mode oops_dump_mode); +struct sysinfo; +extern int do_sysinfo(struct sysinfo *info); +struct sysinfo { + long uptime; + unsigned long loads[3]; + unsigned long totalram; + unsigned long freeram; + unsigned long sharedram; + unsigned long bufferram; + unsigned long totalswap; + unsigned long freeswap; + unsigned short procs; + unsigned short pad; + unsigned long totalhigh; + unsigned long freehigh; + unsigned int mem_unit; + char _f[20-2*sizeof(long)-sizeof(int)]; +}; +extern int __build_bug_on_failed; +extern void __bad_percpu_size(void); +static inline __attribute__((always_inline)) __attribute__((always_inline)) int x86_this_cpu_constant_test_bit(unsigned int nr, + const unsigned long *addr) +{ + unsigned long *a = (unsigned long *)addr + nr / 32; + return ((1UL << (nr % 32)) & ({ typeof(*a) pfo_ret__; switch (sizeof(*a)) { case 1: asm("mov" "b ""%%""fs"":" "%P" "1"",%0" : "=q" (pfo_ret__) : "m" (*a)); break; case 2: asm("mov" "w ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m" (*a)); break; case 4: asm("mov" "l ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m" (*a)); break; case 8: asm("mov" "q ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m" (*a)); break; default: __bad_percpu_size(); } pfo_ret__; })) != 0; +} +static inline __attribute__((always_inline)) int x86_this_cpu_variable_test_bit(int nr, + const unsigned long *addr) +{ + int oldbit; + asm volatile("bt ""%%""fs"":" "%P" "2"",%1\n\t" + "sbb %0,%0" + : "=r" (oldbit) + : "m" (*(unsigned long *)addr), "Ir" (nr)); + return oldbit; +} +extern unsigned long __per_cpu_offset[8]; +extern void setup_per_cpu_areas(void); +extern __attribute__((section(".data..percpu" ""))) __typeof__(unsigned long) this_cpu_off; +struct task_struct; +extern __attribute__((section(".data..percpu" ""))) __typeof__(struct task_struct *) current_task; +static inline __attribute__((always_inline)) __attribute__((always_inline)) struct task_struct *get_current(void) +{ + return ({ typeof(current_task) pfo_ret__; switch (sizeof(current_task)) { case 1: asm("mov" "b ""%%""fs"":" "%P" "1"",%0" : "=q" (pfo_ret__) : "p" (&(current_task))); break; case 2: asm("mov" "w ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "p" (&(current_task))); break; case 4: asm("mov" "l ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "p" (&(current_task))); break; case 8: asm("mov" "q ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "p" (&(current_task))); break; default: __bad_percpu_size(); } pfo_ret__; }); +} +extern void __xchg_wrong_size(void); +static inline __attribute__((always_inline)) void set_64bit(volatile u64 *ptr, u64 value) +{ + u32 low = value; + u32 high = value >> 32; + u64 prev = *ptr; + asm volatile("\n1:\t" + ".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "cmpxchg8b %0\n\t" + "jnz 1b" + : "=m" (*ptr), "+A" (prev) + : "b" (low), "c" (high) + : "memory"); +} +extern void __cmpxchg_wrong_size(void); +static inline __attribute__((always_inline)) u64 __cmpxchg64(volatile u64 *ptr, u64 old, u64 new) +{ + u64 prev; + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "cmpxchg8b %1" + : "=A" (prev), + "+m" (*ptr) + : "b" ((u32)new), + "c" ((u32)(new >> 32)), + "0" (old) + : "memory"); + return prev; +} +static inline __attribute__((always_inline)) u64 __cmpxchg64_local(volatile u64 *ptr, u64 old, u64 new) +{ + u64 prev; + asm volatile("cmpxchg8b %1" + : "=A" (prev), + "+m" (*ptr) + : "b" ((u32)new), + "c" ((u32)(new >> 32)), + "0" (old) + : "memory"); + return prev; +} +extern const unsigned char * const *ideal_nops; +extern void arch_init_ideal_nops(void); +static inline __attribute__((always_inline)) unsigned long native_save_fl(void) +{ + unsigned long flags; + asm volatile("# __raw_save_flags\n\t" + "pushf ; pop %0" + : "=rm" (flags) + : + : "memory"); + return flags; +} +static inline __attribute__((always_inline)) void native_restore_fl(unsigned long flags) +{ + asm volatile("push %0 ; popf" + : + :"g" (flags) + :"memory", "cc"); +} +static inline __attribute__((always_inline)) void native_irq_disable(void) +{ + asm volatile("cli": : :"memory"); +} +static inline __attribute__((always_inline)) void native_irq_enable(void) +{ + asm volatile("sti": : :"memory"); +} +static inline __attribute__((always_inline)) void native_safe_halt(void) +{ + asm volatile("sti; hlt": : :"memory"); +} +static inline __attribute__((always_inline)) void native_halt(void) +{ + asm volatile("hlt": : :"memory"); +} +typedef u64 pteval_t; +typedef u64 pmdval_t; +typedef u64 pudval_t; +typedef u64 pgdval_t; +typedef u64 pgprotval_t; +typedef union { + struct { + unsigned long pte_low, pte_high; + }; + pteval_t pte; +} pte_t; +extern bool __vmalloc_start_set; +typedef struct pgprot { pgprotval_t pgprot; } pgprot_t; +typedef struct { pgdval_t pgd; } pgd_t; +static inline __attribute__((always_inline)) pgd_t native_make_pgd(pgdval_t val) +{ + return (pgd_t) { val }; +} +static inline __attribute__((always_inline)) pgdval_t native_pgd_val(pgd_t pgd) +{ + return pgd.pgd; +} +static inline __attribute__((always_inline)) pgdval_t pgd_flags(pgd_t pgd) +{ + return native_pgd_val(pgd) & (~((pteval_t)(((signed long)(~(((1UL) << 12)-1))) & ((phys_addr_t)((1ULL << 44) - 1))))); +} +typedef struct { pgd_t pgd; } pud_t; +static inline __attribute__((always_inline)) int pgd_none(pgd_t pgd) { return 0; } +static inline __attribute__((always_inline)) int pgd_bad(pgd_t pgd) { return 0; } +static inline __attribute__((always_inline)) int pgd_present(pgd_t pgd) { return 1; } +static inline __attribute__((always_inline)) void pgd_clear(pgd_t *pgd) { } +static inline __attribute__((always_inline)) pud_t * pud_offset(pgd_t * pgd, unsigned long address) +{ + return (pud_t *)pgd; +} +static inline __attribute__((always_inline)) pudval_t native_pud_val(pud_t pud) +{ + return native_pgd_val(pud.pgd); +} +typedef struct { pmdval_t pmd; } pmd_t; +static inline __attribute__((always_inline)) pmd_t native_make_pmd(pmdval_t val) +{ + return (pmd_t) { val }; +} +static inline __attribute__((always_inline)) pmdval_t native_pmd_val(pmd_t pmd) +{ + return pmd.pmd; +} +static inline __attribute__((always_inline)) pudval_t pud_flags(pud_t pud) +{ + return native_pud_val(pud) & (~((pteval_t)(((signed long)(~(((1UL) << 12)-1))) & ((phys_addr_t)((1ULL << 44) - 1))))); +} +static inline __attribute__((always_inline)) pmdval_t pmd_flags(pmd_t pmd) +{ + return native_pmd_val(pmd) & (~((pteval_t)(((signed long)(~(((1UL) << 12)-1))) & ((phys_addr_t)((1ULL << 44) - 1))))); +} +static inline __attribute__((always_inline)) pte_t native_make_pte(pteval_t val) +{ + return (pte_t) { .pte = val }; +} +static inline __attribute__((always_inline)) pteval_t native_pte_val(pte_t pte) +{ + return pte.pte; +} +static inline __attribute__((always_inline)) pteval_t pte_flags(pte_t pte) +{ + return native_pte_val(pte) & (~((pteval_t)(((signed long)(~(((1UL) << 12)-1))) & ((phys_addr_t)((1ULL << 44) - 1))))); +} +typedef struct page *pgtable_t; +extern pteval_t __supported_pte_mask; +extern void set_nx(void); +extern int nx_enabled; +extern pgprot_t pgprot_writecombine(pgprot_t prot); +struct file; +pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, + unsigned long size, pgprot_t vma_prot); +int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn, + unsigned long size, pgprot_t *vma_prot); +void set_pte_vaddr(unsigned long vaddr, pte_t pte); +extern void native_pagetable_reserve(u64 start, u64 end); +extern void native_pagetable_setup_start(pgd_t *base); +extern void native_pagetable_setup_done(pgd_t *base); +struct seq_file; +extern void arch_report_meminfo(struct seq_file *m); +enum { + PG_LEVEL_NONE, + PG_LEVEL_4K, + PG_LEVEL_2M, + PG_LEVEL_1G, + PG_LEVEL_NUM +}; +extern void update_page_count(int level, unsigned long pages); +extern pte_t *lookup_address(unsigned long address, unsigned int *level); +struct desc_struct { + union { + struct { + unsigned int a; + unsigned int b; + }; + struct { + u16 limit0; + u16 base0; + unsigned base1: 8, type: 4, s: 1, dpl: 2, p: 1; + unsigned limit: 4, avl: 1, l: 1, d: 1, g: 1, base2: 8; + }; + }; +} __attribute__((packed)); +enum { + GATE_INTERRUPT = 0xE, + GATE_TRAP = 0xF, + GATE_CALL = 0xC, + GATE_TASK = 0x5, +}; +struct gate_struct64 { + u16 offset_low; + u16 segment; + unsigned ist : 3, zero0 : 5, type : 5, dpl : 2, p : 1; + u16 offset_middle; + u32 offset_high; + u32 zero1; +} __attribute__((packed)); +enum { + DESC_TSS = 0x9, + DESC_LDT = 0x2, + DESCTYPE_S = 0x10, +}; +struct ldttss_desc64 { + u16 limit0; + u16 base0; + unsigned base1 : 8, type : 5, dpl : 2, p : 1; + unsigned limit1 : 4, zero0 : 3, g : 1, base2 : 8; + u32 base3; + u32 zero1; +} __attribute__((packed)); +typedef struct desc_struct gate_desc; +typedef struct desc_struct ldt_desc; +typedef struct desc_struct tss_desc; +struct desc_ptr { + unsigned short size; + unsigned long address; +} __attribute__((packed)) ; +enum km_type { + KM_BOUNCE_READ, + KM_SKB_SUNRPC_DATA, + KM_SKB_DATA_SOFTIRQ, + KM_USER0, + KM_USER1, + KM_BIO_SRC_IRQ, + KM_BIO_DST_IRQ, + KM_PTE0, + KM_PTE1, + KM_IRQ0, + KM_IRQ1, + KM_SOFTIRQ0, + KM_SOFTIRQ1, + KM_SYNC_ICACHE, + KM_SYNC_DCACHE, + KM_UML_USERCOPY, + KM_IRQ_PTE, + KM_NMI, + KM_NMI_PTE, + KM_KDB, + KM_TYPE_NR +}; +struct page; +struct thread_struct; +struct desc_ptr; +struct tss_struct; +struct mm_struct; +struct desc_struct; +struct task_struct; +struct cpumask; +struct paravirt_callee_save { + void *func; +}; +struct pv_info { + unsigned int kernel_rpl; + int shared_kernel_pmd; + int paravirt_enabled; + const char *name; +}; +struct pv_init_ops { + unsigned (*patch)(u8 type, u16 clobber, void *insnbuf, + unsigned long addr, unsigned len); +}; +struct pv_lazy_ops { + void (*enter)(void); + void (*leave)(void); +}; +struct pv_time_ops { + unsigned long long (*sched_clock)(void); + unsigned long (*get_tsc_khz)(void); +}; +struct pv_cpu_ops { + unsigned long (*get_debugreg)(int regno); + void (*set_debugreg)(int regno, unsigned long value); + void (*clts)(void); + unsigned long (*read_cr0)(void); + void (*write_cr0)(unsigned long); + unsigned long (*read_cr4_safe)(void); + unsigned long (*read_cr4)(void); + void (*write_cr4)(unsigned long); + void (*load_tr_desc)(void); + void (*load_gdt)(const struct desc_ptr *); + void (*load_idt)(const struct desc_ptr *); + void (*store_gdt)(struct desc_ptr *); + void (*store_idt)(struct desc_ptr *); + void (*set_ldt)(const void *desc, unsigned entries); + unsigned long (*store_tr)(void); + void (*load_tls)(struct thread_struct *t, unsigned int cpu); + void (*write_ldt_entry)(struct desc_struct *ldt, int entrynum, + const void *desc); + void (*write_gdt_entry)(struct desc_struct *, + int entrynum, const void *desc, int size); + void (*write_idt_entry)(gate_desc *, + int entrynum, const gate_desc *gate); + void (*alloc_ldt)(struct desc_struct *ldt, unsigned entries); + void (*free_ldt)(struct desc_struct *ldt, unsigned entries); + void (*load_sp0)(struct tss_struct *tss, struct thread_struct *t); + void (*set_iopl_mask)(unsigned mask); + void (*wbinvd)(void); + void (*io_delay)(void); + void (*cpuid)(unsigned int *eax, unsigned int *ebx, + unsigned int *ecx, unsigned int *edx); + u64 (*read_msr)(unsigned int msr, int *err); + int (*rdmsr_regs)(u32 *regs); + int (*write_msr)(unsigned int msr, unsigned low, unsigned high); + int (*wrmsr_regs)(u32 *regs); + u64 (*read_tsc)(void); + u64 (*read_pmc)(int counter); + unsigned long long (*read_tscp)(unsigned int *aux); + void (*irq_enable_sysexit)(void); + void (*usergs_sysret64)(void); + void (*usergs_sysret32)(void); + void (*iret)(void); + void (*swapgs)(void); + void (*start_context_switch)(struct task_struct *prev); + void (*end_context_switch)(struct task_struct *next); +}; +struct pv_irq_ops { + struct paravirt_callee_save save_fl; + struct paravirt_callee_save restore_fl; + struct paravirt_callee_save irq_disable; + struct paravirt_callee_save irq_enable; + void (*safe_halt)(void); + void (*halt)(void); +}; +struct pv_apic_ops { + void (*startup_ipi_hook)(int phys_apicid, + unsigned long start_eip, + unsigned long start_esp); +}; +struct pv_mmu_ops { + unsigned long (*read_cr2)(void); + void (*write_cr2)(unsigned long); + unsigned long (*read_cr3)(void); + void (*write_cr3)(unsigned long); + void (*activate_mm)(struct mm_struct *prev, + struct mm_struct *next); + void (*dup_mmap)(struct mm_struct *oldmm, + struct mm_struct *mm); + void (*exit_mmap)(struct mm_struct *mm); + void (*flush_tlb_user)(void); + void (*flush_tlb_kernel)(void); + void (*flush_tlb_single)(unsigned long addr); + void (*flush_tlb_others)(const struct cpumask *cpus, + struct mm_struct *mm, + unsigned long va); + int (*pgd_alloc)(struct mm_struct *mm); + void (*pgd_free)(struct mm_struct *mm, pgd_t *pgd); + void (*alloc_pte)(struct mm_struct *mm, unsigned long pfn); + void (*alloc_pmd)(struct mm_struct *mm, unsigned long pfn); + void (*alloc_pud)(struct mm_struct *mm, unsigned long pfn); + void (*release_pte)(unsigned long pfn); + void (*release_pmd)(unsigned long pfn); + void (*release_pud)(unsigned long pfn); + void (*set_pte)(pte_t *ptep, pte_t pteval); + void (*set_pte_at)(struct mm_struct *mm, unsigned long addr, + pte_t *ptep, pte_t pteval); + void (*set_pmd)(pmd_t *pmdp, pmd_t pmdval); + void (*set_pmd_at)(struct mm_struct *mm, unsigned long addr, + pmd_t *pmdp, pmd_t pmdval); + void (*pte_update)(struct mm_struct *mm, unsigned long addr, + pte_t *ptep); + void (*pte_update_defer)(struct mm_struct *mm, + unsigned long addr, pte_t *ptep); + void (*pmd_update)(struct mm_struct *mm, unsigned long addr, + pmd_t *pmdp); + void (*pmd_update_defer)(struct mm_struct *mm, + unsigned long addr, pmd_t *pmdp); + pte_t (*ptep_modify_prot_start)(struct mm_struct *mm, unsigned long addr, + pte_t *ptep); + void (*ptep_modify_prot_commit)(struct mm_struct *mm, unsigned long addr, + pte_t *ptep, pte_t pte); + struct paravirt_callee_save pte_val; + struct paravirt_callee_save make_pte; + struct paravirt_callee_save pgd_val; + struct paravirt_callee_save make_pgd; + void (*set_pte_atomic)(pte_t *ptep, pte_t pteval); + void (*pte_clear)(struct mm_struct *mm, unsigned long addr, + pte_t *ptep); + void (*pmd_clear)(pmd_t *pmdp); + void (*set_pud)(pud_t *pudp, pud_t pudval); + struct paravirt_callee_save pmd_val; + struct paravirt_callee_save make_pmd; + struct pv_lazy_ops lazy_mode; + void (*set_fixmap)(unsigned idx, + phys_addr_t phys, pgprot_t flags); +}; +struct arch_spinlock; +struct pv_lock_ops { + int (*spin_is_locked)(struct arch_spinlock *lock); + int (*spin_is_contended)(struct arch_spinlock *lock); + void (*spin_lock)(struct arch_spinlock *lock); + void (*spin_lock_flags)(struct arch_spinlock *lock, unsigned long flags); + int (*spin_trylock)(struct arch_spinlock *lock); + void (*spin_unlock)(struct arch_spinlock *lock); +}; +struct paravirt_patch_template { + struct pv_init_ops pv_init_ops; + struct pv_time_ops pv_time_ops; + struct pv_cpu_ops pv_cpu_ops; + struct pv_irq_ops pv_irq_ops; + struct pv_apic_ops pv_apic_ops; + struct pv_mmu_ops pv_mmu_ops; + struct pv_lock_ops pv_lock_ops; +}; +extern struct pv_info pv_info; +extern struct pv_init_ops pv_init_ops; +extern struct pv_time_ops pv_time_ops; +extern struct pv_cpu_ops pv_cpu_ops; +extern struct pv_irq_ops pv_irq_ops; +extern struct pv_apic_ops pv_apic_ops; +extern struct pv_mmu_ops pv_mmu_ops; +extern struct pv_lock_ops pv_lock_ops; +unsigned paravirt_patch_nop(void); +unsigned paravirt_patch_ident_32(void *insnbuf, unsigned len); +unsigned paravirt_patch_ident_64(void *insnbuf, unsigned len); +unsigned paravirt_patch_ignore(unsigned len); +unsigned paravirt_patch_call(void *insnbuf, + const void *target, u16 tgt_clobbers, + unsigned long addr, u16 site_clobbers, + unsigned len); +unsigned paravirt_patch_jmp(void *insnbuf, const void *target, + unsigned long addr, unsigned len); +unsigned paravirt_patch_default(u8 type, u16 clobbers, void *insnbuf, + unsigned long addr, unsigned len); +unsigned paravirt_patch_insns(void *insnbuf, unsigned len, + const char *start, const char *end); +unsigned native_patch(u8 type, u16 clobbers, void *ibuf, + unsigned long addr, unsigned len); +int paravirt_disable_iospace(void); +enum paravirt_lazy_mode { + PARAVIRT_LAZY_NONE, + PARAVIRT_LAZY_MMU, + PARAVIRT_LAZY_CPU, +}; +enum paravirt_lazy_mode paravirt_get_lazy_mode(void); +void paravirt_start_context_switch(struct task_struct *prev); +void paravirt_end_context_switch(struct task_struct *next); +void paravirt_enter_lazy_mmu(void); +void paravirt_leave_lazy_mmu(void); +void _paravirt_nop(void); +u32 _paravirt_ident_32(u32); +u64 _paravirt_ident_64(u64); +struct paravirt_patch_site { + u8 *instr; + u8 instrtype; + u8 len; + u16 clobbers; +}; +extern struct paravirt_patch_site __parainstructions[], + __parainstructions_end[]; +extern int __bitmap_empty(const unsigned long *bitmap, int bits); +extern int __bitmap_full(const unsigned long *bitmap, int bits); +extern int __bitmap_equal(const unsigned long *bitmap1, + const unsigned long *bitmap2, int bits); +extern void __bitmap_complement(unsigned long *dst, const unsigned long *src, + int bits); +extern void __bitmap_shift_right(unsigned long *dst, + const unsigned long *src, int shift, int bits); +extern void __bitmap_shift_left(unsigned long *dst, + const unsigned long *src, int shift, int bits); +extern int __bitmap_and(unsigned long *dst, const unsigned long *bitmap1, + const unsigned long *bitmap2, int bits); +extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1, + const unsigned long *bitmap2, int bits); +extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1, + const unsigned long *bitmap2, int bits); +extern int __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1, + const unsigned long *bitmap2, int bits); +extern int __bitmap_intersects(const unsigned long *bitmap1, + const unsigned long *bitmap2, int bits); +extern int __bitmap_subset(const unsigned long *bitmap1, + const unsigned long *bitmap2, int bits); +extern int __bitmap_weight(const unsigned long *bitmap, int bits); +extern void bitmap_set(unsigned long *map, int i, int len); +extern void bitmap_clear(unsigned long *map, int start, int nr); +extern unsigned long bitmap_find_next_zero_area(unsigned long *map, + unsigned long size, + unsigned long start, + unsigned int nr, + unsigned long align_mask); +extern int bitmap_scnprintf(char *buf, unsigned int len, + const unsigned long *src, int nbits); +extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user, + unsigned long *dst, int nbits); +extern int bitmap_parse_user(const char *ubuf, unsigned int ulen, + unsigned long *dst, int nbits); +extern int bitmap_scnlistprintf(char *buf, unsigned int len, + const unsigned long *src, int nbits); +extern int bitmap_parselist(const char *buf, unsigned long *maskp, + int nmaskbits); +extern int bitmap_parselist_user(const char *ubuf, unsigned int ulen, + unsigned long *dst, int nbits); +extern void bitmap_remap(unsigned long *dst, const unsigned long *src, + const unsigned long *old, const unsigned long *new, int bits); +extern int bitmap_bitremap(int oldbit, + const unsigned long *old, const unsigned long *new, int bits); +extern void bitmap_onto(unsigned long *dst, const unsigned long *orig, + const unsigned long *relmap, int bits); +extern void bitmap_fold(unsigned long *dst, const unsigned long *orig, + int sz, int bits); +extern int bitmap_find_free_region(unsigned long *bitmap, int bits, int order); +extern void bitmap_release_region(unsigned long *bitmap, int pos, int order); +extern int bitmap_allocate_region(unsigned long *bitmap, int pos, int order); +extern void bitmap_copy_le(void *dst, const unsigned long *src, int nbits); +static inline __attribute__((always_inline)) void bitmap_zero(unsigned long *dst, int nbits) +{ + if (__builtin_constant_p((((__builtin_constant_p(nbits) && (nbits) <= 32)))) ? !!(((__builtin_constant_p(nbits) && (nbits) <= 32))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bitmap.h", .line = 159, }; ______r = !!(((__builtin_constant_p(nbits) && (nbits) <= 32))); ______f.miss_hit[______r]++; ______r; })) + *dst = 0UL; + else { + int len = (((nbits) + (8 * sizeof(long)) - 1) / (8 * sizeof(long))) * sizeof(unsigned long); + __builtin_memset(dst, 0, len); + } +} +static inline __attribute__((always_inline)) void bitmap_fill(unsigned long *dst, int nbits) +{ + size_t nlongs = (((nbits) + (8 * sizeof(long)) - 1) / (8 * sizeof(long))); + if (__builtin_constant_p(((!(__builtin_constant_p(nbits) && (nbits) <= 32)))) ? !!((!(__builtin_constant_p(nbits) && (nbits) <= 32))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bitmap.h", .line = 170, }; ______r = !!((!(__builtin_constant_p(nbits) && (nbits) <= 32))); ______f.miss_hit[______r]++; ______r; })) { + int len = (nlongs - 1) * sizeof(unsigned long); + __builtin_memset(dst, 0xff, len); + } + dst[nlongs - 1] = ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ); +} +static inline __attribute__((always_inline)) void bitmap_copy(unsigned long *dst, const unsigned long *src, + int nbits) +{ + if (__builtin_constant_p((((__builtin_constant_p(nbits) && (nbits) <= 32)))) ? !!(((__builtin_constant_p(nbits) && (nbits) <= 32))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bitmap.h", .line = 180, }; ______r = !!(((__builtin_constant_p(nbits) && (nbits) <= 32))); ______f.miss_hit[______r]++; ______r; })) + *dst = *src; + else { + int len = (((nbits) + (8 * sizeof(long)) - 1) / (8 * sizeof(long))) * sizeof(unsigned long); + __builtin_memcpy(dst, src, len); + } +} +static inline __attribute__((always_inline)) int bitmap_and(unsigned long *dst, const unsigned long *src1, + const unsigned long *src2, int nbits) +{ + if (__builtin_constant_p((((__builtin_constant_p(nbits) && (nbits) <= 32)))) ? !!(((__builtin_constant_p(nbits) && (nbits) <= 32))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bitmap.h", .line = 191, }; ______r = !!(((__builtin_constant_p(nbits) && (nbits) <= 32))); ______f.miss_hit[______r]++; ______r; })) + return (*dst = *src1 & *src2) != 0; + return __bitmap_and(dst, src1, src2, nbits); +} +static inline __attribute__((always_inline)) void bitmap_or(unsigned long *dst, const unsigned long *src1, + const unsigned long *src2, int nbits) +{ + if (__builtin_constant_p((((__builtin_constant_p(nbits) && (nbits) <= 32)))) ? !!(((__builtin_constant_p(nbits) && (nbits) <= 32))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bitmap.h", .line = 199, }; ______r = !!(((__builtin_constant_p(nbits) && (nbits) <= 32))); ______f.miss_hit[______r]++; ______r; })) + *dst = *src1 | *src2; + else + __bitmap_or(dst, src1, src2, nbits); +} +static inline __attribute__((always_inline)) void bitmap_xor(unsigned long *dst, const unsigned long *src1, + const unsigned long *src2, int nbits) +{ + if (__builtin_constant_p((((__builtin_constant_p(nbits) && (nbits) <= 32)))) ? !!(((__builtin_constant_p(nbits) && (nbits) <= 32))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bitmap.h", .line = 208, }; ______r = !!(((__builtin_constant_p(nbits) && (nbits) <= 32))); ______f.miss_hit[______r]++; ______r; })) + *dst = *src1 ^ *src2; + else + __bitmap_xor(dst, src1, src2, nbits); +} +static inline __attribute__((always_inline)) int bitmap_andnot(unsigned long *dst, const unsigned long *src1, + const unsigned long *src2, int nbits) +{ + if (__builtin_constant_p((((__builtin_constant_p(nbits) && (nbits) <= 32)))) ? !!(((__builtin_constant_p(nbits) && (nbits) <= 32))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bitmap.h", .line = 217, }; ______r = !!(((__builtin_constant_p(nbits) && (nbits) <= 32))); ______f.miss_hit[______r]++; ______r; })) + return (*dst = *src1 & ~(*src2)) != 0; + return __bitmap_andnot(dst, src1, src2, nbits); +} +static inline __attribute__((always_inline)) void bitmap_complement(unsigned long *dst, const unsigned long *src, + int nbits) +{ + if (__builtin_constant_p((((__builtin_constant_p(nbits) && (nbits) <= 32)))) ? !!(((__builtin_constant_p(nbits) && (nbits) <= 32))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bitmap.h", .line = 225, }; ______r = !!(((__builtin_constant_p(nbits) && (nbits) <= 32))); ______f.miss_hit[______r]++; ______r; })) + *dst = ~(*src) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ); + else + __bitmap_complement(dst, src, nbits); +} +static inline __attribute__((always_inline)) int bitmap_equal(const unsigned long *src1, + const unsigned long *src2, int nbits) +{ + if (__builtin_constant_p((((__builtin_constant_p(nbits) && (nbits) <= 32)))) ? !!(((__builtin_constant_p(nbits) && (nbits) <= 32))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bitmap.h", .line = 234, }; ______r = !!(((__builtin_constant_p(nbits) && (nbits) <= 32))); ______f.miss_hit[______r]++; ______r; })) + return ! ((*src1 ^ *src2) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )); + else + return __bitmap_equal(src1, src2, nbits); +} +static inline __attribute__((always_inline)) int bitmap_intersects(const unsigned long *src1, + const unsigned long *src2, int nbits) +{ + if (__builtin_constant_p((((__builtin_constant_p(nbits) && (nbits) <= 32)))) ? !!(((__builtin_constant_p(nbits) && (nbits) <= 32))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bitmap.h", .line = 243, }; ______r = !!(((__builtin_constant_p(nbits) && (nbits) <= 32))); ______f.miss_hit[______r]++; ______r; })) + return ((*src1 & *src2) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )) != 0; + else + return __bitmap_intersects(src1, src2, nbits); +} +static inline __attribute__((always_inline)) int bitmap_subset(const unsigned long *src1, + const unsigned long *src2, int nbits) +{ + if (__builtin_constant_p((((__builtin_constant_p(nbits) && (nbits) <= 32)))) ? !!(((__builtin_constant_p(nbits) && (nbits) <= 32))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bitmap.h", .line = 252, }; ______r = !!(((__builtin_constant_p(nbits) && (nbits) <= 32))); ______f.miss_hit[______r]++; ______r; })) + return ! ((*src1 & ~(*src2)) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )); + else + return __bitmap_subset(src1, src2, nbits); +} +static inline __attribute__((always_inline)) int bitmap_empty(const unsigned long *src, int nbits) +{ + if (__builtin_constant_p((((__builtin_constant_p(nbits) && (nbits) <= 32)))) ? !!(((__builtin_constant_p(nbits) && (nbits) <= 32))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bitmap.h", .line = 260, }; ______r = !!(((__builtin_constant_p(nbits) && (nbits) <= 32))); ______f.miss_hit[______r]++; ______r; })) + return ! (*src & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )); + else + return __bitmap_empty(src, nbits); +} +static inline __attribute__((always_inline)) int bitmap_full(const unsigned long *src, int nbits) +{ + if (__builtin_constant_p((((__builtin_constant_p(nbits) && (nbits) <= 32)))) ? !!(((__builtin_constant_p(nbits) && (nbits) <= 32))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bitmap.h", .line = 268, }; ______r = !!(((__builtin_constant_p(nbits) && (nbits) <= 32))); ______f.miss_hit[______r]++; ______r; })) + return ! (~(*src) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )); + else + return __bitmap_full(src, nbits); +} +static inline __attribute__((always_inline)) int bitmap_weight(const unsigned long *src, int nbits) +{ + if (__builtin_constant_p((((__builtin_constant_p(nbits) && (nbits) <= 32)))) ? !!(((__builtin_constant_p(nbits) && (nbits) <= 32))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bitmap.h", .line = 276, }; ______r = !!(((__builtin_constant_p(nbits) && (nbits) <= 32))); ______f.miss_hit[______r]++; ______r; })) + return hweight_long(*src & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL )); + return __bitmap_weight(src, nbits); +} +static inline __attribute__((always_inline)) void bitmap_shift_right(unsigned long *dst, + const unsigned long *src, int n, int nbits) +{ + if (__builtin_constant_p((((__builtin_constant_p(nbits) && (nbits) <= 32)))) ? !!(((__builtin_constant_p(nbits) && (nbits) <= 32))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bitmap.h", .line = 284, }; ______r = !!(((__builtin_constant_p(nbits) && (nbits) <= 32))); ______f.miss_hit[______r]++; ______r; })) + *dst = *src >> n; + else + __bitmap_shift_right(dst, src, n, nbits); +} +static inline __attribute__((always_inline)) void bitmap_shift_left(unsigned long *dst, + const unsigned long *src, int n, int nbits) +{ + if (__builtin_constant_p((((__builtin_constant_p(nbits) && (nbits) <= 32)))) ? !!(((__builtin_constant_p(nbits) && (nbits) <= 32))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bitmap.h", .line = 293, }; ______r = !!(((__builtin_constant_p(nbits) && (nbits) <= 32))); ______f.miss_hit[______r]++; ______r; })) + *dst = (*src << n) & ( ((nbits) % 32) ? (1UL<<((nbits) % 32))-1 : ~0UL ); + else + __bitmap_shift_left(dst, src, n, nbits); +} +static inline __attribute__((always_inline)) int bitmap_parse(const char *buf, unsigned int buflen, + unsigned long *maskp, int nmaskbits) +{ + return __bitmap_parse(buf, buflen, 0, maskp, nmaskbits); +} +typedef struct cpumask { unsigned long bits[(((8) + (8 * sizeof(long)) - 1) / (8 * sizeof(long)))]; } cpumask_t; +extern int nr_cpu_ids; +extern const struct cpumask *const cpu_possible_mask; +extern const struct cpumask *const cpu_online_mask; +extern const struct cpumask *const cpu_present_mask; +extern const struct cpumask *const cpu_active_mask; +static inline __attribute__((always_inline)) unsigned int cpumask_check(unsigned int cpu) +{ + return cpu; +} +static inline __attribute__((always_inline)) unsigned int cpumask_first(const struct cpumask *srcp) +{ + return find_first_bit(((srcp)->bits), 8); +} +static inline __attribute__((always_inline)) unsigned int cpumask_next(int n, const struct cpumask *srcp) +{ + if (__builtin_constant_p(((n != -1))) ? !!((n != -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/cpumask.h", .line = 172, }; ______r = !!((n != -1)); ______f.miss_hit[______r]++; ______r; })) + cpumask_check(n); + return find_next_bit(((srcp)->bits), 8, n+1); +} +static inline __attribute__((always_inline)) unsigned int cpumask_next_zero(int n, const struct cpumask *srcp) +{ + if (__builtin_constant_p(((n != -1))) ? !!((n != -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/cpumask.h", .line = 187, }; ______r = !!((n != -1)); ______f.miss_hit[______r]++; ______r; })) + cpumask_check(n); + return find_next_zero_bit(((srcp)->bits), 8, n+1); +} +int cpumask_next_and(int n, const struct cpumask *, const struct cpumask *); +int cpumask_any_but(const struct cpumask *mask, unsigned int cpu); +static inline __attribute__((always_inline)) void cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp) +{ + set_bit(cpumask_check(cpu), ((dstp)->bits)); +} +static inline __attribute__((always_inline)) void cpumask_clear_cpu(int cpu, struct cpumask *dstp) +{ + clear_bit(cpumask_check(cpu), ((dstp)->bits)); +} +static inline __attribute__((always_inline)) int cpumask_test_and_set_cpu(int cpu, struct cpumask *cpumask) +{ + return test_and_set_bit(cpumask_check(cpu), ((cpumask)->bits)); +} +static inline __attribute__((always_inline)) int cpumask_test_and_clear_cpu(int cpu, struct cpumask *cpumask) +{ + return test_and_clear_bit(cpumask_check(cpu), ((cpumask)->bits)); +} +static inline __attribute__((always_inline)) void cpumask_setall(struct cpumask *dstp) +{ + bitmap_fill(((dstp)->bits), 8); +} +static inline __attribute__((always_inline)) void cpumask_clear(struct cpumask *dstp) +{ + bitmap_zero(((dstp)->bits), 8); +} +static inline __attribute__((always_inline)) int cpumask_and(struct cpumask *dstp, + const struct cpumask *src1p, + const struct cpumask *src2p) +{ + return bitmap_and(((dstp)->bits), ((src1p)->bits), + ((src2p)->bits), 8); +} +static inline __attribute__((always_inline)) void cpumask_or(struct cpumask *dstp, const struct cpumask *src1p, + const struct cpumask *src2p) +{ + bitmap_or(((dstp)->bits), ((src1p)->bits), + ((src2p)->bits), 8); +} +static inline __attribute__((always_inline)) void cpumask_xor(struct cpumask *dstp, + const struct cpumask *src1p, + const struct cpumask *src2p) +{ + bitmap_xor(((dstp)->bits), ((src1p)->bits), + ((src2p)->bits), 8); +} +static inline __attribute__((always_inline)) int cpumask_andnot(struct cpumask *dstp, + const struct cpumask *src1p, + const struct cpumask *src2p) +{ + return bitmap_andnot(((dstp)->bits), ((src1p)->bits), + ((src2p)->bits), 8); +} +static inline __attribute__((always_inline)) void cpumask_complement(struct cpumask *dstp, + const struct cpumask *srcp) +{ + bitmap_complement(((dstp)->bits), ((srcp)->bits), + 8); +} +static inline __attribute__((always_inline)) bool cpumask_equal(const struct cpumask *src1p, + const struct cpumask *src2p) +{ + return bitmap_equal(((src1p)->bits), ((src2p)->bits), + 8); +} +static inline __attribute__((always_inline)) bool cpumask_intersects(const struct cpumask *src1p, + const struct cpumask *src2p) +{ + return bitmap_intersects(((src1p)->bits), ((src2p)->bits), + 8); +} +static inline __attribute__((always_inline)) int cpumask_subset(const struct cpumask *src1p, + const struct cpumask *src2p) +{ + return bitmap_subset(((src1p)->bits), ((src2p)->bits), + 8); +} +static inline __attribute__((always_inline)) bool cpumask_empty(const struct cpumask *srcp) +{ + return bitmap_empty(((srcp)->bits), 8); +} +static inline __attribute__((always_inline)) bool cpumask_full(const struct cpumask *srcp) +{ + return bitmap_full(((srcp)->bits), 8); +} +static inline __attribute__((always_inline)) unsigned int cpumask_weight(const struct cpumask *srcp) +{ + return bitmap_weight(((srcp)->bits), 8); +} +static inline __attribute__((always_inline)) void cpumask_shift_right(struct cpumask *dstp, + const struct cpumask *srcp, int n) +{ + bitmap_shift_right(((dstp)->bits), ((srcp)->bits), n, + 8); +} +static inline __attribute__((always_inline)) void cpumask_shift_left(struct cpumask *dstp, + const struct cpumask *srcp, int n) +{ + bitmap_shift_left(((dstp)->bits), ((srcp)->bits), n, + 8); +} +static inline __attribute__((always_inline)) void cpumask_copy(struct cpumask *dstp, + const struct cpumask *srcp) +{ + bitmap_copy(((dstp)->bits), ((srcp)->bits), 8); +} +static inline __attribute__((always_inline)) int cpumask_scnprintf(char *buf, int len, + const struct cpumask *srcp) +{ + return bitmap_scnprintf(buf, len, ((srcp)->bits), 8); +} +static inline __attribute__((always_inline)) int cpumask_parse_user(const char *buf, int len, + struct cpumask *dstp) +{ + return bitmap_parse_user(buf, len, ((dstp)->bits), 8); +} +static inline __attribute__((always_inline)) int cpumask_parselist_user(const char *buf, int len, + struct cpumask *dstp) +{ + return bitmap_parselist_user(buf, len, ((dstp)->bits), + 8); +} +static inline __attribute__((always_inline)) int cpulist_scnprintf(char *buf, int len, + const struct cpumask *srcp) +{ + return bitmap_scnlistprintf(buf, len, ((srcp)->bits), + 8); +} +static inline __attribute__((always_inline)) int cpulist_parse(const char *buf, struct cpumask *dstp) +{ + return bitmap_parselist(buf, ((dstp)->bits), 8); +} +static inline __attribute__((always_inline)) size_t cpumask_size(void) +{ + return (((8) + (8 * sizeof(long)) - 1) / (8 * sizeof(long))) * sizeof(long); +} +typedef struct cpumask cpumask_var_t[1]; +static inline __attribute__((always_inline)) bool alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags) +{ + return true; +} +static inline __attribute__((always_inline)) bool alloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags, + int node) +{ + return true; +} +static inline __attribute__((always_inline)) bool zalloc_cpumask_var(cpumask_var_t *mask, gfp_t flags) +{ + cpumask_clear(*mask); + return true; +} +static inline __attribute__((always_inline)) bool zalloc_cpumask_var_node(cpumask_var_t *mask, gfp_t flags, + int node) +{ + cpumask_clear(*mask); + return true; +} +static inline __attribute__((always_inline)) void alloc_bootmem_cpumask_var(cpumask_var_t *mask) +{ +} +static inline __attribute__((always_inline)) void free_cpumask_var(cpumask_var_t mask) +{ +} +static inline __attribute__((always_inline)) void free_bootmem_cpumask_var(cpumask_var_t mask) +{ +} +extern const unsigned long cpu_all_bits[(((8) + (8 * sizeof(long)) - 1) / (8 * sizeof(long)))]; +void set_cpu_possible(unsigned int cpu, bool possible); +void set_cpu_present(unsigned int cpu, bool present); +void set_cpu_online(unsigned int cpu, bool online); +void set_cpu_active(unsigned int cpu, bool active); +void init_cpu_present(const struct cpumask *src); +void init_cpu_possible(const struct cpumask *src); +void init_cpu_online(const struct cpumask *src); +static inline __attribute__((always_inline)) int __check_is_bitmap(const unsigned long *bitmap) +{ + return 1; +} +extern const unsigned long + cpu_bit_bitmap[32 +1][(((8) + (8 * sizeof(long)) - 1) / (8 * sizeof(long)))]; +static inline __attribute__((always_inline)) const struct cpumask *get_cpu_mask(unsigned int cpu) +{ + const unsigned long *p = cpu_bit_bitmap[1 + cpu % 32]; + p -= cpu / 32; + return ((struct cpumask *)(1 ? (p) : (void *)sizeof(__check_is_bitmap(p)))); +} +int __first_cpu(const cpumask_t *srcp); +int __next_cpu(int n, const cpumask_t *srcp); +int __any_online_cpu(const cpumask_t *mask); +static inline __attribute__((always_inline)) void __cpu_set(int cpu, volatile cpumask_t *dstp) +{ + set_bit(cpu, dstp->bits); +} +static inline __attribute__((always_inline)) void __cpu_clear(int cpu, volatile cpumask_t *dstp) +{ + clear_bit(cpu, dstp->bits); +} +static inline __attribute__((always_inline)) void __cpus_setall(cpumask_t *dstp, int nbits) +{ + bitmap_fill(dstp->bits, nbits); +} +static inline __attribute__((always_inline)) void __cpus_clear(cpumask_t *dstp, int nbits) +{ + bitmap_zero(dstp->bits, nbits); +} +static inline __attribute__((always_inline)) int __cpu_test_and_set(int cpu, cpumask_t *addr) +{ + return test_and_set_bit(cpu, addr->bits); +} +static inline __attribute__((always_inline)) int __cpus_and(cpumask_t *dstp, const cpumask_t *src1p, + const cpumask_t *src2p, int nbits) +{ + return bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits); +} +static inline __attribute__((always_inline)) void __cpus_or(cpumask_t *dstp, const cpumask_t *src1p, + const cpumask_t *src2p, int nbits) +{ + bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits); +} +static inline __attribute__((always_inline)) void __cpus_xor(cpumask_t *dstp, const cpumask_t *src1p, + const cpumask_t *src2p, int nbits) +{ + bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits); +} +static inline __attribute__((always_inline)) int __cpus_andnot(cpumask_t *dstp, const cpumask_t *src1p, + const cpumask_t *src2p, int nbits) +{ + return bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits); +} +static inline __attribute__((always_inline)) int __cpus_equal(const cpumask_t *src1p, + const cpumask_t *src2p, int nbits) +{ + return bitmap_equal(src1p->bits, src2p->bits, nbits); +} +static inline __attribute__((always_inline)) int __cpus_intersects(const cpumask_t *src1p, + const cpumask_t *src2p, int nbits) +{ + return bitmap_intersects(src1p->bits, src2p->bits, nbits); +} +static inline __attribute__((always_inline)) int __cpus_subset(const cpumask_t *src1p, + const cpumask_t *src2p, int nbits) +{ + return bitmap_subset(src1p->bits, src2p->bits, nbits); +} +static inline __attribute__((always_inline)) int __cpus_empty(const cpumask_t *srcp, int nbits) +{ + return bitmap_empty(srcp->bits, nbits); +} +static inline __attribute__((always_inline)) int __cpus_weight(const cpumask_t *srcp, int nbits) +{ + return bitmap_weight(srcp->bits, nbits); +} +static inline __attribute__((always_inline)) void __cpus_shift_left(cpumask_t *dstp, + const cpumask_t *srcp, int n, int nbits) +{ + bitmap_shift_left(dstp->bits, srcp->bits, n, nbits); +} +static inline __attribute__((always_inline)) int paravirt_enabled(void) +{ + return pv_info.paravirt_enabled; +} +static inline __attribute__((always_inline)) void load_sp0(struct tss_struct *tss, + struct thread_struct *thread) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.load_sp0); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.load_sp0) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.load_sp0)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(tss)), "d" ((unsigned long)(thread)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void __cpuid(unsigned int *eax, unsigned int *ebx, + unsigned int *ecx, unsigned int *edx) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.cpuid); asm volatile("push %[_arg4];" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "lea 4(%%esp),%%esp;" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.cpuid) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.cpuid)), [paravirt_clobber] "i" (((1 << 4) - 1)), "0" ((u32)(eax)), "1" ((u32)(ebx)), "2" ((u32)(ecx)), [_arg4] "mr" ((u32)(edx)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) unsigned long paravirt_get_debugreg(int reg) +{ + return ({ unsigned long __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.get_debugreg); if (__builtin_constant_p(((sizeof(unsigned long) > sizeof(unsigned long)))) ? !!((sizeof(unsigned long) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 39, }; ______r = !!((sizeof(unsigned long) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.get_debugreg) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.get_debugreg)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(reg)) : "memory", "cc" ); __ret = (unsigned long)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.get_debugreg) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.get_debugreg)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(reg)) : "memory", "cc" ); __ret = (unsigned long)__eax; } __ret; }); +} +static inline __attribute__((always_inline)) void set_debugreg(unsigned long val, int reg) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.set_debugreg); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.set_debugreg) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.set_debugreg)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(reg)), "d" ((unsigned long)(val)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void clts(void) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.clts); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.clts) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.clts)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) unsigned long read_cr0(void) +{ + return ({ unsigned long __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.read_cr0); if (__builtin_constant_p(((sizeof(unsigned long) > sizeof(unsigned long)))) ? !!((sizeof(unsigned long) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 54, }; ______r = !!((sizeof(unsigned long) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_cr0) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.read_cr0)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); __ret = (unsigned long)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_cr0) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.read_cr0)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); __ret = (unsigned long)__eax; } __ret; }); +} +static inline __attribute__((always_inline)) void write_cr0(unsigned long x) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.write_cr0); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.write_cr0) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.write_cr0)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(x)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) unsigned long read_cr2(void) +{ + return ({ unsigned long __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.read_cr2); if (__builtin_constant_p(((sizeof(unsigned long) > sizeof(unsigned long)))) ? !!((sizeof(unsigned long) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 64, }; ______r = !!((sizeof(unsigned long) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.read_cr2) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.read_cr2)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); __ret = (unsigned long)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.read_cr2) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.read_cr2)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); __ret = (unsigned long)__eax; } __ret; }); +} +static inline __attribute__((always_inline)) void write_cr2(unsigned long x) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.write_cr2); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.write_cr2) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.write_cr2)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(x)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) unsigned long read_cr3(void) +{ + return ({ unsigned long __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.read_cr3); if (__builtin_constant_p(((sizeof(unsigned long) > sizeof(unsigned long)))) ? !!((sizeof(unsigned long) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 74, }; ______r = !!((sizeof(unsigned long) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.read_cr3) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.read_cr3)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); __ret = (unsigned long)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.read_cr3) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.read_cr3)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); __ret = (unsigned long)__eax; } __ret; }); +} +static inline __attribute__((always_inline)) void write_cr3(unsigned long x) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.write_cr3); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.write_cr3) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.write_cr3)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(x)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) unsigned long read_cr4(void) +{ + return ({ unsigned long __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.read_cr4); if (__builtin_constant_p(((sizeof(unsigned long) > sizeof(unsigned long)))) ? !!((sizeof(unsigned long) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 84, }; ______r = !!((sizeof(unsigned long) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_cr4) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.read_cr4)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); __ret = (unsigned long)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_cr4) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.read_cr4)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); __ret = (unsigned long)__eax; } __ret; }); +} +static inline __attribute__((always_inline)) unsigned long read_cr4_safe(void) +{ + return ({ unsigned long __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.read_cr4_safe); if (__builtin_constant_p(((sizeof(unsigned long) > sizeof(unsigned long)))) ? !!((sizeof(unsigned long) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 88, }; ______r = !!((sizeof(unsigned long) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_cr4_safe) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.read_cr4_safe)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); __ret = (unsigned long)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_cr4_safe) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.read_cr4_safe)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); __ret = (unsigned long)__eax; } __ret; }); +} +static inline __attribute__((always_inline)) void write_cr4(unsigned long x) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.write_cr4); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.write_cr4) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.write_cr4)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(x)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void arch_safe_halt(void) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_irq_ops.safe_halt); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_irq_ops.safe_halt) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_irq_ops.safe_halt)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void halt(void) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_irq_ops.halt); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_irq_ops.halt) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_irq_ops.halt)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void wbinvd(void) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.wbinvd); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.wbinvd) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.wbinvd)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) u64 paravirt_read_msr(unsigned msr, int *err) +{ + return ({ u64 __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.read_msr); if (__builtin_constant_p(((sizeof(u64) > sizeof(unsigned long)))) ? !!((sizeof(u64) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 127, }; ______r = !!((sizeof(u64) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_msr) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.read_msr)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(msr)), "d" ((unsigned long)(err)) : "memory", "cc" ); __ret = (u64)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_msr) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.read_msr)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(msr)), "d" ((unsigned long)(err)) : "memory", "cc" ); __ret = (u64)__eax; } __ret; }); +} +static inline __attribute__((always_inline)) int paravirt_rdmsr_regs(u32 *regs) +{ + return ({ int __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.rdmsr_regs); if (__builtin_constant_p(((sizeof(int) > sizeof(unsigned long)))) ? !!((sizeof(int) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 132, }; ______r = !!((sizeof(int) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.rdmsr_regs) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.rdmsr_regs)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(regs)) : "memory", "cc" ); __ret = (int)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.rdmsr_regs) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.rdmsr_regs)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(regs)) : "memory", "cc" ); __ret = (int)__eax; } __ret; }); +} +static inline __attribute__((always_inline)) int paravirt_write_msr(unsigned msr, unsigned low, unsigned high) +{ + return ({ int __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.write_msr); if (__builtin_constant_p(((sizeof(int) > sizeof(unsigned long)))) ? !!((sizeof(int) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 137, }; ______r = !!((sizeof(int) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.write_msr) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.write_msr)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(msr)), "d" ((unsigned long)(low)), "c" ((unsigned long)(high)) : "memory", "cc" ); __ret = (int)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.write_msr) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.write_msr)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(msr)), "d" ((unsigned long)(low)), "c" ((unsigned long)(high)) : "memory", "cc" ); __ret = (int)__eax; } __ret; }); +} +static inline __attribute__((always_inline)) int paravirt_wrmsr_regs(u32 *regs) +{ + return ({ int __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.wrmsr_regs); if (__builtin_constant_p(((sizeof(int) > sizeof(unsigned long)))) ? !!((sizeof(int) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 142, }; ______r = !!((sizeof(int) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.wrmsr_regs) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.wrmsr_regs)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(regs)) : "memory", "cc" ); __ret = (int)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.wrmsr_regs) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.wrmsr_regs)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(regs)) : "memory", "cc" ); __ret = (int)__eax; } __ret; }); +} +static inline __attribute__((always_inline)) int rdmsrl_safe(unsigned msr, unsigned long long *p) +{ + int err; + *p = paravirt_read_msr(msr, &err); + return err; +} +static inline __attribute__((always_inline)) int rdmsrl_amd_safe(unsigned msr, unsigned long long *p) +{ + u32 gprs[8] = { 0 }; + int err; + gprs[1] = msr; + gprs[7] = 0x9c5a203a; + err = paravirt_rdmsr_regs(gprs); + *p = gprs[0] | ((u64)gprs[2] << 32); + return err; +} +static inline __attribute__((always_inline)) int wrmsrl_amd_safe(unsigned msr, unsigned long long val) +{ + u32 gprs[8] = { 0 }; + gprs[0] = (u32)val; + gprs[1] = msr; + gprs[2] = val >> 32; + gprs[7] = 0x9c5a203a; + return paravirt_wrmsr_regs(gprs); +} +static inline __attribute__((always_inline)) u64 paravirt_read_tsc(void) +{ + return ({ u64 __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.read_tsc); if (__builtin_constant_p(((sizeof(u64) > sizeof(unsigned long)))) ? !!((sizeof(u64) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 217, }; ______r = !!((sizeof(u64) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_tsc) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.read_tsc)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); __ret = (u64)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_tsc) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.read_tsc)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); __ret = (u64)__eax; } __ret; }); +} +static inline __attribute__((always_inline)) unsigned long long paravirt_sched_clock(void) +{ + return ({ unsigned long long __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_time_ops.sched_clock); if (__builtin_constant_p(((sizeof(unsigned long long) > sizeof(unsigned long)))) ? !!((sizeof(unsigned long long) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 230, }; ______r = !!((sizeof(unsigned long long) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_time_ops.sched_clock) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_time_ops.sched_clock)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); __ret = (unsigned long long)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_time_ops.sched_clock) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_time_ops.sched_clock)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); __ret = (unsigned long long)__eax; } __ret; }); +} +static inline __attribute__((always_inline)) unsigned long long paravirt_read_pmc(int counter) +{ + return ({ u64 __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.read_pmc); if (__builtin_constant_p(((sizeof(u64) > sizeof(unsigned long)))) ? !!((sizeof(u64) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 235, }; ______r = !!((sizeof(u64) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_pmc) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.read_pmc)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(counter)) : "memory", "cc" ); __ret = (u64)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_pmc) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.read_pmc)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(counter)) : "memory", "cc" ); __ret = (u64)__eax; } __ret; }); +} +static inline __attribute__((always_inline)) unsigned long long paravirt_rdtscp(unsigned int *aux) +{ + return ({ u64 __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.read_tscp); if (__builtin_constant_p(((sizeof(u64) > sizeof(unsigned long)))) ? !!((sizeof(u64) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 247, }; ______r = !!((sizeof(u64) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_tscp) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.read_tscp)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(aux)) : "memory", "cc" ); __ret = (u64)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.read_tscp) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.read_tscp)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(aux)) : "memory", "cc" ); __ret = (u64)__eax; } __ret; }); +} +static inline __attribute__((always_inline)) void paravirt_alloc_ldt(struct desc_struct *ldt, unsigned entries) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.alloc_ldt); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.alloc_ldt) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.alloc_ldt)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(ldt)), "d" ((unsigned long)(entries)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void paravirt_free_ldt(struct desc_struct *ldt, unsigned entries) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.free_ldt); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.free_ldt) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.free_ldt)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(ldt)), "d" ((unsigned long)(entries)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void load_TR_desc(void) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.load_tr_desc); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.load_tr_desc) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.load_tr_desc)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void load_gdt(const struct desc_ptr *dtr) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.load_gdt); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.load_gdt) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.load_gdt)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(dtr)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void load_idt(const struct desc_ptr *dtr) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.load_idt); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.load_idt) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.load_idt)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(dtr)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void set_ldt(const void *addr, unsigned entries) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.set_ldt); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.set_ldt) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.set_ldt)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(addr)), "d" ((unsigned long)(entries)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void store_gdt(struct desc_ptr *dtr) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.store_gdt); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.store_gdt) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.store_gdt)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(dtr)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void store_idt(struct desc_ptr *dtr) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.store_idt); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.store_idt) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.store_idt)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(dtr)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) unsigned long paravirt_store_tr(void) +{ + return ({ unsigned long __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.store_tr); if (__builtin_constant_p(((sizeof(unsigned long) > sizeof(unsigned long)))) ? !!((sizeof(unsigned long) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 302, }; ______r = !!((sizeof(unsigned long) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.store_tr) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.store_tr)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); __ret = (unsigned long)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.store_tr) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.store_tr)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); __ret = (unsigned long)__eax; } __ret; }); +} +static inline __attribute__((always_inline)) void load_TLS(struct thread_struct *t, unsigned cpu) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.load_tls); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.load_tls) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.load_tls)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(t)), "d" ((unsigned long)(cpu)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void write_ldt_entry(struct desc_struct *dt, int entry, + const void *desc) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.write_ldt_entry); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.write_ldt_entry) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.write_ldt_entry)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(dt)), "d" ((unsigned long)(entry)), "c" ((unsigned long)(desc)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void write_gdt_entry(struct desc_struct *dt, int entry, + void *desc, int type) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.write_gdt_entry); asm volatile("push %[_arg4];" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "lea 4(%%esp),%%esp;" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.write_gdt_entry) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.write_gdt_entry)), [paravirt_clobber] "i" (((1 << 4) - 1)), "0" ((u32)(dt)), "1" ((u32)(entry)), "2" ((u32)(desc)), [_arg4] "mr" ((u32)(type)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void write_idt_entry(gate_desc *dt, int entry, const gate_desc *g) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.write_idt_entry); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.write_idt_entry) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.write_idt_entry)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(dt)), "d" ((unsigned long)(entry)), "c" ((unsigned long)(g)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void set_iopl_mask(unsigned mask) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.set_iopl_mask); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.set_iopl_mask) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.set_iopl_mask)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(mask)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void slow_down_io(void) +{ + pv_cpu_ops.io_delay(); +} +static inline __attribute__((always_inline)) void startup_ipi_hook(int phys_apicid, unsigned long start_eip, + unsigned long start_esp) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_apic_ops.startup_ipi_hook); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_apic_ops.startup_ipi_hook) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_apic_ops.startup_ipi_hook)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(phys_apicid)), "d" ((unsigned long)(start_eip)), "c" ((unsigned long)(start_esp)) : "memory", "cc" ); }) + ; +} +static inline __attribute__((always_inline)) void paravirt_activate_mm(struct mm_struct *prev, + struct mm_struct *next) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.activate_mm); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.activate_mm) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.activate_mm)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(prev)), "d" ((unsigned long)(next)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void arch_dup_mmap(struct mm_struct *oldmm, + struct mm_struct *mm) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.dup_mmap); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.dup_mmap) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.dup_mmap)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(oldmm)), "d" ((unsigned long)(mm)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void arch_exit_mmap(struct mm_struct *mm) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.exit_mmap); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.exit_mmap) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.exit_mmap)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(mm)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void __flush_tlb(void) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.flush_tlb_user); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.flush_tlb_user) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.flush_tlb_user)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void __flush_tlb_global(void) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.flush_tlb_kernel); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.flush_tlb_kernel) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.flush_tlb_kernel)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void __flush_tlb_single(unsigned long addr) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.flush_tlb_single); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.flush_tlb_single) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.flush_tlb_single)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(addr)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void flush_tlb_others(const struct cpumask *cpumask, + struct mm_struct *mm, + unsigned long va) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.flush_tlb_others); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.flush_tlb_others) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.flush_tlb_others)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(cpumask)), "d" ((unsigned long)(mm)), "c" ((unsigned long)(va)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) int paravirt_pgd_alloc(struct mm_struct *mm) +{ + return ({ int __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.pgd_alloc); if (__builtin_constant_p(((sizeof(int) > sizeof(unsigned long)))) ? !!((sizeof(int) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 397, }; ______r = !!((sizeof(int) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pgd_alloc) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.pgd_alloc)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(mm)) : "memory", "cc" ); __ret = (int)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pgd_alloc) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.pgd_alloc)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(mm)) : "memory", "cc" ); __ret = (int)__eax; } __ret; }); +} +static inline __attribute__((always_inline)) void paravirt_pgd_free(struct mm_struct *mm, pgd_t *pgd) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.pgd_free); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pgd_free) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.pgd_free)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(mm)), "d" ((unsigned long)(pgd)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void paravirt_alloc_pte(struct mm_struct *mm, unsigned long pfn) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.alloc_pte); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.alloc_pte) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.alloc_pte)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(mm)), "d" ((unsigned long)(pfn)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void paravirt_release_pte(unsigned long pfn) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.release_pte); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.release_pte) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.release_pte)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(pfn)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void paravirt_alloc_pmd(struct mm_struct *mm, unsigned long pfn) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.alloc_pmd); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.alloc_pmd) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.alloc_pmd)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(mm)), "d" ((unsigned long)(pfn)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void paravirt_release_pmd(unsigned long pfn) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.release_pmd); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.release_pmd) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.release_pmd)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(pfn)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void paravirt_alloc_pud(struct mm_struct *mm, unsigned long pfn) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.alloc_pud); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.alloc_pud) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.alloc_pud)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(mm)), "d" ((unsigned long)(pfn)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void paravirt_release_pud(unsigned long pfn) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.release_pud); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.release_pud) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.release_pud)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(pfn)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void pte_update(struct mm_struct *mm, unsigned long addr, + pte_t *ptep) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.pte_update); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pte_update) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.pte_update)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(mm)), "d" ((unsigned long)(addr)), "c" ((unsigned long)(ptep)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void pmd_update(struct mm_struct *mm, unsigned long addr, + pmd_t *pmdp) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.pmd_update); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pmd_update) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.pmd_update)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(mm)), "d" ((unsigned long)(addr)), "c" ((unsigned long)(pmdp)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void pte_update_defer(struct mm_struct *mm, unsigned long addr, + pte_t *ptep) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.pte_update_defer); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pte_update_defer) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.pte_update_defer)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(mm)), "d" ((unsigned long)(addr)), "c" ((unsigned long)(ptep)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void pmd_update_defer(struct mm_struct *mm, unsigned long addr, + pmd_t *pmdp) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.pmd_update_defer); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pmd_update_defer) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.pmd_update_defer)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(mm)), "d" ((unsigned long)(addr)), "c" ((unsigned long)(pmdp)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) pte_t __pte(pteval_t val) +{ + pteval_t ret; + if (__builtin_constant_p(((sizeof(pteval_t) > sizeof(long)))) ? !!((sizeof(pteval_t) > sizeof(long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 460, }; ______r = !!((sizeof(pteval_t) > sizeof(long))); ______f.miss_hit[______r]++; ______r; })) + ret = ({ pteval_t __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.make_pte.func); if (__builtin_constant_p(((sizeof(pteval_t) > sizeof(unsigned long)))) ? !!((sizeof(pteval_t) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h" + , .line = + 463 + , }; ______r = !!((sizeof(pteval_t) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.make_pte.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.make_pte.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(val)), "d" ((unsigned long)((u64)val >> 32)) : "memory", "cc" ); __ret = (pteval_t)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.make_pte.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.make_pte.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(val)), "d" ((unsigned long)((u64)val >> 32)) : "memory", "cc" ); __ret = (pteval_t)__eax; } __ret; }) + ; + else + ret = ({ pteval_t __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.make_pte.func); if (__builtin_constant_p(((sizeof(pteval_t) > sizeof(unsigned long)))) ? !!((sizeof(pteval_t) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h" + , .line = + 467 + , }; ______r = !!((sizeof(pteval_t) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.make_pte.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.make_pte.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(val)) : "memory", "cc" ); __ret = (pteval_t)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.make_pte.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.make_pte.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(val)) : "memory", "cc" ); __ret = (pteval_t)__eax; } __ret; }) + ; + return (pte_t) { .pte = ret }; +} +static inline __attribute__((always_inline)) pteval_t pte_val(pte_t pte) +{ + pteval_t ret; + if (__builtin_constant_p(((sizeof(pteval_t) > sizeof(long)))) ? !!((sizeof(pteval_t) > sizeof(long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 476, }; ______r = !!((sizeof(pteval_t) > sizeof(long))); ______f.miss_hit[______r]++; ______r; })) + ret = ({ pteval_t __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.pte_val.func); if (__builtin_constant_p(((sizeof(pteval_t) > sizeof(unsigned long)))) ? !!((sizeof(pteval_t) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h" + , .line = + 478 + , }; ______r = !!((sizeof(pteval_t) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pte_val.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.pte_val.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(pte.pte)), "d" ((unsigned long)((u64)pte.pte >> 32)) : "memory", "cc" ); __ret = (pteval_t)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pte_val.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.pte_val.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(pte.pte)), "d" ((unsigned long)((u64)pte.pte >> 32)) : "memory", "cc" ); __ret = (pteval_t)__eax; } __ret; }) + ; + else + ret = ({ pteval_t __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.pte_val.func); if (__builtin_constant_p(((sizeof(pteval_t) > sizeof(unsigned long)))) ? !!((sizeof(pteval_t) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h" + , .line = + 481 + , }; ______r = !!((sizeof(pteval_t) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pte_val.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.pte_val.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(pte.pte)) : "memory", "cc" ); __ret = (pteval_t)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pte_val.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.pte_val.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(pte.pte)) : "memory", "cc" ); __ret = (pteval_t)__eax; } __ret; }) + ; + return ret; +} +static inline __attribute__((always_inline)) pgd_t __pgd(pgdval_t val) +{ + pgdval_t ret; + if (__builtin_constant_p(((sizeof(pgdval_t) > sizeof(long)))) ? !!((sizeof(pgdval_t) > sizeof(long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 490, }; ______r = !!((sizeof(pgdval_t) > sizeof(long))); ______f.miss_hit[______r]++; ______r; })) + ret = ({ pgdval_t __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.make_pgd.func); if (__builtin_constant_p(((sizeof(pgdval_t) > sizeof(unsigned long)))) ? !!((sizeof(pgdval_t) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h" + , .line = + 492 + , }; ______r = !!((sizeof(pgdval_t) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.make_pgd.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.make_pgd.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(val)), "d" ((unsigned long)((u64)val >> 32)) : "memory", "cc" ); __ret = (pgdval_t)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.make_pgd.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.make_pgd.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(val)), "d" ((unsigned long)((u64)val >> 32)) : "memory", "cc" ); __ret = (pgdval_t)__eax; } __ret; }) + ; + else + ret = ({ pgdval_t __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.make_pgd.func); if (__builtin_constant_p(((sizeof(pgdval_t) > sizeof(unsigned long)))) ? !!((sizeof(pgdval_t) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h" + , .line = + 495 + , }; ______r = !!((sizeof(pgdval_t) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.make_pgd.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.make_pgd.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(val)) : "memory", "cc" ); __ret = (pgdval_t)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.make_pgd.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.make_pgd.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(val)) : "memory", "cc" ); __ret = (pgdval_t)__eax; } __ret; }) + ; + return (pgd_t) { ret }; +} +static inline __attribute__((always_inline)) pgdval_t pgd_val(pgd_t pgd) +{ + pgdval_t ret; + if (__builtin_constant_p(((sizeof(pgdval_t) > sizeof(long)))) ? !!((sizeof(pgdval_t) > sizeof(long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 504, }; ______r = !!((sizeof(pgdval_t) > sizeof(long))); ______f.miss_hit[______r]++; ______r; })) + ret = ({ pgdval_t __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.pgd_val.func); if (__builtin_constant_p(((sizeof(pgdval_t) > sizeof(unsigned long)))) ? !!((sizeof(pgdval_t) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h" + , .line = + 506 + , }; ______r = !!((sizeof(pgdval_t) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pgd_val.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.pgd_val.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(pgd.pgd)), "d" ((unsigned long)((u64)pgd.pgd >> 32)) : "memory", "cc" ); __ret = (pgdval_t)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pgd_val.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.pgd_val.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(pgd.pgd)), "d" ((unsigned long)((u64)pgd.pgd >> 32)) : "memory", "cc" ); __ret = (pgdval_t)__eax; } __ret; }) + ; + else + ret = ({ pgdval_t __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.pgd_val.func); if (__builtin_constant_p(((sizeof(pgdval_t) > sizeof(unsigned long)))) ? !!((sizeof(pgdval_t) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h" + , .line = + 509 + , }; ______r = !!((sizeof(pgdval_t) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pgd_val.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.pgd_val.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(pgd.pgd)) : "memory", "cc" ); __ret = (pgdval_t)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pgd_val.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.pgd_val.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(pgd.pgd)) : "memory", "cc" ); __ret = (pgdval_t)__eax; } __ret; }) + ; + return ret; +} +static inline __attribute__((always_inline)) pte_t ptep_modify_prot_start(struct mm_struct *mm, unsigned long addr, + pte_t *ptep) +{ + pteval_t ret; + ret = ({ pteval_t __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.ptep_modify_prot_start); if (__builtin_constant_p(((sizeof(pteval_t) > sizeof(unsigned long)))) ? !!((sizeof(pteval_t) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h" + , .line = + 521 + , }; ______r = !!((sizeof(pteval_t) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.ptep_modify_prot_start) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.ptep_modify_prot_start)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(mm)), "d" ((unsigned long)(addr)), "c" ((unsigned long)(ptep)) : "memory", "cc" ); __ret = (pteval_t)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.ptep_modify_prot_start) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.ptep_modify_prot_start)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(mm)), "d" ((unsigned long)(addr)), "c" ((unsigned long)(ptep)) : "memory", "cc" ); __ret = (pteval_t)__eax; } __ret; }) + ; + return (pte_t) { .pte = ret }; +} +static inline __attribute__((always_inline)) void ptep_modify_prot_commit(struct mm_struct *mm, unsigned long addr, + pte_t *ptep, pte_t pte) +{ + if (__builtin_constant_p(((sizeof(pteval_t) > sizeof(long)))) ? !!((sizeof(pteval_t) > sizeof(long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 529, }; ______r = !!((sizeof(pteval_t) > sizeof(long))); ______f.miss_hit[______r]++; ______r; })) + pv_mmu_ops.ptep_modify_prot_commit(mm, addr, ptep, pte); + else + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.ptep_modify_prot_commit); asm volatile("push %[_arg4];" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "lea 4(%%esp),%%esp;" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.ptep_modify_prot_commit) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.ptep_modify_prot_commit)), [paravirt_clobber] "i" (((1 << 4) - 1)), "0" ((u32)(mm)), "1" ((u32)(addr)), "2" ((u32)(ptep)), [_arg4] "mr" ((u32)(pte.pte)) : "memory", "cc" ); }) + ; +} +static inline __attribute__((always_inline)) void set_pte(pte_t *ptep, pte_t pte) +{ + if (__builtin_constant_p(((sizeof(pteval_t) > sizeof(long)))) ? !!((sizeof(pteval_t) > sizeof(long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 539, }; ______r = !!((sizeof(pteval_t) > sizeof(long))); ______f.miss_hit[______r]++; ______r; })) + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.set_pte); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.set_pte) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.set_pte)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(ptep)), "d" ((unsigned long)(pte.pte)), "c" ((unsigned long)((u64)pte.pte >> 32)) : "memory", "cc" ); }) + ; + else + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.set_pte); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.set_pte) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.set_pte)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(ptep)), "d" ((unsigned long)(pte.pte)) : "memory", "cc" ); }) + ; +} +static inline __attribute__((always_inline)) void set_pte_at(struct mm_struct *mm, unsigned long addr, + pte_t *ptep, pte_t pte) +{ + if (__builtin_constant_p(((sizeof(pteval_t) > sizeof(long)))) ? !!((sizeof(pteval_t) > sizeof(long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 550, }; ______r = !!((sizeof(pteval_t) > sizeof(long))); ______f.miss_hit[______r]++; ______r; })) + pv_mmu_ops.set_pte_at(mm, addr, ptep, pte); + else + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.set_pte_at); asm volatile("push %[_arg4];" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "lea 4(%%esp),%%esp;" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.set_pte_at) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.set_pte_at)), [paravirt_clobber] "i" (((1 << 4) - 1)), "0" ((u32)(mm)), "1" ((u32)(addr)), "2" ((u32)(ptep)), [_arg4] "mr" ((u32)(pte.pte)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void set_pmd_at(struct mm_struct *mm, unsigned long addr, + pmd_t *pmdp, pmd_t pmd) +{ + if (__builtin_constant_p(((sizeof(pmdval_t) > sizeof(long)))) ? !!((sizeof(pmdval_t) > sizeof(long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 561, }; ______r = !!((sizeof(pmdval_t) > sizeof(long))); ______f.miss_hit[______r]++; ______r; })) + pv_mmu_ops.set_pmd_at(mm, addr, pmdp, pmd); + else + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.set_pmd_at); asm volatile("push %[_arg4];" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "lea 4(%%esp),%%esp;" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.set_pmd_at) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.set_pmd_at)), [paravirt_clobber] "i" (((1 << 4) - 1)), "0" ((u32)(mm)), "1" ((u32)(addr)), "2" ((u32)(pmdp)), [_arg4] "mr" ((u32)(native_pmd_val(pmd))) : "memory", "cc" ); }) + ; +} +static inline __attribute__((always_inline)) void set_pmd(pmd_t *pmdp, pmd_t pmd) +{ + pmdval_t val = native_pmd_val(pmd); + if (__builtin_constant_p(((sizeof(pmdval_t) > sizeof(long)))) ? !!((sizeof(pmdval_t) > sizeof(long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 574, }; ______r = !!((sizeof(pmdval_t) > sizeof(long))); ______f.miss_hit[______r]++; ______r; })) + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.set_pmd); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.set_pmd) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.set_pmd)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(pmdp)), "d" ((unsigned long)(val)), "c" ((unsigned long)((u64)val >> 32)) : "memory", "cc" ); }); + else + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.set_pmd); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.set_pmd) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.set_pmd)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(pmdp)), "d" ((unsigned long)(val)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) pmd_t __pmd(pmdval_t val) +{ + pmdval_t ret; + if (__builtin_constant_p(((sizeof(pmdval_t) > sizeof(long)))) ? !!((sizeof(pmdval_t) > sizeof(long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 585, }; ______r = !!((sizeof(pmdval_t) > sizeof(long))); ______f.miss_hit[______r]++; ______r; })) + ret = ({ pmdval_t __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.make_pmd.func); if (__builtin_constant_p(((sizeof(pmdval_t) > sizeof(unsigned long)))) ? !!((sizeof(pmdval_t) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h" + , .line = + 587 + , }; ______r = !!((sizeof(pmdval_t) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.make_pmd.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.make_pmd.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(val)), "d" ((unsigned long)((u64)val >> 32)) : "memory", "cc" ); __ret = (pmdval_t)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.make_pmd.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.make_pmd.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(val)), "d" ((unsigned long)((u64)val >> 32)) : "memory", "cc" ); __ret = (pmdval_t)__eax; } __ret; }) + ; + else + ret = ({ pmdval_t __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.make_pmd.func); if (__builtin_constant_p(((sizeof(pmdval_t) > sizeof(unsigned long)))) ? !!((sizeof(pmdval_t) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h" + , .line = + 590 + , }; ______r = !!((sizeof(pmdval_t) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.make_pmd.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.make_pmd.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(val)) : "memory", "cc" ); __ret = (pmdval_t)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.make_pmd.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.make_pmd.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(val)) : "memory", "cc" ); __ret = (pmdval_t)__eax; } __ret; }) + ; + return (pmd_t) { ret }; +} +static inline __attribute__((always_inline)) pmdval_t pmd_val(pmd_t pmd) +{ + pmdval_t ret; + if (__builtin_constant_p(((sizeof(pmdval_t) > sizeof(long)))) ? !!((sizeof(pmdval_t) > sizeof(long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 599, }; ______r = !!((sizeof(pmdval_t) > sizeof(long))); ______f.miss_hit[______r]++; ______r; })) + ret = ({ pmdval_t __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.pmd_val.func); if (__builtin_constant_p(((sizeof(pmdval_t) > sizeof(unsigned long)))) ? !!((sizeof(pmdval_t) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h" + , .line = + 601 + , }; ______r = !!((sizeof(pmdval_t) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pmd_val.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.pmd_val.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(pmd.pmd)), "d" ((unsigned long)((u64)pmd.pmd >> 32)) : "memory", "cc" ); __ret = (pmdval_t)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pmd_val.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.pmd_val.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(pmd.pmd)), "d" ((unsigned long)((u64)pmd.pmd >> 32)) : "memory", "cc" ); __ret = (pmdval_t)__eax; } __ret; }) + ; + else + ret = ({ pmdval_t __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.pmd_val.func); if (__builtin_constant_p(((sizeof(pmdval_t) > sizeof(unsigned long)))) ? !!((sizeof(pmdval_t) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h" + , .line = + 604 + , }; ______r = !!((sizeof(pmdval_t) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pmd_val.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.pmd_val.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(pmd.pmd)) : "memory", "cc" ); __ret = (pmdval_t)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pmd_val.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.pmd_val.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(pmd.pmd)) : "memory", "cc" ); __ret = (pmdval_t)__eax; } __ret; }) + ; + return ret; +} +static inline __attribute__((always_inline)) void set_pud(pud_t *pudp, pud_t pud) +{ + pudval_t val = native_pud_val(pud); + if (__builtin_constant_p(((sizeof(pudval_t) > sizeof(long)))) ? !!((sizeof(pudval_t) > sizeof(long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 613, }; ______r = !!((sizeof(pudval_t) > sizeof(long))); ______f.miss_hit[______r]++; ______r; })) + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.set_pud); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.set_pud) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.set_pud)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(pudp)), "d" ((unsigned long)(val)), "c" ((unsigned long)((u64)val >> 32)) : "memory", "cc" ); }) + ; + else + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.set_pud); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.set_pud) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.set_pud)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(pudp)), "d" ((unsigned long)(val)) : "memory", "cc" ); }) + ; +} +static inline __attribute__((always_inline)) void set_pte_atomic(pte_t *ptep, pte_t pte) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.set_pte_atomic); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.set_pte_atomic) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.set_pte_atomic)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(ptep)), "d" ((unsigned long)(pte.pte)), "c" ((unsigned long)(pte.pte >> 32)) : "memory", "cc" ); }) + ; +} +static inline __attribute__((always_inline)) void pte_clear(struct mm_struct *mm, unsigned long addr, + pte_t *ptep) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.pte_clear); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pte_clear) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.pte_clear)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(mm)), "d" ((unsigned long)(addr)), "c" ((unsigned long)(ptep)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void pmd_clear(pmd_t *pmdp) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.pmd_clear); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.pmd_clear) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.pmd_clear)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(pmdp)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void arch_start_context_switch(struct task_struct *prev) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.start_context_switch); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.start_context_switch) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.start_context_switch)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(prev)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void arch_end_context_switch(struct task_struct *next) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_cpu_ops.end_context_switch); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_cpu_ops.end_context_switch) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_cpu_ops.end_context_switch)), [paravirt_clobber] "i" (((1 << 4) - 1)), "a" ((unsigned long)(next)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void arch_enter_lazy_mmu_mode(void) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.lazy_mode.enter); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.lazy_mode.enter) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.lazy_mode.enter)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) void arch_leave_lazy_mmu_mode(void) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_mmu_ops.lazy_mode.leave); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx), "=c" (__ecx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_mmu_ops.lazy_mode.leave) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_mmu_ops.lazy_mode.leave)), [paravirt_clobber] "i" (((1 << 4) - 1)) : "memory", "cc" ); }); +} +void arch_flush_lazy_mmu_mode(void); +static inline __attribute__((always_inline)) void __set_fixmap(unsigned idx, + phys_addr_t phys, pgprot_t flags) +{ + pv_mmu_ops.set_fixmap(idx, phys, flags); +} +static inline __attribute__((always_inline)) __attribute__((no_instrument_function)) unsigned long arch_local_save_flags(void) +{ + return ({ unsigned long __ret; unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_irq_ops.save_fl.func); if (__builtin_constant_p(((sizeof(unsigned long) > sizeof(unsigned long)))) ? !!((sizeof(unsigned long) > sizeof(unsigned long))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/paravirt.h", .line = 853, }; ______r = !!((sizeof(unsigned long) > sizeof(unsigned long))); ______f.miss_hit[______r]++; ______r; })) { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_irq_ops.save_fl.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_irq_ops.save_fl.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))) : "memory", "cc" ); __ret = (unsigned long)((((u64)__edx) << 32) | __eax); } else { asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_irq_ops.save_fl.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_irq_ops.save_fl.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))) : "memory", "cc" ); __ret = (unsigned long)__eax; } __ret; }); +} +static inline __attribute__((always_inline)) __attribute__((no_instrument_function)) void arch_local_irq_restore(unsigned long f) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_irq_ops.restore_fl.func); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_irq_ops.restore_fl.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_irq_ops.restore_fl.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))), "a" ((unsigned long)(f)) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) __attribute__((no_instrument_function)) void arch_local_irq_disable(void) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_irq_ops.irq_disable.func); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_irq_ops.irq_disable.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_irq_ops.irq_disable.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) __attribute__((no_instrument_function)) void arch_local_irq_enable(void) +{ + ({ unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; ((void)pv_irq_ops.irq_enable.func); asm volatile("" "771:\n\t" "call *%c[paravirt_opptr];" "\n" "772:\n" ".pushsection .parainstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " " 771b\n" " .byte " "%c[paravirt_typenum]" "\n" " .byte 772b-771b\n" " .short " "%c[paravirt_clobber]" "\n" ".popsection\n" "" : "=a" (__eax), "=d" (__edx) : [paravirt_typenum] "i" ((__builtin_offsetof(struct paravirt_patch_template,pv_irq_ops.irq_enable.func) / sizeof(void *))), [paravirt_opptr] "i" (&(pv_irq_ops.irq_enable.func)), [paravirt_clobber] "i" (((1 << 0) | (1 << 2))) : "memory", "cc" ); }); +} +static inline __attribute__((always_inline)) __attribute__((no_instrument_function)) unsigned long arch_local_irq_save(void) +{ + unsigned long f; + f = arch_local_save_flags(); + arch_local_irq_disable(); + return f; +} +extern void default_banner(void); +static inline __attribute__((always_inline)) int arch_irqs_disabled_flags(unsigned long flags) +{ + return !(flags & 0x00000200); +} +static inline __attribute__((always_inline)) int arch_irqs_disabled(void) +{ + unsigned long flags = arch_local_save_flags(); + return arch_irqs_disabled_flags(flags); +} + extern void trace_softirqs_on(unsigned long ip); + extern void trace_softirqs_off(unsigned long ip); + extern void trace_hardirqs_on(void); + extern void trace_hardirqs_off(void); + extern void stop_critical_timings(void); + extern void start_critical_timings(void); +struct task_struct; +struct task_struct *__switch_to(struct task_struct *prev, + struct task_struct *next); +struct tss_struct; +void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p, + struct tss_struct *tss); +extern void show_regs_common(void); +extern void native_load_gs_index(unsigned); +static inline __attribute__((always_inline)) unsigned long get_limit(unsigned long segment) +{ + unsigned long __limit; + asm("lsll %1,%0" : "=r" (__limit) : "r" (segment)); + return __limit + 1; +} +static inline __attribute__((always_inline)) void native_clts(void) +{ + asm volatile("clts"); +} +static unsigned long __force_order; +static inline __attribute__((always_inline)) unsigned long native_read_cr0(void) +{ + unsigned long val; + asm volatile("mov %%cr0,%0\n\t" : "=r" (val), "=m" (__force_order)); + return val; +} +static inline __attribute__((always_inline)) void native_write_cr0(unsigned long val) +{ + asm volatile("mov %0,%%cr0": : "r" (val), "m" (__force_order)); +} +static inline __attribute__((always_inline)) unsigned long native_read_cr2(void) +{ + unsigned long val; + asm volatile("mov %%cr2,%0\n\t" : "=r" (val), "=m" (__force_order)); + return val; +} +static inline __attribute__((always_inline)) void native_write_cr2(unsigned long val) +{ + asm volatile("mov %0,%%cr2": : "r" (val), "m" (__force_order)); +} +static inline __attribute__((always_inline)) unsigned long native_read_cr3(void) +{ + unsigned long val; + asm volatile("mov %%cr3,%0\n\t" : "=r" (val), "=m" (__force_order)); + return val; +} +static inline __attribute__((always_inline)) void native_write_cr3(unsigned long val) +{ + asm volatile("mov %0,%%cr3": : "r" (val), "m" (__force_order)); +} +static inline __attribute__((always_inline)) unsigned long native_read_cr4(void) +{ + unsigned long val; + asm volatile("mov %%cr4,%0\n\t" : "=r" (val), "=m" (__force_order)); + return val; +} +static inline __attribute__((always_inline)) unsigned long native_read_cr4_safe(void) +{ + unsigned long val; + asm volatile("1: mov %%cr4, %0\n" + "2:\n" + " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "2b" "\n" " .previous\n" + : "=r" (val), "=m" (__force_order) : "0" (0)); + return val; +} +static inline __attribute__((always_inline)) void native_write_cr4(unsigned long val) +{ + asm volatile("mov %0,%%cr4": : "r" (val), "m" (__force_order)); +} +static inline __attribute__((always_inline)) void native_wbinvd(void) +{ + asm volatile("wbinvd": : :"memory"); +} +static inline __attribute__((always_inline)) void clflush(volatile void *__p) +{ + asm volatile("clflush %0" : "+m" (*(volatile char *)__p)); +} +void disable_hlt(void); +void enable_hlt(void); +void cpu_idle_wait(void); +extern unsigned long arch_align_stack(unsigned long sp); +extern void free_init_pages(char *what, unsigned long begin, unsigned long end); +void default_idle(void); +void stop_this_cpu(void *dummy); +static inline __attribute__((always_inline)) __attribute__((always_inline)) void rdtsc_barrier(void) +{ + asm volatile ("661:\n\t" ".byte " "0x8d,0x76,0x00" "\n" "\n662:\n" ".section .altinstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "661b\n" " " ".long" " " "663f\n" " .word " "(3*32+17)" "\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .discard,\"aw\",@progbits\n" " .byte 0xff + (664f-663f) - (662b-661b)\n" ".previous\n" ".section .altinstr_replacement, \"ax\"\n" "663:\n\t" "mfence" "\n664:\n" ".previous" : : : "memory"); + asm volatile ("661:\n\t" ".byte " "0x8d,0x76,0x00" "\n" "\n662:\n" ".section .altinstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "661b\n" " " ".long" " " "663f\n" " .word " "(3*32+18)" "\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .discard,\"aw\",@progbits\n" " .byte 0xff + (664f-663f) - (662b-661b)\n" ".previous\n" ".section .altinstr_replacement, \"ax\"\n" "663:\n\t" "lfence" "\n664:\n" ".previous" : : : "memory"); +} +extern unsigned int __invalid_size_argument_for_IOC; +extern cpumask_var_t cpu_callin_mask; +extern cpumask_var_t cpu_callout_mask; +extern cpumask_var_t cpu_initialized_mask; +extern cpumask_var_t cpu_sibling_setup_mask; +extern void setup_cpu_local_masks(void); +struct msr { + union { + struct { + u32 l; + u32 h; + }; + u64 q; + }; +}; +struct msr_info { + u32 msr_no; + struct msr reg; + struct msr *msrs; + int err; +}; +struct msr_regs_info { + u32 *regs; + int err; +}; +static inline __attribute__((always_inline)) unsigned long long native_read_tscp(unsigned int *aux) +{ + unsigned long low, high; + asm volatile(".byte 0x0f,0x01,0xf9" + : "=a" (low), "=d" (high), "=c" (*aux)); + return low | ((u64)high << 32); +} +static inline __attribute__((always_inline)) unsigned long long native_read_msr(unsigned int msr) +{ + unsigned long long val; + asm volatile("rdmsr" : "=A" (val) : "c" (msr)); + return (val); +} +static inline __attribute__((always_inline)) unsigned long long native_read_msr_safe(unsigned int msr, + int *err) +{ + unsigned long long val; + asm volatile("2: rdmsr ; xor %[err],%[err]\n" + "1:\n\t" + ".section .fixup,\"ax\"\n\t" + "3: mov %[fault],%[err] ; jmp 1b\n\t" + ".previous\n\t" + " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "2b" "," "3b" "\n" " .previous\n" + : [err] "=r" (*err), "=A" (val) + : "c" (msr), [fault] "i" (-5)); + return (val); +} +static inline __attribute__((always_inline)) void native_write_msr(unsigned int msr, + unsigned low, unsigned high) +{ + asm volatile("wrmsr" : : "c" (msr), "a"(low), "d" (high) : "memory"); +} +__attribute__((no_instrument_function)) static inline __attribute__((always_inline)) int native_write_msr_safe(unsigned int msr, + unsigned low, unsigned high) +{ + int err; + asm volatile("2: wrmsr ; xor %[err],%[err]\n" + "1:\n\t" + ".section .fixup,\"ax\"\n\t" + "3: mov %[fault],%[err] ; jmp 1b\n\t" + ".previous\n\t" + " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "2b" "," "3b" "\n" " .previous\n" + : [err] "=a" (err) + : "c" (msr), "0" (low), "d" (high), + [fault] "i" (-5) + : "memory"); + return err; +} +extern unsigned long long native_read_tsc(void); +extern int native_rdmsr_safe_regs(u32 regs[8]); +extern int native_wrmsr_safe_regs(u32 regs[8]); +static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned long long __native_read_tsc(void) +{ + unsigned long long val; + asm volatile("rdtsc" : "=A" (val)); + return (val); +} +static inline __attribute__((always_inline)) unsigned long long native_read_pmc(int counter) +{ + unsigned long long val; + asm volatile("rdpmc" : "=A" (val) : "c" (counter)); + return (val); +} +struct msr *msrs_alloc(void); +void msrs_free(struct msr *msrs); +int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); +int wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); +void rdmsr_on_cpus(const struct cpumask *mask, u32 msr_no, struct msr *msrs); +void wrmsr_on_cpus(const struct cpumask *mask, u32 msr_no, struct msr *msrs); +int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h); +int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h); +int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8]); +int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8]); +struct exec_domain; +struct pt_regs; +extern int register_exec_domain(struct exec_domain *); +extern int unregister_exec_domain(struct exec_domain *); +extern int __set_personality(unsigned int); +enum { + UNAME26 = 0x0020000, + ADDR_NO_RANDOMIZE = 0x0040000, + FDPIC_FUNCPTRS = 0x0080000, + MMAP_PAGE_ZERO = 0x0100000, + ADDR_COMPAT_LAYOUT = 0x0200000, + READ_IMPLIES_EXEC = 0x0400000, + ADDR_LIMIT_32BIT = 0x0800000, + SHORT_INODE = 0x1000000, + WHOLE_SECONDS = 0x2000000, + STICKY_TIMEOUTS = 0x4000000, + ADDR_LIMIT_3GB = 0x8000000, +}; +enum { + PER_LINUX = 0x0000, + PER_LINUX_32BIT = 0x0000 | ADDR_LIMIT_32BIT, + PER_LINUX_FDPIC = 0x0000 | FDPIC_FUNCPTRS, + PER_SVR4 = 0x0001 | STICKY_TIMEOUTS | MMAP_PAGE_ZERO, + PER_SVR3 = 0x0002 | STICKY_TIMEOUTS | SHORT_INODE, + PER_SCOSVR3 = 0x0003 | STICKY_TIMEOUTS | + WHOLE_SECONDS | SHORT_INODE, + PER_OSR5 = 0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS, + PER_WYSEV386 = 0x0004 | STICKY_TIMEOUTS | SHORT_INODE, + PER_ISCR4 = 0x0005 | STICKY_TIMEOUTS, + PER_BSD = 0x0006, + PER_SUNOS = 0x0006 | STICKY_TIMEOUTS, + PER_XENIX = 0x0007 | STICKY_TIMEOUTS | SHORT_INODE, + PER_LINUX32 = 0x0008, + PER_LINUX32_3GB = 0x0008 | ADDR_LIMIT_3GB, + PER_IRIX32 = 0x0009 | STICKY_TIMEOUTS, + PER_IRIXN32 = 0x000a | STICKY_TIMEOUTS, + PER_IRIX64 = 0x000b | STICKY_TIMEOUTS, + PER_RISCOS = 0x000c, + PER_SOLARIS = 0x000d | STICKY_TIMEOUTS, + PER_UW7 = 0x000e | STICKY_TIMEOUTS | MMAP_PAGE_ZERO, + PER_OSF4 = 0x000f, + PER_HPUX = 0x0010, + PER_MASK = 0x00ff, +}; +typedef void (*handler_t)(int, struct pt_regs *); +struct exec_domain { + const char *name; + handler_t handler; + unsigned char pers_low; + unsigned char pers_high; + unsigned long *signal_map; + unsigned long *signal_invmap; + struct map_segment *err_map; + struct map_segment *socktype_map; + struct map_segment *sockopt_map; + struct map_segment *af_map; + struct module *module; + struct exec_domain *next; +}; +extern s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder); +extern u64 div64_u64(u64 dividend, u64 divisor); +extern s64 div64_s64(s64 dividend, s64 divisor); +static inline __attribute__((always_inline)) u64 div_u64(u64 dividend, u32 divisor) +{ + u32 remainder; + return div_u64_rem(dividend, divisor, &remainder); +} +static inline __attribute__((always_inline)) s64 div_s64(s64 dividend, s32 divisor) +{ + s32 remainder; + return div_s64_rem(dividend, divisor, &remainder); +} +u32 iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder); +static inline __attribute__((always_inline)) __attribute__((always_inline)) u32 +__iter_div_u64_rem(u64 dividend, u32 divisor, u64 *remainder) +{ + u32 ret = 0; + while (dividend >= divisor) { + asm("" : "+rm"(dividend)); + dividend -= divisor; + ret++; + } + *remainder = dividend; + return ret; +} +static inline __attribute__((always_inline)) void * __attribute__((warn_unused_result)) ERR_PTR(long error) +{ + return (void *) error; +} +static inline __attribute__((always_inline)) long __attribute__((warn_unused_result)) PTR_ERR(const void *ptr) +{ + return (long) ptr; +} +static inline __attribute__((always_inline)) long __attribute__((warn_unused_result)) IS_ERR(const void *ptr) +{ + return (__builtin_constant_p(((unsigned long)ptr) >= (unsigned long)-4095) ? !!(((unsigned long)ptr) >= (unsigned long)-4095) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/err.h", .line = 34, }; ______r = __builtin_expect(!!(((unsigned long)ptr) >= (unsigned long)-4095), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })); +} +static inline __attribute__((always_inline)) long __attribute__((warn_unused_result)) IS_ERR_OR_NULL(const void *ptr) +{ + return !ptr || (__builtin_constant_p(((unsigned long)ptr) >= (unsigned long)-4095) ? !!(((unsigned long)ptr) >= (unsigned long)-4095) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/err.h", .line = 39, }; ______r = __builtin_expect(!!(((unsigned long)ptr) >= (unsigned long)-4095), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })); +} +static inline __attribute__((always_inline)) void * __attribute__((warn_unused_result)) ERR_CAST(const void *ptr) +{ + return (void *) ptr; +} +static inline __attribute__((always_inline)) int __attribute__((warn_unused_result)) PTR_RET(const void *ptr) +{ + if (__builtin_constant_p(((IS_ERR(ptr)))) ? !!((IS_ERR(ptr))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/err.h", .line = 57, }; ______r = !!((IS_ERR(ptr))); ______f.miss_hit[______r]++; ______r; })) + return PTR_ERR(ptr); + else + return 0; +} +static inline __attribute__((always_inline)) void *current_text_addr(void) +{ + void *pc; + asm volatile("mov $1f, %0; 1:":"=r" (pc)); + return pc; +} +struct cpuinfo_x86 { + __u8 x86; + __u8 x86_vendor; + __u8 x86_model; + __u8 x86_mask; + char wp_works_ok; + char hlt_works_ok; + char hard_math; + char rfu; + char fdiv_bug; + char f00f_bug; + char coma_bug; + char pad0; + __u8 x86_virt_bits; + __u8 x86_phys_bits; + __u8 x86_coreid_bits; + __u32 extended_cpuid_level; + int cpuid_level; + __u32 x86_capability[10]; + char x86_vendor_id[16]; + char x86_model_id[64]; + int x86_cache_size; + int x86_cache_alignment; + int x86_power; + unsigned long loops_per_jiffy; + u16 x86_max_cores; + u16 apicid; + u16 initial_apicid; + u16 x86_clflush_size; + u16 booted_cores; + u16 phys_proc_id; + u16 cpu_core_id; + u8 compute_unit_id; + u16 cpu_index; +} __attribute__((__aligned__((1 << (6))))); +extern struct cpuinfo_x86 boot_cpu_data; +extern struct cpuinfo_x86 new_cpu_data; +extern struct tss_struct doublefault_tss; +extern __u32 cpu_caps_cleared[10]; +extern __u32 cpu_caps_set[10]; +extern __attribute__((section(".data..percpu" ""))) __typeof__(struct cpuinfo_x86) cpu_info __attribute__((__aligned__((1 << (6))))); +extern const struct seq_operations cpuinfo_op; +static inline __attribute__((always_inline)) int hlt_works(int cpu) +{ + return (*({ do { const void *__vpp_verify = (typeof((&(cpu_info))))((void *)0); (void)__vpp_verify; } while (0); ({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"((typeof(*(&(cpu_info))) *)(&(cpu_info)))); (typeof((typeof(*(&(cpu_info))) *)(&(cpu_info)))) (__ptr + (((__per_cpu_offset[cpu])))); }); })).hlt_works_ok; +} +extern void cpu_detect(struct cpuinfo_x86 *c); +extern struct pt_regs *idle_regs(struct pt_regs *); +extern void early_cpu_init(void); +extern void identify_boot_cpu(void); +extern void identify_secondary_cpu(struct cpuinfo_x86 *); +extern void print_cpu_info(struct cpuinfo_x86 *); +extern void init_scattered_cpuid_features(struct cpuinfo_x86 *c); +extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c); +extern unsigned short num_cache_leaves; +extern void detect_extended_topology(struct cpuinfo_x86 *c); +extern void detect_ht(struct cpuinfo_x86 *c); +static inline __attribute__((always_inline)) void native_cpuid(unsigned int *eax, unsigned int *ebx, + unsigned int *ecx, unsigned int *edx) +{ + asm volatile("cpuid" + : "=a" (*eax), + "=b" (*ebx), + "=c" (*ecx), + "=d" (*edx) + : "0" (*eax), "2" (*ecx)); +} +static inline __attribute__((always_inline)) void load_cr3(pgd_t *pgdir) +{ + write_cr3((((unsigned long)(pgdir)) - ((unsigned long)(0xC0000000UL)))); +} +struct x86_hw_tss { + unsigned short back_link, __blh; + unsigned long sp0; + unsigned short ss0, __ss0h; + unsigned long sp1; + unsigned short ss1, __ss1h; + unsigned long sp2; + unsigned short ss2, __ss2h; + unsigned long __cr3; + unsigned long ip; + unsigned long flags; + unsigned long ax; + unsigned long cx; + unsigned long dx; + unsigned long bx; + unsigned long sp; + unsigned long bp; + unsigned long si; + unsigned long di; + unsigned short es, __esh; + unsigned short cs, __csh; + unsigned short ss, __ssh; + unsigned short ds, __dsh; + unsigned short fs, __fsh; + unsigned short gs, __gsh; + unsigned short ldt, __ldth; + unsigned short trace; + unsigned short io_bitmap_base; +} __attribute__((packed)); +struct tss_struct { + struct x86_hw_tss x86_tss; + unsigned long io_bitmap[((65536/8)/sizeof(long)) + 1]; + unsigned long stack[64]; +} __attribute__((__aligned__((1 << (6))))); +extern __attribute__((section(".data..percpu" ""))) __typeof__(struct tss_struct) init_tss __attribute__((__aligned__((1 << (6))))); +struct orig_ist { + unsigned long ist[7]; +}; +struct i387_fsave_struct { + u32 cwd; + u32 swd; + u32 twd; + u32 fip; + u32 fcs; + u32 foo; + u32 fos; + u32 st_space[20]; + u32 status; +}; +struct i387_fxsave_struct { + u16 cwd; + u16 swd; + u16 twd; + u16 fop; + union { + struct { + u64 rip; + u64 rdp; + }; + struct { + u32 fip; + u32 fcs; + u32 foo; + u32 fos; + }; + }; + u32 mxcsr; + u32 mxcsr_mask; + u32 st_space[32]; + u32 xmm_space[64]; + u32 padding[12]; + union { + u32 padding1[12]; + u32 sw_reserved[12]; + }; +} __attribute__((aligned(16))); +struct i387_soft_struct { + u32 cwd; + u32 swd; + u32 twd; + u32 fip; + u32 fcs; + u32 foo; + u32 fos; + u32 st_space[20]; + u8 ftop; + u8 changed; + u8 lookahead; + u8 no_update; + u8 rm; + u8 alimit; + struct math_emu_info *info; + u32 entry_eip; +}; +struct ymmh_struct { + u32 ymmh_space[64]; +}; +struct xsave_hdr_struct { + u64 xstate_bv; + u64 reserved1[2]; + u64 reserved2[5]; +} __attribute__((packed)); +struct xsave_struct { + struct i387_fxsave_struct i387; + struct xsave_hdr_struct xsave_hdr; + struct ymmh_struct ymmh; +} __attribute__ ((packed, aligned (64))); +union thread_xstate { + struct i387_fsave_struct fsave; + struct i387_fxsave_struct fxsave; + struct i387_soft_struct soft; + struct xsave_struct xsave; +}; +struct fpu { + union thread_xstate *state; +}; +struct stack_canary { + char __pad[20]; + unsigned long canary; +}; +extern __attribute__((section(".data..percpu" ""))) __typeof__(struct stack_canary) stack_canary __attribute__((__aligned__((1 << (6))))); +extern unsigned int xstate_size; +extern void free_thread_xstate(struct task_struct *); +extern struct kmem_cache *task_xstate_cachep; +struct perf_event; +struct thread_struct { + struct desc_struct tls_array[3]; + unsigned long sp0; + unsigned long sp; + unsigned long sysenter_cs; + unsigned long ip; + unsigned long gs; + struct perf_event *ptrace_bps[4]; + unsigned long debugreg6; + unsigned long ptrace_dr7; + unsigned long cr2; + unsigned long trap_no; + unsigned long error_code; + struct fpu fpu; + struct vm86_struct *vm86_info; + unsigned long screen_bitmap; + unsigned long v86flags; + unsigned long v86mask; + unsigned long saved_sp0; + unsigned int saved_fs; + unsigned int saved_gs; + unsigned long *io_bitmap_ptr; + unsigned long iopl; + unsigned io_bitmap_max; +}; +static inline __attribute__((always_inline)) unsigned long native_get_debugreg(int regno) +{ + unsigned long val = 0; + switch (regno) { + case 0: + asm("mov %%db0, %0" :"=r" (val)); + break; + case 1: + asm("mov %%db1, %0" :"=r" (val)); + break; + case 2: + asm("mov %%db2, %0" :"=r" (val)); + break; + case 3: + asm("mov %%db3, %0" :"=r" (val)); + break; + case 6: + asm("mov %%db6, %0" :"=r" (val)); + break; + case 7: + asm("mov %%db7, %0" :"=r" (val)); + break; + default: + do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h"), "i" (499), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); + } + return val; +} +static inline __attribute__((always_inline)) void native_set_debugreg(int regno, unsigned long value) +{ + switch (regno) { + case 0: + asm("mov %0, %%db0" ::"r" (value)); + break; + case 1: + asm("mov %0, %%db1" ::"r" (value)); + break; + case 2: + asm("mov %0, %%db2" ::"r" (value)); + break; + case 3: + asm("mov %0, %%db3" ::"r" (value)); + break; + case 6: + asm("mov %0, %%db6" ::"r" (value)); + break; + case 7: + asm("mov %0, %%db7" ::"r" (value)); + break; + default: + do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h"), "i" (526), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); + } +} +static inline __attribute__((always_inline)) void native_set_iopl_mask(unsigned mask) +{ + unsigned int reg; + asm volatile ("pushfl;" + "popl %0;" + "andl %1, %0;" + "orl %2, %0;" + "pushl %0;" + "popfl" + : "=&r" (reg) + : "i" (~0x00003000), "r" (mask)); +} +static inline __attribute__((always_inline)) void +native_load_sp0(struct tss_struct *tss, struct thread_struct *thread) +{ + tss->x86_tss.sp0 = thread->sp0; + if (__builtin_constant_p((((__builtin_constant_p(tss->x86_tss.ss1 != thread->sysenter_cs) ? !!(tss->x86_tss.ss1 != thread->sysenter_cs) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 555, }; ______r = __builtin_expect(!!(tss->x86_tss.ss1 != thread->sysenter_cs), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(tss->x86_tss.ss1 != thread->sysenter_cs) ? !!(tss->x86_tss.ss1 != thread->sysenter_cs) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 555, }; ______r = __builtin_expect(!!(tss->x86_tss.ss1 != thread->sysenter_cs), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 555, }; ______r = !!(((__builtin_constant_p(tss->x86_tss.ss1 != thread->sysenter_cs) ? !!(tss->x86_tss.ss1 != thread->sysenter_cs) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 555, }; ______r = __builtin_expect(!!(tss->x86_tss.ss1 != thread->sysenter_cs), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) { + tss->x86_tss.ss1 = thread->sysenter_cs; + do { paravirt_write_msr(0x00000174, thread->sysenter_cs, 0); } while (0); + } +} +static inline __attribute__((always_inline)) void native_swapgs(void) +{ +} +extern unsigned long mmu_cr4_features; +static inline __attribute__((always_inline)) void set_in_cr4(unsigned long mask) +{ + unsigned long cr4; + mmu_cr4_features |= mask; + cr4 = read_cr4(); + cr4 |= mask; + write_cr4(cr4); +} +static inline __attribute__((always_inline)) void clear_in_cr4(unsigned long mask) +{ + unsigned long cr4; + mmu_cr4_features &= ~mask; + cr4 = read_cr4(); + cr4 &= ~mask; + write_cr4(cr4); +} +typedef struct { + unsigned long seg; +} mm_segment_t; +extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); +extern void release_thread(struct task_struct *); +extern void prepare_to_copy(struct task_struct *tsk); +unsigned long get_wchan(struct task_struct *p); +static inline __attribute__((always_inline)) void cpuid(unsigned int op, + unsigned int *eax, unsigned int *ebx, + unsigned int *ecx, unsigned int *edx) +{ + *eax = op; + *ecx = 0; + __cpuid(eax, ebx, ecx, edx); +} +static inline __attribute__((always_inline)) void cpuid_count(unsigned int op, int count, + unsigned int *eax, unsigned int *ebx, + unsigned int *ecx, unsigned int *edx) +{ + *eax = op; + *ecx = count; + __cpuid(eax, ebx, ecx, edx); +} +static inline __attribute__((always_inline)) unsigned int cpuid_eax(unsigned int op) +{ + unsigned int eax, ebx, ecx, edx; + cpuid(op, &eax, &ebx, &ecx, &edx); + return eax; +} +static inline __attribute__((always_inline)) unsigned int cpuid_ebx(unsigned int op) +{ + unsigned int eax, ebx, ecx, edx; + cpuid(op, &eax, &ebx, &ecx, &edx); + return ebx; +} +static inline __attribute__((always_inline)) unsigned int cpuid_ecx(unsigned int op) +{ + unsigned int eax, ebx, ecx, edx; + cpuid(op, &eax, &ebx, &ecx, &edx); + return ecx; +} +static inline __attribute__((always_inline)) unsigned int cpuid_edx(unsigned int op) +{ + unsigned int eax, ebx, ecx, edx; + cpuid(op, &eax, &ebx, &ecx, &edx); + return edx; +} +static inline __attribute__((always_inline)) void rep_nop(void) +{ + asm volatile("rep; nop" ::: "memory"); +} +static inline __attribute__((always_inline)) void cpu_relax(void) +{ + rep_nop(); +} +static inline __attribute__((always_inline)) void sync_core(void) +{ + int tmp; + asm volatile("cpuid" : "=a" (tmp) : "0" (1) + : "ebx", "ecx", "edx", "memory"); +} +static inline __attribute__((always_inline)) void __monitor(const void *eax, unsigned long ecx, + unsigned long edx) +{ + asm volatile(".byte 0x0f, 0x01, 0xc8;" + :: "a" (eax), "c" (ecx), "d"(edx)); +} +static inline __attribute__((always_inline)) void __mwait(unsigned long eax, unsigned long ecx) +{ + asm volatile(".byte 0x0f, 0x01, 0xc9;" + :: "a" (eax), "c" (ecx)); +} +static inline __attribute__((always_inline)) void __sti_mwait(unsigned long eax, unsigned long ecx) +{ + trace_hardirqs_on(); + asm volatile("sti; .byte 0x0f, 0x01, 0xc9;" + :: "a" (eax), "c" (ecx)); +} +extern void mwait_idle_with_hints(unsigned long eax, unsigned long ecx); +extern void select_idle_routine(const struct cpuinfo_x86 *c); +extern void init_amd_e400_c1e_mask(void); +extern unsigned long boot_option_idle_override; +extern bool amd_e400_c1e_detected; +enum idle_boot_override {IDLE_NO_OVERRIDE=0, IDLE_HALT, IDLE_NOMWAIT, + IDLE_POLL, IDLE_FORCE_MWAIT}; +extern void enable_sep_cpu(void); +extern int sysenter_setup(void); +extern void early_trap_init(void); +extern struct desc_ptr early_gdt_descr; +extern void cpu_set_gdt(int); +extern void switch_to_new_gdt(int); +extern void load_percpu_segment(int); +extern void cpu_init(void); +static inline __attribute__((always_inline)) unsigned long get_debugctlmsr(void) +{ + unsigned long debugctlmsr = 0; + do { int _err; debugctlmsr = paravirt_read_msr(0x000001d9, &_err); } while (0); + return debugctlmsr; +} +static inline __attribute__((always_inline)) void update_debugctlmsr(unsigned long debugctlmsr) +{ + do { paravirt_write_msr(0x000001d9, (u32)((u64)(debugctlmsr)), ((u64)(debugctlmsr))>>32); } while (0); +} +extern unsigned int machine_id; +extern unsigned int machine_submodel_id; +extern unsigned int BIOS_revision; +extern int bootloader_type; +extern int bootloader_version; +extern char ignore_fpu_irq; +static inline __attribute__((always_inline)) void prefetch(const void *x) +{ + asm volatile ("661:\n\t" ".byte " "0x8d,0x74,0x26,0x00" "\n" "\n662:\n" ".section .altinstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "661b\n" " " ".long" " " "663f\n" " .word " "(0*32+25)" "\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .discard,\"aw\",@progbits\n" " .byte 0xff + (664f-663f) - (662b-661b)\n" ".previous\n" ".section .altinstr_replacement, \"ax\"\n" "663:\n\t" "prefetchnta (%1)" "\n664:\n" ".previous" : : "i" (0), "r" (x)) + ; +} +static inline __attribute__((always_inline)) void prefetchw(const void *x) +{ + asm volatile ("661:\n\t" ".byte " "0x8d,0x74,0x26,0x00" "\n" "\n662:\n" ".section .altinstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "661b\n" " " ".long" " " "663f\n" " .word " "(1*32+31)" "\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .discard,\"aw\",@progbits\n" " .byte 0xff + (664f-663f) - (662b-661b)\n" ".previous\n" ".section .altinstr_replacement, \"ax\"\n" "663:\n\t" "prefetchw (%1)" "\n664:\n" ".previous" : : "i" (0), "r" (x)) + ; +} +static inline __attribute__((always_inline)) void spin_lock_prefetch(const void *x) +{ + prefetchw(x); +} +extern unsigned long thread_saved_pc(struct task_struct *tsk); +extern void start_thread(struct pt_regs *regs, unsigned long new_ip, + unsigned long new_sp); +extern int get_tsc_mode(unsigned long adr); +extern int set_tsc_mode(unsigned int val); +extern int amd_get_nb_id(int cpu); +struct aperfmperf { + u64 aperf, mperf; +}; +static inline __attribute__((always_inline)) void get_aperfmperf(struct aperfmperf *am) +{ + ({ static bool __warned; int __ret_warn_once = !!(!(__builtin_constant_p((3*32+28)) && ( ((((3*32+28))>>5)==0 && (1UL<<(((3*32+28))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((3*32+28))>>5)==1 && (1UL<<(((3*32+28))&31) & (0|0))) || ((((3*32+28))>>5)==2 && (1UL<<(((3*32+28))&31) & 0)) || ((((3*32+28))>>5)==3 && (1UL<<(((3*32+28))&31) & (0))) || ((((3*32+28))>>5)==4 && (1UL<<(((3*32+28))&31) & 0)) || ((((3*32+28))>>5)==5 && (1UL<<(((3*32+28))&31) & 0)) || ((((3*32+28))>>5)==6 && (1UL<<(((3*32+28))&31) & 0)) || ((((3*32+28))>>5)==7 && (1UL<<(((3*32+28))&31) & 0)) || ((((3*32+28))>>5)==8 && (1UL<<(((3*32+28))&31) & 0)) || ((((3*32+28))>>5)==9 && (1UL<<(((3*32+28))&31) & 0)) ) ? 1 : (__builtin_constant_p(((3*32+28))) ? constant_test_bit(((3*32+28)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((3*32+28)), ((unsigned long *)((&boot_cpu_data)->x86_capability)))))); if (__builtin_constant_p((((__builtin_constant_p(__ret_warn_once) ? !!(__ret_warn_once) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 981, }; ______r = __builtin_expect(!!(__ret_warn_once), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(__ret_warn_once) ? !!(__ret_warn_once) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 981, }; ______r = __builtin_expect(!!(__ret_warn_once), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 981, }; ______r = !!(((__builtin_constant_p(__ret_warn_once) ? !!(__ret_warn_once) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 981, }; ______r = __builtin_expect(!!(__ret_warn_once), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) if (__builtin_constant_p(((({ int __ret_warn_on = !!(!__warned); if (__builtin_constant_p((((__builtin_constant_p(__ret_warn_on) ? !!(__ret_warn_on) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 981, }; ______r = __builtin_expect(!!(__ret_warn_on), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(__ret_warn_on) ? !!(__ret_warn_on) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 981, }; ______r = __builtin_expect(!!(__ret_warn_on), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 981, }; ______r = !!(((__builtin_constant_p(__ret_warn_on) ? !!(__ret_warn_on) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 981, }; ______r = __builtin_expect(!!(__ret_warn_on), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) warn_slowpath_null("/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", 981); (__builtin_constant_p(__ret_warn_on) ? !!(__ret_warn_on) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 981, }; ______r = __builtin_expect(!!(__ret_warn_on), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })); })))) ? !!((({ int __ret_warn_on = !!(!__warned); if (__builtin_constant_p((((__builtin_constant_p(__ret_warn_on) ? !!(__ret_warn_on) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 981, }; ______r = __builtin_expect(!!(__ret_warn_on), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(__ret_warn_on) ? !!(__ret_warn_on) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 981, }; ______r = __builtin_expect(!!(__ret_warn_on), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 981, }; ______r = !!(((__builtin_constant_p(__ret_warn_on) ? !!(__ret_warn_on) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 981, }; ______r = __builtin_expect(!!(__ret_warn_on), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) warn_slowpath_null("/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", 981); (__builtin_constant_p(__ret_warn_on) ? !!(__ret_warn_on) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 981, }; ______r = __builtin_expect(!!(__ret_warn_on), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })); }))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 981, }; ______r = !!((({ int __ret_warn_on = !!(!__warned); if (__builtin_constant_p((((__builtin_constant_p(__ret_warn_on) ? !!(__ret_warn_on) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 981, }; ______r = __builtin_expect(!!(__ret_warn_on), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(__ret_warn_on) ? !!(__ret_warn_on) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 981, }; ______r = __builtin_expect(!!(__ret_warn_on), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 981, }; ______r = !!(((__builtin_constant_p(__ret_warn_on) ? !!(__ret_warn_on) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 981, }; ______r = __builtin_expect(!!(__ret_warn_on), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) warn_slowpath_null("/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", 981); (__builtin_constant_p(__ret_warn_on) ? !!(__ret_warn_on) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 981, }; ______r = __builtin_expect(!!(__ret_warn_on), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })); }))); ______f.miss_hit[______r]++; ______r; })) __warned = true; (__builtin_constant_p(__ret_warn_once) ? !!(__ret_warn_once) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 981, }; ______r = __builtin_expect(!!(__ret_warn_once), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })); }); + do { int _err; am->aperf = paravirt_read_msr(0x000000e8, &_err); } while (0); + do { int _err; am->mperf = paravirt_read_msr(0x000000e7, &_err); } while (0); +} +static inline __attribute__((always_inline)) +unsigned long calc_aperfmperf_ratio(struct aperfmperf *old, + struct aperfmperf *new) +{ + u64 aperf = new->aperf - old->aperf; + u64 mperf = new->mperf - old->mperf; + unsigned long ratio = aperf; + mperf >>= 10; + if (__builtin_constant_p(((mperf))) ? !!((mperf)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/processor.h", .line = 998, }; ______r = !!((mperf)); ______f.miss_hit[______r]++; ______r; })) + ratio = div64_u64(aperf, mperf); + return ratio; +} +extern const int amd_erratum_383[]; +extern const int amd_erratum_400[]; +extern bool cpu_has_amd_erratum(const int *); +extern void mcount(void); +static inline __attribute__((always_inline)) unsigned long ftrace_call_adjust(unsigned long addr) +{ + return addr; +} +struct dyn_arch_ftrace { +}; +static inline __attribute__((always_inline)) int atomic_read(const atomic_t *v) +{ + return (*(volatile int *)&(v)->counter); +} +static inline __attribute__((always_inline)) void atomic_set(atomic_t *v, int i) +{ + v->counter = i; +} +static inline __attribute__((always_inline)) void atomic_add(int i, atomic_t *v) +{ + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "addl %1,%0" + : "+m" (v->counter) + : "ir" (i)); +} +static inline __attribute__((always_inline)) void atomic_sub(int i, atomic_t *v) +{ + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "subl %1,%0" + : "+m" (v->counter) + : "ir" (i)); +} +static inline __attribute__((always_inline)) int atomic_sub_and_test(int i, atomic_t *v) +{ + unsigned char c; + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "subl %2,%0; sete %1" + : "+m" (v->counter), "=qm" (c) + : "ir" (i) : "memory"); + return c; +} +static inline __attribute__((always_inline)) void atomic_inc(atomic_t *v) +{ + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "incl %0" + : "+m" (v->counter)); +} +static inline __attribute__((always_inline)) void atomic_dec(atomic_t *v) +{ + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "decl %0" + : "+m" (v->counter)); +} +static inline __attribute__((always_inline)) int atomic_dec_and_test(atomic_t *v) +{ + unsigned char c; + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "decl %0; sete %1" + : "+m" (v->counter), "=qm" (c) + : : "memory"); + return c != 0; +} +static inline __attribute__((always_inline)) int atomic_inc_and_test(atomic_t *v) +{ + unsigned char c; + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "incl %0; sete %1" + : "+m" (v->counter), "=qm" (c) + : : "memory"); + return c != 0; +} +static inline __attribute__((always_inline)) int atomic_add_negative(int i, atomic_t *v) +{ + unsigned char c; + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "addl %2,%0; sets %1" + : "+m" (v->counter), "=qm" (c) + : "ir" (i) : "memory"); + return c; +} +static inline __attribute__((always_inline)) int atomic_add_return(int i, atomic_t *v) +{ + int __i; + __i = i; + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "xaddl %0, %1" + : "+r" (i), "+m" (v->counter) + : : "memory"); + return i + __i; +} +static inline __attribute__((always_inline)) int atomic_sub_return(int i, atomic_t *v) +{ + return atomic_add_return(-i, v); +} +static inline __attribute__((always_inline)) int atomic_cmpxchg(atomic_t *v, int old, int new) +{ + return ({ __typeof__(*(((&v->counter)))) __ret; __typeof__(*(((&v->counter)))) __old = (((old))); __typeof__(*(((&v->counter)))) __new = (((new))); switch ((sizeof(*&v->counter))) { case 1: { volatile u8 *__ptr = (volatile u8 *)(((&v->counter))); asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "cmpxchgb %2,%1" : "=a" (__ret), "+m" (*__ptr) : "q" (__new), "0" (__old) : "memory"); break; } case 2: { volatile u16 *__ptr = (volatile u16 *)(((&v->counter))); asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "cmpxchgw %2,%1" : "=a" (__ret), "+m" (*__ptr) : "r" (__new), "0" (__old) : "memory"); break; } case 4: { volatile u32 *__ptr = (volatile u32 *)(((&v->counter))); asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "cmpxchgl %2,%1" : "=a" (__ret), "+m" (*__ptr) : "r" (__new), "0" (__old) : "memory"); break; } default: __cmpxchg_wrong_size(); } __ret; }); +} +static inline __attribute__((always_inline)) int atomic_xchg(atomic_t *v, int new) +{ + return ({ __typeof(*((&v->counter))) __x = ((new)); switch (sizeof(*&v->counter)) { case 1: { volatile u8 *__ptr = (volatile u8 *)((&v->counter)); asm volatile("xchgb %0,%1" : "=q" (__x), "+m" (*__ptr) : "0" (__x) : "memory"); break; } case 2: { volatile u16 *__ptr = (volatile u16 *)((&v->counter)); asm volatile("xchgw %0,%1" : "=r" (__x), "+m" (*__ptr) : "0" (__x) : "memory"); break; } case 4: { volatile u32 *__ptr = (volatile u32 *)((&v->counter)); asm volatile("xchgl %0,%1" : "=r" (__x), "+m" (*__ptr) : "0" (__x) : "memory"); break; } default: __xchg_wrong_size(); } __x; }); +} +static inline __attribute__((always_inline)) int atomic_add_unless(atomic_t *v, int a, int u) +{ + int c, old; + c = atomic_read(v); + for (;;) { + if (__builtin_constant_p((((__builtin_constant_p(c == (u)) ? !!(c == (u)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/atomic.h", .line = 237, }; ______r = __builtin_expect(!!(c == (u)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(c == (u)) ? !!(c == (u)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/atomic.h", .line = 237, }; ______r = __builtin_expect(!!(c == (u)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/atomic.h", .line = 237, }; ______r = !!(((__builtin_constant_p(c == (u)) ? !!(c == (u)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/atomic.h", .line = 237, }; ______r = __builtin_expect(!!(c == (u)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + break; + old = atomic_cmpxchg((v), c, c + (a)); + if (__builtin_constant_p((((__builtin_constant_p(old == c) ? !!(old == c) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/atomic.h", .line = 240, }; ______r = __builtin_expect(!!(old == c), 1); ftrace_likely_update(&______f, ______r, 1); ______r; }))))) ? !!(((__builtin_constant_p(old == c) ? !!(old == c) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/atomic.h", .line = 240, }; ______r = __builtin_expect(!!(old == c), 1); ftrace_likely_update(&______f, ______r, 1); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/atomic.h", .line = 240, }; ______r = !!(((__builtin_constant_p(old == c) ? !!(old == c) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/atomic.h", .line = 240, }; ______r = __builtin_expect(!!(old == c), 1); ftrace_likely_update(&______f, ______r, 1); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + break; + c = old; + } + return c != (u); +} +static inline __attribute__((always_inline)) int atomic_dec_if_positive(atomic_t *v) +{ + int c, old, dec; + c = atomic_read(v); + for (;;) { + dec = c - 1; + if (__builtin_constant_p((((__builtin_constant_p(dec < 0) ? !!(dec < 0) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/atomic.h", .line = 262, }; ______r = __builtin_expect(!!(dec < 0), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(dec < 0) ? !!(dec < 0) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/atomic.h", .line = 262, }; ______r = __builtin_expect(!!(dec < 0), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/atomic.h", .line = 262, }; ______r = !!(((__builtin_constant_p(dec < 0) ? !!(dec < 0) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/atomic.h", .line = 262, }; ______r = __builtin_expect(!!(dec < 0), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + break; + old = atomic_cmpxchg((v), c, dec); + if (__builtin_constant_p((((__builtin_constant_p(old == c) ? !!(old == c) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/atomic.h", .line = 265, }; ______r = __builtin_expect(!!(old == c), 1); ftrace_likely_update(&______f, ______r, 1); ______r; }))))) ? !!(((__builtin_constant_p(old == c) ? !!(old == c) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/atomic.h", .line = 265, }; ______r = __builtin_expect(!!(old == c), 1); ftrace_likely_update(&______f, ______r, 1); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/atomic.h", .line = 265, }; ______r = !!(((__builtin_constant_p(old == c) ? !!(old == c) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/atomic.h", .line = 265, }; ______r = __builtin_expect(!!(old == c), 1); ftrace_likely_update(&______f, ______r, 1); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + break; + c = old; + } + return dec; +} +static inline __attribute__((always_inline)) short int atomic_inc_short(short int *v) +{ + asm(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "addw $1, %0" : "+m" (*v)); + return *v; +} +typedef struct { + u64 __attribute__((aligned(8))) counter; +} atomic64_t; +static inline __attribute__((always_inline)) long long atomic64_cmpxchg(atomic64_t *v, long long o, long long n) +{ + return ((__typeof__(*(&v->counter)))__cmpxchg64((&v->counter), (unsigned long long)(o), (unsigned long long)(n))); +} +static inline __attribute__((always_inline)) long long atomic64_xchg(atomic64_t *v, long long n) +{ + long long o; + unsigned high = (unsigned)(n >> 32); + unsigned low = (unsigned)n; + asm volatile("call atomic64_" "xchg" "_cx8" + : "=A" (o), "+b" (low), "+c" (high) + : "S" (v) + : "memory" + ); + return o; +} +static inline __attribute__((always_inline)) void atomic64_set(atomic64_t *v, long long i) +{ + unsigned high = (unsigned)(i >> 32); + unsigned low = (unsigned)i; + asm volatile("call atomic64_" "set" "_cx8" + : "+b" (low), "+c" (high) + : "S" (v) + : "eax", "edx", "memory" + ); +} +static inline __attribute__((always_inline)) long long atomic64_read(atomic64_t *v) +{ + long long r; + asm volatile("call atomic64_" "read" "_cx8" + : "=A" (r), "+c" (v) + : : "memory" + ); + return r; + } +static inline __attribute__((always_inline)) long long atomic64_add_return(long long i, atomic64_t *v) +{ + asm volatile("call atomic64_" "add_return" "_cx8" + : "+A" (i), "+c" (v) + : : "memory" + ); + return i; +} +static inline __attribute__((always_inline)) long long atomic64_sub_return(long long i, atomic64_t *v) +{ + asm volatile("call atomic64_" "sub_return" "_cx8" + : "+A" (i), "+c" (v) + : : "memory" + ); + return i; +} +static inline __attribute__((always_inline)) long long atomic64_inc_return(atomic64_t *v) +{ + long long a; + asm volatile("call atomic64_" "inc_return" "_cx8" + : "=A" (a) + : "S" (v) + : "memory", "ecx" + ); + return a; +} +static inline __attribute__((always_inline)) long long atomic64_dec_return(atomic64_t *v) +{ + long long a; + asm volatile("call atomic64_" "dec_return" "_cx8" + : "=A" (a) + : "S" (v) + : "memory", "ecx" + ); + return a; +} +static inline __attribute__((always_inline)) long long atomic64_add(long long i, atomic64_t *v) +{ + asm volatile("call atomic64_" "add_return" "_cx8" + : "+A" (i), "+c" (v) + : : "memory" + ); + return i; +} +static inline __attribute__((always_inline)) long long atomic64_sub(long long i, atomic64_t *v) +{ + asm volatile("call atomic64_" "sub_return" "_cx8" + : "+A" (i), "+c" (v) + : : "memory" + ); + return i; +} +static inline __attribute__((always_inline)) int atomic64_sub_and_test(long long i, atomic64_t *v) +{ + return atomic64_sub_return(i, v) == 0; +} +static inline __attribute__((always_inline)) void atomic64_inc(atomic64_t *v) +{ + asm volatile("call atomic64_" "inc_return" "_cx8" + : : "S" (v) + : "memory", "eax", "ecx", "edx" + ); +} +static inline __attribute__((always_inline)) void atomic64_dec(atomic64_t *v) +{ + asm volatile("call atomic64_" "dec_return" "_cx8" + : : "S" (v) + : "memory", "eax", "ecx", "edx" + ); +} +static inline __attribute__((always_inline)) int atomic64_dec_and_test(atomic64_t *v) +{ + return atomic64_dec_return(v) == 0; +} +static inline __attribute__((always_inline)) int atomic64_inc_and_test(atomic64_t *v) +{ + return atomic64_inc_return(v) == 0; +} +static inline __attribute__((always_inline)) int atomic64_add_negative(long long i, atomic64_t *v) +{ + return atomic64_add_return(i, v) < 0; +} +static inline __attribute__((always_inline)) int atomic64_add_unless(atomic64_t *v, long long a, long long u) +{ + unsigned low = (unsigned)u; + unsigned high = (unsigned)(u >> 32); + asm volatile("call atomic64_" "add_unless" "_cx8" "\n\t" + : "+A" (a), "+c" (v), "+S" (low), "+D" (high) + : : "memory"); + return (int)a; +} +static inline __attribute__((always_inline)) int atomic64_inc_not_zero(atomic64_t *v) +{ + int r; + asm volatile("call atomic64_" "inc_not_zero" "_cx8" + : "=a" (r) + : "S" (v) + : "ecx", "edx", "memory" + ); + return r; +} +static inline __attribute__((always_inline)) long long atomic64_dec_if_positive(atomic64_t *v) +{ + long long r; + asm volatile("call atomic64_" "dec_if_positive" "_cx8" + : "=A" (r) + : "S" (v) + : "ecx", "memory" + ); + return r; +} +typedef atomic_t atomic_long_t; +static inline __attribute__((always_inline)) long atomic_long_read(atomic_long_t *l) +{ + atomic_t *v = (atomic_t *)l; + return (long)atomic_read(v); +} +static inline __attribute__((always_inline)) void atomic_long_set(atomic_long_t *l, long i) +{ + atomic_t *v = (atomic_t *)l; + atomic_set(v, i); +} +static inline __attribute__((always_inline)) void atomic_long_inc(atomic_long_t *l) +{ + atomic_t *v = (atomic_t *)l; + atomic_inc(v); +} +static inline __attribute__((always_inline)) void atomic_long_dec(atomic_long_t *l) +{ + atomic_t *v = (atomic_t *)l; + atomic_dec(v); +} +static inline __attribute__((always_inline)) void atomic_long_add(long i, atomic_long_t *l) +{ + atomic_t *v = (atomic_t *)l; + atomic_add(i, v); +} +static inline __attribute__((always_inline)) void atomic_long_sub(long i, atomic_long_t *l) +{ + atomic_t *v = (atomic_t *)l; + atomic_sub(i, v); +} +static inline __attribute__((always_inline)) int atomic_long_sub_and_test(long i, atomic_long_t *l) +{ + atomic_t *v = (atomic_t *)l; + return atomic_sub_and_test(i, v); +} +static inline __attribute__((always_inline)) int atomic_long_dec_and_test(atomic_long_t *l) +{ + atomic_t *v = (atomic_t *)l; + return atomic_dec_and_test(v); +} +static inline __attribute__((always_inline)) int atomic_long_inc_and_test(atomic_long_t *l) +{ + atomic_t *v = (atomic_t *)l; + return atomic_inc_and_test(v); +} +static inline __attribute__((always_inline)) int atomic_long_add_negative(long i, atomic_long_t *l) +{ + atomic_t *v = (atomic_t *)l; + return atomic_add_negative(i, v); +} +static inline __attribute__((always_inline)) long atomic_long_add_return(long i, atomic_long_t *l) +{ + atomic_t *v = (atomic_t *)l; + return (long)atomic_add_return(i, v); +} +static inline __attribute__((always_inline)) long atomic_long_sub_return(long i, atomic_long_t *l) +{ + atomic_t *v = (atomic_t *)l; + return (long)atomic_sub_return(i, v); +} +static inline __attribute__((always_inline)) long atomic_long_inc_return(atomic_long_t *l) +{ + atomic_t *v = (atomic_t *)l; + return (long)(atomic_add_return(1, v)); +} +static inline __attribute__((always_inline)) long atomic_long_dec_return(atomic_long_t *l) +{ + atomic_t *v = (atomic_t *)l; + return (long)(atomic_sub_return(1, v)); +} +static inline __attribute__((always_inline)) long atomic_long_add_unless(atomic_long_t *l, long a, long u) +{ + atomic_t *v = (atomic_t *)l; + return (long)atomic_add_unless(v, a, u); +} +struct thread_info { + struct task_struct *task; + struct exec_domain *exec_domain; + __u32 flags; + __u32 status; + __u32 cpu; + int preempt_count; + mm_segment_t addr_limit; + struct restart_block restart_block; + void *sysenter_return; + unsigned long previous_esp; + __u8 supervisor_stack[0]; + int uaccess_err; +}; +register unsigned long current_stack_pointer asm("esp") __attribute__((__used__)); +static inline __attribute__((always_inline)) struct thread_info *current_thread_info(void) +{ + return (struct thread_info *) + (current_stack_pointer & ~((((1UL) << 12) << 1) - 1)); +} +static inline __attribute__((always_inline)) void set_restore_sigmask(void) +{ + struct thread_info *ti = current_thread_info(); + ti->status |= 0x0008; + set_bit(2, (unsigned long *)&ti->flags); +} +extern void arch_task_cache_init(void); +extern void free_thread_info(struct thread_info *ti); +extern int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src); +static inline __attribute__((always_inline)) void set_ti_thread_flag(struct thread_info *ti, int flag) +{ + set_bit(flag, (unsigned long *)&ti->flags); +} +static inline __attribute__((always_inline)) void clear_ti_thread_flag(struct thread_info *ti, int flag) +{ + clear_bit(flag, (unsigned long *)&ti->flags); +} +static inline __attribute__((always_inline)) int test_and_set_ti_thread_flag(struct thread_info *ti, int flag) +{ + return test_and_set_bit(flag, (unsigned long *)&ti->flags); +} +static inline __attribute__((always_inline)) int test_and_clear_ti_thread_flag(struct thread_info *ti, int flag) +{ + return test_and_clear_bit(flag, (unsigned long *)&ti->flags); +} +static inline __attribute__((always_inline)) int test_ti_thread_flag(struct thread_info *ti, int flag) +{ + return (__builtin_constant_p((flag)) ? constant_test_bit((flag), ((unsigned long *)&ti->flags)) : variable_test_bit((flag), ((unsigned long *)&ti->flags))); +} +static inline __attribute__((always_inline)) void INIT_LIST_HEAD(struct list_head *list) +{ + list->next = list; + list->prev = list; +} +static inline __attribute__((always_inline)) void __list_add(struct list_head *new, + struct list_head *prev, + struct list_head *next) +{ + next->prev = new; + new->next = next; + new->prev = prev; + prev->next = new; +} +static inline __attribute__((always_inline)) void list_add(struct list_head *new, struct list_head *head) +{ + __list_add(new, head, head->next); +} +static inline __attribute__((always_inline)) void list_add_tail(struct list_head *new, struct list_head *head) +{ + __list_add(new, head->prev, head); +} +static inline __attribute__((always_inline)) void __list_del(struct list_head * prev, struct list_head * next) +{ + next->prev = prev; + prev->next = next; +} +static inline __attribute__((always_inline)) void __list_del_entry(struct list_head *entry) +{ + __list_del(entry->prev, entry->next); +} +static inline __attribute__((always_inline)) void list_del(struct list_head *entry) +{ + __list_del(entry->prev, entry->next); + entry->next = ((void *) 0x00100100 + (0x0UL)); + entry->prev = ((void *) 0x00200200 + (0x0UL)); +} +static inline __attribute__((always_inline)) void list_replace(struct list_head *old, + struct list_head *new) +{ + new->next = old->next; + new->next->prev = new; + new->prev = old->prev; + new->prev->next = new; +} +static inline __attribute__((always_inline)) void list_replace_init(struct list_head *old, + struct list_head *new) +{ + list_replace(old, new); + INIT_LIST_HEAD(old); +} +static inline __attribute__((always_inline)) void list_del_init(struct list_head *entry) +{ + __list_del_entry(entry); + INIT_LIST_HEAD(entry); +} +static inline __attribute__((always_inline)) void list_move(struct list_head *list, struct list_head *head) +{ + __list_del_entry(list); + list_add(list, head); +} +static inline __attribute__((always_inline)) void list_move_tail(struct list_head *list, + struct list_head *head) +{ + __list_del_entry(list); + list_add_tail(list, head); +} +static inline __attribute__((always_inline)) int list_is_last(const struct list_head *list, + const struct list_head *head) +{ + return list->next == head; +} +static inline __attribute__((always_inline)) int list_empty(const struct list_head *head) +{ + return head->next == head; +} +static inline __attribute__((always_inline)) int list_empty_careful(const struct list_head *head) +{ + struct list_head *next = head->next; + return (next == head) && (next == head->prev); +} +static inline __attribute__((always_inline)) void list_rotate_left(struct list_head *head) +{ + struct list_head *first; + if (__builtin_constant_p(((!list_empty(head)))) ? !!((!list_empty(head))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/list.h", .line = 218, }; ______r = !!((!list_empty(head))); ______f.miss_hit[______r]++; ______r; })) { + first = head->next; + list_move_tail(first, head); + } +} +static inline __attribute__((always_inline)) int list_is_singular(const struct list_head *head) +{ + return !list_empty(head) && (head->next == head->prev); +} +static inline __attribute__((always_inline)) void __list_cut_position(struct list_head *list, + struct list_head *head, struct list_head *entry) +{ + struct list_head *new_first = entry->next; + list->next = head->next; + list->next->prev = list; + list->prev = entry; + entry->next = list; + head->next = new_first; + new_first->prev = head; +} +static inline __attribute__((always_inline)) void list_cut_position(struct list_head *list, + struct list_head *head, struct list_head *entry) +{ + if (__builtin_constant_p(((list_empty(head)))) ? !!((list_empty(head))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/list.h", .line = 262, }; ______r = !!((list_empty(head))); ______f.miss_hit[______r]++; ______r; })) + return; + if (__builtin_constant_p(((list_is_singular(head) && (head->next != entry && head != entry)))) ? !!((list_is_singular(head) && (head->next != entry && head != entry))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/linux/list.h" + , .line = + 265 + , }; ______r = !!((list_is_singular(head) && (head->next != entry && head != entry))); ______f.miss_hit[______r]++; ______r; })) + return; + if (__builtin_constant_p(((entry == head))) ? !!((entry == head)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/list.h", .line = 267, }; ______r = !!((entry == head)); ______f.miss_hit[______r]++; ______r; })) + INIT_LIST_HEAD(list); + else + __list_cut_position(list, head, entry); +} +static inline __attribute__((always_inline)) void __list_splice(const struct list_head *list, + struct list_head *prev, + struct list_head *next) +{ + struct list_head *first = list->next; + struct list_head *last = list->prev; + first->prev = prev; + prev->next = first; + last->next = next; + next->prev = last; +} +static inline __attribute__((always_inline)) void list_splice(const struct list_head *list, + struct list_head *head) +{ + if (__builtin_constant_p(((!list_empty(list)))) ? !!((!list_empty(list))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/list.h", .line = 295, }; ______r = !!((!list_empty(list))); ______f.miss_hit[______r]++; ______r; })) + __list_splice(list, head, head->next); +} +static inline __attribute__((always_inline)) void list_splice_tail(struct list_head *list, + struct list_head *head) +{ + if (__builtin_constant_p(((!list_empty(list)))) ? !!((!list_empty(list))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/list.h", .line = 307, }; ______r = !!((!list_empty(list))); ______f.miss_hit[______r]++; ______r; })) + __list_splice(list, head->prev, head); +} +static inline __attribute__((always_inline)) void list_splice_init(struct list_head *list, + struct list_head *head) +{ + if (__builtin_constant_p(((!list_empty(list)))) ? !!((!list_empty(list))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/list.h", .line = 321, }; ______r = !!((!list_empty(list))); ______f.miss_hit[______r]++; ______r; })) { + __list_splice(list, head, head->next); + INIT_LIST_HEAD(list); + } +} +static inline __attribute__((always_inline)) void list_splice_tail_init(struct list_head *list, + struct list_head *head) +{ + if (__builtin_constant_p(((!list_empty(list)))) ? !!((!list_empty(list))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/list.h", .line = 338, }; ______r = !!((!list_empty(list))); ______f.miss_hit[______r]++; ______r; })) { + __list_splice(list, head->prev, head); + INIT_LIST_HEAD(list); + } +} +static inline __attribute__((always_inline)) void INIT_HLIST_NODE(struct hlist_node *h) +{ + h->next = ((void *)0); + h->pprev = ((void *)0); +} +static inline __attribute__((always_inline)) int hlist_unhashed(const struct hlist_node *h) +{ + return !h->pprev; +} +static inline __attribute__((always_inline)) int hlist_empty(const struct hlist_head *h) +{ + return !h->first; +} +static inline __attribute__((always_inline)) void __hlist_del(struct hlist_node *n) +{ + struct hlist_node *next = n->next; + struct hlist_node **pprev = n->pprev; + *pprev = next; + if (__builtin_constant_p(((next))) ? !!((next)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/list.h", .line = 591, }; ______r = !!((next)); ______f.miss_hit[______r]++; ______r; })) + next->pprev = pprev; +} +static inline __attribute__((always_inline)) void hlist_del(struct hlist_node *n) +{ + __hlist_del(n); + n->next = ((void *) 0x00100100 + (0x0UL)); + n->pprev = ((void *) 0x00200200 + (0x0UL)); +} +static inline __attribute__((always_inline)) void hlist_del_init(struct hlist_node *n) +{ + if (__builtin_constant_p(((!hlist_unhashed(n)))) ? !!((!hlist_unhashed(n))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/list.h", .line = 604, }; ______r = !!((!hlist_unhashed(n))); ______f.miss_hit[______r]++; ______r; })) { + __hlist_del(n); + INIT_HLIST_NODE(n); + } +} +static inline __attribute__((always_inline)) void hlist_add_head(struct hlist_node *n, struct hlist_head *h) +{ + struct hlist_node *first = h->first; + n->next = first; + if (__builtin_constant_p(((first))) ? !!((first)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/list.h", .line = 614, }; ______r = !!((first)); ______f.miss_hit[______r]++; ______r; })) + first->pprev = &n->next; + h->first = n; + n->pprev = &h->first; +} +static inline __attribute__((always_inline)) void hlist_add_before(struct hlist_node *n, + struct hlist_node *next) +{ + n->pprev = next->pprev; + n->next = next; + next->pprev = &n->next; + *(n->pprev) = n; +} +static inline __attribute__((always_inline)) void hlist_add_after(struct hlist_node *n, + struct hlist_node *next) +{ + next->next = n->next; + n->next = next; + next->pprev = &n->next; + if (__builtin_constant_p(((next->next))) ? !!((next->next)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/list.h", .line = 637, }; ______r = !!((next->next)); ______f.miss_hit[______r]++; ______r; })) + next->next->pprev = &next->next; +} +static inline __attribute__((always_inline)) void hlist_add_fake(struct hlist_node *n) +{ + n->pprev = &n->next; +} +static inline __attribute__((always_inline)) void hlist_move_list(struct hlist_head *old, + struct hlist_head *new) +{ + new->first = old->first; + if (__builtin_constant_p(((new->first))) ? !!((new->first)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/list.h", .line = 655, }; ______r = !!((new->first)); ______f.miss_hit[______r]++; ______r; })) + new->first->pprev = &new->first; + old->first = ((void *)0); +} + extern void add_preempt_count(int val); + extern void sub_preempt_count(int val); + __attribute__((regparm(0))) void preempt_schedule(void); +struct preempt_notifier; +struct preempt_ops { + void (*sched_in)(struct preempt_notifier *notifier, int cpu); + void (*sched_out)(struct preempt_notifier *notifier, + struct task_struct *next); +}; +struct preempt_notifier { + struct hlist_node link; + struct preempt_ops *ops; +}; +void preempt_notifier_register(struct preempt_notifier *notifier); +void preempt_notifier_unregister(struct preempt_notifier *notifier); +static inline __attribute__((always_inline)) void preempt_notifier_init(struct preempt_notifier *notifier, + struct preempt_ops *ops) +{ + INIT_HLIST_NODE(¬ifier->link); + notifier->ops = ops; +} +struct task_struct; +struct lockdep_map; +extern int prove_locking; +extern int lock_stat; +struct task_struct; +extern int debug_locks; +extern int debug_locks_silent; +static inline __attribute__((always_inline)) int __debug_locks_off(void) +{ + return ({ __typeof(*((&debug_locks))) __x = ((0)); switch (sizeof(*&debug_locks)) { case 1: { volatile u8 *__ptr = (volatile u8 *)((&debug_locks)); asm volatile("xchgb %0,%1" : "=q" (__x), "+m" (*__ptr) : "0" (__x) : "memory"); break; } case 2: { volatile u16 *__ptr = (volatile u16 *)((&debug_locks)); asm volatile("xchgw %0,%1" : "=r" (__x), "+m" (*__ptr) : "0" (__x) : "memory"); break; } case 4: { volatile u32 *__ptr = (volatile u32 *)((&debug_locks)); asm volatile("xchgl %0,%1" : "=r" (__x), "+m" (*__ptr) : "0" (__x) : "memory"); break; } default: __xchg_wrong_size(); } __x; }); +} +extern int debug_locks_off(void); +struct task_struct; +extern void debug_show_all_locks(void); +extern void debug_show_held_locks(struct task_struct *task); +extern void debug_check_no_locks_freed(const void *from, unsigned long len); +extern void debug_check_no_locks_held(struct task_struct *task); +struct task_struct; +struct pt_regs; +struct task_struct; +struct stack_trace { + unsigned int nr_entries, max_entries; + unsigned long *entries; + int skip; +}; +extern void save_stack_trace(struct stack_trace *trace); +extern void save_stack_trace_regs(struct stack_trace *trace, + struct pt_regs *regs); +extern void save_stack_trace_tsk(struct task_struct *tsk, + struct stack_trace *trace); +extern void print_stack_trace(struct stack_trace *trace, int spaces); +extern void save_stack_trace_user(struct stack_trace *trace); +struct lockdep_subclass_key { + char __one_byte; +} __attribute__ ((__packed__)); +struct lock_class_key { + struct lockdep_subclass_key subkeys[8UL]; +}; +extern struct lock_class_key __lockdep_no_validate__; +struct lock_class { + struct list_head hash_entry; + struct list_head lock_entry; + struct lockdep_subclass_key *key; + unsigned int subclass; + unsigned int dep_gen_id; + unsigned long usage_mask; + struct stack_trace usage_traces[(1+3*4)]; + struct list_head locks_after, locks_before; + unsigned int version; + unsigned long ops; + const char *name; + int name_version; +}; +struct lockdep_map { + struct lock_class_key *key; + struct lock_class *class_cache[2]; + const char *name; +}; +struct lock_list { + struct list_head entry; + struct lock_class *class; + struct stack_trace trace; + int distance; + struct lock_list *parent; +}; +struct lock_chain { + u8 irq_context; + u8 depth; + u16 base; + struct list_head entry; + u64 chain_key; +}; +struct held_lock { + u64 prev_chain_key; + unsigned long acquire_ip; + struct lockdep_map *instance; + struct lockdep_map *nest_lock; + unsigned int class_idx:13; + unsigned int irq_context:2; + unsigned int trylock:1; + unsigned int read:2; + unsigned int check:2; + unsigned int hardirqs_off:1; + unsigned int references:11; +}; +extern void lockdep_init(void); +extern void lockdep_info(void); +extern void lockdep_reset(void); +extern void lockdep_reset_lock(struct lockdep_map *lock); +extern void lockdep_free_key_range(void *start, unsigned long size); +extern void lockdep_sys_exit(void); +extern void lockdep_off(void); +extern void lockdep_on(void); +extern void lockdep_init_map(struct lockdep_map *lock, const char *name, + struct lock_class_key *key, int subclass); +static inline __attribute__((always_inline)) int lockdep_match_key(struct lockdep_map *lock, + struct lock_class_key *key) +{ + return lock->key == key; +} +extern void lock_acquire(struct lockdep_map *lock, unsigned int subclass, + int trylock, int read, int check, + struct lockdep_map *nest_lock, unsigned long ip); +extern void lock_release(struct lockdep_map *lock, int nested, + unsigned long ip); +extern int lock_is_held(struct lockdep_map *lock); +extern void lock_set_class(struct lockdep_map *lock, const char *name, + struct lock_class_key *key, unsigned int subclass, + unsigned long ip); +static inline __attribute__((always_inline)) void lock_set_subclass(struct lockdep_map *lock, + unsigned int subclass, unsigned long ip) +{ + lock_set_class(lock, lock->name, lock->key, subclass, ip); +} +extern void lockdep_set_current_reclaim_state(gfp_t gfp_mask); +extern void lockdep_clear_current_reclaim_state(void); +extern void lockdep_trace_alloc(gfp_t mask); +extern void print_irqtrace_events(struct task_struct *curr); +extern void ftrace_nmi_enter(void); +extern void ftrace_nmi_exit(void); +extern void cpu_idle(void); +typedef void (*smp_call_func_t)(void *info); +struct call_single_data { + struct list_head list; + smp_call_func_t func; + void *info; + u16 flags; + u16 priv; +}; +extern unsigned int total_cpus; +int smp_call_function_single(int cpuid, smp_call_func_t func, void *info, + int wait); +struct mpf_intel { + char signature[4]; + unsigned int physptr; + unsigned char length; + unsigned char specification; + unsigned char checksum; + unsigned char feature1; + unsigned char feature2; + unsigned char feature3; + unsigned char feature4; + unsigned char feature5; +}; +struct mpc_table { + char signature[4]; + unsigned short length; + char spec; + char checksum; + char oem[8]; + char productid[12]; + unsigned int oemptr; + unsigned short oemsize; + unsigned short oemcount; + unsigned int lapic; + unsigned int reserved; +}; +struct mpc_cpu { + unsigned char type; + unsigned char apicid; + unsigned char apicver; + unsigned char cpuflag; + unsigned int cpufeature; + unsigned int featureflag; + unsigned int reserved[2]; +}; +struct mpc_bus { + unsigned char type; + unsigned char busid; + unsigned char bustype[6]; +}; +struct mpc_ioapic { + unsigned char type; + unsigned char apicid; + unsigned char apicver; + unsigned char flags; + unsigned int apicaddr; +}; +struct mpc_intsrc { + unsigned char type; + unsigned char irqtype; + unsigned short irqflag; + unsigned char srcbus; + unsigned char srcbusirq; + unsigned char dstapic; + unsigned char dstirq; +}; +enum mp_irq_source_types { + mp_INT = 0, + mp_NMI = 1, + mp_SMI = 2, + mp_ExtINT = 3 +}; +struct mpc_lintsrc { + unsigned char type; + unsigned char irqtype; + unsigned short irqflag; + unsigned char srcbusid; + unsigned char srcbusirq; + unsigned char destapic; + unsigned char destapiclint; +}; +struct mpc_oemtable { + char signature[4]; + unsigned short length; + char rev; + char checksum; + char mpc[8]; +}; +enum mp_bustype { + MP_BUS_ISA = 1, + MP_BUS_EISA, + MP_BUS_PCI, + MP_BUS_MCA, +}; +struct screen_info { + __u8 orig_x; + __u8 orig_y; + __u16 ext_mem_k; + __u16 orig_video_page; + __u8 orig_video_mode; + __u8 orig_video_cols; + __u8 flags; + __u8 unused2; + __u16 orig_video_ega_bx; + __u16 unused3; + __u8 orig_video_lines; + __u8 orig_video_isVGA; + __u16 orig_video_points; + __u16 lfb_width; + __u16 lfb_height; + __u16 lfb_depth; + __u32 lfb_base; + __u32 lfb_size; + __u16 cl_magic, cl_offset; + __u16 lfb_linelength; + __u8 red_size; + __u8 red_pos; + __u8 green_size; + __u8 green_pos; + __u8 blue_size; + __u8 blue_pos; + __u8 rsvd_size; + __u8 rsvd_pos; + __u16 vesapm_seg; + __u16 vesapm_off; + __u16 pages; + __u16 vesa_attributes; + __u32 capabilities; + __u8 _reserved[6]; +} __attribute__((packed)); +extern struct screen_info screen_info; +typedef unsigned short apm_event_t; +typedef unsigned short apm_eventinfo_t; +struct apm_bios_info { + __u16 version; + __u16 cseg; + __u32 offset; + __u16 cseg_16; + __u16 dseg; + __u16 flags; + __u16 cseg_len; + __u16 cseg_16_len; + __u16 dseg_len; +}; +struct apm_info { + struct apm_bios_info bios; + unsigned short connection_version; + int get_power_status_broken; + int get_power_status_swabinminutes; + int allow_ints; + int forbid_idle; + int realmode_power_off; + int disabled; +}; +extern struct apm_info apm_info; +struct edd_device_params { + __u16 length; + __u16 info_flags; + __u32 num_default_cylinders; + __u32 num_default_heads; + __u32 sectors_per_track; + __u64 number_of_sectors; + __u16 bytes_per_sector; + __u32 dpte_ptr; + __u16 key; + __u8 device_path_info_length; + __u8 reserved2; + __u16 reserved3; + __u8 host_bus_type[4]; + __u8 interface_type[8]; + union { + struct { + __u16 base_address; + __u16 reserved1; + __u32 reserved2; + } __attribute__ ((packed)) isa; + struct { + __u8 bus; + __u8 slot; + __u8 function; + __u8 channel; + __u32 reserved; + } __attribute__ ((packed)) pci; + struct { + __u64 reserved; + } __attribute__ ((packed)) ibnd; + struct { + __u64 reserved; + } __attribute__ ((packed)) xprs; + struct { + __u64 reserved; + } __attribute__ ((packed)) htpt; + struct { + __u64 reserved; + } __attribute__ ((packed)) unknown; + } interface_path; + union { + struct { + __u8 device; + __u8 reserved1; + __u16 reserved2; + __u32 reserved3; + __u64 reserved4; + } __attribute__ ((packed)) ata; + struct { + __u8 device; + __u8 lun; + __u8 reserved1; + __u8 reserved2; + __u32 reserved3; + __u64 reserved4; + } __attribute__ ((packed)) atapi; + struct { + __u16 id; + __u64 lun; + __u16 reserved1; + __u32 reserved2; + } __attribute__ ((packed)) scsi; + struct { + __u64 serial_number; + __u64 reserved; + } __attribute__ ((packed)) usb; + struct { + __u64 eui; + __u64 reserved; + } __attribute__ ((packed)) i1394; + struct { + __u64 wwid; + __u64 lun; + } __attribute__ ((packed)) fibre; + struct { + __u64 identity_tag; + __u64 reserved; + } __attribute__ ((packed)) i2o; + struct { + __u32 array_number; + __u32 reserved1; + __u64 reserved2; + } __attribute__ ((packed)) raid; + struct { + __u8 device; + __u8 reserved1; + __u16 reserved2; + __u32 reserved3; + __u64 reserved4; + } __attribute__ ((packed)) sata; + struct { + __u64 reserved1; + __u64 reserved2; + } __attribute__ ((packed)) unknown; + } device_path; + __u8 reserved4; + __u8 checksum; +} __attribute__ ((packed)); +struct edd_info { + __u8 device; + __u8 version; + __u16 interface_support; + __u16 legacy_max_cylinder; + __u8 legacy_max_head; + __u8 legacy_sectors_per_track; + struct edd_device_params params; +} __attribute__ ((packed)); +struct edd { + unsigned int mbr_signature[16]; + struct edd_info edd_info[6]; + unsigned char mbr_signature_nr; + unsigned char edd_info_nr; +}; +extern struct edd edd; +struct e820entry { + __u64 addr; + __u64 size; + __u32 type; +} __attribute__((packed)); +struct e820map { + __u32 nr_map; + struct e820entry map[128]; +}; +extern struct e820map e820; +extern struct e820map e820_saved; +extern unsigned long pci_mem_start; +extern int e820_any_mapped(u64 start, u64 end, unsigned type); +extern int e820_all_mapped(u64 start, u64 end, unsigned type); +extern void e820_add_region(u64 start, u64 size, int type); +extern void e820_print_map(char *who); +extern int +sanitize_e820_map(struct e820entry *biosmap, int max_nr_map, u32 *pnr_map); +extern u64 e820_update_range(u64 start, u64 size, unsigned old_type, + unsigned new_type); +extern u64 e820_remove_range(u64 start, u64 size, unsigned old_type, + int checktype); +extern void update_e820(void); +extern void e820_setup_gap(void); +extern int e820_search_gap(unsigned long *gapstart, unsigned long *gapsize, + unsigned long start_addr, unsigned long long end_addr); +struct setup_data; +extern void parse_e820_ext(struct setup_data *data); +extern void e820_mark_nosave_regions(unsigned long limit_pfn); +static inline __attribute__((always_inline)) void early_memtest(unsigned long start, unsigned long end) +{ +} +extern unsigned long e820_end_of_ram_pfn(void); +extern unsigned long e820_end_of_low_ram_pfn(void); +extern u64 early_reserve_e820(u64 startt, u64 sizet, u64 align); +void memblock_x86_fill(void); +void memblock_find_dma_reserve(void); +extern void finish_e820_parsing(void); +extern void e820_reserve_resources(void); +extern void e820_reserve_resources_late(void); +extern void setup_memory_map(void); +extern char *default_machine_specific_memory_setup(void); +static inline __attribute__((always_inline)) bool is_ISA_range(u64 s, u64 e) +{ + return s >= 0xa0000 && e <= 0x100000; +} +struct resource { + resource_size_t start; + resource_size_t end; + const char *name; + unsigned long flags; + struct resource *parent, *sibling, *child; +}; +struct resource_list { + struct resource_list *next; + struct resource *res; + struct pci_dev *dev; +}; +extern struct resource ioport_resource; +extern struct resource iomem_resource; +extern struct resource *request_resource_conflict(struct resource *root, struct resource *new); +extern int request_resource(struct resource *root, struct resource *new); +extern int release_resource(struct resource *new); +void release_child_resources(struct resource *new); +extern void reserve_region_with_split(struct resource *root, + resource_size_t start, resource_size_t end, + const char *name); +extern struct resource *insert_resource_conflict(struct resource *parent, struct resource *new); +extern int insert_resource(struct resource *parent, struct resource *new); +extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new); +extern void arch_remove_reservations(struct resource *avail); +extern int allocate_resource(struct resource *root, struct resource *new, + resource_size_t size, resource_size_t min, + resource_size_t max, resource_size_t align, + resource_size_t (*alignf)(void *, + const struct resource *, + resource_size_t, + resource_size_t), + void *alignf_data); +int adjust_resource(struct resource *res, resource_size_t start, + resource_size_t size); +resource_size_t resource_alignment(struct resource *res); +static inline __attribute__((always_inline)) resource_size_t resource_size(const struct resource *res) +{ + return res->end - res->start + 1; +} +static inline __attribute__((always_inline)) unsigned long resource_type(const struct resource *res) +{ + return res->flags & 0x00001f00; +} +extern struct resource * __request_region(struct resource *, + resource_size_t start, + resource_size_t n, + const char *name, int flags); +extern int __check_region(struct resource *, resource_size_t, resource_size_t); +extern void __release_region(struct resource *, resource_size_t, + resource_size_t); +static inline __attribute__((always_inline)) int __attribute__((deprecated)) check_region(resource_size_t s, + resource_size_t n) +{ + return __check_region(&ioport_resource, s, n); +} +struct device; +extern struct resource * __devm_request_region(struct device *dev, + struct resource *parent, resource_size_t start, + resource_size_t n, const char *name); +extern void __devm_release_region(struct device *dev, struct resource *parent, + resource_size_t start, resource_size_t n); +extern int iomem_map_sanity_check(resource_size_t addr, unsigned long size); +extern int iomem_is_exclusive(u64 addr); +extern int +walk_system_ram_range(unsigned long start_pfn, unsigned long nr_pages, + void *arg, int (*func)(unsigned long, unsigned long, void *)); +struct ist_info { + __u32 signature; + __u32 command; + __u32 event; + __u32 perf_level; +}; +extern struct ist_info ist_info; +struct edid_info { + unsigned char dummy[128]; +}; +extern struct edid_info edid_info; +struct setup_data { + __u64 next; + __u32 type; + __u32 len; + __u8 data[0]; +}; +struct setup_header { + __u8 setup_sects; + __u16 root_flags; + __u32 syssize; + __u16 ram_size; + __u16 vid_mode; + __u16 root_dev; + __u16 boot_flag; + __u16 jump; + __u32 header; + __u16 version; + __u32 realmode_swtch; + __u16 start_sys; + __u16 kernel_version; + __u8 type_of_loader; + __u8 loadflags; + __u16 setup_move_size; + __u32 code32_start; + __u32 ramdisk_image; + __u32 ramdisk_size; + __u32 bootsect_kludge; + __u16 heap_end_ptr; + __u8 ext_loader_ver; + __u8 ext_loader_type; + __u32 cmd_line_ptr; + __u32 initrd_addr_max; + __u32 kernel_alignment; + __u8 relocatable_kernel; + __u8 _pad2[3]; + __u32 cmdline_size; + __u32 hardware_subarch; + __u64 hardware_subarch_data; + __u32 payload_offset; + __u32 payload_length; + __u64 setup_data; +} __attribute__((packed)); +struct sys_desc_table { + __u16 length; + __u8 table[14]; +}; +struct olpc_ofw_header { + __u32 ofw_magic; + __u32 ofw_version; + __u32 cif_handler; + __u32 irq_desc_table; +} __attribute__((packed)); +struct efi_info { + __u32 efi_loader_signature; + __u32 efi_systab; + __u32 efi_memdesc_size; + __u32 efi_memdesc_version; + __u32 efi_memmap; + __u32 efi_memmap_size; + __u32 efi_systab_hi; + __u32 efi_memmap_hi; +}; +struct boot_params { + struct screen_info screen_info; + struct apm_bios_info apm_bios_info; + __u8 _pad2[4]; + __u64 tboot_addr; + struct ist_info ist_info; + __u8 _pad3[16]; + __u8 hd0_info[16]; + __u8 hd1_info[16]; + struct sys_desc_table sys_desc_table; + struct olpc_ofw_header olpc_ofw_header; + __u8 _pad4[128]; + struct edid_info edid_info; + struct efi_info efi_info; + __u32 alt_mem_k; + __u32 scratch; + __u8 e820_entries; + __u8 eddbuf_entries; + __u8 edd_mbr_sig_buf_entries; + __u8 _pad6[6]; + struct setup_header hdr; + __u8 _pad7[0x290-0x1f1-sizeof(struct setup_header)]; + __u32 edd_mbr_sig_buffer[16]; + struct e820entry e820_map[128]; + __u8 _pad8[48]; + struct edd_info eddbuf[6]; + __u8 _pad9[276]; +} __attribute__((packed)); +enum { + X86_SUBARCH_PC = 0, + X86_SUBARCH_LGUEST, + X86_SUBARCH_XEN, + X86_SUBARCH_MRST, + X86_SUBARCH_CE4100, + X86_NR_SUBARCHS, +}; +struct mpc_bus; +struct mpc_cpu; +struct mpc_table; +struct x86_init_mpparse { + void (*mpc_record)(unsigned int mode); + void (*setup_ioapic_ids)(void); + int (*mpc_apic_id)(struct mpc_cpu *m); + void (*smp_read_mpc_oem)(struct mpc_table *mpc); + void (*mpc_oem_pci_bus)(struct mpc_bus *m); + void (*mpc_oem_bus_info)(struct mpc_bus *m, char *name); + void (*find_smp_config)(void); + void (*get_smp_config)(unsigned int early); +}; +struct x86_init_resources { + void (*probe_roms)(void); + void (*reserve_resources)(void); + char *(*memory_setup)(void); +}; +struct x86_init_irqs { + void (*pre_vector_init)(void); + void (*intr_init)(void); + void (*trap_init)(void); +}; +struct x86_init_oem { + void (*arch_setup)(void); + void (*banner)(void); +}; +struct x86_init_mapping { + void (*pagetable_reserve)(u64 start, u64 end); +}; +struct x86_init_paging { + void (*pagetable_setup_start)(pgd_t *base); + void (*pagetable_setup_done)(pgd_t *base); +}; +struct x86_init_timers { + void (*setup_percpu_clockev)(void); + void (*tsc_pre_init)(void); + void (*timer_init)(void); + void (*wallclock_init)(void); +}; +struct x86_init_iommu { + int (*iommu_init)(void); +}; +struct x86_init_pci { + int (*arch_init)(void); + int (*init)(void); + void (*init_irq)(void); + void (*fixup_irqs)(void); +}; +struct x86_init_ops { + struct x86_init_resources resources; + struct x86_init_mpparse mpparse; + struct x86_init_irqs irqs; + struct x86_init_oem oem; + struct x86_init_mapping mapping; + struct x86_init_paging paging; + struct x86_init_timers timers; + struct x86_init_iommu iommu; + struct x86_init_pci pci; +}; +struct x86_cpuinit_ops { + void (*setup_percpu_clockev)(void); +}; +struct x86_platform_ops { + unsigned long (*calibrate_tsc)(void); + unsigned long (*get_wallclock)(void); + int (*set_wallclock)(unsigned long nowtime); + void (*iommu_shutdown)(void); + bool (*is_untracked_pat_range)(u64 start, u64 end); + void (*nmi_init)(void); + int (*i8042_detect)(void); +}; +struct pci_dev; +struct x86_msi_ops { + int (*setup_msi_irqs)(struct pci_dev *dev, int nvec, int type); + void (*teardown_msi_irq)(unsigned int irq); + void (*teardown_msi_irqs)(struct pci_dev *dev); +}; +extern struct x86_init_ops x86_init; +extern struct x86_cpuinit_ops x86_cpuinit; +extern struct x86_platform_ops x86_platform; +extern struct x86_msi_ops x86_msi; +extern void x86_init_noop(void); +extern void x86_init_uint_noop(unsigned int unused); +struct local_apic { + struct { unsigned int __reserved[4]; } __reserved_01; + struct { unsigned int __reserved[4]; } __reserved_02; + struct { + unsigned int __reserved_1 : 24, + phys_apic_id : 4, + __reserved_2 : 4; + unsigned int __reserved[3]; + } id; + const + struct { + unsigned int version : 8, + __reserved_1 : 8, + max_lvt : 8, + __reserved_2 : 8; + unsigned int __reserved[3]; + } version; + struct { unsigned int __reserved[4]; } __reserved_03; + struct { unsigned int __reserved[4]; } __reserved_04; + struct { unsigned int __reserved[4]; } __reserved_05; + struct { unsigned int __reserved[4]; } __reserved_06; + struct { + unsigned int priority : 8, + __reserved_1 : 24; + unsigned int __reserved_2[3]; + } tpr; + const + struct { + unsigned int priority : 8, + __reserved_1 : 24; + unsigned int __reserved_2[3]; + } apr; + const + struct { + unsigned int priority : 8, + __reserved_1 : 24; + unsigned int __reserved_2[3]; + } ppr; + struct { + unsigned int eoi; + unsigned int __reserved[3]; + } eoi; + struct { unsigned int __reserved[4]; } __reserved_07; + struct { + unsigned int __reserved_1 : 24, + logical_dest : 8; + unsigned int __reserved_2[3]; + } ldr; + struct { + unsigned int __reserved_1 : 28, + model : 4; + unsigned int __reserved_2[3]; + } dfr; + struct { + unsigned int spurious_vector : 8, + apic_enabled : 1, + focus_cpu : 1, + __reserved_2 : 22; + unsigned int __reserved_3[3]; + } svr; + struct { + unsigned int bitfield; + unsigned int __reserved[3]; + } isr [8]; + struct { + unsigned int bitfield; + unsigned int __reserved[3]; + } tmr [8]; + struct { + unsigned int bitfield; + unsigned int __reserved[3]; + } irr [8]; + union { + struct { + unsigned int send_cs_error : 1, + receive_cs_error : 1, + send_accept_error : 1, + receive_accept_error : 1, + __reserved_1 : 1, + send_illegal_vector : 1, + receive_illegal_vector : 1, + illegal_register_address : 1, + __reserved_2 : 24; + unsigned int __reserved_3[3]; + } error_bits; + struct { + unsigned int errors; + unsigned int __reserved_3[3]; + } all_errors; + } esr; + struct { unsigned int __reserved[4]; } __reserved_08; + struct { unsigned int __reserved[4]; } __reserved_09; + struct { unsigned int __reserved[4]; } __reserved_10; + struct { unsigned int __reserved[4]; } __reserved_11; + struct { unsigned int __reserved[4]; } __reserved_12; + struct { unsigned int __reserved[4]; } __reserved_13; + struct { unsigned int __reserved[4]; } __reserved_14; + struct { + unsigned int vector : 8, + delivery_mode : 3, + destination_mode : 1, + delivery_status : 1, + __reserved_1 : 1, + level : 1, + trigger : 1, + __reserved_2 : 2, + shorthand : 2, + __reserved_3 : 12; + unsigned int __reserved_4[3]; + } icr1; + struct { + union { + unsigned int __reserved_1 : 24, + phys_dest : 4, + __reserved_2 : 4; + unsigned int __reserved_3 : 24, + logical_dest : 8; + } dest; + unsigned int __reserved_4[3]; + } icr2; + struct { + unsigned int vector : 8, + __reserved_1 : 4, + delivery_status : 1, + __reserved_2 : 3, + mask : 1, + timer_mode : 1, + __reserved_3 : 14; + unsigned int __reserved_4[3]; + } lvt_timer; + struct { + unsigned int vector : 8, + delivery_mode : 3, + __reserved_1 : 1, + delivery_status : 1, + __reserved_2 : 3, + mask : 1, + __reserved_3 : 15; + unsigned int __reserved_4[3]; + } lvt_thermal; + struct { + unsigned int vector : 8, + delivery_mode : 3, + __reserved_1 : 1, + delivery_status : 1, + __reserved_2 : 3, + mask : 1, + __reserved_3 : 15; + unsigned int __reserved_4[3]; + } lvt_pc; + struct { + unsigned int vector : 8, + delivery_mode : 3, + __reserved_1 : 1, + delivery_status : 1, + polarity : 1, + remote_irr : 1, + trigger : 1, + mask : 1, + __reserved_2 : 15; + unsigned int __reserved_3[3]; + } lvt_lint0; + struct { + unsigned int vector : 8, + delivery_mode : 3, + __reserved_1 : 1, + delivery_status : 1, + polarity : 1, + remote_irr : 1, + trigger : 1, + mask : 1, + __reserved_2 : 15; + unsigned int __reserved_3[3]; + } lvt_lint1; + struct { + unsigned int vector : 8, + __reserved_1 : 4, + delivery_status : 1, + __reserved_2 : 3, + mask : 1, + __reserved_3 : 15; + unsigned int __reserved_4[3]; + } lvt_error; + struct { + unsigned int initial_count; + unsigned int __reserved_2[3]; + } timer_icr; + const + struct { + unsigned int curr_count; + unsigned int __reserved_2[3]; + } timer_ccr; + struct { unsigned int __reserved[4]; } __reserved_16; + struct { unsigned int __reserved[4]; } __reserved_17; + struct { unsigned int __reserved[4]; } __reserved_18; + struct { unsigned int __reserved[4]; } __reserved_19; + struct { + unsigned int divisor : 4, + __reserved_1 : 28; + unsigned int __reserved_2[3]; + } timer_dcr; + struct { unsigned int __reserved[4]; } __reserved_20; +} __attribute__ ((packed)); +enum ioapic_irq_destination_types { + dest_Fixed = 0, + dest_LowestPrio = 1, + dest_SMI = 2, + dest__reserved_1 = 3, + dest_NMI = 4, + dest_INIT = 5, + dest__reserved_2 = 6, + dest_ExtINT = 7 +}; +extern int apic_version[]; +extern int pic_mode; +extern unsigned int def_to_bigsmp; +extern unsigned long mp_bus_not_pci[(((260) + (8 * sizeof(long)) - 1) / (8 * sizeof(long)))]; +extern unsigned int boot_cpu_physical_apicid; +extern unsigned int max_physical_apicid; +extern int mpc_default_type; +extern unsigned long mp_lapic_addr; +extern int smp_found_config; +static inline __attribute__((always_inline)) void get_smp_config(void) +{ + x86_init.mpparse.get_smp_config(0); +} +static inline __attribute__((always_inline)) void early_get_smp_config(void) +{ + x86_init.mpparse.get_smp_config(1); +} +static inline __attribute__((always_inline)) void find_smp_config(void) +{ + x86_init.mpparse.find_smp_config(); +} +extern void early_reserve_e820_mpc_new(void); +extern int enable_update_mptable; +extern int default_mpc_apic_id(struct mpc_cpu *m); +extern void default_smp_read_mpc_oem(struct mpc_table *mpc); +extern void default_mpc_oem_bus_info(struct mpc_bus *m, char *str); +extern void default_find_smp_config(void); +extern void default_get_smp_config(unsigned int early); +void __attribute__ ((__section__(".cpuinit.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) generic_processor_info(int apicid, int version); +extern void mp_register_ioapic(int id, u32 address, u32 gsi_base); +extern void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, + u32 gsi); +extern void mp_config_acpi_legacy_irqs(void); +struct device; +extern int mp_register_gsi(struct device *dev, u32 gsi, int edge_level, + int active_high_low); +struct physid_mask { + unsigned long mask[(((256) + (8 * sizeof(long)) - 1) / (8 * sizeof(long)))]; +}; +typedef struct physid_mask physid_mask_t; +static inline __attribute__((always_inline)) unsigned long physids_coerce(physid_mask_t *map) +{ + return map->mask[0]; +} +static inline __attribute__((always_inline)) void physids_promote(unsigned long physids, physid_mask_t *map) +{ + bitmap_zero((*map).mask, 256); + map->mask[0] = physids; +} +static inline __attribute__((always_inline)) void physid_set_mask_of_physid(int physid, physid_mask_t *map) +{ + bitmap_zero((*map).mask, 256); + set_bit(physid, (*map).mask); +} +extern physid_mask_t phys_cpu_present_map; +extern int generic_mps_oem_check(struct mpc_table *, char *, char *); +extern int default_acpi_madt_oem_check(char *, char *); +extern void local_bh_disable(void); +extern void _local_bh_enable(void); +extern void local_bh_enable(void); +extern void local_bh_enable_ip(unsigned long ip); +typedef struct arch_spinlock { + unsigned int slock; +} arch_spinlock_t; +typedef struct { + unsigned int lock; +} arch_rwlock_t; +typedef struct raw_spinlock { + arch_spinlock_t raw_lock; + unsigned int magic, owner_cpu; + void *owner; + struct lockdep_map dep_map; +} raw_spinlock_t; +typedef struct spinlock { + union { + struct raw_spinlock rlock; + struct { + u8 __padding[(__builtin_offsetof(struct raw_spinlock,dep_map))]; + struct lockdep_map dep_map; + }; + }; +} spinlock_t; +typedef struct { + arch_rwlock_t raw_lock; + unsigned int magic, owner_cpu; + void *owner; + struct lockdep_map dep_map; +} rwlock_t; +static inline __attribute__((always_inline)) __attribute__((always_inline)) void __ticket_spin_lock(arch_spinlock_t *lock) +{ + short inc = 0x0100; + asm volatile ( + ".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "xaddw %w0, %1\n" + "1:\t" + "cmpb %h0, %b0\n\t" + "je 2f\n\t" + "rep ; nop\n\t" + "movb %1, %b0\n\t" + "jmp 1b\n" + "2:" + : "+Q" (inc), "+m" (lock->slock) + : + : "memory", "cc"); +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) int __ticket_spin_trylock(arch_spinlock_t *lock) +{ + int tmp, new; + asm volatile("movzwl %2, %0\n\t" + "cmpb %h0,%b0\n\t" + "leal 0x100(%" "k" "0), %1\n\t" + "jne 1f\n\t" + ".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "cmpxchgw %w1,%2\n\t" + "1:" + "sete %b1\n\t" + "movzbl %b1,%0\n\t" + : "=&a" (tmp), "=&q" (new), "+m" (lock->slock) + : + : "memory", "cc"); + return tmp; +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) void __ticket_spin_unlock(arch_spinlock_t *lock) +{ + asm volatile( "incb %0" + : "+m" (lock->slock) + : + : "memory", "cc"); +} +static inline __attribute__((always_inline)) int __ticket_spin_is_locked(arch_spinlock_t *lock) +{ + int tmp = (*(volatile typeof(lock->slock) *)&(lock->slock)); + return !!(((tmp >> 8) ^ tmp) & ((1 << 8) - 1)); +} +static inline __attribute__((always_inline)) int __ticket_spin_is_contended(arch_spinlock_t *lock) +{ + int tmp = (*(volatile typeof(lock->slock) *)&(lock->slock)); + return (((tmp >> 8) - tmp) & ((1 << 8) - 1)) > 1; +} +static inline __attribute__((always_inline)) int arch_spin_is_locked(arch_spinlock_t *lock) +{ + return __ticket_spin_is_locked(lock); +} +static inline __attribute__((always_inline)) int arch_spin_is_contended(arch_spinlock_t *lock) +{ + return __ticket_spin_is_contended(lock); +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) void arch_spin_lock(arch_spinlock_t *lock) +{ + __ticket_spin_lock(lock); +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) int arch_spin_trylock(arch_spinlock_t *lock) +{ + return __ticket_spin_trylock(lock); +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) void arch_spin_unlock(arch_spinlock_t *lock) +{ + __ticket_spin_unlock(lock); +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) void arch_spin_lock_flags(arch_spinlock_t *lock, + unsigned long flags) +{ + arch_spin_lock(lock); +} +static inline __attribute__((always_inline)) void arch_spin_unlock_wait(arch_spinlock_t *lock) +{ + while (arch_spin_is_locked(lock)) + cpu_relax(); +} +static inline __attribute__((always_inline)) int arch_read_can_lock(arch_rwlock_t *lock) +{ + return (int)(lock)->lock > 0; +} +static inline __attribute__((always_inline)) int arch_write_can_lock(arch_rwlock_t *lock) +{ + return (lock)->lock == 0x01000000; +} +static inline __attribute__((always_inline)) void arch_read_lock(arch_rwlock_t *rw) +{ + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " " subl $1,(%0)\n\t" + "jns 1f\n" + "call __read_lock_failed\n\t" + "1:\n" + ::"a" (rw) : "memory"); +} +static inline __attribute__((always_inline)) void arch_write_lock(arch_rwlock_t *rw) +{ + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " " subl %1,(%0)\n\t" + "jz 1f\n" + "call __write_lock_failed\n\t" + "1:\n" + ::"a" (rw), "i" (0x01000000) : "memory"); +} +static inline __attribute__((always_inline)) int arch_read_trylock(arch_rwlock_t *lock) +{ + atomic_t *count = (atomic_t *)lock; + if (__builtin_constant_p((((atomic_sub_return(1, count)) >= 0))) ? !!(((atomic_sub_return(1, count)) >= 0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/spinlock.h", .line = 271, }; ______r = !!(((atomic_sub_return(1, count)) >= 0)); ______f.miss_hit[______r]++; ______r; })) + return 1; + atomic_inc(count); + return 0; +} +static inline __attribute__((always_inline)) int arch_write_trylock(arch_rwlock_t *lock) +{ + atomic_t *count = (atomic_t *)lock; + if (__builtin_constant_p(((atomic_sub_and_test(0x01000000, count)))) ? !!((atomic_sub_and_test(0x01000000, count))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/spinlock.h", .line = 281, }; ______r = !!((atomic_sub_and_test(0x01000000, count))); ______f.miss_hit[______r]++; ______r; })) + return 1; + atomic_add(0x01000000, count); + return 0; +} +static inline __attribute__((always_inline)) void arch_read_unlock(arch_rwlock_t *rw) +{ + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "incl %0" :"+m" (rw->lock) : : "memory"); +} +static inline __attribute__((always_inline)) void arch_write_unlock(arch_rwlock_t *rw) +{ + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "addl %1, %0" + : "+m" (rw->lock) : "i" (0x01000000) : "memory"); +} +static inline __attribute__((always_inline)) void smp_mb__after_lock(void) { } + extern void __raw_spin_lock_init(raw_spinlock_t *lock, const char *name, + struct lock_class_key *key); + extern void do_raw_spin_lock(raw_spinlock_t *lock) ; + extern int do_raw_spin_trylock(raw_spinlock_t *lock); + extern void do_raw_spin_unlock(raw_spinlock_t *lock) ; + extern void __rwlock_init(rwlock_t *lock, const char *name, + struct lock_class_key *key); + extern void do_raw_read_lock(rwlock_t *lock) ; + extern int do_raw_read_trylock(rwlock_t *lock); + extern void do_raw_read_unlock(rwlock_t *lock) ; + extern void do_raw_write_lock(rwlock_t *lock) ; + extern int do_raw_write_trylock(rwlock_t *lock); + extern void do_raw_write_unlock(rwlock_t *lock) ; +int in_lock_functions(unsigned long addr); +void __attribute__((section(".spinlock.text"))) _raw_spin_lock(raw_spinlock_t *lock) ; +void __attribute__((section(".spinlock.text"))) _raw_spin_lock_nested(raw_spinlock_t *lock, int subclass) + ; +void __attribute__((section(".spinlock.text"))) +_raw_spin_lock_nest_lock(raw_spinlock_t *lock, struct lockdep_map *map) + ; +void __attribute__((section(".spinlock.text"))) _raw_spin_lock_bh(raw_spinlock_t *lock) ; +void __attribute__((section(".spinlock.text"))) _raw_spin_lock_irq(raw_spinlock_t *lock) + ; +unsigned long __attribute__((section(".spinlock.text"))) _raw_spin_lock_irqsave(raw_spinlock_t *lock) + ; +unsigned long __attribute__((section(".spinlock.text"))) +_raw_spin_lock_irqsave_nested(raw_spinlock_t *lock, int subclass) + ; +int __attribute__((section(".spinlock.text"))) _raw_spin_trylock(raw_spinlock_t *lock); +int __attribute__((section(".spinlock.text"))) _raw_spin_trylock_bh(raw_spinlock_t *lock); +void __attribute__((section(".spinlock.text"))) _raw_spin_unlock(raw_spinlock_t *lock) ; +void __attribute__((section(".spinlock.text"))) _raw_spin_unlock_bh(raw_spinlock_t *lock) ; +void __attribute__((section(".spinlock.text"))) _raw_spin_unlock_irq(raw_spinlock_t *lock) ; +void __attribute__((section(".spinlock.text"))) +_raw_spin_unlock_irqrestore(raw_spinlock_t *lock, unsigned long flags) + ; +static inline __attribute__((always_inline)) int __raw_spin_trylock(raw_spinlock_t *lock) +{ + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + if (__builtin_constant_p(((do_raw_spin_trylock(lock)))) ? !!((do_raw_spin_trylock(lock))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/spinlock_api_smp.h", .line = 89, }; ______r = !!((do_raw_spin_trylock(lock))); ______f.miss_hit[______r]++; ______r; })) { + lock_acquire(&lock->dep_map, 0, 1, 0, 2, ((void *)0), (unsigned long)__builtin_return_address(0)); + return 1; + } + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/spinlock_api_smp.h", .line = 93, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/spinlock_api_smp.h", .line = 93, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/spinlock_api_smp.h", .line = 93, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/spinlock_api_smp.h", .line = 93, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); + return 0; +} +static inline __attribute__((always_inline)) unsigned long __raw_spin_lock_irqsave(raw_spinlock_t *lock) +{ + unsigned long flags; + do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); flags = arch_local_irq_save(); } while (0); trace_hardirqs_off(); } while (0); + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + lock_acquire(&lock->dep_map, 0, 0, 0, 2, ((void *)0), (unsigned long)__builtin_return_address(0)); + do_raw_spin_lock(lock); + return flags; +} +static inline __attribute__((always_inline)) void __raw_spin_lock_irq(raw_spinlock_t *lock) +{ + do { arch_local_irq_disable(); trace_hardirqs_off(); } while (0); + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + lock_acquire(&lock->dep_map, 0, 0, 0, 2, ((void *)0), (unsigned long)__builtin_return_address(0)); + do_raw_spin_lock(lock); +} +static inline __attribute__((always_inline)) void __raw_spin_lock_bh(raw_spinlock_t *lock) +{ + local_bh_disable(); + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + lock_acquire(&lock->dep_map, 0, 0, 0, 2, ((void *)0), (unsigned long)__builtin_return_address(0)); + do_raw_spin_lock(lock); +} +static inline __attribute__((always_inline)) void __raw_spin_lock(raw_spinlock_t *lock) +{ + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + lock_acquire(&lock->dep_map, 0, 0, 0, 2, ((void *)0), (unsigned long)__builtin_return_address(0)); + do_raw_spin_lock(lock); +} +static inline __attribute__((always_inline)) void __raw_spin_unlock(raw_spinlock_t *lock) +{ + lock_release(&lock->dep_map, 1, (unsigned long)__builtin_return_address(0)); + do_raw_spin_unlock(lock); + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/spinlock_api_smp.h", .line = 153, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/spinlock_api_smp.h", .line = 153, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/spinlock_api_smp.h", .line = 153, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/spinlock_api_smp.h", .line = 153, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); +} +static inline __attribute__((always_inline)) void __raw_spin_unlock_irqrestore(raw_spinlock_t *lock, + unsigned long flags) +{ + lock_release(&lock->dep_map, 1, (unsigned long)__builtin_return_address(0)); + do_raw_spin_unlock(lock); + do { if (__builtin_constant_p(((({ ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_irqs_disabled_flags(flags); })))) ? !!((({ ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_irqs_disabled_flags(flags); }))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/spinlock_api_smp.h", .line = 161, }; ______r = !!((({ ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_irqs_disabled_flags(flags); }))); ______f.miss_hit[______r]++; ______r; })) { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(flags); } while (0); trace_hardirqs_off(); } else { trace_hardirqs_on(); do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(flags); } while (0); } } while (0); + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/spinlock_api_smp.h", .line = 162, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/spinlock_api_smp.h", .line = 162, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/spinlock_api_smp.h", .line = 162, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/spinlock_api_smp.h", .line = 162, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); +} +static inline __attribute__((always_inline)) void __raw_spin_unlock_irq(raw_spinlock_t *lock) +{ + lock_release(&lock->dep_map, 1, (unsigned long)__builtin_return_address(0)); + do_raw_spin_unlock(lock); + do { trace_hardirqs_on(); arch_local_irq_enable(); } while (0); + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/spinlock_api_smp.h", .line = 170, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/spinlock_api_smp.h", .line = 170, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/spinlock_api_smp.h", .line = 170, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/spinlock_api_smp.h", .line = 170, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); +} +static inline __attribute__((always_inline)) void __raw_spin_unlock_bh(raw_spinlock_t *lock) +{ + lock_release(&lock->dep_map, 1, (unsigned long)__builtin_return_address(0)); + do_raw_spin_unlock(lock); + do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); + local_bh_enable_ip((unsigned long)__builtin_return_address(0)); +} +static inline __attribute__((always_inline)) int __raw_spin_trylock_bh(raw_spinlock_t *lock) +{ + local_bh_disable(); + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + if (__builtin_constant_p(((do_raw_spin_trylock(lock)))) ? !!((do_raw_spin_trylock(lock))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/spinlock_api_smp.h", .line = 185, }; ______r = !!((do_raw_spin_trylock(lock))); ______f.miss_hit[______r]++; ______r; })) { + lock_acquire(&lock->dep_map, 0, 1, 0, 2, ((void *)0), (unsigned long)__builtin_return_address(0)); + return 1; + } + do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); + local_bh_enable_ip((unsigned long)__builtin_return_address(0)); + return 0; +} +void __attribute__((section(".spinlock.text"))) _raw_read_lock(rwlock_t *lock) ; +void __attribute__((section(".spinlock.text"))) _raw_write_lock(rwlock_t *lock) ; +void __attribute__((section(".spinlock.text"))) _raw_read_lock_bh(rwlock_t *lock) ; +void __attribute__((section(".spinlock.text"))) _raw_write_lock_bh(rwlock_t *lock) ; +void __attribute__((section(".spinlock.text"))) _raw_read_lock_irq(rwlock_t *lock) ; +void __attribute__((section(".spinlock.text"))) _raw_write_lock_irq(rwlock_t *lock) ; +unsigned long __attribute__((section(".spinlock.text"))) _raw_read_lock_irqsave(rwlock_t *lock) + ; +unsigned long __attribute__((section(".spinlock.text"))) _raw_write_lock_irqsave(rwlock_t *lock) + ; +int __attribute__((section(".spinlock.text"))) _raw_read_trylock(rwlock_t *lock); +int __attribute__((section(".spinlock.text"))) _raw_write_trylock(rwlock_t *lock); +void __attribute__((section(".spinlock.text"))) _raw_read_unlock(rwlock_t *lock) ; +void __attribute__((section(".spinlock.text"))) _raw_write_unlock(rwlock_t *lock) ; +void __attribute__((section(".spinlock.text"))) _raw_read_unlock_bh(rwlock_t *lock) ; +void __attribute__((section(".spinlock.text"))) _raw_write_unlock_bh(rwlock_t *lock) ; +void __attribute__((section(".spinlock.text"))) _raw_read_unlock_irq(rwlock_t *lock) ; +void __attribute__((section(".spinlock.text"))) _raw_write_unlock_irq(rwlock_t *lock) ; +void __attribute__((section(".spinlock.text"))) +_raw_read_unlock_irqrestore(rwlock_t *lock, unsigned long flags) + ; +void __attribute__((section(".spinlock.text"))) +_raw_write_unlock_irqrestore(rwlock_t *lock, unsigned long flags) + ; +static inline __attribute__((always_inline)) int __raw_read_trylock(rwlock_t *lock) +{ + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + if (__builtin_constant_p(((do_raw_read_trylock(lock)))) ? !!((do_raw_read_trylock(lock))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 120, }; ______r = !!((do_raw_read_trylock(lock))); ______f.miss_hit[______r]++; ______r; })) { + lock_acquire(&lock->dep_map, 0, 1, 2, 2, ((void *)0), (unsigned long)__builtin_return_address(0)); + return 1; + } + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 124, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 124, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 124, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 124, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); + return 0; +} +static inline __attribute__((always_inline)) int __raw_write_trylock(rwlock_t *lock) +{ + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + if (__builtin_constant_p(((do_raw_write_trylock(lock)))) ? !!((do_raw_write_trylock(lock))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 131, }; ______r = !!((do_raw_write_trylock(lock))); ______f.miss_hit[______r]++; ______r; })) { + lock_acquire(&lock->dep_map, 0, 1, 0, 2, ((void *)0), (unsigned long)__builtin_return_address(0)); + return 1; + } + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 135, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 135, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 135, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 135, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); + return 0; +} +static inline __attribute__((always_inline)) void __raw_read_lock(rwlock_t *lock) +{ + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + lock_acquire(&lock->dep_map, 0, 0, 2, 2, ((void *)0), (unsigned long)__builtin_return_address(0)); + do_raw_read_lock(lock); +} +static inline __attribute__((always_inline)) unsigned long __raw_read_lock_irqsave(rwlock_t *lock) +{ + unsigned long flags; + do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); flags = arch_local_irq_save(); } while (0); trace_hardirqs_off(); } while (0); + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + lock_acquire(&lock->dep_map, 0, 0, 2, 2, ((void *)0), (unsigned long)__builtin_return_address(0)); + (do_raw_read_lock)((lock)) + ; + return flags; +} +static inline __attribute__((always_inline)) void __raw_read_lock_irq(rwlock_t *lock) +{ + do { arch_local_irq_disable(); trace_hardirqs_off(); } while (0); + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + lock_acquire(&lock->dep_map, 0, 0, 2, 2, ((void *)0), (unsigned long)__builtin_return_address(0)); + do_raw_read_lock(lock); +} +static inline __attribute__((always_inline)) void __raw_read_lock_bh(rwlock_t *lock) +{ + local_bh_disable(); + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + lock_acquire(&lock->dep_map, 0, 0, 2, 2, ((void *)0), (unsigned long)__builtin_return_address(0)); + do_raw_read_lock(lock); +} +static inline __attribute__((always_inline)) unsigned long __raw_write_lock_irqsave(rwlock_t *lock) +{ + unsigned long flags; + do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); flags = arch_local_irq_save(); } while (0); trace_hardirqs_off(); } while (0); + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + lock_acquire(&lock->dep_map, 0, 0, 0, 2, ((void *)0), (unsigned long)__builtin_return_address(0)); + (do_raw_write_lock)((lock)) + ; + return flags; +} +static inline __attribute__((always_inline)) void __raw_write_lock_irq(rwlock_t *lock) +{ + do { arch_local_irq_disable(); trace_hardirqs_off(); } while (0); + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + lock_acquire(&lock->dep_map, 0, 0, 0, 2, ((void *)0), (unsigned long)__builtin_return_address(0)); + do_raw_write_lock(lock); +} +static inline __attribute__((always_inline)) void __raw_write_lock_bh(rwlock_t *lock) +{ + local_bh_disable(); + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + lock_acquire(&lock->dep_map, 0, 0, 0, 2, ((void *)0), (unsigned long)__builtin_return_address(0)); + do_raw_write_lock(lock); +} +static inline __attribute__((always_inline)) void __raw_write_lock(rwlock_t *lock) +{ + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + lock_acquire(&lock->dep_map, 0, 0, 0, 2, ((void *)0), (unsigned long)__builtin_return_address(0)); + do_raw_write_lock(lock); +} +static inline __attribute__((always_inline)) void __raw_write_unlock(rwlock_t *lock) +{ + lock_release(&lock->dep_map, 1, (unsigned long)__builtin_return_address(0)); + do_raw_write_unlock(lock); + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 222, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 222, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 222, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 222, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); +} +static inline __attribute__((always_inline)) void __raw_read_unlock(rwlock_t *lock) +{ + lock_release(&lock->dep_map, 1, (unsigned long)__builtin_return_address(0)); + do_raw_read_unlock(lock); + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 229, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 229, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 229, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 229, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); +} +static inline __attribute__((always_inline)) void +__raw_read_unlock_irqrestore(rwlock_t *lock, unsigned long flags) +{ + lock_release(&lock->dep_map, 1, (unsigned long)__builtin_return_address(0)); + do_raw_read_unlock(lock); + do { if (__builtin_constant_p(((({ ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_irqs_disabled_flags(flags); })))) ? !!((({ ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_irqs_disabled_flags(flags); }))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 237, }; ______r = !!((({ ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_irqs_disabled_flags(flags); }))); ______f.miss_hit[______r]++; ______r; })) { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(flags); } while (0); trace_hardirqs_off(); } else { trace_hardirqs_on(); do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(flags); } while (0); } } while (0); + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 238, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 238, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 238, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 238, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); +} +static inline __attribute__((always_inline)) void __raw_read_unlock_irq(rwlock_t *lock) +{ + lock_release(&lock->dep_map, 1, (unsigned long)__builtin_return_address(0)); + do_raw_read_unlock(lock); + do { trace_hardirqs_on(); arch_local_irq_enable(); } while (0); + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 246, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 246, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 246, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 246, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); +} +static inline __attribute__((always_inline)) void __raw_read_unlock_bh(rwlock_t *lock) +{ + lock_release(&lock->dep_map, 1, (unsigned long)__builtin_return_address(0)); + do_raw_read_unlock(lock); + do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); + local_bh_enable_ip((unsigned long)__builtin_return_address(0)); +} +static inline __attribute__((always_inline)) void __raw_write_unlock_irqrestore(rwlock_t *lock, + unsigned long flags) +{ + lock_release(&lock->dep_map, 1, (unsigned long)__builtin_return_address(0)); + do_raw_write_unlock(lock); + do { if (__builtin_constant_p(((({ ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_irqs_disabled_flags(flags); })))) ? !!((({ ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_irqs_disabled_flags(flags); }))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 262, }; ______r = !!((({ ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_irqs_disabled_flags(flags); }))); ______f.miss_hit[______r]++; ______r; })) { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(flags); } while (0); trace_hardirqs_off(); } else { trace_hardirqs_on(); do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(flags); } while (0); } } while (0); + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 263, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 263, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 263, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 263, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); +} +static inline __attribute__((always_inline)) void __raw_write_unlock_irq(rwlock_t *lock) +{ + lock_release(&lock->dep_map, 1, (unsigned long)__builtin_return_address(0)); + do_raw_write_unlock(lock); + do { trace_hardirqs_on(); arch_local_irq_enable(); } while (0); + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 271, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 271, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 271, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rwlock_api_smp.h", .line = 271, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); +} +static inline __attribute__((always_inline)) void __raw_write_unlock_bh(rwlock_t *lock) +{ + lock_release(&lock->dep_map, 1, (unsigned long)__builtin_return_address(0)); + do_raw_write_unlock(lock); + do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); + local_bh_enable_ip((unsigned long)__builtin_return_address(0)); +} +static inline __attribute__((always_inline)) raw_spinlock_t *spinlock_check(spinlock_t *lock) +{ + return &lock->rlock; +} +static inline __attribute__((always_inline)) void spin_lock(spinlock_t *lock) +{ + _raw_spin_lock(&lock->rlock); +} +static inline __attribute__((always_inline)) void spin_lock_bh(spinlock_t *lock) +{ + _raw_spin_lock_bh(&lock->rlock); +} +static inline __attribute__((always_inline)) int spin_trylock(spinlock_t *lock) +{ + return (_raw_spin_trylock(&lock->rlock)); +} +static inline __attribute__((always_inline)) void spin_lock_irq(spinlock_t *lock) +{ + _raw_spin_lock_irq(&lock->rlock); +} +static inline __attribute__((always_inline)) void spin_unlock(spinlock_t *lock) +{ + _raw_spin_unlock(&lock->rlock); +} +static inline __attribute__((always_inline)) void spin_unlock_bh(spinlock_t *lock) +{ + _raw_spin_unlock_bh(&lock->rlock); +} +static inline __attribute__((always_inline)) void spin_unlock_irq(spinlock_t *lock) +{ + _raw_spin_unlock_irq(&lock->rlock); +} +static inline __attribute__((always_inline)) void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags) +{ + do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); _raw_spin_unlock_irqrestore(&lock->rlock, flags); } while (0); +} +static inline __attribute__((always_inline)) int spin_trylock_bh(spinlock_t *lock) +{ + return (_raw_spin_trylock_bh(&lock->rlock)); +} +static inline __attribute__((always_inline)) int spin_trylock_irq(spinlock_t *lock) +{ + return ({ do { arch_local_irq_disable(); trace_hardirqs_off(); } while (0); (_raw_spin_trylock(&lock->rlock)) ? 1 : ({ do { trace_hardirqs_on(); arch_local_irq_enable(); } while (0); 0; }); }); +} +static inline __attribute__((always_inline)) void spin_unlock_wait(spinlock_t *lock) +{ + arch_spin_unlock_wait(&(&lock->rlock)->raw_lock); +} +static inline __attribute__((always_inline)) int spin_is_locked(spinlock_t *lock) +{ + return arch_spin_is_locked(&(&lock->rlock)->raw_lock); +} +static inline __attribute__((always_inline)) int spin_is_contended(spinlock_t *lock) +{ + return arch_spin_is_contended(&(&lock->rlock)->raw_lock); +} +static inline __attribute__((always_inline)) int spin_can_lock(spinlock_t *lock) +{ + return (!arch_spin_is_locked(&(&lock->rlock)->raw_lock)); +} +static inline __attribute__((always_inline)) void assert_spin_locked(spinlock_t *lock) +{ + do { if (__builtin_constant_p((((__builtin_constant_p(!arch_spin_is_locked(&(&lock->rlock)->raw_lock)) ? !!(!arch_spin_is_locked(&(&lock->rlock)->raw_lock)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/spinlock.h", .line = 380, }; ______r = __builtin_expect(!!(!arch_spin_is_locked(&(&lock->rlock)->raw_lock)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(!arch_spin_is_locked(&(&lock->rlock)->raw_lock)) ? !!(!arch_spin_is_locked(&(&lock->rlock)->raw_lock)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/spinlock.h", .line = 380, }; ______r = __builtin_expect(!!(!arch_spin_is_locked(&(&lock->rlock)->raw_lock)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/spinlock.h", .line = 380, }; ______r = !!(((__builtin_constant_p(!arch_spin_is_locked(&(&lock->rlock)->raw_lock)) ? !!(!arch_spin_is_locked(&(&lock->rlock)->raw_lock)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/spinlock.h", .line = 380, }; ______r = __builtin_expect(!!(!arch_spin_is_locked(&(&lock->rlock)->raw_lock)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/spinlock.h"), "i" (380), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); } while(0); +} +extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock); +typedef struct { + unsigned sequence; + spinlock_t lock; +} seqlock_t; +static inline __attribute__((always_inline)) void write_seqlock(seqlock_t *sl) +{ + spin_lock(&sl->lock); + ++sl->sequence; + __asm__ __volatile__("": : :"memory"); +} +static inline __attribute__((always_inline)) void write_sequnlock(seqlock_t *sl) +{ + __asm__ __volatile__("": : :"memory"); + sl->sequence++; + spin_unlock(&sl->lock); +} +static inline __attribute__((always_inline)) int write_tryseqlock(seqlock_t *sl) +{ + int ret = spin_trylock(&sl->lock); + if (__builtin_constant_p(((ret))) ? !!((ret)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/seqlock.h", .line = 76, }; ______r = !!((ret)); ______f.miss_hit[______r]++; ______r; })) { + ++sl->sequence; + __asm__ __volatile__("": : :"memory"); + } + return ret; +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned read_seqbegin(const seqlock_t *sl) +{ + unsigned ret; +repeat: + ret = (*(volatile typeof(sl->sequence) *)&(sl->sequence)); + if (__builtin_constant_p((((__builtin_constant_p(ret & 1) ? !!(ret & 1) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/seqlock.h", .line = 90, }; ______r = __builtin_expect(!!(ret & 1), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(ret & 1) ? !!(ret & 1) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/seqlock.h", .line = 90, }; ______r = __builtin_expect(!!(ret & 1), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/seqlock.h", .line = 90, }; ______r = !!(((__builtin_constant_p(ret & 1) ? !!(ret & 1) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/seqlock.h", .line = 90, }; ______r = __builtin_expect(!!(ret & 1), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) { + cpu_relax(); + goto repeat; + } + __asm__ __volatile__("": : :"memory"); + return ret; +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) int read_seqretry(const seqlock_t *sl, unsigned start) +{ + __asm__ __volatile__("": : :"memory"); + return (__builtin_constant_p(sl->sequence != start) ? !!(sl->sequence != start) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/seqlock.h", .line = 108, }; ______r = __builtin_expect(!!(sl->sequence != start), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })); +} +typedef struct seqcount { + unsigned sequence; +} seqcount_t; +static inline __attribute__((always_inline)) unsigned __read_seqcount_begin(const seqcount_t *s) +{ + unsigned ret; +repeat: + ret = s->sequence; + if (__builtin_constant_p((((__builtin_constant_p(ret & 1) ? !!(ret & 1) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/seqlock.h", .line = 145, }; ______r = __builtin_expect(!!(ret & 1), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(ret & 1) ? !!(ret & 1) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/seqlock.h", .line = 145, }; ______r = __builtin_expect(!!(ret & 1), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/seqlock.h", .line = 145, }; ______r = !!(((__builtin_constant_p(ret & 1) ? !!(ret & 1) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/seqlock.h", .line = 145, }; ______r = __builtin_expect(!!(ret & 1), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) { + cpu_relax(); + goto repeat; + } + return ret; +} +static inline __attribute__((always_inline)) unsigned read_seqcount_begin(const seqcount_t *s) +{ + unsigned ret = __read_seqcount_begin(s); + __asm__ __volatile__("": : :"memory"); + return ret; +} +static inline __attribute__((always_inline)) int __read_seqcount_retry(const seqcount_t *s, unsigned start) +{ + return (__builtin_constant_p(s->sequence != start) ? !!(s->sequence != start) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/seqlock.h", .line = 184, }; ______r = __builtin_expect(!!(s->sequence != start), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })); +} +static inline __attribute__((always_inline)) int read_seqcount_retry(const seqcount_t *s, unsigned start) +{ + __asm__ __volatile__("": : :"memory"); + return __read_seqcount_retry(s, start); +} +static inline __attribute__((always_inline)) void write_seqcount_begin(seqcount_t *s) +{ + s->sequence++; + __asm__ __volatile__("": : :"memory"); +} +static inline __attribute__((always_inline)) void write_seqcount_end(seqcount_t *s) +{ + __asm__ __volatile__("": : :"memory"); + s->sequence++; +} +static inline __attribute__((always_inline)) void write_seqcount_barrier(seqcount_t *s) +{ + __asm__ __volatile__("": : :"memory"); + s->sequence+=2; +} +struct timespec { + __kernel_time_t tv_sec; + long tv_nsec; +}; +struct timeval { + __kernel_time_t tv_sec; + __kernel_suseconds_t tv_usec; +}; +struct timezone { + int tz_minuteswest; + int tz_dsttime; +}; +extern struct timezone sys_tz; +static inline __attribute__((always_inline)) int timespec_equal(const struct timespec *a, + const struct timespec *b) +{ + return (a->tv_sec == b->tv_sec) && (a->tv_nsec == b->tv_nsec); +} +static inline __attribute__((always_inline)) int timespec_compare(const struct timespec *lhs, const struct timespec *rhs) +{ + if (__builtin_constant_p(((lhs->tv_sec < rhs->tv_sec))) ? !!((lhs->tv_sec < rhs->tv_sec)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/time.h", .line = 58, }; ______r = !!((lhs->tv_sec < rhs->tv_sec)); ______f.miss_hit[______r]++; ______r; })) + return -1; + if (__builtin_constant_p(((lhs->tv_sec > rhs->tv_sec))) ? !!((lhs->tv_sec > rhs->tv_sec)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/time.h", .line = 60, }; ______r = !!((lhs->tv_sec > rhs->tv_sec)); ______f.miss_hit[______r]++; ______r; })) + return 1; + return lhs->tv_nsec - rhs->tv_nsec; +} +static inline __attribute__((always_inline)) int timeval_compare(const struct timeval *lhs, const struct timeval *rhs) +{ + if (__builtin_constant_p(((lhs->tv_sec < rhs->tv_sec))) ? !!((lhs->tv_sec < rhs->tv_sec)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/time.h", .line = 67, }; ______r = !!((lhs->tv_sec < rhs->tv_sec)); ______f.miss_hit[______r]++; ______r; })) + return -1; + if (__builtin_constant_p(((lhs->tv_sec > rhs->tv_sec))) ? !!((lhs->tv_sec > rhs->tv_sec)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/time.h", .line = 69, }; ______r = !!((lhs->tv_sec > rhs->tv_sec)); ______f.miss_hit[______r]++; ______r; })) + return 1; + return lhs->tv_usec - rhs->tv_usec; +} +extern unsigned long mktime(const unsigned int year, const unsigned int mon, + const unsigned int day, const unsigned int hour, + const unsigned int min, const unsigned int sec); +extern void set_normalized_timespec(struct timespec *ts, time_t sec, s64 nsec); +extern struct timespec timespec_add_safe(const struct timespec lhs, + const struct timespec rhs); +static inline __attribute__((always_inline)) struct timespec timespec_add(struct timespec lhs, + struct timespec rhs) +{ + struct timespec ts_delta; + set_normalized_timespec(&ts_delta, lhs.tv_sec + rhs.tv_sec, + lhs.tv_nsec + rhs.tv_nsec); + return ts_delta; +} +static inline __attribute__((always_inline)) struct timespec timespec_sub(struct timespec lhs, + struct timespec rhs) +{ + struct timespec ts_delta; + set_normalized_timespec(&ts_delta, lhs.tv_sec - rhs.tv_sec, + lhs.tv_nsec - rhs.tv_nsec); + return ts_delta; +} +extern void read_persistent_clock(struct timespec *ts); +extern void read_boot_clock(struct timespec *ts); +extern int update_persistent_clock(struct timespec now); +extern int no_sync_cmos_clock __attribute__((__section__(".data..read_mostly"))); +void timekeeping_init(void); +extern int timekeeping_suspended; +unsigned long get_seconds(void); +struct timespec current_kernel_time(void); +struct timespec __current_kernel_time(void); +struct timespec get_monotonic_coarse(void); +void get_xtime_and_monotonic_and_sleep_offset(struct timespec *xtim, + struct timespec *wtom, struct timespec *sleep); +void timekeeping_inject_sleeptime(struct timespec *delta); +static inline __attribute__((always_inline)) u32 arch_gettimeoffset(void) { return 0; } +extern void do_gettimeofday(struct timeval *tv); +extern int do_settimeofday(const struct timespec *tv); +extern int do_sys_settimeofday(const struct timespec *tv, + const struct timezone *tz); +extern long do_utimes(int dfd, const char *filename, struct timespec *times, int flags); +struct itimerval; +extern int do_setitimer(int which, struct itimerval *value, + struct itimerval *ovalue); +extern unsigned int alarm_setitimer(unsigned int seconds); +extern int do_getitimer(int which, struct itimerval *value); +extern void getnstimeofday(struct timespec *tv); +extern void getrawmonotonic(struct timespec *ts); +extern void getnstime_raw_and_real(struct timespec *ts_raw, + struct timespec *ts_real); +extern void getboottime(struct timespec *ts); +extern void monotonic_to_bootbased(struct timespec *ts); +extern void get_monotonic_boottime(struct timespec *ts); +extern struct timespec timespec_trunc(struct timespec t, unsigned gran); +extern int timekeeping_valid_for_hres(void); +extern u64 timekeeping_max_deferment(void); +extern void timekeeping_leap_insert(int leapsecond); +extern int timekeeping_inject_offset(struct timespec *ts); +struct tms; +extern void do_sys_times(struct tms *); +struct tm { + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + long tm_year; + int tm_wday; + int tm_yday; +}; +void time_to_tm(time_t totalsecs, int offset, struct tm *result); +static inline __attribute__((always_inline)) s64 timespec_to_ns(const struct timespec *ts) +{ + return ((s64) ts->tv_sec * 1000000000L) + ts->tv_nsec; +} +static inline __attribute__((always_inline)) s64 timeval_to_ns(const struct timeval *tv) +{ + return ((s64) tv->tv_sec * 1000000000L) + + tv->tv_usec * 1000L; +} +extern struct timespec ns_to_timespec(const s64 nsec); +extern struct timeval ns_to_timeval(const s64 nsec); +static inline __attribute__((always_inline)) __attribute__((always_inline)) void timespec_add_ns(struct timespec *a, u64 ns) +{ + a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, 1000000000L, &ns); + a->tv_nsec = ns; +} +struct itimerspec { + struct timespec it_interval; + struct timespec it_value; +}; +struct itimerval { + struct timeval it_interval; + struct timeval it_value; +}; +struct timex { + unsigned int modes; + long offset; + long freq; + long maxerror; + long esterror; + int status; + long constant; + long precision; + long tolerance; + struct timeval time; + long tick; + long ppsfreq; + long jitter; + int shift; + long stabil; + long jitcnt; + long calcnt; + long errcnt; + long stbcnt; + int tai; + int :32; int :32; int :32; int :32; + int :32; int :32; int :32; int :32; + int :32; int :32; int :32; +}; +typedef unsigned long long cycles_t; +extern unsigned int cpu_khz; +extern unsigned int tsc_khz; +extern void disable_TSC(void); +static inline __attribute__((always_inline)) cycles_t get_cycles(void) +{ + unsigned long long ret = 0; + (ret = paravirt_read_tsc()); + return ret; +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) cycles_t vget_cycles(void) +{ + return (cycles_t)__native_read_tsc(); +} +extern void tsc_init(void); +extern void mark_tsc_unstable(char *reason); +extern int unsynchronized_tsc(void); +extern int check_tsc_unstable(void); +extern unsigned long native_calibrate_tsc(void); +extern void check_tsc_sync_source(int cpu); +extern void check_tsc_sync_target(void); +extern int notsc_setup(char *); +extern void save_sched_clock_state(void); +extern void restore_sched_clock_state(void); +extern unsigned long tick_usec; +extern unsigned long tick_nsec; +extern int time_status; +extern void ntp_init(void); +extern void ntp_clear(void); +static inline __attribute__((always_inline)) int ntp_synced(void) +{ + return !(time_status & 0x0040); +} +extern u64 tick_length; +extern void second_overflow(void); +extern void update_ntp_one_tick(void); +extern int do_adjtimex(struct timex *); +extern void hardpps(const struct timespec *, const struct timespec *); +int read_current_timer(unsigned long *timer_val); +extern u64 __attribute__((section(".data"))) jiffies_64; +extern unsigned long volatile __attribute__((section(".data"))) jiffies; +u64 get_jiffies_64(void); +extern unsigned long preset_lpj; +extern unsigned int jiffies_to_msecs(const unsigned long j); +extern unsigned int jiffies_to_usecs(const unsigned long j); +extern unsigned long msecs_to_jiffies(const unsigned int m); +extern unsigned long usecs_to_jiffies(const unsigned int u); +extern unsigned long timespec_to_jiffies(const struct timespec *value); +extern void jiffies_to_timespec(const unsigned long jiffies, + struct timespec *value); +extern unsigned long timeval_to_jiffies(const struct timeval *value); +extern void jiffies_to_timeval(const unsigned long jiffies, + struct timeval *value); +extern clock_t jiffies_to_clock_t(long x); +extern unsigned long clock_t_to_jiffies(unsigned long x); +extern u64 jiffies_64_to_clock_t(u64 x); +extern u64 nsec_to_clock_t(u64 x); +extern u64 nsecs_to_jiffies64(u64 n); +extern unsigned long nsecs_to_jiffies(u64 n); +union ktime { + s64 tv64; +}; +typedef union ktime ktime_t; +static inline __attribute__((always_inline)) ktime_t ktime_set(const long secs, const unsigned long nsecs) +{ + return (ktime_t) { .tv64 = (s64)secs * 1000000000L + (s64)nsecs }; +} +static inline __attribute__((always_inline)) ktime_t timespec_to_ktime(struct timespec ts) +{ + return ktime_set(ts.tv_sec, ts.tv_nsec); +} +static inline __attribute__((always_inline)) ktime_t timeval_to_ktime(struct timeval tv) +{ + return ktime_set(tv.tv_sec, tv.tv_usec * 1000L); +} +static inline __attribute__((always_inline)) int ktime_equal(const ktime_t cmp1, const ktime_t cmp2) +{ + return cmp1.tv64 == cmp2.tv64; +} +static inline __attribute__((always_inline)) s64 ktime_to_us(const ktime_t kt) +{ + struct timeval tv = ns_to_timeval((kt).tv64); + return (s64) tv.tv_sec * 1000000L + tv.tv_usec; +} +static inline __attribute__((always_inline)) s64 ktime_to_ms(const ktime_t kt) +{ + struct timeval tv = ns_to_timeval((kt).tv64); + return (s64) tv.tv_sec * 1000L + tv.tv_usec / 1000L; +} +static inline __attribute__((always_inline)) s64 ktime_us_delta(const ktime_t later, const ktime_t earlier) +{ + return ktime_to_us(({ (ktime_t){ .tv64 = (later).tv64 - (earlier).tv64 }; })); +} +static inline __attribute__((always_inline)) ktime_t ktime_add_us(const ktime_t kt, const u64 usec) +{ + return ({ (ktime_t){ .tv64 = (kt).tv64 + (usec * 1000) }; }); +} +static inline __attribute__((always_inline)) ktime_t ktime_sub_us(const ktime_t kt, const u64 usec) +{ + return ({ (ktime_t){ .tv64 = (kt).tv64 - (usec * 1000) }; }); +} +extern ktime_t ktime_add_safe(const ktime_t lhs, const ktime_t rhs); +extern void ktime_get_ts(struct timespec *ts); +static inline __attribute__((always_inline)) ktime_t ns_to_ktime(u64 ns) +{ + static const ktime_t ktime_zero = { .tv64 = 0 }; + return ({ (ktime_t){ .tv64 = (ktime_zero).tv64 + (ns) }; }); +} +enum debug_obj_state { + ODEBUG_STATE_NONE, + ODEBUG_STATE_INIT, + ODEBUG_STATE_INACTIVE, + ODEBUG_STATE_ACTIVE, + ODEBUG_STATE_DESTROYED, + ODEBUG_STATE_NOTAVAILABLE, + ODEBUG_STATE_MAX, +}; +struct debug_obj_descr; +struct debug_obj { + struct hlist_node node; + enum debug_obj_state state; + unsigned int astate; + void *object; + struct debug_obj_descr *descr; +}; +struct debug_obj_descr { + const char *name; + void *(*debug_hint) (void *addr); + int (*fixup_init) (void *addr, enum debug_obj_state state); + int (*fixup_activate) (void *addr, enum debug_obj_state state); + int (*fixup_destroy) (void *addr, enum debug_obj_state state); + int (*fixup_free) (void *addr, enum debug_obj_state state); +}; +static inline __attribute__((always_inline)) void +debug_object_init (void *addr, struct debug_obj_descr *descr) { } +static inline __attribute__((always_inline)) void +debug_object_init_on_stack(void *addr, struct debug_obj_descr *descr) { } +static inline __attribute__((always_inline)) void +debug_object_activate (void *addr, struct debug_obj_descr *descr) { } +static inline __attribute__((always_inline)) void +debug_object_deactivate(void *addr, struct debug_obj_descr *descr) { } +static inline __attribute__((always_inline)) void +debug_object_destroy (void *addr, struct debug_obj_descr *descr) { } +static inline __attribute__((always_inline)) void +debug_object_free (void *addr, struct debug_obj_descr *descr) { } +static inline __attribute__((always_inline)) void debug_objects_early_init(void) { } +static inline __attribute__((always_inline)) void debug_objects_mem_init(void) { } +static inline __attribute__((always_inline)) void +debug_check_no_obj_freed(const void *address, unsigned long size) { } +struct tvec_base; +struct timer_list { + struct list_head entry; + unsigned long expires; + struct tvec_base *base; + void (*function)(unsigned long); + unsigned long data; + int slack; + int start_pid; + void *start_site; + char start_comm[16]; + struct lockdep_map lockdep_map; +}; +extern struct tvec_base boot_tvec_bases; +void init_timer_key(struct timer_list *timer, + const char *name, + struct lock_class_key *key); +void init_timer_deferrable_key(struct timer_list *timer, + const char *name, + struct lock_class_key *key); +static inline __attribute__((always_inline)) void destroy_timer_on_stack(struct timer_list *timer) { } +static inline __attribute__((always_inline)) void init_timer_on_stack_key(struct timer_list *timer, + const char *name, + struct lock_class_key *key) +{ + init_timer_key(timer, name, key); +} +static inline __attribute__((always_inline)) void setup_timer_key(struct timer_list * timer, + const char *name, + struct lock_class_key *key, + void (*function)(unsigned long), + unsigned long data) +{ + timer->function = function; + timer->data = data; + init_timer_key(timer, name, key); +} +static inline __attribute__((always_inline)) void setup_timer_on_stack_key(struct timer_list *timer, + const char *name, + struct lock_class_key *key, + void (*function)(unsigned long), + unsigned long data) +{ + timer->function = function; + timer->data = data; + init_timer_on_stack_key(timer, name, key); +} +extern void setup_deferrable_timer_on_stack_key(struct timer_list *timer, + const char *name, + struct lock_class_key *key, + void (*function)(unsigned long), + unsigned long data); +static inline __attribute__((always_inline)) int timer_pending(const struct timer_list * timer) +{ + return timer->entry.next != ((void *)0); +} +extern void add_timer_on(struct timer_list *timer, int cpu); +extern int del_timer(struct timer_list * timer); +extern int mod_timer(struct timer_list *timer, unsigned long expires); +extern int mod_timer_pending(struct timer_list *timer, unsigned long expires); +extern int mod_timer_pinned(struct timer_list *timer, unsigned long expires); +extern void set_timer_slack(struct timer_list *time, int slack_hz); +extern unsigned long get_next_timer_interrupt(unsigned long now); +extern int timer_stats_active; +extern void init_timer_stats(void); +extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf, + void *timerf, char *comm, + unsigned int timer_flag); +extern void __timer_stats_timer_set_start_info(struct timer_list *timer, + void *addr); +static inline __attribute__((always_inline)) void timer_stats_timer_set_start_info(struct timer_list *timer) +{ + if (__builtin_constant_p((((__builtin_constant_p(!timer_stats_active) ? !!(!timer_stats_active) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/timer.h", .line = 252, }; ______r = __builtin_expect(!!(!timer_stats_active), 1); ftrace_likely_update(&______f, ______r, 1); ______r; }))))) ? !!(((__builtin_constant_p(!timer_stats_active) ? !!(!timer_stats_active) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/timer.h", .line = 252, }; ______r = __builtin_expect(!!(!timer_stats_active), 1); ftrace_likely_update(&______f, ______r, 1); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/timer.h", .line = 252, }; ______r = !!(((__builtin_constant_p(!timer_stats_active) ? !!(!timer_stats_active) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/timer.h", .line = 252, }; ______r = __builtin_expect(!!(!timer_stats_active), 1); ftrace_likely_update(&______f, ______r, 1); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + return; + __timer_stats_timer_set_start_info(timer, __builtin_return_address(0)); +} +static inline __attribute__((always_inline)) void timer_stats_timer_clear_start_info(struct timer_list *timer) +{ + timer->start_site = ((void *)0); +} +extern void add_timer(struct timer_list *timer); +extern int try_to_del_timer_sync(struct timer_list *timer); + extern int del_timer_sync(struct timer_list *timer); +extern void init_timers(void); +extern void run_local_timers(void); +struct hrtimer; +extern enum hrtimer_restart it_real_fn(struct hrtimer *); +unsigned long __round_jiffies(unsigned long j, int cpu); +unsigned long __round_jiffies_relative(unsigned long j, int cpu); +unsigned long round_jiffies(unsigned long j); +unsigned long round_jiffies_relative(unsigned long j); +unsigned long __round_jiffies_up(unsigned long j, int cpu); +unsigned long __round_jiffies_up_relative(unsigned long j, int cpu); +unsigned long round_jiffies_up(unsigned long j); +unsigned long round_jiffies_up_relative(unsigned long j); +struct workqueue_struct; +struct work_struct; +typedef void (*work_func_t)(struct work_struct *work); +enum { + WORK_STRUCT_PENDING_BIT = 0, + WORK_STRUCT_DELAYED_BIT = 1, + WORK_STRUCT_CWQ_BIT = 2, + WORK_STRUCT_LINKED_BIT = 3, + WORK_STRUCT_COLOR_SHIFT = 4, + WORK_STRUCT_COLOR_BITS = 4, + WORK_STRUCT_PENDING = 1 << WORK_STRUCT_PENDING_BIT, + WORK_STRUCT_DELAYED = 1 << WORK_STRUCT_DELAYED_BIT, + WORK_STRUCT_CWQ = 1 << WORK_STRUCT_CWQ_BIT, + WORK_STRUCT_LINKED = 1 << WORK_STRUCT_LINKED_BIT, + WORK_STRUCT_STATIC = 0, + WORK_NR_COLORS = (1 << WORK_STRUCT_COLOR_BITS) - 1, + WORK_NO_COLOR = WORK_NR_COLORS, + WORK_CPU_UNBOUND = 8, + WORK_CPU_NONE = 8 + 1, + WORK_CPU_LAST = WORK_CPU_NONE, + WORK_STRUCT_FLAG_BITS = WORK_STRUCT_COLOR_SHIFT + + WORK_STRUCT_COLOR_BITS, + WORK_STRUCT_FLAG_MASK = (1UL << WORK_STRUCT_FLAG_BITS) - 1, + WORK_STRUCT_WQ_DATA_MASK = ~WORK_STRUCT_FLAG_MASK, + WORK_STRUCT_NO_CPU = WORK_CPU_NONE << WORK_STRUCT_FLAG_BITS, + WORK_BUSY_PENDING = 1 << 0, + WORK_BUSY_RUNNING = 1 << 1, +}; +struct work_struct { + atomic_long_t data; + struct list_head entry; + work_func_t func; + struct lockdep_map lockdep_map; +}; +struct delayed_work { + struct work_struct work; + struct timer_list timer; +}; +static inline __attribute__((always_inline)) struct delayed_work *to_delayed_work(struct work_struct *work) +{ + return ({ const typeof( ((struct delayed_work *)0)->work ) *__mptr = (work); (struct delayed_work *)( (char *)__mptr - __builtin_offsetof(struct delayed_work,work) );}); +} +struct execute_work { + struct work_struct work; +}; +static inline __attribute__((always_inline)) void __init_work(struct work_struct *work, int onstack) { } +static inline __attribute__((always_inline)) void destroy_work_on_stack(struct work_struct *work) { } +static inline __attribute__((always_inline)) unsigned int work_static(struct work_struct *work) { return 0; } +enum { + WQ_NON_REENTRANT = 1 << 0, + WQ_UNBOUND = 1 << 1, + WQ_FREEZABLE = 1 << 2, + WQ_MEM_RECLAIM = 1 << 3, + WQ_HIGHPRI = 1 << 4, + WQ_CPU_INTENSIVE = 1 << 5, + WQ_DYING = 1 << 6, + WQ_RESCUER = 1 << 7, + WQ_MAX_ACTIVE = 512, + WQ_MAX_UNBOUND_PER_CPU = 4, + WQ_DFL_ACTIVE = WQ_MAX_ACTIVE / 2, +}; +extern struct workqueue_struct *system_wq; +extern struct workqueue_struct *system_long_wq; +extern struct workqueue_struct *system_nrt_wq; +extern struct workqueue_struct *system_unbound_wq; +extern struct workqueue_struct *system_freezable_wq; +extern struct workqueue_struct * +__alloc_workqueue_key(const char *name, unsigned int flags, int max_active, + struct lock_class_key *key, const char *lock_name); +static inline __attribute__((always_inline)) struct workqueue_struct * +alloc_ordered_workqueue(const char *name, unsigned int flags) +{ + return ({ static struct lock_class_key __key; const char *__lock_name; if (__builtin_constant_p(((__builtin_constant_p(name)))) ? !!((__builtin_constant_p(name))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/workqueue.h", .line = 337, }; ______r = !!((__builtin_constant_p(name))); ______f.miss_hit[______r]++; ______r; })) __lock_name = (name); else __lock_name = "name"; __alloc_workqueue_key((name), (WQ_UNBOUND | flags), (1), &__key, __lock_name); }); +} +extern void destroy_workqueue(struct workqueue_struct *wq); +extern int queue_work(struct workqueue_struct *wq, struct work_struct *work); +extern int queue_work_on(int cpu, struct workqueue_struct *wq, + struct work_struct *work); +extern int queue_delayed_work(struct workqueue_struct *wq, + struct delayed_work *work, unsigned long delay); +extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq, + struct delayed_work *work, unsigned long delay); +extern void flush_workqueue(struct workqueue_struct *wq); +extern void flush_scheduled_work(void); +extern int schedule_work(struct work_struct *work); +extern int schedule_work_on(int cpu, struct work_struct *work); +extern int schedule_delayed_work(struct delayed_work *work, unsigned long delay); +extern int schedule_delayed_work_on(int cpu, struct delayed_work *work, + unsigned long delay); +extern int schedule_on_each_cpu(work_func_t func); +extern int keventd_up(void); +int execute_in_process_context(work_func_t fn, struct execute_work *); +extern bool flush_work(struct work_struct *work); +extern bool flush_work_sync(struct work_struct *work); +extern bool cancel_work_sync(struct work_struct *work); +extern bool flush_delayed_work(struct delayed_work *dwork); +extern bool flush_delayed_work_sync(struct delayed_work *work); +extern bool cancel_delayed_work_sync(struct delayed_work *dwork); +extern void workqueue_set_max_active(struct workqueue_struct *wq, + int max_active); +extern bool workqueue_congested(unsigned int cpu, struct workqueue_struct *wq); +extern unsigned int work_cpu(struct work_struct *work); +extern unsigned int work_busy(struct work_struct *work); +static inline __attribute__((always_inline)) bool cancel_delayed_work(struct delayed_work *work) +{ + bool ret; + ret = del_timer_sync(&work->timer); + if (__builtin_constant_p(((ret))) ? !!((ret)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/workqueue.h", .line = 395, }; ______r = !!((ret)); ______f.miss_hit[______r]++; ______r; })) + clear_bit(WORK_STRUCT_PENDING_BIT, ((unsigned long *)(&(&work->work)->data))); + return ret; +} +static inline __attribute__((always_inline)) bool __cancel_delayed_work(struct delayed_work *work) +{ + bool ret; + ret = del_timer(&work->timer); + if (__builtin_constant_p(((ret))) ? !!((ret)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/workqueue.h", .line = 410, }; ______r = !!((ret)); ______f.miss_hit[______r]++; ______r; })) + clear_bit(WORK_STRUCT_PENDING_BIT, ((unsigned long *)(&(&work->work)->data))); + return ret; +} +static inline __attribute__((always_inline)) __attribute__((deprecated)) +void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq, + struct delayed_work *work) +{ + cancel_delayed_work_sync(work); +} +static inline __attribute__((always_inline)) __attribute__((deprecated)) +void cancel_rearming_delayed_work(struct delayed_work *work) +{ + cancel_delayed_work_sync(work); +} +long work_on_cpu(unsigned int cpu, long (*fn)(void *), void *arg); +extern void freeze_workqueues_begin(void); +extern bool freeze_workqueues_busy(void); +extern void thaw_workqueues(void); +typedef struct __wait_queue wait_queue_t; +typedef int (*wait_queue_func_t)(wait_queue_t *wait, unsigned mode, int flags, void *key); +int default_wake_function(wait_queue_t *wait, unsigned mode, int flags, void *key); +struct __wait_queue { + unsigned int flags; + void *private; + wait_queue_func_t func; + struct list_head task_list; +}; +struct wait_bit_key { + void *flags; + int bit_nr; +}; +struct wait_bit_queue { + struct wait_bit_key key; + wait_queue_t wait; +}; +struct __wait_queue_head { + spinlock_t lock; + struct list_head task_list; +}; +typedef struct __wait_queue_head wait_queue_head_t; +struct task_struct; +extern void __init_waitqueue_head(wait_queue_head_t *q, struct lock_class_key *); +static inline __attribute__((always_inline)) void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p) +{ + q->flags = 0; + q->private = p; + q->func = default_wake_function; +} +static inline __attribute__((always_inline)) void init_waitqueue_func_entry(wait_queue_t *q, + wait_queue_func_t func) +{ + q->flags = 0; + q->private = ((void *)0); + q->func = func; +} +static inline __attribute__((always_inline)) int waitqueue_active(wait_queue_head_t *q) +{ + return !list_empty(&q->task_list); +} +extern void add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait); +extern void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t *wait); +extern void remove_wait_queue(wait_queue_head_t *q, wait_queue_t *wait); +static inline __attribute__((always_inline)) void __add_wait_queue(wait_queue_head_t *head, wait_queue_t *new) +{ + list_add(&new->task_list, &head->task_list); +} +static inline __attribute__((always_inline)) void __add_wait_queue_exclusive(wait_queue_head_t *q, + wait_queue_t *wait) +{ + wait->flags |= 0x01; + __add_wait_queue(q, wait); +} +static inline __attribute__((always_inline)) void __add_wait_queue_tail(wait_queue_head_t *head, + wait_queue_t *new) +{ + list_add_tail(&new->task_list, &head->task_list); +} +static inline __attribute__((always_inline)) void __add_wait_queue_tail_exclusive(wait_queue_head_t *q, + wait_queue_t *wait) +{ + wait->flags |= 0x01; + __add_wait_queue_tail(q, wait); +} +static inline __attribute__((always_inline)) void __remove_wait_queue(wait_queue_head_t *head, + wait_queue_t *old) +{ + list_del(&old->task_list); +} +void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key); +void __wake_up_locked_key(wait_queue_head_t *q, unsigned int mode, void *key); +void __wake_up_sync_key(wait_queue_head_t *q, unsigned int mode, int nr, + void *key); +void __wake_up_locked(wait_queue_head_t *q, unsigned int mode); +void __wake_up_sync(wait_queue_head_t *q, unsigned int mode, int nr); +void __wake_up_bit(wait_queue_head_t *, void *, int); +int __wait_on_bit(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned); +int __wait_on_bit_lock(wait_queue_head_t *, struct wait_bit_queue *, int (*)(void *), unsigned); +void wake_up_bit(void *, int); +int out_of_line_wait_on_bit(void *, int, int (*)(void *), unsigned); +int out_of_line_wait_on_bit_lock(void *, int, int (*)(void *), unsigned); +wait_queue_head_t *bit_waitqueue(void *, int); +extern void sleep_on(wait_queue_head_t *q); +extern long sleep_on_timeout(wait_queue_head_t *q, + signed long timeout); +extern void interruptible_sleep_on(wait_queue_head_t *q); +extern long interruptible_sleep_on_timeout(wait_queue_head_t *q, + signed long timeout); +void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state); +void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state); +void finish_wait(wait_queue_head_t *q, wait_queue_t *wait); +void abort_exclusive_wait(wait_queue_head_t *q, wait_queue_t *wait, + unsigned int mode, void *key); +int autoremove_wake_function(wait_queue_t *wait, unsigned mode, int sync, void *key); +int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); +static inline __attribute__((always_inline)) int wait_on_bit(void *word, int bit, + int (*action)(void *), unsigned mode) +{ + if (__builtin_constant_p(((!(__builtin_constant_p((bit)) ? constant_test_bit((bit), (word)) : variable_test_bit((bit), (word)))))) ? !!((!(__builtin_constant_p((bit)) ? constant_test_bit((bit), (word)) : variable_test_bit((bit), (word))))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/wait.h", .line = 637, }; ______r = !!((!(__builtin_constant_p((bit)) ? constant_test_bit((bit), (word)) : variable_test_bit((bit), (word))))); ______f.miss_hit[______r]++; ______r; })) + return 0; + return out_of_line_wait_on_bit(word, bit, action, mode); +} +static inline __attribute__((always_inline)) int wait_on_bit_lock(void *word, int bit, + int (*action)(void *), unsigned mode) +{ + if (__builtin_constant_p(((!test_and_set_bit(bit, word)))) ? !!((!test_and_set_bit(bit, word))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/wait.h", .line = 661, }; ______r = !!((!test_and_set_bit(bit, word))); ______f.miss_hit[______r]++; ______r; })) + return 0; + return out_of_line_wait_on_bit_lock(word, bit, action, mode); +} +struct completion { + unsigned int done; + wait_queue_head_t wait; +}; +static inline __attribute__((always_inline)) void init_completion(struct completion *x) +{ + x->done = 0; + do { static struct lock_class_key __key; __init_waitqueue_head((&x->wait), &__key); } while (0); +} +extern void wait_for_completion(struct completion *); +extern int wait_for_completion_interruptible(struct completion *x); +extern int wait_for_completion_killable(struct completion *x); +extern unsigned long wait_for_completion_timeout(struct completion *x, + unsigned long timeout); +extern long wait_for_completion_interruptible_timeout( + struct completion *x, unsigned long timeout); +extern long wait_for_completion_killable_timeout( + struct completion *x, unsigned long timeout); +extern bool try_wait_for_completion(struct completion *x); +extern bool completion_done(struct completion *x); +extern void complete(struct completion *); +extern void complete_all(struct completion *); +extern void (*pm_idle)(void); +extern void (*pm_power_off)(void); +extern void (*pm_power_off_prepare)(void); +struct device; +extern const char power_group_name[]; +typedef struct pm_message { + int event; +} pm_message_t; +struct dev_pm_ops { + int (*prepare)(struct device *dev); + void (*complete)(struct device *dev); + int (*suspend)(struct device *dev); + int (*resume)(struct device *dev); + int (*freeze)(struct device *dev); + int (*thaw)(struct device *dev); + int (*poweroff)(struct device *dev); + int (*restore)(struct device *dev); + int (*suspend_noirq)(struct device *dev); + int (*resume_noirq)(struct device *dev); + int (*freeze_noirq)(struct device *dev); + int (*thaw_noirq)(struct device *dev); + int (*poweroff_noirq)(struct device *dev); + int (*restore_noirq)(struct device *dev); + int (*runtime_suspend)(struct device *dev); + int (*runtime_resume)(struct device *dev); + int (*runtime_idle)(struct device *dev); +}; +extern struct dev_pm_ops generic_subsys_pm_ops; +enum rpm_status { + RPM_ACTIVE = 0, + RPM_RESUMING, + RPM_SUSPENDED, + RPM_SUSPENDING, +}; +enum rpm_request { + RPM_REQ_NONE = 0, + RPM_REQ_IDLE, + RPM_REQ_SUSPEND, + RPM_REQ_AUTOSUSPEND, + RPM_REQ_RESUME, +}; +struct wakeup_source; +struct dev_pm_info { + pm_message_t power_state; + unsigned int can_wakeup:1; + unsigned int async_suspend:1; + bool is_prepared:1; + bool is_suspended:1; + spinlock_t lock; + struct list_head entry; + struct completion completion; + struct wakeup_source *wakeup; + struct timer_list suspend_timer; + unsigned long timer_expires; + struct work_struct work; + wait_queue_head_t wait_queue; + atomic_t usage_count; + atomic_t child_count; + unsigned int disable_depth:3; + unsigned int ignore_children:1; + unsigned int idle_notification:1; + unsigned int request_pending:1; + unsigned int deferred_resume:1; + unsigned int run_wake:1; + unsigned int runtime_auto:1; + unsigned int no_callbacks:1; + unsigned int irq_safe:1; + unsigned int use_autosuspend:1; + unsigned int timer_autosuspends:1; + enum rpm_request request; + enum rpm_status runtime_status; + int runtime_error; + int autosuspend_delay; + unsigned long last_busy; + unsigned long active_jiffies; + unsigned long suspended_jiffies; + unsigned long accounting_timestamp; + void *subsys_data; +}; +extern void update_pm_runtime_accounting(struct device *dev); +struct dev_power_domain { + struct dev_pm_ops ops; +}; +extern void device_pm_lock(void); +extern void dpm_resume_noirq(pm_message_t state); +extern void dpm_resume_end(pm_message_t state); +extern void dpm_resume(pm_message_t state); +extern void dpm_complete(pm_message_t state); +extern void device_pm_unlock(void); +extern int dpm_suspend_noirq(pm_message_t state); +extern int dpm_suspend_start(pm_message_t state); +extern int dpm_suspend(pm_message_t state); +extern int dpm_prepare(pm_message_t state); +extern void __suspend_report_result(const char *function, void *fn, int ret); +extern int device_pm_wait_for_dev(struct device *sub, struct device *dev); +extern int pm_generic_prepare(struct device *dev); +extern int pm_generic_suspend(struct device *dev); +extern int pm_generic_resume(struct device *dev); +extern int pm_generic_freeze(struct device *dev); +extern int pm_generic_thaw(struct device *dev); +extern int pm_generic_restore(struct device *dev); +extern int pm_generic_poweroff(struct device *dev); +extern void pm_generic_complete(struct device *dev); +enum dpm_order { + DPM_ORDER_NONE, + DPM_ORDER_DEV_AFTER_PARENT, + DPM_ORDER_PARENT_BEFORE_DEV, + DPM_ORDER_DEV_LAST, +}; +typedef struct { unsigned long bits[((((1 << 0)) + (8 * sizeof(long)) - 1) / (8 * sizeof(long)))]; } nodemask_t; +extern nodemask_t _unused_nodemask_arg_; +static inline __attribute__((always_inline)) void __node_set(int node, volatile nodemask_t *dstp) +{ + set_bit(node, dstp->bits); +} +static inline __attribute__((always_inline)) void __node_clear(int node, volatile nodemask_t *dstp) +{ + clear_bit(node, dstp->bits); +} +static inline __attribute__((always_inline)) void __nodes_setall(nodemask_t *dstp, int nbits) +{ + bitmap_fill(dstp->bits, nbits); +} +static inline __attribute__((always_inline)) void __nodes_clear(nodemask_t *dstp, int nbits) +{ + bitmap_zero(dstp->bits, nbits); +} +static inline __attribute__((always_inline)) int __node_test_and_set(int node, nodemask_t *addr) +{ + return test_and_set_bit(node, addr->bits); +} +static inline __attribute__((always_inline)) void __nodes_and(nodemask_t *dstp, const nodemask_t *src1p, + const nodemask_t *src2p, int nbits) +{ + bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits); +} +static inline __attribute__((always_inline)) void __nodes_or(nodemask_t *dstp, const nodemask_t *src1p, + const nodemask_t *src2p, int nbits) +{ + bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits); +} +static inline __attribute__((always_inline)) void __nodes_xor(nodemask_t *dstp, const nodemask_t *src1p, + const nodemask_t *src2p, int nbits) +{ + bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits); +} +static inline __attribute__((always_inline)) void __nodes_andnot(nodemask_t *dstp, const nodemask_t *src1p, + const nodemask_t *src2p, int nbits) +{ + bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits); +} +static inline __attribute__((always_inline)) void __nodes_complement(nodemask_t *dstp, + const nodemask_t *srcp, int nbits) +{ + bitmap_complement(dstp->bits, srcp->bits, nbits); +} +static inline __attribute__((always_inline)) int __nodes_equal(const nodemask_t *src1p, + const nodemask_t *src2p, int nbits) +{ + return bitmap_equal(src1p->bits, src2p->bits, nbits); +} +static inline __attribute__((always_inline)) int __nodes_intersects(const nodemask_t *src1p, + const nodemask_t *src2p, int nbits) +{ + return bitmap_intersects(src1p->bits, src2p->bits, nbits); +} +static inline __attribute__((always_inline)) int __nodes_subset(const nodemask_t *src1p, + const nodemask_t *src2p, int nbits) +{ + return bitmap_subset(src1p->bits, src2p->bits, nbits); +} +static inline __attribute__((always_inline)) int __nodes_empty(const nodemask_t *srcp, int nbits) +{ + return bitmap_empty(srcp->bits, nbits); +} +static inline __attribute__((always_inline)) int __nodes_full(const nodemask_t *srcp, int nbits) +{ + return bitmap_full(srcp->bits, nbits); +} +static inline __attribute__((always_inline)) int __nodes_weight(const nodemask_t *srcp, int nbits) +{ + return bitmap_weight(srcp->bits, nbits); +} +static inline __attribute__((always_inline)) void __nodes_shift_right(nodemask_t *dstp, + const nodemask_t *srcp, int n, int nbits) +{ + bitmap_shift_right(dstp->bits, srcp->bits, n, nbits); +} +static inline __attribute__((always_inline)) void __nodes_shift_left(nodemask_t *dstp, + const nodemask_t *srcp, int n, int nbits) +{ + bitmap_shift_left(dstp->bits, srcp->bits, n, nbits); +} +static inline __attribute__((always_inline)) int __first_node(const nodemask_t *srcp) +{ + return ({ int __min1 = ((1 << 0)); int __min2 = (find_first_bit(srcp->bits, (1 << 0))); __min1 < __min2 ? __min1: __min2; }); +} +static inline __attribute__((always_inline)) int __next_node(int n, const nodemask_t *srcp) +{ + return ({ int __min1 = ((1 << 0)); int __min2 = (find_next_bit(srcp->bits, (1 << 0), n+1)); __min1 < __min2 ? __min1: __min2; }); +} +static inline __attribute__((always_inline)) void init_nodemask_of_node(nodemask_t *mask, int node) +{ + __nodes_clear(&(*mask), (1 << 0)); + __node_set((node), &(*mask)); +} +static inline __attribute__((always_inline)) int __first_unset_node(const nodemask_t *maskp) +{ + return ({ int __min1 = ((1 << 0)); int __min2 = (find_first_zero_bit(maskp->bits, (1 << 0))); __min1 < __min2 ? __min1: __min2; }) + ; +} +static inline __attribute__((always_inline)) int __nodemask_scnprintf(char *buf, int len, + const nodemask_t *srcp, int nbits) +{ + return bitmap_scnprintf(buf, len, srcp->bits, nbits); +} +static inline __attribute__((always_inline)) int __nodemask_parse_user(const char *buf, int len, + nodemask_t *dstp, int nbits) +{ + return bitmap_parse_user(buf, len, dstp->bits, nbits); +} +static inline __attribute__((always_inline)) int __nodelist_scnprintf(char *buf, int len, + const nodemask_t *srcp, int nbits) +{ + return bitmap_scnlistprintf(buf, len, srcp->bits, nbits); +} +static inline __attribute__((always_inline)) int __nodelist_parse(const char *buf, nodemask_t *dstp, int nbits) +{ + return bitmap_parselist(buf, dstp->bits, nbits); +} +static inline __attribute__((always_inline)) int __node_remap(int oldbit, + const nodemask_t *oldp, const nodemask_t *newp, int nbits) +{ + return bitmap_bitremap(oldbit, oldp->bits, newp->bits, nbits); +} +static inline __attribute__((always_inline)) void __nodes_remap(nodemask_t *dstp, const nodemask_t *srcp, + const nodemask_t *oldp, const nodemask_t *newp, int nbits) +{ + bitmap_remap(dstp->bits, srcp->bits, oldp->bits, newp->bits, nbits); +} +static inline __attribute__((always_inline)) void __nodes_onto(nodemask_t *dstp, const nodemask_t *origp, + const nodemask_t *relmapp, int nbits) +{ + bitmap_onto(dstp->bits, origp->bits, relmapp->bits, nbits); +} +static inline __attribute__((always_inline)) void __nodes_fold(nodemask_t *dstp, const nodemask_t *origp, + int sz, int nbits) +{ + bitmap_fold(dstp->bits, origp->bits, sz, nbits); +} +enum node_states { + N_POSSIBLE, + N_ONLINE, + N_NORMAL_MEMORY, + N_HIGH_MEMORY, + N_CPU, + NR_NODE_STATES +}; +extern nodemask_t node_states[NR_NODE_STATES]; +static inline __attribute__((always_inline)) int node_state(int node, enum node_states state) +{ + return node == 0; +} +static inline __attribute__((always_inline)) void node_set_state(int node, enum node_states state) +{ +} +static inline __attribute__((always_inline)) void node_clear_state(int node, enum node_states state) +{ +} +static inline __attribute__((always_inline)) int num_node_state(enum node_states state) +{ + return 1; +} +struct nodemask_scratch { + nodemask_t mask1; + nodemask_t mask2; +}; +static inline __attribute__((always_inline)) int numa_node_id(void) +{ + return 0; +} +static inline __attribute__((always_inline)) int early_cpu_to_node(int cpu) +{ + return 0; +} +static inline __attribute__((always_inline)) void setup_node_to_cpumask_map(void) { } +extern const struct cpumask *cpu_coregroup_mask(int cpu); +static inline __attribute__((always_inline)) void arch_fix_phys_package_id(int num, u32 slot) +{ +} +struct pci_bus; +void x86_pci_root_bus_res_quirks(struct pci_bus *b); +static inline __attribute__((always_inline)) int get_mp_bus_to_node(int busnum) +{ + return 0; +} +static inline __attribute__((always_inline)) void set_mp_bus_to_node(int busnum, int node) +{ +} +static inline __attribute__((always_inline)) void set_apicid_to_node(int apicid, s16 node) +{ +} +static inline __attribute__((always_inline)) int numa_cpu_node(int cpu) +{ + return (-1); +} +extern void set_highmem_pages_init(void); +static inline __attribute__((always_inline)) void numa_set_node(int cpu, int node) { } +static inline __attribute__((always_inline)) void numa_clear_node(int cpu) { } +static inline __attribute__((always_inline)) void init_cpu_to_node(void) { } +static inline __attribute__((always_inline)) void numa_add_cpu(int cpu) { } +static inline __attribute__((always_inline)) void numa_remove_cpu(int cpu) { } +struct mutex { + atomic_t count; + spinlock_t wait_lock; + struct list_head wait_list; + struct task_struct *owner; + const char *name; + void *magic; + struct lockdep_map dep_map; +}; +struct mutex_waiter { + struct list_head list; + struct task_struct *task; + void *magic; +}; +extern void mutex_destroy(struct mutex *lock); +extern void __mutex_init(struct mutex *lock, const char *name, + struct lock_class_key *key); +static inline __attribute__((always_inline)) int mutex_is_locked(struct mutex *lock) +{ + return atomic_read(&lock->count) != 1; +} +extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass); +extern void _mutex_lock_nest_lock(struct mutex *lock, struct lockdep_map *nest_lock); +extern int __attribute__((warn_unused_result)) mutex_lock_interruptible_nested(struct mutex *lock, + unsigned int subclass); +extern int __attribute__((warn_unused_result)) mutex_lock_killable_nested(struct mutex *lock, + unsigned int subclass); +extern int mutex_trylock(struct mutex *lock); +extern void mutex_unlock(struct mutex *lock); +extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); +typedef struct { + void *ldt; + int size; + struct mutex lock; + void *vdso; +} mm_context_t; +void leave_mm(int cpu); +enum xen_domain_type { + XEN_NATIVE, + XEN_PV_DOMAIN, + XEN_HVM_DOMAIN, +}; +static inline __attribute__((always_inline)) unsigned char readb(const volatile void *addr) { unsigned char ret; asm volatile("mov" "b" " %1,%0":"=q" (ret) :"m" (*(volatile unsigned char *)addr) :"memory"); return ret; } +static inline __attribute__((always_inline)) unsigned short readw(const volatile void *addr) { unsigned short ret; asm volatile("mov" "w" " %1,%0":"=r" (ret) :"m" (*(volatile unsigned short *)addr) :"memory"); return ret; } +static inline __attribute__((always_inline)) unsigned int readl(const volatile void *addr) { unsigned int ret; asm volatile("mov" "l" " %1,%0":"=r" (ret) :"m" (*(volatile unsigned int *)addr) :"memory"); return ret; } +static inline __attribute__((always_inline)) unsigned char __readb(const volatile void *addr) { unsigned char ret; asm volatile("mov" "b" " %1,%0":"=q" (ret) :"m" (*(volatile unsigned char *)addr) ); return ret; } +static inline __attribute__((always_inline)) unsigned short __readw(const volatile void *addr) { unsigned short ret; asm volatile("mov" "w" " %1,%0":"=r" (ret) :"m" (*(volatile unsigned short *)addr) ); return ret; } +static inline __attribute__((always_inline)) unsigned int __readl(const volatile void *addr) { unsigned int ret; asm volatile("mov" "l" " %1,%0":"=r" (ret) :"m" (*(volatile unsigned int *)addr) ); return ret; } +static inline __attribute__((always_inline)) void writeb(unsigned char val, volatile void *addr) { asm volatile("mov" "b" " %0,%1": :"q" (val), "m" (*(volatile unsigned char *)addr) :"memory"); } +static inline __attribute__((always_inline)) void writew(unsigned short val, volatile void *addr) { asm volatile("mov" "w" " %0,%1": :"r" (val), "m" (*(volatile unsigned short *)addr) :"memory"); } +static inline __attribute__((always_inline)) void writel(unsigned int val, volatile void *addr) { asm volatile("mov" "l" " %0,%1": :"r" (val), "m" (*(volatile unsigned int *)addr) :"memory"); } +static inline __attribute__((always_inline)) void __writeb(unsigned char val, volatile void *addr) { asm volatile("mov" "b" " %0,%1": :"q" (val), "m" (*(volatile unsigned char *)addr) ); } +static inline __attribute__((always_inline)) void __writew(unsigned short val, volatile void *addr) { asm volatile("mov" "w" " %0,%1": :"r" (val), "m" (*(volatile unsigned short *)addr) ); } +static inline __attribute__((always_inline)) void __writel(unsigned int val, volatile void *addr) { asm volatile("mov" "l" " %0,%1": :"r" (val), "m" (*(volatile unsigned int *)addr) ); } +static inline __attribute__((always_inline)) phys_addr_t virt_to_phys(volatile void *address) +{ + return (((unsigned long)(address)) - ((unsigned long)(0xC0000000UL))); +} +static inline __attribute__((always_inline)) void *phys_to_virt(phys_addr_t address) +{ + return ((void *)((unsigned long)(address)+((unsigned long)(0xC0000000UL)))); +} +static inline __attribute__((always_inline)) unsigned int isa_virt_to_bus(volatile void *address) +{ + return (unsigned int)virt_to_phys(address); +} +extern void *ioremap_nocache(resource_size_t offset, unsigned long size); +extern void *ioremap_cache(resource_size_t offset, unsigned long size); +extern void *ioremap_prot(resource_size_t offset, unsigned long size, + unsigned long prot_val); +static inline __attribute__((always_inline)) void *ioremap(resource_size_t offset, unsigned long size) +{ + return ioremap_nocache(offset, size); +} +extern void iounmap(volatile void *addr); +extern void set_iounmap_nonlazy(void); +extern unsigned int ioread8(void *); +extern unsigned int ioread16(void *); +extern unsigned int ioread16be(void *); +extern unsigned int ioread32(void *); +extern unsigned int ioread32be(void *); +extern void iowrite8(u8, void *); +extern void iowrite16(u16, void *); +extern void iowrite16be(u16, void *); +extern void iowrite32(u32, void *); +extern void iowrite32be(u32, void *); +extern void ioread8_rep(void *port, void *buf, unsigned long count); +extern void ioread16_rep(void *port, void *buf, unsigned long count); +extern void ioread32_rep(void *port, void *buf, unsigned long count); +extern void iowrite8_rep(void *port, const void *buf, unsigned long count); +extern void iowrite16_rep(void *port, const void *buf, unsigned long count); +extern void iowrite32_rep(void *port, const void *buf, unsigned long count); +extern void *ioport_map(unsigned long port, unsigned int nr); +extern void ioport_unmap(void *); +struct pci_dev; +extern void *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); +extern void pci_iounmap(struct pci_dev *dev, void *); +struct vm_area_struct; +struct vm_struct { + struct vm_struct *next; + void *addr; + unsigned long size; + unsigned long flags; + struct page **pages; + unsigned int nr_pages; + phys_addr_t phys_addr; + void *caller; +}; +extern void vm_unmap_ram(const void *mem, unsigned int count); +extern void *vm_map_ram(struct page **pages, unsigned int count, + int node, pgprot_t prot); +extern void vm_unmap_aliases(void); +extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) vmalloc_init(void); +extern void *vmalloc(unsigned long size); +extern void *vzalloc(unsigned long size); +extern void *vmalloc_user(unsigned long size); +extern void *vmalloc_node(unsigned long size, int node); +extern void *vzalloc_node(unsigned long size, int node); +extern void *vmalloc_exec(unsigned long size); +extern void *vmalloc_32(unsigned long size); +extern void *vmalloc_32_user(unsigned long size); +extern void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot); +extern void *__vmalloc_node_range(unsigned long size, unsigned long align, + unsigned long start, unsigned long end, gfp_t gfp_mask, + pgprot_t prot, int node, void *caller); +extern void vfree(const void *addr); +extern void *vmap(struct page **pages, unsigned int count, + unsigned long flags, pgprot_t prot); +extern void vunmap(const void *addr); +extern int remap_vmalloc_range(struct vm_area_struct *vma, void *addr, + unsigned long pgoff); +void vmalloc_sync_all(void); +static inline __attribute__((always_inline)) size_t get_vm_area_size(const struct vm_struct *area) +{ + return area->size - ((1UL) << 12); +} +extern struct vm_struct *get_vm_area(unsigned long size, unsigned long flags); +extern struct vm_struct *get_vm_area_caller(unsigned long size, + unsigned long flags, void *caller); +extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, + unsigned long start, unsigned long end); +extern struct vm_struct *__get_vm_area_caller(unsigned long size, + unsigned long flags, + unsigned long start, unsigned long end, + void *caller); +extern struct vm_struct *remove_vm_area(const void *addr); +extern int map_vm_area(struct vm_struct *area, pgprot_t prot, + struct page ***pages); +extern int map_kernel_range_noflush(unsigned long start, unsigned long size, + pgprot_t prot, struct page **pages); +extern void unmap_kernel_range_noflush(unsigned long addr, unsigned long size); +extern void unmap_kernel_range(unsigned long addr, unsigned long size); +extern struct vm_struct *alloc_vm_area(size_t size); +extern void free_vm_area(struct vm_struct *area); +extern long vread(char *buf, char *addr, unsigned long count); +extern long vwrite(char *buf, char *addr, unsigned long count); +extern rwlock_t vmlist_lock; +extern struct vm_struct *vmlist; +extern __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) void vm_area_register_early(struct vm_struct *vm, size_t align); +struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets, + const size_t *sizes, int nr_vms, + size_t align); +void pcpu_free_vm_areas(struct vm_struct **vms, int nr_vms); +static inline __attribute__((always_inline)) void +memset_io(volatile void *addr, unsigned char val, size_t count) +{ + __builtin_memset((void *)addr, val, count); +} +static inline __attribute__((always_inline)) void +memcpy_fromio(void *dst, const volatile void *src, size_t count) +{ + __builtin_memcpy(dst, (const void *)src, count); +} +static inline __attribute__((always_inline)) void +memcpy_toio(volatile void *dst, const void *src, size_t count) +{ + __builtin_memcpy((void *)dst, src, count); +} +static inline __attribute__((always_inline)) void flush_write_buffers(void) +{ +} +extern void native_io_delay(void); +extern int io_delay_type; +extern void io_delay_init(void); +static inline __attribute__((always_inline)) void outb(unsigned char value, int port) { asm volatile("out" "b" " %" "b" "0, %w1" : : "a"(value), "Nd"(port)); } static inline __attribute__((always_inline)) unsigned char inb(int port) { unsigned char value; asm volatile("in" "b" " %w1, %" "b" "0" : "=a"(value) : "Nd"(port)); return value; } static inline __attribute__((always_inline)) void outb_p(unsigned char value, int port) { outb(value, port); slow_down_io(); } static inline __attribute__((always_inline)) unsigned char inb_p(int port) { unsigned char value = inb(port); slow_down_io(); return value; } static inline __attribute__((always_inline)) void outsb(int port, const void *addr, unsigned long count) { asm volatile("rep; outs" "b" : "+S"(addr), "+c"(count) : "d"(port)); } static inline __attribute__((always_inline)) void insb(int port, void *addr, unsigned long count) { asm volatile("rep; ins" "b" : "+D"(addr), "+c"(count) : "d"(port)); } +static inline __attribute__((always_inline)) void outw(unsigned short value, int port) { asm volatile("out" "w" " %" "w" "0, %w1" : : "a"(value), "Nd"(port)); } static inline __attribute__((always_inline)) unsigned short inw(int port) { unsigned short value; asm volatile("in" "w" " %w1, %" "w" "0" : "=a"(value) : "Nd"(port)); return value; } static inline __attribute__((always_inline)) void outw_p(unsigned short value, int port) { outw(value, port); slow_down_io(); } static inline __attribute__((always_inline)) unsigned short inw_p(int port) { unsigned short value = inw(port); slow_down_io(); return value; } static inline __attribute__((always_inline)) void outsw(int port, const void *addr, unsigned long count) { asm volatile("rep; outs" "w" : "+S"(addr), "+c"(count) : "d"(port)); } static inline __attribute__((always_inline)) void insw(int port, void *addr, unsigned long count) { asm volatile("rep; ins" "w" : "+D"(addr), "+c"(count) : "d"(port)); } +static inline __attribute__((always_inline)) void outl(unsigned int value, int port) { asm volatile("out" "l" " %" "" "0, %w1" : : "a"(value), "Nd"(port)); } static inline __attribute__((always_inline)) unsigned int inl(int port) { unsigned int value; asm volatile("in" "l" " %w1, %" "" "0" : "=a"(value) : "Nd"(port)); return value; } static inline __attribute__((always_inline)) void outl_p(unsigned int value, int port) { outl(value, port); slow_down_io(); } static inline __attribute__((always_inline)) unsigned int inl_p(int port) { unsigned int value = inl(port); slow_down_io(); return value; } static inline __attribute__((always_inline)) void outsl(int port, const void *addr, unsigned long count) { asm volatile("rep; outs" "l" : "+S"(addr), "+c"(count) : "d"(port)); } static inline __attribute__((always_inline)) void insl(int port, void *addr, unsigned long count) { asm volatile("rep; ins" "l" : "+D"(addr), "+c"(count) : "d"(port)); } +extern void *xlate_dev_mem_ptr(unsigned long phys); +extern void unxlate_dev_mem_ptr(unsigned long phys, void *addr); +extern int ioremap_change_attr(unsigned long vaddr, unsigned long size, + unsigned long prot_val); +extern void *ioremap_wc(resource_size_t offset, unsigned long size); +extern void early_ioremap_init(void); +extern void early_ioremap_reset(void); +extern void *early_ioremap(resource_size_t phys_addr, + unsigned long size); +extern void *early_memremap(resource_size_t phys_addr, + unsigned long size); +extern void early_iounmap(void *addr, unsigned long size); +extern void fixup_early_ioremap(void); +extern bool is_early_ioremap_ptep(pte_t *ptep); +extern const unsigned char x86_trampoline_start []; +extern const unsigned char x86_trampoline_end []; +extern unsigned char *x86_trampoline_base; +extern unsigned long init_rsp; +extern unsigned long initial_code; +extern unsigned long initial_gs; +extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) setup_trampolines(void); +extern const unsigned char trampoline_data[]; +extern const unsigned char trampoline_status[]; +static inline __attribute__((always_inline)) unsigned long trampoline_address(void) +{ + return virt_to_phys(((void *)(x86_trampoline_base + ((const unsigned char *)(trampoline_data) - x86_trampoline_start)))); +} +int __acpi_acquire_global_lock(unsigned int *lock); +int __acpi_release_global_lock(unsigned int *lock); +extern int acpi_lapic; +extern int acpi_ioapic; +extern int acpi_noirq; +extern int acpi_strict; +extern int acpi_disabled; +extern int acpi_pci_disabled; +extern int acpi_skip_timer_override; +extern int acpi_use_timer_override; +extern int acpi_fix_pin2_polarity; +extern u8 acpi_sci_flags; +extern int acpi_sci_override_gsi; +void acpi_pic_sci_set_trigger(unsigned int, u16); +extern int (*__acpi_register_gsi)(struct device *dev, u32 gsi, + int trigger, int polarity); +static inline __attribute__((always_inline)) void disable_acpi(void) +{ + acpi_disabled = 1; + acpi_pci_disabled = 1; + acpi_noirq = 1; +} +extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq); +static inline __attribute__((always_inline)) void acpi_noirq_set(void) { acpi_noirq = 1; } +static inline __attribute__((always_inline)) void acpi_disable_pci(void) +{ + acpi_pci_disabled = 1; + acpi_noirq_set(); +} +extern int acpi_suspend_lowlevel(void); +extern const unsigned char acpi_wakeup_code[]; +extern void acpi_reserve_wakeup_memory(void); +static inline __attribute__((always_inline)) unsigned int acpi_processor_cstate_check(unsigned int max_cstate) +{ + if (__builtin_constant_p(((boot_cpu_data.x86 == 0x0F && boot_cpu_data.x86_vendor == 2 && boot_cpu_data.x86_model <= 0x05 && boot_cpu_data.x86_mask < 0x0A))) ? !!((boot_cpu_data.x86 == 0x0F && boot_cpu_data.x86_vendor == 2 && boot_cpu_data.x86_model <= 0x05 && boot_cpu_data.x86_mask < 0x0A)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "/data/exp/linux-3.0.4/arch/x86/include/asm/acpi.h" + , .line = + 140 + , }; ______r = !!((boot_cpu_data.x86 == 0x0F && boot_cpu_data.x86_vendor == 2 && boot_cpu_data.x86_model <= 0x05 && boot_cpu_data.x86_mask < 0x0A)); ______f.miss_hit[______r]++; ______r; })) + return 1; + else if (__builtin_constant_p(((amd_e400_c1e_detected))) ? !!((amd_e400_c1e_detected)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/acpi.h", .line = 142, }; ______r = !!((amd_e400_c1e_detected)); ______f.miss_hit[______r]++; ______r; })) + return 1; + else + return max_cstate; +} +static inline __attribute__((always_inline)) bool arch_has_acpi_pdc(void) +{ + struct cpuinfo_x86 *c = &(*({ do { const void *__vpp_verify = (typeof((&(cpu_info))))((void *)0); (void)__vpp_verify; } while (0); ({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"((typeof(*(&(cpu_info))) *)(&(cpu_info)))); (typeof((typeof(*(&(cpu_info))) *)(&(cpu_info)))) (__ptr + (((__per_cpu_offset[0])))); }); })); + return (c->x86_vendor == 0 || + c->x86_vendor == 5); +} +static inline __attribute__((always_inline)) void arch_acpi_set_pdc_bits(u32 *buf) +{ + struct cpuinfo_x86 *c = &(*({ do { const void *__vpp_verify = (typeof((&(cpu_info))))((void *)0); (void)__vpp_verify; } while (0); ({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"((typeof(*(&(cpu_info))) *)(&(cpu_info)))); (typeof((typeof(*(&(cpu_info))) *)(&(cpu_info)))) (__ptr + (((__per_cpu_offset[0])))); }); })); + buf[2] |= ((0x0010) | (0x0008) | (0x0002) | (0x0100) | (0x0200)); + if (__builtin_constant_p((((__builtin_constant_p((4*32+ 7)) && ( ((((4*32+ 7))>>5)==0 && (1UL<<(((4*32+ 7))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((4*32+ 7))>>5)==1 && (1UL<<(((4*32+ 7))&31) & (0|0))) || ((((4*32+ 7))>>5)==2 && (1UL<<(((4*32+ 7))&31) & 0)) || ((((4*32+ 7))>>5)==3 && (1UL<<(((4*32+ 7))&31) & (0))) || ((((4*32+ 7))>>5)==4 && (1UL<<(((4*32+ 7))&31) & 0)) || ((((4*32+ 7))>>5)==5 && (1UL<<(((4*32+ 7))&31) & 0)) || ((((4*32+ 7))>>5)==6 && (1UL<<(((4*32+ 7))&31) & 0)) || ((((4*32+ 7))>>5)==7 && (1UL<<(((4*32+ 7))&31) & 0)) || ((((4*32+ 7))>>5)==8 && (1UL<<(((4*32+ 7))&31) & 0)) || ((((4*32+ 7))>>5)==9 && (1UL<<(((4*32+ 7))&31) & 0)) ) ? 1 : (__builtin_constant_p(((4*32+ 7))) ? constant_test_bit(((4*32+ 7)), ((unsigned long *)((c)->x86_capability))) : variable_test_bit(((4*32+ 7)), ((unsigned long *)((c)->x86_capability)))))))) ? !!(((__builtin_constant_p((4*32+ 7)) && ( ((((4*32+ 7))>>5)==0 && (1UL<<(((4*32+ 7))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((4*32+ 7))>>5)==1 && (1UL<<(((4*32+ 7))&31) & (0|0))) || ((((4*32+ 7))>>5)==2 && (1UL<<(((4*32+ 7))&31) & 0)) || ((((4*32+ 7))>>5)==3 && (1UL<<(((4*32+ 7))&31) & (0))) || ((((4*32+ 7))>>5)==4 && (1UL<<(((4*32+ 7))&31) & 0)) || ((((4*32+ 7))>>5)==5 && (1UL<<(((4*32+ 7))&31) & 0)) || ((((4*32+ 7))>>5)==6 && (1UL<<(((4*32+ 7))&31) & 0)) || ((((4*32+ 7))>>5)==7 && (1UL<<(((4*32+ 7))&31) & 0)) || ((((4*32+ 7))>>5)==8 && (1UL<<(((4*32+ 7))&31) & 0)) || ((((4*32+ 7))>>5)==9 && (1UL<<(((4*32+ 7))&31) & 0)) ) ? 1 : (__builtin_constant_p(((4*32+ 7))) ? constant_test_bit(((4*32+ 7)), ((unsigned long *)((c)->x86_capability))) : variable_test_bit(((4*32+ 7)), ((unsigned long *)((c)->x86_capability))))))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/acpi.h", .line = 161, }; ______r = !!(((__builtin_constant_p((4*32+ 7)) && ( ((((4*32+ 7))>>5)==0 && (1UL<<(((4*32+ 7))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((4*32+ 7))>>5)==1 && (1UL<<(((4*32+ 7))&31) & (0|0))) || ((((4*32+ 7))>>5)==2 && (1UL<<(((4*32+ 7))&31) & 0)) || ((((4*32+ 7))>>5)==3 && (1UL<<(((4*32+ 7))&31) & (0))) || ((((4*32+ 7))>>5)==4 && (1UL<<(((4*32+ 7))&31) & 0)) || ((((4*32+ 7))>>5)==5 && (1UL<<(((4*32+ 7))&31) & 0)) || ((((4*32+ 7))>>5)==6 && (1UL<<(((4*32+ 7))&31) & 0)) || ((((4*32+ 7))>>5)==7 && (1UL<<(((4*32+ 7))&31) & 0)) || ((((4*32+ 7))>>5)==8 && (1UL<<(((4*32+ 7))&31) & 0)) || ((((4*32+ 7))>>5)==9 && (1UL<<(((4*32+ 7))&31) & 0)) ) ? 1 : (__builtin_constant_p(((4*32+ 7))) ? constant_test_bit(((4*32+ 7)), ((unsigned long *)((c)->x86_capability))) : variable_test_bit(((4*32+ 7)), ((unsigned long *)((c)->x86_capability))))))); ______f.miss_hit[______r]++; ______r; })) + buf[2] |= ((0x0008) | (0x0002) | (0x0020) | (0x0800) | (0x0001)); + if (__builtin_constant_p((((__builtin_constant_p((0*32+22)) && ( ((((0*32+22))>>5)==0 && (1UL<<(((0*32+22))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((0*32+22))>>5)==1 && (1UL<<(((0*32+22))&31) & (0|0))) || ((((0*32+22))>>5)==2 && (1UL<<(((0*32+22))&31) & 0)) || ((((0*32+22))>>5)==3 && (1UL<<(((0*32+22))&31) & (0))) || ((((0*32+22))>>5)==4 && (1UL<<(((0*32+22))&31) & 0)) || ((((0*32+22))>>5)==5 && (1UL<<(((0*32+22))&31) & 0)) || ((((0*32+22))>>5)==6 && (1UL<<(((0*32+22))&31) & 0)) || ((((0*32+22))>>5)==7 && (1UL<<(((0*32+22))&31) & 0)) || ((((0*32+22))>>5)==8 && (1UL<<(((0*32+22))&31) & 0)) || ((((0*32+22))>>5)==9 && (1UL<<(((0*32+22))&31) & 0)) ) ? 1 : (__builtin_constant_p(((0*32+22))) ? constant_test_bit(((0*32+22)), ((unsigned long *)((c)->x86_capability))) : variable_test_bit(((0*32+22)), ((unsigned long *)((c)->x86_capability)))))))) ? !!(((__builtin_constant_p((0*32+22)) && ( ((((0*32+22))>>5)==0 && (1UL<<(((0*32+22))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((0*32+22))>>5)==1 && (1UL<<(((0*32+22))&31) & (0|0))) || ((((0*32+22))>>5)==2 && (1UL<<(((0*32+22))&31) & 0)) || ((((0*32+22))>>5)==3 && (1UL<<(((0*32+22))&31) & (0))) || ((((0*32+22))>>5)==4 && (1UL<<(((0*32+22))&31) & 0)) || ((((0*32+22))>>5)==5 && (1UL<<(((0*32+22))&31) & 0)) || ((((0*32+22))>>5)==6 && (1UL<<(((0*32+22))&31) & 0)) || ((((0*32+22))>>5)==7 && (1UL<<(((0*32+22))&31) & 0)) || ((((0*32+22))>>5)==8 && (1UL<<(((0*32+22))&31) & 0)) || ((((0*32+22))>>5)==9 && (1UL<<(((0*32+22))&31) & 0)) ) ? 1 : (__builtin_constant_p(((0*32+22))) ? constant_test_bit(((0*32+22)), ((unsigned long *)((c)->x86_capability))) : variable_test_bit(((0*32+22)), ((unsigned long *)((c)->x86_capability))))))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/acpi.h", .line = 164, }; ______r = !!(((__builtin_constant_p((0*32+22)) && ( ((((0*32+22))>>5)==0 && (1UL<<(((0*32+22))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((0*32+22))>>5)==1 && (1UL<<(((0*32+22))&31) & (0|0))) || ((((0*32+22))>>5)==2 && (1UL<<(((0*32+22))&31) & 0)) || ((((0*32+22))>>5)==3 && (1UL<<(((0*32+22))&31) & (0))) || ((((0*32+22))>>5)==4 && (1UL<<(((0*32+22))&31) & 0)) || ((((0*32+22))>>5)==5 && (1UL<<(((0*32+22))&31) & 0)) || ((((0*32+22))>>5)==6 && (1UL<<(((0*32+22))&31) & 0)) || ((((0*32+22))>>5)==7 && (1UL<<(((0*32+22))&31) & 0)) || ((((0*32+22))>>5)==8 && (1UL<<(((0*32+22))&31) & 0)) || ((((0*32+22))>>5)==9 && (1UL<<(((0*32+22))&31) & 0)) ) ? 1 : (__builtin_constant_p(((0*32+22))) ? constant_test_bit(((0*32+22)), ((unsigned long *)((c)->x86_capability))) : variable_test_bit(((0*32+22)), ((unsigned long *)((c)->x86_capability))))))); ______f.miss_hit[______r]++; ______r; })) + buf[2] |= (0x0004); + if (__builtin_constant_p(((!(__builtin_constant_p((4*32+ 3)) && ( ((((4*32+ 3))>>5)==0 && (1UL<<(((4*32+ 3))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((4*32+ 3))>>5)==1 && (1UL<<(((4*32+ 3))&31) & (0|0))) || ((((4*32+ 3))>>5)==2 && (1UL<<(((4*32+ 3))&31) & 0)) || ((((4*32+ 3))>>5)==3 && (1UL<<(((4*32+ 3))&31) & (0))) || ((((4*32+ 3))>>5)==4 && (1UL<<(((4*32+ 3))&31) & 0)) || ((((4*32+ 3))>>5)==5 && (1UL<<(((4*32+ 3))&31) & 0)) || ((((4*32+ 3))>>5)==6 && (1UL<<(((4*32+ 3))&31) & 0)) || ((((4*32+ 3))>>5)==7 && (1UL<<(((4*32+ 3))&31) & 0)) || ((((4*32+ 3))>>5)==8 && (1UL<<(((4*32+ 3))&31) & 0)) || ((((4*32+ 3))>>5)==9 && (1UL<<(((4*32+ 3))&31) & 0)) ) ? 1 : (__builtin_constant_p(((4*32+ 3))) ? constant_test_bit(((4*32+ 3)), ((unsigned long *)((c)->x86_capability))) : variable_test_bit(((4*32+ 3)), ((unsigned long *)((c)->x86_capability)))))))) ? !!((!(__builtin_constant_p((4*32+ 3)) && ( ((((4*32+ 3))>>5)==0 && (1UL<<(((4*32+ 3))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((4*32+ 3))>>5)==1 && (1UL<<(((4*32+ 3))&31) & (0|0))) || ((((4*32+ 3))>>5)==2 && (1UL<<(((4*32+ 3))&31) & 0)) || ((((4*32+ 3))>>5)==3 && (1UL<<(((4*32+ 3))&31) & (0))) || ((((4*32+ 3))>>5)==4 && (1UL<<(((4*32+ 3))&31) & 0)) || ((((4*32+ 3))>>5)==5 && (1UL<<(((4*32+ 3))&31) & 0)) || ((((4*32+ 3))>>5)==6 && (1UL<<(((4*32+ 3))&31) & 0)) || ((((4*32+ 3))>>5)==7 && (1UL<<(((4*32+ 3))&31) & 0)) || ((((4*32+ 3))>>5)==8 && (1UL<<(((4*32+ 3))&31) & 0)) || ((((4*32+ 3))>>5)==9 && (1UL<<(((4*32+ 3))&31) & 0)) ) ? 1 : (__builtin_constant_p(((4*32+ 3))) ? constant_test_bit(((4*32+ 3)), ((unsigned long *)((c)->x86_capability))) : variable_test_bit(((4*32+ 3)), ((unsigned long *)((c)->x86_capability))))))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/acpi.h", .line = 170, }; ______r = !!((!(__builtin_constant_p((4*32+ 3)) && ( ((((4*32+ 3))>>5)==0 && (1UL<<(((4*32+ 3))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((4*32+ 3))>>5)==1 && (1UL<<(((4*32+ 3))&31) & (0|0))) || ((((4*32+ 3))>>5)==2 && (1UL<<(((4*32+ 3))&31) & 0)) || ((((4*32+ 3))>>5)==3 && (1UL<<(((4*32+ 3))&31) & (0))) || ((((4*32+ 3))>>5)==4 && (1UL<<(((4*32+ 3))&31) & 0)) || ((((4*32+ 3))>>5)==5 && (1UL<<(((4*32+ 3))&31) & 0)) || ((((4*32+ 3))>>5)==6 && (1UL<<(((4*32+ 3))&31) & 0)) || ((((4*32+ 3))>>5)==7 && (1UL<<(((4*32+ 3))&31) & 0)) || ((((4*32+ 3))>>5)==8 && (1UL<<(((4*32+ 3))&31) & 0)) || ((((4*32+ 3))>>5)==9 && (1UL<<(((4*32+ 3))&31) & 0)) ) ? 1 : (__builtin_constant_p(((4*32+ 3))) ? constant_test_bit(((4*32+ 3)), ((unsigned long *)((c)->x86_capability))) : variable_test_bit(((4*32+ 3)), ((unsigned long *)((c)->x86_capability))))))); ______f.miss_hit[______r]++; ______r; })) + buf[2] &= ~((0x0200)); +} +extern unsigned long __FIXADDR_TOP; +enum fixed_addresses { + FIX_HOLE, + FIX_VDSO, + FIX_DBGP_BASE, + FIX_EARLYCON_MEM_BASE, + FIX_APIC_BASE, + FIX_IO_APIC_BASE_0, + FIX_IO_APIC_BASE_END = FIX_IO_APIC_BASE_0 + 64 - 1, + FIX_KMAP_BEGIN, + FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*8)-1, + FIX_PCIE_MCFG, + FIX_PARAVIRT_BOOTMAP, + FIX_TEXT_POKE1, + FIX_TEXT_POKE0, + __end_of_permanent_fixed_addresses, + FIX_BTMAP_END = + (__end_of_permanent_fixed_addresses ^ + (__end_of_permanent_fixed_addresses + (64 * 4) - 1)) & + -512 + ? __end_of_permanent_fixed_addresses + (64 * 4) - + (__end_of_permanent_fixed_addresses & ((64 * 4) - 1)) + : __end_of_permanent_fixed_addresses, + FIX_BTMAP_BEGIN = FIX_BTMAP_END + (64 * 4) - 1, + FIX_WP_TEST, + __end_of_fixed_addresses +}; +extern void reserve_top_address(unsigned long reserve); +extern int fixmaps_set; +extern pte_t *kmap_pte; +extern pgprot_t kmap_prot; +extern pte_t *pkmap_page_table; +void __native_set_fixmap(enum fixed_addresses idx, pte_t pte); +void native_set_fixmap(enum fixed_addresses idx, + phys_addr_t phys, pgprot_t flags); +extern void __this_fixmap_does_not_exist(void); +static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned long fix_to_virt(const unsigned int idx) +{ + if (__builtin_constant_p(((idx >= __end_of_fixed_addresses))) ? !!((idx >= __end_of_fixed_addresses)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/fixmap.h", .line = 210, }; ______r = !!((idx >= __end_of_fixed_addresses)); ______f.miss_hit[______r]++; ______r; })) + __this_fixmap_does_not_exist(); + return (((unsigned long)__FIXADDR_TOP) - ((idx) << 12)); +} +static inline __attribute__((always_inline)) unsigned long virt_to_fix(const unsigned long vaddr) +{ + do { if (__builtin_constant_p((((__builtin_constant_p(vaddr >= ((unsigned long)__FIXADDR_TOP) || vaddr < (((unsigned long)__FIXADDR_TOP) - (__end_of_permanent_fixed_addresses << 12))) ? !!(vaddr >= ((unsigned long)__FIXADDR_TOP) || vaddr < (((unsigned long)__FIXADDR_TOP) - (__end_of_permanent_fixed_addresses << 12))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/fixmap.h", .line = 218, }; ______r = __builtin_expect(!!(vaddr >= ((unsigned long)__FIXADDR_TOP) || vaddr < (((unsigned long)__FIXADDR_TOP) - (__end_of_permanent_fixed_addresses << 12))), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(vaddr >= ((unsigned long)__FIXADDR_TOP) || vaddr < (((unsigned long)__FIXADDR_TOP) - (__end_of_permanent_fixed_addresses << 12))) ? !!(vaddr >= ((unsigned long)__FIXADDR_TOP) || vaddr < (((unsigned long)__FIXADDR_TOP) - (__end_of_permanent_fixed_addresses << 12))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/fixmap.h", .line = 218, }; ______r = __builtin_expect(!!(vaddr >= ((unsigned long)__FIXADDR_TOP) || vaddr < (((unsigned long)__FIXADDR_TOP) - (__end_of_permanent_fixed_addresses << 12))), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/fixmap.h", .line = 218, }; ______r = !!(((__builtin_constant_p(vaddr >= ((unsigned long)__FIXADDR_TOP) || vaddr < (((unsigned long)__FIXADDR_TOP) - (__end_of_permanent_fixed_addresses << 12))) ? !!(vaddr >= ((unsigned long)__FIXADDR_TOP) || vaddr < (((unsigned long)__FIXADDR_TOP) - (__end_of_permanent_fixed_addresses << 12))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/fixmap.h", .line = 218, }; ______r = __builtin_expect(!!(vaddr >= ((unsigned long)__FIXADDR_TOP) || vaddr < (((unsigned long)__FIXADDR_TOP) - (__end_of_permanent_fixed_addresses << 12))), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("/data/exp/linux-3.0.4/arch/x86/include/asm/fixmap.h"), "i" (218), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); } while(0); + return ((((unsigned long)__FIXADDR_TOP) - ((vaddr)&(~(((1UL) << 12)-1)))) >> 12); +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned long +__set_fixmap_offset(enum fixed_addresses idx, phys_addr_t phys, pgprot_t flags) +{ + __set_fixmap(idx, phys, flags); + return fix_to_virt(idx) + (phys & (((1UL) << 12) - 1)); +} +extern void generic_apic_probe(void); +extern unsigned int apic_verbosity; +extern int local_apic_timer_c2_ok; +extern int disable_apic; +extern void __inquire_remote_apic(int apicid); +static inline __attribute__((always_inline)) void default_inquire_remote_apic(int apicid) +{ + if (__builtin_constant_p(((apic_verbosity >= 2))) ? !!((apic_verbosity >= 2)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/apic.h", .line = 63, }; ______r = !!((apic_verbosity >= 2)); ______f.miss_hit[______r]++; ______r; })) + __inquire_remote_apic(apicid); +} +static inline __attribute__((always_inline)) bool apic_from_smp_config(void) +{ + return smp_found_config && !disable_apic; +} +static inline __attribute__((always_inline)) int is_vsmp_box(void) +{ + return 0; +} +extern void xapic_wait_icr_idle(void); +extern u32 safe_xapic_wait_icr_idle(void); +extern void xapic_icr_write(u32, u32); +extern int setup_profiling_timer(unsigned int); +static inline __attribute__((always_inline)) void native_apic_mem_write(u32 reg, u32 v) +{ + volatile u32 *addr = (volatile u32 *)((fix_to_virt(FIX_APIC_BASE)) + reg); + asm volatile ("661:\n\t" "movl %0, %1" "\n662:\n" ".section .altinstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "661b\n" " " ".long" " " "663f\n" " .word " "(3*32+19)" "\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .discard,\"aw\",@progbits\n" " .byte 0xff + (664f-663f) - (662b-661b)\n" ".previous\n" ".section .altinstr_replacement, \"ax\"\n" "663:\n\t" "xchgl %0, %1" "\n664:\n" ".previous" : "=r" (v), "=m" (*addr) : "i" (0), "0" (v), "m" (*addr)) + ; +} +static inline __attribute__((always_inline)) u32 native_apic_mem_read(u32 reg) +{ + return *((volatile u32 *)((fix_to_virt(FIX_APIC_BASE)) + reg)); +} +extern void native_apic_wait_icr_idle(void); +extern u32 native_safe_apic_wait_icr_idle(void); +extern void native_apic_icr_write(u32 low, u32 id); +extern u64 native_apic_icr_read(void); +extern int x2apic_mode; +static inline __attribute__((always_inline)) void check_x2apic(void) +{ +} +static inline __attribute__((always_inline)) void enable_x2apic(void) +{ +} +static inline __attribute__((always_inline)) int x2apic_enabled(void) +{ + return 0; +} +static inline __attribute__((always_inline)) void x2apic_force_phys(void) +{ +} +extern void enable_IR_x2apic(void); +extern int get_physical_broadcast(void); +extern int lapic_get_maxlvt(void); +extern void clear_local_APIC(void); +extern void connect_bsp_APIC(void); +extern void disconnect_bsp_APIC(int virt_wire_setup); +extern void disable_local_APIC(void); +extern void lapic_shutdown(void); +extern int verify_local_APIC(void); +extern void sync_Arb_IDs(void); +extern void init_bsp_APIC(void); +extern void setup_local_APIC(void); +extern void end_local_APIC_setup(void); +extern void bsp_end_local_APIC_setup(void); +extern void init_apic_mappings(void); +void register_lapic_address(unsigned long address); +extern void setup_boot_APIC_clock(void); +extern void setup_secondary_APIC_clock(void); +extern int APIC_init_uniprocessor(void); +extern int apic_force_enable(unsigned long addr); +static inline __attribute__((always_inline)) int apic_is_clustered_box(void) +{ + return 0; +} +extern int setup_APIC_eilvt(u8 lvt_off, u8 vector, u8 msg_type, u8 mask); +struct apic { + char *name; + int (*probe)(void); + int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id); + int (*apic_id_registered)(void); + u32 irq_delivery_mode; + u32 irq_dest_mode; + const struct cpumask *(*target_cpus)(void); + int disable_esr; + int dest_logical; + unsigned long (*check_apicid_used)(physid_mask_t *map, int apicid); + unsigned long (*check_apicid_present)(int apicid); + void (*vector_allocation_domain)(int cpu, struct cpumask *retmask); + void (*init_apic_ldr)(void); + void (*ioapic_phys_id_map)(physid_mask_t *phys_map, physid_mask_t *retmap); + void (*setup_apic_routing)(void); + int (*multi_timer_check)(int apic, int irq); + int (*cpu_present_to_apicid)(int mps_cpu); + void (*apicid_to_cpu_present)(int phys_apicid, physid_mask_t *retmap); + void (*setup_portio_remap)(void); + int (*check_phys_apicid_present)(int phys_apicid); + void (*enable_apic_mode)(void); + int (*phys_pkg_id)(int cpuid_apic, int index_msb); + int (*mps_oem_check)(struct mpc_table *mpc, char *oem, char *productid); + unsigned int (*get_apic_id)(unsigned long x); + unsigned long (*set_apic_id)(unsigned int id); + unsigned long apic_id_mask; + unsigned int (*cpu_mask_to_apicid)(const struct cpumask *cpumask); + unsigned int (*cpu_mask_to_apicid_and)(const struct cpumask *cpumask, + const struct cpumask *andmask); + void (*send_IPI_mask)(const struct cpumask *mask, int vector); + void (*send_IPI_mask_allbutself)(const struct cpumask *mask, + int vector); + void (*send_IPI_allbutself)(int vector); + void (*send_IPI_all)(int vector); + void (*send_IPI_self)(int vector); + int (*wakeup_secondary_cpu)(int apicid, unsigned long start_eip); + int trampoline_phys_low; + int trampoline_phys_high; + void (*wait_for_init_deassert)(atomic_t *deassert); + void (*smp_callin_clear_local_apic)(void); + void (*inquire_remote_apic)(int apicid); + u32 (*read)(u32 reg); + void (*write)(u32 reg, u32 v); + u64 (*icr_read)(void); + void (*icr_write)(u32 low, u32 high); + void (*wait_icr_idle)(void); + u32 (*safe_wait_icr_idle)(void); + int (*x86_32_early_logical_apicid)(int cpu); + int (*x86_32_numa_cpu_node)(int cpu); +}; +extern struct apic *apic; +extern struct apic *__apicdrivers[], *__apicdrivers_end[]; +extern atomic_t init_deasserted; +extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip); +static inline __attribute__((always_inline)) u32 apic_read(u32 reg) +{ + return apic->read(reg); +} +static inline __attribute__((always_inline)) void apic_write(u32 reg, u32 val) +{ + apic->write(reg, val); +} +static inline __attribute__((always_inline)) u64 apic_icr_read(void) +{ + return apic->icr_read(); +} +static inline __attribute__((always_inline)) void apic_icr_write(u32 low, u32 high) +{ + apic->icr_write(low, high); +} +static inline __attribute__((always_inline)) void apic_wait_icr_idle(void) +{ + apic->wait_icr_idle(); +} +static inline __attribute__((always_inline)) u32 safe_apic_wait_icr_idle(void) +{ + return apic->safe_wait_icr_idle(); +} +static inline __attribute__((always_inline)) void ack_APIC_irq(void) +{ + apic_write(0xB0, 0); +} +static inline __attribute__((always_inline)) unsigned default_get_apic_id(unsigned long x) +{ + unsigned int ver = ((apic_read(0x30)) & 0xFFu); + if (__builtin_constant_p(((((ver) >= 0x14) || (__builtin_constant_p((3*32+26)) && ( ((((3*32+26))>>5)==0 && (1UL<<(((3*32+26))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((3*32+26))>>5)==1 && (1UL<<(((3*32+26))&31) & (0|0))) || ((((3*32+26))>>5)==2 && (1UL<<(((3*32+26))&31) & 0)) || ((((3*32+26))>>5)==3 && (1UL<<(((3*32+26))&31) & (0))) || ((((3*32+26))>>5)==4 && (1UL<<(((3*32+26))&31) & 0)) || ((((3*32+26))>>5)==5 && (1UL<<(((3*32+26))&31) & 0)) || ((((3*32+26))>>5)==6 && (1UL<<(((3*32+26))&31) & 0)) || ((((3*32+26))>>5)==7 && (1UL<<(((3*32+26))&31) & 0)) || ((((3*32+26))>>5)==8 && (1UL<<(((3*32+26))&31) & 0)) || ((((3*32+26))>>5)==9 && (1UL<<(((3*32+26))&31) & 0)) ) ? 1 : (__builtin_constant_p(((3*32+26))) ? constant_test_bit(((3*32+26)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((3*32+26)), ((unsigned long *)((&boot_cpu_data)->x86_capability)))))))) ? !!((((ver) >= 0x14) || (__builtin_constant_p((3*32+26)) && ( ((((3*32+26))>>5)==0 && (1UL<<(((3*32+26))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((3*32+26))>>5)==1 && (1UL<<(((3*32+26))&31) & (0|0))) || ((((3*32+26))>>5)==2 && (1UL<<(((3*32+26))&31) & 0)) || ((((3*32+26))>>5)==3 && (1UL<<(((3*32+26))&31) & (0))) || ((((3*32+26))>>5)==4 && (1UL<<(((3*32+26))&31) & 0)) || ((((3*32+26))>>5)==5 && (1UL<<(((3*32+26))&31) & 0)) || ((((3*32+26))>>5)==6 && (1UL<<(((3*32+26))&31) & 0)) || ((((3*32+26))>>5)==7 && (1UL<<(((3*32+26))&31) & 0)) || ((((3*32+26))>>5)==8 && (1UL<<(((3*32+26))&31) & 0)) || ((((3*32+26))>>5)==9 && (1UL<<(((3*32+26))&31) & 0)) ) ? 1 : (__builtin_constant_p(((3*32+26))) ? constant_test_bit(((3*32+26)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((3*32+26)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/apic.h", .line = 468, }; ______r = !!((((ver) >= 0x14) || (__builtin_constant_p((3*32+26)) && ( ((((3*32+26))>>5)==0 && (1UL<<(((3*32+26))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((3*32+26))>>5)==1 && (1UL<<(((3*32+26))&31) & (0|0))) || ((((3*32+26))>>5)==2 && (1UL<<(((3*32+26))&31) & 0)) || ((((3*32+26))>>5)==3 && (1UL<<(((3*32+26))&31) & (0))) || ((((3*32+26))>>5)==4 && (1UL<<(((3*32+26))&31) & 0)) || ((((3*32+26))>>5)==5 && (1UL<<(((3*32+26))&31) & 0)) || ((((3*32+26))>>5)==6 && (1UL<<(((3*32+26))&31) & 0)) || ((((3*32+26))>>5)==7 && (1UL<<(((3*32+26))&31) & 0)) || ((((3*32+26))>>5)==8 && (1UL<<(((3*32+26))&31) & 0)) || ((((3*32+26))>>5)==9 && (1UL<<(((3*32+26))&31) & 0)) ) ? 1 : (__builtin_constant_p(((3*32+26))) ? constant_test_bit(((3*32+26)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((3*32+26)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))))); ______f.miss_hit[______r]++; ______r; })) + return (x >> 24) & 0xFF; + else + return (x >> 24) & 0x0F; +} +static inline __attribute__((always_inline)) void default_wait_for_init_deassert(atomic_t *deassert) +{ + while (!atomic_read(deassert)) + cpu_relax(); + return; +} +extern struct apic *generic_bigsmp_probe(void); +static inline __attribute__((always_inline)) const struct cpumask *default_target_cpus(void) +{ + return cpu_online_mask; +} +extern __attribute__((section(".data..percpu" ""))) __typeof__(u16) x86_bios_cpu_apicid; extern __typeof__(u16) *x86_bios_cpu_apicid_early_ptr; extern __typeof__(u16) x86_bios_cpu_apicid_early_map[]; +static inline __attribute__((always_inline)) unsigned int read_apic_id(void) +{ + unsigned int reg; + reg = apic_read(0x20); + return apic->get_apic_id(reg); +} +extern void default_setup_apic_routing(void); +extern struct apic apic_noop; +static inline __attribute__((always_inline)) int noop_x86_32_early_logical_apicid(int cpu) +{ + return 0xFFu; +} +extern void default_init_apic_ldr(void); +static inline __attribute__((always_inline)) int default_apic_id_registered(void) +{ + return (__builtin_constant_p((read_apic_id())) ? constant_test_bit((read_apic_id()), ((phys_cpu_present_map).mask)) : variable_test_bit((read_apic_id()), ((phys_cpu_present_map).mask))); +} +static inline __attribute__((always_inline)) int default_phys_pkg_id(int cpuid_apic, int index_msb) +{ + return cpuid_apic >> index_msb; +} +static inline __attribute__((always_inline)) unsigned int +default_cpu_mask_to_apicid(const struct cpumask *cpumask) +{ + return ((cpumask)->bits)[0] & 0xFFu; +} +static inline __attribute__((always_inline)) unsigned int +default_cpu_mask_to_apicid_and(const struct cpumask *cpumask, + const struct cpumask *andmask) +{ + unsigned long mask1 = ((cpumask)->bits)[0]; + unsigned long mask2 = ((andmask)->bits)[0]; + unsigned long mask3 = ((cpu_online_mask)->bits)[0]; + return (unsigned int)(mask1 & mask2 & mask3); +} +static inline __attribute__((always_inline)) unsigned long default_check_apicid_used(physid_mask_t *map, int apicid) +{ + return (__builtin_constant_p((apicid)) ? constant_test_bit((apicid), ((*map).mask)) : variable_test_bit((apicid), ((*map).mask))); +} +static inline __attribute__((always_inline)) unsigned long default_check_apicid_present(int bit) +{ + return (__builtin_constant_p((bit)) ? constant_test_bit((bit), ((phys_cpu_present_map).mask)) : variable_test_bit((bit), ((phys_cpu_present_map).mask))); +} +static inline __attribute__((always_inline)) void default_ioapic_phys_id_map(physid_mask_t *phys_map, physid_mask_t *retmap) +{ + *retmap = *phys_map; +} +static inline __attribute__((always_inline)) int __default_cpu_present_to_apicid(int mps_cpu) +{ + if (__builtin_constant_p(((mps_cpu < nr_cpu_ids && (__builtin_constant_p((cpumask_check((mps_cpu)))) ? constant_test_bit((cpumask_check((mps_cpu))), ((((cpu_present_mask))->bits))) : variable_test_bit((cpumask_check((mps_cpu))), ((((cpu_present_mask))->bits))))))) ? !!((mps_cpu < nr_cpu_ids && (__builtin_constant_p((cpumask_check((mps_cpu)))) ? constant_test_bit((cpumask_check((mps_cpu))), ((((cpu_present_mask))->bits))) : variable_test_bit((cpumask_check((mps_cpu))), ((((cpu_present_mask))->bits)))))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/apic.h", .line = 594, }; ______r = !!((mps_cpu < nr_cpu_ids && (__builtin_constant_p((cpumask_check((mps_cpu)))) ? constant_test_bit((cpumask_check((mps_cpu))), ((((cpu_present_mask))->bits))) : variable_test_bit((cpumask_check((mps_cpu))), ((((cpu_present_mask))->bits)))))); ______f.miss_hit[______r]++; ______r; })) + return (int)(*({ do { const void *__vpp_verify = (typeof((&(x86_bios_cpu_apicid))))((void *)0); (void)__vpp_verify; } while (0); ({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"((typeof(*(&(x86_bios_cpu_apicid))) *)(&(x86_bios_cpu_apicid)))); (typeof((typeof(*(&(x86_bios_cpu_apicid))) *)(&(x86_bios_cpu_apicid)))) (__ptr + (((__per_cpu_offset[mps_cpu])))); }); })); + else + return 0xFFu; +} +static inline __attribute__((always_inline)) int +__default_check_phys_apicid_present(int phys_apicid) +{ + return (__builtin_constant_p((phys_apicid)) ? constant_test_bit((phys_apicid), ((phys_cpu_present_map).mask)) : variable_test_bit((phys_apicid), ((phys_cpu_present_map).mask))); +} +static inline __attribute__((always_inline)) int default_cpu_present_to_apicid(int mps_cpu) +{ + return __default_cpu_present_to_apicid(mps_cpu); +} +static inline __attribute__((always_inline)) int +default_check_phys_apicid_present(int phys_apicid) +{ + return __default_check_phys_apicid_present(phys_apicid); +} +static inline __attribute__((always_inline)) int invalid_vm86_irq(int irq) +{ + return irq < 3 || irq > 15; +} +union IO_APIC_reg_00 { + u32 raw; + struct { + u32 __reserved_2 : 14, + LTS : 1, + delivery_type : 1, + __reserved_1 : 8, + ID : 8; + } __attribute__ ((packed)) bits; +}; +union IO_APIC_reg_01 { + u32 raw; + struct { + u32 version : 8, + __reserved_2 : 7, + PRQ : 1, + entries : 8, + __reserved_1 : 8; + } __attribute__ ((packed)) bits; +}; +union IO_APIC_reg_02 { + u32 raw; + struct { + u32 __reserved_2 : 24, + arbitration : 4, + __reserved_1 : 4; + } __attribute__ ((packed)) bits; +}; +union IO_APIC_reg_03 { + u32 raw; + struct { + u32 boot_DT : 1, + __reserved_1 : 31; + } __attribute__ ((packed)) bits; +}; +struct IO_APIC_route_entry { + __u32 vector : 8, + delivery_mode : 3, + dest_mode : 1, + delivery_status : 1, + polarity : 1, + irr : 1, + trigger : 1, + mask : 1, + __reserved_2 : 15; + __u32 __reserved_3 : 24, + dest : 8; +} __attribute__ ((packed)); +struct IR_IO_APIC_route_entry { + __u64 vector : 8, + zero : 3, + index2 : 1, + delivery_status : 1, + polarity : 1, + irr : 1, + trigger : 1, + mask : 1, + reserved : 31, + format : 1, + index : 15; +} __attribute__ ((packed)); +extern int nr_ioapics; +extern int mpc_ioapic_id(int ioapic); +extern unsigned int mpc_ioapic_addr(int ioapic); +extern struct mp_ioapic_gsi *mp_ioapic_gsi_routing(int ioapic); +extern int mp_irq_entries; +extern struct mpc_intsrc mp_irqs[256]; +extern int mpc_default_type; +extern int sis_apic_bug; +extern int skip_ioapic_setup; +extern int noioapicquirk; +extern int noioapicreroute; +extern int timer_through_8259; +struct io_apic_irq_attr; +extern int io_apic_set_pci_routing(struct device *dev, int irq, + struct io_apic_irq_attr *irq_attr); +void setup_IO_APIC_irq_extra(u32 gsi); +extern void ioapic_and_gsi_init(void); +extern void ioapic_insert_resources(void); +int io_apic_setup_irq_pin_once(unsigned int irq, int node, struct io_apic_irq_attr *attr); +extern int save_ioapic_entries(void); +extern void mask_ioapic_entries(void); +extern int restore_ioapic_entries(void); +extern int get_nr_irqs_gsi(void); +extern void setup_ioapic_ids_from_mpc(void); +extern void setup_ioapic_ids_from_mpc_nocheck(void); +struct mp_ioapic_gsi{ + u32 gsi_base; + u32 gsi_end; +}; +extern struct mp_ioapic_gsi mp_gsi_routing[]; +extern u32 gsi_top; +int mp_find_ioapic(u32 gsi); +int mp_find_ioapic_pin(int ioapic, u32 gsi); +void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) mp_register_ioapic(int id, u32 address, u32 gsi_base); +extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) pre_init_apic_IRQ0(void); +extern void mp_save_irq(struct mpc_intsrc *m); +extern void disable_ioapic_support(void); +extern int smp_num_siblings; +extern unsigned int num_processors; +static inline __attribute__((always_inline)) bool cpu_has_ht_siblings(void) +{ + bool has_siblings = false; + has_siblings = (__builtin_constant_p((0*32+28)) && ( ((((0*32+28))>>5)==0 && (1UL<<(((0*32+28))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((0*32+28))>>5)==1 && (1UL<<(((0*32+28))&31) & (0|0))) || ((((0*32+28))>>5)==2 && (1UL<<(((0*32+28))&31) & 0)) || ((((0*32+28))>>5)==3 && (1UL<<(((0*32+28))&31) & (0))) || ((((0*32+28))>>5)==4 && (1UL<<(((0*32+28))&31) & 0)) || ((((0*32+28))>>5)==5 && (1UL<<(((0*32+28))&31) & 0)) || ((((0*32+28))>>5)==6 && (1UL<<(((0*32+28))&31) & 0)) || ((((0*32+28))>>5)==7 && (1UL<<(((0*32+28))&31) & 0)) || ((((0*32+28))>>5)==8 && (1UL<<(((0*32+28))&31) & 0)) || ((((0*32+28))>>5)==9 && (1UL<<(((0*32+28))&31) & 0)) ) ? 1 : (__builtin_constant_p(((0*32+28))) ? constant_test_bit(((0*32+28)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((0*32+28)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))) && smp_num_siblings > 1; + return has_siblings; +} +extern __attribute__((section(".data..percpu" ""))) __typeof__(cpumask_var_t) cpu_sibling_map; +extern __attribute__((section(".data..percpu" ""))) __typeof__(cpumask_var_t) cpu_core_map; +extern __attribute__((section(".data..percpu" ""))) __typeof__(cpumask_var_t) cpu_llc_shared_map; +extern __attribute__((section(".data..percpu" ""))) __typeof__(u16) cpu_llc_id; +extern __attribute__((section(".data..percpu" ""))) __typeof__(int) cpu_number; +static inline __attribute__((always_inline)) struct cpumask *cpu_sibling_mask(int cpu) +{ + return (*({ do { const void *__vpp_verify = (typeof((&(cpu_sibling_map))))((void *)0); (void)__vpp_verify; } while (0); ({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"((typeof(*(&(cpu_sibling_map))) *)(&(cpu_sibling_map)))); (typeof((typeof(*(&(cpu_sibling_map))) *)(&(cpu_sibling_map)))) (__ptr + (((__per_cpu_offset[cpu])))); }); })); +} +static inline __attribute__((always_inline)) struct cpumask *cpu_core_mask(int cpu) +{ + return (*({ do { const void *__vpp_verify = (typeof((&(cpu_core_map))))((void *)0); (void)__vpp_verify; } while (0); ({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"((typeof(*(&(cpu_core_map))) *)(&(cpu_core_map)))); (typeof((typeof(*(&(cpu_core_map))) *)(&(cpu_core_map)))) (__ptr + (((__per_cpu_offset[cpu])))); }); })); +} +static inline __attribute__((always_inline)) struct cpumask *cpu_llc_shared_mask(int cpu) +{ + return (*({ do { const void *__vpp_verify = (typeof((&(cpu_llc_shared_map))))((void *)0); (void)__vpp_verify; } while (0); ({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"((typeof(*(&(cpu_llc_shared_map))) *)(&(cpu_llc_shared_map)))); (typeof((typeof(*(&(cpu_llc_shared_map))) *)(&(cpu_llc_shared_map)))) (__ptr + (((__per_cpu_offset[cpu])))); }); })); +} +extern __attribute__((section(".data..percpu" ""))) __typeof__(u16) x86_cpu_to_apicid; extern __typeof__(u16) *x86_cpu_to_apicid_early_ptr; extern __typeof__(u16) x86_cpu_to_apicid_early_map[]; +extern __attribute__((section(".data..percpu" ""))) __typeof__(u16) x86_bios_cpu_apicid; extern __typeof__(u16) *x86_bios_cpu_apicid_early_ptr; extern __typeof__(u16) x86_bios_cpu_apicid_early_map[]; +extern __attribute__((section(".data..percpu" ""))) __typeof__(int) x86_cpu_to_logical_apicid; extern __typeof__(int) *x86_cpu_to_logical_apicid_early_ptr; extern __typeof__(int) x86_cpu_to_logical_apicid_early_map[]; +extern unsigned long stack_start; +struct smp_ops { + void (*smp_prepare_boot_cpu)(void); + void (*smp_prepare_cpus)(unsigned max_cpus); + void (*smp_cpus_done)(unsigned max_cpus); + void (*stop_other_cpus)(int wait); + void (*smp_send_reschedule)(int cpu); + int (*cpu_up)(unsigned cpu); + int (*cpu_disable)(void); + void (*cpu_die)(unsigned int cpu); + void (*play_dead)(void); + void (*send_call_func_ipi)(const struct cpumask *mask); + void (*send_call_func_single_ipi)(int cpu); +}; +extern void set_cpu_sibling_map(int cpu); +extern struct smp_ops smp_ops; +static inline __attribute__((always_inline)) void smp_send_stop(void) +{ + smp_ops.stop_other_cpus(0); +} +static inline __attribute__((always_inline)) void stop_other_cpus(void) +{ + smp_ops.stop_other_cpus(1); +} +static inline __attribute__((always_inline)) void smp_prepare_boot_cpu(void) +{ + smp_ops.smp_prepare_boot_cpu(); +} +static inline __attribute__((always_inline)) void smp_prepare_cpus(unsigned int max_cpus) +{ + smp_ops.smp_prepare_cpus(max_cpus); +} +static inline __attribute__((always_inline)) void smp_cpus_done(unsigned int max_cpus) +{ + smp_ops.smp_cpus_done(max_cpus); +} +static inline __attribute__((always_inline)) int __cpu_up(unsigned int cpu) +{ + return smp_ops.cpu_up(cpu); +} +static inline __attribute__((always_inline)) int __cpu_disable(void) +{ + return smp_ops.cpu_disable(); +} +static inline __attribute__((always_inline)) void __cpu_die(unsigned int cpu) +{ + smp_ops.cpu_die(cpu); +} +static inline __attribute__((always_inline)) void play_dead(void) +{ + smp_ops.play_dead(); +} +static inline __attribute__((always_inline)) void smp_send_reschedule(int cpu) +{ + smp_ops.smp_send_reschedule(cpu); +} +static inline __attribute__((always_inline)) void arch_send_call_function_single_ipi(int cpu) +{ + smp_ops.send_call_func_single_ipi(cpu); +} +static inline __attribute__((always_inline)) void arch_send_call_function_ipi_mask(const struct cpumask *mask) +{ + smp_ops.send_call_func_ipi(mask); +} +void cpu_disable_common(void); +void native_smp_prepare_boot_cpu(void); +void native_smp_prepare_cpus(unsigned int max_cpus); +void native_smp_cpus_done(unsigned int max_cpus); +int native_cpu_up(unsigned int cpunum); +int native_cpu_disable(void); +void native_cpu_die(unsigned int cpu); +void native_play_dead(void); +void play_dead_common(void); +void wbinvd_on_cpu(int cpu); +int wbinvd_on_all_cpus(void); +void native_send_call_func_ipi(const struct cpumask *mask); +void native_send_call_func_single_ipi(int cpu); +void smp_store_cpu_info(int id); +static inline __attribute__((always_inline)) int num_booting_cpus(void) +{ + return cpumask_weight(cpu_callout_mask); +} +extern unsigned disabled_cpus __attribute__ ((__section__(".cpuinit.data"))); +extern int safe_smp_processor_id(void); +static inline __attribute__((always_inline)) int logical_smp_processor_id(void) +{ + return (((apic_read(0xD0)) >> 24) & 0xFFu); +} +extern int hard_smp_processor_id(void); +extern void smp_send_stop(void); +extern void smp_send_reschedule(int cpu); +extern void smp_prepare_cpus(unsigned int max_cpus); +extern int __cpu_up(unsigned int cpunum); +extern void smp_cpus_done(unsigned int max_cpus); +int smp_call_function(smp_call_func_t func, void *info, int wait); +void smp_call_function_many(const struct cpumask *mask, + smp_call_func_t func, void *info, bool wait); +void __smp_call_function_single(int cpuid, struct call_single_data *data, + int wait); +int smp_call_function_any(const struct cpumask *mask, + smp_call_func_t func, void *info, int wait); +void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) call_function_init(void); +void generic_smp_call_function_single_interrupt(void); +void generic_smp_call_function_interrupt(void); +void ipi_call_lock(void); +void ipi_call_unlock(void); +void ipi_call_lock_irq(void); +void ipi_call_unlock_irq(void); +int on_each_cpu(smp_call_func_t func, void *info, int wait); +void smp_prepare_boot_cpu(void); +extern unsigned int setup_max_cpus; +extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) setup_nr_cpu_ids(void); +extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) smp_init(void); + extern unsigned int debug_smp_processor_id(void); +extern void arch_disable_smp_support(void); +void smp_setup_processor_id(void); +enum pageblock_bits { + PB_migrate, + PB_migrate_end = PB_migrate + 3 - 1, + NR_PAGEBLOCK_BITS +}; +struct page; +unsigned long get_pageblock_flags_group(struct page *page, + int start_bitidx, int end_bitidx); +void set_pageblock_flags_group(struct page *page, unsigned long flags, + int start_bitidx, int end_bitidx); +extern int page_group_by_mobility_disabled; +static inline __attribute__((always_inline)) int get_pageblock_migratetype(struct page *page) +{ + return get_pageblock_flags_group(page, PB_migrate, PB_migrate_end); +} +struct free_area { + struct list_head free_list[5]; + unsigned long nr_free; +}; +struct pglist_data; +struct zone_padding { + char x[0]; +} __attribute__((__aligned__(1 << (6)))); +enum zone_stat_item { + NR_FREE_PAGES, + NR_LRU_BASE, + NR_INACTIVE_ANON = NR_LRU_BASE, + NR_ACTIVE_ANON, + NR_INACTIVE_FILE, + NR_ACTIVE_FILE, + NR_UNEVICTABLE, + NR_MLOCK, + NR_ANON_PAGES, + NR_FILE_MAPPED, + NR_FILE_PAGES, + NR_FILE_DIRTY, + NR_WRITEBACK, + NR_SLAB_RECLAIMABLE, + NR_SLAB_UNRECLAIMABLE, + NR_PAGETABLE, + NR_KERNEL_STACK, + NR_UNSTABLE_NFS, + NR_BOUNCE, + NR_VMSCAN_WRITE, + NR_WRITEBACK_TEMP, + NR_ISOLATED_ANON, + NR_ISOLATED_FILE, + NR_SHMEM, + NR_DIRTIED, + NR_WRITTEN, + NR_ANON_TRANSPARENT_HUGEPAGES, + NR_VM_ZONE_STAT_ITEMS }; +enum lru_list { + LRU_INACTIVE_ANON = 0, + LRU_ACTIVE_ANON = 0 + 1, + LRU_INACTIVE_FILE = 0 + 2, + LRU_ACTIVE_FILE = 0 + 2 + 1, + LRU_UNEVICTABLE, + NR_LRU_LISTS +}; +static inline __attribute__((always_inline)) int is_file_lru(enum lru_list l) +{ + return (l == LRU_INACTIVE_FILE || l == LRU_ACTIVE_FILE); +} +static inline __attribute__((always_inline)) int is_active_lru(enum lru_list l) +{ + return (l == LRU_ACTIVE_ANON || l == LRU_ACTIVE_FILE); +} +static inline __attribute__((always_inline)) int is_unevictable_lru(enum lru_list l) +{ + return (l == LRU_UNEVICTABLE); +} +enum zone_watermarks { + WMARK_MIN, + WMARK_LOW, + WMARK_HIGH, + NR_WMARK +}; +struct per_cpu_pages { + int count; + int high; + int batch; + struct list_head lists[3]; +}; +struct per_cpu_pageset { + struct per_cpu_pages pcp; + s8 stat_threshold; + s8 vm_stat_diff[NR_VM_ZONE_STAT_ITEMS]; +}; +enum zone_type { + ZONE_DMA, + ZONE_NORMAL, + ZONE_HIGHMEM, + ZONE_MOVABLE, + __MAX_NR_ZONES +}; +struct zone_reclaim_stat { + unsigned long recent_rotated[2]; + unsigned long recent_scanned[2]; +}; +struct zone { + unsigned long watermark[NR_WMARK]; + unsigned long percpu_drift_mark; + unsigned long lowmem_reserve[4]; + struct per_cpu_pageset *pageset; + spinlock_t lock; + int all_unreclaimable; + struct free_area free_area[11]; + unsigned long *pageblock_flags; + unsigned int compact_considered; + unsigned int compact_defer_shift; + struct zone_padding _pad1_; + spinlock_t lru_lock; + struct zone_lru { + struct list_head list; + } lru[NR_LRU_LISTS]; + struct zone_reclaim_stat reclaim_stat; + unsigned long pages_scanned; + unsigned long flags; + atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; + unsigned int inactive_ratio; + struct zone_padding _pad2_; + wait_queue_head_t * wait_table; + unsigned long wait_table_hash_nr_entries; + unsigned long wait_table_bits; + struct pglist_data *zone_pgdat; + unsigned long zone_start_pfn; + unsigned long spanned_pages; + unsigned long present_pages; + const char *name; +} __attribute__((__aligned__(1 << (6)))); +typedef enum { + ZONE_RECLAIM_LOCKED, + ZONE_OOM_LOCKED, + ZONE_CONGESTED, +} zone_flags_t; +static inline __attribute__((always_inline)) void zone_set_flag(struct zone *zone, zone_flags_t flag) +{ + set_bit(flag, &zone->flags); +} +static inline __attribute__((always_inline)) int zone_test_and_set_flag(struct zone *zone, zone_flags_t flag) +{ + return test_and_set_bit(flag, &zone->flags); +} +static inline __attribute__((always_inline)) void zone_clear_flag(struct zone *zone, zone_flags_t flag) +{ + clear_bit(flag, &zone->flags); +} +static inline __attribute__((always_inline)) int zone_is_reclaim_congested(const struct zone *zone) +{ + return (__builtin_constant_p((ZONE_CONGESTED)) ? constant_test_bit((ZONE_CONGESTED), (&zone->flags)) : variable_test_bit((ZONE_CONGESTED), (&zone->flags))); +} +static inline __attribute__((always_inline)) int zone_is_reclaim_locked(const struct zone *zone) +{ + return (__builtin_constant_p((ZONE_RECLAIM_LOCKED)) ? constant_test_bit((ZONE_RECLAIM_LOCKED), (&zone->flags)) : variable_test_bit((ZONE_RECLAIM_LOCKED), (&zone->flags))); +} +static inline __attribute__((always_inline)) int zone_is_oom_locked(const struct zone *zone) +{ + return (__builtin_constant_p((ZONE_OOM_LOCKED)) ? constant_test_bit((ZONE_OOM_LOCKED), (&zone->flags)) : variable_test_bit((ZONE_OOM_LOCKED), (&zone->flags))); +} +struct zonelist_cache; +struct zoneref { + struct zone *zone; + int zone_idx; +}; +struct zonelist { + struct zonelist_cache *zlcache_ptr; + struct zoneref _zonerefs[((1 << 0) * 4) + 1]; +}; +struct node_active_region { + unsigned long start_pfn; + unsigned long end_pfn; + int nid; +}; +extern struct page *mem_map; +struct bootmem_data; +typedef struct pglist_data { + struct zone node_zones[4]; + struct zonelist node_zonelists[1]; + int nr_zones; + struct page *node_mem_map; + unsigned long node_start_pfn; + unsigned long node_present_pages; + unsigned long node_spanned_pages; + int node_id; + wait_queue_head_t kswapd_wait; + struct task_struct *kswapd; + int kswapd_max_order; + enum zone_type classzone_idx; +} pg_data_t; +struct rw_semaphore; +struct rw_semaphore { + long count; + spinlock_t wait_lock; + struct list_head wait_list; + struct lockdep_map dep_map; +}; +extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem); +extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem); +extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *); +extern struct rw_semaphore *rwsem_downgrade_wake(struct rw_semaphore *sem); +static inline __attribute__((always_inline)) void __down_read(struct rw_semaphore *sem) +{ + asm volatile("# beginning down_read\n\t" + ".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " " " "incl" " " "(%1)\n\t" + " jns 1f\n" + " call call_rwsem_down_read_failed\n" + "1:\n\t" + "# ending down_read\n\t" + : "+m" (sem->count) + : "a" (sem) + : "memory", "cc"); +} +static inline __attribute__((always_inline)) int __down_read_trylock(struct rw_semaphore *sem) +{ + long result, tmp; + asm volatile("# beginning __down_read_trylock\n\t" + " mov %0,%1\n\t" + "1:\n\t" + " mov %1,%2\n\t" + " add %3,%2\n\t" + " jle 2f\n\t" + ".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " " cmpxchg %2,%0\n\t" + " jnz 1b\n\t" + "2:\n\t" + "# ending __down_read_trylock\n\t" + : "+m" (sem->count), "=&a" (result), "=&r" (tmp) + : "i" (0x00000001L) + : "memory", "cc"); + return result >= 0 ? 1 : 0; +} +static inline __attribute__((always_inline)) void __down_write_nested(struct rw_semaphore *sem, int subclass) +{ + long tmp; + asm volatile("# beginning down_write\n\t" + ".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " " xadd %1,(%2)\n\t" + " test %1,%1\n\t" + " jz 1f\n" + " call call_rwsem_down_write_failed\n" + "1:\n" + "# ending down_write" + : "+m" (sem->count), "=d" (tmp) + : "a" (sem), "1" (((-0x0000ffffL -1) + 0x00000001L)) + : "memory", "cc"); +} +static inline __attribute__((always_inline)) void __down_write(struct rw_semaphore *sem) +{ + __down_write_nested(sem, 0); +} +static inline __attribute__((always_inline)) int __down_write_trylock(struct rw_semaphore *sem) +{ + long ret = ({ __typeof__(*(((&sem->count)))) __ret; __typeof__(*(((&sem->count)))) __old = (((0x00000000L))); __typeof__(*(((&sem->count)))) __new = (((((-0x0000ffffL -1) + 0x00000001L)))); switch ((sizeof(*&sem->count))) { case 1: { volatile u8 *__ptr = (volatile u8 *)(((&sem->count))); asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "cmpxchgb %2,%1" : "=a" (__ret), "+m" (*__ptr) : "q" (__new), "0" (__old) : "memory"); break; } case 2: { volatile u16 *__ptr = (volatile u16 *)(((&sem->count))); asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "cmpxchgw %2,%1" : "=a" (__ret), "+m" (*__ptr) : "r" (__new), "0" (__old) : "memory"); break; } case 4: { volatile u32 *__ptr = (volatile u32 *)(((&sem->count))); asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "cmpxchgl %2,%1" : "=a" (__ret), "+m" (*__ptr) : "r" (__new), "0" (__old) : "memory"); break; } default: __cmpxchg_wrong_size(); } __ret; }) + ; + if (__builtin_constant_p(((ret == 0x00000000L))) ? !!((ret == 0x00000000L)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/rwsem.h", .line = 131, }; ______r = !!((ret == 0x00000000L)); ______f.miss_hit[______r]++; ______r; })) + return 1; + return 0; +} +static inline __attribute__((always_inline)) void __up_read(struct rw_semaphore *sem) +{ + long tmp; + asm volatile("# beginning __up_read\n\t" + ".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " " xadd %1,(%2)\n\t" + " jns 1f\n\t" + " call call_rwsem_wake\n" + "1:\n" + "# ending __up_read\n" + : "+m" (sem->count), "=d" (tmp) + : "a" (sem), "1" (-0x00000001L) + : "memory", "cc"); +} +static inline __attribute__((always_inline)) void __up_write(struct rw_semaphore *sem) +{ + long tmp; + asm volatile("# beginning __up_write\n\t" + ".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " " xadd %1,(%2)\n\t" + " jns 1f\n\t" + " call call_rwsem_wake\n" + "1:\n\t" + "# ending __up_write\n" + : "+m" (sem->count), "=d" (tmp) + : "a" (sem), "1" (-((-0x0000ffffL -1) + 0x00000001L)) + : "memory", "cc"); +} +static inline __attribute__((always_inline)) void __downgrade_write(struct rw_semaphore *sem) +{ + asm volatile("# beginning __downgrade_write\n\t" + ".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " " " "addl" " " "%2,(%1)\n\t" + " jns 1f\n\t" + " call call_rwsem_downgrade_wake\n" + "1:\n\t" + "# ending __downgrade_write\n" + : "+m" (sem->count) + : "a" (sem), "er" (-(-0x0000ffffL -1)) + : "memory", "cc"); +} +static inline __attribute__((always_inline)) void rwsem_atomic_add(long delta, struct rw_semaphore *sem) +{ + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " " " "addl" " " "%1,%0" + : "+m" (sem->count) + : "er" (delta)); +} +static inline __attribute__((always_inline)) long rwsem_atomic_update(long delta, struct rw_semaphore *sem) +{ + long tmp = delta; + asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "xadd %0,%1" + : "+r" (tmp), "+m" (sem->count) + : : "memory"); + return tmp + delta; +} +static inline __attribute__((always_inline)) int rwsem_is_locked(struct rw_semaphore *sem) +{ + return sem->count != 0; +} +extern void __init_rwsem(struct rw_semaphore *sem, const char *name, + struct lock_class_key *key); +extern void down_read(struct rw_semaphore *sem); +extern int down_read_trylock(struct rw_semaphore *sem); +extern void down_write(struct rw_semaphore *sem); +extern int down_write_trylock(struct rw_semaphore *sem); +extern void up_read(struct rw_semaphore *sem); +extern void up_write(struct rw_semaphore *sem); +extern void downgrade_write(struct rw_semaphore *sem); +extern void down_read_nested(struct rw_semaphore *sem, int subclass); +extern void down_write_nested(struct rw_semaphore *sem, int subclass); +extern void down_read_non_owner(struct rw_semaphore *sem); +extern void up_read_non_owner(struct rw_semaphore *sem); +struct srcu_struct_array { + int c[2]; +}; +struct srcu_struct { + int completed; + struct srcu_struct_array *per_cpu_ref; + struct mutex mutex; + struct lockdep_map dep_map; +}; +int __init_srcu_struct(struct srcu_struct *sp, const char *name, + struct lock_class_key *key); +void cleanup_srcu_struct(struct srcu_struct *sp); +int __srcu_read_lock(struct srcu_struct *sp) ; +void __srcu_read_unlock(struct srcu_struct *sp, int idx) ; +void synchronize_srcu(struct srcu_struct *sp); +void synchronize_srcu_expedited(struct srcu_struct *sp); +long srcu_batches_completed(struct srcu_struct *sp); +static inline __attribute__((always_inline)) int srcu_read_lock_held(struct srcu_struct *sp) +{ + if (__builtin_constant_p(((debug_locks))) ? !!((debug_locks)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/srcu.h", .line = 96, }; ______r = !!((debug_locks)); ______f.miss_hit[______r]++; ______r; })) + return lock_is_held(&sp->dep_map); + return 1; +} +static inline __attribute__((always_inline)) int srcu_read_lock(struct srcu_struct *sp) +{ + int retval = __srcu_read_lock(sp); + lock_acquire(&(sp)->dep_map, 0, 0, 2, 1, ((void *)0), ({ __label__ __here; __here: (unsigned long)&&__here; })); + return retval; +} +static inline __attribute__((always_inline)) void srcu_read_unlock(struct srcu_struct *sp, int idx) +{ + lock_release(&(sp)->dep_map, 1, ({ __label__ __here; __here: (unsigned long)&&__here; })); + __srcu_read_unlock(sp, idx); +} +struct notifier_block { + int (*notifier_call)(struct notifier_block *, unsigned long, void *); + struct notifier_block *next; + int priority; +}; +struct atomic_notifier_head { + spinlock_t lock; + struct notifier_block *head; +}; +struct blocking_notifier_head { + struct rw_semaphore rwsem; + struct notifier_block *head; +}; +struct raw_notifier_head { + struct notifier_block *head; +}; +struct srcu_notifier_head { + struct mutex mutex; + struct srcu_struct srcu; + struct notifier_block *head; +}; +extern void srcu_init_notifier_head(struct srcu_notifier_head *nh); +extern int atomic_notifier_chain_register(struct atomic_notifier_head *nh, + struct notifier_block *nb); +extern int blocking_notifier_chain_register(struct blocking_notifier_head *nh, + struct notifier_block *nb); +extern int raw_notifier_chain_register(struct raw_notifier_head *nh, + struct notifier_block *nb); +extern int srcu_notifier_chain_register(struct srcu_notifier_head *nh, + struct notifier_block *nb); +extern int blocking_notifier_chain_cond_register( + struct blocking_notifier_head *nh, + struct notifier_block *nb); +extern int atomic_notifier_chain_unregister(struct atomic_notifier_head *nh, + struct notifier_block *nb); +extern int blocking_notifier_chain_unregister(struct blocking_notifier_head *nh, + struct notifier_block *nb); +extern int raw_notifier_chain_unregister(struct raw_notifier_head *nh, + struct notifier_block *nb); +extern int srcu_notifier_chain_unregister(struct srcu_notifier_head *nh, + struct notifier_block *nb); +extern int atomic_notifier_call_chain(struct atomic_notifier_head *nh, + unsigned long val, void *v); +extern int __atomic_notifier_call_chain(struct atomic_notifier_head *nh, + unsigned long val, void *v, int nr_to_call, int *nr_calls); +extern int blocking_notifier_call_chain(struct blocking_notifier_head *nh, + unsigned long val, void *v); +extern int __blocking_notifier_call_chain(struct blocking_notifier_head *nh, + unsigned long val, void *v, int nr_to_call, int *nr_calls); +extern int raw_notifier_call_chain(struct raw_notifier_head *nh, + unsigned long val, void *v); +extern int __raw_notifier_call_chain(struct raw_notifier_head *nh, + unsigned long val, void *v, int nr_to_call, int *nr_calls); +extern int srcu_notifier_call_chain(struct srcu_notifier_head *nh, + unsigned long val, void *v); +extern int __srcu_notifier_call_chain(struct srcu_notifier_head *nh, + unsigned long val, void *v, int nr_to_call, int *nr_calls); +static inline __attribute__((always_inline)) int notifier_from_errno(int err) +{ + if (__builtin_constant_p(((err))) ? !!((err)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/notifier.h", .line = 167, }; ______r = !!((err)); ______f.miss_hit[______r]++; ______r; })) + return 0x8000 | (0x0001 - err); + return 0x0001; +} +static inline __attribute__((always_inline)) int notifier_to_errno(int ret) +{ + ret &= ~0x8000; + return ret > 0x0001 ? 0x0001 - ret : 0; +} +extern struct blocking_notifier_head reboot_notifier_list; +struct page; +struct zone; +struct pglist_data; +struct mem_section; +static inline __attribute__((always_inline)) void pgdat_resize_lock(struct pglist_data *p, unsigned long *f) {} +static inline __attribute__((always_inline)) void pgdat_resize_unlock(struct pglist_data *p, unsigned long *f) {} +static inline __attribute__((always_inline)) void pgdat_resize_init(struct pglist_data *pgdat) {} +static inline __attribute__((always_inline)) unsigned zone_span_seqbegin(struct zone *zone) +{ + return 0; +} +static inline __attribute__((always_inline)) int zone_span_seqretry(struct zone *zone, unsigned iv) +{ + return 0; +} +static inline __attribute__((always_inline)) void zone_span_writelock(struct zone *zone) {} +static inline __attribute__((always_inline)) void zone_span_writeunlock(struct zone *zone) {} +static inline __attribute__((always_inline)) void zone_seqlock_init(struct zone *zone) {} +static inline __attribute__((always_inline)) int mhp_notimplemented(const char *func) +{ + printk("<4>" "%s() called, with CONFIG_MEMORY_HOTPLUG disabled\n", func); + dump_stack(); + return -38; +} +static inline __attribute__((always_inline)) void register_page_bootmem_info_node(struct pglist_data *pgdat) +{ +} +static inline __attribute__((always_inline)) void lock_memory_hotplug(void) {} +static inline __attribute__((always_inline)) void unlock_memory_hotplug(void) {} +static inline __attribute__((always_inline)) int is_mem_section_removable(unsigned long pfn, + unsigned long nr_pages) +{ + return 0; +} +extern int mem_online_node(int nid); +extern int add_memory(int nid, u64 start, u64 size); +extern int arch_add_memory(int nid, u64 start, u64 size); +extern int remove_memory(u64 start, u64 size); +extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn, + int nr_pages); +extern void sparse_remove_one_section(struct zone *zone, struct mem_section *ms); +extern struct page *sparse_decode_mem_map(unsigned long coded_mem_map, + unsigned long pnum); +extern struct mutex zonelists_mutex; +void build_all_zonelists(void *data); +void wakeup_kswapd(struct zone *zone, int order, enum zone_type classzone_idx); +bool zone_watermark_ok(struct zone *z, int order, unsigned long mark, + int classzone_idx, int alloc_flags); +bool zone_watermark_ok_safe(struct zone *z, int order, unsigned long mark, + int classzone_idx, int alloc_flags); +enum memmap_context { + MEMMAP_EARLY, + MEMMAP_HOTPLUG, +}; +extern int init_currently_empty_zone(struct zone *zone, unsigned long start_pfn, + unsigned long size, + enum memmap_context context); +static inline __attribute__((always_inline)) void memory_present(int nid, unsigned long start, unsigned long end) {} +static inline __attribute__((always_inline)) int local_memory_node(int node_id) { return node_id; }; +static inline __attribute__((always_inline)) int populated_zone(struct zone *zone) +{ + return (!!zone->present_pages); +} +extern int movable_zone; +static inline __attribute__((always_inline)) int zone_movable_is_highmem(void) +{ + return movable_zone == ZONE_HIGHMEM; +} +static inline __attribute__((always_inline)) int is_highmem_idx(enum zone_type idx) +{ + return (idx == ZONE_HIGHMEM || + (idx == ZONE_MOVABLE && zone_movable_is_highmem())); +} +static inline __attribute__((always_inline)) int is_normal_idx(enum zone_type idx) +{ + return (idx == ZONE_NORMAL); +} +static inline __attribute__((always_inline)) int is_highmem(struct zone *zone) +{ + int zone_off = (char *)zone - (char *)zone->zone_pgdat->node_zones; + return zone_off == ZONE_HIGHMEM * sizeof(*zone) || + (zone_off == ZONE_MOVABLE * sizeof(*zone) && + zone_movable_is_highmem()); +} +static inline __attribute__((always_inline)) int is_normal(struct zone *zone) +{ + return zone == zone->zone_pgdat->node_zones + ZONE_NORMAL; +} +static inline __attribute__((always_inline)) int is_dma32(struct zone *zone) +{ + return 0; +} +static inline __attribute__((always_inline)) int is_dma(struct zone *zone) +{ + return zone == zone->zone_pgdat->node_zones + ZONE_DMA; +} +struct ctl_table; +int min_free_kbytes_sysctl_handler(struct ctl_table *, int, + void *, size_t *, loff_t *); +extern int sysctl_lowmem_reserve_ratio[4 -1]; +int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int, + void *, size_t *, loff_t *); +int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int, + void *, size_t *, loff_t *); +int sysctl_min_unmapped_ratio_sysctl_handler(struct ctl_table *, int, + void *, size_t *, loff_t *); +int sysctl_min_slab_ratio_sysctl_handler(struct ctl_table *, int, + void *, size_t *, loff_t *); +extern int numa_zonelist_order_handler(struct ctl_table *, int, + void *, size_t *, loff_t *); +extern char numa_zonelist_order[]; +extern struct pglist_data contig_page_data; +extern struct pglist_data *first_online_pgdat(void); +extern struct pglist_data *next_online_pgdat(struct pglist_data *pgdat); +extern struct zone *next_zone(struct zone *zone); +static inline __attribute__((always_inline)) struct zone *zonelist_zone(struct zoneref *zoneref) +{ + return zoneref->zone; +} +static inline __attribute__((always_inline)) int zonelist_zone_idx(struct zoneref *zoneref) +{ + return zoneref->zone_idx; +} +static inline __attribute__((always_inline)) int zonelist_node_idx(struct zoneref *zoneref) +{ + return 0; +} +struct zoneref *next_zones_zonelist(struct zoneref *z, + enum zone_type highest_zoneidx, + nodemask_t *nodes, + struct zone **zone); +static inline __attribute__((always_inline)) struct zoneref *first_zones_zonelist(struct zonelist *zonelist, + enum zone_type highest_zoneidx, + nodemask_t *nodes, + struct zone **zone) +{ + return next_zones_zonelist(zonelist->_zonerefs, highest_zoneidx, nodes, + zone); +} +void memory_present(int nid, unsigned long start, unsigned long end); +unsigned long __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) node_memmap_size_bytes(int, unsigned long, unsigned long); +static inline __attribute__((always_inline)) int memmap_valid_within(unsigned long pfn, + struct page *page, struct zone *zone) +{ + return 1; +} +extern void *pcpu_base_addr; +extern const unsigned long *pcpu_unit_offsets; +struct pcpu_group_info { + int nr_units; + unsigned long base_offset; + unsigned int *cpu_map; +}; +struct pcpu_alloc_info { + size_t static_size; + size_t reserved_size; + size_t dyn_size; + size_t unit_size; + size_t atom_size; + size_t alloc_size; + size_t __ai_size; + int nr_groups; + struct pcpu_group_info groups[]; +}; +enum pcpu_fc { + PCPU_FC_AUTO, + PCPU_FC_EMBED, + PCPU_FC_PAGE, + PCPU_FC_NR, +}; +extern const char *pcpu_fc_names[PCPU_FC_NR]; +extern enum pcpu_fc pcpu_chosen_fc; +typedef void * (*pcpu_fc_alloc_fn_t)(unsigned int cpu, size_t size, + size_t align); +typedef void (*pcpu_fc_free_fn_t)(void *ptr, size_t size); +typedef void (*pcpu_fc_populate_pte_fn_t)(unsigned long addr); +typedef int (pcpu_fc_cpu_distance_fn_t)(unsigned int from, unsigned int to); +extern struct pcpu_alloc_info * __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) pcpu_alloc_alloc_info(int nr_groups, + int nr_units); +extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) pcpu_free_alloc_info(struct pcpu_alloc_info *ai); +extern int __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai, + void *base_addr); +extern int __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size, + size_t atom_size, + pcpu_fc_cpu_distance_fn_t cpu_distance_fn, + pcpu_fc_alloc_fn_t alloc_fn, + pcpu_fc_free_fn_t free_fn); +extern int __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) pcpu_page_first_chunk(size_t reserved_size, + pcpu_fc_alloc_fn_t alloc_fn, + pcpu_fc_free_fn_t free_fn, + pcpu_fc_populate_pte_fn_t populate_pte_fn); +extern void *__alloc_reserved_percpu(size_t size, size_t align); +extern bool is_kernel_percpu_address(unsigned long addr); +extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) percpu_init_late(void); +extern void *__alloc_percpu(size_t size, size_t align); +extern void free_percpu(void *__pdata); +extern phys_addr_t per_cpu_ptr_to_phys(void *addr); +extern void __bad_size_call_parameter(void); +int arch_update_cpu_topology(void); +static inline __attribute__((always_inline)) int numa_mem_id(void) +{ + return numa_node_id(); +} +struct vm_area_struct; +static inline __attribute__((always_inline)) int allocflags_to_migratetype(gfp_t gfp_flags) +{ + ({ int __ret_warn_on = !!((gfp_flags & ((( gfp_t)0x80000u)|(( gfp_t)0x08u))) == ((( gfp_t)0x80000u)|(( gfp_t)0x08u))); if (__builtin_constant_p((((__builtin_constant_p(__ret_warn_on) ? !!(__ret_warn_on) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/gfp.h", .line = 152, }; ______r = __builtin_expect(!!(__ret_warn_on), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(__ret_warn_on) ? !!(__ret_warn_on) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/gfp.h", .line = 152, }; ______r = __builtin_expect(!!(__ret_warn_on), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/gfp.h", .line = 152, }; ______r = !!(((__builtin_constant_p(__ret_warn_on) ? !!(__ret_warn_on) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/gfp.h", .line = 152, }; ______r = __builtin_expect(!!(__ret_warn_on), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) warn_slowpath_null("include/linux/gfp.h", 152); (__builtin_constant_p(__ret_warn_on) ? !!(__ret_warn_on) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/gfp.h", .line = 152, }; ______r = __builtin_expect(!!(__ret_warn_on), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })); }); + if (__builtin_constant_p((((__builtin_constant_p(page_group_by_mobility_disabled) ? !!(page_group_by_mobility_disabled) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/gfp.h", .line = 154, }; ______r = __builtin_expect(!!(page_group_by_mobility_disabled), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(page_group_by_mobility_disabled) ? !!(page_group_by_mobility_disabled) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/gfp.h", .line = 154, }; ______r = __builtin_expect(!!(page_group_by_mobility_disabled), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/gfp.h", .line = 154, }; ______r = !!(((__builtin_constant_p(page_group_by_mobility_disabled) ? !!(page_group_by_mobility_disabled) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/gfp.h", .line = 154, }; ______r = __builtin_expect(!!(page_group_by_mobility_disabled), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + return 0; + return (((gfp_flags & (( gfp_t)0x08u)) != 0) << 1) | + ((gfp_flags & (( gfp_t)0x80000u)) != 0); +} +static inline __attribute__((always_inline)) enum zone_type gfp_zone(gfp_t flags) +{ + enum zone_type z; + int bit = ( int) (flags & ((( gfp_t)0x01u)|(( gfp_t)0x02u)|(( gfp_t)0x04u)|(( gfp_t)0x08u))); + z = (( (ZONE_NORMAL << 0 * 2) | (ZONE_DMA << 0x01u * 2) | (ZONE_HIGHMEM << 0x02u * 2) | (ZONE_NORMAL << 0x04u * 2) | (ZONE_NORMAL << 0x08u * 2) | (ZONE_DMA << (0x08u | 0x01u) * 2) | (ZONE_MOVABLE << (0x08u | 0x02u) * 2) | (ZONE_NORMAL << (0x08u | 0x04u) * 2) ) >> (bit * 2)) & + ((1 << 2) - 1); + do { (void)((( 1 << (0x01u | 0x02u) | 1 << (0x01u | 0x04u) | 1 << (0x04u | 0x02u) | 1 << (0x01u | 0x04u | 0x02u) | 1 << (0x08u | 0x02u | 0x01u) | 1 << (0x08u | 0x04u | 0x01u) | 1 << (0x08u | 0x04u | 0x02u) | 1 << (0x08u | 0x04u | 0x01u | 0x02u) ) >> bit) & 1); } while (0); + return z; +} +static inline __attribute__((always_inline)) int gfp_zonelist(gfp_t flags) +{ + if (__builtin_constant_p(((0 && (__builtin_constant_p(flags & (( gfp_t)0x40000u)) ? !!(flags & (( gfp_t)0x40000u)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/gfp.h", .line = 265, }; ______r = __builtin_expect(!!(flags & (( gfp_t)0x40000u)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!((0 && (__builtin_constant_p(flags & (( gfp_t)0x40000u)) ? !!(flags & (( gfp_t)0x40000u)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/gfp.h", .line = 265, }; ______r = __builtin_expect(!!(flags & (( gfp_t)0x40000u)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/gfp.h", .line = 265, }; ______r = !!((0 && (__builtin_constant_p(flags & (( gfp_t)0x40000u)) ? !!(flags & (( gfp_t)0x40000u)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/gfp.h", .line = 265, }; ______r = __builtin_expect(!!(flags & (( gfp_t)0x40000u)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + return 1; + return 0; +} +static inline __attribute__((always_inline)) struct zonelist *node_zonelist(int nid, gfp_t flags) +{ + return (&contig_page_data)->node_zonelists + gfp_zonelist(flags); +} +static inline __attribute__((always_inline)) void arch_free_page(struct page *page, int order) { } +static inline __attribute__((always_inline)) void arch_alloc_page(struct page *page, int order) { } +struct page * +__alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order, + struct zonelist *zonelist, nodemask_t *nodemask); +static inline __attribute__((always_inline)) struct page * +__alloc_pages(gfp_t gfp_mask, unsigned int order, + struct zonelist *zonelist) +{ + return __alloc_pages_nodemask(gfp_mask, order, zonelist, ((void *)0)); +} +static inline __attribute__((always_inline)) struct page *alloc_pages_node(int nid, gfp_t gfp_mask, + unsigned int order) +{ + if (__builtin_constant_p(((nid < 0))) ? !!((nid < 0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/gfp.h", .line = 307, }; ______r = !!((nid < 0)); ______f.miss_hit[______r]++; ______r; })) + nid = numa_node_id(); + return __alloc_pages(gfp_mask, order, node_zonelist(nid, gfp_mask)); +} +static inline __attribute__((always_inline)) struct page *alloc_pages_exact_node(int nid, gfp_t gfp_mask, + unsigned int order) +{ + do { (void)(nid < 0 || nid >= (1 << 0)); } while (0); + return __alloc_pages(gfp_mask, order, node_zonelist(nid, gfp_mask)); +} +extern unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order); +extern unsigned long get_zeroed_page(gfp_t gfp_mask); +void *alloc_pages_exact(size_t size, gfp_t gfp_mask); +void free_pages_exact(void *virt, size_t size); +void *alloc_pages_exact_nid(int nid, size_t size, gfp_t gfp_mask); +extern void __free_pages(struct page *page, unsigned int order); +extern void free_pages(unsigned long addr, unsigned int order); +extern void free_hot_cold_page(struct page *page, int cold); +void page_alloc_init(void); +void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp); +void drain_all_pages(void); +void drain_local_pages(void *dummy); +extern gfp_t gfp_allowed_mask; +extern void pm_restrict_gfp_mask(void); +extern void pm_restore_gfp_mask(void); +enum irqreturn { + IRQ_NONE = (0 << 0), + IRQ_HANDLED = (1 << 0), + IRQ_WAKE_THREAD = (1 << 1), +}; +typedef enum irqreturn irqreturn_t; +extern int nr_irqs; +extern struct irq_desc *irq_to_desc(unsigned int irq); +unsigned int irq_get_next_irq(unsigned int offset); +static inline __attribute__((always_inline)) int irq_canonicalize(int irq) +{ + return ((irq == 2) ? 9 : irq); +} +extern void irq_ctx_init(int cpu); +extern void fixup_irqs(void); +extern void irq_force_complete_move(int); +extern void (*x86_platform_ipi_callback)(void); +extern void native_init_IRQ(void); +extern bool handle_irq(unsigned irq, struct pt_regs *regs); +extern unsigned int do_IRQ(struct pt_regs *regs); +extern unsigned long used_vectors[(((256) + (8 * sizeof(long)) - 1) / (8 * sizeof(long)))]; +extern int vector_used_by_percpu_irq(unsigned int vector); +extern void init_ISA_irqs(void); +extern __attribute__((section(".data..percpu" ""))) __typeof__(struct pt_regs *) irq_regs; +static inline __attribute__((always_inline)) struct pt_regs *get_irq_regs(void) +{ + return ({ typeof(irq_regs) pfo_ret__; switch (sizeof(irq_regs)) { case 1: asm("mov" "b ""%%""fs"":" "%P" "1"",%0" : "=q" (pfo_ret__) : "m" (irq_regs)); break; case 2: asm("mov" "w ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m" (irq_regs)); break; case 4: asm("mov" "l ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m" (irq_regs)); break; case 8: asm("mov" "q ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m" (irq_regs)); break; default: __bad_percpu_size(); } pfo_ret__; }); +} +static inline __attribute__((always_inline)) struct pt_regs *set_irq_regs(struct pt_regs *new_regs) +{ + struct pt_regs *old_regs; + old_regs = get_irq_regs(); + do { typedef typeof(irq_regs) pto_T__; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/irq_regs.h", .line = 26, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pto_T__ pto_tmp__; pto_tmp__ = (new_regs); (void)pto_tmp__; } switch (sizeof(irq_regs)) { case 1: asm("mov" "b %1,""%%""fs"":" "%P" "0" : "+m" (irq_regs) : "qi" ((pto_T__)(new_regs))); break; case 2: asm("mov" "w %1,""%%""fs"":" "%P" "0" : "+m" (irq_regs) : "ri" ((pto_T__)(new_regs))); break; case 4: asm("mov" "l %1,""%%""fs"":" "%P" "0" : "+m" (irq_regs) : "ri" ((pto_T__)(new_regs))); break; case 8: asm("mov" "q %1,""%%""fs"":" "%P" "0" : "+m" (irq_regs) : "re" ((pto_T__)(new_regs))); break; default: __bad_percpu_size(); } } while (0); + return old_regs; +} +struct seq_file; +struct irq_desc; +struct irq_data; +typedef void (*irq_flow_handler_t)(unsigned int irq, + struct irq_desc *desc); +typedef void (*irq_preflow_handler_t)(struct irq_data *data); +enum { + IRQ_TYPE_NONE = 0x00000000, + IRQ_TYPE_EDGE_RISING = 0x00000001, + IRQ_TYPE_EDGE_FALLING = 0x00000002, + IRQ_TYPE_EDGE_BOTH = (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING), + IRQ_TYPE_LEVEL_HIGH = 0x00000004, + IRQ_TYPE_LEVEL_LOW = 0x00000008, + IRQ_TYPE_LEVEL_MASK = (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH), + IRQ_TYPE_SENSE_MASK = 0x0000000f, + IRQ_TYPE_PROBE = 0x00000010, + IRQ_LEVEL = (1 << 8), + IRQ_PER_CPU = (1 << 9), + IRQ_NOPROBE = (1 << 10), + IRQ_NOREQUEST = (1 << 11), + IRQ_NOAUTOEN = (1 << 12), + IRQ_NO_BALANCING = (1 << 13), + IRQ_MOVE_PCNTXT = (1 << 14), + IRQ_NESTED_THREAD = (1 << 15), + IRQ_NOTHREAD = (1 << 16), +}; +static inline __attribute__((always_inline)) __attribute__((deprecated)) bool CHECK_IRQ_PER_CPU(unsigned int status) +{ + return status & IRQ_PER_CPU; +} +enum { + IRQ_SET_MASK_OK = 0, + IRQ_SET_MASK_OK_NOCOPY, +}; +struct msi_desc; +struct irq_data { + unsigned int irq; + unsigned int node; + unsigned int state_use_accessors; + struct irq_chip *chip; + void *handler_data; + void *chip_data; + struct msi_desc *msi_desc; + cpumask_var_t affinity; +}; +enum { + IRQD_TRIGGER_MASK = 0xf, + IRQD_SETAFFINITY_PENDING = (1 << 8), + IRQD_NO_BALANCING = (1 << 10), + IRQD_PER_CPU = (1 << 11), + IRQD_AFFINITY_SET = (1 << 12), + IRQD_LEVEL = (1 << 13), + IRQD_WAKEUP_STATE = (1 << 14), + IRQD_MOVE_PCNTXT = (1 << 15), + IRQD_IRQ_DISABLED = (1 << 16), + IRQD_IRQ_MASKED = (1 << 17), + IRQD_IRQ_INPROGRESS = (1 << 18), +}; +static inline __attribute__((always_inline)) bool irqd_is_setaffinity_pending(struct irq_data *d) +{ + return d->state_use_accessors & IRQD_SETAFFINITY_PENDING; +} +static inline __attribute__((always_inline)) bool irqd_is_per_cpu(struct irq_data *d) +{ + return d->state_use_accessors & IRQD_PER_CPU; +} +static inline __attribute__((always_inline)) bool irqd_can_balance(struct irq_data *d) +{ + return !(d->state_use_accessors & (IRQD_PER_CPU | IRQD_NO_BALANCING)); +} +static inline __attribute__((always_inline)) bool irqd_affinity_was_set(struct irq_data *d) +{ + return d->state_use_accessors & IRQD_AFFINITY_SET; +} +static inline __attribute__((always_inline)) void irqd_mark_affinity_was_set(struct irq_data *d) +{ + d->state_use_accessors |= IRQD_AFFINITY_SET; +} +static inline __attribute__((always_inline)) u32 irqd_get_trigger_type(struct irq_data *d) +{ + return d->state_use_accessors & IRQD_TRIGGER_MASK; +} +static inline __attribute__((always_inline)) void irqd_set_trigger_type(struct irq_data *d, u32 type) +{ + d->state_use_accessors &= ~IRQD_TRIGGER_MASK; + d->state_use_accessors |= type & IRQD_TRIGGER_MASK; +} +static inline __attribute__((always_inline)) bool irqd_is_level_type(struct irq_data *d) +{ + return d->state_use_accessors & IRQD_LEVEL; +} +static inline __attribute__((always_inline)) bool irqd_is_wakeup_set(struct irq_data *d) +{ + return d->state_use_accessors & IRQD_WAKEUP_STATE; +} +static inline __attribute__((always_inline)) bool irqd_can_move_in_process_context(struct irq_data *d) +{ + return d->state_use_accessors & IRQD_MOVE_PCNTXT; +} +static inline __attribute__((always_inline)) bool irqd_irq_disabled(struct irq_data *d) +{ + return d->state_use_accessors & IRQD_IRQ_DISABLED; +} +static inline __attribute__((always_inline)) bool irqd_irq_masked(struct irq_data *d) +{ + return d->state_use_accessors & IRQD_IRQ_MASKED; +} +static inline __attribute__((always_inline)) bool irqd_irq_inprogress(struct irq_data *d) +{ + return d->state_use_accessors & IRQD_IRQ_INPROGRESS; +} +static inline __attribute__((always_inline)) void irqd_set_chained_irq_inprogress(struct irq_data *d) +{ + d->state_use_accessors |= IRQD_IRQ_INPROGRESS; +} +static inline __attribute__((always_inline)) void irqd_clr_chained_irq_inprogress(struct irq_data *d) +{ + d->state_use_accessors &= ~IRQD_IRQ_INPROGRESS; +} +struct irq_chip { + const char *name; + unsigned int (*irq_startup)(struct irq_data *data); + void (*irq_shutdown)(struct irq_data *data); + void (*irq_enable)(struct irq_data *data); + void (*irq_disable)(struct irq_data *data); + void (*irq_ack)(struct irq_data *data); + void (*irq_mask)(struct irq_data *data); + void (*irq_mask_ack)(struct irq_data *data); + void (*irq_unmask)(struct irq_data *data); + void (*irq_eoi)(struct irq_data *data); + int (*irq_set_affinity)(struct irq_data *data, const struct cpumask *dest, bool force); + int (*irq_retrigger)(struct irq_data *data); + int (*irq_set_type)(struct irq_data *data, unsigned int flow_type); + int (*irq_set_wake)(struct irq_data *data, unsigned int on); + void (*irq_bus_lock)(struct irq_data *data); + void (*irq_bus_sync_unlock)(struct irq_data *data); + void (*irq_cpu_online)(struct irq_data *data); + void (*irq_cpu_offline)(struct irq_data *data); + void (*irq_suspend)(struct irq_data *data); + void (*irq_resume)(struct irq_data *data); + void (*irq_pm_shutdown)(struct irq_data *data); + void (*irq_print_chip)(struct irq_data *data, struct seq_file *p); + unsigned long flags; +}; +enum { + IRQCHIP_SET_TYPE_MASKED = (1 << 0), + IRQCHIP_EOI_IF_HANDLED = (1 << 1), + IRQCHIP_MASK_ON_SUSPEND = (1 << 2), + IRQCHIP_ONOFFLINE_ENABLED = (1 << 3), +}; +struct irq_affinity_notify; +struct proc_dir_entry; +struct timer_rand_state; +struct irq_desc { + struct irq_data irq_data; + struct timer_rand_state *timer_rand_state; + unsigned int *kstat_irqs; + irq_flow_handler_t handle_irq; + struct irqaction *action; + unsigned int status_use_accessors; + unsigned int core_internal_state__do_not_mess_with_it; + unsigned int depth; + unsigned int wake_depth; + unsigned int irq_count; + unsigned long last_unhandled; + unsigned int irqs_unhandled; + raw_spinlock_t lock; + const struct cpumask *affinity_hint; + struct irq_affinity_notify *affinity_notify; + cpumask_var_t pending_mask; + unsigned long threads_oneshot; + atomic_t threads_active; + wait_queue_head_t wait_for_threads; + struct proc_dir_entry *dir; + const char *name; +} __attribute__((__aligned__(1 << (6)))); +extern struct irq_desc irq_desc[((32 * 8) < ( 32 * 64 ) ? (256 + (32 * 8)) : (256 + ( 32 * 64 )))]; +static inline __attribute__((always_inline)) struct irq_data *irq_desc_get_irq_data(struct irq_desc *desc) +{ + return &desc->irq_data; +} +static inline __attribute__((always_inline)) struct irq_chip *irq_desc_get_chip(struct irq_desc *desc) +{ + return desc->irq_data.chip; +} +static inline __attribute__((always_inline)) void *irq_desc_get_chip_data(struct irq_desc *desc) +{ + return desc->irq_data.chip_data; +} +static inline __attribute__((always_inline)) void *irq_desc_get_handler_data(struct irq_desc *desc) +{ + return desc->irq_data.handler_data; +} +static inline __attribute__((always_inline)) struct msi_desc *irq_desc_get_msi_desc(struct irq_desc *desc) +{ + return desc->irq_data.msi_desc; +} +static inline __attribute__((always_inline)) void generic_handle_irq_desc(unsigned int irq, struct irq_desc *desc) +{ + desc->handle_irq(irq, desc); +} +int generic_handle_irq(unsigned int irq); +static inline __attribute__((always_inline)) int irq_has_action(unsigned int irq) +{ + struct irq_desc *desc = irq_to_desc(irq); + return desc->action != ((void *)0); +} +static inline __attribute__((always_inline)) void __irq_set_handler_locked(unsigned int irq, + irq_flow_handler_t handler) +{ + struct irq_desc *desc; + desc = irq_to_desc(irq); + desc->handle_irq = handler; +} +static inline __attribute__((always_inline)) void +__irq_set_chip_handler_name_locked(unsigned int irq, struct irq_chip *chip, + irq_flow_handler_t handler, const char *name) +{ + struct irq_desc *desc; + desc = irq_to_desc(irq); + irq_desc_get_irq_data(desc)->chip = chip; + desc->handle_irq = handler; + desc->name = name; +} +static inline __attribute__((always_inline)) int irq_balancing_disabled(unsigned int irq) +{ + struct irq_desc *desc; + desc = irq_to_desc(irq); + return desc->status_use_accessors & (IRQ_PER_CPU | IRQ_NO_BALANCING); +} +static inline __attribute__((always_inline)) void +irq_set_lockdep_class(unsigned int irq, struct lock_class_key *class) +{ + struct irq_desc *desc = irq_to_desc(irq); + if (__builtin_constant_p(((desc))) ? !!((desc)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/irqdesc.h", .line = 159, }; ______r = !!((desc)); ______f.miss_hit[______r]++; ______r; })) + lockdep_init_map(&(&desc->lock)->dep_map, "class", class, 0); +} +struct proc_dir_entry; +struct pt_regs; +struct notifier_block; +void create_prof_cpu_mask(struct proc_dir_entry *de); +int create_proc_profile(void); +enum profile_type { + PROFILE_TASK_EXIT, + PROFILE_MUNMAP +}; +extern int prof_on __attribute__((__section__(".data..read_mostly"))); +int profile_init(void); +int profile_setup(char *str); +void profile_tick(int type); +void profile_hits(int type, void *ip, unsigned int nr_hits); +static inline __attribute__((always_inline)) void profile_hit(int type, void *ip) +{ + if (__builtin_constant_p((((__builtin_constant_p(prof_on == type) ? !!(prof_on == type) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/profile.h", .line = 61, }; ______r = __builtin_expect(!!(prof_on == type), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(prof_on == type) ? !!(prof_on == type) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/profile.h", .line = 61, }; ______r = __builtin_expect(!!(prof_on == type), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/profile.h", .line = 61, }; ______r = !!(((__builtin_constant_p(prof_on == type) ? !!(prof_on == type) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/profile.h", .line = 61, }; ______r = __builtin_expect(!!(prof_on == type), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + profile_hits(type, ip, 1); +} +struct task_struct; +struct mm_struct; +void profile_task_exit(struct task_struct * task); +int profile_handoff_task(struct task_struct * task); +void profile_munmap(unsigned long addr); +int task_handoff_register(struct notifier_block * n); +int task_handoff_unregister(struct notifier_block * n); +int profile_event_register(enum profile_type, struct notifier_block * n); +int profile_event_unregister(enum profile_type, struct notifier_block * n); +int register_timer_hook(int (*hook)(struct pt_regs *)); +void unregister_timer_hook(int (*hook)(struct pt_regs *)); +struct pt_regs; +extern char _text[], _stext[], _etext[]; +extern char _data[], _sdata[], _edata[]; +extern char __bss_start[], __bss_stop[]; +extern char __init_begin[], __init_end[]; +extern char _sinittext[], _einittext[]; +extern char _end[]; +extern char __per_cpu_load[], __per_cpu_start[], __per_cpu_end[]; +extern char __kprobes_text_start[], __kprobes_text_end[]; +extern char __entry_text_start[], __entry_text_end[]; +extern char __initdata_begin[], __initdata_end[]; +extern char __start_rodata[], __end_rodata[]; +extern char __ctors_start[], __ctors_end[]; +static inline __attribute__((always_inline)) int arch_is_kernel_text(unsigned long addr) +{ + return 0; +} +static inline __attribute__((always_inline)) int arch_is_kernel_data(unsigned long addr) +{ + return 0; +} +struct exception_table_entry { + unsigned long insn, fixup; +}; +extern int fixup_exception(struct pt_regs *regs); +extern int __get_user_1(void); +extern int __get_user_2(void); +extern int __get_user_4(void); +extern int __get_user_8(void); +extern int __get_user_bad(void); +extern void __put_user_bad(void); +extern void __put_user_1(void); +extern void __put_user_2(void); +extern void __put_user_4(void); +extern void __put_user_8(void); +struct __large_struct { unsigned long buf[100]; }; +extern struct movsl_mask { + int mask; +} __attribute__((__aligned__((1 << (6))))) movsl_mask; +unsigned long __attribute__((warn_unused_result)) __copy_to_user_ll + (void *to, const void *from, unsigned long n); +unsigned long __attribute__((warn_unused_result)) __copy_from_user_ll + (void *to, const void *from, unsigned long n); +unsigned long __attribute__((warn_unused_result)) __copy_from_user_ll_nozero + (void *to, const void *from, unsigned long n); +unsigned long __attribute__((warn_unused_result)) __copy_from_user_ll_nocache + (void *to, const void *from, unsigned long n); +unsigned long __attribute__((warn_unused_result)) __copy_from_user_ll_nocache_nozero + (void *to, const void *from, unsigned long n); +static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned long __attribute__((warn_unused_result)) +__copy_to_user_inatomic(void *to, const void *from, unsigned long n) +{ + if (__builtin_constant_p(((__builtin_constant_p(n)))) ? !!((__builtin_constant_p(n))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/uaccess_32.h", .line = 46, }; ______r = !!((__builtin_constant_p(n))); ______f.miss_hit[______r]++; ______r; })) { + unsigned long ret; + switch (n) { + case 1: + do { ret = 0; (void)0; switch (1) { case 1: asm volatile("1: mov""b"" %""b""1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r"(ret) : "iq"(*(u8 *)from), "m" ((*(struct __large_struct *)((u8 *)to))), "i" (1), "0" (ret)); break; case 2: asm volatile("1: mov""w"" %""w""1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r"(ret) : "ir"(*(u8 *)from), "m" ((*(struct __large_struct *)((u8 *)to))), "i" (1), "0" (ret)); break; case 4: asm volatile("1: mov""l"" %""k""1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r"(ret) : "ir"(*(u8 *)from), "m" ((*(struct __large_struct *)((u8 *)to))), "i" (1), "0" (ret)); break; case 8: asm volatile("1: movl %%eax,0(%2)\n" "2: movl %%edx,4(%2)\n" "3:\n" ".section .fixup,\"ax\"\n" "4: movl %3,%0\n" " jmp 3b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "4b" "\n" " .previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "2b" "," "4b" "\n" " .previous\n" : "=r" (ret) : "A" ((__typeof__(*(u8 *)to))(*(u8 *)from)), "r" ((u8 *)to), "i" (1), "0" (ret)); break; default: __put_user_bad(); } } while (0) + ; + return ret; + case 2: + do { ret = 0; (void)0; switch (2) { case 1: asm volatile("1: mov""b"" %""b""1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r"(ret) : "iq"(*(u16 *)from), "m" ((*(struct __large_struct *)((u16 *)to))), "i" (2), "0" (ret)); break; case 2: asm volatile("1: mov""w"" %""w""1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r"(ret) : "ir"(*(u16 *)from), "m" ((*(struct __large_struct *)((u16 *)to))), "i" (2), "0" (ret)); break; case 4: asm volatile("1: mov""l"" %""k""1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r"(ret) : "ir"(*(u16 *)from), "m" ((*(struct __large_struct *)((u16 *)to))), "i" (2), "0" (ret)); break; case 8: asm volatile("1: movl %%eax,0(%2)\n" "2: movl %%edx,4(%2)\n" "3:\n" ".section .fixup,\"ax\"\n" "4: movl %3,%0\n" " jmp 3b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "4b" "\n" " .previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "2b" "," "4b" "\n" " .previous\n" : "=r" (ret) : "A" ((__typeof__(*(u16 *)to))(*(u16 *)from)), "r" ((u16 *)to), "i" (2), "0" (ret)); break; default: __put_user_bad(); } } while (0) + ; + return ret; + case 4: + do { ret = 0; (void)0; switch (4) { case 1: asm volatile("1: mov""b"" %""b""1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r"(ret) : "iq"(*(u32 *)from), "m" ((*(struct __large_struct *)((u32 *)to))), "i" (4), "0" (ret)); break; case 2: asm volatile("1: mov""w"" %""w""1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r"(ret) : "ir"(*(u32 *)from), "m" ((*(struct __large_struct *)((u32 *)to))), "i" (4), "0" (ret)); break; case 4: asm volatile("1: mov""l"" %""k""1,%2\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r"(ret) : "ir"(*(u32 *)from), "m" ((*(struct __large_struct *)((u32 *)to))), "i" (4), "0" (ret)); break; case 8: asm volatile("1: movl %%eax,0(%2)\n" "2: movl %%edx,4(%2)\n" "3:\n" ".section .fixup,\"ax\"\n" "4: movl %3,%0\n" " jmp 3b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "4b" "\n" " .previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "2b" "," "4b" "\n" " .previous\n" : "=r" (ret) : "A" ((__typeof__(*(u32 *)to))(*(u32 *)from)), "r" ((u32 *)to), "i" (4), "0" (ret)); break; default: __put_user_bad(); } } while (0) + ; + return ret; + } + } + return __copy_to_user_ll(to, from, n); +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned long __attribute__((warn_unused_result)) +__copy_to_user(void *to, const void *from, unsigned long n) +{ + might_fault(); + return __copy_to_user_inatomic(to, from, n); +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned long +__copy_from_user_inatomic(void *to, const void *from, unsigned long n) +{ + if (__builtin_constant_p(((__builtin_constant_p(n)))) ? !!((__builtin_constant_p(n))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/uaccess_32.h", .line = 96, }; ______r = !!((__builtin_constant_p(n))); ______f.miss_hit[______r]++; ______r; })) { + unsigned long ret; + switch (n) { + case 1: + do { ret = 0; (void)0; switch (1) { case 1: asm volatile("1: mov""b"" %2,%""b""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""b"" %""b""1,%""b""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=q"(*(u8 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (1), "0" (ret)); break; case 2: asm volatile("1: mov""w"" %2,%""w""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""w"" %""w""1,%""w""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r"(*(u8 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (1), "0" (ret)); break; case 4: asm volatile("1: mov""l"" %2,%""k""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""l"" %""k""1,%""k""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r"(*(u8 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (1), "0" (ret)); break; case 8: (*(u8 *)to) = __get_user_bad(); break; default: (*(u8 *)to) = __get_user_bad(); } } while (0); + return ret; + case 2: + do { ret = 0; (void)0; switch (2) { case 1: asm volatile("1: mov""b"" %2,%""b""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""b"" %""b""1,%""b""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=q"(*(u16 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (2), "0" (ret)); break; case 2: asm volatile("1: mov""w"" %2,%""w""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""w"" %""w""1,%""w""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r"(*(u16 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (2), "0" (ret)); break; case 4: asm volatile("1: mov""l"" %2,%""k""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""l"" %""k""1,%""k""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r"(*(u16 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (2), "0" (ret)); break; case 8: (*(u16 *)to) = __get_user_bad(); break; default: (*(u16 *)to) = __get_user_bad(); } } while (0); + return ret; + case 4: + do { ret = 0; (void)0; switch (4) { case 1: asm volatile("1: mov""b"" %2,%""b""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""b"" %""b""1,%""b""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=q"(*(u32 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (4), "0" (ret)); break; case 2: asm volatile("1: mov""w"" %2,%""w""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""w"" %""w""1,%""w""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r"(*(u32 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (4), "0" (ret)); break; case 4: asm volatile("1: mov""l"" %2,%""k""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""l"" %""k""1,%""k""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r"(*(u32 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (4), "0" (ret)); break; case 8: (*(u32 *)to) = __get_user_bad(); break; default: (*(u32 *)to) = __get_user_bad(); } } while (0); + return ret; + } + } + return __copy_from_user_ll_nozero(to, from, n); +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned long +__copy_from_user(void *to, const void *from, unsigned long n) +{ + might_fault(); + if (__builtin_constant_p(((__builtin_constant_p(n)))) ? !!((__builtin_constant_p(n))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/uaccess_32.h", .line = 140, }; ______r = !!((__builtin_constant_p(n))); ______f.miss_hit[______r]++; ______r; })) { + unsigned long ret; + switch (n) { + case 1: + do { ret = 0; (void)0; switch (1) { case 1: asm volatile("1: mov""b"" %2,%""b""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""b"" %""b""1,%""b""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=q"(*(u8 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (1), "0" (ret)); break; case 2: asm volatile("1: mov""w"" %2,%""w""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""w"" %""w""1,%""w""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r"(*(u8 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (1), "0" (ret)); break; case 4: asm volatile("1: mov""l"" %2,%""k""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""l"" %""k""1,%""k""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r"(*(u8 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (1), "0" (ret)); break; case 8: (*(u8 *)to) = __get_user_bad(); break; default: (*(u8 *)to) = __get_user_bad(); } } while (0); + return ret; + case 2: + do { ret = 0; (void)0; switch (2) { case 1: asm volatile("1: mov""b"" %2,%""b""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""b"" %""b""1,%""b""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=q"(*(u16 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (2), "0" (ret)); break; case 2: asm volatile("1: mov""w"" %2,%""w""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""w"" %""w""1,%""w""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r"(*(u16 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (2), "0" (ret)); break; case 4: asm volatile("1: mov""l"" %2,%""k""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""l"" %""k""1,%""k""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r"(*(u16 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (2), "0" (ret)); break; case 8: (*(u16 *)to) = __get_user_bad(); break; default: (*(u16 *)to) = __get_user_bad(); } } while (0); + return ret; + case 4: + do { ret = 0; (void)0; switch (4) { case 1: asm volatile("1: mov""b"" %2,%""b""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""b"" %""b""1,%""b""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=q"(*(u32 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (4), "0" (ret)); break; case 2: asm volatile("1: mov""w"" %2,%""w""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""w"" %""w""1,%""w""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r"(*(u32 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (4), "0" (ret)); break; case 4: asm volatile("1: mov""l"" %2,%""k""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""l"" %""k""1,%""k""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r"(*(u32 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (4), "0" (ret)); break; case 8: (*(u32 *)to) = __get_user_bad(); break; default: (*(u32 *)to) = __get_user_bad(); } } while (0); + return ret; + } + } + return __copy_from_user_ll(to, from, n); +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned long __copy_from_user_nocache(void *to, + const void *from, unsigned long n) +{ + might_fault(); + if (__builtin_constant_p(((__builtin_constant_p(n)))) ? !!((__builtin_constant_p(n))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/uaccess_32.h", .line = 162, }; ______r = !!((__builtin_constant_p(n))); ______f.miss_hit[______r]++; ______r; })) { + unsigned long ret; + switch (n) { + case 1: + do { ret = 0; (void)0; switch (1) { case 1: asm volatile("1: mov""b"" %2,%""b""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""b"" %""b""1,%""b""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=q"(*(u8 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (1), "0" (ret)); break; case 2: asm volatile("1: mov""w"" %2,%""w""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""w"" %""w""1,%""w""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r"(*(u8 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (1), "0" (ret)); break; case 4: asm volatile("1: mov""l"" %2,%""k""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""l"" %""k""1,%""k""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r"(*(u8 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (1), "0" (ret)); break; case 8: (*(u8 *)to) = __get_user_bad(); break; default: (*(u8 *)to) = __get_user_bad(); } } while (0); + return ret; + case 2: + do { ret = 0; (void)0; switch (2) { case 1: asm volatile("1: mov""b"" %2,%""b""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""b"" %""b""1,%""b""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=q"(*(u16 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (2), "0" (ret)); break; case 2: asm volatile("1: mov""w"" %2,%""w""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""w"" %""w""1,%""w""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r"(*(u16 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (2), "0" (ret)); break; case 4: asm volatile("1: mov""l"" %2,%""k""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""l"" %""k""1,%""k""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r"(*(u16 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (2), "0" (ret)); break; case 8: (*(u16 *)to) = __get_user_bad(); break; default: (*(u16 *)to) = __get_user_bad(); } } while (0); + return ret; + case 4: + do { ret = 0; (void)0; switch (4) { case 1: asm volatile("1: mov""b"" %2,%""b""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""b"" %""b""1,%""b""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=q"(*(u32 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (4), "0" (ret)); break; case 2: asm volatile("1: mov""w"" %2,%""w""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""w"" %""w""1,%""w""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r"(*(u32 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (4), "0" (ret)); break; case 4: asm volatile("1: mov""l"" %2,%""k""1\n" "2:\n" ".section .fixup,\"ax\"\n" "3: mov %3,%0\n" " xor""l"" %""k""1,%""k""1\n" " jmp 2b\n" ".previous\n" " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" : "=r" (ret), "=r"(*(u32 *)to) : "m" ((*(struct __large_struct *)(from))), "i" (4), "0" (ret)); break; case 8: (*(u32 *)to) = __get_user_bad(); break; default: (*(u32 *)to) = __get_user_bad(); } } while (0); + return ret; + } + } + return __copy_from_user_ll_nocache(to, from, n); +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) unsigned long +__copy_from_user_inatomic_nocache(void *to, const void *from, + unsigned long n) +{ + return __copy_from_user_ll_nocache_nozero(to, from, n); +} +unsigned long __attribute__((warn_unused_result)) copy_to_user(void *to, + const void *from, unsigned long n); +unsigned long __attribute__((warn_unused_result)) _copy_from_user(void *to, + const void *from, + unsigned long n); +extern void copy_from_user_overflow(void) + __attribute__((warning("copy_from_user() buffer size is not provably correct"))) +; +static inline __attribute__((always_inline)) unsigned long __attribute__((warn_unused_result)) copy_from_user(void *to, + const void *from, + unsigned long n) +{ + int sz = __builtin_object_size(to, 0); + if (__builtin_constant_p((((__builtin_constant_p(sz == -1 || sz >= n) ? !!(sz == -1 || sz >= n) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/uaccess_32.h", .line = 208, }; ______r = __builtin_expect(!!(sz == -1 || sz >= n), 1); ftrace_likely_update(&______f, ______r, 1); ______r; }))))) ? !!(((__builtin_constant_p(sz == -1 || sz >= n) ? !!(sz == -1 || sz >= n) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/uaccess_32.h", .line = 208, }; ______r = __builtin_expect(!!(sz == -1 || sz >= n), 1); ftrace_likely_update(&______f, ______r, 1); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/uaccess_32.h", .line = 208, }; ______r = !!(((__builtin_constant_p(sz == -1 || sz >= n) ? !!(sz == -1 || sz >= n) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/uaccess_32.h", .line = 208, }; ______r = __builtin_expect(!!(sz == -1 || sz >= n), 1); ftrace_likely_update(&______f, ______r, 1); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + n = _copy_from_user(to, from, n); + else + copy_from_user_overflow(); + return n; +} +long __attribute__((warn_unused_result)) strncpy_from_user(char *dst, const char *src, + long count); +long __attribute__((warn_unused_result)) __strncpy_from_user(char *dst, + const char *src, long count); +long strnlen_user(const char *str, long n); +unsigned long __attribute__((warn_unused_result)) clear_user(void *mem, unsigned long len); +unsigned long __attribute__((warn_unused_result)) __clear_user(void *mem, unsigned long len); +extern char __brk_base[], __brk_limit[]; +extern struct exception_table_entry __stop___ex_table[]; +extern void apic_timer_interrupt(void); +extern void x86_platform_ipi(void); +extern void error_interrupt(void); +extern void irq_work_interrupt(void); +extern void spurious_interrupt(void); +extern void thermal_interrupt(void); +extern void reschedule_interrupt(void); +extern void mce_self_interrupt(void); +extern void invalidate_interrupt(void); +extern void invalidate_interrupt0(void); +extern void invalidate_interrupt1(void); +extern void invalidate_interrupt2(void); +extern void invalidate_interrupt3(void); +extern void invalidate_interrupt4(void); +extern void invalidate_interrupt5(void); +extern void invalidate_interrupt6(void); +extern void invalidate_interrupt7(void); +extern void invalidate_interrupt8(void); +extern void invalidate_interrupt9(void); +extern void invalidate_interrupt10(void); +extern void invalidate_interrupt11(void); +extern void invalidate_interrupt12(void); +extern void invalidate_interrupt13(void); +extern void invalidate_interrupt14(void); +extern void invalidate_interrupt15(void); +extern void invalidate_interrupt16(void); +extern void invalidate_interrupt17(void); +extern void invalidate_interrupt18(void); +extern void invalidate_interrupt19(void); +extern void invalidate_interrupt20(void); +extern void invalidate_interrupt21(void); +extern void invalidate_interrupt22(void); +extern void invalidate_interrupt23(void); +extern void invalidate_interrupt24(void); +extern void invalidate_interrupt25(void); +extern void invalidate_interrupt26(void); +extern void invalidate_interrupt27(void); +extern void invalidate_interrupt28(void); +extern void invalidate_interrupt29(void); +extern void invalidate_interrupt30(void); +extern void invalidate_interrupt31(void); +extern void irq_move_cleanup_interrupt(void); +extern void reboot_interrupt(void); +extern void threshold_interrupt(void); +extern void call_function_interrupt(void); +extern void call_function_single_interrupt(void); +extern unsigned long io_apic_irqs; +extern void init_VISWS_APIC_irqs(void); +extern void setup_IO_APIC(void); +extern void disable_IO_APIC(void); +struct io_apic_irq_attr { + int ioapic; + int ioapic_pin; + int trigger; + int polarity; +}; +static inline __attribute__((always_inline)) void set_io_apic_irq_attr(struct io_apic_irq_attr *irq_attr, + int ioapic, int ioapic_pin, + int trigger, int polarity) +{ + irq_attr->ioapic = ioapic; + irq_attr->ioapic_pin = ioapic_pin; + irq_attr->trigger = trigger; + irq_attr->polarity = polarity; +} +struct irq_2_iommu { + struct intel_iommu *iommu; + u16 irte_index; + u16 sub_handle; + u8 irte_mask; +}; +struct irq_cfg { + struct irq_pin_list *irq_2_pin; + cpumask_var_t domain; + cpumask_var_t old_domain; + u8 vector; + u8 move_in_progress : 1; +}; +extern int assign_irq_vector(int, struct irq_cfg *, const struct cpumask *); +extern void send_cleanup_vector(struct irq_cfg *); +struct irq_data; +int __ioapic_set_affinity(struct irq_data *, const struct cpumask *, + unsigned int *dest_id); +extern int IO_APIC_get_PCI_irq_vector(int bus, int devfn, int pin, struct io_apic_irq_attr *irq_attr); +extern void setup_ioapic_dest(void); +extern void enable_IO_APIC(void); +extern atomic_t irq_err_count; +extern atomic_t irq_mis_count; +extern void eisa_set_level_irq(unsigned int irq); +extern void smp_apic_timer_interrupt(struct pt_regs *); +extern void smp_spurious_interrupt(struct pt_regs *); +extern void smp_x86_platform_ipi(struct pt_regs *); +extern void smp_error_interrupt(struct pt_regs *); +extern __attribute__((regparm(0))) void smp_irq_move_cleanup_interrupt(void); +extern void smp_reschedule_interrupt(struct pt_regs *); +extern void smp_call_function_interrupt(struct pt_regs *); +extern void smp_call_function_single_interrupt(struct pt_regs *); +extern void smp_invalidate_interrupt(struct pt_regs *); +extern void (*__attribute__ ((__section__(".init.rodata"))) interrupt[256 -0x20])(void); +typedef int vector_irq_t[256]; +extern __attribute__((section(".data..percpu" ""))) __typeof__(vector_irq_t) vector_irq; +extern void setup_vector_irq(int cpu); +extern void lock_vector_lock(void); +extern void unlock_vector_lock(void); +extern void __setup_vector_irq(int cpu); +struct irqaction; +extern int setup_irq(unsigned int irq, struct irqaction *new); +extern void remove_irq(unsigned int irq, struct irqaction *act); +extern void irq_cpu_online(void); +extern void irq_cpu_offline(void); +extern int __irq_set_affinity_locked(struct irq_data *data, const struct cpumask *cpumask); +void irq_move_irq(struct irq_data *data); +void irq_move_masked_irq(struct irq_data *data); +extern int no_irq_affinity; +extern void handle_level_irq(unsigned int irq, struct irq_desc *desc); +extern void handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc); +extern void handle_edge_irq(unsigned int irq, struct irq_desc *desc); +extern void handle_edge_eoi_irq(unsigned int irq, struct irq_desc *desc); +extern void handle_simple_irq(unsigned int irq, struct irq_desc *desc); +extern void handle_percpu_irq(unsigned int irq, struct irq_desc *desc); +extern void handle_bad_irq(unsigned int irq, struct irq_desc *desc); +extern void handle_nested_irq(unsigned int irq); +extern void note_interrupt(unsigned int irq, struct irq_desc *desc, + irqreturn_t action_ret); +extern int noirqdebug_setup(char *str); +extern int can_request_irq(unsigned int irq, unsigned long irqflags); +extern struct irq_chip no_irq_chip; +extern struct irq_chip dummy_irq_chip; +extern void +irq_set_chip_and_handler_name(unsigned int irq, struct irq_chip *chip, + irq_flow_handler_t handle, const char *name); +static inline __attribute__((always_inline)) void irq_set_chip_and_handler(unsigned int irq, struct irq_chip *chip, + irq_flow_handler_t handle) +{ + irq_set_chip_and_handler_name(irq, chip, handle, ((void *)0)); +} +extern void +__irq_set_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, + const char *name); +static inline __attribute__((always_inline)) void +irq_set_handler(unsigned int irq, irq_flow_handler_t handle) +{ + __irq_set_handler(irq, handle, 0, ((void *)0)); +} +static inline __attribute__((always_inline)) void +irq_set_chained_handler(unsigned int irq, irq_flow_handler_t handle) +{ + __irq_set_handler(irq, handle, 1, ((void *)0)); +} +void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set); +static inline __attribute__((always_inline)) void irq_set_status_flags(unsigned int irq, unsigned long set) +{ + irq_modify_status(irq, 0, set); +} +static inline __attribute__((always_inline)) void irq_clear_status_flags(unsigned int irq, unsigned long clr) +{ + irq_modify_status(irq, clr, 0); +} +static inline __attribute__((always_inline)) void irq_set_noprobe(unsigned int irq) +{ + irq_modify_status(irq, 0, IRQ_NOPROBE); +} +static inline __attribute__((always_inline)) void irq_set_probe(unsigned int irq) +{ + irq_modify_status(irq, IRQ_NOPROBE, 0); +} +static inline __attribute__((always_inline)) void irq_set_nothread(unsigned int irq) +{ + irq_modify_status(irq, 0, IRQ_NOTHREAD); +} +static inline __attribute__((always_inline)) void irq_set_thread(unsigned int irq) +{ + irq_modify_status(irq, IRQ_NOTHREAD, 0); +} +static inline __attribute__((always_inline)) void irq_set_nested_thread(unsigned int irq, bool nest) +{ + if (__builtin_constant_p(((nest))) ? !!((nest)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/irq.h", .line = 476, }; ______r = !!((nest)); ______f.miss_hit[______r]++; ______r; })) + irq_set_status_flags(irq, IRQ_NESTED_THREAD); + else + irq_clear_status_flags(irq, IRQ_NESTED_THREAD); +} +extern unsigned int create_irq_nr(unsigned int irq_want, int node); +extern int create_irq(void); +extern void destroy_irq(unsigned int irq); +extern void dynamic_irq_cleanup(unsigned int irq); +static inline __attribute__((always_inline)) void dynamic_irq_init(unsigned int irq) +{ + dynamic_irq_cleanup(irq); +} +extern int irq_set_chip(unsigned int irq, struct irq_chip *chip); +extern int irq_set_handler_data(unsigned int irq, void *data); +extern int irq_set_chip_data(unsigned int irq, void *data); +extern int irq_set_irq_type(unsigned int irq, unsigned int type); +extern int irq_set_msi_desc(unsigned int irq, struct msi_desc *entry); +extern struct irq_data *irq_get_irq_data(unsigned int irq); +static inline __attribute__((always_inline)) struct irq_chip *irq_get_chip(unsigned int irq) +{ + struct irq_data *d = irq_get_irq_data(irq); + return d ? d->chip : ((void *)0); +} +static inline __attribute__((always_inline)) struct irq_chip *irq_data_get_irq_chip(struct irq_data *d) +{ + return d->chip; +} +static inline __attribute__((always_inline)) void *irq_get_chip_data(unsigned int irq) +{ + struct irq_data *d = irq_get_irq_data(irq); + return d ? d->chip_data : ((void *)0); +} +static inline __attribute__((always_inline)) void *irq_data_get_irq_chip_data(struct irq_data *d) +{ + return d->chip_data; +} +static inline __attribute__((always_inline)) void *irq_get_handler_data(unsigned int irq) +{ + struct irq_data *d = irq_get_irq_data(irq); + return d ? d->handler_data : ((void *)0); +} +static inline __attribute__((always_inline)) void *irq_data_get_irq_handler_data(struct irq_data *d) +{ + return d->handler_data; +} +static inline __attribute__((always_inline)) struct msi_desc *irq_get_msi_desc(unsigned int irq) +{ + struct irq_data *d = irq_get_irq_data(irq); + return d ? d->msi_desc : ((void *)0); +} +static inline __attribute__((always_inline)) struct msi_desc *irq_data_get_msi(struct irq_data *d) +{ + return d->msi_desc; +} +int irq_alloc_descs(int irq, unsigned int from, unsigned int cnt, int node); +void irq_free_descs(unsigned int irq, unsigned int cnt); +int irq_reserve_irqs(unsigned int from, unsigned int cnt); +static inline __attribute__((always_inline)) int irq_alloc_desc(int node) +{ + return irq_alloc_descs(-1, 0, 1, node); +} +static inline __attribute__((always_inline)) int irq_alloc_desc_at(unsigned int at, int node) +{ + return irq_alloc_descs(at, at, 1, node); +} +static inline __attribute__((always_inline)) int irq_alloc_desc_from(unsigned int from, int node) +{ + return irq_alloc_descs(-1, from, 1, node); +} +static inline __attribute__((always_inline)) void irq_free_desc(unsigned int irq) +{ + irq_free_descs(irq, 1); +} +static inline __attribute__((always_inline)) int irq_reserve_irq(unsigned int irq) +{ + return irq_reserve_irqs(irq, 1); +} +struct irq_chip_regs { + unsigned long enable; + unsigned long disable; + unsigned long mask; + unsigned long ack; + unsigned long eoi; + unsigned long type; + unsigned long polarity; +}; +struct irq_chip_type { + struct irq_chip chip; + struct irq_chip_regs regs; + irq_flow_handler_t handler; + u32 type; +}; +struct irq_chip_generic { + raw_spinlock_t lock; + void *reg_base; + unsigned int irq_base; + unsigned int irq_cnt; + u32 mask_cache; + u32 type_cache; + u32 polarity_cache; + u32 wake_enabled; + u32 wake_active; + unsigned int num_ct; + void *private; + struct list_head list; + struct irq_chip_type chip_types[0]; +}; +enum irq_gc_flags { + IRQ_GC_INIT_MASK_CACHE = 1 << 0, + IRQ_GC_INIT_NESTED_LOCK = 1 << 1, +}; +void irq_gc_noop(struct irq_data *d); +void irq_gc_mask_disable_reg(struct irq_data *d); +void irq_gc_mask_set_bit(struct irq_data *d); +void irq_gc_mask_clr_bit(struct irq_data *d); +void irq_gc_unmask_enable_reg(struct irq_data *d); +void irq_gc_ack_set_bit(struct irq_data *d); +void irq_gc_ack_clr_bit(struct irq_data *d); +void irq_gc_mask_disable_reg_and_ack(struct irq_data *d); +void irq_gc_eoi(struct irq_data *d); +int irq_gc_set_wake(struct irq_data *d, unsigned int on); +struct irq_chip_generic * +irq_alloc_generic_chip(const char *name, int nr_ct, unsigned int irq_base, + void *reg_base, irq_flow_handler_t handler); +void irq_setup_generic_chip(struct irq_chip_generic *gc, u32 msk, + enum irq_gc_flags flags, unsigned int clr, + unsigned int set); +int irq_setup_alt_chip(struct irq_data *d, unsigned int type); +void irq_remove_generic_chip(struct irq_chip_generic *gc, u32 msk, + unsigned int clr, unsigned int set); +static inline __attribute__((always_inline)) struct irq_chip_type *irq_data_get_chip_type(struct irq_data *d) +{ + return ({ const typeof( ((struct irq_chip_type *)0)->chip ) *__mptr = (d->chip); (struct irq_chip_type *)( (char *)__mptr - __builtin_offsetof(struct irq_chip_type,chip) );}); +} +static inline __attribute__((always_inline)) void irq_gc_lock(struct irq_chip_generic *gc) +{ + _raw_spin_lock(&gc->lock); +} +static inline __attribute__((always_inline)) void irq_gc_unlock(struct irq_chip_generic *gc) +{ + _raw_spin_unlock(&gc->lock); +} +typedef struct { + unsigned int __softirq_pending; + unsigned int __nmi_count; + unsigned int irq0_irqs; + unsigned int apic_timer_irqs; + unsigned int irq_spurious_count; + unsigned int x86_platform_ipis; + unsigned int apic_perf_irqs; + unsigned int apic_irq_work_irqs; + unsigned int irq_resched_count; + unsigned int irq_call_count; + unsigned int irq_tlb_count; + unsigned int irq_thermal_count; + unsigned int irq_threshold_count; +} __attribute__((__aligned__((1 << (6))))) irq_cpustat_t; +extern __attribute__((section(".data..percpu" ""))) __typeof__(irq_cpustat_t) irq_stat __attribute__((__aligned__((1 << (6))))); +extern void ack_bad_irq(unsigned int irq); +extern u64 arch_irq_stat_cpu(unsigned int cpu); +extern u64 arch_irq_stat(void); +extern void synchronize_irq(unsigned int irq); +struct task_struct; +extern void account_system_vtime(struct task_struct *tsk); +extern void irq_enter(void); +extern void irq_exit(void); +struct stat { + unsigned long st_dev; + unsigned long st_ino; + unsigned short st_mode; + unsigned short st_nlink; + unsigned short st_uid; + unsigned short st_gid; + unsigned long st_rdev; + unsigned long st_size; + unsigned long st_blksize; + unsigned long st_blocks; + unsigned long st_atime; + unsigned long st_atime_nsec; + unsigned long st_mtime; + unsigned long st_mtime_nsec; + unsigned long st_ctime; + unsigned long st_ctime_nsec; + unsigned long __unused4; + unsigned long __unused5; +}; +struct stat64 { + unsigned long long st_dev; + unsigned char __pad0[4]; + unsigned long __st_ino; + unsigned int st_mode; + unsigned int st_nlink; + unsigned long st_uid; + unsigned long st_gid; + unsigned long long st_rdev; + unsigned char __pad3[4]; + long long st_size; + unsigned long st_blksize; + unsigned long long st_blocks; + unsigned long st_atime; + unsigned long st_atime_nsec; + unsigned long st_mtime; + unsigned int st_mtime_nsec; + unsigned long st_ctime; + unsigned long st_ctime_nsec; + unsigned long long st_ino; +}; +struct __old_kernel_stat { + unsigned short st_dev; + unsigned short st_ino; + unsigned short st_mode; + unsigned short st_nlink; + unsigned short st_uid; + unsigned short st_gid; + unsigned short st_rdev; + unsigned long st_size; + unsigned long st_atime; + unsigned long st_mtime; + unsigned long st_ctime; +}; +struct kstat { + u64 ino; + dev_t dev; + umode_t mode; + unsigned int nlink; + uid_t uid; + gid_t gid; + dev_t rdev; + loff_t size; + struct timespec atime; + struct timespec mtime; + struct timespec ctime; + unsigned long blksize; + unsigned long long blocks; +}; +struct completion; +struct __sysctl_args { + int *name; + int nlen; + void *oldval; + size_t *oldlenp; + void *newval; + size_t newlen; + unsigned long __unused[4]; +}; +enum +{ + CTL_KERN=1, + CTL_VM=2, + CTL_NET=3, + CTL_PROC=4, + CTL_FS=5, + CTL_DEBUG=6, + CTL_DEV=7, + CTL_BUS=8, + CTL_ABI=9, + CTL_CPU=10, + CTL_ARLAN=254, + CTL_S390DBF=5677, + CTL_SUNRPC=7249, + CTL_PM=9899, + CTL_FRV=9898, +}; +enum +{ + CTL_BUS_ISA=1 +}; +enum +{ + INOTIFY_MAX_USER_INSTANCES=1, + INOTIFY_MAX_USER_WATCHES=2, + INOTIFY_MAX_QUEUED_EVENTS=3 +}; +enum +{ + KERN_OSTYPE=1, + KERN_OSRELEASE=2, + KERN_OSREV=3, + KERN_VERSION=4, + KERN_SECUREMASK=5, + KERN_PROF=6, + KERN_NODENAME=7, + KERN_DOMAINNAME=8, + KERN_PANIC=15, + KERN_REALROOTDEV=16, + KERN_SPARC_REBOOT=21, + KERN_CTLALTDEL=22, + KERN_PRINTK=23, + KERN_NAMETRANS=24, + KERN_PPC_HTABRECLAIM=25, + KERN_PPC_ZEROPAGED=26, + KERN_PPC_POWERSAVE_NAP=27, + KERN_MODPROBE=28, + KERN_SG_BIG_BUFF=29, + KERN_ACCT=30, + KERN_PPC_L2CR=31, + KERN_RTSIGNR=32, + KERN_RTSIGMAX=33, + KERN_SHMMAX=34, + KERN_MSGMAX=35, + KERN_MSGMNB=36, + KERN_MSGPOOL=37, + KERN_SYSRQ=38, + KERN_MAX_THREADS=39, + KERN_RANDOM=40, + KERN_SHMALL=41, + KERN_MSGMNI=42, + KERN_SEM=43, + KERN_SPARC_STOP_A=44, + KERN_SHMMNI=45, + KERN_OVERFLOWUID=46, + KERN_OVERFLOWGID=47, + KERN_SHMPATH=48, + KERN_HOTPLUG=49, + KERN_IEEE_EMULATION_WARNINGS=50, + KERN_S390_USER_DEBUG_LOGGING=51, + KERN_CORE_USES_PID=52, + KERN_TAINTED=53, + KERN_CADPID=54, + KERN_PIDMAX=55, + KERN_CORE_PATTERN=56, + KERN_PANIC_ON_OOPS=57, + KERN_HPPA_PWRSW=58, + KERN_HPPA_UNALIGNED=59, + KERN_PRINTK_RATELIMIT=60, + KERN_PRINTK_RATELIMIT_BURST=61, + KERN_PTY=62, + KERN_NGROUPS_MAX=63, + KERN_SPARC_SCONS_PWROFF=64, + KERN_HZ_TIMER=65, + KERN_UNKNOWN_NMI_PANIC=66, + KERN_BOOTLOADER_TYPE=67, + KERN_RANDOMIZE=68, + KERN_SETUID_DUMPABLE=69, + KERN_SPIN_RETRY=70, + KERN_ACPI_VIDEO_FLAGS=71, + KERN_IA64_UNALIGNED=72, + KERN_COMPAT_LOG=73, + KERN_MAX_LOCK_DEPTH=74, + KERN_NMI_WATCHDOG=75, + KERN_PANIC_ON_NMI=76, +}; +enum +{ + VM_UNUSED1=1, + VM_UNUSED2=2, + VM_UNUSED3=3, + VM_UNUSED4=4, + VM_OVERCOMMIT_MEMORY=5, + VM_UNUSED5=6, + VM_UNUSED7=7, + VM_UNUSED8=8, + VM_UNUSED9=9, + VM_PAGE_CLUSTER=10, + VM_DIRTY_BACKGROUND=11, + VM_DIRTY_RATIO=12, + VM_DIRTY_WB_CS=13, + VM_DIRTY_EXPIRE_CS=14, + VM_NR_PDFLUSH_THREADS=15, + VM_OVERCOMMIT_RATIO=16, + VM_PAGEBUF=17, + VM_HUGETLB_PAGES=18, + VM_SWAPPINESS=19, + VM_LOWMEM_RESERVE_RATIO=20, + VM_MIN_FREE_KBYTES=21, + VM_MAX_MAP_COUNT=22, + VM_LAPTOP_MODE=23, + VM_BLOCK_DUMP=24, + VM_HUGETLB_GROUP=25, + VM_VFS_CACHE_PRESSURE=26, + VM_LEGACY_VA_LAYOUT=27, + VM_SWAP_TOKEN_TIMEOUT=28, + VM_DROP_PAGECACHE=29, + VM_PERCPU_PAGELIST_FRACTION=30, + VM_ZONE_RECLAIM_MODE=31, + VM_MIN_UNMAPPED=32, + VM_PANIC_ON_OOM=33, + VM_VDSO_ENABLED=34, + VM_MIN_SLAB=35, +}; +enum +{ + NET_CORE=1, + NET_ETHER=2, + NET_802=3, + NET_UNIX=4, + NET_IPV4=5, + NET_IPX=6, + NET_ATALK=7, + NET_NETROM=8, + NET_AX25=9, + NET_BRIDGE=10, + NET_ROSE=11, + NET_IPV6=12, + NET_X25=13, + NET_TR=14, + NET_DECNET=15, + NET_ECONET=16, + NET_SCTP=17, + NET_LLC=18, + NET_NETFILTER=19, + NET_DCCP=20, + NET_IRDA=412, +}; +enum +{ + RANDOM_POOLSIZE=1, + RANDOM_ENTROPY_COUNT=2, + RANDOM_READ_THRESH=3, + RANDOM_WRITE_THRESH=4, + RANDOM_BOOT_ID=5, + RANDOM_UUID=6 +}; +enum +{ + PTY_MAX=1, + PTY_NR=2 +}; +enum +{ + BUS_ISA_MEM_BASE=1, + BUS_ISA_PORT_BASE=2, + BUS_ISA_PORT_SHIFT=3 +}; +enum +{ + NET_CORE_WMEM_MAX=1, + NET_CORE_RMEM_MAX=2, + NET_CORE_WMEM_DEFAULT=3, + NET_CORE_RMEM_DEFAULT=4, + NET_CORE_MAX_BACKLOG=6, + NET_CORE_FASTROUTE=7, + NET_CORE_MSG_COST=8, + NET_CORE_MSG_BURST=9, + NET_CORE_OPTMEM_MAX=10, + NET_CORE_HOT_LIST_LENGTH=11, + NET_CORE_DIVERT_VERSION=12, + NET_CORE_NO_CONG_THRESH=13, + NET_CORE_NO_CONG=14, + NET_CORE_LO_CONG=15, + NET_CORE_MOD_CONG=16, + NET_CORE_DEV_WEIGHT=17, + NET_CORE_SOMAXCONN=18, + NET_CORE_BUDGET=19, + NET_CORE_AEVENT_ETIME=20, + NET_CORE_AEVENT_RSEQTH=21, + NET_CORE_WARNINGS=22, +}; +enum +{ + NET_UNIX_DESTROY_DELAY=1, + NET_UNIX_DELETE_DELAY=2, + NET_UNIX_MAX_DGRAM_QLEN=3, +}; +enum +{ + NET_NF_CONNTRACK_MAX=1, + NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT=2, + NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_RECV=3, + NET_NF_CONNTRACK_TCP_TIMEOUT_ESTABLISHED=4, + NET_NF_CONNTRACK_TCP_TIMEOUT_FIN_WAIT=5, + NET_NF_CONNTRACK_TCP_TIMEOUT_CLOSE_WAIT=6, + NET_NF_CONNTRACK_TCP_TIMEOUT_LAST_ACK=7, + NET_NF_CONNTRACK_TCP_TIMEOUT_TIME_WAIT=8, + NET_NF_CONNTRACK_TCP_TIMEOUT_CLOSE=9, + NET_NF_CONNTRACK_UDP_TIMEOUT=10, + NET_NF_CONNTRACK_UDP_TIMEOUT_STREAM=11, + NET_NF_CONNTRACK_ICMP_TIMEOUT=12, + NET_NF_CONNTRACK_GENERIC_TIMEOUT=13, + NET_NF_CONNTRACK_BUCKETS=14, + NET_NF_CONNTRACK_LOG_INVALID=15, + NET_NF_CONNTRACK_TCP_TIMEOUT_MAX_RETRANS=16, + NET_NF_CONNTRACK_TCP_LOOSE=17, + NET_NF_CONNTRACK_TCP_BE_LIBERAL=18, + NET_NF_CONNTRACK_TCP_MAX_RETRANS=19, + NET_NF_CONNTRACK_SCTP_TIMEOUT_CLOSED=20, + NET_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_WAIT=21, + NET_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_ECHOED=22, + NET_NF_CONNTRACK_SCTP_TIMEOUT_ESTABLISHED=23, + NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_SENT=24, + NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_RECD=25, + NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_ACK_SENT=26, + NET_NF_CONNTRACK_COUNT=27, + NET_NF_CONNTRACK_ICMPV6_TIMEOUT=28, + NET_NF_CONNTRACK_FRAG6_TIMEOUT=29, + NET_NF_CONNTRACK_FRAG6_LOW_THRESH=30, + NET_NF_CONNTRACK_FRAG6_HIGH_THRESH=31, + NET_NF_CONNTRACK_CHECKSUM=32, +}; +enum +{ + NET_IPV4_FORWARD=8, + NET_IPV4_DYNADDR=9, + NET_IPV4_CONF=16, + NET_IPV4_NEIGH=17, + NET_IPV4_ROUTE=18, + NET_IPV4_FIB_HASH=19, + NET_IPV4_NETFILTER=20, + NET_IPV4_TCP_TIMESTAMPS=33, + NET_IPV4_TCP_WINDOW_SCALING=34, + NET_IPV4_TCP_SACK=35, + NET_IPV4_TCP_RETRANS_COLLAPSE=36, + NET_IPV4_DEFAULT_TTL=37, + NET_IPV4_AUTOCONFIG=38, + NET_IPV4_NO_PMTU_DISC=39, + NET_IPV4_TCP_SYN_RETRIES=40, + NET_IPV4_IPFRAG_HIGH_THRESH=41, + NET_IPV4_IPFRAG_LOW_THRESH=42, + NET_IPV4_IPFRAG_TIME=43, + NET_IPV4_TCP_MAX_KA_PROBES=44, + NET_IPV4_TCP_KEEPALIVE_TIME=45, + NET_IPV4_TCP_KEEPALIVE_PROBES=46, + NET_IPV4_TCP_RETRIES1=47, + NET_IPV4_TCP_RETRIES2=48, + NET_IPV4_TCP_FIN_TIMEOUT=49, + NET_IPV4_IP_MASQ_DEBUG=50, + NET_TCP_SYNCOOKIES=51, + NET_TCP_STDURG=52, + NET_TCP_RFC1337=53, + NET_TCP_SYN_TAILDROP=54, + NET_TCP_MAX_SYN_BACKLOG=55, + NET_IPV4_LOCAL_PORT_RANGE=56, + NET_IPV4_ICMP_ECHO_IGNORE_ALL=57, + NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS=58, + NET_IPV4_ICMP_SOURCEQUENCH_RATE=59, + NET_IPV4_ICMP_DESTUNREACH_RATE=60, + NET_IPV4_ICMP_TIMEEXCEED_RATE=61, + NET_IPV4_ICMP_PARAMPROB_RATE=62, + NET_IPV4_ICMP_ECHOREPLY_RATE=63, + NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES=64, + NET_IPV4_IGMP_MAX_MEMBERSHIPS=65, + NET_TCP_TW_RECYCLE=66, + NET_IPV4_ALWAYS_DEFRAG=67, + NET_IPV4_TCP_KEEPALIVE_INTVL=68, + NET_IPV4_INET_PEER_THRESHOLD=69, + NET_IPV4_INET_PEER_MINTTL=70, + NET_IPV4_INET_PEER_MAXTTL=71, + NET_IPV4_INET_PEER_GC_MINTIME=72, + NET_IPV4_INET_PEER_GC_MAXTIME=73, + NET_TCP_ORPHAN_RETRIES=74, + NET_TCP_ABORT_ON_OVERFLOW=75, + NET_TCP_SYNACK_RETRIES=76, + NET_TCP_MAX_ORPHANS=77, + NET_TCP_MAX_TW_BUCKETS=78, + NET_TCP_FACK=79, + NET_TCP_REORDERING=80, + NET_TCP_ECN=81, + NET_TCP_DSACK=82, + NET_TCP_MEM=83, + NET_TCP_WMEM=84, + NET_TCP_RMEM=85, + NET_TCP_APP_WIN=86, + NET_TCP_ADV_WIN_SCALE=87, + NET_IPV4_NONLOCAL_BIND=88, + NET_IPV4_ICMP_RATELIMIT=89, + NET_IPV4_ICMP_RATEMASK=90, + NET_TCP_TW_REUSE=91, + NET_TCP_FRTO=92, + NET_TCP_LOW_LATENCY=93, + NET_IPV4_IPFRAG_SECRET_INTERVAL=94, + NET_IPV4_IGMP_MAX_MSF=96, + NET_TCP_NO_METRICS_SAVE=97, + NET_TCP_DEFAULT_WIN_SCALE=105, + NET_TCP_MODERATE_RCVBUF=106, + NET_TCP_TSO_WIN_DIVISOR=107, + NET_TCP_BIC_BETA=108, + NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR=109, + NET_TCP_CONG_CONTROL=110, + NET_TCP_ABC=111, + NET_IPV4_IPFRAG_MAX_DIST=112, + NET_TCP_MTU_PROBING=113, + NET_TCP_BASE_MSS=114, + NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS=115, + NET_TCP_DMA_COPYBREAK=116, + NET_TCP_SLOW_START_AFTER_IDLE=117, + NET_CIPSOV4_CACHE_ENABLE=118, + NET_CIPSOV4_CACHE_BUCKET_SIZE=119, + NET_CIPSOV4_RBM_OPTFMT=120, + NET_CIPSOV4_RBM_STRICTVALID=121, + NET_TCP_AVAIL_CONG_CONTROL=122, + NET_TCP_ALLOWED_CONG_CONTROL=123, + NET_TCP_MAX_SSTHRESH=124, + NET_TCP_FRTO_RESPONSE=125, +}; +enum { + NET_IPV4_ROUTE_FLUSH=1, + NET_IPV4_ROUTE_MIN_DELAY=2, + NET_IPV4_ROUTE_MAX_DELAY=3, + NET_IPV4_ROUTE_GC_THRESH=4, + NET_IPV4_ROUTE_MAX_SIZE=5, + NET_IPV4_ROUTE_GC_MIN_INTERVAL=6, + NET_IPV4_ROUTE_GC_TIMEOUT=7, + NET_IPV4_ROUTE_GC_INTERVAL=8, + NET_IPV4_ROUTE_REDIRECT_LOAD=9, + NET_IPV4_ROUTE_REDIRECT_NUMBER=10, + NET_IPV4_ROUTE_REDIRECT_SILENCE=11, + NET_IPV4_ROUTE_ERROR_COST=12, + NET_IPV4_ROUTE_ERROR_BURST=13, + NET_IPV4_ROUTE_GC_ELASTICITY=14, + NET_IPV4_ROUTE_MTU_EXPIRES=15, + NET_IPV4_ROUTE_MIN_PMTU=16, + NET_IPV4_ROUTE_MIN_ADVMSS=17, + NET_IPV4_ROUTE_SECRET_INTERVAL=18, + NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS=19, +}; +enum +{ + NET_PROTO_CONF_ALL=-2, + NET_PROTO_CONF_DEFAULT=-3 +}; +enum +{ + NET_IPV4_CONF_FORWARDING=1, + NET_IPV4_CONF_MC_FORWARDING=2, + NET_IPV4_CONF_PROXY_ARP=3, + NET_IPV4_CONF_ACCEPT_REDIRECTS=4, + NET_IPV4_CONF_SECURE_REDIRECTS=5, + NET_IPV4_CONF_SEND_REDIRECTS=6, + NET_IPV4_CONF_SHARED_MEDIA=7, + NET_IPV4_CONF_RP_FILTER=8, + NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE=9, + NET_IPV4_CONF_BOOTP_RELAY=10, + NET_IPV4_CONF_LOG_MARTIANS=11, + NET_IPV4_CONF_TAG=12, + NET_IPV4_CONF_ARPFILTER=13, + NET_IPV4_CONF_MEDIUM_ID=14, + NET_IPV4_CONF_NOXFRM=15, + NET_IPV4_CONF_NOPOLICY=16, + NET_IPV4_CONF_FORCE_IGMP_VERSION=17, + NET_IPV4_CONF_ARP_ANNOUNCE=18, + NET_IPV4_CONF_ARP_IGNORE=19, + NET_IPV4_CONF_PROMOTE_SECONDARIES=20, + NET_IPV4_CONF_ARP_ACCEPT=21, + NET_IPV4_CONF_ARP_NOTIFY=22, +}; +enum +{ + NET_IPV4_NF_CONNTRACK_MAX=1, + NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT=2, + NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_SYN_RECV=3, + NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_ESTABLISHED=4, + NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_FIN_WAIT=5, + NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_CLOSE_WAIT=6, + NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_LAST_ACK=7, + NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_TIME_WAIT=8, + NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_CLOSE=9, + NET_IPV4_NF_CONNTRACK_UDP_TIMEOUT=10, + NET_IPV4_NF_CONNTRACK_UDP_TIMEOUT_STREAM=11, + NET_IPV4_NF_CONNTRACK_ICMP_TIMEOUT=12, + NET_IPV4_NF_CONNTRACK_GENERIC_TIMEOUT=13, + NET_IPV4_NF_CONNTRACK_BUCKETS=14, + NET_IPV4_NF_CONNTRACK_LOG_INVALID=15, + NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_MAX_RETRANS=16, + NET_IPV4_NF_CONNTRACK_TCP_LOOSE=17, + NET_IPV4_NF_CONNTRACK_TCP_BE_LIBERAL=18, + NET_IPV4_NF_CONNTRACK_TCP_MAX_RETRANS=19, + NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_CLOSED=20, + NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_WAIT=21, + NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_ECHOED=22, + NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_ESTABLISHED=23, + NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_SENT=24, + NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_RECD=25, + NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_ACK_SENT=26, + NET_IPV4_NF_CONNTRACK_COUNT=27, + NET_IPV4_NF_CONNTRACK_CHECKSUM=28, +}; +enum { + NET_IPV6_CONF=16, + NET_IPV6_NEIGH=17, + NET_IPV6_ROUTE=18, + NET_IPV6_ICMP=19, + NET_IPV6_BINDV6ONLY=20, + NET_IPV6_IP6FRAG_HIGH_THRESH=21, + NET_IPV6_IP6FRAG_LOW_THRESH=22, + NET_IPV6_IP6FRAG_TIME=23, + NET_IPV6_IP6FRAG_SECRET_INTERVAL=24, + NET_IPV6_MLD_MAX_MSF=25, +}; +enum { + NET_IPV6_ROUTE_FLUSH=1, + NET_IPV6_ROUTE_GC_THRESH=2, + NET_IPV6_ROUTE_MAX_SIZE=3, + NET_IPV6_ROUTE_GC_MIN_INTERVAL=4, + NET_IPV6_ROUTE_GC_TIMEOUT=5, + NET_IPV6_ROUTE_GC_INTERVAL=6, + NET_IPV6_ROUTE_GC_ELASTICITY=7, + NET_IPV6_ROUTE_MTU_EXPIRES=8, + NET_IPV6_ROUTE_MIN_ADVMSS=9, + NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS=10 +}; +enum { + NET_IPV6_FORWARDING=1, + NET_IPV6_HOP_LIMIT=2, + NET_IPV6_MTU=3, + NET_IPV6_ACCEPT_RA=4, + NET_IPV6_ACCEPT_REDIRECTS=5, + NET_IPV6_AUTOCONF=6, + NET_IPV6_DAD_TRANSMITS=7, + NET_IPV6_RTR_SOLICITS=8, + NET_IPV6_RTR_SOLICIT_INTERVAL=9, + NET_IPV6_RTR_SOLICIT_DELAY=10, + NET_IPV6_USE_TEMPADDR=11, + NET_IPV6_TEMP_VALID_LFT=12, + NET_IPV6_TEMP_PREFERED_LFT=13, + NET_IPV6_REGEN_MAX_RETRY=14, + NET_IPV6_MAX_DESYNC_FACTOR=15, + NET_IPV6_MAX_ADDRESSES=16, + NET_IPV6_FORCE_MLD_VERSION=17, + NET_IPV6_ACCEPT_RA_DEFRTR=18, + NET_IPV6_ACCEPT_RA_PINFO=19, + NET_IPV6_ACCEPT_RA_RTR_PREF=20, + NET_IPV6_RTR_PROBE_INTERVAL=21, + NET_IPV6_ACCEPT_RA_RT_INFO_MAX_PLEN=22, + NET_IPV6_PROXY_NDP=23, + NET_IPV6_ACCEPT_SOURCE_ROUTE=25, + __NET_IPV6_MAX +}; +enum { + NET_IPV6_ICMP_RATELIMIT=1 +}; +enum { + NET_NEIGH_MCAST_SOLICIT=1, + NET_NEIGH_UCAST_SOLICIT=2, + NET_NEIGH_APP_SOLICIT=3, + NET_NEIGH_RETRANS_TIME=4, + NET_NEIGH_REACHABLE_TIME=5, + NET_NEIGH_DELAY_PROBE_TIME=6, + NET_NEIGH_GC_STALE_TIME=7, + NET_NEIGH_UNRES_QLEN=8, + NET_NEIGH_PROXY_QLEN=9, + NET_NEIGH_ANYCAST_DELAY=10, + NET_NEIGH_PROXY_DELAY=11, + NET_NEIGH_LOCKTIME=12, + NET_NEIGH_GC_INTERVAL=13, + NET_NEIGH_GC_THRESH1=14, + NET_NEIGH_GC_THRESH2=15, + NET_NEIGH_GC_THRESH3=16, + NET_NEIGH_RETRANS_TIME_MS=17, + NET_NEIGH_REACHABLE_TIME_MS=18, +}; +enum { + NET_DCCP_DEFAULT=1, +}; +enum { + NET_IPX_PPROP_BROADCASTING=1, + NET_IPX_FORWARDING=2 +}; +enum { + NET_LLC2=1, + NET_LLC_STATION=2, +}; +enum { + NET_LLC2_TIMEOUT=1, +}; +enum { + NET_LLC_STATION_ACK_TIMEOUT=1, +}; +enum { + NET_LLC2_ACK_TIMEOUT=1, + NET_LLC2_P_TIMEOUT=2, + NET_LLC2_REJ_TIMEOUT=3, + NET_LLC2_BUSY_TIMEOUT=4, +}; +enum { + NET_ATALK_AARP_EXPIRY_TIME=1, + NET_ATALK_AARP_TICK_TIME=2, + NET_ATALK_AARP_RETRANSMIT_LIMIT=3, + NET_ATALK_AARP_RESOLVE_TIME=4 +}; +enum { + NET_NETROM_DEFAULT_PATH_QUALITY=1, + NET_NETROM_OBSOLESCENCE_COUNT_INITIALISER=2, + NET_NETROM_NETWORK_TTL_INITIALISER=3, + NET_NETROM_TRANSPORT_TIMEOUT=4, + NET_NETROM_TRANSPORT_MAXIMUM_TRIES=5, + NET_NETROM_TRANSPORT_ACKNOWLEDGE_DELAY=6, + NET_NETROM_TRANSPORT_BUSY_DELAY=7, + NET_NETROM_TRANSPORT_REQUESTED_WINDOW_SIZE=8, + NET_NETROM_TRANSPORT_NO_ACTIVITY_TIMEOUT=9, + NET_NETROM_ROUTING_CONTROL=10, + NET_NETROM_LINK_FAILS_COUNT=11, + NET_NETROM_RESET=12 +}; +enum { + NET_AX25_IP_DEFAULT_MODE=1, + NET_AX25_DEFAULT_MODE=2, + NET_AX25_BACKOFF_TYPE=3, + NET_AX25_CONNECT_MODE=4, + NET_AX25_STANDARD_WINDOW=5, + NET_AX25_EXTENDED_WINDOW=6, + NET_AX25_T1_TIMEOUT=7, + NET_AX25_T2_TIMEOUT=8, + NET_AX25_T3_TIMEOUT=9, + NET_AX25_IDLE_TIMEOUT=10, + NET_AX25_N2=11, + NET_AX25_PACLEN=12, + NET_AX25_PROTOCOL=13, + NET_AX25_DAMA_SLAVE_TIMEOUT=14 +}; +enum { + NET_ROSE_RESTART_REQUEST_TIMEOUT=1, + NET_ROSE_CALL_REQUEST_TIMEOUT=2, + NET_ROSE_RESET_REQUEST_TIMEOUT=3, + NET_ROSE_CLEAR_REQUEST_TIMEOUT=4, + NET_ROSE_ACK_HOLD_BACK_TIMEOUT=5, + NET_ROSE_ROUTING_CONTROL=6, + NET_ROSE_LINK_FAIL_TIMEOUT=7, + NET_ROSE_MAX_VCS=8, + NET_ROSE_WINDOW_SIZE=9, + NET_ROSE_NO_ACTIVITY_TIMEOUT=10 +}; +enum { + NET_X25_RESTART_REQUEST_TIMEOUT=1, + NET_X25_CALL_REQUEST_TIMEOUT=2, + NET_X25_RESET_REQUEST_TIMEOUT=3, + NET_X25_CLEAR_REQUEST_TIMEOUT=4, + NET_X25_ACK_HOLD_BACK_TIMEOUT=5, + NET_X25_FORWARD=6 +}; +enum +{ + NET_TR_RIF_TIMEOUT=1 +}; +enum { + NET_DECNET_NODE_TYPE = 1, + NET_DECNET_NODE_ADDRESS = 2, + NET_DECNET_NODE_NAME = 3, + NET_DECNET_DEFAULT_DEVICE = 4, + NET_DECNET_TIME_WAIT = 5, + NET_DECNET_DN_COUNT = 6, + NET_DECNET_DI_COUNT = 7, + NET_DECNET_DR_COUNT = 8, + NET_DECNET_DST_GC_INTERVAL = 9, + NET_DECNET_CONF = 10, + NET_DECNET_NO_FC_MAX_CWND = 11, + NET_DECNET_MEM = 12, + NET_DECNET_RMEM = 13, + NET_DECNET_WMEM = 14, + NET_DECNET_DEBUG_LEVEL = 255 +}; +enum { + NET_DECNET_CONF_LOOPBACK = -2, + NET_DECNET_CONF_DDCMP = -3, + NET_DECNET_CONF_PPP = -4, + NET_DECNET_CONF_X25 = -5, + NET_DECNET_CONF_GRE = -6, + NET_DECNET_CONF_ETHER = -7 +}; +enum { + NET_DECNET_CONF_DEV_PRIORITY = 1, + NET_DECNET_CONF_DEV_T1 = 2, + NET_DECNET_CONF_DEV_T2 = 3, + NET_DECNET_CONF_DEV_T3 = 4, + NET_DECNET_CONF_DEV_FORWARDING = 5, + NET_DECNET_CONF_DEV_BLKSIZE = 6, + NET_DECNET_CONF_DEV_STATE = 7 +}; +enum { + NET_SCTP_RTO_INITIAL = 1, + NET_SCTP_RTO_MIN = 2, + NET_SCTP_RTO_MAX = 3, + NET_SCTP_RTO_ALPHA = 4, + NET_SCTP_RTO_BETA = 5, + NET_SCTP_VALID_COOKIE_LIFE = 6, + NET_SCTP_ASSOCIATION_MAX_RETRANS = 7, + NET_SCTP_PATH_MAX_RETRANS = 8, + NET_SCTP_MAX_INIT_RETRANSMITS = 9, + NET_SCTP_HB_INTERVAL = 10, + NET_SCTP_PRESERVE_ENABLE = 11, + NET_SCTP_MAX_BURST = 12, + NET_SCTP_ADDIP_ENABLE = 13, + NET_SCTP_PRSCTP_ENABLE = 14, + NET_SCTP_SNDBUF_POLICY = 15, + NET_SCTP_SACK_TIMEOUT = 16, + NET_SCTP_RCVBUF_POLICY = 17, +}; +enum { + NET_BRIDGE_NF_CALL_ARPTABLES = 1, + NET_BRIDGE_NF_CALL_IPTABLES = 2, + NET_BRIDGE_NF_CALL_IP6TABLES = 3, + NET_BRIDGE_NF_FILTER_VLAN_TAGGED = 4, + NET_BRIDGE_NF_FILTER_PPPOE_TAGGED = 5, +}; +enum { + NET_IRDA_DISCOVERY=1, + NET_IRDA_DEVNAME=2, + NET_IRDA_DEBUG=3, + NET_IRDA_FAST_POLL=4, + NET_IRDA_DISCOVERY_SLOTS=5, + NET_IRDA_DISCOVERY_TIMEOUT=6, + NET_IRDA_SLOT_TIMEOUT=7, + NET_IRDA_MAX_BAUD_RATE=8, + NET_IRDA_MIN_TX_TURN_TIME=9, + NET_IRDA_MAX_TX_DATA_SIZE=10, + NET_IRDA_MAX_TX_WINDOW=11, + NET_IRDA_MAX_NOREPLY_TIME=12, + NET_IRDA_WARN_NOREPLY_TIME=13, + NET_IRDA_LAP_KEEPALIVE_TIME=14, +}; +enum +{ + FS_NRINODE=1, + FS_STATINODE=2, + FS_MAXINODE=3, + FS_NRDQUOT=4, + FS_MAXDQUOT=5, + FS_NRFILE=6, + FS_MAXFILE=7, + FS_DENTRY=8, + FS_NRSUPER=9, + FS_MAXSUPER=10, + FS_OVERFLOWUID=11, + FS_OVERFLOWGID=12, + FS_LEASES=13, + FS_DIR_NOTIFY=14, + FS_LEASE_TIME=15, + FS_DQSTATS=16, + FS_XFS=17, + FS_AIO_NR=18, + FS_AIO_MAX_NR=19, + FS_INOTIFY=20, + FS_OCFS2=988, +}; +enum { + FS_DQ_LOOKUPS = 1, + FS_DQ_DROPS = 2, + FS_DQ_READS = 3, + FS_DQ_WRITES = 4, + FS_DQ_CACHE_HITS = 5, + FS_DQ_ALLOCATED = 6, + FS_DQ_FREE = 7, + FS_DQ_SYNCS = 8, + FS_DQ_WARNINGS = 9, +}; +enum { + DEV_CDROM=1, + DEV_HWMON=2, + DEV_PARPORT=3, + DEV_RAID=4, + DEV_MAC_HID=5, + DEV_SCSI=6, + DEV_IPMI=7, +}; +enum { + DEV_CDROM_INFO=1, + DEV_CDROM_AUTOCLOSE=2, + DEV_CDROM_AUTOEJECT=3, + DEV_CDROM_DEBUG=4, + DEV_CDROM_LOCK=5, + DEV_CDROM_CHECK_MEDIA=6 +}; +enum { + DEV_PARPORT_DEFAULT=-3 +}; +enum { + DEV_RAID_SPEED_LIMIT_MIN=1, + DEV_RAID_SPEED_LIMIT_MAX=2 +}; +enum { + DEV_PARPORT_DEFAULT_TIMESLICE=1, + DEV_PARPORT_DEFAULT_SPINTIME=2 +}; +enum { + DEV_PARPORT_SPINTIME=1, + DEV_PARPORT_BASE_ADDR=2, + DEV_PARPORT_IRQ=3, + DEV_PARPORT_DMA=4, + DEV_PARPORT_MODES=5, + DEV_PARPORT_DEVICES=6, + DEV_PARPORT_AUTOPROBE=16 +}; +enum { + DEV_PARPORT_DEVICES_ACTIVE=-3, +}; +enum { + DEV_PARPORT_DEVICE_TIMESLICE=1, +}; +enum { + DEV_MAC_HID_KEYBOARD_SENDS_LINUX_KEYCODES=1, + DEV_MAC_HID_KEYBOARD_LOCK_KEYCODES=2, + DEV_MAC_HID_MOUSE_BUTTON_EMULATION=3, + DEV_MAC_HID_MOUSE_BUTTON2_KEYCODE=4, + DEV_MAC_HID_MOUSE_BUTTON3_KEYCODE=5, + DEV_MAC_HID_ADB_MOUSE_SENDS_KEYCODES=6 +}; +enum { + DEV_SCSI_LOGGING_LEVEL=1, +}; +enum { + DEV_IPMI_POWEROFF_POWERCYCLE=1, +}; +enum +{ + ABI_DEFHANDLER_COFF=1, + ABI_DEFHANDLER_ELF=2, + ABI_DEFHANDLER_LCALL7=3, + ABI_DEFHANDLER_LIBCSO=4, + ABI_TRACE=5, + ABI_FAKE_UTSNAME=6, +}; +extern void rcutorture_record_test_transition(void); +extern void rcutorture_record_progress(unsigned long vernum); +struct rcu_head { + struct rcu_head *next; + void (*func)(struct rcu_head *head); +}; +extern void call_rcu_sched(struct rcu_head *head, + void (*func)(struct rcu_head *rcu)); +extern void synchronize_sched(void); +extern void rcu_barrier_bh(void); +extern void rcu_barrier_sched(void); +static inline __attribute__((always_inline)) void __rcu_read_lock_bh(void) +{ + local_bh_disable(); +} +static inline __attribute__((always_inline)) void __rcu_read_unlock_bh(void) +{ + local_bh_enable(); +} +extern void __rcu_read_lock(void); +extern void __rcu_read_unlock(void); +void synchronize_rcu(void); +extern void rcu_sched_qs(int cpu); +extern void rcu_bh_qs(int cpu); +extern void rcu_check_callbacks(int cpu, int user); +struct notifier_block; +static inline __attribute__((always_inline)) void rcu_enter_nohz(void) +{ +} +static inline __attribute__((always_inline)) void rcu_exit_nohz(void) +{ +} +extern void rcu_init(void); +extern void rcu_note_context_switch(int cpu); +extern int rcu_needs_cpu(int cpu); +extern void rcu_cpu_stall_reset(void); +static inline __attribute__((always_inline)) void rcu_virt_note_context_switch(int cpu) +{ + rcu_note_context_switch(cpu); +} +extern void exit_rcu(void); +extern void synchronize_rcu_bh(void); +extern void synchronize_sched_expedited(void); +extern void synchronize_rcu_expedited(void); +static inline __attribute__((always_inline)) void synchronize_rcu_bh_expedited(void) +{ + synchronize_sched_expedited(); +} +extern void rcu_barrier(void); +extern unsigned long rcutorture_testseq; +extern unsigned long rcutorture_vernum; +extern long rcu_batches_completed(void); +extern long rcu_batches_completed_bh(void); +extern long rcu_batches_completed_sched(void); +extern void rcu_force_quiescent_state(void); +extern void rcu_bh_force_quiescent_state(void); +extern void rcu_sched_force_quiescent_state(void); +static inline __attribute__((always_inline)) int rcu_blocking_is_gp(void) +{ + return cpumask_weight(cpu_online_mask) == 1; +} +extern void rcu_scheduler_starting(void); +extern int rcu_scheduler_active __attribute__((__section__(".data..read_mostly"))); +static inline __attribute__((always_inline)) void init_rcu_head_on_stack(struct rcu_head *head) +{ +} +static inline __attribute__((always_inline)) void destroy_rcu_head_on_stack(struct rcu_head *head) +{ +} +extern struct lockdep_map rcu_lock_map; +extern struct lockdep_map rcu_bh_lock_map; +extern struct lockdep_map rcu_sched_lock_map; +extern int debug_lockdep_rcu_enabled(void); +static inline __attribute__((always_inline)) int rcu_read_lock_held(void) +{ + if (__builtin_constant_p(((!debug_lockdep_rcu_enabled()))) ? !!((!debug_lockdep_rcu_enabled())) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rcupdate.h", .line = 216, }; ______r = !!((!debug_lockdep_rcu_enabled())); ______f.miss_hit[______r]++; ______r; })) + return 1; + return lock_is_held(&rcu_lock_map); +} +extern int rcu_read_lock_bh_held(void); +static inline __attribute__((always_inline)) int rcu_read_lock_sched_held(void) +{ + int lockdep_opinion = 0; + if (__builtin_constant_p(((!debug_lockdep_rcu_enabled()))) ? !!((!debug_lockdep_rcu_enabled())) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rcupdate.h", .line = 247, }; ______r = !!((!debug_lockdep_rcu_enabled())); ______f.miss_hit[______r]++; ______r; })) + return 1; + if (__builtin_constant_p(((debug_locks))) ? !!((debug_locks)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rcupdate.h", .line = 249, }; ______r = !!((debug_locks)); ______f.miss_hit[______r]++; ______r; })) + lockdep_opinion = lock_is_held(&rcu_sched_lock_map); + return lockdep_opinion || (current_thread_info()->preempt_count) != 0 || ({ unsigned long _flags; do { ({ unsigned long __dummy; typeof(_flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); _flags = arch_local_save_flags(); } while (0); ({ ({ unsigned long __dummy; typeof(_flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_irqs_disabled_flags(_flags); }); }); +} +static inline __attribute__((always_inline)) void rcu_read_lock(void) +{ + __rcu_read_lock(); + (void)0; + lock_acquire(&rcu_lock_map, 0, 0, 2, 1, ((void *)0), ({ __label__ __here; __here: (unsigned long)&&__here; })); +} +static inline __attribute__((always_inline)) void rcu_read_unlock(void) +{ + lock_release(&rcu_lock_map, 1, ({ __label__ __here; __here: (unsigned long)&&__here; })); + (void)0; + __rcu_read_unlock(); +} +static inline __attribute__((always_inline)) void rcu_read_lock_bh(void) +{ + __rcu_read_lock_bh(); + (void)0; + lock_acquire(&rcu_bh_lock_map, 0, 0, 2, 1, ((void *)0), ({ __label__ __here; __here: (unsigned long)&&__here; })); +} +static inline __attribute__((always_inline)) void rcu_read_unlock_bh(void) +{ + lock_release(&rcu_bh_lock_map, 1, ({ __label__ __here; __here: (unsigned long)&&__here; })); + (void)0; + __rcu_read_unlock_bh(); +} +static inline __attribute__((always_inline)) void rcu_read_lock_sched(void) +{ + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + (void)0; + lock_acquire(&rcu_sched_lock_map, 0, 0, 2, 1, ((void *)0), ({ __label__ __here; __here: (unsigned long)&&__here; })); +} +static inline __attribute__((always_inline)) __attribute__((no_instrument_function)) void rcu_read_lock_sched_notrace(void) +{ + do { do { (current_thread_info()->preempt_count) += (1); } while (0); __asm__ __volatile__("": : :"memory"); } while (0); + (void)0; +} +static inline __attribute__((always_inline)) void rcu_read_unlock_sched(void) +{ + lock_release(&rcu_sched_lock_map, 1, ({ __label__ __here; __here: (unsigned long)&&__here; })); + (void)0; + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rcupdate.h", .line = 681, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rcupdate.h", .line = 681, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rcupdate.h", .line = 681, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rcupdate.h", .line = 681, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); +} +static inline __attribute__((always_inline)) __attribute__((no_instrument_function)) void rcu_read_unlock_sched_notrace(void) +{ + (void)0; + do { do { __asm__ __volatile__("": : :"memory"); do { (current_thread_info()->preempt_count) -= (1); } while (0); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rcupdate.h", .line = 688, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rcupdate.h", .line = 688, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rcupdate.h", .line = 688, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/rcupdate.h", .line = 688, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); +} +struct rcu_synchronize { + struct rcu_head head; + struct completion completion; +}; +extern void wakeme_after_rcu(struct rcu_head *head); +extern void call_rcu(struct rcu_head *head, + void (*func)(struct rcu_head *head)); +extern void call_rcu_bh(struct rcu_head *head, + void (*func)(struct rcu_head *head)); +static inline __attribute__((always_inline)) void debug_rcu_head_queue(struct rcu_head *head) +{ +} +static inline __attribute__((always_inline)) void debug_rcu_head_unqueue(struct rcu_head *head) +{ +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) bool __is_kfree_rcu_offset(unsigned long offset) +{ + return offset < 4096; +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) +void __kfree_rcu(struct rcu_head *head, unsigned long offset) +{ + typedef void (*rcu_callback)(struct rcu_head *); + do { ((void)sizeof(char[1 - 2*!!(!__builtin_constant_p(offset))])); if (__builtin_constant_p(((!__builtin_constant_p(offset)))) ? !!((!__builtin_constant_p(offset))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rcupdate.h", .line = 822, }; ______r = !!((!__builtin_constant_p(offset))); ______f.miss_hit[______r]++; ______r; })) __build_bug_on_failed = 1; } while(0); + do { ((void)sizeof(char[1 - 2*!!(!__is_kfree_rcu_offset(offset))])); if (__builtin_constant_p(((!__is_kfree_rcu_offset(offset)))) ? !!((!__is_kfree_rcu_offset(offset))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rcupdate.h", .line = 825, }; ______r = !!((!__is_kfree_rcu_offset(offset))); ______f.miss_hit[______r]++; ______r; })) __build_bug_on_failed = 1; } while(0); + call_rcu(head, (rcu_callback)offset); +} +extern void kfree(const void *); +static inline __attribute__((always_inline)) void __rcu_reclaim(struct rcu_head *head) +{ + unsigned long offset = (unsigned long)head->func; + if (__builtin_constant_p(((__is_kfree_rcu_offset(offset)))) ? !!((__is_kfree_rcu_offset(offset))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rcupdate.h", .line = 836, }; ______r = !!((__is_kfree_rcu_offset(offset))); ______f.miss_hit[______r]++; ______r; })) + kfree((void *)head - offset); + else + head->func(head); +} +struct ctl_table; +struct nsproxy; +struct ctl_table_root; +struct ctl_table_set { + struct list_head list; + struct ctl_table_set *parent; + int (*is_seen)(struct ctl_table_set *); +}; +extern void setup_sysctl_set(struct ctl_table_set *p, + struct ctl_table_set *parent, + int (*is_seen)(struct ctl_table_set *)); +struct ctl_table_header; +extern void sysctl_head_get(struct ctl_table_header *); +extern void sysctl_head_put(struct ctl_table_header *); +extern int sysctl_is_seen(struct ctl_table_header *); +extern struct ctl_table_header *sysctl_head_grab(struct ctl_table_header *); +extern struct ctl_table_header *sysctl_head_next(struct ctl_table_header *prev); +extern struct ctl_table_header *__sysctl_head_next(struct nsproxy *namespaces, + struct ctl_table_header *prev); +extern void sysctl_head_finish(struct ctl_table_header *prev); +extern int sysctl_perm(struct ctl_table_root *root, + struct ctl_table *table, int op); +typedef struct ctl_table ctl_table; +typedef int proc_handler (struct ctl_table *ctl, int write, + void *buffer, size_t *lenp, loff_t *ppos); +extern int proc_dostring(struct ctl_table *, int, + void *, size_t *, loff_t *); +extern int proc_dointvec(struct ctl_table *, int, + void *, size_t *, loff_t *); +extern int proc_dointvec_minmax(struct ctl_table *, int, + void *, size_t *, loff_t *); +extern int proc_dointvec_jiffies(struct ctl_table *, int, + void *, size_t *, loff_t *); +extern int proc_dointvec_userhz_jiffies(struct ctl_table *, int, + void *, size_t *, loff_t *); +extern int proc_dointvec_ms_jiffies(struct ctl_table *, int, + void *, size_t *, loff_t *); +extern int proc_doulongvec_minmax(struct ctl_table *, int, + void *, size_t *, loff_t *); +extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int, + void *, size_t *, loff_t *); +extern int proc_do_large_bitmap(struct ctl_table *, int, + void *, size_t *, loff_t *); +struct ctl_table +{ + const char *procname; + void *data; + int maxlen; + mode_t mode; + struct ctl_table *child; + struct ctl_table *parent; + proc_handler *proc_handler; + void *extra1; + void *extra2; +}; +struct ctl_table_root { + struct list_head root_list; + struct ctl_table_set default_set; + struct ctl_table_set *(*lookup)(struct ctl_table_root *root, + struct nsproxy *namespaces); + int (*permissions)(struct ctl_table_root *root, + struct nsproxy *namespaces, struct ctl_table *table); +}; +struct ctl_table_header +{ + union { + struct { + struct ctl_table *ctl_table; + struct list_head ctl_entry; + int used; + int count; + }; + struct rcu_head rcu; + }; + struct completion *unregistering; + struct ctl_table *ctl_table_arg; + struct ctl_table_root *root; + struct ctl_table_set *set; + struct ctl_table *attached_by; + struct ctl_table *attached_to; + struct ctl_table_header *parent; +}; +struct ctl_path { + const char *procname; +}; +void register_sysctl_root(struct ctl_table_root *root); +struct ctl_table_header *__register_sysctl_paths( + struct ctl_table_root *root, struct nsproxy *namespaces, + const struct ctl_path *path, struct ctl_table *table); +struct ctl_table_header *register_sysctl_table(struct ctl_table * table); +struct ctl_table_header *register_sysctl_paths(const struct ctl_path *path, + struct ctl_table *table); +void unregister_sysctl_table(struct ctl_table_header * table); +int sysctl_check_table(struct nsproxy *namespaces, struct ctl_table *table); +extern char modprobe_path[]; +extern int __request_module(bool wait, const char *name, ...) + __attribute__((format(printf, 2, 3))); +struct cred; +struct file; +enum umh_wait { + UMH_NO_WAIT = -1, + UMH_WAIT_EXEC = 0, + UMH_WAIT_PROC = 1, +}; +struct subprocess_info { + struct work_struct work; + struct completion *complete; + char *path; + char **argv; + char **envp; + enum umh_wait wait; + int retval; + int (*init)(struct subprocess_info *info, struct cred *new); + void (*cleanup)(struct subprocess_info *info); + void *data; +}; +struct subprocess_info *call_usermodehelper_setup(char *path, char **argv, + char **envp, gfp_t gfp_mask); +void call_usermodehelper_setfns(struct subprocess_info *info, + int (*init)(struct subprocess_info *info, struct cred *new), + void (*cleanup)(struct subprocess_info *info), + void *data); +int call_usermodehelper_exec(struct subprocess_info *info, enum umh_wait wait); +void call_usermodehelper_freeinfo(struct subprocess_info *info); +static inline __attribute__((always_inline)) int +call_usermodehelper_fns(char *path, char **argv, char **envp, + enum umh_wait wait, + int (*init)(struct subprocess_info *info, struct cred *new), + void (*cleanup)(struct subprocess_info *), void *data) +{ + struct subprocess_info *info; + gfp_t gfp_mask = (wait == UMH_NO_WAIT) ? ((( gfp_t)0x20u)) : ((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u)); + info = call_usermodehelper_setup(path, argv, envp, gfp_mask); + if (__builtin_constant_p(((info == ((void *)0)))) ? !!((info == ((void *)0))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kmod.h", .line = 98, }; ______r = !!((info == ((void *)0))); ______f.miss_hit[______r]++; ______r; })) + return -12; + call_usermodehelper_setfns(info, init, cleanup, data); + return call_usermodehelper_exec(info, wait); +} +static inline __attribute__((always_inline)) int +call_usermodehelper(char *path, char **argv, char **envp, enum umh_wait wait) +{ + return call_usermodehelper_fns(path, argv, envp, wait, + ((void *)0), ((void *)0), ((void *)0)); +} +extern struct ctl_table usermodehelper_table[]; +extern void usermodehelper_init(void); +extern int usermodehelper_disable(void); +extern void usermodehelper_enable(void); +extern bool usermodehelper_is_disabled(void); +struct user_i387_struct { + long cwd; + long swd; + long twd; + long fip; + long fcs; + long foo; + long fos; + long st_space[20]; +}; +struct user_fxsr_struct { + unsigned short cwd; + unsigned short swd; + unsigned short twd; + unsigned short fop; + long fip; + long fcs; + long foo; + long fos; + long mxcsr; + long reserved; + long st_space[32]; + long xmm_space[32]; + long padding[56]; +}; +struct user_regs_struct { + unsigned long bx; + unsigned long cx; + unsigned long dx; + unsigned long si; + unsigned long di; + unsigned long bp; + unsigned long ax; + unsigned long ds; + unsigned long es; + unsigned long fs; + unsigned long gs; + unsigned long orig_ax; + unsigned long ip; + unsigned long cs; + unsigned long flags; + unsigned long sp; + unsigned long ss; +}; +struct user{ + struct user_regs_struct regs; + int u_fpvalid; + struct user_i387_struct i387; + unsigned long int u_tsize; + unsigned long int u_dsize; + unsigned long int u_ssize; + unsigned long start_code; + unsigned long start_stack; + long int signal; + int reserved; + unsigned long u_ar0; + struct user_i387_struct *u_fpstate; + unsigned long magic; + char u_comm[32]; + int u_debugreg[8]; +}; +struct user_ymmh_regs { + __u32 ymmh_space[64]; +}; +struct user_xsave_hdr { + __u64 xstate_bv; + __u64 reserved1[2]; + __u64 reserved2[5]; +}; +struct user_xstateregs { + struct { + __u64 fpx_space[58]; + __u64 xstate_fx_sw[6]; + } i387; + struct user_xsave_hdr xsave_hdr; + struct user_ymmh_regs ymmh; +}; +typedef unsigned long elf_greg_t; +typedef elf_greg_t elf_gregset_t[(sizeof(struct user_regs_struct) / sizeof(elf_greg_t))]; +typedef struct user_i387_struct elf_fpregset_t; +typedef struct user_fxsr_struct elf_fpxregset_t; +extern const char VDSO32_PRELINK[]; +extern void __kernel_sigreturn; +extern void __kernel_rt_sigreturn; +extern const char vdso32_int80_start, vdso32_int80_end; +extern const char vdso32_syscall_start, vdso32_syscall_end; +extern const char vdso32_sysenter_start, vdso32_sysenter_end; +extern unsigned int vdso_enabled; +struct user_desc { + unsigned int entry_number; + unsigned int base_addr; + unsigned int limit; + unsigned int seg_32bit:1; + unsigned int contents:2; + unsigned int read_exec_only:1; + unsigned int limit_in_pages:1; + unsigned int seg_not_present:1; + unsigned int useable:1; +}; +static inline __attribute__((always_inline)) void fill_ldt(struct desc_struct *desc, const struct user_desc *info) +{ + desc->limit0 = info->limit & 0x0ffff; + desc->base0 = (info->base_addr & 0x0000ffff); + desc->base1 = (info->base_addr & 0x00ff0000) >> 16; + desc->type = (info->read_exec_only ^ 1) << 1; + desc->type |= info->contents << 2; + desc->s = 1; + desc->dpl = 0x3; + desc->p = info->seg_not_present ^ 1; + desc->limit = (info->limit & 0xf0000) >> 16; + desc->avl = info->useable; + desc->d = info->seg_32bit; + desc->g = info->limit_in_pages; + desc->base2 = (info->base_addr & 0xff000000) >> 24; + desc->l = 0; +} +extern struct desc_ptr idt_descr; +extern gate_desc idt_table[]; +struct gdt_page { + struct desc_struct gdt[32]; +} __attribute__((aligned(((1UL) << 12)))); +extern __attribute__((section(".data..percpu" "..page_aligned"))) __typeof__(struct gdt_page) gdt_page __attribute__((aligned(((1UL) << 12)))); +static inline __attribute__((always_inline)) struct desc_struct *get_cpu_gdt_table(unsigned int cpu) +{ + return (*({ do { const void *__vpp_verify = (typeof((&(gdt_page))))((void *)0); (void)__vpp_verify; } while (0); ({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"((typeof(*(&(gdt_page))) *)(&(gdt_page)))); (typeof((typeof(*(&(gdt_page))) *)(&(gdt_page)))) (__ptr + (((__per_cpu_offset[cpu])))); }); })).gdt; +} +static inline __attribute__((always_inline)) void pack_gate(gate_desc *gate, unsigned char type, + unsigned long base, unsigned dpl, unsigned flags, + unsigned short seg) +{ + gate->a = (seg << 16) | (base & 0xffff); + gate->b = (base & 0xffff0000) | (((0x80 | type | (dpl << 5)) & 0xff) << 8); +} +static inline __attribute__((always_inline)) int desc_empty(const void *ptr) +{ + const u32 *desc = ptr; + return !(desc[0] | desc[1]); +} +static inline __attribute__((always_inline)) void native_write_idt_entry(gate_desc *idt, int entry, const gate_desc *gate) +{ + __builtin_memcpy(&idt[entry], gate, sizeof(*gate)); +} +static inline __attribute__((always_inline)) void native_write_ldt_entry(struct desc_struct *ldt, int entry, const void *desc) +{ + __builtin_memcpy(&ldt[entry], desc, 8); +} +static inline __attribute__((always_inline)) void +native_write_gdt_entry(struct desc_struct *gdt, int entry, const void *desc, int type) +{ + unsigned int size; + switch (type) { + case DESC_TSS: size = sizeof(tss_desc); break; + case DESC_LDT: size = sizeof(ldt_desc); break; + default: size = sizeof(*gdt); break; + } + __builtin_memcpy(&gdt[entry], desc, size); +} +static inline __attribute__((always_inline)) void pack_descriptor(struct desc_struct *desc, unsigned long base, + unsigned long limit, unsigned char type, + unsigned char flags) +{ + desc->a = ((base & 0xffff) << 16) | (limit & 0xffff); + desc->b = (base & 0xff000000) | ((base & 0xff0000) >> 16) | + (limit & 0x000f0000) | ((type & 0xff) << 8) | + ((flags & 0xf) << 20); + desc->p = 1; +} +static inline __attribute__((always_inline)) void set_tssldt_descriptor(void *d, unsigned long addr, unsigned type, unsigned size) +{ + pack_descriptor((struct desc_struct *)d, addr, size, 0x80 | type, 0); +} +static inline __attribute__((always_inline)) void __set_tss_desc(unsigned cpu, unsigned int entry, void *addr) +{ + struct desc_struct *d = get_cpu_gdt_table(cpu); + tss_desc tss; + set_tssldt_descriptor(&tss, (unsigned long)addr, DESC_TSS, + __builtin_offsetof(struct tss_struct,io_bitmap) + (65536/8) + + sizeof(unsigned long) - 1); + write_gdt_entry(d, entry, &tss, DESC_TSS); +} +static inline __attribute__((always_inline)) void native_set_ldt(const void *addr, unsigned int entries) +{ + if (__builtin_constant_p((((__builtin_constant_p(entries == 0) ? !!(entries == 0) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 194, }; ______r = __builtin_expect(!!(entries == 0), 1); ftrace_likely_update(&______f, ______r, 1); ______r; }))))) ? !!(((__builtin_constant_p(entries == 0) ? !!(entries == 0) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 194, }; ______r = __builtin_expect(!!(entries == 0), 1); ftrace_likely_update(&______f, ______r, 1); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 194, }; ______r = !!(((__builtin_constant_p(entries == 0) ? !!(entries == 0) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 194, }; ______r = __builtin_expect(!!(entries == 0), 1); ftrace_likely_update(&______f, ______r, 1); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + asm volatile("lldt %w0"::"q" (0)); + else { + unsigned cpu = debug_smp_processor_id(); + ldt_desc ldt; + set_tssldt_descriptor(&ldt, (unsigned long)addr, DESC_LDT, + entries * 8 - 1); + write_gdt_entry(get_cpu_gdt_table(cpu), ((12)+5), + &ldt, DESC_LDT); + asm volatile("lldt %w0"::"q" (((12)+5)*8)); + } +} +static inline __attribute__((always_inline)) void native_load_tr_desc(void) +{ + asm volatile("ltr %w0"::"q" (((12)+4)*8)); +} +static inline __attribute__((always_inline)) void native_load_gdt(const struct desc_ptr *dtr) +{ + asm volatile("lgdt %0"::"m" (*dtr)); +} +static inline __attribute__((always_inline)) void native_load_idt(const struct desc_ptr *dtr) +{ + asm volatile("lidt %0"::"m" (*dtr)); +} +static inline __attribute__((always_inline)) void native_store_gdt(struct desc_ptr *dtr) +{ + asm volatile("sgdt %0":"=m" (*dtr)); +} +static inline __attribute__((always_inline)) void native_store_idt(struct desc_ptr *dtr) +{ + asm volatile("sidt %0":"=m" (*dtr)); +} +static inline __attribute__((always_inline)) unsigned long native_store_tr(void) +{ + unsigned long tr; + asm volatile("str %0":"=r" (tr)); + return tr; +} +static inline __attribute__((always_inline)) void native_load_tls(struct thread_struct *t, unsigned int cpu) +{ + struct desc_struct *gdt = get_cpu_gdt_table(cpu); + unsigned int i; + for (i = 0; i < 3; i++) + gdt[6 + i] = t->tls_array[i]; +} +static inline __attribute__((always_inline)) void clear_LDT(void) +{ + set_ldt(((void *)0), 0); +} +static inline __attribute__((always_inline)) void load_LDT_nolock(mm_context_t *pc) +{ + set_ldt(pc->ldt, pc->size); +} +static inline __attribute__((always_inline)) void load_LDT(mm_context_t *pc) +{ + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + load_LDT_nolock(pc); + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 284, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 284, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 284, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 284, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); +} +static inline __attribute__((always_inline)) unsigned long get_desc_base(const struct desc_struct *desc) +{ + return (unsigned)(desc->base0 | ((desc->base1) << 16) | ((desc->base2) << 24)); +} +static inline __attribute__((always_inline)) void set_desc_base(struct desc_struct *desc, unsigned long base) +{ + desc->base0 = base & 0xffff; + desc->base1 = (base >> 16) & 0xff; + desc->base2 = (base >> 24) & 0xff; +} +static inline __attribute__((always_inline)) unsigned long get_desc_limit(const struct desc_struct *desc) +{ + return desc->limit0 | (desc->limit << 16); +} +static inline __attribute__((always_inline)) void set_desc_limit(struct desc_struct *desc, unsigned long limit) +{ + desc->limit0 = limit & 0xffff; + desc->limit = (limit >> 16) & 0xf; +} +static inline __attribute__((always_inline)) void _set_gate(int gate, unsigned type, void *addr, + unsigned dpl, unsigned ist, unsigned seg) +{ + gate_desc s; + pack_gate(&s, type, (unsigned long)addr, dpl, ist, seg); + write_idt_entry(idt_table, gate, &s); +} +static inline __attribute__((always_inline)) void set_intr_gate(unsigned int n, void *addr) +{ + do { if (__builtin_constant_p((((__builtin_constant_p((unsigned)n > 0xFF) ? !!((unsigned)n > 0xFF) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 331, }; ______r = __builtin_expect(!!((unsigned)n > 0xFF), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p((unsigned)n > 0xFF) ? !!((unsigned)n > 0xFF) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 331, }; ______r = __builtin_expect(!!((unsigned)n > 0xFF), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 331, }; ______r = !!(((__builtin_constant_p((unsigned)n > 0xFF) ? !!((unsigned)n > 0xFF) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 331, }; ______r = __builtin_expect(!!((unsigned)n > 0xFF), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h"), "i" (331), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); } while(0); + _set_gate(n, GATE_INTERRUPT, addr, 0, 0, (((12)+0)*8)); +} +extern int first_system_vector; +extern unsigned long used_vectors[]; +static inline __attribute__((always_inline)) void alloc_system_vector(int vector) +{ + if (__builtin_constant_p(((!(__builtin_constant_p((vector)) ? constant_test_bit((vector), (used_vectors)) : variable_test_bit((vector), (used_vectors)))))) ? !!((!(__builtin_constant_p((vector)) ? constant_test_bit((vector), (used_vectors)) : variable_test_bit((vector), (used_vectors))))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 341, }; ______r = !!((!(__builtin_constant_p((vector)) ? constant_test_bit((vector), (used_vectors)) : variable_test_bit((vector), (used_vectors))))); ______f.miss_hit[______r]++; ______r; })) { + set_bit(vector, used_vectors); + if (__builtin_constant_p(((first_system_vector > vector))) ? !!((first_system_vector > vector)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 343, }; ______r = !!((first_system_vector > vector)); ______f.miss_hit[______r]++; ______r; })) + first_system_vector = vector; + } else { + do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h"), "i" (346), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); + } +} +static inline __attribute__((always_inline)) void alloc_intr_gate(unsigned int n, void *addr) +{ + alloc_system_vector(n); + set_intr_gate(n, addr); +} +static inline __attribute__((always_inline)) void set_system_intr_gate(unsigned int n, void *addr) +{ + do { if (__builtin_constant_p((((__builtin_constant_p((unsigned)n > 0xFF) ? !!((unsigned)n > 0xFF) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 361, }; ______r = __builtin_expect(!!((unsigned)n > 0xFF), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p((unsigned)n > 0xFF) ? !!((unsigned)n > 0xFF) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 361, }; ______r = __builtin_expect(!!((unsigned)n > 0xFF), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 361, }; ______r = !!(((__builtin_constant_p((unsigned)n > 0xFF) ? !!((unsigned)n > 0xFF) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 361, }; ______r = __builtin_expect(!!((unsigned)n > 0xFF), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h"), "i" (361), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); } while(0); + _set_gate(n, GATE_INTERRUPT, addr, 0x3, 0, (((12)+0)*8)); +} +static inline __attribute__((always_inline)) void set_system_trap_gate(unsigned int n, void *addr) +{ + do { if (__builtin_constant_p((((__builtin_constant_p((unsigned)n > 0xFF) ? !!((unsigned)n > 0xFF) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 367, }; ______r = __builtin_expect(!!((unsigned)n > 0xFF), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p((unsigned)n > 0xFF) ? !!((unsigned)n > 0xFF) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 367, }; ______r = __builtin_expect(!!((unsigned)n > 0xFF), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 367, }; ______r = !!(((__builtin_constant_p((unsigned)n > 0xFF) ? !!((unsigned)n > 0xFF) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 367, }; ______r = __builtin_expect(!!((unsigned)n > 0xFF), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h"), "i" (367), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); } while(0); + _set_gate(n, GATE_TRAP, addr, 0x3, 0, (((12)+0)*8)); +} +static inline __attribute__((always_inline)) void set_trap_gate(unsigned int n, void *addr) +{ + do { if (__builtin_constant_p((((__builtin_constant_p((unsigned)n > 0xFF) ? !!((unsigned)n > 0xFF) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 373, }; ______r = __builtin_expect(!!((unsigned)n > 0xFF), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p((unsigned)n > 0xFF) ? !!((unsigned)n > 0xFF) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 373, }; ______r = __builtin_expect(!!((unsigned)n > 0xFF), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 373, }; ______r = !!(((__builtin_constant_p((unsigned)n > 0xFF) ? !!((unsigned)n > 0xFF) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 373, }; ______r = __builtin_expect(!!((unsigned)n > 0xFF), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h"), "i" (373), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); } while(0); + _set_gate(n, GATE_TRAP, addr, 0, 0, (((12)+0)*8)); +} +static inline __attribute__((always_inline)) void set_task_gate(unsigned int n, unsigned int gdt_entry) +{ + do { if (__builtin_constant_p((((__builtin_constant_p((unsigned)n > 0xFF) ? !!((unsigned)n > 0xFF) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 379, }; ______r = __builtin_expect(!!((unsigned)n > 0xFF), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p((unsigned)n > 0xFF) ? !!((unsigned)n > 0xFF) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 379, }; ______r = __builtin_expect(!!((unsigned)n > 0xFF), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 379, }; ______r = !!(((__builtin_constant_p((unsigned)n > 0xFF) ? !!((unsigned)n > 0xFF) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 379, }; ______r = __builtin_expect(!!((unsigned)n > 0xFF), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h"), "i" (379), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); } while(0); + _set_gate(n, GATE_TASK, (void *)0, 0, 0, (gdt_entry<<3)); +} +static inline __attribute__((always_inline)) void set_intr_gate_ist(int n, void *addr, unsigned ist) +{ + do { if (__builtin_constant_p((((__builtin_constant_p((unsigned)n > 0xFF) ? !!((unsigned)n > 0xFF) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 385, }; ______r = __builtin_expect(!!((unsigned)n > 0xFF), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p((unsigned)n > 0xFF) ? !!((unsigned)n > 0xFF) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 385, }; ______r = __builtin_expect(!!((unsigned)n > 0xFF), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 385, }; ______r = !!(((__builtin_constant_p((unsigned)n > 0xFF) ? !!((unsigned)n > 0xFF) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 385, }; ______r = __builtin_expect(!!((unsigned)n > 0xFF), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h"), "i" (385), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); } while(0); + _set_gate(n, GATE_INTERRUPT, addr, 0, ist, (((12)+0)*8)); +} +static inline __attribute__((always_inline)) void set_system_intr_gate_ist(int n, void *addr, unsigned ist) +{ + do { if (__builtin_constant_p((((__builtin_constant_p((unsigned)n > 0xFF) ? !!((unsigned)n > 0xFF) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 391, }; ______r = __builtin_expect(!!((unsigned)n > 0xFF), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p((unsigned)n > 0xFF) ? !!((unsigned)n > 0xFF) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 391, }; ______r = __builtin_expect(!!((unsigned)n > 0xFF), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 391, }; ______r = !!(((__builtin_constant_p((unsigned)n > 0xFF) ? !!((unsigned)n > 0xFF) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h", .line = 391, }; ______r = __builtin_expect(!!((unsigned)n > 0xFF), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("/data/exp/linux-3.0.4/arch/x86/include/asm/desc.h"), "i" (391), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); } while(0); + _set_gate(n, GATE_INTERRUPT, addr, 0x3, ist, (((12)+0)*8)); +} +struct task_struct; +struct linux_binprm; +extern int arch_setup_additional_pages(struct linux_binprm *bprm, + int uses_interp); +extern int syscall32_setup_pages(struct linux_binprm *, int exstack); +extern unsigned long arch_randomize_brk(struct mm_struct *mm); +struct file; +typedef __u32 Elf32_Addr; +typedef __u16 Elf32_Half; +typedef __u32 Elf32_Off; +typedef __s32 Elf32_Sword; +typedef __u32 Elf32_Word; +typedef __u64 Elf64_Addr; +typedef __u16 Elf64_Half; +typedef __s16 Elf64_SHalf; +typedef __u64 Elf64_Off; +typedef __s32 Elf64_Sword; +typedef __u32 Elf64_Word; +typedef __u64 Elf64_Xword; +typedef __s64 Elf64_Sxword; +typedef struct dynamic{ + Elf32_Sword d_tag; + union{ + Elf32_Sword d_val; + Elf32_Addr d_ptr; + } d_un; +} Elf32_Dyn; +typedef struct { + Elf64_Sxword d_tag; + union { + Elf64_Xword d_val; + Elf64_Addr d_ptr; + } d_un; +} Elf64_Dyn; +typedef struct elf32_rel { + Elf32_Addr r_offset; + Elf32_Word r_info; +} Elf32_Rel; +typedef struct elf64_rel { + Elf64_Addr r_offset; + Elf64_Xword r_info; +} Elf64_Rel; +typedef struct elf32_rela{ + Elf32_Addr r_offset; + Elf32_Word r_info; + Elf32_Sword r_addend; +} Elf32_Rela; +typedef struct elf64_rela { + Elf64_Addr r_offset; + Elf64_Xword r_info; + Elf64_Sxword r_addend; +} Elf64_Rela; +typedef struct elf32_sym{ + Elf32_Word st_name; + Elf32_Addr st_value; + Elf32_Word st_size; + unsigned char st_info; + unsigned char st_other; + Elf32_Half st_shndx; +} Elf32_Sym; +typedef struct elf64_sym { + Elf64_Word st_name; + unsigned char st_info; + unsigned char st_other; + Elf64_Half st_shndx; + Elf64_Addr st_value; + Elf64_Xword st_size; +} Elf64_Sym; +typedef struct elf32_hdr{ + unsigned char e_ident[16]; + Elf32_Half e_type; + Elf32_Half e_machine; + Elf32_Word e_version; + Elf32_Addr e_entry; + Elf32_Off e_phoff; + Elf32_Off e_shoff; + Elf32_Word e_flags; + Elf32_Half e_ehsize; + Elf32_Half e_phentsize; + Elf32_Half e_phnum; + Elf32_Half e_shentsize; + Elf32_Half e_shnum; + Elf32_Half e_shstrndx; +} Elf32_Ehdr; +typedef struct elf64_hdr { + unsigned char e_ident[16]; + Elf64_Half e_type; + Elf64_Half e_machine; + Elf64_Word e_version; + Elf64_Addr e_entry; + Elf64_Off e_phoff; + Elf64_Off e_shoff; + Elf64_Word e_flags; + Elf64_Half e_ehsize; + Elf64_Half e_phentsize; + Elf64_Half e_phnum; + Elf64_Half e_shentsize; + Elf64_Half e_shnum; + Elf64_Half e_shstrndx; +} Elf64_Ehdr; +typedef struct elf32_phdr{ + Elf32_Word p_type; + Elf32_Off p_offset; + Elf32_Addr p_vaddr; + Elf32_Addr p_paddr; + Elf32_Word p_filesz; + Elf32_Word p_memsz; + Elf32_Word p_flags; + Elf32_Word p_align; +} Elf32_Phdr; +typedef struct elf64_phdr { + Elf64_Word p_type; + Elf64_Word p_flags; + Elf64_Off p_offset; + Elf64_Addr p_vaddr; + Elf64_Addr p_paddr; + Elf64_Xword p_filesz; + Elf64_Xword p_memsz; + Elf64_Xword p_align; +} Elf64_Phdr; +typedef struct elf32_shdr { + Elf32_Word sh_name; + Elf32_Word sh_type; + Elf32_Word sh_flags; + Elf32_Addr sh_addr; + Elf32_Off sh_offset; + Elf32_Word sh_size; + Elf32_Word sh_link; + Elf32_Word sh_info; + Elf32_Word sh_addralign; + Elf32_Word sh_entsize; +} Elf32_Shdr; +typedef struct elf64_shdr { + Elf64_Word sh_name; + Elf64_Word sh_type; + Elf64_Xword sh_flags; + Elf64_Addr sh_addr; + Elf64_Off sh_offset; + Elf64_Xword sh_size; + Elf64_Word sh_link; + Elf64_Word sh_info; + Elf64_Xword sh_addralign; + Elf64_Xword sh_entsize; +} Elf64_Shdr; +typedef struct elf32_note { + Elf32_Word n_namesz; + Elf32_Word n_descsz; + Elf32_Word n_type; +} Elf32_Nhdr; +typedef struct elf64_note { + Elf64_Word n_namesz; + Elf64_Word n_descsz; + Elf64_Word n_type; +} Elf64_Nhdr; +extern Elf32_Dyn _DYNAMIC []; +static inline __attribute__((always_inline)) int elf_coredump_extra_notes_size(void) { return 0; } +static inline __attribute__((always_inline)) int elf_coredump_extra_notes_write(struct file *file, + loff_t *foffset) { return 0; } +struct sock; +struct kobject; +enum kobj_ns_type { + KOBJ_NS_TYPE_NONE = 0, + KOBJ_NS_TYPE_NET, + KOBJ_NS_TYPES +}; +struct kobj_ns_type_operations { + enum kobj_ns_type type; + void *(*grab_current_ns)(void); + const void *(*netlink_ns)(struct sock *sk); + const void *(*initial_ns)(void); + void (*drop_ns)(void *); +}; +int kobj_ns_type_register(const struct kobj_ns_type_operations *ops); +int kobj_ns_type_registered(enum kobj_ns_type type); +const struct kobj_ns_type_operations *kobj_child_ns_ops(struct kobject *parent); +const struct kobj_ns_type_operations *kobj_ns_ops(struct kobject *kobj); +void *kobj_ns_grab_current(enum kobj_ns_type type); +const void *kobj_ns_netlink(enum kobj_ns_type type, struct sock *sk); +const void *kobj_ns_initial(enum kobj_ns_type type); +void kobj_ns_drop(enum kobj_ns_type type, void *ns); +struct kobject; +struct module; +enum kobj_ns_type; +struct attribute { + const char *name; + mode_t mode; + struct lock_class_key *key; + struct lock_class_key skey; +}; +struct attribute_group { + const char *name; + mode_t (*is_visible)(struct kobject *, + struct attribute *, int); + struct attribute **attrs; +}; +struct file; +struct vm_area_struct; +struct bin_attribute { + struct attribute attr; + size_t size; + void *private; + ssize_t (*read)(struct file *, struct kobject *, struct bin_attribute *, + char *, loff_t, size_t); + ssize_t (*write)(struct file *,struct kobject *, struct bin_attribute *, + char *, loff_t, size_t); + int (*mmap)(struct file *, struct kobject *, struct bin_attribute *attr, + struct vm_area_struct *vma); +}; +struct sysfs_ops { + ssize_t (*show)(struct kobject *, struct attribute *,char *); + ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); +}; +struct sysfs_dirent; +int sysfs_schedule_callback(struct kobject *kobj, void (*func)(void *), + void *data, struct module *owner); +int __attribute__((warn_unused_result)) sysfs_create_dir(struct kobject *kobj); +void sysfs_remove_dir(struct kobject *kobj); +int __attribute__((warn_unused_result)) sysfs_rename_dir(struct kobject *kobj, const char *new_name); +int __attribute__((warn_unused_result)) sysfs_move_dir(struct kobject *kobj, + struct kobject *new_parent_kobj); +int __attribute__((warn_unused_result)) sysfs_create_file(struct kobject *kobj, + const struct attribute *attr); +int __attribute__((warn_unused_result)) sysfs_create_files(struct kobject *kobj, + const struct attribute **attr); +int __attribute__((warn_unused_result)) sysfs_chmod_file(struct kobject *kobj, + const struct attribute *attr, mode_t mode); +void sysfs_remove_file(struct kobject *kobj, const struct attribute *attr); +void sysfs_remove_files(struct kobject *kobj, const struct attribute **attr); +int __attribute__((warn_unused_result)) sysfs_create_bin_file(struct kobject *kobj, + const struct bin_attribute *attr); +void sysfs_remove_bin_file(struct kobject *kobj, + const struct bin_attribute *attr); +int __attribute__((warn_unused_result)) sysfs_create_link(struct kobject *kobj, struct kobject *target, + const char *name); +int __attribute__((warn_unused_result)) sysfs_create_link_nowarn(struct kobject *kobj, + struct kobject *target, + const char *name); +void sysfs_remove_link(struct kobject *kobj, const char *name); +int sysfs_rename_link(struct kobject *kobj, struct kobject *target, + const char *old_name, const char *new_name); +void sysfs_delete_link(struct kobject *dir, struct kobject *targ, + const char *name); +int __attribute__((warn_unused_result)) sysfs_create_group(struct kobject *kobj, + const struct attribute_group *grp); +int sysfs_update_group(struct kobject *kobj, + const struct attribute_group *grp); +void sysfs_remove_group(struct kobject *kobj, + const struct attribute_group *grp); +int sysfs_add_file_to_group(struct kobject *kobj, + const struct attribute *attr, const char *group); +void sysfs_remove_file_from_group(struct kobject *kobj, + const struct attribute *attr, const char *group); +int sysfs_merge_group(struct kobject *kobj, + const struct attribute_group *grp); +void sysfs_unmerge_group(struct kobject *kobj, + const struct attribute_group *grp); +void sysfs_notify(struct kobject *kobj, const char *dir, const char *attr); +void sysfs_notify_dirent(struct sysfs_dirent *sd); +struct sysfs_dirent *sysfs_get_dirent(struct sysfs_dirent *parent_sd, + const void *ns, + const unsigned char *name); +struct sysfs_dirent *sysfs_get(struct sysfs_dirent *sd); +void sysfs_put(struct sysfs_dirent *sd); +int __attribute__((warn_unused_result)) sysfs_init(void); +struct kref { + atomic_t refcount; +}; +void kref_init(struct kref *kref); +void kref_get(struct kref *kref); +int kref_put(struct kref *kref, void (*release) (struct kref *kref)); +int kref_sub(struct kref *kref, unsigned int count, + void (*release) (struct kref *kref)); +extern char uevent_helper[]; +extern u64 uevent_seqnum; +enum kobject_action { + KOBJ_ADD, + KOBJ_REMOVE, + KOBJ_CHANGE, + KOBJ_MOVE, + KOBJ_ONLINE, + KOBJ_OFFLINE, + KOBJ_MAX +}; +struct kobject { + const char *name; + struct list_head entry; + struct kobject *parent; + struct kset *kset; + struct kobj_type *ktype; + struct sysfs_dirent *sd; + struct kref kref; + unsigned int state_initialized:1; + unsigned int state_in_sysfs:1; + unsigned int state_add_uevent_sent:1; + unsigned int state_remove_uevent_sent:1; + unsigned int uevent_suppress:1; +}; +extern int kobject_set_name(struct kobject *kobj, const char *name, ...) + __attribute__((format(printf, 2, 3))); +extern int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, + va_list vargs); +static inline __attribute__((always_inline)) const char *kobject_name(const struct kobject *kobj) +{ + return kobj->name; +} +extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype); +extern int __attribute__((warn_unused_result)) kobject_add(struct kobject *kobj, + struct kobject *parent, + const char *fmt, ...) + __attribute__((format(printf, 3, 4))); +extern int __attribute__((warn_unused_result)) kobject_init_and_add(struct kobject *kobj, + struct kobj_type *ktype, + struct kobject *parent, + const char *fmt, ...) + __attribute__((format(printf, 4, 5))); +extern void kobject_del(struct kobject *kobj); +extern struct kobject * __attribute__((warn_unused_result)) kobject_create(void); +extern struct kobject * __attribute__((warn_unused_result)) kobject_create_and_add(const char *name, + struct kobject *parent); +extern int __attribute__((warn_unused_result)) kobject_rename(struct kobject *, const char *new_name); +extern int __attribute__((warn_unused_result)) kobject_move(struct kobject *, struct kobject *); +extern struct kobject *kobject_get(struct kobject *kobj); +extern void kobject_put(struct kobject *kobj); +extern char *kobject_get_path(struct kobject *kobj, gfp_t flag); +struct kobj_type { + void (*release)(struct kobject *kobj); + const struct sysfs_ops *sysfs_ops; + struct attribute **default_attrs; + const struct kobj_ns_type_operations *(*child_ns_type)(struct kobject *kobj); + const void *(*namespace)(struct kobject *kobj); +}; +struct kobj_uevent_env { + char *envp[32]; + int envp_idx; + char buf[2048]; + int buflen; +}; +struct kset_uevent_ops { + int (* const filter)(struct kset *kset, struct kobject *kobj); + const char *(* const name)(struct kset *kset, struct kobject *kobj); + int (* const uevent)(struct kset *kset, struct kobject *kobj, + struct kobj_uevent_env *env); +}; +struct kobj_attribute { + struct attribute attr; + ssize_t (*show)(struct kobject *kobj, struct kobj_attribute *attr, + char *buf); + ssize_t (*store)(struct kobject *kobj, struct kobj_attribute *attr, + const char *buf, size_t count); +}; +extern const struct sysfs_ops kobj_sysfs_ops; +struct sock; +struct kset { + struct list_head list; + spinlock_t list_lock; + struct kobject kobj; + const struct kset_uevent_ops *uevent_ops; +}; +extern void kset_init(struct kset *kset); +extern int __attribute__((warn_unused_result)) kset_register(struct kset *kset); +extern void kset_unregister(struct kset *kset); +extern struct kset * __attribute__((warn_unused_result)) kset_create_and_add(const char *name, + const struct kset_uevent_ops *u, + struct kobject *parent_kobj); +static inline __attribute__((always_inline)) struct kset *to_kset(struct kobject *kobj) +{ + return kobj ? ({ const typeof( ((struct kset *)0)->kobj ) *__mptr = (kobj); (struct kset *)( (char *)__mptr - __builtin_offsetof(struct kset,kobj) );}) : ((void *)0); +} +static inline __attribute__((always_inline)) struct kset *kset_get(struct kset *k) +{ + return k ? to_kset(kobject_get(&k->kobj)) : ((void *)0); +} +static inline __attribute__((always_inline)) void kset_put(struct kset *k) +{ + kobject_put(&k->kobj); +} +static inline __attribute__((always_inline)) struct kobj_type *get_ktype(struct kobject *kobj) +{ + return kobj->ktype; +} +extern struct kobject *kset_find_obj(struct kset *, const char *); +extern struct kobject *kset_find_obj_hinted(struct kset *, const char *, + struct kobject *); +extern struct kobject *kernel_kobj; +extern struct kobject *mm_kobj; +extern struct kobject *hypervisor_kobj; +extern struct kobject *power_kobj; +extern struct kobject *firmware_kobj; +int kobject_uevent(struct kobject *kobj, enum kobject_action action); +int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, + char *envp[]); +int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) + __attribute__((format (printf, 2, 3))); +int kobject_action_type(const char *buf, size_t count, + enum kobject_action *type); +struct kernel_param; +struct kernel_param_ops { + int (*set)(const char *val, const struct kernel_param *kp); + int (*get)(char *buffer, const struct kernel_param *kp); + void (*free)(void *arg); +}; +struct kernel_param { + const char *name; + const struct kernel_param_ops *ops; + u16 perm; + u16 flags; + union { + void *arg; + const struct kparam_string *str; + const struct kparam_array *arr; + }; +}; +struct kparam_string { + unsigned int maxlen; + char *string; +}; +struct kparam_array +{ + unsigned int max; + unsigned int elemsize; + unsigned int *num; + const struct kernel_param_ops *ops; + void *elem; +}; +static inline __attribute__((always_inline)) int +__check_old_set_param(int (*oldset)(const char *, struct kernel_param *)) +{ + return 0; +} +extern void __kernel_param_lock(void); +extern void __kernel_param_unlock(void); +extern int parse_args(const char *name, + char *args, + const struct kernel_param *params, + unsigned num, + int (*unknown)(char *param, char *val)); +extern void destroy_params(const struct kernel_param *params, unsigned num); +extern struct kernel_param_ops param_ops_byte; +extern int param_set_byte(const char *val, const struct kernel_param *kp); +extern int param_get_byte(char *buffer, const struct kernel_param *kp); +extern struct kernel_param_ops param_ops_short; +extern int param_set_short(const char *val, const struct kernel_param *kp); +extern int param_get_short(char *buffer, const struct kernel_param *kp); +extern struct kernel_param_ops param_ops_ushort; +extern int param_set_ushort(const char *val, const struct kernel_param *kp); +extern int param_get_ushort(char *buffer, const struct kernel_param *kp); +extern struct kernel_param_ops param_ops_int; +extern int param_set_int(const char *val, const struct kernel_param *kp); +extern int param_get_int(char *buffer, const struct kernel_param *kp); +extern struct kernel_param_ops param_ops_uint; +extern int param_set_uint(const char *val, const struct kernel_param *kp); +extern int param_get_uint(char *buffer, const struct kernel_param *kp); +extern struct kernel_param_ops param_ops_long; +extern int param_set_long(const char *val, const struct kernel_param *kp); +extern int param_get_long(char *buffer, const struct kernel_param *kp); +extern struct kernel_param_ops param_ops_ulong; +extern int param_set_ulong(const char *val, const struct kernel_param *kp); +extern int param_get_ulong(char *buffer, const struct kernel_param *kp); +extern struct kernel_param_ops param_ops_charp; +extern int param_set_charp(const char *val, const struct kernel_param *kp); +extern int param_get_charp(char *buffer, const struct kernel_param *kp); +extern struct kernel_param_ops param_ops_bool; +extern int param_set_bool(const char *val, const struct kernel_param *kp); +extern int param_get_bool(char *buffer, const struct kernel_param *kp); +extern struct kernel_param_ops param_ops_invbool; +extern int param_set_invbool(const char *val, const struct kernel_param *kp); +extern int param_get_invbool(char *buffer, const struct kernel_param *kp); +extern struct kernel_param_ops param_array_ops; +extern struct kernel_param_ops param_ops_string; +extern int param_set_copystring(const char *val, const struct kernel_param *); +extern int param_get_string(char *buffer, const struct kernel_param *kp); +struct module; +extern int module_param_sysfs_setup(struct module *mod, + const struct kernel_param *kparam, + unsigned int num_params); +extern void module_param_sysfs_remove(struct module *mod); +struct jump_label_key { + atomic_t enabled; + struct jump_entry *entries; + struct jump_label_mod *next; +}; +static inline __attribute__((always_inline)) __attribute__((always_inline)) bool arch_static_branch(struct jump_label_key *key) +{ + asm goto("1:" + ".byte 0xe9 \n\t .long 0\n\t" + ".pushsection __jump_table, \"aw\" \n\t" + " " ".balign 4" " " "\n\t" + " " ".long" " " "1b, %l[l_yes], %c0 \n\t" + ".popsection \n\t" + : : "i" (key) : : l_yes); + return false; +l_yes: + return true; +} +typedef u32 jump_label_t; +struct jump_entry { + jump_label_t code; + jump_label_t target; + jump_label_t key; +}; +enum jump_label_type { + JUMP_LABEL_DISABLE = 0, + JUMP_LABEL_ENABLE, +}; +struct module; +static inline __attribute__((always_inline)) __attribute__((always_inline)) bool static_branch(struct jump_label_key *key) +{ + return arch_static_branch(key); +} +extern struct jump_entry __start___jump_table[]; +extern struct jump_entry __stop___jump_table[]; +extern void jump_label_lock(void); +extern void jump_label_unlock(void); +extern void arch_jump_label_transform(struct jump_entry *entry, + enum jump_label_type type); +extern void arch_jump_label_text_poke_early(jump_label_t addr); +extern int jump_label_text_reserved(void *start, void *end); +extern void jump_label_inc(struct jump_label_key *key); +extern void jump_label_dec(struct jump_label_key *key); +extern bool jump_label_enabled(struct jump_label_key *key); +extern void jump_label_apply_nops(struct module *mod); +struct module; +struct tracepoint; +struct tracepoint_func { + void *func; + void *data; +}; +struct tracepoint { + const char *name; + struct jump_label_key key; + void (*regfunc)(void); + void (*unregfunc)(void); + struct tracepoint_func *funcs; +}; +extern int tracepoint_probe_register(const char *name, void *probe, void *data); +extern int +tracepoint_probe_unregister(const char *name, void *probe, void *data); +extern int tracepoint_probe_register_noupdate(const char *name, void *probe, + void *data); +extern int tracepoint_probe_unregister_noupdate(const char *name, void *probe, + void *data); +extern void tracepoint_probe_update_all(void); +struct tracepoint_iter { + struct module *module; + struct tracepoint * const *tracepoint; +}; +extern void tracepoint_iter_start(struct tracepoint_iter *iter); +extern void tracepoint_iter_next(struct tracepoint_iter *iter); +extern void tracepoint_iter_stop(struct tracepoint_iter *iter); +extern void tracepoint_iter_reset(struct tracepoint_iter *iter); +extern int tracepoint_get_iter_range(struct tracepoint * const **tracepoint, + struct tracepoint * const *begin, struct tracepoint * const *end); +static inline __attribute__((always_inline)) void tracepoint_synchronize_unregister(void) +{ + synchronize_sched(); +} +extern +void tracepoint_update_probe_range(struct tracepoint * const *begin, + struct tracepoint * const *end); +struct mod_arch_specific +{ +}; +struct module; +extern struct tracepoint + __tracepoint_module_load + ; static inline __attribute__((always_inline)) void + trace_module_load + (struct module *mod) { if (__builtin_constant_p(((static_branch(&__tracepoint_module_load.key)))) ? !!((static_branch(&__tracepoint_module_load.key))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/module.h" + , .line = + 45 + , }; ______r = !!((static_branch(&__tracepoint_module_load.key))); ______f.miss_hit[______r]++; ______r; })) do { struct tracepoint_func *it_func_ptr; void *it_func; void *__data; if (__builtin_constant_p(((!(1)))) ? !!((!(1))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/module.h" + , .line = + 45 + , }; ______r = !!((!(1))); ______f.miss_hit[______r]++; ______r; })) return; rcu_read_lock_sched_notrace(); it_func_ptr = ({ typeof(*((&__tracepoint_module_load)->funcs)) *_________p1 = (typeof(*((&__tracepoint_module_load)->funcs))* )(*(volatile typeof(((&__tracepoint_module_load)->funcs)) *)&(((&__tracepoint_module_load)->funcs))); do { } while (0); ; do { } while (0); ((typeof(*((&__tracepoint_module_load)->funcs)) *)(_________p1)); }); if (__builtin_constant_p(((it_func_ptr))) ? !!((it_func_ptr)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/module.h" + , .line = + 45 + , }; ______r = !!((it_func_ptr)); ______f.miss_hit[______r]++; ______r; })) { do { it_func = (it_func_ptr)->func; __data = (it_func_ptr)->data; ((void(*)(void *__data, struct module *mod))(it_func))(__data, mod); } while ((++it_func_ptr)->func); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int + register_trace_module_load + (void (*probe)(void *__data, struct module *mod), void *data) { return tracepoint_probe_register("module_load", (void *)probe, data); } static inline __attribute__((always_inline)) int + unregister_trace_module_load + (void (*probe)(void *__data, struct module *mod), void *data) { return tracepoint_probe_unregister("module_load", (void *)probe, data); } static inline __attribute__((always_inline)) void + check_trace_callback_type_module_load + (void (*cb)(void *__data, struct module *mod)) { } + ; +extern struct tracepoint + __tracepoint_module_free + ; static inline __attribute__((always_inline)) void + trace_module_free + (struct module *mod) { if (__builtin_constant_p(((static_branch(&__tracepoint_module_free.key)))) ? !!((static_branch(&__tracepoint_module_free.key))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/module.h" + , .line = + 62 + , }; ______r = !!((static_branch(&__tracepoint_module_free.key))); ______f.miss_hit[______r]++; ______r; })) do { struct tracepoint_func *it_func_ptr; void *it_func; void *__data; if (__builtin_constant_p(((!(1)))) ? !!((!(1))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/module.h" + , .line = + 62 + , }; ______r = !!((!(1))); ______f.miss_hit[______r]++; ______r; })) return; rcu_read_lock_sched_notrace(); it_func_ptr = ({ typeof(*((&__tracepoint_module_free)->funcs)) *_________p1 = (typeof(*((&__tracepoint_module_free)->funcs))* )(*(volatile typeof(((&__tracepoint_module_free)->funcs)) *)&(((&__tracepoint_module_free)->funcs))); do { } while (0); ; do { } while (0); ((typeof(*((&__tracepoint_module_free)->funcs)) *)(_________p1)); }); if (__builtin_constant_p(((it_func_ptr))) ? !!((it_func_ptr)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/module.h" + , .line = + 62 + , }; ______r = !!((it_func_ptr)); ______f.miss_hit[______r]++; ______r; })) { do { it_func = (it_func_ptr)->func; __data = (it_func_ptr)->data; ((void(*)(void *__data, struct module *mod))(it_func))(__data, mod); } while ((++it_func_ptr)->func); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int + register_trace_module_free + (void (*probe)(void *__data, struct module *mod), void *data) { return tracepoint_probe_register("module_free", (void *)probe, data); } static inline __attribute__((always_inline)) int + unregister_trace_module_free + (void (*probe)(void *__data, struct module *mod), void *data) { return tracepoint_probe_unregister("module_free", (void *)probe, data); } static inline __attribute__((always_inline)) void + check_trace_callback_type_module_free + (void (*cb)(void *__data, struct module *mod)) { } + ; + ; +extern struct tracepoint + __tracepoint_module_get + ; static inline __attribute__((always_inline)) void + trace_module_get + (struct module *mod, unsigned long ip) { if (__builtin_constant_p(((static_branch(&__tracepoint_module_get.key)))) ? !!((static_branch(&__tracepoint_module_get.key))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/module.h" + , .line = + 94 + , }; ______r = !!((static_branch(&__tracepoint_module_get.key))); ______f.miss_hit[______r]++; ______r; })) do { struct tracepoint_func *it_func_ptr; void *it_func; void *__data; if (__builtin_constant_p(((!(1)))) ? !!((!(1))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/module.h" + , .line = + 94 + , }; ______r = !!((!(1))); ______f.miss_hit[______r]++; ______r; })) return; rcu_read_lock_sched_notrace(); it_func_ptr = ({ typeof(*((&__tracepoint_module_get)->funcs)) *_________p1 = (typeof(*((&__tracepoint_module_get)->funcs))* )(*(volatile typeof(((&__tracepoint_module_get)->funcs)) *)&(((&__tracepoint_module_get)->funcs))); do { } while (0); ; do { } while (0); ((typeof(*((&__tracepoint_module_get)->funcs)) *)(_________p1)); }); if (__builtin_constant_p(((it_func_ptr))) ? !!((it_func_ptr)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/module.h" + , .line = + 94 + , }; ______r = !!((it_func_ptr)); ______f.miss_hit[______r]++; ______r; })) { do { it_func = (it_func_ptr)->func; __data = (it_func_ptr)->data; ((void(*)(void *__data, struct module *mod, unsigned long ip))(it_func))(__data, mod, ip); } while ((++it_func_ptr)->func); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int + register_trace_module_get + (void (*probe)(void *__data, struct module *mod, unsigned long ip), void *data) { return tracepoint_probe_register("module_get", (void *)probe, data); } static inline __attribute__((always_inline)) int + unregister_trace_module_get + (void (*probe)(void *__data, struct module *mod, unsigned long ip), void *data) { return tracepoint_probe_unregister("module_get", (void *)probe, data); } static inline __attribute__((always_inline)) void + check_trace_callback_type_module_get + (void (*cb)(void *__data, struct module *mod, unsigned long ip)) { } + ; +extern struct tracepoint + __tracepoint_module_put + ; static inline __attribute__((always_inline)) void + trace_module_put + (struct module *mod, unsigned long ip) { if (__builtin_constant_p(((static_branch(&__tracepoint_module_put.key)))) ? !!((static_branch(&__tracepoint_module_put.key))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/module.h" + , .line = + 101 + , }; ______r = !!((static_branch(&__tracepoint_module_put.key))); ______f.miss_hit[______r]++; ______r; })) do { struct tracepoint_func *it_func_ptr; void *it_func; void *__data; if (__builtin_constant_p(((!(1)))) ? !!((!(1))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/module.h" + , .line = + 101 + , }; ______r = !!((!(1))); ______f.miss_hit[______r]++; ______r; })) return; rcu_read_lock_sched_notrace(); it_func_ptr = ({ typeof(*((&__tracepoint_module_put)->funcs)) *_________p1 = (typeof(*((&__tracepoint_module_put)->funcs))* )(*(volatile typeof(((&__tracepoint_module_put)->funcs)) *)&(((&__tracepoint_module_put)->funcs))); do { } while (0); ; do { } while (0); ((typeof(*((&__tracepoint_module_put)->funcs)) *)(_________p1)); }); if (__builtin_constant_p(((it_func_ptr))) ? !!((it_func_ptr)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/module.h" + , .line = + 101 + , }; ______r = !!((it_func_ptr)); ______f.miss_hit[______r]++; ______r; })) { do { it_func = (it_func_ptr)->func; __data = (it_func_ptr)->data; ((void(*)(void *__data, struct module *mod, unsigned long ip))(it_func))(__data, mod, ip); } while ((++it_func_ptr)->func); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int + register_trace_module_put + (void (*probe)(void *__data, struct module *mod, unsigned long ip), void *data) { return tracepoint_probe_register("module_put", (void *)probe, data); } static inline __attribute__((always_inline)) int + unregister_trace_module_put + (void (*probe)(void *__data, struct module *mod, unsigned long ip), void *data) { return tracepoint_probe_unregister("module_put", (void *)probe, data); } static inline __attribute__((always_inline)) void + check_trace_callback_type_module_put + (void (*cb)(void *__data, struct module *mod, unsigned long ip)) { } + ; +extern struct tracepoint + __tracepoint_module_request + ; static inline __attribute__((always_inline)) void + trace_module_request + (char *name, bool wait, unsigned long ip) { if (__builtin_constant_p(((static_branch(&__tracepoint_module_request.key)))) ? !!((static_branch(&__tracepoint_module_request.key))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/module.h" + , .line = + 124 + , }; ______r = !!((static_branch(&__tracepoint_module_request.key))); ______f.miss_hit[______r]++; ______r; })) do { struct tracepoint_func *it_func_ptr; void *it_func; void *__data; if (__builtin_constant_p(((!(1)))) ? !!((!(1))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/module.h" + , .line = + 124 + , }; ______r = !!((!(1))); ______f.miss_hit[______r]++; ______r; })) return; rcu_read_lock_sched_notrace(); it_func_ptr = ({ typeof(*((&__tracepoint_module_request)->funcs)) *_________p1 = (typeof(*((&__tracepoint_module_request)->funcs))* )(*(volatile typeof(((&__tracepoint_module_request)->funcs)) *)&(((&__tracepoint_module_request)->funcs))); do { } while (0); ; do { } while (0); ((typeof(*((&__tracepoint_module_request)->funcs)) *)(_________p1)); }); if (__builtin_constant_p(((it_func_ptr))) ? !!((it_func_ptr)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/module.h" + , .line = + 124 + , }; ______r = !!((it_func_ptr)); ______f.miss_hit[______r]++; ______r; })) { do { it_func = (it_func_ptr)->func; __data = (it_func_ptr)->data; ((void(*)(void *__data, char *name, bool wait, unsigned long ip))(it_func))(__data, name, wait, ip); } while ((++it_func_ptr)->func); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int + register_trace_module_request + (void (*probe)(void *__data, char *name, bool wait, unsigned long ip), void *data) { return tracepoint_probe_register("module_request", (void *)probe, data); } static inline __attribute__((always_inline)) int + unregister_trace_module_request + (void (*probe)(void *__data, char *name, bool wait, unsigned long ip), void *data) { return tracepoint_probe_unregister("module_request", (void *)probe, data); } static inline __attribute__((always_inline)) void + check_trace_callback_type_module_request + (void (*cb)(void *__data, char *name, bool wait, unsigned long ip)) { } + ; +struct kernel_symbol +{ + unsigned long value; + const char *name; +}; +struct modversion_info +{ + unsigned long crc; + char name[(64 - sizeof(unsigned long))]; +}; +struct module; +struct module_attribute { + struct attribute attr; + ssize_t (*show)(struct module_attribute *, struct module *, char *); + ssize_t (*store)(struct module_attribute *, struct module *, + const char *, size_t count); + void (*setup)(struct module *, const char *); + int (*test)(struct module *); + void (*free)(struct module *); +}; +struct module_version_attribute { + struct module_attribute mattr; + const char *module_name; + const char *version; +} __attribute__ ((__aligned__(sizeof(void *)))); +extern ssize_t __modver_version_show(struct module_attribute *, + struct module *, char *); +struct module_kobject +{ + struct kobject kobj; + struct module *mod; + struct kobject *drivers_dir; + struct module_param_attrs *mp; +}; +extern int init_module(void); +extern void cleanup_module(void); +struct exception_table_entry; +const struct exception_table_entry * +search_extable(const struct exception_table_entry *first, + const struct exception_table_entry *last, + unsigned long value); +void sort_extable(struct exception_table_entry *start, + struct exception_table_entry *finish); +void sort_main_extable(void); +void trim_init_extable(struct module *m); +extern struct module __this_module; +const struct exception_table_entry *search_exception_tables(unsigned long add); +struct notifier_block; +extern int modules_disabled; +void *__symbol_get(const char *symbol); +void *__symbol_get_gpl(const char *symbol); +struct module_use { + struct list_head source_list; + struct list_head target_list; + struct module *source, *target; +}; +enum module_state +{ + MODULE_STATE_LIVE, + MODULE_STATE_COMING, + MODULE_STATE_GOING, +}; +struct module +{ + enum module_state state; + struct list_head list; + char name[(64 - sizeof(unsigned long))]; + struct module_kobject mkobj; + struct module_attribute *modinfo_attrs; + const char *version; + const char *srcversion; + struct kobject *holders_dir; + const struct kernel_symbol *syms; + const unsigned long *crcs; + unsigned int num_syms; + struct kernel_param *kp; + unsigned int num_kp; + unsigned int num_gpl_syms; + const struct kernel_symbol *gpl_syms; + const unsigned long *gpl_crcs; + const struct kernel_symbol *unused_syms; + const unsigned long *unused_crcs; + unsigned int num_unused_syms; + unsigned int num_unused_gpl_syms; + const struct kernel_symbol *unused_gpl_syms; + const unsigned long *unused_gpl_crcs; + const struct kernel_symbol *gpl_future_syms; + const unsigned long *gpl_future_crcs; + unsigned int num_gpl_future_syms; + unsigned int num_exentries; + struct exception_table_entry *extable; + int (*init)(void); + void *module_init; + void *module_core; + unsigned int init_size, core_size; + unsigned int init_text_size, core_text_size; + unsigned int init_ro_size, core_ro_size; + struct mod_arch_specific arch; + unsigned int taints; + unsigned num_bugs; + struct list_head bug_list; + struct bug_entry *bug_table; + Elf32_Sym *symtab, *core_symtab; + unsigned int num_symtab, core_num_syms; + char *strtab, *core_strtab; + struct module_sect_attrs *sect_attrs; + struct module_notes_attrs *notes_attrs; + char *args; + void *percpu; + unsigned int percpu_size; + unsigned int num_tracepoints; + struct tracepoint * const *tracepoints_ptrs; + struct jump_entry *jump_entries; + unsigned int num_jump_entries; + unsigned int num_trace_bprintk_fmt; + const char **trace_bprintk_fmt_start; + struct ftrace_event_call **trace_events; + unsigned int num_trace_events; + unsigned int num_ftrace_callsites; + unsigned long *ftrace_callsites; + struct list_head source_list; + struct list_head target_list; + struct task_struct *waiter; + void (*exit)(void); + struct module_ref { + unsigned int incs; + unsigned int decs; + } *refptr; +}; +extern struct mutex module_mutex; +static inline __attribute__((always_inline)) int module_is_live(struct module *mod) +{ + return mod->state != MODULE_STATE_GOING; +} +struct module *__module_text_address(unsigned long addr); +struct module *__module_address(unsigned long addr); +bool is_module_address(unsigned long addr); +bool is_module_percpu_address(unsigned long addr); +bool is_module_text_address(unsigned long addr); +static inline __attribute__((always_inline)) int within_module_core(unsigned long addr, struct module *mod) +{ + return (unsigned long)mod->module_core <= addr && + addr < (unsigned long)mod->module_core + mod->core_size; +} +static inline __attribute__((always_inline)) int within_module_init(unsigned long addr, struct module *mod) +{ + return (unsigned long)mod->module_init <= addr && + addr < (unsigned long)mod->module_init + mod->init_size; +} +struct module *find_module(const char *name); +struct symsearch { + const struct kernel_symbol *start, *stop; + const unsigned long *crcs; + enum { + NOT_GPL_ONLY, + GPL_ONLY, + WILL_BE_GPL_ONLY, + } licence; + bool unused; +}; +const struct kernel_symbol *find_symbol(const char *name, + struct module **owner, + const unsigned long **crc, + bool gplok, + bool warn); +bool each_symbol_section(bool (*fn)(const struct symsearch *arr, + struct module *owner, + void *data), void *data); +int module_get_kallsym(unsigned int symnum, unsigned long *value, char *type, + char *name, char *module_name, int *exported); +unsigned long module_kallsyms_lookup_name(const char *name); +int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *, + struct module *, unsigned long), + void *data); +extern void __module_put_and_exit(struct module *mod, long code) + __attribute__((noreturn)); +unsigned int module_refcount(struct module *mod); +void __symbol_put(const char *symbol); +void symbol_put_addr(void *addr); +static inline __attribute__((always_inline)) void __module_get(struct module *module) +{ + if (__builtin_constant_p(((module))) ? !!((module)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 510, }; ______r = !!((module)); ______f.miss_hit[______r]++; ______r; })) { + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + do { do { const void *__vpp_verify = (typeof(&(((module->refptr->incs)))))((void *)0); (void)__vpp_verify; } while (0); switch(sizeof(((module->refptr->incs)))) { case 1: do { typedef typeof((((module->refptr->incs)))) pao_T__; const int pao_ID__ = (__builtin_constant_p((1)) && (((1)) == 1 || ((1)) == -1)) ? ((1)) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((1)); (void)pao_tmp__; } switch (sizeof((((module->refptr->incs))))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs)))) : "qi" ((pao_T__)((1)))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs)))) : "ri" ((pao_T__)((1)))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs)))) : "ri" ((pao_T__)((1)))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs)))) : "re" ((pao_T__)((1)))); break; default: __bad_percpu_size(); } } while (0);break; case 2: do { typedef typeof((((module->refptr->incs)))) pao_T__; const int pao_ID__ = (__builtin_constant_p((1)) && (((1)) == 1 || ((1)) == -1)) ? ((1)) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((1)); (void)pao_tmp__; } switch (sizeof((((module->refptr->incs))))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs)))) : "qi" ((pao_T__)((1)))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs)))) : "ri" ((pao_T__)((1)))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs)))) : "ri" ((pao_T__)((1)))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs)))) : "re" ((pao_T__)((1)))); break; default: __bad_percpu_size(); } } while (0);break; case 4: do { typedef typeof((((module->refptr->incs)))) pao_T__; const int pao_ID__ = (__builtin_constant_p((1)) && (((1)) == 1 || ((1)) == -1)) ? ((1)) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((1)); (void)pao_tmp__; } switch (sizeof((((module->refptr->incs))))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs)))) : "qi" ((pao_T__)((1)))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs)))) : "ri" ((pao_T__)((1)))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs)))) : "ri" ((pao_T__)((1)))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 512, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs)))) : "re" ((pao_T__)((1)))); break; default: __bad_percpu_size(); } } while (0);break; case 8: do { *({ unsigned long tcp_ptr__; do { const void *__vpp_verify = (typeof(&((((module->refptr->incs))))))((void *)0); (void)__vpp_verify; } while (0); asm volatile("add " "%%""fs"":" "%P" "1" ", %0" : "=r" (tcp_ptr__) : "m" (this_cpu_off), "0" (&((((module->refptr->incs)))))); (typeof(*(&((((module->refptr->incs)))))) *)tcp_ptr__; }) += ((1)); } while (0);break; default: __bad_size_call_parameter();break; } } while (0); + trace_module_get(module, ({ __label__ __here; __here: (unsigned long)&&__here; })); + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 514, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 514, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 514, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 514, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); + } +} +static inline __attribute__((always_inline)) int try_module_get(struct module *module) +{ + int ret = 1; + if (__builtin_constant_p(((module))) ? !!((module)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 522, }; ______r = !!((module)); ______f.miss_hit[______r]++; ______r; })) { + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + if (__builtin_constant_p((((__builtin_constant_p(module_is_live(module)) ? !!(module_is_live(module)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 525, }; ______r = __builtin_expect(!!(module_is_live(module)), 1); ftrace_likely_update(&______f, ______r, 1); ______r; }))))) ? !!(((__builtin_constant_p(module_is_live(module)) ? !!(module_is_live(module)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 525, }; ______r = __builtin_expect(!!(module_is_live(module)), 1); ftrace_likely_update(&______f, ______r, 1); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 525, }; ______r = !!(((__builtin_constant_p(module_is_live(module)) ? !!(module_is_live(module)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 525, }; ______r = __builtin_expect(!!(module_is_live(module)), 1); ftrace_likely_update(&______f, ______r, 1); ______r; })))); ______f.miss_hit[______r]++; ______r; })) { + do { do { const void *__vpp_verify = (typeof(&(((module->refptr->incs)))))((void *)0); (void)__vpp_verify; } while (0); switch(sizeof(((module->refptr->incs)))) { case 1: do { typedef typeof((((module->refptr->incs)))) pao_T__; const int pao_ID__ = (__builtin_constant_p((1)) && (((1)) == 1 || ((1)) == -1)) ? ((1)) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((1)); (void)pao_tmp__; } switch (sizeof((((module->refptr->incs))))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs)))) : "qi" ((pao_T__)((1)))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs)))) : "ri" ((pao_T__)((1)))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs)))) : "ri" ((pao_T__)((1)))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs)))) : "re" ((pao_T__)((1)))); break; default: __bad_percpu_size(); } } while (0);break; case 2: do { typedef typeof((((module->refptr->incs)))) pao_T__; const int pao_ID__ = (__builtin_constant_p((1)) && (((1)) == 1 || ((1)) == -1)) ? ((1)) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((1)); (void)pao_tmp__; } switch (sizeof((((module->refptr->incs))))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs)))) : "qi" ((pao_T__)((1)))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs)))) : "ri" ((pao_T__)((1)))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs)))) : "ri" ((pao_T__)((1)))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs)))) : "re" ((pao_T__)((1)))); break; default: __bad_percpu_size(); } } while (0);break; case 4: do { typedef typeof((((module->refptr->incs)))) pao_T__; const int pao_ID__ = (__builtin_constant_p((1)) && (((1)) == 1 || ((1)) == -1)) ? ((1)) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((1)); (void)pao_tmp__; } switch (sizeof((((module->refptr->incs))))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs)))) : "qi" ((pao_T__)((1)))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs)))) : "ri" ((pao_T__)((1)))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs)))) : "ri" ((pao_T__)((1)))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 526, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs))))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" ((((module->refptr->incs)))) : "re" ((pao_T__)((1)))); break; default: __bad_percpu_size(); } } while (0);break; case 8: do { *({ unsigned long tcp_ptr__; do { const void *__vpp_verify = (typeof(&((((module->refptr->incs))))))((void *)0); (void)__vpp_verify; } while (0); asm volatile("add " "%%""fs"":" "%P" "1" ", %0" : "=r" (tcp_ptr__) : "m" (this_cpu_off), "0" (&((((module->refptr->incs)))))); (typeof(*(&((((module->refptr->incs)))))) *)tcp_ptr__; }) += ((1)); } while (0);break; default: __bad_size_call_parameter();break; } } while (0); + trace_module_get(module, ({ __label__ __here; __here: (unsigned long)&&__here; })); + } else + ret = 0; + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 531, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 531, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 531, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/module.h", .line = 531, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); + } + return ret; +} +extern void module_put(struct module *module); +int ref_module(struct module *a, struct module *b); +const char *module_address_lookup(unsigned long addr, + unsigned long *symbolsize, + unsigned long *offset, + char **modname, + char *namebuf); +int lookup_module_symbol_name(unsigned long addr, char *symname); +int lookup_module_symbol_attrs(unsigned long addr, unsigned long *size, unsigned long *offset, char *modname, char *name); +const struct exception_table_entry *search_module_extables(unsigned long addr); +int register_module_notifier(struct notifier_block * nb); +int unregister_module_notifier(struct notifier_block * nb); +extern void print_modules(void); +extern void module_update_tracepoints(void); +extern int module_get_iter_tracepoints(struct tracepoint_iter *iter); +extern struct kset *module_kset; +extern struct kobj_type module_ktype; +extern int module_sysfs_initialized; +static inline __attribute__((always_inline)) void set_all_modules_text_rw(void) { } +static inline __attribute__((always_inline)) void set_all_modules_text_ro(void) { } +void module_bug_finalize(const Elf32_Ehdr *, const Elf32_Shdr *, + struct module *); +void module_bug_cleanup(struct module *); +void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) kmem_cache_init(void); +int slab_is_available(void); +struct kmem_cache *kmem_cache_create(const char *, size_t, size_t, + unsigned long, + void (*)(void *)); +void kmem_cache_destroy(struct kmem_cache *); +int kmem_cache_shrink(struct kmem_cache *); +void kmem_cache_free(struct kmem_cache *, void *); +unsigned int kmem_cache_size(struct kmem_cache *); +void * __attribute__((warn_unused_result)) __krealloc(const void *, size_t, gfp_t); +void * __attribute__((warn_unused_result)) krealloc(const void *, size_t, gfp_t); +void kfree(const void *); +void kzfree(const void *); +size_t ksize(const void *); +static inline __attribute__((always_inline)) void kmemleak_init(void) +{ +} +static inline __attribute__((always_inline)) void kmemleak_alloc(const void *ptr, size_t size, int min_count, + gfp_t gfp) +{ +} +static inline __attribute__((always_inline)) void kmemleak_alloc_recursive(const void *ptr, size_t size, + int min_count, unsigned long flags, + gfp_t gfp) +{ +} +static inline __attribute__((always_inline)) void kmemleak_free(const void *ptr) +{ +} +static inline __attribute__((always_inline)) void kmemleak_free_part(const void *ptr, size_t size) +{ +} +static inline __attribute__((always_inline)) void kmemleak_free_recursive(const void *ptr, unsigned long flags) +{ +} +static inline __attribute__((always_inline)) void kmemleak_not_leak(const void *ptr) +{ +} +static inline __attribute__((always_inline)) void kmemleak_ignore(const void *ptr) +{ +} +static inline __attribute__((always_inline)) void kmemleak_scan_area(const void *ptr, size_t size, gfp_t gfp) +{ +} +static inline __attribute__((always_inline)) void kmemleak_erase(void **ptr) +{ +} +static inline __attribute__((always_inline)) void kmemleak_no_scan(const void *ptr) +{ +} +enum stat_item { + ALLOC_FASTPATH, + ALLOC_SLOWPATH, + FREE_FASTPATH, + FREE_SLOWPATH, + FREE_FROZEN, + FREE_ADD_PARTIAL, + FREE_REMOVE_PARTIAL, + ALLOC_FROM_PARTIAL, + ALLOC_SLAB, + ALLOC_REFILL, + FREE_SLAB, + CPUSLAB_FLUSH, + DEACTIVATE_FULL, + DEACTIVATE_EMPTY, + DEACTIVATE_TO_HEAD, + DEACTIVATE_TO_TAIL, + DEACTIVATE_REMOTE_FREES, + ORDER_FALLBACK, + CMPXCHG_DOUBLE_CPU_FAIL, + NR_SLUB_STAT_ITEMS }; +struct kmem_cache_cpu { + void **freelist; + unsigned long tid; + struct page *page; + int node; +}; +struct kmem_cache_node { + spinlock_t list_lock; + unsigned long nr_partial; + struct list_head partial; + atomic_long_t nr_slabs; + atomic_long_t total_objects; + struct list_head full; +}; +struct kmem_cache_order_objects { + unsigned long x; +}; +struct kmem_cache { + struct kmem_cache_cpu *cpu_slab; + unsigned long flags; + unsigned long min_partial; + int size; + int objsize; + int offset; + struct kmem_cache_order_objects oo; + struct kmem_cache_order_objects max; + struct kmem_cache_order_objects min; + gfp_t allocflags; + int refcount; + void (*ctor)(void *); + int inuse; + int align; + int reserved; + const char *name; + struct list_head list; + struct kobject kobj; + struct kmem_cache_node *node[(1 << 0)]; +}; +extern struct kmem_cache *kmalloc_caches[(12 + 2)]; +static inline __attribute__((always_inline)) __attribute__((always_inline)) int kmalloc_index(size_t size) +{ + if (__builtin_constant_p(((!size))) ? !!((!size)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 158, }; ______r = !!((!size)); ______f.miss_hit[______r]++; ______r; })) + return 0; + if (__builtin_constant_p(((size <= 8))) ? !!((size <= 8)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 161, }; ______r = !!((size <= 8)); ______f.miss_hit[______r]++; ______r; })) + return ( __builtin_constant_p(8) ? ( (8) < 1 ? ____ilog2_NaN() : (8) & (1ULL << 63) ? 63 : (8) & (1ULL << 62) ? 62 : (8) & (1ULL << 61) ? 61 : (8) & (1ULL << 60) ? 60 : (8) & (1ULL << 59) ? 59 : (8) & (1ULL << 58) ? 58 : (8) & (1ULL << 57) ? 57 : (8) & (1ULL << 56) ? 56 : (8) & (1ULL << 55) ? 55 : (8) & (1ULL << 54) ? 54 : (8) & (1ULL << 53) ? 53 : (8) & (1ULL << 52) ? 52 : (8) & (1ULL << 51) ? 51 : (8) & (1ULL << 50) ? 50 : (8) & (1ULL << 49) ? 49 : (8) & (1ULL << 48) ? 48 : (8) & (1ULL << 47) ? 47 : (8) & (1ULL << 46) ? 46 : (8) & (1ULL << 45) ? 45 : (8) & (1ULL << 44) ? 44 : (8) & (1ULL << 43) ? 43 : (8) & (1ULL << 42) ? 42 : (8) & (1ULL << 41) ? 41 : (8) & (1ULL << 40) ? 40 : (8) & (1ULL << 39) ? 39 : (8) & (1ULL << 38) ? 38 : (8) & (1ULL << 37) ? 37 : (8) & (1ULL << 36) ? 36 : (8) & (1ULL << 35) ? 35 : (8) & (1ULL << 34) ? 34 : (8) & (1ULL << 33) ? 33 : (8) & (1ULL << 32) ? 32 : (8) & (1ULL << 31) ? 31 : (8) & (1ULL << 30) ? 30 : (8) & (1ULL << 29) ? 29 : (8) & (1ULL << 28) ? 28 : (8) & (1ULL << 27) ? 27 : (8) & (1ULL << 26) ? 26 : (8) & (1ULL << 25) ? 25 : (8) & (1ULL << 24) ? 24 : (8) & (1ULL << 23) ? 23 : (8) & (1ULL << 22) ? 22 : (8) & (1ULL << 21) ? 21 : (8) & (1ULL << 20) ? 20 : (8) & (1ULL << 19) ? 19 : (8) & (1ULL << 18) ? 18 : (8) & (1ULL << 17) ? 17 : (8) & (1ULL << 16) ? 16 : (8) & (1ULL << 15) ? 15 : (8) & (1ULL << 14) ? 14 : (8) & (1ULL << 13) ? 13 : (8) & (1ULL << 12) ? 12 : (8) & (1ULL << 11) ? 11 : (8) & (1ULL << 10) ? 10 : (8) & (1ULL << 9) ? 9 : (8) & (1ULL << 8) ? 8 : (8) & (1ULL << 7) ? 7 : (8) & (1ULL << 6) ? 6 : (8) & (1ULL << 5) ? 5 : (8) & (1ULL << 4) ? 4 : (8) & (1ULL << 3) ? 3 : (8) & (1ULL << 2) ? 2 : (8) & (1ULL << 1) ? 1 : (8) & (1ULL << 0) ? 0 : ____ilog2_NaN() ) : (sizeof(8) <= 4) ? __ilog2_u32(8) : __ilog2_u64(8) ); + if (__builtin_constant_p(((8 <= 32 && size > 64 && size <= 96))) ? !!((8 <= 32 && size > 64 && size <= 96)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 164, }; ______r = !!((8 <= 32 && size > 64 && size <= 96)); ______f.miss_hit[______r]++; ______r; })) + return 1; + if (__builtin_constant_p(((8 <= 64 && size > 128 && size <= 192))) ? !!((8 <= 64 && size > 128 && size <= 192)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 166, }; ______r = !!((8 <= 64 && size > 128 && size <= 192)); ______f.miss_hit[______r]++; ______r; })) + return 2; + if (__builtin_constant_p(((size <= 8))) ? !!((size <= 8)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 168, }; ______r = !!((size <= 8)); ______f.miss_hit[______r]++; ______r; })) return 3; + if (__builtin_constant_p(((size <= 16))) ? !!((size <= 16)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 169, }; ______r = !!((size <= 16)); ______f.miss_hit[______r]++; ______r; })) return 4; + if (__builtin_constant_p(((size <= 32))) ? !!((size <= 32)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 170, }; ______r = !!((size <= 32)); ______f.miss_hit[______r]++; ______r; })) return 5; + if (__builtin_constant_p(((size <= 64))) ? !!((size <= 64)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 171, }; ______r = !!((size <= 64)); ______f.miss_hit[______r]++; ______r; })) return 6; + if (__builtin_constant_p(((size <= 128))) ? !!((size <= 128)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 172, }; ______r = !!((size <= 128)); ______f.miss_hit[______r]++; ______r; })) return 7; + if (__builtin_constant_p(((size <= 256))) ? !!((size <= 256)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 173, }; ______r = !!((size <= 256)); ______f.miss_hit[______r]++; ______r; })) return 8; + if (__builtin_constant_p(((size <= 512))) ? !!((size <= 512)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 174, }; ______r = !!((size <= 512)); ______f.miss_hit[______r]++; ______r; })) return 9; + if (__builtin_constant_p(((size <= 1024))) ? !!((size <= 1024)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 175, }; ______r = !!((size <= 1024)); ______f.miss_hit[______r]++; ______r; })) return 10; + if (__builtin_constant_p(((size <= 2 * 1024))) ? !!((size <= 2 * 1024)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 176, }; ______r = !!((size <= 2 * 1024)); ______f.miss_hit[______r]++; ______r; })) return 11; + if (__builtin_constant_p(((size <= 4 * 1024))) ? !!((size <= 4 * 1024)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 177, }; ______r = !!((size <= 4 * 1024)); ______f.miss_hit[______r]++; ______r; })) return 12; + if (__builtin_constant_p(((size <= 8 * 1024))) ? !!((size <= 8 * 1024)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 183, }; ______r = !!((size <= 8 * 1024)); ______f.miss_hit[______r]++; ______r; })) return 13; + if (__builtin_constant_p(((size <= 16 * 1024))) ? !!((size <= 16 * 1024)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 184, }; ______r = !!((size <= 16 * 1024)); ______f.miss_hit[______r]++; ______r; })) return 14; + if (__builtin_constant_p(((size <= 32 * 1024))) ? !!((size <= 32 * 1024)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 185, }; ______r = !!((size <= 32 * 1024)); ______f.miss_hit[______r]++; ______r; })) return 15; + if (__builtin_constant_p(((size <= 64 * 1024))) ? !!((size <= 64 * 1024)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 186, }; ______r = !!((size <= 64 * 1024)); ______f.miss_hit[______r]++; ______r; })) return 16; + if (__builtin_constant_p(((size <= 128 * 1024))) ? !!((size <= 128 * 1024)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 187, }; ______r = !!((size <= 128 * 1024)); ______f.miss_hit[______r]++; ______r; })) return 17; + if (__builtin_constant_p(((size <= 256 * 1024))) ? !!((size <= 256 * 1024)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 188, }; ______r = !!((size <= 256 * 1024)); ______f.miss_hit[______r]++; ______r; })) return 18; + if (__builtin_constant_p(((size <= 512 * 1024))) ? !!((size <= 512 * 1024)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 189, }; ______r = !!((size <= 512 * 1024)); ______f.miss_hit[______r]++; ______r; })) return 19; + if (__builtin_constant_p(((size <= 1024 * 1024))) ? !!((size <= 1024 * 1024)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 190, }; ______r = !!((size <= 1024 * 1024)); ______f.miss_hit[______r]++; ______r; })) return 20; + if (__builtin_constant_p(((size <= 2 * 1024 * 1024))) ? !!((size <= 2 * 1024 * 1024)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 191, }; ______r = !!((size <= 2 * 1024 * 1024)); ______f.miss_hit[______r]++; ______r; })) return 21; + do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/slub_def.h"), "i" (192), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); + return -1; +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) struct kmem_cache *kmalloc_slab(size_t size) +{ + int index = kmalloc_index(size); + if (__builtin_constant_p(((index == 0))) ? !!((index == 0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 214, }; ______r = !!((index == 0)); ______f.miss_hit[______r]++; ______r; })) + return ((void *)0); + return kmalloc_caches[index]; +} +void *kmem_cache_alloc(struct kmem_cache *, gfp_t); +void *__kmalloc(size_t size, gfp_t flags); +static inline __attribute__((always_inline)) __attribute__((always_inline)) void * +kmalloc_order(size_t size, gfp_t flags, unsigned int order) +{ + void *ret = (void *) __get_free_pages(flags | (( gfp_t)0x4000u), order); + kmemleak_alloc(ret, size, 1, flags); + return ret; +} +extern void * +kmem_cache_alloc_trace(struct kmem_cache *s, gfp_t gfpflags, size_t size); +extern void *kmalloc_order_trace(size_t size, gfp_t flags, unsigned int order); +static inline __attribute__((always_inline)) __attribute__((always_inline)) void *kmalloc_large(size_t size, gfp_t flags) +{ + unsigned int order = get_order(size); + return kmalloc_order_trace(size, flags, order); +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) void *kmalloc(size_t size, gfp_t flags) +{ + if (__builtin_constant_p(((__builtin_constant_p(size)))) ? !!((__builtin_constant_p(size))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 257, }; ______r = !!((__builtin_constant_p(size))); ______f.miss_hit[______r]++; ______r; })) { + if (__builtin_constant_p(((size > (2 * ((1UL) << 12))))) ? !!((size > (2 * ((1UL) << 12)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 258, }; ______r = !!((size > (2 * ((1UL) << 12)))); ______f.miss_hit[______r]++; ______r; })) + return kmalloc_large(size, flags); + if (__builtin_constant_p(((!(flags & (( gfp_t)0x01u))))) ? !!((!(flags & (( gfp_t)0x01u)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 261, }; ______r = !!((!(flags & (( gfp_t)0x01u)))); ______f.miss_hit[______r]++; ______r; })) { + struct kmem_cache *s = kmalloc_slab(size); + if (__builtin_constant_p(((!s))) ? !!((!s)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slub_def.h", .line = 264, }; ______r = !!((!s)); ______f.miss_hit[______r]++; ______r; })) + return ((void *)16); + return kmem_cache_alloc_trace(s, flags, size); + } + } + return __kmalloc(size, flags); +} +static inline __attribute__((always_inline)) void *kcalloc(size_t n, size_t size, gfp_t flags) +{ + if (__builtin_constant_p(((size != 0 && n > (~0UL) / size))) ? !!((size != 0 && n > (~0UL) / size)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/slab.h", .line = 225, }; ______r = !!((size != 0 && n > (~0UL) / size)); ______f.miss_hit[______r]++; ______r; })) + return ((void *)0); + return __kmalloc(n * size, flags | (( gfp_t)0x8000u)); +} +static inline __attribute__((always_inline)) void *kmalloc_node(size_t size, gfp_t flags, int node) +{ + return kmalloc(size, flags); +} +static inline __attribute__((always_inline)) void *__kmalloc_node(size_t size, gfp_t flags, int node) +{ + return __kmalloc(size, flags); +} +void *kmem_cache_alloc(struct kmem_cache *, gfp_t); +static inline __attribute__((always_inline)) void *kmem_cache_alloc_node(struct kmem_cache *cachep, + gfp_t flags, int node) +{ + return kmem_cache_alloc(cachep, flags); +} +extern void *__kmalloc_track_caller(size_t, gfp_t, unsigned long); +static inline __attribute__((always_inline)) void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags) +{ + return kmem_cache_alloc(k, flags | (( gfp_t)0x8000u)); +} +static inline __attribute__((always_inline)) void *kzalloc(size_t size, gfp_t flags) +{ + return kmalloc(size, flags | (( gfp_t)0x8000u)); +} +static inline __attribute__((always_inline)) void *kzalloc_node(size_t size, gfp_t flags, int node) +{ + return kmalloc_node(size, flags | (( gfp_t)0x8000u), node); +} +void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) kmem_cache_init_late(void); +static inline __attribute__((always_inline)) void pagefault_disable(void) +{ + add_preempt_count(1); + __asm__ __volatile__("": : :"memory"); +} +static inline __attribute__((always_inline)) void pagefault_enable(void) +{ + __asm__ __volatile__("": : :"memory"); + sub_preempt_count(1); + __asm__ __volatile__("": : :"memory"); + do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/uaccess.h", .line = 38, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/uaccess.h", .line = 38, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/uaccess.h", .line = 38, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/uaccess.h", .line = 38, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); +} +extern long probe_kernel_read(void *dst, const void *src, size_t size); +extern long __probe_kernel_read(void *dst, const void *src, size_t size); +extern long __attribute__((no_instrument_function)) probe_kernel_write(void *dst, const void *src, size_t size); +extern long __attribute__((no_instrument_function)) __probe_kernel_write(void *dst, const void *src, size_t size); +struct scatterlist; +struct crypto_ablkcipher; +struct crypto_async_request; +struct crypto_aead; +struct crypto_blkcipher; +struct crypto_hash; +struct crypto_rng; +struct crypto_tfm; +struct crypto_type; +struct aead_givcrypt_request; +struct skcipher_givcrypt_request; +typedef void (*crypto_completion_t)(struct crypto_async_request *req, int err); +struct crypto_async_request { + struct list_head list; + crypto_completion_t complete; + void *data; + struct crypto_tfm *tfm; + u32 flags; +}; +struct ablkcipher_request { + struct crypto_async_request base; + unsigned int nbytes; + void *info; + struct scatterlist *src; + struct scatterlist *dst; + void *__ctx[] __attribute__ ((__aligned__(__alignof__(unsigned long long)))); +}; +struct aead_request { + struct crypto_async_request base; + unsigned int assoclen; + unsigned int cryptlen; + u8 *iv; + struct scatterlist *assoc; + struct scatterlist *src; + struct scatterlist *dst; + void *__ctx[] __attribute__ ((__aligned__(__alignof__(unsigned long long)))); +}; +struct blkcipher_desc { + struct crypto_blkcipher *tfm; + void *info; + u32 flags; +}; +struct cipher_desc { + struct crypto_tfm *tfm; + void (*crfn)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); + unsigned int (*prfn)(const struct cipher_desc *desc, u8 *dst, + const u8 *src, unsigned int nbytes); + void *info; +}; +struct hash_desc { + struct crypto_hash *tfm; + u32 flags; +}; +struct ablkcipher_alg { + int (*setkey)(struct crypto_ablkcipher *tfm, const u8 *key, + unsigned int keylen); + int (*encrypt)(struct ablkcipher_request *req); + int (*decrypt)(struct ablkcipher_request *req); + int (*givencrypt)(struct skcipher_givcrypt_request *req); + int (*givdecrypt)(struct skcipher_givcrypt_request *req); + const char *geniv; + unsigned int min_keysize; + unsigned int max_keysize; + unsigned int ivsize; +}; +struct aead_alg { + int (*setkey)(struct crypto_aead *tfm, const u8 *key, + unsigned int keylen); + int (*setauthsize)(struct crypto_aead *tfm, unsigned int authsize); + int (*encrypt)(struct aead_request *req); + int (*decrypt)(struct aead_request *req); + int (*givencrypt)(struct aead_givcrypt_request *req); + int (*givdecrypt)(struct aead_givcrypt_request *req); + const char *geniv; + unsigned int ivsize; + unsigned int maxauthsize; +}; +struct blkcipher_alg { + int (*setkey)(struct crypto_tfm *tfm, const u8 *key, + unsigned int keylen); + int (*encrypt)(struct blkcipher_desc *desc, + struct scatterlist *dst, struct scatterlist *src, + unsigned int nbytes); + int (*decrypt)(struct blkcipher_desc *desc, + struct scatterlist *dst, struct scatterlist *src, + unsigned int nbytes); + const char *geniv; + unsigned int min_keysize; + unsigned int max_keysize; + unsigned int ivsize; +}; +struct cipher_alg { + unsigned int cia_min_keysize; + unsigned int cia_max_keysize; + int (*cia_setkey)(struct crypto_tfm *tfm, const u8 *key, + unsigned int keylen); + void (*cia_encrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); + void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); +}; +struct compress_alg { + int (*coa_compress)(struct crypto_tfm *tfm, const u8 *src, + unsigned int slen, u8 *dst, unsigned int *dlen); + int (*coa_decompress)(struct crypto_tfm *tfm, const u8 *src, + unsigned int slen, u8 *dst, unsigned int *dlen); +}; +struct rng_alg { + int (*rng_make_random)(struct crypto_rng *tfm, u8 *rdata, + unsigned int dlen); + int (*rng_reset)(struct crypto_rng *tfm, u8 *seed, unsigned int slen); + unsigned int seedsize; +}; +struct crypto_alg { + struct list_head cra_list; + struct list_head cra_users; + u32 cra_flags; + unsigned int cra_blocksize; + unsigned int cra_ctxsize; + unsigned int cra_alignmask; + int cra_priority; + atomic_t cra_refcnt; + char cra_name[64]; + char cra_driver_name[64]; + const struct crypto_type *cra_type; + union { + struct ablkcipher_alg ablkcipher; + struct aead_alg aead; + struct blkcipher_alg blkcipher; + struct cipher_alg cipher; + struct compress_alg compress; + struct rng_alg rng; + } cra_u; + int (*cra_init)(struct crypto_tfm *tfm); + void (*cra_exit)(struct crypto_tfm *tfm); + void (*cra_destroy)(struct crypto_alg *alg); + struct module *cra_module; +}; +int crypto_register_alg(struct crypto_alg *alg); +int crypto_unregister_alg(struct crypto_alg *alg); +int crypto_has_alg(const char *name, u32 type, u32 mask); +struct ablkcipher_tfm { + int (*setkey)(struct crypto_ablkcipher *tfm, const u8 *key, + unsigned int keylen); + int (*encrypt)(struct ablkcipher_request *req); + int (*decrypt)(struct ablkcipher_request *req); + int (*givencrypt)(struct skcipher_givcrypt_request *req); + int (*givdecrypt)(struct skcipher_givcrypt_request *req); + struct crypto_ablkcipher *base; + unsigned int ivsize; + unsigned int reqsize; +}; +struct aead_tfm { + int (*setkey)(struct crypto_aead *tfm, const u8 *key, + unsigned int keylen); + int (*encrypt)(struct aead_request *req); + int (*decrypt)(struct aead_request *req); + int (*givencrypt)(struct aead_givcrypt_request *req); + int (*givdecrypt)(struct aead_givcrypt_request *req); + struct crypto_aead *base; + unsigned int ivsize; + unsigned int authsize; + unsigned int reqsize; +}; +struct blkcipher_tfm { + void *iv; + int (*setkey)(struct crypto_tfm *tfm, const u8 *key, + unsigned int keylen); + int (*encrypt)(struct blkcipher_desc *desc, struct scatterlist *dst, + struct scatterlist *src, unsigned int nbytes); + int (*decrypt)(struct blkcipher_desc *desc, struct scatterlist *dst, + struct scatterlist *src, unsigned int nbytes); +}; +struct cipher_tfm { + int (*cit_setkey)(struct crypto_tfm *tfm, + const u8 *key, unsigned int keylen); + void (*cit_encrypt_one)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); + void (*cit_decrypt_one)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); +}; +struct hash_tfm { + int (*init)(struct hash_desc *desc); + int (*update)(struct hash_desc *desc, + struct scatterlist *sg, unsigned int nsg); + int (*final)(struct hash_desc *desc, u8 *out); + int (*digest)(struct hash_desc *desc, struct scatterlist *sg, + unsigned int nsg, u8 *out); + int (*setkey)(struct crypto_hash *tfm, const u8 *key, + unsigned int keylen); + unsigned int digestsize; +}; +struct compress_tfm { + int (*cot_compress)(struct crypto_tfm *tfm, + const u8 *src, unsigned int slen, + u8 *dst, unsigned int *dlen); + int (*cot_decompress)(struct crypto_tfm *tfm, + const u8 *src, unsigned int slen, + u8 *dst, unsigned int *dlen); +}; +struct rng_tfm { + int (*rng_gen_random)(struct crypto_rng *tfm, u8 *rdata, + unsigned int dlen); + int (*rng_reset)(struct crypto_rng *tfm, u8 *seed, unsigned int slen); +}; +struct crypto_tfm { + u32 crt_flags; + union { + struct ablkcipher_tfm ablkcipher; + struct aead_tfm aead; + struct blkcipher_tfm blkcipher; + struct cipher_tfm cipher; + struct hash_tfm hash; + struct compress_tfm compress; + struct rng_tfm rng; + } crt_u; + void (*exit)(struct crypto_tfm *tfm); + struct crypto_alg *__crt_alg; + void *__crt_ctx[] __attribute__ ((__aligned__(__alignof__(unsigned long long)))); +}; +struct crypto_ablkcipher { + struct crypto_tfm base; +}; +struct crypto_aead { + struct crypto_tfm base; +}; +struct crypto_blkcipher { + struct crypto_tfm base; +}; +struct crypto_cipher { + struct crypto_tfm base; +}; +struct crypto_comp { + struct crypto_tfm base; +}; +struct crypto_hash { + struct crypto_tfm base; +}; +struct crypto_rng { + struct crypto_tfm base; +}; +enum { + CRYPTOA_UNSPEC, + CRYPTOA_ALG, + CRYPTOA_TYPE, + CRYPTOA_U32, + __CRYPTOA_MAX, +}; +struct crypto_attr_alg { + char name[64]; +}; +struct crypto_attr_type { + u32 type; + u32 mask; +}; +struct crypto_attr_u32 { + u32 num; +}; +struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask); +void crypto_destroy_tfm(void *mem, struct crypto_tfm *tfm); +static inline __attribute__((always_inline)) void crypto_free_tfm(struct crypto_tfm *tfm) +{ + return crypto_destroy_tfm(tfm, tfm); +} +int alg_test(const char *driver, const char *alg, u32 type, u32 mask); +static inline __attribute__((always_inline)) const char *crypto_tfm_alg_name(struct crypto_tfm *tfm) +{ + return tfm->__crt_alg->cra_name; +} +static inline __attribute__((always_inline)) const char *crypto_tfm_alg_driver_name(struct crypto_tfm *tfm) +{ + return tfm->__crt_alg->cra_driver_name; +} +static inline __attribute__((always_inline)) int crypto_tfm_alg_priority(struct crypto_tfm *tfm) +{ + return tfm->__crt_alg->cra_priority; +} +static inline __attribute__((always_inline)) const char *crypto_tfm_alg_modname(struct crypto_tfm *tfm) +{ + return ({ struct module *__mod = (tfm->__crt_alg->cra_module); __mod ? __mod->name : "kernel"; }); +} +static inline __attribute__((always_inline)) u32 crypto_tfm_alg_type(struct crypto_tfm *tfm) +{ + return tfm->__crt_alg->cra_flags & 0x0000000f; +} +static inline __attribute__((always_inline)) unsigned int crypto_tfm_alg_blocksize(struct crypto_tfm *tfm) +{ + return tfm->__crt_alg->cra_blocksize; +} +static inline __attribute__((always_inline)) unsigned int crypto_tfm_alg_alignmask(struct crypto_tfm *tfm) +{ + return tfm->__crt_alg->cra_alignmask; +} +static inline __attribute__((always_inline)) u32 crypto_tfm_get_flags(struct crypto_tfm *tfm) +{ + return tfm->crt_flags; +} +static inline __attribute__((always_inline)) void crypto_tfm_set_flags(struct crypto_tfm *tfm, u32 flags) +{ + tfm->crt_flags |= flags; +} +static inline __attribute__((always_inline)) void crypto_tfm_clear_flags(struct crypto_tfm *tfm, u32 flags) +{ + tfm->crt_flags &= ~flags; +} +static inline __attribute__((always_inline)) void *crypto_tfm_ctx(struct crypto_tfm *tfm) +{ + return tfm->__crt_ctx; +} +static inline __attribute__((always_inline)) unsigned int crypto_tfm_ctx_alignment(void) +{ + struct crypto_tfm *tfm; + return __alignof__(tfm->__crt_ctx); +} +static inline __attribute__((always_inline)) struct crypto_ablkcipher *__crypto_ablkcipher_cast( + struct crypto_tfm *tfm) +{ + return (struct crypto_ablkcipher *)tfm; +} +static inline __attribute__((always_inline)) u32 crypto_skcipher_type(u32 type) +{ + type &= ~(0x0000000f | 0x00000200); + type |= 0x00000004; + return type; +} +static inline __attribute__((always_inline)) u32 crypto_skcipher_mask(u32 mask) +{ + mask &= ~(0x0000000f | 0x00000200); + mask |= 0x0000000c; + return mask; +} +struct crypto_ablkcipher *crypto_alloc_ablkcipher(const char *alg_name, + u32 type, u32 mask); +static inline __attribute__((always_inline)) struct crypto_tfm *crypto_ablkcipher_tfm( + struct crypto_ablkcipher *tfm) +{ + return &tfm->base; +} +static inline __attribute__((always_inline)) void crypto_free_ablkcipher(struct crypto_ablkcipher *tfm) +{ + crypto_free_tfm(crypto_ablkcipher_tfm(tfm)); +} +static inline __attribute__((always_inline)) int crypto_has_ablkcipher(const char *alg_name, u32 type, + u32 mask) +{ + return crypto_has_alg(alg_name, crypto_skcipher_type(type), + crypto_skcipher_mask(mask)); +} +static inline __attribute__((always_inline)) struct ablkcipher_tfm *crypto_ablkcipher_crt( + struct crypto_ablkcipher *tfm) +{ + return &crypto_ablkcipher_tfm(tfm)->crt_u.ablkcipher; +} +static inline __attribute__((always_inline)) unsigned int crypto_ablkcipher_ivsize( + struct crypto_ablkcipher *tfm) +{ + return crypto_ablkcipher_crt(tfm)->ivsize; +} +static inline __attribute__((always_inline)) unsigned int crypto_ablkcipher_blocksize( + struct crypto_ablkcipher *tfm) +{ + return crypto_tfm_alg_blocksize(crypto_ablkcipher_tfm(tfm)); +} +static inline __attribute__((always_inline)) unsigned int crypto_ablkcipher_alignmask( + struct crypto_ablkcipher *tfm) +{ + return crypto_tfm_alg_alignmask(crypto_ablkcipher_tfm(tfm)); +} +static inline __attribute__((always_inline)) u32 crypto_ablkcipher_get_flags(struct crypto_ablkcipher *tfm) +{ + return crypto_tfm_get_flags(crypto_ablkcipher_tfm(tfm)); +} +static inline __attribute__((always_inline)) void crypto_ablkcipher_set_flags(struct crypto_ablkcipher *tfm, + u32 flags) +{ + crypto_tfm_set_flags(crypto_ablkcipher_tfm(tfm), flags); +} +static inline __attribute__((always_inline)) void crypto_ablkcipher_clear_flags(struct crypto_ablkcipher *tfm, + u32 flags) +{ + crypto_tfm_clear_flags(crypto_ablkcipher_tfm(tfm), flags); +} +static inline __attribute__((always_inline)) int crypto_ablkcipher_setkey(struct crypto_ablkcipher *tfm, + const u8 *key, unsigned int keylen) +{ + struct ablkcipher_tfm *crt = crypto_ablkcipher_crt(tfm); + return crt->setkey(crt->base, key, keylen); +} +static inline __attribute__((always_inline)) struct crypto_ablkcipher *crypto_ablkcipher_reqtfm( + struct ablkcipher_request *req) +{ + return __crypto_ablkcipher_cast(req->base.tfm); +} +static inline __attribute__((always_inline)) int crypto_ablkcipher_encrypt(struct ablkcipher_request *req) +{ + struct ablkcipher_tfm *crt = + crypto_ablkcipher_crt(crypto_ablkcipher_reqtfm(req)); + return crt->encrypt(req); +} +static inline __attribute__((always_inline)) int crypto_ablkcipher_decrypt(struct ablkcipher_request *req) +{ + struct ablkcipher_tfm *crt = + crypto_ablkcipher_crt(crypto_ablkcipher_reqtfm(req)); + return crt->decrypt(req); +} +static inline __attribute__((always_inline)) unsigned int crypto_ablkcipher_reqsize( + struct crypto_ablkcipher *tfm) +{ + return crypto_ablkcipher_crt(tfm)->reqsize; +} +static inline __attribute__((always_inline)) void ablkcipher_request_set_tfm( + struct ablkcipher_request *req, struct crypto_ablkcipher *tfm) +{ + req->base.tfm = crypto_ablkcipher_tfm(crypto_ablkcipher_crt(tfm)->base); +} +static inline __attribute__((always_inline)) struct ablkcipher_request *ablkcipher_request_cast( + struct crypto_async_request *req) +{ + return ({ const typeof( ((struct ablkcipher_request *)0)->base ) *__mptr = (req); (struct ablkcipher_request *)( (char *)__mptr - __builtin_offsetof(struct ablkcipher_request,base) );}); +} +static inline __attribute__((always_inline)) struct ablkcipher_request *ablkcipher_request_alloc( + struct crypto_ablkcipher *tfm, gfp_t gfp) +{ + struct ablkcipher_request *req; + req = kmalloc(sizeof(struct ablkcipher_request) + + crypto_ablkcipher_reqsize(tfm), gfp); + if (__builtin_constant_p((((__builtin_constant_p(req) ? !!(req) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/crypto.h", .line = 693, }; ______r = __builtin_expect(!!(req), 1); ftrace_likely_update(&______f, ______r, 1); ______r; }))))) ? !!(((__builtin_constant_p(req) ? !!(req) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/crypto.h", .line = 693, }; ______r = __builtin_expect(!!(req), 1); ftrace_likely_update(&______f, ______r, 1); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/crypto.h", .line = 693, }; ______r = !!(((__builtin_constant_p(req) ? !!(req) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/crypto.h", .line = 693, }; ______r = __builtin_expect(!!(req), 1); ftrace_likely_update(&______f, ______r, 1); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + ablkcipher_request_set_tfm(req, tfm); + return req; +} +static inline __attribute__((always_inline)) void ablkcipher_request_free(struct ablkcipher_request *req) +{ + kzfree(req); +} +static inline __attribute__((always_inline)) void ablkcipher_request_set_callback( + struct ablkcipher_request *req, + u32 flags, crypto_completion_t complete, void *data) +{ + req->base.complete = complete; + req->base.data = data; + req->base.flags = flags; +} +static inline __attribute__((always_inline)) void ablkcipher_request_set_crypt( + struct ablkcipher_request *req, + struct scatterlist *src, struct scatterlist *dst, + unsigned int nbytes, void *iv) +{ + req->src = src; + req->dst = dst; + req->nbytes = nbytes; + req->info = iv; +} +static inline __attribute__((always_inline)) struct crypto_aead *__crypto_aead_cast(struct crypto_tfm *tfm) +{ + return (struct crypto_aead *)tfm; +} +struct crypto_aead *crypto_alloc_aead(const char *alg_name, u32 type, u32 mask); +static inline __attribute__((always_inline)) struct crypto_tfm *crypto_aead_tfm(struct crypto_aead *tfm) +{ + return &tfm->base; +} +static inline __attribute__((always_inline)) void crypto_free_aead(struct crypto_aead *tfm) +{ + crypto_free_tfm(crypto_aead_tfm(tfm)); +} +static inline __attribute__((always_inline)) struct aead_tfm *crypto_aead_crt(struct crypto_aead *tfm) +{ + return &crypto_aead_tfm(tfm)->crt_u.aead; +} +static inline __attribute__((always_inline)) unsigned int crypto_aead_ivsize(struct crypto_aead *tfm) +{ + return crypto_aead_crt(tfm)->ivsize; +} +static inline __attribute__((always_inline)) unsigned int crypto_aead_authsize(struct crypto_aead *tfm) +{ + return crypto_aead_crt(tfm)->authsize; +} +static inline __attribute__((always_inline)) unsigned int crypto_aead_blocksize(struct crypto_aead *tfm) +{ + return crypto_tfm_alg_blocksize(crypto_aead_tfm(tfm)); +} +static inline __attribute__((always_inline)) unsigned int crypto_aead_alignmask(struct crypto_aead *tfm) +{ + return crypto_tfm_alg_alignmask(crypto_aead_tfm(tfm)); +} +static inline __attribute__((always_inline)) u32 crypto_aead_get_flags(struct crypto_aead *tfm) +{ + return crypto_tfm_get_flags(crypto_aead_tfm(tfm)); +} +static inline __attribute__((always_inline)) void crypto_aead_set_flags(struct crypto_aead *tfm, u32 flags) +{ + crypto_tfm_set_flags(crypto_aead_tfm(tfm), flags); +} +static inline __attribute__((always_inline)) void crypto_aead_clear_flags(struct crypto_aead *tfm, u32 flags) +{ + crypto_tfm_clear_flags(crypto_aead_tfm(tfm), flags); +} +static inline __attribute__((always_inline)) int crypto_aead_setkey(struct crypto_aead *tfm, const u8 *key, + unsigned int keylen) +{ + struct aead_tfm *crt = crypto_aead_crt(tfm); + return crt->setkey(crt->base, key, keylen); +} +int crypto_aead_setauthsize(struct crypto_aead *tfm, unsigned int authsize); +static inline __attribute__((always_inline)) struct crypto_aead *crypto_aead_reqtfm(struct aead_request *req) +{ + return __crypto_aead_cast(req->base.tfm); +} +static inline __attribute__((always_inline)) int crypto_aead_encrypt(struct aead_request *req) +{ + return crypto_aead_crt(crypto_aead_reqtfm(req))->encrypt(req); +} +static inline __attribute__((always_inline)) int crypto_aead_decrypt(struct aead_request *req) +{ + return crypto_aead_crt(crypto_aead_reqtfm(req))->decrypt(req); +} +static inline __attribute__((always_inline)) unsigned int crypto_aead_reqsize(struct crypto_aead *tfm) +{ + return crypto_aead_crt(tfm)->reqsize; +} +static inline __attribute__((always_inline)) void aead_request_set_tfm(struct aead_request *req, + struct crypto_aead *tfm) +{ + req->base.tfm = crypto_aead_tfm(crypto_aead_crt(tfm)->base); +} +static inline __attribute__((always_inline)) struct aead_request *aead_request_alloc(struct crypto_aead *tfm, + gfp_t gfp) +{ + struct aead_request *req; + req = kmalloc(sizeof(*req) + crypto_aead_reqsize(tfm), gfp); + if (__builtin_constant_p((((__builtin_constant_p(req) ? !!(req) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/crypto.h", .line = 824, }; ______r = __builtin_expect(!!(req), 1); ftrace_likely_update(&______f, ______r, 1); ______r; }))))) ? !!(((__builtin_constant_p(req) ? !!(req) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/crypto.h", .line = 824, }; ______r = __builtin_expect(!!(req), 1); ftrace_likely_update(&______f, ______r, 1); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/crypto.h", .line = 824, }; ______r = !!(((__builtin_constant_p(req) ? !!(req) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/crypto.h", .line = 824, }; ______r = __builtin_expect(!!(req), 1); ftrace_likely_update(&______f, ______r, 1); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + aead_request_set_tfm(req, tfm); + return req; +} +static inline __attribute__((always_inline)) void aead_request_free(struct aead_request *req) +{ + kzfree(req); +} +static inline __attribute__((always_inline)) void aead_request_set_callback(struct aead_request *req, + u32 flags, + crypto_completion_t complete, + void *data) +{ + req->base.complete = complete; + req->base.data = data; + req->base.flags = flags; +} +static inline __attribute__((always_inline)) void aead_request_set_crypt(struct aead_request *req, + struct scatterlist *src, + struct scatterlist *dst, + unsigned int cryptlen, u8 *iv) +{ + req->src = src; + req->dst = dst; + req->cryptlen = cryptlen; + req->iv = iv; +} +static inline __attribute__((always_inline)) void aead_request_set_assoc(struct aead_request *req, + struct scatterlist *assoc, + unsigned int assoclen) +{ + req->assoc = assoc; + req->assoclen = assoclen; +} +static inline __attribute__((always_inline)) struct crypto_blkcipher *__crypto_blkcipher_cast( + struct crypto_tfm *tfm) +{ + return (struct crypto_blkcipher *)tfm; +} +static inline __attribute__((always_inline)) struct crypto_blkcipher *crypto_blkcipher_cast( + struct crypto_tfm *tfm) +{ + do { if (__builtin_constant_p((((__builtin_constant_p(crypto_tfm_alg_type(tfm) != 0x00000004) ? !!(crypto_tfm_alg_type(tfm) != 0x00000004) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/crypto.h", .line = 873, }; ______r = __builtin_expect(!!(crypto_tfm_alg_type(tfm) != 0x00000004), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(crypto_tfm_alg_type(tfm) != 0x00000004) ? !!(crypto_tfm_alg_type(tfm) != 0x00000004) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/crypto.h", .line = 873, }; ______r = __builtin_expect(!!(crypto_tfm_alg_type(tfm) != 0x00000004), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/crypto.h", .line = 873, }; ______r = !!(((__builtin_constant_p(crypto_tfm_alg_type(tfm) != 0x00000004) ? !!(crypto_tfm_alg_type(tfm) != 0x00000004) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/crypto.h", .line = 873, }; ______r = __builtin_expect(!!(crypto_tfm_alg_type(tfm) != 0x00000004), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/crypto.h"), "i" (873), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); } while(0); + return __crypto_blkcipher_cast(tfm); +} +static inline __attribute__((always_inline)) struct crypto_blkcipher *crypto_alloc_blkcipher( + const char *alg_name, u32 type, u32 mask) +{ + type &= ~0x0000000f; + type |= 0x00000004; + mask |= 0x0000000f; + return __crypto_blkcipher_cast(crypto_alloc_base(alg_name, type, mask)); +} +static inline __attribute__((always_inline)) struct crypto_tfm *crypto_blkcipher_tfm( + struct crypto_blkcipher *tfm) +{ + return &tfm->base; +} +static inline __attribute__((always_inline)) void crypto_free_blkcipher(struct crypto_blkcipher *tfm) +{ + crypto_free_tfm(crypto_blkcipher_tfm(tfm)); +} +static inline __attribute__((always_inline)) int crypto_has_blkcipher(const char *alg_name, u32 type, u32 mask) +{ + type &= ~0x0000000f; + type |= 0x00000004; + mask |= 0x0000000f; + return crypto_has_alg(alg_name, type, mask); +} +static inline __attribute__((always_inline)) const char *crypto_blkcipher_name(struct crypto_blkcipher *tfm) +{ + return crypto_tfm_alg_name(crypto_blkcipher_tfm(tfm)); +} +static inline __attribute__((always_inline)) struct blkcipher_tfm *crypto_blkcipher_crt( + struct crypto_blkcipher *tfm) +{ + return &crypto_blkcipher_tfm(tfm)->crt_u.blkcipher; +} +static inline __attribute__((always_inline)) struct blkcipher_alg *crypto_blkcipher_alg( + struct crypto_blkcipher *tfm) +{ + return &crypto_blkcipher_tfm(tfm)->__crt_alg->cra_u.blkcipher; +} +static inline __attribute__((always_inline)) unsigned int crypto_blkcipher_ivsize(struct crypto_blkcipher *tfm) +{ + return crypto_blkcipher_alg(tfm)->ivsize; +} +static inline __attribute__((always_inline)) unsigned int crypto_blkcipher_blocksize( + struct crypto_blkcipher *tfm) +{ + return crypto_tfm_alg_blocksize(crypto_blkcipher_tfm(tfm)); +} +static inline __attribute__((always_inline)) unsigned int crypto_blkcipher_alignmask( + struct crypto_blkcipher *tfm) +{ + return crypto_tfm_alg_alignmask(crypto_blkcipher_tfm(tfm)); +} +static inline __attribute__((always_inline)) u32 crypto_blkcipher_get_flags(struct crypto_blkcipher *tfm) +{ + return crypto_tfm_get_flags(crypto_blkcipher_tfm(tfm)); +} +static inline __attribute__((always_inline)) void crypto_blkcipher_set_flags(struct crypto_blkcipher *tfm, + u32 flags) +{ + crypto_tfm_set_flags(crypto_blkcipher_tfm(tfm), flags); +} +static inline __attribute__((always_inline)) void crypto_blkcipher_clear_flags(struct crypto_blkcipher *tfm, + u32 flags) +{ + crypto_tfm_clear_flags(crypto_blkcipher_tfm(tfm), flags); +} +static inline __attribute__((always_inline)) int crypto_blkcipher_setkey(struct crypto_blkcipher *tfm, + const u8 *key, unsigned int keylen) +{ + return crypto_blkcipher_crt(tfm)->setkey(crypto_blkcipher_tfm(tfm), + key, keylen); +} +static inline __attribute__((always_inline)) int crypto_blkcipher_encrypt(struct blkcipher_desc *desc, + struct scatterlist *dst, + struct scatterlist *src, + unsigned int nbytes) +{ + desc->info = crypto_blkcipher_crt(desc->tfm)->iv; + return crypto_blkcipher_crt(desc->tfm)->encrypt(desc, dst, src, nbytes); +} +static inline __attribute__((always_inline)) int crypto_blkcipher_encrypt_iv(struct blkcipher_desc *desc, + struct scatterlist *dst, + struct scatterlist *src, + unsigned int nbytes) +{ + return crypto_blkcipher_crt(desc->tfm)->encrypt(desc, dst, src, nbytes); +} +static inline __attribute__((always_inline)) int crypto_blkcipher_decrypt(struct blkcipher_desc *desc, + struct scatterlist *dst, + struct scatterlist *src, + unsigned int nbytes) +{ + desc->info = crypto_blkcipher_crt(desc->tfm)->iv; + return crypto_blkcipher_crt(desc->tfm)->decrypt(desc, dst, src, nbytes); +} +static inline __attribute__((always_inline)) int crypto_blkcipher_decrypt_iv(struct blkcipher_desc *desc, + struct scatterlist *dst, + struct scatterlist *src, + unsigned int nbytes) +{ + return crypto_blkcipher_crt(desc->tfm)->decrypt(desc, dst, src, nbytes); +} +static inline __attribute__((always_inline)) void crypto_blkcipher_set_iv(struct crypto_blkcipher *tfm, + const u8 *src, unsigned int len) +{ + __builtin_memcpy(crypto_blkcipher_crt(tfm)->iv, src, len); +} +static inline __attribute__((always_inline)) void crypto_blkcipher_get_iv(struct crypto_blkcipher *tfm, + u8 *dst, unsigned int len) +{ + __builtin_memcpy(dst, crypto_blkcipher_crt(tfm)->iv, len); +} +static inline __attribute__((always_inline)) struct crypto_cipher *__crypto_cipher_cast(struct crypto_tfm *tfm) +{ + return (struct crypto_cipher *)tfm; +} +static inline __attribute__((always_inline)) struct crypto_cipher *crypto_cipher_cast(struct crypto_tfm *tfm) +{ + do { if (__builtin_constant_p((((__builtin_constant_p(crypto_tfm_alg_type(tfm) != 0x00000001) ? !!(crypto_tfm_alg_type(tfm) != 0x00000001) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/crypto.h", .line = 1018, }; ______r = __builtin_expect(!!(crypto_tfm_alg_type(tfm) != 0x00000001), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(crypto_tfm_alg_type(tfm) != 0x00000001) ? !!(crypto_tfm_alg_type(tfm) != 0x00000001) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/crypto.h", .line = 1018, }; ______r = __builtin_expect(!!(crypto_tfm_alg_type(tfm) != 0x00000001), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/crypto.h", .line = 1018, }; ______r = !!(((__builtin_constant_p(crypto_tfm_alg_type(tfm) != 0x00000001) ? !!(crypto_tfm_alg_type(tfm) != 0x00000001) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/crypto.h", .line = 1018, }; ______r = __builtin_expect(!!(crypto_tfm_alg_type(tfm) != 0x00000001), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/crypto.h"), "i" (1018), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); } while(0); + return __crypto_cipher_cast(tfm); +} +static inline __attribute__((always_inline)) struct crypto_cipher *crypto_alloc_cipher(const char *alg_name, + u32 type, u32 mask) +{ + type &= ~0x0000000f; + type |= 0x00000001; + mask |= 0x0000000f; + return __crypto_cipher_cast(crypto_alloc_base(alg_name, type, mask)); +} +static inline __attribute__((always_inline)) struct crypto_tfm *crypto_cipher_tfm(struct crypto_cipher *tfm) +{ + return &tfm->base; +} +static inline __attribute__((always_inline)) void crypto_free_cipher(struct crypto_cipher *tfm) +{ + crypto_free_tfm(crypto_cipher_tfm(tfm)); +} +static inline __attribute__((always_inline)) int crypto_has_cipher(const char *alg_name, u32 type, u32 mask) +{ + type &= ~0x0000000f; + type |= 0x00000001; + mask |= 0x0000000f; + return crypto_has_alg(alg_name, type, mask); +} +static inline __attribute__((always_inline)) struct cipher_tfm *crypto_cipher_crt(struct crypto_cipher *tfm) +{ + return &crypto_cipher_tfm(tfm)->crt_u.cipher; +} +static inline __attribute__((always_inline)) unsigned int crypto_cipher_blocksize(struct crypto_cipher *tfm) +{ + return crypto_tfm_alg_blocksize(crypto_cipher_tfm(tfm)); +} +static inline __attribute__((always_inline)) unsigned int crypto_cipher_alignmask(struct crypto_cipher *tfm) +{ + return crypto_tfm_alg_alignmask(crypto_cipher_tfm(tfm)); +} +static inline __attribute__((always_inline)) u32 crypto_cipher_get_flags(struct crypto_cipher *tfm) +{ + return crypto_tfm_get_flags(crypto_cipher_tfm(tfm)); +} +static inline __attribute__((always_inline)) void crypto_cipher_set_flags(struct crypto_cipher *tfm, + u32 flags) +{ + crypto_tfm_set_flags(crypto_cipher_tfm(tfm), flags); +} +static inline __attribute__((always_inline)) void crypto_cipher_clear_flags(struct crypto_cipher *tfm, + u32 flags) +{ + crypto_tfm_clear_flags(crypto_cipher_tfm(tfm), flags); +} +static inline __attribute__((always_inline)) int crypto_cipher_setkey(struct crypto_cipher *tfm, + const u8 *key, unsigned int keylen) +{ + return crypto_cipher_crt(tfm)->cit_setkey(crypto_cipher_tfm(tfm), + key, keylen); +} +static inline __attribute__((always_inline)) void crypto_cipher_encrypt_one(struct crypto_cipher *tfm, + u8 *dst, const u8 *src) +{ + crypto_cipher_crt(tfm)->cit_encrypt_one(crypto_cipher_tfm(tfm), + dst, src); +} +static inline __attribute__((always_inline)) void crypto_cipher_decrypt_one(struct crypto_cipher *tfm, + u8 *dst, const u8 *src) +{ + crypto_cipher_crt(tfm)->cit_decrypt_one(crypto_cipher_tfm(tfm), + dst, src); +} +static inline __attribute__((always_inline)) struct crypto_hash *__crypto_hash_cast(struct crypto_tfm *tfm) +{ + return (struct crypto_hash *)tfm; +} +static inline __attribute__((always_inline)) struct crypto_hash *crypto_hash_cast(struct crypto_tfm *tfm) +{ + do { if (__builtin_constant_p((((__builtin_constant_p((crypto_tfm_alg_type(tfm) ^ 0x00000008) & 0x0000000e) ? !!((crypto_tfm_alg_type(tfm) ^ 0x00000008) & 0x0000000e) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/crypto.h", .line = 1112, }; ______r = __builtin_expect(!!((crypto_tfm_alg_type(tfm) ^ 0x00000008) & 0x0000000e), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p((crypto_tfm_alg_type(tfm) ^ 0x00000008) & 0x0000000e) ? !!((crypto_tfm_alg_type(tfm) ^ 0x00000008) & 0x0000000e) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/crypto.h", .line = 1112, }; ______r = __builtin_expect(!!((crypto_tfm_alg_type(tfm) ^ 0x00000008) & 0x0000000e), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/linux/crypto.h" + , .line = + 1112 + , }; ______r = !!(((__builtin_constant_p((crypto_tfm_alg_type(tfm) ^ 0x00000008) & 0x0000000e) ? !!((crypto_tfm_alg_type(tfm) ^ 0x00000008) & 0x0000000e) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/crypto.h", .line = 1112, }; ______r = __builtin_expect(!!((crypto_tfm_alg_type(tfm) ^ 0x00000008) & 0x0000000e), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ( + "include/linux/crypto.h" + ), "i" ( + 1112 + ), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); } while(0) + ; + return __crypto_hash_cast(tfm); +} +static inline __attribute__((always_inline)) struct crypto_hash *crypto_alloc_hash(const char *alg_name, + u32 type, u32 mask) +{ + type &= ~0x0000000f; + mask &= ~0x0000000f; + type |= 0x00000008; + mask |= 0x0000000e; + return __crypto_hash_cast(crypto_alloc_base(alg_name, type, mask)); +} +static inline __attribute__((always_inline)) struct crypto_tfm *crypto_hash_tfm(struct crypto_hash *tfm) +{ + return &tfm->base; +} +static inline __attribute__((always_inline)) void crypto_free_hash(struct crypto_hash *tfm) +{ + crypto_free_tfm(crypto_hash_tfm(tfm)); +} +static inline __attribute__((always_inline)) int crypto_has_hash(const char *alg_name, u32 type, u32 mask) +{ + type &= ~0x0000000f; + mask &= ~0x0000000f; + type |= 0x00000008; + mask |= 0x0000000e; + return crypto_has_alg(alg_name, type, mask); +} +static inline __attribute__((always_inline)) struct hash_tfm *crypto_hash_crt(struct crypto_hash *tfm) +{ + return &crypto_hash_tfm(tfm)->crt_u.hash; +} +static inline __attribute__((always_inline)) unsigned int crypto_hash_blocksize(struct crypto_hash *tfm) +{ + return crypto_tfm_alg_blocksize(crypto_hash_tfm(tfm)); +} +static inline __attribute__((always_inline)) unsigned int crypto_hash_alignmask(struct crypto_hash *tfm) +{ + return crypto_tfm_alg_alignmask(crypto_hash_tfm(tfm)); +} +static inline __attribute__((always_inline)) unsigned int crypto_hash_digestsize(struct crypto_hash *tfm) +{ + return crypto_hash_crt(tfm)->digestsize; +} +static inline __attribute__((always_inline)) u32 crypto_hash_get_flags(struct crypto_hash *tfm) +{ + return crypto_tfm_get_flags(crypto_hash_tfm(tfm)); +} +static inline __attribute__((always_inline)) void crypto_hash_set_flags(struct crypto_hash *tfm, u32 flags) +{ + crypto_tfm_set_flags(crypto_hash_tfm(tfm), flags); +} +static inline __attribute__((always_inline)) void crypto_hash_clear_flags(struct crypto_hash *tfm, u32 flags) +{ + crypto_tfm_clear_flags(crypto_hash_tfm(tfm), flags); +} +static inline __attribute__((always_inline)) int crypto_hash_init(struct hash_desc *desc) +{ + return crypto_hash_crt(desc->tfm)->init(desc); +} +static inline __attribute__((always_inline)) int crypto_hash_update(struct hash_desc *desc, + struct scatterlist *sg, + unsigned int nbytes) +{ + return crypto_hash_crt(desc->tfm)->update(desc, sg, nbytes); +} +static inline __attribute__((always_inline)) int crypto_hash_final(struct hash_desc *desc, u8 *out) +{ + return crypto_hash_crt(desc->tfm)->final(desc, out); +} +static inline __attribute__((always_inline)) int crypto_hash_digest(struct hash_desc *desc, + struct scatterlist *sg, + unsigned int nbytes, u8 *out) +{ + return crypto_hash_crt(desc->tfm)->digest(desc, sg, nbytes, out); +} +static inline __attribute__((always_inline)) int crypto_hash_setkey(struct crypto_hash *hash, + const u8 *key, unsigned int keylen) +{ + return crypto_hash_crt(hash)->setkey(hash, key, keylen); +} +static inline __attribute__((always_inline)) struct crypto_comp *__crypto_comp_cast(struct crypto_tfm *tfm) +{ + return (struct crypto_comp *)tfm; +} +static inline __attribute__((always_inline)) struct crypto_comp *crypto_comp_cast(struct crypto_tfm *tfm) +{ + do { if (__builtin_constant_p((((__builtin_constant_p((crypto_tfm_alg_type(tfm) ^ 0x00000002) & 0x0000000f) ? !!((crypto_tfm_alg_type(tfm) ^ 0x00000002) & 0x0000000f) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/crypto.h", .line = 1220, }; ______r = __builtin_expect(!!((crypto_tfm_alg_type(tfm) ^ 0x00000002) & 0x0000000f), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p((crypto_tfm_alg_type(tfm) ^ 0x00000002) & 0x0000000f) ? !!((crypto_tfm_alg_type(tfm) ^ 0x00000002) & 0x0000000f) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/crypto.h", .line = 1220, }; ______r = __builtin_expect(!!((crypto_tfm_alg_type(tfm) ^ 0x00000002) & 0x0000000f), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/linux/crypto.h" + , .line = + 1220 + , }; ______r = !!(((__builtin_constant_p((crypto_tfm_alg_type(tfm) ^ 0x00000002) & 0x0000000f) ? !!((crypto_tfm_alg_type(tfm) ^ 0x00000002) & 0x0000000f) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/crypto.h", .line = 1220, }; ______r = __builtin_expect(!!((crypto_tfm_alg_type(tfm) ^ 0x00000002) & 0x0000000f), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ( + "include/linux/crypto.h" + ), "i" ( + 1220 + ), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); } while(0) + ; + return __crypto_comp_cast(tfm); +} +static inline __attribute__((always_inline)) struct crypto_comp *crypto_alloc_comp(const char *alg_name, + u32 type, u32 mask) +{ + type &= ~0x0000000f; + type |= 0x00000002; + mask |= 0x0000000f; + return __crypto_comp_cast(crypto_alloc_base(alg_name, type, mask)); +} +static inline __attribute__((always_inline)) struct crypto_tfm *crypto_comp_tfm(struct crypto_comp *tfm) +{ + return &tfm->base; +} +static inline __attribute__((always_inline)) void crypto_free_comp(struct crypto_comp *tfm) +{ + crypto_free_tfm(crypto_comp_tfm(tfm)); +} +static inline __attribute__((always_inline)) int crypto_has_comp(const char *alg_name, u32 type, u32 mask) +{ + type &= ~0x0000000f; + type |= 0x00000002; + mask |= 0x0000000f; + return crypto_has_alg(alg_name, type, mask); +} +static inline __attribute__((always_inline)) const char *crypto_comp_name(struct crypto_comp *tfm) +{ + return crypto_tfm_alg_name(crypto_comp_tfm(tfm)); +} +static inline __attribute__((always_inline)) struct compress_tfm *crypto_comp_crt(struct crypto_comp *tfm) +{ + return &crypto_comp_tfm(tfm)->crt_u.compress; +} +static inline __attribute__((always_inline)) int crypto_comp_compress(struct crypto_comp *tfm, + const u8 *src, unsigned int slen, + u8 *dst, unsigned int *dlen) +{ + return crypto_comp_crt(tfm)->cot_compress(crypto_comp_tfm(tfm), + src, slen, dst, dlen); +} +static inline __attribute__((always_inline)) int crypto_comp_decompress(struct crypto_comp *tfm, + const u8 *src, unsigned int slen, + u8 *dst, unsigned int *dlen) +{ + return crypto_comp_crt(tfm)->cot_decompress(crypto_comp_tfm(tfm), + src, slen, dst, dlen); +} +struct module; +struct rtattr; +struct seq_file; +struct crypto_type { + unsigned int (*ctxsize)(struct crypto_alg *alg, u32 type, u32 mask); + unsigned int (*extsize)(struct crypto_alg *alg); + int (*init)(struct crypto_tfm *tfm, u32 type, u32 mask); + int (*init_tfm)(struct crypto_tfm *tfm); + void (*show)(struct seq_file *m, struct crypto_alg *alg); + struct crypto_alg *(*lookup)(const char *name, u32 type, u32 mask); + unsigned int type; + unsigned int maskclear; + unsigned int maskset; + unsigned int tfmsize; +}; +struct crypto_instance { + struct crypto_alg alg; + struct crypto_template *tmpl; + struct hlist_node list; + void *__ctx[] __attribute__ ((__aligned__(__alignof__(unsigned long long)))); +}; +struct crypto_template { + struct list_head list; + struct hlist_head instances; + struct module *module; + struct crypto_instance *(*alloc)(struct rtattr **tb); + void (*free)(struct crypto_instance *inst); + int (*create)(struct crypto_template *tmpl, struct rtattr **tb); + char name[64]; +}; +struct crypto_spawn { + struct list_head list; + struct crypto_alg *alg; + struct crypto_instance *inst; + const struct crypto_type *frontend; + u32 mask; +}; +struct crypto_queue { + struct list_head list; + struct list_head *backlog; + unsigned int qlen; + unsigned int max_qlen; +}; +struct scatter_walk { + struct scatterlist *sg; + unsigned int offset; +}; +struct blkcipher_walk { + union { + struct { + struct page *page; + unsigned long offset; + } phys; + struct { + u8 *page; + u8 *addr; + } virt; + } src, dst; + struct scatter_walk in; + unsigned int nbytes; + struct scatter_walk out; + unsigned int total; + void *page; + u8 *buffer; + u8 *iv; + int flags; + unsigned int blocksize; +}; +struct ablkcipher_walk { + struct { + struct page *page; + unsigned int offset; + } src, dst; + struct scatter_walk in; + unsigned int nbytes; + struct scatter_walk out; + unsigned int total; + struct list_head buffers; + u8 *iv_buffer; + u8 *iv; + int flags; + unsigned int blocksize; +}; +extern const struct crypto_type crypto_ablkcipher_type; +extern const struct crypto_type crypto_aead_type; +extern const struct crypto_type crypto_blkcipher_type; +void crypto_mod_put(struct crypto_alg *alg); +int crypto_register_template(struct crypto_template *tmpl); +void crypto_unregister_template(struct crypto_template *tmpl); +struct crypto_template *crypto_lookup_template(const char *name); +int crypto_register_instance(struct crypto_template *tmpl, + struct crypto_instance *inst); +int crypto_init_spawn(struct crypto_spawn *spawn, struct crypto_alg *alg, + struct crypto_instance *inst, u32 mask); +int crypto_init_spawn2(struct crypto_spawn *spawn, struct crypto_alg *alg, + struct crypto_instance *inst, + const struct crypto_type *frontend); +void crypto_drop_spawn(struct crypto_spawn *spawn); +struct crypto_tfm *crypto_spawn_tfm(struct crypto_spawn *spawn, u32 type, + u32 mask); +void *crypto_spawn_tfm2(struct crypto_spawn *spawn); +static inline __attribute__((always_inline)) void crypto_set_spawn(struct crypto_spawn *spawn, + struct crypto_instance *inst) +{ + spawn->inst = inst; +} +struct crypto_attr_type *crypto_get_attr_type(struct rtattr **tb); +int crypto_check_attr_type(struct rtattr **tb, u32 type); +const char *crypto_attr_alg_name(struct rtattr *rta); +struct crypto_alg *crypto_attr_alg2(struct rtattr *rta, + const struct crypto_type *frontend, + u32 type, u32 mask); +static inline __attribute__((always_inline)) struct crypto_alg *crypto_attr_alg(struct rtattr *rta, + u32 type, u32 mask) +{ + return crypto_attr_alg2(rta, ((void *)0), type, mask); +} +int crypto_attr_u32(struct rtattr *rta, u32 *num); +void *crypto_alloc_instance2(const char *name, struct crypto_alg *alg, + unsigned int head); +struct crypto_instance *crypto_alloc_instance(const char *name, + struct crypto_alg *alg); +void crypto_init_queue(struct crypto_queue *queue, unsigned int max_qlen); +int crypto_enqueue_request(struct crypto_queue *queue, + struct crypto_async_request *request); +void *__crypto_dequeue_request(struct crypto_queue *queue, unsigned int offset); +struct crypto_async_request *crypto_dequeue_request(struct crypto_queue *queue); +int crypto_tfm_in_queue(struct crypto_queue *queue, struct crypto_tfm *tfm); +void crypto_inc(u8 *a, unsigned int size); +void crypto_xor(u8 *dst, const u8 *src, unsigned int size); +int blkcipher_walk_done(struct blkcipher_desc *desc, + struct blkcipher_walk *walk, int err); +int blkcipher_walk_virt(struct blkcipher_desc *desc, + struct blkcipher_walk *walk); +int blkcipher_walk_phys(struct blkcipher_desc *desc, + struct blkcipher_walk *walk); +int blkcipher_walk_virt_block(struct blkcipher_desc *desc, + struct blkcipher_walk *walk, + unsigned int blocksize); +int ablkcipher_walk_done(struct ablkcipher_request *req, + struct ablkcipher_walk *walk, int err); +int ablkcipher_walk_phys(struct ablkcipher_request *req, + struct ablkcipher_walk *walk); +void __ablkcipher_walk_complete(struct ablkcipher_walk *walk); +static inline __attribute__((always_inline)) void *crypto_tfm_ctx_aligned(struct crypto_tfm *tfm) +{ + return ((typeof(crypto_tfm_ctx(tfm)))(((((unsigned long)(crypto_tfm_ctx(tfm)))) + ((typeof(((unsigned long)(crypto_tfm_ctx(tfm)))))(((crypto_tfm_alg_alignmask(tfm) + 1))) - 1)) & ~((typeof(((unsigned long)(crypto_tfm_ctx(tfm)))))(((crypto_tfm_alg_alignmask(tfm) + 1))) - 1))) + ; +} +static inline __attribute__((always_inline)) struct crypto_instance *crypto_tfm_alg_instance( + struct crypto_tfm *tfm) +{ + return ({ const typeof( ((struct crypto_instance *)0)->alg ) *__mptr = (tfm->__crt_alg); (struct crypto_instance *)( (char *)__mptr - __builtin_offsetof(struct crypto_instance,alg) );}); +} +static inline __attribute__((always_inline)) void *crypto_instance_ctx(struct crypto_instance *inst) +{ + return inst->__ctx; +} +static inline __attribute__((always_inline)) struct ablkcipher_alg *crypto_ablkcipher_alg( + struct crypto_ablkcipher *tfm) +{ + return &crypto_ablkcipher_tfm(tfm)->__crt_alg->cra_u.ablkcipher; +} +static inline __attribute__((always_inline)) void *crypto_ablkcipher_ctx(struct crypto_ablkcipher *tfm) +{ + return crypto_tfm_ctx(&tfm->base); +} +static inline __attribute__((always_inline)) void *crypto_ablkcipher_ctx_aligned(struct crypto_ablkcipher *tfm) +{ + return crypto_tfm_ctx_aligned(&tfm->base); +} +static inline __attribute__((always_inline)) struct aead_alg *crypto_aead_alg(struct crypto_aead *tfm) +{ + return &crypto_aead_tfm(tfm)->__crt_alg->cra_u.aead; +} +static inline __attribute__((always_inline)) void *crypto_aead_ctx(struct crypto_aead *tfm) +{ + return crypto_tfm_ctx(&tfm->base); +} +static inline __attribute__((always_inline)) struct crypto_instance *crypto_aead_alg_instance( + struct crypto_aead *aead) +{ + return crypto_tfm_alg_instance(&aead->base); +} +static inline __attribute__((always_inline)) struct crypto_blkcipher *crypto_spawn_blkcipher( + struct crypto_spawn *spawn) +{ + u32 type = 0x00000004; + u32 mask = 0x0000000f; + return __crypto_blkcipher_cast(crypto_spawn_tfm(spawn, type, mask)); +} +static inline __attribute__((always_inline)) void *crypto_blkcipher_ctx(struct crypto_blkcipher *tfm) +{ + return crypto_tfm_ctx(&tfm->base); +} +static inline __attribute__((always_inline)) void *crypto_blkcipher_ctx_aligned(struct crypto_blkcipher *tfm) +{ + return crypto_tfm_ctx_aligned(&tfm->base); +} +static inline __attribute__((always_inline)) struct crypto_cipher *crypto_spawn_cipher( + struct crypto_spawn *spawn) +{ + u32 type = 0x00000001; + u32 mask = 0x0000000f; + return __crypto_cipher_cast(crypto_spawn_tfm(spawn, type, mask)); +} +static inline __attribute__((always_inline)) struct cipher_alg *crypto_cipher_alg(struct crypto_cipher *tfm) +{ + return &crypto_cipher_tfm(tfm)->__crt_alg->cra_u.cipher; +} +static inline __attribute__((always_inline)) struct crypto_hash *crypto_spawn_hash(struct crypto_spawn *spawn) +{ + u32 type = 0x00000008; + u32 mask = 0x0000000e; + return __crypto_hash_cast(crypto_spawn_tfm(spawn, type, mask)); +} +static inline __attribute__((always_inline)) void *crypto_hash_ctx(struct crypto_hash *tfm) +{ + return crypto_tfm_ctx(&tfm->base); +} +static inline __attribute__((always_inline)) void *crypto_hash_ctx_aligned(struct crypto_hash *tfm) +{ + return crypto_tfm_ctx_aligned(&tfm->base); +} +static inline __attribute__((always_inline)) void blkcipher_walk_init(struct blkcipher_walk *walk, + struct scatterlist *dst, + struct scatterlist *src, + unsigned int nbytes) +{ + walk->in.sg = src; + walk->out.sg = dst; + walk->total = nbytes; +} +static inline __attribute__((always_inline)) void ablkcipher_walk_init(struct ablkcipher_walk *walk, + struct scatterlist *dst, + struct scatterlist *src, + unsigned int nbytes) +{ + walk->in.sg = src; + walk->out.sg = dst; + walk->total = nbytes; + INIT_LIST_HEAD(&walk->buffers); +} +static inline __attribute__((always_inline)) void ablkcipher_walk_complete(struct ablkcipher_walk *walk) +{ + if (__builtin_constant_p((((__builtin_constant_p(!list_empty(&walk->buffers)) ? !!(!list_empty(&walk->buffers)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/crypto/algapi.h", .line = 322, }; ______r = __builtin_expect(!!(!list_empty(&walk->buffers)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(!list_empty(&walk->buffers)) ? !!(!list_empty(&walk->buffers)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/crypto/algapi.h", .line = 322, }; ______r = __builtin_expect(!!(!list_empty(&walk->buffers)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/crypto/algapi.h", .line = 322, }; ______r = !!(((__builtin_constant_p(!list_empty(&walk->buffers)) ? !!(!list_empty(&walk->buffers)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/crypto/algapi.h", .line = 322, }; ______r = __builtin_expect(!!(!list_empty(&walk->buffers)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + __ablkcipher_walk_complete(walk); +} +static inline __attribute__((always_inline)) struct crypto_async_request *crypto_get_backlog( + struct crypto_queue *queue) +{ + return queue->backlog == &queue->list ? ((void *)0) : + ({ const typeof( ((struct crypto_async_request *)0)->list ) *__mptr = (queue->backlog); (struct crypto_async_request *)( (char *)__mptr - __builtin_offsetof(struct crypto_async_request,list) );}); +} +static inline __attribute__((always_inline)) int ablkcipher_enqueue_request(struct crypto_queue *queue, + struct ablkcipher_request *request) +{ + return crypto_enqueue_request(queue, &request->base); +} +static inline __attribute__((always_inline)) struct ablkcipher_request *ablkcipher_dequeue_request( + struct crypto_queue *queue) +{ + return ablkcipher_request_cast(crypto_dequeue_request(queue)); +} +static inline __attribute__((always_inline)) void *ablkcipher_request_ctx(struct ablkcipher_request *req) +{ + return req->__ctx; +} +static inline __attribute__((always_inline)) int ablkcipher_tfm_in_queue(struct crypto_queue *queue, + struct crypto_ablkcipher *tfm) +{ + return crypto_tfm_in_queue(queue, crypto_ablkcipher_tfm(tfm)); +} +static inline __attribute__((always_inline)) void *aead_request_ctx(struct aead_request *req) +{ + return req->__ctx; +} +static inline __attribute__((always_inline)) void aead_request_complete(struct aead_request *req, int err) +{ + req->base.complete(&req->base, err); +} +static inline __attribute__((always_inline)) u32 aead_request_flags(struct aead_request *req) +{ + return req->base.flags; +} +static inline __attribute__((always_inline)) struct crypto_alg *crypto_get_attr_alg(struct rtattr **tb, + u32 type, u32 mask) +{ + return crypto_attr_alg(tb[1], type, mask); +} +static inline __attribute__((always_inline)) int crypto_requires_sync(u32 type, u32 mask) +{ + return (type ^ 0x00000080) & mask & 0x00000080; +} +struct crypto_aes_ctx { + u32 key_enc[((15 * 16) / sizeof(u32))]; + u32 key_dec[((15 * 16) / sizeof(u32))]; + u32 key_length; +}; +extern const u32 crypto_ft_tab[4][256]; +extern const u32 crypto_fl_tab[4][256]; +extern const u32 crypto_it_tab[4][256]; +extern const u32 crypto_il_tab[4][256]; +int crypto_aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, + unsigned int key_len); +int crypto_aes_expand_key(struct crypto_aes_ctx *ctx, const u8 *in_key, + unsigned int key_len); +struct crypto_ahash; +struct hash_alg_common { + unsigned int digestsize; + unsigned int statesize; + struct crypto_alg base; +}; +struct ahash_request { + struct crypto_async_request base; + unsigned int nbytes; + struct scatterlist *src; + u8 *result; + void *priv; + void *__ctx[] __attribute__ ((__aligned__(__alignof__(unsigned long long)))); +}; +struct ahash_alg { + int (*init)(struct ahash_request *req); + int (*update)(struct ahash_request *req); + int (*final)(struct ahash_request *req); + int (*finup)(struct ahash_request *req); + int (*digest)(struct ahash_request *req); + int (*export)(struct ahash_request *req, void *out); + int (*import)(struct ahash_request *req, const void *in); + int (*setkey)(struct crypto_ahash *tfm, const u8 *key, + unsigned int keylen); + struct hash_alg_common halg; +}; +struct shash_desc { + struct crypto_shash *tfm; + u32 flags; + void *__ctx[] __attribute__ ((__aligned__(__alignof__(unsigned long long)))); +}; +struct shash_alg { + int (*init)(struct shash_desc *desc); + int (*update)(struct shash_desc *desc, const u8 *data, + unsigned int len); + int (*final)(struct shash_desc *desc, u8 *out); + int (*finup)(struct shash_desc *desc, const u8 *data, + unsigned int len, u8 *out); + int (*digest)(struct shash_desc *desc, const u8 *data, + unsigned int len, u8 *out); + int (*export)(struct shash_desc *desc, void *out); + int (*import)(struct shash_desc *desc, const void *in); + int (*setkey)(struct crypto_shash *tfm, const u8 *key, + unsigned int keylen); + unsigned int descsize; + unsigned int digestsize + __attribute__ ((aligned(__alignof__(struct hash_alg_common)))); + unsigned int statesize; + struct crypto_alg base; +}; +struct crypto_ahash { + int (*init)(struct ahash_request *req); + int (*update)(struct ahash_request *req); + int (*final)(struct ahash_request *req); + int (*finup)(struct ahash_request *req); + int (*digest)(struct ahash_request *req); + int (*export)(struct ahash_request *req, void *out); + int (*import)(struct ahash_request *req, const void *in); + int (*setkey)(struct crypto_ahash *tfm, const u8 *key, + unsigned int keylen); + unsigned int reqsize; + struct crypto_tfm base; +}; +struct crypto_shash { + unsigned int descsize; + struct crypto_tfm base; +}; +static inline __attribute__((always_inline)) struct crypto_ahash *__crypto_ahash_cast(struct crypto_tfm *tfm) +{ + return ({ const typeof( ((struct crypto_ahash *)0)->base ) *__mptr = (tfm); (struct crypto_ahash *)( (char *)__mptr - __builtin_offsetof(struct crypto_ahash,base) );}); +} +struct crypto_ahash *crypto_alloc_ahash(const char *alg_name, u32 type, + u32 mask); +static inline __attribute__((always_inline)) struct crypto_tfm *crypto_ahash_tfm(struct crypto_ahash *tfm) +{ + return &tfm->base; +} +static inline __attribute__((always_inline)) void crypto_free_ahash(struct crypto_ahash *tfm) +{ + crypto_destroy_tfm(tfm, crypto_ahash_tfm(tfm)); +} +static inline __attribute__((always_inline)) unsigned int crypto_ahash_alignmask( + struct crypto_ahash *tfm) +{ + return crypto_tfm_alg_alignmask(crypto_ahash_tfm(tfm)); +} +static inline __attribute__((always_inline)) struct hash_alg_common *__crypto_hash_alg_common( + struct crypto_alg *alg) +{ + return ({ const typeof( ((struct hash_alg_common *)0)->base ) *__mptr = (alg); (struct hash_alg_common *)( (char *)__mptr - __builtin_offsetof(struct hash_alg_common,base) );}); +} +static inline __attribute__((always_inline)) struct hash_alg_common *crypto_hash_alg_common( + struct crypto_ahash *tfm) +{ + return __crypto_hash_alg_common(crypto_ahash_tfm(tfm)->__crt_alg); +} +static inline __attribute__((always_inline)) unsigned int crypto_ahash_digestsize(struct crypto_ahash *tfm) +{ + return crypto_hash_alg_common(tfm)->digestsize; +} +static inline __attribute__((always_inline)) unsigned int crypto_ahash_statesize(struct crypto_ahash *tfm) +{ + return crypto_hash_alg_common(tfm)->statesize; +} +static inline __attribute__((always_inline)) u32 crypto_ahash_get_flags(struct crypto_ahash *tfm) +{ + return crypto_tfm_get_flags(crypto_ahash_tfm(tfm)); +} +static inline __attribute__((always_inline)) void crypto_ahash_set_flags(struct crypto_ahash *tfm, u32 flags) +{ + crypto_tfm_set_flags(crypto_ahash_tfm(tfm), flags); +} +static inline __attribute__((always_inline)) void crypto_ahash_clear_flags(struct crypto_ahash *tfm, u32 flags) +{ + crypto_tfm_clear_flags(crypto_ahash_tfm(tfm), flags); +} +static inline __attribute__((always_inline)) struct crypto_ahash *crypto_ahash_reqtfm( + struct ahash_request *req) +{ + return __crypto_ahash_cast(req->base.tfm); +} +static inline __attribute__((always_inline)) unsigned int crypto_ahash_reqsize(struct crypto_ahash *tfm) +{ + return tfm->reqsize; +} +static inline __attribute__((always_inline)) void *ahash_request_ctx(struct ahash_request *req) +{ + return req->__ctx; +} +int crypto_ahash_setkey(struct crypto_ahash *tfm, const u8 *key, + unsigned int keylen); +int crypto_ahash_finup(struct ahash_request *req); +int crypto_ahash_final(struct ahash_request *req); +int crypto_ahash_digest(struct ahash_request *req); +static inline __attribute__((always_inline)) int crypto_ahash_export(struct ahash_request *req, void *out) +{ + return crypto_ahash_reqtfm(req)->export(req, out); +} +static inline __attribute__((always_inline)) int crypto_ahash_import(struct ahash_request *req, const void *in) +{ + return crypto_ahash_reqtfm(req)->import(req, in); +} +static inline __attribute__((always_inline)) int crypto_ahash_init(struct ahash_request *req) +{ + return crypto_ahash_reqtfm(req)->init(req); +} +static inline __attribute__((always_inline)) int crypto_ahash_update(struct ahash_request *req) +{ + return crypto_ahash_reqtfm(req)->update(req); +} +static inline __attribute__((always_inline)) void ahash_request_set_tfm(struct ahash_request *req, + struct crypto_ahash *tfm) +{ + req->base.tfm = crypto_ahash_tfm(tfm); +} +static inline __attribute__((always_inline)) struct ahash_request *ahash_request_alloc( + struct crypto_ahash *tfm, gfp_t gfp) +{ + struct ahash_request *req; + req = kmalloc(sizeof(struct ahash_request) + + crypto_ahash_reqsize(tfm), gfp); + if (__builtin_constant_p((((__builtin_constant_p(req) ? !!(req) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/crypto/hash.h", .line = 222, }; ______r = __builtin_expect(!!(req), 1); ftrace_likely_update(&______f, ______r, 1); ______r; }))))) ? !!(((__builtin_constant_p(req) ? !!(req) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/crypto/hash.h", .line = 222, }; ______r = __builtin_expect(!!(req), 1); ftrace_likely_update(&______f, ______r, 1); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/crypto/hash.h", .line = 222, }; ______r = !!(((__builtin_constant_p(req) ? !!(req) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/crypto/hash.h", .line = 222, }; ______r = __builtin_expect(!!(req), 1); ftrace_likely_update(&______f, ______r, 1); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + ahash_request_set_tfm(req, tfm); + return req; +} +static inline __attribute__((always_inline)) void ahash_request_free(struct ahash_request *req) +{ + kzfree(req); +} +static inline __attribute__((always_inline)) struct ahash_request *ahash_request_cast( + struct crypto_async_request *req) +{ + return ({ const typeof( ((struct ahash_request *)0)->base ) *__mptr = (req); (struct ahash_request *)( (char *)__mptr - __builtin_offsetof(struct ahash_request,base) );}); +} +static inline __attribute__((always_inline)) void ahash_request_set_callback(struct ahash_request *req, + u32 flags, + crypto_completion_t complete, + void *data) +{ + req->base.complete = complete; + req->base.data = data; + req->base.flags = flags; +} +static inline __attribute__((always_inline)) void ahash_request_set_crypt(struct ahash_request *req, + struct scatterlist *src, u8 *result, + unsigned int nbytes) +{ + req->src = src; + req->nbytes = nbytes; + req->result = result; +} +struct crypto_shash *crypto_alloc_shash(const char *alg_name, u32 type, + u32 mask); +static inline __attribute__((always_inline)) struct crypto_tfm *crypto_shash_tfm(struct crypto_shash *tfm) +{ + return &tfm->base; +} +static inline __attribute__((always_inline)) void crypto_free_shash(struct crypto_shash *tfm) +{ + crypto_destroy_tfm(tfm, crypto_shash_tfm(tfm)); +} +static inline __attribute__((always_inline)) unsigned int crypto_shash_alignmask( + struct crypto_shash *tfm) +{ + return crypto_tfm_alg_alignmask(crypto_shash_tfm(tfm)); +} +static inline __attribute__((always_inline)) unsigned int crypto_shash_blocksize(struct crypto_shash *tfm) +{ + return crypto_tfm_alg_blocksize(crypto_shash_tfm(tfm)); +} +static inline __attribute__((always_inline)) struct shash_alg *__crypto_shash_alg(struct crypto_alg *alg) +{ + return ({ const typeof( ((struct shash_alg *)0)->base ) *__mptr = (alg); (struct shash_alg *)( (char *)__mptr - __builtin_offsetof(struct shash_alg,base) );}); +} +static inline __attribute__((always_inline)) struct shash_alg *crypto_shash_alg(struct crypto_shash *tfm) +{ + return __crypto_shash_alg(crypto_shash_tfm(tfm)->__crt_alg); +} +static inline __attribute__((always_inline)) unsigned int crypto_shash_digestsize(struct crypto_shash *tfm) +{ + return crypto_shash_alg(tfm)->digestsize; +} +static inline __attribute__((always_inline)) unsigned int crypto_shash_statesize(struct crypto_shash *tfm) +{ + return crypto_shash_alg(tfm)->statesize; +} +static inline __attribute__((always_inline)) u32 crypto_shash_get_flags(struct crypto_shash *tfm) +{ + return crypto_tfm_get_flags(crypto_shash_tfm(tfm)); +} +static inline __attribute__((always_inline)) void crypto_shash_set_flags(struct crypto_shash *tfm, u32 flags) +{ + crypto_tfm_set_flags(crypto_shash_tfm(tfm), flags); +} +static inline __attribute__((always_inline)) void crypto_shash_clear_flags(struct crypto_shash *tfm, u32 flags) +{ + crypto_tfm_clear_flags(crypto_shash_tfm(tfm), flags); +} +static inline __attribute__((always_inline)) unsigned int crypto_shash_descsize(struct crypto_shash *tfm) +{ + return tfm->descsize; +} +static inline __attribute__((always_inline)) void *shash_desc_ctx(struct shash_desc *desc) +{ + return desc->__ctx; +} +int crypto_shash_setkey(struct crypto_shash *tfm, const u8 *key, + unsigned int keylen); +int crypto_shash_digest(struct shash_desc *desc, const u8 *data, + unsigned int len, u8 *out); +static inline __attribute__((always_inline)) int crypto_shash_export(struct shash_desc *desc, void *out) +{ + return crypto_shash_alg(desc->tfm)->export(desc, out); +} +static inline __attribute__((always_inline)) int crypto_shash_import(struct shash_desc *desc, const void *in) +{ + return crypto_shash_alg(desc->tfm)->import(desc, in); +} +static inline __attribute__((always_inline)) int crypto_shash_init(struct shash_desc *desc) +{ + return crypto_shash_alg(desc->tfm)->init(desc); +} +int crypto_shash_update(struct shash_desc *desc, const u8 *data, + unsigned int len); +int crypto_shash_final(struct shash_desc *desc, u8 *out); +int crypto_shash_finup(struct shash_desc *desc, const u8 *data, + unsigned int len, u8 *out); +struct cryptd_ablkcipher { + struct crypto_ablkcipher base; +}; +static inline __attribute__((always_inline)) struct cryptd_ablkcipher *__cryptd_ablkcipher_cast( + struct crypto_ablkcipher *tfm) +{ + return (struct cryptd_ablkcipher *)tfm; +} +struct cryptd_ablkcipher *cryptd_alloc_ablkcipher(const char *alg_name, + u32 type, u32 mask); +struct crypto_blkcipher *cryptd_ablkcipher_child(struct cryptd_ablkcipher *tfm); +void cryptd_free_ablkcipher(struct cryptd_ablkcipher *tfm); +struct cryptd_ahash { + struct crypto_ahash base; +}; +static inline __attribute__((always_inline)) struct cryptd_ahash *__cryptd_ahash_cast( + struct crypto_ahash *tfm) +{ + return (struct cryptd_ahash *)tfm; +} +struct cryptd_ahash *cryptd_alloc_ahash(const char *alg_name, + u32 type, u32 mask); +struct crypto_shash *cryptd_ahash_child(struct cryptd_ahash *tfm); +struct shash_desc *cryptd_shash_desc(struct ahash_request *req); +void cryptd_free_ahash(struct cryptd_ahash *tfm); +struct cryptd_aead { + struct crypto_aead base; +}; +static inline __attribute__((always_inline)) struct cryptd_aead *__cryptd_aead_cast( + struct crypto_aead *tfm) +{ + return (struct cryptd_aead *)tfm; +} +struct cryptd_aead *cryptd_alloc_aead(const char *alg_name, + u32 type, u32 mask); +struct crypto_aead *cryptd_aead_child(struct cryptd_aead *tfm); +void cryptd_free_aead(struct cryptd_aead *tfm); +struct sched_param { + int sched_priority; +}; +struct task_struct; +typedef struct __user_cap_header_struct { + __u32 version; + int pid; +} *cap_user_header_t; +typedef struct __user_cap_data_struct { + __u32 effective; + __u32 permitted; + __u32 inheritable; +} *cap_user_data_t; +struct vfs_cap_data { + __le32 magic_etc; + struct { + __le32 permitted; + __le32 inheritable; + } data[2]; +}; +extern int file_caps_enabled; +typedef struct kernel_cap_struct { + __u32 cap[2]; +} kernel_cap_t; +struct cpu_vfs_cap_data { + __u32 magic_etc; + kernel_cap_t permitted; + kernel_cap_t inheritable; +}; +struct dentry; +struct user_namespace; +struct user_namespace *current_user_ns(void); +extern const kernel_cap_t __cap_empty_set; +extern const kernel_cap_t __cap_full_set; +extern const kernel_cap_t __cap_init_eff_set; +static inline __attribute__((always_inline)) kernel_cap_t cap_combine(const kernel_cap_t a, + const kernel_cap_t b) +{ + kernel_cap_t dest; + do { unsigned __capi; for (__capi = 0; __capi < 2; ++__capi) { dest.cap[__capi] = a.cap[__capi] | b.cap[__capi]; } } while (0); + return dest; +} +static inline __attribute__((always_inline)) kernel_cap_t cap_intersect(const kernel_cap_t a, + const kernel_cap_t b) +{ + kernel_cap_t dest; + do { unsigned __capi; for (__capi = 0; __capi < 2; ++__capi) { dest.cap[__capi] = a.cap[__capi] & b.cap[__capi]; } } while (0); + return dest; +} +static inline __attribute__((always_inline)) kernel_cap_t cap_drop(const kernel_cap_t a, + const kernel_cap_t drop) +{ + kernel_cap_t dest; + do { unsigned __capi; for (__capi = 0; __capi < 2; ++__capi) { dest.cap[__capi] = a.cap[__capi] &~ drop.cap[__capi]; } } while (0); + return dest; +} +static inline __attribute__((always_inline)) kernel_cap_t cap_invert(const kernel_cap_t c) +{ + kernel_cap_t dest; + do { unsigned __capi; for (__capi = 0; __capi < 2; ++__capi) { dest.cap[__capi] = ~ c.cap[__capi]; } } while (0); + return dest; +} +static inline __attribute__((always_inline)) int cap_isclear(const kernel_cap_t a) +{ + unsigned __capi; + for (__capi = 0; __capi < 2; ++__capi) { + if (__builtin_constant_p(((a.cap[__capi] != 0))) ? !!((a.cap[__capi] != 0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/capability.h", .line = 486, }; ______r = !!((a.cap[__capi] != 0)); ______f.miss_hit[______r]++; ______r; })) + return 0; + } + return 1; +} +static inline __attribute__((always_inline)) int cap_issubset(const kernel_cap_t a, const kernel_cap_t set) +{ + kernel_cap_t dest; + dest = cap_drop(a, set); + return cap_isclear(dest); +} +static inline __attribute__((always_inline)) int cap_is_fs_cap(int cap) +{ + const kernel_cap_t __cap_fs_set = ((kernel_cap_t){{ ((1 << ((0) & 31)) | (1 << ((27) & 31)) | (1 << ((1) & 31)) | (1 << ((2) & 31)) | (1 << ((3) & 31)) | (1 << ((4) & 31))) | (1 << ((9) & 31)), ((1 << ((32) & 31))) } }); + return !!((1 << ((cap) & 31)) & __cap_fs_set.cap[((cap) >> 5)]); +} +static inline __attribute__((always_inline)) kernel_cap_t cap_drop_fs_set(const kernel_cap_t a) +{ + const kernel_cap_t __cap_fs_set = ((kernel_cap_t){{ ((1 << ((0) & 31)) | (1 << ((27) & 31)) | (1 << ((1) & 31)) | (1 << ((2) & 31)) | (1 << ((3) & 31)) | (1 << ((4) & 31))) | (1 << ((9) & 31)), ((1 << ((32) & 31))) } }); + return cap_drop(a, __cap_fs_set); +} +static inline __attribute__((always_inline)) kernel_cap_t cap_raise_fs_set(const kernel_cap_t a, + const kernel_cap_t permitted) +{ + const kernel_cap_t __cap_fs_set = ((kernel_cap_t){{ ((1 << ((0) & 31)) | (1 << ((27) & 31)) | (1 << ((1) & 31)) | (1 << ((2) & 31)) | (1 << ((3) & 31)) | (1 << ((4) & 31))) | (1 << ((9) & 31)), ((1 << ((32) & 31))) } }); + return cap_combine(a, + cap_intersect(permitted, __cap_fs_set)); +} +static inline __attribute__((always_inline)) kernel_cap_t cap_drop_nfsd_set(const kernel_cap_t a) +{ + const kernel_cap_t __cap_fs_set = ((kernel_cap_t){{ ((1 << ((0) & 31)) | (1 << ((27) & 31)) | (1 << ((1) & 31)) | (1 << ((2) & 31)) | (1 << ((3) & 31)) | (1 << ((4) & 31))) | (1 << ((24) & 31)), ((1 << ((32) & 31))) } }); + return cap_drop(a, __cap_fs_set); +} +static inline __attribute__((always_inline)) kernel_cap_t cap_raise_nfsd_set(const kernel_cap_t a, + const kernel_cap_t permitted) +{ + const kernel_cap_t __cap_nfsd_set = ((kernel_cap_t){{ ((1 << ((0) & 31)) | (1 << ((27) & 31)) | (1 << ((1) & 31)) | (1 << ((2) & 31)) | (1 << ((3) & 31)) | (1 << ((4) & 31))) | (1 << ((24) & 31)), ((1 << ((32) & 31))) } }); + return cap_combine(a, + cap_intersect(permitted, __cap_nfsd_set)); +} +extern bool has_capability(struct task_struct *t, int cap); +extern bool has_ns_capability(struct task_struct *t, + struct user_namespace *ns, int cap); +extern bool has_capability_noaudit(struct task_struct *t, int cap); +extern bool capable(int cap); +extern bool ns_capable(struct user_namespace *ns, int cap); +extern bool task_ns_capable(struct task_struct *t, int cap); +extern bool nsown_capable(int cap); +extern int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps); +struct rb_node +{ + unsigned long rb_parent_color; + struct rb_node *rb_right; + struct rb_node *rb_left; +} __attribute__((aligned(sizeof(long)))); +struct rb_root +{ + struct rb_node *rb_node; +}; +static inline __attribute__((always_inline)) void rb_set_parent(struct rb_node *rb, struct rb_node *p) +{ + rb->rb_parent_color = (rb->rb_parent_color & 3) | (unsigned long)p; +} +static inline __attribute__((always_inline)) void rb_set_color(struct rb_node *rb, int color) +{ + rb->rb_parent_color = (rb->rb_parent_color & ~1) | color; +} +static inline __attribute__((always_inline)) void rb_init_node(struct rb_node *rb) +{ + rb->rb_parent_color = 0; + rb->rb_right = ((void *)0); + rb->rb_left = ((void *)0); + (rb_set_parent(rb, rb)); +} +extern void rb_insert_color(struct rb_node *, struct rb_root *); +extern void rb_erase(struct rb_node *, struct rb_root *); +typedef void (*rb_augment_f)(struct rb_node *node, void *data); +extern void rb_augment_insert(struct rb_node *node, + rb_augment_f func, void *data); +extern struct rb_node *rb_augment_erase_begin(struct rb_node *node); +extern void rb_augment_erase_end(struct rb_node *node, + rb_augment_f func, void *data); +extern struct rb_node *rb_next(const struct rb_node *); +extern struct rb_node *rb_prev(const struct rb_node *); +extern struct rb_node *rb_first(const struct rb_root *); +extern struct rb_node *rb_last(const struct rb_root *); +extern void rb_replace_node(struct rb_node *victim, struct rb_node *new, + struct rb_root *root); +static inline __attribute__((always_inline)) void rb_link_node(struct rb_node * node, struct rb_node * parent, + struct rb_node ** rb_link) +{ + node->rb_parent_color = (unsigned long )parent; + node->rb_left = node->rb_right = ((void *)0); + *rb_link = node; +} +struct raw_prio_tree_node { + struct prio_tree_node *left; + struct prio_tree_node *right; + struct prio_tree_node *parent; +}; +struct prio_tree_node { + struct prio_tree_node *left; + struct prio_tree_node *right; + struct prio_tree_node *parent; + unsigned long start; + unsigned long last; +}; +struct prio_tree_root { + struct prio_tree_node *prio_tree_node; + unsigned short index_bits; + unsigned short raw; +}; +struct prio_tree_iter { + struct prio_tree_node *cur; + unsigned long mask; + unsigned long value; + int size_level; + struct prio_tree_root *root; + unsigned long r_index; + unsigned long h_index; +}; +static inline __attribute__((always_inline)) void prio_tree_iter_init(struct prio_tree_iter *iter, + struct prio_tree_root *root, unsigned long r_index, unsigned long h_index) +{ + iter->root = root; + iter->r_index = r_index; + iter->h_index = h_index; + iter->cur = ((void *)0); +} +static inline __attribute__((always_inline)) int prio_tree_empty(const struct prio_tree_root *root) +{ + return root->prio_tree_node == ((void *)0); +} +static inline __attribute__((always_inline)) int prio_tree_root(const struct prio_tree_node *node) +{ + return node->parent == node; +} +static inline __attribute__((always_inline)) int prio_tree_left_empty(const struct prio_tree_node *node) +{ + return node->left == node; +} +static inline __attribute__((always_inline)) int prio_tree_right_empty(const struct prio_tree_node *node) +{ + return node->right == node; +} +struct prio_tree_node *prio_tree_replace(struct prio_tree_root *root, + struct prio_tree_node *old, struct prio_tree_node *node); +struct prio_tree_node *prio_tree_insert(struct prio_tree_root *root, + struct prio_tree_node *node); +void prio_tree_remove(struct prio_tree_root *root, struct prio_tree_node *node); +struct prio_tree_node *prio_tree_next(struct prio_tree_iter *iter); +enum page_debug_flags { + PAGE_DEBUG_FLAG_POISON, +}; +struct address_space; +struct page { + unsigned long flags; + atomic_t _count; + union { + atomic_t _mapcount; + struct { + u16 inuse; + u16 objects; + }; + }; + union { + struct { + unsigned long private; + struct address_space *mapping; + }; + struct kmem_cache *slab; + struct page *first_page; + }; + union { + unsigned long index; + void *freelist; + }; + struct list_head lru; +}; +typedef unsigned long vm_flags_t; +struct vm_region { + struct rb_node vm_rb; + vm_flags_t vm_flags; + unsigned long vm_start; + unsigned long vm_end; + unsigned long vm_top; + unsigned long vm_pgoff; + struct file *vm_file; + int vm_usage; + bool vm_icache_flushed : 1; +}; +struct vm_area_struct { + struct mm_struct * vm_mm; + unsigned long vm_start; + unsigned long vm_end; + struct vm_area_struct *vm_next, *vm_prev; + pgprot_t vm_page_prot; + unsigned long vm_flags; + struct rb_node vm_rb; + union { + struct { + struct list_head list; + void *parent; + struct vm_area_struct *head; + } vm_set; + struct raw_prio_tree_node prio_tree_node; + } shared; + struct list_head anon_vma_chain; + struct anon_vma *anon_vma; + const struct vm_operations_struct *vm_ops; + unsigned long vm_pgoff; + struct file * vm_file; + void * vm_private_data; +}; +struct core_thread { + struct task_struct *task; + struct core_thread *next; +}; +struct core_state { + atomic_t nr_threads; + struct core_thread dumper; + struct completion startup; +}; +enum { + MM_FILEPAGES, + MM_ANONPAGES, + MM_SWAPENTS, + NR_MM_COUNTERS +}; +struct mm_rss_stat { + atomic_long_t count[NR_MM_COUNTERS]; +}; +struct mm_struct { + struct vm_area_struct * mmap; + struct rb_root mm_rb; + struct vm_area_struct * mmap_cache; + unsigned long (*get_unmapped_area) (struct file *filp, + unsigned long addr, unsigned long len, + unsigned long pgoff, unsigned long flags); + void (*unmap_area) (struct mm_struct *mm, unsigned long addr); + unsigned long mmap_base; + unsigned long task_size; + unsigned long cached_hole_size; + unsigned long free_area_cache; + pgd_t * pgd; + atomic_t mm_users; + atomic_t mm_count; + int map_count; + spinlock_t page_table_lock; + struct rw_semaphore mmap_sem; + struct list_head mmlist; + unsigned long hiwater_rss; + unsigned long hiwater_vm; + unsigned long total_vm, locked_vm, shared_vm, exec_vm; + unsigned long stack_vm, reserved_vm, def_flags, nr_ptes; + unsigned long start_code, end_code, start_data, end_data; + unsigned long start_brk, brk, start_stack; + unsigned long arg_start, arg_end, env_start, env_end; + unsigned long saved_auxv[(2*(2 + 19 + 1))]; + struct mm_rss_stat rss_stat; + struct linux_binfmt *binfmt; + cpumask_var_t cpu_vm_mask_var; + mm_context_t context; + unsigned int faultstamp; + unsigned int token_priority; + unsigned int last_interval; + atomic_t oom_disable_count; + unsigned long flags; + struct core_state *core_state; + spinlock_t ioctx_lock; + struct hlist_head ioctx_list; + struct file *exe_file; + unsigned long num_exe_file_vmas; + struct mmu_notifier_mm *mmu_notifier_mm; + pgtable_t pmd_huge_pte; +}; +static inline __attribute__((always_inline)) void mm_init_cpumask(struct mm_struct *mm) +{ +} +static inline __attribute__((always_inline)) cpumask_t *mm_cpumask(struct mm_struct *mm) +{ + return mm->cpu_vm_mask_var; +} +typedef unsigned long cputime_t; +typedef u64 cputime64_t; +struct ipc_perm +{ + __kernel_key_t key; + __kernel_uid_t uid; + __kernel_gid_t gid; + __kernel_uid_t cuid; + __kernel_gid_t cgid; + __kernel_mode_t mode; + unsigned short seq; +}; +struct ipc64_perm { + __kernel_key_t key; + __kernel_uid32_t uid; + __kernel_gid32_t gid; + __kernel_uid32_t cuid; + __kernel_gid32_t cgid; + __kernel_mode_t mode; + unsigned char __pad1[4 - sizeof(__kernel_mode_t)]; + unsigned short seq; + unsigned short __pad2; + unsigned long __unused1; + unsigned long __unused2; +}; +struct ipc_kludge { + struct msgbuf *msgp; + long msgtyp; +}; +struct kern_ipc_perm +{ + spinlock_t lock; + int deleted; + int id; + key_t key; + uid_t uid; + gid_t gid; + uid_t cuid; + gid_t cgid; + mode_t mode; + unsigned long seq; + void *security; +}; +struct semid_ds { + struct ipc_perm sem_perm; + __kernel_time_t sem_otime; + __kernel_time_t sem_ctime; + struct sem *sem_base; + struct sem_queue *sem_pending; + struct sem_queue **sem_pending_last; + struct sem_undo *undo; + unsigned short sem_nsems; +}; +struct semid64_ds { + struct ipc64_perm sem_perm; + __kernel_time_t sem_otime; + unsigned long __unused1; + __kernel_time_t sem_ctime; + unsigned long __unused2; + unsigned long sem_nsems; + unsigned long __unused3; + unsigned long __unused4; +}; +struct sembuf { + unsigned short sem_num; + short sem_op; + short sem_flg; +}; +union semun { + int val; + struct semid_ds *buf; + unsigned short *array; + struct seminfo *__buf; + void *__pad; +}; +struct seminfo { + int semmap; + int semmni; + int semmns; + int semmnu; + int semmsl; + int semopm; + int semume; + int semusz; + int semvmx; + int semaem; +}; +struct task_struct; +struct sem { + int semval; + int sempid; + struct list_head sem_pending; +}; +struct sem_array { + struct kern_ipc_perm __attribute__((__aligned__((1 << (6))))) + sem_perm; + time_t sem_otime; + time_t sem_ctime; + struct sem *sem_base; + struct list_head sem_pending; + struct list_head list_id; + int sem_nsems; + int complex_count; +}; +struct sem_queue { + struct list_head simple_list; + struct list_head list; + struct task_struct *sleeper; + struct sem_undo *undo; + int pid; + int status; + struct sembuf *sops; + int nsops; + int alter; +}; +struct sem_undo { + struct list_head list_proc; + struct rcu_head rcu; + struct sem_undo_list *ulp; + struct list_head list_id; + int semid; + short * semadj; +}; +struct sem_undo_list { + atomic_t refcnt; + spinlock_t lock; + struct list_head list_proc; +}; +struct sysv_sem { + struct sem_undo_list *undo_list; +}; +extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk); +extern void exit_sem(struct task_struct *tsk); +struct siginfo; +typedef unsigned long old_sigset_t; +typedef struct { + unsigned long sig[(64 / 32)]; +} sigset_t; +typedef void __signalfn_t(int); +typedef __signalfn_t *__sighandler_t; +typedef void __restorefn_t(void); +typedef __restorefn_t *__sigrestore_t; +extern void do_notify_resume(struct pt_regs *, void *, __u32); +struct old_sigaction { + __sighandler_t sa_handler; + old_sigset_t sa_mask; + unsigned long sa_flags; + __sigrestore_t sa_restorer; +}; +struct sigaction { + __sighandler_t sa_handler; + unsigned long sa_flags; + __sigrestore_t sa_restorer; + sigset_t sa_mask; +}; +struct k_sigaction { + struct sigaction sa; +}; +typedef struct sigaltstack { + void *ss_sp; + int ss_flags; + size_t ss_size; +} stack_t; +static inline __attribute__((always_inline)) void __gen_sigaddset(sigset_t *set, int _sig) +{ + asm("btsl %1,%0" : "+m"(*set) : "Ir"(_sig - 1) : "cc"); +} +static inline __attribute__((always_inline)) void __const_sigaddset(sigset_t *set, int _sig) +{ + unsigned long sig = _sig - 1; + set->sig[sig / 32] |= 1 << (sig % 32); +} +static inline __attribute__((always_inline)) void __gen_sigdelset(sigset_t *set, int _sig) +{ + asm("btrl %1,%0" : "+m"(*set) : "Ir"(_sig - 1) : "cc"); +} +static inline __attribute__((always_inline)) void __const_sigdelset(sigset_t *set, int _sig) +{ + unsigned long sig = _sig - 1; + set->sig[sig / 32] &= ~(1 << (sig % 32)); +} +static inline __attribute__((always_inline)) int __const_sigismember(sigset_t *set, int _sig) +{ + unsigned long sig = _sig - 1; + return 1 & (set->sig[sig / 32] >> (sig % 32)); +} +static inline __attribute__((always_inline)) int __gen_sigismember(sigset_t *set, int _sig) +{ + int ret; + asm("btl %2,%1\n\tsbbl %0,%0" + : "=r"(ret) : "m"(*set), "Ir"(_sig-1) : "cc"); + return ret; +} +static inline __attribute__((always_inline)) int sigfindinword(unsigned long word) +{ + asm("bsfl %1,%0" : "=r"(word) : "rm"(word) : "cc"); + return word; +} +struct pt_regs; +typedef union sigval { + int sival_int; + void *sival_ptr; +} sigval_t; +typedef struct siginfo { + int si_signo; + int si_errno; + int si_code; + union { + int _pad[((128 - (3 * sizeof(int))) / sizeof(int))]; + struct { + __kernel_pid_t _pid; + __kernel_uid32_t _uid; + } _kill; + struct { + __kernel_timer_t _tid; + int _overrun; + char _pad[sizeof( __kernel_uid32_t) - sizeof(int)]; + sigval_t _sigval; + int _sys_private; + } _timer; + struct { + __kernel_pid_t _pid; + __kernel_uid32_t _uid; + sigval_t _sigval; + } _rt; + struct { + __kernel_pid_t _pid; + __kernel_uid32_t _uid; + int _status; + __kernel_clock_t _utime; + __kernel_clock_t _stime; + } _sigchld; + struct { + void *_addr; + short _addr_lsb; + } _sigfault; + struct { + long _band; + int _fd; + } _sigpoll; + } _sifields; +} siginfo_t; +typedef struct sigevent { + sigval_t sigev_value; + int sigev_signo; + int sigev_notify; + union { + int _pad[((64 - (sizeof(int) * 2 + sizeof(sigval_t))) / sizeof(int))]; + int _tid; + struct { + void (*_function)(sigval_t); + void *_attribute; + } _sigev_thread; + } _sigev_un; +} sigevent_t; +struct siginfo; +void do_schedule_next_timer(struct siginfo *info); +static inline __attribute__((always_inline)) void copy_siginfo(struct siginfo *to, struct siginfo *from) +{ + if (__builtin_constant_p(((from->si_code < 0))) ? !!((from->si_code < 0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/asm-generic/siginfo.h", .line = 289, }; ______r = !!((from->si_code < 0)); ______f.miss_hit[______r]++; ______r; })) + __builtin_memcpy(to, from, sizeof(*to)); + else + __builtin_memcpy(to, from, (3 * sizeof(int)) + sizeof(from->_sifields._sigchld)); +} +extern int copy_siginfo_to_user(struct siginfo *to, struct siginfo *from); +struct task_struct; +extern int print_fatal_signals; +struct sigqueue { + struct list_head list; + int flags; + siginfo_t info; + struct user_struct *user; +}; +struct sigpending { + struct list_head list; + sigset_t signal; +}; +static inline __attribute__((always_inline)) int sigisemptyset(sigset_t *set) +{ + extern void _NSIG_WORDS_is_unsupported_size(void); + switch ((64 / 32)) { + case 4: + return (set->sig[3] | set->sig[2] | + set->sig[1] | set->sig[0]) == 0; + case 2: + return (set->sig[1] | set->sig[0]) == 0; + case 1: + return set->sig[0] == 0; + default: + _NSIG_WORDS_is_unsupported_size(); + return 0; + } +} +static inline __attribute__((always_inline)) void sigorsets(sigset_t *r, const sigset_t *a, const sigset_t *b) { extern void _NSIG_WORDS_is_unsupported_size(void); unsigned long a0, a1, a2, a3, b0, b1, b2, b3; switch ((64 / 32)) { case 4: a3 = a->sig[3]; a2 = a->sig[2]; b3 = b->sig[3]; b2 = b->sig[2]; r->sig[3] = ((a3) | (b3)); r->sig[2] = ((a2) | (b2)); case 2: a1 = a->sig[1]; b1 = b->sig[1]; r->sig[1] = ((a1) | (b1)); case 1: a0 = a->sig[0]; b0 = b->sig[0]; r->sig[0] = ((a0) | (b0)); break; default: _NSIG_WORDS_is_unsupported_size(); } } +static inline __attribute__((always_inline)) void sigandsets(sigset_t *r, const sigset_t *a, const sigset_t *b) { extern void _NSIG_WORDS_is_unsupported_size(void); unsigned long a0, a1, a2, a3, b0, b1, b2, b3; switch ((64 / 32)) { case 4: a3 = a->sig[3]; a2 = a->sig[2]; b3 = b->sig[3]; b2 = b->sig[2]; r->sig[3] = ((a3) & (b3)); r->sig[2] = ((a2) & (b2)); case 2: a1 = a->sig[1]; b1 = b->sig[1]; r->sig[1] = ((a1) & (b1)); case 1: a0 = a->sig[0]; b0 = b->sig[0]; r->sig[0] = ((a0) & (b0)); break; default: _NSIG_WORDS_is_unsupported_size(); } } +static inline __attribute__((always_inline)) void sigandnsets(sigset_t *r, const sigset_t *a, const sigset_t *b) { extern void _NSIG_WORDS_is_unsupported_size(void); unsigned long a0, a1, a2, a3, b0, b1, b2, b3; switch ((64 / 32)) { case 4: a3 = a->sig[3]; a2 = a->sig[2]; b3 = b->sig[3]; b2 = b->sig[2]; r->sig[3] = ((a3) & ~(b3)); r->sig[2] = ((a2) & ~(b2)); case 2: a1 = a->sig[1]; b1 = b->sig[1]; r->sig[1] = ((a1) & ~(b1)); case 1: a0 = a->sig[0]; b0 = b->sig[0]; r->sig[0] = ((a0) & ~(b0)); break; default: _NSIG_WORDS_is_unsupported_size(); } } +static inline __attribute__((always_inline)) void signotset(sigset_t *set) { extern void _NSIG_WORDS_is_unsupported_size(void); switch ((64 / 32)) { case 4: set->sig[3] = (~(set->sig[3])); set->sig[2] = (~(set->sig[2])); case 2: set->sig[1] = (~(set->sig[1])); case 1: set->sig[0] = (~(set->sig[0])); break; default: _NSIG_WORDS_is_unsupported_size(); } } +static inline __attribute__((always_inline)) void sigemptyset(sigset_t *set) +{ + switch ((64 / 32)) { + default: + __builtin_memset(set, 0, sizeof(sigset_t)); + break; + case 2: set->sig[1] = 0; + case 1: set->sig[0] = 0; + break; + } +} +static inline __attribute__((always_inline)) void sigfillset(sigset_t *set) +{ + switch ((64 / 32)) { + default: + __builtin_memset(set, -1, sizeof(sigset_t)); + break; + case 2: set->sig[1] = -1; + case 1: set->sig[0] = -1; + break; + } +} +static inline __attribute__((always_inline)) void sigaddsetmask(sigset_t *set, unsigned long mask) +{ + set->sig[0] |= mask; +} +static inline __attribute__((always_inline)) void sigdelsetmask(sigset_t *set, unsigned long mask) +{ + set->sig[0] &= ~mask; +} +static inline __attribute__((always_inline)) int sigtestsetmask(sigset_t *set, unsigned long mask) +{ + return (set->sig[0] & mask) != 0; +} +static inline __attribute__((always_inline)) void siginitset(sigset_t *set, unsigned long mask) +{ + set->sig[0] = mask; + switch ((64 / 32)) { + default: + __builtin_memset(&set->sig[1], 0, sizeof(long)*((64 / 32)-1)); + break; + case 2: set->sig[1] = 0; + case 1: ; + } +} +static inline __attribute__((always_inline)) void siginitsetinv(sigset_t *set, unsigned long mask) +{ + set->sig[0] = ~mask; + switch ((64 / 32)) { + default: + __builtin_memset(&set->sig[1], -1, sizeof(long)*((64 / 32)-1)); + break; + case 2: set->sig[1] = -1; + case 1: ; + } +} +static inline __attribute__((always_inline)) void init_sigpending(struct sigpending *sig) +{ + sigemptyset(&sig->signal); + INIT_LIST_HEAD(&sig->list); +} +extern void flush_sigqueue(struct sigpending *queue); +static inline __attribute__((always_inline)) int valid_signal(unsigned long sig) +{ + return sig <= 64 ? 1 : 0; +} +struct timespec; +struct pt_regs; +extern int next_signal(struct sigpending *pending, sigset_t *mask); +extern int do_send_sig_info(int sig, struct siginfo *info, + struct task_struct *p, bool group); +extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p); +extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *); +extern long do_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, + siginfo_t *info); +extern long do_sigpending(void *, unsigned long); +extern int do_sigtimedwait(const sigset_t *, siginfo_t *, + const struct timespec *); +extern int sigprocmask(int, sigset_t *, sigset_t *); +extern void set_current_blocked(const sigset_t *); +extern int show_unhandled_signals; +extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie); +extern void exit_signals(struct task_struct *tsk); +extern struct kmem_cache *sighand_cachep; +int unhandled_signal(struct task_struct *tsk, int sig); +void signals_init(void); +enum pid_type +{ + PIDTYPE_PID, + PIDTYPE_PGID, + PIDTYPE_SID, + PIDTYPE_MAX +}; +struct upid { + int nr; + struct pid_namespace *ns; + struct hlist_node pid_chain; +}; +struct pid +{ + atomic_t count; + unsigned int level; + struct hlist_head tasks[PIDTYPE_MAX]; + struct rcu_head rcu; + struct upid numbers[1]; +}; +extern struct pid init_struct_pid; +struct pid_link +{ + struct hlist_node node; + struct pid *pid; +}; +static inline __attribute__((always_inline)) struct pid *get_pid(struct pid *pid) +{ + if (__builtin_constant_p(((pid))) ? !!((pid)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/pid.h", .line = 77, }; ______r = !!((pid)); ______f.miss_hit[______r]++; ______r; })) + atomic_inc(&pid->count); + return pid; +} +extern void put_pid(struct pid *pid); +extern struct task_struct *pid_task(struct pid *pid, enum pid_type); +extern struct task_struct *get_pid_task(struct pid *pid, enum pid_type); +extern struct pid *get_task_pid(struct task_struct *task, enum pid_type type); +extern void attach_pid(struct task_struct *task, enum pid_type type, + struct pid *pid); +extern void detach_pid(struct task_struct *task, enum pid_type); +extern void change_pid(struct task_struct *task, enum pid_type, + struct pid *pid); +extern void transfer_pid(struct task_struct *old, struct task_struct *new, + enum pid_type); +struct pid_namespace; +extern struct pid_namespace init_pid_ns; +extern struct pid *find_pid_ns(int nr, struct pid_namespace *ns); +extern struct pid *find_vpid(int nr); +extern struct pid *find_get_pid(int nr); +extern struct pid *find_ge_pid(int nr, struct pid_namespace *); +int next_pidmap(struct pid_namespace *pid_ns, unsigned int last); +extern struct pid *alloc_pid(struct pid_namespace *ns); +extern void free_pid(struct pid *pid); +static inline __attribute__((always_inline)) struct pid_namespace *ns_of_pid(struct pid *pid) +{ + struct pid_namespace *ns = ((void *)0); + if (__builtin_constant_p(((pid))) ? !!((pid)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/pid.h", .line = 138, }; ______r = !!((pid)); ______f.miss_hit[______r]++; ______r; })) + ns = pid->numbers[pid->level].ns; + return ns; +} +static inline __attribute__((always_inline)) bool is_child_reaper(struct pid *pid) +{ + return pid->numbers[pid->level].nr == 1; +} +static inline __attribute__((always_inline)) pid_t pid_nr(struct pid *pid) +{ + pid_t nr = 0; + if (__builtin_constant_p(((pid))) ? !!((pid)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/pid.h", .line = 168, }; ______r = !!((pid)); ______f.miss_hit[______r]++; ______r; })) + nr = pid->numbers[0].nr; + return nr; +} +pid_t pid_nr_ns(struct pid *pid, struct pid_namespace *ns); +pid_t pid_vnr(struct pid *pid); +struct percpu_counter { + spinlock_t lock; + s64 count; + struct list_head list; + s32 *counters; +}; +extern int percpu_counter_batch; +int __percpu_counter_init(struct percpu_counter *fbc, s64 amount, + struct lock_class_key *key); +void percpu_counter_destroy(struct percpu_counter *fbc); +void percpu_counter_set(struct percpu_counter *fbc, s64 amount); +void __percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch); +s64 __percpu_counter_sum(struct percpu_counter *fbc); +int percpu_counter_compare(struct percpu_counter *fbc, s64 rhs); +static inline __attribute__((always_inline)) void percpu_counter_add(struct percpu_counter *fbc, s64 amount) +{ + __percpu_counter_add(fbc, amount, percpu_counter_batch); +} +static inline __attribute__((always_inline)) s64 percpu_counter_sum_positive(struct percpu_counter *fbc) +{ + s64 ret = __percpu_counter_sum(fbc); + return ret < 0 ? 0 : ret; +} +static inline __attribute__((always_inline)) s64 percpu_counter_sum(struct percpu_counter *fbc) +{ + return __percpu_counter_sum(fbc); +} +static inline __attribute__((always_inline)) s64 percpu_counter_read(struct percpu_counter *fbc) +{ + return fbc->count; +} +static inline __attribute__((always_inline)) s64 percpu_counter_read_positive(struct percpu_counter *fbc) +{ + s64 ret = fbc->count; + __asm__ __volatile__("": : :"memory"); + if (__builtin_constant_p(((ret >= 0))) ? !!((ret >= 0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/percpu_counter.h", .line = 76, }; ______r = !!((ret >= 0)); ______f.miss_hit[______r]++; ______r; })) + return ret; + return 0; +} +static inline __attribute__((always_inline)) int percpu_counter_initialized(struct percpu_counter *fbc) +{ + return (fbc->counters != ((void *)0)); +} +static inline __attribute__((always_inline)) void percpu_counter_inc(struct percpu_counter *fbc) +{ + percpu_counter_add(fbc, 1); +} +static inline __attribute__((always_inline)) void percpu_counter_dec(struct percpu_counter *fbc) +{ + percpu_counter_add(fbc, -1); +} +static inline __attribute__((always_inline)) void percpu_counter_sub(struct percpu_counter *fbc, s64 amount) +{ + percpu_counter_add(fbc, -amount); +} +struct prop_global { + int shift; + struct percpu_counter events; +}; +struct prop_descriptor { + int index; + struct prop_global pg[2]; + struct mutex mutex; +}; +int prop_descriptor_init(struct prop_descriptor *pd, int shift); +void prop_change_shift(struct prop_descriptor *pd, int new_shift); +struct prop_local_percpu { + struct percpu_counter events; + int shift; + unsigned long period; + spinlock_t lock; +}; +int prop_local_init_percpu(struct prop_local_percpu *pl); +void prop_local_destroy_percpu(struct prop_local_percpu *pl); +void __prop_inc_percpu(struct prop_descriptor *pd, struct prop_local_percpu *pl); +void prop_fraction_percpu(struct prop_descriptor *pd, struct prop_local_percpu *pl, + long *numerator, long *denominator); +static inline __attribute__((always_inline)) +void prop_inc_percpu(struct prop_descriptor *pd, struct prop_local_percpu *pl) +{ + unsigned long flags; + do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); flags = arch_local_irq_save(); } while (0); trace_hardirqs_off(); } while (0); + __prop_inc_percpu(pd, pl); + do { if (__builtin_constant_p(((({ ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_irqs_disabled_flags(flags); })))) ? !!((({ ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_irqs_disabled_flags(flags); }))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/proportions.h", .line = 77, }; ______r = !!((({ ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_irqs_disabled_flags(flags); }))); ______f.miss_hit[______r]++; ______r; })) { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(flags); } while (0); trace_hardirqs_off(); } else { trace_hardirqs_on(); do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(flags); } while (0); } } while (0); +} +void __prop_inc_percpu_max(struct prop_descriptor *pd, + struct prop_local_percpu *pl, long frac); +struct prop_local_single { + unsigned long events; + unsigned long period; + int shift; + spinlock_t lock; +}; +int prop_local_init_single(struct prop_local_single *pl); +void prop_local_destroy_single(struct prop_local_single *pl); +void __prop_inc_single(struct prop_descriptor *pd, struct prop_local_single *pl); +void prop_fraction_single(struct prop_descriptor *pd, struct prop_local_single *pl, + long *numerator, long *denominator); +static inline __attribute__((always_inline)) +void prop_inc_single(struct prop_descriptor *pd, struct prop_local_single *pl) +{ + unsigned long flags; + do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); flags = arch_local_irq_save(); } while (0); trace_hardirqs_off(); } while (0); + __prop_inc_single(pd, pl); + do { if (__builtin_constant_p(((({ ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_irqs_disabled_flags(flags); })))) ? !!((({ ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_irqs_disabled_flags(flags); }))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/proportions.h", .line = 129, }; ______r = !!((({ ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_irqs_disabled_flags(flags); }))); ______f.miss_hit[______r]++; ______r; })) { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(flags); } while (0); trace_hardirqs_off(); } else { trace_hardirqs_on(); do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(flags); } while (0); } } while (0); +} +typedef struct { int mode; } seccomp_t; +extern void __secure_computing(int); +static inline __attribute__((always_inline)) void secure_computing(int this_syscall) +{ + if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 8)) ? !!(test_ti_thread_flag(current_thread_info(), 8)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/seccomp.h", .line = 15, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 8)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 8)) ? !!(test_ti_thread_flag(current_thread_info(), 8)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/seccomp.h", .line = 15, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 8)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/seccomp.h", .line = 15, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 8)) ? !!(test_ti_thread_flag(current_thread_info(), 8)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/seccomp.h", .line = 15, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 8)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + __secure_computing(this_syscall); +} +extern long prctl_get_seccomp(void); +extern long prctl_set_seccomp(unsigned long); +static inline __attribute__((always_inline)) void __list_add_rcu(struct list_head *new, + struct list_head *prev, struct list_head *next) +{ + new->next = next; + new->prev = prev; + ({ if (__builtin_constant_p(((!__builtin_constant_p((new)) || (((new)) != ((void *)0))))) ? !!((!__builtin_constant_p((new)) || (((new)) != ((void *)0)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rculist.h", .line = 38, }; ______r = !!((!__builtin_constant_p((new)) || (((new)) != ((void *)0)))); ______f.miss_hit[______r]++; ______r; })) __asm__ __volatile__("": : :"memory"); (((*((struct list_head **)(&(prev)->next))))) = (typeof(*(new)) *)((new)); }); + next->prev = new; +} +static inline __attribute__((always_inline)) void list_add_rcu(struct list_head *new, struct list_head *head) +{ + __list_add_rcu(new, head, head->next); +} +static inline __attribute__((always_inline)) void list_add_tail_rcu(struct list_head *new, + struct list_head *head) +{ + __list_add_rcu(new, head->prev, head); +} +static inline __attribute__((always_inline)) void list_del_rcu(struct list_head *entry) +{ + __list_del(entry->prev, entry->next); + entry->prev = ((void *) 0x00200200 + (0x0UL)); +} +static inline __attribute__((always_inline)) void hlist_del_init_rcu(struct hlist_node *n) +{ + if (__builtin_constant_p(((!hlist_unhashed(n)))) ? !!((!hlist_unhashed(n))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rculist.h", .line = 137, }; ______r = !!((!hlist_unhashed(n))); ______f.miss_hit[______r]++; ______r; })) { + __hlist_del(n); + n->pprev = ((void *)0); + } +} +static inline __attribute__((always_inline)) void list_replace_rcu(struct list_head *old, + struct list_head *new) +{ + new->next = old->next; + new->prev = old->prev; + ({ if (__builtin_constant_p(((!__builtin_constant_p((new)) || (((new)) != ((void *)0))))) ? !!((!__builtin_constant_p((new)) || (((new)) != ((void *)0)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rculist.h", .line = 156, }; ______r = !!((!__builtin_constant_p((new)) || (((new)) != ((void *)0)))); ______f.miss_hit[______r]++; ______r; })) __asm__ __volatile__("": : :"memory"); (((*((struct list_head **)(&(new->prev)->next))))) = (typeof(*(new)) *)((new)); }); + new->next->prev = new; + old->prev = ((void *) 0x00200200 + (0x0UL)); +} +static inline __attribute__((always_inline)) void list_splice_init_rcu(struct list_head *list, + struct list_head *head, + void (*sync)(void)) +{ + struct list_head *first = list->next; + struct list_head *last = list->prev; + struct list_head *at = head->next; + if (__builtin_constant_p(((list_empty(head)))) ? !!((list_empty(head))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rculist.h", .line = 186, }; ______r = !!((list_empty(head))); ______f.miss_hit[______r]++; ______r; })) + return; + INIT_LIST_HEAD(list); + sync(); + last->next = at; + ({ if (__builtin_constant_p(((!__builtin_constant_p((first)) || (((first)) != ((void *)0))))) ? !!((!__builtin_constant_p((first)) || (((first)) != ((void *)0)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rculist.h", .line = 211, }; ______r = !!((!__builtin_constant_p((first)) || (((first)) != ((void *)0)))); ______f.miss_hit[______r]++; ______r; })) __asm__ __volatile__("": : :"memory"); (((*((struct list_head **)(&(head)->next))))) = (typeof(*(first)) *)((first)); }); + first->prev = head; + at->prev = last; +} +static inline __attribute__((always_inline)) void hlist_del_rcu(struct hlist_node *n) +{ + __hlist_del(n); + n->pprev = ((void *) 0x00200200 + (0x0UL)); +} +static inline __attribute__((always_inline)) void hlist_replace_rcu(struct hlist_node *old, + struct hlist_node *new) +{ + struct hlist_node *next = old->next; + new->next = next; + new->pprev = old->pprev; + ({ if (__builtin_constant_p(((!__builtin_constant_p((new)) || (((new)) != ((void *)0))))) ? !!((!__builtin_constant_p((new)) || (((new)) != ((void *)0)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rculist.h", .line = 329, }; ______r = !!((!__builtin_constant_p((new)) || (((new)) != ((void *)0)))); ______f.miss_hit[______r]++; ______r; })) __asm__ __volatile__("": : :"memory"); ((*(struct hlist_node **)new->pprev)) = (typeof(*(new)) *)((new)); }); + if (__builtin_constant_p(((next))) ? !!((next)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rculist.h", .line = 330, }; ______r = !!((next)); ______f.miss_hit[______r]++; ______r; })) + new->next->pprev = &new->next; + old->pprev = ((void *) 0x00200200 + (0x0UL)); +} +static inline __attribute__((always_inline)) void hlist_add_head_rcu(struct hlist_node *n, + struct hlist_head *h) +{ + struct hlist_node *first = h->first; + n->next = first; + n->pprev = &h->first; + ({ if (__builtin_constant_p(((!__builtin_constant_p((n)) || (((n)) != ((void *)0))))) ? !!((!__builtin_constant_p((n)) || (((n)) != ((void *)0)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rculist.h", .line = 368, }; ______r = !!((!__builtin_constant_p((n)) || (((n)) != ((void *)0)))); ______f.miss_hit[______r]++; ______r; })) __asm__ __volatile__("": : :"memory"); (((*((struct hlist_node **)(&(h)->first))))) = (typeof(*(n)) *)((n)); }); + if (__builtin_constant_p(((first))) ? !!((first)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rculist.h", .line = 369, }; ______r = !!((first)); ______f.miss_hit[______r]++; ______r; })) + first->pprev = &n->next; +} +static inline __attribute__((always_inline)) void hlist_add_before_rcu(struct hlist_node *n, + struct hlist_node *next) +{ + n->pprev = next->pprev; + n->next = next; + ({ if (__builtin_constant_p(((!__builtin_constant_p((n)) || (((n)) != ((void *)0))))) ? !!((!__builtin_constant_p((n)) || (((n)) != ((void *)0)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rculist.h", .line = 396, }; ______r = !!((!__builtin_constant_p((n)) || (((n)) != ((void *)0)))); ______f.miss_hit[______r]++; ______r; })) __asm__ __volatile__("": : :"memory"); (((*((struct hlist_node **)((n)->pprev))))) = (typeof(*(n)) *)((n)); }); + next->pprev = &n->next; +} +static inline __attribute__((always_inline)) void hlist_add_after_rcu(struct hlist_node *prev, + struct hlist_node *n) +{ + n->next = prev->next; + n->pprev = &prev->next; + ({ if (__builtin_constant_p(((!__builtin_constant_p((n)) || (((n)) != ((void *)0))))) ? !!((!__builtin_constant_p((n)) || (((n)) != ((void *)0)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rculist.h", .line = 423, }; ______r = !!((!__builtin_constant_p((n)) || (((n)) != ((void *)0)))); ______f.miss_hit[______r]++; ______r; })) __asm__ __volatile__("": : :"memory"); (((*((struct hlist_node **)(&(prev)->next))))) = (typeof(*(n)) *)((n)); }); + if (__builtin_constant_p(((n->next))) ? !!((n->next)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rculist.h", .line = 424, }; ______r = !!((n->next)); ______f.miss_hit[______r]++; ______r; })) + n->next->pprev = &n->next; +} +struct plist_head { + struct list_head node_list; + raw_spinlock_t *rawlock; + spinlock_t *spinlock; +}; +struct plist_node { + int prio; + struct list_head prio_list; + struct list_head node_list; +}; +static inline __attribute__((always_inline)) void +plist_head_init(struct plist_head *head, spinlock_t *lock) +{ + INIT_LIST_HEAD(&head->node_list); + head->spinlock = lock; + head->rawlock = ((void *)0); +} +static inline __attribute__((always_inline)) void +plist_head_init_raw(struct plist_head *head, raw_spinlock_t *lock) +{ + INIT_LIST_HEAD(&head->node_list); + head->rawlock = lock; + head->spinlock = ((void *)0); +} +static inline __attribute__((always_inline)) void plist_node_init(struct plist_node *node, int prio) +{ + node->prio = prio; + INIT_LIST_HEAD(&node->prio_list); + INIT_LIST_HEAD(&node->node_list); +} +extern void plist_add(struct plist_node *node, struct plist_head *head); +extern void plist_del(struct plist_node *node, struct plist_head *head); +static inline __attribute__((always_inline)) int plist_head_empty(const struct plist_head *head) +{ + return list_empty(&head->node_list); +} +static inline __attribute__((always_inline)) int plist_node_empty(const struct plist_node *node) +{ + return list_empty(&node->node_list); +} +static inline __attribute__((always_inline)) struct plist_node *plist_first(const struct plist_head *head) +{ + return ({ const typeof( ((struct plist_node *)0)->node_list ) *__mptr = (head->node_list.next); (struct plist_node *)( (char *)__mptr - __builtin_offsetof(struct plist_node,node_list) );}) + ; +} +static inline __attribute__((always_inline)) struct plist_node *plist_last(const struct plist_head *head) +{ + return ({ const typeof( ((struct plist_node *)0)->node_list ) *__mptr = (head->node_list.prev); (struct plist_node *)( (char *)__mptr - __builtin_offsetof(struct plist_node,node_list) );}) + ; +} +extern int max_lock_depth; +struct rt_mutex { + raw_spinlock_t wait_lock; + struct plist_head wait_list; + struct task_struct *owner; + int save_state; + const char *name, *file; + int line; + void *magic; +}; +struct rt_mutex_waiter; +struct hrtimer_sleeper; + extern int rt_mutex_debug_check_no_locks_freed(const void *from, + unsigned long len); + extern void rt_mutex_debug_check_no_locks_held(struct task_struct *task); + extern void rt_mutex_debug_task_free(struct task_struct *tsk); +static inline __attribute__((always_inline)) int rt_mutex_is_locked(struct rt_mutex *lock) +{ + return lock->owner != ((void *)0); +} +extern void __rt_mutex_init(struct rt_mutex *lock, const char *name); +extern void rt_mutex_destroy(struct rt_mutex *lock); +extern void rt_mutex_lock(struct rt_mutex *lock); +extern int rt_mutex_lock_interruptible(struct rt_mutex *lock, + int detect_deadlock); +extern int rt_mutex_timed_lock(struct rt_mutex *lock, + struct hrtimer_sleeper *timeout, + int detect_deadlock); +extern int rt_mutex_trylock(struct rt_mutex *lock); +extern void rt_mutex_unlock(struct rt_mutex *lock); +struct rusage { + struct timeval ru_utime; + struct timeval ru_stime; + long ru_maxrss; + long ru_ixrss; + long ru_idrss; + long ru_isrss; + long ru_minflt; + long ru_majflt; + long ru_nswap; + long ru_inblock; + long ru_oublock; + long ru_msgsnd; + long ru_msgrcv; + long ru_nsignals; + long ru_nvcsw; + long ru_nivcsw; +}; +struct rlimit { + unsigned long rlim_cur; + unsigned long rlim_max; +}; +struct rlimit64 { + __u64 rlim_cur; + __u64 rlim_max; +}; +struct task_struct; +int getrusage(struct task_struct *p, int who, struct rusage *ru); +int do_prlimit(struct task_struct *tsk, unsigned int resource, + struct rlimit *new_rlim, struct rlimit *old_rlim); +struct timerqueue_node { + struct rb_node node; + ktime_t expires; +}; +struct timerqueue_head { + struct rb_root head; + struct timerqueue_node *next; +}; +extern void timerqueue_add(struct timerqueue_head *head, + struct timerqueue_node *node); +extern void timerqueue_del(struct timerqueue_head *head, + struct timerqueue_node *node); +extern struct timerqueue_node *timerqueue_iterate_next( + struct timerqueue_node *node); +static inline __attribute__((always_inline)) +struct timerqueue_node *timerqueue_getnext(struct timerqueue_head *head) +{ + return head->next; +} +static inline __attribute__((always_inline)) void timerqueue_init(struct timerqueue_node *node) +{ + rb_init_node(&node->node); +} +static inline __attribute__((always_inline)) void timerqueue_init_head(struct timerqueue_head *head) +{ + head->head = (struct rb_root) { ((void *)0), }; + head->next = ((void *)0); +} +struct hrtimer_clock_base; +struct hrtimer_cpu_base; +enum hrtimer_mode { + HRTIMER_MODE_ABS = 0x0, + HRTIMER_MODE_REL = 0x1, + HRTIMER_MODE_PINNED = 0x02, + HRTIMER_MODE_ABS_PINNED = 0x02, + HRTIMER_MODE_REL_PINNED = 0x03, +}; +enum hrtimer_restart { + HRTIMER_NORESTART, + HRTIMER_RESTART, +}; +struct hrtimer { + struct timerqueue_node node; + ktime_t _softexpires; + enum hrtimer_restart (*function)(struct hrtimer *); + struct hrtimer_clock_base *base; + unsigned long state; + int start_pid; + void *start_site; + char start_comm[16]; +}; +struct hrtimer_sleeper { + struct hrtimer timer; + struct task_struct *task; +}; +struct hrtimer_clock_base { + struct hrtimer_cpu_base *cpu_base; + int index; + clockid_t clockid; + struct timerqueue_head active; + ktime_t resolution; + ktime_t (*get_time)(void); + ktime_t softirq_time; + ktime_t offset; +}; +enum hrtimer_base_type { + HRTIMER_BASE_MONOTONIC, + HRTIMER_BASE_REALTIME, + HRTIMER_BASE_BOOTTIME, + HRTIMER_MAX_CLOCK_BASES, +}; +struct hrtimer_cpu_base { + raw_spinlock_t lock; + unsigned long active_bases; + ktime_t expires_next; + int hres_active; + int hang_detected; + unsigned long nr_events; + unsigned long nr_retries; + unsigned long nr_hangs; + ktime_t max_hang_time; + struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; +}; +static inline __attribute__((always_inline)) void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) +{ + timer->node.expires = time; + timer->_softexpires = time; +} +static inline __attribute__((always_inline)) void hrtimer_set_expires_range(struct hrtimer *timer, ktime_t time, ktime_t delta) +{ + timer->_softexpires = time; + timer->node.expires = ktime_add_safe(time, delta); +} +static inline __attribute__((always_inline)) void hrtimer_set_expires_range_ns(struct hrtimer *timer, ktime_t time, unsigned long delta) +{ + timer->_softexpires = time; + timer->node.expires = ktime_add_safe(time, ns_to_ktime(delta)); +} +static inline __attribute__((always_inline)) void hrtimer_set_expires_tv64(struct hrtimer *timer, s64 tv64) +{ + timer->node.expires.tv64 = tv64; + timer->_softexpires.tv64 = tv64; +} +static inline __attribute__((always_inline)) void hrtimer_add_expires(struct hrtimer *timer, ktime_t time) +{ + timer->node.expires = ktime_add_safe(timer->node.expires, time); + timer->_softexpires = ktime_add_safe(timer->_softexpires, time); +} +static inline __attribute__((always_inline)) void hrtimer_add_expires_ns(struct hrtimer *timer, u64 ns) +{ + timer->node.expires = ({ (ktime_t){ .tv64 = (timer->node.expires).tv64 + (ns) }; }); + timer->_softexpires = ({ (ktime_t){ .tv64 = (timer->_softexpires).tv64 + (ns) }; }); +} +static inline __attribute__((always_inline)) ktime_t hrtimer_get_expires(const struct hrtimer *timer) +{ + return timer->node.expires; +} +static inline __attribute__((always_inline)) ktime_t hrtimer_get_softexpires(const struct hrtimer *timer) +{ + return timer->_softexpires; +} +static inline __attribute__((always_inline)) s64 hrtimer_get_expires_tv64(const struct hrtimer *timer) +{ + return timer->node.expires.tv64; +} +static inline __attribute__((always_inline)) s64 hrtimer_get_softexpires_tv64(const struct hrtimer *timer) +{ + return timer->_softexpires.tv64; +} +static inline __attribute__((always_inline)) s64 hrtimer_get_expires_ns(const struct hrtimer *timer) +{ + return ((timer->node.expires).tv64); +} +static inline __attribute__((always_inline)) ktime_t hrtimer_expires_remaining(const struct hrtimer *timer) +{ + return ({ (ktime_t){ .tv64 = (timer->node.expires).tv64 - (timer->base->get_time()).tv64 }; }); +} +struct clock_event_device; +extern void hrtimer_interrupt(struct clock_event_device *dev); +static inline __attribute__((always_inline)) ktime_t hrtimer_cb_get_time(struct hrtimer *timer) +{ + return timer->base->get_time(); +} +static inline __attribute__((always_inline)) int hrtimer_is_hres_active(struct hrtimer *timer) +{ + return timer->base->cpu_base->hres_active; +} +extern void hrtimer_peek_ahead_timers(void); +extern void clock_was_set(void); +extern void timerfd_clock_was_set(void); +extern void hrtimers_resume(void); +extern ktime_t ktime_get(void); +extern ktime_t ktime_get_real(void); +extern ktime_t ktime_get_boottime(void); +extern ktime_t ktime_get_monotonic_offset(void); +extern __attribute__((section(".data..percpu" ""))) __typeof__(struct tick_device) tick_cpu_device; +extern void hrtimer_init(struct hrtimer *timer, clockid_t which_clock, + enum hrtimer_mode mode); +static inline __attribute__((always_inline)) void hrtimer_init_on_stack(struct hrtimer *timer, + clockid_t which_clock, + enum hrtimer_mode mode) +{ + hrtimer_init(timer, which_clock, mode); +} +static inline __attribute__((always_inline)) void destroy_hrtimer_on_stack(struct hrtimer *timer) { } +extern int hrtimer_start(struct hrtimer *timer, ktime_t tim, + const enum hrtimer_mode mode); +extern int hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, + unsigned long range_ns, const enum hrtimer_mode mode); +extern int +__hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, + unsigned long delta_ns, + const enum hrtimer_mode mode, int wakeup); +extern int hrtimer_cancel(struct hrtimer *timer); +extern int hrtimer_try_to_cancel(struct hrtimer *timer); +static inline __attribute__((always_inline)) int hrtimer_start_expires(struct hrtimer *timer, + enum hrtimer_mode mode) +{ + unsigned long delta; + ktime_t soft, hard; + soft = hrtimer_get_softexpires(timer); + hard = hrtimer_get_expires(timer); + delta = ((({ (ktime_t){ .tv64 = (hard).tv64 - (soft).tv64 }; })).tv64); + return hrtimer_start_range_ns(timer, soft, delta, mode); +} +static inline __attribute__((always_inline)) int hrtimer_restart(struct hrtimer *timer) +{ + return hrtimer_start_expires(timer, HRTIMER_MODE_ABS); +} +extern ktime_t hrtimer_get_remaining(const struct hrtimer *timer); +extern int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp); +extern ktime_t hrtimer_get_next_event(void); +static inline __attribute__((always_inline)) int hrtimer_active(const struct hrtimer *timer) +{ + return timer->state != 0x00; +} +static inline __attribute__((always_inline)) int hrtimer_is_queued(struct hrtimer *timer) +{ + return timer->state & 0x01; +} +static inline __attribute__((always_inline)) int hrtimer_callback_running(struct hrtimer *timer) +{ + return timer->state & 0x02; +} +extern u64 +hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval); +static inline __attribute__((always_inline)) u64 hrtimer_forward_now(struct hrtimer *timer, + ktime_t interval) +{ + return hrtimer_forward(timer, timer->base->get_time(), interval); +} +extern long hrtimer_nanosleep(struct timespec *rqtp, + struct timespec *rmtp, + const enum hrtimer_mode mode, + const clockid_t clockid); +extern long hrtimer_nanosleep_restart(struct restart_block *restart_block); +extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl, + struct task_struct *tsk); +extern int schedule_hrtimeout_range(ktime_t *expires, unsigned long delta, + const enum hrtimer_mode mode); +extern int schedule_hrtimeout_range_clock(ktime_t *expires, + unsigned long delta, const enum hrtimer_mode mode, int clock); +extern int schedule_hrtimeout(ktime_t *expires, const enum hrtimer_mode mode); +extern void hrtimer_run_queues(void); +extern void hrtimer_run_pending(void); +extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) hrtimers_init(void); +extern u64 ktime_divns(const ktime_t kt, s64 div); +extern void sysrq_timer_list_show(void); +struct task_io_accounting { + u64 rchar; + u64 wchar; + u64 syscr; + u64 syscw; + u64 read_bytes; + u64 write_bytes; + u64 cancelled_write_bytes; +}; +struct latency_record { + unsigned long backtrace[12]; + unsigned int count; + unsigned long time; + unsigned long max; +}; +struct task_struct; +extern int latencytop_enabled; +void __account_scheduler_latency(struct task_struct *task, int usecs, int inter); +static inline __attribute__((always_inline)) void +account_scheduler_latency(struct task_struct *task, int usecs, int inter) +{ + if (__builtin_constant_p((((__builtin_constant_p(latencytop_enabled) ? !!(latencytop_enabled) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/latencytop.h", .line = 33, }; ______r = __builtin_expect(!!(latencytop_enabled), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(latencytop_enabled) ? !!(latencytop_enabled) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/latencytop.h", .line = 33, }; ______r = __builtin_expect(!!(latencytop_enabled), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/latencytop.h", .line = 33, }; ______r = !!(((__builtin_constant_p(latencytop_enabled) ? !!(latencytop_enabled) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/latencytop.h", .line = 33, }; ______r = __builtin_expect(!!(latencytop_enabled), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + __account_scheduler_latency(task, usecs, inter); +} +void clear_all_latency_tracing(struct task_struct *p); +typedef int32_t key_serial_t; +typedef uint32_t key_perm_t; +struct key; +struct selinux_audit_rule; +struct audit_context; +struct kern_ipc_perm; +static inline __attribute__((always_inline)) bool selinux_is_enabled(void) +{ + return false; +} +struct user_struct; +struct cred; +struct inode; +struct group_info { + atomic_t usage; + int ngroups; + int nblocks; + gid_t small_block[32]; + gid_t *blocks[0]; +}; +static inline __attribute__((always_inline)) struct group_info *get_group_info(struct group_info *gi) +{ + atomic_inc(&gi->usage); + return gi; +} +extern struct group_info *groups_alloc(int); +extern struct group_info init_groups; +extern void groups_free(struct group_info *); +extern int set_current_groups(struct group_info *); +extern int set_groups(struct cred *, struct group_info *); +extern int groups_search(const struct group_info *, gid_t); +extern int in_group_p(gid_t); +extern int in_egroup_p(gid_t); +struct cred { + atomic_t usage; + uid_t uid; + gid_t gid; + uid_t suid; + gid_t sgid; + uid_t euid; + gid_t egid; + uid_t fsuid; + gid_t fsgid; + unsigned securebits; + kernel_cap_t cap_inheritable; + kernel_cap_t cap_permitted; + kernel_cap_t cap_effective; + kernel_cap_t cap_bset; + void *security; + struct user_struct *user; + struct user_namespace *user_ns; + struct group_info *group_info; + struct rcu_head rcu; +}; +extern void __put_cred(struct cred *); +extern void exit_creds(struct task_struct *); +extern int copy_creds(struct task_struct *, unsigned long); +extern const struct cred *get_task_cred(struct task_struct *); +extern struct cred *cred_alloc_blank(void); +extern struct cred *prepare_creds(void); +extern struct cred *prepare_exec_creds(void); +extern int commit_creds(struct cred *); +extern void abort_creds(struct cred *); +extern const struct cred *override_creds(const struct cred *); +extern void revert_creds(const struct cred *); +extern struct cred *prepare_kernel_cred(struct task_struct *); +extern int change_create_files_as(struct cred *, struct inode *); +extern int set_security_override(struct cred *, u32); +extern int set_security_override_from_ctx(struct cred *, const char *); +extern int set_create_files_as(struct cred *, struct inode *); +extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) cred_init(void); +static inline __attribute__((always_inline)) void validate_creds(const struct cred *cred) +{ +} +static inline __attribute__((always_inline)) void validate_creds_for_do_exit(struct task_struct *tsk) +{ +} +static inline __attribute__((always_inline)) void validate_process_creds(void) +{ +} +static inline __attribute__((always_inline)) struct cred *get_new_cred(struct cred *cred) +{ + atomic_inc(&cred->usage); + return cred; +} +static inline __attribute__((always_inline)) const struct cred *get_cred(const struct cred *cred) +{ + struct cred *nonconst_cred = (struct cred *) cred; + validate_creds(cred); + return get_new_cred(nonconst_cred); +} +static inline __attribute__((always_inline)) void put_cred(const struct cred *_cred) +{ + struct cred *cred = (struct cred *) _cred; + validate_creds(cred); + if (__builtin_constant_p(((atomic_dec_and_test(&(cred)->usage)))) ? !!((atomic_dec_and_test(&(cred)->usage))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/cred.h", .line = 261, }; ______r = !!((atomic_dec_and_test(&(cred)->usage))); ______f.miss_hit[______r]++; ______r; })) + __put_cred(cred); +} +extern struct user_namespace init_user_ns; +struct exec_domain; +struct futex_pi_state; +struct robust_list_head; +struct bio_list; +struct fs_struct; +struct perf_event_context; +struct blk_plug; +extern unsigned long avenrun[]; +extern void get_avenrun(unsigned long *loads, unsigned long offset, int shift); +extern unsigned long total_forks; +extern int nr_threads; +extern __attribute__((section(".data..percpu" ""))) __typeof__(unsigned long) process_counts; +extern int nr_processes(void); +extern unsigned long nr_running(void); +extern unsigned long nr_uninterruptible(void); +extern unsigned long nr_iowait(void); +extern unsigned long nr_iowait_cpu(int cpu); +extern unsigned long this_cpu_load(void); +extern void calc_global_load(unsigned long ticks); +extern unsigned long get_parent_ip(unsigned long addr); +struct seq_file; +struct cfs_rq; +struct task_group; +extern void proc_sched_show_task(struct task_struct *p, struct seq_file *m); +extern void proc_sched_set_task(struct task_struct *p); +extern void +print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq); +extern char ___assert_task_state[1 - 2*!!( + sizeof("RSDTtZXxKW")-1 != ( __builtin_constant_p(512) ? ( (512) < 1 ? ____ilog2_NaN() : (512) & (1ULL << 63) ? 63 : (512) & (1ULL << 62) ? 62 : (512) & (1ULL << 61) ? 61 : (512) & (1ULL << 60) ? 60 : (512) & (1ULL << 59) ? 59 : (512) & (1ULL << 58) ? 58 : (512) & (1ULL << 57) ? 57 : (512) & (1ULL << 56) ? 56 : (512) & (1ULL << 55) ? 55 : (512) & (1ULL << 54) ? 54 : (512) & (1ULL << 53) ? 53 : (512) & (1ULL << 52) ? 52 : (512) & (1ULL << 51) ? 51 : (512) & (1ULL << 50) ? 50 : (512) & (1ULL << 49) ? 49 : (512) & (1ULL << 48) ? 48 : (512) & (1ULL << 47) ? 47 : (512) & (1ULL << 46) ? 46 : (512) & (1ULL << 45) ? 45 : (512) & (1ULL << 44) ? 44 : (512) & (1ULL << 43) ? 43 : (512) & (1ULL << 42) ? 42 : (512) & (1ULL << 41) ? 41 : (512) & (1ULL << 40) ? 40 : (512) & (1ULL << 39) ? 39 : (512) & (1ULL << 38) ? 38 : (512) & (1ULL << 37) ? 37 : (512) & (1ULL << 36) ? 36 : (512) & (1ULL << 35) ? 35 : (512) & (1ULL << 34) ? 34 : (512) & (1ULL << 33) ? 33 : (512) & (1ULL << 32) ? 32 : (512) & (1ULL << 31) ? 31 : (512) & (1ULL << 30) ? 30 : (512) & (1ULL << 29) ? 29 : (512) & (1ULL << 28) ? 28 : (512) & (1ULL << 27) ? 27 : (512) & (1ULL << 26) ? 26 : (512) & (1ULL << 25) ? 25 : (512) & (1ULL << 24) ? 24 : (512) & (1ULL << 23) ? 23 : (512) & (1ULL << 22) ? 22 : (512) & (1ULL << 21) ? 21 : (512) & (1ULL << 20) ? 20 : (512) & (1ULL << 19) ? 19 : (512) & (1ULL << 18) ? 18 : (512) & (1ULL << 17) ? 17 : (512) & (1ULL << 16) ? 16 : (512) & (1ULL << 15) ? 15 : (512) & (1ULL << 14) ? 14 : (512) & (1ULL << 13) ? 13 : (512) & (1ULL << 12) ? 12 : (512) & (1ULL << 11) ? 11 : (512) & (1ULL << 10) ? 10 : (512) & (1ULL << 9) ? 9 : (512) & (1ULL << 8) ? 8 : (512) & (1ULL << 7) ? 7 : (512) & (1ULL << 6) ? 6 : (512) & (1ULL << 5) ? 5 : (512) & (1ULL << 4) ? 4 : (512) & (1ULL << 3) ? 3 : (512) & (1ULL << 2) ? 2 : (512) & (1ULL << 1) ? 1 : (512) & (1ULL << 0) ? 0 : ____ilog2_NaN() ) : (sizeof(512) <= 4) ? __ilog2_u32(512) : __ilog2_u64(512) )+1)]; +extern rwlock_t tasklist_lock; +extern spinlock_t mmlist_lock; +struct task_struct; +extern void sched_init(void); +extern void sched_init_smp(void); +extern __attribute__((regparm(0))) void schedule_tail(struct task_struct *prev); +extern void init_idle(struct task_struct *idle, int cpu); +extern void init_idle_bootup_task(struct task_struct *idle); +extern int runqueue_is_locked(int cpu); +extern cpumask_var_t nohz_cpu_mask; +static inline __attribute__((always_inline)) void select_nohz_load_balancer(int stop_tick) { } +extern void show_state_filter(unsigned long state_filter); +static inline __attribute__((always_inline)) void show_state(void) +{ + show_state_filter(0); +} +extern void show_regs(struct pt_regs *); +extern void show_stack(struct task_struct *task, unsigned long *sp); +void io_schedule(void); +long io_schedule_timeout(long timeout); +extern void cpu_init (void); +extern void trap_init(void); +extern void update_process_times(int user); +extern void scheduler_tick(void); +extern void sched_show_task(struct task_struct *p); +extern void touch_softlockup_watchdog(void); +extern void touch_softlockup_watchdog_sync(void); +extern void touch_all_softlockup_watchdogs(void); +extern int proc_dowatchdog_thresh(struct ctl_table *table, int write, + void *buffer, + size_t *lenp, loff_t *ppos); +extern unsigned int softlockup_panic; +void lockup_detector_init(void); +extern unsigned int sysctl_hung_task_panic; +extern unsigned long sysctl_hung_task_check_count; +extern unsigned long sysctl_hung_task_timeout_secs; +extern unsigned long sysctl_hung_task_warnings; +extern int proc_dohung_task_timeout_secs(struct ctl_table *table, int write, + void *buffer, + size_t *lenp, loff_t *ppos); +extern char __sched_text_start[], __sched_text_end[]; +extern int in_sched_functions(unsigned long addr); +extern signed long schedule_timeout(signed long timeout); +extern signed long schedule_timeout_interruptible(signed long timeout); +extern signed long schedule_timeout_killable(signed long timeout); +extern signed long schedule_timeout_uninterruptible(signed long timeout); + __attribute__((regparm(0))) void schedule(void); +extern int mutex_spin_on_owner(struct mutex *lock, struct task_struct *owner); +struct nsproxy; +struct user_namespace; +extern int sysctl_max_map_count; +typedef unsigned long aio_context_t; +enum { + IOCB_CMD_PREAD = 0, + IOCB_CMD_PWRITE = 1, + IOCB_CMD_FSYNC = 2, + IOCB_CMD_FDSYNC = 3, + IOCB_CMD_NOOP = 6, + IOCB_CMD_PREADV = 7, + IOCB_CMD_PWRITEV = 8, +}; +struct io_event { + __u64 data; + __u64 obj; + __s64 res; + __s64 res2; +}; +struct iocb { + __u64 aio_data; + __u32 aio_key, aio_reserved1; + __u16 aio_lio_opcode; + __s16 aio_reqprio; + __u32 aio_fildes; + __u64 aio_buf; + __u64 aio_nbytes; + __s64 aio_offset; + __u64 aio_reserved2; + __u32 aio_flags; + __u32 aio_resfd; +}; +struct iovec +{ + void *iov_base; + __kernel_size_t iov_len; +}; +struct kvec { + void *iov_base; + size_t iov_len; +}; +static inline __attribute__((always_inline)) size_t iov_length(const struct iovec *iov, unsigned long nr_segs) +{ + unsigned long seg; + size_t ret = 0; + for (seg = 0; seg < nr_segs; seg++) + ret += iov[seg].iov_len; + return ret; +} +unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to); +struct kioctx; +struct kiocb { + struct list_head ki_run_list; + unsigned long ki_flags; + int ki_users; + unsigned ki_key; + struct file *ki_filp; + struct kioctx *ki_ctx; + int (*ki_cancel)(struct kiocb *, struct io_event *); + ssize_t (*ki_retry)(struct kiocb *); + void (*ki_dtor)(struct kiocb *); + union { + void *user; + struct task_struct *tsk; + } ki_obj; + __u64 ki_user_data; + loff_t ki_pos; + void *private; + unsigned short ki_opcode; + size_t ki_nbytes; + char *ki_buf; + size_t ki_left; + struct iovec ki_inline_vec; + struct iovec *ki_iovec; + unsigned long ki_nr_segs; + unsigned long ki_cur_seg; + struct list_head ki_list; + struct eventfd_ctx *ki_eventfd; +}; +struct aio_ring { + unsigned id; + unsigned nr; + unsigned head; + unsigned tail; + unsigned magic; + unsigned compat_features; + unsigned incompat_features; + unsigned header_length; + struct io_event io_events[0]; +}; +struct aio_ring_info { + unsigned long mmap_base; + unsigned long mmap_size; + struct page **ring_pages; + spinlock_t ring_lock; + long nr_pages; + unsigned nr, tail; + struct page *internal_pages[8]; +}; +struct kioctx { + atomic_t users; + int dead; + struct mm_struct *mm; + unsigned long user_id; + struct hlist_node list; + wait_queue_head_t wait; + spinlock_t ctx_lock; + int reqs_active; + struct list_head active_reqs; + struct list_head run_list; + unsigned max_reqs; + struct aio_ring_info ring_info; + struct delayed_work wq; + struct rcu_head rcu_head; +}; +extern unsigned aio_max_size; +extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb); +extern int aio_put_req(struct kiocb *iocb); +extern void kick_iocb(struct kiocb *iocb); +extern int aio_complete(struct kiocb *iocb, long res, long res2); +struct mm_struct; +extern void exit_aio(struct mm_struct *mm); +extern long do_io_submit(aio_context_t ctx_id, long nr, + struct iocb * *iocbpp, bool compat); +static inline __attribute__((always_inline)) struct kiocb *list_kiocb(struct list_head *h) +{ + return ({ const typeof( ((struct kiocb *)0)->ki_list ) *__mptr = (h); (struct kiocb *)( (char *)__mptr - __builtin_offsetof(struct kiocb,ki_list) );}); +} +extern unsigned long aio_nr; +extern unsigned long aio_max_nr; +extern void arch_pick_mmap_layout(struct mm_struct *mm); +extern unsigned long +arch_get_unmapped_area(struct file *, unsigned long, unsigned long, + unsigned long, unsigned long); +extern unsigned long +arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr, + unsigned long len, unsigned long pgoff, + unsigned long flags); +extern void arch_unmap_area(struct mm_struct *, unsigned long); +extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long); +extern void set_dumpable(struct mm_struct *mm, int value); +extern int get_dumpable(struct mm_struct *mm); +struct sighand_struct { + atomic_t count; + struct k_sigaction action[64]; + spinlock_t siglock; + wait_queue_head_t signalfd_wqh; +}; +struct pacct_struct { + int ac_flag; + long ac_exitcode; + unsigned long ac_mem; + cputime_t ac_utime, ac_stime; + unsigned long ac_minflt, ac_majflt; +}; +struct cpu_itimer { + cputime_t expires; + cputime_t incr; + u32 error; + u32 incr_error; +}; +struct task_cputime { + cputime_t utime; + cputime_t stime; + unsigned long long sum_exec_runtime; +}; +struct thread_group_cputimer { + struct task_cputime cputime; + int running; + spinlock_t lock; +}; +struct autogroup; +struct signal_struct { + atomic_t sigcnt; + atomic_t live; + int nr_threads; + wait_queue_head_t wait_chldexit; + struct task_struct *curr_target; + struct sigpending shared_pending; + int group_exit_code; + int notify_count; + struct task_struct *group_exit_task; + int group_stop_count; + unsigned int flags; + struct list_head posix_timers; + struct hrtimer real_timer; + struct pid *leader_pid; + ktime_t it_real_incr; + struct cpu_itimer it[2]; + struct thread_group_cputimer cputimer; + struct task_cputime cputime_expires; + struct list_head cpu_timers[3]; + struct pid *tty_old_pgrp; + int leader; + struct tty_struct *tty; + struct autogroup *autogroup; + cputime_t utime, stime, cutime, cstime; + cputime_t gtime; + cputime_t cgtime; + cputime_t prev_utime, prev_stime; + unsigned long nvcsw, nivcsw, cnvcsw, cnivcsw; + unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; + unsigned long inblock, oublock, cinblock, coublock; + unsigned long maxrss, cmaxrss; + struct task_io_accounting ioac; + unsigned long long sum_sched_runtime; + struct rlimit rlim[16]; + struct pacct_struct pacct; + struct taskstats *stats; + unsigned audit_tty; + struct tty_audit_buf *tty_audit_buf; + struct rw_semaphore threadgroup_fork_lock; + int oom_adj; + int oom_score_adj; + int oom_score_adj_min; + struct mutex cred_guard_mutex; +}; +static inline __attribute__((always_inline)) int signal_group_exit(const struct signal_struct *sig) +{ + return (sig->flags & 0x00000004) || + (sig->group_exit_task != ((void *)0)); +} +struct user_struct { + atomic_t __count; + atomic_t processes; + atomic_t files; + atomic_t sigpending; + atomic_t inotify_watches; + atomic_t inotify_devs; + atomic_t fanotify_listeners; + atomic_long_t epoll_watches; + unsigned long mq_bytes; + unsigned long locked_shm; + struct hlist_node uidhash_node; + uid_t uid; + struct user_namespace *user_ns; + atomic_long_t locked_vm; +}; +extern int uids_sysfs_init(void); +extern struct user_struct *find_user(uid_t); +extern struct user_struct root_user; +struct backing_dev_info; +struct reclaim_state; +struct sched_info { + unsigned long pcount; + unsigned long long run_delay; + unsigned long long last_arrival, + last_queued; +}; +struct task_delay_info { + spinlock_t lock; + unsigned int flags; + struct timespec blkio_start, blkio_end; + u64 blkio_delay; + u64 swapin_delay; + u32 blkio_count; + u32 swapin_count; + struct timespec freepages_start, freepages_end; + u64 freepages_delay; + u32 freepages_count; +}; +static inline __attribute__((always_inline)) int sched_info_on(void) +{ + return 1; +} +enum cpu_idle_type { + CPU_IDLE, + CPU_NOT_IDLE, + CPU_NEWLY_IDLE, + CPU_MAX_IDLE_TYPES +}; +enum powersavings_balance_level { + POWERSAVINGS_BALANCE_NONE = 0, + POWERSAVINGS_BALANCE_BASIC, + POWERSAVINGS_BALANCE_WAKEUP, + MAX_POWERSAVINGS_BALANCE_LEVELS +}; +extern int sched_mc_power_savings, sched_smt_power_savings; +static inline __attribute__((always_inline)) int sd_balance_for_mc_power(void) +{ + if (__builtin_constant_p(((sched_smt_power_savings))) ? !!((sched_smt_power_savings)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/sched.h", .line = 864, }; ______r = !!((sched_smt_power_savings)); ______f.miss_hit[______r]++; ______r; })) + return 0x0100; + if (__builtin_constant_p(((!sched_mc_power_savings))) ? !!((!sched_mc_power_savings)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/sched.h", .line = 867, }; ______r = !!((!sched_mc_power_savings)); ______f.miss_hit[______r]++; ______r; })) + return 0x1000; + return 0; +} +static inline __attribute__((always_inline)) int sd_balance_for_package_power(void) +{ + if (__builtin_constant_p(((sched_mc_power_savings | sched_smt_power_savings))) ? !!((sched_mc_power_savings | sched_smt_power_savings)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/sched.h", .line = 875, }; ______r = !!((sched_mc_power_savings | sched_smt_power_savings)); ______f.miss_hit[______r]++; ______r; })) + return 0x0100; + return 0x1000; +} +extern int __attribute__((weak)) arch_sd_sibiling_asym_packing(void); +static inline __attribute__((always_inline)) int sd_power_saving_flags(void) +{ + if (__builtin_constant_p(((sched_mc_power_savings | sched_smt_power_savings))) ? !!((sched_mc_power_savings | sched_smt_power_savings)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/sched.h", .line = 891, }; ______r = !!((sched_mc_power_savings | sched_smt_power_savings)); ______f.miss_hit[______r]++; ______r; })) + return 0x0002; + return 0; +} +struct sched_group_power { + atomic_t ref; + unsigned int power, power_orig; +}; +struct sched_group { + struct sched_group *next; + atomic_t ref; + unsigned int group_weight; + struct sched_group_power *sgp; + unsigned long cpumask[0]; +}; +static inline __attribute__((always_inline)) struct cpumask *sched_group_cpus(struct sched_group *sg) +{ + return ((struct cpumask *)(1 ? (sg->cpumask) : (void *)sizeof(__check_is_bitmap(sg->cpumask)))); +} +struct sched_domain_attr { + int relax_domain_level; +}; +extern int sched_domain_level_max; +struct sched_domain { + struct sched_domain *parent; + struct sched_domain *child; + struct sched_group *groups; + unsigned long min_interval; + unsigned long max_interval; + unsigned int busy_factor; + unsigned int imbalance_pct; + unsigned int cache_nice_tries; + unsigned int busy_idx; + unsigned int idle_idx; + unsigned int newidle_idx; + unsigned int wake_idx; + unsigned int forkexec_idx; + unsigned int smt_gain; + int flags; + int level; + unsigned long last_balance; + unsigned int balance_interval; + unsigned int nr_balance_failed; + u64 last_update; + unsigned int lb_count[CPU_MAX_IDLE_TYPES]; + unsigned int lb_failed[CPU_MAX_IDLE_TYPES]; + unsigned int lb_balanced[CPU_MAX_IDLE_TYPES]; + unsigned int lb_imbalance[CPU_MAX_IDLE_TYPES]; + unsigned int lb_gained[CPU_MAX_IDLE_TYPES]; + unsigned int lb_hot_gained[CPU_MAX_IDLE_TYPES]; + unsigned int lb_nobusyg[CPU_MAX_IDLE_TYPES]; + unsigned int lb_nobusyq[CPU_MAX_IDLE_TYPES]; + unsigned int alb_count; + unsigned int alb_failed; + unsigned int alb_pushed; + unsigned int sbe_count; + unsigned int sbe_balanced; + unsigned int sbe_pushed; + unsigned int sbf_count; + unsigned int sbf_balanced; + unsigned int sbf_pushed; + unsigned int ttwu_wake_remote; + unsigned int ttwu_move_affine; + unsigned int ttwu_move_balance; + char *name; + union { + void *private; + struct rcu_head rcu; + }; + unsigned int span_weight; + unsigned long span[0]; +}; +static inline __attribute__((always_inline)) struct cpumask *sched_domain_span(struct sched_domain *sd) +{ + return ((struct cpumask *)(1 ? (sd->span) : (void *)sizeof(__check_is_bitmap(sd->span)))); +} +extern void partition_sched_domains(int ndoms_new, cpumask_var_t doms_new[], + struct sched_domain_attr *dattr_new); +cpumask_var_t *alloc_sched_domains(unsigned int ndoms); +void free_sched_domains(cpumask_var_t doms[], unsigned int ndoms); +static inline __attribute__((always_inline)) int test_sd_parent(struct sched_domain *sd, int flag) +{ + if (__builtin_constant_p(((sd->parent && (sd->parent->flags & flag)))) ? !!((sd->parent && (sd->parent->flags & flag))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/sched.h", .line = 1029, }; ______r = !!((sd->parent && (sd->parent->flags & flag))); ______f.miss_hit[______r]++; ______r; })) + return 1; + return 0; +} +unsigned long default_scale_freq_power(struct sched_domain *sd, int cpu); +unsigned long default_scale_smt_power(struct sched_domain *sd, int cpu); +struct io_context; +static inline __attribute__((always_inline)) void prefetch_stack(struct task_struct *t) { } +struct audit_context; +struct mempolicy; +struct pipe_inode_info; +struct uts_namespace; +struct rq; +struct sched_domain; +struct sched_class { + const struct sched_class *next; + void (*enqueue_task) (struct rq *rq, struct task_struct *p, int flags); + void (*dequeue_task) (struct rq *rq, struct task_struct *p, int flags); + void (*yield_task) (struct rq *rq); + bool (*yield_to_task) (struct rq *rq, struct task_struct *p, bool preempt); + void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int flags); + struct task_struct * (*pick_next_task) (struct rq *rq); + void (*put_prev_task) (struct rq *rq, struct task_struct *p); + int (*select_task_rq)(struct task_struct *p, int sd_flag, int flags); + void (*pre_schedule) (struct rq *this_rq, struct task_struct *task); + void (*post_schedule) (struct rq *this_rq); + void (*task_waking) (struct task_struct *task); + void (*task_woken) (struct rq *this_rq, struct task_struct *task); + void (*set_cpus_allowed)(struct task_struct *p, + const struct cpumask *newmask); + void (*rq_online)(struct rq *rq); + void (*rq_offline)(struct rq *rq); + void (*set_curr_task) (struct rq *rq); + void (*task_tick) (struct rq *rq, struct task_struct *p, int queued); + void (*task_fork) (struct task_struct *p); + void (*switched_from) (struct rq *this_rq, struct task_struct *task); + void (*switched_to) (struct rq *this_rq, struct task_struct *task); + void (*prio_changed) (struct rq *this_rq, struct task_struct *task, + int oldprio); + unsigned int (*get_rr_interval) (struct rq *rq, + struct task_struct *task); + void (*task_move_group) (struct task_struct *p, int on_rq); +}; +struct load_weight { + unsigned long weight, inv_weight; +}; +struct sched_statistics { + u64 wait_start; + u64 wait_max; + u64 wait_count; + u64 wait_sum; + u64 iowait_count; + u64 iowait_sum; + u64 sleep_start; + u64 sleep_max; + s64 sum_sleep_runtime; + u64 block_start; + u64 block_max; + u64 exec_max; + u64 slice_max; + u64 nr_migrations_cold; + u64 nr_failed_migrations_affine; + u64 nr_failed_migrations_running; + u64 nr_failed_migrations_hot; + u64 nr_forced_migrations; + u64 nr_wakeups; + u64 nr_wakeups_sync; + u64 nr_wakeups_migrate; + u64 nr_wakeups_local; + u64 nr_wakeups_remote; + u64 nr_wakeups_affine; + u64 nr_wakeups_affine_attempts; + u64 nr_wakeups_passive; + u64 nr_wakeups_idle; +}; +struct sched_entity { + struct load_weight load; + struct rb_node run_node; + struct list_head group_node; + unsigned int on_rq; + u64 exec_start; + u64 sum_exec_runtime; + u64 vruntime; + u64 prev_sum_exec_runtime; + u64 nr_migrations; + struct sched_statistics statistics; + struct sched_entity *parent; + struct cfs_rq *cfs_rq; + struct cfs_rq *my_q; +}; +struct sched_rt_entity { + struct list_head run_list; + unsigned long timeout; + unsigned int time_slice; + int nr_cpus_allowed; + struct sched_rt_entity *back; +}; +struct rcu_node; +enum perf_event_task_context { + perf_invalid_context = -1, + perf_hw_context = 0, + perf_sw_context, + perf_nr_task_contexts, +}; +struct task_struct { + volatile long state; + void *stack; + atomic_t usage; + unsigned int flags; + unsigned int ptrace; + struct task_struct *wake_entry; + int on_cpu; + int on_rq; + int prio, static_prio, normal_prio; + unsigned int rt_priority; + const struct sched_class *sched_class; + struct sched_entity se; + struct sched_rt_entity rt; + struct hlist_head preempt_notifiers; + unsigned char fpu_counter; + unsigned int btrace_seq; + unsigned int policy; + cpumask_t cpus_allowed; + int rcu_read_lock_nesting; + char rcu_read_unlock_special; + int rcu_boosted; + struct list_head rcu_node_entry; + struct rcu_node *rcu_blocked_node; + struct rt_mutex *rcu_boost_mutex; + struct sched_info sched_info; + struct list_head tasks; + struct plist_node pushable_tasks; + struct mm_struct *mm, *active_mm; + int exit_state; + int exit_code, exit_signal; + int pdeath_signal; + unsigned int group_stop; + unsigned int personality; + unsigned did_exec:1; + unsigned in_execve:1; + unsigned in_iowait:1; + unsigned sched_reset_on_fork:1; + unsigned sched_contributes_to_load:1; + pid_t pid; + pid_t tgid; + unsigned long stack_canary; + struct task_struct *real_parent; + struct task_struct *parent; + struct list_head children; + struct list_head sibling; + struct task_struct *group_leader; + struct list_head ptraced; + struct list_head ptrace_entry; + struct pid_link pids[PIDTYPE_MAX]; + struct list_head thread_group; + struct completion *vfork_done; + int *set_child_tid; + int *clear_child_tid; + cputime_t utime, stime, utimescaled, stimescaled; + cputime_t gtime; + cputime_t prev_utime, prev_stime; + unsigned long nvcsw, nivcsw; + struct timespec start_time; + struct timespec real_start_time; + unsigned long min_flt, maj_flt; + struct task_cputime cputime_expires; + struct list_head cpu_timers[3]; + const struct cred *real_cred; + const struct cred *cred; + struct cred *replacement_session_keyring; + char comm[16]; + int link_count, total_link_count; + struct sysv_sem sysvsem; + unsigned long last_switch_count; + struct thread_struct thread; + struct fs_struct *fs; + struct files_struct *files; + struct nsproxy *nsproxy; + struct signal_struct *signal; + struct sighand_struct *sighand; + sigset_t blocked, real_blocked; + sigset_t saved_sigmask; + struct sigpending pending; + unsigned long sas_ss_sp; + size_t sas_ss_size; + int (*notifier)(void *priv); + void *notifier_data; + sigset_t *notifier_mask; + struct audit_context *audit_context; + uid_t loginuid; + unsigned int sessionid; + seccomp_t seccomp; + u32 parent_exec_id; + u32 self_exec_id; + spinlock_t alloc_lock; + struct irqaction *irqaction; + raw_spinlock_t pi_lock; + struct plist_head pi_waiters; + struct rt_mutex_waiter *pi_blocked_on; + struct mutex_waiter *blocked_on; + unsigned int irq_events; + unsigned long hardirq_enable_ip; + unsigned long hardirq_disable_ip; + unsigned int hardirq_enable_event; + unsigned int hardirq_disable_event; + int hardirqs_enabled; + int hardirq_context; + unsigned long softirq_disable_ip; + unsigned long softirq_enable_ip; + unsigned int softirq_disable_event; + unsigned int softirq_enable_event; + int softirqs_enabled; + int softirq_context; + u64 curr_chain_key; + int lockdep_depth; + unsigned int lockdep_recursion; + struct held_lock held_locks[48UL]; + gfp_t lockdep_reclaim_gfp; + void *journal_info; + struct bio_list *bio_list; + struct blk_plug *plug; + struct reclaim_state *reclaim_state; + struct backing_dev_info *backing_dev_info; + struct io_context *io_context; + unsigned long ptrace_message; + siginfo_t *last_siginfo; + struct task_io_accounting ioac; + u64 acct_rss_mem1; + u64 acct_vm_mem1; + cputime_t acct_timexpd; + struct css_set *cgroups; + struct list_head cg_list; + struct robust_list_head *robust_list; + struct list_head pi_state_list; + struct futex_pi_state *pi_state_cache; + struct perf_event_context *perf_event_ctxp[perf_nr_task_contexts]; + struct mutex perf_event_mutex; + struct list_head perf_event_list; + atomic_t fs_excl; + struct rcu_head rcu; + struct pipe_inode_info *splice_pipe; + struct task_delay_info *delays; + struct prop_local_single dirties; + int latency_record_count; + struct latency_record latency_record[32]; + unsigned long timer_slack_ns; + unsigned long default_timer_slack_ns; + struct list_head *scm_work_list; + int curr_ret_stack; + struct ftrace_ret_stack *ret_stack; + unsigned long long ftrace_timestamp; + atomic_t trace_overrun; + atomic_t tracing_graph_pause; + unsigned long trace; + unsigned long trace_recursion; + atomic_t ptrace_bp_refcnt; +}; +static inline __attribute__((always_inline)) int rt_prio(int prio) +{ + if (__builtin_constant_p((((__builtin_constant_p(prio < 100) ? !!(prio < 100) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/sched.h", .line = 1599, }; ______r = __builtin_expect(!!(prio < 100), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(prio < 100) ? !!(prio < 100) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/sched.h", .line = 1599, }; ______r = __builtin_expect(!!(prio < 100), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/sched.h", .line = 1599, }; ______r = !!(((__builtin_constant_p(prio < 100) ? !!(prio < 100) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/sched.h", .line = 1599, }; ______r = __builtin_expect(!!(prio < 100), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + return 1; + return 0; +} +static inline __attribute__((always_inline)) int rt_task(struct task_struct *p) +{ + return rt_prio(p->prio); +} +static inline __attribute__((always_inline)) struct pid *task_pid(struct task_struct *task) +{ + return task->pids[PIDTYPE_PID].pid; +} +static inline __attribute__((always_inline)) struct pid *task_tgid(struct task_struct *task) +{ + return task->group_leader->pids[PIDTYPE_PID].pid; +} +static inline __attribute__((always_inline)) struct pid *task_pgrp(struct task_struct *task) +{ + return task->group_leader->pids[PIDTYPE_PGID].pid; +} +static inline __attribute__((always_inline)) struct pid *task_session(struct task_struct *task) +{ + return task->group_leader->pids[PIDTYPE_SID].pid; +} +struct pid_namespace; +pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type, + struct pid_namespace *ns); +static inline __attribute__((always_inline)) pid_t task_pid_nr(struct task_struct *tsk) +{ + return tsk->pid; +} +static inline __attribute__((always_inline)) pid_t task_pid_nr_ns(struct task_struct *tsk, + struct pid_namespace *ns) +{ + return __task_pid_nr_ns(tsk, PIDTYPE_PID, ns); +} +static inline __attribute__((always_inline)) pid_t task_pid_vnr(struct task_struct *tsk) +{ + return __task_pid_nr_ns(tsk, PIDTYPE_PID, ((void *)0)); +} +static inline __attribute__((always_inline)) pid_t task_tgid_nr(struct task_struct *tsk) +{ + return tsk->tgid; +} +pid_t task_tgid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns); +static inline __attribute__((always_inline)) pid_t task_tgid_vnr(struct task_struct *tsk) +{ + return pid_vnr(task_tgid(tsk)); +} +static inline __attribute__((always_inline)) pid_t task_pgrp_nr_ns(struct task_struct *tsk, + struct pid_namespace *ns) +{ + return __task_pid_nr_ns(tsk, PIDTYPE_PGID, ns); +} +static inline __attribute__((always_inline)) pid_t task_pgrp_vnr(struct task_struct *tsk) +{ + return __task_pid_nr_ns(tsk, PIDTYPE_PGID, ((void *)0)); +} +static inline __attribute__((always_inline)) pid_t task_session_nr_ns(struct task_struct *tsk, + struct pid_namespace *ns) +{ + return __task_pid_nr_ns(tsk, PIDTYPE_SID, ns); +} +static inline __attribute__((always_inline)) pid_t task_session_vnr(struct task_struct *tsk) +{ + return __task_pid_nr_ns(tsk, PIDTYPE_SID, ((void *)0)); +} +static inline __attribute__((always_inline)) pid_t task_pgrp_nr(struct task_struct *tsk) +{ + return task_pgrp_nr_ns(tsk, &init_pid_ns); +} +static inline __attribute__((always_inline)) int pid_alive(struct task_struct *p) +{ + return p->pids[PIDTYPE_PID].pid != ((void *)0); +} +static inline __attribute__((always_inline)) int is_global_init(struct task_struct *tsk) +{ + return tsk->pid == 1; +} +extern int is_container_init(struct task_struct *tsk); +extern struct pid *cad_pid; +extern void free_task(struct task_struct *tsk); +extern void __put_task_struct(struct task_struct *t); +static inline __attribute__((always_inline)) void put_task_struct(struct task_struct *t) +{ + if (__builtin_constant_p(((atomic_dec_and_test(&t->usage)))) ? !!((atomic_dec_and_test(&t->usage))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/sched.h", .line = 1750, }; ______r = !!((atomic_dec_and_test(&t->usage))); ______f.miss_hit[______r]++; ______r; })) + __put_task_struct(t); +} +extern void task_times(struct task_struct *p, cputime_t *ut, cputime_t *st); +extern void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *st); +extern void task_clear_group_stop_pending(struct task_struct *task); +static inline __attribute__((always_inline)) void rcu_copy_process(struct task_struct *p) +{ + p->rcu_read_lock_nesting = 0; + p->rcu_read_unlock_special = 0; + p->rcu_blocked_node = ((void *)0); + p->rcu_boost_mutex = ((void *)0); + INIT_LIST_HEAD(&p->rcu_node_entry); +} +extern void do_set_cpus_allowed(struct task_struct *p, + const struct cpumask *new_mask); +extern int set_cpus_allowed_ptr(struct task_struct *p, + const struct cpumask *new_mask); +static inline __attribute__((always_inline)) int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) +{ + return set_cpus_allowed_ptr(p, &new_mask); +} +extern unsigned long long __attribute__((no_instrument_function)) sched_clock(void); +extern u64 cpu_clock(int cpu); +extern u64 local_clock(void); +extern u64 sched_clock_cpu(int cpu); +extern void sched_clock_init(void); +extern int sched_clock_stable; +extern void sched_clock_tick(void); +extern void sched_clock_idle_sleep_event(void); +extern void sched_clock_idle_wakeup_event(u64 delta_ns); +extern void enable_sched_clock_irqtime(void); +extern void disable_sched_clock_irqtime(void); +extern unsigned long long +task_sched_runtime(struct task_struct *task); +extern unsigned long long thread_group_sched_runtime(struct task_struct *task); +extern void sched_exec(void); +extern void sched_clock_idle_sleep_event(void); +extern void sched_clock_idle_wakeup_event(u64 delta_ns); +extern void idle_task_exit(void); +static inline __attribute__((always_inline)) void wake_up_idle_cpu(int cpu) { } +extern unsigned int sysctl_sched_latency; +extern unsigned int sysctl_sched_min_granularity; +extern unsigned int sysctl_sched_wakeup_granularity; +extern unsigned int sysctl_sched_child_runs_first; +enum sched_tunable_scaling { + SCHED_TUNABLESCALING_NONE, + SCHED_TUNABLESCALING_LOG, + SCHED_TUNABLESCALING_LINEAR, + SCHED_TUNABLESCALING_END, +}; +extern enum sched_tunable_scaling sysctl_sched_tunable_scaling; +extern unsigned int sysctl_sched_migration_cost; +extern unsigned int sysctl_sched_nr_migrate; +extern unsigned int sysctl_sched_time_avg; +extern unsigned int sysctl_timer_migration; +extern unsigned int sysctl_sched_shares_window; +int sched_proc_update_handler(struct ctl_table *table, int write, + void *buffer, size_t *length, + loff_t *ppos); +static inline __attribute__((always_inline)) unsigned int get_sysctl_timer_migration(void) +{ + return sysctl_timer_migration; +} +extern unsigned int sysctl_sched_rt_period; +extern int sysctl_sched_rt_runtime; +int sched_rt_handler(struct ctl_table *table, int write, + void *buffer, size_t *lenp, + loff_t *ppos); +extern unsigned int sysctl_sched_autogroup_enabled; +extern void sched_autogroup_create_attach(struct task_struct *p); +extern void sched_autogroup_detach(struct task_struct *p); +extern void sched_autogroup_fork(struct signal_struct *sig); +extern void sched_autogroup_exit(struct signal_struct *sig); +extern void proc_sched_autogroup_show_task(struct task_struct *p, struct seq_file *m); +extern int proc_sched_autogroup_set_nice(struct task_struct *p, int *nice); +extern int rt_mutex_getprio(struct task_struct *p); +extern void rt_mutex_setprio(struct task_struct *p, int prio); +extern void rt_mutex_adjust_pi(struct task_struct *p); +extern bool yield_to(struct task_struct *p, bool preempt); +extern void set_user_nice(struct task_struct *p, long nice); +extern int task_prio(const struct task_struct *p); +extern int task_nice(const struct task_struct *p); +extern int can_nice(const struct task_struct *p, const int nice); +extern int task_curr(const struct task_struct *p); +extern int idle_cpu(int cpu); +extern int sched_setscheduler(struct task_struct *, int, + const struct sched_param *); +extern int sched_setscheduler_nocheck(struct task_struct *, int, + const struct sched_param *); +extern struct task_struct *idle_task(int cpu); +extern struct task_struct *curr_task(int cpu); +extern void set_curr_task(int cpu, struct task_struct *p); +void yield(void); +extern struct exec_domain default_exec_domain; +union thread_union { + struct thread_info thread_info; + unsigned long stack[(((1UL) << 12) << 1)/sizeof(long)]; +}; +static inline __attribute__((always_inline)) int kstack_end(void *addr) +{ + return !(((unsigned long)addr+sizeof(void*)-1) & ((((1UL) << 12) << 1)-sizeof(void*))); +} +extern union thread_union init_thread_union; +extern struct task_struct init_task; +extern struct mm_struct init_mm; +extern struct pid_namespace init_pid_ns; +extern struct task_struct *find_task_by_vpid(pid_t nr); +extern struct task_struct *find_task_by_pid_ns(pid_t nr, + struct pid_namespace *ns); +extern void __set_special_pids(struct pid *pid); +extern struct user_struct * alloc_uid(struct user_namespace *, uid_t); +static inline __attribute__((always_inline)) struct user_struct *get_uid(struct user_struct *u) +{ + atomic_inc(&u->__count); + return u; +} +extern void free_uid(struct user_struct *); +extern void release_uids(struct user_namespace *ns); +extern void xtime_update(unsigned long ticks); +extern int wake_up_state(struct task_struct *tsk, unsigned int state); +extern int wake_up_process(struct task_struct *tsk); +extern void wake_up_new_task(struct task_struct *tsk); + extern void kick_process(struct task_struct *tsk); +extern void sched_fork(struct task_struct *p); +extern void sched_dead(struct task_struct *p); +extern void proc_caches_init(void); +extern void flush_signals(struct task_struct *); +extern void __flush_signals(struct task_struct *); +extern void ignore_signals(struct task_struct *); +extern void flush_signal_handlers(struct task_struct *, int force_default); +extern int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info); +static inline __attribute__((always_inline)) int dequeue_signal_lock(struct task_struct *tsk, sigset_t *mask, siginfo_t *info) +{ + unsigned long flags; + int ret; + do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); flags = _raw_spin_lock_irqsave(spinlock_check(&tsk->sighand->siglock)); } while (0); } while (0); + ret = dequeue_signal(tsk, mask, info); + spin_unlock_irqrestore(&tsk->sighand->siglock, flags); + return ret; +} +extern void block_all_signals(int (*notifier)(void *priv), void *priv, + sigset_t *mask); +extern void unblock_all_signals(void); +extern void release_task(struct task_struct * p); +extern int send_sig_info(int, struct siginfo *, struct task_struct *); +extern int force_sigsegv(int, struct task_struct *); +extern int force_sig_info(int, struct siginfo *, struct task_struct *); +extern int __kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp); +extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid); +extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32); +extern int kill_pgrp(struct pid *pid, int sig, int priv); +extern int kill_pid(struct pid *pid, int sig, int priv); +extern int kill_proc_info(int, struct siginfo *, pid_t); +extern int do_notify_parent(struct task_struct *, int); +extern void __wake_up_parent(struct task_struct *p, struct task_struct *parent); +extern void force_sig(int, struct task_struct *); +extern int send_sig(int, struct task_struct *, int); +extern int zap_other_threads(struct task_struct *p); +extern struct sigqueue *sigqueue_alloc(void); +extern void sigqueue_free(struct sigqueue *); +extern int send_sigqueue(struct sigqueue *, struct task_struct *, int group); +extern int do_sigaction(int, struct k_sigaction *, struct k_sigaction *); +extern int do_sigaltstack(const stack_t *, stack_t *, unsigned long); +static inline __attribute__((always_inline)) int kill_cad_pid(int sig, int priv) +{ + return kill_pid(cad_pid, sig, priv); +} +static inline __attribute__((always_inline)) int on_sig_stack(unsigned long sp) +{ + return sp > get_current()->sas_ss_sp && + sp - get_current()->sas_ss_sp <= get_current()->sas_ss_size; +} +static inline __attribute__((always_inline)) int sas_ss_flags(unsigned long sp) +{ + return (get_current()->sas_ss_size == 0 ? 2 + : on_sig_stack(sp) ? 1 : 0); +} +extern struct mm_struct * mm_alloc(void); +extern void __mmdrop(struct mm_struct *); +static inline __attribute__((always_inline)) void mmdrop(struct mm_struct * mm) +{ + if (__builtin_constant_p((((__builtin_constant_p(atomic_dec_and_test(&mm->mm_count)) ? !!(atomic_dec_and_test(&mm->mm_count)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/sched.h", .line = 2204, }; ______r = __builtin_expect(!!(atomic_dec_and_test(&mm->mm_count)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(atomic_dec_and_test(&mm->mm_count)) ? !!(atomic_dec_and_test(&mm->mm_count)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/sched.h", .line = 2204, }; ______r = __builtin_expect(!!(atomic_dec_and_test(&mm->mm_count)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/sched.h", .line = 2204, }; ______r = !!(((__builtin_constant_p(atomic_dec_and_test(&mm->mm_count)) ? !!(atomic_dec_and_test(&mm->mm_count)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/sched.h", .line = 2204, }; ______r = __builtin_expect(!!(atomic_dec_and_test(&mm->mm_count)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + __mmdrop(mm); +} +extern void mmput(struct mm_struct *); +extern struct mm_struct *get_task_mm(struct task_struct *task); +extern void mm_release(struct task_struct *, struct mm_struct *); +extern struct mm_struct *dup_mm(struct task_struct *tsk); +extern int copy_thread(unsigned long, unsigned long, unsigned long, + struct task_struct *, struct pt_regs *); +extern void flush_thread(void); +extern void exit_thread(void); +extern void exit_files(struct task_struct *); +extern void __cleanup_sighand(struct sighand_struct *); +extern void exit_itimers(struct signal_struct *); +extern void flush_itimer_signals(void); +extern void do_group_exit(int); +extern void daemonize(const char *, ...); +extern int allow_signal(int); +extern int disallow_signal(int); +extern int do_execve(const char *, + const char * const *, + const char * const *, struct pt_regs *); +extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int *, int *); +struct task_struct *fork_idle(int); +extern void set_task_comm(struct task_struct *tsk, char *from); +extern char *get_task_comm(char *to, struct task_struct *tsk); +void scheduler_ipi(void); +extern unsigned long wait_task_inactive(struct task_struct *, long match_state); +extern bool current_is_single_threaded(void); +static inline __attribute__((always_inline)) int get_nr_threads(struct task_struct *tsk) +{ + return tsk->signal->nr_threads; +} +static inline __attribute__((always_inline)) int has_group_leader_pid(struct task_struct *p) +{ + return p->pid == p->tgid; +} +static inline __attribute__((always_inline)) +int same_thread_group(struct task_struct *p1, struct task_struct *p2) +{ + return p1->tgid == p2->tgid; +} +static inline __attribute__((always_inline)) struct task_struct *next_thread(const struct task_struct *p) +{ + return ({typeof (*p->thread_group.next) *__ptr = (typeof (*p->thread_group.next) *)p->thread_group.next; ({ const typeof( ((struct task_struct *)0)->thread_group ) *__mptr = ((typeof(p->thread_group.next))({ typeof(*(__ptr)) *_________p1 = (typeof(*(__ptr))* )(*(volatile typeof((__ptr)) *)&((__ptr))); do { } while (0); ; do { } while (0); ((typeof(*(__ptr)) *)(_________p1)); })); (struct task_struct *)( (char *)__mptr - __builtin_offsetof(struct task_struct,thread_group) );}); }) + ; +} +static inline __attribute__((always_inline)) int thread_group_empty(struct task_struct *p) +{ + return list_empty(&p->thread_group); +} +static inline __attribute__((always_inline)) int task_detached(struct task_struct *p) +{ + return p->exit_signal == -1; +} +static inline __attribute__((always_inline)) void task_lock(struct task_struct *p) +{ + spin_lock(&p->alloc_lock); +} +static inline __attribute__((always_inline)) void task_unlock(struct task_struct *p) +{ + spin_unlock(&p->alloc_lock); +} +extern struct sighand_struct *__lock_task_sighand(struct task_struct *tsk, + unsigned long *flags); +static inline __attribute__((always_inline)) void unlock_task_sighand(struct task_struct *tsk, + unsigned long *flags) +{ + spin_unlock_irqrestore(&tsk->sighand->siglock, *flags); +} +static inline __attribute__((always_inline)) void threadgroup_fork_read_lock(struct task_struct *tsk) +{ + down_read(&tsk->signal->threadgroup_fork_lock); +} +static inline __attribute__((always_inline)) void threadgroup_fork_read_unlock(struct task_struct *tsk) +{ + up_read(&tsk->signal->threadgroup_fork_lock); +} +static inline __attribute__((always_inline)) void threadgroup_fork_write_lock(struct task_struct *tsk) +{ + down_write(&tsk->signal->threadgroup_fork_lock); +} +static inline __attribute__((always_inline)) void threadgroup_fork_write_unlock(struct task_struct *tsk) +{ + up_write(&tsk->signal->threadgroup_fork_lock); +} +static inline __attribute__((always_inline)) void setup_thread_stack(struct task_struct *p, struct task_struct *org) +{ + *((struct thread_info *)(p)->stack) = *((struct thread_info *)(org)->stack); + ((struct thread_info *)(p)->stack)->task = p; +} +static inline __attribute__((always_inline)) unsigned long *end_of_stack(struct task_struct *p) +{ + return (unsigned long *)(((struct thread_info *)(p)->stack) + 1); +} +static inline __attribute__((always_inline)) int object_is_on_stack(void *obj) +{ + void *stack = ((get_current())->stack); + return (obj >= stack) && (obj < (stack + (((1UL) << 12) << 1))); +} +extern void thread_info_cache_init(void); +static inline __attribute__((always_inline)) void set_tsk_thread_flag(struct task_struct *tsk, int flag) +{ + set_ti_thread_flag(((struct thread_info *)(tsk)->stack), flag); +} +static inline __attribute__((always_inline)) void clear_tsk_thread_flag(struct task_struct *tsk, int flag) +{ + clear_ti_thread_flag(((struct thread_info *)(tsk)->stack), flag); +} +static inline __attribute__((always_inline)) int test_and_set_tsk_thread_flag(struct task_struct *tsk, int flag) +{ + return test_and_set_ti_thread_flag(((struct thread_info *)(tsk)->stack), flag); +} +static inline __attribute__((always_inline)) int test_and_clear_tsk_thread_flag(struct task_struct *tsk, int flag) +{ + return test_and_clear_ti_thread_flag(((struct thread_info *)(tsk)->stack), flag); +} +static inline __attribute__((always_inline)) int test_tsk_thread_flag(struct task_struct *tsk, int flag) +{ + return test_ti_thread_flag(((struct thread_info *)(tsk)->stack), flag); +} +static inline __attribute__((always_inline)) void set_tsk_need_resched(struct task_struct *tsk) +{ + set_tsk_thread_flag(tsk,3); +} +static inline __attribute__((always_inline)) void clear_tsk_need_resched(struct task_struct *tsk) +{ + clear_tsk_thread_flag(tsk,3); +} +static inline __attribute__((always_inline)) int test_tsk_need_resched(struct task_struct *tsk) +{ + return (__builtin_constant_p(test_tsk_thread_flag(tsk,3)) ? !!(test_tsk_thread_flag(tsk,3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/sched.h", .line = 2458, }; ______r = __builtin_expect(!!(test_tsk_thread_flag(tsk,3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })); +} +static inline __attribute__((always_inline)) int restart_syscall(void) +{ + set_tsk_thread_flag(get_current(), 2); + return -513; +} +static inline __attribute__((always_inline)) int signal_pending(struct task_struct *p) +{ + return (__builtin_constant_p(test_tsk_thread_flag(p,2)) ? !!(test_tsk_thread_flag(p,2)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/sched.h", .line = 2469, }; ______r = __builtin_expect(!!(test_tsk_thread_flag(p,2)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })); +} +static inline __attribute__((always_inline)) int __fatal_signal_pending(struct task_struct *p) +{ + return (__builtin_constant_p((__builtin_constant_p(9) ? __const_sigismember((&p->pending.signal), (9)) : __gen_sigismember((&p->pending.signal), (9)))) ? !!((__builtin_constant_p(9) ? __const_sigismember((&p->pending.signal), (9)) : __gen_sigismember((&p->pending.signal), (9)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/sched.h", .line = 2474, }; ______r = __builtin_expect(!!((__builtin_constant_p(9) ? __const_sigismember((&p->pending.signal), (9)) : __gen_sigismember((&p->pending.signal), (9)))), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })); +} +static inline __attribute__((always_inline)) int fatal_signal_pending(struct task_struct *p) +{ + return signal_pending(p) && __fatal_signal_pending(p); +} +static inline __attribute__((always_inline)) int signal_pending_state(long state, struct task_struct *p) +{ + if (__builtin_constant_p(((!(state & (1 | 128))))) ? !!((!(state & (1 | 128)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/sched.h", .line = 2484, }; ______r = !!((!(state & (1 | 128)))); ______f.miss_hit[______r]++; ______r; })) + return 0; + if (__builtin_constant_p(((!signal_pending(p)))) ? !!((!signal_pending(p))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/sched.h", .line = 2486, }; ______r = !!((!signal_pending(p))); ______f.miss_hit[______r]++; ______r; })) + return 0; + return (state & 1) || __fatal_signal_pending(p); +} +static inline __attribute__((always_inline)) int need_resched(void) +{ + return (__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/sched.h", .line = 2494, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })); +} +extern int _cond_resched(void); +extern int __cond_resched_lock(spinlock_t *lock); +extern int __cond_resched_softirq(void); +static inline __attribute__((always_inline)) int spin_needbreak(spinlock_t *lock) +{ + return spin_is_contended(lock); +} +void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times); +void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times); +static inline __attribute__((always_inline)) void thread_group_cputime_init(struct signal_struct *sig) +{ + do { spinlock_check(&sig->cputimer.lock); do { static struct lock_class_key __key; __raw_spin_lock_init((&(&sig->cputimer.lock)->rlock), "&(&sig->cputimer.lock)->rlock", &__key); } while (0); } while (0); +} +extern void recalc_sigpending_and_wake(struct task_struct *t); +extern void recalc_sigpending(void); +extern void signal_wake_up(struct task_struct *t, int resume_stopped); +static inline __attribute__((always_inline)) unsigned int task_cpu(const struct task_struct *p) +{ + return ((struct thread_info *)(p)->stack)->cpu; +} +extern void set_task_cpu(struct task_struct *p, unsigned int cpu); +extern long sched_setaffinity(pid_t pid, const struct cpumask *new_mask); +extern long sched_getaffinity(pid_t pid, struct cpumask *mask); +extern void normalize_rt_tasks(void); +extern struct task_group root_task_group; +extern struct task_group *sched_create_group(struct task_group *parent); +extern void sched_destroy_group(struct task_group *tg); +extern void sched_move_task(struct task_struct *tsk); +extern int sched_group_set_shares(struct task_group *tg, unsigned long shares); +extern unsigned long sched_group_shares(struct task_group *tg); +extern int task_can_switch_user(struct user_struct *up, + struct task_struct *tsk); +static inline __attribute__((always_inline)) void add_rchar(struct task_struct *tsk, ssize_t amt) +{ + tsk->ioac.rchar += amt; +} +static inline __attribute__((always_inline)) void add_wchar(struct task_struct *tsk, ssize_t amt) +{ + tsk->ioac.wchar += amt; +} +static inline __attribute__((always_inline)) void inc_syscr(struct task_struct *tsk) +{ + tsk->ioac.syscr++; +} +static inline __attribute__((always_inline)) void inc_syscw(struct task_struct *tsk) +{ + tsk->ioac.syscw++; +} +static inline __attribute__((always_inline)) void mm_update_next_owner(struct mm_struct *mm) +{ +} +static inline __attribute__((always_inline)) void mm_init_owner(struct mm_struct *mm, struct task_struct *p) +{ +} +static inline __attribute__((always_inline)) unsigned long task_rlimit(const struct task_struct *tsk, + unsigned int limit) +{ + return (*(volatile typeof(tsk->signal->rlim[limit].rlim_cur) *)&(tsk->signal->rlim[limit].rlim_cur)); +} +static inline __attribute__((always_inline)) unsigned long task_rlimit_max(const struct task_struct *tsk, + unsigned int limit) +{ + return (*(volatile typeof(tsk->signal->rlim[limit].rlim_max) *)&(tsk->signal->rlim[limit].rlim_max)); +} +static inline __attribute__((always_inline)) unsigned long rlimit(unsigned int limit) +{ + return task_rlimit(get_current(), limit); +} +static inline __attribute__((always_inline)) unsigned long rlimit_max(unsigned int limit) +{ + return task_rlimit_max(get_current(), limit); +} +struct irqaction; +struct softirq_action; +extern struct tracepoint + __tracepoint_irq_handler_entry + ; static inline __attribute__((always_inline)) void + trace_irq_handler_entry + (int irq, struct irqaction *action) { if (__builtin_constant_p(((static_branch(&__tracepoint_irq_handler_entry.key)))) ? !!((static_branch(&__tracepoint_irq_handler_entry.key))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/irq.h" + , .line = + 54 + , }; ______r = !!((static_branch(&__tracepoint_irq_handler_entry.key))); ______f.miss_hit[______r]++; ______r; })) do { struct tracepoint_func *it_func_ptr; void *it_func; void *__data; if (__builtin_constant_p(((!(1)))) ? !!((!(1))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/irq.h" + , .line = + 54 + , }; ______r = !!((!(1))); ______f.miss_hit[______r]++; ______r; })) return; rcu_read_lock_sched_notrace(); it_func_ptr = ({ typeof(*((&__tracepoint_irq_handler_entry)->funcs)) *_________p1 = (typeof(*((&__tracepoint_irq_handler_entry)->funcs))* )(*(volatile typeof(((&__tracepoint_irq_handler_entry)->funcs)) *)&(((&__tracepoint_irq_handler_entry)->funcs))); do { } while (0); ; do { } while (0); ((typeof(*((&__tracepoint_irq_handler_entry)->funcs)) *)(_________p1)); }); if (__builtin_constant_p(((it_func_ptr))) ? !!((it_func_ptr)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/irq.h" + , .line = + 54 + , }; ______r = !!((it_func_ptr)); ______f.miss_hit[______r]++; ______r; })) { do { it_func = (it_func_ptr)->func; __data = (it_func_ptr)->data; ((void(*)(void *__data, int irq, struct irqaction *action))(it_func))(__data, irq, action); } while ((++it_func_ptr)->func); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int + register_trace_irq_handler_entry + (void (*probe)(void *__data, int irq, struct irqaction *action), void *data) { return tracepoint_probe_register("irq_handler_entry", (void *)probe, data); } static inline __attribute__((always_inline)) int + unregister_trace_irq_handler_entry + (void (*probe)(void *__data, int irq, struct irqaction *action), void *data) { return tracepoint_probe_unregister("irq_handler_entry", (void *)probe, data); } static inline __attribute__((always_inline)) void + check_trace_callback_type_irq_handler_entry + (void (*cb)(void *__data, int irq, struct irqaction *action)) { } + ; +extern struct tracepoint + __tracepoint_irq_handler_exit + ; static inline __attribute__((always_inline)) void + trace_irq_handler_exit + (int irq, struct irqaction *action, int ret) { if (__builtin_constant_p(((static_branch(&__tracepoint_irq_handler_exit.key)))) ? !!((static_branch(&__tracepoint_irq_handler_exit.key))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/irq.h" + , .line = + 85 + , }; ______r = !!((static_branch(&__tracepoint_irq_handler_exit.key))); ______f.miss_hit[______r]++; ______r; })) do { struct tracepoint_func *it_func_ptr; void *it_func; void *__data; if (__builtin_constant_p(((!(1)))) ? !!((!(1))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/irq.h" + , .line = + 85 + , }; ______r = !!((!(1))); ______f.miss_hit[______r]++; ______r; })) return; rcu_read_lock_sched_notrace(); it_func_ptr = ({ typeof(*((&__tracepoint_irq_handler_exit)->funcs)) *_________p1 = (typeof(*((&__tracepoint_irq_handler_exit)->funcs))* )(*(volatile typeof(((&__tracepoint_irq_handler_exit)->funcs)) *)&(((&__tracepoint_irq_handler_exit)->funcs))); do { } while (0); ; do { } while (0); ((typeof(*((&__tracepoint_irq_handler_exit)->funcs)) *)(_________p1)); }); if (__builtin_constant_p(((it_func_ptr))) ? !!((it_func_ptr)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/irq.h" + , .line = + 85 + , }; ______r = !!((it_func_ptr)); ______f.miss_hit[______r]++; ______r; })) { do { it_func = (it_func_ptr)->func; __data = (it_func_ptr)->data; ((void(*)(void *__data, int irq, struct irqaction *action, int ret))(it_func))(__data, irq, action, ret); } while ((++it_func_ptr)->func); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int + register_trace_irq_handler_exit + (void (*probe)(void *__data, int irq, struct irqaction *action, int ret), void *data) { return tracepoint_probe_register("irq_handler_exit", (void *)probe, data); } static inline __attribute__((always_inline)) int + unregister_trace_irq_handler_exit + (void (*probe)(void *__data, int irq, struct irqaction *action, int ret), void *data) { return tracepoint_probe_unregister("irq_handler_exit", (void *)probe, data); } static inline __attribute__((always_inline)) void + check_trace_callback_type_irq_handler_exit + (void (*cb)(void *__data, int irq, struct irqaction *action, int ret)) { } + ; + ; +extern struct tracepoint + __tracepoint_softirq_entry + ; static inline __attribute__((always_inline)) void + trace_softirq_entry + (unsigned int vec_nr) { if (__builtin_constant_p(((static_branch(&__tracepoint_softirq_entry.key)))) ? !!((static_branch(&__tracepoint_softirq_entry.key))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/irq.h" + , .line = + 117 + , }; ______r = !!((static_branch(&__tracepoint_softirq_entry.key))); ______f.miss_hit[______r]++; ______r; })) do { struct tracepoint_func *it_func_ptr; void *it_func; void *__data; if (__builtin_constant_p(((!(1)))) ? !!((!(1))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/irq.h" + , .line = + 117 + , }; ______r = !!((!(1))); ______f.miss_hit[______r]++; ______r; })) return; rcu_read_lock_sched_notrace(); it_func_ptr = ({ typeof(*((&__tracepoint_softirq_entry)->funcs)) *_________p1 = (typeof(*((&__tracepoint_softirq_entry)->funcs))* )(*(volatile typeof(((&__tracepoint_softirq_entry)->funcs)) *)&(((&__tracepoint_softirq_entry)->funcs))); do { } while (0); ; do { } while (0); ((typeof(*((&__tracepoint_softirq_entry)->funcs)) *)(_________p1)); }); if (__builtin_constant_p(((it_func_ptr))) ? !!((it_func_ptr)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/irq.h" + , .line = + 117 + , }; ______r = !!((it_func_ptr)); ______f.miss_hit[______r]++; ______r; })) { do { it_func = (it_func_ptr)->func; __data = (it_func_ptr)->data; ((void(*)(void *__data, unsigned int vec_nr))(it_func))(__data, vec_nr); } while ((++it_func_ptr)->func); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int + register_trace_softirq_entry + (void (*probe)(void *__data, unsigned int vec_nr), void *data) { return tracepoint_probe_register("softirq_entry", (void *)probe, data); } static inline __attribute__((always_inline)) int + unregister_trace_softirq_entry + (void (*probe)(void *__data, unsigned int vec_nr), void *data) { return tracepoint_probe_unregister("softirq_entry", (void *)probe, data); } static inline __attribute__((always_inline)) void + check_trace_callback_type_softirq_entry + (void (*cb)(void *__data, unsigned int vec_nr)) { } + ; +extern struct tracepoint + __tracepoint_softirq_exit + ; static inline __attribute__((always_inline)) void + trace_softirq_exit + (unsigned int vec_nr) { if (__builtin_constant_p(((static_branch(&__tracepoint_softirq_exit.key)))) ? !!((static_branch(&__tracepoint_softirq_exit.key))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/irq.h" + , .line = + 131 + , }; ______r = !!((static_branch(&__tracepoint_softirq_exit.key))); ______f.miss_hit[______r]++; ______r; })) do { struct tracepoint_func *it_func_ptr; void *it_func; void *__data; if (__builtin_constant_p(((!(1)))) ? !!((!(1))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/irq.h" + , .line = + 131 + , }; ______r = !!((!(1))); ______f.miss_hit[______r]++; ______r; })) return; rcu_read_lock_sched_notrace(); it_func_ptr = ({ typeof(*((&__tracepoint_softirq_exit)->funcs)) *_________p1 = (typeof(*((&__tracepoint_softirq_exit)->funcs))* )(*(volatile typeof(((&__tracepoint_softirq_exit)->funcs)) *)&(((&__tracepoint_softirq_exit)->funcs))); do { } while (0); ; do { } while (0); ((typeof(*((&__tracepoint_softirq_exit)->funcs)) *)(_________p1)); }); if (__builtin_constant_p(((it_func_ptr))) ? !!((it_func_ptr)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/irq.h" + , .line = + 131 + , }; ______r = !!((it_func_ptr)); ______f.miss_hit[______r]++; ______r; })) { do { it_func = (it_func_ptr)->func; __data = (it_func_ptr)->data; ((void(*)(void *__data, unsigned int vec_nr))(it_func))(__data, vec_nr); } while ((++it_func_ptr)->func); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int + register_trace_softirq_exit + (void (*probe)(void *__data, unsigned int vec_nr), void *data) { return tracepoint_probe_register("softirq_exit", (void *)probe, data); } static inline __attribute__((always_inline)) int + unregister_trace_softirq_exit + (void (*probe)(void *__data, unsigned int vec_nr), void *data) { return tracepoint_probe_unregister("softirq_exit", (void *)probe, data); } static inline __attribute__((always_inline)) void + check_trace_callback_type_softirq_exit + (void (*cb)(void *__data, unsigned int vec_nr)) { } + ; +extern struct tracepoint + __tracepoint_softirq_raise + ; static inline __attribute__((always_inline)) void + trace_softirq_raise + (unsigned int vec_nr) { if (__builtin_constant_p(((static_branch(&__tracepoint_softirq_raise.key)))) ? !!((static_branch(&__tracepoint_softirq_raise.key))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/irq.h" + , .line = + 145 + , }; ______r = !!((static_branch(&__tracepoint_softirq_raise.key))); ______f.miss_hit[______r]++; ______r; })) do { struct tracepoint_func *it_func_ptr; void *it_func; void *__data; if (__builtin_constant_p(((!(1)))) ? !!((!(1))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/irq.h" + , .line = + 145 + , }; ______r = !!((!(1))); ______f.miss_hit[______r]++; ______r; })) return; rcu_read_lock_sched_notrace(); it_func_ptr = ({ typeof(*((&__tracepoint_softirq_raise)->funcs)) *_________p1 = (typeof(*((&__tracepoint_softirq_raise)->funcs))* )(*(volatile typeof(((&__tracepoint_softirq_raise)->funcs)) *)&(((&__tracepoint_softirq_raise)->funcs))); do { } while (0); ; do { } while (0); ((typeof(*((&__tracepoint_softirq_raise)->funcs)) *)(_________p1)); }); if (__builtin_constant_p(((it_func_ptr))) ? !!((it_func_ptr)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/trace/events/irq.h" + , .line = + 145 + , }; ______r = !!((it_func_ptr)); ______f.miss_hit[______r]++; ______r; })) { do { it_func = (it_func_ptr)->func; __data = (it_func_ptr)->data; ((void(*)(void *__data, unsigned int vec_nr))(it_func))(__data, vec_nr); } while ((++it_func_ptr)->func); } rcu_read_unlock_sched_notrace(); } while (0); } static inline __attribute__((always_inline)) int + register_trace_softirq_raise + (void (*probe)(void *__data, unsigned int vec_nr), void *data) { return tracepoint_probe_register("softirq_raise", (void *)probe, data); } static inline __attribute__((always_inline)) int + unregister_trace_softirq_raise + (void (*probe)(void *__data, unsigned int vec_nr), void *data) { return tracepoint_probe_unregister("softirq_raise", (void *)probe, data); } static inline __attribute__((always_inline)) void + check_trace_callback_type_softirq_raise + (void (*cb)(void *__data, unsigned int vec_nr)) { } + ; +enum { + IRQC_IS_HARDIRQ = 0, + IRQC_IS_NESTED, +}; +typedef irqreturn_t (*irq_handler_t)(int, void *); +struct irqaction { + irq_handler_t handler; + unsigned long flags; + void *dev_id; + struct irqaction *next; + int irq; + irq_handler_t thread_fn; + struct task_struct *thread; + unsigned long thread_flags; + unsigned long thread_mask; + const char *name; + struct proc_dir_entry *dir; +} __attribute__((__aligned__(1 << (6)))); +extern irqreturn_t no_action(int cpl, void *dev_id); +extern int __attribute__((warn_unused_result)) +request_threaded_irq(unsigned int irq, irq_handler_t handler, + irq_handler_t thread_fn, + unsigned long flags, const char *name, void *dev); +static inline __attribute__((always_inline)) int __attribute__((warn_unused_result)) +request_irq(unsigned int irq, irq_handler_t handler, unsigned long flags, + const char *name, void *dev) +{ + return request_threaded_irq(irq, handler, ((void *)0), flags, name, dev); +} +extern int __attribute__((warn_unused_result)) +request_any_context_irq(unsigned int irq, irq_handler_t handler, + unsigned long flags, const char *name, void *dev_id); +extern void exit_irq_thread(void); +extern void free_irq(unsigned int, void *); +struct device; +extern int __attribute__((warn_unused_result)) +devm_request_threaded_irq(struct device *dev, unsigned int irq, + irq_handler_t handler, irq_handler_t thread_fn, + unsigned long irqflags, const char *devname, + void *dev_id); +static inline __attribute__((always_inline)) int __attribute__((warn_unused_result)) +devm_request_irq(struct device *dev, unsigned int irq, irq_handler_t handler, + unsigned long irqflags, const char *devname, void *dev_id) +{ + return devm_request_threaded_irq(dev, irq, handler, ((void *)0), irqflags, + devname, dev_id); +} +extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id); +extern void disable_irq_nosync(unsigned int irq); +extern void disable_irq(unsigned int irq); +extern void enable_irq(unsigned int irq); +extern void suspend_device_irqs(void); +extern void resume_device_irqs(void); +extern int check_wakeup_irqs(void); +extern cpumask_var_t irq_default_affinity; +extern int irq_set_affinity(unsigned int irq, const struct cpumask *cpumask); +extern int irq_can_set_affinity(unsigned int irq); +extern int irq_select_affinity(unsigned int irq); +extern int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m); +struct irq_affinity_notify { + unsigned int irq; + struct kref kref; + struct work_struct work; + void (*notify)(struct irq_affinity_notify *, const cpumask_t *mask); + void (*release)(struct kref *ref); +}; +extern int +irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify); +static inline __attribute__((always_inline)) void irq_run_affinity_notifiers(void) +{ + flush_scheduled_work(); +} +static inline __attribute__((always_inline)) void disable_irq_nosync_lockdep(unsigned int irq) +{ + disable_irq_nosync(irq); + do { arch_local_irq_disable(); trace_hardirqs_off(); } while (0); +} +static inline __attribute__((always_inline)) void disable_irq_nosync_lockdep_irqsave(unsigned int irq, unsigned long *flags) +{ + disable_irq_nosync(irq); + do { do { ({ unsigned long __dummy; typeof(*flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); *flags = arch_local_irq_save(); } while (0); trace_hardirqs_off(); } while (0); +} +static inline __attribute__((always_inline)) void disable_irq_lockdep(unsigned int irq) +{ + disable_irq(irq); + do { arch_local_irq_disable(); trace_hardirqs_off(); } while (0); +} +static inline __attribute__((always_inline)) void enable_irq_lockdep(unsigned int irq) +{ + do { trace_hardirqs_on(); arch_local_irq_enable(); } while (0); + enable_irq(irq); +} +static inline __attribute__((always_inline)) void enable_irq_lockdep_irqrestore(unsigned int irq, unsigned long *flags) +{ + do { if (__builtin_constant_p(((({ ({ unsigned long __dummy; typeof(*flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_irqs_disabled_flags(*flags); })))) ? !!((({ ({ unsigned long __dummy; typeof(*flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_irqs_disabled_flags(*flags); }))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/interrupt.h", .line = 333, }; ______r = !!((({ ({ unsigned long __dummy; typeof(*flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_irqs_disabled_flags(*flags); }))); ______f.miss_hit[______r]++; ______r; })) { do { ({ unsigned long __dummy; typeof(*flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(*flags); } while (0); trace_hardirqs_off(); } else { trace_hardirqs_on(); do { ({ unsigned long __dummy; typeof(*flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(*flags); } while (0); } } while (0); + enable_irq(irq); +} +extern int irq_set_irq_wake(unsigned int irq, unsigned int on); +static inline __attribute__((always_inline)) int enable_irq_wake(unsigned int irq) +{ + return irq_set_irq_wake(irq, 1); +} +static inline __attribute__((always_inline)) int disable_irq_wake(unsigned int irq) +{ + return irq_set_irq_wake(irq, 0); +} +extern bool force_irqthreads; +enum +{ + HI_SOFTIRQ=0, + TIMER_SOFTIRQ, + NET_TX_SOFTIRQ, + NET_RX_SOFTIRQ, + BLOCK_SOFTIRQ, + BLOCK_IOPOLL_SOFTIRQ, + TASKLET_SOFTIRQ, + SCHED_SOFTIRQ, + HRTIMER_SOFTIRQ, + RCU_SOFTIRQ, + NR_SOFTIRQS +}; +extern char *softirq_to_name[NR_SOFTIRQS]; +struct softirq_action +{ + void (*action)(struct softirq_action *); +}; + __attribute__((regparm(0))) void do_softirq(void); + __attribute__((regparm(0))) void __do_softirq(void); +extern void open_softirq(int nr, void (*action)(struct softirq_action *)); +extern void softirq_init(void); +static inline __attribute__((always_inline)) void __raise_softirq_irqoff(unsigned int nr) +{ + trace_softirq_raise(nr); + do { typedef typeof(irq_stat.__softirq_pending) pto_T__; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/interrupt.h", .line = 443, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pto_T__ pto_tmp__; pto_tmp__ = ((1UL << nr)); (void)pto_tmp__; } switch (sizeof(irq_stat.__softirq_pending)) { case 1: asm("or" "b %1,""%%""fs"":" "%P" "0" : "+m" (irq_stat.__softirq_pending) : "qi" ((pto_T__)((1UL << nr)))); break; case 2: asm("or" "w %1,""%%""fs"":" "%P" "0" : "+m" (irq_stat.__softirq_pending) : "ri" ((pto_T__)((1UL << nr)))); break; case 4: asm("or" "l %1,""%%""fs"":" "%P" "0" : "+m" (irq_stat.__softirq_pending) : "ri" ((pto_T__)((1UL << nr)))); break; case 8: asm("or" "q %1,""%%""fs"":" "%P" "0" : "+m" (irq_stat.__softirq_pending) : "re" ((pto_T__)((1UL << nr)))); break; default: __bad_percpu_size(); } } while (0); +} +extern void raise_softirq_irqoff(unsigned int nr); +extern void raise_softirq(unsigned int nr); +extern __attribute__((section(".data..percpu" ""))) __typeof__(struct list_head [NR_SOFTIRQS]) softirq_work_list; +extern __attribute__((section(".data..percpu" ""))) __typeof__(struct task_struct *) ksoftirqd; +static inline __attribute__((always_inline)) struct task_struct *this_cpu_ksoftirqd(void) +{ + return ({ typeof((ksoftirqd)) pscr_ret__; do { const void *__vpp_verify = (typeof(&((ksoftirqd))))((void *)0); (void)__vpp_verify; } while (0); switch(sizeof((ksoftirqd))) { case 1: pscr_ret__ = ({ typeof(((ksoftirqd))) pfo_ret__; switch (sizeof(((ksoftirqd)))) { case 1: asm("mov" "b ""%%""fs"":" "%P" "1"",%0" : "=q" (pfo_ret__) : "m"((ksoftirqd))); break; case 2: asm("mov" "w ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((ksoftirqd))); break; case 4: asm("mov" "l ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((ksoftirqd))); break; case 8: asm("mov" "q ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((ksoftirqd))); break; default: __bad_percpu_size(); } pfo_ret__; });break; case 2: pscr_ret__ = ({ typeof(((ksoftirqd))) pfo_ret__; switch (sizeof(((ksoftirqd)))) { case 1: asm("mov" "b ""%%""fs"":" "%P" "1"",%0" : "=q" (pfo_ret__) : "m"((ksoftirqd))); break; case 2: asm("mov" "w ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((ksoftirqd))); break; case 4: asm("mov" "l ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((ksoftirqd))); break; case 8: asm("mov" "q ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((ksoftirqd))); break; default: __bad_percpu_size(); } pfo_ret__; });break; case 4: pscr_ret__ = ({ typeof(((ksoftirqd))) pfo_ret__; switch (sizeof(((ksoftirqd)))) { case 1: asm("mov" "b ""%%""fs"":" "%P" "1"",%0" : "=q" (pfo_ret__) : "m"((ksoftirqd))); break; case 2: asm("mov" "w ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((ksoftirqd))); break; case 4: asm("mov" "l ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((ksoftirqd))); break; case 8: asm("mov" "q ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((ksoftirqd))); break; default: __bad_percpu_size(); } pfo_ret__; });break; case 8: pscr_ret__ = ({ typeof((ksoftirqd)) ret__; do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); ret__ = *({ do { const void *__vpp_verify = (typeof((&((ksoftirqd)))))((void *)0); (void)__vpp_verify; } while (0); ({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"((typeof(*(&((ksoftirqd)))) *)(&((ksoftirqd))))); (typeof((typeof(*(&((ksoftirqd)))) *)(&((ksoftirqd))))) (__ptr + (((__per_cpu_offset[debug_smp_processor_id()])))); }); }); do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/interrupt.h", .line = 462, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/interrupt.h", .line = 462, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/interrupt.h", .line = 462, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/interrupt.h", .line = 462, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); ret__; });break; default: __bad_size_call_parameter();break; } pscr_ret__; }); +} +extern void send_remote_softirq(struct call_single_data *cp, int cpu, int softirq); +extern void __send_remote_softirq(struct call_single_data *cp, int cpu, + int this_cpu, int softirq); +struct tasklet_struct +{ + struct tasklet_struct *next; + unsigned long state; + atomic_t count; + void (*func)(unsigned long); + unsigned long data; +}; +enum +{ + TASKLET_STATE_SCHED, + TASKLET_STATE_RUN +}; +static inline __attribute__((always_inline)) int tasklet_trylock(struct tasklet_struct *t) +{ + return !test_and_set_bit(TASKLET_STATE_RUN, &(t)->state); +} +static inline __attribute__((always_inline)) void tasklet_unlock(struct tasklet_struct *t) +{ + __asm__ __volatile__("": : :"memory"); + clear_bit(TASKLET_STATE_RUN, &(t)->state); +} +static inline __attribute__((always_inline)) void tasklet_unlock_wait(struct tasklet_struct *t) +{ + while ((__builtin_constant_p((TASKLET_STATE_RUN)) ? constant_test_bit((TASKLET_STATE_RUN), (&(t)->state)) : variable_test_bit((TASKLET_STATE_RUN), (&(t)->state)))) { __asm__ __volatile__("": : :"memory"); } +} +extern void __tasklet_schedule(struct tasklet_struct *t); +static inline __attribute__((always_inline)) void tasklet_schedule(struct tasklet_struct *t) +{ + if (__builtin_constant_p(((!test_and_set_bit(TASKLET_STATE_SCHED, &t->state)))) ? !!((!test_and_set_bit(TASKLET_STATE_SCHED, &t->state))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/interrupt.h", .line = 544, }; ______r = !!((!test_and_set_bit(TASKLET_STATE_SCHED, &t->state))); ______f.miss_hit[______r]++; ______r; })) + __tasklet_schedule(t); +} +extern void __tasklet_hi_schedule(struct tasklet_struct *t); +static inline __attribute__((always_inline)) void tasklet_hi_schedule(struct tasklet_struct *t) +{ + if (__builtin_constant_p(((!test_and_set_bit(TASKLET_STATE_SCHED, &t->state)))) ? !!((!test_and_set_bit(TASKLET_STATE_SCHED, &t->state))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/interrupt.h", .line = 552, }; ______r = !!((!test_and_set_bit(TASKLET_STATE_SCHED, &t->state))); ______f.miss_hit[______r]++; ______r; })) + __tasklet_hi_schedule(t); +} +extern void __tasklet_hi_schedule_first(struct tasklet_struct *t); +static inline __attribute__((always_inline)) void tasklet_hi_schedule_first(struct tasklet_struct *t) +{ + if (__builtin_constant_p(((!test_and_set_bit(TASKLET_STATE_SCHED, &t->state)))) ? !!((!test_and_set_bit(TASKLET_STATE_SCHED, &t->state))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/interrupt.h", .line = 566, }; ______r = !!((!test_and_set_bit(TASKLET_STATE_SCHED, &t->state))); ______f.miss_hit[______r]++; ______r; })) + __tasklet_hi_schedule_first(t); +} +static inline __attribute__((always_inline)) void tasklet_disable_nosync(struct tasklet_struct *t) +{ + atomic_inc(&t->count); + __asm__ __volatile__("": : :"memory"); +} +static inline __attribute__((always_inline)) void tasklet_disable(struct tasklet_struct *t) +{ + tasklet_disable_nosync(t); + tasklet_unlock_wait(t); + asm volatile ("661:\n\t" "lock; addl $0,0(%%esp)" "\n662:\n" ".section .altinstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "661b\n" " " ".long" " " "663f\n" " .word " "(0*32+26)" "\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .discard,\"aw\",@progbits\n" " .byte 0xff + (664f-663f) - (662b-661b)\n" ".previous\n" ".section .altinstr_replacement, \"ax\"\n" "663:\n\t" "mfence" "\n664:\n" ".previous" : : : "memory"); +} +static inline __attribute__((always_inline)) void tasklet_enable(struct tasklet_struct *t) +{ + __asm__ __volatile__("": : :"memory"); + atomic_dec(&t->count); +} +static inline __attribute__((always_inline)) void tasklet_hi_enable(struct tasklet_struct *t) +{ + __asm__ __volatile__("": : :"memory"); + atomic_dec(&t->count); +} +extern void tasklet_kill(struct tasklet_struct *t); +extern void tasklet_kill_immediate(struct tasklet_struct *t, unsigned int cpu); +extern void tasklet_init(struct tasklet_struct *t, + void (*func)(unsigned long), unsigned long data); +struct tasklet_hrtimer { + struct hrtimer timer; + struct tasklet_struct tasklet; + enum hrtimer_restart (*function)(struct hrtimer *); +}; +extern void +tasklet_hrtimer_init(struct tasklet_hrtimer *ttimer, + enum hrtimer_restart (*function)(struct hrtimer *), + clockid_t which_clock, enum hrtimer_mode mode); +static inline __attribute__((always_inline)) +int tasklet_hrtimer_start(struct tasklet_hrtimer *ttimer, ktime_t time, + const enum hrtimer_mode mode) +{ + return hrtimer_start(&ttimer->timer, time, mode); +} +static inline __attribute__((always_inline)) +void tasklet_hrtimer_cancel(struct tasklet_hrtimer *ttimer) +{ + hrtimer_cancel(&ttimer->timer); + tasklet_kill(&ttimer->tasklet); +} +extern unsigned long probe_irq_on(void); +extern int probe_irq_off(unsigned long); +extern unsigned int probe_irq_mask(unsigned long); +extern void init_irq_proc(void); +struct seq_file; +int show_interrupts(struct seq_file *p, void *v); +int arch_show_interrupts(struct seq_file *p, int prec); +extern int early_irq_init(void); +extern int arch_probe_nr_irqs(void); +extern int arch_early_irq_init(void); +struct cpu_usage_stat { + cputime64_t user; + cputime64_t nice; + cputime64_t system; + cputime64_t softirq; + cputime64_t irq; + cputime64_t idle; + cputime64_t iowait; + cputime64_t steal; + cputime64_t guest; + cputime64_t guest_nice; +}; +struct kernel_stat { + struct cpu_usage_stat cpustat; + unsigned long irqs_sum; + unsigned int softirqs[NR_SOFTIRQS]; +}; +extern __attribute__((section(".data..percpu" ""))) __typeof__(struct kernel_stat) kstat; +extern unsigned long long nr_context_switches(void); +extern unsigned int kstat_irqs_cpu(unsigned int irq, int cpu); +static inline __attribute__((always_inline)) void kstat_incr_softirqs_this_cpu(unsigned int irq) +{ + do { do { const void *__vpp_verify = (typeof(&(((kstat.softirqs[irq])))))((void *)0); (void)__vpp_verify; } while (0); switch(sizeof(((kstat.softirqs[irq])))) { case 1: do { typedef typeof((((kstat.softirqs[irq])))) pao_T__; const int pao_ID__ = (__builtin_constant_p((1)) && (((1)) == 1 || ((1)) == -1)) ? ((1)) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((1)); (void)pao_tmp__; } switch (sizeof((((kstat.softirqs[irq]))))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq]))))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq])))) : "qi" ((pao_T__)((1)))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq]))))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq])))) : "ri" ((pao_T__)((1)))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq]))))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq])))) : "ri" ((pao_T__)((1)))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq]))))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq])))) : "re" ((pao_T__)((1)))); break; default: __bad_percpu_size(); } } while (0);break; case 2: do { typedef typeof((((kstat.softirqs[irq])))) pao_T__; const int pao_ID__ = (__builtin_constant_p((1)) && (((1)) == 1 || ((1)) == -1)) ? ((1)) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((1)); (void)pao_tmp__; } switch (sizeof((((kstat.softirqs[irq]))))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq]))))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq])))) : "qi" ((pao_T__)((1)))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq]))))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq])))) : "ri" ((pao_T__)((1)))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq]))))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq])))) : "ri" ((pao_T__)((1)))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq]))))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq])))) : "re" ((pao_T__)((1)))); break; default: __bad_percpu_size(); } } while (0);break; case 4: do { typedef typeof((((kstat.softirqs[irq])))) pao_T__; const int pao_ID__ = (__builtin_constant_p((1)) && (((1)) == 1 || ((1)) == -1)) ? ((1)) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((1)); (void)pao_tmp__; } switch (sizeof((((kstat.softirqs[irq]))))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq]))))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq])))) : "qi" ((pao_T__)((1)))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq]))))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq])))) : "ri" ((pao_T__)((1)))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq]))))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq])))) : "ri" ((pao_T__)((1)))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/kernel_stat.h", .line = 77, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq]))))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" ((((kstat.softirqs[irq])))) : "re" ((pao_T__)((1)))); break; default: __bad_percpu_size(); } } while (0);break; case 8: do { *({ unsigned long tcp_ptr__; do { const void *__vpp_verify = (typeof(&((((kstat.softirqs[irq]))))))((void *)0); (void)__vpp_verify; } while (0); asm volatile("add " "%%""fs"":" "%P" "1" ", %0" : "=r" (tcp_ptr__) : "m" (this_cpu_off), "0" (&((((kstat.softirqs[irq])))))); (typeof(*(&((((kstat.softirqs[irq])))))) *)tcp_ptr__; }) += ((1)); } while (0);break; default: __bad_size_call_parameter();break; } } while (0); +} +static inline __attribute__((always_inline)) unsigned int kstat_softirqs_cpu(unsigned int irq, int cpu) +{ + return (*({ do { const void *__vpp_verify = (typeof((&(kstat))))((void *)0); (void)__vpp_verify; } while (0); ({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"((typeof(*(&(kstat))) *)(&(kstat)))); (typeof((typeof(*(&(kstat))) *)(&(kstat)))) (__ptr + (((__per_cpu_offset[cpu])))); }); })).softirqs[irq]; +} +extern unsigned int kstat_irqs(unsigned int irq); +static inline __attribute__((always_inline)) unsigned int kstat_cpu_irqs_sum(unsigned int cpu) +{ + return (*({ do { const void *__vpp_verify = (typeof((&(kstat))))((void *)0); (void)__vpp_verify; } while (0); ({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"((typeof(*(&(kstat))) *)(&(kstat)))); (typeof((typeof(*(&(kstat))) *)(&(kstat)))) (__ptr + (((__per_cpu_offset[cpu])))); }); })).irqs_sum; +} +extern unsigned long long task_delta_exec(struct task_struct *); +extern void account_user_time(struct task_struct *, cputime_t, cputime_t); +extern void account_system_time(struct task_struct *, int, cputime_t, cputime_t); +extern void account_steal_time(cputime_t); +extern void account_idle_time(cputime_t); +extern void account_process_tick(struct task_struct *, int user); +extern void account_steal_ticks(unsigned long ticks); +extern void account_idle_ticks(unsigned long ticks); +struct task_struct; +struct user_regset; +typedef int user_regset_active_fn(struct task_struct *target, + const struct user_regset *regset); +typedef int user_regset_get_fn(struct task_struct *target, + const struct user_regset *regset, + unsigned int pos, unsigned int count, + void *kbuf, void *ubuf); +typedef int user_regset_set_fn(struct task_struct *target, + const struct user_regset *regset, + unsigned int pos, unsigned int count, + const void *kbuf, const void *ubuf); +typedef int user_regset_writeback_fn(struct task_struct *target, + const struct user_regset *regset, + int immediate); +struct user_regset { + user_regset_get_fn *get; + user_regset_set_fn *set; + user_regset_active_fn *active; + user_regset_writeback_fn *writeback; + unsigned int n; + unsigned int size; + unsigned int align; + unsigned int bias; + unsigned int core_note_type; +}; +struct user_regset_view { + const char *name; + const struct user_regset *regsets; + unsigned int n; + u32 e_flags; + u16 e_machine; + u8 ei_osabi; +}; +const struct user_regset_view *task_user_regset_view(struct task_struct *tsk); +static inline __attribute__((always_inline)) int user_regset_copyout(unsigned int *pos, unsigned int *count, + void **kbuf, + void **ubuf, const void *data, + const int start_pos, const int end_pos) +{ + if (__builtin_constant_p(((*count == 0))) ? !!((*count == 0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 224, }; ______r = !!((*count == 0)); ______f.miss_hit[______r]++; ______r; })) + return 0; + do { if (__builtin_constant_p((((__builtin_constant_p(*pos < start_pos) ? !!(*pos < start_pos) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 226, }; ______r = __builtin_expect(!!(*pos < start_pos), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(*pos < start_pos) ? !!(*pos < start_pos) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 226, }; ______r = __builtin_expect(!!(*pos < start_pos), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 226, }; ______r = !!(((__builtin_constant_p(*pos < start_pos) ? !!(*pos < start_pos) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 226, }; ______r = __builtin_expect(!!(*pos < start_pos), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/regset.h"), "i" (226), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); } while(0); + if (__builtin_constant_p(((end_pos < 0 || *pos < end_pos))) ? !!((end_pos < 0 || *pos < end_pos)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 227, }; ______r = !!((end_pos < 0 || *pos < end_pos)); ______f.miss_hit[______r]++; ______r; })) { + unsigned int copy = (end_pos < 0 ? *count + : ({ typeof(*count) _min1 = (*count); typeof(end_pos - *pos) _min2 = (end_pos - *pos); (void) (&_min1 == &_min2); _min1 < _min2 ? _min1 : _min2; })); + data += *pos - start_pos; + if (__builtin_constant_p(((*kbuf))) ? !!((*kbuf)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 231, }; ______r = !!((*kbuf)); ______f.miss_hit[______r]++; ______r; })) { + __builtin_memcpy(*kbuf, data, copy); + *kbuf += copy; + } else if (__builtin_constant_p(((__copy_to_user(*ubuf, data, copy)))) ? !!((__copy_to_user(*ubuf, data, copy))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 234, }; ______r = !!((__copy_to_user(*ubuf, data, copy))); ______f.miss_hit[______r]++; ______r; })) + return -14; + else + *ubuf += copy; + *pos += copy; + *count -= copy; + } + return 0; +} +static inline __attribute__((always_inline)) int user_regset_copyin(unsigned int *pos, unsigned int *count, + const void **kbuf, + const void **ubuf, void *data, + const int start_pos, const int end_pos) +{ + if (__builtin_constant_p(((*count == 0))) ? !!((*count == 0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 249, }; ______r = !!((*count == 0)); ______f.miss_hit[______r]++; ______r; })) + return 0; + do { if (__builtin_constant_p((((__builtin_constant_p(*pos < start_pos) ? !!(*pos < start_pos) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 251, }; ______r = __builtin_expect(!!(*pos < start_pos), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(*pos < start_pos) ? !!(*pos < start_pos) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 251, }; ______r = __builtin_expect(!!(*pos < start_pos), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 251, }; ______r = !!(((__builtin_constant_p(*pos < start_pos) ? !!(*pos < start_pos) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 251, }; ______r = __builtin_expect(!!(*pos < start_pos), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/regset.h"), "i" (251), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); } while(0); + if (__builtin_constant_p(((end_pos < 0 || *pos < end_pos))) ? !!((end_pos < 0 || *pos < end_pos)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 252, }; ______r = !!((end_pos < 0 || *pos < end_pos)); ______f.miss_hit[______r]++; ______r; })) { + unsigned int copy = (end_pos < 0 ? *count + : ({ typeof(*count) _min1 = (*count); typeof(end_pos - *pos) _min2 = (end_pos - *pos); (void) (&_min1 == &_min2); _min1 < _min2 ? _min1 : _min2; })); + data += *pos - start_pos; + if (__builtin_constant_p(((*kbuf))) ? !!((*kbuf)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 256, }; ______r = !!((*kbuf)); ______f.miss_hit[______r]++; ______r; })) { + __builtin_memcpy(data, *kbuf, copy); + *kbuf += copy; + } else if (__builtin_constant_p(((__copy_from_user(data, *ubuf, copy)))) ? !!((__copy_from_user(data, *ubuf, copy))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 259, }; ______r = !!((__copy_from_user(data, *ubuf, copy))); ______f.miss_hit[______r]++; ______r; })) + return -14; + else + *ubuf += copy; + *pos += copy; + *count -= copy; + } + return 0; +} +static inline __attribute__((always_inline)) int user_regset_copyout_zero(unsigned int *pos, + unsigned int *count, + void **kbuf, void **ubuf, + const int start_pos, + const int end_pos) +{ + if (__builtin_constant_p(((*count == 0))) ? !!((*count == 0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 279, }; ______r = !!((*count == 0)); ______f.miss_hit[______r]++; ______r; })) + return 0; + do { if (__builtin_constant_p((((__builtin_constant_p(*pos < start_pos) ? !!(*pos < start_pos) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 281, }; ______r = __builtin_expect(!!(*pos < start_pos), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(*pos < start_pos) ? !!(*pos < start_pos) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 281, }; ______r = __builtin_expect(!!(*pos < start_pos), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 281, }; ______r = !!(((__builtin_constant_p(*pos < start_pos) ? !!(*pos < start_pos) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 281, }; ______r = __builtin_expect(!!(*pos < start_pos), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/regset.h"), "i" (281), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); } while(0); + if (__builtin_constant_p(((end_pos < 0 || *pos < end_pos))) ? !!((end_pos < 0 || *pos < end_pos)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 282, }; ______r = !!((end_pos < 0 || *pos < end_pos)); ______f.miss_hit[______r]++; ______r; })) { + unsigned int copy = (end_pos < 0 ? *count + : ({ typeof(*count) _min1 = (*count); typeof(end_pos - *pos) _min2 = (end_pos - *pos); (void) (&_min1 == &_min2); _min1 < _min2 ? _min1 : _min2; })); + if (__builtin_constant_p(((*kbuf))) ? !!((*kbuf)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 285, }; ______r = !!((*kbuf)); ______f.miss_hit[______r]++; ______r; })) { + __builtin_memset(*kbuf, 0, copy); + *kbuf += copy; + } else if (__builtin_constant_p(((__clear_user(*ubuf, copy)))) ? !!((__clear_user(*ubuf, copy))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 288, }; ______r = !!((__clear_user(*ubuf, copy))); ______f.miss_hit[______r]++; ______r; })) + return -14; + else + *ubuf += copy; + *pos += copy; + *count -= copy; + } + return 0; +} +static inline __attribute__((always_inline)) int user_regset_copyin_ignore(unsigned int *pos, + unsigned int *count, + const void **kbuf, + const void **ubuf, + const int start_pos, + const int end_pos) +{ + if (__builtin_constant_p(((*count == 0))) ? !!((*count == 0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 305, }; ______r = !!((*count == 0)); ______f.miss_hit[______r]++; ______r; })) + return 0; + do { if (__builtin_constant_p((((__builtin_constant_p(*pos < start_pos) ? !!(*pos < start_pos) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 307, }; ______r = __builtin_expect(!!(*pos < start_pos), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(*pos < start_pos) ? !!(*pos < start_pos) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 307, }; ______r = __builtin_expect(!!(*pos < start_pos), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 307, }; ______r = !!(((__builtin_constant_p(*pos < start_pos) ? !!(*pos < start_pos) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 307, }; ______r = __builtin_expect(!!(*pos < start_pos), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/regset.h"), "i" (307), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); } while(0); + if (__builtin_constant_p(((end_pos < 0 || *pos < end_pos))) ? !!((end_pos < 0 || *pos < end_pos)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 308, }; ______r = !!((end_pos < 0 || *pos < end_pos)); ______f.miss_hit[______r]++; ______r; })) { + unsigned int copy = (end_pos < 0 ? *count + : ({ typeof(*count) _min1 = (*count); typeof(end_pos - *pos) _min2 = (end_pos - *pos); (void) (&_min1 == &_min2); _min1 < _min2 ? _min1 : _min2; })); + if (__builtin_constant_p(((*kbuf))) ? !!((*kbuf)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 311, }; ______r = !!((*kbuf)); ______f.miss_hit[______r]++; ______r; })) + *kbuf += copy; + else + *ubuf += copy; + *pos += copy; + *count -= copy; + } + return 0; +} +static inline __attribute__((always_inline)) int copy_regset_to_user(struct task_struct *target, + const struct user_regset_view *view, + unsigned int setno, + unsigned int offset, unsigned int size, + void *data) +{ + const struct user_regset *regset = &view->regsets[setno]; + if (__builtin_constant_p(((!((__builtin_constant_p(({ unsigned long flag, roksum; (void)0; asm("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0" : "=&r" (flag), "=r" (roksum) : "1" (data), "g" ((long)(size)), "rm" (current_thread_info()->addr_limit.seg)); flag; }) == 0) ? !!(({ unsigned long flag, roksum; (void)0; asm("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0" : "=&r" (flag), "=r" (roksum) : "1" (data), "g" ((long)(size)), "rm" (current_thread_info()->addr_limit.seg)); flag; }) == 0) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 338, }; ______r = __builtin_expect(!!(({ unsigned long flag, roksum; (void)0; asm("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0" : "=&r" (flag), "=r" (roksum) : "1" (data), "g" ((long)(size)), "rm" (current_thread_info()->addr_limit.seg)); flag; }) == 0), 1); ftrace_likely_update(&______f, ______r, 1); ______r; })))))) ? !!((!((__builtin_constant_p(({ unsigned long flag, roksum; (void)0; asm("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0" : "=&r" (flag), "=r" (roksum) : "1" (data), "g" ((long)(size)), "rm" (current_thread_info()->addr_limit.seg)); flag; }) == 0) ? !!(({ unsigned long flag, roksum; (void)0; asm("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0" : "=&r" (flag), "=r" (roksum) : "1" (data), "g" ((long)(size)), "rm" (current_thread_info()->addr_limit.seg)); flag; }) == 0) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 338, }; ______r = __builtin_expect(!!(({ unsigned long flag, roksum; (void)0; asm("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0" : "=&r" (flag), "=r" (roksum) : "1" (data), "g" ((long)(size)), "rm" (current_thread_info()->addr_limit.seg)); flag; }) == 0), 1); ftrace_likely_update(&______f, ______r, 1); ______r; }))))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 338, }; ______r = !!((!((__builtin_constant_p(({ unsigned long flag, roksum; (void)0; asm("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0" : "=&r" (flag), "=r" (roksum) : "1" (data), "g" ((long)(size)), "rm" (current_thread_info()->addr_limit.seg)); flag; }) == 0) ? !!(({ unsigned long flag, roksum; (void)0; asm("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0" : "=&r" (flag), "=r" (roksum) : "1" (data), "g" ((long)(size)), "rm" (current_thread_info()->addr_limit.seg)); flag; }) == 0) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 338, }; ______r = __builtin_expect(!!(({ unsigned long flag, roksum; (void)0; asm("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0" : "=&r" (flag), "=r" (roksum) : "1" (data), "g" ((long)(size)), "rm" (current_thread_info()->addr_limit.seg)); flag; }) == 0), 1); ftrace_likely_update(&______f, ______r, 1); ______r; }))))); ______f.miss_hit[______r]++; ______r; })) + return -5; + return regset->get(target, regset, offset, size, ((void *)0), data); +} +static inline __attribute__((always_inline)) int copy_regset_from_user(struct task_struct *target, + const struct user_regset_view *view, + unsigned int setno, + unsigned int offset, unsigned int size, + const void *data) +{ + const struct user_regset *regset = &view->regsets[setno]; + if (__builtin_constant_p(((!((__builtin_constant_p(({ unsigned long flag, roksum; (void)0; asm("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0" : "=&r" (flag), "=r" (roksum) : "1" (data), "g" ((long)(size)), "rm" (current_thread_info()->addr_limit.seg)); flag; }) == 0) ? !!(({ unsigned long flag, roksum; (void)0; asm("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0" : "=&r" (flag), "=r" (roksum) : "1" (data), "g" ((long)(size)), "rm" (current_thread_info()->addr_limit.seg)); flag; }) == 0) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 361, }; ______r = __builtin_expect(!!(({ unsigned long flag, roksum; (void)0; asm("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0" : "=&r" (flag), "=r" (roksum) : "1" (data), "g" ((long)(size)), "rm" (current_thread_info()->addr_limit.seg)); flag; }) == 0), 1); ftrace_likely_update(&______f, ______r, 1); ______r; })))))) ? !!((!((__builtin_constant_p(({ unsigned long flag, roksum; (void)0; asm("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0" : "=&r" (flag), "=r" (roksum) : "1" (data), "g" ((long)(size)), "rm" (current_thread_info()->addr_limit.seg)); flag; }) == 0) ? !!(({ unsigned long flag, roksum; (void)0; asm("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0" : "=&r" (flag), "=r" (roksum) : "1" (data), "g" ((long)(size)), "rm" (current_thread_info()->addr_limit.seg)); flag; }) == 0) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 361, }; ______r = __builtin_expect(!!(({ unsigned long flag, roksum; (void)0; asm("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0" : "=&r" (flag), "=r" (roksum) : "1" (data), "g" ((long)(size)), "rm" (current_thread_info()->addr_limit.seg)); flag; }) == 0), 1); ftrace_likely_update(&______f, ______r, 1); ______r; }))))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 361, }; ______r = !!((!((__builtin_constant_p(({ unsigned long flag, roksum; (void)0; asm("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0" : "=&r" (flag), "=r" (roksum) : "1" (data), "g" ((long)(size)), "rm" (current_thread_info()->addr_limit.seg)); flag; }) == 0) ? !!(({ unsigned long flag, roksum; (void)0; asm("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0" : "=&r" (flag), "=r" (roksum) : "1" (data), "g" ((long)(size)), "rm" (current_thread_info()->addr_limit.seg)); flag; }) == 0) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/regset.h", .line = 361, }; ______r = __builtin_expect(!!(({ unsigned long flag, roksum; (void)0; asm("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0" : "=&r" (flag), "=r" (roksum) : "1" (data), "g" ((long)(size)), "rm" (current_thread_info()->addr_limit.seg)); flag; }) == 0), 1); ftrace_likely_update(&______f, ______r, 1); ______r; }))))); ______f.miss_hit[______r]++; ______r; })) + return -5; + return regset->set(target, regset, offset, size, ((void *)0), data); +} +extern unsigned int xstate_size; +extern u64 pcntxt_mask; +extern u64 xstate_fx_sw_bytes[6]; +extern void xsave_init(void); +extern void update_regset_xstate_info(unsigned int size, u64 xstate_mask); +extern int init_fpu(struct task_struct *child); +extern int check_for_xstate(struct i387_fxsave_struct *buf, + void *fpstate, + struct _fpx_sw_bytes *sw); +static inline __attribute__((always_inline)) int fpu_xrstor_checking(struct fpu *fpu) +{ + struct xsave_struct *fx = &fpu->state->xsave; + int err; + asm volatile("1: .byte " "0x0f,0xae,0x2f\n\t" + "2:\n" + ".section .fixup,\"ax\"\n" + "3: movl $-1,%[err]\n" + " jmp 2b\n" + ".previous\n" + " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "3b" "\n" " .previous\n" + : [err] "=r" (err) + : "D" (fx), "m" (*fx), "a" (-1), "d" (-1), "0" (0) + : "memory"); + return err; +} +static inline __attribute__((always_inline)) int xsave_user(struct xsave_struct *buf) +{ + int err; + err = __clear_user(&buf->xsave_hdr, + sizeof(struct xsave_hdr_struct)); + if (__builtin_constant_p((((__builtin_constant_p(err) ? !!(err) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/xsave.h", .line = 74, }; ______r = __builtin_expect(!!(err), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(err) ? !!(err) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/xsave.h", .line = 74, }; ______r = __builtin_expect(!!(err), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/xsave.h", .line = 74, }; ______r = !!(((__builtin_constant_p(err) ? !!(err) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/xsave.h", .line = 74, }; ______r = __builtin_expect(!!(err), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + return -14; + __asm__ __volatile__("1: .byte " "0x0f,0xae,0x27\n" + "2:\n" + ".section .fixup,\"ax\"\n" + "3: movl $-1,%[err]\n" + " jmp 2b\n" + ".previous\n" + ".section __ex_table,\"a\"\n" + " " ".balign 4" " " "\n" + " " ".long" " " "1b,3b\n" + ".previous" + : [err] "=r" (err) + : "D" (buf), "a" (-1), "d" (-1), "0" (0) + : "memory"); + if (__builtin_constant_p((((__builtin_constant_p(err) ? !!(err) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/xsave.h", .line = 90, }; ______r = __builtin_expect(!!(err), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })) && __clear_user(buf, xstate_size)))) ? !!(((__builtin_constant_p(err) ? !!(err) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/xsave.h", .line = 90, }; ______r = __builtin_expect(!!(err), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })) && __clear_user(buf, xstate_size))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/xsave.h", .line = 90, }; ______r = !!(((__builtin_constant_p(err) ? !!(err) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/xsave.h", .line = 90, }; ______r = __builtin_expect(!!(err), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })) && __clear_user(buf, xstate_size))); ______f.miss_hit[______r]++; ______r; })) + err = -14; + return err; +} +static inline __attribute__((always_inline)) int xrestore_user(struct xsave_struct *buf, u64 mask) +{ + int err; + struct xsave_struct *xstate = (( struct xsave_struct *)buf); + u32 lmask = mask; + u32 hmask = mask >> 32; + __asm__ __volatile__("1: .byte " "0x0f,0xae,0x2f\n" + "2:\n" + ".section .fixup,\"ax\"\n" + "3: movl $-1,%[err]\n" + " jmp 2b\n" + ".previous\n" + ".section __ex_table,\"a\"\n" + " " ".balign 4" " " "\n" + " " ".long" " " "1b,3b\n" + ".previous" + : [err] "=r" (err) + : "D" (xstate), "a" (lmask), "d" (hmask), "0" (0) + : "memory"); + return err; +} +static inline __attribute__((always_inline)) void xrstor_state(struct xsave_struct *fx, u64 mask) +{ + u32 lmask = mask; + u32 hmask = mask >> 32; + asm volatile(".byte " "0x0f,0xae,0x2f\n\t" + : : "D" (fx), "m" (*fx), "a" (lmask), "d" (hmask) + : "memory"); +} +static inline __attribute__((always_inline)) void xsave_state(struct xsave_struct *fx, u64 mask) +{ + u32 lmask = mask; + u32 hmask = mask >> 32; + asm volatile(".byte " "0x0f,0xae,0x27\n\t" + : : "D" (fx), "m" (*fx), "a" (lmask), "d" (hmask) + : "memory"); +} +static inline __attribute__((always_inline)) void fpu_xsave(struct fpu *fpu) +{ + asm volatile ("661:\n\t" ".byte " "0x0f,0xae,0x27" "\n662:\n" ".section .altinstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "661b\n" " " ".long" " " "663f\n" " .word " "(7*32+ 4)" "\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .discard,\"aw\",@progbits\n" " .byte 0xff + (664f-663f) - (662b-661b)\n" ".previous\n" ".section .altinstr_replacement, \"ax\"\n" "663:\n\t" ".byte " "0x0f,0xae,0x37" "\n664:\n" ".previous" : : "i" (0), [fx] "D" (&fpu->state->xsave), "a" (-1), "d" (-1) : "memory") + ; +} +extern unsigned int sig_xstate_size; +extern void fpu_init(void); +extern void mxcsr_feature_mask_init(void); +extern int init_fpu(struct task_struct *child); +extern __attribute__((regparm(0))) void math_state_restore(void); +extern void __math_state_restore(void); +extern int dump_fpu(struct pt_regs *, struct user_i387_struct *); +extern user_regset_active_fn fpregs_active, xfpregs_active; +extern user_regset_get_fn fpregs_get, xfpregs_get, fpregs_soft_get, + xstateregs_get; +extern user_regset_set_fn fpregs_set, xfpregs_set, fpregs_soft_set, + xstateregs_set; +extern struct _fpx_sw_bytes fx_sw_reserved; +static inline __attribute__((always_inline)) void finit_soft_fpu(struct i387_soft_struct *soft) {} +static inline __attribute__((always_inline)) __attribute__((always_inline)) __attribute__((pure)) bool use_xsaveopt(void) +{ + return ( __builtin_constant_p((__builtin_constant_p((7*32+ 4)) && ( ((((7*32+ 4))>>5)==0 && (1UL<<(((7*32+ 4))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((7*32+ 4))>>5)==1 && (1UL<<(((7*32+ 4))&31) & (0|0))) || ((((7*32+ 4))>>5)==2 && (1UL<<(((7*32+ 4))&31) & 0)) || ((((7*32+ 4))>>5)==3 && (1UL<<(((7*32+ 4))&31) & (0))) || ((((7*32+ 4))>>5)==4 && (1UL<<(((7*32+ 4))&31) & 0)) || ((((7*32+ 4))>>5)==5 && (1UL<<(((7*32+ 4))&31) & 0)) || ((((7*32+ 4))>>5)==6 && (1UL<<(((7*32+ 4))&31) & 0)) || ((((7*32+ 4))>>5)==7 && (1UL<<(((7*32+ 4))&31) & 0)) || ((((7*32+ 4))>>5)==8 && (1UL<<(((7*32+ 4))&31) & 0)) || ((((7*32+ 4))>>5)==9 && (1UL<<(((7*32+ 4))&31) & 0)) ) ? 1 : (__builtin_constant_p(((7*32+ 4))) ? constant_test_bit(((7*32+ 4)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((7*32+ 4)), ((unsigned long *)((&boot_cpu_data)->x86_capability)))))) ? (__builtin_constant_p((7*32+ 4)) && ( ((((7*32+ 4))>>5)==0 && (1UL<<(((7*32+ 4))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((7*32+ 4))>>5)==1 && (1UL<<(((7*32+ 4))&31) & (0|0))) || ((((7*32+ 4))>>5)==2 && (1UL<<(((7*32+ 4))&31) & 0)) || ((((7*32+ 4))>>5)==3 && (1UL<<(((7*32+ 4))&31) & (0))) || ((((7*32+ 4))>>5)==4 && (1UL<<(((7*32+ 4))&31) & 0)) || ((((7*32+ 4))>>5)==5 && (1UL<<(((7*32+ 4))&31) & 0)) || ((((7*32+ 4))>>5)==6 && (1UL<<(((7*32+ 4))&31) & 0)) || ((((7*32+ 4))>>5)==7 && (1UL<<(((7*32+ 4))&31) & 0)) || ((((7*32+ 4))>>5)==8 && (1UL<<(((7*32+ 4))&31) & 0)) || ((((7*32+ 4))>>5)==9 && (1UL<<(((7*32+ 4))&31) & 0)) ) ? 1 : (__builtin_constant_p(((7*32+ 4))) ? constant_test_bit(((7*32+ 4)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((7*32+ 4)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))) : __builtin_constant_p((7*32+ 4)) ? __static_cpu_has((7*32+ 4)) : (__builtin_constant_p((7*32+ 4)) && ( ((((7*32+ 4))>>5)==0 && (1UL<<(((7*32+ 4))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((7*32+ 4))>>5)==1 && (1UL<<(((7*32+ 4))&31) & (0|0))) || ((((7*32+ 4))>>5)==2 && (1UL<<(((7*32+ 4))&31) & 0)) || ((((7*32+ 4))>>5)==3 && (1UL<<(((7*32+ 4))&31) & (0))) || ((((7*32+ 4))>>5)==4 && (1UL<<(((7*32+ 4))&31) & 0)) || ((((7*32+ 4))>>5)==5 && (1UL<<(((7*32+ 4))&31) & 0)) || ((((7*32+ 4))>>5)==6 && (1UL<<(((7*32+ 4))&31) & 0)) || ((((7*32+ 4))>>5)==7 && (1UL<<(((7*32+ 4))&31) & 0)) || ((((7*32+ 4))>>5)==8 && (1UL<<(((7*32+ 4))&31) & 0)) || ((((7*32+ 4))>>5)==9 && (1UL<<(((7*32+ 4))&31) & 0)) ) ? 1 : (__builtin_constant_p(((7*32+ 4))) ? constant_test_bit(((7*32+ 4)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((7*32+ 4)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))) ); +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) __attribute__((pure)) bool use_xsave(void) +{ + return ( __builtin_constant_p((__builtin_constant_p((4*32+26)) && ( ((((4*32+26))>>5)==0 && (1UL<<(((4*32+26))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((4*32+26))>>5)==1 && (1UL<<(((4*32+26))&31) & (0|0))) || ((((4*32+26))>>5)==2 && (1UL<<(((4*32+26))&31) & 0)) || ((((4*32+26))>>5)==3 && (1UL<<(((4*32+26))&31) & (0))) || ((((4*32+26))>>5)==4 && (1UL<<(((4*32+26))&31) & 0)) || ((((4*32+26))>>5)==5 && (1UL<<(((4*32+26))&31) & 0)) || ((((4*32+26))>>5)==6 && (1UL<<(((4*32+26))&31) & 0)) || ((((4*32+26))>>5)==7 && (1UL<<(((4*32+26))&31) & 0)) || ((((4*32+26))>>5)==8 && (1UL<<(((4*32+26))&31) & 0)) || ((((4*32+26))>>5)==9 && (1UL<<(((4*32+26))&31) & 0)) ) ? 1 : (__builtin_constant_p(((4*32+26))) ? constant_test_bit(((4*32+26)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((4*32+26)), ((unsigned long *)((&boot_cpu_data)->x86_capability)))))) ? (__builtin_constant_p((4*32+26)) && ( ((((4*32+26))>>5)==0 && (1UL<<(((4*32+26))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((4*32+26))>>5)==1 && (1UL<<(((4*32+26))&31) & (0|0))) || ((((4*32+26))>>5)==2 && (1UL<<(((4*32+26))&31) & 0)) || ((((4*32+26))>>5)==3 && (1UL<<(((4*32+26))&31) & (0))) || ((((4*32+26))>>5)==4 && (1UL<<(((4*32+26))&31) & 0)) || ((((4*32+26))>>5)==5 && (1UL<<(((4*32+26))&31) & 0)) || ((((4*32+26))>>5)==6 && (1UL<<(((4*32+26))&31) & 0)) || ((((4*32+26))>>5)==7 && (1UL<<(((4*32+26))&31) & 0)) || ((((4*32+26))>>5)==8 && (1UL<<(((4*32+26))&31) & 0)) || ((((4*32+26))>>5)==9 && (1UL<<(((4*32+26))&31) & 0)) ) ? 1 : (__builtin_constant_p(((4*32+26))) ? constant_test_bit(((4*32+26)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((4*32+26)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))) : __builtin_constant_p((4*32+26)) ? __static_cpu_has((4*32+26)) : (__builtin_constant_p((4*32+26)) && ( ((((4*32+26))>>5)==0 && (1UL<<(((4*32+26))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((4*32+26))>>5)==1 && (1UL<<(((4*32+26))&31) & (0|0))) || ((((4*32+26))>>5)==2 && (1UL<<(((4*32+26))&31) & 0)) || ((((4*32+26))>>5)==3 && (1UL<<(((4*32+26))&31) & (0))) || ((((4*32+26))>>5)==4 && (1UL<<(((4*32+26))&31) & 0)) || ((((4*32+26))>>5)==5 && (1UL<<(((4*32+26))&31) & 0)) || ((((4*32+26))>>5)==6 && (1UL<<(((4*32+26))&31) & 0)) || ((((4*32+26))>>5)==7 && (1UL<<(((4*32+26))&31) & 0)) || ((((4*32+26))>>5)==8 && (1UL<<(((4*32+26))&31) & 0)) || ((((4*32+26))>>5)==9 && (1UL<<(((4*32+26))&31) & 0)) ) ? 1 : (__builtin_constant_p(((4*32+26))) ? constant_test_bit(((4*32+26)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((4*32+26)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))) ); +} +static inline __attribute__((always_inline)) __attribute__((always_inline)) __attribute__((pure)) bool use_fxsr(void) +{ + return ( __builtin_constant_p((__builtin_constant_p((0*32+24)) && ( ((((0*32+24))>>5)==0 && (1UL<<(((0*32+24))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((0*32+24))>>5)==1 && (1UL<<(((0*32+24))&31) & (0|0))) || ((((0*32+24))>>5)==2 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==3 && (1UL<<(((0*32+24))&31) & (0))) || ((((0*32+24))>>5)==4 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==5 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==6 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==7 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==8 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==9 && (1UL<<(((0*32+24))&31) & 0)) ) ? 1 : (__builtin_constant_p(((0*32+24))) ? constant_test_bit(((0*32+24)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((0*32+24)), ((unsigned long *)((&boot_cpu_data)->x86_capability)))))) ? (__builtin_constant_p((0*32+24)) && ( ((((0*32+24))>>5)==0 && (1UL<<(((0*32+24))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((0*32+24))>>5)==1 && (1UL<<(((0*32+24))&31) & (0|0))) || ((((0*32+24))>>5)==2 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==3 && (1UL<<(((0*32+24))&31) & (0))) || ((((0*32+24))>>5)==4 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==5 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==6 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==7 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==8 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==9 && (1UL<<(((0*32+24))&31) & 0)) ) ? 1 : (__builtin_constant_p(((0*32+24))) ? constant_test_bit(((0*32+24)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((0*32+24)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))) : __builtin_constant_p((0*32+24)) ? __static_cpu_has((0*32+24)) : (__builtin_constant_p((0*32+24)) && ( ((((0*32+24))>>5)==0 && (1UL<<(((0*32+24))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((0*32+24))>>5)==1 && (1UL<<(((0*32+24))&31) & (0|0))) || ((((0*32+24))>>5)==2 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==3 && (1UL<<(((0*32+24))&31) & (0))) || ((((0*32+24))>>5)==4 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==5 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==6 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==7 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==8 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==9 && (1UL<<(((0*32+24))&31) & 0)) ) ? 1 : (__builtin_constant_p(((0*32+24))) ? constant_test_bit(((0*32+24)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((0*32+24)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))) ); +} +extern void __sanitize_i387_state(struct task_struct *); +static inline __attribute__((always_inline)) void sanitize_i387_state(struct task_struct *tsk) +{ + if (__builtin_constant_p(((!use_xsaveopt()))) ? !!((!use_xsaveopt())) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 85, }; ______r = !!((!use_xsaveopt())); ______f.miss_hit[______r]++; ______r; })) + return; + __sanitize_i387_state(tsk); +} +static inline __attribute__((always_inline)) int fxrstor_checking(struct i387_fxsave_struct *fx) +{ + asm volatile ("661:\n\t" "nop ; frstor %1" "\n662:\n" ".section .altinstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "661b\n" " " ".long" " " "663f\n" " .word " "(0*32+24)" "\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .discard,\"aw\",@progbits\n" " .byte 0xff + (664f-663f) - (662b-661b)\n" ".previous\n" ".section .altinstr_replacement, \"ax\"\n" "663:\n\t" "fxrstor %1" "\n664:\n" ".previous" : : "i" (0), "m" (*fx)) + ; + return 0; +} +static inline __attribute__((always_inline)) void fpu_fxsave(struct fpu *fpu) +{ + asm volatile("fxsave %[fx]" + : [fx] "=m" (fpu->state->fxsave)); +} +static inline __attribute__((always_inline)) void fpu_save_init(struct fpu *fpu) +{ + if (__builtin_constant_p(((use_xsave()))) ? !!((use_xsave())) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 229, }; ______r = !!((use_xsave())); ______f.miss_hit[______r]++; ______r; })) { + fpu_xsave(fpu); + if (__builtin_constant_p(((!(fpu->state->xsave.xsave_hdr.xstate_bv & 0x1)))) ? !!((!(fpu->state->xsave.xsave_hdr.xstate_bv & 0x1))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 235, }; ______r = !!((!(fpu->state->xsave.xsave_hdr.xstate_bv & 0x1))); ______f.miss_hit[______r]++; ______r; })) + return; + } else if (__builtin_constant_p(((use_fxsr()))) ? !!((use_fxsr())) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 237, }; ______r = !!((use_fxsr())); ______f.miss_hit[______r]++; ______r; })) { + fpu_fxsave(fpu); + } else { + asm volatile("fnsave %[fx]; fwait" + : [fx] "=m" (fpu->state->fsave)); + return; + } + if (__builtin_constant_p((((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) ? !!(fpu->state->fxsave.swd & (1 << 7)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 245, }; ______r = __builtin_expect(!!(fpu->state->fxsave.swd & (1 << 7)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) ? !!(fpu->state->fxsave.swd & (1 << 7)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 245, }; ______r = __builtin_expect(!!(fpu->state->fxsave.swd & (1 << 7)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 245, }; ______r = !!(((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) ? !!(fpu->state->fxsave.swd & (1 << 7)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 245, }; ______r = __builtin_expect(!!(fpu->state->fxsave.swd & (1 << 7)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + asm volatile("fnclex"); + asm volatile ("661:\n\t" ".byte " "0x90,0x8d,0xb4,0x26,0x00,0x00,0x00,0x00" "\n" ".byte " "0x89,0xf6" "\n" "\n662:\n" ".section .altinstructions,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "661b\n" " " ".long" " " "663f\n" " .word " "(3*32+10)" "\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .discard,\"aw\",@progbits\n" " .byte 0xff + (664f-663f) - (662b-661b)\n" ".previous\n" ".section .altinstr_replacement, \"ax\"\n" "663:\n\t" "emms\n\t" "fildl %P[addr]" "\n664:\n" ".previous" : : "i" (0), [addr] "m" ((__per_cpu_offset[0]))) + ; +} +static inline __attribute__((always_inline)) void __save_init_fpu(struct task_struct *tsk) +{ + fpu_save_init(&tsk->thread.fpu); + ((struct thread_info *)(tsk)->stack)->status &= ~0x0001; +} +static inline __attribute__((always_inline)) int fpu_fxrstor_checking(struct fpu *fpu) +{ + return fxrstor_checking(&fpu->state->fxsave); +} +static inline __attribute__((always_inline)) int fpu_restore_checking(struct fpu *fpu) +{ + if (__builtin_constant_p(((use_xsave()))) ? !!((use_xsave())) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 272, }; ______r = !!((use_xsave())); ______f.miss_hit[______r]++; ______r; })) + return fpu_xrstor_checking(fpu); + else + return fpu_fxrstor_checking(fpu); +} +static inline __attribute__((always_inline)) int restore_fpu_checking(struct task_struct *tsk) +{ + return fpu_restore_checking(&tsk->thread.fpu); +} +extern int save_i387_xstate(void *buf); +extern int restore_i387_xstate(void *buf); +static inline __attribute__((always_inline)) void __unlazy_fpu(struct task_struct *tsk) +{ + if (__builtin_constant_p(((((struct thread_info *)(tsk)->stack)->status & 0x0001))) ? !!((((struct thread_info *)(tsk)->stack)->status & 0x0001)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 291, }; ______r = !!((((struct thread_info *)(tsk)->stack)->status & 0x0001)); ______f.miss_hit[______r]++; ______r; })) { + __save_init_fpu(tsk); + write_cr0(read_cr0() | 0x00000008); + } else + tsk->fpu_counter = 0; +} +static inline __attribute__((always_inline)) void __clear_fpu(struct task_struct *tsk) +{ + if (__builtin_constant_p(((((struct thread_info *)(tsk)->stack)->status & 0x0001))) ? !!((((struct thread_info *)(tsk)->stack)->status & 0x0001)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 300, }; ______r = !!((((struct thread_info *)(tsk)->stack)->status & 0x0001)); ______f.miss_hit[______r]++; ______r; })) { + asm volatile("1: fwait\n" + "2:\n" + " .section __ex_table,\"a\"\n" " " ".balign 4" " " "\n" " " ".long" " " "1b" "," "2b" "\n" " .previous\n"); + ((struct thread_info *)(tsk)->stack)->status &= ~0x0001; + write_cr0(read_cr0() | 0x00000008); + } +} +static inline __attribute__((always_inline)) void kernel_fpu_begin(void) +{ + struct thread_info *me = current_thread_info(); + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + if (__builtin_constant_p(((me->status & 0x0001))) ? !!((me->status & 0x0001)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 314, }; ______r = !!((me->status & 0x0001)); ______f.miss_hit[______r]++; ______r; })) + __save_init_fpu(me->task); + else + clts(); +} +static inline __attribute__((always_inline)) void kernel_fpu_end(void) +{ + write_cr0(read_cr0() | 0x00000008); + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 323, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 323, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 323, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 323, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); +} +static inline __attribute__((always_inline)) bool irq_fpu_usable(void) +{ + struct pt_regs *regs; + return !(((current_thread_info()->preempt_count) & ((((1UL << (10))-1) << ((0 + 8) + 8)) | (((1UL << (8))-1) << (0 + 8)) | (((1UL << (1))-1) << (((0 + 8) + 8) + 10))))) || !(regs = get_irq_regs()) || + user_mode(regs) || (read_cr0() & 0x00000008); +} +static inline __attribute__((always_inline)) int irq_ts_save(void) +{ + if (__builtin_constant_p(((!(((current_thread_info()->preempt_count) & ~0x10000000) != 0)))) ? !!((!(((current_thread_info()->preempt_count) & ~0x10000000) != 0))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 348, }; ______r = !!((!(((current_thread_info()->preempt_count) & ~0x10000000) != 0))); ______f.miss_hit[______r]++; ______r; })) + return 0; + if (__builtin_constant_p(((read_cr0() & 0x00000008))) ? !!((read_cr0() & 0x00000008)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 351, }; ______r = !!((read_cr0() & 0x00000008)); ______f.miss_hit[______r]++; ______r; })) { + clts(); + return 1; + } + return 0; +} +static inline __attribute__((always_inline)) void irq_ts_restore(int TS_state) +{ + if (__builtin_constant_p(((TS_state))) ? !!((TS_state)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 361, }; ______r = !!((TS_state)); ______f.miss_hit[______r]++; ______r; })) + write_cr0(read_cr0() | 0x00000008); +} +static inline __attribute__((always_inline)) void save_init_fpu(struct task_struct *tsk) +{ + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + __save_init_fpu(tsk); + write_cr0(read_cr0() | 0x00000008); + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 373, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 373, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 373, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 373, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); +} +static inline __attribute__((always_inline)) void unlazy_fpu(struct task_struct *tsk) +{ + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + __unlazy_fpu(tsk); + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 380, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 380, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 380, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 380, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); +} +static inline __attribute__((always_inline)) void clear_fpu(struct task_struct *tsk) +{ + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + __clear_fpu(tsk); + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 387, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 387, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 387, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 387, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); +} +static inline __attribute__((always_inline)) unsigned short get_fpu_cwd(struct task_struct *tsk) +{ + if (__builtin_constant_p((((__builtin_constant_p((0*32+24)) && ( ((((0*32+24))>>5)==0 && (1UL<<(((0*32+24))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((0*32+24))>>5)==1 && (1UL<<(((0*32+24))&31) & (0|0))) || ((((0*32+24))>>5)==2 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==3 && (1UL<<(((0*32+24))&31) & (0))) || ((((0*32+24))>>5)==4 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==5 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==6 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==7 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==8 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==9 && (1UL<<(((0*32+24))&31) & 0)) ) ? 1 : (__builtin_constant_p(((0*32+24))) ? constant_test_bit(((0*32+24)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((0*32+24)), ((unsigned long *)((&boot_cpu_data)->x86_capability)))))))) ? !!(((__builtin_constant_p((0*32+24)) && ( ((((0*32+24))>>5)==0 && (1UL<<(((0*32+24))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((0*32+24))>>5)==1 && (1UL<<(((0*32+24))&31) & (0|0))) || ((((0*32+24))>>5)==2 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==3 && (1UL<<(((0*32+24))&31) & (0))) || ((((0*32+24))>>5)==4 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==5 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==6 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==7 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==8 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==9 && (1UL<<(((0*32+24))&31) & 0)) ) ? 1 : (__builtin_constant_p(((0*32+24))) ? constant_test_bit(((0*32+24)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((0*32+24)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 395, }; ______r = !!(((__builtin_constant_p((0*32+24)) && ( ((((0*32+24))>>5)==0 && (1UL<<(((0*32+24))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((0*32+24))>>5)==1 && (1UL<<(((0*32+24))&31) & (0|0))) || ((((0*32+24))>>5)==2 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==3 && (1UL<<(((0*32+24))&31) & (0))) || ((((0*32+24))>>5)==4 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==5 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==6 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==7 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==8 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==9 && (1UL<<(((0*32+24))&31) & 0)) ) ? 1 : (__builtin_constant_p(((0*32+24))) ? constant_test_bit(((0*32+24)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((0*32+24)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))))); ______f.miss_hit[______r]++; ______r; })) { + return tsk->thread.fpu.state->fxsave.cwd; + } else { + return (unsigned short)tsk->thread.fpu.state->fsave.cwd; + } +} +static inline __attribute__((always_inline)) unsigned short get_fpu_swd(struct task_struct *tsk) +{ + if (__builtin_constant_p((((__builtin_constant_p((0*32+24)) && ( ((((0*32+24))>>5)==0 && (1UL<<(((0*32+24))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((0*32+24))>>5)==1 && (1UL<<(((0*32+24))&31) & (0|0))) || ((((0*32+24))>>5)==2 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==3 && (1UL<<(((0*32+24))&31) & (0))) || ((((0*32+24))>>5)==4 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==5 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==6 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==7 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==8 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==9 && (1UL<<(((0*32+24))&31) & 0)) ) ? 1 : (__builtin_constant_p(((0*32+24))) ? constant_test_bit(((0*32+24)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((0*32+24)), ((unsigned long *)((&boot_cpu_data)->x86_capability)))))))) ? !!(((__builtin_constant_p((0*32+24)) && ( ((((0*32+24))>>5)==0 && (1UL<<(((0*32+24))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((0*32+24))>>5)==1 && (1UL<<(((0*32+24))&31) & (0|0))) || ((((0*32+24))>>5)==2 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==3 && (1UL<<(((0*32+24))&31) & (0))) || ((((0*32+24))>>5)==4 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==5 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==6 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==7 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==8 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==9 && (1UL<<(((0*32+24))&31) & 0)) ) ? 1 : (__builtin_constant_p(((0*32+24))) ? constant_test_bit(((0*32+24)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((0*32+24)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 404, }; ______r = !!(((__builtin_constant_p((0*32+24)) && ( ((((0*32+24))>>5)==0 && (1UL<<(((0*32+24))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((0*32+24))>>5)==1 && (1UL<<(((0*32+24))&31) & (0|0))) || ((((0*32+24))>>5)==2 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==3 && (1UL<<(((0*32+24))&31) & (0))) || ((((0*32+24))>>5)==4 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==5 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==6 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==7 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==8 && (1UL<<(((0*32+24))&31) & 0)) || ((((0*32+24))>>5)==9 && (1UL<<(((0*32+24))&31) & 0)) ) ? 1 : (__builtin_constant_p(((0*32+24))) ? constant_test_bit(((0*32+24)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((0*32+24)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))))); ______f.miss_hit[______r]++; ______r; })) { + return tsk->thread.fpu.state->fxsave.swd; + } else { + return (unsigned short)tsk->thread.fpu.state->fsave.swd; + } +} +static inline __attribute__((always_inline)) unsigned short get_fpu_mxcsr(struct task_struct *tsk) +{ + if (__builtin_constant_p((((__builtin_constant_p((0*32+25)) && ( ((((0*32+25))>>5)==0 && (1UL<<(((0*32+25))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((0*32+25))>>5)==1 && (1UL<<(((0*32+25))&31) & (0|0))) || ((((0*32+25))>>5)==2 && (1UL<<(((0*32+25))&31) & 0)) || ((((0*32+25))>>5)==3 && (1UL<<(((0*32+25))&31) & (0))) || ((((0*32+25))>>5)==4 && (1UL<<(((0*32+25))&31) & 0)) || ((((0*32+25))>>5)==5 && (1UL<<(((0*32+25))&31) & 0)) || ((((0*32+25))>>5)==6 && (1UL<<(((0*32+25))&31) & 0)) || ((((0*32+25))>>5)==7 && (1UL<<(((0*32+25))&31) & 0)) || ((((0*32+25))>>5)==8 && (1UL<<(((0*32+25))&31) & 0)) || ((((0*32+25))>>5)==9 && (1UL<<(((0*32+25))&31) & 0)) ) ? 1 : (__builtin_constant_p(((0*32+25))) ? constant_test_bit(((0*32+25)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((0*32+25)), ((unsigned long *)((&boot_cpu_data)->x86_capability)))))))) ? !!(((__builtin_constant_p((0*32+25)) && ( ((((0*32+25))>>5)==0 && (1UL<<(((0*32+25))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((0*32+25))>>5)==1 && (1UL<<(((0*32+25))&31) & (0|0))) || ((((0*32+25))>>5)==2 && (1UL<<(((0*32+25))&31) & 0)) || ((((0*32+25))>>5)==3 && (1UL<<(((0*32+25))&31) & (0))) || ((((0*32+25))>>5)==4 && (1UL<<(((0*32+25))&31) & 0)) || ((((0*32+25))>>5)==5 && (1UL<<(((0*32+25))&31) & 0)) || ((((0*32+25))>>5)==6 && (1UL<<(((0*32+25))&31) & 0)) || ((((0*32+25))>>5)==7 && (1UL<<(((0*32+25))&31) & 0)) || ((((0*32+25))>>5)==8 && (1UL<<(((0*32+25))&31) & 0)) || ((((0*32+25))>>5)==9 && (1UL<<(((0*32+25))&31) & 0)) ) ? 1 : (__builtin_constant_p(((0*32+25))) ? constant_test_bit(((0*32+25)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((0*32+25)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 413, }; ______r = !!(((__builtin_constant_p((0*32+25)) && ( ((((0*32+25))>>5)==0 && (1UL<<(((0*32+25))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((0*32+25))>>5)==1 && (1UL<<(((0*32+25))&31) & (0|0))) || ((((0*32+25))>>5)==2 && (1UL<<(((0*32+25))&31) & 0)) || ((((0*32+25))>>5)==3 && (1UL<<(((0*32+25))&31) & (0))) || ((((0*32+25))>>5)==4 && (1UL<<(((0*32+25))&31) & 0)) || ((((0*32+25))>>5)==5 && (1UL<<(((0*32+25))&31) & 0)) || ((((0*32+25))>>5)==6 && (1UL<<(((0*32+25))&31) & 0)) || ((((0*32+25))>>5)==7 && (1UL<<(((0*32+25))&31) & 0)) || ((((0*32+25))>>5)==8 && (1UL<<(((0*32+25))&31) & 0)) || ((((0*32+25))>>5)==9 && (1UL<<(((0*32+25))&31) & 0)) ) ? 1 : (__builtin_constant_p(((0*32+25))) ? constant_test_bit(((0*32+25)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((0*32+25)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))))); ______f.miss_hit[______r]++; ______r; })) { + return tsk->thread.fpu.state->fxsave.mxcsr; + } else { + return 0x1f80; + } +} +static bool fpu_allocated(struct fpu *fpu) +{ + return fpu->state != ((void *)0); +} +static inline __attribute__((always_inline)) int fpu_alloc(struct fpu *fpu) +{ + if (__builtin_constant_p(((fpu_allocated(fpu)))) ? !!((fpu_allocated(fpu))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 427, }; ______r = !!((fpu_allocated(fpu))); ______f.miss_hit[______r]++; ______r; })) + return 0; + fpu->state = kmem_cache_alloc(task_xstate_cachep, ((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u))); + if (__builtin_constant_p(((!fpu->state))) ? !!((!fpu->state)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 430, }; ______r = !!((!fpu->state)); ______f.miss_hit[______r]++; ______r; })) + return -12; + ({ int __ret_warn_on = !!((unsigned long)fpu->state & 15); if (__builtin_constant_p((((__builtin_constant_p(__ret_warn_on) ? !!(__ret_warn_on) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 432, }; ______r = __builtin_expect(!!(__ret_warn_on), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(__ret_warn_on) ? !!(__ret_warn_on) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 432, }; ______r = __builtin_expect(!!(__ret_warn_on), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 432, }; ______r = !!(((__builtin_constant_p(__ret_warn_on) ? !!(__ret_warn_on) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 432, }; ______r = __builtin_expect(!!(__ret_warn_on), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) warn_slowpath_null("/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", 432); (__builtin_constant_p(__ret_warn_on) ? !!(__ret_warn_on) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 432, }; ______r = __builtin_expect(!!(__ret_warn_on), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })); }); + return 0; +} +static inline __attribute__((always_inline)) void fpu_free(struct fpu *fpu) +{ + if (__builtin_constant_p(((fpu->state))) ? !!((fpu->state)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/i387.h", .line = 438, }; ______r = !!((fpu->state)); ______f.miss_hit[______r]++; ______r; })) { + kmem_cache_free(task_xstate_cachep, fpu->state); + fpu->state = ((void *)0); + } +} +static inline __attribute__((always_inline)) void fpu_copy(struct fpu *dst, struct fpu *src) +{ + __builtin_memcpy(dst->state, src->state, xstate_size); +} +extern void fpu_finit(struct fpu *fpu); +void crypto_aes_encrypt_x86(struct crypto_aes_ctx *ctx, u8 *dst, + const u8 *src); +void crypto_aes_decrypt_x86(struct crypto_aes_ctx *ctx, u8 *dst, + const u8 *src); +struct bio_set; +struct bio; +struct bio_integrity_payload; +struct page; +struct block_device; +typedef void (bio_end_io_t) (struct bio *, int); +typedef void (bio_destructor_t) (struct bio *); +struct bio_vec { + struct page *bv_page; + unsigned int bv_len; + unsigned int bv_offset; +}; +struct bio { + sector_t bi_sector; + struct bio *bi_next; + struct block_device *bi_bdev; + unsigned long bi_flags; + unsigned long bi_rw; + unsigned short bi_vcnt; + unsigned short bi_idx; + unsigned int bi_phys_segments; + unsigned int bi_size; + unsigned int bi_seg_front_size; + unsigned int bi_seg_back_size; + unsigned int bi_max_vecs; + unsigned int bi_comp_cpu; + atomic_t bi_cnt; + struct bio_vec *bi_io_vec; + bio_end_io_t *bi_end_io; + void *bi_private; + bio_destructor_t *bi_destructor; + struct bio_vec bi_inline_vecs[0]; +}; +enum rq_flag_bits { + __REQ_WRITE, + __REQ_FAILFAST_DEV, + __REQ_FAILFAST_TRANSPORT, + __REQ_FAILFAST_DRIVER, + __REQ_SYNC, + __REQ_META, + __REQ_DISCARD, + __REQ_NOIDLE, + __REQ_RAHEAD, + __REQ_THROTTLED, + __REQ_SORTED, + __REQ_SOFTBARRIER, + __REQ_FUA, + __REQ_NOMERGE, + __REQ_STARTED, + __REQ_DONTPREP, + __REQ_QUEUED, + __REQ_ELVPRIV, + __REQ_FAILED, + __REQ_QUIET, + __REQ_PREEMPT, + __REQ_ALLOCED, + __REQ_COPY_USER, + __REQ_FLUSH, + __REQ_FLUSH_SEQ, + __REQ_IO_STAT, + __REQ_MIXED_MERGE, + __REQ_SECURE, + __REQ_NR_BITS, +}; +struct fstrim_range { + __u64 start; + __u64 len; + __u64 minlen; +}; +struct files_stat_struct { + unsigned long nr_files; + unsigned long nr_free_files; + unsigned long max_files; +}; +struct inodes_stat_t { + int nr_inodes; + int nr_unused; + int dummy[5]; +}; +static inline __attribute__((always_inline)) int old_valid_dev(dev_t dev) +{ + return ((unsigned int) ((dev) >> 20)) < 256 && ((unsigned int) ((dev) & ((1U << 20) - 1))) < 256; +} +static inline __attribute__((always_inline)) u16 old_encode_dev(dev_t dev) +{ + return (((unsigned int) ((dev) >> 20)) << 8) | ((unsigned int) ((dev) & ((1U << 20) - 1))); +} +static inline __attribute__((always_inline)) dev_t old_decode_dev(u16 val) +{ + return ((((val >> 8) & 255) << 20) | (val & 255)); +} +static inline __attribute__((always_inline)) int new_valid_dev(dev_t dev) +{ + return 1; +} +static inline __attribute__((always_inline)) u32 new_encode_dev(dev_t dev) +{ + unsigned major = ((unsigned int) ((dev) >> 20)); + unsigned minor = ((unsigned int) ((dev) & ((1U << 20) - 1))); + return (minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12); +} +static inline __attribute__((always_inline)) dev_t new_decode_dev(u32 dev) +{ + unsigned major = (dev & 0xfff00) >> 8; + unsigned minor = (dev & 0xff) | ((dev >> 12) & 0xfff00); + return (((major) << 20) | (minor)); +} +static inline __attribute__((always_inline)) int huge_valid_dev(dev_t dev) +{ + return 1; +} +static inline __attribute__((always_inline)) u64 huge_encode_dev(dev_t dev) +{ + return new_encode_dev(dev); +} +static inline __attribute__((always_inline)) dev_t huge_decode_dev(u64 dev) +{ + return new_decode_dev(dev); +} +static inline __attribute__((always_inline)) int sysv_valid_dev(dev_t dev) +{ + return ((unsigned int) ((dev) >> 20)) < (1<<14) && ((unsigned int) ((dev) & ((1U << 20) - 1))) < (1<<18); +} +static inline __attribute__((always_inline)) u32 sysv_encode_dev(dev_t dev) +{ + return ((unsigned int) ((dev) & ((1U << 20) - 1))) | (((unsigned int) ((dev) >> 20)) << 18); +} +static inline __attribute__((always_inline)) unsigned sysv_major(u32 dev) +{ + return (dev >> 18) & 0x3fff; +} +static inline __attribute__((always_inline)) unsigned sysv_minor(u32 dev) +{ + return dev & 0x3ffff; +} +static inline __attribute__((always_inline)) void bit_spin_lock(int bitnum, unsigned long *addr) +{ + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + while ((__builtin_constant_p(test_and_set_bit_lock(bitnum, addr)) ? !!(test_and_set_bit_lock(bitnum, addr)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 25, }; ______r = __builtin_expect(!!(test_and_set_bit_lock(bitnum, addr)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))) { + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 26, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 26, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 26, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 26, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); + do { + cpu_relax(); + } while ((__builtin_constant_p((bitnum)) ? constant_test_bit((bitnum), (addr)) : variable_test_bit((bitnum), (addr)))); + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + } + (void)0; +} +static inline __attribute__((always_inline)) int bit_spin_trylock(int bitnum, unsigned long *addr) +{ + do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); + if (__builtin_constant_p((((__builtin_constant_p(test_and_set_bit_lock(bitnum, addr)) ? !!(test_and_set_bit_lock(bitnum, addr)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 43, }; ______r = __builtin_expect(!!(test_and_set_bit_lock(bitnum, addr)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_and_set_bit_lock(bitnum, addr)) ? !!(test_and_set_bit_lock(bitnum, addr)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 43, }; ______r = __builtin_expect(!!(test_and_set_bit_lock(bitnum, addr)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 43, }; ______r = !!(((__builtin_constant_p(test_and_set_bit_lock(bitnum, addr)) ? !!(test_and_set_bit_lock(bitnum, addr)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 43, }; ______r = __builtin_expect(!!(test_and_set_bit_lock(bitnum, addr)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) { + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 44, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 44, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 44, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 44, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); + return 0; + } + (void)0; + return 1; +} +static inline __attribute__((always_inline)) void bit_spin_unlock(int bitnum, unsigned long *addr) +{ + do { if (__builtin_constant_p((((__builtin_constant_p(!(__builtin_constant_p((bitnum)) ? constant_test_bit((bitnum), (addr)) : variable_test_bit((bitnum), (addr)))) ? !!(!(__builtin_constant_p((bitnum)) ? constant_test_bit((bitnum), (addr)) : variable_test_bit((bitnum), (addr)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 58, }; ______r = __builtin_expect(!!(!(__builtin_constant_p((bitnum)) ? constant_test_bit((bitnum), (addr)) : variable_test_bit((bitnum), (addr)))), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(!(__builtin_constant_p((bitnum)) ? constant_test_bit((bitnum), (addr)) : variable_test_bit((bitnum), (addr)))) ? !!(!(__builtin_constant_p((bitnum)) ? constant_test_bit((bitnum), (addr)) : variable_test_bit((bitnum), (addr)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 58, }; ______r = __builtin_expect(!!(!(__builtin_constant_p((bitnum)) ? constant_test_bit((bitnum), (addr)) : variable_test_bit((bitnum), (addr)))), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 58, }; ______r = !!(((__builtin_constant_p(!(__builtin_constant_p((bitnum)) ? constant_test_bit((bitnum), (addr)) : variable_test_bit((bitnum), (addr)))) ? !!(!(__builtin_constant_p((bitnum)) ? constant_test_bit((bitnum), (addr)) : variable_test_bit((bitnum), (addr)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 58, }; ______r = __builtin_expect(!!(!(__builtin_constant_p((bitnum)) ? constant_test_bit((bitnum), (addr)) : variable_test_bit((bitnum), (addr)))), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/bit_spinlock.h"), "i" (58), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); } while(0); + clear_bit_unlock(bitnum, addr); + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 63, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 63, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 63, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 63, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); + (void)0; +} +static inline __attribute__((always_inline)) void __bit_spin_unlock(int bitnum, unsigned long *addr) +{ + do { if (__builtin_constant_p((((__builtin_constant_p(!(__builtin_constant_p((bitnum)) ? constant_test_bit((bitnum), (addr)) : variable_test_bit((bitnum), (addr)))) ? !!(!(__builtin_constant_p((bitnum)) ? constant_test_bit((bitnum), (addr)) : variable_test_bit((bitnum), (addr)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 75, }; ______r = __builtin_expect(!!(!(__builtin_constant_p((bitnum)) ? constant_test_bit((bitnum), (addr)) : variable_test_bit((bitnum), (addr)))), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(!(__builtin_constant_p((bitnum)) ? constant_test_bit((bitnum), (addr)) : variable_test_bit((bitnum), (addr)))) ? !!(!(__builtin_constant_p((bitnum)) ? constant_test_bit((bitnum), (addr)) : variable_test_bit((bitnum), (addr)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 75, }; ______r = __builtin_expect(!!(!(__builtin_constant_p((bitnum)) ? constant_test_bit((bitnum), (addr)) : variable_test_bit((bitnum), (addr)))), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 75, }; ______r = !!(((__builtin_constant_p(!(__builtin_constant_p((bitnum)) ? constant_test_bit((bitnum), (addr)) : variable_test_bit((bitnum), (addr)))) ? !!(!(__builtin_constant_p((bitnum)) ? constant_test_bit((bitnum), (addr)) : variable_test_bit((bitnum), (addr)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 75, }; ______r = __builtin_expect(!!(!(__builtin_constant_p((bitnum)) ? constant_test_bit((bitnum), (addr)) : variable_test_bit((bitnum), (addr)))), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/bit_spinlock.h"), "i" (75), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); } while(0); + __clear_bit_unlock(bitnum, addr); + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 80, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 80, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 80, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/bit_spinlock.h", .line = 80, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); + (void)0; +} +static inline __attribute__((always_inline)) int bit_spin_is_locked(int bitnum, unsigned long *addr) +{ + return (__builtin_constant_p((bitnum)) ? constant_test_bit((bitnum), (addr)) : variable_test_bit((bitnum), (addr))); +} +struct hlist_bl_head { + struct hlist_bl_node *first; +}; +struct hlist_bl_node { + struct hlist_bl_node *next, **pprev; +}; +static inline __attribute__((always_inline)) void INIT_HLIST_BL_NODE(struct hlist_bl_node *h) +{ + h->next = ((void *)0); + h->pprev = ((void *)0); +} +static inline __attribute__((always_inline)) int hlist_bl_unhashed(const struct hlist_bl_node *h) +{ + return !h->pprev; +} +static inline __attribute__((always_inline)) struct hlist_bl_node *hlist_bl_first(struct hlist_bl_head *h) +{ + return (struct hlist_bl_node *) + ((unsigned long)h->first & ~1UL); +} +static inline __attribute__((always_inline)) void hlist_bl_set_first(struct hlist_bl_head *h, + struct hlist_bl_node *n) +{ + ; + ; + h->first = (struct hlist_bl_node *)((unsigned long)n | 1UL); +} +static inline __attribute__((always_inline)) int hlist_bl_empty(const struct hlist_bl_head *h) +{ + return !((unsigned long)h->first & ~1UL); +} +static inline __attribute__((always_inline)) void hlist_bl_add_head(struct hlist_bl_node *n, + struct hlist_bl_head *h) +{ + struct hlist_bl_node *first = hlist_bl_first(h); + n->next = first; + if (__builtin_constant_p(((first))) ? !!((first)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/list_bl.h", .line = 82, }; ______r = !!((first)); ______f.miss_hit[______r]++; ______r; })) + first->pprev = &n->next; + n->pprev = &h->first; + hlist_bl_set_first(h, n); +} +static inline __attribute__((always_inline)) void __hlist_bl_del(struct hlist_bl_node *n) +{ + struct hlist_bl_node *next = n->next; + struct hlist_bl_node **pprev = n->pprev; + ; + *pprev = (struct hlist_bl_node *) + ((unsigned long)next | + ((unsigned long)*pprev & 1UL)); + if (__builtin_constant_p(((next))) ? !!((next)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/list_bl.h", .line = 99, }; ______r = !!((next)); ______f.miss_hit[______r]++; ______r; })) + next->pprev = pprev; +} +static inline __attribute__((always_inline)) void hlist_bl_del(struct hlist_bl_node *n) +{ + __hlist_bl_del(n); + n->next = ((void *) 0x00100100 + (0x0UL)); + n->pprev = ((void *) 0x00200200 + (0x0UL)); +} +static inline __attribute__((always_inline)) void hlist_bl_del_init(struct hlist_bl_node *n) +{ + if (__builtin_constant_p(((!hlist_bl_unhashed(n)))) ? !!((!hlist_bl_unhashed(n))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/list_bl.h", .line = 112, }; ______r = !!((!hlist_bl_unhashed(n))); ______f.miss_hit[______r]++; ______r; })) { + __hlist_bl_del(n); + INIT_HLIST_BL_NODE(n); + } +} +static inline __attribute__((always_inline)) void hlist_bl_lock(struct hlist_bl_head *b) +{ + bit_spin_lock(0, (unsigned long *)b); +} +static inline __attribute__((always_inline)) void hlist_bl_unlock(struct hlist_bl_head *b) +{ + __bit_spin_unlock(0, (unsigned long *)b); +} +static inline __attribute__((always_inline)) void hlist_bl_set_first_rcu(struct hlist_bl_head *h, + struct hlist_bl_node *n) +{ + ; + ; + ({ if (__builtin_constant_p(((!__builtin_constant_p(((struct hlist_bl_node *)((unsigned long)n | 1UL))) || ((((struct hlist_bl_node *)((unsigned long)n | 1UL))) != ((void *)0))))) ? !!((!__builtin_constant_p(((struct hlist_bl_node *)((unsigned long)n | 1UL))) || ((((struct hlist_bl_node *)((unsigned long)n | 1UL))) != ((void *)0)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/linux/rculist_bl.h" + , .line = + 17 + , }; ______r = !!((!__builtin_constant_p(((struct hlist_bl_node *)((unsigned long)n | 1UL))) || ((((struct hlist_bl_node *)((unsigned long)n | 1UL))) != ((void *)0)))); ______f.miss_hit[______r]++; ______r; })) __asm__ __volatile__("": : :"memory"); ((h->first)) = (typeof(*((struct hlist_bl_node *)((unsigned long)n | 1UL))) *)(((struct hlist_bl_node *)((unsigned long)n | 1UL))); }) + ; +} +static inline __attribute__((always_inline)) struct hlist_bl_node *hlist_bl_first_rcu(struct hlist_bl_head *h) +{ + return (struct hlist_bl_node *) + ((unsigned long)({ typeof(*(h->first)) *_________p1 = (typeof(*(h->first))* )(*(volatile typeof((h->first)) *)&((h->first))); do { } while (0); ; do { } while (0); ((typeof(*(h->first)) *)(_________p1)); }) & ~1UL); +} +static inline __attribute__((always_inline)) void hlist_bl_del_init_rcu(struct hlist_bl_node *n) +{ + if (__builtin_constant_p(((!hlist_bl_unhashed(n)))) ? !!((!hlist_bl_unhashed(n))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rculist_bl.h", .line = 48, }; ______r = !!((!hlist_bl_unhashed(n))); ______f.miss_hit[______r]++; ______r; })) { + __hlist_bl_del(n); + n->pprev = ((void *)0); + } +} +static inline __attribute__((always_inline)) void hlist_bl_del_rcu(struct hlist_bl_node *n) +{ + __hlist_bl_del(n); + n->pprev = ((void *) 0x00200200 + (0x0UL)); +} +static inline __attribute__((always_inline)) void hlist_bl_add_head_rcu(struct hlist_bl_node *n, + struct hlist_bl_head *h) +{ + struct hlist_bl_node *first; + first = hlist_bl_first(h); + n->next = first; + if (__builtin_constant_p(((first))) ? !!((first)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/rculist_bl.h", .line = 107, }; ______r = !!((first)); ______f.miss_hit[______r]++; ______r; })) + first->pprev = &n->next; + n->pprev = &h->first; + hlist_bl_set_first_rcu(h, n); +} +struct nameidata; +struct path; +struct vfsmount; +struct qstr { + unsigned int hash; + unsigned int len; + const unsigned char *name; +}; +struct dentry_stat_t { + int nr_dentry; + int nr_unused; + int age_limit; + int want_pages; + int dummy[2]; +}; +extern struct dentry_stat_t dentry_stat; +static inline __attribute__((always_inline)) int dentry_cmp(const unsigned char *cs, size_t scount, + const unsigned char *ct, size_t tcount) +{ + int ret; + if (__builtin_constant_p(((scount != tcount))) ? !!((scount != tcount)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/dcache.h", .line = 58, }; ______r = !!((scount != tcount)); ______f.miss_hit[______r]++; ______r; })) + return 1; + do { + ret = (*cs != *ct); + if (__builtin_constant_p(((ret))) ? !!((ret)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/dcache.h", .line = 62, }; ______r = !!((ret)); ______f.miss_hit[______r]++; ______r; })) + break; + cs++; + ct++; + tcount--; + } while (tcount); + return ret; +} +static inline __attribute__((always_inline)) unsigned long +partial_name_hash(unsigned long c, unsigned long prevhash) +{ + return (prevhash + (c << 4) + (c >> 4)) * 11; +} +static inline __attribute__((always_inline)) unsigned long end_name_hash(unsigned long hash) +{ + return (unsigned int) hash; +} +static inline __attribute__((always_inline)) unsigned int +full_name_hash(const unsigned char *name, unsigned int len) +{ + unsigned long hash = 0; + while (len--) + hash = partial_name_hash(*name++, hash); + return end_name_hash(hash); +} +struct dentry { + unsigned int d_flags; + seqcount_t d_seq; + struct hlist_bl_node d_hash; + struct dentry *d_parent; + struct qstr d_name; + struct inode *d_inode; + unsigned char d_iname[36]; + unsigned int d_count; + spinlock_t d_lock; + const struct dentry_operations *d_op; + struct super_block *d_sb; + unsigned long d_time; + void *d_fsdata; + struct list_head d_lru; + union { + struct list_head d_child; + struct rcu_head d_rcu; + } d_u; + struct list_head d_subdirs; + struct list_head d_alias; +}; +enum dentry_d_lock_class +{ + DENTRY_D_LOCK_NORMAL, + DENTRY_D_LOCK_NESTED +}; +struct dentry_operations { + int (*d_revalidate)(struct dentry *, struct nameidata *); + int (*d_hash)(const struct dentry *, const struct inode *, + struct qstr *); + int (*d_compare)(const struct dentry *, const struct inode *, + const struct dentry *, const struct inode *, + unsigned int, const char *, const struct qstr *); + int (*d_delete)(const struct dentry *); + void (*d_release)(struct dentry *); + void (*d_iput)(struct dentry *, struct inode *); + char *(*d_dname)(struct dentry *, char *, int); + struct vfsmount *(*d_automount)(struct path *); + int (*d_manage)(struct dentry *, bool); +} __attribute__((__aligned__((1 << (6))))); +extern seqlock_t rename_lock; +static inline __attribute__((always_inline)) int dname_external(struct dentry *dentry) +{ + return dentry->d_name.name != dentry->d_iname; +} +extern void d_instantiate(struct dentry *, struct inode *); +extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *); +extern struct dentry * d_materialise_unique(struct dentry *, struct inode *); +extern void __d_drop(struct dentry *dentry); +extern void d_drop(struct dentry *dentry); +extern void d_delete(struct dentry *); +extern void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op); +extern struct dentry * d_alloc(struct dentry *, const struct qstr *); +extern struct dentry * d_alloc_pseudo(struct super_block *, const struct qstr *); +extern struct dentry * d_splice_alias(struct inode *, struct dentry *); +extern struct dentry * d_add_ci(struct dentry *, struct inode *, struct qstr *); +extern struct dentry * d_obtain_alias(struct inode *); +extern void shrink_dcache_sb(struct super_block *); +extern void shrink_dcache_parent(struct dentry *); +extern void shrink_dcache_for_umount(struct super_block *); +extern int d_invalidate(struct dentry *); +extern struct dentry * d_alloc_root(struct inode *); +extern void d_genocide(struct dentry *); +extern struct dentry *d_find_alias(struct inode *); +extern void d_prune_aliases(struct inode *); +extern int have_submounts(struct dentry *); +extern void d_rehash(struct dentry *); +static inline __attribute__((always_inline)) void d_add(struct dentry *entry, struct inode *inode) +{ + d_instantiate(entry, inode); + d_rehash(entry); +} +static inline __attribute__((always_inline)) struct dentry *d_add_unique(struct dentry *entry, struct inode *inode) +{ + struct dentry *res; + res = d_instantiate_unique(entry, inode); + d_rehash(res != ((void *)0) ? res : entry); + return res; +} +extern void dentry_update_name_case(struct dentry *, struct qstr *); +extern void d_move(struct dentry *, struct dentry *); +extern struct dentry *d_ancestor(struct dentry *, struct dentry *); +extern struct dentry *d_lookup(struct dentry *, struct qstr *); +extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *); +extern struct dentry *__d_lookup(struct dentry *, struct qstr *); +extern struct dentry *__d_lookup_rcu(struct dentry *parent, struct qstr *name, + unsigned *seq, struct inode **inode); +static inline __attribute__((always_inline)) int __d_rcu_to_refcount(struct dentry *dentry, unsigned seq) +{ + int ret = 0; + assert_spin_locked(&dentry->d_lock); + if (__builtin_constant_p(((!read_seqcount_retry(&dentry->d_seq, seq)))) ? !!((!read_seqcount_retry(&dentry->d_seq, seq))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/dcache.h", .line = 327, }; ______r = !!((!read_seqcount_retry(&dentry->d_seq, seq))); ______f.miss_hit[______r]++; ______r; })) { + ret = 1; + dentry->d_count++; + } + return ret; +} +extern int d_validate(struct dentry *, struct dentry *); +extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...); +extern char *__d_path(const struct path *path, struct path *root, char *, int); +extern char *d_path(const struct path *, char *, int); +extern char *d_path_with_unreachable(const struct path *, char *, int); +extern char *dentry_path_raw(struct dentry *, char *, int); +extern char *dentry_path(struct dentry *, char *, int); +static inline __attribute__((always_inline)) struct dentry *dget_dlock(struct dentry *dentry) +{ + if (__builtin_constant_p(((dentry))) ? !!((dentry)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/dcache.h", .line = 361, }; ______r = !!((dentry)); ______f.miss_hit[______r]++; ______r; })) + dentry->d_count++; + return dentry; +} +static inline __attribute__((always_inline)) struct dentry *dget(struct dentry *dentry) +{ + if (__builtin_constant_p(((dentry))) ? !!((dentry)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/dcache.h", .line = 368, }; ______r = !!((dentry)); ______f.miss_hit[______r]++; ______r; })) { + spin_lock(&dentry->d_lock); + dget_dlock(dentry); + spin_unlock(&dentry->d_lock); + } + return dentry; +} +extern struct dentry *dget_parent(struct dentry *dentry); +static inline __attribute__((always_inline)) int d_unhashed(struct dentry *dentry) +{ + return hlist_bl_unhashed(&dentry->d_hash); +} +static inline __attribute__((always_inline)) int d_unlinked(struct dentry *dentry) +{ + return d_unhashed(dentry) && !((dentry) == (dentry)->d_parent); +} +static inline __attribute__((always_inline)) int cant_mount(struct dentry *dentry) +{ + return (dentry->d_flags & 0x0100); +} +static inline __attribute__((always_inline)) void dont_mount(struct dentry *dentry) +{ + spin_lock(&dentry->d_lock); + dentry->d_flags |= 0x0100; + spin_unlock(&dentry->d_lock); +} +extern void dput(struct dentry *); +static inline __attribute__((always_inline)) bool d_managed(struct dentry *dentry) +{ + return dentry->d_flags & (0x10000|0x20000|0x40000); +} +static inline __attribute__((always_inline)) bool d_mountpoint(struct dentry *dentry) +{ + return dentry->d_flags & 0x10000; +} +extern struct dentry *lookup_create(struct nameidata *nd, int is_dir); +extern int sysctl_vfs_cache_pressure; +struct dentry; +struct vfsmount; +struct path { + struct vfsmount *mnt; + struct dentry *dentry; +}; +extern void path_get(struct path *); +extern void path_put(struct path *); +static inline __attribute__((always_inline)) int path_equal(const struct path *path1, const struct path *path2) +{ + return path1->mnt == path2->mnt && path1->dentry == path2->dentry; +} +static inline __attribute__((always_inline)) int radix_tree_is_indirect_ptr(void *ptr) +{ + return (int)((unsigned long)ptr & 1); +} +struct radix_tree_root { + unsigned int height; + gfp_t gfp_mask; + struct radix_tree_node *rnode; +}; +static inline __attribute__((always_inline)) void *radix_tree_deref_slot(void **pslot) +{ + return ({ typeof(*(*pslot)) *_________p1 = (typeof(*(*pslot))* )(*(volatile typeof((*pslot)) *)&((*pslot))); do { } while (0); ; do { } while (0); ((typeof(*(*pslot)) *)(_________p1)); }); +} +static inline __attribute__((always_inline)) void *radix_tree_deref_slot_protected(void **pslot, + spinlock_t *treelock) +{ + return ({ do { } while (0); ; ((typeof(*(*pslot)) *)((*pslot))); }); +} +static inline __attribute__((always_inline)) int radix_tree_deref_retry(void *arg) +{ + return (__builtin_constant_p((unsigned long)arg & 1) ? !!((unsigned long)arg & 1) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/radix-tree.h", .line = 173, }; ______r = __builtin_expect(!!((unsigned long)arg & 1), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })); +} +static inline __attribute__((always_inline)) void radix_tree_replace_slot(void **pslot, void *item) +{ + do { if (__builtin_constant_p((((__builtin_constant_p(radix_tree_is_indirect_ptr(item)) ? !!(radix_tree_is_indirect_ptr(item)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/radix-tree.h", .line = 186, }; ______r = __builtin_expect(!!(radix_tree_is_indirect_ptr(item)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(radix_tree_is_indirect_ptr(item)) ? !!(radix_tree_is_indirect_ptr(item)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/radix-tree.h", .line = 186, }; ______r = __builtin_expect(!!(radix_tree_is_indirect_ptr(item)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/radix-tree.h", .line = 186, }; ______r = !!(((__builtin_constant_p(radix_tree_is_indirect_ptr(item)) ? !!(radix_tree_is_indirect_ptr(item)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/radix-tree.h", .line = 186, }; ______r = __builtin_expect(!!(radix_tree_is_indirect_ptr(item)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/radix-tree.h"), "i" (186), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); } while(0); + ({ if (__builtin_constant_p(((!__builtin_constant_p((item)) || (((item)) != ((void *)0))))) ? !!((!__builtin_constant_p((item)) || (((item)) != ((void *)0)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/radix-tree.h", .line = 187, }; ______r = !!((!__builtin_constant_p((item)) || (((item)) != ((void *)0)))); ______f.miss_hit[______r]++; ______r; })) __asm__ __volatile__("": : :"memory"); ((*pslot)) = (typeof(*(item)) *)((item)); }); +} +int radix_tree_insert(struct radix_tree_root *, unsigned long, void *); +void *radix_tree_lookup(struct radix_tree_root *, unsigned long); +void **radix_tree_lookup_slot(struct radix_tree_root *, unsigned long); +void *radix_tree_delete(struct radix_tree_root *, unsigned long); +unsigned int +radix_tree_gang_lookup(struct radix_tree_root *root, void **results, + unsigned long first_index, unsigned int max_items); +unsigned int +radix_tree_gang_lookup_slot(struct radix_tree_root *root, void ***results, + unsigned long first_index, unsigned int max_items); +unsigned long radix_tree_next_hole(struct radix_tree_root *root, + unsigned long index, unsigned long max_scan); +unsigned long radix_tree_prev_hole(struct radix_tree_root *root, + unsigned long index, unsigned long max_scan); +int radix_tree_preload(gfp_t gfp_mask); +void radix_tree_init(void); +void *radix_tree_tag_set(struct radix_tree_root *root, + unsigned long index, unsigned int tag); +void *radix_tree_tag_clear(struct radix_tree_root *root, + unsigned long index, unsigned int tag); +int radix_tree_tag_get(struct radix_tree_root *root, + unsigned long index, unsigned int tag); +unsigned int +radix_tree_gang_lookup_tag(struct radix_tree_root *root, void **results, + unsigned long first_index, unsigned int max_items, + unsigned int tag); +unsigned int +radix_tree_gang_lookup_tag_slot(struct radix_tree_root *root, void ***results, + unsigned long first_index, unsigned int max_items, + unsigned int tag); +unsigned long radix_tree_range_tag_if_tagged(struct radix_tree_root *root, + unsigned long *first_indexp, unsigned long last_index, + unsigned long nr_to_tag, + unsigned int fromtag, unsigned int totag); +int radix_tree_tagged(struct radix_tree_root *root, unsigned int tag); +static inline __attribute__((always_inline)) void radix_tree_preload_end(void) +{ + do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/radix-tree.h", .line = 228, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/radix-tree.h", .line = 228, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/radix-tree.h", .line = 228, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/radix-tree.h", .line = 228, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); +} +struct semaphore { + spinlock_t lock; + unsigned int count; + struct list_head wait_list; +}; +static inline __attribute__((always_inline)) void sema_init(struct semaphore *sem, int val) +{ + static struct lock_class_key __key; + *sem = (struct semaphore) { .lock = (spinlock_t ) { { .rlock = { .raw_lock = { 0 }, .magic = 0xdead4ead, .owner_cpu = -1, .owner = ((void *)-1L), .dep_map = { .name = "(*sem).lock" } } } }, .count = val, .wait_list = { &((*sem).wait_list), &((*sem).wait_list) }, }; + lockdep_init_map(&sem->lock.dep_map, "semaphore->lock", &__key, 0); +} +extern void down(struct semaphore *sem); +extern int __attribute__((warn_unused_result)) down_interruptible(struct semaphore *sem); +extern int __attribute__((warn_unused_result)) down_killable(struct semaphore *sem); +extern int __attribute__((warn_unused_result)) down_trylock(struct semaphore *sem); +extern int __attribute__((warn_unused_result)) down_timeout(struct semaphore *sem, long jiffies); +extern void up(struct semaphore *sem); +struct fiemap_extent { + __u64 fe_logical; + __u64 fe_physical; + __u64 fe_length; + __u64 fe_reserved64[2]; + __u32 fe_flags; + __u32 fe_reserved[3]; +}; +struct fiemap { + __u64 fm_start; + __u64 fm_length; + __u32 fm_flags; + __u32 fm_mapped_extents; + __u32 fm_extent_count; + __u32 fm_reserved; + struct fiemap_extent fm_extents[0]; +}; +struct export_operations; +struct hd_geometry; +struct iovec; +struct nameidata; +struct kiocb; +struct kobject; +struct pipe_inode_info; +struct poll_table_struct; +struct kstatfs; +struct vm_area_struct; +struct vfsmount; +struct cred; +extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) inode_init(void); +extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) inode_init_early(void); +extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) files_init(unsigned long); +extern struct files_stat_struct files_stat; +extern unsigned long get_max_files(void); +extern int sysctl_nr_open; +extern struct inodes_stat_t inodes_stat; +extern int leases_enable, lease_break_time; +struct buffer_head; +typedef int (get_block_t)(struct inode *inode, sector_t iblock, + struct buffer_head *bh_result, int create); +typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, + ssize_t bytes, void *private, int ret, + bool is_async); +struct iattr { + unsigned int ia_valid; + umode_t ia_mode; + uid_t ia_uid; + gid_t ia_gid; + loff_t ia_size; + struct timespec ia_atime; + struct timespec ia_mtime; + struct timespec ia_ctime; + struct file *ia_file; +}; +enum { + QIF_BLIMITS_B = 0, + QIF_SPACE_B, + QIF_ILIMITS_B, + QIF_INODES_B, + QIF_BTIME_B, + QIF_ITIME_B, +}; +struct if_dqblk { + __u64 dqb_bhardlimit; + __u64 dqb_bsoftlimit; + __u64 dqb_curspace; + __u64 dqb_ihardlimit; + __u64 dqb_isoftlimit; + __u64 dqb_curinodes; + __u64 dqb_btime; + __u64 dqb_itime; + __u32 dqb_valid; +}; +struct if_dqinfo { + __u64 dqi_bgrace; + __u64 dqi_igrace; + __u32 dqi_flags; + __u32 dqi_valid; +}; +enum { + QUOTA_NL_C_UNSPEC, + QUOTA_NL_C_WARNING, + __QUOTA_NL_C_MAX, +}; +enum { + QUOTA_NL_A_UNSPEC, + QUOTA_NL_A_QTYPE, + QUOTA_NL_A_EXCESS_ID, + QUOTA_NL_A_WARNING, + QUOTA_NL_A_DEV_MAJOR, + QUOTA_NL_A_DEV_MINOR, + QUOTA_NL_A_CAUSED_ID, + __QUOTA_NL_A_MAX, +}; +typedef struct fs_disk_quota { + __s8 d_version; + __s8 d_flags; + __u16 d_fieldmask; + __u32 d_id; + __u64 d_blk_hardlimit; + __u64 d_blk_softlimit; + __u64 d_ino_hardlimit; + __u64 d_ino_softlimit; + __u64 d_bcount; + __u64 d_icount; + __s32 d_itimer; + __s32 d_btimer; + __u16 d_iwarns; + __u16 d_bwarns; + __s32 d_padding2; + __u64 d_rtb_hardlimit; + __u64 d_rtb_softlimit; + __u64 d_rtbcount; + __s32 d_rtbtimer; + __u16 d_rtbwarns; + __s16 d_padding3; + char d_padding4[8]; +} fs_disk_quota_t; +typedef struct fs_qfilestat { + __u64 qfs_ino; + __u64 qfs_nblks; + __u32 qfs_nextents; +} fs_qfilestat_t; +typedef struct fs_quota_stat { + __s8 qs_version; + __u16 qs_flags; + __s8 qs_pad; + fs_qfilestat_t qs_uquota; + fs_qfilestat_t qs_gquota; + __u32 qs_incoredqs; + __s32 qs_btimelimit; + __s32 qs_itimelimit; + __s32 qs_rtbtimelimit; + __u16 qs_bwarnlimit; + __u16 qs_iwarnlimit; +} fs_quota_stat_t; +struct dquot; +struct qtree_fmt_operations { + void (*mem2disk_dqblk)(void *disk, struct dquot *dquot); + void (*disk2mem_dqblk)(struct dquot *dquot, void *disk); + int (*is_id)(void *disk, struct dquot *dquot); +}; +struct qtree_mem_dqinfo { + struct super_block *dqi_sb; + int dqi_type; + unsigned int dqi_blocks; + unsigned int dqi_free_blk; + unsigned int dqi_free_entry; + unsigned int dqi_blocksize_bits; + unsigned int dqi_entry_size; + unsigned int dqi_usable_bs; + unsigned int dqi_qtree_depth; + struct qtree_fmt_operations *dqi_ops; +}; +int qtree_write_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot); +int qtree_read_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot); +int qtree_delete_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot); +int qtree_release_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot); +int qtree_entry_unused(struct qtree_mem_dqinfo *info, char *disk); +static inline __attribute__((always_inline)) int qtree_depth(struct qtree_mem_dqinfo *info) +{ + unsigned int epb = info->dqi_usable_bs >> 2; + unsigned long long entries = epb; + int i; + for (i = 1; entries < (1ULL << 32); i++) + entries *= epb; + return i; +} +typedef __kernel_uid32_t qid_t; +typedef long long qsize_t; +extern spinlock_t dq_data_lock; +struct mem_dqblk { + qsize_t dqb_bhardlimit; + qsize_t dqb_bsoftlimit; + qsize_t dqb_curspace; + qsize_t dqb_rsvspace; + qsize_t dqb_ihardlimit; + qsize_t dqb_isoftlimit; + qsize_t dqb_curinodes; + time_t dqb_btime; + time_t dqb_itime; +}; +struct quota_format_type; +struct mem_dqinfo { + struct quota_format_type *dqi_format; + int dqi_fmt_id; + struct list_head dqi_dirty_list; + unsigned long dqi_flags; + unsigned int dqi_bgrace; + unsigned int dqi_igrace; + qsize_t dqi_maxblimit; + qsize_t dqi_maxilimit; + void *dqi_priv; +}; +struct super_block; +extern void mark_info_dirty(struct super_block *sb, int type); +static inline __attribute__((always_inline)) int info_dirty(struct mem_dqinfo *info) +{ + return (__builtin_constant_p((16)) ? constant_test_bit((16), (&info->dqi_flags)) : variable_test_bit((16), (&info->dqi_flags))); +} +enum { + DQST_LOOKUPS, + DQST_DROPS, + DQST_READS, + DQST_WRITES, + DQST_CACHE_HITS, + DQST_ALLOC_DQUOTS, + DQST_FREE_DQUOTS, + DQST_SYNCS, + _DQST_DQSTAT_LAST +}; +struct dqstats { + int stat[_DQST_DQSTAT_LAST]; + struct percpu_counter counter[_DQST_DQSTAT_LAST]; +}; +extern struct dqstats *dqstats_pcpu; +extern struct dqstats dqstats; +static inline __attribute__((always_inline)) void dqstats_inc(unsigned int type) +{ + percpu_counter_inc(&dqstats.counter[type]); +} +static inline __attribute__((always_inline)) void dqstats_dec(unsigned int type) +{ + percpu_counter_dec(&dqstats.counter[type]); +} +struct dquot { + struct hlist_node dq_hash; + struct list_head dq_inuse; + struct list_head dq_free; + struct list_head dq_dirty; + struct mutex dq_lock; + atomic_t dq_count; + wait_queue_head_t dq_wait_unused; + struct super_block *dq_sb; + unsigned int dq_id; + loff_t dq_off; + unsigned long dq_flags; + short dq_type; + struct mem_dqblk dq_dqb; +}; +struct quota_format_ops { + int (*check_quota_file)(struct super_block *sb, int type); + int (*read_file_info)(struct super_block *sb, int type); + int (*write_file_info)(struct super_block *sb, int type); + int (*free_file_info)(struct super_block *sb, int type); + int (*read_dqblk)(struct dquot *dquot); + int (*commit_dqblk)(struct dquot *dquot); + int (*release_dqblk)(struct dquot *dquot); +}; +struct dquot_operations { + int (*write_dquot) (struct dquot *); + struct dquot *(*alloc_dquot)(struct super_block *, int); + void (*destroy_dquot)(struct dquot *); + int (*acquire_dquot) (struct dquot *); + int (*release_dquot) (struct dquot *); + int (*mark_dirty) (struct dquot *); + int (*write_info) (struct super_block *, int); + qsize_t *(*get_reserved_space) (struct inode *); +}; +struct path; +struct quotactl_ops { + int (*quota_on)(struct super_block *, int, int, struct path *); + int (*quota_on_meta)(struct super_block *, int, int); + int (*quota_off)(struct super_block *, int); + int (*quota_sync)(struct super_block *, int, int); + int (*get_info)(struct super_block *, int, struct if_dqinfo *); + int (*set_info)(struct super_block *, int, struct if_dqinfo *); + int (*get_dqblk)(struct super_block *, int, qid_t, struct fs_disk_quota *); + int (*set_dqblk)(struct super_block *, int, qid_t, struct fs_disk_quota *); + int (*get_xstate)(struct super_block *, struct fs_quota_stat *); + int (*set_xstate)(struct super_block *, unsigned int, int); +}; +struct quota_format_type { + int qf_fmt_id; + const struct quota_format_ops *qf_ops; + struct module *qf_owner; + struct quota_format_type *qf_next; +}; +enum { + _DQUOT_USAGE_ENABLED = 0, + _DQUOT_LIMITS_ENABLED, + _DQUOT_SUSPENDED, + _DQUOT_STATE_FLAGS +}; +static inline __attribute__((always_inline)) unsigned int dquot_state_flag(unsigned int flags, int type) +{ + return flags << _DQUOT_STATE_FLAGS * type; +} +static inline __attribute__((always_inline)) unsigned int dquot_generic_flag(unsigned int flags, int type) +{ + return (flags >> _DQUOT_STATE_FLAGS * type) & ((1 << _DQUOT_USAGE_ENABLED) | (1 << _DQUOT_LIMITS_ENABLED) | (1 << _DQUOT_SUSPENDED)); +} +static inline __attribute__((always_inline)) void quota_send_warning(short type, unsigned int id, dev_t dev, + const char warntype) +{ + return; +} +struct quota_info { + unsigned int flags; + struct mutex dqio_mutex; + struct mutex dqonoff_mutex; + struct rw_semaphore dqptr_sem; + struct inode *files[2]; + struct mem_dqinfo info[2]; + const struct quota_format_ops *ops[2]; +}; +int register_quota_format(struct quota_format_type *fmt); +void unregister_quota_format(struct quota_format_type *fmt); +struct quota_module_name { + int qm_fmt_id; + char *qm_mod_name; +}; +enum positive_aop_returns { + AOP_WRITEPAGE_ACTIVATE = 0x80000, + AOP_TRUNCATED_PAGE = 0x80001, +}; +struct page; +struct address_space; +struct writeback_control; +struct iov_iter { + const struct iovec *iov; + unsigned long nr_segs; + size_t iov_offset; + size_t count; +}; +size_t iov_iter_copy_from_user_atomic(struct page *page, + struct iov_iter *i, unsigned long offset, size_t bytes); +size_t iov_iter_copy_from_user(struct page *page, + struct iov_iter *i, unsigned long offset, size_t bytes); +void iov_iter_advance(struct iov_iter *i, size_t bytes); +int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes); +size_t iov_iter_single_seg_count(struct iov_iter *i); +static inline __attribute__((always_inline)) void iov_iter_init(struct iov_iter *i, + const struct iovec *iov, unsigned long nr_segs, + size_t count, size_t written) +{ + i->iov = iov; + i->nr_segs = nr_segs; + i->iov_offset = 0; + i->count = count + written; + iov_iter_advance(i, written); +} +static inline __attribute__((always_inline)) size_t iov_iter_count(struct iov_iter *i) +{ + return i->count; +} +typedef struct { + size_t written; + size_t count; + union { + char *buf; + void *data; + } arg; + int error; +} read_descriptor_t; +typedef int (*read_actor_t)(read_descriptor_t *, struct page *, + unsigned long, unsigned long); +struct address_space_operations { + int (*writepage)(struct page *page, struct writeback_control *wbc); + int (*readpage)(struct file *, struct page *); + int (*writepages)(struct address_space *, struct writeback_control *); + int (*set_page_dirty)(struct page *page); + int (*readpages)(struct file *filp, struct address_space *mapping, + struct list_head *pages, unsigned nr_pages); + int (*write_begin)(struct file *, struct address_space *mapping, + loff_t pos, unsigned len, unsigned flags, + struct page **pagep, void **fsdata); + int (*write_end)(struct file *, struct address_space *mapping, + loff_t pos, unsigned len, unsigned copied, + struct page *page, void *fsdata); + sector_t (*bmap)(struct address_space *, sector_t); + void (*invalidatepage) (struct page *, unsigned long); + int (*releasepage) (struct page *, gfp_t); + void (*freepage)(struct page *); + ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, + loff_t offset, unsigned long nr_segs); + int (*get_xip_mem)(struct address_space *, unsigned long, int, + void **, unsigned long *); + int (*migratepage) (struct address_space *, + struct page *, struct page *); + int (*launder_page) (struct page *); + int (*is_partially_uptodate) (struct page *, read_descriptor_t *, + unsigned long); + int (*error_remove_page)(struct address_space *, struct page *); +}; +extern const struct address_space_operations empty_aops; +int pagecache_write_begin(struct file *, struct address_space *mapping, + loff_t pos, unsigned len, unsigned flags, + struct page **pagep, void **fsdata); +int pagecache_write_end(struct file *, struct address_space *mapping, + loff_t pos, unsigned len, unsigned copied, + struct page *page, void *fsdata); +struct backing_dev_info; +struct address_space { + struct inode *host; + struct radix_tree_root page_tree; + spinlock_t tree_lock; + unsigned int i_mmap_writable; + struct prio_tree_root i_mmap; + struct list_head i_mmap_nonlinear; + struct mutex i_mmap_mutex; + unsigned long nrpages; + unsigned long writeback_index; + const struct address_space_operations *a_ops; + unsigned long flags; + struct backing_dev_info *backing_dev_info; + spinlock_t private_lock; + struct list_head private_list; + struct address_space *assoc_mapping; +} __attribute__((aligned(sizeof(long)))); +struct block_device { + dev_t bd_dev; + int bd_openers; + struct inode * bd_inode; + struct super_block * bd_super; + struct mutex bd_mutex; + struct list_head bd_inodes; + void * bd_claiming; + void * bd_holder; + int bd_holders; + bool bd_write_holder; + struct list_head bd_holder_disks; + struct block_device * bd_contains; + unsigned bd_block_size; + struct hd_struct * bd_part; + unsigned bd_part_count; + int bd_invalidated; + struct gendisk * bd_disk; + struct list_head bd_list; + unsigned long bd_private; + int bd_fsfreeze_count; + struct mutex bd_fsfreeze_mutex; +}; +int mapping_tagged(struct address_space *mapping, int tag); +static inline __attribute__((always_inline)) int mapping_mapped(struct address_space *mapping) +{ + return !prio_tree_empty(&mapping->i_mmap) || + !list_empty(&mapping->i_mmap_nonlinear); +} +static inline __attribute__((always_inline)) int mapping_writably_mapped(struct address_space *mapping) +{ + return mapping->i_mmap_writable != 0; +} +struct posix_acl; +struct inode { + umode_t i_mode; + uid_t i_uid; + gid_t i_gid; + const struct inode_operations *i_op; + struct super_block *i_sb; + spinlock_t i_lock; + unsigned int i_flags; + unsigned long i_state; + void *i_security; + struct mutex i_mutex; + unsigned long dirtied_when; + struct hlist_node i_hash; + struct list_head i_wb_list; + struct list_head i_lru; + struct list_head i_sb_list; + union { + struct list_head i_dentry; + struct rcu_head i_rcu; + }; + unsigned long i_ino; + atomic_t i_count; + unsigned int i_nlink; + dev_t i_rdev; + unsigned int i_blkbits; + u64 i_version; + loff_t i_size; + seqcount_t i_size_seqcount; + struct timespec i_atime; + struct timespec i_mtime; + struct timespec i_ctime; + blkcnt_t i_blocks; + unsigned short i_bytes; + struct rw_semaphore i_alloc_sem; + const struct file_operations *i_fop; + struct file_lock *i_flock; + struct address_space *i_mapping; + struct address_space i_data; + struct dquot *i_dquot[2]; + struct list_head i_devices; + union { + struct pipe_inode_info *i_pipe; + struct block_device *i_bdev; + struct cdev *i_cdev; + }; + __u32 i_generation; + __u32 i_fsnotify_mask; + struct hlist_head i_fsnotify_marks; + atomic_t i_writecount; + struct posix_acl *i_acl; + struct posix_acl *i_default_acl; + void *i_private; +}; +static inline __attribute__((always_inline)) int inode_unhashed(struct inode *inode) +{ + return hlist_unhashed(&inode->i_hash); +} +enum inode_i_mutex_lock_class +{ + I_MUTEX_NORMAL, + I_MUTEX_PARENT, + I_MUTEX_CHILD, + I_MUTEX_XATTR, + I_MUTEX_QUOTA +}; +static inline __attribute__((always_inline)) loff_t i_size_read(const struct inode *inode) +{ + loff_t i_size; + unsigned int seq; + do { + seq = read_seqcount_begin(&inode->i_size_seqcount); + i_size = inode->i_size; + } while (read_seqcount_retry(&inode->i_size_seqcount, seq)); + return i_size; +} +static inline __attribute__((always_inline)) void i_size_write(struct inode *inode, loff_t i_size) +{ + write_seqcount_begin(&inode->i_size_seqcount); + inode->i_size = i_size; + write_seqcount_end(&inode->i_size_seqcount); +} +static inline __attribute__((always_inline)) unsigned iminor(const struct inode *inode) +{ + return ((unsigned int) ((inode->i_rdev) & ((1U << 20) - 1))); +} +static inline __attribute__((always_inline)) unsigned imajor(const struct inode *inode) +{ + return ((unsigned int) ((inode->i_rdev) >> 20)); +} +extern struct block_device *I_BDEV(struct inode *inode); +struct fown_struct { + rwlock_t lock; + struct pid *pid; + enum pid_type pid_type; + uid_t uid, euid; + int signum; +}; +struct file_ra_state { + unsigned long start; + unsigned int size; + unsigned int async_size; + unsigned int ra_pages; + unsigned int mmap_miss; + loff_t prev_pos; +}; +static inline __attribute__((always_inline)) int ra_has_index(struct file_ra_state *ra, unsigned long index) +{ + return (index >= ra->start && + index < ra->start + ra->size); +} +struct file { + union { + struct list_head fu_list; + struct rcu_head fu_rcuhead; + } f_u; + struct path f_path; + const struct file_operations *f_op; + spinlock_t f_lock; + int f_sb_list_cpu; + atomic_long_t f_count; + unsigned int f_flags; + fmode_t f_mode; + loff_t f_pos; + struct fown_struct f_owner; + const struct cred *f_cred; + struct file_ra_state f_ra; + u64 f_version; + void *f_security; + void *private_data; + struct list_head f_ep_links; + struct address_space *f_mapping; +}; +struct file_handle { + __u32 handle_bytes; + int handle_type; + unsigned char f_handle[0]; +}; +static inline __attribute__((always_inline)) void file_take_write(struct file *filp) {} +static inline __attribute__((always_inline)) void file_release_write(struct file *filp) {} +static inline __attribute__((always_inline)) void file_reset_write(struct file *filp) {} +static inline __attribute__((always_inline)) void file_check_state(struct file *filp) {} +static inline __attribute__((always_inline)) int file_check_writeable(struct file *filp) +{ + return 0; +} +typedef struct files_struct *fl_owner_t; +struct file_lock_operations { + void (*fl_copy_lock)(struct file_lock *, struct file_lock *); + void (*fl_release_private)(struct file_lock *); +}; +struct lock_manager_operations { + int (*fl_compare_owner)(struct file_lock *, struct file_lock *); + void (*fl_notify)(struct file_lock *); + int (*fl_grant)(struct file_lock *, struct file_lock *, int); + void (*fl_release_private)(struct file_lock *); + void (*fl_break)(struct file_lock *); + int (*fl_change)(struct file_lock **, int); +}; +struct lock_manager { + struct list_head list; +}; +void locks_start_grace(struct lock_manager *); +void locks_end_grace(struct lock_manager *); +int locks_in_grace(void); + enum nfs_stat { + NFS_OK = 0, + NFSERR_PERM = 1, + NFSERR_NOENT = 2, + NFSERR_IO = 5, + NFSERR_NXIO = 6, + NFSERR_EAGAIN = 11, + NFSERR_ACCES = 13, + NFSERR_EXIST = 17, + NFSERR_XDEV = 18, + NFSERR_NODEV = 19, + NFSERR_NOTDIR = 20, + NFSERR_ISDIR = 21, + NFSERR_INVAL = 22, + NFSERR_FBIG = 27, + NFSERR_NOSPC = 28, + NFSERR_ROFS = 30, + NFSERR_MLINK = 31, + NFSERR_OPNOTSUPP = 45, + NFSERR_NAMETOOLONG = 63, + NFSERR_NOTEMPTY = 66, + NFSERR_DQUOT = 69, + NFSERR_STALE = 70, + NFSERR_REMOTE = 71, + NFSERR_WFLUSH = 99, + NFSERR_BADHANDLE = 10001, + NFSERR_NOT_SYNC = 10002, + NFSERR_BAD_COOKIE = 10003, + NFSERR_NOTSUPP = 10004, + NFSERR_TOOSMALL = 10005, + NFSERR_SERVERFAULT = 10006, + NFSERR_BADTYPE = 10007, + NFSERR_JUKEBOX = 10008, + NFSERR_SAME = 10009, + NFSERR_DENIED = 10010, + NFSERR_EXPIRED = 10011, + NFSERR_LOCKED = 10012, + NFSERR_GRACE = 10013, + NFSERR_FHEXPIRED = 10014, + NFSERR_SHARE_DENIED = 10015, + NFSERR_WRONGSEC = 10016, + NFSERR_CLID_INUSE = 10017, + NFSERR_RESOURCE = 10018, + NFSERR_MOVED = 10019, + NFSERR_NOFILEHANDLE = 10020, + NFSERR_MINOR_VERS_MISMATCH = 10021, + NFSERR_STALE_CLIENTID = 10022, + NFSERR_STALE_STATEID = 10023, + NFSERR_OLD_STATEID = 10024, + NFSERR_BAD_STATEID = 10025, + NFSERR_BAD_SEQID = 10026, + NFSERR_NOT_SAME = 10027, + NFSERR_LOCK_RANGE = 10028, + NFSERR_SYMLINK = 10029, + NFSERR_RESTOREFH = 10030, + NFSERR_LEASE_MOVED = 10031, + NFSERR_ATTRNOTSUPP = 10032, + NFSERR_NO_GRACE = 10033, + NFSERR_RECLAIM_BAD = 10034, + NFSERR_RECLAIM_CONFLICT = 10035, + NFSERR_BAD_XDR = 10036, + NFSERR_LOCKS_HELD = 10037, + NFSERR_OPENMODE = 10038, + NFSERR_BADOWNER = 10039, + NFSERR_BADCHAR = 10040, + NFSERR_BADNAME = 10041, + NFSERR_BAD_RANGE = 10042, + NFSERR_LOCK_NOTSUPP = 10043, + NFSERR_OP_ILLEGAL = 10044, + NFSERR_DEADLOCK = 10045, + NFSERR_FILE_OPEN = 10046, + NFSERR_ADMIN_REVOKED = 10047, + NFSERR_CB_PATH_DOWN = 10048, +}; +enum nfs_ftype { + NFNON = 0, + NFREG = 1, + NFDIR = 2, + NFBLK = 3, + NFCHR = 4, + NFLNK = 5, + NFSOCK = 6, + NFBAD = 7, + NFFIFO = 8 +}; +typedef u32 rpc_authflavor_t; +enum rpc_auth_flavors { + RPC_AUTH_NULL = 0, + RPC_AUTH_UNIX = 1, + RPC_AUTH_SHORT = 2, + RPC_AUTH_DES = 3, + RPC_AUTH_KRB = 4, + RPC_AUTH_GSS = 6, + RPC_AUTH_MAXFLAVOR = 8, + RPC_AUTH_GSS_KRB5 = 390003, + RPC_AUTH_GSS_KRB5I = 390004, + RPC_AUTH_GSS_KRB5P = 390005, + RPC_AUTH_GSS_LKEY = 390006, + RPC_AUTH_GSS_LKEYI = 390007, + RPC_AUTH_GSS_LKEYP = 390008, + RPC_AUTH_GSS_SPKM = 390009, + RPC_AUTH_GSS_SPKMI = 390010, + RPC_AUTH_GSS_SPKMP = 390011, +}; +enum rpc_msg_type { + RPC_CALL = 0, + RPC_REPLY = 1 +}; +enum rpc_reply_stat { + RPC_MSG_ACCEPTED = 0, + RPC_MSG_DENIED = 1 +}; +enum rpc_accept_stat { + RPC_SUCCESS = 0, + RPC_PROG_UNAVAIL = 1, + RPC_PROG_MISMATCH = 2, + RPC_PROC_UNAVAIL = 3, + RPC_GARBAGE_ARGS = 4, + RPC_SYSTEM_ERR = 5, + RPC_DROP_REPLY = 60000, +}; +enum rpc_reject_stat { + RPC_MISMATCH = 0, + RPC_AUTH_ERROR = 1 +}; +enum rpc_auth_stat { + RPC_AUTH_OK = 0, + RPC_AUTH_BADCRED = 1, + RPC_AUTH_REJECTEDCRED = 2, + RPC_AUTH_BADVERF = 3, + RPC_AUTH_REJECTEDVERF = 4, + RPC_AUTH_TOOWEAK = 5, + RPCSEC_GSS_CREDPROBLEM = 13, + RPCSEC_GSS_CTXPROBLEM = 14 +}; +typedef __be32 rpc_fraghdr; +extern __be32 in_aton(const char *str); +extern int in4_pton(const char *src, int srclen, u8 *dst, int delim, const char **end); +extern int in6_pton(const char *src, int srclen, u8 *dst, int delim, const char **end); +struct nfs_fh { + unsigned short size; + unsigned char data[128]; +}; +static inline __attribute__((always_inline)) int nfs_compare_fh(const struct nfs_fh *a, const struct nfs_fh *b) +{ + return a->size != b->size || __builtin_memcmp(a->data, b->data, a->size) != 0; +} +static inline __attribute__((always_inline)) void nfs_copy_fh(struct nfs_fh *target, const struct nfs_fh *source) +{ + target->size = source->size; + __builtin_memcpy(target->data, source->data, source->size); +} +enum nfs3_stable_how { + NFS_UNSTABLE = 0, + NFS_DATA_SYNC = 1, + NFS_FILE_SYNC = 2 +}; +struct nlm_lockowner; +struct nfs_lock_info { + u32 state; + struct nlm_lockowner *owner; + struct list_head list; +}; +struct nfs4_lock_state; +struct nfs4_lock_info { + struct nfs4_lock_state *owner; +}; +struct file_lock { + struct file_lock *fl_next; + struct list_head fl_link; + struct list_head fl_block; + fl_owner_t fl_owner; + unsigned char fl_flags; + unsigned char fl_type; + unsigned int fl_pid; + struct pid *fl_nspid; + wait_queue_head_t fl_wait; + struct file *fl_file; + loff_t fl_start; + loff_t fl_end; + struct fasync_struct * fl_fasync; + unsigned long fl_break_time; + const struct file_lock_operations *fl_ops; + const struct lock_manager_operations *fl_lmops; + union { + struct nfs_lock_info nfs_fl; + struct nfs4_lock_info nfs4_fl; + struct { + struct list_head link; + int state; + } afs; + } fl_u; +}; +struct f_owner_ex { + int type; + __kernel_pid_t pid; +}; +struct flock { + short l_type; + short l_whence; + __kernel_off_t l_start; + __kernel_off_t l_len; + __kernel_pid_t l_pid; +}; +struct flock64 { + short l_type; + short l_whence; + __kernel_loff_t l_start; + __kernel_loff_t l_len; + __kernel_pid_t l_pid; +}; +extern void send_sigio(struct fown_struct *fown, int fd, int band); +extern int fcntl_getlk(struct file *, struct flock *); +extern int fcntl_setlk(unsigned int, struct file *, unsigned int, + struct flock *); +extern int fcntl_getlk64(struct file *, struct flock64 *); +extern int fcntl_setlk64(unsigned int, struct file *, unsigned int, + struct flock64 *); +extern int fcntl_setlease(unsigned int fd, struct file *filp, long arg); +extern int fcntl_getlease(struct file *filp); +void locks_free_lock(struct file_lock *fl); +extern void locks_init_lock(struct file_lock *); +extern struct file_lock * locks_alloc_lock(void); +extern void locks_copy_lock(struct file_lock *, struct file_lock *); +extern void __locks_copy_lock(struct file_lock *, const struct file_lock *); +extern void locks_remove_posix(struct file *, fl_owner_t); +extern void locks_remove_flock(struct file *); +extern void locks_release_private(struct file_lock *); +extern void posix_test_lock(struct file *, struct file_lock *); +extern int posix_lock_file(struct file *, struct file_lock *, struct file_lock *); +extern int posix_lock_file_wait(struct file *, struct file_lock *); +extern int posix_unblock_lock(struct file *, struct file_lock *); +extern int vfs_test_lock(struct file *, struct file_lock *); +extern int vfs_lock_file(struct file *, unsigned int, struct file_lock *, struct file_lock *); +extern int vfs_cancel_lock(struct file *filp, struct file_lock *fl); +extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl); +extern int __break_lease(struct inode *inode, unsigned int flags); +extern void lease_get_mtime(struct inode *, struct timespec *time); +extern int generic_setlease(struct file *, long, struct file_lock **); +extern int vfs_setlease(struct file *, long, struct file_lock **); +extern int lease_modify(struct file_lock **, int); +extern int lock_may_read(struct inode *, loff_t start, unsigned long count); +extern int lock_may_write(struct inode *, loff_t start, unsigned long count); +extern void lock_flocks(void); +extern void unlock_flocks(void); +struct fasync_struct { + spinlock_t fa_lock; + int magic; + int fa_fd; + struct fasync_struct *fa_next; + struct file *fa_file; + struct rcu_head fa_rcu; +}; +extern int fasync_helper(int, struct file *, int, struct fasync_struct **); +extern struct fasync_struct *fasync_insert_entry(int, struct file *, struct fasync_struct **, struct fasync_struct *); +extern int fasync_remove_entry(struct file *, struct fasync_struct **); +extern struct fasync_struct *fasync_alloc(void); +extern void fasync_free(struct fasync_struct *); +extern void kill_fasync(struct fasync_struct **, int, int); +extern int __f_setown(struct file *filp, struct pid *, enum pid_type, int force); +extern int f_setown(struct file *filp, unsigned long arg, int force); +extern void f_delown(struct file *filp); +extern pid_t f_getown(struct file *filp); +extern int send_sigurg(struct fown_struct *fown); +extern struct list_head super_blocks; +extern spinlock_t sb_lock; +struct super_block { + struct list_head s_list; + dev_t s_dev; + unsigned char s_dirt; + unsigned char s_blocksize_bits; + unsigned long s_blocksize; + loff_t s_maxbytes; + struct file_system_type *s_type; + const struct super_operations *s_op; + const struct dquot_operations *dq_op; + const struct quotactl_ops *s_qcop; + const struct export_operations *s_export_op; + unsigned long s_flags; + unsigned long s_magic; + struct dentry *s_root; + struct rw_semaphore s_umount; + struct mutex s_lock; + int s_count; + atomic_t s_active; + void *s_security; + const struct xattr_handler **s_xattr; + struct list_head s_inodes; + struct hlist_bl_head s_anon; + struct list_head *s_files; + struct list_head s_dentry_lru; + int s_nr_dentry_unused; + struct block_device *s_bdev; + struct backing_dev_info *s_bdi; + struct mtd_info *s_mtd; + struct list_head s_instances; + struct quota_info s_dquot; + int s_frozen; + wait_queue_head_t s_wait_unfrozen; + char s_id[32]; + u8 s_uuid[16]; + void *s_fs_info; + fmode_t s_mode; + u32 s_time_gran; + struct mutex s_vfs_rename_mutex; + char *s_subtype; + char *s_options; + const struct dentry_operations *s_d_op; + int cleancache_poolid; +}; +extern struct timespec current_fs_time(struct super_block *sb); +enum { + SB_UNFROZEN = 0, + SB_FREEZE_WRITE = 1, + SB_FREEZE_TRANS = 2, +}; +extern struct user_namespace init_user_ns; +extern bool inode_owner_or_capable(const struct inode *inode); +extern void lock_super(struct super_block *); +extern void unlock_super(struct super_block *); +extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *); +extern int vfs_mkdir(struct inode *, struct dentry *, int); +extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t); +extern int vfs_symlink(struct inode *, struct dentry *, const char *); +extern int vfs_link(struct dentry *, struct inode *, struct dentry *); +extern int vfs_rmdir(struct inode *, struct dentry *); +extern int vfs_unlink(struct inode *, struct dentry *); +extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *); +extern void dentry_unhash(struct dentry *dentry); +extern int file_permission(struct file *, int); +extern void inode_init_owner(struct inode *inode, const struct inode *dir, + mode_t mode); +struct fiemap_extent_info { + unsigned int fi_flags; + unsigned int fi_extents_mapped; + unsigned int fi_extents_max; + struct fiemap_extent *fi_extents_start; +}; +int fiemap_fill_next_extent(struct fiemap_extent_info *info, u64 logical, + u64 phys, u64 len, u32 flags); +int fiemap_check_flags(struct fiemap_extent_info *fieinfo, u32 fs_flags); +typedef int (*filldir_t)(void *, const char *, int, loff_t, u64, unsigned); +struct block_device_operations; +struct file_operations { + struct module *owner; + loff_t (*llseek) (struct file *, loff_t, int); + ssize_t (*read) (struct file *, char *, size_t, loff_t *); + ssize_t (*write) (struct file *, const char *, size_t, loff_t *); + ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); + ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); + int (*readdir) (struct file *, void *, filldir_t); + unsigned int (*poll) (struct file *, struct poll_table_struct *); + long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); + long (*compat_ioctl) (struct file *, unsigned int, unsigned long); + int (*mmap) (struct file *, struct vm_area_struct *); + int (*open) (struct inode *, struct file *); + int (*flush) (struct file *, fl_owner_t id); + int (*release) (struct inode *, struct file *); + int (*fsync) (struct file *, int datasync); + int (*aio_fsync) (struct kiocb *, int datasync); + int (*fasync) (int, struct file *, int); + int (*lock) (struct file *, int, struct file_lock *); + ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); + unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); + int (*check_flags)(int); + int (*flock) (struct file *, int, struct file_lock *); + ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int); + ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int); + int (*setlease)(struct file *, long, struct file_lock **); + long (*fallocate)(struct file *file, int mode, loff_t offset, + loff_t len); +}; +struct inode_operations { + struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *); + void * (*follow_link) (struct dentry *, struct nameidata *); + int (*permission) (struct inode *, int, unsigned int); + int (*check_acl)(struct inode *, int, unsigned int); + int (*readlink) (struct dentry *, char *,int); + void (*put_link) (struct dentry *, struct nameidata *, void *); + int (*create) (struct inode *,struct dentry *,int, struct nameidata *); + int (*link) (struct dentry *,struct inode *,struct dentry *); + int (*unlink) (struct inode *,struct dentry *); + int (*symlink) (struct inode *,struct dentry *,const char *); + int (*mkdir) (struct inode *,struct dentry *,int); + int (*rmdir) (struct inode *,struct dentry *); + int (*mknod) (struct inode *,struct dentry *,int,dev_t); + int (*rename) (struct inode *, struct dentry *, + struct inode *, struct dentry *); + void (*truncate) (struct inode *); + int (*setattr) (struct dentry *, struct iattr *); + int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *); + int (*setxattr) (struct dentry *, const char *,const void *,size_t,int); + ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t); + ssize_t (*listxattr) (struct dentry *, char *, size_t); + int (*removexattr) (struct dentry *, const char *); + void (*truncate_range)(struct inode *, loff_t, loff_t); + int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, + u64 len); +} __attribute__((__aligned__((1 << (6))))); +struct seq_file; +ssize_t rw_copy_check_uvector(int type, const struct iovec * uvector, + unsigned long nr_segs, unsigned long fast_segs, + struct iovec *fast_pointer, + struct iovec **ret_pointer); +extern ssize_t vfs_read(struct file *, char *, size_t, loff_t *); +extern ssize_t vfs_write(struct file *, const char *, size_t, loff_t *); +extern ssize_t vfs_readv(struct file *, const struct iovec *, + unsigned long, loff_t *); +extern ssize_t vfs_writev(struct file *, const struct iovec *, + unsigned long, loff_t *); +struct super_operations { + struct inode *(*alloc_inode)(struct super_block *sb); + void (*destroy_inode)(struct inode *); + void (*dirty_inode) (struct inode *, int flags); + int (*write_inode) (struct inode *, struct writeback_control *wbc); + int (*drop_inode) (struct inode *); + void (*evict_inode) (struct inode *); + void (*put_super) (struct super_block *); + void (*write_super) (struct super_block *); + int (*sync_fs)(struct super_block *sb, int wait); + int (*freeze_fs) (struct super_block *); + int (*unfreeze_fs) (struct super_block *); + int (*statfs) (struct dentry *, struct kstatfs *); + int (*remount_fs) (struct super_block *, int *, char *); + void (*umount_begin) (struct super_block *); + int (*show_options)(struct seq_file *, struct vfsmount *); + int (*show_devname)(struct seq_file *, struct vfsmount *); + int (*show_path)(struct seq_file *, struct vfsmount *); + int (*show_stats)(struct seq_file *, struct vfsmount *); + ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); + ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); + int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t); +}; +extern void __mark_inode_dirty(struct inode *, int); +static inline __attribute__((always_inline)) void mark_inode_dirty(struct inode *inode) +{ + __mark_inode_dirty(inode, ((1 << 0) | (1 << 1) | (1 << 2))); +} +static inline __attribute__((always_inline)) void mark_inode_dirty_sync(struct inode *inode) +{ + __mark_inode_dirty(inode, (1 << 0)); +} +static inline __attribute__((always_inline)) void inc_nlink(struct inode *inode) +{ + inode->i_nlink++; +} +static inline __attribute__((always_inline)) void inode_inc_link_count(struct inode *inode) +{ + inc_nlink(inode); + mark_inode_dirty(inode); +} +static inline __attribute__((always_inline)) void drop_nlink(struct inode *inode) +{ + inode->i_nlink--; +} +static inline __attribute__((always_inline)) void clear_nlink(struct inode *inode) +{ + inode->i_nlink = 0; +} +static inline __attribute__((always_inline)) void inode_dec_link_count(struct inode *inode) +{ + drop_nlink(inode); + mark_inode_dirty(inode); +} +static inline __attribute__((always_inline)) void inode_inc_iversion(struct inode *inode) +{ + spin_lock(&inode->i_lock); + inode->i_version++; + spin_unlock(&inode->i_lock); +} +extern void touch_atime(struct vfsmount *mnt, struct dentry *dentry); +static inline __attribute__((always_inline)) void file_accessed(struct file *file) +{ + if (__builtin_constant_p(((!(file->f_flags & 01000000)))) ? !!((!(file->f_flags & 01000000))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/fs.h", .line = 1795, }; ______r = !!((!(file->f_flags & 01000000))); ______f.miss_hit[______r]++; ______r; })) + touch_atime(file->f_path.mnt, file->f_path.dentry); +} +int sync_inode(struct inode *inode, struct writeback_control *wbc); +int sync_inode_metadata(struct inode *inode, int wait); +struct file_system_type { + const char *name; + int fs_flags; + struct dentry *(*mount) (struct file_system_type *, int, + const char *, void *); + void (*kill_sb) (struct super_block *); + struct module *owner; + struct file_system_type * next; + struct list_head fs_supers; + struct lock_class_key s_lock_key; + struct lock_class_key s_umount_key; + struct lock_class_key s_vfs_rename_key; + struct lock_class_key i_lock_key; + struct lock_class_key i_mutex_key; + struct lock_class_key i_mutex_dir_key; + struct lock_class_key i_alloc_sem_key; +}; +extern struct dentry *mount_ns(struct file_system_type *fs_type, int flags, + void *data, int (*fill_super)(struct super_block *, void *, int)); +extern struct dentry *mount_bdev(struct file_system_type *fs_type, + int flags, const char *dev_name, void *data, + int (*fill_super)(struct super_block *, void *, int)); +extern struct dentry *mount_single(struct file_system_type *fs_type, + int flags, void *data, + int (*fill_super)(struct super_block *, void *, int)); +extern struct dentry *mount_nodev(struct file_system_type *fs_type, + int flags, void *data, + int (*fill_super)(struct super_block *, void *, int)); +void generic_shutdown_super(struct super_block *sb); +void kill_block_super(struct super_block *sb); +void kill_anon_super(struct super_block *sb); +void kill_litter_super(struct super_block *sb); +void deactivate_super(struct super_block *sb); +void deactivate_locked_super(struct super_block *sb); +int set_anon_super(struct super_block *s, void *data); +struct super_block *sget(struct file_system_type *type, + int (*test)(struct super_block *,void *), + int (*set)(struct super_block *,void *), + void *data); +extern struct dentry *mount_pseudo(struct file_system_type *, char *, + const struct super_operations *ops, + const struct dentry_operations *dops, + unsigned long); +static inline __attribute__((always_inline)) void sb_mark_dirty(struct super_block *sb) +{ + sb->s_dirt = 1; +} +static inline __attribute__((always_inline)) void sb_mark_clean(struct super_block *sb) +{ + sb->s_dirt = 0; +} +static inline __attribute__((always_inline)) int sb_is_dirty(struct super_block *sb) +{ + return sb->s_dirt; +} +extern int register_filesystem(struct file_system_type *); +extern int unregister_filesystem(struct file_system_type *); +extern struct vfsmount *kern_mount_data(struct file_system_type *, void *data); +extern int may_umount_tree(struct vfsmount *); +extern int may_umount(struct vfsmount *); +extern long do_mount(char *, char *, char *, unsigned long, void *); +extern struct vfsmount *collect_mounts(struct path *); +extern void drop_collected_mounts(struct vfsmount *); +extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, + struct vfsmount *); +extern int vfs_statfs(struct path *, struct kstatfs *); +extern int user_statfs(const char *, struct kstatfs *); +extern int fd_statfs(int, struct kstatfs *); +extern int statfs_by_dentry(struct dentry *, struct kstatfs *); +extern int freeze_super(struct super_block *super); +extern int thaw_super(struct super_block *super); +extern int current_umask(void); +extern struct kobject *fs_kobj; +extern int rw_verify_area(int, struct file *, loff_t *, size_t); +extern int locks_mandatory_locked(struct inode *); +extern int locks_mandatory_area(int, struct inode *, struct file *, loff_t, size_t); +static inline __attribute__((always_inline)) int __mandatory_lock(struct inode *ino) +{ + return (ino->i_mode & (0002000 | 00010)) == 0002000; +} +static inline __attribute__((always_inline)) int mandatory_lock(struct inode *ino) +{ + return ((ino)->i_sb->s_flags & (64)) && __mandatory_lock(ino); +} +static inline __attribute__((always_inline)) int locks_verify_locked(struct inode *inode) +{ + if (__builtin_constant_p(((mandatory_lock(inode)))) ? !!((mandatory_lock(inode))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/fs.h", .line = 1923, }; ______r = !!((mandatory_lock(inode))); ______f.miss_hit[______r]++; ______r; })) + return locks_mandatory_locked(inode); + return 0; +} +static inline __attribute__((always_inline)) int locks_verify_truncate(struct inode *inode, + struct file *filp, + loff_t size) +{ + if (__builtin_constant_p(((inode->i_flock && mandatory_lock(inode)))) ? !!((inode->i_flock && mandatory_lock(inode))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/fs.h", .line = 1932, }; ______r = !!((inode->i_flock && mandatory_lock(inode))); ______f.miss_hit[______r]++; ______r; })) + return locks_mandatory_area( + 2, inode, filp, + size < inode->i_size ? size : inode->i_size, + (size < inode->i_size ? inode->i_size - size + : size - inode->i_size) + ); + return 0; +} +static inline __attribute__((always_inline)) int break_lease(struct inode *inode, unsigned int mode) +{ + if (__builtin_constant_p(((inode->i_flock))) ? !!((inode->i_flock)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/fs.h", .line = 1944, }; ______r = !!((inode->i_flock)); ______f.miss_hit[______r]++; ______r; })) + return __break_lease(inode, mode); + return 0; +} +extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, + struct file *filp); +extern int do_fallocate(struct file *file, int mode, loff_t offset, + loff_t len); +extern long do_sys_open(int dfd, const char *filename, int flags, + int mode); +extern struct file *filp_open(const char *, int, int); +extern struct file *file_open_root(struct dentry *, struct vfsmount *, + const char *, int); +extern struct file * dentry_open(struct dentry *, struct vfsmount *, int, + const struct cred *); +extern int filp_close(struct file *, fl_owner_t id); +extern char * getname(const char *); +extern int ioctl_preallocate(struct file *filp, void *argp); +extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) vfs_caches_init_early(void); +extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) vfs_caches_init(unsigned long); +extern struct kmem_cache *names_cachep; +extern void putname(const char *name); +extern int register_blkdev(unsigned int, const char *); +extern void unregister_blkdev(unsigned int, const char *); +extern struct block_device *bdget(dev_t); +extern struct block_device *bdgrab(struct block_device *bdev); +extern void bd_set_size(struct block_device *, loff_t size); +extern void bd_forget(struct inode *inode); +extern void bdput(struct block_device *); +extern void invalidate_bdev(struct block_device *); +extern int sync_blockdev(struct block_device *bdev); +extern struct super_block *freeze_bdev(struct block_device *); +extern void emergency_thaw_all(void); +extern int thaw_bdev(struct block_device *bdev, struct super_block *sb); +extern int fsync_bdev(struct block_device *); +extern int sync_filesystem(struct super_block *); +extern const struct file_operations def_blk_fops; +extern const struct file_operations def_chr_fops; +extern const struct file_operations bad_sock_fops; +extern const struct file_operations def_fifo_fops; +extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long); +extern int blkdev_ioctl(struct block_device *, fmode_t, unsigned, unsigned long); +extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long); +extern int blkdev_get(struct block_device *bdev, fmode_t mode, void *holder); +extern struct block_device *blkdev_get_by_path(const char *path, fmode_t mode, + void *holder); +extern struct block_device *blkdev_get_by_dev(dev_t dev, fmode_t mode, + void *holder); +extern int blkdev_put(struct block_device *bdev, fmode_t mode); +extern int bd_link_disk_holder(struct block_device *bdev, struct gendisk *disk); +extern void bd_unlink_disk_holder(struct block_device *bdev, + struct gendisk *disk); +extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); +extern int register_chrdev_region(dev_t, unsigned, const char *); +extern int __register_chrdev(unsigned int major, unsigned int baseminor, + unsigned int count, const char *name, + const struct file_operations *fops); +extern void __unregister_chrdev(unsigned int major, unsigned int baseminor, + unsigned int count, const char *name); +extern void unregister_chrdev_region(dev_t, unsigned); +extern void chrdev_show(struct seq_file *,off_t); +static inline __attribute__((always_inline)) int register_chrdev(unsigned int major, const char *name, + const struct file_operations *fops) +{ + return __register_chrdev(major, 0, 256, name, fops); +} +static inline __attribute__((always_inline)) void unregister_chrdev(unsigned int major, const char *name) +{ + __unregister_chrdev(major, 0, 256, name); +} +extern const char *__bdevname(dev_t, char *buffer); +extern const char *bdevname(struct block_device *bdev, char *buffer); +extern struct block_device *lookup_bdev(const char *); +extern void blkdev_show(struct seq_file *,off_t); +extern void init_special_inode(struct inode *, umode_t, dev_t); +extern void make_bad_inode(struct inode *); +extern int is_bad_inode(struct inode *); +extern const struct file_operations read_pipefifo_fops; +extern const struct file_operations write_pipefifo_fops; +extern const struct file_operations rdwr_pipefifo_fops; +extern int fs_may_remount_ro(struct super_block *); +extern void check_disk_size_change(struct gendisk *disk, + struct block_device *bdev); +extern int revalidate_disk(struct gendisk *); +extern int check_disk_change(struct block_device *); +extern int __invalidate_device(struct block_device *, bool); +extern int invalidate_partition(struct gendisk *, int); +unsigned long invalidate_mapping_pages(struct address_space *mapping, + unsigned long start, unsigned long end); +static inline __attribute__((always_inline)) void invalidate_remote_inode(struct inode *inode) +{ + if (__builtin_constant_p((((((inode->i_mode) & 00170000) == 0100000) || (((inode->i_mode) & 00170000) == 0040000) || (((inode->i_mode) & 00170000) == 0120000)))) ? !!(((((inode->i_mode) & 00170000) == 0100000) || (((inode->i_mode) & 00170000) == 0040000) || (((inode->i_mode) & 00170000) == 0120000))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "include/linux/fs.h" + , .line = + 2159 + , }; ______r = !!(((((inode->i_mode) & 00170000) == 0100000) || (((inode->i_mode) & 00170000) == 0040000) || (((inode->i_mode) & 00170000) == 0120000))); ______f.miss_hit[______r]++; ______r; })) + invalidate_mapping_pages(inode->i_mapping, 0, -1); +} +extern int invalidate_inode_pages2(struct address_space *mapping); +extern int invalidate_inode_pages2_range(struct address_space *mapping, + unsigned long start, unsigned long end); +extern int write_inode_now(struct inode *, int); +extern int filemap_fdatawrite(struct address_space *); +extern int filemap_flush(struct address_space *); +extern int filemap_fdatawait(struct address_space *); +extern int filemap_fdatawait_range(struct address_space *, loff_t lstart, + loff_t lend); +extern int filemap_write_and_wait(struct address_space *mapping); +extern int filemap_write_and_wait_range(struct address_space *mapping, + loff_t lstart, loff_t lend); +extern int __filemap_fdatawrite_range(struct address_space *mapping, + loff_t start, loff_t end, int sync_mode); +extern int filemap_fdatawrite_range(struct address_space *mapping, + loff_t start, loff_t end); +extern int vfs_fsync_range(struct file *file, loff_t start, loff_t end, + int datasync); +extern int vfs_fsync(struct file *file, int datasync); +extern int generic_write_sync(struct file *file, loff_t pos, loff_t count); +extern void sync_supers(void); +extern void emergency_sync(void); +extern void emergency_remount(void); +extern sector_t bmap(struct inode *, sector_t); +extern int notify_change(struct dentry *, struct iattr *); +extern int inode_permission(struct inode *, int); +extern int generic_permission(struct inode *, int, unsigned int, + int (*check_acl)(struct inode *, int, unsigned int)); +static inline __attribute__((always_inline)) bool execute_ok(struct inode *inode) +{ + return (inode->i_mode & (00100|00010|00001)) || (((inode->i_mode) & 00170000) == 0040000); +} +extern int get_write_access(struct inode *); +extern int deny_write_access(struct file *); +static inline __attribute__((always_inline)) void put_write_access(struct inode * inode) +{ + atomic_dec(&inode->i_writecount); +} +static inline __attribute__((always_inline)) void allow_write_access(struct file *file) +{ + if (__builtin_constant_p(((file))) ? !!((file)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/fs.h", .line = 2207, }; ______r = !!((file)); ______f.miss_hit[______r]++; ______r; })) + atomic_inc(&file->f_path.dentry->d_inode->i_writecount); +} +static inline __attribute__((always_inline)) void i_readcount_dec(struct inode *inode) +{ + return; +} +static inline __attribute__((always_inline)) void i_readcount_inc(struct inode *inode) +{ + return; +} +extern int do_pipe_flags(int *, int); +extern struct file *create_read_pipe(struct file *f, int flags); +extern struct file *create_write_pipe(int flags); +extern void free_write_pipe(struct file *); +extern int kernel_read(struct file *, loff_t, char *, unsigned long); +extern struct file * open_exec(const char *); +extern int is_subdir(struct dentry *, struct dentry *); +extern int path_is_under(struct path *, struct path *); +extern ino_t find_inode_number(struct dentry *, struct qstr *); +extern loff_t default_llseek(struct file *file, loff_t offset, int origin); +extern loff_t vfs_llseek(struct file *file, loff_t offset, int origin); +extern int inode_init_always(struct super_block *, struct inode *); +extern void inode_init_once(struct inode *); +extern void address_space_init_once(struct address_space *mapping); +extern void ihold(struct inode * inode); +extern void iput(struct inode *); +extern struct inode * igrab(struct inode *); +extern ino_t iunique(struct super_block *, ino_t); +extern int inode_needs_sync(struct inode *inode); +extern int generic_delete_inode(struct inode *inode); +extern int generic_drop_inode(struct inode *inode); +extern struct inode *ilookup5_nowait(struct super_block *sb, + unsigned long hashval, int (*test)(struct inode *, void *), + void *data); +extern struct inode *ilookup5(struct super_block *sb, unsigned long hashval, + int (*test)(struct inode *, void *), void *data); +extern struct inode *ilookup(struct super_block *sb, unsigned long ino); +extern struct inode * iget5_locked(struct super_block *, unsigned long, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *); +extern struct inode * iget_locked(struct super_block *, unsigned long); +extern int insert_inode_locked4(struct inode *, unsigned long, int (*test)(struct inode *, void *), void *); +extern int insert_inode_locked(struct inode *); +extern void unlock_new_inode(struct inode *); +extern unsigned int get_next_ino(void); +extern void __iget(struct inode * inode); +extern void iget_failed(struct inode *); +extern void end_writeback(struct inode *); +extern void __destroy_inode(struct inode *); +extern struct inode *new_inode(struct super_block *); +extern void free_inode_nonrcu(struct inode *inode); +extern int should_remove_suid(struct dentry *); +extern int file_remove_suid(struct file *); +extern void __insert_inode_hash(struct inode *, unsigned long hashval); +extern void remove_inode_hash(struct inode *); +static inline __attribute__((always_inline)) void insert_inode_hash(struct inode *inode) +{ + __insert_inode_hash(inode, inode->i_ino); +} +extern void inode_sb_list_add(struct inode *inode); +extern void submit_bio(int, struct bio *); +extern int bdev_read_only(struct block_device *); +extern int set_blocksize(struct block_device *, int); +extern int sb_set_blocksize(struct super_block *, int); +extern int sb_min_blocksize(struct super_block *, int); +extern int generic_file_mmap(struct file *, struct vm_area_struct *); +extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *); +extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size); +int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk); +extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t); +extern ssize_t __generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, + loff_t *); +extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t); +extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *, + unsigned long *, loff_t, loff_t *, size_t, size_t); +extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *, + unsigned long, loff_t, loff_t *, size_t, ssize_t); +extern ssize_t do_sync_read(struct file *filp, char *buf, size_t len, loff_t *ppos); +extern ssize_t do_sync_write(struct file *filp, const char *buf, size_t len, loff_t *ppos); +extern int generic_segment_checks(const struct iovec *iov, + unsigned long *nr_segs, size_t *count, int access_flags); +extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov, + unsigned long nr_segs, loff_t pos); +extern int blkdev_fsync(struct file *filp, int datasync); +extern ssize_t generic_file_splice_read(struct file *, loff_t *, + struct pipe_inode_info *, size_t, unsigned int); +extern ssize_t default_file_splice_read(struct file *, loff_t *, + struct pipe_inode_info *, size_t, unsigned int); +extern ssize_t generic_file_splice_write(struct pipe_inode_info *, + struct file *, loff_t *, size_t, unsigned int); +extern ssize_t generic_splice_sendpage(struct pipe_inode_info *pipe, + struct file *out, loff_t *, size_t len, unsigned int flags); +extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out, + size_t len, unsigned int flags); +extern void +file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); +extern loff_t noop_llseek(struct file *file, loff_t offset, int origin); +extern loff_t no_llseek(struct file *file, loff_t offset, int origin); +extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin); +extern loff_t generic_file_llseek_unlocked(struct file *file, loff_t offset, + int origin); +extern int generic_file_open(struct inode * inode, struct file * filp); +extern int nonseekable_open(struct inode * inode, struct file * filp); +static inline __attribute__((always_inline)) int xip_truncate_page(struct address_space *mapping, loff_t from) +{ + return 0; +} +typedef void (dio_submit_t)(int rw, struct bio *bio, struct inode *inode, + loff_t file_offset); +enum { + DIO_LOCKING = 0x01, + DIO_SKIP_HOLES = 0x02, +}; +void dio_end_io(struct bio *bio, int error); +ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, + struct block_device *bdev, const struct iovec *iov, loff_t offset, + unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io, + dio_submit_t submit_io, int flags); +static inline __attribute__((always_inline)) ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb, + struct inode *inode, struct block_device *bdev, const struct iovec *iov, + loff_t offset, unsigned long nr_segs, get_block_t get_block, + dio_iodone_t end_io) +{ + return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, + nr_segs, get_block, end_io, ((void *)0), + DIO_LOCKING | DIO_SKIP_HOLES); +} +extern const struct file_operations generic_ro_fops; +extern int vfs_readlink(struct dentry *, char *, int, const char *); +extern int vfs_follow_link(struct nameidata *, const char *); +extern int page_readlink(struct dentry *, char *, int); +extern void *page_follow_link_light(struct dentry *, struct nameidata *); +extern void page_put_link(struct dentry *, struct nameidata *, void *); +extern int __page_symlink(struct inode *inode, const char *symname, int len, + int nofs); +extern int page_symlink(struct inode *inode, const char *symname, int len); +extern const struct inode_operations page_symlink_inode_operations; +extern int generic_readlink(struct dentry *, char *, int); +extern void generic_fillattr(struct inode *, struct kstat *); +extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); +void __inode_add_bytes(struct inode *inode, loff_t bytes); +void inode_add_bytes(struct inode *inode, loff_t bytes); +void inode_sub_bytes(struct inode *inode, loff_t bytes); +loff_t inode_get_bytes(struct inode *inode); +void inode_set_bytes(struct inode *inode, loff_t bytes); +extern int vfs_readdir(struct file *, filldir_t, void *); +extern int vfs_stat(const char *, struct kstat *); +extern int vfs_lstat(const char *, struct kstat *); +extern int vfs_fstat(unsigned int, struct kstat *); +extern int vfs_fstatat(int , const char *, struct kstat *, int); +extern int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, + unsigned long arg); +extern int __generic_block_fiemap(struct inode *inode, + struct fiemap_extent_info *fieinfo, + loff_t start, loff_t len, + get_block_t *get_block); +extern int generic_block_fiemap(struct inode *inode, + struct fiemap_extent_info *fieinfo, u64 start, + u64 len, get_block_t *get_block); +extern void get_filesystem(struct file_system_type *fs); +extern void put_filesystem(struct file_system_type *fs); +extern struct file_system_type *get_fs_type(const char *name); +extern struct super_block *get_super(struct block_device *); +extern struct super_block *get_active_super(struct block_device *bdev); +extern struct super_block *user_get_super(dev_t); +extern void drop_super(struct super_block *sb); +extern void iterate_supers(void (*)(struct super_block *, void *), void *); +extern int dcache_dir_open(struct inode *, struct file *); +extern int dcache_dir_close(struct inode *, struct file *); +extern loff_t dcache_dir_lseek(struct file *, loff_t, int); +extern int dcache_readdir(struct file *, void *, filldir_t); +extern int simple_setattr(struct dentry *, struct iattr *); +extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *); +extern int simple_statfs(struct dentry *, struct kstatfs *); +extern int simple_link(struct dentry *, struct inode *, struct dentry *); +extern int simple_unlink(struct inode *, struct dentry *); +extern int simple_rmdir(struct inode *, struct dentry *); +extern int simple_rename(struct inode *, struct dentry *, struct inode *, struct dentry *); +extern int noop_fsync(struct file *, int); +extern int simple_empty(struct dentry *); +extern int simple_readpage(struct file *file, struct page *page); +extern int simple_write_begin(struct file *file, struct address_space *mapping, + loff_t pos, unsigned len, unsigned flags, + struct page **pagep, void **fsdata); +extern int simple_write_end(struct file *file, struct address_space *mapping, + loff_t pos, unsigned len, unsigned copied, + struct page *page, void *fsdata); +extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *); +extern ssize_t generic_read_dir(struct file *, char *, size_t, loff_t *); +extern const struct file_operations simple_dir_operations; +extern const struct inode_operations simple_dir_inode_operations; +struct tree_descr { char *name; const struct file_operations *ops; int mode; }; +struct dentry *d_alloc_name(struct dentry *, const char *); +extern int simple_fill_super(struct super_block *, unsigned long, struct tree_descr *); +extern int simple_pin_fs(struct file_system_type *, struct vfsmount **mount, int *count); +extern void simple_release_fs(struct vfsmount **mount, int *count); +extern ssize_t simple_read_from_buffer(void *to, size_t count, + loff_t *ppos, const void *from, size_t available); +extern ssize_t simple_write_to_buffer(void *to, size_t available, loff_t *ppos, + const void *from, size_t count); +extern int generic_file_fsync(struct file *, int); +extern int generic_check_addressable(unsigned, u64); +extern int buffer_migrate_page(struct address_space *, + struct page *, struct page *); +extern int inode_change_ok(const struct inode *, struct iattr *); +extern int inode_newsize_ok(const struct inode *, loff_t offset); +extern void setattr_copy(struct inode *inode, const struct iattr *attr); +extern void file_update_time(struct file *file); +extern int generic_show_options(struct seq_file *m, struct vfsmount *mnt); +extern void save_mount_options(struct super_block *sb, char *options); +extern void replace_mount_options(struct super_block *sb, char *options); +static inline __attribute__((always_inline)) ino_t parent_ino(struct dentry *dentry) +{ + ino_t res; + spin_lock(&dentry->d_lock); + res = dentry->d_parent->d_inode->i_ino; + spin_unlock(&dentry->d_lock); + return res; +} +struct simple_transaction_argresp { + ssize_t size; + char data[0]; +}; +char *simple_transaction_get(struct file *file, const char *buf, + size_t size); +ssize_t simple_transaction_read(struct file *file, char *buf, + size_t size, loff_t *pos); +int simple_transaction_release(struct inode *inode, struct file *file); +void simple_transaction_set(struct file *file, size_t n); +static inline __attribute__((always_inline)) void __attribute__((format(printf, 1, 2))) +__simple_attr_check_format(const char *fmt, ...) +{ +} +int simple_attr_open(struct inode *inode, struct file *file, + int (*get)(void *, u64 *), int (*set)(void *, u64), + const char *fmt); +int simple_attr_release(struct inode *inode, struct file *file); +ssize_t simple_attr_read(struct file *file, char *buf, + size_t len, loff_t *ppos); +ssize_t simple_attr_write(struct file *file, const char *buf, + size_t len, loff_t *ppos); +struct ctl_table; +int proc_nr_files(struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos); +int proc_nr_dentry(struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos); +int proc_nr_inodes(struct ctl_table *table, int write, + void *buffer, size_t *lenp, loff_t *ppos); +int __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) get_filesystem_list(char *buf); +static inline __attribute__((always_inline)) int is_sxid(mode_t mode) +{ + return (mode & 0004000) || ((mode & 0002000) && (mode & 00010)); +} +static inline __attribute__((always_inline)) void inode_has_no_xattr(struct inode *inode) +{ + if (__builtin_constant_p(((!is_sxid(inode->i_mode) && (inode->i_sb->s_flags & (1<<28))))) ? !!((!is_sxid(inode->i_mode) && (inode->i_sb->s_flags & (1<<28)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/fs.h", .line = 2597, }; ______r = !!((!is_sxid(inode->i_mode) && (inode->i_sb->s_flags & (1<<28)))); ______f.miss_hit[______r]++; ______r; })) + inode->i_flags |= 4096; +} +struct range { + u64 start; + u64 end; +}; +int add_range(struct range *range, int az, int nr_range, + u64 start, u64 end); +int add_range_with_merge(struct range *range, int az, int nr_range, + u64 start, u64 end); +void subtract_range(struct range *range, int az, u64 start, u64 end); +int clean_sort_range(struct range *range, int az); +void sort_range(struct range *range, int nr_range); +static inline __attribute__((always_inline)) resource_size_t cap_resource(u64 val) +{ + if (__builtin_constant_p(((val > ((resource_size_t)~0)))) ? !!((val > ((resource_size_t)~0))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/range.h", .line = 25, }; ______r = !!((val > ((resource_size_t)~0))); ______f.miss_hit[______r]++; ______r; })) + return ((resource_size_t)~0); + return val; +} +struct mempolicy; +struct anon_vma; +struct file_ra_state; +struct user_struct; +struct writeback_control; +extern unsigned long max_mapnr; +extern unsigned long num_physpages; +extern unsigned long totalram_pages; +extern void * high_memory; +extern int page_cluster; +extern int sysctl_legacy_va_layout; +extern unsigned long empty_zero_page[((1UL) << 12) / sizeof(unsigned long)]; +extern spinlock_t pgd_lock; +extern struct list_head pgd_list; +extern struct mm_struct *pgd_page_get_mm(struct page *page); +static inline __attribute__((always_inline)) int pte_dirty(pte_t pte) +{ + return pte_flags(pte) & (((pteval_t)(1)) << 6); +} +static inline __attribute__((always_inline)) int pte_young(pte_t pte) +{ + return pte_flags(pte) & (((pteval_t)(1)) << 5); +} +static inline __attribute__((always_inline)) int pmd_young(pmd_t pmd) +{ + return pmd_flags(pmd) & (((pteval_t)(1)) << 5); +} +static inline __attribute__((always_inline)) int pte_write(pte_t pte) +{ + return pte_flags(pte) & (((pteval_t)(1)) << 1); +} +static inline __attribute__((always_inline)) int pte_file(pte_t pte) +{ + return pte_flags(pte) & (((pteval_t)(1)) << 6); +} +static inline __attribute__((always_inline)) int pte_huge(pte_t pte) +{ + return pte_flags(pte) & (((pteval_t)(1)) << 7); +} +static inline __attribute__((always_inline)) int pte_global(pte_t pte) +{ + return pte_flags(pte) & (((pteval_t)(1)) << 8); +} +static inline __attribute__((always_inline)) int pte_exec(pte_t pte) +{ + return !(pte_flags(pte) & (((pteval_t)(1)) << 63)); +} +static inline __attribute__((always_inline)) int pte_special(pte_t pte) +{ + return pte_flags(pte) & (((pteval_t)(1)) << 9); +} +static inline __attribute__((always_inline)) unsigned long pte_pfn(pte_t pte) +{ + return (pte_val(pte) & ((pteval_t)(((signed long)(~(((1UL) << 12)-1))) & ((phys_addr_t)((1ULL << 44) - 1))))) >> 12; +} +static inline __attribute__((always_inline)) unsigned long pmd_pfn(pmd_t pmd) +{ + return (pmd_val(pmd) & ((pteval_t)(((signed long)(~(((1UL) << 12)-1))) & ((phys_addr_t)((1ULL << 44) - 1))))) >> 12; +} +static inline __attribute__((always_inline)) int pmd_large(pmd_t pte) +{ + return (pmd_flags(pte) & ((((pteval_t)(1)) << 7) | (((pteval_t)(1)) << 0))) == + ((((pteval_t)(1)) << 7) | (((pteval_t)(1)) << 0)); +} +static inline __attribute__((always_inline)) int pmd_trans_splitting(pmd_t pmd) +{ + return pmd_val(pmd) & (((pteval_t)(1)) << 9); +} +static inline __attribute__((always_inline)) int pmd_trans_huge(pmd_t pmd) +{ + return pmd_val(pmd) & (((pteval_t)(1)) << 7); +} +static inline __attribute__((always_inline)) int has_transparent_hugepage(void) +{ + return (__builtin_constant_p((0*32+ 3)) && ( ((((0*32+ 3))>>5)==0 && (1UL<<(((0*32+ 3))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((0*32+ 3))>>5)==1 && (1UL<<(((0*32+ 3))&31) & (0|0))) || ((((0*32+ 3))>>5)==2 && (1UL<<(((0*32+ 3))&31) & 0)) || ((((0*32+ 3))>>5)==3 && (1UL<<(((0*32+ 3))&31) & (0))) || ((((0*32+ 3))>>5)==4 && (1UL<<(((0*32+ 3))&31) & 0)) || ((((0*32+ 3))>>5)==5 && (1UL<<(((0*32+ 3))&31) & 0)) || ((((0*32+ 3))>>5)==6 && (1UL<<(((0*32+ 3))&31) & 0)) || ((((0*32+ 3))>>5)==7 && (1UL<<(((0*32+ 3))&31) & 0)) || ((((0*32+ 3))>>5)==8 && (1UL<<(((0*32+ 3))&31) & 0)) || ((((0*32+ 3))>>5)==9 && (1UL<<(((0*32+ 3))&31) & 0)) ) ? 1 : (__builtin_constant_p(((0*32+ 3))) ? constant_test_bit(((0*32+ 3)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((0*32+ 3)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))); +} +static inline __attribute__((always_inline)) pte_t pte_set_flags(pte_t pte, pteval_t set) +{ + pteval_t v = native_pte_val(pte); + return native_make_pte(v | set); +} +static inline __attribute__((always_inline)) pte_t pte_clear_flags(pte_t pte, pteval_t clear) +{ + pteval_t v = native_pte_val(pte); + return native_make_pte(v & ~clear); +} +static inline __attribute__((always_inline)) pte_t pte_mkclean(pte_t pte) +{ + return pte_clear_flags(pte, (((pteval_t)(1)) << 6)); +} +static inline __attribute__((always_inline)) pte_t pte_mkold(pte_t pte) +{ + return pte_clear_flags(pte, (((pteval_t)(1)) << 5)); +} +static inline __attribute__((always_inline)) pte_t pte_wrprotect(pte_t pte) +{ + return pte_clear_flags(pte, (((pteval_t)(1)) << 1)); +} +static inline __attribute__((always_inline)) pte_t pte_mkexec(pte_t pte) +{ + return pte_clear_flags(pte, (((pteval_t)(1)) << 63)); +} +static inline __attribute__((always_inline)) pte_t pte_mkdirty(pte_t pte) +{ + return pte_set_flags(pte, (((pteval_t)(1)) << 6)); +} +static inline __attribute__((always_inline)) pte_t pte_mkyoung(pte_t pte) +{ + return pte_set_flags(pte, (((pteval_t)(1)) << 5)); +} +static inline __attribute__((always_inline)) pte_t pte_mkwrite(pte_t pte) +{ + return pte_set_flags(pte, (((pteval_t)(1)) << 1)); +} +static inline __attribute__((always_inline)) pte_t pte_mkhuge(pte_t pte) +{ + return pte_set_flags(pte, (((pteval_t)(1)) << 7)); +} +static inline __attribute__((always_inline)) pte_t pte_clrhuge(pte_t pte) +{ + return pte_clear_flags(pte, (((pteval_t)(1)) << 7)); +} +static inline __attribute__((always_inline)) pte_t pte_mkglobal(pte_t pte) +{ + return pte_set_flags(pte, (((pteval_t)(1)) << 8)); +} +static inline __attribute__((always_inline)) pte_t pte_clrglobal(pte_t pte) +{ + return pte_clear_flags(pte, (((pteval_t)(1)) << 8)); +} +static inline __attribute__((always_inline)) pte_t pte_mkspecial(pte_t pte) +{ + return pte_set_flags(pte, (((pteval_t)(1)) << 9)); +} +static inline __attribute__((always_inline)) pmd_t pmd_set_flags(pmd_t pmd, pmdval_t set) +{ + pmdval_t v = native_pmd_val(pmd); + return __pmd(v | set); +} +static inline __attribute__((always_inline)) pmd_t pmd_clear_flags(pmd_t pmd, pmdval_t clear) +{ + pmdval_t v = native_pmd_val(pmd); + return __pmd(v & ~clear); +} +static inline __attribute__((always_inline)) pmd_t pmd_mkold(pmd_t pmd) +{ + return pmd_clear_flags(pmd, (((pteval_t)(1)) << 5)); +} +static inline __attribute__((always_inline)) pmd_t pmd_wrprotect(pmd_t pmd) +{ + return pmd_clear_flags(pmd, (((pteval_t)(1)) << 1)); +} +static inline __attribute__((always_inline)) pmd_t pmd_mkdirty(pmd_t pmd) +{ + return pmd_set_flags(pmd, (((pteval_t)(1)) << 6)); +} +static inline __attribute__((always_inline)) pmd_t pmd_mkhuge(pmd_t pmd) +{ + return pmd_set_flags(pmd, (((pteval_t)(1)) << 7)); +} +static inline __attribute__((always_inline)) pmd_t pmd_mkyoung(pmd_t pmd) +{ + return pmd_set_flags(pmd, (((pteval_t)(1)) << 5)); +} +static inline __attribute__((always_inline)) pmd_t pmd_mkwrite(pmd_t pmd) +{ + return pmd_set_flags(pmd, (((pteval_t)(1)) << 1)); +} +static inline __attribute__((always_inline)) pmd_t pmd_mknotpresent(pmd_t pmd) +{ + return pmd_clear_flags(pmd, (((pteval_t)(1)) << 0)); +} +static inline __attribute__((always_inline)) pgprotval_t massage_pgprot(pgprot_t pgprot) +{ + pgprotval_t protval = ((pgprot).pgprot); + if (__builtin_constant_p(((protval & (((pteval_t)(1)) << 0)))) ? !!((protval & (((pteval_t)(1)) << 0))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/pgtable.h", .line = 301, }; ______r = !!((protval & (((pteval_t)(1)) << 0))); ______f.miss_hit[______r]++; ______r; })) + protval &= __supported_pte_mask; + return protval; +} +static inline __attribute__((always_inline)) pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot) +{ + return __pte(((phys_addr_t)page_nr << 12) | + massage_pgprot(pgprot)); +} +static inline __attribute__((always_inline)) pmd_t pfn_pmd(unsigned long page_nr, pgprot_t pgprot) +{ + return __pmd(((phys_addr_t)page_nr << 12) | + massage_pgprot(pgprot)); +} +static inline __attribute__((always_inline)) pte_t pte_modify(pte_t pte, pgprot_t newprot) +{ + pteval_t val = pte_val(pte); + val &= (((pteval_t)(((signed long)(~(((1UL) << 12)-1))) & ((phys_addr_t)((1ULL << 44) - 1)))) | (((pteval_t)(1)) << 4) | (((pteval_t)(1)) << 3) | (((pteval_t)(1)) << 9) | (((pteval_t)(1)) << 5) | (((pteval_t)(1)) << 6)); + val |= massage_pgprot(newprot) & ~(((pteval_t)(((signed long)(~(((1UL) << 12)-1))) & ((phys_addr_t)((1ULL << 44) - 1)))) | (((pteval_t)(1)) << 4) | (((pteval_t)(1)) << 3) | (((pteval_t)(1)) << 9) | (((pteval_t)(1)) << 5) | (((pteval_t)(1)) << 6)); + return __pte(val); +} +static inline __attribute__((always_inline)) pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot) +{ + pmdval_t val = pmd_val(pmd); + val &= ((((pteval_t)(((signed long)(~(((1UL) << 12)-1))) & ((phys_addr_t)((1ULL << 44) - 1)))) | (((pteval_t)(1)) << 4) | (((pteval_t)(1)) << 3) | (((pteval_t)(1)) << 9) | (((pteval_t)(1)) << 5) | (((pteval_t)(1)) << 6)) | (((pteval_t)(1)) << 7)); + val |= massage_pgprot(newprot) & ~((((pteval_t)(((signed long)(~(((1UL) << 12)-1))) & ((phys_addr_t)((1ULL << 44) - 1)))) | (((pteval_t)(1)) << 4) | (((pteval_t)(1)) << 3) | (((pteval_t)(1)) << 9) | (((pteval_t)(1)) << 5) | (((pteval_t)(1)) << 6)) | (((pteval_t)(1)) << 7)); + return __pmd(val); +} +static inline __attribute__((always_inline)) pgprot_t pgprot_modify(pgprot_t oldprot, pgprot_t newprot) +{ + pgprotval_t preservebits = ((oldprot).pgprot) & (((pteval_t)(((signed long)(~(((1UL) << 12)-1))) & ((phys_addr_t)((1ULL << 44) - 1)))) | (((pteval_t)(1)) << 4) | (((pteval_t)(1)) << 3) | (((pteval_t)(1)) << 9) | (((pteval_t)(1)) << 5) | (((pteval_t)(1)) << 6)); + pgprotval_t addbits = ((newprot).pgprot); + return ((pgprot_t) { (preservebits | addbits) } ); +} +static inline __attribute__((always_inline)) int is_new_memtype_allowed(u64 paddr, unsigned long size, + unsigned long flags, + unsigned long new_flags) +{ + if (__builtin_constant_p(((x86_platform.is_untracked_pat_range(paddr, paddr + size)))) ? !!((x86_platform.is_untracked_pat_range(paddr, paddr + size))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/pgtable.h", .line = 363, }; ______r = !!((x86_platform.is_untracked_pat_range(paddr, paddr + size))); ______f.miss_hit[______r]++; ______r; })) + return 1; + if (__builtin_constant_p((((flags == ((((pteval_t)(1)) << 4)) && new_flags == (0)) || (flags == ((((pteval_t)(1)) << 3)) && new_flags == (0))))) ? !!(((flags == ((((pteval_t)(1)) << 4)) && new_flags == (0)) || (flags == ((((pteval_t)(1)) << 3)) && new_flags == (0)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "/data/exp/linux-3.0.4/arch/x86/include/asm/pgtable.h" + , .line = + 375 + , }; ______r = !!(((flags == ((((pteval_t)(1)) << 4)) && new_flags == (0)) || (flags == ((((pteval_t)(1)) << 3)) && new_flags == (0)))); ______f.miss_hit[______r]++; ______r; })) + { + return 0; + } + return 1; +} +pmd_t *populate_extra_pmd(unsigned long vaddr); +pte_t *populate_extra_pte(unsigned long vaddr); +struct mm_struct; +struct vm_area_struct; +extern pgd_t swapper_pg_dir[1024]; +extern pgd_t initial_page_table[1024]; +static inline __attribute__((always_inline)) void pgtable_cache_init(void) { } +static inline __attribute__((always_inline)) void check_pgt_cache(void) { } +void paging_init(void); +extern void set_pmd_pfn(unsigned long, unsigned long, pgprot_t); +static inline __attribute__((always_inline)) void native_set_pte(pte_t *ptep, pte_t pte) +{ + ptep->pte_high = pte.pte_high; + __asm__ __volatile__("": : :"memory"); + ptep->pte_low = pte.pte_low; +} +static inline __attribute__((always_inline)) void native_set_pte_atomic(pte_t *ptep, pte_t pte) +{ + set_64bit((unsigned long long *)(ptep), native_pte_val(pte)); +} +static inline __attribute__((always_inline)) void native_set_pmd(pmd_t *pmdp, pmd_t pmd) +{ + set_64bit((unsigned long long *)(pmdp), native_pmd_val(pmd)); +} +static inline __attribute__((always_inline)) void native_set_pud(pud_t *pudp, pud_t pud) +{ + set_64bit((unsigned long long *)(pudp), native_pud_val(pud)); +} +static inline __attribute__((always_inline)) void native_pte_clear(struct mm_struct *mm, unsigned long addr, + pte_t *ptep) +{ + ptep->pte_low = 0; + __asm__ __volatile__("": : :"memory"); + ptep->pte_high = 0; +} +static inline __attribute__((always_inline)) void native_pmd_clear(pmd_t *pmd) +{ + u32 *tmp = (u32 *)pmd; + *tmp = 0; + __asm__ __volatile__("": : :"memory"); + *(tmp + 1) = 0; +} +static inline __attribute__((always_inline)) void pud_clear(pud_t *pudp) +{ + set_pud(pudp, ((pud_t) { __pgd(0) } )); +} +static inline __attribute__((always_inline)) pte_t native_ptep_get_and_clear(pte_t *ptep) +{ + pte_t res; + res.pte_low = ({ __typeof(*((&ptep->pte_low))) __x = ((0)); switch (sizeof(*&ptep->pte_low)) { case 1: { volatile u8 *__ptr = (volatile u8 *)((&ptep->pte_low)); asm volatile("xchgb %0,%1" : "=q" (__x), "+m" (*__ptr) : "0" (__x) : "memory"); break; } case 2: { volatile u16 *__ptr = (volatile u16 *)((&ptep->pte_low)); asm volatile("xchgw %0,%1" : "=r" (__x), "+m" (*__ptr) : "0" (__x) : "memory"); break; } case 4: { volatile u32 *__ptr = (volatile u32 *)((&ptep->pte_low)); asm volatile("xchgl %0,%1" : "=r" (__x), "+m" (*__ptr) : "0" (__x) : "memory"); break; } default: __xchg_wrong_size(); } __x; }); + res.pte_high = ptep->pte_high; + ptep->pte_high = 0; + return res; +} +union split_pmd { + struct { + u32 pmd_low; + u32 pmd_high; + }; + pmd_t pmd; +}; +static inline __attribute__((always_inline)) pmd_t native_pmdp_get_and_clear(pmd_t *pmdp) +{ + union split_pmd res, *orig = (union split_pmd *)pmdp; + res.pmd_low = ({ __typeof(*((&orig->pmd_low))) __x = ((0)); switch (sizeof(*&orig->pmd_low)) { case 1: { volatile u8 *__ptr = (volatile u8 *)((&orig->pmd_low)); asm volatile("xchgb %0,%1" : "=q" (__x), "+m" (*__ptr) : "0" (__x) : "memory"); break; } case 2: { volatile u16 *__ptr = (volatile u16 *)((&orig->pmd_low)); asm volatile("xchgw %0,%1" : "=r" (__x), "+m" (*__ptr) : "0" (__x) : "memory"); break; } case 4: { volatile u32 *__ptr = (volatile u32 *)((&orig->pmd_low)); asm volatile("xchgl %0,%1" : "=r" (__x), "+m" (*__ptr) : "0" (__x) : "memory"); break; } default: __xchg_wrong_size(); } __x; }); + res.pmd_high = orig->pmd_high; + orig->pmd_high = 0; + return res.pmd; +} +static inline __attribute__((always_inline)) int pte_none(pte_t pte) +{ + return !pte.pte; +} +static inline __attribute__((always_inline)) int pte_same(pte_t a, pte_t b) +{ + return a.pte == b.pte; +} +static inline __attribute__((always_inline)) int pte_present(pte_t a) +{ + return pte_flags(a) & ((((pteval_t)(1)) << 0) | (((pteval_t)(1)) << 8)); +} +static inline __attribute__((always_inline)) int pte_hidden(pte_t pte) +{ + return pte_flags(pte) & (((pteval_t)(0))); +} +static inline __attribute__((always_inline)) int pmd_present(pmd_t pmd) +{ + return pmd_flags(pmd) & (((pteval_t)(1)) << 0); +} +static inline __attribute__((always_inline)) int pmd_none(pmd_t pmd) +{ + return (unsigned long)native_pmd_val(pmd) == 0; +} +static inline __attribute__((always_inline)) unsigned long pmd_page_vaddr(pmd_t pmd) +{ + return (unsigned long)((void *)((unsigned long)(pmd_val(pmd) & ((pteval_t)(((signed long)(~(((1UL) << 12)-1))) & ((phys_addr_t)((1ULL << 44) - 1)))))+((unsigned long)(0xC0000000UL)))); +} +static inline __attribute__((always_inline)) unsigned long pmd_index(unsigned long address) +{ + return (address >> 21) & (512 - 1); +} +static inline __attribute__((always_inline)) unsigned long pte_index(unsigned long address) +{ + return (address >> 12) & (512 - 1); +} +static inline __attribute__((always_inline)) pte_t *pte_offset_kernel(pmd_t *pmd, unsigned long address) +{ + return (pte_t *)pmd_page_vaddr(*pmd) + pte_index(address); +} +static inline __attribute__((always_inline)) int pmd_bad(pmd_t pmd) +{ + return (pmd_flags(pmd) & ~(((pteval_t)(1)) << 2)) != ((((pteval_t)(1)) << 0) | (((pteval_t)(1)) << 1) | (((pteval_t)(1)) << 5) | (((pteval_t)(1)) << 6)); +} +static inline __attribute__((always_inline)) unsigned long pages_to_mb(unsigned long npg) +{ + return npg >> (20 - 12); +} +static inline __attribute__((always_inline)) int pud_none(pud_t pud) +{ + return native_pud_val(pud) == 0; +} +static inline __attribute__((always_inline)) int pud_present(pud_t pud) +{ + return pud_flags(pud) & (((pteval_t)(1)) << 0); +} +static inline __attribute__((always_inline)) unsigned long pud_page_vaddr(pud_t pud) +{ + return (unsigned long)((void *)((unsigned long)((unsigned long)(pgd_val((pud).pgd)) & ((pteval_t)(((signed long)(~(((1UL) << 12)-1))) & ((phys_addr_t)((1ULL << 44) - 1)))))+((unsigned long)(0xC0000000UL)))); +} +static inline __attribute__((always_inline)) pmd_t *pmd_offset(pud_t *pud, unsigned long address) +{ + return (pmd_t *)pud_page_vaddr(*pud) + pmd_index(address); +} +static inline __attribute__((always_inline)) int pud_large(pud_t pud) +{ + return ((pgd_val((pud).pgd)) & ((((pteval_t)(1)) << 7) | (((pteval_t)(1)) << 0))) == + ((((pteval_t)(1)) << 7) | (((pteval_t)(1)) << 0)); +} +static inline __attribute__((always_inline)) int pud_bad(pud_t pud) +{ + return (pud_flags(pud) & ~(((((pteval_t)(1)) << 0) | (((pteval_t)(1)) << 1) | (((pteval_t)(1)) << 5) | (((pteval_t)(1)) << 6)) | (((pteval_t)(1)) << 2))) != 0; +} +extern int direct_gbpages; +static inline __attribute__((always_inline)) pte_t native_local_ptep_get_and_clear(pte_t *ptep) +{ + pte_t res = *ptep; + native_pte_clear(((void *)0), 0, ptep); + return res; +} +static inline __attribute__((always_inline)) pmd_t native_local_pmdp_get_and_clear(pmd_t *pmdp) +{ + pmd_t res = *pmdp; + native_pmd_clear(pmdp); + return res; +} +static inline __attribute__((always_inline)) void native_set_pte_at(struct mm_struct *mm, unsigned long addr, + pte_t *ptep , pte_t pte) +{ + native_set_pte(ptep, pte); +} +static inline __attribute__((always_inline)) void native_set_pmd_at(struct mm_struct *mm, unsigned long addr, + pmd_t *pmdp , pmd_t pmd) +{ + native_set_pmd(pmdp, pmd); +} +struct vm_area_struct; +extern int ptep_set_access_flags(struct vm_area_struct *vma, + unsigned long address, pte_t *ptep, + pte_t entry, int dirty); +extern int ptep_test_and_clear_young(struct vm_area_struct *vma, + unsigned long addr, pte_t *ptep); +extern int ptep_clear_flush_young(struct vm_area_struct *vma, + unsigned long address, pte_t *ptep); +static inline __attribute__((always_inline)) pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, + pte_t *ptep) +{ + pte_t pte = native_ptep_get_and_clear(ptep); + pte_update(mm, addr, ptep); + return pte; +} +static inline __attribute__((always_inline)) pte_t ptep_get_and_clear_full(struct mm_struct *mm, + unsigned long addr, pte_t *ptep, + int full) +{ + pte_t pte; + if (__builtin_constant_p(((full))) ? !!((full)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/pgtable.h", .line = 686, }; ______r = !!((full)); ______f.miss_hit[______r]++; ______r; })) { + pte = native_local_ptep_get_and_clear(ptep); + } else { + pte = ptep_get_and_clear(mm, addr, ptep); + } + return pte; +} +static inline __attribute__((always_inline)) void ptep_set_wrprotect(struct mm_struct *mm, + unsigned long addr, pte_t *ptep) +{ + clear_bit(1, (unsigned long *)&ptep->pte); + pte_update(mm, addr, ptep); +} +extern int pmdp_set_access_flags(struct vm_area_struct *vma, + unsigned long address, pmd_t *pmdp, + pmd_t entry, int dirty); +extern int pmdp_test_and_clear_young(struct vm_area_struct *vma, + unsigned long addr, pmd_t *pmdp); +extern int pmdp_clear_flush_young(struct vm_area_struct *vma, + unsigned long address, pmd_t *pmdp); +extern void pmdp_splitting_flush(struct vm_area_struct *vma, + unsigned long addr, pmd_t *pmdp); +static inline __attribute__((always_inline)) int pmd_write(pmd_t pmd) +{ + return pmd_flags(pmd) & (((pteval_t)(1)) << 1); +} +static inline __attribute__((always_inline)) pmd_t pmdp_get_and_clear(struct mm_struct *mm, unsigned long addr, + pmd_t *pmdp) +{ + pmd_t pmd = native_pmdp_get_and_clear(pmdp); + pmd_update(mm, addr, pmdp); + return pmd; +} +static inline __attribute__((always_inline)) void pmdp_set_wrprotect(struct mm_struct *mm, + unsigned long addr, pmd_t *pmdp) +{ + clear_bit(1, (unsigned long *)pmdp); + pmd_update(mm, addr, pmdp); +} +static inline __attribute__((always_inline)) void clone_pgd_range(pgd_t *dst, pgd_t *src, int count) +{ + __builtin_memcpy(dst, src, count * sizeof(pgd_t)); +} +static inline __attribute__((always_inline)) void pte_clear_not_present_full(struct mm_struct *mm, + unsigned long address, + pte_t *ptep, + int full) +{ + pte_clear(mm, address, ptep); +} +extern pte_t ptep_clear_flush(struct vm_area_struct *vma, + unsigned long address, + pte_t *ptep); +extern pmd_t pmdp_clear_flush(struct vm_area_struct *vma, + unsigned long address, + pmd_t *pmdp); +static inline __attribute__((always_inline)) int pmd_same(pmd_t pmd_a, pmd_t pmd_b) +{ + return pmd_val(pmd_a) == pmd_val(pmd_b); +} +void pgd_clear_bad(pgd_t *); +void pud_clear_bad(pud_t *); +void pmd_clear_bad(pmd_t *); +static inline __attribute__((always_inline)) int pgd_none_or_clear_bad(pgd_t *pgd) +{ + if (__builtin_constant_p(((pgd_none(*pgd)))) ? !!((pgd_none(*pgd))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/asm-generic/pgtable.h", .line = 257, }; ______r = !!((pgd_none(*pgd))); ______f.miss_hit[______r]++; ______r; })) + return 1; + if (__builtin_constant_p((((__builtin_constant_p(pgd_bad(*pgd)) ? !!(pgd_bad(*pgd)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/asm-generic/pgtable.h", .line = 259, }; ______r = __builtin_expect(!!(pgd_bad(*pgd)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(pgd_bad(*pgd)) ? !!(pgd_bad(*pgd)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/asm-generic/pgtable.h", .line = 259, }; ______r = __builtin_expect(!!(pgd_bad(*pgd)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/asm-generic/pgtable.h", .line = 259, }; ______r = !!(((__builtin_constant_p(pgd_bad(*pgd)) ? !!(pgd_bad(*pgd)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/asm-generic/pgtable.h", .line = 259, }; ______r = __builtin_expect(!!(pgd_bad(*pgd)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) { + pgd_clear_bad(pgd); + return 1; + } + return 0; +} +static inline __attribute__((always_inline)) int pud_none_or_clear_bad(pud_t *pud) +{ + if (__builtin_constant_p(((pud_none(*pud)))) ? !!((pud_none(*pud))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/asm-generic/pgtable.h", .line = 268, }; ______r = !!((pud_none(*pud))); ______f.miss_hit[______r]++; ______r; })) + return 1; + if (__builtin_constant_p((((__builtin_constant_p(pud_bad(*pud)) ? !!(pud_bad(*pud)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/asm-generic/pgtable.h", .line = 270, }; ______r = __builtin_expect(!!(pud_bad(*pud)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(pud_bad(*pud)) ? !!(pud_bad(*pud)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/asm-generic/pgtable.h", .line = 270, }; ______r = __builtin_expect(!!(pud_bad(*pud)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/asm-generic/pgtable.h", .line = 270, }; ______r = !!(((__builtin_constant_p(pud_bad(*pud)) ? !!(pud_bad(*pud)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/asm-generic/pgtable.h", .line = 270, }; ______r = __builtin_expect(!!(pud_bad(*pud)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) { + pud_clear_bad(pud); + return 1; + } + return 0; +} +static inline __attribute__((always_inline)) int pmd_none_or_clear_bad(pmd_t *pmd) +{ + if (__builtin_constant_p(((pmd_none(*pmd)))) ? !!((pmd_none(*pmd))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/asm-generic/pgtable.h", .line = 279, }; ______r = !!((pmd_none(*pmd))); ______f.miss_hit[______r]++; ______r; })) + return 1; + if (__builtin_constant_p((((__builtin_constant_p(pmd_bad(*pmd)) ? !!(pmd_bad(*pmd)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/asm-generic/pgtable.h", .line = 281, }; ______r = __builtin_expect(!!(pmd_bad(*pmd)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(pmd_bad(*pmd)) ? !!(pmd_bad(*pmd)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/asm-generic/pgtable.h", .line = 281, }; ______r = __builtin_expect(!!(pmd_bad(*pmd)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/asm-generic/pgtable.h", .line = 281, }; ______r = !!(((__builtin_constant_p(pmd_bad(*pmd)) ? !!(pmd_bad(*pmd)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/asm-generic/pgtable.h", .line = 281, }; ______r = __builtin_expect(!!(pmd_bad(*pmd)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) { + pmd_clear_bad(pmd); + return 1; + } + return 0; +} +static inline __attribute__((always_inline)) pte_t __ptep_modify_prot_start(struct mm_struct *mm, + unsigned long addr, + pte_t *ptep) +{ + return ptep_get_and_clear(mm, addr, ptep); +} +static inline __attribute__((always_inline)) void __ptep_modify_prot_commit(struct mm_struct *mm, + unsigned long addr, + pte_t *ptep, pte_t pte) +{ + set_pte_at(mm, addr, ptep, pte); +} +extern int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t *prot, + unsigned long pfn, unsigned long size); +extern int track_pfn_vma_copy(struct vm_area_struct *vma); +extern void untrack_pfn_vma(struct vm_area_struct *vma, unsigned long pfn, + unsigned long size); +extern struct kmem_cache *vm_area_cachep; +extern pgprot_t protection_map[16]; +static inline __attribute__((always_inline)) int is_linear_pfn_mapping(struct vm_area_struct *vma) +{ + return !!(vma->vm_flags & 0x40000000); +} +static inline __attribute__((always_inline)) int is_pfn_mapping(struct vm_area_struct *vma) +{ + return !!(vma->vm_flags & 0x00000400); +} +struct vm_fault { + unsigned int flags; + unsigned long pgoff; + void *virtual_address; + struct page *page; +}; +struct vm_operations_struct { + void (*open)(struct vm_area_struct * area); + void (*close)(struct vm_area_struct * area); + int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf); + int (*page_mkwrite)(struct vm_area_struct *vma, struct vm_fault *vmf); + int (*access)(struct vm_area_struct *vma, unsigned long addr, + void *buf, int len, int write); +}; +struct mmu_gather; +struct inode; +enum pageflags { + PG_locked, + PG_error, + PG_referenced, + PG_uptodate, + PG_dirty, + PG_lru, + PG_active, + PG_slab, + PG_owner_priv_1, + PG_arch_1, + PG_reserved, + PG_private, + PG_private_2, + PG_writeback, + PG_head, + PG_tail, + PG_swapcache, + PG_mappedtodisk, + PG_reclaim, + PG_swapbacked, + PG_unevictable, + PG_mlocked, + PG_uncached, + PG_compound_lock, + __NR_PAGEFLAGS, + PG_checked = PG_owner_priv_1, + PG_fscache = PG_private_2, + PG_pinned = PG_owner_priv_1, + PG_savepinned = PG_dirty, + PG_slob_free = PG_private, + PG_slub_frozen = PG_active, +}; +struct page; +static inline __attribute__((always_inline)) int PageLocked(struct page *page) { return (__builtin_constant_p((PG_locked)) ? constant_test_bit((PG_locked), (&page->flags)) : variable_test_bit((PG_locked), (&page->flags))); } +static inline __attribute__((always_inline)) int PageError(struct page *page) { return (__builtin_constant_p((PG_error)) ? constant_test_bit((PG_error), (&page->flags)) : variable_test_bit((PG_error), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageError(struct page *page) { set_bit(PG_error, &page->flags); } static inline __attribute__((always_inline)) void ClearPageError(struct page *page) { clear_bit(PG_error, &page->flags); } static inline __attribute__((always_inline)) int TestClearPageError(struct page *page) { return test_and_clear_bit(PG_error, &page->flags); } +static inline __attribute__((always_inline)) int PageReferenced(struct page *page) { return (__builtin_constant_p((PG_referenced)) ? constant_test_bit((PG_referenced), (&page->flags)) : variable_test_bit((PG_referenced), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageReferenced(struct page *page) { set_bit(PG_referenced, &page->flags); } static inline __attribute__((always_inline)) void ClearPageReferenced(struct page *page) { clear_bit(PG_referenced, &page->flags); } static inline __attribute__((always_inline)) int TestClearPageReferenced(struct page *page) { return test_and_clear_bit(PG_referenced, &page->flags); } +static inline __attribute__((always_inline)) int PageDirty(struct page *page) { return (__builtin_constant_p((PG_dirty)) ? constant_test_bit((PG_dirty), (&page->flags)) : variable_test_bit((PG_dirty), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageDirty(struct page *page) { set_bit(PG_dirty, &page->flags); } static inline __attribute__((always_inline)) void ClearPageDirty(struct page *page) { clear_bit(PG_dirty, &page->flags); } static inline __attribute__((always_inline)) int TestSetPageDirty(struct page *page) { return test_and_set_bit(PG_dirty, &page->flags); } static inline __attribute__((always_inline)) int TestClearPageDirty(struct page *page) { return test_and_clear_bit(PG_dirty, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageDirty(struct page *page) { __clear_bit(PG_dirty, &page->flags); } +static inline __attribute__((always_inline)) int PageLRU(struct page *page) { return (__builtin_constant_p((PG_lru)) ? constant_test_bit((PG_lru), (&page->flags)) : variable_test_bit((PG_lru), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageLRU(struct page *page) { set_bit(PG_lru, &page->flags); } static inline __attribute__((always_inline)) void ClearPageLRU(struct page *page) { clear_bit(PG_lru, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageLRU(struct page *page) { __clear_bit(PG_lru, &page->flags); } +static inline __attribute__((always_inline)) int PageActive(struct page *page) { return (__builtin_constant_p((PG_active)) ? constant_test_bit((PG_active), (&page->flags)) : variable_test_bit((PG_active), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageActive(struct page *page) { set_bit(PG_active, &page->flags); } static inline __attribute__((always_inline)) void ClearPageActive(struct page *page) { clear_bit(PG_active, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageActive(struct page *page) { __clear_bit(PG_active, &page->flags); } + static inline __attribute__((always_inline)) int TestClearPageActive(struct page *page) { return test_and_clear_bit(PG_active, &page->flags); } +static inline __attribute__((always_inline)) int PageSlab(struct page *page) { return (__builtin_constant_p((PG_slab)) ? constant_test_bit((PG_slab), (&page->flags)) : variable_test_bit((PG_slab), (&page->flags))); } static inline __attribute__((always_inline)) void __SetPageSlab(struct page *page) { __set_bit(PG_slab, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageSlab(struct page *page) { __clear_bit(PG_slab, &page->flags); } +static inline __attribute__((always_inline)) int PageChecked(struct page *page) { return (__builtin_constant_p((PG_checked)) ? constant_test_bit((PG_checked), (&page->flags)) : variable_test_bit((PG_checked), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageChecked(struct page *page) { set_bit(PG_checked, &page->flags); } static inline __attribute__((always_inline)) void ClearPageChecked(struct page *page) { clear_bit(PG_checked, &page->flags); } +static inline __attribute__((always_inline)) int PagePinned(struct page *page) { return (__builtin_constant_p((PG_pinned)) ? constant_test_bit((PG_pinned), (&page->flags)) : variable_test_bit((PG_pinned), (&page->flags))); } static inline __attribute__((always_inline)) void SetPagePinned(struct page *page) { set_bit(PG_pinned, &page->flags); } static inline __attribute__((always_inline)) void ClearPagePinned(struct page *page) { clear_bit(PG_pinned, &page->flags); } static inline __attribute__((always_inline)) int TestSetPagePinned(struct page *page) { return test_and_set_bit(PG_pinned, &page->flags); } static inline __attribute__((always_inline)) int TestClearPagePinned(struct page *page) { return test_and_clear_bit(PG_pinned, &page->flags); } +static inline __attribute__((always_inline)) int PageSavePinned(struct page *page) { return (__builtin_constant_p((PG_savepinned)) ? constant_test_bit((PG_savepinned), (&page->flags)) : variable_test_bit((PG_savepinned), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageSavePinned(struct page *page) { set_bit(PG_savepinned, &page->flags); } static inline __attribute__((always_inline)) void ClearPageSavePinned(struct page *page) { clear_bit(PG_savepinned, &page->flags); }; +static inline __attribute__((always_inline)) int PageReserved(struct page *page) { return (__builtin_constant_p((PG_reserved)) ? constant_test_bit((PG_reserved), (&page->flags)) : variable_test_bit((PG_reserved), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageReserved(struct page *page) { set_bit(PG_reserved, &page->flags); } static inline __attribute__((always_inline)) void ClearPageReserved(struct page *page) { clear_bit(PG_reserved, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageReserved(struct page *page) { __clear_bit(PG_reserved, &page->flags); } +static inline __attribute__((always_inline)) int PageSwapBacked(struct page *page) { return (__builtin_constant_p((PG_swapbacked)) ? constant_test_bit((PG_swapbacked), (&page->flags)) : variable_test_bit((PG_swapbacked), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageSwapBacked(struct page *page) { set_bit(PG_swapbacked, &page->flags); } static inline __attribute__((always_inline)) void ClearPageSwapBacked(struct page *page) { clear_bit(PG_swapbacked, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageSwapBacked(struct page *page) { __clear_bit(PG_swapbacked, &page->flags); } +static inline __attribute__((always_inline)) int PageSlobFree(struct page *page) { return (__builtin_constant_p((PG_slob_free)) ? constant_test_bit((PG_slob_free), (&page->flags)) : variable_test_bit((PG_slob_free), (&page->flags))); } static inline __attribute__((always_inline)) void __SetPageSlobFree(struct page *page) { __set_bit(PG_slob_free, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageSlobFree(struct page *page) { __clear_bit(PG_slob_free, &page->flags); } +static inline __attribute__((always_inline)) int PageSlubFrozen(struct page *page) { return (__builtin_constant_p((PG_slub_frozen)) ? constant_test_bit((PG_slub_frozen), (&page->flags)) : variable_test_bit((PG_slub_frozen), (&page->flags))); } static inline __attribute__((always_inline)) void __SetPageSlubFrozen(struct page *page) { __set_bit(PG_slub_frozen, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageSlubFrozen(struct page *page) { __clear_bit(PG_slub_frozen, &page->flags); } +static inline __attribute__((always_inline)) int PagePrivate(struct page *page) { return (__builtin_constant_p((PG_private)) ? constant_test_bit((PG_private), (&page->flags)) : variable_test_bit((PG_private), (&page->flags))); } static inline __attribute__((always_inline)) void SetPagePrivate(struct page *page) { set_bit(PG_private, &page->flags); } static inline __attribute__((always_inline)) void ClearPagePrivate(struct page *page) { clear_bit(PG_private, &page->flags); } static inline __attribute__((always_inline)) void __SetPagePrivate(struct page *page) { __set_bit(PG_private, &page->flags); } + static inline __attribute__((always_inline)) void __ClearPagePrivate(struct page *page) { __clear_bit(PG_private, &page->flags); } +static inline __attribute__((always_inline)) int PagePrivate2(struct page *page) { return (__builtin_constant_p((PG_private_2)) ? constant_test_bit((PG_private_2), (&page->flags)) : variable_test_bit((PG_private_2), (&page->flags))); } static inline __attribute__((always_inline)) void SetPagePrivate2(struct page *page) { set_bit(PG_private_2, &page->flags); } static inline __attribute__((always_inline)) void ClearPagePrivate2(struct page *page) { clear_bit(PG_private_2, &page->flags); } static inline __attribute__((always_inline)) int TestSetPagePrivate2(struct page *page) { return test_and_set_bit(PG_private_2, &page->flags); } static inline __attribute__((always_inline)) int TestClearPagePrivate2(struct page *page) { return test_and_clear_bit(PG_private_2, &page->flags); } +static inline __attribute__((always_inline)) int PageOwnerPriv1(struct page *page) { return (__builtin_constant_p((PG_owner_priv_1)) ? constant_test_bit((PG_owner_priv_1), (&page->flags)) : variable_test_bit((PG_owner_priv_1), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageOwnerPriv1(struct page *page) { set_bit(PG_owner_priv_1, &page->flags); } static inline __attribute__((always_inline)) void ClearPageOwnerPriv1(struct page *page) { clear_bit(PG_owner_priv_1, &page->flags); } static inline __attribute__((always_inline)) int TestClearPageOwnerPriv1(struct page *page) { return test_and_clear_bit(PG_owner_priv_1, &page->flags); } +static inline __attribute__((always_inline)) int PageWriteback(struct page *page) { return (__builtin_constant_p((PG_writeback)) ? constant_test_bit((PG_writeback), (&page->flags)) : variable_test_bit((PG_writeback), (&page->flags))); } static inline __attribute__((always_inline)) int TestSetPageWriteback(struct page *page) { return test_and_set_bit(PG_writeback, &page->flags); } static inline __attribute__((always_inline)) int TestClearPageWriteback(struct page *page) { return test_and_clear_bit(PG_writeback, &page->flags); } +static inline __attribute__((always_inline)) int PageMappedToDisk(struct page *page) { return (__builtin_constant_p((PG_mappedtodisk)) ? constant_test_bit((PG_mappedtodisk), (&page->flags)) : variable_test_bit((PG_mappedtodisk), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageMappedToDisk(struct page *page) { set_bit(PG_mappedtodisk, &page->flags); } static inline __attribute__((always_inline)) void ClearPageMappedToDisk(struct page *page) { clear_bit(PG_mappedtodisk, &page->flags); } +static inline __attribute__((always_inline)) int PageReclaim(struct page *page) { return (__builtin_constant_p((PG_reclaim)) ? constant_test_bit((PG_reclaim), (&page->flags)) : variable_test_bit((PG_reclaim), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageReclaim(struct page *page) { set_bit(PG_reclaim, &page->flags); } static inline __attribute__((always_inline)) void ClearPageReclaim(struct page *page) { clear_bit(PG_reclaim, &page->flags); } static inline __attribute__((always_inline)) int TestClearPageReclaim(struct page *page) { return test_and_clear_bit(PG_reclaim, &page->flags); } +static inline __attribute__((always_inline)) int PageReadahead(struct page *page) { return (__builtin_constant_p((PG_reclaim)) ? constant_test_bit((PG_reclaim), (&page->flags)) : variable_test_bit((PG_reclaim), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageReadahead(struct page *page) { set_bit(PG_reclaim, &page->flags); } static inline __attribute__((always_inline)) void ClearPageReadahead(struct page *page) { clear_bit(PG_reclaim, &page->flags); } +static inline __attribute__((always_inline)) int PageSwapCache(struct page *page) { return (__builtin_constant_p((PG_swapcache)) ? constant_test_bit((PG_swapcache), (&page->flags)) : variable_test_bit((PG_swapcache), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageSwapCache(struct page *page) { set_bit(PG_swapcache, &page->flags); } static inline __attribute__((always_inline)) void ClearPageSwapCache(struct page *page) { clear_bit(PG_swapcache, &page->flags); } +static inline __attribute__((always_inline)) int PageUnevictable(struct page *page) { return (__builtin_constant_p((PG_unevictable)) ? constant_test_bit((PG_unevictable), (&page->flags)) : variable_test_bit((PG_unevictable), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageUnevictable(struct page *page) { set_bit(PG_unevictable, &page->flags); } static inline __attribute__((always_inline)) void ClearPageUnevictable(struct page *page) { clear_bit(PG_unevictable, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageUnevictable(struct page *page) { __clear_bit(PG_unevictable, &page->flags); } + static inline __attribute__((always_inline)) int TestClearPageUnevictable(struct page *page) { return test_and_clear_bit(PG_unevictable, &page->flags); } +static inline __attribute__((always_inline)) int PageMlocked(struct page *page) { return (__builtin_constant_p((PG_mlocked)) ? constant_test_bit((PG_mlocked), (&page->flags)) : variable_test_bit((PG_mlocked), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageMlocked(struct page *page) { set_bit(PG_mlocked, &page->flags); } static inline __attribute__((always_inline)) void ClearPageMlocked(struct page *page) { clear_bit(PG_mlocked, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageMlocked(struct page *page) { __clear_bit(PG_mlocked, &page->flags); } + static inline __attribute__((always_inline)) int TestSetPageMlocked(struct page *page) { return test_and_set_bit(PG_mlocked, &page->flags); } static inline __attribute__((always_inline)) int TestClearPageMlocked(struct page *page) { return test_and_clear_bit(PG_mlocked, &page->flags); } static inline __attribute__((always_inline)) int __TestClearPageMlocked(struct page *page) { return __test_and_clear_bit(PG_mlocked, &page->flags); } +static inline __attribute__((always_inline)) int PageUncached(struct page *page) { return (__builtin_constant_p((PG_uncached)) ? constant_test_bit((PG_uncached), (&page->flags)) : variable_test_bit((PG_uncached), (&page->flags))); } static inline __attribute__((always_inline)) void SetPageUncached(struct page *page) { set_bit(PG_uncached, &page->flags); } static inline __attribute__((always_inline)) void ClearPageUncached(struct page *page) { clear_bit(PG_uncached, &page->flags); } +static inline __attribute__((always_inline)) int PageHWPoison(struct page *page) { return 0; } +u64 stable_page_flags(struct page *page); +static inline __attribute__((always_inline)) int PageUptodate(struct page *page) +{ + int ret = (__builtin_constant_p((PG_uptodate)) ? constant_test_bit((PG_uptodate), (&(page)->flags)) : variable_test_bit((PG_uptodate), (&(page)->flags))); + if (__builtin_constant_p(((ret))) ? !!((ret)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/page-flags.h", .line = 295, }; ______r = !!((ret)); ______f.miss_hit[______r]++; ______r; })) + __asm__ __volatile__("": : :"memory"); + return ret; +} +static inline __attribute__((always_inline)) void __SetPageUptodate(struct page *page) +{ + __asm__ __volatile__("": : :"memory"); + __set_bit(PG_uptodate, &(page)->flags); +} +static inline __attribute__((always_inline)) void SetPageUptodate(struct page *page) +{ + __asm__ __volatile__("": : :"memory"); + set_bit(PG_uptodate, &(page)->flags); +} +static inline __attribute__((always_inline)) void ClearPageUptodate(struct page *page) { clear_bit(PG_uptodate, &page->flags); } +extern void cancel_dirty_page(struct page *page, unsigned int account_size); +int test_clear_page_writeback(struct page *page); +int test_set_page_writeback(struct page *page); +static inline __attribute__((always_inline)) void set_page_writeback(struct page *page) +{ + test_set_page_writeback(page); +} +static inline __attribute__((always_inline)) int PageHead(struct page *page) { return (__builtin_constant_p((PG_head)) ? constant_test_bit((PG_head), (&page->flags)) : variable_test_bit((PG_head), (&page->flags))); } static inline __attribute__((always_inline)) void __SetPageHead(struct page *page) { __set_bit(PG_head, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageHead(struct page *page) { __clear_bit(PG_head, &page->flags); } static inline __attribute__((always_inline)) void ClearPageHead(struct page *page) { clear_bit(PG_head, &page->flags); } +static inline __attribute__((always_inline)) int PageTail(struct page *page) { return (__builtin_constant_p((PG_tail)) ? constant_test_bit((PG_tail), (&page->flags)) : variable_test_bit((PG_tail), (&page->flags))); } static inline __attribute__((always_inline)) void __SetPageTail(struct page *page) { __set_bit(PG_tail, &page->flags); } static inline __attribute__((always_inline)) void __ClearPageTail(struct page *page) { __clear_bit(PG_tail, &page->flags); } +static inline __attribute__((always_inline)) int PageCompound(struct page *page) +{ + return page->flags & ((1L << PG_head) | (1L << PG_tail)); +} +static inline __attribute__((always_inline)) void ClearPageCompound(struct page *page) +{ + do { if (__builtin_constant_p((((__builtin_constant_p(!PageHead(page)) ? !!(!PageHead(page)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/page-flags.h", .line = 356, }; ______r = __builtin_expect(!!(!PageHead(page)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(!PageHead(page)) ? !!(!PageHead(page)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/page-flags.h", .line = 356, }; ______r = __builtin_expect(!!(!PageHead(page)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/page-flags.h", .line = 356, }; ______r = !!(((__builtin_constant_p(!PageHead(page)) ? !!(!PageHead(page)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/page-flags.h", .line = 356, }; ______r = __builtin_expect(!!(!PageHead(page)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/page-flags.h"), "i" (356), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); } while(0); + ClearPageHead(page); +} +static inline __attribute__((always_inline)) int PageTransHuge(struct page *page) +{ + do { (void)(PageTail(page)); } while (0); + return PageHead(page); +} +static inline __attribute__((always_inline)) int PageTransCompound(struct page *page) +{ + return PageCompound(page); +} +static inline __attribute__((always_inline)) int page_has_private(struct page *page) +{ + return !!(page->flags & (1 << PG_private | 1 << PG_private_2)); +} +extern int do_huge_pmd_anonymous_page(struct mm_struct *mm, + struct vm_area_struct *vma, + unsigned long address, pmd_t *pmd, + unsigned int flags); +extern int copy_huge_pmd(struct mm_struct *dst_mm, struct mm_struct *src_mm, + pmd_t *dst_pmd, pmd_t *src_pmd, unsigned long addr, + struct vm_area_struct *vma); +extern int do_huge_pmd_wp_page(struct mm_struct *mm, struct vm_area_struct *vma, + unsigned long address, pmd_t *pmd, + pmd_t orig_pmd); +extern pgtable_t get_pmd_huge_pte(struct mm_struct *mm); +extern struct page *follow_trans_huge_pmd(struct mm_struct *mm, + unsigned long addr, + pmd_t *pmd, + unsigned int flags); +extern int zap_huge_pmd(struct mmu_gather *tlb, + struct vm_area_struct *vma, + pmd_t *pmd); +extern int mincore_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd, + unsigned long addr, unsigned long end, + unsigned char *vec); +extern int change_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd, + unsigned long addr, pgprot_t newprot); +enum transparent_hugepage_flag { + TRANSPARENT_HUGEPAGE_FLAG, + TRANSPARENT_HUGEPAGE_REQ_MADV_FLAG, + TRANSPARENT_HUGEPAGE_DEFRAG_FLAG, + TRANSPARENT_HUGEPAGE_DEFRAG_REQ_MADV_FLAG, + TRANSPARENT_HUGEPAGE_DEFRAG_KHUGEPAGED_FLAG, +}; +enum page_check_address_pmd_flag { + PAGE_CHECK_ADDRESS_PMD_FLAG, + PAGE_CHECK_ADDRESS_PMD_NOTSPLITTING_FLAG, + PAGE_CHECK_ADDRESS_PMD_SPLITTING_FLAG, +}; +extern pmd_t *page_check_address_pmd(struct page *page, + struct mm_struct *mm, + unsigned long address, + enum page_check_address_pmd_flag flag); +extern unsigned long transparent_hugepage_flags; +extern int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm, + pmd_t *dst_pmd, pmd_t *src_pmd, + struct vm_area_struct *vma, + unsigned long addr, unsigned long end); +extern int handle_pte_fault(struct mm_struct *mm, + struct vm_area_struct *vma, unsigned long address, + pte_t *pte, pmd_t *pmd, unsigned int flags); +extern int split_huge_page(struct page *page); +extern void __split_huge_page_pmd(struct mm_struct *mm, pmd_t *pmd); +extern int hugepage_madvise(struct vm_area_struct *vma, + unsigned long *vm_flags, int advice); +extern void __vma_adjust_trans_huge(struct vm_area_struct *vma, + unsigned long start, + unsigned long end, + long adjust_next); +static inline __attribute__((always_inline)) void vma_adjust_trans_huge(struct vm_area_struct *vma, + unsigned long start, + unsigned long end, + long adjust_next) +{ + if (__builtin_constant_p(((!vma->anon_vma || vma->vm_ops))) ? !!((!vma->anon_vma || vma->vm_ops)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/huge_mm.h", .line = 116, }; ______r = !!((!vma->anon_vma || vma->vm_ops)); ______f.miss_hit[______r]++; ______r; })) + return; + __vma_adjust_trans_huge(vma, start, end, adjust_next); +} +static inline __attribute__((always_inline)) int hpage_nr_pages(struct page *page) +{ + if (__builtin_constant_p((((__builtin_constant_p(PageTransHuge(page)) ? !!(PageTransHuge(page)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/huge_mm.h", .line = 122, }; ______r = __builtin_expect(!!(PageTransHuge(page)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(PageTransHuge(page)) ? !!(PageTransHuge(page)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/huge_mm.h", .line = 122, }; ______r = __builtin_expect(!!(PageTransHuge(page)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/huge_mm.h", .line = 122, }; ______r = !!(((__builtin_constant_p(PageTransHuge(page)) ? !!(PageTransHuge(page)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/huge_mm.h", .line = 122, }; ______r = __builtin_expect(!!(PageTransHuge(page)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + return (1<<(21 -12)); + return 1; +} +static inline __attribute__((always_inline)) struct page *compound_trans_head(struct page *page) +{ + if (__builtin_constant_p(((PageTail(page)))) ? !!((PageTail(page))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/huge_mm.h", .line = 128, }; ______r = !!((PageTail(page))); ______f.miss_hit[______r]++; ______r; })) { + struct page *head; + head = page->first_page; + __asm__ __volatile__("": : :"memory"); + if (__builtin_constant_p(((PageTail(page)))) ? !!((PageTail(page))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/huge_mm.h", .line = 138, }; ______r = !!((PageTail(page))); ______f.miss_hit[______r]++; ______r; })) + return head; + } + return page; +} +static inline __attribute__((always_inline)) int put_page_testzero(struct page *page) +{ + do { (void)(atomic_read(&page->_count) == 0); } while (0); + return atomic_dec_and_test(&page->_count); +} +static inline __attribute__((always_inline)) int get_page_unless_zero(struct page *page) +{ + return atomic_add_unless((&page->_count), 1, 0); +} +extern int page_is_ram(unsigned long pfn); +struct page *vmalloc_to_page(const void *addr); +unsigned long vmalloc_to_pfn(const void *addr); +static inline __attribute__((always_inline)) int is_vmalloc_addr(const void *x) +{ + unsigned long addr = (unsigned long)x; + return addr >= ((unsigned long)high_memory + (8 * 1024 * 1024)) && addr < ((((((unsigned long)__FIXADDR_TOP) - (__end_of_fixed_addresses << 12)) - ((1UL) << 12) * (512 + 1)) & (~((1UL << 21) - 1))) - 2 * ((1UL) << 12)); +} +extern int is_vmalloc_or_module_addr(const void *x); +static inline __attribute__((always_inline)) void compound_lock(struct page *page) +{ + bit_spin_lock(PG_compound_lock, &page->flags); +} +static inline __attribute__((always_inline)) void compound_unlock(struct page *page) +{ + bit_spin_unlock(PG_compound_lock, &page->flags); +} +static inline __attribute__((always_inline)) unsigned long compound_lock_irqsave(struct page *page) +{ + unsigned long flags = flags; + do { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); flags = arch_local_irq_save(); } while (0); trace_hardirqs_off(); } while (0); + compound_lock(page); + return flags; +} +static inline __attribute__((always_inline)) void compound_unlock_irqrestore(struct page *page, + unsigned long flags) +{ + compound_unlock(page); + do { if (__builtin_constant_p(((({ ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_irqs_disabled_flags(flags); })))) ? !!((({ ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_irqs_disabled_flags(flags); }))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 347, }; ______r = !!((({ ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_irqs_disabled_flags(flags); }))); ______f.miss_hit[______r]++; ______r; })) { do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(flags); } while (0); trace_hardirqs_off(); } else { trace_hardirqs_on(); do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(flags); } while (0); } } while (0); +} +static inline __attribute__((always_inline)) struct page *compound_head(struct page *page) +{ + if (__builtin_constant_p((((__builtin_constant_p(PageTail(page)) ? !!(PageTail(page)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 353, }; ______r = __builtin_expect(!!(PageTail(page)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(PageTail(page)) ? !!(PageTail(page)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 353, }; ______r = __builtin_expect(!!(PageTail(page)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 353, }; ______r = !!(((__builtin_constant_p(PageTail(page)) ? !!(PageTail(page)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 353, }; ______r = __builtin_expect(!!(PageTail(page)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + return page->first_page; + return page; +} +static inline __attribute__((always_inline)) int page_count(struct page *page) +{ + return atomic_read(&compound_head(page)->_count); +} +static inline __attribute__((always_inline)) void get_page(struct page *page) +{ + do { (void)(atomic_read(&page->_count) < !PageTail(page)); } while (0); + atomic_inc(&page->_count); + if (__builtin_constant_p((((__builtin_constant_p(PageTail(page)) ? !!(PageTail(page)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 379, }; ______r = __builtin_expect(!!(PageTail(page)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(PageTail(page)) ? !!(PageTail(page)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 379, }; ______r = __builtin_expect(!!(PageTail(page)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 379, }; ______r = !!(((__builtin_constant_p(PageTail(page)) ? !!(PageTail(page)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 379, }; ______r = __builtin_expect(!!(PageTail(page)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) { + do { (void)(atomic_read(&page->first_page->_count) <= 0); } while (0); + atomic_inc(&page->first_page->_count); + } +} +static inline __attribute__((always_inline)) struct page *virt_to_head_page(const void *x) +{ + struct page *page = (mem_map + (((((unsigned long)(x)) - ((unsigned long)(0xC0000000UL))) >> 12) - (0UL))); + return compound_head(page); +} +static inline __attribute__((always_inline)) void init_page_count(struct page *page) +{ + atomic_set(&page->_count, 1); +} +static inline __attribute__((always_inline)) int PageBuddy(struct page *page) +{ + return atomic_read(&page->_mapcount) == (-128); +} +static inline __attribute__((always_inline)) void __SetPageBuddy(struct page *page) +{ + do { (void)(atomic_read(&page->_mapcount) != -1); } while (0); + atomic_set(&page->_mapcount, (-128)); +} +static inline __attribute__((always_inline)) void __ClearPageBuddy(struct page *page) +{ + do { (void)(!PageBuddy(page)); } while (0); + atomic_set(&page->_mapcount, -1); +} +void put_page(struct page *page); +void put_pages_list(struct list_head *pages); +void split_page(struct page *page, unsigned int order); +int split_free_page(struct page *page); +typedef void compound_page_dtor(struct page *); +static inline __attribute__((always_inline)) void set_compound_page_dtor(struct page *page, + compound_page_dtor *dtor) +{ + page[1].lru.next = (void *)dtor; +} +static inline __attribute__((always_inline)) compound_page_dtor *get_compound_page_dtor(struct page *page) +{ + return (compound_page_dtor *)page[1].lru.next; +} +static inline __attribute__((always_inline)) int compound_order(struct page *page) +{ + if (__builtin_constant_p(((!PageHead(page)))) ? !!((!PageHead(page))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 459, }; ______r = !!((!PageHead(page))); ______f.miss_hit[______r]++; ______r; })) + return 0; + return (unsigned long)page[1].lru.prev; +} +static inline __attribute__((always_inline)) int compound_trans_order(struct page *page) +{ + int order; + unsigned long flags; + if (__builtin_constant_p(((!PageHead(page)))) ? !!((!PageHead(page))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 469, }; ______r = !!((!PageHead(page))); ______f.miss_hit[______r]++; ______r; })) + return 0; + flags = compound_lock_irqsave(page); + order = compound_order(page); + compound_unlock_irqrestore(page, flags); + return order; +} +static inline __attribute__((always_inline)) void set_compound_order(struct page *page, unsigned long order) +{ + page[1].lru.prev = (void *)order; +} +static inline __attribute__((always_inline)) pte_t maybe_mkwrite(pte_t pte, struct vm_area_struct *vma) +{ + if (__builtin_constant_p((((__builtin_constant_p(vma->vm_flags & 0x00000002) ? !!(vma->vm_flags & 0x00000002) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 492, }; ______r = __builtin_expect(!!(vma->vm_flags & 0x00000002), 1); ftrace_likely_update(&______f, ______r, 1); ______r; }))))) ? !!(((__builtin_constant_p(vma->vm_flags & 0x00000002) ? !!(vma->vm_flags & 0x00000002) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 492, }; ______r = __builtin_expect(!!(vma->vm_flags & 0x00000002), 1); ftrace_likely_update(&______f, ______r, 1); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 492, }; ______r = !!(((__builtin_constant_p(vma->vm_flags & 0x00000002) ? !!(vma->vm_flags & 0x00000002) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 492, }; ______r = __builtin_expect(!!(vma->vm_flags & 0x00000002), 1); ftrace_likely_update(&______f, ______r, 1); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + pte = pte_mkwrite(pte); + return pte; +} +static inline __attribute__((always_inline)) enum zone_type page_zonenum(struct page *page) +{ + return (page->flags >> (((((sizeof(unsigned long)*8) - 0) - 0) - 2) * (2 != 0))) & ((1UL << 2) - 1); +} +static inline __attribute__((always_inline)) int page_zone_id(struct page *page) +{ + return (page->flags >> ((((((sizeof(unsigned long)*8) - 0) - 0) < ((((sizeof(unsigned long)*8) - 0) - 0) - 2))? (((sizeof(unsigned long)*8) - 0) - 0) : ((((sizeof(unsigned long)*8) - 0) - 0) - 2)) * ((0 + 2) != 0))) & ((1UL << (0 + 2)) - 1); +} +static inline __attribute__((always_inline)) int zone_to_nid(struct zone *zone) +{ + return 0; +} +static inline __attribute__((always_inline)) int page_to_nid(struct page *page) +{ + return (page->flags >> ((((sizeof(unsigned long)*8) - 0) - 0) * (0 != 0))) & ((1UL << 0) - 1); +} +static inline __attribute__((always_inline)) struct zone *page_zone(struct page *page) +{ + return &(&contig_page_data)->node_zones[page_zonenum(page)]; +} +static inline __attribute__((always_inline)) void set_page_zone(struct page *page, enum zone_type zone) +{ + page->flags &= ~(((1UL << 2) - 1) << (((((sizeof(unsigned long)*8) - 0) - 0) - 2) * (2 != 0))); + page->flags |= (zone & ((1UL << 2) - 1)) << (((((sizeof(unsigned long)*8) - 0) - 0) - 2) * (2 != 0)); +} +static inline __attribute__((always_inline)) void set_page_node(struct page *page, unsigned long node) +{ + page->flags &= ~(((1UL << 0) - 1) << ((((sizeof(unsigned long)*8) - 0) - 0) * (0 != 0))); + page->flags |= (node & ((1UL << 0) - 1)) << ((((sizeof(unsigned long)*8) - 0) - 0) * (0 != 0)); +} +static inline __attribute__((always_inline)) void set_page_links(struct page *page, enum zone_type zone, + unsigned long node, unsigned long pfn) +{ + set_page_zone(page, zone); + set_page_node(page, node); +} +enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, + PGALLOC_DMA, PGALLOC_NORMAL , PGALLOC_HIGH , PGALLOC_MOVABLE, + PGFREE, PGACTIVATE, PGDEACTIVATE, + PGFAULT, PGMAJFAULT, + PGREFILL_DMA, PGREFILL_NORMAL , PGREFILL_HIGH , PGREFILL_MOVABLE, + PGSTEAL_DMA, PGSTEAL_NORMAL , PGSTEAL_HIGH , PGSTEAL_MOVABLE, + PGSCAN_KSWAPD_DMA, PGSCAN_KSWAPD_NORMAL , PGSCAN_KSWAPD_HIGH , PGSCAN_KSWAPD_MOVABLE, + PGSCAN_DIRECT_DMA, PGSCAN_DIRECT_NORMAL , PGSCAN_DIRECT_HIGH , PGSCAN_DIRECT_MOVABLE, + PGINODESTEAL, SLABS_SCANNED, KSWAPD_STEAL, KSWAPD_INODESTEAL, + KSWAPD_LOW_WMARK_HIT_QUICKLY, KSWAPD_HIGH_WMARK_HIT_QUICKLY, + KSWAPD_SKIP_CONGESTION_WAIT, + PAGEOUTRUN, ALLOCSTALL, PGROTATED, + COMPACTBLOCKS, COMPACTPAGES, COMPACTPAGEFAILED, + COMPACTSTALL, COMPACTFAIL, COMPACTSUCCESS, + UNEVICTABLE_PGCULLED, + UNEVICTABLE_PGSCANNED, + UNEVICTABLE_PGRESCUED, + UNEVICTABLE_PGMLOCKED, + UNEVICTABLE_PGMUNLOCKED, + UNEVICTABLE_PGCLEARED, + UNEVICTABLE_PGSTRANDED, + UNEVICTABLE_MLOCKFREED, + THP_FAULT_ALLOC, + THP_FAULT_FALLBACK, + THP_COLLAPSE_ALLOC, + THP_COLLAPSE_ALLOC_FAILED, + THP_SPLIT, + NR_VM_EVENT_ITEMS +}; +extern int sysctl_stat_interval; +struct vm_event_state { + unsigned long event[NR_VM_EVENT_ITEMS]; +}; +extern __attribute__((section(".data..percpu" ""))) __typeof__(struct vm_event_state) vm_event_states; +static inline __attribute__((always_inline)) void __count_vm_event(enum vm_event_item item) +{ + do { do { const void *__vpp_verify = (typeof(&(((vm_event_states.event[item])))))((void *)0); (void)__vpp_verify; } while (0); switch(sizeof(((vm_event_states.event[item])))) { case 1: do { typedef typeof((((vm_event_states.event[item])))) pao_T__; const int pao_ID__ = (__builtin_constant_p((1)) && (((1)) == 1 || ((1)) == -1)) ? ((1)) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((1)); (void)pao_tmp__; } switch (sizeof((((vm_event_states.event[item]))))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item])))) : "qi" ((pao_T__)((1)))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item])))) : "ri" ((pao_T__)((1)))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item])))) : "ri" ((pao_T__)((1)))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item])))) : "re" ((pao_T__)((1)))); break; default: __bad_percpu_size(); } } while (0);break; case 2: do { typedef typeof((((vm_event_states.event[item])))) pao_T__; const int pao_ID__ = (__builtin_constant_p((1)) && (((1)) == 1 || ((1)) == -1)) ? ((1)) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((1)); (void)pao_tmp__; } switch (sizeof((((vm_event_states.event[item]))))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item])))) : "qi" ((pao_T__)((1)))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item])))) : "ri" ((pao_T__)((1)))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item])))) : "ri" ((pao_T__)((1)))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item])))) : "re" ((pao_T__)((1)))); break; default: __bad_percpu_size(); } } while (0);break; case 4: do { typedef typeof((((vm_event_states.event[item])))) pao_T__; const int pao_ID__ = (__builtin_constant_p((1)) && (((1)) == 1 || ((1)) == -1)) ? ((1)) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((1)); (void)pao_tmp__; } switch (sizeof((((vm_event_states.event[item]))))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item])))) : "qi" ((pao_T__)((1)))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item])))) : "ri" ((pao_T__)((1)))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item])))) : "ri" ((pao_T__)((1)))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 32, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item])))) : "re" ((pao_T__)((1)))); break; default: __bad_percpu_size(); } } while (0);break; case 8: do { *({ unsigned long tcp_ptr__; do { const void *__vpp_verify = (typeof(&((((vm_event_states.event[item]))))))((void *)0); (void)__vpp_verify; } while (0); asm volatile("add " "%%""fs"":" "%P" "1" ", %0" : "=r" (tcp_ptr__) : "m" (this_cpu_off), "0" (&((((vm_event_states.event[item])))))); (typeof(*(&((((vm_event_states.event[item])))))) *)tcp_ptr__; }) += ((1)); } while (0);break; default: __bad_size_call_parameter();break; } } while (0); +} +static inline __attribute__((always_inline)) void count_vm_event(enum vm_event_item item) +{ + do { do { const void *__vpp_verify = (typeof(&(((vm_event_states.event[item])))))((void *)0); (void)__vpp_verify; } while (0); switch(sizeof(((vm_event_states.event[item])))) { case 1: do { typedef typeof((((vm_event_states.event[item])))) pao_T__; const int pao_ID__ = (__builtin_constant_p((1)) && (((1)) == 1 || ((1)) == -1)) ? ((1)) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((1)); (void)pao_tmp__; } switch (sizeof((((vm_event_states.event[item]))))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item])))) : "qi" ((pao_T__)((1)))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item])))) : "ri" ((pao_T__)((1)))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item])))) : "ri" ((pao_T__)((1)))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item])))) : "re" ((pao_T__)((1)))); break; default: __bad_percpu_size(); } } while (0);break; case 2: do { typedef typeof((((vm_event_states.event[item])))) pao_T__; const int pao_ID__ = (__builtin_constant_p((1)) && (((1)) == 1 || ((1)) == -1)) ? ((1)) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((1)); (void)pao_tmp__; } switch (sizeof((((vm_event_states.event[item]))))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item])))) : "qi" ((pao_T__)((1)))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item])))) : "ri" ((pao_T__)((1)))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item])))) : "ri" ((pao_T__)((1)))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item])))) : "re" ((pao_T__)((1)))); break; default: __bad_percpu_size(); } } while (0);break; case 4: do { typedef typeof((((vm_event_states.event[item])))) pao_T__; const int pao_ID__ = (__builtin_constant_p((1)) && (((1)) == 1 || ((1)) == -1)) ? ((1)) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((1)); (void)pao_tmp__; } switch (sizeof((((vm_event_states.event[item]))))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item])))) : "qi" ((pao_T__)((1)))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item])))) : "ri" ((pao_T__)((1)))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item])))) : "ri" ((pao_T__)((1)))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item]))))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" ((((vm_event_states.event[item])))) : "re" ((pao_T__)((1)))); break; default: __bad_percpu_size(); } } while (0);break; case 8: do { do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); *({ unsigned long tcp_ptr__; do { const void *__vpp_verify = (typeof(&((((vm_event_states.event[item]))))))((void *)0); (void)__vpp_verify; } while (0); asm volatile("add " "%%""fs"":" "%P" "1" ", %0" : "=r" (tcp_ptr__) : "m" (this_cpu_off), "0" (&((((vm_event_states.event[item])))))); (typeof(*(&((((vm_event_states.event[item])))))) *)tcp_ptr__; }) += ((1)); do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 37, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); } while (0);break; default: __bad_size_call_parameter();break; } } while (0); +} +static inline __attribute__((always_inline)) void __count_vm_events(enum vm_event_item item, long delta) +{ + do { do { const void *__vpp_verify = (typeof(&((vm_event_states.event[item]))))((void *)0); (void)__vpp_verify; } while (0); switch(sizeof((vm_event_states.event[item]))) { case 1: do { typedef typeof(((vm_event_states.event[item]))) pao_T__; const int pao_ID__ = (__builtin_constant_p((delta)) && (((delta)) == 1 || ((delta)) == -1)) ? ((delta)) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((delta)); (void)pao_tmp__; } switch (sizeof(((vm_event_states.event[item])))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item]))) : "qi" ((pao_T__)((delta)))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item]))) : "ri" ((pao_T__)((delta)))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item]))) : "ri" ((pao_T__)((delta)))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item]))) : "re" ((pao_T__)((delta)))); break; default: __bad_percpu_size(); } } while (0);break; case 2: do { typedef typeof(((vm_event_states.event[item]))) pao_T__; const int pao_ID__ = (__builtin_constant_p((delta)) && (((delta)) == 1 || ((delta)) == -1)) ? ((delta)) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((delta)); (void)pao_tmp__; } switch (sizeof(((vm_event_states.event[item])))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item]))) : "qi" ((pao_T__)((delta)))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item]))) : "ri" ((pao_T__)((delta)))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item]))) : "ri" ((pao_T__)((delta)))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item]))) : "re" ((pao_T__)((delta)))); break; default: __bad_percpu_size(); } } while (0);break; case 4: do { typedef typeof(((vm_event_states.event[item]))) pao_T__; const int pao_ID__ = (__builtin_constant_p((delta)) && (((delta)) == 1 || ((delta)) == -1)) ? ((delta)) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((delta)); (void)pao_tmp__; } switch (sizeof(((vm_event_states.event[item])))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item]))) : "qi" ((pao_T__)((delta)))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item]))) : "ri" ((pao_T__)((delta)))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item]))) : "ri" ((pao_T__)((delta)))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 42, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item]))) : "re" ((pao_T__)((delta)))); break; default: __bad_percpu_size(); } } while (0);break; case 8: do { *({ unsigned long tcp_ptr__; do { const void *__vpp_verify = (typeof(&(((vm_event_states.event[item])))))((void *)0); (void)__vpp_verify; } while (0); asm volatile("add " "%%""fs"":" "%P" "1" ", %0" : "=r" (tcp_ptr__) : "m" (this_cpu_off), "0" (&(((vm_event_states.event[item]))))); (typeof(*(&(((vm_event_states.event[item]))))) *)tcp_ptr__; }) += ((delta)); } while (0);break; default: __bad_size_call_parameter();break; } } while (0); +} +static inline __attribute__((always_inline)) void count_vm_events(enum vm_event_item item, long delta) +{ + do { do { const void *__vpp_verify = (typeof(&((vm_event_states.event[item]))))((void *)0); (void)__vpp_verify; } while (0); switch(sizeof((vm_event_states.event[item]))) { case 1: do { typedef typeof(((vm_event_states.event[item]))) pao_T__; const int pao_ID__ = (__builtin_constant_p((delta)) && (((delta)) == 1 || ((delta)) == -1)) ? ((delta)) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((delta)); (void)pao_tmp__; } switch (sizeof(((vm_event_states.event[item])))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item]))) : "qi" ((pao_T__)((delta)))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item]))) : "ri" ((pao_T__)((delta)))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item]))) : "ri" ((pao_T__)((delta)))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item]))) : "re" ((pao_T__)((delta)))); break; default: __bad_percpu_size(); } } while (0);break; case 2: do { typedef typeof(((vm_event_states.event[item]))) pao_T__; const int pao_ID__ = (__builtin_constant_p((delta)) && (((delta)) == 1 || ((delta)) == -1)) ? ((delta)) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((delta)); (void)pao_tmp__; } switch (sizeof(((vm_event_states.event[item])))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item]))) : "qi" ((pao_T__)((delta)))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item]))) : "ri" ((pao_T__)((delta)))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item]))) : "ri" ((pao_T__)((delta)))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item]))) : "re" ((pao_T__)((delta)))); break; default: __bad_percpu_size(); } } while (0);break; case 4: do { typedef typeof(((vm_event_states.event[item]))) pao_T__; const int pao_ID__ = (__builtin_constant_p((delta)) && (((delta)) == 1 || ((delta)) == -1)) ? ((delta)) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((delta)); (void)pao_tmp__; } switch (sizeof(((vm_event_states.event[item])))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item]))) : "qi" ((pao_T__)((delta)))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item]))) : "ri" ((pao_T__)((delta)))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item]))) : "ri" ((pao_T__)((delta)))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item])))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" (((vm_event_states.event[item]))) : "re" ((pao_T__)((delta)))); break; default: __bad_percpu_size(); } } while (0);break; case 8: do { do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); *({ unsigned long tcp_ptr__; do { const void *__vpp_verify = (typeof(&(((vm_event_states.event[item])))))((void *)0); (void)__vpp_verify; } while (0); asm volatile("add " "%%""fs"":" "%P" "1" ", %0" : "=r" (tcp_ptr__) : "m" (this_cpu_off), "0" (&(((vm_event_states.event[item]))))); (typeof(*(&(((vm_event_states.event[item]))))) *)tcp_ptr__; }) += ((delta)); do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 47, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); } while (0);break; default: __bad_size_call_parameter();break; } } while (0); +} +extern void all_vm_events(unsigned long *); +extern void vm_events_fold_cpu(int cpu); +extern atomic_long_t vm_stat[NR_VM_ZONE_STAT_ITEMS]; +static inline __attribute__((always_inline)) void zone_page_state_add(long x, struct zone *zone, + enum zone_stat_item item) +{ + atomic_long_add(x, &zone->vm_stat[item]); + atomic_long_add(x, &vm_stat[item]); +} +static inline __attribute__((always_inline)) unsigned long global_page_state(enum zone_stat_item item) +{ + long x = atomic_long_read(&vm_stat[item]); + if (__builtin_constant_p(((x < 0))) ? !!((x < 0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 103, }; ______r = !!((x < 0)); ______f.miss_hit[______r]++; ______r; })) + x = 0; + return x; +} +static inline __attribute__((always_inline)) unsigned long zone_page_state(struct zone *zone, + enum zone_stat_item item) +{ + long x = atomic_long_read(&zone->vm_stat[item]); + if (__builtin_constant_p(((x < 0))) ? !!((x < 0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 114, }; ______r = !!((x < 0)); ______f.miss_hit[______r]++; ______r; })) + x = 0; + return x; +} +static inline __attribute__((always_inline)) unsigned long zone_page_state_snapshot(struct zone *zone, + enum zone_stat_item item) +{ + long x = atomic_long_read(&zone->vm_stat[item]); + int cpu; + for (((cpu)) = -1; ((cpu)) = cpumask_next(((cpu)), (cpu_online_mask)), ((cpu)) < nr_cpu_ids;) + x += ({ do { const void *__vpp_verify = (typeof(((zone->pageset))))((void *)0); (void)__vpp_verify; } while (0); ({ unsigned long __ptr; __asm__ ("" : "=r"(__ptr) : "0"((typeof(*((zone->pageset))) *)((zone->pageset)))); (typeof((typeof(*((zone->pageset))) *)((zone->pageset)))) (__ptr + (((__per_cpu_offset[(cpu)])))); }); })->vm_stat_diff[item]; + if (__builtin_constant_p(((x < 0))) ? !!((x < 0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/vmstat.h", .line = 136, }; ______r = !!((x < 0)); ______f.miss_hit[______r]++; ______r; })) + x = 0; + return x; +} +extern unsigned long global_reclaimable_pages(void); +extern unsigned long zone_reclaimable_pages(struct zone *zone); +static inline __attribute__((always_inline)) void zap_zone_vm_stats(struct zone *zone) +{ + __builtin_memset(zone->vm_stat, 0, sizeof(zone->vm_stat)); +} +extern void inc_zone_state(struct zone *, enum zone_stat_item); +void __mod_zone_page_state(struct zone *, enum zone_stat_item item, int); +void __inc_zone_page_state(struct page *, enum zone_stat_item); +void __dec_zone_page_state(struct page *, enum zone_stat_item); +void mod_zone_page_state(struct zone *, enum zone_stat_item, int); +void inc_zone_page_state(struct page *, enum zone_stat_item); +void dec_zone_page_state(struct page *, enum zone_stat_item); +extern void inc_zone_state(struct zone *, enum zone_stat_item); +extern void __inc_zone_state(struct zone *, enum zone_stat_item); +extern void dec_zone_state(struct zone *, enum zone_stat_item); +extern void __dec_zone_state(struct zone *, enum zone_stat_item); +void refresh_cpu_vm_stats(int); +void refresh_zone_stat_thresholds(void); +int calculate_pressure_threshold(struct zone *zone); +int calculate_normal_threshold(struct zone *zone); +void set_pgdat_percpu_threshold(pg_data_t *pgdat, + int (*calculate_pressure)(struct zone *)); +extern const char * const vmstat_text[]; +static inline __attribute__((always_inline)) __attribute__((always_inline)) void *lowmem_page_address(struct page *page) +{ + return ((void *)((unsigned long)(((phys_addr_t)(((unsigned long)((page) - mem_map) + (0UL))) << 12))+((unsigned long)(0xC0000000UL)))); +} +void *page_address(struct page *page); +void set_page_address(struct page *page, void *virtual); +void page_address_init(void); +extern struct address_space swapper_space; +static inline __attribute__((always_inline)) struct address_space *page_mapping(struct page *page) +{ + struct address_space *mapping = page->mapping; + do { (void)(PageSlab(page)); } while (0); + if (__builtin_constant_p((((__builtin_constant_p(PageSwapCache(page)) ? !!(PageSwapCache(page)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 776, }; ______r = __builtin_expect(!!(PageSwapCache(page)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(PageSwapCache(page)) ? !!(PageSwapCache(page)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 776, }; ______r = __builtin_expect(!!(PageSwapCache(page)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 776, }; ______r = !!(((__builtin_constant_p(PageSwapCache(page)) ? !!(PageSwapCache(page)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 776, }; ______r = __builtin_expect(!!(PageSwapCache(page)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + mapping = &swapper_space; + else if (__builtin_constant_p((((unsigned long)mapping & 1))) ? !!(((unsigned long)mapping & 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 778, }; ______r = !!(((unsigned long)mapping & 1)); ______f.miss_hit[______r]++; ______r; })) + mapping = ((void *)0); + return mapping; +} +static inline __attribute__((always_inline)) void *page_rmapping(struct page *page) +{ + return (void *)((unsigned long)page->mapping & ~(1 | 2)); +} +static inline __attribute__((always_inline)) int PageAnon(struct page *page) +{ + return ((unsigned long)page->mapping & 1) != 0; +} +static inline __attribute__((always_inline)) unsigned long page_index(struct page *page) +{ + if (__builtin_constant_p((((__builtin_constant_p(PageSwapCache(page)) ? !!(PageSwapCache(page)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 800, }; ______r = __builtin_expect(!!(PageSwapCache(page)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(PageSwapCache(page)) ? !!(PageSwapCache(page)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 800, }; ______r = __builtin_expect(!!(PageSwapCache(page)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 800, }; ______r = !!(((__builtin_constant_p(PageSwapCache(page)) ? !!(PageSwapCache(page)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 800, }; ______r = __builtin_expect(!!(PageSwapCache(page)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + return ((page)->private); + return page->index; +} +static inline __attribute__((always_inline)) void reset_page_mapcount(struct page *page) +{ + atomic_set(&(page)->_mapcount, -1); +} +static inline __attribute__((always_inline)) int page_mapcount(struct page *page) +{ + return atomic_read(&(page)->_mapcount) + 1; +} +static inline __attribute__((always_inline)) int page_mapped(struct page *page) +{ + return atomic_read(&(page)->_mapcount) >= 0; +} +extern void pagefault_out_of_memory(void); +extern void show_free_areas(unsigned int flags); +extern bool skip_free_areas_node(unsigned int flags, int nid); +int shmem_lock(struct file *file, int lock, struct user_struct *user); +struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags); +int shmem_zero_setup(struct vm_area_struct *); +extern int can_do_mlock(void); +extern int user_shm_lock(size_t, struct user_struct *); +extern void user_shm_unlock(size_t, struct user_struct *); +struct zap_details { + struct vm_area_struct *nonlinear_vma; + struct address_space *check_mapping; + unsigned long first_index; + unsigned long last_index; +}; +struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, + pte_t pte); +int zap_vma_ptes(struct vm_area_struct *vma, unsigned long address, + unsigned long size); +unsigned long zap_page_range(struct vm_area_struct *vma, unsigned long address, + unsigned long size, struct zap_details *); +unsigned long unmap_vmas(struct mmu_gather *tlb, + struct vm_area_struct *start_vma, unsigned long start_addr, + unsigned long end_addr, unsigned long *nr_accounted, + struct zap_details *); +struct mm_walk { + int (*pgd_entry)(pgd_t *, unsigned long, unsigned long, struct mm_walk *); + int (*pud_entry)(pud_t *, unsigned long, unsigned long, struct mm_walk *); + int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, struct mm_walk *); + int (*pte_entry)(pte_t *, unsigned long, unsigned long, struct mm_walk *); + int (*pte_hole)(unsigned long, unsigned long, struct mm_walk *); + int (*hugetlb_entry)(pte_t *, unsigned long, + unsigned long, unsigned long, struct mm_walk *); + struct mm_struct *mm; + void *private; +}; +int walk_page_range(unsigned long addr, unsigned long end, + struct mm_walk *walk); +void free_pgd_range(struct mmu_gather *tlb, unsigned long addr, + unsigned long end, unsigned long floor, unsigned long ceiling); +int copy_page_range(struct mm_struct *dst, struct mm_struct *src, + struct vm_area_struct *vma); +void unmap_mapping_range(struct address_space *mapping, + loff_t const holebegin, loff_t const holelen, int even_cows); +int follow_pfn(struct vm_area_struct *vma, unsigned long address, + unsigned long *pfn); +int follow_phys(struct vm_area_struct *vma, unsigned long address, + unsigned int flags, unsigned long *prot, resource_size_t *phys); +int generic_access_phys(struct vm_area_struct *vma, unsigned long addr, + void *buf, int len, int write); +static inline __attribute__((always_inline)) void unmap_shared_mapping_range(struct address_space *mapping, + loff_t const holebegin, loff_t const holelen) +{ + unmap_mapping_range(mapping, holebegin, holelen, 0); +} +extern void truncate_pagecache(struct inode *inode, loff_t old, loff_t new); +extern void truncate_setsize(struct inode *inode, loff_t newsize); +extern int vmtruncate(struct inode *inode, loff_t offset); +extern int vmtruncate_range(struct inode *inode, loff_t offset, loff_t end); +int truncate_inode_page(struct address_space *mapping, struct page *page); +int generic_error_remove_page(struct address_space *mapping, struct page *page); +int invalidate_inode_page(struct page *page); +extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, + unsigned long address, unsigned int flags); +extern int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm, + unsigned long address, unsigned int fault_flags); +extern int make_pages_present(unsigned long addr, unsigned long end); +extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write); +extern int access_remote_vm(struct mm_struct *mm, unsigned long addr, + void *buf, int len, int write); +int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, + unsigned long start, int len, unsigned int foll_flags, + struct page **pages, struct vm_area_struct **vmas, + int *nonblocking); +int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, + unsigned long start, int nr_pages, int write, int force, + struct page **pages, struct vm_area_struct **vmas); +int get_user_pages_fast(unsigned long start, int nr_pages, int write, + struct page **pages); +struct page *get_dump_page(unsigned long addr); +extern int try_to_release_page(struct page * page, gfp_t gfp_mask); +extern void do_invalidatepage(struct page *page, unsigned long offset); +int __set_page_dirty_nobuffers(struct page *page); +int __set_page_dirty_no_writeback(struct page *page); +int redirty_page_for_writepage(struct writeback_control *wbc, + struct page *page); +void account_page_dirtied(struct page *page, struct address_space *mapping); +void account_page_writeback(struct page *page); +int set_page_dirty(struct page *page); +int set_page_dirty_lock(struct page *page); +int clear_page_dirty_for_io(struct page *page); +static inline __attribute__((always_inline)) int vma_growsdown(struct vm_area_struct *vma, unsigned long addr) +{ + return vma && (vma->vm_end == addr) && (vma->vm_flags & 0x00000100); +} +static inline __attribute__((always_inline)) int stack_guard_page_start(struct vm_area_struct *vma, + unsigned long addr) +{ + return (vma->vm_flags & 0x00000100) && + (vma->vm_start == addr) && + !vma_growsdown(vma->vm_prev, addr); +} +static inline __attribute__((always_inline)) int vma_growsup(struct vm_area_struct *vma, unsigned long addr) +{ + return vma && (vma->vm_start == addr) && (vma->vm_flags & 0x00000000); +} +static inline __attribute__((always_inline)) int stack_guard_page_end(struct vm_area_struct *vma, + unsigned long addr) +{ + return (vma->vm_flags & 0x00000000) && + (vma->vm_end == addr) && + !vma_growsup(vma->vm_next, addr); +} +extern unsigned long move_page_tables(struct vm_area_struct *vma, + unsigned long old_addr, struct vm_area_struct *new_vma, + unsigned long new_addr, unsigned long len); +extern unsigned long do_mremap(unsigned long addr, + unsigned long old_len, unsigned long new_len, + unsigned long flags, unsigned long new_addr); +extern int mprotect_fixup(struct vm_area_struct *vma, + struct vm_area_struct **pprev, unsigned long start, + unsigned long end, unsigned long newflags); +int __get_user_pages_fast(unsigned long start, int nr_pages, int write, + struct page **pages); +static inline __attribute__((always_inline)) void set_mm_counter(struct mm_struct *mm, int member, long value) +{ + atomic_long_set(&mm->rss_stat.count[member], value); +} +static inline __attribute__((always_inline)) unsigned long get_mm_counter(struct mm_struct *mm, int member) +{ + return atomic_long_read(&mm->rss_stat.count[member]); +} +static inline __attribute__((always_inline)) void add_mm_counter(struct mm_struct *mm, int member, long value) +{ + atomic_long_add(value, &mm->rss_stat.count[member]); +} +static inline __attribute__((always_inline)) void inc_mm_counter(struct mm_struct *mm, int member) +{ + atomic_long_inc(&mm->rss_stat.count[member]); +} +static inline __attribute__((always_inline)) void dec_mm_counter(struct mm_struct *mm, int member) +{ + atomic_long_dec(&mm->rss_stat.count[member]); +} +static inline __attribute__((always_inline)) unsigned long get_mm_rss(struct mm_struct *mm) +{ + return get_mm_counter(mm, MM_FILEPAGES) + + get_mm_counter(mm, MM_ANONPAGES); +} +static inline __attribute__((always_inline)) unsigned long get_mm_hiwater_rss(struct mm_struct *mm) +{ + return ({ typeof(mm->hiwater_rss) _max1 = (mm->hiwater_rss); typeof(get_mm_rss(mm)) _max2 = (get_mm_rss(mm)); (void) (&_max1 == &_max2); _max1 > _max2 ? _max1 : _max2; }); +} +static inline __attribute__((always_inline)) unsigned long get_mm_hiwater_vm(struct mm_struct *mm) +{ + return ({ typeof(mm->hiwater_vm) _max1 = (mm->hiwater_vm); typeof(mm->total_vm) _max2 = (mm->total_vm); (void) (&_max1 == &_max2); _max1 > _max2 ? _max1 : _max2; }); +} +static inline __attribute__((always_inline)) void update_hiwater_rss(struct mm_struct *mm) +{ + unsigned long _rss = get_mm_rss(mm); + if (__builtin_constant_p((((mm)->hiwater_rss < _rss))) ? !!(((mm)->hiwater_rss < _rss)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 1107, }; ______r = !!(((mm)->hiwater_rss < _rss)); ______f.miss_hit[______r]++; ______r; })) + (mm)->hiwater_rss = _rss; +} +static inline __attribute__((always_inline)) void update_hiwater_vm(struct mm_struct *mm) +{ + if (__builtin_constant_p(((mm->hiwater_vm < mm->total_vm))) ? !!((mm->hiwater_vm < mm->total_vm)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 1113, }; ______r = !!((mm->hiwater_vm < mm->total_vm)); ______f.miss_hit[______r]++; ______r; })) + mm->hiwater_vm = mm->total_vm; +} +static inline __attribute__((always_inline)) void setmax_mm_hiwater_rss(unsigned long *maxrss, + struct mm_struct *mm) +{ + unsigned long hiwater_rss = get_mm_hiwater_rss(mm); + if (__builtin_constant_p(((*maxrss < hiwater_rss))) ? !!((*maxrss < hiwater_rss)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 1122, }; ______r = !!((*maxrss < hiwater_rss)); ______f.miss_hit[______r]++; ______r; })) + *maxrss = hiwater_rss; +} +static inline __attribute__((always_inline)) void sync_mm_rss(struct task_struct *task, struct mm_struct *mm) +{ +} +struct shrink_control { + gfp_t gfp_mask; + unsigned long nr_to_scan; +}; +struct shrinker { + int (*shrink)(struct shrinker *, struct shrink_control *sc); + int seeks; + struct list_head list; + long nr; +}; +extern void register_shrinker(struct shrinker *); +extern void unregister_shrinker(struct shrinker *); +int vma_wants_writenotify(struct vm_area_struct *vma); +extern pte_t *__get_locked_pte(struct mm_struct *mm, unsigned long addr, + spinlock_t **ptl); +static inline __attribute__((always_inline)) pte_t *get_locked_pte(struct mm_struct *mm, unsigned long addr, + spinlock_t **ptl) +{ + pte_t *ptep; + (ptep = __get_locked_pte(mm, addr, ptl)); + return ptep; +} +static inline __attribute__((always_inline)) int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, + unsigned long address) +{ + return 0; +} +int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address); +int __pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma, + pmd_t *pmd, unsigned long address); +int __pte_alloc_kernel(pmd_t *pmd, unsigned long address); +static inline __attribute__((always_inline)) pud_t *pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address) +{ + return ((__builtin_constant_p(pgd_none(*pgd)) ? !!(pgd_none(*pgd)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 1215, }; ______r = __builtin_expect(!!(pgd_none(*pgd)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })) && __pud_alloc(mm, pgd, address))? + ((void *)0): pud_offset(pgd, address); +} +static inline __attribute__((always_inline)) pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address) +{ + return ((__builtin_constant_p(pud_none(*pud)) ? !!(pud_none(*pud)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 1221, }; ______r = __builtin_expect(!!(pud_none(*pud)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })) && __pmd_alloc(mm, pud, address))? + ((void *)0): pmd_offset(pud, address); +} +static inline __attribute__((always_inline)) void pgtable_page_ctor(struct page *page) +{ + do {} while (0); + inc_zone_page_state(page, NR_PAGETABLE); +} +static inline __attribute__((always_inline)) void pgtable_page_dtor(struct page *page) +{ + do {} while (0); + dec_zone_page_state(page, NR_PAGETABLE); +} +extern void free_area_init(unsigned long * zones_size); +extern void free_area_init_node(int nid, unsigned long * zones_size, + unsigned long zone_start_pfn, unsigned long *zholes_size); +extern void free_area_init_nodes(unsigned long *max_zone_pfn); +extern void add_active_range(unsigned int nid, unsigned long start_pfn, + unsigned long end_pfn); +extern void remove_active_range(unsigned int nid, unsigned long start_pfn, + unsigned long end_pfn); +extern void remove_all_active_ranges(void); +void sort_node_map(void); +unsigned long __absent_pages_in_range(int nid, unsigned long start_pfn, + unsigned long end_pfn); +extern unsigned long absent_pages_in_range(unsigned long start_pfn, + unsigned long end_pfn); +extern void get_pfn_range_for_nid(unsigned int nid, + unsigned long *start_pfn, unsigned long *end_pfn); +extern unsigned long find_min_pfn_with_active_regions(void); +extern void free_bootmem_with_active_regions(int nid, + unsigned long max_low_pfn); +int add_from_early_node_map(struct range *range, int az, + int nr_range, int nid); +u64 __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) find_memory_core_early(int nid, u64 size, u64 align, + u64 goal, u64 limit); +typedef int (*work_fn_t)(unsigned long, unsigned long, void *); +extern void work_with_active_regions(int nid, work_fn_t work_fn, void *data); +extern void sparse_memory_present_with_active_regions(int nid); +extern int __attribute__ ((__section__(".meminit.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) early_pfn_to_nid(unsigned long pfn); +extern void set_dma_reserve(unsigned long new_dma_reserve); +extern void memmap_init_zone(unsigned long, int, unsigned long, + unsigned long, enum memmap_context); +extern void setup_per_zone_wmarks(void); +extern int __attribute__ ((__section__(".meminit.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) init_per_zone_wmark_min(void); +extern void mem_init(void); +extern void __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) mmap_init(void); +extern void show_mem(unsigned int flags); +extern void si_meminfo(struct sysinfo * val); +extern void si_meminfo_node(struct sysinfo *val, int nid); +extern int after_bootmem; +extern void warn_alloc_failed(gfp_t gfp_mask, int order, const char *fmt, ...); +extern void setup_per_cpu_pageset(void); +extern void zone_pcp_update(struct zone *zone); +extern atomic_long_t mmap_pages_allocated; +extern int nommu_shrink_inode_mappings(struct inode *, size_t, size_t); +void vma_prio_tree_add(struct vm_area_struct *, struct vm_area_struct *old); +void vma_prio_tree_insert(struct vm_area_struct *, struct prio_tree_root *); +void vma_prio_tree_remove(struct vm_area_struct *, struct prio_tree_root *); +struct vm_area_struct *vma_prio_tree_next(struct vm_area_struct *vma, + struct prio_tree_iter *iter); +static inline __attribute__((always_inline)) void vma_nonlinear_insert(struct vm_area_struct *vma, + struct list_head *list) +{ + vma->shared.vm_set.parent = ((void *)0); + list_add_tail(&vma->shared.vm_set.list, list); +} +extern int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin); +extern int vma_adjust(struct vm_area_struct *vma, unsigned long start, + unsigned long end, unsigned long pgoff, struct vm_area_struct *insert); +extern struct vm_area_struct *vma_merge(struct mm_struct *, + struct vm_area_struct *prev, unsigned long addr, unsigned long end, + unsigned long vm_flags, struct anon_vma *, struct file *, unsigned long, + struct mempolicy *); +extern struct anon_vma *find_mergeable_anon_vma(struct vm_area_struct *); +extern int split_vma(struct mm_struct *, + struct vm_area_struct *, unsigned long addr, int new_below); +extern int insert_vm_struct(struct mm_struct *, struct vm_area_struct *); +extern void __vma_link_rb(struct mm_struct *, struct vm_area_struct *, + struct rb_node **, struct rb_node *); +extern void unlink_file_vma(struct vm_area_struct *); +extern struct vm_area_struct *copy_vma(struct vm_area_struct **, + unsigned long addr, unsigned long len, unsigned long pgoff); +extern void exit_mmap(struct mm_struct *); +extern int mm_take_all_locks(struct mm_struct *mm); +extern void mm_drop_all_locks(struct mm_struct *mm); +extern void added_exe_file_vma(struct mm_struct *mm); +extern void removed_exe_file_vma(struct mm_struct *mm); +extern void set_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file); +extern struct file *get_mm_exe_file(struct mm_struct *mm); +extern int may_expand_vm(struct mm_struct *mm, unsigned long npages); +extern int install_special_mapping(struct mm_struct *mm, + unsigned long addr, unsigned long len, + unsigned long flags, struct page **pages); +extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); +extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, + unsigned long len, unsigned long prot, + unsigned long flag, unsigned long pgoff); +extern unsigned long mmap_region(struct file *file, unsigned long addr, + unsigned long len, unsigned long flags, + vm_flags_t vm_flags, unsigned long pgoff); +static inline __attribute__((always_inline)) unsigned long do_mmap(struct file *file, unsigned long addr, + unsigned long len, unsigned long prot, + unsigned long flag, unsigned long offset) +{ + unsigned long ret = -22; + if (__builtin_constant_p((((offset + ((((len)) + ((typeof((len)))((((1UL) << 12))) - 1)) & ~((typeof((len)))((((1UL) << 12))) - 1))) < offset))) ? !!(((offset + ((((len)) + ((typeof((len)))((((1UL) << 12))) - 1)) & ~((typeof((len)))((((1UL) << 12))) - 1))) < offset)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 1446, }; ______r = !!(((offset + ((((len)) + ((typeof((len)))((((1UL) << 12))) - 1)) & ~((typeof((len)))((((1UL) << 12))) - 1))) < offset)); ______f.miss_hit[______r]++; ______r; })) + goto out; + if (__builtin_constant_p(((!(offset & ~(~(((1UL) << 12)-1)))))) ? !!((!(offset & ~(~(((1UL) << 12)-1))))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 1448, }; ______r = !!((!(offset & ~(~(((1UL) << 12)-1))))); ______f.miss_hit[______r]++; ______r; })) + ret = do_mmap_pgoff(file, addr, len, prot, flag, offset >> 12); +out: + return ret; +} +extern int do_munmap(struct mm_struct *, unsigned long, size_t); +extern unsigned long do_brk(unsigned long, unsigned long); +extern unsigned long page_unuse(struct page *); +extern void truncate_inode_pages(struct address_space *, loff_t); +extern void truncate_inode_pages_range(struct address_space *, + loff_t lstart, loff_t lend); +extern int filemap_fault(struct vm_area_struct *, struct vm_fault *); +int write_one_page(struct page *page, int wait); +void task_dirty_inc(struct task_struct *tsk); +int force_page_cache_readahead(struct address_space *mapping, struct file *filp, + unsigned long offset, unsigned long nr_to_read); +void page_cache_sync_readahead(struct address_space *mapping, + struct file_ra_state *ra, + struct file *filp, + unsigned long offset, + unsigned long size); +void page_cache_async_readahead(struct address_space *mapping, + struct file_ra_state *ra, + struct file *filp, + struct page *pg, + unsigned long offset, + unsigned long size); +unsigned long max_sane_readahead(unsigned long nr); +unsigned long ra_submit(struct file_ra_state *ra, + struct address_space *mapping, + struct file *filp); +extern int expand_stack(struct vm_area_struct *vma, unsigned long address); +extern int expand_downwards(struct vm_area_struct *vma, + unsigned long address); +extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr); +extern struct vm_area_struct * find_vma_prev(struct mm_struct * mm, unsigned long addr, + struct vm_area_struct **pprev); +static inline __attribute__((always_inline)) struct vm_area_struct * find_vma_intersection(struct mm_struct * mm, unsigned long start_addr, unsigned long end_addr) +{ + struct vm_area_struct * vma = find_vma(mm,start_addr); + if (__builtin_constant_p(((vma && end_addr <= vma->vm_start))) ? !!((vma && end_addr <= vma->vm_start)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/mm.h", .line = 1519, }; ______r = !!((vma && end_addr <= vma->vm_start)); ______f.miss_hit[______r]++; ______r; })) + vma = ((void *)0); + return vma; +} +static inline __attribute__((always_inline)) unsigned long vma_pages(struct vm_area_struct *vma) +{ + return (vma->vm_end - vma->vm_start) >> 12; +} +pgprot_t vm_get_page_prot(unsigned long vm_flags); +struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr); +int remap_pfn_range(struct vm_area_struct *, unsigned long addr, + unsigned long pfn, unsigned long size, pgprot_t); +int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *); +int vm_insert_pfn(struct vm_area_struct *vma, unsigned long addr, + unsigned long pfn); +int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr, + unsigned long pfn); +struct page *follow_page(struct vm_area_struct *, unsigned long address, + unsigned int foll_flags); +typedef int (*pte_fn_t)(pte_t *pte, pgtable_t token, unsigned long addr, + void *data); +extern int apply_to_page_range(struct mm_struct *mm, unsigned long address, + unsigned long size, pte_fn_t fn, void *data); +void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long); +static inline __attribute__((always_inline)) void +kernel_map_pages(struct page *page, int numpages, int enable) {} +static inline __attribute__((always_inline)) void enable_debug_pagealloc(void) +{ +} +static inline __attribute__((always_inline)) bool kernel_page_present(struct page *page) { return true; } +extern struct vm_area_struct *get_gate_vma(struct mm_struct *mm); +int in_gate_area_no_mm(unsigned long addr); +int in_gate_area(struct mm_struct *mm, unsigned long addr); +int drop_caches_sysctl_handler(struct ctl_table *, int, + void *, size_t *, loff_t *); +unsigned long shrink_slab(struct shrink_control *shrink, + unsigned long nr_pages_scanned, + unsigned long lru_pages); +extern int randomize_va_space; +const char * arch_vma_name(struct vm_area_struct *vma); +void print_vma_addr(char *prefix, unsigned long rip); +void sparse_mem_maps_populate_node(struct page **map_map, + unsigned long pnum_begin, + unsigned long pnum_end, + unsigned long map_count, + int nodeid); +struct page *sparse_mem_map_populate(unsigned long pnum, int nid); +pgd_t *vmemmap_pgd_populate(unsigned long addr, int node); +pud_t *vmemmap_pud_populate(pgd_t *pgd, unsigned long addr, int node); +pmd_t *vmemmap_pmd_populate(pud_t *pud, unsigned long addr, int node); +pte_t *vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node); +void *vmemmap_alloc_block(unsigned long size, int node); +void *vmemmap_alloc_block_buf(unsigned long size, int node); +void vmemmap_verify(pte_t *, int, unsigned long, unsigned long); +int vmemmap_populate_basepages(struct page *start_page, + unsigned long pages, int node); +int vmemmap_populate(struct page *start_page, unsigned long pages, int node); +void vmemmap_populate_print_last(void); +enum mf_flags { + MF_COUNT_INCREASED = 1 << 0, +}; +extern void memory_failure(unsigned long pfn, int trapno); +extern int __memory_failure(unsigned long pfn, int trapno, int flags); +extern int unpoison_memory(unsigned long pfn); +extern int sysctl_memory_failure_early_kill; +extern int sysctl_memory_failure_recovery; +extern void shake_page(struct page *p, int access); +extern atomic_long_t mce_bad_pages; +extern int soft_offline_page(struct page *page, int flags); +extern void dump_page(struct page *page); +extern void clear_huge_page(struct page *page, + unsigned long addr, + unsigned int pages_per_huge_page); +extern void copy_user_huge_page(struct page *dst, struct page *src, + unsigned long addr, struct vm_area_struct *vma, + unsigned int pages_per_huge_page); +static inline __attribute__((always_inline)) unsigned long get_page_memtype(struct page *pg) +{ + unsigned long pg_flags = pg->flags & (1UL << PG_uncached | 1UL << PG_arch_1); + if (__builtin_constant_p(((pg_flags == 0))) ? !!((pg_flags == 0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/cacheflush.h", .line = 28, }; ______r = !!((pg_flags == 0)); ______f.miss_hit[______r]++; ______r; })) + return -1; + else if (__builtin_constant_p(((pg_flags == (1UL << PG_arch_1)))) ? !!((pg_flags == (1UL << PG_arch_1))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/cacheflush.h", .line = 30, }; ______r = !!((pg_flags == (1UL << PG_arch_1))); ______f.miss_hit[______r]++; ______r; })) + return ((((pteval_t)(1)) << 3)); + else if (__builtin_constant_p(((pg_flags == (1UL << PG_uncached)))) ? !!((pg_flags == (1UL << PG_uncached))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/cacheflush.h", .line = 32, }; ______r = !!((pg_flags == (1UL << PG_uncached))); ______f.miss_hit[______r]++; ______r; })) + return ((((pteval_t)(1)) << 4)); + else + return (0); +} +static inline __attribute__((always_inline)) void set_page_memtype(struct page *pg, unsigned long memtype) +{ + unsigned long memtype_flags = 0; + unsigned long old_flags; + unsigned long new_flags; + switch (memtype) { + case ((((pteval_t)(1)) << 3)): + memtype_flags = (1UL << PG_arch_1); + break; + case ((((pteval_t)(1)) << 4)): + memtype_flags = (1UL << PG_uncached); + break; + case (0): + memtype_flags = (1UL << PG_uncached | 1UL << PG_arch_1); + break; + } + do { + old_flags = pg->flags; + new_flags = (old_flags & (~(1UL << PG_uncached | 1UL << PG_arch_1))) | memtype_flags; + } while (({ __typeof__(*(((&pg->flags)))) __ret; __typeof__(*(((&pg->flags)))) __old = (((old_flags))); __typeof__(*(((&pg->flags)))) __new = (((new_flags))); switch ((sizeof(*&pg->flags))) { case 1: { volatile u8 *__ptr = (volatile u8 *)(((&pg->flags))); asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "cmpxchgb %2,%1" : "=a" (__ret), "+m" (*__ptr) : "q" (__new), "0" (__old) : "memory"); break; } case 2: { volatile u16 *__ptr = (volatile u16 *)(((&pg->flags))); asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "cmpxchgw %2,%1" : "=a" (__ret), "+m" (*__ptr) : "r" (__new), "0" (__old) : "memory"); break; } case 4: { volatile u32 *__ptr = (volatile u32 *)(((&pg->flags))); asm volatile(".section .smp_locks,\"a\"\n" ".balign 4\n" ".long 671f - .\n" ".previous\n" "671:" "\n\tlock; " "cmpxchgl %2,%1" : "=a" (__ret), "+m" (*__ptr) : "r" (__new), "0" (__old) : "memory"); break; } default: __cmpxchg_wrong_size(); } __ret; }) != old_flags); +} +int _set_memory_uc(unsigned long addr, int numpages); +int _set_memory_wc(unsigned long addr, int numpages); +int _set_memory_wb(unsigned long addr, int numpages); +int set_memory_uc(unsigned long addr, int numpages); +int set_memory_wc(unsigned long addr, int numpages); +int set_memory_wb(unsigned long addr, int numpages); +int set_memory_x(unsigned long addr, int numpages); +int set_memory_nx(unsigned long addr, int numpages); +int set_memory_ro(unsigned long addr, int numpages); +int set_memory_rw(unsigned long addr, int numpages); +int set_memory_np(unsigned long addr, int numpages); +int set_memory_4k(unsigned long addr, int numpages); +int set_memory_array_uc(unsigned long *addr, int addrinarray); +int set_memory_array_wc(unsigned long *addr, int addrinarray); +int set_memory_array_wb(unsigned long *addr, int addrinarray); +int set_pages_array_uc(struct page **pages, int addrinarray); +int set_pages_array_wc(struct page **pages, int addrinarray); +int set_pages_array_wb(struct page **pages, int addrinarray); +int set_pages_uc(struct page *page, int numpages); +int set_pages_wb(struct page *page, int numpages); +int set_pages_x(struct page *page, int numpages); +int set_pages_nx(struct page *page, int numpages); +int set_pages_ro(struct page *page, int numpages); +int set_pages_rw(struct page *page, int numpages); +void clflush_cache_range(void *addr, unsigned int size); +void mark_rodata_ro(void); +extern const int rodata_test_data; +extern int kernel_set_to_readonly; +void set_kernel_text_rw(void); +void set_kernel_text_ro(void); +static inline __attribute__((always_inline)) int rodata_test(void) +{ + return 0; +} +static inline __attribute__((always_inline)) void flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vmaddr) +{ +} +static inline __attribute__((always_inline)) void flush_kernel_dcache_page(struct page *page) +{ +} +static inline __attribute__((always_inline)) void flush_kernel_vmap_range(void *vaddr, int size) +{ +} +static inline __attribute__((always_inline)) void invalidate_kernel_vmap_range(void *vaddr, int size) +{ +} +static inline __attribute__((always_inline)) void __native_flush_tlb(void) +{ + native_write_cr3(native_read_cr3()); +} +static inline __attribute__((always_inline)) void __native_flush_tlb_global(void) +{ + unsigned long flags; + unsigned long cr4; + do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); flags = arch_local_irq_save(); } while (0); + cr4 = native_read_cr4(); + native_write_cr4(cr4 & ~0x00000080); + native_write_cr4(cr4); + do { ({ unsigned long __dummy; typeof(flags) __dummy2; (void)(&__dummy == &__dummy2); 1; }); arch_local_irq_restore(flags); } while (0); +} +static inline __attribute__((always_inline)) void __native_flush_tlb_single(unsigned long addr) +{ + asm volatile("invlpg (%0)" ::"r" (addr) : "memory"); +} +static inline __attribute__((always_inline)) void __flush_tlb_all(void) +{ + if (__builtin_constant_p((((__builtin_constant_p((0*32+13)) && ( ((((0*32+13))>>5)==0 && (1UL<<(((0*32+13))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((0*32+13))>>5)==1 && (1UL<<(((0*32+13))&31) & (0|0))) || ((((0*32+13))>>5)==2 && (1UL<<(((0*32+13))&31) & 0)) || ((((0*32+13))>>5)==3 && (1UL<<(((0*32+13))&31) & (0))) || ((((0*32+13))>>5)==4 && (1UL<<(((0*32+13))&31) & 0)) || ((((0*32+13))>>5)==5 && (1UL<<(((0*32+13))&31) & 0)) || ((((0*32+13))>>5)==6 && (1UL<<(((0*32+13))&31) & 0)) || ((((0*32+13))>>5)==7 && (1UL<<(((0*32+13))&31) & 0)) || ((((0*32+13))>>5)==8 && (1UL<<(((0*32+13))&31) & 0)) || ((((0*32+13))>>5)==9 && (1UL<<(((0*32+13))&31) & 0)) ) ? 1 : (__builtin_constant_p(((0*32+13))) ? constant_test_bit(((0*32+13)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((0*32+13)), ((unsigned long *)((&boot_cpu_data)->x86_capability)))))))) ? !!(((__builtin_constant_p((0*32+13)) && ( ((((0*32+13))>>5)==0 && (1UL<<(((0*32+13))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((0*32+13))>>5)==1 && (1UL<<(((0*32+13))&31) & (0|0))) || ((((0*32+13))>>5)==2 && (1UL<<(((0*32+13))&31) & 0)) || ((((0*32+13))>>5)==3 && (1UL<<(((0*32+13))&31) & (0))) || ((((0*32+13))>>5)==4 && (1UL<<(((0*32+13))&31) & 0)) || ((((0*32+13))>>5)==5 && (1UL<<(((0*32+13))&31) & 0)) || ((((0*32+13))>>5)==6 && (1UL<<(((0*32+13))&31) & 0)) || ((((0*32+13))>>5)==7 && (1UL<<(((0*32+13))&31) & 0)) || ((((0*32+13))>>5)==8 && (1UL<<(((0*32+13))&31) & 0)) || ((((0*32+13))>>5)==9 && (1UL<<(((0*32+13))&31) & 0)) ) ? 1 : (__builtin_constant_p(((0*32+13))) ? constant_test_bit(((0*32+13)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((0*32+13)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/tlbflush.h", .line = 51, }; ______r = !!(((__builtin_constant_p((0*32+13)) && ( ((((0*32+13))>>5)==0 && (1UL<<(((0*32+13))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((0*32+13))>>5)==1 && (1UL<<(((0*32+13))&31) & (0|0))) || ((((0*32+13))>>5)==2 && (1UL<<(((0*32+13))&31) & 0)) || ((((0*32+13))>>5)==3 && (1UL<<(((0*32+13))&31) & (0))) || ((((0*32+13))>>5)==4 && (1UL<<(((0*32+13))&31) & 0)) || ((((0*32+13))>>5)==5 && (1UL<<(((0*32+13))&31) & 0)) || ((((0*32+13))>>5)==6 && (1UL<<(((0*32+13))&31) & 0)) || ((((0*32+13))>>5)==7 && (1UL<<(((0*32+13))&31) & 0)) || ((((0*32+13))>>5)==8 && (1UL<<(((0*32+13))&31) & 0)) || ((((0*32+13))>>5)==9 && (1UL<<(((0*32+13))&31) & 0)) ) ? 1 : (__builtin_constant_p(((0*32+13))) ? constant_test_bit(((0*32+13)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((0*32+13)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))))); ______f.miss_hit[______r]++; ______r; })) + __flush_tlb_global(); + else + __flush_tlb(); +} +static inline __attribute__((always_inline)) void __flush_tlb_one(unsigned long addr) +{ + if (__builtin_constant_p(((1))) ? !!((1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/tlbflush.h", .line = 59, }; ______r = !!((1)); ______f.miss_hit[______r]++; ______r; })) + __flush_tlb_single(addr); + else + __flush_tlb(); +} +extern void flush_tlb_all(void); +extern void flush_tlb_current_task(void); +extern void flush_tlb_mm(struct mm_struct *); +extern void flush_tlb_page(struct vm_area_struct *, unsigned long); +static inline __attribute__((always_inline)) void flush_tlb_range(struct vm_area_struct *vma, + unsigned long start, unsigned long end) +{ + flush_tlb_mm(vma->vm_mm); +} +void native_flush_tlb_others(const struct cpumask *cpumask, + struct mm_struct *mm, unsigned long va); +struct tlb_state { + struct mm_struct *active_mm; + int state; +}; +extern __attribute__((section(".data..percpu" ""))) __typeof__(struct tlb_state) cpu_tlbstate __attribute__((__aligned__((1 << (6))))); +static inline __attribute__((always_inline)) void reset_lazy_tlbstate(void) +{ + do { typedef typeof(cpu_tlbstate.state) pto_T__; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/tlbflush.h", .line = 159, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pto_T__ pto_tmp__; pto_tmp__ = (0); (void)pto_tmp__; } switch (sizeof(cpu_tlbstate.state)) { case 1: asm("mov" "b %1,""%%""fs"":" "%P" "0" : "+m" (cpu_tlbstate.state) : "qi" ((pto_T__)(0))); break; case 2: asm("mov" "w %1,""%%""fs"":" "%P" "0" : "+m" (cpu_tlbstate.state) : "ri" ((pto_T__)(0))); break; case 4: asm("mov" "l %1,""%%""fs"":" "%P" "0" : "+m" (cpu_tlbstate.state) : "ri" ((pto_T__)(0))); break; case 8: asm("mov" "q %1,""%%""fs"":" "%P" "0" : "+m" (cpu_tlbstate.state) : "re" ((pto_T__)(0))); break; default: __bad_percpu_size(); } } while (0); + do { typedef typeof(cpu_tlbstate.active_mm) pto_T__; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "/data/exp/linux-3.0.4/arch/x86/include/asm/tlbflush.h", .line = 160, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pto_T__ pto_tmp__; pto_tmp__ = (&init_mm); (void)pto_tmp__; } switch (sizeof(cpu_tlbstate.active_mm)) { case 1: asm("mov" "b %1,""%%""fs"":" "%P" "0" : "+m" (cpu_tlbstate.active_mm) : "qi" ((pto_T__)(&init_mm))); break; case 2: asm("mov" "w %1,""%%""fs"":" "%P" "0" : "+m" (cpu_tlbstate.active_mm) : "ri" ((pto_T__)(&init_mm))); break; case 4: asm("mov" "l %1,""%%""fs"":" "%P" "0" : "+m" (cpu_tlbstate.active_mm) : "ri" ((pto_T__)(&init_mm))); break; case 8: asm("mov" "q %1,""%%""fs"":" "%P" "0" : "+m" (cpu_tlbstate.active_mm) : "re" ((pto_T__)(&init_mm))); break; default: __bad_percpu_size(); } } while (0); +} +static inline __attribute__((always_inline)) void flush_tlb_kernel_range(unsigned long start, + unsigned long end) +{ + flush_tlb_all(); +} +extern unsigned long highstart_pfn, highend_pfn; +extern void *kmap_high(struct page *page); +extern void kunmap_high(struct page *page); +void *kmap(struct page *page); +void kunmap(struct page *page); +void *kmap_atomic_prot(struct page *page, pgprot_t prot); +void *__kmap_atomic(struct page *page); +void __kunmap_atomic(void *kvaddr); +void *kmap_atomic_pfn(unsigned long pfn); +void *kmap_atomic_prot_pfn(unsigned long pfn, pgprot_t prot); +struct page *kmap_atomic_to_page(void *ptr); +extern void add_highpages_with_active_regions(int nid, unsigned long start_pfn, + unsigned long end_pfn); +unsigned int nr_free_highpages(void); +extern unsigned long totalhigh_pages; +void kmap_flush_unused(void); +extern __attribute__((section(".data..percpu" ""))) __typeof__(int) __kmap_atomic_idx; +static inline __attribute__((always_inline)) int kmap_atomic_idx_push(void) +{ + int idx = ({ typeof(__kmap_atomic_idx) pscr2_ret__; do { const void *__vpp_verify = (typeof(&(__kmap_atomic_idx)))((void *)0); (void)__vpp_verify; } while (0); switch(sizeof(__kmap_atomic_idx)) { case 1: pscr2_ret__ = ({ typeof(__kmap_atomic_idx) paro_ret__ = 1; switch (sizeof(__kmap_atomic_idx)) { case 1: asm("xaddb %0, ""%%""fs"":" "%P" "1" : "+q" (paro_ret__), "+m" (__kmap_atomic_idx) : : "memory"); break; case 2: asm("xaddw %0, ""%%""fs"":" "%P" "1" : "+r" (paro_ret__), "+m" (__kmap_atomic_idx) : : "memory"); break; case 4: asm("xaddl %0, ""%%""fs"":" "%P" "1" : "+r" (paro_ret__), "+m" (__kmap_atomic_idx) : : "memory"); break; case 8: asm("xaddq %0, ""%%""fs"":" "%P" "1" : "+re" (paro_ret__), "+m" (__kmap_atomic_idx) : : "memory"); break; default: __bad_percpu_size(); } paro_ret__ += 1; paro_ret__; }); break; case 2: pscr2_ret__ = ({ typeof(__kmap_atomic_idx) paro_ret__ = 1; switch (sizeof(__kmap_atomic_idx)) { case 1: asm("xaddb %0, ""%%""fs"":" "%P" "1" : "+q" (paro_ret__), "+m" (__kmap_atomic_idx) : : "memory"); break; case 2: asm("xaddw %0, ""%%""fs"":" "%P" "1" : "+r" (paro_ret__), "+m" (__kmap_atomic_idx) : : "memory"); break; case 4: asm("xaddl %0, ""%%""fs"":" "%P" "1" : "+r" (paro_ret__), "+m" (__kmap_atomic_idx) : : "memory"); break; case 8: asm("xaddq %0, ""%%""fs"":" "%P" "1" : "+re" (paro_ret__), "+m" (__kmap_atomic_idx) : : "memory"); break; default: __bad_percpu_size(); } paro_ret__ += 1; paro_ret__; }); break; case 4: pscr2_ret__ = ({ typeof(__kmap_atomic_idx) paro_ret__ = 1; switch (sizeof(__kmap_atomic_idx)) { case 1: asm("xaddb %0, ""%%""fs"":" "%P" "1" : "+q" (paro_ret__), "+m" (__kmap_atomic_idx) : : "memory"); break; case 2: asm("xaddw %0, ""%%""fs"":" "%P" "1" : "+r" (paro_ret__), "+m" (__kmap_atomic_idx) : : "memory"); break; case 4: asm("xaddl %0, ""%%""fs"":" "%P" "1" : "+r" (paro_ret__), "+m" (__kmap_atomic_idx) : : "memory"); break; case 8: asm("xaddq %0, ""%%""fs"":" "%P" "1" : "+re" (paro_ret__), "+m" (__kmap_atomic_idx) : : "memory"); break; default: __bad_percpu_size(); } paro_ret__ += 1; paro_ret__; }); break; case 8: pscr2_ret__ = ({ typeof(__kmap_atomic_idx) ret__; do { add_preempt_count(1); __asm__ __volatile__("": : :"memory"); } while (0); do { do { const void *__vpp_verify = (typeof(&((__kmap_atomic_idx))))((void *)0); (void)__vpp_verify; } while (0); switch(sizeof((__kmap_atomic_idx))) { case 1: do { typedef typeof(((__kmap_atomic_idx))) pao_T__; const int pao_ID__ = (__builtin_constant_p((1)) && (((1)) == 1 || ((1)) == -1)) ? ((1)) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((1)); (void)pao_tmp__; } switch (sizeof(((__kmap_atomic_idx)))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx)))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx)))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx))) : "qi" ((pao_T__)((1)))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx)))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx)))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx))) : "ri" ((pao_T__)((1)))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx)))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx)))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx))) : "ri" ((pao_T__)((1)))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx)))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx)))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx))) : "re" ((pao_T__)((1)))); break; default: __bad_percpu_size(); } } while (0);break; case 2: do { typedef typeof(((__kmap_atomic_idx))) pao_T__; const int pao_ID__ = (__builtin_constant_p((1)) && (((1)) == 1 || ((1)) == -1)) ? ((1)) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((1)); (void)pao_tmp__; } switch (sizeof(((__kmap_atomic_idx)))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx)))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx)))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx))) : "qi" ((pao_T__)((1)))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx)))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx)))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx))) : "ri" ((pao_T__)((1)))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx)))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx)))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx))) : "ri" ((pao_T__)((1)))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx)))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx)))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx))) : "re" ((pao_T__)((1)))); break; default: __bad_percpu_size(); } } while (0);break; case 4: do { typedef typeof(((__kmap_atomic_idx))) pao_T__; const int pao_ID__ = (__builtin_constant_p((1)) && (((1)) == 1 || ((1)) == -1)) ? ((1)) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((1)); (void)pao_tmp__; } switch (sizeof(((__kmap_atomic_idx)))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx)))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx)))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx))) : "qi" ((pao_T__)((1)))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx)))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx)))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx))) : "ri" ((pao_T__)((1)))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx)))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx)))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx))) : "ri" ((pao_T__)((1)))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx)))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx)))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" (((__kmap_atomic_idx))) : "re" ((pao_T__)((1)))); break; default: __bad_percpu_size(); } } while (0);break; case 8: do { *({ unsigned long tcp_ptr__; do { const void *__vpp_verify = (typeof(&(((__kmap_atomic_idx)))))((void *)0); (void)__vpp_verify; } while (0); asm volatile("add " "%%""fs"":" "%P" "1" ", %0" : "=r" (tcp_ptr__) : "m" (this_cpu_off), "0" (&(((__kmap_atomic_idx))))); (typeof(*(&(((__kmap_atomic_idx))))) *)tcp_ptr__; }) += ((1)); } while (0);break; default: __bad_size_call_parameter();break; } } while (0); ret__ = ({ typeof((__kmap_atomic_idx)) pscr_ret__; do { const void *__vpp_verify = (typeof(&((__kmap_atomic_idx))))((void *)0); (void)__vpp_verify; } while (0); switch(sizeof((__kmap_atomic_idx))) { case 1: pscr_ret__ = ({ typeof(((__kmap_atomic_idx))) pfo_ret__; switch (sizeof(((__kmap_atomic_idx)))) { case 1: asm("mov" "b ""%%""fs"":" "%P" "1"",%0" : "=q" (pfo_ret__) : "m"((__kmap_atomic_idx))); break; case 2: asm("mov" "w ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((__kmap_atomic_idx))); break; case 4: asm("mov" "l ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((__kmap_atomic_idx))); break; case 8: asm("mov" "q ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((__kmap_atomic_idx))); break; default: __bad_percpu_size(); } pfo_ret__; });break; case 2: pscr_ret__ = ({ typeof(((__kmap_atomic_idx))) pfo_ret__; switch (sizeof(((__kmap_atomic_idx)))) { case 1: asm("mov" "b ""%%""fs"":" "%P" "1"",%0" : "=q" (pfo_ret__) : "m"((__kmap_atomic_idx))); break; case 2: asm("mov" "w ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((__kmap_atomic_idx))); break; case 4: asm("mov" "l ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((__kmap_atomic_idx))); break; case 8: asm("mov" "q ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((__kmap_atomic_idx))); break; default: __bad_percpu_size(); } pfo_ret__; });break; case 4: pscr_ret__ = ({ typeof(((__kmap_atomic_idx))) pfo_ret__; switch (sizeof(((__kmap_atomic_idx)))) { case 1: asm("mov" "b ""%%""fs"":" "%P" "1"",%0" : "=q" (pfo_ret__) : "m"((__kmap_atomic_idx))); break; case 2: asm("mov" "w ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((__kmap_atomic_idx))); break; case 4: asm("mov" "l ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((__kmap_atomic_idx))); break; case 8: asm("mov" "q ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((__kmap_atomic_idx))); break; default: __bad_percpu_size(); } pfo_ret__; });break; case 8: pscr_ret__ = (*({ unsigned long tcp_ptr__; do { const void *__vpp_verify = (typeof(&((__kmap_atomic_idx))))((void *)0); (void)__vpp_verify; } while (0); asm volatile("add " "%%""fs"":" "%P" "1" ", %0" : "=r" (tcp_ptr__) : "m" (this_cpu_off), "0" (&((__kmap_atomic_idx)))); (typeof(*(&((__kmap_atomic_idx)))) *)tcp_ptr__; }));break; default: __bad_size_call_parameter();break; } pscr_ret__; }); do { do { __asm__ __volatile__("": : :"memory"); sub_preempt_count(1); } while (0); __asm__ __volatile__("": : :"memory"); do { if (__builtin_constant_p((((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = !!(((__builtin_constant_p(test_ti_thread_flag(current_thread_info(), 3)) ? !!(test_ti_thread_flag(current_thread_info(), 3)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 84, }; ______r = __builtin_expect(!!(test_ti_thread_flag(current_thread_info(), 3)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) preempt_schedule(); } while (0); } while (0); ret__; }); break; default: __bad_size_call_parameter(); break; } pscr2_ret__; }) - 1; + return idx; +} +static inline __attribute__((always_inline)) int kmap_atomic_idx(void) +{ + return ({ typeof((__kmap_atomic_idx)) pscr_ret__; do { const void *__vpp_verify = (typeof(&((__kmap_atomic_idx))))((void *)0); (void)__vpp_verify; } while (0); switch(sizeof((__kmap_atomic_idx))) { case 1: pscr_ret__ = ({ typeof(((__kmap_atomic_idx))) pfo_ret__; switch (sizeof(((__kmap_atomic_idx)))) { case 1: asm("mov" "b ""%%""fs"":" "%P" "1"",%0" : "=q" (pfo_ret__) : "m"((__kmap_atomic_idx))); break; case 2: asm("mov" "w ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((__kmap_atomic_idx))); break; case 4: asm("mov" "l ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((__kmap_atomic_idx))); break; case 8: asm("mov" "q ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((__kmap_atomic_idx))); break; default: __bad_percpu_size(); } pfo_ret__; });break; case 2: pscr_ret__ = ({ typeof(((__kmap_atomic_idx))) pfo_ret__; switch (sizeof(((__kmap_atomic_idx)))) { case 1: asm("mov" "b ""%%""fs"":" "%P" "1"",%0" : "=q" (pfo_ret__) : "m"((__kmap_atomic_idx))); break; case 2: asm("mov" "w ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((__kmap_atomic_idx))); break; case 4: asm("mov" "l ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((__kmap_atomic_idx))); break; case 8: asm("mov" "q ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((__kmap_atomic_idx))); break; default: __bad_percpu_size(); } pfo_ret__; });break; case 4: pscr_ret__ = ({ typeof(((__kmap_atomic_idx))) pfo_ret__; switch (sizeof(((__kmap_atomic_idx)))) { case 1: asm("mov" "b ""%%""fs"":" "%P" "1"",%0" : "=q" (pfo_ret__) : "m"((__kmap_atomic_idx))); break; case 2: asm("mov" "w ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((__kmap_atomic_idx))); break; case 4: asm("mov" "l ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((__kmap_atomic_idx))); break; case 8: asm("mov" "q ""%%""fs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m"((__kmap_atomic_idx))); break; default: __bad_percpu_size(); } pfo_ret__; });break; case 8: pscr_ret__ = (*({ unsigned long tcp_ptr__; do { const void *__vpp_verify = (typeof(&((__kmap_atomic_idx))))((void *)0); (void)__vpp_verify; } while (0); asm volatile("add " "%%""fs"":" "%P" "1" ", %0" : "=r" (tcp_ptr__) : "m" (this_cpu_off), "0" (&((__kmap_atomic_idx)))); (typeof(*(&((__kmap_atomic_idx)))) *)tcp_ptr__; }));break; default: __bad_size_call_parameter();break; } pscr_ret__; }) - 1; +} +static inline __attribute__((always_inline)) void kmap_atomic_idx_pop(void) +{ + do { do { const void *__vpp_verify = (typeof(&((((__kmap_atomic_idx))))))((void *)0); (void)__vpp_verify; } while (0); switch(sizeof((((__kmap_atomic_idx))))) { case 1: do { typedef typeof(((((__kmap_atomic_idx))))) pao_T__; const int pao_ID__ = (__builtin_constant_p((-(1))) && (((-(1))) == 1 || ((-(1))) == -1)) ? ((-(1))) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((-(1))); (void)pao_tmp__; } switch (sizeof(((((__kmap_atomic_idx)))))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx)))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx)))))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx))))) : "qi" ((pao_T__)((-(1))))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx)))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx)))))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx))))) : "ri" ((pao_T__)((-(1))))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx)))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx)))))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx))))) : "ri" ((pao_T__)((-(1))))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx)))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx)))))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx))))) : "re" ((pao_T__)((-(1))))); break; default: __bad_percpu_size(); } } while (0);break; case 2: do { typedef typeof(((((__kmap_atomic_idx))))) pao_T__; const int pao_ID__ = (__builtin_constant_p((-(1))) && (((-(1))) == 1 || ((-(1))) == -1)) ? ((-(1))) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((-(1))); (void)pao_tmp__; } switch (sizeof(((((__kmap_atomic_idx)))))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx)))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx)))))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx))))) : "qi" ((pao_T__)((-(1))))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx)))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx)))))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx))))) : "ri" ((pao_T__)((-(1))))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx)))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx)))))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx))))) : "ri" ((pao_T__)((-(1))))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx)))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx)))))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx))))) : "re" ((pao_T__)((-(1))))); break; default: __bad_percpu_size(); } } while (0);break; case 4: do { typedef typeof(((((__kmap_atomic_idx))))) pao_T__; const int pao_ID__ = (__builtin_constant_p((-(1))) && (((-(1))) == 1 || ((-(1))) == -1)) ? ((-(1))) : 0; if (__builtin_constant_p(((0))) ? !!((0)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((0)); ______f.miss_hit[______r]++; ______r; })) { pao_T__ pao_tmp__; pao_tmp__ = ((-(1))); (void)pao_tmp__; } switch (sizeof(((((__kmap_atomic_idx)))))) { case 1: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incb ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx)))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decb ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx)))))); else asm("addb %1, ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx))))) : "qi" ((pao_T__)((-(1))))); break; case 2: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incw ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx)))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decw ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx)))))); else asm("addw %1, ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx))))) : "ri" ((pao_T__)((-(1))))); break; case 4: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incl ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx)))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decl ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx)))))); else asm("addl %1, ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx))))) : "ri" ((pao_T__)((-(1))))); break; case 8: if (__builtin_constant_p(((pao_ID__ == 1))) ? !!((pao_ID__ == 1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((pao_ID__ == 1)); ______f.miss_hit[______r]++; ______r; })) asm("incq ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx)))))); else if (__builtin_constant_p(((pao_ID__ == -1))) ? !!((pao_ID__ == -1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 105, }; ______r = !!((pao_ID__ == -1)); ______f.miss_hit[______r]++; ______r; })) asm("decq ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx)))))); else asm("addq %1, ""%%""fs"":" "%P" "0" : "+m" (((((__kmap_atomic_idx))))) : "re" ((pao_T__)((-(1))))); break; default: __bad_percpu_size(); } } while (0);break; case 8: do { *({ unsigned long tcp_ptr__; do { const void *__vpp_verify = (typeof(&(((((__kmap_atomic_idx)))))))((void *)0); (void)__vpp_verify; } while (0); asm volatile("add " "%%""fs"":" "%P" "1" ", %0" : "=r" (tcp_ptr__) : "m" (this_cpu_off), "0" (&(((((__kmap_atomic_idx))))))); (typeof(*(&(((((__kmap_atomic_idx))))))) *)tcp_ptr__; }) += ((-(1))); } while (0);break; default: __bad_size_call_parameter();break; } } while (0); +} +static inline __attribute__((always_inline)) void clear_user_highpage(struct page *page, unsigned long vaddr) +{ + void *addr = __kmap_atomic(page); + clear_user_page(addr, vaddr, page); + do { do { ((void)sizeof(char[1 - 2*!!(__builtin_types_compatible_p(typeof((addr)), typeof(struct page *)))])); if (__builtin_constant_p(((__builtin_types_compatible_p(typeof((addr)), typeof(struct page *))))) ? !!((__builtin_types_compatible_p(typeof((addr)), typeof(struct page *)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 132, }; ______r = !!((__builtin_types_compatible_p(typeof((addr)), typeof(struct page *)))); ______f.miss_hit[______r]++; ______r; })) __build_bug_on_failed = 1; } while(0); __kunmap_atomic(addr); } while (0); +} +static inline __attribute__((always_inline)) struct page * +alloc_zeroed_user_highpage_movable(struct vm_area_struct *vma, + unsigned long vaddr) +{ + return alloc_pages_node(numa_node_id(), ((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u) | (( gfp_t)0x20000u) | (( gfp_t)0x02u)) | (( gfp_t)0x8000u) | (( gfp_t)0x08u), 0); +} +static inline __attribute__((always_inline)) void clear_highpage(struct page *page) +{ + void *kaddr = __kmap_atomic(page); + clear_page(kaddr); + do { do { ((void)sizeof(char[1 - 2*!!(__builtin_types_compatible_p(typeof((kaddr)), typeof(struct page *)))])); if (__builtin_constant_p(((__builtin_types_compatible_p(typeof((kaddr)), typeof(struct page *))))) ? !!((__builtin_types_compatible_p(typeof((kaddr)), typeof(struct page *)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 185, }; ______r = !!((__builtin_types_compatible_p(typeof((kaddr)), typeof(struct page *)))); ______f.miss_hit[______r]++; ______r; })) __build_bug_on_failed = 1; } while(0); __kunmap_atomic(kaddr); } while (0); +} +static inline __attribute__((always_inline)) void zero_user_segments(struct page *page, + unsigned start1, unsigned end1, + unsigned start2, unsigned end2) +{ + void *kaddr = __kmap_atomic(page); + do { if (__builtin_constant_p((((__builtin_constant_p(end1 > ((1UL) << 12) || end2 > ((1UL) << 12)) ? !!(end1 > ((1UL) << 12) || end2 > ((1UL) << 12)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 194, }; ______r = __builtin_expect(!!(end1 > ((1UL) << 12) || end2 > ((1UL) << 12)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p(end1 > ((1UL) << 12) || end2 > ((1UL) << 12)) ? !!(end1 > ((1UL) << 12) || end2 > ((1UL) << 12)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 194, }; ______r = __builtin_expect(!!(end1 > ((1UL) << 12) || end2 > ((1UL) << 12)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 194, }; ______r = !!(((__builtin_constant_p(end1 > ((1UL) << 12) || end2 > ((1UL) << 12)) ? !!(end1 > ((1UL) << 12) || end2 > ((1UL) << 12)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 194, }; ______r = __builtin_expect(!!(end1 > ((1UL) << 12) || end2 > ((1UL) << 12)), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/highmem.h"), "i" (194), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); } while(0); + if (__builtin_constant_p(((end1 > start1))) ? !!((end1 > start1)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 196, }; ______r = !!((end1 > start1)); ______f.miss_hit[______r]++; ______r; })) + __builtin_memset(kaddr + start1, 0, end1 - start1); + if (__builtin_constant_p(((end2 > start2))) ? !!((end2 > start2)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 199, }; ______r = !!((end2 > start2)); ______f.miss_hit[______r]++; ______r; })) + __builtin_memset(kaddr + start2, 0, end2 - start2); + do { do { ((void)sizeof(char[1 - 2*!!(__builtin_types_compatible_p(typeof((kaddr)), typeof(struct page *)))])); if (__builtin_constant_p(((__builtin_types_compatible_p(typeof((kaddr)), typeof(struct page *))))) ? !!((__builtin_types_compatible_p(typeof((kaddr)), typeof(struct page *)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 202, }; ______r = !!((__builtin_types_compatible_p(typeof((kaddr)), typeof(struct page *)))); ______f.miss_hit[______r]++; ______r; })) __build_bug_on_failed = 1; } while(0); __kunmap_atomic(kaddr); } while (0); + do { } while (0); +} +static inline __attribute__((always_inline)) void zero_user_segment(struct page *page, + unsigned start, unsigned end) +{ + zero_user_segments(page, start, end, 0, 0); +} +static inline __attribute__((always_inline)) void zero_user(struct page *page, + unsigned start, unsigned size) +{ + zero_user_segments(page, start, start + size, 0, 0); +} +static inline __attribute__((always_inline)) void __attribute__((deprecated)) memclear_highpage_flush(struct page *page, + unsigned int offset, unsigned int size) +{ + zero_user(page, offset, size); +} +static inline __attribute__((always_inline)) void copy_user_highpage(struct page *to, struct page *from, + unsigned long vaddr, struct vm_area_struct *vma) +{ + char *vfrom, *vto; + vfrom = __kmap_atomic(from); + vto = __kmap_atomic(to); + copy_user_page(vto, vfrom, vaddr, to); + do { do { ((void)sizeof(char[1 - 2*!!(__builtin_types_compatible_p(typeof((vto)), typeof(struct page *)))])); if (__builtin_constant_p(((__builtin_types_compatible_p(typeof((vto)), typeof(struct page *))))) ? !!((__builtin_types_compatible_p(typeof((vto)), typeof(struct page *)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 234, }; ______r = !!((__builtin_types_compatible_p(typeof((vto)), typeof(struct page *)))); ______f.miss_hit[______r]++; ______r; })) __build_bug_on_failed = 1; } while(0); __kunmap_atomic(vto); } while (0); + do { do { ((void)sizeof(char[1 - 2*!!(__builtin_types_compatible_p(typeof((vfrom)), typeof(struct page *)))])); if (__builtin_constant_p(((__builtin_types_compatible_p(typeof((vfrom)), typeof(struct page *))))) ? !!((__builtin_types_compatible_p(typeof((vfrom)), typeof(struct page *)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 235, }; ______r = !!((__builtin_types_compatible_p(typeof((vfrom)), typeof(struct page *)))); ______f.miss_hit[______r]++; ______r; })) __build_bug_on_failed = 1; } while(0); __kunmap_atomic(vfrom); } while (0); +} +static inline __attribute__((always_inline)) void copy_highpage(struct page *to, struct page *from) +{ + char *vfrom, *vto; + vfrom = __kmap_atomic(from); + vto = __kmap_atomic(to); + copy_page(vto, vfrom); + do { do { ((void)sizeof(char[1 - 2*!!(__builtin_types_compatible_p(typeof((vto)), typeof(struct page *)))])); if (__builtin_constant_p(((__builtin_types_compatible_p(typeof((vto)), typeof(struct page *))))) ? !!((__builtin_types_compatible_p(typeof((vto)), typeof(struct page *)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 247, }; ______r = !!((__builtin_types_compatible_p(typeof((vto)), typeof(struct page *)))); ______f.miss_hit[______r]++; ______r; })) __build_bug_on_failed = 1; } while(0); __kunmap_atomic(vto); } while (0); + do { do { ((void)sizeof(char[1 - 2*!!(__builtin_types_compatible_p(typeof((vfrom)), typeof(struct page *)))])); if (__builtin_constant_p(((__builtin_types_compatible_p(typeof((vfrom)), typeof(struct page *))))) ? !!((__builtin_types_compatible_p(typeof((vfrom)), typeof(struct page *)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/highmem.h", .line = 248, }; ______r = !!((__builtin_types_compatible_p(typeof((vfrom)), typeof(struct page *)))); ______f.miss_hit[______r]++; ______r; })) __build_bug_on_failed = 1; } while(0); __kunmap_atomic(vfrom); } while (0); +} +struct scatterlist { + unsigned long page_link; + unsigned int offset; + unsigned int length; + dma_addr_t dma_address; + unsigned int dma_length; +}; +struct sg_table { + struct scatterlist *sgl; + unsigned int nents; + unsigned int orig_nents; +}; +static inline __attribute__((always_inline)) void sg_assign_page(struct scatterlist *sg, struct page *page) +{ + unsigned long page_link = sg->page_link & 0x3; + do { if (__builtin_constant_p((((__builtin_constant_p((unsigned long) page & 0x03) ? !!((unsigned long) page & 0x03) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/scatterlist.h", .line = 63, }; ______r = __builtin_expect(!!((unsigned long) page & 0x03), 1); ftrace_likely_update(&______f, ______r, 0); ______r; }))))) ? !!(((__builtin_constant_p((unsigned long) page & 0x03) ? !!((unsigned long) page & 0x03) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/scatterlist.h", .line = 63, }; ______r = __builtin_expect(!!((unsigned long) page & 0x03), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/linux/scatterlist.h", .line = 63, }; ______r = !!(((__builtin_constant_p((unsigned long) page & 0x03) ? !!((unsigned long) page & 0x03) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/linux/scatterlist.h", .line = 63, }; ______r = __builtin_expect(!!((unsigned long) page & 0x03), 1); ftrace_likely_update(&______f, ______r, 0); ______r; })))); ______f.miss_hit[______r]++; ______r; })) do { asm volatile("1:\tud2\n" ".pushsection __bug_table,\"a\"\n" "2:\t.long 1b, %c0\n" "\t.word %c1, 0\n" "\t.org 2b+%c2\n" ".popsection" : : "i" ("include/linux/scatterlist.h"), "i" (63), "i" (sizeof(struct bug_entry))); __builtin_unreachable(); } while (0); } while(0); + sg->page_link = page_link | (unsigned long) page; +} +static inline __attribute__((always_inline)) void sg_set_page(struct scatterlist *sg, struct page *page, + unsigned int len, unsigned int offset) +{ + sg_assign_page(sg, page); + sg->offset = offset; + sg->length = len; +} +static inline __attribute__((always_inline)) struct page *sg_page(struct scatterlist *sg) +{ + return (struct page *)((sg)->page_link & ~0x3); +} +static inline __attribute__((always_inline)) void sg_set_buf(struct scatterlist *sg, const void *buf, + unsigned int buflen) +{ + sg_set_page(sg, (mem_map + (((((unsigned long)(buf)) - ((unsigned long)(0xC0000000UL))) >> 12) - (0UL))), buflen, ((unsigned long)(buf) & ~(~(((1UL) << 12)-1)))); +} +static inline __attribute__((always_inline)) void sg_chain(struct scatterlist *prv, unsigned int prv_nents, + struct scatterlist *sgl) +{ + prv[prv_nents - 1].offset = 0; + prv[prv_nents - 1].length = 0; + prv[prv_nents - 1].page_link = ((unsigned long) sgl | 0x01) & ~0x02; +} +static inline __attribute__((always_inline)) void sg_mark_end(struct scatterlist *sg) +{ + sg->page_link |= 0x02; + sg->page_link &= ~0x01; +} +static inline __attribute__((always_inline)) dma_addr_t sg_phys(struct scatterlist *sg) +{ + return ((dma_addr_t)((unsigned long)((sg_page(sg)) - mem_map) + (0UL)) << 12) + sg->offset; +} +static inline __attribute__((always_inline)) void *sg_virt(struct scatterlist *sg) +{ + return page_address(sg_page(sg)) + sg->offset; +} +struct scatterlist *sg_next(struct scatterlist *); +struct scatterlist *sg_last(struct scatterlist *s, unsigned int); +void sg_init_table(struct scatterlist *, unsigned int); +void sg_init_one(struct scatterlist *, const void *, unsigned int); +typedef struct scatterlist *(sg_alloc_fn)(unsigned int, gfp_t); +typedef void (sg_free_fn)(struct scatterlist *, unsigned int); +void __sg_free_table(struct sg_table *, unsigned int, sg_free_fn *); +void sg_free_table(struct sg_table *); +int __sg_alloc_table(struct sg_table *, unsigned int, unsigned int, gfp_t, + sg_alloc_fn *); +int sg_alloc_table(struct sg_table *, unsigned int, gfp_t); +size_t sg_copy_from_buffer(struct scatterlist *sgl, unsigned int nents, + void *buf, size_t buflen); +size_t sg_copy_to_buffer(struct scatterlist *sgl, unsigned int nents, + void *buf, size_t buflen); +struct sg_mapping_iter { + struct page *page; + void *addr; + size_t length; + size_t consumed; + struct scatterlist *__sg; + unsigned int __nents; + unsigned int __offset; + unsigned int __flags; +}; +void sg_miter_start(struct sg_mapping_iter *miter, struct scatterlist *sgl, + unsigned int nents, unsigned int flags); +bool sg_miter_next(struct sg_mapping_iter *miter); +void sg_miter_stop(struct sg_mapping_iter *miter); +static inline __attribute__((always_inline)) enum km_type crypto_kmap_type(int out) +{ + enum km_type type; + if (__builtin_constant_p((((((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8))))))) ? !!(((((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8)))))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/crypto/scatterwalk.h", .line = 32, }; ______r = !!(((((current_thread_info()->preempt_count) & (((1UL << (8))-1) << (0 + 8)))))); ______f.miss_hit[______r]++; ______r; })) + type = out * (KM_SOFTIRQ1 - KM_SOFTIRQ0) + KM_SOFTIRQ0; + else + type = out * (KM_USER1 - KM_USER0) + KM_USER0; + return type; +} +static inline __attribute__((always_inline)) void *crypto_kmap(struct page *page, int out) +{ + return __kmap_atomic(page); +} +static inline __attribute__((always_inline)) void crypto_kunmap(void *vaddr, int out) +{ + do { do { ((void)sizeof(char[1 - 2*!!(__builtin_types_compatible_p(typeof((vaddr)), typeof(struct page *)))])); if (__builtin_constant_p(((__builtin_types_compatible_p(typeof((vaddr)), typeof(struct page *))))) ? !!((__builtin_types_compatible_p(typeof((vaddr)), typeof(struct page *)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/crypto/scatterwalk.h", .line = 47, }; ______r = !!((__builtin_types_compatible_p(typeof((vaddr)), typeof(struct page *)))); ______f.miss_hit[______r]++; ______r; })) __build_bug_on_failed = 1; } while(0); __kunmap_atomic(vaddr); } while (0); +} +static inline __attribute__((always_inline)) void crypto_yield(u32 flags) +{ + if (__builtin_constant_p(((flags & 0x00000200))) ? !!((flags & 0x00000200)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/crypto/scatterwalk.h", .line = 52, }; ______r = !!((flags & 0x00000200)); ______f.miss_hit[______r]++; ______r; })) + ({ __might_sleep("include/crypto/scatterwalk.h", 53, 0); _cond_resched(); }); +} +static inline __attribute__((always_inline)) void scatterwalk_sg_chain(struct scatterlist *sg1, int num, + struct scatterlist *sg2) +{ + sg_set_page(&sg1[num - 1], (void *)sg2, 0, 0); + sg1[num - 1].page_link &= ~0x02; +} +static inline __attribute__((always_inline)) struct scatterlist *scatterwalk_sg_next(struct scatterlist *sg) +{ + if (__builtin_constant_p(((((sg)->page_link & 0x02)))) ? !!((((sg)->page_link & 0x02))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/crypto/scatterwalk.h", .line = 65, }; ______r = !!((((sg)->page_link & 0x02))); ______f.miss_hit[______r]++; ______r; })) + return ((void *)0); + return (++sg)->length ? sg : (void *)sg_page(sg); +} +static inline __attribute__((always_inline)) void scatterwalk_crypto_chain(struct scatterlist *head, + struct scatterlist *sg, + int chain, int num) +{ + if (__builtin_constant_p(((chain))) ? !!((chain)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/crypto/scatterwalk.h", .line = 75, }; ______r = !!((chain)); ______f.miss_hit[______r]++; ______r; })) { + head->length += sg->length; + sg = scatterwalk_sg_next(sg); + } + if (__builtin_constant_p(((sg))) ? !!((sg)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/crypto/scatterwalk.h", .line = 80, }; ______r = !!((sg)); ______f.miss_hit[______r]++; ______r; })) + scatterwalk_sg_chain(head, num, sg); + else + sg_mark_end(head); +} +static inline __attribute__((always_inline)) unsigned long scatterwalk_samebuf(struct scatter_walk *walk_in, + struct scatter_walk *walk_out) +{ + return !(((sg_page(walk_in->sg) - sg_page(walk_out->sg)) << 12) + + (int)(walk_in->offset - walk_out->offset)); +} +static inline __attribute__((always_inline)) unsigned int scatterwalk_pagelen(struct scatter_walk *walk) +{ + unsigned int len = walk->sg->offset + walk->sg->length - walk->offset; + unsigned int len_this_page = ((unsigned long)(~walk->offset) & ~(~(((1UL) << 12)-1))) + 1; + return len_this_page > len ? len : len_this_page; +} +static inline __attribute__((always_inline)) unsigned int scatterwalk_clamp(struct scatter_walk *walk, + unsigned int nbytes) +{ + unsigned int len_this_page = scatterwalk_pagelen(walk); + return nbytes > len_this_page ? len_this_page : nbytes; +} +static inline __attribute__((always_inline)) void scatterwalk_advance(struct scatter_walk *walk, + unsigned int nbytes) +{ + walk->offset += nbytes; +} +static inline __attribute__((always_inline)) unsigned int scatterwalk_aligned(struct scatter_walk *walk, + unsigned int alignmask) +{ + return !(walk->offset & alignmask); +} +static inline __attribute__((always_inline)) struct page *scatterwalk_page(struct scatter_walk *walk) +{ + return sg_page(walk->sg) + (walk->offset >> 12); +} +static inline __attribute__((always_inline)) void scatterwalk_unmap(void *vaddr, int out) +{ + crypto_kunmap(vaddr, out); +} +void scatterwalk_start(struct scatter_walk *walk, struct scatterlist *sg); +void scatterwalk_copychunks(void *buf, struct scatter_walk *walk, + size_t nbytes, int out); +void *scatterwalk_map(struct scatter_walk *walk, int out); +void scatterwalk_done(struct scatter_walk *walk, int out, int more); +void scatterwalk_map_and_copy(void *buf, struct scatterlist *sg, + unsigned int start, unsigned int nbytes, int out); +struct aead_givcrypt_request { + u64 seq; + u8 *giv; + struct aead_request areq; +}; +static inline __attribute__((always_inline)) struct crypto_aead *aead_givcrypt_reqtfm( + struct aead_givcrypt_request *req) +{ + return crypto_aead_reqtfm(&req->areq); +} +static inline __attribute__((always_inline)) int crypto_aead_givencrypt(struct aead_givcrypt_request *req) +{ + struct aead_tfm *crt = crypto_aead_crt(aead_givcrypt_reqtfm(req)); + return crt->givencrypt(req); +}; +static inline __attribute__((always_inline)) int crypto_aead_givdecrypt(struct aead_givcrypt_request *req) +{ + struct aead_tfm *crt = crypto_aead_crt(aead_givcrypt_reqtfm(req)); + return crt->givdecrypt(req); +}; +static inline __attribute__((always_inline)) void aead_givcrypt_set_tfm(struct aead_givcrypt_request *req, + struct crypto_aead *tfm) +{ + req->areq.base.tfm = crypto_aead_tfm(tfm); +} +static inline __attribute__((always_inline)) struct aead_givcrypt_request *aead_givcrypt_alloc( + struct crypto_aead *tfm, gfp_t gfp) +{ + struct aead_givcrypt_request *req; + req = kmalloc(sizeof(struct aead_givcrypt_request) + + crypto_aead_reqsize(tfm), gfp); + if (__builtin_constant_p((((__builtin_constant_p(req) ? !!(req) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/crypto/aead.h", .line = 65, }; ______r = __builtin_expect(!!(req), 1); ftrace_likely_update(&______f, ______r, 1); ______r; }))))) ? !!(((__builtin_constant_p(req) ? !!(req) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/crypto/aead.h", .line = 65, }; ______r = __builtin_expect(!!(req), 1); ftrace_likely_update(&______f, ______r, 1); ______r; })))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "include/crypto/aead.h", .line = 65, }; ______r = !!(((__builtin_constant_p(req) ? !!(req) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_annotated_branch"))) ______f = { .func = __func__, .file = "include/crypto/aead.h", .line = 65, }; ______r = __builtin_expect(!!(req), 1); ftrace_likely_update(&______f, ______r, 1); ______r; })))); ______f.miss_hit[______r]++; ______r; })) + aead_givcrypt_set_tfm(req, tfm); + return req; +} +static inline __attribute__((always_inline)) void aead_givcrypt_free(struct aead_givcrypt_request *req) +{ + kfree(req); +} +static inline __attribute__((always_inline)) void aead_givcrypt_set_callback( + struct aead_givcrypt_request *req, u32 flags, + crypto_completion_t complete, void *data) +{ + aead_request_set_callback(&req->areq, flags, complete, data); +} +static inline __attribute__((always_inline)) void aead_givcrypt_set_crypt(struct aead_givcrypt_request *req, + struct scatterlist *src, + struct scatterlist *dst, + unsigned int nbytes, void *iv) +{ + aead_request_set_crypt(&req->areq, src, dst, nbytes, iv); +} +static inline __attribute__((always_inline)) void aead_givcrypt_set_assoc(struct aead_givcrypt_request *req, + struct scatterlist *assoc, + unsigned int assoclen) +{ + aead_request_set_assoc(&req->areq, assoc, assoclen); +} +static inline __attribute__((always_inline)) void aead_givcrypt_set_giv(struct aead_givcrypt_request *req, + u8 *giv, u64 seq) +{ + req->giv = giv; + req->seq = seq; +} +struct rtattr; +struct crypto_aead_spawn { + struct crypto_spawn base; +}; +extern const struct crypto_type crypto_nivaead_type; +static inline __attribute__((always_inline)) void crypto_set_aead_spawn( + struct crypto_aead_spawn *spawn, struct crypto_instance *inst) +{ + crypto_set_spawn(&spawn->base, inst); +} +int crypto_grab_aead(struct crypto_aead_spawn *spawn, const char *name, + u32 type, u32 mask); +static inline __attribute__((always_inline)) void crypto_drop_aead(struct crypto_aead_spawn *spawn) +{ + crypto_drop_spawn(&spawn->base); +} +static inline __attribute__((always_inline)) struct crypto_alg *crypto_aead_spawn_alg( + struct crypto_aead_spawn *spawn) +{ + return spawn->base.alg; +} +static inline __attribute__((always_inline)) struct crypto_aead *crypto_spawn_aead( + struct crypto_aead_spawn *spawn) +{ + return __crypto_aead_cast( + crypto_spawn_tfm(&spawn->base, 0x00000003, + 0x0000000f)); +} +struct crypto_instance *aead_geniv_alloc(struct crypto_template *tmpl, + struct rtattr **tb, u32 type, + u32 mask); +void aead_geniv_free(struct crypto_instance *inst); +int aead_geniv_init(struct crypto_tfm *tfm); +void aead_geniv_exit(struct crypto_tfm *tfm); +static inline __attribute__((always_inline)) struct crypto_aead *aead_geniv_base(struct crypto_aead *geniv) +{ + return crypto_aead_crt(geniv)->base; +} +static inline __attribute__((always_inline)) void *aead_givcrypt_reqctx(struct aead_givcrypt_request *req) +{ + return aead_request_ctx(&req->areq); +} +static inline __attribute__((always_inline)) void aead_givcrypt_complete(struct aead_givcrypt_request *req, + int err) +{ + aead_request_complete(&req->areq, err); +} +struct async_aes_ctx { + struct cryptd_ablkcipher *cryptd_tfm; +}; +struct aesni_rfc4106_gcm_ctx { + u8 hash_subkey[16]; + struct crypto_aes_ctx aes_key_expanded; + u8 nonce[4]; + struct cryptd_aead *cryptd_tfm; +}; +struct aesni_gcm_set_hash_subkey_result { + int err; + struct completion completion; +}; +struct aesni_hash_subkey_req_data { + u8 iv[16]; + struct aesni_gcm_set_hash_subkey_result result; + struct scatterlist sg; +}; + __attribute__((regparm(0))) int aesni_set_key(struct crypto_aes_ctx *ctx, const u8 *in_key, + unsigned int key_len); + __attribute__((regparm(0))) void aesni_enc(struct crypto_aes_ctx *ctx, u8 *out, + const u8 *in); + __attribute__((regparm(0))) void aesni_dec(struct crypto_aes_ctx *ctx, u8 *out, + const u8 *in); + __attribute__((regparm(0))) void aesni_ecb_enc(struct crypto_aes_ctx *ctx, u8 *out, + const u8 *in, unsigned int len); + __attribute__((regparm(0))) void aesni_ecb_dec(struct crypto_aes_ctx *ctx, u8 *out, + const u8 *in, unsigned int len); + __attribute__((regparm(0))) void aesni_cbc_enc(struct crypto_aes_ctx *ctx, u8 *out, + const u8 *in, unsigned int len, u8 *iv); + __attribute__((regparm(0))) void aesni_cbc_dec(struct crypto_aes_ctx *ctx, u8 *out, + const u8 *in, unsigned int len, u8 *iv); +int crypto_fpu_init(void); +void crypto_fpu_exit(void); +static inline __attribute__((always_inline)) struct crypto_aes_ctx *aes_ctx(void *raw_ctx) +{ + unsigned long addr = (unsigned long)raw_ctx; + unsigned long align = (16); + if (__builtin_constant_p(((align <= crypto_tfm_ctx_alignment()))) ? !!((align <= crypto_tfm_ctx_alignment())) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "arch/x86/crypto/aesni-intel_glue.c", .line = 162, }; ______r = !!((align <= crypto_tfm_ctx_alignment())); ______f.miss_hit[______r]++; ______r; })) + align = 1; + return (struct crypto_aes_ctx *)((((addr)) + ((typeof((addr)))((align)) - 1)) & ~((typeof((addr)))((align)) - 1)); +} +static int aes_set_key_common(struct crypto_tfm *tfm, void *raw_ctx, + const u8 *in_key, unsigned int key_len) +{ + struct crypto_aes_ctx *ctx = aes_ctx(raw_ctx); + u32 *flags = &tfm->crt_flags; + int err; + if (__builtin_constant_p(((key_len != 16 && key_len != 24 && key_len != 32))) ? !!((key_len != 16 && key_len != 24 && key_len != 32)) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = + "arch/x86/crypto/aesni-intel_glue.c" + , .line = + 175 + , }; ______r = !!((key_len != 16 && key_len != 24 && key_len != 32)); ______f.miss_hit[______r]++; ______r; })) + { + *flags |= 0x00200000; + return -22; + } + if (__builtin_constant_p(((!irq_fpu_usable()))) ? !!((!irq_fpu_usable())) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "arch/x86/crypto/aesni-intel_glue.c", .line = 180, }; ______r = !!((!irq_fpu_usable())); ______f.miss_hit[______r]++; ______r; })) + err = crypto_aes_expand_key(ctx, in_key, key_len); + else { + kernel_fpu_begin(); + err = aesni_set_key(ctx, in_key, key_len); + kernel_fpu_end(); + } + return err; +} +static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key, + unsigned int key_len) +{ + return aes_set_key_common(tfm, crypto_tfm_ctx(tfm), in_key, key_len); +} +static void aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +{ + struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm)); + if (__builtin_constant_p(((!irq_fpu_usable()))) ? !!((!irq_fpu_usable())) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "arch/x86/crypto/aesni-intel_glue.c", .line = 201, }; ______r = !!((!irq_fpu_usable())); ______f.miss_hit[______r]++; ______r; })) + crypto_aes_encrypt_x86(ctx, dst, src); + else { + kernel_fpu_begin(); + aesni_enc(ctx, dst, src); + kernel_fpu_end(); + } +} +static void aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +{ + struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm)); + if (__builtin_constant_p(((!irq_fpu_usable()))) ? !!((!irq_fpu_usable())) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "arch/x86/crypto/aesni-intel_glue.c", .line = 214, }; ______r = !!((!irq_fpu_usable())); ______f.miss_hit[______r]++; ______r; })) + crypto_aes_decrypt_x86(ctx, dst, src); + else { + kernel_fpu_begin(); + aesni_dec(ctx, dst, src); + kernel_fpu_end(); + } +} +static struct crypto_alg aesni_alg = { + .cra_name = "aes", + .cra_driver_name = "aes-aesni", + .cra_priority = 300, + .cra_flags = 0x00000001, + .cra_blocksize = 16, + .cra_ctxsize = sizeof(struct crypto_aes_ctx)+(16)-1, + .cra_alignmask = 0, + .cra_module = (&__this_module), + .cra_list = { &(aesni_alg.cra_list), &(aesni_alg.cra_list) }, + .cra_u = { + .cipher = { + .cia_min_keysize = 16, + .cia_max_keysize = 32, + .cia_setkey = aes_set_key, + .cia_encrypt = aes_encrypt, + .cia_decrypt = aes_decrypt + } + } +}; +static void __aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +{ + struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm)); + aesni_enc(ctx, dst, src); +} +static void __aes_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) +{ + struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm)); + aesni_dec(ctx, dst, src); +} +static struct crypto_alg __aesni_alg = { + .cra_name = "__aes-aesni", + .cra_driver_name = "__driver-aes-aesni", + .cra_priority = 0, + .cra_flags = 0x00000001, + .cra_blocksize = 16, + .cra_ctxsize = sizeof(struct crypto_aes_ctx)+(16)-1, + .cra_alignmask = 0, + .cra_module = (&__this_module), + .cra_list = { &(__aesni_alg.cra_list), &(__aesni_alg.cra_list) }, + .cra_u = { + .cipher = { + .cia_min_keysize = 16, + .cia_max_keysize = 32, + .cia_setkey = aes_set_key, + .cia_encrypt = __aes_encrypt, + .cia_decrypt = __aes_decrypt + } + } +}; +static int ecb_encrypt(struct blkcipher_desc *desc, + struct scatterlist *dst, struct scatterlist *src, + unsigned int nbytes) +{ + struct crypto_aes_ctx *ctx = aes_ctx(crypto_blkcipher_ctx(desc->tfm)); + struct blkcipher_walk walk; + int err; + blkcipher_walk_init(&walk, dst, src, nbytes); + err = blkcipher_walk_virt(desc, &walk); + desc->flags &= ~0x00000200; + kernel_fpu_begin(); + while ((nbytes = walk.nbytes)) { + aesni_ecb_enc(ctx, walk.dst.virt.addr, walk.src.virt.addr, + nbytes & (~(16 -1))); + nbytes &= 16 - 1; + err = blkcipher_walk_done(desc, &walk, nbytes); + } + kernel_fpu_end(); + return err; +} +static int ecb_decrypt(struct blkcipher_desc *desc, + struct scatterlist *dst, struct scatterlist *src, + unsigned int nbytes) +{ + struct crypto_aes_ctx *ctx = aes_ctx(crypto_blkcipher_ctx(desc->tfm)); + struct blkcipher_walk walk; + int err; + blkcipher_walk_init(&walk, dst, src, nbytes); + err = blkcipher_walk_virt(desc, &walk); + desc->flags &= ~0x00000200; + kernel_fpu_begin(); + while ((nbytes = walk.nbytes)) { + aesni_ecb_dec(ctx, walk.dst.virt.addr, walk.src.virt.addr, + nbytes & (~(16 -1))); + nbytes &= 16 - 1; + err = blkcipher_walk_done(desc, &walk, nbytes); + } + kernel_fpu_end(); + return err; +} +static struct crypto_alg blk_ecb_alg = { + .cra_name = "__ecb-aes-aesni", + .cra_driver_name = "__driver-ecb-aes-aesni", + .cra_priority = 0, + .cra_flags = 0x00000004, + .cra_blocksize = 16, + .cra_ctxsize = sizeof(struct crypto_aes_ctx)+(16)-1, + .cra_alignmask = 0, + .cra_type = &crypto_blkcipher_type, + .cra_module = (&__this_module), + .cra_list = { &(blk_ecb_alg.cra_list), &(blk_ecb_alg.cra_list) }, + .cra_u = { + .blkcipher = { + .min_keysize = 16, + .max_keysize = 32, + .setkey = aes_set_key, + .encrypt = ecb_encrypt, + .decrypt = ecb_decrypt, + }, + }, +}; +static int cbc_encrypt(struct blkcipher_desc *desc, + struct scatterlist *dst, struct scatterlist *src, + unsigned int nbytes) +{ + struct crypto_aes_ctx *ctx = aes_ctx(crypto_blkcipher_ctx(desc->tfm)); + struct blkcipher_walk walk; + int err; + blkcipher_walk_init(&walk, dst, src, nbytes); + err = blkcipher_walk_virt(desc, &walk); + desc->flags &= ~0x00000200; + kernel_fpu_begin(); + while ((nbytes = walk.nbytes)) { + aesni_cbc_enc(ctx, walk.dst.virt.addr, walk.src.virt.addr, + nbytes & (~(16 -1)), walk.iv); + nbytes &= 16 - 1; + err = blkcipher_walk_done(desc, &walk, nbytes); + } + kernel_fpu_end(); + return err; +} +static int cbc_decrypt(struct blkcipher_desc *desc, + struct scatterlist *dst, struct scatterlist *src, + unsigned int nbytes) +{ + struct crypto_aes_ctx *ctx = aes_ctx(crypto_blkcipher_ctx(desc->tfm)); + struct blkcipher_walk walk; + int err; + blkcipher_walk_init(&walk, dst, src, nbytes); + err = blkcipher_walk_virt(desc, &walk); + desc->flags &= ~0x00000200; + kernel_fpu_begin(); + while ((nbytes = walk.nbytes)) { + aesni_cbc_dec(ctx, walk.dst.virt.addr, walk.src.virt.addr, + nbytes & (~(16 -1)), walk.iv); + nbytes &= 16 - 1; + err = blkcipher_walk_done(desc, &walk, nbytes); + } + kernel_fpu_end(); + return err; +} +static struct crypto_alg blk_cbc_alg = { + .cra_name = "__cbc-aes-aesni", + .cra_driver_name = "__driver-cbc-aes-aesni", + .cra_priority = 0, + .cra_flags = 0x00000004, + .cra_blocksize = 16, + .cra_ctxsize = sizeof(struct crypto_aes_ctx)+(16)-1, + .cra_alignmask = 0, + .cra_type = &crypto_blkcipher_type, + .cra_module = (&__this_module), + .cra_list = { &(blk_cbc_alg.cra_list), &(blk_cbc_alg.cra_list) }, + .cra_u = { + .blkcipher = { + .min_keysize = 16, + .max_keysize = 32, + .setkey = aes_set_key, + .encrypt = cbc_encrypt, + .decrypt = cbc_decrypt, + }, + }, +}; +static int ablk_set_key(struct crypto_ablkcipher *tfm, const u8 *key, + unsigned int key_len) +{ + struct async_aes_ctx *ctx = crypto_ablkcipher_ctx(tfm); + struct crypto_ablkcipher *child = &ctx->cryptd_tfm->base; + int err; + crypto_ablkcipher_clear_flags(child, 0x000fff00); + crypto_ablkcipher_set_flags(child, crypto_ablkcipher_get_flags(tfm) + & 0x000fff00); + err = crypto_ablkcipher_setkey(child, key, key_len); + crypto_ablkcipher_set_flags(tfm, crypto_ablkcipher_get_flags(child) + & 0xfff00000); + return err; +} +static int ablk_encrypt(struct ablkcipher_request *req) +{ + struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(req); + struct async_aes_ctx *ctx = crypto_ablkcipher_ctx(tfm); + if (__builtin_constant_p(((!irq_fpu_usable()))) ? !!((!irq_fpu_usable())) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "arch/x86/crypto/aesni-intel_glue.c", .line = 508, }; ______r = !!((!irq_fpu_usable())); ______f.miss_hit[______r]++; ______r; })) { + struct ablkcipher_request *cryptd_req = + ablkcipher_request_ctx(req); + __builtin_memcpy(cryptd_req, req, sizeof(*req)); + ablkcipher_request_set_tfm(cryptd_req, &ctx->cryptd_tfm->base); + return crypto_ablkcipher_encrypt(cryptd_req); + } else { + struct blkcipher_desc desc; + desc.tfm = cryptd_ablkcipher_child(ctx->cryptd_tfm); + desc.info = req->info; + desc.flags = 0; + return crypto_blkcipher_crt(desc.tfm)->encrypt( + &desc, req->dst, req->src, req->nbytes); + } +} +static int ablk_decrypt(struct ablkcipher_request *req) +{ + struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(req); + struct async_aes_ctx *ctx = crypto_ablkcipher_ctx(tfm); + if (__builtin_constant_p(((!irq_fpu_usable()))) ? !!((!irq_fpu_usable())) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "arch/x86/crypto/aesni-intel_glue.c", .line = 529, }; ______r = !!((!irq_fpu_usable())); ______f.miss_hit[______r]++; ______r; })) { + struct ablkcipher_request *cryptd_req = + ablkcipher_request_ctx(req); + __builtin_memcpy(cryptd_req, req, sizeof(*req)); + ablkcipher_request_set_tfm(cryptd_req, &ctx->cryptd_tfm->base); + return crypto_ablkcipher_decrypt(cryptd_req); + } else { + struct blkcipher_desc desc; + desc.tfm = cryptd_ablkcipher_child(ctx->cryptd_tfm); + desc.info = req->info; + desc.flags = 0; + return crypto_blkcipher_crt(desc.tfm)->decrypt( + &desc, req->dst, req->src, req->nbytes); + } +} +static void ablk_exit(struct crypto_tfm *tfm) +{ + struct async_aes_ctx *ctx = crypto_tfm_ctx(tfm); + cryptd_free_ablkcipher(ctx->cryptd_tfm); +} +static void ablk_init_common(struct crypto_tfm *tfm, + struct cryptd_ablkcipher *cryptd_tfm) +{ + struct async_aes_ctx *ctx = crypto_tfm_ctx(tfm); + ctx->cryptd_tfm = cryptd_tfm; + tfm->crt_u.ablkcipher.reqsize = sizeof(struct ablkcipher_request) + + crypto_ablkcipher_reqsize(&cryptd_tfm->base); +} +static int ablk_ecb_init(struct crypto_tfm *tfm) +{ + struct cryptd_ablkcipher *cryptd_tfm; + cryptd_tfm = cryptd_alloc_ablkcipher("__driver-ecb-aes-aesni", 0, 0); + if (__builtin_constant_p(((IS_ERR(cryptd_tfm)))) ? !!((IS_ERR(cryptd_tfm))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "arch/x86/crypto/aesni-intel_glue.c", .line = 567, }; ______r = !!((IS_ERR(cryptd_tfm))); ______f.miss_hit[______r]++; ______r; })) + return PTR_ERR(cryptd_tfm); + ablk_init_common(tfm, cryptd_tfm); + return 0; +} +static struct crypto_alg ablk_ecb_alg = { + .cra_name = "ecb(aes)", + .cra_driver_name = "ecb-aes-aesni", + .cra_priority = 400, + .cra_flags = 0x00000005|0x00000080, + .cra_blocksize = 16, + .cra_ctxsize = sizeof(struct async_aes_ctx), + .cra_alignmask = 0, + .cra_type = &crypto_ablkcipher_type, + .cra_module = (&__this_module), + .cra_list = { &(ablk_ecb_alg.cra_list), &(ablk_ecb_alg.cra_list) }, + .cra_init = ablk_ecb_init, + .cra_exit = ablk_exit, + .cra_u = { + .ablkcipher = { + .min_keysize = 16, + .max_keysize = 32, + .setkey = ablk_set_key, + .encrypt = ablk_encrypt, + .decrypt = ablk_decrypt, + }, + }, +}; +static int ablk_cbc_init(struct crypto_tfm *tfm) +{ + struct cryptd_ablkcipher *cryptd_tfm; + cryptd_tfm = cryptd_alloc_ablkcipher("__driver-cbc-aes-aesni", 0, 0); + if (__builtin_constant_p(((IS_ERR(cryptd_tfm)))) ? !!((IS_ERR(cryptd_tfm))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "arch/x86/crypto/aesni-intel_glue.c", .line = 602, }; ______r = !!((IS_ERR(cryptd_tfm))); ______f.miss_hit[______r]++; ______r; })) + return PTR_ERR(cryptd_tfm); + ablk_init_common(tfm, cryptd_tfm); + return 0; +} +static struct crypto_alg ablk_cbc_alg = { + .cra_name = "cbc(aes)", + .cra_driver_name = "cbc-aes-aesni", + .cra_priority = 400, + .cra_flags = 0x00000005|0x00000080, + .cra_blocksize = 16, + .cra_ctxsize = sizeof(struct async_aes_ctx), + .cra_alignmask = 0, + .cra_type = &crypto_ablkcipher_type, + .cra_module = (&__this_module), + .cra_list = { &(ablk_cbc_alg.cra_list), &(ablk_cbc_alg.cra_list) }, + .cra_init = ablk_cbc_init, + .cra_exit = ablk_exit, + .cra_u = { + .ablkcipher = { + .min_keysize = 16, + .max_keysize = 32, + .ivsize = 16, + .setkey = ablk_set_key, + .encrypt = ablk_encrypt, + .decrypt = ablk_decrypt, + }, + }, +}; +static int ablk_pcbc_init(struct crypto_tfm *tfm) +{ + struct cryptd_ablkcipher *cryptd_tfm; + cryptd_tfm = cryptd_alloc_ablkcipher("fpu(pcbc(__driver-aes-aesni))", + 0, 0); + if (__builtin_constant_p(((IS_ERR(cryptd_tfm)))) ? !!((IS_ERR(cryptd_tfm))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "arch/x86/crypto/aesni-intel_glue.c", .line = 758, }; ______r = !!((IS_ERR(cryptd_tfm))); ______f.miss_hit[______r]++; ______r; })) + return PTR_ERR(cryptd_tfm); + ablk_init_common(tfm, cryptd_tfm); + return 0; +} +static struct crypto_alg ablk_pcbc_alg = { + .cra_name = "pcbc(aes)", + .cra_driver_name = "pcbc-aes-aesni", + .cra_priority = 400, + .cra_flags = 0x00000005|0x00000080, + .cra_blocksize = 16, + .cra_ctxsize = sizeof(struct async_aes_ctx), + .cra_alignmask = 0, + .cra_type = &crypto_ablkcipher_type, + .cra_module = (&__this_module), + .cra_list = { &(ablk_pcbc_alg.cra_list), &(ablk_pcbc_alg.cra_list) }, + .cra_init = ablk_pcbc_init, + .cra_exit = ablk_exit, + .cra_u = { + .ablkcipher = { + .min_keysize = 16, + .max_keysize = 32, + .ivsize = 16, + .setkey = ablk_set_key, + .encrypt = ablk_encrypt, + .decrypt = ablk_decrypt, + }, + }, +}; +static int __attribute__ ((__section__(".init.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) aesni_init(void) +{ + int err; + if (__builtin_constant_p(((!(__builtin_constant_p((4*32+25)) && ( ((((4*32+25))>>5)==0 && (1UL<<(((4*32+25))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((4*32+25))>>5)==1 && (1UL<<(((4*32+25))&31) & (0|0))) || ((((4*32+25))>>5)==2 && (1UL<<(((4*32+25))&31) & 0)) || ((((4*32+25))>>5)==3 && (1UL<<(((4*32+25))&31) & (0))) || ((((4*32+25))>>5)==4 && (1UL<<(((4*32+25))&31) & 0)) || ((((4*32+25))>>5)==5 && (1UL<<(((4*32+25))&31) & 0)) || ((((4*32+25))>>5)==6 && (1UL<<(((4*32+25))&31) & 0)) || ((((4*32+25))>>5)==7 && (1UL<<(((4*32+25))&31) & 0)) || ((((4*32+25))>>5)==8 && (1UL<<(((4*32+25))&31) & 0)) || ((((4*32+25))>>5)==9 && (1UL<<(((4*32+25))&31) & 0)) ) ? 1 : (__builtin_constant_p(((4*32+25))) ? constant_test_bit(((4*32+25)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((4*32+25)), ((unsigned long *)((&boot_cpu_data)->x86_capability)))))))) ? !!((!(__builtin_constant_p((4*32+25)) && ( ((((4*32+25))>>5)==0 && (1UL<<(((4*32+25))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((4*32+25))>>5)==1 && (1UL<<(((4*32+25))&31) & (0|0))) || ((((4*32+25))>>5)==2 && (1UL<<(((4*32+25))&31) & 0)) || ((((4*32+25))>>5)==3 && (1UL<<(((4*32+25))&31) & (0))) || ((((4*32+25))>>5)==4 && (1UL<<(((4*32+25))&31) & 0)) || ((((4*32+25))>>5)==5 && (1UL<<(((4*32+25))&31) & 0)) || ((((4*32+25))>>5)==6 && (1UL<<(((4*32+25))&31) & 0)) || ((((4*32+25))>>5)==7 && (1UL<<(((4*32+25))&31) & 0)) || ((((4*32+25))>>5)==8 && (1UL<<(((4*32+25))&31) & 0)) || ((((4*32+25))>>5)==9 && (1UL<<(((4*32+25))&31) & 0)) ) ? 1 : (__builtin_constant_p(((4*32+25))) ? constant_test_bit(((4*32+25)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((4*32+25)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "arch/x86/crypto/aesni-intel_glue.c", .line = 1259, }; ______r = !!((!(__builtin_constant_p((4*32+25)) && ( ((((4*32+25))>>5)==0 && (1UL<<(((4*32+25))&31) & ((1<<((0*32+ 0) & 31))|0|0|(1<<((0*32+ 6) & 31))| (1<<((0*32+ 8) & 31))|0|0|(1<<((0*32+15) & 31))| 0|0))) || ((((4*32+25))>>5)==1 && (1UL<<(((4*32+25))&31) & (0|0))) || ((((4*32+25))>>5)==2 && (1UL<<(((4*32+25))&31) & 0)) || ((((4*32+25))>>5)==3 && (1UL<<(((4*32+25))&31) & (0))) || ((((4*32+25))>>5)==4 && (1UL<<(((4*32+25))&31) & 0)) || ((((4*32+25))>>5)==5 && (1UL<<(((4*32+25))&31) & 0)) || ((((4*32+25))>>5)==6 && (1UL<<(((4*32+25))&31) & 0)) || ((((4*32+25))>>5)==7 && (1UL<<(((4*32+25))&31) & 0)) || ((((4*32+25))>>5)==8 && (1UL<<(((4*32+25))&31) & 0)) || ((((4*32+25))>>5)==9 && (1UL<<(((4*32+25))&31) & 0)) ) ? 1 : (__builtin_constant_p(((4*32+25))) ? constant_test_bit(((4*32+25)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((4*32+25)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))))); ______f.miss_hit[______r]++; ______r; })) { + printk("<6>" "Intel AES-NI instructions are not detected.\n"); + return -19; + } + if (__builtin_constant_p((((err = crypto_fpu_init())))) ? !!(((err = crypto_fpu_init()))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "arch/x86/crypto/aesni-intel_glue.c", .line = 1264, }; ______r = !!(((err = crypto_fpu_init()))); ______f.miss_hit[______r]++; ______r; })) + goto fpu_err; + if (__builtin_constant_p((((err = crypto_register_alg(&aesni_alg))))) ? !!(((err = crypto_register_alg(&aesni_alg)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "arch/x86/crypto/aesni-intel_glue.c", .line = 1266, }; ______r = !!(((err = crypto_register_alg(&aesni_alg)))); ______f.miss_hit[______r]++; ______r; })) + goto aes_err; + if (__builtin_constant_p((((err = crypto_register_alg(&__aesni_alg))))) ? !!(((err = crypto_register_alg(&__aesni_alg)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "arch/x86/crypto/aesni-intel_glue.c", .line = 1268, }; ______r = !!(((err = crypto_register_alg(&__aesni_alg)))); ______f.miss_hit[______r]++; ______r; })) + goto __aes_err; + if (__builtin_constant_p((((err = crypto_register_alg(&blk_ecb_alg))))) ? !!(((err = crypto_register_alg(&blk_ecb_alg)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "arch/x86/crypto/aesni-intel_glue.c", .line = 1270, }; ______r = !!(((err = crypto_register_alg(&blk_ecb_alg)))); ______f.miss_hit[______r]++; ______r; })) + goto blk_ecb_err; + if (__builtin_constant_p((((err = crypto_register_alg(&blk_cbc_alg))))) ? !!(((err = crypto_register_alg(&blk_cbc_alg)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "arch/x86/crypto/aesni-intel_glue.c", .line = 1272, }; ______r = !!(((err = crypto_register_alg(&blk_cbc_alg)))); ______f.miss_hit[______r]++; ______r; })) + goto blk_cbc_err; + if (__builtin_constant_p((((err = crypto_register_alg(&ablk_ecb_alg))))) ? !!(((err = crypto_register_alg(&ablk_ecb_alg)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "arch/x86/crypto/aesni-intel_glue.c", .line = 1274, }; ______r = !!(((err = crypto_register_alg(&ablk_ecb_alg)))); ______f.miss_hit[______r]++; ______r; })) + goto ablk_ecb_err; + if (__builtin_constant_p((((err = crypto_register_alg(&ablk_cbc_alg))))) ? !!(((err = crypto_register_alg(&ablk_cbc_alg)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "arch/x86/crypto/aesni-intel_glue.c", .line = 1276, }; ______r = !!(((err = crypto_register_alg(&ablk_cbc_alg)))); ______f.miss_hit[______r]++; ______r; })) + goto ablk_cbc_err; + if (__builtin_constant_p((((err = crypto_register_alg(&ablk_pcbc_alg))))) ? !!(((err = crypto_register_alg(&ablk_pcbc_alg)))) : ({ int ______r; static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((section("_ftrace_branch"))) ______f = { .func = __func__, .file = "arch/x86/crypto/aesni-intel_glue.c", .line = 1297, }; ______r = !!(((err = crypto_register_alg(&ablk_pcbc_alg)))); ______f.miss_hit[______r]++; ______r; })) + goto ablk_pcbc_err; + return err; + crypto_unregister_alg(&ablk_pcbc_alg); +ablk_pcbc_err: + crypto_unregister_alg(&ablk_cbc_alg); +ablk_cbc_err: + crypto_unregister_alg(&ablk_ecb_alg); +ablk_ecb_err: + crypto_unregister_alg(&blk_cbc_alg); +blk_cbc_err: + crypto_unregister_alg(&blk_ecb_alg); +blk_ecb_err: + crypto_unregister_alg(&__aesni_alg); +__aes_err: + crypto_unregister_alg(&aesni_alg); +aes_err: +fpu_err: + return err; +} +static void __attribute__ ((__section__(".exit.text"))) __attribute__((__cold__)) __attribute__((no_instrument_function)) aesni_exit(void) +{ + crypto_unregister_alg(&ablk_pcbc_alg); + crypto_unregister_alg(&ablk_cbc_alg); + crypto_unregister_alg(&ablk_ecb_alg); + crypto_unregister_alg(&blk_cbc_alg); + crypto_unregister_alg(&blk_ecb_alg); + crypto_unregister_alg(&__aesni_alg); + crypto_unregister_alg(&aesni_alg); + crypto_fpu_exit(); +} +static inline __attribute__((always_inline)) initcall_t __inittest(void) { return aesni_init; } int init_module(void) __attribute__((alias("aesni_init")));; +static inline __attribute__((always_inline)) exitcall_t __exittest(void) { return aesni_exit; } void cleanup_module(void) __attribute__((alias("aesni_exit")));; +static const char __mod_description1380[] __attribute__((__used__)) __attribute__((section(".modinfo"), unused, aligned(1))) = "description" "=" "Rijndael (AES) Cipher Algorithm, Intel AES-NI instructions optimized"; +static const char __mod_license1381[] __attribute__((__used__)) __attribute__((section(".modinfo"), unused, aligned(1))) = "license" "=" "GPL"; +static const char __mod_alias1382[] __attribute__((__used__)) __attribute__((section(".modinfo"), unused, aligned(1))) = "alias" "=" "aes"; diff --git a/388835/aesni-intel_glue.i.1 b/388835/aesni-intel_glue.i.1 new file mode 100644 index 0000000..a130b6c --- /dev/null +++ b/388835/aesni-intel_glue.i.1 @@ -0,0 +1,394 @@ +typedef unsigned int __u32; +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; +typedef unsigned long long u64; +struct ftrace_branch_data { +}; +enum { + false = 0, true = 1 +}; +typedef _Bool bool; +struct list_head { +}; +static inline __attribute__ ((always_inline)) __attribute__ ((always_inline)) + __attribute__ ((pure)) +bool __static_cpu_has(u16 bit) +{ + asm goto ("1: jmp %l[t_no]\n" "2:\n" ".section .altinstructions,\"a\"\n" + " " ".balign 4" " " "\n" " " ".long" " " "1b\n" " " ".long" + " " "0\n" " .word %P0\n" " .byte 2b - 1b\n" " .byte 0\n" + ".previous\n"::"i" (bit)::t_no); + return true; + t_no:return false; +} + +struct cpuinfo_x86 { + __u32 x86_capability[10]; +} __attribute__ ((__aligned__((1 << (6))))); +extern struct cpuinfo_x86 boot_cpu_data; +struct i387_fxsave_struct { + u16 swd; +} __attribute__ ((aligned(16))); +struct xsave_hdr_struct { + u64 xstate_bv; +} __attribute__ ((packed)); +struct xsave_struct { + struct xsave_hdr_struct xsave_hdr; +} __attribute__ ((packed, aligned(64))); +union thread_xstate { + struct i387_fxsave_struct fxsave; + struct xsave_struct xsave; +}; +struct fpu { + union thread_xstate *state; +}; +struct thread_struct { + struct fpu fpu; +} mm_segment_t; +struct thread_info { + struct task_struct *task; + __u32 status; +}; +extern struct module __this_module; +struct cipher_alg { + unsigned int cia_min_keysize; + unsigned int cia_max_keysize; + int (*cia_setkey) (struct crypto_tfm * tfm, const u8 * key, + unsigned int keylen); + void (*cia_encrypt) (struct crypto_tfm * tfm, u8 * dst, const u8 * src); + void (*cia_decrypt) (struct crypto_tfm * tfm, u8 * dst, const u8 * src); +}; +struct crypto_alg { + struct list_head cra_list; + u32 cra_flags; + unsigned int cra_blocksize; + unsigned int cra_ctxsize; + unsigned int cra_alignmask; + int cra_priority; + char cra_name[64]; + char cra_driver_name[64]; + const struct crypto_type *cra_type; + union { + struct cipher_alg cipher; + } cra_u; + struct module *cra_module; +}; +extern const struct crypto_type crypto_ablkcipher_type; +extern const struct crypto_type crypto_blkcipher_type; +struct crypto_aes_ctx { +}; +struct task_struct { + struct thread_struct thread; +}; +static inline __attribute__ ((always_inline)) __attribute__ ((always_inline)) + __attribute__ ((pure)) +bool use_xsave(void) +{ + return (__builtin_constant_p + ((__builtin_constant_p((4 * 32 + 26)) + && + (((((4 * 32 + 26)) >> 5) == 0 + && (1UL << (((4 * 32 + 26)) & 31) & + ((1 << ((0 * 32 + 0) & 31)) | 0 | 0 | + (1 << ((0 * 32 + 6) & 31)) | (1 << ((0 * 32 + 8) & 31)) + | 0 | 0 | (1 << ((0 * 32 + 15) & 31)) | 0 | 0))) + || ((((4 * 32 + 26)) >> 5) == 1 + && (1UL << (((4 * 32 + 26)) & 31) & (0 | 0))) + || ((((4 * 32 + 26)) >> 5) == 2 + && (1UL << (((4 * 32 + 26)) & 31) & 0)) + || ((((4 * 32 + 26)) >> 5) == 3 + && (1UL << (((4 * 32 + 26)) & 31) & (0))) + || ((((4 * 32 + 26)) >> 5) == 4 + && (1UL << (((4 * 32 + 26)) & 31) & 0)) + || ((((4 * 32 + 26)) >> 5) == 5 + && (1UL << (((4 * 32 + 26)) & 31) & 0)) + || ((((4 * 32 + 26)) >> 5) == 6 + && (1UL << (((4 * 32 + 26)) & 31) & 0)) + || ((((4 * 32 + 26)) >> 5) == 7 + && (1UL << (((4 * 32 + 26)) & 31) & 0)) + || ((((4 * 32 + 26)) >> 5) == 8 + && (1UL << (((4 * 32 + 26)) & 31) & 0)) + || ((((4 * 32 + 26)) >> 5) == 9 + && (1UL << (((4 * 32 + 26)) & 31) & 0))) ? 1 + : (__builtin_constant_p(((4 * 32 + 26))) ? + constant_test_bit(((4 * 32 + 26)), + ((unsigned long *)((&boot_cpu_data)-> + x86_capability))) : + variable_test_bit(((4 * 32 + 26)), + ((unsigned long *)((&boot_cpu_data)-> + x86_capability)))))) + ? (__builtin_constant_p((4 * 32 + 26)) + && + (((((4 * 32 + 26)) >> 5) == 0 + && (1UL << (((4 * 32 + 26)) & 31) & + ((1 << ((0 * 32 + 0) & 31)) | 0 | 0 | + (1 << ((0 * 32 + 6) & 31)) | (1 << + ((0 * 32 + + 8) & 31)) | 0 | 0 | (1 + << + ((0 * 32 + 15) & 31)) | 0 | 0))) || ((((4 * 32 + 26)) >> 5) == 1 && (1UL << (((4 * 32 + 26)) & 31) & (0 | 0))) || ((((4 * 32 + 26)) >> 5) == 2 && (1UL << (((4 * 32 + 26)) & 31) & 0)) || ((((4 * 32 + 26)) >> 5) == 3 && (1UL << (((4 * 32 + 26)) & 31) & (0))) || ((((4 * 32 + 26)) >> 5) == 4 && (1UL << (((4 * 32 + 26)) & 31) & 0)) || ((((4 * 32 + 26)) >> 5) == 5 && (1UL << (((4 * 32 + 26)) & 31) & 0)) || ((((4 * 32 + 26)) >> 5) == 6 && (1UL << (((4 * 32 + 26)) & 31) & 0)) || ((((4 * 32 + 26)) >> 5) == 7 && (1UL << (((4 * 32 + 26)) & 31) & 0)) || ((((4 * 32 + 26)) >> 5) == 8 && (1UL << (((4 * 32 + 26)) & 31) & 0)) || ((((4 * 32 + 26)) >> 5) == 9 && (1UL << (((4 * 32 + 26)) & 31) & 0))) ? 1 : (__builtin_constant_p(((4 * 32 + 26))) ? constant_test_bit(((4 * 32 + 26)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((4 * 32 + 26)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))) : __builtin_constant_p((4 * 32 + 26)) ? __static_cpu_has((4 * 32 + 26)) : (__builtin_constant_p((4 * 32 + 26)) && (((((4 * 32 + 26)) >> 5) == 0 && (1UL << (((4 * 32 + 26)) & 31) & ((1 << ((0 * 32 + 0) & 31)) | 0 | 0 | (1 << ((0 * 32 + 6) & 31)) | (1 << ((0 * 32 + 8) & 31)) | 0 | 0 | (1 << ((0 * 32 + 15) & 31)) | 0 | 0))) || ((((4 * 32 + 26)) >> 5) == 1 && (1UL << (((4 * 32 + 26)) & 31) & (0 | 0))) || ((((4 * 32 + 26)) >> 5) == 2 && (1UL << (((4 * 32 + 26)) & 31) & 0)) || ((((4 * 32 + 26)) >> 5) == 3 && (1UL << (((4 * 32 + 26)) & 31) & (0))) || ((((4 * 32 + 26)) >> 5) == 4 && (1UL << (((4 * 32 + 26)) & 31) & 0)) || ((((4 * 32 + 26)) >> 5) == 5 && (1UL << (((4 * 32 + 26)) & 31) & 0)) || ((((4 * 32 + 26)) >> 5) == 6 && (1UL << (((4 * 32 + 26)) & 31) & 0)) || ((((4 * 32 + 26)) >> 5) == 7 && (1UL << (((4 * 32 + 26)) & 31) & 0)) || ((((4 * 32 + 26)) >> 5) == 8 && (1UL << (((4 * 32 + 26)) & 31) & 0)) || ((((4 * 32 + 26)) >> 5) == 9 && (1UL << (((4 * 32 + 26)) & 31) & 0))) ? 1 : (__builtin_constant_p(((4 * 32 + 26))) ? constant_test_bit(((4 * 32 + 26)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((4 * 32 + 26)), ((unsigned long *)((&boot_cpu_data)->x86_capability)))))); +} + +static inline __attribute__ ((always_inline)) __attribute__ ((always_inline)) + __attribute__ ((pure)) +bool use_fxsr(void) +{ + return (__builtin_constant_p + ((__builtin_constant_p((0 * 32 + 24)) + && + (((((0 * 32 + 24)) >> 5) == 0 + && (1UL << (((0 * 32 + 24)) & 31) & + ((1 << ((0 * 32 + 0) & 31)) | 0 | 0 | + (1 << ((0 * 32 + 6) & 31)) | (1 << ((0 * 32 + 8) & 31)) + | 0 | 0 | (1 << ((0 * 32 + 15) & 31)) | 0 | 0))) + || ((((0 * 32 + 24)) >> 5) == 1 + && (1UL << (((0 * 32 + 24)) & 31) & (0 | 0))) + || ((((0 * 32 + 24)) >> 5) == 2 + && (1UL << (((0 * 32 + 24)) & 31) & 0)) + || ((((0 * 32 + 24)) >> 5) == 3 + && (1UL << (((0 * 32 + 24)) & 31) & (0))) + || ((((0 * 32 + 24)) >> 5) == 4 + && (1UL << (((0 * 32 + 24)) & 31) & 0)) + || ((((0 * 32 + 24)) >> 5) == 5 + && (1UL << (((0 * 32 + 24)) & 31) & 0)) + || ((((0 * 32 + 24)) >> 5) == 6 + && (1UL << (((0 * 32 + 24)) & 31) & 0)) + || ((((0 * 32 + 24)) >> 5) == 7 + && (1UL << (((0 * 32 + 24)) & 31) & 0)) + || ((((0 * 32 + 24)) >> 5) == 8 + && (1UL << (((0 * 32 + 24)) & 31) & 0)) + || ((((0 * 32 + 24)) >> 5) == 9 + && (1UL << (((0 * 32 + 24)) & 31) & 0))) ? 1 + : (__builtin_constant_p(((0 * 32 + 24))) ? + constant_test_bit(((0 * 32 + 24)), + ((unsigned long *)((&boot_cpu_data)-> + x86_capability))) : + variable_test_bit(((0 * 32 + 24)), + ((unsigned long *)((&boot_cpu_data)-> + x86_capability)))))) + ? (__builtin_constant_p((0 * 32 + 24)) + && + (((((0 * 32 + 24)) >> 5) == 0 + && (1UL << (((0 * 32 + 24)) & 31) & + ((1 << ((0 * 32 + 0) & 31)) | 0 | 0 | + (1 << ((0 * 32 + 6) & 31)) | (1 << + ((0 * 32 + + 8) & 31)) | 0 | 0 | (1 + << + ((0 * 32 + 15) & 31)) | 0 | 0))) || ((((0 * 32 + 24)) >> 5) == 1 && (1UL << (((0 * 32 + 24)) & 31) & (0 | 0))) || ((((0 * 32 + 24)) >> 5) == 2 && (1UL << (((0 * 32 + 24)) & 31) & 0)) || ((((0 * 32 + 24)) >> 5) == 3 && (1UL << (((0 * 32 + 24)) & 31) & (0))) || ((((0 * 32 + 24)) >> 5) == 4 && (1UL << (((0 * 32 + 24)) & 31) & 0)) || ((((0 * 32 + 24)) >> 5) == 5 && (1UL << (((0 * 32 + 24)) & 31) & 0)) || ((((0 * 32 + 24)) >> 5) == 6 && (1UL << (((0 * 32 + 24)) & 31) & 0)) || ((((0 * 32 + 24)) >> 5) == 7 && (1UL << (((0 * 32 + 24)) & 31) & 0)) || ((((0 * 32 + 24)) >> 5) == 8 && (1UL << (((0 * 32 + 24)) & 31) & 0)) || ((((0 * 32 + 24)) >> 5) == 9 && (1UL << (((0 * 32 + 24)) & 31) & 0))) ? 1 : (__builtin_constant_p(((0 * 32 + 24))) ? constant_test_bit(((0 * 32 + 24)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((0 * 32 + 24)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))) : __builtin_constant_p((0 * 32 + 24)) ? __static_cpu_has((0 * 32 + 24)) : (__builtin_constant_p((0 * 32 + 24)) && (((((0 * 32 + 24)) >> 5) == 0 && (1UL << (((0 * 32 + 24)) & 31) & ((1 << ((0 * 32 + 0) & 31)) | 0 | 0 | (1 << ((0 * 32 + 6) & 31)) | (1 << ((0 * 32 + 8) & 31)) | 0 | 0 | (1 << ((0 * 32 + 15) & 31)) | 0 | 0))) || ((((0 * 32 + 24)) >> 5) == 1 && (1UL << (((0 * 32 + 24)) & 31) & (0 | 0))) || ((((0 * 32 + 24)) >> 5) == 2 && (1UL << (((0 * 32 + 24)) & 31) & 0)) || ((((0 * 32 + 24)) >> 5) == 3 && (1UL << (((0 * 32 + 24)) & 31) & (0))) || ((((0 * 32 + 24)) >> 5) == 4 && (1UL << (((0 * 32 + 24)) & 31) & 0)) || ((((0 * 32 + 24)) >> 5) == 5 && (1UL << (((0 * 32 + 24)) & 31) & 0)) || ((((0 * 32 + 24)) >> 5) == 6 && (1UL << (((0 * 32 + 24)) & 31) & 0)) || ((((0 * 32 + 24)) >> 5) == 7 && (1UL << (((0 * 32 + 24)) & 31) & 0)) || ((((0 * 32 + 24)) >> 5) == 8 && (1UL << (((0 * 32 + 24)) & 31) & 0)) || ((((0 * 32 + 24)) >> 5) == 9 && (1UL << (((0 * 32 + 24)) & 31) & 0))) ? 1 : (__builtin_constant_p(((0 * 32 + 24))) ? constant_test_bit(((0 * 32 + 24)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((0 * 32 + 24)), ((unsigned long *)((&boot_cpu_data)->x86_capability)))))); +} + +static inline __attribute__ ((always_inline)) +void fpu_save_init(struct fpu *fpu) +{ + if (__builtin_constant_p(((use_xsave())))? ! !((use_xsave())) : ( { + int + ______r; + ______r + = + ! !((use_xsave()));} + )) { + if (__builtin_constant_p + (((!(fpu->state->xsave.xsave_hdr. + xstate_bv & 0x1)))) ? ! !((!(fpu->state->xsave. + xsave_hdr. + xstate_bv & 0x1))) : ( { + int + ______r; + ______r + = + ! !((!(fpu->state->xsave.xsave_hdr.xstate_bv & 0x1)));} + )) + return; + } else if (__builtin_constant_p(((use_fxsr())))? ! !((use_fxsr())) : ( { + int + ______r; + ______r + = + ! ! + ((use_fxsr()));} + )) { + } + if (__builtin_constant_p + ((((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) ? + ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + int ______r; + ______r = + __builtin_expect(! ! + (fpu-> + state-> + fxsave. + swd + & (1 + << + 7)), + 1);} + )))))? + ! !(((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) ? + ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + int ______r; + ______r = + __builtin_expect(! ! + (fpu-> + state-> + fxsave. + swd + & + (1 + << + 7)), + 1);} + )))): ( { + int ______r; + ______r = + ! !(((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) + ? ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + ______r = + __builtin_expect + (! ! + (fpu-> + state-> + fxsave. + swd & (1 + << + 7)), + 1);} + ))));} + )) + asm volatile ("fnclex"); +} + +static inline __attribute__ ((always_inline)) +void __save_init_fpu(struct task_struct *tsk) +{ + fpu_save_init(&tsk->thread.fpu); +} + +static inline __attribute__ ((always_inline)) +void kernel_fpu_begin(void) +{ + struct thread_info *me = current_thread_info(); + if (__builtin_constant_p(((me->status & 0x0001))) ? + ! !((me->status & 0x0001)) : ( { + int ______r; + ______r = ! !((me->status & 0x0001));} + )) + __save_init_fpu(me->task); +} + +struct async_aes_ctx { +}; +static int aes_set_key(struct crypto_tfm *tfm, const u8 * in_key, + unsigned int key_len) +{ +} + +static void aes_encrypt(struct crypto_tfm *tfm, u8 * dst, const u8 * src) +{ +} + +static void aes_decrypt(struct crypto_tfm *tfm, u8 * dst, const u8 * src) +{ + struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm)); + if (__builtin_constant_p(((!irq_fpu_usable())))? + ! !((!irq_fpu_usable())) : ( { + int ______r; + ______r = ! !((!irq_fpu_usable()));} + )) + crypto_aes_decrypt_x86(ctx, dst, src); + else { + kernel_fpu_begin(); + } +} + +static struct crypto_alg aesni_alg = { + .cra_name = "aes",.cra_driver_name = "aes-aesni",.cra_priority = + 300,.cra_flags = 0x00000001,.cra_blocksize = 16,.cra_ctxsize = + sizeof(struct crypto_aes_ctx) + (16) - 1,.cra_alignmask = + 0,.cra_module = (&__this_module),.cra_list = { + &(aesni_alg.cra_list), + &(aesni_alg.cra_list)} + ,.cra_u = { + .cipher = { + .cia_min_keysize = 16,.cia_max_keysize = + 32,.cia_setkey = aes_set_key,.cia_encrypt = + aes_encrypt,.cia_decrypt = aes_decrypt} + } +}; + +static struct crypto_alg blk_ecb_alg = { + .cra_name = "__ecb-aes-aesni",.cra_driver_name = + "__driver-ecb-aes-aesni",.cra_priority = 0,.cra_flags = + 0x00000004,.cra_blocksize = 16,.cra_ctxsize = + sizeof(struct crypto_aes_ctx) + (16) - 1,.cra_alignmask = + 0,.cra_type = &crypto_blkcipher_type,.cra_module = + (&__this_module),.cra_list = { + &(blk_ecb_alg.cra_list), + &(blk_ecb_alg.cra_list)} + , +}; + +static struct crypto_alg ablk_ecb_alg = { + .cra_name = "ecb(aes)",.cra_driver_name = + "ecb-aes-aesni",.cra_priority = 400,.cra_flags = + 0x00000005 | 0x00000080,.cra_blocksize = 16,.cra_ctxsize = + sizeof(struct async_aes_ctx),.cra_alignmask = 0,.cra_type = + &crypto_ablkcipher_type,.cra_module = (&__this_module),.cra_list = { + & + (ablk_ecb_alg. + cra_list), + & + (ablk_ecb_alg. + cra_list)} + , +}; + +static struct crypto_alg ablk_cbc_alg = { + .cra_name = "cbc(aes)",.cra_driver_name = + "cbc-aes-aesni",.cra_priority = 400,.cra_flags = + 0x00000005 | 0x00000080,.cra_blocksize = 16,.cra_ctxsize = + sizeof(struct async_aes_ctx),.cra_alignmask = 0,.cra_type = + &crypto_ablkcipher_type,.cra_module = (&__this_module),.cra_list = { + & + (ablk_cbc_alg. + cra_list), + & + (ablk_cbc_alg. + cra_list)} + , +}; + +static struct crypto_alg ablk_pcbc_alg = { + .cra_name = "pcbc(aes)",.cra_driver_name = + "pcbc-aes-aesni",.cra_priority = 400,.cra_flags = + 0x00000005 | 0x00000080,.cra_blocksize = 16,.cra_ctxsize = + sizeof(struct async_aes_ctx),.cra_alignmask = 0,.cra_type = + &crypto_ablkcipher_type,.cra_module = (&__this_module),.cra_list = { + & + (ablk_pcbc_alg. + cra_list), + & + (ablk_pcbc_alg. + cra_list)} + , +}; + +static int __attribute__ ((__section__(".init.text"))) + __attribute__ ((__cold__)) + __attribute__ ((no_instrument_function)) aesni_init(void) +{ + int err; + if (__builtin_constant_p((((err = crypto_register_alg(&aesni_alg))))) ? + ! !(((err = crypto_register_alg(&aesni_alg)))) : ( { + int ______r; + ______r = + ! !(((err = + crypto_register_alg + (&aesni_alg))));} + )) + goto ablk_cbc_err; + ablk_cbc_err:crypto_unregister_alg(&ablk_ecb_alg); +} + +int init_module(void) __attribute__ ((alias("aesni_init"))); diff --git a/388835/aesni-intel_glue.i.10 b/388835/aesni-intel_glue.i.10 new file mode 100644 index 0000000..bd962c8 --- /dev/null +++ b/388835/aesni-intel_glue.i.10 @@ -0,0 +1,107 @@ +int cpu_has(unsigned short bit) +{ + asm goto ("1: jmp %l[t_no]\n" "2:\n" ".section .altinstructions,\"a\"\n" + ".balign 4\n" ".long 1b\n" ".long 0\n" ".word %P0\n" ".byte 2b - 1b\n" ".byte 0\n" + ".previous\n"::"i" (bit)::t_no); + return 1; + t_no:return 0; +} + +struct cpuinfo_x86 { + unsigned int x86_capability[10]; +}; +extern struct cpuinfo_x86 boot_cpu_data; +struct i387_fxsave_struct { + unsigned short swd; +}; +struct xsave_struct { + int xstate_bv; +}; +union thread_xstate { + struct i387_fxsave_struct fxsave; + struct xsave_struct xsave; + int xstate_bv; +}; +struct fpu { + union thread_xstate *state; +}; +__attribute__ ((always_inline)) __attribute__ ((pure)) +int use_xsave(void) +{ + return cpu_has(154); +} + +__attribute__ ((always_inline)) __attribute__ ((pure)) +int use_fxsr(void) +{ + return cpu_has(24); +} +__attribute__ ((always_inline)) +void fpu_save_init(struct fpu *fpu) +{ + if (__builtin_constant_p(use_xsave())? use_xsave() : use_xsave()) { + if (fpu->state-> +xstate_bv) + return; + } else if (use_fxsr()) { + } + if (__builtin_constant_p + ((((__builtin_constant_p(fpu->state->fxsave.swd & 1) ? + ! !(fpu->state->fxsave.swd & 1) : ( { + __builtin_expect(! ! + (fpu-> + state-> + fxsave. + swd + & (1 + << + 7)), + 1);} + )))))? + ! !(((__builtin_constant_p(fpu->state->fxsave.swd & 1) ? + ! !(fpu->state->fxsave.swd & 1) : ( { + __builtin_expect(! ! + (fpu-> + state-> + fxsave. + swd + & + (1 + << + 7)), + 1);} + )))): ( { + int ______r; + ______r = + ! !(((__builtin_constant_p(fpu->state->fxsave.swd & 1) + ? ! !(fpu->state->fxsave.swd & 1) : ( { + ______r = + __builtin_expect + (! ! + (fpu-> + state-> + fxsave. + swd & (1 + << + 7)), + 1);} + ))));} + )) + asm volatile ("fnclex"); +} + +void aes_decrypt(void) +{ + if (irq_fpu_usable()) + crypto_aes_decrypt_x86(); + else + fpu_save_init(0); +} + +void (*funcptr)(void) = aes_decrypt; + +int aesni_init(void) +{ + if (crypto_register_alg()) + crypto_unregister_alg(0); +} diff --git a/388835/aesni-intel_glue.i.11 b/388835/aesni-intel_glue.i.11 new file mode 100644 index 0000000..fb2adfa --- /dev/null +++ b/388835/aesni-intel_glue.i.11 @@ -0,0 +1,102 @@ +int cpu_has(unsigned short bit) +{ + asm goto ("1: jmp %l[t_no]\n" "2:\n" ".section .altinstructions,\"a\"\n" + ".balign 4\n" ".long 1b\n" ".long 0\n" ".word %P0\n" ".byte 2b - 1b\n" ".byte 0\n" + ".previous\n"::"i" (bit)::t_no); + return 1; + t_no:return 0; +} + +struct cpuinfo_x86 { + unsigned int x86_capability[10]; +}; +extern struct cpuinfo_x86 boot_cpu_data; +struct i387_fxsave_struct { + unsigned short swd; +}; +union thread_xstate { + struct i387_fxsave_struct fxsave; + int xstate_bv; +}; +struct fpu { + union thread_xstate *state; +}; +__attribute__ ((always_inline)) __attribute__ ((pure)) +int use_xsave(void) +{ + return cpu_has(154); +} + +__attribute__ ((always_inline)) __attribute__ ((pure)) +int use_fxsr(void) +{ + return cpu_has(24); +} +__attribute__ ((always_inline)) +void fpu_save_init(struct fpu *fpu) +{ + if (__builtin_constant_p(use_xsave())? use_xsave() : use_xsave()) { + if (fpu->state-> +xstate_bv) + return; + } else if (use_fxsr()) { + } + if (__builtin_constant_p( +(((__builtin_constant_p(fpu->state->fxsave.swd & 1) ? + ! !(fpu->state->fxsave.swd & 1) : + __builtin_expect(! ! + (fpu-> + state-> + fxsave. + swd + & (1 + << + 7)), + 1) + ))))? + ! !(((__builtin_constant_p(fpu->state->fxsave.swd & 1) ? + ! !(fpu->state->fxsave.swd & 1) : + __builtin_expect(! ! + (fpu-> + state-> + fxsave. + swd + & + (1 + << + 7)), + 1) + ))): + + ! !(((__builtin_constant_p(fpu->state->fxsave.swd & 1) + ? ! !(fpu->state->fxsave.swd & 1) : + + __builtin_expect + (! ! + (fpu-> + state-> + fxsave. + swd & (1 + << + 7)), + 1) + ))) + ) + asm volatile ("fnclex"); +} + +void aes_decrypt(void) +{ + if (irq_fpu_usable()) + crypto_aes_decrypt_x86(); + else + fpu_save_init(0); +} + +void (*funcptr)(void) = aes_decrypt; + +int aesni_init(void) +{ + if (crypto_register_alg()) + crypto_unregister_alg(0); +} diff --git a/388835/aesni-intel_glue.i.2 b/388835/aesni-intel_glue.i.2 new file mode 100644 index 0000000..9a10f6c --- /dev/null +++ b/388835/aesni-intel_glue.i.2 @@ -0,0 +1,306 @@ +struct ftrace_branch_data { +}; +struct list_head { +}; +int __static_cpu_has(unsigned short bit) +{ + asm goto ("1: jmp %l[t_no]\n" "2:\n" ".section .altinstructions,\"a\"\n" + " " ".balign 4" " " "\n" " " ".long" " " "1b\n" " " ".long" + " " "0\n" " .word %P0\n" " .byte 2b - 1b\n" " .byte 0\n" + ".previous\n"::"i" (bit)::t_no); + return 1; + t_no: +return 0; +} + +struct cpuinfo_x86 { + unsigned int x86_capability[10]; +} __attribute__ ((__aligned__((1 << (6))))); +extern struct cpuinfo_x86 boot_cpu_data; +struct i387_fxsave_struct { + unsigned short swd; +} __attribute__ ((aligned(16))); +struct xsave_hdr_struct { + unsigned long long xstate_bv; +} __attribute__ ((packed)); +struct xsave_struct { + struct xsave_hdr_struct xsave_hdr; +} __attribute__ ((packed, aligned(64))); +union thread_xstate { + struct i387_fxsave_struct fxsave; + struct xsave_struct xsave; +}; +struct fpu { + union thread_xstate *state; +}; +struct thread_struct { + struct fpu fpu; +} mm_segment_t; +struct thread_info { + struct task_struct *task; + unsigned int status; +}; +struct cipher_alg { + unsigned int cia_min_keysize; + unsigned int cia_max_keysize; + int (*cia_setkey) (struct crypto_tfm * tfm, const unsigned char * key, + unsigned int keylen); + void (*cia_encrypt) (struct crypto_tfm * tfm, unsigned char * dst, const unsigned char * src); + void (*cia_decrypt) (struct crypto_tfm * tfm, unsigned char * dst, const unsigned char * src); +}; +struct crypto_alg { + struct list_head cra_list; + unsigned int cra_flags; + unsigned int cra_blocksize; + unsigned int cra_ctxsize; + unsigned int cra_alignmask; + int cra_priority; + char cra_name[64]; + char cra_driver_name[64]; + const struct crypto_type *cra_type; + union { + struct cipher_alg cipher; + } cra_u; + struct module *cra_module; +}; +extern const struct crypto_type crypto_ablkcipher_type; +extern const struct crypto_type crypto_blkcipher_type; +struct crypto_aes_ctx { +}; +struct task_struct { + struct thread_struct thread; +}; +static __attribute__ ((always_inline)) + __attribute__ ((pure)) +int use_xsave(void) +{ + return ( +__builtin_constant_p + ((__builtin_constant_p((4 * 32 + 26)) + && + (((((4 * 32 + 26)) >> 5) == 0 + && (1UL << (((4 * 32 + 26)) & 31) & + ((1 << ((0 * 32 + 0) & 31)) | 0 | 0 | + (1 << ((0 * 32 + 6) & 31)) | (1 << ((0 * 32 + 8) & 31)) + | 0 | 0 | (1 << ((0 * 32 + 15) & 31)) | 0 | 0))) + || ((((4 * 32 + 26)) >> 5) == 1 + && (1UL << (((4 * 32 + 26)) & 31) & (0 | 0))) + || ((((4 * 32 + 26)) >> 5) == 2 + && (1UL << (((4 * 32 + 26)) & 31) & 0)) + || ((((4 * 32 + 26)) >> 5) == 3 + && (1UL << (((4 * 32 + 26)) & 31) & (0))) + || ((((4 * 32 + 26)) >> 5) == 4 + && (1UL << (((4 * 32 + 26)) & 31) & 0)) + || ((((4 * 32 + 26)) >> 5) == 5 + && (1UL << (((4 * 32 + 26)) & 31) & 0)) + || ((((4 * 32 + 26)) >> 5) == 6 + && (1UL << (((4 * 32 + 26)) & 31) & 0)) + || ((((4 * 32 + 26)) >> 5) == 7 + && (1UL << (((4 * 32 + 26)) & 31) & 0)) + || ((((4 * 32 + 26)) >> 5) == 8 + && (1UL << (((4 * 32 + 26)) & 31) & 0)) + || ((((4 * 32 + 26)) >> 5) == 9 + && (1UL << (((4 * 32 + 26)) & 31) & 0))) ? 1 + : +(__builtin_constant_p(4 * 32 + 26) ? + constant_test_bit(4 * 32 + 26, + ((unsigned long *)((&boot_cpu_data)-> + x86_capability))) : + variable_test_bit(((4 * 32 + 26)) +, + ((unsigned long *)((&boot_cpu_data)-> + x86_capability)))))) + ? (__builtin_constant_p((4 * 32 + 26)) + && + (((((4 * 32 + 26)) >> 5) == 0 + && (1UL << (((4 * 32 + 26)) & 31) & + ((1 << ((0 * 32 + 0) & 31)) | 0 | 0 | + (1 << ((0 * 32 + 6) & 31)) | (1 << + ((0 * 32 + + 8) & 31)) | 0 | 0 | (1 + << + ((0 * 32 + 15) & 31)) | 0 | 0))) || ((((4 * 32 + 26)) >> 5) == 1 && (1UL << (((4 * 32 + 26)) & 31) & (0 | 0))) || ((((4 * 32 + 26)) >> 5) == 2 && (1UL << (((4 * 32 + 26)) & 31) & 0)) || ((((4 * 32 + 26)) >> 5) == 3 && (1UL << (((4 * 32 + 26)) & 31) & (0))) || ((((4 * 32 + 26)) >> 5) == 4 && (1UL << (((4 * 32 + 26)) & 31) & 0)) || ((((4 * 32 + 26)) >> 5) == 5 && (1UL << (((4 * 32 + 26)) & 31) & 0)) || ((((4 * 32 + 26)) >> 5) == 6 && (1UL << (((4 * 32 + 26)) & 31) & 0)) || ((((4 * 32 + 26)) >> 5) == 7 && (1UL << (((4 * 32 + 26)) & 31) & 0)) || ((((4 * 32 + 26)) >> 5) == 8 && (1UL << (((4 * 32 + 26)) & 31) & 0)) || ((((4 * 32 + 26)) >> 5) == 9 && (1UL << (((4 * 32 + 26)) & 31) & 0))) ? 1 : (__builtin_constant_p(((4 * 32 + 26))) ? constant_test_bit(((4 * 32 + 26)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((4 * 32 + 26)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))) : __builtin_constant_p((4 * 32 + 26)) ? __static_cpu_has((4 * 32 + 26)) : (__builtin_constant_p((4 * 32 + 26)) && (((((4 * 32 + 26)) >> 5) == 0 && (1UL << (((4 * 32 + 26)) & 31) & ((1 << ((0 * 32 + 0) & 31)) | 0 | 0 | (1 << ((0 * 32 + 6) & 31)) | (1 << ((0 * 32 + 8) & 31)) | 0 | 0 | (1 << ((0 * 32 + 15) & 31)) | 0 | 0))) || ((((4 * 32 + 26)) >> 5) == 1 && (1UL << (((4 * 32 + 26)) & 31) & (0 | 0))) || ((((4 * 32 + 26)) >> 5) == 2 && (1UL << (((4 * 32 + 26)) & 31) & 0)) || ((((4 * 32 + 26)) >> 5) == 3 && (1UL << (((4 * 32 + 26)) & 31) & (0))) || ((((4 * 32 + 26)) >> 5) == 4 && (1UL << (((4 * 32 + 26)) & 31) & 0)) || ((((4 * 32 + 26)) >> 5) == 5 && (1UL << (((4 * 32 + 26)) & 31) & 0)) || ((((4 * 32 + 26)) >> 5) == 6 && (1UL << (((4 * 32 + 26)) & 31) & 0)) || ((((4 * 32 + 26)) >> 5) == 7 && (1UL << (((4 * 32 + 26)) & 31) & 0)) || ((((4 * 32 + 26)) >> 5) == 8 && (1UL << (((4 * 32 + 26)) & 31) & 0)) || ((((4 * 32 + 26)) >> 5) == 9 && (1UL << (((4 * 32 + 26)) & 31) & 0))) ? 1 : (__builtin_constant_p(((4 * 32 + 26))) ? constant_test_bit(((4 * 32 + 26)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((4 * 32 + 26)), ((unsigned long *)((&boot_cpu_data)->x86_capability)))))); +} + +static inline __attribute__ ((always_inline)) __attribute__ ((always_inline)) + __attribute__ ((pure)) +int use_fxsr(void) +{ + return (__builtin_constant_p + ((__builtin_constant_p((0 * 32 + 24)) + && + (((((0 * 32 + 24)) >> 5) == 0 + && (1UL << (((0 * 32 + 24)) & 31) & + ((1 << ((0 * 32 + 0) & 31)) | 0 | 0 | + (1 << ((0 * 32 + 6) & 31)) | (1 << ((0 * 32 + 8) & 31)) + | 0 | 0 | (1 << ((0 * 32 + 15) & 31)) | 0 | 0))) + || ((((0 * 32 + 24)) >> 5) == 1 + && (1UL << (((0 * 32 + 24)) & 31) & (0 | 0))) + || ((((0 * 32 + 24)) >> 5) == 2 + && (1UL << (((0 * 32 + 24)) & 31) & 0)) + || ((((0 * 32 + 24)) >> 5) == 3 + && (1UL << (((0 * 32 + 24)) & 31) & (0))) + || ((((0 * 32 + 24)) >> 5) == 4 + && (1UL << (((0 * 32 + 24)) & 31) & 0)) + || ((((0 * 32 + 24)) >> 5) == 5 + && (1UL << (((0 * 32 + 24)) & 31) & 0)) + || ((((0 * 32 + 24)) >> 5) == 6 + && (1UL << (((0 * 32 + 24)) & 31) & 0)) + || ((((0 * 32 + 24)) >> 5) == 7 + && (1UL << (((0 * 32 + 24)) & 31) & 0)) + || ((((0 * 32 + 24)) >> 5) == 8 + && (1UL << (((0 * 32 + 24)) & 31) & 0)) + || ((((0 * 32 + 24)) >> 5) == 9 + && (1UL << (((0 * 32 + 24)) & 31) & 0))) ? 1 + : (__builtin_constant_p(((0 * 32 + 24))) ? + constant_test_bit(((0 * 32 + 24)), + ((unsigned long *)((&boot_cpu_data)-> + x86_capability))) : + variable_test_bit(((0 * 32 + 24)), + ((unsigned long *)((&boot_cpu_data)-> + x86_capability)))))) + ? (__builtin_constant_p((0 * 32 + 24)) + && + (((((0 * 32 + 24)) >> 5) == 0 + && (1UL << (((0 * 32 + 24)) & 31) & + ((1 << ((0 * 32 + 0) & 31)) | 0 | 0 | + (1 << ((0 * 32 + 6) & 31)) | (1 << + ((0 * 32 + + 8) & 31)) | 0 | 0 | (1 + << + ((0 * 32 + 15) & 31)) | 0 | 0))) || ((((0 * 32 + 24)) >> 5) == 1 && (1UL << (((0 * 32 + 24)) & 31) & (0 | 0))) || ((((0 * 32 + 24)) >> 5) == 2 && (1UL << (((0 * 32 + 24)) & 31) & 0)) || ((((0 * 32 + 24)) >> 5) == 3 && (1UL << (((0 * 32 + 24)) & 31) & (0))) || ((((0 * 32 + 24)) >> 5) == 4 && (1UL << (((0 * 32 + 24)) & 31) & 0)) || ((((0 * 32 + 24)) >> 5) == 5 && (1UL << (((0 * 32 + 24)) & 31) & 0)) || ((((0 * 32 + 24)) >> 5) == 6 && (1UL << (((0 * 32 + 24)) & 31) & 0)) || ((((0 * 32 + 24)) >> 5) == 7 && (1UL << (((0 * 32 + 24)) & 31) & 0)) || ((((0 * 32 + 24)) >> 5) == 8 && (1UL << (((0 * 32 + 24)) & 31) & 0)) || ((((0 * 32 + 24)) >> 5) == 9 && (1UL << (((0 * 32 + 24)) & 31) & 0))) ? 1 : (__builtin_constant_p(((0 * 32 + 24))) ? constant_test_bit(((0 * 32 + 24)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((0 * 32 + 24)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))) : __builtin_constant_p((0 * 32 + 24)) ? __static_cpu_has((0 * 32 + 24)) : (__builtin_constant_p((0 * 32 + 24)) && (((((0 * 32 + 24)) >> 5) == 0 && (1UL << (((0 * 32 + 24)) & 31) & ((1 << ((0 * 32 + 0) & 31)) | 0 | 0 | (1 << ((0 * 32 + 6) & 31)) | (1 << ((0 * 32 + 8) & 31)) | 0 | 0 | (1 << ((0 * 32 + 15) & 31)) | 0 | 0))) || ((((0 * 32 + 24)) >> 5) == 1 && (1UL << (((0 * 32 + 24)) & 31) & (0 | 0))) || ((((0 * 32 + 24)) >> 5) == 2 && (1UL << (((0 * 32 + 24)) & 31) & 0)) || ((((0 * 32 + 24)) >> 5) == 3 && (1UL << (((0 * 32 + 24)) & 31) & (0))) || ((((0 * 32 + 24)) >> 5) == 4 && (1UL << (((0 * 32 + 24)) & 31) & 0)) || ((((0 * 32 + 24)) >> 5) == 5 && (1UL << (((0 * 32 + 24)) & 31) & 0)) || ((((0 * 32 + 24)) >> 5) == 6 && (1UL << (((0 * 32 + 24)) & 31) & 0)) || ((((0 * 32 + 24)) >> 5) == 7 && (1UL << (((0 * 32 + 24)) & 31) & 0)) || ((((0 * 32 + 24)) >> 5) == 8 && (1UL << (((0 * 32 + 24)) & 31) & 0)) || ((((0 * 32 + 24)) >> 5) == 9 && (1UL << (((0 * 32 + 24)) & 31) & 0))) ? 1 : (__builtin_constant_p(((0 * 32 + 24))) ? constant_test_bit(((0 * 32 + 24)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((0 * 32 + 24)), ((unsigned long *)((&boot_cpu_data)->x86_capability)))))); +} + +static inline __attribute__ ((always_inline)) +void fpu_save_init(struct fpu *fpu) +{ + if (__builtin_constant_p(use_xsave())? !!use_xsave() : !!use_xsave()) { + if (__builtin_constant_p + (((!(fpu->state->xsave.xsave_hdr. + xstate_bv & 0x1)))) ? ! !((!(fpu->state->xsave. + xsave_hdr. + xstate_bv & 0x1))) : ( { + ! !((!(fpu->state->xsave.xsave_hdr.xstate_bv & 0x1)));} + )) + return; + } else if (!!use_fxsr()) { + } + if (__builtin_constant_p + ((((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) ? + ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + __builtin_expect(! ! + (fpu-> + state-> + fxsave. + swd + & (1 + << + 7)), + 1);} + )))))? + ! !(((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) ? + ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + __builtin_expect(! ! + (fpu-> + state-> + fxsave. + swd + & + (1 + << + 7)), + 1);} + )))): ( { + int ______r; + ______r = + ! !(((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) + ? ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + ______r = + __builtin_expect + (! ! + (fpu-> + state-> + fxsave. + swd & (1 + << + 7)), + 1);} + ))));} + )) + asm volatile ("fnclex"); +} + +static +__attribute__ ((always_inline)) +void __save_init_fpu(void) +{ + fpu_save_init(0); +} + +static __attribute__ ((always_inline)) +void kernel_fpu_begin(void) +{ + __save_init_fpu(); +} + +static void aes_decrypt(struct crypto_tfm *tfm) +{ + struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm)); + if (!!!irq_fpu_usable()) + crypto_aes_decrypt_x86(ctx); + else + kernel_fpu_begin(); +} + +static struct crypto_alg aesni_alg = { +.cra_list = { + &aesni_alg.cra_list, + &aesni_alg.cra_list} + ,.cra_u = { + .cipher = { +.cia_decrypt = aes_decrypt} + } +}; + +static struct crypto_alg blk_ecb_alg = { +.cra_list = { + &blk_ecb_alg.cra_list, + &blk_ecb_alg.cra_list} +}; + +static struct crypto_alg ablk_ecb_alg = { +.cra_list = { + & + ablk_ecb_alg. + cra_list, + & + ablk_ecb_alg. + cra_list} +}; + +static struct crypto_alg ablk_cbc_alg = { +.cra_list = { + & + ablk_cbc_alg. + cra_list, + & + ablk_cbc_alg. + cra_list} +}; + +static struct crypto_alg ablk_pcbc_alg = { +.cra_list = { + & + ablk_pcbc_alg. + cra_list, + & + ablk_pcbc_alg. + cra_list} +}; + +int +aesni_init(void) +{ + if (!!crypto_register_alg(&aesni_alg)) + crypto_unregister_alg(&ablk_ecb_alg); +} diff --git a/388835/aesni-intel_glue.i.3 b/388835/aesni-intel_glue.i.3 new file mode 100644 index 0000000..b5d7a06 --- /dev/null +++ b/388835/aesni-intel_glue.i.3 @@ -0,0 +1,306 @@ +struct ftrace_branch_data { +}; +struct list_head { +}; +int __static_cpu_has(unsigned short bit) +{ + asm goto ("1: jmp %l[t_no]\n" "2:\n" ".section .altinstructions,\"a\"\n" + " " ".balign 4" " " "\n" " " ".long" " " "1b\n" " " ".long" + " " "0\n" " .word %P0\n" " .byte 2b - 1b\n" " .byte 0\n" + ".previous\n"::"i" (bit)::t_no); + return 1; + t_no: +return 0; +} + +struct cpuinfo_x86 { + unsigned int x86_capability[10]; +} __attribute__ ((__aligned__((1 << (6))))); +extern struct cpuinfo_x86 boot_cpu_data; +struct i387_fxsave_struct { + unsigned short swd; +} __attribute__ ((aligned(16))); +struct xsave_hdr_struct { + unsigned long long xstate_bv; +} __attribute__ ((packed)); +struct xsave_struct { + struct xsave_hdr_struct xsave_hdr; +} __attribute__ ((packed, aligned(64))); +union thread_xstate { + struct i387_fxsave_struct fxsave; + struct xsave_struct xsave; +}; +struct fpu { + union thread_xstate *state; +}; +struct thread_struct { + struct fpu fpu; +} mm_segment_t; +struct thread_info { + struct task_struct *task; + unsigned int status; +}; +struct cipher_alg { + unsigned int cia_min_keysize; + unsigned int cia_max_keysize; + int (*cia_setkey) (struct crypto_tfm * tfm, const unsigned char * key, + unsigned int keylen); + void (*cia_encrypt) (struct crypto_tfm * tfm, unsigned char * dst, const unsigned char * src); + void (*cia_decrypt) (struct crypto_tfm * tfm, unsigned char * dst, const unsigned char * src); +}; +struct crypto_alg { + struct list_head cra_list; + unsigned int cra_flags; + unsigned int cra_blocksize; + unsigned int cra_ctxsize; + unsigned int cra_alignmask; + int cra_priority; + char cra_name[64]; + char cra_driver_name[64]; + const struct crypto_type *cra_type; + union { + struct cipher_alg cipher; + } cra_u; + struct module *cra_module; +}; +extern const struct crypto_type crypto_ablkcipher_type; +extern const struct crypto_type crypto_blkcipher_type; +struct crypto_aes_ctx { +}; +struct task_struct { + struct thread_struct thread; +}; +static __attribute__ ((always_inline)) + __attribute__ ((pure)) +int use_xsave(void) +{ + return ( +__builtin_constant_p + ((__builtin_constant_p((154)) + && + (((4) == 0 + && (1UL << (((154)) & 31) & + ((1 << ((0) & 31)) | 0 | + (1 << ((6) & 31)) | (1 << ((8) & 31)) + | 0 | (1 << ((15) & 31)) | 0))) + || ((4) == 1 + && (1UL << (((154)) & 31) & (0))) + || ((4) == 2 + && (1UL << (((154)) & 31) & 0)) + || ((4) == 3 + && (1UL << (((154)) & 31) & (0))) + || ((4) == 4 + && (1UL << (((154)) & 31) & 0)) + || ((4) == 5 + && (1UL << (((154)) & 31) & 0)) + || ((4) == 6 + && (1UL << (((154)) & 31) & 0)) + || ((4) == 7 + && (1UL << (((154)) & 31) & 0)) + || ((4) == 8 + && (1UL << (((154)) & 31) & 0)) + || ((4) == 9 + && (1UL << (((154)) & 31) & 0))) ? 1 + : +(__builtin_constant_p(154) ? + constant_test_bit(154, + ((unsigned long *)((&boot_cpu_data)-> + x86_capability))) : + variable_test_bit(((154)) +, + ((unsigned long *)((&boot_cpu_data)-> + x86_capability)))))) + ? (__builtin_constant_p((154)) + && + (((4) == 0 + && (1UL << (((154)) & 31) & + ((1 << ((0) & 31)) | 0 | + (1 << ((6) & 31)) | (1 << + ((0 * 32 + + 8) & 31)) | 0 | (1 + << + ((15) & 31)) | 0))) || ((4) == 1 && (1UL << (((154)) & 31) & (0))) || ((4) == 2 && (1UL << (((154)) & 31) & 0)) || ((4) == 3 && (1UL << (((154)) & 31) & (0))) || ((4) == 4 && (1UL << (((154)) & 31) & 0)) || ((4) == 5 && (1UL << (((154)) & 31) & 0)) || ((4) == 6 && (1UL << (((154)) & 31) & 0)) || ((4) == 7 && (1UL << (((154)) & 31) & 0)) || ((4) == 8 && (1UL << (((154)) & 31) & 0)) || ((4) == 9 && (1UL << (((154)) & 31) & 0))) ? 1 : (__builtin_constant_p(((154))) ? constant_test_bit(((154)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((154)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))) : __builtin_constant_p((154)) ? __static_cpu_has((154)) : (__builtin_constant_p((154)) && (((4) == 0 && (1UL << (((154)) & 31) & ((1 << ((0) & 31)) | 0 | (1 << ((6) & 31)) | (1 << ((8) & 31)) | 0 | (1 << ((15) & 31)) | 0))) || ((4) == 1 && (1UL << (((154)) & 31) & (0))) || ((4) == 2 && (1UL << (((154)) & 31) & 0)) || ((4) == 3 && (1UL << (((154)) & 31) & (0))) || ((4) == 4 && (1UL << (((154)) & 31) & 0)) || ((4) == 5 && (1UL << (((154)) & 31) & 0)) || ((4) == 6 && (1UL << (((154)) & 31) & 0)) || ((4) == 7 && (1UL << (((154)) & 31) & 0)) || ((4) == 8 && (1UL << (((154)) & 31) & 0)) || ((4) == 9 && (1UL << (((154)) & 31) & 0))) ? 1 : (__builtin_constant_p(((154))) ? constant_test_bit(((154)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((154)), ((unsigned long *)((&boot_cpu_data)->x86_capability)))))); +} + +static inline __attribute__ ((always_inline)) __attribute__ ((always_inline)) + __attribute__ ((pure)) +int use_fxsr(void) +{ + return (__builtin_constant_p + ((__builtin_constant_p((24)) + && + (((((24)) >> 5) == 0 + && (1UL << (24) & + ((1 << ((0) & 31)) | 0 | + (1 << ((6) & 31)) | (1 << ((8) & 31)) + | 0 | (1 << ((15) & 31)) | 0))) + || ((((24)) >> 5) == 1 + && (1UL << (24) & (0))) + || ((((24)) >> 5) == 2 + && (1UL << (24) & 0)) + || ((((24)) >> 5) == 3 + && (1UL << (24) & (0))) + || ((((24)) >> 5) == 4 + && (1UL << (24) & 0)) + || ((((24)) >> 5) == 5 + && (1UL << (24) & 0)) + || ((((24)) >> 5) == 6 + && (1UL << (24) & 0)) + || ((((24)) >> 5) == 7 + && (1UL << (24) & 0)) + || ((((24)) >> 5) == 8 + && (1UL << (24) & 0)) + || ((((24)) >> 5) == 9 + && (1UL << (24) & 0))) ? 1 + : (__builtin_constant_p(((24))) ? + constant_test_bit(((24)), + ((unsigned long *)((&boot_cpu_data)-> + x86_capability))) : + variable_test_bit(((24)), + ((unsigned long *)((&boot_cpu_data)-> + x86_capability)))))) + ? (__builtin_constant_p((24)) + && + (((((24)) >> 5) == 0 + && (1UL << (24) & + ((1 << ((0) & 31)) | 0 | + (1 << ((6) & 31)) | (1 << + ((0 * 32 + + 8) & 31)) | 0 | (1 + << + ((15) & 31)) | 0))) || ((((24)) >> 5) == 1 && (1UL << (24) & (0))) || ((((24)) >> 5) == 2 && (1UL << (24) & 0)) || ((((24)) >> 5) == 3 && (1UL << (24) & (0))) || ((((24)) >> 5) == 4 && (1UL << (24) & 0)) || ((((24)) >> 5) == 5 && (1UL << (24) & 0)) || ((((24)) >> 5) == 6 && (1UL << (24) & 0)) || ((((24)) >> 5) == 7 && (1UL << (24) & 0)) || ((((24)) >> 5) == 8 && (1UL << (24) & 0)) || ((((24)) >> 5) == 9 && (1UL << (24) & 0))) ? 1 : (__builtin_constant_p(((24))) ? constant_test_bit(((24)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((24)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))) : __builtin_constant_p((24)) ? __static_cpu_has((24)) : (__builtin_constant_p((24)) && (((((24)) >> 5) == 0 && (1UL << (24) & ((1 << ((0) & 31)) | 0 | (1 << ((6) & 31)) | (1 << ((8) & 31)) | 0 | (1 << ((15) & 31)) | 0))) || ((((24)) >> 5) == 1 && (1UL << (24) & (0))) || ((((24)) >> 5) == 2 && (1UL << (24) & 0)) || ((((24)) >> 5) == 3 && (1UL << (24) & (0))) || ((((24)) >> 5) == 4 && (1UL << (24) & 0)) || ((((24)) >> 5) == 5 && (1UL << (24) & 0)) || ((((24)) >> 5) == 6 && (1UL << (24) & 0)) || ((((24)) >> 5) == 7 && (1UL << (24) & 0)) || ((((24)) >> 5) == 8 && (1UL << (24) & 0)) || ((((24)) >> 5) == 9 && (1UL << (24) & 0))) ? 1 : (__builtin_constant_p(((24))) ? constant_test_bit(((24)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((24)), ((unsigned long *)((&boot_cpu_data)->x86_capability)))))); +} + +static inline __attribute__ ((always_inline)) +void fpu_save_init(struct fpu *fpu) +{ + if (__builtin_constant_p(use_xsave())? !!use_xsave() : !!use_xsave()) { + if (__builtin_constant_p + (((!(fpu->state->xsave.xsave_hdr. + xstate_bv & 0x1)))) ? ! !((!(fpu->state->xsave. + xsave_hdr. + xstate_bv & 0x1))) : ( { + ! !((!(fpu->state->xsave.xsave_hdr.xstate_bv & 0x1)));} + )) + return; + } else if (!!use_fxsr()) { + } + if (__builtin_constant_p + ((((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) ? + ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + __builtin_expect(! ! + (fpu-> + state-> + fxsave. + swd + & (1 + << + 7)), + 1);} + )))))? + ! !(((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) ? + ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + __builtin_expect(! ! + (fpu-> + state-> + fxsave. + swd + & + (1 + << + 7)), + 1);} + )))): ( { + int ______r; + ______r = + ! !(((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) + ? ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + ______r = + __builtin_expect + (! ! + (fpu-> + state-> + fxsave. + swd & (1 + << + 7)), + 1);} + ))));} + )) + asm volatile ("fnclex"); +} + +static +__attribute__ ((always_inline)) +void __save_init_fpu(void) +{ + fpu_save_init(0); +} + +static __attribute__ ((always_inline)) +void kernel_fpu_begin(void) +{ + __save_init_fpu(); +} + +static void aes_decrypt(struct crypto_tfm *tfm) +{ + struct crypto_aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(tfm)); + if (!!!irq_fpu_usable()) + crypto_aes_decrypt_x86(ctx); + else + kernel_fpu_begin(); +} + +static struct crypto_alg aesni_alg = { +.cra_list = { + &aesni_alg.cra_list, + &aesni_alg.cra_list} + ,.cra_u = { + .cipher = { +.cia_decrypt = aes_decrypt} + } +}; + +static struct crypto_alg blk_ecb_alg = { +.cra_list = { + &blk_ecb_alg.cra_list, + &blk_ecb_alg.cra_list} +}; + +static struct crypto_alg ablk_ecb_alg = { +.cra_list = { + & + ablk_ecb_alg. + cra_list, + & + ablk_ecb_alg. + cra_list} +}; + +static struct crypto_alg ablk_cbc_alg = { +.cra_list = { + & + ablk_cbc_alg. + cra_list, + & + ablk_cbc_alg. + cra_list} +}; + +static struct crypto_alg ablk_pcbc_alg = { +.cra_list = { + & + ablk_pcbc_alg. + cra_list, + & + ablk_pcbc_alg. + cra_list} +}; + +int +aesni_init(void) +{ + if (!!crypto_register_alg(&aesni_alg)) + crypto_unregister_alg(&ablk_ecb_alg); +} diff --git a/388835/aesni-intel_glue.i.4 b/388835/aesni-intel_glue.i.4 new file mode 100644 index 0000000..6f06d2f --- /dev/null +++ b/388835/aesni-intel_glue.i.4 @@ -0,0 +1,230 @@ +struct list_head { +}; +int __static_cpu_has(unsigned short bit) +{ + asm goto ("1: jmp %l[t_no]\n" "2:\n" ".section .altinstructions,\"a\"\n" + " " ".balign 4" " " "\n" " " ".long" " " "1b\n" " " ".long" + " " "0\n" " .word %P0\n" " .byte 2b - 1b\n" " .byte 0\n" + ".previous\n"::"i" (bit)::t_no); + return 1; + t_no:return 0; +} + +struct cpuinfo_x86 { + unsigned int x86_capability[10]; +} __attribute__ ((__aligned__((1 << (6))))); +extern struct cpuinfo_x86 boot_cpu_data; +struct i387_fxsave_struct { + unsigned short swd; +} __attribute__ ((aligned(16))); +struct xsave_hdr_struct { + unsigned long long xstate_bv; +} __attribute__ ((packed)); +struct xsave_struct { + struct xsave_hdr_struct xsave_hdr; +} __attribute__ ((packed, aligned(64))); +union thread_xstate { + struct i387_fxsave_struct fxsave; + struct xsave_struct xsave; +}; +struct fpu { + union thread_xstate *state; +}; +struct cipher_alg { + void (*cia_decrypt) (struct crypto_tfm * tfm, unsigned char *dst, + const unsigned char *src); +}; +struct crypto_alg { + struct list_head cra_list; + union { + struct cipher_alg cipher; + } cra_u; +}; +static __attribute__ ((always_inline)) __attribute__ ((pure)) +int use_xsave(void) +{ + return (__builtin_constant_p + ((__builtin_constant_p((154)) + && + (((4) == 0 + && (1UL << (((154)) & 31) & + ((1 << ((0) & 31)) | (1 << ((6) & 31)) | + (1 << ((8) & 31)) | (1 << ((15) & 31)) | 0))) + || ((4) == 1 && (1UL << (((154)) & 31) & (0))) || ((4) == 2 + && (1UL << + (((154)) & 31) & 0)) || ((4) == 3 && (1UL << (((154)) & 31) & (0))) || ((4) == 4 && (1UL << (((154)) & 31) & 0)) || ((4) == 5 && (1UL << (((154)) & 31) & 0)) || ((4) == 6 && (1UL << (((154)) & 31) & 0)) || ((4) == 7 && (1UL << (((154)) & 31) & 0)) || ((4) == 8 && (1UL << (((154)) & 31) & 0)) || ((4) == 9 && (1UL << (((154)) & 31) & 0))) ? 1 : (__builtin_constant_p(154) ? constant_test_bit(154, ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((154)), ((unsigned long *)((&boot_cpu_data)->x86_capability)))))) ? (__builtin_constant_p((154)) && (((4) == 0 && (1UL << (((154)) & 31) & ((1 << ((0) & 31)) | (1 << ((6) & 31)) | (1 << ((0 * 32 + 8) & 31)) | (1 << ((15) & 31)) | 0))) || ((4) == 1 && (1UL << (((154)) & 31) & (0))) || ((4) == 2 && (1UL << (((154)) & 31) & 0)) || ((4) == 3 && (1UL << (((154)) & 31) & (0))) || ((4) == 4 && (1UL << (((154)) & 31) & 0)) || ((4) == 5 && (1UL << (((154)) & 31) & 0)) || ((4) == 6 && (1UL << (((154)) & 31) & 0)) || ((4) == 7 && (1UL << (((154)) & 31) & 0)) || ((4) == 8 && (1UL << (((154)) & 31) & 0)) || ((4) == 9 && (1UL << (((154)) & 31) & 0))) ? 1 : (__builtin_constant_p(((154))) ? constant_test_bit(((154)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((154)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))) : __builtin_constant_p((154)) ? __static_cpu_has((154)) : (__builtin_constant_p((154)) && (((4) == 0 && (1UL << (((154)) & 31) & ((1 << ((0) & 31)) | (1 << ((6) & 31)) | (1 << ((8) & 31)) | (1 << ((15) & 31)) | 0))) || ((4) == 1 && (1UL << (((154)) & 31) & (0))) || ((4) == 2 && (1UL << (((154)) & 31) & 0)) || ((4) == 3 && (1UL << (((154)) & 31) & (0))) || ((4) == 4 && (1UL << (((154)) & 31) & 0)) || ((4) == 5 && (1UL << (((154)) & 31) & 0)) || ((4) == 6 && (1UL << (((154)) & 31) & 0)) || ((4) == 7 && (1UL << (((154)) & 31) & 0)) || ((4) == 8 && (1UL << (((154)) & 31) & 0)) || ((4) == 9 && (1UL << (((154)) & 31) & 0))) ? 1 : (__builtin_constant_p(((154))) ? constant_test_bit(((154)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((154)), ((unsigned long *)((&boot_cpu_data)->x86_capability)))))); +} + +static inline __attribute__ ((always_inline)) __attribute__ ((always_inline)) + __attribute__ ((pure)) +int use_fxsr(void) +{ + return (__builtin_constant_p + ((__builtin_constant_p((24)) + && + (((((24)) >> 5) == 0 + && (1UL << (24) & + ((1 << ((0) & 31)) | (1 << ((6) & 31)) | + (1 << ((8) & 31)) | (1 << ((15) & 31)) | 0))) + || ((((24)) >> 5) == 1 && (1UL << (24) & (0))) + || ((((24)) >> 5) == 2 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 3 && (1UL << (24) & (0))) + || ((((24)) >> 5) == 4 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 5 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 6 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 7 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 8 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 9 + && (1UL << (24) & 0))) ? 1 + : (__builtin_constant_p(((24))) ? + constant_test_bit(((24)), + ((unsigned long *)((&boot_cpu_data)-> + x86_capability))) : + variable_test_bit(((24)), + ((unsigned long *)((&boot_cpu_data)-> + x86_capability)))))) + ? (__builtin_constant_p((24)) + && + (((((24)) >> 5) == 0 + && (1UL << (24) & + ((1 << ((0) & 31)) | (1 << ((6) & 31)) | + (1 << ((0 * 32 + 8) & 31)) | (1 << ((15) & 31)) | + 0))) || ((((24)) >> 5) == 1 && (1UL << (24) & (0))) + || ((((24)) >> 5) == 2 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 3 && (1UL << (24) & (0))) + || ((((24)) >> 5) == 4 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 5 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 6 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 7 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 8 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 9 + && (1UL << (24) & 0))) ? 1 + : (__builtin_constant_p(((24))) ? + constant_test_bit(((24)), + ((unsigned long *)((&boot_cpu_data)-> + x86_capability))) : + variable_test_bit(((24)), + ((unsigned long *)((&boot_cpu_data)-> + x86_capability))))) : + __builtin_constant_p((24)) ? __static_cpu_has((24)) + : (__builtin_constant_p((24)) + && + (((((24)) >> 5) == 0 + && (1UL << (24) & + ((1 << ((0) & 31)) | (1 << ((6) & 31)) | + (1 << ((8) & 31)) | (1 << ((15) & 31)) | 0))) + || ((((24)) >> 5) == 1 && (1UL << (24) & (0))) + || ((((24)) >> 5) == 2 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 3 && (1UL << (24) & (0))) + || ((((24)) >> 5) == 4 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 5 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 6 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 7 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 8 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 9 + && (1UL << (24) & 0))) ? 1 + : (__builtin_constant_p(((24))) ? + constant_test_bit(((24)), + ((unsigned long *)((&boot_cpu_data)-> + x86_capability))) : + variable_test_bit(((24)), + ((unsigned long *)((&boot_cpu_data)-> + x86_capability)))))); +} + +static inline __attribute__ ((always_inline)) +void fpu_save_init(struct fpu *fpu) +{ + if (__builtin_constant_p(use_xsave())? use_xsave() : use_xsave()) { + if (__builtin_constant_p + (((!(fpu->state->xsave.xsave_hdr. + xstate_bv & 0x1)))) ? ! !((!(fpu->state->xsave. + xsave_hdr. + xstate_bv & 0x1))) : ( { + ! !((!(fpu->state->xsave.xsave_hdr.xstate_bv & 0x1)));} + )) + return; + } else if (use_fxsr()) { + } + if (__builtin_constant_p + ((((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) ? + ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + __builtin_expect(! ! + (fpu-> + state-> + fxsave. + swd + & (1 + << + 7)), + 1);} + )))))? + ! !(((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) ? + ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + __builtin_expect(! ! + (fpu-> + state-> + fxsave. + swd + & + (1 + << + 7)), + 1);} + )))): ( { + int ______r; + ______r = + ! !(((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) + ? ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + ______r = + __builtin_expect + (! ! + (fpu-> + state-> + fxsave. + swd & (1 + << + 7)), + 1);} + ))));} + )) + asm volatile ("fnclex"); +} + +static __attribute__ ((always_inline)) +void __save_init_fpu(void) +{ + fpu_save_init(0); +} + +static __attribute__ ((always_inline)) +void kernel_fpu_begin(void) +{ + __save_init_fpu(); +} + +static void aes_decrypt(void) +{ + if (!irq_fpu_usable()) + crypto_aes_decrypt_x86(0); + else + kernel_fpu_begin(); +} + +static struct crypto_alg aesni_alg = { + .cra_list = { + &aesni_alg.cra_list, &aesni_alg.cra_list} + ,.cra_u = { + .cipher = { + .cia_decrypt = aes_decrypt} + } +}; + +static struct crypto_alg ablk_ecb_alg = { +}; + +int aesni_init(void) +{ + if (! !crypto_register_alg(&aesni_alg)) + crypto_unregister_alg(&ablk_ecb_alg); +} diff --git a/388835/aesni-intel_glue.i.5 b/388835/aesni-intel_glue.i.5 new file mode 100644 index 0000000..2c41259 --- /dev/null +++ b/388835/aesni-intel_glue.i.5 @@ -0,0 +1,230 @@ +struct list_head { +}; +int __static_cpu_has(unsigned short bit) +{ + asm goto ("1: jmp %l[t_no]\n" "2:\n" ".section .altinstructions,\"a\"\n" + " " ".balign 4" " " "\n" " " ".long" " " "1b\n" " " ".long" + " " "0\n" " .word %P0\n" " .byte 2b - 1b\n" " .byte 0\n" + ".previous\n"::"i" (bit)::t_no); + return 1; + t_no:return 0; +} + +struct cpuinfo_x86 { + unsigned int x86_capability[10]; +} __attribute__ ((__aligned__((1 << (6))))); +extern struct cpuinfo_x86 boot_cpu_data; +struct i387_fxsave_struct { + unsigned short swd; +} __attribute__ ((aligned(16))); +struct xsave_hdr_struct { + unsigned long long xstate_bv; +} __attribute__ ((packed)); +struct xsave_struct { + struct xsave_hdr_struct xsave_hdr; +} __attribute__ ((packed, aligned(64))); +union thread_xstate { + struct i387_fxsave_struct fxsave; + struct xsave_struct xsave; +}; +struct fpu { + union thread_xstate *state; +}; +struct cipher_alg { + void (*cia_decrypt) (struct crypto_tfm * tfm, unsigned char *dst, + const unsigned char *src); +}; +struct crypto_alg { + struct list_head cra_list; + union { + struct cipher_alg cipher; + } cra_u; +}; +static __attribute__ ((always_inline)) __attribute__ ((pure)) +int use_xsave(void) +{ + return (__builtin_constant_p + ((__builtin_constant_p(154) + && + ((4 == 0 + && (1UL << (26) & + ((1 << 0) | (1 << 6) | + (1 << 8) | (1 << 15)))) + || ((4) == 1 && (1UL << (26) & 0)) || ((4) == 2 + && (1UL << + (26) & 0)) || ((4) == 3 && (1UL << (26) & 0)) || ((4) == 4 && (1UL << (26) & 0)) || ((4) == 5 && (1UL << (26) & 0)) || ((4) == 6 && (1UL << (26) & 0)) || ((4) == 7 && (1UL << (26) & 0)) || ((4) == 8 && (1UL << (26) & 0)) || ((4) == 9 && (1UL << (26) & 0))) ? 1 : (__builtin_constant_p(154) ? constant_test_bit(154, ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((154)), ((unsigned long *)((&boot_cpu_data)->x86_capability)))))) ? (__builtin_constant_p((154)) && (((4) == 0 && (1UL << (26) & ((1 << (0 & 31)) | (1 << ((6) & 31)) | (1 << ((0 * 32 + 8) & 31)) | (1 << ((15) & 31)) | 0))) || ((4) == 1 && (1UL << (26) & 0)) || ((4) == 2 && (1UL << (26) & 0)) || ((4) == 3 && (1UL << (26) & 0)) || ((4) == 4 && (1UL << (26) & 0)) || ((4) == 5 && (1UL << (26) & 0)) || ((4) == 6 && (1UL << (26) & 0)) || ((4) == 7 && (1UL << (26) & 0)) || ((4) == 8 && (1UL << (26) & 0)) || ((4) == 9 && (1UL << (26) & 0))) ? 1 : (__builtin_constant_p(((154))) ? constant_test_bit(((154)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((154)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))) : __builtin_constant_p((154)) ? __static_cpu_has((154)) : (__builtin_constant_p((154)) && (((4) == 0 && (1UL << (26) & ((1 << (0 & 31)) | (1 << ((6) & 31)) | (1 << ((8) & 31)) | (1 << ((15) & 31)) | 0))) || ((4) == 1 && (1UL << (26) & 0)) || ((4) == 2 && (1UL << (26) & 0)) || ((4) == 3 && (1UL << (26) & 0)) || ((4) == 4 && (1UL << (26) & 0)) || ((4) == 5 && (1UL << (26) & 0)) || ((4) == 6 && (1UL << (26) & 0)) || ((4) == 7 && (1UL << (26) & 0)) || ((4) == 8 && (1UL << (26) & 0)) || ((4) == 9 && (1UL << (26) & 0))) ? 1 : (__builtin_constant_p(((154))) ? constant_test_bit(((154)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((154)), ((unsigned long *)((&boot_cpu_data)->x86_capability)))))); +} + +static inline __attribute__ ((always_inline)) __attribute__ ((always_inline)) + __attribute__ ((pure)) +int use_fxsr(void) +{ + return (__builtin_constant_p + ((__builtin_constant_p((24)) + && + (((((24)) >> 5) == 0 + && (1UL << (24) & + ((1 << 0) | (1 << 6) | + (1 << 8) | (1 << 15) ))) + || ((((24)) >> 5) == 1 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 2 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 3 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 4 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 5 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 6 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 7 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 8 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 9 + && (1UL << (24) & 0))) ? 1 + : (__builtin_constant_p(((24))) ? + constant_test_bit(((24)), + ((unsigned long *)((&boot_cpu_data)-> + x86_capability))) : + variable_test_bit(((24)), + ((unsigned long *)((&boot_cpu_data)-> + x86_capability)))))) + ? (__builtin_constant_p((24)) + && + (((((24)) >> 5) == 0 + && (1UL << (24) & + ((1 << (0 & 31)) | (1 << ((6) & 31)) | + (1 << ((0 * 32 + 8) & 31)) | (1 << ((15) & 31)) | + 0))) || ((((24)) >> 5) == 1 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 2 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 3 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 4 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 5 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 6 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 7 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 8 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 9 + && (1UL << (24) & 0))) ? 1 + : (__builtin_constant_p(((24))) ? + constant_test_bit(((24)), + ((unsigned long *)((&boot_cpu_data)-> + x86_capability))) : + variable_test_bit(((24)), + ((unsigned long *)((&boot_cpu_data)-> + x86_capability))))) : + __builtin_constant_p((24)) ? __static_cpu_has((24)) + : (__builtin_constant_p((24)) + && + (((((24)) >> 5) == 0 + && (1UL << (24) & + ((1 << (0 & 31)) | (1 << ((6) & 31)) | + (1 << ((8) & 31)) | (1 << ((15) & 31)) | 0))) + || ((((24)) >> 5) == 1 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 2 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 3 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 4 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 5 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 6 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 7 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 8 && (1UL << (24) & 0)) + || ((((24)) >> 5) == 9 + && (1UL << (24) & 0))) ? 1 + : (__builtin_constant_p(((24))) ? + constant_test_bit(((24)), + ((unsigned long *)((&boot_cpu_data)-> + x86_capability))) : + variable_test_bit(((24)), + ((unsigned long *)((&boot_cpu_data)-> + x86_capability)))))); +} + +static inline __attribute__ ((always_inline)) +void fpu_save_init(struct fpu *fpu) +{ + if (__builtin_constant_p(use_xsave())? use_xsave() : use_xsave()) { + if (__builtin_constant_p + (((!(fpu->state->xsave.xsave_hdr. + xstate_bv & 0x1)))) ? ! !((!(fpu->state->xsave. + xsave_hdr. + xstate_bv & 0x1))) : ( { + ! !((!(fpu->state->xsave.xsave_hdr.xstate_bv & 0x1)));} + )) + return; + } else if (use_fxsr()) { + } + if (__builtin_constant_p + ((((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) ? + ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + __builtin_expect(! ! + (fpu-> + state-> + fxsave. + swd + & (1 + << + 7)), + 1);} + )))))? + ! !(((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) ? + ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + __builtin_expect(! ! + (fpu-> + state-> + fxsave. + swd + & + (1 + << + 7)), + 1);} + )))): ( { + int ______r; + ______r = + ! !(((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) + ? ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + ______r = + __builtin_expect + (! ! + (fpu-> + state-> + fxsave. + swd & (1 + << + 7)), + 1);} + ))));} + )) + asm volatile ("fnclex"); +} + +static __attribute__ ((always_inline)) +void __save_init_fpu(void) +{ + fpu_save_init(0); +} + +static __attribute__ ((always_inline)) +void kernel_fpu_begin(void) +{ + __save_init_fpu(); +} + +static void aes_decrypt(void) +{ + if (!irq_fpu_usable()) + crypto_aes_decrypt_x86(0); + else + kernel_fpu_begin(); +} + +static struct crypto_alg aesni_alg = { + .cra_list = { + &aesni_alg.cra_list, &aesni_alg.cra_list} + ,.cra_u = { + .cipher = { + .cia_decrypt = aes_decrypt} + } +}; + +static struct crypto_alg ablk_ecb_alg = { +}; + +int aesni_init(void) +{ + if (! !crypto_register_alg(&aesni_alg)) + crypto_unregister_alg(&ablk_ecb_alg); +} diff --git a/388835/aesni-intel_glue.i.6 b/388835/aesni-intel_glue.i.6 new file mode 100644 index 0000000..af855b1 --- /dev/null +++ b/388835/aesni-intel_glue.i.6 @@ -0,0 +1,184 @@ +struct list_head { +}; +int __static_cpu_has(unsigned short bit) +{ + asm goto ("1: jmp %l[t_no]\n" "2:\n" ".section .altinstructions,\"a\"\n" + " " ".balign 4" " " "\n" " " ".long" " " "1b\n" " " ".long" + " " "0\n" " .word %P0\n" " .byte 2b - 1b\n" " .byte 0\n" + ".previous\n"::"i" (bit)::t_no); + return 1; + t_no:return 0; +} + +struct cpuinfo_x86 { + unsigned int x86_capability[10]; +} __attribute__ ((__aligned__((1 << (6))))); +extern struct cpuinfo_x86 boot_cpu_data; +struct i387_fxsave_struct { + unsigned short swd; +} __attribute__ ((aligned(16))); +struct xsave_hdr_struct { + unsigned long long xstate_bv; +} __attribute__ ((packed)); +struct xsave_struct { + struct xsave_hdr_struct xsave_hdr; +} __attribute__ ((packed, aligned(64))); +union thread_xstate { + struct i387_fxsave_struct fxsave; + struct xsave_struct xsave; +}; +struct fpu { + union thread_xstate *state; +}; +struct cipher_alg { + void (*cia_decrypt) (struct crypto_tfm * tfm, unsigned char *dst, + const unsigned char *src); +}; +struct crypto_alg { + struct list_head cra_list; + union { + struct cipher_alg cipher; + } cra_u; +}; +static __attribute__ ((always_inline)) __attribute__ ((pure)) +int use_xsave(void) +{ + return (__builtin_constant_p + ((__builtin_constant_p(154) + && + ((4 == 0 + && (1UL << (26) & + ((1 << 0) | (1 << 6) | + (1 << 8) | (1 << 15)))) + || ((4) == 1 && (1UL << (26) & 0)) || ((4) == 2 + && (1UL << + (26) & 0)) || ((4) == 3 && (1UL << (26) & 0)) || ((4) == 4 && (1UL << (26) & 0)) || ((4) == 5 && (1UL << (26) & 0)) || ((4) == 6 && (1UL << (26) & 0)) || ((4) == 7 && (1UL << (26) & 0)) || ((4) == 8 && (1UL << (26) & 0)) || ((4) == 9 && (1UL << (26) & 0))) ? 1 : (__builtin_constant_p(154) ? constant_test_bit(154, ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((154)), ((unsigned long *)((&boot_cpu_data)->x86_capability)))))) ? (__builtin_constant_p((154)) && (((4) == 0 && (1UL << (26) & ((1 << (0 & 31)) | (1 << ((6) & 31)) | (1 << ((0 * 32 + 8) & 31)) | (1 << ((15) & 31)) | 0))) || ((4) == 1 && (1UL << (26) & 0)) || ((4) == 2 && (1UL << (26) & 0)) || ((4) == 3 && (1UL << (26) & 0)) || ((4) == 4 && (1UL << (26) & 0)) || ((4) == 5 && (1UL << (26) & 0)) || ((4) == 6 && (1UL << (26) & 0)) || ((4) == 7 && (1UL << (26) & 0)) || ((4) == 8 && (1UL << (26) & 0)) || ((4) == 9 && (1UL << (26) & 0))) ? 1 : (__builtin_constant_p(((154))) ? constant_test_bit(((154)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((154)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))) : __builtin_constant_p((154)) ? __static_cpu_has((154)) : (__builtin_constant_p((154)) && (((4) == 0 && (1UL << (26) & ((1 << (0 & 31)) | (1 << ((6) & 31)) | (1 << ((8) & 31)) | (1 << ((15) & 31)) | 0))) || ((4) == 1 && (1UL << (26) & 0)) || ((4) == 2 && (1UL << (26) & 0)) || ((4) == 3 && (1UL << (26) & 0)) || ((4) == 4 && (1UL << (26) & 0)) || ((4) == 5 && (1UL << (26) & 0)) || ((4) == 6 && (1UL << (26) & 0)) || ((4) == 7 && (1UL << (26) & 0)) || ((4) == 8 && (1UL << (26) & 0)) || ((4) == 9 && (1UL << (26) & 0))) ? 1 : (__builtin_constant_p(((154))) ? constant_test_bit(((154)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((154)), ((unsigned long *)((&boot_cpu_data)->x86_capability)))))); +} + +static inline __attribute__ ((always_inline)) __attribute__ ((always_inline)) + __attribute__ ((pure)) +int use_fxsr(void) +{ + return (__builtin_constant_p + (( +(__builtin_constant_p(24) ? +constant_test_bit(24, + ((unsigned long *)((&boot_cpu_data)-> + x86_capability))) : + variable_test_bit(24, + ((unsigned long *)((&boot_cpu_data)-> + x86_capability)))))) + ? +( +__builtin_constant_p(24) ? + constant_test_bit(24, ((unsigned long *)((&boot_cpu_data)->x86_capability))) : + variable_test_bit(24, ((unsigned long *)((&boot_cpu_data)->x86_capability))) + +) : + __builtin_constant_p((24)) ? __static_cpu_has((24)) + : ( +(__builtin_constant_p(24) ? + constant_test_bit(24, + ((unsigned long *)((&boot_cpu_data)-> + x86_capability))) : + variable_test_bit(24, + ((unsigned long *)((&boot_cpu_data)-> + x86_capability)))))); +} + +static inline __attribute__ ((always_inline)) +void fpu_save_init(struct fpu *fpu) +{ + if (__builtin_constant_p(use_xsave())? use_xsave() : use_xsave()) { + if (__builtin_constant_p + (((!(fpu->state->xsave.xsave_hdr. + xstate_bv & 0x1)))) ? ! !((!(fpu->state->xsave. + xsave_hdr. + xstate_bv & 0x1))) : ( { + ! !((!(fpu->state->xsave.xsave_hdr.xstate_bv & 0x1)));} + )) + return; + } else if (use_fxsr()) { + } + if (__builtin_constant_p + ((((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) ? + ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + __builtin_expect(! ! + (fpu-> + state-> + fxsave. + swd + & (1 + << + 7)), + 1);} + )))))? + ! !(((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) ? + ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + __builtin_expect(! ! + (fpu-> + state-> + fxsave. + swd + & + (1 + << + 7)), + 1);} + )))): ( { + int ______r; + ______r = + ! !(((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) + ? ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + ______r = + __builtin_expect + (! ! + (fpu-> + state-> + fxsave. + swd & (1 + << + 7)), + 1);} + ))));} + )) + asm volatile ("fnclex"); +} + +static __attribute__ ((always_inline)) +void __save_init_fpu(void) +{ + fpu_save_init(0); +} + +static __attribute__ ((always_inline)) +void kernel_fpu_begin(void) +{ + __save_init_fpu(); +} + +static void aes_decrypt(void) +{ + if (!irq_fpu_usable()) + crypto_aes_decrypt_x86(0); + else + kernel_fpu_begin(); +} + +static struct crypto_alg aesni_alg = { + .cra_list = { + &aesni_alg.cra_list, &aesni_alg.cra_list} + ,.cra_u = { + .cipher = { + .cia_decrypt = aes_decrypt} + } +}; + +static struct crypto_alg ablk_ecb_alg = { +}; + +int aesni_init(void) +{ + if (! !crypto_register_alg(&aesni_alg)) + crypto_unregister_alg(&ablk_ecb_alg); +} diff --git a/388835/aesni-intel_glue.i.7 b/388835/aesni-intel_glue.i.7 new file mode 100644 index 0000000..7cb9beb --- /dev/null +++ b/388835/aesni-intel_glue.i.7 @@ -0,0 +1,163 @@ +struct list_head { +}; +int __static_cpu_has(unsigned short bit) +{ + asm goto ("1: jmp %l[t_no]\n" "2:\n" ".section .altinstructions,\"a\"\n" + " " ".balign 4" " " "\n" " " ".long" " " "1b\n" " " ".long" + " " "0\n" " .word %P0\n" " .byte 2b - 1b\n" " .byte 0\n" + ".previous\n"::"i" (bit)::t_no); + return 1; + t_no:return 0; +} + +struct cpuinfo_x86 { + unsigned int x86_capability[10]; +} __attribute__ ((__aligned__((1 << (6))))); +extern struct cpuinfo_x86 boot_cpu_data; +struct i387_fxsave_struct { + unsigned short swd; +} __attribute__ ((aligned(16))); +struct xsave_hdr_struct { + unsigned long long xstate_bv; +} __attribute__ ((packed)); +struct xsave_struct { + struct xsave_hdr_struct xsave_hdr; +} __attribute__ ((packed, aligned(64))); +union thread_xstate { + struct i387_fxsave_struct fxsave; + struct xsave_struct xsave; +}; +struct fpu { + union thread_xstate *state; +}; +struct cipher_alg { + void (*cia_decrypt) (struct crypto_tfm * tfm, unsigned char *dst, + const unsigned char *src); +}; +struct crypto_alg { + struct list_head cra_list; + union { + struct cipher_alg cipher; + } cra_u; +}; +static __attribute__ ((always_inline)) __attribute__ ((pure)) +int use_xsave(void) +{ + return __builtin_constant_p(constant_test_bit(154, (unsigned long *)((&boot_cpu_data)->x86_capability))) +? +( +( +__builtin_constant_p(((154))) ? constant_test_bit(((154)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) +: variable_test_bit(((154)), ((unsigned long *)((&boot_cpu_data)->x86_capability))))) +: __builtin_constant_p((154)) ? __static_cpu_has((154)) : (__builtin_constant_p((154)) && (((4) == 0 && (1UL << (26) & ((1 << (0 & 31)) | (1 << ((6) & 31)) | (1 << ((8) & 31)) | (1 << ((15) & 31)) | 0))) || ((4) == 1 && (1UL << (26) & 0)) || ((4) == 2 && (1UL << (26) & 0)) || ((4) == 3 && (1UL << (26) & 0)) || ((4) == 4 && (1UL << (26) & 0)) || ((4) == 5 && (1UL << (26) & 0)) || ((4) == 6 && (1UL << (26) & 0)) || ((4) == 7 && (1UL << (26) & 0)) || ((4) == 8 && (1UL << (26) & 0)) || ((4) == 9 && (1UL << (26) & 0))) ? 1 : (__builtin_constant_p(((154))) ? constant_test_bit(((154)), ((unsigned long *)((&boot_cpu_data)->x86_capability))) : variable_test_bit(((154)), ((unsigned long *)((&boot_cpu_data)->x86_capability)))) +); +} + +static inline __attribute__ ((always_inline)) __attribute__ ((always_inline)) + __attribute__ ((pure)) +int use_fxsr(void) +{ + return __builtin_constant_p + (variable_test_bit(24, (unsigned long *)((&boot_cpu_data)->x86_capability))) + ? +variable_test_bit(24, (unsigned long *)((&boot_cpu_data)->x86_capability)) : + __static_cpu_has(24) +; +} + +static inline __attribute__ ((always_inline)) +void fpu_save_init(struct fpu *fpu) +{ + if (__builtin_constant_p(use_xsave())? use_xsave() : use_xsave()) { + if (__builtin_constant_p + (((!(fpu->state->xsave.xsave_hdr. + xstate_bv & 0x1)))) ? ! !((!(fpu->state->xsave. + xsave_hdr. + xstate_bv & 0x1))) : ( { + ! !((!(fpu->state->xsave.xsave_hdr.xstate_bv & 0x1)));} + )) + return; + } else if (use_fxsr()) { + } + if (__builtin_constant_p + ((((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) ? + ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + __builtin_expect(! ! + (fpu-> + state-> + fxsave. + swd + & (1 + << + 7)), + 1);} + )))))? + ! !(((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) ? + ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + __builtin_expect(! ! + (fpu-> + state-> + fxsave. + swd + & + (1 + << + 7)), + 1);} + )))): ( { + int ______r; + ______r = + ! !(((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) + ? ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + ______r = + __builtin_expect + (! ! + (fpu-> + state-> + fxsave. + swd & (1 + << + 7)), + 1);} + ))));} + )) + asm volatile ("fnclex"); +} + +static __attribute__ ((always_inline)) +void __save_init_fpu(void) +{ + fpu_save_init(0); +} + +static __attribute__ ((always_inline)) +void kernel_fpu_begin(void) +{ + __save_init_fpu(); +} + +static void aes_decrypt(void) +{ + if (!irq_fpu_usable()) + crypto_aes_decrypt_x86(0); + else + kernel_fpu_begin(); +} + +static struct crypto_alg aesni_alg = { + .cra_list = { + &aesni_alg.cra_list, &aesni_alg.cra_list} + ,.cra_u = { + .cipher = { + .cia_decrypt = aes_decrypt} + } +}; + +static struct crypto_alg ablk_ecb_alg = { +}; + +int aesni_init(void) +{ + if (! !crypto_register_alg(&aesni_alg)) + crypto_unregister_alg(&ablk_ecb_alg); +} diff --git a/388835/aesni-intel_glue.i.8 b/388835/aesni-intel_glue.i.8 new file mode 100644 index 0000000..3e81512 --- /dev/null +++ b/388835/aesni-intel_glue.i.8 @@ -0,0 +1,164 @@ +struct list_head { +}; +int __static_cpu_has(unsigned short bit) +{ + asm goto ("1: jmp %l[t_no]\n" "2:\n" ".section .altinstructions,\"a\"\n" + " " ".balign 4" " " "\n" " " ".long" " " "1b\n" " " ".long" + " " "0\n" " .word %P0\n" " .byte 2b - 1b\n" " .byte 0\n" + ".previous\n"::"i" (bit)::t_no); + return 1; + t_no:return 0; +} + +struct cpuinfo_x86 { + unsigned int x86_capability[10]; +} __attribute__ ((__aligned__((1 << (6))))); +extern struct cpuinfo_x86 boot_cpu_data; +struct i387_fxsave_struct { + unsigned short swd; +} __attribute__ ((aligned(16))); +struct xsave_hdr_struct { + unsigned long long xstate_bv; +} __attribute__ ((packed)); +struct xsave_struct { + struct xsave_hdr_struct xsave_hdr; +} __attribute__ ((packed, aligned(64))); +union thread_xstate { + struct i387_fxsave_struct fxsave; + struct xsave_struct xsave; +}; +struct fpu { + union thread_xstate *state; +}; +struct cipher_alg { + void (*cia_decrypt) (struct crypto_tfm * tfm, unsigned char *dst, + const unsigned char *src); +}; +struct crypto_alg { + struct list_head cra_list; + union { + struct cipher_alg cipher; + } cra_u; +}; +static __attribute__ ((always_inline)) __attribute__ ((pure)) +int use_xsave(void) +{ + return __builtin_constant_p(constant_test_bit(154, (unsigned long *)((&boot_cpu_data)->x86_capability))) +? + constant_test_bit(154, (unsigned long *)((&boot_cpu_data)->x86_capability)) : + __static_cpu_has(154) + +; +} + +static inline __attribute__ ((always_inline)) __attribute__ ((always_inline)) + __attribute__ ((pure)) +int use_fxsr(void) +{ + return __builtin_constant_p + (variable_test_bit(24, (unsigned long *)((&boot_cpu_data)->x86_capability))) + ? +variable_test_bit(24, (unsigned long *)((&boot_cpu_data)->x86_capability)) : + __static_cpu_has(24) +; +} + +static inline __attribute__ ((always_inline)) +void fpu_save_init(struct fpu *fpu) +{ + if ( +__builtin_constant_p(use_xsave())? use_xsave() : +use_xsave() +) { + if (__builtin_constant_p + (((!(fpu->state->xsave.xsave_hdr. + xstate_bv & 0x1)))) ? ! !((!(fpu->state->xsave. + xsave_hdr. + xstate_bv & 0x1))) : ( { + ! !((!(fpu->state->xsave.xsave_hdr.xstate_bv & 0x1)));} + )) + return; + } else if (use_fxsr()) { + } + if (__builtin_constant_p + ((((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) ? + ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + __builtin_expect(! ! + (fpu-> + state-> + fxsave. + swd + & (1 + << + 7)), + 1);} + )))))? + ! !(((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) ? + ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + __builtin_expect(! ! + (fpu-> + state-> + fxsave. + swd + & + (1 + << + 7)), + 1);} + )))): ( { + int ______r; + ______r = + ! !(((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) + ? ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + ______r = + __builtin_expect + (! ! + (fpu-> + state-> + fxsave. + swd & (1 + << + 7)), + 1);} + ))));} + )) + asm volatile ("fnclex"); +} + +static __attribute__ ((always_inline)) +void __save_init_fpu(void) +{ + fpu_save_init(0); +} + +static __attribute__ ((always_inline)) +void kernel_fpu_begin(void) +{ + __save_init_fpu(); +} + +static void aes_decrypt(void) +{ + if (!irq_fpu_usable()) + crypto_aes_decrypt_x86(0); + else + kernel_fpu_begin(); +} + +static struct crypto_alg aesni_alg = { + .cra_list = { + &aesni_alg.cra_list, &aesni_alg.cra_list} + ,.cra_u = { + .cipher = { + .cia_decrypt = aes_decrypt} + } +}; + +static struct crypto_alg ablk_ecb_alg = { +}; + +int aesni_init(void) +{ + if (! !crypto_register_alg(&aesni_alg)) + crypto_unregister_alg(&ablk_ecb_alg); +} diff --git a/388835/aesni-intel_glue.i.9 b/388835/aesni-intel_glue.i.9 new file mode 100644 index 0000000..0f7f07c --- /dev/null +++ b/388835/aesni-intel_glue.i.9 @@ -0,0 +1,155 @@ +struct list_head { +}; +int __static_cpu_has(unsigned short bit) +{ + asm goto ("1: jmp %l[t_no]\n" "2:\n" ".section .altinstructions,\"a\"\n" + " " ".balign 4" " " "\n" " " ".long" " " "1b\n" " " ".long" + " " "0\n" " .word %P0\n" " .byte 2b - 1b\n" " .byte 0\n" + ".previous\n"::"i" (bit)::t_no); + return 1; + t_no:return 0; +} + +struct cpuinfo_x86 { + unsigned int x86_capability[10]; +} __attribute__ ((__aligned__((1 << (6))))); +extern struct cpuinfo_x86 boot_cpu_data; +struct i387_fxsave_struct { + unsigned short swd; +} __attribute__ ((aligned(16))); +struct xsave_hdr_struct { + unsigned long long xstate_bv; +} __attribute__ ((packed)); +struct xsave_struct { + struct xsave_hdr_struct xsave_hdr; +} __attribute__ ((packed, aligned(64))); +union thread_xstate { + struct i387_fxsave_struct fxsave; + struct xsave_struct xsave; +}; +struct fpu { + union thread_xstate *state; +}; +struct crypto_alg { + struct list_head cra_list; + void (*cia_decrypt) (void); +}; +static __attribute__ ((always_inline)) __attribute__ ((pure)) +int use_xsave(void) +{ + return + __builtin_constant_p(constant_test_bit + (boot_cpu_data.x86_capability)) ? + constant_test_bit( +boot_cpu_data.x86_capability +) : + __static_cpu_has(154); +} + +static inline __attribute__ ((always_inline)) __attribute__ ((always_inline)) + __attribute__ ((pure)) +int use_fxsr(void) +{ + return + __builtin_constant_p(variable_test_bit + (24, + (unsigned long *)((&boot_cpu_data)-> + x86_capability))) ? + variable_test_bit(24, + (unsigned long *)((&boot_cpu_data)-> + x86_capability)) : + __static_cpu_has(24); +} + +static inline __attribute__ ((always_inline)) +void fpu_save_init(struct fpu *fpu) +{ + if (__builtin_constant_p(use_xsave())? use_xsave() : use_xsave()) { + if (__builtin_constant_p + (((!(fpu->state->xsave.xsave_hdr. + xstate_bv & 0x1)))) ? ! !((!(fpu->state->xsave. + xsave_hdr. + xstate_bv & 0x1))) : ( { + ! !((!(fpu->state->xsave.xsave_hdr.xstate_bv & 0x1)));} + )) + return; + } else if (use_fxsr()) { + } + if (__builtin_constant_p + ((((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) ? + ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + __builtin_expect(! ! + (fpu-> + state-> + fxsave. + swd + & (1 + << + 7)), + 1);} + )))))? + ! !(((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) ? + ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + __builtin_expect(! ! + (fpu-> + state-> + fxsave. + swd + & + (1 + << + 7)), + 1);} + )))): ( { + int ______r; + ______r = + ! !(((__builtin_constant_p(fpu->state->fxsave.swd & (1 << 7)) + ? ! !(fpu->state->fxsave.swd & (1 << 7)) : ( { + ______r = + __builtin_expect + (! ! + (fpu-> + state-> + fxsave. + swd & (1 + << + 7)), + 1);} + ))));} + )) + asm volatile ("fnclex"); +} + +static __attribute__ ((always_inline)) +void __save_init_fpu(void) +{ + fpu_save_init(0); +} + +static __attribute__ ((always_inline)) +void kernel_fpu_begin(void) +{ + __save_init_fpu(); +} + +static void aes_decrypt(void) +{ + if (!irq_fpu_usable()) + crypto_aes_decrypt_x86(0); + else + kernel_fpu_begin(); +} + +static struct crypto_alg aesni_alg = { + .cra_list = { &aesni_alg.cra_list }, + .cia_decrypt = aes_decrypt +}; + +static struct crypto_alg ablk_ecb_alg = { +}; + +int aesni_init(void) +{ + if (! !crypto_register_alg(&aesni_alg)) + crypto_unregister_alg(&ablk_ecb_alg); +} diff --git a/388835/reduce-ice b/388835/reduce-ice new file mode 100755 index 0000000..3383f36 --- /dev/null +++ b/388835/reduce-ice @@ -0,0 +1,13 @@ +#!/bin/bash +# +# Run like: +# multidelta -level=# ./reduce-ice $FILE +# levels: 0 0 1 1 2 2 10 10 +# + +FILE=aesni-intel_glue.i +CC=gcc-4.5.2 +CFLAGS="-m32 -O2" +STRING="internal compiler error: in move_insn, at haifa-sched.c:2314" + +$CC -pipe -c $CFLAGS $FILE 2>&1 | grep "$STRING" diff --git a/394889/foo.i b/394889/foo.i new file mode 100644 index 0000000..79dcb74 --- /dev/null +++ b/394889/foo.i @@ -0,0 +1,21465 @@ +# 1 "swrast/s_triangle.c" +# 1 "/mnt/alt/portage/media-libs/mesa-7.11/work/Mesa-7.11/src/mesa//" +# 1 "" +# 1 "" +# 1 "swrast/s_triangle.c" +# 32 "swrast/s_triangle.c" +# 1 "../../src/mesa/main/glheader.h" 1 +# 53 "../../src/mesa/main/glheader.h" +# 1 "../../include/GL/gl.h" 1 +# 155 "../../include/GL/gl.h" +typedef unsigned int GLenum; +typedef unsigned char GLboolean; +typedef unsigned int GLbitfield; +typedef void GLvoid; +typedef signed char GLbyte; +typedef short GLshort; +typedef int GLint; +typedef unsigned char GLubyte; +typedef unsigned short GLushort; +typedef unsigned int GLuint; +typedef int GLsizei; +typedef float GLfloat; +typedef float GLclampf; +typedef double GLdouble; +typedef double GLclampd; +# 782 "../../include/GL/gl.h" +__attribute__((visibility("default"))) void glClearIndex( GLfloat c ); + +__attribute__((visibility("default"))) void glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ); + +__attribute__((visibility("default"))) void glClear( GLbitfield mask ); + +__attribute__((visibility("default"))) void glIndexMask( GLuint mask ); + +__attribute__((visibility("default"))) void glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ); + +__attribute__((visibility("default"))) void glAlphaFunc( GLenum func, GLclampf ref ); + +__attribute__((visibility("default"))) void glBlendFunc( GLenum sfactor, GLenum dfactor ); + +__attribute__((visibility("default"))) void glLogicOp( GLenum opcode ); + +__attribute__((visibility("default"))) void glCullFace( GLenum mode ); + +__attribute__((visibility("default"))) void glFrontFace( GLenum mode ); + +__attribute__((visibility("default"))) void glPointSize( GLfloat size ); + +__attribute__((visibility("default"))) void glLineWidth( GLfloat width ); + +__attribute__((visibility("default"))) void glLineStipple( GLint factor, GLushort pattern ); + +__attribute__((visibility("default"))) void glPolygonMode( GLenum face, GLenum mode ); + +__attribute__((visibility("default"))) void glPolygonOffset( GLfloat factor, GLfloat units ); + +__attribute__((visibility("default"))) void glPolygonStipple( const GLubyte *mask ); + +__attribute__((visibility("default"))) void glGetPolygonStipple( GLubyte *mask ); + +__attribute__((visibility("default"))) void glEdgeFlag( GLboolean flag ); + +__attribute__((visibility("default"))) void glEdgeFlagv( const GLboolean *flag ); + +__attribute__((visibility("default"))) void glScissor( GLint x, GLint y, GLsizei width, GLsizei height); + +__attribute__((visibility("default"))) void glClipPlane( GLenum plane, const GLdouble *equation ); + +__attribute__((visibility("default"))) void glGetClipPlane( GLenum plane, GLdouble *equation ); + +__attribute__((visibility("default"))) void glDrawBuffer( GLenum mode ); + +__attribute__((visibility("default"))) void glReadBuffer( GLenum mode ); + +__attribute__((visibility("default"))) void glEnable( GLenum cap ); + +__attribute__((visibility("default"))) void glDisable( GLenum cap ); + +__attribute__((visibility("default"))) GLboolean glIsEnabled( GLenum cap ); + + +__attribute__((visibility("default"))) void glEnableClientState( GLenum cap ); + +__attribute__((visibility("default"))) void glDisableClientState( GLenum cap ); + + +__attribute__((visibility("default"))) void glGetBooleanv( GLenum pname, GLboolean *params ); + +__attribute__((visibility("default"))) void glGetDoublev( GLenum pname, GLdouble *params ); + +__attribute__((visibility("default"))) void glGetFloatv( GLenum pname, GLfloat *params ); + +__attribute__((visibility("default"))) void glGetIntegerv( GLenum pname, GLint *params ); + + +__attribute__((visibility("default"))) void glPushAttrib( GLbitfield mask ); + +__attribute__((visibility("default"))) void glPopAttrib( void ); + + +__attribute__((visibility("default"))) void glPushClientAttrib( GLbitfield mask ); + +__attribute__((visibility("default"))) void glPopClientAttrib( void ); + + +__attribute__((visibility("default"))) GLint glRenderMode( GLenum mode ); + +__attribute__((visibility("default"))) GLenum glGetError( void ); + +__attribute__((visibility("default"))) const GLubyte * glGetString( GLenum name ); + +__attribute__((visibility("default"))) void glFinish( void ); + +__attribute__((visibility("default"))) void glFlush( void ); + +__attribute__((visibility("default"))) void glHint( GLenum target, GLenum mode ); + + + + + + +__attribute__((visibility("default"))) void glClearDepth( GLclampd depth ); + +__attribute__((visibility("default"))) void glDepthFunc( GLenum func ); + +__attribute__((visibility("default"))) void glDepthMask( GLboolean flag ); + +__attribute__((visibility("default"))) void glDepthRange( GLclampd near_val, GLclampd far_val ); + + + + + + +__attribute__((visibility("default"))) void glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ); + +__attribute__((visibility("default"))) void glAccum( GLenum op, GLfloat value ); + + + + + + +__attribute__((visibility("default"))) void glMatrixMode( GLenum mode ); + +__attribute__((visibility("default"))) void glOrtho( GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, + GLdouble near_val, GLdouble far_val ); + +__attribute__((visibility("default"))) void glFrustum( GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, + GLdouble near_val, GLdouble far_val ); + +__attribute__((visibility("default"))) void glViewport( GLint x, GLint y, + GLsizei width, GLsizei height ); + +__attribute__((visibility("default"))) void glPushMatrix( void ); + +__attribute__((visibility("default"))) void glPopMatrix( void ); + +__attribute__((visibility("default"))) void glLoadIdentity( void ); + +__attribute__((visibility("default"))) void glLoadMatrixd( const GLdouble *m ); +__attribute__((visibility("default"))) void glLoadMatrixf( const GLfloat *m ); + +__attribute__((visibility("default"))) void glMultMatrixd( const GLdouble *m ); +__attribute__((visibility("default"))) void glMultMatrixf( const GLfloat *m ); + +__attribute__((visibility("default"))) void glRotated( GLdouble angle, + GLdouble x, GLdouble y, GLdouble z ); +__attribute__((visibility("default"))) void glRotatef( GLfloat angle, + GLfloat x, GLfloat y, GLfloat z ); + +__attribute__((visibility("default"))) void glScaled( GLdouble x, GLdouble y, GLdouble z ); +__attribute__((visibility("default"))) void glScalef( GLfloat x, GLfloat y, GLfloat z ); + +__attribute__((visibility("default"))) void glTranslated( GLdouble x, GLdouble y, GLdouble z ); +__attribute__((visibility("default"))) void glTranslatef( GLfloat x, GLfloat y, GLfloat z ); + + + + + + +__attribute__((visibility("default"))) GLboolean glIsList( GLuint list ); + +__attribute__((visibility("default"))) void glDeleteLists( GLuint list, GLsizei range ); + +__attribute__((visibility("default"))) GLuint glGenLists( GLsizei range ); + +__attribute__((visibility("default"))) void glNewList( GLuint list, GLenum mode ); + +__attribute__((visibility("default"))) void glEndList( void ); + +__attribute__((visibility("default"))) void glCallList( GLuint list ); + +__attribute__((visibility("default"))) void glCallLists( GLsizei n, GLenum type, + const GLvoid *lists ); + +__attribute__((visibility("default"))) void glListBase( GLuint base ); + + + + + + +__attribute__((visibility("default"))) void glBegin( GLenum mode ); + +__attribute__((visibility("default"))) void glEnd( void ); + + +__attribute__((visibility("default"))) void glVertex2d( GLdouble x, GLdouble y ); +__attribute__((visibility("default"))) void glVertex2f( GLfloat x, GLfloat y ); +__attribute__((visibility("default"))) void glVertex2i( GLint x, GLint y ); +__attribute__((visibility("default"))) void glVertex2s( GLshort x, GLshort y ); + +__attribute__((visibility("default"))) void glVertex3d( GLdouble x, GLdouble y, GLdouble z ); +__attribute__((visibility("default"))) void glVertex3f( GLfloat x, GLfloat y, GLfloat z ); +__attribute__((visibility("default"))) void glVertex3i( GLint x, GLint y, GLint z ); +__attribute__((visibility("default"))) void glVertex3s( GLshort x, GLshort y, GLshort z ); + +__attribute__((visibility("default"))) void glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w ); +__attribute__((visibility("default"))) void glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ); +__attribute__((visibility("default"))) void glVertex4i( GLint x, GLint y, GLint z, GLint w ); +__attribute__((visibility("default"))) void glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w ); + +__attribute__((visibility("default"))) void glVertex2dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glVertex2fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glVertex2iv( const GLint *v ); +__attribute__((visibility("default"))) void glVertex2sv( const GLshort *v ); + +__attribute__((visibility("default"))) void glVertex3dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glVertex3fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glVertex3iv( const GLint *v ); +__attribute__((visibility("default"))) void glVertex3sv( const GLshort *v ); + +__attribute__((visibility("default"))) void glVertex4dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glVertex4fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glVertex4iv( const GLint *v ); +__attribute__((visibility("default"))) void glVertex4sv( const GLshort *v ); + + +__attribute__((visibility("default"))) void glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz ); +__attribute__((visibility("default"))) void glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz ); +__attribute__((visibility("default"))) void glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz ); +__attribute__((visibility("default"))) void glNormal3i( GLint nx, GLint ny, GLint nz ); +__attribute__((visibility("default"))) void glNormal3s( GLshort nx, GLshort ny, GLshort nz ); + +__attribute__((visibility("default"))) void glNormal3bv( const GLbyte *v ); +__attribute__((visibility("default"))) void glNormal3dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glNormal3fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glNormal3iv( const GLint *v ); +__attribute__((visibility("default"))) void glNormal3sv( const GLshort *v ); + + +__attribute__((visibility("default"))) void glIndexd( GLdouble c ); +__attribute__((visibility("default"))) void glIndexf( GLfloat c ); +__attribute__((visibility("default"))) void glIndexi( GLint c ); +__attribute__((visibility("default"))) void glIndexs( GLshort c ); +__attribute__((visibility("default"))) void glIndexub( GLubyte c ); + +__attribute__((visibility("default"))) void glIndexdv( const GLdouble *c ); +__attribute__((visibility("default"))) void glIndexfv( const GLfloat *c ); +__attribute__((visibility("default"))) void glIndexiv( const GLint *c ); +__attribute__((visibility("default"))) void glIndexsv( const GLshort *c ); +__attribute__((visibility("default"))) void glIndexubv( const GLubyte *c ); + +__attribute__((visibility("default"))) void glColor3b( GLbyte red, GLbyte green, GLbyte blue ); +__attribute__((visibility("default"))) void glColor3d( GLdouble red, GLdouble green, GLdouble blue ); +__attribute__((visibility("default"))) void glColor3f( GLfloat red, GLfloat green, GLfloat blue ); +__attribute__((visibility("default"))) void glColor3i( GLint red, GLint green, GLint blue ); +__attribute__((visibility("default"))) void glColor3s( GLshort red, GLshort green, GLshort blue ); +__attribute__((visibility("default"))) void glColor3ub( GLubyte red, GLubyte green, GLubyte blue ); +__attribute__((visibility("default"))) void glColor3ui( GLuint red, GLuint green, GLuint blue ); +__attribute__((visibility("default"))) void glColor3us( GLushort red, GLushort green, GLushort blue ); + +__attribute__((visibility("default"))) void glColor4b( GLbyte red, GLbyte green, + GLbyte blue, GLbyte alpha ); +__attribute__((visibility("default"))) void glColor4d( GLdouble red, GLdouble green, + GLdouble blue, GLdouble alpha ); +__attribute__((visibility("default"))) void glColor4f( GLfloat red, GLfloat green, + GLfloat blue, GLfloat alpha ); +__attribute__((visibility("default"))) void glColor4i( GLint red, GLint green, + GLint blue, GLint alpha ); +__attribute__((visibility("default"))) void glColor4s( GLshort red, GLshort green, + GLshort blue, GLshort alpha ); +__attribute__((visibility("default"))) void glColor4ub( GLubyte red, GLubyte green, + GLubyte blue, GLubyte alpha ); +__attribute__((visibility("default"))) void glColor4ui( GLuint red, GLuint green, + GLuint blue, GLuint alpha ); +__attribute__((visibility("default"))) void glColor4us( GLushort red, GLushort green, + GLushort blue, GLushort alpha ); + + +__attribute__((visibility("default"))) void glColor3bv( const GLbyte *v ); +__attribute__((visibility("default"))) void glColor3dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glColor3fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glColor3iv( const GLint *v ); +__attribute__((visibility("default"))) void glColor3sv( const GLshort *v ); +__attribute__((visibility("default"))) void glColor3ubv( const GLubyte *v ); +__attribute__((visibility("default"))) void glColor3uiv( const GLuint *v ); +__attribute__((visibility("default"))) void glColor3usv( const GLushort *v ); + +__attribute__((visibility("default"))) void glColor4bv( const GLbyte *v ); +__attribute__((visibility("default"))) void glColor4dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glColor4fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glColor4iv( const GLint *v ); +__attribute__((visibility("default"))) void glColor4sv( const GLshort *v ); +__attribute__((visibility("default"))) void glColor4ubv( const GLubyte *v ); +__attribute__((visibility("default"))) void glColor4uiv( const GLuint *v ); +__attribute__((visibility("default"))) void glColor4usv( const GLushort *v ); + + +__attribute__((visibility("default"))) void glTexCoord1d( GLdouble s ); +__attribute__((visibility("default"))) void glTexCoord1f( GLfloat s ); +__attribute__((visibility("default"))) void glTexCoord1i( GLint s ); +__attribute__((visibility("default"))) void glTexCoord1s( GLshort s ); + +__attribute__((visibility("default"))) void glTexCoord2d( GLdouble s, GLdouble t ); +__attribute__((visibility("default"))) void glTexCoord2f( GLfloat s, GLfloat t ); +__attribute__((visibility("default"))) void glTexCoord2i( GLint s, GLint t ); +__attribute__((visibility("default"))) void glTexCoord2s( GLshort s, GLshort t ); + +__attribute__((visibility("default"))) void glTexCoord3d( GLdouble s, GLdouble t, GLdouble r ); +__attribute__((visibility("default"))) void glTexCoord3f( GLfloat s, GLfloat t, GLfloat r ); +__attribute__((visibility("default"))) void glTexCoord3i( GLint s, GLint t, GLint r ); +__attribute__((visibility("default"))) void glTexCoord3s( GLshort s, GLshort t, GLshort r ); + +__attribute__((visibility("default"))) void glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q ); +__attribute__((visibility("default"))) void glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q ); +__attribute__((visibility("default"))) void glTexCoord4i( GLint s, GLint t, GLint r, GLint q ); +__attribute__((visibility("default"))) void glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q ); + +__attribute__((visibility("default"))) void glTexCoord1dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glTexCoord1fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glTexCoord1iv( const GLint *v ); +__attribute__((visibility("default"))) void glTexCoord1sv( const GLshort *v ); + +__attribute__((visibility("default"))) void glTexCoord2dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glTexCoord2fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glTexCoord2iv( const GLint *v ); +__attribute__((visibility("default"))) void glTexCoord2sv( const GLshort *v ); + +__attribute__((visibility("default"))) void glTexCoord3dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glTexCoord3fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glTexCoord3iv( const GLint *v ); +__attribute__((visibility("default"))) void glTexCoord3sv( const GLshort *v ); + +__attribute__((visibility("default"))) void glTexCoord4dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glTexCoord4fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glTexCoord4iv( const GLint *v ); +__attribute__((visibility("default"))) void glTexCoord4sv( const GLshort *v ); + + +__attribute__((visibility("default"))) void glRasterPos2d( GLdouble x, GLdouble y ); +__attribute__((visibility("default"))) void glRasterPos2f( GLfloat x, GLfloat y ); +__attribute__((visibility("default"))) void glRasterPos2i( GLint x, GLint y ); +__attribute__((visibility("default"))) void glRasterPos2s( GLshort x, GLshort y ); + +__attribute__((visibility("default"))) void glRasterPos3d( GLdouble x, GLdouble y, GLdouble z ); +__attribute__((visibility("default"))) void glRasterPos3f( GLfloat x, GLfloat y, GLfloat z ); +__attribute__((visibility("default"))) void glRasterPos3i( GLint x, GLint y, GLint z ); +__attribute__((visibility("default"))) void glRasterPos3s( GLshort x, GLshort y, GLshort z ); + +__attribute__((visibility("default"))) void glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w ); +__attribute__((visibility("default"))) void glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ); +__attribute__((visibility("default"))) void glRasterPos4i( GLint x, GLint y, GLint z, GLint w ); +__attribute__((visibility("default"))) void glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w ); + +__attribute__((visibility("default"))) void glRasterPos2dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glRasterPos2fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glRasterPos2iv( const GLint *v ); +__attribute__((visibility("default"))) void glRasterPos2sv( const GLshort *v ); + +__attribute__((visibility("default"))) void glRasterPos3dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glRasterPos3fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glRasterPos3iv( const GLint *v ); +__attribute__((visibility("default"))) void glRasterPos3sv( const GLshort *v ); + +__attribute__((visibility("default"))) void glRasterPos4dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glRasterPos4fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glRasterPos4iv( const GLint *v ); +__attribute__((visibility("default"))) void glRasterPos4sv( const GLshort *v ); + + +__attribute__((visibility("default"))) void glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 ); +__attribute__((visibility("default"))) void glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 ); +__attribute__((visibility("default"))) void glRecti( GLint x1, GLint y1, GLint x2, GLint y2 ); +__attribute__((visibility("default"))) void glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 ); + + +__attribute__((visibility("default"))) void glRectdv( const GLdouble *v1, const GLdouble *v2 ); +__attribute__((visibility("default"))) void glRectfv( const GLfloat *v1, const GLfloat *v2 ); +__attribute__((visibility("default"))) void glRectiv( const GLint *v1, const GLint *v2 ); +__attribute__((visibility("default"))) void glRectsv( const GLshort *v1, const GLshort *v2 ); + + + + + + +__attribute__((visibility("default"))) void glVertexPointer( GLint size, GLenum type, + GLsizei stride, const GLvoid *ptr ); + +__attribute__((visibility("default"))) void glNormalPointer( GLenum type, GLsizei stride, + const GLvoid *ptr ); + +__attribute__((visibility("default"))) void glColorPointer( GLint size, GLenum type, + GLsizei stride, const GLvoid *ptr ); + +__attribute__((visibility("default"))) void glIndexPointer( GLenum type, GLsizei stride, + const GLvoid *ptr ); + +__attribute__((visibility("default"))) void glTexCoordPointer( GLint size, GLenum type, + GLsizei stride, const GLvoid *ptr ); + +__attribute__((visibility("default"))) void glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr ); + +__attribute__((visibility("default"))) void glGetPointerv( GLenum pname, GLvoid **params ); + +__attribute__((visibility("default"))) void glArrayElement( GLint i ); + +__attribute__((visibility("default"))) void glDrawArrays( GLenum mode, GLint first, GLsizei count ); + +__attribute__((visibility("default"))) void glDrawElements( GLenum mode, GLsizei count, + GLenum type, const GLvoid *indices ); + +__attribute__((visibility("default"))) void glInterleavedArrays( GLenum format, GLsizei stride, + const GLvoid *pointer ); + + + + + +__attribute__((visibility("default"))) void glShadeModel( GLenum mode ); + +__attribute__((visibility("default"))) void glLightf( GLenum light, GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glLighti( GLenum light, GLenum pname, GLint param ); +__attribute__((visibility("default"))) void glLightfv( GLenum light, GLenum pname, + const GLfloat *params ); +__attribute__((visibility("default"))) void glLightiv( GLenum light, GLenum pname, + const GLint *params ); + +__attribute__((visibility("default"))) void glGetLightfv( GLenum light, GLenum pname, + GLfloat *params ); +__attribute__((visibility("default"))) void glGetLightiv( GLenum light, GLenum pname, + GLint *params ); + +__attribute__((visibility("default"))) void glLightModelf( GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glLightModeli( GLenum pname, GLint param ); +__attribute__((visibility("default"))) void glLightModelfv( GLenum pname, const GLfloat *params ); +__attribute__((visibility("default"))) void glLightModeliv( GLenum pname, const GLint *params ); + +__attribute__((visibility("default"))) void glMaterialf( GLenum face, GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glMateriali( GLenum face, GLenum pname, GLint param ); +__attribute__((visibility("default"))) void glMaterialfv( GLenum face, GLenum pname, const GLfloat *params ); +__attribute__((visibility("default"))) void glMaterialiv( GLenum face, GLenum pname, const GLint *params ); + +__attribute__((visibility("default"))) void glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params ); +__attribute__((visibility("default"))) void glGetMaterialiv( GLenum face, GLenum pname, GLint *params ); + +__attribute__((visibility("default"))) void glColorMaterial( GLenum face, GLenum mode ); + + + + + + +__attribute__((visibility("default"))) void glPixelZoom( GLfloat xfactor, GLfloat yfactor ); + +__attribute__((visibility("default"))) void glPixelStoref( GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glPixelStorei( GLenum pname, GLint param ); + +__attribute__((visibility("default"))) void glPixelTransferf( GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glPixelTransferi( GLenum pname, GLint param ); + +__attribute__((visibility("default"))) void glPixelMapfv( GLenum map, GLsizei mapsize, + const GLfloat *values ); +__attribute__((visibility("default"))) void glPixelMapuiv( GLenum map, GLsizei mapsize, + const GLuint *values ); +__attribute__((visibility("default"))) void glPixelMapusv( GLenum map, GLsizei mapsize, + const GLushort *values ); + +__attribute__((visibility("default"))) void glGetPixelMapfv( GLenum map, GLfloat *values ); +__attribute__((visibility("default"))) void glGetPixelMapuiv( GLenum map, GLuint *values ); +__attribute__((visibility("default"))) void glGetPixelMapusv( GLenum map, GLushort *values ); + +__attribute__((visibility("default"))) void glBitmap( GLsizei width, GLsizei height, + GLfloat xorig, GLfloat yorig, + GLfloat xmove, GLfloat ymove, + const GLubyte *bitmap ); + +__attribute__((visibility("default"))) void glReadPixels( GLint x, GLint y, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + GLvoid *pixels ); + +__attribute__((visibility("default"))) void glDrawPixels( GLsizei width, GLsizei height, + GLenum format, GLenum type, + const GLvoid *pixels ); + +__attribute__((visibility("default"))) void glCopyPixels( GLint x, GLint y, + GLsizei width, GLsizei height, + GLenum type ); + + + + + +__attribute__((visibility("default"))) void glStencilFunc( GLenum func, GLint ref, GLuint mask ); + +__attribute__((visibility("default"))) void glStencilMask( GLuint mask ); + +__attribute__((visibility("default"))) void glStencilOp( GLenum fail, GLenum zfail, GLenum zpass ); + +__attribute__((visibility("default"))) void glClearStencil( GLint s ); + + + + + + + +__attribute__((visibility("default"))) void glTexGend( GLenum coord, GLenum pname, GLdouble param ); +__attribute__((visibility("default"))) void glTexGenf( GLenum coord, GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glTexGeni( GLenum coord, GLenum pname, GLint param ); + +__attribute__((visibility("default"))) void glTexGendv( GLenum coord, GLenum pname, const GLdouble *params ); +__attribute__((visibility("default"))) void glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params ); +__attribute__((visibility("default"))) void glTexGeniv( GLenum coord, GLenum pname, const GLint *params ); + +__attribute__((visibility("default"))) void glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params ); +__attribute__((visibility("default"))) void glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ); +__attribute__((visibility("default"))) void glGetTexGeniv( GLenum coord, GLenum pname, GLint *params ); + + +__attribute__((visibility("default"))) void glTexEnvf( GLenum target, GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glTexEnvi( GLenum target, GLenum pname, GLint param ); + +__attribute__((visibility("default"))) void glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params ); +__attribute__((visibility("default"))) void glTexEnviv( GLenum target, GLenum pname, const GLint *params ); + +__attribute__((visibility("default"))) void glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params ); +__attribute__((visibility("default"))) void glGetTexEnviv( GLenum target, GLenum pname, GLint *params ); + + +__attribute__((visibility("default"))) void glTexParameterf( GLenum target, GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glTexParameteri( GLenum target, GLenum pname, GLint param ); + +__attribute__((visibility("default"))) void glTexParameterfv( GLenum target, GLenum pname, + const GLfloat *params ); +__attribute__((visibility("default"))) void glTexParameteriv( GLenum target, GLenum pname, + const GLint *params ); + +__attribute__((visibility("default"))) void glGetTexParameterfv( GLenum target, + GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetTexParameteriv( GLenum target, + GLenum pname, GLint *params ); + +__attribute__((visibility("default"))) void glGetTexLevelParameterfv( GLenum target, GLint level, + GLenum pname, GLfloat *params ); +__attribute__((visibility("default"))) void glGetTexLevelParameteriv( GLenum target, GLint level, + GLenum pname, GLint *params ); + + +__attribute__((visibility("default"))) void glTexImage1D( GLenum target, GLint level, + GLint internalFormat, + GLsizei width, GLint border, + GLenum format, GLenum type, + const GLvoid *pixels ); + +__attribute__((visibility("default"))) void glTexImage2D( GLenum target, GLint level, + GLint internalFormat, + GLsizei width, GLsizei height, + GLint border, GLenum format, GLenum type, + const GLvoid *pixels ); + +__attribute__((visibility("default"))) void glGetTexImage( GLenum target, GLint level, + GLenum format, GLenum type, + GLvoid *pixels ); + + + + +__attribute__((visibility("default"))) void glGenTextures( GLsizei n, GLuint *textures ); + +__attribute__((visibility("default"))) void glDeleteTextures( GLsizei n, const GLuint *textures); + +__attribute__((visibility("default"))) void glBindTexture( GLenum target, GLuint texture ); + +__attribute__((visibility("default"))) void glPrioritizeTextures( GLsizei n, + const GLuint *textures, + const GLclampf *priorities ); + +__attribute__((visibility("default"))) GLboolean glAreTexturesResident( GLsizei n, + const GLuint *textures, + GLboolean *residences ); + +__attribute__((visibility("default"))) GLboolean glIsTexture( GLuint texture ); + + +__attribute__((visibility("default"))) void glTexSubImage1D( GLenum target, GLint level, + GLint xoffset, + GLsizei width, GLenum format, + GLenum type, const GLvoid *pixels ); + + +__attribute__((visibility("default"))) void glTexSubImage2D( GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const GLvoid *pixels ); + + +__attribute__((visibility("default"))) void glCopyTexImage1D( GLenum target, GLint level, + GLenum internalformat, + GLint x, GLint y, + GLsizei width, GLint border ); + + +__attribute__((visibility("default"))) void glCopyTexImage2D( GLenum target, GLint level, + GLenum internalformat, + GLint x, GLint y, + GLsizei width, GLsizei height, + GLint border ); + + +__attribute__((visibility("default"))) void glCopyTexSubImage1D( GLenum target, GLint level, + GLint xoffset, GLint x, GLint y, + GLsizei width ); + + +__attribute__((visibility("default"))) void glCopyTexSubImage2D( GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint x, GLint y, + GLsizei width, GLsizei height ); + + + + + + +__attribute__((visibility("default"))) void glMap1d( GLenum target, GLdouble u1, GLdouble u2, + GLint stride, + GLint order, const GLdouble *points ); +__attribute__((visibility("default"))) void glMap1f( GLenum target, GLfloat u1, GLfloat u2, + GLint stride, + GLint order, const GLfloat *points ); + +__attribute__((visibility("default"))) void glMap2d( GLenum target, + GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, + GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, + const GLdouble *points ); +__attribute__((visibility("default"))) void glMap2f( GLenum target, + GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, + GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, + const GLfloat *points ); + +__attribute__((visibility("default"))) void glGetMapdv( GLenum target, GLenum query, GLdouble *v ); +__attribute__((visibility("default"))) void glGetMapfv( GLenum target, GLenum query, GLfloat *v ); +__attribute__((visibility("default"))) void glGetMapiv( GLenum target, GLenum query, GLint *v ); + +__attribute__((visibility("default"))) void glEvalCoord1d( GLdouble u ); +__attribute__((visibility("default"))) void glEvalCoord1f( GLfloat u ); + +__attribute__((visibility("default"))) void glEvalCoord1dv( const GLdouble *u ); +__attribute__((visibility("default"))) void glEvalCoord1fv( const GLfloat *u ); + +__attribute__((visibility("default"))) void glEvalCoord2d( GLdouble u, GLdouble v ); +__attribute__((visibility("default"))) void glEvalCoord2f( GLfloat u, GLfloat v ); + +__attribute__((visibility("default"))) void glEvalCoord2dv( const GLdouble *u ); +__attribute__((visibility("default"))) void glEvalCoord2fv( const GLfloat *u ); + +__attribute__((visibility("default"))) void glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 ); +__attribute__((visibility("default"))) void glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 ); + +__attribute__((visibility("default"))) void glMapGrid2d( GLint un, GLdouble u1, GLdouble u2, + GLint vn, GLdouble v1, GLdouble v2 ); +__attribute__((visibility("default"))) void glMapGrid2f( GLint un, GLfloat u1, GLfloat u2, + GLint vn, GLfloat v1, GLfloat v2 ); + +__attribute__((visibility("default"))) void glEvalPoint1( GLint i ); + +__attribute__((visibility("default"))) void glEvalPoint2( GLint i, GLint j ); + +__attribute__((visibility("default"))) void glEvalMesh1( GLenum mode, GLint i1, GLint i2 ); + +__attribute__((visibility("default"))) void glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ); + + + + + + +__attribute__((visibility("default"))) void glFogf( GLenum pname, GLfloat param ); + +__attribute__((visibility("default"))) void glFogi( GLenum pname, GLint param ); + +__attribute__((visibility("default"))) void glFogfv( GLenum pname, const GLfloat *params ); + +__attribute__((visibility("default"))) void glFogiv( GLenum pname, const GLint *params ); + + + + + + +__attribute__((visibility("default"))) void glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer ); + +__attribute__((visibility("default"))) void glPassThrough( GLfloat token ); + +__attribute__((visibility("default"))) void glSelectBuffer( GLsizei size, GLuint *buffer ); + +__attribute__((visibility("default"))) void glInitNames( void ); + +__attribute__((visibility("default"))) void glLoadName( GLuint name ); + +__attribute__((visibility("default"))) void glPushName( GLuint name ); + +__attribute__((visibility("default"))) void glPopName( void ); +# 1527 "../../include/GL/gl.h" +__attribute__((visibility("default"))) void glDrawRangeElements( GLenum mode, GLuint start, + GLuint end, GLsizei count, GLenum type, const GLvoid *indices ); + +__attribute__((visibility("default"))) void glTexImage3D( GLenum target, GLint level, + GLint internalFormat, + GLsizei width, GLsizei height, + GLsizei depth, GLint border, + GLenum format, GLenum type, + const GLvoid *pixels ); + +__attribute__((visibility("default"))) void glTexSubImage3D( GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, + GLenum format, + GLenum type, const GLvoid *pixels); + +__attribute__((visibility("default"))) void glCopyTexSubImage3D( GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint zoffset, GLint x, + GLint y, GLsizei width, + GLsizei height ); + +typedef void ( * PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); +typedef void ( * PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +# 1637 "../../include/GL/gl.h" +__attribute__((visibility("default"))) void glColorTable( GLenum target, GLenum internalformat, + GLsizei width, GLenum format, + GLenum type, const GLvoid *table ); + +__attribute__((visibility("default"))) void glColorSubTable( GLenum target, + GLsizei start, GLsizei count, + GLenum format, GLenum type, + const GLvoid *data ); + +__attribute__((visibility("default"))) void glColorTableParameteriv(GLenum target, GLenum pname, + const GLint *params); + +__attribute__((visibility("default"))) void glColorTableParameterfv(GLenum target, GLenum pname, + const GLfloat *params); + +__attribute__((visibility("default"))) void glCopyColorSubTable( GLenum target, GLsizei start, + GLint x, GLint y, GLsizei width ); + +__attribute__((visibility("default"))) void glCopyColorTable( GLenum target, GLenum internalformat, + GLint x, GLint y, GLsizei width ); + +__attribute__((visibility("default"))) void glGetColorTable( GLenum target, GLenum format, + GLenum type, GLvoid *table ); + +__attribute__((visibility("default"))) void glGetColorTableParameterfv( GLenum target, GLenum pname, + GLfloat *params ); + +__attribute__((visibility("default"))) void glGetColorTableParameteriv( GLenum target, GLenum pname, + GLint *params ); + +__attribute__((visibility("default"))) void glBlendEquation( GLenum mode ); + +__attribute__((visibility("default"))) void glBlendColor( GLclampf red, GLclampf green, + GLclampf blue, GLclampf alpha ); + +__attribute__((visibility("default"))) void glHistogram( GLenum target, GLsizei width, + GLenum internalformat, GLboolean sink ); + +__attribute__((visibility("default"))) void glResetHistogram( GLenum target ); + +__attribute__((visibility("default"))) void glGetHistogram( GLenum target, GLboolean reset, + GLenum format, GLenum type, + GLvoid *values ); + +__attribute__((visibility("default"))) void glGetHistogramParameterfv( GLenum target, GLenum pname, + GLfloat *params ); + +__attribute__((visibility("default"))) void glGetHistogramParameteriv( GLenum target, GLenum pname, + GLint *params ); + +__attribute__((visibility("default"))) void glMinmax( GLenum target, GLenum internalformat, + GLboolean sink ); + +__attribute__((visibility("default"))) void glResetMinmax( GLenum target ); + +__attribute__((visibility("default"))) void glGetMinmax( GLenum target, GLboolean reset, + GLenum format, GLenum types, + GLvoid *values ); + +__attribute__((visibility("default"))) void glGetMinmaxParameterfv( GLenum target, GLenum pname, + GLfloat *params ); + +__attribute__((visibility("default"))) void glGetMinmaxParameteriv( GLenum target, GLenum pname, + GLint *params ); + +__attribute__((visibility("default"))) void glConvolutionFilter1D( GLenum target, + GLenum internalformat, GLsizei width, GLenum format, GLenum type, + const GLvoid *image ); + +__attribute__((visibility("default"))) void glConvolutionFilter2D( GLenum target, + GLenum internalformat, GLsizei width, GLsizei height, GLenum format, + GLenum type, const GLvoid *image ); + +__attribute__((visibility("default"))) void glConvolutionParameterf( GLenum target, GLenum pname, + GLfloat params ); + +__attribute__((visibility("default"))) void glConvolutionParameterfv( GLenum target, GLenum pname, + const GLfloat *params ); + +__attribute__((visibility("default"))) void glConvolutionParameteri( GLenum target, GLenum pname, + GLint params ); + +__attribute__((visibility("default"))) void glConvolutionParameteriv( GLenum target, GLenum pname, + const GLint *params ); + +__attribute__((visibility("default"))) void glCopyConvolutionFilter1D( GLenum target, + GLenum internalformat, GLint x, GLint y, GLsizei width ); + +__attribute__((visibility("default"))) void glCopyConvolutionFilter2D( GLenum target, + GLenum internalformat, GLint x, GLint y, GLsizei width, + GLsizei height); + +__attribute__((visibility("default"))) void glGetConvolutionFilter( GLenum target, GLenum format, + GLenum type, GLvoid *image ); + +__attribute__((visibility("default"))) void glGetConvolutionParameterfv( GLenum target, GLenum pname, + GLfloat *params ); + +__attribute__((visibility("default"))) void glGetConvolutionParameteriv( GLenum target, GLenum pname, + GLint *params ); + +__attribute__((visibility("default"))) void glSeparableFilter2D( GLenum target, + GLenum internalformat, GLsizei width, GLsizei height, GLenum format, + GLenum type, const GLvoid *row, const GLvoid *column ); + +__attribute__((visibility("default"))) void glGetSeparableFilter( GLenum target, GLenum format, + GLenum type, GLvoid *row, GLvoid *column, GLvoid *span ); + +typedef void ( * PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +typedef void ( * PFNGLBLENDEQUATIONPROC) (GLenum mode); +# 1859 "../../include/GL/gl.h" +__attribute__((visibility("default"))) void glActiveTexture( GLenum texture ); + +__attribute__((visibility("default"))) void glClientActiveTexture( GLenum texture ); + +__attribute__((visibility("default"))) void glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data ); + +__attribute__((visibility("default"))) void glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data ); + +__attribute__((visibility("default"))) void glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data ); + +__attribute__((visibility("default"))) void glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data ); + +__attribute__((visibility("default"))) void glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data ); + +__attribute__((visibility("default"))) void glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data ); + +__attribute__((visibility("default"))) void glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img ); + +__attribute__((visibility("default"))) void glMultiTexCoord1d( GLenum target, GLdouble s ); + +__attribute__((visibility("default"))) void glMultiTexCoord1dv( GLenum target, const GLdouble *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord1f( GLenum target, GLfloat s ); + +__attribute__((visibility("default"))) void glMultiTexCoord1fv( GLenum target, const GLfloat *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord1i( GLenum target, GLint s ); + +__attribute__((visibility("default"))) void glMultiTexCoord1iv( GLenum target, const GLint *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord1s( GLenum target, GLshort s ); + +__attribute__((visibility("default"))) void glMultiTexCoord1sv( GLenum target, const GLshort *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t ); + +__attribute__((visibility("default"))) void glMultiTexCoord2dv( GLenum target, const GLdouble *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t ); + +__attribute__((visibility("default"))) void glMultiTexCoord2fv( GLenum target, const GLfloat *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord2i( GLenum target, GLint s, GLint t ); + +__attribute__((visibility("default"))) void glMultiTexCoord2iv( GLenum target, const GLint *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord2s( GLenum target, GLshort s, GLshort t ); + +__attribute__((visibility("default"))) void glMultiTexCoord2sv( GLenum target, const GLshort *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r ); + +__attribute__((visibility("default"))) void glMultiTexCoord3dv( GLenum target, const GLdouble *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r ); + +__attribute__((visibility("default"))) void glMultiTexCoord3fv( GLenum target, const GLfloat *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r ); + +__attribute__((visibility("default"))) void glMultiTexCoord3iv( GLenum target, const GLint *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r ); + +__attribute__((visibility("default"))) void glMultiTexCoord3sv( GLenum target, const GLshort *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q ); + +__attribute__((visibility("default"))) void glMultiTexCoord4dv( GLenum target, const GLdouble *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ); + +__attribute__((visibility("default"))) void glMultiTexCoord4fv( GLenum target, const GLfloat *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q ); + +__attribute__((visibility("default"))) void glMultiTexCoord4iv( GLenum target, const GLint *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q ); + +__attribute__((visibility("default"))) void glMultiTexCoord4sv( GLenum target, const GLshort *v ); + + +__attribute__((visibility("default"))) void glLoadTransposeMatrixd( const GLdouble m[16] ); + +__attribute__((visibility("default"))) void glLoadTransposeMatrixf( const GLfloat m[16] ); + +__attribute__((visibility("default"))) void glMultTransposeMatrixd( const GLdouble m[16] ); + +__attribute__((visibility("default"))) void glMultTransposeMatrixf( const GLfloat m[16] ); + +__attribute__((visibility("default"))) void glSampleCoverage( GLclampf value, GLboolean invert ); + + +typedef void ( * PFNGLACTIVETEXTUREPROC) (GLenum texture); +typedef void ( * PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert); +typedef void ( * PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img); +# 2007 "../../include/GL/gl.h" +__attribute__((visibility("default"))) void glActiveTextureARB(GLenum texture); +__attribute__((visibility("default"))) void glClientActiveTextureARB(GLenum texture); +__attribute__((visibility("default"))) void glMultiTexCoord1dARB(GLenum target, GLdouble s); +__attribute__((visibility("default"))) void glMultiTexCoord1dvARB(GLenum target, const GLdouble *v); +__attribute__((visibility("default"))) void glMultiTexCoord1fARB(GLenum target, GLfloat s); +__attribute__((visibility("default"))) void glMultiTexCoord1fvARB(GLenum target, const GLfloat *v); +__attribute__((visibility("default"))) void glMultiTexCoord1iARB(GLenum target, GLint s); +__attribute__((visibility("default"))) void glMultiTexCoord1ivARB(GLenum target, const GLint *v); +__attribute__((visibility("default"))) void glMultiTexCoord1sARB(GLenum target, GLshort s); +__attribute__((visibility("default"))) void glMultiTexCoord1svARB(GLenum target, const GLshort *v); +__attribute__((visibility("default"))) void glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t); +__attribute__((visibility("default"))) void glMultiTexCoord2dvARB(GLenum target, const GLdouble *v); +__attribute__((visibility("default"))) void glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t); +__attribute__((visibility("default"))) void glMultiTexCoord2fvARB(GLenum target, const GLfloat *v); +__attribute__((visibility("default"))) void glMultiTexCoord2iARB(GLenum target, GLint s, GLint t); +__attribute__((visibility("default"))) void glMultiTexCoord2ivARB(GLenum target, const GLint *v); +__attribute__((visibility("default"))) void glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t); +__attribute__((visibility("default"))) void glMultiTexCoord2svARB(GLenum target, const GLshort *v); +__attribute__((visibility("default"))) void glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r); +__attribute__((visibility("default"))) void glMultiTexCoord3dvARB(GLenum target, const GLdouble *v); +__attribute__((visibility("default"))) void glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r); +__attribute__((visibility("default"))) void glMultiTexCoord3fvARB(GLenum target, const GLfloat *v); +__attribute__((visibility("default"))) void glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r); +__attribute__((visibility("default"))) void glMultiTexCoord3ivARB(GLenum target, const GLint *v); +__attribute__((visibility("default"))) void glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r); +__attribute__((visibility("default"))) void glMultiTexCoord3svARB(GLenum target, const GLshort *v); +__attribute__((visibility("default"))) void glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +__attribute__((visibility("default"))) void glMultiTexCoord4dvARB(GLenum target, const GLdouble *v); +__attribute__((visibility("default"))) void glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +__attribute__((visibility("default"))) void glMultiTexCoord4fvARB(GLenum target, const GLfloat *v); +__attribute__((visibility("default"))) void glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q); +__attribute__((visibility("default"))) void glMultiTexCoord4ivARB(GLenum target, const GLint *v); +__attribute__((visibility("default"))) void glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +__attribute__((visibility("default"))) void glMultiTexCoord4svARB(GLenum target, const GLshort *v); + +typedef void ( * PFNGLACTIVETEXTUREARBPROC) (GLenum texture); +typedef void ( * PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); +typedef void ( * PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); +typedef void ( * PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); +typedef void ( * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); +typedef void ( * PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); +typedef void ( * PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); +typedef void ( * PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); +typedef void ( * PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); +typedef void ( * PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); +typedef void ( * PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void ( * PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); +typedef void ( * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void ( * PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); +typedef void ( * PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); +typedef void ( * PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); +typedef void ( * PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); +typedef void ( * PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); +typedef void ( * PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void ( * PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); +typedef void ( * PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void ( * PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); +typedef void ( * PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void ( * PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); +typedef void ( * PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void ( * PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); +typedef void ( * PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void ( * PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); +typedef void ( * PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void ( * PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); +typedef void ( * PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void ( * PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); +typedef void ( * PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void ( * PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); +# 2091 "../../include/GL/gl.h" +# 1 "../../include/GL/glext.h" 1 +# 5064 "../../include/GL/glext.h" +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 149 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stddef.h" 3 4 +typedef int ptrdiff_t; +# 211 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stddef.h" 3 4 +typedef unsigned int size_t; +# 323 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stddef.h" 3 4 +typedef long int wchar_t; +# 5065 "../../include/GL/glext.h" 2 + + +typedef char GLchar; + + + + +typedef ptrdiff_t GLintptr; +typedef ptrdiff_t GLsizeiptr; + + + + +typedef ptrdiff_t GLintptrARB; +typedef ptrdiff_t GLsizeiptrARB; + + + + +typedef char GLcharARB; +typedef unsigned int GLhandleARB; + + + + +typedef unsigned short GLhalfARB; + + + +typedef unsigned short GLhalfNV; +# 5103 "../../include/GL/glext.h" +# 1 "/usr/include/inttypes.h" 1 3 4 +# 26 "/usr/include/inttypes.h" 3 4 +# 1 "/usr/include/features.h" 1 3 4 +# 357 "/usr/include/features.h" 3 4 +# 1 "/usr/include/sys/cdefs.h" 1 3 4 +# 353 "/usr/include/sys/cdefs.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 354 "/usr/include/sys/cdefs.h" 2 3 4 +# 358 "/usr/include/features.h" 2 3 4 +# 381 "/usr/include/features.h" 3 4 +# 1 "/usr/include/gnu/stubs.h" 1 3 4 +# 382 "/usr/include/features.h" 2 3 4 +# 27 "/usr/include/inttypes.h" 2 3 4 + +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stdint.h" 1 3 4 + + +# 1 "/usr/include/stdint.h" 1 3 4 +# 27 "/usr/include/stdint.h" 3 4 +# 1 "/usr/include/bits/wchar.h" 1 3 4 +# 28 "/usr/include/stdint.h" 2 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 29 "/usr/include/stdint.h" 2 3 4 +# 37 "/usr/include/stdint.h" 3 4 +typedef signed char int8_t; +typedef short int int16_t; +typedef int int32_t; + + + +__extension__ +typedef long long int int64_t; + + + + +typedef unsigned char uint8_t; +typedef unsigned short int uint16_t; + +typedef unsigned int uint32_t; + + + + + +__extension__ +typedef unsigned long long int uint64_t; + + + + + + +typedef signed char int_least8_t; +typedef short int int_least16_t; +typedef int int_least32_t; + + + +__extension__ +typedef long long int int_least64_t; + + + +typedef unsigned char uint_least8_t; +typedef unsigned short int uint_least16_t; +typedef unsigned int uint_least32_t; + + + +__extension__ +typedef unsigned long long int uint_least64_t; + + + + + + +typedef signed char int_fast8_t; + + + + + +typedef int int_fast16_t; +typedef int int_fast32_t; +__extension__ +typedef long long int int_fast64_t; + + + +typedef unsigned char uint_fast8_t; + + + + + +typedef unsigned int uint_fast16_t; +typedef unsigned int uint_fast32_t; +__extension__ +typedef unsigned long long int uint_fast64_t; +# 126 "/usr/include/stdint.h" 3 4 +typedef int intptr_t; + + +typedef unsigned int uintptr_t; +# 138 "/usr/include/stdint.h" 3 4 +__extension__ +typedef long long int intmax_t; +__extension__ +typedef unsigned long long int uintmax_t; +# 4 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stdint.h" 2 3 4 +# 29 "/usr/include/inttypes.h" 2 3 4 + + + + + + +typedef long int __gwchar_t; +# 274 "/usr/include/inttypes.h" 3 4 + +# 288 "/usr/include/inttypes.h" 3 4 +typedef struct + { + long long int quot; + long long int rem; + } imaxdiv_t; + + + + + +extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern intmax_t strtoimax (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) __attribute__ ((__nothrow__)); + + +extern uintmax_t strtoumax (__const char *__restrict __nptr, + char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__)); + + +extern intmax_t wcstoimax (__const __gwchar_t *__restrict __nptr, + __gwchar_t **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)); + + +extern uintmax_t wcstoumax (__const __gwchar_t *__restrict __nptr, + __gwchar_t ** __restrict __endptr, int __base) + __attribute__ ((__nothrow__)); +# 379 "/usr/include/inttypes.h" 3 4 +__extension__ +extern long long int __strtoll_internal (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__gnu_inline__)) intmax_t +__attribute__ ((__nothrow__)) strtoimax (__const char *__restrict nptr, char **__restrict endptr, int base) + +{ + return __strtoll_internal (nptr, endptr, base, 0); +} + +__extension__ +extern unsigned long long int __strtoull_internal (__const char * + __restrict __nptr, + char ** + __restrict __endptr, + int __base, + int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__gnu_inline__)) uintmax_t +__attribute__ ((__nothrow__)) strtoumax (__const char *__restrict nptr, char **__restrict endptr, int base) + +{ + return __strtoull_internal (nptr, endptr, base, 0); +} + +__extension__ +extern long long int __wcstoll_internal (__const __gwchar_t * + __restrict __nptr, + __gwchar_t **__restrict __endptr, + int __base, int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__gnu_inline__)) intmax_t +__attribute__ ((__nothrow__)) wcstoimax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) + +{ + return __wcstoll_internal (nptr, endptr, base, 0); +} + + +__extension__ +extern unsigned long long int __wcstoull_internal (__const __gwchar_t * + __restrict __nptr, + __gwchar_t ** + __restrict __endptr, + int __base, + int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__gnu_inline__)) uintmax_t +__attribute__ ((__nothrow__)) wcstoumax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) + +{ + return __wcstoull_internal (nptr, endptr, base, 0); +} + + + + + +# 5104 "../../include/GL/glext.h" 2 +# 5136 "../../include/GL/glext.h" +typedef int64_t GLint64EXT; +typedef uint64_t GLuint64EXT; + + + +typedef int64_t GLint64; +typedef uint64_t GLuint64; +typedef struct __GLsync *GLsync; + + + + +struct _cl_context; +struct _cl_event; + + + +typedef void ( *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); + + + +typedef void ( *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); + + + +typedef GLintptr GLvdpauSurfaceNV; +# 5185 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +__attribute__((visibility("default"))) void glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glGetColorTable (GLenum target, GLenum format, GLenum type, GLvoid *table); +__attribute__((visibility("default"))) void glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +__attribute__((visibility("default"))) void glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +__attribute__((visibility("default"))) void glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +__attribute__((visibility("default"))) void glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params); +__attribute__((visibility("default"))) void glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glConvolutionParameteri (GLenum target, GLenum pname, GLint params); +__attribute__((visibility("default"))) void glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, GLvoid *image); +__attribute__((visibility("default"))) void glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetSeparableFilter (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +__attribute__((visibility("default"))) void glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); +__attribute__((visibility("default"))) void glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +__attribute__((visibility("default"))) void glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +__attribute__((visibility("default"))) void glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +__attribute__((visibility("default"))) void glMinmax (GLenum target, GLenum internalformat, GLboolean sink); +__attribute__((visibility("default"))) void glResetHistogram (GLenum target); +__attribute__((visibility("default"))) void glResetMinmax (GLenum target); + +typedef void ( * PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +typedef void ( * PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); +typedef void ( * PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +typedef void ( * PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +typedef void ( * PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +typedef void ( * PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); +typedef void ( * PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); +typedef void ( * PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void ( * PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); +typedef void ( * PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +typedef void ( * PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); +typedef void ( * PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void ( * PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void ( * PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +typedef void ( * PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); +typedef void ( * PFNGLRESETHISTOGRAMPROC) (GLenum target); +typedef void ( * PFNGLRESETMINMAXPROC) (GLenum target); +# 5279 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glClientActiveTexture (GLenum texture); +__attribute__((visibility("default"))) void glMultiTexCoord1d (GLenum target, GLdouble s); +__attribute__((visibility("default"))) void glMultiTexCoord1dv (GLenum target, const GLdouble *v); +__attribute__((visibility("default"))) void glMultiTexCoord1f (GLenum target, GLfloat s); +__attribute__((visibility("default"))) void glMultiTexCoord1fv (GLenum target, const GLfloat *v); +__attribute__((visibility("default"))) void glMultiTexCoord1i (GLenum target, GLint s); +__attribute__((visibility("default"))) void glMultiTexCoord1iv (GLenum target, const GLint *v); +__attribute__((visibility("default"))) void glMultiTexCoord1s (GLenum target, GLshort s); +__attribute__((visibility("default"))) void glMultiTexCoord1sv (GLenum target, const GLshort *v); +__attribute__((visibility("default"))) void glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t); +__attribute__((visibility("default"))) void glMultiTexCoord2dv (GLenum target, const GLdouble *v); +__attribute__((visibility("default"))) void glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t); +__attribute__((visibility("default"))) void glMultiTexCoord2fv (GLenum target, const GLfloat *v); +__attribute__((visibility("default"))) void glMultiTexCoord2i (GLenum target, GLint s, GLint t); +__attribute__((visibility("default"))) void glMultiTexCoord2iv (GLenum target, const GLint *v); +__attribute__((visibility("default"))) void glMultiTexCoord2s (GLenum target, GLshort s, GLshort t); +__attribute__((visibility("default"))) void glMultiTexCoord2sv (GLenum target, const GLshort *v); +__attribute__((visibility("default"))) void glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r); +__attribute__((visibility("default"))) void glMultiTexCoord3dv (GLenum target, const GLdouble *v); +__attribute__((visibility("default"))) void glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r); +__attribute__((visibility("default"))) void glMultiTexCoord3fv (GLenum target, const GLfloat *v); +__attribute__((visibility("default"))) void glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r); +__attribute__((visibility("default"))) void glMultiTexCoord3iv (GLenum target, const GLint *v); +__attribute__((visibility("default"))) void glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r); +__attribute__((visibility("default"))) void glMultiTexCoord3sv (GLenum target, const GLshort *v); +__attribute__((visibility("default"))) void glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +__attribute__((visibility("default"))) void glMultiTexCoord4dv (GLenum target, const GLdouble *v); +__attribute__((visibility("default"))) void glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +__attribute__((visibility("default"))) void glMultiTexCoord4fv (GLenum target, const GLfloat *v); +__attribute__((visibility("default"))) void glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q); +__attribute__((visibility("default"))) void glMultiTexCoord4iv (GLenum target, const GLint *v); +__attribute__((visibility("default"))) void glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +__attribute__((visibility("default"))) void glMultiTexCoord4sv (GLenum target, const GLshort *v); +__attribute__((visibility("default"))) void glLoadTransposeMatrixf (const GLfloat *m); +__attribute__((visibility("default"))) void glLoadTransposeMatrixd (const GLdouble *m); +__attribute__((visibility("default"))) void glMultTransposeMatrixf (const GLfloat *m); +__attribute__((visibility("default"))) void glMultTransposeMatrixd (const GLdouble *m); + +typedef void ( * PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); +typedef void ( * PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); +typedef void ( * PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v); +typedef void ( * PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); +typedef void ( * PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v); +typedef void ( * PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); +typedef void ( * PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v); +typedef void ( * PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); +typedef void ( * PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v); +typedef void ( * PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void ( * PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v); +typedef void ( * PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void ( * PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v); +typedef void ( * PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); +typedef void ( * PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v); +typedef void ( * PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); +typedef void ( * PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v); +typedef void ( * PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void ( * PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v); +typedef void ( * PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void ( * PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v); +typedef void ( * PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void ( * PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v); +typedef void ( * PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void ( * PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v); +typedef void ( * PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void ( * PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v); +typedef void ( * PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void ( * PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v); +typedef void ( * PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void ( * PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v); +typedef void ( * PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void ( * PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v); +typedef void ( * PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m); +typedef void ( * PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m); +typedef void ( * PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m); +typedef void ( * PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m); + + + + + +__attribute__((visibility("default"))) void glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +__attribute__((visibility("default"))) void glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +__attribute__((visibility("default"))) void glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); +__attribute__((visibility("default"))) void glPointParameterf (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glPointParameterfv (GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glPointParameteri (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glPointParameteriv (GLenum pname, const GLint *params); + +typedef void ( * PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void ( * PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void ( * PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); +typedef void ( * PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); +typedef void ( * PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params); +typedef void ( * PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param); +typedef void ( * PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params); + + + + + +__attribute__((visibility("default"))) void glFogCoordf (GLfloat coord); +__attribute__((visibility("default"))) void glFogCoordfv (const GLfloat *coord); +__attribute__((visibility("default"))) void glFogCoordd (GLdouble coord); +__attribute__((visibility("default"))) void glFogCoorddv (const GLdouble *coord); +__attribute__((visibility("default"))) void glFogCoordPointer (GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue); +__attribute__((visibility("default"))) void glSecondaryColor3bv (const GLbyte *v); +__attribute__((visibility("default"))) void glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue); +__attribute__((visibility("default"))) void glSecondaryColor3dv (const GLdouble *v); +__attribute__((visibility("default"))) void glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue); +__attribute__((visibility("default"))) void glSecondaryColor3fv (const GLfloat *v); +__attribute__((visibility("default"))) void glSecondaryColor3i (GLint red, GLint green, GLint blue); +__attribute__((visibility("default"))) void glSecondaryColor3iv (const GLint *v); +__attribute__((visibility("default"))) void glSecondaryColor3s (GLshort red, GLshort green, GLshort blue); +__attribute__((visibility("default"))) void glSecondaryColor3sv (const GLshort *v); +__attribute__((visibility("default"))) void glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue); +__attribute__((visibility("default"))) void glSecondaryColor3ubv (const GLubyte *v); +__attribute__((visibility("default"))) void glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue); +__attribute__((visibility("default"))) void glSecondaryColor3uiv (const GLuint *v); +__attribute__((visibility("default"))) void glSecondaryColor3us (GLushort red, GLushort green, GLushort blue); +__attribute__((visibility("default"))) void glSecondaryColor3usv (const GLushort *v); +__attribute__((visibility("default"))) void glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glWindowPos2d (GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glWindowPos2dv (const GLdouble *v); +__attribute__((visibility("default"))) void glWindowPos2f (GLfloat x, GLfloat y); +__attribute__((visibility("default"))) void glWindowPos2fv (const GLfloat *v); +__attribute__((visibility("default"))) void glWindowPos2i (GLint x, GLint y); +__attribute__((visibility("default"))) void glWindowPos2iv (const GLint *v); +__attribute__((visibility("default"))) void glWindowPos2s (GLshort x, GLshort y); +__attribute__((visibility("default"))) void glWindowPos2sv (const GLshort *v); +__attribute__((visibility("default"))) void glWindowPos3d (GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glWindowPos3dv (const GLdouble *v); +__attribute__((visibility("default"))) void glWindowPos3f (GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glWindowPos3fv (const GLfloat *v); +__attribute__((visibility("default"))) void glWindowPos3i (GLint x, GLint y, GLint z); +__attribute__((visibility("default"))) void glWindowPos3iv (const GLint *v); +__attribute__((visibility("default"))) void glWindowPos3s (GLshort x, GLshort y, GLshort z); +__attribute__((visibility("default"))) void glWindowPos3sv (const GLshort *v); + +typedef void ( * PFNGLFOGCOORDFPROC) (GLfloat coord); +typedef void ( * PFNGLFOGCOORDFVPROC) (const GLfloat *coord); +typedef void ( * PFNGLFOGCOORDDPROC) (GLdouble coord); +typedef void ( * PFNGLFOGCOORDDVPROC) (const GLdouble *coord); +typedef void ( * PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void ( * PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v); +typedef void ( * PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void ( * PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v); +typedef void ( * PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void ( * PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v); +typedef void ( * PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue); +typedef void ( * PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v); +typedef void ( * PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue); +typedef void ( * PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v); +typedef void ( * PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void ( * PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v); +typedef void ( * PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue); +typedef void ( * PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v); +typedef void ( * PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue); +typedef void ( * PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v); +typedef void ( * PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y); +typedef void ( * PFNGLWINDOWPOS2DVPROC) (const GLdouble *v); +typedef void ( * PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y); +typedef void ( * PFNGLWINDOWPOS2FVPROC) (const GLfloat *v); +typedef void ( * PFNGLWINDOWPOS2IPROC) (GLint x, GLint y); +typedef void ( * PFNGLWINDOWPOS2IVPROC) (const GLint *v); +typedef void ( * PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y); +typedef void ( * PFNGLWINDOWPOS2SVPROC) (const GLshort *v); +typedef void ( * PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLWINDOWPOS3DVPROC) (const GLdouble *v); +typedef void ( * PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLWINDOWPOS3FVPROC) (const GLfloat *v); +typedef void ( * PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z); +typedef void ( * PFNGLWINDOWPOS3IVPROC) (const GLint *v); +typedef void ( * PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z); +typedef void ( * PFNGLWINDOWPOS3SVPROC) (const GLshort *v); + + + + + +__attribute__((visibility("default"))) void glGenQueries (GLsizei n, GLuint *ids); +__attribute__((visibility("default"))) void glDeleteQueries (GLsizei n, const GLuint *ids); +__attribute__((visibility("default"))) GLboolean glIsQuery (GLuint id); +__attribute__((visibility("default"))) void glBeginQuery (GLenum target, GLuint id); +__attribute__((visibility("default"))) void glEndQuery (GLenum target); +__attribute__((visibility("default"))) void glGetQueryiv (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glBindBuffer (GLenum target, GLuint buffer); +__attribute__((visibility("default"))) void glDeleteBuffers (GLsizei n, const GLuint *buffers); +__attribute__((visibility("default"))) void glGenBuffers (GLsizei n, GLuint *buffers); +__attribute__((visibility("default"))) GLboolean glIsBuffer (GLuint buffer); +__attribute__((visibility("default"))) void glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); +__attribute__((visibility("default"))) void glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); +__attribute__((visibility("default"))) void glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data); +__attribute__((visibility("default"))) GLvoid* glMapBuffer (GLenum target, GLenum access); +__attribute__((visibility("default"))) GLboolean glUnmapBuffer (GLenum target); +__attribute__((visibility("default"))) void glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetBufferPointerv (GLenum target, GLenum pname, GLvoid* *params); + +typedef void ( * PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); +typedef void ( * PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean ( * PFNGLISQUERYPROC) (GLuint id); +typedef void ( * PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); +typedef void ( * PFNGLENDQUERYPROC) (GLenum target); +typedef void ( * PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void ( * PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); +typedef void ( * PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); +typedef void ( * PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); +typedef void ( * PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); +typedef GLboolean ( * PFNGLISBUFFERPROC) (GLuint buffer); +typedef void ( * PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); +typedef void ( * PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); +typedef void ( * PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data); +typedef GLvoid* ( * PFNGLMAPBUFFERPROC) (GLenum target, GLenum access); +typedef GLboolean ( * PFNGLUNMAPBUFFERPROC) (GLenum target); +typedef void ( * PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params); + + + + + +__attribute__((visibility("default"))) void glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); +__attribute__((visibility("default"))) void glDrawBuffers (GLsizei n, const GLenum *bufs); +__attribute__((visibility("default"))) void glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +__attribute__((visibility("default"))) void glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); +__attribute__((visibility("default"))) void glStencilMaskSeparate (GLenum face, GLuint mask); +__attribute__((visibility("default"))) void glAttachShader (GLuint program, GLuint shader); +__attribute__((visibility("default"))) void glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); +__attribute__((visibility("default"))) void glCompileShader (GLuint shader); +__attribute__((visibility("default"))) GLuint glCreateProgram (void); +__attribute__((visibility("default"))) GLuint glCreateShader (GLenum type); +__attribute__((visibility("default"))) void glDeleteProgram (GLuint program); +__attribute__((visibility("default"))) void glDeleteShader (GLuint shader); +__attribute__((visibility("default"))) void glDetachShader (GLuint program, GLuint shader); +__attribute__((visibility("default"))) void glDisableVertexAttribArray (GLuint index); +__attribute__((visibility("default"))) void glEnableVertexAttribArray (GLuint index); +__attribute__((visibility("default"))) void glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +__attribute__((visibility("default"))) void glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +__attribute__((visibility("default"))) void glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj); +__attribute__((visibility("default"))) GLint glGetAttribLocation (GLuint program, const GLchar *name); +__attribute__((visibility("default"))) void glGetProgramiv (GLuint program, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +__attribute__((visibility("default"))) void glGetShaderiv (GLuint shader, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +__attribute__((visibility("default"))) void glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +__attribute__((visibility("default"))) GLint glGetUniformLocation (GLuint program, const GLchar *name); +__attribute__((visibility("default"))) void glGetUniformfv (GLuint program, GLint location, GLfloat *params); +__attribute__((visibility("default"))) void glGetUniformiv (GLuint program, GLint location, GLint *params); +__attribute__((visibility("default"))) void glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) void glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid* *pointer); +__attribute__((visibility("default"))) GLboolean glIsProgram (GLuint program); +__attribute__((visibility("default"))) GLboolean glIsShader (GLuint shader); +__attribute__((visibility("default"))) void glLinkProgram (GLuint program); +__attribute__((visibility("default"))) void glShaderSource (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length); +__attribute__((visibility("default"))) void glUseProgram (GLuint program); +__attribute__((visibility("default"))) void glUniform1f (GLint location, GLfloat v0); +__attribute__((visibility("default"))) void glUniform2f (GLint location, GLfloat v0, GLfloat v1); +__attribute__((visibility("default"))) void glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +__attribute__((visibility("default"))) void glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +__attribute__((visibility("default"))) void glUniform1i (GLint location, GLint v0); +__attribute__((visibility("default"))) void glUniform2i (GLint location, GLint v0, GLint v1); +__attribute__((visibility("default"))) void glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); +__attribute__((visibility("default"))) void glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +__attribute__((visibility("default"))) void glUniform1fv (GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glUniform2fv (GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glUniform3fv (GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glUniform4fv (GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glUniform1iv (GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glUniform2iv (GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glUniform3iv (GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glUniform4iv (GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glValidateProgram (GLuint program); +__attribute__((visibility("default"))) void glVertexAttrib1d (GLuint index, GLdouble x); +__attribute__((visibility("default"))) void glVertexAttrib1dv (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib1f (GLuint index, GLfloat x); +__attribute__((visibility("default"))) void glVertexAttrib1fv (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib1s (GLuint index, GLshort x); +__attribute__((visibility("default"))) void glVertexAttrib1sv (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glVertexAttrib2dv (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); +__attribute__((visibility("default"))) void glVertexAttrib2fv (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib2s (GLuint index, GLshort x, GLshort y); +__attribute__((visibility("default"))) void glVertexAttrib2sv (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glVertexAttrib3dv (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glVertexAttrib3fv (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z); +__attribute__((visibility("default"))) void glVertexAttrib3sv (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib4Nbv (GLuint index, const GLbyte *v); +__attribute__((visibility("default"))) void glVertexAttrib4Niv (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttrib4Nsv (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +__attribute__((visibility("default"))) void glVertexAttrib4Nubv (GLuint index, const GLubyte *v); +__attribute__((visibility("default"))) void glVertexAttrib4Nuiv (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttrib4Nusv (GLuint index, const GLushort *v); +__attribute__((visibility("default"))) void glVertexAttrib4bv (GLuint index, const GLbyte *v); +__attribute__((visibility("default"))) void glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glVertexAttrib4dv (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glVertexAttrib4fv (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib4iv (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +__attribute__((visibility("default"))) void glVertexAttrib4sv (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib4ubv (GLuint index, const GLubyte *v); +__attribute__((visibility("default"))) void glVertexAttrib4uiv (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttrib4usv (GLuint index, const GLushort *v); +__attribute__((visibility("default"))) void glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); + +typedef void ( * PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); +typedef void ( * PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); +typedef void ( * PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void ( * PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); +typedef void ( * PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); +typedef void ( * PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); +typedef void ( * PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); +typedef void ( * PFNGLCOMPILESHADERPROC) (GLuint shader); +typedef GLuint ( * PFNGLCREATEPROGRAMPROC) (void); +typedef GLuint ( * PFNGLCREATESHADERPROC) (GLenum type); +typedef void ( * PFNGLDELETEPROGRAMPROC) (GLuint program); +typedef void ( * PFNGLDELETESHADERPROC) (GLuint shader); +typedef void ( * PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); +typedef void ( * PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void ( * PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void ( * PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void ( * PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void ( * PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj); +typedef GLint ( * PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void ( * PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); +typedef void ( * PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void ( * PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); +typedef void ( * PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void ( * PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +typedef GLint ( * PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void ( * PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); +typedef void ( * PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); +typedef void ( * PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void ( * PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); +typedef GLboolean ( * PFNGLISPROGRAMPROC) (GLuint program); +typedef GLboolean ( * PFNGLISSHADERPROC) (GLuint shader); +typedef void ( * PFNGLLINKPROGRAMPROC) (GLuint program); +typedef void ( * PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length); +typedef void ( * PFNGLUSEPROGRAMPROC) (GLuint program); +typedef void ( * PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); +typedef void ( * PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void ( * PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void ( * PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void ( * PFNGLUNIFORM1IPROC) (GLint location, GLint v0); +typedef void ( * PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); +typedef void ( * PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void ( * PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void ( * PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLVALIDATEPROGRAMPROC) (GLuint program); +typedef void ( * PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x); +typedef void ( * PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); +typedef void ( * PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x); +typedef void ( * PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void ( * PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void ( * PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y); +typedef void ( * PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void ( * PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v); +typedef void ( * PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void ( * PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v); +typedef void ( * PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v); +typedef void ( * PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v); +typedef void ( * PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void ( * PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v); +typedef void ( * PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v); +typedef void ( * PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); + + + + + +__attribute__((visibility("default"))) void glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); + +typedef void ( * PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +# 5719 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +__attribute__((visibility("default"))) void glGetBooleani_v (GLenum target, GLuint index, GLboolean *data); +__attribute__((visibility("default"))) void glGetIntegeri_v (GLenum target, GLuint index, GLint *data); +__attribute__((visibility("default"))) void glEnablei (GLenum target, GLuint index); +__attribute__((visibility("default"))) void glDisablei (GLenum target, GLuint index); +__attribute__((visibility("default"))) GLboolean glIsEnabledi (GLenum target, GLuint index); +__attribute__((visibility("default"))) void glBeginTransformFeedback (GLenum primitiveMode); +__attribute__((visibility("default"))) void glEndTransformFeedback (void); +__attribute__((visibility("default"))) void glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +__attribute__((visibility("default"))) void glBindBufferBase (GLenum target, GLuint index, GLuint buffer); +__attribute__((visibility("default"))) void glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); +__attribute__((visibility("default"))) void glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +__attribute__((visibility("default"))) void glClampColor (GLenum target, GLenum clamp); +__attribute__((visibility("default"))) void glBeginConditionalRender (GLuint id, GLenum mode); +__attribute__((visibility("default"))) void glEndConditionalRender (void); +__attribute__((visibility("default"))) void glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glVertexAttribI1i (GLuint index, GLint x); +__attribute__((visibility("default"))) void glVertexAttribI2i (GLuint index, GLint x, GLint y); +__attribute__((visibility("default"))) void glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z); +__attribute__((visibility("default"))) void glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); +__attribute__((visibility("default"))) void glVertexAttribI1ui (GLuint index, GLuint x); +__attribute__((visibility("default"))) void glVertexAttribI2ui (GLuint index, GLuint x, GLuint y); +__attribute__((visibility("default"))) void glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z); +__attribute__((visibility("default"))) void glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +__attribute__((visibility("default"))) void glVertexAttribI1iv (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttribI2iv (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttribI3iv (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttribI4iv (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttribI1uiv (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttribI2uiv (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttribI3uiv (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttribI4uiv (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttribI4bv (GLuint index, const GLbyte *v); +__attribute__((visibility("default"))) void glVertexAttribI4sv (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttribI4ubv (GLuint index, const GLubyte *v); +__attribute__((visibility("default"))) void glVertexAttribI4usv (GLuint index, const GLushort *v); +__attribute__((visibility("default"))) void glGetUniformuiv (GLuint program, GLint location, GLuint *params); +__attribute__((visibility("default"))) void glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name); +__attribute__((visibility("default"))) GLint glGetFragDataLocation (GLuint program, const GLchar *name); +__attribute__((visibility("default"))) void glUniform1ui (GLint location, GLuint v0); +__attribute__((visibility("default"))) void glUniform2ui (GLint location, GLuint v0, GLuint v1); +__attribute__((visibility("default"))) void glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); +__attribute__((visibility("default"))) void glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +__attribute__((visibility("default"))) void glUniform1uiv (GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glUniform2uiv (GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glUniform3uiv (GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glUniform4uiv (GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glTexParameterIiv (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params); +__attribute__((visibility("default"))) void glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value); +__attribute__((visibility("default"))) void glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value); +__attribute__((visibility("default"))) void glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value); +__attribute__((visibility("default"))) void glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +__attribute__((visibility("default"))) const GLubyte * glGetStringi (GLenum name, GLuint index); + +typedef void ( * PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +typedef void ( * PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data); +typedef void ( * PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); +typedef void ( * PFNGLENABLEIPROC) (GLenum target, GLuint index); +typedef void ( * PFNGLDISABLEIPROC) (GLenum target, GLuint index); +typedef GLboolean ( * PFNGLISENABLEDIPROC) (GLenum target, GLuint index); +typedef void ( * PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode); +typedef void ( * PFNGLENDTRANSFORMFEEDBACKPROC) (void); +typedef void ( * PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void ( * PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void ( * PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); +typedef void ( * PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +typedef void ( * PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp); +typedef void ( * PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode); +typedef void ( * PFNGLENDCONDITIONALRENDERPROC) (void); +typedef void ( * PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params); +typedef void ( * PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x); +typedef void ( * PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y); +typedef void ( * PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z); +typedef void ( * PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void ( * PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x); +typedef void ( * PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y); +typedef void ( * PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z); +typedef void ( * PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void ( * PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v); +typedef void ( * PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v); +typedef void ( * PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v); +typedef void ( * PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params); +typedef void ( * PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name); +typedef GLint ( * PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name); +typedef void ( * PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0); +typedef void ( * PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1); +typedef void ( * PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void ( * PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void ( * PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params); +typedef void ( * PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params); +typedef void ( * PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value); +typedef void ( * PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value); +typedef void ( * PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value); +typedef void ( * PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +typedef const GLubyte * ( * PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); +# 5844 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +__attribute__((visibility("default"))) void glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +__attribute__((visibility("default"))) void glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer); +__attribute__((visibility("default"))) void glPrimitiveRestartIndex (GLuint index); + +typedef void ( * PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +typedef void ( * PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +typedef void ( * PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer); +typedef void ( * PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index); +# 5863 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); +__attribute__((visibility("default"))) void glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); +__attribute__((visibility("default"))) void glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level); + +typedef void ( * PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); +typedef void ( * PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params); +typedef void ( * PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +# 5885 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glVertexAttribDivisor (GLuint index, GLuint divisor); + +typedef void ( * PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); +# 5905 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glMinSampleShading (GLclampf value); +__attribute__((visibility("default"))) void glBlendEquationi (GLuint buf, GLenum mode); +__attribute__((visibility("default"))) void glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +__attribute__((visibility("default"))) void glBlendFunci (GLuint buf, GLenum src, GLenum dst); +__attribute__((visibility("default"))) void glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); + +typedef void ( * PFNGLMINSAMPLESHADINGPROC) (GLclampf value); +typedef void ( * PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode); +typedef void ( * PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void ( * PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void ( * PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +# 6006 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glLoadTransposeMatrixfARB (const GLfloat *m); +__attribute__((visibility("default"))) void glLoadTransposeMatrixdARB (const GLdouble *m); +__attribute__((visibility("default"))) void glMultTransposeMatrixfARB (const GLfloat *m); +__attribute__((visibility("default"))) void glMultTransposeMatrixdARB (const GLdouble *m); + +typedef void ( * PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); +typedef void ( * PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); +typedef void ( * PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); +typedef void ( * PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); + + + + + +__attribute__((visibility("default"))) void glSampleCoverageARB (GLclampf value, GLboolean invert); + +typedef void ( * PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert); +# 6036 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glCompressedTexImage3DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); +__attribute__((visibility("default"))) void glCompressedTexImage2DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +__attribute__((visibility("default"))) void glCompressedTexImage1DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); +__attribute__((visibility("default"))) void glCompressedTexSubImage3DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); +__attribute__((visibility("default"))) void glCompressedTexSubImage2DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +__attribute__((visibility("default"))) void glCompressedTexSubImage1DARB (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); +__attribute__((visibility("default"))) void glGetCompressedTexImageARB (GLenum target, GLint level, GLvoid *img); + +typedef void ( * PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img); +# 6060 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glPointParameterfARB (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glPointParameterfvARB (GLenum pname, const GLfloat *params); + +typedef void ( * PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param); +typedef void ( * PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params); + + + + + +__attribute__((visibility("default"))) void glWeightbvARB (GLint size, const GLbyte *weights); +__attribute__((visibility("default"))) void glWeightsvARB (GLint size, const GLshort *weights); +__attribute__((visibility("default"))) void glWeightivARB (GLint size, const GLint *weights); +__attribute__((visibility("default"))) void glWeightfvARB (GLint size, const GLfloat *weights); +__attribute__((visibility("default"))) void glWeightdvARB (GLint size, const GLdouble *weights); +__attribute__((visibility("default"))) void glWeightubvARB (GLint size, const GLubyte *weights); +__attribute__((visibility("default"))) void glWeightusvARB (GLint size, const GLushort *weights); +__attribute__((visibility("default"))) void glWeightuivARB (GLint size, const GLuint *weights); +__attribute__((visibility("default"))) void glWeightPointerARB (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glVertexBlendARB (GLint count); + +typedef void ( * PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights); +typedef void ( * PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights); +typedef void ( * PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights); +typedef void ( * PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights); +typedef void ( * PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights); +typedef void ( * PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights); +typedef void ( * PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights); +typedef void ( * PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights); +typedef void ( * PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLVERTEXBLENDARBPROC) (GLint count); + + + + + +__attribute__((visibility("default"))) void glCurrentPaletteMatrixARB (GLint index); +__attribute__((visibility("default"))) void glMatrixIndexubvARB (GLint size, const GLubyte *indices); +__attribute__((visibility("default"))) void glMatrixIndexusvARB (GLint size, const GLushort *indices); +__attribute__((visibility("default"))) void glMatrixIndexuivARB (GLint size, const GLuint *indices); +__attribute__((visibility("default"))) void glMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); + +typedef void ( * PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index); +typedef void ( * PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices); +typedef void ( * PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices); +typedef void ( * PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices); +typedef void ( * PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +# 6140 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glWindowPos2dARB (GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glWindowPos2dvARB (const GLdouble *v); +__attribute__((visibility("default"))) void glWindowPos2fARB (GLfloat x, GLfloat y); +__attribute__((visibility("default"))) void glWindowPos2fvARB (const GLfloat *v); +__attribute__((visibility("default"))) void glWindowPos2iARB (GLint x, GLint y); +__attribute__((visibility("default"))) void glWindowPos2ivARB (const GLint *v); +__attribute__((visibility("default"))) void glWindowPos2sARB (GLshort x, GLshort y); +__attribute__((visibility("default"))) void glWindowPos2svARB (const GLshort *v); +__attribute__((visibility("default"))) void glWindowPos3dARB (GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glWindowPos3dvARB (const GLdouble *v); +__attribute__((visibility("default"))) void glWindowPos3fARB (GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glWindowPos3fvARB (const GLfloat *v); +__attribute__((visibility("default"))) void glWindowPos3iARB (GLint x, GLint y, GLint z); +__attribute__((visibility("default"))) void glWindowPos3ivARB (const GLint *v); +__attribute__((visibility("default"))) void glWindowPos3sARB (GLshort x, GLshort y, GLshort z); +__attribute__((visibility("default"))) void glWindowPos3svARB (const GLshort *v); + +typedef void ( * PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y); +typedef void ( * PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v); +typedef void ( * PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y); +typedef void ( * PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v); +typedef void ( * PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y); +typedef void ( * PFNGLWINDOWPOS2IVARBPROC) (const GLint *v); +typedef void ( * PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y); +typedef void ( * PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v); +typedef void ( * PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v); +typedef void ( * PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v); +typedef void ( * PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z); +typedef void ( * PFNGLWINDOWPOS3IVARBPROC) (const GLint *v); +typedef void ( * PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z); +typedef void ( * PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v); + + + + + +__attribute__((visibility("default"))) void glVertexAttrib1dARB (GLuint index, GLdouble x); +__attribute__((visibility("default"))) void glVertexAttrib1dvARB (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib1fARB (GLuint index, GLfloat x); +__attribute__((visibility("default"))) void glVertexAttrib1fvARB (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib1sARB (GLuint index, GLshort x); +__attribute__((visibility("default"))) void glVertexAttrib1svARB (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib2dARB (GLuint index, GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glVertexAttrib2dvARB (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib2fARB (GLuint index, GLfloat x, GLfloat y); +__attribute__((visibility("default"))) void glVertexAttrib2fvARB (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib2sARB (GLuint index, GLshort x, GLshort y); +__attribute__((visibility("default"))) void glVertexAttrib2svARB (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib3dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glVertexAttrib3dvARB (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib3fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glVertexAttrib3fvARB (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib3sARB (GLuint index, GLshort x, GLshort y, GLshort z); +__attribute__((visibility("default"))) void glVertexAttrib3svARB (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib4NbvARB (GLuint index, const GLbyte *v); +__attribute__((visibility("default"))) void glVertexAttrib4NivARB (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttrib4NsvARB (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib4NubARB (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +__attribute__((visibility("default"))) void glVertexAttrib4NubvARB (GLuint index, const GLubyte *v); +__attribute__((visibility("default"))) void glVertexAttrib4NuivARB (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttrib4NusvARB (GLuint index, const GLushort *v); +__attribute__((visibility("default"))) void glVertexAttrib4bvARB (GLuint index, const GLbyte *v); +__attribute__((visibility("default"))) void glVertexAttrib4dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glVertexAttrib4dvARB (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib4fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glVertexAttrib4fvARB (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib4ivARB (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttrib4sARB (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +__attribute__((visibility("default"))) void glVertexAttrib4svARB (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib4ubvARB (GLuint index, const GLubyte *v); +__attribute__((visibility("default"))) void glVertexAttrib4uivARB (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttrib4usvARB (GLuint index, const GLushort *v); +__attribute__((visibility("default"))) void glVertexAttribPointerARB (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glEnableVertexAttribArrayARB (GLuint index); +__attribute__((visibility("default"))) void glDisableVertexAttribArrayARB (GLuint index); +__attribute__((visibility("default"))) void glProgramStringARB (GLenum target, GLenum format, GLsizei len, const GLvoid *string); +__attribute__((visibility("default"))) void glBindProgramARB (GLenum target, GLuint program); +__attribute__((visibility("default"))) void glDeleteProgramsARB (GLsizei n, const GLuint *programs); +__attribute__((visibility("default"))) void glGenProgramsARB (GLsizei n, GLuint *programs); +__attribute__((visibility("default"))) void glProgramEnvParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glProgramEnvParameter4dvARB (GLenum target, GLuint index, const GLdouble *params); +__attribute__((visibility("default"))) void glProgramEnvParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glProgramEnvParameter4fvARB (GLenum target, GLuint index, const GLfloat *params); +__attribute__((visibility("default"))) void glProgramLocalParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glProgramLocalParameter4dvARB (GLenum target, GLuint index, const GLdouble *params); +__attribute__((visibility("default"))) void glProgramLocalParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glProgramLocalParameter4fvARB (GLenum target, GLuint index, const GLfloat *params); +__attribute__((visibility("default"))) void glGetProgramEnvParameterdvARB (GLenum target, GLuint index, GLdouble *params); +__attribute__((visibility("default"))) void glGetProgramEnvParameterfvARB (GLenum target, GLuint index, GLfloat *params); +__attribute__((visibility("default"))) void glGetProgramLocalParameterdvARB (GLenum target, GLuint index, GLdouble *params); +__attribute__((visibility("default"))) void glGetProgramLocalParameterfvARB (GLenum target, GLuint index, GLfloat *params); +__attribute__((visibility("default"))) void glGetProgramivARB (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetProgramStringARB (GLenum target, GLenum pname, GLvoid *string); +__attribute__((visibility("default"))) void glGetVertexAttribdvARB (GLuint index, GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) void glGetVertexAttribfvARB (GLuint index, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetVertexAttribivARB (GLuint index, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVertexAttribPointervARB (GLuint index, GLenum pname, GLvoid* *pointer); +__attribute__((visibility("default"))) GLboolean glIsProgramARB (GLuint program); + +typedef void ( * PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x); +typedef void ( * PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x); +typedef void ( * PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x); +typedef void ( * PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void ( * PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void ( * PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y); +typedef void ( * PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void ( * PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v); +typedef void ( * PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void ( * PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v); +typedef void ( * PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v); +typedef void ( * PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v); +typedef void ( * PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void ( * PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v); +typedef void ( * PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v); +typedef void ( * PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); +typedef void ( * PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); +typedef void ( * PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string); +typedef void ( * PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); +typedef void ( * PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs); +typedef void ( * PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs); +typedef void ( * PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); +typedef void ( * PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); +typedef void ( * PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); +typedef void ( * PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); +typedef void ( * PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); +typedef void ( * PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); +typedef void ( * PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); +typedef void ( * PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); +typedef void ( * PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string); +typedef void ( * PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void ( * PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer); +typedef GLboolean ( * PFNGLISPROGRAMARBPROC) (GLuint program); +# 6313 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glBindBufferARB (GLenum target, GLuint buffer); +__attribute__((visibility("default"))) void glDeleteBuffersARB (GLsizei n, const GLuint *buffers); +__attribute__((visibility("default"))) void glGenBuffersARB (GLsizei n, GLuint *buffers); +__attribute__((visibility("default"))) GLboolean glIsBufferARB (GLuint buffer); +__attribute__((visibility("default"))) void glBufferDataARB (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); +__attribute__((visibility("default"))) void glBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); +__attribute__((visibility("default"))) void glGetBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); +__attribute__((visibility("default"))) GLvoid* glMapBufferARB (GLenum target, GLenum access); +__attribute__((visibility("default"))) GLboolean glUnmapBufferARB (GLenum target); +__attribute__((visibility("default"))) void glGetBufferParameterivARB (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetBufferPointervARB (GLenum target, GLenum pname, GLvoid* *params); + +typedef void ( * PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer); +typedef void ( * PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers); +typedef void ( * PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers); +typedef GLboolean ( * PFNGLISBUFFERARBPROC) (GLuint buffer); +typedef void ( * PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); +typedef void ( * PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); +typedef void ( * PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); +typedef GLvoid* ( * PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access); +typedef GLboolean ( * PFNGLUNMAPBUFFERARBPROC) (GLenum target); +typedef void ( * PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params); + + + + + +__attribute__((visibility("default"))) void glGenQueriesARB (GLsizei n, GLuint *ids); +__attribute__((visibility("default"))) void glDeleteQueriesARB (GLsizei n, const GLuint *ids); +__attribute__((visibility("default"))) GLboolean glIsQueryARB (GLuint id); +__attribute__((visibility("default"))) void glBeginQueryARB (GLenum target, GLuint id); +__attribute__((visibility("default"))) void glEndQueryARB (GLenum target); +__attribute__((visibility("default"))) void glGetQueryivARB (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetQueryObjectivARB (GLuint id, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetQueryObjectuivARB (GLuint id, GLenum pname, GLuint *params); + +typedef void ( * PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids); +typedef void ( * PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean ( * PFNGLISQUERYARBPROC) (GLuint id); +typedef void ( * PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id); +typedef void ( * PFNGLENDQUERYARBPROC) (GLenum target); +typedef void ( * PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params); +typedef void ( * PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params); + + + + + +__attribute__((visibility("default"))) void glDeleteObjectARB (GLhandleARB obj); +__attribute__((visibility("default"))) GLhandleARB glGetHandleARB (GLenum pname); +__attribute__((visibility("default"))) void glDetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj); +__attribute__((visibility("default"))) GLhandleARB glCreateShaderObjectARB (GLenum shaderType); +__attribute__((visibility("default"))) void glShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length); +__attribute__((visibility("default"))) void glCompileShaderARB (GLhandleARB shaderObj); +__attribute__((visibility("default"))) GLhandleARB glCreateProgramObjectARB (void); +__attribute__((visibility("default"))) void glAttachObjectARB (GLhandleARB containerObj, GLhandleARB obj); +__attribute__((visibility("default"))) void glLinkProgramARB (GLhandleARB programObj); +__attribute__((visibility("default"))) void glUseProgramObjectARB (GLhandleARB programObj); +__attribute__((visibility("default"))) void glValidateProgramARB (GLhandleARB programObj); +__attribute__((visibility("default"))) void glUniform1fARB (GLint location, GLfloat v0); +__attribute__((visibility("default"))) void glUniform2fARB (GLint location, GLfloat v0, GLfloat v1); +__attribute__((visibility("default"))) void glUniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +__attribute__((visibility("default"))) void glUniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +__attribute__((visibility("default"))) void glUniform1iARB (GLint location, GLint v0); +__attribute__((visibility("default"))) void glUniform2iARB (GLint location, GLint v0, GLint v1); +__attribute__((visibility("default"))) void glUniform3iARB (GLint location, GLint v0, GLint v1, GLint v2); +__attribute__((visibility("default"))) void glUniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +__attribute__((visibility("default"))) void glUniform1fvARB (GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glUniform2fvARB (GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glUniform3fvARB (GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glUniform4fvARB (GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glUniform1ivARB (GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glUniform2ivARB (GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glUniform3ivARB (GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glUniform4ivARB (GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glUniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glGetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); +__attribute__((visibility("default"))) void glGetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); +__attribute__((visibility("default"))) GLint glGetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name); +__attribute__((visibility("default"))) void glGetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +__attribute__((visibility("default"))) void glGetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params); +__attribute__((visibility("default"))) void glGetUniformivARB (GLhandleARB programObj, GLint location, GLint *params); +__attribute__((visibility("default"))) void glGetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); + +typedef void ( * PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj); +typedef GLhandleARB ( * PFNGLGETHANDLEARBPROC) (GLenum pname); +typedef void ( * PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj); +typedef GLhandleARB ( * PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType); +typedef void ( * PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length); +typedef void ( * PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj); +typedef GLhandleARB ( * PFNGLCREATEPROGRAMOBJECTARBPROC) (void); +typedef void ( * PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj); +typedef void ( * PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj); +typedef void ( * PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj); +typedef void ( * PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj); +typedef void ( * PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0); +typedef void ( * PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void ( * PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void ( * PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void ( * PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0); +typedef void ( * PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1); +typedef void ( * PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void ( * PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void ( * PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params); +typedef void ( * PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); +typedef void ( * PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); +typedef GLint ( * PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); +typedef void ( * PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +typedef void ( * PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params); +typedef void ( * PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params); +typedef void ( * PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); + + + + + +__attribute__((visibility("default"))) void glBindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name); +__attribute__((visibility("default"))) void glGetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +__attribute__((visibility("default"))) GLint glGetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name); + +typedef void ( * PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name); +typedef void ( * PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +typedef GLint ( * PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); +# 6479 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glDrawBuffersARB (GLsizei n, const GLenum *bufs); + +typedef void ( * PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs); +# 6491 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glClampColorARB (GLenum target, GLenum clamp); + +typedef void ( * PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp); +# 6515 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +__attribute__((visibility("default"))) void glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); + +typedef void ( * PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +typedef void ( * PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); + + + + + +__attribute__((visibility("default"))) GLboolean glIsRenderbuffer (GLuint renderbuffer); +__attribute__((visibility("default"))) void glBindRenderbuffer (GLenum target, GLuint renderbuffer); +__attribute__((visibility("default"))) void glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); +__attribute__((visibility("default"))) void glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); +__attribute__((visibility("default"))) void glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) GLboolean glIsFramebuffer (GLuint framebuffer); +__attribute__((visibility("default"))) void glBindFramebuffer (GLenum target, GLuint framebuffer); +__attribute__((visibility("default"))) void glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); +__attribute__((visibility("default"))) void glGenFramebuffers (GLsizei n, GLuint *framebuffers); +__attribute__((visibility("default"))) GLenum glCheckFramebufferStatus (GLenum target); +__attribute__((visibility("default"))) void glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +__attribute__((visibility("default"))) void glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +__attribute__((visibility("default"))) void glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGenerateMipmap (GLenum target); +__attribute__((visibility("default"))) void glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +__attribute__((visibility("default"))) void glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); + +typedef GLboolean ( * PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); +typedef void ( * PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); +typedef void ( * PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); +typedef void ( * PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); +typedef void ( * PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void ( * PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef GLboolean ( * PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); +typedef void ( * PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); +typedef void ( * PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); +typedef void ( * PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); +typedef GLenum ( * PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); +typedef void ( * PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void ( * PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void ( * PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void ( * PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void ( * PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); +typedef void ( * PFNGLGENERATEMIPMAPPROC) (GLenum target); +typedef void ( * PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef void ( * PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void ( * PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +# 6575 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glProgramParameteriARB (GLuint program, GLenum pname, GLint value); +__attribute__((visibility("default"))) void glFramebufferTextureARB (GLenum target, GLenum attachment, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glFramebufferTextureLayerARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +__attribute__((visibility("default"))) void glFramebufferTextureFaceARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); + +typedef void ( * PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value); +typedef void ( * PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void ( * PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void ( * PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +# 6593 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glVertexAttribDivisorARB (GLuint index, GLuint divisor); + +typedef void ( * PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor); + + + + + +__attribute__((visibility("default"))) GLvoid* glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +__attribute__((visibility("default"))) void glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); + +typedef GLvoid* ( * PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void ( * PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length); + + + + + +__attribute__((visibility("default"))) void glTexBufferARB (GLenum target, GLenum internalformat, GLuint buffer); + +typedef void ( * PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer); +# 6627 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glBindVertexArray (GLuint array); +__attribute__((visibility("default"))) void glDeleteVertexArrays (GLsizei n, const GLuint *arrays); +__attribute__((visibility("default"))) void glGenVertexArrays (GLsizei n, GLuint *arrays); +__attribute__((visibility("default"))) GLboolean glIsVertexArray (GLuint array); + +typedef void ( * PFNGLBINDVERTEXARRAYPROC) (GLuint array); +typedef void ( * PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); +typedef void ( * PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean ( * PFNGLISVERTEXARRAYPROC) (GLuint array); + + + + + +__attribute__((visibility("default"))) void glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar* *uniformNames, GLuint *uniformIndices); +__attribute__((visibility("default"))) void glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); +__attribute__((visibility("default"))) GLuint glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName); +__attribute__((visibility("default"))) void glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +__attribute__((visibility("default"))) void glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); + +typedef void ( * PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar* *uniformNames, GLuint *uniformIndices); +typedef void ( * PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +typedef void ( * PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); +typedef GLuint ( * PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName); +typedef void ( * PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +typedef void ( * PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +typedef void ( * PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +# 6665 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); + +typedef void ( * PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +# 6681 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); +__attribute__((visibility("default"))) void glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); +__attribute__((visibility("default"))) void glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex); +__attribute__((visibility("default"))) void glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount, const GLint *basevertex); + +typedef void ( * PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); +typedef void ( * PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); +typedef void ( * PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex); +typedef void ( * PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount, const GLint *basevertex); +# 6699 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glProvokingVertex (GLenum mode); + +typedef void ( * PFNGLPROVOKINGVERTEXPROC) (GLenum mode); +# 6711 "../../include/GL/glext.h" +__attribute__((visibility("default"))) GLsync glFenceSync (GLenum condition, GLbitfield flags); +__attribute__((visibility("default"))) GLboolean glIsSync (GLsync sync); +__attribute__((visibility("default"))) void glDeleteSync (GLsync sync); +__attribute__((visibility("default"))) GLenum glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +__attribute__((visibility("default"))) void glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +__attribute__((visibility("default"))) void glGetInteger64v (GLenum pname, GLint64 *params); +__attribute__((visibility("default"))) void glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); + +typedef GLsync ( * PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags); +typedef GLboolean ( * PFNGLISSYNCPROC) (GLsync sync); +typedef void ( * PFNGLDELETESYNCPROC) (GLsync sync); +typedef GLenum ( * PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void ( * PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void ( * PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *params); +typedef void ( * PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); + + + + + +__attribute__((visibility("default"))) void glTexImage2DMultisample (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +__attribute__((visibility("default"))) void glTexImage3DMultisample (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +__attribute__((visibility("default"))) void glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val); +__attribute__((visibility("default"))) void glSampleMaski (GLuint index, GLbitfield mask); + +typedef void ( * PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void ( * PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void ( * PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val); +typedef void ( * PFNGLSAMPLEMASKIPROC) (GLuint index, GLbitfield mask); +# 6749 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glBlendEquationiARB (GLuint buf, GLenum mode); +__attribute__((visibility("default"))) void glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +__attribute__((visibility("default"))) void glBlendFunciARB (GLuint buf, GLenum src, GLenum dst); +__attribute__((visibility("default"))) void glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); + +typedef void ( * PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode); +typedef void ( * PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void ( * PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void ( * PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); + + + + + +__attribute__((visibility("default"))) void glMinSampleShadingARB (GLclampf value); + +typedef void ( * PFNGLMINSAMPLESHADINGARBPROC) (GLclampf value); +# 6783 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); +__attribute__((visibility("default"))) void glDeleteNamedStringARB (GLint namelen, const GLchar *name); +__attribute__((visibility("default"))) void glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar* *path, const GLint *length); +__attribute__((visibility("default"))) GLboolean glIsNamedStringARB (GLint namelen, const GLchar *name); +__attribute__((visibility("default"))) void glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); +__attribute__((visibility("default"))) void glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params); + +typedef void ( * PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); +typedef void ( * PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); +typedef void ( * PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar* *path, const GLint *length); +typedef GLboolean ( * PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); +typedef void ( * PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); +typedef void ( * PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params); +# 6805 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); +__attribute__((visibility("default"))) GLint glGetFragDataIndex (GLuint program, const GLchar *name); + +typedef void ( * PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); +typedef GLint ( * PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name); +# 6823 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glGenSamplers (GLsizei count, GLuint *samplers); +__attribute__((visibility("default"))) void glDeleteSamplers (GLsizei count, const GLuint *samplers); +__attribute__((visibility("default"))) GLboolean glIsSampler (GLuint sampler); +__attribute__((visibility("default"))) void glBindSampler (GLuint unit, GLuint sampler); +__attribute__((visibility("default"))) void glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); +__attribute__((visibility("default"))) void glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param); +__attribute__((visibility("default"))) void glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param); +__attribute__((visibility("default"))) void glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param); +__attribute__((visibility("default"))) void glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params); + +typedef void ( * PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers); +typedef void ( * PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers); +typedef GLboolean ( * PFNGLISSAMPLERPROC) (GLuint sampler); +typedef void ( * PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); +typedef void ( * PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param); +typedef void ( * PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param); +typedef void ( * PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param); +typedef void ( * PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param); +typedef void ( * PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param); +typedef void ( * PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param); +typedef void ( * PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params); +typedef void ( * PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params); +typedef void ( * PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params); +# 6865 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glQueryCounter (GLuint id, GLenum target); +__attribute__((visibility("default"))) void glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params); +__attribute__((visibility("default"))) void glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params); + +typedef void ( * PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target); +typedef void ( * PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params); +typedef void ( * PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params); + + + + + +__attribute__((visibility("default"))) void glVertexP2ui (GLenum type, GLuint value); +__attribute__((visibility("default"))) void glVertexP2uiv (GLenum type, const GLuint *value); +__attribute__((visibility("default"))) void glVertexP3ui (GLenum type, GLuint value); +__attribute__((visibility("default"))) void glVertexP3uiv (GLenum type, const GLuint *value); +__attribute__((visibility("default"))) void glVertexP4ui (GLenum type, GLuint value); +__attribute__((visibility("default"))) void glVertexP4uiv (GLenum type, const GLuint *value); +__attribute__((visibility("default"))) void glTexCoordP1ui (GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glTexCoordP1uiv (GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glTexCoordP2ui (GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glTexCoordP2uiv (GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glTexCoordP3ui (GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glTexCoordP3uiv (GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glTexCoordP4ui (GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glTexCoordP4uiv (GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glMultiTexCoordP1ui (GLenum texture, GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glMultiTexCoordP1uiv (GLenum texture, GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glMultiTexCoordP2ui (GLenum texture, GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glMultiTexCoordP2uiv (GLenum texture, GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glMultiTexCoordP3ui (GLenum texture, GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glMultiTexCoordP3uiv (GLenum texture, GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glMultiTexCoordP4ui (GLenum texture, GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glMultiTexCoordP4uiv (GLenum texture, GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glNormalP3ui (GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glNormalP3uiv (GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glColorP3ui (GLenum type, GLuint color); +__attribute__((visibility("default"))) void glColorP3uiv (GLenum type, const GLuint *color); +__attribute__((visibility("default"))) void glColorP4ui (GLenum type, GLuint color); +__attribute__((visibility("default"))) void glColorP4uiv (GLenum type, const GLuint *color); +__attribute__((visibility("default"))) void glSecondaryColorP3ui (GLenum type, GLuint color); +__attribute__((visibility("default"))) void glSecondaryColorP3uiv (GLenum type, const GLuint *color); +__attribute__((visibility("default"))) void glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +__attribute__((visibility("default"))) void glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +__attribute__((visibility("default"))) void glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +__attribute__((visibility("default"))) void glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +__attribute__((visibility("default"))) void glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +__attribute__((visibility("default"))) void glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +__attribute__((visibility("default"))) void glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +__attribute__((visibility("default"))) void glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); + +typedef void ( * PFNGLVERTEXP2UIPROC) (GLenum type, GLuint value); +typedef void ( * PFNGLVERTEXP2UIVPROC) (GLenum type, const GLuint *value); +typedef void ( * PFNGLVERTEXP3UIPROC) (GLenum type, GLuint value); +typedef void ( * PFNGLVERTEXP3UIVPROC) (GLenum type, const GLuint *value); +typedef void ( * PFNGLVERTEXP4UIPROC) (GLenum type, GLuint value); +typedef void ( * PFNGLVERTEXP4UIVPROC) (GLenum type, const GLuint *value); +typedef void ( * PFNGLTEXCOORDP1UIPROC) (GLenum type, GLuint coords); +typedef void ( * PFNGLTEXCOORDP1UIVPROC) (GLenum type, const GLuint *coords); +typedef void ( * PFNGLTEXCOORDP2UIPROC) (GLenum type, GLuint coords); +typedef void ( * PFNGLTEXCOORDP2UIVPROC) (GLenum type, const GLuint *coords); +typedef void ( * PFNGLTEXCOORDP3UIPROC) (GLenum type, GLuint coords); +typedef void ( * PFNGLTEXCOORDP3UIVPROC) (GLenum type, const GLuint *coords); +typedef void ( * PFNGLTEXCOORDP4UIPROC) (GLenum type, GLuint coords); +typedef void ( * PFNGLTEXCOORDP4UIVPROC) (GLenum type, const GLuint *coords); +typedef void ( * PFNGLMULTITEXCOORDP1UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void ( * PFNGLMULTITEXCOORDP1UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void ( * PFNGLMULTITEXCOORDP2UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void ( * PFNGLMULTITEXCOORDP2UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void ( * PFNGLMULTITEXCOORDP3UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void ( * PFNGLMULTITEXCOORDP3UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void ( * PFNGLMULTITEXCOORDP4UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void ( * PFNGLMULTITEXCOORDP4UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void ( * PFNGLNORMALP3UIPROC) (GLenum type, GLuint coords); +typedef void ( * PFNGLNORMALP3UIVPROC) (GLenum type, const GLuint *coords); +typedef void ( * PFNGLCOLORP3UIPROC) (GLenum type, GLuint color); +typedef void ( * PFNGLCOLORP3UIVPROC) (GLenum type, const GLuint *color); +typedef void ( * PFNGLCOLORP4UIPROC) (GLenum type, GLuint color); +typedef void ( * PFNGLCOLORP4UIVPROC) (GLenum type, const GLuint *color); +typedef void ( * PFNGLSECONDARYCOLORP3UIPROC) (GLenum type, GLuint color); +typedef void ( * PFNGLSECONDARYCOLORP3UIVPROC) (GLenum type, const GLuint *color); +typedef void ( * PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void ( * PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void ( * PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void ( * PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void ( * PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void ( * PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void ( * PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void ( * PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); + + + + + +__attribute__((visibility("default"))) void glDrawArraysIndirect (GLenum mode, const GLvoid *indirect); +__attribute__((visibility("default"))) void glDrawElementsIndirect (GLenum mode, GLenum type, const GLvoid *indirect); + +typedef void ( * PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const GLvoid *indirect); +typedef void ( * PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const GLvoid *indirect); +# 6973 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glUniform1d (GLint location, GLdouble x); +__attribute__((visibility("default"))) void glUniform2d (GLint location, GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glUniform1dv (GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glUniform2dv (GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glUniform3dv (GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glUniform4dv (GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glGetUniformdv (GLuint program, GLint location, GLdouble *params); + +typedef void ( * PFNGLUNIFORM1DPROC) (GLint location, GLdouble x); +typedef void ( * PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y); +typedef void ( * PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params); + + + + + +__attribute__((visibility("default"))) GLint glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name); +__attribute__((visibility("default"))) GLuint glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name); +__attribute__((visibility("default"))) void glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); +__attribute__((visibility("default"))) void glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +__attribute__((visibility("default"))) void glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +__attribute__((visibility("default"))) void glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices); +__attribute__((visibility("default"))) void glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params); +__attribute__((visibility("default"))) void glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values); + +typedef GLint ( * PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name); +typedef GLuint ( * PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name); +typedef void ( * PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); +typedef void ( * PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +typedef void ( * PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +typedef void ( * PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices); +typedef void ( * PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params); +typedef void ( * PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values); + + + + + +__attribute__((visibility("default"))) void glPatchParameteri (GLenum pname, GLint value); +__attribute__((visibility("default"))) void glPatchParameterfv (GLenum pname, const GLfloat *values); + +typedef void ( * PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value); +typedef void ( * PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values); +# 7051 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glBindTransformFeedback (GLenum target, GLuint id); +__attribute__((visibility("default"))) void glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids); +__attribute__((visibility("default"))) void glGenTransformFeedbacks (GLsizei n, GLuint *ids); +__attribute__((visibility("default"))) GLboolean glIsTransformFeedback (GLuint id); +__attribute__((visibility("default"))) void glPauseTransformFeedback (void); +__attribute__((visibility("default"))) void glResumeTransformFeedback (void); +__attribute__((visibility("default"))) void glDrawTransformFeedback (GLenum mode, GLuint id); + +typedef void ( * PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id); +typedef void ( * PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids); +typedef void ( * PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); +typedef GLboolean ( * PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id); +typedef void ( * PFNGLPAUSETRANSFORMFEEDBACKPROC) (void); +typedef void ( * PFNGLRESUMETRANSFORMFEEDBACKPROC) (void); +typedef void ( * PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id); + + + + + +__attribute__((visibility("default"))) void glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream); +__attribute__((visibility("default"))) void glBeginQueryIndexed (GLenum target, GLuint index, GLuint id); +__attribute__((visibility("default"))) void glEndQueryIndexed (GLenum target, GLuint index); +__attribute__((visibility("default"))) void glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params); + +typedef void ( * PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream); +typedef void ( * PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id); +typedef void ( * PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index); +typedef void ( * PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); + + + + + +__attribute__((visibility("default"))) void glReleaseShaderCompiler (void); +__attribute__((visibility("default"))) void glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length); +__attribute__((visibility("default"))) void glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +__attribute__((visibility("default"))) void glDepthRangef (GLclampf n, GLclampf f); +__attribute__((visibility("default"))) void glClearDepthf (GLclampf d); + +typedef void ( * PFNGLRELEASESHADERCOMPILERPROC) (void); +typedef void ( * PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length); +typedef void ( * PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +typedef void ( * PFNGLDEPTHRANGEFPROC) (GLclampf n, GLclampf f); +typedef void ( * PFNGLCLEARDEPTHFPROC) (GLclampf d); + + + + + +__attribute__((visibility("default"))) void glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); +__attribute__((visibility("default"))) void glProgramBinary (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length); +__attribute__((visibility("default"))) void glProgramParameteri (GLuint program, GLenum pname, GLint value); + +typedef void ( * PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); +typedef void ( * PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length); +typedef void ( * PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); + + + + + +__attribute__((visibility("default"))) void glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program); +__attribute__((visibility("default"))) void glActiveShaderProgram (GLuint pipeline, GLuint program); +__attribute__((visibility("default"))) GLuint glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar* *strings); +__attribute__((visibility("default"))) void glBindProgramPipeline (GLuint pipeline); +__attribute__((visibility("default"))) void glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines); +__attribute__((visibility("default"))) void glGenProgramPipelines (GLsizei n, GLuint *pipelines); +__attribute__((visibility("default"))) GLboolean glIsProgramPipeline (GLuint pipeline); +__attribute__((visibility("default"))) void glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glProgramUniform1i (GLuint program, GLint location, GLint v0); +__attribute__((visibility("default"))) void glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glProgramUniform1f (GLuint program, GLint location, GLfloat v0); +__attribute__((visibility("default"))) void glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform1d (GLuint program, GLint location, GLdouble v0); +__attribute__((visibility("default"))) void glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniform1ui (GLuint program, GLint location, GLuint v0); +__attribute__((visibility("default"))) void glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1); +__attribute__((visibility("default"))) void glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1); +__attribute__((visibility("default"))) void glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1); +__attribute__((visibility("default"))) void glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1); +__attribute__((visibility("default"))) void glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +__attribute__((visibility("default"))) void glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +__attribute__((visibility("default"))) void glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); +__attribute__((visibility("default"))) void glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +__attribute__((visibility("default"))) void glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +__attribute__((visibility("default"))) void glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +__attribute__((visibility("default"))) void glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +__attribute__((visibility("default"))) void glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +__attribute__((visibility("default"))) void glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glValidateProgramPipeline (GLuint pipeline); +__attribute__((visibility("default"))) void glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); + +typedef void ( * PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program); +typedef void ( * PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program); +typedef GLuint ( * PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar* *strings); +typedef void ( * PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void ( * PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines); +typedef void ( * PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); +typedef GLboolean ( * PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void ( * PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params); +typedef void ( * PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0); +typedef void ( * PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0); +typedef void ( * PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0); +typedef void ( * PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0); +typedef void ( * PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef void ( * PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef void ( * PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1); +typedef void ( * PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); +typedef void ( * PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void ( * PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void ( * PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); +typedef void ( * PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void ( * PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void ( * PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void ( * PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +typedef void ( * PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void ( * PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void ( * PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); + + + + + +__attribute__((visibility("default"))) void glVertexAttribL1d (GLuint index, GLdouble x); +__attribute__((visibility("default"))) void glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glVertexAttribL1dv (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribL2dv (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribL3dv (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribL4dv (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params); + +typedef void ( * PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x); +typedef void ( * PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void ( * PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params); + + + + + +__attribute__((visibility("default"))) void glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v); +__attribute__((visibility("default"))) void glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +__attribute__((visibility("default"))) void glViewportIndexedfv (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glScissorArrayv (GLuint first, GLsizei count, const GLint *v); +__attribute__((visibility("default"))) void glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glScissorIndexedv (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glDepthRangeArrayv (GLuint first, GLsizei count, const GLclampd *v); +__attribute__((visibility("default"))) void glDepthRangeIndexed (GLuint index, GLclampd n, GLclampd f); +__attribute__((visibility("default"))) void glGetFloati_v (GLenum target, GLuint index, GLfloat *data); +__attribute__((visibility("default"))) void glGetDoublei_v (GLenum target, GLuint index, GLdouble *data); + +typedef void ( * PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v); +typedef void ( * PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +typedef void ( * PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v); +typedef void ( * PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +typedef void ( * PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLclampd *v); +typedef void ( * PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLclampd n, GLclampd f); +typedef void ( * PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data); +typedef void ( * PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data); + + + + + +__attribute__((visibility("default"))) GLsync glCreateSyncFromCLeventARB (struct _cl_context * context, struct _cl_event * event, GLbitfield flags); + +typedef GLsync ( * PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context * context, struct _cl_event * event, GLbitfield flags); + + + + + +__attribute__((visibility("default"))) void glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +__attribute__((visibility("default"))) void glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +__attribute__((visibility("default"))) void glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const GLvoid *userParam); +__attribute__((visibility("default"))) GLuint glGetDebugMessageLogARB (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); + +typedef void ( * PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void ( * PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +typedef void ( * PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const GLvoid *userParam); +typedef GLuint ( * PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); + + + + + +__attribute__((visibility("default"))) GLenum glGetGraphicsResetStatusARB (void); +__attribute__((visibility("default"))) void glGetnMapdvARB (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); +__attribute__((visibility("default"))) void glGetnMapfvARB (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); +__attribute__((visibility("default"))) void glGetnMapivARB (GLenum target, GLenum query, GLsizei bufSize, GLint *v); +__attribute__((visibility("default"))) void glGetnPixelMapfvARB (GLenum map, GLsizei bufSize, GLfloat *values); +__attribute__((visibility("default"))) void glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint *values); +__attribute__((visibility("default"))) void glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort *values); +__attribute__((visibility("default"))) void glGetnPolygonStippleARB (GLsizei bufSize, GLubyte *pattern); +__attribute__((visibility("default"))) void glGetnColorTableARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table); +__attribute__((visibility("default"))) void glGetnConvolutionFilterARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image); +__attribute__((visibility("default"))) void glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span); +__attribute__((visibility("default"))) void glGetnHistogramARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); +__attribute__((visibility("default"))) void glGetnMinmaxARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); +__attribute__((visibility("default"))) void glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img); +__attribute__((visibility("default"))) void glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data); +__attribute__((visibility("default"))) void glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, GLvoid *img); +__attribute__((visibility("default"))) void glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +__attribute__((visibility("default"))) void glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params); +__attribute__((visibility("default"))) void glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +__attribute__((visibility("default"))) void glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); + +typedef GLenum ( * PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void); +typedef void ( * PFNGLGETNMAPDVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); +typedef void ( * PFNGLGETNMAPFVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); +typedef void ( * PFNGLGETNMAPIVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v); +typedef void ( * PFNGLGETNPIXELMAPFVARBPROC) (GLenum map, GLsizei bufSize, GLfloat *values); +typedef void ( * PFNGLGETNPIXELMAPUIVARBPROC) (GLenum map, GLsizei bufSize, GLuint *values); +typedef void ( * PFNGLGETNPIXELMAPUSVARBPROC) (GLenum map, GLsizei bufSize, GLushort *values); +typedef void ( * PFNGLGETNPOLYGONSTIPPLEARBPROC) (GLsizei bufSize, GLubyte *pattern); +typedef void ( * PFNGLGETNCOLORTABLEARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table); +typedef void ( * PFNGLGETNCONVOLUTIONFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image); +typedef void ( * PFNGLGETNSEPARABLEFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span); +typedef void ( * PFNGLGETNHISTOGRAMARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); +typedef void ( * PFNGLGETNMINMAXARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); +typedef void ( * PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img); +typedef void ( * PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data); +typedef void ( * PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, GLvoid *img); +typedef void ( * PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +typedef void ( * PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); +typedef void ( * PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +typedef void ( * PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); +# 7367 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glBlendColorEXT (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); + +typedef void ( * PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); + + + + + +__attribute__((visibility("default"))) void glPolygonOffsetEXT (GLfloat factor, GLfloat bias); + +typedef void ( * PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias); +# 7387 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glTexImage3DEXT (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); + +typedef void ( * PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); + + + + + +__attribute__((visibility("default"))) void glGetTexFilterFuncSGIS (GLenum target, GLenum filter, GLfloat *weights); +__attribute__((visibility("default"))) void glTexFilterFuncSGIS (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); + +typedef void ( * PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights); +typedef void ( * PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); + + + + + +__attribute__((visibility("default"))) void glTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); + +typedef void ( * PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); + + + + + +__attribute__((visibility("default"))) void glCopyTexImage1DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +__attribute__((visibility("default"))) void glCopyTexImage2DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +__attribute__((visibility("default"))) void glCopyTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glCopyTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glCopyTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); + +typedef void ( * PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void ( * PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void ( * PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void ( * PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); + + + + + +__attribute__((visibility("default"))) void glGetHistogramEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +__attribute__((visibility("default"))) void glGetHistogramParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetHistogramParameterivEXT (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetMinmaxEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +__attribute__((visibility("default"))) void glGetMinmaxParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetMinmaxParameterivEXT (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glHistogramEXT (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +__attribute__((visibility("default"))) void glMinmaxEXT (GLenum target, GLenum internalformat, GLboolean sink); +__attribute__((visibility("default"))) void glResetHistogramEXT (GLenum target); +__attribute__((visibility("default"))) void glResetMinmaxEXT (GLenum target); + +typedef void ( * PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void ( * PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void ( * PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +typedef void ( * PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink); +typedef void ( * PFNGLRESETHISTOGRAMEXTPROC) (GLenum target); +typedef void ( * PFNGLRESETMINMAXEXTPROC) (GLenum target); + + + + + +__attribute__((visibility("default"))) void glConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +__attribute__((visibility("default"))) void glConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +__attribute__((visibility("default"))) void glConvolutionParameterfEXT (GLenum target, GLenum pname, GLfloat params); +__attribute__((visibility("default"))) void glConvolutionParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glConvolutionParameteriEXT (GLenum target, GLenum pname, GLint params); +__attribute__((visibility("default"))) void glConvolutionParameterivEXT (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glCopyConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glCopyConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glGetConvolutionFilterEXT (GLenum target, GLenum format, GLenum type, GLvoid *image); +__attribute__((visibility("default"))) void glGetConvolutionParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetConvolutionParameterivEXT (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetSeparableFilterEXT (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +__attribute__((visibility("default"))) void glSeparableFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); + +typedef void ( * PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +typedef void ( * PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +typedef void ( * PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params); +typedef void ( * PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params); +typedef void ( * PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void ( * PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); +typedef void ( * PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +typedef void ( * PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); +# 7495 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glColorTableSGI (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +__attribute__((visibility("default"))) void glColorTableParameterfvSGI (GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glColorTableParameterivSGI (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glCopyColorTableSGI (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glGetColorTableSGI (GLenum target, GLenum format, GLenum type, GLvoid *table); +__attribute__((visibility("default"))) void glGetColorTableParameterfvSGI (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetColorTableParameterivSGI (GLenum target, GLenum pname, GLint *params); + +typedef void ( * PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +typedef void ( * PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); +typedef void ( * PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params); + + + + + +__attribute__((visibility("default"))) void glPixelTexGenSGIX (GLenum mode); + +typedef void ( * PFNGLPIXELTEXGENSGIXPROC) (GLenum mode); + + + + + +__attribute__((visibility("default"))) void glPixelTexGenParameteriSGIS (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glPixelTexGenParameterivSGIS (GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glPixelTexGenParameterfSGIS (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glPixelTexGenParameterfvSGIS (GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glGetPixelTexGenParameterivSGIS (GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetPixelTexGenParameterfvSGIS (GLenum pname, GLfloat *params); + +typedef void ( * PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param); +typedef void ( * PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params); +typedef void ( * PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param); +typedef void ( * PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); +typedef void ( * PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params); +typedef void ( * PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params); + + + + + +__attribute__((visibility("default"))) void glTexImage4DSGIS (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glTexSubImage4DSGIS (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels); + +typedef void ( * PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels); +# 7559 "../../include/GL/glext.h" +__attribute__((visibility("default"))) GLboolean glAreTexturesResidentEXT (GLsizei n, const GLuint *textures, GLboolean *residences); +__attribute__((visibility("default"))) void glBindTextureEXT (GLenum target, GLuint texture); +__attribute__((visibility("default"))) void glDeleteTexturesEXT (GLsizei n, const GLuint *textures); +__attribute__((visibility("default"))) void glGenTexturesEXT (GLsizei n, GLuint *textures); +__attribute__((visibility("default"))) GLboolean glIsTextureEXT (GLuint texture); +__attribute__((visibility("default"))) void glPrioritizeTexturesEXT (GLsizei n, const GLuint *textures, const GLclampf *priorities); + +typedef GLboolean ( * PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences); +typedef void ( * PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture); +typedef void ( * PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures); +typedef void ( * PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures); +typedef GLboolean ( * PFNGLISTEXTUREEXTPROC) (GLuint texture); +typedef void ( * PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities); + + + + + +__attribute__((visibility("default"))) void glDetailTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points); +__attribute__((visibility("default"))) void glGetDetailTexFuncSGIS (GLenum target, GLfloat *points); + +typedef void ( * PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); +typedef void ( * PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points); + + + + + +__attribute__((visibility("default"))) void glSharpenTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points); +__attribute__((visibility("default"))) void glGetSharpenTexFuncSGIS (GLenum target, GLfloat *points); + +typedef void ( * PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); +typedef void ( * PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points); +# 7605 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glSampleMaskSGIS (GLclampf value, GLboolean invert); +__attribute__((visibility("default"))) void glSamplePatternSGIS (GLenum pattern); + +typedef void ( * PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert); +typedef void ( * PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern); +# 7619 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glArrayElementEXT (GLint i); +__attribute__((visibility("default"))) void glColorPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +__attribute__((visibility("default"))) void glDrawArraysEXT (GLenum mode, GLint first, GLsizei count); +__attribute__((visibility("default"))) void glEdgeFlagPointerEXT (GLsizei stride, GLsizei count, const GLboolean *pointer); +__attribute__((visibility("default"))) void glGetPointervEXT (GLenum pname, GLvoid* *params); +__attribute__((visibility("default"))) void glIndexPointerEXT (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +__attribute__((visibility("default"))) void glNormalPointerEXT (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +__attribute__((visibility("default"))) void glTexCoordPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +__attribute__((visibility("default"))) void glVertexPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); + +typedef void ( * PFNGLARRAYELEMENTEXTPROC) (GLint i); +typedef void ( * PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void ( * PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count); +typedef void ( * PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer); +typedef void ( * PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params); +typedef void ( * PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void ( * PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void ( * PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void ( * PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +# 7667 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glBlendEquationEXT (GLenum mode); + +typedef void ( * PFNGLBLENDEQUATIONEXTPROC) (GLenum mode); +# 7695 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glSpriteParameterfSGIX (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glSpriteParameterfvSGIX (GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glSpriteParameteriSGIX (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glSpriteParameterivSGIX (GLenum pname, const GLint *params); + +typedef void ( * PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param); +typedef void ( * PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params); +typedef void ( * PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param); +typedef void ( * PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params); +# 7713 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glPointParameterfEXT (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glPointParameterfvEXT (GLenum pname, const GLfloat *params); + +typedef void ( * PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param); +typedef void ( * PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params); + + + + + +__attribute__((visibility("default"))) void glPointParameterfSGIS (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glPointParameterfvSGIS (GLenum pname, const GLfloat *params); + +typedef void ( * PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param); +typedef void ( * PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); + + + + + +__attribute__((visibility("default"))) GLint glGetInstrumentsSGIX (void); +__attribute__((visibility("default"))) void glInstrumentsBufferSGIX (GLsizei size, GLint *buffer); +__attribute__((visibility("default"))) GLint glPollInstrumentsSGIX (GLint *marker_p); +__attribute__((visibility("default"))) void glReadInstrumentsSGIX (GLint marker); +__attribute__((visibility("default"))) void glStartInstrumentsSGIX (void); +__attribute__((visibility("default"))) void glStopInstrumentsSGIX (GLint marker); + +typedef GLint ( * PFNGLGETINSTRUMENTSSGIXPROC) (void); +typedef void ( * PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer); +typedef GLint ( * PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p); +typedef void ( * PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker); +typedef void ( * PFNGLSTARTINSTRUMENTSSGIXPROC) (void); +typedef void ( * PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker); +# 7755 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glFrameZoomSGIX (GLint factor); + +typedef void ( * PFNGLFRAMEZOOMSGIXPROC) (GLint factor); + + + + + +__attribute__((visibility("default"))) void glTagSampleBufferSGIX (void); + +typedef void ( * PFNGLTAGSAMPLEBUFFERSGIXPROC) (void); + + + + + +__attribute__((visibility("default"))) void glDeformationMap3dSGIX (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); +__attribute__((visibility("default"))) void glDeformationMap3fSGIX (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); +__attribute__((visibility("default"))) void glDeformSGIX (GLbitfield mask); +__attribute__((visibility("default"))) void glLoadIdentityDeformationMapSGIX (GLbitfield mask); + +typedef void ( * PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); +typedef void ( * PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); +typedef void ( * PFNGLDEFORMSGIXPROC) (GLbitfield mask); +typedef void ( * PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask); + + + + + +__attribute__((visibility("default"))) void glReferencePlaneSGIX (const GLdouble *equation); + +typedef void ( * PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation); + + + + + +__attribute__((visibility("default"))) void glFlushRasterSGIX (void); + +typedef void ( * PFNGLFLUSHRASTERSGIXPROC) (void); +# 7805 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glFogFuncSGIS (GLsizei n, const GLfloat *points); +__attribute__((visibility("default"))) void glGetFogFuncSGIS (GLfloat *points); + +typedef void ( * PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points); +typedef void ( * PFNGLGETFOGFUNCSGISPROC) (GLfloat *points); +# 7819 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glImageTransformParameteriHP (GLenum target, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glImageTransformParameterfHP (GLenum target, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glImageTransformParameterivHP (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glImageTransformParameterfvHP (GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glGetImageTransformParameterivHP (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetImageTransformParameterfvHP (GLenum target, GLenum pname, GLfloat *params); + +typedef void ( * PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param); +typedef void ( * PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void ( * PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params); +# 7845 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +__attribute__((visibility("default"))) void glCopyColorSubTableEXT (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); + +typedef void ( * PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +typedef void ( * PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +# 7859 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glHintPGI (GLenum target, GLint mode); + +typedef void ( * PFNGLHINTPGIPROC) (GLenum target, GLint mode); + + + + + +__attribute__((visibility("default"))) void glColorTableEXT (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +__attribute__((visibility("default"))) void glGetColorTableEXT (GLenum target, GLenum format, GLenum type, GLvoid *data); +__attribute__((visibility("default"))) void glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetColorTableParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); + +typedef void ( * PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +typedef void ( * PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data); +typedef void ( * PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +# 7885 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glGetListParameterfvSGIX (GLuint list, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetListParameterivSGIX (GLuint list, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glListParameterfSGIX (GLuint list, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glListParameterfvSGIX (GLuint list, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glListParameteriSGIX (GLuint list, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glListParameterivSGIX (GLuint list, GLenum pname, const GLint *params); + +typedef void ( * PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params); +typedef void ( * PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param); +typedef void ( * PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param); +typedef void ( * PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params); +# 7923 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glIndexMaterialEXT (GLenum face, GLenum mode); + +typedef void ( * PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode); + + + + + +__attribute__((visibility("default"))) void glIndexFuncEXT (GLenum func, GLclampf ref); + +typedef void ( * PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref); +# 7943 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glLockArraysEXT (GLint first, GLsizei count); +__attribute__((visibility("default"))) void glUnlockArraysEXT (void); + +typedef void ( * PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count); +typedef void ( * PFNGLUNLOCKARRAYSEXTPROC) (void); + + + + + +__attribute__((visibility("default"))) void glCullParameterdvEXT (GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) void glCullParameterfvEXT (GLenum pname, GLfloat *params); + +typedef void ( * PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params); +typedef void ( * PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params); +# 7967 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glFragmentColorMaterialSGIX (GLenum face, GLenum mode); +__attribute__((visibility("default"))) void glFragmentLightfSGIX (GLenum light, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glFragmentLightfvSGIX (GLenum light, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glFragmentLightiSGIX (GLenum light, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glFragmentLightivSGIX (GLenum light, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glFragmentLightModelfSGIX (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glFragmentLightModelfvSGIX (GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glFragmentLightModeliSGIX (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glFragmentLightModelivSGIX (GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glFragmentMaterialfSGIX (GLenum face, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glFragmentMaterialfvSGIX (GLenum face, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glFragmentMaterialiSGIX (GLenum face, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glFragmentMaterialivSGIX (GLenum face, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glGetFragmentLightfvSGIX (GLenum light, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetFragmentLightivSGIX (GLenum light, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetFragmentMaterialfvSGIX (GLenum face, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetFragmentMaterialivSGIX (GLenum face, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glLightEnviSGIX (GLenum pname, GLint param); + +typedef void ( * PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode); +typedef void ( * PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param); +typedef void ( * PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param); +typedef void ( * PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params); +typedef void ( * PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param); +typedef void ( * PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params); +typedef void ( * PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param); +typedef void ( * PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params); +typedef void ( * PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param); +typedef void ( * PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param); +typedef void ( * PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params); +typedef void ( * PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params); +typedef void ( * PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params); +typedef void ( * PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param); +# 8017 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); + +typedef void ( * PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); +# 8033 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glApplyTextureEXT (GLenum mode); +__attribute__((visibility("default"))) void glTextureLightEXT (GLenum pname); +__attribute__((visibility("default"))) void glTextureMaterialEXT (GLenum face, GLenum mode); + +typedef void ( * PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode); +typedef void ( * PFNGLTEXTURELIGHTEXTPROC) (GLenum pname); +typedef void ( * PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode); +# 8053 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glAsyncMarkerSGIX (GLuint marker); +__attribute__((visibility("default"))) GLint glFinishAsyncSGIX (GLuint *markerp); +__attribute__((visibility("default"))) GLint glPollAsyncSGIX (GLuint *markerp); +__attribute__((visibility("default"))) GLuint glGenAsyncMarkersSGIX (GLsizei range); +__attribute__((visibility("default"))) void glDeleteAsyncMarkersSGIX (GLuint marker, GLsizei range); +__attribute__((visibility("default"))) GLboolean glIsAsyncMarkerSGIX (GLuint marker); + +typedef void ( * PFNGLASYNCMARKERSGIXPROC) (GLuint marker); +typedef GLint ( * PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp); +typedef GLint ( * PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp); +typedef GLuint ( * PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range); +typedef void ( * PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range); +typedef GLboolean ( * PFNGLISASYNCMARKERSGIXPROC) (GLuint marker); +# 8079 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glVertexPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer); +__attribute__((visibility("default"))) void glNormalPointervINTEL (GLenum type, const GLvoid* *pointer); +__attribute__((visibility("default"))) void glColorPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer); +__attribute__((visibility("default"))) void glTexCoordPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer); + +typedef void ( * PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); +typedef void ( * PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer); +typedef void ( * PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); +typedef void ( * PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); +# 8097 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glPixelTransformParameteriEXT (GLenum target, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glPixelTransformParameterfEXT (GLenum target, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glPixelTransformParameterivEXT (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glPixelTransformParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params); + +typedef void ( * PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param); +typedef void ( * PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void ( * PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); +# 8123 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glSecondaryColor3bEXT (GLbyte red, GLbyte green, GLbyte blue); +__attribute__((visibility("default"))) void glSecondaryColor3bvEXT (const GLbyte *v); +__attribute__((visibility("default"))) void glSecondaryColor3dEXT (GLdouble red, GLdouble green, GLdouble blue); +__attribute__((visibility("default"))) void glSecondaryColor3dvEXT (const GLdouble *v); +__attribute__((visibility("default"))) void glSecondaryColor3fEXT (GLfloat red, GLfloat green, GLfloat blue); +__attribute__((visibility("default"))) void glSecondaryColor3fvEXT (const GLfloat *v); +__attribute__((visibility("default"))) void glSecondaryColor3iEXT (GLint red, GLint green, GLint blue); +__attribute__((visibility("default"))) void glSecondaryColor3ivEXT (const GLint *v); +__attribute__((visibility("default"))) void glSecondaryColor3sEXT (GLshort red, GLshort green, GLshort blue); +__attribute__((visibility("default"))) void glSecondaryColor3svEXT (const GLshort *v); +__attribute__((visibility("default"))) void glSecondaryColor3ubEXT (GLubyte red, GLubyte green, GLubyte blue); +__attribute__((visibility("default"))) void glSecondaryColor3ubvEXT (const GLubyte *v); +__attribute__((visibility("default"))) void glSecondaryColor3uiEXT (GLuint red, GLuint green, GLuint blue); +__attribute__((visibility("default"))) void glSecondaryColor3uivEXT (const GLuint *v); +__attribute__((visibility("default"))) void glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue); +__attribute__((visibility("default"))) void glSecondaryColor3usvEXT (const GLushort *v); +__attribute__((visibility("default"))) void glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); + +typedef void ( * PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void ( * PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v); +typedef void ( * PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void ( * PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v); +typedef void ( * PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void ( * PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v); +typedef void ( * PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue); +typedef void ( * PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v); +typedef void ( * PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue); +typedef void ( * PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v); +typedef void ( * PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void ( * PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v); +typedef void ( * PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue); +typedef void ( * PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v); +typedef void ( * PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue); +typedef void ( * PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v); +typedef void ( * PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); + + + + + +__attribute__((visibility("default"))) void glTextureNormalEXT (GLenum mode); + +typedef void ( * PFNGLTEXTURENORMALEXTPROC) (GLenum mode); + + + + + +__attribute__((visibility("default"))) void glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +__attribute__((visibility("default"))) void glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); + +typedef void ( * PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void ( * PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); + + + + + +__attribute__((visibility("default"))) void glFogCoordfEXT (GLfloat coord); +__attribute__((visibility("default"))) void glFogCoordfvEXT (const GLfloat *coord); +__attribute__((visibility("default"))) void glFogCoorddEXT (GLdouble coord); +__attribute__((visibility("default"))) void glFogCoorddvEXT (const GLdouble *coord); +__attribute__((visibility("default"))) void glFogCoordPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer); + +typedef void ( * PFNGLFOGCOORDFEXTPROC) (GLfloat coord); +typedef void ( * PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord); +typedef void ( * PFNGLFOGCOORDDEXTPROC) (GLdouble coord); +typedef void ( * PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord); +typedef void ( * PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +# 8201 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glTangent3bEXT (GLbyte tx, GLbyte ty, GLbyte tz); +__attribute__((visibility("default"))) void glTangent3bvEXT (const GLbyte *v); +__attribute__((visibility("default"))) void glTangent3dEXT (GLdouble tx, GLdouble ty, GLdouble tz); +__attribute__((visibility("default"))) void glTangent3dvEXT (const GLdouble *v); +__attribute__((visibility("default"))) void glTangent3fEXT (GLfloat tx, GLfloat ty, GLfloat tz); +__attribute__((visibility("default"))) void glTangent3fvEXT (const GLfloat *v); +__attribute__((visibility("default"))) void glTangent3iEXT (GLint tx, GLint ty, GLint tz); +__attribute__((visibility("default"))) void glTangent3ivEXT (const GLint *v); +__attribute__((visibility("default"))) void glTangent3sEXT (GLshort tx, GLshort ty, GLshort tz); +__attribute__((visibility("default"))) void glTangent3svEXT (const GLshort *v); +__attribute__((visibility("default"))) void glBinormal3bEXT (GLbyte bx, GLbyte by, GLbyte bz); +__attribute__((visibility("default"))) void glBinormal3bvEXT (const GLbyte *v); +__attribute__((visibility("default"))) void glBinormal3dEXT (GLdouble bx, GLdouble by, GLdouble bz); +__attribute__((visibility("default"))) void glBinormal3dvEXT (const GLdouble *v); +__attribute__((visibility("default"))) void glBinormal3fEXT (GLfloat bx, GLfloat by, GLfloat bz); +__attribute__((visibility("default"))) void glBinormal3fvEXT (const GLfloat *v); +__attribute__((visibility("default"))) void glBinormal3iEXT (GLint bx, GLint by, GLint bz); +__attribute__((visibility("default"))) void glBinormal3ivEXT (const GLint *v); +__attribute__((visibility("default"))) void glBinormal3sEXT (GLshort bx, GLshort by, GLshort bz); +__attribute__((visibility("default"))) void glBinormal3svEXT (const GLshort *v); +__attribute__((visibility("default"))) void glTangentPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glBinormalPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer); + +typedef void ( * PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz); +typedef void ( * PFNGLTANGENT3BVEXTPROC) (const GLbyte *v); +typedef void ( * PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz); +typedef void ( * PFNGLTANGENT3DVEXTPROC) (const GLdouble *v); +typedef void ( * PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz); +typedef void ( * PFNGLTANGENT3FVEXTPROC) (const GLfloat *v); +typedef void ( * PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz); +typedef void ( * PFNGLTANGENT3IVEXTPROC) (const GLint *v); +typedef void ( * PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz); +typedef void ( * PFNGLTANGENT3SVEXTPROC) (const GLshort *v); +typedef void ( * PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz); +typedef void ( * PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v); +typedef void ( * PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz); +typedef void ( * PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v); +typedef void ( * PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz); +typedef void ( * PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v); +typedef void ( * PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz); +typedef void ( * PFNGLBINORMAL3IVEXTPROC) (const GLint *v); +typedef void ( * PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz); +typedef void ( * PFNGLBINORMAL3SVEXTPROC) (const GLshort *v); +typedef void ( * PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +# 8267 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glFinishTextureSUNX (void); + +typedef void ( * PFNGLFINISHTEXTURESUNXPROC) (void); + + + + + +__attribute__((visibility("default"))) void glGlobalAlphaFactorbSUN (GLbyte factor); +__attribute__((visibility("default"))) void glGlobalAlphaFactorsSUN (GLshort factor); +__attribute__((visibility("default"))) void glGlobalAlphaFactoriSUN (GLint factor); +__attribute__((visibility("default"))) void glGlobalAlphaFactorfSUN (GLfloat factor); +__attribute__((visibility("default"))) void glGlobalAlphaFactordSUN (GLdouble factor); +__attribute__((visibility("default"))) void glGlobalAlphaFactorubSUN (GLubyte factor); +__attribute__((visibility("default"))) void glGlobalAlphaFactorusSUN (GLushort factor); +__attribute__((visibility("default"))) void glGlobalAlphaFactoruiSUN (GLuint factor); + +typedef void ( * PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor); +typedef void ( * PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor); +typedef void ( * PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor); +typedef void ( * PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor); +typedef void ( * PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor); +typedef void ( * PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor); +typedef void ( * PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor); +typedef void ( * PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor); + + + + + +__attribute__((visibility("default"))) void glReplacementCodeuiSUN (GLuint code); +__attribute__((visibility("default"))) void glReplacementCodeusSUN (GLushort code); +__attribute__((visibility("default"))) void glReplacementCodeubSUN (GLubyte code); +__attribute__((visibility("default"))) void glReplacementCodeuivSUN (const GLuint *code); +__attribute__((visibility("default"))) void glReplacementCodeusvSUN (const GLushort *code); +__attribute__((visibility("default"))) void glReplacementCodeubvSUN (const GLubyte *code); +__attribute__((visibility("default"))) void glReplacementCodePointerSUN (GLenum type, GLsizei stride, const GLvoid* *pointer); + +typedef void ( * PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code); +typedef void ( * PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code); +typedef void ( * PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code); +typedef void ( * PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code); +typedef void ( * PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code); +typedef void ( * PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code); +typedef void ( * PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer); + + + + + +__attribute__((visibility("default"))) void glColor4ubVertex2fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); +__attribute__((visibility("default"))) void glColor4ubVertex2fvSUN (const GLubyte *c, const GLfloat *v); +__attribute__((visibility("default"))) void glColor4ubVertex3fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glColor4ubVertex3fvSUN (const GLubyte *c, const GLfloat *v); +__attribute__((visibility("default"))) void glColor3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glColor3fVertex3fvSUN (const GLfloat *c, const GLfloat *v); +__attribute__((visibility("default"))) void glNormal3fVertex3fSUN (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glNormal3fVertex3fvSUN (const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glColor4fNormal3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glColor4fNormal3fVertex3fvSUN (const GLfloat *c, const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glTexCoord2fVertex3fSUN (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glTexCoord2fVertex3fvSUN (const GLfloat *tc, const GLfloat *v); +__attribute__((visibility("default"))) void glTexCoord4fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glTexCoord4fVertex4fvSUN (const GLfloat *tc, const GLfloat *v); +__attribute__((visibility("default"))) void glTexCoord2fColor4ubVertex3fSUN (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *tc, const GLubyte *c, const GLfloat *v); +__attribute__((visibility("default"))) void glTexCoord2fColor3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glTexCoord2fColor3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *v); +__attribute__((visibility("default"))) void glTexCoord2fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glReplacementCodeuiVertex3fSUN (GLuint rc, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glReplacementCodeuiVertex3fvSUN (const GLuint *rc, const GLfloat *v); +__attribute__((visibility("default"))) void glReplacementCodeuiColor4ubVertex3fSUN (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *rc, const GLubyte *c, const GLfloat *v); +__attribute__((visibility("default"))) void glReplacementCodeuiColor3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *v); +__attribute__((visibility("default"))) void glReplacementCodeuiNormal3fVertex3fSUN (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *v); +__attribute__((visibility("default"))) void glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); + +typedef void ( * PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); +typedef void ( * PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v); +typedef void ( * PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v); +typedef void ( * PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v); +typedef void ( * PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v); +typedef void ( * PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v); +typedef void ( * PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v); +typedef void ( * PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v); +typedef void ( * PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v); +typedef void ( * PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v); +typedef void ( * PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v); +typedef void ( * PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v); +typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); + + + + + +__attribute__((visibility("default"))) void glBlendFuncSeparateEXT (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); + +typedef void ( * PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); + + + + + +__attribute__((visibility("default"))) void glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); + +typedef void ( * PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +# 8455 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glVertexWeightfEXT (GLfloat weight); +__attribute__((visibility("default"))) void glVertexWeightfvEXT (const GLfloat *weight); +__attribute__((visibility("default"))) void glVertexWeightPointerEXT (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer); + +typedef void ( * PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight); +typedef void ( * PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight); +typedef void ( * PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer); +# 8471 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glFlushVertexArrayRangeNV (void); +__attribute__((visibility("default"))) void glVertexArrayRangeNV (GLsizei length, const GLvoid *pointer); + +typedef void ( * PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void); +typedef void ( * PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer); + + + + + +__attribute__((visibility("default"))) void glCombinerParameterfvNV (GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glCombinerParameterfNV (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glCombinerParameterivNV (GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glCombinerParameteriNV (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glCombinerInputNV (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +__attribute__((visibility("default"))) void glCombinerOutputNV (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); +__attribute__((visibility("default"))) void glFinalCombinerInputNV (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +__attribute__((visibility("default"))) void glGetCombinerInputParameterfvNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetCombinerInputParameterivNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetCombinerOutputParameterfvNV (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetCombinerOutputParameterivNV (GLenum stage, GLenum portion, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetFinalCombinerInputParameterfvNV (GLenum variable, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetFinalCombinerInputParameterivNV (GLenum variable, GLenum pname, GLint *params); + +typedef void ( * PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params); +typedef void ( * PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param); +typedef void ( * PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params); +typedef void ( * PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); +typedef void ( * PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void ( * PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); +typedef void ( * PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void ( * PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); +typedef void ( * PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params); +typedef void ( * PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params); +# 8529 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glResizeBuffersMESA (void); + +typedef void ( * PFNGLRESIZEBUFFERSMESAPROC) (void); + + + + + +__attribute__((visibility("default"))) void glWindowPos2dMESA (GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glWindowPos2dvMESA (const GLdouble *v); +__attribute__((visibility("default"))) void glWindowPos2fMESA (GLfloat x, GLfloat y); +__attribute__((visibility("default"))) void glWindowPos2fvMESA (const GLfloat *v); +__attribute__((visibility("default"))) void glWindowPos2iMESA (GLint x, GLint y); +__attribute__((visibility("default"))) void glWindowPos2ivMESA (const GLint *v); +__attribute__((visibility("default"))) void glWindowPos2sMESA (GLshort x, GLshort y); +__attribute__((visibility("default"))) void glWindowPos2svMESA (const GLshort *v); +__attribute__((visibility("default"))) void glWindowPos3dMESA (GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glWindowPos3dvMESA (const GLdouble *v); +__attribute__((visibility("default"))) void glWindowPos3fMESA (GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glWindowPos3fvMESA (const GLfloat *v); +__attribute__((visibility("default"))) void glWindowPos3iMESA (GLint x, GLint y, GLint z); +__attribute__((visibility("default"))) void glWindowPos3ivMESA (const GLint *v); +__attribute__((visibility("default"))) void glWindowPos3sMESA (GLshort x, GLshort y, GLshort z); +__attribute__((visibility("default"))) void glWindowPos3svMESA (const GLshort *v); +__attribute__((visibility("default"))) void glWindowPos4dMESA (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glWindowPos4dvMESA (const GLdouble *v); +__attribute__((visibility("default"))) void glWindowPos4fMESA (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glWindowPos4fvMESA (const GLfloat *v); +__attribute__((visibility("default"))) void glWindowPos4iMESA (GLint x, GLint y, GLint z, GLint w); +__attribute__((visibility("default"))) void glWindowPos4ivMESA (const GLint *v); +__attribute__((visibility("default"))) void glWindowPos4sMESA (GLshort x, GLshort y, GLshort z, GLshort w); +__attribute__((visibility("default"))) void glWindowPos4svMESA (const GLshort *v); + +typedef void ( * PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y); +typedef void ( * PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v); +typedef void ( * PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y); +typedef void ( * PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v); +typedef void ( * PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y); +typedef void ( * PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v); +typedef void ( * PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y); +typedef void ( * PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v); +typedef void ( * PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v); +typedef void ( * PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v); +typedef void ( * PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z); +typedef void ( * PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v); +typedef void ( * PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z); +typedef void ( * PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v); +typedef void ( * PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v); +typedef void ( * PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v); +typedef void ( * PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w); +typedef void ( * PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v); +typedef void ( * PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w); +typedef void ( * PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v); +# 8595 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glMultiModeDrawArraysIBM (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); +__attribute__((visibility("default"))) void glMultiModeDrawElementsIBM (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride); + +typedef void ( * PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); +typedef void ( * PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride); + + + + + +__attribute__((visibility("default"))) void glColorPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +__attribute__((visibility("default"))) void glSecondaryColorPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +__attribute__((visibility("default"))) void glEdgeFlagPointerListIBM (GLint stride, const GLboolean* *pointer, GLint ptrstride); +__attribute__((visibility("default"))) void glFogCoordPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +__attribute__((visibility("default"))) void glIndexPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +__attribute__((visibility("default"))) void glNormalPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +__attribute__((visibility("default"))) void glTexCoordPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +__attribute__((visibility("default"))) void glVertexPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); + +typedef void ( * PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void ( * PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void ( * PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride); +typedef void ( * PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void ( * PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void ( * PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void ( * PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void ( * PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +# 8651 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glTbufferMask3DFX (GLuint mask); + +typedef void ( * PFNGLTBUFFERMASK3DFXPROC) (GLuint mask); + + + + + +__attribute__((visibility("default"))) void glSampleMaskEXT (GLclampf value, GLboolean invert); +__attribute__((visibility("default"))) void glSamplePatternEXT (GLenum pattern); + +typedef void ( * PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert); +typedef void ( * PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern); +# 8685 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glTextureColorMaskSGIS (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); + +typedef void ( * PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); + + + + + +__attribute__((visibility("default"))) void glIglooInterfaceSGIX (GLenum pname, const GLvoid *params); + +typedef void ( * PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params); +# 8709 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glDeleteFencesNV (GLsizei n, const GLuint *fences); +__attribute__((visibility("default"))) void glGenFencesNV (GLsizei n, GLuint *fences); +__attribute__((visibility("default"))) GLboolean glIsFenceNV (GLuint fence); +__attribute__((visibility("default"))) GLboolean glTestFenceNV (GLuint fence); +__attribute__((visibility("default"))) void glGetFenceivNV (GLuint fence, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glFinishFenceNV (GLuint fence); +__attribute__((visibility("default"))) void glSetFenceNV (GLuint fence, GLenum condition); + +typedef void ( * PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); +typedef void ( * PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); +typedef GLboolean ( * PFNGLISFENCENVPROC) (GLuint fence); +typedef GLboolean ( * PFNGLTESTFENCENVPROC) (GLuint fence); +typedef void ( * PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); +typedef void ( * PFNGLFINISHFENCENVPROC) (GLuint fence); +typedef void ( * PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); + + + + + +__attribute__((visibility("default"))) void glMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); +__attribute__((visibility("default"))) void glMapParameterivNV (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glMapParameterfvNV (GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glGetMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); +__attribute__((visibility("default"))) void glGetMapParameterivNV (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetMapParameterfvNV (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetMapAttribParameterivNV (GLenum target, GLuint index, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetMapAttribParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glEvalMapsNV (GLenum target, GLenum mode); + +typedef void ( * PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); +typedef void ( * PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); +typedef void ( * PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); +typedef void ( * PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); +typedef void ( * PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode); +# 8757 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glCombinerStageParameterfvNV (GLenum stage, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname, GLfloat *params); + +typedef void ( * PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params); +# 8787 "../../include/GL/glext.h" +__attribute__((visibility("default"))) GLboolean glAreProgramsResidentNV (GLsizei n, const GLuint *programs, GLboolean *residences); +__attribute__((visibility("default"))) void glBindProgramNV (GLenum target, GLuint id); +__attribute__((visibility("default"))) void glDeleteProgramsNV (GLsizei n, const GLuint *programs); +__attribute__((visibility("default"))) void glExecuteProgramNV (GLenum target, GLuint id, const GLfloat *params); +__attribute__((visibility("default"))) void glGenProgramsNV (GLsizei n, GLuint *programs); +__attribute__((visibility("default"))) void glGetProgramParameterdvNV (GLenum target, GLuint index, GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) void glGetProgramParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetProgramivNV (GLuint id, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetProgramStringNV (GLuint id, GLenum pname, GLubyte *program); +__attribute__((visibility("default"))) void glGetTrackMatrixivNV (GLenum target, GLuint address, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVertexAttribdvNV (GLuint index, GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) void glGetVertexAttribfvNV (GLuint index, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetVertexAttribivNV (GLuint index, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVertexAttribPointervNV (GLuint index, GLenum pname, GLvoid* *pointer); +__attribute__((visibility("default"))) GLboolean glIsProgramNV (GLuint id); +__attribute__((visibility("default"))) void glLoadProgramNV (GLenum target, GLuint id, GLsizei len, const GLubyte *program); +__attribute__((visibility("default"))) void glProgramParameter4dNV (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glProgramParameter4dvNV (GLenum target, GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glProgramParameter4fNV (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glProgramParameter4fvNV (GLenum target, GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glProgramParameters4dvNV (GLenum target, GLuint index, GLsizei count, const GLdouble *v); +__attribute__((visibility("default"))) void glProgramParameters4fvNV (GLenum target, GLuint index, GLsizei count, const GLfloat *v); +__attribute__((visibility("default"))) void glRequestResidentProgramsNV (GLsizei n, const GLuint *programs); +__attribute__((visibility("default"))) void glTrackMatrixNV (GLenum target, GLuint address, GLenum matrix, GLenum transform); +__attribute__((visibility("default"))) void glVertexAttribPointerNV (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glVertexAttrib1dNV (GLuint index, GLdouble x); +__attribute__((visibility("default"))) void glVertexAttrib1dvNV (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib1fNV (GLuint index, GLfloat x); +__attribute__((visibility("default"))) void glVertexAttrib1fvNV (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib1sNV (GLuint index, GLshort x); +__attribute__((visibility("default"))) void glVertexAttrib1svNV (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib2dNV (GLuint index, GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glVertexAttrib2dvNV (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib2fNV (GLuint index, GLfloat x, GLfloat y); +__attribute__((visibility("default"))) void glVertexAttrib2fvNV (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib2sNV (GLuint index, GLshort x, GLshort y); +__attribute__((visibility("default"))) void glVertexAttrib2svNV (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib3dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glVertexAttrib3dvNV (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib3fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glVertexAttrib3fvNV (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib3sNV (GLuint index, GLshort x, GLshort y, GLshort z); +__attribute__((visibility("default"))) void glVertexAttrib3svNV (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib4dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glVertexAttrib4dvNV (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib4fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glVertexAttrib4fvNV (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib4sNV (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +__attribute__((visibility("default"))) void glVertexAttrib4svNV (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib4ubNV (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +__attribute__((visibility("default"))) void glVertexAttrib4ubvNV (GLuint index, const GLubyte *v); +__attribute__((visibility("default"))) void glVertexAttribs1dvNV (GLuint index, GLsizei count, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribs1fvNV (GLuint index, GLsizei count, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttribs1svNV (GLuint index, GLsizei count, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttribs2dvNV (GLuint index, GLsizei count, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribs2fvNV (GLuint index, GLsizei count, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttribs2svNV (GLuint index, GLsizei count, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttribs3dvNV (GLuint index, GLsizei count, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribs3fvNV (GLuint index, GLsizei count, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttribs3svNV (GLuint index, GLsizei count, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttribs4dvNV (GLuint index, GLsizei count, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribs4fvNV (GLuint index, GLsizei count, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttribs4svNV (GLuint index, GLsizei count, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttribs4ubvNV (GLuint index, GLsizei count, const GLubyte *v); + +typedef GLboolean ( * PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences); +typedef void ( * PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); +typedef void ( * PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); +typedef void ( * PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params); +typedef void ( * PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); +typedef void ( * PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params); +typedef void ( * PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void ( * PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program); +typedef void ( * PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void ( * PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); +typedef GLboolean ( * PFNGLISPROGRAMNVPROC) (GLuint id); +typedef void ( * PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); +typedef void ( * PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v); +typedef void ( * PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v); +typedef void ( * PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLdouble *v); +typedef void ( * PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *v); +typedef void ( * PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); +typedef void ( * PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); +typedef void ( * PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x); +typedef void ( * PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); +typedef void ( * PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); +typedef void ( * PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void ( * PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void ( * PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); +typedef void ( * PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void ( * PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void ( * PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void ( * PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v); +typedef void ( * PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v); +# 8945 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glTexBumpParameterivATI (GLenum pname, const GLint *param); +__attribute__((visibility("default"))) void glTexBumpParameterfvATI (GLenum pname, const GLfloat *param); +__attribute__((visibility("default"))) void glGetTexBumpParameterivATI (GLenum pname, GLint *param); +__attribute__((visibility("default"))) void glGetTexBumpParameterfvATI (GLenum pname, GLfloat *param); + +typedef void ( * PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param); +typedef void ( * PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param); +typedef void ( * PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param); +typedef void ( * PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param); + + + + + +__attribute__((visibility("default"))) GLuint glGenFragmentShadersATI (GLuint range); +__attribute__((visibility("default"))) void glBindFragmentShaderATI (GLuint id); +__attribute__((visibility("default"))) void glDeleteFragmentShaderATI (GLuint id); +__attribute__((visibility("default"))) void glBeginFragmentShaderATI (void); +__attribute__((visibility("default"))) void glEndFragmentShaderATI (void); +__attribute__((visibility("default"))) void glPassTexCoordATI (GLuint dst, GLuint coord, GLenum swizzle); +__attribute__((visibility("default"))) void glSampleMapATI (GLuint dst, GLuint interp, GLenum swizzle); +__attribute__((visibility("default"))) void glColorFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +__attribute__((visibility("default"))) void glColorFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +__attribute__((visibility("default"))) void glColorFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +__attribute__((visibility("default"))) void glAlphaFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +__attribute__((visibility("default"))) void glAlphaFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +__attribute__((visibility("default"))) void glAlphaFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +__attribute__((visibility("default"))) void glSetFragmentShaderConstantATI (GLuint dst, const GLfloat *value); + +typedef GLuint ( * PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range); +typedef void ( * PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id); +typedef void ( * PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id); +typedef void ( * PFNGLBEGINFRAGMENTSHADERATIPROC) (void); +typedef void ( * PFNGLENDFRAGMENTSHADERATIPROC) (void); +typedef void ( * PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle); +typedef void ( * PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle); +typedef void ( * PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void ( * PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +typedef void ( * PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void ( * PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void ( * PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +typedef void ( * PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void ( * PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value); + + + + + +__attribute__((visibility("default"))) void glPNTrianglesiATI (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glPNTrianglesfATI (GLenum pname, GLfloat param); + +typedef void ( * PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param); +typedef void ( * PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param); + + + + + +__attribute__((visibility("default"))) GLuint glNewObjectBufferATI (GLsizei size, const GLvoid *pointer, GLenum usage); +__attribute__((visibility("default"))) GLboolean glIsObjectBufferATI (GLuint buffer); +__attribute__((visibility("default"))) void glUpdateObjectBufferATI (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); +__attribute__((visibility("default"))) void glGetObjectBufferfvATI (GLuint buffer, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetObjectBufferivATI (GLuint buffer, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glFreeObjectBufferATI (GLuint buffer); +__attribute__((visibility("default"))) void glArrayObjectATI (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +__attribute__((visibility("default"))) void glGetArrayObjectfvATI (GLenum array, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetArrayObjectivATI (GLenum array, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glVariantArrayObjectATI (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +__attribute__((visibility("default"))) void glGetVariantArrayObjectfvATI (GLuint id, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetVariantArrayObjectivATI (GLuint id, GLenum pname, GLint *params); + +typedef GLuint ( * PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage); +typedef GLboolean ( * PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void ( * PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); +typedef void ( * PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params); +typedef void ( * PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void ( * PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void ( * PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params); +typedef void ( * PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void ( * PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params); + + + + + +__attribute__((visibility("default"))) void glBeginVertexShaderEXT (void); +__attribute__((visibility("default"))) void glEndVertexShaderEXT (void); +__attribute__((visibility("default"))) void glBindVertexShaderEXT (GLuint id); +__attribute__((visibility("default"))) GLuint glGenVertexShadersEXT (GLuint range); +__attribute__((visibility("default"))) void glDeleteVertexShaderEXT (GLuint id); +__attribute__((visibility("default"))) void glShaderOp1EXT (GLenum op, GLuint res, GLuint arg1); +__attribute__((visibility("default"))) void glShaderOp2EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2); +__attribute__((visibility("default"))) void glShaderOp3EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); +__attribute__((visibility("default"))) void glSwizzleEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +__attribute__((visibility("default"))) void glWriteMaskEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +__attribute__((visibility("default"))) void glInsertComponentEXT (GLuint res, GLuint src, GLuint num); +__attribute__((visibility("default"))) void glExtractComponentEXT (GLuint res, GLuint src, GLuint num); +__attribute__((visibility("default"))) GLuint glGenSymbolsEXT (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); +__attribute__((visibility("default"))) void glSetInvariantEXT (GLuint id, GLenum type, const GLvoid *addr); +__attribute__((visibility("default"))) void glSetLocalConstantEXT (GLuint id, GLenum type, const GLvoid *addr); +__attribute__((visibility("default"))) void glVariantbvEXT (GLuint id, const GLbyte *addr); +__attribute__((visibility("default"))) void glVariantsvEXT (GLuint id, const GLshort *addr); +__attribute__((visibility("default"))) void glVariantivEXT (GLuint id, const GLint *addr); +__attribute__((visibility("default"))) void glVariantfvEXT (GLuint id, const GLfloat *addr); +__attribute__((visibility("default"))) void glVariantdvEXT (GLuint id, const GLdouble *addr); +__attribute__((visibility("default"))) void glVariantubvEXT (GLuint id, const GLubyte *addr); +__attribute__((visibility("default"))) void glVariantusvEXT (GLuint id, const GLushort *addr); +__attribute__((visibility("default"))) void glVariantuivEXT (GLuint id, const GLuint *addr); +__attribute__((visibility("default"))) void glVariantPointerEXT (GLuint id, GLenum type, GLuint stride, const GLvoid *addr); +__attribute__((visibility("default"))) void glEnableVariantClientStateEXT (GLuint id); +__attribute__((visibility("default"))) void glDisableVariantClientStateEXT (GLuint id); +__attribute__((visibility("default"))) GLuint glBindLightParameterEXT (GLenum light, GLenum value); +__attribute__((visibility("default"))) GLuint glBindMaterialParameterEXT (GLenum face, GLenum value); +__attribute__((visibility("default"))) GLuint glBindTexGenParameterEXT (GLenum unit, GLenum coord, GLenum value); +__attribute__((visibility("default"))) GLuint glBindTextureUnitParameterEXT (GLenum unit, GLenum value); +__attribute__((visibility("default"))) GLuint glBindParameterEXT (GLenum value); +__attribute__((visibility("default"))) GLboolean glIsVariantEnabledEXT (GLuint id, GLenum cap); +__attribute__((visibility("default"))) void glGetVariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); +__attribute__((visibility("default"))) void glGetVariantIntegervEXT (GLuint id, GLenum value, GLint *data); +__attribute__((visibility("default"))) void glGetVariantFloatvEXT (GLuint id, GLenum value, GLfloat *data); +__attribute__((visibility("default"))) void glGetVariantPointervEXT (GLuint id, GLenum value, GLvoid* *data); +__attribute__((visibility("default"))) void glGetInvariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); +__attribute__((visibility("default"))) void glGetInvariantIntegervEXT (GLuint id, GLenum value, GLint *data); +__attribute__((visibility("default"))) void glGetInvariantFloatvEXT (GLuint id, GLenum value, GLfloat *data); +__attribute__((visibility("default"))) void glGetLocalConstantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); +__attribute__((visibility("default"))) void glGetLocalConstantIntegervEXT (GLuint id, GLenum value, GLint *data); +__attribute__((visibility("default"))) void glGetLocalConstantFloatvEXT (GLuint id, GLenum value, GLfloat *data); + +typedef void ( * PFNGLBEGINVERTEXSHADEREXTPROC) (void); +typedef void ( * PFNGLENDVERTEXSHADEREXTPROC) (void); +typedef void ( * PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id); +typedef GLuint ( * PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range); +typedef void ( * PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id); +typedef void ( * PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1); +typedef void ( * PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); +typedef void ( * PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); +typedef void ( * PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void ( * PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void ( * PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef void ( * PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef GLuint ( * PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); +typedef void ( * PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); +typedef void ( * PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); +typedef void ( * PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr); +typedef void ( * PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr); +typedef void ( * PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr); +typedef void ( * PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr); +typedef void ( * PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr); +typedef void ( * PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr); +typedef void ( * PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr); +typedef void ( * PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr); +typedef void ( * PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr); +typedef void ( * PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); +typedef void ( * PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); +typedef GLuint ( * PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value); +typedef GLuint ( * PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value); +typedef GLuint ( * PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value); +typedef GLuint ( * PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value); +typedef GLuint ( * PFNGLBINDPARAMETEREXTPROC) (GLenum value); +typedef GLboolean ( * PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap); +typedef void ( * PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void ( * PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void ( * PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +typedef void ( * PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data); +typedef void ( * PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void ( * PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void ( * PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +typedef void ( * PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void ( * PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void ( * PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); + + + + + +__attribute__((visibility("default"))) void glVertexStream1sATI (GLenum stream, GLshort x); +__attribute__((visibility("default"))) void glVertexStream1svATI (GLenum stream, const GLshort *coords); +__attribute__((visibility("default"))) void glVertexStream1iATI (GLenum stream, GLint x); +__attribute__((visibility("default"))) void glVertexStream1ivATI (GLenum stream, const GLint *coords); +__attribute__((visibility("default"))) void glVertexStream1fATI (GLenum stream, GLfloat x); +__attribute__((visibility("default"))) void glVertexStream1fvATI (GLenum stream, const GLfloat *coords); +__attribute__((visibility("default"))) void glVertexStream1dATI (GLenum stream, GLdouble x); +__attribute__((visibility("default"))) void glVertexStream1dvATI (GLenum stream, const GLdouble *coords); +__attribute__((visibility("default"))) void glVertexStream2sATI (GLenum stream, GLshort x, GLshort y); +__attribute__((visibility("default"))) void glVertexStream2svATI (GLenum stream, const GLshort *coords); +__attribute__((visibility("default"))) void glVertexStream2iATI (GLenum stream, GLint x, GLint y); +__attribute__((visibility("default"))) void glVertexStream2ivATI (GLenum stream, const GLint *coords); +__attribute__((visibility("default"))) void glVertexStream2fATI (GLenum stream, GLfloat x, GLfloat y); +__attribute__((visibility("default"))) void glVertexStream2fvATI (GLenum stream, const GLfloat *coords); +__attribute__((visibility("default"))) void glVertexStream2dATI (GLenum stream, GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glVertexStream2dvATI (GLenum stream, const GLdouble *coords); +__attribute__((visibility("default"))) void glVertexStream3sATI (GLenum stream, GLshort x, GLshort y, GLshort z); +__attribute__((visibility("default"))) void glVertexStream3svATI (GLenum stream, const GLshort *coords); +__attribute__((visibility("default"))) void glVertexStream3iATI (GLenum stream, GLint x, GLint y, GLint z); +__attribute__((visibility("default"))) void glVertexStream3ivATI (GLenum stream, const GLint *coords); +__attribute__((visibility("default"))) void glVertexStream3fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glVertexStream3fvATI (GLenum stream, const GLfloat *coords); +__attribute__((visibility("default"))) void glVertexStream3dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glVertexStream3dvATI (GLenum stream, const GLdouble *coords); +__attribute__((visibility("default"))) void glVertexStream4sATI (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); +__attribute__((visibility("default"))) void glVertexStream4svATI (GLenum stream, const GLshort *coords); +__attribute__((visibility("default"))) void glVertexStream4iATI (GLenum stream, GLint x, GLint y, GLint z, GLint w); +__attribute__((visibility("default"))) void glVertexStream4ivATI (GLenum stream, const GLint *coords); +__attribute__((visibility("default"))) void glVertexStream4fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glVertexStream4fvATI (GLenum stream, const GLfloat *coords); +__attribute__((visibility("default"))) void glVertexStream4dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glVertexStream4dvATI (GLenum stream, const GLdouble *coords); +__attribute__((visibility("default"))) void glNormalStream3bATI (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); +__attribute__((visibility("default"))) void glNormalStream3bvATI (GLenum stream, const GLbyte *coords); +__attribute__((visibility("default"))) void glNormalStream3sATI (GLenum stream, GLshort nx, GLshort ny, GLshort nz); +__attribute__((visibility("default"))) void glNormalStream3svATI (GLenum stream, const GLshort *coords); +__attribute__((visibility("default"))) void glNormalStream3iATI (GLenum stream, GLint nx, GLint ny, GLint nz); +__attribute__((visibility("default"))) void glNormalStream3ivATI (GLenum stream, const GLint *coords); +__attribute__((visibility("default"))) void glNormalStream3fATI (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); +__attribute__((visibility("default"))) void glNormalStream3fvATI (GLenum stream, const GLfloat *coords); +__attribute__((visibility("default"))) void glNormalStream3dATI (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); +__attribute__((visibility("default"))) void glNormalStream3dvATI (GLenum stream, const GLdouble *coords); +__attribute__((visibility("default"))) void glClientActiveVertexStreamATI (GLenum stream); +__attribute__((visibility("default"))) void glVertexBlendEnviATI (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glVertexBlendEnvfATI (GLenum pname, GLfloat param); + +typedef void ( * PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x); +typedef void ( * PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void ( * PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x); +typedef void ( * PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords); +typedef void ( * PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x); +typedef void ( * PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void ( * PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x); +typedef void ( * PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void ( * PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y); +typedef void ( * PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void ( * PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y); +typedef void ( * PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords); +typedef void ( * PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y); +typedef void ( * PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void ( * PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y); +typedef void ( * PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void ( * PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); +typedef void ( * PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void ( * PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); +typedef void ( * PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); +typedef void ( * PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void ( * PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void ( * PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void ( * PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void ( * PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); +typedef void ( * PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords); +typedef void ( * PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void ( * PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void ( * PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); +typedef void ( * PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords); +typedef void ( * PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz); +typedef void ( * PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void ( * PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz); +typedef void ( * PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); +typedef void ( * PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); +typedef void ( * PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void ( * PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); +typedef void ( * PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void ( * PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream); +typedef void ( * PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param); +typedef void ( * PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param); + + + + + +__attribute__((visibility("default"))) void glElementPointerATI (GLenum type, const GLvoid *pointer); +__attribute__((visibility("default"))) void glDrawElementArrayATI (GLenum mode, GLsizei count); +__attribute__((visibility("default"))) void glDrawRangeElementArrayATI (GLenum mode, GLuint start, GLuint end, GLsizei count); + +typedef void ( * PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer); +typedef void ( * PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count); +typedef void ( * PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); + + + + + +__attribute__((visibility("default"))) void glDrawMeshArraysSUN (GLenum mode, GLint first, GLsizei count, GLsizei width); + +typedef void ( * PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width); +# 9251 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glGenOcclusionQueriesNV (GLsizei n, GLuint *ids); +__attribute__((visibility("default"))) void glDeleteOcclusionQueriesNV (GLsizei n, const GLuint *ids); +__attribute__((visibility("default"))) GLboolean glIsOcclusionQueryNV (GLuint id); +__attribute__((visibility("default"))) void glBeginOcclusionQueryNV (GLuint id); +__attribute__((visibility("default"))) void glEndOcclusionQueryNV (void); +__attribute__((visibility("default"))) void glGetOcclusionQueryivNV (GLuint id, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetOcclusionQueryuivNV (GLuint id, GLenum pname, GLuint *params); + +typedef void ( * PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids); +typedef void ( * PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean ( * PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id); +typedef void ( * PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id); +typedef void ( * PFNGLENDOCCLUSIONQUERYNVPROC) (void); +typedef void ( * PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void ( * PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params); + + + + + +__attribute__((visibility("default"))) void glPointParameteriNV (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glPointParameterivNV (GLenum pname, const GLint *params); + +typedef void ( * PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param); +typedef void ( * PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params); +# 9293 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glActiveStencilFaceEXT (GLenum face); + +typedef void ( * PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face); +# 9309 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glElementPointerAPPLE (GLenum type, const GLvoid *pointer); +__attribute__((visibility("default"))) void glDrawElementArrayAPPLE (GLenum mode, GLint first, GLsizei count); +__attribute__((visibility("default"))) void glDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); +__attribute__((visibility("default"))) void glMultiDrawElementArrayAPPLE (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +__attribute__((visibility("default"))) void glMultiDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); + +typedef void ( * PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer); +typedef void ( * PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count); +typedef void ( * PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); +typedef void ( * PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void ( * PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); + + + + + +__attribute__((visibility("default"))) void glGenFencesAPPLE (GLsizei n, GLuint *fences); +__attribute__((visibility("default"))) void glDeleteFencesAPPLE (GLsizei n, const GLuint *fences); +__attribute__((visibility("default"))) void glSetFenceAPPLE (GLuint fence); +__attribute__((visibility("default"))) GLboolean glIsFenceAPPLE (GLuint fence); +__attribute__((visibility("default"))) GLboolean glTestFenceAPPLE (GLuint fence); +__attribute__((visibility("default"))) void glFinishFenceAPPLE (GLuint fence); +__attribute__((visibility("default"))) GLboolean glTestObjectAPPLE (GLenum object, GLuint name); +__attribute__((visibility("default"))) void glFinishObjectAPPLE (GLenum object, GLint name); + +typedef void ( * PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences); +typedef void ( * PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences); +typedef void ( * PFNGLSETFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean ( * PFNGLISFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean ( * PFNGLTESTFENCEAPPLEPROC) (GLuint fence); +typedef void ( * PFNGLFINISHFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean ( * PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name); +typedef void ( * PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name); + + + + + +__attribute__((visibility("default"))) void glBindVertexArrayAPPLE (GLuint array); +__attribute__((visibility("default"))) void glDeleteVertexArraysAPPLE (GLsizei n, const GLuint *arrays); +__attribute__((visibility("default"))) void glGenVertexArraysAPPLE (GLsizei n, GLuint *arrays); +__attribute__((visibility("default"))) GLboolean glIsVertexArrayAPPLE (GLuint array); + +typedef void ( * PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array); +typedef void ( * PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays); +typedef void ( * PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean ( * PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array); + + + + + +__attribute__((visibility("default"))) void glVertexArrayRangeAPPLE (GLsizei length, GLvoid *pointer); +__attribute__((visibility("default"))) void glFlushVertexArrayRangeAPPLE (GLsizei length, GLvoid *pointer); +__attribute__((visibility("default"))) void glVertexArrayParameteriAPPLE (GLenum pname, GLint param); + +typedef void ( * PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); +typedef void ( * PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); +typedef void ( * PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param); +# 9381 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glDrawBuffersATI (GLsizei n, const GLenum *bufs); + +typedef void ( * PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs); +# 9409 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glProgramNamedParameter4fNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glProgramNamedParameter4dNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glProgramNamedParameter4fvNV (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); +__attribute__((visibility("default"))) void glProgramNamedParameter4dvNV (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); +__attribute__((visibility("default"))) void glGetProgramNamedParameterfvNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); +__attribute__((visibility("default"))) void glGetProgramNamedParameterdvNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); + +typedef void ( * PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); +typedef void ( * PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); +typedef void ( * PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); +typedef void ( * PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); + + + + + +__attribute__((visibility("default"))) void glVertex2hNV (GLhalfNV x, GLhalfNV y); +__attribute__((visibility("default"))) void glVertex2hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertex3hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z); +__attribute__((visibility("default"))) void glVertex3hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertex4hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +__attribute__((visibility("default"))) void glVertex4hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glNormal3hNV (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); +__attribute__((visibility("default"))) void glNormal3hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +__attribute__((visibility("default"))) void glColor3hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glColor4hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); +__attribute__((visibility("default"))) void glColor4hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glTexCoord1hNV (GLhalfNV s); +__attribute__((visibility("default"))) void glTexCoord1hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glTexCoord2hNV (GLhalfNV s, GLhalfNV t); +__attribute__((visibility("default"))) void glTexCoord2hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glTexCoord3hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r); +__attribute__((visibility("default"))) void glTexCoord3hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glTexCoord4hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +__attribute__((visibility("default"))) void glTexCoord4hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glMultiTexCoord1hNV (GLenum target, GLhalfNV s); +__attribute__((visibility("default"))) void glMultiTexCoord1hvNV (GLenum target, const GLhalfNV *v); +__attribute__((visibility("default"))) void glMultiTexCoord2hNV (GLenum target, GLhalfNV s, GLhalfNV t); +__attribute__((visibility("default"))) void glMultiTexCoord2hvNV (GLenum target, const GLhalfNV *v); +__attribute__((visibility("default"))) void glMultiTexCoord3hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); +__attribute__((visibility("default"))) void glMultiTexCoord3hvNV (GLenum target, const GLhalfNV *v); +__attribute__((visibility("default"))) void glMultiTexCoord4hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +__attribute__((visibility("default"))) void glMultiTexCoord4hvNV (GLenum target, const GLhalfNV *v); +__attribute__((visibility("default"))) void glFogCoordhNV (GLhalfNV fog); +__attribute__((visibility("default"))) void glFogCoordhvNV (const GLhalfNV *fog); +__attribute__((visibility("default"))) void glSecondaryColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +__attribute__((visibility("default"))) void glSecondaryColor3hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertexWeighthNV (GLhalfNV weight); +__attribute__((visibility("default"))) void glVertexWeighthvNV (const GLhalfNV *weight); +__attribute__((visibility("default"))) void glVertexAttrib1hNV (GLuint index, GLhalfNV x); +__attribute__((visibility("default"))) void glVertexAttrib1hvNV (GLuint index, const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertexAttrib2hNV (GLuint index, GLhalfNV x, GLhalfNV y); +__attribute__((visibility("default"))) void glVertexAttrib2hvNV (GLuint index, const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertexAttrib3hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); +__attribute__((visibility("default"))) void glVertexAttrib3hvNV (GLuint index, const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertexAttrib4hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +__attribute__((visibility("default"))) void glVertexAttrib4hvNV (GLuint index, const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertexAttribs1hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertexAttribs2hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertexAttribs3hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfNV *v); + +typedef void ( * PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y); +typedef void ( * PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z); +typedef void ( * PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +typedef void ( * PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); +typedef void ( * PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +typedef void ( * PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); +typedef void ( * PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLTEXCOORD1HNVPROC) (GLhalfNV s); +typedef void ( * PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t); +typedef void ( * PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r); +typedef void ( * PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +typedef void ( * PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s); +typedef void ( * PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void ( * PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t); +typedef void ( * PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void ( * PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); +typedef void ( * PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void ( * PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +typedef void ( * PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void ( * PFNGLFOGCOORDHNVPROC) (GLhalfNV fog); +typedef void ( * PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog); +typedef void ( * PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +typedef void ( * PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight); +typedef void ( * PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight); +typedef void ( * PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x); +typedef void ( * PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void ( * PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y); +typedef void ( * PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void ( * PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); +typedef void ( * PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void ( * PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +typedef void ( * PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void ( * PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void ( * PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void ( * PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void ( * PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); + + + + + +__attribute__((visibility("default"))) void glPixelDataRangeNV (GLenum target, GLsizei length, GLvoid *pointer); +__attribute__((visibility("default"))) void glFlushPixelDataRangeNV (GLenum target); + +typedef void ( * PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer); +typedef void ( * PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target); + + + + + +__attribute__((visibility("default"))) void glPrimitiveRestartNV (void); +__attribute__((visibility("default"))) void glPrimitiveRestartIndexNV (GLuint index); + +typedef void ( * PFNGLPRIMITIVERESTARTNVPROC) (void); +typedef void ( * PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index); +# 9553 "../../include/GL/glext.h" +__attribute__((visibility("default"))) GLvoid* glMapObjectBufferATI (GLuint buffer); +__attribute__((visibility("default"))) void glUnmapObjectBufferATI (GLuint buffer); + +typedef GLvoid* ( * PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void ( * PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer); + + + + + +__attribute__((visibility("default"))) void glStencilOpSeparateATI (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +__attribute__((visibility("default"))) void glStencilFuncSeparateATI (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); + +typedef void ( * PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void ( * PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); + + + + + +__attribute__((visibility("default"))) void glVertexAttribArrayObjectATI (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); +__attribute__((visibility("default"))) void glGetVertexAttribArrayObjectfvATI (GLuint index, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetVertexAttribArrayObjectivATI (GLuint index, GLenum pname, GLint *params); + +typedef void ( * PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); +typedef void ( * PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params); +# 9589 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glDepthBoundsEXT (GLclampd zmin, GLclampd zmax); + +typedef void ( * PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax); +# 9601 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glBlendEquationSeparateEXT (GLenum modeRGB, GLenum modeAlpha); + +typedef void ( * PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha); +# 9637 "../../include/GL/glext.h" +__attribute__((visibility("default"))) GLboolean glIsRenderbufferEXT (GLuint renderbuffer); +__attribute__((visibility("default"))) void glBindRenderbufferEXT (GLenum target, GLuint renderbuffer); +__attribute__((visibility("default"))) void glDeleteRenderbuffersEXT (GLsizei n, const GLuint *renderbuffers); +__attribute__((visibility("default"))) void glGenRenderbuffersEXT (GLsizei n, GLuint *renderbuffers); +__attribute__((visibility("default"))) void glRenderbufferStorageEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glGetRenderbufferParameterivEXT (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) GLboolean glIsFramebufferEXT (GLuint framebuffer); +__attribute__((visibility("default"))) void glBindFramebufferEXT (GLenum target, GLuint framebuffer); +__attribute__((visibility("default"))) void glDeleteFramebuffersEXT (GLsizei n, const GLuint *framebuffers); +__attribute__((visibility("default"))) void glGenFramebuffersEXT (GLsizei n, GLuint *framebuffers); +__attribute__((visibility("default"))) GLenum glCheckFramebufferStatusEXT (GLenum target); +__attribute__((visibility("default"))) void glFramebufferTexture1DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glFramebufferTexture2DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glFramebufferTexture3DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +__attribute__((visibility("default"))) void glFramebufferRenderbufferEXT (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +__attribute__((visibility("default"))) void glGetFramebufferAttachmentParameterivEXT (GLenum target, GLenum attachment, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGenerateMipmapEXT (GLenum target); + +typedef GLboolean ( * PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer); +typedef void ( * PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer); +typedef void ( * PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers); +typedef void ( * PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers); +typedef void ( * PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void ( * PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef GLboolean ( * PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer); +typedef void ( * PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer); +typedef void ( * PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers); +typedef void ( * PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers); +typedef GLenum ( * PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target); +typedef void ( * PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void ( * PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void ( * PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void ( * PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void ( * PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); +typedef void ( * PFNGLGENERATEMIPMAPEXTPROC) (GLenum target); + + + + + +__attribute__((visibility("default"))) void glStringMarkerGREMEDY (GLsizei len, const GLvoid *string); + +typedef void ( * PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string); +# 9689 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glStencilClearTagEXT (GLsizei stencilTagBits, GLuint stencilClearTag); + +typedef void ( * PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag); +# 9701 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); + +typedef void ( * PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); + + + + + +__attribute__((visibility("default"))) void glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); + +typedef void ( * PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +# 9721 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64EXT *params); +__attribute__((visibility("default"))) void glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64EXT *params); + +typedef void ( * PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params); +typedef void ( * PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params); + + + + + +__attribute__((visibility("default"))) void glProgramEnvParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +__attribute__((visibility("default"))) void glProgramLocalParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params); + +typedef void ( * PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +typedef void ( * PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); + + + + + +__attribute__((visibility("default"))) void glBufferParameteriAPPLE (GLenum target, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glFlushMappedBufferRangeAPPLE (GLenum target, GLintptr offset, GLsizeiptr size); + +typedef void ( * PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param); +typedef void ( * PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size); + + + + + +__attribute__((visibility("default"))) void glProgramLocalParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +__attribute__((visibility("default"))) void glProgramLocalParameterI4ivNV (GLenum target, GLuint index, const GLint *params); +__attribute__((visibility("default"))) void glProgramLocalParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params); +__attribute__((visibility("default"))) void glProgramLocalParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +__attribute__((visibility("default"))) void glProgramLocalParameterI4uivNV (GLenum target, GLuint index, const GLuint *params); +__attribute__((visibility("default"))) void glProgramLocalParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params); +__attribute__((visibility("default"))) void glProgramEnvParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +__attribute__((visibility("default"))) void glProgramEnvParameterI4ivNV (GLenum target, GLuint index, const GLint *params); +__attribute__((visibility("default"))) void glProgramEnvParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params); +__attribute__((visibility("default"))) void glProgramEnvParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +__attribute__((visibility("default"))) void glProgramEnvParameterI4uivNV (GLenum target, GLuint index, const GLuint *params); +__attribute__((visibility("default"))) void glProgramEnvParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params); +__attribute__((visibility("default"))) void glGetProgramLocalParameterIivNV (GLenum target, GLuint index, GLint *params); +__attribute__((visibility("default"))) void glGetProgramLocalParameterIuivNV (GLenum target, GLuint index, GLuint *params); +__attribute__((visibility("default"))) void glGetProgramEnvParameterIivNV (GLenum target, GLuint index, GLint *params); +__attribute__((visibility("default"))) void glGetProgramEnvParameterIuivNV (GLenum target, GLuint index, GLuint *params); + +typedef void ( * PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void ( * PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); +typedef void ( * PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void ( * PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void ( * PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); +typedef void ( * PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void ( * PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void ( * PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); +typedef void ( * PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void ( * PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void ( * PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); +typedef void ( * PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void ( * PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); +typedef void ( * PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); +typedef void ( * PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); +typedef void ( * PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); + + + + + +__attribute__((visibility("default"))) void glProgramVertexLimitNV (GLenum target, GLint limit); +__attribute__((visibility("default"))) void glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glFramebufferTextureLayerEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +__attribute__((visibility("default"))) void glFramebufferTextureFaceEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); + +typedef void ( * PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit); +typedef void ( * PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void ( * PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void ( * PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); + + + + + +__attribute__((visibility("default"))) void glProgramParameteriEXT (GLuint program, GLenum pname, GLint value); + +typedef void ( * PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value); + + + + + +__attribute__((visibility("default"))) void glVertexAttribI1iEXT (GLuint index, GLint x); +__attribute__((visibility("default"))) void glVertexAttribI2iEXT (GLuint index, GLint x, GLint y); +__attribute__((visibility("default"))) void glVertexAttribI3iEXT (GLuint index, GLint x, GLint y, GLint z); +__attribute__((visibility("default"))) void glVertexAttribI4iEXT (GLuint index, GLint x, GLint y, GLint z, GLint w); +__attribute__((visibility("default"))) void glVertexAttribI1uiEXT (GLuint index, GLuint x); +__attribute__((visibility("default"))) void glVertexAttribI2uiEXT (GLuint index, GLuint x, GLuint y); +__attribute__((visibility("default"))) void glVertexAttribI3uiEXT (GLuint index, GLuint x, GLuint y, GLuint z); +__attribute__((visibility("default"))) void glVertexAttribI4uiEXT (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +__attribute__((visibility("default"))) void glVertexAttribI1ivEXT (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttribI2ivEXT (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttribI3ivEXT (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttribI4ivEXT (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttribI1uivEXT (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttribI2uivEXT (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttribI3uivEXT (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttribI4uivEXT (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttribI4bvEXT (GLuint index, const GLbyte *v); +__attribute__((visibility("default"))) void glVertexAttribI4svEXT (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttribI4ubvEXT (GLuint index, const GLubyte *v); +__attribute__((visibility("default"))) void glVertexAttribI4usvEXT (GLuint index, const GLushort *v); +__attribute__((visibility("default"))) void glVertexAttribIPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glGetVertexAttribIivEXT (GLuint index, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVertexAttribIuivEXT (GLuint index, GLenum pname, GLuint *params); + +typedef void ( * PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x); +typedef void ( * PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y); +typedef void ( * PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z); +typedef void ( * PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void ( * PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x); +typedef void ( * PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y); +typedef void ( * PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z); +typedef void ( * PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void ( * PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v); +typedef void ( * PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v); +typedef void ( * PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v); +typedef void ( * PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params); + + + + + +__attribute__((visibility("default"))) void glGetUniformuivEXT (GLuint program, GLint location, GLuint *params); +__attribute__((visibility("default"))) void glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name); +__attribute__((visibility("default"))) GLint glGetFragDataLocationEXT (GLuint program, const GLchar *name); +__attribute__((visibility("default"))) void glUniform1uiEXT (GLint location, GLuint v0); +__attribute__((visibility("default"))) void glUniform2uiEXT (GLint location, GLuint v0, GLuint v1); +__attribute__((visibility("default"))) void glUniform3uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2); +__attribute__((visibility("default"))) void glUniform4uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +__attribute__((visibility("default"))) void glUniform1uivEXT (GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glUniform2uivEXT (GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glUniform3uivEXT (GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glUniform4uivEXT (GLint location, GLsizei count, const GLuint *value); + +typedef void ( * PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params); +typedef void ( * PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name); +typedef GLint ( * PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name); +typedef void ( * PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0); +typedef void ( * PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1); +typedef void ( * PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void ( * PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void ( * PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); + + + + + +__attribute__((visibility("default"))) void glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount); +__attribute__((visibility("default"))) void glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); + +typedef void ( * PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount); +typedef void ( * PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +# 9909 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer); + +typedef void ( * PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer); +# 9929 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glDepthRangedNV (GLdouble zNear, GLdouble zFar); +__attribute__((visibility("default"))) void glClearDepthdNV (GLdouble depth); +__attribute__((visibility("default"))) void glDepthBoundsdNV (GLdouble zmin, GLdouble zmax); + +typedef void ( * PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar); +typedef void ( * PFNGLCLEARDEPTHDNVPROC) (GLdouble depth); +typedef void ( * PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax); +# 9945 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glRenderbufferStorageMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); + +typedef void ( * PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +# 9961 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glProgramBufferParametersfvNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params); +__attribute__((visibility("default"))) void glProgramBufferParametersIivNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params); +__attribute__((visibility("default"))) void glProgramBufferParametersIuivNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params); + +typedef void ( * PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params); +typedef void ( * PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params); +typedef void ( * PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params); + + + + + +__attribute__((visibility("default"))) void glColorMaskIndexedEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +__attribute__((visibility("default"))) void glGetBooleanIndexedvEXT (GLenum target, GLuint index, GLboolean *data); +__attribute__((visibility("default"))) void glGetIntegerIndexedvEXT (GLenum target, GLuint index, GLint *data); +__attribute__((visibility("default"))) void glEnableIndexedEXT (GLenum target, GLuint index); +__attribute__((visibility("default"))) void glDisableIndexedEXT (GLenum target, GLuint index); +__attribute__((visibility("default"))) GLboolean glIsEnabledIndexedEXT (GLenum target, GLuint index); + +typedef void ( * PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +typedef void ( * PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data); +typedef void ( * PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data); +typedef void ( * PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index); +typedef void ( * PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index); +typedef GLboolean ( * PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index); + + + + + +__attribute__((visibility("default"))) void glBeginTransformFeedbackNV (GLenum primitiveMode); +__attribute__((visibility("default"))) void glEndTransformFeedbackNV (void); +__attribute__((visibility("default"))) void glTransformFeedbackAttribsNV (GLuint count, const GLint *attribs, GLenum bufferMode); +__attribute__((visibility("default"))) void glBindBufferRangeNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +__attribute__((visibility("default"))) void glBindBufferOffsetNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +__attribute__((visibility("default"))) void glBindBufferBaseNV (GLenum target, GLuint index, GLuint buffer); +__attribute__((visibility("default"))) void glTransformFeedbackVaryingsNV (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); +__attribute__((visibility("default"))) void glActiveVaryingNV (GLuint program, const GLchar *name); +__attribute__((visibility("default"))) GLint glGetVaryingLocationNV (GLuint program, const GLchar *name); +__attribute__((visibility("default"))) void glGetActiveVaryingNV (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +__attribute__((visibility("default"))) void glGetTransformFeedbackVaryingNV (GLuint program, GLuint index, GLint *location); +__attribute__((visibility("default"))) void glTransformFeedbackStreamAttribsNV (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode); + +typedef void ( * PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode); +typedef void ( * PFNGLENDTRANSFORMFEEDBACKNVPROC) (void); +typedef void ( * PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode); +typedef void ( * PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void ( * PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +typedef void ( * PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void ( * PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); +typedef void ( * PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name); +typedef GLint ( * PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name); +typedef void ( * PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +typedef void ( * PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location); +typedef void ( * PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode); + + + + + +__attribute__((visibility("default"))) void glUniformBufferEXT (GLuint program, GLint location, GLuint buffer); +__attribute__((visibility("default"))) GLint glGetUniformBufferSizeEXT (GLuint program, GLint location); +__attribute__((visibility("default"))) GLintptr glGetUniformOffsetEXT (GLuint program, GLint location); + +typedef void ( * PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer); +typedef GLint ( * PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location); +typedef GLintptr ( * PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location); + + + + + +__attribute__((visibility("default"))) void glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params); +__attribute__((visibility("default"))) void glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glClearColorIiEXT (GLint red, GLint green, GLint blue, GLint alpha); +__attribute__((visibility("default"))) void glClearColorIuiEXT (GLuint red, GLuint green, GLuint blue, GLuint alpha); + +typedef void ( * PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params); +typedef void ( * PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params); +typedef void ( * PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha); +typedef void ( * PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha); + + + + + +__attribute__((visibility("default"))) void glFrameTerminatorGREMEDY (void); + +typedef void ( * PFNGLFRAMETERMINATORGREMEDYPROC) (void); + + + + + +__attribute__((visibility("default"))) void glBeginConditionalRenderNV (GLuint id, GLenum mode); +__attribute__((visibility("default"))) void glEndConditionalRenderNV (void); + +typedef void ( * PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode); +typedef void ( * PFNGLENDCONDITIONALRENDERNVPROC) (void); + + + + + +__attribute__((visibility("default"))) void glPresentFrameKeyedNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1); +__attribute__((visibility("default"))) void glPresentFrameDualFillNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3); +__attribute__((visibility("default"))) void glGetVideoivNV (GLuint video_slot, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVideouivNV (GLuint video_slot, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glGetVideoi64vNV (GLuint video_slot, GLenum pname, GLint64EXT *params); +__attribute__((visibility("default"))) void glGetVideoui64vNV (GLuint video_slot, GLenum pname, GLuint64EXT *params); + +typedef void ( * PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1); +typedef void ( * PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3); +typedef void ( * PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params); +typedef void ( * PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params); +typedef void ( * PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT *params); + + + + + +__attribute__((visibility("default"))) void glBeginTransformFeedbackEXT (GLenum primitiveMode); +__attribute__((visibility("default"))) void glEndTransformFeedbackEXT (void); +__attribute__((visibility("default"))) void glBindBufferRangeEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +__attribute__((visibility("default"))) void glBindBufferOffsetEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +__attribute__((visibility("default"))) void glBindBufferBaseEXT (GLenum target, GLuint index, GLuint buffer); +__attribute__((visibility("default"))) void glTransformFeedbackVaryingsEXT (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); +__attribute__((visibility("default"))) void glGetTransformFeedbackVaryingEXT (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); + +typedef void ( * PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode); +typedef void ( * PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void); +typedef void ( * PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void ( * PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +typedef void ( * PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void ( * PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); +typedef void ( * PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); + + + + + +__attribute__((visibility("default"))) void glClientAttribDefaultEXT (GLbitfield mask); +__attribute__((visibility("default"))) void glPushClientAttribDefaultEXT (GLbitfield mask); +__attribute__((visibility("default"))) void glMatrixLoadfEXT (GLenum mode, const GLfloat *m); +__attribute__((visibility("default"))) void glMatrixLoaddEXT (GLenum mode, const GLdouble *m); +__attribute__((visibility("default"))) void glMatrixMultfEXT (GLenum mode, const GLfloat *m); +__attribute__((visibility("default"))) void glMatrixMultdEXT (GLenum mode, const GLdouble *m); +__attribute__((visibility("default"))) void glMatrixLoadIdentityEXT (GLenum mode); +__attribute__((visibility("default"))) void glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +__attribute__((visibility("default"))) void glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +__attribute__((visibility("default"))) void glMatrixPopEXT (GLenum mode); +__attribute__((visibility("default"))) void glMatrixPushEXT (GLenum mode); +__attribute__((visibility("default"))) void glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m); +__attribute__((visibility("default"))) void glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m); +__attribute__((visibility("default"))) void glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m); +__attribute__((visibility("default"))) void glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m); +__attribute__((visibility("default"))) void glTextureParameterfEXT (GLuint texture, GLenum target, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glTextureParameteriEXT (GLuint texture, GLenum target, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glCopyTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +__attribute__((visibility("default"))) void glCopyTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +__attribute__((visibility("default"))) void glCopyTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glCopyTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glGetTextureImageEXT (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +__attribute__((visibility("default"))) void glGetTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetTextureLevelParameterfvEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetTextureLevelParameterivEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glCopyTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glMultiTexParameterfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glMultiTexParameteriEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glCopyMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +__attribute__((visibility("default"))) void glCopyMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +__attribute__((visibility("default"))) void glCopyMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glCopyMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glGetMultiTexImageEXT (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +__attribute__((visibility("default"))) void glGetMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetMultiTexLevelParameterfvEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetMultiTexLevelParameterivEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glCopyMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glBindMultiTextureEXT (GLenum texunit, GLenum target, GLuint texture); +__attribute__((visibility("default"))) void glEnableClientStateIndexedEXT (GLenum array, GLuint index); +__attribute__((visibility("default"))) void glDisableClientStateIndexedEXT (GLenum array, GLuint index); +__attribute__((visibility("default"))) void glMultiTexCoordPointerEXT (GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glMultiTexEnvfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glMultiTexEnviEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glMultiTexGendEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); +__attribute__((visibility("default"))) void glMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); +__attribute__((visibility("default"))) void glMultiTexGenfEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glMultiTexGeniEXT (GLenum texunit, GLenum coord, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glGetMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) void glGetMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetFloatIndexedvEXT (GLenum target, GLuint index, GLfloat *data); +__attribute__((visibility("default"))) void glGetDoubleIndexedvEXT (GLenum target, GLuint index, GLdouble *data); +__attribute__((visibility("default"))) void glGetPointerIndexedvEXT (GLenum target, GLuint index, GLvoid* *data); +__attribute__((visibility("default"))) void glCompressedTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glGetCompressedTextureImageEXT (GLuint texture, GLenum target, GLint lod, GLvoid *img); +__attribute__((visibility("default"))) void glCompressedMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glGetCompressedMultiTexImageEXT (GLenum texunit, GLenum target, GLint lod, GLvoid *img); +__attribute__((visibility("default"))) void glNamedProgramStringEXT (GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid *string); +__attribute__((visibility("default"))) void glNamedProgramLocalParameter4dEXT (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glNamedProgramLocalParameter4dvEXT (GLuint program, GLenum target, GLuint index, const GLdouble *params); +__attribute__((visibility("default"))) void glNamedProgramLocalParameter4fEXT (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glNamedProgramLocalParameter4fvEXT (GLuint program, GLenum target, GLuint index, const GLfloat *params); +__attribute__((visibility("default"))) void glGetNamedProgramLocalParameterdvEXT (GLuint program, GLenum target, GLuint index, GLdouble *params); +__attribute__((visibility("default"))) void glGetNamedProgramLocalParameterfvEXT (GLuint program, GLenum target, GLuint index, GLfloat *params); +__attribute__((visibility("default"))) void glGetNamedProgramivEXT (GLuint program, GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetNamedProgramStringEXT (GLuint program, GLenum target, GLenum pname, GLvoid *string); +__attribute__((visibility("default"))) void glNamedProgramLocalParameters4fvEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); +__attribute__((visibility("default"))) void glNamedProgramLocalParameterI4iEXT (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +__attribute__((visibility("default"))) void glNamedProgramLocalParameterI4ivEXT (GLuint program, GLenum target, GLuint index, const GLint *params); +__attribute__((visibility("default"))) void glNamedProgramLocalParametersI4ivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); +__attribute__((visibility("default"))) void glNamedProgramLocalParameterI4uiEXT (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +__attribute__((visibility("default"))) void glNamedProgramLocalParameterI4uivEXT (GLuint program, GLenum target, GLuint index, const GLuint *params); +__attribute__((visibility("default"))) void glNamedProgramLocalParametersI4uivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); +__attribute__((visibility("default"))) void glGetNamedProgramLocalParameterIivEXT (GLuint program, GLenum target, GLuint index, GLint *params); +__attribute__((visibility("default"))) void glGetNamedProgramLocalParameterIuivEXT (GLuint program, GLenum target, GLuint index, GLuint *params); +__attribute__((visibility("default"))) void glTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, const GLuint *params); +__attribute__((visibility("default"))) void glGetTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); +__attribute__((visibility("default"))) void glGetMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0); +__attribute__((visibility("default"))) void glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1); +__attribute__((visibility("default"))) void glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +__attribute__((visibility("default"))) void glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +__attribute__((visibility("default"))) void glProgramUniform1iEXT (GLuint program, GLint location, GLint v0); +__attribute__((visibility("default"))) void glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1); +__attribute__((visibility("default"))) void glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +__attribute__((visibility("default"))) void glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +__attribute__((visibility("default"))) void glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0); +__attribute__((visibility("default"))) void glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1); +__attribute__((visibility("default"))) void glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +__attribute__((visibility("default"))) void glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +__attribute__((visibility("default"))) void glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glNamedBufferDataEXT (GLuint buffer, GLsizeiptr size, const GLvoid *data, GLenum usage); +__attribute__((visibility("default"))) void glNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data); +__attribute__((visibility("default"))) GLvoid* glMapNamedBufferEXT (GLuint buffer, GLenum access); +__attribute__((visibility("default"))) GLboolean glUnmapNamedBufferEXT (GLuint buffer); +__attribute__((visibility("default"))) GLvoid* glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +__attribute__((visibility("default"))) void glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length); +__attribute__((visibility("default"))) void glNamedCopyBufferSubDataEXT (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +__attribute__((visibility("default"))) void glGetNamedBufferParameterivEXT (GLuint buffer, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetNamedBufferPointervEXT (GLuint buffer, GLenum pname, GLvoid* *params); +__attribute__((visibility("default"))) void glGetNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data); +__attribute__((visibility("default"))) void glTextureBufferEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); +__attribute__((visibility("default"))) void glMultiTexBufferEXT (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); +__attribute__((visibility("default"))) void glNamedRenderbufferStorageEXT (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glGetNamedRenderbufferParameterivEXT (GLuint renderbuffer, GLenum pname, GLint *params); +__attribute__((visibility("default"))) GLenum glCheckNamedFramebufferStatusEXT (GLuint framebuffer, GLenum target); +__attribute__((visibility("default"))) void glNamedFramebufferTexture1DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glNamedFramebufferTexture2DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glNamedFramebufferTexture3DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +__attribute__((visibility("default"))) void glNamedFramebufferRenderbufferEXT (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +__attribute__((visibility("default"))) void glGetNamedFramebufferAttachmentParameterivEXT (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGenerateTextureMipmapEXT (GLuint texture, GLenum target); +__attribute__((visibility("default"))) void glGenerateMultiTexMipmapEXT (GLenum texunit, GLenum target); +__attribute__((visibility("default"))) void glFramebufferDrawBufferEXT (GLuint framebuffer, GLenum mode); +__attribute__((visibility("default"))) void glFramebufferDrawBuffersEXT (GLuint framebuffer, GLsizei n, const GLenum *bufs); +__attribute__((visibility("default"))) void glFramebufferReadBufferEXT (GLuint framebuffer, GLenum mode); +__attribute__((visibility("default"))) void glGetFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glNamedRenderbufferStorageMultisampleEXT (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glNamedFramebufferTextureEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glNamedFramebufferTextureLayerEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +__attribute__((visibility("default"))) void glNamedFramebufferTextureFaceEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); +__attribute__((visibility("default"))) void glTextureRenderbufferEXT (GLuint texture, GLenum target, GLuint renderbuffer); +__attribute__((visibility("default"))) void glMultiTexRenderbufferEXT (GLenum texunit, GLenum target, GLuint renderbuffer); +__attribute__((visibility("default"))) void glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x); +__attribute__((visibility("default"))) void glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); + +typedef void ( * PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); +typedef void ( * PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); +typedef void ( * PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void ( * PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void ( * PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void ( * PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void ( * PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode); +typedef void ( * PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +typedef void ( * PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +typedef void ( * PFNGLMATRIXPOPEXTPROC) (GLenum mode); +typedef void ( * PFNGLMATRIXPUSHEXTPROC) (GLenum mode); +typedef void ( * PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void ( * PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void ( * PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void ( * PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void ( * PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param); +typedef void ( * PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param); +typedef void ( * PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void ( * PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void ( * PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void ( * PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +typedef void ( * PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); +typedef void ( * PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void ( * PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +typedef void ( * PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); +typedef void ( * PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void ( * PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void ( * PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void ( * PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +typedef void ( * PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); +typedef void ( * PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void ( * PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture); +typedef void ( * PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); +typedef void ( * PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); +typedef void ( * PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +typedef void ( * PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); +typedef void ( * PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); +typedef void ( * PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); +typedef void ( * PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); +typedef void ( * PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param); +typedef void ( * PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); +typedef void ( * PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); +typedef void ( * PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params); +typedef void ( * PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data); +typedef void ( * PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data); +typedef void ( * PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLvoid* *data); +typedef void ( * PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, GLvoid *img); +typedef void ( * PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, GLvoid *img); +typedef void ( * PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid *string); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params); +typedef void ( * PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params); +typedef void ( * PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params); +typedef void ( * PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, GLvoid *string); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void ( * PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params); +typedef void ( * PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params); +typedef void ( * PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params); +typedef void ( * PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params); +typedef void ( * PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); +typedef void ( * PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params); +typedef void ( * PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0); +typedef void ( * PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef void ( * PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void ( * PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void ( * PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0); +typedef void ( * PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef void ( * PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void ( * PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void ( * PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0); +typedef void ( * PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); +typedef void ( * PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void ( * PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void ( * PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const GLvoid *data, GLenum usage); +typedef void ( * PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data); +typedef GLvoid* ( * PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access); +typedef GLboolean ( * PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer); +typedef GLvoid* ( * PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void ( * PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); +typedef void ( * PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void ( * PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params); +typedef void ( * PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, GLvoid* *params); +typedef void ( * PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data); +typedef void ( * PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); +typedef void ( * PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); +typedef void ( * PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +typedef void ( * PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params); +typedef GLenum ( * PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target); +typedef void ( * PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void ( * PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void ( * PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void ( * PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void ( * PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); +typedef void ( * PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target); +typedef void ( * PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target); +typedef void ( * PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); +typedef void ( * PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs); +typedef void ( * PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); +typedef void ( * PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); +typedef void ( * PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void ( * PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void ( * PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +typedef void ( * PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void ( * PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); +typedef void ( * PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer); +typedef void ( * PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer); +typedef void ( * PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x); +typedef void ( * PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y); +typedef void ( * PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +# 10533 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glGetMultisamplefvNV (GLenum pname, GLuint index, GLfloat *val); +__attribute__((visibility("default"))) void glSampleMaskIndexedNV (GLuint index, GLbitfield mask); +__attribute__((visibility("default"))) void glTexRenderbufferNV (GLenum target, GLuint renderbuffer); + +typedef void ( * PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val); +typedef void ( * PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask); +typedef void ( * PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer); + + + + + +__attribute__((visibility("default"))) void glBindTransformFeedbackNV (GLenum target, GLuint id); +__attribute__((visibility("default"))) void glDeleteTransformFeedbacksNV (GLsizei n, const GLuint *ids); +__attribute__((visibility("default"))) void glGenTransformFeedbacksNV (GLsizei n, GLuint *ids); +__attribute__((visibility("default"))) GLboolean glIsTransformFeedbackNV (GLuint id); +__attribute__((visibility("default"))) void glPauseTransformFeedbackNV (void); +__attribute__((visibility("default"))) void glResumeTransformFeedbackNV (void); +__attribute__((visibility("default"))) void glDrawTransformFeedbackNV (GLenum mode, GLuint id); + +typedef void ( * PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id); +typedef void ( * PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids); +typedef void ( * PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids); +typedef GLboolean ( * PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id); +typedef void ( * PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void); +typedef void ( * PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void); +typedef void ( * PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id); +# 10569 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups); +__attribute__((visibility("default"))) void glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); +__attribute__((visibility("default"))) void glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); +__attribute__((visibility("default"))) void glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); +__attribute__((visibility("default"))) void glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data); +__attribute__((visibility("default"))) void glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); +__attribute__((visibility("default"))) void glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); +__attribute__((visibility("default"))) void glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); +__attribute__((visibility("default"))) void glBeginPerfMonitorAMD (GLuint monitor); +__attribute__((visibility("default"))) void glEndPerfMonitorAMD (GLuint monitor); +__attribute__((visibility("default"))) void glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); + +typedef void ( * PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups); +typedef void ( * PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); +typedef void ( * PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); +typedef void ( * PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); +typedef void ( * PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data); +typedef void ( * PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); +typedef void ( * PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); +typedef void ( * PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); +typedef void ( * PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor); +typedef void ( * PFNGLENDPERFMONITORAMDPROC) (GLuint monitor); +typedef void ( * PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); +# 10601 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glTessellationFactorAMD (GLfloat factor); +__attribute__((visibility("default"))) void glTessellationModeAMD (GLenum mode); + +typedef void ( * PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor); +typedef void ( * PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode); + + + + + +__attribute__((visibility("default"))) void glProvokingVertexEXT (GLenum mode); + +typedef void ( * PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode); +# 10623 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glBlendFuncIndexedAMD (GLuint buf, GLenum src, GLenum dst); +__attribute__((visibility("default"))) void glBlendFuncSeparateIndexedAMD (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +__attribute__((visibility("default"))) void glBlendEquationIndexedAMD (GLuint buf, GLenum mode); +__attribute__((visibility("default"))) void glBlendEquationSeparateIndexedAMD (GLuint buf, GLenum modeRGB, GLenum modeAlpha); + +typedef void ( * PFNGLBLENDFUNCINDEXEDAMDPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void ( * PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +typedef void ( * PFNGLBLENDEQUATIONINDEXEDAMDPROC) (GLuint buf, GLenum mode); +typedef void ( * PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); + + + + + +__attribute__((visibility("default"))) void glTextureRangeAPPLE (GLenum target, GLsizei length, const GLvoid *pointer); +__attribute__((visibility("default"))) void glGetTexParameterPointervAPPLE (GLenum target, GLenum pname, GLvoid* *params); + +typedef void ( * PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, const GLvoid *pointer); +typedef void ( * PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, GLvoid* *params); +# 10651 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glEnableVertexAttribAPPLE (GLuint index, GLenum pname); +__attribute__((visibility("default"))) void glDisableVertexAttribAPPLE (GLuint index, GLenum pname); +__attribute__((visibility("default"))) GLboolean glIsVertexAttribEnabledAPPLE (GLuint index, GLenum pname); +__attribute__((visibility("default"))) void glMapVertexAttrib1dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); +__attribute__((visibility("default"))) void glMapVertexAttrib1fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); +__attribute__((visibility("default"))) void glMapVertexAttrib2dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); +__attribute__((visibility("default"))) void glMapVertexAttrib2fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); + +typedef void ( * PFNGLENABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname); +typedef void ( * PFNGLDISABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname); +typedef GLboolean ( * PFNGLISVERTEXATTRIBENABLEDAPPLEPROC) (GLuint index, GLenum pname); +typedef void ( * PFNGLMAPVERTEXATTRIB1DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); +typedef void ( * PFNGLMAPVERTEXATTRIB1FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); +typedef void ( * PFNGLMAPVERTEXATTRIB2DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); +typedef void ( * PFNGLMAPVERTEXATTRIB2FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); +# 10675 "../../include/GL/glext.h" +__attribute__((visibility("default"))) GLenum glObjectPurgeableAPPLE (GLenum objectType, GLuint name, GLenum option); +__attribute__((visibility("default"))) GLenum glObjectUnpurgeableAPPLE (GLenum objectType, GLuint name, GLenum option); +__attribute__((visibility("default"))) void glGetObjectParameterivAPPLE (GLenum objectType, GLuint name, GLenum pname, GLint *params); + +typedef GLenum ( * PFNGLOBJECTPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option); +typedef GLenum ( * PFNGLOBJECTUNPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option); +typedef void ( * PFNGLGETOBJECTPARAMETERIVAPPLEPROC) (GLenum objectType, GLuint name, GLenum pname, GLint *params); +# 10695 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glBeginVideoCaptureNV (GLuint video_capture_slot); +__attribute__((visibility("default"))) void glBindVideoCaptureStreamBufferNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset); +__attribute__((visibility("default"))) void glBindVideoCaptureStreamTextureNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture); +__attribute__((visibility("default"))) void glEndVideoCaptureNV (GLuint video_capture_slot); +__attribute__((visibility("default"))) void glGetVideoCaptureivNV (GLuint video_capture_slot, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVideoCaptureStreamivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVideoCaptureStreamfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetVideoCaptureStreamdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) GLenum glVideoCaptureNV (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time); +__attribute__((visibility("default"))) void glVideoCaptureStreamParameterivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glVideoCaptureStreamParameterfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params); + +typedef void ( * PFNGLBEGINVIDEOCAPTURENVPROC) (GLuint video_capture_slot); +typedef void ( * PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset); +typedef void ( * PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture); +typedef void ( * PFNGLENDVIDEOCAPTURENVPROC) (GLuint video_capture_slot); +typedef void ( * PFNGLGETVIDEOCAPTUREIVNVPROC) (GLuint video_capture_slot, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVIDEOCAPTURESTREAMIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVIDEOCAPTURESTREAMFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETVIDEOCAPTURESTREAMDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params); +typedef GLenum ( * PFNGLVIDEOCAPTURENVPROC) (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time); +typedef void ( * PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params); +typedef void ( * PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params); + + + + + +__attribute__((visibility("default"))) void glCopyImageSubDataNV (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); + +typedef void ( * PFNGLCOPYIMAGESUBDATANVPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); + + + + + +__attribute__((visibility("default"))) void glUseShaderProgramEXT (GLenum type, GLuint program); +__attribute__((visibility("default"))) void glActiveProgramEXT (GLuint program); +__attribute__((visibility("default"))) GLuint glCreateShaderProgramEXT (GLenum type, const GLchar *string); + +typedef void ( * PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program); +typedef void ( * PFNGLACTIVEPROGRAMEXTPROC) (GLuint program); +typedef GLuint ( * PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar *string); +# 10749 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glMakeBufferResidentNV (GLenum target, GLenum access); +__attribute__((visibility("default"))) void glMakeBufferNonResidentNV (GLenum target); +__attribute__((visibility("default"))) GLboolean glIsBufferResidentNV (GLenum target); +__attribute__((visibility("default"))) void glMakeNamedBufferResidentNV (GLuint buffer, GLenum access); +__attribute__((visibility("default"))) void glMakeNamedBufferNonResidentNV (GLuint buffer); +__attribute__((visibility("default"))) GLboolean glIsNamedBufferResidentNV (GLuint buffer); +__attribute__((visibility("default"))) void glGetBufferParameterui64vNV (GLenum target, GLenum pname, GLuint64EXT *params); +__attribute__((visibility("default"))) void glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pname, GLuint64EXT *params); +__attribute__((visibility("default"))) void glGetIntegerui64vNV (GLenum value, GLuint64EXT *result); +__attribute__((visibility("default"))) void glUniformui64NV (GLint location, GLuint64EXT value); +__attribute__((visibility("default"))) void glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params); +__attribute__((visibility("default"))) void glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value); +__attribute__((visibility("default"))) void glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); + +typedef void ( * PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access); +typedef void ( * PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target); +typedef GLboolean ( * PFNGLISBUFFERRESIDENTNVPROC) (GLenum target); +typedef void ( * PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access); +typedef void ( * PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer); +typedef GLboolean ( * PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer); +typedef void ( * PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params); +typedef void ( * PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT *params); +typedef void ( * PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result); +typedef void ( * PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value); +typedef void ( * PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params); +typedef void ( * PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value); +typedef void ( * PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); + + + + + +__attribute__((visibility("default"))) void glBufferAddressRangeNV (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); +__attribute__((visibility("default"))) void glVertexFormatNV (GLint size, GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glNormalFormatNV (GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glColorFormatNV (GLint size, GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glIndexFormatNV (GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glTexCoordFormatNV (GLint size, GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glEdgeFlagFormatNV (GLsizei stride); +__attribute__((visibility("default"))) void glSecondaryColorFormatNV (GLint size, GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glFogCoordFormatNV (GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glVertexAttribFormatNV (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); +__attribute__((visibility("default"))) void glVertexAttribIFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glGetIntegerui64i_vNV (GLenum value, GLuint index, GLuint64EXT *result); + +typedef void ( * PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); +typedef void ( * PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void ( * PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride); +typedef void ( * PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void ( * PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride); +typedef void ( * PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void ( * PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride); +typedef void ( * PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void ( * PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride); +typedef void ( * PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); +typedef void ( * PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); +typedef void ( * PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result); + + + + + +__attribute__((visibility("default"))) void glTextureBarrierNV (void); + +typedef void ( * PFNGLTEXTUREBARRIERNVPROC) (void); +# 10833 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glBindImageTextureEXT (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); +__attribute__((visibility("default"))) void glMemoryBarrierEXT (GLbitfield barriers); + +typedef void ( * PFNGLBINDIMAGETEXTUREEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); +typedef void ( * PFNGLMEMORYBARRIEREXTPROC) (GLbitfield barriers); + + + + + +__attribute__((visibility("default"))) void glVertexAttribL1dEXT (GLuint index, GLdouble x); +__attribute__((visibility("default"))) void glVertexAttribL2dEXT (GLuint index, GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glVertexAttribL3dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glVertexAttribL4dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glVertexAttribL1dvEXT (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribL2dvEXT (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribL3dvEXT (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribL4dvEXT (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribLPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glGetVertexAttribLdvEXT (GLuint index, GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) void glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); + +typedef void ( * PFNGLVERTEXATTRIBL1DEXTPROC) (GLuint index, GLdouble x); +typedef void ( * PFNGLVERTEXATTRIBL2DEXTPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void ( * PFNGLVERTEXATTRIBL3DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLVERTEXATTRIBL4DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLVERTEXATTRIBL1DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBL2DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBL3DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBL4DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBLPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLGETVERTEXATTRIBLDVEXTPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void ( * PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); + + + + + +__attribute__((visibility("default"))) void glProgramSubroutineParametersuivNV (GLenum target, GLsizei count, const GLuint *params); +__attribute__((visibility("default"))) void glGetProgramSubroutineParameteruivNV (GLenum target, GLuint index, GLuint *param); + +typedef void ( * PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC) (GLenum target, GLsizei count, const GLuint *params); +typedef void ( * PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC) (GLenum target, GLuint index, GLuint *param); + + + + + +__attribute__((visibility("default"))) void glUniform1i64NV (GLint location, GLint64EXT x); +__attribute__((visibility("default"))) void glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y); +__attribute__((visibility("default"))) void glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +__attribute__((visibility("default"))) void glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +__attribute__((visibility("default"))) void glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +__attribute__((visibility("default"))) void glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +__attribute__((visibility("default"))) void glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +__attribute__((visibility("default"))) void glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +__attribute__((visibility("default"))) void glUniform1ui64NV (GLint location, GLuint64EXT x); +__attribute__((visibility("default"))) void glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y); +__attribute__((visibility("default"))) void glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +__attribute__((visibility("default"))) void glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +__attribute__((visibility("default"))) void glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params); +__attribute__((visibility("default"))) void glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x); +__attribute__((visibility("default"))) void glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); +__attribute__((visibility("default"))) void glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +__attribute__((visibility("default"))) void glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +__attribute__((visibility("default"))) void glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +__attribute__((visibility("default"))) void glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +__attribute__((visibility("default"))) void glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +__attribute__((visibility("default"))) void glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +__attribute__((visibility("default"))) void glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x); +__attribute__((visibility("default"))) void glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); +__attribute__((visibility("default"))) void glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +__attribute__((visibility("default"))) void glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +__attribute__((visibility("default"))) void glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); + +typedef void ( * PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x); +typedef void ( * PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y); +typedef void ( * PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void ( * PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void ( * PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void ( * PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void ( * PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void ( * PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void ( * PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x); +typedef void ( * PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void ( * PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void ( * PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void ( * PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params); +typedef void ( * PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x); +typedef void ( * PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); +typedef void ( * PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void ( * PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void ( * PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void ( * PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void ( * PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void ( * PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void ( * PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x); +typedef void ( * PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void ( * PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void ( * PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void ( * PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +# 10961 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glVertexAttribL1i64NV (GLuint index, GLint64EXT x); +__attribute__((visibility("default"))) void glVertexAttribL2i64NV (GLuint index, GLint64EXT x, GLint64EXT y); +__attribute__((visibility("default"))) void glVertexAttribL3i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); +__attribute__((visibility("default"))) void glVertexAttribL4i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +__attribute__((visibility("default"))) void glVertexAttribL1i64vNV (GLuint index, const GLint64EXT *v); +__attribute__((visibility("default"))) void glVertexAttribL2i64vNV (GLuint index, const GLint64EXT *v); +__attribute__((visibility("default"))) void glVertexAttribL3i64vNV (GLuint index, const GLint64EXT *v); +__attribute__((visibility("default"))) void glVertexAttribL4i64vNV (GLuint index, const GLint64EXT *v); +__attribute__((visibility("default"))) void glVertexAttribL1ui64NV (GLuint index, GLuint64EXT x); +__attribute__((visibility("default"))) void glVertexAttribL2ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y); +__attribute__((visibility("default"))) void glVertexAttribL3ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +__attribute__((visibility("default"))) void glVertexAttribL4ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +__attribute__((visibility("default"))) void glVertexAttribL1ui64vNV (GLuint index, const GLuint64EXT *v); +__attribute__((visibility("default"))) void glVertexAttribL2ui64vNV (GLuint index, const GLuint64EXT *v); +__attribute__((visibility("default"))) void glVertexAttribL3ui64vNV (GLuint index, const GLuint64EXT *v); +__attribute__((visibility("default"))) void glVertexAttribL4ui64vNV (GLuint index, const GLuint64EXT *v); +__attribute__((visibility("default"))) void glGetVertexAttribLi64vNV (GLuint index, GLenum pname, GLint64EXT *params); +__attribute__((visibility("default"))) void glGetVertexAttribLui64vNV (GLuint index, GLenum pname, GLuint64EXT *params); +__attribute__((visibility("default"))) void glVertexAttribLFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); + +typedef void ( * PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x); +typedef void ( * PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y); +typedef void ( * PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void ( * PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void ( * PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void ( * PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void ( * PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void ( * PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void ( * PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x); +typedef void ( * PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y); +typedef void ( * PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void ( * PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void ( * PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void ( * PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void ( * PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void ( * PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void ( * PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT *params); +typedef void ( * PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT *params); +typedef void ( * PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); +# 11009 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glGenNamesAMD (GLenum identifier, GLuint num, GLuint *names); +__attribute__((visibility("default"))) void glDeleteNamesAMD (GLenum identifier, GLuint num, const GLuint *names); +__attribute__((visibility("default"))) GLboolean glIsNameAMD (GLenum identifier, GLuint name); + +typedef void ( * PFNGLGENNAMESAMDPROC) (GLenum identifier, GLuint num, GLuint *names); +typedef void ( * PFNGLDELETENAMESAMDPROC) (GLenum identifier, GLuint num, const GLuint *names); +typedef GLboolean ( * PFNGLISNAMEAMDPROC) (GLenum identifier, GLuint name); + + + + + +__attribute__((visibility("default"))) void glDebugMessageEnableAMD (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +__attribute__((visibility("default"))) void glDebugMessageInsertAMD (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); +__attribute__((visibility("default"))) void glDebugMessageCallbackAMD (GLDEBUGPROCAMD callback, GLvoid *userParam); +__attribute__((visibility("default"))) GLuint glGetDebugMessageLogAMD (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); + +typedef void ( * PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void ( * PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); +typedef void ( * PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, GLvoid *userParam); +typedef GLuint ( * PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); + + + + + +__attribute__((visibility("default"))) void glVDPAUInitNV (const GLvoid *vdpDevice, const GLvoid *getProcAddress); +__attribute__((visibility("default"))) void glVDPAUFiniNV (void); +__attribute__((visibility("default"))) GLvdpauSurfaceNV glVDPAURegisterVideoSurfaceNV (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +__attribute__((visibility("default"))) GLvdpauSurfaceNV glVDPAURegisterOutputSurfaceNV (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +__attribute__((visibility("default"))) void glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface); +__attribute__((visibility("default"))) void glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface); +__attribute__((visibility("default"))) void glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +__attribute__((visibility("default"))) void glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access); +__attribute__((visibility("default"))) void glVDPAUMapSurfacesNV (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces); +__attribute__((visibility("default"))) void glVDPAUUnmapSurfacesNV (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); + +typedef void ( * PFNGLVDPAUINITNVPROC) (const GLvoid *vdpDevice, const GLvoid *getProcAddress); +typedef void ( * PFNGLVDPAUFININVPROC) (void); +typedef GLvdpauSurfaceNV ( * PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +typedef GLvdpauSurfaceNV ( * PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +typedef void ( * PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface); +typedef void ( * PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface); +typedef void ( * PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +typedef void ( * PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access); +typedef void ( * PFNGLVDPAUMAPSURFACESNVPROC) (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces); +typedef void ( * PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); +# 11073 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glTexImage2DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +__attribute__((visibility("default"))) void glTexImage3DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +__attribute__((visibility("default"))) void glTextureImage2DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +__attribute__((visibility("default"))) void glTextureImage3DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +__attribute__((visibility("default"))) void glTextureImage2DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +__attribute__((visibility("default"))) void glTextureImage3DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); + +typedef void ( * PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void ( * PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +typedef void ( * PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void ( * PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +typedef void ( * PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void ( * PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +# 11095 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLfloat *val); + +typedef void ( * PFNGLSETMULTISAMPLEFVAMDPROC) (GLenum pname, GLuint index, const GLfloat *val); + + + + + +__attribute__((visibility("default"))) GLsync glImportSyncEXT (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); + +typedef GLsync ( * PFNGLIMPORTSYNCEXTPROC) (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); + + + + + +__attribute__((visibility("default"))) void glMultiDrawArraysIndirectAMD (GLenum mode, const GLvoid *indirect, GLsizei primcount, GLsizei stride); +__attribute__((visibility("default"))) void glMultiDrawElementsIndirectAMD (GLenum mode, GLenum type, const GLvoid *indirect, GLsizei primcount, GLsizei stride); + +typedef void ( * PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC) (GLenum mode, const GLvoid *indirect, GLsizei primcount, GLsizei stride); +typedef void ( * PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC) (GLenum mode, GLenum type, const GLvoid *indirect, GLsizei primcount, GLsizei stride); +# 2092 "../../include/GL/gl.h" 2 +# 2106 "../../include/GL/gl.h" +__attribute__((visibility("default"))) GLhandleARB glCreateDebugObjectMESA (void); +__attribute__((visibility("default"))) void glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType); +__attribute__((visibility("default"))) void glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength, + GLsizei *length, GLcharARB *debugLog); +__attribute__((visibility("default"))) GLsizei glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType); +# 2145 "../../include/GL/gl.h" +typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data); + +__attribute__((visibility("default"))) void glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, GLvoid *data); + +__attribute__((visibility("default"))) void glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name, GLfloat *v); +# 2192 "../../include/GL/gl.h" +__attribute__((visibility("default"))) void glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA ); +typedef void ( * PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA); + + + + + + +typedef void* GLeglImageOES; + + + + + +__attribute__((visibility("default"))) void glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); +__attribute__((visibility("default"))) void glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); + +typedef void ( * PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); +typedef void ( * PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); +# 54 "../../src/mesa/main/glheader.h" 2 + + + + + + +typedef int GLfixed; +typedef int GLclampx; +# 33 "swrast/s_triangle.c" 2 +# 1 "../../src/mesa/main/context.h" 1 +# 52 "../../src/mesa/main/context.h" +# 1 "../../src/mesa/main/imports.h" 1 +# 39 "../../src/mesa/main/imports.h" +# 1 "../../src/mesa/main/compiler.h" 1 +# 37 "../../src/mesa/main/compiler.h" +# 1 "/usr/include/assert.h" 1 3 4 +# 66 "/usr/include/assert.h" 3 4 + + + +extern void __assert_fail (__const char *__assertion, __const char *__file, + unsigned int __line, __const char *__function) + __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + +extern void __assert_perror_fail (int __errnum, __const char *__file, + unsigned int __line, + __const char *__function) + __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + + +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + +# 38 "../../src/mesa/main/compiler.h" 2 +# 1 "/usr/include/ctype.h" 1 3 4 +# 28 "/usr/include/ctype.h" 3 4 +# 1 "/usr/include/bits/types.h" 1 3 4 +# 28 "/usr/include/bits/types.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 29 "/usr/include/bits/types.h" 2 3 4 + + +typedef unsigned char __u_char; +typedef unsigned short int __u_short; +typedef unsigned int __u_int; +typedef unsigned long int __u_long; + + +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; + + + + +__extension__ typedef signed long long int __int64_t; +__extension__ typedef unsigned long long int __uint64_t; + + + + + + + +__extension__ typedef long long int __quad_t; +__extension__ typedef unsigned long long int __u_quad_t; +# 131 "/usr/include/bits/types.h" 3 4 +# 1 "/usr/include/bits/typesizes.h" 1 3 4 +# 132 "/usr/include/bits/types.h" 2 3 4 + + +__extension__ typedef __u_quad_t __dev_t; +__extension__ typedef unsigned int __uid_t; +__extension__ typedef unsigned int __gid_t; +__extension__ typedef unsigned long int __ino_t; +__extension__ typedef __u_quad_t __ino64_t; +__extension__ typedef unsigned int __mode_t; +__extension__ typedef unsigned int __nlink_t; +__extension__ typedef long int __off_t; +__extension__ typedef __quad_t __off64_t; +__extension__ typedef int __pid_t; +__extension__ typedef struct { int __val[2]; } __fsid_t; +__extension__ typedef long int __clock_t; +__extension__ typedef unsigned long int __rlim_t; +__extension__ typedef __u_quad_t __rlim64_t; +__extension__ typedef unsigned int __id_t; +__extension__ typedef long int __time_t; +__extension__ typedef unsigned int __useconds_t; +__extension__ typedef long int __suseconds_t; + +__extension__ typedef int __daddr_t; +__extension__ typedef long int __swblk_t; +__extension__ typedef int __key_t; + + +__extension__ typedef int __clockid_t; + + +__extension__ typedef void * __timer_t; + + +__extension__ typedef long int __blksize_t; + + + + +__extension__ typedef long int __blkcnt_t; +__extension__ typedef __quad_t __blkcnt64_t; + + +__extension__ typedef unsigned long int __fsblkcnt_t; +__extension__ typedef __u_quad_t __fsblkcnt64_t; + + +__extension__ typedef unsigned long int __fsfilcnt_t; +__extension__ typedef __u_quad_t __fsfilcnt64_t; + +__extension__ typedef int __ssize_t; + + + +typedef __off64_t __loff_t; +typedef __quad_t *__qaddr_t; +typedef char *__caddr_t; + + +__extension__ typedef int __intptr_t; + + +__extension__ typedef unsigned int __socklen_t; +# 29 "/usr/include/ctype.h" 2 3 4 + + +# 41 "/usr/include/ctype.h" 3 4 +# 1 "/usr/include/endian.h" 1 3 4 +# 37 "/usr/include/endian.h" 3 4 +# 1 "/usr/include/bits/endian.h" 1 3 4 +# 38 "/usr/include/endian.h" 2 3 4 +# 61 "/usr/include/endian.h" 3 4 +# 1 "/usr/include/bits/byteswap.h" 1 3 4 +# 62 "/usr/include/endian.h" 2 3 4 +# 42 "/usr/include/ctype.h" 2 3 4 + + + + + + +enum +{ + _ISupper = (1 << (0)), + _ISlower = (1 << (1)), + _ISalpha = (1 << (2)), + _ISdigit = (1 << (3)), + _ISxdigit = (1 << (4)), + _ISspace = (1 << (5)), + _ISprint = (1 << (6)), + _ISgraph = (1 << (7)), + _ISblank = (1 << (8)), + _IScntrl = (1 << (9)), + _ISpunct = (1 << (10)), + _ISalnum = (1 << (11)) +}; +# 81 "/usr/include/ctype.h" 3 4 +extern __const unsigned short int **__ctype_b_loc (void) + __attribute__ ((__nothrow__)) __attribute__ ((__const)); +extern __const __int32_t **__ctype_tolower_loc (void) + __attribute__ ((__nothrow__)) __attribute__ ((__const)); +extern __const __int32_t **__ctype_toupper_loc (void) + __attribute__ ((__nothrow__)) __attribute__ ((__const)); +# 96 "/usr/include/ctype.h" 3 4 + + + + + + +extern int isalnum (int) __attribute__ ((__nothrow__)); +extern int isalpha (int) __attribute__ ((__nothrow__)); +extern int iscntrl (int) __attribute__ ((__nothrow__)); +extern int isdigit (int) __attribute__ ((__nothrow__)); +extern int islower (int) __attribute__ ((__nothrow__)); +extern int isgraph (int) __attribute__ ((__nothrow__)); +extern int isprint (int) __attribute__ ((__nothrow__)); +extern int ispunct (int) __attribute__ ((__nothrow__)); +extern int isspace (int) __attribute__ ((__nothrow__)); +extern int isupper (int) __attribute__ ((__nothrow__)); +extern int isxdigit (int) __attribute__ ((__nothrow__)); + + + +extern int tolower (int __c) __attribute__ ((__nothrow__)); + + +extern int toupper (int __c) __attribute__ ((__nothrow__)); + + + + + + + + +extern int isblank (int) __attribute__ ((__nothrow__)); + + + + + + +extern int isctype (int __c, int __mask) __attribute__ ((__nothrow__)); + + + + + + +extern int isascii (int __c) __attribute__ ((__nothrow__)); + + + +extern int toascii (int __c) __attribute__ ((__nothrow__)); + + + +extern int _toupper (int) __attribute__ ((__nothrow__)); +extern int _tolower (int) __attribute__ ((__nothrow__)); +# 190 "/usr/include/ctype.h" 3 4 +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) tolower (int __c) +{ + return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c; +} + +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) toupper (int __c) +{ + return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c; +} +# 233 "/usr/include/ctype.h" 3 4 +# 1 "/usr/include/xlocale.h" 1 3 4 +# 28 "/usr/include/xlocale.h" 3 4 +typedef struct __locale_struct +{ + + struct __locale_data *__locales[13]; + + + const unsigned short int *__ctype_b; + const int *__ctype_tolower; + const int *__ctype_toupper; + + + const char *__names[13]; +} *__locale_t; + + +typedef __locale_t locale_t; +# 234 "/usr/include/ctype.h" 2 3 4 +# 247 "/usr/include/ctype.h" 3 4 +extern int isalnum_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isalpha_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int iscntrl_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isdigit_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int islower_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isgraph_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isprint_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int ispunct_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isspace_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isupper_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isxdigit_l (int, __locale_t) __attribute__ ((__nothrow__)); + +extern int isblank_l (int, __locale_t) __attribute__ ((__nothrow__)); + + + +extern int __tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); +extern int tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); + + +extern int __toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); +extern int toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); +# 323 "/usr/include/ctype.h" 3 4 + +# 39 "../../src/mesa/main/compiler.h" 2 + + + +# 1 "/usr/include/math.h" 1 3 4 +# 30 "/usr/include/math.h" 3 4 + + + + +# 1 "/usr/include/bits/huge_val.h" 1 3 4 +# 35 "/usr/include/math.h" 2 3 4 + +# 1 "/usr/include/bits/huge_valf.h" 1 3 4 +# 37 "/usr/include/math.h" 2 3 4 +# 1 "/usr/include/bits/huge_vall.h" 1 3 4 +# 38 "/usr/include/math.h" 2 3 4 + + +# 1 "/usr/include/bits/inf.h" 1 3 4 +# 41 "/usr/include/math.h" 2 3 4 + + +# 1 "/usr/include/bits/nan.h" 1 3 4 +# 44 "/usr/include/math.h" 2 3 4 + + + +# 1 "/usr/include/bits/mathdef.h" 1 3 4 +# 27 "/usr/include/bits/mathdef.h" 3 4 +typedef float float_t; + +typedef double double_t; +# 48 "/usr/include/math.h" 2 3 4 +# 71 "/usr/include/math.h" 3 4 +# 1 "/usr/include/bits/mathcalls.h" 1 3 4 +# 53 "/usr/include/bits/mathcalls.h" 3 4 + + +extern double acos (double __x) __attribute__ ((__nothrow__)); extern double __acos (double __x) __attribute__ ((__nothrow__)); + +extern double asin (double __x) __attribute__ ((__nothrow__)); extern double __asin (double __x) __attribute__ ((__nothrow__)); + +extern double atan (double __x) __attribute__ ((__nothrow__)); extern double __atan (double __x) __attribute__ ((__nothrow__)); + +extern double atan2 (double __y, double __x) __attribute__ ((__nothrow__)); extern double __atan2 (double __y, double __x) __attribute__ ((__nothrow__)); + + +extern double cos (double __x) __attribute__ ((__nothrow__)); extern double __cos (double __x) __attribute__ ((__nothrow__)); + +extern double sin (double __x) __attribute__ ((__nothrow__)); extern double __sin (double __x) __attribute__ ((__nothrow__)); + +extern double tan (double __x) __attribute__ ((__nothrow__)); extern double __tan (double __x) __attribute__ ((__nothrow__)); + + + + +extern double cosh (double __x) __attribute__ ((__nothrow__)); extern double __cosh (double __x) __attribute__ ((__nothrow__)); + +extern double sinh (double __x) __attribute__ ((__nothrow__)); extern double __sinh (double __x) __attribute__ ((__nothrow__)); + +extern double tanh (double __x) __attribute__ ((__nothrow__)); extern double __tanh (double __x) __attribute__ ((__nothrow__)); + + + + +extern void sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__)); extern void __sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__)) + ; + + + + + +extern double acosh (double __x) __attribute__ ((__nothrow__)); extern double __acosh (double __x) __attribute__ ((__nothrow__)); + +extern double asinh (double __x) __attribute__ ((__nothrow__)); extern double __asinh (double __x) __attribute__ ((__nothrow__)); + +extern double atanh (double __x) __attribute__ ((__nothrow__)); extern double __atanh (double __x) __attribute__ ((__nothrow__)); + + + + + + + +extern double exp (double __x) __attribute__ ((__nothrow__)); extern double __exp (double __x) __attribute__ ((__nothrow__)); + + +extern double frexp (double __x, int *__exponent) __attribute__ ((__nothrow__)); extern double __frexp (double __x, int *__exponent) __attribute__ ((__nothrow__)); + + +extern double ldexp (double __x, int __exponent) __attribute__ ((__nothrow__)); extern double __ldexp (double __x, int __exponent) __attribute__ ((__nothrow__)); + + +extern double log (double __x) __attribute__ ((__nothrow__)); extern double __log (double __x) __attribute__ ((__nothrow__)); + + +extern double log10 (double __x) __attribute__ ((__nothrow__)); extern double __log10 (double __x) __attribute__ ((__nothrow__)); + + +extern double modf (double __x, double *__iptr) __attribute__ ((__nothrow__)); extern double __modf (double __x, double *__iptr) __attribute__ ((__nothrow__)); + + + + +extern double exp10 (double __x) __attribute__ ((__nothrow__)); extern double __exp10 (double __x) __attribute__ ((__nothrow__)); + +extern double pow10 (double __x) __attribute__ ((__nothrow__)); extern double __pow10 (double __x) __attribute__ ((__nothrow__)); + + + + + +extern double expm1 (double __x) __attribute__ ((__nothrow__)); extern double __expm1 (double __x) __attribute__ ((__nothrow__)); + + +extern double log1p (double __x) __attribute__ ((__nothrow__)); extern double __log1p (double __x) __attribute__ ((__nothrow__)); + + +extern double logb (double __x) __attribute__ ((__nothrow__)); extern double __logb (double __x) __attribute__ ((__nothrow__)); + + + + + + +extern double exp2 (double __x) __attribute__ ((__nothrow__)); extern double __exp2 (double __x) __attribute__ ((__nothrow__)); + + +extern double log2 (double __x) __attribute__ ((__nothrow__)); extern double __log2 (double __x) __attribute__ ((__nothrow__)); + + + + + + + + +extern double pow (double __x, double __y) __attribute__ ((__nothrow__)); extern double __pow (double __x, double __y) __attribute__ ((__nothrow__)); + + +extern double sqrt (double __x) __attribute__ ((__nothrow__)); extern double __sqrt (double __x) __attribute__ ((__nothrow__)); + + + + + +extern double hypot (double __x, double __y) __attribute__ ((__nothrow__)); extern double __hypot (double __x, double __y) __attribute__ ((__nothrow__)); + + + + + + +extern double cbrt (double __x) __attribute__ ((__nothrow__)); extern double __cbrt (double __x) __attribute__ ((__nothrow__)); + + + + + + + + +extern double ceil (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __ceil (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern double fabs (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __fabs (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern double floor (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __floor (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern double fmod (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fmod (double __x, double __y) __attribute__ ((__nothrow__)); + + + + +extern int __isinf (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern int __finite (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + + +extern int isinf (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern int finite (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern double drem (double __x, double __y) __attribute__ ((__nothrow__)); extern double __drem (double __x, double __y) __attribute__ ((__nothrow__)); + + + +extern double significand (double __x) __attribute__ ((__nothrow__)); extern double __significand (double __x) __attribute__ ((__nothrow__)); + + + + + +extern double copysign (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + + + +extern double nan (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __nan (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + + +extern int __isnan (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + +extern int isnan (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern double j0 (double) __attribute__ ((__nothrow__)); extern double __j0 (double) __attribute__ ((__nothrow__)); +extern double j1 (double) __attribute__ ((__nothrow__)); extern double __j1 (double) __attribute__ ((__nothrow__)); +extern double jn (int, double) __attribute__ ((__nothrow__)); extern double __jn (int, double) __attribute__ ((__nothrow__)); +extern double y0 (double) __attribute__ ((__nothrow__)); extern double __y0 (double) __attribute__ ((__nothrow__)); +extern double y1 (double) __attribute__ ((__nothrow__)); extern double __y1 (double) __attribute__ ((__nothrow__)); +extern double yn (int, double) __attribute__ ((__nothrow__)); extern double __yn (int, double) __attribute__ ((__nothrow__)); + + + + + + +extern double erf (double) __attribute__ ((__nothrow__)); extern double __erf (double) __attribute__ ((__nothrow__)); +extern double erfc (double) __attribute__ ((__nothrow__)); extern double __erfc (double) __attribute__ ((__nothrow__)); +extern double lgamma (double) __attribute__ ((__nothrow__)); extern double __lgamma (double) __attribute__ ((__nothrow__)); + + + + + + +extern double tgamma (double) __attribute__ ((__nothrow__)); extern double __tgamma (double) __attribute__ ((__nothrow__)); + + + + + +extern double gamma (double) __attribute__ ((__nothrow__)); extern double __gamma (double) __attribute__ ((__nothrow__)); + + + + + + +extern double lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__)); extern double __lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__)); + + + + + + + +extern double rint (double __x) __attribute__ ((__nothrow__)); extern double __rint (double __x) __attribute__ ((__nothrow__)); + + +extern double nextafter (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + +extern double nexttoward (double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + +extern double remainder (double __x, double __y) __attribute__ ((__nothrow__)); extern double __remainder (double __x, double __y) __attribute__ ((__nothrow__)); + + + +extern double scalbn (double __x, int __n) __attribute__ ((__nothrow__)); extern double __scalbn (double __x, int __n) __attribute__ ((__nothrow__)); + + + +extern int ilogb (double __x) __attribute__ ((__nothrow__)); extern int __ilogb (double __x) __attribute__ ((__nothrow__)); + + + + +extern double scalbln (double __x, long int __n) __attribute__ ((__nothrow__)); extern double __scalbln (double __x, long int __n) __attribute__ ((__nothrow__)); + + + +extern double nearbyint (double __x) __attribute__ ((__nothrow__)); extern double __nearbyint (double __x) __attribute__ ((__nothrow__)); + + + +extern double round (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __round (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + +extern double trunc (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __trunc (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + +extern double remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__)); extern double __remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__)); + + + + + + +extern long int lrint (double __x) __attribute__ ((__nothrow__)); extern long int __lrint (double __x) __attribute__ ((__nothrow__)); +extern long long int llrint (double __x) __attribute__ ((__nothrow__)); extern long long int __llrint (double __x) __attribute__ ((__nothrow__)); + + + +extern long int lround (double __x) __attribute__ ((__nothrow__)); extern long int __lround (double __x) __attribute__ ((__nothrow__)); +extern long long int llround (double __x) __attribute__ ((__nothrow__)); extern long long int __llround (double __x) __attribute__ ((__nothrow__)); + + + +extern double fdim (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fdim (double __x, double __y) __attribute__ ((__nothrow__)); + + +extern double fmax (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fmax (double __x, double __y) __attribute__ ((__nothrow__)); + + +extern double fmin (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fmin (double __x, double __y) __attribute__ ((__nothrow__)); + + + +extern int __fpclassify (double __value) __attribute__ ((__nothrow__)) + __attribute__ ((__const__)); + + +extern int __signbit (double __value) __attribute__ ((__nothrow__)) + __attribute__ ((__const__)); + + + +extern double fma (double __x, double __y, double __z) __attribute__ ((__nothrow__)); extern double __fma (double __x, double __y, double __z) __attribute__ ((__nothrow__)); + + + + + + + + +extern double scalb (double __x, double __n) __attribute__ ((__nothrow__)); extern double __scalb (double __x, double __n) __attribute__ ((__nothrow__)); +# 72 "/usr/include/math.h" 2 3 4 +# 94 "/usr/include/math.h" 3 4 +# 1 "/usr/include/bits/mathcalls.h" 1 3 4 +# 53 "/usr/include/bits/mathcalls.h" 3 4 + + +extern float acosf (float __x) __attribute__ ((__nothrow__)); extern float __acosf (float __x) __attribute__ ((__nothrow__)); + +extern float asinf (float __x) __attribute__ ((__nothrow__)); extern float __asinf (float __x) __attribute__ ((__nothrow__)); + +extern float atanf (float __x) __attribute__ ((__nothrow__)); extern float __atanf (float __x) __attribute__ ((__nothrow__)); + +extern float atan2f (float __y, float __x) __attribute__ ((__nothrow__)); extern float __atan2f (float __y, float __x) __attribute__ ((__nothrow__)); + + +extern float cosf (float __x) __attribute__ ((__nothrow__)); extern float __cosf (float __x) __attribute__ ((__nothrow__)); + +extern float sinf (float __x) __attribute__ ((__nothrow__)); extern float __sinf (float __x) __attribute__ ((__nothrow__)); + +extern float tanf (float __x) __attribute__ ((__nothrow__)); extern float __tanf (float __x) __attribute__ ((__nothrow__)); + + + + +extern float coshf (float __x) __attribute__ ((__nothrow__)); extern float __coshf (float __x) __attribute__ ((__nothrow__)); + +extern float sinhf (float __x) __attribute__ ((__nothrow__)); extern float __sinhf (float __x) __attribute__ ((__nothrow__)); + +extern float tanhf (float __x) __attribute__ ((__nothrow__)); extern float __tanhf (float __x) __attribute__ ((__nothrow__)); + + + + +extern void + sincosf +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__)); extern void + __sincosf +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__)) + ; + + + + + +extern float acoshf (float __x) __attribute__ ((__nothrow__)); extern float __acoshf (float __x) __attribute__ ((__nothrow__)); + +extern float asinhf (float __x) __attribute__ ((__nothrow__)); extern float __asinhf (float __x) __attribute__ ((__nothrow__)); + +extern float atanhf (float __x) __attribute__ ((__nothrow__)); extern float __atanhf (float __x) __attribute__ ((__nothrow__)); + + + + + + + +extern float expf (float __x) __attribute__ ((__nothrow__)); extern float __expf (float __x) __attribute__ ((__nothrow__)); + + +extern float frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__)); extern float __frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__)); + + +extern float ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__)); extern float __ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__)); + + +extern float logf (float __x) __attribute__ ((__nothrow__)); extern float __logf (float __x) __attribute__ ((__nothrow__)); + + +extern float log10f (float __x) __attribute__ ((__nothrow__)); extern float __log10f (float __x) __attribute__ ((__nothrow__)); + + +extern float modff (float __x, float *__iptr) __attribute__ ((__nothrow__)); extern float __modff (float __x, float *__iptr) __attribute__ ((__nothrow__)); + + + + +extern float exp10f (float __x) __attribute__ ((__nothrow__)); extern float __exp10f (float __x) __attribute__ ((__nothrow__)); + +extern float pow10f (float __x) __attribute__ ((__nothrow__)); extern float __pow10f (float __x) __attribute__ ((__nothrow__)); + + + + + +extern float expm1f (float __x) __attribute__ ((__nothrow__)); extern float __expm1f (float __x) __attribute__ ((__nothrow__)); + + +extern float log1pf (float __x) __attribute__ ((__nothrow__)); extern float __log1pf (float __x) __attribute__ ((__nothrow__)); + + +extern float logbf (float __x) __attribute__ ((__nothrow__)); extern float __logbf (float __x) __attribute__ ((__nothrow__)); + + + + + + +extern float exp2f (float __x) __attribute__ ((__nothrow__)); extern float __exp2f (float __x) __attribute__ ((__nothrow__)); + + +extern float log2f (float __x) __attribute__ ((__nothrow__)); extern float __log2f (float __x) __attribute__ ((__nothrow__)); + + + + + + + + +extern float powf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __powf (float __x, float __y) __attribute__ ((__nothrow__)); + + +extern float sqrtf (float __x) __attribute__ ((__nothrow__)); extern float __sqrtf (float __x) __attribute__ ((__nothrow__)); + + + + + +extern float hypotf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __hypotf (float __x, float __y) __attribute__ ((__nothrow__)); + + + + + + +extern float cbrtf (float __x) __attribute__ ((__nothrow__)); extern float __cbrtf (float __x) __attribute__ ((__nothrow__)); + + + + + + + + +extern float ceilf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __ceilf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern float fabsf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __fabsf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern float floorf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __floorf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern float fmodf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fmodf (float __x, float __y) __attribute__ ((__nothrow__)); + + + + +extern int __isinff (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern int __finitef (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + + +extern int isinff (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern int finitef (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern float dremf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __dremf (float __x, float __y) __attribute__ ((__nothrow__)); + + + +extern float significandf (float __x) __attribute__ ((__nothrow__)); extern float __significandf (float __x) __attribute__ ((__nothrow__)); + + + + + +extern float copysignf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + + + +extern float nanf (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + + +extern int __isnanf (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + +extern int isnanf (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern float j0f (float) __attribute__ ((__nothrow__)); extern float __j0f (float) __attribute__ ((__nothrow__)); +extern float j1f (float) __attribute__ ((__nothrow__)); extern float __j1f (float) __attribute__ ((__nothrow__)); +extern float jnf (int, float) __attribute__ ((__nothrow__)); extern float __jnf (int, float) __attribute__ ((__nothrow__)); +extern float y0f (float) __attribute__ ((__nothrow__)); extern float __y0f (float) __attribute__ ((__nothrow__)); +extern float y1f (float) __attribute__ ((__nothrow__)); extern float __y1f (float) __attribute__ ((__nothrow__)); +extern float ynf (int, float) __attribute__ ((__nothrow__)); extern float __ynf (int, float) __attribute__ ((__nothrow__)); + + + + + + +extern float erff (float) __attribute__ ((__nothrow__)); extern float __erff (float) __attribute__ ((__nothrow__)); +extern float erfcf (float) __attribute__ ((__nothrow__)); extern float __erfcf (float) __attribute__ ((__nothrow__)); +extern float lgammaf (float) __attribute__ ((__nothrow__)); extern float __lgammaf (float) __attribute__ ((__nothrow__)); + + + + + + +extern float tgammaf (float) __attribute__ ((__nothrow__)); extern float __tgammaf (float) __attribute__ ((__nothrow__)); + + + + + +extern float gammaf (float) __attribute__ ((__nothrow__)); extern float __gammaf (float) __attribute__ ((__nothrow__)); + + + + + + +extern float lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__)); extern float __lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__)); + + + + + + + +extern float rintf (float __x) __attribute__ ((__nothrow__)); extern float __rintf (float __x) __attribute__ ((__nothrow__)); + + +extern float nextafterf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + +extern float nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + +extern float remainderf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __remainderf (float __x, float __y) __attribute__ ((__nothrow__)); + + + +extern float scalbnf (float __x, int __n) __attribute__ ((__nothrow__)); extern float __scalbnf (float __x, int __n) __attribute__ ((__nothrow__)); + + + +extern int ilogbf (float __x) __attribute__ ((__nothrow__)); extern int __ilogbf (float __x) __attribute__ ((__nothrow__)); + + + + +extern float scalblnf (float __x, long int __n) __attribute__ ((__nothrow__)); extern float __scalblnf (float __x, long int __n) __attribute__ ((__nothrow__)); + + + +extern float nearbyintf (float __x) __attribute__ ((__nothrow__)); extern float __nearbyintf (float __x) __attribute__ ((__nothrow__)); + + + +extern float roundf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __roundf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + +extern float truncf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __truncf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + +extern float remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__)); extern float __remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__)); + + + + + + +extern long int lrintf (float __x) __attribute__ ((__nothrow__)); extern long int __lrintf (float __x) __attribute__ ((__nothrow__)); +extern long long int llrintf (float __x) __attribute__ ((__nothrow__)); extern long long int __llrintf (float __x) __attribute__ ((__nothrow__)); + + + +extern long int lroundf (float __x) __attribute__ ((__nothrow__)); extern long int __lroundf (float __x) __attribute__ ((__nothrow__)); +extern long long int llroundf (float __x) __attribute__ ((__nothrow__)); extern long long int __llroundf (float __x) __attribute__ ((__nothrow__)); + + + +extern float fdimf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fdimf (float __x, float __y) __attribute__ ((__nothrow__)); + + +extern float fmaxf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fmaxf (float __x, float __y) __attribute__ ((__nothrow__)); + + +extern float fminf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fminf (float __x, float __y) __attribute__ ((__nothrow__)); + + + +extern int __fpclassifyf (float __value) __attribute__ ((__nothrow__)) + __attribute__ ((__const__)); + + +extern int __signbitf (float __value) __attribute__ ((__nothrow__)) + __attribute__ ((__const__)); + + + +extern float fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__)); extern float __fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__)); + + + + + + + + +extern float scalbf (float __x, float __n) __attribute__ ((__nothrow__)); extern float __scalbf (float __x, float __n) __attribute__ ((__nothrow__)); +# 95 "/usr/include/math.h" 2 3 4 +# 141 "/usr/include/math.h" 3 4 +# 1 "/usr/include/bits/mathcalls.h" 1 3 4 +# 53 "/usr/include/bits/mathcalls.h" 3 4 + + +extern long double acosl (long double __x) __attribute__ ((__nothrow__)); extern long double __acosl (long double __x) __attribute__ ((__nothrow__)); + +extern long double asinl (long double __x) __attribute__ ((__nothrow__)); extern long double __asinl (long double __x) __attribute__ ((__nothrow__)); + +extern long double atanl (long double __x) __attribute__ ((__nothrow__)); extern long double __atanl (long double __x) __attribute__ ((__nothrow__)); + +extern long double atan2l (long double __y, long double __x) __attribute__ ((__nothrow__)); extern long double __atan2l (long double __y, long double __x) __attribute__ ((__nothrow__)); + + +extern long double cosl (long double __x) __attribute__ ((__nothrow__)); extern long double __cosl (long double __x) __attribute__ ((__nothrow__)); + +extern long double sinl (long double __x) __attribute__ ((__nothrow__)); extern long double __sinl (long double __x) __attribute__ ((__nothrow__)); + +extern long double tanl (long double __x) __attribute__ ((__nothrow__)); extern long double __tanl (long double __x) __attribute__ ((__nothrow__)); + + + + +extern long double coshl (long double __x) __attribute__ ((__nothrow__)); extern long double __coshl (long double __x) __attribute__ ((__nothrow__)); + +extern long double sinhl (long double __x) __attribute__ ((__nothrow__)); extern long double __sinhl (long double __x) __attribute__ ((__nothrow__)); + +extern long double tanhl (long double __x) __attribute__ ((__nothrow__)); extern long double __tanhl (long double __x) __attribute__ ((__nothrow__)); + + + + +extern void + sincosl +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__)); extern void + __sincosl +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__)) + ; + + + + + +extern long double acoshl (long double __x) __attribute__ ((__nothrow__)); extern long double __acoshl (long double __x) __attribute__ ((__nothrow__)); + +extern long double asinhl (long double __x) __attribute__ ((__nothrow__)); extern long double __asinhl (long double __x) __attribute__ ((__nothrow__)); + +extern long double atanhl (long double __x) __attribute__ ((__nothrow__)); extern long double __atanhl (long double __x) __attribute__ ((__nothrow__)); + + + + + + + +extern long double expl (long double __x) __attribute__ ((__nothrow__)); extern long double __expl (long double __x) __attribute__ ((__nothrow__)); + + +extern long double frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__)); extern long double __frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__)); + + +extern long double ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__)); extern long double __ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__)); + + +extern long double logl (long double __x) __attribute__ ((__nothrow__)); extern long double __logl (long double __x) __attribute__ ((__nothrow__)); + + +extern long double log10l (long double __x) __attribute__ ((__nothrow__)); extern long double __log10l (long double __x) __attribute__ ((__nothrow__)); + + +extern long double modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__)); extern long double __modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__)); + + + + +extern long double exp10l (long double __x) __attribute__ ((__nothrow__)); extern long double __exp10l (long double __x) __attribute__ ((__nothrow__)); + +extern long double pow10l (long double __x) __attribute__ ((__nothrow__)); extern long double __pow10l (long double __x) __attribute__ ((__nothrow__)); + + + + + +extern long double expm1l (long double __x) __attribute__ ((__nothrow__)); extern long double __expm1l (long double __x) __attribute__ ((__nothrow__)); + + +extern long double log1pl (long double __x) __attribute__ ((__nothrow__)); extern long double __log1pl (long double __x) __attribute__ ((__nothrow__)); + + +extern long double logbl (long double __x) __attribute__ ((__nothrow__)); extern long double __logbl (long double __x) __attribute__ ((__nothrow__)); + + + + + + +extern long double exp2l (long double __x) __attribute__ ((__nothrow__)); extern long double __exp2l (long double __x) __attribute__ ((__nothrow__)); + + +extern long double log2l (long double __x) __attribute__ ((__nothrow__)); extern long double __log2l (long double __x) __attribute__ ((__nothrow__)); + + + + + + + + +extern long double powl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __powl (long double __x, long double __y) __attribute__ ((__nothrow__)); + + +extern long double sqrtl (long double __x) __attribute__ ((__nothrow__)); extern long double __sqrtl (long double __x) __attribute__ ((__nothrow__)); + + + + + +extern long double hypotl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __hypotl (long double __x, long double __y) __attribute__ ((__nothrow__)); + + + + + + +extern long double cbrtl (long double __x) __attribute__ ((__nothrow__)); extern long double __cbrtl (long double __x) __attribute__ ((__nothrow__)); + + + + + + + + +extern long double ceill (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __ceill (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern long double fabsl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __fabsl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern long double floorl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __floorl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern long double fmodl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fmodl (long double __x, long double __y) __attribute__ ((__nothrow__)); + + + + +extern int __isinfl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern int __finitel (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + + +extern int isinfl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern int finitel (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern long double dreml (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __dreml (long double __x, long double __y) __attribute__ ((__nothrow__)); + + + +extern long double significandl (long double __x) __attribute__ ((__nothrow__)); extern long double __significandl (long double __x) __attribute__ ((__nothrow__)); + + + + + +extern long double copysignl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + + + +extern long double nanl (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + + +extern int __isnanl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + +extern int isnanl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern long double j0l (long double) __attribute__ ((__nothrow__)); extern long double __j0l (long double) __attribute__ ((__nothrow__)); +extern long double j1l (long double) __attribute__ ((__nothrow__)); extern long double __j1l (long double) __attribute__ ((__nothrow__)); +extern long double jnl (int, long double) __attribute__ ((__nothrow__)); extern long double __jnl (int, long double) __attribute__ ((__nothrow__)); +extern long double y0l (long double) __attribute__ ((__nothrow__)); extern long double __y0l (long double) __attribute__ ((__nothrow__)); +extern long double y1l (long double) __attribute__ ((__nothrow__)); extern long double __y1l (long double) __attribute__ ((__nothrow__)); +extern long double ynl (int, long double) __attribute__ ((__nothrow__)); extern long double __ynl (int, long double) __attribute__ ((__nothrow__)); + + + + + + +extern long double erfl (long double) __attribute__ ((__nothrow__)); extern long double __erfl (long double) __attribute__ ((__nothrow__)); +extern long double erfcl (long double) __attribute__ ((__nothrow__)); extern long double __erfcl (long double) __attribute__ ((__nothrow__)); +extern long double lgammal (long double) __attribute__ ((__nothrow__)); extern long double __lgammal (long double) __attribute__ ((__nothrow__)); + + + + + + +extern long double tgammal (long double) __attribute__ ((__nothrow__)); extern long double __tgammal (long double) __attribute__ ((__nothrow__)); + + + + + +extern long double gammal (long double) __attribute__ ((__nothrow__)); extern long double __gammal (long double) __attribute__ ((__nothrow__)); + + + + + + +extern long double lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__)); extern long double __lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__)); + + + + + + + +extern long double rintl (long double __x) __attribute__ ((__nothrow__)); extern long double __rintl (long double __x) __attribute__ ((__nothrow__)); + + +extern long double nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + +extern long double nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + +extern long double remainderl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __remainderl (long double __x, long double __y) __attribute__ ((__nothrow__)); + + + +extern long double scalbnl (long double __x, int __n) __attribute__ ((__nothrow__)); extern long double __scalbnl (long double __x, int __n) __attribute__ ((__nothrow__)); + + + +extern int ilogbl (long double __x) __attribute__ ((__nothrow__)); extern int __ilogbl (long double __x) __attribute__ ((__nothrow__)); + + + + +extern long double scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__)); extern long double __scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__)); + + + +extern long double nearbyintl (long double __x) __attribute__ ((__nothrow__)); extern long double __nearbyintl (long double __x) __attribute__ ((__nothrow__)); + + + +extern long double roundl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __roundl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + +extern long double truncl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __truncl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + +extern long double remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__)); extern long double __remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__)); + + + + + + +extern long int lrintl (long double __x) __attribute__ ((__nothrow__)); extern long int __lrintl (long double __x) __attribute__ ((__nothrow__)); +extern long long int llrintl (long double __x) __attribute__ ((__nothrow__)); extern long long int __llrintl (long double __x) __attribute__ ((__nothrow__)); + + + +extern long int lroundl (long double __x) __attribute__ ((__nothrow__)); extern long int __lroundl (long double __x) __attribute__ ((__nothrow__)); +extern long long int llroundl (long double __x) __attribute__ ((__nothrow__)); extern long long int __llroundl (long double __x) __attribute__ ((__nothrow__)); + + + +extern long double fdiml (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fdiml (long double __x, long double __y) __attribute__ ((__nothrow__)); + + +extern long double fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__)); + + +extern long double fminl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fminl (long double __x, long double __y) __attribute__ ((__nothrow__)); + + + +extern int __fpclassifyl (long double __value) __attribute__ ((__nothrow__)) + __attribute__ ((__const__)); + + +extern int __signbitl (long double __value) __attribute__ ((__nothrow__)) + __attribute__ ((__const__)); + + + +extern long double fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__)); extern long double __fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__)); + + + + + + + + +extern long double scalbl (long double __x, long double __n) __attribute__ ((__nothrow__)); extern long double __scalbl (long double __x, long double __n) __attribute__ ((__nothrow__)); +# 142 "/usr/include/math.h" 2 3 4 +# 157 "/usr/include/math.h" 3 4 +extern int signgam; +# 198 "/usr/include/math.h" 3 4 +enum + { + FP_NAN, + + FP_INFINITE, + + FP_ZERO, + + FP_SUBNORMAL, + + FP_NORMAL + + }; +# 291 "/usr/include/math.h" 3 4 +typedef enum +{ + _IEEE_ = -1, + _SVID_, + _XOPEN_, + _POSIX_, + _ISOC_ +} _LIB_VERSION_TYPE; + + + + +extern _LIB_VERSION_TYPE _LIB_VERSION; +# 316 "/usr/include/math.h" 3 4 +struct exception + + { + int type; + char *name; + double arg1; + double arg2; + double retval; + }; + + + + +extern int matherr (struct exception *__exc); +# 416 "/usr/include/math.h" 3 4 +# 1 "/usr/include/bits/mathinline.h" 1 3 4 +# 417 "/usr/include/math.h" 2 3 4 +# 472 "/usr/include/math.h" 3 4 + +# 43 "../../src/mesa/main/compiler.h" 2 + +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include-fixed/limits.h" 1 3 4 +# 34 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include-fixed/limits.h" 3 4 +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include-fixed/syslimits.h" 1 3 4 + + + + + + +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include-fixed/limits.h" 1 3 4 +# 169 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include-fixed/limits.h" 3 4 +# 1 "/usr/include/limits.h" 1 3 4 +# 145 "/usr/include/limits.h" 3 4 +# 1 "/usr/include/bits/posix1_lim.h" 1 3 4 +# 157 "/usr/include/bits/posix1_lim.h" 3 4 +# 1 "/usr/include/bits/local_lim.h" 1 3 4 +# 39 "/usr/include/bits/local_lim.h" 3 4 +# 1 "/usr/include/linux/limits.h" 1 3 4 +# 40 "/usr/include/bits/local_lim.h" 2 3 4 +# 158 "/usr/include/bits/posix1_lim.h" 2 3 4 +# 146 "/usr/include/limits.h" 2 3 4 + + + +# 1 "/usr/include/bits/posix2_lim.h" 1 3 4 +# 150 "/usr/include/limits.h" 2 3 4 + + + +# 1 "/usr/include/bits/xopen_lim.h" 1 3 4 +# 34 "/usr/include/bits/xopen_lim.h" 3 4 +# 1 "/usr/include/bits/stdio_lim.h" 1 3 4 +# 35 "/usr/include/bits/xopen_lim.h" 2 3 4 +# 154 "/usr/include/limits.h" 2 3 4 +# 170 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include-fixed/limits.h" 2 3 4 +# 8 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include-fixed/syslimits.h" 2 3 4 +# 35 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include-fixed/limits.h" 2 3 4 +# 45 "../../src/mesa/main/compiler.h" 2 +# 1 "/usr/include/stdlib.h" 1 3 4 +# 33 "/usr/include/stdlib.h" 3 4 +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 34 "/usr/include/stdlib.h" 2 3 4 + + + + + + + + +# 1 "/usr/include/bits/waitflags.h" 1 3 4 +# 43 "/usr/include/stdlib.h" 2 3 4 +# 1 "/usr/include/bits/waitstatus.h" 1 3 4 +# 67 "/usr/include/bits/waitstatus.h" 3 4 +union wait + { + int w_status; + struct + { + + + + + + + + unsigned int:16; + unsigned int __w_retcode:8; + unsigned int __w_coredump:1; + unsigned int __w_termsig:7; + + } __wait_terminated; + struct + { + + + + + + + unsigned int:16; + unsigned int __w_stopsig:8; + unsigned int __w_stopval:8; + + } __wait_stopped; + }; +# 44 "/usr/include/stdlib.h" 2 3 4 +# 68 "/usr/include/stdlib.h" 3 4 +typedef union + { + union wait *__uptr; + int *__iptr; + } __WAIT_STATUS __attribute__ ((__transparent_union__)); +# 96 "/usr/include/stdlib.h" 3 4 + + +typedef struct + { + int quot; + int rem; + } div_t; + + + +typedef struct + { + long int quot; + long int rem; + } ldiv_t; + + + + + + + +__extension__ typedef struct + { + long long int quot; + long long int rem; + } lldiv_t; + + +# 140 "/usr/include/stdlib.h" 3 4 +extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + +extern double atof (__const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern int atoi (__const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern long int atol (__const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +__extension__ extern long long int atoll (__const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern double strtod (__const char *__restrict __nptr, + char **__restrict __endptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern float strtof (__const char *__restrict __nptr, + char **__restrict __endptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern long double strtold (__const char *__restrict __nptr, + char **__restrict __endptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern long int strtol (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern unsigned long int strtoul (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +__extension__ +extern long long int strtoq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtouq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +__extension__ +extern long long int strtoll (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtoull (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +# 240 "/usr/include/stdlib.h" 3 4 +extern long int strtol_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +extern unsigned long int strtoul_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern long long int strtoll_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtoull_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +extern double strtod_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + +extern float strtof_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + +extern long double strtold_l (__const char *__restrict __nptr, + char **__restrict __endptr, + __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + + + + + +extern __inline __attribute__ ((__gnu_inline__)) double +__attribute__ ((__nothrow__)) atof (__const char *__nptr) +{ + return strtod (__nptr, (char **) ((void *)0)); +} +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) atoi (__const char *__nptr) +{ + return (int) strtol (__nptr, (char **) ((void *)0), 10); +} +extern __inline __attribute__ ((__gnu_inline__)) long int +__attribute__ ((__nothrow__)) atol (__const char *__nptr) +{ + return strtol (__nptr, (char **) ((void *)0), 10); +} + + + + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int +__attribute__ ((__nothrow__)) atoll (__const char *__nptr) +{ + return strtoll (__nptr, (char **) ((void *)0), 10); +} + +# 311 "/usr/include/stdlib.h" 3 4 +extern char *l64a (long int __n) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + +extern long int a64l (__const char *__s) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +# 1 "/usr/include/sys/types.h" 1 3 4 +# 28 "/usr/include/sys/types.h" 3 4 + + + + + + +typedef __u_char u_char; +typedef __u_short u_short; +typedef __u_int u_int; +typedef __u_long u_long; +typedef __quad_t quad_t; +typedef __u_quad_t u_quad_t; +typedef __fsid_t fsid_t; + + + + +typedef __loff_t loff_t; + + + +typedef __ino_t ino_t; + + + + + + +typedef __ino64_t ino64_t; + + + + +typedef __dev_t dev_t; + + + + +typedef __gid_t gid_t; + + + + +typedef __mode_t mode_t; + + + + +typedef __nlink_t nlink_t; + + + + +typedef __uid_t uid_t; + + + + + +typedef __off_t off_t; + + + + + + +typedef __off64_t off64_t; + + + + +typedef __pid_t pid_t; + + + + + +typedef __id_t id_t; + + + + +typedef __ssize_t ssize_t; + + + + + +typedef __daddr_t daddr_t; +typedef __caddr_t caddr_t; + + + + + +typedef __key_t key_t; +# 133 "/usr/include/sys/types.h" 3 4 +# 1 "/usr/include/time.h" 1 3 4 +# 58 "/usr/include/time.h" 3 4 + + +typedef __clock_t clock_t; + + + +# 74 "/usr/include/time.h" 3 4 + + +typedef __time_t time_t; + + + +# 92 "/usr/include/time.h" 3 4 +typedef __clockid_t clockid_t; +# 104 "/usr/include/time.h" 3 4 +typedef __timer_t timer_t; +# 134 "/usr/include/sys/types.h" 2 3 4 + + + +typedef __useconds_t useconds_t; + + + +typedef __suseconds_t suseconds_t; + + + + + +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 148 "/usr/include/sys/types.h" 2 3 4 + + + +typedef unsigned long int ulong; +typedef unsigned short int ushort; +typedef unsigned int uint; +# 201 "/usr/include/sys/types.h" 3 4 +typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); +typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); + +typedef int register_t __attribute__ ((__mode__ (__word__))); +# 220 "/usr/include/sys/types.h" 3 4 +# 1 "/usr/include/sys/select.h" 1 3 4 +# 31 "/usr/include/sys/select.h" 3 4 +# 1 "/usr/include/bits/select.h" 1 3 4 +# 32 "/usr/include/sys/select.h" 2 3 4 + + +# 1 "/usr/include/bits/sigset.h" 1 3 4 +# 24 "/usr/include/bits/sigset.h" 3 4 +typedef int __sig_atomic_t; + + + + +typedef struct + { + unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; + } __sigset_t; +# 35 "/usr/include/sys/select.h" 2 3 4 + + + +typedef __sigset_t sigset_t; + + + + + +# 1 "/usr/include/time.h" 1 3 4 +# 120 "/usr/include/time.h" 3 4 +struct timespec + { + __time_t tv_sec; + long int tv_nsec; + }; +# 45 "/usr/include/sys/select.h" 2 3 4 + +# 1 "/usr/include/bits/time.h" 1 3 4 +# 75 "/usr/include/bits/time.h" 3 4 +struct timeval + { + __time_t tv_sec; + __suseconds_t tv_usec; + }; +# 47 "/usr/include/sys/select.h" 2 3 4 +# 55 "/usr/include/sys/select.h" 3 4 +typedef long int __fd_mask; +# 67 "/usr/include/sys/select.h" 3 4 +typedef struct + { + + + + __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; + + + + + + } fd_set; + + + + + + +typedef __fd_mask fd_mask; +# 99 "/usr/include/sys/select.h" 3 4 + +# 109 "/usr/include/sys/select.h" 3 4 +extern int select (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + struct timeval *__restrict __timeout); +# 121 "/usr/include/sys/select.h" 3 4 +extern int pselect (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + const struct timespec *__restrict __timeout, + const __sigset_t *__restrict __sigmask); + + + +# 221 "/usr/include/sys/types.h" 2 3 4 + + +# 1 "/usr/include/sys/sysmacros.h" 1 3 4 +# 30 "/usr/include/sys/sysmacros.h" 3 4 +__extension__ +extern unsigned int gnu_dev_major (unsigned long long int __dev) + __attribute__ ((__nothrow__)); +__extension__ +extern unsigned int gnu_dev_minor (unsigned long long int __dev) + __attribute__ ((__nothrow__)); +__extension__ +extern unsigned long long int gnu_dev_makedev (unsigned int __major, + unsigned int __minor) + __attribute__ ((__nothrow__)); + + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int +__attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev) +{ + return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); +} + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int +__attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev) +{ + return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); +} + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned long long int +__attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor) +{ + return ((__minor & 0xff) | ((__major & 0xfff) << 8) + | (((unsigned long long int) (__minor & ~0xff)) << 12) + | (((unsigned long long int) (__major & ~0xfff)) << 32)); +} +# 224 "/usr/include/sys/types.h" 2 3 4 + + + + + +typedef __blksize_t blksize_t; + + + + + + +typedef __blkcnt_t blkcnt_t; + + + +typedef __fsblkcnt_t fsblkcnt_t; + + + +typedef __fsfilcnt_t fsfilcnt_t; +# 263 "/usr/include/sys/types.h" 3 4 +typedef __blkcnt64_t blkcnt64_t; +typedef __fsblkcnt64_t fsblkcnt64_t; +typedef __fsfilcnt64_t fsfilcnt64_t; + + + + + +# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 +# 46 "/usr/include/bits/pthreadtypes.h" 3 4 +typedef unsigned long int pthread_t; + +typedef union +{ + char __size[36]; + long int __align; +} pthread_attr_t; + + +typedef struct __pthread_internal_slist +{ + struct __pthread_internal_slist *__next; +} __pthread_slist_t; + + + + +typedef union +{ + struct __pthread_mutex_s + { + int __lock __attribute__ ((aligned(16))); + unsigned int __count; + int __owner; + + + int __kind; + + + + int __compat_padding[4]; + + + unsigned int __nusers; + __extension__ union + { + int __spins; + __pthread_slist_t __list; + }; + + + int __reserved1; + int __reserved2; + } __data; + char __size[48]; + long int __align; +} pthread_mutex_t; + +typedef union +{ + char __size[4]; + long int __align; +} pthread_mutexattr_t; +# 108 "/usr/include/bits/pthreadtypes.h" 3 4 +typedef union +{ + struct + { + + + + + int __lock __attribute__ ((aligned(16))); + + + + + int __initializer; + unsigned int __futex; + void *__mutex; + + + __extension__ unsigned long long int __total_seq; + __extension__ unsigned long long int __wakeup_seq; + __extension__ unsigned long long int __woken_seq; + unsigned int __nwaiters; + unsigned int __broadcast_seq; + + + } __data; + char __size[48]; + __extension__ long long int __align; +} pthread_cond_t; + +typedef union +{ + char __size[4]; + long int __align; +} pthread_condattr_t; + + + +typedef unsigned int pthread_key_t; + + + +typedef int pthread_once_t; + + + + + +typedef union +{ + struct + { + + + + + int __compat_padding[4] __attribute__ ((aligned(16))); + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + int __writer; + + + + int __reserved1; + + + unsigned char __pad2; + unsigned char __pad1; + unsigned char __shared; + unsigned char __flags; + + + + int __reserved2; + int __reserved3; + int __reserved4; + } __data; + char __size[64]; + long int __align; +} pthread_rwlock_t; + +typedef union +{ + char __size[8]; + long int __align; +} pthread_rwlockattr_t; + + + + + +typedef volatile int pthread_spinlock_t; + + + + +typedef union +{ + char __size[48]; + long int __align; +} pthread_barrier_t; + +typedef union +{ + char __size[4]; + int __align; +} pthread_barrierattr_t; +# 272 "/usr/include/sys/types.h" 2 3 4 + + + +# 321 "/usr/include/stdlib.h" 2 3 4 + + + + + + +extern long int random (void) __attribute__ ((__nothrow__)); + + +extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__)); + + + + + +extern char *initstate (unsigned int __seed, char *__statebuf, + size_t __statelen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + +extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + + +struct random_data + { + int32_t *fptr; + int32_t *rptr; + int32_t *state; + int rand_type; + int rand_deg; + int rand_sep; + int32_t *end_ptr; + }; + +extern int random_r (struct random_data *__restrict __buf, + int32_t *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int srandom_r (unsigned int __seed, struct random_data *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + +extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, + size_t __statelen, + struct random_data *__restrict __buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); + +extern int setstate_r (char *__restrict __statebuf, + struct random_data *__restrict __buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern int rand (void) __attribute__ ((__nothrow__)); + +extern void srand (unsigned int __seed) __attribute__ ((__nothrow__)); + + + + +extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__)); + + + + + + + +extern double drand48 (void) __attribute__ ((__nothrow__)); +extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern long int lrand48 (void) __attribute__ ((__nothrow__)); +extern long int nrand48 (unsigned short int __xsubi[3]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern long int mrand48 (void) __attribute__ ((__nothrow__)); +extern long int jrand48 (unsigned short int __xsubi[3]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern void srand48 (long int __seedval) __attribute__ ((__nothrow__)); +extern unsigned short int *seed48 (unsigned short int __seed16v[3]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +struct drand48_data + { + unsigned short int __x[3]; + unsigned short int __old_x[3]; + unsigned short int __c; + unsigned short int __init; + unsigned long long int __a; + }; + + +extern int drand48_r (struct drand48_data *__restrict __buffer, + double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int erand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int lrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int nrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int mrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int jrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int srand48_r (long int __seedval, struct drand48_data *__buffer) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + +extern int seed48_r (unsigned short int __seed16v[3], + struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int lcong48_r (unsigned short int __param[7], + struct drand48_data *__buffer) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + + + + +extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + +extern void *calloc (size_t __nmemb, size_t __size) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + + + + + + + +extern void *realloc (void *__ptr, size_t __size) + __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + +extern void free (void *__ptr) __attribute__ ((__nothrow__)); + + + + +extern void cfree (void *__ptr) __attribute__ ((__nothrow__)); + + + +# 1 "/usr/include/alloca.h" 1 3 4 +# 25 "/usr/include/alloca.h" 3 4 +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 26 "/usr/include/alloca.h" 2 3 4 + + + + + + + +extern void *alloca (size_t __size) __attribute__ ((__nothrow__)); + + + + + + +# 498 "/usr/include/stdlib.h" 2 3 4 + + + + + +extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + +extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +extern void abort (void) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + +extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +# 528 "/usr/include/stdlib.h" 3 4 +extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern void exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + + + + + +extern void quick_exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + + + + + +extern void _Exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + + + + +extern char *getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *__secure_getenv (__const char *__name) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int putenv (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int setenv (__const char *__name, __const char *__value, int __replace) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + +extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int clearenv (void) __attribute__ ((__nothrow__)); +# 606 "/usr/include/stdlib.h" 3 4 +extern char *mktemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 620 "/usr/include/stdlib.h" 3 4 +extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 630 "/usr/include/stdlib.h" 3 4 +extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 642 "/usr/include/stdlib.h" 3 4 +extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 652 "/usr/include/stdlib.h" 3 4 +extern int mkstemps64 (char *__template, int __suffixlen) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 663 "/usr/include/stdlib.h" 3 4 +extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 674 "/usr/include/stdlib.h" 3 4 +extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 684 "/usr/include/stdlib.h" 3 4 +extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 694 "/usr/include/stdlib.h" 3 4 +extern int mkostemps (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 706 "/usr/include/stdlib.h" 3 4 +extern int mkostemps64 (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + + + + + +extern int system (__const char *__command) __attribute__ ((__warn_unused_result__)); + + + + + + +extern char *canonicalize_file_name (__const char *__name) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 734 "/usr/include/stdlib.h" 3 4 +extern char *realpath (__const char *__restrict __name, + char *__restrict __resolved) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + + + +typedef int (*__compar_fn_t) (__const void *, __const void *); + + +typedef __compar_fn_t comparison_fn_t; + + + +typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *); + + + + + +extern void *bsearch (__const void *__key, __const void *__base, + size_t __nmemb, size_t __size, __compar_fn_t __compar) + __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__)); + + + +extern void qsort (void *__base, size_t __nmemb, size_t __size, + __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); + +extern void qsort_r (void *__base, size_t __nmemb, size_t __size, + __compar_d_fn_t __compar, void *__arg) + __attribute__ ((__nonnull__ (1, 4))); + + + + +extern int abs (int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern long int labs (long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + +__extension__ extern long long int llabs (long long int __x) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern div_t div (int __numer, int __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern ldiv_t ldiv (long int __numer, long int __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + + +__extension__ extern lldiv_t lldiv (long long int __numer, + long long int __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + +# 808 "/usr/include/stdlib.h" 3 4 +extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *gcvt (double __value, int __ndigit, char *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *qecvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qfcvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qgcvt (long double __value, int __ndigit, char *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); + + + + +extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); +extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); + +extern int qecvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); +extern int qfcvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); + + + + + + + +extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + +extern int mbtowc (wchar_t *__restrict __pwc, + __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + +extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + +extern size_t mbstowcs (wchar_t *__restrict __pwcs, + __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)); + +extern size_t wcstombs (char *__restrict __s, + __const wchar_t *__restrict __pwcs, size_t __n) + __attribute__ ((__nothrow__)); + + + + + + + + +extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 896 "/usr/include/stdlib.h" 3 4 +extern int getsubopt (char **__restrict __optionp, + char *__const *__restrict __tokens, + char **__restrict __valuep) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__)); + + + + + +extern void setkey (__const char *__key) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern int grantpt (int __fd) __attribute__ ((__nothrow__)); + + + +extern int unlockpt (int __fd) __attribute__ ((__nothrow__)); + + + + +extern char *ptsname (int __fd) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + + + +extern int ptsname_r (int __fd, char *__buf, size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + +extern int getpt (void); + + + + + + +extern int getloadavg (double __loadavg[], int __nelem) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +# 1 "/usr/include/bits/stdlib.h" 1 3 4 +# 24 "/usr/include/bits/stdlib.h" 3 4 +extern char *__realpath_chk (__const char *__restrict __name, + char *__restrict __resolved, + size_t __resolvedlen) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern char *__realpath_alias (__const char *__restrict __name, char *__restrict __resolved) __asm__ ("" "realpath") __attribute__ ((__nothrow__)) + + __attribute__ ((__warn_unused_result__)); +extern char *__realpath_chk_warn (__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __asm__ ("" "__realpath_chk") __attribute__ ((__nothrow__)) + + + __attribute__ ((__warn_unused_result__)) + __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +__attribute__ ((__nothrow__)) realpath (__const char *__restrict __name, char *__restrict __resolved) +{ + if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1) + { + + if (__builtin_object_size (__resolved, 2 > 1) < 4096) + return __realpath_chk_warn (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); + + return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); + } + + return __realpath_alias (__name, __resolved); +} + + +extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, + size_t __nreal) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ptsname_r") __attribute__ ((__nothrow__)) + + __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nothrow__)) + + + __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) ptsname_r (int __fd, char *__buf, size_t __buflen) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __ptsname_r_alias (__fd, __buf, __buflen); +} + + +extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int __wctomb_alias (char *__s, wchar_t __wchar) __asm__ ("" "wctomb") __attribute__ ((__nothrow__)) + __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) int +__attribute__ ((__nothrow__)) wctomb (char *__s, wchar_t __wchar) +{ + + + + + + + + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) + return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1)); + return __wctomb_alias (__s, __wchar); +} + + +extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, + __const char *__restrict __src, + size_t __len, size_t __dstlen) __attribute__ ((__nothrow__)); +extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__)) + + + ; +extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__mbstowcs_chk") __attribute__ ((__nothrow__)) + + + + __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +__attribute__ ((__nothrow__)) mbstowcs (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __mbstowcs_chk (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + + if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) + return __mbstowcs_chk_warn (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + } + return __mbstowcs_alias (__dst, __src, __len); +} + + +extern size_t __wcstombs_chk (char *__restrict __dst, + __const wchar_t *__restrict __src, + size_t __len, size_t __dstlen) __attribute__ ((__nothrow__)); +extern size_t __wcstombs_alias (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) __asm__ ("" "wcstombs") __attribute__ ((__nothrow__)) + + + ; +extern size_t __wcstombs_chk_warn (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__wcstombs_chk") __attribute__ ((__nothrow__)) + + + + __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len"))); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +__attribute__ ((__nothrow__)) wcstombs (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + if (__len > __builtin_object_size (__dst, 2 > 1)) + return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + } + return __wcstombs_alias (__dst, __src, __len); +} +# 956 "/usr/include/stdlib.h" 2 3 4 +# 964 "/usr/include/stdlib.h" 3 4 + +# 46 "../../src/mesa/main/compiler.h" 2 +# 1 "/usr/include/stdio.h" 1 3 4 +# 30 "/usr/include/stdio.h" 3 4 + + + + +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 35 "/usr/include/stdio.h" 2 3 4 +# 45 "/usr/include/stdio.h" 3 4 +struct _IO_FILE; + + + +typedef struct _IO_FILE FILE; + + + + + +# 65 "/usr/include/stdio.h" 3 4 +typedef struct _IO_FILE __FILE; +# 75 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/libio.h" 1 3 4 +# 32 "/usr/include/libio.h" 3 4 +# 1 "/usr/include/_G_config.h" 1 3 4 +# 15 "/usr/include/_G_config.h" 3 4 +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 16 "/usr/include/_G_config.h" 2 3 4 + + + + +# 1 "/usr/include/wchar.h" 1 3 4 +# 83 "/usr/include/wchar.h" 3 4 +typedef struct +{ + int __count; + union + { + + unsigned int __wch; + + + + char __wchb[4]; + } __value; +} __mbstate_t; +# 21 "/usr/include/_G_config.h" 2 3 4 + +typedef struct +{ + __off_t __pos; + __mbstate_t __state; +} _G_fpos_t; +typedef struct +{ + __off64_t __pos; + __mbstate_t __state; +} _G_fpos64_t; +# 53 "/usr/include/_G_config.h" 3 4 +typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); +typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); +# 33 "/usr/include/libio.h" 2 3 4 +# 53 "/usr/include/libio.h" 3 4 +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stdarg.h" 1 3 4 +# 40 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stdarg.h" 3 4 +typedef __builtin_va_list __gnuc_va_list; +# 54 "/usr/include/libio.h" 2 3 4 +# 170 "/usr/include/libio.h" 3 4 +struct _IO_jump_t; struct _IO_FILE; +# 180 "/usr/include/libio.h" 3 4 +typedef void _IO_lock_t; + + + + + +struct _IO_marker { + struct _IO_marker *_next; + struct _IO_FILE *_sbuf; + + + + int _pos; +# 203 "/usr/include/libio.h" 3 4 +}; + + +enum __codecvt_result +{ + __codecvt_ok, + __codecvt_partial, + __codecvt_error, + __codecvt_noconv +}; +# 271 "/usr/include/libio.h" 3 4 +struct _IO_FILE { + int _flags; + + + + + char* _IO_read_ptr; + char* _IO_read_end; + char* _IO_read_base; + char* _IO_write_base; + char* _IO_write_ptr; + char* _IO_write_end; + char* _IO_buf_base; + char* _IO_buf_end; + + char *_IO_save_base; + char *_IO_backup_base; + char *_IO_save_end; + + struct _IO_marker *_markers; + + struct _IO_FILE *_chain; + + int _fileno; + + + + int _flags2; + + __off_t _old_offset; + + + + unsigned short _cur_column; + signed char _vtable_offset; + char _shortbuf[1]; + + + + _IO_lock_t *_lock; +# 319 "/usr/include/libio.h" 3 4 + __off64_t _offset; +# 328 "/usr/include/libio.h" 3 4 + void *__pad1; + void *__pad2; + void *__pad3; + void *__pad4; + size_t __pad5; + + int _mode; + + char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; + +}; + + +typedef struct _IO_FILE _IO_FILE; + + +struct _IO_FILE_plus; + +extern struct _IO_FILE_plus _IO_2_1_stdin_; +extern struct _IO_FILE_plus _IO_2_1_stdout_; +extern struct _IO_FILE_plus _IO_2_1_stderr_; +# 364 "/usr/include/libio.h" 3 4 +typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); + + + + + + + +typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, + size_t __n); + + + + + + + +typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); + + +typedef int __io_close_fn (void *__cookie); + + + + +typedef __io_read_fn cookie_read_function_t; +typedef __io_write_fn cookie_write_function_t; +typedef __io_seek_fn cookie_seek_function_t; +typedef __io_close_fn cookie_close_function_t; + + +typedef struct +{ + __io_read_fn *read; + __io_write_fn *write; + __io_seek_fn *seek; + __io_close_fn *close; +} _IO_cookie_io_functions_t; +typedef _IO_cookie_io_functions_t cookie_io_functions_t; + +struct _IO_cookie_file; + + +extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, + void *__cookie, _IO_cookie_io_functions_t __fns); + + + + + + + +extern int __underflow (_IO_FILE *); +extern int __uflow (_IO_FILE *); +extern int __overflow (_IO_FILE *, int); +# 460 "/usr/include/libio.h" 3 4 +extern int _IO_getc (_IO_FILE *__fp); +extern int _IO_putc (int __c, _IO_FILE *__fp); +extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__)); +extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__)); + +extern int _IO_peekc_locked (_IO_FILE *__fp); + + + + + +extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__)); +extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__)); +extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__)); +# 490 "/usr/include/libio.h" 3 4 +extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, + __gnuc_va_list, int *__restrict); +extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, + __gnuc_va_list); +extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); +extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); + +extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); +extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); + +extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__)); +# 76 "/usr/include/stdio.h" 2 3 4 + + + + +typedef __gnuc_va_list va_list; +# 109 "/usr/include/stdio.h" 3 4 + + +typedef _G_fpos_t fpos_t; + + + + + +typedef _G_fpos64_t fpos64_t; +# 161 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/bits/stdio_lim.h" 1 3 4 +# 162 "/usr/include/stdio.h" 2 3 4 + + + +extern struct _IO_FILE *stdin; +extern struct _IO_FILE *stdout; +extern struct _IO_FILE *stderr; + + + + + + + +extern int remove (__const char *__filename) __attribute__ ((__nothrow__)); + +extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__)); + + + + +extern int renameat (int __oldfd, __const char *__old, int __newfd, + __const char *__new) __attribute__ ((__nothrow__)); + + + + + + + + +extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__)); +# 202 "/usr/include/stdio.h" 3 4 +extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__)); + + + +extern char *tmpnam (char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + + +extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +# 224 "/usr/include/stdio.h" 3 4 +extern char *tempnam (__const char *__dir, __const char *__pfx) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fclose (FILE *__stream); + + + + +extern int fflush (FILE *__stream); + +# 249 "/usr/include/stdio.h" 3 4 +extern int fflush_unlocked (FILE *__stream); +# 259 "/usr/include/stdio.h" 3 4 +extern int fcloseall (void); + + + + + + + + + +extern FILE *fopen (__const char *__restrict __filename, + __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *freopen (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +# 292 "/usr/include/stdio.h" 3 4 + + +extern FILE *fopen64 (__const char *__restrict __filename, + __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); +extern FILE *freopen64 (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + + +extern FILE *fopencookie (void *__restrict __magic_cookie, + __const char *__restrict __modes, + _IO_cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) + __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + + + +extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__)); + + + +extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, + int __modes, size_t __n) __attribute__ ((__nothrow__)); + + + + + +extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, + size_t __size) __attribute__ ((__nothrow__)); + + +extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__)); + + + + + + + + +extern int fprintf (FILE *__restrict __stream, + __const char *__restrict __format, ...); + + + + +extern int printf (__const char *__restrict __format, ...); + +extern int sprintf (char *__restrict __s, + __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); + + + + + +extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg); + + + + +extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); + +extern int vsprintf (char *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) __attribute__ ((__nothrow__)); + + + + + +extern int snprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); + +extern int vsnprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); + + + + + + +extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, + __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__)); +extern int __asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +extern int asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +# 414 "/usr/include/stdio.h" 3 4 +extern int vdprintf (int __fd, __const char *__restrict __fmt, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 2, 0))); +extern int dprintf (int __fd, __const char *__restrict __fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); + + + + + + + + +extern int fscanf (FILE *__restrict __stream, + __const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); + + + + +extern int scanf (__const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); + +extern int sscanf (__const char *__restrict __s, + __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); +# 465 "/usr/include/stdio.h" 3 4 + + + + + + + + +extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); + + +extern int vsscanf (__const char *__restrict __s, + __const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__scanf__, 2, 0))); +# 524 "/usr/include/stdio.h" 3 4 + + + + + + + + + +extern int fgetc (FILE *__stream); +extern int getc (FILE *__stream); + + + + + +extern int getchar (void); + +# 552 "/usr/include/stdio.h" 3 4 +extern int getc_unlocked (FILE *__stream); +extern int getchar_unlocked (void); +# 563 "/usr/include/stdio.h" 3 4 +extern int fgetc_unlocked (FILE *__stream); + + + + + + + + + + + +extern int fputc (int __c, FILE *__stream); +extern int putc (int __c, FILE *__stream); + + + + + +extern int putchar (int __c); + +# 596 "/usr/include/stdio.h" 3 4 +extern int fputc_unlocked (int __c, FILE *__stream); + + + + + + + +extern int putc_unlocked (int __c, FILE *__stream); +extern int putchar_unlocked (int __c); + + + + + + +extern int getw (FILE *__stream); + + +extern int putw (int __w, FILE *__stream); + + + + + + + + +extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) + __attribute__ ((__warn_unused_result__)); + + + + + + +extern char *gets (char *__s) __attribute__ ((__warn_unused_result__)); + +# 642 "/usr/include/stdio.h" 3 4 +extern char *fgets_unlocked (char *__restrict __s, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +# 658 "/usr/include/stdio.h" 3 4 +extern __ssize_t __getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern __ssize_t getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern __ssize_t getline (char **__restrict __lineptr, + size_t *__restrict __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); + + + + + +extern int puts (__const char *__s); + + + + + + +extern int ungetc (int __c, FILE *__stream); + + + + + + +extern size_t fread (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + +extern size_t fwrite (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __s) __attribute__ ((__warn_unused_result__)); + +# 719 "/usr/include/stdio.h" 3 4 +extern int fputs_unlocked (__const char *__restrict __s, + FILE *__restrict __stream); +# 730 "/usr/include/stdio.h" 3 4 +extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fseek (FILE *__stream, long int __off, int __whence); + + + + +extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)); + + + + +extern void rewind (FILE *__stream); + +# 766 "/usr/include/stdio.h" 3 4 +extern int fseeko (FILE *__stream, __off_t __off, int __whence); + + + + +extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__)); +# 785 "/usr/include/stdio.h" 3 4 + + + + + + +extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); + + + + +extern int fsetpos (FILE *__stream, __const fpos_t *__pos); +# 808 "/usr/include/stdio.h" 3 4 + + + +extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); +extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__)); +extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); +extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); + + + + +extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__)); + +extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + +extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + +extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__)); +extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern void perror (__const char *__s); + + + + + + +# 1 "/usr/include/bits/sys_errlist.h" 1 3 4 +# 27 "/usr/include/bits/sys_errlist.h" 3 4 +extern int sys_nerr; +extern __const char *__const sys_errlist[]; + + +extern int _sys_nerr; +extern __const char *__const _sys_errlist[]; +# 847 "/usr/include/stdio.h" 2 3 4 + + + + +extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + +extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +# 866 "/usr/include/stdio.h" 3 4 +extern FILE *popen (__const char *__command, __const char *__modes) __attribute__ ((__warn_unused_result__)); + + + + + +extern int pclose (FILE *__stream); + + + + + +extern char *ctermid (char *__s) __attribute__ ((__nothrow__)); + + + + + +extern char *cuserid (char *__s); + + + + +struct obstack; + + +extern int obstack_printf (struct obstack *__restrict __obstack, + __const char *__restrict __format, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))); +extern int obstack_vprintf (struct obstack *__restrict __obstack, + __const char *__restrict __format, + __gnuc_va_list __args) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))); + + + + + + + +extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__)); + + + +extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + +extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__)); +# 927 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/bits/stdio.h" 1 3 4 +# 44 "/usr/include/bits/stdio.h" 3 4 +extern __inline __attribute__ ((__gnu_inline__)) int +getchar (void) +{ + return _IO_getc (stdin); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +fgetc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +getc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +getchar_unlocked (void) +{ + return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +putchar (int __c) +{ + return _IO_putc (__c, stdout); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +fputc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +putc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +putchar_unlocked (int __c) +{ + return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) __ssize_t +getline (char **__lineptr, size_t *__n, FILE *__stream) +{ + return __getdelim (__lineptr, __n, '\n', __stream); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) feof_unlocked (FILE *__stream) +{ + return (((__stream)->_flags & 0x10) != 0); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) ferror_unlocked (FILE *__stream) +{ + return (((__stream)->_flags & 0x20) != 0); +} +# 928 "/usr/include/stdio.h" 2 3 4 + + +# 1 "/usr/include/bits/stdio2.h" 1 3 4 +# 24 "/usr/include/bits/stdio2.h" 3 4 +extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, + __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); +extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, + __const char *__restrict __format, + __gnuc_va_list __ap) __attribute__ ((__nothrow__)); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) sprintf (char *__restrict __s, __const char *__restrict __fmt, ...) +{ + return __builtin___sprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) vsprintf (char *__restrict __s, __const char *__restrict __fmt, __gnuc_va_list __ap) + +{ + return __builtin___vsprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} + + + +extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, __const char *__restrict __format, + ...) __attribute__ ((__nothrow__)); +extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, __const char *__restrict __format, + __gnuc_va_list __ap) __attribute__ ((__nothrow__)); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) snprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, ...) + +{ + return __builtin___snprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) vsnprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, __gnuc_va_list __ap) + +{ + return __builtin___vsnprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} + + + + + +extern int __fprintf_chk (FILE *__restrict __stream, int __flag, + __const char *__restrict __format, ...); +extern int __printf_chk (int __flag, __const char *__restrict __format, ...); +extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, + __const char *__restrict __format, __gnuc_va_list __ap); +extern int __vprintf_chk (int __flag, __const char *__restrict __format, + __gnuc_va_list __ap); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +fprintf (FILE *__restrict __stream, __const char *__restrict __fmt, ...) +{ + return __fprintf_chk (__stream, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +printf (__const char *__restrict __fmt, ...) +{ + return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); +} + + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vprintf (__const char *__restrict __fmt, __gnuc_va_list __ap) +{ + + return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap); + + + +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vfprintf (FILE *__restrict __stream, + __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap); +} + + + +extern int __asprintf_chk (char **__restrict __ptr, int __flag, + __const char *__restrict __fmt, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__)); +extern int __vasprintf_chk (char **__restrict __ptr, int __flag, + __const char *__restrict __fmt, __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__)); +extern int __dprintf_chk (int __fd, int __flag, __const char *__restrict __fmt, + ...) __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __vdprintf_chk (int __fd, int __flag, + __const char *__restrict __fmt, __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 3, 0))); +extern int __obstack_printf_chk (struct obstack *__restrict __obstack, + int __flag, __const char *__restrict __format, + ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack, + int __flag, + __const char *__restrict __format, + __gnuc_va_list __args) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) __asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) + +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +dprintf (int __fd, __const char *__restrict __fmt, ...) +{ + return __dprintf_chk (__fd, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, ...) + +{ + return __obstack_printf_chk (__obstack, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +# 195 "/usr/include/bits/stdio2.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) vasprintf (char **__restrict __ptr, __const char *__restrict __fmt, __gnuc_va_list __ap) + +{ + return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, __gnuc_va_list __ap) + +{ + return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt, + __ap); +} + + + + + +extern char *__gets_chk (char *__str, size_t) __attribute__ ((__warn_unused_result__)); +extern char *__gets_warn (char *__str) __asm__ ("" "gets") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use fgets or getline instead, gets can't " "specify buffer size"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +gets (char *__str) +{ + if (__builtin_object_size (__str, 2 > 1) != (size_t) -1) + return __gets_chk (__str, __builtin_object_size (__str, 2 > 1)); + return __gets_warn (__str); +} + +extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") + + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_alias (__s, __n, __stream); +} + +extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") + + + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk") + + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + } + return __fread_alias (__ptr, __size, __n, __stream); +} + + +extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size, + int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked") + + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_unlocked_alias (__s, __n, __stream); +} + + + + +extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") + + + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk") + + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + } + + + if (__builtin_constant_p (__size) + && __builtin_constant_p (__n) + && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) + && __size * __n <= 8) + { + size_t __cnt = __size * __n; + char *__cptr = (char *) __ptr; + if (__cnt == 0) + return 0; + + for (; __cnt > 0; --__cnt) + { + int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++); + if (__c == (-1)) + break; + *__cptr++ = __c; + } + return (__cptr - (char *) __ptr) / __size; + } + + return __fread_unlocked_alias (__ptr, __size, __n, __stream); +} +# 931 "/usr/include/stdio.h" 2 3 4 + + + + + + +# 47 "../../src/mesa/main/compiler.h" 2 +# 1 "/usr/include/string.h" 1 3 4 +# 29 "/usr/include/string.h" 3 4 + + + + + +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 35 "/usr/include/string.h" 2 3 4 + + + + + + + + + +extern void *memcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern void *memmove (void *__dest, __const void *__src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, + int __c, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 95 "/usr/include/string.h" 3 4 +extern void *memchr (__const void *__s, int __c, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +# 109 "/usr/include/string.h" 3 4 +extern void *rawmemchr (__const void *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +# 120 "/usr/include/string.h" 3 4 +extern void *memrchr (__const void *__s, int __c, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + +extern char *strncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern char *strcat (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + +extern char *strncat (char *__restrict __dest, __const char *__restrict __src, + size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strcmp (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strcoll (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern size_t strxfrm (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + +# 165 "/usr/include/string.h" 3 4 +extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); + +extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, + __locale_t __l) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); + + + + + +extern char *strdup (__const char *__s) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern char *strndup (__const char *__string, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); +# 210 "/usr/include/string.h" 3 4 + +# 235 "/usr/include/string.h" 3 4 +extern char *strchr (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +# 262 "/usr/include/string.h" 3 4 +extern char *strrchr (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +# 276 "/usr/include/string.h" 3 4 +extern char *strchrnul (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern size_t strcspn (__const char *__s, __const char *__reject) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern size_t strspn (__const char *__s, __const char *__accept) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 314 "/usr/include/string.h" 3 4 +extern char *strpbrk (__const char *__s, __const char *__accept) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 342 "/usr/include/string.h" 3 4 +extern char *strstr (__const char *__haystack, __const char *__needle) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern char *strtok (char *__restrict __s, __const char *__restrict __delim) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + + +extern char *__strtok_r (char *__restrict __s, + __const char *__restrict __delim, + char **__restrict __save_ptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); + +extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, + char **__restrict __save_ptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); +# 373 "/usr/include/string.h" 3 4 +extern char *strcasestr (__const char *__haystack, __const char *__needle) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + + +extern void *memmem (__const void *__haystack, size_t __haystacklen, + __const void *__needle, size_t __needlelen) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); + + + +extern void *__mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern void *mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern size_t strlen (__const char *__s) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern size_t strnlen (__const char *__string, size_t __maxlen) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern char *strerror (int __errnum) __attribute__ ((__nothrow__)); + +# 438 "/usr/include/string.h" 3 4 +extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + + + +extern char *strerror_l (int __errnum, __locale_t __l) __attribute__ ((__nothrow__)); + + + + + +extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern void bcopy (__const void *__src, void *__dest, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 489 "/usr/include/string.h" 3 4 +extern char *index (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +# 517 "/usr/include/string.h" 3 4 +extern char *rindex (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + +extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + +extern int ffsl (long int __l) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + +__extension__ extern int ffsll (long long int __ll) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + +extern int strcasecmp (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern int strcasecmp_l (__const char *__s1, __const char *__s2, + __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); + +extern int strncasecmp_l (__const char *__s1, __const char *__s2, + size_t __n, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); + + + + + +extern char *strsep (char **__restrict __stringp, + __const char *__restrict __delim) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern char *strsignal (int __sig) __attribute__ ((__nothrow__)); + + +extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern char *__stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int strverscmp (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern char *strfry (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +# 606 "/usr/include/string.h" 3 4 +extern char *basename (__const char *__filename) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +# 634 "/usr/include/string.h" 3 4 +# 1 "/usr/include/bits/string.h" 1 3 4 +# 635 "/usr/include/string.h" 2 3 4 + + +# 1 "/usr/include/bits/string2.h" 1 3 4 +# 80 "/usr/include/bits/string2.h" 3 4 +typedef struct { unsigned char __arr[2]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR2; +typedef struct { unsigned char __arr[3]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR3; +typedef struct { unsigned char __arr[4]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR4; +typedef struct { unsigned char __arr[5]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR5; +typedef struct { unsigned char __arr[6]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR6; +typedef struct { unsigned char __arr[7]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR7; +typedef struct { unsigned char __arr[8]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR8; +# 394 "/usr/include/bits/string2.h" 3 4 +extern void *__rawmemchr (const void *__s, int __c); +# 969 "/usr/include/bits/string2.h" 3 4 +extern __inline __attribute__ ((__gnu_inline__)) size_t __strcspn_c1 (__const char *__s, int __reject); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strcspn_c1 (__const char *__s, int __reject) +{ + register size_t __result = 0; + while (__s[__result] != '\0' && __s[__result] != __reject) + ++__result; + return __result; +} + +extern __inline __attribute__ ((__gnu_inline__)) size_t __strcspn_c2 (__const char *__s, int __reject1, + int __reject2); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strcspn_c2 (__const char *__s, int __reject1, int __reject2) +{ + register size_t __result = 0; + while (__s[__result] != '\0' && __s[__result] != __reject1 + && __s[__result] != __reject2) + ++__result; + return __result; +} + +extern __inline __attribute__ ((__gnu_inline__)) size_t __strcspn_c3 (__const char *__s, int __reject1, + int __reject2, int __reject3); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strcspn_c3 (__const char *__s, int __reject1, int __reject2, + int __reject3) +{ + register size_t __result = 0; + while (__s[__result] != '\0' && __s[__result] != __reject1 + && __s[__result] != __reject2 && __s[__result] != __reject3) + ++__result; + return __result; +} +# 1045 "/usr/include/bits/string2.h" 3 4 +extern __inline __attribute__ ((__gnu_inline__)) size_t __strspn_c1 (__const char *__s, int __accept); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strspn_c1 (__const char *__s, int __accept) +{ + register size_t __result = 0; + + while (__s[__result] == __accept) + ++__result; + return __result; +} + +extern __inline __attribute__ ((__gnu_inline__)) size_t __strspn_c2 (__const char *__s, int __accept1, + int __accept2); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strspn_c2 (__const char *__s, int __accept1, int __accept2) +{ + register size_t __result = 0; + + while (__s[__result] == __accept1 || __s[__result] == __accept2) + ++__result; + return __result; +} + +extern __inline __attribute__ ((__gnu_inline__)) size_t __strspn_c3 (__const char *__s, int __accept1, + int __accept2, int __accept3); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) +{ + register size_t __result = 0; + + while (__s[__result] == __accept1 || __s[__result] == __accept2 + || __s[__result] == __accept3) + ++__result; + return __result; +} +# 1121 "/usr/include/bits/string2.h" 3 4 +extern __inline __attribute__ ((__gnu_inline__)) char *__strpbrk_c2 (__const char *__s, int __accept1, + int __accept2); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strpbrk_c2 (__const char *__s, int __accept1, int __accept2) +{ + + while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) + ++__s; + return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; +} + +extern __inline __attribute__ ((__gnu_inline__)) char *__strpbrk_c3 (__const char *__s, int __accept1, + int __accept2, int __accept3); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strpbrk_c3 (__const char *__s, int __accept1, int __accept2, + int __accept3) +{ + + while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 + && *__s != __accept3) + ++__s; + return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; +} +# 1172 "/usr/include/bits/string2.h" 3 4 +extern __inline __attribute__ ((__gnu_inline__)) char *__strtok_r_1c (char *__s, char __sep, char **__nextp); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strtok_r_1c (char *__s, char __sep, char **__nextp) +{ + char *__result; + if (__s == ((void *)0)) + __s = *__nextp; + while (*__s == __sep) + ++__s; + __result = ((void *)0); + if (*__s != '\0') + { + __result = __s++; + while (*__s != '\0') + if (*__s++ == __sep) + { + __s[-1] = '\0'; + break; + } + } + *__nextp = __s; + return __result; +} +# 1204 "/usr/include/bits/string2.h" 3 4 +extern char *__strsep_g (char **__stringp, __const char *__delim); +# 1222 "/usr/include/bits/string2.h" 3 4 +extern __inline __attribute__ ((__gnu_inline__)) char *__strsep_1c (char **__s, char __reject); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strsep_1c (char **__s, char __reject) +{ + register char *__retval = *__s; + if (__retval != ((void *)0) && (*__s = (__extension__ (__builtin_constant_p (__reject) && !__builtin_constant_p (__retval) && (__reject) == '\0' ? (char *) __rawmemchr (__retval, __reject) : __builtin_strchr (__retval, __reject)))) != ((void *)0)) + *(*__s)++ = '\0'; + return __retval; +} + +extern __inline __attribute__ ((__gnu_inline__)) char *__strsep_2c (char **__s, char __reject1, char __reject2); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strsep_2c (char **__s, char __reject1, char __reject2) +{ + register char *__retval = *__s; + if (__retval != ((void *)0)) + { + register char *__cp = __retval; + while (1) + { + if (*__cp == '\0') + { + __cp = ((void *)0); + break; + } + if (*__cp == __reject1 || *__cp == __reject2) + { + *__cp++ = '\0'; + break; + } + ++__cp; + } + *__s = __cp; + } + return __retval; +} + +extern __inline __attribute__ ((__gnu_inline__)) char *__strsep_3c (char **__s, char __reject1, char __reject2, + char __reject3); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) +{ + register char *__retval = *__s; + if (__retval != ((void *)0)) + { + register char *__cp = __retval; + while (1) + { + if (*__cp == '\0') + { + __cp = ((void *)0); + break; + } + if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) + { + *__cp++ = '\0'; + break; + } + ++__cp; + } + *__s = __cp; + } + return __retval; +} +# 1303 "/usr/include/bits/string2.h" 3 4 +extern char *__strdup (__const char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); +# 1322 "/usr/include/bits/string2.h" 3 4 +extern char *__strndup (__const char *__string, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); +# 638 "/usr/include/string.h" 2 3 4 + + + + +# 1 "/usr/include/bits/string3.h" 1 3 4 +# 23 "/usr/include/bits/string3.h" 3 4 +extern void __warn_memset_zero_len (void) __attribute__((__warning__ ("memset used with constant zero length parameter; this could be due to transposed parameters"))) + ; +# 48 "/usr/include/bits/string3.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +__attribute__ ((__nothrow__)) memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) + +{ + return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +__attribute__ ((__nothrow__)) memmove (void *__dest, __const void *__src, size_t __len) +{ + return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +__attribute__ ((__nothrow__)) mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) + +{ + return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} +# 76 "/usr/include/bits/string3.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +__attribute__ ((__nothrow__)) memset (void *__dest, int __ch, size_t __len) +{ + if (__builtin_constant_p (__len) && __len == 0 + && (!__builtin_constant_p (__ch) || __ch != 0)) + { + __warn_memset_zero_len (); + return __dest; + } + return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void +__attribute__ ((__nothrow__)) bcopy (__const void *__src, void *__dest, size_t __len) +{ + (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void +__attribute__ ((__nothrow__)) bzero (void *__dest, size_t __len) +{ + (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__nothrow__)) strcpy (char *__restrict __dest, __const char *__restrict __src) +{ + return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__nothrow__)) stpcpy (char *__restrict __dest, __const char *__restrict __src) +{ + return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__nothrow__)) strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __len) + +{ + return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); +} + + +extern char *__stpncpy_chk (char *__dest, __const char *__src, size_t __n, + size_t __destlen) __attribute__ ((__nothrow__)); +extern char *__stpncpy_alias (char *__dest, __const char *__src, size_t __n) __asm__ ("" "stpncpy") __attribute__ ((__nothrow__)) + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__nothrow__)) stpncpy (char *__dest, __const char *__src, size_t __n) +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1 + && (!__builtin_constant_p (__n) || __n <= __builtin_object_size (__dest, 2 > 1))) + return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1)); + return __stpncpy_alias (__dest, __src, __n); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__nothrow__)) strcat (char *__restrict __dest, __const char *__restrict __src) +{ + return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__nothrow__)) strncat (char *__restrict __dest, __const char *__restrict __src, size_t __len) + +{ + return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); +} +# 643 "/usr/include/string.h" 2 3 4 + + + + +# 48 "../../src/mesa/main/compiler.h" 2 + + + +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/float.h" 1 3 4 +# 52 "../../src/mesa/main/compiler.h" 2 +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stdarg.h" 1 3 4 +# 53 "../../src/mesa/main/compiler.h" 2 +# 253 "../../src/mesa/main/compiler.h" +# 1 "/usr/include/byteswap.h" 1 3 4 +# 23 "/usr/include/byteswap.h" 3 4 +# 1 "/usr/include/bits/byteswap.h" 1 3 4 +# 24 "/usr/include/byteswap.h" 2 3 4 +# 254 "../../src/mesa/main/compiler.h" 2 +# 40 "../../src/mesa/main/imports.h" 2 +# 1 "../../src/mesa/main/glheader.h" 1 +# 41 "../../src/mesa/main/imports.h" 2 +# 84 "../../src/mesa/main/imports.h" +typedef union { GLfloat f; GLint i; } fi_type; +# 181 "../../src/mesa/main/imports.h" +static __inline__ GLfloat LOG2(GLfloat val) +{ + fi_type num; + GLint log_2; + num.f = val; + log_2 = ((num.i >> 23) & 255) - 128; + num.i &= ~(255 << 23); + num.i += 127 << 23; + num.f = ((-1.0f/3) * num.f + 2) * num.f - 2.0f/3; + return num.f + log_2; +} +# 205 "../../src/mesa/main/imports.h" +static __inline__ int IS_INF_OR_NAN( float x ) +{ + fi_type tmp; + tmp.f = x; + return !(int)((unsigned int)((tmp.i & 0x7fffffff)-0x7f800000) >> 31); +} +# 228 "../../src/mesa/main/imports.h" +static __inline__ int GET_FLOAT_BITS( float x ) +{ + fi_type fi; + fi.f = x; + return fi.i; +} +# 354 "../../src/mesa/main/imports.h" +static __inline__ int ifloor(float f) +{ + int ai, bi; + double af, bf; + fi_type u; + + af = (3 << 22) + 0.5 + (double)f; + bf = (3 << 22) + 0.5 - (double)f; + u.f = (float) af; ai = u.i; + u.f = (float) bf; bi = u.i; + return (ai - bi) >> 1; +} +# 401 "../../src/mesa/main/imports.h" +static __inline__ int iceil(float f) +{ + int ai, bi; + double af, bf; + fi_type u; + af = (3 << 22) + 0.5 + (double)f; + bf = (3 << 22) + 0.5 - (double)f; + u.f = (float) af; ai = u.i; + u.f = (float) bf; bi = u.i; + return (ai - bi + 1) >> 1; +} +# 426 "../../src/mesa/main/imports.h" +static __inline__ int +_mesa_is_pow_two(int x) +{ + return !(x & (x - 1)); +} +# 446 "../../src/mesa/main/imports.h" +static __inline__ int32_t +_mesa_next_pow_two_32(uint32_t x) +{ + + + uint32_t y = (x != 1); + return (1 + y) << ((__builtin_clz(x - y) ^ 31) ); +# 463 "../../src/mesa/main/imports.h" +} + +static __inline__ int64_t +_mesa_next_pow_two_64(uint64_t x) +{ + + + uint64_t y = (x != 1); + if (sizeof(x) == sizeof(long)) + return (1 + y) << ((__builtin_clzl(x - y) ^ 63)); + else + return (1 + y) << ((__builtin_clzll(x - y) ^ 63)); +# 486 "../../src/mesa/main/imports.h" +} + + + + + +static __inline__ GLuint +_mesa_logbase2(GLuint n) +{ + + + return (31 - __builtin_clz(n | 1)); +# 507 "../../src/mesa/main/imports.h" +} + + + + + +static __inline__ GLboolean +_mesa_little_endian(void) +{ + const GLuint ui = 1; + return *((const GLubyte *) &ui); +} + + + + + + + +extern void * +_mesa_align_malloc( size_t bytes, unsigned long alignment ); + +extern void * +_mesa_align_calloc( size_t bytes, unsigned long alignment ); + +extern void +_mesa_align_free( void *ptr ); + +extern void * +_mesa_align_realloc(void *oldBuffer, size_t oldSize, size_t newSize, + unsigned long alignment); + +extern void * +_mesa_exec_malloc( GLuint size ); + +extern void +_mesa_exec_free( void *addr ); + +extern void * +_mesa_realloc( void *oldBuffer, size_t oldSize, size_t newSize ); + +extern void +_mesa_memset16( unsigned short *dst, unsigned short val, size_t n ); + +extern double +_mesa_sqrtd(double x); + +extern float +_mesa_sqrtf(float x); + +extern float +_mesa_inv_sqrtf(float x); + +extern void +_mesa_init_sqrt_table(void); +# 591 "../../src/mesa/main/imports.h" +extern GLhalfARB +_mesa_float_to_half(float f); + +extern float +_mesa_half_to_float(GLhalfARB h); + + +extern void * +_mesa_bsearch( const void *key, const void *base, size_t nmemb, size_t size, + int (*compar)(const void *, const void *) ); + +extern char * +_mesa_getenv( const char *var ); + +extern char * +_mesa_strdup( const char *s ); + +extern float +_mesa_strtof( const char *s, char **end ); + +extern unsigned int +_mesa_str_checksum(const char *str); + +extern int +_mesa_snprintf( char *str, size_t size, const char *fmt, ... ) __attribute__ ((format(__printf__, 3, 4))); + +struct gl_context; + +extern void +_mesa_warning( struct gl_context *gc, const char *fmtString, ... ) __attribute__ ((format(__printf__, 2, 3))); + +extern void +_mesa_problem( const struct gl_context *ctx, const char *fmtString, ... ) __attribute__ ((format(__printf__, 2, 3))); + +extern void +_mesa_error( struct gl_context *ctx, GLenum error, const char *fmtString, ... ) __attribute__ ((format(__printf__, 3, 4))); + +extern void +_mesa_debug( const struct gl_context *ctx, const char *fmtString, ... ) __attribute__ ((format(__printf__, 2, 3))); +# 53 "../../src/mesa/main/context.h" 2 +# 1 "../../src/mesa/main/mtypes.h" 1 +# 38 "../../src/mesa/main/mtypes.h" +# 1 "../../src/mesa/main/config.h" 1 +# 39 "../../src/mesa/main/mtypes.h" 2 +# 1 "../../src/mesa/main/mfeatures.h" 1 +# 40 "../../src/mesa/main/mtypes.h" 2 +# 1 "../../src/mapi/glapi/glapi.h" 1 +# 75 "../../src/mapi/glapi/glapi.h" +# 1 "../../src/mapi/glapi/glthread.h" 1 + + + +# 1 "../../src/mapi/mapi/u_thread.h" 1 +# 45 "../../src/mapi/mapi/u_thread.h" +# 1 "../../src/mapi/mapi/u_compiler.h" 1 +# 46 "../../src/mapi/mapi/u_thread.h" 2 +# 63 "../../src/mapi/mapi/u_thread.h" +# 1 "/usr/include/pthread.h" 1 3 4 +# 25 "/usr/include/pthread.h" 3 4 +# 1 "/usr/include/sched.h" 1 3 4 +# 30 "/usr/include/sched.h" 3 4 +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 31 "/usr/include/sched.h" 2 3 4 + + + +# 1 "/usr/include/time.h" 1 3 4 +# 35 "/usr/include/sched.h" 2 3 4 +# 43 "/usr/include/sched.h" 3 4 +# 1 "/usr/include/bits/sched.h" 1 3 4 +# 74 "/usr/include/bits/sched.h" 3 4 +struct sched_param + { + int __sched_priority; + }; + + + + + +extern int clone (int (*__fn) (void *__arg), void *__child_stack, + int __flags, void *__arg, ...) __attribute__ ((__nothrow__)); + + +extern int unshare (int __flags) __attribute__ ((__nothrow__)); + + +extern int sched_getcpu (void) __attribute__ ((__nothrow__)); + + + + + + + + + + +struct __sched_param + { + int __sched_priority; + }; +# 116 "/usr/include/bits/sched.h" 3 4 +typedef unsigned long int __cpu_mask; + + + + + + +typedef struct +{ + __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; +} cpu_set_t; +# 199 "/usr/include/bits/sched.h" 3 4 + + +extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) + __attribute__ ((__nothrow__)); +extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__)); + + +# 44 "/usr/include/sched.h" 2 3 4 + + + + + + + +extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param) + __attribute__ ((__nothrow__)); + + +extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__)); + + +extern int sched_setscheduler (__pid_t __pid, int __policy, + __const struct sched_param *__param) __attribute__ ((__nothrow__)); + + +extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__)); + + +extern int sched_yield (void) __attribute__ ((__nothrow__)); + + +extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__)); + + +extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__)); + + +extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__)); +# 118 "/usr/include/sched.h" 3 4 +extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, + __const cpu_set_t *__cpuset) __attribute__ ((__nothrow__)); + + +extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, + cpu_set_t *__cpuset) __attribute__ ((__nothrow__)); + + + +# 26 "/usr/include/pthread.h" 2 3 4 +# 1 "/usr/include/time.h" 1 3 4 +# 30 "/usr/include/time.h" 3 4 + + + + + + + + +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 39 "/usr/include/time.h" 2 3 4 + + + +# 1 "/usr/include/bits/time.h" 1 3 4 +# 43 "/usr/include/time.h" 2 3 4 +# 131 "/usr/include/time.h" 3 4 + + +struct tm +{ + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; + + + long int tm_gmtoff; + __const char *tm_zone; + + + + +}; + + + + + + + + +struct itimerspec + { + struct timespec it_interval; + struct timespec it_value; + }; + + +struct sigevent; +# 180 "/usr/include/time.h" 3 4 + + + +extern clock_t clock (void) __attribute__ ((__nothrow__)); + + +extern time_t time (time_t *__timer) __attribute__ ((__nothrow__)); + + +extern double difftime (time_t __time1, time_t __time0) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__)); + + + + + +extern size_t strftime (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp) __attribute__ ((__nothrow__)); + + + + + +extern char *strptime (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp) + __attribute__ ((__nothrow__)); + + + + + + + +extern size_t strftime_l (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp, + __locale_t __loc) __attribute__ ((__nothrow__)); + + + +extern char *strptime_l (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp, + __locale_t __loc) __attribute__ ((__nothrow__)); + + + + + + +extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__)); + + + +extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__)); + + + + + +extern struct tm *gmtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) __attribute__ ((__nothrow__)); + + + +extern struct tm *localtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) __attribute__ ((__nothrow__)); + + + + + +extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__)); + + +extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__)); + + + + + + + +extern char *asctime_r (__const struct tm *__restrict __tp, + char *__restrict __buf) __attribute__ ((__nothrow__)); + + +extern char *ctime_r (__const time_t *__restrict __timer, + char *__restrict __buf) __attribute__ ((__nothrow__)); + + + + +extern char *__tzname[2]; +extern int __daylight; +extern long int __timezone; + + + + +extern char *tzname[2]; + + + +extern void tzset (void) __attribute__ ((__nothrow__)); + + + +extern int daylight; +extern long int timezone; + + + + + +extern int stime (__const time_t *__when) __attribute__ ((__nothrow__)); +# 313 "/usr/include/time.h" 3 4 +extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__)); + + +extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__)); + + +extern int dysize (int __year) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +# 328 "/usr/include/time.h" 3 4 +extern int nanosleep (__const struct timespec *__requested_time, + struct timespec *__remaining); + + + +extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__)); + + +extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__)); + + +extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) + __attribute__ ((__nothrow__)); + + + + + + +extern int clock_nanosleep (clockid_t __clock_id, int __flags, + __const struct timespec *__req, + struct timespec *__rem); + + +extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__)); + + + + +extern int timer_create (clockid_t __clock_id, + struct sigevent *__restrict __evp, + timer_t *__restrict __timerid) __attribute__ ((__nothrow__)); + + +extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__)); + + +extern int timer_settime (timer_t __timerid, int __flags, + __const struct itimerspec *__restrict __value, + struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__)); + + +extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) + __attribute__ ((__nothrow__)); + + +extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__)); +# 390 "/usr/include/time.h" 3 4 +extern int getdate_err; +# 399 "/usr/include/time.h" 3 4 +extern struct tm *getdate (__const char *__string); +# 413 "/usr/include/time.h" 3 4 +extern int getdate_r (__const char *__restrict __string, + struct tm *__restrict __resbufp); + + + +# 27 "/usr/include/pthread.h" 2 3 4 + + +# 1 "/usr/include/bits/setjmp.h" 1 3 4 +# 33 "/usr/include/bits/setjmp.h" 3 4 +typedef double __jmp_buf[21]; +# 30 "/usr/include/pthread.h" 2 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 31 "/usr/include/pthread.h" 2 3 4 + + + +enum +{ + PTHREAD_CREATE_JOINABLE, + + PTHREAD_CREATE_DETACHED + +}; + + + +enum +{ + PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_ADAPTIVE_NP + + , + PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL + + + + , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP + +}; + + + + +enum +{ + PTHREAD_MUTEX_STALLED, + PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, + PTHREAD_MUTEX_ROBUST, + PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST +}; + + + + + +enum +{ + PTHREAD_PRIO_NONE, + PTHREAD_PRIO_INHERIT, + PTHREAD_PRIO_PROTECT +}; +# 115 "/usr/include/pthread.h" 3 4 +enum +{ + PTHREAD_RWLOCK_PREFER_READER_NP, + PTHREAD_RWLOCK_PREFER_WRITER_NP, + PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, + PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP +}; +# 147 "/usr/include/pthread.h" 3 4 +enum +{ + PTHREAD_INHERIT_SCHED, + + PTHREAD_EXPLICIT_SCHED + +}; + + + +enum +{ + PTHREAD_SCOPE_SYSTEM, + + PTHREAD_SCOPE_PROCESS + +}; + + + +enum +{ + PTHREAD_PROCESS_PRIVATE, + + PTHREAD_PROCESS_SHARED + +}; +# 182 "/usr/include/pthread.h" 3 4 +struct _pthread_cleanup_buffer +{ + void (*__routine) (void *); + void *__arg; + int __canceltype; + struct _pthread_cleanup_buffer *__prev; +}; + + +enum +{ + PTHREAD_CANCEL_ENABLE, + + PTHREAD_CANCEL_DISABLE + +}; +enum +{ + PTHREAD_CANCEL_DEFERRED, + + PTHREAD_CANCEL_ASYNCHRONOUS + +}; +# 220 "/usr/include/pthread.h" 3 4 + + + + + +extern int pthread_create (pthread_t *__restrict __newthread, + __const pthread_attr_t *__restrict __attr, + void *(*__start_routine) (void *), + void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))); + + + + + +extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); + + + + + + + +extern int pthread_join (pthread_t __th, void **__thread_return); + + + + +extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __attribute__ ((__nothrow__)); + + + + + + + +extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, + __const struct timespec *__abstime); + + + + + + +extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__)); + + + +extern pthread_t pthread_self (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __attribute__ ((__nothrow__)); + + + + + + + +extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_destroy (pthread_attr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, + int *__detachstate) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, + int __detachstate) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, + size_t *__guardsize) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setguardsize (pthread_attr_t *__attr, + size_t __guardsize) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict + __attr, + struct sched_param *__restrict __param) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, + __const struct sched_param *__restrict + __param) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict + __attr, int *__restrict __policy) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict + __attr, int *__restrict __inherit) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, + int __inherit) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, + int *__restrict __scope) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict + __attr, void **__restrict __stackaddr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); + + + + + +extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, + void *__stackaddr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); + + +extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict + __attr, size_t *__restrict __stacksize) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int pthread_attr_setstacksize (pthread_attr_t *__attr, + size_t __stacksize) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, + void **__restrict __stackaddr, + size_t *__restrict __stacksize) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))); + + + + +extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, + size_t __stacksize) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, + size_t __cpusetsize, + __const cpu_set_t *__cpuset) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))); + + + +extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr, + size_t __cpusetsize, + cpu_set_t *__cpuset) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))); + + + + + +extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + + + + + +extern int pthread_setschedparam (pthread_t __target_thread, int __policy, + __const struct sched_param *__param) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))); + + +extern int pthread_getschedparam (pthread_t __target_thread, + int *__restrict __policy, + struct sched_param *__restrict __param) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); + + +extern int pthread_setschedprio (pthread_t __target_thread, int __prio) + __attribute__ ((__nothrow__)); + + + + +extern int pthread_getname_np (pthread_t __target_thread, char *__buf, + size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + +extern int pthread_setname_np (pthread_t __target_thread, __const char *__name) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + + + +extern int pthread_getconcurrency (void) __attribute__ ((__nothrow__)); + + +extern int pthread_setconcurrency (int __level) __attribute__ ((__nothrow__)); + + + + + + + +extern int pthread_yield (void) __attribute__ ((__nothrow__)); + + + + +extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, + __const cpu_set_t *__cpuset) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))); + + +extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, + cpu_set_t *__cpuset) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))); +# 478 "/usr/include/pthread.h" 3 4 +extern int pthread_once (pthread_once_t *__once_control, + void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); +# 490 "/usr/include/pthread.h" 3 4 +extern int pthread_setcancelstate (int __state, int *__oldstate); + + + +extern int pthread_setcanceltype (int __type, int *__oldtype); + + +extern int pthread_cancel (pthread_t __th); + + + + +extern void pthread_testcancel (void); + + + + +typedef struct +{ + struct + { + __jmp_buf __cancel_jmp_buf; + int __mask_was_saved; + } __cancel_jmp_buf[1]; + void *__pad[4]; +} __pthread_unwind_buf_t __attribute__ ((__aligned__)); +# 524 "/usr/include/pthread.h" 3 4 +struct __pthread_cleanup_frame +{ + void (*__cancel_routine) (void *); + void *__cancel_arg; + int __do_it; + int __cancel_type; +}; +# 664 "/usr/include/pthread.h" 3 4 +extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf) + ; +# 676 "/usr/include/pthread.h" 3 4 +extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf) + ; +# 699 "/usr/include/pthread.h" 3 4 +extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf) + ; +# 712 "/usr/include/pthread.h" 3 4 +extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf) + ; + + + +extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf) + __attribute__ ((__noreturn__)) + + __attribute__ ((__weak__)) + + ; + + + +struct __jmp_buf_tag; +extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __attribute__ ((__nothrow__)); + + + + + +extern int pthread_mutex_init (pthread_mutex_t *__mutex, + __const pthread_mutexattr_t *__mutexattr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutex_lock (pthread_mutex_t *__mutex) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, + __const struct timespec *__restrict + __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutex_getprioceiling (__const pthread_mutex_t * + __restrict __mutex, + int *__restrict __prioceiling) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, + int __prioceiling, + int *__restrict __old_ceiling) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))); + + + + +extern int pthread_mutex_consistent (pthread_mutex_t *__mutex) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + +extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +# 790 "/usr/include/pthread.h" 3 4 +extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __pshared) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, + int __pshared) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict + __attr, int *__restrict __kind) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __protocol) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, + int __protocol) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __prioceiling) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, + int __prioceiling) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr, + int *__robustness) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr, + int *__robustness) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, + int __robustness) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + +extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, + int __robustness) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +# 872 "/usr/include/pthread.h" 3 4 +extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, + __const pthread_rwlockattr_t *__restrict + __attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, + __const struct timespec *__restrict + __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, + __const struct timespec *__restrict + __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * + __restrict __attr, + int *__restrict __pshared) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, + int __pshared) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t * + __restrict __attr, + int *__restrict __pref) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, + int __pref) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int pthread_cond_init (pthread_cond_t *__restrict __cond, + __const pthread_condattr_t *__restrict + __cond_attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_cond_destroy (pthread_cond_t *__cond) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_cond_signal (pthread_cond_t *__cond) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_cond_broadcast (pthread_cond_t *__cond) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex) + __attribute__ ((__nonnull__ (1, 2))); +# 984 "/usr/include/pthread.h" 3 4 +extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex, + __const struct timespec *__restrict + __abstime) __attribute__ ((__nonnull__ (1, 2, 3))); + + + + +extern int pthread_condattr_init (pthread_condattr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_condattr_destroy (pthread_condattr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_condattr_getpshared (__const pthread_condattr_t * + __restrict __attr, + int *__restrict __pshared) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, + int __pshared) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_condattr_getclock (__const pthread_condattr_t * + __restrict __attr, + __clockid_t *__restrict __clock_id) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_condattr_setclock (pthread_condattr_t *__attr, + __clockid_t __clock_id) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +# 1028 "/usr/include/pthread.h" 3 4 +extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_destroy (pthread_spinlock_t *__lock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_lock (pthread_spinlock_t *__lock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_trylock (pthread_spinlock_t *__lock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_unlock (pthread_spinlock_t *__lock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, + __const pthread_barrierattr_t *__restrict + __attr, unsigned int __count) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrier_wait (pthread_barrier_t *__barrier) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * + __restrict __attr, + int *__restrict __pshared) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, + int __pshared) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +# 1095 "/usr/include/pthread.h" 3 4 +extern int pthread_key_create (pthread_key_t *__key, + void (*__destr_function) (void *)) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__)); + + +extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__)); + + +extern int pthread_setspecific (pthread_key_t __key, + __const void *__pointer) __attribute__ ((__nothrow__)) ; + + + + +extern int pthread_getcpuclockid (pthread_t __thread_id, + __clockid_t *__clock_id) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +# 1129 "/usr/include/pthread.h" 3 4 +extern int pthread_atfork (void (*__prepare) (void), + void (*__parent) (void), + void (*__child) (void)) __attribute__ ((__nothrow__)); + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) pthread_equal (pthread_t __thread1, pthread_t __thread2) +{ + return __thread1 == __thread2; +} + + + +# 64 "../../src/mapi/mapi/u_thread.h" 2 + +struct u_tsd { + pthread_key_t key; + int initMagic; +}; + +typedef pthread_mutex_t u_mutex; +# 186 "../../src/mapi/mapi/u_thread.h" +unsigned long +u_thread_self(void); + +void +u_tsd_init(struct u_tsd *tsd); + +void +u_tsd_destroy(struct u_tsd *tsd); + +void * +u_tsd_get(struct u_tsd *tsd); + +void +u_tsd_set(struct u_tsd *tsd, void *ptr); +# 5 "../../src/mapi/glapi/glthread.h" 2 +# 17 "../../src/mapi/glapi/glthread.h" +typedef struct u_tsd _glthread_TSD; +typedef u_mutex _glthread_Mutex; +# 76 "../../src/mapi/glapi/glapi.h" 2 + +typedef void (*_glapi_proc)(void); +struct _glapi_table; + + + + +__attribute__((visibility("default"))) extern __thread struct _glapi_table * _glapi_tls_Dispatch + __attribute__((tls_model("initial-exec"))); + +__attribute__((visibility("default"))) extern __thread void * _glapi_tls_Context + __attribute__((tls_model("initial-exec"))); + +__attribute__((visibility("default"))) extern const struct _glapi_table *_glapi_Dispatch; +__attribute__((visibility("default"))) extern const void *_glapi_Context; +# 118 "../../src/mapi/glapi/glapi.h" +void +_glapi_destroy_multithread(void); + + +__attribute__((visibility("default"))) void +_glapi_check_multithread(void); + + +__attribute__((visibility("default"))) void +_glapi_set_context(void *context); + + +__attribute__((visibility("default"))) void * +_glapi_get_context(void); + + +__attribute__((visibility("default"))) void +_glapi_set_dispatch(struct _glapi_table *dispatch); + + +__attribute__((visibility("default"))) struct _glapi_table * +_glapi_get_dispatch(void); + + +__attribute__((visibility("default"))) unsigned int +_glapi_get_dispatch_table_size(void); + + +__attribute__((visibility("default"))) int +_glapi_add_dispatch( const char * const * function_names, + const char * parameter_signature ); + +__attribute__((visibility("default"))) int +_glapi_get_proc_offset(const char *funcName); + + +__attribute__((visibility("default"))) _glapi_proc +_glapi_get_proc_address(const char *funcName); + + +__attribute__((visibility("default"))) const char * +_glapi_get_proc_name(unsigned int offset); + + +__attribute__((visibility("default"))) struct _glapi_table * +_glapi_create_table_from_handle(void *handle, const char *symbol_prefix); + + +__attribute__((visibility("default"))) unsigned long +_glthread_GetID(void); + + + + + +__attribute__((visibility("default"))) void +_glapi_noop_enable_warnings(unsigned char enable); + + +__attribute__((visibility("default"))) void +_glapi_set_warning_func(_glapi_proc func); +# 41 "../../src/mesa/main/mtypes.h" 2 +# 1 "../../src/mesa/math/m_matrix.h" 1 +# 57 "../../src/mesa/math/m_matrix.h" +enum GLmatrixtype { + MATRIX_GENERAL, + MATRIX_IDENTITY, + MATRIX_3D_NO_ROT, + MATRIX_PERSPECTIVE, + MATRIX_2D, + MATRIX_2D_NO_ROT, + MATRIX_3D +} ; + + + + +typedef struct { + GLfloat *m; + GLfloat *inv; + GLuint flags; + + + enum GLmatrixtype type; +} GLmatrix; + + + + +extern void +_math_matrix_ctr( GLmatrix *m ); + +extern void +_math_matrix_dtr( GLmatrix *m ); + +extern void +_math_matrix_alloc_inv( GLmatrix *m ); + +extern void +_math_matrix_mul_matrix( GLmatrix *dest, const GLmatrix *a, const GLmatrix *b ); + +extern void +_math_matrix_mul_floats( GLmatrix *dest, const GLfloat *b ); + +extern void +_math_matrix_loadf( GLmatrix *mat, const GLfloat *m ); + +extern void +_math_matrix_translate( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z ); + +extern void +_math_matrix_rotate( GLmatrix *m, GLfloat angle, + GLfloat x, GLfloat y, GLfloat z ); + +extern void +_math_matrix_scale( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z ); + +extern void +_math_matrix_ortho( GLmatrix *mat, + GLfloat left, GLfloat right, + GLfloat bottom, GLfloat top, + GLfloat nearval, GLfloat farval ); + +extern void +_math_matrix_frustum( GLmatrix *mat, + GLfloat left, GLfloat right, + GLfloat bottom, GLfloat top, + GLfloat nearval, GLfloat farval ); + +extern void +_math_matrix_viewport(GLmatrix *m, GLint x, GLint y, GLint width, GLint height, + GLfloat zNear, GLfloat zFar, GLfloat depthMax); + +extern void +_math_matrix_set_identity( GLmatrix *dest ); + +extern void +_math_matrix_copy( GLmatrix *to, const GLmatrix *from ); + +extern void +_math_matrix_analyse( GLmatrix *mat ); + +extern void +_math_matrix_print( const GLmatrix *m ); + +extern GLboolean +_math_matrix_is_length_preserving( const GLmatrix *m ); + +extern GLboolean +_math_matrix_has_rotation( const GLmatrix *m ); + +extern GLboolean +_math_matrix_is_general_scale( const GLmatrix *m ); + +extern GLboolean +_math_matrix_is_dirty( const GLmatrix *m ); + + + + + + + +extern void +_math_transposef( GLfloat to[16], const GLfloat from[16] ); + +extern void +_math_transposed( GLdouble to[16], const GLdouble from[16] ); + +extern void +_math_transposefd( GLfloat to[16], const GLdouble from[16] ); +# 205 "../../src/mesa/math/m_matrix.h" +extern void +_mesa_transform_vector(GLfloat u[4], const GLfloat v[4], const GLfloat m[16]); +# 42 "../../src/mesa/main/mtypes.h" 2 +# 1 "../../src/mesa/main/simple_list.h" 1 +# 40 "../../src/mesa/main/simple_list.h" +struct simple_node { + struct simple_node *next; + struct simple_node *prev; +}; +# 43 "../../src/mesa/main/mtypes.h" 2 +# 1 "../../src/mesa/main/formats.h" 1 +# 46 "../../src/mesa/main/formats.h" +typedef enum +{ + MESA_FORMAT_NONE = 0, + + + + + + + + MESA_FORMAT_RGBA8888, + MESA_FORMAT_RGBA8888_REV, + MESA_FORMAT_ARGB8888, + MESA_FORMAT_ARGB8888_REV, + MESA_FORMAT_XRGB8888, + MESA_FORMAT_XRGB8888_REV, + MESA_FORMAT_RGB888, + MESA_FORMAT_BGR888, + MESA_FORMAT_RGB565, + MESA_FORMAT_RGB565_REV, + MESA_FORMAT_ARGB4444, + MESA_FORMAT_ARGB4444_REV, + MESA_FORMAT_RGBA5551, + MESA_FORMAT_ARGB1555, + MESA_FORMAT_ARGB1555_REV, + MESA_FORMAT_AL44, + MESA_FORMAT_AL88, + MESA_FORMAT_AL88_REV, + MESA_FORMAT_AL1616, + MESA_FORMAT_AL1616_REV, + MESA_FORMAT_RGB332, + MESA_FORMAT_A8, + MESA_FORMAT_A16, + MESA_FORMAT_L8, + MESA_FORMAT_L16, + MESA_FORMAT_I8, + MESA_FORMAT_I16, + MESA_FORMAT_CI8, + MESA_FORMAT_YCBCR, + MESA_FORMAT_YCBCR_REV, + MESA_FORMAT_R8, + MESA_FORMAT_RG88, + MESA_FORMAT_RG88_REV, + MESA_FORMAT_R16, + MESA_FORMAT_RG1616, + MESA_FORMAT_RG1616_REV, + MESA_FORMAT_ARGB2101010, + MESA_FORMAT_Z24_S8, + MESA_FORMAT_S8_Z24, + MESA_FORMAT_Z16, + MESA_FORMAT_X8_Z24, + MESA_FORMAT_Z24_X8, + MESA_FORMAT_Z32, + MESA_FORMAT_S8, + + + + + + + MESA_FORMAT_SRGB8, + MESA_FORMAT_SRGBA8, + MESA_FORMAT_SARGB8, + MESA_FORMAT_SL8, + MESA_FORMAT_SLA8, + MESA_FORMAT_SRGB_DXT1, + MESA_FORMAT_SRGBA_DXT1, + MESA_FORMAT_SRGBA_DXT3, + MESA_FORMAT_SRGBA_DXT5, + + + + + + + MESA_FORMAT_RGB_FXT1, + MESA_FORMAT_RGBA_FXT1, + MESA_FORMAT_RGB_DXT1, + MESA_FORMAT_RGBA_DXT1, + MESA_FORMAT_RGBA_DXT3, + MESA_FORMAT_RGBA_DXT5, + + + + + + + MESA_FORMAT_RGBA_FLOAT32, + MESA_FORMAT_RGBA_FLOAT16, + MESA_FORMAT_RGB_FLOAT32, + MESA_FORMAT_RGB_FLOAT16, + MESA_FORMAT_ALPHA_FLOAT32, + MESA_FORMAT_ALPHA_FLOAT16, + MESA_FORMAT_LUMINANCE_FLOAT32, + MESA_FORMAT_LUMINANCE_FLOAT16, + MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32, + MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16, + MESA_FORMAT_INTENSITY_FLOAT32, + MESA_FORMAT_INTENSITY_FLOAT16, + MESA_FORMAT_R_FLOAT32, + MESA_FORMAT_R_FLOAT16, + MESA_FORMAT_RG_FLOAT32, + MESA_FORMAT_RG_FLOAT16, + + + + + + + + MESA_FORMAT_RGBA_INT8, + MESA_FORMAT_RGBA_INT16, + MESA_FORMAT_RGBA_INT32, + + + + + MESA_FORMAT_RGBA_UINT8, + MESA_FORMAT_RGBA_UINT16, + MESA_FORMAT_RGBA_UINT32, + + + + + + + + MESA_FORMAT_DUDV8, + MESA_FORMAT_SIGNED_R8, + MESA_FORMAT_SIGNED_RG88_REV, + MESA_FORMAT_SIGNED_RGBX8888, + MESA_FORMAT_SIGNED_RGBA8888, + MESA_FORMAT_SIGNED_RGBA8888_REV, + MESA_FORMAT_SIGNED_R16, + MESA_FORMAT_SIGNED_GR1616, + MESA_FORMAT_SIGNED_RGB_16, + MESA_FORMAT_SIGNED_RGBA_16, + MESA_FORMAT_RGBA_16, + + + + MESA_FORMAT_RED_RGTC1, + MESA_FORMAT_SIGNED_RED_RGTC1, + MESA_FORMAT_RG_RGTC2, + MESA_FORMAT_SIGNED_RG_RGTC2, + + + + MESA_FORMAT_L_LATC1, + MESA_FORMAT_SIGNED_L_LATC1, + MESA_FORMAT_LA_LATC2, + MESA_FORMAT_SIGNED_LA_LATC2, + + + MESA_FORMAT_SIGNED_A8, + MESA_FORMAT_SIGNED_L8, + MESA_FORMAT_SIGNED_AL88, + MESA_FORMAT_SIGNED_I8, + MESA_FORMAT_SIGNED_A16, + MESA_FORMAT_SIGNED_L16, + MESA_FORMAT_SIGNED_AL1616, + MESA_FORMAT_SIGNED_I16, + + MESA_FORMAT_RGB9_E5_FLOAT, + MESA_FORMAT_R11_G11_B10_FLOAT, + + MESA_FORMAT_COUNT +} gl_format; + + +extern const char * +_mesa_get_format_name(gl_format format); + +extern GLint +_mesa_get_format_bytes(gl_format format); + +extern GLint +_mesa_get_format_bits(gl_format format, GLenum pname); + +extern GLenum +_mesa_get_format_datatype(gl_format format); + +extern GLenum +_mesa_get_format_base_format(gl_format format); + +extern void +_mesa_get_format_block_size(gl_format format, GLuint *bw, GLuint *bh); + +extern GLboolean +_mesa_is_format_compressed(gl_format format); + +extern GLboolean +_mesa_is_format_packed_depth_stencil(gl_format format); + +extern GLboolean +_mesa_is_format_integer_color(gl_format format); + +extern GLenum +_mesa_get_format_color_encoding(gl_format format); + +extern GLuint +_mesa_format_image_size(gl_format format, GLsizei width, + GLsizei height, GLsizei depth); + +extern uint64_t +_mesa_format_image_size64(gl_format format, GLsizei width, + GLsizei height, GLsizei depth); + +extern GLint +_mesa_format_row_stride(gl_format format, GLsizei width); + +extern void +_mesa_format_to_type_and_comps(gl_format format, + GLenum *datatype, GLuint *comps); + +extern void +_mesa_test_formats(void); + +extern gl_format +_mesa_get_srgb_format_linear(gl_format format); +# 44 "../../src/mesa/main/mtypes.h" 2 + + + + + + + typedef GLubyte GLchan; +# 73 "../../src/mesa/main/mtypes.h" + typedef GLubyte GLstencil; +# 85 "../../src/mesa/main/mtypes.h" +typedef GLuint64 GLbitfield64; +# 95 "../../src/mesa/main/mtypes.h" +struct _mesa_HashTable; +struct gl_attrib_node; +struct gl_list_extensions; +struct gl_meta_state; +struct gl_pixelstore_attrib; +struct gl_program_cache; +struct gl_texture_format; +struct gl_texture_image; +struct gl_texture_object; +struct gl_context; +struct st_context; +# 119 "../../src/mesa/main/mtypes.h" +typedef enum +{ + MESA_SHADER_VERTEX = 0, + MESA_SHADER_FRAGMENT = 1, + MESA_SHADER_GEOMETRY = 2, + MESA_SHADER_TYPES = 3 +} gl_shader_type; +# 136 "../../src/mesa/main/mtypes.h" +typedef enum +{ + VERT_ATTRIB_POS = 0, + VERT_ATTRIB_WEIGHT = 1, + VERT_ATTRIB_NORMAL = 2, + VERT_ATTRIB_COLOR0 = 3, + VERT_ATTRIB_COLOR1 = 4, + VERT_ATTRIB_FOG = 5, + VERT_ATTRIB_COLOR_INDEX = 6, + VERT_ATTRIB_POINT_SIZE = 6, + VERT_ATTRIB_EDGEFLAG = 7, + VERT_ATTRIB_TEX0 = 8, + VERT_ATTRIB_TEX1 = 9, + VERT_ATTRIB_TEX2 = 10, + VERT_ATTRIB_TEX3 = 11, + VERT_ATTRIB_TEX4 = 12, + VERT_ATTRIB_TEX5 = 13, + VERT_ATTRIB_TEX6 = 14, + VERT_ATTRIB_TEX7 = 15, + VERT_ATTRIB_GENERIC0 = 16, + VERT_ATTRIB_GENERIC1 = 17, + VERT_ATTRIB_GENERIC2 = 18, + VERT_ATTRIB_GENERIC3 = 19, + VERT_ATTRIB_GENERIC4 = 20, + VERT_ATTRIB_GENERIC5 = 21, + VERT_ATTRIB_GENERIC6 = 22, + VERT_ATTRIB_GENERIC7 = 23, + VERT_ATTRIB_GENERIC8 = 24, + VERT_ATTRIB_GENERIC9 = 25, + VERT_ATTRIB_GENERIC10 = 26, + VERT_ATTRIB_GENERIC11 = 27, + VERT_ATTRIB_GENERIC12 = 28, + VERT_ATTRIB_GENERIC13 = 29, + VERT_ATTRIB_GENERIC14 = 30, + VERT_ATTRIB_GENERIC15 = 31, + VERT_ATTRIB_MAX = 32 +} gl_vert_attrib; +# 220 "../../src/mesa/main/mtypes.h" +typedef enum +{ + VERT_RESULT_HPOS = 0, + VERT_RESULT_COL0 = 1, + VERT_RESULT_COL1 = 2, + VERT_RESULT_FOGC = 3, + VERT_RESULT_TEX0 = 4, + VERT_RESULT_TEX1 = 5, + VERT_RESULT_TEX2 = 6, + VERT_RESULT_TEX3 = 7, + VERT_RESULT_TEX4 = 8, + VERT_RESULT_TEX5 = 9, + VERT_RESULT_TEX6 = 10, + VERT_RESULT_TEX7 = 11, + VERT_RESULT_PSIZ = 12, + VERT_RESULT_BFC0 = 13, + VERT_RESULT_BFC1 = 14, + VERT_RESULT_EDGE = 15, + VERT_RESULT_VAR0 = 16, + VERT_RESULT_MAX = (VERT_RESULT_VAR0 + 16) +} gl_vert_result; + + + + + + + +typedef enum +{ + GEOM_ATTRIB_POSITION = 0, + GEOM_ATTRIB_COLOR0 = 1, + GEOM_ATTRIB_COLOR1 = 2, + GEOM_ATTRIB_SECONDARY_COLOR0 = 3, + GEOM_ATTRIB_SECONDARY_COLOR1 = 4, + GEOM_ATTRIB_FOG_FRAG_COORD = 5, + GEOM_ATTRIB_POINT_SIZE = 6, + GEOM_ATTRIB_CLIP_VERTEX = 7, + GEOM_ATTRIB_PRIMITIVE_ID = 8, + GEOM_ATTRIB_TEX_COORD = 9, + + GEOM_ATTRIB_VAR0 = 16, + GEOM_ATTRIB_MAX = (GEOM_ATTRIB_VAR0 + 16) +} gl_geom_attrib; +# 289 "../../src/mesa/main/mtypes.h" +typedef enum +{ + GEOM_RESULT_POS = 0, + GEOM_RESULT_COL0 = 1, + GEOM_RESULT_COL1 = 2, + GEOM_RESULT_SCOL0 = 3, + GEOM_RESULT_SCOL1 = 4, + GEOM_RESULT_FOGC = 5, + GEOM_RESULT_TEX0 = 6, + GEOM_RESULT_TEX1 = 7, + GEOM_RESULT_TEX2 = 8, + GEOM_RESULT_TEX3 = 9, + GEOM_RESULT_TEX4 = 10, + GEOM_RESULT_TEX5 = 11, + GEOM_RESULT_TEX6 = 12, + GEOM_RESULT_TEX7 = 13, + GEOM_RESULT_PSIZ = 14, + GEOM_RESULT_CLPV = 15, + GEOM_RESULT_PRID = 16, + GEOM_RESULT_LAYR = 17, + GEOM_RESULT_VAR0 = 18, + + GEOM_RESULT_MAX = (GEOM_RESULT_VAR0 + 16 - 2) +} gl_geom_result; + + + + + +typedef enum +{ + FRAG_ATTRIB_WPOS = 0, + FRAG_ATTRIB_COL0 = 1, + FRAG_ATTRIB_COL1 = 2, + FRAG_ATTRIB_FOGC = 3, + FRAG_ATTRIB_TEX0 = 4, + FRAG_ATTRIB_TEX1 = 5, + FRAG_ATTRIB_TEX2 = 6, + FRAG_ATTRIB_TEX3 = 7, + FRAG_ATTRIB_TEX4 = 8, + FRAG_ATTRIB_TEX5 = 9, + FRAG_ATTRIB_TEX6 = 10, + FRAG_ATTRIB_TEX7 = 11, + FRAG_ATTRIB_FACE = 12, + FRAG_ATTRIB_PNTC = 13, + FRAG_ATTRIB_VAR0 = 14, + FRAG_ATTRIB_MAX = (FRAG_ATTRIB_VAR0 + 16) +} gl_frag_attrib; +# 375 "../../src/mesa/main/mtypes.h" +typedef enum +{ + FRAG_RESULT_DEPTH = 0, + FRAG_RESULT_STENCIL = 1, + + + + FRAG_RESULT_COLOR = 2, + + + + + + FRAG_RESULT_DATA0 = 3, + FRAG_RESULT_MAX = (FRAG_RESULT_DATA0 + 8) +} gl_frag_result; + + + + + +typedef enum +{ + + BUFFER_FRONT_LEFT, + BUFFER_BACK_LEFT, + BUFFER_FRONT_RIGHT, + BUFFER_BACK_RIGHT, + BUFFER_DEPTH, + BUFFER_STENCIL, + BUFFER_ACCUM, + + BUFFER_AUX0, + + BUFFER_COLOR0, + BUFFER_COLOR1, + BUFFER_COLOR2, + BUFFER_COLOR3, + BUFFER_COLOR4, + BUFFER_COLOR5, + BUFFER_COLOR6, + BUFFER_COLOR7, + BUFFER_COUNT +} gl_buffer_index; +# 466 "../../src/mesa/main/mtypes.h" +struct gl_config +{ + GLboolean rgbMode; + GLboolean floatMode; + GLboolean colorIndexMode; + GLuint doubleBufferMode; + GLuint stereoMode; + + GLboolean haveAccumBuffer; + GLboolean haveDepthBuffer; + GLboolean haveStencilBuffer; + + GLint redBits, greenBits, blueBits, alphaBits; + GLuint redMask, greenMask, blueMask, alphaMask; + GLint rgbBits; + GLint indexBits; + + GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits; + GLint depthBits; + GLint stencilBits; + + GLint numAuxBuffers; + + GLint level; + + + GLint visualRating; + + + GLint transparentPixel; + + GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha; + GLint transparentIndex; + + + GLint sampleBuffers; + GLint samples; + + + GLint maxPbufferWidth; + GLint maxPbufferHeight; + GLint maxPbufferPixels; + GLint optimalPbufferWidth; + GLint optimalPbufferHeight; + + + GLint swapMethod; + + + GLint bindToTextureRgb; + GLint bindToTextureRgba; + GLint bindToMipmapTexture; + GLint bindToTextureTargets; + GLint yInverted; + + + GLint sRGBCapable; +}; + + + + + +struct gl_color_table +{ + GLenum InternalFormat; + GLenum _BaseFormat; + GLuint Size; + GLfloat *TableF; + GLubyte *TableUB; + GLubyte RedSize; + GLubyte GreenSize; + GLubyte BlueSize; + GLubyte AlphaSize; + GLubyte LuminanceSize; + GLubyte IntensitySize; +}; +# 612 "../../src/mesa/main/mtypes.h" +struct gl_shine_tab +{ + struct gl_shine_tab *next, *prev; + GLfloat tab[256 +1]; + GLfloat shininess; + GLuint refcount; +}; + + + + + +struct gl_light +{ + struct gl_light *next; + struct gl_light *prev; + + GLfloat Ambient[4]; + GLfloat Diffuse[4]; + GLfloat Specular[4]; + GLfloat EyePosition[4]; + GLfloat SpotDirection[4]; + GLfloat SpotExponent; + GLfloat SpotCutoff; + GLfloat _CosCutoffNeg; + GLfloat _CosCutoff; + GLfloat ConstantAttenuation; + GLfloat LinearAttenuation; + GLfloat QuadraticAttenuation; + GLboolean Enabled; + + + + + + GLbitfield _Flags; + + GLfloat _Position[4]; + GLfloat _VP_inf_norm[3]; + GLfloat _h_inf_norm[3]; + GLfloat _NormSpotDirection[4]; + GLfloat _VP_inf_spot_attenuation; + + GLfloat _SpotExpTable[512][2]; + GLfloat _MatAmbient[2][3]; + GLfloat _MatDiffuse[2][3]; + GLfloat _MatSpecular[2][3]; + GLfloat _dli; + GLfloat _sli; + +}; + + + + + +struct gl_lightmodel +{ + GLfloat Ambient[4]; + GLboolean LocalViewer; + GLboolean TwoSide; + GLenum ColorControl; + +}; + + + + + +struct gl_material +{ + GLfloat Attrib[12][4]; +}; + + + + + +struct gl_accum_attrib +{ + GLfloat ClearColor[4]; +}; + + + + + +struct gl_colorbuffer_attrib +{ + GLuint ClearIndex; + GLfloat ClearColorUnclamped[4]; + GLclampf ClearColor[4]; + + GLuint IndexMask; + GLubyte ColorMask[8][4]; + + GLenum DrawBuffer[8]; + + + + + + GLboolean AlphaEnabled; + GLenum AlphaFunc; + GLfloat AlphaRefUnclamped; + GLclampf AlphaRef; + + + + + + + GLbitfield BlendEnabled; + + + + + + GLfloat BlendColorUnclamped[4]; + GLfloat BlendColor[4]; + + struct + { + GLenum SrcRGB; + GLenum DstRGB; + GLenum SrcA; + GLenum DstA; + GLenum EquationRGB; + GLenum EquationA; + } Blend[8]; + + GLboolean _BlendFuncPerBuffer; + + GLboolean _BlendEquationPerBuffer; + + + + + + + GLenum LogicOp; + GLboolean IndexLogicOpEnabled; + GLboolean ColorLogicOpEnabled; + GLboolean _LogicOpEnabled; + + + GLboolean DitherFlag; + + GLenum ClampFragmentColor; + GLboolean _ClampFragmentColor; + GLenum ClampReadColor; + GLboolean _ClampReadColor; + + GLboolean sRGBEnabled; +}; + + + + + +struct gl_current_attrib +{ + + + + + + + GLfloat Attrib[VERT_ATTRIB_MAX][4]; + + + + + + + GLfloat RasterPos[4]; + GLfloat RasterDistance; + GLfloat RasterColor[4]; + GLfloat RasterSecondaryColor[4]; + GLfloat RasterTexCoords[8][4]; + GLboolean RasterPosValid; + +}; + + + + + +struct gl_depthbuffer_attrib +{ + GLenum Func; + GLclampd Clear; + GLboolean Test; + GLboolean Mask; + GLboolean BoundsTest; + GLfloat BoundsMin, BoundsMax; +}; + + + + + +struct gl_eval_attrib +{ + + + + + GLboolean Map1Color4; + GLboolean Map1Index; + GLboolean Map1Normal; + GLboolean Map1TextureCoord1; + GLboolean Map1TextureCoord2; + GLboolean Map1TextureCoord3; + GLboolean Map1TextureCoord4; + GLboolean Map1Vertex3; + GLboolean Map1Vertex4; + GLboolean Map1Attrib[16]; + GLboolean Map2Color4; + GLboolean Map2Index; + GLboolean Map2Normal; + GLboolean Map2TextureCoord1; + GLboolean Map2TextureCoord2; + GLboolean Map2TextureCoord3; + GLboolean Map2TextureCoord4; + GLboolean Map2Vertex3; + GLboolean Map2Vertex4; + GLboolean Map2Attrib[16]; + GLboolean AutoNormal; + + + + + + + GLint MapGrid1un; + GLfloat MapGrid1u1, MapGrid1u2, MapGrid1du; + GLint MapGrid2un, MapGrid2vn; + GLfloat MapGrid2u1, MapGrid2u2, MapGrid2du; + GLfloat MapGrid2v1, MapGrid2v2, MapGrid2dv; + +}; + + + + + +struct gl_fog_attrib +{ + GLboolean Enabled; + GLfloat ColorUnclamped[4]; + GLfloat Color[4]; + GLfloat Density; + GLfloat Start; + GLfloat End; + GLfloat Index; + GLenum Mode; + GLboolean ColorSumEnabled; + GLenum FogCoordinateSource; + GLfloat _Scale; +}; +# 883 "../../src/mesa/main/mtypes.h" +enum gl_frag_depth_layout { + FRAG_DEPTH_LAYOUT_NONE, + FRAG_DEPTH_LAYOUT_ANY, + FRAG_DEPTH_LAYOUT_GREATER, + FRAG_DEPTH_LAYOUT_LESS, + FRAG_DEPTH_LAYOUT_UNCHANGED +}; + + + + + + + +struct gl_hint_attrib +{ + GLenum PerspectiveCorrection; + GLenum PointSmooth; + GLenum LineSmooth; + GLenum PolygonSmooth; + GLenum Fog; + GLenum ClipVolumeClipping; + GLenum TextureCompression; + GLenum GenerateMipmap; + GLenum FragmentShaderDerivative; +}; +# 924 "../../src/mesa/main/mtypes.h" +struct gl_light_attrib +{ + struct gl_light Light[8]; + struct gl_lightmodel Model; + + + + + + struct gl_material Material; + + + GLboolean Enabled; + GLenum ShadeModel; + GLenum ProvokingVertex; + GLenum ColorMaterialFace; + GLenum ColorMaterialMode; + GLbitfield ColorMaterialBitmask; + GLboolean ColorMaterialEnabled; + GLenum ClampVertexColor; + GLboolean _ClampVertexColor; + + struct gl_light EnabledList; + + + + + + GLboolean _NeedEyeCoords; + GLboolean _NeedVertices; + GLbitfield _Flags; + GLfloat _BaseColor[2][3]; + +}; + + + + + +struct gl_line_attrib +{ + GLboolean SmoothFlag; + GLboolean StippleFlag; + GLushort StipplePattern; + GLint StippleFactor; + GLfloat Width; +}; + + + + + +struct gl_list_attrib +{ + GLuint ListBase; +}; + + + + + +struct gl_multisample_attrib +{ + GLboolean Enabled; + GLboolean _Enabled; + GLboolean SampleAlphaToCoverage; + GLboolean SampleAlphaToOne; + GLboolean SampleCoverage; + GLfloat SampleCoverageValue; + GLboolean SampleCoverageInvert; +}; + + + + + +struct gl_pixelmap +{ + GLint Size; + GLfloat Map[256]; + GLubyte Map8[256]; +}; + + + + + +struct gl_pixelmaps +{ + struct gl_pixelmap RtoR; + struct gl_pixelmap GtoG; + struct gl_pixelmap BtoB; + struct gl_pixelmap AtoA; + struct gl_pixelmap ItoR; + struct gl_pixelmap ItoG; + struct gl_pixelmap ItoB; + struct gl_pixelmap ItoA; + struct gl_pixelmap ItoI; + struct gl_pixelmap StoS; +}; + + + + + +struct gl_pixel_attrib +{ + GLenum ReadBuffer; + + + + + + + GLfloat RedBias, RedScale; + GLfloat GreenBias, GreenScale; + GLfloat BlueBias, BlueScale; + GLfloat AlphaBias, AlphaScale; + GLfloat DepthBias, DepthScale; + GLint IndexShift, IndexOffset; + + + + + GLboolean MapColorFlag; + GLboolean MapStencilFlag; + + + + + GLfloat ZoomX, ZoomY; +}; + + + + + +struct gl_point_attrib +{ + GLboolean SmoothFlag; + GLfloat Size; + GLfloat Params[3]; + GLfloat MinSize, MaxSize; + GLfloat Threshold; + GLboolean _Attenuated; + GLboolean PointSprite; + GLboolean CoordReplace[8]; + GLenum SpriteRMode; + GLenum SpriteOrigin; +}; + + + + + +struct gl_polygon_attrib +{ + GLenum FrontFace; + GLenum FrontMode; + GLenum BackMode; + GLboolean _FrontBit; + GLboolean CullFlag; + GLboolean SmoothFlag; + GLboolean StippleFlag; + GLenum CullFaceMode; + GLfloat OffsetFactor; + GLfloat OffsetUnits; + GLboolean OffsetPoint; + GLboolean OffsetLine; + GLboolean OffsetFill; +}; + + + + + +struct gl_scissor_attrib +{ + GLboolean Enabled; + GLint X, Y; + GLsizei Width, Height; +}; +# 1124 "../../src/mesa/main/mtypes.h" +struct gl_stencil_attrib +{ + GLboolean Enabled; + GLboolean TestTwoSide; + GLubyte ActiveFace; + GLboolean _Enabled; + GLboolean _TestTwoSide; + GLubyte _BackFace; + GLenum Function[3]; + GLenum FailFunc[3]; + GLenum ZPassFunc[3]; + GLenum ZFailFunc[3]; + GLint Ref[3]; + GLuint ValueMask[3]; + GLuint WriteMask[3]; + GLuint Clear; +}; + + + + + + + +typedef enum +{ + TEXTURE_BUFFER_INDEX, + TEXTURE_2D_ARRAY_INDEX, + TEXTURE_1D_ARRAY_INDEX, + TEXTURE_CUBE_INDEX, + TEXTURE_3D_INDEX, + TEXTURE_RECT_INDEX, + TEXTURE_2D_INDEX, + TEXTURE_1D_INDEX, + NUM_TEXTURE_TARGETS +} gl_texture_index; +# 1230 "../../src/mesa/main/mtypes.h" +typedef void (*FetchTexelFuncC)( const struct gl_texture_image *texImage, + GLint col, GLint row, GLint img, + GLchan *texelOut ); + + + + + + +typedef void (*FetchTexelFuncF)( const struct gl_texture_image *texImage, + GLint col, GLint row, GLint img, + GLfloat *texelOut ); + + +typedef void (*StoreTexelFunc)(struct gl_texture_image *texImage, + GLint col, GLint row, GLint img, + const void *texel); + + + + + + +struct gl_texture_image +{ + GLint InternalFormat; + GLenum _BaseFormat; + + + + + + gl_format TexFormat; + + GLuint Border; + GLuint Width; + GLuint Height; + GLuint Depth; + GLuint Width2; + GLuint Height2; + GLuint Depth2; + GLuint WidthLog2; + GLuint HeightLog2; + GLuint DepthLog2; + GLuint MaxLog2; + GLfloat WidthScale; + GLfloat HeightScale; + GLfloat DepthScale; + GLboolean IsClientData; + GLboolean _IsPowerOfTwo; + + struct gl_texture_object *TexObject; + + FetchTexelFuncC FetchTexelc; + FetchTexelFuncF FetchTexelf; + + GLuint RowStride; + GLuint *ImageOffsets; + + GLvoid *Data; + + + + + + void *DriverData; + +}; + + + + + +typedef enum +{ + FACE_POS_X = 0, + FACE_NEG_X = 1, + FACE_POS_Y = 2, + FACE_NEG_Y = 3, + FACE_POS_Z = 4, + FACE_NEG_Z = 5, + MAX_FACES = 6 +} gl_face_index; + + + + + + +struct gl_sampler_object +{ + GLuint Name; + GLint RefCount; + + GLenum WrapS; + GLenum WrapT; + GLenum WrapR; + GLenum MinFilter; + GLenum MagFilter; + union { + GLfloat f[4]; + GLuint ui[4]; + GLint i[4]; + } BorderColor; + GLfloat MinLod; + GLfloat MaxLod; + GLfloat LodBias; + GLfloat MaxAnisotropy; + GLenum CompareMode; + GLenum CompareFunc; + GLfloat CompareFailValue; + GLenum sRGBDecode; + GLboolean CubeMapSeamless; + + + GLenum DepthMode; + + + GLboolean _CompleteTexture; +}; + + + + + + + +struct gl_texture_object +{ + _glthread_Mutex Mutex; + GLint RefCount; + GLuint Name; + GLenum Target; + + struct gl_sampler_object Sampler; + + GLfloat Priority; + GLint BaseLevel; + GLint MaxLevel; + GLint _MaxLevel; + GLfloat _MaxLambda; + GLint CropRect[4]; + GLenum Swizzle[4]; + GLuint _Swizzle; + GLboolean GenerateMipmap; + GLboolean _Complete; + GLboolean _RenderToTexture; + GLboolean Purgeable; + + + struct gl_texture_image *Image[MAX_FACES][15]; + + + struct gl_buffer_object *BufferObject; + GLenum BufferObjectFormat; + + + struct gl_color_table Palette; +# 1396 "../../src/mesa/main/mtypes.h" + void *DriverData; +}; +# 1407 "../../src/mesa/main/mtypes.h" +struct gl_tex_env_combine_state +{ + GLenum ModeRGB; + GLenum ModeA; + + GLenum SourceRGB[4]; + GLenum SourceA[4]; + + GLenum OperandRGB[4]; + GLenum OperandA[4]; + GLuint ScaleShiftRGB; + GLuint ScaleShiftA; + GLuint _NumArgsRGB; + GLuint _NumArgsA; +}; + + + + + +struct gl_texgen +{ + GLenum Mode; + GLbitfield _ModeBit; + GLfloat ObjectPlane[4]; + GLfloat EyePlane[4]; +}; + + + + + + +struct gl_texture_unit +{ + GLbitfield Enabled; + GLbitfield _ReallyEnabled; + + GLenum EnvMode; + GLclampf EnvColor[4]; + GLfloat EnvColorUnclamped[4]; + + struct gl_texgen GenS; + struct gl_texgen GenT; + struct gl_texgen GenR; + struct gl_texgen GenQ; + GLbitfield TexGenEnabled; + GLbitfield _GenFlags; + + GLfloat LodBias; + GLenum BumpTarget; + GLfloat RotMatrix[4]; + + + struct gl_sampler_object *Sampler; + + + + + struct gl_tex_env_combine_state Combine; + + + + + + struct gl_tex_env_combine_state _EnvMode; + + + + + + struct gl_tex_env_combine_state *_CurrentCombine; + + + struct gl_texture_object *CurrentTex[NUM_TEXTURE_TARGETS]; + + + struct gl_texture_object *_Current; +}; + + + + + +struct gl_texture_attrib +{ + GLuint CurrentUnit; + struct gl_texture_unit Unit[(16 + 16)]; + + struct gl_texture_object *ProxyTex[NUM_TEXTURE_TARGETS]; + + + struct gl_buffer_object *BufferObject; + + + GLboolean CubeMapSeamless; + + + GLboolean SharedPalette; + struct gl_color_table Palette; + + + GLbitfield _EnabledUnits; + + + GLbitfield _EnabledCoordUnits; + + + GLbitfield _TexGenEnabled; + + + GLbitfield _TexMatEnabled; + + + GLbitfield _GenFlags; +}; + + + + + +struct gl_transform_attrib +{ + GLenum MatrixMode; + GLfloat EyeUserPlane[6][4]; + GLfloat _ClipUserPlane[6][4]; + GLbitfield ClipPlanesEnabled; + GLboolean Normalize; + GLboolean RescaleNormals; + GLboolean RasterPositionUnclipped; + GLboolean DepthClamp; + + GLfloat CullEyePos[4]; + GLfloat CullObjPos[4]; +}; + + + + + +struct gl_viewport_attrib +{ + GLint X, Y; + GLsizei Width, Height; + GLfloat Near, Far; + GLmatrix _WindowMap; +}; + + + + + +struct gl_buffer_object +{ + _glthread_Mutex Mutex; + GLint RefCount; + GLuint Name; + GLenum Usage; + GLsizeiptrARB Size; + GLubyte *Data; + + + GLbitfield AccessFlags; + GLvoid *Pointer; + GLintptr Offset; + GLsizeiptr Length; + + GLboolean Written; + GLboolean Purgeable; +}; + + + + + +struct gl_pixelstore_attrib +{ + GLint Alignment; + GLint RowLength; + GLint SkipPixels; + GLint SkipRows; + GLint ImageHeight; + GLint SkipImages; + GLboolean SwapBytes; + GLboolean LsbFirst; + GLboolean ClientStorage; + GLboolean Invert; + struct gl_buffer_object *BufferObj; +}; + + + + + +struct gl_client_array +{ + GLint Size; + GLenum Type; + GLenum Format; + GLsizei Stride; + GLsizei StrideB; + const GLubyte *Ptr; + GLboolean Enabled; + GLboolean Normalized; + GLboolean Integer; + GLuint InstanceDivisor; + GLuint _ElementSize; + + struct gl_buffer_object *BufferObj; + GLuint _MaxElement; +}; + + + + + + +struct gl_array_object +{ + + GLuint Name; + + GLint RefCount; + _glthread_Mutex Mutex; + GLboolean VBOonly; + + + + struct gl_client_array Vertex; + struct gl_client_array Weight; + struct gl_client_array Normal; + struct gl_client_array Color; + struct gl_client_array SecondaryColor; + struct gl_client_array FogCoord; + struct gl_client_array Index; + struct gl_client_array EdgeFlag; + struct gl_client_array TexCoord[8]; + struct gl_client_array PointSize; +# 1653 "../../src/mesa/main/mtypes.h" + struct gl_client_array VertexAttrib[16]; + + + GLbitfield _Enabled; + + + + + + GLuint _MaxElement; +}; + + + + + +struct gl_array_attrib +{ + + struct gl_array_object *ArrayObj; + + + struct gl_array_object *DefaultArrayObj; + + + struct _mesa_HashTable *Objects; + + GLint ActiveTexture; + GLuint LockFirst; + GLuint LockCount; + + + GLboolean PrimitiveRestart; + GLuint RestartIndex; + + GLbitfield NewState; + GLboolean RebindArrays; + + + struct gl_buffer_object *ArrayBufferObj; + struct gl_buffer_object *ElementArrayBufferObj; +}; + + + + + +struct gl_feedback +{ + GLenum Type; + GLbitfield _Mask; + GLfloat *Buffer; + GLuint BufferSize; + GLuint Count; +}; + + + + + +struct gl_selection +{ + GLuint *Buffer; + GLuint BufferSize; + GLuint BufferCount; + GLuint Hits; + GLuint NameStackDepth; + GLuint NameStack[64]; + GLboolean HitFlag; + GLfloat HitMinZ; + GLfloat HitMaxZ; +}; + + + + + +struct gl_1d_map +{ + GLuint Order; + GLfloat u1, u2, du; + GLfloat *Points; +}; + + + + + +struct gl_2d_map +{ + GLuint Uorder; + GLuint Vorder; + GLfloat u1, u2, du; + GLfloat v1, v2, dv; + GLfloat *Points; +}; + + + + + +struct gl_evaluators +{ + + + + + struct gl_1d_map Map1Vertex3; + struct gl_1d_map Map1Vertex4; + struct gl_1d_map Map1Index; + struct gl_1d_map Map1Color4; + struct gl_1d_map Map1Normal; + struct gl_1d_map Map1Texture1; + struct gl_1d_map Map1Texture2; + struct gl_1d_map Map1Texture3; + struct gl_1d_map Map1Texture4; + struct gl_1d_map Map1Attrib[16]; + + + + + + + struct gl_2d_map Map2Vertex3; + struct gl_2d_map Map2Vertex4; + struct gl_2d_map Map2Index; + struct gl_2d_map Map2Color4; + struct gl_2d_map Map2Normal; + struct gl_2d_map Map2Texture1; + struct gl_2d_map Map2Texture2; + struct gl_2d_map Map2Texture3; + struct gl_2d_map Map2Texture4; + struct gl_2d_map Map2Attrib[16]; + +}; +# 1801 "../../src/mesa/main/mtypes.h" +typedef enum +{ + PROGRAM_TEMPORARY, + PROGRAM_INPUT, + PROGRAM_OUTPUT, + PROGRAM_VARYING, + PROGRAM_LOCAL_PARAM, + PROGRAM_ENV_PARAM, + PROGRAM_STATE_VAR, + PROGRAM_NAMED_PARAM, + PROGRAM_CONSTANT, + PROGRAM_UNIFORM, + PROGRAM_WRITE_ONLY, + PROGRAM_ADDRESS, + PROGRAM_SAMPLER, + PROGRAM_SYSTEM_VALUE, + PROGRAM_UNDEFINED, + PROGRAM_FILE_MAX +} gl_register_file; + + + + + + +typedef enum +{ + SYSTEM_VALUE_FRONT_FACE, + SYSTEM_VALUE_INSTANCE_ID, + SYSTEM_VALUE_MAX +} gl_system_value; + + + +struct prog_instruction; +struct gl_program_parameter_list; +struct gl_uniform_list; + + + + + +struct gl_program +{ + GLuint Id; + GLubyte *String; + GLint RefCount; + GLenum Target; + GLenum Format; + GLboolean Resident; + + struct prog_instruction *Instructions; + + GLbitfield InputsRead; + GLbitfield64 OutputsWritten; + GLbitfield SystemValuesRead; + GLbitfield InputFlags[32]; + GLbitfield OutputFlags[64]; + GLbitfield TexturesUsed[((8 > 16) ? 8 : 16)]; + GLbitfield SamplersUsed; + GLbitfield ShadowSamplers; + + + + struct gl_program_parameter_list *Parameters; + + GLfloat LocalParams[1024][4]; + + + struct gl_program_parameter_list *Varying; + + struct gl_program_parameter_list *Attributes; + + + GLubyte SamplerUnits[16]; + + gl_texture_index SamplerTargets[16]; + + + + + GLbitfield IndirectRegisterFiles; + + + + GLuint NumInstructions; + GLuint NumTemporaries; + GLuint NumParameters; + GLuint NumAttributes; + GLuint NumAddressRegs; + GLuint NumAluInstructions; + GLuint NumTexInstructions; + GLuint NumTexIndirections; + + + + GLuint NumNativeInstructions; + GLuint NumNativeTemporaries; + GLuint NumNativeParameters; + GLuint NumNativeAttributes; + GLuint NumNativeAddressRegs; + GLuint NumNativeAluInstructions; + GLuint NumNativeTexInstructions; + GLuint NumNativeTexIndirections; + +}; + + + +struct gl_vertex_program +{ + struct gl_program Base; + GLboolean IsNVProgram; + GLboolean IsPositionInvariant; +}; + + + +struct gl_geometry_program +{ + struct gl_program Base; + + GLint VerticesOut; + GLenum InputType; + + GLenum OutputType; +}; + + + +struct gl_fragment_program +{ + struct gl_program Base; + GLboolean UsesKill; + GLboolean OriginUpperLeft; + GLboolean PixelCenterInteger; + enum gl_frag_depth_layout FragDepthLayout; +}; + + + + + +struct gl_program_state +{ + GLint ErrorPos; + const char *ErrorString; +}; + + + + + +struct gl_vertex_program_state +{ + GLboolean Enabled; + GLboolean _Enabled; + GLboolean PointSizeEnabled; + GLboolean TwoSideEnabled; + struct gl_vertex_program *Current; + + + + + + struct gl_vertex_program *_Current; + + GLfloat Parameters[256][4]; + + + GLenum TrackMatrix[256 / 4]; + GLenum TrackMatrixTransform[256 / 4]; + + + GLboolean _MaintainTnlProgram; + + + struct gl_vertex_program *_TnlProgram; + + + struct gl_program_cache *Cache; + + GLboolean _Overriden; +}; + + + + + +struct gl_geometry_program_state +{ + GLboolean Enabled; + GLboolean _Enabled; + struct gl_geometry_program *Current; + + + + + struct gl_geometry_program *_Current; + + GLfloat Parameters[256][4]; + + + struct gl_program_cache *Cache; +}; + + + + +struct gl_fragment_program_state +{ + GLboolean Enabled; + GLboolean _Enabled; + struct gl_fragment_program *Current; + + + + + + struct gl_fragment_program *_Current; + + GLfloat Parameters[256][4]; + + + GLboolean _MaintainTexEnvProgram; + + + struct gl_fragment_program *_TexEnvProgram; + + + struct gl_program_cache *Cache; +}; +# 2041 "../../src/mesa/main/mtypes.h" +struct atifs_instruction; +struct atifs_setupinst; + + + + +struct ati_fragment_shader +{ + GLuint Id; + GLint RefCount; + struct atifs_instruction *Instructions[2]; + struct atifs_setupinst *SetupInst[2]; + GLfloat Constants[8][4]; + GLbitfield LocalConstDef; + GLubyte numArithInstr[2]; + GLubyte regsAssigned[2]; + GLubyte NumPasses; + GLubyte cur_pass; + GLubyte last_optype; + GLboolean interpinp1; + GLboolean isValid; + GLuint swizzlerq; +}; + + + + +struct gl_ati_fragment_shader_state +{ + GLboolean Enabled; + GLboolean _Enabled; + GLboolean Compiling; + GLfloat GlobalConstants[8][4]; + struct ati_fragment_shader *Current; +}; + + + + + +struct gl_query_object +{ + GLenum Target; + GLuint Id; + GLuint64EXT Result; + GLboolean Active; + GLboolean Ready; +}; + + + + + +struct gl_query_state +{ + struct _mesa_HashTable *QueryObjects; + struct gl_query_object *CurrentOcclusionObject; + struct gl_query_object *CurrentTimerObject; + + + struct gl_query_object *CondRenderQuery; + + + struct gl_query_object *PrimitivesGenerated; + struct gl_query_object *PrimitivesWritten; + + + struct gl_query_object *TimeElapsed; + + GLenum CondRenderMode; +}; + + + +struct gl_sync_object { + struct simple_node link; + GLenum Type; + GLuint Name; + GLint RefCount; + GLboolean DeletePending; + + + GLenum SyncCondition; + GLbitfield Flags; + GLuint StatusFlag:1; +}; + + + +struct gl_sl_pragmas +{ + GLboolean IgnoreOptimize; + GLboolean IgnoreDebug; + GLboolean Optimize; + GLboolean Debug; +}; + + + + + +struct gl_shader +{ + GLenum Type; + GLuint Name; + GLint RefCount; + GLboolean DeletePending; + GLboolean CompileStatus; + const GLchar *Source; + GLuint SourceChecksum; + struct gl_program *Program; + GLchar *InfoLog; + struct gl_sl_pragmas Pragmas; + + unsigned Version; + + struct exec_list *ir; + struct glsl_symbol_table *symbols; + + + struct gl_shader *builtins_to_link[16]; + unsigned num_builtins_to_link; +}; + + + + + + +struct gl_shader_program +{ + GLenum Type; + GLuint Name; + GLint RefCount; + GLboolean DeletePending; + + GLuint NumShaders; + struct gl_shader **Shaders; + + + struct gl_program_parameter_list *Attributes; + + + struct { + GLenum BufferMode; + GLuint NumVarying; + GLchar **VaryingNames; + } TransformFeedback; + + + struct { + GLint VerticesOut; + GLenum InputType; + + GLenum OutputType; + } Geom; + + + struct gl_vertex_program *VertexProgram; + struct gl_fragment_program *FragmentProgram; + struct gl_geometry_program *GeometryProgram; + struct gl_uniform_list *Uniforms; + struct gl_program_parameter_list *Varying; + GLboolean LinkStatus; + GLboolean Validated; + GLboolean _Used; + GLchar *InfoLog; + + unsigned Version; +# 2218 "../../src/mesa/main/mtypes.h" + struct gl_shader *_LinkedShaders[MESA_SHADER_TYPES]; +}; +# 2235 "../../src/mesa/main/mtypes.h" +struct gl_shader_state +{ + + + + + + + + struct gl_shader_program *CurrentVertexProgram; + struct gl_shader_program *CurrentGeometryProgram; + struct gl_shader_program *CurrentFragmentProgram; + + + + + + + struct gl_shader_program *ActiveProgram; + + void *MemPool; + + GLbitfield Flags; +}; + + + + +struct gl_shader_compiler_options +{ + + GLboolean EmitCondCodes; + GLboolean EmitNVTempInitialization; + + + + + GLboolean EmitNoIfs; + GLboolean EmitNoLoops; + GLboolean EmitNoFunctions; + GLboolean EmitNoCont; + GLboolean EmitNoMainReturn; + GLboolean EmitNoNoise; + GLboolean EmitNoPow; + + + + + + GLboolean EmitNoIndirectInput; + GLboolean EmitNoIndirectOutput; + GLboolean EmitNoIndirectTemp; + GLboolean EmitNoIndirectUniform; + + + GLuint MaxUnrollIterations; + + struct gl_sl_pragmas DefaultPragmas; +}; + + + + +struct gl_transform_feedback_object +{ + GLuint Name; + GLint RefCount; + GLboolean Active; + GLboolean Paused; + + + GLuint BufferNames[32]; + struct gl_buffer_object *Buffers[32]; + + + GLintptr Offset[32]; + + GLsizeiptr Size[32]; +}; + + + + + +struct gl_transform_feedback +{ + GLenum Mode; + + GLboolean RasterDiscard; + + + struct gl_buffer_object *CurrentBuffer; + + + struct _mesa_HashTable *Objects; + + + struct gl_transform_feedback_object *CurrentObject; + + + struct gl_transform_feedback_object *DefaultObject; +}; + + + + + + +struct gl_shared_state +{ + _glthread_Mutex Mutex; + GLint RefCount; + struct _mesa_HashTable *DisplayList; + struct _mesa_HashTable *TexObjects; + + + struct gl_texture_object *DefaultTex[NUM_TEXTURE_TARGETS]; + + + struct gl_texture_object *FallbackTex; +# 2363 "../../src/mesa/main/mtypes.h" + _glthread_Mutex TexMutex; + GLuint TextureStateStamp; + + + + struct gl_buffer_object *NullBufferObj; + + + + + + struct _mesa_HashTable *Programs; + struct gl_vertex_program *DefaultVertexProgram; + struct gl_fragment_program *DefaultFragmentProgram; + struct gl_geometry_program *DefaultGeometryProgram; + + + + struct _mesa_HashTable *ATIShaders; + struct ati_fragment_shader *DefaultFragmentShader; + + struct _mesa_HashTable *BufferObjects; + + + struct _mesa_HashTable *ShaderObjects; + + + struct _mesa_HashTable *RenderBuffers; + struct _mesa_HashTable *FrameBuffers; + + + struct simple_node SyncObjects; + + + struct _mesa_HashTable *SamplerObjects; + + void *DriverData; +}; +# 2414 "../../src/mesa/main/mtypes.h" +struct gl_renderbuffer +{ + _glthread_Mutex Mutex; + GLuint ClassID; + GLuint Name; + GLint RefCount; + GLuint Width, Height; + GLint RowStride; + GLboolean Purgeable; + + GLboolean AttachedAnytime; + + GLubyte NumSamples; + + GLenum InternalFormat; + GLenum _BaseFormat; + + gl_format Format; + + GLenum DataType; + GLvoid *Data; + + + struct gl_renderbuffer *Wrapped; + + + void (*Delete)(struct gl_renderbuffer *rb); + + + GLboolean (*AllocStorage)(struct gl_context *ctx, struct gl_renderbuffer *rb, + GLenum internalFormat, + GLuint width, GLuint height); +# 2456 "../../src/mesa/main/mtypes.h" + void *(*GetPointer)(struct gl_context *ctx, struct gl_renderbuffer *rb, + GLint x, GLint y); + + + + + void (*GetRow)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, + GLint x, GLint y, void *values); + + + + + void (*GetValues)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, + const GLint x[], const GLint y[], void *values); + + + + + void (*PutRow)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, + GLint x, GLint y, const void *values, const GLubyte *mask); + + + + + + + void (*PutRowRGB)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, + GLint x, GLint y, const void *values, const GLubyte *mask); + + + + + + void (*PutMonoRow)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, + GLint x, GLint y, const void *value, const GLubyte *mask); + + + + + void (*PutValues)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, + const GLint x[], const GLint y[], const void *values, + const GLubyte *mask); + + + + void (*PutMonoValues)(struct gl_context *ctx, struct gl_renderbuffer *rb, + GLuint count, const GLint x[], const GLint y[], + const void *value, const GLubyte *mask); +}; + + + + + + +struct gl_renderbuffer_attachment +{ + GLenum Type; + GLboolean Complete; + + + + + + struct gl_renderbuffer *Renderbuffer; + + + + + + struct gl_texture_object *Texture; + GLuint TextureLevel; + GLuint CubeMapFace; + GLuint Zoffset; + +}; + + + + + + + +struct gl_framebuffer +{ + _glthread_Mutex Mutex; + + + + + + + + GLuint Name; + + GLint RefCount; + GLboolean DeletePending; + + + + + + struct gl_config Visual; + + GLboolean Initialized; + + GLuint Width, Height; + + + + GLint _Xmin, _Xmax; + GLint _Ymin, _Ymax; + + + + + GLuint _DepthMax; + GLfloat _DepthMaxF; + GLfloat _MRD; + + + + GLenum _Status; + + + GLboolean _IntegerColor; + + + struct gl_renderbuffer_attachment Attachment[BUFFER_COUNT]; + + + + + GLenum ColorDrawBuffer[8]; + GLenum ColorReadBuffer; + + + GLuint _NumColorDrawBuffers; + GLint _ColorDrawBufferIndexes[8]; + GLint _ColorReadBufferIndex; + struct gl_renderbuffer *_ColorDrawBuffers[8]; + struct gl_renderbuffer *_ColorReadBuffer; + + + + struct gl_renderbuffer *_DepthBuffer; + struct gl_renderbuffer *_StencilBuffer; + + + void (*Delete)(struct gl_framebuffer *fb); +}; + + + + + +struct gl_precision +{ + GLushort RangeMin; + GLushort RangeMax; + GLushort Precision; +}; + + + + + +struct gl_program_constants +{ + + GLuint MaxInstructions; + GLuint MaxAluInstructions; + GLuint MaxTexInstructions; + GLuint MaxTexIndirections; + GLuint MaxAttribs; + GLuint MaxTemps; + GLuint MaxAddressRegs; + GLuint MaxAddressOffset; + GLuint MaxParameters; + GLuint MaxLocalParams; + GLuint MaxEnvParams; + + GLuint MaxNativeInstructions; + GLuint MaxNativeAluInstructions; + GLuint MaxNativeTexInstructions; + GLuint MaxNativeTexIndirections; + GLuint MaxNativeAttribs; + GLuint MaxNativeTemps; + GLuint MaxNativeAddressRegs; + GLuint MaxNativeParameters; + + GLuint MaxUniformComponents; + + struct gl_precision LowFloat, MediumFloat, HighFloat; + struct gl_precision LowInt, MediumInt, HighInt; +}; + + + + + + +struct gl_constants +{ + GLint MaxTextureMbytes; + GLint MaxTextureLevels; + GLint Max3DTextureLevels; + GLint MaxCubeTextureLevels; + GLint MaxArrayTextureLayers; + GLint MaxTextureRectSize; + GLuint MaxTextureCoordUnits; + GLuint MaxTextureImageUnits; + GLuint MaxVertexTextureImageUnits; + GLuint MaxCombinedTextureImageUnits; + GLuint MaxGeometryTextureImageUnits; + GLuint MaxTextureUnits; + GLfloat MaxTextureMaxAnisotropy; + GLfloat MaxTextureLodBias; + GLuint MaxTextureBufferSize; + + GLuint MaxArrayLockSize; + + GLint SubPixelBits; + + GLfloat MinPointSize, MaxPointSize; + GLfloat MinPointSizeAA, MaxPointSizeAA; + GLfloat PointSizeGranularity; + GLfloat MinLineWidth, MaxLineWidth; + GLfloat MinLineWidthAA, MaxLineWidthAA; + GLfloat LineWidthGranularity; + + GLuint MaxColorTableSize; + + GLuint MaxClipPlanes; + GLuint MaxLights; + GLfloat MaxShininess; + GLfloat MaxSpotExponent; + + GLuint MaxViewportWidth, MaxViewportHeight; + + struct gl_program_constants VertexProgram; + struct gl_program_constants FragmentProgram; + struct gl_program_constants GeometryProgram; + GLuint MaxProgramMatrices; + GLuint MaxProgramMatrixStackDepth; + + + GLboolean CheckArrayBounds; + + GLuint MaxDrawBuffers; + + GLuint MaxColorAttachments; + GLuint MaxRenderbufferSize; + GLuint MaxSamples; + + + GLuint MaxVarying; + GLuint MaxVertexVaryingComponents; + GLuint MaxGeometryVaryingComponents; + + + GLuint MaxGeometryOutputVertices; + GLuint MaxGeometryTotalOutputComponents; + + GLuint GLSLVersion; + + + GLbitfield SupportedBumpUnits; + + + + + GLuint64 MaxServerWaitTimeout; + + + GLboolean QuadsFollowProvokingVertexConvention; + + + GLbitfield ContextFlags; + + + GLbitfield ProfileMask; + + + GLuint MaxTransformFeedbackSeparateAttribs; + GLuint MaxTransformFeedbackSeparateComponents; + GLuint MaxTransformFeedbackInterleavedComponents; + + + GLint MinProgramTexelOffset, MaxProgramTexelOffset; + + + GLboolean sRGBCapable; + + + GLenum ResetStrategy; +}; + + + + + + +struct gl_extensions +{ + GLboolean dummy; + GLboolean dummy_true; + GLboolean dummy_false; + GLboolean ARB_ES2_compatibility; + GLboolean ARB_blend_func_extended; + GLboolean ARB_color_buffer_float; + GLboolean ARB_copy_buffer; + GLboolean ARB_depth_buffer_float; + GLboolean ARB_depth_clamp; + GLboolean ARB_depth_texture; + GLboolean ARB_draw_buffers; + GLboolean ARB_draw_buffers_blend; + GLboolean ARB_draw_elements_base_vertex; + GLboolean ARB_draw_instanced; + GLboolean ARB_fragment_coord_conventions; + GLboolean ARB_fragment_program; + GLboolean ARB_fragment_program_shadow; + GLboolean ARB_fragment_shader; + GLboolean ARB_framebuffer_object; + GLboolean ARB_explicit_attrib_location; + GLboolean ARB_geometry_shader4; + GLboolean ARB_half_float_pixel; + GLboolean ARB_half_float_vertex; + GLboolean ARB_instanced_arrays; + GLboolean ARB_map_buffer_range; + GLboolean ARB_multisample; + GLboolean ARB_multitexture; + GLboolean ARB_occlusion_query; + GLboolean ARB_occlusion_query2; + GLboolean ARB_point_sprite; + GLboolean ARB_sampler_objects; + GLboolean ARB_seamless_cube_map; + GLboolean ARB_shader_objects; + GLboolean ARB_shader_stencil_export; + GLboolean ARB_shader_texture_lod; + GLboolean ARB_shading_language_100; + GLboolean ARB_shadow; + GLboolean ARB_shadow_ambient; + GLboolean ARB_sync; + GLboolean ARB_texture_border_clamp; + GLboolean ARB_texture_buffer_object; + GLboolean ARB_texture_compression; + GLboolean ARB_texture_compression_rgtc; + GLboolean ARB_texture_cube_map; + GLboolean ARB_texture_env_combine; + GLboolean ARB_texture_env_crossbar; + GLboolean ARB_texture_env_dot3; + GLboolean ARB_texture_float; + GLboolean ARB_texture_mirrored_repeat; + GLboolean ARB_texture_multisample; + GLboolean ARB_texture_non_power_of_two; + GLboolean ARB_texture_rg; + GLboolean ARB_texture_rgb10_a2ui; + GLboolean ARB_timer_query; + GLboolean ARB_transform_feedback2; + GLboolean ARB_transpose_matrix; + GLboolean ARB_uniform_buffer_object; + GLboolean ARB_vertex_array_object; + GLboolean ARB_vertex_buffer_object; + GLboolean ARB_vertex_program; + GLboolean ARB_vertex_shader; + GLboolean ARB_vertex_type_2_10_10_10_rev; + GLboolean ARB_window_pos; + GLboolean EXT_abgr; + GLboolean EXT_bgra; + GLboolean EXT_blend_color; + GLboolean EXT_blend_equation_separate; + GLboolean EXT_blend_func_separate; + GLboolean EXT_blend_logic_op; + GLboolean EXT_blend_minmax; + GLboolean EXT_blend_subtract; + GLboolean EXT_clip_volume_hint; + GLboolean EXT_compiled_vertex_array; + GLboolean EXT_copy_texture; + GLboolean EXT_depth_bounds_test; + GLboolean EXT_draw_buffers2; + GLboolean EXT_draw_range_elements; + GLboolean EXT_fog_coord; + GLboolean EXT_framebuffer_blit; + GLboolean EXT_framebuffer_multisample; + GLboolean EXT_framebuffer_object; + GLboolean EXT_framebuffer_sRGB; + GLboolean EXT_gpu_program_parameters; + GLboolean EXT_gpu_shader4; + GLboolean EXT_multi_draw_arrays; + GLboolean EXT_paletted_texture; + GLboolean EXT_packed_depth_stencil; + GLboolean EXT_packed_float; + GLboolean EXT_packed_pixels; + GLboolean EXT_pixel_buffer_object; + GLboolean EXT_point_parameters; + GLboolean EXT_polygon_offset; + GLboolean EXT_provoking_vertex; + GLboolean EXT_rescale_normal; + GLboolean EXT_shadow_funcs; + GLboolean EXT_secondary_color; + GLboolean EXT_separate_shader_objects; + GLboolean EXT_separate_specular_color; + GLboolean EXT_shared_texture_palette; + GLboolean EXT_stencil_wrap; + GLboolean EXT_stencil_two_side; + GLboolean EXT_subtexture; + GLboolean EXT_texture; + GLboolean EXT_texture_object; + GLboolean EXT_texture3D; + GLboolean EXT_texture_array; + GLboolean EXT_texture_compression_latc; + GLboolean EXT_texture_compression_s3tc; + GLboolean EXT_texture_env_add; + GLboolean EXT_texture_env_combine; + GLboolean EXT_texture_env_dot3; + GLboolean EXT_texture_filter_anisotropic; + GLboolean EXT_texture_integer; + GLboolean EXT_texture_lod_bias; + GLboolean EXT_texture_mirror_clamp; + GLboolean EXT_texture_shared_exponent; + GLboolean EXT_texture_snorm; + GLboolean EXT_texture_sRGB; + GLboolean EXT_texture_sRGB_decode; + GLboolean EXT_texture_swizzle; + GLboolean EXT_transform_feedback; + GLboolean EXT_timer_query; + GLboolean EXT_vertex_array; + GLboolean EXT_vertex_array_bgra; + GLboolean EXT_vertex_array_set; + GLboolean OES_standard_derivatives; + + GLboolean AMD_conservative_depth; + GLboolean AMD_seamless_cubemap_per_texture; + GLboolean APPLE_client_storage; + GLboolean APPLE_packed_pixels; + GLboolean APPLE_vertex_array_object; + GLboolean APPLE_object_purgeable; + GLboolean ATI_envmap_bumpmap; + GLboolean ATI_texture_compression_3dc; + GLboolean ATI_texture_mirror_once; + GLboolean ATI_texture_env_combine3; + GLboolean ATI_fragment_shader; + GLboolean ATI_separate_stencil; + GLboolean IBM_rasterpos_clip; + GLboolean IBM_multimode_draw_arrays; + GLboolean MESA_pack_invert; + GLboolean MESA_resize_buffers; + GLboolean MESA_ycbcr_texture; + GLboolean MESA_texture_array; + GLboolean NV_blend_square; + GLboolean NV_conditional_render; + GLboolean NV_fragment_program; + GLboolean NV_fragment_program_option; + GLboolean NV_light_max_exponent; + GLboolean NV_point_sprite; + GLboolean NV_primitive_restart; + GLboolean NV_texture_barrier; + GLboolean NV_texgen_reflection; + GLboolean NV_texture_env_combine4; + GLboolean NV_texture_rectangle; + GLboolean NV_vertex_program; + GLboolean NV_vertex_program1_1; + GLboolean OES_read_format; + GLboolean SGIS_generate_mipmap; + GLboolean SGIS_texture_edge_clamp; + GLboolean SGIS_texture_lod; + GLboolean TDFX_texture_compression_FXT1; + GLboolean S3_s3tc; + GLboolean OES_EGL_image; + GLboolean OES_draw_texture; + GLboolean EXT_texture_format_BGRA8888; + GLboolean extension_sentinel; + + const GLubyte *String; + + GLuint Count; +}; + + + + + +struct gl_matrix_stack +{ + GLmatrix *Top; + GLmatrix *Stack; + GLuint Depth; + GLuint MaxDepth; + GLuint DirtyFlag; +}; +# 3094 "../../src/mesa/main/mtypes.h" +# 1 "../../src/mesa/main/dd.h" 1 +# 38 "../../src/mesa/main/dd.h" +struct gl_buffer_object; +struct gl_context; +struct gl_display_list; +struct gl_framebuffer; +struct gl_pixelstore_attrib; +struct gl_program; +struct gl_renderbuffer; +struct gl_renderbuffer_attachment; +struct gl_shader; +struct gl_shader_program; +struct gl_texture_image; +struct gl_texture_object; +# 79 "../../src/mesa/main/dd.h" +struct dd_function_table { + + + + + + const GLubyte * (*GetString)( struct gl_context *ctx, GLenum name ); + + + + + + + + void (*UpdateState)( struct gl_context *ctx, GLbitfield new_state ); + + + + + + + + void (*GetBufferSize)( struct gl_framebuffer *buffer, + GLuint *width, GLuint *height ); + + + + + + void (*ResizeBuffers)( struct gl_context *ctx, struct gl_framebuffer *fb, + GLuint width, GLuint height); + + + + + + void (*Error)( struct gl_context *ctx ); + + + + + void (*Finish)( struct gl_context *ctx ); + + + + + void (*Flush)( struct gl_context *ctx ); + + + + + + + void (*Clear)( struct gl_context *ctx, GLbitfield buffers ); + + + + + void (*Accum)( struct gl_context *ctx, GLenum op, GLfloat value ); + + + + + + void (*RasterPos)( struct gl_context *ctx, const GLfloat v[4] ); +# 154 "../../src/mesa/main/dd.h" + void (*DrawPixels)( struct gl_context *ctx, + GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *unpack, + const GLvoid *pixels ); + + + + + void (*ReadPixels)( struct gl_context *ctx, + GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *unpack, + GLvoid *dest ); + + + + + void (*CopyPixels)( struct gl_context *ctx, GLint srcx, GLint srcy, + GLsizei width, GLsizei height, + GLint dstx, GLint dsty, GLenum type ); + + + + + void (*Bitmap)( struct gl_context *ctx, + GLint x, GLint y, GLsizei width, GLsizei height, + const struct gl_pixelstore_attrib *unpack, + const GLubyte *bitmap ); +# 198 "../../src/mesa/main/dd.h" + GLuint (*ChooseTextureFormat)( struct gl_context *ctx, GLint internalFormat, + GLenum srcFormat, GLenum srcType ); +# 218 "../../src/mesa/main/dd.h" + void (*TexImage1D)( struct gl_context *ctx, GLenum target, GLint level, + GLint internalFormat, + GLint width, GLint border, + GLenum format, GLenum type, const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + + + + + + + void (*TexImage2D)( struct gl_context *ctx, GLenum target, GLint level, + GLint internalFormat, + GLint width, GLint height, GLint border, + GLenum format, GLenum type, const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + + + + + + + void (*TexImage3D)( struct gl_context *ctx, GLenum target, GLint level, + GLint internalFormat, + GLint width, GLint height, GLint depth, GLint border, + GLenum format, GLenum type, const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); +# 273 "../../src/mesa/main/dd.h" + void (*TexSubImage1D)( struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, GLsizei width, + GLenum format, GLenum type, + const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + + + + + + + void (*TexSubImage2D)( struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + + + + + + + void (*TexSubImage3D)( struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, GLint depth, + GLenum format, GLenum type, + const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + + + + + void (*GetTexImage)( struct gl_context *ctx, GLenum target, GLint level, + GLenum format, GLenum type, GLvoid *pixels, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + + + + + + + void (*CopyTexImage1D)( struct gl_context *ctx, GLenum target, GLint level, + GLenum internalFormat, GLint x, GLint y, + GLsizei width, GLint border ); + + + + + + + void (*CopyTexImage2D)( struct gl_context *ctx, GLenum target, GLint level, + GLenum internalFormat, GLint x, GLint y, + GLsizei width, GLsizei height, GLint border ); + + + + + + + void (*CopyTexSubImage1D)( struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, + GLint x, GLint y, GLsizei width ); + + + + + + void (*CopyTexSubImage2D)( struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint x, GLint y, + GLsizei width, GLsizei height ); + + + + + + void (*CopyTexSubImage3D)( struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, + GLint x, GLint y, + GLsizei width, GLsizei height ); + + + + + void (*GenerateMipmap)(struct gl_context *ctx, GLenum target, + struct gl_texture_object *texObj); + + + + + + + + GLboolean (*TestProxyTexImage)(struct gl_context *ctx, GLenum target, + GLint level, GLint internalFormat, + GLenum format, GLenum type, + GLint width, GLint height, + GLint depth, GLint border); +# 402 "../../src/mesa/main/dd.h" + void (*CompressedTexImage1D)( struct gl_context *ctx, GLenum target, + GLint level, GLint internalFormat, + GLsizei width, GLint border, + GLsizei imageSize, const GLvoid *data, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + + + + + + void (*CompressedTexImage2D)( struct gl_context *ctx, GLenum target, + GLint level, GLint internalFormat, + GLsizei width, GLsizei height, GLint border, + GLsizei imageSize, const GLvoid *data, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + + + + + + void (*CompressedTexImage3D)( struct gl_context *ctx, GLenum target, + GLint level, GLint internalFormat, + GLsizei width, GLsizei height, GLsizei depth, + GLint border, + GLsizei imageSize, const GLvoid *data, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); +# 449 "../../src/mesa/main/dd.h" + void (*CompressedTexSubImage1D)(struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, GLsizei width, + GLenum format, + GLsizei imageSize, const GLvoid *data, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage); + + + + + + void (*CompressedTexSubImage2D)(struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLint height, + GLenum format, + GLsizei imageSize, const GLvoid *data, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage); + + + + + + void (*CompressedTexSubImage3D)(struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLint height, GLint depth, + GLenum format, + GLsizei imageSize, const GLvoid *data, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage); + + + + + + void (*GetCompressedTexImage)(struct gl_context *ctx, GLenum target, GLint level, + GLvoid *img, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage); +# 499 "../../src/mesa/main/dd.h" + void (*BindTexture)( struct gl_context *ctx, GLenum target, + struct gl_texture_object *tObj ); + + + + + + + struct gl_texture_object * (*NewTextureObject)( struct gl_context *ctx, GLuint name, + GLenum target ); + + + + + + + void (*DeleteTexture)( struct gl_context *ctx, struct gl_texture_object *tObj ); + + + + + struct gl_texture_image * (*NewTextureImage)( struct gl_context *ctx ); + + + + + void (*FreeTexImageData)( struct gl_context *ctx, struct gl_texture_image *tImage ); + + + void (*MapTexture)( struct gl_context *ctx, struct gl_texture_object *tObj ); + + void (*UnmapTexture)( struct gl_context *ctx, struct gl_texture_object *tObj ); +# 543 "../../src/mesa/main/dd.h" + void* (*TextureMemCpy)( void *to, const void *from, size_t sz ); + + + + + GLboolean (*IsTextureResident)( struct gl_context *ctx, + struct gl_texture_object *t ); + + + + + + + + void (*UpdateTexturePalette)( struct gl_context *ctx, + struct gl_texture_object *tObj ); + + + + + + + + void (*CopyColorTable)( struct gl_context *ctx, + GLenum target, GLenum internalformat, + GLint x, GLint y, GLsizei width ); + + void (*CopyColorSubTable)( struct gl_context *ctx, + GLenum target, GLsizei start, + GLint x, GLint y, GLsizei width ); +# 581 "../../src/mesa/main/dd.h" + void (*BindProgram)(struct gl_context *ctx, GLenum target, struct gl_program *prog); + + struct gl_program * (*NewProgram)(struct gl_context *ctx, GLenum target, GLuint id); + + void (*DeleteProgram)(struct gl_context *ctx, struct gl_program *prog); + + + + + + GLboolean (*ProgramStringNotify)(struct gl_context *ctx, GLenum target, + struct gl_program *prog); + + + GLboolean (*IsProgramNative)(struct gl_context *ctx, GLenum target, + struct gl_program *prog); +# 610 "../../src/mesa/main/dd.h" + GLboolean (*LinkShader)(struct gl_context *ctx, struct gl_shader_program *shader); +# 624 "../../src/mesa/main/dd.h" + void (*AlphaFunc)(struct gl_context *ctx, GLenum func, GLfloat ref); + + void (*BlendColor)(struct gl_context *ctx, const GLfloat color[4]); + + void (*BlendEquationSeparate)(struct gl_context *ctx, GLenum modeRGB, GLenum modeA); + void (*BlendEquationSeparatei)(struct gl_context *ctx, GLuint buffer, + GLenum modeRGB, GLenum modeA); + + void (*BlendFuncSeparate)(struct gl_context *ctx, + GLenum sfactorRGB, GLenum dfactorRGB, + GLenum sfactorA, GLenum dfactorA); + void (*BlendFuncSeparatei)(struct gl_context *ctx, GLuint buffer, + GLenum sfactorRGB, GLenum dfactorRGB, + GLenum sfactorA, GLenum dfactorA); + + void (*ClearColor)(struct gl_context *ctx, const GLfloat color[4]); + + void (*ClearDepth)(struct gl_context *ctx, GLclampd d); + + void (*ClearStencil)(struct gl_context *ctx, GLint s); + + void (*ClipPlane)(struct gl_context *ctx, GLenum plane, const GLfloat *equation ); + + void (*ColorMask)(struct gl_context *ctx, GLboolean rmask, GLboolean gmask, + GLboolean bmask, GLboolean amask ); + void (*ColorMaskIndexed)(struct gl_context *ctx, GLuint buf, GLboolean rmask, + GLboolean gmask, GLboolean bmask, GLboolean amask); + + void (*ColorMaterial)(struct gl_context *ctx, GLenum face, GLenum mode); + + void (*CullFace)(struct gl_context *ctx, GLenum mode); + + void (*FrontFace)(struct gl_context *ctx, GLenum mode); + + void (*DepthFunc)(struct gl_context *ctx, GLenum func); + + void (*DepthMask)(struct gl_context *ctx, GLboolean flag); + + void (*DepthRange)(struct gl_context *ctx, GLclampd nearval, GLclampd farval); + + void (*DrawBuffer)( struct gl_context *ctx, GLenum buffer ); + + void (*DrawBuffers)( struct gl_context *ctx, GLsizei n, const GLenum *buffers ); + + void (*Enable)(struct gl_context *ctx, GLenum cap, GLboolean state); + + void (*Fogfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params); + + void (*Hint)(struct gl_context *ctx, GLenum target, GLenum mode); + + + + + void (*Lightfv)(struct gl_context *ctx, GLenum light, + GLenum pname, const GLfloat *params ); + + void (*LightModelfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params); + + void (*LineStipple)(struct gl_context *ctx, GLint factor, GLushort pattern ); + + void (*LineWidth)(struct gl_context *ctx, GLfloat width); + + void (*LogicOpcode)(struct gl_context *ctx, GLenum opcode); + void (*PointParameterfv)(struct gl_context *ctx, GLenum pname, + const GLfloat *params); + + void (*PointSize)(struct gl_context *ctx, GLfloat size); + + void (*PolygonMode)(struct gl_context *ctx, GLenum face, GLenum mode); + + void (*PolygonOffset)(struct gl_context *ctx, GLfloat factor, GLfloat units); + + void (*PolygonStipple)(struct gl_context *ctx, const GLubyte *mask ); + + void (*ReadBuffer)( struct gl_context *ctx, GLenum buffer ); + + void (*RenderMode)(struct gl_context *ctx, GLenum mode ); + + void (*Scissor)(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h); + + void (*ShadeModel)(struct gl_context *ctx, GLenum mode); + + void (*StencilFuncSeparate)(struct gl_context *ctx, GLenum face, GLenum func, + GLint ref, GLuint mask); + + void (*StencilMaskSeparate)(struct gl_context *ctx, GLenum face, GLuint mask); + + void (*StencilOpSeparate)(struct gl_context *ctx, GLenum face, GLenum fail, + GLenum zfail, GLenum zpass); + + void (*TexGen)(struct gl_context *ctx, GLenum coord, GLenum pname, + const GLfloat *params); + + void (*TexEnv)(struct gl_context *ctx, GLenum target, GLenum pname, + const GLfloat *param); + + void (*TexParameter)(struct gl_context *ctx, GLenum target, + struct gl_texture_object *texObj, + GLenum pname, const GLfloat *params); + + void (*Viewport)(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h); + + + + + + + + void (*BindBuffer)( struct gl_context *ctx, GLenum target, + struct gl_buffer_object *obj ); + + struct gl_buffer_object * (*NewBufferObject)( struct gl_context *ctx, GLuint buffer, + GLenum target ); + + void (*DeleteBuffer)( struct gl_context *ctx, struct gl_buffer_object *obj ); + + GLboolean (*BufferData)( struct gl_context *ctx, GLenum target, GLsizeiptrARB size, + const GLvoid *data, GLenum usage, + struct gl_buffer_object *obj ); + + void (*BufferSubData)( struct gl_context *ctx, GLenum target, GLintptrARB offset, + GLsizeiptrARB size, const GLvoid *data, + struct gl_buffer_object *obj ); + + void (*GetBufferSubData)( struct gl_context *ctx, GLenum target, + GLintptrARB offset, GLsizeiptrARB size, + GLvoid *data, struct gl_buffer_object *obj ); + + void * (*MapBuffer)( struct gl_context *ctx, GLenum target, GLenum access, + struct gl_buffer_object *obj ); + + void (*CopyBufferSubData)( struct gl_context *ctx, + struct gl_buffer_object *src, + struct gl_buffer_object *dst, + GLintptr readOffset, GLintptr writeOffset, + GLsizeiptr size ); + + + + void * (*MapBufferRange)( struct gl_context *ctx, GLenum target, GLintptr offset, + GLsizeiptr length, GLbitfield access, + struct gl_buffer_object *obj); + + void (*FlushMappedBufferRange)(struct gl_context *ctx, GLenum target, + GLintptr offset, GLsizeiptr length, + struct gl_buffer_object *obj); + + GLboolean (*UnmapBuffer)( struct gl_context *ctx, GLenum target, + struct gl_buffer_object *obj ); + + + + + + + + GLenum (*BufferObjectPurgeable)( struct gl_context *ctx, struct gl_buffer_object *obj, GLenum option ); + GLenum (*RenderObjectPurgeable)( struct gl_context *ctx, struct gl_renderbuffer *obj, GLenum option ); + GLenum (*TextureObjectPurgeable)( struct gl_context *ctx, struct gl_texture_object *obj, GLenum option ); + + + GLenum (*BufferObjectUnpurgeable)( struct gl_context *ctx, struct gl_buffer_object *obj, GLenum option ); + GLenum (*RenderObjectUnpurgeable)( struct gl_context *ctx, struct gl_renderbuffer *obj, GLenum option ); + GLenum (*TextureObjectUnpurgeable)( struct gl_context *ctx, struct gl_texture_object *obj, GLenum option ); + + + + + + + struct gl_framebuffer * (*NewFramebuffer)(struct gl_context *ctx, GLuint name); + struct gl_renderbuffer * (*NewRenderbuffer)(struct gl_context *ctx, GLuint name); + void (*BindFramebuffer)(struct gl_context *ctx, GLenum target, + struct gl_framebuffer *drawFb, + struct gl_framebuffer *readFb); + void (*FramebufferRenderbuffer)(struct gl_context *ctx, + struct gl_framebuffer *fb, + GLenum attachment, + struct gl_renderbuffer *rb); + void (*RenderTexture)(struct gl_context *ctx, + struct gl_framebuffer *fb, + struct gl_renderbuffer_attachment *att); + void (*FinishRenderTexture)(struct gl_context *ctx, + struct gl_renderbuffer_attachment *att); + void (*ValidateFramebuffer)(struct gl_context *ctx, + struct gl_framebuffer *fb); + + void (*BlitFramebuffer)(struct gl_context *ctx, + GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, + GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, + GLbitfield mask, GLenum filter); + + + + + + struct gl_query_object * (*NewQueryObject)(struct gl_context *ctx, GLuint id); + void (*DeleteQuery)(struct gl_context *ctx, struct gl_query_object *q); + void (*BeginQuery)(struct gl_context *ctx, struct gl_query_object *q); + void (*EndQuery)(struct gl_context *ctx, struct gl_query_object *q); + void (*CheckQuery)(struct gl_context *ctx, struct gl_query_object *q); + void (*WaitQuery)(struct gl_context *ctx, struct gl_query_object *q); + + + + + + + + struct gl_array_object * (*NewArrayObject)(struct gl_context *ctx, GLuint id); + void (*DeleteArrayObject)(struct gl_context *ctx, struct gl_array_object *obj); + void (*BindArrayObject)(struct gl_context *ctx, struct gl_array_object *obj); + + + + + + + struct gl_shader *(*NewShader)(struct gl_context *ctx, GLuint name, GLenum type); + void (*DeleteShader)(struct gl_context *ctx, struct gl_shader *shader); + struct gl_shader_program *(*NewShaderProgram)(struct gl_context *ctx, GLuint name); + void (*DeleteShaderProgram)(struct gl_context *ctx, + struct gl_shader_program *shProg); + void (*UseProgram)(struct gl_context *ctx, struct gl_shader_program *shProg); +# 860 "../../src/mesa/main/dd.h" + GLuint NeedValidate; +# 873 "../../src/mesa/main/dd.h" + void (*ValidateTnlModule)( struct gl_context *ctx, GLuint new_state ); + + + + + + + GLuint CurrentExecPrimitive; + + + + + + + + GLuint CurrentSavePrimitive; +# 901 "../../src/mesa/main/dd.h" + GLuint NeedFlush; + GLuint SaveNeedFlush; + + + + + + void (*BeginVertices)( struct gl_context *ctx ); +# 919 "../../src/mesa/main/dd.h" + void (*FlushVertices)( struct gl_context *ctx, GLuint flags ); + void (*SaveFlushVertices)( struct gl_context *ctx ); + + + + + + + GLboolean (*NotifySaveBegin)( struct gl_context *ctx, GLenum mode ); + + + + + + void (*LightingSpaceChange)( struct gl_context *ctx ); + + + + + + + + void (*NewList)( struct gl_context *ctx, GLuint list, GLenum mode ); + + + + + + void (*EndList)( struct gl_context *ctx ); + + + + + + + void (*BeginCallList)( struct gl_context *ctx, + struct gl_display_list *dlist ); + + + + + + void (*EndCallList)( struct gl_context *ctx ); + + + + + + + struct gl_sync_object * (*NewSyncObject)(struct gl_context *, GLenum); + void (*FenceSync)(struct gl_context *, struct gl_sync_object *, GLenum, GLbitfield); + void (*DeleteSyncObject)(struct gl_context *, struct gl_sync_object *); + void (*CheckSync)(struct gl_context *, struct gl_sync_object *); + void (*ClientWaitSync)(struct gl_context *, struct gl_sync_object *, + GLbitfield, GLuint64); + void (*ServerWaitSync)(struct gl_context *, struct gl_sync_object *, + GLbitfield, GLuint64); + + + + void (*BeginConditionalRender)(struct gl_context *ctx, struct gl_query_object *q, + GLenum mode); + void (*EndConditionalRender)(struct gl_context *ctx, struct gl_query_object *q); + + + + + + void (*DrawTex)(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z, + GLfloat width, GLfloat height); + + + + + + void (*EGLImageTargetTexture2D)(struct gl_context *ctx, GLenum target, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage, + GLeglImageOES image_handle); + void (*EGLImageTargetRenderbufferStorage)(struct gl_context *ctx, + struct gl_renderbuffer *rb, + void *image_handle); + + + + + struct gl_transform_feedback_object * + (*NewTransformFeedback)(struct gl_context *ctx, GLuint name); + void (*DeleteTransformFeedback)(struct gl_context *ctx, + struct gl_transform_feedback_object *obj); + void (*BeginTransformFeedback)(struct gl_context *ctx, GLenum mode, + struct gl_transform_feedback_object *obj); + void (*EndTransformFeedback)(struct gl_context *ctx, + struct gl_transform_feedback_object *obj); + void (*PauseTransformFeedback)(struct gl_context *ctx, + struct gl_transform_feedback_object *obj); + void (*ResumeTransformFeedback)(struct gl_context *ctx, + struct gl_transform_feedback_object *obj); + void (*DrawTransformFeedback)(struct gl_context *ctx, GLenum mode, + struct gl_transform_feedback_object *obj); + + + + + void (*TextureBarrier)(struct gl_context *ctx); + + + + + struct gl_sampler_object * (*NewSamplerObject)(struct gl_context *ctx, + GLuint name); + void (*DeleteSamplerObject)(struct gl_context *ctx, + struct gl_sampler_object *samp); +}; +# 1053 "../../src/mesa/main/dd.h" +typedef struct { + + + + + void ( * ArrayElement)( GLint ); + void ( * Color3f)( GLfloat, GLfloat, GLfloat ); + void ( * Color3fv)( const GLfloat * ); + void ( * Color4f)( GLfloat, GLfloat, GLfloat, GLfloat ); + void ( * Color4fv)( const GLfloat * ); + void ( * EdgeFlag)( GLboolean ); + void ( * EvalCoord1f)( GLfloat ); + void ( * EvalCoord1fv)( const GLfloat * ); + void ( * EvalCoord2f)( GLfloat, GLfloat ); + void ( * EvalCoord2fv)( const GLfloat * ); + void ( * EvalPoint1)( GLint ); + void ( * EvalPoint2)( GLint, GLint ); + void ( * FogCoordfEXT)( GLfloat ); + void ( * FogCoordfvEXT)( const GLfloat * ); + void ( * Indexf)( GLfloat ); + void ( * Indexfv)( const GLfloat * ); + void ( * Materialfv)( GLenum face, GLenum pname, const GLfloat * ); + void ( * MultiTexCoord1fARB)( GLenum, GLfloat ); + void ( * MultiTexCoord1fvARB)( GLenum, const GLfloat * ); + void ( * MultiTexCoord2fARB)( GLenum, GLfloat, GLfloat ); + void ( * MultiTexCoord2fvARB)( GLenum, const GLfloat * ); + void ( * MultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat ); + void ( * MultiTexCoord3fvARB)( GLenum, const GLfloat * ); + void ( * MultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat ); + void ( * MultiTexCoord4fvARB)( GLenum, const GLfloat * ); + void ( * Normal3f)( GLfloat, GLfloat, GLfloat ); + void ( * Normal3fv)( const GLfloat * ); + void ( * SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat ); + void ( * SecondaryColor3fvEXT)( const GLfloat * ); + void ( * TexCoord1f)( GLfloat ); + void ( * TexCoord1fv)( const GLfloat * ); + void ( * TexCoord2f)( GLfloat, GLfloat ); + void ( * TexCoord2fv)( const GLfloat * ); + void ( * TexCoord3f)( GLfloat, GLfloat, GLfloat ); + void ( * TexCoord3fv)( const GLfloat * ); + void ( * TexCoord4f)( GLfloat, GLfloat, GLfloat, GLfloat ); + void ( * TexCoord4fv)( const GLfloat * ); + void ( * Vertex2f)( GLfloat, GLfloat ); + void ( * Vertex2fv)( const GLfloat * ); + void ( * Vertex3f)( GLfloat, GLfloat, GLfloat ); + void ( * Vertex3fv)( const GLfloat * ); + void ( * Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat ); + void ( * Vertex4fv)( const GLfloat * ); + void ( * CallList)( GLuint ); + void ( * CallLists)( GLsizei, GLenum, const GLvoid * ); + void ( * Begin)( GLenum ); + void ( * End)( void ); + void ( * PrimitiveRestartNV)( void ); + + void ( * VertexAttrib1fNV)( GLuint index, GLfloat x ); + void ( * VertexAttrib1fvNV)( GLuint index, const GLfloat *v ); + void ( * VertexAttrib2fNV)( GLuint index, GLfloat x, GLfloat y ); + void ( * VertexAttrib2fvNV)( GLuint index, const GLfloat *v ); + void ( * VertexAttrib3fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z ); + void ( * VertexAttrib3fvNV)( GLuint index, const GLfloat *v ); + void ( * VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); + void ( * VertexAttrib4fvNV)( GLuint index, const GLfloat *v ); + + void ( * VertexAttrib1fARB)( GLuint index, GLfloat x ); + void ( * VertexAttrib1fvARB)( GLuint index, const GLfloat *v ); + void ( * VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y ); + void ( * VertexAttrib2fvARB)( GLuint index, const GLfloat *v ); + void ( * VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z ); + void ( * VertexAttrib3fvARB)( GLuint index, const GLfloat *v ); + void ( * VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); + void ( * VertexAttrib4fvARB)( GLuint index, const GLfloat *v ); + + + void ( * VertexAttribI1i)( GLuint index, GLint x); + void ( * VertexAttribI2i)( GLuint index, GLint x, GLint y); + void ( * VertexAttribI3i)( GLuint index, GLint x, GLint y, GLint z); + void ( * VertexAttribI4i)( GLuint index, GLint x, GLint y, GLint z, GLint w); + void ( * VertexAttribI2iv)( GLuint index, const GLint *v); + void ( * VertexAttribI3iv)( GLuint index, const GLint *v); + void ( * VertexAttribI4iv)( GLuint index, const GLint *v); + + void ( * VertexAttribI1ui)( GLuint index, GLuint x); + void ( * VertexAttribI2ui)( GLuint index, GLuint x, GLuint y); + void ( * VertexAttribI3ui)( GLuint index, GLuint x, GLuint y, GLuint z); + void ( * VertexAttribI4ui)( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); + void ( * VertexAttribI2uiv)( GLuint index, const GLuint *v); + void ( * VertexAttribI3uiv)( GLuint index, const GLuint *v); + void ( * VertexAttribI4uiv)( GLuint index, const GLuint *v); + + + + void ( * Rectf)( GLfloat, GLfloat, GLfloat, GLfloat ); + + + + + + void ( * DrawArrays)( GLenum mode, GLint start, GLsizei count ); + void ( * DrawElements)( GLenum mode, GLsizei count, GLenum type, + const GLvoid *indices ); + void ( * DrawRangeElements)( GLenum mode, GLuint start, + GLuint end, GLsizei count, + GLenum type, const GLvoid *indices ); + void ( * MultiDrawElementsEXT)( GLenum mode, const GLsizei *count, + GLenum type, + const GLvoid **indices, + GLsizei primcount); + void ( * DrawElementsBaseVertex)( GLenum mode, GLsizei count, + GLenum type, + const GLvoid *indices, + GLint basevertex ); + void ( * DrawRangeElementsBaseVertex)( GLenum mode, GLuint start, + GLuint end, GLsizei count, + GLenum type, + const GLvoid *indices, + GLint basevertex); + void ( * MultiDrawElementsBaseVertex)( GLenum mode, + const GLsizei *count, + GLenum type, + const GLvoid **indices, + GLsizei primcount, + const GLint *basevertex); + void ( * DrawArraysInstanced)(GLenum mode, GLint first, + GLsizei count, GLsizei primcount); + void ( * DrawElementsInstanced)(GLenum mode, GLsizei count, + GLenum type, const GLvoid *indices, + GLsizei primcount); + void ( * DrawElementsInstancedBaseVertex)(GLenum mode, GLsizei count, + GLenum type, const GLvoid *indices, + GLsizei primcount, GLint basevertex); +# 1196 "../../src/mesa/main/dd.h" + void ( * EvalMesh1)( GLenum mode, GLint i1, GLint i2 ); + void ( * EvalMesh2)( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ); + + +} GLvertexformat; +# 3095 "../../src/mesa/main/mtypes.h" 2 +# 3107 "../../src/mesa/main/mtypes.h" +union gl_dlist_node; + + + + + + + +struct gl_display_list +{ + GLuint Name; + GLbitfield Flags; + + union gl_dlist_node *Head; +}; + + + + + +struct gl_dlist_state +{ + GLuint CallDepth; + + struct gl_display_list *CurrentList; + union gl_dlist_node *CurrentBlock; + GLuint CurrentPos; + + GLvertexformat ListVtxfmt; + + GLubyte ActiveAttribSize[VERT_ATTRIB_MAX]; + GLfloat CurrentAttrib[VERT_ATTRIB_MAX][4]; + + GLubyte ActiveMaterialSize[12]; + GLfloat CurrentMaterial[12][4]; + + GLubyte ActiveIndex; + GLfloat CurrentIndex; + + GLubyte ActiveEdgeFlag; + GLboolean CurrentEdgeFlag; + + struct { + + + + GLenum ShadeModel; + } Current; +}; + + + + + +typedef enum +{ + API_OPENGL, + API_OPENGLES, + API_OPENGLES2 +} gl_api; +# 3179 "../../src/mesa/main/mtypes.h" +struct gl_context +{ + + struct gl_shared_state *Shared; + + + + gl_api API; + struct _glapi_table *Save; + struct _glapi_table *Exec; + struct _glapi_table *CurrentDispatch; + + + struct gl_config Visual; + struct gl_framebuffer *DrawBuffer; + struct gl_framebuffer *ReadBuffer; + struct gl_framebuffer *WinSysDrawBuffer; + struct gl_framebuffer *WinSysReadBuffer; + + + + + struct dd_function_table Driver; + + void *DriverCtx; + + + struct gl_constants Const; + + + + struct gl_matrix_stack ModelviewMatrixStack; + struct gl_matrix_stack ProjectionMatrixStack; + struct gl_matrix_stack TextureMatrixStack[((8 > 16) ? 8 : 16)]; + struct gl_matrix_stack ProgramMatrixStack[8]; + struct gl_matrix_stack *CurrentStack; + + + + GLmatrix _ModelProjectMatrix; + + + struct gl_dlist_state ListState; + + GLboolean ExecuteFlag; + GLboolean CompileFlag; + + + struct gl_extensions Extensions; + + + GLuint VersionMajor, VersionMinor; + char *VersionString; + + + + GLuint AttribStackDepth; + struct gl_attrib_node *AttribStack[16]; +# 3245 "../../src/mesa/main/mtypes.h" + struct gl_accum_attrib Accum; + struct gl_colorbuffer_attrib Color; + struct gl_current_attrib Current; + struct gl_depthbuffer_attrib Depth; + struct gl_eval_attrib Eval; + struct gl_fog_attrib Fog; + struct gl_hint_attrib Hint; + struct gl_light_attrib Light; + struct gl_line_attrib Line; + struct gl_list_attrib List; + struct gl_multisample_attrib Multisample; + struct gl_pixel_attrib Pixel; + struct gl_point_attrib Point; + struct gl_polygon_attrib Polygon; + GLuint PolygonStipple[32]; + struct gl_scissor_attrib Scissor; + struct gl_stencil_attrib Stencil; + struct gl_texture_attrib Texture; + struct gl_transform_attrib Transform; + struct gl_viewport_attrib Viewport; + + + + + GLuint ClientAttribStackDepth; + struct gl_attrib_node *ClientAttribStack[16]; + + + + + struct gl_array_attrib Array; + struct gl_pixelstore_attrib Pack; + struct gl_pixelstore_attrib Unpack; + struct gl_pixelstore_attrib DefaultPacking; + + + + + struct gl_pixelmaps PixelMaps; + + struct gl_evaluators EvalMap; + struct gl_feedback Feedback; + struct gl_selection Select; + + struct gl_program_state Program; + struct gl_vertex_program_state VertexProgram; + struct gl_fragment_program_state FragmentProgram; + struct gl_geometry_program_state GeometryProgram; + struct gl_ati_fragment_shader_state ATIFragmentShader; + + struct gl_shader_state Shader; + struct gl_shader_compiler_options ShaderCompilerOptions[MESA_SHADER_TYPES]; + + struct gl_query_state Query; + + struct gl_transform_feedback TransformFeedback; + + struct gl_buffer_object *CopyReadBuffer; + struct gl_buffer_object *CopyWriteBuffer; + + + struct gl_meta_state *Meta; + + + struct gl_renderbuffer *CurrentRenderbuffer; + + GLenum ErrorValue; + + + GLenum ResetStatus; + + + + + const char *ErrorDebugFmtString; + GLuint ErrorDebugCount; + + GLenum RenderMode; + GLbitfield NewState; + + GLboolean ViewportInitialized; + + GLbitfield varying_vp_inputs; + + + + + + + GLbitfield _TriangleCaps; + GLbitfield _ImageTransferState; + GLfloat _EyeZDir[3]; + GLfloat _ModelViewInvScale; + GLboolean _NeedEyeCoords; + GLboolean _ForceEyeCoords; + + GLuint TextureStateTimestamp; + + struct gl_shine_tab *_ShineTable[2]; + struct gl_shine_tab *_ShineTabList; + + + struct gl_list_extensions *ListExt; + + + + GLboolean FirstTimeCurrent; + + + + GLboolean Mesa_DXTn; + + GLboolean TextureFormatSupported[MESA_FORMAT_COUNT]; + + + + + + GLboolean mvp_with_dp4; + + + + + + + + void *swrast_context; + void *swsetup_context; + void *swtnl_context; + void *swtnl_im; + struct st_context *st; + void *aelt_context; + +}; +# 3396 "../../src/mesa/main/mtypes.h" +enum _verbose +{ + VERBOSE_VARRAY = 0x0001, + VERBOSE_TEXTURE = 0x0002, + VERBOSE_MATERIAL = 0x0004, + VERBOSE_PIPELINE = 0x0008, + VERBOSE_DRIVER = 0x0010, + VERBOSE_STATE = 0x0020, + VERBOSE_API = 0x0040, + VERBOSE_DISPLAY_LIST = 0x0100, + VERBOSE_LIGHTING = 0x0200, + VERBOSE_PRIMS = 0x0400, + VERBOSE_VERTS = 0x0800, + VERBOSE_DISASSEM = 0x1000, + VERBOSE_DRAW = 0x2000, + VERBOSE_SWAPBUFFERS = 0x4000 +}; + + + +enum _debug +{ + DEBUG_ALWAYS_FLUSH = 0x1 +}; +# 54 "../../src/mesa/main/context.h" 2 + + +struct _glapi_table; + + + + + +extern struct gl_config * +_mesa_create_visual( GLboolean dbFlag, + GLboolean stereoFlag, + GLint redBits, + GLint greenBits, + GLint blueBits, + GLint alphaBits, + GLint depthBits, + GLint stencilBits, + GLint accumRedBits, + GLint accumGreenBits, + GLint accumBlueBits, + GLint accumAlphaBits, + GLint numSamples ); + +extern GLboolean +_mesa_initialize_visual( struct gl_config *v, + GLboolean dbFlag, + GLboolean stereoFlag, + GLint redBits, + GLint greenBits, + GLint blueBits, + GLint alphaBits, + GLint depthBits, + GLint stencilBits, + GLint accumRedBits, + GLint accumGreenBits, + GLint accumBlueBits, + GLint accumAlphaBits, + GLint numSamples ); + +extern void +_mesa_destroy_visual( struct gl_config *vis ); + + + + + + + +extern GLboolean +_mesa_initialize_context( struct gl_context *ctx, + gl_api api, + const struct gl_config *visual, + struct gl_context *share_list, + const struct dd_function_table *driverFunctions, + void *driverContext ); + +extern struct gl_context * +_mesa_create_context(gl_api api, + const struct gl_config *visual, + struct gl_context *share_list, + const struct dd_function_table *driverFunctions, + void *driverContext); + +extern void +_mesa_free_context_data( struct gl_context *ctx ); + +extern void +_mesa_destroy_context( struct gl_context *ctx ); + + +extern void +_mesa_copy_context(const struct gl_context *src, struct gl_context *dst, GLuint mask); + + +extern void +_mesa_check_init_viewport(struct gl_context *ctx, GLuint width, GLuint height); + +extern GLboolean +_mesa_make_current( struct gl_context *ctx, struct gl_framebuffer *drawBuffer, + struct gl_framebuffer *readBuffer ); + +extern GLboolean +_mesa_share_state(struct gl_context *ctx, struct gl_context *ctxToShare); + +extern struct gl_context * +_mesa_get_current_context(void); + + + +extern void +_mesa_init_get_hash(struct gl_context *ctx); + +extern void +_mesa_notifySwapBuffers(struct gl_context *gc); + + +extern struct _glapi_table * +_mesa_get_dispatch(struct gl_context *ctx); + + +void +_mesa_set_mvp_with_dp4( struct gl_context *ctx, + GLboolean flag ); + + +extern GLboolean +_mesa_valid_to_render(struct gl_context *ctx, const char *where); + + + + + + +extern void +_mesa_record_error( struct gl_context *ctx, GLenum error ); + + +extern void +_mesa_finish(struct gl_context *ctx); + +extern void +_mesa_flush(struct gl_context *ctx); + + +extern void +_mesa_Finish( void ); + +extern void +_mesa_Flush( void ); +# 34 "swrast/s_triangle.c" 2 +# 1 "../../src/mesa/main/colormac.h" 1 +# 36 "../../src/mesa/main/colormac.h" +# 1 "../../src/mesa/main/config.h" 1 +# 37 "../../src/mesa/main/colormac.h" 2 +# 1 "../../src/mesa/main/macros.h" 1 +# 43 "../../src/mesa/main/macros.h" +extern GLfloat _mesa_ubyte_to_float_color_tab[256]; +# 38 "../../src/mesa/main/colormac.h" 2 +# 35 "swrast/s_triangle.c" 2 +# 1 "../../src/mesa/main/imports.h" 1 +# 36 "swrast/s_triangle.c" 2 +# 1 "../../src/mesa/main/macros.h" 1 +# 37 "swrast/s_triangle.c" 2 +# 1 "../../src/mesa/main/mtypes.h" 1 +# 38 "swrast/s_triangle.c" 2 +# 1 "../../src/mesa/main/state.h" 1 +# 31 "../../src/mesa/main/state.h" +extern void +_mesa_update_state(struct gl_context *ctx); + + + + +extern void +_mesa_update_state_locked(struct gl_context *ctx); + + +extern void +_mesa_set_varying_vp_inputs(struct gl_context *ctx, GLbitfield varying_inputs); + + +extern void +_mesa_set_vp_override(struct gl_context *ctx, GLboolean flag); + + + + + +static __inline__ GLboolean +_mesa_need_secondary_color(const struct gl_context *ctx) +{ + if (ctx->Light.Enabled && + ctx->Light.Model.ColorControl == 0x81FA) + return 0x1; + + if (ctx->Fog.ColorSumEnabled) + return 0x1; + + if (ctx->VertexProgram._Current && + (ctx->VertexProgram._Current != ctx->VertexProgram._TnlProgram) && + (ctx->VertexProgram._Current->Base.InputsRead & (1 << VERT_ATTRIB_COLOR1))) + return 0x1; + + if (ctx->FragmentProgram._Current && + (ctx->FragmentProgram._Current != ctx->FragmentProgram._TexEnvProgram) && + (ctx->FragmentProgram._Current->Base.InputsRead & (1 << FRAG_ATTRIB_COL1))) + return 0x1; + + return 0x0; +} + + + + + +static __inline__ GLboolean +_mesa_rgba_logicop_enabled(const struct gl_context *ctx) +{ + return ctx->Color.ColorLogicOpEnabled || + (ctx->Color.BlendEnabled && ctx->Color.Blend[0].EquationRGB == 0x0BF1); +} +# 39 "swrast/s_triangle.c" 2 +# 1 "../../src/mesa/program/prog_instruction.h" 1 +# 144 "../../src/mesa/program/prog_instruction.h" +typedef enum prog_opcode { + + + OPCODE_NOP = 0, + OPCODE_ABS, + OPCODE_ADD, + OPCODE_AND, + OPCODE_ARA, + OPCODE_ARL, + OPCODE_ARL_NV, + OPCODE_ARR, + OPCODE_BGNLOOP, + OPCODE_BGNSUB, + OPCODE_BRA, + OPCODE_BRK, + OPCODE_CAL, + OPCODE_CMP, + OPCODE_CONT, + OPCODE_COS, + OPCODE_DDX, + OPCODE_DDY, + OPCODE_DP2, + OPCODE_DP2A, + OPCODE_DP3, + OPCODE_DP4, + OPCODE_DPH, + OPCODE_DST, + OPCODE_ELSE, + OPCODE_EMIT_VERTEX, + OPCODE_END, + OPCODE_END_PRIMITIVE, + OPCODE_ENDIF, + OPCODE_ENDLOOP, + OPCODE_ENDSUB, + OPCODE_EX2, + OPCODE_EXP, + OPCODE_FLR, + OPCODE_FRC, + OPCODE_IF, + OPCODE_KIL, + OPCODE_KIL_NV, + OPCODE_LG2, + OPCODE_LIT, + OPCODE_LOG, + OPCODE_LRP, + OPCODE_MAD, + OPCODE_MAX, + OPCODE_MIN, + OPCODE_MOV, + OPCODE_MUL, + OPCODE_NOISE1, + OPCODE_NOISE2, + OPCODE_NOISE3, + OPCODE_NOISE4, + OPCODE_NOT, + OPCODE_NRM3, + OPCODE_NRM4, + OPCODE_OR, + OPCODE_PK2H, + OPCODE_PK2US, + OPCODE_PK4B, + OPCODE_PK4UB, + OPCODE_POW, + OPCODE_POPA, + OPCODE_PRINT, + OPCODE_PUSHA, + OPCODE_RCC, + OPCODE_RCP, + OPCODE_RET, + OPCODE_RFL, + OPCODE_RSQ, + OPCODE_SCS, + OPCODE_SEQ, + OPCODE_SFL, + OPCODE_SGE, + OPCODE_SGT, + OPCODE_SIN, + OPCODE_SLE, + OPCODE_SLT, + OPCODE_SNE, + OPCODE_SSG, + OPCODE_STR, + OPCODE_SUB, + OPCODE_SWZ, + OPCODE_TEX, + OPCODE_TXB, + OPCODE_TXD, + OPCODE_TXL, + OPCODE_TXP, + OPCODE_TXP_NV, + OPCODE_TRUNC, + OPCODE_UP2H, + OPCODE_UP2US, + OPCODE_UP4B, + OPCODE_UP4UB, + OPCODE_X2D, + OPCODE_XOR, + OPCODE_XPD, + MAX_OPCODE +} gl_inst_opcode; +# 256 "../../src/mesa/program/prog_instruction.h" +struct prog_src_register +{ + GLuint File:4; + GLint Index:(12 +1); + + + GLuint Swizzle:12; + GLuint RelAddr:1; + + + GLuint Abs:1; + + + + + + + GLuint Negate:4; +# 285 "../../src/mesa/program/prog_instruction.h" + GLuint HasIndex2:1; + GLuint RelAddr2:1; + GLint Index2:(12 +1); + + +}; + + + + + +struct prog_dst_register +{ + GLuint File:4; + GLuint Index:12; + GLuint WriteMask:4; + GLuint RelAddr:1; +# 317 "../../src/mesa/program/prog_instruction.h" + GLuint CondMask:4; + + + + + GLuint CondSwizzle:12; + + + + + + + + GLuint CondSrc:1; + +}; + + + + + +struct prog_instruction +{ + gl_inst_opcode Opcode; + struct prog_src_register SrcReg[3]; + struct prog_dst_register DstReg; +# 352 "../../src/mesa/program/prog_instruction.h" + GLuint CondUpdate:1; +# 366 "../../src/mesa/program/prog_instruction.h" + GLuint CondDst:1; +# 377 "../../src/mesa/program/prog_instruction.h" + GLuint SaturateMode:2; + + + + + + + + GLuint Precision:3; + + + + + + + GLuint TexSrcUnit:5; + + + GLuint TexSrcTarget:3; + + + GLuint TexShadow:1; +# 408 "../../src/mesa/program/prog_instruction.h" + GLint BranchTarget; + + + const char *Comment; + + + void *Data; + + + GLint Aux; +}; + + +extern void +_mesa_init_instructions(struct prog_instruction *inst, GLuint count); + +extern struct prog_instruction * +_mesa_alloc_instructions(GLuint numInst); + +extern struct prog_instruction * +_mesa_realloc_instructions(struct prog_instruction *oldInst, + GLuint numOldInst, GLuint numNewInst); + +extern struct prog_instruction * +_mesa_copy_instructions(struct prog_instruction *dest, + const struct prog_instruction *src, GLuint n); + +extern void +_mesa_free_instructions(struct prog_instruction *inst, GLuint count); + +extern GLuint +_mesa_num_inst_src_regs(gl_inst_opcode opcode); + +extern GLuint +_mesa_num_inst_dst_regs(gl_inst_opcode opcode); + +extern GLboolean +_mesa_is_tex_instruction(gl_inst_opcode opcode); + +extern GLboolean +_mesa_check_soa_dependencies(const struct prog_instruction *inst); + +extern const char * +_mesa_opcode_string(gl_inst_opcode opcode); +# 40 "swrast/s_triangle.c" 2 + +# 1 "swrast/s_aatriangle.h" 1 +# 31 "swrast/s_aatriangle.h" +struct gl_context; + + +extern void +_swrast_set_aa_triangle_function(struct gl_context *ctx); +# 42 "swrast/s_triangle.c" 2 +# 1 "swrast/s_context.h" 1 +# 46 "swrast/s_context.h" +# 1 "../../src/mesa/main/compiler.h" 1 +# 47 "swrast/s_context.h" 2 + +# 1 "../../src/mesa/program/prog_execute.h" 1 +# 32 "../../src/mesa/program/prog_execute.h" +typedef void (*FetchTexelLodFunc)(struct gl_context *ctx, const GLfloat texcoord[4], + GLfloat lambda, GLuint unit, GLfloat color[4]); + +typedef void (*FetchTexelDerivFunc)(struct gl_context *ctx, const GLfloat texcoord[4], + const GLfloat texdx[4], + const GLfloat texdy[4], + GLfloat lodBias, + GLuint unit, GLfloat color[4]); + + + + + +struct gl_program_machine +{ + const struct gl_program *CurProgram; + + + GLfloat (*Attribs)[16384][4]; + GLfloat (*DerivX)[4]; + GLfloat (*DerivY)[4]; + GLuint NumDeriv; + GLuint CurElement; + + + GLfloat VertAttribs[VERT_ATTRIB_MAX][4]; + + GLfloat Temporaries[256][4]; + GLfloat Outputs[64][4]; + GLfloat (*EnvParams)[4]; + GLuint CondCodes[4]; + GLint AddressReg[2][4]; + GLfloat SystemValues[SYSTEM_VALUE_MAX][4]; + + const GLubyte *Samplers; + + GLuint CallStack[8]; + GLuint StackDepth; + + + FetchTexelLodFunc FetchTexelLod; + FetchTexelDerivFunc FetchTexelDeriv; +}; + + +extern void +_mesa_get_program_register(struct gl_context *ctx, gl_register_file file, + GLuint index, GLfloat val[4]); + +extern GLboolean +_mesa_execute_program(struct gl_context *ctx, + const struct gl_program *program, + struct gl_program_machine *machine); +# 49 "swrast/s_context.h" 2 +# 1 "swrast/swrast.h" 1 +# 71 "swrast/swrast.h" +typedef struct { + GLfloat attrib[FRAG_ATTRIB_MAX][4]; + GLchan color[4]; + GLfloat pointSize; +} SWvertex; + + + + + +struct swrast_device_driver; + + + + + +extern GLboolean +_swrast_CreateContext( struct gl_context *ctx ); + +extern void +_swrast_DestroyContext( struct gl_context *ctx ); + + + +extern struct swrast_device_driver * +_swrast_GetDeviceDriverReference( struct gl_context *ctx ); + +extern void +_swrast_Bitmap( struct gl_context *ctx, + GLint px, GLint py, + GLsizei width, GLsizei height, + const struct gl_pixelstore_attrib *unpack, + const GLubyte *bitmap ); + +extern void +_swrast_CopyPixels( struct gl_context *ctx, + GLint srcx, GLint srcy, + GLint destx, GLint desty, + GLsizei width, GLsizei height, + GLenum type ); + +extern void +_swrast_DrawPixels( struct gl_context *ctx, + GLint x, GLint y, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *unpack, + const GLvoid *pixels ); + +extern void +_swrast_ReadPixels( struct gl_context *ctx, + GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *unpack, + GLvoid *pixels ); + +extern void +_swrast_BlitFramebuffer(struct gl_context *ctx, + GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, + GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, + GLbitfield mask, GLenum filter); + +extern void +_swrast_Clear(struct gl_context *ctx, GLbitfield buffers); + +extern void +_swrast_Accum(struct gl_context *ctx, GLenum op, GLfloat value); + + + + + +extern void +_swrast_ResetLineStipple( struct gl_context *ctx ); + + + + + +extern void +_swrast_SetFacing(struct gl_context *ctx, GLuint facing); + + + + + + +extern void +_swrast_Point( struct gl_context *ctx, const SWvertex *v ); + +extern void +_swrast_Line( struct gl_context *ctx, const SWvertex *v0, const SWvertex *v1 ); + +extern void +_swrast_Triangle( struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, const SWvertex *v2 ); + +extern void +_swrast_Quad( struct gl_context *ctx, + const SWvertex *v0, const SWvertex *v1, + const SWvertex *v2, const SWvertex *v3); + +extern void +_swrast_flush( struct gl_context *ctx ); + +extern void +_swrast_render_primitive( struct gl_context *ctx, GLenum mode ); + +extern void +_swrast_render_start( struct gl_context *ctx ); + +extern void +_swrast_render_finish( struct gl_context *ctx ); + + + +extern void +_swrast_InvalidateState( struct gl_context *ctx, GLbitfield new_state ); + + + +extern void +_swrast_allow_vertex_fog( struct gl_context *ctx, GLboolean value ); + +extern void +_swrast_allow_pixel_fog( struct gl_context *ctx, GLboolean value ); + + + +extern void +_swrast_print_vertex( struct gl_context *ctx, const SWvertex *v ); + + + +extern void +_swrast_eject_texture_images(struct gl_context *ctx); + + +extern void +_swrast_render_texture(struct gl_context *ctx, + struct gl_framebuffer *fb, + struct gl_renderbuffer_attachment *att); + +extern void +_swrast_finish_render_texture(struct gl_context *ctx, + struct gl_renderbuffer_attachment *att); +# 225 "swrast/swrast.h" +struct swrast_device_driver { +# 236 "swrast/swrast.h" + void (*SpanRenderStart)(struct gl_context *ctx); + void (*SpanRenderFinish)(struct gl_context *ctx); +}; +# 50 "swrast/s_context.h" 2 +# 1 "swrast/s_span.h" 1 +# 35 "swrast/s_span.h" +struct gl_context; +struct gl_renderbuffer; +# 66 "swrast/s_span.h" +typedef struct sw_span_arrays +{ + + + + + GLfloat attribs[FRAG_ATTRIB_MAX][16384][4]; + + + GLubyte mask[16384]; + + GLenum ChanType; + + + + GLubyte rgba8[16384][4]; + GLushort rgba16[16384][4]; + GLchan (*rgba)[4]; + GLint x[16384]; + GLint y[16384]; + GLuint z[16384]; + GLuint index[16384]; + GLfloat lambda[8][16384]; + GLfloat coverage[16384]; + +} SWspanarrays; +# 106 "swrast/s_span.h" +typedef struct sw_span +{ + + GLint x, y; + + + GLuint end; + + + GLuint leftClip; + + + GLboolean writeAll; + + + GLenum primitive; + + + GLuint facing; + + + + + + GLbitfield interpMask; + + + GLfloat attrStart[FRAG_ATTRIB_MAX][4]; + GLfloat attrStepX[FRAG_ATTRIB_MAX][4]; + GLfloat attrStepY[FRAG_ATTRIB_MAX][4]; + + + + + + + GLfixed red, redStep; + GLfixed green, greenStep; + GLfixed blue, blueStep; + GLfixed alpha, alphaStep; + GLfixed index, indexStep; + GLfixed z, zStep; + GLfixed intTex[2], intTexStep[2]; + + + + + + GLbitfield arrayMask; + + GLbitfield arrayAttribs; + + + + + + + + SWspanarrays *array; +} SWspan; +# 183 "swrast/s_span.h" +extern void +_swrast_span_default_attribs(struct gl_context *ctx, SWspan *span); + +extern void +_swrast_span_interpolate_z( const struct gl_context *ctx, SWspan *span ); + +extern GLfloat +_swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy, + GLfloat dqdx, GLfloat dqdy, GLfloat texW, GLfloat texH, + GLfloat s, GLfloat t, GLfloat q, GLfloat invQ); + + +extern void +_swrast_write_rgba_span( struct gl_context *ctx, SWspan *span); + + +extern void +_swrast_read_rgba_span(struct gl_context *ctx, struct gl_renderbuffer *rb, + GLuint n, GLint x, GLint y, GLenum type, GLvoid *rgba); + +extern void +_swrast_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb, + GLuint count, const GLint x[], const GLint y[], + void *values, GLuint valueSize); + +extern void +_swrast_put_row(struct gl_context *ctx, struct gl_renderbuffer *rb, + GLuint count, GLint x, GLint y, + const GLvoid *values, GLuint valueSize); + +extern void +_swrast_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb, + GLuint count, GLint x, GLint y, + GLvoid *values, GLuint valueSize); + + +extern void * +_swrast_get_dest_rgba(struct gl_context *ctx, struct gl_renderbuffer *rb, + SWspan *span); +# 51 "swrast/s_context.h" 2 + + +typedef void (*texture_sample_func)(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoords[][4], + const GLfloat lambda[], GLfloat rgba[][4]); + +typedef void ( * blend_func)( struct gl_context *ctx, GLuint n, + const GLubyte mask[], + GLvoid *src, const GLvoid *dst, + GLenum chanType); + +typedef void (*swrast_point_func)( struct gl_context *ctx, const SWvertex *); + +typedef void (*swrast_line_func)( struct gl_context *ctx, + const SWvertex *, const SWvertex *); + +typedef void (*swrast_tri_func)( struct gl_context *ctx, const SWvertex *, + const SWvertex *, const SWvertex *); + + +typedef void (*validate_texture_image_func)(struct gl_context *ctx, + struct gl_texture_object *texObj, + GLuint face, GLuint level); +# 116 "swrast/s_context.h" +typedef struct +{ + + + struct swrast_device_driver Driver; + + + + + GLboolean AllowVertexFog; + GLboolean AllowPixelFog; + + + + + GLbitfield _RasterMask; + GLfloat _BackfaceSign; + GLfloat _BackfaceCullSign; + GLboolean _PreferPixelFog; + GLboolean _TextureCombinePrimary; + GLboolean _FogEnabled; + GLboolean _DeferredTexture; + + + GLuint _ActiveAttribs[FRAG_ATTRIB_MAX]; + + GLbitfield _ActiveAttribMask; + + GLuint _NumActiveAttribs; + + GLenum _InterpMode[FRAG_ATTRIB_MAX]; + + + + GLboolean _IntegerAccumMode; + GLfloat _IntegerAccumScaler; + + + + GLuint StippleCounter; + GLuint PointLineFacing; + GLbitfield NewState; + GLuint StateChanges; + GLenum Primitive; + GLboolean SpecularVertexAdd; + + void (*InvalidateState)( struct gl_context *ctx, GLbitfield new_state ); + + + + + + + GLbitfield InvalidatePointMask; + GLbitfield InvalidateLineMask; + GLbitfield InvalidateTriangleMask; + + + + + + + + void (*choose_point)( struct gl_context * ); + void (*choose_line)( struct gl_context * ); + void (*choose_triangle)( struct gl_context * ); + + + + + + + swrast_point_func Point; + swrast_line_func Line; + swrast_tri_func Triangle; + + + + + + + + swrast_point_func SpecPoint; + swrast_line_func SpecLine; + swrast_tri_func SpecTriangle; +# 209 "swrast/s_context.h" + SWspanarrays *SpanArrays; + SWspanarrays *ZoomedArrays; + + + + + SWspan PointSpan; + + + + blend_func BlendFunc; + texture_sample_func TextureSample[16]; + + + + + GLfloat *TexelBuffer; + + validate_texture_image_func ValidateTextureImage; + + + struct gl_program_machine FragProgMachine; + +} SWcontext; + + +extern void +_swrast_validate_derived( struct gl_context *ctx ); + +extern void +_swrast_update_texture_samplers(struct gl_context *ctx); + + + +static __inline__ SWcontext * +SWRAST_CONTEXT(struct gl_context *ctx) +{ + return (SWcontext *) ctx->swrast_context; +} + + +static __inline__ const SWcontext * +CONST_SWRAST_CONTEXT(const struct gl_context *ctx) +{ + return (const SWcontext *) ctx->swrast_context; +} + + + + + + + +static __inline__ void +swrast_render_start(struct gl_context *ctx) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + if (swrast->Driver.SpanRenderStart) + swrast->Driver.SpanRenderStart(ctx); +} + + + +static __inline__ void +swrast_render_finish(struct gl_context *ctx) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + if (swrast->Driver.SpanRenderFinish) + swrast->Driver.SpanRenderFinish(ctx); +} +# 43 "swrast/s_triangle.c" 2 +# 1 "swrast/s_feedback.h" 1 +# 34 "swrast/s_feedback.h" +extern void _swrast_feedback_point( struct gl_context *ctx, const SWvertex *v ); + +extern void _swrast_feedback_line( struct gl_context *ctx, + const SWvertex *v1, const SWvertex *v2 ); + +extern void _swrast_feedback_triangle( struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, const SWvertex *v2 ); + +extern void _swrast_select_point( struct gl_context *ctx, const SWvertex *v ); + +extern void _swrast_select_line( struct gl_context *ctx, + const SWvertex *v1, const SWvertex *v2 ); + +extern void _swrast_select_triangle( struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, const SWvertex *v2 ); +# 44 "swrast/s_triangle.c" 2 + +# 1 "swrast/s_triangle.h" 1 +# 34 "swrast/s_triangle.h" +extern GLboolean +_swrast_culltriangle( struct gl_context *ctx, + const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2); + +extern void +_swrast_choose_triangle( struct gl_context *ctx ); + +extern void +_swrast_add_spec_terms_triangle( struct gl_context *ctx, + const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ); +# 46 "swrast/s_triangle.c" 2 + + + + + + +GLboolean +_swrast_culltriangle( struct gl_context *ctx, + const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + GLfloat ex = v1->attrib[FRAG_ATTRIB_WPOS][0] - v0->attrib[FRAG_ATTRIB_WPOS][0]; + GLfloat ey = v1->attrib[FRAG_ATTRIB_WPOS][1] - v0->attrib[FRAG_ATTRIB_WPOS][1]; + GLfloat fx = v2->attrib[FRAG_ATTRIB_WPOS][0] - v0->attrib[FRAG_ATTRIB_WPOS][0]; + GLfloat fy = v2->attrib[FRAG_ATTRIB_WPOS][1] - v0->attrib[FRAG_ATTRIB_WPOS][1]; + GLfloat c = ex*fy-ey*fx; + + if (c * swrast->_BackfaceSign * swrast->_BackfaceCullSign <= 0.0F) + return 0x0; + + return 0x1; +} +# 91 "swrast/s_triangle.c" +# 1 "swrast/s_tritemp.h" 1 +# 111 "swrast/s_tritemp.h" +static void flat_rgba_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + typedef struct { + const SWvertex *v0, *v1; + GLfloat dx; + GLfloat dy; + GLfloat dxdy; + GLfixed fdxdy; + GLfloat adjy; + GLfixed fsx; + GLfixed fsy; + GLfixed fx0; + GLint lines; + } EdgeT; + + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + + const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; + const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; + const GLfloat maxDepth = ctx->DrawBuffer->_DepthMaxF; + + + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + + SWspan span; + + (void) swrast; + + do { (span).primitive = (0x0009); (span).interpMask = 0x0; (span).arrayMask = 0x0; (span).arrayAttribs = 0x0; (span).end = 0; (span).leftClip = 0; (span).facing = 0; (span).array = SWRAST_CONTEXT(ctx)->SpanArrays; } while (0); + span.y = 0; + + + (void) fixedToDepthShift; +# 172 "swrast/s_tritemp.h" + { + const GLfixed fy0 = (((int) ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = (((int) ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = (((int) ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + + vMin = v0; vMid = v1; vMax = v2; + vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; + } + else if (fy2 <= fy0) { + + vMin = v2; vMid = v0; vMax = v1; + vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; + } + else { + + vMin = v0; vMid = v2; vMax = v1; + vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; + bf = -bf; + } + } + else { + if (fy0 <= fy2) { + + vMin = v1; vMid = v0; vMax = v2; + vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; + bf = -bf; + } + else if (fy2 <= fy1) { + + vMin = v2; vMid = v1; vMax = v0; + vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; + bf = -bf; + } + else { + + vMin = v1; vMid = v2; vMax = v0; + vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; + } + } + + + vMin_fx = (((int) ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = (((int) ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMax_fx = (((int) ((((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + } + + + eMaj.v0 = vMin; eMaj.v1 = vMax; + eTop.v0 = vMid; eTop.v1 = vMax; + eBot.v0 = vMin; eBot.v1 = vMid; + + + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float) (1 << 11)))); + eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / ((float) (1 << 11)))); + eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + + + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + + if (area * bf * swrast->_BackfaceCullSign < 0.0) + return; + + oneOverArea = 1.0F / area; + + + span.facing = oneOverArea * bf > 0.0F; + } + + + { + eMaj.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eMaj.lines = (((((vMax_fy - eMaj.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eMaj.lines > 0) { + eMaj.dxdy = eMaj.dx / eMaj.dy; + eMaj.fdxdy = (((int) ((((eMaj.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eMaj.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eMaj.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); + eMaj.fx0 = vMin_fx; + eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * eMaj.dxdy); + } + else { + return; + } + + eTop.fsy = (((vMid_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eTop.lines = (((((vMax_fy - eTop.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eTop.lines > 0) { + eTop.dxdy = eTop.dx / eTop.dy; + eTop.fdxdy = (((int) ((((eTop.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eTop.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eTop.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); + eTop.fx0 = vMid_fx; + eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * eTop.dxdy); + } + + eBot.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eBot.lines = (((((vMid_fy - eBot.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eBot.lines > 0) { + eBot.dxdy = eBot.dx / eBot.dy; + eBot.fdxdy = (((int) ((((eBot.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eBot.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eBot.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); + eBot.fx0 = vMin_fx; + eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * eBot.dxdy); + } + } +# 319 "swrast/s_tritemp.h" + { + GLint scan_from_left_to_right; + + + + + + ; ; span.interpMask |= 0x01; span.red = ((v2->color[0]) << 11); span.green = ((v2->color[1]) << 11); span.blue = ((v2->color[2]) << 11); span.alpha = ((v2->color[3]) << 11); span.redStep = 0; span.greenStep = 0; span.blueStep = 0; span.alphaStep = 0; + + + scan_from_left_to_right = (oneOverArea < 0.0F); + + + + + span.interpMask |= 0x02; + { + GLfloat eMaj_dz = vMax->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + GLfloat eBot_dz = vMid->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + span.attrStepX[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); + if (span.attrStepX[FRAG_ATTRIB_WPOS][2] > maxDepth || + span.attrStepX[FRAG_ATTRIB_WPOS][2] < -maxDepth) { + + span.attrStepX[FRAG_ATTRIB_WPOS][2] = 0.0; + span.attrStepY[FRAG_ATTRIB_WPOS][2] = 0.0; + } + else { + span.attrStepY[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); + } + if (depthBits <= 16) + span.zStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))); + else + span.zStep = (GLint) span.attrStepX[FRAG_ATTRIB_WPOS][2]; + } +# 488 "swrast/s_tritemp.h" + { + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; + GLfixed fError = 0, fdError = 0; +# 504 "swrast/s_tritemp.h" + GLuint zLeft = 0; + GLfixed fdzOuter = 0, fdzInner; +# 525 "swrast/s_tritemp.h" + for (subTriangle=0; subTriangle<=1; subTriangle++) { + EdgeT *eLeft, *eRight; + int setupLeft, setupRight; + int lines; + + if (subTriangle==0) { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eBot; + lines = eRight->lines; + setupLeft = 1; + setupRight = 1; + } + else { + eLeft = &eBot; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 1; + } + } + else { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eTop; + lines = eRight->lines; + setupLeft = 0; + setupRight = 1; + } + else { + eLeft = &eTop; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 0; + } + if (lines == 0) + return; + } + + if (setupLeft && eLeft->lines > 0) { + const SWvertex *vLower = eLeft->v0; + const GLfixed fsy = eLeft->fsy; + const GLfixed fsx = eLeft->fsx; + const GLfixed fx = (((fsx) + (1 << 11) - 1) & (~((1 << 11) - 1))); + const GLfixed adjx = (GLfixed) (fx - eLeft->fx0); + const GLfixed adjy = (GLfixed) eLeft->adjy; + GLint idxOuter; + GLfloat dxOuter; + GLfixed fdxOuter; + + fError = fx - fsx - (1 << 11); + fxLeftEdge = fsx - 1; + fdxLeftEdge = eLeft->fdxdy; + fdxOuter = ((fdxLeftEdge - 1) & (~((1 << 11) - 1))); + fdError = fdxOuter - fdxLeftEdge + (1 << 11); + idxOuter = ((fdxOuter) >> 11); + dxOuter = (GLfloat) idxOuter; + span.y = ((fsy) >> 11); + + + (void) dxOuter; + (void) adjx; + (void) adjy; + (void) vLower; +# 611 "swrast/s_tritemp.h" + { + GLfloat z0 = vLower->attrib[FRAG_ATTRIB_WPOS][2]; + if (depthBits <= 16) { + + GLfloat tmp = (z0 * ((float) (1 << 11)) + + span.attrStepX[FRAG_ATTRIB_WPOS][2] * adjx + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * adjy) + (1 << (11 -1)); + if (tmp < 0xffffffff / 2) + zLeft = (GLfixed) tmp; + else + zLeft = 0xffffffff / 2; + fdzOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + + zLeft = (GLuint) (z0 + span.attrStepX[FRAG_ATTRIB_WPOS][2] * ((adjx) * (1.0F / ((float) (1 << 11)))) + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * ((adjy) * (1.0F / ((float) (1 << 11))))); + fdzOuter = (GLint) (span.attrStepY[FRAG_ATTRIB_WPOS][2] + + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]); + } + + + + + + } +# 722 "swrast/s_tritemp.h" + } + + + if (setupRight && eRight->lines>0) { + fxRightEdge = eRight->fsx - 1; + fdxRightEdge = eRight->fdxdy; + } + + if (lines==0) { + continue; + } +# 743 "swrast/s_tritemp.h" + fdzInner = fdzOuter + span.zStep; +# 767 "swrast/s_tritemp.h" + while (lines > 0) { + + + const GLint right = ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + + + span.z = zLeft; +# 807 "swrast/s_tritemp.h" + if (span.end > 0 && span.y >= 0) { + const GLint len = span.end - 1; + (void) len; +# 818 "swrast/s_tritemp.h" + { + _swrast_write_rgba_span(ctx, &span);; + } + } + + + + + + + + span.y++; + lines--; + + fxLeftEdge += fdxLeftEdge; + fxRightEdge += fdxRightEdge; + + fError += fdError; + if (fError >= 0) { + fError -= (1 << 11); +# 846 "swrast/s_tritemp.h" + zLeft += fdzOuter; +# 869 "swrast/s_tritemp.h" + } + else { + + + + + + + + zLeft += fdzInner; +# 901 "swrast/s_tritemp.h" + } + } + + } + + } + } +} +# 92 "swrast/s_triangle.c" 2 +# 109 "swrast/s_triangle.c" +# 1 "swrast/s_tritemp.h" 1 +# 111 "swrast/s_tritemp.h" +static void smooth_rgba_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + typedef struct { + const SWvertex *v0, *v1; + GLfloat dx; + GLfloat dy; + GLfloat dxdy; + GLfixed fdxdy; + GLfloat adjy; + GLfixed fsx; + GLfixed fsy; + GLfixed fx0; + GLint lines; + } EdgeT; + + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + + const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; + const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; + const GLfloat maxDepth = ctx->DrawBuffer->_DepthMaxF; + + + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + + SWspan span; + + (void) swrast; + + do { (span).primitive = (0x0009); (span).interpMask = 0x0; (span).arrayMask = 0x0; (span).arrayAttribs = 0x0; (span).end = 0; (span).leftClip = 0; (span).facing = 0; (span).array = SWRAST_CONTEXT(ctx)->SpanArrays; } while (0); + span.y = 0; + + + (void) fixedToDepthShift; +# 172 "swrast/s_tritemp.h" + { + const GLfixed fy0 = (((int) ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = (((int) ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = (((int) ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + + vMin = v0; vMid = v1; vMax = v2; + vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; + } + else if (fy2 <= fy0) { + + vMin = v2; vMid = v0; vMax = v1; + vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; + } + else { + + vMin = v0; vMid = v2; vMax = v1; + vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; + bf = -bf; + } + } + else { + if (fy0 <= fy2) { + + vMin = v1; vMid = v0; vMax = v2; + vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; + bf = -bf; + } + else if (fy2 <= fy1) { + + vMin = v2; vMid = v1; vMax = v0; + vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; + bf = -bf; + } + else { + + vMin = v1; vMid = v2; vMax = v0; + vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; + } + } + + + vMin_fx = (((int) ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = (((int) ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMax_fx = (((int) ((((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + } + + + eMaj.v0 = vMin; eMaj.v1 = vMax; + eTop.v0 = vMid; eTop.v1 = vMax; + eBot.v0 = vMin; eBot.v1 = vMid; + + + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float) (1 << 11)))); + eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / ((float) (1 << 11)))); + eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + + + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + + if (area * bf * swrast->_BackfaceCullSign < 0.0) + return; + + oneOverArea = 1.0F / area; + + + span.facing = oneOverArea * bf > 0.0F; + } + + + { + eMaj.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eMaj.lines = (((((vMax_fy - eMaj.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eMaj.lines > 0) { + eMaj.dxdy = eMaj.dx / eMaj.dy; + eMaj.fdxdy = (((int) ((((eMaj.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eMaj.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eMaj.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); + eMaj.fx0 = vMin_fx; + eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * eMaj.dxdy); + } + else { + return; + } + + eTop.fsy = (((vMid_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eTop.lines = (((((vMax_fy - eTop.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eTop.lines > 0) { + eTop.dxdy = eTop.dx / eTop.dy; + eTop.fdxdy = (((int) ((((eTop.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eTop.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eTop.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); + eTop.fx0 = vMid_fx; + eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * eTop.dxdy); + } + + eBot.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eBot.lines = (((((vMid_fy - eBot.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eBot.lines > 0) { + eBot.dxdy = eBot.dx / eBot.dy; + eBot.fdxdy = (((int) ((((eBot.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eBot.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eBot.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); + eBot.fx0 = vMin_fx; + eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * eBot.dxdy); + } + } +# 319 "swrast/s_tritemp.h" + { + GLint scan_from_left_to_right; + + + + + + { ; ; } + + + scan_from_left_to_right = (oneOverArea < 0.0F); + + + + + span.interpMask |= 0x02; + { + GLfloat eMaj_dz = vMax->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + GLfloat eBot_dz = vMid->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + span.attrStepX[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); + if (span.attrStepX[FRAG_ATTRIB_WPOS][2] > maxDepth || + span.attrStepX[FRAG_ATTRIB_WPOS][2] < -maxDepth) { + + span.attrStepX[FRAG_ATTRIB_WPOS][2] = 0.0; + span.attrStepY[FRAG_ATTRIB_WPOS][2] = 0.0; + } + else { + span.attrStepY[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); + } + if (depthBits <= 16) + span.zStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))); + else + span.zStep = (GLint) span.attrStepX[FRAG_ATTRIB_WPOS][2]; + } + + + span.interpMask |= 0x01; + if (ctx->Light.ShadeModel == 0x1D01) { + GLfloat eMaj_dr = (GLfloat) (vMax->color[0] - vMin->color[0]); + GLfloat eBot_dr = (GLfloat) (vMid->color[0] - vMin->color[0]); + GLfloat eMaj_dg = (GLfloat) (vMax->color[1] - vMin->color[1]); + GLfloat eBot_dg = (GLfloat) (vMid->color[1] - vMin->color[1]); + GLfloat eMaj_db = (GLfloat) (vMax->color[2] - vMin->color[2]); + GLfloat eBot_db = (GLfloat) (vMid->color[2] - vMin->color[2]); + + GLfloat eMaj_da = (GLfloat) (vMax->color[3] - vMin->color[3]); + GLfloat eBot_da = (GLfloat) (vMid->color[3] - vMin->color[3]); + + span.attrStepX[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); + span.attrStepY[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); + span.attrStepY[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); + span.attrStepY[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); + span.redStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) - 0.5F)))); + span.greenStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) - 0.5F)))); + span.blueStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) - 0.5F)))); + + span.attrStepX[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj_da * eBot.dy - eMaj.dy * eBot_da); + span.attrStepY[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx); + span.alphaStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) - 0.5F)))); + + } + else { + ; + span.interpMask |= 0x04; + span.attrStepX[FRAG_ATTRIB_COL0][0] = span.attrStepY[FRAG_ATTRIB_COL0][0] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][1] = span.attrStepY[FRAG_ATTRIB_COL0][1] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][2] = span.attrStepY[FRAG_ATTRIB_COL0][2] = 0.0F; + span.redStep = 0; + span.greenStep = 0; + span.blueStep = 0; + + span.attrStepX[FRAG_ATTRIB_COL0][3] = span.attrStepY[FRAG_ATTRIB_COL0][3] = 0.0F; + span.alphaStep = 0; + + } +# 488 "swrast/s_tritemp.h" + { + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; + GLfixed fError = 0, fdError = 0; +# 504 "swrast/s_tritemp.h" + GLuint zLeft = 0; + GLfixed fdzOuter = 0, fdzInner; + + + GLint rLeft = 0, fdrOuter = 0, fdrInner; + GLint gLeft = 0, fdgOuter = 0, fdgInner; + GLint bLeft = 0, fdbOuter = 0, fdbInner; + + + GLint aLeft = 0, fdaOuter = 0, fdaInner; +# 525 "swrast/s_tritemp.h" + for (subTriangle=0; subTriangle<=1; subTriangle++) { + EdgeT *eLeft, *eRight; + int setupLeft, setupRight; + int lines; + + if (subTriangle==0) { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eBot; + lines = eRight->lines; + setupLeft = 1; + setupRight = 1; + } + else { + eLeft = &eBot; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 1; + } + } + else { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eTop; + lines = eRight->lines; + setupLeft = 0; + setupRight = 1; + } + else { + eLeft = &eTop; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 0; + } + if (lines == 0) + return; + } + + if (setupLeft && eLeft->lines > 0) { + const SWvertex *vLower = eLeft->v0; + const GLfixed fsy = eLeft->fsy; + const GLfixed fsx = eLeft->fsx; + const GLfixed fx = (((fsx) + (1 << 11) - 1) & (~((1 << 11) - 1))); + const GLfixed adjx = (GLfixed) (fx - eLeft->fx0); + const GLfixed adjy = (GLfixed) eLeft->adjy; + GLint idxOuter; + GLfloat dxOuter; + GLfixed fdxOuter; + + fError = fx - fsx - (1 << 11); + fxLeftEdge = fsx - 1; + fdxLeftEdge = eLeft->fdxdy; + fdxOuter = ((fdxLeftEdge - 1) & (~((1 << 11) - 1))); + fdError = fdxOuter - fdxLeftEdge + (1 << 11); + idxOuter = ((fdxOuter) >> 11); + dxOuter = (GLfloat) idxOuter; + span.y = ((fsy) >> 11); + + + (void) dxOuter; + (void) adjx; + (void) adjy; + (void) vLower; +# 611 "swrast/s_tritemp.h" + { + GLfloat z0 = vLower->attrib[FRAG_ATTRIB_WPOS][2]; + if (depthBits <= 16) { + + GLfloat tmp = (z0 * ((float) (1 << 11)) + + span.attrStepX[FRAG_ATTRIB_WPOS][2] * adjx + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * adjy) + (1 << (11 -1)); + if (tmp < 0xffffffff / 2) + zLeft = (GLfixed) tmp; + else + zLeft = 0xffffffff / 2; + fdzOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + + zLeft = (GLuint) (z0 + span.attrStepX[FRAG_ATTRIB_WPOS][2] * ((adjx) * (1.0F / ((float) (1 << 11)))) + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * ((adjy) * (1.0F / ((float) (1 << 11))))); + fdzOuter = (GLint) (span.attrStepY[FRAG_ATTRIB_WPOS][2] + + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]); + } + + + + + + } + + + if (ctx->Light.ShadeModel == 0x1D01) { + rLeft = (GLint)(((vLower->color[0]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][0] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][0] * adjy) + (1 << (11 -1)); + gLeft = (GLint)(((vLower->color[1]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][1] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][1] * adjy) + (1 << (11 -1)); + bLeft = (GLint)(((vLower->color[2]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][2] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][2] * adjy) + (1 << (11 -1)); + fdrOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) - 0.5F)))) + ; + fdgOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) - 0.5F)))) + ; + fdbOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + + aLeft = (GLint)(((vLower->color[3]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][3] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][3] * adjy) + (1 << (11 -1)); + fdaOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) - 0.5F)))) + ; + + } + else { + ; + rLeft = ((v2->color[0]) << 11); + gLeft = ((v2->color[1]) << 11); + bLeft = ((v2->color[2]) << 11); + fdrOuter = fdgOuter = fdbOuter = 0; + + aLeft = ((v2->color[3]) << 11); + fdaOuter = 0; + + } +# 722 "swrast/s_tritemp.h" + } + + + if (setupRight && eRight->lines>0) { + fxRightEdge = eRight->fsx - 1; + fdxRightEdge = eRight->fdxdy; + } + + if (lines==0) { + continue; + } +# 743 "swrast/s_tritemp.h" + fdzInner = fdzOuter + span.zStep; + + + fdrInner = fdrOuter + span.redStep; + fdgInner = fdgOuter + span.greenStep; + fdbInner = fdbOuter + span.blueStep; + + + fdaInner = fdaOuter + span.alphaStep; +# 767 "swrast/s_tritemp.h" + while (lines > 0) { + + + const GLint right = ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + + + span.z = zLeft; + + + span.red = rLeft; + span.green = gLeft; + span.blue = bLeft; + + + span.alpha = aLeft; +# 807 "swrast/s_tritemp.h" + if (span.end > 0 && span.y >= 0) { + const GLint len = span.end - 1; + (void) len; + + do { GLfixed endVal = span.red + (len) * span.redStep; if (endVal < 0) { span.red -= endVal; } if (span.red < 0) { span.red = 0; } } while (0); + do { GLfixed endVal = span.green + (len) * span.greenStep; if (endVal < 0) { span.green -= endVal; } if (span.green < 0) { span.green = 0; } } while (0); + do { GLfixed endVal = span.blue + (len) * span.blueStep; if (endVal < 0) { span.blue -= endVal; } if (span.blue < 0) { span.blue = 0; } } while (0); + + + do { GLfixed endVal = span.alpha + (len) * span.alphaStep; if (endVal < 0) { span.alpha -= endVal; } if (span.alpha < 0) { span.alpha = 0; } } while (0); + + { + _swrast_write_rgba_span(ctx, &span);; + } + } + + + + + + + + span.y++; + lines--; + + fxLeftEdge += fdxLeftEdge; + fxRightEdge += fdxRightEdge; + + fError += fdError; + if (fError >= 0) { + fError -= (1 << 11); +# 846 "swrast/s_tritemp.h" + zLeft += fdzOuter; + + + rLeft += fdrOuter; + gLeft += fdgOuter; + bLeft += fdbOuter; + + + aLeft += fdaOuter; +# 869 "swrast/s_tritemp.h" + } + else { + + + + + + + + zLeft += fdzInner; + + + rLeft += fdrInner; + gLeft += fdgInner; + bLeft += fdbInner; + + + aLeft += fdaInner; +# 901 "swrast/s_tritemp.h" + } + } + + } + + } + } +} +# 110 "swrast/s_triangle.c" 2 +# 159 "swrast/s_triangle.c" +# 1 "swrast/s_tritemp.h" 1 +# 111 "swrast/s_tritemp.h" +static void simple_textured_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + typedef struct { + const SWvertex *v0, *v1; + GLfloat dx; + GLfloat dy; + GLfloat dxdy; + GLfixed fdxdy; + GLfloat adjy; + GLfixed fsx; + GLfixed fsy; + GLfixed fx0; + GLint lines; + } EdgeT; + + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + + + + + + + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + + SWspan span; + + (void) swrast; + + do { (span).primitive = (0x0009); (span).interpMask = 0x0; (span).arrayMask = 0x0; (span).arrayAttribs = 0x0; (span).end = 0; (span).leftClip = 0; (span).facing = 0; (span).array = SWRAST_CONTEXT(ctx)->SpanArrays; } while (0); + span.y = 0; +# 172 "swrast/s_tritemp.h" + { + const GLfixed fy0 = (((int) ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = (((int) ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = (((int) ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + + vMin = v0; vMid = v1; vMax = v2; + vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; + } + else if (fy2 <= fy0) { + + vMin = v2; vMid = v0; vMax = v1; + vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; + } + else { + + vMin = v0; vMid = v2; vMax = v1; + vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; + bf = -bf; + } + } + else { + if (fy0 <= fy2) { + + vMin = v1; vMid = v0; vMax = v2; + vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; + bf = -bf; + } + else if (fy2 <= fy1) { + + vMin = v2; vMid = v1; vMax = v0; + vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; + bf = -bf; + } + else { + + vMin = v1; vMid = v2; vMax = v0; + vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; + } + } + + + vMin_fx = (((int) ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = (((int) ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMax_fx = (((int) ((((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + } + + + eMaj.v0 = vMin; eMaj.v1 = vMax; + eTop.v0 = vMid; eTop.v1 = vMax; + eBot.v0 = vMin; eBot.v1 = vMid; + + + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float) (1 << 11)))); + eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / ((float) (1 << 11)))); + eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + + + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + + if (area * bf * swrast->_BackfaceCullSign < 0.0) + return; + + oneOverArea = 1.0F / area; + + + span.facing = oneOverArea * bf > 0.0F; + } + + + { + eMaj.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eMaj.lines = (((((vMax_fy - eMaj.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eMaj.lines > 0) { + eMaj.dxdy = eMaj.dx / eMaj.dy; + eMaj.fdxdy = (((int) ((((eMaj.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eMaj.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eMaj.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); + eMaj.fx0 = vMin_fx; + eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * eMaj.dxdy); + } + else { + return; + } + + eTop.fsy = (((vMid_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eTop.lines = (((((vMax_fy - eTop.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eTop.lines > 0) { + eTop.dxdy = eTop.dx / eTop.dy; + eTop.fdxdy = (((int) ((((eTop.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eTop.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eTop.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); + eTop.fx0 = vMid_fx; + eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * eTop.dxdy); + } + + eBot.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eBot.lines = (((((vMid_fy - eBot.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eBot.lines > 0) { + eBot.dxdy = eBot.dx / eBot.dy; + eBot.fdxdy = (((int) ((((eBot.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eBot.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eBot.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); + eBot.fx0 = vMin_fx; + eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * eBot.dxdy); + } + } +# 319 "swrast/s_tritemp.h" + { + GLint scan_from_left_to_right; + + + + + + struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0]; const struct gl_texture_object *obj = ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; const struct gl_texture_image *texImg = obj->Image[0][obj->BaseLevel]; const GLfloat twidth = (GLfloat) texImg->Width; const GLfloat theight = (GLfloat) texImg->Height; const GLint twidth_log2 = texImg->WidthLog2; const GLubyte *texture = (const GLubyte *) texImg->Data; const GLint smask = texImg->Width - 1; const GLint tmask = texImg->Height - 1; ; if (!rb || !texture) { return; } + + + scan_from_left_to_right = (oneOverArea < 0.0F); +# 398 "swrast/s_tritemp.h" + { + GLfloat eMaj_ds = (vMax->attrib[FRAG_ATTRIB_TEX0][0] - vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + GLfloat eBot_ds = (vMid->attrib[FRAG_ATTRIB_TEX0][0] - vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + GLfloat eMaj_dt = (vMax->attrib[FRAG_ATTRIB_TEX0][1] - vMin->attrib[FRAG_ATTRIB_TEX0][1]) * theight; + GLfloat eBot_dt = (vMid->attrib[FRAG_ATTRIB_TEX0][1] - vMin->attrib[FRAG_ATTRIB_TEX0][1]) * theight; + span.attrStepX[FRAG_ATTRIB_TEX0][0] = oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); + span.attrStepY[FRAG_ATTRIB_TEX0][0] = oneOverArea * (eMaj.dx * eBot_ds - eMaj_ds * eBot.dx); + span.attrStepX[FRAG_ATTRIB_TEX0][1] = oneOverArea * (eMaj_dt * eBot.dy - eMaj.dy * eBot_dt); + span.attrStepY[FRAG_ATTRIB_TEX0][1] = oneOverArea * (eMaj.dx * eBot_dt - eMaj_dt * eBot.dx); + span.intTexStep[0] = (((int) ((((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) - 0.5F)))); + span.intTexStep[1] = (((int) ((((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) - 0.5F)))); + } +# 488 "swrast/s_tritemp.h" + { + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; + GLfixed fError = 0, fdError = 0; +# 516 "swrast/s_tritemp.h" + GLfixed sLeft=0, dsOuter=0, dsInner; + GLfixed tLeft=0, dtOuter=0, dtInner; + + + + + + + + for (subTriangle=0; subTriangle<=1; subTriangle++) { + EdgeT *eLeft, *eRight; + int setupLeft, setupRight; + int lines; + + if (subTriangle==0) { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eBot; + lines = eRight->lines; + setupLeft = 1; + setupRight = 1; + } + else { + eLeft = &eBot; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 1; + } + } + else { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eTop; + lines = eRight->lines; + setupLeft = 0; + setupRight = 1; + } + else { + eLeft = &eTop; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 0; + } + if (lines == 0) + return; + } + + if (setupLeft && eLeft->lines > 0) { + const SWvertex *vLower = eLeft->v0; + const GLfixed fsy = eLeft->fsy; + const GLfixed fsx = eLeft->fsx; + const GLfixed fx = (((fsx) + (1 << 11) - 1) & (~((1 << 11) - 1))); + const GLfixed adjx = (GLfixed) (fx - eLeft->fx0); + const GLfixed adjy = (GLfixed) eLeft->adjy; + GLint idxOuter; + GLfloat dxOuter; + GLfixed fdxOuter; + + fError = fx - fsx - (1 << 11); + fxLeftEdge = fsx - 1; + fdxLeftEdge = eLeft->fdxdy; + fdxOuter = ((fdxLeftEdge - 1) & (~((1 << 11) - 1))); + fdError = fdxOuter - fdxLeftEdge + (1 << 11); + idxOuter = ((fdxOuter) >> 11); + dxOuter = (GLfloat) idxOuter; + span.y = ((fsy) >> 11); + + + (void) dxOuter; + (void) adjx; + (void) adjy; + (void) vLower; +# 679 "swrast/s_tritemp.h" + { + GLfloat s0, t0; + s0 = vLower->attrib[FRAG_ATTRIB_TEX0][0] * twidth; + sLeft = (GLfixed)(s0 * ((float) (1 << 11)) + span.attrStepX[FRAG_ATTRIB_TEX0][0] * adjx + + span.attrStepY[FRAG_ATTRIB_TEX0][0] * adjy) + (1 << (11 -1)); + dsOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) - 0.5F)))) + ; + + t0 = vLower->attrib[FRAG_ATTRIB_TEX0][1] * theight; + tLeft = (GLfixed)(t0 * ((float) (1 << 11)) + span.attrStepX[FRAG_ATTRIB_TEX0][1] * adjx + + span.attrStepY[FRAG_ATTRIB_TEX0][1] * adjy) + (1 << (11 -1)); + dtOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) - 0.5F)))) + ; + } +# 722 "swrast/s_tritemp.h" + } + + + if (setupRight && eRight->lines>0) { + fxRightEdge = eRight->fsx - 1; + fdxRightEdge = eRight->fdxdy; + } + + if (lines==0) { + continue; + } +# 754 "swrast/s_tritemp.h" + dsInner = dsOuter + span.intTexStep[0]; + dtInner = dtOuter + span.intTexStep[1]; +# 767 "swrast/s_tritemp.h" + while (lines > 0) { + + + const GLint right = ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; +# 789 "swrast/s_tritemp.h" + span.intTex[0] = sLeft; + span.intTex[1] = tLeft; +# 807 "swrast/s_tritemp.h" + if (span.end > 0 && span.y >= 0) { + const GLint len = span.end - 1; + (void) len; +# 818 "swrast/s_tritemp.h" + { + GLuint i; GLubyte rgb[16384][3]; span.intTex[0] -= (1 << (11 -1)); span.intTex[1] -= (1 << (11 -1)); for (i = 0; i < span.end; i++) { GLint s = ((span.intTex[0]) >> 11) & smask; GLint t = ((span.intTex[1]) >> 11) & tmask; GLint pos = (t << twidth_log2) + s; pos = pos + pos + pos; rgb[i][0] = texture[pos+2]; rgb[i][1] = texture[pos+1]; rgb[i][2] = texture[pos+0]; span.intTex[0] += span.intTexStep[0]; span.intTex[1] += span.intTexStep[1]; } rb->PutRowRGB(ctx, rb, span.end, span.x, span.y, rgb, ((void *)0));; + } + } + + + + + + + + span.y++; + lines--; + + fxLeftEdge += fdxLeftEdge; + fxRightEdge += fdxRightEdge; + + fError += fdError; + if (fError >= 0) { + fError -= (1 << 11); +# 857 "swrast/s_tritemp.h" + sLeft += dsOuter; + tLeft += dtOuter; +# 869 "swrast/s_tritemp.h" + } + else { +# 889 "swrast/s_tritemp.h" + sLeft += dsInner; + tLeft += dtInner; +# 901 "swrast/s_tritemp.h" + } + } + + } + + } + } +} +# 160 "swrast/s_triangle.c" 2 +# 222 "swrast/s_triangle.c" +# 1 "swrast/s_tritemp.h" 1 +# 111 "swrast/s_tritemp.h" +static void simple_z_textured_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + typedef struct { + const SWvertex *v0, *v1; + GLfloat dx; + GLfloat dy; + GLfloat dxdy; + GLfixed fdxdy; + GLfloat adjy; + GLfixed fsx; + GLfixed fsy; + GLfixed fx0; + GLint lines; + } EdgeT; + + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + + const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; + const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; + const GLfloat maxDepth = ctx->DrawBuffer->_DepthMaxF; + + + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + + SWspan span; + + (void) swrast; + + do { (span).primitive = (0x0009); (span).interpMask = 0x0; (span).arrayMask = 0x0; (span).arrayAttribs = 0x0; (span).end = 0; (span).leftClip = 0; (span).facing = 0; (span).array = SWRAST_CONTEXT(ctx)->SpanArrays; } while (0); + span.y = 0; + + + (void) fixedToDepthShift; +# 172 "swrast/s_tritemp.h" + { + const GLfixed fy0 = (((int) ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = (((int) ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = (((int) ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + + vMin = v0; vMid = v1; vMax = v2; + vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; + } + else if (fy2 <= fy0) { + + vMin = v2; vMid = v0; vMax = v1; + vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; + } + else { + + vMin = v0; vMid = v2; vMax = v1; + vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; + bf = -bf; + } + } + else { + if (fy0 <= fy2) { + + vMin = v1; vMid = v0; vMax = v2; + vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; + bf = -bf; + } + else if (fy2 <= fy1) { + + vMin = v2; vMid = v1; vMax = v0; + vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; + bf = -bf; + } + else { + + vMin = v1; vMid = v2; vMax = v0; + vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; + } + } + + + vMin_fx = (((int) ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = (((int) ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMax_fx = (((int) ((((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + } + + + eMaj.v0 = vMin; eMaj.v1 = vMax; + eTop.v0 = vMid; eTop.v1 = vMax; + eBot.v0 = vMin; eBot.v1 = vMid; + + + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float) (1 << 11)))); + eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / ((float) (1 << 11)))); + eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + + + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + + if (area * bf * swrast->_BackfaceCullSign < 0.0) + return; + + oneOverArea = 1.0F / area; + + + span.facing = oneOverArea * bf > 0.0F; + } + + + { + eMaj.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eMaj.lines = (((((vMax_fy - eMaj.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eMaj.lines > 0) { + eMaj.dxdy = eMaj.dx / eMaj.dy; + eMaj.fdxdy = (((int) ((((eMaj.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eMaj.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eMaj.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); + eMaj.fx0 = vMin_fx; + eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * eMaj.dxdy); + } + else { + return; + } + + eTop.fsy = (((vMid_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eTop.lines = (((((vMax_fy - eTop.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eTop.lines > 0) { + eTop.dxdy = eTop.dx / eTop.dy; + eTop.fdxdy = (((int) ((((eTop.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eTop.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eTop.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); + eTop.fx0 = vMid_fx; + eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * eTop.dxdy); + } + + eBot.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eBot.lines = (((((vMid_fy - eBot.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eBot.lines > 0) { + eBot.dxdy = eBot.dx / eBot.dy; + eBot.fdxdy = (((int) ((((eBot.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eBot.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eBot.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); + eBot.fx0 = vMin_fx; + eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * eBot.dxdy); + } + } +# 319 "swrast/s_tritemp.h" + { + GLint scan_from_left_to_right; + + + + + + struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0]; const struct gl_texture_object *obj = ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; const struct gl_texture_image *texImg = obj->Image[0][obj->BaseLevel]; const GLfloat twidth = (GLfloat) texImg->Width; const GLfloat theight = (GLfloat) texImg->Height; const GLint twidth_log2 = texImg->WidthLog2; const GLubyte *texture = (const GLubyte *) texImg->Data; const GLint smask = texImg->Width - 1; const GLint tmask = texImg->Height - 1; ; if (!rb || !texture) { return; } + + + scan_from_left_to_right = (oneOverArea < 0.0F); + + + + + span.interpMask |= 0x02; + { + GLfloat eMaj_dz = vMax->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + GLfloat eBot_dz = vMid->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + span.attrStepX[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); + if (span.attrStepX[FRAG_ATTRIB_WPOS][2] > maxDepth || + span.attrStepX[FRAG_ATTRIB_WPOS][2] < -maxDepth) { + + span.attrStepX[FRAG_ATTRIB_WPOS][2] = 0.0; + span.attrStepY[FRAG_ATTRIB_WPOS][2] = 0.0; + } + else { + span.attrStepY[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); + } + if (depthBits <= 16) + span.zStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))); + else + span.zStep = (GLint) span.attrStepX[FRAG_ATTRIB_WPOS][2]; + } +# 398 "swrast/s_tritemp.h" + { + GLfloat eMaj_ds = (vMax->attrib[FRAG_ATTRIB_TEX0][0] - vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + GLfloat eBot_ds = (vMid->attrib[FRAG_ATTRIB_TEX0][0] - vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + GLfloat eMaj_dt = (vMax->attrib[FRAG_ATTRIB_TEX0][1] - vMin->attrib[FRAG_ATTRIB_TEX0][1]) * theight; + GLfloat eBot_dt = (vMid->attrib[FRAG_ATTRIB_TEX0][1] - vMin->attrib[FRAG_ATTRIB_TEX0][1]) * theight; + span.attrStepX[FRAG_ATTRIB_TEX0][0] = oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); + span.attrStepY[FRAG_ATTRIB_TEX0][0] = oneOverArea * (eMaj.dx * eBot_ds - eMaj_ds * eBot.dx); + span.attrStepX[FRAG_ATTRIB_TEX0][1] = oneOverArea * (eMaj_dt * eBot.dy - eMaj.dy * eBot_dt); + span.attrStepY[FRAG_ATTRIB_TEX0][1] = oneOverArea * (eMaj.dx * eBot_dt - eMaj_dt * eBot.dx); + span.intTexStep[0] = (((int) ((((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) - 0.5F)))); + span.intTexStep[1] = (((int) ((((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) - 0.5F)))); + } +# 488 "swrast/s_tritemp.h" + { + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; + GLfixed fError = 0, fdError = 0; + + + + + + + struct gl_renderbuffer *zrb + = ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Renderbuffer; + GLushort *zRow = ((void *)0); + GLint dZRowOuter = 0, dZRowInner; + + GLuint zLeft = 0; + GLfixed fdzOuter = 0, fdzInner; +# 516 "swrast/s_tritemp.h" + GLfixed sLeft=0, dsOuter=0, dsInner; + GLfixed tLeft=0, dtOuter=0, dtInner; + + + + + + + + for (subTriangle=0; subTriangle<=1; subTriangle++) { + EdgeT *eLeft, *eRight; + int setupLeft, setupRight; + int lines; + + if (subTriangle==0) { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eBot; + lines = eRight->lines; + setupLeft = 1; + setupRight = 1; + } + else { + eLeft = &eBot; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 1; + } + } + else { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eTop; + lines = eRight->lines; + setupLeft = 0; + setupRight = 1; + } + else { + eLeft = &eTop; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 0; + } + if (lines == 0) + return; + } + + if (setupLeft && eLeft->lines > 0) { + const SWvertex *vLower = eLeft->v0; + const GLfixed fsy = eLeft->fsy; + const GLfixed fsx = eLeft->fsx; + const GLfixed fx = (((fsx) + (1 << 11) - 1) & (~((1 << 11) - 1))); + const GLfixed adjx = (GLfixed) (fx - eLeft->fx0); + const GLfixed adjy = (GLfixed) eLeft->adjy; + GLint idxOuter; + GLfloat dxOuter; + GLfixed fdxOuter; + + fError = fx - fsx - (1 << 11); + fxLeftEdge = fsx - 1; + fdxLeftEdge = eLeft->fdxdy; + fdxOuter = ((fdxLeftEdge - 1) & (~((1 << 11) - 1))); + fdError = fdxOuter - fdxLeftEdge + (1 << 11); + idxOuter = ((fdxOuter) >> 11); + dxOuter = (GLfloat) idxOuter; + span.y = ((fsy) >> 11); + + + (void) dxOuter; + (void) adjx; + (void) adjy; + (void) vLower; +# 611 "swrast/s_tritemp.h" + { + GLfloat z0 = vLower->attrib[FRAG_ATTRIB_WPOS][2]; + if (depthBits <= 16) { + + GLfloat tmp = (z0 * ((float) (1 << 11)) + + span.attrStepX[FRAG_ATTRIB_WPOS][2] * adjx + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * adjy) + (1 << (11 -1)); + if (tmp < 0xffffffff / 2) + zLeft = (GLfixed) tmp; + else + zLeft = 0xffffffff / 2; + fdzOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + + zLeft = (GLuint) (z0 + span.attrStepX[FRAG_ATTRIB_WPOS][2] * ((adjx) * (1.0F / ((float) (1 << 11)))) + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * ((adjy) * (1.0F / ((float) (1 << 11))))); + fdzOuter = (GLint) (span.attrStepY[FRAG_ATTRIB_WPOS][2] + + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]); + } + + zRow = (GLushort *) + zrb->GetPointer(ctx, zrb, ((fxLeftEdge) >> 11), span.y); + dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); + + } +# 679 "swrast/s_tritemp.h" + { + GLfloat s0, t0; + s0 = vLower->attrib[FRAG_ATTRIB_TEX0][0] * twidth; + sLeft = (GLfixed)(s0 * ((float) (1 << 11)) + span.attrStepX[FRAG_ATTRIB_TEX0][0] * adjx + + span.attrStepY[FRAG_ATTRIB_TEX0][0] * adjy) + (1 << (11 -1)); + dsOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) - 0.5F)))) + ; + + t0 = vLower->attrib[FRAG_ATTRIB_TEX0][1] * theight; + tLeft = (GLfixed)(t0 * ((float) (1 << 11)) + span.attrStepX[FRAG_ATTRIB_TEX0][1] * adjx + + span.attrStepY[FRAG_ATTRIB_TEX0][1] * adjy) + (1 << (11 -1)); + dtOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) - 0.5F)))) + ; + } +# 722 "swrast/s_tritemp.h" + } + + + if (setupRight && eRight->lines>0) { + fxRightEdge = eRight->fsx - 1; + fdxRightEdge = eRight->fdxdy; + } + + if (lines==0) { + continue; + } +# 741 "swrast/s_tritemp.h" + dZRowInner = dZRowOuter + sizeof(GLushort); + + fdzInner = fdzOuter + span.zStep; +# 754 "swrast/s_tritemp.h" + dsInner = dsOuter + span.intTexStep[0]; + dtInner = dtOuter + span.intTexStep[1]; +# 767 "swrast/s_tritemp.h" + while (lines > 0) { + + + const GLint right = ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + + + span.z = zLeft; +# 789 "swrast/s_tritemp.h" + span.intTex[0] = sLeft; + span.intTex[1] = tLeft; +# 807 "swrast/s_tritemp.h" + if (span.end > 0 && span.y >= 0) { + const GLint len = span.end - 1; + (void) len; +# 818 "swrast/s_tritemp.h" + { + GLuint i; GLubyte rgb[16384][3]; span.intTex[0] -= (1 << (11 -1)); span.intTex[1] -= (1 << (11 -1)); for (i = 0; i < span.end; i++) { const GLuint z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { GLint s = ((span.intTex[0]) >> 11) & smask; GLint t = ((span.intTex[1]) >> 11) & tmask; GLint pos = (t << twidth_log2) + s; pos = pos + pos + pos; rgb[i][0] = texture[pos+2]; rgb[i][1] = texture[pos+1]; rgb[i][2] = texture[pos+0]; zRow[i] = z; span.array->mask[i] = 1; } else { span.array->mask[i] = 0; } span.intTex[0] += span.intTexStep[0]; span.intTex[1] += span.intTexStep[1]; span.z += span.zStep; } rb->PutRowRGB(ctx, rb, span.end, span.x, span.y, rgb, span.array->mask);; + } + } + + + + + + + + span.y++; + lines--; + + fxLeftEdge += fdxLeftEdge; + fxRightEdge += fdxRightEdge; + + fError += fdError; + if (fError >= 0) { + fError -= (1 << 11); + + + + + + + zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); + + zLeft += fdzOuter; +# 857 "swrast/s_tritemp.h" + sLeft += dsOuter; + tLeft += dtOuter; +# 869 "swrast/s_tritemp.h" + } + else { + + + + + + zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); + + zLeft += fdzInner; +# 889 "swrast/s_tritemp.h" + sLeft += dsInner; + tLeft += dtInner; +# 901 "swrast/s_tritemp.h" + } + } + + } + + } + } +} +# 223 "swrast/s_triangle.c" 2 + + + + +struct affine_info +{ + GLenum filter; + GLenum format; + GLenum envmode; + GLint smask, tmask; + GLint twidth_log2; + const GLchan *texture; + GLfixed er, eg, eb, ea; + GLint tbytesline, tsize; +}; + + +static __inline__ GLint +ilerp(GLint t, GLint a, GLint b) +{ + return a + ((t * (b - a)) >> 11); +} + +static __inline__ GLint +ilerp_2d(GLint ia, GLint ib, GLint v00, GLint v10, GLint v01, GLint v11) +{ + const GLint temp0 = ilerp(ia, v00, v10); + const GLint temp1 = ilerp(ia, v01, v11); + return ilerp(ib, temp0, temp1); +} + + + + + + +static __inline__ void +affine_span(struct gl_context *ctx, SWspan *span, + struct affine_info *info) +{ + GLchan sample[4]; + const GLuint texEnableSave = ctx->Texture._EnabledCoordUnits; +# 399 "swrast/s_triangle.c" + GLuint i; + GLchan *dest = span->array->rgba[0]; + + + ctx->Texture._EnabledCoordUnits = 0x0; + + span->intTex[0] -= (1 << (11 -1)); + span->intTex[1] -= (1 << (11 -1)); + switch (info->filter) { + case 0x2600: + switch (info->format) { + case MESA_FORMAT_RGB888: + switch (info->envmode) { + case 0x2100: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; sample[0] = tex00[2]; sample[1] = tex00[1]; sample[2] = tex00[0]; sample[3] = 255;;dest[0] = span->red * (sample[0] + 1u) >> (11 + 8); dest[1] = span->green * (sample[1] + 1u) >> (11 + 8); dest[2] = span->blue * (sample[2] + 1u) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1u) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x2101: + case 0x1E01: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; sample[0] = tex00[2]; sample[1] = tex00[1]; sample[2] = tex00[0]; sample[3] = 255;; dest[0] = sample[0]; dest[1] = sample[1]; dest[2] = sample[2]; dest[3] = ((span->alpha) >> 11);; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x0BE2: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; sample[0] = tex00[2]; sample[1] = tex00[1]; sample[2] = tex00[0]; sample[3] = 255;;dest[0] = ((255 - sample[0]) * span->red + (sample[0] + 1) * info->er) >> (11 + 8); dest[1] = ((255 - sample[1]) * span->green + (sample[1] + 1) * info->eg) >> (11 + 8); dest[2] = ((255 - sample[2]) * span->blue + (sample[2] + 1) * info->eb) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x0104: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; sample[0] = tex00[2]; sample[1] = tex00[1]; sample[2] = tex00[0]; sample[3] = 255;;{ GLint rSum = ((span->red) >> 11) + (GLint) sample[0]; GLint gSum = ((span->green) >> 11) + (GLint) sample[1]; GLint bSum = ((span->blue) >> 11) + (GLint) sample[2]; dest[0] = ( (rSum)<(255) ? (rSum) : (255) ); dest[1] = ( (gSum)<(255) ? (gSum) : (255) ); dest[2] = ( (bSum)<(255) ? (bSum) : (255) ); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); }; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + default: + _mesa_problem(ctx, "bad tex env mode in SPAN_LINEAR"); + return; + } + break; + case MESA_FORMAT_RGBA8888: + switch(info->envmode) { + case 0x2100: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; sample[0] = tex00[3]; sample[1] = tex00[2]; sample[2] = tex00[1]; sample[3] = tex00[0];;dest[0] = span->red * (sample[0] + 1u) >> (11 + 8); dest[1] = span->green * (sample[1] + 1u) >> (11 + 8); dest[2] = span->blue * (sample[2] + 1u) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1u) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x2101: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; sample[0] = tex00[3]; sample[1] = tex00[2]; sample[2] = tex00[1]; sample[3] = tex00[0];;dest[0] = ((255 - sample[3]) * span->red + ((sample[3] + 1) * sample[0] << 11)) >> (11 + 8); dest[1] = ((255 - sample[3]) * span->green + ((sample[3] + 1) * sample[1] << 11)) >> (11 + 8); dest[2] = ((255 - sample[3]) * span->blue + ((sample[3] + 1) * sample[2] << 11)) >> (11 + 8); dest[3] = ((span->alpha) >> 11); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x0BE2: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; sample[0] = tex00[3]; sample[1] = tex00[2]; sample[2] = tex00[1]; sample[3] = tex00[0];;dest[0] = ((255 - sample[0]) * span->red + (sample[0] + 1) * info->er) >> (11 + 8); dest[1] = ((255 - sample[1]) * span->green + (sample[1] + 1) * info->eg) >> (11 + 8); dest[2] = ((255 - sample[2]) * span->blue + (sample[2] + 1) * info->eb) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x0104: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; sample[0] = tex00[3]; sample[1] = tex00[2]; sample[2] = tex00[1]; sample[3] = tex00[0];;{ GLint rSum = ((span->red) >> 11) + (GLint) sample[0]; GLint gSum = ((span->green) >> 11) + (GLint) sample[1]; GLint bSum = ((span->blue) >> 11) + (GLint) sample[2]; dest[0] = ( (rSum)<(255) ? (rSum) : (255) ); dest[1] = ( (gSum)<(255) ? (gSum) : (255) ); dest[2] = ( (bSum)<(255) ? (bSum) : (255) ); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); }; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x1E01: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; dest[0] = tex00[3]; dest[1] = tex00[2]; dest[2] = tex00[1]; dest[3] = tex00[0]; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + default: + _mesa_problem(ctx, "bad tex env mode (2) in SPAN_LINEAR"); + return; + } + break; + } + break; + + case 0x2601: + span->intTex[0] -= (1 << (11 -1)); + span->intTex[1] -= (1 << (11 -1)); + switch (info->format) { + case MESA_FORMAT_RGB888: + switch (info->envmode) { + case 0x2100: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 3; const GLchan *tex11 = tex10 + 3; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[1] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[2] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]); sample[3] = 255;;dest[0] = span->red * (sample[0] + 1u) >> (11 + 8); dest[1] = span->green * (sample[1] + 1u) >> (11 + 8); dest[2] = span->blue * (sample[2] + 1u) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1u) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x2101: + case 0x1E01: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 3; const GLchan *tex11 = tex10 + 3; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[1] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[2] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]); sample[3] = 255;;do { (dest)[0] = (sample)[0]; (dest)[1] = (sample)[1]; (dest)[2] = (sample)[2]; (dest)[3] = (sample)[3]; } while (0); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x0BE2: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 3; const GLchan *tex11 = tex10 + 3; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[1] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[2] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]); sample[3] = 255;;dest[0] = ((255 - sample[0]) * span->red + (sample[0] + 1) * info->er) >> (11 + 8); dest[1] = ((255 - sample[1]) * span->green + (sample[1] + 1) * info->eg) >> (11 + 8); dest[2] = ((255 - sample[2]) * span->blue + (sample[2] + 1) * info->eb) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x0104: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 3; const GLchan *tex11 = tex10 + 3; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[1] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[2] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]); sample[3] = 255;;{ GLint rSum = ((span->red) >> 11) + (GLint) sample[0]; GLint gSum = ((span->green) >> 11) + (GLint) sample[1]; GLint bSum = ((span->blue) >> 11) + (GLint) sample[2]; dest[0] = ( (rSum)<(255) ? (rSum) : (255) ); dest[1] = ( (gSum)<(255) ? (gSum) : (255) ); dest[2] = ( (bSum)<(255) ? (bSum) : (255) ); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); }; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + default: + _mesa_problem(ctx, "bad tex env mode (3) in SPAN_LINEAR"); + return; + } + break; + case MESA_FORMAT_RGBA8888: + switch (info->envmode) { + case 0x2100: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);dest[0] = span->red * (sample[0] + 1u) >> (11 + 8); dest[1] = span->green * (sample[1] + 1u) >> (11 + 8); dest[2] = span->blue * (sample[2] + 1u) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1u) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x2101: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);dest[0] = ((255 - sample[3]) * span->red + ((sample[3] + 1) * sample[0] << 11)) >> (11 + 8); dest[1] = ((255 - sample[3]) * span->green + ((sample[3] + 1) * sample[1] << 11)) >> (11 + 8); dest[2] = ((255 - sample[3]) * span->blue + ((sample[3] + 1) * sample[2] << 11)) >> (11 + 8); dest[3] = ((span->alpha) >> 11); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x0BE2: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);dest[0] = ((255 - sample[0]) * span->red + (sample[0] + 1) * info->er) >> (11 + 8); dest[1] = ((255 - sample[1]) * span->green + (sample[1] + 1) * info->eg) >> (11 + 8); dest[2] = ((255 - sample[2]) * span->blue + (sample[2] + 1) * info->eb) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x0104: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);{ GLint rSum = ((span->red) >> 11) + (GLint) sample[0]; GLint gSum = ((span->green) >> 11) + (GLint) sample[1]; GLint bSum = ((span->blue) >> 11) + (GLint) sample[2]; dest[0] = ( (rSum)<(255) ? (rSum) : (255) ); dest[1] = ( (gSum)<(255) ? (gSum) : (255) ); dest[2] = ( (bSum)<(255) ? (bSum) : (255) ); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); }; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x1E01: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);do { (dest)[0] = (sample)[0]; (dest)[1] = (sample)[1]; (dest)[2] = (sample)[2]; (dest)[3] = (sample)[3]; } while (0); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + default: + _mesa_problem(ctx, "bad tex env mode (4) in SPAN_LINEAR"); + return; + } + break; + } + break; + } + span->interpMask &= ~0x01; + ; + + _swrast_write_rgba_span(ctx, span); + + + ctx->Texture._EnabledCoordUnits = texEnableSave; + + + +} +# 577 "swrast/s_triangle.c" +# 1 "swrast/s_tritemp.h" 1 +# 111 "swrast/s_tritemp.h" +static void affine_textured_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + typedef struct { + const SWvertex *v0, *v1; + GLfloat dx; + GLfloat dy; + GLfloat dxdy; + GLfixed fdxdy; + GLfloat adjy; + GLfixed fsx; + GLfixed fsy; + GLfixed fx0; + GLint lines; + } EdgeT; + + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + + const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; + const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; + const GLfloat maxDepth = ctx->DrawBuffer->_DepthMaxF; + + + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + + SWspan span; + + (void) swrast; + + do { (span).primitive = (0x0009); (span).interpMask = 0x0; (span).arrayMask = 0x0; (span).arrayAttribs = 0x0; (span).end = 0; (span).leftClip = 0; (span).facing = 0; (span).array = SWRAST_CONTEXT(ctx)->SpanArrays; } while (0); + span.y = 0; + + + (void) fixedToDepthShift; +# 172 "swrast/s_tritemp.h" + { + const GLfixed fy0 = (((int) ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = (((int) ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = (((int) ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + + vMin = v0; vMid = v1; vMax = v2; + vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; + } + else if (fy2 <= fy0) { + + vMin = v2; vMid = v0; vMax = v1; + vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; + } + else { + + vMin = v0; vMid = v2; vMax = v1; + vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; + bf = -bf; + } + } + else { + if (fy0 <= fy2) { + + vMin = v1; vMid = v0; vMax = v2; + vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; + bf = -bf; + } + else if (fy2 <= fy1) { + + vMin = v2; vMid = v1; vMax = v0; + vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; + bf = -bf; + } + else { + + vMin = v1; vMid = v2; vMax = v0; + vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; + } + } + + + vMin_fx = (((int) ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = (((int) ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMax_fx = (((int) ((((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + } + + + eMaj.v0 = vMin; eMaj.v1 = vMax; + eTop.v0 = vMid; eTop.v1 = vMax; + eBot.v0 = vMin; eBot.v1 = vMid; + + + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float) (1 << 11)))); + eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / ((float) (1 << 11)))); + eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + + + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + + if (area * bf * swrast->_BackfaceCullSign < 0.0) + return; + + oneOverArea = 1.0F / area; + + + span.facing = oneOverArea * bf > 0.0F; + } + + + { + eMaj.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eMaj.lines = (((((vMax_fy - eMaj.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eMaj.lines > 0) { + eMaj.dxdy = eMaj.dx / eMaj.dy; + eMaj.fdxdy = (((int) ((((eMaj.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eMaj.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eMaj.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); + eMaj.fx0 = vMin_fx; + eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * eMaj.dxdy); + } + else { + return; + } + + eTop.fsy = (((vMid_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eTop.lines = (((((vMax_fy - eTop.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eTop.lines > 0) { + eTop.dxdy = eTop.dx / eTop.dy; + eTop.fdxdy = (((int) ((((eTop.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eTop.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eTop.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); + eTop.fx0 = vMid_fx; + eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * eTop.dxdy); + } + + eBot.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eBot.lines = (((((vMid_fy - eBot.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eBot.lines > 0) { + eBot.dxdy = eBot.dx / eBot.dy; + eBot.fdxdy = (((int) ((((eBot.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eBot.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eBot.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); + eBot.fx0 = vMin_fx; + eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * eBot.dxdy); + } + } +# 319 "swrast/s_tritemp.h" + { + GLint scan_from_left_to_right; + + + + + + struct affine_info info; struct gl_texture_unit *unit = ctx->Texture.Unit+0; const struct gl_texture_object *obj = ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; const struct gl_texture_image *texImg = obj->Image[0][obj->BaseLevel]; const GLfloat twidth = (GLfloat) texImg->Width; const GLfloat theight = (GLfloat) texImg->Height; info.texture = (const GLchan *) texImg->Data; info.twidth_log2 = texImg->WidthLog2; info.smask = texImg->Width - 1; info.tmask = texImg->Height - 1; info.format = texImg->TexFormat; info.filter = obj->Sampler.MinFilter; info.envmode = unit->EnvMode; info.er = 0; info.eg = 0; info.eb = 0; span.arrayMask |= 0x01; if (info.envmode == 0x0BE2) { info.er = (((int) ((((unit->EnvColor[0] * 255.0F) * ((float) (1 << 11))) >= 0.0F) ? (((unit->EnvColor[0] * 255.0F) * ((float) (1 << 11))) + 0.5F) : (((unit->EnvColor[0] * 255.0F) * ((float) (1 << 11))) - 0.5F)))); info.eg = (((int) ((((unit->EnvColor[1] * 255.0F) * ((float) (1 << 11))) >= 0.0F) ? (((unit->EnvColor[1] * 255.0F) * ((float) (1 << 11))) + 0.5F) : (((unit->EnvColor[1] * 255.0F) * ((float) (1 << 11))) - 0.5F)))); info.eb = (((int) ((((unit->EnvColor[2] * 255.0F) * ((float) (1 << 11))) >= 0.0F) ? (((unit->EnvColor[2] * 255.0F) * ((float) (1 << 11))) + 0.5F) : (((unit->EnvColor[2] * 255.0F) * ((float) (1 << 11))) - 0.5F)))); info.ea = (((int) ((((unit->EnvColor[3] * 255.0F) * ((float) (1 << 11))) >= 0.0F) ? (((unit->EnvColor[3] * 255.0F) * ((float) (1 << 11))) + 0.5F) : (((unit->EnvColor[3] * 255.0F) * ((float) (1 << 11))) - 0.5F)))); } if (!info.texture) { return; } switch (info.format) { case MESA_FORMAT_RGB888: info.tbytesline = texImg->Width * 3; break; case MESA_FORMAT_RGBA8888: info.tbytesline = texImg->Width * 4; break; default: _mesa_problem(((void *)0), "Bad texture format in affine_texture_triangle"); return; } info.tsize = texImg->Height * info.tbytesline; + + + scan_from_left_to_right = (oneOverArea < 0.0F); + + + + + span.interpMask |= 0x02; + { + GLfloat eMaj_dz = vMax->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + GLfloat eBot_dz = vMid->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + span.attrStepX[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); + if (span.attrStepX[FRAG_ATTRIB_WPOS][2] > maxDepth || + span.attrStepX[FRAG_ATTRIB_WPOS][2] < -maxDepth) { + + span.attrStepX[FRAG_ATTRIB_WPOS][2] = 0.0; + span.attrStepY[FRAG_ATTRIB_WPOS][2] = 0.0; + } + else { + span.attrStepY[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); + } + if (depthBits <= 16) + span.zStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))); + else + span.zStep = (GLint) span.attrStepX[FRAG_ATTRIB_WPOS][2]; + } + + + span.interpMask |= 0x01; + if (ctx->Light.ShadeModel == 0x1D01) { + GLfloat eMaj_dr = (GLfloat) (vMax->color[0] - vMin->color[0]); + GLfloat eBot_dr = (GLfloat) (vMid->color[0] - vMin->color[0]); + GLfloat eMaj_dg = (GLfloat) (vMax->color[1] - vMin->color[1]); + GLfloat eBot_dg = (GLfloat) (vMid->color[1] - vMin->color[1]); + GLfloat eMaj_db = (GLfloat) (vMax->color[2] - vMin->color[2]); + GLfloat eBot_db = (GLfloat) (vMid->color[2] - vMin->color[2]); + + GLfloat eMaj_da = (GLfloat) (vMax->color[3] - vMin->color[3]); + GLfloat eBot_da = (GLfloat) (vMid->color[3] - vMin->color[3]); + + span.attrStepX[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); + span.attrStepY[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); + span.attrStepY[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); + span.attrStepY[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); + span.redStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) - 0.5F)))); + span.greenStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) - 0.5F)))); + span.blueStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) - 0.5F)))); + + span.attrStepX[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj_da * eBot.dy - eMaj.dy * eBot_da); + span.attrStepY[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx); + span.alphaStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) - 0.5F)))); + + } + else { + ; + span.interpMask |= 0x04; + span.attrStepX[FRAG_ATTRIB_COL0][0] = span.attrStepY[FRAG_ATTRIB_COL0][0] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][1] = span.attrStepY[FRAG_ATTRIB_COL0][1] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][2] = span.attrStepY[FRAG_ATTRIB_COL0][2] = 0.0F; + span.redStep = 0; + span.greenStep = 0; + span.blueStep = 0; + + span.attrStepX[FRAG_ATTRIB_COL0][3] = span.attrStepY[FRAG_ATTRIB_COL0][3] = 0.0F; + span.alphaStep = 0; + + } + + + { + GLfloat eMaj_ds = (vMax->attrib[FRAG_ATTRIB_TEX0][0] - vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + GLfloat eBot_ds = (vMid->attrib[FRAG_ATTRIB_TEX0][0] - vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + GLfloat eMaj_dt = (vMax->attrib[FRAG_ATTRIB_TEX0][1] - vMin->attrib[FRAG_ATTRIB_TEX0][1]) * theight; + GLfloat eBot_dt = (vMid->attrib[FRAG_ATTRIB_TEX0][1] - vMin->attrib[FRAG_ATTRIB_TEX0][1]) * theight; + span.attrStepX[FRAG_ATTRIB_TEX0][0] = oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); + span.attrStepY[FRAG_ATTRIB_TEX0][0] = oneOverArea * (eMaj.dx * eBot_ds - eMaj_ds * eBot.dx); + span.attrStepX[FRAG_ATTRIB_TEX0][1] = oneOverArea * (eMaj_dt * eBot.dy - eMaj.dy * eBot_dt); + span.attrStepY[FRAG_ATTRIB_TEX0][1] = oneOverArea * (eMaj.dx * eBot_dt - eMaj_dt * eBot.dx); + span.intTexStep[0] = (((int) ((((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) - 0.5F)))); + span.intTexStep[1] = (((int) ((((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) - 0.5F)))); + } +# 488 "swrast/s_tritemp.h" + { + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; + GLfixed fError = 0, fdError = 0; +# 504 "swrast/s_tritemp.h" + GLuint zLeft = 0; + GLfixed fdzOuter = 0, fdzInner; + + + GLint rLeft = 0, fdrOuter = 0, fdrInner; + GLint gLeft = 0, fdgOuter = 0, fdgInner; + GLint bLeft = 0, fdbOuter = 0, fdbInner; + + + GLint aLeft = 0, fdaOuter = 0, fdaInner; + + + GLfixed sLeft=0, dsOuter=0, dsInner; + GLfixed tLeft=0, dtOuter=0, dtInner; + + + + + + + + for (subTriangle=0; subTriangle<=1; subTriangle++) { + EdgeT *eLeft, *eRight; + int setupLeft, setupRight; + int lines; + + if (subTriangle==0) { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eBot; + lines = eRight->lines; + setupLeft = 1; + setupRight = 1; + } + else { + eLeft = &eBot; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 1; + } + } + else { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eTop; + lines = eRight->lines; + setupLeft = 0; + setupRight = 1; + } + else { + eLeft = &eTop; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 0; + } + if (lines == 0) + return; + } + + if (setupLeft && eLeft->lines > 0) { + const SWvertex *vLower = eLeft->v0; + const GLfixed fsy = eLeft->fsy; + const GLfixed fsx = eLeft->fsx; + const GLfixed fx = (((fsx) + (1 << 11) - 1) & (~((1 << 11) - 1))); + const GLfixed adjx = (GLfixed) (fx - eLeft->fx0); + const GLfixed adjy = (GLfixed) eLeft->adjy; + GLint idxOuter; + GLfloat dxOuter; + GLfixed fdxOuter; + + fError = fx - fsx - (1 << 11); + fxLeftEdge = fsx - 1; + fdxLeftEdge = eLeft->fdxdy; + fdxOuter = ((fdxLeftEdge - 1) & (~((1 << 11) - 1))); + fdError = fdxOuter - fdxLeftEdge + (1 << 11); + idxOuter = ((fdxOuter) >> 11); + dxOuter = (GLfloat) idxOuter; + span.y = ((fsy) >> 11); + + + (void) dxOuter; + (void) adjx; + (void) adjy; + (void) vLower; +# 611 "swrast/s_tritemp.h" + { + GLfloat z0 = vLower->attrib[FRAG_ATTRIB_WPOS][2]; + if (depthBits <= 16) { + + GLfloat tmp = (z0 * ((float) (1 << 11)) + + span.attrStepX[FRAG_ATTRIB_WPOS][2] * adjx + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * adjy) + (1 << (11 -1)); + if (tmp < 0xffffffff / 2) + zLeft = (GLfixed) tmp; + else + zLeft = 0xffffffff / 2; + fdzOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + + zLeft = (GLuint) (z0 + span.attrStepX[FRAG_ATTRIB_WPOS][2] * ((adjx) * (1.0F / ((float) (1 << 11)))) + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * ((adjy) * (1.0F / ((float) (1 << 11))))); + fdzOuter = (GLint) (span.attrStepY[FRAG_ATTRIB_WPOS][2] + + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]); + } + + + + + + } + + + if (ctx->Light.ShadeModel == 0x1D01) { + rLeft = (GLint)(((vLower->color[0]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][0] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][0] * adjy) + (1 << (11 -1)); + gLeft = (GLint)(((vLower->color[1]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][1] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][1] * adjy) + (1 << (11 -1)); + bLeft = (GLint)(((vLower->color[2]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][2] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][2] * adjy) + (1 << (11 -1)); + fdrOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) - 0.5F)))) + ; + fdgOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) - 0.5F)))) + ; + fdbOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + + aLeft = (GLint)(((vLower->color[3]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][3] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][3] * adjy) + (1 << (11 -1)); + fdaOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) - 0.5F)))) + ; + + } + else { + ; + rLeft = ((v2->color[0]) << 11); + gLeft = ((v2->color[1]) << 11); + bLeft = ((v2->color[2]) << 11); + fdrOuter = fdgOuter = fdbOuter = 0; + + aLeft = ((v2->color[3]) << 11); + fdaOuter = 0; + + } + + + + + { + GLfloat s0, t0; + s0 = vLower->attrib[FRAG_ATTRIB_TEX0][0] * twidth; + sLeft = (GLfixed)(s0 * ((float) (1 << 11)) + span.attrStepX[FRAG_ATTRIB_TEX0][0] * adjx + + span.attrStepY[FRAG_ATTRIB_TEX0][0] * adjy) + (1 << (11 -1)); + dsOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) - 0.5F)))) + ; + + t0 = vLower->attrib[FRAG_ATTRIB_TEX0][1] * theight; + tLeft = (GLfixed)(t0 * ((float) (1 << 11)) + span.attrStepX[FRAG_ATTRIB_TEX0][1] * adjx + + span.attrStepY[FRAG_ATTRIB_TEX0][1] * adjy) + (1 << (11 -1)); + dtOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) - 0.5F)))) + ; + } +# 722 "swrast/s_tritemp.h" + } + + + if (setupRight && eRight->lines>0) { + fxRightEdge = eRight->fsx - 1; + fdxRightEdge = eRight->fdxdy; + } + + if (lines==0) { + continue; + } +# 743 "swrast/s_tritemp.h" + fdzInner = fdzOuter + span.zStep; + + + fdrInner = fdrOuter + span.redStep; + fdgInner = fdgOuter + span.greenStep; + fdbInner = fdbOuter + span.blueStep; + + + fdaInner = fdaOuter + span.alphaStep; + + + dsInner = dsOuter + span.intTexStep[0]; + dtInner = dtOuter + span.intTexStep[1]; +# 767 "swrast/s_tritemp.h" + while (lines > 0) { + + + const GLint right = ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + + + span.z = zLeft; + + + span.red = rLeft; + span.green = gLeft; + span.blue = bLeft; + + + span.alpha = aLeft; + + + span.intTex[0] = sLeft; + span.intTex[1] = tLeft; +# 807 "swrast/s_tritemp.h" + if (span.end > 0 && span.y >= 0) { + const GLint len = span.end - 1; + (void) len; + + do { GLfixed endVal = span.red + (len) * span.redStep; if (endVal < 0) { span.red -= endVal; } if (span.red < 0) { span.red = 0; } } while (0); + do { GLfixed endVal = span.green + (len) * span.greenStep; if (endVal < 0) { span.green -= endVal; } if (span.green < 0) { span.green = 0; } } while (0); + do { GLfixed endVal = span.blue + (len) * span.blueStep; if (endVal < 0) { span.blue -= endVal; } if (span.blue < 0) { span.blue = 0; } } while (0); + + + do { GLfixed endVal = span.alpha + (len) * span.alphaStep; if (endVal < 0) { span.alpha -= endVal; } if (span.alpha < 0) { span.alpha = 0; } } while (0); + + { + affine_span(ctx, &span, &info);; + } + } + + + + + + + + span.y++; + lines--; + + fxLeftEdge += fdxLeftEdge; + fxRightEdge += fdxRightEdge; + + fError += fdError; + if (fError >= 0) { + fError -= (1 << 11); +# 846 "swrast/s_tritemp.h" + zLeft += fdzOuter; + + + rLeft += fdrOuter; + gLeft += fdgOuter; + bLeft += fdbOuter; + + + aLeft += fdaOuter; + + + sLeft += dsOuter; + tLeft += dtOuter; +# 869 "swrast/s_tritemp.h" + } + else { + + + + + + + + zLeft += fdzInner; + + + rLeft += fdrInner; + gLeft += fdgInner; + bLeft += fdbInner; + + + aLeft += fdaInner; + + + sLeft += dsInner; + tLeft += dtInner; +# 901 "swrast/s_tritemp.h" + } + } + + } + + } + } +} +# 578 "swrast/s_triangle.c" 2 + + + +struct persp_info +{ + GLenum filter; + GLenum format; + GLenum envmode; + GLint smask, tmask; + GLint twidth_log2; + const GLchan *texture; + GLfixed er, eg, eb, ea; + GLint tbytesline, tsize; +}; + + +static __inline__ void +fast_persp_span(struct gl_context *ctx, SWspan *span, + struct persp_info *info) +{ + GLchan sample[4]; +# 662 "swrast/s_triangle.c" + GLuint i; + GLfloat tex_coord[3], tex_step[3]; + GLchan *dest = span->array->rgba[0]; + + const GLuint texEnableSave = ctx->Texture._EnabledCoordUnits; + ctx->Texture._EnabledCoordUnits = 0; + + tex_coord[0] = span->attrStart[FRAG_ATTRIB_TEX0][0] * (info->smask + 1); + tex_step[0] = span->attrStepX[FRAG_ATTRIB_TEX0][0] * (info->smask + 1); + tex_coord[1] = span->attrStart[FRAG_ATTRIB_TEX0][1] * (info->tmask + 1); + tex_step[1] = span->attrStepX[FRAG_ATTRIB_TEX0][1] * (info->tmask + 1); + + tex_coord[2] = span->attrStart[FRAG_ATTRIB_TEX0][3]; + tex_step[2] = span->attrStepX[FRAG_ATTRIB_TEX0][3]; + + switch (info->filter) { + case 0x2600: + switch (info->format) { + case MESA_FORMAT_RGB888: + switch (info->envmode) { + case 0x2100: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; sample[0] = tex00[2]; sample[1] = tex00[1]; sample[2] = tex00[0]; sample[3] = 255;;dest[0] = span->red * (sample[0] + 1u) >> (11 + 8); dest[1] = span->green * (sample[1] + 1u) >> (11 + 8); dest[2] = span->blue * (sample[2] + 1u) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1u) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x2101: + case 0x1E01: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; sample[0] = tex00[2]; sample[1] = tex00[1]; sample[2] = tex00[0]; sample[3] = 255;; dest[0] = sample[0]; dest[1] = sample[1]; dest[2] = sample[2]; dest[3] = ((span->alpha) >> 11);; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x0BE2: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; sample[0] = tex00[2]; sample[1] = tex00[1]; sample[2] = tex00[0]; sample[3] = 255;;dest[0] = ((255 - sample[0]) * span->red + (sample[0] + 1) * info->er) >> (11 + 8); dest[1] = ((255 - sample[1]) * span->green + (sample[1] + 1) * info->eg) >> (11 + 8); dest[2] = ((255 - sample[2]) * span->blue + (sample[2] + 1) * info->eb) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x0104: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; sample[0] = tex00[2]; sample[1] = tex00[1]; sample[2] = tex00[0]; sample[3] = 255;;{ GLint rSum = ((span->red) >> 11) + (GLint) sample[0]; GLint gSum = ((span->green) >> 11) + (GLint) sample[1]; GLint bSum = ((span->blue) >> 11) + (GLint) sample[2]; dest[0] = ( (rSum)<(255) ? (rSum) : (255) ); dest[1] = ( (gSum)<(255) ? (gSum) : (255) ); dest[2] = ( (bSum)<(255) ? (bSum) : (255) ); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); }; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + default: + _mesa_problem(ctx, "bad tex env mode (5) in SPAN_LINEAR"); + return; + } + break; + case MESA_FORMAT_RGBA8888: + switch(info->envmode) { + case 0x2100: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; sample[0] = tex00[3]; sample[1] = tex00[2]; sample[2] = tex00[1]; sample[3] = tex00[0];;dest[0] = span->red * (sample[0] + 1u) >> (11 + 8); dest[1] = span->green * (sample[1] + 1u) >> (11 + 8); dest[2] = span->blue * (sample[2] + 1u) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1u) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x2101: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; sample[0] = tex00[3]; sample[1] = tex00[2]; sample[2] = tex00[1]; sample[3] = tex00[0];;dest[0] = ((255 - sample[3]) * span->red + ((sample[3] + 1) * sample[0] << 11)) >> (11 + 8); dest[1] = ((255 - sample[3]) * span->green + ((sample[3] + 1) * sample[1] << 11)) >> (11 + 8); dest[2] = ((255 - sample[3]) * span->blue + ((sample[3] + 1) * sample[2] << 11)) >> (11 + 8); dest[3] = ((span->alpha) >> 11); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x0BE2: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; sample[0] = tex00[3]; sample[1] = tex00[2]; sample[2] = tex00[1]; sample[3] = tex00[0];;dest[0] = ((255 - sample[0]) * span->red + (sample[0] + 1) * info->er) >> (11 + 8); dest[1] = ((255 - sample[1]) * span->green + (sample[1] + 1) * info->eg) >> (11 + 8); dest[2] = ((255 - sample[2]) * span->blue + (sample[2] + 1) * info->eb) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x0104: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; sample[0] = tex00[3]; sample[1] = tex00[2]; sample[2] = tex00[1]; sample[3] = tex00[0];;{ GLint rSum = ((span->red) >> 11) + (GLint) sample[0]; GLint gSum = ((span->green) >> 11) + (GLint) sample[1]; GLint bSum = ((span->blue) >> 11) + (GLint) sample[2]; dest[0] = ( (rSum)<(255) ? (rSum) : (255) ); dest[1] = ( (gSum)<(255) ? (gSum) : (255) ); dest[2] = ( (bSum)<(255) ? (bSum) : (255) ); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); }; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x1E01: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; dest[0] = tex00[3]; dest[1] = tex00[2]; dest[2] = tex00[1]; dest[3] = tex00[0]; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + default: + _mesa_problem(ctx, "bad tex env mode (6) in SPAN_LINEAR"); + return; + } + break; + } + break; + + case 0x2601: + switch (info->format) { + case MESA_FORMAT_RGB888: + switch (info->envmode) { + case 0x2100: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 3; const GLchan *tex11 = tex10 + 3; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[1] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[2] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]); sample[3] = 255;;dest[0] = span->red * (sample[0] + 1u) >> (11 + 8); dest[1] = span->green * (sample[1] + 1u) >> (11 + 8); dest[2] = span->blue * (sample[2] + 1u) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1u) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x2101: + case 0x1E01: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 3; const GLchan *tex11 = tex10 + 3; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[1] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[2] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]); sample[3] = 255;;do { (dest)[0] = (sample)[0]; (dest)[1] = (sample)[1]; (dest)[2] = (sample)[2]; (dest)[3] = (sample)[3]; } while (0); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x0BE2: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 3; const GLchan *tex11 = tex10 + 3; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[1] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[2] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]); sample[3] = 255;;dest[0] = ((255 - sample[0]) * span->red + (sample[0] + 1) * info->er) >> (11 + 8); dest[1] = ((255 - sample[1]) * span->green + (sample[1] + 1) * info->eg) >> (11 + 8); dest[2] = ((255 - sample[2]) * span->blue + (sample[2] + 1) * info->eb) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x0104: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 3; const GLchan *tex11 = tex10 + 3; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[1] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[2] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]); sample[3] = 255;;{ GLint rSum = ((span->red) >> 11) + (GLint) sample[0]; GLint gSum = ((span->green) >> 11) + (GLint) sample[1]; GLint bSum = ((span->blue) >> 11) + (GLint) sample[2]; dest[0] = ( (rSum)<(255) ? (rSum) : (255) ); dest[1] = ( (gSum)<(255) ? (gSum) : (255) ); dest[2] = ( (bSum)<(255) ? (bSum) : (255) ); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); }; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + default: + _mesa_problem(ctx, "bad tex env mode (7) in SPAN_LINEAR"); + return; + } + break; + case MESA_FORMAT_RGBA8888: + switch (info->envmode) { + case 0x2100: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);dest[0] = span->red * (sample[0] + 1u) >> (11 + 8); dest[1] = span->green * (sample[1] + 1u) >> (11 + 8); dest[2] = span->blue * (sample[2] + 1u) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1u) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x2101: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);dest[0] = ((255 - sample[3]) * span->red + ((sample[3] + 1) * sample[0] << 11)) >> (11 + 8); dest[1] = ((255 - sample[3]) * span->green + ((sample[3] + 1) * sample[1] << 11)) >> (11 + 8); dest[2] = ((255 - sample[3]) * span->blue + ((sample[3] + 1) * sample[2] << 11)) >> (11 + 8); dest[3] = ((span->alpha) >> 11); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x0BE2: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);dest[0] = ((255 - sample[0]) * span->red + (sample[0] + 1) * info->er) >> (11 + 8); dest[1] = ((255 - sample[1]) * span->green + (sample[1] + 1) * info->eg) >> (11 + 8); dest[2] = ((255 - sample[2]) * span->blue + (sample[2] + 1) * info->eb) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x0104: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);{ GLint rSum = ((span->red) >> 11) + (GLint) sample[0]; GLint gSum = ((span->green) >> 11) + (GLint) sample[1]; GLint bSum = ((span->blue) >> 11) + (GLint) sample[2]; dest[0] = ( (rSum)<(255) ? (rSum) : (255) ); dest[1] = ( (gSum)<(255) ? (gSum) : (255) ); dest[2] = ( (bSum)<(255) ? (bSum) : (255) ); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); }; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x1E01: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);do { (dest)[0] = (sample)[0]; (dest)[1] = (sample)[1]; (dest)[2] = (sample)[2]; (dest)[3] = (sample)[3]; } while (0); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + default: + _mesa_problem(ctx, "bad tex env mode (8) in SPAN_LINEAR"); + return; + } + break; + } + break; + } + + ; + _swrast_write_rgba_span(ctx, span); + + + + + + ctx->Texture._EnabledCoordUnits = texEnableSave; +} +# 844 "swrast/s_triangle.c" +# 1 "swrast/s_tritemp.h" 1 +# 111 "swrast/s_tritemp.h" +static void persp_textured_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + typedef struct { + const SWvertex *v0, *v1; + GLfloat dx; + GLfloat dy; + GLfloat dxdy; + GLfixed fdxdy; + GLfloat adjy; + GLfixed fsx; + GLfixed fsy; + GLfixed fx0; + GLint lines; + } EdgeT; + + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + + const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; + const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; + const GLfloat maxDepth = ctx->DrawBuffer->_DepthMaxF; + + + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + + SWspan span; + + (void) swrast; + + do { (span).primitive = (0x0009); (span).interpMask = 0x0; (span).arrayMask = 0x0; (span).arrayAttribs = 0x0; (span).end = 0; (span).leftClip = 0; (span).facing = 0; (span).array = SWRAST_CONTEXT(ctx)->SpanArrays; } while (0); + span.y = 0; + + + (void) fixedToDepthShift; +# 172 "swrast/s_tritemp.h" + { + const GLfixed fy0 = (((int) ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = (((int) ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = (((int) ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + + vMin = v0; vMid = v1; vMax = v2; + vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; + } + else if (fy2 <= fy0) { + + vMin = v2; vMid = v0; vMax = v1; + vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; + } + else { + + vMin = v0; vMid = v2; vMax = v1; + vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; + bf = -bf; + } + } + else { + if (fy0 <= fy2) { + + vMin = v1; vMid = v0; vMax = v2; + vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; + bf = -bf; + } + else if (fy2 <= fy1) { + + vMin = v2; vMid = v1; vMax = v0; + vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; + bf = -bf; + } + else { + + vMin = v1; vMid = v2; vMax = v0; + vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; + } + } + + + vMin_fx = (((int) ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = (((int) ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMax_fx = (((int) ((((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + } + + + eMaj.v0 = vMin; eMaj.v1 = vMax; + eTop.v0 = vMid; eTop.v1 = vMax; + eBot.v0 = vMin; eBot.v1 = vMid; + + + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float) (1 << 11)))); + eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / ((float) (1 << 11)))); + eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + + + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + + if (area * bf * swrast->_BackfaceCullSign < 0.0) + return; + + oneOverArea = 1.0F / area; + + + span.facing = oneOverArea * bf > 0.0F; + } + + + { + eMaj.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eMaj.lines = (((((vMax_fy - eMaj.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eMaj.lines > 0) { + eMaj.dxdy = eMaj.dx / eMaj.dy; + eMaj.fdxdy = (((int) ((((eMaj.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eMaj.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eMaj.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); + eMaj.fx0 = vMin_fx; + eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * eMaj.dxdy); + } + else { + return; + } + + eTop.fsy = (((vMid_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eTop.lines = (((((vMax_fy - eTop.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eTop.lines > 0) { + eTop.dxdy = eTop.dx / eTop.dy; + eTop.fdxdy = (((int) ((((eTop.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eTop.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eTop.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); + eTop.fx0 = vMid_fx; + eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * eTop.dxdy); + } + + eBot.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eBot.lines = (((((vMid_fy - eBot.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eBot.lines > 0) { + eBot.dxdy = eBot.dx / eBot.dy; + eBot.fdxdy = (((int) ((((eBot.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eBot.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eBot.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); + eBot.fx0 = vMin_fx; + eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * eBot.dxdy); + } + } +# 319 "swrast/s_tritemp.h" + { + GLint scan_from_left_to_right; + + + + + + struct persp_info info; const struct gl_texture_unit *unit = ctx->Texture.Unit+0; const struct gl_texture_object *obj = ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; const struct gl_texture_image *texImg = obj->Image[0][obj->BaseLevel]; info.texture = (const GLchan *) texImg->Data; info.twidth_log2 = texImg->WidthLog2; info.smask = texImg->Width - 1; info.tmask = texImg->Height - 1; info.format = texImg->TexFormat; info.filter = obj->Sampler.MinFilter; info.envmode = unit->EnvMode; info.er = 0; info.eg = 0; info.eb = 0; if (info.envmode == 0x0BE2) { info.er = (((int) ((((unit->EnvColor[0] * 255.0F) * ((float) (1 << 11))) >= 0.0F) ? (((unit->EnvColor[0] * 255.0F) * ((float) (1 << 11))) + 0.5F) : (((unit->EnvColor[0] * 255.0F) * ((float) (1 << 11))) - 0.5F)))); info.eg = (((int) ((((unit->EnvColor[1] * 255.0F) * ((float) (1 << 11))) >= 0.0F) ? (((unit->EnvColor[1] * 255.0F) * ((float) (1 << 11))) + 0.5F) : (((unit->EnvColor[1] * 255.0F) * ((float) (1 << 11))) - 0.5F)))); info.eb = (((int) ((((unit->EnvColor[2] * 255.0F) * ((float) (1 << 11))) >= 0.0F) ? (((unit->EnvColor[2] * 255.0F) * ((float) (1 << 11))) + 0.5F) : (((unit->EnvColor[2] * 255.0F) * ((float) (1 << 11))) - 0.5F)))); info.ea = (((int) ((((unit->EnvColor[3] * 255.0F) * ((float) (1 << 11))) >= 0.0F) ? (((unit->EnvColor[3] * 255.0F) * ((float) (1 << 11))) + 0.5F) : (((unit->EnvColor[3] * 255.0F) * ((float) (1 << 11))) - 0.5F)))); } if (!info.texture) { return; } switch (info.format) { case MESA_FORMAT_RGB888: info.tbytesline = texImg->Width * 3; break; case MESA_FORMAT_RGBA8888: info.tbytesline = texImg->Width * 4; break; default: _mesa_problem(((void *)0), "Bad texture format in persp_textured_triangle"); return; } info.tsize = texImg->Height * info.tbytesline; + + + scan_from_left_to_right = (oneOverArea < 0.0F); + + + + + span.interpMask |= 0x02; + { + GLfloat eMaj_dz = vMax->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + GLfloat eBot_dz = vMid->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + span.attrStepX[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); + if (span.attrStepX[FRAG_ATTRIB_WPOS][2] > maxDepth || + span.attrStepX[FRAG_ATTRIB_WPOS][2] < -maxDepth) { + + span.attrStepX[FRAG_ATTRIB_WPOS][2] = 0.0; + span.attrStepY[FRAG_ATTRIB_WPOS][2] = 0.0; + } + else { + span.attrStepY[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); + } + if (depthBits <= 16) + span.zStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))); + else + span.zStep = (GLint) span.attrStepX[FRAG_ATTRIB_WPOS][2]; + } + + + span.interpMask |= 0x01; + if (ctx->Light.ShadeModel == 0x1D01) { + GLfloat eMaj_dr = (GLfloat) (vMax->color[0] - vMin->color[0]); + GLfloat eBot_dr = (GLfloat) (vMid->color[0] - vMin->color[0]); + GLfloat eMaj_dg = (GLfloat) (vMax->color[1] - vMin->color[1]); + GLfloat eBot_dg = (GLfloat) (vMid->color[1] - vMin->color[1]); + GLfloat eMaj_db = (GLfloat) (vMax->color[2] - vMin->color[2]); + GLfloat eBot_db = (GLfloat) (vMid->color[2] - vMin->color[2]); + + GLfloat eMaj_da = (GLfloat) (vMax->color[3] - vMin->color[3]); + GLfloat eBot_da = (GLfloat) (vMid->color[3] - vMin->color[3]); + + span.attrStepX[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); + span.attrStepY[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); + span.attrStepY[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); + span.attrStepY[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); + span.redStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) - 0.5F)))); + span.greenStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) - 0.5F)))); + span.blueStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) - 0.5F)))); + + span.attrStepX[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj_da * eBot.dy - eMaj.dy * eBot_da); + span.attrStepY[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx); + span.alphaStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) - 0.5F)))); + + } + else { + ; + span.interpMask |= 0x04; + span.attrStepX[FRAG_ATTRIB_COL0][0] = span.attrStepY[FRAG_ATTRIB_COL0][0] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][1] = span.attrStepY[FRAG_ATTRIB_COL0][1] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][2] = span.attrStepY[FRAG_ATTRIB_COL0][2] = 0.0F; + span.redStep = 0; + span.greenStep = 0; + span.blueStep = 0; + + span.attrStepX[FRAG_ATTRIB_COL0][3] = span.attrStepY[FRAG_ATTRIB_COL0][3] = 0.0F; + span.alphaStep = 0; + + } +# 412 "swrast/s_tritemp.h" + { + + const GLfloat wMax = vMax->attrib[FRAG_ATTRIB_WPOS][3]; + const GLfloat wMin = vMin->attrib[FRAG_ATTRIB_WPOS][3]; + const GLfloat wMid = vMid->attrib[FRAG_ATTRIB_WPOS][3]; + { + const GLfloat eMaj_dw = wMax - wMin; + const GLfloat eBot_dw = wMid - wMin; + span.attrStepX[FRAG_ATTRIB_WPOS][3] = oneOverArea * (eMaj_dw * eBot.dy - eMaj.dy * eBot_dw); + span.attrStepY[FRAG_ATTRIB_WPOS][3] = oneOverArea * (eMaj.dx * eBot_dw - eMaj_dw * eBot.dx); + } + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + if (swrast->_InterpMode[attr] == 0x1D00) { + do { span.attrStepX[attr][0] = 0.0; span.attrStepX[attr][1] = 0.0; span.attrStepX[attr][2] = 0.0; span.attrStepX[attr][3] = 0.0; } while(0); + do { span.attrStepY[attr][0] = 0.0; span.attrStepY[attr][1] = 0.0; span.attrStepY[attr][2] = 0.0; span.attrStepY[attr][3] = 0.0; } while(0); + } + else { + GLuint c; + for (c = 0; c < 4; c++) { + GLfloat eMaj_da = vMax->attrib[attr][c] * wMax - vMin->attrib[attr][c] * wMin; + GLfloat eBot_da = vMid->attrib[attr][c] * wMid - vMin->attrib[attr][c] * wMin; + span.attrStepX[attr][c] = oneOverArea * (eMaj_da * eBot.dy - eMaj.dy * eBot_da); + span.attrStepY[attr][c] = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx); + } + } + } } + } +# 488 "swrast/s_tritemp.h" + { + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; + GLfixed fError = 0, fdError = 0; +# 504 "swrast/s_tritemp.h" + GLuint zLeft = 0; + GLfixed fdzOuter = 0, fdzInner; + + + GLint rLeft = 0, fdrOuter = 0, fdrInner; + GLint gLeft = 0, fdgOuter = 0, fdgInner; + GLint bLeft = 0, fdbOuter = 0, fdbInner; + + + GLint aLeft = 0, fdaOuter = 0, fdaInner; + + + + + + + GLfloat wLeft = 0, dwOuter = 0, dwInner; + GLfloat attrLeft[FRAG_ATTRIB_MAX][4]; + GLfloat daOuter[FRAG_ATTRIB_MAX][4], daInner[FRAG_ATTRIB_MAX][4]; + + + for (subTriangle=0; subTriangle<=1; subTriangle++) { + EdgeT *eLeft, *eRight; + int setupLeft, setupRight; + int lines; + + if (subTriangle==0) { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eBot; + lines = eRight->lines; + setupLeft = 1; + setupRight = 1; + } + else { + eLeft = &eBot; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 1; + } + } + else { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eTop; + lines = eRight->lines; + setupLeft = 0; + setupRight = 1; + } + else { + eLeft = &eTop; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 0; + } + if (lines == 0) + return; + } + + if (setupLeft && eLeft->lines > 0) { + const SWvertex *vLower = eLeft->v0; + const GLfixed fsy = eLeft->fsy; + const GLfixed fsx = eLeft->fsx; + const GLfixed fx = (((fsx) + (1 << 11) - 1) & (~((1 << 11) - 1))); + const GLfixed adjx = (GLfixed) (fx - eLeft->fx0); + const GLfixed adjy = (GLfixed) eLeft->adjy; + GLint idxOuter; + GLfloat dxOuter; + GLfixed fdxOuter; + + fError = fx - fsx - (1 << 11); + fxLeftEdge = fsx - 1; + fdxLeftEdge = eLeft->fdxdy; + fdxOuter = ((fdxLeftEdge - 1) & (~((1 << 11) - 1))); + fdError = fdxOuter - fdxLeftEdge + (1 << 11); + idxOuter = ((fdxOuter) >> 11); + dxOuter = (GLfloat) idxOuter; + span.y = ((fsy) >> 11); + + + (void) dxOuter; + (void) adjx; + (void) adjy; + (void) vLower; +# 611 "swrast/s_tritemp.h" + { + GLfloat z0 = vLower->attrib[FRAG_ATTRIB_WPOS][2]; + if (depthBits <= 16) { + + GLfloat tmp = (z0 * ((float) (1 << 11)) + + span.attrStepX[FRAG_ATTRIB_WPOS][2] * adjx + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * adjy) + (1 << (11 -1)); + if (tmp < 0xffffffff / 2) + zLeft = (GLfixed) tmp; + else + zLeft = 0xffffffff / 2; + fdzOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + + zLeft = (GLuint) (z0 + span.attrStepX[FRAG_ATTRIB_WPOS][2] * ((adjx) * (1.0F / ((float) (1 << 11)))) + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * ((adjy) * (1.0F / ((float) (1 << 11))))); + fdzOuter = (GLint) (span.attrStepY[FRAG_ATTRIB_WPOS][2] + + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]); + } + + + + + + } + + + if (ctx->Light.ShadeModel == 0x1D01) { + rLeft = (GLint)(((vLower->color[0]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][0] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][0] * adjy) + (1 << (11 -1)); + gLeft = (GLint)(((vLower->color[1]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][1] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][1] * adjy) + (1 << (11 -1)); + bLeft = (GLint)(((vLower->color[2]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][2] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][2] * adjy) + (1 << (11 -1)); + fdrOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) - 0.5F)))) + ; + fdgOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) - 0.5F)))) + ; + fdbOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + + aLeft = (GLint)(((vLower->color[3]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][3] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][3] * adjy) + (1 << (11 -1)); + fdaOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) - 0.5F)))) + ; + + } + else { + ; + rLeft = ((v2->color[0]) << 11); + gLeft = ((v2->color[1]) << 11); + bLeft = ((v2->color[2]) << 11); + fdrOuter = fdgOuter = fdbOuter = 0; + + aLeft = ((v2->color[3]) << 11); + fdaOuter = 0; + + } +# 695 "swrast/s_tritemp.h" + { + const GLuint attr = FRAG_ATTRIB_WPOS; + wLeft = vLower->attrib[FRAG_ATTRIB_WPOS][3] + + (span.attrStepX[attr][3] * adjx + + span.attrStepY[attr][3] * adjy) * (1.0F/((float) (1 << 11))); + dwOuter = span.attrStepY[attr][3] + dxOuter * span.attrStepX[attr][3]; + } + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + const GLfloat invW = vLower->attrib[FRAG_ATTRIB_WPOS][3]; + if (swrast->_InterpMode[attr] == 0x1D00) { + GLuint c; + for (c = 0; c < 4; c++) { + attrLeft[attr][c] = v2->attrib[attr][c] * invW; + daOuter[attr][c] = 0.0; + } + } + else { + GLuint c; + for (c = 0; c < 4; c++) { + const GLfloat a = vLower->attrib[attr][c] * invW; + attrLeft[attr][c] = a + ( span.attrStepX[attr][c] * adjx + + span.attrStepY[attr][c] * adjy) * (1.0F/((float) (1 << 11))); + daOuter[attr][c] = span.attrStepY[attr][c] + dxOuter * span.attrStepX[attr][c]; + } + } + } } + + } + + + if (setupRight && eRight->lines>0) { + fxRightEdge = eRight->fsx - 1; + fdxRightEdge = eRight->fdxdy; + } + + if (lines==0) { + continue; + } +# 743 "swrast/s_tritemp.h" + fdzInner = fdzOuter + span.zStep; + + + fdrInner = fdrOuter + span.redStep; + fdgInner = fdgOuter + span.greenStep; + fdbInner = fdbOuter + span.blueStep; + + + fdaInner = fdaOuter + span.alphaStep; + + + + + + + dwInner = dwOuter + span.attrStepX[FRAG_ATTRIB_WPOS][3]; + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + GLuint c; + for (c = 0; c < 4; c++) { + daInner[attr][c] = daOuter[attr][c] + span.attrStepX[attr][c]; + } + } } + + + while (lines > 0) { + + + const GLint right = ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + + + span.z = zLeft; + + + span.red = rLeft; + span.green = gLeft; + span.blue = bLeft; + + + span.alpha = aLeft; + + + + + + + + span.attrStart[FRAG_ATTRIB_WPOS][3] = wLeft; + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + GLuint c; + for (c = 0; c < 4; c++) { + span.attrStart[attr][c] = attrLeft[attr][c]; + } + } } + + + + + + + if (span.end > 0 && span.y >= 0) { + const GLint len = span.end - 1; + (void) len; + + do { GLfixed endVal = span.red + (len) * span.redStep; if (endVal < 0) { span.red -= endVal; } if (span.red < 0) { span.red = 0; } } while (0); + do { GLfixed endVal = span.green + (len) * span.greenStep; if (endVal < 0) { span.green -= endVal; } if (span.green < 0) { span.green = 0; } } while (0); + do { GLfixed endVal = span.blue + (len) * span.blueStep; if (endVal < 0) { span.blue -= endVal; } if (span.blue < 0) { span.blue = 0; } } while (0); + + + do { GLfixed endVal = span.alpha + (len) * span.alphaStep; if (endVal < 0) { span.alpha -= endVal; } if (span.alpha < 0) { span.alpha = 0; } } while (0); + + { + span.interpMask &= ~0x01; span.arrayMask |= 0x01; fast_persp_span(ctx, &span, &info);; + } + } + + + + + + + + span.y++; + lines--; + + fxLeftEdge += fdxLeftEdge; + fxRightEdge += fdxRightEdge; + + fError += fdError; + if (fError >= 0) { + fError -= (1 << 11); +# 846 "swrast/s_tritemp.h" + zLeft += fdzOuter; + + + rLeft += fdrOuter; + gLeft += fdgOuter; + bLeft += fdbOuter; + + + aLeft += fdaOuter; + + + + + + + wLeft += dwOuter; + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + GLuint c; + for (c = 0; c < 4; c++) { + attrLeft[attr][c] += daOuter[attr][c]; + } + } } + + } + else { + + + + + + + + zLeft += fdzInner; + + + rLeft += fdrInner; + gLeft += fdgInner; + bLeft += fdbInner; + + + aLeft += fdaInner; + + + + + + + wLeft += dwInner; + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + GLuint c; + for (c = 0; c < 4; c++) { + attrLeft[attr][c] += daInner[attr][c]; + } + } } + + } + } + + } + + } + } +} +# 845 "swrast/s_triangle.c" 2 +# 859 "swrast/s_triangle.c" +# 1 "swrast/s_tritemp.h" 1 +# 111 "swrast/s_tritemp.h" +static void general_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + typedef struct { + const SWvertex *v0, *v1; + GLfloat dx; + GLfloat dy; + GLfloat dxdy; + GLfixed fdxdy; + GLfloat adjy; + GLfixed fsx; + GLfixed fsy; + GLfixed fx0; + GLint lines; + } EdgeT; + + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + + const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; + const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; + const GLfloat maxDepth = ctx->DrawBuffer->_DepthMaxF; + + + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + + SWspan span; + + (void) swrast; + + do { (span).primitive = (0x0009); (span).interpMask = 0x0; (span).arrayMask = 0x0; (span).arrayAttribs = 0x0; (span).end = 0; (span).leftClip = 0; (span).facing = 0; (span).array = SWRAST_CONTEXT(ctx)->SpanArrays; } while (0); + span.y = 0; + + + (void) fixedToDepthShift; +# 172 "swrast/s_tritemp.h" + { + const GLfixed fy0 = (((int) ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = (((int) ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = (((int) ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + + vMin = v0; vMid = v1; vMax = v2; + vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; + } + else if (fy2 <= fy0) { + + vMin = v2; vMid = v0; vMax = v1; + vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; + } + else { + + vMin = v0; vMid = v2; vMax = v1; + vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; + bf = -bf; + } + } + else { + if (fy0 <= fy2) { + + vMin = v1; vMid = v0; vMax = v2; + vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; + bf = -bf; + } + else if (fy2 <= fy1) { + + vMin = v2; vMid = v1; vMax = v0; + vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; + bf = -bf; + } + else { + + vMin = v1; vMid = v2; vMax = v0; + vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; + } + } + + + vMin_fx = (((int) ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = (((int) ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMax_fx = (((int) ((((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + } + + + eMaj.v0 = vMin; eMaj.v1 = vMax; + eTop.v0 = vMid; eTop.v1 = vMax; + eBot.v0 = vMin; eBot.v1 = vMid; + + + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float) (1 << 11)))); + eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / ((float) (1 << 11)))); + eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + + + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + + if (area * bf * swrast->_BackfaceCullSign < 0.0) + return; + + oneOverArea = 1.0F / area; + + + span.facing = oneOverArea * bf > 0.0F; + } + + + { + eMaj.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eMaj.lines = (((((vMax_fy - eMaj.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eMaj.lines > 0) { + eMaj.dxdy = eMaj.dx / eMaj.dy; + eMaj.fdxdy = (((int) ((((eMaj.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eMaj.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eMaj.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); + eMaj.fx0 = vMin_fx; + eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * eMaj.dxdy); + } + else { + return; + } + + eTop.fsy = (((vMid_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eTop.lines = (((((vMax_fy - eTop.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eTop.lines > 0) { + eTop.dxdy = eTop.dx / eTop.dy; + eTop.fdxdy = (((int) ((((eTop.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eTop.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eTop.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); + eTop.fx0 = vMid_fx; + eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * eTop.dxdy); + } + + eBot.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eBot.lines = (((((vMid_fy - eBot.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eBot.lines > 0) { + eBot.dxdy = eBot.dx / eBot.dy; + eBot.fdxdy = (((int) ((((eBot.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eBot.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eBot.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); + eBot.fx0 = vMin_fx; + eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * eBot.dxdy); + } + } +# 319 "swrast/s_tritemp.h" + { + GLint scan_from_left_to_right; +# 329 "swrast/s_tritemp.h" + scan_from_left_to_right = (oneOverArea < 0.0F); + + + + + span.interpMask |= 0x02; + { + GLfloat eMaj_dz = vMax->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + GLfloat eBot_dz = vMid->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + span.attrStepX[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); + if (span.attrStepX[FRAG_ATTRIB_WPOS][2] > maxDepth || + span.attrStepX[FRAG_ATTRIB_WPOS][2] < -maxDepth) { + + span.attrStepX[FRAG_ATTRIB_WPOS][2] = 0.0; + span.attrStepY[FRAG_ATTRIB_WPOS][2] = 0.0; + } + else { + span.attrStepY[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); + } + if (depthBits <= 16) + span.zStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))); + else + span.zStep = (GLint) span.attrStepX[FRAG_ATTRIB_WPOS][2]; + } + + + span.interpMask |= 0x01; + if (ctx->Light.ShadeModel == 0x1D01) { + GLfloat eMaj_dr = (GLfloat) (vMax->color[0] - vMin->color[0]); + GLfloat eBot_dr = (GLfloat) (vMid->color[0] - vMin->color[0]); + GLfloat eMaj_dg = (GLfloat) (vMax->color[1] - vMin->color[1]); + GLfloat eBot_dg = (GLfloat) (vMid->color[1] - vMin->color[1]); + GLfloat eMaj_db = (GLfloat) (vMax->color[2] - vMin->color[2]); + GLfloat eBot_db = (GLfloat) (vMid->color[2] - vMin->color[2]); + + GLfloat eMaj_da = (GLfloat) (vMax->color[3] - vMin->color[3]); + GLfloat eBot_da = (GLfloat) (vMid->color[3] - vMin->color[3]); + + span.attrStepX[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); + span.attrStepY[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); + span.attrStepY[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); + span.attrStepY[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); + span.redStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) - 0.5F)))); + span.greenStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) - 0.5F)))); + span.blueStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) - 0.5F)))); + + span.attrStepX[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj_da * eBot.dy - eMaj.dy * eBot_da); + span.attrStepY[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx); + span.alphaStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) - 0.5F)))); + + } + else { + ; + span.interpMask |= 0x04; + span.attrStepX[FRAG_ATTRIB_COL0][0] = span.attrStepY[FRAG_ATTRIB_COL0][0] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][1] = span.attrStepY[FRAG_ATTRIB_COL0][1] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][2] = span.attrStepY[FRAG_ATTRIB_COL0][2] = 0.0F; + span.redStep = 0; + span.greenStep = 0; + span.blueStep = 0; + + span.attrStepX[FRAG_ATTRIB_COL0][3] = span.attrStepY[FRAG_ATTRIB_COL0][3] = 0.0F; + span.alphaStep = 0; + + } +# 412 "swrast/s_tritemp.h" + { + + const GLfloat wMax = vMax->attrib[FRAG_ATTRIB_WPOS][3]; + const GLfloat wMin = vMin->attrib[FRAG_ATTRIB_WPOS][3]; + const GLfloat wMid = vMid->attrib[FRAG_ATTRIB_WPOS][3]; + { + const GLfloat eMaj_dw = wMax - wMin; + const GLfloat eBot_dw = wMid - wMin; + span.attrStepX[FRAG_ATTRIB_WPOS][3] = oneOverArea * (eMaj_dw * eBot.dy - eMaj.dy * eBot_dw); + span.attrStepY[FRAG_ATTRIB_WPOS][3] = oneOverArea * (eMaj.dx * eBot_dw - eMaj_dw * eBot.dx); + } + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + if (swrast->_InterpMode[attr] == 0x1D00) { + do { span.attrStepX[attr][0] = 0.0; span.attrStepX[attr][1] = 0.0; span.attrStepX[attr][2] = 0.0; span.attrStepX[attr][3] = 0.0; } while(0); + do { span.attrStepY[attr][0] = 0.0; span.attrStepY[attr][1] = 0.0; span.attrStepY[attr][2] = 0.0; span.attrStepY[attr][3] = 0.0; } while(0); + } + else { + GLuint c; + for (c = 0; c < 4; c++) { + GLfloat eMaj_da = vMax->attrib[attr][c] * wMax - vMin->attrib[attr][c] * wMin; + GLfloat eBot_da = vMid->attrib[attr][c] * wMid - vMin->attrib[attr][c] * wMin; + span.attrStepX[attr][c] = oneOverArea * (eMaj_da * eBot.dy - eMaj.dy * eBot_da); + span.attrStepY[attr][c] = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx); + } + } + } } + } +# 488 "swrast/s_tritemp.h" + { + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; + GLfixed fError = 0, fdError = 0; +# 504 "swrast/s_tritemp.h" + GLuint zLeft = 0; + GLfixed fdzOuter = 0, fdzInner; + + + GLint rLeft = 0, fdrOuter = 0, fdrInner; + GLint gLeft = 0, fdgOuter = 0, fdgInner; + GLint bLeft = 0, fdbOuter = 0, fdbInner; + + + GLint aLeft = 0, fdaOuter = 0, fdaInner; + + + + + + + GLfloat wLeft = 0, dwOuter = 0, dwInner; + GLfloat attrLeft[FRAG_ATTRIB_MAX][4]; + GLfloat daOuter[FRAG_ATTRIB_MAX][4], daInner[FRAG_ATTRIB_MAX][4]; + + + for (subTriangle=0; subTriangle<=1; subTriangle++) { + EdgeT *eLeft, *eRight; + int setupLeft, setupRight; + int lines; + + if (subTriangle==0) { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eBot; + lines = eRight->lines; + setupLeft = 1; + setupRight = 1; + } + else { + eLeft = &eBot; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 1; + } + } + else { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eTop; + lines = eRight->lines; + setupLeft = 0; + setupRight = 1; + } + else { + eLeft = &eTop; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 0; + } + if (lines == 0) + return; + } + + if (setupLeft && eLeft->lines > 0) { + const SWvertex *vLower = eLeft->v0; + const GLfixed fsy = eLeft->fsy; + const GLfixed fsx = eLeft->fsx; + const GLfixed fx = (((fsx) + (1 << 11) - 1) & (~((1 << 11) - 1))); + const GLfixed adjx = (GLfixed) (fx - eLeft->fx0); + const GLfixed adjy = (GLfixed) eLeft->adjy; + GLint idxOuter; + GLfloat dxOuter; + GLfixed fdxOuter; + + fError = fx - fsx - (1 << 11); + fxLeftEdge = fsx - 1; + fdxLeftEdge = eLeft->fdxdy; + fdxOuter = ((fdxLeftEdge - 1) & (~((1 << 11) - 1))); + fdError = fdxOuter - fdxLeftEdge + (1 << 11); + idxOuter = ((fdxOuter) >> 11); + dxOuter = (GLfloat) idxOuter; + span.y = ((fsy) >> 11); + + + (void) dxOuter; + (void) adjx; + (void) adjy; + (void) vLower; +# 611 "swrast/s_tritemp.h" + { + GLfloat z0 = vLower->attrib[FRAG_ATTRIB_WPOS][2]; + if (depthBits <= 16) { + + GLfloat tmp = (z0 * ((float) (1 << 11)) + + span.attrStepX[FRAG_ATTRIB_WPOS][2] * adjx + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * adjy) + (1 << (11 -1)); + if (tmp < 0xffffffff / 2) + zLeft = (GLfixed) tmp; + else + zLeft = 0xffffffff / 2; + fdzOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + + zLeft = (GLuint) (z0 + span.attrStepX[FRAG_ATTRIB_WPOS][2] * ((adjx) * (1.0F / ((float) (1 << 11)))) + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * ((adjy) * (1.0F / ((float) (1 << 11))))); + fdzOuter = (GLint) (span.attrStepY[FRAG_ATTRIB_WPOS][2] + + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]); + } + + + + + + } + + + if (ctx->Light.ShadeModel == 0x1D01) { + rLeft = (GLint)(((vLower->color[0]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][0] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][0] * adjy) + (1 << (11 -1)); + gLeft = (GLint)(((vLower->color[1]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][1] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][1] * adjy) + (1 << (11 -1)); + bLeft = (GLint)(((vLower->color[2]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][2] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][2] * adjy) + (1 << (11 -1)); + fdrOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) - 0.5F)))) + ; + fdgOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) - 0.5F)))) + ; + fdbOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + + aLeft = (GLint)(((vLower->color[3]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][3] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][3] * adjy) + (1 << (11 -1)); + fdaOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) - 0.5F)))) + ; + + } + else { + ; + rLeft = ((v2->color[0]) << 11); + gLeft = ((v2->color[1]) << 11); + bLeft = ((v2->color[2]) << 11); + fdrOuter = fdgOuter = fdbOuter = 0; + + aLeft = ((v2->color[3]) << 11); + fdaOuter = 0; + + } +# 695 "swrast/s_tritemp.h" + { + const GLuint attr = FRAG_ATTRIB_WPOS; + wLeft = vLower->attrib[FRAG_ATTRIB_WPOS][3] + + (span.attrStepX[attr][3] * adjx + + span.attrStepY[attr][3] * adjy) * (1.0F/((float) (1 << 11))); + dwOuter = span.attrStepY[attr][3] + dxOuter * span.attrStepX[attr][3]; + } + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + const GLfloat invW = vLower->attrib[FRAG_ATTRIB_WPOS][3]; + if (swrast->_InterpMode[attr] == 0x1D00) { + GLuint c; + for (c = 0; c < 4; c++) { + attrLeft[attr][c] = v2->attrib[attr][c] * invW; + daOuter[attr][c] = 0.0; + } + } + else { + GLuint c; + for (c = 0; c < 4; c++) { + const GLfloat a = vLower->attrib[attr][c] * invW; + attrLeft[attr][c] = a + ( span.attrStepX[attr][c] * adjx + + span.attrStepY[attr][c] * adjy) * (1.0F/((float) (1 << 11))); + daOuter[attr][c] = span.attrStepY[attr][c] + dxOuter * span.attrStepX[attr][c]; + } + } + } } + + } + + + if (setupRight && eRight->lines>0) { + fxRightEdge = eRight->fsx - 1; + fdxRightEdge = eRight->fdxdy; + } + + if (lines==0) { + continue; + } +# 743 "swrast/s_tritemp.h" + fdzInner = fdzOuter + span.zStep; + + + fdrInner = fdrOuter + span.redStep; + fdgInner = fdgOuter + span.greenStep; + fdbInner = fdbOuter + span.blueStep; + + + fdaInner = fdaOuter + span.alphaStep; + + + + + + + dwInner = dwOuter + span.attrStepX[FRAG_ATTRIB_WPOS][3]; + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + GLuint c; + for (c = 0; c < 4; c++) { + daInner[attr][c] = daOuter[attr][c] + span.attrStepX[attr][c]; + } + } } + + + while (lines > 0) { + + + const GLint right = ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + + + span.z = zLeft; + + + span.red = rLeft; + span.green = gLeft; + span.blue = bLeft; + + + span.alpha = aLeft; + + + + + + + + span.attrStart[FRAG_ATTRIB_WPOS][3] = wLeft; + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + GLuint c; + for (c = 0; c < 4; c++) { + span.attrStart[attr][c] = attrLeft[attr][c]; + } + } } + + + + + + + if (span.end > 0 && span.y >= 0) { + const GLint len = span.end - 1; + (void) len; + + do { GLfixed endVal = span.red + (len) * span.redStep; if (endVal < 0) { span.red -= endVal; } if (span.red < 0) { span.red = 0; } } while (0); + do { GLfixed endVal = span.green + (len) * span.greenStep; if (endVal < 0) { span.green -= endVal; } if (span.green < 0) { span.green = 0; } } while (0); + do { GLfixed endVal = span.blue + (len) * span.blueStep; if (endVal < 0) { span.blue -= endVal; } if (span.blue < 0) { span.blue = 0; } } while (0); + + + do { GLfixed endVal = span.alpha + (len) * span.alphaStep; if (endVal < 0) { span.alpha -= endVal; } if (span.alpha < 0) { span.alpha = 0; } } while (0); + + { + _swrast_write_rgba_span(ctx, &span);; + } + } + + + + + + + + span.y++; + lines--; + + fxLeftEdge += fdxLeftEdge; + fxRightEdge += fdxRightEdge; + + fError += fdError; + if (fError >= 0) { + fError -= (1 << 11); +# 846 "swrast/s_tritemp.h" + zLeft += fdzOuter; + + + rLeft += fdrOuter; + gLeft += fdgOuter; + bLeft += fdbOuter; + + + aLeft += fdaOuter; + + + + + + + wLeft += dwOuter; + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + GLuint c; + for (c = 0; c < 4; c++) { + attrLeft[attr][c] += daOuter[attr][c]; + } + } } + + } + else { + + + + + + + + zLeft += fdzInner; + + + rLeft += fdrInner; + gLeft += fdgInner; + bLeft += fdbInner; + + + aLeft += fdaInner; + + + + + + + wLeft += dwInner; + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + GLuint c; + for (c = 0; c < 4; c++) { + attrLeft[attr][c] += daInner[attr][c]; + } + } } + + } + } + + } + + } + } +} +# 860 "swrast/s_triangle.c" 2 +# 902 "swrast/s_triangle.c" +# 1 "swrast/s_tritemp.h" 1 +# 111 "swrast/s_tritemp.h" +static void occlusion_zless_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + typedef struct { + const SWvertex *v0, *v1; + GLfloat dx; + GLfloat dy; + GLfloat dxdy; + GLfixed fdxdy; + GLfloat adjy; + GLfixed fsx; + GLfixed fsy; + GLfixed fx0; + GLint lines; + } EdgeT; + + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + + const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; + const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; + const GLfloat maxDepth = ctx->DrawBuffer->_DepthMaxF; + + + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + + SWspan span; + + (void) swrast; + + do { (span).primitive = (0x0009); (span).interpMask = 0x0; (span).arrayMask = 0x0; (span).arrayAttribs = 0x0; (span).end = 0; (span).leftClip = 0; (span).facing = 0; (span).array = SWRAST_CONTEXT(ctx)->SpanArrays; } while (0); + span.y = 0; + + + (void) fixedToDepthShift; +# 172 "swrast/s_tritemp.h" + { + const GLfixed fy0 = (((int) ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = (((int) ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = (((int) ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + + vMin = v0; vMid = v1; vMax = v2; + vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; + } + else if (fy2 <= fy0) { + + vMin = v2; vMid = v0; vMax = v1; + vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; + } + else { + + vMin = v0; vMid = v2; vMax = v1; + vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; + bf = -bf; + } + } + else { + if (fy0 <= fy2) { + + vMin = v1; vMid = v0; vMax = v2; + vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; + bf = -bf; + } + else if (fy2 <= fy1) { + + vMin = v2; vMid = v1; vMax = v0; + vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; + bf = -bf; + } + else { + + vMin = v1; vMid = v2; vMax = v0; + vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; + } + } + + + vMin_fx = (((int) ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = (((int) ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMax_fx = (((int) ((((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + } + + + eMaj.v0 = vMin; eMaj.v1 = vMax; + eTop.v0 = vMid; eTop.v1 = vMax; + eBot.v0 = vMin; eBot.v1 = vMid; + + + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float) (1 << 11)))); + eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / ((float) (1 << 11)))); + eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + + + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + + if (area * bf * swrast->_BackfaceCullSign < 0.0) + return; + + oneOverArea = 1.0F / area; + + + span.facing = oneOverArea * bf > 0.0F; + } + + + { + eMaj.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eMaj.lines = (((((vMax_fy - eMaj.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eMaj.lines > 0) { + eMaj.dxdy = eMaj.dx / eMaj.dy; + eMaj.fdxdy = (((int) ((((eMaj.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eMaj.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eMaj.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); + eMaj.fx0 = vMin_fx; + eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * eMaj.dxdy); + } + else { + return; + } + + eTop.fsy = (((vMid_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eTop.lines = (((((vMax_fy - eTop.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eTop.lines > 0) { + eTop.dxdy = eTop.dx / eTop.dy; + eTop.fdxdy = (((int) ((((eTop.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eTop.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eTop.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); + eTop.fx0 = vMid_fx; + eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * eTop.dxdy); + } + + eBot.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eBot.lines = (((((vMid_fy - eBot.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eBot.lines > 0) { + eBot.dxdy = eBot.dx / eBot.dy; + eBot.fdxdy = (((int) ((((eBot.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eBot.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eBot.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); + eBot.fx0 = vMin_fx; + eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * eBot.dxdy); + } + } +# 319 "swrast/s_tritemp.h" + { + GLint scan_from_left_to_right; + + + + + + struct gl_renderbuffer *rb = ctx->DrawBuffer->_DepthBuffer; struct gl_query_object *q = ctx->Query.CurrentOcclusionObject; ; ; ; if (!q) { return; } + + + scan_from_left_to_right = (oneOverArea < 0.0F); + + + + + span.interpMask |= 0x02; + { + GLfloat eMaj_dz = vMax->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + GLfloat eBot_dz = vMid->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + span.attrStepX[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); + if (span.attrStepX[FRAG_ATTRIB_WPOS][2] > maxDepth || + span.attrStepX[FRAG_ATTRIB_WPOS][2] < -maxDepth) { + + span.attrStepX[FRAG_ATTRIB_WPOS][2] = 0.0; + span.attrStepY[FRAG_ATTRIB_WPOS][2] = 0.0; + } + else { + span.attrStepY[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); + } + if (depthBits <= 16) + span.zStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))); + else + span.zStep = (GLint) span.attrStepX[FRAG_ATTRIB_WPOS][2]; + } +# 488 "swrast/s_tritemp.h" + { + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; + GLfixed fError = 0, fdError = 0; +# 504 "swrast/s_tritemp.h" + GLuint zLeft = 0; + GLfixed fdzOuter = 0, fdzInner; +# 525 "swrast/s_tritemp.h" + for (subTriangle=0; subTriangle<=1; subTriangle++) { + EdgeT *eLeft, *eRight; + int setupLeft, setupRight; + int lines; + + if (subTriangle==0) { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eBot; + lines = eRight->lines; + setupLeft = 1; + setupRight = 1; + } + else { + eLeft = &eBot; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 1; + } + } + else { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eTop; + lines = eRight->lines; + setupLeft = 0; + setupRight = 1; + } + else { + eLeft = &eTop; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 0; + } + if (lines == 0) + return; + } + + if (setupLeft && eLeft->lines > 0) { + const SWvertex *vLower = eLeft->v0; + const GLfixed fsy = eLeft->fsy; + const GLfixed fsx = eLeft->fsx; + const GLfixed fx = (((fsx) + (1 << 11) - 1) & (~((1 << 11) - 1))); + const GLfixed adjx = (GLfixed) (fx - eLeft->fx0); + const GLfixed adjy = (GLfixed) eLeft->adjy; + GLint idxOuter; + GLfloat dxOuter; + GLfixed fdxOuter; + + fError = fx - fsx - (1 << 11); + fxLeftEdge = fsx - 1; + fdxLeftEdge = eLeft->fdxdy; + fdxOuter = ((fdxLeftEdge - 1) & (~((1 << 11) - 1))); + fdError = fdxOuter - fdxLeftEdge + (1 << 11); + idxOuter = ((fdxOuter) >> 11); + dxOuter = (GLfloat) idxOuter; + span.y = ((fsy) >> 11); + + + (void) dxOuter; + (void) adjx; + (void) adjy; + (void) vLower; +# 611 "swrast/s_tritemp.h" + { + GLfloat z0 = vLower->attrib[FRAG_ATTRIB_WPOS][2]; + if (depthBits <= 16) { + + GLfloat tmp = (z0 * ((float) (1 << 11)) + + span.attrStepX[FRAG_ATTRIB_WPOS][2] * adjx + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * adjy) + (1 << (11 -1)); + if (tmp < 0xffffffff / 2) + zLeft = (GLfixed) tmp; + else + zLeft = 0xffffffff / 2; + fdzOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + + zLeft = (GLuint) (z0 + span.attrStepX[FRAG_ATTRIB_WPOS][2] * ((adjx) * (1.0F / ((float) (1 << 11)))) + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * ((adjy) * (1.0F / ((float) (1 << 11))))); + fdzOuter = (GLint) (span.attrStepY[FRAG_ATTRIB_WPOS][2] + + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]); + } + + + + + + } +# 722 "swrast/s_tritemp.h" + } + + + if (setupRight && eRight->lines>0) { + fxRightEdge = eRight->fsx - 1; + fdxRightEdge = eRight->fdxdy; + } + + if (lines==0) { + continue; + } +# 743 "swrast/s_tritemp.h" + fdzInner = fdzOuter + span.zStep; +# 767 "swrast/s_tritemp.h" + while (lines > 0) { + + + const GLint right = ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + + + span.z = zLeft; +# 807 "swrast/s_tritemp.h" + if (span.end > 0 && span.y >= 0) { + const GLint len = span.end - 1; + (void) len; +# 818 "swrast/s_tritemp.h" + { + if (rb->Format == MESA_FORMAT_Z16) { GLuint i; const GLushort *zRow = (const GLushort *) rb->GetPointer(ctx, rb, span.x, span.y); for (i = 0; i < span.end; i++) { GLuint z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { q->Result++; } span.z += span.zStep; } } else { GLuint i; const GLuint *zRow = (const GLuint *) rb->GetPointer(ctx, rb, span.x, span.y); for (i = 0; i < span.end; i++) { if ((GLuint)span.z < zRow[i]) { q->Result++; } span.z += span.zStep; } }; + } + } + + + + + + + + span.y++; + lines--; + + fxLeftEdge += fdxLeftEdge; + fxRightEdge += fdxRightEdge; + + fError += fdError; + if (fError >= 0) { + fError -= (1 << 11); +# 846 "swrast/s_tritemp.h" + zLeft += fdzOuter; +# 869 "swrast/s_tritemp.h" + } + else { + + + + + + + + zLeft += fdzInner; +# 901 "swrast/s_tritemp.h" + } + } + + } + + } + } +} +# 903 "swrast/s_triangle.c" 2 + + + +static void +nodraw_triangle( struct gl_context *ctx, + const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + (void) (ctx && v0 && v1 && v2); +} +# 922 "swrast/s_triangle.c" +void +_swrast_add_spec_terms_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, const SWvertex *v2) +{ + SWvertex *ncv0 = (SWvertex *)v0; + SWvertex *ncv1 = (SWvertex *)v1; + SWvertex *ncv2 = (SWvertex *)v2; + GLfloat rSum, gSum, bSum; + GLchan cSave[3][4]; + + + do { (cSave[0])[0] = (ncv0->color)[0]; (cSave[0])[1] = (ncv0->color)[1]; (cSave[0])[2] = (ncv0->color)[2]; (cSave[0])[3] = (ncv0->color)[3]; } while (0); + do { (cSave[1])[0] = (ncv1->color)[0]; (cSave[1])[1] = (ncv1->color)[1]; (cSave[1])[2] = (ncv1->color)[2]; (cSave[1])[3] = (ncv1->color)[3]; } while (0); + do { (cSave[2])[0] = (ncv2->color)[0]; (cSave[2])[1] = (ncv2->color)[1]; (cSave[2])[2] = (ncv2->color)[2]; (cSave[2])[3] = (ncv2->color)[3]; } while (0); + + rSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv0->color[0])] + ncv0->attrib[FRAG_ATTRIB_COL1][0]; + gSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv0->color[1])] + ncv0->attrib[FRAG_ATTRIB_COL1][1]; + bSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv0->color[2])] + ncv0->attrib[FRAG_ATTRIB_COL1][2]; + do { fi_type __tmp; __tmp.f = (rSum); if (__tmp.i < 0) ncv0->color[0] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv0->color[0] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv0->color[0] = (GLubyte) __tmp.i; } } while (0); + do { fi_type __tmp; __tmp.f = (gSum); if (__tmp.i < 0) ncv0->color[1] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv0->color[1] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv0->color[1] = (GLubyte) __tmp.i; } } while (0); + do { fi_type __tmp; __tmp.f = (bSum); if (__tmp.i < 0) ncv0->color[2] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv0->color[2] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv0->color[2] = (GLubyte) __tmp.i; } } while (0); + + rSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv1->color[0])] + ncv1->attrib[FRAG_ATTRIB_COL1][0]; + gSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv1->color[1])] + ncv1->attrib[FRAG_ATTRIB_COL1][1]; + bSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv1->color[2])] + ncv1->attrib[FRAG_ATTRIB_COL1][2]; + do { fi_type __tmp; __tmp.f = (rSum); if (__tmp.i < 0) ncv1->color[0] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv1->color[0] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv1->color[0] = (GLubyte) __tmp.i; } } while (0); + do { fi_type __tmp; __tmp.f = (gSum); if (__tmp.i < 0) ncv1->color[1] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv1->color[1] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv1->color[1] = (GLubyte) __tmp.i; } } while (0); + do { fi_type __tmp; __tmp.f = (bSum); if (__tmp.i < 0) ncv1->color[2] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv1->color[2] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv1->color[2] = (GLubyte) __tmp.i; } } while (0); + + rSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv2->color[0])] + ncv2->attrib[FRAG_ATTRIB_COL1][0]; + gSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv2->color[1])] + ncv2->attrib[FRAG_ATTRIB_COL1][1]; + bSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv2->color[2])] + ncv2->attrib[FRAG_ATTRIB_COL1][2]; + do { fi_type __tmp; __tmp.f = (rSum); if (__tmp.i < 0) ncv2->color[0] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv2->color[0] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv2->color[0] = (GLubyte) __tmp.i; } } while (0); + do { fi_type __tmp; __tmp.f = (gSum); if (__tmp.i < 0) ncv2->color[1] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv2->color[1] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv2->color[1] = (GLubyte) __tmp.i; } } while (0); + do { fi_type __tmp; __tmp.f = (bSum); if (__tmp.i < 0) ncv2->color[2] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv2->color[2] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv2->color[2] = (GLubyte) __tmp.i; } } while (0); + + SWRAST_CONTEXT(ctx)->SpecTriangle( ctx, ncv0, ncv1, ncv2 ); + + do { (ncv0->color)[0] = (cSave[0])[0]; (ncv0->color)[1] = (cSave[0])[1]; (ncv0->color)[2] = (cSave[0])[2]; (ncv0->color)[3] = (cSave[0])[3]; } while (0); + do { (ncv1->color)[0] = (cSave[1])[0]; (ncv1->color)[1] = (cSave[1])[1]; (ncv1->color)[2] = (cSave[1])[2]; (ncv1->color)[3] = (cSave[1])[3]; } while (0); + do { (ncv2->color)[0] = (cSave[2])[0]; (ncv2->color)[1] = (cSave[2])[1]; (ncv2->color)[2] = (cSave[2])[2]; (ncv2->color)[3] = (cSave[2])[3]; } while (0); +} +# 995 "swrast/s_triangle.c" +void +_swrast_choose_triangle( struct gl_context *ctx ) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + + if (ctx->Polygon.CullFlag && + ctx->Polygon.CullFaceMode == 0x0408) { + swrast->Triangle = nodraw_triangle;; + return; + } + + if (ctx->RenderMode==0x1C00) { + + if (ctx->Polygon.SmoothFlag) { + _swrast_set_aa_triangle_function(ctx); + ; + return; + } + + + if (ctx->Query.CurrentOcclusionObject && + ctx->Depth.Test && + ctx->Depth.Mask == 0x0 && + ctx->Depth.Func == 0x0201 && + !ctx->Stencil._Enabled) { + if (ctx->Color.ColorMask[0][0] == 0 && + ctx->Color.ColorMask[0][1] == 0 && + ctx->Color.ColorMask[0][2] == 0 && + ctx->Color.ColorMask[0][3] == 0) { + swrast->Triangle = occlusion_zless_triangle;; + return; + } + } + + + + + + if (ctx->Texture._EnabledCoordUnits || + ctx->FragmentProgram._Current || + ctx->ATIFragmentShader._Enabled || + _mesa_need_secondary_color(ctx) || + swrast->_FogEnabled) { + + const struct gl_texture_object *texObj2D; + const struct gl_texture_image *texImg; + GLenum minFilter, magFilter, envMode; + gl_format format; + texObj2D = ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; + + texImg = texObj2D ? texObj2D->Image[0][texObj2D->BaseLevel] : ((void *)0); + format = texImg ? texImg->TexFormat : MESA_FORMAT_NONE; + minFilter = texObj2D ? texObj2D->Sampler.MinFilter : 0x0; + magFilter = texObj2D ? texObj2D->Sampler.MagFilter : 0x0; + envMode = ctx->Texture.Unit[0].EnvMode; + + + if (ctx->Texture._EnabledCoordUnits == 0x1 + && !ctx->FragmentProgram._Current + && !ctx->ATIFragmentShader._Enabled + && ctx->Texture._EnabledUnits == 0x1 + && ctx->Texture.Unit[0]._ReallyEnabled == (1 << TEXTURE_2D_INDEX) + && texObj2D->Sampler.WrapS == 0x2901 + && texObj2D->Sampler.WrapT == 0x2901 + && texObj2D->_Swizzle == (((0)<<0) | ((1)<<3) | ((2)<<6) | ((3)<<9)) + && texImg->_IsPowerOfTwo + && texImg->Border == 0 + && texImg->Width == texImg->RowStride + && (format == MESA_FORMAT_RGB888 || format == MESA_FORMAT_RGBA8888) + && minFilter == magFilter + && ctx->Light.Model.ColorControl == 0x81F9 + && !swrast->_FogEnabled + && ctx->Texture.Unit[0].EnvMode != 0x8570 + && ctx->Texture.Unit[0].EnvMode != 0x8503) { + if (ctx->Hint.PerspectiveCorrection==0x1101) { + if (minFilter == 0x2600 + && format == MESA_FORMAT_RGB888 + && (envMode == 0x1E01 || envMode == 0x2101) + && ((swrast->_RasterMask == (0x004 | 0x1000) + && ctx->Depth.Func == 0x0201 + && ctx->Depth.Mask == 0x1) + || swrast->_RasterMask == 0x1000) + && ctx->Polygon.StippleFlag == 0x0 + && ctx->DrawBuffer->Visual.depthBits <= 16) { + if (swrast->_RasterMask == (0x004 | 0x1000)) { + swrast->Triangle = simple_z_textured_triangle;; + } + else { + swrast->Triangle = simple_textured_triangle;; + } + } + else { + + + + if (format == MESA_FORMAT_RGBA8888 && !_mesa_little_endian()) { + + + + swrast->Triangle = general_triangle;; + } + else { + swrast->Triangle = affine_textured_triangle;; + } + + } + } + else { + + + + swrast->Triangle = persp_textured_triangle;; + + } + } + else { + + swrast->Triangle = general_triangle;; + } + } + else { + ; + ; + if (ctx->Light.ShadeModel==0x1D01) { + + + + + swrast->Triangle = smooth_rgba_triangle;; + + } + else { + + + + + swrast->Triangle = flat_rgba_triangle;; + + } + } + } + else if (ctx->RenderMode==0x1C01) { + swrast->Triangle = _swrast_feedback_triangle;; + } + else { + + swrast->Triangle = _swrast_select_triangle;; + } +} diff --git a/394889/reduce-ice b/394889/reduce-ice new file mode 100755 index 0000000..f1c3d0e --- /dev/null +++ b/394889/reduce-ice @@ -0,0 +1,13 @@ +#!/bin/bash +# +# Run like: +# multidelta -level=# ./reduce-ice $FILE +# levels: 0 0 1 1 2 2 10 10 +# + +FILE=s_triangle.i +CC=hppa2.0-unknown-linux-gnu-gcc +CFLAGS="-march=2.0 -g -O2 -fpic" +STRING="internal compiler error: in simplify_subreg, at simplify-rtx.c:5147" + +$CC -pipe -c $CFLAGS $FILE 2>&1 | grep "$STRING" diff --git a/394889/s_triangle.i b/394889/s_triangle.i new file mode 100644 index 0000000..a18c13f --- /dev/null +++ b/394889/s_triangle.i @@ -0,0 +1,103 @@ +static __inline__ int IS_INF_OR_NAN(float x) +{ + union { + float f; + int i; + } tmp; + tmp.f = x; + return tmp.i; +} + +static void simple_textured_triangle(float **v1) +{ + float **v0; + float **v2; + typedef struct { + float dx; + float dy; + int fsx; + int fx0; + int lines; + } EdgeT; + EdgeT eMaj; + EdgeT eTop; + EdgeT eBot; + float oneOverArea; + float **vMin; + float **vMid; + float **vMax; + int vMin_fx; + int vMin_fy; + int vMid_fx; + int vMid_fy; + int vMax_fx; + int vMax_fy; + if (v1[0][1] <= v2[0][1]) { + vMin = v0; + vMax = v1; + vMin_fy = v0[0][1]; + } + vMin_fx = vMin[0][0]; + vMid_fx = + vMid[4][0] ? ((vMid[4][0] * (float)2048) + + 0.5F) : ((vMid[4][0] * (float)2048) - 0.5F); + eMaj.dx = (vMax_fx - vMin_fx) * (1.0F / (float)2048); + eMaj.dy = (vMax_fy - vMin_fy) * (1.0F / (float)2048); + eTop.dx = (vMax_fx - vMid_fx) * (1.0F / (float)2048); + eBot.dy = (vMid_fy - vMin_fy) * (1.0F / (float)2048); + float area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area)) + return; + oneOverArea = 1.0F / area; + eBot.fx0 = vMin_fx; + int scan_from_left_to_right; + float eMaj_ds = (vMax[4][0] - vMin[4][0]); + float eBot_ds; + float stepx = oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); + int step = (stepx >= 0.0F) ? stepx : (stepx * (float)2048) - 0.5F; + int subTriangle; + int fxRightEdge = 0; + for (subTriangle = 0; subTriangle <= 1; subTriangle++) { + EdgeT *eRight; + int lines; + if (subTriangle == 0) { + if (scan_from_left_to_right) { + eRight = &eBot; + lines = eRight->lines; + } else { + eRight = &eMaj; + } + } else { + if (scan_from_left_to_right) { + eRight = &eTop; + } + fxRightEdge = eRight->fsx; + } + while (lines > 0) { + int end; + int x; + int y; + x = 0; + if (fxRightEdge <= x) + end = 0; + else + end = fxRightEdge - x; + if (end > 0 && y >= 0) { + int i; + char *rgb; + for (i = 0; i < end; i++) { + int it; + char *texture; + rgb[i] = texture[it]; + it += step; + } + PutRowRGB(rgb); + } + } + } +} + +void *foo() +{ + return simple_textured_triangle; +} diff --git a/394889/s_triangle.i.0 b/394889/s_triangle.i.0 new file mode 100644 index 0000000..79dcb74 --- /dev/null +++ b/394889/s_triangle.i.0 @@ -0,0 +1,21465 @@ +# 1 "swrast/s_triangle.c" +# 1 "/mnt/alt/portage/media-libs/mesa-7.11/work/Mesa-7.11/src/mesa//" +# 1 "" +# 1 "" +# 1 "swrast/s_triangle.c" +# 32 "swrast/s_triangle.c" +# 1 "../../src/mesa/main/glheader.h" 1 +# 53 "../../src/mesa/main/glheader.h" +# 1 "../../include/GL/gl.h" 1 +# 155 "../../include/GL/gl.h" +typedef unsigned int GLenum; +typedef unsigned char GLboolean; +typedef unsigned int GLbitfield; +typedef void GLvoid; +typedef signed char GLbyte; +typedef short GLshort; +typedef int GLint; +typedef unsigned char GLubyte; +typedef unsigned short GLushort; +typedef unsigned int GLuint; +typedef int GLsizei; +typedef float GLfloat; +typedef float GLclampf; +typedef double GLdouble; +typedef double GLclampd; +# 782 "../../include/GL/gl.h" +__attribute__((visibility("default"))) void glClearIndex( GLfloat c ); + +__attribute__((visibility("default"))) void glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ); + +__attribute__((visibility("default"))) void glClear( GLbitfield mask ); + +__attribute__((visibility("default"))) void glIndexMask( GLuint mask ); + +__attribute__((visibility("default"))) void glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ); + +__attribute__((visibility("default"))) void glAlphaFunc( GLenum func, GLclampf ref ); + +__attribute__((visibility("default"))) void glBlendFunc( GLenum sfactor, GLenum dfactor ); + +__attribute__((visibility("default"))) void glLogicOp( GLenum opcode ); + +__attribute__((visibility("default"))) void glCullFace( GLenum mode ); + +__attribute__((visibility("default"))) void glFrontFace( GLenum mode ); + +__attribute__((visibility("default"))) void glPointSize( GLfloat size ); + +__attribute__((visibility("default"))) void glLineWidth( GLfloat width ); + +__attribute__((visibility("default"))) void glLineStipple( GLint factor, GLushort pattern ); + +__attribute__((visibility("default"))) void glPolygonMode( GLenum face, GLenum mode ); + +__attribute__((visibility("default"))) void glPolygonOffset( GLfloat factor, GLfloat units ); + +__attribute__((visibility("default"))) void glPolygonStipple( const GLubyte *mask ); + +__attribute__((visibility("default"))) void glGetPolygonStipple( GLubyte *mask ); + +__attribute__((visibility("default"))) void glEdgeFlag( GLboolean flag ); + +__attribute__((visibility("default"))) void glEdgeFlagv( const GLboolean *flag ); + +__attribute__((visibility("default"))) void glScissor( GLint x, GLint y, GLsizei width, GLsizei height); + +__attribute__((visibility("default"))) void glClipPlane( GLenum plane, const GLdouble *equation ); + +__attribute__((visibility("default"))) void glGetClipPlane( GLenum plane, GLdouble *equation ); + +__attribute__((visibility("default"))) void glDrawBuffer( GLenum mode ); + +__attribute__((visibility("default"))) void glReadBuffer( GLenum mode ); + +__attribute__((visibility("default"))) void glEnable( GLenum cap ); + +__attribute__((visibility("default"))) void glDisable( GLenum cap ); + +__attribute__((visibility("default"))) GLboolean glIsEnabled( GLenum cap ); + + +__attribute__((visibility("default"))) void glEnableClientState( GLenum cap ); + +__attribute__((visibility("default"))) void glDisableClientState( GLenum cap ); + + +__attribute__((visibility("default"))) void glGetBooleanv( GLenum pname, GLboolean *params ); + +__attribute__((visibility("default"))) void glGetDoublev( GLenum pname, GLdouble *params ); + +__attribute__((visibility("default"))) void glGetFloatv( GLenum pname, GLfloat *params ); + +__attribute__((visibility("default"))) void glGetIntegerv( GLenum pname, GLint *params ); + + +__attribute__((visibility("default"))) void glPushAttrib( GLbitfield mask ); + +__attribute__((visibility("default"))) void glPopAttrib( void ); + + +__attribute__((visibility("default"))) void glPushClientAttrib( GLbitfield mask ); + +__attribute__((visibility("default"))) void glPopClientAttrib( void ); + + +__attribute__((visibility("default"))) GLint glRenderMode( GLenum mode ); + +__attribute__((visibility("default"))) GLenum glGetError( void ); + +__attribute__((visibility("default"))) const GLubyte * glGetString( GLenum name ); + +__attribute__((visibility("default"))) void glFinish( void ); + +__attribute__((visibility("default"))) void glFlush( void ); + +__attribute__((visibility("default"))) void glHint( GLenum target, GLenum mode ); + + + + + + +__attribute__((visibility("default"))) void glClearDepth( GLclampd depth ); + +__attribute__((visibility("default"))) void glDepthFunc( GLenum func ); + +__attribute__((visibility("default"))) void glDepthMask( GLboolean flag ); + +__attribute__((visibility("default"))) void glDepthRange( GLclampd near_val, GLclampd far_val ); + + + + + + +__attribute__((visibility("default"))) void glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ); + +__attribute__((visibility("default"))) void glAccum( GLenum op, GLfloat value ); + + + + + + +__attribute__((visibility("default"))) void glMatrixMode( GLenum mode ); + +__attribute__((visibility("default"))) void glOrtho( GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, + GLdouble near_val, GLdouble far_val ); + +__attribute__((visibility("default"))) void glFrustum( GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, + GLdouble near_val, GLdouble far_val ); + +__attribute__((visibility("default"))) void glViewport( GLint x, GLint y, + GLsizei width, GLsizei height ); + +__attribute__((visibility("default"))) void glPushMatrix( void ); + +__attribute__((visibility("default"))) void glPopMatrix( void ); + +__attribute__((visibility("default"))) void glLoadIdentity( void ); + +__attribute__((visibility("default"))) void glLoadMatrixd( const GLdouble *m ); +__attribute__((visibility("default"))) void glLoadMatrixf( const GLfloat *m ); + +__attribute__((visibility("default"))) void glMultMatrixd( const GLdouble *m ); +__attribute__((visibility("default"))) void glMultMatrixf( const GLfloat *m ); + +__attribute__((visibility("default"))) void glRotated( GLdouble angle, + GLdouble x, GLdouble y, GLdouble z ); +__attribute__((visibility("default"))) void glRotatef( GLfloat angle, + GLfloat x, GLfloat y, GLfloat z ); + +__attribute__((visibility("default"))) void glScaled( GLdouble x, GLdouble y, GLdouble z ); +__attribute__((visibility("default"))) void glScalef( GLfloat x, GLfloat y, GLfloat z ); + +__attribute__((visibility("default"))) void glTranslated( GLdouble x, GLdouble y, GLdouble z ); +__attribute__((visibility("default"))) void glTranslatef( GLfloat x, GLfloat y, GLfloat z ); + + + + + + +__attribute__((visibility("default"))) GLboolean glIsList( GLuint list ); + +__attribute__((visibility("default"))) void glDeleteLists( GLuint list, GLsizei range ); + +__attribute__((visibility("default"))) GLuint glGenLists( GLsizei range ); + +__attribute__((visibility("default"))) void glNewList( GLuint list, GLenum mode ); + +__attribute__((visibility("default"))) void glEndList( void ); + +__attribute__((visibility("default"))) void glCallList( GLuint list ); + +__attribute__((visibility("default"))) void glCallLists( GLsizei n, GLenum type, + const GLvoid *lists ); + +__attribute__((visibility("default"))) void glListBase( GLuint base ); + + + + + + +__attribute__((visibility("default"))) void glBegin( GLenum mode ); + +__attribute__((visibility("default"))) void glEnd( void ); + + +__attribute__((visibility("default"))) void glVertex2d( GLdouble x, GLdouble y ); +__attribute__((visibility("default"))) void glVertex2f( GLfloat x, GLfloat y ); +__attribute__((visibility("default"))) void glVertex2i( GLint x, GLint y ); +__attribute__((visibility("default"))) void glVertex2s( GLshort x, GLshort y ); + +__attribute__((visibility("default"))) void glVertex3d( GLdouble x, GLdouble y, GLdouble z ); +__attribute__((visibility("default"))) void glVertex3f( GLfloat x, GLfloat y, GLfloat z ); +__attribute__((visibility("default"))) void glVertex3i( GLint x, GLint y, GLint z ); +__attribute__((visibility("default"))) void glVertex3s( GLshort x, GLshort y, GLshort z ); + +__attribute__((visibility("default"))) void glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w ); +__attribute__((visibility("default"))) void glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ); +__attribute__((visibility("default"))) void glVertex4i( GLint x, GLint y, GLint z, GLint w ); +__attribute__((visibility("default"))) void glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w ); + +__attribute__((visibility("default"))) void glVertex2dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glVertex2fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glVertex2iv( const GLint *v ); +__attribute__((visibility("default"))) void glVertex2sv( const GLshort *v ); + +__attribute__((visibility("default"))) void glVertex3dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glVertex3fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glVertex3iv( const GLint *v ); +__attribute__((visibility("default"))) void glVertex3sv( const GLshort *v ); + +__attribute__((visibility("default"))) void glVertex4dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glVertex4fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glVertex4iv( const GLint *v ); +__attribute__((visibility("default"))) void glVertex4sv( const GLshort *v ); + + +__attribute__((visibility("default"))) void glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz ); +__attribute__((visibility("default"))) void glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz ); +__attribute__((visibility("default"))) void glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz ); +__attribute__((visibility("default"))) void glNormal3i( GLint nx, GLint ny, GLint nz ); +__attribute__((visibility("default"))) void glNormal3s( GLshort nx, GLshort ny, GLshort nz ); + +__attribute__((visibility("default"))) void glNormal3bv( const GLbyte *v ); +__attribute__((visibility("default"))) void glNormal3dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glNormal3fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glNormal3iv( const GLint *v ); +__attribute__((visibility("default"))) void glNormal3sv( const GLshort *v ); + + +__attribute__((visibility("default"))) void glIndexd( GLdouble c ); +__attribute__((visibility("default"))) void glIndexf( GLfloat c ); +__attribute__((visibility("default"))) void glIndexi( GLint c ); +__attribute__((visibility("default"))) void glIndexs( GLshort c ); +__attribute__((visibility("default"))) void glIndexub( GLubyte c ); + +__attribute__((visibility("default"))) void glIndexdv( const GLdouble *c ); +__attribute__((visibility("default"))) void glIndexfv( const GLfloat *c ); +__attribute__((visibility("default"))) void glIndexiv( const GLint *c ); +__attribute__((visibility("default"))) void glIndexsv( const GLshort *c ); +__attribute__((visibility("default"))) void glIndexubv( const GLubyte *c ); + +__attribute__((visibility("default"))) void glColor3b( GLbyte red, GLbyte green, GLbyte blue ); +__attribute__((visibility("default"))) void glColor3d( GLdouble red, GLdouble green, GLdouble blue ); +__attribute__((visibility("default"))) void glColor3f( GLfloat red, GLfloat green, GLfloat blue ); +__attribute__((visibility("default"))) void glColor3i( GLint red, GLint green, GLint blue ); +__attribute__((visibility("default"))) void glColor3s( GLshort red, GLshort green, GLshort blue ); +__attribute__((visibility("default"))) void glColor3ub( GLubyte red, GLubyte green, GLubyte blue ); +__attribute__((visibility("default"))) void glColor3ui( GLuint red, GLuint green, GLuint blue ); +__attribute__((visibility("default"))) void glColor3us( GLushort red, GLushort green, GLushort blue ); + +__attribute__((visibility("default"))) void glColor4b( GLbyte red, GLbyte green, + GLbyte blue, GLbyte alpha ); +__attribute__((visibility("default"))) void glColor4d( GLdouble red, GLdouble green, + GLdouble blue, GLdouble alpha ); +__attribute__((visibility("default"))) void glColor4f( GLfloat red, GLfloat green, + GLfloat blue, GLfloat alpha ); +__attribute__((visibility("default"))) void glColor4i( GLint red, GLint green, + GLint blue, GLint alpha ); +__attribute__((visibility("default"))) void glColor4s( GLshort red, GLshort green, + GLshort blue, GLshort alpha ); +__attribute__((visibility("default"))) void glColor4ub( GLubyte red, GLubyte green, + GLubyte blue, GLubyte alpha ); +__attribute__((visibility("default"))) void glColor4ui( GLuint red, GLuint green, + GLuint blue, GLuint alpha ); +__attribute__((visibility("default"))) void glColor4us( GLushort red, GLushort green, + GLushort blue, GLushort alpha ); + + +__attribute__((visibility("default"))) void glColor3bv( const GLbyte *v ); +__attribute__((visibility("default"))) void glColor3dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glColor3fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glColor3iv( const GLint *v ); +__attribute__((visibility("default"))) void glColor3sv( const GLshort *v ); +__attribute__((visibility("default"))) void glColor3ubv( const GLubyte *v ); +__attribute__((visibility("default"))) void glColor3uiv( const GLuint *v ); +__attribute__((visibility("default"))) void glColor3usv( const GLushort *v ); + +__attribute__((visibility("default"))) void glColor4bv( const GLbyte *v ); +__attribute__((visibility("default"))) void glColor4dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glColor4fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glColor4iv( const GLint *v ); +__attribute__((visibility("default"))) void glColor4sv( const GLshort *v ); +__attribute__((visibility("default"))) void glColor4ubv( const GLubyte *v ); +__attribute__((visibility("default"))) void glColor4uiv( const GLuint *v ); +__attribute__((visibility("default"))) void glColor4usv( const GLushort *v ); + + +__attribute__((visibility("default"))) void glTexCoord1d( GLdouble s ); +__attribute__((visibility("default"))) void glTexCoord1f( GLfloat s ); +__attribute__((visibility("default"))) void glTexCoord1i( GLint s ); +__attribute__((visibility("default"))) void glTexCoord1s( GLshort s ); + +__attribute__((visibility("default"))) void glTexCoord2d( GLdouble s, GLdouble t ); +__attribute__((visibility("default"))) void glTexCoord2f( GLfloat s, GLfloat t ); +__attribute__((visibility("default"))) void glTexCoord2i( GLint s, GLint t ); +__attribute__((visibility("default"))) void glTexCoord2s( GLshort s, GLshort t ); + +__attribute__((visibility("default"))) void glTexCoord3d( GLdouble s, GLdouble t, GLdouble r ); +__attribute__((visibility("default"))) void glTexCoord3f( GLfloat s, GLfloat t, GLfloat r ); +__attribute__((visibility("default"))) void glTexCoord3i( GLint s, GLint t, GLint r ); +__attribute__((visibility("default"))) void glTexCoord3s( GLshort s, GLshort t, GLshort r ); + +__attribute__((visibility("default"))) void glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q ); +__attribute__((visibility("default"))) void glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q ); +__attribute__((visibility("default"))) void glTexCoord4i( GLint s, GLint t, GLint r, GLint q ); +__attribute__((visibility("default"))) void glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q ); + +__attribute__((visibility("default"))) void glTexCoord1dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glTexCoord1fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glTexCoord1iv( const GLint *v ); +__attribute__((visibility("default"))) void glTexCoord1sv( const GLshort *v ); + +__attribute__((visibility("default"))) void glTexCoord2dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glTexCoord2fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glTexCoord2iv( const GLint *v ); +__attribute__((visibility("default"))) void glTexCoord2sv( const GLshort *v ); + +__attribute__((visibility("default"))) void glTexCoord3dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glTexCoord3fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glTexCoord3iv( const GLint *v ); +__attribute__((visibility("default"))) void glTexCoord3sv( const GLshort *v ); + +__attribute__((visibility("default"))) void glTexCoord4dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glTexCoord4fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glTexCoord4iv( const GLint *v ); +__attribute__((visibility("default"))) void glTexCoord4sv( const GLshort *v ); + + +__attribute__((visibility("default"))) void glRasterPos2d( GLdouble x, GLdouble y ); +__attribute__((visibility("default"))) void glRasterPos2f( GLfloat x, GLfloat y ); +__attribute__((visibility("default"))) void glRasterPos2i( GLint x, GLint y ); +__attribute__((visibility("default"))) void glRasterPos2s( GLshort x, GLshort y ); + +__attribute__((visibility("default"))) void glRasterPos3d( GLdouble x, GLdouble y, GLdouble z ); +__attribute__((visibility("default"))) void glRasterPos3f( GLfloat x, GLfloat y, GLfloat z ); +__attribute__((visibility("default"))) void glRasterPos3i( GLint x, GLint y, GLint z ); +__attribute__((visibility("default"))) void glRasterPos3s( GLshort x, GLshort y, GLshort z ); + +__attribute__((visibility("default"))) void glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w ); +__attribute__((visibility("default"))) void glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ); +__attribute__((visibility("default"))) void glRasterPos4i( GLint x, GLint y, GLint z, GLint w ); +__attribute__((visibility("default"))) void glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w ); + +__attribute__((visibility("default"))) void glRasterPos2dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glRasterPos2fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glRasterPos2iv( const GLint *v ); +__attribute__((visibility("default"))) void glRasterPos2sv( const GLshort *v ); + +__attribute__((visibility("default"))) void glRasterPos3dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glRasterPos3fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glRasterPos3iv( const GLint *v ); +__attribute__((visibility("default"))) void glRasterPos3sv( const GLshort *v ); + +__attribute__((visibility("default"))) void glRasterPos4dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glRasterPos4fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glRasterPos4iv( const GLint *v ); +__attribute__((visibility("default"))) void glRasterPos4sv( const GLshort *v ); + + +__attribute__((visibility("default"))) void glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 ); +__attribute__((visibility("default"))) void glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 ); +__attribute__((visibility("default"))) void glRecti( GLint x1, GLint y1, GLint x2, GLint y2 ); +__attribute__((visibility("default"))) void glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 ); + + +__attribute__((visibility("default"))) void glRectdv( const GLdouble *v1, const GLdouble *v2 ); +__attribute__((visibility("default"))) void glRectfv( const GLfloat *v1, const GLfloat *v2 ); +__attribute__((visibility("default"))) void glRectiv( const GLint *v1, const GLint *v2 ); +__attribute__((visibility("default"))) void glRectsv( const GLshort *v1, const GLshort *v2 ); + + + + + + +__attribute__((visibility("default"))) void glVertexPointer( GLint size, GLenum type, + GLsizei stride, const GLvoid *ptr ); + +__attribute__((visibility("default"))) void glNormalPointer( GLenum type, GLsizei stride, + const GLvoid *ptr ); + +__attribute__((visibility("default"))) void glColorPointer( GLint size, GLenum type, + GLsizei stride, const GLvoid *ptr ); + +__attribute__((visibility("default"))) void glIndexPointer( GLenum type, GLsizei stride, + const GLvoid *ptr ); + +__attribute__((visibility("default"))) void glTexCoordPointer( GLint size, GLenum type, + GLsizei stride, const GLvoid *ptr ); + +__attribute__((visibility("default"))) void glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr ); + +__attribute__((visibility("default"))) void glGetPointerv( GLenum pname, GLvoid **params ); + +__attribute__((visibility("default"))) void glArrayElement( GLint i ); + +__attribute__((visibility("default"))) void glDrawArrays( GLenum mode, GLint first, GLsizei count ); + +__attribute__((visibility("default"))) void glDrawElements( GLenum mode, GLsizei count, + GLenum type, const GLvoid *indices ); + +__attribute__((visibility("default"))) void glInterleavedArrays( GLenum format, GLsizei stride, + const GLvoid *pointer ); + + + + + +__attribute__((visibility("default"))) void glShadeModel( GLenum mode ); + +__attribute__((visibility("default"))) void glLightf( GLenum light, GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glLighti( GLenum light, GLenum pname, GLint param ); +__attribute__((visibility("default"))) void glLightfv( GLenum light, GLenum pname, + const GLfloat *params ); +__attribute__((visibility("default"))) void glLightiv( GLenum light, GLenum pname, + const GLint *params ); + +__attribute__((visibility("default"))) void glGetLightfv( GLenum light, GLenum pname, + GLfloat *params ); +__attribute__((visibility("default"))) void glGetLightiv( GLenum light, GLenum pname, + GLint *params ); + +__attribute__((visibility("default"))) void glLightModelf( GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glLightModeli( GLenum pname, GLint param ); +__attribute__((visibility("default"))) void glLightModelfv( GLenum pname, const GLfloat *params ); +__attribute__((visibility("default"))) void glLightModeliv( GLenum pname, const GLint *params ); + +__attribute__((visibility("default"))) void glMaterialf( GLenum face, GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glMateriali( GLenum face, GLenum pname, GLint param ); +__attribute__((visibility("default"))) void glMaterialfv( GLenum face, GLenum pname, const GLfloat *params ); +__attribute__((visibility("default"))) void glMaterialiv( GLenum face, GLenum pname, const GLint *params ); + +__attribute__((visibility("default"))) void glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params ); +__attribute__((visibility("default"))) void glGetMaterialiv( GLenum face, GLenum pname, GLint *params ); + +__attribute__((visibility("default"))) void glColorMaterial( GLenum face, GLenum mode ); + + + + + + +__attribute__((visibility("default"))) void glPixelZoom( GLfloat xfactor, GLfloat yfactor ); + +__attribute__((visibility("default"))) void glPixelStoref( GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glPixelStorei( GLenum pname, GLint param ); + +__attribute__((visibility("default"))) void glPixelTransferf( GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glPixelTransferi( GLenum pname, GLint param ); + +__attribute__((visibility("default"))) void glPixelMapfv( GLenum map, GLsizei mapsize, + const GLfloat *values ); +__attribute__((visibility("default"))) void glPixelMapuiv( GLenum map, GLsizei mapsize, + const GLuint *values ); +__attribute__((visibility("default"))) void glPixelMapusv( GLenum map, GLsizei mapsize, + const GLushort *values ); + +__attribute__((visibility("default"))) void glGetPixelMapfv( GLenum map, GLfloat *values ); +__attribute__((visibility("default"))) void glGetPixelMapuiv( GLenum map, GLuint *values ); +__attribute__((visibility("default"))) void glGetPixelMapusv( GLenum map, GLushort *values ); + +__attribute__((visibility("default"))) void glBitmap( GLsizei width, GLsizei height, + GLfloat xorig, GLfloat yorig, + GLfloat xmove, GLfloat ymove, + const GLubyte *bitmap ); + +__attribute__((visibility("default"))) void glReadPixels( GLint x, GLint y, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + GLvoid *pixels ); + +__attribute__((visibility("default"))) void glDrawPixels( GLsizei width, GLsizei height, + GLenum format, GLenum type, + const GLvoid *pixels ); + +__attribute__((visibility("default"))) void glCopyPixels( GLint x, GLint y, + GLsizei width, GLsizei height, + GLenum type ); + + + + + +__attribute__((visibility("default"))) void glStencilFunc( GLenum func, GLint ref, GLuint mask ); + +__attribute__((visibility("default"))) void glStencilMask( GLuint mask ); + +__attribute__((visibility("default"))) void glStencilOp( GLenum fail, GLenum zfail, GLenum zpass ); + +__attribute__((visibility("default"))) void glClearStencil( GLint s ); + + + + + + + +__attribute__((visibility("default"))) void glTexGend( GLenum coord, GLenum pname, GLdouble param ); +__attribute__((visibility("default"))) void glTexGenf( GLenum coord, GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glTexGeni( GLenum coord, GLenum pname, GLint param ); + +__attribute__((visibility("default"))) void glTexGendv( GLenum coord, GLenum pname, const GLdouble *params ); +__attribute__((visibility("default"))) void glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params ); +__attribute__((visibility("default"))) void glTexGeniv( GLenum coord, GLenum pname, const GLint *params ); + +__attribute__((visibility("default"))) void glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params ); +__attribute__((visibility("default"))) void glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ); +__attribute__((visibility("default"))) void glGetTexGeniv( GLenum coord, GLenum pname, GLint *params ); + + +__attribute__((visibility("default"))) void glTexEnvf( GLenum target, GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glTexEnvi( GLenum target, GLenum pname, GLint param ); + +__attribute__((visibility("default"))) void glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params ); +__attribute__((visibility("default"))) void glTexEnviv( GLenum target, GLenum pname, const GLint *params ); + +__attribute__((visibility("default"))) void glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params ); +__attribute__((visibility("default"))) void glGetTexEnviv( GLenum target, GLenum pname, GLint *params ); + + +__attribute__((visibility("default"))) void glTexParameterf( GLenum target, GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glTexParameteri( GLenum target, GLenum pname, GLint param ); + +__attribute__((visibility("default"))) void glTexParameterfv( GLenum target, GLenum pname, + const GLfloat *params ); +__attribute__((visibility("default"))) void glTexParameteriv( GLenum target, GLenum pname, + const GLint *params ); + +__attribute__((visibility("default"))) void glGetTexParameterfv( GLenum target, + GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetTexParameteriv( GLenum target, + GLenum pname, GLint *params ); + +__attribute__((visibility("default"))) void glGetTexLevelParameterfv( GLenum target, GLint level, + GLenum pname, GLfloat *params ); +__attribute__((visibility("default"))) void glGetTexLevelParameteriv( GLenum target, GLint level, + GLenum pname, GLint *params ); + + +__attribute__((visibility("default"))) void glTexImage1D( GLenum target, GLint level, + GLint internalFormat, + GLsizei width, GLint border, + GLenum format, GLenum type, + const GLvoid *pixels ); + +__attribute__((visibility("default"))) void glTexImage2D( GLenum target, GLint level, + GLint internalFormat, + GLsizei width, GLsizei height, + GLint border, GLenum format, GLenum type, + const GLvoid *pixels ); + +__attribute__((visibility("default"))) void glGetTexImage( GLenum target, GLint level, + GLenum format, GLenum type, + GLvoid *pixels ); + + + + +__attribute__((visibility("default"))) void glGenTextures( GLsizei n, GLuint *textures ); + +__attribute__((visibility("default"))) void glDeleteTextures( GLsizei n, const GLuint *textures); + +__attribute__((visibility("default"))) void glBindTexture( GLenum target, GLuint texture ); + +__attribute__((visibility("default"))) void glPrioritizeTextures( GLsizei n, + const GLuint *textures, + const GLclampf *priorities ); + +__attribute__((visibility("default"))) GLboolean glAreTexturesResident( GLsizei n, + const GLuint *textures, + GLboolean *residences ); + +__attribute__((visibility("default"))) GLboolean glIsTexture( GLuint texture ); + + +__attribute__((visibility("default"))) void glTexSubImage1D( GLenum target, GLint level, + GLint xoffset, + GLsizei width, GLenum format, + GLenum type, const GLvoid *pixels ); + + +__attribute__((visibility("default"))) void glTexSubImage2D( GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const GLvoid *pixels ); + + +__attribute__((visibility("default"))) void glCopyTexImage1D( GLenum target, GLint level, + GLenum internalformat, + GLint x, GLint y, + GLsizei width, GLint border ); + + +__attribute__((visibility("default"))) void glCopyTexImage2D( GLenum target, GLint level, + GLenum internalformat, + GLint x, GLint y, + GLsizei width, GLsizei height, + GLint border ); + + +__attribute__((visibility("default"))) void glCopyTexSubImage1D( GLenum target, GLint level, + GLint xoffset, GLint x, GLint y, + GLsizei width ); + + +__attribute__((visibility("default"))) void glCopyTexSubImage2D( GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint x, GLint y, + GLsizei width, GLsizei height ); + + + + + + +__attribute__((visibility("default"))) void glMap1d( GLenum target, GLdouble u1, GLdouble u2, + GLint stride, + GLint order, const GLdouble *points ); +__attribute__((visibility("default"))) void glMap1f( GLenum target, GLfloat u1, GLfloat u2, + GLint stride, + GLint order, const GLfloat *points ); + +__attribute__((visibility("default"))) void glMap2d( GLenum target, + GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, + GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, + const GLdouble *points ); +__attribute__((visibility("default"))) void glMap2f( GLenum target, + GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, + GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, + const GLfloat *points ); + +__attribute__((visibility("default"))) void glGetMapdv( GLenum target, GLenum query, GLdouble *v ); +__attribute__((visibility("default"))) void glGetMapfv( GLenum target, GLenum query, GLfloat *v ); +__attribute__((visibility("default"))) void glGetMapiv( GLenum target, GLenum query, GLint *v ); + +__attribute__((visibility("default"))) void glEvalCoord1d( GLdouble u ); +__attribute__((visibility("default"))) void glEvalCoord1f( GLfloat u ); + +__attribute__((visibility("default"))) void glEvalCoord1dv( const GLdouble *u ); +__attribute__((visibility("default"))) void glEvalCoord1fv( const GLfloat *u ); + +__attribute__((visibility("default"))) void glEvalCoord2d( GLdouble u, GLdouble v ); +__attribute__((visibility("default"))) void glEvalCoord2f( GLfloat u, GLfloat v ); + +__attribute__((visibility("default"))) void glEvalCoord2dv( const GLdouble *u ); +__attribute__((visibility("default"))) void glEvalCoord2fv( const GLfloat *u ); + +__attribute__((visibility("default"))) void glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 ); +__attribute__((visibility("default"))) void glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 ); + +__attribute__((visibility("default"))) void glMapGrid2d( GLint un, GLdouble u1, GLdouble u2, + GLint vn, GLdouble v1, GLdouble v2 ); +__attribute__((visibility("default"))) void glMapGrid2f( GLint un, GLfloat u1, GLfloat u2, + GLint vn, GLfloat v1, GLfloat v2 ); + +__attribute__((visibility("default"))) void glEvalPoint1( GLint i ); + +__attribute__((visibility("default"))) void glEvalPoint2( GLint i, GLint j ); + +__attribute__((visibility("default"))) void glEvalMesh1( GLenum mode, GLint i1, GLint i2 ); + +__attribute__((visibility("default"))) void glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ); + + + + + + +__attribute__((visibility("default"))) void glFogf( GLenum pname, GLfloat param ); + +__attribute__((visibility("default"))) void glFogi( GLenum pname, GLint param ); + +__attribute__((visibility("default"))) void glFogfv( GLenum pname, const GLfloat *params ); + +__attribute__((visibility("default"))) void glFogiv( GLenum pname, const GLint *params ); + + + + + + +__attribute__((visibility("default"))) void glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer ); + +__attribute__((visibility("default"))) void glPassThrough( GLfloat token ); + +__attribute__((visibility("default"))) void glSelectBuffer( GLsizei size, GLuint *buffer ); + +__attribute__((visibility("default"))) void glInitNames( void ); + +__attribute__((visibility("default"))) void glLoadName( GLuint name ); + +__attribute__((visibility("default"))) void glPushName( GLuint name ); + +__attribute__((visibility("default"))) void glPopName( void ); +# 1527 "../../include/GL/gl.h" +__attribute__((visibility("default"))) void glDrawRangeElements( GLenum mode, GLuint start, + GLuint end, GLsizei count, GLenum type, const GLvoid *indices ); + +__attribute__((visibility("default"))) void glTexImage3D( GLenum target, GLint level, + GLint internalFormat, + GLsizei width, GLsizei height, + GLsizei depth, GLint border, + GLenum format, GLenum type, + const GLvoid *pixels ); + +__attribute__((visibility("default"))) void glTexSubImage3D( GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, + GLenum format, + GLenum type, const GLvoid *pixels); + +__attribute__((visibility("default"))) void glCopyTexSubImage3D( GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint zoffset, GLint x, + GLint y, GLsizei width, + GLsizei height ); + +typedef void ( * PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); +typedef void ( * PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +# 1637 "../../include/GL/gl.h" +__attribute__((visibility("default"))) void glColorTable( GLenum target, GLenum internalformat, + GLsizei width, GLenum format, + GLenum type, const GLvoid *table ); + +__attribute__((visibility("default"))) void glColorSubTable( GLenum target, + GLsizei start, GLsizei count, + GLenum format, GLenum type, + const GLvoid *data ); + +__attribute__((visibility("default"))) void glColorTableParameteriv(GLenum target, GLenum pname, + const GLint *params); + +__attribute__((visibility("default"))) void glColorTableParameterfv(GLenum target, GLenum pname, + const GLfloat *params); + +__attribute__((visibility("default"))) void glCopyColorSubTable( GLenum target, GLsizei start, + GLint x, GLint y, GLsizei width ); + +__attribute__((visibility("default"))) void glCopyColorTable( GLenum target, GLenum internalformat, + GLint x, GLint y, GLsizei width ); + +__attribute__((visibility("default"))) void glGetColorTable( GLenum target, GLenum format, + GLenum type, GLvoid *table ); + +__attribute__((visibility("default"))) void glGetColorTableParameterfv( GLenum target, GLenum pname, + GLfloat *params ); + +__attribute__((visibility("default"))) void glGetColorTableParameteriv( GLenum target, GLenum pname, + GLint *params ); + +__attribute__((visibility("default"))) void glBlendEquation( GLenum mode ); + +__attribute__((visibility("default"))) void glBlendColor( GLclampf red, GLclampf green, + GLclampf blue, GLclampf alpha ); + +__attribute__((visibility("default"))) void glHistogram( GLenum target, GLsizei width, + GLenum internalformat, GLboolean sink ); + +__attribute__((visibility("default"))) void glResetHistogram( GLenum target ); + +__attribute__((visibility("default"))) void glGetHistogram( GLenum target, GLboolean reset, + GLenum format, GLenum type, + GLvoid *values ); + +__attribute__((visibility("default"))) void glGetHistogramParameterfv( GLenum target, GLenum pname, + GLfloat *params ); + +__attribute__((visibility("default"))) void glGetHistogramParameteriv( GLenum target, GLenum pname, + GLint *params ); + +__attribute__((visibility("default"))) void glMinmax( GLenum target, GLenum internalformat, + GLboolean sink ); + +__attribute__((visibility("default"))) void glResetMinmax( GLenum target ); + +__attribute__((visibility("default"))) void glGetMinmax( GLenum target, GLboolean reset, + GLenum format, GLenum types, + GLvoid *values ); + +__attribute__((visibility("default"))) void glGetMinmaxParameterfv( GLenum target, GLenum pname, + GLfloat *params ); + +__attribute__((visibility("default"))) void glGetMinmaxParameteriv( GLenum target, GLenum pname, + GLint *params ); + +__attribute__((visibility("default"))) void glConvolutionFilter1D( GLenum target, + GLenum internalformat, GLsizei width, GLenum format, GLenum type, + const GLvoid *image ); + +__attribute__((visibility("default"))) void glConvolutionFilter2D( GLenum target, + GLenum internalformat, GLsizei width, GLsizei height, GLenum format, + GLenum type, const GLvoid *image ); + +__attribute__((visibility("default"))) void glConvolutionParameterf( GLenum target, GLenum pname, + GLfloat params ); + +__attribute__((visibility("default"))) void glConvolutionParameterfv( GLenum target, GLenum pname, + const GLfloat *params ); + +__attribute__((visibility("default"))) void glConvolutionParameteri( GLenum target, GLenum pname, + GLint params ); + +__attribute__((visibility("default"))) void glConvolutionParameteriv( GLenum target, GLenum pname, + const GLint *params ); + +__attribute__((visibility("default"))) void glCopyConvolutionFilter1D( GLenum target, + GLenum internalformat, GLint x, GLint y, GLsizei width ); + +__attribute__((visibility("default"))) void glCopyConvolutionFilter2D( GLenum target, + GLenum internalformat, GLint x, GLint y, GLsizei width, + GLsizei height); + +__attribute__((visibility("default"))) void glGetConvolutionFilter( GLenum target, GLenum format, + GLenum type, GLvoid *image ); + +__attribute__((visibility("default"))) void glGetConvolutionParameterfv( GLenum target, GLenum pname, + GLfloat *params ); + +__attribute__((visibility("default"))) void glGetConvolutionParameteriv( GLenum target, GLenum pname, + GLint *params ); + +__attribute__((visibility("default"))) void glSeparableFilter2D( GLenum target, + GLenum internalformat, GLsizei width, GLsizei height, GLenum format, + GLenum type, const GLvoid *row, const GLvoid *column ); + +__attribute__((visibility("default"))) void glGetSeparableFilter( GLenum target, GLenum format, + GLenum type, GLvoid *row, GLvoid *column, GLvoid *span ); + +typedef void ( * PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +typedef void ( * PFNGLBLENDEQUATIONPROC) (GLenum mode); +# 1859 "../../include/GL/gl.h" +__attribute__((visibility("default"))) void glActiveTexture( GLenum texture ); + +__attribute__((visibility("default"))) void glClientActiveTexture( GLenum texture ); + +__attribute__((visibility("default"))) void glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data ); + +__attribute__((visibility("default"))) void glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data ); + +__attribute__((visibility("default"))) void glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data ); + +__attribute__((visibility("default"))) void glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data ); + +__attribute__((visibility("default"))) void glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data ); + +__attribute__((visibility("default"))) void glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data ); + +__attribute__((visibility("default"))) void glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img ); + +__attribute__((visibility("default"))) void glMultiTexCoord1d( GLenum target, GLdouble s ); + +__attribute__((visibility("default"))) void glMultiTexCoord1dv( GLenum target, const GLdouble *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord1f( GLenum target, GLfloat s ); + +__attribute__((visibility("default"))) void glMultiTexCoord1fv( GLenum target, const GLfloat *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord1i( GLenum target, GLint s ); + +__attribute__((visibility("default"))) void glMultiTexCoord1iv( GLenum target, const GLint *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord1s( GLenum target, GLshort s ); + +__attribute__((visibility("default"))) void glMultiTexCoord1sv( GLenum target, const GLshort *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t ); + +__attribute__((visibility("default"))) void glMultiTexCoord2dv( GLenum target, const GLdouble *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t ); + +__attribute__((visibility("default"))) void glMultiTexCoord2fv( GLenum target, const GLfloat *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord2i( GLenum target, GLint s, GLint t ); + +__attribute__((visibility("default"))) void glMultiTexCoord2iv( GLenum target, const GLint *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord2s( GLenum target, GLshort s, GLshort t ); + +__attribute__((visibility("default"))) void glMultiTexCoord2sv( GLenum target, const GLshort *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r ); + +__attribute__((visibility("default"))) void glMultiTexCoord3dv( GLenum target, const GLdouble *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r ); + +__attribute__((visibility("default"))) void glMultiTexCoord3fv( GLenum target, const GLfloat *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r ); + +__attribute__((visibility("default"))) void glMultiTexCoord3iv( GLenum target, const GLint *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r ); + +__attribute__((visibility("default"))) void glMultiTexCoord3sv( GLenum target, const GLshort *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q ); + +__attribute__((visibility("default"))) void glMultiTexCoord4dv( GLenum target, const GLdouble *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ); + +__attribute__((visibility("default"))) void glMultiTexCoord4fv( GLenum target, const GLfloat *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q ); + +__attribute__((visibility("default"))) void glMultiTexCoord4iv( GLenum target, const GLint *v ); + +__attribute__((visibility("default"))) void glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q ); + +__attribute__((visibility("default"))) void glMultiTexCoord4sv( GLenum target, const GLshort *v ); + + +__attribute__((visibility("default"))) void glLoadTransposeMatrixd( const GLdouble m[16] ); + +__attribute__((visibility("default"))) void glLoadTransposeMatrixf( const GLfloat m[16] ); + +__attribute__((visibility("default"))) void glMultTransposeMatrixd( const GLdouble m[16] ); + +__attribute__((visibility("default"))) void glMultTransposeMatrixf( const GLfloat m[16] ); + +__attribute__((visibility("default"))) void glSampleCoverage( GLclampf value, GLboolean invert ); + + +typedef void ( * PFNGLACTIVETEXTUREPROC) (GLenum texture); +typedef void ( * PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert); +typedef void ( * PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img); +# 2007 "../../include/GL/gl.h" +__attribute__((visibility("default"))) void glActiveTextureARB(GLenum texture); +__attribute__((visibility("default"))) void glClientActiveTextureARB(GLenum texture); +__attribute__((visibility("default"))) void glMultiTexCoord1dARB(GLenum target, GLdouble s); +__attribute__((visibility("default"))) void glMultiTexCoord1dvARB(GLenum target, const GLdouble *v); +__attribute__((visibility("default"))) void glMultiTexCoord1fARB(GLenum target, GLfloat s); +__attribute__((visibility("default"))) void glMultiTexCoord1fvARB(GLenum target, const GLfloat *v); +__attribute__((visibility("default"))) void glMultiTexCoord1iARB(GLenum target, GLint s); +__attribute__((visibility("default"))) void glMultiTexCoord1ivARB(GLenum target, const GLint *v); +__attribute__((visibility("default"))) void glMultiTexCoord1sARB(GLenum target, GLshort s); +__attribute__((visibility("default"))) void glMultiTexCoord1svARB(GLenum target, const GLshort *v); +__attribute__((visibility("default"))) void glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t); +__attribute__((visibility("default"))) void glMultiTexCoord2dvARB(GLenum target, const GLdouble *v); +__attribute__((visibility("default"))) void glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t); +__attribute__((visibility("default"))) void glMultiTexCoord2fvARB(GLenum target, const GLfloat *v); +__attribute__((visibility("default"))) void glMultiTexCoord2iARB(GLenum target, GLint s, GLint t); +__attribute__((visibility("default"))) void glMultiTexCoord2ivARB(GLenum target, const GLint *v); +__attribute__((visibility("default"))) void glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t); +__attribute__((visibility("default"))) void glMultiTexCoord2svARB(GLenum target, const GLshort *v); +__attribute__((visibility("default"))) void glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r); +__attribute__((visibility("default"))) void glMultiTexCoord3dvARB(GLenum target, const GLdouble *v); +__attribute__((visibility("default"))) void glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r); +__attribute__((visibility("default"))) void glMultiTexCoord3fvARB(GLenum target, const GLfloat *v); +__attribute__((visibility("default"))) void glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r); +__attribute__((visibility("default"))) void glMultiTexCoord3ivARB(GLenum target, const GLint *v); +__attribute__((visibility("default"))) void glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r); +__attribute__((visibility("default"))) void glMultiTexCoord3svARB(GLenum target, const GLshort *v); +__attribute__((visibility("default"))) void glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +__attribute__((visibility("default"))) void glMultiTexCoord4dvARB(GLenum target, const GLdouble *v); +__attribute__((visibility("default"))) void glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +__attribute__((visibility("default"))) void glMultiTexCoord4fvARB(GLenum target, const GLfloat *v); +__attribute__((visibility("default"))) void glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q); +__attribute__((visibility("default"))) void glMultiTexCoord4ivARB(GLenum target, const GLint *v); +__attribute__((visibility("default"))) void glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +__attribute__((visibility("default"))) void glMultiTexCoord4svARB(GLenum target, const GLshort *v); + +typedef void ( * PFNGLACTIVETEXTUREARBPROC) (GLenum texture); +typedef void ( * PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); +typedef void ( * PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); +typedef void ( * PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); +typedef void ( * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); +typedef void ( * PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); +typedef void ( * PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); +typedef void ( * PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); +typedef void ( * PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); +typedef void ( * PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); +typedef void ( * PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void ( * PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); +typedef void ( * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void ( * PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); +typedef void ( * PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); +typedef void ( * PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); +typedef void ( * PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); +typedef void ( * PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); +typedef void ( * PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void ( * PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); +typedef void ( * PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void ( * PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); +typedef void ( * PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void ( * PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); +typedef void ( * PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void ( * PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); +typedef void ( * PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void ( * PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); +typedef void ( * PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void ( * PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); +typedef void ( * PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void ( * PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); +typedef void ( * PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void ( * PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); +# 2091 "../../include/GL/gl.h" +# 1 "../../include/GL/glext.h" 1 +# 5064 "../../include/GL/glext.h" +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 149 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stddef.h" 3 4 +typedef int ptrdiff_t; +# 211 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stddef.h" 3 4 +typedef unsigned int size_t; +# 323 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stddef.h" 3 4 +typedef long int wchar_t; +# 5065 "../../include/GL/glext.h" 2 + + +typedef char GLchar; + + + + +typedef ptrdiff_t GLintptr; +typedef ptrdiff_t GLsizeiptr; + + + + +typedef ptrdiff_t GLintptrARB; +typedef ptrdiff_t GLsizeiptrARB; + + + + +typedef char GLcharARB; +typedef unsigned int GLhandleARB; + + + + +typedef unsigned short GLhalfARB; + + + +typedef unsigned short GLhalfNV; +# 5103 "../../include/GL/glext.h" +# 1 "/usr/include/inttypes.h" 1 3 4 +# 26 "/usr/include/inttypes.h" 3 4 +# 1 "/usr/include/features.h" 1 3 4 +# 357 "/usr/include/features.h" 3 4 +# 1 "/usr/include/sys/cdefs.h" 1 3 4 +# 353 "/usr/include/sys/cdefs.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 354 "/usr/include/sys/cdefs.h" 2 3 4 +# 358 "/usr/include/features.h" 2 3 4 +# 381 "/usr/include/features.h" 3 4 +# 1 "/usr/include/gnu/stubs.h" 1 3 4 +# 382 "/usr/include/features.h" 2 3 4 +# 27 "/usr/include/inttypes.h" 2 3 4 + +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stdint.h" 1 3 4 + + +# 1 "/usr/include/stdint.h" 1 3 4 +# 27 "/usr/include/stdint.h" 3 4 +# 1 "/usr/include/bits/wchar.h" 1 3 4 +# 28 "/usr/include/stdint.h" 2 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 29 "/usr/include/stdint.h" 2 3 4 +# 37 "/usr/include/stdint.h" 3 4 +typedef signed char int8_t; +typedef short int int16_t; +typedef int int32_t; + + + +__extension__ +typedef long long int int64_t; + + + + +typedef unsigned char uint8_t; +typedef unsigned short int uint16_t; + +typedef unsigned int uint32_t; + + + + + +__extension__ +typedef unsigned long long int uint64_t; + + + + + + +typedef signed char int_least8_t; +typedef short int int_least16_t; +typedef int int_least32_t; + + + +__extension__ +typedef long long int int_least64_t; + + + +typedef unsigned char uint_least8_t; +typedef unsigned short int uint_least16_t; +typedef unsigned int uint_least32_t; + + + +__extension__ +typedef unsigned long long int uint_least64_t; + + + + + + +typedef signed char int_fast8_t; + + + + + +typedef int int_fast16_t; +typedef int int_fast32_t; +__extension__ +typedef long long int int_fast64_t; + + + +typedef unsigned char uint_fast8_t; + + + + + +typedef unsigned int uint_fast16_t; +typedef unsigned int uint_fast32_t; +__extension__ +typedef unsigned long long int uint_fast64_t; +# 126 "/usr/include/stdint.h" 3 4 +typedef int intptr_t; + + +typedef unsigned int uintptr_t; +# 138 "/usr/include/stdint.h" 3 4 +__extension__ +typedef long long int intmax_t; +__extension__ +typedef unsigned long long int uintmax_t; +# 4 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stdint.h" 2 3 4 +# 29 "/usr/include/inttypes.h" 2 3 4 + + + + + + +typedef long int __gwchar_t; +# 274 "/usr/include/inttypes.h" 3 4 + +# 288 "/usr/include/inttypes.h" 3 4 +typedef struct + { + long long int quot; + long long int rem; + } imaxdiv_t; + + + + + +extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern intmax_t strtoimax (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) __attribute__ ((__nothrow__)); + + +extern uintmax_t strtoumax (__const char *__restrict __nptr, + char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__)); + + +extern intmax_t wcstoimax (__const __gwchar_t *__restrict __nptr, + __gwchar_t **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)); + + +extern uintmax_t wcstoumax (__const __gwchar_t *__restrict __nptr, + __gwchar_t ** __restrict __endptr, int __base) + __attribute__ ((__nothrow__)); +# 379 "/usr/include/inttypes.h" 3 4 +__extension__ +extern long long int __strtoll_internal (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__gnu_inline__)) intmax_t +__attribute__ ((__nothrow__)) strtoimax (__const char *__restrict nptr, char **__restrict endptr, int base) + +{ + return __strtoll_internal (nptr, endptr, base, 0); +} + +__extension__ +extern unsigned long long int __strtoull_internal (__const char * + __restrict __nptr, + char ** + __restrict __endptr, + int __base, + int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__gnu_inline__)) uintmax_t +__attribute__ ((__nothrow__)) strtoumax (__const char *__restrict nptr, char **__restrict endptr, int base) + +{ + return __strtoull_internal (nptr, endptr, base, 0); +} + +__extension__ +extern long long int __wcstoll_internal (__const __gwchar_t * + __restrict __nptr, + __gwchar_t **__restrict __endptr, + int __base, int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__gnu_inline__)) intmax_t +__attribute__ ((__nothrow__)) wcstoimax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) + +{ + return __wcstoll_internal (nptr, endptr, base, 0); +} + + +__extension__ +extern unsigned long long int __wcstoull_internal (__const __gwchar_t * + __restrict __nptr, + __gwchar_t ** + __restrict __endptr, + int __base, + int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__gnu_inline__)) uintmax_t +__attribute__ ((__nothrow__)) wcstoumax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) + +{ + return __wcstoull_internal (nptr, endptr, base, 0); +} + + + + + +# 5104 "../../include/GL/glext.h" 2 +# 5136 "../../include/GL/glext.h" +typedef int64_t GLint64EXT; +typedef uint64_t GLuint64EXT; + + + +typedef int64_t GLint64; +typedef uint64_t GLuint64; +typedef struct __GLsync *GLsync; + + + + +struct _cl_context; +struct _cl_event; + + + +typedef void ( *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); + + + +typedef void ( *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); + + + +typedef GLintptr GLvdpauSurfaceNV; +# 5185 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +__attribute__((visibility("default"))) void glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glGetColorTable (GLenum target, GLenum format, GLenum type, GLvoid *table); +__attribute__((visibility("default"))) void glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +__attribute__((visibility("default"))) void glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +__attribute__((visibility("default"))) void glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +__attribute__((visibility("default"))) void glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params); +__attribute__((visibility("default"))) void glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glConvolutionParameteri (GLenum target, GLenum pname, GLint params); +__attribute__((visibility("default"))) void glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, GLvoid *image); +__attribute__((visibility("default"))) void glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetSeparableFilter (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +__attribute__((visibility("default"))) void glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); +__attribute__((visibility("default"))) void glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +__attribute__((visibility("default"))) void glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +__attribute__((visibility("default"))) void glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +__attribute__((visibility("default"))) void glMinmax (GLenum target, GLenum internalformat, GLboolean sink); +__attribute__((visibility("default"))) void glResetHistogram (GLenum target); +__attribute__((visibility("default"))) void glResetMinmax (GLenum target); + +typedef void ( * PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +typedef void ( * PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); +typedef void ( * PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +typedef void ( * PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +typedef void ( * PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +typedef void ( * PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); +typedef void ( * PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); +typedef void ( * PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void ( * PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); +typedef void ( * PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +typedef void ( * PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); +typedef void ( * PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void ( * PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void ( * PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +typedef void ( * PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); +typedef void ( * PFNGLRESETHISTOGRAMPROC) (GLenum target); +typedef void ( * PFNGLRESETMINMAXPROC) (GLenum target); +# 5279 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glClientActiveTexture (GLenum texture); +__attribute__((visibility("default"))) void glMultiTexCoord1d (GLenum target, GLdouble s); +__attribute__((visibility("default"))) void glMultiTexCoord1dv (GLenum target, const GLdouble *v); +__attribute__((visibility("default"))) void glMultiTexCoord1f (GLenum target, GLfloat s); +__attribute__((visibility("default"))) void glMultiTexCoord1fv (GLenum target, const GLfloat *v); +__attribute__((visibility("default"))) void glMultiTexCoord1i (GLenum target, GLint s); +__attribute__((visibility("default"))) void glMultiTexCoord1iv (GLenum target, const GLint *v); +__attribute__((visibility("default"))) void glMultiTexCoord1s (GLenum target, GLshort s); +__attribute__((visibility("default"))) void glMultiTexCoord1sv (GLenum target, const GLshort *v); +__attribute__((visibility("default"))) void glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t); +__attribute__((visibility("default"))) void glMultiTexCoord2dv (GLenum target, const GLdouble *v); +__attribute__((visibility("default"))) void glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t); +__attribute__((visibility("default"))) void glMultiTexCoord2fv (GLenum target, const GLfloat *v); +__attribute__((visibility("default"))) void glMultiTexCoord2i (GLenum target, GLint s, GLint t); +__attribute__((visibility("default"))) void glMultiTexCoord2iv (GLenum target, const GLint *v); +__attribute__((visibility("default"))) void glMultiTexCoord2s (GLenum target, GLshort s, GLshort t); +__attribute__((visibility("default"))) void glMultiTexCoord2sv (GLenum target, const GLshort *v); +__attribute__((visibility("default"))) void glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r); +__attribute__((visibility("default"))) void glMultiTexCoord3dv (GLenum target, const GLdouble *v); +__attribute__((visibility("default"))) void glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r); +__attribute__((visibility("default"))) void glMultiTexCoord3fv (GLenum target, const GLfloat *v); +__attribute__((visibility("default"))) void glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r); +__attribute__((visibility("default"))) void glMultiTexCoord3iv (GLenum target, const GLint *v); +__attribute__((visibility("default"))) void glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r); +__attribute__((visibility("default"))) void glMultiTexCoord3sv (GLenum target, const GLshort *v); +__attribute__((visibility("default"))) void glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +__attribute__((visibility("default"))) void glMultiTexCoord4dv (GLenum target, const GLdouble *v); +__attribute__((visibility("default"))) void glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +__attribute__((visibility("default"))) void glMultiTexCoord4fv (GLenum target, const GLfloat *v); +__attribute__((visibility("default"))) void glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q); +__attribute__((visibility("default"))) void glMultiTexCoord4iv (GLenum target, const GLint *v); +__attribute__((visibility("default"))) void glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +__attribute__((visibility("default"))) void glMultiTexCoord4sv (GLenum target, const GLshort *v); +__attribute__((visibility("default"))) void glLoadTransposeMatrixf (const GLfloat *m); +__attribute__((visibility("default"))) void glLoadTransposeMatrixd (const GLdouble *m); +__attribute__((visibility("default"))) void glMultTransposeMatrixf (const GLfloat *m); +__attribute__((visibility("default"))) void glMultTransposeMatrixd (const GLdouble *m); + +typedef void ( * PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); +typedef void ( * PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); +typedef void ( * PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v); +typedef void ( * PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); +typedef void ( * PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v); +typedef void ( * PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); +typedef void ( * PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v); +typedef void ( * PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); +typedef void ( * PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v); +typedef void ( * PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void ( * PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v); +typedef void ( * PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void ( * PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v); +typedef void ( * PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); +typedef void ( * PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v); +typedef void ( * PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); +typedef void ( * PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v); +typedef void ( * PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void ( * PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v); +typedef void ( * PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void ( * PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v); +typedef void ( * PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void ( * PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v); +typedef void ( * PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void ( * PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v); +typedef void ( * PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void ( * PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v); +typedef void ( * PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void ( * PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v); +typedef void ( * PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void ( * PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v); +typedef void ( * PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void ( * PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v); +typedef void ( * PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m); +typedef void ( * PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m); +typedef void ( * PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m); +typedef void ( * PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m); + + + + + +__attribute__((visibility("default"))) void glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +__attribute__((visibility("default"))) void glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +__attribute__((visibility("default"))) void glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); +__attribute__((visibility("default"))) void glPointParameterf (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glPointParameterfv (GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glPointParameteri (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glPointParameteriv (GLenum pname, const GLint *params); + +typedef void ( * PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void ( * PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void ( * PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); +typedef void ( * PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); +typedef void ( * PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params); +typedef void ( * PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param); +typedef void ( * PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params); + + + + + +__attribute__((visibility("default"))) void glFogCoordf (GLfloat coord); +__attribute__((visibility("default"))) void glFogCoordfv (const GLfloat *coord); +__attribute__((visibility("default"))) void glFogCoordd (GLdouble coord); +__attribute__((visibility("default"))) void glFogCoorddv (const GLdouble *coord); +__attribute__((visibility("default"))) void glFogCoordPointer (GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue); +__attribute__((visibility("default"))) void glSecondaryColor3bv (const GLbyte *v); +__attribute__((visibility("default"))) void glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue); +__attribute__((visibility("default"))) void glSecondaryColor3dv (const GLdouble *v); +__attribute__((visibility("default"))) void glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue); +__attribute__((visibility("default"))) void glSecondaryColor3fv (const GLfloat *v); +__attribute__((visibility("default"))) void glSecondaryColor3i (GLint red, GLint green, GLint blue); +__attribute__((visibility("default"))) void glSecondaryColor3iv (const GLint *v); +__attribute__((visibility("default"))) void glSecondaryColor3s (GLshort red, GLshort green, GLshort blue); +__attribute__((visibility("default"))) void glSecondaryColor3sv (const GLshort *v); +__attribute__((visibility("default"))) void glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue); +__attribute__((visibility("default"))) void glSecondaryColor3ubv (const GLubyte *v); +__attribute__((visibility("default"))) void glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue); +__attribute__((visibility("default"))) void glSecondaryColor3uiv (const GLuint *v); +__attribute__((visibility("default"))) void glSecondaryColor3us (GLushort red, GLushort green, GLushort blue); +__attribute__((visibility("default"))) void glSecondaryColor3usv (const GLushort *v); +__attribute__((visibility("default"))) void glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glWindowPos2d (GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glWindowPos2dv (const GLdouble *v); +__attribute__((visibility("default"))) void glWindowPos2f (GLfloat x, GLfloat y); +__attribute__((visibility("default"))) void glWindowPos2fv (const GLfloat *v); +__attribute__((visibility("default"))) void glWindowPos2i (GLint x, GLint y); +__attribute__((visibility("default"))) void glWindowPos2iv (const GLint *v); +__attribute__((visibility("default"))) void glWindowPos2s (GLshort x, GLshort y); +__attribute__((visibility("default"))) void glWindowPos2sv (const GLshort *v); +__attribute__((visibility("default"))) void glWindowPos3d (GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glWindowPos3dv (const GLdouble *v); +__attribute__((visibility("default"))) void glWindowPos3f (GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glWindowPos3fv (const GLfloat *v); +__attribute__((visibility("default"))) void glWindowPos3i (GLint x, GLint y, GLint z); +__attribute__((visibility("default"))) void glWindowPos3iv (const GLint *v); +__attribute__((visibility("default"))) void glWindowPos3s (GLshort x, GLshort y, GLshort z); +__attribute__((visibility("default"))) void glWindowPos3sv (const GLshort *v); + +typedef void ( * PFNGLFOGCOORDFPROC) (GLfloat coord); +typedef void ( * PFNGLFOGCOORDFVPROC) (const GLfloat *coord); +typedef void ( * PFNGLFOGCOORDDPROC) (GLdouble coord); +typedef void ( * PFNGLFOGCOORDDVPROC) (const GLdouble *coord); +typedef void ( * PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void ( * PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v); +typedef void ( * PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void ( * PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v); +typedef void ( * PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void ( * PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v); +typedef void ( * PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue); +typedef void ( * PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v); +typedef void ( * PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue); +typedef void ( * PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v); +typedef void ( * PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void ( * PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v); +typedef void ( * PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue); +typedef void ( * PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v); +typedef void ( * PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue); +typedef void ( * PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v); +typedef void ( * PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y); +typedef void ( * PFNGLWINDOWPOS2DVPROC) (const GLdouble *v); +typedef void ( * PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y); +typedef void ( * PFNGLWINDOWPOS2FVPROC) (const GLfloat *v); +typedef void ( * PFNGLWINDOWPOS2IPROC) (GLint x, GLint y); +typedef void ( * PFNGLWINDOWPOS2IVPROC) (const GLint *v); +typedef void ( * PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y); +typedef void ( * PFNGLWINDOWPOS2SVPROC) (const GLshort *v); +typedef void ( * PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLWINDOWPOS3DVPROC) (const GLdouble *v); +typedef void ( * PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLWINDOWPOS3FVPROC) (const GLfloat *v); +typedef void ( * PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z); +typedef void ( * PFNGLWINDOWPOS3IVPROC) (const GLint *v); +typedef void ( * PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z); +typedef void ( * PFNGLWINDOWPOS3SVPROC) (const GLshort *v); + + + + + +__attribute__((visibility("default"))) void glGenQueries (GLsizei n, GLuint *ids); +__attribute__((visibility("default"))) void glDeleteQueries (GLsizei n, const GLuint *ids); +__attribute__((visibility("default"))) GLboolean glIsQuery (GLuint id); +__attribute__((visibility("default"))) void glBeginQuery (GLenum target, GLuint id); +__attribute__((visibility("default"))) void glEndQuery (GLenum target); +__attribute__((visibility("default"))) void glGetQueryiv (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glBindBuffer (GLenum target, GLuint buffer); +__attribute__((visibility("default"))) void glDeleteBuffers (GLsizei n, const GLuint *buffers); +__attribute__((visibility("default"))) void glGenBuffers (GLsizei n, GLuint *buffers); +__attribute__((visibility("default"))) GLboolean glIsBuffer (GLuint buffer); +__attribute__((visibility("default"))) void glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); +__attribute__((visibility("default"))) void glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); +__attribute__((visibility("default"))) void glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data); +__attribute__((visibility("default"))) GLvoid* glMapBuffer (GLenum target, GLenum access); +__attribute__((visibility("default"))) GLboolean glUnmapBuffer (GLenum target); +__attribute__((visibility("default"))) void glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetBufferPointerv (GLenum target, GLenum pname, GLvoid* *params); + +typedef void ( * PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); +typedef void ( * PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean ( * PFNGLISQUERYPROC) (GLuint id); +typedef void ( * PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); +typedef void ( * PFNGLENDQUERYPROC) (GLenum target); +typedef void ( * PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void ( * PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); +typedef void ( * PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); +typedef void ( * PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); +typedef void ( * PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); +typedef GLboolean ( * PFNGLISBUFFERPROC) (GLuint buffer); +typedef void ( * PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); +typedef void ( * PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); +typedef void ( * PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data); +typedef GLvoid* ( * PFNGLMAPBUFFERPROC) (GLenum target, GLenum access); +typedef GLboolean ( * PFNGLUNMAPBUFFERPROC) (GLenum target); +typedef void ( * PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params); + + + + + +__attribute__((visibility("default"))) void glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); +__attribute__((visibility("default"))) void glDrawBuffers (GLsizei n, const GLenum *bufs); +__attribute__((visibility("default"))) void glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +__attribute__((visibility("default"))) void glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); +__attribute__((visibility("default"))) void glStencilMaskSeparate (GLenum face, GLuint mask); +__attribute__((visibility("default"))) void glAttachShader (GLuint program, GLuint shader); +__attribute__((visibility("default"))) void glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); +__attribute__((visibility("default"))) void glCompileShader (GLuint shader); +__attribute__((visibility("default"))) GLuint glCreateProgram (void); +__attribute__((visibility("default"))) GLuint glCreateShader (GLenum type); +__attribute__((visibility("default"))) void glDeleteProgram (GLuint program); +__attribute__((visibility("default"))) void glDeleteShader (GLuint shader); +__attribute__((visibility("default"))) void glDetachShader (GLuint program, GLuint shader); +__attribute__((visibility("default"))) void glDisableVertexAttribArray (GLuint index); +__attribute__((visibility("default"))) void glEnableVertexAttribArray (GLuint index); +__attribute__((visibility("default"))) void glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +__attribute__((visibility("default"))) void glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +__attribute__((visibility("default"))) void glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj); +__attribute__((visibility("default"))) GLint glGetAttribLocation (GLuint program, const GLchar *name); +__attribute__((visibility("default"))) void glGetProgramiv (GLuint program, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +__attribute__((visibility("default"))) void glGetShaderiv (GLuint shader, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +__attribute__((visibility("default"))) void glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +__attribute__((visibility("default"))) GLint glGetUniformLocation (GLuint program, const GLchar *name); +__attribute__((visibility("default"))) void glGetUniformfv (GLuint program, GLint location, GLfloat *params); +__attribute__((visibility("default"))) void glGetUniformiv (GLuint program, GLint location, GLint *params); +__attribute__((visibility("default"))) void glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) void glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid* *pointer); +__attribute__((visibility("default"))) GLboolean glIsProgram (GLuint program); +__attribute__((visibility("default"))) GLboolean glIsShader (GLuint shader); +__attribute__((visibility("default"))) void glLinkProgram (GLuint program); +__attribute__((visibility("default"))) void glShaderSource (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length); +__attribute__((visibility("default"))) void glUseProgram (GLuint program); +__attribute__((visibility("default"))) void glUniform1f (GLint location, GLfloat v0); +__attribute__((visibility("default"))) void glUniform2f (GLint location, GLfloat v0, GLfloat v1); +__attribute__((visibility("default"))) void glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +__attribute__((visibility("default"))) void glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +__attribute__((visibility("default"))) void glUniform1i (GLint location, GLint v0); +__attribute__((visibility("default"))) void glUniform2i (GLint location, GLint v0, GLint v1); +__attribute__((visibility("default"))) void glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); +__attribute__((visibility("default"))) void glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +__attribute__((visibility("default"))) void glUniform1fv (GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glUniform2fv (GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glUniform3fv (GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glUniform4fv (GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glUniform1iv (GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glUniform2iv (GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glUniform3iv (GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glUniform4iv (GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glValidateProgram (GLuint program); +__attribute__((visibility("default"))) void glVertexAttrib1d (GLuint index, GLdouble x); +__attribute__((visibility("default"))) void glVertexAttrib1dv (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib1f (GLuint index, GLfloat x); +__attribute__((visibility("default"))) void glVertexAttrib1fv (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib1s (GLuint index, GLshort x); +__attribute__((visibility("default"))) void glVertexAttrib1sv (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glVertexAttrib2dv (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); +__attribute__((visibility("default"))) void glVertexAttrib2fv (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib2s (GLuint index, GLshort x, GLshort y); +__attribute__((visibility("default"))) void glVertexAttrib2sv (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glVertexAttrib3dv (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glVertexAttrib3fv (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z); +__attribute__((visibility("default"))) void glVertexAttrib3sv (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib4Nbv (GLuint index, const GLbyte *v); +__attribute__((visibility("default"))) void glVertexAttrib4Niv (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttrib4Nsv (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +__attribute__((visibility("default"))) void glVertexAttrib4Nubv (GLuint index, const GLubyte *v); +__attribute__((visibility("default"))) void glVertexAttrib4Nuiv (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttrib4Nusv (GLuint index, const GLushort *v); +__attribute__((visibility("default"))) void glVertexAttrib4bv (GLuint index, const GLbyte *v); +__attribute__((visibility("default"))) void glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glVertexAttrib4dv (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glVertexAttrib4fv (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib4iv (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +__attribute__((visibility("default"))) void glVertexAttrib4sv (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib4ubv (GLuint index, const GLubyte *v); +__attribute__((visibility("default"))) void glVertexAttrib4uiv (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttrib4usv (GLuint index, const GLushort *v); +__attribute__((visibility("default"))) void glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); + +typedef void ( * PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); +typedef void ( * PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); +typedef void ( * PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void ( * PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); +typedef void ( * PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); +typedef void ( * PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); +typedef void ( * PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); +typedef void ( * PFNGLCOMPILESHADERPROC) (GLuint shader); +typedef GLuint ( * PFNGLCREATEPROGRAMPROC) (void); +typedef GLuint ( * PFNGLCREATESHADERPROC) (GLenum type); +typedef void ( * PFNGLDELETEPROGRAMPROC) (GLuint program); +typedef void ( * PFNGLDELETESHADERPROC) (GLuint shader); +typedef void ( * PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); +typedef void ( * PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void ( * PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void ( * PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void ( * PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void ( * PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj); +typedef GLint ( * PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void ( * PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); +typedef void ( * PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void ( * PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); +typedef void ( * PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void ( * PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +typedef GLint ( * PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void ( * PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); +typedef void ( * PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); +typedef void ( * PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void ( * PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); +typedef GLboolean ( * PFNGLISPROGRAMPROC) (GLuint program); +typedef GLboolean ( * PFNGLISSHADERPROC) (GLuint shader); +typedef void ( * PFNGLLINKPROGRAMPROC) (GLuint program); +typedef void ( * PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length); +typedef void ( * PFNGLUSEPROGRAMPROC) (GLuint program); +typedef void ( * PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); +typedef void ( * PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void ( * PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void ( * PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void ( * PFNGLUNIFORM1IPROC) (GLint location, GLint v0); +typedef void ( * PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); +typedef void ( * PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void ( * PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void ( * PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLVALIDATEPROGRAMPROC) (GLuint program); +typedef void ( * PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x); +typedef void ( * PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); +typedef void ( * PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x); +typedef void ( * PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void ( * PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void ( * PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y); +typedef void ( * PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void ( * PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v); +typedef void ( * PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void ( * PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v); +typedef void ( * PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v); +typedef void ( * PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v); +typedef void ( * PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void ( * PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v); +typedef void ( * PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v); +typedef void ( * PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); + + + + + +__attribute__((visibility("default"))) void glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); + +typedef void ( * PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +# 5719 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +__attribute__((visibility("default"))) void glGetBooleani_v (GLenum target, GLuint index, GLboolean *data); +__attribute__((visibility("default"))) void glGetIntegeri_v (GLenum target, GLuint index, GLint *data); +__attribute__((visibility("default"))) void glEnablei (GLenum target, GLuint index); +__attribute__((visibility("default"))) void glDisablei (GLenum target, GLuint index); +__attribute__((visibility("default"))) GLboolean glIsEnabledi (GLenum target, GLuint index); +__attribute__((visibility("default"))) void glBeginTransformFeedback (GLenum primitiveMode); +__attribute__((visibility("default"))) void glEndTransformFeedback (void); +__attribute__((visibility("default"))) void glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +__attribute__((visibility("default"))) void glBindBufferBase (GLenum target, GLuint index, GLuint buffer); +__attribute__((visibility("default"))) void glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); +__attribute__((visibility("default"))) void glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +__attribute__((visibility("default"))) void glClampColor (GLenum target, GLenum clamp); +__attribute__((visibility("default"))) void glBeginConditionalRender (GLuint id, GLenum mode); +__attribute__((visibility("default"))) void glEndConditionalRender (void); +__attribute__((visibility("default"))) void glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glVertexAttribI1i (GLuint index, GLint x); +__attribute__((visibility("default"))) void glVertexAttribI2i (GLuint index, GLint x, GLint y); +__attribute__((visibility("default"))) void glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z); +__attribute__((visibility("default"))) void glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); +__attribute__((visibility("default"))) void glVertexAttribI1ui (GLuint index, GLuint x); +__attribute__((visibility("default"))) void glVertexAttribI2ui (GLuint index, GLuint x, GLuint y); +__attribute__((visibility("default"))) void glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z); +__attribute__((visibility("default"))) void glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +__attribute__((visibility("default"))) void glVertexAttribI1iv (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttribI2iv (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttribI3iv (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttribI4iv (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttribI1uiv (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttribI2uiv (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttribI3uiv (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttribI4uiv (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttribI4bv (GLuint index, const GLbyte *v); +__attribute__((visibility("default"))) void glVertexAttribI4sv (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttribI4ubv (GLuint index, const GLubyte *v); +__attribute__((visibility("default"))) void glVertexAttribI4usv (GLuint index, const GLushort *v); +__attribute__((visibility("default"))) void glGetUniformuiv (GLuint program, GLint location, GLuint *params); +__attribute__((visibility("default"))) void glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name); +__attribute__((visibility("default"))) GLint glGetFragDataLocation (GLuint program, const GLchar *name); +__attribute__((visibility("default"))) void glUniform1ui (GLint location, GLuint v0); +__attribute__((visibility("default"))) void glUniform2ui (GLint location, GLuint v0, GLuint v1); +__attribute__((visibility("default"))) void glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); +__attribute__((visibility("default"))) void glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +__attribute__((visibility("default"))) void glUniform1uiv (GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glUniform2uiv (GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glUniform3uiv (GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glUniform4uiv (GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glTexParameterIiv (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params); +__attribute__((visibility("default"))) void glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value); +__attribute__((visibility("default"))) void glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value); +__attribute__((visibility("default"))) void glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value); +__attribute__((visibility("default"))) void glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +__attribute__((visibility("default"))) const GLubyte * glGetStringi (GLenum name, GLuint index); + +typedef void ( * PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +typedef void ( * PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data); +typedef void ( * PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); +typedef void ( * PFNGLENABLEIPROC) (GLenum target, GLuint index); +typedef void ( * PFNGLDISABLEIPROC) (GLenum target, GLuint index); +typedef GLboolean ( * PFNGLISENABLEDIPROC) (GLenum target, GLuint index); +typedef void ( * PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode); +typedef void ( * PFNGLENDTRANSFORMFEEDBACKPROC) (void); +typedef void ( * PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void ( * PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void ( * PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); +typedef void ( * PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +typedef void ( * PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp); +typedef void ( * PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode); +typedef void ( * PFNGLENDCONDITIONALRENDERPROC) (void); +typedef void ( * PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params); +typedef void ( * PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x); +typedef void ( * PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y); +typedef void ( * PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z); +typedef void ( * PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void ( * PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x); +typedef void ( * PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y); +typedef void ( * PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z); +typedef void ( * PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void ( * PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v); +typedef void ( * PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v); +typedef void ( * PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v); +typedef void ( * PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params); +typedef void ( * PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name); +typedef GLint ( * PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name); +typedef void ( * PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0); +typedef void ( * PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1); +typedef void ( * PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void ( * PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void ( * PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params); +typedef void ( * PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params); +typedef void ( * PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value); +typedef void ( * PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value); +typedef void ( * PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value); +typedef void ( * PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +typedef const GLubyte * ( * PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); +# 5844 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +__attribute__((visibility("default"))) void glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +__attribute__((visibility("default"))) void glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer); +__attribute__((visibility("default"))) void glPrimitiveRestartIndex (GLuint index); + +typedef void ( * PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +typedef void ( * PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +typedef void ( * PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer); +typedef void ( * PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index); +# 5863 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); +__attribute__((visibility("default"))) void glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); +__attribute__((visibility("default"))) void glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level); + +typedef void ( * PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); +typedef void ( * PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params); +typedef void ( * PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +# 5885 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glVertexAttribDivisor (GLuint index, GLuint divisor); + +typedef void ( * PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); +# 5905 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glMinSampleShading (GLclampf value); +__attribute__((visibility("default"))) void glBlendEquationi (GLuint buf, GLenum mode); +__attribute__((visibility("default"))) void glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +__attribute__((visibility("default"))) void glBlendFunci (GLuint buf, GLenum src, GLenum dst); +__attribute__((visibility("default"))) void glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); + +typedef void ( * PFNGLMINSAMPLESHADINGPROC) (GLclampf value); +typedef void ( * PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode); +typedef void ( * PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void ( * PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void ( * PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +# 6006 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glLoadTransposeMatrixfARB (const GLfloat *m); +__attribute__((visibility("default"))) void glLoadTransposeMatrixdARB (const GLdouble *m); +__attribute__((visibility("default"))) void glMultTransposeMatrixfARB (const GLfloat *m); +__attribute__((visibility("default"))) void glMultTransposeMatrixdARB (const GLdouble *m); + +typedef void ( * PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); +typedef void ( * PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); +typedef void ( * PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); +typedef void ( * PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); + + + + + +__attribute__((visibility("default"))) void glSampleCoverageARB (GLclampf value, GLboolean invert); + +typedef void ( * PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert); +# 6036 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glCompressedTexImage3DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); +__attribute__((visibility("default"))) void glCompressedTexImage2DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +__attribute__((visibility("default"))) void glCompressedTexImage1DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); +__attribute__((visibility("default"))) void glCompressedTexSubImage3DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); +__attribute__((visibility("default"))) void glCompressedTexSubImage2DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +__attribute__((visibility("default"))) void glCompressedTexSubImage1DARB (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); +__attribute__((visibility("default"))) void glGetCompressedTexImageARB (GLenum target, GLint level, GLvoid *img); + +typedef void ( * PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img); +# 6060 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glPointParameterfARB (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glPointParameterfvARB (GLenum pname, const GLfloat *params); + +typedef void ( * PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param); +typedef void ( * PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params); + + + + + +__attribute__((visibility("default"))) void glWeightbvARB (GLint size, const GLbyte *weights); +__attribute__((visibility("default"))) void glWeightsvARB (GLint size, const GLshort *weights); +__attribute__((visibility("default"))) void glWeightivARB (GLint size, const GLint *weights); +__attribute__((visibility("default"))) void glWeightfvARB (GLint size, const GLfloat *weights); +__attribute__((visibility("default"))) void glWeightdvARB (GLint size, const GLdouble *weights); +__attribute__((visibility("default"))) void glWeightubvARB (GLint size, const GLubyte *weights); +__attribute__((visibility("default"))) void glWeightusvARB (GLint size, const GLushort *weights); +__attribute__((visibility("default"))) void glWeightuivARB (GLint size, const GLuint *weights); +__attribute__((visibility("default"))) void glWeightPointerARB (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glVertexBlendARB (GLint count); + +typedef void ( * PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights); +typedef void ( * PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights); +typedef void ( * PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights); +typedef void ( * PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights); +typedef void ( * PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights); +typedef void ( * PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights); +typedef void ( * PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights); +typedef void ( * PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights); +typedef void ( * PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLVERTEXBLENDARBPROC) (GLint count); + + + + + +__attribute__((visibility("default"))) void glCurrentPaletteMatrixARB (GLint index); +__attribute__((visibility("default"))) void glMatrixIndexubvARB (GLint size, const GLubyte *indices); +__attribute__((visibility("default"))) void glMatrixIndexusvARB (GLint size, const GLushort *indices); +__attribute__((visibility("default"))) void glMatrixIndexuivARB (GLint size, const GLuint *indices); +__attribute__((visibility("default"))) void glMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); + +typedef void ( * PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index); +typedef void ( * PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices); +typedef void ( * PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices); +typedef void ( * PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices); +typedef void ( * PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +# 6140 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glWindowPos2dARB (GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glWindowPos2dvARB (const GLdouble *v); +__attribute__((visibility("default"))) void glWindowPos2fARB (GLfloat x, GLfloat y); +__attribute__((visibility("default"))) void glWindowPos2fvARB (const GLfloat *v); +__attribute__((visibility("default"))) void glWindowPos2iARB (GLint x, GLint y); +__attribute__((visibility("default"))) void glWindowPos2ivARB (const GLint *v); +__attribute__((visibility("default"))) void glWindowPos2sARB (GLshort x, GLshort y); +__attribute__((visibility("default"))) void glWindowPos2svARB (const GLshort *v); +__attribute__((visibility("default"))) void glWindowPos3dARB (GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glWindowPos3dvARB (const GLdouble *v); +__attribute__((visibility("default"))) void glWindowPos3fARB (GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glWindowPos3fvARB (const GLfloat *v); +__attribute__((visibility("default"))) void glWindowPos3iARB (GLint x, GLint y, GLint z); +__attribute__((visibility("default"))) void glWindowPos3ivARB (const GLint *v); +__attribute__((visibility("default"))) void glWindowPos3sARB (GLshort x, GLshort y, GLshort z); +__attribute__((visibility("default"))) void glWindowPos3svARB (const GLshort *v); + +typedef void ( * PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y); +typedef void ( * PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v); +typedef void ( * PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y); +typedef void ( * PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v); +typedef void ( * PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y); +typedef void ( * PFNGLWINDOWPOS2IVARBPROC) (const GLint *v); +typedef void ( * PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y); +typedef void ( * PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v); +typedef void ( * PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v); +typedef void ( * PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v); +typedef void ( * PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z); +typedef void ( * PFNGLWINDOWPOS3IVARBPROC) (const GLint *v); +typedef void ( * PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z); +typedef void ( * PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v); + + + + + +__attribute__((visibility("default"))) void glVertexAttrib1dARB (GLuint index, GLdouble x); +__attribute__((visibility("default"))) void glVertexAttrib1dvARB (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib1fARB (GLuint index, GLfloat x); +__attribute__((visibility("default"))) void glVertexAttrib1fvARB (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib1sARB (GLuint index, GLshort x); +__attribute__((visibility("default"))) void glVertexAttrib1svARB (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib2dARB (GLuint index, GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glVertexAttrib2dvARB (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib2fARB (GLuint index, GLfloat x, GLfloat y); +__attribute__((visibility("default"))) void glVertexAttrib2fvARB (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib2sARB (GLuint index, GLshort x, GLshort y); +__attribute__((visibility("default"))) void glVertexAttrib2svARB (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib3dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glVertexAttrib3dvARB (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib3fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glVertexAttrib3fvARB (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib3sARB (GLuint index, GLshort x, GLshort y, GLshort z); +__attribute__((visibility("default"))) void glVertexAttrib3svARB (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib4NbvARB (GLuint index, const GLbyte *v); +__attribute__((visibility("default"))) void glVertexAttrib4NivARB (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttrib4NsvARB (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib4NubARB (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +__attribute__((visibility("default"))) void glVertexAttrib4NubvARB (GLuint index, const GLubyte *v); +__attribute__((visibility("default"))) void glVertexAttrib4NuivARB (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttrib4NusvARB (GLuint index, const GLushort *v); +__attribute__((visibility("default"))) void glVertexAttrib4bvARB (GLuint index, const GLbyte *v); +__attribute__((visibility("default"))) void glVertexAttrib4dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glVertexAttrib4dvARB (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib4fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glVertexAttrib4fvARB (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib4ivARB (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttrib4sARB (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +__attribute__((visibility("default"))) void glVertexAttrib4svARB (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib4ubvARB (GLuint index, const GLubyte *v); +__attribute__((visibility("default"))) void glVertexAttrib4uivARB (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttrib4usvARB (GLuint index, const GLushort *v); +__attribute__((visibility("default"))) void glVertexAttribPointerARB (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glEnableVertexAttribArrayARB (GLuint index); +__attribute__((visibility("default"))) void glDisableVertexAttribArrayARB (GLuint index); +__attribute__((visibility("default"))) void glProgramStringARB (GLenum target, GLenum format, GLsizei len, const GLvoid *string); +__attribute__((visibility("default"))) void glBindProgramARB (GLenum target, GLuint program); +__attribute__((visibility("default"))) void glDeleteProgramsARB (GLsizei n, const GLuint *programs); +__attribute__((visibility("default"))) void glGenProgramsARB (GLsizei n, GLuint *programs); +__attribute__((visibility("default"))) void glProgramEnvParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glProgramEnvParameter4dvARB (GLenum target, GLuint index, const GLdouble *params); +__attribute__((visibility("default"))) void glProgramEnvParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glProgramEnvParameter4fvARB (GLenum target, GLuint index, const GLfloat *params); +__attribute__((visibility("default"))) void glProgramLocalParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glProgramLocalParameter4dvARB (GLenum target, GLuint index, const GLdouble *params); +__attribute__((visibility("default"))) void glProgramLocalParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glProgramLocalParameter4fvARB (GLenum target, GLuint index, const GLfloat *params); +__attribute__((visibility("default"))) void glGetProgramEnvParameterdvARB (GLenum target, GLuint index, GLdouble *params); +__attribute__((visibility("default"))) void glGetProgramEnvParameterfvARB (GLenum target, GLuint index, GLfloat *params); +__attribute__((visibility("default"))) void glGetProgramLocalParameterdvARB (GLenum target, GLuint index, GLdouble *params); +__attribute__((visibility("default"))) void glGetProgramLocalParameterfvARB (GLenum target, GLuint index, GLfloat *params); +__attribute__((visibility("default"))) void glGetProgramivARB (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetProgramStringARB (GLenum target, GLenum pname, GLvoid *string); +__attribute__((visibility("default"))) void glGetVertexAttribdvARB (GLuint index, GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) void glGetVertexAttribfvARB (GLuint index, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetVertexAttribivARB (GLuint index, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVertexAttribPointervARB (GLuint index, GLenum pname, GLvoid* *pointer); +__attribute__((visibility("default"))) GLboolean glIsProgramARB (GLuint program); + +typedef void ( * PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x); +typedef void ( * PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x); +typedef void ( * PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x); +typedef void ( * PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void ( * PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void ( * PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y); +typedef void ( * PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void ( * PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v); +typedef void ( * PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void ( * PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v); +typedef void ( * PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v); +typedef void ( * PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v); +typedef void ( * PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void ( * PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v); +typedef void ( * PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v); +typedef void ( * PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); +typedef void ( * PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); +typedef void ( * PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string); +typedef void ( * PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); +typedef void ( * PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs); +typedef void ( * PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs); +typedef void ( * PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); +typedef void ( * PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); +typedef void ( * PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); +typedef void ( * PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); +typedef void ( * PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); +typedef void ( * PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); +typedef void ( * PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); +typedef void ( * PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); +typedef void ( * PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string); +typedef void ( * PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void ( * PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer); +typedef GLboolean ( * PFNGLISPROGRAMARBPROC) (GLuint program); +# 6313 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glBindBufferARB (GLenum target, GLuint buffer); +__attribute__((visibility("default"))) void glDeleteBuffersARB (GLsizei n, const GLuint *buffers); +__attribute__((visibility("default"))) void glGenBuffersARB (GLsizei n, GLuint *buffers); +__attribute__((visibility("default"))) GLboolean glIsBufferARB (GLuint buffer); +__attribute__((visibility("default"))) void glBufferDataARB (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); +__attribute__((visibility("default"))) void glBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); +__attribute__((visibility("default"))) void glGetBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); +__attribute__((visibility("default"))) GLvoid* glMapBufferARB (GLenum target, GLenum access); +__attribute__((visibility("default"))) GLboolean glUnmapBufferARB (GLenum target); +__attribute__((visibility("default"))) void glGetBufferParameterivARB (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetBufferPointervARB (GLenum target, GLenum pname, GLvoid* *params); + +typedef void ( * PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer); +typedef void ( * PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers); +typedef void ( * PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers); +typedef GLboolean ( * PFNGLISBUFFERARBPROC) (GLuint buffer); +typedef void ( * PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); +typedef void ( * PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); +typedef void ( * PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); +typedef GLvoid* ( * PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access); +typedef GLboolean ( * PFNGLUNMAPBUFFERARBPROC) (GLenum target); +typedef void ( * PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params); + + + + + +__attribute__((visibility("default"))) void glGenQueriesARB (GLsizei n, GLuint *ids); +__attribute__((visibility("default"))) void glDeleteQueriesARB (GLsizei n, const GLuint *ids); +__attribute__((visibility("default"))) GLboolean glIsQueryARB (GLuint id); +__attribute__((visibility("default"))) void glBeginQueryARB (GLenum target, GLuint id); +__attribute__((visibility("default"))) void glEndQueryARB (GLenum target); +__attribute__((visibility("default"))) void glGetQueryivARB (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetQueryObjectivARB (GLuint id, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetQueryObjectuivARB (GLuint id, GLenum pname, GLuint *params); + +typedef void ( * PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids); +typedef void ( * PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean ( * PFNGLISQUERYARBPROC) (GLuint id); +typedef void ( * PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id); +typedef void ( * PFNGLENDQUERYARBPROC) (GLenum target); +typedef void ( * PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params); +typedef void ( * PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params); + + + + + +__attribute__((visibility("default"))) void glDeleteObjectARB (GLhandleARB obj); +__attribute__((visibility("default"))) GLhandleARB glGetHandleARB (GLenum pname); +__attribute__((visibility("default"))) void glDetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj); +__attribute__((visibility("default"))) GLhandleARB glCreateShaderObjectARB (GLenum shaderType); +__attribute__((visibility("default"))) void glShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length); +__attribute__((visibility("default"))) void glCompileShaderARB (GLhandleARB shaderObj); +__attribute__((visibility("default"))) GLhandleARB glCreateProgramObjectARB (void); +__attribute__((visibility("default"))) void glAttachObjectARB (GLhandleARB containerObj, GLhandleARB obj); +__attribute__((visibility("default"))) void glLinkProgramARB (GLhandleARB programObj); +__attribute__((visibility("default"))) void glUseProgramObjectARB (GLhandleARB programObj); +__attribute__((visibility("default"))) void glValidateProgramARB (GLhandleARB programObj); +__attribute__((visibility("default"))) void glUniform1fARB (GLint location, GLfloat v0); +__attribute__((visibility("default"))) void glUniform2fARB (GLint location, GLfloat v0, GLfloat v1); +__attribute__((visibility("default"))) void glUniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +__attribute__((visibility("default"))) void glUniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +__attribute__((visibility("default"))) void glUniform1iARB (GLint location, GLint v0); +__attribute__((visibility("default"))) void glUniform2iARB (GLint location, GLint v0, GLint v1); +__attribute__((visibility("default"))) void glUniform3iARB (GLint location, GLint v0, GLint v1, GLint v2); +__attribute__((visibility("default"))) void glUniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +__attribute__((visibility("default"))) void glUniform1fvARB (GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glUniform2fvARB (GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glUniform3fvARB (GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glUniform4fvARB (GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glUniform1ivARB (GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glUniform2ivARB (GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glUniform3ivARB (GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glUniform4ivARB (GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glUniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glGetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); +__attribute__((visibility("default"))) void glGetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); +__attribute__((visibility("default"))) GLint glGetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name); +__attribute__((visibility("default"))) void glGetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +__attribute__((visibility("default"))) void glGetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params); +__attribute__((visibility("default"))) void glGetUniformivARB (GLhandleARB programObj, GLint location, GLint *params); +__attribute__((visibility("default"))) void glGetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); + +typedef void ( * PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj); +typedef GLhandleARB ( * PFNGLGETHANDLEARBPROC) (GLenum pname); +typedef void ( * PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj); +typedef GLhandleARB ( * PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType); +typedef void ( * PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length); +typedef void ( * PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj); +typedef GLhandleARB ( * PFNGLCREATEPROGRAMOBJECTARBPROC) (void); +typedef void ( * PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj); +typedef void ( * PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj); +typedef void ( * PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj); +typedef void ( * PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj); +typedef void ( * PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0); +typedef void ( * PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void ( * PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void ( * PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void ( * PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0); +typedef void ( * PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1); +typedef void ( * PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void ( * PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void ( * PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params); +typedef void ( * PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); +typedef void ( * PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); +typedef GLint ( * PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); +typedef void ( * PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +typedef void ( * PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params); +typedef void ( * PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params); +typedef void ( * PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); + + + + + +__attribute__((visibility("default"))) void glBindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name); +__attribute__((visibility("default"))) void glGetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +__attribute__((visibility("default"))) GLint glGetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name); + +typedef void ( * PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name); +typedef void ( * PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +typedef GLint ( * PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); +# 6479 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glDrawBuffersARB (GLsizei n, const GLenum *bufs); + +typedef void ( * PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs); +# 6491 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glClampColorARB (GLenum target, GLenum clamp); + +typedef void ( * PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp); +# 6515 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +__attribute__((visibility("default"))) void glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); + +typedef void ( * PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +typedef void ( * PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); + + + + + +__attribute__((visibility("default"))) GLboolean glIsRenderbuffer (GLuint renderbuffer); +__attribute__((visibility("default"))) void glBindRenderbuffer (GLenum target, GLuint renderbuffer); +__attribute__((visibility("default"))) void glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); +__attribute__((visibility("default"))) void glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); +__attribute__((visibility("default"))) void glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) GLboolean glIsFramebuffer (GLuint framebuffer); +__attribute__((visibility("default"))) void glBindFramebuffer (GLenum target, GLuint framebuffer); +__attribute__((visibility("default"))) void glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); +__attribute__((visibility("default"))) void glGenFramebuffers (GLsizei n, GLuint *framebuffers); +__attribute__((visibility("default"))) GLenum glCheckFramebufferStatus (GLenum target); +__attribute__((visibility("default"))) void glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +__attribute__((visibility("default"))) void glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +__attribute__((visibility("default"))) void glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGenerateMipmap (GLenum target); +__attribute__((visibility("default"))) void glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +__attribute__((visibility("default"))) void glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); + +typedef GLboolean ( * PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); +typedef void ( * PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); +typedef void ( * PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); +typedef void ( * PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); +typedef void ( * PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void ( * PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef GLboolean ( * PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); +typedef void ( * PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); +typedef void ( * PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); +typedef void ( * PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); +typedef GLenum ( * PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); +typedef void ( * PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void ( * PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void ( * PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void ( * PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void ( * PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); +typedef void ( * PFNGLGENERATEMIPMAPPROC) (GLenum target); +typedef void ( * PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef void ( * PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void ( * PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +# 6575 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glProgramParameteriARB (GLuint program, GLenum pname, GLint value); +__attribute__((visibility("default"))) void glFramebufferTextureARB (GLenum target, GLenum attachment, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glFramebufferTextureLayerARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +__attribute__((visibility("default"))) void glFramebufferTextureFaceARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); + +typedef void ( * PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value); +typedef void ( * PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void ( * PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void ( * PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +# 6593 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glVertexAttribDivisorARB (GLuint index, GLuint divisor); + +typedef void ( * PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor); + + + + + +__attribute__((visibility("default"))) GLvoid* glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +__attribute__((visibility("default"))) void glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); + +typedef GLvoid* ( * PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void ( * PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length); + + + + + +__attribute__((visibility("default"))) void glTexBufferARB (GLenum target, GLenum internalformat, GLuint buffer); + +typedef void ( * PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer); +# 6627 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glBindVertexArray (GLuint array); +__attribute__((visibility("default"))) void glDeleteVertexArrays (GLsizei n, const GLuint *arrays); +__attribute__((visibility("default"))) void glGenVertexArrays (GLsizei n, GLuint *arrays); +__attribute__((visibility("default"))) GLboolean glIsVertexArray (GLuint array); + +typedef void ( * PFNGLBINDVERTEXARRAYPROC) (GLuint array); +typedef void ( * PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); +typedef void ( * PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean ( * PFNGLISVERTEXARRAYPROC) (GLuint array); + + + + + +__attribute__((visibility("default"))) void glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar* *uniformNames, GLuint *uniformIndices); +__attribute__((visibility("default"))) void glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); +__attribute__((visibility("default"))) GLuint glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName); +__attribute__((visibility("default"))) void glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +__attribute__((visibility("default"))) void glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); + +typedef void ( * PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar* *uniformNames, GLuint *uniformIndices); +typedef void ( * PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +typedef void ( * PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); +typedef GLuint ( * PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName); +typedef void ( * PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +typedef void ( * PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +typedef void ( * PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +# 6665 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); + +typedef void ( * PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +# 6681 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); +__attribute__((visibility("default"))) void glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); +__attribute__((visibility("default"))) void glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex); +__attribute__((visibility("default"))) void glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount, const GLint *basevertex); + +typedef void ( * PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); +typedef void ( * PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); +typedef void ( * PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex); +typedef void ( * PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount, const GLint *basevertex); +# 6699 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glProvokingVertex (GLenum mode); + +typedef void ( * PFNGLPROVOKINGVERTEXPROC) (GLenum mode); +# 6711 "../../include/GL/glext.h" +__attribute__((visibility("default"))) GLsync glFenceSync (GLenum condition, GLbitfield flags); +__attribute__((visibility("default"))) GLboolean glIsSync (GLsync sync); +__attribute__((visibility("default"))) void glDeleteSync (GLsync sync); +__attribute__((visibility("default"))) GLenum glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +__attribute__((visibility("default"))) void glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +__attribute__((visibility("default"))) void glGetInteger64v (GLenum pname, GLint64 *params); +__attribute__((visibility("default"))) void glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); + +typedef GLsync ( * PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags); +typedef GLboolean ( * PFNGLISSYNCPROC) (GLsync sync); +typedef void ( * PFNGLDELETESYNCPROC) (GLsync sync); +typedef GLenum ( * PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void ( * PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void ( * PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *params); +typedef void ( * PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); + + + + + +__attribute__((visibility("default"))) void glTexImage2DMultisample (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +__attribute__((visibility("default"))) void glTexImage3DMultisample (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +__attribute__((visibility("default"))) void glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val); +__attribute__((visibility("default"))) void glSampleMaski (GLuint index, GLbitfield mask); + +typedef void ( * PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void ( * PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void ( * PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val); +typedef void ( * PFNGLSAMPLEMASKIPROC) (GLuint index, GLbitfield mask); +# 6749 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glBlendEquationiARB (GLuint buf, GLenum mode); +__attribute__((visibility("default"))) void glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +__attribute__((visibility("default"))) void glBlendFunciARB (GLuint buf, GLenum src, GLenum dst); +__attribute__((visibility("default"))) void glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); + +typedef void ( * PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode); +typedef void ( * PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void ( * PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void ( * PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); + + + + + +__attribute__((visibility("default"))) void glMinSampleShadingARB (GLclampf value); + +typedef void ( * PFNGLMINSAMPLESHADINGARBPROC) (GLclampf value); +# 6783 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); +__attribute__((visibility("default"))) void glDeleteNamedStringARB (GLint namelen, const GLchar *name); +__attribute__((visibility("default"))) void glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar* *path, const GLint *length); +__attribute__((visibility("default"))) GLboolean glIsNamedStringARB (GLint namelen, const GLchar *name); +__attribute__((visibility("default"))) void glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); +__attribute__((visibility("default"))) void glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params); + +typedef void ( * PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); +typedef void ( * PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); +typedef void ( * PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar* *path, const GLint *length); +typedef GLboolean ( * PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); +typedef void ( * PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); +typedef void ( * PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params); +# 6805 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); +__attribute__((visibility("default"))) GLint glGetFragDataIndex (GLuint program, const GLchar *name); + +typedef void ( * PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); +typedef GLint ( * PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name); +# 6823 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glGenSamplers (GLsizei count, GLuint *samplers); +__attribute__((visibility("default"))) void glDeleteSamplers (GLsizei count, const GLuint *samplers); +__attribute__((visibility("default"))) GLboolean glIsSampler (GLuint sampler); +__attribute__((visibility("default"))) void glBindSampler (GLuint unit, GLuint sampler); +__attribute__((visibility("default"))) void glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); +__attribute__((visibility("default"))) void glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param); +__attribute__((visibility("default"))) void glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param); +__attribute__((visibility("default"))) void glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param); +__attribute__((visibility("default"))) void glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params); + +typedef void ( * PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers); +typedef void ( * PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers); +typedef GLboolean ( * PFNGLISSAMPLERPROC) (GLuint sampler); +typedef void ( * PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); +typedef void ( * PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param); +typedef void ( * PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param); +typedef void ( * PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param); +typedef void ( * PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param); +typedef void ( * PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param); +typedef void ( * PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param); +typedef void ( * PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params); +typedef void ( * PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params); +typedef void ( * PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params); +# 6865 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glQueryCounter (GLuint id, GLenum target); +__attribute__((visibility("default"))) void glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params); +__attribute__((visibility("default"))) void glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params); + +typedef void ( * PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target); +typedef void ( * PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params); +typedef void ( * PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params); + + + + + +__attribute__((visibility("default"))) void glVertexP2ui (GLenum type, GLuint value); +__attribute__((visibility("default"))) void glVertexP2uiv (GLenum type, const GLuint *value); +__attribute__((visibility("default"))) void glVertexP3ui (GLenum type, GLuint value); +__attribute__((visibility("default"))) void glVertexP3uiv (GLenum type, const GLuint *value); +__attribute__((visibility("default"))) void glVertexP4ui (GLenum type, GLuint value); +__attribute__((visibility("default"))) void glVertexP4uiv (GLenum type, const GLuint *value); +__attribute__((visibility("default"))) void glTexCoordP1ui (GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glTexCoordP1uiv (GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glTexCoordP2ui (GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glTexCoordP2uiv (GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glTexCoordP3ui (GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glTexCoordP3uiv (GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glTexCoordP4ui (GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glTexCoordP4uiv (GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glMultiTexCoordP1ui (GLenum texture, GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glMultiTexCoordP1uiv (GLenum texture, GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glMultiTexCoordP2ui (GLenum texture, GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glMultiTexCoordP2uiv (GLenum texture, GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glMultiTexCoordP3ui (GLenum texture, GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glMultiTexCoordP3uiv (GLenum texture, GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glMultiTexCoordP4ui (GLenum texture, GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glMultiTexCoordP4uiv (GLenum texture, GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glNormalP3ui (GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glNormalP3uiv (GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glColorP3ui (GLenum type, GLuint color); +__attribute__((visibility("default"))) void glColorP3uiv (GLenum type, const GLuint *color); +__attribute__((visibility("default"))) void glColorP4ui (GLenum type, GLuint color); +__attribute__((visibility("default"))) void glColorP4uiv (GLenum type, const GLuint *color); +__attribute__((visibility("default"))) void glSecondaryColorP3ui (GLenum type, GLuint color); +__attribute__((visibility("default"))) void glSecondaryColorP3uiv (GLenum type, const GLuint *color); +__attribute__((visibility("default"))) void glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +__attribute__((visibility("default"))) void glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +__attribute__((visibility("default"))) void glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +__attribute__((visibility("default"))) void glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +__attribute__((visibility("default"))) void glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +__attribute__((visibility("default"))) void glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +__attribute__((visibility("default"))) void glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +__attribute__((visibility("default"))) void glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); + +typedef void ( * PFNGLVERTEXP2UIPROC) (GLenum type, GLuint value); +typedef void ( * PFNGLVERTEXP2UIVPROC) (GLenum type, const GLuint *value); +typedef void ( * PFNGLVERTEXP3UIPROC) (GLenum type, GLuint value); +typedef void ( * PFNGLVERTEXP3UIVPROC) (GLenum type, const GLuint *value); +typedef void ( * PFNGLVERTEXP4UIPROC) (GLenum type, GLuint value); +typedef void ( * PFNGLVERTEXP4UIVPROC) (GLenum type, const GLuint *value); +typedef void ( * PFNGLTEXCOORDP1UIPROC) (GLenum type, GLuint coords); +typedef void ( * PFNGLTEXCOORDP1UIVPROC) (GLenum type, const GLuint *coords); +typedef void ( * PFNGLTEXCOORDP2UIPROC) (GLenum type, GLuint coords); +typedef void ( * PFNGLTEXCOORDP2UIVPROC) (GLenum type, const GLuint *coords); +typedef void ( * PFNGLTEXCOORDP3UIPROC) (GLenum type, GLuint coords); +typedef void ( * PFNGLTEXCOORDP3UIVPROC) (GLenum type, const GLuint *coords); +typedef void ( * PFNGLTEXCOORDP4UIPROC) (GLenum type, GLuint coords); +typedef void ( * PFNGLTEXCOORDP4UIVPROC) (GLenum type, const GLuint *coords); +typedef void ( * PFNGLMULTITEXCOORDP1UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void ( * PFNGLMULTITEXCOORDP1UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void ( * PFNGLMULTITEXCOORDP2UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void ( * PFNGLMULTITEXCOORDP2UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void ( * PFNGLMULTITEXCOORDP3UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void ( * PFNGLMULTITEXCOORDP3UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void ( * PFNGLMULTITEXCOORDP4UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void ( * PFNGLMULTITEXCOORDP4UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void ( * PFNGLNORMALP3UIPROC) (GLenum type, GLuint coords); +typedef void ( * PFNGLNORMALP3UIVPROC) (GLenum type, const GLuint *coords); +typedef void ( * PFNGLCOLORP3UIPROC) (GLenum type, GLuint color); +typedef void ( * PFNGLCOLORP3UIVPROC) (GLenum type, const GLuint *color); +typedef void ( * PFNGLCOLORP4UIPROC) (GLenum type, GLuint color); +typedef void ( * PFNGLCOLORP4UIVPROC) (GLenum type, const GLuint *color); +typedef void ( * PFNGLSECONDARYCOLORP3UIPROC) (GLenum type, GLuint color); +typedef void ( * PFNGLSECONDARYCOLORP3UIVPROC) (GLenum type, const GLuint *color); +typedef void ( * PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void ( * PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void ( * PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void ( * PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void ( * PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void ( * PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void ( * PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void ( * PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); + + + + + +__attribute__((visibility("default"))) void glDrawArraysIndirect (GLenum mode, const GLvoid *indirect); +__attribute__((visibility("default"))) void glDrawElementsIndirect (GLenum mode, GLenum type, const GLvoid *indirect); + +typedef void ( * PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const GLvoid *indirect); +typedef void ( * PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const GLvoid *indirect); +# 6973 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glUniform1d (GLint location, GLdouble x); +__attribute__((visibility("default"))) void glUniform2d (GLint location, GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glUniform1dv (GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glUniform2dv (GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glUniform3dv (GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glUniform4dv (GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glGetUniformdv (GLuint program, GLint location, GLdouble *params); + +typedef void ( * PFNGLUNIFORM1DPROC) (GLint location, GLdouble x); +typedef void ( * PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y); +typedef void ( * PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params); + + + + + +__attribute__((visibility("default"))) GLint glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name); +__attribute__((visibility("default"))) GLuint glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name); +__attribute__((visibility("default"))) void glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); +__attribute__((visibility("default"))) void glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +__attribute__((visibility("default"))) void glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +__attribute__((visibility("default"))) void glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices); +__attribute__((visibility("default"))) void glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params); +__attribute__((visibility("default"))) void glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values); + +typedef GLint ( * PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name); +typedef GLuint ( * PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name); +typedef void ( * PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); +typedef void ( * PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +typedef void ( * PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +typedef void ( * PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices); +typedef void ( * PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params); +typedef void ( * PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values); + + + + + +__attribute__((visibility("default"))) void glPatchParameteri (GLenum pname, GLint value); +__attribute__((visibility("default"))) void glPatchParameterfv (GLenum pname, const GLfloat *values); + +typedef void ( * PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value); +typedef void ( * PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values); +# 7051 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glBindTransformFeedback (GLenum target, GLuint id); +__attribute__((visibility("default"))) void glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids); +__attribute__((visibility("default"))) void glGenTransformFeedbacks (GLsizei n, GLuint *ids); +__attribute__((visibility("default"))) GLboolean glIsTransformFeedback (GLuint id); +__attribute__((visibility("default"))) void glPauseTransformFeedback (void); +__attribute__((visibility("default"))) void glResumeTransformFeedback (void); +__attribute__((visibility("default"))) void glDrawTransformFeedback (GLenum mode, GLuint id); + +typedef void ( * PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id); +typedef void ( * PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids); +typedef void ( * PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); +typedef GLboolean ( * PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id); +typedef void ( * PFNGLPAUSETRANSFORMFEEDBACKPROC) (void); +typedef void ( * PFNGLRESUMETRANSFORMFEEDBACKPROC) (void); +typedef void ( * PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id); + + + + + +__attribute__((visibility("default"))) void glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream); +__attribute__((visibility("default"))) void glBeginQueryIndexed (GLenum target, GLuint index, GLuint id); +__attribute__((visibility("default"))) void glEndQueryIndexed (GLenum target, GLuint index); +__attribute__((visibility("default"))) void glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params); + +typedef void ( * PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream); +typedef void ( * PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id); +typedef void ( * PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index); +typedef void ( * PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); + + + + + +__attribute__((visibility("default"))) void glReleaseShaderCompiler (void); +__attribute__((visibility("default"))) void glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length); +__attribute__((visibility("default"))) void glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +__attribute__((visibility("default"))) void glDepthRangef (GLclampf n, GLclampf f); +__attribute__((visibility("default"))) void glClearDepthf (GLclampf d); + +typedef void ( * PFNGLRELEASESHADERCOMPILERPROC) (void); +typedef void ( * PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length); +typedef void ( * PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +typedef void ( * PFNGLDEPTHRANGEFPROC) (GLclampf n, GLclampf f); +typedef void ( * PFNGLCLEARDEPTHFPROC) (GLclampf d); + + + + + +__attribute__((visibility("default"))) void glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); +__attribute__((visibility("default"))) void glProgramBinary (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length); +__attribute__((visibility("default"))) void glProgramParameteri (GLuint program, GLenum pname, GLint value); + +typedef void ( * PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); +typedef void ( * PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length); +typedef void ( * PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); + + + + + +__attribute__((visibility("default"))) void glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program); +__attribute__((visibility("default"))) void glActiveShaderProgram (GLuint pipeline, GLuint program); +__attribute__((visibility("default"))) GLuint glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar* *strings); +__attribute__((visibility("default"))) void glBindProgramPipeline (GLuint pipeline); +__attribute__((visibility("default"))) void glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines); +__attribute__((visibility("default"))) void glGenProgramPipelines (GLsizei n, GLuint *pipelines); +__attribute__((visibility("default"))) GLboolean glIsProgramPipeline (GLuint pipeline); +__attribute__((visibility("default"))) void glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glProgramUniform1i (GLuint program, GLint location, GLint v0); +__attribute__((visibility("default"))) void glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glProgramUniform1f (GLuint program, GLint location, GLfloat v0); +__attribute__((visibility("default"))) void glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform1d (GLuint program, GLint location, GLdouble v0); +__attribute__((visibility("default"))) void glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniform1ui (GLuint program, GLint location, GLuint v0); +__attribute__((visibility("default"))) void glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1); +__attribute__((visibility("default"))) void glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1); +__attribute__((visibility("default"))) void glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1); +__attribute__((visibility("default"))) void glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1); +__attribute__((visibility("default"))) void glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +__attribute__((visibility("default"))) void glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +__attribute__((visibility("default"))) void glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); +__attribute__((visibility("default"))) void glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +__attribute__((visibility("default"))) void glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +__attribute__((visibility("default"))) void glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +__attribute__((visibility("default"))) void glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +__attribute__((visibility("default"))) void glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +__attribute__((visibility("default"))) void glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glValidateProgramPipeline (GLuint pipeline); +__attribute__((visibility("default"))) void glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); + +typedef void ( * PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program); +typedef void ( * PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program); +typedef GLuint ( * PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar* *strings); +typedef void ( * PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void ( * PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines); +typedef void ( * PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); +typedef GLboolean ( * PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void ( * PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params); +typedef void ( * PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0); +typedef void ( * PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0); +typedef void ( * PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0); +typedef void ( * PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0); +typedef void ( * PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef void ( * PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef void ( * PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1); +typedef void ( * PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); +typedef void ( * PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void ( * PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void ( * PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); +typedef void ( * PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void ( * PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void ( * PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void ( * PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +typedef void ( * PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void ( * PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void ( * PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); + + + + + +__attribute__((visibility("default"))) void glVertexAttribL1d (GLuint index, GLdouble x); +__attribute__((visibility("default"))) void glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glVertexAttribL1dv (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribL2dv (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribL3dv (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribL4dv (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params); + +typedef void ( * PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x); +typedef void ( * PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void ( * PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params); + + + + + +__attribute__((visibility("default"))) void glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v); +__attribute__((visibility("default"))) void glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +__attribute__((visibility("default"))) void glViewportIndexedfv (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glScissorArrayv (GLuint first, GLsizei count, const GLint *v); +__attribute__((visibility("default"))) void glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glScissorIndexedv (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glDepthRangeArrayv (GLuint first, GLsizei count, const GLclampd *v); +__attribute__((visibility("default"))) void glDepthRangeIndexed (GLuint index, GLclampd n, GLclampd f); +__attribute__((visibility("default"))) void glGetFloati_v (GLenum target, GLuint index, GLfloat *data); +__attribute__((visibility("default"))) void glGetDoublei_v (GLenum target, GLuint index, GLdouble *data); + +typedef void ( * PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v); +typedef void ( * PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +typedef void ( * PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v); +typedef void ( * PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +typedef void ( * PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLclampd *v); +typedef void ( * PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLclampd n, GLclampd f); +typedef void ( * PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data); +typedef void ( * PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data); + + + + + +__attribute__((visibility("default"))) GLsync glCreateSyncFromCLeventARB (struct _cl_context * context, struct _cl_event * event, GLbitfield flags); + +typedef GLsync ( * PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context * context, struct _cl_event * event, GLbitfield flags); + + + + + +__attribute__((visibility("default"))) void glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +__attribute__((visibility("default"))) void glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +__attribute__((visibility("default"))) void glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const GLvoid *userParam); +__attribute__((visibility("default"))) GLuint glGetDebugMessageLogARB (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); + +typedef void ( * PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void ( * PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +typedef void ( * PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const GLvoid *userParam); +typedef GLuint ( * PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); + + + + + +__attribute__((visibility("default"))) GLenum glGetGraphicsResetStatusARB (void); +__attribute__((visibility("default"))) void glGetnMapdvARB (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); +__attribute__((visibility("default"))) void glGetnMapfvARB (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); +__attribute__((visibility("default"))) void glGetnMapivARB (GLenum target, GLenum query, GLsizei bufSize, GLint *v); +__attribute__((visibility("default"))) void glGetnPixelMapfvARB (GLenum map, GLsizei bufSize, GLfloat *values); +__attribute__((visibility("default"))) void glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint *values); +__attribute__((visibility("default"))) void glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort *values); +__attribute__((visibility("default"))) void glGetnPolygonStippleARB (GLsizei bufSize, GLubyte *pattern); +__attribute__((visibility("default"))) void glGetnColorTableARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table); +__attribute__((visibility("default"))) void glGetnConvolutionFilterARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image); +__attribute__((visibility("default"))) void glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span); +__attribute__((visibility("default"))) void glGetnHistogramARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); +__attribute__((visibility("default"))) void glGetnMinmaxARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); +__attribute__((visibility("default"))) void glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img); +__attribute__((visibility("default"))) void glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data); +__attribute__((visibility("default"))) void glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, GLvoid *img); +__attribute__((visibility("default"))) void glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +__attribute__((visibility("default"))) void glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params); +__attribute__((visibility("default"))) void glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +__attribute__((visibility("default"))) void glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); + +typedef GLenum ( * PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void); +typedef void ( * PFNGLGETNMAPDVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); +typedef void ( * PFNGLGETNMAPFVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); +typedef void ( * PFNGLGETNMAPIVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v); +typedef void ( * PFNGLGETNPIXELMAPFVARBPROC) (GLenum map, GLsizei bufSize, GLfloat *values); +typedef void ( * PFNGLGETNPIXELMAPUIVARBPROC) (GLenum map, GLsizei bufSize, GLuint *values); +typedef void ( * PFNGLGETNPIXELMAPUSVARBPROC) (GLenum map, GLsizei bufSize, GLushort *values); +typedef void ( * PFNGLGETNPOLYGONSTIPPLEARBPROC) (GLsizei bufSize, GLubyte *pattern); +typedef void ( * PFNGLGETNCOLORTABLEARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table); +typedef void ( * PFNGLGETNCONVOLUTIONFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image); +typedef void ( * PFNGLGETNSEPARABLEFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span); +typedef void ( * PFNGLGETNHISTOGRAMARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); +typedef void ( * PFNGLGETNMINMAXARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); +typedef void ( * PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img); +typedef void ( * PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data); +typedef void ( * PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, GLvoid *img); +typedef void ( * PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +typedef void ( * PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); +typedef void ( * PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +typedef void ( * PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); +# 7367 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glBlendColorEXT (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); + +typedef void ( * PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); + + + + + +__attribute__((visibility("default"))) void glPolygonOffsetEXT (GLfloat factor, GLfloat bias); + +typedef void ( * PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias); +# 7387 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glTexImage3DEXT (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); + +typedef void ( * PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); + + + + + +__attribute__((visibility("default"))) void glGetTexFilterFuncSGIS (GLenum target, GLenum filter, GLfloat *weights); +__attribute__((visibility("default"))) void glTexFilterFuncSGIS (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); + +typedef void ( * PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights); +typedef void ( * PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); + + + + + +__attribute__((visibility("default"))) void glTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); + +typedef void ( * PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); + + + + + +__attribute__((visibility("default"))) void glCopyTexImage1DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +__attribute__((visibility("default"))) void glCopyTexImage2DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +__attribute__((visibility("default"))) void glCopyTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glCopyTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glCopyTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); + +typedef void ( * PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void ( * PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void ( * PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void ( * PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); + + + + + +__attribute__((visibility("default"))) void glGetHistogramEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +__attribute__((visibility("default"))) void glGetHistogramParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetHistogramParameterivEXT (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetMinmaxEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +__attribute__((visibility("default"))) void glGetMinmaxParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetMinmaxParameterivEXT (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glHistogramEXT (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +__attribute__((visibility("default"))) void glMinmaxEXT (GLenum target, GLenum internalformat, GLboolean sink); +__attribute__((visibility("default"))) void glResetHistogramEXT (GLenum target); +__attribute__((visibility("default"))) void glResetMinmaxEXT (GLenum target); + +typedef void ( * PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void ( * PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void ( * PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +typedef void ( * PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink); +typedef void ( * PFNGLRESETHISTOGRAMEXTPROC) (GLenum target); +typedef void ( * PFNGLRESETMINMAXEXTPROC) (GLenum target); + + + + + +__attribute__((visibility("default"))) void glConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +__attribute__((visibility("default"))) void glConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +__attribute__((visibility("default"))) void glConvolutionParameterfEXT (GLenum target, GLenum pname, GLfloat params); +__attribute__((visibility("default"))) void glConvolutionParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glConvolutionParameteriEXT (GLenum target, GLenum pname, GLint params); +__attribute__((visibility("default"))) void glConvolutionParameterivEXT (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glCopyConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glCopyConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glGetConvolutionFilterEXT (GLenum target, GLenum format, GLenum type, GLvoid *image); +__attribute__((visibility("default"))) void glGetConvolutionParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetConvolutionParameterivEXT (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetSeparableFilterEXT (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +__attribute__((visibility("default"))) void glSeparableFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); + +typedef void ( * PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +typedef void ( * PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +typedef void ( * PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params); +typedef void ( * PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params); +typedef void ( * PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void ( * PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); +typedef void ( * PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +typedef void ( * PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); +# 7495 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glColorTableSGI (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +__attribute__((visibility("default"))) void glColorTableParameterfvSGI (GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glColorTableParameterivSGI (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glCopyColorTableSGI (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glGetColorTableSGI (GLenum target, GLenum format, GLenum type, GLvoid *table); +__attribute__((visibility("default"))) void glGetColorTableParameterfvSGI (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetColorTableParameterivSGI (GLenum target, GLenum pname, GLint *params); + +typedef void ( * PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +typedef void ( * PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); +typedef void ( * PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params); + + + + + +__attribute__((visibility("default"))) void glPixelTexGenSGIX (GLenum mode); + +typedef void ( * PFNGLPIXELTEXGENSGIXPROC) (GLenum mode); + + + + + +__attribute__((visibility("default"))) void glPixelTexGenParameteriSGIS (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glPixelTexGenParameterivSGIS (GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glPixelTexGenParameterfSGIS (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glPixelTexGenParameterfvSGIS (GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glGetPixelTexGenParameterivSGIS (GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetPixelTexGenParameterfvSGIS (GLenum pname, GLfloat *params); + +typedef void ( * PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param); +typedef void ( * PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params); +typedef void ( * PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param); +typedef void ( * PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); +typedef void ( * PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params); +typedef void ( * PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params); + + + + + +__attribute__((visibility("default"))) void glTexImage4DSGIS (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glTexSubImage4DSGIS (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels); + +typedef void ( * PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels); +# 7559 "../../include/GL/glext.h" +__attribute__((visibility("default"))) GLboolean glAreTexturesResidentEXT (GLsizei n, const GLuint *textures, GLboolean *residences); +__attribute__((visibility("default"))) void glBindTextureEXT (GLenum target, GLuint texture); +__attribute__((visibility("default"))) void glDeleteTexturesEXT (GLsizei n, const GLuint *textures); +__attribute__((visibility("default"))) void glGenTexturesEXT (GLsizei n, GLuint *textures); +__attribute__((visibility("default"))) GLboolean glIsTextureEXT (GLuint texture); +__attribute__((visibility("default"))) void glPrioritizeTexturesEXT (GLsizei n, const GLuint *textures, const GLclampf *priorities); + +typedef GLboolean ( * PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences); +typedef void ( * PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture); +typedef void ( * PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures); +typedef void ( * PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures); +typedef GLboolean ( * PFNGLISTEXTUREEXTPROC) (GLuint texture); +typedef void ( * PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities); + + + + + +__attribute__((visibility("default"))) void glDetailTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points); +__attribute__((visibility("default"))) void glGetDetailTexFuncSGIS (GLenum target, GLfloat *points); + +typedef void ( * PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); +typedef void ( * PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points); + + + + + +__attribute__((visibility("default"))) void glSharpenTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points); +__attribute__((visibility("default"))) void glGetSharpenTexFuncSGIS (GLenum target, GLfloat *points); + +typedef void ( * PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); +typedef void ( * PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points); +# 7605 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glSampleMaskSGIS (GLclampf value, GLboolean invert); +__attribute__((visibility("default"))) void glSamplePatternSGIS (GLenum pattern); + +typedef void ( * PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert); +typedef void ( * PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern); +# 7619 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glArrayElementEXT (GLint i); +__attribute__((visibility("default"))) void glColorPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +__attribute__((visibility("default"))) void glDrawArraysEXT (GLenum mode, GLint first, GLsizei count); +__attribute__((visibility("default"))) void glEdgeFlagPointerEXT (GLsizei stride, GLsizei count, const GLboolean *pointer); +__attribute__((visibility("default"))) void glGetPointervEXT (GLenum pname, GLvoid* *params); +__attribute__((visibility("default"))) void glIndexPointerEXT (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +__attribute__((visibility("default"))) void glNormalPointerEXT (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +__attribute__((visibility("default"))) void glTexCoordPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +__attribute__((visibility("default"))) void glVertexPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); + +typedef void ( * PFNGLARRAYELEMENTEXTPROC) (GLint i); +typedef void ( * PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void ( * PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count); +typedef void ( * PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer); +typedef void ( * PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params); +typedef void ( * PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void ( * PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void ( * PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void ( * PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +# 7667 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glBlendEquationEXT (GLenum mode); + +typedef void ( * PFNGLBLENDEQUATIONEXTPROC) (GLenum mode); +# 7695 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glSpriteParameterfSGIX (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glSpriteParameterfvSGIX (GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glSpriteParameteriSGIX (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glSpriteParameterivSGIX (GLenum pname, const GLint *params); + +typedef void ( * PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param); +typedef void ( * PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params); +typedef void ( * PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param); +typedef void ( * PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params); +# 7713 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glPointParameterfEXT (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glPointParameterfvEXT (GLenum pname, const GLfloat *params); + +typedef void ( * PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param); +typedef void ( * PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params); + + + + + +__attribute__((visibility("default"))) void glPointParameterfSGIS (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glPointParameterfvSGIS (GLenum pname, const GLfloat *params); + +typedef void ( * PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param); +typedef void ( * PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); + + + + + +__attribute__((visibility("default"))) GLint glGetInstrumentsSGIX (void); +__attribute__((visibility("default"))) void glInstrumentsBufferSGIX (GLsizei size, GLint *buffer); +__attribute__((visibility("default"))) GLint glPollInstrumentsSGIX (GLint *marker_p); +__attribute__((visibility("default"))) void glReadInstrumentsSGIX (GLint marker); +__attribute__((visibility("default"))) void glStartInstrumentsSGIX (void); +__attribute__((visibility("default"))) void glStopInstrumentsSGIX (GLint marker); + +typedef GLint ( * PFNGLGETINSTRUMENTSSGIXPROC) (void); +typedef void ( * PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer); +typedef GLint ( * PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p); +typedef void ( * PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker); +typedef void ( * PFNGLSTARTINSTRUMENTSSGIXPROC) (void); +typedef void ( * PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker); +# 7755 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glFrameZoomSGIX (GLint factor); + +typedef void ( * PFNGLFRAMEZOOMSGIXPROC) (GLint factor); + + + + + +__attribute__((visibility("default"))) void glTagSampleBufferSGIX (void); + +typedef void ( * PFNGLTAGSAMPLEBUFFERSGIXPROC) (void); + + + + + +__attribute__((visibility("default"))) void glDeformationMap3dSGIX (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); +__attribute__((visibility("default"))) void glDeformationMap3fSGIX (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); +__attribute__((visibility("default"))) void glDeformSGIX (GLbitfield mask); +__attribute__((visibility("default"))) void glLoadIdentityDeformationMapSGIX (GLbitfield mask); + +typedef void ( * PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); +typedef void ( * PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); +typedef void ( * PFNGLDEFORMSGIXPROC) (GLbitfield mask); +typedef void ( * PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask); + + + + + +__attribute__((visibility("default"))) void glReferencePlaneSGIX (const GLdouble *equation); + +typedef void ( * PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation); + + + + + +__attribute__((visibility("default"))) void glFlushRasterSGIX (void); + +typedef void ( * PFNGLFLUSHRASTERSGIXPROC) (void); +# 7805 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glFogFuncSGIS (GLsizei n, const GLfloat *points); +__attribute__((visibility("default"))) void glGetFogFuncSGIS (GLfloat *points); + +typedef void ( * PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points); +typedef void ( * PFNGLGETFOGFUNCSGISPROC) (GLfloat *points); +# 7819 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glImageTransformParameteriHP (GLenum target, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glImageTransformParameterfHP (GLenum target, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glImageTransformParameterivHP (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glImageTransformParameterfvHP (GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glGetImageTransformParameterivHP (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetImageTransformParameterfvHP (GLenum target, GLenum pname, GLfloat *params); + +typedef void ( * PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param); +typedef void ( * PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void ( * PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params); +# 7845 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +__attribute__((visibility("default"))) void glCopyColorSubTableEXT (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); + +typedef void ( * PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +typedef void ( * PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +# 7859 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glHintPGI (GLenum target, GLint mode); + +typedef void ( * PFNGLHINTPGIPROC) (GLenum target, GLint mode); + + + + + +__attribute__((visibility("default"))) void glColorTableEXT (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +__attribute__((visibility("default"))) void glGetColorTableEXT (GLenum target, GLenum format, GLenum type, GLvoid *data); +__attribute__((visibility("default"))) void glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetColorTableParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); + +typedef void ( * PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +typedef void ( * PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data); +typedef void ( * PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +# 7885 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glGetListParameterfvSGIX (GLuint list, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetListParameterivSGIX (GLuint list, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glListParameterfSGIX (GLuint list, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glListParameterfvSGIX (GLuint list, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glListParameteriSGIX (GLuint list, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glListParameterivSGIX (GLuint list, GLenum pname, const GLint *params); + +typedef void ( * PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params); +typedef void ( * PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param); +typedef void ( * PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param); +typedef void ( * PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params); +# 7923 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glIndexMaterialEXT (GLenum face, GLenum mode); + +typedef void ( * PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode); + + + + + +__attribute__((visibility("default"))) void glIndexFuncEXT (GLenum func, GLclampf ref); + +typedef void ( * PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref); +# 7943 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glLockArraysEXT (GLint first, GLsizei count); +__attribute__((visibility("default"))) void glUnlockArraysEXT (void); + +typedef void ( * PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count); +typedef void ( * PFNGLUNLOCKARRAYSEXTPROC) (void); + + + + + +__attribute__((visibility("default"))) void glCullParameterdvEXT (GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) void glCullParameterfvEXT (GLenum pname, GLfloat *params); + +typedef void ( * PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params); +typedef void ( * PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params); +# 7967 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glFragmentColorMaterialSGIX (GLenum face, GLenum mode); +__attribute__((visibility("default"))) void glFragmentLightfSGIX (GLenum light, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glFragmentLightfvSGIX (GLenum light, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glFragmentLightiSGIX (GLenum light, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glFragmentLightivSGIX (GLenum light, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glFragmentLightModelfSGIX (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glFragmentLightModelfvSGIX (GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glFragmentLightModeliSGIX (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glFragmentLightModelivSGIX (GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glFragmentMaterialfSGIX (GLenum face, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glFragmentMaterialfvSGIX (GLenum face, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glFragmentMaterialiSGIX (GLenum face, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glFragmentMaterialivSGIX (GLenum face, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glGetFragmentLightfvSGIX (GLenum light, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetFragmentLightivSGIX (GLenum light, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetFragmentMaterialfvSGIX (GLenum face, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetFragmentMaterialivSGIX (GLenum face, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glLightEnviSGIX (GLenum pname, GLint param); + +typedef void ( * PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode); +typedef void ( * PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param); +typedef void ( * PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param); +typedef void ( * PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params); +typedef void ( * PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param); +typedef void ( * PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params); +typedef void ( * PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param); +typedef void ( * PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params); +typedef void ( * PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param); +typedef void ( * PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param); +typedef void ( * PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params); +typedef void ( * PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params); +typedef void ( * PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params); +typedef void ( * PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param); +# 8017 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); + +typedef void ( * PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); +# 8033 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glApplyTextureEXT (GLenum mode); +__attribute__((visibility("default"))) void glTextureLightEXT (GLenum pname); +__attribute__((visibility("default"))) void glTextureMaterialEXT (GLenum face, GLenum mode); + +typedef void ( * PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode); +typedef void ( * PFNGLTEXTURELIGHTEXTPROC) (GLenum pname); +typedef void ( * PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode); +# 8053 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glAsyncMarkerSGIX (GLuint marker); +__attribute__((visibility("default"))) GLint glFinishAsyncSGIX (GLuint *markerp); +__attribute__((visibility("default"))) GLint glPollAsyncSGIX (GLuint *markerp); +__attribute__((visibility("default"))) GLuint glGenAsyncMarkersSGIX (GLsizei range); +__attribute__((visibility("default"))) void glDeleteAsyncMarkersSGIX (GLuint marker, GLsizei range); +__attribute__((visibility("default"))) GLboolean glIsAsyncMarkerSGIX (GLuint marker); + +typedef void ( * PFNGLASYNCMARKERSGIXPROC) (GLuint marker); +typedef GLint ( * PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp); +typedef GLint ( * PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp); +typedef GLuint ( * PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range); +typedef void ( * PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range); +typedef GLboolean ( * PFNGLISASYNCMARKERSGIXPROC) (GLuint marker); +# 8079 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glVertexPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer); +__attribute__((visibility("default"))) void glNormalPointervINTEL (GLenum type, const GLvoid* *pointer); +__attribute__((visibility("default"))) void glColorPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer); +__attribute__((visibility("default"))) void glTexCoordPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer); + +typedef void ( * PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); +typedef void ( * PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer); +typedef void ( * PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); +typedef void ( * PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); +# 8097 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glPixelTransformParameteriEXT (GLenum target, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glPixelTransformParameterfEXT (GLenum target, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glPixelTransformParameterivEXT (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glPixelTransformParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params); + +typedef void ( * PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param); +typedef void ( * PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void ( * PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); +# 8123 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glSecondaryColor3bEXT (GLbyte red, GLbyte green, GLbyte blue); +__attribute__((visibility("default"))) void glSecondaryColor3bvEXT (const GLbyte *v); +__attribute__((visibility("default"))) void glSecondaryColor3dEXT (GLdouble red, GLdouble green, GLdouble blue); +__attribute__((visibility("default"))) void glSecondaryColor3dvEXT (const GLdouble *v); +__attribute__((visibility("default"))) void glSecondaryColor3fEXT (GLfloat red, GLfloat green, GLfloat blue); +__attribute__((visibility("default"))) void glSecondaryColor3fvEXT (const GLfloat *v); +__attribute__((visibility("default"))) void glSecondaryColor3iEXT (GLint red, GLint green, GLint blue); +__attribute__((visibility("default"))) void glSecondaryColor3ivEXT (const GLint *v); +__attribute__((visibility("default"))) void glSecondaryColor3sEXT (GLshort red, GLshort green, GLshort blue); +__attribute__((visibility("default"))) void glSecondaryColor3svEXT (const GLshort *v); +__attribute__((visibility("default"))) void glSecondaryColor3ubEXT (GLubyte red, GLubyte green, GLubyte blue); +__attribute__((visibility("default"))) void glSecondaryColor3ubvEXT (const GLubyte *v); +__attribute__((visibility("default"))) void glSecondaryColor3uiEXT (GLuint red, GLuint green, GLuint blue); +__attribute__((visibility("default"))) void glSecondaryColor3uivEXT (const GLuint *v); +__attribute__((visibility("default"))) void glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue); +__attribute__((visibility("default"))) void glSecondaryColor3usvEXT (const GLushort *v); +__attribute__((visibility("default"))) void glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); + +typedef void ( * PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void ( * PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v); +typedef void ( * PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void ( * PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v); +typedef void ( * PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void ( * PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v); +typedef void ( * PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue); +typedef void ( * PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v); +typedef void ( * PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue); +typedef void ( * PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v); +typedef void ( * PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void ( * PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v); +typedef void ( * PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue); +typedef void ( * PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v); +typedef void ( * PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue); +typedef void ( * PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v); +typedef void ( * PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); + + + + + +__attribute__((visibility("default"))) void glTextureNormalEXT (GLenum mode); + +typedef void ( * PFNGLTEXTURENORMALEXTPROC) (GLenum mode); + + + + + +__attribute__((visibility("default"))) void glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +__attribute__((visibility("default"))) void glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); + +typedef void ( * PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void ( * PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); + + + + + +__attribute__((visibility("default"))) void glFogCoordfEXT (GLfloat coord); +__attribute__((visibility("default"))) void glFogCoordfvEXT (const GLfloat *coord); +__attribute__((visibility("default"))) void glFogCoorddEXT (GLdouble coord); +__attribute__((visibility("default"))) void glFogCoorddvEXT (const GLdouble *coord); +__attribute__((visibility("default"))) void glFogCoordPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer); + +typedef void ( * PFNGLFOGCOORDFEXTPROC) (GLfloat coord); +typedef void ( * PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord); +typedef void ( * PFNGLFOGCOORDDEXTPROC) (GLdouble coord); +typedef void ( * PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord); +typedef void ( * PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +# 8201 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glTangent3bEXT (GLbyte tx, GLbyte ty, GLbyte tz); +__attribute__((visibility("default"))) void glTangent3bvEXT (const GLbyte *v); +__attribute__((visibility("default"))) void glTangent3dEXT (GLdouble tx, GLdouble ty, GLdouble tz); +__attribute__((visibility("default"))) void glTangent3dvEXT (const GLdouble *v); +__attribute__((visibility("default"))) void glTangent3fEXT (GLfloat tx, GLfloat ty, GLfloat tz); +__attribute__((visibility("default"))) void glTangent3fvEXT (const GLfloat *v); +__attribute__((visibility("default"))) void glTangent3iEXT (GLint tx, GLint ty, GLint tz); +__attribute__((visibility("default"))) void glTangent3ivEXT (const GLint *v); +__attribute__((visibility("default"))) void glTangent3sEXT (GLshort tx, GLshort ty, GLshort tz); +__attribute__((visibility("default"))) void glTangent3svEXT (const GLshort *v); +__attribute__((visibility("default"))) void glBinormal3bEXT (GLbyte bx, GLbyte by, GLbyte bz); +__attribute__((visibility("default"))) void glBinormal3bvEXT (const GLbyte *v); +__attribute__((visibility("default"))) void glBinormal3dEXT (GLdouble bx, GLdouble by, GLdouble bz); +__attribute__((visibility("default"))) void glBinormal3dvEXT (const GLdouble *v); +__attribute__((visibility("default"))) void glBinormal3fEXT (GLfloat bx, GLfloat by, GLfloat bz); +__attribute__((visibility("default"))) void glBinormal3fvEXT (const GLfloat *v); +__attribute__((visibility("default"))) void glBinormal3iEXT (GLint bx, GLint by, GLint bz); +__attribute__((visibility("default"))) void glBinormal3ivEXT (const GLint *v); +__attribute__((visibility("default"))) void glBinormal3sEXT (GLshort bx, GLshort by, GLshort bz); +__attribute__((visibility("default"))) void glBinormal3svEXT (const GLshort *v); +__attribute__((visibility("default"))) void glTangentPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glBinormalPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer); + +typedef void ( * PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz); +typedef void ( * PFNGLTANGENT3BVEXTPROC) (const GLbyte *v); +typedef void ( * PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz); +typedef void ( * PFNGLTANGENT3DVEXTPROC) (const GLdouble *v); +typedef void ( * PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz); +typedef void ( * PFNGLTANGENT3FVEXTPROC) (const GLfloat *v); +typedef void ( * PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz); +typedef void ( * PFNGLTANGENT3IVEXTPROC) (const GLint *v); +typedef void ( * PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz); +typedef void ( * PFNGLTANGENT3SVEXTPROC) (const GLshort *v); +typedef void ( * PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz); +typedef void ( * PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v); +typedef void ( * PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz); +typedef void ( * PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v); +typedef void ( * PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz); +typedef void ( * PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v); +typedef void ( * PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz); +typedef void ( * PFNGLBINORMAL3IVEXTPROC) (const GLint *v); +typedef void ( * PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz); +typedef void ( * PFNGLBINORMAL3SVEXTPROC) (const GLshort *v); +typedef void ( * PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +# 8267 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glFinishTextureSUNX (void); + +typedef void ( * PFNGLFINISHTEXTURESUNXPROC) (void); + + + + + +__attribute__((visibility("default"))) void glGlobalAlphaFactorbSUN (GLbyte factor); +__attribute__((visibility("default"))) void glGlobalAlphaFactorsSUN (GLshort factor); +__attribute__((visibility("default"))) void glGlobalAlphaFactoriSUN (GLint factor); +__attribute__((visibility("default"))) void glGlobalAlphaFactorfSUN (GLfloat factor); +__attribute__((visibility("default"))) void glGlobalAlphaFactordSUN (GLdouble factor); +__attribute__((visibility("default"))) void glGlobalAlphaFactorubSUN (GLubyte factor); +__attribute__((visibility("default"))) void glGlobalAlphaFactorusSUN (GLushort factor); +__attribute__((visibility("default"))) void glGlobalAlphaFactoruiSUN (GLuint factor); + +typedef void ( * PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor); +typedef void ( * PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor); +typedef void ( * PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor); +typedef void ( * PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor); +typedef void ( * PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor); +typedef void ( * PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor); +typedef void ( * PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor); +typedef void ( * PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor); + + + + + +__attribute__((visibility("default"))) void glReplacementCodeuiSUN (GLuint code); +__attribute__((visibility("default"))) void glReplacementCodeusSUN (GLushort code); +__attribute__((visibility("default"))) void glReplacementCodeubSUN (GLubyte code); +__attribute__((visibility("default"))) void glReplacementCodeuivSUN (const GLuint *code); +__attribute__((visibility("default"))) void glReplacementCodeusvSUN (const GLushort *code); +__attribute__((visibility("default"))) void glReplacementCodeubvSUN (const GLubyte *code); +__attribute__((visibility("default"))) void glReplacementCodePointerSUN (GLenum type, GLsizei stride, const GLvoid* *pointer); + +typedef void ( * PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code); +typedef void ( * PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code); +typedef void ( * PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code); +typedef void ( * PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code); +typedef void ( * PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code); +typedef void ( * PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code); +typedef void ( * PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer); + + + + + +__attribute__((visibility("default"))) void glColor4ubVertex2fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); +__attribute__((visibility("default"))) void glColor4ubVertex2fvSUN (const GLubyte *c, const GLfloat *v); +__attribute__((visibility("default"))) void glColor4ubVertex3fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glColor4ubVertex3fvSUN (const GLubyte *c, const GLfloat *v); +__attribute__((visibility("default"))) void glColor3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glColor3fVertex3fvSUN (const GLfloat *c, const GLfloat *v); +__attribute__((visibility("default"))) void glNormal3fVertex3fSUN (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glNormal3fVertex3fvSUN (const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glColor4fNormal3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glColor4fNormal3fVertex3fvSUN (const GLfloat *c, const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glTexCoord2fVertex3fSUN (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glTexCoord2fVertex3fvSUN (const GLfloat *tc, const GLfloat *v); +__attribute__((visibility("default"))) void glTexCoord4fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glTexCoord4fVertex4fvSUN (const GLfloat *tc, const GLfloat *v); +__attribute__((visibility("default"))) void glTexCoord2fColor4ubVertex3fSUN (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *tc, const GLubyte *c, const GLfloat *v); +__attribute__((visibility("default"))) void glTexCoord2fColor3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glTexCoord2fColor3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *v); +__attribute__((visibility("default"))) void glTexCoord2fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glReplacementCodeuiVertex3fSUN (GLuint rc, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glReplacementCodeuiVertex3fvSUN (const GLuint *rc, const GLfloat *v); +__attribute__((visibility("default"))) void glReplacementCodeuiColor4ubVertex3fSUN (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *rc, const GLubyte *c, const GLfloat *v); +__attribute__((visibility("default"))) void glReplacementCodeuiColor3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *v); +__attribute__((visibility("default"))) void glReplacementCodeuiNormal3fVertex3fSUN (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *v); +__attribute__((visibility("default"))) void glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); + +typedef void ( * PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); +typedef void ( * PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v); +typedef void ( * PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v); +typedef void ( * PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v); +typedef void ( * PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v); +typedef void ( * PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v); +typedef void ( * PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v); +typedef void ( * PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v); +typedef void ( * PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v); +typedef void ( * PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v); +typedef void ( * PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v); +typedef void ( * PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v); +typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); + + + + + +__attribute__((visibility("default"))) void glBlendFuncSeparateEXT (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); + +typedef void ( * PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); + + + + + +__attribute__((visibility("default"))) void glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); + +typedef void ( * PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +# 8455 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glVertexWeightfEXT (GLfloat weight); +__attribute__((visibility("default"))) void glVertexWeightfvEXT (const GLfloat *weight); +__attribute__((visibility("default"))) void glVertexWeightPointerEXT (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer); + +typedef void ( * PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight); +typedef void ( * PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight); +typedef void ( * PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer); +# 8471 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glFlushVertexArrayRangeNV (void); +__attribute__((visibility("default"))) void glVertexArrayRangeNV (GLsizei length, const GLvoid *pointer); + +typedef void ( * PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void); +typedef void ( * PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer); + + + + + +__attribute__((visibility("default"))) void glCombinerParameterfvNV (GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glCombinerParameterfNV (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glCombinerParameterivNV (GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glCombinerParameteriNV (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glCombinerInputNV (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +__attribute__((visibility("default"))) void glCombinerOutputNV (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); +__attribute__((visibility("default"))) void glFinalCombinerInputNV (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +__attribute__((visibility("default"))) void glGetCombinerInputParameterfvNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetCombinerInputParameterivNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetCombinerOutputParameterfvNV (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetCombinerOutputParameterivNV (GLenum stage, GLenum portion, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetFinalCombinerInputParameterfvNV (GLenum variable, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetFinalCombinerInputParameterivNV (GLenum variable, GLenum pname, GLint *params); + +typedef void ( * PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params); +typedef void ( * PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param); +typedef void ( * PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params); +typedef void ( * PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); +typedef void ( * PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void ( * PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); +typedef void ( * PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void ( * PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); +typedef void ( * PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params); +typedef void ( * PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params); +# 8529 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glResizeBuffersMESA (void); + +typedef void ( * PFNGLRESIZEBUFFERSMESAPROC) (void); + + + + + +__attribute__((visibility("default"))) void glWindowPos2dMESA (GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glWindowPos2dvMESA (const GLdouble *v); +__attribute__((visibility("default"))) void glWindowPos2fMESA (GLfloat x, GLfloat y); +__attribute__((visibility("default"))) void glWindowPos2fvMESA (const GLfloat *v); +__attribute__((visibility("default"))) void glWindowPos2iMESA (GLint x, GLint y); +__attribute__((visibility("default"))) void glWindowPos2ivMESA (const GLint *v); +__attribute__((visibility("default"))) void glWindowPos2sMESA (GLshort x, GLshort y); +__attribute__((visibility("default"))) void glWindowPos2svMESA (const GLshort *v); +__attribute__((visibility("default"))) void glWindowPos3dMESA (GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glWindowPos3dvMESA (const GLdouble *v); +__attribute__((visibility("default"))) void glWindowPos3fMESA (GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glWindowPos3fvMESA (const GLfloat *v); +__attribute__((visibility("default"))) void glWindowPos3iMESA (GLint x, GLint y, GLint z); +__attribute__((visibility("default"))) void glWindowPos3ivMESA (const GLint *v); +__attribute__((visibility("default"))) void glWindowPos3sMESA (GLshort x, GLshort y, GLshort z); +__attribute__((visibility("default"))) void glWindowPos3svMESA (const GLshort *v); +__attribute__((visibility("default"))) void glWindowPos4dMESA (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glWindowPos4dvMESA (const GLdouble *v); +__attribute__((visibility("default"))) void glWindowPos4fMESA (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glWindowPos4fvMESA (const GLfloat *v); +__attribute__((visibility("default"))) void glWindowPos4iMESA (GLint x, GLint y, GLint z, GLint w); +__attribute__((visibility("default"))) void glWindowPos4ivMESA (const GLint *v); +__attribute__((visibility("default"))) void glWindowPos4sMESA (GLshort x, GLshort y, GLshort z, GLshort w); +__attribute__((visibility("default"))) void glWindowPos4svMESA (const GLshort *v); + +typedef void ( * PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y); +typedef void ( * PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v); +typedef void ( * PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y); +typedef void ( * PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v); +typedef void ( * PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y); +typedef void ( * PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v); +typedef void ( * PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y); +typedef void ( * PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v); +typedef void ( * PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v); +typedef void ( * PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v); +typedef void ( * PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z); +typedef void ( * PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v); +typedef void ( * PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z); +typedef void ( * PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v); +typedef void ( * PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v); +typedef void ( * PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v); +typedef void ( * PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w); +typedef void ( * PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v); +typedef void ( * PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w); +typedef void ( * PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v); +# 8595 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glMultiModeDrawArraysIBM (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); +__attribute__((visibility("default"))) void glMultiModeDrawElementsIBM (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride); + +typedef void ( * PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); +typedef void ( * PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride); + + + + + +__attribute__((visibility("default"))) void glColorPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +__attribute__((visibility("default"))) void glSecondaryColorPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +__attribute__((visibility("default"))) void glEdgeFlagPointerListIBM (GLint stride, const GLboolean* *pointer, GLint ptrstride); +__attribute__((visibility("default"))) void glFogCoordPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +__attribute__((visibility("default"))) void glIndexPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +__attribute__((visibility("default"))) void glNormalPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +__attribute__((visibility("default"))) void glTexCoordPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +__attribute__((visibility("default"))) void glVertexPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); + +typedef void ( * PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void ( * PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void ( * PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride); +typedef void ( * PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void ( * PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void ( * PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void ( * PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void ( * PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +# 8651 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glTbufferMask3DFX (GLuint mask); + +typedef void ( * PFNGLTBUFFERMASK3DFXPROC) (GLuint mask); + + + + + +__attribute__((visibility("default"))) void glSampleMaskEXT (GLclampf value, GLboolean invert); +__attribute__((visibility("default"))) void glSamplePatternEXT (GLenum pattern); + +typedef void ( * PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert); +typedef void ( * PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern); +# 8685 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glTextureColorMaskSGIS (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); + +typedef void ( * PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); + + + + + +__attribute__((visibility("default"))) void glIglooInterfaceSGIX (GLenum pname, const GLvoid *params); + +typedef void ( * PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params); +# 8709 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glDeleteFencesNV (GLsizei n, const GLuint *fences); +__attribute__((visibility("default"))) void glGenFencesNV (GLsizei n, GLuint *fences); +__attribute__((visibility("default"))) GLboolean glIsFenceNV (GLuint fence); +__attribute__((visibility("default"))) GLboolean glTestFenceNV (GLuint fence); +__attribute__((visibility("default"))) void glGetFenceivNV (GLuint fence, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glFinishFenceNV (GLuint fence); +__attribute__((visibility("default"))) void glSetFenceNV (GLuint fence, GLenum condition); + +typedef void ( * PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); +typedef void ( * PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); +typedef GLboolean ( * PFNGLISFENCENVPROC) (GLuint fence); +typedef GLboolean ( * PFNGLTESTFENCENVPROC) (GLuint fence); +typedef void ( * PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); +typedef void ( * PFNGLFINISHFENCENVPROC) (GLuint fence); +typedef void ( * PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); + + + + + +__attribute__((visibility("default"))) void glMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); +__attribute__((visibility("default"))) void glMapParameterivNV (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glMapParameterfvNV (GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glGetMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); +__attribute__((visibility("default"))) void glGetMapParameterivNV (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetMapParameterfvNV (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetMapAttribParameterivNV (GLenum target, GLuint index, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetMapAttribParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glEvalMapsNV (GLenum target, GLenum mode); + +typedef void ( * PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); +typedef void ( * PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); +typedef void ( * PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); +typedef void ( * PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); +typedef void ( * PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode); +# 8757 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glCombinerStageParameterfvNV (GLenum stage, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname, GLfloat *params); + +typedef void ( * PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params); +# 8787 "../../include/GL/glext.h" +__attribute__((visibility("default"))) GLboolean glAreProgramsResidentNV (GLsizei n, const GLuint *programs, GLboolean *residences); +__attribute__((visibility("default"))) void glBindProgramNV (GLenum target, GLuint id); +__attribute__((visibility("default"))) void glDeleteProgramsNV (GLsizei n, const GLuint *programs); +__attribute__((visibility("default"))) void glExecuteProgramNV (GLenum target, GLuint id, const GLfloat *params); +__attribute__((visibility("default"))) void glGenProgramsNV (GLsizei n, GLuint *programs); +__attribute__((visibility("default"))) void glGetProgramParameterdvNV (GLenum target, GLuint index, GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) void glGetProgramParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetProgramivNV (GLuint id, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetProgramStringNV (GLuint id, GLenum pname, GLubyte *program); +__attribute__((visibility("default"))) void glGetTrackMatrixivNV (GLenum target, GLuint address, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVertexAttribdvNV (GLuint index, GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) void glGetVertexAttribfvNV (GLuint index, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetVertexAttribivNV (GLuint index, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVertexAttribPointervNV (GLuint index, GLenum pname, GLvoid* *pointer); +__attribute__((visibility("default"))) GLboolean glIsProgramNV (GLuint id); +__attribute__((visibility("default"))) void glLoadProgramNV (GLenum target, GLuint id, GLsizei len, const GLubyte *program); +__attribute__((visibility("default"))) void glProgramParameter4dNV (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glProgramParameter4dvNV (GLenum target, GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glProgramParameter4fNV (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glProgramParameter4fvNV (GLenum target, GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glProgramParameters4dvNV (GLenum target, GLuint index, GLsizei count, const GLdouble *v); +__attribute__((visibility("default"))) void glProgramParameters4fvNV (GLenum target, GLuint index, GLsizei count, const GLfloat *v); +__attribute__((visibility("default"))) void glRequestResidentProgramsNV (GLsizei n, const GLuint *programs); +__attribute__((visibility("default"))) void glTrackMatrixNV (GLenum target, GLuint address, GLenum matrix, GLenum transform); +__attribute__((visibility("default"))) void glVertexAttribPointerNV (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glVertexAttrib1dNV (GLuint index, GLdouble x); +__attribute__((visibility("default"))) void glVertexAttrib1dvNV (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib1fNV (GLuint index, GLfloat x); +__attribute__((visibility("default"))) void glVertexAttrib1fvNV (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib1sNV (GLuint index, GLshort x); +__attribute__((visibility("default"))) void glVertexAttrib1svNV (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib2dNV (GLuint index, GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glVertexAttrib2dvNV (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib2fNV (GLuint index, GLfloat x, GLfloat y); +__attribute__((visibility("default"))) void glVertexAttrib2fvNV (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib2sNV (GLuint index, GLshort x, GLshort y); +__attribute__((visibility("default"))) void glVertexAttrib2svNV (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib3dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glVertexAttrib3dvNV (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib3fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glVertexAttrib3fvNV (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib3sNV (GLuint index, GLshort x, GLshort y, GLshort z); +__attribute__((visibility("default"))) void glVertexAttrib3svNV (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib4dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glVertexAttrib4dvNV (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib4fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glVertexAttrib4fvNV (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib4sNV (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +__attribute__((visibility("default"))) void glVertexAttrib4svNV (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib4ubNV (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +__attribute__((visibility("default"))) void glVertexAttrib4ubvNV (GLuint index, const GLubyte *v); +__attribute__((visibility("default"))) void glVertexAttribs1dvNV (GLuint index, GLsizei count, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribs1fvNV (GLuint index, GLsizei count, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttribs1svNV (GLuint index, GLsizei count, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttribs2dvNV (GLuint index, GLsizei count, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribs2fvNV (GLuint index, GLsizei count, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttribs2svNV (GLuint index, GLsizei count, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttribs3dvNV (GLuint index, GLsizei count, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribs3fvNV (GLuint index, GLsizei count, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttribs3svNV (GLuint index, GLsizei count, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttribs4dvNV (GLuint index, GLsizei count, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribs4fvNV (GLuint index, GLsizei count, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttribs4svNV (GLuint index, GLsizei count, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttribs4ubvNV (GLuint index, GLsizei count, const GLubyte *v); + +typedef GLboolean ( * PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences); +typedef void ( * PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); +typedef void ( * PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); +typedef void ( * PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params); +typedef void ( * PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); +typedef void ( * PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params); +typedef void ( * PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void ( * PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program); +typedef void ( * PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void ( * PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); +typedef GLboolean ( * PFNGLISPROGRAMNVPROC) (GLuint id); +typedef void ( * PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); +typedef void ( * PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v); +typedef void ( * PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v); +typedef void ( * PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLdouble *v); +typedef void ( * PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *v); +typedef void ( * PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); +typedef void ( * PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); +typedef void ( * PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x); +typedef void ( * PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); +typedef void ( * PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); +typedef void ( * PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void ( * PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void ( * PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); +typedef void ( * PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void ( * PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void ( * PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void ( * PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v); +typedef void ( * PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v); +# 8945 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glTexBumpParameterivATI (GLenum pname, const GLint *param); +__attribute__((visibility("default"))) void glTexBumpParameterfvATI (GLenum pname, const GLfloat *param); +__attribute__((visibility("default"))) void glGetTexBumpParameterivATI (GLenum pname, GLint *param); +__attribute__((visibility("default"))) void glGetTexBumpParameterfvATI (GLenum pname, GLfloat *param); + +typedef void ( * PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param); +typedef void ( * PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param); +typedef void ( * PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param); +typedef void ( * PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param); + + + + + +__attribute__((visibility("default"))) GLuint glGenFragmentShadersATI (GLuint range); +__attribute__((visibility("default"))) void glBindFragmentShaderATI (GLuint id); +__attribute__((visibility("default"))) void glDeleteFragmentShaderATI (GLuint id); +__attribute__((visibility("default"))) void glBeginFragmentShaderATI (void); +__attribute__((visibility("default"))) void glEndFragmentShaderATI (void); +__attribute__((visibility("default"))) void glPassTexCoordATI (GLuint dst, GLuint coord, GLenum swizzle); +__attribute__((visibility("default"))) void glSampleMapATI (GLuint dst, GLuint interp, GLenum swizzle); +__attribute__((visibility("default"))) void glColorFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +__attribute__((visibility("default"))) void glColorFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +__attribute__((visibility("default"))) void glColorFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +__attribute__((visibility("default"))) void glAlphaFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +__attribute__((visibility("default"))) void glAlphaFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +__attribute__((visibility("default"))) void glAlphaFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +__attribute__((visibility("default"))) void glSetFragmentShaderConstantATI (GLuint dst, const GLfloat *value); + +typedef GLuint ( * PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range); +typedef void ( * PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id); +typedef void ( * PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id); +typedef void ( * PFNGLBEGINFRAGMENTSHADERATIPROC) (void); +typedef void ( * PFNGLENDFRAGMENTSHADERATIPROC) (void); +typedef void ( * PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle); +typedef void ( * PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle); +typedef void ( * PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void ( * PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +typedef void ( * PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void ( * PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void ( * PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +typedef void ( * PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void ( * PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value); + + + + + +__attribute__((visibility("default"))) void glPNTrianglesiATI (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glPNTrianglesfATI (GLenum pname, GLfloat param); + +typedef void ( * PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param); +typedef void ( * PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param); + + + + + +__attribute__((visibility("default"))) GLuint glNewObjectBufferATI (GLsizei size, const GLvoid *pointer, GLenum usage); +__attribute__((visibility("default"))) GLboolean glIsObjectBufferATI (GLuint buffer); +__attribute__((visibility("default"))) void glUpdateObjectBufferATI (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); +__attribute__((visibility("default"))) void glGetObjectBufferfvATI (GLuint buffer, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetObjectBufferivATI (GLuint buffer, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glFreeObjectBufferATI (GLuint buffer); +__attribute__((visibility("default"))) void glArrayObjectATI (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +__attribute__((visibility("default"))) void glGetArrayObjectfvATI (GLenum array, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetArrayObjectivATI (GLenum array, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glVariantArrayObjectATI (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +__attribute__((visibility("default"))) void glGetVariantArrayObjectfvATI (GLuint id, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetVariantArrayObjectivATI (GLuint id, GLenum pname, GLint *params); + +typedef GLuint ( * PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage); +typedef GLboolean ( * PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void ( * PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); +typedef void ( * PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params); +typedef void ( * PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void ( * PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void ( * PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params); +typedef void ( * PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void ( * PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params); + + + + + +__attribute__((visibility("default"))) void glBeginVertexShaderEXT (void); +__attribute__((visibility("default"))) void glEndVertexShaderEXT (void); +__attribute__((visibility("default"))) void glBindVertexShaderEXT (GLuint id); +__attribute__((visibility("default"))) GLuint glGenVertexShadersEXT (GLuint range); +__attribute__((visibility("default"))) void glDeleteVertexShaderEXT (GLuint id); +__attribute__((visibility("default"))) void glShaderOp1EXT (GLenum op, GLuint res, GLuint arg1); +__attribute__((visibility("default"))) void glShaderOp2EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2); +__attribute__((visibility("default"))) void glShaderOp3EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); +__attribute__((visibility("default"))) void glSwizzleEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +__attribute__((visibility("default"))) void glWriteMaskEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +__attribute__((visibility("default"))) void glInsertComponentEXT (GLuint res, GLuint src, GLuint num); +__attribute__((visibility("default"))) void glExtractComponentEXT (GLuint res, GLuint src, GLuint num); +__attribute__((visibility("default"))) GLuint glGenSymbolsEXT (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); +__attribute__((visibility("default"))) void glSetInvariantEXT (GLuint id, GLenum type, const GLvoid *addr); +__attribute__((visibility("default"))) void glSetLocalConstantEXT (GLuint id, GLenum type, const GLvoid *addr); +__attribute__((visibility("default"))) void glVariantbvEXT (GLuint id, const GLbyte *addr); +__attribute__((visibility("default"))) void glVariantsvEXT (GLuint id, const GLshort *addr); +__attribute__((visibility("default"))) void glVariantivEXT (GLuint id, const GLint *addr); +__attribute__((visibility("default"))) void glVariantfvEXT (GLuint id, const GLfloat *addr); +__attribute__((visibility("default"))) void glVariantdvEXT (GLuint id, const GLdouble *addr); +__attribute__((visibility("default"))) void glVariantubvEXT (GLuint id, const GLubyte *addr); +__attribute__((visibility("default"))) void glVariantusvEXT (GLuint id, const GLushort *addr); +__attribute__((visibility("default"))) void glVariantuivEXT (GLuint id, const GLuint *addr); +__attribute__((visibility("default"))) void glVariantPointerEXT (GLuint id, GLenum type, GLuint stride, const GLvoid *addr); +__attribute__((visibility("default"))) void glEnableVariantClientStateEXT (GLuint id); +__attribute__((visibility("default"))) void glDisableVariantClientStateEXT (GLuint id); +__attribute__((visibility("default"))) GLuint glBindLightParameterEXT (GLenum light, GLenum value); +__attribute__((visibility("default"))) GLuint glBindMaterialParameterEXT (GLenum face, GLenum value); +__attribute__((visibility("default"))) GLuint glBindTexGenParameterEXT (GLenum unit, GLenum coord, GLenum value); +__attribute__((visibility("default"))) GLuint glBindTextureUnitParameterEXT (GLenum unit, GLenum value); +__attribute__((visibility("default"))) GLuint glBindParameterEXT (GLenum value); +__attribute__((visibility("default"))) GLboolean glIsVariantEnabledEXT (GLuint id, GLenum cap); +__attribute__((visibility("default"))) void glGetVariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); +__attribute__((visibility("default"))) void glGetVariantIntegervEXT (GLuint id, GLenum value, GLint *data); +__attribute__((visibility("default"))) void glGetVariantFloatvEXT (GLuint id, GLenum value, GLfloat *data); +__attribute__((visibility("default"))) void glGetVariantPointervEXT (GLuint id, GLenum value, GLvoid* *data); +__attribute__((visibility("default"))) void glGetInvariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); +__attribute__((visibility("default"))) void glGetInvariantIntegervEXT (GLuint id, GLenum value, GLint *data); +__attribute__((visibility("default"))) void glGetInvariantFloatvEXT (GLuint id, GLenum value, GLfloat *data); +__attribute__((visibility("default"))) void glGetLocalConstantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); +__attribute__((visibility("default"))) void glGetLocalConstantIntegervEXT (GLuint id, GLenum value, GLint *data); +__attribute__((visibility("default"))) void glGetLocalConstantFloatvEXT (GLuint id, GLenum value, GLfloat *data); + +typedef void ( * PFNGLBEGINVERTEXSHADEREXTPROC) (void); +typedef void ( * PFNGLENDVERTEXSHADEREXTPROC) (void); +typedef void ( * PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id); +typedef GLuint ( * PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range); +typedef void ( * PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id); +typedef void ( * PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1); +typedef void ( * PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); +typedef void ( * PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); +typedef void ( * PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void ( * PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void ( * PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef void ( * PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef GLuint ( * PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); +typedef void ( * PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); +typedef void ( * PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); +typedef void ( * PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr); +typedef void ( * PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr); +typedef void ( * PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr); +typedef void ( * PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr); +typedef void ( * PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr); +typedef void ( * PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr); +typedef void ( * PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr); +typedef void ( * PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr); +typedef void ( * PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr); +typedef void ( * PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); +typedef void ( * PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); +typedef GLuint ( * PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value); +typedef GLuint ( * PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value); +typedef GLuint ( * PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value); +typedef GLuint ( * PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value); +typedef GLuint ( * PFNGLBINDPARAMETEREXTPROC) (GLenum value); +typedef GLboolean ( * PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap); +typedef void ( * PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void ( * PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void ( * PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +typedef void ( * PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data); +typedef void ( * PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void ( * PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void ( * PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +typedef void ( * PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void ( * PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void ( * PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); + + + + + +__attribute__((visibility("default"))) void glVertexStream1sATI (GLenum stream, GLshort x); +__attribute__((visibility("default"))) void glVertexStream1svATI (GLenum stream, const GLshort *coords); +__attribute__((visibility("default"))) void glVertexStream1iATI (GLenum stream, GLint x); +__attribute__((visibility("default"))) void glVertexStream1ivATI (GLenum stream, const GLint *coords); +__attribute__((visibility("default"))) void glVertexStream1fATI (GLenum stream, GLfloat x); +__attribute__((visibility("default"))) void glVertexStream1fvATI (GLenum stream, const GLfloat *coords); +__attribute__((visibility("default"))) void glVertexStream1dATI (GLenum stream, GLdouble x); +__attribute__((visibility("default"))) void glVertexStream1dvATI (GLenum stream, const GLdouble *coords); +__attribute__((visibility("default"))) void glVertexStream2sATI (GLenum stream, GLshort x, GLshort y); +__attribute__((visibility("default"))) void glVertexStream2svATI (GLenum stream, const GLshort *coords); +__attribute__((visibility("default"))) void glVertexStream2iATI (GLenum stream, GLint x, GLint y); +__attribute__((visibility("default"))) void glVertexStream2ivATI (GLenum stream, const GLint *coords); +__attribute__((visibility("default"))) void glVertexStream2fATI (GLenum stream, GLfloat x, GLfloat y); +__attribute__((visibility("default"))) void glVertexStream2fvATI (GLenum stream, const GLfloat *coords); +__attribute__((visibility("default"))) void glVertexStream2dATI (GLenum stream, GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glVertexStream2dvATI (GLenum stream, const GLdouble *coords); +__attribute__((visibility("default"))) void glVertexStream3sATI (GLenum stream, GLshort x, GLshort y, GLshort z); +__attribute__((visibility("default"))) void glVertexStream3svATI (GLenum stream, const GLshort *coords); +__attribute__((visibility("default"))) void glVertexStream3iATI (GLenum stream, GLint x, GLint y, GLint z); +__attribute__((visibility("default"))) void glVertexStream3ivATI (GLenum stream, const GLint *coords); +__attribute__((visibility("default"))) void glVertexStream3fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glVertexStream3fvATI (GLenum stream, const GLfloat *coords); +__attribute__((visibility("default"))) void glVertexStream3dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glVertexStream3dvATI (GLenum stream, const GLdouble *coords); +__attribute__((visibility("default"))) void glVertexStream4sATI (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); +__attribute__((visibility("default"))) void glVertexStream4svATI (GLenum stream, const GLshort *coords); +__attribute__((visibility("default"))) void glVertexStream4iATI (GLenum stream, GLint x, GLint y, GLint z, GLint w); +__attribute__((visibility("default"))) void glVertexStream4ivATI (GLenum stream, const GLint *coords); +__attribute__((visibility("default"))) void glVertexStream4fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glVertexStream4fvATI (GLenum stream, const GLfloat *coords); +__attribute__((visibility("default"))) void glVertexStream4dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glVertexStream4dvATI (GLenum stream, const GLdouble *coords); +__attribute__((visibility("default"))) void glNormalStream3bATI (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); +__attribute__((visibility("default"))) void glNormalStream3bvATI (GLenum stream, const GLbyte *coords); +__attribute__((visibility("default"))) void glNormalStream3sATI (GLenum stream, GLshort nx, GLshort ny, GLshort nz); +__attribute__((visibility("default"))) void glNormalStream3svATI (GLenum stream, const GLshort *coords); +__attribute__((visibility("default"))) void glNormalStream3iATI (GLenum stream, GLint nx, GLint ny, GLint nz); +__attribute__((visibility("default"))) void glNormalStream3ivATI (GLenum stream, const GLint *coords); +__attribute__((visibility("default"))) void glNormalStream3fATI (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); +__attribute__((visibility("default"))) void glNormalStream3fvATI (GLenum stream, const GLfloat *coords); +__attribute__((visibility("default"))) void glNormalStream3dATI (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); +__attribute__((visibility("default"))) void glNormalStream3dvATI (GLenum stream, const GLdouble *coords); +__attribute__((visibility("default"))) void glClientActiveVertexStreamATI (GLenum stream); +__attribute__((visibility("default"))) void glVertexBlendEnviATI (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glVertexBlendEnvfATI (GLenum pname, GLfloat param); + +typedef void ( * PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x); +typedef void ( * PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void ( * PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x); +typedef void ( * PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords); +typedef void ( * PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x); +typedef void ( * PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void ( * PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x); +typedef void ( * PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void ( * PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y); +typedef void ( * PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void ( * PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y); +typedef void ( * PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords); +typedef void ( * PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y); +typedef void ( * PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void ( * PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y); +typedef void ( * PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void ( * PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); +typedef void ( * PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void ( * PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); +typedef void ( * PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); +typedef void ( * PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void ( * PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void ( * PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void ( * PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void ( * PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); +typedef void ( * PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords); +typedef void ( * PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void ( * PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void ( * PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); +typedef void ( * PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords); +typedef void ( * PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz); +typedef void ( * PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void ( * PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz); +typedef void ( * PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); +typedef void ( * PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); +typedef void ( * PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void ( * PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); +typedef void ( * PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void ( * PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream); +typedef void ( * PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param); +typedef void ( * PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param); + + + + + +__attribute__((visibility("default"))) void glElementPointerATI (GLenum type, const GLvoid *pointer); +__attribute__((visibility("default"))) void glDrawElementArrayATI (GLenum mode, GLsizei count); +__attribute__((visibility("default"))) void glDrawRangeElementArrayATI (GLenum mode, GLuint start, GLuint end, GLsizei count); + +typedef void ( * PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer); +typedef void ( * PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count); +typedef void ( * PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); + + + + + +__attribute__((visibility("default"))) void glDrawMeshArraysSUN (GLenum mode, GLint first, GLsizei count, GLsizei width); + +typedef void ( * PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width); +# 9251 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glGenOcclusionQueriesNV (GLsizei n, GLuint *ids); +__attribute__((visibility("default"))) void glDeleteOcclusionQueriesNV (GLsizei n, const GLuint *ids); +__attribute__((visibility("default"))) GLboolean glIsOcclusionQueryNV (GLuint id); +__attribute__((visibility("default"))) void glBeginOcclusionQueryNV (GLuint id); +__attribute__((visibility("default"))) void glEndOcclusionQueryNV (void); +__attribute__((visibility("default"))) void glGetOcclusionQueryivNV (GLuint id, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetOcclusionQueryuivNV (GLuint id, GLenum pname, GLuint *params); + +typedef void ( * PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids); +typedef void ( * PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean ( * PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id); +typedef void ( * PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id); +typedef void ( * PFNGLENDOCCLUSIONQUERYNVPROC) (void); +typedef void ( * PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void ( * PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params); + + + + + +__attribute__((visibility("default"))) void glPointParameteriNV (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glPointParameterivNV (GLenum pname, const GLint *params); + +typedef void ( * PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param); +typedef void ( * PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params); +# 9293 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glActiveStencilFaceEXT (GLenum face); + +typedef void ( * PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face); +# 9309 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glElementPointerAPPLE (GLenum type, const GLvoid *pointer); +__attribute__((visibility("default"))) void glDrawElementArrayAPPLE (GLenum mode, GLint first, GLsizei count); +__attribute__((visibility("default"))) void glDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); +__attribute__((visibility("default"))) void glMultiDrawElementArrayAPPLE (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +__attribute__((visibility("default"))) void glMultiDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); + +typedef void ( * PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer); +typedef void ( * PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count); +typedef void ( * PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); +typedef void ( * PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void ( * PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); + + + + + +__attribute__((visibility("default"))) void glGenFencesAPPLE (GLsizei n, GLuint *fences); +__attribute__((visibility("default"))) void glDeleteFencesAPPLE (GLsizei n, const GLuint *fences); +__attribute__((visibility("default"))) void glSetFenceAPPLE (GLuint fence); +__attribute__((visibility("default"))) GLboolean glIsFenceAPPLE (GLuint fence); +__attribute__((visibility("default"))) GLboolean glTestFenceAPPLE (GLuint fence); +__attribute__((visibility("default"))) void glFinishFenceAPPLE (GLuint fence); +__attribute__((visibility("default"))) GLboolean glTestObjectAPPLE (GLenum object, GLuint name); +__attribute__((visibility("default"))) void glFinishObjectAPPLE (GLenum object, GLint name); + +typedef void ( * PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences); +typedef void ( * PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences); +typedef void ( * PFNGLSETFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean ( * PFNGLISFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean ( * PFNGLTESTFENCEAPPLEPROC) (GLuint fence); +typedef void ( * PFNGLFINISHFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean ( * PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name); +typedef void ( * PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name); + + + + + +__attribute__((visibility("default"))) void glBindVertexArrayAPPLE (GLuint array); +__attribute__((visibility("default"))) void glDeleteVertexArraysAPPLE (GLsizei n, const GLuint *arrays); +__attribute__((visibility("default"))) void glGenVertexArraysAPPLE (GLsizei n, GLuint *arrays); +__attribute__((visibility("default"))) GLboolean glIsVertexArrayAPPLE (GLuint array); + +typedef void ( * PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array); +typedef void ( * PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays); +typedef void ( * PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean ( * PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array); + + + + + +__attribute__((visibility("default"))) void glVertexArrayRangeAPPLE (GLsizei length, GLvoid *pointer); +__attribute__((visibility("default"))) void glFlushVertexArrayRangeAPPLE (GLsizei length, GLvoid *pointer); +__attribute__((visibility("default"))) void glVertexArrayParameteriAPPLE (GLenum pname, GLint param); + +typedef void ( * PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); +typedef void ( * PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); +typedef void ( * PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param); +# 9381 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glDrawBuffersATI (GLsizei n, const GLenum *bufs); + +typedef void ( * PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs); +# 9409 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glProgramNamedParameter4fNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glProgramNamedParameter4dNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glProgramNamedParameter4fvNV (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); +__attribute__((visibility("default"))) void glProgramNamedParameter4dvNV (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); +__attribute__((visibility("default"))) void glGetProgramNamedParameterfvNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); +__attribute__((visibility("default"))) void glGetProgramNamedParameterdvNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); + +typedef void ( * PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); +typedef void ( * PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); +typedef void ( * PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); +typedef void ( * PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); + + + + + +__attribute__((visibility("default"))) void glVertex2hNV (GLhalfNV x, GLhalfNV y); +__attribute__((visibility("default"))) void glVertex2hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertex3hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z); +__attribute__((visibility("default"))) void glVertex3hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertex4hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +__attribute__((visibility("default"))) void glVertex4hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glNormal3hNV (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); +__attribute__((visibility("default"))) void glNormal3hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +__attribute__((visibility("default"))) void glColor3hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glColor4hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); +__attribute__((visibility("default"))) void glColor4hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glTexCoord1hNV (GLhalfNV s); +__attribute__((visibility("default"))) void glTexCoord1hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glTexCoord2hNV (GLhalfNV s, GLhalfNV t); +__attribute__((visibility("default"))) void glTexCoord2hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glTexCoord3hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r); +__attribute__((visibility("default"))) void glTexCoord3hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glTexCoord4hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +__attribute__((visibility("default"))) void glTexCoord4hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glMultiTexCoord1hNV (GLenum target, GLhalfNV s); +__attribute__((visibility("default"))) void glMultiTexCoord1hvNV (GLenum target, const GLhalfNV *v); +__attribute__((visibility("default"))) void glMultiTexCoord2hNV (GLenum target, GLhalfNV s, GLhalfNV t); +__attribute__((visibility("default"))) void glMultiTexCoord2hvNV (GLenum target, const GLhalfNV *v); +__attribute__((visibility("default"))) void glMultiTexCoord3hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); +__attribute__((visibility("default"))) void glMultiTexCoord3hvNV (GLenum target, const GLhalfNV *v); +__attribute__((visibility("default"))) void glMultiTexCoord4hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +__attribute__((visibility("default"))) void glMultiTexCoord4hvNV (GLenum target, const GLhalfNV *v); +__attribute__((visibility("default"))) void glFogCoordhNV (GLhalfNV fog); +__attribute__((visibility("default"))) void glFogCoordhvNV (const GLhalfNV *fog); +__attribute__((visibility("default"))) void glSecondaryColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +__attribute__((visibility("default"))) void glSecondaryColor3hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertexWeighthNV (GLhalfNV weight); +__attribute__((visibility("default"))) void glVertexWeighthvNV (const GLhalfNV *weight); +__attribute__((visibility("default"))) void glVertexAttrib1hNV (GLuint index, GLhalfNV x); +__attribute__((visibility("default"))) void glVertexAttrib1hvNV (GLuint index, const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertexAttrib2hNV (GLuint index, GLhalfNV x, GLhalfNV y); +__attribute__((visibility("default"))) void glVertexAttrib2hvNV (GLuint index, const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertexAttrib3hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); +__attribute__((visibility("default"))) void glVertexAttrib3hvNV (GLuint index, const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertexAttrib4hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +__attribute__((visibility("default"))) void glVertexAttrib4hvNV (GLuint index, const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertexAttribs1hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertexAttribs2hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertexAttribs3hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfNV *v); + +typedef void ( * PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y); +typedef void ( * PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z); +typedef void ( * PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +typedef void ( * PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); +typedef void ( * PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +typedef void ( * PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); +typedef void ( * PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLTEXCOORD1HNVPROC) (GLhalfNV s); +typedef void ( * PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t); +typedef void ( * PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r); +typedef void ( * PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +typedef void ( * PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s); +typedef void ( * PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void ( * PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t); +typedef void ( * PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void ( * PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); +typedef void ( * PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void ( * PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +typedef void ( * PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void ( * PFNGLFOGCOORDHNVPROC) (GLhalfNV fog); +typedef void ( * PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog); +typedef void ( * PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +typedef void ( * PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight); +typedef void ( * PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight); +typedef void ( * PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x); +typedef void ( * PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void ( * PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y); +typedef void ( * PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void ( * PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); +typedef void ( * PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void ( * PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +typedef void ( * PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void ( * PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void ( * PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void ( * PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void ( * PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); + + + + + +__attribute__((visibility("default"))) void glPixelDataRangeNV (GLenum target, GLsizei length, GLvoid *pointer); +__attribute__((visibility("default"))) void glFlushPixelDataRangeNV (GLenum target); + +typedef void ( * PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer); +typedef void ( * PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target); + + + + + +__attribute__((visibility("default"))) void glPrimitiveRestartNV (void); +__attribute__((visibility("default"))) void glPrimitiveRestartIndexNV (GLuint index); + +typedef void ( * PFNGLPRIMITIVERESTARTNVPROC) (void); +typedef void ( * PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index); +# 9553 "../../include/GL/glext.h" +__attribute__((visibility("default"))) GLvoid* glMapObjectBufferATI (GLuint buffer); +__attribute__((visibility("default"))) void glUnmapObjectBufferATI (GLuint buffer); + +typedef GLvoid* ( * PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void ( * PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer); + + + + + +__attribute__((visibility("default"))) void glStencilOpSeparateATI (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +__attribute__((visibility("default"))) void glStencilFuncSeparateATI (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); + +typedef void ( * PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void ( * PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); + + + + + +__attribute__((visibility("default"))) void glVertexAttribArrayObjectATI (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); +__attribute__((visibility("default"))) void glGetVertexAttribArrayObjectfvATI (GLuint index, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetVertexAttribArrayObjectivATI (GLuint index, GLenum pname, GLint *params); + +typedef void ( * PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); +typedef void ( * PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params); +# 9589 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glDepthBoundsEXT (GLclampd zmin, GLclampd zmax); + +typedef void ( * PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax); +# 9601 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glBlendEquationSeparateEXT (GLenum modeRGB, GLenum modeAlpha); + +typedef void ( * PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha); +# 9637 "../../include/GL/glext.h" +__attribute__((visibility("default"))) GLboolean glIsRenderbufferEXT (GLuint renderbuffer); +__attribute__((visibility("default"))) void glBindRenderbufferEXT (GLenum target, GLuint renderbuffer); +__attribute__((visibility("default"))) void glDeleteRenderbuffersEXT (GLsizei n, const GLuint *renderbuffers); +__attribute__((visibility("default"))) void glGenRenderbuffersEXT (GLsizei n, GLuint *renderbuffers); +__attribute__((visibility("default"))) void glRenderbufferStorageEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glGetRenderbufferParameterivEXT (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) GLboolean glIsFramebufferEXT (GLuint framebuffer); +__attribute__((visibility("default"))) void glBindFramebufferEXT (GLenum target, GLuint framebuffer); +__attribute__((visibility("default"))) void glDeleteFramebuffersEXT (GLsizei n, const GLuint *framebuffers); +__attribute__((visibility("default"))) void glGenFramebuffersEXT (GLsizei n, GLuint *framebuffers); +__attribute__((visibility("default"))) GLenum glCheckFramebufferStatusEXT (GLenum target); +__attribute__((visibility("default"))) void glFramebufferTexture1DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glFramebufferTexture2DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glFramebufferTexture3DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +__attribute__((visibility("default"))) void glFramebufferRenderbufferEXT (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +__attribute__((visibility("default"))) void glGetFramebufferAttachmentParameterivEXT (GLenum target, GLenum attachment, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGenerateMipmapEXT (GLenum target); + +typedef GLboolean ( * PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer); +typedef void ( * PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer); +typedef void ( * PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers); +typedef void ( * PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers); +typedef void ( * PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void ( * PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef GLboolean ( * PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer); +typedef void ( * PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer); +typedef void ( * PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers); +typedef void ( * PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers); +typedef GLenum ( * PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target); +typedef void ( * PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void ( * PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void ( * PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void ( * PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void ( * PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); +typedef void ( * PFNGLGENERATEMIPMAPEXTPROC) (GLenum target); + + + + + +__attribute__((visibility("default"))) void glStringMarkerGREMEDY (GLsizei len, const GLvoid *string); + +typedef void ( * PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string); +# 9689 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glStencilClearTagEXT (GLsizei stencilTagBits, GLuint stencilClearTag); + +typedef void ( * PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag); +# 9701 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); + +typedef void ( * PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); + + + + + +__attribute__((visibility("default"))) void glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); + +typedef void ( * PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +# 9721 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64EXT *params); +__attribute__((visibility("default"))) void glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64EXT *params); + +typedef void ( * PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params); +typedef void ( * PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params); + + + + + +__attribute__((visibility("default"))) void glProgramEnvParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +__attribute__((visibility("default"))) void glProgramLocalParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params); + +typedef void ( * PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +typedef void ( * PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); + + + + + +__attribute__((visibility("default"))) void glBufferParameteriAPPLE (GLenum target, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glFlushMappedBufferRangeAPPLE (GLenum target, GLintptr offset, GLsizeiptr size); + +typedef void ( * PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param); +typedef void ( * PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size); + + + + + +__attribute__((visibility("default"))) void glProgramLocalParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +__attribute__((visibility("default"))) void glProgramLocalParameterI4ivNV (GLenum target, GLuint index, const GLint *params); +__attribute__((visibility("default"))) void glProgramLocalParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params); +__attribute__((visibility("default"))) void glProgramLocalParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +__attribute__((visibility("default"))) void glProgramLocalParameterI4uivNV (GLenum target, GLuint index, const GLuint *params); +__attribute__((visibility("default"))) void glProgramLocalParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params); +__attribute__((visibility("default"))) void glProgramEnvParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +__attribute__((visibility("default"))) void glProgramEnvParameterI4ivNV (GLenum target, GLuint index, const GLint *params); +__attribute__((visibility("default"))) void glProgramEnvParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params); +__attribute__((visibility("default"))) void glProgramEnvParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +__attribute__((visibility("default"))) void glProgramEnvParameterI4uivNV (GLenum target, GLuint index, const GLuint *params); +__attribute__((visibility("default"))) void glProgramEnvParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params); +__attribute__((visibility("default"))) void glGetProgramLocalParameterIivNV (GLenum target, GLuint index, GLint *params); +__attribute__((visibility("default"))) void glGetProgramLocalParameterIuivNV (GLenum target, GLuint index, GLuint *params); +__attribute__((visibility("default"))) void glGetProgramEnvParameterIivNV (GLenum target, GLuint index, GLint *params); +__attribute__((visibility("default"))) void glGetProgramEnvParameterIuivNV (GLenum target, GLuint index, GLuint *params); + +typedef void ( * PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void ( * PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); +typedef void ( * PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void ( * PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void ( * PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); +typedef void ( * PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void ( * PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void ( * PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); +typedef void ( * PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void ( * PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void ( * PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); +typedef void ( * PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void ( * PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); +typedef void ( * PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); +typedef void ( * PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); +typedef void ( * PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); + + + + + +__attribute__((visibility("default"))) void glProgramVertexLimitNV (GLenum target, GLint limit); +__attribute__((visibility("default"))) void glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glFramebufferTextureLayerEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +__attribute__((visibility("default"))) void glFramebufferTextureFaceEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); + +typedef void ( * PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit); +typedef void ( * PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void ( * PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void ( * PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); + + + + + +__attribute__((visibility("default"))) void glProgramParameteriEXT (GLuint program, GLenum pname, GLint value); + +typedef void ( * PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value); + + + + + +__attribute__((visibility("default"))) void glVertexAttribI1iEXT (GLuint index, GLint x); +__attribute__((visibility("default"))) void glVertexAttribI2iEXT (GLuint index, GLint x, GLint y); +__attribute__((visibility("default"))) void glVertexAttribI3iEXT (GLuint index, GLint x, GLint y, GLint z); +__attribute__((visibility("default"))) void glVertexAttribI4iEXT (GLuint index, GLint x, GLint y, GLint z, GLint w); +__attribute__((visibility("default"))) void glVertexAttribI1uiEXT (GLuint index, GLuint x); +__attribute__((visibility("default"))) void glVertexAttribI2uiEXT (GLuint index, GLuint x, GLuint y); +__attribute__((visibility("default"))) void glVertexAttribI3uiEXT (GLuint index, GLuint x, GLuint y, GLuint z); +__attribute__((visibility("default"))) void glVertexAttribI4uiEXT (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +__attribute__((visibility("default"))) void glVertexAttribI1ivEXT (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttribI2ivEXT (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttribI3ivEXT (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttribI4ivEXT (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttribI1uivEXT (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttribI2uivEXT (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttribI3uivEXT (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttribI4uivEXT (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttribI4bvEXT (GLuint index, const GLbyte *v); +__attribute__((visibility("default"))) void glVertexAttribI4svEXT (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttribI4ubvEXT (GLuint index, const GLubyte *v); +__attribute__((visibility("default"))) void glVertexAttribI4usvEXT (GLuint index, const GLushort *v); +__attribute__((visibility("default"))) void glVertexAttribIPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glGetVertexAttribIivEXT (GLuint index, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVertexAttribIuivEXT (GLuint index, GLenum pname, GLuint *params); + +typedef void ( * PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x); +typedef void ( * PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y); +typedef void ( * PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z); +typedef void ( * PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void ( * PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x); +typedef void ( * PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y); +typedef void ( * PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z); +typedef void ( * PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void ( * PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v); +typedef void ( * PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v); +typedef void ( * PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v); +typedef void ( * PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params); + + + + + +__attribute__((visibility("default"))) void glGetUniformuivEXT (GLuint program, GLint location, GLuint *params); +__attribute__((visibility("default"))) void glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name); +__attribute__((visibility("default"))) GLint glGetFragDataLocationEXT (GLuint program, const GLchar *name); +__attribute__((visibility("default"))) void glUniform1uiEXT (GLint location, GLuint v0); +__attribute__((visibility("default"))) void glUniform2uiEXT (GLint location, GLuint v0, GLuint v1); +__attribute__((visibility("default"))) void glUniform3uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2); +__attribute__((visibility("default"))) void glUniform4uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +__attribute__((visibility("default"))) void glUniform1uivEXT (GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glUniform2uivEXT (GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glUniform3uivEXT (GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glUniform4uivEXT (GLint location, GLsizei count, const GLuint *value); + +typedef void ( * PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params); +typedef void ( * PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name); +typedef GLint ( * PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name); +typedef void ( * PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0); +typedef void ( * PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1); +typedef void ( * PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void ( * PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void ( * PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); + + + + + +__attribute__((visibility("default"))) void glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount); +__attribute__((visibility("default"))) void glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); + +typedef void ( * PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount); +typedef void ( * PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +# 9909 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer); + +typedef void ( * PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer); +# 9929 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glDepthRangedNV (GLdouble zNear, GLdouble zFar); +__attribute__((visibility("default"))) void glClearDepthdNV (GLdouble depth); +__attribute__((visibility("default"))) void glDepthBoundsdNV (GLdouble zmin, GLdouble zmax); + +typedef void ( * PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar); +typedef void ( * PFNGLCLEARDEPTHDNVPROC) (GLdouble depth); +typedef void ( * PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax); +# 9945 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glRenderbufferStorageMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); + +typedef void ( * PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +# 9961 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glProgramBufferParametersfvNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params); +__attribute__((visibility("default"))) void glProgramBufferParametersIivNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params); +__attribute__((visibility("default"))) void glProgramBufferParametersIuivNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params); + +typedef void ( * PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params); +typedef void ( * PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params); +typedef void ( * PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params); + + + + + +__attribute__((visibility("default"))) void glColorMaskIndexedEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +__attribute__((visibility("default"))) void glGetBooleanIndexedvEXT (GLenum target, GLuint index, GLboolean *data); +__attribute__((visibility("default"))) void glGetIntegerIndexedvEXT (GLenum target, GLuint index, GLint *data); +__attribute__((visibility("default"))) void glEnableIndexedEXT (GLenum target, GLuint index); +__attribute__((visibility("default"))) void glDisableIndexedEXT (GLenum target, GLuint index); +__attribute__((visibility("default"))) GLboolean glIsEnabledIndexedEXT (GLenum target, GLuint index); + +typedef void ( * PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +typedef void ( * PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data); +typedef void ( * PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data); +typedef void ( * PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index); +typedef void ( * PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index); +typedef GLboolean ( * PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index); + + + + + +__attribute__((visibility("default"))) void glBeginTransformFeedbackNV (GLenum primitiveMode); +__attribute__((visibility("default"))) void glEndTransformFeedbackNV (void); +__attribute__((visibility("default"))) void glTransformFeedbackAttribsNV (GLuint count, const GLint *attribs, GLenum bufferMode); +__attribute__((visibility("default"))) void glBindBufferRangeNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +__attribute__((visibility("default"))) void glBindBufferOffsetNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +__attribute__((visibility("default"))) void glBindBufferBaseNV (GLenum target, GLuint index, GLuint buffer); +__attribute__((visibility("default"))) void glTransformFeedbackVaryingsNV (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); +__attribute__((visibility("default"))) void glActiveVaryingNV (GLuint program, const GLchar *name); +__attribute__((visibility("default"))) GLint glGetVaryingLocationNV (GLuint program, const GLchar *name); +__attribute__((visibility("default"))) void glGetActiveVaryingNV (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +__attribute__((visibility("default"))) void glGetTransformFeedbackVaryingNV (GLuint program, GLuint index, GLint *location); +__attribute__((visibility("default"))) void glTransformFeedbackStreamAttribsNV (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode); + +typedef void ( * PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode); +typedef void ( * PFNGLENDTRANSFORMFEEDBACKNVPROC) (void); +typedef void ( * PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode); +typedef void ( * PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void ( * PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +typedef void ( * PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void ( * PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); +typedef void ( * PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name); +typedef GLint ( * PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name); +typedef void ( * PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +typedef void ( * PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location); +typedef void ( * PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode); + + + + + +__attribute__((visibility("default"))) void glUniformBufferEXT (GLuint program, GLint location, GLuint buffer); +__attribute__((visibility("default"))) GLint glGetUniformBufferSizeEXT (GLuint program, GLint location); +__attribute__((visibility("default"))) GLintptr glGetUniformOffsetEXT (GLuint program, GLint location); + +typedef void ( * PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer); +typedef GLint ( * PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location); +typedef GLintptr ( * PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location); + + + + + +__attribute__((visibility("default"))) void glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params); +__attribute__((visibility("default"))) void glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glClearColorIiEXT (GLint red, GLint green, GLint blue, GLint alpha); +__attribute__((visibility("default"))) void glClearColorIuiEXT (GLuint red, GLuint green, GLuint blue, GLuint alpha); + +typedef void ( * PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params); +typedef void ( * PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params); +typedef void ( * PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha); +typedef void ( * PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha); + + + + + +__attribute__((visibility("default"))) void glFrameTerminatorGREMEDY (void); + +typedef void ( * PFNGLFRAMETERMINATORGREMEDYPROC) (void); + + + + + +__attribute__((visibility("default"))) void glBeginConditionalRenderNV (GLuint id, GLenum mode); +__attribute__((visibility("default"))) void glEndConditionalRenderNV (void); + +typedef void ( * PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode); +typedef void ( * PFNGLENDCONDITIONALRENDERNVPROC) (void); + + + + + +__attribute__((visibility("default"))) void glPresentFrameKeyedNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1); +__attribute__((visibility("default"))) void glPresentFrameDualFillNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3); +__attribute__((visibility("default"))) void glGetVideoivNV (GLuint video_slot, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVideouivNV (GLuint video_slot, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glGetVideoi64vNV (GLuint video_slot, GLenum pname, GLint64EXT *params); +__attribute__((visibility("default"))) void glGetVideoui64vNV (GLuint video_slot, GLenum pname, GLuint64EXT *params); + +typedef void ( * PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1); +typedef void ( * PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3); +typedef void ( * PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params); +typedef void ( * PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params); +typedef void ( * PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT *params); + + + + + +__attribute__((visibility("default"))) void glBeginTransformFeedbackEXT (GLenum primitiveMode); +__attribute__((visibility("default"))) void glEndTransformFeedbackEXT (void); +__attribute__((visibility("default"))) void glBindBufferRangeEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +__attribute__((visibility("default"))) void glBindBufferOffsetEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +__attribute__((visibility("default"))) void glBindBufferBaseEXT (GLenum target, GLuint index, GLuint buffer); +__attribute__((visibility("default"))) void glTransformFeedbackVaryingsEXT (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); +__attribute__((visibility("default"))) void glGetTransformFeedbackVaryingEXT (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); + +typedef void ( * PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode); +typedef void ( * PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void); +typedef void ( * PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void ( * PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +typedef void ( * PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void ( * PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); +typedef void ( * PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); + + + + + +__attribute__((visibility("default"))) void glClientAttribDefaultEXT (GLbitfield mask); +__attribute__((visibility("default"))) void glPushClientAttribDefaultEXT (GLbitfield mask); +__attribute__((visibility("default"))) void glMatrixLoadfEXT (GLenum mode, const GLfloat *m); +__attribute__((visibility("default"))) void glMatrixLoaddEXT (GLenum mode, const GLdouble *m); +__attribute__((visibility("default"))) void glMatrixMultfEXT (GLenum mode, const GLfloat *m); +__attribute__((visibility("default"))) void glMatrixMultdEXT (GLenum mode, const GLdouble *m); +__attribute__((visibility("default"))) void glMatrixLoadIdentityEXT (GLenum mode); +__attribute__((visibility("default"))) void glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +__attribute__((visibility("default"))) void glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +__attribute__((visibility("default"))) void glMatrixPopEXT (GLenum mode); +__attribute__((visibility("default"))) void glMatrixPushEXT (GLenum mode); +__attribute__((visibility("default"))) void glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m); +__attribute__((visibility("default"))) void glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m); +__attribute__((visibility("default"))) void glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m); +__attribute__((visibility("default"))) void glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m); +__attribute__((visibility("default"))) void glTextureParameterfEXT (GLuint texture, GLenum target, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glTextureParameteriEXT (GLuint texture, GLenum target, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glCopyTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +__attribute__((visibility("default"))) void glCopyTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +__attribute__((visibility("default"))) void glCopyTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glCopyTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glGetTextureImageEXT (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +__attribute__((visibility("default"))) void glGetTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetTextureLevelParameterfvEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetTextureLevelParameterivEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glCopyTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glMultiTexParameterfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glMultiTexParameteriEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glCopyMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +__attribute__((visibility("default"))) void glCopyMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +__attribute__((visibility("default"))) void glCopyMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glCopyMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glGetMultiTexImageEXT (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +__attribute__((visibility("default"))) void glGetMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetMultiTexLevelParameterfvEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetMultiTexLevelParameterivEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glCopyMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glBindMultiTextureEXT (GLenum texunit, GLenum target, GLuint texture); +__attribute__((visibility("default"))) void glEnableClientStateIndexedEXT (GLenum array, GLuint index); +__attribute__((visibility("default"))) void glDisableClientStateIndexedEXT (GLenum array, GLuint index); +__attribute__((visibility("default"))) void glMultiTexCoordPointerEXT (GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glMultiTexEnvfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glMultiTexEnviEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glMultiTexGendEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); +__attribute__((visibility("default"))) void glMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); +__attribute__((visibility("default"))) void glMultiTexGenfEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glMultiTexGeniEXT (GLenum texunit, GLenum coord, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glGetMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) void glGetMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetFloatIndexedvEXT (GLenum target, GLuint index, GLfloat *data); +__attribute__((visibility("default"))) void glGetDoubleIndexedvEXT (GLenum target, GLuint index, GLdouble *data); +__attribute__((visibility("default"))) void glGetPointerIndexedvEXT (GLenum target, GLuint index, GLvoid* *data); +__attribute__((visibility("default"))) void glCompressedTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glGetCompressedTextureImageEXT (GLuint texture, GLenum target, GLint lod, GLvoid *img); +__attribute__((visibility("default"))) void glCompressedMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glGetCompressedMultiTexImageEXT (GLenum texunit, GLenum target, GLint lod, GLvoid *img); +__attribute__((visibility("default"))) void glNamedProgramStringEXT (GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid *string); +__attribute__((visibility("default"))) void glNamedProgramLocalParameter4dEXT (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glNamedProgramLocalParameter4dvEXT (GLuint program, GLenum target, GLuint index, const GLdouble *params); +__attribute__((visibility("default"))) void glNamedProgramLocalParameter4fEXT (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glNamedProgramLocalParameter4fvEXT (GLuint program, GLenum target, GLuint index, const GLfloat *params); +__attribute__((visibility("default"))) void glGetNamedProgramLocalParameterdvEXT (GLuint program, GLenum target, GLuint index, GLdouble *params); +__attribute__((visibility("default"))) void glGetNamedProgramLocalParameterfvEXT (GLuint program, GLenum target, GLuint index, GLfloat *params); +__attribute__((visibility("default"))) void glGetNamedProgramivEXT (GLuint program, GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetNamedProgramStringEXT (GLuint program, GLenum target, GLenum pname, GLvoid *string); +__attribute__((visibility("default"))) void glNamedProgramLocalParameters4fvEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); +__attribute__((visibility("default"))) void glNamedProgramLocalParameterI4iEXT (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +__attribute__((visibility("default"))) void glNamedProgramLocalParameterI4ivEXT (GLuint program, GLenum target, GLuint index, const GLint *params); +__attribute__((visibility("default"))) void glNamedProgramLocalParametersI4ivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); +__attribute__((visibility("default"))) void glNamedProgramLocalParameterI4uiEXT (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +__attribute__((visibility("default"))) void glNamedProgramLocalParameterI4uivEXT (GLuint program, GLenum target, GLuint index, const GLuint *params); +__attribute__((visibility("default"))) void glNamedProgramLocalParametersI4uivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); +__attribute__((visibility("default"))) void glGetNamedProgramLocalParameterIivEXT (GLuint program, GLenum target, GLuint index, GLint *params); +__attribute__((visibility("default"))) void glGetNamedProgramLocalParameterIuivEXT (GLuint program, GLenum target, GLuint index, GLuint *params); +__attribute__((visibility("default"))) void glTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, const GLuint *params); +__attribute__((visibility("default"))) void glGetTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); +__attribute__((visibility("default"))) void glGetMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0); +__attribute__((visibility("default"))) void glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1); +__attribute__((visibility("default"))) void glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +__attribute__((visibility("default"))) void glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +__attribute__((visibility("default"))) void glProgramUniform1iEXT (GLuint program, GLint location, GLint v0); +__attribute__((visibility("default"))) void glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1); +__attribute__((visibility("default"))) void glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +__attribute__((visibility("default"))) void glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +__attribute__((visibility("default"))) void glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0); +__attribute__((visibility("default"))) void glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1); +__attribute__((visibility("default"))) void glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +__attribute__((visibility("default"))) void glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +__attribute__((visibility("default"))) void glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glNamedBufferDataEXT (GLuint buffer, GLsizeiptr size, const GLvoid *data, GLenum usage); +__attribute__((visibility("default"))) void glNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data); +__attribute__((visibility("default"))) GLvoid* glMapNamedBufferEXT (GLuint buffer, GLenum access); +__attribute__((visibility("default"))) GLboolean glUnmapNamedBufferEXT (GLuint buffer); +__attribute__((visibility("default"))) GLvoid* glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +__attribute__((visibility("default"))) void glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length); +__attribute__((visibility("default"))) void glNamedCopyBufferSubDataEXT (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +__attribute__((visibility("default"))) void glGetNamedBufferParameterivEXT (GLuint buffer, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetNamedBufferPointervEXT (GLuint buffer, GLenum pname, GLvoid* *params); +__attribute__((visibility("default"))) void glGetNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data); +__attribute__((visibility("default"))) void glTextureBufferEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); +__attribute__((visibility("default"))) void glMultiTexBufferEXT (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); +__attribute__((visibility("default"))) void glNamedRenderbufferStorageEXT (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glGetNamedRenderbufferParameterivEXT (GLuint renderbuffer, GLenum pname, GLint *params); +__attribute__((visibility("default"))) GLenum glCheckNamedFramebufferStatusEXT (GLuint framebuffer, GLenum target); +__attribute__((visibility("default"))) void glNamedFramebufferTexture1DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glNamedFramebufferTexture2DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glNamedFramebufferTexture3DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +__attribute__((visibility("default"))) void glNamedFramebufferRenderbufferEXT (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +__attribute__((visibility("default"))) void glGetNamedFramebufferAttachmentParameterivEXT (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGenerateTextureMipmapEXT (GLuint texture, GLenum target); +__attribute__((visibility("default"))) void glGenerateMultiTexMipmapEXT (GLenum texunit, GLenum target); +__attribute__((visibility("default"))) void glFramebufferDrawBufferEXT (GLuint framebuffer, GLenum mode); +__attribute__((visibility("default"))) void glFramebufferDrawBuffersEXT (GLuint framebuffer, GLsizei n, const GLenum *bufs); +__attribute__((visibility("default"))) void glFramebufferReadBufferEXT (GLuint framebuffer, GLenum mode); +__attribute__((visibility("default"))) void glGetFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glNamedRenderbufferStorageMultisampleEXT (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glNamedFramebufferTextureEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glNamedFramebufferTextureLayerEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +__attribute__((visibility("default"))) void glNamedFramebufferTextureFaceEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); +__attribute__((visibility("default"))) void glTextureRenderbufferEXT (GLuint texture, GLenum target, GLuint renderbuffer); +__attribute__((visibility("default"))) void glMultiTexRenderbufferEXT (GLenum texunit, GLenum target, GLuint renderbuffer); +__attribute__((visibility("default"))) void glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x); +__attribute__((visibility("default"))) void glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); + +typedef void ( * PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); +typedef void ( * PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); +typedef void ( * PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void ( * PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void ( * PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void ( * PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void ( * PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode); +typedef void ( * PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +typedef void ( * PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +typedef void ( * PFNGLMATRIXPOPEXTPROC) (GLenum mode); +typedef void ( * PFNGLMATRIXPUSHEXTPROC) (GLenum mode); +typedef void ( * PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void ( * PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void ( * PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void ( * PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void ( * PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param); +typedef void ( * PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param); +typedef void ( * PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void ( * PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void ( * PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void ( * PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +typedef void ( * PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); +typedef void ( * PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void ( * PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +typedef void ( * PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); +typedef void ( * PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void ( * PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void ( * PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void ( * PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +typedef void ( * PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); +typedef void ( * PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void ( * PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture); +typedef void ( * PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); +typedef void ( * PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); +typedef void ( * PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +typedef void ( * PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); +typedef void ( * PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); +typedef void ( * PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); +typedef void ( * PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); +typedef void ( * PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param); +typedef void ( * PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); +typedef void ( * PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); +typedef void ( * PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params); +typedef void ( * PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data); +typedef void ( * PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data); +typedef void ( * PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLvoid* *data); +typedef void ( * PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, GLvoid *img); +typedef void ( * PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, GLvoid *img); +typedef void ( * PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid *string); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params); +typedef void ( * PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params); +typedef void ( * PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params); +typedef void ( * PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, GLvoid *string); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void ( * PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params); +typedef void ( * PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params); +typedef void ( * PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params); +typedef void ( * PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params); +typedef void ( * PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); +typedef void ( * PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params); +typedef void ( * PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0); +typedef void ( * PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef void ( * PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void ( * PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void ( * PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0); +typedef void ( * PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef void ( * PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void ( * PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void ( * PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0); +typedef void ( * PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); +typedef void ( * PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void ( * PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void ( * PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const GLvoid *data, GLenum usage); +typedef void ( * PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data); +typedef GLvoid* ( * PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access); +typedef GLboolean ( * PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer); +typedef GLvoid* ( * PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void ( * PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); +typedef void ( * PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void ( * PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params); +typedef void ( * PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, GLvoid* *params); +typedef void ( * PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data); +typedef void ( * PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); +typedef void ( * PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); +typedef void ( * PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +typedef void ( * PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params); +typedef GLenum ( * PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target); +typedef void ( * PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void ( * PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void ( * PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void ( * PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void ( * PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); +typedef void ( * PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target); +typedef void ( * PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target); +typedef void ( * PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); +typedef void ( * PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs); +typedef void ( * PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); +typedef void ( * PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); +typedef void ( * PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void ( * PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void ( * PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +typedef void ( * PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void ( * PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); +typedef void ( * PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer); +typedef void ( * PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer); +typedef void ( * PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x); +typedef void ( * PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y); +typedef void ( * PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +# 10533 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glGetMultisamplefvNV (GLenum pname, GLuint index, GLfloat *val); +__attribute__((visibility("default"))) void glSampleMaskIndexedNV (GLuint index, GLbitfield mask); +__attribute__((visibility("default"))) void glTexRenderbufferNV (GLenum target, GLuint renderbuffer); + +typedef void ( * PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val); +typedef void ( * PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask); +typedef void ( * PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer); + + + + + +__attribute__((visibility("default"))) void glBindTransformFeedbackNV (GLenum target, GLuint id); +__attribute__((visibility("default"))) void glDeleteTransformFeedbacksNV (GLsizei n, const GLuint *ids); +__attribute__((visibility("default"))) void glGenTransformFeedbacksNV (GLsizei n, GLuint *ids); +__attribute__((visibility("default"))) GLboolean glIsTransformFeedbackNV (GLuint id); +__attribute__((visibility("default"))) void glPauseTransformFeedbackNV (void); +__attribute__((visibility("default"))) void glResumeTransformFeedbackNV (void); +__attribute__((visibility("default"))) void glDrawTransformFeedbackNV (GLenum mode, GLuint id); + +typedef void ( * PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id); +typedef void ( * PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids); +typedef void ( * PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids); +typedef GLboolean ( * PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id); +typedef void ( * PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void); +typedef void ( * PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void); +typedef void ( * PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id); +# 10569 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups); +__attribute__((visibility("default"))) void glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); +__attribute__((visibility("default"))) void glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); +__attribute__((visibility("default"))) void glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); +__attribute__((visibility("default"))) void glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data); +__attribute__((visibility("default"))) void glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); +__attribute__((visibility("default"))) void glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); +__attribute__((visibility("default"))) void glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); +__attribute__((visibility("default"))) void glBeginPerfMonitorAMD (GLuint monitor); +__attribute__((visibility("default"))) void glEndPerfMonitorAMD (GLuint monitor); +__attribute__((visibility("default"))) void glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); + +typedef void ( * PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups); +typedef void ( * PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); +typedef void ( * PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); +typedef void ( * PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); +typedef void ( * PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data); +typedef void ( * PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); +typedef void ( * PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); +typedef void ( * PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); +typedef void ( * PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor); +typedef void ( * PFNGLENDPERFMONITORAMDPROC) (GLuint monitor); +typedef void ( * PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); +# 10601 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glTessellationFactorAMD (GLfloat factor); +__attribute__((visibility("default"))) void glTessellationModeAMD (GLenum mode); + +typedef void ( * PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor); +typedef void ( * PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode); + + + + + +__attribute__((visibility("default"))) void glProvokingVertexEXT (GLenum mode); + +typedef void ( * PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode); +# 10623 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glBlendFuncIndexedAMD (GLuint buf, GLenum src, GLenum dst); +__attribute__((visibility("default"))) void glBlendFuncSeparateIndexedAMD (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +__attribute__((visibility("default"))) void glBlendEquationIndexedAMD (GLuint buf, GLenum mode); +__attribute__((visibility("default"))) void glBlendEquationSeparateIndexedAMD (GLuint buf, GLenum modeRGB, GLenum modeAlpha); + +typedef void ( * PFNGLBLENDFUNCINDEXEDAMDPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void ( * PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +typedef void ( * PFNGLBLENDEQUATIONINDEXEDAMDPROC) (GLuint buf, GLenum mode); +typedef void ( * PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); + + + + + +__attribute__((visibility("default"))) void glTextureRangeAPPLE (GLenum target, GLsizei length, const GLvoid *pointer); +__attribute__((visibility("default"))) void glGetTexParameterPointervAPPLE (GLenum target, GLenum pname, GLvoid* *params); + +typedef void ( * PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, const GLvoid *pointer); +typedef void ( * PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, GLvoid* *params); +# 10651 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glEnableVertexAttribAPPLE (GLuint index, GLenum pname); +__attribute__((visibility("default"))) void glDisableVertexAttribAPPLE (GLuint index, GLenum pname); +__attribute__((visibility("default"))) GLboolean glIsVertexAttribEnabledAPPLE (GLuint index, GLenum pname); +__attribute__((visibility("default"))) void glMapVertexAttrib1dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); +__attribute__((visibility("default"))) void glMapVertexAttrib1fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); +__attribute__((visibility("default"))) void glMapVertexAttrib2dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); +__attribute__((visibility("default"))) void glMapVertexAttrib2fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); + +typedef void ( * PFNGLENABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname); +typedef void ( * PFNGLDISABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname); +typedef GLboolean ( * PFNGLISVERTEXATTRIBENABLEDAPPLEPROC) (GLuint index, GLenum pname); +typedef void ( * PFNGLMAPVERTEXATTRIB1DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); +typedef void ( * PFNGLMAPVERTEXATTRIB1FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); +typedef void ( * PFNGLMAPVERTEXATTRIB2DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); +typedef void ( * PFNGLMAPVERTEXATTRIB2FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); +# 10675 "../../include/GL/glext.h" +__attribute__((visibility("default"))) GLenum glObjectPurgeableAPPLE (GLenum objectType, GLuint name, GLenum option); +__attribute__((visibility("default"))) GLenum glObjectUnpurgeableAPPLE (GLenum objectType, GLuint name, GLenum option); +__attribute__((visibility("default"))) void glGetObjectParameterivAPPLE (GLenum objectType, GLuint name, GLenum pname, GLint *params); + +typedef GLenum ( * PFNGLOBJECTPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option); +typedef GLenum ( * PFNGLOBJECTUNPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option); +typedef void ( * PFNGLGETOBJECTPARAMETERIVAPPLEPROC) (GLenum objectType, GLuint name, GLenum pname, GLint *params); +# 10695 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glBeginVideoCaptureNV (GLuint video_capture_slot); +__attribute__((visibility("default"))) void glBindVideoCaptureStreamBufferNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset); +__attribute__((visibility("default"))) void glBindVideoCaptureStreamTextureNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture); +__attribute__((visibility("default"))) void glEndVideoCaptureNV (GLuint video_capture_slot); +__attribute__((visibility("default"))) void glGetVideoCaptureivNV (GLuint video_capture_slot, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVideoCaptureStreamivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVideoCaptureStreamfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetVideoCaptureStreamdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) GLenum glVideoCaptureNV (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time); +__attribute__((visibility("default"))) void glVideoCaptureStreamParameterivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glVideoCaptureStreamParameterfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params); + +typedef void ( * PFNGLBEGINVIDEOCAPTURENVPROC) (GLuint video_capture_slot); +typedef void ( * PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset); +typedef void ( * PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture); +typedef void ( * PFNGLENDVIDEOCAPTURENVPROC) (GLuint video_capture_slot); +typedef void ( * PFNGLGETVIDEOCAPTUREIVNVPROC) (GLuint video_capture_slot, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVIDEOCAPTURESTREAMIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVIDEOCAPTURESTREAMFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETVIDEOCAPTURESTREAMDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params); +typedef GLenum ( * PFNGLVIDEOCAPTURENVPROC) (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time); +typedef void ( * PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params); +typedef void ( * PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params); + + + + + +__attribute__((visibility("default"))) void glCopyImageSubDataNV (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); + +typedef void ( * PFNGLCOPYIMAGESUBDATANVPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); + + + + + +__attribute__((visibility("default"))) void glUseShaderProgramEXT (GLenum type, GLuint program); +__attribute__((visibility("default"))) void glActiveProgramEXT (GLuint program); +__attribute__((visibility("default"))) GLuint glCreateShaderProgramEXT (GLenum type, const GLchar *string); + +typedef void ( * PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program); +typedef void ( * PFNGLACTIVEPROGRAMEXTPROC) (GLuint program); +typedef GLuint ( * PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar *string); +# 10749 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glMakeBufferResidentNV (GLenum target, GLenum access); +__attribute__((visibility("default"))) void glMakeBufferNonResidentNV (GLenum target); +__attribute__((visibility("default"))) GLboolean glIsBufferResidentNV (GLenum target); +__attribute__((visibility("default"))) void glMakeNamedBufferResidentNV (GLuint buffer, GLenum access); +__attribute__((visibility("default"))) void glMakeNamedBufferNonResidentNV (GLuint buffer); +__attribute__((visibility("default"))) GLboolean glIsNamedBufferResidentNV (GLuint buffer); +__attribute__((visibility("default"))) void glGetBufferParameterui64vNV (GLenum target, GLenum pname, GLuint64EXT *params); +__attribute__((visibility("default"))) void glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pname, GLuint64EXT *params); +__attribute__((visibility("default"))) void glGetIntegerui64vNV (GLenum value, GLuint64EXT *result); +__attribute__((visibility("default"))) void glUniformui64NV (GLint location, GLuint64EXT value); +__attribute__((visibility("default"))) void glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params); +__attribute__((visibility("default"))) void glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value); +__attribute__((visibility("default"))) void glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); + +typedef void ( * PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access); +typedef void ( * PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target); +typedef GLboolean ( * PFNGLISBUFFERRESIDENTNVPROC) (GLenum target); +typedef void ( * PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access); +typedef void ( * PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer); +typedef GLboolean ( * PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer); +typedef void ( * PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params); +typedef void ( * PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT *params); +typedef void ( * PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result); +typedef void ( * PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value); +typedef void ( * PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params); +typedef void ( * PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value); +typedef void ( * PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); + + + + + +__attribute__((visibility("default"))) void glBufferAddressRangeNV (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); +__attribute__((visibility("default"))) void glVertexFormatNV (GLint size, GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glNormalFormatNV (GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glColorFormatNV (GLint size, GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glIndexFormatNV (GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glTexCoordFormatNV (GLint size, GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glEdgeFlagFormatNV (GLsizei stride); +__attribute__((visibility("default"))) void glSecondaryColorFormatNV (GLint size, GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glFogCoordFormatNV (GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glVertexAttribFormatNV (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); +__attribute__((visibility("default"))) void glVertexAttribIFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glGetIntegerui64i_vNV (GLenum value, GLuint index, GLuint64EXT *result); + +typedef void ( * PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); +typedef void ( * PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void ( * PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride); +typedef void ( * PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void ( * PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride); +typedef void ( * PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void ( * PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride); +typedef void ( * PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void ( * PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride); +typedef void ( * PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); +typedef void ( * PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); +typedef void ( * PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result); + + + + + +__attribute__((visibility("default"))) void glTextureBarrierNV (void); + +typedef void ( * PFNGLTEXTUREBARRIERNVPROC) (void); +# 10833 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glBindImageTextureEXT (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); +__attribute__((visibility("default"))) void glMemoryBarrierEXT (GLbitfield barriers); + +typedef void ( * PFNGLBINDIMAGETEXTUREEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); +typedef void ( * PFNGLMEMORYBARRIEREXTPROC) (GLbitfield barriers); + + + + + +__attribute__((visibility("default"))) void glVertexAttribL1dEXT (GLuint index, GLdouble x); +__attribute__((visibility("default"))) void glVertexAttribL2dEXT (GLuint index, GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glVertexAttribL3dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glVertexAttribL4dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glVertexAttribL1dvEXT (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribL2dvEXT (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribL3dvEXT (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribL4dvEXT (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribLPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glGetVertexAttribLdvEXT (GLuint index, GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) void glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); + +typedef void ( * PFNGLVERTEXATTRIBL1DEXTPROC) (GLuint index, GLdouble x); +typedef void ( * PFNGLVERTEXATTRIBL2DEXTPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void ( * PFNGLVERTEXATTRIBL3DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLVERTEXATTRIBL4DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLVERTEXATTRIBL1DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBL2DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBL3DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBL4DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBLPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLGETVERTEXATTRIBLDVEXTPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void ( * PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); + + + + + +__attribute__((visibility("default"))) void glProgramSubroutineParametersuivNV (GLenum target, GLsizei count, const GLuint *params); +__attribute__((visibility("default"))) void glGetProgramSubroutineParameteruivNV (GLenum target, GLuint index, GLuint *param); + +typedef void ( * PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC) (GLenum target, GLsizei count, const GLuint *params); +typedef void ( * PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC) (GLenum target, GLuint index, GLuint *param); + + + + + +__attribute__((visibility("default"))) void glUniform1i64NV (GLint location, GLint64EXT x); +__attribute__((visibility("default"))) void glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y); +__attribute__((visibility("default"))) void glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +__attribute__((visibility("default"))) void glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +__attribute__((visibility("default"))) void glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +__attribute__((visibility("default"))) void glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +__attribute__((visibility("default"))) void glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +__attribute__((visibility("default"))) void glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +__attribute__((visibility("default"))) void glUniform1ui64NV (GLint location, GLuint64EXT x); +__attribute__((visibility("default"))) void glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y); +__attribute__((visibility("default"))) void glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +__attribute__((visibility("default"))) void glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +__attribute__((visibility("default"))) void glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params); +__attribute__((visibility("default"))) void glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x); +__attribute__((visibility("default"))) void glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); +__attribute__((visibility("default"))) void glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +__attribute__((visibility("default"))) void glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +__attribute__((visibility("default"))) void glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +__attribute__((visibility("default"))) void glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +__attribute__((visibility("default"))) void glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +__attribute__((visibility("default"))) void glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +__attribute__((visibility("default"))) void glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x); +__attribute__((visibility("default"))) void glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); +__attribute__((visibility("default"))) void glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +__attribute__((visibility("default"))) void glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +__attribute__((visibility("default"))) void glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); + +typedef void ( * PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x); +typedef void ( * PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y); +typedef void ( * PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void ( * PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void ( * PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void ( * PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void ( * PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void ( * PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void ( * PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x); +typedef void ( * PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void ( * PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void ( * PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void ( * PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params); +typedef void ( * PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x); +typedef void ( * PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); +typedef void ( * PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void ( * PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void ( * PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void ( * PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void ( * PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void ( * PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void ( * PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x); +typedef void ( * PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void ( * PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void ( * PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void ( * PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +# 10961 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glVertexAttribL1i64NV (GLuint index, GLint64EXT x); +__attribute__((visibility("default"))) void glVertexAttribL2i64NV (GLuint index, GLint64EXT x, GLint64EXT y); +__attribute__((visibility("default"))) void glVertexAttribL3i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); +__attribute__((visibility("default"))) void glVertexAttribL4i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +__attribute__((visibility("default"))) void glVertexAttribL1i64vNV (GLuint index, const GLint64EXT *v); +__attribute__((visibility("default"))) void glVertexAttribL2i64vNV (GLuint index, const GLint64EXT *v); +__attribute__((visibility("default"))) void glVertexAttribL3i64vNV (GLuint index, const GLint64EXT *v); +__attribute__((visibility("default"))) void glVertexAttribL4i64vNV (GLuint index, const GLint64EXT *v); +__attribute__((visibility("default"))) void glVertexAttribL1ui64NV (GLuint index, GLuint64EXT x); +__attribute__((visibility("default"))) void glVertexAttribL2ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y); +__attribute__((visibility("default"))) void glVertexAttribL3ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +__attribute__((visibility("default"))) void glVertexAttribL4ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +__attribute__((visibility("default"))) void glVertexAttribL1ui64vNV (GLuint index, const GLuint64EXT *v); +__attribute__((visibility("default"))) void glVertexAttribL2ui64vNV (GLuint index, const GLuint64EXT *v); +__attribute__((visibility("default"))) void glVertexAttribL3ui64vNV (GLuint index, const GLuint64EXT *v); +__attribute__((visibility("default"))) void glVertexAttribL4ui64vNV (GLuint index, const GLuint64EXT *v); +__attribute__((visibility("default"))) void glGetVertexAttribLi64vNV (GLuint index, GLenum pname, GLint64EXT *params); +__attribute__((visibility("default"))) void glGetVertexAttribLui64vNV (GLuint index, GLenum pname, GLuint64EXT *params); +__attribute__((visibility("default"))) void glVertexAttribLFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); + +typedef void ( * PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x); +typedef void ( * PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y); +typedef void ( * PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void ( * PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void ( * PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void ( * PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void ( * PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void ( * PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void ( * PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x); +typedef void ( * PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y); +typedef void ( * PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void ( * PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void ( * PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void ( * PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void ( * PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void ( * PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void ( * PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT *params); +typedef void ( * PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT *params); +typedef void ( * PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); +# 11009 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glGenNamesAMD (GLenum identifier, GLuint num, GLuint *names); +__attribute__((visibility("default"))) void glDeleteNamesAMD (GLenum identifier, GLuint num, const GLuint *names); +__attribute__((visibility("default"))) GLboolean glIsNameAMD (GLenum identifier, GLuint name); + +typedef void ( * PFNGLGENNAMESAMDPROC) (GLenum identifier, GLuint num, GLuint *names); +typedef void ( * PFNGLDELETENAMESAMDPROC) (GLenum identifier, GLuint num, const GLuint *names); +typedef GLboolean ( * PFNGLISNAMEAMDPROC) (GLenum identifier, GLuint name); + + + + + +__attribute__((visibility("default"))) void glDebugMessageEnableAMD (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +__attribute__((visibility("default"))) void glDebugMessageInsertAMD (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); +__attribute__((visibility("default"))) void glDebugMessageCallbackAMD (GLDEBUGPROCAMD callback, GLvoid *userParam); +__attribute__((visibility("default"))) GLuint glGetDebugMessageLogAMD (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); + +typedef void ( * PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void ( * PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); +typedef void ( * PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, GLvoid *userParam); +typedef GLuint ( * PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); + + + + + +__attribute__((visibility("default"))) void glVDPAUInitNV (const GLvoid *vdpDevice, const GLvoid *getProcAddress); +__attribute__((visibility("default"))) void glVDPAUFiniNV (void); +__attribute__((visibility("default"))) GLvdpauSurfaceNV glVDPAURegisterVideoSurfaceNV (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +__attribute__((visibility("default"))) GLvdpauSurfaceNV glVDPAURegisterOutputSurfaceNV (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +__attribute__((visibility("default"))) void glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface); +__attribute__((visibility("default"))) void glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface); +__attribute__((visibility("default"))) void glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +__attribute__((visibility("default"))) void glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access); +__attribute__((visibility("default"))) void glVDPAUMapSurfacesNV (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces); +__attribute__((visibility("default"))) void glVDPAUUnmapSurfacesNV (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); + +typedef void ( * PFNGLVDPAUINITNVPROC) (const GLvoid *vdpDevice, const GLvoid *getProcAddress); +typedef void ( * PFNGLVDPAUFININVPROC) (void); +typedef GLvdpauSurfaceNV ( * PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +typedef GLvdpauSurfaceNV ( * PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +typedef void ( * PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface); +typedef void ( * PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface); +typedef void ( * PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +typedef void ( * PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access); +typedef void ( * PFNGLVDPAUMAPSURFACESNVPROC) (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces); +typedef void ( * PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); +# 11073 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glTexImage2DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +__attribute__((visibility("default"))) void glTexImage3DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +__attribute__((visibility("default"))) void glTextureImage2DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +__attribute__((visibility("default"))) void glTextureImage3DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +__attribute__((visibility("default"))) void glTextureImage2DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +__attribute__((visibility("default"))) void glTextureImage3DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); + +typedef void ( * PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void ( * PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +typedef void ( * PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void ( * PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +typedef void ( * PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void ( * PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +# 11095 "../../include/GL/glext.h" +__attribute__((visibility("default"))) void glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLfloat *val); + +typedef void ( * PFNGLSETMULTISAMPLEFVAMDPROC) (GLenum pname, GLuint index, const GLfloat *val); + + + + + +__attribute__((visibility("default"))) GLsync glImportSyncEXT (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); + +typedef GLsync ( * PFNGLIMPORTSYNCEXTPROC) (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); + + + + + +__attribute__((visibility("default"))) void glMultiDrawArraysIndirectAMD (GLenum mode, const GLvoid *indirect, GLsizei primcount, GLsizei stride); +__attribute__((visibility("default"))) void glMultiDrawElementsIndirectAMD (GLenum mode, GLenum type, const GLvoid *indirect, GLsizei primcount, GLsizei stride); + +typedef void ( * PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC) (GLenum mode, const GLvoid *indirect, GLsizei primcount, GLsizei stride); +typedef void ( * PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC) (GLenum mode, GLenum type, const GLvoid *indirect, GLsizei primcount, GLsizei stride); +# 2092 "../../include/GL/gl.h" 2 +# 2106 "../../include/GL/gl.h" +__attribute__((visibility("default"))) GLhandleARB glCreateDebugObjectMESA (void); +__attribute__((visibility("default"))) void glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType); +__attribute__((visibility("default"))) void glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength, + GLsizei *length, GLcharARB *debugLog); +__attribute__((visibility("default"))) GLsizei glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType); +# 2145 "../../include/GL/gl.h" +typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data); + +__attribute__((visibility("default"))) void glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, GLvoid *data); + +__attribute__((visibility("default"))) void glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name, GLfloat *v); +# 2192 "../../include/GL/gl.h" +__attribute__((visibility("default"))) void glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA ); +typedef void ( * PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA); + + + + + + +typedef void* GLeglImageOES; + + + + + +__attribute__((visibility("default"))) void glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); +__attribute__((visibility("default"))) void glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); + +typedef void ( * PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); +typedef void ( * PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); +# 54 "../../src/mesa/main/glheader.h" 2 + + + + + + +typedef int GLfixed; +typedef int GLclampx; +# 33 "swrast/s_triangle.c" 2 +# 1 "../../src/mesa/main/context.h" 1 +# 52 "../../src/mesa/main/context.h" +# 1 "../../src/mesa/main/imports.h" 1 +# 39 "../../src/mesa/main/imports.h" +# 1 "../../src/mesa/main/compiler.h" 1 +# 37 "../../src/mesa/main/compiler.h" +# 1 "/usr/include/assert.h" 1 3 4 +# 66 "/usr/include/assert.h" 3 4 + + + +extern void __assert_fail (__const char *__assertion, __const char *__file, + unsigned int __line, __const char *__function) + __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + +extern void __assert_perror_fail (int __errnum, __const char *__file, + unsigned int __line, + __const char *__function) + __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + + +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + +# 38 "../../src/mesa/main/compiler.h" 2 +# 1 "/usr/include/ctype.h" 1 3 4 +# 28 "/usr/include/ctype.h" 3 4 +# 1 "/usr/include/bits/types.h" 1 3 4 +# 28 "/usr/include/bits/types.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 29 "/usr/include/bits/types.h" 2 3 4 + + +typedef unsigned char __u_char; +typedef unsigned short int __u_short; +typedef unsigned int __u_int; +typedef unsigned long int __u_long; + + +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; + + + + +__extension__ typedef signed long long int __int64_t; +__extension__ typedef unsigned long long int __uint64_t; + + + + + + + +__extension__ typedef long long int __quad_t; +__extension__ typedef unsigned long long int __u_quad_t; +# 131 "/usr/include/bits/types.h" 3 4 +# 1 "/usr/include/bits/typesizes.h" 1 3 4 +# 132 "/usr/include/bits/types.h" 2 3 4 + + +__extension__ typedef __u_quad_t __dev_t; +__extension__ typedef unsigned int __uid_t; +__extension__ typedef unsigned int __gid_t; +__extension__ typedef unsigned long int __ino_t; +__extension__ typedef __u_quad_t __ino64_t; +__extension__ typedef unsigned int __mode_t; +__extension__ typedef unsigned int __nlink_t; +__extension__ typedef long int __off_t; +__extension__ typedef __quad_t __off64_t; +__extension__ typedef int __pid_t; +__extension__ typedef struct { int __val[2]; } __fsid_t; +__extension__ typedef long int __clock_t; +__extension__ typedef unsigned long int __rlim_t; +__extension__ typedef __u_quad_t __rlim64_t; +__extension__ typedef unsigned int __id_t; +__extension__ typedef long int __time_t; +__extension__ typedef unsigned int __useconds_t; +__extension__ typedef long int __suseconds_t; + +__extension__ typedef int __daddr_t; +__extension__ typedef long int __swblk_t; +__extension__ typedef int __key_t; + + +__extension__ typedef int __clockid_t; + + +__extension__ typedef void * __timer_t; + + +__extension__ typedef long int __blksize_t; + + + + +__extension__ typedef long int __blkcnt_t; +__extension__ typedef __quad_t __blkcnt64_t; + + +__extension__ typedef unsigned long int __fsblkcnt_t; +__extension__ typedef __u_quad_t __fsblkcnt64_t; + + +__extension__ typedef unsigned long int __fsfilcnt_t; +__extension__ typedef __u_quad_t __fsfilcnt64_t; + +__extension__ typedef int __ssize_t; + + + +typedef __off64_t __loff_t; +typedef __quad_t *__qaddr_t; +typedef char *__caddr_t; + + +__extension__ typedef int __intptr_t; + + +__extension__ typedef unsigned int __socklen_t; +# 29 "/usr/include/ctype.h" 2 3 4 + + +# 41 "/usr/include/ctype.h" 3 4 +# 1 "/usr/include/endian.h" 1 3 4 +# 37 "/usr/include/endian.h" 3 4 +# 1 "/usr/include/bits/endian.h" 1 3 4 +# 38 "/usr/include/endian.h" 2 3 4 +# 61 "/usr/include/endian.h" 3 4 +# 1 "/usr/include/bits/byteswap.h" 1 3 4 +# 62 "/usr/include/endian.h" 2 3 4 +# 42 "/usr/include/ctype.h" 2 3 4 + + + + + + +enum +{ + _ISupper = (1 << (0)), + _ISlower = (1 << (1)), + _ISalpha = (1 << (2)), + _ISdigit = (1 << (3)), + _ISxdigit = (1 << (4)), + _ISspace = (1 << (5)), + _ISprint = (1 << (6)), + _ISgraph = (1 << (7)), + _ISblank = (1 << (8)), + _IScntrl = (1 << (9)), + _ISpunct = (1 << (10)), + _ISalnum = (1 << (11)) +}; +# 81 "/usr/include/ctype.h" 3 4 +extern __const unsigned short int **__ctype_b_loc (void) + __attribute__ ((__nothrow__)) __attribute__ ((__const)); +extern __const __int32_t **__ctype_tolower_loc (void) + __attribute__ ((__nothrow__)) __attribute__ ((__const)); +extern __const __int32_t **__ctype_toupper_loc (void) + __attribute__ ((__nothrow__)) __attribute__ ((__const)); +# 96 "/usr/include/ctype.h" 3 4 + + + + + + +extern int isalnum (int) __attribute__ ((__nothrow__)); +extern int isalpha (int) __attribute__ ((__nothrow__)); +extern int iscntrl (int) __attribute__ ((__nothrow__)); +extern int isdigit (int) __attribute__ ((__nothrow__)); +extern int islower (int) __attribute__ ((__nothrow__)); +extern int isgraph (int) __attribute__ ((__nothrow__)); +extern int isprint (int) __attribute__ ((__nothrow__)); +extern int ispunct (int) __attribute__ ((__nothrow__)); +extern int isspace (int) __attribute__ ((__nothrow__)); +extern int isupper (int) __attribute__ ((__nothrow__)); +extern int isxdigit (int) __attribute__ ((__nothrow__)); + + + +extern int tolower (int __c) __attribute__ ((__nothrow__)); + + +extern int toupper (int __c) __attribute__ ((__nothrow__)); + + + + + + + + +extern int isblank (int) __attribute__ ((__nothrow__)); + + + + + + +extern int isctype (int __c, int __mask) __attribute__ ((__nothrow__)); + + + + + + +extern int isascii (int __c) __attribute__ ((__nothrow__)); + + + +extern int toascii (int __c) __attribute__ ((__nothrow__)); + + + +extern int _toupper (int) __attribute__ ((__nothrow__)); +extern int _tolower (int) __attribute__ ((__nothrow__)); +# 190 "/usr/include/ctype.h" 3 4 +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) tolower (int __c) +{ + return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c; +} + +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) toupper (int __c) +{ + return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c; +} +# 233 "/usr/include/ctype.h" 3 4 +# 1 "/usr/include/xlocale.h" 1 3 4 +# 28 "/usr/include/xlocale.h" 3 4 +typedef struct __locale_struct +{ + + struct __locale_data *__locales[13]; + + + const unsigned short int *__ctype_b; + const int *__ctype_tolower; + const int *__ctype_toupper; + + + const char *__names[13]; +} *__locale_t; + + +typedef __locale_t locale_t; +# 234 "/usr/include/ctype.h" 2 3 4 +# 247 "/usr/include/ctype.h" 3 4 +extern int isalnum_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isalpha_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int iscntrl_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isdigit_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int islower_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isgraph_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isprint_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int ispunct_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isspace_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isupper_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isxdigit_l (int, __locale_t) __attribute__ ((__nothrow__)); + +extern int isblank_l (int, __locale_t) __attribute__ ((__nothrow__)); + + + +extern int __tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); +extern int tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); + + +extern int __toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); +extern int toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); +# 323 "/usr/include/ctype.h" 3 4 + +# 39 "../../src/mesa/main/compiler.h" 2 + + + +# 1 "/usr/include/math.h" 1 3 4 +# 30 "/usr/include/math.h" 3 4 + + + + +# 1 "/usr/include/bits/huge_val.h" 1 3 4 +# 35 "/usr/include/math.h" 2 3 4 + +# 1 "/usr/include/bits/huge_valf.h" 1 3 4 +# 37 "/usr/include/math.h" 2 3 4 +# 1 "/usr/include/bits/huge_vall.h" 1 3 4 +# 38 "/usr/include/math.h" 2 3 4 + + +# 1 "/usr/include/bits/inf.h" 1 3 4 +# 41 "/usr/include/math.h" 2 3 4 + + +# 1 "/usr/include/bits/nan.h" 1 3 4 +# 44 "/usr/include/math.h" 2 3 4 + + + +# 1 "/usr/include/bits/mathdef.h" 1 3 4 +# 27 "/usr/include/bits/mathdef.h" 3 4 +typedef float float_t; + +typedef double double_t; +# 48 "/usr/include/math.h" 2 3 4 +# 71 "/usr/include/math.h" 3 4 +# 1 "/usr/include/bits/mathcalls.h" 1 3 4 +# 53 "/usr/include/bits/mathcalls.h" 3 4 + + +extern double acos (double __x) __attribute__ ((__nothrow__)); extern double __acos (double __x) __attribute__ ((__nothrow__)); + +extern double asin (double __x) __attribute__ ((__nothrow__)); extern double __asin (double __x) __attribute__ ((__nothrow__)); + +extern double atan (double __x) __attribute__ ((__nothrow__)); extern double __atan (double __x) __attribute__ ((__nothrow__)); + +extern double atan2 (double __y, double __x) __attribute__ ((__nothrow__)); extern double __atan2 (double __y, double __x) __attribute__ ((__nothrow__)); + + +extern double cos (double __x) __attribute__ ((__nothrow__)); extern double __cos (double __x) __attribute__ ((__nothrow__)); + +extern double sin (double __x) __attribute__ ((__nothrow__)); extern double __sin (double __x) __attribute__ ((__nothrow__)); + +extern double tan (double __x) __attribute__ ((__nothrow__)); extern double __tan (double __x) __attribute__ ((__nothrow__)); + + + + +extern double cosh (double __x) __attribute__ ((__nothrow__)); extern double __cosh (double __x) __attribute__ ((__nothrow__)); + +extern double sinh (double __x) __attribute__ ((__nothrow__)); extern double __sinh (double __x) __attribute__ ((__nothrow__)); + +extern double tanh (double __x) __attribute__ ((__nothrow__)); extern double __tanh (double __x) __attribute__ ((__nothrow__)); + + + + +extern void sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__)); extern void __sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__)) + ; + + + + + +extern double acosh (double __x) __attribute__ ((__nothrow__)); extern double __acosh (double __x) __attribute__ ((__nothrow__)); + +extern double asinh (double __x) __attribute__ ((__nothrow__)); extern double __asinh (double __x) __attribute__ ((__nothrow__)); + +extern double atanh (double __x) __attribute__ ((__nothrow__)); extern double __atanh (double __x) __attribute__ ((__nothrow__)); + + + + + + + +extern double exp (double __x) __attribute__ ((__nothrow__)); extern double __exp (double __x) __attribute__ ((__nothrow__)); + + +extern double frexp (double __x, int *__exponent) __attribute__ ((__nothrow__)); extern double __frexp (double __x, int *__exponent) __attribute__ ((__nothrow__)); + + +extern double ldexp (double __x, int __exponent) __attribute__ ((__nothrow__)); extern double __ldexp (double __x, int __exponent) __attribute__ ((__nothrow__)); + + +extern double log (double __x) __attribute__ ((__nothrow__)); extern double __log (double __x) __attribute__ ((__nothrow__)); + + +extern double log10 (double __x) __attribute__ ((__nothrow__)); extern double __log10 (double __x) __attribute__ ((__nothrow__)); + + +extern double modf (double __x, double *__iptr) __attribute__ ((__nothrow__)); extern double __modf (double __x, double *__iptr) __attribute__ ((__nothrow__)); + + + + +extern double exp10 (double __x) __attribute__ ((__nothrow__)); extern double __exp10 (double __x) __attribute__ ((__nothrow__)); + +extern double pow10 (double __x) __attribute__ ((__nothrow__)); extern double __pow10 (double __x) __attribute__ ((__nothrow__)); + + + + + +extern double expm1 (double __x) __attribute__ ((__nothrow__)); extern double __expm1 (double __x) __attribute__ ((__nothrow__)); + + +extern double log1p (double __x) __attribute__ ((__nothrow__)); extern double __log1p (double __x) __attribute__ ((__nothrow__)); + + +extern double logb (double __x) __attribute__ ((__nothrow__)); extern double __logb (double __x) __attribute__ ((__nothrow__)); + + + + + + +extern double exp2 (double __x) __attribute__ ((__nothrow__)); extern double __exp2 (double __x) __attribute__ ((__nothrow__)); + + +extern double log2 (double __x) __attribute__ ((__nothrow__)); extern double __log2 (double __x) __attribute__ ((__nothrow__)); + + + + + + + + +extern double pow (double __x, double __y) __attribute__ ((__nothrow__)); extern double __pow (double __x, double __y) __attribute__ ((__nothrow__)); + + +extern double sqrt (double __x) __attribute__ ((__nothrow__)); extern double __sqrt (double __x) __attribute__ ((__nothrow__)); + + + + + +extern double hypot (double __x, double __y) __attribute__ ((__nothrow__)); extern double __hypot (double __x, double __y) __attribute__ ((__nothrow__)); + + + + + + +extern double cbrt (double __x) __attribute__ ((__nothrow__)); extern double __cbrt (double __x) __attribute__ ((__nothrow__)); + + + + + + + + +extern double ceil (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __ceil (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern double fabs (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __fabs (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern double floor (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __floor (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern double fmod (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fmod (double __x, double __y) __attribute__ ((__nothrow__)); + + + + +extern int __isinf (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern int __finite (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + + +extern int isinf (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern int finite (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern double drem (double __x, double __y) __attribute__ ((__nothrow__)); extern double __drem (double __x, double __y) __attribute__ ((__nothrow__)); + + + +extern double significand (double __x) __attribute__ ((__nothrow__)); extern double __significand (double __x) __attribute__ ((__nothrow__)); + + + + + +extern double copysign (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + + + +extern double nan (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __nan (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + + +extern int __isnan (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + +extern int isnan (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern double j0 (double) __attribute__ ((__nothrow__)); extern double __j0 (double) __attribute__ ((__nothrow__)); +extern double j1 (double) __attribute__ ((__nothrow__)); extern double __j1 (double) __attribute__ ((__nothrow__)); +extern double jn (int, double) __attribute__ ((__nothrow__)); extern double __jn (int, double) __attribute__ ((__nothrow__)); +extern double y0 (double) __attribute__ ((__nothrow__)); extern double __y0 (double) __attribute__ ((__nothrow__)); +extern double y1 (double) __attribute__ ((__nothrow__)); extern double __y1 (double) __attribute__ ((__nothrow__)); +extern double yn (int, double) __attribute__ ((__nothrow__)); extern double __yn (int, double) __attribute__ ((__nothrow__)); + + + + + + +extern double erf (double) __attribute__ ((__nothrow__)); extern double __erf (double) __attribute__ ((__nothrow__)); +extern double erfc (double) __attribute__ ((__nothrow__)); extern double __erfc (double) __attribute__ ((__nothrow__)); +extern double lgamma (double) __attribute__ ((__nothrow__)); extern double __lgamma (double) __attribute__ ((__nothrow__)); + + + + + + +extern double tgamma (double) __attribute__ ((__nothrow__)); extern double __tgamma (double) __attribute__ ((__nothrow__)); + + + + + +extern double gamma (double) __attribute__ ((__nothrow__)); extern double __gamma (double) __attribute__ ((__nothrow__)); + + + + + + +extern double lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__)); extern double __lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__)); + + + + + + + +extern double rint (double __x) __attribute__ ((__nothrow__)); extern double __rint (double __x) __attribute__ ((__nothrow__)); + + +extern double nextafter (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + +extern double nexttoward (double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + +extern double remainder (double __x, double __y) __attribute__ ((__nothrow__)); extern double __remainder (double __x, double __y) __attribute__ ((__nothrow__)); + + + +extern double scalbn (double __x, int __n) __attribute__ ((__nothrow__)); extern double __scalbn (double __x, int __n) __attribute__ ((__nothrow__)); + + + +extern int ilogb (double __x) __attribute__ ((__nothrow__)); extern int __ilogb (double __x) __attribute__ ((__nothrow__)); + + + + +extern double scalbln (double __x, long int __n) __attribute__ ((__nothrow__)); extern double __scalbln (double __x, long int __n) __attribute__ ((__nothrow__)); + + + +extern double nearbyint (double __x) __attribute__ ((__nothrow__)); extern double __nearbyint (double __x) __attribute__ ((__nothrow__)); + + + +extern double round (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __round (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + +extern double trunc (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __trunc (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + +extern double remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__)); extern double __remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__)); + + + + + + +extern long int lrint (double __x) __attribute__ ((__nothrow__)); extern long int __lrint (double __x) __attribute__ ((__nothrow__)); +extern long long int llrint (double __x) __attribute__ ((__nothrow__)); extern long long int __llrint (double __x) __attribute__ ((__nothrow__)); + + + +extern long int lround (double __x) __attribute__ ((__nothrow__)); extern long int __lround (double __x) __attribute__ ((__nothrow__)); +extern long long int llround (double __x) __attribute__ ((__nothrow__)); extern long long int __llround (double __x) __attribute__ ((__nothrow__)); + + + +extern double fdim (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fdim (double __x, double __y) __attribute__ ((__nothrow__)); + + +extern double fmax (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fmax (double __x, double __y) __attribute__ ((__nothrow__)); + + +extern double fmin (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fmin (double __x, double __y) __attribute__ ((__nothrow__)); + + + +extern int __fpclassify (double __value) __attribute__ ((__nothrow__)) + __attribute__ ((__const__)); + + +extern int __signbit (double __value) __attribute__ ((__nothrow__)) + __attribute__ ((__const__)); + + + +extern double fma (double __x, double __y, double __z) __attribute__ ((__nothrow__)); extern double __fma (double __x, double __y, double __z) __attribute__ ((__nothrow__)); + + + + + + + + +extern double scalb (double __x, double __n) __attribute__ ((__nothrow__)); extern double __scalb (double __x, double __n) __attribute__ ((__nothrow__)); +# 72 "/usr/include/math.h" 2 3 4 +# 94 "/usr/include/math.h" 3 4 +# 1 "/usr/include/bits/mathcalls.h" 1 3 4 +# 53 "/usr/include/bits/mathcalls.h" 3 4 + + +extern float acosf (float __x) __attribute__ ((__nothrow__)); extern float __acosf (float __x) __attribute__ ((__nothrow__)); + +extern float asinf (float __x) __attribute__ ((__nothrow__)); extern float __asinf (float __x) __attribute__ ((__nothrow__)); + +extern float atanf (float __x) __attribute__ ((__nothrow__)); extern float __atanf (float __x) __attribute__ ((__nothrow__)); + +extern float atan2f (float __y, float __x) __attribute__ ((__nothrow__)); extern float __atan2f (float __y, float __x) __attribute__ ((__nothrow__)); + + +extern float cosf (float __x) __attribute__ ((__nothrow__)); extern float __cosf (float __x) __attribute__ ((__nothrow__)); + +extern float sinf (float __x) __attribute__ ((__nothrow__)); extern float __sinf (float __x) __attribute__ ((__nothrow__)); + +extern float tanf (float __x) __attribute__ ((__nothrow__)); extern float __tanf (float __x) __attribute__ ((__nothrow__)); + + + + +extern float coshf (float __x) __attribute__ ((__nothrow__)); extern float __coshf (float __x) __attribute__ ((__nothrow__)); + +extern float sinhf (float __x) __attribute__ ((__nothrow__)); extern float __sinhf (float __x) __attribute__ ((__nothrow__)); + +extern float tanhf (float __x) __attribute__ ((__nothrow__)); extern float __tanhf (float __x) __attribute__ ((__nothrow__)); + + + + +extern void + sincosf +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__)); extern void + __sincosf +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__)) + ; + + + + + +extern float acoshf (float __x) __attribute__ ((__nothrow__)); extern float __acoshf (float __x) __attribute__ ((__nothrow__)); + +extern float asinhf (float __x) __attribute__ ((__nothrow__)); extern float __asinhf (float __x) __attribute__ ((__nothrow__)); + +extern float atanhf (float __x) __attribute__ ((__nothrow__)); extern float __atanhf (float __x) __attribute__ ((__nothrow__)); + + + + + + + +extern float expf (float __x) __attribute__ ((__nothrow__)); extern float __expf (float __x) __attribute__ ((__nothrow__)); + + +extern float frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__)); extern float __frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__)); + + +extern float ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__)); extern float __ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__)); + + +extern float logf (float __x) __attribute__ ((__nothrow__)); extern float __logf (float __x) __attribute__ ((__nothrow__)); + + +extern float log10f (float __x) __attribute__ ((__nothrow__)); extern float __log10f (float __x) __attribute__ ((__nothrow__)); + + +extern float modff (float __x, float *__iptr) __attribute__ ((__nothrow__)); extern float __modff (float __x, float *__iptr) __attribute__ ((__nothrow__)); + + + + +extern float exp10f (float __x) __attribute__ ((__nothrow__)); extern float __exp10f (float __x) __attribute__ ((__nothrow__)); + +extern float pow10f (float __x) __attribute__ ((__nothrow__)); extern float __pow10f (float __x) __attribute__ ((__nothrow__)); + + + + + +extern float expm1f (float __x) __attribute__ ((__nothrow__)); extern float __expm1f (float __x) __attribute__ ((__nothrow__)); + + +extern float log1pf (float __x) __attribute__ ((__nothrow__)); extern float __log1pf (float __x) __attribute__ ((__nothrow__)); + + +extern float logbf (float __x) __attribute__ ((__nothrow__)); extern float __logbf (float __x) __attribute__ ((__nothrow__)); + + + + + + +extern float exp2f (float __x) __attribute__ ((__nothrow__)); extern float __exp2f (float __x) __attribute__ ((__nothrow__)); + + +extern float log2f (float __x) __attribute__ ((__nothrow__)); extern float __log2f (float __x) __attribute__ ((__nothrow__)); + + + + + + + + +extern float powf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __powf (float __x, float __y) __attribute__ ((__nothrow__)); + + +extern float sqrtf (float __x) __attribute__ ((__nothrow__)); extern float __sqrtf (float __x) __attribute__ ((__nothrow__)); + + + + + +extern float hypotf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __hypotf (float __x, float __y) __attribute__ ((__nothrow__)); + + + + + + +extern float cbrtf (float __x) __attribute__ ((__nothrow__)); extern float __cbrtf (float __x) __attribute__ ((__nothrow__)); + + + + + + + + +extern float ceilf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __ceilf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern float fabsf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __fabsf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern float floorf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __floorf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern float fmodf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fmodf (float __x, float __y) __attribute__ ((__nothrow__)); + + + + +extern int __isinff (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern int __finitef (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + + +extern int isinff (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern int finitef (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern float dremf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __dremf (float __x, float __y) __attribute__ ((__nothrow__)); + + + +extern float significandf (float __x) __attribute__ ((__nothrow__)); extern float __significandf (float __x) __attribute__ ((__nothrow__)); + + + + + +extern float copysignf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + + + +extern float nanf (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + + +extern int __isnanf (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + +extern int isnanf (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern float j0f (float) __attribute__ ((__nothrow__)); extern float __j0f (float) __attribute__ ((__nothrow__)); +extern float j1f (float) __attribute__ ((__nothrow__)); extern float __j1f (float) __attribute__ ((__nothrow__)); +extern float jnf (int, float) __attribute__ ((__nothrow__)); extern float __jnf (int, float) __attribute__ ((__nothrow__)); +extern float y0f (float) __attribute__ ((__nothrow__)); extern float __y0f (float) __attribute__ ((__nothrow__)); +extern float y1f (float) __attribute__ ((__nothrow__)); extern float __y1f (float) __attribute__ ((__nothrow__)); +extern float ynf (int, float) __attribute__ ((__nothrow__)); extern float __ynf (int, float) __attribute__ ((__nothrow__)); + + + + + + +extern float erff (float) __attribute__ ((__nothrow__)); extern float __erff (float) __attribute__ ((__nothrow__)); +extern float erfcf (float) __attribute__ ((__nothrow__)); extern float __erfcf (float) __attribute__ ((__nothrow__)); +extern float lgammaf (float) __attribute__ ((__nothrow__)); extern float __lgammaf (float) __attribute__ ((__nothrow__)); + + + + + + +extern float tgammaf (float) __attribute__ ((__nothrow__)); extern float __tgammaf (float) __attribute__ ((__nothrow__)); + + + + + +extern float gammaf (float) __attribute__ ((__nothrow__)); extern float __gammaf (float) __attribute__ ((__nothrow__)); + + + + + + +extern float lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__)); extern float __lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__)); + + + + + + + +extern float rintf (float __x) __attribute__ ((__nothrow__)); extern float __rintf (float __x) __attribute__ ((__nothrow__)); + + +extern float nextafterf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + +extern float nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + +extern float remainderf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __remainderf (float __x, float __y) __attribute__ ((__nothrow__)); + + + +extern float scalbnf (float __x, int __n) __attribute__ ((__nothrow__)); extern float __scalbnf (float __x, int __n) __attribute__ ((__nothrow__)); + + + +extern int ilogbf (float __x) __attribute__ ((__nothrow__)); extern int __ilogbf (float __x) __attribute__ ((__nothrow__)); + + + + +extern float scalblnf (float __x, long int __n) __attribute__ ((__nothrow__)); extern float __scalblnf (float __x, long int __n) __attribute__ ((__nothrow__)); + + + +extern float nearbyintf (float __x) __attribute__ ((__nothrow__)); extern float __nearbyintf (float __x) __attribute__ ((__nothrow__)); + + + +extern float roundf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __roundf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + +extern float truncf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __truncf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + +extern float remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__)); extern float __remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__)); + + + + + + +extern long int lrintf (float __x) __attribute__ ((__nothrow__)); extern long int __lrintf (float __x) __attribute__ ((__nothrow__)); +extern long long int llrintf (float __x) __attribute__ ((__nothrow__)); extern long long int __llrintf (float __x) __attribute__ ((__nothrow__)); + + + +extern long int lroundf (float __x) __attribute__ ((__nothrow__)); extern long int __lroundf (float __x) __attribute__ ((__nothrow__)); +extern long long int llroundf (float __x) __attribute__ ((__nothrow__)); extern long long int __llroundf (float __x) __attribute__ ((__nothrow__)); + + + +extern float fdimf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fdimf (float __x, float __y) __attribute__ ((__nothrow__)); + + +extern float fmaxf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fmaxf (float __x, float __y) __attribute__ ((__nothrow__)); + + +extern float fminf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fminf (float __x, float __y) __attribute__ ((__nothrow__)); + + + +extern int __fpclassifyf (float __value) __attribute__ ((__nothrow__)) + __attribute__ ((__const__)); + + +extern int __signbitf (float __value) __attribute__ ((__nothrow__)) + __attribute__ ((__const__)); + + + +extern float fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__)); extern float __fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__)); + + + + + + + + +extern float scalbf (float __x, float __n) __attribute__ ((__nothrow__)); extern float __scalbf (float __x, float __n) __attribute__ ((__nothrow__)); +# 95 "/usr/include/math.h" 2 3 4 +# 141 "/usr/include/math.h" 3 4 +# 1 "/usr/include/bits/mathcalls.h" 1 3 4 +# 53 "/usr/include/bits/mathcalls.h" 3 4 + + +extern long double acosl (long double __x) __attribute__ ((__nothrow__)); extern long double __acosl (long double __x) __attribute__ ((__nothrow__)); + +extern long double asinl (long double __x) __attribute__ ((__nothrow__)); extern long double __asinl (long double __x) __attribute__ ((__nothrow__)); + +extern long double atanl (long double __x) __attribute__ ((__nothrow__)); extern long double __atanl (long double __x) __attribute__ ((__nothrow__)); + +extern long double atan2l (long double __y, long double __x) __attribute__ ((__nothrow__)); extern long double __atan2l (long double __y, long double __x) __attribute__ ((__nothrow__)); + + +extern long double cosl (long double __x) __attribute__ ((__nothrow__)); extern long double __cosl (long double __x) __attribute__ ((__nothrow__)); + +extern long double sinl (long double __x) __attribute__ ((__nothrow__)); extern long double __sinl (long double __x) __attribute__ ((__nothrow__)); + +extern long double tanl (long double __x) __attribute__ ((__nothrow__)); extern long double __tanl (long double __x) __attribute__ ((__nothrow__)); + + + + +extern long double coshl (long double __x) __attribute__ ((__nothrow__)); extern long double __coshl (long double __x) __attribute__ ((__nothrow__)); + +extern long double sinhl (long double __x) __attribute__ ((__nothrow__)); extern long double __sinhl (long double __x) __attribute__ ((__nothrow__)); + +extern long double tanhl (long double __x) __attribute__ ((__nothrow__)); extern long double __tanhl (long double __x) __attribute__ ((__nothrow__)); + + + + +extern void + sincosl +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__)); extern void + __sincosl +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__)) + ; + + + + + +extern long double acoshl (long double __x) __attribute__ ((__nothrow__)); extern long double __acoshl (long double __x) __attribute__ ((__nothrow__)); + +extern long double asinhl (long double __x) __attribute__ ((__nothrow__)); extern long double __asinhl (long double __x) __attribute__ ((__nothrow__)); + +extern long double atanhl (long double __x) __attribute__ ((__nothrow__)); extern long double __atanhl (long double __x) __attribute__ ((__nothrow__)); + + + + + + + +extern long double expl (long double __x) __attribute__ ((__nothrow__)); extern long double __expl (long double __x) __attribute__ ((__nothrow__)); + + +extern long double frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__)); extern long double __frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__)); + + +extern long double ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__)); extern long double __ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__)); + + +extern long double logl (long double __x) __attribute__ ((__nothrow__)); extern long double __logl (long double __x) __attribute__ ((__nothrow__)); + + +extern long double log10l (long double __x) __attribute__ ((__nothrow__)); extern long double __log10l (long double __x) __attribute__ ((__nothrow__)); + + +extern long double modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__)); extern long double __modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__)); + + + + +extern long double exp10l (long double __x) __attribute__ ((__nothrow__)); extern long double __exp10l (long double __x) __attribute__ ((__nothrow__)); + +extern long double pow10l (long double __x) __attribute__ ((__nothrow__)); extern long double __pow10l (long double __x) __attribute__ ((__nothrow__)); + + + + + +extern long double expm1l (long double __x) __attribute__ ((__nothrow__)); extern long double __expm1l (long double __x) __attribute__ ((__nothrow__)); + + +extern long double log1pl (long double __x) __attribute__ ((__nothrow__)); extern long double __log1pl (long double __x) __attribute__ ((__nothrow__)); + + +extern long double logbl (long double __x) __attribute__ ((__nothrow__)); extern long double __logbl (long double __x) __attribute__ ((__nothrow__)); + + + + + + +extern long double exp2l (long double __x) __attribute__ ((__nothrow__)); extern long double __exp2l (long double __x) __attribute__ ((__nothrow__)); + + +extern long double log2l (long double __x) __attribute__ ((__nothrow__)); extern long double __log2l (long double __x) __attribute__ ((__nothrow__)); + + + + + + + + +extern long double powl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __powl (long double __x, long double __y) __attribute__ ((__nothrow__)); + + +extern long double sqrtl (long double __x) __attribute__ ((__nothrow__)); extern long double __sqrtl (long double __x) __attribute__ ((__nothrow__)); + + + + + +extern long double hypotl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __hypotl (long double __x, long double __y) __attribute__ ((__nothrow__)); + + + + + + +extern long double cbrtl (long double __x) __attribute__ ((__nothrow__)); extern long double __cbrtl (long double __x) __attribute__ ((__nothrow__)); + + + + + + + + +extern long double ceill (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __ceill (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern long double fabsl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __fabsl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern long double floorl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __floorl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern long double fmodl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fmodl (long double __x, long double __y) __attribute__ ((__nothrow__)); + + + + +extern int __isinfl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern int __finitel (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + + +extern int isinfl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern int finitel (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern long double dreml (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __dreml (long double __x, long double __y) __attribute__ ((__nothrow__)); + + + +extern long double significandl (long double __x) __attribute__ ((__nothrow__)); extern long double __significandl (long double __x) __attribute__ ((__nothrow__)); + + + + + +extern long double copysignl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + + + +extern long double nanl (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + + +extern int __isnanl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + +extern int isnanl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern long double j0l (long double) __attribute__ ((__nothrow__)); extern long double __j0l (long double) __attribute__ ((__nothrow__)); +extern long double j1l (long double) __attribute__ ((__nothrow__)); extern long double __j1l (long double) __attribute__ ((__nothrow__)); +extern long double jnl (int, long double) __attribute__ ((__nothrow__)); extern long double __jnl (int, long double) __attribute__ ((__nothrow__)); +extern long double y0l (long double) __attribute__ ((__nothrow__)); extern long double __y0l (long double) __attribute__ ((__nothrow__)); +extern long double y1l (long double) __attribute__ ((__nothrow__)); extern long double __y1l (long double) __attribute__ ((__nothrow__)); +extern long double ynl (int, long double) __attribute__ ((__nothrow__)); extern long double __ynl (int, long double) __attribute__ ((__nothrow__)); + + + + + + +extern long double erfl (long double) __attribute__ ((__nothrow__)); extern long double __erfl (long double) __attribute__ ((__nothrow__)); +extern long double erfcl (long double) __attribute__ ((__nothrow__)); extern long double __erfcl (long double) __attribute__ ((__nothrow__)); +extern long double lgammal (long double) __attribute__ ((__nothrow__)); extern long double __lgammal (long double) __attribute__ ((__nothrow__)); + + + + + + +extern long double tgammal (long double) __attribute__ ((__nothrow__)); extern long double __tgammal (long double) __attribute__ ((__nothrow__)); + + + + + +extern long double gammal (long double) __attribute__ ((__nothrow__)); extern long double __gammal (long double) __attribute__ ((__nothrow__)); + + + + + + +extern long double lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__)); extern long double __lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__)); + + + + + + + +extern long double rintl (long double __x) __attribute__ ((__nothrow__)); extern long double __rintl (long double __x) __attribute__ ((__nothrow__)); + + +extern long double nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + +extern long double nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + +extern long double remainderl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __remainderl (long double __x, long double __y) __attribute__ ((__nothrow__)); + + + +extern long double scalbnl (long double __x, int __n) __attribute__ ((__nothrow__)); extern long double __scalbnl (long double __x, int __n) __attribute__ ((__nothrow__)); + + + +extern int ilogbl (long double __x) __attribute__ ((__nothrow__)); extern int __ilogbl (long double __x) __attribute__ ((__nothrow__)); + + + + +extern long double scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__)); extern long double __scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__)); + + + +extern long double nearbyintl (long double __x) __attribute__ ((__nothrow__)); extern long double __nearbyintl (long double __x) __attribute__ ((__nothrow__)); + + + +extern long double roundl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __roundl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + +extern long double truncl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __truncl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + +extern long double remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__)); extern long double __remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__)); + + + + + + +extern long int lrintl (long double __x) __attribute__ ((__nothrow__)); extern long int __lrintl (long double __x) __attribute__ ((__nothrow__)); +extern long long int llrintl (long double __x) __attribute__ ((__nothrow__)); extern long long int __llrintl (long double __x) __attribute__ ((__nothrow__)); + + + +extern long int lroundl (long double __x) __attribute__ ((__nothrow__)); extern long int __lroundl (long double __x) __attribute__ ((__nothrow__)); +extern long long int llroundl (long double __x) __attribute__ ((__nothrow__)); extern long long int __llroundl (long double __x) __attribute__ ((__nothrow__)); + + + +extern long double fdiml (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fdiml (long double __x, long double __y) __attribute__ ((__nothrow__)); + + +extern long double fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__)); + + +extern long double fminl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fminl (long double __x, long double __y) __attribute__ ((__nothrow__)); + + + +extern int __fpclassifyl (long double __value) __attribute__ ((__nothrow__)) + __attribute__ ((__const__)); + + +extern int __signbitl (long double __value) __attribute__ ((__nothrow__)) + __attribute__ ((__const__)); + + + +extern long double fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__)); extern long double __fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__)); + + + + + + + + +extern long double scalbl (long double __x, long double __n) __attribute__ ((__nothrow__)); extern long double __scalbl (long double __x, long double __n) __attribute__ ((__nothrow__)); +# 142 "/usr/include/math.h" 2 3 4 +# 157 "/usr/include/math.h" 3 4 +extern int signgam; +# 198 "/usr/include/math.h" 3 4 +enum + { + FP_NAN, + + FP_INFINITE, + + FP_ZERO, + + FP_SUBNORMAL, + + FP_NORMAL + + }; +# 291 "/usr/include/math.h" 3 4 +typedef enum +{ + _IEEE_ = -1, + _SVID_, + _XOPEN_, + _POSIX_, + _ISOC_ +} _LIB_VERSION_TYPE; + + + + +extern _LIB_VERSION_TYPE _LIB_VERSION; +# 316 "/usr/include/math.h" 3 4 +struct exception + + { + int type; + char *name; + double arg1; + double arg2; + double retval; + }; + + + + +extern int matherr (struct exception *__exc); +# 416 "/usr/include/math.h" 3 4 +# 1 "/usr/include/bits/mathinline.h" 1 3 4 +# 417 "/usr/include/math.h" 2 3 4 +# 472 "/usr/include/math.h" 3 4 + +# 43 "../../src/mesa/main/compiler.h" 2 + +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include-fixed/limits.h" 1 3 4 +# 34 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include-fixed/limits.h" 3 4 +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include-fixed/syslimits.h" 1 3 4 + + + + + + +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include-fixed/limits.h" 1 3 4 +# 169 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include-fixed/limits.h" 3 4 +# 1 "/usr/include/limits.h" 1 3 4 +# 145 "/usr/include/limits.h" 3 4 +# 1 "/usr/include/bits/posix1_lim.h" 1 3 4 +# 157 "/usr/include/bits/posix1_lim.h" 3 4 +# 1 "/usr/include/bits/local_lim.h" 1 3 4 +# 39 "/usr/include/bits/local_lim.h" 3 4 +# 1 "/usr/include/linux/limits.h" 1 3 4 +# 40 "/usr/include/bits/local_lim.h" 2 3 4 +# 158 "/usr/include/bits/posix1_lim.h" 2 3 4 +# 146 "/usr/include/limits.h" 2 3 4 + + + +# 1 "/usr/include/bits/posix2_lim.h" 1 3 4 +# 150 "/usr/include/limits.h" 2 3 4 + + + +# 1 "/usr/include/bits/xopen_lim.h" 1 3 4 +# 34 "/usr/include/bits/xopen_lim.h" 3 4 +# 1 "/usr/include/bits/stdio_lim.h" 1 3 4 +# 35 "/usr/include/bits/xopen_lim.h" 2 3 4 +# 154 "/usr/include/limits.h" 2 3 4 +# 170 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include-fixed/limits.h" 2 3 4 +# 8 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include-fixed/syslimits.h" 2 3 4 +# 35 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include-fixed/limits.h" 2 3 4 +# 45 "../../src/mesa/main/compiler.h" 2 +# 1 "/usr/include/stdlib.h" 1 3 4 +# 33 "/usr/include/stdlib.h" 3 4 +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 34 "/usr/include/stdlib.h" 2 3 4 + + + + + + + + +# 1 "/usr/include/bits/waitflags.h" 1 3 4 +# 43 "/usr/include/stdlib.h" 2 3 4 +# 1 "/usr/include/bits/waitstatus.h" 1 3 4 +# 67 "/usr/include/bits/waitstatus.h" 3 4 +union wait + { + int w_status; + struct + { + + + + + + + + unsigned int:16; + unsigned int __w_retcode:8; + unsigned int __w_coredump:1; + unsigned int __w_termsig:7; + + } __wait_terminated; + struct + { + + + + + + + unsigned int:16; + unsigned int __w_stopsig:8; + unsigned int __w_stopval:8; + + } __wait_stopped; + }; +# 44 "/usr/include/stdlib.h" 2 3 4 +# 68 "/usr/include/stdlib.h" 3 4 +typedef union + { + union wait *__uptr; + int *__iptr; + } __WAIT_STATUS __attribute__ ((__transparent_union__)); +# 96 "/usr/include/stdlib.h" 3 4 + + +typedef struct + { + int quot; + int rem; + } div_t; + + + +typedef struct + { + long int quot; + long int rem; + } ldiv_t; + + + + + + + +__extension__ typedef struct + { + long long int quot; + long long int rem; + } lldiv_t; + + +# 140 "/usr/include/stdlib.h" 3 4 +extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + +extern double atof (__const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern int atoi (__const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern long int atol (__const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +__extension__ extern long long int atoll (__const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern double strtod (__const char *__restrict __nptr, + char **__restrict __endptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern float strtof (__const char *__restrict __nptr, + char **__restrict __endptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern long double strtold (__const char *__restrict __nptr, + char **__restrict __endptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern long int strtol (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern unsigned long int strtoul (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +__extension__ +extern long long int strtoq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtouq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +__extension__ +extern long long int strtoll (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtoull (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +# 240 "/usr/include/stdlib.h" 3 4 +extern long int strtol_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +extern unsigned long int strtoul_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern long long int strtoll_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtoull_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +extern double strtod_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + +extern float strtof_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + +extern long double strtold_l (__const char *__restrict __nptr, + char **__restrict __endptr, + __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + + + + + +extern __inline __attribute__ ((__gnu_inline__)) double +__attribute__ ((__nothrow__)) atof (__const char *__nptr) +{ + return strtod (__nptr, (char **) ((void *)0)); +} +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) atoi (__const char *__nptr) +{ + return (int) strtol (__nptr, (char **) ((void *)0), 10); +} +extern __inline __attribute__ ((__gnu_inline__)) long int +__attribute__ ((__nothrow__)) atol (__const char *__nptr) +{ + return strtol (__nptr, (char **) ((void *)0), 10); +} + + + + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int +__attribute__ ((__nothrow__)) atoll (__const char *__nptr) +{ + return strtoll (__nptr, (char **) ((void *)0), 10); +} + +# 311 "/usr/include/stdlib.h" 3 4 +extern char *l64a (long int __n) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + +extern long int a64l (__const char *__s) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +# 1 "/usr/include/sys/types.h" 1 3 4 +# 28 "/usr/include/sys/types.h" 3 4 + + + + + + +typedef __u_char u_char; +typedef __u_short u_short; +typedef __u_int u_int; +typedef __u_long u_long; +typedef __quad_t quad_t; +typedef __u_quad_t u_quad_t; +typedef __fsid_t fsid_t; + + + + +typedef __loff_t loff_t; + + + +typedef __ino_t ino_t; + + + + + + +typedef __ino64_t ino64_t; + + + + +typedef __dev_t dev_t; + + + + +typedef __gid_t gid_t; + + + + +typedef __mode_t mode_t; + + + + +typedef __nlink_t nlink_t; + + + + +typedef __uid_t uid_t; + + + + + +typedef __off_t off_t; + + + + + + +typedef __off64_t off64_t; + + + + +typedef __pid_t pid_t; + + + + + +typedef __id_t id_t; + + + + +typedef __ssize_t ssize_t; + + + + + +typedef __daddr_t daddr_t; +typedef __caddr_t caddr_t; + + + + + +typedef __key_t key_t; +# 133 "/usr/include/sys/types.h" 3 4 +# 1 "/usr/include/time.h" 1 3 4 +# 58 "/usr/include/time.h" 3 4 + + +typedef __clock_t clock_t; + + + +# 74 "/usr/include/time.h" 3 4 + + +typedef __time_t time_t; + + + +# 92 "/usr/include/time.h" 3 4 +typedef __clockid_t clockid_t; +# 104 "/usr/include/time.h" 3 4 +typedef __timer_t timer_t; +# 134 "/usr/include/sys/types.h" 2 3 4 + + + +typedef __useconds_t useconds_t; + + + +typedef __suseconds_t suseconds_t; + + + + + +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 148 "/usr/include/sys/types.h" 2 3 4 + + + +typedef unsigned long int ulong; +typedef unsigned short int ushort; +typedef unsigned int uint; +# 201 "/usr/include/sys/types.h" 3 4 +typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); +typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); + +typedef int register_t __attribute__ ((__mode__ (__word__))); +# 220 "/usr/include/sys/types.h" 3 4 +# 1 "/usr/include/sys/select.h" 1 3 4 +# 31 "/usr/include/sys/select.h" 3 4 +# 1 "/usr/include/bits/select.h" 1 3 4 +# 32 "/usr/include/sys/select.h" 2 3 4 + + +# 1 "/usr/include/bits/sigset.h" 1 3 4 +# 24 "/usr/include/bits/sigset.h" 3 4 +typedef int __sig_atomic_t; + + + + +typedef struct + { + unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; + } __sigset_t; +# 35 "/usr/include/sys/select.h" 2 3 4 + + + +typedef __sigset_t sigset_t; + + + + + +# 1 "/usr/include/time.h" 1 3 4 +# 120 "/usr/include/time.h" 3 4 +struct timespec + { + __time_t tv_sec; + long int tv_nsec; + }; +# 45 "/usr/include/sys/select.h" 2 3 4 + +# 1 "/usr/include/bits/time.h" 1 3 4 +# 75 "/usr/include/bits/time.h" 3 4 +struct timeval + { + __time_t tv_sec; + __suseconds_t tv_usec; + }; +# 47 "/usr/include/sys/select.h" 2 3 4 +# 55 "/usr/include/sys/select.h" 3 4 +typedef long int __fd_mask; +# 67 "/usr/include/sys/select.h" 3 4 +typedef struct + { + + + + __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; + + + + + + } fd_set; + + + + + + +typedef __fd_mask fd_mask; +# 99 "/usr/include/sys/select.h" 3 4 + +# 109 "/usr/include/sys/select.h" 3 4 +extern int select (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + struct timeval *__restrict __timeout); +# 121 "/usr/include/sys/select.h" 3 4 +extern int pselect (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + const struct timespec *__restrict __timeout, + const __sigset_t *__restrict __sigmask); + + + +# 221 "/usr/include/sys/types.h" 2 3 4 + + +# 1 "/usr/include/sys/sysmacros.h" 1 3 4 +# 30 "/usr/include/sys/sysmacros.h" 3 4 +__extension__ +extern unsigned int gnu_dev_major (unsigned long long int __dev) + __attribute__ ((__nothrow__)); +__extension__ +extern unsigned int gnu_dev_minor (unsigned long long int __dev) + __attribute__ ((__nothrow__)); +__extension__ +extern unsigned long long int gnu_dev_makedev (unsigned int __major, + unsigned int __minor) + __attribute__ ((__nothrow__)); + + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int +__attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev) +{ + return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); +} + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int +__attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev) +{ + return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); +} + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned long long int +__attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor) +{ + return ((__minor & 0xff) | ((__major & 0xfff) << 8) + | (((unsigned long long int) (__minor & ~0xff)) << 12) + | (((unsigned long long int) (__major & ~0xfff)) << 32)); +} +# 224 "/usr/include/sys/types.h" 2 3 4 + + + + + +typedef __blksize_t blksize_t; + + + + + + +typedef __blkcnt_t blkcnt_t; + + + +typedef __fsblkcnt_t fsblkcnt_t; + + + +typedef __fsfilcnt_t fsfilcnt_t; +# 263 "/usr/include/sys/types.h" 3 4 +typedef __blkcnt64_t blkcnt64_t; +typedef __fsblkcnt64_t fsblkcnt64_t; +typedef __fsfilcnt64_t fsfilcnt64_t; + + + + + +# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 +# 46 "/usr/include/bits/pthreadtypes.h" 3 4 +typedef unsigned long int pthread_t; + +typedef union +{ + char __size[36]; + long int __align; +} pthread_attr_t; + + +typedef struct __pthread_internal_slist +{ + struct __pthread_internal_slist *__next; +} __pthread_slist_t; + + + + +typedef union +{ + struct __pthread_mutex_s + { + int __lock __attribute__ ((aligned(16))); + unsigned int __count; + int __owner; + + + int __kind; + + + + int __compat_padding[4]; + + + unsigned int __nusers; + __extension__ union + { + int __spins; + __pthread_slist_t __list; + }; + + + int __reserved1; + int __reserved2; + } __data; + char __size[48]; + long int __align; +} pthread_mutex_t; + +typedef union +{ + char __size[4]; + long int __align; +} pthread_mutexattr_t; +# 108 "/usr/include/bits/pthreadtypes.h" 3 4 +typedef union +{ + struct + { + + + + + int __lock __attribute__ ((aligned(16))); + + + + + int __initializer; + unsigned int __futex; + void *__mutex; + + + __extension__ unsigned long long int __total_seq; + __extension__ unsigned long long int __wakeup_seq; + __extension__ unsigned long long int __woken_seq; + unsigned int __nwaiters; + unsigned int __broadcast_seq; + + + } __data; + char __size[48]; + __extension__ long long int __align; +} pthread_cond_t; + +typedef union +{ + char __size[4]; + long int __align; +} pthread_condattr_t; + + + +typedef unsigned int pthread_key_t; + + + +typedef int pthread_once_t; + + + + + +typedef union +{ + struct + { + + + + + int __compat_padding[4] __attribute__ ((aligned(16))); + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + int __writer; + + + + int __reserved1; + + + unsigned char __pad2; + unsigned char __pad1; + unsigned char __shared; + unsigned char __flags; + + + + int __reserved2; + int __reserved3; + int __reserved4; + } __data; + char __size[64]; + long int __align; +} pthread_rwlock_t; + +typedef union +{ + char __size[8]; + long int __align; +} pthread_rwlockattr_t; + + + + + +typedef volatile int pthread_spinlock_t; + + + + +typedef union +{ + char __size[48]; + long int __align; +} pthread_barrier_t; + +typedef union +{ + char __size[4]; + int __align; +} pthread_barrierattr_t; +# 272 "/usr/include/sys/types.h" 2 3 4 + + + +# 321 "/usr/include/stdlib.h" 2 3 4 + + + + + + +extern long int random (void) __attribute__ ((__nothrow__)); + + +extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__)); + + + + + +extern char *initstate (unsigned int __seed, char *__statebuf, + size_t __statelen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + +extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + + +struct random_data + { + int32_t *fptr; + int32_t *rptr; + int32_t *state; + int rand_type; + int rand_deg; + int rand_sep; + int32_t *end_ptr; + }; + +extern int random_r (struct random_data *__restrict __buf, + int32_t *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int srandom_r (unsigned int __seed, struct random_data *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + +extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, + size_t __statelen, + struct random_data *__restrict __buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); + +extern int setstate_r (char *__restrict __statebuf, + struct random_data *__restrict __buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern int rand (void) __attribute__ ((__nothrow__)); + +extern void srand (unsigned int __seed) __attribute__ ((__nothrow__)); + + + + +extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__)); + + + + + + + +extern double drand48 (void) __attribute__ ((__nothrow__)); +extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern long int lrand48 (void) __attribute__ ((__nothrow__)); +extern long int nrand48 (unsigned short int __xsubi[3]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern long int mrand48 (void) __attribute__ ((__nothrow__)); +extern long int jrand48 (unsigned short int __xsubi[3]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern void srand48 (long int __seedval) __attribute__ ((__nothrow__)); +extern unsigned short int *seed48 (unsigned short int __seed16v[3]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +struct drand48_data + { + unsigned short int __x[3]; + unsigned short int __old_x[3]; + unsigned short int __c; + unsigned short int __init; + unsigned long long int __a; + }; + + +extern int drand48_r (struct drand48_data *__restrict __buffer, + double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int erand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int lrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int nrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int mrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int jrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int srand48_r (long int __seedval, struct drand48_data *__buffer) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + +extern int seed48_r (unsigned short int __seed16v[3], + struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int lcong48_r (unsigned short int __param[7], + struct drand48_data *__buffer) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + + + + +extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + +extern void *calloc (size_t __nmemb, size_t __size) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + + + + + + + +extern void *realloc (void *__ptr, size_t __size) + __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + +extern void free (void *__ptr) __attribute__ ((__nothrow__)); + + + + +extern void cfree (void *__ptr) __attribute__ ((__nothrow__)); + + + +# 1 "/usr/include/alloca.h" 1 3 4 +# 25 "/usr/include/alloca.h" 3 4 +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 26 "/usr/include/alloca.h" 2 3 4 + + + + + + + +extern void *alloca (size_t __size) __attribute__ ((__nothrow__)); + + + + + + +# 498 "/usr/include/stdlib.h" 2 3 4 + + + + + +extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + +extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +extern void abort (void) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + +extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +# 528 "/usr/include/stdlib.h" 3 4 +extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern void exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + + + + + +extern void quick_exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + + + + + +extern void _Exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + + + + +extern char *getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *__secure_getenv (__const char *__name) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int putenv (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int setenv (__const char *__name, __const char *__value, int __replace) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + +extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int clearenv (void) __attribute__ ((__nothrow__)); +# 606 "/usr/include/stdlib.h" 3 4 +extern char *mktemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 620 "/usr/include/stdlib.h" 3 4 +extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 630 "/usr/include/stdlib.h" 3 4 +extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 642 "/usr/include/stdlib.h" 3 4 +extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 652 "/usr/include/stdlib.h" 3 4 +extern int mkstemps64 (char *__template, int __suffixlen) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 663 "/usr/include/stdlib.h" 3 4 +extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 674 "/usr/include/stdlib.h" 3 4 +extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 684 "/usr/include/stdlib.h" 3 4 +extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 694 "/usr/include/stdlib.h" 3 4 +extern int mkostemps (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 706 "/usr/include/stdlib.h" 3 4 +extern int mkostemps64 (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + + + + + +extern int system (__const char *__command) __attribute__ ((__warn_unused_result__)); + + + + + + +extern char *canonicalize_file_name (__const char *__name) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 734 "/usr/include/stdlib.h" 3 4 +extern char *realpath (__const char *__restrict __name, + char *__restrict __resolved) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + + + +typedef int (*__compar_fn_t) (__const void *, __const void *); + + +typedef __compar_fn_t comparison_fn_t; + + + +typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *); + + + + + +extern void *bsearch (__const void *__key, __const void *__base, + size_t __nmemb, size_t __size, __compar_fn_t __compar) + __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__)); + + + +extern void qsort (void *__base, size_t __nmemb, size_t __size, + __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); + +extern void qsort_r (void *__base, size_t __nmemb, size_t __size, + __compar_d_fn_t __compar, void *__arg) + __attribute__ ((__nonnull__ (1, 4))); + + + + +extern int abs (int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern long int labs (long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + +__extension__ extern long long int llabs (long long int __x) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern div_t div (int __numer, int __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern ldiv_t ldiv (long int __numer, long int __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + + +__extension__ extern lldiv_t lldiv (long long int __numer, + long long int __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + +# 808 "/usr/include/stdlib.h" 3 4 +extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *gcvt (double __value, int __ndigit, char *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *qecvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qfcvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qgcvt (long double __value, int __ndigit, char *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); + + + + +extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); +extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); + +extern int qecvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); +extern int qfcvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); + + + + + + + +extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + +extern int mbtowc (wchar_t *__restrict __pwc, + __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + +extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + +extern size_t mbstowcs (wchar_t *__restrict __pwcs, + __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)); + +extern size_t wcstombs (char *__restrict __s, + __const wchar_t *__restrict __pwcs, size_t __n) + __attribute__ ((__nothrow__)); + + + + + + + + +extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 896 "/usr/include/stdlib.h" 3 4 +extern int getsubopt (char **__restrict __optionp, + char *__const *__restrict __tokens, + char **__restrict __valuep) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__)); + + + + + +extern void setkey (__const char *__key) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern int grantpt (int __fd) __attribute__ ((__nothrow__)); + + + +extern int unlockpt (int __fd) __attribute__ ((__nothrow__)); + + + + +extern char *ptsname (int __fd) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + + + +extern int ptsname_r (int __fd, char *__buf, size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + +extern int getpt (void); + + + + + + +extern int getloadavg (double __loadavg[], int __nelem) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +# 1 "/usr/include/bits/stdlib.h" 1 3 4 +# 24 "/usr/include/bits/stdlib.h" 3 4 +extern char *__realpath_chk (__const char *__restrict __name, + char *__restrict __resolved, + size_t __resolvedlen) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern char *__realpath_alias (__const char *__restrict __name, char *__restrict __resolved) __asm__ ("" "realpath") __attribute__ ((__nothrow__)) + + __attribute__ ((__warn_unused_result__)); +extern char *__realpath_chk_warn (__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __asm__ ("" "__realpath_chk") __attribute__ ((__nothrow__)) + + + __attribute__ ((__warn_unused_result__)) + __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +__attribute__ ((__nothrow__)) realpath (__const char *__restrict __name, char *__restrict __resolved) +{ + if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1) + { + + if (__builtin_object_size (__resolved, 2 > 1) < 4096) + return __realpath_chk_warn (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); + + return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); + } + + return __realpath_alias (__name, __resolved); +} + + +extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, + size_t __nreal) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ptsname_r") __attribute__ ((__nothrow__)) + + __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nothrow__)) + + + __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) ptsname_r (int __fd, char *__buf, size_t __buflen) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __ptsname_r_alias (__fd, __buf, __buflen); +} + + +extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int __wctomb_alias (char *__s, wchar_t __wchar) __asm__ ("" "wctomb") __attribute__ ((__nothrow__)) + __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) int +__attribute__ ((__nothrow__)) wctomb (char *__s, wchar_t __wchar) +{ + + + + + + + + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) + return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1)); + return __wctomb_alias (__s, __wchar); +} + + +extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, + __const char *__restrict __src, + size_t __len, size_t __dstlen) __attribute__ ((__nothrow__)); +extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__)) + + + ; +extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__mbstowcs_chk") __attribute__ ((__nothrow__)) + + + + __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +__attribute__ ((__nothrow__)) mbstowcs (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __mbstowcs_chk (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + + if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) + return __mbstowcs_chk_warn (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + } + return __mbstowcs_alias (__dst, __src, __len); +} + + +extern size_t __wcstombs_chk (char *__restrict __dst, + __const wchar_t *__restrict __src, + size_t __len, size_t __dstlen) __attribute__ ((__nothrow__)); +extern size_t __wcstombs_alias (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) __asm__ ("" "wcstombs") __attribute__ ((__nothrow__)) + + + ; +extern size_t __wcstombs_chk_warn (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__wcstombs_chk") __attribute__ ((__nothrow__)) + + + + __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len"))); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +__attribute__ ((__nothrow__)) wcstombs (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + if (__len > __builtin_object_size (__dst, 2 > 1)) + return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + } + return __wcstombs_alias (__dst, __src, __len); +} +# 956 "/usr/include/stdlib.h" 2 3 4 +# 964 "/usr/include/stdlib.h" 3 4 + +# 46 "../../src/mesa/main/compiler.h" 2 +# 1 "/usr/include/stdio.h" 1 3 4 +# 30 "/usr/include/stdio.h" 3 4 + + + + +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 35 "/usr/include/stdio.h" 2 3 4 +# 45 "/usr/include/stdio.h" 3 4 +struct _IO_FILE; + + + +typedef struct _IO_FILE FILE; + + + + + +# 65 "/usr/include/stdio.h" 3 4 +typedef struct _IO_FILE __FILE; +# 75 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/libio.h" 1 3 4 +# 32 "/usr/include/libio.h" 3 4 +# 1 "/usr/include/_G_config.h" 1 3 4 +# 15 "/usr/include/_G_config.h" 3 4 +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 16 "/usr/include/_G_config.h" 2 3 4 + + + + +# 1 "/usr/include/wchar.h" 1 3 4 +# 83 "/usr/include/wchar.h" 3 4 +typedef struct +{ + int __count; + union + { + + unsigned int __wch; + + + + char __wchb[4]; + } __value; +} __mbstate_t; +# 21 "/usr/include/_G_config.h" 2 3 4 + +typedef struct +{ + __off_t __pos; + __mbstate_t __state; +} _G_fpos_t; +typedef struct +{ + __off64_t __pos; + __mbstate_t __state; +} _G_fpos64_t; +# 53 "/usr/include/_G_config.h" 3 4 +typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); +typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); +# 33 "/usr/include/libio.h" 2 3 4 +# 53 "/usr/include/libio.h" 3 4 +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stdarg.h" 1 3 4 +# 40 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stdarg.h" 3 4 +typedef __builtin_va_list __gnuc_va_list; +# 54 "/usr/include/libio.h" 2 3 4 +# 170 "/usr/include/libio.h" 3 4 +struct _IO_jump_t; struct _IO_FILE; +# 180 "/usr/include/libio.h" 3 4 +typedef void _IO_lock_t; + + + + + +struct _IO_marker { + struct _IO_marker *_next; + struct _IO_FILE *_sbuf; + + + + int _pos; +# 203 "/usr/include/libio.h" 3 4 +}; + + +enum __codecvt_result +{ + __codecvt_ok, + __codecvt_partial, + __codecvt_error, + __codecvt_noconv +}; +# 271 "/usr/include/libio.h" 3 4 +struct _IO_FILE { + int _flags; + + + + + char* _IO_read_ptr; + char* _IO_read_end; + char* _IO_read_base; + char* _IO_write_base; + char* _IO_write_ptr; + char* _IO_write_end; + char* _IO_buf_base; + char* _IO_buf_end; + + char *_IO_save_base; + char *_IO_backup_base; + char *_IO_save_end; + + struct _IO_marker *_markers; + + struct _IO_FILE *_chain; + + int _fileno; + + + + int _flags2; + + __off_t _old_offset; + + + + unsigned short _cur_column; + signed char _vtable_offset; + char _shortbuf[1]; + + + + _IO_lock_t *_lock; +# 319 "/usr/include/libio.h" 3 4 + __off64_t _offset; +# 328 "/usr/include/libio.h" 3 4 + void *__pad1; + void *__pad2; + void *__pad3; + void *__pad4; + size_t __pad5; + + int _mode; + + char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; + +}; + + +typedef struct _IO_FILE _IO_FILE; + + +struct _IO_FILE_plus; + +extern struct _IO_FILE_plus _IO_2_1_stdin_; +extern struct _IO_FILE_plus _IO_2_1_stdout_; +extern struct _IO_FILE_plus _IO_2_1_stderr_; +# 364 "/usr/include/libio.h" 3 4 +typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); + + + + + + + +typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, + size_t __n); + + + + + + + +typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); + + +typedef int __io_close_fn (void *__cookie); + + + + +typedef __io_read_fn cookie_read_function_t; +typedef __io_write_fn cookie_write_function_t; +typedef __io_seek_fn cookie_seek_function_t; +typedef __io_close_fn cookie_close_function_t; + + +typedef struct +{ + __io_read_fn *read; + __io_write_fn *write; + __io_seek_fn *seek; + __io_close_fn *close; +} _IO_cookie_io_functions_t; +typedef _IO_cookie_io_functions_t cookie_io_functions_t; + +struct _IO_cookie_file; + + +extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, + void *__cookie, _IO_cookie_io_functions_t __fns); + + + + + + + +extern int __underflow (_IO_FILE *); +extern int __uflow (_IO_FILE *); +extern int __overflow (_IO_FILE *, int); +# 460 "/usr/include/libio.h" 3 4 +extern int _IO_getc (_IO_FILE *__fp); +extern int _IO_putc (int __c, _IO_FILE *__fp); +extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__)); +extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__)); + +extern int _IO_peekc_locked (_IO_FILE *__fp); + + + + + +extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__)); +extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__)); +extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__)); +# 490 "/usr/include/libio.h" 3 4 +extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, + __gnuc_va_list, int *__restrict); +extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, + __gnuc_va_list); +extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); +extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); + +extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); +extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); + +extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__)); +# 76 "/usr/include/stdio.h" 2 3 4 + + + + +typedef __gnuc_va_list va_list; +# 109 "/usr/include/stdio.h" 3 4 + + +typedef _G_fpos_t fpos_t; + + + + + +typedef _G_fpos64_t fpos64_t; +# 161 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/bits/stdio_lim.h" 1 3 4 +# 162 "/usr/include/stdio.h" 2 3 4 + + + +extern struct _IO_FILE *stdin; +extern struct _IO_FILE *stdout; +extern struct _IO_FILE *stderr; + + + + + + + +extern int remove (__const char *__filename) __attribute__ ((__nothrow__)); + +extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__)); + + + + +extern int renameat (int __oldfd, __const char *__old, int __newfd, + __const char *__new) __attribute__ ((__nothrow__)); + + + + + + + + +extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__)); +# 202 "/usr/include/stdio.h" 3 4 +extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__)); + + + +extern char *tmpnam (char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + + +extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +# 224 "/usr/include/stdio.h" 3 4 +extern char *tempnam (__const char *__dir, __const char *__pfx) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fclose (FILE *__stream); + + + + +extern int fflush (FILE *__stream); + +# 249 "/usr/include/stdio.h" 3 4 +extern int fflush_unlocked (FILE *__stream); +# 259 "/usr/include/stdio.h" 3 4 +extern int fcloseall (void); + + + + + + + + + +extern FILE *fopen (__const char *__restrict __filename, + __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *freopen (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +# 292 "/usr/include/stdio.h" 3 4 + + +extern FILE *fopen64 (__const char *__restrict __filename, + __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); +extern FILE *freopen64 (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + + +extern FILE *fopencookie (void *__restrict __magic_cookie, + __const char *__restrict __modes, + _IO_cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) + __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + + + +extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__)); + + + +extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, + int __modes, size_t __n) __attribute__ ((__nothrow__)); + + + + + +extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, + size_t __size) __attribute__ ((__nothrow__)); + + +extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__)); + + + + + + + + +extern int fprintf (FILE *__restrict __stream, + __const char *__restrict __format, ...); + + + + +extern int printf (__const char *__restrict __format, ...); + +extern int sprintf (char *__restrict __s, + __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); + + + + + +extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg); + + + + +extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); + +extern int vsprintf (char *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) __attribute__ ((__nothrow__)); + + + + + +extern int snprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); + +extern int vsnprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); + + + + + + +extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, + __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__)); +extern int __asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +extern int asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +# 414 "/usr/include/stdio.h" 3 4 +extern int vdprintf (int __fd, __const char *__restrict __fmt, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 2, 0))); +extern int dprintf (int __fd, __const char *__restrict __fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); + + + + + + + + +extern int fscanf (FILE *__restrict __stream, + __const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); + + + + +extern int scanf (__const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); + +extern int sscanf (__const char *__restrict __s, + __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); +# 465 "/usr/include/stdio.h" 3 4 + + + + + + + + +extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); + + +extern int vsscanf (__const char *__restrict __s, + __const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__scanf__, 2, 0))); +# 524 "/usr/include/stdio.h" 3 4 + + + + + + + + + +extern int fgetc (FILE *__stream); +extern int getc (FILE *__stream); + + + + + +extern int getchar (void); + +# 552 "/usr/include/stdio.h" 3 4 +extern int getc_unlocked (FILE *__stream); +extern int getchar_unlocked (void); +# 563 "/usr/include/stdio.h" 3 4 +extern int fgetc_unlocked (FILE *__stream); + + + + + + + + + + + +extern int fputc (int __c, FILE *__stream); +extern int putc (int __c, FILE *__stream); + + + + + +extern int putchar (int __c); + +# 596 "/usr/include/stdio.h" 3 4 +extern int fputc_unlocked (int __c, FILE *__stream); + + + + + + + +extern int putc_unlocked (int __c, FILE *__stream); +extern int putchar_unlocked (int __c); + + + + + + +extern int getw (FILE *__stream); + + +extern int putw (int __w, FILE *__stream); + + + + + + + + +extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) + __attribute__ ((__warn_unused_result__)); + + + + + + +extern char *gets (char *__s) __attribute__ ((__warn_unused_result__)); + +# 642 "/usr/include/stdio.h" 3 4 +extern char *fgets_unlocked (char *__restrict __s, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +# 658 "/usr/include/stdio.h" 3 4 +extern __ssize_t __getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern __ssize_t getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern __ssize_t getline (char **__restrict __lineptr, + size_t *__restrict __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); + + + + + +extern int puts (__const char *__s); + + + + + + +extern int ungetc (int __c, FILE *__stream); + + + + + + +extern size_t fread (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + +extern size_t fwrite (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __s) __attribute__ ((__warn_unused_result__)); + +# 719 "/usr/include/stdio.h" 3 4 +extern int fputs_unlocked (__const char *__restrict __s, + FILE *__restrict __stream); +# 730 "/usr/include/stdio.h" 3 4 +extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fseek (FILE *__stream, long int __off, int __whence); + + + + +extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)); + + + + +extern void rewind (FILE *__stream); + +# 766 "/usr/include/stdio.h" 3 4 +extern int fseeko (FILE *__stream, __off_t __off, int __whence); + + + + +extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__)); +# 785 "/usr/include/stdio.h" 3 4 + + + + + + +extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); + + + + +extern int fsetpos (FILE *__stream, __const fpos_t *__pos); +# 808 "/usr/include/stdio.h" 3 4 + + + +extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); +extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__)); +extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); +extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); + + + + +extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__)); + +extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + +extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + +extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__)); +extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern void perror (__const char *__s); + + + + + + +# 1 "/usr/include/bits/sys_errlist.h" 1 3 4 +# 27 "/usr/include/bits/sys_errlist.h" 3 4 +extern int sys_nerr; +extern __const char *__const sys_errlist[]; + + +extern int _sys_nerr; +extern __const char *__const _sys_errlist[]; +# 847 "/usr/include/stdio.h" 2 3 4 + + + + +extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + + + +extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +# 866 "/usr/include/stdio.h" 3 4 +extern FILE *popen (__const char *__command, __const char *__modes) __attribute__ ((__warn_unused_result__)); + + + + + +extern int pclose (FILE *__stream); + + + + + +extern char *ctermid (char *__s) __attribute__ ((__nothrow__)); + + + + + +extern char *cuserid (char *__s); + + + + +struct obstack; + + +extern int obstack_printf (struct obstack *__restrict __obstack, + __const char *__restrict __format, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))); +extern int obstack_vprintf (struct obstack *__restrict __obstack, + __const char *__restrict __format, + __gnuc_va_list __args) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))); + + + + + + + +extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__)); + + + +extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); + + +extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__)); +# 927 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/bits/stdio.h" 1 3 4 +# 44 "/usr/include/bits/stdio.h" 3 4 +extern __inline __attribute__ ((__gnu_inline__)) int +getchar (void) +{ + return _IO_getc (stdin); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +fgetc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +getc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +getchar_unlocked (void) +{ + return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +putchar (int __c) +{ + return _IO_putc (__c, stdout); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +fputc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +putc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +putchar_unlocked (int __c) +{ + return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) __ssize_t +getline (char **__lineptr, size_t *__n, FILE *__stream) +{ + return __getdelim (__lineptr, __n, '\n', __stream); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) feof_unlocked (FILE *__stream) +{ + return (((__stream)->_flags & 0x10) != 0); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) ferror_unlocked (FILE *__stream) +{ + return (((__stream)->_flags & 0x20) != 0); +} +# 928 "/usr/include/stdio.h" 2 3 4 + + +# 1 "/usr/include/bits/stdio2.h" 1 3 4 +# 24 "/usr/include/bits/stdio2.h" 3 4 +extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, + __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); +extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, + __const char *__restrict __format, + __gnuc_va_list __ap) __attribute__ ((__nothrow__)); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) sprintf (char *__restrict __s, __const char *__restrict __fmt, ...) +{ + return __builtin___sprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) vsprintf (char *__restrict __s, __const char *__restrict __fmt, __gnuc_va_list __ap) + +{ + return __builtin___vsprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} + + + +extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, __const char *__restrict __format, + ...) __attribute__ ((__nothrow__)); +extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, __const char *__restrict __format, + __gnuc_va_list __ap) __attribute__ ((__nothrow__)); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) snprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, ...) + +{ + return __builtin___snprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) vsnprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, __gnuc_va_list __ap) + +{ + return __builtin___vsnprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} + + + + + +extern int __fprintf_chk (FILE *__restrict __stream, int __flag, + __const char *__restrict __format, ...); +extern int __printf_chk (int __flag, __const char *__restrict __format, ...); +extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, + __const char *__restrict __format, __gnuc_va_list __ap); +extern int __vprintf_chk (int __flag, __const char *__restrict __format, + __gnuc_va_list __ap); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +fprintf (FILE *__restrict __stream, __const char *__restrict __fmt, ...) +{ + return __fprintf_chk (__stream, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +printf (__const char *__restrict __fmt, ...) +{ + return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); +} + + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vprintf (__const char *__restrict __fmt, __gnuc_va_list __ap) +{ + + return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap); + + + +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vfprintf (FILE *__restrict __stream, + __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap); +} + + + +extern int __asprintf_chk (char **__restrict __ptr, int __flag, + __const char *__restrict __fmt, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__)); +extern int __vasprintf_chk (char **__restrict __ptr, int __flag, + __const char *__restrict __fmt, __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__)); +extern int __dprintf_chk (int __fd, int __flag, __const char *__restrict __fmt, + ...) __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __vdprintf_chk (int __fd, int __flag, + __const char *__restrict __fmt, __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 3, 0))); +extern int __obstack_printf_chk (struct obstack *__restrict __obstack, + int __flag, __const char *__restrict __format, + ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack, + int __flag, + __const char *__restrict __format, + __gnuc_va_list __args) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) __asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) + +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +dprintf (int __fd, __const char *__restrict __fmt, ...) +{ + return __dprintf_chk (__fd, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, ...) + +{ + return __obstack_printf_chk (__obstack, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +# 195 "/usr/include/bits/stdio2.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) vasprintf (char **__restrict __ptr, __const char *__restrict __fmt, __gnuc_va_list __ap) + +{ + return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, __gnuc_va_list __ap) + +{ + return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt, + __ap); +} + + + + + +extern char *__gets_chk (char *__str, size_t) __attribute__ ((__warn_unused_result__)); +extern char *__gets_warn (char *__str) __asm__ ("" "gets") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use fgets or getline instead, gets can't " "specify buffer size"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +gets (char *__str) +{ + if (__builtin_object_size (__str, 2 > 1) != (size_t) -1) + return __gets_chk (__str, __builtin_object_size (__str, 2 > 1)); + return __gets_warn (__str); +} + +extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") + + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_alias (__s, __n, __stream); +} + +extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") + + + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk") + + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + } + return __fread_alias (__ptr, __size, __n, __stream); +} + + +extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size, + int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked") + + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_unlocked_alias (__s, __n, __stream); +} + + + + +extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") + + + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk") + + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + } + + + if (__builtin_constant_p (__size) + && __builtin_constant_p (__n) + && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) + && __size * __n <= 8) + { + size_t __cnt = __size * __n; + char *__cptr = (char *) __ptr; + if (__cnt == 0) + return 0; + + for (; __cnt > 0; --__cnt) + { + int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++); + if (__c == (-1)) + break; + *__cptr++ = __c; + } + return (__cptr - (char *) __ptr) / __size; + } + + return __fread_unlocked_alias (__ptr, __size, __n, __stream); +} +# 931 "/usr/include/stdio.h" 2 3 4 + + + + + + +# 47 "../../src/mesa/main/compiler.h" 2 +# 1 "/usr/include/string.h" 1 3 4 +# 29 "/usr/include/string.h" 3 4 + + + + + +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 35 "/usr/include/string.h" 2 3 4 + + + + + + + + + +extern void *memcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern void *memmove (void *__dest, __const void *__src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, + int __c, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 95 "/usr/include/string.h" 3 4 +extern void *memchr (__const void *__s, int __c, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +# 109 "/usr/include/string.h" 3 4 +extern void *rawmemchr (__const void *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +# 120 "/usr/include/string.h" 3 4 +extern void *memrchr (__const void *__s, int __c, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + +extern char *strncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern char *strcat (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + +extern char *strncat (char *__restrict __dest, __const char *__restrict __src, + size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strcmp (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strcoll (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern size_t strxfrm (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + +# 165 "/usr/include/string.h" 3 4 +extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); + +extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, + __locale_t __l) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); + + + + + +extern char *strdup (__const char *__s) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern char *strndup (__const char *__string, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); +# 210 "/usr/include/string.h" 3 4 + +# 235 "/usr/include/string.h" 3 4 +extern char *strchr (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +# 262 "/usr/include/string.h" 3 4 +extern char *strrchr (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +# 276 "/usr/include/string.h" 3 4 +extern char *strchrnul (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern size_t strcspn (__const char *__s, __const char *__reject) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern size_t strspn (__const char *__s, __const char *__accept) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 314 "/usr/include/string.h" 3 4 +extern char *strpbrk (__const char *__s, __const char *__accept) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 342 "/usr/include/string.h" 3 4 +extern char *strstr (__const char *__haystack, __const char *__needle) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern char *strtok (char *__restrict __s, __const char *__restrict __delim) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + + +extern char *__strtok_r (char *__restrict __s, + __const char *__restrict __delim, + char **__restrict __save_ptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); + +extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, + char **__restrict __save_ptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); +# 373 "/usr/include/string.h" 3 4 +extern char *strcasestr (__const char *__haystack, __const char *__needle) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + + +extern void *memmem (__const void *__haystack, size_t __haystacklen, + __const void *__needle, size_t __needlelen) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); + + + +extern void *__mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern void *mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern size_t strlen (__const char *__s) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern size_t strnlen (__const char *__string, size_t __maxlen) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern char *strerror (int __errnum) __attribute__ ((__nothrow__)); + +# 438 "/usr/include/string.h" 3 4 +extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + + + +extern char *strerror_l (int __errnum, __locale_t __l) __attribute__ ((__nothrow__)); + + + + + +extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern void bcopy (__const void *__src, void *__dest, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 489 "/usr/include/string.h" 3 4 +extern char *index (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +# 517 "/usr/include/string.h" 3 4 +extern char *rindex (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + +extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + +extern int ffsl (long int __l) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + +__extension__ extern int ffsll (long long int __ll) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + + + +extern int strcasecmp (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern int strcasecmp_l (__const char *__s1, __const char *__s2, + __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); + +extern int strncasecmp_l (__const char *__s1, __const char *__s2, + size_t __n, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); + + + + + +extern char *strsep (char **__restrict __stringp, + __const char *__restrict __delim) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern char *strsignal (int __sig) __attribute__ ((__nothrow__)); + + +extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern char *__stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int strverscmp (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern char *strfry (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +# 606 "/usr/include/string.h" 3 4 +extern char *basename (__const char *__filename) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +# 634 "/usr/include/string.h" 3 4 +# 1 "/usr/include/bits/string.h" 1 3 4 +# 635 "/usr/include/string.h" 2 3 4 + + +# 1 "/usr/include/bits/string2.h" 1 3 4 +# 80 "/usr/include/bits/string2.h" 3 4 +typedef struct { unsigned char __arr[2]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR2; +typedef struct { unsigned char __arr[3]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR3; +typedef struct { unsigned char __arr[4]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR4; +typedef struct { unsigned char __arr[5]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR5; +typedef struct { unsigned char __arr[6]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR6; +typedef struct { unsigned char __arr[7]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR7; +typedef struct { unsigned char __arr[8]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR8; +# 394 "/usr/include/bits/string2.h" 3 4 +extern void *__rawmemchr (const void *__s, int __c); +# 969 "/usr/include/bits/string2.h" 3 4 +extern __inline __attribute__ ((__gnu_inline__)) size_t __strcspn_c1 (__const char *__s, int __reject); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strcspn_c1 (__const char *__s, int __reject) +{ + register size_t __result = 0; + while (__s[__result] != '\0' && __s[__result] != __reject) + ++__result; + return __result; +} + +extern __inline __attribute__ ((__gnu_inline__)) size_t __strcspn_c2 (__const char *__s, int __reject1, + int __reject2); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strcspn_c2 (__const char *__s, int __reject1, int __reject2) +{ + register size_t __result = 0; + while (__s[__result] != '\0' && __s[__result] != __reject1 + && __s[__result] != __reject2) + ++__result; + return __result; +} + +extern __inline __attribute__ ((__gnu_inline__)) size_t __strcspn_c3 (__const char *__s, int __reject1, + int __reject2, int __reject3); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strcspn_c3 (__const char *__s, int __reject1, int __reject2, + int __reject3) +{ + register size_t __result = 0; + while (__s[__result] != '\0' && __s[__result] != __reject1 + && __s[__result] != __reject2 && __s[__result] != __reject3) + ++__result; + return __result; +} +# 1045 "/usr/include/bits/string2.h" 3 4 +extern __inline __attribute__ ((__gnu_inline__)) size_t __strspn_c1 (__const char *__s, int __accept); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strspn_c1 (__const char *__s, int __accept) +{ + register size_t __result = 0; + + while (__s[__result] == __accept) + ++__result; + return __result; +} + +extern __inline __attribute__ ((__gnu_inline__)) size_t __strspn_c2 (__const char *__s, int __accept1, + int __accept2); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strspn_c2 (__const char *__s, int __accept1, int __accept2) +{ + register size_t __result = 0; + + while (__s[__result] == __accept1 || __s[__result] == __accept2) + ++__result; + return __result; +} + +extern __inline __attribute__ ((__gnu_inline__)) size_t __strspn_c3 (__const char *__s, int __accept1, + int __accept2, int __accept3); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) +{ + register size_t __result = 0; + + while (__s[__result] == __accept1 || __s[__result] == __accept2 + || __s[__result] == __accept3) + ++__result; + return __result; +} +# 1121 "/usr/include/bits/string2.h" 3 4 +extern __inline __attribute__ ((__gnu_inline__)) char *__strpbrk_c2 (__const char *__s, int __accept1, + int __accept2); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strpbrk_c2 (__const char *__s, int __accept1, int __accept2) +{ + + while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) + ++__s; + return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; +} + +extern __inline __attribute__ ((__gnu_inline__)) char *__strpbrk_c3 (__const char *__s, int __accept1, + int __accept2, int __accept3); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strpbrk_c3 (__const char *__s, int __accept1, int __accept2, + int __accept3) +{ + + while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 + && *__s != __accept3) + ++__s; + return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; +} +# 1172 "/usr/include/bits/string2.h" 3 4 +extern __inline __attribute__ ((__gnu_inline__)) char *__strtok_r_1c (char *__s, char __sep, char **__nextp); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strtok_r_1c (char *__s, char __sep, char **__nextp) +{ + char *__result; + if (__s == ((void *)0)) + __s = *__nextp; + while (*__s == __sep) + ++__s; + __result = ((void *)0); + if (*__s != '\0') + { + __result = __s++; + while (*__s != '\0') + if (*__s++ == __sep) + { + __s[-1] = '\0'; + break; + } + } + *__nextp = __s; + return __result; +} +# 1204 "/usr/include/bits/string2.h" 3 4 +extern char *__strsep_g (char **__stringp, __const char *__delim); +# 1222 "/usr/include/bits/string2.h" 3 4 +extern __inline __attribute__ ((__gnu_inline__)) char *__strsep_1c (char **__s, char __reject); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strsep_1c (char **__s, char __reject) +{ + register char *__retval = *__s; + if (__retval != ((void *)0) && (*__s = (__extension__ (__builtin_constant_p (__reject) && !__builtin_constant_p (__retval) && (__reject) == '\0' ? (char *) __rawmemchr (__retval, __reject) : __builtin_strchr (__retval, __reject)))) != ((void *)0)) + *(*__s)++ = '\0'; + return __retval; +} + +extern __inline __attribute__ ((__gnu_inline__)) char *__strsep_2c (char **__s, char __reject1, char __reject2); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strsep_2c (char **__s, char __reject1, char __reject2) +{ + register char *__retval = *__s; + if (__retval != ((void *)0)) + { + register char *__cp = __retval; + while (1) + { + if (*__cp == '\0') + { + __cp = ((void *)0); + break; + } + if (*__cp == __reject1 || *__cp == __reject2) + { + *__cp++ = '\0'; + break; + } + ++__cp; + } + *__s = __cp; + } + return __retval; +} + +extern __inline __attribute__ ((__gnu_inline__)) char *__strsep_3c (char **__s, char __reject1, char __reject2, + char __reject3); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) +{ + register char *__retval = *__s; + if (__retval != ((void *)0)) + { + register char *__cp = __retval; + while (1) + { + if (*__cp == '\0') + { + __cp = ((void *)0); + break; + } + if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) + { + *__cp++ = '\0'; + break; + } + ++__cp; + } + *__s = __cp; + } + return __retval; +} +# 1303 "/usr/include/bits/string2.h" 3 4 +extern char *__strdup (__const char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); +# 1322 "/usr/include/bits/string2.h" 3 4 +extern char *__strndup (__const char *__string, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); +# 638 "/usr/include/string.h" 2 3 4 + + + + +# 1 "/usr/include/bits/string3.h" 1 3 4 +# 23 "/usr/include/bits/string3.h" 3 4 +extern void __warn_memset_zero_len (void) __attribute__((__warning__ ("memset used with constant zero length parameter; this could be due to transposed parameters"))) + ; +# 48 "/usr/include/bits/string3.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +__attribute__ ((__nothrow__)) memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) + +{ + return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +__attribute__ ((__nothrow__)) memmove (void *__dest, __const void *__src, size_t __len) +{ + return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +__attribute__ ((__nothrow__)) mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) + +{ + return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} +# 76 "/usr/include/bits/string3.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +__attribute__ ((__nothrow__)) memset (void *__dest, int __ch, size_t __len) +{ + if (__builtin_constant_p (__len) && __len == 0 + && (!__builtin_constant_p (__ch) || __ch != 0)) + { + __warn_memset_zero_len (); + return __dest; + } + return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void +__attribute__ ((__nothrow__)) bcopy (__const void *__src, void *__dest, size_t __len) +{ + (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void +__attribute__ ((__nothrow__)) bzero (void *__dest, size_t __len) +{ + (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__nothrow__)) strcpy (char *__restrict __dest, __const char *__restrict __src) +{ + return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__nothrow__)) stpcpy (char *__restrict __dest, __const char *__restrict __src) +{ + return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__nothrow__)) strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __len) + +{ + return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); +} + + +extern char *__stpncpy_chk (char *__dest, __const char *__src, size_t __n, + size_t __destlen) __attribute__ ((__nothrow__)); +extern char *__stpncpy_alias (char *__dest, __const char *__src, size_t __n) __asm__ ("" "stpncpy") __attribute__ ((__nothrow__)) + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__nothrow__)) stpncpy (char *__dest, __const char *__src, size_t __n) +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1 + && (!__builtin_constant_p (__n) || __n <= __builtin_object_size (__dest, 2 > 1))) + return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1)); + return __stpncpy_alias (__dest, __src, __n); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__nothrow__)) strcat (char *__restrict __dest, __const char *__restrict __src) +{ + return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__nothrow__)) strncat (char *__restrict __dest, __const char *__restrict __src, size_t __len) + +{ + return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); +} +# 643 "/usr/include/string.h" 2 3 4 + + + + +# 48 "../../src/mesa/main/compiler.h" 2 + + + +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/float.h" 1 3 4 +# 52 "../../src/mesa/main/compiler.h" 2 +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stdarg.h" 1 3 4 +# 53 "../../src/mesa/main/compiler.h" 2 +# 253 "../../src/mesa/main/compiler.h" +# 1 "/usr/include/byteswap.h" 1 3 4 +# 23 "/usr/include/byteswap.h" 3 4 +# 1 "/usr/include/bits/byteswap.h" 1 3 4 +# 24 "/usr/include/byteswap.h" 2 3 4 +# 254 "../../src/mesa/main/compiler.h" 2 +# 40 "../../src/mesa/main/imports.h" 2 +# 1 "../../src/mesa/main/glheader.h" 1 +# 41 "../../src/mesa/main/imports.h" 2 +# 84 "../../src/mesa/main/imports.h" +typedef union { GLfloat f; GLint i; } fi_type; +# 181 "../../src/mesa/main/imports.h" +static __inline__ GLfloat LOG2(GLfloat val) +{ + fi_type num; + GLint log_2; + num.f = val; + log_2 = ((num.i >> 23) & 255) - 128; + num.i &= ~(255 << 23); + num.i += 127 << 23; + num.f = ((-1.0f/3) * num.f + 2) * num.f - 2.0f/3; + return num.f + log_2; +} +# 205 "../../src/mesa/main/imports.h" +static __inline__ int IS_INF_OR_NAN( float x ) +{ + fi_type tmp; + tmp.f = x; + return !(int)((unsigned int)((tmp.i & 0x7fffffff)-0x7f800000) >> 31); +} +# 228 "../../src/mesa/main/imports.h" +static __inline__ int GET_FLOAT_BITS( float x ) +{ + fi_type fi; + fi.f = x; + return fi.i; +} +# 354 "../../src/mesa/main/imports.h" +static __inline__ int ifloor(float f) +{ + int ai, bi; + double af, bf; + fi_type u; + + af = (3 << 22) + 0.5 + (double)f; + bf = (3 << 22) + 0.5 - (double)f; + u.f = (float) af; ai = u.i; + u.f = (float) bf; bi = u.i; + return (ai - bi) >> 1; +} +# 401 "../../src/mesa/main/imports.h" +static __inline__ int iceil(float f) +{ + int ai, bi; + double af, bf; + fi_type u; + af = (3 << 22) + 0.5 + (double)f; + bf = (3 << 22) + 0.5 - (double)f; + u.f = (float) af; ai = u.i; + u.f = (float) bf; bi = u.i; + return (ai - bi + 1) >> 1; +} +# 426 "../../src/mesa/main/imports.h" +static __inline__ int +_mesa_is_pow_two(int x) +{ + return !(x & (x - 1)); +} +# 446 "../../src/mesa/main/imports.h" +static __inline__ int32_t +_mesa_next_pow_two_32(uint32_t x) +{ + + + uint32_t y = (x != 1); + return (1 + y) << ((__builtin_clz(x - y) ^ 31) ); +# 463 "../../src/mesa/main/imports.h" +} + +static __inline__ int64_t +_mesa_next_pow_two_64(uint64_t x) +{ + + + uint64_t y = (x != 1); + if (sizeof(x) == sizeof(long)) + return (1 + y) << ((__builtin_clzl(x - y) ^ 63)); + else + return (1 + y) << ((__builtin_clzll(x - y) ^ 63)); +# 486 "../../src/mesa/main/imports.h" +} + + + + + +static __inline__ GLuint +_mesa_logbase2(GLuint n) +{ + + + return (31 - __builtin_clz(n | 1)); +# 507 "../../src/mesa/main/imports.h" +} + + + + + +static __inline__ GLboolean +_mesa_little_endian(void) +{ + const GLuint ui = 1; + return *((const GLubyte *) &ui); +} + + + + + + + +extern void * +_mesa_align_malloc( size_t bytes, unsigned long alignment ); + +extern void * +_mesa_align_calloc( size_t bytes, unsigned long alignment ); + +extern void +_mesa_align_free( void *ptr ); + +extern void * +_mesa_align_realloc(void *oldBuffer, size_t oldSize, size_t newSize, + unsigned long alignment); + +extern void * +_mesa_exec_malloc( GLuint size ); + +extern void +_mesa_exec_free( void *addr ); + +extern void * +_mesa_realloc( void *oldBuffer, size_t oldSize, size_t newSize ); + +extern void +_mesa_memset16( unsigned short *dst, unsigned short val, size_t n ); + +extern double +_mesa_sqrtd(double x); + +extern float +_mesa_sqrtf(float x); + +extern float +_mesa_inv_sqrtf(float x); + +extern void +_mesa_init_sqrt_table(void); +# 591 "../../src/mesa/main/imports.h" +extern GLhalfARB +_mesa_float_to_half(float f); + +extern float +_mesa_half_to_float(GLhalfARB h); + + +extern void * +_mesa_bsearch( const void *key, const void *base, size_t nmemb, size_t size, + int (*compar)(const void *, const void *) ); + +extern char * +_mesa_getenv( const char *var ); + +extern char * +_mesa_strdup( const char *s ); + +extern float +_mesa_strtof( const char *s, char **end ); + +extern unsigned int +_mesa_str_checksum(const char *str); + +extern int +_mesa_snprintf( char *str, size_t size, const char *fmt, ... ) __attribute__ ((format(__printf__, 3, 4))); + +struct gl_context; + +extern void +_mesa_warning( struct gl_context *gc, const char *fmtString, ... ) __attribute__ ((format(__printf__, 2, 3))); + +extern void +_mesa_problem( const struct gl_context *ctx, const char *fmtString, ... ) __attribute__ ((format(__printf__, 2, 3))); + +extern void +_mesa_error( struct gl_context *ctx, GLenum error, const char *fmtString, ... ) __attribute__ ((format(__printf__, 3, 4))); + +extern void +_mesa_debug( const struct gl_context *ctx, const char *fmtString, ... ) __attribute__ ((format(__printf__, 2, 3))); +# 53 "../../src/mesa/main/context.h" 2 +# 1 "../../src/mesa/main/mtypes.h" 1 +# 38 "../../src/mesa/main/mtypes.h" +# 1 "../../src/mesa/main/config.h" 1 +# 39 "../../src/mesa/main/mtypes.h" 2 +# 1 "../../src/mesa/main/mfeatures.h" 1 +# 40 "../../src/mesa/main/mtypes.h" 2 +# 1 "../../src/mapi/glapi/glapi.h" 1 +# 75 "../../src/mapi/glapi/glapi.h" +# 1 "../../src/mapi/glapi/glthread.h" 1 + + + +# 1 "../../src/mapi/mapi/u_thread.h" 1 +# 45 "../../src/mapi/mapi/u_thread.h" +# 1 "../../src/mapi/mapi/u_compiler.h" 1 +# 46 "../../src/mapi/mapi/u_thread.h" 2 +# 63 "../../src/mapi/mapi/u_thread.h" +# 1 "/usr/include/pthread.h" 1 3 4 +# 25 "/usr/include/pthread.h" 3 4 +# 1 "/usr/include/sched.h" 1 3 4 +# 30 "/usr/include/sched.h" 3 4 +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 31 "/usr/include/sched.h" 2 3 4 + + + +# 1 "/usr/include/time.h" 1 3 4 +# 35 "/usr/include/sched.h" 2 3 4 +# 43 "/usr/include/sched.h" 3 4 +# 1 "/usr/include/bits/sched.h" 1 3 4 +# 74 "/usr/include/bits/sched.h" 3 4 +struct sched_param + { + int __sched_priority; + }; + + + + + +extern int clone (int (*__fn) (void *__arg), void *__child_stack, + int __flags, void *__arg, ...) __attribute__ ((__nothrow__)); + + +extern int unshare (int __flags) __attribute__ ((__nothrow__)); + + +extern int sched_getcpu (void) __attribute__ ((__nothrow__)); + + + + + + + + + + +struct __sched_param + { + int __sched_priority; + }; +# 116 "/usr/include/bits/sched.h" 3 4 +typedef unsigned long int __cpu_mask; + + + + + + +typedef struct +{ + __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; +} cpu_set_t; +# 199 "/usr/include/bits/sched.h" 3 4 + + +extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) + __attribute__ ((__nothrow__)); +extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__)); + + +# 44 "/usr/include/sched.h" 2 3 4 + + + + + + + +extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param) + __attribute__ ((__nothrow__)); + + +extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__)); + + +extern int sched_setscheduler (__pid_t __pid, int __policy, + __const struct sched_param *__param) __attribute__ ((__nothrow__)); + + +extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__)); + + +extern int sched_yield (void) __attribute__ ((__nothrow__)); + + +extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__)); + + +extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__)); + + +extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__)); +# 118 "/usr/include/sched.h" 3 4 +extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, + __const cpu_set_t *__cpuset) __attribute__ ((__nothrow__)); + + +extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, + cpu_set_t *__cpuset) __attribute__ ((__nothrow__)); + + + +# 26 "/usr/include/pthread.h" 2 3 4 +# 1 "/usr/include/time.h" 1 3 4 +# 30 "/usr/include/time.h" 3 4 + + + + + + + + +# 1 "/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 39 "/usr/include/time.h" 2 3 4 + + + +# 1 "/usr/include/bits/time.h" 1 3 4 +# 43 "/usr/include/time.h" 2 3 4 +# 131 "/usr/include/time.h" 3 4 + + +struct tm +{ + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; + + + long int tm_gmtoff; + __const char *tm_zone; + + + + +}; + + + + + + + + +struct itimerspec + { + struct timespec it_interval; + struct timespec it_value; + }; + + +struct sigevent; +# 180 "/usr/include/time.h" 3 4 + + + +extern clock_t clock (void) __attribute__ ((__nothrow__)); + + +extern time_t time (time_t *__timer) __attribute__ ((__nothrow__)); + + +extern double difftime (time_t __time1, time_t __time0) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__)); + + + + + +extern size_t strftime (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp) __attribute__ ((__nothrow__)); + + + + + +extern char *strptime (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp) + __attribute__ ((__nothrow__)); + + + + + + + +extern size_t strftime_l (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp, + __locale_t __loc) __attribute__ ((__nothrow__)); + + + +extern char *strptime_l (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp, + __locale_t __loc) __attribute__ ((__nothrow__)); + + + + + + +extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__)); + + + +extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__)); + + + + + +extern struct tm *gmtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) __attribute__ ((__nothrow__)); + + + +extern struct tm *localtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) __attribute__ ((__nothrow__)); + + + + + +extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__)); + + +extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__)); + + + + + + + +extern char *asctime_r (__const struct tm *__restrict __tp, + char *__restrict __buf) __attribute__ ((__nothrow__)); + + +extern char *ctime_r (__const time_t *__restrict __timer, + char *__restrict __buf) __attribute__ ((__nothrow__)); + + + + +extern char *__tzname[2]; +extern int __daylight; +extern long int __timezone; + + + + +extern char *tzname[2]; + + + +extern void tzset (void) __attribute__ ((__nothrow__)); + + + +extern int daylight; +extern long int timezone; + + + + + +extern int stime (__const time_t *__when) __attribute__ ((__nothrow__)); +# 313 "/usr/include/time.h" 3 4 +extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__)); + + +extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__)); + + +extern int dysize (int __year) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +# 328 "/usr/include/time.h" 3 4 +extern int nanosleep (__const struct timespec *__requested_time, + struct timespec *__remaining); + + + +extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__)); + + +extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__)); + + +extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) + __attribute__ ((__nothrow__)); + + + + + + +extern int clock_nanosleep (clockid_t __clock_id, int __flags, + __const struct timespec *__req, + struct timespec *__rem); + + +extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__)); + + + + +extern int timer_create (clockid_t __clock_id, + struct sigevent *__restrict __evp, + timer_t *__restrict __timerid) __attribute__ ((__nothrow__)); + + +extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__)); + + +extern int timer_settime (timer_t __timerid, int __flags, + __const struct itimerspec *__restrict __value, + struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__)); + + +extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) + __attribute__ ((__nothrow__)); + + +extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__)); +# 390 "/usr/include/time.h" 3 4 +extern int getdate_err; +# 399 "/usr/include/time.h" 3 4 +extern struct tm *getdate (__const char *__string); +# 413 "/usr/include/time.h" 3 4 +extern int getdate_r (__const char *__restrict __string, + struct tm *__restrict __resbufp); + + + +# 27 "/usr/include/pthread.h" 2 3 4 + + +# 1 "/usr/include/bits/setjmp.h" 1 3 4 +# 33 "/usr/include/bits/setjmp.h" 3 4 +typedef double __jmp_buf[21]; +# 30 "/usr/include/pthread.h" 2 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 31 "/usr/include/pthread.h" 2 3 4 + + + +enum +{ + PTHREAD_CREATE_JOINABLE, + + PTHREAD_CREATE_DETACHED + +}; + + + +enum +{ + PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_ADAPTIVE_NP + + , + PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL + + + + , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP + +}; + + + + +enum +{ + PTHREAD_MUTEX_STALLED, + PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, + PTHREAD_MUTEX_ROBUST, + PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST +}; + + + + + +enum +{ + PTHREAD_PRIO_NONE, + PTHREAD_PRIO_INHERIT, + PTHREAD_PRIO_PROTECT +}; +# 115 "/usr/include/pthread.h" 3 4 +enum +{ + PTHREAD_RWLOCK_PREFER_READER_NP, + PTHREAD_RWLOCK_PREFER_WRITER_NP, + PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, + PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP +}; +# 147 "/usr/include/pthread.h" 3 4 +enum +{ + PTHREAD_INHERIT_SCHED, + + PTHREAD_EXPLICIT_SCHED + +}; + + + +enum +{ + PTHREAD_SCOPE_SYSTEM, + + PTHREAD_SCOPE_PROCESS + +}; + + + +enum +{ + PTHREAD_PROCESS_PRIVATE, + + PTHREAD_PROCESS_SHARED + +}; +# 182 "/usr/include/pthread.h" 3 4 +struct _pthread_cleanup_buffer +{ + void (*__routine) (void *); + void *__arg; + int __canceltype; + struct _pthread_cleanup_buffer *__prev; +}; + + +enum +{ + PTHREAD_CANCEL_ENABLE, + + PTHREAD_CANCEL_DISABLE + +}; +enum +{ + PTHREAD_CANCEL_DEFERRED, + + PTHREAD_CANCEL_ASYNCHRONOUS + +}; +# 220 "/usr/include/pthread.h" 3 4 + + + + + +extern int pthread_create (pthread_t *__restrict __newthread, + __const pthread_attr_t *__restrict __attr, + void *(*__start_routine) (void *), + void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))); + + + + + +extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); + + + + + + + +extern int pthread_join (pthread_t __th, void **__thread_return); + + + + +extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __attribute__ ((__nothrow__)); + + + + + + + +extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, + __const struct timespec *__abstime); + + + + + + +extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__)); + + + +extern pthread_t pthread_self (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); + + +extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __attribute__ ((__nothrow__)); + + + + + + + +extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_destroy (pthread_attr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, + int *__detachstate) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, + int __detachstate) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, + size_t *__guardsize) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setguardsize (pthread_attr_t *__attr, + size_t __guardsize) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict + __attr, + struct sched_param *__restrict __param) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, + __const struct sched_param *__restrict + __param) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict + __attr, int *__restrict __policy) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict + __attr, int *__restrict __inherit) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, + int __inherit) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, + int *__restrict __scope) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict + __attr, void **__restrict __stackaddr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); + + + + + +extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, + void *__stackaddr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); + + +extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict + __attr, size_t *__restrict __stacksize) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int pthread_attr_setstacksize (pthread_attr_t *__attr, + size_t __stacksize) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, + void **__restrict __stackaddr, + size_t *__restrict __stacksize) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))); + + + + +extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, + size_t __stacksize) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, + size_t __cpusetsize, + __const cpu_set_t *__cpuset) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))); + + + +extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr, + size_t __cpusetsize, + cpu_set_t *__cpuset) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))); + + + + + +extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + + + + + +extern int pthread_setschedparam (pthread_t __target_thread, int __policy, + __const struct sched_param *__param) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))); + + +extern int pthread_getschedparam (pthread_t __target_thread, + int *__restrict __policy, + struct sched_param *__restrict __param) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); + + +extern int pthread_setschedprio (pthread_t __target_thread, int __prio) + __attribute__ ((__nothrow__)); + + + + +extern int pthread_getname_np (pthread_t __target_thread, char *__buf, + size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + +extern int pthread_setname_np (pthread_t __target_thread, __const char *__name) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); + + + + + +extern int pthread_getconcurrency (void) __attribute__ ((__nothrow__)); + + +extern int pthread_setconcurrency (int __level) __attribute__ ((__nothrow__)); + + + + + + + +extern int pthread_yield (void) __attribute__ ((__nothrow__)); + + + + +extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, + __const cpu_set_t *__cpuset) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))); + + +extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, + cpu_set_t *__cpuset) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))); +# 478 "/usr/include/pthread.h" 3 4 +extern int pthread_once (pthread_once_t *__once_control, + void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); +# 490 "/usr/include/pthread.h" 3 4 +extern int pthread_setcancelstate (int __state, int *__oldstate); + + + +extern int pthread_setcanceltype (int __type, int *__oldtype); + + +extern int pthread_cancel (pthread_t __th); + + + + +extern void pthread_testcancel (void); + + + + +typedef struct +{ + struct + { + __jmp_buf __cancel_jmp_buf; + int __mask_was_saved; + } __cancel_jmp_buf[1]; + void *__pad[4]; +} __pthread_unwind_buf_t __attribute__ ((__aligned__)); +# 524 "/usr/include/pthread.h" 3 4 +struct __pthread_cleanup_frame +{ + void (*__cancel_routine) (void *); + void *__cancel_arg; + int __do_it; + int __cancel_type; +}; +# 664 "/usr/include/pthread.h" 3 4 +extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf) + ; +# 676 "/usr/include/pthread.h" 3 4 +extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf) + ; +# 699 "/usr/include/pthread.h" 3 4 +extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf) + ; +# 712 "/usr/include/pthread.h" 3 4 +extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf) + ; + + + +extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf) + __attribute__ ((__noreturn__)) + + __attribute__ ((__weak__)) + + ; + + + +struct __jmp_buf_tag; +extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __attribute__ ((__nothrow__)); + + + + + +extern int pthread_mutex_init (pthread_mutex_t *__mutex, + __const pthread_mutexattr_t *__mutexattr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutex_lock (pthread_mutex_t *__mutex) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, + __const struct timespec *__restrict + __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutex_getprioceiling (__const pthread_mutex_t * + __restrict __mutex, + int *__restrict __prioceiling) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, + int __prioceiling, + int *__restrict __old_ceiling) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))); + + + + +extern int pthread_mutex_consistent (pthread_mutex_t *__mutex) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + +extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +# 790 "/usr/include/pthread.h" 3 4 +extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __pshared) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, + int __pshared) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict + __attr, int *__restrict __kind) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __protocol) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, + int __protocol) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __prioceiling) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, + int __prioceiling) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr, + int *__robustness) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr, + int *__robustness) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, + int __robustness) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + +extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, + int __robustness) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +# 872 "/usr/include/pthread.h" 3 4 +extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, + __const pthread_rwlockattr_t *__restrict + __attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, + __const struct timespec *__restrict + __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, + __const struct timespec *__restrict + __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * + __restrict __attr, + int *__restrict __pshared) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, + int __pshared) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t * + __restrict __attr, + int *__restrict __pref) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, + int __pref) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int pthread_cond_init (pthread_cond_t *__restrict __cond, + __const pthread_condattr_t *__restrict + __cond_attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_cond_destroy (pthread_cond_t *__cond) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_cond_signal (pthread_cond_t *__cond) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_cond_broadcast (pthread_cond_t *__cond) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex) + __attribute__ ((__nonnull__ (1, 2))); +# 984 "/usr/include/pthread.h" 3 4 +extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex, + __const struct timespec *__restrict + __abstime) __attribute__ ((__nonnull__ (1, 2, 3))); + + + + +extern int pthread_condattr_init (pthread_condattr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_condattr_destroy (pthread_condattr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_condattr_getpshared (__const pthread_condattr_t * + __restrict __attr, + int *__restrict __pshared) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, + int __pshared) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_condattr_getclock (__const pthread_condattr_t * + __restrict __attr, + __clockid_t *__restrict __clock_id) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_condattr_setclock (pthread_condattr_t *__attr, + __clockid_t __clock_id) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +# 1028 "/usr/include/pthread.h" 3 4 +extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_destroy (pthread_spinlock_t *__lock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_lock (pthread_spinlock_t *__lock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_trylock (pthread_spinlock_t *__lock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_unlock (pthread_spinlock_t *__lock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, + __const pthread_barrierattr_t *__restrict + __attr, unsigned int __count) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrier_wait (pthread_barrier_t *__barrier) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * + __restrict __attr, + int *__restrict __pshared) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, + int __pshared) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +# 1095 "/usr/include/pthread.h" 3 4 +extern int pthread_key_create (pthread_key_t *__key, + void (*__destr_function) (void *)) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__)); + + +extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__)); + + +extern int pthread_setspecific (pthread_key_t __key, + __const void *__pointer) __attribute__ ((__nothrow__)) ; + + + + +extern int pthread_getcpuclockid (pthread_t __thread_id, + __clockid_t *__clock_id) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +# 1129 "/usr/include/pthread.h" 3 4 +extern int pthread_atfork (void (*__prepare) (void), + void (*__parent) (void), + void (*__child) (void)) __attribute__ ((__nothrow__)); + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) pthread_equal (pthread_t __thread1, pthread_t __thread2) +{ + return __thread1 == __thread2; +} + + + +# 64 "../../src/mapi/mapi/u_thread.h" 2 + +struct u_tsd { + pthread_key_t key; + int initMagic; +}; + +typedef pthread_mutex_t u_mutex; +# 186 "../../src/mapi/mapi/u_thread.h" +unsigned long +u_thread_self(void); + +void +u_tsd_init(struct u_tsd *tsd); + +void +u_tsd_destroy(struct u_tsd *tsd); + +void * +u_tsd_get(struct u_tsd *tsd); + +void +u_tsd_set(struct u_tsd *tsd, void *ptr); +# 5 "../../src/mapi/glapi/glthread.h" 2 +# 17 "../../src/mapi/glapi/glthread.h" +typedef struct u_tsd _glthread_TSD; +typedef u_mutex _glthread_Mutex; +# 76 "../../src/mapi/glapi/glapi.h" 2 + +typedef void (*_glapi_proc)(void); +struct _glapi_table; + + + + +__attribute__((visibility("default"))) extern __thread struct _glapi_table * _glapi_tls_Dispatch + __attribute__((tls_model("initial-exec"))); + +__attribute__((visibility("default"))) extern __thread void * _glapi_tls_Context + __attribute__((tls_model("initial-exec"))); + +__attribute__((visibility("default"))) extern const struct _glapi_table *_glapi_Dispatch; +__attribute__((visibility("default"))) extern const void *_glapi_Context; +# 118 "../../src/mapi/glapi/glapi.h" +void +_glapi_destroy_multithread(void); + + +__attribute__((visibility("default"))) void +_glapi_check_multithread(void); + + +__attribute__((visibility("default"))) void +_glapi_set_context(void *context); + + +__attribute__((visibility("default"))) void * +_glapi_get_context(void); + + +__attribute__((visibility("default"))) void +_glapi_set_dispatch(struct _glapi_table *dispatch); + + +__attribute__((visibility("default"))) struct _glapi_table * +_glapi_get_dispatch(void); + + +__attribute__((visibility("default"))) unsigned int +_glapi_get_dispatch_table_size(void); + + +__attribute__((visibility("default"))) int +_glapi_add_dispatch( const char * const * function_names, + const char * parameter_signature ); + +__attribute__((visibility("default"))) int +_glapi_get_proc_offset(const char *funcName); + + +__attribute__((visibility("default"))) _glapi_proc +_glapi_get_proc_address(const char *funcName); + + +__attribute__((visibility("default"))) const char * +_glapi_get_proc_name(unsigned int offset); + + +__attribute__((visibility("default"))) struct _glapi_table * +_glapi_create_table_from_handle(void *handle, const char *symbol_prefix); + + +__attribute__((visibility("default"))) unsigned long +_glthread_GetID(void); + + + + + +__attribute__((visibility("default"))) void +_glapi_noop_enable_warnings(unsigned char enable); + + +__attribute__((visibility("default"))) void +_glapi_set_warning_func(_glapi_proc func); +# 41 "../../src/mesa/main/mtypes.h" 2 +# 1 "../../src/mesa/math/m_matrix.h" 1 +# 57 "../../src/mesa/math/m_matrix.h" +enum GLmatrixtype { + MATRIX_GENERAL, + MATRIX_IDENTITY, + MATRIX_3D_NO_ROT, + MATRIX_PERSPECTIVE, + MATRIX_2D, + MATRIX_2D_NO_ROT, + MATRIX_3D +} ; + + + + +typedef struct { + GLfloat *m; + GLfloat *inv; + GLuint flags; + + + enum GLmatrixtype type; +} GLmatrix; + + + + +extern void +_math_matrix_ctr( GLmatrix *m ); + +extern void +_math_matrix_dtr( GLmatrix *m ); + +extern void +_math_matrix_alloc_inv( GLmatrix *m ); + +extern void +_math_matrix_mul_matrix( GLmatrix *dest, const GLmatrix *a, const GLmatrix *b ); + +extern void +_math_matrix_mul_floats( GLmatrix *dest, const GLfloat *b ); + +extern void +_math_matrix_loadf( GLmatrix *mat, const GLfloat *m ); + +extern void +_math_matrix_translate( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z ); + +extern void +_math_matrix_rotate( GLmatrix *m, GLfloat angle, + GLfloat x, GLfloat y, GLfloat z ); + +extern void +_math_matrix_scale( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z ); + +extern void +_math_matrix_ortho( GLmatrix *mat, + GLfloat left, GLfloat right, + GLfloat bottom, GLfloat top, + GLfloat nearval, GLfloat farval ); + +extern void +_math_matrix_frustum( GLmatrix *mat, + GLfloat left, GLfloat right, + GLfloat bottom, GLfloat top, + GLfloat nearval, GLfloat farval ); + +extern void +_math_matrix_viewport(GLmatrix *m, GLint x, GLint y, GLint width, GLint height, + GLfloat zNear, GLfloat zFar, GLfloat depthMax); + +extern void +_math_matrix_set_identity( GLmatrix *dest ); + +extern void +_math_matrix_copy( GLmatrix *to, const GLmatrix *from ); + +extern void +_math_matrix_analyse( GLmatrix *mat ); + +extern void +_math_matrix_print( const GLmatrix *m ); + +extern GLboolean +_math_matrix_is_length_preserving( const GLmatrix *m ); + +extern GLboolean +_math_matrix_has_rotation( const GLmatrix *m ); + +extern GLboolean +_math_matrix_is_general_scale( const GLmatrix *m ); + +extern GLboolean +_math_matrix_is_dirty( const GLmatrix *m ); + + + + + + + +extern void +_math_transposef( GLfloat to[16], const GLfloat from[16] ); + +extern void +_math_transposed( GLdouble to[16], const GLdouble from[16] ); + +extern void +_math_transposefd( GLfloat to[16], const GLdouble from[16] ); +# 205 "../../src/mesa/math/m_matrix.h" +extern void +_mesa_transform_vector(GLfloat u[4], const GLfloat v[4], const GLfloat m[16]); +# 42 "../../src/mesa/main/mtypes.h" 2 +# 1 "../../src/mesa/main/simple_list.h" 1 +# 40 "../../src/mesa/main/simple_list.h" +struct simple_node { + struct simple_node *next; + struct simple_node *prev; +}; +# 43 "../../src/mesa/main/mtypes.h" 2 +# 1 "../../src/mesa/main/formats.h" 1 +# 46 "../../src/mesa/main/formats.h" +typedef enum +{ + MESA_FORMAT_NONE = 0, + + + + + + + + MESA_FORMAT_RGBA8888, + MESA_FORMAT_RGBA8888_REV, + MESA_FORMAT_ARGB8888, + MESA_FORMAT_ARGB8888_REV, + MESA_FORMAT_XRGB8888, + MESA_FORMAT_XRGB8888_REV, + MESA_FORMAT_RGB888, + MESA_FORMAT_BGR888, + MESA_FORMAT_RGB565, + MESA_FORMAT_RGB565_REV, + MESA_FORMAT_ARGB4444, + MESA_FORMAT_ARGB4444_REV, + MESA_FORMAT_RGBA5551, + MESA_FORMAT_ARGB1555, + MESA_FORMAT_ARGB1555_REV, + MESA_FORMAT_AL44, + MESA_FORMAT_AL88, + MESA_FORMAT_AL88_REV, + MESA_FORMAT_AL1616, + MESA_FORMAT_AL1616_REV, + MESA_FORMAT_RGB332, + MESA_FORMAT_A8, + MESA_FORMAT_A16, + MESA_FORMAT_L8, + MESA_FORMAT_L16, + MESA_FORMAT_I8, + MESA_FORMAT_I16, + MESA_FORMAT_CI8, + MESA_FORMAT_YCBCR, + MESA_FORMAT_YCBCR_REV, + MESA_FORMAT_R8, + MESA_FORMAT_RG88, + MESA_FORMAT_RG88_REV, + MESA_FORMAT_R16, + MESA_FORMAT_RG1616, + MESA_FORMAT_RG1616_REV, + MESA_FORMAT_ARGB2101010, + MESA_FORMAT_Z24_S8, + MESA_FORMAT_S8_Z24, + MESA_FORMAT_Z16, + MESA_FORMAT_X8_Z24, + MESA_FORMAT_Z24_X8, + MESA_FORMAT_Z32, + MESA_FORMAT_S8, + + + + + + + MESA_FORMAT_SRGB8, + MESA_FORMAT_SRGBA8, + MESA_FORMAT_SARGB8, + MESA_FORMAT_SL8, + MESA_FORMAT_SLA8, + MESA_FORMAT_SRGB_DXT1, + MESA_FORMAT_SRGBA_DXT1, + MESA_FORMAT_SRGBA_DXT3, + MESA_FORMAT_SRGBA_DXT5, + + + + + + + MESA_FORMAT_RGB_FXT1, + MESA_FORMAT_RGBA_FXT1, + MESA_FORMAT_RGB_DXT1, + MESA_FORMAT_RGBA_DXT1, + MESA_FORMAT_RGBA_DXT3, + MESA_FORMAT_RGBA_DXT5, + + + + + + + MESA_FORMAT_RGBA_FLOAT32, + MESA_FORMAT_RGBA_FLOAT16, + MESA_FORMAT_RGB_FLOAT32, + MESA_FORMAT_RGB_FLOAT16, + MESA_FORMAT_ALPHA_FLOAT32, + MESA_FORMAT_ALPHA_FLOAT16, + MESA_FORMAT_LUMINANCE_FLOAT32, + MESA_FORMAT_LUMINANCE_FLOAT16, + MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32, + MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16, + MESA_FORMAT_INTENSITY_FLOAT32, + MESA_FORMAT_INTENSITY_FLOAT16, + MESA_FORMAT_R_FLOAT32, + MESA_FORMAT_R_FLOAT16, + MESA_FORMAT_RG_FLOAT32, + MESA_FORMAT_RG_FLOAT16, + + + + + + + + MESA_FORMAT_RGBA_INT8, + MESA_FORMAT_RGBA_INT16, + MESA_FORMAT_RGBA_INT32, + + + + + MESA_FORMAT_RGBA_UINT8, + MESA_FORMAT_RGBA_UINT16, + MESA_FORMAT_RGBA_UINT32, + + + + + + + + MESA_FORMAT_DUDV8, + MESA_FORMAT_SIGNED_R8, + MESA_FORMAT_SIGNED_RG88_REV, + MESA_FORMAT_SIGNED_RGBX8888, + MESA_FORMAT_SIGNED_RGBA8888, + MESA_FORMAT_SIGNED_RGBA8888_REV, + MESA_FORMAT_SIGNED_R16, + MESA_FORMAT_SIGNED_GR1616, + MESA_FORMAT_SIGNED_RGB_16, + MESA_FORMAT_SIGNED_RGBA_16, + MESA_FORMAT_RGBA_16, + + + + MESA_FORMAT_RED_RGTC1, + MESA_FORMAT_SIGNED_RED_RGTC1, + MESA_FORMAT_RG_RGTC2, + MESA_FORMAT_SIGNED_RG_RGTC2, + + + + MESA_FORMAT_L_LATC1, + MESA_FORMAT_SIGNED_L_LATC1, + MESA_FORMAT_LA_LATC2, + MESA_FORMAT_SIGNED_LA_LATC2, + + + MESA_FORMAT_SIGNED_A8, + MESA_FORMAT_SIGNED_L8, + MESA_FORMAT_SIGNED_AL88, + MESA_FORMAT_SIGNED_I8, + MESA_FORMAT_SIGNED_A16, + MESA_FORMAT_SIGNED_L16, + MESA_FORMAT_SIGNED_AL1616, + MESA_FORMAT_SIGNED_I16, + + MESA_FORMAT_RGB9_E5_FLOAT, + MESA_FORMAT_R11_G11_B10_FLOAT, + + MESA_FORMAT_COUNT +} gl_format; + + +extern const char * +_mesa_get_format_name(gl_format format); + +extern GLint +_mesa_get_format_bytes(gl_format format); + +extern GLint +_mesa_get_format_bits(gl_format format, GLenum pname); + +extern GLenum +_mesa_get_format_datatype(gl_format format); + +extern GLenum +_mesa_get_format_base_format(gl_format format); + +extern void +_mesa_get_format_block_size(gl_format format, GLuint *bw, GLuint *bh); + +extern GLboolean +_mesa_is_format_compressed(gl_format format); + +extern GLboolean +_mesa_is_format_packed_depth_stencil(gl_format format); + +extern GLboolean +_mesa_is_format_integer_color(gl_format format); + +extern GLenum +_mesa_get_format_color_encoding(gl_format format); + +extern GLuint +_mesa_format_image_size(gl_format format, GLsizei width, + GLsizei height, GLsizei depth); + +extern uint64_t +_mesa_format_image_size64(gl_format format, GLsizei width, + GLsizei height, GLsizei depth); + +extern GLint +_mesa_format_row_stride(gl_format format, GLsizei width); + +extern void +_mesa_format_to_type_and_comps(gl_format format, + GLenum *datatype, GLuint *comps); + +extern void +_mesa_test_formats(void); + +extern gl_format +_mesa_get_srgb_format_linear(gl_format format); +# 44 "../../src/mesa/main/mtypes.h" 2 + + + + + + + typedef GLubyte GLchan; +# 73 "../../src/mesa/main/mtypes.h" + typedef GLubyte GLstencil; +# 85 "../../src/mesa/main/mtypes.h" +typedef GLuint64 GLbitfield64; +# 95 "../../src/mesa/main/mtypes.h" +struct _mesa_HashTable; +struct gl_attrib_node; +struct gl_list_extensions; +struct gl_meta_state; +struct gl_pixelstore_attrib; +struct gl_program_cache; +struct gl_texture_format; +struct gl_texture_image; +struct gl_texture_object; +struct gl_context; +struct st_context; +# 119 "../../src/mesa/main/mtypes.h" +typedef enum +{ + MESA_SHADER_VERTEX = 0, + MESA_SHADER_FRAGMENT = 1, + MESA_SHADER_GEOMETRY = 2, + MESA_SHADER_TYPES = 3 +} gl_shader_type; +# 136 "../../src/mesa/main/mtypes.h" +typedef enum +{ + VERT_ATTRIB_POS = 0, + VERT_ATTRIB_WEIGHT = 1, + VERT_ATTRIB_NORMAL = 2, + VERT_ATTRIB_COLOR0 = 3, + VERT_ATTRIB_COLOR1 = 4, + VERT_ATTRIB_FOG = 5, + VERT_ATTRIB_COLOR_INDEX = 6, + VERT_ATTRIB_POINT_SIZE = 6, + VERT_ATTRIB_EDGEFLAG = 7, + VERT_ATTRIB_TEX0 = 8, + VERT_ATTRIB_TEX1 = 9, + VERT_ATTRIB_TEX2 = 10, + VERT_ATTRIB_TEX3 = 11, + VERT_ATTRIB_TEX4 = 12, + VERT_ATTRIB_TEX5 = 13, + VERT_ATTRIB_TEX6 = 14, + VERT_ATTRIB_TEX7 = 15, + VERT_ATTRIB_GENERIC0 = 16, + VERT_ATTRIB_GENERIC1 = 17, + VERT_ATTRIB_GENERIC2 = 18, + VERT_ATTRIB_GENERIC3 = 19, + VERT_ATTRIB_GENERIC4 = 20, + VERT_ATTRIB_GENERIC5 = 21, + VERT_ATTRIB_GENERIC6 = 22, + VERT_ATTRIB_GENERIC7 = 23, + VERT_ATTRIB_GENERIC8 = 24, + VERT_ATTRIB_GENERIC9 = 25, + VERT_ATTRIB_GENERIC10 = 26, + VERT_ATTRIB_GENERIC11 = 27, + VERT_ATTRIB_GENERIC12 = 28, + VERT_ATTRIB_GENERIC13 = 29, + VERT_ATTRIB_GENERIC14 = 30, + VERT_ATTRIB_GENERIC15 = 31, + VERT_ATTRIB_MAX = 32 +} gl_vert_attrib; +# 220 "../../src/mesa/main/mtypes.h" +typedef enum +{ + VERT_RESULT_HPOS = 0, + VERT_RESULT_COL0 = 1, + VERT_RESULT_COL1 = 2, + VERT_RESULT_FOGC = 3, + VERT_RESULT_TEX0 = 4, + VERT_RESULT_TEX1 = 5, + VERT_RESULT_TEX2 = 6, + VERT_RESULT_TEX3 = 7, + VERT_RESULT_TEX4 = 8, + VERT_RESULT_TEX5 = 9, + VERT_RESULT_TEX6 = 10, + VERT_RESULT_TEX7 = 11, + VERT_RESULT_PSIZ = 12, + VERT_RESULT_BFC0 = 13, + VERT_RESULT_BFC1 = 14, + VERT_RESULT_EDGE = 15, + VERT_RESULT_VAR0 = 16, + VERT_RESULT_MAX = (VERT_RESULT_VAR0 + 16) +} gl_vert_result; + + + + + + + +typedef enum +{ + GEOM_ATTRIB_POSITION = 0, + GEOM_ATTRIB_COLOR0 = 1, + GEOM_ATTRIB_COLOR1 = 2, + GEOM_ATTRIB_SECONDARY_COLOR0 = 3, + GEOM_ATTRIB_SECONDARY_COLOR1 = 4, + GEOM_ATTRIB_FOG_FRAG_COORD = 5, + GEOM_ATTRIB_POINT_SIZE = 6, + GEOM_ATTRIB_CLIP_VERTEX = 7, + GEOM_ATTRIB_PRIMITIVE_ID = 8, + GEOM_ATTRIB_TEX_COORD = 9, + + GEOM_ATTRIB_VAR0 = 16, + GEOM_ATTRIB_MAX = (GEOM_ATTRIB_VAR0 + 16) +} gl_geom_attrib; +# 289 "../../src/mesa/main/mtypes.h" +typedef enum +{ + GEOM_RESULT_POS = 0, + GEOM_RESULT_COL0 = 1, + GEOM_RESULT_COL1 = 2, + GEOM_RESULT_SCOL0 = 3, + GEOM_RESULT_SCOL1 = 4, + GEOM_RESULT_FOGC = 5, + GEOM_RESULT_TEX0 = 6, + GEOM_RESULT_TEX1 = 7, + GEOM_RESULT_TEX2 = 8, + GEOM_RESULT_TEX3 = 9, + GEOM_RESULT_TEX4 = 10, + GEOM_RESULT_TEX5 = 11, + GEOM_RESULT_TEX6 = 12, + GEOM_RESULT_TEX7 = 13, + GEOM_RESULT_PSIZ = 14, + GEOM_RESULT_CLPV = 15, + GEOM_RESULT_PRID = 16, + GEOM_RESULT_LAYR = 17, + GEOM_RESULT_VAR0 = 18, + + GEOM_RESULT_MAX = (GEOM_RESULT_VAR0 + 16 - 2) +} gl_geom_result; + + + + + +typedef enum +{ + FRAG_ATTRIB_WPOS = 0, + FRAG_ATTRIB_COL0 = 1, + FRAG_ATTRIB_COL1 = 2, + FRAG_ATTRIB_FOGC = 3, + FRAG_ATTRIB_TEX0 = 4, + FRAG_ATTRIB_TEX1 = 5, + FRAG_ATTRIB_TEX2 = 6, + FRAG_ATTRIB_TEX3 = 7, + FRAG_ATTRIB_TEX4 = 8, + FRAG_ATTRIB_TEX5 = 9, + FRAG_ATTRIB_TEX6 = 10, + FRAG_ATTRIB_TEX7 = 11, + FRAG_ATTRIB_FACE = 12, + FRAG_ATTRIB_PNTC = 13, + FRAG_ATTRIB_VAR0 = 14, + FRAG_ATTRIB_MAX = (FRAG_ATTRIB_VAR0 + 16) +} gl_frag_attrib; +# 375 "../../src/mesa/main/mtypes.h" +typedef enum +{ + FRAG_RESULT_DEPTH = 0, + FRAG_RESULT_STENCIL = 1, + + + + FRAG_RESULT_COLOR = 2, + + + + + + FRAG_RESULT_DATA0 = 3, + FRAG_RESULT_MAX = (FRAG_RESULT_DATA0 + 8) +} gl_frag_result; + + + + + +typedef enum +{ + + BUFFER_FRONT_LEFT, + BUFFER_BACK_LEFT, + BUFFER_FRONT_RIGHT, + BUFFER_BACK_RIGHT, + BUFFER_DEPTH, + BUFFER_STENCIL, + BUFFER_ACCUM, + + BUFFER_AUX0, + + BUFFER_COLOR0, + BUFFER_COLOR1, + BUFFER_COLOR2, + BUFFER_COLOR3, + BUFFER_COLOR4, + BUFFER_COLOR5, + BUFFER_COLOR6, + BUFFER_COLOR7, + BUFFER_COUNT +} gl_buffer_index; +# 466 "../../src/mesa/main/mtypes.h" +struct gl_config +{ + GLboolean rgbMode; + GLboolean floatMode; + GLboolean colorIndexMode; + GLuint doubleBufferMode; + GLuint stereoMode; + + GLboolean haveAccumBuffer; + GLboolean haveDepthBuffer; + GLboolean haveStencilBuffer; + + GLint redBits, greenBits, blueBits, alphaBits; + GLuint redMask, greenMask, blueMask, alphaMask; + GLint rgbBits; + GLint indexBits; + + GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits; + GLint depthBits; + GLint stencilBits; + + GLint numAuxBuffers; + + GLint level; + + + GLint visualRating; + + + GLint transparentPixel; + + GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha; + GLint transparentIndex; + + + GLint sampleBuffers; + GLint samples; + + + GLint maxPbufferWidth; + GLint maxPbufferHeight; + GLint maxPbufferPixels; + GLint optimalPbufferWidth; + GLint optimalPbufferHeight; + + + GLint swapMethod; + + + GLint bindToTextureRgb; + GLint bindToTextureRgba; + GLint bindToMipmapTexture; + GLint bindToTextureTargets; + GLint yInverted; + + + GLint sRGBCapable; +}; + + + + + +struct gl_color_table +{ + GLenum InternalFormat; + GLenum _BaseFormat; + GLuint Size; + GLfloat *TableF; + GLubyte *TableUB; + GLubyte RedSize; + GLubyte GreenSize; + GLubyte BlueSize; + GLubyte AlphaSize; + GLubyte LuminanceSize; + GLubyte IntensitySize; +}; +# 612 "../../src/mesa/main/mtypes.h" +struct gl_shine_tab +{ + struct gl_shine_tab *next, *prev; + GLfloat tab[256 +1]; + GLfloat shininess; + GLuint refcount; +}; + + + + + +struct gl_light +{ + struct gl_light *next; + struct gl_light *prev; + + GLfloat Ambient[4]; + GLfloat Diffuse[4]; + GLfloat Specular[4]; + GLfloat EyePosition[4]; + GLfloat SpotDirection[4]; + GLfloat SpotExponent; + GLfloat SpotCutoff; + GLfloat _CosCutoffNeg; + GLfloat _CosCutoff; + GLfloat ConstantAttenuation; + GLfloat LinearAttenuation; + GLfloat QuadraticAttenuation; + GLboolean Enabled; + + + + + + GLbitfield _Flags; + + GLfloat _Position[4]; + GLfloat _VP_inf_norm[3]; + GLfloat _h_inf_norm[3]; + GLfloat _NormSpotDirection[4]; + GLfloat _VP_inf_spot_attenuation; + + GLfloat _SpotExpTable[512][2]; + GLfloat _MatAmbient[2][3]; + GLfloat _MatDiffuse[2][3]; + GLfloat _MatSpecular[2][3]; + GLfloat _dli; + GLfloat _sli; + +}; + + + + + +struct gl_lightmodel +{ + GLfloat Ambient[4]; + GLboolean LocalViewer; + GLboolean TwoSide; + GLenum ColorControl; + +}; + + + + + +struct gl_material +{ + GLfloat Attrib[12][4]; +}; + + + + + +struct gl_accum_attrib +{ + GLfloat ClearColor[4]; +}; + + + + + +struct gl_colorbuffer_attrib +{ + GLuint ClearIndex; + GLfloat ClearColorUnclamped[4]; + GLclampf ClearColor[4]; + + GLuint IndexMask; + GLubyte ColorMask[8][4]; + + GLenum DrawBuffer[8]; + + + + + + GLboolean AlphaEnabled; + GLenum AlphaFunc; + GLfloat AlphaRefUnclamped; + GLclampf AlphaRef; + + + + + + + GLbitfield BlendEnabled; + + + + + + GLfloat BlendColorUnclamped[4]; + GLfloat BlendColor[4]; + + struct + { + GLenum SrcRGB; + GLenum DstRGB; + GLenum SrcA; + GLenum DstA; + GLenum EquationRGB; + GLenum EquationA; + } Blend[8]; + + GLboolean _BlendFuncPerBuffer; + + GLboolean _BlendEquationPerBuffer; + + + + + + + GLenum LogicOp; + GLboolean IndexLogicOpEnabled; + GLboolean ColorLogicOpEnabled; + GLboolean _LogicOpEnabled; + + + GLboolean DitherFlag; + + GLenum ClampFragmentColor; + GLboolean _ClampFragmentColor; + GLenum ClampReadColor; + GLboolean _ClampReadColor; + + GLboolean sRGBEnabled; +}; + + + + + +struct gl_current_attrib +{ + + + + + + + GLfloat Attrib[VERT_ATTRIB_MAX][4]; + + + + + + + GLfloat RasterPos[4]; + GLfloat RasterDistance; + GLfloat RasterColor[4]; + GLfloat RasterSecondaryColor[4]; + GLfloat RasterTexCoords[8][4]; + GLboolean RasterPosValid; + +}; + + + + + +struct gl_depthbuffer_attrib +{ + GLenum Func; + GLclampd Clear; + GLboolean Test; + GLboolean Mask; + GLboolean BoundsTest; + GLfloat BoundsMin, BoundsMax; +}; + + + + + +struct gl_eval_attrib +{ + + + + + GLboolean Map1Color4; + GLboolean Map1Index; + GLboolean Map1Normal; + GLboolean Map1TextureCoord1; + GLboolean Map1TextureCoord2; + GLboolean Map1TextureCoord3; + GLboolean Map1TextureCoord4; + GLboolean Map1Vertex3; + GLboolean Map1Vertex4; + GLboolean Map1Attrib[16]; + GLboolean Map2Color4; + GLboolean Map2Index; + GLboolean Map2Normal; + GLboolean Map2TextureCoord1; + GLboolean Map2TextureCoord2; + GLboolean Map2TextureCoord3; + GLboolean Map2TextureCoord4; + GLboolean Map2Vertex3; + GLboolean Map2Vertex4; + GLboolean Map2Attrib[16]; + GLboolean AutoNormal; + + + + + + + GLint MapGrid1un; + GLfloat MapGrid1u1, MapGrid1u2, MapGrid1du; + GLint MapGrid2un, MapGrid2vn; + GLfloat MapGrid2u1, MapGrid2u2, MapGrid2du; + GLfloat MapGrid2v1, MapGrid2v2, MapGrid2dv; + +}; + + + + + +struct gl_fog_attrib +{ + GLboolean Enabled; + GLfloat ColorUnclamped[4]; + GLfloat Color[4]; + GLfloat Density; + GLfloat Start; + GLfloat End; + GLfloat Index; + GLenum Mode; + GLboolean ColorSumEnabled; + GLenum FogCoordinateSource; + GLfloat _Scale; +}; +# 883 "../../src/mesa/main/mtypes.h" +enum gl_frag_depth_layout { + FRAG_DEPTH_LAYOUT_NONE, + FRAG_DEPTH_LAYOUT_ANY, + FRAG_DEPTH_LAYOUT_GREATER, + FRAG_DEPTH_LAYOUT_LESS, + FRAG_DEPTH_LAYOUT_UNCHANGED +}; + + + + + + + +struct gl_hint_attrib +{ + GLenum PerspectiveCorrection; + GLenum PointSmooth; + GLenum LineSmooth; + GLenum PolygonSmooth; + GLenum Fog; + GLenum ClipVolumeClipping; + GLenum TextureCompression; + GLenum GenerateMipmap; + GLenum FragmentShaderDerivative; +}; +# 924 "../../src/mesa/main/mtypes.h" +struct gl_light_attrib +{ + struct gl_light Light[8]; + struct gl_lightmodel Model; + + + + + + struct gl_material Material; + + + GLboolean Enabled; + GLenum ShadeModel; + GLenum ProvokingVertex; + GLenum ColorMaterialFace; + GLenum ColorMaterialMode; + GLbitfield ColorMaterialBitmask; + GLboolean ColorMaterialEnabled; + GLenum ClampVertexColor; + GLboolean _ClampVertexColor; + + struct gl_light EnabledList; + + + + + + GLboolean _NeedEyeCoords; + GLboolean _NeedVertices; + GLbitfield _Flags; + GLfloat _BaseColor[2][3]; + +}; + + + + + +struct gl_line_attrib +{ + GLboolean SmoothFlag; + GLboolean StippleFlag; + GLushort StipplePattern; + GLint StippleFactor; + GLfloat Width; +}; + + + + + +struct gl_list_attrib +{ + GLuint ListBase; +}; + + + + + +struct gl_multisample_attrib +{ + GLboolean Enabled; + GLboolean _Enabled; + GLboolean SampleAlphaToCoverage; + GLboolean SampleAlphaToOne; + GLboolean SampleCoverage; + GLfloat SampleCoverageValue; + GLboolean SampleCoverageInvert; +}; + + + + + +struct gl_pixelmap +{ + GLint Size; + GLfloat Map[256]; + GLubyte Map8[256]; +}; + + + + + +struct gl_pixelmaps +{ + struct gl_pixelmap RtoR; + struct gl_pixelmap GtoG; + struct gl_pixelmap BtoB; + struct gl_pixelmap AtoA; + struct gl_pixelmap ItoR; + struct gl_pixelmap ItoG; + struct gl_pixelmap ItoB; + struct gl_pixelmap ItoA; + struct gl_pixelmap ItoI; + struct gl_pixelmap StoS; +}; + + + + + +struct gl_pixel_attrib +{ + GLenum ReadBuffer; + + + + + + + GLfloat RedBias, RedScale; + GLfloat GreenBias, GreenScale; + GLfloat BlueBias, BlueScale; + GLfloat AlphaBias, AlphaScale; + GLfloat DepthBias, DepthScale; + GLint IndexShift, IndexOffset; + + + + + GLboolean MapColorFlag; + GLboolean MapStencilFlag; + + + + + GLfloat ZoomX, ZoomY; +}; + + + + + +struct gl_point_attrib +{ + GLboolean SmoothFlag; + GLfloat Size; + GLfloat Params[3]; + GLfloat MinSize, MaxSize; + GLfloat Threshold; + GLboolean _Attenuated; + GLboolean PointSprite; + GLboolean CoordReplace[8]; + GLenum SpriteRMode; + GLenum SpriteOrigin; +}; + + + + + +struct gl_polygon_attrib +{ + GLenum FrontFace; + GLenum FrontMode; + GLenum BackMode; + GLboolean _FrontBit; + GLboolean CullFlag; + GLboolean SmoothFlag; + GLboolean StippleFlag; + GLenum CullFaceMode; + GLfloat OffsetFactor; + GLfloat OffsetUnits; + GLboolean OffsetPoint; + GLboolean OffsetLine; + GLboolean OffsetFill; +}; + + + + + +struct gl_scissor_attrib +{ + GLboolean Enabled; + GLint X, Y; + GLsizei Width, Height; +}; +# 1124 "../../src/mesa/main/mtypes.h" +struct gl_stencil_attrib +{ + GLboolean Enabled; + GLboolean TestTwoSide; + GLubyte ActiveFace; + GLboolean _Enabled; + GLboolean _TestTwoSide; + GLubyte _BackFace; + GLenum Function[3]; + GLenum FailFunc[3]; + GLenum ZPassFunc[3]; + GLenum ZFailFunc[3]; + GLint Ref[3]; + GLuint ValueMask[3]; + GLuint WriteMask[3]; + GLuint Clear; +}; + + + + + + + +typedef enum +{ + TEXTURE_BUFFER_INDEX, + TEXTURE_2D_ARRAY_INDEX, + TEXTURE_1D_ARRAY_INDEX, + TEXTURE_CUBE_INDEX, + TEXTURE_3D_INDEX, + TEXTURE_RECT_INDEX, + TEXTURE_2D_INDEX, + TEXTURE_1D_INDEX, + NUM_TEXTURE_TARGETS +} gl_texture_index; +# 1230 "../../src/mesa/main/mtypes.h" +typedef void (*FetchTexelFuncC)( const struct gl_texture_image *texImage, + GLint col, GLint row, GLint img, + GLchan *texelOut ); + + + + + + +typedef void (*FetchTexelFuncF)( const struct gl_texture_image *texImage, + GLint col, GLint row, GLint img, + GLfloat *texelOut ); + + +typedef void (*StoreTexelFunc)(struct gl_texture_image *texImage, + GLint col, GLint row, GLint img, + const void *texel); + + + + + + +struct gl_texture_image +{ + GLint InternalFormat; + GLenum _BaseFormat; + + + + + + gl_format TexFormat; + + GLuint Border; + GLuint Width; + GLuint Height; + GLuint Depth; + GLuint Width2; + GLuint Height2; + GLuint Depth2; + GLuint WidthLog2; + GLuint HeightLog2; + GLuint DepthLog2; + GLuint MaxLog2; + GLfloat WidthScale; + GLfloat HeightScale; + GLfloat DepthScale; + GLboolean IsClientData; + GLboolean _IsPowerOfTwo; + + struct gl_texture_object *TexObject; + + FetchTexelFuncC FetchTexelc; + FetchTexelFuncF FetchTexelf; + + GLuint RowStride; + GLuint *ImageOffsets; + + GLvoid *Data; + + + + + + void *DriverData; + +}; + + + + + +typedef enum +{ + FACE_POS_X = 0, + FACE_NEG_X = 1, + FACE_POS_Y = 2, + FACE_NEG_Y = 3, + FACE_POS_Z = 4, + FACE_NEG_Z = 5, + MAX_FACES = 6 +} gl_face_index; + + + + + + +struct gl_sampler_object +{ + GLuint Name; + GLint RefCount; + + GLenum WrapS; + GLenum WrapT; + GLenum WrapR; + GLenum MinFilter; + GLenum MagFilter; + union { + GLfloat f[4]; + GLuint ui[4]; + GLint i[4]; + } BorderColor; + GLfloat MinLod; + GLfloat MaxLod; + GLfloat LodBias; + GLfloat MaxAnisotropy; + GLenum CompareMode; + GLenum CompareFunc; + GLfloat CompareFailValue; + GLenum sRGBDecode; + GLboolean CubeMapSeamless; + + + GLenum DepthMode; + + + GLboolean _CompleteTexture; +}; + + + + + + + +struct gl_texture_object +{ + _glthread_Mutex Mutex; + GLint RefCount; + GLuint Name; + GLenum Target; + + struct gl_sampler_object Sampler; + + GLfloat Priority; + GLint BaseLevel; + GLint MaxLevel; + GLint _MaxLevel; + GLfloat _MaxLambda; + GLint CropRect[4]; + GLenum Swizzle[4]; + GLuint _Swizzle; + GLboolean GenerateMipmap; + GLboolean _Complete; + GLboolean _RenderToTexture; + GLboolean Purgeable; + + + struct gl_texture_image *Image[MAX_FACES][15]; + + + struct gl_buffer_object *BufferObject; + GLenum BufferObjectFormat; + + + struct gl_color_table Palette; +# 1396 "../../src/mesa/main/mtypes.h" + void *DriverData; +}; +# 1407 "../../src/mesa/main/mtypes.h" +struct gl_tex_env_combine_state +{ + GLenum ModeRGB; + GLenum ModeA; + + GLenum SourceRGB[4]; + GLenum SourceA[4]; + + GLenum OperandRGB[4]; + GLenum OperandA[4]; + GLuint ScaleShiftRGB; + GLuint ScaleShiftA; + GLuint _NumArgsRGB; + GLuint _NumArgsA; +}; + + + + + +struct gl_texgen +{ + GLenum Mode; + GLbitfield _ModeBit; + GLfloat ObjectPlane[4]; + GLfloat EyePlane[4]; +}; + + + + + + +struct gl_texture_unit +{ + GLbitfield Enabled; + GLbitfield _ReallyEnabled; + + GLenum EnvMode; + GLclampf EnvColor[4]; + GLfloat EnvColorUnclamped[4]; + + struct gl_texgen GenS; + struct gl_texgen GenT; + struct gl_texgen GenR; + struct gl_texgen GenQ; + GLbitfield TexGenEnabled; + GLbitfield _GenFlags; + + GLfloat LodBias; + GLenum BumpTarget; + GLfloat RotMatrix[4]; + + + struct gl_sampler_object *Sampler; + + + + + struct gl_tex_env_combine_state Combine; + + + + + + struct gl_tex_env_combine_state _EnvMode; + + + + + + struct gl_tex_env_combine_state *_CurrentCombine; + + + struct gl_texture_object *CurrentTex[NUM_TEXTURE_TARGETS]; + + + struct gl_texture_object *_Current; +}; + + + + + +struct gl_texture_attrib +{ + GLuint CurrentUnit; + struct gl_texture_unit Unit[(16 + 16)]; + + struct gl_texture_object *ProxyTex[NUM_TEXTURE_TARGETS]; + + + struct gl_buffer_object *BufferObject; + + + GLboolean CubeMapSeamless; + + + GLboolean SharedPalette; + struct gl_color_table Palette; + + + GLbitfield _EnabledUnits; + + + GLbitfield _EnabledCoordUnits; + + + GLbitfield _TexGenEnabled; + + + GLbitfield _TexMatEnabled; + + + GLbitfield _GenFlags; +}; + + + + + +struct gl_transform_attrib +{ + GLenum MatrixMode; + GLfloat EyeUserPlane[6][4]; + GLfloat _ClipUserPlane[6][4]; + GLbitfield ClipPlanesEnabled; + GLboolean Normalize; + GLboolean RescaleNormals; + GLboolean RasterPositionUnclipped; + GLboolean DepthClamp; + + GLfloat CullEyePos[4]; + GLfloat CullObjPos[4]; +}; + + + + + +struct gl_viewport_attrib +{ + GLint X, Y; + GLsizei Width, Height; + GLfloat Near, Far; + GLmatrix _WindowMap; +}; + + + + + +struct gl_buffer_object +{ + _glthread_Mutex Mutex; + GLint RefCount; + GLuint Name; + GLenum Usage; + GLsizeiptrARB Size; + GLubyte *Data; + + + GLbitfield AccessFlags; + GLvoid *Pointer; + GLintptr Offset; + GLsizeiptr Length; + + GLboolean Written; + GLboolean Purgeable; +}; + + + + + +struct gl_pixelstore_attrib +{ + GLint Alignment; + GLint RowLength; + GLint SkipPixels; + GLint SkipRows; + GLint ImageHeight; + GLint SkipImages; + GLboolean SwapBytes; + GLboolean LsbFirst; + GLboolean ClientStorage; + GLboolean Invert; + struct gl_buffer_object *BufferObj; +}; + + + + + +struct gl_client_array +{ + GLint Size; + GLenum Type; + GLenum Format; + GLsizei Stride; + GLsizei StrideB; + const GLubyte *Ptr; + GLboolean Enabled; + GLboolean Normalized; + GLboolean Integer; + GLuint InstanceDivisor; + GLuint _ElementSize; + + struct gl_buffer_object *BufferObj; + GLuint _MaxElement; +}; + + + + + + +struct gl_array_object +{ + + GLuint Name; + + GLint RefCount; + _glthread_Mutex Mutex; + GLboolean VBOonly; + + + + struct gl_client_array Vertex; + struct gl_client_array Weight; + struct gl_client_array Normal; + struct gl_client_array Color; + struct gl_client_array SecondaryColor; + struct gl_client_array FogCoord; + struct gl_client_array Index; + struct gl_client_array EdgeFlag; + struct gl_client_array TexCoord[8]; + struct gl_client_array PointSize; +# 1653 "../../src/mesa/main/mtypes.h" + struct gl_client_array VertexAttrib[16]; + + + GLbitfield _Enabled; + + + + + + GLuint _MaxElement; +}; + + + + + +struct gl_array_attrib +{ + + struct gl_array_object *ArrayObj; + + + struct gl_array_object *DefaultArrayObj; + + + struct _mesa_HashTable *Objects; + + GLint ActiveTexture; + GLuint LockFirst; + GLuint LockCount; + + + GLboolean PrimitiveRestart; + GLuint RestartIndex; + + GLbitfield NewState; + GLboolean RebindArrays; + + + struct gl_buffer_object *ArrayBufferObj; + struct gl_buffer_object *ElementArrayBufferObj; +}; + + + + + +struct gl_feedback +{ + GLenum Type; + GLbitfield _Mask; + GLfloat *Buffer; + GLuint BufferSize; + GLuint Count; +}; + + + + + +struct gl_selection +{ + GLuint *Buffer; + GLuint BufferSize; + GLuint BufferCount; + GLuint Hits; + GLuint NameStackDepth; + GLuint NameStack[64]; + GLboolean HitFlag; + GLfloat HitMinZ; + GLfloat HitMaxZ; +}; + + + + + +struct gl_1d_map +{ + GLuint Order; + GLfloat u1, u2, du; + GLfloat *Points; +}; + + + + + +struct gl_2d_map +{ + GLuint Uorder; + GLuint Vorder; + GLfloat u1, u2, du; + GLfloat v1, v2, dv; + GLfloat *Points; +}; + + + + + +struct gl_evaluators +{ + + + + + struct gl_1d_map Map1Vertex3; + struct gl_1d_map Map1Vertex4; + struct gl_1d_map Map1Index; + struct gl_1d_map Map1Color4; + struct gl_1d_map Map1Normal; + struct gl_1d_map Map1Texture1; + struct gl_1d_map Map1Texture2; + struct gl_1d_map Map1Texture3; + struct gl_1d_map Map1Texture4; + struct gl_1d_map Map1Attrib[16]; + + + + + + + struct gl_2d_map Map2Vertex3; + struct gl_2d_map Map2Vertex4; + struct gl_2d_map Map2Index; + struct gl_2d_map Map2Color4; + struct gl_2d_map Map2Normal; + struct gl_2d_map Map2Texture1; + struct gl_2d_map Map2Texture2; + struct gl_2d_map Map2Texture3; + struct gl_2d_map Map2Texture4; + struct gl_2d_map Map2Attrib[16]; + +}; +# 1801 "../../src/mesa/main/mtypes.h" +typedef enum +{ + PROGRAM_TEMPORARY, + PROGRAM_INPUT, + PROGRAM_OUTPUT, + PROGRAM_VARYING, + PROGRAM_LOCAL_PARAM, + PROGRAM_ENV_PARAM, + PROGRAM_STATE_VAR, + PROGRAM_NAMED_PARAM, + PROGRAM_CONSTANT, + PROGRAM_UNIFORM, + PROGRAM_WRITE_ONLY, + PROGRAM_ADDRESS, + PROGRAM_SAMPLER, + PROGRAM_SYSTEM_VALUE, + PROGRAM_UNDEFINED, + PROGRAM_FILE_MAX +} gl_register_file; + + + + + + +typedef enum +{ + SYSTEM_VALUE_FRONT_FACE, + SYSTEM_VALUE_INSTANCE_ID, + SYSTEM_VALUE_MAX +} gl_system_value; + + + +struct prog_instruction; +struct gl_program_parameter_list; +struct gl_uniform_list; + + + + + +struct gl_program +{ + GLuint Id; + GLubyte *String; + GLint RefCount; + GLenum Target; + GLenum Format; + GLboolean Resident; + + struct prog_instruction *Instructions; + + GLbitfield InputsRead; + GLbitfield64 OutputsWritten; + GLbitfield SystemValuesRead; + GLbitfield InputFlags[32]; + GLbitfield OutputFlags[64]; + GLbitfield TexturesUsed[((8 > 16) ? 8 : 16)]; + GLbitfield SamplersUsed; + GLbitfield ShadowSamplers; + + + + struct gl_program_parameter_list *Parameters; + + GLfloat LocalParams[1024][4]; + + + struct gl_program_parameter_list *Varying; + + struct gl_program_parameter_list *Attributes; + + + GLubyte SamplerUnits[16]; + + gl_texture_index SamplerTargets[16]; + + + + + GLbitfield IndirectRegisterFiles; + + + + GLuint NumInstructions; + GLuint NumTemporaries; + GLuint NumParameters; + GLuint NumAttributes; + GLuint NumAddressRegs; + GLuint NumAluInstructions; + GLuint NumTexInstructions; + GLuint NumTexIndirections; + + + + GLuint NumNativeInstructions; + GLuint NumNativeTemporaries; + GLuint NumNativeParameters; + GLuint NumNativeAttributes; + GLuint NumNativeAddressRegs; + GLuint NumNativeAluInstructions; + GLuint NumNativeTexInstructions; + GLuint NumNativeTexIndirections; + +}; + + + +struct gl_vertex_program +{ + struct gl_program Base; + GLboolean IsNVProgram; + GLboolean IsPositionInvariant; +}; + + + +struct gl_geometry_program +{ + struct gl_program Base; + + GLint VerticesOut; + GLenum InputType; + + GLenum OutputType; +}; + + + +struct gl_fragment_program +{ + struct gl_program Base; + GLboolean UsesKill; + GLboolean OriginUpperLeft; + GLboolean PixelCenterInteger; + enum gl_frag_depth_layout FragDepthLayout; +}; + + + + + +struct gl_program_state +{ + GLint ErrorPos; + const char *ErrorString; +}; + + + + + +struct gl_vertex_program_state +{ + GLboolean Enabled; + GLboolean _Enabled; + GLboolean PointSizeEnabled; + GLboolean TwoSideEnabled; + struct gl_vertex_program *Current; + + + + + + struct gl_vertex_program *_Current; + + GLfloat Parameters[256][4]; + + + GLenum TrackMatrix[256 / 4]; + GLenum TrackMatrixTransform[256 / 4]; + + + GLboolean _MaintainTnlProgram; + + + struct gl_vertex_program *_TnlProgram; + + + struct gl_program_cache *Cache; + + GLboolean _Overriden; +}; + + + + + +struct gl_geometry_program_state +{ + GLboolean Enabled; + GLboolean _Enabled; + struct gl_geometry_program *Current; + + + + + struct gl_geometry_program *_Current; + + GLfloat Parameters[256][4]; + + + struct gl_program_cache *Cache; +}; + + + + +struct gl_fragment_program_state +{ + GLboolean Enabled; + GLboolean _Enabled; + struct gl_fragment_program *Current; + + + + + + struct gl_fragment_program *_Current; + + GLfloat Parameters[256][4]; + + + GLboolean _MaintainTexEnvProgram; + + + struct gl_fragment_program *_TexEnvProgram; + + + struct gl_program_cache *Cache; +}; +# 2041 "../../src/mesa/main/mtypes.h" +struct atifs_instruction; +struct atifs_setupinst; + + + + +struct ati_fragment_shader +{ + GLuint Id; + GLint RefCount; + struct atifs_instruction *Instructions[2]; + struct atifs_setupinst *SetupInst[2]; + GLfloat Constants[8][4]; + GLbitfield LocalConstDef; + GLubyte numArithInstr[2]; + GLubyte regsAssigned[2]; + GLubyte NumPasses; + GLubyte cur_pass; + GLubyte last_optype; + GLboolean interpinp1; + GLboolean isValid; + GLuint swizzlerq; +}; + + + + +struct gl_ati_fragment_shader_state +{ + GLboolean Enabled; + GLboolean _Enabled; + GLboolean Compiling; + GLfloat GlobalConstants[8][4]; + struct ati_fragment_shader *Current; +}; + + + + + +struct gl_query_object +{ + GLenum Target; + GLuint Id; + GLuint64EXT Result; + GLboolean Active; + GLboolean Ready; +}; + + + + + +struct gl_query_state +{ + struct _mesa_HashTable *QueryObjects; + struct gl_query_object *CurrentOcclusionObject; + struct gl_query_object *CurrentTimerObject; + + + struct gl_query_object *CondRenderQuery; + + + struct gl_query_object *PrimitivesGenerated; + struct gl_query_object *PrimitivesWritten; + + + struct gl_query_object *TimeElapsed; + + GLenum CondRenderMode; +}; + + + +struct gl_sync_object { + struct simple_node link; + GLenum Type; + GLuint Name; + GLint RefCount; + GLboolean DeletePending; + + + GLenum SyncCondition; + GLbitfield Flags; + GLuint StatusFlag:1; +}; + + + +struct gl_sl_pragmas +{ + GLboolean IgnoreOptimize; + GLboolean IgnoreDebug; + GLboolean Optimize; + GLboolean Debug; +}; + + + + + +struct gl_shader +{ + GLenum Type; + GLuint Name; + GLint RefCount; + GLboolean DeletePending; + GLboolean CompileStatus; + const GLchar *Source; + GLuint SourceChecksum; + struct gl_program *Program; + GLchar *InfoLog; + struct gl_sl_pragmas Pragmas; + + unsigned Version; + + struct exec_list *ir; + struct glsl_symbol_table *symbols; + + + struct gl_shader *builtins_to_link[16]; + unsigned num_builtins_to_link; +}; + + + + + + +struct gl_shader_program +{ + GLenum Type; + GLuint Name; + GLint RefCount; + GLboolean DeletePending; + + GLuint NumShaders; + struct gl_shader **Shaders; + + + struct gl_program_parameter_list *Attributes; + + + struct { + GLenum BufferMode; + GLuint NumVarying; + GLchar **VaryingNames; + } TransformFeedback; + + + struct { + GLint VerticesOut; + GLenum InputType; + + GLenum OutputType; + } Geom; + + + struct gl_vertex_program *VertexProgram; + struct gl_fragment_program *FragmentProgram; + struct gl_geometry_program *GeometryProgram; + struct gl_uniform_list *Uniforms; + struct gl_program_parameter_list *Varying; + GLboolean LinkStatus; + GLboolean Validated; + GLboolean _Used; + GLchar *InfoLog; + + unsigned Version; +# 2218 "../../src/mesa/main/mtypes.h" + struct gl_shader *_LinkedShaders[MESA_SHADER_TYPES]; +}; +# 2235 "../../src/mesa/main/mtypes.h" +struct gl_shader_state +{ + + + + + + + + struct gl_shader_program *CurrentVertexProgram; + struct gl_shader_program *CurrentGeometryProgram; + struct gl_shader_program *CurrentFragmentProgram; + + + + + + + struct gl_shader_program *ActiveProgram; + + void *MemPool; + + GLbitfield Flags; +}; + + + + +struct gl_shader_compiler_options +{ + + GLboolean EmitCondCodes; + GLboolean EmitNVTempInitialization; + + + + + GLboolean EmitNoIfs; + GLboolean EmitNoLoops; + GLboolean EmitNoFunctions; + GLboolean EmitNoCont; + GLboolean EmitNoMainReturn; + GLboolean EmitNoNoise; + GLboolean EmitNoPow; + + + + + + GLboolean EmitNoIndirectInput; + GLboolean EmitNoIndirectOutput; + GLboolean EmitNoIndirectTemp; + GLboolean EmitNoIndirectUniform; + + + GLuint MaxUnrollIterations; + + struct gl_sl_pragmas DefaultPragmas; +}; + + + + +struct gl_transform_feedback_object +{ + GLuint Name; + GLint RefCount; + GLboolean Active; + GLboolean Paused; + + + GLuint BufferNames[32]; + struct gl_buffer_object *Buffers[32]; + + + GLintptr Offset[32]; + + GLsizeiptr Size[32]; +}; + + + + + +struct gl_transform_feedback +{ + GLenum Mode; + + GLboolean RasterDiscard; + + + struct gl_buffer_object *CurrentBuffer; + + + struct _mesa_HashTable *Objects; + + + struct gl_transform_feedback_object *CurrentObject; + + + struct gl_transform_feedback_object *DefaultObject; +}; + + + + + + +struct gl_shared_state +{ + _glthread_Mutex Mutex; + GLint RefCount; + struct _mesa_HashTable *DisplayList; + struct _mesa_HashTable *TexObjects; + + + struct gl_texture_object *DefaultTex[NUM_TEXTURE_TARGETS]; + + + struct gl_texture_object *FallbackTex; +# 2363 "../../src/mesa/main/mtypes.h" + _glthread_Mutex TexMutex; + GLuint TextureStateStamp; + + + + struct gl_buffer_object *NullBufferObj; + + + + + + struct _mesa_HashTable *Programs; + struct gl_vertex_program *DefaultVertexProgram; + struct gl_fragment_program *DefaultFragmentProgram; + struct gl_geometry_program *DefaultGeometryProgram; + + + + struct _mesa_HashTable *ATIShaders; + struct ati_fragment_shader *DefaultFragmentShader; + + struct _mesa_HashTable *BufferObjects; + + + struct _mesa_HashTable *ShaderObjects; + + + struct _mesa_HashTable *RenderBuffers; + struct _mesa_HashTable *FrameBuffers; + + + struct simple_node SyncObjects; + + + struct _mesa_HashTable *SamplerObjects; + + void *DriverData; +}; +# 2414 "../../src/mesa/main/mtypes.h" +struct gl_renderbuffer +{ + _glthread_Mutex Mutex; + GLuint ClassID; + GLuint Name; + GLint RefCount; + GLuint Width, Height; + GLint RowStride; + GLboolean Purgeable; + + GLboolean AttachedAnytime; + + GLubyte NumSamples; + + GLenum InternalFormat; + GLenum _BaseFormat; + + gl_format Format; + + GLenum DataType; + GLvoid *Data; + + + struct gl_renderbuffer *Wrapped; + + + void (*Delete)(struct gl_renderbuffer *rb); + + + GLboolean (*AllocStorage)(struct gl_context *ctx, struct gl_renderbuffer *rb, + GLenum internalFormat, + GLuint width, GLuint height); +# 2456 "../../src/mesa/main/mtypes.h" + void *(*GetPointer)(struct gl_context *ctx, struct gl_renderbuffer *rb, + GLint x, GLint y); + + + + + void (*GetRow)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, + GLint x, GLint y, void *values); + + + + + void (*GetValues)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, + const GLint x[], const GLint y[], void *values); + + + + + void (*PutRow)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, + GLint x, GLint y, const void *values, const GLubyte *mask); + + + + + + + void (*PutRowRGB)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, + GLint x, GLint y, const void *values, const GLubyte *mask); + + + + + + void (*PutMonoRow)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, + GLint x, GLint y, const void *value, const GLubyte *mask); + + + + + void (*PutValues)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, + const GLint x[], const GLint y[], const void *values, + const GLubyte *mask); + + + + void (*PutMonoValues)(struct gl_context *ctx, struct gl_renderbuffer *rb, + GLuint count, const GLint x[], const GLint y[], + const void *value, const GLubyte *mask); +}; + + + + + + +struct gl_renderbuffer_attachment +{ + GLenum Type; + GLboolean Complete; + + + + + + struct gl_renderbuffer *Renderbuffer; + + + + + + struct gl_texture_object *Texture; + GLuint TextureLevel; + GLuint CubeMapFace; + GLuint Zoffset; + +}; + + + + + + + +struct gl_framebuffer +{ + _glthread_Mutex Mutex; + + + + + + + + GLuint Name; + + GLint RefCount; + GLboolean DeletePending; + + + + + + struct gl_config Visual; + + GLboolean Initialized; + + GLuint Width, Height; + + + + GLint _Xmin, _Xmax; + GLint _Ymin, _Ymax; + + + + + GLuint _DepthMax; + GLfloat _DepthMaxF; + GLfloat _MRD; + + + + GLenum _Status; + + + GLboolean _IntegerColor; + + + struct gl_renderbuffer_attachment Attachment[BUFFER_COUNT]; + + + + + GLenum ColorDrawBuffer[8]; + GLenum ColorReadBuffer; + + + GLuint _NumColorDrawBuffers; + GLint _ColorDrawBufferIndexes[8]; + GLint _ColorReadBufferIndex; + struct gl_renderbuffer *_ColorDrawBuffers[8]; + struct gl_renderbuffer *_ColorReadBuffer; + + + + struct gl_renderbuffer *_DepthBuffer; + struct gl_renderbuffer *_StencilBuffer; + + + void (*Delete)(struct gl_framebuffer *fb); +}; + + + + + +struct gl_precision +{ + GLushort RangeMin; + GLushort RangeMax; + GLushort Precision; +}; + + + + + +struct gl_program_constants +{ + + GLuint MaxInstructions; + GLuint MaxAluInstructions; + GLuint MaxTexInstructions; + GLuint MaxTexIndirections; + GLuint MaxAttribs; + GLuint MaxTemps; + GLuint MaxAddressRegs; + GLuint MaxAddressOffset; + GLuint MaxParameters; + GLuint MaxLocalParams; + GLuint MaxEnvParams; + + GLuint MaxNativeInstructions; + GLuint MaxNativeAluInstructions; + GLuint MaxNativeTexInstructions; + GLuint MaxNativeTexIndirections; + GLuint MaxNativeAttribs; + GLuint MaxNativeTemps; + GLuint MaxNativeAddressRegs; + GLuint MaxNativeParameters; + + GLuint MaxUniformComponents; + + struct gl_precision LowFloat, MediumFloat, HighFloat; + struct gl_precision LowInt, MediumInt, HighInt; +}; + + + + + + +struct gl_constants +{ + GLint MaxTextureMbytes; + GLint MaxTextureLevels; + GLint Max3DTextureLevels; + GLint MaxCubeTextureLevels; + GLint MaxArrayTextureLayers; + GLint MaxTextureRectSize; + GLuint MaxTextureCoordUnits; + GLuint MaxTextureImageUnits; + GLuint MaxVertexTextureImageUnits; + GLuint MaxCombinedTextureImageUnits; + GLuint MaxGeometryTextureImageUnits; + GLuint MaxTextureUnits; + GLfloat MaxTextureMaxAnisotropy; + GLfloat MaxTextureLodBias; + GLuint MaxTextureBufferSize; + + GLuint MaxArrayLockSize; + + GLint SubPixelBits; + + GLfloat MinPointSize, MaxPointSize; + GLfloat MinPointSizeAA, MaxPointSizeAA; + GLfloat PointSizeGranularity; + GLfloat MinLineWidth, MaxLineWidth; + GLfloat MinLineWidthAA, MaxLineWidthAA; + GLfloat LineWidthGranularity; + + GLuint MaxColorTableSize; + + GLuint MaxClipPlanes; + GLuint MaxLights; + GLfloat MaxShininess; + GLfloat MaxSpotExponent; + + GLuint MaxViewportWidth, MaxViewportHeight; + + struct gl_program_constants VertexProgram; + struct gl_program_constants FragmentProgram; + struct gl_program_constants GeometryProgram; + GLuint MaxProgramMatrices; + GLuint MaxProgramMatrixStackDepth; + + + GLboolean CheckArrayBounds; + + GLuint MaxDrawBuffers; + + GLuint MaxColorAttachments; + GLuint MaxRenderbufferSize; + GLuint MaxSamples; + + + GLuint MaxVarying; + GLuint MaxVertexVaryingComponents; + GLuint MaxGeometryVaryingComponents; + + + GLuint MaxGeometryOutputVertices; + GLuint MaxGeometryTotalOutputComponents; + + GLuint GLSLVersion; + + + GLbitfield SupportedBumpUnits; + + + + + GLuint64 MaxServerWaitTimeout; + + + GLboolean QuadsFollowProvokingVertexConvention; + + + GLbitfield ContextFlags; + + + GLbitfield ProfileMask; + + + GLuint MaxTransformFeedbackSeparateAttribs; + GLuint MaxTransformFeedbackSeparateComponents; + GLuint MaxTransformFeedbackInterleavedComponents; + + + GLint MinProgramTexelOffset, MaxProgramTexelOffset; + + + GLboolean sRGBCapable; + + + GLenum ResetStrategy; +}; + + + + + + +struct gl_extensions +{ + GLboolean dummy; + GLboolean dummy_true; + GLboolean dummy_false; + GLboolean ARB_ES2_compatibility; + GLboolean ARB_blend_func_extended; + GLboolean ARB_color_buffer_float; + GLboolean ARB_copy_buffer; + GLboolean ARB_depth_buffer_float; + GLboolean ARB_depth_clamp; + GLboolean ARB_depth_texture; + GLboolean ARB_draw_buffers; + GLboolean ARB_draw_buffers_blend; + GLboolean ARB_draw_elements_base_vertex; + GLboolean ARB_draw_instanced; + GLboolean ARB_fragment_coord_conventions; + GLboolean ARB_fragment_program; + GLboolean ARB_fragment_program_shadow; + GLboolean ARB_fragment_shader; + GLboolean ARB_framebuffer_object; + GLboolean ARB_explicit_attrib_location; + GLboolean ARB_geometry_shader4; + GLboolean ARB_half_float_pixel; + GLboolean ARB_half_float_vertex; + GLboolean ARB_instanced_arrays; + GLboolean ARB_map_buffer_range; + GLboolean ARB_multisample; + GLboolean ARB_multitexture; + GLboolean ARB_occlusion_query; + GLboolean ARB_occlusion_query2; + GLboolean ARB_point_sprite; + GLboolean ARB_sampler_objects; + GLboolean ARB_seamless_cube_map; + GLboolean ARB_shader_objects; + GLboolean ARB_shader_stencil_export; + GLboolean ARB_shader_texture_lod; + GLboolean ARB_shading_language_100; + GLboolean ARB_shadow; + GLboolean ARB_shadow_ambient; + GLboolean ARB_sync; + GLboolean ARB_texture_border_clamp; + GLboolean ARB_texture_buffer_object; + GLboolean ARB_texture_compression; + GLboolean ARB_texture_compression_rgtc; + GLboolean ARB_texture_cube_map; + GLboolean ARB_texture_env_combine; + GLboolean ARB_texture_env_crossbar; + GLboolean ARB_texture_env_dot3; + GLboolean ARB_texture_float; + GLboolean ARB_texture_mirrored_repeat; + GLboolean ARB_texture_multisample; + GLboolean ARB_texture_non_power_of_two; + GLboolean ARB_texture_rg; + GLboolean ARB_texture_rgb10_a2ui; + GLboolean ARB_timer_query; + GLboolean ARB_transform_feedback2; + GLboolean ARB_transpose_matrix; + GLboolean ARB_uniform_buffer_object; + GLboolean ARB_vertex_array_object; + GLboolean ARB_vertex_buffer_object; + GLboolean ARB_vertex_program; + GLboolean ARB_vertex_shader; + GLboolean ARB_vertex_type_2_10_10_10_rev; + GLboolean ARB_window_pos; + GLboolean EXT_abgr; + GLboolean EXT_bgra; + GLboolean EXT_blend_color; + GLboolean EXT_blend_equation_separate; + GLboolean EXT_blend_func_separate; + GLboolean EXT_blend_logic_op; + GLboolean EXT_blend_minmax; + GLboolean EXT_blend_subtract; + GLboolean EXT_clip_volume_hint; + GLboolean EXT_compiled_vertex_array; + GLboolean EXT_copy_texture; + GLboolean EXT_depth_bounds_test; + GLboolean EXT_draw_buffers2; + GLboolean EXT_draw_range_elements; + GLboolean EXT_fog_coord; + GLboolean EXT_framebuffer_blit; + GLboolean EXT_framebuffer_multisample; + GLboolean EXT_framebuffer_object; + GLboolean EXT_framebuffer_sRGB; + GLboolean EXT_gpu_program_parameters; + GLboolean EXT_gpu_shader4; + GLboolean EXT_multi_draw_arrays; + GLboolean EXT_paletted_texture; + GLboolean EXT_packed_depth_stencil; + GLboolean EXT_packed_float; + GLboolean EXT_packed_pixels; + GLboolean EXT_pixel_buffer_object; + GLboolean EXT_point_parameters; + GLboolean EXT_polygon_offset; + GLboolean EXT_provoking_vertex; + GLboolean EXT_rescale_normal; + GLboolean EXT_shadow_funcs; + GLboolean EXT_secondary_color; + GLboolean EXT_separate_shader_objects; + GLboolean EXT_separate_specular_color; + GLboolean EXT_shared_texture_palette; + GLboolean EXT_stencil_wrap; + GLboolean EXT_stencil_two_side; + GLboolean EXT_subtexture; + GLboolean EXT_texture; + GLboolean EXT_texture_object; + GLboolean EXT_texture3D; + GLboolean EXT_texture_array; + GLboolean EXT_texture_compression_latc; + GLboolean EXT_texture_compression_s3tc; + GLboolean EXT_texture_env_add; + GLboolean EXT_texture_env_combine; + GLboolean EXT_texture_env_dot3; + GLboolean EXT_texture_filter_anisotropic; + GLboolean EXT_texture_integer; + GLboolean EXT_texture_lod_bias; + GLboolean EXT_texture_mirror_clamp; + GLboolean EXT_texture_shared_exponent; + GLboolean EXT_texture_snorm; + GLboolean EXT_texture_sRGB; + GLboolean EXT_texture_sRGB_decode; + GLboolean EXT_texture_swizzle; + GLboolean EXT_transform_feedback; + GLboolean EXT_timer_query; + GLboolean EXT_vertex_array; + GLboolean EXT_vertex_array_bgra; + GLboolean EXT_vertex_array_set; + GLboolean OES_standard_derivatives; + + GLboolean AMD_conservative_depth; + GLboolean AMD_seamless_cubemap_per_texture; + GLboolean APPLE_client_storage; + GLboolean APPLE_packed_pixels; + GLboolean APPLE_vertex_array_object; + GLboolean APPLE_object_purgeable; + GLboolean ATI_envmap_bumpmap; + GLboolean ATI_texture_compression_3dc; + GLboolean ATI_texture_mirror_once; + GLboolean ATI_texture_env_combine3; + GLboolean ATI_fragment_shader; + GLboolean ATI_separate_stencil; + GLboolean IBM_rasterpos_clip; + GLboolean IBM_multimode_draw_arrays; + GLboolean MESA_pack_invert; + GLboolean MESA_resize_buffers; + GLboolean MESA_ycbcr_texture; + GLboolean MESA_texture_array; + GLboolean NV_blend_square; + GLboolean NV_conditional_render; + GLboolean NV_fragment_program; + GLboolean NV_fragment_program_option; + GLboolean NV_light_max_exponent; + GLboolean NV_point_sprite; + GLboolean NV_primitive_restart; + GLboolean NV_texture_barrier; + GLboolean NV_texgen_reflection; + GLboolean NV_texture_env_combine4; + GLboolean NV_texture_rectangle; + GLboolean NV_vertex_program; + GLboolean NV_vertex_program1_1; + GLboolean OES_read_format; + GLboolean SGIS_generate_mipmap; + GLboolean SGIS_texture_edge_clamp; + GLboolean SGIS_texture_lod; + GLboolean TDFX_texture_compression_FXT1; + GLboolean S3_s3tc; + GLboolean OES_EGL_image; + GLboolean OES_draw_texture; + GLboolean EXT_texture_format_BGRA8888; + GLboolean extension_sentinel; + + const GLubyte *String; + + GLuint Count; +}; + + + + + +struct gl_matrix_stack +{ + GLmatrix *Top; + GLmatrix *Stack; + GLuint Depth; + GLuint MaxDepth; + GLuint DirtyFlag; +}; +# 3094 "../../src/mesa/main/mtypes.h" +# 1 "../../src/mesa/main/dd.h" 1 +# 38 "../../src/mesa/main/dd.h" +struct gl_buffer_object; +struct gl_context; +struct gl_display_list; +struct gl_framebuffer; +struct gl_pixelstore_attrib; +struct gl_program; +struct gl_renderbuffer; +struct gl_renderbuffer_attachment; +struct gl_shader; +struct gl_shader_program; +struct gl_texture_image; +struct gl_texture_object; +# 79 "../../src/mesa/main/dd.h" +struct dd_function_table { + + + + + + const GLubyte * (*GetString)( struct gl_context *ctx, GLenum name ); + + + + + + + + void (*UpdateState)( struct gl_context *ctx, GLbitfield new_state ); + + + + + + + + void (*GetBufferSize)( struct gl_framebuffer *buffer, + GLuint *width, GLuint *height ); + + + + + + void (*ResizeBuffers)( struct gl_context *ctx, struct gl_framebuffer *fb, + GLuint width, GLuint height); + + + + + + void (*Error)( struct gl_context *ctx ); + + + + + void (*Finish)( struct gl_context *ctx ); + + + + + void (*Flush)( struct gl_context *ctx ); + + + + + + + void (*Clear)( struct gl_context *ctx, GLbitfield buffers ); + + + + + void (*Accum)( struct gl_context *ctx, GLenum op, GLfloat value ); + + + + + + void (*RasterPos)( struct gl_context *ctx, const GLfloat v[4] ); +# 154 "../../src/mesa/main/dd.h" + void (*DrawPixels)( struct gl_context *ctx, + GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *unpack, + const GLvoid *pixels ); + + + + + void (*ReadPixels)( struct gl_context *ctx, + GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *unpack, + GLvoid *dest ); + + + + + void (*CopyPixels)( struct gl_context *ctx, GLint srcx, GLint srcy, + GLsizei width, GLsizei height, + GLint dstx, GLint dsty, GLenum type ); + + + + + void (*Bitmap)( struct gl_context *ctx, + GLint x, GLint y, GLsizei width, GLsizei height, + const struct gl_pixelstore_attrib *unpack, + const GLubyte *bitmap ); +# 198 "../../src/mesa/main/dd.h" + GLuint (*ChooseTextureFormat)( struct gl_context *ctx, GLint internalFormat, + GLenum srcFormat, GLenum srcType ); +# 218 "../../src/mesa/main/dd.h" + void (*TexImage1D)( struct gl_context *ctx, GLenum target, GLint level, + GLint internalFormat, + GLint width, GLint border, + GLenum format, GLenum type, const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + + + + + + + void (*TexImage2D)( struct gl_context *ctx, GLenum target, GLint level, + GLint internalFormat, + GLint width, GLint height, GLint border, + GLenum format, GLenum type, const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + + + + + + + void (*TexImage3D)( struct gl_context *ctx, GLenum target, GLint level, + GLint internalFormat, + GLint width, GLint height, GLint depth, GLint border, + GLenum format, GLenum type, const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); +# 273 "../../src/mesa/main/dd.h" + void (*TexSubImage1D)( struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, GLsizei width, + GLenum format, GLenum type, + const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + + + + + + + void (*TexSubImage2D)( struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + + + + + + + void (*TexSubImage3D)( struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, GLint depth, + GLenum format, GLenum type, + const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + + + + + void (*GetTexImage)( struct gl_context *ctx, GLenum target, GLint level, + GLenum format, GLenum type, GLvoid *pixels, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + + + + + + + void (*CopyTexImage1D)( struct gl_context *ctx, GLenum target, GLint level, + GLenum internalFormat, GLint x, GLint y, + GLsizei width, GLint border ); + + + + + + + void (*CopyTexImage2D)( struct gl_context *ctx, GLenum target, GLint level, + GLenum internalFormat, GLint x, GLint y, + GLsizei width, GLsizei height, GLint border ); + + + + + + + void (*CopyTexSubImage1D)( struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, + GLint x, GLint y, GLsizei width ); + + + + + + void (*CopyTexSubImage2D)( struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint x, GLint y, + GLsizei width, GLsizei height ); + + + + + + void (*CopyTexSubImage3D)( struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, + GLint x, GLint y, + GLsizei width, GLsizei height ); + + + + + void (*GenerateMipmap)(struct gl_context *ctx, GLenum target, + struct gl_texture_object *texObj); + + + + + + + + GLboolean (*TestProxyTexImage)(struct gl_context *ctx, GLenum target, + GLint level, GLint internalFormat, + GLenum format, GLenum type, + GLint width, GLint height, + GLint depth, GLint border); +# 402 "../../src/mesa/main/dd.h" + void (*CompressedTexImage1D)( struct gl_context *ctx, GLenum target, + GLint level, GLint internalFormat, + GLsizei width, GLint border, + GLsizei imageSize, const GLvoid *data, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + + + + + + void (*CompressedTexImage2D)( struct gl_context *ctx, GLenum target, + GLint level, GLint internalFormat, + GLsizei width, GLsizei height, GLint border, + GLsizei imageSize, const GLvoid *data, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + + + + + + void (*CompressedTexImage3D)( struct gl_context *ctx, GLenum target, + GLint level, GLint internalFormat, + GLsizei width, GLsizei height, GLsizei depth, + GLint border, + GLsizei imageSize, const GLvoid *data, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); +# 449 "../../src/mesa/main/dd.h" + void (*CompressedTexSubImage1D)(struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, GLsizei width, + GLenum format, + GLsizei imageSize, const GLvoid *data, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage); + + + + + + void (*CompressedTexSubImage2D)(struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLint height, + GLenum format, + GLsizei imageSize, const GLvoid *data, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage); + + + + + + void (*CompressedTexSubImage3D)(struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLint height, GLint depth, + GLenum format, + GLsizei imageSize, const GLvoid *data, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage); + + + + + + void (*GetCompressedTexImage)(struct gl_context *ctx, GLenum target, GLint level, + GLvoid *img, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage); +# 499 "../../src/mesa/main/dd.h" + void (*BindTexture)( struct gl_context *ctx, GLenum target, + struct gl_texture_object *tObj ); + + + + + + + struct gl_texture_object * (*NewTextureObject)( struct gl_context *ctx, GLuint name, + GLenum target ); + + + + + + + void (*DeleteTexture)( struct gl_context *ctx, struct gl_texture_object *tObj ); + + + + + struct gl_texture_image * (*NewTextureImage)( struct gl_context *ctx ); + + + + + void (*FreeTexImageData)( struct gl_context *ctx, struct gl_texture_image *tImage ); + + + void (*MapTexture)( struct gl_context *ctx, struct gl_texture_object *tObj ); + + void (*UnmapTexture)( struct gl_context *ctx, struct gl_texture_object *tObj ); +# 543 "../../src/mesa/main/dd.h" + void* (*TextureMemCpy)( void *to, const void *from, size_t sz ); + + + + + GLboolean (*IsTextureResident)( struct gl_context *ctx, + struct gl_texture_object *t ); + + + + + + + + void (*UpdateTexturePalette)( struct gl_context *ctx, + struct gl_texture_object *tObj ); + + + + + + + + void (*CopyColorTable)( struct gl_context *ctx, + GLenum target, GLenum internalformat, + GLint x, GLint y, GLsizei width ); + + void (*CopyColorSubTable)( struct gl_context *ctx, + GLenum target, GLsizei start, + GLint x, GLint y, GLsizei width ); +# 581 "../../src/mesa/main/dd.h" + void (*BindProgram)(struct gl_context *ctx, GLenum target, struct gl_program *prog); + + struct gl_program * (*NewProgram)(struct gl_context *ctx, GLenum target, GLuint id); + + void (*DeleteProgram)(struct gl_context *ctx, struct gl_program *prog); + + + + + + GLboolean (*ProgramStringNotify)(struct gl_context *ctx, GLenum target, + struct gl_program *prog); + + + GLboolean (*IsProgramNative)(struct gl_context *ctx, GLenum target, + struct gl_program *prog); +# 610 "../../src/mesa/main/dd.h" + GLboolean (*LinkShader)(struct gl_context *ctx, struct gl_shader_program *shader); +# 624 "../../src/mesa/main/dd.h" + void (*AlphaFunc)(struct gl_context *ctx, GLenum func, GLfloat ref); + + void (*BlendColor)(struct gl_context *ctx, const GLfloat color[4]); + + void (*BlendEquationSeparate)(struct gl_context *ctx, GLenum modeRGB, GLenum modeA); + void (*BlendEquationSeparatei)(struct gl_context *ctx, GLuint buffer, + GLenum modeRGB, GLenum modeA); + + void (*BlendFuncSeparate)(struct gl_context *ctx, + GLenum sfactorRGB, GLenum dfactorRGB, + GLenum sfactorA, GLenum dfactorA); + void (*BlendFuncSeparatei)(struct gl_context *ctx, GLuint buffer, + GLenum sfactorRGB, GLenum dfactorRGB, + GLenum sfactorA, GLenum dfactorA); + + void (*ClearColor)(struct gl_context *ctx, const GLfloat color[4]); + + void (*ClearDepth)(struct gl_context *ctx, GLclampd d); + + void (*ClearStencil)(struct gl_context *ctx, GLint s); + + void (*ClipPlane)(struct gl_context *ctx, GLenum plane, const GLfloat *equation ); + + void (*ColorMask)(struct gl_context *ctx, GLboolean rmask, GLboolean gmask, + GLboolean bmask, GLboolean amask ); + void (*ColorMaskIndexed)(struct gl_context *ctx, GLuint buf, GLboolean rmask, + GLboolean gmask, GLboolean bmask, GLboolean amask); + + void (*ColorMaterial)(struct gl_context *ctx, GLenum face, GLenum mode); + + void (*CullFace)(struct gl_context *ctx, GLenum mode); + + void (*FrontFace)(struct gl_context *ctx, GLenum mode); + + void (*DepthFunc)(struct gl_context *ctx, GLenum func); + + void (*DepthMask)(struct gl_context *ctx, GLboolean flag); + + void (*DepthRange)(struct gl_context *ctx, GLclampd nearval, GLclampd farval); + + void (*DrawBuffer)( struct gl_context *ctx, GLenum buffer ); + + void (*DrawBuffers)( struct gl_context *ctx, GLsizei n, const GLenum *buffers ); + + void (*Enable)(struct gl_context *ctx, GLenum cap, GLboolean state); + + void (*Fogfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params); + + void (*Hint)(struct gl_context *ctx, GLenum target, GLenum mode); + + + + + void (*Lightfv)(struct gl_context *ctx, GLenum light, + GLenum pname, const GLfloat *params ); + + void (*LightModelfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params); + + void (*LineStipple)(struct gl_context *ctx, GLint factor, GLushort pattern ); + + void (*LineWidth)(struct gl_context *ctx, GLfloat width); + + void (*LogicOpcode)(struct gl_context *ctx, GLenum opcode); + void (*PointParameterfv)(struct gl_context *ctx, GLenum pname, + const GLfloat *params); + + void (*PointSize)(struct gl_context *ctx, GLfloat size); + + void (*PolygonMode)(struct gl_context *ctx, GLenum face, GLenum mode); + + void (*PolygonOffset)(struct gl_context *ctx, GLfloat factor, GLfloat units); + + void (*PolygonStipple)(struct gl_context *ctx, const GLubyte *mask ); + + void (*ReadBuffer)( struct gl_context *ctx, GLenum buffer ); + + void (*RenderMode)(struct gl_context *ctx, GLenum mode ); + + void (*Scissor)(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h); + + void (*ShadeModel)(struct gl_context *ctx, GLenum mode); + + void (*StencilFuncSeparate)(struct gl_context *ctx, GLenum face, GLenum func, + GLint ref, GLuint mask); + + void (*StencilMaskSeparate)(struct gl_context *ctx, GLenum face, GLuint mask); + + void (*StencilOpSeparate)(struct gl_context *ctx, GLenum face, GLenum fail, + GLenum zfail, GLenum zpass); + + void (*TexGen)(struct gl_context *ctx, GLenum coord, GLenum pname, + const GLfloat *params); + + void (*TexEnv)(struct gl_context *ctx, GLenum target, GLenum pname, + const GLfloat *param); + + void (*TexParameter)(struct gl_context *ctx, GLenum target, + struct gl_texture_object *texObj, + GLenum pname, const GLfloat *params); + + void (*Viewport)(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h); + + + + + + + + void (*BindBuffer)( struct gl_context *ctx, GLenum target, + struct gl_buffer_object *obj ); + + struct gl_buffer_object * (*NewBufferObject)( struct gl_context *ctx, GLuint buffer, + GLenum target ); + + void (*DeleteBuffer)( struct gl_context *ctx, struct gl_buffer_object *obj ); + + GLboolean (*BufferData)( struct gl_context *ctx, GLenum target, GLsizeiptrARB size, + const GLvoid *data, GLenum usage, + struct gl_buffer_object *obj ); + + void (*BufferSubData)( struct gl_context *ctx, GLenum target, GLintptrARB offset, + GLsizeiptrARB size, const GLvoid *data, + struct gl_buffer_object *obj ); + + void (*GetBufferSubData)( struct gl_context *ctx, GLenum target, + GLintptrARB offset, GLsizeiptrARB size, + GLvoid *data, struct gl_buffer_object *obj ); + + void * (*MapBuffer)( struct gl_context *ctx, GLenum target, GLenum access, + struct gl_buffer_object *obj ); + + void (*CopyBufferSubData)( struct gl_context *ctx, + struct gl_buffer_object *src, + struct gl_buffer_object *dst, + GLintptr readOffset, GLintptr writeOffset, + GLsizeiptr size ); + + + + void * (*MapBufferRange)( struct gl_context *ctx, GLenum target, GLintptr offset, + GLsizeiptr length, GLbitfield access, + struct gl_buffer_object *obj); + + void (*FlushMappedBufferRange)(struct gl_context *ctx, GLenum target, + GLintptr offset, GLsizeiptr length, + struct gl_buffer_object *obj); + + GLboolean (*UnmapBuffer)( struct gl_context *ctx, GLenum target, + struct gl_buffer_object *obj ); + + + + + + + + GLenum (*BufferObjectPurgeable)( struct gl_context *ctx, struct gl_buffer_object *obj, GLenum option ); + GLenum (*RenderObjectPurgeable)( struct gl_context *ctx, struct gl_renderbuffer *obj, GLenum option ); + GLenum (*TextureObjectPurgeable)( struct gl_context *ctx, struct gl_texture_object *obj, GLenum option ); + + + GLenum (*BufferObjectUnpurgeable)( struct gl_context *ctx, struct gl_buffer_object *obj, GLenum option ); + GLenum (*RenderObjectUnpurgeable)( struct gl_context *ctx, struct gl_renderbuffer *obj, GLenum option ); + GLenum (*TextureObjectUnpurgeable)( struct gl_context *ctx, struct gl_texture_object *obj, GLenum option ); + + + + + + + struct gl_framebuffer * (*NewFramebuffer)(struct gl_context *ctx, GLuint name); + struct gl_renderbuffer * (*NewRenderbuffer)(struct gl_context *ctx, GLuint name); + void (*BindFramebuffer)(struct gl_context *ctx, GLenum target, + struct gl_framebuffer *drawFb, + struct gl_framebuffer *readFb); + void (*FramebufferRenderbuffer)(struct gl_context *ctx, + struct gl_framebuffer *fb, + GLenum attachment, + struct gl_renderbuffer *rb); + void (*RenderTexture)(struct gl_context *ctx, + struct gl_framebuffer *fb, + struct gl_renderbuffer_attachment *att); + void (*FinishRenderTexture)(struct gl_context *ctx, + struct gl_renderbuffer_attachment *att); + void (*ValidateFramebuffer)(struct gl_context *ctx, + struct gl_framebuffer *fb); + + void (*BlitFramebuffer)(struct gl_context *ctx, + GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, + GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, + GLbitfield mask, GLenum filter); + + + + + + struct gl_query_object * (*NewQueryObject)(struct gl_context *ctx, GLuint id); + void (*DeleteQuery)(struct gl_context *ctx, struct gl_query_object *q); + void (*BeginQuery)(struct gl_context *ctx, struct gl_query_object *q); + void (*EndQuery)(struct gl_context *ctx, struct gl_query_object *q); + void (*CheckQuery)(struct gl_context *ctx, struct gl_query_object *q); + void (*WaitQuery)(struct gl_context *ctx, struct gl_query_object *q); + + + + + + + + struct gl_array_object * (*NewArrayObject)(struct gl_context *ctx, GLuint id); + void (*DeleteArrayObject)(struct gl_context *ctx, struct gl_array_object *obj); + void (*BindArrayObject)(struct gl_context *ctx, struct gl_array_object *obj); + + + + + + + struct gl_shader *(*NewShader)(struct gl_context *ctx, GLuint name, GLenum type); + void (*DeleteShader)(struct gl_context *ctx, struct gl_shader *shader); + struct gl_shader_program *(*NewShaderProgram)(struct gl_context *ctx, GLuint name); + void (*DeleteShaderProgram)(struct gl_context *ctx, + struct gl_shader_program *shProg); + void (*UseProgram)(struct gl_context *ctx, struct gl_shader_program *shProg); +# 860 "../../src/mesa/main/dd.h" + GLuint NeedValidate; +# 873 "../../src/mesa/main/dd.h" + void (*ValidateTnlModule)( struct gl_context *ctx, GLuint new_state ); + + + + + + + GLuint CurrentExecPrimitive; + + + + + + + + GLuint CurrentSavePrimitive; +# 901 "../../src/mesa/main/dd.h" + GLuint NeedFlush; + GLuint SaveNeedFlush; + + + + + + void (*BeginVertices)( struct gl_context *ctx ); +# 919 "../../src/mesa/main/dd.h" + void (*FlushVertices)( struct gl_context *ctx, GLuint flags ); + void (*SaveFlushVertices)( struct gl_context *ctx ); + + + + + + + GLboolean (*NotifySaveBegin)( struct gl_context *ctx, GLenum mode ); + + + + + + void (*LightingSpaceChange)( struct gl_context *ctx ); + + + + + + + + void (*NewList)( struct gl_context *ctx, GLuint list, GLenum mode ); + + + + + + void (*EndList)( struct gl_context *ctx ); + + + + + + + void (*BeginCallList)( struct gl_context *ctx, + struct gl_display_list *dlist ); + + + + + + void (*EndCallList)( struct gl_context *ctx ); + + + + + + + struct gl_sync_object * (*NewSyncObject)(struct gl_context *, GLenum); + void (*FenceSync)(struct gl_context *, struct gl_sync_object *, GLenum, GLbitfield); + void (*DeleteSyncObject)(struct gl_context *, struct gl_sync_object *); + void (*CheckSync)(struct gl_context *, struct gl_sync_object *); + void (*ClientWaitSync)(struct gl_context *, struct gl_sync_object *, + GLbitfield, GLuint64); + void (*ServerWaitSync)(struct gl_context *, struct gl_sync_object *, + GLbitfield, GLuint64); + + + + void (*BeginConditionalRender)(struct gl_context *ctx, struct gl_query_object *q, + GLenum mode); + void (*EndConditionalRender)(struct gl_context *ctx, struct gl_query_object *q); + + + + + + void (*DrawTex)(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z, + GLfloat width, GLfloat height); + + + + + + void (*EGLImageTargetTexture2D)(struct gl_context *ctx, GLenum target, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage, + GLeglImageOES image_handle); + void (*EGLImageTargetRenderbufferStorage)(struct gl_context *ctx, + struct gl_renderbuffer *rb, + void *image_handle); + + + + + struct gl_transform_feedback_object * + (*NewTransformFeedback)(struct gl_context *ctx, GLuint name); + void (*DeleteTransformFeedback)(struct gl_context *ctx, + struct gl_transform_feedback_object *obj); + void (*BeginTransformFeedback)(struct gl_context *ctx, GLenum mode, + struct gl_transform_feedback_object *obj); + void (*EndTransformFeedback)(struct gl_context *ctx, + struct gl_transform_feedback_object *obj); + void (*PauseTransformFeedback)(struct gl_context *ctx, + struct gl_transform_feedback_object *obj); + void (*ResumeTransformFeedback)(struct gl_context *ctx, + struct gl_transform_feedback_object *obj); + void (*DrawTransformFeedback)(struct gl_context *ctx, GLenum mode, + struct gl_transform_feedback_object *obj); + + + + + void (*TextureBarrier)(struct gl_context *ctx); + + + + + struct gl_sampler_object * (*NewSamplerObject)(struct gl_context *ctx, + GLuint name); + void (*DeleteSamplerObject)(struct gl_context *ctx, + struct gl_sampler_object *samp); +}; +# 1053 "../../src/mesa/main/dd.h" +typedef struct { + + + + + void ( * ArrayElement)( GLint ); + void ( * Color3f)( GLfloat, GLfloat, GLfloat ); + void ( * Color3fv)( const GLfloat * ); + void ( * Color4f)( GLfloat, GLfloat, GLfloat, GLfloat ); + void ( * Color4fv)( const GLfloat * ); + void ( * EdgeFlag)( GLboolean ); + void ( * EvalCoord1f)( GLfloat ); + void ( * EvalCoord1fv)( const GLfloat * ); + void ( * EvalCoord2f)( GLfloat, GLfloat ); + void ( * EvalCoord2fv)( const GLfloat * ); + void ( * EvalPoint1)( GLint ); + void ( * EvalPoint2)( GLint, GLint ); + void ( * FogCoordfEXT)( GLfloat ); + void ( * FogCoordfvEXT)( const GLfloat * ); + void ( * Indexf)( GLfloat ); + void ( * Indexfv)( const GLfloat * ); + void ( * Materialfv)( GLenum face, GLenum pname, const GLfloat * ); + void ( * MultiTexCoord1fARB)( GLenum, GLfloat ); + void ( * MultiTexCoord1fvARB)( GLenum, const GLfloat * ); + void ( * MultiTexCoord2fARB)( GLenum, GLfloat, GLfloat ); + void ( * MultiTexCoord2fvARB)( GLenum, const GLfloat * ); + void ( * MultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat ); + void ( * MultiTexCoord3fvARB)( GLenum, const GLfloat * ); + void ( * MultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat ); + void ( * MultiTexCoord4fvARB)( GLenum, const GLfloat * ); + void ( * Normal3f)( GLfloat, GLfloat, GLfloat ); + void ( * Normal3fv)( const GLfloat * ); + void ( * SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat ); + void ( * SecondaryColor3fvEXT)( const GLfloat * ); + void ( * TexCoord1f)( GLfloat ); + void ( * TexCoord1fv)( const GLfloat * ); + void ( * TexCoord2f)( GLfloat, GLfloat ); + void ( * TexCoord2fv)( const GLfloat * ); + void ( * TexCoord3f)( GLfloat, GLfloat, GLfloat ); + void ( * TexCoord3fv)( const GLfloat * ); + void ( * TexCoord4f)( GLfloat, GLfloat, GLfloat, GLfloat ); + void ( * TexCoord4fv)( const GLfloat * ); + void ( * Vertex2f)( GLfloat, GLfloat ); + void ( * Vertex2fv)( const GLfloat * ); + void ( * Vertex3f)( GLfloat, GLfloat, GLfloat ); + void ( * Vertex3fv)( const GLfloat * ); + void ( * Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat ); + void ( * Vertex4fv)( const GLfloat * ); + void ( * CallList)( GLuint ); + void ( * CallLists)( GLsizei, GLenum, const GLvoid * ); + void ( * Begin)( GLenum ); + void ( * End)( void ); + void ( * PrimitiveRestartNV)( void ); + + void ( * VertexAttrib1fNV)( GLuint index, GLfloat x ); + void ( * VertexAttrib1fvNV)( GLuint index, const GLfloat *v ); + void ( * VertexAttrib2fNV)( GLuint index, GLfloat x, GLfloat y ); + void ( * VertexAttrib2fvNV)( GLuint index, const GLfloat *v ); + void ( * VertexAttrib3fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z ); + void ( * VertexAttrib3fvNV)( GLuint index, const GLfloat *v ); + void ( * VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); + void ( * VertexAttrib4fvNV)( GLuint index, const GLfloat *v ); + + void ( * VertexAttrib1fARB)( GLuint index, GLfloat x ); + void ( * VertexAttrib1fvARB)( GLuint index, const GLfloat *v ); + void ( * VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y ); + void ( * VertexAttrib2fvARB)( GLuint index, const GLfloat *v ); + void ( * VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z ); + void ( * VertexAttrib3fvARB)( GLuint index, const GLfloat *v ); + void ( * VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); + void ( * VertexAttrib4fvARB)( GLuint index, const GLfloat *v ); + + + void ( * VertexAttribI1i)( GLuint index, GLint x); + void ( * VertexAttribI2i)( GLuint index, GLint x, GLint y); + void ( * VertexAttribI3i)( GLuint index, GLint x, GLint y, GLint z); + void ( * VertexAttribI4i)( GLuint index, GLint x, GLint y, GLint z, GLint w); + void ( * VertexAttribI2iv)( GLuint index, const GLint *v); + void ( * VertexAttribI3iv)( GLuint index, const GLint *v); + void ( * VertexAttribI4iv)( GLuint index, const GLint *v); + + void ( * VertexAttribI1ui)( GLuint index, GLuint x); + void ( * VertexAttribI2ui)( GLuint index, GLuint x, GLuint y); + void ( * VertexAttribI3ui)( GLuint index, GLuint x, GLuint y, GLuint z); + void ( * VertexAttribI4ui)( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); + void ( * VertexAttribI2uiv)( GLuint index, const GLuint *v); + void ( * VertexAttribI3uiv)( GLuint index, const GLuint *v); + void ( * VertexAttribI4uiv)( GLuint index, const GLuint *v); + + + + void ( * Rectf)( GLfloat, GLfloat, GLfloat, GLfloat ); + + + + + + void ( * DrawArrays)( GLenum mode, GLint start, GLsizei count ); + void ( * DrawElements)( GLenum mode, GLsizei count, GLenum type, + const GLvoid *indices ); + void ( * DrawRangeElements)( GLenum mode, GLuint start, + GLuint end, GLsizei count, + GLenum type, const GLvoid *indices ); + void ( * MultiDrawElementsEXT)( GLenum mode, const GLsizei *count, + GLenum type, + const GLvoid **indices, + GLsizei primcount); + void ( * DrawElementsBaseVertex)( GLenum mode, GLsizei count, + GLenum type, + const GLvoid *indices, + GLint basevertex ); + void ( * DrawRangeElementsBaseVertex)( GLenum mode, GLuint start, + GLuint end, GLsizei count, + GLenum type, + const GLvoid *indices, + GLint basevertex); + void ( * MultiDrawElementsBaseVertex)( GLenum mode, + const GLsizei *count, + GLenum type, + const GLvoid **indices, + GLsizei primcount, + const GLint *basevertex); + void ( * DrawArraysInstanced)(GLenum mode, GLint first, + GLsizei count, GLsizei primcount); + void ( * DrawElementsInstanced)(GLenum mode, GLsizei count, + GLenum type, const GLvoid *indices, + GLsizei primcount); + void ( * DrawElementsInstancedBaseVertex)(GLenum mode, GLsizei count, + GLenum type, const GLvoid *indices, + GLsizei primcount, GLint basevertex); +# 1196 "../../src/mesa/main/dd.h" + void ( * EvalMesh1)( GLenum mode, GLint i1, GLint i2 ); + void ( * EvalMesh2)( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ); + + +} GLvertexformat; +# 3095 "../../src/mesa/main/mtypes.h" 2 +# 3107 "../../src/mesa/main/mtypes.h" +union gl_dlist_node; + + + + + + + +struct gl_display_list +{ + GLuint Name; + GLbitfield Flags; + + union gl_dlist_node *Head; +}; + + + + + +struct gl_dlist_state +{ + GLuint CallDepth; + + struct gl_display_list *CurrentList; + union gl_dlist_node *CurrentBlock; + GLuint CurrentPos; + + GLvertexformat ListVtxfmt; + + GLubyte ActiveAttribSize[VERT_ATTRIB_MAX]; + GLfloat CurrentAttrib[VERT_ATTRIB_MAX][4]; + + GLubyte ActiveMaterialSize[12]; + GLfloat CurrentMaterial[12][4]; + + GLubyte ActiveIndex; + GLfloat CurrentIndex; + + GLubyte ActiveEdgeFlag; + GLboolean CurrentEdgeFlag; + + struct { + + + + GLenum ShadeModel; + } Current; +}; + + + + + +typedef enum +{ + API_OPENGL, + API_OPENGLES, + API_OPENGLES2 +} gl_api; +# 3179 "../../src/mesa/main/mtypes.h" +struct gl_context +{ + + struct gl_shared_state *Shared; + + + + gl_api API; + struct _glapi_table *Save; + struct _glapi_table *Exec; + struct _glapi_table *CurrentDispatch; + + + struct gl_config Visual; + struct gl_framebuffer *DrawBuffer; + struct gl_framebuffer *ReadBuffer; + struct gl_framebuffer *WinSysDrawBuffer; + struct gl_framebuffer *WinSysReadBuffer; + + + + + struct dd_function_table Driver; + + void *DriverCtx; + + + struct gl_constants Const; + + + + struct gl_matrix_stack ModelviewMatrixStack; + struct gl_matrix_stack ProjectionMatrixStack; + struct gl_matrix_stack TextureMatrixStack[((8 > 16) ? 8 : 16)]; + struct gl_matrix_stack ProgramMatrixStack[8]; + struct gl_matrix_stack *CurrentStack; + + + + GLmatrix _ModelProjectMatrix; + + + struct gl_dlist_state ListState; + + GLboolean ExecuteFlag; + GLboolean CompileFlag; + + + struct gl_extensions Extensions; + + + GLuint VersionMajor, VersionMinor; + char *VersionString; + + + + GLuint AttribStackDepth; + struct gl_attrib_node *AttribStack[16]; +# 3245 "../../src/mesa/main/mtypes.h" + struct gl_accum_attrib Accum; + struct gl_colorbuffer_attrib Color; + struct gl_current_attrib Current; + struct gl_depthbuffer_attrib Depth; + struct gl_eval_attrib Eval; + struct gl_fog_attrib Fog; + struct gl_hint_attrib Hint; + struct gl_light_attrib Light; + struct gl_line_attrib Line; + struct gl_list_attrib List; + struct gl_multisample_attrib Multisample; + struct gl_pixel_attrib Pixel; + struct gl_point_attrib Point; + struct gl_polygon_attrib Polygon; + GLuint PolygonStipple[32]; + struct gl_scissor_attrib Scissor; + struct gl_stencil_attrib Stencil; + struct gl_texture_attrib Texture; + struct gl_transform_attrib Transform; + struct gl_viewport_attrib Viewport; + + + + + GLuint ClientAttribStackDepth; + struct gl_attrib_node *ClientAttribStack[16]; + + + + + struct gl_array_attrib Array; + struct gl_pixelstore_attrib Pack; + struct gl_pixelstore_attrib Unpack; + struct gl_pixelstore_attrib DefaultPacking; + + + + + struct gl_pixelmaps PixelMaps; + + struct gl_evaluators EvalMap; + struct gl_feedback Feedback; + struct gl_selection Select; + + struct gl_program_state Program; + struct gl_vertex_program_state VertexProgram; + struct gl_fragment_program_state FragmentProgram; + struct gl_geometry_program_state GeometryProgram; + struct gl_ati_fragment_shader_state ATIFragmentShader; + + struct gl_shader_state Shader; + struct gl_shader_compiler_options ShaderCompilerOptions[MESA_SHADER_TYPES]; + + struct gl_query_state Query; + + struct gl_transform_feedback TransformFeedback; + + struct gl_buffer_object *CopyReadBuffer; + struct gl_buffer_object *CopyWriteBuffer; + + + struct gl_meta_state *Meta; + + + struct gl_renderbuffer *CurrentRenderbuffer; + + GLenum ErrorValue; + + + GLenum ResetStatus; + + + + + const char *ErrorDebugFmtString; + GLuint ErrorDebugCount; + + GLenum RenderMode; + GLbitfield NewState; + + GLboolean ViewportInitialized; + + GLbitfield varying_vp_inputs; + + + + + + + GLbitfield _TriangleCaps; + GLbitfield _ImageTransferState; + GLfloat _EyeZDir[3]; + GLfloat _ModelViewInvScale; + GLboolean _NeedEyeCoords; + GLboolean _ForceEyeCoords; + + GLuint TextureStateTimestamp; + + struct gl_shine_tab *_ShineTable[2]; + struct gl_shine_tab *_ShineTabList; + + + struct gl_list_extensions *ListExt; + + + + GLboolean FirstTimeCurrent; + + + + GLboolean Mesa_DXTn; + + GLboolean TextureFormatSupported[MESA_FORMAT_COUNT]; + + + + + + GLboolean mvp_with_dp4; + + + + + + + + void *swrast_context; + void *swsetup_context; + void *swtnl_context; + void *swtnl_im; + struct st_context *st; + void *aelt_context; + +}; +# 3396 "../../src/mesa/main/mtypes.h" +enum _verbose +{ + VERBOSE_VARRAY = 0x0001, + VERBOSE_TEXTURE = 0x0002, + VERBOSE_MATERIAL = 0x0004, + VERBOSE_PIPELINE = 0x0008, + VERBOSE_DRIVER = 0x0010, + VERBOSE_STATE = 0x0020, + VERBOSE_API = 0x0040, + VERBOSE_DISPLAY_LIST = 0x0100, + VERBOSE_LIGHTING = 0x0200, + VERBOSE_PRIMS = 0x0400, + VERBOSE_VERTS = 0x0800, + VERBOSE_DISASSEM = 0x1000, + VERBOSE_DRAW = 0x2000, + VERBOSE_SWAPBUFFERS = 0x4000 +}; + + + +enum _debug +{ + DEBUG_ALWAYS_FLUSH = 0x1 +}; +# 54 "../../src/mesa/main/context.h" 2 + + +struct _glapi_table; + + + + + +extern struct gl_config * +_mesa_create_visual( GLboolean dbFlag, + GLboolean stereoFlag, + GLint redBits, + GLint greenBits, + GLint blueBits, + GLint alphaBits, + GLint depthBits, + GLint stencilBits, + GLint accumRedBits, + GLint accumGreenBits, + GLint accumBlueBits, + GLint accumAlphaBits, + GLint numSamples ); + +extern GLboolean +_mesa_initialize_visual( struct gl_config *v, + GLboolean dbFlag, + GLboolean stereoFlag, + GLint redBits, + GLint greenBits, + GLint blueBits, + GLint alphaBits, + GLint depthBits, + GLint stencilBits, + GLint accumRedBits, + GLint accumGreenBits, + GLint accumBlueBits, + GLint accumAlphaBits, + GLint numSamples ); + +extern void +_mesa_destroy_visual( struct gl_config *vis ); + + + + + + + +extern GLboolean +_mesa_initialize_context( struct gl_context *ctx, + gl_api api, + const struct gl_config *visual, + struct gl_context *share_list, + const struct dd_function_table *driverFunctions, + void *driverContext ); + +extern struct gl_context * +_mesa_create_context(gl_api api, + const struct gl_config *visual, + struct gl_context *share_list, + const struct dd_function_table *driverFunctions, + void *driverContext); + +extern void +_mesa_free_context_data( struct gl_context *ctx ); + +extern void +_mesa_destroy_context( struct gl_context *ctx ); + + +extern void +_mesa_copy_context(const struct gl_context *src, struct gl_context *dst, GLuint mask); + + +extern void +_mesa_check_init_viewport(struct gl_context *ctx, GLuint width, GLuint height); + +extern GLboolean +_mesa_make_current( struct gl_context *ctx, struct gl_framebuffer *drawBuffer, + struct gl_framebuffer *readBuffer ); + +extern GLboolean +_mesa_share_state(struct gl_context *ctx, struct gl_context *ctxToShare); + +extern struct gl_context * +_mesa_get_current_context(void); + + + +extern void +_mesa_init_get_hash(struct gl_context *ctx); + +extern void +_mesa_notifySwapBuffers(struct gl_context *gc); + + +extern struct _glapi_table * +_mesa_get_dispatch(struct gl_context *ctx); + + +void +_mesa_set_mvp_with_dp4( struct gl_context *ctx, + GLboolean flag ); + + +extern GLboolean +_mesa_valid_to_render(struct gl_context *ctx, const char *where); + + + + + + +extern void +_mesa_record_error( struct gl_context *ctx, GLenum error ); + + +extern void +_mesa_finish(struct gl_context *ctx); + +extern void +_mesa_flush(struct gl_context *ctx); + + +extern void +_mesa_Finish( void ); + +extern void +_mesa_Flush( void ); +# 34 "swrast/s_triangle.c" 2 +# 1 "../../src/mesa/main/colormac.h" 1 +# 36 "../../src/mesa/main/colormac.h" +# 1 "../../src/mesa/main/config.h" 1 +# 37 "../../src/mesa/main/colormac.h" 2 +# 1 "../../src/mesa/main/macros.h" 1 +# 43 "../../src/mesa/main/macros.h" +extern GLfloat _mesa_ubyte_to_float_color_tab[256]; +# 38 "../../src/mesa/main/colormac.h" 2 +# 35 "swrast/s_triangle.c" 2 +# 1 "../../src/mesa/main/imports.h" 1 +# 36 "swrast/s_triangle.c" 2 +# 1 "../../src/mesa/main/macros.h" 1 +# 37 "swrast/s_triangle.c" 2 +# 1 "../../src/mesa/main/mtypes.h" 1 +# 38 "swrast/s_triangle.c" 2 +# 1 "../../src/mesa/main/state.h" 1 +# 31 "../../src/mesa/main/state.h" +extern void +_mesa_update_state(struct gl_context *ctx); + + + + +extern void +_mesa_update_state_locked(struct gl_context *ctx); + + +extern void +_mesa_set_varying_vp_inputs(struct gl_context *ctx, GLbitfield varying_inputs); + + +extern void +_mesa_set_vp_override(struct gl_context *ctx, GLboolean flag); + + + + + +static __inline__ GLboolean +_mesa_need_secondary_color(const struct gl_context *ctx) +{ + if (ctx->Light.Enabled && + ctx->Light.Model.ColorControl == 0x81FA) + return 0x1; + + if (ctx->Fog.ColorSumEnabled) + return 0x1; + + if (ctx->VertexProgram._Current && + (ctx->VertexProgram._Current != ctx->VertexProgram._TnlProgram) && + (ctx->VertexProgram._Current->Base.InputsRead & (1 << VERT_ATTRIB_COLOR1))) + return 0x1; + + if (ctx->FragmentProgram._Current && + (ctx->FragmentProgram._Current != ctx->FragmentProgram._TexEnvProgram) && + (ctx->FragmentProgram._Current->Base.InputsRead & (1 << FRAG_ATTRIB_COL1))) + return 0x1; + + return 0x0; +} + + + + + +static __inline__ GLboolean +_mesa_rgba_logicop_enabled(const struct gl_context *ctx) +{ + return ctx->Color.ColorLogicOpEnabled || + (ctx->Color.BlendEnabled && ctx->Color.Blend[0].EquationRGB == 0x0BF1); +} +# 39 "swrast/s_triangle.c" 2 +# 1 "../../src/mesa/program/prog_instruction.h" 1 +# 144 "../../src/mesa/program/prog_instruction.h" +typedef enum prog_opcode { + + + OPCODE_NOP = 0, + OPCODE_ABS, + OPCODE_ADD, + OPCODE_AND, + OPCODE_ARA, + OPCODE_ARL, + OPCODE_ARL_NV, + OPCODE_ARR, + OPCODE_BGNLOOP, + OPCODE_BGNSUB, + OPCODE_BRA, + OPCODE_BRK, + OPCODE_CAL, + OPCODE_CMP, + OPCODE_CONT, + OPCODE_COS, + OPCODE_DDX, + OPCODE_DDY, + OPCODE_DP2, + OPCODE_DP2A, + OPCODE_DP3, + OPCODE_DP4, + OPCODE_DPH, + OPCODE_DST, + OPCODE_ELSE, + OPCODE_EMIT_VERTEX, + OPCODE_END, + OPCODE_END_PRIMITIVE, + OPCODE_ENDIF, + OPCODE_ENDLOOP, + OPCODE_ENDSUB, + OPCODE_EX2, + OPCODE_EXP, + OPCODE_FLR, + OPCODE_FRC, + OPCODE_IF, + OPCODE_KIL, + OPCODE_KIL_NV, + OPCODE_LG2, + OPCODE_LIT, + OPCODE_LOG, + OPCODE_LRP, + OPCODE_MAD, + OPCODE_MAX, + OPCODE_MIN, + OPCODE_MOV, + OPCODE_MUL, + OPCODE_NOISE1, + OPCODE_NOISE2, + OPCODE_NOISE3, + OPCODE_NOISE4, + OPCODE_NOT, + OPCODE_NRM3, + OPCODE_NRM4, + OPCODE_OR, + OPCODE_PK2H, + OPCODE_PK2US, + OPCODE_PK4B, + OPCODE_PK4UB, + OPCODE_POW, + OPCODE_POPA, + OPCODE_PRINT, + OPCODE_PUSHA, + OPCODE_RCC, + OPCODE_RCP, + OPCODE_RET, + OPCODE_RFL, + OPCODE_RSQ, + OPCODE_SCS, + OPCODE_SEQ, + OPCODE_SFL, + OPCODE_SGE, + OPCODE_SGT, + OPCODE_SIN, + OPCODE_SLE, + OPCODE_SLT, + OPCODE_SNE, + OPCODE_SSG, + OPCODE_STR, + OPCODE_SUB, + OPCODE_SWZ, + OPCODE_TEX, + OPCODE_TXB, + OPCODE_TXD, + OPCODE_TXL, + OPCODE_TXP, + OPCODE_TXP_NV, + OPCODE_TRUNC, + OPCODE_UP2H, + OPCODE_UP2US, + OPCODE_UP4B, + OPCODE_UP4UB, + OPCODE_X2D, + OPCODE_XOR, + OPCODE_XPD, + MAX_OPCODE +} gl_inst_opcode; +# 256 "../../src/mesa/program/prog_instruction.h" +struct prog_src_register +{ + GLuint File:4; + GLint Index:(12 +1); + + + GLuint Swizzle:12; + GLuint RelAddr:1; + + + GLuint Abs:1; + + + + + + + GLuint Negate:4; +# 285 "../../src/mesa/program/prog_instruction.h" + GLuint HasIndex2:1; + GLuint RelAddr2:1; + GLint Index2:(12 +1); + + +}; + + + + + +struct prog_dst_register +{ + GLuint File:4; + GLuint Index:12; + GLuint WriteMask:4; + GLuint RelAddr:1; +# 317 "../../src/mesa/program/prog_instruction.h" + GLuint CondMask:4; + + + + + GLuint CondSwizzle:12; + + + + + + + + GLuint CondSrc:1; + +}; + + + + + +struct prog_instruction +{ + gl_inst_opcode Opcode; + struct prog_src_register SrcReg[3]; + struct prog_dst_register DstReg; +# 352 "../../src/mesa/program/prog_instruction.h" + GLuint CondUpdate:1; +# 366 "../../src/mesa/program/prog_instruction.h" + GLuint CondDst:1; +# 377 "../../src/mesa/program/prog_instruction.h" + GLuint SaturateMode:2; + + + + + + + + GLuint Precision:3; + + + + + + + GLuint TexSrcUnit:5; + + + GLuint TexSrcTarget:3; + + + GLuint TexShadow:1; +# 408 "../../src/mesa/program/prog_instruction.h" + GLint BranchTarget; + + + const char *Comment; + + + void *Data; + + + GLint Aux; +}; + + +extern void +_mesa_init_instructions(struct prog_instruction *inst, GLuint count); + +extern struct prog_instruction * +_mesa_alloc_instructions(GLuint numInst); + +extern struct prog_instruction * +_mesa_realloc_instructions(struct prog_instruction *oldInst, + GLuint numOldInst, GLuint numNewInst); + +extern struct prog_instruction * +_mesa_copy_instructions(struct prog_instruction *dest, + const struct prog_instruction *src, GLuint n); + +extern void +_mesa_free_instructions(struct prog_instruction *inst, GLuint count); + +extern GLuint +_mesa_num_inst_src_regs(gl_inst_opcode opcode); + +extern GLuint +_mesa_num_inst_dst_regs(gl_inst_opcode opcode); + +extern GLboolean +_mesa_is_tex_instruction(gl_inst_opcode opcode); + +extern GLboolean +_mesa_check_soa_dependencies(const struct prog_instruction *inst); + +extern const char * +_mesa_opcode_string(gl_inst_opcode opcode); +# 40 "swrast/s_triangle.c" 2 + +# 1 "swrast/s_aatriangle.h" 1 +# 31 "swrast/s_aatriangle.h" +struct gl_context; + + +extern void +_swrast_set_aa_triangle_function(struct gl_context *ctx); +# 42 "swrast/s_triangle.c" 2 +# 1 "swrast/s_context.h" 1 +# 46 "swrast/s_context.h" +# 1 "../../src/mesa/main/compiler.h" 1 +# 47 "swrast/s_context.h" 2 + +# 1 "../../src/mesa/program/prog_execute.h" 1 +# 32 "../../src/mesa/program/prog_execute.h" +typedef void (*FetchTexelLodFunc)(struct gl_context *ctx, const GLfloat texcoord[4], + GLfloat lambda, GLuint unit, GLfloat color[4]); + +typedef void (*FetchTexelDerivFunc)(struct gl_context *ctx, const GLfloat texcoord[4], + const GLfloat texdx[4], + const GLfloat texdy[4], + GLfloat lodBias, + GLuint unit, GLfloat color[4]); + + + + + +struct gl_program_machine +{ + const struct gl_program *CurProgram; + + + GLfloat (*Attribs)[16384][4]; + GLfloat (*DerivX)[4]; + GLfloat (*DerivY)[4]; + GLuint NumDeriv; + GLuint CurElement; + + + GLfloat VertAttribs[VERT_ATTRIB_MAX][4]; + + GLfloat Temporaries[256][4]; + GLfloat Outputs[64][4]; + GLfloat (*EnvParams)[4]; + GLuint CondCodes[4]; + GLint AddressReg[2][4]; + GLfloat SystemValues[SYSTEM_VALUE_MAX][4]; + + const GLubyte *Samplers; + + GLuint CallStack[8]; + GLuint StackDepth; + + + FetchTexelLodFunc FetchTexelLod; + FetchTexelDerivFunc FetchTexelDeriv; +}; + + +extern void +_mesa_get_program_register(struct gl_context *ctx, gl_register_file file, + GLuint index, GLfloat val[4]); + +extern GLboolean +_mesa_execute_program(struct gl_context *ctx, + const struct gl_program *program, + struct gl_program_machine *machine); +# 49 "swrast/s_context.h" 2 +# 1 "swrast/swrast.h" 1 +# 71 "swrast/swrast.h" +typedef struct { + GLfloat attrib[FRAG_ATTRIB_MAX][4]; + GLchan color[4]; + GLfloat pointSize; +} SWvertex; + + + + + +struct swrast_device_driver; + + + + + +extern GLboolean +_swrast_CreateContext( struct gl_context *ctx ); + +extern void +_swrast_DestroyContext( struct gl_context *ctx ); + + + +extern struct swrast_device_driver * +_swrast_GetDeviceDriverReference( struct gl_context *ctx ); + +extern void +_swrast_Bitmap( struct gl_context *ctx, + GLint px, GLint py, + GLsizei width, GLsizei height, + const struct gl_pixelstore_attrib *unpack, + const GLubyte *bitmap ); + +extern void +_swrast_CopyPixels( struct gl_context *ctx, + GLint srcx, GLint srcy, + GLint destx, GLint desty, + GLsizei width, GLsizei height, + GLenum type ); + +extern void +_swrast_DrawPixels( struct gl_context *ctx, + GLint x, GLint y, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *unpack, + const GLvoid *pixels ); + +extern void +_swrast_ReadPixels( struct gl_context *ctx, + GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *unpack, + GLvoid *pixels ); + +extern void +_swrast_BlitFramebuffer(struct gl_context *ctx, + GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, + GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, + GLbitfield mask, GLenum filter); + +extern void +_swrast_Clear(struct gl_context *ctx, GLbitfield buffers); + +extern void +_swrast_Accum(struct gl_context *ctx, GLenum op, GLfloat value); + + + + + +extern void +_swrast_ResetLineStipple( struct gl_context *ctx ); + + + + + +extern void +_swrast_SetFacing(struct gl_context *ctx, GLuint facing); + + + + + + +extern void +_swrast_Point( struct gl_context *ctx, const SWvertex *v ); + +extern void +_swrast_Line( struct gl_context *ctx, const SWvertex *v0, const SWvertex *v1 ); + +extern void +_swrast_Triangle( struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, const SWvertex *v2 ); + +extern void +_swrast_Quad( struct gl_context *ctx, + const SWvertex *v0, const SWvertex *v1, + const SWvertex *v2, const SWvertex *v3); + +extern void +_swrast_flush( struct gl_context *ctx ); + +extern void +_swrast_render_primitive( struct gl_context *ctx, GLenum mode ); + +extern void +_swrast_render_start( struct gl_context *ctx ); + +extern void +_swrast_render_finish( struct gl_context *ctx ); + + + +extern void +_swrast_InvalidateState( struct gl_context *ctx, GLbitfield new_state ); + + + +extern void +_swrast_allow_vertex_fog( struct gl_context *ctx, GLboolean value ); + +extern void +_swrast_allow_pixel_fog( struct gl_context *ctx, GLboolean value ); + + + +extern void +_swrast_print_vertex( struct gl_context *ctx, const SWvertex *v ); + + + +extern void +_swrast_eject_texture_images(struct gl_context *ctx); + + +extern void +_swrast_render_texture(struct gl_context *ctx, + struct gl_framebuffer *fb, + struct gl_renderbuffer_attachment *att); + +extern void +_swrast_finish_render_texture(struct gl_context *ctx, + struct gl_renderbuffer_attachment *att); +# 225 "swrast/swrast.h" +struct swrast_device_driver { +# 236 "swrast/swrast.h" + void (*SpanRenderStart)(struct gl_context *ctx); + void (*SpanRenderFinish)(struct gl_context *ctx); +}; +# 50 "swrast/s_context.h" 2 +# 1 "swrast/s_span.h" 1 +# 35 "swrast/s_span.h" +struct gl_context; +struct gl_renderbuffer; +# 66 "swrast/s_span.h" +typedef struct sw_span_arrays +{ + + + + + GLfloat attribs[FRAG_ATTRIB_MAX][16384][4]; + + + GLubyte mask[16384]; + + GLenum ChanType; + + + + GLubyte rgba8[16384][4]; + GLushort rgba16[16384][4]; + GLchan (*rgba)[4]; + GLint x[16384]; + GLint y[16384]; + GLuint z[16384]; + GLuint index[16384]; + GLfloat lambda[8][16384]; + GLfloat coverage[16384]; + +} SWspanarrays; +# 106 "swrast/s_span.h" +typedef struct sw_span +{ + + GLint x, y; + + + GLuint end; + + + GLuint leftClip; + + + GLboolean writeAll; + + + GLenum primitive; + + + GLuint facing; + + + + + + GLbitfield interpMask; + + + GLfloat attrStart[FRAG_ATTRIB_MAX][4]; + GLfloat attrStepX[FRAG_ATTRIB_MAX][4]; + GLfloat attrStepY[FRAG_ATTRIB_MAX][4]; + + + + + + + GLfixed red, redStep; + GLfixed green, greenStep; + GLfixed blue, blueStep; + GLfixed alpha, alphaStep; + GLfixed index, indexStep; + GLfixed z, zStep; + GLfixed intTex[2], intTexStep[2]; + + + + + + GLbitfield arrayMask; + + GLbitfield arrayAttribs; + + + + + + + + SWspanarrays *array; +} SWspan; +# 183 "swrast/s_span.h" +extern void +_swrast_span_default_attribs(struct gl_context *ctx, SWspan *span); + +extern void +_swrast_span_interpolate_z( const struct gl_context *ctx, SWspan *span ); + +extern GLfloat +_swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy, + GLfloat dqdx, GLfloat dqdy, GLfloat texW, GLfloat texH, + GLfloat s, GLfloat t, GLfloat q, GLfloat invQ); + + +extern void +_swrast_write_rgba_span( struct gl_context *ctx, SWspan *span); + + +extern void +_swrast_read_rgba_span(struct gl_context *ctx, struct gl_renderbuffer *rb, + GLuint n, GLint x, GLint y, GLenum type, GLvoid *rgba); + +extern void +_swrast_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb, + GLuint count, const GLint x[], const GLint y[], + void *values, GLuint valueSize); + +extern void +_swrast_put_row(struct gl_context *ctx, struct gl_renderbuffer *rb, + GLuint count, GLint x, GLint y, + const GLvoid *values, GLuint valueSize); + +extern void +_swrast_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb, + GLuint count, GLint x, GLint y, + GLvoid *values, GLuint valueSize); + + +extern void * +_swrast_get_dest_rgba(struct gl_context *ctx, struct gl_renderbuffer *rb, + SWspan *span); +# 51 "swrast/s_context.h" 2 + + +typedef void (*texture_sample_func)(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoords[][4], + const GLfloat lambda[], GLfloat rgba[][4]); + +typedef void ( * blend_func)( struct gl_context *ctx, GLuint n, + const GLubyte mask[], + GLvoid *src, const GLvoid *dst, + GLenum chanType); + +typedef void (*swrast_point_func)( struct gl_context *ctx, const SWvertex *); + +typedef void (*swrast_line_func)( struct gl_context *ctx, + const SWvertex *, const SWvertex *); + +typedef void (*swrast_tri_func)( struct gl_context *ctx, const SWvertex *, + const SWvertex *, const SWvertex *); + + +typedef void (*validate_texture_image_func)(struct gl_context *ctx, + struct gl_texture_object *texObj, + GLuint face, GLuint level); +# 116 "swrast/s_context.h" +typedef struct +{ + + + struct swrast_device_driver Driver; + + + + + GLboolean AllowVertexFog; + GLboolean AllowPixelFog; + + + + + GLbitfield _RasterMask; + GLfloat _BackfaceSign; + GLfloat _BackfaceCullSign; + GLboolean _PreferPixelFog; + GLboolean _TextureCombinePrimary; + GLboolean _FogEnabled; + GLboolean _DeferredTexture; + + + GLuint _ActiveAttribs[FRAG_ATTRIB_MAX]; + + GLbitfield _ActiveAttribMask; + + GLuint _NumActiveAttribs; + + GLenum _InterpMode[FRAG_ATTRIB_MAX]; + + + + GLboolean _IntegerAccumMode; + GLfloat _IntegerAccumScaler; + + + + GLuint StippleCounter; + GLuint PointLineFacing; + GLbitfield NewState; + GLuint StateChanges; + GLenum Primitive; + GLboolean SpecularVertexAdd; + + void (*InvalidateState)( struct gl_context *ctx, GLbitfield new_state ); + + + + + + + GLbitfield InvalidatePointMask; + GLbitfield InvalidateLineMask; + GLbitfield InvalidateTriangleMask; + + + + + + + + void (*choose_point)( struct gl_context * ); + void (*choose_line)( struct gl_context * ); + void (*choose_triangle)( struct gl_context * ); + + + + + + + swrast_point_func Point; + swrast_line_func Line; + swrast_tri_func Triangle; + + + + + + + + swrast_point_func SpecPoint; + swrast_line_func SpecLine; + swrast_tri_func SpecTriangle; +# 209 "swrast/s_context.h" + SWspanarrays *SpanArrays; + SWspanarrays *ZoomedArrays; + + + + + SWspan PointSpan; + + + + blend_func BlendFunc; + texture_sample_func TextureSample[16]; + + + + + GLfloat *TexelBuffer; + + validate_texture_image_func ValidateTextureImage; + + + struct gl_program_machine FragProgMachine; + +} SWcontext; + + +extern void +_swrast_validate_derived( struct gl_context *ctx ); + +extern void +_swrast_update_texture_samplers(struct gl_context *ctx); + + + +static __inline__ SWcontext * +SWRAST_CONTEXT(struct gl_context *ctx) +{ + return (SWcontext *) ctx->swrast_context; +} + + +static __inline__ const SWcontext * +CONST_SWRAST_CONTEXT(const struct gl_context *ctx) +{ + return (const SWcontext *) ctx->swrast_context; +} + + + + + + + +static __inline__ void +swrast_render_start(struct gl_context *ctx) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + if (swrast->Driver.SpanRenderStart) + swrast->Driver.SpanRenderStart(ctx); +} + + + +static __inline__ void +swrast_render_finish(struct gl_context *ctx) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + if (swrast->Driver.SpanRenderFinish) + swrast->Driver.SpanRenderFinish(ctx); +} +# 43 "swrast/s_triangle.c" 2 +# 1 "swrast/s_feedback.h" 1 +# 34 "swrast/s_feedback.h" +extern void _swrast_feedback_point( struct gl_context *ctx, const SWvertex *v ); + +extern void _swrast_feedback_line( struct gl_context *ctx, + const SWvertex *v1, const SWvertex *v2 ); + +extern void _swrast_feedback_triangle( struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, const SWvertex *v2 ); + +extern void _swrast_select_point( struct gl_context *ctx, const SWvertex *v ); + +extern void _swrast_select_line( struct gl_context *ctx, + const SWvertex *v1, const SWvertex *v2 ); + +extern void _swrast_select_triangle( struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, const SWvertex *v2 ); +# 44 "swrast/s_triangle.c" 2 + +# 1 "swrast/s_triangle.h" 1 +# 34 "swrast/s_triangle.h" +extern GLboolean +_swrast_culltriangle( struct gl_context *ctx, + const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2); + +extern void +_swrast_choose_triangle( struct gl_context *ctx ); + +extern void +_swrast_add_spec_terms_triangle( struct gl_context *ctx, + const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ); +# 46 "swrast/s_triangle.c" 2 + + + + + + +GLboolean +_swrast_culltriangle( struct gl_context *ctx, + const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + GLfloat ex = v1->attrib[FRAG_ATTRIB_WPOS][0] - v0->attrib[FRAG_ATTRIB_WPOS][0]; + GLfloat ey = v1->attrib[FRAG_ATTRIB_WPOS][1] - v0->attrib[FRAG_ATTRIB_WPOS][1]; + GLfloat fx = v2->attrib[FRAG_ATTRIB_WPOS][0] - v0->attrib[FRAG_ATTRIB_WPOS][0]; + GLfloat fy = v2->attrib[FRAG_ATTRIB_WPOS][1] - v0->attrib[FRAG_ATTRIB_WPOS][1]; + GLfloat c = ex*fy-ey*fx; + + if (c * swrast->_BackfaceSign * swrast->_BackfaceCullSign <= 0.0F) + return 0x0; + + return 0x1; +} +# 91 "swrast/s_triangle.c" +# 1 "swrast/s_tritemp.h" 1 +# 111 "swrast/s_tritemp.h" +static void flat_rgba_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + typedef struct { + const SWvertex *v0, *v1; + GLfloat dx; + GLfloat dy; + GLfloat dxdy; + GLfixed fdxdy; + GLfloat adjy; + GLfixed fsx; + GLfixed fsy; + GLfixed fx0; + GLint lines; + } EdgeT; + + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + + const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; + const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; + const GLfloat maxDepth = ctx->DrawBuffer->_DepthMaxF; + + + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + + SWspan span; + + (void) swrast; + + do { (span).primitive = (0x0009); (span).interpMask = 0x0; (span).arrayMask = 0x0; (span).arrayAttribs = 0x0; (span).end = 0; (span).leftClip = 0; (span).facing = 0; (span).array = SWRAST_CONTEXT(ctx)->SpanArrays; } while (0); + span.y = 0; + + + (void) fixedToDepthShift; +# 172 "swrast/s_tritemp.h" + { + const GLfixed fy0 = (((int) ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = (((int) ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = (((int) ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + + vMin = v0; vMid = v1; vMax = v2; + vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; + } + else if (fy2 <= fy0) { + + vMin = v2; vMid = v0; vMax = v1; + vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; + } + else { + + vMin = v0; vMid = v2; vMax = v1; + vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; + bf = -bf; + } + } + else { + if (fy0 <= fy2) { + + vMin = v1; vMid = v0; vMax = v2; + vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; + bf = -bf; + } + else if (fy2 <= fy1) { + + vMin = v2; vMid = v1; vMax = v0; + vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; + bf = -bf; + } + else { + + vMin = v1; vMid = v2; vMax = v0; + vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; + } + } + + + vMin_fx = (((int) ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = (((int) ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMax_fx = (((int) ((((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + } + + + eMaj.v0 = vMin; eMaj.v1 = vMax; + eTop.v0 = vMid; eTop.v1 = vMax; + eBot.v0 = vMin; eBot.v1 = vMid; + + + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float) (1 << 11)))); + eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / ((float) (1 << 11)))); + eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + + + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + + if (area * bf * swrast->_BackfaceCullSign < 0.0) + return; + + oneOverArea = 1.0F / area; + + + span.facing = oneOverArea * bf > 0.0F; + } + + + { + eMaj.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eMaj.lines = (((((vMax_fy - eMaj.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eMaj.lines > 0) { + eMaj.dxdy = eMaj.dx / eMaj.dy; + eMaj.fdxdy = (((int) ((((eMaj.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eMaj.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eMaj.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); + eMaj.fx0 = vMin_fx; + eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * eMaj.dxdy); + } + else { + return; + } + + eTop.fsy = (((vMid_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eTop.lines = (((((vMax_fy - eTop.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eTop.lines > 0) { + eTop.dxdy = eTop.dx / eTop.dy; + eTop.fdxdy = (((int) ((((eTop.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eTop.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eTop.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); + eTop.fx0 = vMid_fx; + eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * eTop.dxdy); + } + + eBot.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eBot.lines = (((((vMid_fy - eBot.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eBot.lines > 0) { + eBot.dxdy = eBot.dx / eBot.dy; + eBot.fdxdy = (((int) ((((eBot.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eBot.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eBot.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); + eBot.fx0 = vMin_fx; + eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * eBot.dxdy); + } + } +# 319 "swrast/s_tritemp.h" + { + GLint scan_from_left_to_right; + + + + + + ; ; span.interpMask |= 0x01; span.red = ((v2->color[0]) << 11); span.green = ((v2->color[1]) << 11); span.blue = ((v2->color[2]) << 11); span.alpha = ((v2->color[3]) << 11); span.redStep = 0; span.greenStep = 0; span.blueStep = 0; span.alphaStep = 0; + + + scan_from_left_to_right = (oneOverArea < 0.0F); + + + + + span.interpMask |= 0x02; + { + GLfloat eMaj_dz = vMax->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + GLfloat eBot_dz = vMid->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + span.attrStepX[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); + if (span.attrStepX[FRAG_ATTRIB_WPOS][2] > maxDepth || + span.attrStepX[FRAG_ATTRIB_WPOS][2] < -maxDepth) { + + span.attrStepX[FRAG_ATTRIB_WPOS][2] = 0.0; + span.attrStepY[FRAG_ATTRIB_WPOS][2] = 0.0; + } + else { + span.attrStepY[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); + } + if (depthBits <= 16) + span.zStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))); + else + span.zStep = (GLint) span.attrStepX[FRAG_ATTRIB_WPOS][2]; + } +# 488 "swrast/s_tritemp.h" + { + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; + GLfixed fError = 0, fdError = 0; +# 504 "swrast/s_tritemp.h" + GLuint zLeft = 0; + GLfixed fdzOuter = 0, fdzInner; +# 525 "swrast/s_tritemp.h" + for (subTriangle=0; subTriangle<=1; subTriangle++) { + EdgeT *eLeft, *eRight; + int setupLeft, setupRight; + int lines; + + if (subTriangle==0) { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eBot; + lines = eRight->lines; + setupLeft = 1; + setupRight = 1; + } + else { + eLeft = &eBot; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 1; + } + } + else { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eTop; + lines = eRight->lines; + setupLeft = 0; + setupRight = 1; + } + else { + eLeft = &eTop; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 0; + } + if (lines == 0) + return; + } + + if (setupLeft && eLeft->lines > 0) { + const SWvertex *vLower = eLeft->v0; + const GLfixed fsy = eLeft->fsy; + const GLfixed fsx = eLeft->fsx; + const GLfixed fx = (((fsx) + (1 << 11) - 1) & (~((1 << 11) - 1))); + const GLfixed adjx = (GLfixed) (fx - eLeft->fx0); + const GLfixed adjy = (GLfixed) eLeft->adjy; + GLint idxOuter; + GLfloat dxOuter; + GLfixed fdxOuter; + + fError = fx - fsx - (1 << 11); + fxLeftEdge = fsx - 1; + fdxLeftEdge = eLeft->fdxdy; + fdxOuter = ((fdxLeftEdge - 1) & (~((1 << 11) - 1))); + fdError = fdxOuter - fdxLeftEdge + (1 << 11); + idxOuter = ((fdxOuter) >> 11); + dxOuter = (GLfloat) idxOuter; + span.y = ((fsy) >> 11); + + + (void) dxOuter; + (void) adjx; + (void) adjy; + (void) vLower; +# 611 "swrast/s_tritemp.h" + { + GLfloat z0 = vLower->attrib[FRAG_ATTRIB_WPOS][2]; + if (depthBits <= 16) { + + GLfloat tmp = (z0 * ((float) (1 << 11)) + + span.attrStepX[FRAG_ATTRIB_WPOS][2] * adjx + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * adjy) + (1 << (11 -1)); + if (tmp < 0xffffffff / 2) + zLeft = (GLfixed) tmp; + else + zLeft = 0xffffffff / 2; + fdzOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + + zLeft = (GLuint) (z0 + span.attrStepX[FRAG_ATTRIB_WPOS][2] * ((adjx) * (1.0F / ((float) (1 << 11)))) + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * ((adjy) * (1.0F / ((float) (1 << 11))))); + fdzOuter = (GLint) (span.attrStepY[FRAG_ATTRIB_WPOS][2] + + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]); + } + + + + + + } +# 722 "swrast/s_tritemp.h" + } + + + if (setupRight && eRight->lines>0) { + fxRightEdge = eRight->fsx - 1; + fdxRightEdge = eRight->fdxdy; + } + + if (lines==0) { + continue; + } +# 743 "swrast/s_tritemp.h" + fdzInner = fdzOuter + span.zStep; +# 767 "swrast/s_tritemp.h" + while (lines > 0) { + + + const GLint right = ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + + + span.z = zLeft; +# 807 "swrast/s_tritemp.h" + if (span.end > 0 && span.y >= 0) { + const GLint len = span.end - 1; + (void) len; +# 818 "swrast/s_tritemp.h" + { + _swrast_write_rgba_span(ctx, &span);; + } + } + + + + + + + + span.y++; + lines--; + + fxLeftEdge += fdxLeftEdge; + fxRightEdge += fdxRightEdge; + + fError += fdError; + if (fError >= 0) { + fError -= (1 << 11); +# 846 "swrast/s_tritemp.h" + zLeft += fdzOuter; +# 869 "swrast/s_tritemp.h" + } + else { + + + + + + + + zLeft += fdzInner; +# 901 "swrast/s_tritemp.h" + } + } + + } + + } + } +} +# 92 "swrast/s_triangle.c" 2 +# 109 "swrast/s_triangle.c" +# 1 "swrast/s_tritemp.h" 1 +# 111 "swrast/s_tritemp.h" +static void smooth_rgba_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + typedef struct { + const SWvertex *v0, *v1; + GLfloat dx; + GLfloat dy; + GLfloat dxdy; + GLfixed fdxdy; + GLfloat adjy; + GLfixed fsx; + GLfixed fsy; + GLfixed fx0; + GLint lines; + } EdgeT; + + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + + const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; + const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; + const GLfloat maxDepth = ctx->DrawBuffer->_DepthMaxF; + + + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + + SWspan span; + + (void) swrast; + + do { (span).primitive = (0x0009); (span).interpMask = 0x0; (span).arrayMask = 0x0; (span).arrayAttribs = 0x0; (span).end = 0; (span).leftClip = 0; (span).facing = 0; (span).array = SWRAST_CONTEXT(ctx)->SpanArrays; } while (0); + span.y = 0; + + + (void) fixedToDepthShift; +# 172 "swrast/s_tritemp.h" + { + const GLfixed fy0 = (((int) ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = (((int) ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = (((int) ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + + vMin = v0; vMid = v1; vMax = v2; + vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; + } + else if (fy2 <= fy0) { + + vMin = v2; vMid = v0; vMax = v1; + vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; + } + else { + + vMin = v0; vMid = v2; vMax = v1; + vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; + bf = -bf; + } + } + else { + if (fy0 <= fy2) { + + vMin = v1; vMid = v0; vMax = v2; + vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; + bf = -bf; + } + else if (fy2 <= fy1) { + + vMin = v2; vMid = v1; vMax = v0; + vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; + bf = -bf; + } + else { + + vMin = v1; vMid = v2; vMax = v0; + vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; + } + } + + + vMin_fx = (((int) ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = (((int) ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMax_fx = (((int) ((((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + } + + + eMaj.v0 = vMin; eMaj.v1 = vMax; + eTop.v0 = vMid; eTop.v1 = vMax; + eBot.v0 = vMin; eBot.v1 = vMid; + + + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float) (1 << 11)))); + eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / ((float) (1 << 11)))); + eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + + + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + + if (area * bf * swrast->_BackfaceCullSign < 0.0) + return; + + oneOverArea = 1.0F / area; + + + span.facing = oneOverArea * bf > 0.0F; + } + + + { + eMaj.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eMaj.lines = (((((vMax_fy - eMaj.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eMaj.lines > 0) { + eMaj.dxdy = eMaj.dx / eMaj.dy; + eMaj.fdxdy = (((int) ((((eMaj.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eMaj.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eMaj.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); + eMaj.fx0 = vMin_fx; + eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * eMaj.dxdy); + } + else { + return; + } + + eTop.fsy = (((vMid_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eTop.lines = (((((vMax_fy - eTop.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eTop.lines > 0) { + eTop.dxdy = eTop.dx / eTop.dy; + eTop.fdxdy = (((int) ((((eTop.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eTop.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eTop.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); + eTop.fx0 = vMid_fx; + eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * eTop.dxdy); + } + + eBot.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eBot.lines = (((((vMid_fy - eBot.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eBot.lines > 0) { + eBot.dxdy = eBot.dx / eBot.dy; + eBot.fdxdy = (((int) ((((eBot.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eBot.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eBot.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); + eBot.fx0 = vMin_fx; + eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * eBot.dxdy); + } + } +# 319 "swrast/s_tritemp.h" + { + GLint scan_from_left_to_right; + + + + + + { ; ; } + + + scan_from_left_to_right = (oneOverArea < 0.0F); + + + + + span.interpMask |= 0x02; + { + GLfloat eMaj_dz = vMax->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + GLfloat eBot_dz = vMid->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + span.attrStepX[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); + if (span.attrStepX[FRAG_ATTRIB_WPOS][2] > maxDepth || + span.attrStepX[FRAG_ATTRIB_WPOS][2] < -maxDepth) { + + span.attrStepX[FRAG_ATTRIB_WPOS][2] = 0.0; + span.attrStepY[FRAG_ATTRIB_WPOS][2] = 0.0; + } + else { + span.attrStepY[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); + } + if (depthBits <= 16) + span.zStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))); + else + span.zStep = (GLint) span.attrStepX[FRAG_ATTRIB_WPOS][2]; + } + + + span.interpMask |= 0x01; + if (ctx->Light.ShadeModel == 0x1D01) { + GLfloat eMaj_dr = (GLfloat) (vMax->color[0] - vMin->color[0]); + GLfloat eBot_dr = (GLfloat) (vMid->color[0] - vMin->color[0]); + GLfloat eMaj_dg = (GLfloat) (vMax->color[1] - vMin->color[1]); + GLfloat eBot_dg = (GLfloat) (vMid->color[1] - vMin->color[1]); + GLfloat eMaj_db = (GLfloat) (vMax->color[2] - vMin->color[2]); + GLfloat eBot_db = (GLfloat) (vMid->color[2] - vMin->color[2]); + + GLfloat eMaj_da = (GLfloat) (vMax->color[3] - vMin->color[3]); + GLfloat eBot_da = (GLfloat) (vMid->color[3] - vMin->color[3]); + + span.attrStepX[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); + span.attrStepY[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); + span.attrStepY[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); + span.attrStepY[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); + span.redStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) - 0.5F)))); + span.greenStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) - 0.5F)))); + span.blueStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) - 0.5F)))); + + span.attrStepX[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj_da * eBot.dy - eMaj.dy * eBot_da); + span.attrStepY[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx); + span.alphaStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) - 0.5F)))); + + } + else { + ; + span.interpMask |= 0x04; + span.attrStepX[FRAG_ATTRIB_COL0][0] = span.attrStepY[FRAG_ATTRIB_COL0][0] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][1] = span.attrStepY[FRAG_ATTRIB_COL0][1] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][2] = span.attrStepY[FRAG_ATTRIB_COL0][2] = 0.0F; + span.redStep = 0; + span.greenStep = 0; + span.blueStep = 0; + + span.attrStepX[FRAG_ATTRIB_COL0][3] = span.attrStepY[FRAG_ATTRIB_COL0][3] = 0.0F; + span.alphaStep = 0; + + } +# 488 "swrast/s_tritemp.h" + { + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; + GLfixed fError = 0, fdError = 0; +# 504 "swrast/s_tritemp.h" + GLuint zLeft = 0; + GLfixed fdzOuter = 0, fdzInner; + + + GLint rLeft = 0, fdrOuter = 0, fdrInner; + GLint gLeft = 0, fdgOuter = 0, fdgInner; + GLint bLeft = 0, fdbOuter = 0, fdbInner; + + + GLint aLeft = 0, fdaOuter = 0, fdaInner; +# 525 "swrast/s_tritemp.h" + for (subTriangle=0; subTriangle<=1; subTriangle++) { + EdgeT *eLeft, *eRight; + int setupLeft, setupRight; + int lines; + + if (subTriangle==0) { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eBot; + lines = eRight->lines; + setupLeft = 1; + setupRight = 1; + } + else { + eLeft = &eBot; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 1; + } + } + else { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eTop; + lines = eRight->lines; + setupLeft = 0; + setupRight = 1; + } + else { + eLeft = &eTop; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 0; + } + if (lines == 0) + return; + } + + if (setupLeft && eLeft->lines > 0) { + const SWvertex *vLower = eLeft->v0; + const GLfixed fsy = eLeft->fsy; + const GLfixed fsx = eLeft->fsx; + const GLfixed fx = (((fsx) + (1 << 11) - 1) & (~((1 << 11) - 1))); + const GLfixed adjx = (GLfixed) (fx - eLeft->fx0); + const GLfixed adjy = (GLfixed) eLeft->adjy; + GLint idxOuter; + GLfloat dxOuter; + GLfixed fdxOuter; + + fError = fx - fsx - (1 << 11); + fxLeftEdge = fsx - 1; + fdxLeftEdge = eLeft->fdxdy; + fdxOuter = ((fdxLeftEdge - 1) & (~((1 << 11) - 1))); + fdError = fdxOuter - fdxLeftEdge + (1 << 11); + idxOuter = ((fdxOuter) >> 11); + dxOuter = (GLfloat) idxOuter; + span.y = ((fsy) >> 11); + + + (void) dxOuter; + (void) adjx; + (void) adjy; + (void) vLower; +# 611 "swrast/s_tritemp.h" + { + GLfloat z0 = vLower->attrib[FRAG_ATTRIB_WPOS][2]; + if (depthBits <= 16) { + + GLfloat tmp = (z0 * ((float) (1 << 11)) + + span.attrStepX[FRAG_ATTRIB_WPOS][2] * adjx + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * adjy) + (1 << (11 -1)); + if (tmp < 0xffffffff / 2) + zLeft = (GLfixed) tmp; + else + zLeft = 0xffffffff / 2; + fdzOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + + zLeft = (GLuint) (z0 + span.attrStepX[FRAG_ATTRIB_WPOS][2] * ((adjx) * (1.0F / ((float) (1 << 11)))) + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * ((adjy) * (1.0F / ((float) (1 << 11))))); + fdzOuter = (GLint) (span.attrStepY[FRAG_ATTRIB_WPOS][2] + + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]); + } + + + + + + } + + + if (ctx->Light.ShadeModel == 0x1D01) { + rLeft = (GLint)(((vLower->color[0]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][0] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][0] * adjy) + (1 << (11 -1)); + gLeft = (GLint)(((vLower->color[1]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][1] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][1] * adjy) + (1 << (11 -1)); + bLeft = (GLint)(((vLower->color[2]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][2] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][2] * adjy) + (1 << (11 -1)); + fdrOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) - 0.5F)))) + ; + fdgOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) - 0.5F)))) + ; + fdbOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + + aLeft = (GLint)(((vLower->color[3]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][3] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][3] * adjy) + (1 << (11 -1)); + fdaOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) - 0.5F)))) + ; + + } + else { + ; + rLeft = ((v2->color[0]) << 11); + gLeft = ((v2->color[1]) << 11); + bLeft = ((v2->color[2]) << 11); + fdrOuter = fdgOuter = fdbOuter = 0; + + aLeft = ((v2->color[3]) << 11); + fdaOuter = 0; + + } +# 722 "swrast/s_tritemp.h" + } + + + if (setupRight && eRight->lines>0) { + fxRightEdge = eRight->fsx - 1; + fdxRightEdge = eRight->fdxdy; + } + + if (lines==0) { + continue; + } +# 743 "swrast/s_tritemp.h" + fdzInner = fdzOuter + span.zStep; + + + fdrInner = fdrOuter + span.redStep; + fdgInner = fdgOuter + span.greenStep; + fdbInner = fdbOuter + span.blueStep; + + + fdaInner = fdaOuter + span.alphaStep; +# 767 "swrast/s_tritemp.h" + while (lines > 0) { + + + const GLint right = ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + + + span.z = zLeft; + + + span.red = rLeft; + span.green = gLeft; + span.blue = bLeft; + + + span.alpha = aLeft; +# 807 "swrast/s_tritemp.h" + if (span.end > 0 && span.y >= 0) { + const GLint len = span.end - 1; + (void) len; + + do { GLfixed endVal = span.red + (len) * span.redStep; if (endVal < 0) { span.red -= endVal; } if (span.red < 0) { span.red = 0; } } while (0); + do { GLfixed endVal = span.green + (len) * span.greenStep; if (endVal < 0) { span.green -= endVal; } if (span.green < 0) { span.green = 0; } } while (0); + do { GLfixed endVal = span.blue + (len) * span.blueStep; if (endVal < 0) { span.blue -= endVal; } if (span.blue < 0) { span.blue = 0; } } while (0); + + + do { GLfixed endVal = span.alpha + (len) * span.alphaStep; if (endVal < 0) { span.alpha -= endVal; } if (span.alpha < 0) { span.alpha = 0; } } while (0); + + { + _swrast_write_rgba_span(ctx, &span);; + } + } + + + + + + + + span.y++; + lines--; + + fxLeftEdge += fdxLeftEdge; + fxRightEdge += fdxRightEdge; + + fError += fdError; + if (fError >= 0) { + fError -= (1 << 11); +# 846 "swrast/s_tritemp.h" + zLeft += fdzOuter; + + + rLeft += fdrOuter; + gLeft += fdgOuter; + bLeft += fdbOuter; + + + aLeft += fdaOuter; +# 869 "swrast/s_tritemp.h" + } + else { + + + + + + + + zLeft += fdzInner; + + + rLeft += fdrInner; + gLeft += fdgInner; + bLeft += fdbInner; + + + aLeft += fdaInner; +# 901 "swrast/s_tritemp.h" + } + } + + } + + } + } +} +# 110 "swrast/s_triangle.c" 2 +# 159 "swrast/s_triangle.c" +# 1 "swrast/s_tritemp.h" 1 +# 111 "swrast/s_tritemp.h" +static void simple_textured_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + typedef struct { + const SWvertex *v0, *v1; + GLfloat dx; + GLfloat dy; + GLfloat dxdy; + GLfixed fdxdy; + GLfloat adjy; + GLfixed fsx; + GLfixed fsy; + GLfixed fx0; + GLint lines; + } EdgeT; + + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + + + + + + + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + + SWspan span; + + (void) swrast; + + do { (span).primitive = (0x0009); (span).interpMask = 0x0; (span).arrayMask = 0x0; (span).arrayAttribs = 0x0; (span).end = 0; (span).leftClip = 0; (span).facing = 0; (span).array = SWRAST_CONTEXT(ctx)->SpanArrays; } while (0); + span.y = 0; +# 172 "swrast/s_tritemp.h" + { + const GLfixed fy0 = (((int) ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = (((int) ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = (((int) ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + + vMin = v0; vMid = v1; vMax = v2; + vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; + } + else if (fy2 <= fy0) { + + vMin = v2; vMid = v0; vMax = v1; + vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; + } + else { + + vMin = v0; vMid = v2; vMax = v1; + vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; + bf = -bf; + } + } + else { + if (fy0 <= fy2) { + + vMin = v1; vMid = v0; vMax = v2; + vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; + bf = -bf; + } + else if (fy2 <= fy1) { + + vMin = v2; vMid = v1; vMax = v0; + vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; + bf = -bf; + } + else { + + vMin = v1; vMid = v2; vMax = v0; + vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; + } + } + + + vMin_fx = (((int) ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = (((int) ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMax_fx = (((int) ((((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + } + + + eMaj.v0 = vMin; eMaj.v1 = vMax; + eTop.v0 = vMid; eTop.v1 = vMax; + eBot.v0 = vMin; eBot.v1 = vMid; + + + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float) (1 << 11)))); + eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / ((float) (1 << 11)))); + eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + + + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + + if (area * bf * swrast->_BackfaceCullSign < 0.0) + return; + + oneOverArea = 1.0F / area; + + + span.facing = oneOverArea * bf > 0.0F; + } + + + { + eMaj.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eMaj.lines = (((((vMax_fy - eMaj.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eMaj.lines > 0) { + eMaj.dxdy = eMaj.dx / eMaj.dy; + eMaj.fdxdy = (((int) ((((eMaj.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eMaj.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eMaj.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); + eMaj.fx0 = vMin_fx; + eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * eMaj.dxdy); + } + else { + return; + } + + eTop.fsy = (((vMid_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eTop.lines = (((((vMax_fy - eTop.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eTop.lines > 0) { + eTop.dxdy = eTop.dx / eTop.dy; + eTop.fdxdy = (((int) ((((eTop.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eTop.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eTop.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); + eTop.fx0 = vMid_fx; + eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * eTop.dxdy); + } + + eBot.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eBot.lines = (((((vMid_fy - eBot.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eBot.lines > 0) { + eBot.dxdy = eBot.dx / eBot.dy; + eBot.fdxdy = (((int) ((((eBot.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eBot.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eBot.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); + eBot.fx0 = vMin_fx; + eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * eBot.dxdy); + } + } +# 319 "swrast/s_tritemp.h" + { + GLint scan_from_left_to_right; + + + + + + struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0]; const struct gl_texture_object *obj = ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; const struct gl_texture_image *texImg = obj->Image[0][obj->BaseLevel]; const GLfloat twidth = (GLfloat) texImg->Width; const GLfloat theight = (GLfloat) texImg->Height; const GLint twidth_log2 = texImg->WidthLog2; const GLubyte *texture = (const GLubyte *) texImg->Data; const GLint smask = texImg->Width - 1; const GLint tmask = texImg->Height - 1; ; if (!rb || !texture) { return; } + + + scan_from_left_to_right = (oneOverArea < 0.0F); +# 398 "swrast/s_tritemp.h" + { + GLfloat eMaj_ds = (vMax->attrib[FRAG_ATTRIB_TEX0][0] - vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + GLfloat eBot_ds = (vMid->attrib[FRAG_ATTRIB_TEX0][0] - vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + GLfloat eMaj_dt = (vMax->attrib[FRAG_ATTRIB_TEX0][1] - vMin->attrib[FRAG_ATTRIB_TEX0][1]) * theight; + GLfloat eBot_dt = (vMid->attrib[FRAG_ATTRIB_TEX0][1] - vMin->attrib[FRAG_ATTRIB_TEX0][1]) * theight; + span.attrStepX[FRAG_ATTRIB_TEX0][0] = oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); + span.attrStepY[FRAG_ATTRIB_TEX0][0] = oneOverArea * (eMaj.dx * eBot_ds - eMaj_ds * eBot.dx); + span.attrStepX[FRAG_ATTRIB_TEX0][1] = oneOverArea * (eMaj_dt * eBot.dy - eMaj.dy * eBot_dt); + span.attrStepY[FRAG_ATTRIB_TEX0][1] = oneOverArea * (eMaj.dx * eBot_dt - eMaj_dt * eBot.dx); + span.intTexStep[0] = (((int) ((((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) - 0.5F)))); + span.intTexStep[1] = (((int) ((((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) - 0.5F)))); + } +# 488 "swrast/s_tritemp.h" + { + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; + GLfixed fError = 0, fdError = 0; +# 516 "swrast/s_tritemp.h" + GLfixed sLeft=0, dsOuter=0, dsInner; + GLfixed tLeft=0, dtOuter=0, dtInner; + + + + + + + + for (subTriangle=0; subTriangle<=1; subTriangle++) { + EdgeT *eLeft, *eRight; + int setupLeft, setupRight; + int lines; + + if (subTriangle==0) { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eBot; + lines = eRight->lines; + setupLeft = 1; + setupRight = 1; + } + else { + eLeft = &eBot; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 1; + } + } + else { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eTop; + lines = eRight->lines; + setupLeft = 0; + setupRight = 1; + } + else { + eLeft = &eTop; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 0; + } + if (lines == 0) + return; + } + + if (setupLeft && eLeft->lines > 0) { + const SWvertex *vLower = eLeft->v0; + const GLfixed fsy = eLeft->fsy; + const GLfixed fsx = eLeft->fsx; + const GLfixed fx = (((fsx) + (1 << 11) - 1) & (~((1 << 11) - 1))); + const GLfixed adjx = (GLfixed) (fx - eLeft->fx0); + const GLfixed adjy = (GLfixed) eLeft->adjy; + GLint idxOuter; + GLfloat dxOuter; + GLfixed fdxOuter; + + fError = fx - fsx - (1 << 11); + fxLeftEdge = fsx - 1; + fdxLeftEdge = eLeft->fdxdy; + fdxOuter = ((fdxLeftEdge - 1) & (~((1 << 11) - 1))); + fdError = fdxOuter - fdxLeftEdge + (1 << 11); + idxOuter = ((fdxOuter) >> 11); + dxOuter = (GLfloat) idxOuter; + span.y = ((fsy) >> 11); + + + (void) dxOuter; + (void) adjx; + (void) adjy; + (void) vLower; +# 679 "swrast/s_tritemp.h" + { + GLfloat s0, t0; + s0 = vLower->attrib[FRAG_ATTRIB_TEX0][0] * twidth; + sLeft = (GLfixed)(s0 * ((float) (1 << 11)) + span.attrStepX[FRAG_ATTRIB_TEX0][0] * adjx + + span.attrStepY[FRAG_ATTRIB_TEX0][0] * adjy) + (1 << (11 -1)); + dsOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) - 0.5F)))) + ; + + t0 = vLower->attrib[FRAG_ATTRIB_TEX0][1] * theight; + tLeft = (GLfixed)(t0 * ((float) (1 << 11)) + span.attrStepX[FRAG_ATTRIB_TEX0][1] * adjx + + span.attrStepY[FRAG_ATTRIB_TEX0][1] * adjy) + (1 << (11 -1)); + dtOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) - 0.5F)))) + ; + } +# 722 "swrast/s_tritemp.h" + } + + + if (setupRight && eRight->lines>0) { + fxRightEdge = eRight->fsx - 1; + fdxRightEdge = eRight->fdxdy; + } + + if (lines==0) { + continue; + } +# 754 "swrast/s_tritemp.h" + dsInner = dsOuter + span.intTexStep[0]; + dtInner = dtOuter + span.intTexStep[1]; +# 767 "swrast/s_tritemp.h" + while (lines > 0) { + + + const GLint right = ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; +# 789 "swrast/s_tritemp.h" + span.intTex[0] = sLeft; + span.intTex[1] = tLeft; +# 807 "swrast/s_tritemp.h" + if (span.end > 0 && span.y >= 0) { + const GLint len = span.end - 1; + (void) len; +# 818 "swrast/s_tritemp.h" + { + GLuint i; GLubyte rgb[16384][3]; span.intTex[0] -= (1 << (11 -1)); span.intTex[1] -= (1 << (11 -1)); for (i = 0; i < span.end; i++) { GLint s = ((span.intTex[0]) >> 11) & smask; GLint t = ((span.intTex[1]) >> 11) & tmask; GLint pos = (t << twidth_log2) + s; pos = pos + pos + pos; rgb[i][0] = texture[pos+2]; rgb[i][1] = texture[pos+1]; rgb[i][2] = texture[pos+0]; span.intTex[0] += span.intTexStep[0]; span.intTex[1] += span.intTexStep[1]; } rb->PutRowRGB(ctx, rb, span.end, span.x, span.y, rgb, ((void *)0));; + } + } + + + + + + + + span.y++; + lines--; + + fxLeftEdge += fdxLeftEdge; + fxRightEdge += fdxRightEdge; + + fError += fdError; + if (fError >= 0) { + fError -= (1 << 11); +# 857 "swrast/s_tritemp.h" + sLeft += dsOuter; + tLeft += dtOuter; +# 869 "swrast/s_tritemp.h" + } + else { +# 889 "swrast/s_tritemp.h" + sLeft += dsInner; + tLeft += dtInner; +# 901 "swrast/s_tritemp.h" + } + } + + } + + } + } +} +# 160 "swrast/s_triangle.c" 2 +# 222 "swrast/s_triangle.c" +# 1 "swrast/s_tritemp.h" 1 +# 111 "swrast/s_tritemp.h" +static void simple_z_textured_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + typedef struct { + const SWvertex *v0, *v1; + GLfloat dx; + GLfloat dy; + GLfloat dxdy; + GLfixed fdxdy; + GLfloat adjy; + GLfixed fsx; + GLfixed fsy; + GLfixed fx0; + GLint lines; + } EdgeT; + + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + + const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; + const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; + const GLfloat maxDepth = ctx->DrawBuffer->_DepthMaxF; + + + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + + SWspan span; + + (void) swrast; + + do { (span).primitive = (0x0009); (span).interpMask = 0x0; (span).arrayMask = 0x0; (span).arrayAttribs = 0x0; (span).end = 0; (span).leftClip = 0; (span).facing = 0; (span).array = SWRAST_CONTEXT(ctx)->SpanArrays; } while (0); + span.y = 0; + + + (void) fixedToDepthShift; +# 172 "swrast/s_tritemp.h" + { + const GLfixed fy0 = (((int) ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = (((int) ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = (((int) ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + + vMin = v0; vMid = v1; vMax = v2; + vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; + } + else if (fy2 <= fy0) { + + vMin = v2; vMid = v0; vMax = v1; + vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; + } + else { + + vMin = v0; vMid = v2; vMax = v1; + vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; + bf = -bf; + } + } + else { + if (fy0 <= fy2) { + + vMin = v1; vMid = v0; vMax = v2; + vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; + bf = -bf; + } + else if (fy2 <= fy1) { + + vMin = v2; vMid = v1; vMax = v0; + vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; + bf = -bf; + } + else { + + vMin = v1; vMid = v2; vMax = v0; + vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; + } + } + + + vMin_fx = (((int) ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = (((int) ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMax_fx = (((int) ((((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + } + + + eMaj.v0 = vMin; eMaj.v1 = vMax; + eTop.v0 = vMid; eTop.v1 = vMax; + eBot.v0 = vMin; eBot.v1 = vMid; + + + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float) (1 << 11)))); + eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / ((float) (1 << 11)))); + eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + + + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + + if (area * bf * swrast->_BackfaceCullSign < 0.0) + return; + + oneOverArea = 1.0F / area; + + + span.facing = oneOverArea * bf > 0.0F; + } + + + { + eMaj.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eMaj.lines = (((((vMax_fy - eMaj.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eMaj.lines > 0) { + eMaj.dxdy = eMaj.dx / eMaj.dy; + eMaj.fdxdy = (((int) ((((eMaj.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eMaj.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eMaj.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); + eMaj.fx0 = vMin_fx; + eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * eMaj.dxdy); + } + else { + return; + } + + eTop.fsy = (((vMid_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eTop.lines = (((((vMax_fy - eTop.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eTop.lines > 0) { + eTop.dxdy = eTop.dx / eTop.dy; + eTop.fdxdy = (((int) ((((eTop.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eTop.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eTop.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); + eTop.fx0 = vMid_fx; + eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * eTop.dxdy); + } + + eBot.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eBot.lines = (((((vMid_fy - eBot.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eBot.lines > 0) { + eBot.dxdy = eBot.dx / eBot.dy; + eBot.fdxdy = (((int) ((((eBot.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eBot.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eBot.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); + eBot.fx0 = vMin_fx; + eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * eBot.dxdy); + } + } +# 319 "swrast/s_tritemp.h" + { + GLint scan_from_left_to_right; + + + + + + struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0]; const struct gl_texture_object *obj = ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; const struct gl_texture_image *texImg = obj->Image[0][obj->BaseLevel]; const GLfloat twidth = (GLfloat) texImg->Width; const GLfloat theight = (GLfloat) texImg->Height; const GLint twidth_log2 = texImg->WidthLog2; const GLubyte *texture = (const GLubyte *) texImg->Data; const GLint smask = texImg->Width - 1; const GLint tmask = texImg->Height - 1; ; if (!rb || !texture) { return; } + + + scan_from_left_to_right = (oneOverArea < 0.0F); + + + + + span.interpMask |= 0x02; + { + GLfloat eMaj_dz = vMax->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + GLfloat eBot_dz = vMid->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + span.attrStepX[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); + if (span.attrStepX[FRAG_ATTRIB_WPOS][2] > maxDepth || + span.attrStepX[FRAG_ATTRIB_WPOS][2] < -maxDepth) { + + span.attrStepX[FRAG_ATTRIB_WPOS][2] = 0.0; + span.attrStepY[FRAG_ATTRIB_WPOS][2] = 0.0; + } + else { + span.attrStepY[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); + } + if (depthBits <= 16) + span.zStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))); + else + span.zStep = (GLint) span.attrStepX[FRAG_ATTRIB_WPOS][2]; + } +# 398 "swrast/s_tritemp.h" + { + GLfloat eMaj_ds = (vMax->attrib[FRAG_ATTRIB_TEX0][0] - vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + GLfloat eBot_ds = (vMid->attrib[FRAG_ATTRIB_TEX0][0] - vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + GLfloat eMaj_dt = (vMax->attrib[FRAG_ATTRIB_TEX0][1] - vMin->attrib[FRAG_ATTRIB_TEX0][1]) * theight; + GLfloat eBot_dt = (vMid->attrib[FRAG_ATTRIB_TEX0][1] - vMin->attrib[FRAG_ATTRIB_TEX0][1]) * theight; + span.attrStepX[FRAG_ATTRIB_TEX0][0] = oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); + span.attrStepY[FRAG_ATTRIB_TEX0][0] = oneOverArea * (eMaj.dx * eBot_ds - eMaj_ds * eBot.dx); + span.attrStepX[FRAG_ATTRIB_TEX0][1] = oneOverArea * (eMaj_dt * eBot.dy - eMaj.dy * eBot_dt); + span.attrStepY[FRAG_ATTRIB_TEX0][1] = oneOverArea * (eMaj.dx * eBot_dt - eMaj_dt * eBot.dx); + span.intTexStep[0] = (((int) ((((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) - 0.5F)))); + span.intTexStep[1] = (((int) ((((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) - 0.5F)))); + } +# 488 "swrast/s_tritemp.h" + { + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; + GLfixed fError = 0, fdError = 0; + + + + + + + struct gl_renderbuffer *zrb + = ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Renderbuffer; + GLushort *zRow = ((void *)0); + GLint dZRowOuter = 0, dZRowInner; + + GLuint zLeft = 0; + GLfixed fdzOuter = 0, fdzInner; +# 516 "swrast/s_tritemp.h" + GLfixed sLeft=0, dsOuter=0, dsInner; + GLfixed tLeft=0, dtOuter=0, dtInner; + + + + + + + + for (subTriangle=0; subTriangle<=1; subTriangle++) { + EdgeT *eLeft, *eRight; + int setupLeft, setupRight; + int lines; + + if (subTriangle==0) { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eBot; + lines = eRight->lines; + setupLeft = 1; + setupRight = 1; + } + else { + eLeft = &eBot; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 1; + } + } + else { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eTop; + lines = eRight->lines; + setupLeft = 0; + setupRight = 1; + } + else { + eLeft = &eTop; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 0; + } + if (lines == 0) + return; + } + + if (setupLeft && eLeft->lines > 0) { + const SWvertex *vLower = eLeft->v0; + const GLfixed fsy = eLeft->fsy; + const GLfixed fsx = eLeft->fsx; + const GLfixed fx = (((fsx) + (1 << 11) - 1) & (~((1 << 11) - 1))); + const GLfixed adjx = (GLfixed) (fx - eLeft->fx0); + const GLfixed adjy = (GLfixed) eLeft->adjy; + GLint idxOuter; + GLfloat dxOuter; + GLfixed fdxOuter; + + fError = fx - fsx - (1 << 11); + fxLeftEdge = fsx - 1; + fdxLeftEdge = eLeft->fdxdy; + fdxOuter = ((fdxLeftEdge - 1) & (~((1 << 11) - 1))); + fdError = fdxOuter - fdxLeftEdge + (1 << 11); + idxOuter = ((fdxOuter) >> 11); + dxOuter = (GLfloat) idxOuter; + span.y = ((fsy) >> 11); + + + (void) dxOuter; + (void) adjx; + (void) adjy; + (void) vLower; +# 611 "swrast/s_tritemp.h" + { + GLfloat z0 = vLower->attrib[FRAG_ATTRIB_WPOS][2]; + if (depthBits <= 16) { + + GLfloat tmp = (z0 * ((float) (1 << 11)) + + span.attrStepX[FRAG_ATTRIB_WPOS][2] * adjx + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * adjy) + (1 << (11 -1)); + if (tmp < 0xffffffff / 2) + zLeft = (GLfixed) tmp; + else + zLeft = 0xffffffff / 2; + fdzOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + + zLeft = (GLuint) (z0 + span.attrStepX[FRAG_ATTRIB_WPOS][2] * ((adjx) * (1.0F / ((float) (1 << 11)))) + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * ((adjy) * (1.0F / ((float) (1 << 11))))); + fdzOuter = (GLint) (span.attrStepY[FRAG_ATTRIB_WPOS][2] + + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]); + } + + zRow = (GLushort *) + zrb->GetPointer(ctx, zrb, ((fxLeftEdge) >> 11), span.y); + dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); + + } +# 679 "swrast/s_tritemp.h" + { + GLfloat s0, t0; + s0 = vLower->attrib[FRAG_ATTRIB_TEX0][0] * twidth; + sLeft = (GLfixed)(s0 * ((float) (1 << 11)) + span.attrStepX[FRAG_ATTRIB_TEX0][0] * adjx + + span.attrStepY[FRAG_ATTRIB_TEX0][0] * adjy) + (1 << (11 -1)); + dsOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) - 0.5F)))) + ; + + t0 = vLower->attrib[FRAG_ATTRIB_TEX0][1] * theight; + tLeft = (GLfixed)(t0 * ((float) (1 << 11)) + span.attrStepX[FRAG_ATTRIB_TEX0][1] * adjx + + span.attrStepY[FRAG_ATTRIB_TEX0][1] * adjy) + (1 << (11 -1)); + dtOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) - 0.5F)))) + ; + } +# 722 "swrast/s_tritemp.h" + } + + + if (setupRight && eRight->lines>0) { + fxRightEdge = eRight->fsx - 1; + fdxRightEdge = eRight->fdxdy; + } + + if (lines==0) { + continue; + } +# 741 "swrast/s_tritemp.h" + dZRowInner = dZRowOuter + sizeof(GLushort); + + fdzInner = fdzOuter + span.zStep; +# 754 "swrast/s_tritemp.h" + dsInner = dsOuter + span.intTexStep[0]; + dtInner = dtOuter + span.intTexStep[1]; +# 767 "swrast/s_tritemp.h" + while (lines > 0) { + + + const GLint right = ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + + + span.z = zLeft; +# 789 "swrast/s_tritemp.h" + span.intTex[0] = sLeft; + span.intTex[1] = tLeft; +# 807 "swrast/s_tritemp.h" + if (span.end > 0 && span.y >= 0) { + const GLint len = span.end - 1; + (void) len; +# 818 "swrast/s_tritemp.h" + { + GLuint i; GLubyte rgb[16384][3]; span.intTex[0] -= (1 << (11 -1)); span.intTex[1] -= (1 << (11 -1)); for (i = 0; i < span.end; i++) { const GLuint z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { GLint s = ((span.intTex[0]) >> 11) & smask; GLint t = ((span.intTex[1]) >> 11) & tmask; GLint pos = (t << twidth_log2) + s; pos = pos + pos + pos; rgb[i][0] = texture[pos+2]; rgb[i][1] = texture[pos+1]; rgb[i][2] = texture[pos+0]; zRow[i] = z; span.array->mask[i] = 1; } else { span.array->mask[i] = 0; } span.intTex[0] += span.intTexStep[0]; span.intTex[1] += span.intTexStep[1]; span.z += span.zStep; } rb->PutRowRGB(ctx, rb, span.end, span.x, span.y, rgb, span.array->mask);; + } + } + + + + + + + + span.y++; + lines--; + + fxLeftEdge += fdxLeftEdge; + fxRightEdge += fdxRightEdge; + + fError += fdError; + if (fError >= 0) { + fError -= (1 << 11); + + + + + + + zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); + + zLeft += fdzOuter; +# 857 "swrast/s_tritemp.h" + sLeft += dsOuter; + tLeft += dtOuter; +# 869 "swrast/s_tritemp.h" + } + else { + + + + + + zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); + + zLeft += fdzInner; +# 889 "swrast/s_tritemp.h" + sLeft += dsInner; + tLeft += dtInner; +# 901 "swrast/s_tritemp.h" + } + } + + } + + } + } +} +# 223 "swrast/s_triangle.c" 2 + + + + +struct affine_info +{ + GLenum filter; + GLenum format; + GLenum envmode; + GLint smask, tmask; + GLint twidth_log2; + const GLchan *texture; + GLfixed er, eg, eb, ea; + GLint tbytesline, tsize; +}; + + +static __inline__ GLint +ilerp(GLint t, GLint a, GLint b) +{ + return a + ((t * (b - a)) >> 11); +} + +static __inline__ GLint +ilerp_2d(GLint ia, GLint ib, GLint v00, GLint v10, GLint v01, GLint v11) +{ + const GLint temp0 = ilerp(ia, v00, v10); + const GLint temp1 = ilerp(ia, v01, v11); + return ilerp(ib, temp0, temp1); +} + + + + + + +static __inline__ void +affine_span(struct gl_context *ctx, SWspan *span, + struct affine_info *info) +{ + GLchan sample[4]; + const GLuint texEnableSave = ctx->Texture._EnabledCoordUnits; +# 399 "swrast/s_triangle.c" + GLuint i; + GLchan *dest = span->array->rgba[0]; + + + ctx->Texture._EnabledCoordUnits = 0x0; + + span->intTex[0] -= (1 << (11 -1)); + span->intTex[1] -= (1 << (11 -1)); + switch (info->filter) { + case 0x2600: + switch (info->format) { + case MESA_FORMAT_RGB888: + switch (info->envmode) { + case 0x2100: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; sample[0] = tex00[2]; sample[1] = tex00[1]; sample[2] = tex00[0]; sample[3] = 255;;dest[0] = span->red * (sample[0] + 1u) >> (11 + 8); dest[1] = span->green * (sample[1] + 1u) >> (11 + 8); dest[2] = span->blue * (sample[2] + 1u) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1u) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x2101: + case 0x1E01: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; sample[0] = tex00[2]; sample[1] = tex00[1]; sample[2] = tex00[0]; sample[3] = 255;; dest[0] = sample[0]; dest[1] = sample[1]; dest[2] = sample[2]; dest[3] = ((span->alpha) >> 11);; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x0BE2: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; sample[0] = tex00[2]; sample[1] = tex00[1]; sample[2] = tex00[0]; sample[3] = 255;;dest[0] = ((255 - sample[0]) * span->red + (sample[0] + 1) * info->er) >> (11 + 8); dest[1] = ((255 - sample[1]) * span->green + (sample[1] + 1) * info->eg) >> (11 + 8); dest[2] = ((255 - sample[2]) * span->blue + (sample[2] + 1) * info->eb) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x0104: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; sample[0] = tex00[2]; sample[1] = tex00[1]; sample[2] = tex00[0]; sample[3] = 255;;{ GLint rSum = ((span->red) >> 11) + (GLint) sample[0]; GLint gSum = ((span->green) >> 11) + (GLint) sample[1]; GLint bSum = ((span->blue) >> 11) + (GLint) sample[2]; dest[0] = ( (rSum)<(255) ? (rSum) : (255) ); dest[1] = ( (gSum)<(255) ? (gSum) : (255) ); dest[2] = ( (bSum)<(255) ? (bSum) : (255) ); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); }; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + default: + _mesa_problem(ctx, "bad tex env mode in SPAN_LINEAR"); + return; + } + break; + case MESA_FORMAT_RGBA8888: + switch(info->envmode) { + case 0x2100: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; sample[0] = tex00[3]; sample[1] = tex00[2]; sample[2] = tex00[1]; sample[3] = tex00[0];;dest[0] = span->red * (sample[0] + 1u) >> (11 + 8); dest[1] = span->green * (sample[1] + 1u) >> (11 + 8); dest[2] = span->blue * (sample[2] + 1u) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1u) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x2101: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; sample[0] = tex00[3]; sample[1] = tex00[2]; sample[2] = tex00[1]; sample[3] = tex00[0];;dest[0] = ((255 - sample[3]) * span->red + ((sample[3] + 1) * sample[0] << 11)) >> (11 + 8); dest[1] = ((255 - sample[3]) * span->green + ((sample[3] + 1) * sample[1] << 11)) >> (11 + 8); dest[2] = ((255 - sample[3]) * span->blue + ((sample[3] + 1) * sample[2] << 11)) >> (11 + 8); dest[3] = ((span->alpha) >> 11); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x0BE2: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; sample[0] = tex00[3]; sample[1] = tex00[2]; sample[2] = tex00[1]; sample[3] = tex00[0];;dest[0] = ((255 - sample[0]) * span->red + (sample[0] + 1) * info->er) >> (11 + 8); dest[1] = ((255 - sample[1]) * span->green + (sample[1] + 1) * info->eg) >> (11 + 8); dest[2] = ((255 - sample[2]) * span->blue + (sample[2] + 1) * info->eb) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x0104: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; sample[0] = tex00[3]; sample[1] = tex00[2]; sample[2] = tex00[1]; sample[3] = tex00[0];;{ GLint rSum = ((span->red) >> 11) + (GLint) sample[0]; GLint gSum = ((span->green) >> 11) + (GLint) sample[1]; GLint bSum = ((span->blue) >> 11) + (GLint) sample[2]; dest[0] = ( (rSum)<(255) ? (rSum) : (255) ); dest[1] = ( (gSum)<(255) ? (gSum) : (255) ); dest[2] = ( (bSum)<(255) ? (bSum) : (255) ); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); }; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x1E01: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; dest[0] = tex00[3]; dest[1] = tex00[2]; dest[2] = tex00[1]; dest[3] = tex00[0]; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + default: + _mesa_problem(ctx, "bad tex env mode (2) in SPAN_LINEAR"); + return; + } + break; + } + break; + + case 0x2601: + span->intTex[0] -= (1 << (11 -1)); + span->intTex[1] -= (1 << (11 -1)); + switch (info->format) { + case MESA_FORMAT_RGB888: + switch (info->envmode) { + case 0x2100: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 3; const GLchan *tex11 = tex10 + 3; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[1] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[2] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]); sample[3] = 255;;dest[0] = span->red * (sample[0] + 1u) >> (11 + 8); dest[1] = span->green * (sample[1] + 1u) >> (11 + 8); dest[2] = span->blue * (sample[2] + 1u) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1u) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x2101: + case 0x1E01: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 3; const GLchan *tex11 = tex10 + 3; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[1] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[2] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]); sample[3] = 255;;do { (dest)[0] = (sample)[0]; (dest)[1] = (sample)[1]; (dest)[2] = (sample)[2]; (dest)[3] = (sample)[3]; } while (0); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x0BE2: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 3; const GLchan *tex11 = tex10 + 3; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[1] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[2] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]); sample[3] = 255;;dest[0] = ((255 - sample[0]) * span->red + (sample[0] + 1) * info->er) >> (11 + 8); dest[1] = ((255 - sample[1]) * span->green + (sample[1] + 1) * info->eg) >> (11 + 8); dest[2] = ((255 - sample[2]) * span->blue + (sample[2] + 1) * info->eb) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x0104: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 3; const GLchan *tex11 = tex10 + 3; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[1] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[2] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]); sample[3] = 255;;{ GLint rSum = ((span->red) >> 11) + (GLint) sample[0]; GLint gSum = ((span->green) >> 11) + (GLint) sample[1]; GLint bSum = ((span->blue) >> 11) + (GLint) sample[2]; dest[0] = ( (rSum)<(255) ? (rSum) : (255) ); dest[1] = ( (gSum)<(255) ? (gSum) : (255) ); dest[2] = ( (bSum)<(255) ? (bSum) : (255) ); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); }; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + default: + _mesa_problem(ctx, "bad tex env mode (3) in SPAN_LINEAR"); + return; + } + break; + case MESA_FORMAT_RGBA8888: + switch (info->envmode) { + case 0x2100: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);dest[0] = span->red * (sample[0] + 1u) >> (11 + 8); dest[1] = span->green * (sample[1] + 1u) >> (11 + 8); dest[2] = span->blue * (sample[2] + 1u) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1u) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x2101: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);dest[0] = ((255 - sample[3]) * span->red + ((sample[3] + 1) * sample[0] << 11)) >> (11 + 8); dest[1] = ((255 - sample[3]) * span->green + ((sample[3] + 1) * sample[1] << 11)) >> (11 + 8); dest[2] = ((255 - sample[3]) * span->blue + ((sample[3] + 1) * sample[2] << 11)) >> (11 + 8); dest[3] = ((span->alpha) >> 11); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x0BE2: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);dest[0] = ((255 - sample[0]) * span->red + (sample[0] + 1) * info->er) >> (11 + 8); dest[1] = ((255 - sample[1]) * span->green + (sample[1] + 1) * info->eg) >> (11 + 8); dest[2] = ((255 - sample[2]) * span->blue + (sample[2] + 1) * info->eb) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x0104: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);{ GLint rSum = ((span->red) >> 11) + (GLint) sample[0]; GLint gSum = ((span->green) >> 11) + (GLint) sample[1]; GLint bSum = ((span->blue) >> 11) + (GLint) sample[2]; dest[0] = ( (rSum)<(255) ? (rSum) : (255) ); dest[1] = ( (gSum)<(255) ? (gSum) : (255) ); dest[2] = ( (bSum)<(255) ? (bSum) : (255) ); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); }; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x1E01: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);do { (dest)[0] = (sample)[0]; (dest)[1] = (sample)[1]; (dest)[2] = (sample)[2]; (dest)[3] = (sample)[3]; } while (0); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + default: + _mesa_problem(ctx, "bad tex env mode (4) in SPAN_LINEAR"); + return; + } + break; + } + break; + } + span->interpMask &= ~0x01; + ; + + _swrast_write_rgba_span(ctx, span); + + + ctx->Texture._EnabledCoordUnits = texEnableSave; + + + +} +# 577 "swrast/s_triangle.c" +# 1 "swrast/s_tritemp.h" 1 +# 111 "swrast/s_tritemp.h" +static void affine_textured_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + typedef struct { + const SWvertex *v0, *v1; + GLfloat dx; + GLfloat dy; + GLfloat dxdy; + GLfixed fdxdy; + GLfloat adjy; + GLfixed fsx; + GLfixed fsy; + GLfixed fx0; + GLint lines; + } EdgeT; + + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + + const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; + const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; + const GLfloat maxDepth = ctx->DrawBuffer->_DepthMaxF; + + + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + + SWspan span; + + (void) swrast; + + do { (span).primitive = (0x0009); (span).interpMask = 0x0; (span).arrayMask = 0x0; (span).arrayAttribs = 0x0; (span).end = 0; (span).leftClip = 0; (span).facing = 0; (span).array = SWRAST_CONTEXT(ctx)->SpanArrays; } while (0); + span.y = 0; + + + (void) fixedToDepthShift; +# 172 "swrast/s_tritemp.h" + { + const GLfixed fy0 = (((int) ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = (((int) ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = (((int) ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + + vMin = v0; vMid = v1; vMax = v2; + vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; + } + else if (fy2 <= fy0) { + + vMin = v2; vMid = v0; vMax = v1; + vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; + } + else { + + vMin = v0; vMid = v2; vMax = v1; + vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; + bf = -bf; + } + } + else { + if (fy0 <= fy2) { + + vMin = v1; vMid = v0; vMax = v2; + vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; + bf = -bf; + } + else if (fy2 <= fy1) { + + vMin = v2; vMid = v1; vMax = v0; + vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; + bf = -bf; + } + else { + + vMin = v1; vMid = v2; vMax = v0; + vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; + } + } + + + vMin_fx = (((int) ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = (((int) ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMax_fx = (((int) ((((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + } + + + eMaj.v0 = vMin; eMaj.v1 = vMax; + eTop.v0 = vMid; eTop.v1 = vMax; + eBot.v0 = vMin; eBot.v1 = vMid; + + + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float) (1 << 11)))); + eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / ((float) (1 << 11)))); + eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + + + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + + if (area * bf * swrast->_BackfaceCullSign < 0.0) + return; + + oneOverArea = 1.0F / area; + + + span.facing = oneOverArea * bf > 0.0F; + } + + + { + eMaj.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eMaj.lines = (((((vMax_fy - eMaj.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eMaj.lines > 0) { + eMaj.dxdy = eMaj.dx / eMaj.dy; + eMaj.fdxdy = (((int) ((((eMaj.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eMaj.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eMaj.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); + eMaj.fx0 = vMin_fx; + eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * eMaj.dxdy); + } + else { + return; + } + + eTop.fsy = (((vMid_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eTop.lines = (((((vMax_fy - eTop.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eTop.lines > 0) { + eTop.dxdy = eTop.dx / eTop.dy; + eTop.fdxdy = (((int) ((((eTop.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eTop.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eTop.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); + eTop.fx0 = vMid_fx; + eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * eTop.dxdy); + } + + eBot.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eBot.lines = (((((vMid_fy - eBot.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eBot.lines > 0) { + eBot.dxdy = eBot.dx / eBot.dy; + eBot.fdxdy = (((int) ((((eBot.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eBot.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eBot.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); + eBot.fx0 = vMin_fx; + eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * eBot.dxdy); + } + } +# 319 "swrast/s_tritemp.h" + { + GLint scan_from_left_to_right; + + + + + + struct affine_info info; struct gl_texture_unit *unit = ctx->Texture.Unit+0; const struct gl_texture_object *obj = ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; const struct gl_texture_image *texImg = obj->Image[0][obj->BaseLevel]; const GLfloat twidth = (GLfloat) texImg->Width; const GLfloat theight = (GLfloat) texImg->Height; info.texture = (const GLchan *) texImg->Data; info.twidth_log2 = texImg->WidthLog2; info.smask = texImg->Width - 1; info.tmask = texImg->Height - 1; info.format = texImg->TexFormat; info.filter = obj->Sampler.MinFilter; info.envmode = unit->EnvMode; info.er = 0; info.eg = 0; info.eb = 0; span.arrayMask |= 0x01; if (info.envmode == 0x0BE2) { info.er = (((int) ((((unit->EnvColor[0] * 255.0F) * ((float) (1 << 11))) >= 0.0F) ? (((unit->EnvColor[0] * 255.0F) * ((float) (1 << 11))) + 0.5F) : (((unit->EnvColor[0] * 255.0F) * ((float) (1 << 11))) - 0.5F)))); info.eg = (((int) ((((unit->EnvColor[1] * 255.0F) * ((float) (1 << 11))) >= 0.0F) ? (((unit->EnvColor[1] * 255.0F) * ((float) (1 << 11))) + 0.5F) : (((unit->EnvColor[1] * 255.0F) * ((float) (1 << 11))) - 0.5F)))); info.eb = (((int) ((((unit->EnvColor[2] * 255.0F) * ((float) (1 << 11))) >= 0.0F) ? (((unit->EnvColor[2] * 255.0F) * ((float) (1 << 11))) + 0.5F) : (((unit->EnvColor[2] * 255.0F) * ((float) (1 << 11))) - 0.5F)))); info.ea = (((int) ((((unit->EnvColor[3] * 255.0F) * ((float) (1 << 11))) >= 0.0F) ? (((unit->EnvColor[3] * 255.0F) * ((float) (1 << 11))) + 0.5F) : (((unit->EnvColor[3] * 255.0F) * ((float) (1 << 11))) - 0.5F)))); } if (!info.texture) { return; } switch (info.format) { case MESA_FORMAT_RGB888: info.tbytesline = texImg->Width * 3; break; case MESA_FORMAT_RGBA8888: info.tbytesline = texImg->Width * 4; break; default: _mesa_problem(((void *)0), "Bad texture format in affine_texture_triangle"); return; } info.tsize = texImg->Height * info.tbytesline; + + + scan_from_left_to_right = (oneOverArea < 0.0F); + + + + + span.interpMask |= 0x02; + { + GLfloat eMaj_dz = vMax->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + GLfloat eBot_dz = vMid->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + span.attrStepX[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); + if (span.attrStepX[FRAG_ATTRIB_WPOS][2] > maxDepth || + span.attrStepX[FRAG_ATTRIB_WPOS][2] < -maxDepth) { + + span.attrStepX[FRAG_ATTRIB_WPOS][2] = 0.0; + span.attrStepY[FRAG_ATTRIB_WPOS][2] = 0.0; + } + else { + span.attrStepY[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); + } + if (depthBits <= 16) + span.zStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))); + else + span.zStep = (GLint) span.attrStepX[FRAG_ATTRIB_WPOS][2]; + } + + + span.interpMask |= 0x01; + if (ctx->Light.ShadeModel == 0x1D01) { + GLfloat eMaj_dr = (GLfloat) (vMax->color[0] - vMin->color[0]); + GLfloat eBot_dr = (GLfloat) (vMid->color[0] - vMin->color[0]); + GLfloat eMaj_dg = (GLfloat) (vMax->color[1] - vMin->color[1]); + GLfloat eBot_dg = (GLfloat) (vMid->color[1] - vMin->color[1]); + GLfloat eMaj_db = (GLfloat) (vMax->color[2] - vMin->color[2]); + GLfloat eBot_db = (GLfloat) (vMid->color[2] - vMin->color[2]); + + GLfloat eMaj_da = (GLfloat) (vMax->color[3] - vMin->color[3]); + GLfloat eBot_da = (GLfloat) (vMid->color[3] - vMin->color[3]); + + span.attrStepX[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); + span.attrStepY[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); + span.attrStepY[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); + span.attrStepY[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); + span.redStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) - 0.5F)))); + span.greenStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) - 0.5F)))); + span.blueStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) - 0.5F)))); + + span.attrStepX[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj_da * eBot.dy - eMaj.dy * eBot_da); + span.attrStepY[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx); + span.alphaStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) - 0.5F)))); + + } + else { + ; + span.interpMask |= 0x04; + span.attrStepX[FRAG_ATTRIB_COL0][0] = span.attrStepY[FRAG_ATTRIB_COL0][0] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][1] = span.attrStepY[FRAG_ATTRIB_COL0][1] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][2] = span.attrStepY[FRAG_ATTRIB_COL0][2] = 0.0F; + span.redStep = 0; + span.greenStep = 0; + span.blueStep = 0; + + span.attrStepX[FRAG_ATTRIB_COL0][3] = span.attrStepY[FRAG_ATTRIB_COL0][3] = 0.0F; + span.alphaStep = 0; + + } + + + { + GLfloat eMaj_ds = (vMax->attrib[FRAG_ATTRIB_TEX0][0] - vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + GLfloat eBot_ds = (vMid->attrib[FRAG_ATTRIB_TEX0][0] - vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + GLfloat eMaj_dt = (vMax->attrib[FRAG_ATTRIB_TEX0][1] - vMin->attrib[FRAG_ATTRIB_TEX0][1]) * theight; + GLfloat eBot_dt = (vMid->attrib[FRAG_ATTRIB_TEX0][1] - vMin->attrib[FRAG_ATTRIB_TEX0][1]) * theight; + span.attrStepX[FRAG_ATTRIB_TEX0][0] = oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); + span.attrStepY[FRAG_ATTRIB_TEX0][0] = oneOverArea * (eMaj.dx * eBot_ds - eMaj_ds * eBot.dx); + span.attrStepX[FRAG_ATTRIB_TEX0][1] = oneOverArea * (eMaj_dt * eBot.dy - eMaj.dy * eBot_dt); + span.attrStepY[FRAG_ATTRIB_TEX0][1] = oneOverArea * (eMaj.dx * eBot_dt - eMaj_dt * eBot.dx); + span.intTexStep[0] = (((int) ((((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) - 0.5F)))); + span.intTexStep[1] = (((int) ((((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) - 0.5F)))); + } +# 488 "swrast/s_tritemp.h" + { + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; + GLfixed fError = 0, fdError = 0; +# 504 "swrast/s_tritemp.h" + GLuint zLeft = 0; + GLfixed fdzOuter = 0, fdzInner; + + + GLint rLeft = 0, fdrOuter = 0, fdrInner; + GLint gLeft = 0, fdgOuter = 0, fdgInner; + GLint bLeft = 0, fdbOuter = 0, fdbInner; + + + GLint aLeft = 0, fdaOuter = 0, fdaInner; + + + GLfixed sLeft=0, dsOuter=0, dsInner; + GLfixed tLeft=0, dtOuter=0, dtInner; + + + + + + + + for (subTriangle=0; subTriangle<=1; subTriangle++) { + EdgeT *eLeft, *eRight; + int setupLeft, setupRight; + int lines; + + if (subTriangle==0) { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eBot; + lines = eRight->lines; + setupLeft = 1; + setupRight = 1; + } + else { + eLeft = &eBot; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 1; + } + } + else { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eTop; + lines = eRight->lines; + setupLeft = 0; + setupRight = 1; + } + else { + eLeft = &eTop; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 0; + } + if (lines == 0) + return; + } + + if (setupLeft && eLeft->lines > 0) { + const SWvertex *vLower = eLeft->v0; + const GLfixed fsy = eLeft->fsy; + const GLfixed fsx = eLeft->fsx; + const GLfixed fx = (((fsx) + (1 << 11) - 1) & (~((1 << 11) - 1))); + const GLfixed adjx = (GLfixed) (fx - eLeft->fx0); + const GLfixed adjy = (GLfixed) eLeft->adjy; + GLint idxOuter; + GLfloat dxOuter; + GLfixed fdxOuter; + + fError = fx - fsx - (1 << 11); + fxLeftEdge = fsx - 1; + fdxLeftEdge = eLeft->fdxdy; + fdxOuter = ((fdxLeftEdge - 1) & (~((1 << 11) - 1))); + fdError = fdxOuter - fdxLeftEdge + (1 << 11); + idxOuter = ((fdxOuter) >> 11); + dxOuter = (GLfloat) idxOuter; + span.y = ((fsy) >> 11); + + + (void) dxOuter; + (void) adjx; + (void) adjy; + (void) vLower; +# 611 "swrast/s_tritemp.h" + { + GLfloat z0 = vLower->attrib[FRAG_ATTRIB_WPOS][2]; + if (depthBits <= 16) { + + GLfloat tmp = (z0 * ((float) (1 << 11)) + + span.attrStepX[FRAG_ATTRIB_WPOS][2] * adjx + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * adjy) + (1 << (11 -1)); + if (tmp < 0xffffffff / 2) + zLeft = (GLfixed) tmp; + else + zLeft = 0xffffffff / 2; + fdzOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + + zLeft = (GLuint) (z0 + span.attrStepX[FRAG_ATTRIB_WPOS][2] * ((adjx) * (1.0F / ((float) (1 << 11)))) + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * ((adjy) * (1.0F / ((float) (1 << 11))))); + fdzOuter = (GLint) (span.attrStepY[FRAG_ATTRIB_WPOS][2] + + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]); + } + + + + + + } + + + if (ctx->Light.ShadeModel == 0x1D01) { + rLeft = (GLint)(((vLower->color[0]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][0] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][0] * adjy) + (1 << (11 -1)); + gLeft = (GLint)(((vLower->color[1]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][1] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][1] * adjy) + (1 << (11 -1)); + bLeft = (GLint)(((vLower->color[2]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][2] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][2] * adjy) + (1 << (11 -1)); + fdrOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) - 0.5F)))) + ; + fdgOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) - 0.5F)))) + ; + fdbOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + + aLeft = (GLint)(((vLower->color[3]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][3] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][3] * adjy) + (1 << (11 -1)); + fdaOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) - 0.5F)))) + ; + + } + else { + ; + rLeft = ((v2->color[0]) << 11); + gLeft = ((v2->color[1]) << 11); + bLeft = ((v2->color[2]) << 11); + fdrOuter = fdgOuter = fdbOuter = 0; + + aLeft = ((v2->color[3]) << 11); + fdaOuter = 0; + + } + + + + + { + GLfloat s0, t0; + s0 = vLower->attrib[FRAG_ATTRIB_TEX0][0] * twidth; + sLeft = (GLfixed)(s0 * ((float) (1 << 11)) + span.attrStepX[FRAG_ATTRIB_TEX0][0] * adjx + + span.attrStepY[FRAG_ATTRIB_TEX0][0] * adjy) + (1 << (11 -1)); + dsOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) - 0.5F)))) + ; + + t0 = vLower->attrib[FRAG_ATTRIB_TEX0][1] * theight; + tLeft = (GLfixed)(t0 * ((float) (1 << 11)) + span.attrStepX[FRAG_ATTRIB_TEX0][1] * adjx + + span.attrStepY[FRAG_ATTRIB_TEX0][1] * adjy) + (1 << (11 -1)); + dtOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) - 0.5F)))) + ; + } +# 722 "swrast/s_tritemp.h" + } + + + if (setupRight && eRight->lines>0) { + fxRightEdge = eRight->fsx - 1; + fdxRightEdge = eRight->fdxdy; + } + + if (lines==0) { + continue; + } +# 743 "swrast/s_tritemp.h" + fdzInner = fdzOuter + span.zStep; + + + fdrInner = fdrOuter + span.redStep; + fdgInner = fdgOuter + span.greenStep; + fdbInner = fdbOuter + span.blueStep; + + + fdaInner = fdaOuter + span.alphaStep; + + + dsInner = dsOuter + span.intTexStep[0]; + dtInner = dtOuter + span.intTexStep[1]; +# 767 "swrast/s_tritemp.h" + while (lines > 0) { + + + const GLint right = ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + + + span.z = zLeft; + + + span.red = rLeft; + span.green = gLeft; + span.blue = bLeft; + + + span.alpha = aLeft; + + + span.intTex[0] = sLeft; + span.intTex[1] = tLeft; +# 807 "swrast/s_tritemp.h" + if (span.end > 0 && span.y >= 0) { + const GLint len = span.end - 1; + (void) len; + + do { GLfixed endVal = span.red + (len) * span.redStep; if (endVal < 0) { span.red -= endVal; } if (span.red < 0) { span.red = 0; } } while (0); + do { GLfixed endVal = span.green + (len) * span.greenStep; if (endVal < 0) { span.green -= endVal; } if (span.green < 0) { span.green = 0; } } while (0); + do { GLfixed endVal = span.blue + (len) * span.blueStep; if (endVal < 0) { span.blue -= endVal; } if (span.blue < 0) { span.blue = 0; } } while (0); + + + do { GLfixed endVal = span.alpha + (len) * span.alphaStep; if (endVal < 0) { span.alpha -= endVal; } if (span.alpha < 0) { span.alpha = 0; } } while (0); + + { + affine_span(ctx, &span, &info);; + } + } + + + + + + + + span.y++; + lines--; + + fxLeftEdge += fdxLeftEdge; + fxRightEdge += fdxRightEdge; + + fError += fdError; + if (fError >= 0) { + fError -= (1 << 11); +# 846 "swrast/s_tritemp.h" + zLeft += fdzOuter; + + + rLeft += fdrOuter; + gLeft += fdgOuter; + bLeft += fdbOuter; + + + aLeft += fdaOuter; + + + sLeft += dsOuter; + tLeft += dtOuter; +# 869 "swrast/s_tritemp.h" + } + else { + + + + + + + + zLeft += fdzInner; + + + rLeft += fdrInner; + gLeft += fdgInner; + bLeft += fdbInner; + + + aLeft += fdaInner; + + + sLeft += dsInner; + tLeft += dtInner; +# 901 "swrast/s_tritemp.h" + } + } + + } + + } + } +} +# 578 "swrast/s_triangle.c" 2 + + + +struct persp_info +{ + GLenum filter; + GLenum format; + GLenum envmode; + GLint smask, tmask; + GLint twidth_log2; + const GLchan *texture; + GLfixed er, eg, eb, ea; + GLint tbytesline, tsize; +}; + + +static __inline__ void +fast_persp_span(struct gl_context *ctx, SWspan *span, + struct persp_info *info) +{ + GLchan sample[4]; +# 662 "swrast/s_triangle.c" + GLuint i; + GLfloat tex_coord[3], tex_step[3]; + GLchan *dest = span->array->rgba[0]; + + const GLuint texEnableSave = ctx->Texture._EnabledCoordUnits; + ctx->Texture._EnabledCoordUnits = 0; + + tex_coord[0] = span->attrStart[FRAG_ATTRIB_TEX0][0] * (info->smask + 1); + tex_step[0] = span->attrStepX[FRAG_ATTRIB_TEX0][0] * (info->smask + 1); + tex_coord[1] = span->attrStart[FRAG_ATTRIB_TEX0][1] * (info->tmask + 1); + tex_step[1] = span->attrStepX[FRAG_ATTRIB_TEX0][1] * (info->tmask + 1); + + tex_coord[2] = span->attrStart[FRAG_ATTRIB_TEX0][3]; + tex_step[2] = span->attrStepX[FRAG_ATTRIB_TEX0][3]; + + switch (info->filter) { + case 0x2600: + switch (info->format) { + case MESA_FORMAT_RGB888: + switch (info->envmode) { + case 0x2100: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; sample[0] = tex00[2]; sample[1] = tex00[1]; sample[2] = tex00[0]; sample[3] = 255;;dest[0] = span->red * (sample[0] + 1u) >> (11 + 8); dest[1] = span->green * (sample[1] + 1u) >> (11 + 8); dest[2] = span->blue * (sample[2] + 1u) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1u) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x2101: + case 0x1E01: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; sample[0] = tex00[2]; sample[1] = tex00[1]; sample[2] = tex00[0]; sample[3] = 255;; dest[0] = sample[0]; dest[1] = sample[1]; dest[2] = sample[2]; dest[3] = ((span->alpha) >> 11);; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x0BE2: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; sample[0] = tex00[2]; sample[1] = tex00[1]; sample[2] = tex00[0]; sample[3] = 255;;dest[0] = ((255 - sample[0]) * span->red + (sample[0] + 1) * info->er) >> (11 + 8); dest[1] = ((255 - sample[1]) * span->green + (sample[1] + 1) * info->eg) >> (11 + 8); dest[2] = ((255 - sample[2]) * span->blue + (sample[2] + 1) * info->eb) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x0104: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; sample[0] = tex00[2]; sample[1] = tex00[1]; sample[2] = tex00[0]; sample[3] = 255;;{ GLint rSum = ((span->red) >> 11) + (GLint) sample[0]; GLint gSum = ((span->green) >> 11) + (GLint) sample[1]; GLint bSum = ((span->blue) >> 11) + (GLint) sample[2]; dest[0] = ( (rSum)<(255) ? (rSum) : (255) ); dest[1] = ( (gSum)<(255) ? (gSum) : (255) ); dest[2] = ( (bSum)<(255) ? (bSum) : (255) ); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); }; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + default: + _mesa_problem(ctx, "bad tex env mode (5) in SPAN_LINEAR"); + return; + } + break; + case MESA_FORMAT_RGBA8888: + switch(info->envmode) { + case 0x2100: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; sample[0] = tex00[3]; sample[1] = tex00[2]; sample[2] = tex00[1]; sample[3] = tex00[0];;dest[0] = span->red * (sample[0] + 1u) >> (11 + 8); dest[1] = span->green * (sample[1] + 1u) >> (11 + 8); dest[2] = span->blue * (sample[2] + 1u) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1u) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x2101: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; sample[0] = tex00[3]; sample[1] = tex00[2]; sample[2] = tex00[1]; sample[3] = tex00[0];;dest[0] = ((255 - sample[3]) * span->red + ((sample[3] + 1) * sample[0] << 11)) >> (11 + 8); dest[1] = ((255 - sample[3]) * span->green + ((sample[3] + 1) * sample[1] << 11)) >> (11 + 8); dest[2] = ((255 - sample[3]) * span->blue + ((sample[3] + 1) * sample[2] << 11)) >> (11 + 8); dest[3] = ((span->alpha) >> 11); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x0BE2: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; sample[0] = tex00[3]; sample[1] = tex00[2]; sample[2] = tex00[1]; sample[3] = tex00[0];;dest[0] = ((255 - sample[0]) * span->red + (sample[0] + 1) * info->er) >> (11 + 8); dest[1] = ((255 - sample[1]) * span->green + (sample[1] + 1) * info->eg) >> (11 + 8); dest[2] = ((255 - sample[2]) * span->blue + (sample[2] + 1) * info->eb) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x0104: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; sample[0] = tex00[3]; sample[1] = tex00[2]; sample[2] = tex00[1]; sample[3] = tex00[0];;{ GLint rSum = ((span->red) >> 11) + (GLint) sample[0]; GLint gSum = ((span->green) >> 11) + (GLint) sample[1]; GLint bSum = ((span->blue) >> 11) + (GLint) sample[2]; dest[0] = ( (rSum)<(255) ? (rSum) : (255) ); dest[1] = ( (gSum)<(255) ? (gSum) : (255) ); dest[2] = ( (bSum)<(255) ? (bSum) : (255) ); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); }; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x1E01: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; dest[0] = tex00[3]; dest[1] = tex00[2]; dest[2] = tex00[1]; dest[3] = tex00[0]; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + default: + _mesa_problem(ctx, "bad tex env mode (6) in SPAN_LINEAR"); + return; + } + break; + } + break; + + case 0x2601: + switch (info->format) { + case MESA_FORMAT_RGB888: + switch (info->envmode) { + case 0x2100: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 3; const GLchan *tex11 = tex10 + 3; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[1] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[2] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]); sample[3] = 255;;dest[0] = span->red * (sample[0] + 1u) >> (11 + 8); dest[1] = span->green * (sample[1] + 1u) >> (11 + 8); dest[2] = span->blue * (sample[2] + 1u) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1u) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x2101: + case 0x1E01: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 3; const GLchan *tex11 = tex10 + 3; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[1] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[2] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]); sample[3] = 255;;do { (dest)[0] = (sample)[0]; (dest)[1] = (sample)[1]; (dest)[2] = (sample)[2]; (dest)[3] = (sample)[3]; } while (0); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x0BE2: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 3; const GLchan *tex11 = tex10 + 3; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[1] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[2] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]); sample[3] = 255;;dest[0] = ((255 - sample[0]) * span->red + (sample[0] + 1) * info->er) >> (11 + 8); dest[1] = ((255 - sample[1]) * span->green + (sample[1] + 1) * info->eg) >> (11 + 8); dest[2] = ((255 - sample[2]) * span->blue + (sample[2] + 1) * info->eb) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x0104: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 3; const GLchan *tex11 = tex10 + 3; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[1] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[2] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]); sample[3] = 255;;{ GLint rSum = ((span->red) >> 11) + (GLint) sample[0]; GLint gSum = ((span->green) >> 11) + (GLint) sample[1]; GLint bSum = ((span->blue) >> 11) + (GLint) sample[2]; dest[0] = ( (rSum)<(255) ? (rSum) : (255) ); dest[1] = ( (gSum)<(255) ? (gSum) : (255) ); dest[2] = ( (bSum)<(255) ? (bSum) : (255) ); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); }; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + default: + _mesa_problem(ctx, "bad tex env mode (7) in SPAN_LINEAR"); + return; + } + break; + case MESA_FORMAT_RGBA8888: + switch (info->envmode) { + case 0x2100: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);dest[0] = span->red * (sample[0] + 1u) >> (11 + 8); dest[1] = span->green * (sample[1] + 1u) >> (11 + 8); dest[2] = span->blue * (sample[2] + 1u) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1u) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x2101: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);dest[0] = ((255 - sample[3]) * span->red + ((sample[3] + 1) * sample[0] << 11)) >> (11 + 8); dest[1] = ((255 - sample[3]) * span->green + ((sample[3] + 1) * sample[1] << 11)) >> (11 + 8); dest[2] = ((255 - sample[3]) * span->blue + ((sample[3] + 1) * sample[2] << 11)) >> (11 + 8); dest[3] = ((span->alpha) >> 11); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x0BE2: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);dest[0] = ((255 - sample[0]) * span->red + (sample[0] + 1) * info->er) >> (11 + 8); dest[1] = ((255 - sample[1]) * span->green + (sample[1] + 1) * info->eg) >> (11 + 8); dest[2] = ((255 - sample[2]) * span->blue + (sample[2] + 1) * info->eb) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x0104: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);{ GLint rSum = ((span->red) >> 11) + (GLint) sample[0]; GLint gSum = ((span->green) >> 11) + (GLint) sample[1]; GLint bSum = ((span->blue) >> 11) + (GLint) sample[2]; dest[0] = ( (rSum)<(255) ? (rSum) : (255) ); dest[1] = ( (gSum)<(255) ? (gSum) : (255) ); dest[2] = ( (bSum)<(255) ? (bSum) : (255) ); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); }; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x1E01: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);do { (dest)[0] = (sample)[0]; (dest)[1] = (sample)[1]; (dest)[2] = (sample)[2]; (dest)[3] = (sample)[3]; } while (0); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + default: + _mesa_problem(ctx, "bad tex env mode (8) in SPAN_LINEAR"); + return; + } + break; + } + break; + } + + ; + _swrast_write_rgba_span(ctx, span); + + + + + + ctx->Texture._EnabledCoordUnits = texEnableSave; +} +# 844 "swrast/s_triangle.c" +# 1 "swrast/s_tritemp.h" 1 +# 111 "swrast/s_tritemp.h" +static void persp_textured_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + typedef struct { + const SWvertex *v0, *v1; + GLfloat dx; + GLfloat dy; + GLfloat dxdy; + GLfixed fdxdy; + GLfloat adjy; + GLfixed fsx; + GLfixed fsy; + GLfixed fx0; + GLint lines; + } EdgeT; + + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + + const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; + const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; + const GLfloat maxDepth = ctx->DrawBuffer->_DepthMaxF; + + + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + + SWspan span; + + (void) swrast; + + do { (span).primitive = (0x0009); (span).interpMask = 0x0; (span).arrayMask = 0x0; (span).arrayAttribs = 0x0; (span).end = 0; (span).leftClip = 0; (span).facing = 0; (span).array = SWRAST_CONTEXT(ctx)->SpanArrays; } while (0); + span.y = 0; + + + (void) fixedToDepthShift; +# 172 "swrast/s_tritemp.h" + { + const GLfixed fy0 = (((int) ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = (((int) ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = (((int) ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + + vMin = v0; vMid = v1; vMax = v2; + vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; + } + else if (fy2 <= fy0) { + + vMin = v2; vMid = v0; vMax = v1; + vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; + } + else { + + vMin = v0; vMid = v2; vMax = v1; + vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; + bf = -bf; + } + } + else { + if (fy0 <= fy2) { + + vMin = v1; vMid = v0; vMax = v2; + vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; + bf = -bf; + } + else if (fy2 <= fy1) { + + vMin = v2; vMid = v1; vMax = v0; + vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; + bf = -bf; + } + else { + + vMin = v1; vMid = v2; vMax = v0; + vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; + } + } + + + vMin_fx = (((int) ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = (((int) ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMax_fx = (((int) ((((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + } + + + eMaj.v0 = vMin; eMaj.v1 = vMax; + eTop.v0 = vMid; eTop.v1 = vMax; + eBot.v0 = vMin; eBot.v1 = vMid; + + + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float) (1 << 11)))); + eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / ((float) (1 << 11)))); + eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + + + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + + if (area * bf * swrast->_BackfaceCullSign < 0.0) + return; + + oneOverArea = 1.0F / area; + + + span.facing = oneOverArea * bf > 0.0F; + } + + + { + eMaj.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eMaj.lines = (((((vMax_fy - eMaj.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eMaj.lines > 0) { + eMaj.dxdy = eMaj.dx / eMaj.dy; + eMaj.fdxdy = (((int) ((((eMaj.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eMaj.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eMaj.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); + eMaj.fx0 = vMin_fx; + eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * eMaj.dxdy); + } + else { + return; + } + + eTop.fsy = (((vMid_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eTop.lines = (((((vMax_fy - eTop.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eTop.lines > 0) { + eTop.dxdy = eTop.dx / eTop.dy; + eTop.fdxdy = (((int) ((((eTop.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eTop.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eTop.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); + eTop.fx0 = vMid_fx; + eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * eTop.dxdy); + } + + eBot.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eBot.lines = (((((vMid_fy - eBot.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eBot.lines > 0) { + eBot.dxdy = eBot.dx / eBot.dy; + eBot.fdxdy = (((int) ((((eBot.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eBot.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eBot.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); + eBot.fx0 = vMin_fx; + eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * eBot.dxdy); + } + } +# 319 "swrast/s_tritemp.h" + { + GLint scan_from_left_to_right; + + + + + + struct persp_info info; const struct gl_texture_unit *unit = ctx->Texture.Unit+0; const struct gl_texture_object *obj = ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; const struct gl_texture_image *texImg = obj->Image[0][obj->BaseLevel]; info.texture = (const GLchan *) texImg->Data; info.twidth_log2 = texImg->WidthLog2; info.smask = texImg->Width - 1; info.tmask = texImg->Height - 1; info.format = texImg->TexFormat; info.filter = obj->Sampler.MinFilter; info.envmode = unit->EnvMode; info.er = 0; info.eg = 0; info.eb = 0; if (info.envmode == 0x0BE2) { info.er = (((int) ((((unit->EnvColor[0] * 255.0F) * ((float) (1 << 11))) >= 0.0F) ? (((unit->EnvColor[0] * 255.0F) * ((float) (1 << 11))) + 0.5F) : (((unit->EnvColor[0] * 255.0F) * ((float) (1 << 11))) - 0.5F)))); info.eg = (((int) ((((unit->EnvColor[1] * 255.0F) * ((float) (1 << 11))) >= 0.0F) ? (((unit->EnvColor[1] * 255.0F) * ((float) (1 << 11))) + 0.5F) : (((unit->EnvColor[1] * 255.0F) * ((float) (1 << 11))) - 0.5F)))); info.eb = (((int) ((((unit->EnvColor[2] * 255.0F) * ((float) (1 << 11))) >= 0.0F) ? (((unit->EnvColor[2] * 255.0F) * ((float) (1 << 11))) + 0.5F) : (((unit->EnvColor[2] * 255.0F) * ((float) (1 << 11))) - 0.5F)))); info.ea = (((int) ((((unit->EnvColor[3] * 255.0F) * ((float) (1 << 11))) >= 0.0F) ? (((unit->EnvColor[3] * 255.0F) * ((float) (1 << 11))) + 0.5F) : (((unit->EnvColor[3] * 255.0F) * ((float) (1 << 11))) - 0.5F)))); } if (!info.texture) { return; } switch (info.format) { case MESA_FORMAT_RGB888: info.tbytesline = texImg->Width * 3; break; case MESA_FORMAT_RGBA8888: info.tbytesline = texImg->Width * 4; break; default: _mesa_problem(((void *)0), "Bad texture format in persp_textured_triangle"); return; } info.tsize = texImg->Height * info.tbytesline; + + + scan_from_left_to_right = (oneOverArea < 0.0F); + + + + + span.interpMask |= 0x02; + { + GLfloat eMaj_dz = vMax->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + GLfloat eBot_dz = vMid->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + span.attrStepX[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); + if (span.attrStepX[FRAG_ATTRIB_WPOS][2] > maxDepth || + span.attrStepX[FRAG_ATTRIB_WPOS][2] < -maxDepth) { + + span.attrStepX[FRAG_ATTRIB_WPOS][2] = 0.0; + span.attrStepY[FRAG_ATTRIB_WPOS][2] = 0.0; + } + else { + span.attrStepY[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); + } + if (depthBits <= 16) + span.zStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))); + else + span.zStep = (GLint) span.attrStepX[FRAG_ATTRIB_WPOS][2]; + } + + + span.interpMask |= 0x01; + if (ctx->Light.ShadeModel == 0x1D01) { + GLfloat eMaj_dr = (GLfloat) (vMax->color[0] - vMin->color[0]); + GLfloat eBot_dr = (GLfloat) (vMid->color[0] - vMin->color[0]); + GLfloat eMaj_dg = (GLfloat) (vMax->color[1] - vMin->color[1]); + GLfloat eBot_dg = (GLfloat) (vMid->color[1] - vMin->color[1]); + GLfloat eMaj_db = (GLfloat) (vMax->color[2] - vMin->color[2]); + GLfloat eBot_db = (GLfloat) (vMid->color[2] - vMin->color[2]); + + GLfloat eMaj_da = (GLfloat) (vMax->color[3] - vMin->color[3]); + GLfloat eBot_da = (GLfloat) (vMid->color[3] - vMin->color[3]); + + span.attrStepX[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); + span.attrStepY[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); + span.attrStepY[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); + span.attrStepY[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); + span.redStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) - 0.5F)))); + span.greenStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) - 0.5F)))); + span.blueStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) - 0.5F)))); + + span.attrStepX[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj_da * eBot.dy - eMaj.dy * eBot_da); + span.attrStepY[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx); + span.alphaStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) - 0.5F)))); + + } + else { + ; + span.interpMask |= 0x04; + span.attrStepX[FRAG_ATTRIB_COL0][0] = span.attrStepY[FRAG_ATTRIB_COL0][0] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][1] = span.attrStepY[FRAG_ATTRIB_COL0][1] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][2] = span.attrStepY[FRAG_ATTRIB_COL0][2] = 0.0F; + span.redStep = 0; + span.greenStep = 0; + span.blueStep = 0; + + span.attrStepX[FRAG_ATTRIB_COL0][3] = span.attrStepY[FRAG_ATTRIB_COL0][3] = 0.0F; + span.alphaStep = 0; + + } +# 412 "swrast/s_tritemp.h" + { + + const GLfloat wMax = vMax->attrib[FRAG_ATTRIB_WPOS][3]; + const GLfloat wMin = vMin->attrib[FRAG_ATTRIB_WPOS][3]; + const GLfloat wMid = vMid->attrib[FRAG_ATTRIB_WPOS][3]; + { + const GLfloat eMaj_dw = wMax - wMin; + const GLfloat eBot_dw = wMid - wMin; + span.attrStepX[FRAG_ATTRIB_WPOS][3] = oneOverArea * (eMaj_dw * eBot.dy - eMaj.dy * eBot_dw); + span.attrStepY[FRAG_ATTRIB_WPOS][3] = oneOverArea * (eMaj.dx * eBot_dw - eMaj_dw * eBot.dx); + } + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + if (swrast->_InterpMode[attr] == 0x1D00) { + do { span.attrStepX[attr][0] = 0.0; span.attrStepX[attr][1] = 0.0; span.attrStepX[attr][2] = 0.0; span.attrStepX[attr][3] = 0.0; } while(0); + do { span.attrStepY[attr][0] = 0.0; span.attrStepY[attr][1] = 0.0; span.attrStepY[attr][2] = 0.0; span.attrStepY[attr][3] = 0.0; } while(0); + } + else { + GLuint c; + for (c = 0; c < 4; c++) { + GLfloat eMaj_da = vMax->attrib[attr][c] * wMax - vMin->attrib[attr][c] * wMin; + GLfloat eBot_da = vMid->attrib[attr][c] * wMid - vMin->attrib[attr][c] * wMin; + span.attrStepX[attr][c] = oneOverArea * (eMaj_da * eBot.dy - eMaj.dy * eBot_da); + span.attrStepY[attr][c] = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx); + } + } + } } + } +# 488 "swrast/s_tritemp.h" + { + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; + GLfixed fError = 0, fdError = 0; +# 504 "swrast/s_tritemp.h" + GLuint zLeft = 0; + GLfixed fdzOuter = 0, fdzInner; + + + GLint rLeft = 0, fdrOuter = 0, fdrInner; + GLint gLeft = 0, fdgOuter = 0, fdgInner; + GLint bLeft = 0, fdbOuter = 0, fdbInner; + + + GLint aLeft = 0, fdaOuter = 0, fdaInner; + + + + + + + GLfloat wLeft = 0, dwOuter = 0, dwInner; + GLfloat attrLeft[FRAG_ATTRIB_MAX][4]; + GLfloat daOuter[FRAG_ATTRIB_MAX][4], daInner[FRAG_ATTRIB_MAX][4]; + + + for (subTriangle=0; subTriangle<=1; subTriangle++) { + EdgeT *eLeft, *eRight; + int setupLeft, setupRight; + int lines; + + if (subTriangle==0) { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eBot; + lines = eRight->lines; + setupLeft = 1; + setupRight = 1; + } + else { + eLeft = &eBot; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 1; + } + } + else { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eTop; + lines = eRight->lines; + setupLeft = 0; + setupRight = 1; + } + else { + eLeft = &eTop; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 0; + } + if (lines == 0) + return; + } + + if (setupLeft && eLeft->lines > 0) { + const SWvertex *vLower = eLeft->v0; + const GLfixed fsy = eLeft->fsy; + const GLfixed fsx = eLeft->fsx; + const GLfixed fx = (((fsx) + (1 << 11) - 1) & (~((1 << 11) - 1))); + const GLfixed adjx = (GLfixed) (fx - eLeft->fx0); + const GLfixed adjy = (GLfixed) eLeft->adjy; + GLint idxOuter; + GLfloat dxOuter; + GLfixed fdxOuter; + + fError = fx - fsx - (1 << 11); + fxLeftEdge = fsx - 1; + fdxLeftEdge = eLeft->fdxdy; + fdxOuter = ((fdxLeftEdge - 1) & (~((1 << 11) - 1))); + fdError = fdxOuter - fdxLeftEdge + (1 << 11); + idxOuter = ((fdxOuter) >> 11); + dxOuter = (GLfloat) idxOuter; + span.y = ((fsy) >> 11); + + + (void) dxOuter; + (void) adjx; + (void) adjy; + (void) vLower; +# 611 "swrast/s_tritemp.h" + { + GLfloat z0 = vLower->attrib[FRAG_ATTRIB_WPOS][2]; + if (depthBits <= 16) { + + GLfloat tmp = (z0 * ((float) (1 << 11)) + + span.attrStepX[FRAG_ATTRIB_WPOS][2] * adjx + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * adjy) + (1 << (11 -1)); + if (tmp < 0xffffffff / 2) + zLeft = (GLfixed) tmp; + else + zLeft = 0xffffffff / 2; + fdzOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + + zLeft = (GLuint) (z0 + span.attrStepX[FRAG_ATTRIB_WPOS][2] * ((adjx) * (1.0F / ((float) (1 << 11)))) + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * ((adjy) * (1.0F / ((float) (1 << 11))))); + fdzOuter = (GLint) (span.attrStepY[FRAG_ATTRIB_WPOS][2] + + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]); + } + + + + + + } + + + if (ctx->Light.ShadeModel == 0x1D01) { + rLeft = (GLint)(((vLower->color[0]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][0] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][0] * adjy) + (1 << (11 -1)); + gLeft = (GLint)(((vLower->color[1]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][1] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][1] * adjy) + (1 << (11 -1)); + bLeft = (GLint)(((vLower->color[2]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][2] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][2] * adjy) + (1 << (11 -1)); + fdrOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) - 0.5F)))) + ; + fdgOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) - 0.5F)))) + ; + fdbOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + + aLeft = (GLint)(((vLower->color[3]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][3] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][3] * adjy) + (1 << (11 -1)); + fdaOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) - 0.5F)))) + ; + + } + else { + ; + rLeft = ((v2->color[0]) << 11); + gLeft = ((v2->color[1]) << 11); + bLeft = ((v2->color[2]) << 11); + fdrOuter = fdgOuter = fdbOuter = 0; + + aLeft = ((v2->color[3]) << 11); + fdaOuter = 0; + + } +# 695 "swrast/s_tritemp.h" + { + const GLuint attr = FRAG_ATTRIB_WPOS; + wLeft = vLower->attrib[FRAG_ATTRIB_WPOS][3] + + (span.attrStepX[attr][3] * adjx + + span.attrStepY[attr][3] * adjy) * (1.0F/((float) (1 << 11))); + dwOuter = span.attrStepY[attr][3] + dxOuter * span.attrStepX[attr][3]; + } + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + const GLfloat invW = vLower->attrib[FRAG_ATTRIB_WPOS][3]; + if (swrast->_InterpMode[attr] == 0x1D00) { + GLuint c; + for (c = 0; c < 4; c++) { + attrLeft[attr][c] = v2->attrib[attr][c] * invW; + daOuter[attr][c] = 0.0; + } + } + else { + GLuint c; + for (c = 0; c < 4; c++) { + const GLfloat a = vLower->attrib[attr][c] * invW; + attrLeft[attr][c] = a + ( span.attrStepX[attr][c] * adjx + + span.attrStepY[attr][c] * adjy) * (1.0F/((float) (1 << 11))); + daOuter[attr][c] = span.attrStepY[attr][c] + dxOuter * span.attrStepX[attr][c]; + } + } + } } + + } + + + if (setupRight && eRight->lines>0) { + fxRightEdge = eRight->fsx - 1; + fdxRightEdge = eRight->fdxdy; + } + + if (lines==0) { + continue; + } +# 743 "swrast/s_tritemp.h" + fdzInner = fdzOuter + span.zStep; + + + fdrInner = fdrOuter + span.redStep; + fdgInner = fdgOuter + span.greenStep; + fdbInner = fdbOuter + span.blueStep; + + + fdaInner = fdaOuter + span.alphaStep; + + + + + + + dwInner = dwOuter + span.attrStepX[FRAG_ATTRIB_WPOS][3]; + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + GLuint c; + for (c = 0; c < 4; c++) { + daInner[attr][c] = daOuter[attr][c] + span.attrStepX[attr][c]; + } + } } + + + while (lines > 0) { + + + const GLint right = ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + + + span.z = zLeft; + + + span.red = rLeft; + span.green = gLeft; + span.blue = bLeft; + + + span.alpha = aLeft; + + + + + + + + span.attrStart[FRAG_ATTRIB_WPOS][3] = wLeft; + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + GLuint c; + for (c = 0; c < 4; c++) { + span.attrStart[attr][c] = attrLeft[attr][c]; + } + } } + + + + + + + if (span.end > 0 && span.y >= 0) { + const GLint len = span.end - 1; + (void) len; + + do { GLfixed endVal = span.red + (len) * span.redStep; if (endVal < 0) { span.red -= endVal; } if (span.red < 0) { span.red = 0; } } while (0); + do { GLfixed endVal = span.green + (len) * span.greenStep; if (endVal < 0) { span.green -= endVal; } if (span.green < 0) { span.green = 0; } } while (0); + do { GLfixed endVal = span.blue + (len) * span.blueStep; if (endVal < 0) { span.blue -= endVal; } if (span.blue < 0) { span.blue = 0; } } while (0); + + + do { GLfixed endVal = span.alpha + (len) * span.alphaStep; if (endVal < 0) { span.alpha -= endVal; } if (span.alpha < 0) { span.alpha = 0; } } while (0); + + { + span.interpMask &= ~0x01; span.arrayMask |= 0x01; fast_persp_span(ctx, &span, &info);; + } + } + + + + + + + + span.y++; + lines--; + + fxLeftEdge += fdxLeftEdge; + fxRightEdge += fdxRightEdge; + + fError += fdError; + if (fError >= 0) { + fError -= (1 << 11); +# 846 "swrast/s_tritemp.h" + zLeft += fdzOuter; + + + rLeft += fdrOuter; + gLeft += fdgOuter; + bLeft += fdbOuter; + + + aLeft += fdaOuter; + + + + + + + wLeft += dwOuter; + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + GLuint c; + for (c = 0; c < 4; c++) { + attrLeft[attr][c] += daOuter[attr][c]; + } + } } + + } + else { + + + + + + + + zLeft += fdzInner; + + + rLeft += fdrInner; + gLeft += fdgInner; + bLeft += fdbInner; + + + aLeft += fdaInner; + + + + + + + wLeft += dwInner; + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + GLuint c; + for (c = 0; c < 4; c++) { + attrLeft[attr][c] += daInner[attr][c]; + } + } } + + } + } + + } + + } + } +} +# 845 "swrast/s_triangle.c" 2 +# 859 "swrast/s_triangle.c" +# 1 "swrast/s_tritemp.h" 1 +# 111 "swrast/s_tritemp.h" +static void general_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + typedef struct { + const SWvertex *v0, *v1; + GLfloat dx; + GLfloat dy; + GLfloat dxdy; + GLfixed fdxdy; + GLfloat adjy; + GLfixed fsx; + GLfixed fsy; + GLfixed fx0; + GLint lines; + } EdgeT; + + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + + const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; + const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; + const GLfloat maxDepth = ctx->DrawBuffer->_DepthMaxF; + + + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + + SWspan span; + + (void) swrast; + + do { (span).primitive = (0x0009); (span).interpMask = 0x0; (span).arrayMask = 0x0; (span).arrayAttribs = 0x0; (span).end = 0; (span).leftClip = 0; (span).facing = 0; (span).array = SWRAST_CONTEXT(ctx)->SpanArrays; } while (0); + span.y = 0; + + + (void) fixedToDepthShift; +# 172 "swrast/s_tritemp.h" + { + const GLfixed fy0 = (((int) ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = (((int) ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = (((int) ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + + vMin = v0; vMid = v1; vMax = v2; + vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; + } + else if (fy2 <= fy0) { + + vMin = v2; vMid = v0; vMax = v1; + vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; + } + else { + + vMin = v0; vMid = v2; vMax = v1; + vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; + bf = -bf; + } + } + else { + if (fy0 <= fy2) { + + vMin = v1; vMid = v0; vMax = v2; + vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; + bf = -bf; + } + else if (fy2 <= fy1) { + + vMin = v2; vMid = v1; vMax = v0; + vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; + bf = -bf; + } + else { + + vMin = v1; vMid = v2; vMax = v0; + vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; + } + } + + + vMin_fx = (((int) ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = (((int) ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMax_fx = (((int) ((((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + } + + + eMaj.v0 = vMin; eMaj.v1 = vMax; + eTop.v0 = vMid; eTop.v1 = vMax; + eBot.v0 = vMin; eBot.v1 = vMid; + + + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float) (1 << 11)))); + eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / ((float) (1 << 11)))); + eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + + + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + + if (area * bf * swrast->_BackfaceCullSign < 0.0) + return; + + oneOverArea = 1.0F / area; + + + span.facing = oneOverArea * bf > 0.0F; + } + + + { + eMaj.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eMaj.lines = (((((vMax_fy - eMaj.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eMaj.lines > 0) { + eMaj.dxdy = eMaj.dx / eMaj.dy; + eMaj.fdxdy = (((int) ((((eMaj.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eMaj.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eMaj.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); + eMaj.fx0 = vMin_fx; + eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * eMaj.dxdy); + } + else { + return; + } + + eTop.fsy = (((vMid_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eTop.lines = (((((vMax_fy - eTop.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eTop.lines > 0) { + eTop.dxdy = eTop.dx / eTop.dy; + eTop.fdxdy = (((int) ((((eTop.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eTop.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eTop.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); + eTop.fx0 = vMid_fx; + eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * eTop.dxdy); + } + + eBot.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eBot.lines = (((((vMid_fy - eBot.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eBot.lines > 0) { + eBot.dxdy = eBot.dx / eBot.dy; + eBot.fdxdy = (((int) ((((eBot.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eBot.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eBot.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); + eBot.fx0 = vMin_fx; + eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * eBot.dxdy); + } + } +# 319 "swrast/s_tritemp.h" + { + GLint scan_from_left_to_right; +# 329 "swrast/s_tritemp.h" + scan_from_left_to_right = (oneOverArea < 0.0F); + + + + + span.interpMask |= 0x02; + { + GLfloat eMaj_dz = vMax->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + GLfloat eBot_dz = vMid->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + span.attrStepX[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); + if (span.attrStepX[FRAG_ATTRIB_WPOS][2] > maxDepth || + span.attrStepX[FRAG_ATTRIB_WPOS][2] < -maxDepth) { + + span.attrStepX[FRAG_ATTRIB_WPOS][2] = 0.0; + span.attrStepY[FRAG_ATTRIB_WPOS][2] = 0.0; + } + else { + span.attrStepY[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); + } + if (depthBits <= 16) + span.zStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))); + else + span.zStep = (GLint) span.attrStepX[FRAG_ATTRIB_WPOS][2]; + } + + + span.interpMask |= 0x01; + if (ctx->Light.ShadeModel == 0x1D01) { + GLfloat eMaj_dr = (GLfloat) (vMax->color[0] - vMin->color[0]); + GLfloat eBot_dr = (GLfloat) (vMid->color[0] - vMin->color[0]); + GLfloat eMaj_dg = (GLfloat) (vMax->color[1] - vMin->color[1]); + GLfloat eBot_dg = (GLfloat) (vMid->color[1] - vMin->color[1]); + GLfloat eMaj_db = (GLfloat) (vMax->color[2] - vMin->color[2]); + GLfloat eBot_db = (GLfloat) (vMid->color[2] - vMin->color[2]); + + GLfloat eMaj_da = (GLfloat) (vMax->color[3] - vMin->color[3]); + GLfloat eBot_da = (GLfloat) (vMid->color[3] - vMin->color[3]); + + span.attrStepX[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); + span.attrStepY[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); + span.attrStepY[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); + span.attrStepY[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); + span.redStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) - 0.5F)))); + span.greenStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) - 0.5F)))); + span.blueStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) - 0.5F)))); + + span.attrStepX[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj_da * eBot.dy - eMaj.dy * eBot_da); + span.attrStepY[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx); + span.alphaStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) - 0.5F)))); + + } + else { + ; + span.interpMask |= 0x04; + span.attrStepX[FRAG_ATTRIB_COL0][0] = span.attrStepY[FRAG_ATTRIB_COL0][0] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][1] = span.attrStepY[FRAG_ATTRIB_COL0][1] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][2] = span.attrStepY[FRAG_ATTRIB_COL0][2] = 0.0F; + span.redStep = 0; + span.greenStep = 0; + span.blueStep = 0; + + span.attrStepX[FRAG_ATTRIB_COL0][3] = span.attrStepY[FRAG_ATTRIB_COL0][3] = 0.0F; + span.alphaStep = 0; + + } +# 412 "swrast/s_tritemp.h" + { + + const GLfloat wMax = vMax->attrib[FRAG_ATTRIB_WPOS][3]; + const GLfloat wMin = vMin->attrib[FRAG_ATTRIB_WPOS][3]; + const GLfloat wMid = vMid->attrib[FRAG_ATTRIB_WPOS][3]; + { + const GLfloat eMaj_dw = wMax - wMin; + const GLfloat eBot_dw = wMid - wMin; + span.attrStepX[FRAG_ATTRIB_WPOS][3] = oneOverArea * (eMaj_dw * eBot.dy - eMaj.dy * eBot_dw); + span.attrStepY[FRAG_ATTRIB_WPOS][3] = oneOverArea * (eMaj.dx * eBot_dw - eMaj_dw * eBot.dx); + } + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + if (swrast->_InterpMode[attr] == 0x1D00) { + do { span.attrStepX[attr][0] = 0.0; span.attrStepX[attr][1] = 0.0; span.attrStepX[attr][2] = 0.0; span.attrStepX[attr][3] = 0.0; } while(0); + do { span.attrStepY[attr][0] = 0.0; span.attrStepY[attr][1] = 0.0; span.attrStepY[attr][2] = 0.0; span.attrStepY[attr][3] = 0.0; } while(0); + } + else { + GLuint c; + for (c = 0; c < 4; c++) { + GLfloat eMaj_da = vMax->attrib[attr][c] * wMax - vMin->attrib[attr][c] * wMin; + GLfloat eBot_da = vMid->attrib[attr][c] * wMid - vMin->attrib[attr][c] * wMin; + span.attrStepX[attr][c] = oneOverArea * (eMaj_da * eBot.dy - eMaj.dy * eBot_da); + span.attrStepY[attr][c] = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx); + } + } + } } + } +# 488 "swrast/s_tritemp.h" + { + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; + GLfixed fError = 0, fdError = 0; +# 504 "swrast/s_tritemp.h" + GLuint zLeft = 0; + GLfixed fdzOuter = 0, fdzInner; + + + GLint rLeft = 0, fdrOuter = 0, fdrInner; + GLint gLeft = 0, fdgOuter = 0, fdgInner; + GLint bLeft = 0, fdbOuter = 0, fdbInner; + + + GLint aLeft = 0, fdaOuter = 0, fdaInner; + + + + + + + GLfloat wLeft = 0, dwOuter = 0, dwInner; + GLfloat attrLeft[FRAG_ATTRIB_MAX][4]; + GLfloat daOuter[FRAG_ATTRIB_MAX][4], daInner[FRAG_ATTRIB_MAX][4]; + + + for (subTriangle=0; subTriangle<=1; subTriangle++) { + EdgeT *eLeft, *eRight; + int setupLeft, setupRight; + int lines; + + if (subTriangle==0) { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eBot; + lines = eRight->lines; + setupLeft = 1; + setupRight = 1; + } + else { + eLeft = &eBot; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 1; + } + } + else { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eTop; + lines = eRight->lines; + setupLeft = 0; + setupRight = 1; + } + else { + eLeft = &eTop; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 0; + } + if (lines == 0) + return; + } + + if (setupLeft && eLeft->lines > 0) { + const SWvertex *vLower = eLeft->v0; + const GLfixed fsy = eLeft->fsy; + const GLfixed fsx = eLeft->fsx; + const GLfixed fx = (((fsx) + (1 << 11) - 1) & (~((1 << 11) - 1))); + const GLfixed adjx = (GLfixed) (fx - eLeft->fx0); + const GLfixed adjy = (GLfixed) eLeft->adjy; + GLint idxOuter; + GLfloat dxOuter; + GLfixed fdxOuter; + + fError = fx - fsx - (1 << 11); + fxLeftEdge = fsx - 1; + fdxLeftEdge = eLeft->fdxdy; + fdxOuter = ((fdxLeftEdge - 1) & (~((1 << 11) - 1))); + fdError = fdxOuter - fdxLeftEdge + (1 << 11); + idxOuter = ((fdxOuter) >> 11); + dxOuter = (GLfloat) idxOuter; + span.y = ((fsy) >> 11); + + + (void) dxOuter; + (void) adjx; + (void) adjy; + (void) vLower; +# 611 "swrast/s_tritemp.h" + { + GLfloat z0 = vLower->attrib[FRAG_ATTRIB_WPOS][2]; + if (depthBits <= 16) { + + GLfloat tmp = (z0 * ((float) (1 << 11)) + + span.attrStepX[FRAG_ATTRIB_WPOS][2] * adjx + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * adjy) + (1 << (11 -1)); + if (tmp < 0xffffffff / 2) + zLeft = (GLfixed) tmp; + else + zLeft = 0xffffffff / 2; + fdzOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + + zLeft = (GLuint) (z0 + span.attrStepX[FRAG_ATTRIB_WPOS][2] * ((adjx) * (1.0F / ((float) (1 << 11)))) + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * ((adjy) * (1.0F / ((float) (1 << 11))))); + fdzOuter = (GLint) (span.attrStepY[FRAG_ATTRIB_WPOS][2] + + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]); + } + + + + + + } + + + if (ctx->Light.ShadeModel == 0x1D01) { + rLeft = (GLint)(((vLower->color[0]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][0] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][0] * adjy) + (1 << (11 -1)); + gLeft = (GLint)(((vLower->color[1]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][1] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][1] * adjy) + (1 << (11 -1)); + bLeft = (GLint)(((vLower->color[2]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][2] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][2] * adjy) + (1 << (11 -1)); + fdrOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) - 0.5F)))) + ; + fdgOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) - 0.5F)))) + ; + fdbOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + + aLeft = (GLint)(((vLower->color[3]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][3] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][3] * adjy) + (1 << (11 -1)); + fdaOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) - 0.5F)))) + ; + + } + else { + ; + rLeft = ((v2->color[0]) << 11); + gLeft = ((v2->color[1]) << 11); + bLeft = ((v2->color[2]) << 11); + fdrOuter = fdgOuter = fdbOuter = 0; + + aLeft = ((v2->color[3]) << 11); + fdaOuter = 0; + + } +# 695 "swrast/s_tritemp.h" + { + const GLuint attr = FRAG_ATTRIB_WPOS; + wLeft = vLower->attrib[FRAG_ATTRIB_WPOS][3] + + (span.attrStepX[attr][3] * adjx + + span.attrStepY[attr][3] * adjy) * (1.0F/((float) (1 << 11))); + dwOuter = span.attrStepY[attr][3] + dxOuter * span.attrStepX[attr][3]; + } + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + const GLfloat invW = vLower->attrib[FRAG_ATTRIB_WPOS][3]; + if (swrast->_InterpMode[attr] == 0x1D00) { + GLuint c; + for (c = 0; c < 4; c++) { + attrLeft[attr][c] = v2->attrib[attr][c] * invW; + daOuter[attr][c] = 0.0; + } + } + else { + GLuint c; + for (c = 0; c < 4; c++) { + const GLfloat a = vLower->attrib[attr][c] * invW; + attrLeft[attr][c] = a + ( span.attrStepX[attr][c] * adjx + + span.attrStepY[attr][c] * adjy) * (1.0F/((float) (1 << 11))); + daOuter[attr][c] = span.attrStepY[attr][c] + dxOuter * span.attrStepX[attr][c]; + } + } + } } + + } + + + if (setupRight && eRight->lines>0) { + fxRightEdge = eRight->fsx - 1; + fdxRightEdge = eRight->fdxdy; + } + + if (lines==0) { + continue; + } +# 743 "swrast/s_tritemp.h" + fdzInner = fdzOuter + span.zStep; + + + fdrInner = fdrOuter + span.redStep; + fdgInner = fdgOuter + span.greenStep; + fdbInner = fdbOuter + span.blueStep; + + + fdaInner = fdaOuter + span.alphaStep; + + + + + + + dwInner = dwOuter + span.attrStepX[FRAG_ATTRIB_WPOS][3]; + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + GLuint c; + for (c = 0; c < 4; c++) { + daInner[attr][c] = daOuter[attr][c] + span.attrStepX[attr][c]; + } + } } + + + while (lines > 0) { + + + const GLint right = ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + + + span.z = zLeft; + + + span.red = rLeft; + span.green = gLeft; + span.blue = bLeft; + + + span.alpha = aLeft; + + + + + + + + span.attrStart[FRAG_ATTRIB_WPOS][3] = wLeft; + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + GLuint c; + for (c = 0; c < 4; c++) { + span.attrStart[attr][c] = attrLeft[attr][c]; + } + } } + + + + + + + if (span.end > 0 && span.y >= 0) { + const GLint len = span.end - 1; + (void) len; + + do { GLfixed endVal = span.red + (len) * span.redStep; if (endVal < 0) { span.red -= endVal; } if (span.red < 0) { span.red = 0; } } while (0); + do { GLfixed endVal = span.green + (len) * span.greenStep; if (endVal < 0) { span.green -= endVal; } if (span.green < 0) { span.green = 0; } } while (0); + do { GLfixed endVal = span.blue + (len) * span.blueStep; if (endVal < 0) { span.blue -= endVal; } if (span.blue < 0) { span.blue = 0; } } while (0); + + + do { GLfixed endVal = span.alpha + (len) * span.alphaStep; if (endVal < 0) { span.alpha -= endVal; } if (span.alpha < 0) { span.alpha = 0; } } while (0); + + { + _swrast_write_rgba_span(ctx, &span);; + } + } + + + + + + + + span.y++; + lines--; + + fxLeftEdge += fdxLeftEdge; + fxRightEdge += fdxRightEdge; + + fError += fdError; + if (fError >= 0) { + fError -= (1 << 11); +# 846 "swrast/s_tritemp.h" + zLeft += fdzOuter; + + + rLeft += fdrOuter; + gLeft += fdgOuter; + bLeft += fdbOuter; + + + aLeft += fdaOuter; + + + + + + + wLeft += dwOuter; + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + GLuint c; + for (c = 0; c < 4; c++) { + attrLeft[attr][c] += daOuter[attr][c]; + } + } } + + } + else { + + + + + + + + zLeft += fdzInner; + + + rLeft += fdrInner; + gLeft += fdgInner; + bLeft += fdbInner; + + + aLeft += fdaInner; + + + + + + + wLeft += dwInner; + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + GLuint c; + for (c = 0; c < 4; c++) { + attrLeft[attr][c] += daInner[attr][c]; + } + } } + + } + } + + } + + } + } +} +# 860 "swrast/s_triangle.c" 2 +# 902 "swrast/s_triangle.c" +# 1 "swrast/s_tritemp.h" 1 +# 111 "swrast/s_tritemp.h" +static void occlusion_zless_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + typedef struct { + const SWvertex *v0, *v1; + GLfloat dx; + GLfloat dy; + GLfloat dxdy; + GLfixed fdxdy; + GLfloat adjy; + GLfixed fsx; + GLfixed fsy; + GLfixed fx0; + GLint lines; + } EdgeT; + + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + + const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; + const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; + const GLfloat maxDepth = ctx->DrawBuffer->_DepthMaxF; + + + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + + SWspan span; + + (void) swrast; + + do { (span).primitive = (0x0009); (span).interpMask = 0x0; (span).arrayMask = 0x0; (span).arrayAttribs = 0x0; (span).end = 0; (span).leftClip = 0; (span).facing = 0; (span).array = SWRAST_CONTEXT(ctx)->SpanArrays; } while (0); + span.y = 0; + + + (void) fixedToDepthShift; +# 172 "swrast/s_tritemp.h" + { + const GLfixed fy0 = (((int) ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = (((int) ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = (((int) ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + + vMin = v0; vMid = v1; vMax = v2; + vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; + } + else if (fy2 <= fy0) { + + vMin = v2; vMid = v0; vMax = v1; + vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; + } + else { + + vMin = v0; vMid = v2; vMax = v1; + vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; + bf = -bf; + } + } + else { + if (fy0 <= fy2) { + + vMin = v1; vMid = v0; vMax = v2; + vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; + bf = -bf; + } + else if (fy2 <= fy1) { + + vMin = v2; vMid = v1; vMax = v0; + vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; + bf = -bf; + } + else { + + vMin = v1; vMid = v2; vMax = v0; + vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; + } + } + + + vMin_fx = (((int) ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = (((int) ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMax_fx = (((int) ((((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + } + + + eMaj.v0 = vMin; eMaj.v1 = vMax; + eTop.v0 = vMid; eTop.v1 = vMax; + eBot.v0 = vMin; eBot.v1 = vMid; + + + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float) (1 << 11)))); + eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / ((float) (1 << 11)))); + eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + + + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + + if (area * bf * swrast->_BackfaceCullSign < 0.0) + return; + + oneOverArea = 1.0F / area; + + + span.facing = oneOverArea * bf > 0.0F; + } + + + { + eMaj.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eMaj.lines = (((((vMax_fy - eMaj.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eMaj.lines > 0) { + eMaj.dxdy = eMaj.dx / eMaj.dy; + eMaj.fdxdy = (((int) ((((eMaj.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eMaj.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eMaj.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); + eMaj.fx0 = vMin_fx; + eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * eMaj.dxdy); + } + else { + return; + } + + eTop.fsy = (((vMid_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eTop.lines = (((((vMax_fy - eTop.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eTop.lines > 0) { + eTop.dxdy = eTop.dx / eTop.dy; + eTop.fdxdy = (((int) ((((eTop.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eTop.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eTop.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); + eTop.fx0 = vMid_fx; + eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * eTop.dxdy); + } + + eBot.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eBot.lines = (((((vMid_fy - eBot.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eBot.lines > 0) { + eBot.dxdy = eBot.dx / eBot.dy; + eBot.fdxdy = (((int) ((((eBot.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eBot.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eBot.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); + eBot.fx0 = vMin_fx; + eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * eBot.dxdy); + } + } +# 319 "swrast/s_tritemp.h" + { + GLint scan_from_left_to_right; + + + + + + struct gl_renderbuffer *rb = ctx->DrawBuffer->_DepthBuffer; struct gl_query_object *q = ctx->Query.CurrentOcclusionObject; ; ; ; if (!q) { return; } + + + scan_from_left_to_right = (oneOverArea < 0.0F); + + + + + span.interpMask |= 0x02; + { + GLfloat eMaj_dz = vMax->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + GLfloat eBot_dz = vMid->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + span.attrStepX[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); + if (span.attrStepX[FRAG_ATTRIB_WPOS][2] > maxDepth || + span.attrStepX[FRAG_ATTRIB_WPOS][2] < -maxDepth) { + + span.attrStepX[FRAG_ATTRIB_WPOS][2] = 0.0; + span.attrStepY[FRAG_ATTRIB_WPOS][2] = 0.0; + } + else { + span.attrStepY[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); + } + if (depthBits <= 16) + span.zStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))); + else + span.zStep = (GLint) span.attrStepX[FRAG_ATTRIB_WPOS][2]; + } +# 488 "swrast/s_tritemp.h" + { + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; + GLfixed fError = 0, fdError = 0; +# 504 "swrast/s_tritemp.h" + GLuint zLeft = 0; + GLfixed fdzOuter = 0, fdzInner; +# 525 "swrast/s_tritemp.h" + for (subTriangle=0; subTriangle<=1; subTriangle++) { + EdgeT *eLeft, *eRight; + int setupLeft, setupRight; + int lines; + + if (subTriangle==0) { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eBot; + lines = eRight->lines; + setupLeft = 1; + setupRight = 1; + } + else { + eLeft = &eBot; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 1; + } + } + else { + + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eTop; + lines = eRight->lines; + setupLeft = 0; + setupRight = 1; + } + else { + eLeft = &eTop; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 0; + } + if (lines == 0) + return; + } + + if (setupLeft && eLeft->lines > 0) { + const SWvertex *vLower = eLeft->v0; + const GLfixed fsy = eLeft->fsy; + const GLfixed fsx = eLeft->fsx; + const GLfixed fx = (((fsx) + (1 << 11) - 1) & (~((1 << 11) - 1))); + const GLfixed adjx = (GLfixed) (fx - eLeft->fx0); + const GLfixed adjy = (GLfixed) eLeft->adjy; + GLint idxOuter; + GLfloat dxOuter; + GLfixed fdxOuter; + + fError = fx - fsx - (1 << 11); + fxLeftEdge = fsx - 1; + fdxLeftEdge = eLeft->fdxdy; + fdxOuter = ((fdxLeftEdge - 1) & (~((1 << 11) - 1))); + fdError = fdxOuter - fdxLeftEdge + (1 << 11); + idxOuter = ((fdxOuter) >> 11); + dxOuter = (GLfloat) idxOuter; + span.y = ((fsy) >> 11); + + + (void) dxOuter; + (void) adjx; + (void) adjy; + (void) vLower; +# 611 "swrast/s_tritemp.h" + { + GLfloat z0 = vLower->attrib[FRAG_ATTRIB_WPOS][2]; + if (depthBits <= 16) { + + GLfloat tmp = (z0 * ((float) (1 << 11)) + + span.attrStepX[FRAG_ATTRIB_WPOS][2] * adjx + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * adjy) + (1 << (11 -1)); + if (tmp < 0xffffffff / 2) + zLeft = (GLfixed) tmp; + else + zLeft = 0xffffffff / 2; + fdzOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + + zLeft = (GLuint) (z0 + span.attrStepX[FRAG_ATTRIB_WPOS][2] * ((adjx) * (1.0F / ((float) (1 << 11)))) + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * ((adjy) * (1.0F / ((float) (1 << 11))))); + fdzOuter = (GLint) (span.attrStepY[FRAG_ATTRIB_WPOS][2] + + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]); + } + + + + + + } +# 722 "swrast/s_tritemp.h" + } + + + if (setupRight && eRight->lines>0) { + fxRightEdge = eRight->fsx - 1; + fdxRightEdge = eRight->fdxdy; + } + + if (lines==0) { + continue; + } +# 743 "swrast/s_tritemp.h" + fdzInner = fdzOuter + span.zStep; +# 767 "swrast/s_tritemp.h" + while (lines > 0) { + + + const GLint right = ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + + + span.z = zLeft; +# 807 "swrast/s_tritemp.h" + if (span.end > 0 && span.y >= 0) { + const GLint len = span.end - 1; + (void) len; +# 818 "swrast/s_tritemp.h" + { + if (rb->Format == MESA_FORMAT_Z16) { GLuint i; const GLushort *zRow = (const GLushort *) rb->GetPointer(ctx, rb, span.x, span.y); for (i = 0; i < span.end; i++) { GLuint z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { q->Result++; } span.z += span.zStep; } } else { GLuint i; const GLuint *zRow = (const GLuint *) rb->GetPointer(ctx, rb, span.x, span.y); for (i = 0; i < span.end; i++) { if ((GLuint)span.z < zRow[i]) { q->Result++; } span.z += span.zStep; } }; + } + } + + + + + + + + span.y++; + lines--; + + fxLeftEdge += fdxLeftEdge; + fxRightEdge += fdxRightEdge; + + fError += fdError; + if (fError >= 0) { + fError -= (1 << 11); +# 846 "swrast/s_tritemp.h" + zLeft += fdzOuter; +# 869 "swrast/s_tritemp.h" + } + else { + + + + + + + + zLeft += fdzInner; +# 901 "swrast/s_tritemp.h" + } + } + + } + + } + } +} +# 903 "swrast/s_triangle.c" 2 + + + +static void +nodraw_triangle( struct gl_context *ctx, + const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + (void) (ctx && v0 && v1 && v2); +} +# 922 "swrast/s_triangle.c" +void +_swrast_add_spec_terms_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, const SWvertex *v2) +{ + SWvertex *ncv0 = (SWvertex *)v0; + SWvertex *ncv1 = (SWvertex *)v1; + SWvertex *ncv2 = (SWvertex *)v2; + GLfloat rSum, gSum, bSum; + GLchan cSave[3][4]; + + + do { (cSave[0])[0] = (ncv0->color)[0]; (cSave[0])[1] = (ncv0->color)[1]; (cSave[0])[2] = (ncv0->color)[2]; (cSave[0])[3] = (ncv0->color)[3]; } while (0); + do { (cSave[1])[0] = (ncv1->color)[0]; (cSave[1])[1] = (ncv1->color)[1]; (cSave[1])[2] = (ncv1->color)[2]; (cSave[1])[3] = (ncv1->color)[3]; } while (0); + do { (cSave[2])[0] = (ncv2->color)[0]; (cSave[2])[1] = (ncv2->color)[1]; (cSave[2])[2] = (ncv2->color)[2]; (cSave[2])[3] = (ncv2->color)[3]; } while (0); + + rSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv0->color[0])] + ncv0->attrib[FRAG_ATTRIB_COL1][0]; + gSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv0->color[1])] + ncv0->attrib[FRAG_ATTRIB_COL1][1]; + bSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv0->color[2])] + ncv0->attrib[FRAG_ATTRIB_COL1][2]; + do { fi_type __tmp; __tmp.f = (rSum); if (__tmp.i < 0) ncv0->color[0] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv0->color[0] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv0->color[0] = (GLubyte) __tmp.i; } } while (0); + do { fi_type __tmp; __tmp.f = (gSum); if (__tmp.i < 0) ncv0->color[1] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv0->color[1] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv0->color[1] = (GLubyte) __tmp.i; } } while (0); + do { fi_type __tmp; __tmp.f = (bSum); if (__tmp.i < 0) ncv0->color[2] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv0->color[2] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv0->color[2] = (GLubyte) __tmp.i; } } while (0); + + rSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv1->color[0])] + ncv1->attrib[FRAG_ATTRIB_COL1][0]; + gSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv1->color[1])] + ncv1->attrib[FRAG_ATTRIB_COL1][1]; + bSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv1->color[2])] + ncv1->attrib[FRAG_ATTRIB_COL1][2]; + do { fi_type __tmp; __tmp.f = (rSum); if (__tmp.i < 0) ncv1->color[0] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv1->color[0] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv1->color[0] = (GLubyte) __tmp.i; } } while (0); + do { fi_type __tmp; __tmp.f = (gSum); if (__tmp.i < 0) ncv1->color[1] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv1->color[1] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv1->color[1] = (GLubyte) __tmp.i; } } while (0); + do { fi_type __tmp; __tmp.f = (bSum); if (__tmp.i < 0) ncv1->color[2] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv1->color[2] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv1->color[2] = (GLubyte) __tmp.i; } } while (0); + + rSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv2->color[0])] + ncv2->attrib[FRAG_ATTRIB_COL1][0]; + gSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv2->color[1])] + ncv2->attrib[FRAG_ATTRIB_COL1][1]; + bSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv2->color[2])] + ncv2->attrib[FRAG_ATTRIB_COL1][2]; + do { fi_type __tmp; __tmp.f = (rSum); if (__tmp.i < 0) ncv2->color[0] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv2->color[0] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv2->color[0] = (GLubyte) __tmp.i; } } while (0); + do { fi_type __tmp; __tmp.f = (gSum); if (__tmp.i < 0) ncv2->color[1] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv2->color[1] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv2->color[1] = (GLubyte) __tmp.i; } } while (0); + do { fi_type __tmp; __tmp.f = (bSum); if (__tmp.i < 0) ncv2->color[2] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv2->color[2] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv2->color[2] = (GLubyte) __tmp.i; } } while (0); + + SWRAST_CONTEXT(ctx)->SpecTriangle( ctx, ncv0, ncv1, ncv2 ); + + do { (ncv0->color)[0] = (cSave[0])[0]; (ncv0->color)[1] = (cSave[0])[1]; (ncv0->color)[2] = (cSave[0])[2]; (ncv0->color)[3] = (cSave[0])[3]; } while (0); + do { (ncv1->color)[0] = (cSave[1])[0]; (ncv1->color)[1] = (cSave[1])[1]; (ncv1->color)[2] = (cSave[1])[2]; (ncv1->color)[3] = (cSave[1])[3]; } while (0); + do { (ncv2->color)[0] = (cSave[2])[0]; (ncv2->color)[1] = (cSave[2])[1]; (ncv2->color)[2] = (cSave[2])[2]; (ncv2->color)[3] = (cSave[2])[3]; } while (0); +} +# 995 "swrast/s_triangle.c" +void +_swrast_choose_triangle( struct gl_context *ctx ) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + + if (ctx->Polygon.CullFlag && + ctx->Polygon.CullFaceMode == 0x0408) { + swrast->Triangle = nodraw_triangle;; + return; + } + + if (ctx->RenderMode==0x1C00) { + + if (ctx->Polygon.SmoothFlag) { + _swrast_set_aa_triangle_function(ctx); + ; + return; + } + + + if (ctx->Query.CurrentOcclusionObject && + ctx->Depth.Test && + ctx->Depth.Mask == 0x0 && + ctx->Depth.Func == 0x0201 && + !ctx->Stencil._Enabled) { + if (ctx->Color.ColorMask[0][0] == 0 && + ctx->Color.ColorMask[0][1] == 0 && + ctx->Color.ColorMask[0][2] == 0 && + ctx->Color.ColorMask[0][3] == 0) { + swrast->Triangle = occlusion_zless_triangle;; + return; + } + } + + + + + + if (ctx->Texture._EnabledCoordUnits || + ctx->FragmentProgram._Current || + ctx->ATIFragmentShader._Enabled || + _mesa_need_secondary_color(ctx) || + swrast->_FogEnabled) { + + const struct gl_texture_object *texObj2D; + const struct gl_texture_image *texImg; + GLenum minFilter, magFilter, envMode; + gl_format format; + texObj2D = ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; + + texImg = texObj2D ? texObj2D->Image[0][texObj2D->BaseLevel] : ((void *)0); + format = texImg ? texImg->TexFormat : MESA_FORMAT_NONE; + minFilter = texObj2D ? texObj2D->Sampler.MinFilter : 0x0; + magFilter = texObj2D ? texObj2D->Sampler.MagFilter : 0x0; + envMode = ctx->Texture.Unit[0].EnvMode; + + + if (ctx->Texture._EnabledCoordUnits == 0x1 + && !ctx->FragmentProgram._Current + && !ctx->ATIFragmentShader._Enabled + && ctx->Texture._EnabledUnits == 0x1 + && ctx->Texture.Unit[0]._ReallyEnabled == (1 << TEXTURE_2D_INDEX) + && texObj2D->Sampler.WrapS == 0x2901 + && texObj2D->Sampler.WrapT == 0x2901 + && texObj2D->_Swizzle == (((0)<<0) | ((1)<<3) | ((2)<<6) | ((3)<<9)) + && texImg->_IsPowerOfTwo + && texImg->Border == 0 + && texImg->Width == texImg->RowStride + && (format == MESA_FORMAT_RGB888 || format == MESA_FORMAT_RGBA8888) + && minFilter == magFilter + && ctx->Light.Model.ColorControl == 0x81F9 + && !swrast->_FogEnabled + && ctx->Texture.Unit[0].EnvMode != 0x8570 + && ctx->Texture.Unit[0].EnvMode != 0x8503) { + if (ctx->Hint.PerspectiveCorrection==0x1101) { + if (minFilter == 0x2600 + && format == MESA_FORMAT_RGB888 + && (envMode == 0x1E01 || envMode == 0x2101) + && ((swrast->_RasterMask == (0x004 | 0x1000) + && ctx->Depth.Func == 0x0201 + && ctx->Depth.Mask == 0x1) + || swrast->_RasterMask == 0x1000) + && ctx->Polygon.StippleFlag == 0x0 + && ctx->DrawBuffer->Visual.depthBits <= 16) { + if (swrast->_RasterMask == (0x004 | 0x1000)) { + swrast->Triangle = simple_z_textured_triangle;; + } + else { + swrast->Triangle = simple_textured_triangle;; + } + } + else { + + + + if (format == MESA_FORMAT_RGBA8888 && !_mesa_little_endian()) { + + + + swrast->Triangle = general_triangle;; + } + else { + swrast->Triangle = affine_textured_triangle;; + } + + } + } + else { + + + + swrast->Triangle = persp_textured_triangle;; + + } + } + else { + + swrast->Triangle = general_triangle;; + } + } + else { + ; + ; + if (ctx->Light.ShadeModel==0x1D01) { + + + + + swrast->Triangle = smooth_rgba_triangle;; + + } + else { + + + + + swrast->Triangle = flat_rgba_triangle;; + + } + } + } + else if (ctx->RenderMode==0x1C01) { + swrast->Triangle = _swrast_feedback_triangle;; + } + else { + + swrast->Triangle = _swrast_select_triangle;; + } +} diff --git a/394889/s_triangle.i.1 b/394889/s_triangle.i.1 new file mode 100644 index 0000000..cc5200b --- /dev/null +++ b/394889/s_triangle.i.1 @@ -0,0 +1,13412 @@ +typedef unsigned int GLenum; +typedef unsigned char GLboolean; +typedef unsigned int GLbitfield; +typedef void GLvoid; +typedef signed char GLbyte; +typedef short GLshort; +typedef int GLint; +typedef unsigned char GLubyte; +typedef unsigned short GLushort; +typedef unsigned int GLuint; +typedef int GLsizei; +typedef float GLfloat; +typedef float GLclampf; +typedef double GLdouble; +typedef double GLclampd; +__attribute__((visibility("default"))) void glClearIndex( GLfloat c ); +__attribute__((visibility("default"))) void glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ); +__attribute__((visibility("default"))) void glClear( GLbitfield mask ); +__attribute__((visibility("default"))) void glIndexMask( GLuint mask ); +__attribute__((visibility("default"))) void glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ); +__attribute__((visibility("default"))) void glAlphaFunc( GLenum func, GLclampf ref ); +__attribute__((visibility("default"))) void glBlendFunc( GLenum sfactor, GLenum dfactor ); +__attribute__((visibility("default"))) void glLogicOp( GLenum opcode ); +__attribute__((visibility("default"))) void glCullFace( GLenum mode ); +__attribute__((visibility("default"))) void glFrontFace( GLenum mode ); +__attribute__((visibility("default"))) void glPointSize( GLfloat size ); +__attribute__((visibility("default"))) void glLineWidth( GLfloat width ); +__attribute__((visibility("default"))) void glLineStipple( GLint factor, GLushort pattern ); +__attribute__((visibility("default"))) void glPolygonMode( GLenum face, GLenum mode ); +__attribute__((visibility("default"))) void glPolygonOffset( GLfloat factor, GLfloat units ); +__attribute__((visibility("default"))) void glPolygonStipple( const GLubyte *mask ); +__attribute__((visibility("default"))) void glGetPolygonStipple( GLubyte *mask ); +__attribute__((visibility("default"))) void glEdgeFlag( GLboolean flag ); +__attribute__((visibility("default"))) void glEdgeFlagv( const GLboolean *flag ); +__attribute__((visibility("default"))) void glScissor( GLint x, GLint y, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glClipPlane( GLenum plane, const GLdouble *equation ); +__attribute__((visibility("default"))) void glGetClipPlane( GLenum plane, GLdouble *equation ); +__attribute__((visibility("default"))) void glDrawBuffer( GLenum mode ); +__attribute__((visibility("default"))) void glReadBuffer( GLenum mode ); +__attribute__((visibility("default"))) void glEnable( GLenum cap ); +__attribute__((visibility("default"))) void glDisable( GLenum cap ); +__attribute__((visibility("default"))) GLboolean glIsEnabled( GLenum cap ); +__attribute__((visibility("default"))) void glEnableClientState( GLenum cap ); +__attribute__((visibility("default"))) void glDisableClientState( GLenum cap ); +__attribute__((visibility("default"))) void glGetBooleanv( GLenum pname, GLboolean *params ); +__attribute__((visibility("default"))) void glGetDoublev( GLenum pname, GLdouble *params ); +__attribute__((visibility("default"))) void glGetFloatv( GLenum pname, GLfloat *params ); +__attribute__((visibility("default"))) void glGetIntegerv( GLenum pname, GLint *params ); +__attribute__((visibility("default"))) void glPushAttrib( GLbitfield mask ); +__attribute__((visibility("default"))) void glPopAttrib( void ); +__attribute__((visibility("default"))) void glPushClientAttrib( GLbitfield mask ); +__attribute__((visibility("default"))) void glPopClientAttrib( void ); +__attribute__((visibility("default"))) GLint glRenderMode( GLenum mode ); +__attribute__((visibility("default"))) GLenum glGetError( void ); +__attribute__((visibility("default"))) const GLubyte * glGetString( GLenum name ); +__attribute__((visibility("default"))) void glFinish( void ); +__attribute__((visibility("default"))) void glFlush( void ); +__attribute__((visibility("default"))) void glHint( GLenum target, GLenum mode ); +__attribute__((visibility("default"))) void glClearDepth( GLclampd depth ); +__attribute__((visibility("default"))) void glDepthFunc( GLenum func ); +__attribute__((visibility("default"))) void glDepthMask( GLboolean flag ); +__attribute__((visibility("default"))) void glDepthRange( GLclampd near_val, GLclampd far_val ); +__attribute__((visibility("default"))) void glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ); +__attribute__((visibility("default"))) void glAccum( GLenum op, GLfloat value ); +__attribute__((visibility("default"))) void glMatrixMode( GLenum mode ); +__attribute__((visibility("default"))) void glOrtho( GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, + GLdouble near_val, GLdouble far_val ); +__attribute__((visibility("default"))) void glFrustum( GLdouble left, GLdouble right, + GLdouble bottom, GLdouble top, + GLdouble near_val, GLdouble far_val ); +__attribute__((visibility("default"))) void glViewport( GLint x, GLint y, + GLsizei width, GLsizei height ); +__attribute__((visibility("default"))) void glPushMatrix( void ); +__attribute__((visibility("default"))) void glPopMatrix( void ); +__attribute__((visibility("default"))) void glLoadIdentity( void ); +__attribute__((visibility("default"))) void glLoadMatrixd( const GLdouble *m ); +__attribute__((visibility("default"))) void glLoadMatrixf( const GLfloat *m ); +__attribute__((visibility("default"))) void glMultMatrixd( const GLdouble *m ); +__attribute__((visibility("default"))) void glMultMatrixf( const GLfloat *m ); +__attribute__((visibility("default"))) void glRotated( GLdouble angle, + GLdouble x, GLdouble y, GLdouble z ); +__attribute__((visibility("default"))) void glRotatef( GLfloat angle, + GLfloat x, GLfloat y, GLfloat z ); +__attribute__((visibility("default"))) void glScaled( GLdouble x, GLdouble y, GLdouble z ); +__attribute__((visibility("default"))) void glScalef( GLfloat x, GLfloat y, GLfloat z ); +__attribute__((visibility("default"))) void glTranslated( GLdouble x, GLdouble y, GLdouble z ); +__attribute__((visibility("default"))) void glTranslatef( GLfloat x, GLfloat y, GLfloat z ); +__attribute__((visibility("default"))) GLboolean glIsList( GLuint list ); +__attribute__((visibility("default"))) void glDeleteLists( GLuint list, GLsizei range ); +__attribute__((visibility("default"))) GLuint glGenLists( GLsizei range ); +__attribute__((visibility("default"))) void glNewList( GLuint list, GLenum mode ); +__attribute__((visibility("default"))) void glEndList( void ); +__attribute__((visibility("default"))) void glCallList( GLuint list ); +__attribute__((visibility("default"))) void glCallLists( GLsizei n, GLenum type, + const GLvoid *lists ); +__attribute__((visibility("default"))) void glListBase( GLuint base ); +__attribute__((visibility("default"))) void glBegin( GLenum mode ); +__attribute__((visibility("default"))) void glEnd( void ); +__attribute__((visibility("default"))) void glVertex2d( GLdouble x, GLdouble y ); +__attribute__((visibility("default"))) void glVertex2f( GLfloat x, GLfloat y ); +__attribute__((visibility("default"))) void glVertex2i( GLint x, GLint y ); +__attribute__((visibility("default"))) void glVertex2s( GLshort x, GLshort y ); +__attribute__((visibility("default"))) void glVertex3d( GLdouble x, GLdouble y, GLdouble z ); +__attribute__((visibility("default"))) void glVertex3f( GLfloat x, GLfloat y, GLfloat z ); +__attribute__((visibility("default"))) void glVertex3i( GLint x, GLint y, GLint z ); +__attribute__((visibility("default"))) void glVertex3s( GLshort x, GLshort y, GLshort z ); +__attribute__((visibility("default"))) void glVertex4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w ); +__attribute__((visibility("default"))) void glVertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ); +__attribute__((visibility("default"))) void glVertex4i( GLint x, GLint y, GLint z, GLint w ); +__attribute__((visibility("default"))) void glVertex4s( GLshort x, GLshort y, GLshort z, GLshort w ); +__attribute__((visibility("default"))) void glVertex2dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glVertex2fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glVertex2iv( const GLint *v ); +__attribute__((visibility("default"))) void glVertex2sv( const GLshort *v ); +__attribute__((visibility("default"))) void glVertex3dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glVertex3fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glVertex3iv( const GLint *v ); +__attribute__((visibility("default"))) void glVertex3sv( const GLshort *v ); +__attribute__((visibility("default"))) void glVertex4dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glVertex4fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glVertex4iv( const GLint *v ); +__attribute__((visibility("default"))) void glVertex4sv( const GLshort *v ); +__attribute__((visibility("default"))) void glNormal3b( GLbyte nx, GLbyte ny, GLbyte nz ); +__attribute__((visibility("default"))) void glNormal3d( GLdouble nx, GLdouble ny, GLdouble nz ); +__attribute__((visibility("default"))) void glNormal3f( GLfloat nx, GLfloat ny, GLfloat nz ); +__attribute__((visibility("default"))) void glNormal3i( GLint nx, GLint ny, GLint nz ); +__attribute__((visibility("default"))) void glNormal3s( GLshort nx, GLshort ny, GLshort nz ); +__attribute__((visibility("default"))) void glNormal3bv( const GLbyte *v ); +__attribute__((visibility("default"))) void glNormal3dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glNormal3fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glNormal3iv( const GLint *v ); +__attribute__((visibility("default"))) void glNormal3sv( const GLshort *v ); +__attribute__((visibility("default"))) void glIndexd( GLdouble c ); +__attribute__((visibility("default"))) void glIndexf( GLfloat c ); +__attribute__((visibility("default"))) void glIndexi( GLint c ); +__attribute__((visibility("default"))) void glIndexs( GLshort c ); +__attribute__((visibility("default"))) void glIndexub( GLubyte c ); +__attribute__((visibility("default"))) void glIndexdv( const GLdouble *c ); +__attribute__((visibility("default"))) void glIndexfv( const GLfloat *c ); +__attribute__((visibility("default"))) void glIndexiv( const GLint *c ); +__attribute__((visibility("default"))) void glIndexsv( const GLshort *c ); +__attribute__((visibility("default"))) void glIndexubv( const GLubyte *c ); +__attribute__((visibility("default"))) void glColor3b( GLbyte red, GLbyte green, GLbyte blue ); +__attribute__((visibility("default"))) void glColor3d( GLdouble red, GLdouble green, GLdouble blue ); +__attribute__((visibility("default"))) void glColor3f( GLfloat red, GLfloat green, GLfloat blue ); +__attribute__((visibility("default"))) void glColor3i( GLint red, GLint green, GLint blue ); +__attribute__((visibility("default"))) void glColor3s( GLshort red, GLshort green, GLshort blue ); +__attribute__((visibility("default"))) void glColor3ub( GLubyte red, GLubyte green, GLubyte blue ); +__attribute__((visibility("default"))) void glColor3ui( GLuint red, GLuint green, GLuint blue ); +__attribute__((visibility("default"))) void glColor3us( GLushort red, GLushort green, GLushort blue ); +__attribute__((visibility("default"))) void glColor4b( GLbyte red, GLbyte green, + GLbyte blue, GLbyte alpha ); +__attribute__((visibility("default"))) void glColor4d( GLdouble red, GLdouble green, + GLdouble blue, GLdouble alpha ); +__attribute__((visibility("default"))) void glColor4f( GLfloat red, GLfloat green, + GLfloat blue, GLfloat alpha ); +__attribute__((visibility("default"))) void glColor4i( GLint red, GLint green, + GLint blue, GLint alpha ); +__attribute__((visibility("default"))) void glColor4s( GLshort red, GLshort green, + GLshort blue, GLshort alpha ); +__attribute__((visibility("default"))) void glColor4ub( GLubyte red, GLubyte green, + GLubyte blue, GLubyte alpha ); +__attribute__((visibility("default"))) void glColor4ui( GLuint red, GLuint green, + GLuint blue, GLuint alpha ); +__attribute__((visibility("default"))) void glColor4us( GLushort red, GLushort green, + GLushort blue, GLushort alpha ); +__attribute__((visibility("default"))) void glColor3bv( const GLbyte *v ); +__attribute__((visibility("default"))) void glColor3dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glColor3fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glColor3iv( const GLint *v ); +__attribute__((visibility("default"))) void glColor3sv( const GLshort *v ); +__attribute__((visibility("default"))) void glColor3ubv( const GLubyte *v ); +__attribute__((visibility("default"))) void glColor3uiv( const GLuint *v ); +__attribute__((visibility("default"))) void glColor3usv( const GLushort *v ); +__attribute__((visibility("default"))) void glColor4bv( const GLbyte *v ); +__attribute__((visibility("default"))) void glColor4dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glColor4fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glColor4iv( const GLint *v ); +__attribute__((visibility("default"))) void glColor4sv( const GLshort *v ); +__attribute__((visibility("default"))) void glColor4ubv( const GLubyte *v ); +__attribute__((visibility("default"))) void glColor4uiv( const GLuint *v ); +__attribute__((visibility("default"))) void glColor4usv( const GLushort *v ); +__attribute__((visibility("default"))) void glTexCoord1d( GLdouble s ); +__attribute__((visibility("default"))) void glTexCoord1f( GLfloat s ); +__attribute__((visibility("default"))) void glTexCoord1i( GLint s ); +__attribute__((visibility("default"))) void glTexCoord1s( GLshort s ); +__attribute__((visibility("default"))) void glTexCoord2d( GLdouble s, GLdouble t ); +__attribute__((visibility("default"))) void glTexCoord2f( GLfloat s, GLfloat t ); +__attribute__((visibility("default"))) void glTexCoord2i( GLint s, GLint t ); +__attribute__((visibility("default"))) void glTexCoord2s( GLshort s, GLshort t ); +__attribute__((visibility("default"))) void glTexCoord3d( GLdouble s, GLdouble t, GLdouble r ); +__attribute__((visibility("default"))) void glTexCoord3f( GLfloat s, GLfloat t, GLfloat r ); +__attribute__((visibility("default"))) void glTexCoord3i( GLint s, GLint t, GLint r ); +__attribute__((visibility("default"))) void glTexCoord3s( GLshort s, GLshort t, GLshort r ); +__attribute__((visibility("default"))) void glTexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q ); +__attribute__((visibility("default"))) void glTexCoord4f( GLfloat s, GLfloat t, GLfloat r, GLfloat q ); +__attribute__((visibility("default"))) void glTexCoord4i( GLint s, GLint t, GLint r, GLint q ); +__attribute__((visibility("default"))) void glTexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q ); +__attribute__((visibility("default"))) void glTexCoord1dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glTexCoord1fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glTexCoord1iv( const GLint *v ); +__attribute__((visibility("default"))) void glTexCoord1sv( const GLshort *v ); +__attribute__((visibility("default"))) void glTexCoord2dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glTexCoord2fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glTexCoord2iv( const GLint *v ); +__attribute__((visibility("default"))) void glTexCoord2sv( const GLshort *v ); +__attribute__((visibility("default"))) void glTexCoord3dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glTexCoord3fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glTexCoord3iv( const GLint *v ); +__attribute__((visibility("default"))) void glTexCoord3sv( const GLshort *v ); +__attribute__((visibility("default"))) void glTexCoord4dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glTexCoord4fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glTexCoord4iv( const GLint *v ); +__attribute__((visibility("default"))) void glTexCoord4sv( const GLshort *v ); +__attribute__((visibility("default"))) void glRasterPos2d( GLdouble x, GLdouble y ); +__attribute__((visibility("default"))) void glRasterPos2f( GLfloat x, GLfloat y ); +__attribute__((visibility("default"))) void glRasterPos2i( GLint x, GLint y ); +__attribute__((visibility("default"))) void glRasterPos2s( GLshort x, GLshort y ); +__attribute__((visibility("default"))) void glRasterPos3d( GLdouble x, GLdouble y, GLdouble z ); +__attribute__((visibility("default"))) void glRasterPos3f( GLfloat x, GLfloat y, GLfloat z ); +__attribute__((visibility("default"))) void glRasterPos3i( GLint x, GLint y, GLint z ); +__attribute__((visibility("default"))) void glRasterPos3s( GLshort x, GLshort y, GLshort z ); +__attribute__((visibility("default"))) void glRasterPos4d( GLdouble x, GLdouble y, GLdouble z, GLdouble w ); +__attribute__((visibility("default"))) void glRasterPos4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w ); +__attribute__((visibility("default"))) void glRasterPos4i( GLint x, GLint y, GLint z, GLint w ); +__attribute__((visibility("default"))) void glRasterPos4s( GLshort x, GLshort y, GLshort z, GLshort w ); +__attribute__((visibility("default"))) void glRasterPos2dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glRasterPos2fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glRasterPos2iv( const GLint *v ); +__attribute__((visibility("default"))) void glRasterPos2sv( const GLshort *v ); +__attribute__((visibility("default"))) void glRasterPos3dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glRasterPos3fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glRasterPos3iv( const GLint *v ); +__attribute__((visibility("default"))) void glRasterPos3sv( const GLshort *v ); +__attribute__((visibility("default"))) void glRasterPos4dv( const GLdouble *v ); +__attribute__((visibility("default"))) void glRasterPos4fv( const GLfloat *v ); +__attribute__((visibility("default"))) void glRasterPos4iv( const GLint *v ); +__attribute__((visibility("default"))) void glRasterPos4sv( const GLshort *v ); +__attribute__((visibility("default"))) void glRectd( GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2 ); +__attribute__((visibility("default"))) void glRectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 ); +__attribute__((visibility("default"))) void glRecti( GLint x1, GLint y1, GLint x2, GLint y2 ); +__attribute__((visibility("default"))) void glRects( GLshort x1, GLshort y1, GLshort x2, GLshort y2 ); +__attribute__((visibility("default"))) void glRectdv( const GLdouble *v1, const GLdouble *v2 ); +__attribute__((visibility("default"))) void glRectfv( const GLfloat *v1, const GLfloat *v2 ); +__attribute__((visibility("default"))) void glRectiv( const GLint *v1, const GLint *v2 ); +__attribute__((visibility("default"))) void glRectsv( const GLshort *v1, const GLshort *v2 ); +__attribute__((visibility("default"))) void glVertexPointer( GLint size, GLenum type, + GLsizei stride, const GLvoid *ptr ); +__attribute__((visibility("default"))) void glNormalPointer( GLenum type, GLsizei stride, + const GLvoid *ptr ); +__attribute__((visibility("default"))) void glColorPointer( GLint size, GLenum type, + GLsizei stride, const GLvoid *ptr ); +__attribute__((visibility("default"))) void glIndexPointer( GLenum type, GLsizei stride, + const GLvoid *ptr ); +__attribute__((visibility("default"))) void glTexCoordPointer( GLint size, GLenum type, + GLsizei stride, const GLvoid *ptr ); +__attribute__((visibility("default"))) void glEdgeFlagPointer( GLsizei stride, const GLvoid *ptr ); +__attribute__((visibility("default"))) void glGetPointerv( GLenum pname, GLvoid **params ); +__attribute__((visibility("default"))) void glArrayElement( GLint i ); +__attribute__((visibility("default"))) void glDrawArrays( GLenum mode, GLint first, GLsizei count ); +__attribute__((visibility("default"))) void glDrawElements( GLenum mode, GLsizei count, + GLenum type, const GLvoid *indices ); +__attribute__((visibility("default"))) void glInterleavedArrays( GLenum format, GLsizei stride, + const GLvoid *pointer ); +__attribute__((visibility("default"))) void glShadeModel( GLenum mode ); +__attribute__((visibility("default"))) void glLightf( GLenum light, GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glLighti( GLenum light, GLenum pname, GLint param ); +__attribute__((visibility("default"))) void glLightfv( GLenum light, GLenum pname, + const GLfloat *params ); +__attribute__((visibility("default"))) void glLightiv( GLenum light, GLenum pname, + const GLint *params ); +__attribute__((visibility("default"))) void glGetLightfv( GLenum light, GLenum pname, + GLfloat *params ); +__attribute__((visibility("default"))) void glGetLightiv( GLenum light, GLenum pname, + GLint *params ); +__attribute__((visibility("default"))) void glLightModelf( GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glLightModeli( GLenum pname, GLint param ); +__attribute__((visibility("default"))) void glLightModelfv( GLenum pname, const GLfloat *params ); +__attribute__((visibility("default"))) void glLightModeliv( GLenum pname, const GLint *params ); +__attribute__((visibility("default"))) void glMaterialf( GLenum face, GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glMateriali( GLenum face, GLenum pname, GLint param ); +__attribute__((visibility("default"))) void glMaterialfv( GLenum face, GLenum pname, const GLfloat *params ); +__attribute__((visibility("default"))) void glMaterialiv( GLenum face, GLenum pname, const GLint *params ); +__attribute__((visibility("default"))) void glGetMaterialfv( GLenum face, GLenum pname, GLfloat *params ); +__attribute__((visibility("default"))) void glGetMaterialiv( GLenum face, GLenum pname, GLint *params ); +__attribute__((visibility("default"))) void glColorMaterial( GLenum face, GLenum mode ); +__attribute__((visibility("default"))) void glPixelZoom( GLfloat xfactor, GLfloat yfactor ); +__attribute__((visibility("default"))) void glPixelStoref( GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glPixelStorei( GLenum pname, GLint param ); +__attribute__((visibility("default"))) void glPixelTransferf( GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glPixelTransferi( GLenum pname, GLint param ); +__attribute__((visibility("default"))) void glPixelMapfv( GLenum map, GLsizei mapsize, + const GLfloat *values ); +__attribute__((visibility("default"))) void glPixelMapuiv( GLenum map, GLsizei mapsize, + const GLuint *values ); +__attribute__((visibility("default"))) void glPixelMapusv( GLenum map, GLsizei mapsize, + const GLushort *values ); +__attribute__((visibility("default"))) void glGetPixelMapfv( GLenum map, GLfloat *values ); +__attribute__((visibility("default"))) void glGetPixelMapuiv( GLenum map, GLuint *values ); +__attribute__((visibility("default"))) void glGetPixelMapusv( GLenum map, GLushort *values ); +__attribute__((visibility("default"))) void glBitmap( GLsizei width, GLsizei height, + GLfloat xorig, GLfloat yorig, + GLfloat xmove, GLfloat ymove, + const GLubyte *bitmap ); +__attribute__((visibility("default"))) void glReadPixels( GLint x, GLint y, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + GLvoid *pixels ); +__attribute__((visibility("default"))) void glDrawPixels( GLsizei width, GLsizei height, + GLenum format, GLenum type, + const GLvoid *pixels ); +__attribute__((visibility("default"))) void glCopyPixels( GLint x, GLint y, + GLsizei width, GLsizei height, + GLenum type ); +__attribute__((visibility("default"))) void glStencilFunc( GLenum func, GLint ref, GLuint mask ); +__attribute__((visibility("default"))) void glStencilMask( GLuint mask ); +__attribute__((visibility("default"))) void glStencilOp( GLenum fail, GLenum zfail, GLenum zpass ); +__attribute__((visibility("default"))) void glClearStencil( GLint s ); +__attribute__((visibility("default"))) void glTexGend( GLenum coord, GLenum pname, GLdouble param ); +__attribute__((visibility("default"))) void glTexGenf( GLenum coord, GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glTexGeni( GLenum coord, GLenum pname, GLint param ); +__attribute__((visibility("default"))) void glTexGendv( GLenum coord, GLenum pname, const GLdouble *params ); +__attribute__((visibility("default"))) void glTexGenfv( GLenum coord, GLenum pname, const GLfloat *params ); +__attribute__((visibility("default"))) void glTexGeniv( GLenum coord, GLenum pname, const GLint *params ); +__attribute__((visibility("default"))) void glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params ); +__attribute__((visibility("default"))) void glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ); +__attribute__((visibility("default"))) void glGetTexGeniv( GLenum coord, GLenum pname, GLint *params ); +__attribute__((visibility("default"))) void glTexEnvf( GLenum target, GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glTexEnvi( GLenum target, GLenum pname, GLint param ); +__attribute__((visibility("default"))) void glTexEnvfv( GLenum target, GLenum pname, const GLfloat *params ); +__attribute__((visibility("default"))) void glTexEnviv( GLenum target, GLenum pname, const GLint *params ); +__attribute__((visibility("default"))) void glGetTexEnvfv( GLenum target, GLenum pname, GLfloat *params ); +__attribute__((visibility("default"))) void glGetTexEnviv( GLenum target, GLenum pname, GLint *params ); +__attribute__((visibility("default"))) void glTexParameterf( GLenum target, GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glTexParameteri( GLenum target, GLenum pname, GLint param ); +__attribute__((visibility("default"))) void glTexParameterfv( GLenum target, GLenum pname, + const GLfloat *params ); +__attribute__((visibility("default"))) void glTexParameteriv( GLenum target, GLenum pname, + const GLint *params ); +__attribute__((visibility("default"))) void glGetTexParameterfv( GLenum target, + GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetTexParameteriv( GLenum target, + GLenum pname, GLint *params ); +__attribute__((visibility("default"))) void glGetTexLevelParameterfv( GLenum target, GLint level, + GLenum pname, GLfloat *params ); +__attribute__((visibility("default"))) void glGetTexLevelParameteriv( GLenum target, GLint level, + GLenum pname, GLint *params ); +__attribute__((visibility("default"))) void glTexImage1D( GLenum target, GLint level, + GLint internalFormat, + GLsizei width, GLint border, + GLenum format, GLenum type, + const GLvoid *pixels ); +__attribute__((visibility("default"))) void glTexImage2D( GLenum target, GLint level, + GLint internalFormat, + GLsizei width, GLsizei height, + GLint border, GLenum format, GLenum type, + const GLvoid *pixels ); +__attribute__((visibility("default"))) void glGetTexImage( GLenum target, GLint level, + GLenum format, GLenum type, + GLvoid *pixels ); +__attribute__((visibility("default"))) void glGenTextures( GLsizei n, GLuint *textures ); +__attribute__((visibility("default"))) void glDeleteTextures( GLsizei n, const GLuint *textures); +__attribute__((visibility("default"))) void glBindTexture( GLenum target, GLuint texture ); +__attribute__((visibility("default"))) void glPrioritizeTextures( GLsizei n, + const GLuint *textures, + const GLclampf *priorities ); +__attribute__((visibility("default"))) GLboolean glAreTexturesResident( GLsizei n, + const GLuint *textures, + GLboolean *residences ); +__attribute__((visibility("default"))) GLboolean glIsTexture( GLuint texture ); +__attribute__((visibility("default"))) void glTexSubImage1D( GLenum target, GLint level, + GLint xoffset, + GLsizei width, GLenum format, + GLenum type, const GLvoid *pixels ); +__attribute__((visibility("default"))) void glTexSubImage2D( GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const GLvoid *pixels ); +__attribute__((visibility("default"))) void glCopyTexImage1D( GLenum target, GLint level, + GLenum internalformat, + GLint x, GLint y, + GLsizei width, GLint border ); +__attribute__((visibility("default"))) void glCopyTexImage2D( GLenum target, GLint level, + GLenum internalformat, + GLint x, GLint y, + GLsizei width, GLsizei height, + GLint border ); +__attribute__((visibility("default"))) void glCopyTexSubImage1D( GLenum target, GLint level, + GLint xoffset, GLint x, GLint y, + GLsizei width ); +__attribute__((visibility("default"))) void glCopyTexSubImage2D( GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint x, GLint y, + GLsizei width, GLsizei height ); +__attribute__((visibility("default"))) void glMap1d( GLenum target, GLdouble u1, GLdouble u2, + GLint stride, + GLint order, const GLdouble *points ); +__attribute__((visibility("default"))) void glMap1f( GLenum target, GLfloat u1, GLfloat u2, + GLint stride, + GLint order, const GLfloat *points ); +__attribute__((visibility("default"))) void glMap2d( GLenum target, + GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, + GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, + const GLdouble *points ); +__attribute__((visibility("default"))) void glMap2f( GLenum target, + GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, + GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, + const GLfloat *points ); +__attribute__((visibility("default"))) void glGetMapdv( GLenum target, GLenum query, GLdouble *v ); +__attribute__((visibility("default"))) void glGetMapfv( GLenum target, GLenum query, GLfloat *v ); +__attribute__((visibility("default"))) void glGetMapiv( GLenum target, GLenum query, GLint *v ); +__attribute__((visibility("default"))) void glEvalCoord1d( GLdouble u ); +__attribute__((visibility("default"))) void glEvalCoord1f( GLfloat u ); +__attribute__((visibility("default"))) void glEvalCoord1dv( const GLdouble *u ); +__attribute__((visibility("default"))) void glEvalCoord1fv( const GLfloat *u ); +__attribute__((visibility("default"))) void glEvalCoord2d( GLdouble u, GLdouble v ); +__attribute__((visibility("default"))) void glEvalCoord2f( GLfloat u, GLfloat v ); +__attribute__((visibility("default"))) void glEvalCoord2dv( const GLdouble *u ); +__attribute__((visibility("default"))) void glEvalCoord2fv( const GLfloat *u ); +__attribute__((visibility("default"))) void glMapGrid1d( GLint un, GLdouble u1, GLdouble u2 ); +__attribute__((visibility("default"))) void glMapGrid1f( GLint un, GLfloat u1, GLfloat u2 ); +__attribute__((visibility("default"))) void glMapGrid2d( GLint un, GLdouble u1, GLdouble u2, + GLint vn, GLdouble v1, GLdouble v2 ); +__attribute__((visibility("default"))) void glMapGrid2f( GLint un, GLfloat u1, GLfloat u2, + GLint vn, GLfloat v1, GLfloat v2 ); +__attribute__((visibility("default"))) void glEvalPoint1( GLint i ); +__attribute__((visibility("default"))) void glEvalPoint2( GLint i, GLint j ); +__attribute__((visibility("default"))) void glEvalMesh1( GLenum mode, GLint i1, GLint i2 ); +__attribute__((visibility("default"))) void glEvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ); +__attribute__((visibility("default"))) void glFogf( GLenum pname, GLfloat param ); +__attribute__((visibility("default"))) void glFogi( GLenum pname, GLint param ); +__attribute__((visibility("default"))) void glFogfv( GLenum pname, const GLfloat *params ); +__attribute__((visibility("default"))) void glFogiv( GLenum pname, const GLint *params ); +__attribute__((visibility("default"))) void glFeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer ); +__attribute__((visibility("default"))) void glPassThrough( GLfloat token ); +__attribute__((visibility("default"))) void glSelectBuffer( GLsizei size, GLuint *buffer ); +__attribute__((visibility("default"))) void glInitNames( void ); +__attribute__((visibility("default"))) void glLoadName( GLuint name ); +__attribute__((visibility("default"))) void glPushName( GLuint name ); +__attribute__((visibility("default"))) void glPopName( void ); +__attribute__((visibility("default"))) void glDrawRangeElements( GLenum mode, GLuint start, + GLuint end, GLsizei count, GLenum type, const GLvoid *indices ); +__attribute__((visibility("default"))) void glTexImage3D( GLenum target, GLint level, + GLint internalFormat, + GLsizei width, GLsizei height, + GLsizei depth, GLint border, + GLenum format, GLenum type, + const GLvoid *pixels ); +__attribute__((visibility("default"))) void glTexSubImage3D( GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint zoffset, GLsizei width, + GLsizei height, GLsizei depth, + GLenum format, + GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glCopyTexSubImage3D( GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint zoffset, GLint x, + GLint y, GLsizei width, + GLsizei height ); +typedef void ( * PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); +typedef void ( * PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glColorTable( GLenum target, GLenum internalformat, + GLsizei width, GLenum format, + GLenum type, const GLvoid *table ); +__attribute__((visibility("default"))) void glColorSubTable( GLenum target, + GLsizei start, GLsizei count, + GLenum format, GLenum type, + const GLvoid *data ); +__attribute__((visibility("default"))) void glColorTableParameteriv(GLenum target, GLenum pname, + const GLint *params); +__attribute__((visibility("default"))) void glColorTableParameterfv(GLenum target, GLenum pname, + const GLfloat *params); +__attribute__((visibility("default"))) void glCopyColorSubTable( GLenum target, GLsizei start, + GLint x, GLint y, GLsizei width ); +__attribute__((visibility("default"))) void glCopyColorTable( GLenum target, GLenum internalformat, + GLint x, GLint y, GLsizei width ); +__attribute__((visibility("default"))) void glGetColorTable( GLenum target, GLenum format, + GLenum type, GLvoid *table ); +__attribute__((visibility("default"))) void glGetColorTableParameterfv( GLenum target, GLenum pname, + GLfloat *params ); +__attribute__((visibility("default"))) void glGetColorTableParameteriv( GLenum target, GLenum pname, + GLint *params ); +__attribute__((visibility("default"))) void glBlendEquation( GLenum mode ); +__attribute__((visibility("default"))) void glBlendColor( GLclampf red, GLclampf green, + GLclampf blue, GLclampf alpha ); +__attribute__((visibility("default"))) void glHistogram( GLenum target, GLsizei width, + GLenum internalformat, GLboolean sink ); +__attribute__((visibility("default"))) void glResetHistogram( GLenum target ); +__attribute__((visibility("default"))) void glGetHistogram( GLenum target, GLboolean reset, + GLenum format, GLenum type, + GLvoid *values ); +__attribute__((visibility("default"))) void glGetHistogramParameterfv( GLenum target, GLenum pname, + GLfloat *params ); +__attribute__((visibility("default"))) void glGetHistogramParameteriv( GLenum target, GLenum pname, + GLint *params ); +__attribute__((visibility("default"))) void glMinmax( GLenum target, GLenum internalformat, + GLboolean sink ); +__attribute__((visibility("default"))) void glResetMinmax( GLenum target ); +__attribute__((visibility("default"))) void glGetMinmax( GLenum target, GLboolean reset, + GLenum format, GLenum types, + GLvoid *values ); +__attribute__((visibility("default"))) void glGetMinmaxParameterfv( GLenum target, GLenum pname, + GLfloat *params ); +__attribute__((visibility("default"))) void glGetMinmaxParameteriv( GLenum target, GLenum pname, + GLint *params ); +__attribute__((visibility("default"))) void glConvolutionFilter1D( GLenum target, + GLenum internalformat, GLsizei width, GLenum format, GLenum type, + const GLvoid *image ); +__attribute__((visibility("default"))) void glConvolutionFilter2D( GLenum target, + GLenum internalformat, GLsizei width, GLsizei height, GLenum format, + GLenum type, const GLvoid *image ); +__attribute__((visibility("default"))) void glConvolutionParameterf( GLenum target, GLenum pname, + GLfloat params ); +__attribute__((visibility("default"))) void glConvolutionParameterfv( GLenum target, GLenum pname, + const GLfloat *params ); +__attribute__((visibility("default"))) void glConvolutionParameteri( GLenum target, GLenum pname, + GLint params ); +__attribute__((visibility("default"))) void glConvolutionParameteriv( GLenum target, GLenum pname, + const GLint *params ); +__attribute__((visibility("default"))) void glCopyConvolutionFilter1D( GLenum target, + GLenum internalformat, GLint x, GLint y, GLsizei width ); +__attribute__((visibility("default"))) void glCopyConvolutionFilter2D( GLenum target, + GLenum internalformat, GLint x, GLint y, GLsizei width, + GLsizei height); +__attribute__((visibility("default"))) void glGetConvolutionFilter( GLenum target, GLenum format, + GLenum type, GLvoid *image ); +__attribute__((visibility("default"))) void glGetConvolutionParameterfv( GLenum target, GLenum pname, + GLfloat *params ); +__attribute__((visibility("default"))) void glGetConvolutionParameteriv( GLenum target, GLenum pname, + GLint *params ); +__attribute__((visibility("default"))) void glSeparableFilter2D( GLenum target, + GLenum internalformat, GLsizei width, GLsizei height, GLenum format, + GLenum type, const GLvoid *row, const GLvoid *column ); +__attribute__((visibility("default"))) void glGetSeparableFilter( GLenum target, GLenum format, + GLenum type, GLvoid *row, GLvoid *column, GLvoid *span ); +typedef void ( * PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +typedef void ( * PFNGLBLENDEQUATIONPROC) (GLenum mode); +__attribute__((visibility("default"))) void glActiveTexture( GLenum texture ); +__attribute__((visibility("default"))) void glClientActiveTexture( GLenum texture ); +__attribute__((visibility("default"))) void glCompressedTexImage1D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data ); +__attribute__((visibility("default"))) void glCompressedTexImage2D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data ); +__attribute__((visibility("default"))) void glCompressedTexImage3D( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data ); +__attribute__((visibility("default"))) void glCompressedTexSubImage1D( GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data ); +__attribute__((visibility("default"))) void glCompressedTexSubImage2D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data ); +__attribute__((visibility("default"))) void glCompressedTexSubImage3D( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data ); +__attribute__((visibility("default"))) void glGetCompressedTexImage( GLenum target, GLint lod, GLvoid *img ); +__attribute__((visibility("default"))) void glMultiTexCoord1d( GLenum target, GLdouble s ); +__attribute__((visibility("default"))) void glMultiTexCoord1dv( GLenum target, const GLdouble *v ); +__attribute__((visibility("default"))) void glMultiTexCoord1f( GLenum target, GLfloat s ); +__attribute__((visibility("default"))) void glMultiTexCoord1fv( GLenum target, const GLfloat *v ); +__attribute__((visibility("default"))) void glMultiTexCoord1i( GLenum target, GLint s ); +__attribute__((visibility("default"))) void glMultiTexCoord1iv( GLenum target, const GLint *v ); +__attribute__((visibility("default"))) void glMultiTexCoord1s( GLenum target, GLshort s ); +__attribute__((visibility("default"))) void glMultiTexCoord1sv( GLenum target, const GLshort *v ); +__attribute__((visibility("default"))) void glMultiTexCoord2d( GLenum target, GLdouble s, GLdouble t ); +__attribute__((visibility("default"))) void glMultiTexCoord2dv( GLenum target, const GLdouble *v ); +__attribute__((visibility("default"))) void glMultiTexCoord2f( GLenum target, GLfloat s, GLfloat t ); +__attribute__((visibility("default"))) void glMultiTexCoord2fv( GLenum target, const GLfloat *v ); +__attribute__((visibility("default"))) void glMultiTexCoord2i( GLenum target, GLint s, GLint t ); +__attribute__((visibility("default"))) void glMultiTexCoord2iv( GLenum target, const GLint *v ); +__attribute__((visibility("default"))) void glMultiTexCoord2s( GLenum target, GLshort s, GLshort t ); +__attribute__((visibility("default"))) void glMultiTexCoord2sv( GLenum target, const GLshort *v ); +__attribute__((visibility("default"))) void glMultiTexCoord3d( GLenum target, GLdouble s, GLdouble t, GLdouble r ); +__attribute__((visibility("default"))) void glMultiTexCoord3dv( GLenum target, const GLdouble *v ); +__attribute__((visibility("default"))) void glMultiTexCoord3f( GLenum target, GLfloat s, GLfloat t, GLfloat r ); +__attribute__((visibility("default"))) void glMultiTexCoord3fv( GLenum target, const GLfloat *v ); +__attribute__((visibility("default"))) void glMultiTexCoord3i( GLenum target, GLint s, GLint t, GLint r ); +__attribute__((visibility("default"))) void glMultiTexCoord3iv( GLenum target, const GLint *v ); +__attribute__((visibility("default"))) void glMultiTexCoord3s( GLenum target, GLshort s, GLshort t, GLshort r ); +__attribute__((visibility("default"))) void glMultiTexCoord3sv( GLenum target, const GLshort *v ); +__attribute__((visibility("default"))) void glMultiTexCoord4d( GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q ); +__attribute__((visibility("default"))) void glMultiTexCoord4dv( GLenum target, const GLdouble *v ); +__attribute__((visibility("default"))) void glMultiTexCoord4f( GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q ); +__attribute__((visibility("default"))) void glMultiTexCoord4fv( GLenum target, const GLfloat *v ); +__attribute__((visibility("default"))) void glMultiTexCoord4i( GLenum target, GLint s, GLint t, GLint r, GLint q ); +__attribute__((visibility("default"))) void glMultiTexCoord4iv( GLenum target, const GLint *v ); +__attribute__((visibility("default"))) void glMultiTexCoord4s( GLenum target, GLshort s, GLshort t, GLshort r, GLshort q ); +__attribute__((visibility("default"))) void glMultiTexCoord4sv( GLenum target, const GLshort *v ); +__attribute__((visibility("default"))) void glLoadTransposeMatrixd( const GLdouble m[16] ); +__attribute__((visibility("default"))) void glLoadTransposeMatrixf( const GLfloat m[16] ); +__attribute__((visibility("default"))) void glMultTransposeMatrixd( const GLdouble m[16] ); +__attribute__((visibility("default"))) void glMultTransposeMatrixf( const GLfloat m[16] ); +__attribute__((visibility("default"))) void glSampleCoverage( GLclampf value, GLboolean invert ); +typedef void ( * PFNGLACTIVETEXTUREPROC) (GLenum texture); +typedef void ( * PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert); +typedef void ( * PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img); +__attribute__((visibility("default"))) void glActiveTextureARB(GLenum texture); +__attribute__((visibility("default"))) void glClientActiveTextureARB(GLenum texture); +__attribute__((visibility("default"))) void glMultiTexCoord1dARB(GLenum target, GLdouble s); +__attribute__((visibility("default"))) void glMultiTexCoord1dvARB(GLenum target, const GLdouble *v); +__attribute__((visibility("default"))) void glMultiTexCoord1fARB(GLenum target, GLfloat s); +__attribute__((visibility("default"))) void glMultiTexCoord1fvARB(GLenum target, const GLfloat *v); +__attribute__((visibility("default"))) void glMultiTexCoord1iARB(GLenum target, GLint s); +__attribute__((visibility("default"))) void glMultiTexCoord1ivARB(GLenum target, const GLint *v); +__attribute__((visibility("default"))) void glMultiTexCoord1sARB(GLenum target, GLshort s); +__attribute__((visibility("default"))) void glMultiTexCoord1svARB(GLenum target, const GLshort *v); +__attribute__((visibility("default"))) void glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t); +__attribute__((visibility("default"))) void glMultiTexCoord2dvARB(GLenum target, const GLdouble *v); +__attribute__((visibility("default"))) void glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t); +__attribute__((visibility("default"))) void glMultiTexCoord2fvARB(GLenum target, const GLfloat *v); +__attribute__((visibility("default"))) void glMultiTexCoord2iARB(GLenum target, GLint s, GLint t); +__attribute__((visibility("default"))) void glMultiTexCoord2ivARB(GLenum target, const GLint *v); +__attribute__((visibility("default"))) void glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t); +__attribute__((visibility("default"))) void glMultiTexCoord2svARB(GLenum target, const GLshort *v); +__attribute__((visibility("default"))) void glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r); +__attribute__((visibility("default"))) void glMultiTexCoord3dvARB(GLenum target, const GLdouble *v); +__attribute__((visibility("default"))) void glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r); +__attribute__((visibility("default"))) void glMultiTexCoord3fvARB(GLenum target, const GLfloat *v); +__attribute__((visibility("default"))) void glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r); +__attribute__((visibility("default"))) void glMultiTexCoord3ivARB(GLenum target, const GLint *v); +__attribute__((visibility("default"))) void glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r); +__attribute__((visibility("default"))) void glMultiTexCoord3svARB(GLenum target, const GLshort *v); +__attribute__((visibility("default"))) void glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +__attribute__((visibility("default"))) void glMultiTexCoord4dvARB(GLenum target, const GLdouble *v); +__attribute__((visibility("default"))) void glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +__attribute__((visibility("default"))) void glMultiTexCoord4fvARB(GLenum target, const GLfloat *v); +__attribute__((visibility("default"))) void glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q); +__attribute__((visibility("default"))) void glMultiTexCoord4ivARB(GLenum target, const GLint *v); +__attribute__((visibility("default"))) void glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +__attribute__((visibility("default"))) void glMultiTexCoord4svARB(GLenum target, const GLshort *v); +typedef void ( * PFNGLACTIVETEXTUREARBPROC) (GLenum texture); +typedef void ( * PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); +typedef void ( * PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); +typedef void ( * PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v); +typedef void ( * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); +typedef void ( * PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v); +typedef void ( * PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); +typedef void ( * PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v); +typedef void ( * PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); +typedef void ( * PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v); +typedef void ( * PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void ( * PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v); +typedef void ( * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void ( * PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v); +typedef void ( * PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); +typedef void ( * PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v); +typedef void ( * PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); +typedef void ( * PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v); +typedef void ( * PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void ( * PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v); +typedef void ( * PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void ( * PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v); +typedef void ( * PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void ( * PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v); +typedef void ( * PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void ( * PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v); +typedef void ( * PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void ( * PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v); +typedef void ( * PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void ( * PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v); +typedef void ( * PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void ( * PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v); +typedef void ( * PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void ( * PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v); +typedef int ptrdiff_t; +typedef unsigned int size_t; +typedef long int wchar_t; +typedef char GLchar; +typedef ptrdiff_t GLintptr; +typedef ptrdiff_t GLsizeiptr; +typedef ptrdiff_t GLintptrARB; +typedef ptrdiff_t GLsizeiptrARB; +typedef char GLcharARB; +typedef unsigned int GLhandleARB; +typedef unsigned short GLhalfARB; +typedef unsigned short GLhalfNV; +typedef signed char int8_t; +typedef short int int16_t; +typedef int int32_t; +__extension__ +typedef long long int int64_t; +typedef unsigned char uint8_t; +typedef unsigned short int uint16_t; +typedef unsigned int uint32_t; +__extension__ +typedef unsigned long long int uint64_t; +typedef signed char int_least8_t; +typedef short int int_least16_t; +typedef int int_least32_t; +__extension__ +typedef long long int int_least64_t; +typedef unsigned char uint_least8_t; +typedef unsigned short int uint_least16_t; +typedef unsigned int uint_least32_t; +__extension__ +typedef unsigned long long int uint_least64_t; +typedef signed char int_fast8_t; +typedef int int_fast16_t; +typedef int int_fast32_t; +__extension__ +typedef long long int int_fast64_t; +typedef unsigned char uint_fast8_t; +typedef unsigned int uint_fast16_t; +typedef unsigned int uint_fast32_t; +__extension__ +typedef unsigned long long int uint_fast64_t; +typedef int intptr_t; +typedef unsigned int uintptr_t; +__extension__ +typedef long long int intmax_t; +__extension__ +typedef unsigned long long int uintmax_t; +typedef long int __gwchar_t; +typedef struct + { + long long int quot; + long long int rem; + } imaxdiv_t; +extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern intmax_t strtoimax (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) __attribute__ ((__nothrow__)); +extern uintmax_t strtoumax (__const char *__restrict __nptr, + char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__)); +extern intmax_t wcstoimax (__const __gwchar_t *__restrict __nptr, + __gwchar_t **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)); +extern uintmax_t wcstoumax (__const __gwchar_t *__restrict __nptr, + __gwchar_t ** __restrict __endptr, int __base) + __attribute__ ((__nothrow__)); +__extension__ +extern long long int __strtoll_internal (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern __inline __attribute__ ((__gnu_inline__)) intmax_t +__attribute__ ((__nothrow__)) strtoimax (__const char *__restrict nptr, char **__restrict endptr, int base) +{ + return __strtoll_internal (nptr, endptr, base, 0); +} +__extension__ +extern unsigned long long int __strtoull_internal (__const char * + __restrict __nptr, + char ** + __restrict __endptr, + int __base, + int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern __inline __attribute__ ((__gnu_inline__)) uintmax_t +__attribute__ ((__nothrow__)) strtoumax (__const char *__restrict nptr, char **__restrict endptr, int base) +{ + return __strtoull_internal (nptr, endptr, base, 0); +} +__extension__ +extern long long int __wcstoll_internal (__const __gwchar_t * + __restrict __nptr, + __gwchar_t **__restrict __endptr, + int __base, int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern __inline __attribute__ ((__gnu_inline__)) intmax_t +__attribute__ ((__nothrow__)) wcstoimax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) +{ + return __wcstoll_internal (nptr, endptr, base, 0); +} +__extension__ +extern unsigned long long int __wcstoull_internal (__const __gwchar_t * + __restrict __nptr, + __gwchar_t ** + __restrict __endptr, + int __base, + int __group) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern __inline __attribute__ ((__gnu_inline__)) uintmax_t +__attribute__ ((__nothrow__)) wcstoumax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) +{ + return __wcstoull_internal (nptr, endptr, base, 0); +} +typedef int64_t GLint64EXT; +typedef uint64_t GLuint64EXT; +typedef int64_t GLint64; +typedef uint64_t GLuint64; +typedef struct __GLsync *GLsync; +struct _cl_context; +struct _cl_event; +typedef void ( *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); +typedef void ( *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam); +typedef GLintptr GLvdpauSurfaceNV; +__attribute__((visibility("default"))) void glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +__attribute__((visibility("default"))) void glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glGetColorTable (GLenum target, GLenum format, GLenum type, GLvoid *table); +__attribute__((visibility("default"))) void glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +__attribute__((visibility("default"))) void glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +__attribute__((visibility("default"))) void glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +__attribute__((visibility("default"))) void glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params); +__attribute__((visibility("default"))) void glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glConvolutionParameteri (GLenum target, GLenum pname, GLint params); +__attribute__((visibility("default"))) void glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, GLvoid *image); +__attribute__((visibility("default"))) void glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetSeparableFilter (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +__attribute__((visibility("default"))) void glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); +__attribute__((visibility("default"))) void glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +__attribute__((visibility("default"))) void glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +__attribute__((visibility("default"))) void glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +__attribute__((visibility("default"))) void glMinmax (GLenum target, GLenum internalformat, GLboolean sink); +__attribute__((visibility("default"))) void glResetHistogram (GLenum target); +__attribute__((visibility("default"))) void glResetMinmax (GLenum target); +typedef void ( * PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +typedef void ( * PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); +typedef void ( * PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +typedef void ( * PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +typedef void ( * PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +typedef void ( * PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); +typedef void ( * PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); +typedef void ( * PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void ( * PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); +typedef void ( * PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +typedef void ( * PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); +typedef void ( * PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void ( * PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void ( * PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +typedef void ( * PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); +typedef void ( * PFNGLRESETHISTOGRAMPROC) (GLenum target); +typedef void ( * PFNGLRESETMINMAXPROC) (GLenum target); +__attribute__((visibility("default"))) void glClientActiveTexture (GLenum texture); +__attribute__((visibility("default"))) void glMultiTexCoord1d (GLenum target, GLdouble s); +__attribute__((visibility("default"))) void glMultiTexCoord1dv (GLenum target, const GLdouble *v); +__attribute__((visibility("default"))) void glMultiTexCoord1f (GLenum target, GLfloat s); +__attribute__((visibility("default"))) void glMultiTexCoord1fv (GLenum target, const GLfloat *v); +__attribute__((visibility("default"))) void glMultiTexCoord1i (GLenum target, GLint s); +__attribute__((visibility("default"))) void glMultiTexCoord1iv (GLenum target, const GLint *v); +__attribute__((visibility("default"))) void glMultiTexCoord1s (GLenum target, GLshort s); +__attribute__((visibility("default"))) void glMultiTexCoord1sv (GLenum target, const GLshort *v); +__attribute__((visibility("default"))) void glMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t); +__attribute__((visibility("default"))) void glMultiTexCoord2dv (GLenum target, const GLdouble *v); +__attribute__((visibility("default"))) void glMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t); +__attribute__((visibility("default"))) void glMultiTexCoord2fv (GLenum target, const GLfloat *v); +__attribute__((visibility("default"))) void glMultiTexCoord2i (GLenum target, GLint s, GLint t); +__attribute__((visibility("default"))) void glMultiTexCoord2iv (GLenum target, const GLint *v); +__attribute__((visibility("default"))) void glMultiTexCoord2s (GLenum target, GLshort s, GLshort t); +__attribute__((visibility("default"))) void glMultiTexCoord2sv (GLenum target, const GLshort *v); +__attribute__((visibility("default"))) void glMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r); +__attribute__((visibility("default"))) void glMultiTexCoord3dv (GLenum target, const GLdouble *v); +__attribute__((visibility("default"))) void glMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r); +__attribute__((visibility("default"))) void glMultiTexCoord3fv (GLenum target, const GLfloat *v); +__attribute__((visibility("default"))) void glMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r); +__attribute__((visibility("default"))) void glMultiTexCoord3iv (GLenum target, const GLint *v); +__attribute__((visibility("default"))) void glMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r); +__attribute__((visibility("default"))) void glMultiTexCoord3sv (GLenum target, const GLshort *v); +__attribute__((visibility("default"))) void glMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +__attribute__((visibility("default"))) void glMultiTexCoord4dv (GLenum target, const GLdouble *v); +__attribute__((visibility("default"))) void glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +__attribute__((visibility("default"))) void glMultiTexCoord4fv (GLenum target, const GLfloat *v); +__attribute__((visibility("default"))) void glMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q); +__attribute__((visibility("default"))) void glMultiTexCoord4iv (GLenum target, const GLint *v); +__attribute__((visibility("default"))) void glMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +__attribute__((visibility("default"))) void glMultiTexCoord4sv (GLenum target, const GLshort *v); +__attribute__((visibility("default"))) void glLoadTransposeMatrixf (const GLfloat *m); +__attribute__((visibility("default"))) void glLoadTransposeMatrixd (const GLdouble *m); +__attribute__((visibility("default"))) void glMultTransposeMatrixf (const GLfloat *m); +__attribute__((visibility("default"))) void glMultTransposeMatrixd (const GLdouble *m); +typedef void ( * PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); +typedef void ( * PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); +typedef void ( * PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble *v); +typedef void ( * PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); +typedef void ( * PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat *v); +typedef void ( * PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); +typedef void ( * PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint *v); +typedef void ( * PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); +typedef void ( * PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort *v); +typedef void ( * PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void ( * PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble *v); +typedef void ( * PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void ( * PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat *v); +typedef void ( * PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); +typedef void ( * PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint *v); +typedef void ( * PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); +typedef void ( * PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort *v); +typedef void ( * PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void ( * PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble *v); +typedef void ( * PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void ( * PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat *v); +typedef void ( * PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void ( * PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint *v); +typedef void ( * PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void ( * PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort *v); +typedef void ( * PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void ( * PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble *v); +typedef void ( * PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void ( * PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat *v); +typedef void ( * PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void ( * PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint *v); +typedef void ( * PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void ( * PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort *v); +typedef void ( * PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat *m); +typedef void ( * PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble *m); +typedef void ( * PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat *m); +typedef void ( * PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble *m); +__attribute__((visibility("default"))) void glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +__attribute__((visibility("default"))) void glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +__attribute__((visibility("default"))) void glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); +__attribute__((visibility("default"))) void glPointParameterf (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glPointParameterfv (GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glPointParameteri (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glPointParameteriv (GLenum pname, const GLint *params); +typedef void ( * PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void ( * PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void ( * PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); +typedef void ( * PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); +typedef void ( * PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params); +typedef void ( * PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param); +typedef void ( * PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glFogCoordf (GLfloat coord); +__attribute__((visibility("default"))) void glFogCoordfv (const GLfloat *coord); +__attribute__((visibility("default"))) void glFogCoordd (GLdouble coord); +__attribute__((visibility("default"))) void glFogCoorddv (const GLdouble *coord); +__attribute__((visibility("default"))) void glFogCoordPointer (GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue); +__attribute__((visibility("default"))) void glSecondaryColor3bv (const GLbyte *v); +__attribute__((visibility("default"))) void glSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue); +__attribute__((visibility("default"))) void glSecondaryColor3dv (const GLdouble *v); +__attribute__((visibility("default"))) void glSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue); +__attribute__((visibility("default"))) void glSecondaryColor3fv (const GLfloat *v); +__attribute__((visibility("default"))) void glSecondaryColor3i (GLint red, GLint green, GLint blue); +__attribute__((visibility("default"))) void glSecondaryColor3iv (const GLint *v); +__attribute__((visibility("default"))) void glSecondaryColor3s (GLshort red, GLshort green, GLshort blue); +__attribute__((visibility("default"))) void glSecondaryColor3sv (const GLshort *v); +__attribute__((visibility("default"))) void glSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue); +__attribute__((visibility("default"))) void glSecondaryColor3ubv (const GLubyte *v); +__attribute__((visibility("default"))) void glSecondaryColor3ui (GLuint red, GLuint green, GLuint blue); +__attribute__((visibility("default"))) void glSecondaryColor3uiv (const GLuint *v); +__attribute__((visibility("default"))) void glSecondaryColor3us (GLushort red, GLushort green, GLushort blue); +__attribute__((visibility("default"))) void glSecondaryColor3usv (const GLushort *v); +__attribute__((visibility("default"))) void glSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glWindowPos2d (GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glWindowPos2dv (const GLdouble *v); +__attribute__((visibility("default"))) void glWindowPos2f (GLfloat x, GLfloat y); +__attribute__((visibility("default"))) void glWindowPos2fv (const GLfloat *v); +__attribute__((visibility("default"))) void glWindowPos2i (GLint x, GLint y); +__attribute__((visibility("default"))) void glWindowPos2iv (const GLint *v); +__attribute__((visibility("default"))) void glWindowPos2s (GLshort x, GLshort y); +__attribute__((visibility("default"))) void glWindowPos2sv (const GLshort *v); +__attribute__((visibility("default"))) void glWindowPos3d (GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glWindowPos3dv (const GLdouble *v); +__attribute__((visibility("default"))) void glWindowPos3f (GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glWindowPos3fv (const GLfloat *v); +__attribute__((visibility("default"))) void glWindowPos3i (GLint x, GLint y, GLint z); +__attribute__((visibility("default"))) void glWindowPos3iv (const GLint *v); +__attribute__((visibility("default"))) void glWindowPos3s (GLshort x, GLshort y, GLshort z); +__attribute__((visibility("default"))) void glWindowPos3sv (const GLshort *v); +typedef void ( * PFNGLFOGCOORDFPROC) (GLfloat coord); +typedef void ( * PFNGLFOGCOORDFVPROC) (const GLfloat *coord); +typedef void ( * PFNGLFOGCOORDDPROC) (GLdouble coord); +typedef void ( * PFNGLFOGCOORDDVPROC) (const GLdouble *coord); +typedef void ( * PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void ( * PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte *v); +typedef void ( * PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void ( * PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble *v); +typedef void ( * PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void ( * PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat *v); +typedef void ( * PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue); +typedef void ( * PFNGLSECONDARYCOLOR3IVPROC) (const GLint *v); +typedef void ( * PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue); +typedef void ( * PFNGLSECONDARYCOLOR3SVPROC) (const GLshort *v); +typedef void ( * PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void ( * PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte *v); +typedef void ( * PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue); +typedef void ( * PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint *v); +typedef void ( * PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue); +typedef void ( * PFNGLSECONDARYCOLOR3USVPROC) (const GLushort *v); +typedef void ( * PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y); +typedef void ( * PFNGLWINDOWPOS2DVPROC) (const GLdouble *v); +typedef void ( * PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y); +typedef void ( * PFNGLWINDOWPOS2FVPROC) (const GLfloat *v); +typedef void ( * PFNGLWINDOWPOS2IPROC) (GLint x, GLint y); +typedef void ( * PFNGLWINDOWPOS2IVPROC) (const GLint *v); +typedef void ( * PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y); +typedef void ( * PFNGLWINDOWPOS2SVPROC) (const GLshort *v); +typedef void ( * PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLWINDOWPOS3DVPROC) (const GLdouble *v); +typedef void ( * PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLWINDOWPOS3FVPROC) (const GLfloat *v); +typedef void ( * PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z); +typedef void ( * PFNGLWINDOWPOS3IVPROC) (const GLint *v); +typedef void ( * PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z); +typedef void ( * PFNGLWINDOWPOS3SVPROC) (const GLshort *v); +__attribute__((visibility("default"))) void glGenQueries (GLsizei n, GLuint *ids); +__attribute__((visibility("default"))) void glDeleteQueries (GLsizei n, const GLuint *ids); +__attribute__((visibility("default"))) GLboolean glIsQuery (GLuint id); +__attribute__((visibility("default"))) void glBeginQuery (GLenum target, GLuint id); +__attribute__((visibility("default"))) void glEndQuery (GLenum target); +__attribute__((visibility("default"))) void glGetQueryiv (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glBindBuffer (GLenum target, GLuint buffer); +__attribute__((visibility("default"))) void glDeleteBuffers (GLsizei n, const GLuint *buffers); +__attribute__((visibility("default"))) void glGenBuffers (GLsizei n, GLuint *buffers); +__attribute__((visibility("default"))) GLboolean glIsBuffer (GLuint buffer); +__attribute__((visibility("default"))) void glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); +__attribute__((visibility("default"))) void glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); +__attribute__((visibility("default"))) void glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data); +__attribute__((visibility("default"))) GLvoid* glMapBuffer (GLenum target, GLenum access); +__attribute__((visibility("default"))) GLboolean glUnmapBuffer (GLenum target); +__attribute__((visibility("default"))) void glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetBufferPointerv (GLenum target, GLenum pname, GLvoid* *params); +typedef void ( * PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); +typedef void ( * PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean ( * PFNGLISQUERYPROC) (GLuint id); +typedef void ( * PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); +typedef void ( * PFNGLENDQUERYPROC) (GLenum target); +typedef void ( * PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void ( * PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); +typedef void ( * PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); +typedef void ( * PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); +typedef void ( * PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); +typedef GLboolean ( * PFNGLISBUFFERPROC) (GLuint buffer); +typedef void ( * PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); +typedef void ( * PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); +typedef void ( * PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data); +typedef GLvoid* ( * PFNGLMAPBUFFERPROC) (GLenum target, GLenum access); +typedef GLboolean ( * PFNGLUNMAPBUFFERPROC) (GLenum target); +typedef void ( * PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params); +__attribute__((visibility("default"))) void glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); +__attribute__((visibility("default"))) void glDrawBuffers (GLsizei n, const GLenum *bufs); +__attribute__((visibility("default"))) void glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +__attribute__((visibility("default"))) void glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); +__attribute__((visibility("default"))) void glStencilMaskSeparate (GLenum face, GLuint mask); +__attribute__((visibility("default"))) void glAttachShader (GLuint program, GLuint shader); +__attribute__((visibility("default"))) void glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); +__attribute__((visibility("default"))) void glCompileShader (GLuint shader); +__attribute__((visibility("default"))) GLuint glCreateProgram (void); +__attribute__((visibility("default"))) GLuint glCreateShader (GLenum type); +__attribute__((visibility("default"))) void glDeleteProgram (GLuint program); +__attribute__((visibility("default"))) void glDeleteShader (GLuint shader); +__attribute__((visibility("default"))) void glDetachShader (GLuint program, GLuint shader); +__attribute__((visibility("default"))) void glDisableVertexAttribArray (GLuint index); +__attribute__((visibility("default"))) void glEnableVertexAttribArray (GLuint index); +__attribute__((visibility("default"))) void glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +__attribute__((visibility("default"))) void glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +__attribute__((visibility("default"))) void glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj); +__attribute__((visibility("default"))) GLint glGetAttribLocation (GLuint program, const GLchar *name); +__attribute__((visibility("default"))) void glGetProgramiv (GLuint program, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +__attribute__((visibility("default"))) void glGetShaderiv (GLuint shader, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +__attribute__((visibility("default"))) void glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +__attribute__((visibility("default"))) GLint glGetUniformLocation (GLuint program, const GLchar *name); +__attribute__((visibility("default"))) void glGetUniformfv (GLuint program, GLint location, GLfloat *params); +__attribute__((visibility("default"))) void glGetUniformiv (GLuint program, GLint location, GLint *params); +__attribute__((visibility("default"))) void glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) void glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid* *pointer); +__attribute__((visibility("default"))) GLboolean glIsProgram (GLuint program); +__attribute__((visibility("default"))) GLboolean glIsShader (GLuint shader); +__attribute__((visibility("default"))) void glLinkProgram (GLuint program); +__attribute__((visibility("default"))) void glShaderSource (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length); +__attribute__((visibility("default"))) void glUseProgram (GLuint program); +__attribute__((visibility("default"))) void glUniform1f (GLint location, GLfloat v0); +__attribute__((visibility("default"))) void glUniform2f (GLint location, GLfloat v0, GLfloat v1); +__attribute__((visibility("default"))) void glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +__attribute__((visibility("default"))) void glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +__attribute__((visibility("default"))) void glUniform1i (GLint location, GLint v0); +__attribute__((visibility("default"))) void glUniform2i (GLint location, GLint v0, GLint v1); +__attribute__((visibility("default"))) void glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); +__attribute__((visibility("default"))) void glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +__attribute__((visibility("default"))) void glUniform1fv (GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glUniform2fv (GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glUniform3fv (GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glUniform4fv (GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glUniform1iv (GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glUniform2iv (GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glUniform3iv (GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glUniform4iv (GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glValidateProgram (GLuint program); +__attribute__((visibility("default"))) void glVertexAttrib1d (GLuint index, GLdouble x); +__attribute__((visibility("default"))) void glVertexAttrib1dv (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib1f (GLuint index, GLfloat x); +__attribute__((visibility("default"))) void glVertexAttrib1fv (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib1s (GLuint index, GLshort x); +__attribute__((visibility("default"))) void glVertexAttrib1sv (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glVertexAttrib2dv (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); +__attribute__((visibility("default"))) void glVertexAttrib2fv (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib2s (GLuint index, GLshort x, GLshort y); +__attribute__((visibility("default"))) void glVertexAttrib2sv (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glVertexAttrib3dv (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glVertexAttrib3fv (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z); +__attribute__((visibility("default"))) void glVertexAttrib3sv (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib4Nbv (GLuint index, const GLbyte *v); +__attribute__((visibility("default"))) void glVertexAttrib4Niv (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttrib4Nsv (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +__attribute__((visibility("default"))) void glVertexAttrib4Nubv (GLuint index, const GLubyte *v); +__attribute__((visibility("default"))) void glVertexAttrib4Nuiv (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttrib4Nusv (GLuint index, const GLushort *v); +__attribute__((visibility("default"))) void glVertexAttrib4bv (GLuint index, const GLbyte *v); +__attribute__((visibility("default"))) void glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glVertexAttrib4dv (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glVertexAttrib4fv (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib4iv (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +__attribute__((visibility("default"))) void glVertexAttrib4sv (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib4ubv (GLuint index, const GLubyte *v); +__attribute__((visibility("default"))) void glVertexAttrib4uiv (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttrib4usv (GLuint index, const GLushort *v); +__attribute__((visibility("default"))) void glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); +typedef void ( * PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); +typedef void ( * PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void ( * PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); +typedef void ( * PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); +typedef void ( * PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); +typedef void ( * PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); +typedef void ( * PFNGLCOMPILESHADERPROC) (GLuint shader); +typedef GLuint ( * PFNGLCREATEPROGRAMPROC) (void); +typedef GLuint ( * PFNGLCREATESHADERPROC) (GLenum type); +typedef void ( * PFNGLDELETEPROGRAMPROC) (GLuint program); +typedef void ( * PFNGLDELETESHADERPROC) (GLuint shader); +typedef void ( * PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); +typedef void ( * PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void ( * PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void ( * PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void ( * PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); +typedef void ( * PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj); +typedef GLint ( * PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void ( * PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); +typedef void ( * PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void ( * PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); +typedef void ( * PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void ( * PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); +typedef GLint ( * PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); +typedef void ( * PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); +typedef void ( * PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); +typedef void ( * PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void ( * PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); +typedef GLboolean ( * PFNGLISPROGRAMPROC) (GLuint program); +typedef GLboolean ( * PFNGLISSHADERPROC) (GLuint shader); +typedef void ( * PFNGLLINKPROGRAMPROC) (GLuint program); +typedef void ( * PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length); +typedef void ( * PFNGLUSEPROGRAMPROC) (GLuint program); +typedef void ( * PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); +typedef void ( * PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void ( * PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void ( * PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void ( * PFNGLUNIFORM1IPROC) (GLint location, GLint v0); +typedef void ( * PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); +typedef void ( * PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void ( * PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void ( * PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLVALIDATEPROGRAMPROC) (GLuint program); +typedef void ( * PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x); +typedef void ( * PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); +typedef void ( * PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x); +typedef void ( * PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void ( * PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void ( * PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y); +typedef void ( * PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void ( * PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v); +typedef void ( * PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void ( * PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v); +typedef void ( * PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v); +typedef void ( * PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v); +typedef void ( * PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void ( * PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v); +typedef void ( * PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v); +typedef void ( * PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +__attribute__((visibility("default"))) void glGetBooleani_v (GLenum target, GLuint index, GLboolean *data); +__attribute__((visibility("default"))) void glGetIntegeri_v (GLenum target, GLuint index, GLint *data); +__attribute__((visibility("default"))) void glEnablei (GLenum target, GLuint index); +__attribute__((visibility("default"))) void glDisablei (GLenum target, GLuint index); +__attribute__((visibility("default"))) GLboolean glIsEnabledi (GLenum target, GLuint index); +__attribute__((visibility("default"))) void glBeginTransformFeedback (GLenum primitiveMode); +__attribute__((visibility("default"))) void glEndTransformFeedback (void); +__attribute__((visibility("default"))) void glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +__attribute__((visibility("default"))) void glBindBufferBase (GLenum target, GLuint index, GLuint buffer); +__attribute__((visibility("default"))) void glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); +__attribute__((visibility("default"))) void glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +__attribute__((visibility("default"))) void glClampColor (GLenum target, GLenum clamp); +__attribute__((visibility("default"))) void glBeginConditionalRender (GLuint id, GLenum mode); +__attribute__((visibility("default"))) void glEndConditionalRender (void); +__attribute__((visibility("default"))) void glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glVertexAttribI1i (GLuint index, GLint x); +__attribute__((visibility("default"))) void glVertexAttribI2i (GLuint index, GLint x, GLint y); +__attribute__((visibility("default"))) void glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z); +__attribute__((visibility("default"))) void glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); +__attribute__((visibility("default"))) void glVertexAttribI1ui (GLuint index, GLuint x); +__attribute__((visibility("default"))) void glVertexAttribI2ui (GLuint index, GLuint x, GLuint y); +__attribute__((visibility("default"))) void glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z); +__attribute__((visibility("default"))) void glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +__attribute__((visibility("default"))) void glVertexAttribI1iv (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttribI2iv (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttribI3iv (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttribI4iv (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttribI1uiv (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttribI2uiv (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttribI3uiv (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttribI4uiv (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttribI4bv (GLuint index, const GLbyte *v); +__attribute__((visibility("default"))) void glVertexAttribI4sv (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttribI4ubv (GLuint index, const GLubyte *v); +__attribute__((visibility("default"))) void glVertexAttribI4usv (GLuint index, const GLushort *v); +__attribute__((visibility("default"))) void glGetUniformuiv (GLuint program, GLint location, GLuint *params); +__attribute__((visibility("default"))) void glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name); +__attribute__((visibility("default"))) GLint glGetFragDataLocation (GLuint program, const GLchar *name); +__attribute__((visibility("default"))) void glUniform1ui (GLint location, GLuint v0); +__attribute__((visibility("default"))) void glUniform2ui (GLint location, GLuint v0, GLuint v1); +__attribute__((visibility("default"))) void glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); +__attribute__((visibility("default"))) void glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +__attribute__((visibility("default"))) void glUniform1uiv (GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glUniform2uiv (GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glUniform3uiv (GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glUniform4uiv (GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glTexParameterIiv (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params); +__attribute__((visibility("default"))) void glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value); +__attribute__((visibility("default"))) void glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value); +__attribute__((visibility("default"))) void glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value); +__attribute__((visibility("default"))) void glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +__attribute__((visibility("default"))) const GLubyte * glGetStringi (GLenum name, GLuint index); +typedef void ( * PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +typedef void ( * PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data); +typedef void ( * PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); +typedef void ( * PFNGLENABLEIPROC) (GLenum target, GLuint index); +typedef void ( * PFNGLDISABLEIPROC) (GLenum target, GLuint index); +typedef GLboolean ( * PFNGLISENABLEDIPROC) (GLenum target, GLuint index); +typedef void ( * PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode); +typedef void ( * PFNGLENDTRANSFORMFEEDBACKPROC) (void); +typedef void ( * PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void ( * PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void ( * PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); +typedef void ( * PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +typedef void ( * PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp); +typedef void ( * PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode); +typedef void ( * PFNGLENDCONDITIONALRENDERPROC) (void); +typedef void ( * PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params); +typedef void ( * PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x); +typedef void ( * PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y); +typedef void ( * PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z); +typedef void ( * PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void ( * PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x); +typedef void ( * PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y); +typedef void ( * PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z); +typedef void ( * PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void ( * PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v); +typedef void ( * PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v); +typedef void ( * PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v); +typedef void ( * PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params); +typedef void ( * PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name); +typedef GLint ( * PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name); +typedef void ( * PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0); +typedef void ( * PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1); +typedef void ( * PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void ( * PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void ( * PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params); +typedef void ( * PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params); +typedef void ( * PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value); +typedef void ( * PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value); +typedef void ( * PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value); +typedef void ( * PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +typedef const GLubyte * ( * PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); +__attribute__((visibility("default"))) void glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +__attribute__((visibility("default"))) void glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +__attribute__((visibility("default"))) void glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer); +__attribute__((visibility("default"))) void glPrimitiveRestartIndex (GLuint index); +typedef void ( * PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +typedef void ( * PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +typedef void ( * PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer); +typedef void ( * PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index); +__attribute__((visibility("default"))) void glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); +__attribute__((visibility("default"))) void glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); +__attribute__((visibility("default"))) void glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void ( * PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); +typedef void ( * PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params); +typedef void ( * PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glVertexAttribDivisor (GLuint index, GLuint divisor); +typedef void ( * PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); +__attribute__((visibility("default"))) void glMinSampleShading (GLclampf value); +__attribute__((visibility("default"))) void glBlendEquationi (GLuint buf, GLenum mode); +__attribute__((visibility("default"))) void glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +__attribute__((visibility("default"))) void glBlendFunci (GLuint buf, GLenum src, GLenum dst); +__attribute__((visibility("default"))) void glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +typedef void ( * PFNGLMINSAMPLESHADINGPROC) (GLclampf value); +typedef void ( * PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode); +typedef void ( * PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void ( * PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void ( * PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +__attribute__((visibility("default"))) void glLoadTransposeMatrixfARB (const GLfloat *m); +__attribute__((visibility("default"))) void glLoadTransposeMatrixdARB (const GLdouble *m); +__attribute__((visibility("default"))) void glMultTransposeMatrixfARB (const GLfloat *m); +__attribute__((visibility("default"))) void glMultTransposeMatrixdARB (const GLdouble *m); +typedef void ( * PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); +typedef void ( * PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); +typedef void ( * PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat *m); +typedef void ( * PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble *m); +__attribute__((visibility("default"))) void glSampleCoverageARB (GLclampf value, GLboolean invert); +typedef void ( * PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert); +__attribute__((visibility("default"))) void glCompressedTexImage3DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); +__attribute__((visibility("default"))) void glCompressedTexImage2DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +__attribute__((visibility("default"))) void glCompressedTexImage1DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); +__attribute__((visibility("default"))) void glCompressedTexSubImage3DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); +__attribute__((visibility("default"))) void glCompressedTexSubImage2DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +__attribute__((visibility("default"))) void glCompressedTexSubImage1DARB (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); +__attribute__((visibility("default"))) void glGetCompressedTexImageARB (GLenum target, GLint level, GLvoid *img); +typedef void ( * PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); +typedef void ( * PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid *img); +__attribute__((visibility("default"))) void glPointParameterfARB (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glPointParameterfvARB (GLenum pname, const GLfloat *params); +typedef void ( * PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param); +typedef void ( * PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glWeightbvARB (GLint size, const GLbyte *weights); +__attribute__((visibility("default"))) void glWeightsvARB (GLint size, const GLshort *weights); +__attribute__((visibility("default"))) void glWeightivARB (GLint size, const GLint *weights); +__attribute__((visibility("default"))) void glWeightfvARB (GLint size, const GLfloat *weights); +__attribute__((visibility("default"))) void glWeightdvARB (GLint size, const GLdouble *weights); +__attribute__((visibility("default"))) void glWeightubvARB (GLint size, const GLubyte *weights); +__attribute__((visibility("default"))) void glWeightusvARB (GLint size, const GLushort *weights); +__attribute__((visibility("default"))) void glWeightuivARB (GLint size, const GLuint *weights); +__attribute__((visibility("default"))) void glWeightPointerARB (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glVertexBlendARB (GLint count); +typedef void ( * PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte *weights); +typedef void ( * PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort *weights); +typedef void ( * PFNGLWEIGHTIVARBPROC) (GLint size, const GLint *weights); +typedef void ( * PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat *weights); +typedef void ( * PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble *weights); +typedef void ( * PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte *weights); +typedef void ( * PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort *weights); +typedef void ( * PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint *weights); +typedef void ( * PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLVERTEXBLENDARBPROC) (GLint count); +__attribute__((visibility("default"))) void glCurrentPaletteMatrixARB (GLint index); +__attribute__((visibility("default"))) void glMatrixIndexubvARB (GLint size, const GLubyte *indices); +__attribute__((visibility("default"))) void glMatrixIndexusvARB (GLint size, const GLushort *indices); +__attribute__((visibility("default"))) void glMatrixIndexuivARB (GLint size, const GLuint *indices); +__attribute__((visibility("default"))) void glMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index); +typedef void ( * PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte *indices); +typedef void ( * PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort *indices); +typedef void ( * PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint *indices); +typedef void ( * PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glWindowPos2dARB (GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glWindowPos2dvARB (const GLdouble *v); +__attribute__((visibility("default"))) void glWindowPos2fARB (GLfloat x, GLfloat y); +__attribute__((visibility("default"))) void glWindowPos2fvARB (const GLfloat *v); +__attribute__((visibility("default"))) void glWindowPos2iARB (GLint x, GLint y); +__attribute__((visibility("default"))) void glWindowPos2ivARB (const GLint *v); +__attribute__((visibility("default"))) void glWindowPos2sARB (GLshort x, GLshort y); +__attribute__((visibility("default"))) void glWindowPos2svARB (const GLshort *v); +__attribute__((visibility("default"))) void glWindowPos3dARB (GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glWindowPos3dvARB (const GLdouble *v); +__attribute__((visibility("default"))) void glWindowPos3fARB (GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glWindowPos3fvARB (const GLfloat *v); +__attribute__((visibility("default"))) void glWindowPos3iARB (GLint x, GLint y, GLint z); +__attribute__((visibility("default"))) void glWindowPos3ivARB (const GLint *v); +__attribute__((visibility("default"))) void glWindowPos3sARB (GLshort x, GLshort y, GLshort z); +__attribute__((visibility("default"))) void glWindowPos3svARB (const GLshort *v); +typedef void ( * PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y); +typedef void ( * PFNGLWINDOWPOS2DVARBPROC) (const GLdouble *v); +typedef void ( * PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y); +typedef void ( * PFNGLWINDOWPOS2FVARBPROC) (const GLfloat *v); +typedef void ( * PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y); +typedef void ( * PFNGLWINDOWPOS2IVARBPROC) (const GLint *v); +typedef void ( * PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y); +typedef void ( * PFNGLWINDOWPOS2SVARBPROC) (const GLshort *v); +typedef void ( * PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLWINDOWPOS3DVARBPROC) (const GLdouble *v); +typedef void ( * PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLWINDOWPOS3FVARBPROC) (const GLfloat *v); +typedef void ( * PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z); +typedef void ( * PFNGLWINDOWPOS3IVARBPROC) (const GLint *v); +typedef void ( * PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z); +typedef void ( * PFNGLWINDOWPOS3SVARBPROC) (const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib1dARB (GLuint index, GLdouble x); +__attribute__((visibility("default"))) void glVertexAttrib1dvARB (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib1fARB (GLuint index, GLfloat x); +__attribute__((visibility("default"))) void glVertexAttrib1fvARB (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib1sARB (GLuint index, GLshort x); +__attribute__((visibility("default"))) void glVertexAttrib1svARB (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib2dARB (GLuint index, GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glVertexAttrib2dvARB (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib2fARB (GLuint index, GLfloat x, GLfloat y); +__attribute__((visibility("default"))) void glVertexAttrib2fvARB (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib2sARB (GLuint index, GLshort x, GLshort y); +__attribute__((visibility("default"))) void glVertexAttrib2svARB (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib3dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glVertexAttrib3dvARB (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib3fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glVertexAttrib3fvARB (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib3sARB (GLuint index, GLshort x, GLshort y, GLshort z); +__attribute__((visibility("default"))) void glVertexAttrib3svARB (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib4NbvARB (GLuint index, const GLbyte *v); +__attribute__((visibility("default"))) void glVertexAttrib4NivARB (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttrib4NsvARB (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib4NubARB (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +__attribute__((visibility("default"))) void glVertexAttrib4NubvARB (GLuint index, const GLubyte *v); +__attribute__((visibility("default"))) void glVertexAttrib4NuivARB (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttrib4NusvARB (GLuint index, const GLushort *v); +__attribute__((visibility("default"))) void glVertexAttrib4bvARB (GLuint index, const GLbyte *v); +__attribute__((visibility("default"))) void glVertexAttrib4dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glVertexAttrib4dvARB (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib4fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glVertexAttrib4fvARB (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib4ivARB (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttrib4sARB (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +__attribute__((visibility("default"))) void glVertexAttrib4svARB (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib4ubvARB (GLuint index, const GLubyte *v); +__attribute__((visibility("default"))) void glVertexAttrib4uivARB (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttrib4usvARB (GLuint index, const GLushort *v); +__attribute__((visibility("default"))) void glVertexAttribPointerARB (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glEnableVertexAttribArrayARB (GLuint index); +__attribute__((visibility("default"))) void glDisableVertexAttribArrayARB (GLuint index); +__attribute__((visibility("default"))) void glProgramStringARB (GLenum target, GLenum format, GLsizei len, const GLvoid *string); +__attribute__((visibility("default"))) void glBindProgramARB (GLenum target, GLuint program); +__attribute__((visibility("default"))) void glDeleteProgramsARB (GLsizei n, const GLuint *programs); +__attribute__((visibility("default"))) void glGenProgramsARB (GLsizei n, GLuint *programs); +__attribute__((visibility("default"))) void glProgramEnvParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glProgramEnvParameter4dvARB (GLenum target, GLuint index, const GLdouble *params); +__attribute__((visibility("default"))) void glProgramEnvParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glProgramEnvParameter4fvARB (GLenum target, GLuint index, const GLfloat *params); +__attribute__((visibility("default"))) void glProgramLocalParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glProgramLocalParameter4dvARB (GLenum target, GLuint index, const GLdouble *params); +__attribute__((visibility("default"))) void glProgramLocalParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glProgramLocalParameter4fvARB (GLenum target, GLuint index, const GLfloat *params); +__attribute__((visibility("default"))) void glGetProgramEnvParameterdvARB (GLenum target, GLuint index, GLdouble *params); +__attribute__((visibility("default"))) void glGetProgramEnvParameterfvARB (GLenum target, GLuint index, GLfloat *params); +__attribute__((visibility("default"))) void glGetProgramLocalParameterdvARB (GLenum target, GLuint index, GLdouble *params); +__attribute__((visibility("default"))) void glGetProgramLocalParameterfvARB (GLenum target, GLuint index, GLfloat *params); +__attribute__((visibility("default"))) void glGetProgramivARB (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetProgramStringARB (GLenum target, GLenum pname, GLvoid *string); +__attribute__((visibility("default"))) void glGetVertexAttribdvARB (GLuint index, GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) void glGetVertexAttribfvARB (GLuint index, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetVertexAttribivARB (GLuint index, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVertexAttribPointervARB (GLuint index, GLenum pname, GLvoid* *pointer); +__attribute__((visibility("default"))) GLboolean glIsProgramARB (GLuint program); +typedef void ( * PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x); +typedef void ( * PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x); +typedef void ( * PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x); +typedef void ( * PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void ( * PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void ( * PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y); +typedef void ( * PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void ( * PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v); +typedef void ( * PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void ( * PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v); +typedef void ( * PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v); +typedef void ( * PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v); +typedef void ( * PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void ( * PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v); +typedef void ( * PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v); +typedef void ( * PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); +typedef void ( * PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); +typedef void ( * PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string); +typedef void ( * PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); +typedef void ( * PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs); +typedef void ( * PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs); +typedef void ( * PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); +typedef void ( * PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); +typedef void ( * PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params); +typedef void ( * PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params); +typedef void ( * PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); +typedef void ( * PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); +typedef void ( * PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params); +typedef void ( * PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params); +typedef void ( * PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string); +typedef void ( * PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void ( * PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer); +typedef GLboolean ( * PFNGLISPROGRAMARBPROC) (GLuint program); +__attribute__((visibility("default"))) void glBindBufferARB (GLenum target, GLuint buffer); +__attribute__((visibility("default"))) void glDeleteBuffersARB (GLsizei n, const GLuint *buffers); +__attribute__((visibility("default"))) void glGenBuffersARB (GLsizei n, GLuint *buffers); +__attribute__((visibility("default"))) GLboolean glIsBufferARB (GLuint buffer); +__attribute__((visibility("default"))) void glBufferDataARB (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); +__attribute__((visibility("default"))) void glBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); +__attribute__((visibility("default"))) void glGetBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); +__attribute__((visibility("default"))) GLvoid* glMapBufferARB (GLenum target, GLenum access); +__attribute__((visibility("default"))) GLboolean glUnmapBufferARB (GLenum target); +__attribute__((visibility("default"))) void glGetBufferParameterivARB (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetBufferPointervARB (GLenum target, GLenum pname, GLvoid* *params); +typedef void ( * PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer); +typedef void ( * PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers); +typedef void ( * PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers); +typedef GLboolean ( * PFNGLISBUFFERARBPROC) (GLuint buffer); +typedef void ( * PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); +typedef void ( * PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); +typedef void ( * PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); +typedef GLvoid* ( * PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access); +typedef GLboolean ( * PFNGLUNMAPBUFFERARBPROC) (GLenum target); +typedef void ( * PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params); +__attribute__((visibility("default"))) void glGenQueriesARB (GLsizei n, GLuint *ids); +__attribute__((visibility("default"))) void glDeleteQueriesARB (GLsizei n, const GLuint *ids); +__attribute__((visibility("default"))) GLboolean glIsQueryARB (GLuint id); +__attribute__((visibility("default"))) void glBeginQueryARB (GLenum target, GLuint id); +__attribute__((visibility("default"))) void glEndQueryARB (GLenum target); +__attribute__((visibility("default"))) void glGetQueryivARB (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetQueryObjectivARB (GLuint id, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetQueryObjectuivARB (GLuint id, GLenum pname, GLuint *params); +typedef void ( * PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids); +typedef void ( * PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean ( * PFNGLISQUERYARBPROC) (GLuint id); +typedef void ( * PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id); +typedef void ( * PFNGLENDQUERYARBPROC) (GLenum target); +typedef void ( * PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params); +typedef void ( * PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glDeleteObjectARB (GLhandleARB obj); +__attribute__((visibility("default"))) GLhandleARB glGetHandleARB (GLenum pname); +__attribute__((visibility("default"))) void glDetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj); +__attribute__((visibility("default"))) GLhandleARB glCreateShaderObjectARB (GLenum shaderType); +__attribute__((visibility("default"))) void glShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length); +__attribute__((visibility("default"))) void glCompileShaderARB (GLhandleARB shaderObj); +__attribute__((visibility("default"))) GLhandleARB glCreateProgramObjectARB (void); +__attribute__((visibility("default"))) void glAttachObjectARB (GLhandleARB containerObj, GLhandleARB obj); +__attribute__((visibility("default"))) void glLinkProgramARB (GLhandleARB programObj); +__attribute__((visibility("default"))) void glUseProgramObjectARB (GLhandleARB programObj); +__attribute__((visibility("default"))) void glValidateProgramARB (GLhandleARB programObj); +__attribute__((visibility("default"))) void glUniform1fARB (GLint location, GLfloat v0); +__attribute__((visibility("default"))) void glUniform2fARB (GLint location, GLfloat v0, GLfloat v1); +__attribute__((visibility("default"))) void glUniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +__attribute__((visibility("default"))) void glUniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +__attribute__((visibility("default"))) void glUniform1iARB (GLint location, GLint v0); +__attribute__((visibility("default"))) void glUniform2iARB (GLint location, GLint v0, GLint v1); +__attribute__((visibility("default"))) void glUniform3iARB (GLint location, GLint v0, GLint v1, GLint v2); +__attribute__((visibility("default"))) void glUniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +__attribute__((visibility("default"))) void glUniform1fvARB (GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glUniform2fvARB (GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glUniform3fvARB (GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glUniform4fvARB (GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glUniform1ivARB (GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glUniform2ivARB (GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glUniform3ivARB (GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glUniform4ivARB (GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glUniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glUniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glGetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); +__attribute__((visibility("default"))) void glGetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); +__attribute__((visibility("default"))) GLint glGetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name); +__attribute__((visibility("default"))) void glGetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +__attribute__((visibility("default"))) void glGetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params); +__attribute__((visibility("default"))) void glGetUniformivARB (GLhandleARB programObj, GLint location, GLint *params); +__attribute__((visibility("default"))) void glGetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); +typedef void ( * PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj); +typedef GLhandleARB ( * PFNGLGETHANDLEARBPROC) (GLenum pname); +typedef void ( * PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj); +typedef GLhandleARB ( * PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType); +typedef void ( * PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length); +typedef void ( * PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj); +typedef GLhandleARB ( * PFNGLCREATEPROGRAMOBJECTARBPROC) (void); +typedef void ( * PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj); +typedef void ( * PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj); +typedef void ( * PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj); +typedef void ( * PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj); +typedef void ( * PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0); +typedef void ( * PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void ( * PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void ( * PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void ( * PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0); +typedef void ( * PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1); +typedef void ( * PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void ( * PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void ( * PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params); +typedef void ( * PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); +typedef void ( * PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); +typedef GLint ( * PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); +typedef void ( * PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +typedef void ( * PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params); +typedef void ( * PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params); +typedef void ( * PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); +__attribute__((visibility("default"))) void glBindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name); +__attribute__((visibility("default"))) void glGetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +__attribute__((visibility("default"))) GLint glGetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name); +typedef void ( * PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name); +typedef void ( * PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); +typedef GLint ( * PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name); +__attribute__((visibility("default"))) void glDrawBuffersARB (GLsizei n, const GLenum *bufs); +typedef void ( * PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs); +__attribute__((visibility("default"))) void glClampColorARB (GLenum target, GLenum clamp); +typedef void ( * PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp); +__attribute__((visibility("default"))) void glDrawArraysInstancedARB (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +__attribute__((visibility("default"))) void glDrawElementsInstancedARB (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +typedef void ( * PFNGLDRAWARRAYSINSTANCEDARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +typedef void ( * PFNGLDRAWELEMENTSINSTANCEDARBPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +__attribute__((visibility("default"))) GLboolean glIsRenderbuffer (GLuint renderbuffer); +__attribute__((visibility("default"))) void glBindRenderbuffer (GLenum target, GLuint renderbuffer); +__attribute__((visibility("default"))) void glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); +__attribute__((visibility("default"))) void glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); +__attribute__((visibility("default"))) void glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) GLboolean glIsFramebuffer (GLuint framebuffer); +__attribute__((visibility("default"))) void glBindFramebuffer (GLenum target, GLuint framebuffer); +__attribute__((visibility("default"))) void glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); +__attribute__((visibility("default"))) void glGenFramebuffers (GLsizei n, GLuint *framebuffers); +__attribute__((visibility("default"))) GLenum glCheckFramebufferStatus (GLenum target); +__attribute__((visibility("default"))) void glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +__attribute__((visibility("default"))) void glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +__attribute__((visibility("default"))) void glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGenerateMipmap (GLenum target); +__attribute__((visibility("default"))) void glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +__attribute__((visibility("default"))) void glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef GLboolean ( * PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); +typedef void ( * PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); +typedef void ( * PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); +typedef void ( * PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); +typedef void ( * PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void ( * PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); +typedef GLboolean ( * PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); +typedef void ( * PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); +typedef void ( * PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); +typedef void ( * PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); +typedef GLenum ( * PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); +typedef void ( * PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void ( * PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void ( * PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void ( * PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void ( * PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); +typedef void ( * PFNGLGENERATEMIPMAPPROC) (GLenum target); +typedef void ( * PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef void ( * PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void ( * PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +__attribute__((visibility("default"))) void glProgramParameteriARB (GLuint program, GLenum pname, GLint value); +__attribute__((visibility("default"))) void glFramebufferTextureARB (GLenum target, GLenum attachment, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glFramebufferTextureLayerARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +__attribute__((visibility("default"))) void glFramebufferTextureFaceARB (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +typedef void ( * PFNGLPROGRAMPARAMETERIARBPROC) (GLuint program, GLenum pname, GLint value); +typedef void ( * PFNGLFRAMEBUFFERTEXTUREARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void ( * PFNGLFRAMEBUFFERTEXTURELAYERARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void ( * PFNGLFRAMEBUFFERTEXTUREFACEARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +__attribute__((visibility("default"))) void glVertexAttribDivisorARB (GLuint index, GLuint divisor); +typedef void ( * PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuint divisor); +__attribute__((visibility("default"))) GLvoid* glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +__attribute__((visibility("default"))) void glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); +typedef GLvoid* ( * PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void ( * PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length); +__attribute__((visibility("default"))) void glTexBufferARB (GLenum target, GLenum internalformat, GLuint buffer); +typedef void ( * PFNGLTEXBUFFERARBPROC) (GLenum target, GLenum internalformat, GLuint buffer); +__attribute__((visibility("default"))) void glBindVertexArray (GLuint array); +__attribute__((visibility("default"))) void glDeleteVertexArrays (GLsizei n, const GLuint *arrays); +__attribute__((visibility("default"))) void glGenVertexArrays (GLsizei n, GLuint *arrays); +__attribute__((visibility("default"))) GLboolean glIsVertexArray (GLuint array); +typedef void ( * PFNGLBINDVERTEXARRAYPROC) (GLuint array); +typedef void ( * PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); +typedef void ( * PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean ( * PFNGLISVERTEXARRAYPROC) (GLuint array); +__attribute__((visibility("default"))) void glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar* *uniformNames, GLuint *uniformIndices); +__attribute__((visibility("default"))) void glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); +__attribute__((visibility("default"))) GLuint glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName); +__attribute__((visibility("default"))) void glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +__attribute__((visibility("default"))) void glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +typedef void ( * PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar* *uniformNames, GLuint *uniformIndices); +typedef void ( * PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); +typedef void ( * PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName); +typedef GLuint ( * PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName); +typedef void ( * PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); +typedef void ( * PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); +typedef void ( * PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +__attribute__((visibility("default"))) void glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void ( * PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +__attribute__((visibility("default"))) void glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); +__attribute__((visibility("default"))) void glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); +__attribute__((visibility("default"))) void glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex); +__attribute__((visibility("default"))) void glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount, const GLint *basevertex); +typedef void ( * PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); +typedef void ( * PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex); +typedef void ( * PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex); +typedef void ( * PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount, const GLint *basevertex); +__attribute__((visibility("default"))) void glProvokingVertex (GLenum mode); +typedef void ( * PFNGLPROVOKINGVERTEXPROC) (GLenum mode); +__attribute__((visibility("default"))) GLsync glFenceSync (GLenum condition, GLbitfield flags); +__attribute__((visibility("default"))) GLboolean glIsSync (GLsync sync); +__attribute__((visibility("default"))) void glDeleteSync (GLsync sync); +__attribute__((visibility("default"))) GLenum glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +__attribute__((visibility("default"))) void glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +__attribute__((visibility("default"))) void glGetInteger64v (GLenum pname, GLint64 *params); +__attribute__((visibility("default"))) void glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +typedef GLsync ( * PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags); +typedef GLboolean ( * PFNGLISSYNCPROC) (GLsync sync); +typedef void ( * PFNGLDELETESYNCPROC) (GLsync sync); +typedef GLenum ( * PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void ( * PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void ( * PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *params); +typedef void ( * PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +__attribute__((visibility("default"))) void glTexImage2DMultisample (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +__attribute__((visibility("default"))) void glTexImage3DMultisample (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +__attribute__((visibility("default"))) void glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val); +__attribute__((visibility("default"))) void glSampleMaski (GLuint index, GLbitfield mask); +typedef void ( * PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void ( * PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void ( * PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val); +typedef void ( * PFNGLSAMPLEMASKIPROC) (GLuint index, GLbitfield mask); +__attribute__((visibility("default"))) void glBlendEquationiARB (GLuint buf, GLenum mode); +__attribute__((visibility("default"))) void glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +__attribute__((visibility("default"))) void glBlendFunciARB (GLuint buf, GLenum src, GLenum dst); +__attribute__((visibility("default"))) void glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +typedef void ( * PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode); +typedef void ( * PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void ( * PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void ( * PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +__attribute__((visibility("default"))) void glMinSampleShadingARB (GLclampf value); +typedef void ( * PFNGLMINSAMPLESHADINGARBPROC) (GLclampf value); +__attribute__((visibility("default"))) void glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); +__attribute__((visibility("default"))) void glDeleteNamedStringARB (GLint namelen, const GLchar *name); +__attribute__((visibility("default"))) void glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar* *path, const GLint *length); +__attribute__((visibility("default"))) GLboolean glIsNamedStringARB (GLint namelen, const GLchar *name); +__attribute__((visibility("default"))) void glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); +__attribute__((visibility("default"))) void glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params); +typedef void ( * PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string); +typedef void ( * PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); +typedef void ( * PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar* *path, const GLint *length); +typedef GLboolean ( * PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name); +typedef void ( * PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string); +typedef void ( * PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); +__attribute__((visibility("default"))) GLint glGetFragDataIndex (GLuint program, const GLchar *name); +typedef void ( * PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name); +typedef GLint ( * PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name); +__attribute__((visibility("default"))) void glGenSamplers (GLsizei count, GLuint *samplers); +__attribute__((visibility("default"))) void glDeleteSamplers (GLsizei count, const GLuint *samplers); +__attribute__((visibility("default"))) GLboolean glIsSampler (GLuint sampler); +__attribute__((visibility("default"))) void glBindSampler (GLuint unit, GLuint sampler); +__attribute__((visibility("default"))) void glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); +__attribute__((visibility("default"))) void glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param); +__attribute__((visibility("default"))) void glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param); +__attribute__((visibility("default"))) void glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param); +__attribute__((visibility("default"))) void glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params); +typedef void ( * PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers); +typedef void ( * PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers); +typedef GLboolean ( * PFNGLISSAMPLERPROC) (GLuint sampler); +typedef void ( * PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); +typedef void ( * PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param); +typedef void ( * PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param); +typedef void ( * PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param); +typedef void ( * PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param); +typedef void ( * PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param); +typedef void ( * PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param); +typedef void ( * PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params); +typedef void ( * PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params); +typedef void ( * PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glQueryCounter (GLuint id, GLenum target); +__attribute__((visibility("default"))) void glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params); +__attribute__((visibility("default"))) void glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params); +typedef void ( * PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target); +typedef void ( * PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params); +typedef void ( * PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params); +__attribute__((visibility("default"))) void glVertexP2ui (GLenum type, GLuint value); +__attribute__((visibility("default"))) void glVertexP2uiv (GLenum type, const GLuint *value); +__attribute__((visibility("default"))) void glVertexP3ui (GLenum type, GLuint value); +__attribute__((visibility("default"))) void glVertexP3uiv (GLenum type, const GLuint *value); +__attribute__((visibility("default"))) void glVertexP4ui (GLenum type, GLuint value); +__attribute__((visibility("default"))) void glVertexP4uiv (GLenum type, const GLuint *value); +__attribute__((visibility("default"))) void glTexCoordP1ui (GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glTexCoordP1uiv (GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glTexCoordP2ui (GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glTexCoordP2uiv (GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glTexCoordP3ui (GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glTexCoordP3uiv (GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glTexCoordP4ui (GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glTexCoordP4uiv (GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glMultiTexCoordP1ui (GLenum texture, GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glMultiTexCoordP1uiv (GLenum texture, GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glMultiTexCoordP2ui (GLenum texture, GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glMultiTexCoordP2uiv (GLenum texture, GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glMultiTexCoordP3ui (GLenum texture, GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glMultiTexCoordP3uiv (GLenum texture, GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glMultiTexCoordP4ui (GLenum texture, GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glMultiTexCoordP4uiv (GLenum texture, GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glNormalP3ui (GLenum type, GLuint coords); +__attribute__((visibility("default"))) void glNormalP3uiv (GLenum type, const GLuint *coords); +__attribute__((visibility("default"))) void glColorP3ui (GLenum type, GLuint color); +__attribute__((visibility("default"))) void glColorP3uiv (GLenum type, const GLuint *color); +__attribute__((visibility("default"))) void glColorP4ui (GLenum type, GLuint color); +__attribute__((visibility("default"))) void glColorP4uiv (GLenum type, const GLuint *color); +__attribute__((visibility("default"))) void glSecondaryColorP3ui (GLenum type, GLuint color); +__attribute__((visibility("default"))) void glSecondaryColorP3uiv (GLenum type, const GLuint *color); +__attribute__((visibility("default"))) void glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +__attribute__((visibility("default"))) void glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +__attribute__((visibility("default"))) void glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +__attribute__((visibility("default"))) void glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +__attribute__((visibility("default"))) void glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +__attribute__((visibility("default"))) void glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +__attribute__((visibility("default"))) void glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value); +__attribute__((visibility("default"))) void glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void ( * PFNGLVERTEXP2UIPROC) (GLenum type, GLuint value); +typedef void ( * PFNGLVERTEXP2UIVPROC) (GLenum type, const GLuint *value); +typedef void ( * PFNGLVERTEXP3UIPROC) (GLenum type, GLuint value); +typedef void ( * PFNGLVERTEXP3UIVPROC) (GLenum type, const GLuint *value); +typedef void ( * PFNGLVERTEXP4UIPROC) (GLenum type, GLuint value); +typedef void ( * PFNGLVERTEXP4UIVPROC) (GLenum type, const GLuint *value); +typedef void ( * PFNGLTEXCOORDP1UIPROC) (GLenum type, GLuint coords); +typedef void ( * PFNGLTEXCOORDP1UIVPROC) (GLenum type, const GLuint *coords); +typedef void ( * PFNGLTEXCOORDP2UIPROC) (GLenum type, GLuint coords); +typedef void ( * PFNGLTEXCOORDP2UIVPROC) (GLenum type, const GLuint *coords); +typedef void ( * PFNGLTEXCOORDP3UIPROC) (GLenum type, GLuint coords); +typedef void ( * PFNGLTEXCOORDP3UIVPROC) (GLenum type, const GLuint *coords); +typedef void ( * PFNGLTEXCOORDP4UIPROC) (GLenum type, GLuint coords); +typedef void ( * PFNGLTEXCOORDP4UIVPROC) (GLenum type, const GLuint *coords); +typedef void ( * PFNGLMULTITEXCOORDP1UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void ( * PFNGLMULTITEXCOORDP1UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void ( * PFNGLMULTITEXCOORDP2UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void ( * PFNGLMULTITEXCOORDP2UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void ( * PFNGLMULTITEXCOORDP3UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void ( * PFNGLMULTITEXCOORDP3UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void ( * PFNGLMULTITEXCOORDP4UIPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void ( * PFNGLMULTITEXCOORDP4UIVPROC) (GLenum texture, GLenum type, const GLuint *coords); +typedef void ( * PFNGLNORMALP3UIPROC) (GLenum type, GLuint coords); +typedef void ( * PFNGLNORMALP3UIVPROC) (GLenum type, const GLuint *coords); +typedef void ( * PFNGLCOLORP3UIPROC) (GLenum type, GLuint color); +typedef void ( * PFNGLCOLORP3UIVPROC) (GLenum type, const GLuint *color); +typedef void ( * PFNGLCOLORP4UIPROC) (GLenum type, GLuint color); +typedef void ( * PFNGLCOLORP4UIVPROC) (GLenum type, const GLuint *color); +typedef void ( * PFNGLSECONDARYCOLORP3UIPROC) (GLenum type, GLuint color); +typedef void ( * PFNGLSECONDARYCOLORP3UIVPROC) (GLenum type, const GLuint *color); +typedef void ( * PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void ( * PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void ( * PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void ( * PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void ( * PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void ( * PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +typedef void ( * PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void ( * PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value); +__attribute__((visibility("default"))) void glDrawArraysIndirect (GLenum mode, const GLvoid *indirect); +__attribute__((visibility("default"))) void glDrawElementsIndirect (GLenum mode, GLenum type, const GLvoid *indirect); +typedef void ( * PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const GLvoid *indirect); +typedef void ( * PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const GLvoid *indirect); +__attribute__((visibility("default"))) void glUniform1d (GLint location, GLdouble x); +__attribute__((visibility("default"))) void glUniform2d (GLint location, GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glUniform1dv (GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glUniform2dv (GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glUniform3dv (GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glUniform4dv (GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glGetUniformdv (GLuint program, GLint location, GLdouble *params); +typedef void ( * PFNGLUNIFORM1DPROC) (GLint location, GLdouble x); +typedef void ( * PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y); +typedef void ( * PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params); +__attribute__((visibility("default"))) GLint glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name); +__attribute__((visibility("default"))) GLuint glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name); +__attribute__((visibility("default"))) void glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); +__attribute__((visibility("default"))) void glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +__attribute__((visibility("default"))) void glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +__attribute__((visibility("default"))) void glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices); +__attribute__((visibility("default"))) void glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params); +__attribute__((visibility("default"))) void glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values); +typedef GLint ( * PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name); +typedef GLuint ( * PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name); +typedef void ( * PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values); +typedef void ( * PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +typedef void ( * PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name); +typedef void ( * PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices); +typedef void ( * PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params); +typedef void ( * PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values); +__attribute__((visibility("default"))) void glPatchParameteri (GLenum pname, GLint value); +__attribute__((visibility("default"))) void glPatchParameterfv (GLenum pname, const GLfloat *values); +typedef void ( * PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value); +typedef void ( * PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values); +__attribute__((visibility("default"))) void glBindTransformFeedback (GLenum target, GLuint id); +__attribute__((visibility("default"))) void glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids); +__attribute__((visibility("default"))) void glGenTransformFeedbacks (GLsizei n, GLuint *ids); +__attribute__((visibility("default"))) GLboolean glIsTransformFeedback (GLuint id); +__attribute__((visibility("default"))) void glPauseTransformFeedback (void); +__attribute__((visibility("default"))) void glResumeTransformFeedback (void); +__attribute__((visibility("default"))) void glDrawTransformFeedback (GLenum mode, GLuint id); +typedef void ( * PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id); +typedef void ( * PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids); +typedef void ( * PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); +typedef GLboolean ( * PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id); +typedef void ( * PFNGLPAUSETRANSFORMFEEDBACKPROC) (void); +typedef void ( * PFNGLRESUMETRANSFORMFEEDBACKPROC) (void); +typedef void ( * PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id); +__attribute__((visibility("default"))) void glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream); +__attribute__((visibility("default"))) void glBeginQueryIndexed (GLenum target, GLuint index, GLuint id); +__attribute__((visibility("default"))) void glEndQueryIndexed (GLenum target, GLuint index); +__attribute__((visibility("default"))) void glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params); +typedef void ( * PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream); +typedef void ( * PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id); +typedef void ( * PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index); +typedef void ( * PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glReleaseShaderCompiler (void); +__attribute__((visibility("default"))) void glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length); +__attribute__((visibility("default"))) void glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +__attribute__((visibility("default"))) void glDepthRangef (GLclampf n, GLclampf f); +__attribute__((visibility("default"))) void glClearDepthf (GLclampf d); +typedef void ( * PFNGLRELEASESHADERCOMPILERPROC) (void); +typedef void ( * PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length); +typedef void ( * PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); +typedef void ( * PFNGLDEPTHRANGEFPROC) (GLclampf n, GLclampf f); +typedef void ( * PFNGLCLEARDEPTHFPROC) (GLclampf d); +__attribute__((visibility("default"))) void glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); +__attribute__((visibility("default"))) void glProgramBinary (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length); +__attribute__((visibility("default"))) void glProgramParameteri (GLuint program, GLenum pname, GLint value); +typedef void ( * PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); +typedef void ( * PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length); +typedef void ( * PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); +__attribute__((visibility("default"))) void glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program); +__attribute__((visibility("default"))) void glActiveShaderProgram (GLuint pipeline, GLuint program); +__attribute__((visibility("default"))) GLuint glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar* *strings); +__attribute__((visibility("default"))) void glBindProgramPipeline (GLuint pipeline); +__attribute__((visibility("default"))) void glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines); +__attribute__((visibility("default"))) void glGenProgramPipelines (GLsizei n, GLuint *pipelines); +__attribute__((visibility("default"))) GLboolean glIsProgramPipeline (GLuint pipeline); +__attribute__((visibility("default"))) void glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glProgramUniform1i (GLuint program, GLint location, GLint v0); +__attribute__((visibility("default"))) void glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glProgramUniform1f (GLuint program, GLint location, GLfloat v0); +__attribute__((visibility("default"))) void glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform1d (GLuint program, GLint location, GLdouble v0); +__attribute__((visibility("default"))) void glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniform1ui (GLuint program, GLint location, GLuint v0); +__attribute__((visibility("default"))) void glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1); +__attribute__((visibility("default"))) void glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1); +__attribute__((visibility("default"))) void glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1); +__attribute__((visibility("default"))) void glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1); +__attribute__((visibility("default"))) void glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +__attribute__((visibility("default"))) void glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +__attribute__((visibility("default"))) void glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); +__attribute__((visibility("default"))) void glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +__attribute__((visibility("default"))) void glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +__attribute__((visibility("default"))) void glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +__attribute__((visibility("default"))) void glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +__attribute__((visibility("default"))) void glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +__attribute__((visibility("default"))) void glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glValidateProgramPipeline (GLuint pipeline); +__attribute__((visibility("default"))) void glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +typedef void ( * PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program); +typedef void ( * PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program); +typedef GLuint ( * PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar* *strings); +typedef void ( * PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void ( * PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines); +typedef void ( * PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); +typedef GLboolean ( * PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void ( * PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params); +typedef void ( * PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0); +typedef void ( * PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0); +typedef void ( * PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0); +typedef void ( * PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0); +typedef void ( * PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef void ( * PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef void ( * PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1); +typedef void ( * PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); +typedef void ( * PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void ( * PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void ( * PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); +typedef void ( * PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void ( * PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void ( * PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void ( * PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +typedef void ( * PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void ( * PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline); +typedef void ( * PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); +__attribute__((visibility("default"))) void glVertexAttribL1d (GLuint index, GLdouble x); +__attribute__((visibility("default"))) void glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glVertexAttribL1dv (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribL2dv (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribL3dv (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribL4dv (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params); +typedef void ( * PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x); +typedef void ( * PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void ( * PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) void glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v); +__attribute__((visibility("default"))) void glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +__attribute__((visibility("default"))) void glViewportIndexedfv (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glScissorArrayv (GLuint first, GLsizei count, const GLint *v); +__attribute__((visibility("default"))) void glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glScissorIndexedv (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glDepthRangeArrayv (GLuint first, GLsizei count, const GLclampd *v); +__attribute__((visibility("default"))) void glDepthRangeIndexed (GLuint index, GLclampd n, GLclampd f); +__attribute__((visibility("default"))) void glGetFloati_v (GLenum target, GLuint index, GLfloat *data); +__attribute__((visibility("default"))) void glGetDoublei_v (GLenum target, GLuint index, GLdouble *data); +typedef void ( * PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v); +typedef void ( * PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +typedef void ( * PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v); +typedef void ( * PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +typedef void ( * PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLclampd *v); +typedef void ( * PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLclampd n, GLclampd f); +typedef void ( * PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data); +typedef void ( * PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data); +__attribute__((visibility("default"))) GLsync glCreateSyncFromCLeventARB (struct _cl_context * context, struct _cl_event * event, GLbitfield flags); +typedef GLsync ( * PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context * context, struct _cl_event * event, GLbitfield flags); +__attribute__((visibility("default"))) void glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +__attribute__((visibility("default"))) void glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +__attribute__((visibility("default"))) void glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const GLvoid *userParam); +__attribute__((visibility("default"))) GLuint glGetDebugMessageLogARB (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +typedef void ( * PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void ( * PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); +typedef void ( * PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const GLvoid *userParam); +typedef GLuint ( * PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); +__attribute__((visibility("default"))) GLenum glGetGraphicsResetStatusARB (void); +__attribute__((visibility("default"))) void glGetnMapdvARB (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); +__attribute__((visibility("default"))) void glGetnMapfvARB (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); +__attribute__((visibility("default"))) void glGetnMapivARB (GLenum target, GLenum query, GLsizei bufSize, GLint *v); +__attribute__((visibility("default"))) void glGetnPixelMapfvARB (GLenum map, GLsizei bufSize, GLfloat *values); +__attribute__((visibility("default"))) void glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint *values); +__attribute__((visibility("default"))) void glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort *values); +__attribute__((visibility("default"))) void glGetnPolygonStippleARB (GLsizei bufSize, GLubyte *pattern); +__attribute__((visibility("default"))) void glGetnColorTableARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table); +__attribute__((visibility("default"))) void glGetnConvolutionFilterARB (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image); +__attribute__((visibility("default"))) void glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span); +__attribute__((visibility("default"))) void glGetnHistogramARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); +__attribute__((visibility("default"))) void glGetnMinmaxARB (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); +__attribute__((visibility("default"))) void glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img); +__attribute__((visibility("default"))) void glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data); +__attribute__((visibility("default"))) void glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, GLvoid *img); +__attribute__((visibility("default"))) void glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +__attribute__((visibility("default"))) void glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params); +__attribute__((visibility("default"))) void glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +__attribute__((visibility("default"))) void glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); +typedef GLenum ( * PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void); +typedef void ( * PFNGLGETNMAPDVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v); +typedef void ( * PFNGLGETNMAPFVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v); +typedef void ( * PFNGLGETNMAPIVARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint *v); +typedef void ( * PFNGLGETNPIXELMAPFVARBPROC) (GLenum map, GLsizei bufSize, GLfloat *values); +typedef void ( * PFNGLGETNPIXELMAPUIVARBPROC) (GLenum map, GLsizei bufSize, GLuint *values); +typedef void ( * PFNGLGETNPIXELMAPUSVARBPROC) (GLenum map, GLsizei bufSize, GLushort *values); +typedef void ( * PFNGLGETNPOLYGONSTIPPLEARBPROC) (GLsizei bufSize, GLubyte *pattern); +typedef void ( * PFNGLGETNCOLORTABLEARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table); +typedef void ( * PFNGLGETNCONVOLUTIONFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image); +typedef void ( * PFNGLGETNSEPARABLEFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span); +typedef void ( * PFNGLGETNHISTOGRAMARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); +typedef void ( * PFNGLGETNMINMAXARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values); +typedef void ( * PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img); +typedef void ( * PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data); +typedef void ( * PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, GLvoid *img); +typedef void ( * PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); +typedef void ( * PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); +typedef void ( * PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params); +typedef void ( * PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params); +__attribute__((visibility("default"))) void glBlendColorEXT (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +typedef void ( * PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +__attribute__((visibility("default"))) void glPolygonOffsetEXT (GLfloat factor, GLfloat bias); +typedef void ( * PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias); +__attribute__((visibility("default"))) void glTexImage3DEXT (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glGetTexFilterFuncSGIS (GLenum target, GLenum filter, GLfloat *weights); +__attribute__((visibility("default"))) void glTexFilterFuncSGIS (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); +typedef void ( * PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat *weights); +typedef void ( * PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); +__attribute__((visibility("default"))) void glTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glCopyTexImage1DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +__attribute__((visibility("default"))) void glCopyTexImage2DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +__attribute__((visibility("default"))) void glCopyTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glCopyTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glCopyTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void ( * PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void ( * PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void ( * PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void ( * PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glGetHistogramEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +__attribute__((visibility("default"))) void glGetHistogramParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetHistogramParameterivEXT (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetMinmaxEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +__attribute__((visibility("default"))) void glGetMinmaxParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetMinmaxParameterivEXT (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glHistogramEXT (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +__attribute__((visibility("default"))) void glMinmaxEXT (GLenum target, GLenum internalformat, GLboolean sink); +__attribute__((visibility("default"))) void glResetHistogramEXT (GLenum target); +__attribute__((visibility("default"))) void glResetMinmaxEXT (GLenum target); +typedef void ( * PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void ( * PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); +typedef void ( * PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +typedef void ( * PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink); +typedef void ( * PFNGLRESETHISTOGRAMEXTPROC) (GLenum target); +typedef void ( * PFNGLRESETMINMAXEXTPROC) (GLenum target); +__attribute__((visibility("default"))) void glConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +__attribute__((visibility("default"))) void glConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +__attribute__((visibility("default"))) void glConvolutionParameterfEXT (GLenum target, GLenum pname, GLfloat params); +__attribute__((visibility("default"))) void glConvolutionParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glConvolutionParameteriEXT (GLenum target, GLenum pname, GLint params); +__attribute__((visibility("default"))) void glConvolutionParameterivEXT (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glCopyConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glCopyConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glGetConvolutionFilterEXT (GLenum target, GLenum format, GLenum type, GLvoid *image); +__attribute__((visibility("default"))) void glGetConvolutionParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetConvolutionParameterivEXT (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetSeparableFilterEXT (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +__attribute__((visibility("default"))) void glSeparableFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); +typedef void ( * PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); +typedef void ( * PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); +typedef void ( * PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params); +typedef void ( * PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params); +typedef void ( * PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void ( * PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *image); +typedef void ( * PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); +typedef void ( * PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); +__attribute__((visibility("default"))) void glColorTableSGI (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +__attribute__((visibility("default"))) void glColorTableParameterfvSGI (GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glColorTableParameterivSGI (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glCopyColorTableSGI (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glGetColorTableSGI (GLenum target, GLenum format, GLenum type, GLvoid *table); +__attribute__((visibility("default"))) void glGetColorTableParameterfvSGI (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetColorTableParameterivSGI (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +typedef void ( * PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table); +typedef void ( * PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glPixelTexGenSGIX (GLenum mode); +typedef void ( * PFNGLPIXELTEXGENSGIXPROC) (GLenum mode); +__attribute__((visibility("default"))) void glPixelTexGenParameteriSGIS (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glPixelTexGenParameterivSGIS (GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glPixelTexGenParameterfSGIS (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glPixelTexGenParameterfvSGIS (GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glGetPixelTexGenParameterivSGIS (GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetPixelTexGenParameterfvSGIS (GLenum pname, GLfloat *params); +typedef void ( * PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param); +typedef void ( * PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint *params); +typedef void ( * PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param); +typedef void ( * PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); +typedef void ( * PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint *params); +typedef void ( * PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glTexImage4DSGIS (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glTexSubImage4DSGIS (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) GLboolean glAreTexturesResidentEXT (GLsizei n, const GLuint *textures, GLboolean *residences); +__attribute__((visibility("default"))) void glBindTextureEXT (GLenum target, GLuint texture); +__attribute__((visibility("default"))) void glDeleteTexturesEXT (GLsizei n, const GLuint *textures); +__attribute__((visibility("default"))) void glGenTexturesEXT (GLsizei n, GLuint *textures); +__attribute__((visibility("default"))) GLboolean glIsTextureEXT (GLuint texture); +__attribute__((visibility("default"))) void glPrioritizeTexturesEXT (GLsizei n, const GLuint *textures, const GLclampf *priorities); +typedef GLboolean ( * PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint *textures, GLboolean *residences); +typedef void ( * PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture); +typedef void ( * PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint *textures); +typedef void ( * PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint *textures); +typedef GLboolean ( * PFNGLISTEXTUREEXTPROC) (GLuint texture); +typedef void ( * PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint *textures, const GLclampf *priorities); +__attribute__((visibility("default"))) void glDetailTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points); +__attribute__((visibility("default"))) void glGetDetailTexFuncSGIS (GLenum target, GLfloat *points); +typedef void ( * PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); +typedef void ( * PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat *points); +__attribute__((visibility("default"))) void glSharpenTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points); +__attribute__((visibility("default"))) void glGetSharpenTexFuncSGIS (GLenum target, GLfloat *points); +typedef void ( * PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat *points); +typedef void ( * PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat *points); +__attribute__((visibility("default"))) void glSampleMaskSGIS (GLclampf value, GLboolean invert); +__attribute__((visibility("default"))) void glSamplePatternSGIS (GLenum pattern); +typedef void ( * PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert); +typedef void ( * PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern); +__attribute__((visibility("default"))) void glArrayElementEXT (GLint i); +__attribute__((visibility("default"))) void glColorPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +__attribute__((visibility("default"))) void glDrawArraysEXT (GLenum mode, GLint first, GLsizei count); +__attribute__((visibility("default"))) void glEdgeFlagPointerEXT (GLsizei stride, GLsizei count, const GLboolean *pointer); +__attribute__((visibility("default"))) void glGetPointervEXT (GLenum pname, GLvoid* *params); +__attribute__((visibility("default"))) void glIndexPointerEXT (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +__attribute__((visibility("default"))) void glNormalPointerEXT (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +__attribute__((visibility("default"))) void glTexCoordPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +__attribute__((visibility("default"))) void glVertexPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void ( * PFNGLARRAYELEMENTEXTPROC) (GLint i); +typedef void ( * PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void ( * PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count); +typedef void ( * PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer); +typedef void ( * PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params); +typedef void ( * PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void ( * PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void ( * PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +typedef void ( * PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); +__attribute__((visibility("default"))) void glBlendEquationEXT (GLenum mode); +typedef void ( * PFNGLBLENDEQUATIONEXTPROC) (GLenum mode); +__attribute__((visibility("default"))) void glSpriteParameterfSGIX (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glSpriteParameterfvSGIX (GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glSpriteParameteriSGIX (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glSpriteParameterivSGIX (GLenum pname, const GLint *params); +typedef void ( * PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param); +typedef void ( * PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat *params); +typedef void ( * PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param); +typedef void ( * PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glPointParameterfEXT (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glPointParameterfvEXT (GLenum pname, const GLfloat *params); +typedef void ( * PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param); +typedef void ( * PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glPointParameterfSGIS (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glPointParameterfvSGIS (GLenum pname, const GLfloat *params); +typedef void ( * PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param); +typedef void ( * PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) GLint glGetInstrumentsSGIX (void); +__attribute__((visibility("default"))) void glInstrumentsBufferSGIX (GLsizei size, GLint *buffer); +__attribute__((visibility("default"))) GLint glPollInstrumentsSGIX (GLint *marker_p); +__attribute__((visibility("default"))) void glReadInstrumentsSGIX (GLint marker); +__attribute__((visibility("default"))) void glStartInstrumentsSGIX (void); +__attribute__((visibility("default"))) void glStopInstrumentsSGIX (GLint marker); +typedef GLint ( * PFNGLGETINSTRUMENTSSGIXPROC) (void); +typedef void ( * PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint *buffer); +typedef GLint ( * PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint *marker_p); +typedef void ( * PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker); +typedef void ( * PFNGLSTARTINSTRUMENTSSGIXPROC) (void); +typedef void ( * PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker); +__attribute__((visibility("default"))) void glFrameZoomSGIX (GLint factor); +typedef void ( * PFNGLFRAMEZOOMSGIXPROC) (GLint factor); +__attribute__((visibility("default"))) void glTagSampleBufferSGIX (void); +typedef void ( * PFNGLTAGSAMPLEBUFFERSGIXPROC) (void); +__attribute__((visibility("default"))) void glDeformationMap3dSGIX (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); +__attribute__((visibility("default"))) void glDeformationMap3fSGIX (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); +__attribute__((visibility("default"))) void glDeformSGIX (GLbitfield mask); +__attribute__((visibility("default"))) void glLoadIdentityDeformationMapSGIX (GLbitfield mask); +typedef void ( * PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); +typedef void ( * PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); +typedef void ( * PFNGLDEFORMSGIXPROC) (GLbitfield mask); +typedef void ( * PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask); +__attribute__((visibility("default"))) void glReferencePlaneSGIX (const GLdouble *equation); +typedef void ( * PFNGLREFERENCEPLANESGIXPROC) (const GLdouble *equation); +__attribute__((visibility("default"))) void glFlushRasterSGIX (void); +typedef void ( * PFNGLFLUSHRASTERSGIXPROC) (void); +__attribute__((visibility("default"))) void glFogFuncSGIS (GLsizei n, const GLfloat *points); +__attribute__((visibility("default"))) void glGetFogFuncSGIS (GLfloat *points); +typedef void ( * PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat *points); +typedef void ( * PFNGLGETFOGFUNCSGISPROC) (GLfloat *points); +__attribute__((visibility("default"))) void glImageTransformParameteriHP (GLenum target, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glImageTransformParameterfHP (GLenum target, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glImageTransformParameterivHP (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glImageTransformParameterfvHP (GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glGetImageTransformParameterivHP (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetImageTransformParameterfvHP (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param); +typedef void ( * PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void ( * PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +__attribute__((visibility("default"))) void glCopyColorSubTableEXT (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); +typedef void ( * PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glHintPGI (GLenum target, GLint mode); +typedef void ( * PFNGLHINTPGIPROC) (GLenum target, GLint mode); +__attribute__((visibility("default"))) void glColorTableEXT (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +__attribute__((visibility("default"))) void glGetColorTableEXT (GLenum target, GLenum format, GLenum type, GLvoid *data); +__attribute__((visibility("default"))) void glGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetColorTableParameterfvEXT (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); +typedef void ( * PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *data); +typedef void ( * PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetListParameterfvSGIX (GLuint list, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetListParameterivSGIX (GLuint list, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glListParameterfSGIX (GLuint list, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glListParameterfvSGIX (GLuint list, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glListParameteriSGIX (GLuint list, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glListParameterivSGIX (GLuint list, GLenum pname, const GLint *params); +typedef void ( * PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint *params); +typedef void ( * PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param); +typedef void ( * PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param); +typedef void ( * PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glIndexMaterialEXT (GLenum face, GLenum mode); +typedef void ( * PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode); +__attribute__((visibility("default"))) void glIndexFuncEXT (GLenum func, GLclampf ref); +typedef void ( * PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref); +__attribute__((visibility("default"))) void glLockArraysEXT (GLint first, GLsizei count); +__attribute__((visibility("default"))) void glUnlockArraysEXT (void); +typedef void ( * PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count); +typedef void ( * PFNGLUNLOCKARRAYSEXTPROC) (void); +__attribute__((visibility("default"))) void glCullParameterdvEXT (GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) void glCullParameterfvEXT (GLenum pname, GLfloat *params); +typedef void ( * PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble *params); +typedef void ( * PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glFragmentColorMaterialSGIX (GLenum face, GLenum mode); +__attribute__((visibility("default"))) void glFragmentLightfSGIX (GLenum light, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glFragmentLightfvSGIX (GLenum light, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glFragmentLightiSGIX (GLenum light, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glFragmentLightivSGIX (GLenum light, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glFragmentLightModelfSGIX (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glFragmentLightModelfvSGIX (GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glFragmentLightModeliSGIX (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glFragmentLightModelivSGIX (GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glFragmentMaterialfSGIX (GLenum face, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glFragmentMaterialfvSGIX (GLenum face, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glFragmentMaterialiSGIX (GLenum face, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glFragmentMaterialivSGIX (GLenum face, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glGetFragmentLightfvSGIX (GLenum light, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetFragmentLightivSGIX (GLenum light, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetFragmentMaterialfvSGIX (GLenum face, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetFragmentMaterialivSGIX (GLenum face, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glLightEnviSGIX (GLenum pname, GLint param); +typedef void ( * PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode); +typedef void ( * PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param); +typedef void ( * PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param); +typedef void ( * PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params); +typedef void ( * PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param); +typedef void ( * PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params); +typedef void ( * PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param); +typedef void ( * PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params); +typedef void ( * PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param); +typedef void ( * PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param); +typedef void ( * PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint *params); +typedef void ( * PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint *params); +typedef void ( * PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params); +typedef void ( * PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); +typedef void ( * PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); +__attribute__((visibility("default"))) void glApplyTextureEXT (GLenum mode); +__attribute__((visibility("default"))) void glTextureLightEXT (GLenum pname); +__attribute__((visibility("default"))) void glTextureMaterialEXT (GLenum face, GLenum mode); +typedef void ( * PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode); +typedef void ( * PFNGLTEXTURELIGHTEXTPROC) (GLenum pname); +typedef void ( * PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode); +__attribute__((visibility("default"))) void glAsyncMarkerSGIX (GLuint marker); +__attribute__((visibility("default"))) GLint glFinishAsyncSGIX (GLuint *markerp); +__attribute__((visibility("default"))) GLint glPollAsyncSGIX (GLuint *markerp); +__attribute__((visibility("default"))) GLuint glGenAsyncMarkersSGIX (GLsizei range); +__attribute__((visibility("default"))) void glDeleteAsyncMarkersSGIX (GLuint marker, GLsizei range); +__attribute__((visibility("default"))) GLboolean glIsAsyncMarkerSGIX (GLuint marker); +typedef void ( * PFNGLASYNCMARKERSGIXPROC) (GLuint marker); +typedef GLint ( * PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp); +typedef GLint ( * PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp); +typedef GLuint ( * PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range); +typedef void ( * PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range); +typedef GLboolean ( * PFNGLISASYNCMARKERSGIXPROC) (GLuint marker); +__attribute__((visibility("default"))) void glVertexPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer); +__attribute__((visibility("default"))) void glNormalPointervINTEL (GLenum type, const GLvoid* *pointer); +__attribute__((visibility("default"))) void glColorPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer); +__attribute__((visibility("default"))) void glTexCoordPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer); +typedef void ( * PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); +typedef void ( * PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* *pointer); +typedef void ( * PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); +typedef void ( * PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* *pointer); +__attribute__((visibility("default"))) void glPixelTransformParameteriEXT (GLenum target, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glPixelTransformParameterfEXT (GLenum target, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glPixelTransformParameterivEXT (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glPixelTransformParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param); +typedef void ( * PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void ( * PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glSecondaryColor3bEXT (GLbyte red, GLbyte green, GLbyte blue); +__attribute__((visibility("default"))) void glSecondaryColor3bvEXT (const GLbyte *v); +__attribute__((visibility("default"))) void glSecondaryColor3dEXT (GLdouble red, GLdouble green, GLdouble blue); +__attribute__((visibility("default"))) void glSecondaryColor3dvEXT (const GLdouble *v); +__attribute__((visibility("default"))) void glSecondaryColor3fEXT (GLfloat red, GLfloat green, GLfloat blue); +__attribute__((visibility("default"))) void glSecondaryColor3fvEXT (const GLfloat *v); +__attribute__((visibility("default"))) void glSecondaryColor3iEXT (GLint red, GLint green, GLint blue); +__attribute__((visibility("default"))) void glSecondaryColor3ivEXT (const GLint *v); +__attribute__((visibility("default"))) void glSecondaryColor3sEXT (GLshort red, GLshort green, GLshort blue); +__attribute__((visibility("default"))) void glSecondaryColor3svEXT (const GLshort *v); +__attribute__((visibility("default"))) void glSecondaryColor3ubEXT (GLubyte red, GLubyte green, GLubyte blue); +__attribute__((visibility("default"))) void glSecondaryColor3ubvEXT (const GLubyte *v); +__attribute__((visibility("default"))) void glSecondaryColor3uiEXT (GLuint red, GLuint green, GLuint blue); +__attribute__((visibility("default"))) void glSecondaryColor3uivEXT (const GLuint *v); +__attribute__((visibility("default"))) void glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue); +__attribute__((visibility("default"))) void glSecondaryColor3usvEXT (const GLushort *v); +__attribute__((visibility("default"))) void glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void ( * PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte *v); +typedef void ( * PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void ( * PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble *v); +typedef void ( * PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void ( * PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v); +typedef void ( * PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue); +typedef void ( * PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint *v); +typedef void ( * PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue); +typedef void ( * PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort *v); +typedef void ( * PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void ( * PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte *v); +typedef void ( * PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue); +typedef void ( * PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint *v); +typedef void ( * PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue); +typedef void ( * PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort *v); +typedef void ( * PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glTextureNormalEXT (GLenum mode); +typedef void ( * PFNGLTEXTURENORMALEXTPROC) (GLenum mode); +__attribute__((visibility("default"))) void glMultiDrawArraysEXT (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +__attribute__((visibility("default"))) void glMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); +typedef void ( * PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void ( * PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); +__attribute__((visibility("default"))) void glFogCoordfEXT (GLfloat coord); +__attribute__((visibility("default"))) void glFogCoordfvEXT (const GLfloat *coord); +__attribute__((visibility("default"))) void glFogCoorddEXT (GLdouble coord); +__attribute__((visibility("default"))) void glFogCoorddvEXT (const GLdouble *coord); +__attribute__((visibility("default"))) void glFogCoordPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLFOGCOORDFEXTPROC) (GLfloat coord); +typedef void ( * PFNGLFOGCOORDFVEXTPROC) (const GLfloat *coord); +typedef void ( * PFNGLFOGCOORDDEXTPROC) (GLdouble coord); +typedef void ( * PFNGLFOGCOORDDVEXTPROC) (const GLdouble *coord); +typedef void ( * PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glTangent3bEXT (GLbyte tx, GLbyte ty, GLbyte tz); +__attribute__((visibility("default"))) void glTangent3bvEXT (const GLbyte *v); +__attribute__((visibility("default"))) void glTangent3dEXT (GLdouble tx, GLdouble ty, GLdouble tz); +__attribute__((visibility("default"))) void glTangent3dvEXT (const GLdouble *v); +__attribute__((visibility("default"))) void glTangent3fEXT (GLfloat tx, GLfloat ty, GLfloat tz); +__attribute__((visibility("default"))) void glTangent3fvEXT (const GLfloat *v); +__attribute__((visibility("default"))) void glTangent3iEXT (GLint tx, GLint ty, GLint tz); +__attribute__((visibility("default"))) void glTangent3ivEXT (const GLint *v); +__attribute__((visibility("default"))) void glTangent3sEXT (GLshort tx, GLshort ty, GLshort tz); +__attribute__((visibility("default"))) void glTangent3svEXT (const GLshort *v); +__attribute__((visibility("default"))) void glBinormal3bEXT (GLbyte bx, GLbyte by, GLbyte bz); +__attribute__((visibility("default"))) void glBinormal3bvEXT (const GLbyte *v); +__attribute__((visibility("default"))) void glBinormal3dEXT (GLdouble bx, GLdouble by, GLdouble bz); +__attribute__((visibility("default"))) void glBinormal3dvEXT (const GLdouble *v); +__attribute__((visibility("default"))) void glBinormal3fEXT (GLfloat bx, GLfloat by, GLfloat bz); +__attribute__((visibility("default"))) void glBinormal3fvEXT (const GLfloat *v); +__attribute__((visibility("default"))) void glBinormal3iEXT (GLint bx, GLint by, GLint bz); +__attribute__((visibility("default"))) void glBinormal3ivEXT (const GLint *v); +__attribute__((visibility("default"))) void glBinormal3sEXT (GLshort bx, GLshort by, GLshort bz); +__attribute__((visibility("default"))) void glBinormal3svEXT (const GLshort *v); +__attribute__((visibility("default"))) void glTangentPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glBinormalPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz); +typedef void ( * PFNGLTANGENT3BVEXTPROC) (const GLbyte *v); +typedef void ( * PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz); +typedef void ( * PFNGLTANGENT3DVEXTPROC) (const GLdouble *v); +typedef void ( * PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz); +typedef void ( * PFNGLTANGENT3FVEXTPROC) (const GLfloat *v); +typedef void ( * PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz); +typedef void ( * PFNGLTANGENT3IVEXTPROC) (const GLint *v); +typedef void ( * PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz); +typedef void ( * PFNGLTANGENT3SVEXTPROC) (const GLshort *v); +typedef void ( * PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz); +typedef void ( * PFNGLBINORMAL3BVEXTPROC) (const GLbyte *v); +typedef void ( * PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz); +typedef void ( * PFNGLBINORMAL3DVEXTPROC) (const GLdouble *v); +typedef void ( * PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz); +typedef void ( * PFNGLBINORMAL3FVEXTPROC) (const GLfloat *v); +typedef void ( * PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz); +typedef void ( * PFNGLBINORMAL3IVEXTPROC) (const GLint *v); +typedef void ( * PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz); +typedef void ( * PFNGLBINORMAL3SVEXTPROC) (const GLshort *v); +typedef void ( * PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glFinishTextureSUNX (void); +typedef void ( * PFNGLFINISHTEXTURESUNXPROC) (void); +__attribute__((visibility("default"))) void glGlobalAlphaFactorbSUN (GLbyte factor); +__attribute__((visibility("default"))) void glGlobalAlphaFactorsSUN (GLshort factor); +__attribute__((visibility("default"))) void glGlobalAlphaFactoriSUN (GLint factor); +__attribute__((visibility("default"))) void glGlobalAlphaFactorfSUN (GLfloat factor); +__attribute__((visibility("default"))) void glGlobalAlphaFactordSUN (GLdouble factor); +__attribute__((visibility("default"))) void glGlobalAlphaFactorubSUN (GLubyte factor); +__attribute__((visibility("default"))) void glGlobalAlphaFactorusSUN (GLushort factor); +__attribute__((visibility("default"))) void glGlobalAlphaFactoruiSUN (GLuint factor); +typedef void ( * PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor); +typedef void ( * PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor); +typedef void ( * PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor); +typedef void ( * PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor); +typedef void ( * PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor); +typedef void ( * PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor); +typedef void ( * PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor); +typedef void ( * PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor); +__attribute__((visibility("default"))) void glReplacementCodeuiSUN (GLuint code); +__attribute__((visibility("default"))) void glReplacementCodeusSUN (GLushort code); +__attribute__((visibility("default"))) void glReplacementCodeubSUN (GLubyte code); +__attribute__((visibility("default"))) void glReplacementCodeuivSUN (const GLuint *code); +__attribute__((visibility("default"))) void glReplacementCodeusvSUN (const GLushort *code); +__attribute__((visibility("default"))) void glReplacementCodeubvSUN (const GLubyte *code); +__attribute__((visibility("default"))) void glReplacementCodePointerSUN (GLenum type, GLsizei stride, const GLvoid* *pointer); +typedef void ( * PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code); +typedef void ( * PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code); +typedef void ( * PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code); +typedef void ( * PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint *code); +typedef void ( * PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort *code); +typedef void ( * PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte *code); +typedef void ( * PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* *pointer); +__attribute__((visibility("default"))) void glColor4ubVertex2fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); +__attribute__((visibility("default"))) void glColor4ubVertex2fvSUN (const GLubyte *c, const GLfloat *v); +__attribute__((visibility("default"))) void glColor4ubVertex3fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glColor4ubVertex3fvSUN (const GLubyte *c, const GLfloat *v); +__attribute__((visibility("default"))) void glColor3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glColor3fVertex3fvSUN (const GLfloat *c, const GLfloat *v); +__attribute__((visibility("default"))) void glNormal3fVertex3fSUN (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glNormal3fVertex3fvSUN (const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glColor4fNormal3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glColor4fNormal3fVertex3fvSUN (const GLfloat *c, const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glTexCoord2fVertex3fSUN (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glTexCoord2fVertex3fvSUN (const GLfloat *tc, const GLfloat *v); +__attribute__((visibility("default"))) void glTexCoord4fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glTexCoord4fVertex4fvSUN (const GLfloat *tc, const GLfloat *v); +__attribute__((visibility("default"))) void glTexCoord2fColor4ubVertex3fSUN (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glTexCoord2fColor4ubVertex3fvSUN (const GLfloat *tc, const GLubyte *c, const GLfloat *v); +__attribute__((visibility("default"))) void glTexCoord2fColor3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glTexCoord2fColor3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *v); +__attribute__((visibility("default"))) void glTexCoord2fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glTexCoord2fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glReplacementCodeuiVertex3fSUN (GLuint rc, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glReplacementCodeuiVertex3fvSUN (const GLuint *rc, const GLfloat *v); +__attribute__((visibility("default"))) void glReplacementCodeuiColor4ubVertex3fSUN (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *rc, const GLubyte *c, const GLfloat *v); +__attribute__((visibility("default"))) void glReplacementCodeuiColor3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glReplacementCodeuiColor3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *v); +__attribute__((visibility("default"))) void glReplacementCodeuiNormal3fVertex3fSUN (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glReplacementCodeuiTexCoord2fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *v); +__attribute__((visibility("default"))) void glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); +typedef void ( * PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte *c, const GLfloat *v); +typedef void ( * PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte *c, const GLfloat *v); +typedef void ( * PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *v); +typedef void ( * PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *v); +typedef void ( * PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *v); +typedef void ( * PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat *tc, const GLubyte *c, const GLfloat *v); +typedef void ( * PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *v); +typedef void ( * PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *v); +typedef void ( * PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint *rc, const GLubyte *c, const GLfloat *v); +typedef void ( * PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *v); +typedef void ( * PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *v); +typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); +typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); +__attribute__((visibility("default"))) void glBlendFuncSeparateEXT (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void ( * PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +__attribute__((visibility("default"))) void glBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void ( * PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +__attribute__((visibility("default"))) void glVertexWeightfEXT (GLfloat weight); +__attribute__((visibility("default"))) void glVertexWeightfvEXT (const GLfloat *weight); +__attribute__((visibility("default"))) void glVertexWeightPointerEXT (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight); +typedef void ( * PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat *weight); +typedef void ( * PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glFlushVertexArrayRangeNV (void); +__attribute__((visibility("default"))) void glVertexArrayRangeNV (GLsizei length, const GLvoid *pointer); +typedef void ( * PFNGLFLUSHVERTEXARRAYRANGENVPROC) (void); +typedef void ( * PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid *pointer); +__attribute__((visibility("default"))) void glCombinerParameterfvNV (GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glCombinerParameterfNV (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glCombinerParameterivNV (GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glCombinerParameteriNV (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glCombinerInputNV (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +__attribute__((visibility("default"))) void glCombinerOutputNV (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); +__attribute__((visibility("default"))) void glFinalCombinerInputNV (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +__attribute__((visibility("default"))) void glGetCombinerInputParameterfvNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetCombinerInputParameterivNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetCombinerOutputParameterfvNV (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetCombinerOutputParameterivNV (GLenum stage, GLenum portion, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetFinalCombinerInputParameterfvNV (GLenum variable, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetFinalCombinerInputParameterivNV (GLenum variable, GLenum pname, GLint *params); +typedef void ( * PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params); +typedef void ( * PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param); +typedef void ( * PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params); +typedef void ( * PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); +typedef void ( * PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void ( * PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); +typedef void ( * PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void ( * PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); +typedef void ( * PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params); +typedef void ( * PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glResizeBuffersMESA (void); +typedef void ( * PFNGLRESIZEBUFFERSMESAPROC) (void); +__attribute__((visibility("default"))) void glWindowPos2dMESA (GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glWindowPos2dvMESA (const GLdouble *v); +__attribute__((visibility("default"))) void glWindowPos2fMESA (GLfloat x, GLfloat y); +__attribute__((visibility("default"))) void glWindowPos2fvMESA (const GLfloat *v); +__attribute__((visibility("default"))) void glWindowPos2iMESA (GLint x, GLint y); +__attribute__((visibility("default"))) void glWindowPos2ivMESA (const GLint *v); +__attribute__((visibility("default"))) void glWindowPos2sMESA (GLshort x, GLshort y); +__attribute__((visibility("default"))) void glWindowPos2svMESA (const GLshort *v); +__attribute__((visibility("default"))) void glWindowPos3dMESA (GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glWindowPos3dvMESA (const GLdouble *v); +__attribute__((visibility("default"))) void glWindowPos3fMESA (GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glWindowPos3fvMESA (const GLfloat *v); +__attribute__((visibility("default"))) void glWindowPos3iMESA (GLint x, GLint y, GLint z); +__attribute__((visibility("default"))) void glWindowPos3ivMESA (const GLint *v); +__attribute__((visibility("default"))) void glWindowPos3sMESA (GLshort x, GLshort y, GLshort z); +__attribute__((visibility("default"))) void glWindowPos3svMESA (const GLshort *v); +__attribute__((visibility("default"))) void glWindowPos4dMESA (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glWindowPos4dvMESA (const GLdouble *v); +__attribute__((visibility("default"))) void glWindowPos4fMESA (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glWindowPos4fvMESA (const GLfloat *v); +__attribute__((visibility("default"))) void glWindowPos4iMESA (GLint x, GLint y, GLint z, GLint w); +__attribute__((visibility("default"))) void glWindowPos4ivMESA (const GLint *v); +__attribute__((visibility("default"))) void glWindowPos4sMESA (GLshort x, GLshort y, GLshort z, GLshort w); +__attribute__((visibility("default"))) void glWindowPos4svMESA (const GLshort *v); +typedef void ( * PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y); +typedef void ( * PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble *v); +typedef void ( * PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y); +typedef void ( * PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat *v); +typedef void ( * PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y); +typedef void ( * PFNGLWINDOWPOS2IVMESAPROC) (const GLint *v); +typedef void ( * PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y); +typedef void ( * PFNGLWINDOWPOS2SVMESAPROC) (const GLshort *v); +typedef void ( * PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble *v); +typedef void ( * PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat *v); +typedef void ( * PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z); +typedef void ( * PFNGLWINDOWPOS3IVMESAPROC) (const GLint *v); +typedef void ( * PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z); +typedef void ( * PFNGLWINDOWPOS3SVMESAPROC) (const GLshort *v); +typedef void ( * PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *v); +typedef void ( * PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat *v); +typedef void ( * PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w); +typedef void ( * PFNGLWINDOWPOS4IVMESAPROC) (const GLint *v); +typedef void ( * PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w); +typedef void ( * PFNGLWINDOWPOS4SVMESAPROC) (const GLshort *v); +__attribute__((visibility("default"))) void glMultiModeDrawArraysIBM (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); +__attribute__((visibility("default"))) void glMultiModeDrawElementsIBM (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride); +typedef void ( * PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); +typedef void ( * PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride); +__attribute__((visibility("default"))) void glColorPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +__attribute__((visibility("default"))) void glSecondaryColorPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +__attribute__((visibility("default"))) void glEdgeFlagPointerListIBM (GLint stride, const GLboolean* *pointer, GLint ptrstride); +__attribute__((visibility("default"))) void glFogCoordPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +__attribute__((visibility("default"))) void glIndexPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +__attribute__((visibility("default"))) void glNormalPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +__attribute__((visibility("default"))) void glTexCoordPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +__attribute__((visibility("default"))) void glVertexPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void ( * PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void ( * PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void ( * PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* *pointer, GLint ptrstride); +typedef void ( * PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void ( * PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void ( * PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void ( * PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +typedef void ( * PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); +__attribute__((visibility("default"))) void glTbufferMask3DFX (GLuint mask); +typedef void ( * PFNGLTBUFFERMASK3DFXPROC) (GLuint mask); +__attribute__((visibility("default"))) void glSampleMaskEXT (GLclampf value, GLboolean invert); +__attribute__((visibility("default"))) void glSamplePatternEXT (GLenum pattern); +typedef void ( * PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert); +typedef void ( * PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern); +__attribute__((visibility("default"))) void glTextureColorMaskSGIS (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +typedef void ( * PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +__attribute__((visibility("default"))) void glIglooInterfaceSGIX (GLenum pname, const GLvoid *params); +typedef void ( * PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params); +__attribute__((visibility("default"))) void glDeleteFencesNV (GLsizei n, const GLuint *fences); +__attribute__((visibility("default"))) void glGenFencesNV (GLsizei n, GLuint *fences); +__attribute__((visibility("default"))) GLboolean glIsFenceNV (GLuint fence); +__attribute__((visibility("default"))) GLboolean glTestFenceNV (GLuint fence); +__attribute__((visibility("default"))) void glGetFenceivNV (GLuint fence, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glFinishFenceNV (GLuint fence); +__attribute__((visibility("default"))) void glSetFenceNV (GLuint fence, GLenum condition); +typedef void ( * PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); +typedef void ( * PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); +typedef GLboolean ( * PFNGLISFENCENVPROC) (GLuint fence); +typedef GLboolean ( * PFNGLTESTFENCENVPROC) (GLuint fence); +typedef void ( * PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); +typedef void ( * PFNGLFINISHFENCENVPROC) (GLuint fence); +typedef void ( * PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); +__attribute__((visibility("default"))) void glMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); +__attribute__((visibility("default"))) void glMapParameterivNV (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glMapParameterfvNV (GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glGetMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); +__attribute__((visibility("default"))) void glGetMapParameterivNV (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetMapParameterfvNV (GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetMapAttribParameterivNV (GLenum target, GLuint index, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetMapAttribParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glEvalMapsNV (GLenum target, GLenum mode); +typedef void ( * PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); +typedef void ( * PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); +typedef void ( * PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params); +typedef void ( * PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); +typedef void ( * PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode); +__attribute__((visibility("default"))) void glCombinerStageParameterfvNV (GLenum stage, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glGetCombinerStageParameterfvNV (GLenum stage, GLenum pname, GLfloat *params); +typedef void ( * PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) GLboolean glAreProgramsResidentNV (GLsizei n, const GLuint *programs, GLboolean *residences); +__attribute__((visibility("default"))) void glBindProgramNV (GLenum target, GLuint id); +__attribute__((visibility("default"))) void glDeleteProgramsNV (GLsizei n, const GLuint *programs); +__attribute__((visibility("default"))) void glExecuteProgramNV (GLenum target, GLuint id, const GLfloat *params); +__attribute__((visibility("default"))) void glGenProgramsNV (GLsizei n, GLuint *programs); +__attribute__((visibility("default"))) void glGetProgramParameterdvNV (GLenum target, GLuint index, GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) void glGetProgramParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetProgramivNV (GLuint id, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetProgramStringNV (GLuint id, GLenum pname, GLubyte *program); +__attribute__((visibility("default"))) void glGetTrackMatrixivNV (GLenum target, GLuint address, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVertexAttribdvNV (GLuint index, GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) void glGetVertexAttribfvNV (GLuint index, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetVertexAttribivNV (GLuint index, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVertexAttribPointervNV (GLuint index, GLenum pname, GLvoid* *pointer); +__attribute__((visibility("default"))) GLboolean glIsProgramNV (GLuint id); +__attribute__((visibility("default"))) void glLoadProgramNV (GLenum target, GLuint id, GLsizei len, const GLubyte *program); +__attribute__((visibility("default"))) void glProgramParameter4dNV (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glProgramParameter4dvNV (GLenum target, GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glProgramParameter4fNV (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glProgramParameter4fvNV (GLenum target, GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glProgramParameters4dvNV (GLenum target, GLuint index, GLsizei count, const GLdouble *v); +__attribute__((visibility("default"))) void glProgramParameters4fvNV (GLenum target, GLuint index, GLsizei count, const GLfloat *v); +__attribute__((visibility("default"))) void glRequestResidentProgramsNV (GLsizei n, const GLuint *programs); +__attribute__((visibility("default"))) void glTrackMatrixNV (GLenum target, GLuint address, GLenum matrix, GLenum transform); +__attribute__((visibility("default"))) void glVertexAttribPointerNV (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glVertexAttrib1dNV (GLuint index, GLdouble x); +__attribute__((visibility("default"))) void glVertexAttrib1dvNV (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib1fNV (GLuint index, GLfloat x); +__attribute__((visibility("default"))) void glVertexAttrib1fvNV (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib1sNV (GLuint index, GLshort x); +__attribute__((visibility("default"))) void glVertexAttrib1svNV (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib2dNV (GLuint index, GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glVertexAttrib2dvNV (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib2fNV (GLuint index, GLfloat x, GLfloat y); +__attribute__((visibility("default"))) void glVertexAttrib2fvNV (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib2sNV (GLuint index, GLshort x, GLshort y); +__attribute__((visibility("default"))) void glVertexAttrib2svNV (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib3dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glVertexAttrib3dvNV (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib3fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glVertexAttrib3fvNV (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib3sNV (GLuint index, GLshort x, GLshort y, GLshort z); +__attribute__((visibility("default"))) void glVertexAttrib3svNV (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib4dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glVertexAttrib4dvNV (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttrib4fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glVertexAttrib4fvNV (GLuint index, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttrib4sNV (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +__attribute__((visibility("default"))) void glVertexAttrib4svNV (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttrib4ubNV (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +__attribute__((visibility("default"))) void glVertexAttrib4ubvNV (GLuint index, const GLubyte *v); +__attribute__((visibility("default"))) void glVertexAttribs1dvNV (GLuint index, GLsizei count, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribs1fvNV (GLuint index, GLsizei count, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttribs1svNV (GLuint index, GLsizei count, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttribs2dvNV (GLuint index, GLsizei count, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribs2fvNV (GLuint index, GLsizei count, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttribs2svNV (GLuint index, GLsizei count, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttribs3dvNV (GLuint index, GLsizei count, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribs3fvNV (GLuint index, GLsizei count, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttribs3svNV (GLuint index, GLsizei count, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttribs4dvNV (GLuint index, GLsizei count, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribs4fvNV (GLuint index, GLsizei count, const GLfloat *v); +__attribute__((visibility("default"))) void glVertexAttribs4svNV (GLuint index, GLsizei count, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttribs4ubvNV (GLuint index, GLsizei count, const GLubyte *v); +typedef GLboolean ( * PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint *programs, GLboolean *residences); +typedef void ( * PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); +typedef void ( * PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); +typedef void ( * PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat *params); +typedef void ( * PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint *programs); +typedef void ( * PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble *params); +typedef void ( * PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void ( * PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte *program); +typedef void ( * PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void ( * PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* *pointer); +typedef GLboolean ( * PFNGLISPROGRAMNVPROC) (GLuint id); +typedef void ( * PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); +typedef void ( * PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble *v); +typedef void ( * PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat *v); +typedef void ( * PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLdouble *v); +typedef void ( * PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *v); +typedef void ( * PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint *programs); +typedef void ( * PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); +typedef void ( * PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x); +typedef void ( * PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); +typedef void ( * PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); +typedef void ( * PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void ( * PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void ( * PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); +typedef void ( * PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void ( * PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void ( * PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void ( * PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte *v); +typedef void ( * PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat *v); +typedef void ( * PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte *v); +__attribute__((visibility("default"))) void glTexBumpParameterivATI (GLenum pname, const GLint *param); +__attribute__((visibility("default"))) void glTexBumpParameterfvATI (GLenum pname, const GLfloat *param); +__attribute__((visibility("default"))) void glGetTexBumpParameterivATI (GLenum pname, GLint *param); +__attribute__((visibility("default"))) void glGetTexBumpParameterfvATI (GLenum pname, GLfloat *param); +typedef void ( * PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint *param); +typedef void ( * PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat *param); +typedef void ( * PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint *param); +typedef void ( * PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat *param); +__attribute__((visibility("default"))) GLuint glGenFragmentShadersATI (GLuint range); +__attribute__((visibility("default"))) void glBindFragmentShaderATI (GLuint id); +__attribute__((visibility("default"))) void glDeleteFragmentShaderATI (GLuint id); +__attribute__((visibility("default"))) void glBeginFragmentShaderATI (void); +__attribute__((visibility("default"))) void glEndFragmentShaderATI (void); +__attribute__((visibility("default"))) void glPassTexCoordATI (GLuint dst, GLuint coord, GLenum swizzle); +__attribute__((visibility("default"))) void glSampleMapATI (GLuint dst, GLuint interp, GLenum swizzle); +__attribute__((visibility("default"))) void glColorFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +__attribute__((visibility("default"))) void glColorFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +__attribute__((visibility("default"))) void glColorFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +__attribute__((visibility("default"))) void glAlphaFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +__attribute__((visibility("default"))) void glAlphaFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +__attribute__((visibility("default"))) void glAlphaFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +__attribute__((visibility("default"))) void glSetFragmentShaderConstantATI (GLuint dst, const GLfloat *value); +typedef GLuint ( * PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range); +typedef void ( * PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id); +typedef void ( * PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id); +typedef void ( * PFNGLBEGINFRAGMENTSHADERATIPROC) (void); +typedef void ( * PFNGLENDFRAGMENTSHADERATIPROC) (void); +typedef void ( * PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle); +typedef void ( * PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle); +typedef void ( * PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void ( * PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +typedef void ( * PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void ( * PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void ( * PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +typedef void ( * PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void ( * PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat *value); +__attribute__((visibility("default"))) void glPNTrianglesiATI (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glPNTrianglesfATI (GLenum pname, GLfloat param); +typedef void ( * PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param); +typedef void ( * PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) GLuint glNewObjectBufferATI (GLsizei size, const GLvoid *pointer, GLenum usage); +__attribute__((visibility("default"))) GLboolean glIsObjectBufferATI (GLuint buffer); +__attribute__((visibility("default"))) void glUpdateObjectBufferATI (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); +__attribute__((visibility("default"))) void glGetObjectBufferfvATI (GLuint buffer, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetObjectBufferivATI (GLuint buffer, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glFreeObjectBufferATI (GLuint buffer); +__attribute__((visibility("default"))) void glArrayObjectATI (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +__attribute__((visibility("default"))) void glGetArrayObjectfvATI (GLenum array, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetArrayObjectivATI (GLenum array, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glVariantArrayObjectATI (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +__attribute__((visibility("default"))) void glGetVariantArrayObjectfvATI (GLuint id, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetVariantArrayObjectivATI (GLuint id, GLenum pname, GLint *params); +typedef GLuint ( * PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid *pointer, GLenum usage); +typedef GLboolean ( * PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void ( * PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); +typedef void ( * PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint *params); +typedef void ( * PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void ( * PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void ( * PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint *params); +typedef void ( * PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void ( * PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glBeginVertexShaderEXT (void); +__attribute__((visibility("default"))) void glEndVertexShaderEXT (void); +__attribute__((visibility("default"))) void glBindVertexShaderEXT (GLuint id); +__attribute__((visibility("default"))) GLuint glGenVertexShadersEXT (GLuint range); +__attribute__((visibility("default"))) void glDeleteVertexShaderEXT (GLuint id); +__attribute__((visibility("default"))) void glShaderOp1EXT (GLenum op, GLuint res, GLuint arg1); +__attribute__((visibility("default"))) void glShaderOp2EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2); +__attribute__((visibility("default"))) void glShaderOp3EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); +__attribute__((visibility("default"))) void glSwizzleEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +__attribute__((visibility("default"))) void glWriteMaskEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +__attribute__((visibility("default"))) void glInsertComponentEXT (GLuint res, GLuint src, GLuint num); +__attribute__((visibility("default"))) void glExtractComponentEXT (GLuint res, GLuint src, GLuint num); +__attribute__((visibility("default"))) GLuint glGenSymbolsEXT (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); +__attribute__((visibility("default"))) void glSetInvariantEXT (GLuint id, GLenum type, const GLvoid *addr); +__attribute__((visibility("default"))) void glSetLocalConstantEXT (GLuint id, GLenum type, const GLvoid *addr); +__attribute__((visibility("default"))) void glVariantbvEXT (GLuint id, const GLbyte *addr); +__attribute__((visibility("default"))) void glVariantsvEXT (GLuint id, const GLshort *addr); +__attribute__((visibility("default"))) void glVariantivEXT (GLuint id, const GLint *addr); +__attribute__((visibility("default"))) void glVariantfvEXT (GLuint id, const GLfloat *addr); +__attribute__((visibility("default"))) void glVariantdvEXT (GLuint id, const GLdouble *addr); +__attribute__((visibility("default"))) void glVariantubvEXT (GLuint id, const GLubyte *addr); +__attribute__((visibility("default"))) void glVariantusvEXT (GLuint id, const GLushort *addr); +__attribute__((visibility("default"))) void glVariantuivEXT (GLuint id, const GLuint *addr); +__attribute__((visibility("default"))) void glVariantPointerEXT (GLuint id, GLenum type, GLuint stride, const GLvoid *addr); +__attribute__((visibility("default"))) void glEnableVariantClientStateEXT (GLuint id); +__attribute__((visibility("default"))) void glDisableVariantClientStateEXT (GLuint id); +__attribute__((visibility("default"))) GLuint glBindLightParameterEXT (GLenum light, GLenum value); +__attribute__((visibility("default"))) GLuint glBindMaterialParameterEXT (GLenum face, GLenum value); +__attribute__((visibility("default"))) GLuint glBindTexGenParameterEXT (GLenum unit, GLenum coord, GLenum value); +__attribute__((visibility("default"))) GLuint glBindTextureUnitParameterEXT (GLenum unit, GLenum value); +__attribute__((visibility("default"))) GLuint glBindParameterEXT (GLenum value); +__attribute__((visibility("default"))) GLboolean glIsVariantEnabledEXT (GLuint id, GLenum cap); +__attribute__((visibility("default"))) void glGetVariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); +__attribute__((visibility("default"))) void glGetVariantIntegervEXT (GLuint id, GLenum value, GLint *data); +__attribute__((visibility("default"))) void glGetVariantFloatvEXT (GLuint id, GLenum value, GLfloat *data); +__attribute__((visibility("default"))) void glGetVariantPointervEXT (GLuint id, GLenum value, GLvoid* *data); +__attribute__((visibility("default"))) void glGetInvariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); +__attribute__((visibility("default"))) void glGetInvariantIntegervEXT (GLuint id, GLenum value, GLint *data); +__attribute__((visibility("default"))) void glGetInvariantFloatvEXT (GLuint id, GLenum value, GLfloat *data); +__attribute__((visibility("default"))) void glGetLocalConstantBooleanvEXT (GLuint id, GLenum value, GLboolean *data); +__attribute__((visibility("default"))) void glGetLocalConstantIntegervEXT (GLuint id, GLenum value, GLint *data); +__attribute__((visibility("default"))) void glGetLocalConstantFloatvEXT (GLuint id, GLenum value, GLfloat *data); +typedef void ( * PFNGLBEGINVERTEXSHADEREXTPROC) (void); +typedef void ( * PFNGLENDVERTEXSHADEREXTPROC) (void); +typedef void ( * PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id); +typedef GLuint ( * PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range); +typedef void ( * PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id); +typedef void ( * PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1); +typedef void ( * PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); +typedef void ( * PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); +typedef void ( * PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void ( * PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void ( * PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef void ( * PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef GLuint ( * PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); +typedef void ( * PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); +typedef void ( * PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid *addr); +typedef void ( * PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte *addr); +typedef void ( * PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort *addr); +typedef void ( * PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint *addr); +typedef void ( * PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat *addr); +typedef void ( * PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble *addr); +typedef void ( * PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte *addr); +typedef void ( * PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort *addr); +typedef void ( * PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint *addr); +typedef void ( * PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr); +typedef void ( * PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); +typedef void ( * PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); +typedef GLuint ( * PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value); +typedef GLuint ( * PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value); +typedef GLuint ( * PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value); +typedef GLuint ( * PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value); +typedef GLuint ( * PFNGLBINDPARAMETEREXTPROC) (GLenum value); +typedef GLboolean ( * PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap); +typedef void ( * PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void ( * PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void ( * PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +typedef void ( * PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* *data); +typedef void ( * PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void ( * PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void ( * PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +typedef void ( * PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean *data); +typedef void ( * PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint *data); +typedef void ( * PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat *data); +__attribute__((visibility("default"))) void glVertexStream1sATI (GLenum stream, GLshort x); +__attribute__((visibility("default"))) void glVertexStream1svATI (GLenum stream, const GLshort *coords); +__attribute__((visibility("default"))) void glVertexStream1iATI (GLenum stream, GLint x); +__attribute__((visibility("default"))) void glVertexStream1ivATI (GLenum stream, const GLint *coords); +__attribute__((visibility("default"))) void glVertexStream1fATI (GLenum stream, GLfloat x); +__attribute__((visibility("default"))) void glVertexStream1fvATI (GLenum stream, const GLfloat *coords); +__attribute__((visibility("default"))) void glVertexStream1dATI (GLenum stream, GLdouble x); +__attribute__((visibility("default"))) void glVertexStream1dvATI (GLenum stream, const GLdouble *coords); +__attribute__((visibility("default"))) void glVertexStream2sATI (GLenum stream, GLshort x, GLshort y); +__attribute__((visibility("default"))) void glVertexStream2svATI (GLenum stream, const GLshort *coords); +__attribute__((visibility("default"))) void glVertexStream2iATI (GLenum stream, GLint x, GLint y); +__attribute__((visibility("default"))) void glVertexStream2ivATI (GLenum stream, const GLint *coords); +__attribute__((visibility("default"))) void glVertexStream2fATI (GLenum stream, GLfloat x, GLfloat y); +__attribute__((visibility("default"))) void glVertexStream2fvATI (GLenum stream, const GLfloat *coords); +__attribute__((visibility("default"))) void glVertexStream2dATI (GLenum stream, GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glVertexStream2dvATI (GLenum stream, const GLdouble *coords); +__attribute__((visibility("default"))) void glVertexStream3sATI (GLenum stream, GLshort x, GLshort y, GLshort z); +__attribute__((visibility("default"))) void glVertexStream3svATI (GLenum stream, const GLshort *coords); +__attribute__((visibility("default"))) void glVertexStream3iATI (GLenum stream, GLint x, GLint y, GLint z); +__attribute__((visibility("default"))) void glVertexStream3ivATI (GLenum stream, const GLint *coords); +__attribute__((visibility("default"))) void glVertexStream3fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glVertexStream3fvATI (GLenum stream, const GLfloat *coords); +__attribute__((visibility("default"))) void glVertexStream3dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glVertexStream3dvATI (GLenum stream, const GLdouble *coords); +__attribute__((visibility("default"))) void glVertexStream4sATI (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); +__attribute__((visibility("default"))) void glVertexStream4svATI (GLenum stream, const GLshort *coords); +__attribute__((visibility("default"))) void glVertexStream4iATI (GLenum stream, GLint x, GLint y, GLint z, GLint w); +__attribute__((visibility("default"))) void glVertexStream4ivATI (GLenum stream, const GLint *coords); +__attribute__((visibility("default"))) void glVertexStream4fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glVertexStream4fvATI (GLenum stream, const GLfloat *coords); +__attribute__((visibility("default"))) void glVertexStream4dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glVertexStream4dvATI (GLenum stream, const GLdouble *coords); +__attribute__((visibility("default"))) void glNormalStream3bATI (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); +__attribute__((visibility("default"))) void glNormalStream3bvATI (GLenum stream, const GLbyte *coords); +__attribute__((visibility("default"))) void glNormalStream3sATI (GLenum stream, GLshort nx, GLshort ny, GLshort nz); +__attribute__((visibility("default"))) void glNormalStream3svATI (GLenum stream, const GLshort *coords); +__attribute__((visibility("default"))) void glNormalStream3iATI (GLenum stream, GLint nx, GLint ny, GLint nz); +__attribute__((visibility("default"))) void glNormalStream3ivATI (GLenum stream, const GLint *coords); +__attribute__((visibility("default"))) void glNormalStream3fATI (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); +__attribute__((visibility("default"))) void glNormalStream3fvATI (GLenum stream, const GLfloat *coords); +__attribute__((visibility("default"))) void glNormalStream3dATI (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); +__attribute__((visibility("default"))) void glNormalStream3dvATI (GLenum stream, const GLdouble *coords); +__attribute__((visibility("default"))) void glClientActiveVertexStreamATI (GLenum stream); +__attribute__((visibility("default"))) void glVertexBlendEnviATI (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glVertexBlendEnvfATI (GLenum pname, GLfloat param); +typedef void ( * PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x); +typedef void ( * PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void ( * PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x); +typedef void ( * PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint *coords); +typedef void ( * PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x); +typedef void ( * PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void ( * PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x); +typedef void ( * PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void ( * PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y); +typedef void ( * PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void ( * PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y); +typedef void ( * PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint *coords); +typedef void ( * PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y); +typedef void ( * PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void ( * PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y); +typedef void ( * PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void ( * PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); +typedef void ( * PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void ( * PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); +typedef void ( * PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); +typedef void ( * PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void ( * PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void ( * PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void ( * PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void ( * PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); +typedef void ( * PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint *coords); +typedef void ( * PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void ( * PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void ( * PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); +typedef void ( * PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte *coords); +typedef void ( * PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz); +typedef void ( * PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort *coords); +typedef void ( * PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz); +typedef void ( * PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint *coords); +typedef void ( * PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); +typedef void ( * PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat *coords); +typedef void ( * PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); +typedef void ( * PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble *coords); +typedef void ( * PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream); +typedef void ( * PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param); +typedef void ( * PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glElementPointerATI (GLenum type, const GLvoid *pointer); +__attribute__((visibility("default"))) void glDrawElementArrayATI (GLenum mode, GLsizei count); +__attribute__((visibility("default"))) void glDrawRangeElementArrayATI (GLenum mode, GLuint start, GLuint end, GLsizei count); +typedef void ( * PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid *pointer); +typedef void ( * PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count); +typedef void ( * PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); +__attribute__((visibility("default"))) void glDrawMeshArraysSUN (GLenum mode, GLint first, GLsizei count, GLsizei width); +typedef void ( * PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width); +__attribute__((visibility("default"))) void glGenOcclusionQueriesNV (GLsizei n, GLuint *ids); +__attribute__((visibility("default"))) void glDeleteOcclusionQueriesNV (GLsizei n, const GLuint *ids); +__attribute__((visibility("default"))) GLboolean glIsOcclusionQueryNV (GLuint id); +__attribute__((visibility("default"))) void glBeginOcclusionQueryNV (GLuint id); +__attribute__((visibility("default"))) void glEndOcclusionQueryNV (void); +__attribute__((visibility("default"))) void glGetOcclusionQueryivNV (GLuint id, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetOcclusionQueryuivNV (GLuint id, GLenum pname, GLuint *params); +typedef void ( * PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint *ids); +typedef void ( * PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint *ids); +typedef GLboolean ( * PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id); +typedef void ( * PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id); +typedef void ( * PFNGLENDOCCLUSIONQUERYNVPROC) (void); +typedef void ( * PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params); +typedef void ( * PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glPointParameteriNV (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glPointParameterivNV (GLenum pname, const GLint *params); +typedef void ( * PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param); +typedef void ( * PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glActiveStencilFaceEXT (GLenum face); +typedef void ( * PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face); +__attribute__((visibility("default"))) void glElementPointerAPPLE (GLenum type, const GLvoid *pointer); +__attribute__((visibility("default"))) void glDrawElementArrayAPPLE (GLenum mode, GLint first, GLsizei count); +__attribute__((visibility("default"))) void glDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); +__attribute__((visibility("default"))) void glMultiDrawElementArrayAPPLE (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +__attribute__((visibility("default"))) void glMultiDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void ( * PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid *pointer); +typedef void ( * PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count); +typedef void ( * PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); +typedef void ( * PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); +typedef void ( * PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); +__attribute__((visibility("default"))) void glGenFencesAPPLE (GLsizei n, GLuint *fences); +__attribute__((visibility("default"))) void glDeleteFencesAPPLE (GLsizei n, const GLuint *fences); +__attribute__((visibility("default"))) void glSetFenceAPPLE (GLuint fence); +__attribute__((visibility("default"))) GLboolean glIsFenceAPPLE (GLuint fence); +__attribute__((visibility("default"))) GLboolean glTestFenceAPPLE (GLuint fence); +__attribute__((visibility("default"))) void glFinishFenceAPPLE (GLuint fence); +__attribute__((visibility("default"))) GLboolean glTestObjectAPPLE (GLenum object, GLuint name); +__attribute__((visibility("default"))) void glFinishObjectAPPLE (GLenum object, GLint name); +typedef void ( * PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint *fences); +typedef void ( * PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint *fences); +typedef void ( * PFNGLSETFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean ( * PFNGLISFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean ( * PFNGLTESTFENCEAPPLEPROC) (GLuint fence); +typedef void ( * PFNGLFINISHFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean ( * PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name); +typedef void ( * PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name); +__attribute__((visibility("default"))) void glBindVertexArrayAPPLE (GLuint array); +__attribute__((visibility("default"))) void glDeleteVertexArraysAPPLE (GLsizei n, const GLuint *arrays); +__attribute__((visibility("default"))) void glGenVertexArraysAPPLE (GLsizei n, GLuint *arrays); +__attribute__((visibility("default"))) GLboolean glIsVertexArrayAPPLE (GLuint array); +typedef void ( * PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array); +typedef void ( * PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays); +typedef void ( * PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean ( * PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array); +__attribute__((visibility("default"))) void glVertexArrayRangeAPPLE (GLsizei length, GLvoid *pointer); +__attribute__((visibility("default"))) void glFlushVertexArrayRangeAPPLE (GLsizei length, GLvoid *pointer); +__attribute__((visibility("default"))) void glVertexArrayParameteriAPPLE (GLenum pname, GLint param); +typedef void ( * PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); +typedef void ( * PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid *pointer); +typedef void ( * PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param); +__attribute__((visibility("default"))) void glDrawBuffersATI (GLsizei n, const GLenum *bufs); +typedef void ( * PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs); +__attribute__((visibility("default"))) void glProgramNamedParameter4fNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glProgramNamedParameter4dNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glProgramNamedParameter4fvNV (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); +__attribute__((visibility("default"))) void glProgramNamedParameter4dvNV (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); +__attribute__((visibility("default"))) void glGetProgramNamedParameterfvNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); +__attribute__((visibility("default"))) void glGetProgramNamedParameterdvNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); +typedef void ( * PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); +typedef void ( * PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); +typedef void ( * PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); +typedef void ( * PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); +__attribute__((visibility("default"))) void glVertex2hNV (GLhalfNV x, GLhalfNV y); +__attribute__((visibility("default"))) void glVertex2hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertex3hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z); +__attribute__((visibility("default"))) void glVertex3hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertex4hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +__attribute__((visibility("default"))) void glVertex4hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glNormal3hNV (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); +__attribute__((visibility("default"))) void glNormal3hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +__attribute__((visibility("default"))) void glColor3hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glColor4hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); +__attribute__((visibility("default"))) void glColor4hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glTexCoord1hNV (GLhalfNV s); +__attribute__((visibility("default"))) void glTexCoord1hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glTexCoord2hNV (GLhalfNV s, GLhalfNV t); +__attribute__((visibility("default"))) void glTexCoord2hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glTexCoord3hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r); +__attribute__((visibility("default"))) void glTexCoord3hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glTexCoord4hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +__attribute__((visibility("default"))) void glTexCoord4hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glMultiTexCoord1hNV (GLenum target, GLhalfNV s); +__attribute__((visibility("default"))) void glMultiTexCoord1hvNV (GLenum target, const GLhalfNV *v); +__attribute__((visibility("default"))) void glMultiTexCoord2hNV (GLenum target, GLhalfNV s, GLhalfNV t); +__attribute__((visibility("default"))) void glMultiTexCoord2hvNV (GLenum target, const GLhalfNV *v); +__attribute__((visibility("default"))) void glMultiTexCoord3hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); +__attribute__((visibility("default"))) void glMultiTexCoord3hvNV (GLenum target, const GLhalfNV *v); +__attribute__((visibility("default"))) void glMultiTexCoord4hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +__attribute__((visibility("default"))) void glMultiTexCoord4hvNV (GLenum target, const GLhalfNV *v); +__attribute__((visibility("default"))) void glFogCoordhNV (GLhalfNV fog); +__attribute__((visibility("default"))) void glFogCoordhvNV (const GLhalfNV *fog); +__attribute__((visibility("default"))) void glSecondaryColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +__attribute__((visibility("default"))) void glSecondaryColor3hvNV (const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertexWeighthNV (GLhalfNV weight); +__attribute__((visibility("default"))) void glVertexWeighthvNV (const GLhalfNV *weight); +__attribute__((visibility("default"))) void glVertexAttrib1hNV (GLuint index, GLhalfNV x); +__attribute__((visibility("default"))) void glVertexAttrib1hvNV (GLuint index, const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertexAttrib2hNV (GLuint index, GLhalfNV x, GLhalfNV y); +__attribute__((visibility("default"))) void glVertexAttrib2hvNV (GLuint index, const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertexAttrib3hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); +__attribute__((visibility("default"))) void glVertexAttrib3hvNV (GLuint index, const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertexAttrib4hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +__attribute__((visibility("default"))) void glVertexAttrib4hvNV (GLuint index, const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertexAttribs1hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertexAttribs2hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertexAttribs3hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +__attribute__((visibility("default"))) void glVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void ( * PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y); +typedef void ( * PFNGLVERTEX2HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z); +typedef void ( * PFNGLVERTEX3HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +typedef void ( * PFNGLVERTEX4HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); +typedef void ( * PFNGLNORMAL3HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +typedef void ( * PFNGLCOLOR3HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); +typedef void ( * PFNGLCOLOR4HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLTEXCOORD1HNVPROC) (GLhalfNV s); +typedef void ( * PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t); +typedef void ( * PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r); +typedef void ( * PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +typedef void ( * PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s); +typedef void ( * PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void ( * PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t); +typedef void ( * PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void ( * PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); +typedef void ( * PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void ( * PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +typedef void ( * PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v); +typedef void ( * PFNGLFOGCOORDHNVPROC) (GLhalfNV fog); +typedef void ( * PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog); +typedef void ( * PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +typedef void ( * PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v); +typedef void ( * PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight); +typedef void ( * PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight); +typedef void ( * PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x); +typedef void ( * PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void ( * PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y); +typedef void ( * PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void ( * PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); +typedef void ( * PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void ( * PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +typedef void ( * PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV *v); +typedef void ( * PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void ( * PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void ( * PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +typedef void ( * PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v); +__attribute__((visibility("default"))) void glPixelDataRangeNV (GLenum target, GLsizei length, GLvoid *pointer); +__attribute__((visibility("default"))) void glFlushPixelDataRangeNV (GLenum target); +typedef void ( * PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid *pointer); +typedef void ( * PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target); +__attribute__((visibility("default"))) void glPrimitiveRestartNV (void); +__attribute__((visibility("default"))) void glPrimitiveRestartIndexNV (GLuint index); +typedef void ( * PFNGLPRIMITIVERESTARTNVPROC) (void); +typedef void ( * PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index); +__attribute__((visibility("default"))) GLvoid* glMapObjectBufferATI (GLuint buffer); +__attribute__((visibility("default"))) void glUnmapObjectBufferATI (GLuint buffer); +typedef GLvoid* ( * PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void ( * PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer); +__attribute__((visibility("default"))) void glStencilOpSeparateATI (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +__attribute__((visibility("default"))) void glStencilFuncSeparateATI (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); +typedef void ( * PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void ( * PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); +__attribute__((visibility("default"))) void glVertexAttribArrayObjectATI (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); +__attribute__((visibility("default"))) void glGetVertexAttribArrayObjectfvATI (GLuint index, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetVertexAttribArrayObjectivATI (GLuint index, GLenum pname, GLint *params); +typedef void ( * PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); +typedef void ( * PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glDepthBoundsEXT (GLclampd zmin, GLclampd zmax); +typedef void ( * PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax); +__attribute__((visibility("default"))) void glBlendEquationSeparateEXT (GLenum modeRGB, GLenum modeAlpha); +typedef void ( * PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha); +__attribute__((visibility("default"))) GLboolean glIsRenderbufferEXT (GLuint renderbuffer); +__attribute__((visibility("default"))) void glBindRenderbufferEXT (GLenum target, GLuint renderbuffer); +__attribute__((visibility("default"))) void glDeleteRenderbuffersEXT (GLsizei n, const GLuint *renderbuffers); +__attribute__((visibility("default"))) void glGenRenderbuffersEXT (GLsizei n, GLuint *renderbuffers); +__attribute__((visibility("default"))) void glRenderbufferStorageEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glGetRenderbufferParameterivEXT (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) GLboolean glIsFramebufferEXT (GLuint framebuffer); +__attribute__((visibility("default"))) void glBindFramebufferEXT (GLenum target, GLuint framebuffer); +__attribute__((visibility("default"))) void glDeleteFramebuffersEXT (GLsizei n, const GLuint *framebuffers); +__attribute__((visibility("default"))) void glGenFramebuffersEXT (GLsizei n, GLuint *framebuffers); +__attribute__((visibility("default"))) GLenum glCheckFramebufferStatusEXT (GLenum target); +__attribute__((visibility("default"))) void glFramebufferTexture1DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glFramebufferTexture2DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glFramebufferTexture3DEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +__attribute__((visibility("default"))) void glFramebufferRenderbufferEXT (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +__attribute__((visibility("default"))) void glGetFramebufferAttachmentParameterivEXT (GLenum target, GLenum attachment, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGenerateMipmapEXT (GLenum target); +typedef GLboolean ( * PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer); +typedef void ( * PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer); +typedef void ( * PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers); +typedef void ( * PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers); +typedef void ( * PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void ( * PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef GLboolean ( * PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer); +typedef void ( * PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer); +typedef void ( * PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers); +typedef void ( * PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers); +typedef GLenum ( * PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target); +typedef void ( * PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void ( * PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void ( * PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void ( * PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void ( * PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); +typedef void ( * PFNGLGENERATEMIPMAPEXTPROC) (GLenum target); +__attribute__((visibility("default"))) void glStringMarkerGREMEDY (GLsizei len, const GLvoid *string); +typedef void ( * PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string); +__attribute__((visibility("default"))) void glStencilClearTagEXT (GLsizei stencilTagBits, GLuint stencilClearTag); +typedef void ( * PFNGLSTENCILCLEARTAGEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag); +__attribute__((visibility("default"))) void glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef void ( * PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +__attribute__((visibility("default"))) void glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void ( * PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glGetQueryObjecti64vEXT (GLuint id, GLenum pname, GLint64EXT *params); +__attribute__((visibility("default"))) void glGetQueryObjectui64vEXT (GLuint id, GLenum pname, GLuint64EXT *params); +typedef void ( * PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params); +typedef void ( * PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params); +__attribute__((visibility("default"))) void glProgramEnvParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +__attribute__((visibility("default"))) void glProgramLocalParameters4fvEXT (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +typedef void ( * PFNGLPROGRAMENVPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +typedef void ( * PFNGLPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat *params); +__attribute__((visibility("default"))) void glBufferParameteriAPPLE (GLenum target, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glFlushMappedBufferRangeAPPLE (GLenum target, GLintptr offset, GLsizeiptr size); +typedef void ( * PFNGLBUFFERPARAMETERIAPPLEPROC) (GLenum target, GLenum pname, GLint param); +typedef void ( * PFNGLFLUSHMAPPEDBUFFERRANGEAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size); +__attribute__((visibility("default"))) void glProgramLocalParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +__attribute__((visibility("default"))) void glProgramLocalParameterI4ivNV (GLenum target, GLuint index, const GLint *params); +__attribute__((visibility("default"))) void glProgramLocalParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params); +__attribute__((visibility("default"))) void glProgramLocalParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +__attribute__((visibility("default"))) void glProgramLocalParameterI4uivNV (GLenum target, GLuint index, const GLuint *params); +__attribute__((visibility("default"))) void glProgramLocalParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params); +__attribute__((visibility("default"))) void glProgramEnvParameterI4iNV (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +__attribute__((visibility("default"))) void glProgramEnvParameterI4ivNV (GLenum target, GLuint index, const GLint *params); +__attribute__((visibility("default"))) void glProgramEnvParametersI4ivNV (GLenum target, GLuint index, GLsizei count, const GLint *params); +__attribute__((visibility("default"))) void glProgramEnvParameterI4uiNV (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +__attribute__((visibility("default"))) void glProgramEnvParameterI4uivNV (GLenum target, GLuint index, const GLuint *params); +__attribute__((visibility("default"))) void glProgramEnvParametersI4uivNV (GLenum target, GLuint index, GLsizei count, const GLuint *params); +__attribute__((visibility("default"))) void glGetProgramLocalParameterIivNV (GLenum target, GLuint index, GLint *params); +__attribute__((visibility("default"))) void glGetProgramLocalParameterIuivNV (GLenum target, GLuint index, GLuint *params); +__attribute__((visibility("default"))) void glGetProgramEnvParameterIivNV (GLenum target, GLuint index, GLint *params); +__attribute__((visibility("default"))) void glGetProgramEnvParameterIuivNV (GLenum target, GLuint index, GLuint *params); +typedef void ( * PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void ( * PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); +typedef void ( * PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void ( * PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void ( * PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); +typedef void ( * PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void ( * PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void ( * PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint *params); +typedef void ( * PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void ( * PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void ( * PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint *params); +typedef void ( * PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void ( * PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); +typedef void ( * PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); +typedef void ( * PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint *params); +typedef void ( * PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint *params); +__attribute__((visibility("default"))) void glProgramVertexLimitNV (GLenum target, GLint limit); +__attribute__((visibility("default"))) void glFramebufferTextureEXT (GLenum target, GLenum attachment, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glFramebufferTextureLayerEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +__attribute__((visibility("default"))) void glFramebufferTextureFaceEXT (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +typedef void ( * PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit); +typedef void ( * PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void ( * PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void ( * PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +__attribute__((visibility("default"))) void glProgramParameteriEXT (GLuint program, GLenum pname, GLint value); +typedef void ( * PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value); +__attribute__((visibility("default"))) void glVertexAttribI1iEXT (GLuint index, GLint x); +__attribute__((visibility("default"))) void glVertexAttribI2iEXT (GLuint index, GLint x, GLint y); +__attribute__((visibility("default"))) void glVertexAttribI3iEXT (GLuint index, GLint x, GLint y, GLint z); +__attribute__((visibility("default"))) void glVertexAttribI4iEXT (GLuint index, GLint x, GLint y, GLint z, GLint w); +__attribute__((visibility("default"))) void glVertexAttribI1uiEXT (GLuint index, GLuint x); +__attribute__((visibility("default"))) void glVertexAttribI2uiEXT (GLuint index, GLuint x, GLuint y); +__attribute__((visibility("default"))) void glVertexAttribI3uiEXT (GLuint index, GLuint x, GLuint y, GLuint z); +__attribute__((visibility("default"))) void glVertexAttribI4uiEXT (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +__attribute__((visibility("default"))) void glVertexAttribI1ivEXT (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttribI2ivEXT (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttribI3ivEXT (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttribI4ivEXT (GLuint index, const GLint *v); +__attribute__((visibility("default"))) void glVertexAttribI1uivEXT (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttribI2uivEXT (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttribI3uivEXT (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttribI4uivEXT (GLuint index, const GLuint *v); +__attribute__((visibility("default"))) void glVertexAttribI4bvEXT (GLuint index, const GLbyte *v); +__attribute__((visibility("default"))) void glVertexAttribI4svEXT (GLuint index, const GLshort *v); +__attribute__((visibility("default"))) void glVertexAttribI4ubvEXT (GLuint index, const GLubyte *v); +__attribute__((visibility("default"))) void glVertexAttribI4usvEXT (GLuint index, const GLushort *v); +__attribute__((visibility("default"))) void glVertexAttribIPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glGetVertexAttribIivEXT (GLuint index, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVertexAttribIuivEXT (GLuint index, GLenum pname, GLuint *params); +typedef void ( * PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x); +typedef void ( * PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y); +typedef void ( * PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z); +typedef void ( * PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void ( * PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x); +typedef void ( * PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y); +typedef void ( * PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z); +typedef void ( * PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void ( * PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint *v); +typedef void ( * PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint *v); +typedef void ( * PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte *v); +typedef void ( * PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort *v); +typedef void ( * PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte *v); +typedef void ( * PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort *v); +typedef void ( * PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glGetUniformuivEXT (GLuint program, GLint location, GLuint *params); +__attribute__((visibility("default"))) void glBindFragDataLocationEXT (GLuint program, GLuint color, const GLchar *name); +__attribute__((visibility("default"))) GLint glGetFragDataLocationEXT (GLuint program, const GLchar *name); +__attribute__((visibility("default"))) void glUniform1uiEXT (GLint location, GLuint v0); +__attribute__((visibility("default"))) void glUniform2uiEXT (GLint location, GLuint v0, GLuint v1); +__attribute__((visibility("default"))) void glUniform3uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2); +__attribute__((visibility("default"))) void glUniform4uiEXT (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +__attribute__((visibility("default"))) void glUniform1uivEXT (GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glUniform2uivEXT (GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glUniform3uivEXT (GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glUniform4uivEXT (GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint *params); +typedef void ( * PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar *name); +typedef GLint ( * PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar *name); +typedef void ( * PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0); +typedef void ( * PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1); +typedef void ( * PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void ( * PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void ( * PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount); +__attribute__((visibility("default"))) void glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +typedef void ( * PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount); +typedef void ( * PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); +__attribute__((visibility("default"))) void glTexBufferEXT (GLenum target, GLenum internalformat, GLuint buffer); +typedef void ( * PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer); +__attribute__((visibility("default"))) void glDepthRangedNV (GLdouble zNear, GLdouble zFar); +__attribute__((visibility("default"))) void glClearDepthdNV (GLdouble depth); +__attribute__((visibility("default"))) void glDepthBoundsdNV (GLdouble zmin, GLdouble zmax); +typedef void ( * PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar); +typedef void ( * PFNGLCLEARDEPTHDNVPROC) (GLdouble depth); +typedef void ( * PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax); +__attribute__((visibility("default"))) void glRenderbufferStorageMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void ( * PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glProgramBufferParametersfvNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params); +__attribute__((visibility("default"))) void glProgramBufferParametersIivNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params); +__attribute__((visibility("default"))) void glProgramBufferParametersIuivNV (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params); +typedef void ( * PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat *params); +typedef void ( * PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint *params); +typedef void ( * PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint *params); +__attribute__((visibility("default"))) void glColorMaskIndexedEXT (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +__attribute__((visibility("default"))) void glGetBooleanIndexedvEXT (GLenum target, GLuint index, GLboolean *data); +__attribute__((visibility("default"))) void glGetIntegerIndexedvEXT (GLenum target, GLuint index, GLint *data); +__attribute__((visibility("default"))) void glEnableIndexedEXT (GLenum target, GLuint index); +__attribute__((visibility("default"))) void glDisableIndexedEXT (GLenum target, GLuint index); +__attribute__((visibility("default"))) GLboolean glIsEnabledIndexedEXT (GLenum target, GLuint index); +typedef void ( * PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +typedef void ( * PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean *data); +typedef void ( * PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint *data); +typedef void ( * PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index); +typedef void ( * PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index); +typedef GLboolean ( * PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index); +__attribute__((visibility("default"))) void glBeginTransformFeedbackNV (GLenum primitiveMode); +__attribute__((visibility("default"))) void glEndTransformFeedbackNV (void); +__attribute__((visibility("default"))) void glTransformFeedbackAttribsNV (GLuint count, const GLint *attribs, GLenum bufferMode); +__attribute__((visibility("default"))) void glBindBufferRangeNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +__attribute__((visibility("default"))) void glBindBufferOffsetNV (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +__attribute__((visibility("default"))) void glBindBufferBaseNV (GLenum target, GLuint index, GLuint buffer); +__attribute__((visibility("default"))) void glTransformFeedbackVaryingsNV (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); +__attribute__((visibility("default"))) void glActiveVaryingNV (GLuint program, const GLchar *name); +__attribute__((visibility("default"))) GLint glGetVaryingLocationNV (GLuint program, const GLchar *name); +__attribute__((visibility("default"))) void glGetActiveVaryingNV (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +__attribute__((visibility("default"))) void glGetTransformFeedbackVaryingNV (GLuint program, GLuint index, GLint *location); +__attribute__((visibility("default"))) void glTransformFeedbackStreamAttribsNV (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode); +typedef void ( * PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode); +typedef void ( * PFNGLENDTRANSFORMFEEDBACKNVPROC) (void); +typedef void ( * PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint *attribs, GLenum bufferMode); +typedef void ( * PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void ( * PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +typedef void ( * PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void ( * PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint *locations, GLenum bufferMode); +typedef void ( * PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar *name); +typedef GLint ( * PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar *name); +typedef void ( * PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +typedef void ( * PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint *location); +typedef void ( * PFNGLTRANSFORMFEEDBACKSTREAMATTRIBSNVPROC) (GLsizei count, const GLint *attribs, GLsizei nbuffers, const GLint *bufstreams, GLenum bufferMode); +__attribute__((visibility("default"))) void glUniformBufferEXT (GLuint program, GLint location, GLuint buffer); +__attribute__((visibility("default"))) GLint glGetUniformBufferSizeEXT (GLuint program, GLint location); +__attribute__((visibility("default"))) GLintptr glGetUniformOffsetEXT (GLuint program, GLint location); +typedef void ( * PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer); +typedef GLint ( * PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location); +typedef GLintptr ( * PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location); +__attribute__((visibility("default"))) void glTexParameterIivEXT (GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glTexParameterIuivEXT (GLenum target, GLenum pname, const GLuint *params); +__attribute__((visibility("default"))) void glGetTexParameterIivEXT (GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetTexParameterIuivEXT (GLenum target, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glClearColorIiEXT (GLint red, GLint green, GLint blue, GLint alpha); +__attribute__((visibility("default"))) void glClearColorIuiEXT (GLuint red, GLuint green, GLuint blue, GLuint alpha); +typedef void ( * PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint *params); +typedef void ( * PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint *params); +typedef void ( * PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha); +typedef void ( * PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha); +__attribute__((visibility("default"))) void glFrameTerminatorGREMEDY (void); +typedef void ( * PFNGLFRAMETERMINATORGREMEDYPROC) (void); +__attribute__((visibility("default"))) void glBeginConditionalRenderNV (GLuint id, GLenum mode); +__attribute__((visibility("default"))) void glEndConditionalRenderNV (void); +typedef void ( * PFNGLBEGINCONDITIONALRENDERNVPROC) (GLuint id, GLenum mode); +typedef void ( * PFNGLENDCONDITIONALRENDERNVPROC) (void); +__attribute__((visibility("default"))) void glPresentFrameKeyedNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1); +__attribute__((visibility("default"))) void glPresentFrameDualFillNV (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3); +__attribute__((visibility("default"))) void glGetVideoivNV (GLuint video_slot, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVideouivNV (GLuint video_slot, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glGetVideoi64vNV (GLuint video_slot, GLenum pname, GLint64EXT *params); +__attribute__((visibility("default"))) void glGetVideoui64vNV (GLuint video_slot, GLenum pname, GLuint64EXT *params); +typedef void ( * PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1); +typedef void ( * PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3); +typedef void ( * PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params); +typedef void ( * PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params); +typedef void ( * PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT *params); +__attribute__((visibility("default"))) void glBeginTransformFeedbackEXT (GLenum primitiveMode); +__attribute__((visibility("default"))) void glEndTransformFeedbackEXT (void); +__attribute__((visibility("default"))) void glBindBufferRangeEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +__attribute__((visibility("default"))) void glBindBufferOffsetEXT (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +__attribute__((visibility("default"))) void glBindBufferBaseEXT (GLenum target, GLuint index, GLuint buffer); +__attribute__((visibility("default"))) void glTransformFeedbackVaryingsEXT (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); +__attribute__((visibility("default"))) void glGetTransformFeedbackVaryingEXT (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +typedef void ( * PFNGLBEGINTRANSFORMFEEDBACKEXTPROC) (GLenum primitiveMode); +typedef void ( * PFNGLENDTRANSFORMFEEDBACKEXTPROC) (void); +typedef void ( * PFNGLBINDBUFFERRANGEEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void ( * PFNGLBINDBUFFEROFFSETEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +typedef void ( * PFNGLBINDBUFFERBASEEXTPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void ( * PFNGLTRANSFORMFEEDBACKVARYINGSEXTPROC) (GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode); +typedef void ( * PFNGLGETTRANSFORMFEEDBACKVARYINGEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); +__attribute__((visibility("default"))) void glClientAttribDefaultEXT (GLbitfield mask); +__attribute__((visibility("default"))) void glPushClientAttribDefaultEXT (GLbitfield mask); +__attribute__((visibility("default"))) void glMatrixLoadfEXT (GLenum mode, const GLfloat *m); +__attribute__((visibility("default"))) void glMatrixLoaddEXT (GLenum mode, const GLdouble *m); +__attribute__((visibility("default"))) void glMatrixMultfEXT (GLenum mode, const GLfloat *m); +__attribute__((visibility("default"))) void glMatrixMultdEXT (GLenum mode, const GLdouble *m); +__attribute__((visibility("default"))) void glMatrixLoadIdentityEXT (GLenum mode); +__attribute__((visibility("default"))) void glMatrixRotatefEXT (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glMatrixRotatedEXT (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glMatrixScalefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glMatrixScaledEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glMatrixTranslatefEXT (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +__attribute__((visibility("default"))) void glMatrixTranslatedEXT (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glMatrixFrustumEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +__attribute__((visibility("default"))) void glMatrixOrthoEXT (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +__attribute__((visibility("default"))) void glMatrixPopEXT (GLenum mode); +__attribute__((visibility("default"))) void glMatrixPushEXT (GLenum mode); +__attribute__((visibility("default"))) void glMatrixLoadTransposefEXT (GLenum mode, const GLfloat *m); +__attribute__((visibility("default"))) void glMatrixLoadTransposedEXT (GLenum mode, const GLdouble *m); +__attribute__((visibility("default"))) void glMatrixMultTransposefEXT (GLenum mode, const GLfloat *m); +__attribute__((visibility("default"))) void glMatrixMultTransposedEXT (GLenum mode, const GLdouble *m); +__attribute__((visibility("default"))) void glTextureParameterfEXT (GLuint texture, GLenum target, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glTextureParameteriEXT (GLuint texture, GLenum target, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glCopyTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +__attribute__((visibility("default"))) void glCopyTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +__attribute__((visibility("default"))) void glCopyTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glCopyTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glGetTextureImageEXT (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +__attribute__((visibility("default"))) void glGetTextureParameterfvEXT (GLuint texture, GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetTextureParameterivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetTextureLevelParameterfvEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetTextureLevelParameterivEXT (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glCopyTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glMultiTexParameterfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glMultiTexParameteriEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glCopyMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +__attribute__((visibility("default"))) void glCopyMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +__attribute__((visibility("default"))) void glCopyMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +__attribute__((visibility("default"))) void glCopyMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glGetMultiTexImageEXT (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +__attribute__((visibility("default"))) void glGetMultiTexParameterfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetMultiTexParameterivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetMultiTexLevelParameterfvEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetMultiTexLevelParameterivEXT (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +__attribute__((visibility("default"))) void glCopyMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glBindMultiTextureEXT (GLenum texunit, GLenum target, GLuint texture); +__attribute__((visibility("default"))) void glEnableClientStateIndexedEXT (GLenum array, GLuint index); +__attribute__((visibility("default"))) void glDisableClientStateIndexedEXT (GLenum array, GLuint index); +__attribute__((visibility("default"))) void glMultiTexCoordPointerEXT (GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glMultiTexEnvfEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glMultiTexEnviEXT (GLenum texunit, GLenum target, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glMultiTexGendEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); +__attribute__((visibility("default"))) void glMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); +__attribute__((visibility("default"))) void glMultiTexGenfEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); +__attribute__((visibility("default"))) void glMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glMultiTexGeniEXT (GLenum texunit, GLenum coord, GLenum pname, GLint param); +__attribute__((visibility("default"))) void glMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glGetMultiTexEnvfvEXT (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetMultiTexEnvivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetMultiTexGendvEXT (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) void glGetMultiTexGenfvEXT (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetMultiTexGenivEXT (GLenum texunit, GLenum coord, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetFloatIndexedvEXT (GLenum target, GLuint index, GLfloat *data); +__attribute__((visibility("default"))) void glGetDoubleIndexedvEXT (GLenum target, GLuint index, GLdouble *data); +__attribute__((visibility("default"))) void glGetPointerIndexedvEXT (GLenum target, GLuint index, GLvoid* *data); +__attribute__((visibility("default"))) void glCompressedTextureImage3DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedTextureImage2DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedTextureImage1DEXT (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedTextureSubImage3DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedTextureSubImage2DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedTextureSubImage1DEXT (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glGetCompressedTextureImageEXT (GLuint texture, GLenum target, GLint lod, GLvoid *img); +__attribute__((visibility("default"))) void glCompressedMultiTexImage3DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedMultiTexImage2DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedMultiTexImage1DEXT (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedMultiTexSubImage3DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedMultiTexSubImage2DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glCompressedMultiTexSubImage1DEXT (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); +__attribute__((visibility("default"))) void glGetCompressedMultiTexImageEXT (GLenum texunit, GLenum target, GLint lod, GLvoid *img); +__attribute__((visibility("default"))) void glNamedProgramStringEXT (GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid *string); +__attribute__((visibility("default"))) void glNamedProgramLocalParameter4dEXT (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glNamedProgramLocalParameter4dvEXT (GLuint program, GLenum target, GLuint index, const GLdouble *params); +__attribute__((visibility("default"))) void glNamedProgramLocalParameter4fEXT (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +__attribute__((visibility("default"))) void glNamedProgramLocalParameter4fvEXT (GLuint program, GLenum target, GLuint index, const GLfloat *params); +__attribute__((visibility("default"))) void glGetNamedProgramLocalParameterdvEXT (GLuint program, GLenum target, GLuint index, GLdouble *params); +__attribute__((visibility("default"))) void glGetNamedProgramLocalParameterfvEXT (GLuint program, GLenum target, GLuint index, GLfloat *params); +__attribute__((visibility("default"))) void glGetNamedProgramivEXT (GLuint program, GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetNamedProgramStringEXT (GLuint program, GLenum target, GLenum pname, GLvoid *string); +__attribute__((visibility("default"))) void glNamedProgramLocalParameters4fvEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); +__attribute__((visibility("default"))) void glNamedProgramLocalParameterI4iEXT (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +__attribute__((visibility("default"))) void glNamedProgramLocalParameterI4ivEXT (GLuint program, GLenum target, GLuint index, const GLint *params); +__attribute__((visibility("default"))) void glNamedProgramLocalParametersI4ivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); +__attribute__((visibility("default"))) void glNamedProgramLocalParameterI4uiEXT (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +__attribute__((visibility("default"))) void glNamedProgramLocalParameterI4uivEXT (GLuint program, GLenum target, GLuint index, const GLuint *params); +__attribute__((visibility("default"))) void glNamedProgramLocalParametersI4uivEXT (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); +__attribute__((visibility("default"))) void glGetNamedProgramLocalParameterIivEXT (GLuint program, GLenum target, GLuint index, GLint *params); +__attribute__((visibility("default"))) void glGetNamedProgramLocalParameterIuivEXT (GLuint program, GLenum target, GLuint index, GLuint *params); +__attribute__((visibility("default"))) void glTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, const GLuint *params); +__attribute__((visibility("default"))) void glGetTextureParameterIivEXT (GLuint texture, GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetTextureParameterIuivEXT (GLuint texture, GLenum target, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); +__attribute__((visibility("default"))) void glGetMultiTexParameterIivEXT (GLenum texunit, GLenum target, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetMultiTexParameterIuivEXT (GLenum texunit, GLenum target, GLenum pname, GLuint *params); +__attribute__((visibility("default"))) void glProgramUniform1fEXT (GLuint program, GLint location, GLfloat v0); +__attribute__((visibility("default"))) void glProgramUniform2fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1); +__attribute__((visibility("default"))) void glProgramUniform3fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +__attribute__((visibility("default"))) void glProgramUniform4fEXT (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +__attribute__((visibility("default"))) void glProgramUniform1iEXT (GLuint program, GLint location, GLint v0); +__attribute__((visibility("default"))) void glProgramUniform2iEXT (GLuint program, GLint location, GLint v0, GLint v1); +__attribute__((visibility("default"))) void glProgramUniform3iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +__attribute__((visibility("default"))) void glProgramUniform4iEXT (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +__attribute__((visibility("default"))) void glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4x2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3x4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4x3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +__attribute__((visibility("default"))) void glProgramUniform1uiEXT (GLuint program, GLint location, GLuint v0); +__attribute__((visibility("default"))) void glProgramUniform2uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1); +__attribute__((visibility("default"))) void glProgramUniform3uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +__attribute__((visibility("default"))) void glProgramUniform4uiEXT (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +__attribute__((visibility("default"))) void glProgramUniform1uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glProgramUniform2uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glProgramUniform3uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glProgramUniform4uivEXT (GLuint program, GLint location, GLsizei count, const GLuint *value); +__attribute__((visibility("default"))) void glNamedBufferDataEXT (GLuint buffer, GLsizeiptr size, const GLvoid *data, GLenum usage); +__attribute__((visibility("default"))) void glNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data); +__attribute__((visibility("default"))) GLvoid* glMapNamedBufferEXT (GLuint buffer, GLenum access); +__attribute__((visibility("default"))) GLboolean glUnmapNamedBufferEXT (GLuint buffer); +__attribute__((visibility("default"))) GLvoid* glMapNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +__attribute__((visibility("default"))) void glFlushMappedNamedBufferRangeEXT (GLuint buffer, GLintptr offset, GLsizeiptr length); +__attribute__((visibility("default"))) void glNamedCopyBufferSubDataEXT (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +__attribute__((visibility("default"))) void glGetNamedBufferParameterivEXT (GLuint buffer, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetNamedBufferPointervEXT (GLuint buffer, GLenum pname, GLvoid* *params); +__attribute__((visibility("default"))) void glGetNamedBufferSubDataEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data); +__attribute__((visibility("default"))) void glTextureBufferEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); +__attribute__((visibility("default"))) void glMultiTexBufferEXT (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); +__attribute__((visibility("default"))) void glNamedRenderbufferStorageEXT (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glGetNamedRenderbufferParameterivEXT (GLuint renderbuffer, GLenum pname, GLint *params); +__attribute__((visibility("default"))) GLenum glCheckNamedFramebufferStatusEXT (GLuint framebuffer, GLenum target); +__attribute__((visibility("default"))) void glNamedFramebufferTexture1DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glNamedFramebufferTexture2DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glNamedFramebufferTexture3DEXT (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +__attribute__((visibility("default"))) void glNamedFramebufferRenderbufferEXT (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +__attribute__((visibility("default"))) void glGetNamedFramebufferAttachmentParameterivEXT (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGenerateTextureMipmapEXT (GLuint texture, GLenum target); +__attribute__((visibility("default"))) void glGenerateMultiTexMipmapEXT (GLenum texunit, GLenum target); +__attribute__((visibility("default"))) void glFramebufferDrawBufferEXT (GLuint framebuffer, GLenum mode); +__attribute__((visibility("default"))) void glFramebufferDrawBuffersEXT (GLuint framebuffer, GLsizei n, const GLenum *bufs); +__attribute__((visibility("default"))) void glFramebufferReadBufferEXT (GLuint framebuffer, GLenum mode); +__attribute__((visibility("default"))) void glGetFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glNamedRenderbufferStorageMultisampleEXT (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glNamedRenderbufferStorageMultisampleCoverageEXT (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +__attribute__((visibility("default"))) void glNamedFramebufferTextureEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +__attribute__((visibility("default"))) void glNamedFramebufferTextureLayerEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +__attribute__((visibility("default"))) void glNamedFramebufferTextureFaceEXT (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); +__attribute__((visibility("default"))) void glTextureRenderbufferEXT (GLuint texture, GLenum target, GLuint renderbuffer); +__attribute__((visibility("default"))) void glMultiTexRenderbufferEXT (GLenum texunit, GLenum target, GLuint renderbuffer); +__attribute__((visibility("default"))) void glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x); +__attribute__((visibility("default"))) void glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); +typedef void ( * PFNGLPUSHCLIENTATTRIBDEFAULTEXTPROC) (GLbitfield mask); +typedef void ( * PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void ( * PFNGLMATRIXLOADDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void ( * PFNGLMATRIXMULTFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void ( * PFNGLMATRIXMULTDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void ( * PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode); +typedef void ( * PFNGLMATRIXROTATEFEXTPROC) (GLenum mode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLMATRIXROTATEDEXTPROC) (GLenum mode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLMATRIXSCALEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLMATRIXSCALEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLMATRIXTRANSLATEFEXTPROC) (GLenum mode, GLfloat x, GLfloat y, GLfloat z); +typedef void ( * PFNGLMATRIXTRANSLATEDEXTPROC) (GLenum mode, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLMATRIXFRUSTUMEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +typedef void ( * PFNGLMATRIXORTHOEXTPROC) (GLenum mode, GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +typedef void ( * PFNGLMATRIXPOPEXTPROC) (GLenum mode); +typedef void ( * PFNGLMATRIXPUSHEXTPROC) (GLenum mode); +typedef void ( * PFNGLMATRIXLOADTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void ( * PFNGLMATRIXLOADTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void ( * PFNGLMATRIXMULTTRANSPOSEFEXTPROC) (GLenum mode, const GLfloat *m); +typedef void ( * PFNGLMATRIXMULTTRANSPOSEDEXTPROC) (GLenum mode, const GLdouble *m); +typedef void ( * PFNGLTEXTUREPARAMETERFEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param); +typedef void ( * PFNGLTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLTEXTUREPARAMETERIEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param); +typedef void ( * PFNGLTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLCOPYTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void ( * PFNGLCOPYTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void ( * PFNGLCOPYTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLCOPYTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void ( * PFNGLGETTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +typedef void ( * PFNGLGETTEXTUREPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETTEXTUREPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETTEXTURELEVELPARAMETERFVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETTEXTURELEVELPARAMETERIVEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint *params); +typedef void ( * PFNGLTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLCOPYTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void ( * PFNGLMULTITEXPARAMETERFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +typedef void ( * PFNGLMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLMULTITEXPARAMETERIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); +typedef void ( * PFNGLMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLCOPYMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void ( * PFNGLCOPYMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void ( * PFNGLCOPYMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void ( * PFNGLCOPYMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void ( * PFNGLGETMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels); +typedef void ( * PFNGLGETMULTITEXPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETMULTITEXPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETMULTITEXLEVELPARAMETERFVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETMULTITEXLEVELPARAMETERIVEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint *params); +typedef void ( * PFNGLMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); +typedef void ( * PFNGLCOPYMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void ( * PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture); +typedef void ( * PFNGLENABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); +typedef void ( * PFNGLDISABLECLIENTSTATEINDEXEDEXTPROC) (GLenum array, GLuint index); +typedef void ( * PFNGLMULTITEXCOORDPOINTEREXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLMULTITEXENVFEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +typedef void ( * PFNGLMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLMULTITEXENVIEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); +typedef void ( * PFNGLMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLMULTITEXGENDEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); +typedef void ( * PFNGLMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble *params); +typedef void ( * PFNGLMULTITEXGENFEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); +typedef void ( * PFNGLMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLMULTITEXGENIEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param); +typedef void ( * PFNGLMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint *params); +typedef void ( * PFNGLGETMULTITEXENVFVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETMULTITEXENVIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETMULTITEXGENDVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble *params); +typedef void ( * PFNGLGETMULTITEXGENFVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETMULTITEXGENIVEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint *params); +typedef void ( * PFNGLGETFLOATINDEXEDVEXTPROC) (GLenum target, GLuint index, GLfloat *data); +typedef void ( * PFNGLGETDOUBLEINDEXEDVEXTPROC) (GLenum target, GLuint index, GLdouble *data); +typedef void ( * PFNGLGETPOINTERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLvoid* *data); +typedef void ( * PFNGLCOMPRESSEDTEXTUREIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDTEXTUREIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDTEXTUREIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDTEXTURESUBIMAGE3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDTEXTURESUBIMAGE2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDTEXTURESUBIMAGE1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLGETCOMPRESSEDTEXTUREIMAGEEXTPROC) (GLuint texture, GLenum target, GLint lod, GLvoid *img); +typedef void ( * PFNGLCOMPRESSEDMULTITEXIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDMULTITEXIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDMULTITEXIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDMULTITEXSUBIMAGE3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDMULTITEXSUBIMAGE2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLCOMPRESSEDMULTITEXSUBIMAGE1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *bits); +typedef void ( * PFNGLGETCOMPRESSEDMULTITEXIMAGEEXTPROC) (GLenum texunit, GLenum target, GLint lod, GLvoid *img); +typedef void ( * PFNGLNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid *string); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETER4DEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETER4DVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble *params); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETER4FEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETER4FVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat *params); +typedef void ( * PFNGLGETNAMEDPROGRAMLOCALPARAMETERDVEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble *params); +typedef void ( * PFNGLGETNAMEDPROGRAMLOCALPARAMETERFVEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat *params); +typedef void ( * PFNGLGETNAMEDPROGRAMIVEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETNAMEDPROGRAMSTRINGEXTPROC) (GLuint program, GLenum target, GLenum pname, GLvoid *string); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETERS4FVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat *params); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETERI4IEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETERI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint *params); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETERSI4IVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint *params); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETERI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint *params); +typedef void ( * PFNGLNAMEDPROGRAMLOCALPARAMETERSI4UIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint *params); +typedef void ( * PFNGLGETNAMEDPROGRAMLOCALPARAMETERIIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLint *params); +typedef void ( * PFNGLGETNAMEDPROGRAMLOCALPARAMETERIUIVEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint *params); +typedef void ( * PFNGLTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint *params); +typedef void ( * PFNGLGETTEXTUREPARAMETERIIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETTEXTUREPARAMETERIUIVEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint *params); +typedef void ( * PFNGLMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint *params); +typedef void ( * PFNGLMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint *params); +typedef void ( * PFNGLGETMULTITEXPARAMETERIIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint *params); +typedef void ( * PFNGLGETMULTITEXPARAMETERIUIVEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint *params); +typedef void ( * PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat v0); +typedef void ( * PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef void ( * PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void ( * PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void ( * PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint v0); +typedef void ( * PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef void ( * PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void ( * PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void ( * PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4X2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3X4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4X3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); +typedef void ( * PFNGLPROGRAMUNIFORM1UIEXTPROC) (GLuint program, GLint location, GLuint v0); +typedef void ( * PFNGLPROGRAMUNIFORM2UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); +typedef void ( * PFNGLPROGRAMUNIFORM3UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void ( * PFNGLPROGRAMUNIFORM4UIEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void ( * PFNGLPROGRAMUNIFORM1UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLPROGRAMUNIFORM2UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLPROGRAMUNIFORM3UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLPROGRAMUNIFORM4UIVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); +typedef void ( * PFNGLNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLsizeiptr size, const GLvoid *data, GLenum usage); +typedef void ( * PFNGLNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid *data); +typedef GLvoid* ( * PFNGLMAPNAMEDBUFFEREXTPROC) (GLuint buffer, GLenum access); +typedef GLboolean ( * PFNGLUNMAPNAMEDBUFFEREXTPROC) (GLuint buffer); +typedef GLvoid* ( * PFNGLMAPNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void ( * PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); +typedef void ( * PFNGLNAMEDCOPYBUFFERSUBDATAEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void ( * PFNGLGETNAMEDBUFFERPARAMETERIVEXTPROC) (GLuint buffer, GLenum pname, GLint *params); +typedef void ( * PFNGLGETNAMEDBUFFERPOINTERVEXTPROC) (GLuint buffer, GLenum pname, GLvoid* *params); +typedef void ( * PFNGLGETNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid *data); +typedef void ( * PFNGLTEXTUREBUFFEREXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); +typedef void ( * PFNGLMULTITEXBUFFEREXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); +typedef void ( * PFNGLNAMEDRENDERBUFFERSTORAGEEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +typedef void ( * PFNGLGETNAMEDRENDERBUFFERPARAMETERIVEXTPROC) (GLuint renderbuffer, GLenum pname, GLint *params); +typedef GLenum ( * PFNGLCHECKNAMEDFRAMEBUFFERSTATUSEXTPROC) (GLuint framebuffer, GLenum target); +typedef void ( * PFNGLNAMEDFRAMEBUFFERTEXTURE1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void ( * PFNGLNAMEDFRAMEBUFFERTEXTURE2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void ( * PFNGLNAMEDFRAMEBUFFERTEXTURE3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void ( * PFNGLNAMEDFRAMEBUFFERRENDERBUFFEREXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void ( * PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params); +typedef void ( * PFNGLGENERATETEXTUREMIPMAPEXTPROC) (GLuint texture, GLenum target); +typedef void ( * PFNGLGENERATEMULTITEXMIPMAPEXTPROC) (GLenum texunit, GLenum target); +typedef void ( * PFNGLFRAMEBUFFERDRAWBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); +typedef void ( * PFNGLFRAMEBUFFERDRAWBUFFERSEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs); +typedef void ( * PFNGLFRAMEBUFFERREADBUFFEREXTPROC) (GLuint framebuffer, GLenum mode); +typedef void ( * PFNGLGETFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params); +typedef void ( * PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void ( * PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLECOVERAGEEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void ( * PFNGLNAMEDFRAMEBUFFERTEXTUREEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +typedef void ( * PFNGLNAMEDFRAMEBUFFERTEXTURELAYEREXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void ( * PFNGLNAMEDFRAMEBUFFERTEXTUREFACEEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); +typedef void ( * PFNGLTEXTURERENDERBUFFEREXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer); +typedef void ( * PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer); +typedef void ( * PFNGLPROGRAMUNIFORM1DEXTPROC) (GLuint program, GLint location, GLdouble x); +typedef void ( * PFNGLPROGRAMUNIFORM2DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y); +typedef void ( * PFNGLPROGRAMUNIFORM3DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLPROGRAMUNIFORM4DEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLPROGRAMUNIFORM1DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORM2DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORM3DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORM4DVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX2X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX3X4DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4X2DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +typedef void ( * PFNGLPROGRAMUNIFORMMATRIX4X3DVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value); +__attribute__((visibility("default"))) void glGetMultisamplefvNV (GLenum pname, GLuint index, GLfloat *val); +__attribute__((visibility("default"))) void glSampleMaskIndexedNV (GLuint index, GLbitfield mask); +__attribute__((visibility("default"))) void glTexRenderbufferNV (GLenum target, GLuint renderbuffer); +typedef void ( * PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val); +typedef void ( * PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask); +typedef void ( * PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer); +__attribute__((visibility("default"))) void glBindTransformFeedbackNV (GLenum target, GLuint id); +__attribute__((visibility("default"))) void glDeleteTransformFeedbacksNV (GLsizei n, const GLuint *ids); +__attribute__((visibility("default"))) void glGenTransformFeedbacksNV (GLsizei n, GLuint *ids); +__attribute__((visibility("default"))) GLboolean glIsTransformFeedbackNV (GLuint id); +__attribute__((visibility("default"))) void glPauseTransformFeedbackNV (void); +__attribute__((visibility("default"))) void glResumeTransformFeedbackNV (void); +__attribute__((visibility("default"))) void glDrawTransformFeedbackNV (GLenum mode, GLuint id); +typedef void ( * PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id); +typedef void ( * PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids); +typedef void ( * PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids); +typedef GLboolean ( * PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id); +typedef void ( * PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void); +typedef void ( * PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void); +typedef void ( * PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id); +__attribute__((visibility("default"))) void glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups); +__attribute__((visibility("default"))) void glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); +__attribute__((visibility("default"))) void glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); +__attribute__((visibility("default"))) void glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); +__attribute__((visibility("default"))) void glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data); +__attribute__((visibility("default"))) void glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); +__attribute__((visibility("default"))) void glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); +__attribute__((visibility("default"))) void glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); +__attribute__((visibility("default"))) void glBeginPerfMonitorAMD (GLuint monitor); +__attribute__((visibility("default"))) void glEndPerfMonitorAMD (GLuint monitor); +__attribute__((visibility("default"))) void glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); +typedef void ( * PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups); +typedef void ( * PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); +typedef void ( * PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); +typedef void ( * PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); +typedef void ( * PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data); +typedef void ( * PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); +typedef void ( * PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); +typedef void ( * PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList); +typedef void ( * PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor); +typedef void ( * PFNGLENDPERFMONITORAMDPROC) (GLuint monitor); +typedef void ( * PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); +__attribute__((visibility("default"))) void glTessellationFactorAMD (GLfloat factor); +__attribute__((visibility("default"))) void glTessellationModeAMD (GLenum mode); +typedef void ( * PFNGLTESSELLATIONFACTORAMDPROC) (GLfloat factor); +typedef void ( * PFNGLTESSELLATIONMODEAMDPROC) (GLenum mode); +__attribute__((visibility("default"))) void glProvokingVertexEXT (GLenum mode); +typedef void ( * PFNGLPROVOKINGVERTEXEXTPROC) (GLenum mode); +__attribute__((visibility("default"))) void glBlendFuncIndexedAMD (GLuint buf, GLenum src, GLenum dst); +__attribute__((visibility("default"))) void glBlendFuncSeparateIndexedAMD (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +__attribute__((visibility("default"))) void glBlendEquationIndexedAMD (GLuint buf, GLenum mode); +__attribute__((visibility("default"))) void glBlendEquationSeparateIndexedAMD (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void ( * PFNGLBLENDFUNCINDEXEDAMDPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void ( * PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +typedef void ( * PFNGLBLENDEQUATIONINDEXEDAMDPROC) (GLuint buf, GLenum mode); +typedef void ( * PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +__attribute__((visibility("default"))) void glTextureRangeAPPLE (GLenum target, GLsizei length, const GLvoid *pointer); +__attribute__((visibility("default"))) void glGetTexParameterPointervAPPLE (GLenum target, GLenum pname, GLvoid* *params); +typedef void ( * PFNGLTEXTURERANGEAPPLEPROC) (GLenum target, GLsizei length, const GLvoid *pointer); +typedef void ( * PFNGLGETTEXPARAMETERPOINTERVAPPLEPROC) (GLenum target, GLenum pname, GLvoid* *params); +__attribute__((visibility("default"))) void glEnableVertexAttribAPPLE (GLuint index, GLenum pname); +__attribute__((visibility("default"))) void glDisableVertexAttribAPPLE (GLuint index, GLenum pname); +__attribute__((visibility("default"))) GLboolean glIsVertexAttribEnabledAPPLE (GLuint index, GLenum pname); +__attribute__((visibility("default"))) void glMapVertexAttrib1dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); +__attribute__((visibility("default"))) void glMapVertexAttrib1fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); +__attribute__((visibility("default"))) void glMapVertexAttrib2dAPPLE (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); +__attribute__((visibility("default"))) void glMapVertexAttrib2fAPPLE (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); +typedef void ( * PFNGLENABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname); +typedef void ( * PFNGLDISABLEVERTEXATTRIBAPPLEPROC) (GLuint index, GLenum pname); +typedef GLboolean ( * PFNGLISVERTEXATTRIBENABLEDAPPLEPROC) (GLuint index, GLenum pname); +typedef void ( * PFNGLMAPVERTEXATTRIB1DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); +typedef void ( * PFNGLMAPVERTEXATTRIB1FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); +typedef void ( * PFNGLMAPVERTEXATTRIB2DAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); +typedef void ( * PFNGLMAPVERTEXATTRIB2FAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); +__attribute__((visibility("default"))) GLenum glObjectPurgeableAPPLE (GLenum objectType, GLuint name, GLenum option); +__attribute__((visibility("default"))) GLenum glObjectUnpurgeableAPPLE (GLenum objectType, GLuint name, GLenum option); +__attribute__((visibility("default"))) void glGetObjectParameterivAPPLE (GLenum objectType, GLuint name, GLenum pname, GLint *params); +typedef GLenum ( * PFNGLOBJECTPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option); +typedef GLenum ( * PFNGLOBJECTUNPURGEABLEAPPLEPROC) (GLenum objectType, GLuint name, GLenum option); +typedef void ( * PFNGLGETOBJECTPARAMETERIVAPPLEPROC) (GLenum objectType, GLuint name, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glBeginVideoCaptureNV (GLuint video_capture_slot); +__attribute__((visibility("default"))) void glBindVideoCaptureStreamBufferNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset); +__attribute__((visibility("default"))) void glBindVideoCaptureStreamTextureNV (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture); +__attribute__((visibility("default"))) void glEndVideoCaptureNV (GLuint video_capture_slot); +__attribute__((visibility("default"))) void glGetVideoCaptureivNV (GLuint video_capture_slot, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVideoCaptureStreamivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params); +__attribute__((visibility("default"))) void glGetVideoCaptureStreamfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params); +__attribute__((visibility("default"))) void glGetVideoCaptureStreamdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) GLenum glVideoCaptureNV (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time); +__attribute__((visibility("default"))) void glVideoCaptureStreamParameterivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params); +__attribute__((visibility("default"))) void glVideoCaptureStreamParameterfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params); +__attribute__((visibility("default"))) void glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params); +typedef void ( * PFNGLBEGINVIDEOCAPTURENVPROC) (GLuint video_capture_slot); +typedef void ( * PFNGLBINDVIDEOCAPTURESTREAMBUFFERNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset); +typedef void ( * PFNGLBINDVIDEOCAPTURESTREAMTEXTURENVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture); +typedef void ( * PFNGLENDVIDEOCAPTURENVPROC) (GLuint video_capture_slot); +typedef void ( * PFNGLGETVIDEOCAPTUREIVNVPROC) (GLuint video_capture_slot, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVIDEOCAPTURESTREAMIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint *params); +typedef void ( * PFNGLGETVIDEOCAPTURESTREAMFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat *params); +typedef void ( * PFNGLGETVIDEOCAPTURESTREAMDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble *params); +typedef GLenum ( * PFNGLVIDEOCAPTURENVPROC) (GLuint video_capture_slot, GLuint *sequence_num, GLuint64EXT *capture_time); +typedef void ( * PFNGLVIDEOCAPTURESTREAMPARAMETERIVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint *params); +typedef void ( * PFNGLVIDEOCAPTURESTREAMPARAMETERFVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat *params); +typedef void ( * PFNGLVIDEOCAPTURESTREAMPARAMETERDVNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble *params); +__attribute__((visibility("default"))) void glCopyImageSubDataNV (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +typedef void ( * PFNGLCOPYIMAGESUBDATANVPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +__attribute__((visibility("default"))) void glUseShaderProgramEXT (GLenum type, GLuint program); +__attribute__((visibility("default"))) void glActiveProgramEXT (GLuint program); +__attribute__((visibility("default"))) GLuint glCreateShaderProgramEXT (GLenum type, const GLchar *string); +typedef void ( * PFNGLUSESHADERPROGRAMEXTPROC) (GLenum type, GLuint program); +typedef void ( * PFNGLACTIVEPROGRAMEXTPROC) (GLuint program); +typedef GLuint ( * PFNGLCREATESHADERPROGRAMEXTPROC) (GLenum type, const GLchar *string); +__attribute__((visibility("default"))) void glMakeBufferResidentNV (GLenum target, GLenum access); +__attribute__((visibility("default"))) void glMakeBufferNonResidentNV (GLenum target); +__attribute__((visibility("default"))) GLboolean glIsBufferResidentNV (GLenum target); +__attribute__((visibility("default"))) void glMakeNamedBufferResidentNV (GLuint buffer, GLenum access); +__attribute__((visibility("default"))) void glMakeNamedBufferNonResidentNV (GLuint buffer); +__attribute__((visibility("default"))) GLboolean glIsNamedBufferResidentNV (GLuint buffer); +__attribute__((visibility("default"))) void glGetBufferParameterui64vNV (GLenum target, GLenum pname, GLuint64EXT *params); +__attribute__((visibility("default"))) void glGetNamedBufferParameterui64vNV (GLuint buffer, GLenum pname, GLuint64EXT *params); +__attribute__((visibility("default"))) void glGetIntegerui64vNV (GLenum value, GLuint64EXT *result); +__attribute__((visibility("default"))) void glUniformui64NV (GLint location, GLuint64EXT value); +__attribute__((visibility("default"))) void glUniformui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glGetUniformui64vNV (GLuint program, GLint location, GLuint64EXT *params); +__attribute__((visibility("default"))) void glProgramUniformui64NV (GLuint program, GLint location, GLuint64EXT value); +__attribute__((visibility("default"))) void glProgramUniformui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access); +typedef void ( * PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target); +typedef GLboolean ( * PFNGLISBUFFERRESIDENTNVPROC) (GLenum target); +typedef void ( * PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access); +typedef void ( * PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer); +typedef GLboolean ( * PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer); +typedef void ( * PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params); +typedef void ( * PFNGLGETNAMEDBUFFERPARAMETERUI64VNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT *params); +typedef void ( * PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result); +typedef void ( * PFNGLUNIFORMUI64NVPROC) (GLint location, GLuint64EXT value); +typedef void ( * PFNGLUNIFORMUI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLGETUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLuint64EXT *params); +typedef void ( * PFNGLPROGRAMUNIFORMUI64NVPROC) (GLuint program, GLint location, GLuint64EXT value); +typedef void ( * PFNGLPROGRAMUNIFORMUI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glBufferAddressRangeNV (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); +__attribute__((visibility("default"))) void glVertexFormatNV (GLint size, GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glNormalFormatNV (GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glColorFormatNV (GLint size, GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glIndexFormatNV (GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glTexCoordFormatNV (GLint size, GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glEdgeFlagFormatNV (GLsizei stride); +__attribute__((visibility("default"))) void glSecondaryColorFormatNV (GLint size, GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glFogCoordFormatNV (GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glVertexAttribFormatNV (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); +__attribute__((visibility("default"))) void glVertexAttribIFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glGetIntegerui64i_vNV (GLenum value, GLuint index, GLuint64EXT *result); +typedef void ( * PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); +typedef void ( * PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void ( * PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride); +typedef void ( * PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void ( * PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride); +typedef void ( * PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void ( * PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride); +typedef void ( * PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void ( * PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride); +typedef void ( * PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); +typedef void ( * PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); +typedef void ( * PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT *result); +__attribute__((visibility("default"))) void glTextureBarrierNV (void); +typedef void ( * PFNGLTEXTUREBARRIERNVPROC) (void); +__attribute__((visibility("default"))) void glBindImageTextureEXT (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); +__attribute__((visibility("default"))) void glMemoryBarrierEXT (GLbitfield barriers); +typedef void ( * PFNGLBINDIMAGETEXTUREEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); +typedef void ( * PFNGLMEMORYBARRIEREXTPROC) (GLbitfield barriers); +__attribute__((visibility("default"))) void glVertexAttribL1dEXT (GLuint index, GLdouble x); +__attribute__((visibility("default"))) void glVertexAttribL2dEXT (GLuint index, GLdouble x, GLdouble y); +__attribute__((visibility("default"))) void glVertexAttribL3dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z); +__attribute__((visibility("default"))) void glVertexAttribL4dEXT (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +__attribute__((visibility("default"))) void glVertexAttribL1dvEXT (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribL2dvEXT (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribL3dvEXT (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribL4dvEXT (GLuint index, const GLdouble *v); +__attribute__((visibility("default"))) void glVertexAttribLPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +__attribute__((visibility("default"))) void glGetVertexAttribLdvEXT (GLuint index, GLenum pname, GLdouble *params); +__attribute__((visibility("default"))) void glVertexArrayVertexAttribLOffsetEXT (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void ( * PFNGLVERTEXATTRIBL1DEXTPROC) (GLuint index, GLdouble x); +typedef void ( * PFNGLVERTEXATTRIBL2DEXTPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void ( * PFNGLVERTEXATTRIBL3DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void ( * PFNGLVERTEXATTRIBL4DEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void ( * PFNGLVERTEXATTRIBL1DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBL2DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBL3DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBL4DVEXTPROC) (GLuint index, const GLdouble *v); +typedef void ( * PFNGLVERTEXATTRIBLPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); +typedef void ( * PFNGLGETVERTEXATTRIBLDVEXTPROC) (GLuint index, GLenum pname, GLdouble *params); +typedef void ( * PFNGLVERTEXARRAYVERTEXATTRIBLOFFSETEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); +__attribute__((visibility("default"))) void glProgramSubroutineParametersuivNV (GLenum target, GLsizei count, const GLuint *params); +__attribute__((visibility("default"))) void glGetProgramSubroutineParameteruivNV (GLenum target, GLuint index, GLuint *param); +typedef void ( * PFNGLPROGRAMSUBROUTINEPARAMETERSUIVNVPROC) (GLenum target, GLsizei count, const GLuint *params); +typedef void ( * PFNGLGETPROGRAMSUBROUTINEPARAMETERUIVNVPROC) (GLenum target, GLuint index, GLuint *param); +__attribute__((visibility("default"))) void glUniform1i64NV (GLint location, GLint64EXT x); +__attribute__((visibility("default"))) void glUniform2i64NV (GLint location, GLint64EXT x, GLint64EXT y); +__attribute__((visibility("default"))) void glUniform3i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +__attribute__((visibility("default"))) void glUniform4i64NV (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +__attribute__((visibility("default"))) void glUniform1i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +__attribute__((visibility("default"))) void glUniform2i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +__attribute__((visibility("default"))) void glUniform3i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +__attribute__((visibility("default"))) void glUniform4i64vNV (GLint location, GLsizei count, const GLint64EXT *value); +__attribute__((visibility("default"))) void glUniform1ui64NV (GLint location, GLuint64EXT x); +__attribute__((visibility("default"))) void glUniform2ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y); +__attribute__((visibility("default"))) void glUniform3ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +__attribute__((visibility("default"))) void glUniform4ui64NV (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +__attribute__((visibility("default"))) void glUniform1ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glUniform2ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glUniform3ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glUniform4ui64vNV (GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glGetUniformi64vNV (GLuint program, GLint location, GLint64EXT *params); +__attribute__((visibility("default"))) void glProgramUniform1i64NV (GLuint program, GLint location, GLint64EXT x); +__attribute__((visibility("default"))) void glProgramUniform2i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); +__attribute__((visibility("default"))) void glProgramUniform3i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +__attribute__((visibility("default"))) void glProgramUniform4i64NV (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +__attribute__((visibility("default"))) void glProgramUniform1i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +__attribute__((visibility("default"))) void glProgramUniform2i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +__attribute__((visibility("default"))) void glProgramUniform3i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +__attribute__((visibility("default"))) void glProgramUniform4i64vNV (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +__attribute__((visibility("default"))) void glProgramUniform1ui64NV (GLuint program, GLint location, GLuint64EXT x); +__attribute__((visibility("default"))) void glProgramUniform2ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); +__attribute__((visibility("default"))) void glProgramUniform3ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +__attribute__((visibility("default"))) void glProgramUniform4ui64NV (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +__attribute__((visibility("default"))) void glProgramUniform1ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glProgramUniform2ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glProgramUniform3ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glProgramUniform4ui64vNV (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLUNIFORM1I64NVPROC) (GLint location, GLint64EXT x); +typedef void ( * PFNGLUNIFORM2I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y); +typedef void ( * PFNGLUNIFORM3I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void ( * PFNGLUNIFORM4I64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void ( * PFNGLUNIFORM1I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void ( * PFNGLUNIFORM2I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void ( * PFNGLUNIFORM3I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void ( * PFNGLUNIFORM4I64VNVPROC) (GLint location, GLsizei count, const GLint64EXT *value); +typedef void ( * PFNGLUNIFORM1UI64NVPROC) (GLint location, GLuint64EXT x); +typedef void ( * PFNGLUNIFORM2UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void ( * PFNGLUNIFORM3UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void ( * PFNGLUNIFORM4UI64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void ( * PFNGLUNIFORM1UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLUNIFORM2UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLUNIFORM3UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLUNIFORM4UI64VNVPROC) (GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLGETUNIFORMI64VNVPROC) (GLuint program, GLint location, GLint64EXT *params); +typedef void ( * PFNGLPROGRAMUNIFORM1I64NVPROC) (GLuint program, GLint location, GLint64EXT x); +typedef void ( * PFNGLPROGRAMUNIFORM2I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); +typedef void ( * PFNGLPROGRAMUNIFORM3I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void ( * PFNGLPROGRAMUNIFORM4I64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void ( * PFNGLPROGRAMUNIFORM1I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void ( * PFNGLPROGRAMUNIFORM2I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void ( * PFNGLPROGRAMUNIFORM3I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void ( * PFNGLPROGRAMUNIFORM4I64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT *value); +typedef void ( * PFNGLPROGRAMUNIFORM1UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x); +typedef void ( * PFNGLPROGRAMUNIFORM2UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void ( * PFNGLPROGRAMUNIFORM3UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void ( * PFNGLPROGRAMUNIFORM4UI64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void ( * PFNGLPROGRAMUNIFORM1UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLPROGRAMUNIFORM2UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLPROGRAMUNIFORM3UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +typedef void ( * PFNGLPROGRAMUNIFORM4UI64VNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT *value); +__attribute__((visibility("default"))) void glVertexAttribL1i64NV (GLuint index, GLint64EXT x); +__attribute__((visibility("default"))) void glVertexAttribL2i64NV (GLuint index, GLint64EXT x, GLint64EXT y); +__attribute__((visibility("default"))) void glVertexAttribL3i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); +__attribute__((visibility("default"))) void glVertexAttribL4i64NV (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +__attribute__((visibility("default"))) void glVertexAttribL1i64vNV (GLuint index, const GLint64EXT *v); +__attribute__((visibility("default"))) void glVertexAttribL2i64vNV (GLuint index, const GLint64EXT *v); +__attribute__((visibility("default"))) void glVertexAttribL3i64vNV (GLuint index, const GLint64EXT *v); +__attribute__((visibility("default"))) void glVertexAttribL4i64vNV (GLuint index, const GLint64EXT *v); +__attribute__((visibility("default"))) void glVertexAttribL1ui64NV (GLuint index, GLuint64EXT x); +__attribute__((visibility("default"))) void glVertexAttribL2ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y); +__attribute__((visibility("default"))) void glVertexAttribL3ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +__attribute__((visibility("default"))) void glVertexAttribL4ui64NV (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +__attribute__((visibility("default"))) void glVertexAttribL1ui64vNV (GLuint index, const GLuint64EXT *v); +__attribute__((visibility("default"))) void glVertexAttribL2ui64vNV (GLuint index, const GLuint64EXT *v); +__attribute__((visibility("default"))) void glVertexAttribL3ui64vNV (GLuint index, const GLuint64EXT *v); +__attribute__((visibility("default"))) void glVertexAttribL4ui64vNV (GLuint index, const GLuint64EXT *v); +__attribute__((visibility("default"))) void glGetVertexAttribLi64vNV (GLuint index, GLenum pname, GLint64EXT *params); +__attribute__((visibility("default"))) void glGetVertexAttribLui64vNV (GLuint index, GLenum pname, GLuint64EXT *params); +__attribute__((visibility("default"))) void glVertexAttribLFormatNV (GLuint index, GLint size, GLenum type, GLsizei stride); +typedef void ( * PFNGLVERTEXATTRIBL1I64NVPROC) (GLuint index, GLint64EXT x); +typedef void ( * PFNGLVERTEXATTRIBL2I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y); +typedef void ( * PFNGLVERTEXATTRIBL3I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void ( * PFNGLVERTEXATTRIBL4I64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void ( * PFNGLVERTEXATTRIBL1I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void ( * PFNGLVERTEXATTRIBL2I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void ( * PFNGLVERTEXATTRIBL3I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void ( * PFNGLVERTEXATTRIBL4I64VNVPROC) (GLuint index, const GLint64EXT *v); +typedef void ( * PFNGLVERTEXATTRIBL1UI64NVPROC) (GLuint index, GLuint64EXT x); +typedef void ( * PFNGLVERTEXATTRIBL2UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y); +typedef void ( * PFNGLVERTEXATTRIBL3UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void ( * PFNGLVERTEXATTRIBL4UI64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void ( * PFNGLVERTEXATTRIBL1UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void ( * PFNGLVERTEXATTRIBL2UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void ( * PFNGLVERTEXATTRIBL3UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void ( * PFNGLVERTEXATTRIBL4UI64VNVPROC) (GLuint index, const GLuint64EXT *v); +typedef void ( * PFNGLGETVERTEXATTRIBLI64VNVPROC) (GLuint index, GLenum pname, GLint64EXT *params); +typedef void ( * PFNGLGETVERTEXATTRIBLUI64VNVPROC) (GLuint index, GLenum pname, GLuint64EXT *params); +typedef void ( * PFNGLVERTEXATTRIBLFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); +__attribute__((visibility("default"))) void glGenNamesAMD (GLenum identifier, GLuint num, GLuint *names); +__attribute__((visibility("default"))) void glDeleteNamesAMD (GLenum identifier, GLuint num, const GLuint *names); +__attribute__((visibility("default"))) GLboolean glIsNameAMD (GLenum identifier, GLuint name); +typedef void ( * PFNGLGENNAMESAMDPROC) (GLenum identifier, GLuint num, GLuint *names); +typedef void ( * PFNGLDELETENAMESAMDPROC) (GLenum identifier, GLuint num, const GLuint *names); +typedef GLboolean ( * PFNGLISNAMEAMDPROC) (GLenum identifier, GLuint name); +__attribute__((visibility("default"))) void glDebugMessageEnableAMD (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +__attribute__((visibility("default"))) void glDebugMessageInsertAMD (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); +__attribute__((visibility("default"))) void glDebugMessageCallbackAMD (GLDEBUGPROCAMD callback, GLvoid *userParam); +__attribute__((visibility("default"))) GLuint glGetDebugMessageLogAMD (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); +typedef void ( * PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); +typedef void ( * PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf); +typedef void ( * PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, GLvoid *userParam); +typedef GLuint ( * PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message); +__attribute__((visibility("default"))) void glVDPAUInitNV (const GLvoid *vdpDevice, const GLvoid *getProcAddress); +__attribute__((visibility("default"))) void glVDPAUFiniNV (void); +__attribute__((visibility("default"))) GLvdpauSurfaceNV glVDPAURegisterVideoSurfaceNV (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +__attribute__((visibility("default"))) GLvdpauSurfaceNV glVDPAURegisterOutputSurfaceNV (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +__attribute__((visibility("default"))) void glVDPAUIsSurfaceNV (GLvdpauSurfaceNV surface); +__attribute__((visibility("default"))) void glVDPAUUnregisterSurfaceNV (GLvdpauSurfaceNV surface); +__attribute__((visibility("default"))) void glVDPAUGetSurfaceivNV (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +__attribute__((visibility("default"))) void glVDPAUSurfaceAccessNV (GLvdpauSurfaceNV surface, GLenum access); +__attribute__((visibility("default"))) void glVDPAUMapSurfacesNV (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces); +__attribute__((visibility("default"))) void glVDPAUUnmapSurfacesNV (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); +typedef void ( * PFNGLVDPAUINITNVPROC) (const GLvoid *vdpDevice, const GLvoid *getProcAddress); +typedef void ( * PFNGLVDPAUFININVPROC) (void); +typedef GLvdpauSurfaceNV ( * PFNGLVDPAUREGISTERVIDEOSURFACENVPROC) (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +typedef GLvdpauSurfaceNV ( * PFNGLVDPAUREGISTEROUTPUTSURFACENVPROC) (GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames); +typedef void ( * PFNGLVDPAUISSURFACENVPROC) (GLvdpauSurfaceNV surface); +typedef void ( * PFNGLVDPAUUNREGISTERSURFACENVPROC) (GLvdpauSurfaceNV surface); +typedef void ( * PFNGLVDPAUGETSURFACEIVNVPROC) (GLvdpauSurfaceNV surface, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); +typedef void ( * PFNGLVDPAUSURFACEACCESSNVPROC) (GLvdpauSurfaceNV surface, GLenum access); +typedef void ( * PFNGLVDPAUMAPSURFACESNVPROC) (GLsizei numSurfaces, const GLvdpauSurfaceNV *surfaces); +typedef void ( * PFNGLVDPAUUNMAPSURFACESNVPROC) (GLsizei numSurface, const GLvdpauSurfaceNV *surfaces); +__attribute__((visibility("default"))) void glTexImage2DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +__attribute__((visibility("default"))) void glTexImage3DMultisampleCoverageNV (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +__attribute__((visibility("default"))) void glTextureImage2DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +__attribute__((visibility("default"))) void glTextureImage3DMultisampleNV (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +__attribute__((visibility("default"))) void glTextureImage2DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +__attribute__((visibility("default"))) void glTextureImage3DMultisampleCoverageNV (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +typedef void ( * PFNGLTEXIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void ( * PFNGLTEXIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +typedef void ( * PFNGLTEXTUREIMAGE2DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void ( * PFNGLTEXTUREIMAGE3DMULTISAMPLENVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +typedef void ( * PFNGLTEXTUREIMAGE2DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void ( * PFNGLTEXTUREIMAGE3DMULTISAMPLECOVERAGENVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +__attribute__((visibility("default"))) void glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLfloat *val); +typedef void ( * PFNGLSETMULTISAMPLEFVAMDPROC) (GLenum pname, GLuint index, const GLfloat *val); +__attribute__((visibility("default"))) GLsync glImportSyncEXT (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); +typedef GLsync ( * PFNGLIMPORTSYNCEXTPROC) (GLenum external_sync_type, GLintptr external_sync, GLbitfield flags); +__attribute__((visibility("default"))) void glMultiDrawArraysIndirectAMD (GLenum mode, const GLvoid *indirect, GLsizei primcount, GLsizei stride); +__attribute__((visibility("default"))) void glMultiDrawElementsIndirectAMD (GLenum mode, GLenum type, const GLvoid *indirect, GLsizei primcount, GLsizei stride); +typedef void ( * PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC) (GLenum mode, const GLvoid *indirect, GLsizei primcount, GLsizei stride); +typedef void ( * PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC) (GLenum mode, GLenum type, const GLvoid *indirect, GLsizei primcount, GLsizei stride); +__attribute__((visibility("default"))) GLhandleARB glCreateDebugObjectMESA (void); +__attribute__((visibility("default"))) void glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType); +__attribute__((visibility("default"))) void glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength, + GLsizei *length, GLcharARB *debugLog); +__attribute__((visibility("default"))) GLsizei glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType); +typedef void (*GLprogramcallbackMESA)(GLenum target, GLvoid *data); +__attribute__((visibility("default"))) void glProgramCallbackMESA(GLenum target, GLprogramcallbackMESA callback, GLvoid *data); +__attribute__((visibility("default"))) void glGetProgramRegisterfvMESA(GLenum target, GLsizei len, const GLubyte *name, GLfloat *v); +__attribute__((visibility("default"))) void glBlendEquationSeparateATI( GLenum modeRGB, GLenum modeA ); +typedef void ( * PFNGLBLENDEQUATIONSEPARATEATIPROC) (GLenum modeRGB, GLenum modeA); +typedef void* GLeglImageOES; +__attribute__((visibility("default"))) void glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); +__attribute__((visibility("default"))) void glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); +typedef void ( * PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); +typedef void ( * PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); +typedef int GLfixed; +typedef int GLclampx; +extern void __assert_fail (__const char *__assertion, __const char *__file, + unsigned int __line, __const char *__function) + __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, __const char *__file, + unsigned int __line, + __const char *__function) + __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); +typedef unsigned char __u_char; +typedef unsigned short int __u_short; +typedef unsigned int __u_int; +typedef unsigned long int __u_long; +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; +__extension__ typedef signed long long int __int64_t; +__extension__ typedef unsigned long long int __uint64_t; +__extension__ typedef long long int __quad_t; +__extension__ typedef unsigned long long int __u_quad_t; +__extension__ typedef __u_quad_t __dev_t; +__extension__ typedef unsigned int __uid_t; +__extension__ typedef unsigned int __gid_t; +__extension__ typedef unsigned long int __ino_t; +__extension__ typedef __u_quad_t __ino64_t; +__extension__ typedef unsigned int __mode_t; +__extension__ typedef unsigned int __nlink_t; +__extension__ typedef long int __off_t; +__extension__ typedef __quad_t __off64_t; +__extension__ typedef int __pid_t; +__extension__ typedef struct { int __val[2]; } __fsid_t; +__extension__ typedef long int __clock_t; +__extension__ typedef unsigned long int __rlim_t; +__extension__ typedef __u_quad_t __rlim64_t; +__extension__ typedef unsigned int __id_t; +__extension__ typedef long int __time_t; +__extension__ typedef unsigned int __useconds_t; +__extension__ typedef long int __suseconds_t; +__extension__ typedef int __daddr_t; +__extension__ typedef long int __swblk_t; +__extension__ typedef int __key_t; +__extension__ typedef int __clockid_t; +__extension__ typedef void * __timer_t; +__extension__ typedef long int __blksize_t; +__extension__ typedef long int __blkcnt_t; +__extension__ typedef __quad_t __blkcnt64_t; +__extension__ typedef unsigned long int __fsblkcnt_t; +__extension__ typedef __u_quad_t __fsblkcnt64_t; +__extension__ typedef unsigned long int __fsfilcnt_t; +__extension__ typedef __u_quad_t __fsfilcnt64_t; +__extension__ typedef int __ssize_t; +typedef __off64_t __loff_t; +typedef __quad_t *__qaddr_t; +typedef char *__caddr_t; +__extension__ typedef int __intptr_t; +__extension__ typedef unsigned int __socklen_t; +enum +{ + _ISupper = (1 << (0)), + _ISlower = (1 << (1)), + _ISalpha = (1 << (2)), + _ISdigit = (1 << (3)), + _ISxdigit = (1 << (4)), + _ISspace = (1 << (5)), + _ISprint = (1 << (6)), + _ISgraph = (1 << (7)), + _ISblank = (1 << (8)), + _IScntrl = (1 << (9)), + _ISpunct = (1 << (10)), + _ISalnum = (1 << (11)) +}; +extern __const unsigned short int **__ctype_b_loc (void) + __attribute__ ((__nothrow__)) __attribute__ ((__const)); +extern __const __int32_t **__ctype_tolower_loc (void) + __attribute__ ((__nothrow__)) __attribute__ ((__const)); +extern __const __int32_t **__ctype_toupper_loc (void) + __attribute__ ((__nothrow__)) __attribute__ ((__const)); +extern int isalnum (int) __attribute__ ((__nothrow__)); +extern int isalpha (int) __attribute__ ((__nothrow__)); +extern int iscntrl (int) __attribute__ ((__nothrow__)); +extern int isdigit (int) __attribute__ ((__nothrow__)); +extern int islower (int) __attribute__ ((__nothrow__)); +extern int isgraph (int) __attribute__ ((__nothrow__)); +extern int isprint (int) __attribute__ ((__nothrow__)); +extern int ispunct (int) __attribute__ ((__nothrow__)); +extern int isspace (int) __attribute__ ((__nothrow__)); +extern int isupper (int) __attribute__ ((__nothrow__)); +extern int isxdigit (int) __attribute__ ((__nothrow__)); +extern int tolower (int __c) __attribute__ ((__nothrow__)); +extern int toupper (int __c) __attribute__ ((__nothrow__)); +extern int isblank (int) __attribute__ ((__nothrow__)); +extern int isctype (int __c, int __mask) __attribute__ ((__nothrow__)); +extern int isascii (int __c) __attribute__ ((__nothrow__)); +extern int toascii (int __c) __attribute__ ((__nothrow__)); +extern int _toupper (int) __attribute__ ((__nothrow__)); +extern int _tolower (int) __attribute__ ((__nothrow__)); +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) tolower (int __c) +{ + return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c; +} +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) toupper (int __c) +{ + return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c; +} +typedef struct __locale_struct +{ + struct __locale_data *__locales[13]; + const unsigned short int *__ctype_b; + const int *__ctype_tolower; + const int *__ctype_toupper; + const char *__names[13]; +} *__locale_t; +typedef __locale_t locale_t; +extern int isalnum_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isalpha_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int iscntrl_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isdigit_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int islower_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isgraph_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isprint_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int ispunct_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isspace_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isupper_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isxdigit_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int isblank_l (int, __locale_t) __attribute__ ((__nothrow__)); +extern int __tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); +extern int tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); +extern int __toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); +extern int toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__)); +typedef float float_t; +typedef double double_t; +extern double acos (double __x) __attribute__ ((__nothrow__)); extern double __acos (double __x) __attribute__ ((__nothrow__)); +extern double asin (double __x) __attribute__ ((__nothrow__)); extern double __asin (double __x) __attribute__ ((__nothrow__)); +extern double atan (double __x) __attribute__ ((__nothrow__)); extern double __atan (double __x) __attribute__ ((__nothrow__)); +extern double atan2 (double __y, double __x) __attribute__ ((__nothrow__)); extern double __atan2 (double __y, double __x) __attribute__ ((__nothrow__)); +extern double cos (double __x) __attribute__ ((__nothrow__)); extern double __cos (double __x) __attribute__ ((__nothrow__)); +extern double sin (double __x) __attribute__ ((__nothrow__)); extern double __sin (double __x) __attribute__ ((__nothrow__)); +extern double tan (double __x) __attribute__ ((__nothrow__)); extern double __tan (double __x) __attribute__ ((__nothrow__)); +extern double cosh (double __x) __attribute__ ((__nothrow__)); extern double __cosh (double __x) __attribute__ ((__nothrow__)); +extern double sinh (double __x) __attribute__ ((__nothrow__)); extern double __sinh (double __x) __attribute__ ((__nothrow__)); +extern double tanh (double __x) __attribute__ ((__nothrow__)); extern double __tanh (double __x) __attribute__ ((__nothrow__)); +extern void sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__)); extern void __sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__)) + ; +extern double acosh (double __x) __attribute__ ((__nothrow__)); extern double __acosh (double __x) __attribute__ ((__nothrow__)); +extern double asinh (double __x) __attribute__ ((__nothrow__)); extern double __asinh (double __x) __attribute__ ((__nothrow__)); +extern double atanh (double __x) __attribute__ ((__nothrow__)); extern double __atanh (double __x) __attribute__ ((__nothrow__)); +extern double exp (double __x) __attribute__ ((__nothrow__)); extern double __exp (double __x) __attribute__ ((__nothrow__)); +extern double frexp (double __x, int *__exponent) __attribute__ ((__nothrow__)); extern double __frexp (double __x, int *__exponent) __attribute__ ((__nothrow__)); +extern double ldexp (double __x, int __exponent) __attribute__ ((__nothrow__)); extern double __ldexp (double __x, int __exponent) __attribute__ ((__nothrow__)); +extern double log (double __x) __attribute__ ((__nothrow__)); extern double __log (double __x) __attribute__ ((__nothrow__)); +extern double log10 (double __x) __attribute__ ((__nothrow__)); extern double __log10 (double __x) __attribute__ ((__nothrow__)); +extern double modf (double __x, double *__iptr) __attribute__ ((__nothrow__)); extern double __modf (double __x, double *__iptr) __attribute__ ((__nothrow__)); +extern double exp10 (double __x) __attribute__ ((__nothrow__)); extern double __exp10 (double __x) __attribute__ ((__nothrow__)); +extern double pow10 (double __x) __attribute__ ((__nothrow__)); extern double __pow10 (double __x) __attribute__ ((__nothrow__)); +extern double expm1 (double __x) __attribute__ ((__nothrow__)); extern double __expm1 (double __x) __attribute__ ((__nothrow__)); +extern double log1p (double __x) __attribute__ ((__nothrow__)); extern double __log1p (double __x) __attribute__ ((__nothrow__)); +extern double logb (double __x) __attribute__ ((__nothrow__)); extern double __logb (double __x) __attribute__ ((__nothrow__)); +extern double exp2 (double __x) __attribute__ ((__nothrow__)); extern double __exp2 (double __x) __attribute__ ((__nothrow__)); +extern double log2 (double __x) __attribute__ ((__nothrow__)); extern double __log2 (double __x) __attribute__ ((__nothrow__)); +extern double pow (double __x, double __y) __attribute__ ((__nothrow__)); extern double __pow (double __x, double __y) __attribute__ ((__nothrow__)); +extern double sqrt (double __x) __attribute__ ((__nothrow__)); extern double __sqrt (double __x) __attribute__ ((__nothrow__)); +extern double hypot (double __x, double __y) __attribute__ ((__nothrow__)); extern double __hypot (double __x, double __y) __attribute__ ((__nothrow__)); +extern double cbrt (double __x) __attribute__ ((__nothrow__)); extern double __cbrt (double __x) __attribute__ ((__nothrow__)); +extern double ceil (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __ceil (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern double fabs (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __fabs (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern double floor (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __floor (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern double fmod (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fmod (double __x, double __y) __attribute__ ((__nothrow__)); +extern int __isinf (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern int __finite (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern int isinf (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern int finite (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern double drem (double __x, double __y) __attribute__ ((__nothrow__)); extern double __drem (double __x, double __y) __attribute__ ((__nothrow__)); +extern double significand (double __x) __attribute__ ((__nothrow__)); extern double __significand (double __x) __attribute__ ((__nothrow__)); +extern double copysign (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern double nan (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __nan (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern int __isnan (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern int isnan (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern double j0 (double) __attribute__ ((__nothrow__)); extern double __j0 (double) __attribute__ ((__nothrow__)); +extern double j1 (double) __attribute__ ((__nothrow__)); extern double __j1 (double) __attribute__ ((__nothrow__)); +extern double jn (int, double) __attribute__ ((__nothrow__)); extern double __jn (int, double) __attribute__ ((__nothrow__)); +extern double y0 (double) __attribute__ ((__nothrow__)); extern double __y0 (double) __attribute__ ((__nothrow__)); +extern double y1 (double) __attribute__ ((__nothrow__)); extern double __y1 (double) __attribute__ ((__nothrow__)); +extern double yn (int, double) __attribute__ ((__nothrow__)); extern double __yn (int, double) __attribute__ ((__nothrow__)); +extern double erf (double) __attribute__ ((__nothrow__)); extern double __erf (double) __attribute__ ((__nothrow__)); +extern double erfc (double) __attribute__ ((__nothrow__)); extern double __erfc (double) __attribute__ ((__nothrow__)); +extern double lgamma (double) __attribute__ ((__nothrow__)); extern double __lgamma (double) __attribute__ ((__nothrow__)); +extern double tgamma (double) __attribute__ ((__nothrow__)); extern double __tgamma (double) __attribute__ ((__nothrow__)); +extern double gamma (double) __attribute__ ((__nothrow__)); extern double __gamma (double) __attribute__ ((__nothrow__)); +extern double lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__)); extern double __lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__)); +extern double rint (double __x) __attribute__ ((__nothrow__)); extern double __rint (double __x) __attribute__ ((__nothrow__)); +extern double nextafter (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern double nexttoward (double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern double remainder (double __x, double __y) __attribute__ ((__nothrow__)); extern double __remainder (double __x, double __y) __attribute__ ((__nothrow__)); +extern double scalbn (double __x, int __n) __attribute__ ((__nothrow__)); extern double __scalbn (double __x, int __n) __attribute__ ((__nothrow__)); +extern int ilogb (double __x) __attribute__ ((__nothrow__)); extern int __ilogb (double __x) __attribute__ ((__nothrow__)); +extern double scalbln (double __x, long int __n) __attribute__ ((__nothrow__)); extern double __scalbln (double __x, long int __n) __attribute__ ((__nothrow__)); +extern double nearbyint (double __x) __attribute__ ((__nothrow__)); extern double __nearbyint (double __x) __attribute__ ((__nothrow__)); +extern double round (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __round (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern double trunc (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern double __trunc (double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern double remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__)); extern double __remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__)); +extern long int lrint (double __x) __attribute__ ((__nothrow__)); extern long int __lrint (double __x) __attribute__ ((__nothrow__)); +extern long long int llrint (double __x) __attribute__ ((__nothrow__)); extern long long int __llrint (double __x) __attribute__ ((__nothrow__)); +extern long int lround (double __x) __attribute__ ((__nothrow__)); extern long int __lround (double __x) __attribute__ ((__nothrow__)); +extern long long int llround (double __x) __attribute__ ((__nothrow__)); extern long long int __llround (double __x) __attribute__ ((__nothrow__)); +extern double fdim (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fdim (double __x, double __y) __attribute__ ((__nothrow__)); +extern double fmax (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fmax (double __x, double __y) __attribute__ ((__nothrow__)); +extern double fmin (double __x, double __y) __attribute__ ((__nothrow__)); extern double __fmin (double __x, double __y) __attribute__ ((__nothrow__)); +extern int __fpclassify (double __value) __attribute__ ((__nothrow__)) + __attribute__ ((__const__)); +extern int __signbit (double __value) __attribute__ ((__nothrow__)) + __attribute__ ((__const__)); +extern double fma (double __x, double __y, double __z) __attribute__ ((__nothrow__)); extern double __fma (double __x, double __y, double __z) __attribute__ ((__nothrow__)); +extern double scalb (double __x, double __n) __attribute__ ((__nothrow__)); extern double __scalb (double __x, double __n) __attribute__ ((__nothrow__)); +extern float acosf (float __x) __attribute__ ((__nothrow__)); extern float __acosf (float __x) __attribute__ ((__nothrow__)); +extern float asinf (float __x) __attribute__ ((__nothrow__)); extern float __asinf (float __x) __attribute__ ((__nothrow__)); +extern float atanf (float __x) __attribute__ ((__nothrow__)); extern float __atanf (float __x) __attribute__ ((__nothrow__)); +extern float atan2f (float __y, float __x) __attribute__ ((__nothrow__)); extern float __atan2f (float __y, float __x) __attribute__ ((__nothrow__)); +extern float cosf (float __x) __attribute__ ((__nothrow__)); extern float __cosf (float __x) __attribute__ ((__nothrow__)); +extern float sinf (float __x) __attribute__ ((__nothrow__)); extern float __sinf (float __x) __attribute__ ((__nothrow__)); +extern float tanf (float __x) __attribute__ ((__nothrow__)); extern float __tanf (float __x) __attribute__ ((__nothrow__)); +extern float coshf (float __x) __attribute__ ((__nothrow__)); extern float __coshf (float __x) __attribute__ ((__nothrow__)); +extern float sinhf (float __x) __attribute__ ((__nothrow__)); extern float __sinhf (float __x) __attribute__ ((__nothrow__)); +extern float tanhf (float __x) __attribute__ ((__nothrow__)); extern float __tanhf (float __x) __attribute__ ((__nothrow__)); +extern void + sincosf + (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__)); extern void + __sincosf + (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__)) + ; +extern float acoshf (float __x) __attribute__ ((__nothrow__)); extern float __acoshf (float __x) __attribute__ ((__nothrow__)); +extern float asinhf (float __x) __attribute__ ((__nothrow__)); extern float __asinhf (float __x) __attribute__ ((__nothrow__)); +extern float atanhf (float __x) __attribute__ ((__nothrow__)); extern float __atanhf (float __x) __attribute__ ((__nothrow__)); +extern float expf (float __x) __attribute__ ((__nothrow__)); extern float __expf (float __x) __attribute__ ((__nothrow__)); +extern float frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__)); extern float __frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__)); +extern float ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__)); extern float __ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__)); +extern float logf (float __x) __attribute__ ((__nothrow__)); extern float __logf (float __x) __attribute__ ((__nothrow__)); +extern float log10f (float __x) __attribute__ ((__nothrow__)); extern float __log10f (float __x) __attribute__ ((__nothrow__)); +extern float modff (float __x, float *__iptr) __attribute__ ((__nothrow__)); extern float __modff (float __x, float *__iptr) __attribute__ ((__nothrow__)); +extern float exp10f (float __x) __attribute__ ((__nothrow__)); extern float __exp10f (float __x) __attribute__ ((__nothrow__)); +extern float pow10f (float __x) __attribute__ ((__nothrow__)); extern float __pow10f (float __x) __attribute__ ((__nothrow__)); +extern float expm1f (float __x) __attribute__ ((__nothrow__)); extern float __expm1f (float __x) __attribute__ ((__nothrow__)); +extern float log1pf (float __x) __attribute__ ((__nothrow__)); extern float __log1pf (float __x) __attribute__ ((__nothrow__)); +extern float logbf (float __x) __attribute__ ((__nothrow__)); extern float __logbf (float __x) __attribute__ ((__nothrow__)); +extern float exp2f (float __x) __attribute__ ((__nothrow__)); extern float __exp2f (float __x) __attribute__ ((__nothrow__)); +extern float log2f (float __x) __attribute__ ((__nothrow__)); extern float __log2f (float __x) __attribute__ ((__nothrow__)); +extern float powf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __powf (float __x, float __y) __attribute__ ((__nothrow__)); +extern float sqrtf (float __x) __attribute__ ((__nothrow__)); extern float __sqrtf (float __x) __attribute__ ((__nothrow__)); +extern float hypotf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __hypotf (float __x, float __y) __attribute__ ((__nothrow__)); +extern float cbrtf (float __x) __attribute__ ((__nothrow__)); extern float __cbrtf (float __x) __attribute__ ((__nothrow__)); +extern float ceilf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __ceilf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern float fabsf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __fabsf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern float floorf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __floorf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern float fmodf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fmodf (float __x, float __y) __attribute__ ((__nothrow__)); +extern int __isinff (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern int __finitef (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern int isinff (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern int finitef (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern float dremf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __dremf (float __x, float __y) __attribute__ ((__nothrow__)); +extern float significandf (float __x) __attribute__ ((__nothrow__)); extern float __significandf (float __x) __attribute__ ((__nothrow__)); +extern float copysignf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern float nanf (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern int __isnanf (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern int isnanf (float __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern float j0f (float) __attribute__ ((__nothrow__)); extern float __j0f (float) __attribute__ ((__nothrow__)); +extern float j1f (float) __attribute__ ((__nothrow__)); extern float __j1f (float) __attribute__ ((__nothrow__)); +extern float jnf (int, float) __attribute__ ((__nothrow__)); extern float __jnf (int, float) __attribute__ ((__nothrow__)); +extern float y0f (float) __attribute__ ((__nothrow__)); extern float __y0f (float) __attribute__ ((__nothrow__)); +extern float y1f (float) __attribute__ ((__nothrow__)); extern float __y1f (float) __attribute__ ((__nothrow__)); +extern float ynf (int, float) __attribute__ ((__nothrow__)); extern float __ynf (int, float) __attribute__ ((__nothrow__)); +extern float erff (float) __attribute__ ((__nothrow__)); extern float __erff (float) __attribute__ ((__nothrow__)); +extern float erfcf (float) __attribute__ ((__nothrow__)); extern float __erfcf (float) __attribute__ ((__nothrow__)); +extern float lgammaf (float) __attribute__ ((__nothrow__)); extern float __lgammaf (float) __attribute__ ((__nothrow__)); +extern float tgammaf (float) __attribute__ ((__nothrow__)); extern float __tgammaf (float) __attribute__ ((__nothrow__)); +extern float gammaf (float) __attribute__ ((__nothrow__)); extern float __gammaf (float) __attribute__ ((__nothrow__)); +extern float lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__)); extern float __lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__)); +extern float rintf (float __x) __attribute__ ((__nothrow__)); extern float __rintf (float __x) __attribute__ ((__nothrow__)); +extern float nextafterf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern float nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern float remainderf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __remainderf (float __x, float __y) __attribute__ ((__nothrow__)); +extern float scalbnf (float __x, int __n) __attribute__ ((__nothrow__)); extern float __scalbnf (float __x, int __n) __attribute__ ((__nothrow__)); +extern int ilogbf (float __x) __attribute__ ((__nothrow__)); extern int __ilogbf (float __x) __attribute__ ((__nothrow__)); +extern float scalblnf (float __x, long int __n) __attribute__ ((__nothrow__)); extern float __scalblnf (float __x, long int __n) __attribute__ ((__nothrow__)); +extern float nearbyintf (float __x) __attribute__ ((__nothrow__)); extern float __nearbyintf (float __x) __attribute__ ((__nothrow__)); +extern float roundf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __roundf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern float truncf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern float __truncf (float __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern float remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__)); extern float __remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__)); +extern long int lrintf (float __x) __attribute__ ((__nothrow__)); extern long int __lrintf (float __x) __attribute__ ((__nothrow__)); +extern long long int llrintf (float __x) __attribute__ ((__nothrow__)); extern long long int __llrintf (float __x) __attribute__ ((__nothrow__)); +extern long int lroundf (float __x) __attribute__ ((__nothrow__)); extern long int __lroundf (float __x) __attribute__ ((__nothrow__)); +extern long long int llroundf (float __x) __attribute__ ((__nothrow__)); extern long long int __llroundf (float __x) __attribute__ ((__nothrow__)); +extern float fdimf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fdimf (float __x, float __y) __attribute__ ((__nothrow__)); +extern float fmaxf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fmaxf (float __x, float __y) __attribute__ ((__nothrow__)); +extern float fminf (float __x, float __y) __attribute__ ((__nothrow__)); extern float __fminf (float __x, float __y) __attribute__ ((__nothrow__)); +extern int __fpclassifyf (float __value) __attribute__ ((__nothrow__)) + __attribute__ ((__const__)); +extern int __signbitf (float __value) __attribute__ ((__nothrow__)) + __attribute__ ((__const__)); +extern float fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__)); extern float __fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__)); +extern float scalbf (float __x, float __n) __attribute__ ((__nothrow__)); extern float __scalbf (float __x, float __n) __attribute__ ((__nothrow__)); +extern long double acosl (long double __x) __attribute__ ((__nothrow__)); extern long double __acosl (long double __x) __attribute__ ((__nothrow__)); +extern long double asinl (long double __x) __attribute__ ((__nothrow__)); extern long double __asinl (long double __x) __attribute__ ((__nothrow__)); +extern long double atanl (long double __x) __attribute__ ((__nothrow__)); extern long double __atanl (long double __x) __attribute__ ((__nothrow__)); +extern long double atan2l (long double __y, long double __x) __attribute__ ((__nothrow__)); extern long double __atan2l (long double __y, long double __x) __attribute__ ((__nothrow__)); +extern long double cosl (long double __x) __attribute__ ((__nothrow__)); extern long double __cosl (long double __x) __attribute__ ((__nothrow__)); +extern long double sinl (long double __x) __attribute__ ((__nothrow__)); extern long double __sinl (long double __x) __attribute__ ((__nothrow__)); +extern long double tanl (long double __x) __attribute__ ((__nothrow__)); extern long double __tanl (long double __x) __attribute__ ((__nothrow__)); +extern long double coshl (long double __x) __attribute__ ((__nothrow__)); extern long double __coshl (long double __x) __attribute__ ((__nothrow__)); +extern long double sinhl (long double __x) __attribute__ ((__nothrow__)); extern long double __sinhl (long double __x) __attribute__ ((__nothrow__)); +extern long double tanhl (long double __x) __attribute__ ((__nothrow__)); extern long double __tanhl (long double __x) __attribute__ ((__nothrow__)); +extern void + sincosl + (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__)); extern void + __sincosl + (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__)) + ; +extern long double acoshl (long double __x) __attribute__ ((__nothrow__)); extern long double __acoshl (long double __x) __attribute__ ((__nothrow__)); +extern long double asinhl (long double __x) __attribute__ ((__nothrow__)); extern long double __asinhl (long double __x) __attribute__ ((__nothrow__)); +extern long double atanhl (long double __x) __attribute__ ((__nothrow__)); extern long double __atanhl (long double __x) __attribute__ ((__nothrow__)); +extern long double expl (long double __x) __attribute__ ((__nothrow__)); extern long double __expl (long double __x) __attribute__ ((__nothrow__)); +extern long double frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__)); extern long double __frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__)); +extern long double ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__)); extern long double __ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__)); +extern long double logl (long double __x) __attribute__ ((__nothrow__)); extern long double __logl (long double __x) __attribute__ ((__nothrow__)); +extern long double log10l (long double __x) __attribute__ ((__nothrow__)); extern long double __log10l (long double __x) __attribute__ ((__nothrow__)); +extern long double modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__)); extern long double __modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__)); +extern long double exp10l (long double __x) __attribute__ ((__nothrow__)); extern long double __exp10l (long double __x) __attribute__ ((__nothrow__)); +extern long double pow10l (long double __x) __attribute__ ((__nothrow__)); extern long double __pow10l (long double __x) __attribute__ ((__nothrow__)); +extern long double expm1l (long double __x) __attribute__ ((__nothrow__)); extern long double __expm1l (long double __x) __attribute__ ((__nothrow__)); +extern long double log1pl (long double __x) __attribute__ ((__nothrow__)); extern long double __log1pl (long double __x) __attribute__ ((__nothrow__)); +extern long double logbl (long double __x) __attribute__ ((__nothrow__)); extern long double __logbl (long double __x) __attribute__ ((__nothrow__)); +extern long double exp2l (long double __x) __attribute__ ((__nothrow__)); extern long double __exp2l (long double __x) __attribute__ ((__nothrow__)); +extern long double log2l (long double __x) __attribute__ ((__nothrow__)); extern long double __log2l (long double __x) __attribute__ ((__nothrow__)); +extern long double powl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __powl (long double __x, long double __y) __attribute__ ((__nothrow__)); +extern long double sqrtl (long double __x) __attribute__ ((__nothrow__)); extern long double __sqrtl (long double __x) __attribute__ ((__nothrow__)); +extern long double hypotl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __hypotl (long double __x, long double __y) __attribute__ ((__nothrow__)); +extern long double cbrtl (long double __x) __attribute__ ((__nothrow__)); extern long double __cbrtl (long double __x) __attribute__ ((__nothrow__)); +extern long double ceill (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __ceill (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern long double fabsl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __fabsl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern long double floorl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __floorl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern long double fmodl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fmodl (long double __x, long double __y) __attribute__ ((__nothrow__)); +extern int __isinfl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern int __finitel (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern int isinfl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern int finitel (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern long double dreml (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __dreml (long double __x, long double __y) __attribute__ ((__nothrow__)); +extern long double significandl (long double __x) __attribute__ ((__nothrow__)); extern long double __significandl (long double __x) __attribute__ ((__nothrow__)); +extern long double copysignl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern long double nanl (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern int __isnanl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern int isnanl (long double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern long double j0l (long double) __attribute__ ((__nothrow__)); extern long double __j0l (long double) __attribute__ ((__nothrow__)); +extern long double j1l (long double) __attribute__ ((__nothrow__)); extern long double __j1l (long double) __attribute__ ((__nothrow__)); +extern long double jnl (int, long double) __attribute__ ((__nothrow__)); extern long double __jnl (int, long double) __attribute__ ((__nothrow__)); +extern long double y0l (long double) __attribute__ ((__nothrow__)); extern long double __y0l (long double) __attribute__ ((__nothrow__)); +extern long double y1l (long double) __attribute__ ((__nothrow__)); extern long double __y1l (long double) __attribute__ ((__nothrow__)); +extern long double ynl (int, long double) __attribute__ ((__nothrow__)); extern long double __ynl (int, long double) __attribute__ ((__nothrow__)); +extern long double erfl (long double) __attribute__ ((__nothrow__)); extern long double __erfl (long double) __attribute__ ((__nothrow__)); +extern long double erfcl (long double) __attribute__ ((__nothrow__)); extern long double __erfcl (long double) __attribute__ ((__nothrow__)); +extern long double lgammal (long double) __attribute__ ((__nothrow__)); extern long double __lgammal (long double) __attribute__ ((__nothrow__)); +extern long double tgammal (long double) __attribute__ ((__nothrow__)); extern long double __tgammal (long double) __attribute__ ((__nothrow__)); +extern long double gammal (long double) __attribute__ ((__nothrow__)); extern long double __gammal (long double) __attribute__ ((__nothrow__)); +extern long double lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__)); extern long double __lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__)); +extern long double rintl (long double __x) __attribute__ ((__nothrow__)); extern long double __rintl (long double __x) __attribute__ ((__nothrow__)); +extern long double nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern long double nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern long double remainderl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __remainderl (long double __x, long double __y) __attribute__ ((__nothrow__)); +extern long double scalbnl (long double __x, int __n) __attribute__ ((__nothrow__)); extern long double __scalbnl (long double __x, int __n) __attribute__ ((__nothrow__)); +extern int ilogbl (long double __x) __attribute__ ((__nothrow__)); extern int __ilogbl (long double __x) __attribute__ ((__nothrow__)); +extern long double scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__)); extern long double __scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__)); +extern long double nearbyintl (long double __x) __attribute__ ((__nothrow__)); extern long double __nearbyintl (long double __x) __attribute__ ((__nothrow__)); +extern long double roundl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __roundl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern long double truncl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); extern long double __truncl (long double __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern long double remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__)); extern long double __remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__)); +extern long int lrintl (long double __x) __attribute__ ((__nothrow__)); extern long int __lrintl (long double __x) __attribute__ ((__nothrow__)); +extern long long int llrintl (long double __x) __attribute__ ((__nothrow__)); extern long long int __llrintl (long double __x) __attribute__ ((__nothrow__)); +extern long int lroundl (long double __x) __attribute__ ((__nothrow__)); extern long int __lroundl (long double __x) __attribute__ ((__nothrow__)); +extern long long int llroundl (long double __x) __attribute__ ((__nothrow__)); extern long long int __llroundl (long double __x) __attribute__ ((__nothrow__)); +extern long double fdiml (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fdiml (long double __x, long double __y) __attribute__ ((__nothrow__)); +extern long double fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__)); +extern long double fminl (long double __x, long double __y) __attribute__ ((__nothrow__)); extern long double __fminl (long double __x, long double __y) __attribute__ ((__nothrow__)); +extern int __fpclassifyl (long double __value) __attribute__ ((__nothrow__)) + __attribute__ ((__const__)); +extern int __signbitl (long double __value) __attribute__ ((__nothrow__)) + __attribute__ ((__const__)); +extern long double fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__)); extern long double __fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__)); +extern long double scalbl (long double __x, long double __n) __attribute__ ((__nothrow__)); extern long double __scalbl (long double __x, long double __n) __attribute__ ((__nothrow__)); +extern int signgam; +enum + { + FP_NAN, + FP_INFINITE, + FP_ZERO, + FP_SUBNORMAL, + FP_NORMAL + }; +typedef enum +{ + _IEEE_ = -1, + _SVID_, + _XOPEN_, + _POSIX_, + _ISOC_ +} _LIB_VERSION_TYPE; +extern _LIB_VERSION_TYPE _LIB_VERSION; +struct exception + { + int type; + char *name; + double arg1; + double arg2; + double retval; + }; +extern int matherr (struct exception *__exc); +union wait + { + int w_status; + struct + { + unsigned int:16; + unsigned int __w_retcode:8; + unsigned int __w_coredump:1; + unsigned int __w_termsig:7; + } __wait_terminated; + struct + { + unsigned int:16; + unsigned int __w_stopsig:8; + unsigned int __w_stopval:8; + } __wait_stopped; + }; +typedef union + { + union wait *__uptr; + int *__iptr; + } __WAIT_STATUS __attribute__ ((__transparent_union__)); +typedef struct + { + int quot; + int rem; + } div_t; +typedef struct + { + long int quot; + long int rem; + } ldiv_t; +__extension__ typedef struct + { + long long int quot; + long long int rem; + } lldiv_t; +extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern double atof (__const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int atoi (__const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern long int atol (__const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +__extension__ extern long long int atoll (__const char *__nptr) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern double strtod (__const char *__restrict __nptr, + char **__restrict __endptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern float strtof (__const char *__restrict __nptr, + char **__restrict __endptr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern long double strtold (__const char *__restrict __nptr, + char **__restrict __endptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern long int strtol (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern unsigned long int strtoul (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +__extension__ +extern long long int strtoq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +__extension__ +extern unsigned long long int strtouq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +__extension__ +extern long long int strtoll (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +__extension__ +extern unsigned long long int strtoull (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern long int strtol_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); +extern unsigned long int strtoul_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); +__extension__ +extern long long int strtoll_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); +__extension__ +extern unsigned long long int strtoull_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); +extern double strtod_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); +extern float strtof_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); +extern long double strtold_l (__const char *__restrict __nptr, + char **__restrict __endptr, + __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); +extern __inline __attribute__ ((__gnu_inline__)) double +__attribute__ ((__nothrow__)) atof (__const char *__nptr) +{ + return strtod (__nptr, (char **) ((void *)0)); +} +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) atoi (__const char *__nptr) +{ + return (int) strtol (__nptr, (char **) ((void *)0), 10); +} +extern __inline __attribute__ ((__gnu_inline__)) long int +__attribute__ ((__nothrow__)) atol (__const char *__nptr) +{ + return strtol (__nptr, (char **) ((void *)0), 10); +} +__extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int +__attribute__ ((__nothrow__)) atoll (__const char *__nptr) +{ + return strtoll (__nptr, (char **) ((void *)0), 10); +} +extern char *l64a (long int __n) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern long int a64l (__const char *__s) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +typedef __u_char u_char; +typedef __u_short u_short; +typedef __u_int u_int; +typedef __u_long u_long; +typedef __quad_t quad_t; +typedef __u_quad_t u_quad_t; +typedef __fsid_t fsid_t; +typedef __loff_t loff_t; +typedef __ino_t ino_t; +typedef __ino64_t ino64_t; +typedef __dev_t dev_t; +typedef __gid_t gid_t; +typedef __mode_t mode_t; +typedef __nlink_t nlink_t; +typedef __uid_t uid_t; +typedef __off_t off_t; +typedef __off64_t off64_t; +typedef __pid_t pid_t; +typedef __id_t id_t; +typedef __ssize_t ssize_t; +typedef __daddr_t daddr_t; +typedef __caddr_t caddr_t; +typedef __key_t key_t; +typedef __clock_t clock_t; +typedef __time_t time_t; +typedef __clockid_t clockid_t; +typedef __timer_t timer_t; +typedef __useconds_t useconds_t; +typedef __suseconds_t suseconds_t; +typedef unsigned long int ulong; +typedef unsigned short int ushort; +typedef unsigned int uint; +typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); +typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); +typedef int register_t __attribute__ ((__mode__ (__word__))); +typedef int __sig_atomic_t; +typedef struct + { + unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; + } __sigset_t; +typedef __sigset_t sigset_t; +struct timespec + { + __time_t tv_sec; + long int tv_nsec; + }; +struct timeval + { + __time_t tv_sec; + __suseconds_t tv_usec; + }; +typedef long int __fd_mask; +typedef struct + { + __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; + } fd_set; +typedef __fd_mask fd_mask; +extern int select (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + struct timeval *__restrict __timeout); +extern int pselect (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + const struct timespec *__restrict __timeout, + const __sigset_t *__restrict __sigmask); +__extension__ +extern unsigned int gnu_dev_major (unsigned long long int __dev) + __attribute__ ((__nothrow__)); +__extension__ +extern unsigned int gnu_dev_minor (unsigned long long int __dev) + __attribute__ ((__nothrow__)); +__extension__ +extern unsigned long long int gnu_dev_makedev (unsigned int __major, + unsigned int __minor) + __attribute__ ((__nothrow__)); +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int +__attribute__ ((__nothrow__)) gnu_dev_major (unsigned long long int __dev) +{ + return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); +} +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int +__attribute__ ((__nothrow__)) gnu_dev_minor (unsigned long long int __dev) +{ + return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); +} +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned long long int +__attribute__ ((__nothrow__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor) +{ + return ((__minor & 0xff) | ((__major & 0xfff) << 8) + | (((unsigned long long int) (__minor & ~0xff)) << 12) + | (((unsigned long long int) (__major & ~0xfff)) << 32)); +} +typedef __blksize_t blksize_t; +typedef __blkcnt_t blkcnt_t; +typedef __fsblkcnt_t fsblkcnt_t; +typedef __fsfilcnt_t fsfilcnt_t; +typedef __blkcnt64_t blkcnt64_t; +typedef __fsblkcnt64_t fsblkcnt64_t; +typedef __fsfilcnt64_t fsfilcnt64_t; +typedef unsigned long int pthread_t; +typedef union +{ + char __size[36]; + long int __align; +} pthread_attr_t; +typedef struct __pthread_internal_slist +{ + struct __pthread_internal_slist *__next; +} __pthread_slist_t; +typedef union +{ + struct __pthread_mutex_s + { + int __lock __attribute__ ((aligned(16))); + unsigned int __count; + int __owner; + int __kind; + int __compat_padding[4]; + unsigned int __nusers; + __extension__ union + { + int __spins; + __pthread_slist_t __list; + }; + int __reserved1; + int __reserved2; + } __data; + char __size[48]; + long int __align; +} pthread_mutex_t; +typedef union +{ + char __size[4]; + long int __align; +} pthread_mutexattr_t; +typedef union +{ + struct + { + int __lock __attribute__ ((aligned(16))); + int __initializer; + unsigned int __futex; + void *__mutex; + __extension__ unsigned long long int __total_seq; + __extension__ unsigned long long int __wakeup_seq; + __extension__ unsigned long long int __woken_seq; + unsigned int __nwaiters; + unsigned int __broadcast_seq; + } __data; + char __size[48]; + __extension__ long long int __align; +} pthread_cond_t; +typedef union +{ + char __size[4]; + long int __align; +} pthread_condattr_t; +typedef unsigned int pthread_key_t; +typedef int pthread_once_t; +typedef union +{ + struct + { + int __compat_padding[4] __attribute__ ((aligned(16))); + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + int __writer; + int __reserved1; + unsigned char __pad2; + unsigned char __pad1; + unsigned char __shared; + unsigned char __flags; + int __reserved2; + int __reserved3; + int __reserved4; + } __data; + char __size[64]; + long int __align; +} pthread_rwlock_t; +typedef union +{ + char __size[8]; + long int __align; +} pthread_rwlockattr_t; +typedef volatile int pthread_spinlock_t; +typedef union +{ + char __size[48]; + long int __align; +} pthread_barrier_t; +typedef union +{ + char __size[4]; + int __align; +} pthread_barrierattr_t; +extern long int random (void) __attribute__ ((__nothrow__)); +extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__)); +extern char *initstate (unsigned int __seed, char *__statebuf, + size_t __statelen) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +struct random_data + { + int32_t *fptr; + int32_t *rptr; + int32_t *state; + int rand_type; + int rand_deg; + int rand_sep; + int32_t *end_ptr; + }; +extern int random_r (struct random_data *__restrict __buf, + int32_t *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int srandom_r (unsigned int __seed, struct random_data *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, + size_t __statelen, + struct random_data *__restrict __buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); +extern int setstate_r (char *__restrict __statebuf, + struct random_data *__restrict __buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int rand (void) __attribute__ ((__nothrow__)); +extern void srand (unsigned int __seed) __attribute__ ((__nothrow__)); +extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__)); +extern double drand48 (void) __attribute__ ((__nothrow__)); +extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern long int lrand48 (void) __attribute__ ((__nothrow__)); +extern long int nrand48 (unsigned short int __xsubi[3]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern long int mrand48 (void) __attribute__ ((__nothrow__)); +extern long int jrand48 (unsigned short int __xsubi[3]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern void srand48 (long int __seedval) __attribute__ ((__nothrow__)); +extern unsigned short int *seed48 (unsigned short int __seed16v[3]) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +struct drand48_data + { + unsigned short int __x[3]; + unsigned short int __old_x[3]; + unsigned short int __c; + unsigned short int __init; + unsigned long long int __a; + }; +extern int drand48_r (struct drand48_data *__restrict __buffer, + double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int erand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + double *__restrict __result) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int lrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int nrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int mrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int jrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int srand48_r (long int __seedval, struct drand48_data *__buffer) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int seed48_r (unsigned short int __seed16v[3], + struct drand48_data *__buffer) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int lcong48_r (unsigned short int __param[7], + struct drand48_data *__buffer) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern void *malloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); +extern void *calloc (size_t __nmemb, size_t __size) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); +extern void *realloc (void *__ptr, size_t __size) + __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern void free (void *__ptr) __attribute__ ((__nothrow__)); +extern void cfree (void *__ptr) __attribute__ ((__nothrow__)); +extern void *alloca (size_t __size) __attribute__ ((__nothrow__)); +extern void *valloc (size_t __size) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); +extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern void abort (void) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); +extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern void exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); +extern void quick_exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); +extern void _Exit (int __status) __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); +extern char *getenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern char *__secure_getenv (__const char *__name) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int putenv (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int setenv (__const char *__name, __const char *__value, int __replace) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int clearenv (void) __attribute__ ((__nothrow__)); +extern char *mktemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkstemps64 (char *__template, int __suffixlen) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkostemps (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkostemps64 (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int system (__const char *__command) __attribute__ ((__warn_unused_result__)); +extern char *canonicalize_file_name (__const char *__name) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern char *realpath (__const char *__restrict __name, + char *__restrict __resolved) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +typedef int (*__compar_fn_t) (__const void *, __const void *); +typedef __compar_fn_t comparison_fn_t; +typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *); +extern void *bsearch (__const void *__key, __const void *__base, + size_t __nmemb, size_t __size, __compar_fn_t __compar) + __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__)); +extern void qsort (void *__base, size_t __nmemb, size_t __size, + __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); +extern void qsort_r (void *__base, size_t __nmemb, size_t __size, + __compar_d_fn_t __compar, void *__arg) + __attribute__ ((__nonnull__ (1, 4))); +extern int abs (int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern long int labs (long int __x) __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +__extension__ extern long long int llabs (long long int __x) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern div_t div (int __numer, int __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern ldiv_t ldiv (long int __numer, long int __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +__extension__ extern lldiv_t lldiv (long long int __numer, + long long int __denom) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *gcvt (double __value, int __ndigit, char *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); +extern char *qecvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qfcvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qgcvt (long double __value, int __ndigit, char *__buf) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); +extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); +extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); +extern int qecvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); +extern int qfcvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3, 4, 5))); +extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int mbtowc (wchar_t *__restrict __pwc, + __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern size_t mbstowcs (wchar_t *__restrict __pwcs, + __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__)); +extern size_t wcstombs (char *__restrict __s, + __const wchar_t *__restrict __pwcs, size_t __n) + __attribute__ ((__nothrow__)); +extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int getsubopt (char **__restrict __optionp, + char *__const *__restrict __tokens, + char **__restrict __valuep) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__)); +extern void setkey (__const char *__key) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__)); +extern int grantpt (int __fd) __attribute__ ((__nothrow__)); +extern int unlockpt (int __fd) __attribute__ ((__nothrow__)); +extern char *ptsname (int __fd) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int ptsname_r (int __fd, char *__buf, size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int getpt (void); +extern int getloadavg (double __loadavg[], int __nelem) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern char *__realpath_chk (__const char *__restrict __name, + char *__restrict __resolved, + size_t __resolvedlen) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern char *__realpath_alias (__const char *__restrict __name, char *__restrict __resolved) __asm__ ("" "realpath") __attribute__ ((__nothrow__)) + __attribute__ ((__warn_unused_result__)); +extern char *__realpath_chk_warn (__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __asm__ ("" "__realpath_chk") __attribute__ ((__nothrow__)) + __attribute__ ((__warn_unused_result__)) + __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +__attribute__ ((__nothrow__)) realpath (__const char *__restrict __name, char *__restrict __resolved) +{ + if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1) + { + if (__builtin_object_size (__resolved, 2 > 1) < 4096) + return __realpath_chk_warn (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); + return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); + } + return __realpath_alias (__name, __resolved); +} +extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, + size_t __nreal) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ptsname_r") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nothrow__)) + __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) ptsname_r (int __fd, char *__buf, size_t __buflen) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __ptsname_r_alias (__fd, __buf, __buflen); +} +extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int __wctomb_alias (char *__s, wchar_t __wchar) __asm__ ("" "wctomb") __attribute__ ((__nothrow__)) + __attribute__ ((__warn_unused_result__)); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) int +__attribute__ ((__nothrow__)) wctomb (char *__s, wchar_t __wchar) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) + return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1)); + return __wctomb_alias (__s, __wchar); +} +extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, + __const char *__restrict __src, + size_t __len, size_t __dstlen) __attribute__ ((__nothrow__)); +extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__)) + ; +extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__mbstowcs_chk") __attribute__ ((__nothrow__)) + __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +__attribute__ ((__nothrow__)) mbstowcs (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __mbstowcs_chk (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) + return __mbstowcs_chk_warn (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + } + return __mbstowcs_alias (__dst, __src, __len); +} +extern size_t __wcstombs_chk (char *__restrict __dst, + __const wchar_t *__restrict __src, + size_t __len, size_t __dstlen) __attribute__ ((__nothrow__)); +extern size_t __wcstombs_alias (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) __asm__ ("" "wcstombs") __attribute__ ((__nothrow__)) + ; +extern size_t __wcstombs_chk_warn (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__wcstombs_chk") __attribute__ ((__nothrow__)) + __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len"))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +__attribute__ ((__nothrow__)) wcstombs (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + if (__len > __builtin_object_size (__dst, 2 > 1)) + return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + } + return __wcstombs_alias (__dst, __src, __len); +} +struct _IO_FILE; +typedef struct _IO_FILE FILE; +typedef struct _IO_FILE __FILE; +typedef struct +{ + int __count; + union + { + unsigned int __wch; + char __wchb[4]; + } __value; +} __mbstate_t; +typedef struct +{ + __off_t __pos; + __mbstate_t __state; +} _G_fpos_t; +typedef struct +{ + __off64_t __pos; + __mbstate_t __state; +} _G_fpos64_t; +typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); +typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); +typedef __builtin_va_list __gnuc_va_list; +struct _IO_jump_t; struct _IO_FILE; +typedef void _IO_lock_t; +struct _IO_marker { + struct _IO_marker *_next; + struct _IO_FILE *_sbuf; + int _pos; +}; +enum __codecvt_result +{ + __codecvt_ok, + __codecvt_partial, + __codecvt_error, + __codecvt_noconv +}; +struct _IO_FILE { + int _flags; + char* _IO_read_ptr; + char* _IO_read_end; + char* _IO_read_base; + char* _IO_write_base; + char* _IO_write_ptr; + char* _IO_write_end; + char* _IO_buf_base; + char* _IO_buf_end; + char *_IO_save_base; + char *_IO_backup_base; + char *_IO_save_end; + struct _IO_marker *_markers; + struct _IO_FILE *_chain; + int _fileno; + int _flags2; + __off_t _old_offset; + unsigned short _cur_column; + signed char _vtable_offset; + char _shortbuf[1]; + _IO_lock_t *_lock; + __off64_t _offset; + void *__pad1; + void *__pad2; + void *__pad3; + void *__pad4; + size_t __pad5; + int _mode; + char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; +}; +typedef struct _IO_FILE _IO_FILE; +struct _IO_FILE_plus; +extern struct _IO_FILE_plus _IO_2_1_stdin_; +extern struct _IO_FILE_plus _IO_2_1_stdout_; +extern struct _IO_FILE_plus _IO_2_1_stderr_; +typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); +typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, + size_t __n); +typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); +typedef int __io_close_fn (void *__cookie); +typedef __io_read_fn cookie_read_function_t; +typedef __io_write_fn cookie_write_function_t; +typedef __io_seek_fn cookie_seek_function_t; +typedef __io_close_fn cookie_close_function_t; +typedef struct +{ + __io_read_fn *read; + __io_write_fn *write; + __io_seek_fn *seek; + __io_close_fn *close; +} _IO_cookie_io_functions_t; +typedef _IO_cookie_io_functions_t cookie_io_functions_t; +struct _IO_cookie_file; +extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, + void *__cookie, _IO_cookie_io_functions_t __fns); +extern int __underflow (_IO_FILE *); +extern int __uflow (_IO_FILE *); +extern int __overflow (_IO_FILE *, int); +extern int _IO_getc (_IO_FILE *__fp); +extern int _IO_putc (int __c, _IO_FILE *__fp); +extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__)); +extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__)); +extern int _IO_peekc_locked (_IO_FILE *__fp); +extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__)); +extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__)); +extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__)); +extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, + __gnuc_va_list, int *__restrict); +extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, + __gnuc_va_list); +extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); +extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); +extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); +extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); +extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__)); +typedef __gnuc_va_list va_list; +typedef _G_fpos_t fpos_t; +typedef _G_fpos64_t fpos64_t; +extern struct _IO_FILE *stdin; +extern struct _IO_FILE *stdout; +extern struct _IO_FILE *stderr; +extern int remove (__const char *__filename) __attribute__ ((__nothrow__)); +extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__)); +extern int renameat (int __oldfd, __const char *__old, int __newfd, + __const char *__new) __attribute__ ((__nothrow__)); +extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__)); +extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__)); +extern char *tmpnam (char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern char *tempnam (__const char *__dir, __const char *__pfx) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); +extern int fclose (FILE *__stream); +extern int fflush (FILE *__stream); +extern int fflush_unlocked (FILE *__stream); +extern int fcloseall (void); +extern FILE *fopen (__const char *__restrict __filename, + __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); +extern FILE *freopen (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern FILE *fopen64 (__const char *__restrict __filename, + __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); +extern FILE *freopen64 (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern FILE *fopencookie (void *__restrict __magic_cookie, + __const char *__restrict __modes, + _IO_cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) + __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__)); +extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, + int __modes, size_t __n) __attribute__ ((__nothrow__)); +extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, + size_t __size) __attribute__ ((__nothrow__)); +extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__)); +extern int fprintf (FILE *__restrict __stream, + __const char *__restrict __format, ...); +extern int printf (__const char *__restrict __format, ...); +extern int sprintf (char *__restrict __s, + __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); +extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg); +extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); +extern int vsprintf (char *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) __attribute__ ((__nothrow__)); +extern int snprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); +extern int vsnprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); +extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, + __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__)); +extern int __asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +extern int asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +extern int vdprintf (int __fd, __const char *__restrict __fmt, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 2, 0))); +extern int dprintf (int __fd, __const char *__restrict __fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); +extern int fscanf (FILE *__restrict __stream, + __const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); +extern int scanf (__const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); +extern int sscanf (__const char *__restrict __s, + __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); +extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); +extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); +extern int vsscanf (__const char *__restrict __s, + __const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__scanf__, 2, 0))); +extern int fgetc (FILE *__stream); +extern int getc (FILE *__stream); +extern int getchar (void); +extern int getc_unlocked (FILE *__stream); +extern int getchar_unlocked (void); +extern int fgetc_unlocked (FILE *__stream); +extern int fputc (int __c, FILE *__stream); +extern int putc (int __c, FILE *__stream); +extern int putchar (int __c); +extern int fputc_unlocked (int __c, FILE *__stream); +extern int putc_unlocked (int __c, FILE *__stream); +extern int putchar_unlocked (int __c); +extern int getw (FILE *__stream); +extern int putw (int __w, FILE *__stream); +extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) + __attribute__ ((__warn_unused_result__)); +extern char *gets (char *__s) __attribute__ ((__warn_unused_result__)); +extern char *fgets_unlocked (char *__restrict __s, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern __ssize_t __getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern __ssize_t getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern __ssize_t getline (char **__restrict __lineptr, + size_t *__restrict __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); +extern int puts (__const char *__s); +extern int ungetc (int __c, FILE *__stream); +extern size_t fread (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t fwrite (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __s) __attribute__ ((__warn_unused_result__)); +extern int fputs_unlocked (__const char *__restrict __s, + FILE *__restrict __stream); +extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern int fseek (FILE *__stream, long int __off, int __whence); +extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)); +extern void rewind (FILE *__stream); +extern int fseeko (FILE *__stream, __off_t __off, int __whence); +extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__)); +extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); +extern int fsetpos (FILE *__stream, __const fpos_t *__pos); +extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); +extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__)); +extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); +extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); +extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__)); +extern int feof (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int ferror (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__)); +extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern void perror (__const char *__s); +extern int sys_nerr; +extern __const char *__const sys_errlist[]; +extern int _sys_nerr; +extern __const char *__const _sys_errlist[]; +extern int fileno (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern FILE *popen (__const char *__command, __const char *__modes) __attribute__ ((__warn_unused_result__)); +extern int pclose (FILE *__stream); +extern char *ctermid (char *__s) __attribute__ ((__nothrow__)); +extern char *cuserid (char *__s); +struct obstack; +extern int obstack_printf (struct obstack *__restrict __obstack, + __const char *__restrict __format, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))); +extern int obstack_vprintf (struct obstack *__restrict __obstack, + __const char *__restrict __format, + __gnuc_va_list __args) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))); +extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__)); +extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__)); +extern __inline __attribute__ ((__gnu_inline__)) int +getchar (void) +{ + return _IO_getc (stdin); +} +extern __inline __attribute__ ((__gnu_inline__)) int +fgetc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} +extern __inline __attribute__ ((__gnu_inline__)) int +getc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} +extern __inline __attribute__ ((__gnu_inline__)) int +getchar_unlocked (void) +{ + return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); +} +extern __inline __attribute__ ((__gnu_inline__)) int +putchar (int __c) +{ + return _IO_putc (__c, stdout); +} +extern __inline __attribute__ ((__gnu_inline__)) int +fputc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} +extern __inline __attribute__ ((__gnu_inline__)) int +putc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} +extern __inline __attribute__ ((__gnu_inline__)) int +putchar_unlocked (int __c) +{ + return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); +} +extern __inline __attribute__ ((__gnu_inline__)) __ssize_t +getline (char **__lineptr, size_t *__n, FILE *__stream) +{ + return __getdelim (__lineptr, __n, '\n', __stream); +} +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) feof_unlocked (FILE *__stream) +{ + return (((__stream)->_flags & 0x10) != 0); +} +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) ferror_unlocked (FILE *__stream) +{ + return (((__stream)->_flags & 0x20) != 0); +} +extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, + __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); +extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, + __const char *__restrict __format, + __gnuc_va_list __ap) __attribute__ ((__nothrow__)); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) sprintf (char *__restrict __s, __const char *__restrict __fmt, ...) +{ + return __builtin___sprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) vsprintf (char *__restrict __s, __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __builtin___vsprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} +extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, __const char *__restrict __format, + ...) __attribute__ ((__nothrow__)); +extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, __const char *__restrict __format, + __gnuc_va_list __ap) __attribute__ ((__nothrow__)); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) snprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, ...) +{ + return __builtin___snprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) vsnprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __builtin___vsnprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} +extern int __fprintf_chk (FILE *__restrict __stream, int __flag, + __const char *__restrict __format, ...); +extern int __printf_chk (int __flag, __const char *__restrict __format, ...); +extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, + __const char *__restrict __format, __gnuc_va_list __ap); +extern int __vprintf_chk (int __flag, __const char *__restrict __format, + __gnuc_va_list __ap); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +fprintf (FILE *__restrict __stream, __const char *__restrict __fmt, ...) +{ + return __fprintf_chk (__stream, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +printf (__const char *__restrict __fmt, ...) +{ + return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vprintf (__const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vfprintf (FILE *__restrict __stream, + __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap); +} +extern int __asprintf_chk (char **__restrict __ptr, int __flag, + __const char *__restrict __fmt, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__)); +extern int __vasprintf_chk (char **__restrict __ptr, int __flag, + __const char *__restrict __fmt, __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__)); +extern int __dprintf_chk (int __fd, int __flag, __const char *__restrict __fmt, + ...) __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __vdprintf_chk (int __fd, int __flag, + __const char *__restrict __fmt, __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 3, 0))); +extern int __obstack_printf_chk (struct obstack *__restrict __obstack, + int __flag, __const char *__restrict __format, + ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack, + int __flag, + __const char *__restrict __format, + __gnuc_va_list __args) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) __asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +dprintf (int __fd, __const char *__restrict __fmt, ...) +{ + return __dprintf_chk (__fd, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, ...) +{ + return __obstack_printf_chk (__obstack, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) vasprintf (char **__restrict __ptr, __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__nothrow__)) obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt, + __ap); +} +extern char *__gets_chk (char *__str, size_t) __attribute__ ((__warn_unused_result__)); +extern char *__gets_warn (char *__str) __asm__ ("" "gets") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use fgets or getline instead, gets can't " "specify buffer size"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +gets (char *__str) +{ + if (__builtin_object_size (__str, 2 > 1) != (size_t) -1) + return __gets_chk (__str, __builtin_object_size (__str, 2 > 1)); + return __gets_warn (__str); +} +extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_alias (__s, __n, __stream); +} +extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + } + return __fread_alias (__ptr, __size, __n, __stream); +} +extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size, + int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked") + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_unlocked_alias (__s, __n, __stream); +} +extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + } + if (__builtin_constant_p (__size) + && __builtin_constant_p (__n) + && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) + && __size * __n <= 8) + { + size_t __cnt = __size * __n; + char *__cptr = (char *) __ptr; + if (__cnt == 0) + return 0; + for (; __cnt > 0; --__cnt) + { + int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++); + if (__c == (-1)) + break; + *__cptr++ = __c; + } + return (__cptr - (char *) __ptr) / __size; + } + return __fread_unlocked_alias (__ptr, __size, __n, __stream); +} +extern void *memcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern void *memmove (void *__dest, __const void *__src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, + int __c, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern void *memchr (__const void *__s, int __c, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern void *rawmemchr (__const void *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern void *memrchr (__const void *__s, int __c, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *strncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *strcat (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *strncat (char *__restrict __dest, __const char *__restrict __src, + size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int strcmp (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern int strcoll (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern size_t strxfrm (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); +extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, + __locale_t __l) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 4))); +extern char *strdup (__const char *__s) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); +extern char *strndup (__const char *__string, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); +extern char *strchr (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern char *strrchr (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern char *strchrnul (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern size_t strcspn (__const char *__s, __const char *__reject) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern size_t strspn (__const char *__s, __const char *__accept) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *strpbrk (__const char *__s, __const char *__accept) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *strstr (__const char *__haystack, __const char *__needle) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *strtok (char *__restrict __s, __const char *__restrict __delim) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern char *__strtok_r (char *__restrict __s, + __const char *__restrict __delim, + char **__restrict __save_ptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); +extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, + char **__restrict __save_ptr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); +extern char *strcasestr (__const char *__haystack, __const char *__needle) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern void *memmem (__const void *__haystack, size_t __haystacklen, + __const void *__needle, size_t __needlelen) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); +extern void *__mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern void *mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern size_t strlen (__const char *__s) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern size_t strnlen (__const char *__string, size_t __maxlen) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern char *strerror (int __errnum) __attribute__ ((__nothrow__)); +extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern char *strerror_l (int __errnum, __locale_t __l) __attribute__ ((__nothrow__)); +extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern void bcopy (__const void *__src, void *__dest, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *index (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern char *rindex (__const char *__s, int __c) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern int ffs (int __i) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern int ffsl (long int __l) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +__extension__ extern int ffsll (long long int __ll) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern int strcasecmp (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern int strcasecmp_l (__const char *__s1, __const char *__s2, + __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); +extern int strncasecmp_l (__const char *__s1, __const char *__s2, + size_t __n, __locale_t __loc) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); +extern char *strsep (char **__restrict __stringp, + __const char *__restrict __delim) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *strsignal (int __sig) __attribute__ ((__nothrow__)); +extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *__stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int strverscmp (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *strfry (char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern char *basename (__const char *__filename) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +typedef struct { unsigned char __arr[2]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR2; +typedef struct { unsigned char __arr[3]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR3; +typedef struct { unsigned char __arr[4]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR4; +typedef struct { unsigned char __arr[5]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR5; +typedef struct { unsigned char __arr[6]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR6; +typedef struct { unsigned char __arr[7]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR7; +typedef struct { unsigned char __arr[8]; } __attribute__ ((__packed__)) __STRING2_COPY_ARR8; +extern void *__rawmemchr (const void *__s, int __c); +extern __inline __attribute__ ((__gnu_inline__)) size_t __strcspn_c1 (__const char *__s, int __reject); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strcspn_c1 (__const char *__s, int __reject) +{ + register size_t __result = 0; + while (__s[__result] != '\0' && __s[__result] != __reject) + ++__result; + return __result; +} +extern __inline __attribute__ ((__gnu_inline__)) size_t __strcspn_c2 (__const char *__s, int __reject1, + int __reject2); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strcspn_c2 (__const char *__s, int __reject1, int __reject2) +{ + register size_t __result = 0; + while (__s[__result] != '\0' && __s[__result] != __reject1 + && __s[__result] != __reject2) + ++__result; + return __result; +} +extern __inline __attribute__ ((__gnu_inline__)) size_t __strcspn_c3 (__const char *__s, int __reject1, + int __reject2, int __reject3); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strcspn_c3 (__const char *__s, int __reject1, int __reject2, + int __reject3) +{ + register size_t __result = 0; + while (__s[__result] != '\0' && __s[__result] != __reject1 + && __s[__result] != __reject2 && __s[__result] != __reject3) + ++__result; + return __result; +} +extern __inline __attribute__ ((__gnu_inline__)) size_t __strspn_c1 (__const char *__s, int __accept); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strspn_c1 (__const char *__s, int __accept) +{ + register size_t __result = 0; + while (__s[__result] == __accept) + ++__result; + return __result; +} +extern __inline __attribute__ ((__gnu_inline__)) size_t __strspn_c2 (__const char *__s, int __accept1, + int __accept2); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strspn_c2 (__const char *__s, int __accept1, int __accept2) +{ + register size_t __result = 0; + while (__s[__result] == __accept1 || __s[__result] == __accept2) + ++__result; + return __result; +} +extern __inline __attribute__ ((__gnu_inline__)) size_t __strspn_c3 (__const char *__s, int __accept1, + int __accept2, int __accept3); +extern __inline __attribute__ ((__gnu_inline__)) size_t +__strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) +{ + register size_t __result = 0; + while (__s[__result] == __accept1 || __s[__result] == __accept2 + || __s[__result] == __accept3) + ++__result; + return __result; +} +extern __inline __attribute__ ((__gnu_inline__)) char *__strpbrk_c2 (__const char *__s, int __accept1, + int __accept2); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strpbrk_c2 (__const char *__s, int __accept1, int __accept2) +{ + while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) + ++__s; + return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; +} +extern __inline __attribute__ ((__gnu_inline__)) char *__strpbrk_c3 (__const char *__s, int __accept1, + int __accept2, int __accept3); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strpbrk_c3 (__const char *__s, int __accept1, int __accept2, + int __accept3) +{ + while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 + && *__s != __accept3) + ++__s; + return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; +} +extern __inline __attribute__ ((__gnu_inline__)) char *__strtok_r_1c (char *__s, char __sep, char **__nextp); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strtok_r_1c (char *__s, char __sep, char **__nextp) +{ + char *__result; + if (__s == ((void *)0)) + __s = *__nextp; + while (*__s == __sep) + ++__s; + __result = ((void *)0); + if (*__s != '\0') + { + __result = __s++; + while (*__s != '\0') + if (*__s++ == __sep) + { + __s[-1] = '\0'; + break; + } + } + *__nextp = __s; + return __result; +} +extern char *__strsep_g (char **__stringp, __const char *__delim); +extern __inline __attribute__ ((__gnu_inline__)) char *__strsep_1c (char **__s, char __reject); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strsep_1c (char **__s, char __reject) +{ + register char *__retval = *__s; + if (__retval != ((void *)0) && (*__s = (__extension__ (__builtin_constant_p (__reject) && !__builtin_constant_p (__retval) && (__reject) == '\0' ? (char *) __rawmemchr (__retval, __reject) : __builtin_strchr (__retval, __reject)))) != ((void *)0)) + *(*__s)++ = '\0'; + return __retval; +} +extern __inline __attribute__ ((__gnu_inline__)) char *__strsep_2c (char **__s, char __reject1, char __reject2); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strsep_2c (char **__s, char __reject1, char __reject2) +{ + register char *__retval = *__s; + if (__retval != ((void *)0)) + { + register char *__cp = __retval; + while (1) + { + if (*__cp == '\0') + { + __cp = ((void *)0); + break; + } + if (*__cp == __reject1 || *__cp == __reject2) + { + *__cp++ = '\0'; + break; + } + ++__cp; + } + *__s = __cp; + } + return __retval; +} +extern __inline __attribute__ ((__gnu_inline__)) char *__strsep_3c (char **__s, char __reject1, char __reject2, + char __reject3); +extern __inline __attribute__ ((__gnu_inline__)) char * +__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) +{ + register char *__retval = *__s; + if (__retval != ((void *)0)) + { + register char *__cp = __retval; + while (1) + { + if (*__cp == '\0') + { + __cp = ((void *)0); + break; + } + if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) + { + *__cp++ = '\0'; + break; + } + ++__cp; + } + *__s = __cp; + } + return __retval; +} +extern char *__strdup (__const char *__string) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); +extern char *__strndup (__const char *__string, size_t __n) + __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)); +extern void __warn_memset_zero_len (void) __attribute__((__warning__ ("memset used with constant zero length parameter; this could be due to transposed parameters"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +__attribute__ ((__nothrow__)) memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) +{ + return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +__attribute__ ((__nothrow__)) memmove (void *__dest, __const void *__src, size_t __len) +{ + return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +__attribute__ ((__nothrow__)) mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) +{ + return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +__attribute__ ((__nothrow__)) memset (void *__dest, int __ch, size_t __len) +{ + if (__builtin_constant_p (__len) && __len == 0 + && (!__builtin_constant_p (__ch) || __ch != 0)) + { + __warn_memset_zero_len (); + return __dest; + } + return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void +__attribute__ ((__nothrow__)) bcopy (__const void *__src, void *__dest, size_t __len) +{ + (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void +__attribute__ ((__nothrow__)) bzero (void *__dest, size_t __len) +{ + (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__nothrow__)) strcpy (char *__restrict __dest, __const char *__restrict __src) +{ + return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__nothrow__)) stpcpy (char *__restrict __dest, __const char *__restrict __src) +{ + return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__nothrow__)) strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __len) +{ + return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); +} +extern char *__stpncpy_chk (char *__dest, __const char *__src, size_t __n, + size_t __destlen) __attribute__ ((__nothrow__)); +extern char *__stpncpy_alias (char *__dest, __const char *__src, size_t __n) __asm__ ("" "stpncpy") __attribute__ ((__nothrow__)) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__nothrow__)) stpncpy (char *__dest, __const char *__src, size_t __n) +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1 + && (!__builtin_constant_p (__n) || __n <= __builtin_object_size (__dest, 2 > 1))) + return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1)); + return __stpncpy_alias (__dest, __src, __n); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__nothrow__)) strcat (char *__restrict __dest, __const char *__restrict __src) +{ + return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__nothrow__)) strncat (char *__restrict __dest, __const char *__restrict __src, size_t __len) +{ + return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); +} +typedef union { GLfloat f; GLint i; } fi_type; +static __inline__ GLfloat LOG2(GLfloat val) +{ + fi_type num; + GLint log_2; + num.f = val; + log_2 = ((num.i >> 23) & 255) - 128; + num.i &= ~(255 << 23); + num.i += 127 << 23; + num.f = ((-1.0f/3) * num.f + 2) * num.f - 2.0f/3; + return num.f + log_2; +} +static __inline__ int IS_INF_OR_NAN( float x ) +{ + fi_type tmp; + tmp.f = x; + return !(int)((unsigned int)((tmp.i & 0x7fffffff)-0x7f800000) >> 31); +} +static __inline__ int GET_FLOAT_BITS( float x ) +{ + fi_type fi; + fi.f = x; + return fi.i; +} +static __inline__ int ifloor(float f) +{ + int ai, bi; + double af, bf; + fi_type u; + af = (3 << 22) + 0.5 + (double)f; + bf = (3 << 22) + 0.5 - (double)f; + u.f = (float) af; ai = u.i; + u.f = (float) bf; bi = u.i; + return (ai - bi) >> 1; +} +static __inline__ int iceil(float f) +{ + int ai, bi; + double af, bf; + fi_type u; + af = (3 << 22) + 0.5 + (double)f; + bf = (3 << 22) + 0.5 - (double)f; + u.f = (float) af; ai = u.i; + u.f = (float) bf; bi = u.i; + return (ai - bi + 1) >> 1; +} +static __inline__ int +_mesa_is_pow_two(int x) +{ + return !(x & (x - 1)); +} +static __inline__ int32_t +_mesa_next_pow_two_32(uint32_t x) +{ + uint32_t y = (x != 1); + return (1 + y) << ((__builtin_clz(x - y) ^ 31) ); +} +static __inline__ int64_t +_mesa_next_pow_two_64(uint64_t x) +{ + uint64_t y = (x != 1); + if (sizeof(x) == sizeof(long)) + return (1 + y) << ((__builtin_clzl(x - y) ^ 63)); + else + return (1 + y) << ((__builtin_clzll(x - y) ^ 63)); +} +static __inline__ GLuint +_mesa_logbase2(GLuint n) +{ + return (31 - __builtin_clz(n | 1)); +} +static __inline__ GLboolean +_mesa_little_endian(void) +{ + const GLuint ui = 1; + return *((const GLubyte *) &ui); +} +extern void * +_mesa_align_malloc( size_t bytes, unsigned long alignment ); +extern void * +_mesa_align_calloc( size_t bytes, unsigned long alignment ); +extern void +_mesa_align_free( void *ptr ); +extern void * +_mesa_align_realloc(void *oldBuffer, size_t oldSize, size_t newSize, + unsigned long alignment); +extern void * +_mesa_exec_malloc( GLuint size ); +extern void +_mesa_exec_free( void *addr ); +extern void * +_mesa_realloc( void *oldBuffer, size_t oldSize, size_t newSize ); +extern void +_mesa_memset16( unsigned short *dst, unsigned short val, size_t n ); +extern double +_mesa_sqrtd(double x); +extern float +_mesa_sqrtf(float x); +extern float +_mesa_inv_sqrtf(float x); +extern void +_mesa_init_sqrt_table(void); +extern GLhalfARB +_mesa_float_to_half(float f); +extern float +_mesa_half_to_float(GLhalfARB h); +extern void * +_mesa_bsearch( const void *key, const void *base, size_t nmemb, size_t size, + int (*compar)(const void *, const void *) ); +extern char * +_mesa_getenv( const char *var ); +extern char * +_mesa_strdup( const char *s ); +extern float +_mesa_strtof( const char *s, char **end ); +extern unsigned int +_mesa_str_checksum(const char *str); +extern int +_mesa_snprintf( char *str, size_t size, const char *fmt, ... ) __attribute__ ((format(__printf__, 3, 4))); +struct gl_context; +extern void +_mesa_warning( struct gl_context *gc, const char *fmtString, ... ) __attribute__ ((format(__printf__, 2, 3))); +extern void +_mesa_problem( const struct gl_context *ctx, const char *fmtString, ... ) __attribute__ ((format(__printf__, 2, 3))); +extern void +_mesa_error( struct gl_context *ctx, GLenum error, const char *fmtString, ... ) __attribute__ ((format(__printf__, 3, 4))); +extern void +_mesa_debug( const struct gl_context *ctx, const char *fmtString, ... ) __attribute__ ((format(__printf__, 2, 3))); +struct sched_param + { + int __sched_priority; + }; +extern int clone (int (*__fn) (void *__arg), void *__child_stack, + int __flags, void *__arg, ...) __attribute__ ((__nothrow__)); +extern int unshare (int __flags) __attribute__ ((__nothrow__)); +extern int sched_getcpu (void) __attribute__ ((__nothrow__)); +struct __sched_param + { + int __sched_priority; + }; +typedef unsigned long int __cpu_mask; +typedef struct +{ + __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; +} cpu_set_t; +extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) + __attribute__ ((__nothrow__)); +extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__)) __attribute__ ((__warn_unused_result__)); +extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__)); +extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param) + __attribute__ ((__nothrow__)); +extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__)); +extern int sched_setscheduler (__pid_t __pid, int __policy, + __const struct sched_param *__param) __attribute__ ((__nothrow__)); +extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__)); +extern int sched_yield (void) __attribute__ ((__nothrow__)); +extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__)); +extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__)); +extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__)); +extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, + __const cpu_set_t *__cpuset) __attribute__ ((__nothrow__)); +extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, + cpu_set_t *__cpuset) __attribute__ ((__nothrow__)); +struct tm +{ + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; + long int tm_gmtoff; + __const char *tm_zone; +}; +struct itimerspec + { + struct timespec it_interval; + struct timespec it_value; + }; +struct sigevent; +extern clock_t clock (void) __attribute__ ((__nothrow__)); +extern time_t time (time_t *__timer) __attribute__ ((__nothrow__)); +extern double difftime (time_t __time1, time_t __time0) + __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__)); +extern size_t strftime (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp) __attribute__ ((__nothrow__)); +extern char *strptime (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp) + __attribute__ ((__nothrow__)); +extern size_t strftime_l (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp, + __locale_t __loc) __attribute__ ((__nothrow__)); +extern char *strptime_l (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp, + __locale_t __loc) __attribute__ ((__nothrow__)); +extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__)); +extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__)); +extern struct tm *gmtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) __attribute__ ((__nothrow__)); +extern struct tm *localtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) __attribute__ ((__nothrow__)); +extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__)); +extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__)); +extern char *asctime_r (__const struct tm *__restrict __tp, + char *__restrict __buf) __attribute__ ((__nothrow__)); +extern char *ctime_r (__const time_t *__restrict __timer, + char *__restrict __buf) __attribute__ ((__nothrow__)); +extern char *__tzname[2]; +extern int __daylight; +extern long int __timezone; +extern char *tzname[2]; +extern void tzset (void) __attribute__ ((__nothrow__)); +extern int daylight; +extern long int timezone; +extern int stime (__const time_t *__when) __attribute__ ((__nothrow__)); +extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__)); +extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__)); +extern int dysize (int __year) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern int nanosleep (__const struct timespec *__requested_time, + struct timespec *__remaining); +extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__)); +extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__)); +extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) + __attribute__ ((__nothrow__)); +extern int clock_nanosleep (clockid_t __clock_id, int __flags, + __const struct timespec *__req, + struct timespec *__rem); +extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__)); +extern int timer_create (clockid_t __clock_id, + struct sigevent *__restrict __evp, + timer_t *__restrict __timerid) __attribute__ ((__nothrow__)); +extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__)); +extern int timer_settime (timer_t __timerid, int __flags, + __const struct itimerspec *__restrict __value, + struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__)); +extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) + __attribute__ ((__nothrow__)); +extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__)); +extern int getdate_err; +extern struct tm *getdate (__const char *__string); +extern int getdate_r (__const char *__restrict __string, + struct tm *__restrict __resbufp); +typedef double __jmp_buf[21]; +enum +{ + PTHREAD_CREATE_JOINABLE, + PTHREAD_CREATE_DETACHED +}; +enum +{ + PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_ADAPTIVE_NP + , + PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL + , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP +}; +enum +{ + PTHREAD_MUTEX_STALLED, + PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, + PTHREAD_MUTEX_ROBUST, + PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST +}; +enum +{ + PTHREAD_PRIO_NONE, + PTHREAD_PRIO_INHERIT, + PTHREAD_PRIO_PROTECT +}; +enum +{ + PTHREAD_RWLOCK_PREFER_READER_NP, + PTHREAD_RWLOCK_PREFER_WRITER_NP, + PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, + PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP +}; +enum +{ + PTHREAD_INHERIT_SCHED, + PTHREAD_EXPLICIT_SCHED +}; +enum +{ + PTHREAD_SCOPE_SYSTEM, + PTHREAD_SCOPE_PROCESS +}; +enum +{ + PTHREAD_PROCESS_PRIVATE, + PTHREAD_PROCESS_SHARED +}; +struct _pthread_cleanup_buffer +{ + void (*__routine) (void *); + void *__arg; + int __canceltype; + struct _pthread_cleanup_buffer *__prev; +}; +enum +{ + PTHREAD_CANCEL_ENABLE, + PTHREAD_CANCEL_DISABLE +}; +enum +{ + PTHREAD_CANCEL_DEFERRED, + PTHREAD_CANCEL_ASYNCHRONOUS +}; +extern int pthread_create (pthread_t *__restrict __newthread, + __const pthread_attr_t *__restrict __attr, + void *(*__start_routine) (void *), + void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))); +extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); +extern int pthread_join (pthread_t __th, void **__thread_return); +extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __attribute__ ((__nothrow__)); +extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, + __const struct timespec *__abstime); +extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__)); +extern pthread_t pthread_self (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__)); +extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __attribute__ ((__nothrow__)); +extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_destroy (pthread_attr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, + int *__detachstate) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, + int __detachstate) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, + size_t *__guardsize) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setguardsize (pthread_attr_t *__attr, + size_t __guardsize) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict + __attr, + struct sched_param *__restrict __param) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, + __const struct sched_param *__restrict + __param) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict + __attr, int *__restrict __policy) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict + __attr, int *__restrict __inherit) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, + int __inherit) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, + int *__restrict __scope) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict + __attr, void **__restrict __stackaddr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); +extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, + void *__stackaddr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); +extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict + __attr, size_t *__restrict __stacksize) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setstacksize (pthread_attr_t *__attr, + size_t __stacksize) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, + void **__restrict __stackaddr, + size_t *__restrict __stacksize) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3))); +extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, + size_t __stacksize) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, + size_t __cpusetsize, + __const cpu_set_t *__cpuset) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))); +extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr, + size_t __cpusetsize, + cpu_set_t *__cpuset) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))); +extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int pthread_setschedparam (pthread_t __target_thread, int __policy, + __const struct sched_param *__param) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))); +extern int pthread_getschedparam (pthread_t __target_thread, + int *__restrict __policy, + struct sched_param *__restrict __param) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3))); +extern int pthread_setschedprio (pthread_t __target_thread, int __prio) + __attribute__ ((__nothrow__)); +extern int pthread_getname_np (pthread_t __target_thread, char *__buf, + size_t __buflen) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int pthread_setname_np (pthread_t __target_thread, __const char *__name) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int pthread_getconcurrency (void) __attribute__ ((__nothrow__)); +extern int pthread_setconcurrency (int __level) __attribute__ ((__nothrow__)); +extern int pthread_yield (void) __attribute__ ((__nothrow__)); +extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, + __const cpu_set_t *__cpuset) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))); +extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, + cpu_set_t *__cpuset) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3))); +extern int pthread_once (pthread_once_t *__once_control, + void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_setcancelstate (int __state, int *__oldstate); +extern int pthread_setcanceltype (int __type, int *__oldtype); +extern int pthread_cancel (pthread_t __th); +extern void pthread_testcancel (void); +typedef struct +{ + struct + { + __jmp_buf __cancel_jmp_buf; + int __mask_was_saved; + } __cancel_jmp_buf[1]; + void *__pad[4]; +} __pthread_unwind_buf_t __attribute__ ((__aligned__)); +struct __pthread_cleanup_frame +{ + void (*__cancel_routine) (void *); + void *__cancel_arg; + int __do_it; + int __cancel_type; +}; +extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf) + ; +extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf) + ; +extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf) + ; +extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf) + ; +extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf) + __attribute__ ((__noreturn__)) + __attribute__ ((__weak__)) + ; +struct __jmp_buf_tag; +extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __attribute__ ((__nothrow__)); +extern int pthread_mutex_init (pthread_mutex_t *__mutex, + __const pthread_mutexattr_t *__mutexattr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_mutex_lock (pthread_mutex_t *__mutex) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, + __const struct timespec *__restrict + __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_mutex_getprioceiling (__const pthread_mutex_t * + __restrict __mutex, + int *__restrict __prioceiling) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, + int __prioceiling, + int *__restrict __old_ceiling) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))); +extern int pthread_mutex_consistent (pthread_mutex_t *__mutex) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __pshared) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, + int __pshared) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict + __attr, int *__restrict __kind) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __protocol) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, + int __protocol) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __prioceiling) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, + int __prioceiling) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr, + int *__robustness) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr, + int *__robustness) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, + int __robustness) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, + int __robustness) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, + __const pthread_rwlockattr_t *__restrict + __attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, + __const struct timespec *__restrict + __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, + __const struct timespec *__restrict + __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * + __restrict __attr, + int *__restrict __pshared) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, + int __pshared) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t * + __restrict __attr, + int *__restrict __pref) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, + int __pref) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_cond_init (pthread_cond_t *__restrict __cond, + __const pthread_condattr_t *__restrict + __cond_attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_cond_destroy (pthread_cond_t *__cond) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_cond_signal (pthread_cond_t *__cond) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_cond_broadcast (pthread_cond_t *__cond) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex) + __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex, + __const struct timespec *__restrict + __abstime) __attribute__ ((__nonnull__ (1, 2, 3))); +extern int pthread_condattr_init (pthread_condattr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_condattr_destroy (pthread_condattr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_condattr_getpshared (__const pthread_condattr_t * + __restrict __attr, + int *__restrict __pshared) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, + int __pshared) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_condattr_getclock (__const pthread_condattr_t * + __restrict __attr, + __clockid_t *__restrict __clock_id) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_condattr_setclock (pthread_condattr_t *__attr, + __clockid_t __clock_id) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_spin_destroy (pthread_spinlock_t *__lock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_spin_lock (pthread_spinlock_t *__lock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_spin_trylock (pthread_spinlock_t *__lock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_spin_unlock (pthread_spinlock_t *__lock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, + __const pthread_barrierattr_t *__restrict + __attr, unsigned int __count) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_barrier_wait (pthread_barrier_t *__barrier) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * + __restrict __attr, + int *__restrict __pshared) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, + int __pshared) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_key_create (pthread_key_t *__key, + void (*__destr_function) (void *)) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); +extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__)); +extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__)); +extern int pthread_setspecific (pthread_key_t __key, + __const void *__pointer) __attribute__ ((__nothrow__)) ; +extern int pthread_getcpuclockid (pthread_t __thread_id, + __clockid_t *__clock_id) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2))); +extern int pthread_atfork (void (*__prepare) (void), + void (*__parent) (void), + void (*__child) (void)) __attribute__ ((__nothrow__)); +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__nothrow__)) pthread_equal (pthread_t __thread1, pthread_t __thread2) +{ + return __thread1 == __thread2; +} +struct u_tsd { + pthread_key_t key; + int initMagic; +}; +typedef pthread_mutex_t u_mutex; +unsigned long +u_thread_self(void); +void +u_tsd_init(struct u_tsd *tsd); +void +u_tsd_destroy(struct u_tsd *tsd); +void * +u_tsd_get(struct u_tsd *tsd); +void +u_tsd_set(struct u_tsd *tsd, void *ptr); +typedef struct u_tsd _glthread_TSD; +typedef u_mutex _glthread_Mutex; +typedef void (*_glapi_proc)(void); +struct _glapi_table; +__attribute__((visibility("default"))) extern __thread struct _glapi_table * _glapi_tls_Dispatch + __attribute__((tls_model("initial-exec"))); +__attribute__((visibility("default"))) extern __thread void * _glapi_tls_Context + __attribute__((tls_model("initial-exec"))); +__attribute__((visibility("default"))) extern const struct _glapi_table *_glapi_Dispatch; +__attribute__((visibility("default"))) extern const void *_glapi_Context; +void +_glapi_destroy_multithread(void); +__attribute__((visibility("default"))) void +_glapi_check_multithread(void); +__attribute__((visibility("default"))) void +_glapi_set_context(void *context); +__attribute__((visibility("default"))) void * +_glapi_get_context(void); +__attribute__((visibility("default"))) void +_glapi_set_dispatch(struct _glapi_table *dispatch); +__attribute__((visibility("default"))) struct _glapi_table * +_glapi_get_dispatch(void); +__attribute__((visibility("default"))) unsigned int +_glapi_get_dispatch_table_size(void); +__attribute__((visibility("default"))) int +_glapi_add_dispatch( const char * const * function_names, + const char * parameter_signature ); +__attribute__((visibility("default"))) int +_glapi_get_proc_offset(const char *funcName); +__attribute__((visibility("default"))) _glapi_proc +_glapi_get_proc_address(const char *funcName); +__attribute__((visibility("default"))) const char * +_glapi_get_proc_name(unsigned int offset); +__attribute__((visibility("default"))) struct _glapi_table * +_glapi_create_table_from_handle(void *handle, const char *symbol_prefix); +__attribute__((visibility("default"))) unsigned long +_glthread_GetID(void); +__attribute__((visibility("default"))) void +_glapi_noop_enable_warnings(unsigned char enable); +__attribute__((visibility("default"))) void +_glapi_set_warning_func(_glapi_proc func); +enum GLmatrixtype { + MATRIX_GENERAL, + MATRIX_IDENTITY, + MATRIX_3D_NO_ROT, + MATRIX_PERSPECTIVE, + MATRIX_2D, + MATRIX_2D_NO_ROT, + MATRIX_3D +} ; +typedef struct { + GLfloat *m; + GLfloat *inv; + GLuint flags; + enum GLmatrixtype type; +} GLmatrix; +extern void +_math_matrix_ctr( GLmatrix *m ); +extern void +_math_matrix_dtr( GLmatrix *m ); +extern void +_math_matrix_alloc_inv( GLmatrix *m ); +extern void +_math_matrix_mul_matrix( GLmatrix *dest, const GLmatrix *a, const GLmatrix *b ); +extern void +_math_matrix_mul_floats( GLmatrix *dest, const GLfloat *b ); +extern void +_math_matrix_loadf( GLmatrix *mat, const GLfloat *m ); +extern void +_math_matrix_translate( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z ); +extern void +_math_matrix_rotate( GLmatrix *m, GLfloat angle, + GLfloat x, GLfloat y, GLfloat z ); +extern void +_math_matrix_scale( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z ); +extern void +_math_matrix_ortho( GLmatrix *mat, + GLfloat left, GLfloat right, + GLfloat bottom, GLfloat top, + GLfloat nearval, GLfloat farval ); +extern void +_math_matrix_frustum( GLmatrix *mat, + GLfloat left, GLfloat right, + GLfloat bottom, GLfloat top, + GLfloat nearval, GLfloat farval ); +extern void +_math_matrix_viewport(GLmatrix *m, GLint x, GLint y, GLint width, GLint height, + GLfloat zNear, GLfloat zFar, GLfloat depthMax); +extern void +_math_matrix_set_identity( GLmatrix *dest ); +extern void +_math_matrix_copy( GLmatrix *to, const GLmatrix *from ); +extern void +_math_matrix_analyse( GLmatrix *mat ); +extern void +_math_matrix_print( const GLmatrix *m ); +extern GLboolean +_math_matrix_is_length_preserving( const GLmatrix *m ); +extern GLboolean +_math_matrix_has_rotation( const GLmatrix *m ); +extern GLboolean +_math_matrix_is_general_scale( const GLmatrix *m ); +extern GLboolean +_math_matrix_is_dirty( const GLmatrix *m ); +extern void +_math_transposef( GLfloat to[16], const GLfloat from[16] ); +extern void +_math_transposed( GLdouble to[16], const GLdouble from[16] ); +extern void +_math_transposefd( GLfloat to[16], const GLdouble from[16] ); +extern void +_mesa_transform_vector(GLfloat u[4], const GLfloat v[4], const GLfloat m[16]); +struct simple_node { + struct simple_node *next; + struct simple_node *prev; +}; +typedef enum +{ + MESA_FORMAT_NONE = 0, + MESA_FORMAT_RGBA8888, + MESA_FORMAT_RGBA8888_REV, + MESA_FORMAT_ARGB8888, + MESA_FORMAT_ARGB8888_REV, + MESA_FORMAT_XRGB8888, + MESA_FORMAT_XRGB8888_REV, + MESA_FORMAT_RGB888, + MESA_FORMAT_BGR888, + MESA_FORMAT_RGB565, + MESA_FORMAT_RGB565_REV, + MESA_FORMAT_ARGB4444, + MESA_FORMAT_ARGB4444_REV, + MESA_FORMAT_RGBA5551, + MESA_FORMAT_ARGB1555, + MESA_FORMAT_ARGB1555_REV, + MESA_FORMAT_AL44, + MESA_FORMAT_AL88, + MESA_FORMAT_AL88_REV, + MESA_FORMAT_AL1616, + MESA_FORMAT_AL1616_REV, + MESA_FORMAT_RGB332, + MESA_FORMAT_A8, + MESA_FORMAT_A16, + MESA_FORMAT_L8, + MESA_FORMAT_L16, + MESA_FORMAT_I8, + MESA_FORMAT_I16, + MESA_FORMAT_CI8, + MESA_FORMAT_YCBCR, + MESA_FORMAT_YCBCR_REV, + MESA_FORMAT_R8, + MESA_FORMAT_RG88, + MESA_FORMAT_RG88_REV, + MESA_FORMAT_R16, + MESA_FORMAT_RG1616, + MESA_FORMAT_RG1616_REV, + MESA_FORMAT_ARGB2101010, + MESA_FORMAT_Z24_S8, + MESA_FORMAT_S8_Z24, + MESA_FORMAT_Z16, + MESA_FORMAT_X8_Z24, + MESA_FORMAT_Z24_X8, + MESA_FORMAT_Z32, + MESA_FORMAT_S8, + MESA_FORMAT_SRGB8, + MESA_FORMAT_SRGBA8, + MESA_FORMAT_SARGB8, + MESA_FORMAT_SL8, + MESA_FORMAT_SLA8, + MESA_FORMAT_SRGB_DXT1, + MESA_FORMAT_SRGBA_DXT1, + MESA_FORMAT_SRGBA_DXT3, + MESA_FORMAT_SRGBA_DXT5, + MESA_FORMAT_RGB_FXT1, + MESA_FORMAT_RGBA_FXT1, + MESA_FORMAT_RGB_DXT1, + MESA_FORMAT_RGBA_DXT1, + MESA_FORMAT_RGBA_DXT3, + MESA_FORMAT_RGBA_DXT5, + MESA_FORMAT_RGBA_FLOAT32, + MESA_FORMAT_RGBA_FLOAT16, + MESA_FORMAT_RGB_FLOAT32, + MESA_FORMAT_RGB_FLOAT16, + MESA_FORMAT_ALPHA_FLOAT32, + MESA_FORMAT_ALPHA_FLOAT16, + MESA_FORMAT_LUMINANCE_FLOAT32, + MESA_FORMAT_LUMINANCE_FLOAT16, + MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32, + MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16, + MESA_FORMAT_INTENSITY_FLOAT32, + MESA_FORMAT_INTENSITY_FLOAT16, + MESA_FORMAT_R_FLOAT32, + MESA_FORMAT_R_FLOAT16, + MESA_FORMAT_RG_FLOAT32, + MESA_FORMAT_RG_FLOAT16, + MESA_FORMAT_RGBA_INT8, + MESA_FORMAT_RGBA_INT16, + MESA_FORMAT_RGBA_INT32, + MESA_FORMAT_RGBA_UINT8, + MESA_FORMAT_RGBA_UINT16, + MESA_FORMAT_RGBA_UINT32, + MESA_FORMAT_DUDV8, + MESA_FORMAT_SIGNED_R8, + MESA_FORMAT_SIGNED_RG88_REV, + MESA_FORMAT_SIGNED_RGBX8888, + MESA_FORMAT_SIGNED_RGBA8888, + MESA_FORMAT_SIGNED_RGBA8888_REV, + MESA_FORMAT_SIGNED_R16, + MESA_FORMAT_SIGNED_GR1616, + MESA_FORMAT_SIGNED_RGB_16, + MESA_FORMAT_SIGNED_RGBA_16, + MESA_FORMAT_RGBA_16, + MESA_FORMAT_RED_RGTC1, + MESA_FORMAT_SIGNED_RED_RGTC1, + MESA_FORMAT_RG_RGTC2, + MESA_FORMAT_SIGNED_RG_RGTC2, + MESA_FORMAT_L_LATC1, + MESA_FORMAT_SIGNED_L_LATC1, + MESA_FORMAT_LA_LATC2, + MESA_FORMAT_SIGNED_LA_LATC2, + MESA_FORMAT_SIGNED_A8, + MESA_FORMAT_SIGNED_L8, + MESA_FORMAT_SIGNED_AL88, + MESA_FORMAT_SIGNED_I8, + MESA_FORMAT_SIGNED_A16, + MESA_FORMAT_SIGNED_L16, + MESA_FORMAT_SIGNED_AL1616, + MESA_FORMAT_SIGNED_I16, + MESA_FORMAT_RGB9_E5_FLOAT, + MESA_FORMAT_R11_G11_B10_FLOAT, + MESA_FORMAT_COUNT +} gl_format; +extern const char * +_mesa_get_format_name(gl_format format); +extern GLint +_mesa_get_format_bytes(gl_format format); +extern GLint +_mesa_get_format_bits(gl_format format, GLenum pname); +extern GLenum +_mesa_get_format_datatype(gl_format format); +extern GLenum +_mesa_get_format_base_format(gl_format format); +extern void +_mesa_get_format_block_size(gl_format format, GLuint *bw, GLuint *bh); +extern GLboolean +_mesa_is_format_compressed(gl_format format); +extern GLboolean +_mesa_is_format_packed_depth_stencil(gl_format format); +extern GLboolean +_mesa_is_format_integer_color(gl_format format); +extern GLenum +_mesa_get_format_color_encoding(gl_format format); +extern GLuint +_mesa_format_image_size(gl_format format, GLsizei width, + GLsizei height, GLsizei depth); +extern uint64_t +_mesa_format_image_size64(gl_format format, GLsizei width, + GLsizei height, GLsizei depth); +extern GLint +_mesa_format_row_stride(gl_format format, GLsizei width); +extern void +_mesa_format_to_type_and_comps(gl_format format, + GLenum *datatype, GLuint *comps); +extern void +_mesa_test_formats(void); +extern gl_format +_mesa_get_srgb_format_linear(gl_format format); + typedef GLubyte GLchan; + typedef GLubyte GLstencil; +typedef GLuint64 GLbitfield64; +struct _mesa_HashTable; +struct gl_attrib_node; +struct gl_list_extensions; +struct gl_meta_state; +struct gl_pixelstore_attrib; +struct gl_program_cache; +struct gl_texture_format; +struct gl_texture_image; +struct gl_texture_object; +struct gl_context; +struct st_context; +typedef enum +{ + MESA_SHADER_VERTEX = 0, + MESA_SHADER_FRAGMENT = 1, + MESA_SHADER_GEOMETRY = 2, + MESA_SHADER_TYPES = 3 +} gl_shader_type; +typedef enum +{ + VERT_ATTRIB_POS = 0, + VERT_ATTRIB_WEIGHT = 1, + VERT_ATTRIB_NORMAL = 2, + VERT_ATTRIB_COLOR0 = 3, + VERT_ATTRIB_COLOR1 = 4, + VERT_ATTRIB_FOG = 5, + VERT_ATTRIB_COLOR_INDEX = 6, + VERT_ATTRIB_POINT_SIZE = 6, + VERT_ATTRIB_EDGEFLAG = 7, + VERT_ATTRIB_TEX0 = 8, + VERT_ATTRIB_TEX1 = 9, + VERT_ATTRIB_TEX2 = 10, + VERT_ATTRIB_TEX3 = 11, + VERT_ATTRIB_TEX4 = 12, + VERT_ATTRIB_TEX5 = 13, + VERT_ATTRIB_TEX6 = 14, + VERT_ATTRIB_TEX7 = 15, + VERT_ATTRIB_GENERIC0 = 16, + VERT_ATTRIB_GENERIC1 = 17, + VERT_ATTRIB_GENERIC2 = 18, + VERT_ATTRIB_GENERIC3 = 19, + VERT_ATTRIB_GENERIC4 = 20, + VERT_ATTRIB_GENERIC5 = 21, + VERT_ATTRIB_GENERIC6 = 22, + VERT_ATTRIB_GENERIC7 = 23, + VERT_ATTRIB_GENERIC8 = 24, + VERT_ATTRIB_GENERIC9 = 25, + VERT_ATTRIB_GENERIC10 = 26, + VERT_ATTRIB_GENERIC11 = 27, + VERT_ATTRIB_GENERIC12 = 28, + VERT_ATTRIB_GENERIC13 = 29, + VERT_ATTRIB_GENERIC14 = 30, + VERT_ATTRIB_GENERIC15 = 31, + VERT_ATTRIB_MAX = 32 +} gl_vert_attrib; +typedef enum +{ + VERT_RESULT_HPOS = 0, + VERT_RESULT_COL0 = 1, + VERT_RESULT_COL1 = 2, + VERT_RESULT_FOGC = 3, + VERT_RESULT_TEX0 = 4, + VERT_RESULT_TEX1 = 5, + VERT_RESULT_TEX2 = 6, + VERT_RESULT_TEX3 = 7, + VERT_RESULT_TEX4 = 8, + VERT_RESULT_TEX5 = 9, + VERT_RESULT_TEX6 = 10, + VERT_RESULT_TEX7 = 11, + VERT_RESULT_PSIZ = 12, + VERT_RESULT_BFC0 = 13, + VERT_RESULT_BFC1 = 14, + VERT_RESULT_EDGE = 15, + VERT_RESULT_VAR0 = 16, + VERT_RESULT_MAX = (VERT_RESULT_VAR0 + 16) +} gl_vert_result; +typedef enum +{ + GEOM_ATTRIB_POSITION = 0, + GEOM_ATTRIB_COLOR0 = 1, + GEOM_ATTRIB_COLOR1 = 2, + GEOM_ATTRIB_SECONDARY_COLOR0 = 3, + GEOM_ATTRIB_SECONDARY_COLOR1 = 4, + GEOM_ATTRIB_FOG_FRAG_COORD = 5, + GEOM_ATTRIB_POINT_SIZE = 6, + GEOM_ATTRIB_CLIP_VERTEX = 7, + GEOM_ATTRIB_PRIMITIVE_ID = 8, + GEOM_ATTRIB_TEX_COORD = 9, + GEOM_ATTRIB_VAR0 = 16, + GEOM_ATTRIB_MAX = (GEOM_ATTRIB_VAR0 + 16) +} gl_geom_attrib; +typedef enum +{ + GEOM_RESULT_POS = 0, + GEOM_RESULT_COL0 = 1, + GEOM_RESULT_COL1 = 2, + GEOM_RESULT_SCOL0 = 3, + GEOM_RESULT_SCOL1 = 4, + GEOM_RESULT_FOGC = 5, + GEOM_RESULT_TEX0 = 6, + GEOM_RESULT_TEX1 = 7, + GEOM_RESULT_TEX2 = 8, + GEOM_RESULT_TEX3 = 9, + GEOM_RESULT_TEX4 = 10, + GEOM_RESULT_TEX5 = 11, + GEOM_RESULT_TEX6 = 12, + GEOM_RESULT_TEX7 = 13, + GEOM_RESULT_PSIZ = 14, + GEOM_RESULT_CLPV = 15, + GEOM_RESULT_PRID = 16, + GEOM_RESULT_LAYR = 17, + GEOM_RESULT_VAR0 = 18, + GEOM_RESULT_MAX = (GEOM_RESULT_VAR0 + 16 - 2) +} gl_geom_result; +typedef enum +{ + FRAG_ATTRIB_WPOS = 0, + FRAG_ATTRIB_COL0 = 1, + FRAG_ATTRIB_COL1 = 2, + FRAG_ATTRIB_FOGC = 3, + FRAG_ATTRIB_TEX0 = 4, + FRAG_ATTRIB_TEX1 = 5, + FRAG_ATTRIB_TEX2 = 6, + FRAG_ATTRIB_TEX3 = 7, + FRAG_ATTRIB_TEX4 = 8, + FRAG_ATTRIB_TEX5 = 9, + FRAG_ATTRIB_TEX6 = 10, + FRAG_ATTRIB_TEX7 = 11, + FRAG_ATTRIB_FACE = 12, + FRAG_ATTRIB_PNTC = 13, + FRAG_ATTRIB_VAR0 = 14, + FRAG_ATTRIB_MAX = (FRAG_ATTRIB_VAR0 + 16) +} gl_frag_attrib; +typedef enum +{ + FRAG_RESULT_DEPTH = 0, + FRAG_RESULT_STENCIL = 1, + FRAG_RESULT_COLOR = 2, + FRAG_RESULT_DATA0 = 3, + FRAG_RESULT_MAX = (FRAG_RESULT_DATA0 + 8) +} gl_frag_result; +typedef enum +{ + BUFFER_FRONT_LEFT, + BUFFER_BACK_LEFT, + BUFFER_FRONT_RIGHT, + BUFFER_BACK_RIGHT, + BUFFER_DEPTH, + BUFFER_STENCIL, + BUFFER_ACCUM, + BUFFER_AUX0, + BUFFER_COLOR0, + BUFFER_COLOR1, + BUFFER_COLOR2, + BUFFER_COLOR3, + BUFFER_COLOR4, + BUFFER_COLOR5, + BUFFER_COLOR6, + BUFFER_COLOR7, + BUFFER_COUNT +} gl_buffer_index; +struct gl_config +{ + GLboolean rgbMode; + GLboolean floatMode; + GLboolean colorIndexMode; + GLuint doubleBufferMode; + GLuint stereoMode; + GLboolean haveAccumBuffer; + GLboolean haveDepthBuffer; + GLboolean haveStencilBuffer; + GLint redBits, greenBits, blueBits, alphaBits; + GLuint redMask, greenMask, blueMask, alphaMask; + GLint rgbBits; + GLint indexBits; + GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits; + GLint depthBits; + GLint stencilBits; + GLint numAuxBuffers; + GLint level; + GLint visualRating; + GLint transparentPixel; + GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha; + GLint transparentIndex; + GLint sampleBuffers; + GLint samples; + GLint maxPbufferWidth; + GLint maxPbufferHeight; + GLint maxPbufferPixels; + GLint optimalPbufferWidth; + GLint optimalPbufferHeight; + GLint swapMethod; + GLint bindToTextureRgb; + GLint bindToTextureRgba; + GLint bindToMipmapTexture; + GLint bindToTextureTargets; + GLint yInverted; + GLint sRGBCapable; +}; +struct gl_color_table +{ + GLenum InternalFormat; + GLenum _BaseFormat; + GLuint Size; + GLfloat *TableF; + GLubyte *TableUB; + GLubyte RedSize; + GLubyte GreenSize; + GLubyte BlueSize; + GLubyte AlphaSize; + GLubyte LuminanceSize; + GLubyte IntensitySize; +}; +struct gl_shine_tab +{ + struct gl_shine_tab *next, *prev; + GLfloat tab[256 +1]; + GLfloat shininess; + GLuint refcount; +}; +struct gl_light +{ + struct gl_light *next; + struct gl_light *prev; + GLfloat Ambient[4]; + GLfloat Diffuse[4]; + GLfloat Specular[4]; + GLfloat EyePosition[4]; + GLfloat SpotDirection[4]; + GLfloat SpotExponent; + GLfloat SpotCutoff; + GLfloat _CosCutoffNeg; + GLfloat _CosCutoff; + GLfloat ConstantAttenuation; + GLfloat LinearAttenuation; + GLfloat QuadraticAttenuation; + GLboolean Enabled; + GLbitfield _Flags; + GLfloat _Position[4]; + GLfloat _VP_inf_norm[3]; + GLfloat _h_inf_norm[3]; + GLfloat _NormSpotDirection[4]; + GLfloat _VP_inf_spot_attenuation; + GLfloat _SpotExpTable[512][2]; + GLfloat _MatAmbient[2][3]; + GLfloat _MatDiffuse[2][3]; + GLfloat _MatSpecular[2][3]; + GLfloat _dli; + GLfloat _sli; +}; +struct gl_lightmodel +{ + GLfloat Ambient[4]; + GLboolean LocalViewer; + GLboolean TwoSide; + GLenum ColorControl; +}; +struct gl_material +{ + GLfloat Attrib[12][4]; +}; +struct gl_accum_attrib +{ + GLfloat ClearColor[4]; +}; +struct gl_colorbuffer_attrib +{ + GLuint ClearIndex; + GLfloat ClearColorUnclamped[4]; + GLclampf ClearColor[4]; + GLuint IndexMask; + GLubyte ColorMask[8][4]; + GLenum DrawBuffer[8]; + GLboolean AlphaEnabled; + GLenum AlphaFunc; + GLfloat AlphaRefUnclamped; + GLclampf AlphaRef; + GLbitfield BlendEnabled; + GLfloat BlendColorUnclamped[4]; + GLfloat BlendColor[4]; + struct + { + GLenum SrcRGB; + GLenum DstRGB; + GLenum SrcA; + GLenum DstA; + GLenum EquationRGB; + GLenum EquationA; + } Blend[8]; + GLboolean _BlendFuncPerBuffer; + GLboolean _BlendEquationPerBuffer; + GLenum LogicOp; + GLboolean IndexLogicOpEnabled; + GLboolean ColorLogicOpEnabled; + GLboolean _LogicOpEnabled; + GLboolean DitherFlag; + GLenum ClampFragmentColor; + GLboolean _ClampFragmentColor; + GLenum ClampReadColor; + GLboolean _ClampReadColor; + GLboolean sRGBEnabled; +}; +struct gl_current_attrib +{ + GLfloat Attrib[VERT_ATTRIB_MAX][4]; + GLfloat RasterPos[4]; + GLfloat RasterDistance; + GLfloat RasterColor[4]; + GLfloat RasterSecondaryColor[4]; + GLfloat RasterTexCoords[8][4]; + GLboolean RasterPosValid; +}; +struct gl_depthbuffer_attrib +{ + GLenum Func; + GLclampd Clear; + GLboolean Test; + GLboolean Mask; + GLboolean BoundsTest; + GLfloat BoundsMin, BoundsMax; +}; +struct gl_eval_attrib +{ + GLboolean Map1Color4; + GLboolean Map1Index; + GLboolean Map1Normal; + GLboolean Map1TextureCoord1; + GLboolean Map1TextureCoord2; + GLboolean Map1TextureCoord3; + GLboolean Map1TextureCoord4; + GLboolean Map1Vertex3; + GLboolean Map1Vertex4; + GLboolean Map1Attrib[16]; + GLboolean Map2Color4; + GLboolean Map2Index; + GLboolean Map2Normal; + GLboolean Map2TextureCoord1; + GLboolean Map2TextureCoord2; + GLboolean Map2TextureCoord3; + GLboolean Map2TextureCoord4; + GLboolean Map2Vertex3; + GLboolean Map2Vertex4; + GLboolean Map2Attrib[16]; + GLboolean AutoNormal; + GLint MapGrid1un; + GLfloat MapGrid1u1, MapGrid1u2, MapGrid1du; + GLint MapGrid2un, MapGrid2vn; + GLfloat MapGrid2u1, MapGrid2u2, MapGrid2du; + GLfloat MapGrid2v1, MapGrid2v2, MapGrid2dv; +}; +struct gl_fog_attrib +{ + GLboolean Enabled; + GLfloat ColorUnclamped[4]; + GLfloat Color[4]; + GLfloat Density; + GLfloat Start; + GLfloat End; + GLfloat Index; + GLenum Mode; + GLboolean ColorSumEnabled; + GLenum FogCoordinateSource; + GLfloat _Scale; +}; +enum gl_frag_depth_layout { + FRAG_DEPTH_LAYOUT_NONE, + FRAG_DEPTH_LAYOUT_ANY, + FRAG_DEPTH_LAYOUT_GREATER, + FRAG_DEPTH_LAYOUT_LESS, + FRAG_DEPTH_LAYOUT_UNCHANGED +}; +struct gl_hint_attrib +{ + GLenum PerspectiveCorrection; + GLenum PointSmooth; + GLenum LineSmooth; + GLenum PolygonSmooth; + GLenum Fog; + GLenum ClipVolumeClipping; + GLenum TextureCompression; + GLenum GenerateMipmap; + GLenum FragmentShaderDerivative; +}; +struct gl_light_attrib +{ + struct gl_light Light[8]; + struct gl_lightmodel Model; + struct gl_material Material; + GLboolean Enabled; + GLenum ShadeModel; + GLenum ProvokingVertex; + GLenum ColorMaterialFace; + GLenum ColorMaterialMode; + GLbitfield ColorMaterialBitmask; + GLboolean ColorMaterialEnabled; + GLenum ClampVertexColor; + GLboolean _ClampVertexColor; + struct gl_light EnabledList; + GLboolean _NeedEyeCoords; + GLboolean _NeedVertices; + GLbitfield _Flags; + GLfloat _BaseColor[2][3]; +}; +struct gl_line_attrib +{ + GLboolean SmoothFlag; + GLboolean StippleFlag; + GLushort StipplePattern; + GLint StippleFactor; + GLfloat Width; +}; +struct gl_list_attrib +{ + GLuint ListBase; +}; +struct gl_multisample_attrib +{ + GLboolean Enabled; + GLboolean _Enabled; + GLboolean SampleAlphaToCoverage; + GLboolean SampleAlphaToOne; + GLboolean SampleCoverage; + GLfloat SampleCoverageValue; + GLboolean SampleCoverageInvert; +}; +struct gl_pixelmap +{ + GLint Size; + GLfloat Map[256]; + GLubyte Map8[256]; +}; +struct gl_pixelmaps +{ + struct gl_pixelmap RtoR; + struct gl_pixelmap GtoG; + struct gl_pixelmap BtoB; + struct gl_pixelmap AtoA; + struct gl_pixelmap ItoR; + struct gl_pixelmap ItoG; + struct gl_pixelmap ItoB; + struct gl_pixelmap ItoA; + struct gl_pixelmap ItoI; + struct gl_pixelmap StoS; +}; +struct gl_pixel_attrib +{ + GLenum ReadBuffer; + GLfloat RedBias, RedScale; + GLfloat GreenBias, GreenScale; + GLfloat BlueBias, BlueScale; + GLfloat AlphaBias, AlphaScale; + GLfloat DepthBias, DepthScale; + GLint IndexShift, IndexOffset; + GLboolean MapColorFlag; + GLboolean MapStencilFlag; + GLfloat ZoomX, ZoomY; +}; +struct gl_point_attrib +{ + GLboolean SmoothFlag; + GLfloat Size; + GLfloat Params[3]; + GLfloat MinSize, MaxSize; + GLfloat Threshold; + GLboolean _Attenuated; + GLboolean PointSprite; + GLboolean CoordReplace[8]; + GLenum SpriteRMode; + GLenum SpriteOrigin; +}; +struct gl_polygon_attrib +{ + GLenum FrontFace; + GLenum FrontMode; + GLenum BackMode; + GLboolean _FrontBit; + GLboolean CullFlag; + GLboolean SmoothFlag; + GLboolean StippleFlag; + GLenum CullFaceMode; + GLfloat OffsetFactor; + GLfloat OffsetUnits; + GLboolean OffsetPoint; + GLboolean OffsetLine; + GLboolean OffsetFill; +}; +struct gl_scissor_attrib +{ + GLboolean Enabled; + GLint X, Y; + GLsizei Width, Height; +}; +struct gl_stencil_attrib +{ + GLboolean Enabled; + GLboolean TestTwoSide; + GLubyte ActiveFace; + GLboolean _Enabled; + GLboolean _TestTwoSide; + GLubyte _BackFace; + GLenum Function[3]; + GLenum FailFunc[3]; + GLenum ZPassFunc[3]; + GLenum ZFailFunc[3]; + GLint Ref[3]; + GLuint ValueMask[3]; + GLuint WriteMask[3]; + GLuint Clear; +}; +typedef enum +{ + TEXTURE_BUFFER_INDEX, + TEXTURE_2D_ARRAY_INDEX, + TEXTURE_1D_ARRAY_INDEX, + TEXTURE_CUBE_INDEX, + TEXTURE_3D_INDEX, + TEXTURE_RECT_INDEX, + TEXTURE_2D_INDEX, + TEXTURE_1D_INDEX, + NUM_TEXTURE_TARGETS +} gl_texture_index; +typedef void (*FetchTexelFuncC)( const struct gl_texture_image *texImage, + GLint col, GLint row, GLint img, + GLchan *texelOut ); +typedef void (*FetchTexelFuncF)( const struct gl_texture_image *texImage, + GLint col, GLint row, GLint img, + GLfloat *texelOut ); +typedef void (*StoreTexelFunc)(struct gl_texture_image *texImage, + GLint col, GLint row, GLint img, + const void *texel); +struct gl_texture_image +{ + GLint InternalFormat; + GLenum _BaseFormat; + gl_format TexFormat; + GLuint Border; + GLuint Width; + GLuint Height; + GLuint Depth; + GLuint Width2; + GLuint Height2; + GLuint Depth2; + GLuint WidthLog2; + GLuint HeightLog2; + GLuint DepthLog2; + GLuint MaxLog2; + GLfloat WidthScale; + GLfloat HeightScale; + GLfloat DepthScale; + GLboolean IsClientData; + GLboolean _IsPowerOfTwo; + struct gl_texture_object *TexObject; + FetchTexelFuncC FetchTexelc; + FetchTexelFuncF FetchTexelf; + GLuint RowStride; + GLuint *ImageOffsets; + GLvoid *Data; + void *DriverData; +}; +typedef enum +{ + FACE_POS_X = 0, + FACE_NEG_X = 1, + FACE_POS_Y = 2, + FACE_NEG_Y = 3, + FACE_POS_Z = 4, + FACE_NEG_Z = 5, + MAX_FACES = 6 +} gl_face_index; +struct gl_sampler_object +{ + GLuint Name; + GLint RefCount; + GLenum WrapS; + GLenum WrapT; + GLenum WrapR; + GLenum MinFilter; + GLenum MagFilter; + union { + GLfloat f[4]; + GLuint ui[4]; + GLint i[4]; + } BorderColor; + GLfloat MinLod; + GLfloat MaxLod; + GLfloat LodBias; + GLfloat MaxAnisotropy; + GLenum CompareMode; + GLenum CompareFunc; + GLfloat CompareFailValue; + GLenum sRGBDecode; + GLboolean CubeMapSeamless; + GLenum DepthMode; + GLboolean _CompleteTexture; +}; +struct gl_texture_object +{ + _glthread_Mutex Mutex; + GLint RefCount; + GLuint Name; + GLenum Target; + struct gl_sampler_object Sampler; + GLfloat Priority; + GLint BaseLevel; + GLint MaxLevel; + GLint _MaxLevel; + GLfloat _MaxLambda; + GLint CropRect[4]; + GLenum Swizzle[4]; + GLuint _Swizzle; + GLboolean GenerateMipmap; + GLboolean _Complete; + GLboolean _RenderToTexture; + GLboolean Purgeable; + struct gl_texture_image *Image[MAX_FACES][15]; + struct gl_buffer_object *BufferObject; + GLenum BufferObjectFormat; + struct gl_color_table Palette; + void *DriverData; +}; +struct gl_tex_env_combine_state +{ + GLenum ModeRGB; + GLenum ModeA; + GLenum SourceRGB[4]; + GLenum SourceA[4]; + GLenum OperandRGB[4]; + GLenum OperandA[4]; + GLuint ScaleShiftRGB; + GLuint ScaleShiftA; + GLuint _NumArgsRGB; + GLuint _NumArgsA; +}; +struct gl_texgen +{ + GLenum Mode; + GLbitfield _ModeBit; + GLfloat ObjectPlane[4]; + GLfloat EyePlane[4]; +}; +struct gl_texture_unit +{ + GLbitfield Enabled; + GLbitfield _ReallyEnabled; + GLenum EnvMode; + GLclampf EnvColor[4]; + GLfloat EnvColorUnclamped[4]; + struct gl_texgen GenS; + struct gl_texgen GenT; + struct gl_texgen GenR; + struct gl_texgen GenQ; + GLbitfield TexGenEnabled; + GLbitfield _GenFlags; + GLfloat LodBias; + GLenum BumpTarget; + GLfloat RotMatrix[4]; + struct gl_sampler_object *Sampler; + struct gl_tex_env_combine_state Combine; + struct gl_tex_env_combine_state _EnvMode; + struct gl_tex_env_combine_state *_CurrentCombine; + struct gl_texture_object *CurrentTex[NUM_TEXTURE_TARGETS]; + struct gl_texture_object *_Current; +}; +struct gl_texture_attrib +{ + GLuint CurrentUnit; + struct gl_texture_unit Unit[(16 + 16)]; + struct gl_texture_object *ProxyTex[NUM_TEXTURE_TARGETS]; + struct gl_buffer_object *BufferObject; + GLboolean CubeMapSeamless; + GLboolean SharedPalette; + struct gl_color_table Palette; + GLbitfield _EnabledUnits; + GLbitfield _EnabledCoordUnits; + GLbitfield _TexGenEnabled; + GLbitfield _TexMatEnabled; + GLbitfield _GenFlags; +}; +struct gl_transform_attrib +{ + GLenum MatrixMode; + GLfloat EyeUserPlane[6][4]; + GLfloat _ClipUserPlane[6][4]; + GLbitfield ClipPlanesEnabled; + GLboolean Normalize; + GLboolean RescaleNormals; + GLboolean RasterPositionUnclipped; + GLboolean DepthClamp; + GLfloat CullEyePos[4]; + GLfloat CullObjPos[4]; +}; +struct gl_viewport_attrib +{ + GLint X, Y; + GLsizei Width, Height; + GLfloat Near, Far; + GLmatrix _WindowMap; +}; +struct gl_buffer_object +{ + _glthread_Mutex Mutex; + GLint RefCount; + GLuint Name; + GLenum Usage; + GLsizeiptrARB Size; + GLubyte *Data; + GLbitfield AccessFlags; + GLvoid *Pointer; + GLintptr Offset; + GLsizeiptr Length; + GLboolean Written; + GLboolean Purgeable; +}; +struct gl_pixelstore_attrib +{ + GLint Alignment; + GLint RowLength; + GLint SkipPixels; + GLint SkipRows; + GLint ImageHeight; + GLint SkipImages; + GLboolean SwapBytes; + GLboolean LsbFirst; + GLboolean ClientStorage; + GLboolean Invert; + struct gl_buffer_object *BufferObj; +}; +struct gl_client_array +{ + GLint Size; + GLenum Type; + GLenum Format; + GLsizei Stride; + GLsizei StrideB; + const GLubyte *Ptr; + GLboolean Enabled; + GLboolean Normalized; + GLboolean Integer; + GLuint InstanceDivisor; + GLuint _ElementSize; + struct gl_buffer_object *BufferObj; + GLuint _MaxElement; +}; +struct gl_array_object +{ + GLuint Name; + GLint RefCount; + _glthread_Mutex Mutex; + GLboolean VBOonly; + struct gl_client_array Vertex; + struct gl_client_array Weight; + struct gl_client_array Normal; + struct gl_client_array Color; + struct gl_client_array SecondaryColor; + struct gl_client_array FogCoord; + struct gl_client_array Index; + struct gl_client_array EdgeFlag; + struct gl_client_array TexCoord[8]; + struct gl_client_array PointSize; + struct gl_client_array VertexAttrib[16]; + GLbitfield _Enabled; + GLuint _MaxElement; +}; +struct gl_array_attrib +{ + struct gl_array_object *ArrayObj; + struct gl_array_object *DefaultArrayObj; + struct _mesa_HashTable *Objects; + GLint ActiveTexture; + GLuint LockFirst; + GLuint LockCount; + GLboolean PrimitiveRestart; + GLuint RestartIndex; + GLbitfield NewState; + GLboolean RebindArrays; + struct gl_buffer_object *ArrayBufferObj; + struct gl_buffer_object *ElementArrayBufferObj; +}; +struct gl_feedback +{ + GLenum Type; + GLbitfield _Mask; + GLfloat *Buffer; + GLuint BufferSize; + GLuint Count; +}; +struct gl_selection +{ + GLuint *Buffer; + GLuint BufferSize; + GLuint BufferCount; + GLuint Hits; + GLuint NameStackDepth; + GLuint NameStack[64]; + GLboolean HitFlag; + GLfloat HitMinZ; + GLfloat HitMaxZ; +}; +struct gl_1d_map +{ + GLuint Order; + GLfloat u1, u2, du; + GLfloat *Points; +}; +struct gl_2d_map +{ + GLuint Uorder; + GLuint Vorder; + GLfloat u1, u2, du; + GLfloat v1, v2, dv; + GLfloat *Points; +}; +struct gl_evaluators +{ + struct gl_1d_map Map1Vertex3; + struct gl_1d_map Map1Vertex4; + struct gl_1d_map Map1Index; + struct gl_1d_map Map1Color4; + struct gl_1d_map Map1Normal; + struct gl_1d_map Map1Texture1; + struct gl_1d_map Map1Texture2; + struct gl_1d_map Map1Texture3; + struct gl_1d_map Map1Texture4; + struct gl_1d_map Map1Attrib[16]; + struct gl_2d_map Map2Vertex3; + struct gl_2d_map Map2Vertex4; + struct gl_2d_map Map2Index; + struct gl_2d_map Map2Color4; + struct gl_2d_map Map2Normal; + struct gl_2d_map Map2Texture1; + struct gl_2d_map Map2Texture2; + struct gl_2d_map Map2Texture3; + struct gl_2d_map Map2Texture4; + struct gl_2d_map Map2Attrib[16]; +}; +typedef enum +{ + PROGRAM_TEMPORARY, + PROGRAM_INPUT, + PROGRAM_OUTPUT, + PROGRAM_VARYING, + PROGRAM_LOCAL_PARAM, + PROGRAM_ENV_PARAM, + PROGRAM_STATE_VAR, + PROGRAM_NAMED_PARAM, + PROGRAM_CONSTANT, + PROGRAM_UNIFORM, + PROGRAM_WRITE_ONLY, + PROGRAM_ADDRESS, + PROGRAM_SAMPLER, + PROGRAM_SYSTEM_VALUE, + PROGRAM_UNDEFINED, + PROGRAM_FILE_MAX +} gl_register_file; +typedef enum +{ + SYSTEM_VALUE_FRONT_FACE, + SYSTEM_VALUE_INSTANCE_ID, + SYSTEM_VALUE_MAX +} gl_system_value; +struct prog_instruction; +struct gl_program_parameter_list; +struct gl_uniform_list; +struct gl_program +{ + GLuint Id; + GLubyte *String; + GLint RefCount; + GLenum Target; + GLenum Format; + GLboolean Resident; + struct prog_instruction *Instructions; + GLbitfield InputsRead; + GLbitfield64 OutputsWritten; + GLbitfield SystemValuesRead; + GLbitfield InputFlags[32]; + GLbitfield OutputFlags[64]; + GLbitfield TexturesUsed[((8 > 16) ? 8 : 16)]; + GLbitfield SamplersUsed; + GLbitfield ShadowSamplers; + struct gl_program_parameter_list *Parameters; + GLfloat LocalParams[1024][4]; + struct gl_program_parameter_list *Varying; + struct gl_program_parameter_list *Attributes; + GLubyte SamplerUnits[16]; + gl_texture_index SamplerTargets[16]; + GLbitfield IndirectRegisterFiles; + GLuint NumInstructions; + GLuint NumTemporaries; + GLuint NumParameters; + GLuint NumAttributes; + GLuint NumAddressRegs; + GLuint NumAluInstructions; + GLuint NumTexInstructions; + GLuint NumTexIndirections; + GLuint NumNativeInstructions; + GLuint NumNativeTemporaries; + GLuint NumNativeParameters; + GLuint NumNativeAttributes; + GLuint NumNativeAddressRegs; + GLuint NumNativeAluInstructions; + GLuint NumNativeTexInstructions; + GLuint NumNativeTexIndirections; +}; +struct gl_vertex_program +{ + struct gl_program Base; + GLboolean IsNVProgram; + GLboolean IsPositionInvariant; +}; +struct gl_geometry_program +{ + struct gl_program Base; + GLint VerticesOut; + GLenum InputType; + GLenum OutputType; +}; +struct gl_fragment_program +{ + struct gl_program Base; + GLboolean UsesKill; + GLboolean OriginUpperLeft; + GLboolean PixelCenterInteger; + enum gl_frag_depth_layout FragDepthLayout; +}; +struct gl_program_state +{ + GLint ErrorPos; + const char *ErrorString; +}; +struct gl_vertex_program_state +{ + GLboolean Enabled; + GLboolean _Enabled; + GLboolean PointSizeEnabled; + GLboolean TwoSideEnabled; + struct gl_vertex_program *Current; + struct gl_vertex_program *_Current; + GLfloat Parameters[256][4]; + GLenum TrackMatrix[256 / 4]; + GLenum TrackMatrixTransform[256 / 4]; + GLboolean _MaintainTnlProgram; + struct gl_vertex_program *_TnlProgram; + struct gl_program_cache *Cache; + GLboolean _Overriden; +}; +struct gl_geometry_program_state +{ + GLboolean Enabled; + GLboolean _Enabled; + struct gl_geometry_program *Current; + struct gl_geometry_program *_Current; + GLfloat Parameters[256][4]; + struct gl_program_cache *Cache; +}; +struct gl_fragment_program_state +{ + GLboolean Enabled; + GLboolean _Enabled; + struct gl_fragment_program *Current; + struct gl_fragment_program *_Current; + GLfloat Parameters[256][4]; + GLboolean _MaintainTexEnvProgram; + struct gl_fragment_program *_TexEnvProgram; + struct gl_program_cache *Cache; +}; +struct atifs_instruction; +struct atifs_setupinst; +struct ati_fragment_shader +{ + GLuint Id; + GLint RefCount; + struct atifs_instruction *Instructions[2]; + struct atifs_setupinst *SetupInst[2]; + GLfloat Constants[8][4]; + GLbitfield LocalConstDef; + GLubyte numArithInstr[2]; + GLubyte regsAssigned[2]; + GLubyte NumPasses; + GLubyte cur_pass; + GLubyte last_optype; + GLboolean interpinp1; + GLboolean isValid; + GLuint swizzlerq; +}; +struct gl_ati_fragment_shader_state +{ + GLboolean Enabled; + GLboolean _Enabled; + GLboolean Compiling; + GLfloat GlobalConstants[8][4]; + struct ati_fragment_shader *Current; +}; +struct gl_query_object +{ + GLenum Target; + GLuint Id; + GLuint64EXT Result; + GLboolean Active; + GLboolean Ready; +}; +struct gl_query_state +{ + struct _mesa_HashTable *QueryObjects; + struct gl_query_object *CurrentOcclusionObject; + struct gl_query_object *CurrentTimerObject; + struct gl_query_object *CondRenderQuery; + struct gl_query_object *PrimitivesGenerated; + struct gl_query_object *PrimitivesWritten; + struct gl_query_object *TimeElapsed; + GLenum CondRenderMode; +}; +struct gl_sync_object { + struct simple_node link; + GLenum Type; + GLuint Name; + GLint RefCount; + GLboolean DeletePending; + GLenum SyncCondition; + GLbitfield Flags; + GLuint StatusFlag:1; +}; +struct gl_sl_pragmas +{ + GLboolean IgnoreOptimize; + GLboolean IgnoreDebug; + GLboolean Optimize; + GLboolean Debug; +}; +struct gl_shader +{ + GLenum Type; + GLuint Name; + GLint RefCount; + GLboolean DeletePending; + GLboolean CompileStatus; + const GLchar *Source; + GLuint SourceChecksum; + struct gl_program *Program; + GLchar *InfoLog; + struct gl_sl_pragmas Pragmas; + unsigned Version; + struct exec_list *ir; + struct glsl_symbol_table *symbols; + struct gl_shader *builtins_to_link[16]; + unsigned num_builtins_to_link; +}; +struct gl_shader_program +{ + GLenum Type; + GLuint Name; + GLint RefCount; + GLboolean DeletePending; + GLuint NumShaders; + struct gl_shader **Shaders; + struct gl_program_parameter_list *Attributes; + struct { + GLenum BufferMode; + GLuint NumVarying; + GLchar **VaryingNames; + } TransformFeedback; + struct { + GLint VerticesOut; + GLenum InputType; + GLenum OutputType; + } Geom; + struct gl_vertex_program *VertexProgram; + struct gl_fragment_program *FragmentProgram; + struct gl_geometry_program *GeometryProgram; + struct gl_uniform_list *Uniforms; + struct gl_program_parameter_list *Varying; + GLboolean LinkStatus; + GLboolean Validated; + GLboolean _Used; + GLchar *InfoLog; + unsigned Version; + struct gl_shader *_LinkedShaders[MESA_SHADER_TYPES]; +}; +struct gl_shader_state +{ + struct gl_shader_program *CurrentVertexProgram; + struct gl_shader_program *CurrentGeometryProgram; + struct gl_shader_program *CurrentFragmentProgram; + struct gl_shader_program *ActiveProgram; + void *MemPool; + GLbitfield Flags; +}; +struct gl_shader_compiler_options +{ + GLboolean EmitCondCodes; + GLboolean EmitNVTempInitialization; + GLboolean EmitNoIfs; + GLboolean EmitNoLoops; + GLboolean EmitNoFunctions; + GLboolean EmitNoCont; + GLboolean EmitNoMainReturn; + GLboolean EmitNoNoise; + GLboolean EmitNoPow; + GLboolean EmitNoIndirectInput; + GLboolean EmitNoIndirectOutput; + GLboolean EmitNoIndirectTemp; + GLboolean EmitNoIndirectUniform; + GLuint MaxUnrollIterations; + struct gl_sl_pragmas DefaultPragmas; +}; +struct gl_transform_feedback_object +{ + GLuint Name; + GLint RefCount; + GLboolean Active; + GLboolean Paused; + GLuint BufferNames[32]; + struct gl_buffer_object *Buffers[32]; + GLintptr Offset[32]; + GLsizeiptr Size[32]; +}; +struct gl_transform_feedback +{ + GLenum Mode; + GLboolean RasterDiscard; + struct gl_buffer_object *CurrentBuffer; + struct _mesa_HashTable *Objects; + struct gl_transform_feedback_object *CurrentObject; + struct gl_transform_feedback_object *DefaultObject; +}; +struct gl_shared_state +{ + _glthread_Mutex Mutex; + GLint RefCount; + struct _mesa_HashTable *DisplayList; + struct _mesa_HashTable *TexObjects; + struct gl_texture_object *DefaultTex[NUM_TEXTURE_TARGETS]; + struct gl_texture_object *FallbackTex; + _glthread_Mutex TexMutex; + GLuint TextureStateStamp; + struct gl_buffer_object *NullBufferObj; + struct _mesa_HashTable *Programs; + struct gl_vertex_program *DefaultVertexProgram; + struct gl_fragment_program *DefaultFragmentProgram; + struct gl_geometry_program *DefaultGeometryProgram; + struct _mesa_HashTable *ATIShaders; + struct ati_fragment_shader *DefaultFragmentShader; + struct _mesa_HashTable *BufferObjects; + struct _mesa_HashTable *ShaderObjects; + struct _mesa_HashTable *RenderBuffers; + struct _mesa_HashTable *FrameBuffers; + struct simple_node SyncObjects; + struct _mesa_HashTable *SamplerObjects; + void *DriverData; +}; +struct gl_renderbuffer +{ + _glthread_Mutex Mutex; + GLuint ClassID; + GLuint Name; + GLint RefCount; + GLuint Width, Height; + GLint RowStride; + GLboolean Purgeable; + GLboolean AttachedAnytime; + GLubyte NumSamples; + GLenum InternalFormat; + GLenum _BaseFormat; + gl_format Format; + GLenum DataType; + GLvoid *Data; + struct gl_renderbuffer *Wrapped; + void (*Delete)(struct gl_renderbuffer *rb); + GLboolean (*AllocStorage)(struct gl_context *ctx, struct gl_renderbuffer *rb, + GLenum internalFormat, + GLuint width, GLuint height); + void *(*GetPointer)(struct gl_context *ctx, struct gl_renderbuffer *rb, + GLint x, GLint y); + void (*GetRow)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, + GLint x, GLint y, void *values); + void (*GetValues)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, + const GLint x[], const GLint y[], void *values); + void (*PutRow)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, + GLint x, GLint y, const void *values, const GLubyte *mask); + void (*PutRowRGB)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, + GLint x, GLint y, const void *values, const GLubyte *mask); + void (*PutMonoRow)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, + GLint x, GLint y, const void *value, const GLubyte *mask); + void (*PutValues)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, + const GLint x[], const GLint y[], const void *values, + const GLubyte *mask); + void (*PutMonoValues)(struct gl_context *ctx, struct gl_renderbuffer *rb, + GLuint count, const GLint x[], const GLint y[], + const void *value, const GLubyte *mask); +}; +struct gl_renderbuffer_attachment +{ + GLenum Type; + GLboolean Complete; + struct gl_renderbuffer *Renderbuffer; + struct gl_texture_object *Texture; + GLuint TextureLevel; + GLuint CubeMapFace; + GLuint Zoffset; +}; +struct gl_framebuffer +{ + _glthread_Mutex Mutex; + GLuint Name; + GLint RefCount; + GLboolean DeletePending; + struct gl_config Visual; + GLboolean Initialized; + GLuint Width, Height; + GLint _Xmin, _Xmax; + GLint _Ymin, _Ymax; + GLuint _DepthMax; + GLfloat _DepthMaxF; + GLfloat _MRD; + GLenum _Status; + GLboolean _IntegerColor; + struct gl_renderbuffer_attachment Attachment[BUFFER_COUNT]; + GLenum ColorDrawBuffer[8]; + GLenum ColorReadBuffer; + GLuint _NumColorDrawBuffers; + GLint _ColorDrawBufferIndexes[8]; + GLint _ColorReadBufferIndex; + struct gl_renderbuffer *_ColorDrawBuffers[8]; + struct gl_renderbuffer *_ColorReadBuffer; + struct gl_renderbuffer *_DepthBuffer; + struct gl_renderbuffer *_StencilBuffer; + void (*Delete)(struct gl_framebuffer *fb); +}; +struct gl_precision +{ + GLushort RangeMin; + GLushort RangeMax; + GLushort Precision; +}; +struct gl_program_constants +{ + GLuint MaxInstructions; + GLuint MaxAluInstructions; + GLuint MaxTexInstructions; + GLuint MaxTexIndirections; + GLuint MaxAttribs; + GLuint MaxTemps; + GLuint MaxAddressRegs; + GLuint MaxAddressOffset; + GLuint MaxParameters; + GLuint MaxLocalParams; + GLuint MaxEnvParams; + GLuint MaxNativeInstructions; + GLuint MaxNativeAluInstructions; + GLuint MaxNativeTexInstructions; + GLuint MaxNativeTexIndirections; + GLuint MaxNativeAttribs; + GLuint MaxNativeTemps; + GLuint MaxNativeAddressRegs; + GLuint MaxNativeParameters; + GLuint MaxUniformComponents; + struct gl_precision LowFloat, MediumFloat, HighFloat; + struct gl_precision LowInt, MediumInt, HighInt; +}; +struct gl_constants +{ + GLint MaxTextureMbytes; + GLint MaxTextureLevels; + GLint Max3DTextureLevels; + GLint MaxCubeTextureLevels; + GLint MaxArrayTextureLayers; + GLint MaxTextureRectSize; + GLuint MaxTextureCoordUnits; + GLuint MaxTextureImageUnits; + GLuint MaxVertexTextureImageUnits; + GLuint MaxCombinedTextureImageUnits; + GLuint MaxGeometryTextureImageUnits; + GLuint MaxTextureUnits; + GLfloat MaxTextureMaxAnisotropy; + GLfloat MaxTextureLodBias; + GLuint MaxTextureBufferSize; + GLuint MaxArrayLockSize; + GLint SubPixelBits; + GLfloat MinPointSize, MaxPointSize; + GLfloat MinPointSizeAA, MaxPointSizeAA; + GLfloat PointSizeGranularity; + GLfloat MinLineWidth, MaxLineWidth; + GLfloat MinLineWidthAA, MaxLineWidthAA; + GLfloat LineWidthGranularity; + GLuint MaxColorTableSize; + GLuint MaxClipPlanes; + GLuint MaxLights; + GLfloat MaxShininess; + GLfloat MaxSpotExponent; + GLuint MaxViewportWidth, MaxViewportHeight; + struct gl_program_constants VertexProgram; + struct gl_program_constants FragmentProgram; + struct gl_program_constants GeometryProgram; + GLuint MaxProgramMatrices; + GLuint MaxProgramMatrixStackDepth; + GLboolean CheckArrayBounds; + GLuint MaxDrawBuffers; + GLuint MaxColorAttachments; + GLuint MaxRenderbufferSize; + GLuint MaxSamples; + GLuint MaxVarying; + GLuint MaxVertexVaryingComponents; + GLuint MaxGeometryVaryingComponents; + GLuint MaxGeometryOutputVertices; + GLuint MaxGeometryTotalOutputComponents; + GLuint GLSLVersion; + GLbitfield SupportedBumpUnits; + GLuint64 MaxServerWaitTimeout; + GLboolean QuadsFollowProvokingVertexConvention; + GLbitfield ContextFlags; + GLbitfield ProfileMask; + GLuint MaxTransformFeedbackSeparateAttribs; + GLuint MaxTransformFeedbackSeparateComponents; + GLuint MaxTransformFeedbackInterleavedComponents; + GLint MinProgramTexelOffset, MaxProgramTexelOffset; + GLboolean sRGBCapable; + GLenum ResetStrategy; +}; +struct gl_extensions +{ + GLboolean dummy; + GLboolean dummy_true; + GLboolean dummy_false; + GLboolean ARB_ES2_compatibility; + GLboolean ARB_blend_func_extended; + GLboolean ARB_color_buffer_float; + GLboolean ARB_copy_buffer; + GLboolean ARB_depth_buffer_float; + GLboolean ARB_depth_clamp; + GLboolean ARB_depth_texture; + GLboolean ARB_draw_buffers; + GLboolean ARB_draw_buffers_blend; + GLboolean ARB_draw_elements_base_vertex; + GLboolean ARB_draw_instanced; + GLboolean ARB_fragment_coord_conventions; + GLboolean ARB_fragment_program; + GLboolean ARB_fragment_program_shadow; + GLboolean ARB_fragment_shader; + GLboolean ARB_framebuffer_object; + GLboolean ARB_explicit_attrib_location; + GLboolean ARB_geometry_shader4; + GLboolean ARB_half_float_pixel; + GLboolean ARB_half_float_vertex; + GLboolean ARB_instanced_arrays; + GLboolean ARB_map_buffer_range; + GLboolean ARB_multisample; + GLboolean ARB_multitexture; + GLboolean ARB_occlusion_query; + GLboolean ARB_occlusion_query2; + GLboolean ARB_point_sprite; + GLboolean ARB_sampler_objects; + GLboolean ARB_seamless_cube_map; + GLboolean ARB_shader_objects; + GLboolean ARB_shader_stencil_export; + GLboolean ARB_shader_texture_lod; + GLboolean ARB_shading_language_100; + GLboolean ARB_shadow; + GLboolean ARB_shadow_ambient; + GLboolean ARB_sync; + GLboolean ARB_texture_border_clamp; + GLboolean ARB_texture_buffer_object; + GLboolean ARB_texture_compression; + GLboolean ARB_texture_compression_rgtc; + GLboolean ARB_texture_cube_map; + GLboolean ARB_texture_env_combine; + GLboolean ARB_texture_env_crossbar; + GLboolean ARB_texture_env_dot3; + GLboolean ARB_texture_float; + GLboolean ARB_texture_mirrored_repeat; + GLboolean ARB_texture_multisample; + GLboolean ARB_texture_non_power_of_two; + GLboolean ARB_texture_rg; + GLboolean ARB_texture_rgb10_a2ui; + GLboolean ARB_timer_query; + GLboolean ARB_transform_feedback2; + GLboolean ARB_transpose_matrix; + GLboolean ARB_uniform_buffer_object; + GLboolean ARB_vertex_array_object; + GLboolean ARB_vertex_buffer_object; + GLboolean ARB_vertex_program; + GLboolean ARB_vertex_shader; + GLboolean ARB_vertex_type_2_10_10_10_rev; + GLboolean ARB_window_pos; + GLboolean EXT_abgr; + GLboolean EXT_bgra; + GLboolean EXT_blend_color; + GLboolean EXT_blend_equation_separate; + GLboolean EXT_blend_func_separate; + GLboolean EXT_blend_logic_op; + GLboolean EXT_blend_minmax; + GLboolean EXT_blend_subtract; + GLboolean EXT_clip_volume_hint; + GLboolean EXT_compiled_vertex_array; + GLboolean EXT_copy_texture; + GLboolean EXT_depth_bounds_test; + GLboolean EXT_draw_buffers2; + GLboolean EXT_draw_range_elements; + GLboolean EXT_fog_coord; + GLboolean EXT_framebuffer_blit; + GLboolean EXT_framebuffer_multisample; + GLboolean EXT_framebuffer_object; + GLboolean EXT_framebuffer_sRGB; + GLboolean EXT_gpu_program_parameters; + GLboolean EXT_gpu_shader4; + GLboolean EXT_multi_draw_arrays; + GLboolean EXT_paletted_texture; + GLboolean EXT_packed_depth_stencil; + GLboolean EXT_packed_float; + GLboolean EXT_packed_pixels; + GLboolean EXT_pixel_buffer_object; + GLboolean EXT_point_parameters; + GLboolean EXT_polygon_offset; + GLboolean EXT_provoking_vertex; + GLboolean EXT_rescale_normal; + GLboolean EXT_shadow_funcs; + GLboolean EXT_secondary_color; + GLboolean EXT_separate_shader_objects; + GLboolean EXT_separate_specular_color; + GLboolean EXT_shared_texture_palette; + GLboolean EXT_stencil_wrap; + GLboolean EXT_stencil_two_side; + GLboolean EXT_subtexture; + GLboolean EXT_texture; + GLboolean EXT_texture_object; + GLboolean EXT_texture3D; + GLboolean EXT_texture_array; + GLboolean EXT_texture_compression_latc; + GLboolean EXT_texture_compression_s3tc; + GLboolean EXT_texture_env_add; + GLboolean EXT_texture_env_combine; + GLboolean EXT_texture_env_dot3; + GLboolean EXT_texture_filter_anisotropic; + GLboolean EXT_texture_integer; + GLboolean EXT_texture_lod_bias; + GLboolean EXT_texture_mirror_clamp; + GLboolean EXT_texture_shared_exponent; + GLboolean EXT_texture_snorm; + GLboolean EXT_texture_sRGB; + GLboolean EXT_texture_sRGB_decode; + GLboolean EXT_texture_swizzle; + GLboolean EXT_transform_feedback; + GLboolean EXT_timer_query; + GLboolean EXT_vertex_array; + GLboolean EXT_vertex_array_bgra; + GLboolean EXT_vertex_array_set; + GLboolean OES_standard_derivatives; + GLboolean AMD_conservative_depth; + GLboolean AMD_seamless_cubemap_per_texture; + GLboolean APPLE_client_storage; + GLboolean APPLE_packed_pixels; + GLboolean APPLE_vertex_array_object; + GLboolean APPLE_object_purgeable; + GLboolean ATI_envmap_bumpmap; + GLboolean ATI_texture_compression_3dc; + GLboolean ATI_texture_mirror_once; + GLboolean ATI_texture_env_combine3; + GLboolean ATI_fragment_shader; + GLboolean ATI_separate_stencil; + GLboolean IBM_rasterpos_clip; + GLboolean IBM_multimode_draw_arrays; + GLboolean MESA_pack_invert; + GLboolean MESA_resize_buffers; + GLboolean MESA_ycbcr_texture; + GLboolean MESA_texture_array; + GLboolean NV_blend_square; + GLboolean NV_conditional_render; + GLboolean NV_fragment_program; + GLboolean NV_fragment_program_option; + GLboolean NV_light_max_exponent; + GLboolean NV_point_sprite; + GLboolean NV_primitive_restart; + GLboolean NV_texture_barrier; + GLboolean NV_texgen_reflection; + GLboolean NV_texture_env_combine4; + GLboolean NV_texture_rectangle; + GLboolean NV_vertex_program; + GLboolean NV_vertex_program1_1; + GLboolean OES_read_format; + GLboolean SGIS_generate_mipmap; + GLboolean SGIS_texture_edge_clamp; + GLboolean SGIS_texture_lod; + GLboolean TDFX_texture_compression_FXT1; + GLboolean S3_s3tc; + GLboolean OES_EGL_image; + GLboolean OES_draw_texture; + GLboolean EXT_texture_format_BGRA8888; + GLboolean extension_sentinel; + const GLubyte *String; + GLuint Count; +}; +struct gl_matrix_stack +{ + GLmatrix *Top; + GLmatrix *Stack; + GLuint Depth; + GLuint MaxDepth; + GLuint DirtyFlag; +}; +struct gl_buffer_object; +struct gl_context; +struct gl_display_list; +struct gl_framebuffer; +struct gl_pixelstore_attrib; +struct gl_program; +struct gl_renderbuffer; +struct gl_renderbuffer_attachment; +struct gl_shader; +struct gl_shader_program; +struct gl_texture_image; +struct gl_texture_object; +struct dd_function_table { + const GLubyte * (*GetString)( struct gl_context *ctx, GLenum name ); + void (*UpdateState)( struct gl_context *ctx, GLbitfield new_state ); + void (*GetBufferSize)( struct gl_framebuffer *buffer, + GLuint *width, GLuint *height ); + void (*ResizeBuffers)( struct gl_context *ctx, struct gl_framebuffer *fb, + GLuint width, GLuint height); + void (*Error)( struct gl_context *ctx ); + void (*Finish)( struct gl_context *ctx ); + void (*Flush)( struct gl_context *ctx ); + void (*Clear)( struct gl_context *ctx, GLbitfield buffers ); + void (*Accum)( struct gl_context *ctx, GLenum op, GLfloat value ); + void (*RasterPos)( struct gl_context *ctx, const GLfloat v[4] ); + void (*DrawPixels)( struct gl_context *ctx, + GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *unpack, + const GLvoid *pixels ); + void (*ReadPixels)( struct gl_context *ctx, + GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *unpack, + GLvoid *dest ); + void (*CopyPixels)( struct gl_context *ctx, GLint srcx, GLint srcy, + GLsizei width, GLsizei height, + GLint dstx, GLint dsty, GLenum type ); + void (*Bitmap)( struct gl_context *ctx, + GLint x, GLint y, GLsizei width, GLsizei height, + const struct gl_pixelstore_attrib *unpack, + const GLubyte *bitmap ); + GLuint (*ChooseTextureFormat)( struct gl_context *ctx, GLint internalFormat, + GLenum srcFormat, GLenum srcType ); + void (*TexImage1D)( struct gl_context *ctx, GLenum target, GLint level, + GLint internalFormat, + GLint width, GLint border, + GLenum format, GLenum type, const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + void (*TexImage2D)( struct gl_context *ctx, GLenum target, GLint level, + GLint internalFormat, + GLint width, GLint height, GLint border, + GLenum format, GLenum type, const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + void (*TexImage3D)( struct gl_context *ctx, GLenum target, GLint level, + GLint internalFormat, + GLint width, GLint height, GLint depth, GLint border, + GLenum format, GLenum type, const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + void (*TexSubImage1D)( struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, GLsizei width, + GLenum format, GLenum type, + const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + void (*TexSubImage2D)( struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + void (*TexSubImage3D)( struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLsizei height, GLint depth, + GLenum format, GLenum type, + const GLvoid *pixels, + const struct gl_pixelstore_attrib *packing, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + void (*GetTexImage)( struct gl_context *ctx, GLenum target, GLint level, + GLenum format, GLenum type, GLvoid *pixels, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + void (*CopyTexImage1D)( struct gl_context *ctx, GLenum target, GLint level, + GLenum internalFormat, GLint x, GLint y, + GLsizei width, GLint border ); + void (*CopyTexImage2D)( struct gl_context *ctx, GLenum target, GLint level, + GLenum internalFormat, GLint x, GLint y, + GLsizei width, GLsizei height, GLint border ); + void (*CopyTexSubImage1D)( struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, + GLint x, GLint y, GLsizei width ); + void (*CopyTexSubImage2D)( struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLint x, GLint y, + GLsizei width, GLsizei height ); + void (*CopyTexSubImage3D)( struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, + GLint x, GLint y, + GLsizei width, GLsizei height ); + void (*GenerateMipmap)(struct gl_context *ctx, GLenum target, + struct gl_texture_object *texObj); + GLboolean (*TestProxyTexImage)(struct gl_context *ctx, GLenum target, + GLint level, GLint internalFormat, + GLenum format, GLenum type, + GLint width, GLint height, + GLint depth, GLint border); + void (*CompressedTexImage1D)( struct gl_context *ctx, GLenum target, + GLint level, GLint internalFormat, + GLsizei width, GLint border, + GLsizei imageSize, const GLvoid *data, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + void (*CompressedTexImage2D)( struct gl_context *ctx, GLenum target, + GLint level, GLint internalFormat, + GLsizei width, GLsizei height, GLint border, + GLsizei imageSize, const GLvoid *data, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + void (*CompressedTexImage3D)( struct gl_context *ctx, GLenum target, + GLint level, GLint internalFormat, + GLsizei width, GLsizei height, GLsizei depth, + GLint border, + GLsizei imageSize, const GLvoid *data, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage ); + void (*CompressedTexSubImage1D)(struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, GLsizei width, + GLenum format, + GLsizei imageSize, const GLvoid *data, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage); + void (*CompressedTexSubImage2D)(struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLint height, + GLenum format, + GLsizei imageSize, const GLvoid *data, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage); + void (*CompressedTexSubImage3D)(struct gl_context *ctx, GLenum target, GLint level, + GLint xoffset, GLint yoffset, GLint zoffset, + GLsizei width, GLint height, GLint depth, + GLenum format, + GLsizei imageSize, const GLvoid *data, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage); + void (*GetCompressedTexImage)(struct gl_context *ctx, GLenum target, GLint level, + GLvoid *img, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage); + void (*BindTexture)( struct gl_context *ctx, GLenum target, + struct gl_texture_object *tObj ); + struct gl_texture_object * (*NewTextureObject)( struct gl_context *ctx, GLuint name, + GLenum target ); + void (*DeleteTexture)( struct gl_context *ctx, struct gl_texture_object *tObj ); + struct gl_texture_image * (*NewTextureImage)( struct gl_context *ctx ); + void (*FreeTexImageData)( struct gl_context *ctx, struct gl_texture_image *tImage ); + void (*MapTexture)( struct gl_context *ctx, struct gl_texture_object *tObj ); + void (*UnmapTexture)( struct gl_context *ctx, struct gl_texture_object *tObj ); + void* (*TextureMemCpy)( void *to, const void *from, size_t sz ); + GLboolean (*IsTextureResident)( struct gl_context *ctx, + struct gl_texture_object *t ); + void (*UpdateTexturePalette)( struct gl_context *ctx, + struct gl_texture_object *tObj ); + void (*CopyColorTable)( struct gl_context *ctx, + GLenum target, GLenum internalformat, + GLint x, GLint y, GLsizei width ); + void (*CopyColorSubTable)( struct gl_context *ctx, + GLenum target, GLsizei start, + GLint x, GLint y, GLsizei width ); + void (*BindProgram)(struct gl_context *ctx, GLenum target, struct gl_program *prog); + struct gl_program * (*NewProgram)(struct gl_context *ctx, GLenum target, GLuint id); + void (*DeleteProgram)(struct gl_context *ctx, struct gl_program *prog); + GLboolean (*ProgramStringNotify)(struct gl_context *ctx, GLenum target, + struct gl_program *prog); + GLboolean (*IsProgramNative)(struct gl_context *ctx, GLenum target, + struct gl_program *prog); + GLboolean (*LinkShader)(struct gl_context *ctx, struct gl_shader_program *shader); + void (*AlphaFunc)(struct gl_context *ctx, GLenum func, GLfloat ref); + void (*BlendColor)(struct gl_context *ctx, const GLfloat color[4]); + void (*BlendEquationSeparate)(struct gl_context *ctx, GLenum modeRGB, GLenum modeA); + void (*BlendEquationSeparatei)(struct gl_context *ctx, GLuint buffer, + GLenum modeRGB, GLenum modeA); + void (*BlendFuncSeparate)(struct gl_context *ctx, + GLenum sfactorRGB, GLenum dfactorRGB, + GLenum sfactorA, GLenum dfactorA); + void (*BlendFuncSeparatei)(struct gl_context *ctx, GLuint buffer, + GLenum sfactorRGB, GLenum dfactorRGB, + GLenum sfactorA, GLenum dfactorA); + void (*ClearColor)(struct gl_context *ctx, const GLfloat color[4]); + void (*ClearDepth)(struct gl_context *ctx, GLclampd d); + void (*ClearStencil)(struct gl_context *ctx, GLint s); + void (*ClipPlane)(struct gl_context *ctx, GLenum plane, const GLfloat *equation ); + void (*ColorMask)(struct gl_context *ctx, GLboolean rmask, GLboolean gmask, + GLboolean bmask, GLboolean amask ); + void (*ColorMaskIndexed)(struct gl_context *ctx, GLuint buf, GLboolean rmask, + GLboolean gmask, GLboolean bmask, GLboolean amask); + void (*ColorMaterial)(struct gl_context *ctx, GLenum face, GLenum mode); + void (*CullFace)(struct gl_context *ctx, GLenum mode); + void (*FrontFace)(struct gl_context *ctx, GLenum mode); + void (*DepthFunc)(struct gl_context *ctx, GLenum func); + void (*DepthMask)(struct gl_context *ctx, GLboolean flag); + void (*DepthRange)(struct gl_context *ctx, GLclampd nearval, GLclampd farval); + void (*DrawBuffer)( struct gl_context *ctx, GLenum buffer ); + void (*DrawBuffers)( struct gl_context *ctx, GLsizei n, const GLenum *buffers ); + void (*Enable)(struct gl_context *ctx, GLenum cap, GLboolean state); + void (*Fogfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params); + void (*Hint)(struct gl_context *ctx, GLenum target, GLenum mode); + void (*Lightfv)(struct gl_context *ctx, GLenum light, + GLenum pname, const GLfloat *params ); + void (*LightModelfv)(struct gl_context *ctx, GLenum pname, const GLfloat *params); + void (*LineStipple)(struct gl_context *ctx, GLint factor, GLushort pattern ); + void (*LineWidth)(struct gl_context *ctx, GLfloat width); + void (*LogicOpcode)(struct gl_context *ctx, GLenum opcode); + void (*PointParameterfv)(struct gl_context *ctx, GLenum pname, + const GLfloat *params); + void (*PointSize)(struct gl_context *ctx, GLfloat size); + void (*PolygonMode)(struct gl_context *ctx, GLenum face, GLenum mode); + void (*PolygonOffset)(struct gl_context *ctx, GLfloat factor, GLfloat units); + void (*PolygonStipple)(struct gl_context *ctx, const GLubyte *mask ); + void (*ReadBuffer)( struct gl_context *ctx, GLenum buffer ); + void (*RenderMode)(struct gl_context *ctx, GLenum mode ); + void (*Scissor)(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h); + void (*ShadeModel)(struct gl_context *ctx, GLenum mode); + void (*StencilFuncSeparate)(struct gl_context *ctx, GLenum face, GLenum func, + GLint ref, GLuint mask); + void (*StencilMaskSeparate)(struct gl_context *ctx, GLenum face, GLuint mask); + void (*StencilOpSeparate)(struct gl_context *ctx, GLenum face, GLenum fail, + GLenum zfail, GLenum zpass); + void (*TexGen)(struct gl_context *ctx, GLenum coord, GLenum pname, + const GLfloat *params); + void (*TexEnv)(struct gl_context *ctx, GLenum target, GLenum pname, + const GLfloat *param); + void (*TexParameter)(struct gl_context *ctx, GLenum target, + struct gl_texture_object *texObj, + GLenum pname, const GLfloat *params); + void (*Viewport)(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h); + void (*BindBuffer)( struct gl_context *ctx, GLenum target, + struct gl_buffer_object *obj ); + struct gl_buffer_object * (*NewBufferObject)( struct gl_context *ctx, GLuint buffer, + GLenum target ); + void (*DeleteBuffer)( struct gl_context *ctx, struct gl_buffer_object *obj ); + GLboolean (*BufferData)( struct gl_context *ctx, GLenum target, GLsizeiptrARB size, + const GLvoid *data, GLenum usage, + struct gl_buffer_object *obj ); + void (*BufferSubData)( struct gl_context *ctx, GLenum target, GLintptrARB offset, + GLsizeiptrARB size, const GLvoid *data, + struct gl_buffer_object *obj ); + void (*GetBufferSubData)( struct gl_context *ctx, GLenum target, + GLintptrARB offset, GLsizeiptrARB size, + GLvoid *data, struct gl_buffer_object *obj ); + void * (*MapBuffer)( struct gl_context *ctx, GLenum target, GLenum access, + struct gl_buffer_object *obj ); + void (*CopyBufferSubData)( struct gl_context *ctx, + struct gl_buffer_object *src, + struct gl_buffer_object *dst, + GLintptr readOffset, GLintptr writeOffset, + GLsizeiptr size ); + void * (*MapBufferRange)( struct gl_context *ctx, GLenum target, GLintptr offset, + GLsizeiptr length, GLbitfield access, + struct gl_buffer_object *obj); + void (*FlushMappedBufferRange)(struct gl_context *ctx, GLenum target, + GLintptr offset, GLsizeiptr length, + struct gl_buffer_object *obj); + GLboolean (*UnmapBuffer)( struct gl_context *ctx, GLenum target, + struct gl_buffer_object *obj ); + GLenum (*BufferObjectPurgeable)( struct gl_context *ctx, struct gl_buffer_object *obj, GLenum option ); + GLenum (*RenderObjectPurgeable)( struct gl_context *ctx, struct gl_renderbuffer *obj, GLenum option ); + GLenum (*TextureObjectPurgeable)( struct gl_context *ctx, struct gl_texture_object *obj, GLenum option ); + GLenum (*BufferObjectUnpurgeable)( struct gl_context *ctx, struct gl_buffer_object *obj, GLenum option ); + GLenum (*RenderObjectUnpurgeable)( struct gl_context *ctx, struct gl_renderbuffer *obj, GLenum option ); + GLenum (*TextureObjectUnpurgeable)( struct gl_context *ctx, struct gl_texture_object *obj, GLenum option ); + struct gl_framebuffer * (*NewFramebuffer)(struct gl_context *ctx, GLuint name); + struct gl_renderbuffer * (*NewRenderbuffer)(struct gl_context *ctx, GLuint name); + void (*BindFramebuffer)(struct gl_context *ctx, GLenum target, + struct gl_framebuffer *drawFb, + struct gl_framebuffer *readFb); + void (*FramebufferRenderbuffer)(struct gl_context *ctx, + struct gl_framebuffer *fb, + GLenum attachment, + struct gl_renderbuffer *rb); + void (*RenderTexture)(struct gl_context *ctx, + struct gl_framebuffer *fb, + struct gl_renderbuffer_attachment *att); + void (*FinishRenderTexture)(struct gl_context *ctx, + struct gl_renderbuffer_attachment *att); + void (*ValidateFramebuffer)(struct gl_context *ctx, + struct gl_framebuffer *fb); + void (*BlitFramebuffer)(struct gl_context *ctx, + GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, + GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, + GLbitfield mask, GLenum filter); + struct gl_query_object * (*NewQueryObject)(struct gl_context *ctx, GLuint id); + void (*DeleteQuery)(struct gl_context *ctx, struct gl_query_object *q); + void (*BeginQuery)(struct gl_context *ctx, struct gl_query_object *q); + void (*EndQuery)(struct gl_context *ctx, struct gl_query_object *q); + void (*CheckQuery)(struct gl_context *ctx, struct gl_query_object *q); + void (*WaitQuery)(struct gl_context *ctx, struct gl_query_object *q); + struct gl_array_object * (*NewArrayObject)(struct gl_context *ctx, GLuint id); + void (*DeleteArrayObject)(struct gl_context *ctx, struct gl_array_object *obj); + void (*BindArrayObject)(struct gl_context *ctx, struct gl_array_object *obj); + struct gl_shader *(*NewShader)(struct gl_context *ctx, GLuint name, GLenum type); + void (*DeleteShader)(struct gl_context *ctx, struct gl_shader *shader); + struct gl_shader_program *(*NewShaderProgram)(struct gl_context *ctx, GLuint name); + void (*DeleteShaderProgram)(struct gl_context *ctx, + struct gl_shader_program *shProg); + void (*UseProgram)(struct gl_context *ctx, struct gl_shader_program *shProg); + GLuint NeedValidate; + void (*ValidateTnlModule)( struct gl_context *ctx, GLuint new_state ); + GLuint CurrentExecPrimitive; + GLuint CurrentSavePrimitive; + GLuint NeedFlush; + GLuint SaveNeedFlush; + void (*BeginVertices)( struct gl_context *ctx ); + void (*FlushVertices)( struct gl_context *ctx, GLuint flags ); + void (*SaveFlushVertices)( struct gl_context *ctx ); + GLboolean (*NotifySaveBegin)( struct gl_context *ctx, GLenum mode ); + void (*LightingSpaceChange)( struct gl_context *ctx ); + void (*NewList)( struct gl_context *ctx, GLuint list, GLenum mode ); + void (*EndList)( struct gl_context *ctx ); + void (*BeginCallList)( struct gl_context *ctx, + struct gl_display_list *dlist ); + void (*EndCallList)( struct gl_context *ctx ); + struct gl_sync_object * (*NewSyncObject)(struct gl_context *, GLenum); + void (*FenceSync)(struct gl_context *, struct gl_sync_object *, GLenum, GLbitfield); + void (*DeleteSyncObject)(struct gl_context *, struct gl_sync_object *); + void (*CheckSync)(struct gl_context *, struct gl_sync_object *); + void (*ClientWaitSync)(struct gl_context *, struct gl_sync_object *, + GLbitfield, GLuint64); + void (*ServerWaitSync)(struct gl_context *, struct gl_sync_object *, + GLbitfield, GLuint64); + void (*BeginConditionalRender)(struct gl_context *ctx, struct gl_query_object *q, + GLenum mode); + void (*EndConditionalRender)(struct gl_context *ctx, struct gl_query_object *q); + void (*DrawTex)(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z, + GLfloat width, GLfloat height); + void (*EGLImageTargetTexture2D)(struct gl_context *ctx, GLenum target, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage, + GLeglImageOES image_handle); + void (*EGLImageTargetRenderbufferStorage)(struct gl_context *ctx, + struct gl_renderbuffer *rb, + void *image_handle); + struct gl_transform_feedback_object * + (*NewTransformFeedback)(struct gl_context *ctx, GLuint name); + void (*DeleteTransformFeedback)(struct gl_context *ctx, + struct gl_transform_feedback_object *obj); + void (*BeginTransformFeedback)(struct gl_context *ctx, GLenum mode, + struct gl_transform_feedback_object *obj); + void (*EndTransformFeedback)(struct gl_context *ctx, + struct gl_transform_feedback_object *obj); + void (*PauseTransformFeedback)(struct gl_context *ctx, + struct gl_transform_feedback_object *obj); + void (*ResumeTransformFeedback)(struct gl_context *ctx, + struct gl_transform_feedback_object *obj); + void (*DrawTransformFeedback)(struct gl_context *ctx, GLenum mode, + struct gl_transform_feedback_object *obj); + void (*TextureBarrier)(struct gl_context *ctx); + struct gl_sampler_object * (*NewSamplerObject)(struct gl_context *ctx, + GLuint name); + void (*DeleteSamplerObject)(struct gl_context *ctx, + struct gl_sampler_object *samp); +}; +typedef struct { + void ( * ArrayElement)( GLint ); + void ( * Color3f)( GLfloat, GLfloat, GLfloat ); + void ( * Color3fv)( const GLfloat * ); + void ( * Color4f)( GLfloat, GLfloat, GLfloat, GLfloat ); + void ( * Color4fv)( const GLfloat * ); + void ( * EdgeFlag)( GLboolean ); + void ( * EvalCoord1f)( GLfloat ); + void ( * EvalCoord1fv)( const GLfloat * ); + void ( * EvalCoord2f)( GLfloat, GLfloat ); + void ( * EvalCoord2fv)( const GLfloat * ); + void ( * EvalPoint1)( GLint ); + void ( * EvalPoint2)( GLint, GLint ); + void ( * FogCoordfEXT)( GLfloat ); + void ( * FogCoordfvEXT)( const GLfloat * ); + void ( * Indexf)( GLfloat ); + void ( * Indexfv)( const GLfloat * ); + void ( * Materialfv)( GLenum face, GLenum pname, const GLfloat * ); + void ( * MultiTexCoord1fARB)( GLenum, GLfloat ); + void ( * MultiTexCoord1fvARB)( GLenum, const GLfloat * ); + void ( * MultiTexCoord2fARB)( GLenum, GLfloat, GLfloat ); + void ( * MultiTexCoord2fvARB)( GLenum, const GLfloat * ); + void ( * MultiTexCoord3fARB)( GLenum, GLfloat, GLfloat, GLfloat ); + void ( * MultiTexCoord3fvARB)( GLenum, const GLfloat * ); + void ( * MultiTexCoord4fARB)( GLenum, GLfloat, GLfloat, GLfloat, GLfloat ); + void ( * MultiTexCoord4fvARB)( GLenum, const GLfloat * ); + void ( * Normal3f)( GLfloat, GLfloat, GLfloat ); + void ( * Normal3fv)( const GLfloat * ); + void ( * SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat ); + void ( * SecondaryColor3fvEXT)( const GLfloat * ); + void ( * TexCoord1f)( GLfloat ); + void ( * TexCoord1fv)( const GLfloat * ); + void ( * TexCoord2f)( GLfloat, GLfloat ); + void ( * TexCoord2fv)( const GLfloat * ); + void ( * TexCoord3f)( GLfloat, GLfloat, GLfloat ); + void ( * TexCoord3fv)( const GLfloat * ); + void ( * TexCoord4f)( GLfloat, GLfloat, GLfloat, GLfloat ); + void ( * TexCoord4fv)( const GLfloat * ); + void ( * Vertex2f)( GLfloat, GLfloat ); + void ( * Vertex2fv)( const GLfloat * ); + void ( * Vertex3f)( GLfloat, GLfloat, GLfloat ); + void ( * Vertex3fv)( const GLfloat * ); + void ( * Vertex4f)( GLfloat, GLfloat, GLfloat, GLfloat ); + void ( * Vertex4fv)( const GLfloat * ); + void ( * CallList)( GLuint ); + void ( * CallLists)( GLsizei, GLenum, const GLvoid * ); + void ( * Begin)( GLenum ); + void ( * End)( void ); + void ( * PrimitiveRestartNV)( void ); + void ( * VertexAttrib1fNV)( GLuint index, GLfloat x ); + void ( * VertexAttrib1fvNV)( GLuint index, const GLfloat *v ); + void ( * VertexAttrib2fNV)( GLuint index, GLfloat x, GLfloat y ); + void ( * VertexAttrib2fvNV)( GLuint index, const GLfloat *v ); + void ( * VertexAttrib3fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z ); + void ( * VertexAttrib3fvNV)( GLuint index, const GLfloat *v ); + void ( * VertexAttrib4fNV)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); + void ( * VertexAttrib4fvNV)( GLuint index, const GLfloat *v ); + void ( * VertexAttrib1fARB)( GLuint index, GLfloat x ); + void ( * VertexAttrib1fvARB)( GLuint index, const GLfloat *v ); + void ( * VertexAttrib2fARB)( GLuint index, GLfloat x, GLfloat y ); + void ( * VertexAttrib2fvARB)( GLuint index, const GLfloat *v ); + void ( * VertexAttrib3fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z ); + void ( * VertexAttrib3fvARB)( GLuint index, const GLfloat *v ); + void ( * VertexAttrib4fARB)( GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w ); + void ( * VertexAttrib4fvARB)( GLuint index, const GLfloat *v ); + void ( * VertexAttribI1i)( GLuint index, GLint x); + void ( * VertexAttribI2i)( GLuint index, GLint x, GLint y); + void ( * VertexAttribI3i)( GLuint index, GLint x, GLint y, GLint z); + void ( * VertexAttribI4i)( GLuint index, GLint x, GLint y, GLint z, GLint w); + void ( * VertexAttribI2iv)( GLuint index, const GLint *v); + void ( * VertexAttribI3iv)( GLuint index, const GLint *v); + void ( * VertexAttribI4iv)( GLuint index, const GLint *v); + void ( * VertexAttribI1ui)( GLuint index, GLuint x); + void ( * VertexAttribI2ui)( GLuint index, GLuint x, GLuint y); + void ( * VertexAttribI3ui)( GLuint index, GLuint x, GLuint y, GLuint z); + void ( * VertexAttribI4ui)( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); + void ( * VertexAttribI2uiv)( GLuint index, const GLuint *v); + void ( * VertexAttribI3uiv)( GLuint index, const GLuint *v); + void ( * VertexAttribI4uiv)( GLuint index, const GLuint *v); + void ( * Rectf)( GLfloat, GLfloat, GLfloat, GLfloat ); + void ( * DrawArrays)( GLenum mode, GLint start, GLsizei count ); + void ( * DrawElements)( GLenum mode, GLsizei count, GLenum type, + const GLvoid *indices ); + void ( * DrawRangeElements)( GLenum mode, GLuint start, + GLuint end, GLsizei count, + GLenum type, const GLvoid *indices ); + void ( * MultiDrawElementsEXT)( GLenum mode, const GLsizei *count, + GLenum type, + const GLvoid **indices, + GLsizei primcount); + void ( * DrawElementsBaseVertex)( GLenum mode, GLsizei count, + GLenum type, + const GLvoid *indices, + GLint basevertex ); + void ( * DrawRangeElementsBaseVertex)( GLenum mode, GLuint start, + GLuint end, GLsizei count, + GLenum type, + const GLvoid *indices, + GLint basevertex); + void ( * MultiDrawElementsBaseVertex)( GLenum mode, + const GLsizei *count, + GLenum type, + const GLvoid **indices, + GLsizei primcount, + const GLint *basevertex); + void ( * DrawArraysInstanced)(GLenum mode, GLint first, + GLsizei count, GLsizei primcount); + void ( * DrawElementsInstanced)(GLenum mode, GLsizei count, + GLenum type, const GLvoid *indices, + GLsizei primcount); + void ( * DrawElementsInstancedBaseVertex)(GLenum mode, GLsizei count, + GLenum type, const GLvoid *indices, + GLsizei primcount, GLint basevertex); + void ( * EvalMesh1)( GLenum mode, GLint i1, GLint i2 ); + void ( * EvalMesh2)( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 ); +} GLvertexformat; +union gl_dlist_node; +struct gl_display_list +{ + GLuint Name; + GLbitfield Flags; + union gl_dlist_node *Head; +}; +struct gl_dlist_state +{ + GLuint CallDepth; + struct gl_display_list *CurrentList; + union gl_dlist_node *CurrentBlock; + GLuint CurrentPos; + GLvertexformat ListVtxfmt; + GLubyte ActiveAttribSize[VERT_ATTRIB_MAX]; + GLfloat CurrentAttrib[VERT_ATTRIB_MAX][4]; + GLubyte ActiveMaterialSize[12]; + GLfloat CurrentMaterial[12][4]; + GLubyte ActiveIndex; + GLfloat CurrentIndex; + GLubyte ActiveEdgeFlag; + GLboolean CurrentEdgeFlag; + struct { + GLenum ShadeModel; + } Current; +}; +typedef enum +{ + API_OPENGL, + API_OPENGLES, + API_OPENGLES2 +} gl_api; +struct gl_context +{ + struct gl_shared_state *Shared; + gl_api API; + struct _glapi_table *Save; + struct _glapi_table *Exec; + struct _glapi_table *CurrentDispatch; + struct gl_config Visual; + struct gl_framebuffer *DrawBuffer; + struct gl_framebuffer *ReadBuffer; + struct gl_framebuffer *WinSysDrawBuffer; + struct gl_framebuffer *WinSysReadBuffer; + struct dd_function_table Driver; + void *DriverCtx; + struct gl_constants Const; + struct gl_matrix_stack ModelviewMatrixStack; + struct gl_matrix_stack ProjectionMatrixStack; + struct gl_matrix_stack TextureMatrixStack[((8 > 16) ? 8 : 16)]; + struct gl_matrix_stack ProgramMatrixStack[8]; + struct gl_matrix_stack *CurrentStack; + GLmatrix _ModelProjectMatrix; + struct gl_dlist_state ListState; + GLboolean ExecuteFlag; + GLboolean CompileFlag; + struct gl_extensions Extensions; + GLuint VersionMajor, VersionMinor; + char *VersionString; + GLuint AttribStackDepth; + struct gl_attrib_node *AttribStack[16]; + struct gl_accum_attrib Accum; + struct gl_colorbuffer_attrib Color; + struct gl_current_attrib Current; + struct gl_depthbuffer_attrib Depth; + struct gl_eval_attrib Eval; + struct gl_fog_attrib Fog; + struct gl_hint_attrib Hint; + struct gl_light_attrib Light; + struct gl_line_attrib Line; + struct gl_list_attrib List; + struct gl_multisample_attrib Multisample; + struct gl_pixel_attrib Pixel; + struct gl_point_attrib Point; + struct gl_polygon_attrib Polygon; + GLuint PolygonStipple[32]; + struct gl_scissor_attrib Scissor; + struct gl_stencil_attrib Stencil; + struct gl_texture_attrib Texture; + struct gl_transform_attrib Transform; + struct gl_viewport_attrib Viewport; + GLuint ClientAttribStackDepth; + struct gl_attrib_node *ClientAttribStack[16]; + struct gl_array_attrib Array; + struct gl_pixelstore_attrib Pack; + struct gl_pixelstore_attrib Unpack; + struct gl_pixelstore_attrib DefaultPacking; + struct gl_pixelmaps PixelMaps; + struct gl_evaluators EvalMap; + struct gl_feedback Feedback; + struct gl_selection Select; + struct gl_program_state Program; + struct gl_vertex_program_state VertexProgram; + struct gl_fragment_program_state FragmentProgram; + struct gl_geometry_program_state GeometryProgram; + struct gl_ati_fragment_shader_state ATIFragmentShader; + struct gl_shader_state Shader; + struct gl_shader_compiler_options ShaderCompilerOptions[MESA_SHADER_TYPES]; + struct gl_query_state Query; + struct gl_transform_feedback TransformFeedback; + struct gl_buffer_object *CopyReadBuffer; + struct gl_buffer_object *CopyWriteBuffer; + struct gl_meta_state *Meta; + struct gl_renderbuffer *CurrentRenderbuffer; + GLenum ErrorValue; + GLenum ResetStatus; + const char *ErrorDebugFmtString; + GLuint ErrorDebugCount; + GLenum RenderMode; + GLbitfield NewState; + GLboolean ViewportInitialized; + GLbitfield varying_vp_inputs; + GLbitfield _TriangleCaps; + GLbitfield _ImageTransferState; + GLfloat _EyeZDir[3]; + GLfloat _ModelViewInvScale; + GLboolean _NeedEyeCoords; + GLboolean _ForceEyeCoords; + GLuint TextureStateTimestamp; + struct gl_shine_tab *_ShineTable[2]; + struct gl_shine_tab *_ShineTabList; + struct gl_list_extensions *ListExt; + GLboolean FirstTimeCurrent; + GLboolean Mesa_DXTn; + GLboolean TextureFormatSupported[MESA_FORMAT_COUNT]; + GLboolean mvp_with_dp4; + void *swrast_context; + void *swsetup_context; + void *swtnl_context; + void *swtnl_im; + struct st_context *st; + void *aelt_context; +}; +enum _verbose +{ + VERBOSE_VARRAY = 0x0001, + VERBOSE_TEXTURE = 0x0002, + VERBOSE_MATERIAL = 0x0004, + VERBOSE_PIPELINE = 0x0008, + VERBOSE_DRIVER = 0x0010, + VERBOSE_STATE = 0x0020, + VERBOSE_API = 0x0040, + VERBOSE_DISPLAY_LIST = 0x0100, + VERBOSE_LIGHTING = 0x0200, + VERBOSE_PRIMS = 0x0400, + VERBOSE_VERTS = 0x0800, + VERBOSE_DISASSEM = 0x1000, + VERBOSE_DRAW = 0x2000, + VERBOSE_SWAPBUFFERS = 0x4000 +}; +enum _debug +{ + DEBUG_ALWAYS_FLUSH = 0x1 +}; +struct _glapi_table; +extern struct gl_config * +_mesa_create_visual( GLboolean dbFlag, + GLboolean stereoFlag, + GLint redBits, + GLint greenBits, + GLint blueBits, + GLint alphaBits, + GLint depthBits, + GLint stencilBits, + GLint accumRedBits, + GLint accumGreenBits, + GLint accumBlueBits, + GLint accumAlphaBits, + GLint numSamples ); +extern GLboolean +_mesa_initialize_visual( struct gl_config *v, + GLboolean dbFlag, + GLboolean stereoFlag, + GLint redBits, + GLint greenBits, + GLint blueBits, + GLint alphaBits, + GLint depthBits, + GLint stencilBits, + GLint accumRedBits, + GLint accumGreenBits, + GLint accumBlueBits, + GLint accumAlphaBits, + GLint numSamples ); +extern void +_mesa_destroy_visual( struct gl_config *vis ); +extern GLboolean +_mesa_initialize_context( struct gl_context *ctx, + gl_api api, + const struct gl_config *visual, + struct gl_context *share_list, + const struct dd_function_table *driverFunctions, + void *driverContext ); +extern struct gl_context * +_mesa_create_context(gl_api api, + const struct gl_config *visual, + struct gl_context *share_list, + const struct dd_function_table *driverFunctions, + void *driverContext); +extern void +_mesa_free_context_data( struct gl_context *ctx ); +extern void +_mesa_destroy_context( struct gl_context *ctx ); +extern void +_mesa_copy_context(const struct gl_context *src, struct gl_context *dst, GLuint mask); +extern void +_mesa_check_init_viewport(struct gl_context *ctx, GLuint width, GLuint height); +extern GLboolean +_mesa_make_current( struct gl_context *ctx, struct gl_framebuffer *drawBuffer, + struct gl_framebuffer *readBuffer ); +extern GLboolean +_mesa_share_state(struct gl_context *ctx, struct gl_context *ctxToShare); +extern struct gl_context * +_mesa_get_current_context(void); +extern void +_mesa_init_get_hash(struct gl_context *ctx); +extern void +_mesa_notifySwapBuffers(struct gl_context *gc); +extern struct _glapi_table * +_mesa_get_dispatch(struct gl_context *ctx); +void +_mesa_set_mvp_with_dp4( struct gl_context *ctx, + GLboolean flag ); +extern GLboolean +_mesa_valid_to_render(struct gl_context *ctx, const char *where); +extern void +_mesa_record_error( struct gl_context *ctx, GLenum error ); +extern void +_mesa_finish(struct gl_context *ctx); +extern void +_mesa_flush(struct gl_context *ctx); +extern void +_mesa_Finish( void ); +extern void +_mesa_Flush( void ); +extern GLfloat _mesa_ubyte_to_float_color_tab[256]; +extern void +_mesa_update_state(struct gl_context *ctx); +extern void +_mesa_update_state_locked(struct gl_context *ctx); +extern void +_mesa_set_varying_vp_inputs(struct gl_context *ctx, GLbitfield varying_inputs); +extern void +_mesa_set_vp_override(struct gl_context *ctx, GLboolean flag); +static __inline__ GLboolean +_mesa_need_secondary_color(const struct gl_context *ctx) +{ + if (ctx->Light.Enabled && + ctx->Light.Model.ColorControl == 0x81FA) + return 0x1; + if (ctx->Fog.ColorSumEnabled) + return 0x1; + if (ctx->VertexProgram._Current && + (ctx->VertexProgram._Current != ctx->VertexProgram._TnlProgram) && + (ctx->VertexProgram._Current->Base.InputsRead & (1 << VERT_ATTRIB_COLOR1))) + return 0x1; + if (ctx->FragmentProgram._Current && + (ctx->FragmentProgram._Current != ctx->FragmentProgram._TexEnvProgram) && + (ctx->FragmentProgram._Current->Base.InputsRead & (1 << FRAG_ATTRIB_COL1))) + return 0x1; + return 0x0; +} +static __inline__ GLboolean +_mesa_rgba_logicop_enabled(const struct gl_context *ctx) +{ + return ctx->Color.ColorLogicOpEnabled || + (ctx->Color.BlendEnabled && ctx->Color.Blend[0].EquationRGB == 0x0BF1); +} +typedef enum prog_opcode { + OPCODE_NOP = 0, + OPCODE_ABS, + OPCODE_ADD, + OPCODE_AND, + OPCODE_ARA, + OPCODE_ARL, + OPCODE_ARL_NV, + OPCODE_ARR, + OPCODE_BGNLOOP, + OPCODE_BGNSUB, + OPCODE_BRA, + OPCODE_BRK, + OPCODE_CAL, + OPCODE_CMP, + OPCODE_CONT, + OPCODE_COS, + OPCODE_DDX, + OPCODE_DDY, + OPCODE_DP2, + OPCODE_DP2A, + OPCODE_DP3, + OPCODE_DP4, + OPCODE_DPH, + OPCODE_DST, + OPCODE_ELSE, + OPCODE_EMIT_VERTEX, + OPCODE_END, + OPCODE_END_PRIMITIVE, + OPCODE_ENDIF, + OPCODE_ENDLOOP, + OPCODE_ENDSUB, + OPCODE_EX2, + OPCODE_EXP, + OPCODE_FLR, + OPCODE_FRC, + OPCODE_IF, + OPCODE_KIL, + OPCODE_KIL_NV, + OPCODE_LG2, + OPCODE_LIT, + OPCODE_LOG, + OPCODE_LRP, + OPCODE_MAD, + OPCODE_MAX, + OPCODE_MIN, + OPCODE_MOV, + OPCODE_MUL, + OPCODE_NOISE1, + OPCODE_NOISE2, + OPCODE_NOISE3, + OPCODE_NOISE4, + OPCODE_NOT, + OPCODE_NRM3, + OPCODE_NRM4, + OPCODE_OR, + OPCODE_PK2H, + OPCODE_PK2US, + OPCODE_PK4B, + OPCODE_PK4UB, + OPCODE_POW, + OPCODE_POPA, + OPCODE_PRINT, + OPCODE_PUSHA, + OPCODE_RCC, + OPCODE_RCP, + OPCODE_RET, + OPCODE_RFL, + OPCODE_RSQ, + OPCODE_SCS, + OPCODE_SEQ, + OPCODE_SFL, + OPCODE_SGE, + OPCODE_SGT, + OPCODE_SIN, + OPCODE_SLE, + OPCODE_SLT, + OPCODE_SNE, + OPCODE_SSG, + OPCODE_STR, + OPCODE_SUB, + OPCODE_SWZ, + OPCODE_TEX, + OPCODE_TXB, + OPCODE_TXD, + OPCODE_TXL, + OPCODE_TXP, + OPCODE_TXP_NV, + OPCODE_TRUNC, + OPCODE_UP2H, + OPCODE_UP2US, + OPCODE_UP4B, + OPCODE_UP4UB, + OPCODE_X2D, + OPCODE_XOR, + OPCODE_XPD, + MAX_OPCODE +} gl_inst_opcode; +struct prog_src_register +{ + GLuint File:4; + GLint Index:(12 +1); + GLuint Swizzle:12; + GLuint RelAddr:1; + GLuint Abs:1; + GLuint Negate:4; + GLuint HasIndex2:1; + GLuint RelAddr2:1; + GLint Index2:(12 +1); +}; +struct prog_dst_register +{ + GLuint File:4; + GLuint Index:12; + GLuint WriteMask:4; + GLuint RelAddr:1; + GLuint CondMask:4; + GLuint CondSwizzle:12; + GLuint CondSrc:1; +}; +struct prog_instruction +{ + gl_inst_opcode Opcode; + struct prog_src_register SrcReg[3]; + struct prog_dst_register DstReg; + GLuint CondUpdate:1; + GLuint CondDst:1; + GLuint SaturateMode:2; + GLuint Precision:3; + GLuint TexSrcUnit:5; + GLuint TexSrcTarget:3; + GLuint TexShadow:1; + GLint BranchTarget; + const char *Comment; + void *Data; + GLint Aux; +}; +extern void +_mesa_init_instructions(struct prog_instruction *inst, GLuint count); +extern struct prog_instruction * +_mesa_alloc_instructions(GLuint numInst); +extern struct prog_instruction * +_mesa_realloc_instructions(struct prog_instruction *oldInst, + GLuint numOldInst, GLuint numNewInst); +extern struct prog_instruction * +_mesa_copy_instructions(struct prog_instruction *dest, + const struct prog_instruction *src, GLuint n); +extern void +_mesa_free_instructions(struct prog_instruction *inst, GLuint count); +extern GLuint +_mesa_num_inst_src_regs(gl_inst_opcode opcode); +extern GLuint +_mesa_num_inst_dst_regs(gl_inst_opcode opcode); +extern GLboolean +_mesa_is_tex_instruction(gl_inst_opcode opcode); +extern GLboolean +_mesa_check_soa_dependencies(const struct prog_instruction *inst); +extern const char * +_mesa_opcode_string(gl_inst_opcode opcode); +struct gl_context; +extern void +_swrast_set_aa_triangle_function(struct gl_context *ctx); +typedef void (*FetchTexelLodFunc)(struct gl_context *ctx, const GLfloat texcoord[4], + GLfloat lambda, GLuint unit, GLfloat color[4]); +typedef void (*FetchTexelDerivFunc)(struct gl_context *ctx, const GLfloat texcoord[4], + const GLfloat texdx[4], + const GLfloat texdy[4], + GLfloat lodBias, + GLuint unit, GLfloat color[4]); +struct gl_program_machine +{ + const struct gl_program *CurProgram; + GLfloat (*Attribs)[16384][4]; + GLfloat (*DerivX)[4]; + GLfloat (*DerivY)[4]; + GLuint NumDeriv; + GLuint CurElement; + GLfloat VertAttribs[VERT_ATTRIB_MAX][4]; + GLfloat Temporaries[256][4]; + GLfloat Outputs[64][4]; + GLfloat (*EnvParams)[4]; + GLuint CondCodes[4]; + GLint AddressReg[2][4]; + GLfloat SystemValues[SYSTEM_VALUE_MAX][4]; + const GLubyte *Samplers; + GLuint CallStack[8]; + GLuint StackDepth; + FetchTexelLodFunc FetchTexelLod; + FetchTexelDerivFunc FetchTexelDeriv; +}; +extern void +_mesa_get_program_register(struct gl_context *ctx, gl_register_file file, + GLuint index, GLfloat val[4]); +extern GLboolean +_mesa_execute_program(struct gl_context *ctx, + const struct gl_program *program, + struct gl_program_machine *machine); +typedef struct { + GLfloat attrib[FRAG_ATTRIB_MAX][4]; + GLchan color[4]; + GLfloat pointSize; +} SWvertex; +struct swrast_device_driver; +extern GLboolean +_swrast_CreateContext( struct gl_context *ctx ); +extern void +_swrast_DestroyContext( struct gl_context *ctx ); +extern struct swrast_device_driver * +_swrast_GetDeviceDriverReference( struct gl_context *ctx ); +extern void +_swrast_Bitmap( struct gl_context *ctx, + GLint px, GLint py, + GLsizei width, GLsizei height, + const struct gl_pixelstore_attrib *unpack, + const GLubyte *bitmap ); +extern void +_swrast_CopyPixels( struct gl_context *ctx, + GLint srcx, GLint srcy, + GLint destx, GLint desty, + GLsizei width, GLsizei height, + GLenum type ); +extern void +_swrast_DrawPixels( struct gl_context *ctx, + GLint x, GLint y, + GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *unpack, + const GLvoid *pixels ); +extern void +_swrast_ReadPixels( struct gl_context *ctx, + GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, + const struct gl_pixelstore_attrib *unpack, + GLvoid *pixels ); +extern void +_swrast_BlitFramebuffer(struct gl_context *ctx, + GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, + GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, + GLbitfield mask, GLenum filter); +extern void +_swrast_Clear(struct gl_context *ctx, GLbitfield buffers); +extern void +_swrast_Accum(struct gl_context *ctx, GLenum op, GLfloat value); +extern void +_swrast_ResetLineStipple( struct gl_context *ctx ); +extern void +_swrast_SetFacing(struct gl_context *ctx, GLuint facing); +extern void +_swrast_Point( struct gl_context *ctx, const SWvertex *v ); +extern void +_swrast_Line( struct gl_context *ctx, const SWvertex *v0, const SWvertex *v1 ); +extern void +_swrast_Triangle( struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, const SWvertex *v2 ); +extern void +_swrast_Quad( struct gl_context *ctx, + const SWvertex *v0, const SWvertex *v1, + const SWvertex *v2, const SWvertex *v3); +extern void +_swrast_flush( struct gl_context *ctx ); +extern void +_swrast_render_primitive( struct gl_context *ctx, GLenum mode ); +extern void +_swrast_render_start( struct gl_context *ctx ); +extern void +_swrast_render_finish( struct gl_context *ctx ); +extern void +_swrast_InvalidateState( struct gl_context *ctx, GLbitfield new_state ); +extern void +_swrast_allow_vertex_fog( struct gl_context *ctx, GLboolean value ); +extern void +_swrast_allow_pixel_fog( struct gl_context *ctx, GLboolean value ); +extern void +_swrast_print_vertex( struct gl_context *ctx, const SWvertex *v ); +extern void +_swrast_eject_texture_images(struct gl_context *ctx); +extern void +_swrast_render_texture(struct gl_context *ctx, + struct gl_framebuffer *fb, + struct gl_renderbuffer_attachment *att); +extern void +_swrast_finish_render_texture(struct gl_context *ctx, + struct gl_renderbuffer_attachment *att); +struct swrast_device_driver { + void (*SpanRenderStart)(struct gl_context *ctx); + void (*SpanRenderFinish)(struct gl_context *ctx); +}; +struct gl_context; +struct gl_renderbuffer; +typedef struct sw_span_arrays +{ + GLfloat attribs[FRAG_ATTRIB_MAX][16384][4]; + GLubyte mask[16384]; + GLenum ChanType; + GLubyte rgba8[16384][4]; + GLushort rgba16[16384][4]; + GLchan (*rgba)[4]; + GLint x[16384]; + GLint y[16384]; + GLuint z[16384]; + GLuint index[16384]; + GLfloat lambda[8][16384]; + GLfloat coverage[16384]; +} SWspanarrays; +typedef struct sw_span +{ + GLint x, y; + GLuint end; + GLuint leftClip; + GLboolean writeAll; + GLenum primitive; + GLuint facing; + GLbitfield interpMask; + GLfloat attrStart[FRAG_ATTRIB_MAX][4]; + GLfloat attrStepX[FRAG_ATTRIB_MAX][4]; + GLfloat attrStepY[FRAG_ATTRIB_MAX][4]; + GLfixed red, redStep; + GLfixed green, greenStep; + GLfixed blue, blueStep; + GLfixed alpha, alphaStep; + GLfixed index, indexStep; + GLfixed z, zStep; + GLfixed intTex[2], intTexStep[2]; + GLbitfield arrayMask; + GLbitfield arrayAttribs; + SWspanarrays *array; +} SWspan; +extern void +_swrast_span_default_attribs(struct gl_context *ctx, SWspan *span); +extern void +_swrast_span_interpolate_z( const struct gl_context *ctx, SWspan *span ); +extern GLfloat +_swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy, + GLfloat dqdx, GLfloat dqdy, GLfloat texW, GLfloat texH, + GLfloat s, GLfloat t, GLfloat q, GLfloat invQ); +extern void +_swrast_write_rgba_span( struct gl_context *ctx, SWspan *span); +extern void +_swrast_read_rgba_span(struct gl_context *ctx, struct gl_renderbuffer *rb, + GLuint n, GLint x, GLint y, GLenum type, GLvoid *rgba); +extern void +_swrast_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb, + GLuint count, const GLint x[], const GLint y[], + void *values, GLuint valueSize); +extern void +_swrast_put_row(struct gl_context *ctx, struct gl_renderbuffer *rb, + GLuint count, GLint x, GLint y, + const GLvoid *values, GLuint valueSize); +extern void +_swrast_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb, + GLuint count, GLint x, GLint y, + GLvoid *values, GLuint valueSize); +extern void * +_swrast_get_dest_rgba(struct gl_context *ctx, struct gl_renderbuffer *rb, + SWspan *span); +typedef void (*texture_sample_func)(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoords[][4], + const GLfloat lambda[], GLfloat rgba[][4]); +typedef void ( * blend_func)( struct gl_context *ctx, GLuint n, + const GLubyte mask[], + GLvoid *src, const GLvoid *dst, + GLenum chanType); +typedef void (*swrast_point_func)( struct gl_context *ctx, const SWvertex *); +typedef void (*swrast_line_func)( struct gl_context *ctx, + const SWvertex *, const SWvertex *); +typedef void (*swrast_tri_func)( struct gl_context *ctx, const SWvertex *, + const SWvertex *, const SWvertex *); +typedef void (*validate_texture_image_func)(struct gl_context *ctx, + struct gl_texture_object *texObj, + GLuint face, GLuint level); +typedef struct +{ + struct swrast_device_driver Driver; + GLboolean AllowVertexFog; + GLboolean AllowPixelFog; + GLbitfield _RasterMask; + GLfloat _BackfaceSign; + GLfloat _BackfaceCullSign; + GLboolean _PreferPixelFog; + GLboolean _TextureCombinePrimary; + GLboolean _FogEnabled; + GLboolean _DeferredTexture; + GLuint _ActiveAttribs[FRAG_ATTRIB_MAX]; + GLbitfield _ActiveAttribMask; + GLuint _NumActiveAttribs; + GLenum _InterpMode[FRAG_ATTRIB_MAX]; + GLboolean _IntegerAccumMode; + GLfloat _IntegerAccumScaler; + GLuint StippleCounter; + GLuint PointLineFacing; + GLbitfield NewState; + GLuint StateChanges; + GLenum Primitive; + GLboolean SpecularVertexAdd; + void (*InvalidateState)( struct gl_context *ctx, GLbitfield new_state ); + GLbitfield InvalidatePointMask; + GLbitfield InvalidateLineMask; + GLbitfield InvalidateTriangleMask; + void (*choose_point)( struct gl_context * ); + void (*choose_line)( struct gl_context * ); + void (*choose_triangle)( struct gl_context * ); + swrast_point_func Point; + swrast_line_func Line; + swrast_tri_func Triangle; + swrast_point_func SpecPoint; + swrast_line_func SpecLine; + swrast_tri_func SpecTriangle; + SWspanarrays *SpanArrays; + SWspanarrays *ZoomedArrays; + SWspan PointSpan; + blend_func BlendFunc; + texture_sample_func TextureSample[16]; + GLfloat *TexelBuffer; + validate_texture_image_func ValidateTextureImage; + struct gl_program_machine FragProgMachine; +} SWcontext; +extern void +_swrast_validate_derived( struct gl_context *ctx ); +extern void +_swrast_update_texture_samplers(struct gl_context *ctx); +static __inline__ SWcontext * +SWRAST_CONTEXT(struct gl_context *ctx) +{ + return (SWcontext *) ctx->swrast_context; +} +static __inline__ const SWcontext * +CONST_SWRAST_CONTEXT(const struct gl_context *ctx) +{ + return (const SWcontext *) ctx->swrast_context; +} +static __inline__ void +swrast_render_start(struct gl_context *ctx) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + if (swrast->Driver.SpanRenderStart) + swrast->Driver.SpanRenderStart(ctx); +} +static __inline__ void +swrast_render_finish(struct gl_context *ctx) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + if (swrast->Driver.SpanRenderFinish) + swrast->Driver.SpanRenderFinish(ctx); +} +extern void _swrast_feedback_point( struct gl_context *ctx, const SWvertex *v ); +extern void _swrast_feedback_line( struct gl_context *ctx, + const SWvertex *v1, const SWvertex *v2 ); +extern void _swrast_feedback_triangle( struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, const SWvertex *v2 ); +extern void _swrast_select_point( struct gl_context *ctx, const SWvertex *v ); +extern void _swrast_select_line( struct gl_context *ctx, + const SWvertex *v1, const SWvertex *v2 ); +extern void _swrast_select_triangle( struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, const SWvertex *v2 ); +extern GLboolean +_swrast_culltriangle( struct gl_context *ctx, + const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2); +extern void +_swrast_choose_triangle( struct gl_context *ctx ); +extern void +_swrast_add_spec_terms_triangle( struct gl_context *ctx, + const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ); +GLboolean +_swrast_culltriangle( struct gl_context *ctx, + const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + GLfloat ex = v1->attrib[FRAG_ATTRIB_WPOS][0] - v0->attrib[FRAG_ATTRIB_WPOS][0]; + GLfloat ey = v1->attrib[FRAG_ATTRIB_WPOS][1] - v0->attrib[FRAG_ATTRIB_WPOS][1]; + GLfloat fx = v2->attrib[FRAG_ATTRIB_WPOS][0] - v0->attrib[FRAG_ATTRIB_WPOS][0]; + GLfloat fy = v2->attrib[FRAG_ATTRIB_WPOS][1] - v0->attrib[FRAG_ATTRIB_WPOS][1]; + GLfloat c = ex*fy-ey*fx; + if (c * swrast->_BackfaceSign * swrast->_BackfaceCullSign <= 0.0F) + return 0x0; + return 0x1; +} +static void flat_rgba_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + typedef struct { + const SWvertex *v0, *v1; + GLfloat dx; + GLfloat dy; + GLfloat dxdy; + GLfixed fdxdy; + GLfloat adjy; + GLfixed fsx; + GLfixed fsy; + GLfixed fx0; + GLint lines; + } EdgeT; + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; + const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; + const GLfloat maxDepth = ctx->DrawBuffer->_DepthMaxF; + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + SWspan span; + (void) swrast; + do { (span).primitive = (0x0009); (span).interpMask = 0x0; (span).arrayMask = 0x0; (span).arrayAttribs = 0x0; (span).end = 0; (span).leftClip = 0; (span).facing = 0; (span).array = SWRAST_CONTEXT(ctx)->SpanArrays; } while (0); + span.y = 0; + (void) fixedToDepthShift; + { + const GLfixed fy0 = (((int) ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = (((int) ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = (((int) ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + vMin = v0; vMid = v1; vMax = v2; + vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; + } + else if (fy2 <= fy0) { + vMin = v2; vMid = v0; vMax = v1; + vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; + } + else { + vMin = v0; vMid = v2; vMax = v1; + vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; + bf = -bf; + } + } + else { + if (fy0 <= fy2) { + vMin = v1; vMid = v0; vMax = v2; + vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; + bf = -bf; + } + else if (fy2 <= fy1) { + vMin = v2; vMid = v1; vMax = v0; + vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; + bf = -bf; + } + else { + vMin = v1; vMid = v2; vMax = v0; + vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; + } + } + vMin_fx = (((int) ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = (((int) ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMax_fx = (((int) ((((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + } + eMaj.v0 = vMin; eMaj.v1 = vMax; + eTop.v0 = vMid; eTop.v1 = vMax; + eBot.v0 = vMin; eBot.v1 = vMid; + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float) (1 << 11)))); + eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / ((float) (1 << 11)))); + eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + if (area * bf * swrast->_BackfaceCullSign < 0.0) + return; + oneOverArea = 1.0F / area; + span.facing = oneOverArea * bf > 0.0F; + } + { + eMaj.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eMaj.lines = (((((vMax_fy - eMaj.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eMaj.lines > 0) { + eMaj.dxdy = eMaj.dx / eMaj.dy; + eMaj.fdxdy = (((int) ((((eMaj.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eMaj.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eMaj.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); + eMaj.fx0 = vMin_fx; + eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * eMaj.dxdy); + } + else { + return; + } + eTop.fsy = (((vMid_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eTop.lines = (((((vMax_fy - eTop.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eTop.lines > 0) { + eTop.dxdy = eTop.dx / eTop.dy; + eTop.fdxdy = (((int) ((((eTop.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eTop.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eTop.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); + eTop.fx0 = vMid_fx; + eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * eTop.dxdy); + } + eBot.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eBot.lines = (((((vMid_fy - eBot.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eBot.lines > 0) { + eBot.dxdy = eBot.dx / eBot.dy; + eBot.fdxdy = (((int) ((((eBot.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eBot.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eBot.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); + eBot.fx0 = vMin_fx; + eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * eBot.dxdy); + } + } + { + GLint scan_from_left_to_right; + ; ; span.interpMask |= 0x01; span.red = ((v2->color[0]) << 11); span.green = ((v2->color[1]) << 11); span.blue = ((v2->color[2]) << 11); span.alpha = ((v2->color[3]) << 11); span.redStep = 0; span.greenStep = 0; span.blueStep = 0; span.alphaStep = 0; + scan_from_left_to_right = (oneOverArea < 0.0F); + span.interpMask |= 0x02; + { + GLfloat eMaj_dz = vMax->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + GLfloat eBot_dz = vMid->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + span.attrStepX[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); + if (span.attrStepX[FRAG_ATTRIB_WPOS][2] > maxDepth || + span.attrStepX[FRAG_ATTRIB_WPOS][2] < -maxDepth) { + span.attrStepX[FRAG_ATTRIB_WPOS][2] = 0.0; + span.attrStepY[FRAG_ATTRIB_WPOS][2] = 0.0; + } + else { + span.attrStepY[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); + } + if (depthBits <= 16) + span.zStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))); + else + span.zStep = (GLint) span.attrStepX[FRAG_ATTRIB_WPOS][2]; + } + { + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; + GLfixed fError = 0, fdError = 0; + GLuint zLeft = 0; + GLfixed fdzOuter = 0, fdzInner; + for (subTriangle=0; subTriangle<=1; subTriangle++) { + EdgeT *eLeft, *eRight; + int setupLeft, setupRight; + int lines; + if (subTriangle==0) { + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eBot; + lines = eRight->lines; + setupLeft = 1; + setupRight = 1; + } + else { + eLeft = &eBot; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 1; + } + } + else { + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eTop; + lines = eRight->lines; + setupLeft = 0; + setupRight = 1; + } + else { + eLeft = &eTop; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 0; + } + if (lines == 0) + return; + } + if (setupLeft && eLeft->lines > 0) { + const SWvertex *vLower = eLeft->v0; + const GLfixed fsy = eLeft->fsy; + const GLfixed fsx = eLeft->fsx; + const GLfixed fx = (((fsx) + (1 << 11) - 1) & (~((1 << 11) - 1))); + const GLfixed adjx = (GLfixed) (fx - eLeft->fx0); + const GLfixed adjy = (GLfixed) eLeft->adjy; + GLint idxOuter; + GLfloat dxOuter; + GLfixed fdxOuter; + fError = fx - fsx - (1 << 11); + fxLeftEdge = fsx - 1; + fdxLeftEdge = eLeft->fdxdy; + fdxOuter = ((fdxLeftEdge - 1) & (~((1 << 11) - 1))); + fdError = fdxOuter - fdxLeftEdge + (1 << 11); + idxOuter = ((fdxOuter) >> 11); + dxOuter = (GLfloat) idxOuter; + span.y = ((fsy) >> 11); + (void) dxOuter; + (void) adjx; + (void) adjy; + (void) vLower; + { + GLfloat z0 = vLower->attrib[FRAG_ATTRIB_WPOS][2]; + if (depthBits <= 16) { + GLfloat tmp = (z0 * ((float) (1 << 11)) + + span.attrStepX[FRAG_ATTRIB_WPOS][2] * adjx + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * adjy) + (1 << (11 -1)); + if (tmp < 0xffffffff / 2) + zLeft = (GLfixed) tmp; + else + zLeft = 0xffffffff / 2; + fdzOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + zLeft = (GLuint) (z0 + span.attrStepX[FRAG_ATTRIB_WPOS][2] * ((adjx) * (1.0F / ((float) (1 << 11)))) + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * ((adjy) * (1.0F / ((float) (1 << 11))))); + fdzOuter = (GLint) (span.attrStepY[FRAG_ATTRIB_WPOS][2] + + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]); + } + } + } + if (setupRight && eRight->lines>0) { + fxRightEdge = eRight->fsx - 1; + fdxRightEdge = eRight->fdxdy; + } + if (lines==0) { + continue; + } + fdzInner = fdzOuter + span.zStep; + while (lines > 0) { + const GLint right = ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + span.z = zLeft; + if (span.end > 0 && span.y >= 0) { + const GLint len = span.end - 1; + (void) len; + { + _swrast_write_rgba_span(ctx, &span);; + } + } + span.y++; + lines--; + fxLeftEdge += fdxLeftEdge; + fxRightEdge += fdxRightEdge; + fError += fdError; + if (fError >= 0) { + fError -= (1 << 11); + zLeft += fdzOuter; + } + else { + zLeft += fdzInner; + } + } + } + } + } +} +static void smooth_rgba_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + typedef struct { + const SWvertex *v0, *v1; + GLfloat dx; + GLfloat dy; + GLfloat dxdy; + GLfixed fdxdy; + GLfloat adjy; + GLfixed fsx; + GLfixed fsy; + GLfixed fx0; + GLint lines; + } EdgeT; + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; + const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; + const GLfloat maxDepth = ctx->DrawBuffer->_DepthMaxF; + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + SWspan span; + (void) swrast; + do { (span).primitive = (0x0009); (span).interpMask = 0x0; (span).arrayMask = 0x0; (span).arrayAttribs = 0x0; (span).end = 0; (span).leftClip = 0; (span).facing = 0; (span).array = SWRAST_CONTEXT(ctx)->SpanArrays; } while (0); + span.y = 0; + (void) fixedToDepthShift; + { + const GLfixed fy0 = (((int) ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = (((int) ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = (((int) ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + vMin = v0; vMid = v1; vMax = v2; + vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; + } + else if (fy2 <= fy0) { + vMin = v2; vMid = v0; vMax = v1; + vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; + } + else { + vMin = v0; vMid = v2; vMax = v1; + vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; + bf = -bf; + } + } + else { + if (fy0 <= fy2) { + vMin = v1; vMid = v0; vMax = v2; + vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; + bf = -bf; + } + else if (fy2 <= fy1) { + vMin = v2; vMid = v1; vMax = v0; + vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; + bf = -bf; + } + else { + vMin = v1; vMid = v2; vMax = v0; + vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; + } + } + vMin_fx = (((int) ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = (((int) ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMax_fx = (((int) ((((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + } + eMaj.v0 = vMin; eMaj.v1 = vMax; + eTop.v0 = vMid; eTop.v1 = vMax; + eBot.v0 = vMin; eBot.v1 = vMid; + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float) (1 << 11)))); + eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / ((float) (1 << 11)))); + eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + if (area * bf * swrast->_BackfaceCullSign < 0.0) + return; + oneOverArea = 1.0F / area; + span.facing = oneOverArea * bf > 0.0F; + } + { + eMaj.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eMaj.lines = (((((vMax_fy - eMaj.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eMaj.lines > 0) { + eMaj.dxdy = eMaj.dx / eMaj.dy; + eMaj.fdxdy = (((int) ((((eMaj.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eMaj.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eMaj.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); + eMaj.fx0 = vMin_fx; + eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * eMaj.dxdy); + } + else { + return; + } + eTop.fsy = (((vMid_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eTop.lines = (((((vMax_fy - eTop.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eTop.lines > 0) { + eTop.dxdy = eTop.dx / eTop.dy; + eTop.fdxdy = (((int) ((((eTop.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eTop.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eTop.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); + eTop.fx0 = vMid_fx; + eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * eTop.dxdy); + } + eBot.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eBot.lines = (((((vMid_fy - eBot.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eBot.lines > 0) { + eBot.dxdy = eBot.dx / eBot.dy; + eBot.fdxdy = (((int) ((((eBot.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eBot.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eBot.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); + eBot.fx0 = vMin_fx; + eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * eBot.dxdy); + } + } + { + GLint scan_from_left_to_right; + { ; ; } + scan_from_left_to_right = (oneOverArea < 0.0F); + span.interpMask |= 0x02; + { + GLfloat eMaj_dz = vMax->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + GLfloat eBot_dz = vMid->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + span.attrStepX[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); + if (span.attrStepX[FRAG_ATTRIB_WPOS][2] > maxDepth || + span.attrStepX[FRAG_ATTRIB_WPOS][2] < -maxDepth) { + span.attrStepX[FRAG_ATTRIB_WPOS][2] = 0.0; + span.attrStepY[FRAG_ATTRIB_WPOS][2] = 0.0; + } + else { + span.attrStepY[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); + } + if (depthBits <= 16) + span.zStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))); + else + span.zStep = (GLint) span.attrStepX[FRAG_ATTRIB_WPOS][2]; + } + span.interpMask |= 0x01; + if (ctx->Light.ShadeModel == 0x1D01) { + GLfloat eMaj_dr = (GLfloat) (vMax->color[0] - vMin->color[0]); + GLfloat eBot_dr = (GLfloat) (vMid->color[0] - vMin->color[0]); + GLfloat eMaj_dg = (GLfloat) (vMax->color[1] - vMin->color[1]); + GLfloat eBot_dg = (GLfloat) (vMid->color[1] - vMin->color[1]); + GLfloat eMaj_db = (GLfloat) (vMax->color[2] - vMin->color[2]); + GLfloat eBot_db = (GLfloat) (vMid->color[2] - vMin->color[2]); + GLfloat eMaj_da = (GLfloat) (vMax->color[3] - vMin->color[3]); + GLfloat eBot_da = (GLfloat) (vMid->color[3] - vMin->color[3]); + span.attrStepX[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); + span.attrStepY[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); + span.attrStepY[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); + span.attrStepY[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); + span.redStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) - 0.5F)))); + span.greenStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) - 0.5F)))); + span.blueStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) - 0.5F)))); + span.attrStepX[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj_da * eBot.dy - eMaj.dy * eBot_da); + span.attrStepY[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx); + span.alphaStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) - 0.5F)))); + } + else { + ; + span.interpMask |= 0x04; + span.attrStepX[FRAG_ATTRIB_COL0][0] = span.attrStepY[FRAG_ATTRIB_COL0][0] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][1] = span.attrStepY[FRAG_ATTRIB_COL0][1] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][2] = span.attrStepY[FRAG_ATTRIB_COL0][2] = 0.0F; + span.redStep = 0; + span.greenStep = 0; + span.blueStep = 0; + span.attrStepX[FRAG_ATTRIB_COL0][3] = span.attrStepY[FRAG_ATTRIB_COL0][3] = 0.0F; + span.alphaStep = 0; + } + { + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; + GLfixed fError = 0, fdError = 0; + GLuint zLeft = 0; + GLfixed fdzOuter = 0, fdzInner; + GLint rLeft = 0, fdrOuter = 0, fdrInner; + GLint gLeft = 0, fdgOuter = 0, fdgInner; + GLint bLeft = 0, fdbOuter = 0, fdbInner; + GLint aLeft = 0, fdaOuter = 0, fdaInner; + for (subTriangle=0; subTriangle<=1; subTriangle++) { + EdgeT *eLeft, *eRight; + int setupLeft, setupRight; + int lines; + if (subTriangle==0) { + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eBot; + lines = eRight->lines; + setupLeft = 1; + setupRight = 1; + } + else { + eLeft = &eBot; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 1; + } + } + else { + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eTop; + lines = eRight->lines; + setupLeft = 0; + setupRight = 1; + } + else { + eLeft = &eTop; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 0; + } + if (lines == 0) + return; + } + if (setupLeft && eLeft->lines > 0) { + const SWvertex *vLower = eLeft->v0; + const GLfixed fsy = eLeft->fsy; + const GLfixed fsx = eLeft->fsx; + const GLfixed fx = (((fsx) + (1 << 11) - 1) & (~((1 << 11) - 1))); + const GLfixed adjx = (GLfixed) (fx - eLeft->fx0); + const GLfixed adjy = (GLfixed) eLeft->adjy; + GLint idxOuter; + GLfloat dxOuter; + GLfixed fdxOuter; + fError = fx - fsx - (1 << 11); + fxLeftEdge = fsx - 1; + fdxLeftEdge = eLeft->fdxdy; + fdxOuter = ((fdxLeftEdge - 1) & (~((1 << 11) - 1))); + fdError = fdxOuter - fdxLeftEdge + (1 << 11); + idxOuter = ((fdxOuter) >> 11); + dxOuter = (GLfloat) idxOuter; + span.y = ((fsy) >> 11); + (void) dxOuter; + (void) adjx; + (void) adjy; + (void) vLower; + { + GLfloat z0 = vLower->attrib[FRAG_ATTRIB_WPOS][2]; + if (depthBits <= 16) { + GLfloat tmp = (z0 * ((float) (1 << 11)) + + span.attrStepX[FRAG_ATTRIB_WPOS][2] * adjx + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * adjy) + (1 << (11 -1)); + if (tmp < 0xffffffff / 2) + zLeft = (GLfixed) tmp; + else + zLeft = 0xffffffff / 2; + fdzOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + zLeft = (GLuint) (z0 + span.attrStepX[FRAG_ATTRIB_WPOS][2] * ((adjx) * (1.0F / ((float) (1 << 11)))) + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * ((adjy) * (1.0F / ((float) (1 << 11))))); + fdzOuter = (GLint) (span.attrStepY[FRAG_ATTRIB_WPOS][2] + + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]); + } + } + if (ctx->Light.ShadeModel == 0x1D01) { + rLeft = (GLint)(((vLower->color[0]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][0] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][0] * adjy) + (1 << (11 -1)); + gLeft = (GLint)(((vLower->color[1]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][1] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][1] * adjy) + (1 << (11 -1)); + bLeft = (GLint)(((vLower->color[2]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][2] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][2] * adjy) + (1 << (11 -1)); + fdrOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) - 0.5F)))) + ; + fdgOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) - 0.5F)))) + ; + fdbOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + aLeft = (GLint)(((vLower->color[3]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][3] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][3] * adjy) + (1 << (11 -1)); + fdaOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + ; + rLeft = ((v2->color[0]) << 11); + gLeft = ((v2->color[1]) << 11); + bLeft = ((v2->color[2]) << 11); + fdrOuter = fdgOuter = fdbOuter = 0; + aLeft = ((v2->color[3]) << 11); + fdaOuter = 0; + } + } + if (setupRight && eRight->lines>0) { + fxRightEdge = eRight->fsx - 1; + fdxRightEdge = eRight->fdxdy; + } + if (lines==0) { + continue; + } + fdzInner = fdzOuter + span.zStep; + fdrInner = fdrOuter + span.redStep; + fdgInner = fdgOuter + span.greenStep; + fdbInner = fdbOuter + span.blueStep; + fdaInner = fdaOuter + span.alphaStep; + while (lines > 0) { + const GLint right = ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + span.z = zLeft; + span.red = rLeft; + span.green = gLeft; + span.blue = bLeft; + span.alpha = aLeft; + if (span.end > 0 && span.y >= 0) { + const GLint len = span.end - 1; + (void) len; + do { GLfixed endVal = span.red + (len) * span.redStep; if (endVal < 0) { span.red -= endVal; } if (span.red < 0) { span.red = 0; } } while (0); + do { GLfixed endVal = span.green + (len) * span.greenStep; if (endVal < 0) { span.green -= endVal; } if (span.green < 0) { span.green = 0; } } while (0); + do { GLfixed endVal = span.blue + (len) * span.blueStep; if (endVal < 0) { span.blue -= endVal; } if (span.blue < 0) { span.blue = 0; } } while (0); + do { GLfixed endVal = span.alpha + (len) * span.alphaStep; if (endVal < 0) { span.alpha -= endVal; } if (span.alpha < 0) { span.alpha = 0; } } while (0); + { + _swrast_write_rgba_span(ctx, &span);; + } + } + span.y++; + lines--; + fxLeftEdge += fdxLeftEdge; + fxRightEdge += fdxRightEdge; + fError += fdError; + if (fError >= 0) { + fError -= (1 << 11); + zLeft += fdzOuter; + rLeft += fdrOuter; + gLeft += fdgOuter; + bLeft += fdbOuter; + aLeft += fdaOuter; + } + else { + zLeft += fdzInner; + rLeft += fdrInner; + gLeft += fdgInner; + bLeft += fdbInner; + aLeft += fdaInner; + } + } + } + } + } +} +static void simple_textured_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + typedef struct { + const SWvertex *v0, *v1; + GLfloat dx; + GLfloat dy; + GLfloat dxdy; + GLfixed fdxdy; + GLfloat adjy; + GLfixed fsx; + GLfixed fsy; + GLfixed fx0; + GLint lines; + } EdgeT; + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + SWspan span; + (void) swrast; + do { (span).primitive = (0x0009); (span).interpMask = 0x0; (span).arrayMask = 0x0; (span).arrayAttribs = 0x0; (span).end = 0; (span).leftClip = 0; (span).facing = 0; (span).array = SWRAST_CONTEXT(ctx)->SpanArrays; } while (0); + span.y = 0; + { + const GLfixed fy0 = (((int) ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = (((int) ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = (((int) ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + vMin = v0; vMid = v1; vMax = v2; + vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; + } + else if (fy2 <= fy0) { + vMin = v2; vMid = v0; vMax = v1; + vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; + } + else { + vMin = v0; vMid = v2; vMax = v1; + vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; + bf = -bf; + } + } + else { + if (fy0 <= fy2) { + vMin = v1; vMid = v0; vMax = v2; + vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; + bf = -bf; + } + else if (fy2 <= fy1) { + vMin = v2; vMid = v1; vMax = v0; + vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; + bf = -bf; + } + else { + vMin = v1; vMid = v2; vMax = v0; + vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; + } + } + vMin_fx = (((int) ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = (((int) ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMax_fx = (((int) ((((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + } + eMaj.v0 = vMin; eMaj.v1 = vMax; + eTop.v0 = vMid; eTop.v1 = vMax; + eBot.v0 = vMin; eBot.v1 = vMid; + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float) (1 << 11)))); + eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / ((float) (1 << 11)))); + eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + if (area * bf * swrast->_BackfaceCullSign < 0.0) + return; + oneOverArea = 1.0F / area; + span.facing = oneOverArea * bf > 0.0F; + } + { + eMaj.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eMaj.lines = (((((vMax_fy - eMaj.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eMaj.lines > 0) { + eMaj.dxdy = eMaj.dx / eMaj.dy; + eMaj.fdxdy = (((int) ((((eMaj.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eMaj.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eMaj.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); + eMaj.fx0 = vMin_fx; + eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * eMaj.dxdy); + } + else { + return; + } + eTop.fsy = (((vMid_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eTop.lines = (((((vMax_fy - eTop.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eTop.lines > 0) { + eTop.dxdy = eTop.dx / eTop.dy; + eTop.fdxdy = (((int) ((((eTop.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eTop.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eTop.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); + eTop.fx0 = vMid_fx; + eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * eTop.dxdy); + } + eBot.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eBot.lines = (((((vMid_fy - eBot.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eBot.lines > 0) { + eBot.dxdy = eBot.dx / eBot.dy; + eBot.fdxdy = (((int) ((((eBot.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eBot.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eBot.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); + eBot.fx0 = vMin_fx; + eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * eBot.dxdy); + } + } + { + GLint scan_from_left_to_right; + struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0]; const struct gl_texture_object *obj = ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; const struct gl_texture_image *texImg = obj->Image[0][obj->BaseLevel]; const GLfloat twidth = (GLfloat) texImg->Width; const GLfloat theight = (GLfloat) texImg->Height; const GLint twidth_log2 = texImg->WidthLog2; const GLubyte *texture = (const GLubyte *) texImg->Data; const GLint smask = texImg->Width - 1; const GLint tmask = texImg->Height - 1; ; if (!rb || !texture) { return; } + scan_from_left_to_right = (oneOverArea < 0.0F); + { + GLfloat eMaj_ds = (vMax->attrib[FRAG_ATTRIB_TEX0][0] - vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + GLfloat eBot_ds = (vMid->attrib[FRAG_ATTRIB_TEX0][0] - vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + GLfloat eMaj_dt = (vMax->attrib[FRAG_ATTRIB_TEX0][1] - vMin->attrib[FRAG_ATTRIB_TEX0][1]) * theight; + GLfloat eBot_dt = (vMid->attrib[FRAG_ATTRIB_TEX0][1] - vMin->attrib[FRAG_ATTRIB_TEX0][1]) * theight; + span.attrStepX[FRAG_ATTRIB_TEX0][0] = oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); + span.attrStepY[FRAG_ATTRIB_TEX0][0] = oneOverArea * (eMaj.dx * eBot_ds - eMaj_ds * eBot.dx); + span.attrStepX[FRAG_ATTRIB_TEX0][1] = oneOverArea * (eMaj_dt * eBot.dy - eMaj.dy * eBot_dt); + span.attrStepY[FRAG_ATTRIB_TEX0][1] = oneOverArea * (eMaj.dx * eBot_dt - eMaj_dt * eBot.dx); + span.intTexStep[0] = (((int) ((((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) - 0.5F)))); + span.intTexStep[1] = (((int) ((((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) - 0.5F)))); + } + { + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; + GLfixed fError = 0, fdError = 0; + GLfixed sLeft=0, dsOuter=0, dsInner; + GLfixed tLeft=0, dtOuter=0, dtInner; + for (subTriangle=0; subTriangle<=1; subTriangle++) { + EdgeT *eLeft, *eRight; + int setupLeft, setupRight; + int lines; + if (subTriangle==0) { + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eBot; + lines = eRight->lines; + setupLeft = 1; + setupRight = 1; + } + else { + eLeft = &eBot; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 1; + } + } + else { + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eTop; + lines = eRight->lines; + setupLeft = 0; + setupRight = 1; + } + else { + eLeft = &eTop; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 0; + } + if (lines == 0) + return; + } + if (setupLeft && eLeft->lines > 0) { + const SWvertex *vLower = eLeft->v0; + const GLfixed fsy = eLeft->fsy; + const GLfixed fsx = eLeft->fsx; + const GLfixed fx = (((fsx) + (1 << 11) - 1) & (~((1 << 11) - 1))); + const GLfixed adjx = (GLfixed) (fx - eLeft->fx0); + const GLfixed adjy = (GLfixed) eLeft->adjy; + GLint idxOuter; + GLfloat dxOuter; + GLfixed fdxOuter; + fError = fx - fsx - (1 << 11); + fxLeftEdge = fsx - 1; + fdxLeftEdge = eLeft->fdxdy; + fdxOuter = ((fdxLeftEdge - 1) & (~((1 << 11) - 1))); + fdError = fdxOuter - fdxLeftEdge + (1 << 11); + idxOuter = ((fdxOuter) >> 11); + dxOuter = (GLfloat) idxOuter; + span.y = ((fsy) >> 11); + (void) dxOuter; + (void) adjx; + (void) adjy; + (void) vLower; + { + GLfloat s0, t0; + s0 = vLower->attrib[FRAG_ATTRIB_TEX0][0] * twidth; + sLeft = (GLfixed)(s0 * ((float) (1 << 11)) + span.attrStepX[FRAG_ATTRIB_TEX0][0] * adjx + + span.attrStepY[FRAG_ATTRIB_TEX0][0] * adjy) + (1 << (11 -1)); + dsOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) - 0.5F)))) + ; + t0 = vLower->attrib[FRAG_ATTRIB_TEX0][1] * theight; + tLeft = (GLfixed)(t0 * ((float) (1 << 11)) + span.attrStepX[FRAG_ATTRIB_TEX0][1] * adjx + + span.attrStepY[FRAG_ATTRIB_TEX0][1] * adjy) + (1 << (11 -1)); + dtOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + } + if (setupRight && eRight->lines>0) { + fxRightEdge = eRight->fsx - 1; + fdxRightEdge = eRight->fdxdy; + } + if (lines==0) { + continue; + } + dsInner = dsOuter + span.intTexStep[0]; + dtInner = dtOuter + span.intTexStep[1]; + while (lines > 0) { + const GLint right = ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + span.intTex[0] = sLeft; + span.intTex[1] = tLeft; + if (span.end > 0 && span.y >= 0) { + const GLint len = span.end - 1; + (void) len; + { + GLuint i; GLubyte rgb[16384][3]; span.intTex[0] -= (1 << (11 -1)); span.intTex[1] -= (1 << (11 -1)); for (i = 0; i < span.end; i++) { GLint s = ((span.intTex[0]) >> 11) & smask; GLint t = ((span.intTex[1]) >> 11) & tmask; GLint pos = (t << twidth_log2) + s; pos = pos + pos + pos; rgb[i][0] = texture[pos+2]; rgb[i][1] = texture[pos+1]; rgb[i][2] = texture[pos+0]; span.intTex[0] += span.intTexStep[0]; span.intTex[1] += span.intTexStep[1]; } rb->PutRowRGB(ctx, rb, span.end, span.x, span.y, rgb, ((void *)0));; + } + } + span.y++; + lines--; + fxLeftEdge += fdxLeftEdge; + fxRightEdge += fdxRightEdge; + fError += fdError; + if (fError >= 0) { + fError -= (1 << 11); + sLeft += dsOuter; + tLeft += dtOuter; + } + else { + sLeft += dsInner; + tLeft += dtInner; + } + } + } + } + } +} +static void simple_z_textured_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + typedef struct { + const SWvertex *v0, *v1; + GLfloat dx; + GLfloat dy; + GLfloat dxdy; + GLfixed fdxdy; + GLfloat adjy; + GLfixed fsx; + GLfixed fsy; + GLfixed fx0; + GLint lines; + } EdgeT; + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; + const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; + const GLfloat maxDepth = ctx->DrawBuffer->_DepthMaxF; + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + SWspan span; + (void) swrast; + do { (span).primitive = (0x0009); (span).interpMask = 0x0; (span).arrayMask = 0x0; (span).arrayAttribs = 0x0; (span).end = 0; (span).leftClip = 0; (span).facing = 0; (span).array = SWRAST_CONTEXT(ctx)->SpanArrays; } while (0); + span.y = 0; + (void) fixedToDepthShift; + { + const GLfixed fy0 = (((int) ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = (((int) ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = (((int) ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + vMin = v0; vMid = v1; vMax = v2; + vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; + } + else if (fy2 <= fy0) { + vMin = v2; vMid = v0; vMax = v1; + vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; + } + else { + vMin = v0; vMid = v2; vMax = v1; + vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; + bf = -bf; + } + } + else { + if (fy0 <= fy2) { + vMin = v1; vMid = v0; vMax = v2; + vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; + bf = -bf; + } + else if (fy2 <= fy1) { + vMin = v2; vMid = v1; vMax = v0; + vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; + bf = -bf; + } + else { + vMin = v1; vMid = v2; vMax = v0; + vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; + } + } + vMin_fx = (((int) ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = (((int) ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMax_fx = (((int) ((((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + } + eMaj.v0 = vMin; eMaj.v1 = vMax; + eTop.v0 = vMid; eTop.v1 = vMax; + eBot.v0 = vMin; eBot.v1 = vMid; + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float) (1 << 11)))); + eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / ((float) (1 << 11)))); + eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + if (area * bf * swrast->_BackfaceCullSign < 0.0) + return; + oneOverArea = 1.0F / area; + span.facing = oneOverArea * bf > 0.0F; + } + { + eMaj.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eMaj.lines = (((((vMax_fy - eMaj.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eMaj.lines > 0) { + eMaj.dxdy = eMaj.dx / eMaj.dy; + eMaj.fdxdy = (((int) ((((eMaj.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eMaj.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eMaj.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); + eMaj.fx0 = vMin_fx; + eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * eMaj.dxdy); + } + else { + return; + } + eTop.fsy = (((vMid_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eTop.lines = (((((vMax_fy - eTop.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eTop.lines > 0) { + eTop.dxdy = eTop.dx / eTop.dy; + eTop.fdxdy = (((int) ((((eTop.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eTop.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eTop.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); + eTop.fx0 = vMid_fx; + eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * eTop.dxdy); + } + eBot.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eBot.lines = (((((vMid_fy - eBot.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eBot.lines > 0) { + eBot.dxdy = eBot.dx / eBot.dy; + eBot.fdxdy = (((int) ((((eBot.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eBot.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eBot.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); + eBot.fx0 = vMin_fx; + eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * eBot.dxdy); + } + } + { + GLint scan_from_left_to_right; + struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0]; const struct gl_texture_object *obj = ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; const struct gl_texture_image *texImg = obj->Image[0][obj->BaseLevel]; const GLfloat twidth = (GLfloat) texImg->Width; const GLfloat theight = (GLfloat) texImg->Height; const GLint twidth_log2 = texImg->WidthLog2; const GLubyte *texture = (const GLubyte *) texImg->Data; const GLint smask = texImg->Width - 1; const GLint tmask = texImg->Height - 1; ; if (!rb || !texture) { return; } + scan_from_left_to_right = (oneOverArea < 0.0F); + span.interpMask |= 0x02; + { + GLfloat eMaj_dz = vMax->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + GLfloat eBot_dz = vMid->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + span.attrStepX[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); + if (span.attrStepX[FRAG_ATTRIB_WPOS][2] > maxDepth || + span.attrStepX[FRAG_ATTRIB_WPOS][2] < -maxDepth) { + span.attrStepX[FRAG_ATTRIB_WPOS][2] = 0.0; + span.attrStepY[FRAG_ATTRIB_WPOS][2] = 0.0; + } + else { + span.attrStepY[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); + } + if (depthBits <= 16) + span.zStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))); + else + span.zStep = (GLint) span.attrStepX[FRAG_ATTRIB_WPOS][2]; + } + { + GLfloat eMaj_ds = (vMax->attrib[FRAG_ATTRIB_TEX0][0] - vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + GLfloat eBot_ds = (vMid->attrib[FRAG_ATTRIB_TEX0][0] - vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + GLfloat eMaj_dt = (vMax->attrib[FRAG_ATTRIB_TEX0][1] - vMin->attrib[FRAG_ATTRIB_TEX0][1]) * theight; + GLfloat eBot_dt = (vMid->attrib[FRAG_ATTRIB_TEX0][1] - vMin->attrib[FRAG_ATTRIB_TEX0][1]) * theight; + span.attrStepX[FRAG_ATTRIB_TEX0][0] = oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); + span.attrStepY[FRAG_ATTRIB_TEX0][0] = oneOverArea * (eMaj.dx * eBot_ds - eMaj_ds * eBot.dx); + span.attrStepX[FRAG_ATTRIB_TEX0][1] = oneOverArea * (eMaj_dt * eBot.dy - eMaj.dy * eBot_dt); + span.attrStepY[FRAG_ATTRIB_TEX0][1] = oneOverArea * (eMaj.dx * eBot_dt - eMaj_dt * eBot.dx); + span.intTexStep[0] = (((int) ((((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) - 0.5F)))); + span.intTexStep[1] = (((int) ((((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) - 0.5F)))); + } + { + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; + GLfixed fError = 0, fdError = 0; + struct gl_renderbuffer *zrb + = ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Renderbuffer; + GLushort *zRow = ((void *)0); + GLint dZRowOuter = 0, dZRowInner; + GLuint zLeft = 0; + GLfixed fdzOuter = 0, fdzInner; + GLfixed sLeft=0, dsOuter=0, dsInner; + GLfixed tLeft=0, dtOuter=0, dtInner; + for (subTriangle=0; subTriangle<=1; subTriangle++) { + EdgeT *eLeft, *eRight; + int setupLeft, setupRight; + int lines; + if (subTriangle==0) { + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eBot; + lines = eRight->lines; + setupLeft = 1; + setupRight = 1; + } + else { + eLeft = &eBot; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 1; + } + } + else { + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eTop; + lines = eRight->lines; + setupLeft = 0; + setupRight = 1; + } + else { + eLeft = &eTop; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 0; + } + if (lines == 0) + return; + } + if (setupLeft && eLeft->lines > 0) { + const SWvertex *vLower = eLeft->v0; + const GLfixed fsy = eLeft->fsy; + const GLfixed fsx = eLeft->fsx; + const GLfixed fx = (((fsx) + (1 << 11) - 1) & (~((1 << 11) - 1))); + const GLfixed adjx = (GLfixed) (fx - eLeft->fx0); + const GLfixed adjy = (GLfixed) eLeft->adjy; + GLint idxOuter; + GLfloat dxOuter; + GLfixed fdxOuter; + fError = fx - fsx - (1 << 11); + fxLeftEdge = fsx - 1; + fdxLeftEdge = eLeft->fdxdy; + fdxOuter = ((fdxLeftEdge - 1) & (~((1 << 11) - 1))); + fdError = fdxOuter - fdxLeftEdge + (1 << 11); + idxOuter = ((fdxOuter) >> 11); + dxOuter = (GLfloat) idxOuter; + span.y = ((fsy) >> 11); + (void) dxOuter; + (void) adjx; + (void) adjy; + (void) vLower; + { + GLfloat z0 = vLower->attrib[FRAG_ATTRIB_WPOS][2]; + if (depthBits <= 16) { + GLfloat tmp = (z0 * ((float) (1 << 11)) + + span.attrStepX[FRAG_ATTRIB_WPOS][2] * adjx + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * adjy) + (1 << (11 -1)); + if (tmp < 0xffffffff / 2) + zLeft = (GLfixed) tmp; + else + zLeft = 0xffffffff / 2; + fdzOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + zLeft = (GLuint) (z0 + span.attrStepX[FRAG_ATTRIB_WPOS][2] * ((adjx) * (1.0F / ((float) (1 << 11)))) + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * ((adjy) * (1.0F / ((float) (1 << 11))))); + fdzOuter = (GLint) (span.attrStepY[FRAG_ATTRIB_WPOS][2] + + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]); + } + zRow = (GLushort *) + zrb->GetPointer(ctx, zrb, ((fxLeftEdge) >> 11), span.y); + dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLushort); + } + { + GLfloat s0, t0; + s0 = vLower->attrib[FRAG_ATTRIB_TEX0][0] * twidth; + sLeft = (GLfixed)(s0 * ((float) (1 << 11)) + span.attrStepX[FRAG_ATTRIB_TEX0][0] * adjx + + span.attrStepY[FRAG_ATTRIB_TEX0][0] * adjy) + (1 << (11 -1)); + dsOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) - 0.5F)))) + ; + t0 = vLower->attrib[FRAG_ATTRIB_TEX0][1] * theight; + tLeft = (GLfixed)(t0 * ((float) (1 << 11)) + span.attrStepX[FRAG_ATTRIB_TEX0][1] * adjx + + span.attrStepY[FRAG_ATTRIB_TEX0][1] * adjy) + (1 << (11 -1)); + dtOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + } + if (setupRight && eRight->lines>0) { + fxRightEdge = eRight->fsx - 1; + fdxRightEdge = eRight->fdxdy; + } + if (lines==0) { + continue; + } + dZRowInner = dZRowOuter + sizeof(GLushort); + fdzInner = fdzOuter + span.zStep; + dsInner = dsOuter + span.intTexStep[0]; + dtInner = dtOuter + span.intTexStep[1]; + while (lines > 0) { + const GLint right = ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + span.z = zLeft; + span.intTex[0] = sLeft; + span.intTex[1] = tLeft; + if (span.end > 0 && span.y >= 0) { + const GLint len = span.end - 1; + (void) len; + { + GLuint i; GLubyte rgb[16384][3]; span.intTex[0] -= (1 << (11 -1)); span.intTex[1] -= (1 << (11 -1)); for (i = 0; i < span.end; i++) { const GLuint z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { GLint s = ((span.intTex[0]) >> 11) & smask; GLint t = ((span.intTex[1]) >> 11) & tmask; GLint pos = (t << twidth_log2) + s; pos = pos + pos + pos; rgb[i][0] = texture[pos+2]; rgb[i][1] = texture[pos+1]; rgb[i][2] = texture[pos+0]; zRow[i] = z; span.array->mask[i] = 1; } else { span.array->mask[i] = 0; } span.intTex[0] += span.intTexStep[0]; span.intTex[1] += span.intTexStep[1]; span.z += span.zStep; } rb->PutRowRGB(ctx, rb, span.end, span.x, span.y, rgb, span.array->mask);; + } + } + span.y++; + lines--; + fxLeftEdge += fdxLeftEdge; + fxRightEdge += fdxRightEdge; + fError += fdError; + if (fError >= 0) { + fError -= (1 << 11); + zRow = (GLushort *) ((GLubyte *) zRow + dZRowOuter); + zLeft += fdzOuter; + sLeft += dsOuter; + tLeft += dtOuter; + } + else { + zRow = (GLushort *) ((GLubyte *) zRow + dZRowInner); + zLeft += fdzInner; + sLeft += dsInner; + tLeft += dtInner; + } + } + } + } + } +} +struct affine_info +{ + GLenum filter; + GLenum format; + GLenum envmode; + GLint smask, tmask; + GLint twidth_log2; + const GLchan *texture; + GLfixed er, eg, eb, ea; + GLint tbytesline, tsize; +}; +static __inline__ GLint +ilerp(GLint t, GLint a, GLint b) +{ + return a + ((t * (b - a)) >> 11); +} +static __inline__ GLint +ilerp_2d(GLint ia, GLint ib, GLint v00, GLint v10, GLint v01, GLint v11) +{ + const GLint temp0 = ilerp(ia, v00, v10); + const GLint temp1 = ilerp(ia, v01, v11); + return ilerp(ib, temp0, temp1); +} +static __inline__ void +affine_span(struct gl_context *ctx, SWspan *span, + struct affine_info *info) +{ + GLchan sample[4]; + const GLuint texEnableSave = ctx->Texture._EnabledCoordUnits; + GLuint i; + GLchan *dest = span->array->rgba[0]; + ctx->Texture._EnabledCoordUnits = 0x0; + span->intTex[0] -= (1 << (11 -1)); + span->intTex[1] -= (1 << (11 -1)); + switch (info->filter) { + case 0x2600: + switch (info->format) { + case MESA_FORMAT_RGB888: + switch (info->envmode) { + case 0x2100: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; sample[0] = tex00[2]; sample[1] = tex00[1]; sample[2] = tex00[0]; sample[3] = 255;;dest[0] = span->red * (sample[0] + 1u) >> (11 + 8); dest[1] = span->green * (sample[1] + 1u) >> (11 + 8); dest[2] = span->blue * (sample[2] + 1u) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1u) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x2101: + case 0x1E01: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; sample[0] = tex00[2]; sample[1] = tex00[1]; sample[2] = tex00[0]; sample[3] = 255;; dest[0] = sample[0]; dest[1] = sample[1]; dest[2] = sample[2]; dest[3] = ((span->alpha) >> 11);; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x0BE2: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; sample[0] = tex00[2]; sample[1] = tex00[1]; sample[2] = tex00[0]; sample[3] = 255;;dest[0] = ((255 - sample[0]) * span->red + (sample[0] + 1) * info->er) >> (11 + 8); dest[1] = ((255 - sample[1]) * span->green + (sample[1] + 1) * info->eg) >> (11 + 8); dest[2] = ((255 - sample[2]) * span->blue + (sample[2] + 1) * info->eb) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x0104: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; sample[0] = tex00[2]; sample[1] = tex00[1]; sample[2] = tex00[0]; sample[3] = 255;;{ GLint rSum = ((span->red) >> 11) + (GLint) sample[0]; GLint gSum = ((span->green) >> 11) + (GLint) sample[1]; GLint bSum = ((span->blue) >> 11) + (GLint) sample[2]; dest[0] = ( (rSum)<(255) ? (rSum) : (255) ); dest[1] = ( (gSum)<(255) ? (gSum) : (255) ); dest[2] = ( (bSum)<(255) ? (bSum) : (255) ); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); }; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + default: + _mesa_problem(ctx, "bad tex env mode in SPAN_LINEAR"); + return; + } + break; + case MESA_FORMAT_RGBA8888: + switch(info->envmode) { + case 0x2100: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; sample[0] = tex00[3]; sample[1] = tex00[2]; sample[2] = tex00[1]; sample[3] = tex00[0];;dest[0] = span->red * (sample[0] + 1u) >> (11 + 8); dest[1] = span->green * (sample[1] + 1u) >> (11 + 8); dest[2] = span->blue * (sample[2] + 1u) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1u) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x2101: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; sample[0] = tex00[3]; sample[1] = tex00[2]; sample[2] = tex00[1]; sample[3] = tex00[0];;dest[0] = ((255 - sample[3]) * span->red + ((sample[3] + 1) * sample[0] << 11)) >> (11 + 8); dest[1] = ((255 - sample[3]) * span->green + ((sample[3] + 1) * sample[1] << 11)) >> (11 + 8); dest[2] = ((255 - sample[3]) * span->blue + ((sample[3] + 1) * sample[2] << 11)) >> (11 + 8); dest[3] = ((span->alpha) >> 11); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x0BE2: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; sample[0] = tex00[3]; sample[1] = tex00[2]; sample[2] = tex00[1]; sample[3] = tex00[0];;dest[0] = ((255 - sample[0]) * span->red + (sample[0] + 1) * info->er) >> (11 + 8); dest[1] = ((255 - sample[1]) * span->green + (sample[1] + 1) * info->eg) >> (11 + 8); dest[2] = ((255 - sample[2]) * span->blue + (sample[2] + 1) * info->eb) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x0104: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; sample[0] = tex00[3]; sample[1] = tex00[2]; sample[2] = tex00[1]; sample[3] = tex00[0];;{ GLint rSum = ((span->red) >> 11) + (GLint) sample[0]; GLint gSum = ((span->green) >> 11) + (GLint) sample[1]; GLint bSum = ((span->blue) >> 11) + (GLint) sample[2]; dest[0] = ( (rSum)<(255) ? (rSum) : (255) ); dest[1] = ( (gSum)<(255) ? (gSum) : (255) ); dest[2] = ( (bSum)<(255) ? (bSum) : (255) ); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); }; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x1E01: + for (i = 0; i < span->end; i++) { GLint s = ((span->intTex[0]) >> 11) & info->smask; GLint t = ((span->intTex[1]) >> 11) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; dest[0] = tex00[3]; dest[1] = tex00[2]; dest[2] = tex00[1]; dest[3] = tex00[0]; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + default: + _mesa_problem(ctx, "bad tex env mode (2) in SPAN_LINEAR"); + return; + } + break; + } + break; + case 0x2601: + span->intTex[0] -= (1 << (11 -1)); + span->intTex[1] -= (1 << (11 -1)); + switch (info->format) { + case MESA_FORMAT_RGB888: + switch (info->envmode) { + case 0x2100: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 3; const GLchan *tex11 = tex10 + 3; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[1] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[2] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]); sample[3] = 255;;dest[0] = span->red * (sample[0] + 1u) >> (11 + 8); dest[1] = span->green * (sample[1] + 1u) >> (11 + 8); dest[2] = span->blue * (sample[2] + 1u) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1u) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x2101: + case 0x1E01: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 3; const GLchan *tex11 = tex10 + 3; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[1] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[2] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]); sample[3] = 255;;do { (dest)[0] = (sample)[0]; (dest)[1] = (sample)[1]; (dest)[2] = (sample)[2]; (dest)[3] = (sample)[3]; } while (0); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x0BE2: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 3; const GLchan *tex11 = tex10 + 3; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[1] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[2] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]); sample[3] = 255;;dest[0] = ((255 - sample[0]) * span->red + (sample[0] + 1) * info->er) >> (11 + 8); dest[1] = ((255 - sample[1]) * span->green + (sample[1] + 1) * info->eg) >> (11 + 8); dest[2] = ((255 - sample[2]) * span->blue + (sample[2] + 1) * info->eb) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x0104: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 3; const GLchan *tex11 = tex10 + 3; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[1] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[2] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]); sample[3] = 255;;{ GLint rSum = ((span->red) >> 11) + (GLint) sample[0]; GLint gSum = ((span->green) >> 11) + (GLint) sample[1]; GLint bSum = ((span->blue) >> 11) + (GLint) sample[2]; dest[0] = ( (rSum)<(255) ? (rSum) : (255) ); dest[1] = ( (gSum)<(255) ? (gSum) : (255) ); dest[2] = ( (bSum)<(255) ? (bSum) : (255) ); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); }; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + default: + _mesa_problem(ctx, "bad tex env mode (3) in SPAN_LINEAR"); + return; + } + break; + case MESA_FORMAT_RGBA8888: + switch (info->envmode) { + case 0x2100: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);dest[0] = span->red * (sample[0] + 1u) >> (11 + 8); dest[1] = span->green * (sample[1] + 1u) >> (11 + 8); dest[2] = span->blue * (sample[2] + 1u) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1u) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x2101: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);dest[0] = ((255 - sample[3]) * span->red + ((sample[3] + 1) * sample[0] << 11)) >> (11 + 8); dest[1] = ((255 - sample[3]) * span->green + ((sample[3] + 1) * sample[1] << 11)) >> (11 + 8); dest[2] = ((255 - sample[3]) * span->blue + ((sample[3] + 1) * sample[2] << 11)) >> (11 + 8); dest[3] = ((span->alpha) >> 11); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x0BE2: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);dest[0] = ((255 - sample[0]) * span->red + (sample[0] + 1) * info->er) >> (11 + 8); dest[1] = ((255 - sample[1]) * span->green + (sample[1] + 1) * info->eg) >> (11 + 8); dest[2] = ((255 - sample[2]) * span->blue + (sample[2] + 1) * info->eb) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x0104: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);{ GLint rSum = ((span->red) >> 11) + (GLint) sample[0]; GLint gSum = ((span->green) >> 11) + (GLint) sample[1]; GLint bSum = ((span->blue) >> 11) + (GLint) sample[2]; dest[0] = ( (rSum)<(255) ? (rSum) : (255) ); dest[1] = ( (gSum)<(255) ? (gSum) : (255) ); dest[2] = ( (bSum)<(255) ? (bSum) : (255) ); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); }; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + case 0x1E01: + for (i = 0; i < span->end; i++) { const GLint s = ((span->intTex[0]) >> 11) & info->smask; const GLint t = ((span->intTex[1]) >> 11) & info->tmask; const GLfixed sf = span->intTex[0] & ((1 << 11) - 1); const GLfixed tf = span->intTex[1] & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);do { (dest)[0] = (sample)[0]; (dest)[1] = (sample)[1]; (dest)[2] = (sample)[2]; (dest)[3] = (sample)[3]; } while (0); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; span->intTex[0] += span->intTexStep[0]; span->intTex[1] += span->intTexStep[1]; dest += 4; }; + break; + default: + _mesa_problem(ctx, "bad tex env mode (4) in SPAN_LINEAR"); + return; + } + break; + } + break; + } + span->interpMask &= ~0x01; + ; + _swrast_write_rgba_span(ctx, span); + ctx->Texture._EnabledCoordUnits = texEnableSave; +} +static void affine_textured_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + typedef struct { + const SWvertex *v0, *v1; + GLfloat dx; + GLfloat dy; + GLfloat dxdy; + GLfixed fdxdy; + GLfloat adjy; + GLfixed fsx; + GLfixed fsy; + GLfixed fx0; + GLint lines; + } EdgeT; + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; + const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; + const GLfloat maxDepth = ctx->DrawBuffer->_DepthMaxF; + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + SWspan span; + (void) swrast; + do { (span).primitive = (0x0009); (span).interpMask = 0x0; (span).arrayMask = 0x0; (span).arrayAttribs = 0x0; (span).end = 0; (span).leftClip = 0; (span).facing = 0; (span).array = SWRAST_CONTEXT(ctx)->SpanArrays; } while (0); + span.y = 0; + (void) fixedToDepthShift; + { + const GLfixed fy0 = (((int) ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = (((int) ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = (((int) ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + vMin = v0; vMid = v1; vMax = v2; + vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; + } + else if (fy2 <= fy0) { + vMin = v2; vMid = v0; vMax = v1; + vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; + } + else { + vMin = v0; vMid = v2; vMax = v1; + vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; + bf = -bf; + } + } + else { + if (fy0 <= fy2) { + vMin = v1; vMid = v0; vMax = v2; + vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; + bf = -bf; + } + else if (fy2 <= fy1) { + vMin = v2; vMid = v1; vMax = v0; + vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; + bf = -bf; + } + else { + vMin = v1; vMid = v2; vMax = v0; + vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; + } + } + vMin_fx = (((int) ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = (((int) ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMax_fx = (((int) ((((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + } + eMaj.v0 = vMin; eMaj.v1 = vMax; + eTop.v0 = vMid; eTop.v1 = vMax; + eBot.v0 = vMin; eBot.v1 = vMid; + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float) (1 << 11)))); + eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / ((float) (1 << 11)))); + eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + if (area * bf * swrast->_BackfaceCullSign < 0.0) + return; + oneOverArea = 1.0F / area; + span.facing = oneOverArea * bf > 0.0F; + } + { + eMaj.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eMaj.lines = (((((vMax_fy - eMaj.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eMaj.lines > 0) { + eMaj.dxdy = eMaj.dx / eMaj.dy; + eMaj.fdxdy = (((int) ((((eMaj.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eMaj.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eMaj.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); + eMaj.fx0 = vMin_fx; + eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * eMaj.dxdy); + } + else { + return; + } + eTop.fsy = (((vMid_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eTop.lines = (((((vMax_fy - eTop.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eTop.lines > 0) { + eTop.dxdy = eTop.dx / eTop.dy; + eTop.fdxdy = (((int) ((((eTop.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eTop.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eTop.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); + eTop.fx0 = vMid_fx; + eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * eTop.dxdy); + } + eBot.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eBot.lines = (((((vMid_fy - eBot.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eBot.lines > 0) { + eBot.dxdy = eBot.dx / eBot.dy; + eBot.fdxdy = (((int) ((((eBot.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eBot.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eBot.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); + eBot.fx0 = vMin_fx; + eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * eBot.dxdy); + } + } + { + GLint scan_from_left_to_right; + struct affine_info info; struct gl_texture_unit *unit = ctx->Texture.Unit+0; const struct gl_texture_object *obj = ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; const struct gl_texture_image *texImg = obj->Image[0][obj->BaseLevel]; const GLfloat twidth = (GLfloat) texImg->Width; const GLfloat theight = (GLfloat) texImg->Height; info.texture = (const GLchan *) texImg->Data; info.twidth_log2 = texImg->WidthLog2; info.smask = texImg->Width - 1; info.tmask = texImg->Height - 1; info.format = texImg->TexFormat; info.filter = obj->Sampler.MinFilter; info.envmode = unit->EnvMode; info.er = 0; info.eg = 0; info.eb = 0; span.arrayMask |= 0x01; if (info.envmode == 0x0BE2) { info.er = (((int) ((((unit->EnvColor[0] * 255.0F) * ((float) (1 << 11))) >= 0.0F) ? (((unit->EnvColor[0] * 255.0F) * ((float) (1 << 11))) + 0.5F) : (((unit->EnvColor[0] * 255.0F) * ((float) (1 << 11))) - 0.5F)))); info.eg = (((int) ((((unit->EnvColor[1] * 255.0F) * ((float) (1 << 11))) >= 0.0F) ? (((unit->EnvColor[1] * 255.0F) * ((float) (1 << 11))) + 0.5F) : (((unit->EnvColor[1] * 255.0F) * ((float) (1 << 11))) - 0.5F)))); info.eb = (((int) ((((unit->EnvColor[2] * 255.0F) * ((float) (1 << 11))) >= 0.0F) ? (((unit->EnvColor[2] * 255.0F) * ((float) (1 << 11))) + 0.5F) : (((unit->EnvColor[2] * 255.0F) * ((float) (1 << 11))) - 0.5F)))); info.ea = (((int) ((((unit->EnvColor[3] * 255.0F) * ((float) (1 << 11))) >= 0.0F) ? (((unit->EnvColor[3] * 255.0F) * ((float) (1 << 11))) + 0.5F) : (((unit->EnvColor[3] * 255.0F) * ((float) (1 << 11))) - 0.5F)))); } if (!info.texture) { return; } switch (info.format) { case MESA_FORMAT_RGB888: info.tbytesline = texImg->Width * 3; break; case MESA_FORMAT_RGBA8888: info.tbytesline = texImg->Width * 4; break; default: _mesa_problem(((void *)0), "Bad texture format in affine_texture_triangle"); return; } info.tsize = texImg->Height * info.tbytesline; + scan_from_left_to_right = (oneOverArea < 0.0F); + span.interpMask |= 0x02; + { + GLfloat eMaj_dz = vMax->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + GLfloat eBot_dz = vMid->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + span.attrStepX[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); + if (span.attrStepX[FRAG_ATTRIB_WPOS][2] > maxDepth || + span.attrStepX[FRAG_ATTRIB_WPOS][2] < -maxDepth) { + span.attrStepX[FRAG_ATTRIB_WPOS][2] = 0.0; + span.attrStepY[FRAG_ATTRIB_WPOS][2] = 0.0; + } + else { + span.attrStepY[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); + } + if (depthBits <= 16) + span.zStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))); + else + span.zStep = (GLint) span.attrStepX[FRAG_ATTRIB_WPOS][2]; + } + span.interpMask |= 0x01; + if (ctx->Light.ShadeModel == 0x1D01) { + GLfloat eMaj_dr = (GLfloat) (vMax->color[0] - vMin->color[0]); + GLfloat eBot_dr = (GLfloat) (vMid->color[0] - vMin->color[0]); + GLfloat eMaj_dg = (GLfloat) (vMax->color[1] - vMin->color[1]); + GLfloat eBot_dg = (GLfloat) (vMid->color[1] - vMin->color[1]); + GLfloat eMaj_db = (GLfloat) (vMax->color[2] - vMin->color[2]); + GLfloat eBot_db = (GLfloat) (vMid->color[2] - vMin->color[2]); + GLfloat eMaj_da = (GLfloat) (vMax->color[3] - vMin->color[3]); + GLfloat eBot_da = (GLfloat) (vMid->color[3] - vMin->color[3]); + span.attrStepX[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); + span.attrStepY[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); + span.attrStepY[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); + span.attrStepY[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); + span.redStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) - 0.5F)))); + span.greenStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) - 0.5F)))); + span.blueStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) - 0.5F)))); + span.attrStepX[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj_da * eBot.dy - eMaj.dy * eBot_da); + span.attrStepY[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx); + span.alphaStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) - 0.5F)))); + } + else { + ; + span.interpMask |= 0x04; + span.attrStepX[FRAG_ATTRIB_COL0][0] = span.attrStepY[FRAG_ATTRIB_COL0][0] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][1] = span.attrStepY[FRAG_ATTRIB_COL0][1] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][2] = span.attrStepY[FRAG_ATTRIB_COL0][2] = 0.0F; + span.redStep = 0; + span.greenStep = 0; + span.blueStep = 0; + span.attrStepX[FRAG_ATTRIB_COL0][3] = span.attrStepY[FRAG_ATTRIB_COL0][3] = 0.0F; + span.alphaStep = 0; + } + { + GLfloat eMaj_ds = (vMax->attrib[FRAG_ATTRIB_TEX0][0] - vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + GLfloat eBot_ds = (vMid->attrib[FRAG_ATTRIB_TEX0][0] - vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + GLfloat eMaj_dt = (vMax->attrib[FRAG_ATTRIB_TEX0][1] - vMin->attrib[FRAG_ATTRIB_TEX0][1]) * theight; + GLfloat eBot_dt = (vMid->attrib[FRAG_ATTRIB_TEX0][1] - vMin->attrib[FRAG_ATTRIB_TEX0][1]) * theight; + span.attrStepX[FRAG_ATTRIB_TEX0][0] = oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); + span.attrStepY[FRAG_ATTRIB_TEX0][0] = oneOverArea * (eMaj.dx * eBot_ds - eMaj_ds * eBot.dx); + span.attrStepX[FRAG_ATTRIB_TEX0][1] = oneOverArea * (eMaj_dt * eBot.dy - eMaj.dy * eBot_dt); + span.attrStepY[FRAG_ATTRIB_TEX0][1] = oneOverArea * (eMaj.dx * eBot_dt - eMaj_dt * eBot.dx); + span.intTexStep[0] = (((int) ((((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) - 0.5F)))); + span.intTexStep[1] = (((int) ((((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) - 0.5F)))); + } + { + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; + GLfixed fError = 0, fdError = 0; + GLuint zLeft = 0; + GLfixed fdzOuter = 0, fdzInner; + GLint rLeft = 0, fdrOuter = 0, fdrInner; + GLint gLeft = 0, fdgOuter = 0, fdgInner; + GLint bLeft = 0, fdbOuter = 0, fdbInner; + GLint aLeft = 0, fdaOuter = 0, fdaInner; + GLfixed sLeft=0, dsOuter=0, dsInner; + GLfixed tLeft=0, dtOuter=0, dtInner; + for (subTriangle=0; subTriangle<=1; subTriangle++) { + EdgeT *eLeft, *eRight; + int setupLeft, setupRight; + int lines; + if (subTriangle==0) { + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eBot; + lines = eRight->lines; + setupLeft = 1; + setupRight = 1; + } + else { + eLeft = &eBot; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 1; + } + } + else { + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eTop; + lines = eRight->lines; + setupLeft = 0; + setupRight = 1; + } + else { + eLeft = &eTop; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 0; + } + if (lines == 0) + return; + } + if (setupLeft && eLeft->lines > 0) { + const SWvertex *vLower = eLeft->v0; + const GLfixed fsy = eLeft->fsy; + const GLfixed fsx = eLeft->fsx; + const GLfixed fx = (((fsx) + (1 << 11) - 1) & (~((1 << 11) - 1))); + const GLfixed adjx = (GLfixed) (fx - eLeft->fx0); + const GLfixed adjy = (GLfixed) eLeft->adjy; + GLint idxOuter; + GLfloat dxOuter; + GLfixed fdxOuter; + fError = fx - fsx - (1 << 11); + fxLeftEdge = fsx - 1; + fdxLeftEdge = eLeft->fdxdy; + fdxOuter = ((fdxLeftEdge - 1) & (~((1 << 11) - 1))); + fdError = fdxOuter - fdxLeftEdge + (1 << 11); + idxOuter = ((fdxOuter) >> 11); + dxOuter = (GLfloat) idxOuter; + span.y = ((fsy) >> 11); + (void) dxOuter; + (void) adjx; + (void) adjy; + (void) vLower; + { + GLfloat z0 = vLower->attrib[FRAG_ATTRIB_WPOS][2]; + if (depthBits <= 16) { + GLfloat tmp = (z0 * ((float) (1 << 11)) + + span.attrStepX[FRAG_ATTRIB_WPOS][2] * adjx + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * adjy) + (1 << (11 -1)); + if (tmp < 0xffffffff / 2) + zLeft = (GLfixed) tmp; + else + zLeft = 0xffffffff / 2; + fdzOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + zLeft = (GLuint) (z0 + span.attrStepX[FRAG_ATTRIB_WPOS][2] * ((adjx) * (1.0F / ((float) (1 << 11)))) + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * ((adjy) * (1.0F / ((float) (1 << 11))))); + fdzOuter = (GLint) (span.attrStepY[FRAG_ATTRIB_WPOS][2] + + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]); + } + } + if (ctx->Light.ShadeModel == 0x1D01) { + rLeft = (GLint)(((vLower->color[0]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][0] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][0] * adjy) + (1 << (11 -1)); + gLeft = (GLint)(((vLower->color[1]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][1] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][1] * adjy) + (1 << (11 -1)); + bLeft = (GLint)(((vLower->color[2]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][2] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][2] * adjy) + (1 << (11 -1)); + fdrOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) - 0.5F)))) + ; + fdgOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) - 0.5F)))) + ; + fdbOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + aLeft = (GLint)(((vLower->color[3]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][3] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][3] * adjy) + (1 << (11 -1)); + fdaOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + ; + rLeft = ((v2->color[0]) << 11); + gLeft = ((v2->color[1]) << 11); + bLeft = ((v2->color[2]) << 11); + fdrOuter = fdgOuter = fdbOuter = 0; + aLeft = ((v2->color[3]) << 11); + fdaOuter = 0; + } + { + GLfloat s0, t0; + s0 = vLower->attrib[FRAG_ATTRIB_TEX0][0] * twidth; + sLeft = (GLfixed)(s0 * ((float) (1 << 11)) + span.attrStepX[FRAG_ATTRIB_TEX0][0] * adjx + + span.attrStepY[FRAG_ATTRIB_TEX0][0] * adjy) + (1 << (11 -1)); + dsOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_TEX0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float) (1 << 11))) - 0.5F)))) + ; + t0 = vLower->attrib[FRAG_ATTRIB_TEX0][1] * theight; + tLeft = (GLfixed)(t0 * ((float) (1 << 11)) + span.attrStepX[FRAG_ATTRIB_TEX0][1] * adjx + + span.attrStepY[FRAG_ATTRIB_TEX0][1] * adjy) + (1 << (11 -1)); + dtOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_TEX0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_TEX0][1]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + } + if (setupRight && eRight->lines>0) { + fxRightEdge = eRight->fsx - 1; + fdxRightEdge = eRight->fdxdy; + } + if (lines==0) { + continue; + } + fdzInner = fdzOuter + span.zStep; + fdrInner = fdrOuter + span.redStep; + fdgInner = fdgOuter + span.greenStep; + fdbInner = fdbOuter + span.blueStep; + fdaInner = fdaOuter + span.alphaStep; + dsInner = dsOuter + span.intTexStep[0]; + dtInner = dtOuter + span.intTexStep[1]; + while (lines > 0) { + const GLint right = ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + span.z = zLeft; + span.red = rLeft; + span.green = gLeft; + span.blue = bLeft; + span.alpha = aLeft; + span.intTex[0] = sLeft; + span.intTex[1] = tLeft; + if (span.end > 0 && span.y >= 0) { + const GLint len = span.end - 1; + (void) len; + do { GLfixed endVal = span.red + (len) * span.redStep; if (endVal < 0) { span.red -= endVal; } if (span.red < 0) { span.red = 0; } } while (0); + do { GLfixed endVal = span.green + (len) * span.greenStep; if (endVal < 0) { span.green -= endVal; } if (span.green < 0) { span.green = 0; } } while (0); + do { GLfixed endVal = span.blue + (len) * span.blueStep; if (endVal < 0) { span.blue -= endVal; } if (span.blue < 0) { span.blue = 0; } } while (0); + do { GLfixed endVal = span.alpha + (len) * span.alphaStep; if (endVal < 0) { span.alpha -= endVal; } if (span.alpha < 0) { span.alpha = 0; } } while (0); + { + affine_span(ctx, &span, &info);; + } + } + span.y++; + lines--; + fxLeftEdge += fdxLeftEdge; + fxRightEdge += fdxRightEdge; + fError += fdError; + if (fError >= 0) { + fError -= (1 << 11); + zLeft += fdzOuter; + rLeft += fdrOuter; + gLeft += fdgOuter; + bLeft += fdbOuter; + aLeft += fdaOuter; + sLeft += dsOuter; + tLeft += dtOuter; + } + else { + zLeft += fdzInner; + rLeft += fdrInner; + gLeft += fdgInner; + bLeft += fdbInner; + aLeft += fdaInner; + sLeft += dsInner; + tLeft += dtInner; + } + } + } + } + } +} +struct persp_info +{ + GLenum filter; + GLenum format; + GLenum envmode; + GLint smask, tmask; + GLint twidth_log2; + const GLchan *texture; + GLfixed er, eg, eb, ea; + GLint tbytesline, tsize; +}; +static __inline__ void +fast_persp_span(struct gl_context *ctx, SWspan *span, + struct persp_info *info) +{ + GLchan sample[4]; + GLuint i; + GLfloat tex_coord[3], tex_step[3]; + GLchan *dest = span->array->rgba[0]; + const GLuint texEnableSave = ctx->Texture._EnabledCoordUnits; + ctx->Texture._EnabledCoordUnits = 0; + tex_coord[0] = span->attrStart[FRAG_ATTRIB_TEX0][0] * (info->smask + 1); + tex_step[0] = span->attrStepX[FRAG_ATTRIB_TEX0][0] * (info->smask + 1); + tex_coord[1] = span->attrStart[FRAG_ATTRIB_TEX0][1] * (info->tmask + 1); + tex_step[1] = span->attrStepX[FRAG_ATTRIB_TEX0][1] * (info->tmask + 1); + tex_coord[2] = span->attrStart[FRAG_ATTRIB_TEX0][3]; + tex_step[2] = span->attrStepX[FRAG_ATTRIB_TEX0][3]; + switch (info->filter) { + case 0x2600: + switch (info->format) { + case MESA_FORMAT_RGB888: + switch (info->envmode) { + case 0x2100: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; sample[0] = tex00[2]; sample[1] = tex00[1]; sample[2] = tex00[0]; sample[3] = 255;;dest[0] = span->red * (sample[0] + 1u) >> (11 + 8); dest[1] = span->green * (sample[1] + 1u) >> (11 + 8); dest[2] = span->blue * (sample[2] + 1u) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1u) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x2101: + case 0x1E01: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; sample[0] = tex00[2]; sample[1] = tex00[1]; sample[2] = tex00[0]; sample[3] = 255;; dest[0] = sample[0]; dest[1] = sample[1]; dest[2] = sample[2]; dest[3] = ((span->alpha) >> 11);; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x0BE2: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; sample[0] = tex00[2]; sample[1] = tex00[1]; sample[2] = tex00[0]; sample[3] = 255;;dest[0] = ((255 - sample[0]) * span->red + (sample[0] + 1) * info->er) >> (11 + 8); dest[1] = ((255 - sample[1]) * span->green + (sample[1] + 1) * info->eg) >> (11 + 8); dest[2] = ((255 - sample[2]) * span->blue + (sample[2] + 1) * info->eb) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x0104: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; sample[0] = tex00[2]; sample[1] = tex00[1]; sample[2] = tex00[0]; sample[3] = 255;;{ GLint rSum = ((span->red) >> 11) + (GLint) sample[0]; GLint gSum = ((span->green) >> 11) + (GLint) sample[1]; GLint bSum = ((span->blue) >> 11) + (GLint) sample[2]; dest[0] = ( (rSum)<(255) ? (rSum) : (255) ); dest[1] = ( (gSum)<(255) ? (gSum) : (255) ); dest[2] = ( (bSum)<(255) ? (bSum) : (255) ); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); }; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + default: + _mesa_problem(ctx, "bad tex env mode (5) in SPAN_LINEAR"); + return; + } + break; + case MESA_FORMAT_RGBA8888: + switch(info->envmode) { + case 0x2100: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; sample[0] = tex00[3]; sample[1] = tex00[2]; sample[2] = tex00[1]; sample[3] = tex00[0];;dest[0] = span->red * (sample[0] + 1u) >> (11 + 8); dest[1] = span->green * (sample[1] + 1u) >> (11 + 8); dest[2] = span->blue * (sample[2] + 1u) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1u) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x2101: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; sample[0] = tex00[3]; sample[1] = tex00[2]; sample[2] = tex00[1]; sample[3] = tex00[0];;dest[0] = ((255 - sample[3]) * span->red + ((sample[3] + 1) * sample[0] << 11)) >> (11 + 8); dest[1] = ((255 - sample[3]) * span->green + ((sample[3] + 1) * sample[1] << 11)) >> (11 + 8); dest[2] = ((255 - sample[3]) * span->blue + ((sample[3] + 1) * sample[2] << 11)) >> (11 + 8); dest[3] = ((span->alpha) >> 11); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x0BE2: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; sample[0] = tex00[3]; sample[1] = tex00[2]; sample[2] = tex00[1]; sample[3] = tex00[0];;dest[0] = ((255 - sample[0]) * span->red + (sample[0] + 1) * info->er) >> (11 + 8); dest[1] = ((255 - sample[1]) * span->green + (sample[1] + 1) * info->eg) >> (11 + 8); dest[2] = ((255 - sample[2]) * span->blue + (sample[2] + 1) * info->eb) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x0104: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; sample[0] = tex00[3]; sample[1] = tex00[2]; sample[2] = tex00[1]; sample[3] = tex00[0];;{ GLint rSum = ((span->red) >> 11) + (GLint) sample[0]; GLint gSum = ((span->green) >> 11) + (GLint) sample[1]; GLint bSum = ((span->blue) >> 11) + (GLint) sample[2]; dest[0] = ( (rSum)<(255) ? (rSum) : (255) ); dest[1] = ( (gSum)<(255) ? (gSum) : (255) ); dest[2] = ( (bSum)<(255) ? (bSum) : (255) ); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); }; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x1E01: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); GLint s = ifloor(s_tmp) & info->smask; GLint t = ifloor(t_tmp) & info->tmask; GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; dest[0] = tex00[3]; dest[1] = tex00[2]; dest[2] = tex00[1]; dest[3] = tex00[0]; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + default: + _mesa_problem(ctx, "bad tex env mode (6) in SPAN_LINEAR"); + return; + } + break; + } + break; + case 0x2601: + switch (info->format) { + case MESA_FORMAT_RGB888: + switch (info->envmode) { + case 0x2100: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 3; const GLchan *tex11 = tex10 + 3; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[1] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[2] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]); sample[3] = 255;;dest[0] = span->red * (sample[0] + 1u) >> (11 + 8); dest[1] = span->green * (sample[1] + 1u) >> (11 + 8); dest[2] = span->blue * (sample[2] + 1u) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1u) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x2101: + case 0x1E01: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 3; const GLchan *tex11 = tex10 + 3; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[1] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[2] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]); sample[3] = 255;;do { (dest)[0] = (sample)[0]; (dest)[1] = (sample)[1]; (dest)[2] = (sample)[2]; (dest)[3] = (sample)[3]; } while (0); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x0BE2: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 3; const GLchan *tex11 = tex10 + 3; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[1] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[2] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]); sample[3] = 255;;dest[0] = ((255 - sample[0]) * span->red + (sample[0] + 1) * info->er) >> (11 + 8); dest[1] = ((255 - sample[1]) * span->green + (sample[1] + 1) * info->eg) >> (11 + 8); dest[2] = ((255 - sample[2]) * span->blue + (sample[2] + 1) * info->eb) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x0104: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 3 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 3; const GLchan *tex11 = tex10 + 3; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[1] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[2] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]); sample[3] = 255;;{ GLint rSum = ((span->red) >> 11) + (GLint) sample[0]; GLint gSum = ((span->green) >> 11) + (GLint) sample[1]; GLint bSum = ((span->blue) >> 11) + (GLint) sample[2]; dest[0] = ( (rSum)<(255) ? (rSum) : (255) ); dest[1] = ( (gSum)<(255) ? (gSum) : (255) ); dest[2] = ( (bSum)<(255) ? (bSum) : (255) ); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); }; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + default: + _mesa_problem(ctx, "bad tex env mode (7) in SPAN_LINEAR"); + return; + } + break; + case MESA_FORMAT_RGBA8888: + switch (info->envmode) { + case 0x2100: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);dest[0] = span->red * (sample[0] + 1u) >> (11 + 8); dest[1] = span->green * (sample[1] + 1u) >> (11 + 8); dest[2] = span->blue * (sample[2] + 1u) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1u) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x2101: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);dest[0] = ((255 - sample[3]) * span->red + ((sample[3] + 1) * sample[0] << 11)) >> (11 + 8); dest[1] = ((255 - sample[3]) * span->green + ((sample[3] + 1) * sample[1] << 11)) >> (11 + 8); dest[2] = ((255 - sample[3]) * span->blue + ((sample[3] + 1) * sample[2] << 11)) >> (11 + 8); dest[3] = ((span->alpha) >> 11); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x0BE2: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);dest[0] = ((255 - sample[0]) * span->red + (sample[0] + 1) * info->er) >> (11 + 8); dest[1] = ((255 - sample[1]) * span->green + (sample[1] + 1) * info->eg) >> (11 + 8); dest[2] = ((255 - sample[2]) * span->blue + (sample[2] + 1) * info->eb) >> (11 + 8); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x0104: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);{ GLint rSum = ((span->red) >> 11) + (GLint) sample[0]; GLint gSum = ((span->green) >> 11) + (GLint) sample[1]; GLint bSum = ((span->blue) >> 11) + (GLint) sample[2]; dest[0] = ( (rSum)<(255) ? (rSum) : (255) ); dest[1] = ( (gSum)<(255) ? (gSum) : (255) ); dest[2] = ( (bSum)<(255) ? (bSum) : (255) ); dest[3] = span->alpha * (sample[3] + 1) >> (11 + 8); }; span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + case 0x1E01: + for (i = 0; i < span->end; i++) { GLdouble invQ = tex_coord[2] ? (1.0 / tex_coord[2]) : 1.0; const GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); const GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); const GLfixed s_fix = (((int) ((((s_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((s_tmp) * ((float) (1 << 11))) + 0.5F) : (((s_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLfixed t_fix = (((int) ((((t_tmp) * ((float) (1 << 11))) >= 0.0F) ? (((t_tmp) * ((float) (1 << 11))) + 0.5F) : (((t_tmp) * ((float) (1 << 11))) - 0.5F)))) - (1 << (11 -1)); const GLint s = ((((s_fix) & (~((1 << 11) - 1)))) >> 11) & info->smask; const GLint t = ((((t_fix) & (~((1 << 11) - 1)))) >> 11) & info->tmask; const GLfixed sf = s_fix & ((1 << 11) - 1); const GLfixed tf = t_fix & ((1 << 11) - 1); const GLint pos = (t << info->twidth_log2) + s; const GLchan *tex00 = info->texture + 4 * pos; const GLchan *tex10 = tex00 + info->tbytesline; const GLchan *tex01 = tex00 + 4; const GLchan *tex11 = tex10 + 4; if (t == info->tmask) { tex10 -= info->tsize; tex11 -= info->tsize; } if (s == info->smask) { tex01 -= info->tbytesline; tex11 -= info->tbytesline; } sample[0] = ilerp_2d(sf, tf, tex00[3], tex01[3], tex10[3], tex11[3]); sample[1] = ilerp_2d(sf, tf, tex00[2], tex01[2], tex10[2], tex11[2]); sample[2] = ilerp_2d(sf, tf, tex00[1], tex01[1], tex10[1], tex11[1]); sample[3] = ilerp_2d(sf, tf, tex00[0], tex01[0], tex10[0], tex11[0]);do { (dest)[0] = (sample)[0]; (dest)[1] = (sample)[1]; (dest)[2] = (sample)[2]; (dest)[3] = (sample)[3]; } while (0); span->red += span->redStep; span->green += span->greenStep; span->blue += span->blueStep; span->alpha += span->alphaStep; tex_coord[0] += tex_step[0]; tex_coord[1] += tex_step[1]; tex_coord[2] += tex_step[2]; dest += 4; }; + break; + default: + _mesa_problem(ctx, "bad tex env mode (8) in SPAN_LINEAR"); + return; + } + break; + } + break; + } + ; + _swrast_write_rgba_span(ctx, span); + ctx->Texture._EnabledCoordUnits = texEnableSave; +} +static void persp_textured_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + typedef struct { + const SWvertex *v0, *v1; + GLfloat dx; + GLfloat dy; + GLfloat dxdy; + GLfixed fdxdy; + GLfloat adjy; + GLfixed fsx; + GLfixed fsy; + GLfixed fx0; + GLint lines; + } EdgeT; + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; + const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; + const GLfloat maxDepth = ctx->DrawBuffer->_DepthMaxF; + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + SWspan span; + (void) swrast; + do { (span).primitive = (0x0009); (span).interpMask = 0x0; (span).arrayMask = 0x0; (span).arrayAttribs = 0x0; (span).end = 0; (span).leftClip = 0; (span).facing = 0; (span).array = SWRAST_CONTEXT(ctx)->SpanArrays; } while (0); + span.y = 0; + (void) fixedToDepthShift; + { + const GLfixed fy0 = (((int) ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = (((int) ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = (((int) ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + vMin = v0; vMid = v1; vMax = v2; + vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; + } + else if (fy2 <= fy0) { + vMin = v2; vMid = v0; vMax = v1; + vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; + } + else { + vMin = v0; vMid = v2; vMax = v1; + vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; + bf = -bf; + } + } + else { + if (fy0 <= fy2) { + vMin = v1; vMid = v0; vMax = v2; + vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; + bf = -bf; + } + else if (fy2 <= fy1) { + vMin = v2; vMid = v1; vMax = v0; + vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; + bf = -bf; + } + else { + vMin = v1; vMid = v2; vMax = v0; + vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; + } + } + vMin_fx = (((int) ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = (((int) ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMax_fx = (((int) ((((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + } + eMaj.v0 = vMin; eMaj.v1 = vMax; + eTop.v0 = vMid; eTop.v1 = vMax; + eBot.v0 = vMin; eBot.v1 = vMid; + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float) (1 << 11)))); + eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / ((float) (1 << 11)))); + eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + if (area * bf * swrast->_BackfaceCullSign < 0.0) + return; + oneOverArea = 1.0F / area; + span.facing = oneOverArea * bf > 0.0F; + } + { + eMaj.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eMaj.lines = (((((vMax_fy - eMaj.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eMaj.lines > 0) { + eMaj.dxdy = eMaj.dx / eMaj.dy; + eMaj.fdxdy = (((int) ((((eMaj.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eMaj.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eMaj.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); + eMaj.fx0 = vMin_fx; + eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * eMaj.dxdy); + } + else { + return; + } + eTop.fsy = (((vMid_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eTop.lines = (((((vMax_fy - eTop.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eTop.lines > 0) { + eTop.dxdy = eTop.dx / eTop.dy; + eTop.fdxdy = (((int) ((((eTop.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eTop.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eTop.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); + eTop.fx0 = vMid_fx; + eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * eTop.dxdy); + } + eBot.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eBot.lines = (((((vMid_fy - eBot.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eBot.lines > 0) { + eBot.dxdy = eBot.dx / eBot.dy; + eBot.fdxdy = (((int) ((((eBot.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eBot.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eBot.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); + eBot.fx0 = vMin_fx; + eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * eBot.dxdy); + } + } + { + GLint scan_from_left_to_right; + struct persp_info info; const struct gl_texture_unit *unit = ctx->Texture.Unit+0; const struct gl_texture_object *obj = ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; const struct gl_texture_image *texImg = obj->Image[0][obj->BaseLevel]; info.texture = (const GLchan *) texImg->Data; info.twidth_log2 = texImg->WidthLog2; info.smask = texImg->Width - 1; info.tmask = texImg->Height - 1; info.format = texImg->TexFormat; info.filter = obj->Sampler.MinFilter; info.envmode = unit->EnvMode; info.er = 0; info.eg = 0; info.eb = 0; if (info.envmode == 0x0BE2) { info.er = (((int) ((((unit->EnvColor[0] * 255.0F) * ((float) (1 << 11))) >= 0.0F) ? (((unit->EnvColor[0] * 255.0F) * ((float) (1 << 11))) + 0.5F) : (((unit->EnvColor[0] * 255.0F) * ((float) (1 << 11))) - 0.5F)))); info.eg = (((int) ((((unit->EnvColor[1] * 255.0F) * ((float) (1 << 11))) >= 0.0F) ? (((unit->EnvColor[1] * 255.0F) * ((float) (1 << 11))) + 0.5F) : (((unit->EnvColor[1] * 255.0F) * ((float) (1 << 11))) - 0.5F)))); info.eb = (((int) ((((unit->EnvColor[2] * 255.0F) * ((float) (1 << 11))) >= 0.0F) ? (((unit->EnvColor[2] * 255.0F) * ((float) (1 << 11))) + 0.5F) : (((unit->EnvColor[2] * 255.0F) * ((float) (1 << 11))) - 0.5F)))); info.ea = (((int) ((((unit->EnvColor[3] * 255.0F) * ((float) (1 << 11))) >= 0.0F) ? (((unit->EnvColor[3] * 255.0F) * ((float) (1 << 11))) + 0.5F) : (((unit->EnvColor[3] * 255.0F) * ((float) (1 << 11))) - 0.5F)))); } if (!info.texture) { return; } switch (info.format) { case MESA_FORMAT_RGB888: info.tbytesline = texImg->Width * 3; break; case MESA_FORMAT_RGBA8888: info.tbytesline = texImg->Width * 4; break; default: _mesa_problem(((void *)0), "Bad texture format in persp_textured_triangle"); return; } info.tsize = texImg->Height * info.tbytesline; + scan_from_left_to_right = (oneOverArea < 0.0F); + span.interpMask |= 0x02; + { + GLfloat eMaj_dz = vMax->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + GLfloat eBot_dz = vMid->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + span.attrStepX[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); + if (span.attrStepX[FRAG_ATTRIB_WPOS][2] > maxDepth || + span.attrStepX[FRAG_ATTRIB_WPOS][2] < -maxDepth) { + span.attrStepX[FRAG_ATTRIB_WPOS][2] = 0.0; + span.attrStepY[FRAG_ATTRIB_WPOS][2] = 0.0; + } + else { + span.attrStepY[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); + } + if (depthBits <= 16) + span.zStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))); + else + span.zStep = (GLint) span.attrStepX[FRAG_ATTRIB_WPOS][2]; + } + span.interpMask |= 0x01; + if (ctx->Light.ShadeModel == 0x1D01) { + GLfloat eMaj_dr = (GLfloat) (vMax->color[0] - vMin->color[0]); + GLfloat eBot_dr = (GLfloat) (vMid->color[0] - vMin->color[0]); + GLfloat eMaj_dg = (GLfloat) (vMax->color[1] - vMin->color[1]); + GLfloat eBot_dg = (GLfloat) (vMid->color[1] - vMin->color[1]); + GLfloat eMaj_db = (GLfloat) (vMax->color[2] - vMin->color[2]); + GLfloat eBot_db = (GLfloat) (vMid->color[2] - vMin->color[2]); + GLfloat eMaj_da = (GLfloat) (vMax->color[3] - vMin->color[3]); + GLfloat eBot_da = (GLfloat) (vMid->color[3] - vMin->color[3]); + span.attrStepX[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); + span.attrStepY[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); + span.attrStepY[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); + span.attrStepY[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); + span.redStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) - 0.5F)))); + span.greenStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) - 0.5F)))); + span.blueStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) - 0.5F)))); + span.attrStepX[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj_da * eBot.dy - eMaj.dy * eBot_da); + span.attrStepY[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx); + span.alphaStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) - 0.5F)))); + } + else { + ; + span.interpMask |= 0x04; + span.attrStepX[FRAG_ATTRIB_COL0][0] = span.attrStepY[FRAG_ATTRIB_COL0][0] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][1] = span.attrStepY[FRAG_ATTRIB_COL0][1] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][2] = span.attrStepY[FRAG_ATTRIB_COL0][2] = 0.0F; + span.redStep = 0; + span.greenStep = 0; + span.blueStep = 0; + span.attrStepX[FRAG_ATTRIB_COL0][3] = span.attrStepY[FRAG_ATTRIB_COL0][3] = 0.0F; + span.alphaStep = 0; + } + { + const GLfloat wMax = vMax->attrib[FRAG_ATTRIB_WPOS][3]; + const GLfloat wMin = vMin->attrib[FRAG_ATTRIB_WPOS][3]; + const GLfloat wMid = vMid->attrib[FRAG_ATTRIB_WPOS][3]; + { + const GLfloat eMaj_dw = wMax - wMin; + const GLfloat eBot_dw = wMid - wMin; + span.attrStepX[FRAG_ATTRIB_WPOS][3] = oneOverArea * (eMaj_dw * eBot.dy - eMaj.dy * eBot_dw); + span.attrStepY[FRAG_ATTRIB_WPOS][3] = oneOverArea * (eMaj.dx * eBot_dw - eMaj_dw * eBot.dx); + } + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + if (swrast->_InterpMode[attr] == 0x1D00) { + do { span.attrStepX[attr][0] = 0.0; span.attrStepX[attr][1] = 0.0; span.attrStepX[attr][2] = 0.0; span.attrStepX[attr][3] = 0.0; } while(0); + do { span.attrStepY[attr][0] = 0.0; span.attrStepY[attr][1] = 0.0; span.attrStepY[attr][2] = 0.0; span.attrStepY[attr][3] = 0.0; } while(0); + } + else { + GLuint c; + for (c = 0; c < 4; c++) { + GLfloat eMaj_da = vMax->attrib[attr][c] * wMax - vMin->attrib[attr][c] * wMin; + GLfloat eBot_da = vMid->attrib[attr][c] * wMid - vMin->attrib[attr][c] * wMin; + span.attrStepX[attr][c] = oneOverArea * (eMaj_da * eBot.dy - eMaj.dy * eBot_da); + span.attrStepY[attr][c] = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx); + } + } + } } + } + { + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; + GLfixed fError = 0, fdError = 0; + GLuint zLeft = 0; + GLfixed fdzOuter = 0, fdzInner; + GLint rLeft = 0, fdrOuter = 0, fdrInner; + GLint gLeft = 0, fdgOuter = 0, fdgInner; + GLint bLeft = 0, fdbOuter = 0, fdbInner; + GLint aLeft = 0, fdaOuter = 0, fdaInner; + GLfloat wLeft = 0, dwOuter = 0, dwInner; + GLfloat attrLeft[FRAG_ATTRIB_MAX][4]; + GLfloat daOuter[FRAG_ATTRIB_MAX][4], daInner[FRAG_ATTRIB_MAX][4]; + for (subTriangle=0; subTriangle<=1; subTriangle++) { + EdgeT *eLeft, *eRight; + int setupLeft, setupRight; + int lines; + if (subTriangle==0) { + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eBot; + lines = eRight->lines; + setupLeft = 1; + setupRight = 1; + } + else { + eLeft = &eBot; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 1; + } + } + else { + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eTop; + lines = eRight->lines; + setupLeft = 0; + setupRight = 1; + } + else { + eLeft = &eTop; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 0; + } + if (lines == 0) + return; + } + if (setupLeft && eLeft->lines > 0) { + const SWvertex *vLower = eLeft->v0; + const GLfixed fsy = eLeft->fsy; + const GLfixed fsx = eLeft->fsx; + const GLfixed fx = (((fsx) + (1 << 11) - 1) & (~((1 << 11) - 1))); + const GLfixed adjx = (GLfixed) (fx - eLeft->fx0); + const GLfixed adjy = (GLfixed) eLeft->adjy; + GLint idxOuter; + GLfloat dxOuter; + GLfixed fdxOuter; + fError = fx - fsx - (1 << 11); + fxLeftEdge = fsx - 1; + fdxLeftEdge = eLeft->fdxdy; + fdxOuter = ((fdxLeftEdge - 1) & (~((1 << 11) - 1))); + fdError = fdxOuter - fdxLeftEdge + (1 << 11); + idxOuter = ((fdxOuter) >> 11); + dxOuter = (GLfloat) idxOuter; + span.y = ((fsy) >> 11); + (void) dxOuter; + (void) adjx; + (void) adjy; + (void) vLower; + { + GLfloat z0 = vLower->attrib[FRAG_ATTRIB_WPOS][2]; + if (depthBits <= 16) { + GLfloat tmp = (z0 * ((float) (1 << 11)) + + span.attrStepX[FRAG_ATTRIB_WPOS][2] * adjx + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * adjy) + (1 << (11 -1)); + if (tmp < 0xffffffff / 2) + zLeft = (GLfixed) tmp; + else + zLeft = 0xffffffff / 2; + fdzOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + zLeft = (GLuint) (z0 + span.attrStepX[FRAG_ATTRIB_WPOS][2] * ((adjx) * (1.0F / ((float) (1 << 11)))) + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * ((adjy) * (1.0F / ((float) (1 << 11))))); + fdzOuter = (GLint) (span.attrStepY[FRAG_ATTRIB_WPOS][2] + + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]); + } + } + if (ctx->Light.ShadeModel == 0x1D01) { + rLeft = (GLint)(((vLower->color[0]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][0] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][0] * adjy) + (1 << (11 -1)); + gLeft = (GLint)(((vLower->color[1]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][1] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][1] * adjy) + (1 << (11 -1)); + bLeft = (GLint)(((vLower->color[2]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][2] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][2] * adjy) + (1 << (11 -1)); + fdrOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) - 0.5F)))) + ; + fdgOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) - 0.5F)))) + ; + fdbOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + aLeft = (GLint)(((vLower->color[3]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][3] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][3] * adjy) + (1 << (11 -1)); + fdaOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + ; + rLeft = ((v2->color[0]) << 11); + gLeft = ((v2->color[1]) << 11); + bLeft = ((v2->color[2]) << 11); + fdrOuter = fdgOuter = fdbOuter = 0; + aLeft = ((v2->color[3]) << 11); + fdaOuter = 0; + } + { + const GLuint attr = FRAG_ATTRIB_WPOS; + wLeft = vLower->attrib[FRAG_ATTRIB_WPOS][3] + + (span.attrStepX[attr][3] * adjx + + span.attrStepY[attr][3] * adjy) * (1.0F/((float) (1 << 11))); + dwOuter = span.attrStepY[attr][3] + dxOuter * span.attrStepX[attr][3]; + } + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + const GLfloat invW = vLower->attrib[FRAG_ATTRIB_WPOS][3]; + if (swrast->_InterpMode[attr] == 0x1D00) { + GLuint c; + for (c = 0; c < 4; c++) { + attrLeft[attr][c] = v2->attrib[attr][c] * invW; + daOuter[attr][c] = 0.0; + } + } + else { + GLuint c; + for (c = 0; c < 4; c++) { + const GLfloat a = vLower->attrib[attr][c] * invW; + attrLeft[attr][c] = a + ( span.attrStepX[attr][c] * adjx + + span.attrStepY[attr][c] * adjy) * (1.0F/((float) (1 << 11))); + daOuter[attr][c] = span.attrStepY[attr][c] + dxOuter * span.attrStepX[attr][c]; + } + } + } } + } + if (setupRight && eRight->lines>0) { + fxRightEdge = eRight->fsx - 1; + fdxRightEdge = eRight->fdxdy; + } + if (lines==0) { + continue; + } + fdzInner = fdzOuter + span.zStep; + fdrInner = fdrOuter + span.redStep; + fdgInner = fdgOuter + span.greenStep; + fdbInner = fdbOuter + span.blueStep; + fdaInner = fdaOuter + span.alphaStep; + dwInner = dwOuter + span.attrStepX[FRAG_ATTRIB_WPOS][3]; + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + GLuint c; + for (c = 0; c < 4; c++) { + daInner[attr][c] = daOuter[attr][c] + span.attrStepX[attr][c]; + } + } } + while (lines > 0) { + const GLint right = ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + span.z = zLeft; + span.red = rLeft; + span.green = gLeft; + span.blue = bLeft; + span.alpha = aLeft; + span.attrStart[FRAG_ATTRIB_WPOS][3] = wLeft; + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + GLuint c; + for (c = 0; c < 4; c++) { + span.attrStart[attr][c] = attrLeft[attr][c]; + } + } } + if (span.end > 0 && span.y >= 0) { + const GLint len = span.end - 1; + (void) len; + do { GLfixed endVal = span.red + (len) * span.redStep; if (endVal < 0) { span.red -= endVal; } if (span.red < 0) { span.red = 0; } } while (0); + do { GLfixed endVal = span.green + (len) * span.greenStep; if (endVal < 0) { span.green -= endVal; } if (span.green < 0) { span.green = 0; } } while (0); + do { GLfixed endVal = span.blue + (len) * span.blueStep; if (endVal < 0) { span.blue -= endVal; } if (span.blue < 0) { span.blue = 0; } } while (0); + do { GLfixed endVal = span.alpha + (len) * span.alphaStep; if (endVal < 0) { span.alpha -= endVal; } if (span.alpha < 0) { span.alpha = 0; } } while (0); + { + span.interpMask &= ~0x01; span.arrayMask |= 0x01; fast_persp_span(ctx, &span, &info);; + } + } + span.y++; + lines--; + fxLeftEdge += fdxLeftEdge; + fxRightEdge += fdxRightEdge; + fError += fdError; + if (fError >= 0) { + fError -= (1 << 11); + zLeft += fdzOuter; + rLeft += fdrOuter; + gLeft += fdgOuter; + bLeft += fdbOuter; + aLeft += fdaOuter; + wLeft += dwOuter; + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + GLuint c; + for (c = 0; c < 4; c++) { + attrLeft[attr][c] += daOuter[attr][c]; + } + } } + } + else { + zLeft += fdzInner; + rLeft += fdrInner; + gLeft += fdgInner; + bLeft += fdbInner; + aLeft += fdaInner; + wLeft += dwInner; + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + GLuint c; + for (c = 0; c < 4; c++) { + attrLeft[attr][c] += daInner[attr][c]; + } + } } + } + } + } + } + } +} +static void general_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + typedef struct { + const SWvertex *v0, *v1; + GLfloat dx; + GLfloat dy; + GLfloat dxdy; + GLfixed fdxdy; + GLfloat adjy; + GLfixed fsx; + GLfixed fsy; + GLfixed fx0; + GLint lines; + } EdgeT; + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; + const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; + const GLfloat maxDepth = ctx->DrawBuffer->_DepthMaxF; + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + SWspan span; + (void) swrast; + do { (span).primitive = (0x0009); (span).interpMask = 0x0; (span).arrayMask = 0x0; (span).arrayAttribs = 0x0; (span).end = 0; (span).leftClip = 0; (span).facing = 0; (span).array = SWRAST_CONTEXT(ctx)->SpanArrays; } while (0); + span.y = 0; + (void) fixedToDepthShift; + { + const GLfixed fy0 = (((int) ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = (((int) ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = (((int) ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + vMin = v0; vMid = v1; vMax = v2; + vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; + } + else if (fy2 <= fy0) { + vMin = v2; vMid = v0; vMax = v1; + vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; + } + else { + vMin = v0; vMid = v2; vMax = v1; + vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; + bf = -bf; + } + } + else { + if (fy0 <= fy2) { + vMin = v1; vMid = v0; vMax = v2; + vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; + bf = -bf; + } + else if (fy2 <= fy1) { + vMin = v2; vMid = v1; vMax = v0; + vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; + bf = -bf; + } + else { + vMin = v1; vMid = v2; vMax = v0; + vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; + } + } + vMin_fx = (((int) ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = (((int) ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMax_fx = (((int) ((((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + } + eMaj.v0 = vMin; eMaj.v1 = vMax; + eTop.v0 = vMid; eTop.v1 = vMax; + eBot.v0 = vMin; eBot.v1 = vMid; + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float) (1 << 11)))); + eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / ((float) (1 << 11)))); + eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + if (area * bf * swrast->_BackfaceCullSign < 0.0) + return; + oneOverArea = 1.0F / area; + span.facing = oneOverArea * bf > 0.0F; + } + { + eMaj.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eMaj.lines = (((((vMax_fy - eMaj.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eMaj.lines > 0) { + eMaj.dxdy = eMaj.dx / eMaj.dy; + eMaj.fdxdy = (((int) ((((eMaj.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eMaj.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eMaj.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); + eMaj.fx0 = vMin_fx; + eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * eMaj.dxdy); + } + else { + return; + } + eTop.fsy = (((vMid_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eTop.lines = (((((vMax_fy - eTop.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eTop.lines > 0) { + eTop.dxdy = eTop.dx / eTop.dy; + eTop.fdxdy = (((int) ((((eTop.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eTop.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eTop.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); + eTop.fx0 = vMid_fx; + eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * eTop.dxdy); + } + eBot.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eBot.lines = (((((vMid_fy - eBot.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eBot.lines > 0) { + eBot.dxdy = eBot.dx / eBot.dy; + eBot.fdxdy = (((int) ((((eBot.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eBot.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eBot.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); + eBot.fx0 = vMin_fx; + eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * eBot.dxdy); + } + } + { + GLint scan_from_left_to_right; + scan_from_left_to_right = (oneOverArea < 0.0F); + span.interpMask |= 0x02; + { + GLfloat eMaj_dz = vMax->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + GLfloat eBot_dz = vMid->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + span.attrStepX[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); + if (span.attrStepX[FRAG_ATTRIB_WPOS][2] > maxDepth || + span.attrStepX[FRAG_ATTRIB_WPOS][2] < -maxDepth) { + span.attrStepX[FRAG_ATTRIB_WPOS][2] = 0.0; + span.attrStepY[FRAG_ATTRIB_WPOS][2] = 0.0; + } + else { + span.attrStepY[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); + } + if (depthBits <= 16) + span.zStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))); + else + span.zStep = (GLint) span.attrStepX[FRAG_ATTRIB_WPOS][2]; + } + span.interpMask |= 0x01; + if (ctx->Light.ShadeModel == 0x1D01) { + GLfloat eMaj_dr = (GLfloat) (vMax->color[0] - vMin->color[0]); + GLfloat eBot_dr = (GLfloat) (vMid->color[0] - vMin->color[0]); + GLfloat eMaj_dg = (GLfloat) (vMax->color[1] - vMin->color[1]); + GLfloat eBot_dg = (GLfloat) (vMid->color[1] - vMin->color[1]); + GLfloat eMaj_db = (GLfloat) (vMax->color[2] - vMin->color[2]); + GLfloat eBot_db = (GLfloat) (vMid->color[2] - vMin->color[2]); + GLfloat eMaj_da = (GLfloat) (vMax->color[3] - vMin->color[3]); + GLfloat eBot_da = (GLfloat) (vMid->color[3] - vMin->color[3]); + span.attrStepX[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr); + span.attrStepY[FRAG_ATTRIB_COL0][0] = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg); + span.attrStepY[FRAG_ATTRIB_COL0][1] = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx); + span.attrStepX[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db); + span.attrStepY[FRAG_ATTRIB_COL0][2] = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); + span.redStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) - 0.5F)))); + span.greenStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) - 0.5F)))); + span.blueStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) - 0.5F)))); + span.attrStepX[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj_da * eBot.dy - eMaj.dy * eBot_da); + span.attrStepY[FRAG_ATTRIB_COL0][3] = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx); + span.alphaStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) - 0.5F)))); + } + else { + ; + span.interpMask |= 0x04; + span.attrStepX[FRAG_ATTRIB_COL0][0] = span.attrStepY[FRAG_ATTRIB_COL0][0] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][1] = span.attrStepY[FRAG_ATTRIB_COL0][1] = 0.0F; + span.attrStepX[FRAG_ATTRIB_COL0][2] = span.attrStepY[FRAG_ATTRIB_COL0][2] = 0.0F; + span.redStep = 0; + span.greenStep = 0; + span.blueStep = 0; + span.attrStepX[FRAG_ATTRIB_COL0][3] = span.attrStepY[FRAG_ATTRIB_COL0][3] = 0.0F; + span.alphaStep = 0; + } + { + const GLfloat wMax = vMax->attrib[FRAG_ATTRIB_WPOS][3]; + const GLfloat wMin = vMin->attrib[FRAG_ATTRIB_WPOS][3]; + const GLfloat wMid = vMid->attrib[FRAG_ATTRIB_WPOS][3]; + { + const GLfloat eMaj_dw = wMax - wMin; + const GLfloat eBot_dw = wMid - wMin; + span.attrStepX[FRAG_ATTRIB_WPOS][3] = oneOverArea * (eMaj_dw * eBot.dy - eMaj.dy * eBot_dw); + span.attrStepY[FRAG_ATTRIB_WPOS][3] = oneOverArea * (eMaj.dx * eBot_dw - eMaj_dw * eBot.dx); + } + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + if (swrast->_InterpMode[attr] == 0x1D00) { + do { span.attrStepX[attr][0] = 0.0; span.attrStepX[attr][1] = 0.0; span.attrStepX[attr][2] = 0.0; span.attrStepX[attr][3] = 0.0; } while(0); + do { span.attrStepY[attr][0] = 0.0; span.attrStepY[attr][1] = 0.0; span.attrStepY[attr][2] = 0.0; span.attrStepY[attr][3] = 0.0; } while(0); + } + else { + GLuint c; + for (c = 0; c < 4; c++) { + GLfloat eMaj_da = vMax->attrib[attr][c] * wMax - vMin->attrib[attr][c] * wMin; + GLfloat eBot_da = vMid->attrib[attr][c] * wMid - vMin->attrib[attr][c] * wMin; + span.attrStepX[attr][c] = oneOverArea * (eMaj_da * eBot.dy - eMaj.dy * eBot_da); + span.attrStepY[attr][c] = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx); + } + } + } } + } + { + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; + GLfixed fError = 0, fdError = 0; + GLuint zLeft = 0; + GLfixed fdzOuter = 0, fdzInner; + GLint rLeft = 0, fdrOuter = 0, fdrInner; + GLint gLeft = 0, fdgOuter = 0, fdgInner; + GLint bLeft = 0, fdbOuter = 0, fdbInner; + GLint aLeft = 0, fdaOuter = 0, fdaInner; + GLfloat wLeft = 0, dwOuter = 0, dwInner; + GLfloat attrLeft[FRAG_ATTRIB_MAX][4]; + GLfloat daOuter[FRAG_ATTRIB_MAX][4], daInner[FRAG_ATTRIB_MAX][4]; + for (subTriangle=0; subTriangle<=1; subTriangle++) { + EdgeT *eLeft, *eRight; + int setupLeft, setupRight; + int lines; + if (subTriangle==0) { + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eBot; + lines = eRight->lines; + setupLeft = 1; + setupRight = 1; + } + else { + eLeft = &eBot; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 1; + } + } + else { + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eTop; + lines = eRight->lines; + setupLeft = 0; + setupRight = 1; + } + else { + eLeft = &eTop; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 0; + } + if (lines == 0) + return; + } + if (setupLeft && eLeft->lines > 0) { + const SWvertex *vLower = eLeft->v0; + const GLfixed fsy = eLeft->fsy; + const GLfixed fsx = eLeft->fsx; + const GLfixed fx = (((fsx) + (1 << 11) - 1) & (~((1 << 11) - 1))); + const GLfixed adjx = (GLfixed) (fx - eLeft->fx0); + const GLfixed adjy = (GLfixed) eLeft->adjy; + GLint idxOuter; + GLfloat dxOuter; + GLfixed fdxOuter; + fError = fx - fsx - (1 << 11); + fxLeftEdge = fsx - 1; + fdxLeftEdge = eLeft->fdxdy; + fdxOuter = ((fdxLeftEdge - 1) & (~((1 << 11) - 1))); + fdError = fdxOuter - fdxLeftEdge + (1 << 11); + idxOuter = ((fdxOuter) >> 11); + dxOuter = (GLfloat) idxOuter; + span.y = ((fsy) >> 11); + (void) dxOuter; + (void) adjx; + (void) adjy; + (void) vLower; + { + GLfloat z0 = vLower->attrib[FRAG_ATTRIB_WPOS][2]; + if (depthBits <= 16) { + GLfloat tmp = (z0 * ((float) (1 << 11)) + + span.attrStepX[FRAG_ATTRIB_WPOS][2] * adjx + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * adjy) + (1 << (11 -1)); + if (tmp < 0xffffffff / 2) + zLeft = (GLfixed) tmp; + else + zLeft = 0xffffffff / 2; + fdzOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + zLeft = (GLuint) (z0 + span.attrStepX[FRAG_ATTRIB_WPOS][2] * ((adjx) * (1.0F / ((float) (1 << 11)))) + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * ((adjy) * (1.0F / ((float) (1 << 11))))); + fdzOuter = (GLint) (span.attrStepY[FRAG_ATTRIB_WPOS][2] + + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]); + } + } + if (ctx->Light.ShadeModel == 0x1D01) { + rLeft = (GLint)(((vLower->color[0]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][0] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][0] * adjy) + (1 << (11 -1)); + gLeft = (GLint)(((vLower->color[1]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][1] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][1] * adjy) + (1 << (11 -1)); + bLeft = (GLint)(((vLower->color[2]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][2] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][2] * adjy) + (1 << (11 -1)); + fdrOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][0] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][0]) * ((float) (1 << 11))) - 0.5F)))) + ; + fdgOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][1] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][1]) * ((float) (1 << 11))) - 0.5F)))) + ; + fdbOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + aLeft = (GLint)(((vLower->color[3]) << 11) + + span.attrStepX[FRAG_ATTRIB_COL0][3] * adjx + + span.attrStepY[FRAG_ATTRIB_COL0][3] * adjy) + (1 << (11 -1)); + fdaOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_COL0][3] + dxOuter * span.attrStepX[FRAG_ATTRIB_COL0][3]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + ; + rLeft = ((v2->color[0]) << 11); + gLeft = ((v2->color[1]) << 11); + bLeft = ((v2->color[2]) << 11); + fdrOuter = fdgOuter = fdbOuter = 0; + aLeft = ((v2->color[3]) << 11); + fdaOuter = 0; + } + { + const GLuint attr = FRAG_ATTRIB_WPOS; + wLeft = vLower->attrib[FRAG_ATTRIB_WPOS][3] + + (span.attrStepX[attr][3] * adjx + + span.attrStepY[attr][3] * adjy) * (1.0F/((float) (1 << 11))); + dwOuter = span.attrStepY[attr][3] + dxOuter * span.attrStepX[attr][3]; + } + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + const GLfloat invW = vLower->attrib[FRAG_ATTRIB_WPOS][3]; + if (swrast->_InterpMode[attr] == 0x1D00) { + GLuint c; + for (c = 0; c < 4; c++) { + attrLeft[attr][c] = v2->attrib[attr][c] * invW; + daOuter[attr][c] = 0.0; + } + } + else { + GLuint c; + for (c = 0; c < 4; c++) { + const GLfloat a = vLower->attrib[attr][c] * invW; + attrLeft[attr][c] = a + ( span.attrStepX[attr][c] * adjx + + span.attrStepY[attr][c] * adjy) * (1.0F/((float) (1 << 11))); + daOuter[attr][c] = span.attrStepY[attr][c] + dxOuter * span.attrStepX[attr][c]; + } + } + } } + } + if (setupRight && eRight->lines>0) { + fxRightEdge = eRight->fsx - 1; + fdxRightEdge = eRight->fdxdy; + } + if (lines==0) { + continue; + } + fdzInner = fdzOuter + span.zStep; + fdrInner = fdrOuter + span.redStep; + fdgInner = fdgOuter + span.greenStep; + fdbInner = fdbOuter + span.blueStep; + fdaInner = fdaOuter + span.alphaStep; + dwInner = dwOuter + span.attrStepX[FRAG_ATTRIB_WPOS][3]; + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + GLuint c; + for (c = 0; c < 4; c++) { + daInner[attr][c] = daOuter[attr][c] + span.attrStepX[attr][c]; + } + } } + while (lines > 0) { + const GLint right = ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + span.z = zLeft; + span.red = rLeft; + span.green = gLeft; + span.blue = bLeft; + span.alpha = aLeft; + span.attrStart[FRAG_ATTRIB_WPOS][3] = wLeft; + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + GLuint c; + for (c = 0; c < 4; c++) { + span.attrStart[attr][c] = attrLeft[attr][c]; + } + } } + if (span.end > 0 && span.y >= 0) { + const GLint len = span.end - 1; + (void) len; + do { GLfixed endVal = span.red + (len) * span.redStep; if (endVal < 0) { span.red -= endVal; } if (span.red < 0) { span.red = 0; } } while (0); + do { GLfixed endVal = span.green + (len) * span.greenStep; if (endVal < 0) { span.green -= endVal; } if (span.green < 0) { span.green = 0; } } while (0); + do { GLfixed endVal = span.blue + (len) * span.blueStep; if (endVal < 0) { span.blue -= endVal; } if (span.blue < 0) { span.blue = 0; } } while (0); + do { GLfixed endVal = span.alpha + (len) * span.alphaStep; if (endVal < 0) { span.alpha -= endVal; } if (span.alpha < 0) { span.alpha = 0; } } while (0); + { + _swrast_write_rgba_span(ctx, &span);; + } + } + span.y++; + lines--; + fxLeftEdge += fdxLeftEdge; + fxRightEdge += fdxRightEdge; + fError += fdError; + if (fError >= 0) { + fError -= (1 << 11); + zLeft += fdzOuter; + rLeft += fdrOuter; + gLeft += fdgOuter; + bLeft += fdbOuter; + aLeft += fdaOuter; + wLeft += dwOuter; + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + GLuint c; + for (c = 0; c < 4; c++) { + attrLeft[attr][c] += daOuter[attr][c]; + } + } } + } + else { + zLeft += fdzInner; + rLeft += fdrInner; + gLeft += fdgInner; + bLeft += fdbInner; + aLeft += fdaInner; + wLeft += dwInner; + { GLuint a; for (a = 0; a < swrast->_NumActiveAttribs; a++) { const GLuint attr = swrast->_ActiveAttribs[a]; + GLuint c; + for (c = 0; c < 4; c++) { + attrLeft[attr][c] += daInner[attr][c]; + } + } } + } + } + } + } + } +} +static void occlusion_zless_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + typedef struct { + const SWvertex *v0, *v1; + GLfloat dx; + GLfloat dy; + GLfloat dxdy; + GLfixed fdxdy; + GLfloat adjy; + GLfixed fsx; + GLfixed fsy; + GLfixed fx0; + GLint lines; + } EdgeT; + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + const GLint depthBits = ctx->DrawBuffer->Visual.depthBits; + const GLint fixedToDepthShift = depthBits <= 16 ? 11 : 0; + const GLfloat maxDepth = ctx->DrawBuffer->_DepthMaxF; + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + GLfloat bf = SWRAST_CONTEXT(ctx)->_BackfaceSign; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + SWspan span; + (void) swrast; + do { (span).primitive = (0x0009); (span).interpMask = 0x0; (span).arrayMask = 0x0; (span).arrayAttribs = 0x0; (span).end = 0; (span).leftClip = 0; (span).facing = 0; (span).array = SWRAST_CONTEXT(ctx)->SpanArrays; } while (0); + span.y = 0; + (void) fixedToDepthShift; + { + const GLfixed fy0 = (((int) ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = (((int) ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = (((int) ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + vMin = v0; vMid = v1; vMax = v2; + vMin_fy = fy0; vMid_fy = fy1; vMax_fy = fy2; + } + else if (fy2 <= fy0) { + vMin = v2; vMid = v0; vMax = v1; + vMin_fy = fy2; vMid_fy = fy0; vMax_fy = fy1; + } + else { + vMin = v0; vMid = v2; vMax = v1; + vMin_fy = fy0; vMid_fy = fy2; vMax_fy = fy1; + bf = -bf; + } + } + else { + if (fy0 <= fy2) { + vMin = v1; vMid = v0; vMax = v2; + vMin_fy = fy1; vMid_fy = fy0; vMax_fy = fy2; + bf = -bf; + } + else if (fy2 <= fy1) { + vMin = v2; vMid = v1; vMax = v0; + vMin_fy = fy2; vMid_fy = fy1; vMax_fy = fy0; + bf = -bf; + } + else { + vMin = v1; vMid = v2; vMax = v0; + vMin_fy = fy1; vMid_fy = fy2; vMax_fy = fy0; + } + } + vMin_fx = (((int) ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = (((int) ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + vMax_fx = (((int) ((((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) >= 0.0F) ? (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) + 0.5F) : (((vMax->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * ((float) (1 << 11))) - 0.5F)))) & snapMask; + } + eMaj.v0 = vMin; eMaj.v1 = vMax; + eTop.v0 = vMid; eTop.v1 = vMax; + eBot.v0 = vMin; eBot.v1 = vMid; + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float) (1 << 11)))); + eTop.dy = ((vMax_fy - vMid_fy) * (1.0F / ((float) (1 << 11)))); + eBot.dx = ((vMid_fx - vMin_fx) * (1.0F / ((float) (1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float) (1 << 11)))); + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + if (area * bf * swrast->_BackfaceCullSign < 0.0) + return; + oneOverArea = 1.0F / area; + span.facing = oneOverArea * bf > 0.0F; + } + { + eMaj.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eMaj.lines = (((((vMax_fy - eMaj.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eMaj.lines > 0) { + eMaj.dxdy = eMaj.dx / eMaj.dy; + eMaj.fdxdy = (((int) ((((eMaj.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eMaj.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eMaj.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eMaj.adjy = (GLfloat) (eMaj.fsy - vMin_fy); + eMaj.fx0 = vMin_fx; + eMaj.fsx = eMaj.fx0 + (GLfixed) (eMaj.adjy * eMaj.dxdy); + } + else { + return; + } + eTop.fsy = (((vMid_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eTop.lines = (((((vMax_fy - eTop.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eTop.lines > 0) { + eTop.dxdy = eTop.dx / eTop.dy; + eTop.fdxdy = (((int) ((((eTop.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eTop.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eTop.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eTop.adjy = (GLfloat) (eTop.fsy - vMid_fy); + eTop.fx0 = vMid_fx; + eTop.fsx = eTop.fx0 + (GLfixed) (eTop.adjy * eTop.dxdy); + } + eBot.fsy = (((vMin_fy) + (1 << 11) - 1) & (~((1 << 11) - 1))); + eBot.lines = (((((vMid_fy - eBot.fsy) + (1 << 11) - 1) & (~((1 << 11) - 1)))) >> 11); + if (eBot.lines > 0) { + eBot.dxdy = eBot.dx / eBot.dy; + eBot.fdxdy = (((int) ((((eBot.dxdy) * ((float) (1 << 11))) >= 0.0F) ? (((eBot.dxdy) * ((float) (1 << 11))) + 0.5F) : (((eBot.dxdy) * ((float) (1 << 11))) - 0.5F)))); + eBot.adjy = (GLfloat) (eBot.fsy - vMin_fy); + eBot.fx0 = vMin_fx; + eBot.fsx = eBot.fx0 + (GLfixed) (eBot.adjy * eBot.dxdy); + } + } + { + GLint scan_from_left_to_right; + struct gl_renderbuffer *rb = ctx->DrawBuffer->_DepthBuffer; struct gl_query_object *q = ctx->Query.CurrentOcclusionObject; ; ; ; if (!q) { return; } + scan_from_left_to_right = (oneOverArea < 0.0F); + span.interpMask |= 0x02; + { + GLfloat eMaj_dz = vMax->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + GLfloat eBot_dz = vMid->attrib[FRAG_ATTRIB_WPOS][2] - vMin->attrib[FRAG_ATTRIB_WPOS][2]; + span.attrStepX[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj_dz * eBot.dy - eMaj.dy * eBot_dz); + if (span.attrStepX[FRAG_ATTRIB_WPOS][2] > maxDepth || + span.attrStepX[FRAG_ATTRIB_WPOS][2] < -maxDepth) { + span.attrStepX[FRAG_ATTRIB_WPOS][2] = 0.0; + span.attrStepY[FRAG_ATTRIB_WPOS][2] = 0.0; + } + else { + span.attrStepY[FRAG_ATTRIB_WPOS][2] = oneOverArea * (eMaj.dx * eBot_dz - eMaj_dz * eBot.dx); + } + if (depthBits <= 16) + span.zStep = (((int) ((((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))); + else + span.zStep = (GLint) span.attrStepX[FRAG_ATTRIB_WPOS][2]; + } + { + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed fdxLeftEdge = 0, fdxRightEdge = 0; + GLfixed fError = 0, fdError = 0; + GLuint zLeft = 0; + GLfixed fdzOuter = 0, fdzInner; + for (subTriangle=0; subTriangle<=1; subTriangle++) { + EdgeT *eLeft, *eRight; + int setupLeft, setupRight; + int lines; + if (subTriangle==0) { + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eBot; + lines = eRight->lines; + setupLeft = 1; + setupRight = 1; + } + else { + eLeft = &eBot; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 1; + } + } + else { + if (scan_from_left_to_right) { + eLeft = &eMaj; + eRight = &eTop; + lines = eRight->lines; + setupLeft = 0; + setupRight = 1; + } + else { + eLeft = &eTop; + eRight = &eMaj; + lines = eLeft->lines; + setupLeft = 1; + setupRight = 0; + } + if (lines == 0) + return; + } + if (setupLeft && eLeft->lines > 0) { + const SWvertex *vLower = eLeft->v0; + const GLfixed fsy = eLeft->fsy; + const GLfixed fsx = eLeft->fsx; + const GLfixed fx = (((fsx) + (1 << 11) - 1) & (~((1 << 11) - 1))); + const GLfixed adjx = (GLfixed) (fx - eLeft->fx0); + const GLfixed adjy = (GLfixed) eLeft->adjy; + GLint idxOuter; + GLfloat dxOuter; + GLfixed fdxOuter; + fError = fx - fsx - (1 << 11); + fxLeftEdge = fsx - 1; + fdxLeftEdge = eLeft->fdxdy; + fdxOuter = ((fdxLeftEdge - 1) & (~((1 << 11) - 1))); + fdError = fdxOuter - fdxLeftEdge + (1 << 11); + idxOuter = ((fdxOuter) >> 11); + dxOuter = (GLfloat) idxOuter; + span.y = ((fsy) >> 11); + (void) dxOuter; + (void) adjx; + (void) adjy; + (void) vLower; + { + GLfloat z0 = vLower->attrib[FRAG_ATTRIB_WPOS][2]; + if (depthBits <= 16) { + GLfloat tmp = (z0 * ((float) (1 << 11)) + + span.attrStepX[FRAG_ATTRIB_WPOS][2] * adjx + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * adjy) + (1 << (11 -1)); + if (tmp < 0xffffffff / 2) + zLeft = (GLfixed) tmp; + else + zLeft = 0xffffffff / 2; + fdzOuter = (((int) ((((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) >= 0.0F) ? (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) + 0.5F) : (((span.attrStepY[FRAG_ATTRIB_WPOS][2] + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]) * ((float) (1 << 11))) - 0.5F)))) + ; + } + else { + zLeft = (GLuint) (z0 + span.attrStepX[FRAG_ATTRIB_WPOS][2] * ((adjx) * (1.0F / ((float) (1 << 11)))) + + span.attrStepY[FRAG_ATTRIB_WPOS][2] * ((adjy) * (1.0F / ((float) (1 << 11))))); + fdzOuter = (GLint) (span.attrStepY[FRAG_ATTRIB_WPOS][2] + + dxOuter * span.attrStepX[FRAG_ATTRIB_WPOS][2]); + } + } + } + if (setupRight && eRight->lines>0) { + fxRightEdge = eRight->fsx - 1; + fdxRightEdge = eRight->fdxdy; + } + if (lines==0) { + continue; + } + fdzInner = fdzOuter + span.zStep; + while (lines > 0) { + const GLint right = ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + span.z = zLeft; + if (span.end > 0 && span.y >= 0) { + const GLint len = span.end - 1; + (void) len; + { + if (rb->Format == MESA_FORMAT_Z16) { GLuint i; const GLushort *zRow = (const GLushort *) rb->GetPointer(ctx, rb, span.x, span.y); for (i = 0; i < span.end; i++) { GLuint z = ((span.z) >> fixedToDepthShift); if (z < zRow[i]) { q->Result++; } span.z += span.zStep; } } else { GLuint i; const GLuint *zRow = (const GLuint *) rb->GetPointer(ctx, rb, span.x, span.y); for (i = 0; i < span.end; i++) { if ((GLuint)span.z < zRow[i]) { q->Result++; } span.z += span.zStep; } }; + } + } + span.y++; + lines--; + fxLeftEdge += fdxLeftEdge; + fxRightEdge += fdxRightEdge; + fError += fdError; + if (fError >= 0) { + fError -= (1 << 11); + zLeft += fdzOuter; + } + else { + zLeft += fdzInner; + } + } + } + } + } +} +static void +nodraw_triangle( struct gl_context *ctx, + const SWvertex *v0, + const SWvertex *v1, + const SWvertex *v2 ) +{ + (void) (ctx && v0 && v1 && v2); +} +void +_swrast_add_spec_terms_triangle(struct gl_context *ctx, const SWvertex *v0, + const SWvertex *v1, const SWvertex *v2) +{ + SWvertex *ncv0 = (SWvertex *)v0; + SWvertex *ncv1 = (SWvertex *)v1; + SWvertex *ncv2 = (SWvertex *)v2; + GLfloat rSum, gSum, bSum; + GLchan cSave[3][4]; + do { (cSave[0])[0] = (ncv0->color)[0]; (cSave[0])[1] = (ncv0->color)[1]; (cSave[0])[2] = (ncv0->color)[2]; (cSave[0])[3] = (ncv0->color)[3]; } while (0); + do { (cSave[1])[0] = (ncv1->color)[0]; (cSave[1])[1] = (ncv1->color)[1]; (cSave[1])[2] = (ncv1->color)[2]; (cSave[1])[3] = (ncv1->color)[3]; } while (0); + do { (cSave[2])[0] = (ncv2->color)[0]; (cSave[2])[1] = (ncv2->color)[1]; (cSave[2])[2] = (ncv2->color)[2]; (cSave[2])[3] = (ncv2->color)[3]; } while (0); + rSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv0->color[0])] + ncv0->attrib[FRAG_ATTRIB_COL1][0]; + gSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv0->color[1])] + ncv0->attrib[FRAG_ATTRIB_COL1][1]; + bSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv0->color[2])] + ncv0->attrib[FRAG_ATTRIB_COL1][2]; + do { fi_type __tmp; __tmp.f = (rSum); if (__tmp.i < 0) ncv0->color[0] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv0->color[0] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv0->color[0] = (GLubyte) __tmp.i; } } while (0); + do { fi_type __tmp; __tmp.f = (gSum); if (__tmp.i < 0) ncv0->color[1] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv0->color[1] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv0->color[1] = (GLubyte) __tmp.i; } } while (0); + do { fi_type __tmp; __tmp.f = (bSum); if (__tmp.i < 0) ncv0->color[2] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv0->color[2] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv0->color[2] = (GLubyte) __tmp.i; } } while (0); + rSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv1->color[0])] + ncv1->attrib[FRAG_ATTRIB_COL1][0]; + gSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv1->color[1])] + ncv1->attrib[FRAG_ATTRIB_COL1][1]; + bSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv1->color[2])] + ncv1->attrib[FRAG_ATTRIB_COL1][2]; + do { fi_type __tmp; __tmp.f = (rSum); if (__tmp.i < 0) ncv1->color[0] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv1->color[0] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv1->color[0] = (GLubyte) __tmp.i; } } while (0); + do { fi_type __tmp; __tmp.f = (gSum); if (__tmp.i < 0) ncv1->color[1] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv1->color[1] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv1->color[1] = (GLubyte) __tmp.i; } } while (0); + do { fi_type __tmp; __tmp.f = (bSum); if (__tmp.i < 0) ncv1->color[2] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv1->color[2] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv1->color[2] = (GLubyte) __tmp.i; } } while (0); + rSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv2->color[0])] + ncv2->attrib[FRAG_ATTRIB_COL1][0]; + gSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv2->color[1])] + ncv2->attrib[FRAG_ATTRIB_COL1][1]; + bSum = _mesa_ubyte_to_float_color_tab[(unsigned int)(ncv2->color[2])] + ncv2->attrib[FRAG_ATTRIB_COL1][2]; + do { fi_type __tmp; __tmp.f = (rSum); if (__tmp.i < 0) ncv2->color[0] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv2->color[0] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv2->color[0] = (GLubyte) __tmp.i; } } while (0); + do { fi_type __tmp; __tmp.f = (gSum); if (__tmp.i < 0) ncv2->color[1] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv2->color[1] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv2->color[1] = (GLubyte) __tmp.i; } } while (0); + do { fi_type __tmp; __tmp.f = (bSum); if (__tmp.i < 0) ncv2->color[2] = (GLubyte) 0; else if (__tmp.i >= 0x3f7f0000) ncv2->color[2] = (GLubyte) 255; else { __tmp.f = __tmp.f * (255.0F/256.0F) + 32768.0F; ncv2->color[2] = (GLubyte) __tmp.i; } } while (0); + SWRAST_CONTEXT(ctx)->SpecTriangle( ctx, ncv0, ncv1, ncv2 ); + do { (ncv0->color)[0] = (cSave[0])[0]; (ncv0->color)[1] = (cSave[0])[1]; (ncv0->color)[2] = (cSave[0])[2]; (ncv0->color)[3] = (cSave[0])[3]; } while (0); + do { (ncv1->color)[0] = (cSave[1])[0]; (ncv1->color)[1] = (cSave[1])[1]; (ncv1->color)[2] = (cSave[1])[2]; (ncv1->color)[3] = (cSave[1])[3]; } while (0); + do { (ncv2->color)[0] = (cSave[2])[0]; (ncv2->color)[1] = (cSave[2])[1]; (ncv2->color)[2] = (cSave[2])[2]; (ncv2->color)[3] = (cSave[2])[3]; } while (0); +} +void +_swrast_choose_triangle( struct gl_context *ctx ) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + if (ctx->Polygon.CullFlag && + ctx->Polygon.CullFaceMode == 0x0408) { + swrast->Triangle = nodraw_triangle;; + return; + } + if (ctx->RenderMode==0x1C00) { + if (ctx->Polygon.SmoothFlag) { + _swrast_set_aa_triangle_function(ctx); + ; + return; + } + if (ctx->Query.CurrentOcclusionObject && + ctx->Depth.Test && + ctx->Depth.Mask == 0x0 && + ctx->Depth.Func == 0x0201 && + !ctx->Stencil._Enabled) { + if (ctx->Color.ColorMask[0][0] == 0 && + ctx->Color.ColorMask[0][1] == 0 && + ctx->Color.ColorMask[0][2] == 0 && + ctx->Color.ColorMask[0][3] == 0) { + swrast->Triangle = occlusion_zless_triangle;; + return; + } + } + if (ctx->Texture._EnabledCoordUnits || + ctx->FragmentProgram._Current || + ctx->ATIFragmentShader._Enabled || + _mesa_need_secondary_color(ctx) || + swrast->_FogEnabled) { + const struct gl_texture_object *texObj2D; + const struct gl_texture_image *texImg; + GLenum minFilter, magFilter, envMode; + gl_format format; + texObj2D = ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; + texImg = texObj2D ? texObj2D->Image[0][texObj2D->BaseLevel] : ((void *)0); + format = texImg ? texImg->TexFormat : MESA_FORMAT_NONE; + minFilter = texObj2D ? texObj2D->Sampler.MinFilter : 0x0; + magFilter = texObj2D ? texObj2D->Sampler.MagFilter : 0x0; + envMode = ctx->Texture.Unit[0].EnvMode; + if (ctx->Texture._EnabledCoordUnits == 0x1 + && !ctx->FragmentProgram._Current + && !ctx->ATIFragmentShader._Enabled + && ctx->Texture._EnabledUnits == 0x1 + && ctx->Texture.Unit[0]._ReallyEnabled == (1 << TEXTURE_2D_INDEX) + && texObj2D->Sampler.WrapS == 0x2901 + && texObj2D->Sampler.WrapT == 0x2901 + && texObj2D->_Swizzle == (((0)<<0) | ((1)<<3) | ((2)<<6) | ((3)<<9)) + && texImg->_IsPowerOfTwo + && texImg->Border == 0 + && texImg->Width == texImg->RowStride + && (format == MESA_FORMAT_RGB888 || format == MESA_FORMAT_RGBA8888) + && minFilter == magFilter + && ctx->Light.Model.ColorControl == 0x81F9 + && !swrast->_FogEnabled + && ctx->Texture.Unit[0].EnvMode != 0x8570 + && ctx->Texture.Unit[0].EnvMode != 0x8503) { + if (ctx->Hint.PerspectiveCorrection==0x1101) { + if (minFilter == 0x2600 + && format == MESA_FORMAT_RGB888 + && (envMode == 0x1E01 || envMode == 0x2101) + && ((swrast->_RasterMask == (0x004 | 0x1000) + && ctx->Depth.Func == 0x0201 + && ctx->Depth.Mask == 0x1) + || swrast->_RasterMask == 0x1000) + && ctx->Polygon.StippleFlag == 0x0 + && ctx->DrawBuffer->Visual.depthBits <= 16) { + if (swrast->_RasterMask == (0x004 | 0x1000)) { + swrast->Triangle = simple_z_textured_triangle;; + } + else { + swrast->Triangle = simple_textured_triangle;; + } + } + else { + if (format == MESA_FORMAT_RGBA8888 && !_mesa_little_endian()) { + swrast->Triangle = general_triangle;; + } + else { + swrast->Triangle = affine_textured_triangle;; + } + } + } + else { + swrast->Triangle = persp_textured_triangle;; + } + } + else { + swrast->Triangle = general_triangle;; + } + } + else { + ; + ; + if (ctx->Light.ShadeModel==0x1D01) { + swrast->Triangle = smooth_rgba_triangle;; + } + else { + swrast->Triangle = flat_rgba_triangle;; + } + } + } + else if (ctx->RenderMode==0x1C01) { + swrast->Triangle = _swrast_feedback_triangle;; + } + else { + swrast->Triangle = _swrast_select_triangle;; + } +} diff --git a/394889/s_triangle.i.10 b/394889/s_triangle.i.10 new file mode 100644 index 0000000..17db87e --- /dev/null +++ b/394889/s_triangle.i.10 @@ -0,0 +1,214 @@ +typedef union { + float f; + int i; +} fi_type; +static __inline__ int IS_INF_OR_NAN(float x) +{ + fi_type tmp; + tmp.f = x; + return !(int)((unsigned int)((tmp.i & 0x7fffffff) - 0x7f800000) >> 31); +} + +struct gl_texture_image { + unsigned int Width; + unsigned int Height; + unsigned int WidthLog2; + void *Data; +}; +struct gl_texture_object { + int BaseLevel; + struct gl_texture_image *Image[6][15]; +}; +struct gl_texture_unit { + struct gl_texture_object *CurrentTex[9]; +}; +struct gl_texture_attrib { + struct gl_texture_unit Unit[(16 + 16)]; +}; +struct gl_renderbuffer { + void (*PutRowRGB) (struct gl_context * ctx, struct gl_renderbuffer * rb, + unsigned int count, int x, int y, + const void *values); +}; +struct gl_framebuffer { + struct gl_renderbuffer *_ColorDrawBuffers[8]; +}; +struct gl_context { + struct gl_framebuffer *DrawBuffer; + struct gl_texture_attrib Texture; +}; +typedef struct { + float attrib[30][4]; +} SWvertex; +typedef struct sw_span { + int x, y; + unsigned int end; + float attrStepX[30][4]; + int intTex[2], intTexStep[2]; +} SWspan; +static void simple_textured_triangle(const SWvertex * v1) +{ + struct gl_context *ctx; + const SWvertex * v0; + const SWvertex * v2; + typedef struct { + float dx; + float dy; + int fsx; + int fx0; + int lines; + } EdgeT; + EdgeT eMaj; + EdgeT eTop; + EdgeT eBot; + float oneOverArea; + const SWvertex *vMin; + const SWvertex *vMid; + const SWvertex *vMax; + const int snapMask = ~(((1 << 11) / (1 << 4)) - 1); + int vMin_fx; + int vMin_fy; + int vMid_fx; + int vMid_fy; + int vMax_fx; + int vMax_fy; + SWspan span; + const int fy0 = + (((int) + ((((v0->attrib[0][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v0->attrib[0][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) : (((v0->attrib[0][1] - 0.5F) * + ((float)(1 << 11))) - 0.5F)))) & snapMask; + const int fy1 = + (((int) + ((((v1->attrib[0][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v1->attrib[0][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) : (((v1->attrib[0][1] - 0.5F) * + ((float)(1 << 11))) - 0.5F)))) & snapMask; + const int fy2 = + (((int) + ((((v2->attrib[0][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v2->attrib[0][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) : (((v2->attrib[0][1] - 0.5F) * + ((float)(1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + vMin = v0; + vMax = v1; + vMin_fy = fy0; + } + } + vMin_fx = + (((int) + ((((vMin->attrib[0][0] + + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((vMin->attrib[0][0] + 0.5F) * + ((float)(1 << 11))) + + 0.5F) : (((vMin->attrib[0][0] + 0.5F) * + ((float)(1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = + (((int) + ((((vMid->attrib[0][0] + + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((vMid->attrib[0][0] + 0.5F) * + ((float)(1 << 11))) + + 0.5F) : (((vMid->attrib[0][0] + 0.5F) * + ((float)(1 << 11))) - 0.5F)))) & snapMask; + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float)(1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float)(1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float)(1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float)(1 << 11)))); + const float area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + oneOverArea = 1.0F / area; + if (eBot.lines > 0) { + eBot.fx0 = vMin_fx; + } + int scan_from_left_to_right; + struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0]; + const struct gl_texture_object *obj = + ctx->Texture.Unit[0].CurrentTex[8]; + const struct gl_texture_image *texImg = obj->Image[0][obj->BaseLevel]; + const float twidth = (float)texImg->Width; + const int twidth_log2 = texImg->WidthLog2; + const unsigned char *texture = (const unsigned char *)texImg->Data; + const int smask = texImg->Width - 1; + const int tmask = texImg->Height - 1; + if (!rb || !texture) { + return; + } + float eMaj_ds = + (vMax->attrib[4][0] - + vMin->attrib[4][0]) * twidth; + float eBot_ds = + (vMid->attrib[4][0] - + vMin->attrib[4][0]) * twidth; + span.attrStepX[4][0] = + oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); + span.intTexStep[0] = + (((int) + ((((span.attrStepX[4][0]) * ((float)(1 << 11))) >= + 0.0F) ? (((span.attrStepX[4][0]) * + ((float)(1 << 11))) + + 0.5F) : (((span.attrStepX[4][0]) * + ((float)(1 << 11))) - 0.5F)))); + int subTriangle; + int fxLeftEdge = 0; + int fxRightEdge = 0; + int sLeft = 0; + for (subTriangle = 0; subTriangle <= 1; subTriangle++) { + EdgeT *eRight; + int lines; + if (subTriangle == 0) { + if (scan_from_left_to_right) { + eRight = &eBot; + lines = eRight->lines; + } +else { + eRight = &eMaj; + } + } else { + if (scan_from_left_to_right) +{ + eRight = &eTop; + } + fxRightEdge = eRight->fsx - 1; + } + while (lines > 0) { + const int right = fxRightEdge >> 11; + span.x = fxLeftEdge >> 11; + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + span.intTex[0] = sLeft; + if (span.end > 0 && span.y >= 0) { + unsigned int i; + unsigned char rgb[16384][3]; + for (i = 0; i < span.end; i++) { + int s = + ((span.intTex[0]) >> 11) & smask; + int t = + ((span.intTex[1]) >> 11) & tmask; + int pos = (t << twidth_log2) + s; + rgb[i][0] = texture[pos + 2]; + span.intTex[0] += span.intTexStep[0]; + } + rb->PutRowRGB(ctx, rb, span.end, span.x, span.y, + rgb); + } + } + } +} + +void *foo() +{ + return simple_textured_triangle; +} diff --git a/394889/s_triangle.i.11 b/394889/s_triangle.i.11 new file mode 100644 index 0000000..09ce39b --- /dev/null +++ b/394889/s_triangle.i.11 @@ -0,0 +1,214 @@ +typedef union { + float f; + int i; +} fi_type; +static __inline__ int IS_INF_OR_NAN(float x) +{ + fi_type tmp; + tmp.f = x; + return !(int)((unsigned int)((tmp.i & 0x7fffffff) - 0x7f800000) >> 31); +} + +struct gl_texture_image { + unsigned int Width; + unsigned int Height; + unsigned int WidthLog2; + void *Data; +}; +struct gl_texture_object { + int BaseLevel; + struct gl_texture_image *Image[6][15]; +}; +struct gl_texture_unit { + struct gl_texture_object *CurrentTex[9]; +}; +struct gl_texture_attrib { + struct gl_texture_unit Unit[(16 + 16)]; +}; +struct gl_renderbuffer { + void (*PutRowRGB) (struct gl_context * ctx, struct gl_renderbuffer * rb, + unsigned int count, int x, int y, + const void *values); +}; +struct gl_framebuffer { + struct gl_renderbuffer *_ColorDrawBuffers[8]; +}; +struct gl_context { + struct gl_framebuffer *DrawBuffer; + struct gl_texture_attrib Texture; +}; +typedef struct { + float attrib[30][4]; +} SWvertex; +typedef struct sw_span { + int x, y; + unsigned int end; + float attrStepX[30][4]; + int intTex[2], intTexStep[2]; +} SWspan; +static void simple_textured_triangle(const SWvertex * v1) +{ + struct gl_context *ctx; + const SWvertex * v0; + const SWvertex * v2; + typedef struct { + float dx; + float dy; + int fsx; + int fx0; + int lines; + } EdgeT; + EdgeT eMaj; + EdgeT eTop; + EdgeT eBot; + float oneOverArea; + const SWvertex *vMin; + const SWvertex *vMid; + const SWvertex *vMax; + const int snapMask = ~127; + int vMin_fx; + int vMin_fy; + int vMid_fx; + int vMid_fy; + int vMax_fx; + int vMax_fy; + SWspan span; + const int fy0 = + (((int) + ((((v0->attrib[0][1] - + 0.5F) * (float)2048) >= + 0.0F) ? (((v0->attrib[0][1] - 0.5F) * + (float)2048) + + 0.5F) : (((v0->attrib[0][1] - 0.5F) * + (float)2048) - 0.5F)))) & snapMask; + const int fy1 = + (((int) + ((((v1->attrib[0][1] - + 0.5F) * (float)2048) >= + 0.0F) ? (((v1->attrib[0][1] - 0.5F) * + (float)2048) + + 0.5F) : (((v1->attrib[0][1] - 0.5F) * + (float)2048) - 0.5F)))) & snapMask; + const int fy2 = + (((int) + ((((v2->attrib[0][1] - + 0.5F) * (float)2048) >= + 0.0F) ? (((v2->attrib[0][1] - 0.5F) * + (float)2048) + + 0.5F) : (((v2->attrib[0][1] - 0.5F) * + (float)2048) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + vMin = v0; + vMax = v1; + vMin_fy = fy0; + } + } + vMin_fx = + (((int) + ((((vMin->attrib[0][0] + + 0.5F) * (float)2048) >= + 0.0F) ? (((vMin->attrib[0][0] + 0.5F) * + (float)2048) + + 0.5F) : (((vMin->attrib[0][0] + 0.5F) * + (float)2048) - 0.5F)))) & snapMask; + vMid_fx = + (((int) + ((((vMid->attrib[0][0] + + 0.5F) * (float)2048) >= + 0.0F) ? (((vMid->attrib[0][0] + 0.5F) * + (float)2048) + + 0.5F) : (((vMid->attrib[0][0] + 0.5F) * + (float)2048) - 0.5F)))) & snapMask; + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / (float)2048)); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / (float)2048)); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / (float)2048)); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / (float)2048)); + const float area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + oneOverArea = 1.0F / area; + if (eBot.lines > 0) { + eBot.fx0 = vMin_fx; + } + int scan_from_left_to_right; + struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0]; + const struct gl_texture_object *obj = + ctx->Texture.Unit[0].CurrentTex[8]; + const struct gl_texture_image *texImg = obj->Image[0][obj->BaseLevel]; + const float twidth = (float)texImg->Width; + const int twidth_log2 = texImg->WidthLog2; + const unsigned char *texture = (const unsigned char *)texImg->Data; + const int smask = texImg->Width - 1; + const int tmask = texImg->Height - 1; + if (!rb || !texture) { + return; + } + float eMaj_ds = + (vMax->attrib[4][0] - + vMin->attrib[4][0]) * twidth; + float eBot_ds = + (vMid->attrib[4][0] - + vMin->attrib[4][0]) * twidth; + span.attrStepX[4][0] = + oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); + span.intTexStep[0] = + (((int) + ((((span.attrStepX[4][0]) * (float)2048) >= + 0.0F) ? (((span.attrStepX[4][0]) * + (float)2048) + + 0.5F) : (((span.attrStepX[4][0]) * + (float)2048) - 0.5F)))); + int subTriangle; + int fxLeftEdge = 0; + int fxRightEdge = 0; + int sLeft = 0; + for (subTriangle = 0; subTriangle <= 1; subTriangle++) { + EdgeT *eRight; + int lines; + if (subTriangle == 0) { + if (scan_from_left_to_right) { + eRight = &eBot; + lines = eRight->lines; + } +else { + eRight = &eMaj; + } + } else { + if (scan_from_left_to_right) +{ + eRight = &eTop; + } + fxRightEdge = eRight->fsx - 1; + } + while (lines > 0) { + const int right = fxRightEdge >> 11; + span.x = fxLeftEdge >> 11; + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + span.intTex[0] = sLeft; + if (span.end > 0 && span.y >= 0) { + unsigned int i; + unsigned char rgb[16384][3]; + for (i = 0; i < span.end; i++) { + int s = + ((span.intTex[0]) >> 11) & smask; + int t = + ((span.intTex[1]) >> 11) & tmask; + int pos = (t << twidth_log2) + s; + rgb[i][0] = texture[pos + 2]; + span.intTex[0] += span.intTexStep[0]; + } + rb->PutRowRGB(ctx, rb, span.end, span.x, span.y, + rgb); + } + } + } +} + +void *foo() +{ + return simple_textured_triangle; +} diff --git a/394889/s_triangle.i.12 b/394889/s_triangle.i.12 new file mode 100644 index 0000000..8dc8052 --- /dev/null +++ b/394889/s_triangle.i.12 @@ -0,0 +1,207 @@ +typedef union { + float f; + int i; +} fi_type; +static __inline__ int IS_INF_OR_NAN(float x) +{ + fi_type tmp; + tmp.f = x; + return !(int)((unsigned int)((tmp.i & 0x7fffffff) - 0x7f800000) >> 31); +} + +struct gl_texture_image { + unsigned int Width; + unsigned int Height; + unsigned int WidthLog2; + void *Data; +}; +struct gl_texture_object { + int BaseLevel; + struct gl_texture_image *Image[6][15]; +}; +struct gl_texture_unit { + struct gl_texture_object *CurrentTex[9]; +}; +struct gl_texture_attrib { + struct gl_texture_unit Unit[(16 + 16)]; +}; +struct gl_renderbuffer { + void (*PutRowRGB) (); +}; +struct gl_framebuffer { + struct gl_renderbuffer *_ColorDrawBuffers[8]; +}; +struct gl_context { + struct gl_framebuffer *DrawBuffer; + struct gl_texture_attrib Texture; +}; +typedef struct { + float attrib[30][4]; +} SWvertex; +typedef struct sw_span { + int x, y; + unsigned int end; + float attrStepX[30][4]; + int intTex[2], intTexStep[2]; +} SWspan; +static void simple_textured_triangle(const SWvertex * v1) +{ + struct gl_context *ctx; + const SWvertex * v0; + const SWvertex * v2; + typedef struct { + float dx; + float dy; + int fsx; + int fx0; + int lines; + } EdgeT; + EdgeT eMaj; + EdgeT eTop; + EdgeT eBot; + float oneOverArea; + const SWvertex *vMin; + const SWvertex *vMid; + const SWvertex *vMax; + const int snapMask = ~127; + int vMin_fx; + int vMin_fy; + int vMid_fx; + int vMid_fy; + int vMax_fx; + int vMax_fy; + SWspan span; + const int fy0 = + (((int) + ((((v0->attrib[0][1] - + 0.5F) * (float)2048) >= + 0.0F) ? (((v0->attrib[0][1] - 0.5F) * + (float)2048) + + 0.5F) : (((v0->attrib[0][1] - 0.5F) * + (float)2048) - 0.5F)))) & snapMask; + const int fy1 = + (((int) + ((((v1->attrib[0][1] - + 0.5F) * (float)2048) >= + 0.0F) ? (((v1->attrib[0][1] - 0.5F) * + (float)2048) + + 0.5F) : (((v1->attrib[0][1] - 0.5F) * + (float)2048) - 0.5F)))) & snapMask; + const int fy2 = + (((int) + ((((v2->attrib[0][1] - + 0.5F) * (float)2048) >= + 0.0F) ? (((v2->attrib[0][1] - 0.5F) * + (float)2048) + + 0.5F) : (((v2->attrib[0][1] - 0.5F) * + (float)2048) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + vMin = v0; + vMax = v1; + vMin_fy = fy0; + } + } + vMin_fx = + (((int) + ((((vMin->attrib[0][0] + + 0.5F) * (float)2048) >= + 0.0F) ? (((vMin->attrib[0][0] + 0.5F) * + (float)2048) + + 0.5F) : (((vMin->attrib[0][0] + 0.5F) * + (float)2048) - 0.5F)))) & snapMask; + vMid_fx = + (((int) + ((((vMid->attrib[0][0] + + 0.5F) * (float)2048) >= + 0.0F) ? (((vMid->attrib[0][0] + 0.5F) * + (float)2048) + + 0.5F) : (((vMid->attrib[0][0] + 0.5F) * + (float)2048) - 0.5F)))) & snapMask; + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / (float)2048)); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / (float)2048)); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / (float)2048)); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / (float)2048)); + const float area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area)) + return; + oneOverArea = 1.0F / area; + eBot.fx0 = vMin_fx; + int scan_from_left_to_right; + struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0]; + const struct gl_texture_object *obj; + const struct gl_texture_image *texImg; + const float twidth; + const int twidth_log2; + const unsigned char *texture = texImg->Data; + const int smask = texImg->Width; + const int tmask = texImg->Height; + float eMaj_ds = + (vMax->attrib[4][0] - + vMin->attrib[4][0]) * twidth; + float eBot_ds; + span.attrStepX[4][0] = + oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); + span.intTexStep[0] = + (((int) + ((((span.attrStepX[4][0]) * (float)2048) >= + 0.0F) ? (((span.attrStepX[4][0]) * + (float)2048) + + 0.5F) : (((span.attrStepX[4][0]) * + (float)2048) - 0.5F)))); + int subTriangle; + int fxLeftEdge = 0; + int fxRightEdge = 0; + int sLeft = 0; + for (subTriangle = 0; subTriangle <= 1; subTriangle++) { + EdgeT *eRight; + int lines; + if (subTriangle == 0) { + if (scan_from_left_to_right) { + eRight = &eBot; + lines = eRight->lines; + } +else { + eRight = &eMaj; + } + } else { + if (scan_from_left_to_right) +{ + eRight = &eTop; + } + fxRightEdge = eRight->fsx - 1; + } + while (lines > 0) +{ + const int right = fxRightEdge >> 11; + span.x = fxLeftEdge >> 11; + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + span.intTex[0] = sLeft; + if (span.end > 0 && span.y >= 0) +{ + unsigned int i; + unsigned char rgb[16384][3]; + for (i = 0; i < span.end; i++) +{ + int s = ((span.intTex[0]) >> 11) & smask; + int t = + ((span.intTex[1]) >> 11) & tmask; + int pos = (t << twidth_log2) + s; + rgb[i][0] = texture[pos + 2]; + span.intTex[0] += span.intTexStep[0]; + } + rb->PutRowRGB( +rgb +); + } + } + } +} + +void *foo() +{ + return simple_textured_triangle; +} diff --git a/394889/s_triangle.i.13 b/394889/s_triangle.i.13 new file mode 100644 index 0000000..289f82d --- /dev/null +++ b/394889/s_triangle.i.13 @@ -0,0 +1,174 @@ +typedef union { + float f; + int i; +} fi_type; +static __inline__ int IS_INF_OR_NAN(float x) +{ + fi_type tmp; + tmp.f = x; + return !(int)((unsigned int)((tmp.i & 0x7fffffff) - 0x7f800000) >> 31); +} + +struct gl_texture_image { + unsigned int Width; + unsigned int Height; + void *Data; +}; +struct gl_renderbuffer { + void (*PutRowRGB) (); +}; +struct gl_framebuffer { + struct gl_renderbuffer *_ColorDrawBuffers[8]; +}; +struct gl_context { + struct gl_framebuffer *DrawBuffer; +}; +typedef struct { + float attrib[30][4]; +} SWvertex; +typedef struct sw_span { + int x, y; + unsigned int end; + float attrStepX[30][4]; + int intTex[2], intTexStep[2]; +} SWspan; +static void simple_textured_triangle(const SWvertex * v1) +{ + struct gl_context *ctx; + const SWvertex *v0; + const SWvertex *v2; + typedef struct { + float dx; + float dy; + int fsx; + int fx0; + int lines; + } EdgeT; + EdgeT eMaj; + EdgeT eTop; + EdgeT eBot; + float oneOverArea; + const SWvertex *vMin; + const SWvertex *vMid; + const SWvertex *vMax; + const int snapMask = ~127; + int vMin_fx; + int vMin_fy; + int vMid_fx; + int vMid_fy; + int vMax_fx; + int vMax_fy; + SWspan span; + const int fy0 = + (((int) + ((((v0->attrib[0][1] - 0) * (float)2048) >= + 0) ? (((v0->attrib[0][1] - 0) * (float)2048) + + 0) : (((v0->attrib[0][1] - 0) * (float)2048) - + 0)))); + const int fy1 = + (((int) + ((((v1->attrib[0][1] - 0) * (float)2048) >= + 0.0F) ? (((v1->attrib[0][1] - 0) * (float)2048) + + 0) : (((v1->attrib[0][1] - 0) * (float)2048) - + 0)))); + const int fy2 = + (((int) + ((((v2->attrib[0][1] - 0) * (float)2048) >= + 0.0F) ? (((v2->attrib[0][1] - 0) * (float)2048) + + 0) : (((v2->attrib[0][1] - 0) * (float)2048) - + 0)))); + if (fy1 <= fy2) +{ + vMin = v0; + vMax = v1; + vMin_fy = fy0; + } + vMin_fx = + (((int) + ((((vMin->attrib[0][0] + 0.5F) * (float)2048) >= + 0.0F) ? (((vMin->attrib[0][0] + 0.5F) * (float)2048) + + 0.5F) : (((vMin->attrib[0][0] + 0.5F) * (float)2048) - + 0.5F)))) & snapMask; + vMid_fx = + (((int) + ((((vMid->attrib[0][0] + 0.5F) * (float)2048) >= + 0.0F) ? (((vMid->attrib[0][0] + 0.5F) * (float)2048) + + 0.5F) : (((vMid->attrib[0][0] + 0.5F) * (float)2048) - + 0.5F)))) & snapMask; + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / (float)2048)); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / (float)2048)); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / (float)2048)); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / (float)2048)); + const float area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area)) + return; + oneOverArea = 1.0F / area; + eBot.fx0 = vMin_fx; + int scan_from_left_to_right; + struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0]; + const struct gl_texture_image *texImg; + const float twidth; + const int twidth_log2; + const unsigned char *texture = texImg->Data; + const int smask = texImg->Width; + const int tmask = texImg->Height; + float eMaj_ds = (vMax->attrib[4][0] - vMin->attrib[4][0]) * twidth; + float eBot_ds; + span.attrStepX[4][0] = + oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); + span.intTexStep[0] = + (((int) + ((((span.attrStepX[4][0]) * (float)2048) >= + 0.0F) ? (((span.attrStepX[4][0]) * (float)2048) + + 0.5F) : (((span.attrStepX[4][0]) * (float)2048) - + 0.5F)))); + int subTriangle; + int fxLeftEdge = 0; + int fxRightEdge = 0; + int sLeft = 0; + for (subTriangle = 0; subTriangle <= 1; subTriangle++) { + EdgeT *eRight; + int lines; + if (subTriangle == 0) { + if (scan_from_left_to_right) { + eRight = &eBot; + lines = eRight->lines; + } else { + eRight = &eMaj; + } + } else { + if (scan_from_left_to_right) { + eRight = &eTop; + } + fxRightEdge = eRight->fsx - 1; + } + while (lines > 0) { + const int right = fxRightEdge >> 11; + span.x = fxLeftEdge >> 11; + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + span.intTex[0] = sLeft; + if (span.end > 0 && span.y >= 0) { + unsigned int i; + unsigned char rgb[16384][3]; + for (i = 0; i < span.end; i++) { + int s = + ((span.intTex[0]) >> 11) & smask; + int t = + ((span.intTex[1]) >> 11) & tmask; + int pos = (t << twidth_log2) + s; + rgb[i][0] = texture[pos + 2]; + span.intTex[0] += span.intTexStep[0]; + } + rb->PutRowRGB(rgb); + } + } + } +} + +void *foo() +{ + return simple_textured_triangle; +} diff --git a/394889/s_triangle.i.14 b/394889/s_triangle.i.14 new file mode 100644 index 0000000..e9be740 --- /dev/null +++ b/394889/s_triangle.i.14 @@ -0,0 +1,146 @@ +typedef union { + float f; + int i; +} fi_type; +static __inline__ int IS_INF_OR_NAN(float x) +{ + fi_type tmp; + tmp.f = x; + return !(int)((unsigned int)((tmp.i & 0x7fffffff) - 0x7f800000) >> 31); +} + +struct gl_texture_image { + unsigned int Width; + unsigned int Height; + void *Data; +}; +struct gl_renderbuffer { + void (*PutRowRGB) (); +}; +typedef struct { + float attrib[30][4]; +} SWvertex; +typedef struct sw_span { + int x; int y; + unsigned int end; + float attrStepX[30][4]; + int intTex[2]; int intTexStep[2]; +} SWspan; +static void simple_textured_triangle(const SWvertex * v1) +{ + const SWvertex *v0; + const SWvertex *v2; + typedef struct { + float dx; + float dy; + int fsx; + int fx0; + int lines; + } EdgeT; + EdgeT eMaj; + EdgeT eTop; + EdgeT eBot; + float oneOverArea; + const SWvertex *vMin; + const SWvertex *vMid; + const SWvertex *vMax; + int vMin_fx; + int vMin_fy; + int vMid_fx; + int vMid_fy; + int vMax_fx; + int vMax_fy; + SWspan span; + const int fy0 = v0->attrib[0][1]; + const int fy1 = v1->attrib[0][1]; + const int fy2 = v2->attrib[0][1]; + if (fy1 <= fy2) +{ + vMin = v0; + vMax = v1; + vMin_fy = fy0; + } + vMin_fx = vMin->attrib[0][0]; + vMid_fx = + (((int) + ((vMid->attrib[0][0] >= + 0) ? ((vMid->attrib[0][0] * (float)2048 +) + + 0.5F) : (((vMid->attrib[0][0]) * (float)2048) - + 0.5F)))); + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / (float)2048)); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / (float)2048)); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / (float)2048)); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / (float)2048)); + const float area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area)) + return; + oneOverArea = 1.0F / area; + eBot.fx0 = vMin_fx; + int scan_from_left_to_right; + struct gl_renderbuffer *rb; + const struct gl_texture_image *texImg; + const float twidth; + const int twidth_log2; + const unsigned char *texture = texImg->Data; + const int smask = texImg->Width; + const int tmask = texImg->Height; + float eMaj_ds = (vMax->attrib[4][0] - vMin->attrib[4][0]) * twidth; + float eBot_ds; + span.attrStepX[4][0] = + oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); + span.intTexStep[0] = + (((int) + ((((span.attrStepX[4][0]) * (float)2048) >= + 0.0F) ? (((span.attrStepX[4][0]) * (float)2048) + + 0.5F) : (((span.attrStepX[4][0]) * (float)2048) - + 0.5F)))); + int subTriangle; + int fxLeftEdge = 0; + int fxRightEdge = 0; + int sLeft = 0; + for (subTriangle = 0; subTriangle <= 1; subTriangle++) { + EdgeT *eRight; + int lines; + if (subTriangle == 0) { + if (scan_from_left_to_right) { + eRight = &eBot; + lines = eRight->lines; + } else { + eRight = &eMaj; + } + } else { + if (scan_from_left_to_right) { + eRight = &eTop; + } + fxRightEdge = eRight->fsx ; + } + while (lines > 0) { + const int right = fxRightEdge ; + span.x = 0; + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + span.intTex[0] = 0; + if (span.end > 0 && span.y >= 0) { + unsigned int i; + unsigned char rgb[16384][3]; + for (i = 0; i < span.end; i++) +{ + int s = span.intTex[0]; + int t = span.intTex[1]; + int pos = (t << twidth_log2) + s; + rgb[i][0] = texture[pos ]; + span.intTex[0] += span.intTexStep[0]; + } + rb->PutRowRGB(rgb); + } + } + } +} + +void *foo() +{ + return simple_textured_triangle; +} diff --git a/394889/s_triangle.i.15 b/394889/s_triangle.i.15 new file mode 100644 index 0000000..d71357b --- /dev/null +++ b/394889/s_triangle.i.15 @@ -0,0 +1,122 @@ +static __inline__ int IS_INF_OR_NAN(float x) +{ + union { + float f; + int i; + } tmp; + tmp.f = x; + return tmp.i; +} + +typedef struct { + float **attrib; +} SWvertex; +typedef struct sw_span { + int x; + int y; + int end; + float attrStepX[30][4]; + int intTex[2]; + int intTexStep[2]; +} SWspan; +static void simple_textured_triangle( SWvertex * v1) +{ + SWvertex *v0; + SWvertex *v2; + typedef struct { + float dx; + float dy; + int fsx; + int fx0; + int lines; + } EdgeT; + EdgeT eMaj; + EdgeT eTop; + EdgeT eBot; + float oneOverArea; + SWvertex *vMin; + SWvertex *vMid; + SWvertex *vMax; + int vMin_fx; + int vMin_fy; + int vMid_fx; + int vMid_fy; + int vMax_fx; + int vMax_fy; + SWspan span; + int fy0 = v0->attrib[0][1]; + int fy1 = v1->attrib[0][1]; + int fy2 = v2->attrib[0][1]; + if (fy1 <= fy2) { + vMin = v0; + vMax = v1; + vMin_fy = fy0; + } + vMin_fx = vMin->attrib[0][0]; + vMid_fx = (int) + (vMid->attrib[4][0] ? +((vMid->attrib[4][0] * (float)2048) + 0.5F) : +((vMid->attrib[4][0] * (float)2048) - 0.5F)); + eMaj.dx = (vMax_fx - vMin_fx) * (1.0F / (float)2048); + eMaj.dy = (vMax_fy - vMin_fy) * (1.0F / (float)2048); + eTop.dx = (vMax_fx - vMid_fx) * (1.0F / (float)2048); + eBot.dy = (vMid_fy - vMin_fy) * (1.0F / (float)2048); + float area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area)) + return; + oneOverArea = 1.0F / area; + eBot.fx0 = vMin_fx; + int scan_from_left_to_right; + void (*PutRowRGB)(); + char *texture; + float eMaj_ds = (vMax->attrib[4][0] - vMin->attrib[4][0]); + float eBot_ds; + span.attrStepX[4][0] = + oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); + span.intTexStep[0] = + (int) + ((span.attrStepX[4][0] >= + 0.0F) ? span.attrStepX[4][0] : +(span.attrStepX[4][0] * (float)2048) - 0.5F); + int subTriangle; + int fxRightEdge = 0; + for (subTriangle = 0; subTriangle <= 1; subTriangle++) { + EdgeT *eRight; + int lines; + if (subTriangle == 0) { + if (scan_from_left_to_right) { + eRight = &eBot; + lines = eRight->lines; + } else { + eRight = &eMaj; + } + } else { + if (scan_from_left_to_right) { + eRight = &eTop; + } + fxRightEdge = eRight->fsx; + } + while (lines > 0) { + span.x = 0; + if (fxRightEdge <= span.x) + span.end = 0; + else + span.end = fxRightEdge - span.x; + span.intTex[0] = 0; + if (span.end > 0 && span.y >= 0) { + int i; + char *rgb; + for (i = 0; i < span.end; i++) { + rgb[i] = texture[span.intTex[0]]; + span.intTex[0] += span.intTexStep[0]; + } + PutRowRGB(rgb); + } + } + } +} + +void *foo() +{ + return simple_textured_triangle; +} diff --git a/394889/s_triangle.i.16 b/394889/s_triangle.i.16 new file mode 100644 index 0000000..9c89fc7 --- /dev/null +++ b/394889/s_triangle.i.16 @@ -0,0 +1,119 @@ +static __inline__ int IS_INF_OR_NAN(float x) +{ + union { + float f; + int i; + } tmp; + tmp.f = x; + return tmp.i; +} + +typedef struct sw_span { + int x; + int y; + int end; + float **attrStepX; + int intTex[1]; + int intTexStep[2]; +} SWspan; +static void simple_textured_triangle( float * * v1) +{ + float * *v0; + float * *v2; + typedef struct { + float dx; + float dy; + int fsx; + int fx0; + int lines; + } EdgeT; + EdgeT eMaj; + EdgeT eTop; + EdgeT eBot; + float oneOverArea; + float * *vMin; + float * *vMid; + float * *vMax; + int vMin_fx; + int vMin_fy; + int vMid_fx; + int vMid_fy; + int vMax_fx; + int vMax_fy; + SWspan span; + int fy0 = v0[0][1]; + int fy1 = v1[0][1]; + int fy2 = v2[0][1]; + if (fy1 <= fy2) { + vMin = v0; + vMax = v1; + vMin_fy = fy0; + } + vMin_fx = vMin[0][0]; + vMid_fx = (int) + (vMid[4][0] ? +((vMid[4][0] * (float)2048) + 0.5F) : +((vMid[4][0] * (float)2048) - 0.5F)); + eMaj.dx = (vMax_fx - vMin_fx) * (1.0F / (float)2048); + eMaj.dy = (vMax_fy - vMin_fy) * (1.0F / (float)2048); + eTop.dx = (vMax_fx - vMid_fx) * (1.0F / (float)2048); + eBot.dy = (vMid_fy - vMin_fy) * (1.0F / (float)2048); + float area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area)) + return; + oneOverArea = 1.0F / area; + eBot.fx0 = vMin_fx; + int scan_from_left_to_right; + void (*PutRowRGB)(); + char *texture; + float eMaj_ds = (vMax[4][0] - vMin[4][0]); + float eBot_ds; + span.attrStepX[4][0] = + oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); + span.intTexStep[0] = + (int) + ((span.attrStepX[4][0] >= + 0.0F) ? span.attrStepX[4][0] : +(span.attrStepX[4][0] * (float)2048) - 0.5F); + int subTriangle; + int fxRightEdge = 0; + for (subTriangle = 0; subTriangle <= 1; subTriangle++) { + EdgeT *eRight; + int lines; + if (subTriangle == 0) { + if (scan_from_left_to_right) { + eRight = &eBot; + lines = eRight->lines; + } else { + eRight = &eMaj; + } + } else { + if (scan_from_left_to_right) { + eRight = &eTop; + } + fxRightEdge = eRight->fsx; + } + while (lines > 0) { + span.x = 0; + if (fxRightEdge <= span.x) + span.end = 0; + else + span.end = fxRightEdge - span.x; + span.intTex[0] = 0; + if (span.end > 0 && span.y >= 0) { + int i; + char *rgb; + for (i = 0; i < span.end; i++) { + rgb[i] = texture[span.intTex[0]]; + span.intTex[0] += span.intTexStep[0]; + } + PutRowRGB(rgb); + } + } + } +} + +void *foo() +{ + return simple_textured_triangle; +} diff --git a/394889/s_triangle.i.17 b/394889/s_triangle.i.17 new file mode 100644 index 0000000..10bf6ab --- /dev/null +++ b/394889/s_triangle.i.17 @@ -0,0 +1,104 @@ +static __inline__ int IS_INF_OR_NAN(float x) +{ + union { + float f; + int i; + } tmp; + tmp.f = x; + return tmp.i; +} + +static void simple_textured_triangle( float ** v1) +{ + float **v0; + float **v2; + typedef struct { + float dx; + float dy; + int fsx; + int fx0; + int lines; + } EdgeT; + EdgeT eMaj; + EdgeT eTop; + EdgeT eBot; + float oneOverArea; + float **vMin; + float **vMid; + float **vMax; + int vMin_fx; + int vMin_fy; + int vMid_fx; + int vMid_fy; + int vMax_fx; + int vMax_fy; + if (v1[0][1] <= v2[0][1]) { + vMin = v0; + vMax = v1; + vMin_fy = v0[0][1]; + } + vMin_fx = vMin[0][0]; + vMid_fx = + vMid[4][0] ? + ((vMid[4][0] * (float)2048) + 0.5F) : + ((vMid[4][0] * (float)2048) - 0.5F); + eMaj.dx = (vMax_fx - vMin_fx) * (1.0F / (float)2048); + eMaj.dy = (vMax_fy - vMin_fy) * (1.0F / (float)2048); + eTop.dx = (vMax_fx - vMid_fx) * (1.0F / (float)2048); + eBot.dy = (vMid_fy - vMin_fy) * (1.0F / (float)2048); + float area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area)) + return; + oneOverArea = 1.0F / area; + eBot.fx0 = vMin_fx; + int scan_from_left_to_right; + void (*PutRowRGB)(); + float eMaj_ds = (vMax[4][0] - vMin[4][0]); + float eBot_ds; + float stepx = + oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); + int step = (stepx >= 0.0F) ? stepx : (stepx * (float)2048) - 0.5F; + int subTriangle; + int fxRightEdge = 0; + for (subTriangle = 0; subTriangle <= 1; subTriangle++) { + EdgeT *eRight; + int lines; + if (subTriangle == 0) { + if (scan_from_left_to_right) { + eRight = &eBot; + lines = eRight->lines; + } else { + eRight = &eMaj; + } + } else { + if (scan_from_left_to_right) { + eRight = &eTop; + } + fxRightEdge = eRight->fsx; + } + while (lines > 0) { + int end; int x; int y; + x = 0; + if (fxRightEdge <= x) + end = 0; + else + end = fxRightEdge - x; + if (end > 0 && y >= 0) { + int i; + char *rgb; + for (i = 0; i < end; i++) { + int it; + char *texture; + rgb[i] = texture[it]; + it += step; + } + PutRowRGB(rgb); + } + } + } +} + +void *foo() +{ + return simple_textured_triangle; +} diff --git a/394889/s_triangle.i.2 b/394889/s_triangle.i.2 new file mode 100644 index 0000000..bda2e14 --- /dev/null +++ b/394889/s_triangle.i.2 @@ -0,0 +1,428 @@ +typedef unsigned int GLenum; +typedef unsigned char GLboolean; +typedef unsigned int GLbitfield; +typedef void GLvoid; +typedef int GLint; +typedef unsigned char GLubyte; +typedef unsigned int GLuint; +typedef float GLfloat; +typedef int GLfixed; +typedef union { + GLfloat f; + GLint i; +} fi_type; +static __inline__ int IS_INF_OR_NAN(float x) +{ + fi_type tmp; + tmp.f = x; + return !(int)((unsigned int)((tmp.i & 0x7fffffff) - 0x7f800000) >> 31); +} + +typedef enum { + MESA_FORMAT_NONE = + 0, MESA_FORMAT_RGBA8888, MESA_FORMAT_RGBA8888_REV, + MESA_FORMAT_ARGB8888, MESA_FORMAT_ARGB8888_REV, + MESA_FORMAT_XRGB8888, MESA_FORMAT_XRGB8888_REV, MESA_FORMAT_RGB888, + MESA_FORMAT_BGR888, MESA_FORMAT_RGB565, MESA_FORMAT_RGB565_REV, + MESA_FORMAT_ARGB4444, MESA_FORMAT_ARGB4444_REV, + MESA_FORMAT_RGBA5551, MESA_FORMAT_ARGB1555, + MESA_FORMAT_ARGB1555_REV, MESA_FORMAT_AL44, MESA_FORMAT_AL88, + MESA_FORMAT_AL88_REV, MESA_FORMAT_AL1616, MESA_FORMAT_AL1616_REV, + MESA_FORMAT_RGB332, MESA_FORMAT_A8, MESA_FORMAT_A16, MESA_FORMAT_L8, + MESA_FORMAT_L16, MESA_FORMAT_I8, MESA_FORMAT_I16, MESA_FORMAT_CI8, + MESA_FORMAT_YCBCR, MESA_FORMAT_YCBCR_REV, MESA_FORMAT_R8, + MESA_FORMAT_RG88, MESA_FORMAT_RG88_REV, MESA_FORMAT_R16, + MESA_FORMAT_RG1616, MESA_FORMAT_RG1616_REV, MESA_FORMAT_ARGB2101010, + MESA_FORMAT_Z24_S8, MESA_FORMAT_S8_Z24, MESA_FORMAT_Z16, + MESA_FORMAT_X8_Z24, MESA_FORMAT_Z24_X8, MESA_FORMAT_Z32, + MESA_FORMAT_S8, MESA_FORMAT_SRGB8, MESA_FORMAT_SRGBA8, + MESA_FORMAT_SARGB8, MESA_FORMAT_SL8, MESA_FORMAT_SLA8, + MESA_FORMAT_SRGB_DXT1, MESA_FORMAT_SRGBA_DXT1, + MESA_FORMAT_SRGBA_DXT3, MESA_FORMAT_SRGBA_DXT5, + MESA_FORMAT_RGB_FXT1, MESA_FORMAT_RGBA_FXT1, MESA_FORMAT_RGB_DXT1, + MESA_FORMAT_RGBA_DXT1, MESA_FORMAT_RGBA_DXT3, MESA_FORMAT_RGBA_DXT5, + MESA_FORMAT_RGBA_FLOAT32, MESA_FORMAT_RGBA_FLOAT16, + MESA_FORMAT_RGB_FLOAT32, MESA_FORMAT_RGB_FLOAT16, + MESA_FORMAT_ALPHA_FLOAT32, MESA_FORMAT_ALPHA_FLOAT16, + MESA_FORMAT_LUMINANCE_FLOAT32, MESA_FORMAT_LUMINANCE_FLOAT16, + MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32, + MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16, MESA_FORMAT_INTENSITY_FLOAT32, + MESA_FORMAT_INTENSITY_FLOAT16, MESA_FORMAT_R_FLOAT32, + MESA_FORMAT_R_FLOAT16, MESA_FORMAT_RG_FLOAT32, + MESA_FORMAT_RG_FLOAT16, MESA_FORMAT_RGBA_INT8, + MESA_FORMAT_RGBA_INT16, MESA_FORMAT_RGBA_INT32, + MESA_FORMAT_RGBA_UINT8, MESA_FORMAT_RGBA_UINT16, + MESA_FORMAT_RGBA_UINT32, MESA_FORMAT_DUDV8, MESA_FORMAT_SIGNED_R8, + MESA_FORMAT_SIGNED_RG88_REV, MESA_FORMAT_SIGNED_RGBX8888, + MESA_FORMAT_SIGNED_RGBA8888, MESA_FORMAT_SIGNED_RGBA8888_REV, + MESA_FORMAT_SIGNED_R16, MESA_FORMAT_SIGNED_GR1616, + MESA_FORMAT_SIGNED_RGB_16, MESA_FORMAT_SIGNED_RGBA_16, + MESA_FORMAT_RGBA_16, MESA_FORMAT_RED_RGTC1, + MESA_FORMAT_SIGNED_RED_RGTC1, MESA_FORMAT_RG_RGTC2, + MESA_FORMAT_SIGNED_RG_RGTC2, MESA_FORMAT_L_LATC1, + MESA_FORMAT_SIGNED_L_LATC1, MESA_FORMAT_LA_LATC2, + MESA_FORMAT_SIGNED_LA_LATC2, MESA_FORMAT_SIGNED_A8, + MESA_FORMAT_SIGNED_L8, MESA_FORMAT_SIGNED_AL88, + MESA_FORMAT_SIGNED_I8, MESA_FORMAT_SIGNED_A16, + MESA_FORMAT_SIGNED_L16, MESA_FORMAT_SIGNED_AL1616, + MESA_FORMAT_SIGNED_I16, MESA_FORMAT_RGB9_E5_FLOAT, + MESA_FORMAT_R11_G11_B10_FLOAT, MESA_FORMAT_COUNT +} gl_format; +typedef enum { + FRAG_ATTRIB_WPOS = 0, FRAG_ATTRIB_COL0 = 1, FRAG_ATTRIB_COL1 = + 2, FRAG_ATTRIB_FOGC = 3, FRAG_ATTRIB_TEX0 = 4, FRAG_ATTRIB_TEX1 = + 5, FRAG_ATTRIB_TEX2 = 6, FRAG_ATTRIB_TEX3 = 7, FRAG_ATTRIB_TEX4 = + 8, FRAG_ATTRIB_TEX5 = 9, FRAG_ATTRIB_TEX6 = 10, FRAG_ATTRIB_TEX7 = + 11, FRAG_ATTRIB_FACE = 12, FRAG_ATTRIB_PNTC = 13, FRAG_ATTRIB_VAR0 = + 14, FRAG_ATTRIB_MAX = (FRAG_ATTRIB_VAR0 + 16) +} gl_frag_result; +struct gl_config { + GLint depthBits; +}; +struct gl_lightmodel { + GLenum ColorControl; +}; +struct gl_depthbuffer_attrib { + GLenum Func; + GLboolean Mask; +}; +struct gl_hint_attrib { + GLenum PerspectiveCorrection; +}; +struct gl_light_attrib { + struct gl_lightmodel Model; +}; +struct gl_polygon_attrib { + GLboolean StippleFlag; +}; +typedef enum { + TEXTURE_BUFFER_INDEX, TEXTURE_2D_ARRAY_INDEX, TEXTURE_1D_ARRAY_INDEX, + TEXTURE_CUBE_INDEX, TEXTURE_3D_INDEX, TEXTURE_RECT_INDEX, + TEXTURE_2D_INDEX, TEXTURE_1D_INDEX, NUM_TEXTURE_TARGETS +} gl_texture_index; +struct gl_texture_image { + GLuint Border; + GLuint Width; + GLuint Height; + GLuint WidthLog2; + GLboolean _IsPowerOfTwo; + GLuint RowStride; + GLvoid *Data; +}; +typedef enum { + FACE_POS_X = 0, FACE_NEG_X = 1, FACE_POS_Y = 2, FACE_NEG_Y = + 3, FACE_POS_Z = 4, FACE_NEG_Z = 5, MAX_FACES = 6 +} gl_face_index; +struct gl_sampler_object { + GLenum WrapS; + GLenum WrapT; +}; +struct gl_texture_object { + struct gl_sampler_object Sampler; + GLint BaseLevel; + GLuint _Swizzle; + struct gl_texture_image *Image[MAX_FACES][15]; +}; +struct gl_texture_unit { + GLbitfield _ReallyEnabled; + GLenum EnvMode; + struct gl_texture_object *CurrentTex[NUM_TEXTURE_TARGETS]; +}; +struct gl_texture_attrib { + struct gl_texture_unit Unit[(16 + 16)]; + GLbitfield _EnabledUnits; + GLbitfield _EnabledCoordUnits; +}; +struct gl_fragment_program_state { + struct gl_fragment_program *_Current; +}; +struct gl_ati_fragment_shader_state { + GLboolean _Enabled; +}; +struct gl_renderbuffer { + void (*PutRowRGB) (struct gl_context * ctx, struct gl_renderbuffer * rb, + GLuint count, GLint x, GLint y, const void *values, + const GLubyte * mask); +}; +struct gl_framebuffer { + struct gl_config Visual; + struct gl_renderbuffer *_ColorDrawBuffers[8]; +}; +struct gl_context { + struct gl_framebuffer *DrawBuffer; + struct gl_depthbuffer_attrib Depth; + struct gl_hint_attrib Hint; + struct gl_light_attrib Light; + struct gl_polygon_attrib Polygon; + struct gl_texture_attrib Texture; + struct gl_fragment_program_state FragmentProgram; + struct gl_ati_fragment_shader_state ATIFragmentShader; + GLenum RenderMode; +}; +typedef struct { + GLfloat attrib[FRAG_ATTRIB_MAX][4]; +} SWvertex; +typedef struct sw_span { + GLint x, y; + GLuint end; + GLfloat attrStepX[FRAG_ATTRIB_MAX][4]; + GLfixed intTex[2], intTexStep[2]; +} SWspan; +typedef void (*swrast_tri_func) (struct gl_context * ctx, const SWvertex *, + const SWvertex *, const SWvertex *); +typedef struct { + GLbitfield _RasterMask; + GLboolean _FogEnabled; + swrast_tri_func Triangle; +} SWcontext; +static __inline__ SWcontext *SWRAST_CONTEXT(struct gl_context *ctx) +{ +} + +static void simple_textured_triangle(struct gl_context *ctx, + const SWvertex * v0, const SWvertex * v1, + const SWvertex * v2) +{ + typedef struct { + GLfloat dx; + GLfloat dy; + GLfixed fsx; + GLfixed fx0; + GLint lines; + } EdgeT; + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + SWspan span; + { + const GLfixed fy0 = + (((int) + ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = + (((int) + ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = + (((int) + ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + vMin = v0; + vMax = v1; + vMin_fy = fy0; + } + } + vMin_fx = + (((int) + ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = + (((int) + ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + } + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float)(1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float)(1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float)(1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float)(1 << 11)))); + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + oneOverArea = 1.0F / area; + if (eBot.lines > 0) { + eBot.fx0 = vMin_fx; + } + GLint scan_from_left_to_right; + struct gl_renderbuffer *rb = + ctx->DrawBuffer->_ColorDrawBuffers[0]; + const struct gl_texture_object *obj = + ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; + const struct gl_texture_image *texImg = + obj->Image[0][obj->BaseLevel]; + const GLfloat twidth = (GLfloat) texImg->Width; + const GLint twidth_log2 = texImg->WidthLog2; + const GLubyte *texture = (const GLubyte *)texImg->Data; + const GLint smask = texImg->Width - 1; + const GLint tmask = texImg->Height - 1; + if (!rb || !texture) { + return; + } + { + GLfloat eMaj_ds = + (vMax->attrib[FRAG_ATTRIB_TEX0][0] - + vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + GLfloat eBot_ds = + (vMid->attrib[FRAG_ATTRIB_TEX0][0] - + vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + span.attrStepX[FRAG_ATTRIB_TEX0][0] = + oneOverArea * (eMaj_ds * eBot.dy - + eMaj.dy * eBot_ds); + span.intTexStep[0] = + (((int) + ((((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * + ((float)(1 << 11))) >= + 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) + * ((float)(1 << 11))) + + 0.5F) + : (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * + ((float)(1 << 11))) - 0.5F)))); + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed sLeft = 0, dsOuter = 0, dsInner; + for (subTriangle = 0; subTriangle <= 1; subTriangle++) { + EdgeT *eLeft, *eRight; + int lines; + if (subTriangle == 0) { + if (scan_from_left_to_right) { + eRight = &eBot; + lines = eRight->lines; + } else { + eRight = &eMaj; + } + } else { + if (scan_from_left_to_right) { + eRight = &eTop; + } + fxRightEdge = eRight->fsx - 1; + } + while (lines > 0) { + const GLint right = + ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + span.intTex[0] = sLeft; + if (span.end > 0 && span.y >= 0) { + { + GLuint i; + GLubyte rgb[16384][3]; + for (i = 0; + i < span.end; + i++) { + GLint s = + ((span. + intTex[0]) + >> 11) & + smask; + GLint t = + ((span. + intTex[1]) + >> 11) & + tmask; + GLint pos = + (t << + twidth_log2) + + s; + rgb[i][0] = + texture[pos + + + 2]; + span. + intTex[0] += + span. + intTexStep + [0]; + } + rb->PutRowRGB(ctx, rb, + span.end, + span.x, + span.y, + rgb, + ((void *) + 0)); + } + } + } + } + } + } +} + +void _swrast_choose_triangle(struct gl_context *ctx) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + if (ctx->RenderMode == 0x1C00) { + if (ctx->Texture._EnabledCoordUnits + || ctx->FragmentProgram._Current + || ctx->ATIFragmentShader._Enabled + || _mesa_need_secondary_color(ctx) || swrast->_FogEnabled) { + const struct gl_texture_object *texObj2D; + const struct gl_texture_image *texImg; + GLenum minFilter, magFilter, envMode; + gl_format format; + if (ctx->Texture._EnabledCoordUnits == 0x1 + && !ctx->FragmentProgram._Current + && !ctx->ATIFragmentShader._Enabled + && ctx->Texture._EnabledUnits == 0x1 + && ctx->Texture.Unit[0]._ReallyEnabled == + (1 << TEXTURE_2D_INDEX) + && texObj2D->Sampler.WrapS == 0x2901 + && texObj2D->Sampler.WrapT == 0x2901 + && texObj2D->_Swizzle == + (((0) << 0) | ((1) << 3) | ((2) << 6) | ((3) << 9)) + && texImg->_IsPowerOfTwo && texImg->Border == 0 + && texImg->Width == texImg->RowStride + && (format == MESA_FORMAT_RGB888 + || format == MESA_FORMAT_RGBA8888) + && minFilter == magFilter + && ctx->Light.Model.ColorControl == 0x81F9 + && !swrast->_FogEnabled + && ctx->Texture.Unit[0].EnvMode != 0x8570 + && ctx->Texture.Unit[0].EnvMode != 0x8503) { + if (ctx->Hint.PerspectiveCorrection == 0x1101) { + if (minFilter == 0x2600 + && format == MESA_FORMAT_RGB888 + && (envMode == 0x1E01 + || envMode == 0x2101) + && + ((swrast->_RasterMask == + (0x004 | 0x1000) + && ctx->Depth.Func == 0x0201 + && ctx->Depth.Mask == 0x1) + || swrast->_RasterMask == 0x1000) + && ctx->Polygon.StippleFlag == 0x0 + && ctx->DrawBuffer->Visual. + depthBits <= 16) { + if (swrast->_RasterMask == + (0x004 | 0x1000)) { + swrast->Triangle = + simple_textured_triangle; + } + } + } + } + } + } +} diff --git a/394889/s_triangle.i.3 b/394889/s_triangle.i.3 new file mode 100644 index 0000000..e3f2a35 --- /dev/null +++ b/394889/s_triangle.i.3 @@ -0,0 +1,382 @@ +typedef unsigned int GLenum; +typedef unsigned char GLboolean; +typedef unsigned int GLbitfield; +typedef void GLvoid; +typedef int GLint; +typedef unsigned char GLubyte; +typedef unsigned int GLuint; +typedef float GLfloat; +typedef int GLfixed; +typedef union { + GLfloat f; + GLint i; +} fi_type; +static __inline__ int IS_INF_OR_NAN(float x) +{ + fi_type tmp; + tmp.f = x; + return !(int)((unsigned int)((tmp.i & 0x7fffffff) - 0x7f800000) >> 31); +} + +typedef enum { +MESA_FORMAT_RGBA8888, +MESA_FORMAT_RGB888, +} gl_format; +typedef enum { + FRAG_ATTRIB_WPOS = 0, FRAG_ATTRIB_COL0 = 1, FRAG_ATTRIB_COL1 = + 2, FRAG_ATTRIB_FOGC = 3, FRAG_ATTRIB_TEX0 = 4, FRAG_ATTRIB_TEX1 = + 5, FRAG_ATTRIB_TEX2 = 6, FRAG_ATTRIB_TEX3 = 7, FRAG_ATTRIB_TEX4 = + 8, FRAG_ATTRIB_TEX5 = 9, FRAG_ATTRIB_TEX6 = 10, FRAG_ATTRIB_TEX7 = + 11, FRAG_ATTRIB_FACE = 12, FRAG_ATTRIB_PNTC = 13, FRAG_ATTRIB_VAR0 = + 14, FRAG_ATTRIB_MAX = (FRAG_ATTRIB_VAR0 + 16) +} gl_frag_result; +struct gl_config { + GLint depthBits; +}; +struct gl_lightmodel { + GLenum ColorControl; +}; +struct gl_depthbuffer_attrib { + GLenum Func; + GLboolean Mask; +}; +struct gl_hint_attrib { + GLenum PerspectiveCorrection; +}; +struct gl_light_attrib { + struct gl_lightmodel Model; +}; +struct gl_polygon_attrib { + GLboolean StippleFlag; +}; +typedef enum { + TEXTURE_BUFFER_INDEX, TEXTURE_2D_ARRAY_INDEX, TEXTURE_1D_ARRAY_INDEX, + TEXTURE_CUBE_INDEX, TEXTURE_3D_INDEX, TEXTURE_RECT_INDEX, + TEXTURE_2D_INDEX, TEXTURE_1D_INDEX, NUM_TEXTURE_TARGETS +} gl_texture_index; +struct gl_texture_image { + GLuint Border; + GLuint Width; + GLuint Height; + GLuint WidthLog2; + GLboolean _IsPowerOfTwo; + GLuint RowStride; + GLvoid *Data; +}; +typedef enum { + FACE_POS_X = 0, FACE_NEG_X = 1, FACE_POS_Y = 2, FACE_NEG_Y = + 3, FACE_POS_Z = 4, FACE_NEG_Z = 5, MAX_FACES = 6 +} gl_face_index; +struct gl_sampler_object { + GLenum WrapS; + GLenum WrapT; +}; +struct gl_texture_object { + struct gl_sampler_object Sampler; + GLint BaseLevel; + GLuint _Swizzle; + struct gl_texture_image *Image[MAX_FACES][15]; +}; +struct gl_texture_unit { + GLbitfield _ReallyEnabled; + GLenum EnvMode; + struct gl_texture_object *CurrentTex[NUM_TEXTURE_TARGETS]; +}; +struct gl_texture_attrib { + struct gl_texture_unit Unit[(16 + 16)]; + GLbitfield _EnabledUnits; + GLbitfield _EnabledCoordUnits; +}; +struct gl_fragment_program_state { + struct gl_fragment_program *_Current; +}; +struct gl_ati_fragment_shader_state { + GLboolean _Enabled; +}; +struct gl_renderbuffer { + void (*PutRowRGB) (struct gl_context * ctx, struct gl_renderbuffer * rb, + GLuint count, GLint x, GLint y, const void *values, + const GLubyte * mask); +}; +struct gl_framebuffer { + struct gl_config Visual; + struct gl_renderbuffer *_ColorDrawBuffers[8]; +}; +struct gl_context { + struct gl_framebuffer *DrawBuffer; + struct gl_depthbuffer_attrib Depth; + struct gl_hint_attrib Hint; + struct gl_light_attrib Light; + struct gl_polygon_attrib Polygon; + struct gl_texture_attrib Texture; + struct gl_fragment_program_state FragmentProgram; + struct gl_ati_fragment_shader_state ATIFragmentShader; + GLenum RenderMode; +}; +typedef struct { + GLfloat attrib[FRAG_ATTRIB_MAX][4]; +} SWvertex; +typedef struct sw_span { + GLint x, y; + GLuint end; + GLfloat attrStepX[FRAG_ATTRIB_MAX][4]; + GLfixed intTex[2], intTexStep[2]; +} SWspan; +typedef void (*swrast_tri_func) (struct gl_context * ctx, const SWvertex *, + const SWvertex *, const SWvertex *); +typedef struct { + GLbitfield _RasterMask; + GLboolean _FogEnabled; + swrast_tri_func Triangle; +} SWcontext; +static __inline__ SWcontext *SWRAST_CONTEXT(struct gl_context *ctx) +{ +} + +static void simple_textured_triangle(struct gl_context *ctx, + const SWvertex * v0, const SWvertex * v1, + const SWvertex * v2) +{ + typedef struct { + GLfloat dx; + GLfloat dy; + GLfixed fsx; + GLfixed fx0; + GLint lines; + } EdgeT; + EdgeT eMaj, eTop, eBot; + GLfloat oneOverArea; + const SWvertex *vMin, *vMid, *vMax; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx, vMin_fy, vMid_fx, vMid_fy, vMax_fx, vMax_fy; + SWspan span; + { + const GLfixed fy0 = + (((int) + ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = + (((int) + ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = + (((int) + ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + vMin = v0; + vMax = v1; + vMin_fy = fy0; + } + } + vMin_fx = + (((int) + ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = + (((int) + ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + } + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float)(1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float)(1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float)(1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float)(1 << 11)))); + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + oneOverArea = 1.0F / area; + if (eBot.lines > 0) { + eBot.fx0 = vMin_fx; + } + GLint scan_from_left_to_right; + struct gl_renderbuffer *rb = + ctx->DrawBuffer->_ColorDrawBuffers[0]; + const struct gl_texture_object *obj = + ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; + const struct gl_texture_image *texImg = + obj->Image[0][obj->BaseLevel]; + const GLfloat twidth = (GLfloat) texImg->Width; + const GLint twidth_log2 = texImg->WidthLog2; + const GLubyte *texture = (const GLubyte *)texImg->Data; + const GLint smask = texImg->Width - 1; + const GLint tmask = texImg->Height - 1; + if (!rb || !texture) { + return; + } + { + GLfloat eMaj_ds = + (vMax->attrib[FRAG_ATTRIB_TEX0][0] - + vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + GLfloat eBot_ds = + (vMid->attrib[FRAG_ATTRIB_TEX0][0] - + vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + span.attrStepX[FRAG_ATTRIB_TEX0][0] = + oneOverArea * (eMaj_ds * eBot.dy - + eMaj.dy * eBot_ds); + span.intTexStep[0] = + (((int) + ((((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * + ((float)(1 << 11))) >= + 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) + * ((float)(1 << 11))) + + 0.5F) + : (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * + ((float)(1 << 11))) - 0.5F)))); + GLint subTriangle; + GLfixed fxLeftEdge = 0, fxRightEdge = 0; + GLfixed sLeft = 0, dsOuter = 0, dsInner; + for (subTriangle = 0; subTriangle <= 1; subTriangle++) { + EdgeT *eLeft, *eRight; + int lines; + if (subTriangle == 0) { + if (scan_from_left_to_right) { + eRight = &eBot; + lines = eRight->lines; + } else { + eRight = &eMaj; + } + } else { + if (scan_from_left_to_right) { + eRight = &eTop; + } + fxRightEdge = eRight->fsx - 1; + } + while (lines > 0) { + const GLint right = + ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + span.intTex[0] = sLeft; + if (span.end > 0 && span.y >= 0) { + { + GLuint i; + GLubyte rgb[16384][3]; + for (i = 0; + i < span.end; + i++) { + GLint s = + ((span. + intTex[0]) + >> 11) & + smask; + GLint t = + ((span. + intTex[1]) + >> 11) & + tmask; + GLint pos = + (t << + twidth_log2) + + s; + rgb[i][0] = + texture[pos + + + 2]; + span. + intTex[0] += + span. + intTexStep + [0]; + } + rb->PutRowRGB(ctx, rb, + span.end, + span.x, + span.y, + rgb, + ((void *) + 0)); + } + } + } + } + } + } +} + +void _swrast_choose_triangle(struct gl_context *ctx) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + if (ctx->RenderMode == 0x1C00) { + if (ctx->Texture._EnabledCoordUnits + || ctx->FragmentProgram._Current + || ctx->ATIFragmentShader._Enabled + || _mesa_need_secondary_color(ctx) || swrast->_FogEnabled) { + const struct gl_texture_object *texObj2D; + const struct gl_texture_image *texImg; + GLenum minFilter, magFilter, envMode; + gl_format format; + if (ctx->Texture._EnabledCoordUnits == 0x1 + && !ctx->FragmentProgram._Current + && !ctx->ATIFragmentShader._Enabled + && ctx->Texture._EnabledUnits == 0x1 + && ctx->Texture.Unit[0]._ReallyEnabled == + (1 << TEXTURE_2D_INDEX) + && texObj2D->Sampler.WrapS == 0x2901 + && texObj2D->Sampler.WrapT == 0x2901 + && texObj2D->_Swizzle == + (((0) << 0) | ((1) << 3) | ((2) << 6) | ((3) << 9)) + && texImg->_IsPowerOfTwo && texImg->Border == 0 + && texImg->Width == texImg->RowStride + && (format == MESA_FORMAT_RGB888 + || format == MESA_FORMAT_RGBA8888) + && minFilter == magFilter + && ctx->Light.Model.ColorControl == 0x81F9 + && !swrast->_FogEnabled + && ctx->Texture.Unit[0].EnvMode != 0x8570 + && ctx->Texture.Unit[0].EnvMode != 0x8503) { + if (ctx->Hint.PerspectiveCorrection == 0x1101) { + if (minFilter == 0x2600 + && format == MESA_FORMAT_RGB888 + && (envMode == 0x1E01 + || envMode == 0x2101) + && + ((swrast->_RasterMask == + (0x004 | 0x1000) + && ctx->Depth.Func == 0x0201 + && ctx->Depth.Mask == 0x1) + || swrast->_RasterMask == 0x1000) + && ctx->Polygon.StippleFlag == 0x0 + && ctx->DrawBuffer->Visual. + depthBits <= 16) { + if (swrast->_RasterMask == + (0x004 | 0x1000)) { + swrast->Triangle = + simple_textured_triangle; + } + } + } + } + } + } +} diff --git a/394889/s_triangle.i.4 b/394889/s_triangle.i.4 new file mode 100644 index 0000000..99f9638 --- /dev/null +++ b/394889/s_triangle.i.4 @@ -0,0 +1,383 @@ +typedef unsigned int GLenum; +typedef unsigned char GLboolean; +typedef unsigned int GLbitfield; +typedef void GLvoid; +typedef int GLint; +typedef unsigned char GLubyte; +typedef unsigned int GLuint; +typedef float GLfloat; +typedef int GLfixed; +typedef union { + GLfloat f; + GLint i; +} fi_type; +static __inline__ int IS_INF_OR_NAN(float x) +{ + fi_type tmp; + tmp.f = x; + return !(int)((unsigned int)((tmp.i & 0x7fffffff) - 0x7f800000) >> 31); +} + +typedef enum { +MESA_FORMAT_RGBA8888, +MESA_FORMAT_RGB888, +} gl_format; +typedef enum { + FRAG_ATTRIB_WPOS = 0, +FRAG_ATTRIB_COL0 = 1, FRAG_ATTRIB_COL1 = + 2, FRAG_ATTRIB_FOGC = 3, FRAG_ATTRIB_TEX0 = 4, FRAG_ATTRIB_TEX1 = + 5, FRAG_ATTRIB_TEX2 = 6, FRAG_ATTRIB_TEX3 = 7, FRAG_ATTRIB_TEX4 = + 8, FRAG_ATTRIB_TEX5 = 9, FRAG_ATTRIB_TEX6 = 10, FRAG_ATTRIB_TEX7 = + 11, FRAG_ATTRIB_FACE = 12, FRAG_ATTRIB_PNTC = 13, FRAG_ATTRIB_VAR0 = + 14, FRAG_ATTRIB_MAX = (FRAG_ATTRIB_VAR0 + 16) +} gl_frag_result; +struct gl_config { + GLint depthBits; +}; +struct gl_lightmodel { + GLenum ColorControl; +}; +struct gl_depthbuffer_attrib { + GLenum Func; + GLboolean Mask; +}; +struct gl_hint_attrib { + GLenum PerspectiveCorrection; +}; +struct gl_light_attrib { + struct gl_lightmodel Model; +}; +struct gl_polygon_attrib { + GLboolean StippleFlag; +}; +typedef enum { + TEXTURE_BUFFER_INDEX, TEXTURE_2D_ARRAY_INDEX, TEXTURE_1D_ARRAY_INDEX, + TEXTURE_CUBE_INDEX, TEXTURE_3D_INDEX, TEXTURE_RECT_INDEX, + TEXTURE_2D_INDEX, TEXTURE_1D_INDEX, NUM_TEXTURE_TARGETS +} gl_texture_index; +struct gl_texture_image { + GLuint Border; + GLuint Width; + GLuint Height; + GLuint WidthLog2; + GLboolean _IsPowerOfTwo; + GLuint RowStride; + GLvoid *Data; +}; +typedef enum { +MAX_FACES = 6 +} gl_face_index; +struct gl_sampler_object { + GLenum WrapS; + GLenum WrapT; +}; +struct gl_texture_object { + struct gl_sampler_object Sampler; + GLint BaseLevel; + GLuint _Swizzle; + struct gl_texture_image *Image[MAX_FACES][15]; +}; +struct gl_texture_unit { + GLbitfield _ReallyEnabled; + GLenum EnvMode; + struct gl_texture_object *CurrentTex[NUM_TEXTURE_TARGETS]; +}; +struct gl_texture_attrib { + struct gl_texture_unit Unit[(16 + 16)]; + GLbitfield _EnabledUnits; + GLbitfield _EnabledCoordUnits; +}; +struct gl_fragment_program_state { + struct gl_fragment_program *_Current; +}; +struct gl_ati_fragment_shader_state { + GLboolean _Enabled; +}; +struct gl_renderbuffer { + void (*PutRowRGB) (struct gl_context * ctx, struct gl_renderbuffer * rb, + GLuint count, GLint x, GLint y, const void *values, + const GLubyte * mask); +}; +struct gl_framebuffer { + struct gl_config Visual; + struct gl_renderbuffer *_ColorDrawBuffers[8]; +}; +struct gl_context { + struct gl_framebuffer *DrawBuffer; + struct gl_depthbuffer_attrib Depth; + struct gl_hint_attrib Hint; + struct gl_light_attrib Light; + struct gl_polygon_attrib Polygon; + struct gl_texture_attrib Texture; + struct gl_fragment_program_state FragmentProgram; + struct gl_ati_fragment_shader_state ATIFragmentShader; + GLenum RenderMode; +}; +typedef struct { + GLfloat attrib[FRAG_ATTRIB_MAX][4]; +} SWvertex; +typedef struct sw_span { + GLint x, y; + GLuint end; + GLfloat attrStepX[FRAG_ATTRIB_MAX][4]; + GLfixed intTex[2], intTexStep[2]; +} SWspan; +typedef void (*swrast_tri_func) (struct gl_context * ctx, const SWvertex *, + const SWvertex *, const SWvertex *); +typedef struct { + GLbitfield _RasterMask; + GLboolean _FogEnabled; + swrast_tri_func Triangle; +} SWcontext; +static __inline__ SWcontext *SWRAST_CONTEXT(struct gl_context *ctx) +{ +} + +static void simple_textured_triangle(struct gl_context *ctx, + const SWvertex * v0, const SWvertex * v1, + const SWvertex * v2) +{ + typedef struct { + GLfloat dx; + GLfloat dy; + GLfixed fsx; + GLfixed fx0; + GLint lines; + } EdgeT; + EdgeT eMaj; +EdgeT eTop; EdgeT eBot; + GLfloat oneOverArea; + const SWvertex *vMin;const SWvertex *vMid;const SWvertex *vMax; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx;GLfixed vMin_fy;GLfixed vMid_fx;GLfixed vMid_fy;GLfixed vMax_fx;GLfixed vMax_fy; + SWspan span; + { + const GLfixed fy0 = + (((int) + ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = + (((int) + ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = + (((int) + ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + vMin = v0; + vMax = v1; + vMin_fy = fy0; + } + } + vMin_fx = + (((int) + ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = + (((int) + ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + } + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float)(1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float)(1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float)(1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float)(1 << 11)))); + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + oneOverArea = 1.0F / area; + if (eBot.lines > 0) { + eBot.fx0 = vMin_fx; + } + GLint scan_from_left_to_right; + struct gl_renderbuffer *rb = + ctx->DrawBuffer->_ColorDrawBuffers[0]; + const struct gl_texture_object *obj = + ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; + const struct gl_texture_image *texImg = + obj->Image[0][obj->BaseLevel]; + const GLfloat twidth = (GLfloat) texImg->Width; + const GLint twidth_log2 = texImg->WidthLog2; + const GLubyte *texture = (const GLubyte *)texImg->Data; + const GLint smask = texImg->Width - 1; + const GLint tmask = texImg->Height - 1; + if (!rb || !texture) { + return; + } + { + GLfloat eMaj_ds = + (vMax->attrib[FRAG_ATTRIB_TEX0][0] - + vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + GLfloat eBot_ds = + (vMid->attrib[FRAG_ATTRIB_TEX0][0] - + vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + span.attrStepX[FRAG_ATTRIB_TEX0][0] = + oneOverArea * (eMaj_ds * eBot.dy - + eMaj.dy * eBot_ds); + span.intTexStep[0] = + (((int) + ((((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * + ((float)(1 << 11))) >= + 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) + * ((float)(1 << 11))) + + 0.5F) + : (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * + ((float)(1 << 11))) - 0.5F)))); + GLint subTriangle; + GLfixed fxLeftEdge = 0; GLfixed fxRightEdge = 0; + GLfixed sLeft = 0; GLfixed dsOuter = 0; GLfixed dsInner; + for (subTriangle = 0; subTriangle <= 1; subTriangle++) { + EdgeT *eLeft; EdgeT *eRight; + int lines; + if (subTriangle == 0) { + if (scan_from_left_to_right) { + eRight = &eBot; + lines = eRight->lines; + } else { + eRight = &eMaj; + } + } else { + if (scan_from_left_to_right) { + eRight = &eTop; + } + fxRightEdge = eRight->fsx - 1; + } + while (lines > 0) { + const GLint right = + ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + span.intTex[0] = sLeft; + if (span.end > 0 && span.y >= 0) { + { + GLuint i; + GLubyte rgb[16384][3]; + for (i = 0; + i < span.end; + i++) { + GLint s = + ((span. + intTex[0]) + >> 11) & + smask; + GLint t = + ((span. + intTex[1]) + >> 11) & + tmask; + GLint pos = + (t << + twidth_log2) + + s; + rgb[i][0] = + texture[pos + + + 2]; + span. + intTex[0] += + span. + intTexStep + [0]; + } + rb->PutRowRGB(ctx, rb, + span.end, + span.x, + span.y, + rgb, + ((void *) + 0)); + } + } + } + } + } + } +} + +void _swrast_choose_triangle(struct gl_context *ctx) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + if (ctx->RenderMode == 0x1C00) { + if (ctx->Texture._EnabledCoordUnits + || ctx->FragmentProgram._Current + || ctx->ATIFragmentShader._Enabled + || _mesa_need_secondary_color(ctx) || swrast->_FogEnabled) { + const struct gl_texture_object *texObj2D; + const struct gl_texture_image *texImg; + GLenum minFilter; GLenum magFilter; GLenum envMode; + gl_format format; + if (ctx->Texture._EnabledCoordUnits == 0x1 + && !ctx->FragmentProgram._Current + && !ctx->ATIFragmentShader._Enabled + && ctx->Texture._EnabledUnits == 0x1 + && ctx->Texture.Unit[0]._ReallyEnabled == + (1 << TEXTURE_2D_INDEX) + && texObj2D->Sampler.WrapS == 0x2901 + && texObj2D->Sampler.WrapT == 0x2901 + && texObj2D->_Swizzle == + (((0) << 0) | ((1) << 3) | ((2) << 6) | ((3) << 9)) + && texImg->_IsPowerOfTwo && texImg->Border == 0 + && texImg->Width == texImg->RowStride + && (format == MESA_FORMAT_RGB888 + || format == MESA_FORMAT_RGBA8888) + && minFilter == magFilter + && ctx->Light.Model.ColorControl == 0x81F9 + && !swrast->_FogEnabled + && ctx->Texture.Unit[0].EnvMode != 0x8570 + && ctx->Texture.Unit[0].EnvMode != 0x8503) { + if (ctx->Hint.PerspectiveCorrection == 0x1101) { + if (minFilter == 0x2600 + && format == MESA_FORMAT_RGB888 + && (envMode == 0x1E01 + || envMode == 0x2101) + && + ((swrast->_RasterMask == + (0x004 | 0x1000) + && ctx->Depth.Func == 0x0201 + && ctx->Depth.Mask == 0x1) + || swrast->_RasterMask == 0x1000) + && ctx->Polygon.StippleFlag == 0x0 + && ctx->DrawBuffer->Visual. + depthBits <= 16) { + if (swrast->_RasterMask == + (0x004 | 0x1000)) { + swrast->Triangle = + simple_textured_triangle; + } + } + } + } + } + } +} diff --git a/394889/s_triangle.i.5 b/394889/s_triangle.i.5 new file mode 100644 index 0000000..48642dd --- /dev/null +++ b/394889/s_triangle.i.5 @@ -0,0 +1,388 @@ +typedef unsigned int GLenum; +typedef unsigned char GLboolean; +typedef unsigned int GLbitfield; +typedef void GLvoid; +typedef int GLint; +typedef unsigned char GLubyte; +typedef unsigned int GLuint; +typedef float GLfloat; +typedef int GLfixed; +typedef union { + GLfloat f; + GLint i; +} fi_type; +static __inline__ int IS_INF_OR_NAN(float x) +{ + fi_type tmp; + tmp.f = x; + return !(int)((unsigned int)((tmp.i & 0x7fffffff) - 0x7f800000) >> 31); +} + +typedef enum { + MESA_FORMAT_RGBA8888, MESA_FORMAT_RGB888, +} gl_format; +typedef enum { + FRAG_ATTRIB_WPOS = 0, FRAG_ATTRIB_COL0 = 1, FRAG_ATTRIB_COL1 = + 2, FRAG_ATTRIB_FOGC = 3, FRAG_ATTRIB_TEX0 = 4, FRAG_ATTRIB_TEX1 = + 5, FRAG_ATTRIB_TEX2 = 6, FRAG_ATTRIB_TEX3 = 7, FRAG_ATTRIB_TEX4 = + 8, FRAG_ATTRIB_TEX5 = 9, FRAG_ATTRIB_TEX6 = 10, FRAG_ATTRIB_TEX7 = + 11, FRAG_ATTRIB_FACE = 12, FRAG_ATTRIB_PNTC = 13, FRAG_ATTRIB_VAR0 = + 14, FRAG_ATTRIB_MAX = (FRAG_ATTRIB_VAR0 + 16) +} gl_frag_result; +struct gl_config { + GLint depthBits; +}; +struct gl_lightmodel { + GLenum ColorControl; +}; +struct gl_depthbuffer_attrib { + GLenum Func; + GLboolean Mask; +}; +struct gl_hint_attrib { + GLenum PerspectiveCorrection; +}; +struct gl_light_attrib { + struct gl_lightmodel Model; +}; +struct gl_polygon_attrib { + GLboolean StippleFlag; +}; +typedef enum { + TEXTURE_BUFFER_INDEX, TEXTURE_2D_ARRAY_INDEX, TEXTURE_1D_ARRAY_INDEX, + TEXTURE_CUBE_INDEX, TEXTURE_3D_INDEX, TEXTURE_RECT_INDEX, + TEXTURE_2D_INDEX, TEXTURE_1D_INDEX, NUM_TEXTURE_TARGETS +} gl_texture_index; +struct gl_texture_image { + GLuint Border; + GLuint Width; + GLuint Height; + GLuint WidthLog2; + GLboolean _IsPowerOfTwo; + GLuint RowStride; + GLvoid *Data; +}; +typedef enum { + MAX_FACES = 6 +} gl_face_index; +struct gl_sampler_object { + GLenum WrapS; + GLenum WrapT; +}; +struct gl_texture_object { + struct gl_sampler_object Sampler; + GLint BaseLevel; + GLuint _Swizzle; + struct gl_texture_image *Image[MAX_FACES][15]; +}; +struct gl_texture_unit { + GLbitfield _ReallyEnabled; + GLenum EnvMode; + struct gl_texture_object *CurrentTex[NUM_TEXTURE_TARGETS]; +}; +struct gl_texture_attrib { + struct gl_texture_unit Unit[(16 + 16)]; + GLbitfield _EnabledUnits; + GLbitfield _EnabledCoordUnits; +}; +struct gl_fragment_program_state { + struct gl_fragment_program *_Current; +}; +struct gl_ati_fragment_shader_state { + GLboolean _Enabled; +}; +struct gl_renderbuffer { + void (*PutRowRGB) (struct gl_context * ctx, struct gl_renderbuffer * rb, + GLuint count, GLint x, GLint y, const void *values, + const GLubyte * mask); +}; +struct gl_framebuffer { + struct gl_config Visual; + struct gl_renderbuffer *_ColorDrawBuffers[8]; +}; +struct gl_context { + struct gl_framebuffer *DrawBuffer; + struct gl_depthbuffer_attrib Depth; + struct gl_hint_attrib Hint; + struct gl_light_attrib Light; + struct gl_polygon_attrib Polygon; + struct gl_texture_attrib Texture; + struct gl_fragment_program_state FragmentProgram; + struct gl_ati_fragment_shader_state ATIFragmentShader; + GLenum RenderMode; +}; +typedef struct { + GLfloat attrib[FRAG_ATTRIB_MAX][4]; +} SWvertex; +typedef struct sw_span { + GLint x, y; + GLuint end; + GLfloat attrStepX[FRAG_ATTRIB_MAX][4]; + GLfixed intTex[2], intTexStep[2]; +} SWspan; +typedef void (*swrast_tri_func) (struct gl_context * ctx, const SWvertex *, + const SWvertex *, const SWvertex *); +typedef struct { + GLbitfield _RasterMask; + GLboolean _FogEnabled; + swrast_tri_func Triangle; +} SWcontext; +static void simple_textured_triangle(struct gl_context *ctx, + const SWvertex * v0, const SWvertex * v1, + const SWvertex * v2) +{ + typedef struct { + GLfloat dx; + GLfloat dy; + GLfixed fsx; + GLfixed fx0; + GLint lines; + } EdgeT; + EdgeT eMaj; + EdgeT eTop; + EdgeT eBot; + GLfloat oneOverArea; + const SWvertex *vMin; + const SWvertex *vMid; + const SWvertex *vMax; + const GLint snapMask = ~(((1 << 11) / (1 << 4)) - 1); + GLfixed vMin_fx; + GLfixed vMin_fy; + GLfixed vMid_fx; + GLfixed vMid_fy; + GLfixed vMax_fx; + GLfixed vMax_fy; + SWspan span; + { + const GLfixed fy0 = + (((int) + ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy1 = + (((int) + ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + const GLfixed fy2 = + (((int) + ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + vMin = v0; + vMax = v1; + vMin_fy = fy0; + } + } + vMin_fx = + (((int) + ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = + (((int) + ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + } + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float)(1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float)(1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float)(1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float)(1 << 11)))); + { + const GLfloat area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + oneOverArea = 1.0F / area; + if (eBot.lines > 0) { + eBot.fx0 = vMin_fx; + } + GLint scan_from_left_to_right; + struct gl_renderbuffer *rb = + ctx->DrawBuffer->_ColorDrawBuffers[0]; + const struct gl_texture_object *obj = + ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; + const struct gl_texture_image *texImg = + obj->Image[0][obj->BaseLevel]; + const GLfloat twidth = (GLfloat) texImg->Width; + const GLint twidth_log2 = texImg->WidthLog2; + const GLubyte *texture = (const GLubyte *)texImg->Data; + const GLint smask = texImg->Width - 1; + const GLint tmask = texImg->Height - 1; + if (!rb || !texture) { + return; + } + { + GLfloat eMaj_ds = + (vMax->attrib[FRAG_ATTRIB_TEX0][0] - + vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + GLfloat eBot_ds = + (vMid->attrib[FRAG_ATTRIB_TEX0][0] - + vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + span.attrStepX[FRAG_ATTRIB_TEX0][0] = + oneOverArea * (eMaj_ds * eBot.dy - + eMaj.dy * eBot_ds); + span.intTexStep[0] = + (((int) + ((((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * + ((float)(1 << 11))) >= + 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) + * ((float)(1 << 11))) + + 0.5F) + : (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * + ((float)(1 << 11))) - 0.5F)))); + GLint subTriangle; + GLfixed fxLeftEdge = 0; + GLfixed fxRightEdge = 0; + GLfixed sLeft = 0; + for (subTriangle = 0; subTriangle <= 1; subTriangle++) { + EdgeT *eRight; + int lines; + if (subTriangle == 0) { + if (scan_from_left_to_right) { + eRight = &eBot; + lines = eRight->lines; + } else { + eRight = &eMaj; + } + } else { + if (scan_from_left_to_right) { + eRight = &eTop; + } + fxRightEdge = eRight->fsx - 1; + } + while (lines > 0) { + const GLint right = + ((fxRightEdge) >> 11); + span.x = ((fxLeftEdge) >> 11); + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + span.intTex[0] = sLeft; + if (span.end > 0 && span.y >= 0) { + { + GLuint i; + GLubyte rgb[16384][3]; + for (i = 0; + i < span.end; + i++) { + GLint s = + ((span. + intTex[0]) + >> 11) & + smask; + GLint t = + ((span. + intTex[1]) + >> 11) & + tmask; + GLint pos = + (t << + twidth_log2) + + s; + rgb[i][0] = + texture[pos + + + 2]; + span. + intTex[0] += + span. + intTexStep + [0]; + } + rb->PutRowRGB(ctx, rb, + span.end, + span.x, + span.y, + rgb, + ((void *) + 0)); + } + } + } + } + } + } +} + +void _swrast_choose_triangle(struct gl_context *ctx) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + if (ctx->RenderMode == 0x1C00) { + if (ctx->Texture._EnabledCoordUnits + || ctx->FragmentProgram._Current + || ctx->ATIFragmentShader._Enabled + || _mesa_need_secondary_color(ctx) || swrast->_FogEnabled) { + const struct gl_texture_object *texObj2D; + const struct gl_texture_image *texImg; + GLenum minFilter; + GLenum magFilter; + GLenum envMode; + gl_format format; + if (ctx->Texture._EnabledCoordUnits == 0x1 + && !ctx->FragmentProgram._Current + && !ctx->ATIFragmentShader._Enabled + && ctx->Texture._EnabledUnits == 0x1 + && ctx->Texture.Unit[0]._ReallyEnabled == + (1 << TEXTURE_2D_INDEX) + && texObj2D->Sampler.WrapS == 0x2901 + && texObj2D->Sampler.WrapT == 0x2901 + && texObj2D->_Swizzle == + (((0) << 0) | ((1) << 3) | ((2) << 6) | ((3) << 9)) + && texImg->_IsPowerOfTwo && texImg->Border == 0 + && texImg->Width == texImg->RowStride + && (format == MESA_FORMAT_RGB888 + || format == MESA_FORMAT_RGBA8888) + && minFilter == magFilter + && ctx->Light.Model.ColorControl == 0x81F9 + && !swrast->_FogEnabled + && ctx->Texture.Unit[0].EnvMode != 0x8570 + && ctx->Texture.Unit[0].EnvMode != 0x8503) { + if (ctx->Hint.PerspectiveCorrection == 0x1101) { + if (minFilter == 0x2600 + && format == MESA_FORMAT_RGB888 + && (envMode == 0x1E01 + || envMode == 0x2101) + && + ((swrast->_RasterMask == + (0x004 | 0x1000) + && ctx->Depth.Func == 0x0201 + && ctx->Depth.Mask == 0x1) + || swrast->_RasterMask == 0x1000) + && ctx->Polygon.StippleFlag == 0x0 + && ctx->DrawBuffer->Visual. + depthBits <= 16) { + if (swrast->_RasterMask == + (0x004 | 0x1000)) { + swrast->Triangle = + simple_textured_triangle; + } + } + } + } + } + } +} diff --git a/394889/s_triangle.i.6 b/394889/s_triangle.i.6 new file mode 100644 index 0000000..bfa2a4b --- /dev/null +++ b/394889/s_triangle.i.6 @@ -0,0 +1,370 @@ +typedef unsigned int GLenum; +typedef unsigned char GLubyte; +typedef unsigned int GLuint; +typedef union { + float f; + int i; +} fi_type; +static __inline__ int IS_INF_OR_NAN(float x) +{ + fi_type tmp; + tmp.f = x; + return !(int)((unsigned int)((tmp.i & 0x7fffffff) - 0x7f800000) >> 31); +} + +typedef enum { + MESA_FORMAT_RGBA8888, MESA_FORMAT_RGB888, +} gl_format; +typedef enum { + FRAG_ATTRIB_WPOS = 0, FRAG_ATTRIB_COL0 = 1, FRAG_ATTRIB_COL1 = + 2, FRAG_ATTRIB_FOGC = 3, FRAG_ATTRIB_TEX0 = 4, FRAG_ATTRIB_TEX1 = + 5, FRAG_ATTRIB_TEX2 = 6, FRAG_ATTRIB_TEX3 = 7, FRAG_ATTRIB_TEX4 = + 8, FRAG_ATTRIB_TEX5 = 9, FRAG_ATTRIB_TEX6 = 10, FRAG_ATTRIB_TEX7 = + 11, FRAG_ATTRIB_FACE = 12, FRAG_ATTRIB_PNTC = 13, FRAG_ATTRIB_VAR0 = + 14, FRAG_ATTRIB_MAX = (FRAG_ATTRIB_VAR0 + 16) +} gl_frag_result; +struct gl_config { + int depthBits; +}; +struct gl_lightmodel { + GLenum ColorControl; +}; +struct gl_depthbuffer_attrib { + GLenum Func; + unsigned char Mask; +}; +struct gl_hint_attrib { + GLenum PerspectiveCorrection; +}; +struct gl_light_attrib { + struct gl_lightmodel Model; +}; +struct gl_polygon_attrib { + unsigned char StippleFlag; +}; +typedef enum { + TEXTURE_BUFFER_INDEX, TEXTURE_2D_ARRAY_INDEX, TEXTURE_1D_ARRAY_INDEX, + TEXTURE_CUBE_INDEX, TEXTURE_3D_INDEX, TEXTURE_RECT_INDEX, + TEXTURE_2D_INDEX, TEXTURE_1D_INDEX, NUM_TEXTURE_TARGETS +} gl_texture_index; +struct gl_texture_image { + GLuint Border; + GLuint Width; + GLuint Height; + GLuint WidthLog2; + unsigned char _IsPowerOfTwo; + GLuint RowStride; + void *Data; +}; +typedef enum { + MAX_FACES = 6 +} gl_face_index; +struct gl_sampler_object { + GLenum WrapS; + GLenum WrapT; +}; +struct gl_texture_object { + struct gl_sampler_object Sampler; + int BaseLevel; + GLuint _Swizzle; + struct gl_texture_image *Image[MAX_FACES][15]; +}; +struct gl_texture_unit { + unsigned int _ReallyEnabled; + GLenum EnvMode; + struct gl_texture_object *CurrentTex[NUM_TEXTURE_TARGETS]; +}; +struct gl_texture_attrib { + struct gl_texture_unit Unit[(16 + 16)]; + unsigned int _EnabledUnits; + unsigned int _EnabledCoordUnits; +}; +struct gl_fragment_program_state { + struct gl_fragment_program *_Current; +}; +struct gl_ati_fragment_shader_state { + unsigned char _Enabled; +}; +struct gl_renderbuffer { + void (*PutRowRGB) (struct gl_context * ctx, struct gl_renderbuffer * rb, + GLuint count, int x, int y, const void *values); +}; +struct gl_framebuffer { + struct gl_config Visual; + struct gl_renderbuffer *_ColorDrawBuffers[8]; +}; +struct gl_context { + struct gl_framebuffer *DrawBuffer; + struct gl_depthbuffer_attrib Depth; + struct gl_hint_attrib Hint; + struct gl_light_attrib Light; + struct gl_polygon_attrib Polygon; + struct gl_texture_attrib Texture; + struct gl_fragment_program_state FragmentProgram; + struct gl_ati_fragment_shader_state ATIFragmentShader; + GLenum RenderMode; +}; +typedef struct { + float attrib[FRAG_ATTRIB_MAX][4]; +} SWvertex; +typedef struct sw_span { + int x, y; + GLuint end; + float attrStepX[FRAG_ATTRIB_MAX][4]; + int intTex[2], intTexStep[2]; +} SWspan; +typedef void (*swrast_tri_func) (struct gl_context * ctx, const SWvertex *, + const SWvertex *, const SWvertex *); +typedef struct { + unsigned int _RasterMask; + unsigned char _FogEnabled; + swrast_tri_func Triangle; +} SWcontext; +static void simple_textured_triangle(struct gl_context *ctx, + const SWvertex * v0, const SWvertex * v1, + const SWvertex * v2) +{ + typedef struct { + float dx; + float dy; + int fsx; + int fx0; + int lines; + } EdgeT; + EdgeT eMaj; + EdgeT eTop; + EdgeT eBot; + float oneOverArea; + const SWvertex *vMin; + const SWvertex *vMid; + const SWvertex *vMax; + const int snapMask = ~(((1 << 11) / (1 << 4)) - 1); + int vMin_fx; + int vMin_fy; + int vMid_fx; + int vMid_fy; + int vMax_fx; + int vMax_fy; + SWspan span; + const int fy0 = + (((int) + ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + const int fy1 = + (((int) + ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + const int fy2 = + (((int) + ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + vMin = v0; + vMax = v1; + vMin_fy = fy0; + } + } + vMin_fx = + (((int) + ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = + (((int) + ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float)(1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float)(1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float)(1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float)(1 << 11)))); + const float area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + oneOverArea = 1.0F / area; + if (eBot.lines > 0) { + eBot.fx0 = vMin_fx; + } + int scan_from_left_to_right; + struct gl_renderbuffer *rb = + ctx->DrawBuffer->_ColorDrawBuffers[0]; + const struct gl_texture_object *obj = + ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; + const struct gl_texture_image *texImg = + obj->Image[0][obj->BaseLevel]; + const float twidth = (float) texImg->Width; + const int twidth_log2 = texImg->WidthLog2; + const GLubyte *texture = (const GLubyte *)texImg->Data; + const int smask = texImg->Width - 1; + const int tmask = texImg->Height - 1; + if (!rb || !texture) { + return; + } + float eMaj_ds = + (vMax->attrib[FRAG_ATTRIB_TEX0][0] - + vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + float eBot_ds = + (vMid->attrib[FRAG_ATTRIB_TEX0][0] - + vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + span.attrStepX[FRAG_ATTRIB_TEX0][0] = + oneOverArea * (eMaj_ds * eBot.dy - + eMaj.dy * eBot_ds); + span.intTexStep[0] = + (((int) + ((((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * + ((float)(1 << 11))) >= + 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) + * ((float)(1 << 11))) + + 0.5F) + : (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * + ((float)(1 << 11))) - 0.5F)))); + int subTriangle; + int fxLeftEdge = 0; + int fxRightEdge = 0; + int sLeft = 0; + for (subTriangle = 0; subTriangle <= 1; subTriangle++) { + EdgeT *eRight; + int lines; + if (subTriangle == 0) { + if (scan_from_left_to_right) { + eRight = &eBot; + lines = eRight->lines; + } else { + eRight = &eMaj; + } + } else { + if (scan_from_left_to_right) { + eRight = &eTop; + } + fxRightEdge = eRight->fsx - 1; + } + while (lines > 0) { + const int right= fxRightEdge >> 11; + span.x = fxLeftEdge >> 11; + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + span.intTex[0] = sLeft; + if (span.end > 0 && span.y >= 0) { + GLuint i; + GLubyte rgb[16384][3]; + for (i = 0; + i < span.end; + i++) { + int s = + ((span. + intTex[0]) + >> 11) & + smask; + int t = + ((span. + intTex[1]) + >> 11) & + tmask; + int pos = + (t << + twidth_log2) + + s; + rgb[i][0] = + texture[pos + + + 2]; + span. + intTex[0] += + span. + intTexStep + [0]; + } + rb->PutRowRGB(ctx, rb, + span.end, + span.x, + span.y, + rgb); + } + } + } +} + +void _swrast_choose_triangle(struct gl_context *ctx) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + if (ctx->RenderMode == 0x1C00) { + if (ctx->Texture._EnabledCoordUnits + || ctx->FragmentProgram._Current + || ctx->ATIFragmentShader._Enabled + || _mesa_need_secondary_color(ctx) || swrast->_FogEnabled) { + const struct gl_texture_object *texObj2D; + const struct gl_texture_image *texImg; + GLenum minFilter; + GLenum magFilter; + GLenum envMode; + gl_format format; + if (ctx->Texture._EnabledCoordUnits == 0x1 + && !ctx->FragmentProgram._Current + && !ctx->ATIFragmentShader._Enabled + && ctx->Texture._EnabledUnits == 0x1 + && ctx->Texture.Unit[0]._ReallyEnabled == + (1 << TEXTURE_2D_INDEX) + && texObj2D->Sampler.WrapS == 0x2901 + && texObj2D->Sampler.WrapT == 0x2901 + && texObj2D->_Swizzle == + (((0) << 0) | ((1) << 3) | ((2) << 6) | ((3) << 9)) + && texImg->_IsPowerOfTwo && texImg->Border == 0 + && texImg->Width == texImg->RowStride + && (format == MESA_FORMAT_RGB888 + || format == MESA_FORMAT_RGBA8888) + && minFilter == magFilter + && ctx->Light.Model.ColorControl == 0x81F9 + && !swrast->_FogEnabled + && ctx->Texture.Unit[0].EnvMode != 0x8570 + && ctx->Texture.Unit[0].EnvMode != 0x8503) { + if (ctx->Hint.PerspectiveCorrection == 0x1101) { + if (minFilter == 0x2600 + && format == MESA_FORMAT_RGB888 + && (envMode == 0x1E01 + || envMode == 0x2101) + && + ((swrast->_RasterMask == + (0x004 | 0x1000) + && ctx->Depth.Func == 0x0201 + && ctx->Depth.Mask == 0x1) + || swrast->_RasterMask == 0x1000) + && ctx->Polygon.StippleFlag == 0x0 + && ctx->DrawBuffer->Visual. + depthBits <= 16) { + if (swrast->_RasterMask == + (0x004 | 0x1000)) { + swrast->Triangle = + simple_textured_triangle; + } + } + } + } + } + } +} diff --git a/394889/s_triangle.i.7 b/394889/s_triangle.i.7 new file mode 100644 index 0000000..afdcd1c --- /dev/null +++ b/394889/s_triangle.i.7 @@ -0,0 +1,368 @@ +typedef union { + float f; + int i; +} fi_type; +static __inline__ +int IS_INF_OR_NAN(float x) +{ + fi_type tmp; + tmp.f = x; + return !(int)((unsigned int)((tmp.i & 0x7fffffff) - 0x7f800000) >> 31); +} + +typedef enum { + MESA_FORMAT_RGBA8888, MESA_FORMAT_RGB888, +} gl_format; +typedef enum { + FRAG_ATTRIB_WPOS = 0, FRAG_ATTRIB_COL0 = 1, FRAG_ATTRIB_COL1 = + 2, FRAG_ATTRIB_FOGC = 3, FRAG_ATTRIB_TEX0 = 4, FRAG_ATTRIB_TEX1 = + 5, FRAG_ATTRIB_TEX2 = 6, FRAG_ATTRIB_TEX3 = 7, FRAG_ATTRIB_TEX4 = + 8, FRAG_ATTRIB_TEX5 = 9, FRAG_ATTRIB_TEX6 = 10, FRAG_ATTRIB_TEX7 = + 11, FRAG_ATTRIB_FACE = 12, FRAG_ATTRIB_PNTC = 13, FRAG_ATTRIB_VAR0 = + 14, FRAG_ATTRIB_MAX = (FRAG_ATTRIB_VAR0 + 16) +} gl_frag_result; +struct gl_config { + int depthBits; +}; +struct gl_lightmodel { + unsigned int ColorControl; +}; +struct gl_depthbuffer_attrib { + unsigned int Func; + unsigned char Mask; +}; +struct gl_hint_attrib { + unsigned int PerspectiveCorrection; +}; +struct gl_light_attrib { + struct gl_lightmodel Model; +}; +struct gl_polygon_attrib { + unsigned char StippleFlag; +}; +typedef enum { + TEXTURE_BUFFER_INDEX, TEXTURE_2D_ARRAY_INDEX, TEXTURE_1D_ARRAY_INDEX, + TEXTURE_CUBE_INDEX, TEXTURE_3D_INDEX, TEXTURE_RECT_INDEX, + TEXTURE_2D_INDEX, TEXTURE_1D_INDEX, NUM_TEXTURE_TARGETS +} gl_texture_index; +struct gl_texture_image { + unsigned int Border; + unsigned int Width; + unsigned int Height; + unsigned int WidthLog2; + unsigned char _IsPowerOfTwo; + unsigned int RowStride; + void *Data; +}; +typedef enum { + MAX_FACES = 6 +} gl_face_index; +struct gl_sampler_object { + unsigned int WrapS; + unsigned int WrapT; +}; +struct gl_texture_object { + struct gl_sampler_object Sampler; + int BaseLevel; + unsigned int _Swizzle; + struct gl_texture_image *Image[MAX_FACES][15]; +}; +struct gl_texture_unit { + unsigned int _ReallyEnabled; + unsigned int EnvMode; + struct gl_texture_object *CurrentTex[NUM_TEXTURE_TARGETS]; +}; +struct gl_texture_attrib { + struct gl_texture_unit Unit[(16 + 16)]; + unsigned int _EnabledUnits; + unsigned int _EnabledCoordUnits; +}; +struct gl_fragment_program_state { + struct gl_fragment_program *_Current; +}; +struct gl_ati_fragment_shader_state { + unsigned char _Enabled; +}; +struct gl_renderbuffer { + void (*PutRowRGB) (struct gl_context * ctx, struct gl_renderbuffer * rb, + unsigned int count, int x, int y, const void *values); +}; +struct gl_framebuffer { + struct gl_config Visual; + struct gl_renderbuffer *_ColorDrawBuffers[8]; +}; +struct gl_context { + struct gl_framebuffer *DrawBuffer; + struct gl_depthbuffer_attrib Depth; + struct gl_hint_attrib Hint; + struct gl_light_attrib Light; + struct gl_polygon_attrib Polygon; + struct gl_texture_attrib Texture; + struct gl_fragment_program_state FragmentProgram; + struct gl_ati_fragment_shader_state ATIFragmentShader; + unsigned int RenderMode; +}; +typedef struct { + float attrib[FRAG_ATTRIB_MAX][4]; +} SWvertex; +typedef struct sw_span { + int x, y; + unsigned int end; + float attrStepX[FRAG_ATTRIB_MAX][4]; + int intTex[2], intTexStep[2]; +} SWspan; +typedef void (*swrast_tri_func) (struct gl_context * ctx, const SWvertex *, + const SWvertex *, const SWvertex *); +typedef struct { + unsigned int _RasterMask; + unsigned char _FogEnabled; + swrast_tri_func Triangle; +} SWcontext; +static void simple_textured_triangle(struct gl_context *ctx, + const SWvertex * v0, const SWvertex * v1, + const SWvertex * v2) +{ + typedef struct { + float dx; + float dy; + int fsx; + int fx0; + int lines; + } EdgeT; + EdgeT eMaj; + EdgeT eTop; + EdgeT eBot; + float oneOverArea; + const SWvertex *vMin; + const SWvertex *vMid; + const SWvertex *vMax; + const int snapMask = ~(((1 << 11) / (1 << 4)) - 1); + int vMin_fx; + int vMin_fy; + int vMid_fx; + int vMid_fy; + int vMax_fx; + int vMax_fy; + SWspan span; + const int fy0 = + (((int) + ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + const int fy1 = + (((int) + ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + const int fy2 = + (((int) + ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + vMin = v0; + vMax = v1; + vMin_fy = fy0; + } + } + vMin_fx = + (((int) + ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = + (((int) + ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float)(1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float)(1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float)(1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float)(1 << 11)))); + const float area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + oneOverArea = 1.0F / area; + if (eBot.lines > 0) { + eBot.fx0 = vMin_fx; + } + int scan_from_left_to_right; + struct gl_renderbuffer *rb = + ctx->DrawBuffer->_ColorDrawBuffers[0]; + const struct gl_texture_object *obj = + ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; + const struct gl_texture_image *texImg = + obj->Image[0][obj->BaseLevel]; + const float twidth = (float) texImg->Width; + const int twidth_log2 = texImg->WidthLog2; + const unsigned char *texture = (const unsigned char *)texImg->Data; + const int smask = texImg->Width - 1; + const int tmask = texImg->Height - 1; + if (!rb || !texture) { + return; + } + float eMaj_ds = + (vMax->attrib[FRAG_ATTRIB_TEX0][0] - + vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + float eBot_ds = + (vMid->attrib[FRAG_ATTRIB_TEX0][0] - + vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + span.attrStepX[FRAG_ATTRIB_TEX0][0] = + oneOverArea * (eMaj_ds * eBot.dy - + eMaj.dy * eBot_ds); + span.intTexStep[0] = + (((int) + ((((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * + ((float)(1 << 11))) >= + 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) + * ((float)(1 << 11))) + + 0.5F) + : (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * + ((float)(1 << 11))) - 0.5F)))); + int subTriangle; + int fxLeftEdge = 0; + int fxRightEdge = 0; + int sLeft = 0; + for (subTriangle = 0; subTriangle <= 1; subTriangle++) { + EdgeT *eRight; + int lines; + if (subTriangle == 0) { + if (scan_from_left_to_right) { + eRight = &eBot; + lines = eRight->lines; + } else { + eRight = &eMaj; + } + } else { + if (scan_from_left_to_right) { + eRight = &eTop; + } + fxRightEdge = eRight->fsx - 1; + } + while (lines > 0) { + const int right= fxRightEdge >> 11; + span.x = fxLeftEdge >> 11; + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + span.intTex[0] = sLeft; + if (span.end > 0 && span.y >= 0) { + unsigned int i; + unsigned char rgb[16384][3]; + for (i = 0; + i < span.end; + i++) { + int s = + ((span. + intTex[0]) + >> 11) & + smask; + int t = + ((span. + intTex[1]) + >> 11) & + tmask; + int pos = + (t << + twidth_log2) + + s; + rgb[i][0] = + texture[pos + + + 2]; + span. + intTex[0] += + span. + intTexStep + [0]; + } + rb->PutRowRGB(ctx, rb, + span.end, + span.x, + span.y, + rgb); + } + } + } +} + +void _swrast_choose_triangle(struct gl_context *ctx) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + if (ctx->RenderMode == 0x1C00) { + if (ctx->Texture._EnabledCoordUnits + || ctx->FragmentProgram._Current + || ctx->ATIFragmentShader._Enabled + || _mesa_need_secondary_color(ctx) || swrast->_FogEnabled) { + const struct gl_texture_object *texObj2D; + const struct gl_texture_image *texImg; + unsigned int minFilter; + unsigned int magFilter; + unsigned int envMode; + gl_format format; + if (ctx->Texture._EnabledCoordUnits == 0x1 + && !ctx->FragmentProgram._Current + && !ctx->ATIFragmentShader._Enabled + && ctx->Texture._EnabledUnits == 0x1 + && ctx->Texture.Unit[0]._ReallyEnabled == + (1 << TEXTURE_2D_INDEX) + && texObj2D->Sampler.WrapS == 0x2901 + && texObj2D->Sampler.WrapT == 0x2901 + && texObj2D->_Swizzle == + (((0) << 0) | ((1) << 3) | ((2) << 6) | ((3) << 9)) + && texImg->_IsPowerOfTwo && texImg->Border == 0 + && texImg->Width == texImg->RowStride + && (format == MESA_FORMAT_RGB888 + || format == MESA_FORMAT_RGBA8888) + && minFilter == magFilter + && ctx->Light.Model.ColorControl == 0x81F9 + && !swrast->_FogEnabled + && ctx->Texture.Unit[0].EnvMode != 0x8570 + && ctx->Texture.Unit[0].EnvMode != 0x8503) { + if (ctx->Hint.PerspectiveCorrection == 0x1101) { + if (minFilter == 0x2600 + && format == MESA_FORMAT_RGB888 + && (envMode == 0x1E01 + || envMode == 0x2101) + && + ((swrast->_RasterMask == + (0x004 | 0x1000) + && ctx->Depth.Func == 0x0201 + && ctx->Depth.Mask == 0x1) + || swrast->_RasterMask == 0x1000) + && ctx->Polygon.StippleFlag == 0x0 + && ctx->DrawBuffer->Visual. + depthBits <= 16) { + if (swrast->_RasterMask == + (0x004 | 0x1000)) { + swrast->Triangle = + simple_textured_triangle; + } + } + } + } + } + } +} diff --git a/394889/s_triangle.i.8 b/394889/s_triangle.i.8 new file mode 100644 index 0000000..4febcad --- /dev/null +++ b/394889/s_triangle.i.8 @@ -0,0 +1,323 @@ +typedef union { + float f; + int i; +} fi_type; +static __inline__ +int IS_INF_OR_NAN(float x) +{ + fi_type tmp; + tmp.f = x; + return !(int)((unsigned int)((tmp.i & 0x7fffffff) - 0x7f800000) >> 31); +} + +typedef enum { + MESA_FORMAT_RGBA8888, MESA_FORMAT_RGB888, +} gl_format; +typedef enum { + FRAG_ATTRIB_WPOS = 0, FRAG_ATTRIB_COL0 = 1, FRAG_ATTRIB_COL1 = + 2, FRAG_ATTRIB_FOGC = 3, FRAG_ATTRIB_TEX0 = 4, FRAG_ATTRIB_TEX1 = + 5, FRAG_ATTRIB_TEX2 = 6, FRAG_ATTRIB_TEX3 = 7, FRAG_ATTRIB_TEX4 = + 8, FRAG_ATTRIB_TEX5 = 9, FRAG_ATTRIB_TEX6 = 10, FRAG_ATTRIB_TEX7 = + 11, FRAG_ATTRIB_FACE = 12, FRAG_ATTRIB_PNTC = 13, FRAG_ATTRIB_VAR0 = + 14, FRAG_ATTRIB_MAX = (FRAG_ATTRIB_VAR0 + 16) +} gl_frag_result; +struct gl_config { + int depthBits; +}; +struct gl_lightmodel { + unsigned int ColorControl; +}; +struct gl_depthbuffer_attrib { + unsigned int Func; + unsigned char Mask; +}; +struct gl_hint_attrib { + unsigned int PerspectiveCorrection; +}; +struct gl_light_attrib { + struct gl_lightmodel Model; +}; +struct gl_polygon_attrib { + unsigned char StippleFlag; +}; +typedef enum { + TEXTURE_BUFFER_INDEX, TEXTURE_2D_ARRAY_INDEX, TEXTURE_1D_ARRAY_INDEX, + TEXTURE_CUBE_INDEX, TEXTURE_3D_INDEX, TEXTURE_RECT_INDEX, + TEXTURE_2D_INDEX, TEXTURE_1D_INDEX, NUM_TEXTURE_TARGETS +} gl_texture_index; +struct gl_texture_image { + unsigned int Border; + unsigned int Width; + unsigned int Height; + unsigned int WidthLog2; + unsigned char _IsPowerOfTwo; + unsigned int RowStride; + void *Data; +}; +typedef enum { + MAX_FACES = 6 +} gl_face_index; +struct gl_sampler_object { + unsigned int WrapS; + unsigned int WrapT; +}; +struct gl_texture_object { + struct gl_sampler_object Sampler; + int BaseLevel; + unsigned int _Swizzle; + struct gl_texture_image *Image[MAX_FACES][15]; +}; +struct gl_texture_unit { + unsigned int _ReallyEnabled; + unsigned int EnvMode; + struct gl_texture_object *CurrentTex[NUM_TEXTURE_TARGETS]; +}; +struct gl_texture_attrib { + struct gl_texture_unit Unit[(16 + 16)]; + unsigned int _EnabledUnits; + unsigned int _EnabledCoordUnits; +}; +struct gl_fragment_program_state { + struct gl_fragment_program *_Current; +}; +struct gl_ati_fragment_shader_state { + unsigned char _Enabled; +}; +struct gl_renderbuffer { + void (*PutRowRGB) (struct gl_context * ctx, struct gl_renderbuffer * rb, + unsigned int count, int x, int y, const void *values); +}; +struct gl_framebuffer { + struct gl_config Visual; + struct gl_renderbuffer *_ColorDrawBuffers[8]; +}; +struct gl_context { + struct gl_framebuffer *DrawBuffer; + struct gl_depthbuffer_attrib Depth; + struct gl_hint_attrib Hint; + struct gl_light_attrib Light; + struct gl_polygon_attrib Polygon; + struct gl_texture_attrib Texture; + struct gl_fragment_program_state FragmentProgram; + struct gl_ati_fragment_shader_state ATIFragmentShader; + unsigned int RenderMode; +}; +typedef struct { + float attrib[FRAG_ATTRIB_MAX][4]; +} SWvertex; +typedef struct sw_span { + int x, y; + unsigned int end; + float attrStepX[FRAG_ATTRIB_MAX][4]; + int intTex[2], intTexStep[2]; +} SWspan; +typedef void (*swrast_tri_func) (struct gl_context * ctx, const SWvertex *, + const SWvertex *, const SWvertex *); +typedef struct { + unsigned int _RasterMask; + unsigned char _FogEnabled; + swrast_tri_func Triangle; +} SWcontext; +static void simple_textured_triangle(struct gl_context *ctx, + const SWvertex * v0, const SWvertex * v1, + const SWvertex * v2) +{ + typedef struct { + float dx; + float dy; + int fsx; + int fx0; + int lines; + } EdgeT; + EdgeT eMaj; + EdgeT eTop; + EdgeT eBot; + float oneOverArea; + const SWvertex *vMin; + const SWvertex *vMid; + const SWvertex *vMax; + const int snapMask = ~(((1 << 11) / (1 << 4)) - 1); + int vMin_fx; + int vMin_fy; + int vMid_fx; + int vMid_fy; + int vMax_fx; + int vMax_fy; + SWspan span; + const int fy0 = + (((int) + ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + const int fy1 = + (((int) + ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + const int fy2 = + (((int) + ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + vMin = v0; + vMax = v1; + vMin_fy = fy0; + } + } + vMin_fx = + (((int) + ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = + (((int) + ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * + ((float)(1 << 11))) + + 0.5F) + : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) - 0.5F)))) & snapMask; + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float)(1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float)(1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float)(1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float)(1 << 11)))); + const float area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + oneOverArea = 1.0F / area; + if (eBot.lines > 0) { + eBot.fx0 = vMin_fx; + } + int scan_from_left_to_right; + struct gl_renderbuffer *rb = + ctx->DrawBuffer->_ColorDrawBuffers[0]; + const struct gl_texture_object *obj = + ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; + const struct gl_texture_image *texImg = + obj->Image[0][obj->BaseLevel]; + const float twidth = (float) texImg->Width; + const int twidth_log2 = texImg->WidthLog2; + const unsigned char *texture = (const unsigned char *)texImg->Data; + const int smask = texImg->Width - 1; + const int tmask = texImg->Height - 1; + if (!rb || !texture) { + return; + } + float eMaj_ds = + (vMax->attrib[FRAG_ATTRIB_TEX0][0] - + vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + float eBot_ds = + (vMid->attrib[FRAG_ATTRIB_TEX0][0] - + vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + span.attrStepX[FRAG_ATTRIB_TEX0][0] = + oneOverArea * (eMaj_ds * eBot.dy - + eMaj.dy * eBot_ds); + span.intTexStep[0] = + (((int) + ((((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * + ((float)(1 << 11))) >= + 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) + * ((float)(1 << 11))) + + 0.5F) + : (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * + ((float)(1 << 11))) - 0.5F)))); + int subTriangle; + int fxLeftEdge = 0; + int fxRightEdge = 0; + int sLeft = 0; + for (subTriangle = 0; subTriangle <= 1; subTriangle++) { + EdgeT *eRight; + int lines; + if (subTriangle == 0) { + if (scan_from_left_to_right) { + eRight = &eBot; + lines = eRight->lines; + } else { + eRight = &eMaj; + } + } else { + if (scan_from_left_to_right) { + eRight = &eTop; + } + fxRightEdge = eRight->fsx - 1; + } + while (lines > 0) { + const int right= fxRightEdge >> 11; + span.x = fxLeftEdge >> 11; + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + span.intTex[0] = sLeft; + if (span.end > 0 && span.y >= 0) { + unsigned int i; + unsigned char rgb[16384][3]; + for (i = 0; + i < span.end; + i++) { + int s = + ((span. + intTex[0]) + >> 11) & + smask; + int t = + ((span. + intTex[1]) + >> 11) & + tmask; + int pos = + (t << + twidth_log2) + + s; + rgb[i][0] = + texture[pos + + + 2]; + span. + intTex[0] += + span. + intTexStep + [0]; + } + rb->PutRowRGB(ctx, rb, + span.end, + span.x, + span.y, + rgb); + } + } + } +} + +void _swrast_choose_triangle(struct gl_context *ctx) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + const struct gl_texture_object *texObj2D; + const struct gl_texture_image *texImg; + unsigned int minFilter; + unsigned int magFilter; + unsigned int envMode; + gl_format format; + swrast->Triangle = + simple_textured_triangle; + +} diff --git a/394889/s_triangle.i.9 b/394889/s_triangle.i.9 new file mode 100644 index 0000000..0be37ae --- /dev/null +++ b/394889/s_triangle.i.9 @@ -0,0 +1,233 @@ +typedef union { + float f; + int i; +} fi_type; +static __inline__ int IS_INF_OR_NAN(float x) +{ + fi_type tmp; + tmp.f = x; + return !(int)((unsigned int)((tmp.i & 0x7fffffff) - 0x7f800000) >> 31); +} + +typedef enum { + FRAG_ATTRIB_WPOS = 0, FRAG_ATTRIB_COL0 = 1, FRAG_ATTRIB_COL1 = + 2, FRAG_ATTRIB_FOGC = 3, FRAG_ATTRIB_TEX0 = 4, FRAG_ATTRIB_TEX1 = + 5, FRAG_ATTRIB_TEX2 = 6, FRAG_ATTRIB_TEX3 = 7, FRAG_ATTRIB_TEX4 = + 8, FRAG_ATTRIB_TEX5 = 9, FRAG_ATTRIB_TEX6 = 10, FRAG_ATTRIB_TEX7 = + 11, FRAG_ATTRIB_FACE = 12, FRAG_ATTRIB_PNTC = 13, FRAG_ATTRIB_VAR0 = + 14, FRAG_ATTRIB_MAX = (FRAG_ATTRIB_VAR0 + 16) +} gl_frag_result; +typedef enum { + TEXTURE_BUFFER_INDEX, TEXTURE_2D_ARRAY_INDEX, TEXTURE_1D_ARRAY_INDEX, + TEXTURE_CUBE_INDEX, TEXTURE_3D_INDEX, TEXTURE_RECT_INDEX, + TEXTURE_2D_INDEX, TEXTURE_1D_INDEX, NUM_TEXTURE_TARGETS +} gl_texture_index; +struct gl_texture_image { + unsigned int Width; + unsigned int Height; + unsigned int WidthLog2; + void *Data; +}; +typedef enum { + MAX_FACES = 6 +} gl_face_index; +struct gl_texture_object { + int BaseLevel; + struct gl_texture_image *Image[MAX_FACES][15]; +}; +struct gl_texture_unit { + struct gl_texture_object *CurrentTex[NUM_TEXTURE_TARGETS]; +}; +struct gl_texture_attrib { + struct gl_texture_unit Unit[(16 + 16)]; +}; +struct gl_renderbuffer { + void (*PutRowRGB) (struct gl_context * ctx, struct gl_renderbuffer * rb, + unsigned int count, int x, int y, + const void *values); +}; +struct gl_framebuffer { + struct gl_renderbuffer *_ColorDrawBuffers[8]; +}; +struct gl_context { + struct gl_framebuffer *DrawBuffer; + struct gl_texture_attrib Texture; +}; +typedef struct { + float attrib[FRAG_ATTRIB_MAX][4]; +} SWvertex; +typedef struct sw_span { + int x, y; + unsigned int end; + float attrStepX[FRAG_ATTRIB_MAX][4]; + int intTex[2], intTexStep[2]; +} SWspan; +typedef void (*swrast_tri_func) (struct gl_context * ctx, const SWvertex *, + const SWvertex *, const SWvertex *); +typedef struct { + swrast_tri_func Triangle; +} SWcontext; +static void simple_textured_triangle(struct gl_context *ctx, + const SWvertex * v0, const SWvertex * v1, + const SWvertex * v2) +{ + typedef struct { + float dx; + float dy; + int fsx; + int fx0; + int lines; + } EdgeT; + EdgeT eMaj; + EdgeT eTop; + EdgeT eBot; + float oneOverArea; + const SWvertex *vMin; + const SWvertex *vMid; + const SWvertex *vMax; + const int snapMask = ~(((1 << 11) / (1 << 4)) - 1); + int vMin_fx; + int vMin_fy; + int vMid_fx; + int vMid_fy; + int vMax_fx; + int vMax_fy; + SWspan span; + const int fy0 = + (((int) + ((((v0->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) : (((v0->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) - 0.5F)))) & snapMask; + const int fy1 = + (((int) + ((((v1->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) : (((v1->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) - 0.5F)))) & snapMask; + const int fy2 = + (((int) + ((((v2->attrib[FRAG_ATTRIB_WPOS][1] - + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) + + 0.5F) : (((v2->attrib[FRAG_ATTRIB_WPOS][1] - 0.5F) * + ((float)(1 << 11))) - 0.5F)))) & snapMask; + if (fy0 <= fy1) { + if (fy1 <= fy2) { + vMin = v0; + vMax = v1; + vMin_fy = fy0; + } + } + vMin_fx = + (((int) + ((((vMin->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * + ((float)(1 << 11))) + + 0.5F) : (((vMin->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * + ((float)(1 << 11))) - 0.5F)))) & snapMask; + vMid_fx = + (((int) + ((((vMid->attrib[FRAG_ATTRIB_WPOS][0] + + 0.5F) * ((float)(1 << 11))) >= + 0.0F) ? (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * + ((float)(1 << 11))) + + 0.5F) : (((vMid->attrib[FRAG_ATTRIB_WPOS][0] + 0.5F) * + ((float)(1 << 11))) - 0.5F)))) & snapMask; + eMaj.dx = ((vMax_fx - vMin_fx) * (1.0F / ((float)(1 << 11)))); + eMaj.dy = ((vMax_fy - vMin_fy) * (1.0F / ((float)(1 << 11)))); + eTop.dx = ((vMax_fx - vMid_fx) * (1.0F / ((float)(1 << 11)))); + eBot.dy = ((vMid_fy - vMin_fy) * (1.0F / ((float)(1 << 11)))); + const float area = eMaj.dx * eBot.dy - eBot.dx * eMaj.dy; + if (IS_INF_OR_NAN(area) || area == 0.0F) + return; + oneOverArea = 1.0F / area; + if (eBot.lines > 0) { + eBot.fx0 = vMin_fx; + } + int scan_from_left_to_right; + struct gl_renderbuffer *rb = ctx->DrawBuffer->_ColorDrawBuffers[0]; + const struct gl_texture_object *obj = + ctx->Texture.Unit[0].CurrentTex[TEXTURE_2D_INDEX]; + const struct gl_texture_image *texImg = obj->Image[0][obj->BaseLevel]; + const float twidth = (float)texImg->Width; + const int twidth_log2 = texImg->WidthLog2; + const unsigned char *texture = (const unsigned char *)texImg->Data; + const int smask = texImg->Width - 1; + const int tmask = texImg->Height - 1; + if (!rb || !texture) { + return; + } + float eMaj_ds = + (vMax->attrib[FRAG_ATTRIB_TEX0][0] - + vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + float eBot_ds = + (vMid->attrib[FRAG_ATTRIB_TEX0][0] - + vMin->attrib[FRAG_ATTRIB_TEX0][0]) * twidth; + span.attrStepX[FRAG_ATTRIB_TEX0][0] = + oneOverArea * (eMaj_ds * eBot.dy - eMaj.dy * eBot_ds); + span.intTexStep[0] = + (((int) + ((((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * ((float)(1 << 11))) >= + 0.0F) ? (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * + ((float)(1 << 11))) + + 0.5F) : (((span.attrStepX[FRAG_ATTRIB_TEX0][0]) * + ((float)(1 << 11))) - 0.5F)))); + int subTriangle; + int fxLeftEdge = 0; + int fxRightEdge = 0; + int sLeft = 0; + for (subTriangle = 0; subTriangle <= 1; subTriangle++) { + EdgeT *eRight; + int lines; + if (subTriangle == 0) { + if (scan_from_left_to_right) { + eRight = &eBot; + lines = eRight->lines; + } else { + eRight = &eMaj; + } + } else { + if (scan_from_left_to_right) { + eRight = &eTop; + } + fxRightEdge = eRight->fsx - 1; + } + while (lines > 0) { + const int right = fxRightEdge >> 11; + span.x = fxLeftEdge >> 11; + if (right <= span.x) + span.end = 0; + else + span.end = right - span.x; + span.intTex[0] = sLeft; + if (span.end > 0 && span.y >= 0) { + unsigned int i; + unsigned char rgb[16384][3]; + for (i = 0; i < span.end; i++) { + int s = + ((span.intTex[0]) >> 11) & smask; + int t = + ((span.intTex[1]) >> 11) & tmask; + int pos = (t << twidth_log2) + s; + rgb[i][0] = texture[pos + 2]; + span.intTex[0] += span.intTexStep[0]; + } + rb->PutRowRGB(ctx, rb, span.end, span.x, span.y, + rgb); + } + } + } +} + +void _swrast_choose_triangle(struct gl_context *ctx) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + swrast->Triangle = simple_textured_triangle; +} diff --git a/395151/addr.i b/395151/addr.i new file mode 100644 index 0000000..a9b9dd2 --- /dev/null +++ b/395151/addr.i @@ -0,0 +1,57715 @@ +# 1 "Address.cpp" +# 1 "" +#define __STDC__ 1 +#define __cplusplus 1 +#define __STDC_HOSTED__ 1 +#define __GNUC__ 4 +#define __GNUC_MINOR__ 5 +#define __GNUC_PATCHLEVEL__ 3 +#define __GNUG__ 4 +#define __SIZE_TYPE__ long unsigned int +#define __PTRDIFF_TYPE__ long int +#define __WCHAR_TYPE__ int +#define __WINT_TYPE__ unsigned int +#define __INTMAX_TYPE__ long int +#define __UINTMAX_TYPE__ long unsigned int +#define __CHAR16_TYPE__ short unsigned int +#define __CHAR32_TYPE__ unsigned int +#define __SIG_ATOMIC_TYPE__ int +#define __INT8_TYPE__ signed char +#define __INT16_TYPE__ short int +#define __INT32_TYPE__ int +#define __INT64_TYPE__ long int +#define __UINT8_TYPE__ unsigned char +#define __UINT16_TYPE__ short unsigned int +#define __UINT32_TYPE__ unsigned int +#define __UINT64_TYPE__ long unsigned int +#define __INT_LEAST8_TYPE__ signed char +#define __INT_LEAST16_TYPE__ short int +#define __INT_LEAST32_TYPE__ int +#define __INT_LEAST64_TYPE__ long int +#define __UINT_LEAST8_TYPE__ unsigned char +#define __UINT_LEAST16_TYPE__ short unsigned int +#define __UINT_LEAST32_TYPE__ unsigned int +#define __UINT_LEAST64_TYPE__ long unsigned int +#define __INT_FAST8_TYPE__ signed char +#define __INT_FAST16_TYPE__ long int +#define __INT_FAST32_TYPE__ long int +#define __INT_FAST64_TYPE__ long int +#define __UINT_FAST8_TYPE__ unsigned char +#define __UINT_FAST16_TYPE__ long unsigned int +#define __UINT_FAST32_TYPE__ long unsigned int +#define __UINT_FAST64_TYPE__ long unsigned int +#define __INTPTR_TYPE__ long int +#define __UINTPTR_TYPE__ long unsigned int +#define __GXX_WEAK__ 1 +#define __DEPRECATED 1 +#define __GXX_RTTI 1 +#define __EXCEPTIONS 1 +#define __GXX_ABI_VERSION 1002 +#define __SCHAR_MAX__ 127 +#define __SHRT_MAX__ 32767 +#define __INT_MAX__ 2147483647 +#define __LONG_MAX__ 9223372036854775807L +#define __LONG_LONG_MAX__ 9223372036854775807LL +#define __WCHAR_MAX__ 2147483647 +#define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) +#define __WINT_MAX__ 4294967295U +#define __WINT_MIN__ 0U +#define __PTRDIFF_MAX__ 9223372036854775807L +#define __SIZE_MAX__ 18446744073709551615UL +#define __CHAR_BIT__ 8 +#define __INTMAX_MAX__ 9223372036854775807L +#define __INTMAX_C(c) c ## L +#define __UINTMAX_MAX__ 18446744073709551615UL +#define __UINTMAX_C(c) c ## UL +#define __SIG_ATOMIC_MAX__ 2147483647 +#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) +#define __INT8_MAX__ 127 +#define __INT16_MAX__ 32767 +#define __INT32_MAX__ 2147483647 +#define __INT64_MAX__ 9223372036854775807L +#define __UINT8_MAX__ 255 +#define __UINT16_MAX__ 65535 +#define __UINT32_MAX__ 4294967295U +#define __UINT64_MAX__ 18446744073709551615UL +#define __INT_LEAST8_MAX__ 127 +#define __INT8_C(c) c +#define __INT_LEAST16_MAX__ 32767 +#define __INT16_C(c) c +#define __INT_LEAST32_MAX__ 2147483647 +#define __INT32_C(c) c +#define __INT_LEAST64_MAX__ 9223372036854775807L +#define __INT64_C(c) c ## L +#define __UINT_LEAST8_MAX__ 255 +#define __UINT8_C(c) c +#define __UINT_LEAST16_MAX__ 65535 +#define __UINT16_C(c) c +#define __UINT_LEAST32_MAX__ 4294967295U +#define __UINT32_C(c) c ## U +#define __UINT_LEAST64_MAX__ 18446744073709551615UL +#define __UINT64_C(c) c ## UL +#define __INT_FAST8_MAX__ 127 +#define __INT_FAST16_MAX__ 9223372036854775807L +#define __INT_FAST32_MAX__ 9223372036854775807L +#define __INT_FAST64_MAX__ 9223372036854775807L +#define __UINT_FAST8_MAX__ 255 +#define __UINT_FAST16_MAX__ 18446744073709551615UL +#define __UINT_FAST32_MAX__ 18446744073709551615UL +#define __UINT_FAST64_MAX__ 18446744073709551615UL +#define __INTPTR_MAX__ 9223372036854775807L +#define __UINTPTR_MAX__ 18446744073709551615UL +#define __FLT_EVAL_METHOD__ 0 +#define __DEC_EVAL_METHOD__ 2 +#define __FLT_RADIX__ 2 +#define __FLT_MANT_DIG__ 24 +#define __FLT_DIG__ 6 +#define __FLT_MIN_EXP__ (-125) +#define __FLT_MIN_10_EXP__ (-37) +#define __FLT_MAX_EXP__ 128 +#define __FLT_MAX_10_EXP__ 38 +#define __FLT_MAX__ 3.40282346638528859812e+38F +#define __FLT_MIN__ 1.17549435082228750797e-38F +#define __FLT_EPSILON__ 1.19209289550781250000e-7F +#define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F +#define __FLT_HAS_DENORM__ 1 +#define __FLT_HAS_INFINITY__ 1 +#define __FLT_HAS_QUIET_NAN__ 1 +#define __DBL_MANT_DIG__ 53 +#define __DBL_DIG__ 15 +#define __DBL_MIN_EXP__ (-1021) +#define __DBL_MIN_10_EXP__ (-307) +#define __DBL_MAX_EXP__ 1024 +#define __DBL_MAX_10_EXP__ 308 +#define __DBL_MAX__ ((double)1.79769313486231570815e+308L) +#define __DBL_MIN__ ((double)2.22507385850720138309e-308L) +#define __DBL_EPSILON__ ((double)2.22044604925031308085e-16L) +#define __DBL_DENORM_MIN__ ((double)4.94065645841246544177e-324L) +#define __DBL_HAS_DENORM__ 1 +#define __DBL_HAS_INFINITY__ 1 +#define __DBL_HAS_QUIET_NAN__ 1 +#define __LDBL_MANT_DIG__ 64 +#define __LDBL_DIG__ 18 +#define __LDBL_MIN_EXP__ (-16381) +#define __LDBL_MIN_10_EXP__ (-4931) +#define __LDBL_MAX_EXP__ 16384 +#define __LDBL_MAX_10_EXP__ 4932 +#define __DECIMAL_DIG__ 21 +#define __LDBL_MAX__ 1.18973149535723176502e+4932L +#define __LDBL_MIN__ 3.36210314311209350626e-4932L +#define __LDBL_EPSILON__ 1.08420217248550443401e-19L +#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L +#define __LDBL_HAS_DENORM__ 1 +#define __LDBL_HAS_INFINITY__ 1 +#define __LDBL_HAS_QUIET_NAN__ 1 +#define __DEC32_MANT_DIG__ 7 +#define __DEC32_MIN_EXP__ (-94) +#define __DEC32_MAX_EXP__ 97 +#define __DEC32_MIN__ 1E-95DF +#define __DEC32_MAX__ 9.999999E96DF +#define __DEC32_EPSILON__ 1E-6DF +#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF +#define __DEC64_MANT_DIG__ 16 +#define __DEC64_MIN_EXP__ (-382) +#define __DEC64_MAX_EXP__ 385 +#define __DEC64_MIN__ 1E-383DD +#define __DEC64_MAX__ 9.999999999999999E384DD +#define __DEC64_EPSILON__ 1E-15DD +#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD +#define __DEC128_MANT_DIG__ 34 +#define __DEC128_MIN_EXP__ (-6142) +#define __DEC128_MAX_EXP__ 6145 +#define __DEC128_MIN__ 1E-6143DL +#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL +#define __DEC128_EPSILON__ 1E-33DL +#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL +#define __REGISTER_PREFIX__ +#define __USER_LABEL_PREFIX__ +#define __VERSION__ "4.5.3" +#define __GNUC_GNU_INLINE__ 1 +#define _LP64 1 +#define __LP64__ 1 +#define __OPTIMIZE__ 1 +#define __FINITE_MATH_ONLY__ 0 +#define __pic__ 2 +#define __PIC__ 2 +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 1 +#define __GCC_HAVE_DWARF2_CFI_ASM 1 +#define __PRAGMA_REDEFINE_EXTNAME 1 +#define __SIZEOF_INT__ 4 +#define __SIZEOF_LONG__ 8 +#define __SIZEOF_LONG_LONG__ 8 +#define __SIZEOF_SHORT__ 2 +#define __SIZEOF_FLOAT__ 4 +#define __SIZEOF_DOUBLE__ 8 +#define __SIZEOF_LONG_DOUBLE__ 16 +#define __SIZEOF_SIZE_T__ 8 +#define __SIZEOF_WCHAR_T__ 4 +#define __SIZEOF_WINT_T__ 4 +#define __SIZEOF_PTRDIFF_T__ 8 +#define __SIZEOF_POINTER__ 8 +#define __amd64 1 +#define __amd64__ 1 +#define __x86_64 1 +#define __x86_64__ 1 +#define __core2 1 +#define __core2__ 1 +#define __tune_core2__ 1 +#define __MMX__ 1 +#define __SSE__ 1 +#define __SSE2__ 1 +#define __SSE3__ 1 +#define __SSSE3__ 1 +#define __SSE_MATH__ 1 +#define __SSE2_MATH__ 1 +#define __gnu_linux__ 1 +#define __linux 1 +#define __linux__ 1 +#define linux 1 +#define __unix 1 +#define __unix__ 1 +#define unix 1 +#define __ELF__ 1 +#define __DECIMAL_BID_FORMAT__ 1 +#define __BIGGEST_ALIGNMENT__ 16 +# 1 "" +#define _GNU_SOURCE 1 +#define _FORTIFY_SOURCE 2 +# 1 "Address.cpp" +# 27 "Address.cpp" +# 1 "/usr/include/assert.h" 1 3 4 +# 36 "/usr/include/assert.h" 3 4 +#define _ASSERT_H 1 +# 1 "/usr/include/features.h" 1 3 4 +# 21 "/usr/include/features.h" 3 4 +#define _FEATURES_H 1 +# 98 "/usr/include/features.h" 3 4 +#undef __USE_ISOC99 +#undef __USE_ISOC95 +#undef __USE_POSIX +#undef __USE_POSIX2 +#undef __USE_POSIX199309 +#undef __USE_POSIX199506 +#undef __USE_XOPEN +#undef __USE_XOPEN_EXTENDED +#undef __USE_UNIX98 +#undef __USE_XOPEN2K +#undef __USE_XOPEN2KXSI +#undef __USE_XOPEN2K8 +#undef __USE_XOPEN2K8XSI +#undef __USE_LARGEFILE +#undef __USE_LARGEFILE64 +#undef __USE_FILE_OFFSET64 +#undef __USE_BSD +#undef __USE_SVID +#undef __USE_MISC +#undef __USE_ATFILE +#undef __USE_GNU +#undef __USE_REENTRANT +#undef __USE_FORTIFY_LEVEL +#undef __FAVOR_BSD +#undef __KERNEL_STRICT_NAMES + + + + +#define __KERNEL_STRICT_NAMES + + + +#define __USE_ANSI 1 +# 141 "/usr/include/features.h" 3 4 +#define __GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) +# 157 "/usr/include/features.h" 3 4 +#undef _ISOC95_SOURCE +#define _ISOC95_SOURCE 1 +#undef _ISOC99_SOURCE +#define _ISOC99_SOURCE 1 +#undef _POSIX_SOURCE +#define _POSIX_SOURCE 1 +#undef _POSIX_C_SOURCE +#define _POSIX_C_SOURCE 200809L +#undef _XOPEN_SOURCE +#define _XOPEN_SOURCE 700 +#undef _XOPEN_SOURCE_EXTENDED +#define _XOPEN_SOURCE_EXTENDED 1 +#undef _LARGEFILE64_SOURCE +#define _LARGEFILE64_SOURCE 1 +#undef _BSD_SOURCE +#define _BSD_SOURCE 1 +#undef _SVID_SOURCE +#define _SVID_SOURCE 1 +#undef _ATFILE_SOURCE +#define _ATFILE_SOURCE 1 +# 194 "/usr/include/features.h" 3 4 +#define __USE_ISOC99 1 + + + + + +#define __USE_ISOC95 1 +# 221 "/usr/include/features.h" 3 4 +#define __USE_POSIX 1 + + + +#define __USE_POSIX2 1 + + + +#define __USE_POSIX199309 1 + + + +#define __USE_POSIX199506 1 + + + +#define __USE_XOPEN2K 1 +#undef __USE_ISOC95 +#define __USE_ISOC95 1 +#undef __USE_ISOC99 +#define __USE_ISOC99 1 + + + +#define __USE_XOPEN2K8 1 +#undef _ATFILE_SOURCE +#define _ATFILE_SOURCE 1 + + + +#define __USE_XOPEN 1 + +#define __USE_XOPEN_EXTENDED 1 +#define __USE_UNIX98 1 +#undef _LARGEFILE_SOURCE +#define _LARGEFILE_SOURCE 1 + + +#define __USE_XOPEN2K8 1 +#define __USE_XOPEN2K8XSI 1 + +#define __USE_XOPEN2K 1 +#define __USE_XOPEN2KXSI 1 +#undef __USE_ISOC95 +#define __USE_ISOC95 1 +#undef __USE_ISOC99 +#define __USE_ISOC99 1 +# 277 "/usr/include/features.h" 3 4 +#define __USE_LARGEFILE 1 + + + +#define __USE_LARGEFILE64 1 + + + + + + + +#define __USE_MISC 1 + + + +#define __USE_BSD 1 + + + +#define __USE_SVID 1 + + + +#define __USE_ATFILE 1 + + + +#define __USE_GNU 1 +# 315 "/usr/include/features.h" 3 4 +#define __USE_FORTIFY_LEVEL 2 +# 324 "/usr/include/features.h" 3 4 +#define __STDC_IEC_559__ 1 +#define __STDC_IEC_559_COMPLEX__ 1 + + +#define __STDC_ISO_10646__ 200009L + + + + + + + +#undef __GNU_LIBRARY__ +#define __GNU_LIBRARY__ 6 + + + +#define __GLIBC__ 2 +#define __GLIBC_MINOR__ 14 + +#define __GLIBC_PREREQ(maj,min) ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) + + + + + + + +#define __GLIBC_HAVE_LONG_LONG 1 + + + + + +# 1 "/usr/include/sys/cdefs.h" 1 3 4 +# 21 "/usr/include/sys/cdefs.h" 3 4 +#define _SYS_CDEFS_H 1 +# 36 "/usr/include/sys/cdefs.h" 3 4 +#undef __P +#undef __PMT +# 51 "/usr/include/sys/cdefs.h" 3 4 +#define __THROW throw () +#define __NTH(fct) fct throw () +# 74 "/usr/include/sys/cdefs.h" 3 4 +#define __P(args) args +#define __PMT(args) args + + + + +#define __CONCAT(x,y) x ## y +#define __STRING(x) #x + + +#define __ptr_t void * +#define __long_double_t long double + + + + +#define __BEGIN_DECLS extern "C" { +#define __END_DECLS } +# 114 "/usr/include/sys/cdefs.h" 3 4 +#define __BEGIN_NAMESPACE_STD +#define __END_NAMESPACE_STD +#define __USING_NAMESPACE_STD(name) +#define __BEGIN_NAMESPACE_C99 +#define __END_NAMESPACE_C99 +#define __USING_NAMESPACE_C99(name) + + + + + +#define __bounded +#define __unbounded +#define __ptrvalue + + + + +#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) +#define __bos0(ptr) __builtin_object_size (ptr, 0) + + +#define __warndecl(name,msg) extern void name (void) __attribute__((__warning__ (msg))) + +#define __warnattr(msg) __attribute__((__warning__ (msg))) +#define __errordecl(name,msg) extern void name (void) __attribute__((__error__ (msg))) +# 150 "/usr/include/sys/cdefs.h" 3 4 +#define __flexarr [] +# 177 "/usr/include/sys/cdefs.h" 3 4 +#define __REDIRECT(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) + +#define __REDIRECT_NTH(name,proto,alias) name proto __THROW __asm__ (__ASMNAME (#alias)) + + + + + +#define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname) +#define __ASMNAME2(prefix,cname) __STRING (prefix) cname +# 207 "/usr/include/sys/cdefs.h" 3 4 +#define __attribute_malloc__ __attribute__ ((__malloc__)) +# 216 "/usr/include/sys/cdefs.h" 3 4 +#define __attribute_pure__ __attribute__ ((__pure__)) +# 225 "/usr/include/sys/cdefs.h" 3 4 +#define __attribute_used__ __attribute__ ((__used__)) +#define __attribute_noinline__ __attribute__ ((__noinline__)) + + + + + + + +#define __attribute_deprecated__ __attribute__ ((__deprecated__)) +# 246 "/usr/include/sys/cdefs.h" 3 4 +#define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x))) +# 256 "/usr/include/sys/cdefs.h" 3 4 +#define __attribute_format_strfmon__(a,b) __attribute__ ((__format__ (__strfmon__, a, b))) +# 265 "/usr/include/sys/cdefs.h" 3 4 +#define __nonnull(params) __attribute__ ((__nonnull__ params)) + + + + + + + +#define __attribute_warn_unused_result__ __attribute__ ((__warn_unused_result__)) + + +#define __wur __attribute_warn_unused_result__ +# 287 "/usr/include/sys/cdefs.h" 3 4 +#define __always_inline __inline __attribute__ ((__always_inline__)) +# 296 "/usr/include/sys/cdefs.h" 3 4 +#define __extern_inline extern __inline __attribute__ ((__gnu_inline__)) + +#define __extern_always_inline extern __always_inline __attribute__ ((__gnu_inline__, __artificial__)) +# 318 "/usr/include/sys/cdefs.h" 3 4 +#define __va_arg_pack() __builtin_va_arg_pack () +#define __va_arg_pack_len() __builtin_va_arg_pack_len () +# 342 "/usr/include/sys/cdefs.h" 3 4 +#define __restrict_arr +# 353 "/usr/include/sys/cdefs.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 + + + +#define __WORDSIZE 64 +#define __WORDSIZE_COMPAT32 1 +# 354 "/usr/include/sys/cdefs.h" 2 3 4 +# 375 "/usr/include/sys/cdefs.h" 3 4 +#define __LDBL_REDIR1(name,proto,alias) name proto +#define __LDBL_REDIR(name,proto) name proto +#define __LDBL_REDIR1_NTH(name,proto,alias) name proto __THROW +#define __LDBL_REDIR_NTH(name,proto) name proto __THROW +#define __LDBL_REDIR_DECL(name) + +#define __REDIRECT_LDBL(name,proto,alias) __REDIRECT (name, proto, alias) +#define __REDIRECT_NTH_LDBL(name,proto,alias) __REDIRECT_NTH (name, proto, alias) +# 359 "/usr/include/features.h" 2 3 4 +# 374 "/usr/include/features.h" 3 4 +#define __USE_EXTERN_INLINES 1 + + + + + + + +# 1 "/usr/include/gnu/stubs.h" 1 3 4 + + + +# 1 "/usr/include/bits/wordsize.h" 1 3 4 + + + +#define __WORDSIZE 64 +#define __WORDSIZE_COMPAT32 1 +# 5 "/usr/include/gnu/stubs.h" 2 3 4 + + + + +# 1 "/usr/include/gnu/stubs-64.h" 1 3 4 +# 10 "/usr/include/gnu/stubs-64.h" 3 4 +#define __stub_bdflush +#define __stub_chflags +#define __stub_fattach +#define __stub_fchflags +#define __stub_fdetach +#define __stub_getmsg +#define __stub_gtty +#define __stub_lchmod +#define __stub_putmsg +#define __stub_revoke +#define __stub_setlogin +#define __stub_sigreturn +#define __stub_sstk +#define __stub_stty +# 10 "/usr/include/gnu/stubs.h" 2 3 4 +# 383 "/usr/include/features.h" 2 3 4 +# 38 "/usr/include/assert.h" 2 3 4 + + +#define __ASSERT_VOID_CAST static_cast +# 66 "/usr/include/assert.h" 3 4 +extern "C" { + + +extern void __assert_fail (__const char *__assertion, __const char *__file, + unsigned int __line, __const char *__function) + throw () __attribute__ ((__noreturn__)); + + +extern void __assert_perror_fail (int __errnum, __const char *__file, + unsigned int __line, + __const char *__function) + throw () __attribute__ ((__noreturn__)); + + + + +extern void __assert (const char *__assertion, const char *__file, int __line) + throw () __attribute__ ((__noreturn__)); + + +} + +#define assert(expr) ((expr) ? __ASSERT_VOID_CAST (0) : __assert_fail (__STRING(expr), __FILE__, __LINE__, __ASSERT_FUNCTION)) + + + + + +#define assert_perror(errnum) (!(errnum) ? __ASSERT_VOID_CAST (0) : __assert_perror_fail ((errnum), __FILE__, __LINE__, __ASSERT_FUNCTION)) +# 106 "/usr/include/assert.h" 3 4 +#define __ASSERT_FUNCTION __PRETTY_FUNCTION__ +# 28 "Address.cpp" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/iostream" 1 3 +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/iostream" 3 +#define _GLIBCXX_IOSTREAM 1 + + +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/iostream" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 1 3 +# 32 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 3 +#define _GLIBCXX_CXX_CONFIG_H 1 + + +#define __GLIBCXX__ 20110428 + + + + +#define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY 1 + + +#define _GLIBCXX_VISIBILITY_ATTR(V) __attribute__ ((__visibility__ (#V))) +# 54 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 3 +#define _GLIBCXX_DEPRECATED 1 + + + + + +#define _GLIBCXX_DEPRECATED_ATTR +# 95 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 3 +#define _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION 0 +# 117 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 3 +#define _GLIBCXX_STD_D _GLIBCXX_STD +#define _GLIBCXX_STD_P _GLIBCXX_STD +#define _GLIBCXX_STD_PR _GLIBCXX_STD +#define _GLIBCXX_STD std +#define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X,Y) _GLIBCXX_BEGIN_NAMESPACE(X) +#define _GLIBCXX_END_NESTED_NAMESPACE _GLIBCXX_END_NAMESPACE +#define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { +#define _GLIBCXX_END_NAMESPACE } +# 240 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 3 +#undef _GLIBCXX_LONG_DOUBLE_COMPAT +# 252 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 3 +#define _GLIBCXX_LDBL_NAMESPACE +#define _GLIBCXX_BEGIN_LDBL_NAMESPACE +#define _GLIBCXX_END_LDBL_NAMESPACE + + + + + +#define _GLIBCXX_BEGIN_EXTERN_C extern "C" { +#define _GLIBCXX_END_EXTERN_C } +# 275 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/os_defines.h" 1 3 +# 31 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/os_defines.h" 3 +#define _GLIBCXX_OS_DEFINES 1 + + + + + +#define __NO_CTYPE 1 +# 276 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 2 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/cpu_defines.h" 1 3 +# 31 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/cpu_defines.h" 3 +#define _GLIBCXX_CPU_DEFINES 1 +# 279 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 2 3 + + + + +#define _GLIBCXX_PSEUDO_VISIBILITY(V) +# 301 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 3 +#define _GLIBCXX_EXTERN_TEMPLATE 1 + + + + + + +#define _GLIBCXX_WEAK_DEFINITION + + + + + + +#define __glibcxx_assert(_Condition) +# 346 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 3 +#define _GLIBCXX_FAST_MATH 0 + + + + + + +#define __N(msgid) (msgid) + + +#undef min +#undef max + + +#define _GLIBCXX_PURE __attribute__ ((__pure__)) + + + +#define _GLIBCXX_CONST __attribute__ ((__const__)) + + + +#define _GLIBCXX_NORETURN __attribute__ ((__noreturn__)) + + + + +#define _GLIBCXX_NOTHROW throw() +# 384 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 3 +#define _GLIBCXX_HAVE_ACOSF 1 + + +#define _GLIBCXX_HAVE_ACOSL 1 + + +#define _GLIBCXX_HAVE_ASINF 1 + + +#define _GLIBCXX_HAVE_ASINL 1 + + +#define _GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE 1 + + +#define _GLIBCXX_HAVE_ATAN2F 1 + + +#define _GLIBCXX_HAVE_ATAN2L 1 + + +#define _GLIBCXX_HAVE_ATANF 1 + + +#define _GLIBCXX_HAVE_ATANL 1 + + + + + +#define _GLIBCXX_HAVE_CEILF 1 + + +#define _GLIBCXX_HAVE_CEILL 1 + + +#define _GLIBCXX_HAVE_COMPLEX_H 1 + + +#define _GLIBCXX_HAVE_COSF 1 + + +#define _GLIBCXX_HAVE_COSHF 1 + + +#define _GLIBCXX_HAVE_COSHL 1 + + +#define _GLIBCXX_HAVE_COSL 1 + + +#define _GLIBCXX_HAVE_DLFCN_H 1 + + +#define _GLIBCXX_HAVE_EBADMSG 1 + + +#define _GLIBCXX_HAVE_ECANCELED 1 + + +#define _GLIBCXX_HAVE_EIDRM 1 + + +#define _GLIBCXX_HAVE_ENDIAN_H 1 + + +#define _GLIBCXX_HAVE_ENODATA 1 + + +#define _GLIBCXX_HAVE_ENOLINK 1 + + +#define _GLIBCXX_HAVE_ENOSR 1 + + +#define _GLIBCXX_HAVE_ENOSTR 1 + + +#define _GLIBCXX_HAVE_ENOTRECOVERABLE 1 + + +#define _GLIBCXX_HAVE_ENOTSUP 1 + + +#define _GLIBCXX_HAVE_EOVERFLOW 1 + + +#define _GLIBCXX_HAVE_EOWNERDEAD 1 + + +#define _GLIBCXX_HAVE_EPROTO 1 + + +#define _GLIBCXX_HAVE_ETIME 1 + + +#define _GLIBCXX_HAVE_ETXTBSY 1 + + +#define _GLIBCXX_HAVE_EXECINFO_H 1 + + +#define _GLIBCXX_HAVE_EXPF 1 + + +#define _GLIBCXX_HAVE_EXPL 1 + + +#define _GLIBCXX_HAVE_FABSF 1 + + +#define _GLIBCXX_HAVE_FABSL 1 + + +#define _GLIBCXX_HAVE_FENV_H 1 + + +#define _GLIBCXX_HAVE_FINITE 1 + + +#define _GLIBCXX_HAVE_FINITEF 1 + + +#define _GLIBCXX_HAVE_FINITEL 1 + + +#define _GLIBCXX_HAVE_FLOAT_H 1 + + +#define _GLIBCXX_HAVE_FLOORF 1 + + +#define _GLIBCXX_HAVE_FLOORL 1 + + +#define _GLIBCXX_HAVE_FMODF 1 + + +#define _GLIBCXX_HAVE_FMODL 1 +# 531 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 3 +#define _GLIBCXX_HAVE_FREXPF 1 + + +#define _GLIBCXX_HAVE_FREXPL 1 + + +#define _GLIBCXX_HAVE_GETIPINFO 1 + + + +#define _GLIBCXX_HAVE_GTHR_DEFAULT 1 + + +#define _GLIBCXX_HAVE_HYPOT 1 + + +#define _GLIBCXX_HAVE_HYPOTF 1 + + +#define _GLIBCXX_HAVE_HYPOTL 1 + + +#define _GLIBCXX_HAVE_ICONV 1 + + + + + +#define _GLIBCXX_HAVE_INT64_T 1 + + +#define _GLIBCXX_HAVE_INT64_T_LONG 1 + + + + + +#define _GLIBCXX_HAVE_INTTYPES_H 1 + + +#define _GLIBCXX_HAVE_ISINF 1 + + +#define _GLIBCXX_HAVE_ISINFF 1 + + +#define _GLIBCXX_HAVE_ISINFL 1 + + +#define _GLIBCXX_HAVE_ISNAN 1 + + +#define _GLIBCXX_HAVE_ISNANF 1 + + +#define _GLIBCXX_HAVE_ISNANL 1 + + +#define _GLIBCXX_HAVE_ISWBLANK 1 + + +#define _GLIBCXX_HAVE_LC_MESSAGES 1 + + +#define _GLIBCXX_HAVE_LDEXPF 1 + + +#define _GLIBCXX_HAVE_LDEXPL 1 + + +#define _GLIBCXX_HAVE_LIBINTL_H 1 + + +#define _GLIBCXX_HAVE_LIMIT_AS 1 + + +#define _GLIBCXX_HAVE_LIMIT_DATA 1 + + +#define _GLIBCXX_HAVE_LIMIT_FSIZE 1 + + +#define _GLIBCXX_HAVE_LIMIT_RSS 1 + + +#define _GLIBCXX_HAVE_LIMIT_VMEM 0 + + +#define _GLIBCXX_HAVE_LINUX_FUTEX 1 + + +#define _GLIBCXX_HAVE_LOCALE_H 1 + + +#define _GLIBCXX_HAVE_LOG10F 1 + + +#define _GLIBCXX_HAVE_LOG10L 1 + + +#define _GLIBCXX_HAVE_LOGF 1 + + +#define _GLIBCXX_HAVE_LOGL 1 +# 643 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 3 +#define _GLIBCXX_HAVE_MBSTATE_T 1 + + +#define _GLIBCXX_HAVE_MEMORY_H 1 + + +#define _GLIBCXX_HAVE_MODF 1 + + +#define _GLIBCXX_HAVE_MODFF 1 + + +#define _GLIBCXX_HAVE_MODFL 1 + + + + + +#define _GLIBCXX_HAVE_POLL 1 + + +#define _GLIBCXX_HAVE_POWF 1 + + +#define _GLIBCXX_HAVE_POWL 1 + + + + + +#define _GLIBCXX_HAVE_SETENV 1 + + +#define _GLIBCXX_HAVE_SINCOS 1 + + +#define _GLIBCXX_HAVE_SINCOSF 1 + + +#define _GLIBCXX_HAVE_SINCOSL 1 + + +#define _GLIBCXX_HAVE_SINF 1 + + +#define _GLIBCXX_HAVE_SINHF 1 + + +#define _GLIBCXX_HAVE_SINHL 1 + + +#define _GLIBCXX_HAVE_SINL 1 + + +#define _GLIBCXX_HAVE_SQRTF 1 + + +#define _GLIBCXX_HAVE_SQRTL 1 + + +#define _GLIBCXX_HAVE_STDBOOL_H 1 + + +#define _GLIBCXX_HAVE_STDINT_H 1 + + +#define _GLIBCXX_HAVE_STDLIB_H 1 + + +#define _GLIBCXX_HAVE_STRERROR_L 1 + + +#define _GLIBCXX_HAVE_STRERROR_R 1 + + +#define _GLIBCXX_HAVE_STRINGS_H 1 + + +#define _GLIBCXX_HAVE_STRING_H 1 + + +#define _GLIBCXX_HAVE_STRTOF 1 + + +#define _GLIBCXX_HAVE_STRTOLD 1 + + +#define _GLIBCXX_HAVE_STRXFRM_L 1 + + + + + +#define _GLIBCXX_HAVE_SYS_IOCTL_H 1 + + +#define _GLIBCXX_HAVE_SYS_IPC_H 1 +# 748 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 3 +#define _GLIBCXX_HAVE_SYS_PARAM_H 1 + + +#define _GLIBCXX_HAVE_SYS_RESOURCE_H 1 + + +#define _GLIBCXX_HAVE_SYS_SEM_H 1 + + +#define _GLIBCXX_HAVE_SYS_STAT_H 1 + + +#define _GLIBCXX_HAVE_SYS_TIME_H 1 + + +#define _GLIBCXX_HAVE_SYS_TYPES_H 1 + + +#define _GLIBCXX_HAVE_SYS_UIO_H 1 + + + + + +#define _GLIBCXX_HAVE_S_ISREG 1 + + +#define _GLIBCXX_HAVE_TANF 1 + + +#define _GLIBCXX_HAVE_TANHF 1 + + +#define _GLIBCXX_HAVE_TANHL 1 + + +#define _GLIBCXX_HAVE_TANL 1 + + +#define _GLIBCXX_HAVE_TGMATH_H 1 + + +#define _GLIBCXX_HAVE_TLS 1 + + +#define _GLIBCXX_HAVE_UNISTD_H 1 + + +#define _GLIBCXX_HAVE_VFWSCANF 1 + + +#define _GLIBCXX_HAVE_VSWSCANF 1 + + +#define _GLIBCXX_HAVE_VWSCANF 1 + + +#define _GLIBCXX_HAVE_WCHAR_H 1 + + +#define _GLIBCXX_HAVE_WCSTOF 1 + + +#define _GLIBCXX_HAVE_WCTYPE_H 1 + + +#define _GLIBCXX_HAVE_WRITEV 1 +# 1003 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 3 +#define _GLIBCXX_ICONV_CONST + + + +#define LT_OBJDIR ".libs/" + + + + + +#define _GLIBCXX_PACKAGE_BUGREPORT "" + + +#define _GLIBCXX_PACKAGE_NAME "package-unused" + + +#define _GLIBCXX_PACKAGE_STRING "package-unused version-unused" + + +#define _GLIBCXX_PACKAGE_TARNAME "libstdc++" + + +#define _GLIBCXX_PACKAGE_URL "" + + +#define _GLIBCXX_PACKAGE__GLIBCXX_VERSION "version-unused" +# 1046 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 3 +#define STDC_HEADERS 1 + + + + + +#define _GLIBCXX_ATOMIC_BUILTINS_1 1 + + + +#define _GLIBCXX_ATOMIC_BUILTINS_2 1 + + +#define _GLIBCXX_ATOMIC_BUILTINS_4 1 + + + +#define _GLIBCXX_ATOMIC_BUILTINS_8 1 +# 1072 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 3 +#define _GLIBCXX_HAS_GTHREADS 1 + + +#define _GLIBCXX_HOSTED 1 + + + + + + + +#define _GLIBCXX_RES_LIMITS 1 +# 1092 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 3 +#define _GLIBCXX_STDIO_MACROS 1 + + +#define _GLIBCXX_SYMVER 1 + + + + + +#define _GLIBCXX_SYMVER_GNU 1 + + + + + + +#define _GLIBCXX_USE_C99 1 + + + + +#define _GLIBCXX_USE_C99_COMPLEX 1 + + + + +#define _GLIBCXX_USE_C99_COMPLEX_TR1 1 + + + +#define _GLIBCXX_USE_C99_CTYPE_TR1 1 + + + +#define _GLIBCXX_USE_C99_FENV_TR1 1 + + + +#define _GLIBCXX_USE_C99_INTTYPES_TR1 1 + + + +#define _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 1 + + + +#define _GLIBCXX_USE_C99_MATH 1 + + + +#define _GLIBCXX_USE_C99_MATH_TR1 1 + + + +#define _GLIBCXX_USE_C99_STDINT_TR1 1 +# 1156 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 3 +#define _GLIBCXX_USE_DECIMAL_FLOAT 1 + + +#define _GLIBCXX_USE_GETTIMEOFDAY 1 + + +#define _GLIBCXX_USE_LFS 1 + + +#define _GLIBCXX_USE_LONG_LONG 1 + + + + + +#define _GLIBCXX_USE_NLS 1 + + + +#define _GLIBCXX_USE_RANDOM_TR1 1 + + + + + +#define _GLIBCXX_USE_WCHAR_T 1 +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/iostream" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ostream" 1 3 +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ostream" 3 +#define _GLIBCXX_OSTREAM 1 + + +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ostream" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ios" 1 3 +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ios" 3 +#define _GLIBCXX_IOS 1 + + +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ios" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/iosfwd" 1 3 +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/iosfwd" 3 +#define _GLIBCXX_IOSFWD 1 + + +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/iosfwd" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stringfwd.h" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stringfwd.h" 3 +#define _STRINGFWD_H 1 + + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stringfwd.h" 3 + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + class allocator; + + + + + + + + template + struct char_traits; + + template, + typename _Alloc = allocator<_CharT> > + class basic_string; + + template<> struct char_traits; + + typedef basic_string string; + + + template<> struct char_traits; + + typedef basic_string wstring; +# 83 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stringfwd.h" 3 +} +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/iosfwd" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/postypes.h" 1 3 +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/postypes.h" 3 +#define _GLIBCXX_POSTYPES_H 1 + + +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/postypes.h" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cwchar" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cwchar" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cwchar" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#define _STDDEF_H +#define _STDDEF_H_ + +#define _ANSI_STDDEF_H + +#define __STDDEF_H__ +# 138 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#define _PTRDIFF_T +#define _T_PTRDIFF_ +#define _T_PTRDIFF +#define __PTRDIFF_T +#define _PTRDIFF_T_ +#define _BSD_PTRDIFF_T_ +#define ___int_ptrdiff_t_h +#define _GCC_PTRDIFF_T + + + +typedef long int ptrdiff_t; +# 160 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 186 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#define __size_t__ +#define __SIZE_T__ +#define _SIZE_T +#define _SYS_SIZE_T_H +#define _T_SIZE_ +#define _T_SIZE +#define __SIZE_T +#define _SIZE_T_ +#define _BSD_SIZE_T_ +#define _SIZE_T_DEFINED_ +#define _SIZE_T_DEFINED +#define _BSD_SIZE_T_DEFINED_ +#define _SIZE_T_DECLARED +#define ___int_size_t_h +#define _GCC_SIZE_T +#define _SIZET_ + + + +#define __size_t + + + + + +typedef long unsigned int size_t; +# 233 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_size_t +# 262 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#define __wchar_t__ +#define __WCHAR_T__ +#define _WCHAR_T +#define _T_WCHAR_ +#define _T_WCHAR +#define __WCHAR_T +#define _WCHAR_T_ +#define _BSD_WCHAR_T_ +#define _WCHAR_T_DEFINED_ +#define _WCHAR_T_DEFINED +#define _WCHAR_T_H +#define ___int_wchar_t_h +#define __INT_WCHAR_T_H +#define _GCC_WCHAR_T +#define _WCHAR_T_DECLARED +# 289 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef _BSD_WCHAR_T_ +# 342 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 2 3 + + +#define _GLIBCXX_CSTDDEF 1 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + using ::ptrdiff_t; + using ::size_t; + +} +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cwchar" 2 3 + + +# 1 "/usr/include/wchar.h" 1 3 4 +# 27 "/usr/include/wchar.h" 3 4 +#define _WCHAR_H 1 + + + + + +#define __need___FILE + +#define __need_FILE + +# 1 "/usr/include/stdio.h" 1 3 4 +# 45 "/usr/include/stdio.h" 3 4 +struct _IO_FILE; + + + +typedef struct _IO_FILE FILE; + + + + + + + +#define __FILE_defined 1 + +#undef __need_FILE + + + + + +typedef struct _IO_FILE __FILE; + +#define ____FILE_defined 1 + +#undef __need___FILE +# 38 "/usr/include/wchar.h" 2 3 4 + +#define __need___va_list +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stdarg.h" 1 3 4 +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stdarg.h" 3 4 +#undef __need___va_list + + + + +#define __GNUC_VA_LIST +typedef __builtin_va_list __gnuc_va_list; +# 41 "/usr/include/wchar.h" 2 3 4 + +# 1 "/usr/include/bits/wchar.h" 1 3 4 +# 21 "/usr/include/bits/wchar.h" 3 4 +#define _BITS_WCHAR_H 1 + +#define __WCHAR_MIN (-2147483647 - 1) +#define __WCHAR_MAX (2147483647) +# 43 "/usr/include/wchar.h" 2 3 4 + + +#define __need_size_t +#define __need_wchar_t +#define __need_NULL + + +#undef __need_wint_t +#define __need_wint_t +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_wchar_t + + + + +#define _WINT_T + + + + +typedef unsigned int wint_t; + +#undef __need_wint_t +# 395 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 53 "/usr/include/wchar.h" 2 3 4 +# 76 "/usr/include/wchar.h" 3 4 +#define __CORRECT_ISO_CPP_WCHAR_H_PROTO + + + + +#define __mbstate_t_defined 1 + +typedef struct +{ + int __count; + union + { + + unsigned int __wch; + + + + char __wchb[4]; + } __value; +} __mbstate_t; + +#undef __need_mbstate_t + + + + + + + + +typedef __mbstate_t mbstate_t; + + + + + + + +#define WCHAR_MIN __WCHAR_MIN +#define WCHAR_MAX __WCHAR_MAX + + + +#define WEOF (0xffffffffu) +# 129 "/usr/include/wchar.h" 3 4 +extern "C" { + + + + +struct tm; + + + + + + + + + +extern wchar_t *wcscpy (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src) throw (); + +extern wchar_t *wcsncpy (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n) + throw (); + + +extern wchar_t *wcscat (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src) throw (); + +extern wchar_t *wcsncat (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n) + throw (); + + +extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2) + throw () __attribute__ ((__pure__)); + +extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) + throw () __attribute__ ((__pure__)); + + + + +extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) throw (); + + +extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2, + size_t __n) throw (); + + + +# 1 "/usr/include/xlocale.h" 1 3 4 +# 22 "/usr/include/xlocale.h" 3 4 +#define _XLOCALE_H 1 + + + + + +typedef struct __locale_struct +{ + + struct __locale_data *__locales[13]; + + + const unsigned short int *__ctype_b; + const int *__ctype_tolower; + const int *__ctype_toupper; + + + const char *__names[13]; +} *__locale_t; + + +typedef __locale_t locale_t; +# 178 "/usr/include/wchar.h" 2 3 4 + +extern int wcscasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, + __locale_t __loc) throw (); + +extern int wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, + size_t __n, __locale_t __loc) throw (); + + + + + +extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) throw (); + + + +extern size_t wcsxfrm (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) throw (); + + + + + + + + +extern int wcscoll_l (__const wchar_t *__s1, __const wchar_t *__s2, + __locale_t __loc) throw (); + + + + +extern size_t wcsxfrm_l (wchar_t *__s1, __const wchar_t *__s2, + size_t __n, __locale_t __loc) throw (); + + +extern wchar_t *wcsdup (__const wchar_t *__s) throw () __attribute__ ((__malloc__)); + + + + + +extern "C++" wchar_t *wcschr (wchar_t *__wcs, wchar_t __wc) + throw () __asm ("wcschr") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc) + throw () __asm ("wcschr") __attribute__ ((__pure__)); + + + + + + +extern "C++" wchar_t *wcsrchr (wchar_t *__wcs, wchar_t __wc) + throw () __asm ("wcsrchr") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc) + throw () __asm ("wcsrchr") __attribute__ ((__pure__)); + + + + + + + + + +extern wchar_t *wcschrnul (__const wchar_t *__s, wchar_t __wc) + throw () __attribute__ ((__pure__)); + + + + + +extern size_t wcscspn (__const wchar_t *__wcs, __const wchar_t *__reject) + throw () __attribute__ ((__pure__)); + + +extern size_t wcsspn (__const wchar_t *__wcs, __const wchar_t *__accept) + throw () __attribute__ ((__pure__)); + + +extern "C++" wchar_t *wcspbrk (wchar_t *__wcs, __const wchar_t *__accept) + throw () __asm ("wcspbrk") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcspbrk (__const wchar_t *__wcs, + __const wchar_t *__accept) + throw () __asm ("wcspbrk") __attribute__ ((__pure__)); + + + + + + +extern "C++" wchar_t *wcsstr (wchar_t *__haystack, __const wchar_t *__needle) + throw () __asm ("wcsstr") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcsstr (__const wchar_t *__haystack, + __const wchar_t *__needle) + throw () __asm ("wcsstr") __attribute__ ((__pure__)); + + + + + + +extern wchar_t *wcstok (wchar_t *__restrict __s, + __const wchar_t *__restrict __delim, + wchar_t **__restrict __ptr) throw (); + + +extern size_t wcslen (__const wchar_t *__s) throw () __attribute__ ((__pure__)); + + + + + +extern "C++" wchar_t *wcswcs (wchar_t *__haystack, __const wchar_t *__needle) + throw () __asm ("wcswcs") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcswcs (__const wchar_t *__haystack, + __const wchar_t *__needle) + throw () __asm ("wcswcs") __attribute__ ((__pure__)); +# 303 "/usr/include/wchar.h" 3 4 +extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen) + throw () __attribute__ ((__pure__)); + + + + + + +extern "C++" wchar_t *wmemchr (wchar_t *__s, wchar_t __c, size_t __n) + throw () __asm ("wmemchr") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, + size_t __n) + throw () __asm ("wmemchr") __attribute__ ((__pure__)); + + + + + + +extern int wmemcmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) + throw () __attribute__ ((__pure__)); + + +extern wchar_t *wmemcpy (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) throw (); + + + +extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n) + throw (); + + +extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw (); + + + + + +extern wchar_t *wmempcpy (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) + throw (); + + + + + + +extern wint_t btowc (int __c) throw (); + + + +extern int wctob (wint_t __c) throw (); + + + +extern int mbsinit (__const mbstate_t *__ps) throw () __attribute__ ((__pure__)); + + + +extern size_t mbrtowc (wchar_t *__restrict __pwc, + __const char *__restrict __s, size_t __n, + mbstate_t *__p) throw (); + + +extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, + mbstate_t *__restrict __ps) throw (); + + +extern size_t __mbrlen (__const char *__restrict __s, size_t __n, + mbstate_t *__restrict __ps) throw (); +extern size_t mbrlen (__const char *__restrict __s, size_t __n, + mbstate_t *__restrict __ps) throw (); + + + + + + + + +extern wint_t __btowc_alias (int __c) __asm ("btowc"); +extern __inline __attribute__ ((__gnu_inline__)) wint_t +btowc (int __c) throw () +{ return (__builtin_constant_p (__c) && __c >= '\0' && __c <= '\x7f' + ? (wint_t) __c : __btowc_alias (__c)); } + +extern int __wctob_alias (wint_t __c) __asm ("wctob"); +extern __inline __attribute__ ((__gnu_inline__)) int +wctob (wint_t __wc) throw () +{ return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f' + ? (int) __wc : __wctob_alias (__wc)); } + +extern __inline __attribute__ ((__gnu_inline__)) size_t +mbrlen (__const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw () + +{ return (__ps != __null + ? mbrtowc (__null, __s, __n, __ps) : __mbrlen (__s, __n, __null)); } + + + + + +extern size_t mbsrtowcs (wchar_t *__restrict __dst, + __const char **__restrict __src, size_t __len, + mbstate_t *__restrict __ps) throw (); + + + +extern size_t wcsrtombs (char *__restrict __dst, + __const wchar_t **__restrict __src, size_t __len, + mbstate_t *__restrict __ps) throw (); + + + + + + +extern size_t mbsnrtowcs (wchar_t *__restrict __dst, + __const char **__restrict __src, size_t __nmc, + size_t __len, mbstate_t *__restrict __ps) throw (); + + + +extern size_t wcsnrtombs (char *__restrict __dst, + __const wchar_t **__restrict __src, + size_t __nwc, size_t __len, + mbstate_t *__restrict __ps) throw (); + + + + + + +extern int wcwidth (wchar_t __c) throw (); + + + +extern int wcswidth (__const wchar_t *__s, size_t __n) throw (); + + + + + + +extern double wcstod (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) throw (); + + + + + +extern float wcstof (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) throw (); +extern long double wcstold (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) throw (); + + + + + + + +extern long int wcstol (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) throw (); + + + +extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + throw (); + + + + + + +__extension__ +extern long long int wcstoll (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + throw (); + + + +__extension__ +extern unsigned long long int wcstoull (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base) throw (); + + + + + + +__extension__ +extern long long int wcstoq (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + throw (); + + + +__extension__ +extern unsigned long long int wcstouq (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base) throw (); +# 527 "/usr/include/wchar.h" 3 4 +extern long int wcstol_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base, + __locale_t __loc) throw (); + +extern unsigned long int wcstoul_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, __locale_t __loc) throw (); + +__extension__ +extern long long int wcstoll_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, __locale_t __loc) throw (); + +__extension__ +extern unsigned long long int wcstoull_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, __locale_t __loc) + throw (); + +extern double wcstod_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, __locale_t __loc) + throw (); + +extern float wcstof_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, __locale_t __loc) + throw (); + +extern long double wcstold_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + __locale_t __loc) throw (); + + + + + + +extern wchar_t *wcpcpy (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src) throw (); + + + +extern wchar_t *wcpncpy (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n) + throw (); + + + + + + +extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) throw (); + + + + + + +extern int fwide (__FILE *__fp, int __mode) throw (); + + + + + + +extern int fwprintf (__FILE *__restrict __stream, + __const wchar_t *__restrict __format, ...) + ; + + + + +extern int wprintf (__const wchar_t *__restrict __format, ...) + ; + +extern int swprintf (wchar_t *__restrict __s, size_t __n, + __const wchar_t *__restrict __format, ...) + throw () ; + + + + + +extern int vfwprintf (__FILE *__restrict __s, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; + + + + +extern int vwprintf (__const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; + + +extern int vswprintf (wchar_t *__restrict __s, size_t __n, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + throw () ; + + + + + + +extern int fwscanf (__FILE *__restrict __stream, + __const wchar_t *__restrict __format, ...) + ; + + + + +extern int wscanf (__const wchar_t *__restrict __format, ...) + ; + +extern int swscanf (__const wchar_t *__restrict __s, + __const wchar_t *__restrict __format, ...) + throw () ; +# 677 "/usr/include/wchar.h" 3 4 + + + + + + + + + +extern int vfwscanf (__FILE *__restrict __s, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; + + + + +extern int vwscanf (__const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; + +extern int vswscanf (__const wchar_t *__restrict __s, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + throw () ; +# 733 "/usr/include/wchar.h" 3 4 + + + + + + + + + +extern wint_t fgetwc (__FILE *__stream); +extern wint_t getwc (__FILE *__stream); + + + + + +extern wint_t getwchar (void); + + + + + + +extern wint_t fputwc (wchar_t __wc, __FILE *__stream); +extern wint_t putwc (wchar_t __wc, __FILE *__stream); + + + + + +extern wint_t putwchar (wchar_t __wc); + + + + + + + +extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n, + __FILE *__restrict __stream); + + + + + +extern int fputws (__const wchar_t *__restrict __ws, + __FILE *__restrict __stream); + + + + + + +extern wint_t ungetwc (wint_t __wc, __FILE *__stream); + +# 798 "/usr/include/wchar.h" 3 4 +extern wint_t getwc_unlocked (__FILE *__stream); +extern wint_t getwchar_unlocked (void); + + + + + + + +extern wint_t fgetwc_unlocked (__FILE *__stream); + + + + + + + +extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream); +# 824 "/usr/include/wchar.h" 3 4 +extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream); +extern wint_t putwchar_unlocked (wchar_t __wc); +# 834 "/usr/include/wchar.h" 3 4 +extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n, + __FILE *__restrict __stream); + + + + + + + +extern int fputws_unlocked (__const wchar_t *__restrict __ws, + __FILE *__restrict __stream); + + + + + + + +extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize, + __const wchar_t *__restrict __format, + __const struct tm *__restrict __tp) throw (); + + + + + + + +extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, + __const wchar_t *__restrict __format, + __const struct tm *__restrict __tp, + __locale_t __loc) throw (); +# 881 "/usr/include/wchar.h" 3 4 +# 1 "/usr/include/bits/wchar2.h" 1 3 4 +# 25 "/usr/include/bits/wchar2.h" 3 4 +extern wchar_t *__wmemcpy_chk (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n, + size_t __ns1) throw (); +extern wchar_t *__wmemcpy_alias (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () __asm__ ("" "wmemcpy") + + + ; +extern wchar_t *__wmemcpy_chk_warn (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmemcpy_chk") + + + + __attribute__((__warning__ ("wmemcpy called with length bigger than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wmemcpy (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () + +{ + if (__builtin_object_size (__s1, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wmemcpy_chk (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + + if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t)) + return __wmemcpy_chk_warn (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + } + return __wmemcpy_alias (__s1, __s2, __n); +} + + +extern wchar_t *__wmemmove_chk (wchar_t *__s1, __const wchar_t *__s2, + size_t __n, size_t __ns1) throw (); +extern wchar_t *__wmemmove_alias (wchar_t *__s1, __const wchar_t *__s2, size_t __n) throw () __asm__ ("" "wmemmove") + + ; +extern wchar_t *__wmemmove_chk_warn (wchar_t *__s1, __const wchar_t *__s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmemmove_chk") + + + __attribute__((__warning__ ("wmemmove called with length bigger than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n) throw () +{ + if (__builtin_object_size (__s1, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wmemmove_chk (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + + if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t)) + return __wmemmove_chk_warn (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + } + return __wmemmove_alias (__s1, __s2, __n); +} + + + +extern wchar_t *__wmempcpy_chk (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n, + size_t __ns1) throw (); +extern wchar_t *__wmempcpy_alias (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () __asm__ ("" "wmempcpy") + + + ; +extern wchar_t *__wmempcpy_chk_warn (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmempcpy_chk") + + + + __attribute__((__warning__ ("wmempcpy called with length bigger than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wmempcpy (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () + +{ + if (__builtin_object_size (__s1, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wmempcpy_chk (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + + if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t)) + return __wmempcpy_chk_warn (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + } + return __wmempcpy_alias (__s1, __s2, __n); +} + + + +extern wchar_t *__wmemset_chk (wchar_t *__s, wchar_t __c, size_t __n, + size_t __ns) throw (); +extern wchar_t *__wmemset_alias (wchar_t *__s, wchar_t __c, size_t __n) throw () __asm__ ("" "wmemset") + ; +extern wchar_t *__wmemset_chk_warn (wchar_t *__s, wchar_t __c, size_t __n, size_t __ns) throw () __asm__ ("" "__wmemset_chk") + + + __attribute__((__warning__ ("wmemset called with length bigger than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw () +{ + if (__builtin_object_size (__s, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wmemset_chk (__s, __c, __n, __builtin_object_size (__s, 0) / sizeof (wchar_t)); + + if (__n > __builtin_object_size (__s, 0) / sizeof (wchar_t)) + return __wmemset_chk_warn (__s, __c, __n, + __builtin_object_size (__s, 0) / sizeof (wchar_t)); + } + return __wmemset_alias (__s, __c, __n); +} + + +extern wchar_t *__wcscpy_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, + size_t __n) throw (); +extern wchar_t *__wcscpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () __asm__ ("" "wcscpy") + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wcscpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + return __wcscpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + return __wcscpy_alias (__dest, __src); +} + + +extern wchar_t *__wcpcpy_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, + size_t __destlen) throw (); +extern wchar_t *__wcpcpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () __asm__ ("" "wcpcpy") + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wcpcpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + return __wcpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + return __wcpcpy_alias (__dest, __src); +} + + +extern wchar_t *__wcsncpy_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n, + size_t __destlen) throw (); +extern wchar_t *__wcsncpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcsncpy") + + + ; +extern wchar_t *__wcsncpy_chk_warn (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n, size_t __destlen) throw () __asm__ ("" "__wcsncpy_chk") + + + + __attribute__((__warning__ ("wcsncpy called with length bigger than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wcsncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () + +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wcsncpy_chk (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + if (__n > __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)) + return __wcsncpy_chk_warn (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + } + return __wcsncpy_alias (__dest, __src, __n); +} + + +extern wchar_t *__wcpncpy_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n, + size_t __destlen) throw (); +extern wchar_t *__wcpncpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcpncpy") + + + ; +extern wchar_t *__wcpncpy_chk_warn (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n, size_t __destlen) throw () __asm__ ("" "__wcpncpy_chk") + + + + __attribute__((__warning__ ("wcpncpy called with length bigger than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wcpncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () + +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wcpncpy_chk (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + if (__n > __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)) + return __wcpncpy_chk_warn (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + } + return __wcpncpy_alias (__dest, __src, __n); +} + + +extern wchar_t *__wcscat_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, + size_t __destlen) throw (); +extern wchar_t *__wcscat_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () __asm__ ("" "wcscat") + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wcscat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + return __wcscat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + return __wcscat_alias (__dest, __src); +} + + +extern wchar_t *__wcsncat_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, + size_t __n, size_t __destlen) throw (); +extern wchar_t *__wcsncat_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcsncat") + + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wcsncat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () + +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + return __wcsncat_chk (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + return __wcsncat_alias (__dest, __src, __n); +} + + +extern int __swprintf_chk (wchar_t *__restrict __s, size_t __n, + int __flag, size_t __s_len, + __const wchar_t *__restrict __format, ...) + throw () ; + +extern int __swprintf_alias (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, ...) throw () __asm__ ("" "swprintf") + + + ; + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +swprintf (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, ...) throw () + +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 || 2 > 1) + return __swprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __fmt, __builtin_va_arg_pack ()); + return __swprintf_alias (__s, __n, __fmt, __builtin_va_arg_pack ()); +} +# 304 "/usr/include/bits/wchar2.h" 3 4 +extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n, + int __flag, size_t __s_len, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + throw () ; + +extern int __vswprintf_alias (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, __gnuc_va_list __ap) throw () __asm__ ("" "vswprintf") + + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vswprintf (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, __gnuc_va_list __ap) throw () + +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 || 2 > 1) + return __vswprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), __fmt, __ap); + return __vswprintf_alias (__s, __n, __fmt, __ap); +} + + + + +extern int __fwprintf_chk (__FILE *__restrict __stream, int __flag, + __const wchar_t *__restrict __format, ...); +extern int __wprintf_chk (int __flag, __const wchar_t *__restrict __format, + ...); +extern int __vfwprintf_chk (__FILE *__restrict __stream, int __flag, + __const wchar_t *__restrict __format, + __gnuc_va_list __ap); +extern int __vwprintf_chk (int __flag, __const wchar_t *__restrict __format, + __gnuc_va_list __ap); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +wprintf (__const wchar_t *__restrict __fmt, ...) +{ + return __wprintf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +fwprintf (__FILE *__restrict __stream, __const wchar_t *__restrict __fmt, ...) +{ + return __fwprintf_chk (__stream, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vwprintf (__const wchar_t *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vwprintf_chk (2 - 1, __fmt, __ap); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vfwprintf (__FILE *__restrict __stream, + __const wchar_t *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vfwprintf_chk (__stream, 2 - 1, __fmt, __ap); +} + + + +extern wchar_t *__fgetws_chk (wchar_t *__restrict __s, size_t __size, int __n, + __FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern wchar_t *__fgetws_alias (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) __asm__ ("" "fgetws") + + __attribute__ ((__warn_unused_result__)); +extern wchar_t *__fgetws_chk_warn (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __asm__ ("" "__fgetws_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgetws called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) wchar_t * +fgetws (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgetws_chk (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __n, __stream); + + if ((size_t) __n > __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t)) + return __fgetws_chk_warn (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __n, __stream); + } + return __fgetws_alias (__s, __n, __stream); +} + + +extern wchar_t *__fgetws_unlocked_chk (wchar_t *__restrict __s, size_t __size, + int __n, __FILE *__restrict __stream) + __attribute__ ((__warn_unused_result__)); +extern wchar_t *__fgetws_unlocked_alias (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) __asm__ ("" "fgetws_unlocked") + + + __attribute__ ((__warn_unused_result__)); +extern wchar_t *__fgetws_unlocked_chk_warn (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __asm__ ("" "__fgetws_unlocked_chk") + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgetws_unlocked called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) wchar_t * +fgetws_unlocked (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgetws_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __n, __stream); + + if ((size_t) __n > __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t)) + return __fgetws_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __n, __stream); + } + return __fgetws_unlocked_alias (__s, __n, __stream); +} + + + +extern size_t __wcrtomb_chk (char *__restrict __s, wchar_t __wchar, + mbstate_t *__restrict __p, + size_t __buflen) throw () __attribute__ ((__warn_unused_result__)); +extern size_t __wcrtomb_alias (char *__restrict __s, wchar_t __wchar, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcrtomb") + + __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +wcrtomb (char *__restrict __s, wchar_t __wchar, mbstate_t *__restrict __ps) throw () + +{ + + + +#define __WCHAR_MB_LEN_MAX 16 + + + + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) + return __wcrtomb_chk (__s, __wchar, __ps, __builtin_object_size (__s, 2 > 1)); + return __wcrtomb_alias (__s, __wchar, __ps); +} + + +extern size_t __mbsrtowcs_chk (wchar_t *__restrict __dst, + __const char **__restrict __src, + size_t __len, mbstate_t *__restrict __ps, + size_t __dstlen) throw (); +extern size_t __mbsrtowcs_alias (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "mbsrtowcs") + + + + ; +extern size_t __mbsrtowcs_chk_warn (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__mbsrtowcs_chk") + + + + + __attribute__((__warning__ ("mbsrtowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +mbsrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __mbsrtowcs_chk (__dst, __src, __len, __ps, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + + if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) + return __mbsrtowcs_chk_warn (__dst, __src, __len, __ps, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + } + return __mbsrtowcs_alias (__dst, __src, __len, __ps); +} + + +extern size_t __wcsrtombs_chk (char *__restrict __dst, + __const wchar_t **__restrict __src, + size_t __len, mbstate_t *__restrict __ps, + size_t __dstlen) throw (); +extern size_t __wcsrtombs_alias (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcsrtombs") + + + + ; +extern size_t __wcsrtombs_chk_warn (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__wcsrtombs_chk") + + + + + __attribute__((__warning__ ("wcsrtombs called with dst buffer smaller than len"))); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +wcsrtombs (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __wcsrtombs_chk (__dst, __src, __len, __ps, __builtin_object_size (__dst, 2 > 1)); + + if (__len > __builtin_object_size (__dst, 2 > 1)) + return __wcsrtombs_chk_warn (__dst, __src, __len, __ps, __builtin_object_size (__dst, 2 > 1)); + } + return __wcsrtombs_alias (__dst, __src, __len, __ps); +} + + + +extern size_t __mbsnrtowcs_chk (wchar_t *__restrict __dst, + __const char **__restrict __src, size_t __nmc, + size_t __len, mbstate_t *__restrict __ps, + size_t __dstlen) throw (); +extern size_t __mbsnrtowcs_alias (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "mbsnrtowcs") + + + + ; +extern size_t __mbsnrtowcs_chk_warn (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__mbsnrtowcs_chk") + + + + + __attribute__((__warning__ ("mbsnrtowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +mbsnrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) throw () + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __mbsnrtowcs_chk (__dst, __src, __nmc, __len, __ps, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + + if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) + return __mbsnrtowcs_chk_warn (__dst, __src, __nmc, __len, __ps, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + } + return __mbsnrtowcs_alias (__dst, __src, __nmc, __len, __ps); +} + + +extern size_t __wcsnrtombs_chk (char *__restrict __dst, + __const wchar_t **__restrict __src, + size_t __nwc, size_t __len, + mbstate_t *__restrict __ps, size_t __dstlen) + throw (); +extern size_t __wcsnrtombs_alias (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcsnrtombs") + + + + ; +extern size_t __wcsnrtombs_chk_warn (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__wcsnrtombs_chk") + + + + + + __attribute__((__warning__ ("wcsnrtombs called with dst buffer smaller than len"))); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +wcsnrtombs (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) throw () + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __wcsnrtombs_chk (__dst, __src, __nwc, __len, __ps, + __builtin_object_size (__dst, 2 > 1)); + + if (__len > __builtin_object_size (__dst, 2 > 1)) + return __wcsnrtombs_chk_warn (__dst, __src, __nwc, __len, __ps, + __builtin_object_size (__dst, 2 > 1)); + } + return __wcsnrtombs_alias (__dst, __src, __nwc, __len, __ps); +} +# 882 "/usr/include/wchar.h" 2 3 4 + + + + + + +} + + + + + + + +#undef __need_mbstate_t +#undef __need_wint_t +# 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cwchar" 2 3 + + + +#define _GLIBCXX_CWCHAR 1 +# 65 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cwchar" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + using ::mbstate_t; + +} + + +#undef btowc +#undef fgetwc +#undef fgetws +#undef fputwc +#undef fputws +#undef fwide +#undef fwprintf +#undef fwscanf +#undef getwc +#undef getwchar +#undef mbrlen +#undef mbrtowc +#undef mbsinit +#undef mbsrtowcs +#undef putwc +#undef putwchar +#undef swprintf +#undef swscanf +#undef ungetwc +#undef vfwprintf + +#undef vfwscanf + +#undef vswprintf + +#undef vswscanf + +#undef vwprintf + +#undef vwscanf + +#undef wcrtomb +#undef wcscat +#undef wcschr +#undef wcscmp +#undef wcscoll +#undef wcscpy +#undef wcscspn +#undef wcsftime +#undef wcslen +#undef wcsncat +#undef wcsncmp +#undef wcsncpy +#undef wcspbrk +#undef wcsrchr +#undef wcsrtombs +#undef wcsspn +#undef wcsstr +#undef wcstod + +#undef wcstof + +#undef wcstok +#undef wcstol +#undef wcstoul +#undef wcsxfrm +#undef wctob +#undef wmemchr +#undef wmemcmp +#undef wmemcpy +#undef wmemmove +#undef wmemset +#undef wprintf +#undef wscanf + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + using ::wint_t; + + using ::btowc; + using ::fgetwc; + using ::fgetws; + using ::fputwc; + using ::fputws; + using ::fwide; + using ::fwprintf; + using ::fwscanf; + using ::getwc; + using ::getwchar; + using ::mbrlen; + using ::mbrtowc; + using ::mbsinit; + using ::mbsrtowcs; + using ::putwc; + using ::putwchar; + + using ::swprintf; + + using ::swscanf; + using ::ungetwc; + using ::vfwprintf; + + using ::vfwscanf; + + + using ::vswprintf; + + + using ::vswscanf; + + using ::vwprintf; + + using ::vwscanf; + + using ::wcrtomb; + using ::wcscat; + using ::wcscmp; + using ::wcscoll; + using ::wcscpy; + using ::wcscspn; + using ::wcsftime; + using ::wcslen; + using ::wcsncat; + using ::wcsncmp; + using ::wcsncpy; + using ::wcsrtombs; + using ::wcsspn; + using ::wcstod; + + using ::wcstof; + + using ::wcstok; + using ::wcstol; + using ::wcstoul; + using ::wcsxfrm; + using ::wctob; + using ::wmemcmp; + using ::wmemcpy; + using ::wmemmove; + using ::wmemset; + using ::wprintf; + using ::wscanf; + using ::wcschr; + using ::wcspbrk; + using ::wcsrchr; + using ::wcsstr; + using ::wmemchr; +# 234 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cwchar" 3 +} + + + +#undef wcstold +#undef wcstoll +#undef wcstoull + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + + + + + + + using ::wcstold; +# 258 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cwchar" 3 + using ::wcstoll; + using ::wcstoull; + + +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + + using ::__gnu_cxx::wcstold; + using ::__gnu_cxx::wcstoll; + using ::__gnu_cxx::wcstoull; + +} +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/postypes.h" 2 3 +# 70 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/postypes.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { +# 88 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/postypes.h" 3 + typedef long streamoff; +# 98 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/postypes.h" 3 + typedef ptrdiff_t streamsize; +# 111 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/postypes.h" 3 + template + class fpos + { + private: + streamoff _M_off; + _StateT _M_state; + + public: + + + + + fpos() + : _M_off(0), _M_state() { } +# 133 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/postypes.h" 3 + fpos(streamoff __off) + : _M_off(__off), _M_state() { } + + + operator streamoff() const { return _M_off; } + + + void + state(_StateT __st) + { _M_state = __st; } + + + _StateT + state() const + { return _M_state; } + + + + + + fpos& + operator+=(streamoff __off) + { + _M_off += __off; + return *this; + } + + + + + + fpos& + operator-=(streamoff __off) + { + _M_off -= __off; + return *this; + } + + + + + + + + fpos + operator+(streamoff __off) const + { + fpos __pos(*this); + __pos += __off; + return __pos; + } + + + + + + + + fpos + operator-(streamoff __off) const + { + fpos __pos(*this); + __pos -= __off; + return __pos; + } + + + + + + + streamoff + operator-(const fpos& __other) const + { return _M_off - __other._M_off; } + }; + + + + + + + template + inline bool + operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) + { return streamoff(__lhs) == streamoff(__rhs); } + + template + inline bool + operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) + { return streamoff(__lhs) != streamoff(__rhs); } + + + + + + typedef fpos streampos; + + typedef fpos wstreampos; +# 239 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/postypes.h" 3 +} +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/iosfwd" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 74 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/iosfwd" 3 + class ios_base; + + template > + class basic_ios; + + template > + class basic_streambuf; + + template > + class basic_istream; + + template > + class basic_ostream; + + template > + class basic_iostream; + + template, + typename _Alloc = allocator<_CharT> > + class basic_stringbuf; + + template, + typename _Alloc = allocator<_CharT> > + class basic_istringstream; + + template, + typename _Alloc = allocator<_CharT> > + class basic_ostringstream; + + template, + typename _Alloc = allocator<_CharT> > + class basic_stringstream; + + template > + class basic_filebuf; + + template > + class basic_ifstream; + + template > + class basic_ofstream; + + template > + class basic_fstream; + + template > + class istreambuf_iterator; + + template > + class ostreambuf_iterator; + + + + + typedef basic_ios ios; + typedef basic_streambuf streambuf; + typedef basic_istream istream; + typedef basic_ostream ostream; + typedef basic_iostream iostream; + typedef basic_stringbuf stringbuf; + typedef basic_istringstream istringstream; + typedef basic_ostringstream ostringstream; + typedef basic_stringstream stringstream; + typedef basic_filebuf filebuf; + typedef basic_ifstream ifstream; + typedef basic_ofstream ofstream; + typedef basic_fstream fstream; + + + typedef basic_ios wios; + typedef basic_streambuf wstreambuf; + typedef basic_istream wistream; + typedef basic_ostream wostream; + typedef basic_iostream wiostream; + typedef basic_stringbuf wstringbuf; + typedef basic_istringstream wistringstream; + typedef basic_ostringstream wostringstream; + typedef basic_stringstream wstringstream; + typedef basic_filebuf wfilebuf; + typedef basic_ifstream wifstream; + typedef basic_ofstream wofstream; + typedef basic_fstream wfstream; + + + +} +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ios" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/exception" 1 3 +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/exception" 3 +#define __EXCEPTION__ + + +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/exception" 3 + +#pragma GCC visibility push(default) + + + +extern "C++" { + +namespace std +{ +# 61 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/exception" 3 + class exception + { + public: + exception() throw() { } + virtual ~exception() throw(); + + + + virtual const char* what() const throw(); + }; + + + + class bad_exception : public exception + { + public: + bad_exception() throw() { } + + + + virtual ~bad_exception() throw(); + + + virtual const char* what() const throw(); + }; + + + typedef void (*terminate_handler) (); + + + typedef void (*unexpected_handler) (); + + + terminate_handler set_terminate(terminate_handler) throw(); + + + + void terminate() throw() __attribute__ ((__noreturn__)); + + + unexpected_handler set_unexpected(unexpected_handler) throw(); + + + + void unexpected() __attribute__ ((__noreturn__)); +# 118 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/exception" 3 + bool uncaught_exception() throw() __attribute__ ((__pure__)); + + +} + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { +# 141 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/exception" 3 + void __verbose_terminate_handler(); + +} + +} + +#pragma GCC visibility pop +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ios" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/char_traits.h" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/char_traits.h" 3 +#define _CHAR_TRAITS_H 1 + + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/char_traits.h" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 1 3 +# 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 3 +#define _STL_ALGOBASE_H 1 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 2 3 +# 62 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/functexcept.h" 1 3 +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/functexcept.h" 3 +#define _FUNCTEXCEPT_H 1 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/exception_defines.h" 1 3 +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/exception_defines.h" 3 +#define _EXCEPTION_DEFINES_H 1 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/exception_defines.h" 3 +#define __try try +#define __catch(X) catch(X) +#define __throw_exception_again throw +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/functexcept.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + void + __throw_bad_exception(void) __attribute__((__noreturn__)); + + + void + __throw_bad_alloc(void) __attribute__((__noreturn__)); + + + void + __throw_bad_cast(void) __attribute__((__noreturn__)); + + void + __throw_bad_typeid(void) __attribute__((__noreturn__)); + + + void + __throw_logic_error(const char*) __attribute__((__noreturn__)); + + void + __throw_domain_error(const char*) __attribute__((__noreturn__)); + + void + __throw_invalid_argument(const char*) __attribute__((__noreturn__)); + + void + __throw_length_error(const char*) __attribute__((__noreturn__)); + + void + __throw_out_of_range(const char*) __attribute__((__noreturn__)); + + void + __throw_runtime_error(const char*) __attribute__((__noreturn__)); + + void + __throw_range_error(const char*) __attribute__((__noreturn__)); + + void + __throw_overflow_error(const char*) __attribute__((__noreturn__)); + + void + __throw_underflow_error(const char*) __attribute__((__noreturn__)); + + + void + __throw_ios_failure(const char*) __attribute__((__noreturn__)); + + void + __throw_system_error(int) __attribute__((__noreturn__)); + + void + __throw_future_error(int) __attribute__((__noreturn__)); + + + void + __throw_bad_function_call() __attribute__((__noreturn__)); + +} +# 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/cpp_type_traits.h" 1 3 +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/cpp_type_traits.h" 3 +#define _CPP_TYPE_TRAITS_H 1 + + +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/cpp_type_traits.h" 3 +# 69 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/cpp_type_traits.h" 3 +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + + template + class __normal_iterator; + +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + + struct __true_type { }; + struct __false_type { }; + + template + struct __truth_type + { typedef __false_type __type; }; + + template<> + struct __truth_type + { typedef __true_type __type; }; + + + + template + struct __traitor + { + enum { __value = bool(_Sp::__value) || bool(_Tp::__value) }; + typedef typename __truth_type<__value>::__type __type; + }; + + + template + struct __are_same + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template + struct __are_same<_Tp, _Tp> + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template + struct __is_void + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template<> + struct __is_void + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_integer + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + + + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; +# 194 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/cpp_type_traits.h" 3 + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_floating + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_pointer + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template + struct __is_pointer<_Tp*> + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_normal_iterator + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template + struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator, + _Container> > + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_arithmetic + : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > + { }; + + + + + template + struct __is_fundamental + : public __traitor<__is_void<_Tp>, __is_arithmetic<_Tp> > + { }; + + + + + template + struct __is_scalar + : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > + { }; + + + + + template + struct __is_char + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template<> + struct __is_char + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template<> + struct __is_char + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template + struct __is_byte + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_move_iterator + { + enum { __value = 0 }; + typedef __false_type __type; + }; +# 417 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/cpp_type_traits.h" 3 + template + class __is_iterator_helper + { + typedef char __one; + typedef struct { char __arr[2]; } __two; + + template + struct _Wrap_type + { }; + + template + static __one __test(_Wrap_type*); + + template + static __two __test(...); + + public: + static const bool __value = (sizeof(__test<_Tp>(0)) == 1 + || __is_pointer<_Tp>::__value); + }; + + template + struct __is_iterator + { + enum { __value = __is_iterator_helper<_Tp>::__value }; + typedef typename __truth_type<__value>::__type __type; + }; + +} +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ext/type_traits.h" 1 3 +# 30 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ext/type_traits.h" 3 +#define _EXT_TYPE_TRAITS 1 + + +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ext/type_traits.h" 3 + + + + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + + + template + struct __enable_if + { }; + + template + struct __enable_if + { typedef _Tp __type; }; + + + + template + struct __conditional_type + { typedef _Iftrue __type; }; + + template + struct __conditional_type + { typedef _Iffalse __type; }; + + + + template + struct __add_unsigned + { + private: + typedef __enable_if::__value, _Tp> __if_type; + + public: + typedef typename __if_type::__type __type; + }; + + template<> + struct __add_unsigned + { typedef unsigned char __type; }; + + template<> + struct __add_unsigned + { typedef unsigned char __type; }; + + template<> + struct __add_unsigned + { typedef unsigned short __type; }; + + template<> + struct __add_unsigned + { typedef unsigned int __type; }; + + template<> + struct __add_unsigned + { typedef unsigned long __type; }; + + template<> + struct __add_unsigned + { typedef unsigned long long __type; }; + + + template<> + struct __add_unsigned; + + template<> + struct __add_unsigned; + + + + template + struct __remove_unsigned + { + private: + typedef __enable_if::__value, _Tp> __if_type; + + public: + typedef typename __if_type::__type __type; + }; + + template<> + struct __remove_unsigned + { typedef signed char __type; }; + + template<> + struct __remove_unsigned + { typedef signed char __type; }; + + template<> + struct __remove_unsigned + { typedef short __type; }; + + template<> + struct __remove_unsigned + { typedef int __type; }; + + template<> + struct __remove_unsigned + { typedef long __type; }; + + template<> + struct __remove_unsigned + { typedef long long __type; }; + + + template<> + struct __remove_unsigned; + + template<> + struct __remove_unsigned; + + + + template + inline bool + __is_null_pointer(_Type* __ptr) + { return __ptr == 0; } + + template + inline bool + __is_null_pointer(_Type) + { return false; } + + + + template::__value> + struct __promote + { typedef double __type; }; + + template + struct __promote<_Tp, false> + { typedef _Tp __type; }; + + template + struct __promote_2 + { + private: + typedef typename __promote<_Tp>::__type __type1; + typedef typename __promote<_Up>::__type __type2; + + public: + typedef __typeof__(__type1() + __type2()) __type; + }; + + template + struct __promote_3 + { + private: + typedef typename __promote<_Tp>::__type __type1; + typedef typename __promote<_Up>::__type __type2; + typedef typename __promote<_Vp>::__type __type3; + + public: + typedef __typeof__(__type1() + __type2() + __type3()) __type; + }; + + template + struct __promote_4 + { + private: + typedef typename __promote<_Tp>::__type __type1; + typedef typename __promote<_Up>::__type __type2; + typedef typename __promote<_Vp>::__type __type3; + typedef typename __promote<_Wp>::__type __type4; + + public: + typedef __typeof__(__type1() + __type2() + __type3() + __type4()) __type; + }; + +} +# 65 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ext/numeric_traits.h" 1 3 +# 30 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ext/numeric_traits.h" 3 +#define _EXT_NUMERIC_TRAITS 1 + + +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ext/numeric_traits.h" 3 + + + + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + + + +#define __glibcxx_signed(_Tp) ((_Tp)(-1) < 0) +#define __glibcxx_digits(_Tp) (sizeof(_Tp) * __CHAR_BIT__ - __glibcxx_signed(_Tp)) + + +#define __glibcxx_min(_Tp) (__glibcxx_signed(_Tp) ? (_Tp)1 << __glibcxx_digits(_Tp) : (_Tp)0) + + +#define __glibcxx_max(_Tp) (__glibcxx_signed(_Tp) ? (((((_Tp)1 << (__glibcxx_digits(_Tp) - 1)) - 1) << 1) + 1) : ~(_Tp)0) + + + + template + struct __numeric_traits_integer + { + + static const _Value __min = (((_Value)(-1) < 0) ? (_Value)1 << (sizeof(_Value) * 8 - ((_Value)(-1) < 0)) : (_Value)0); + static const _Value __max = (((_Value)(-1) < 0) ? (((((_Value)1 << ((sizeof(_Value) * 8 - ((_Value)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(_Value)0); + + + + static const bool __is_signed = ((_Value)(-1) < 0); + static const int __digits = (sizeof(_Value) * 8 - ((_Value)(-1) < 0)); + }; + + template + const _Value __numeric_traits_integer<_Value>::__min; + + template + const _Value __numeric_traits_integer<_Value>::__max; + + template + const bool __numeric_traits_integer<_Value>::__is_signed; + + template + const int __numeric_traits_integer<_Value>::__digits; + +#undef __glibcxx_signed +#undef __glibcxx_digits +#undef __glibcxx_min +#undef __glibcxx_max + +#define __glibcxx_floating(_Tp,_Fval,_Dval,_LDval) (std::__are_same<_Tp, float>::__value ? _Fval : std::__are_same<_Tp, double>::__value ? _Dval : _LDval) + + + +#define __glibcxx_max_digits10(_Tp) (2 + __glibcxx_floating(_Tp, __FLT_MANT_DIG__, __DBL_MANT_DIG__, __LDBL_MANT_DIG__) * 3010 / 10000) + + + +#define __glibcxx_digits10(_Tp) __glibcxx_floating(_Tp, __FLT_DIG__, __DBL_DIG__, __LDBL_DIG__) + + +#define __glibcxx_max_exponent10(_Tp) __glibcxx_floating(_Tp, __FLT_MAX_10_EXP__, __DBL_MAX_10_EXP__, __LDBL_MAX_10_EXP__) + + + + template + struct __numeric_traits_floating + { + + static const int __max_digits10 = (2 + (std::__are_same<_Value, float>::__value ? 24 : std::__are_same<_Value, double>::__value ? 53 : 64) * 3010 / 10000); + + + static const bool __is_signed = true; + static const int __digits10 = (std::__are_same<_Value, float>::__value ? 6 : std::__are_same<_Value, double>::__value ? 15 : 18); + static const int __max_exponent10 = (std::__are_same<_Value, float>::__value ? 38 : std::__are_same<_Value, double>::__value ? 308 : 4932); + }; + + template + const int __numeric_traits_floating<_Value>::__max_digits10; + + template + const bool __numeric_traits_floating<_Value>::__is_signed; + + template + const int __numeric_traits_floating<_Value>::__digits10; + + template + const int __numeric_traits_floating<_Value>::__max_exponent10; + + template + struct __numeric_traits + : public __conditional_type::__value, + __numeric_traits_integer<_Value>, + __numeric_traits_floating<_Value> >::__type + { }; + +} + +#undef __glibcxx_floating +#undef __glibcxx_max_digits10 +#undef __glibcxx_digits10 +#undef __glibcxx_max_exponent10 +# 66 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_pair.h" 1 3 +# 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_pair.h" 3 +#define _STL_PAIR_H 1 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/move.h" 1 3 +# 31 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/move.h" 3 +#define _MOVE_H 1 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 2 3 +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/move.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/concept_check.h" 1 3 +# 31 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/concept_check.h" 3 +#define _CONCEPT_CHECK_H 1 + + +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/concept_check.h" 3 +# 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/concept_check.h" 3 +#define __glibcxx_function_requires(...) +#define __glibcxx_class_requires(_a,_b) +#define __glibcxx_class_requires2(_a,_b,_c) +#define __glibcxx_class_requires3(_a,_b,_c,_d) +#define __glibcxx_class_requires4(_a,_b,_c,_d,_e) +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/move.h" 2 3 +# 91 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/move.h" 3 +#define _GLIBCXX_MOVE(_Tp) (_Tp) +#define _GLIBCXX_FORWARD(_Tp,__val) (__val) + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 104 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/move.h" 3 + template + inline void + swap(_Tp& __a, _Tp& __b) + { + + + + _Tp __tmp = (__a); + __a = (__b); + __b = (__tmp); + } + + + + template + inline void + swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) + { + for (size_t __n = 0; __n < _Nm; ++__n) + swap(__a[__n], __b[__n]); + } + +} +# 61 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_pair.h" 2 3 + + + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + template + struct pair + { + typedef _T1 first_type; + typedef _T2 second_type; + + _T1 first; + _T2 second; + + + + + + pair() + : first(), second() { } + + + pair(const _T1& __a, const _T2& __b) + : first(__a), second(__b) { } +# 113 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_pair.h" 3 + template + pair(const pair<_U1, _U2>& __p) + : first(__p.first), + second(__p.second) { } +# 149 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_pair.h" 3 + }; + + + template + inline bool + operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __x.first == __y.first && __x.second == __y.second; } + + + template + inline bool + operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __x.first < __y.first + || (!(__y.first < __x.first) && __x.second < __y.second); } + + + template + inline bool + operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return !(__x == __y); } + + + template + inline bool + operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __y < __x; } + + + template + inline bool + operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return !(__y < __x); } + + + template + inline bool + operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return !(__x < __y); } +# 211 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_pair.h" 3 + template + inline pair<_T1, _T2> + make_pair(_T1 __x, _T2 __y) + { return pair<_T1, _T2>(__x, __y); } +# 257 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_pair.h" 3 +} +# 67 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator_base_types.h" 1 3 +# 61 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator_base_types.h" 3 +#define _STL_ITERATOR_BASE_TYPES_H 1 + + +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator_base_types.h" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 2 3 +# 67 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator_base_types.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 85 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator_base_types.h" 3 + struct input_iterator_tag { }; + + + struct output_iterator_tag { }; + + + struct forward_iterator_tag : public input_iterator_tag { }; + + + + struct bidirectional_iterator_tag : public forward_iterator_tag { }; + + + + struct random_access_iterator_tag : public bidirectional_iterator_tag { }; +# 112 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator_base_types.h" 3 + template + struct iterator + { + + typedef _Category iterator_category; + + typedef _Tp value_type; + + typedef _Distance difference_type; + + typedef _Pointer pointer; + + typedef _Reference reference; + }; +# 136 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator_base_types.h" 3 + template + struct iterator_traits + { + typedef typename _Iterator::iterator_category iterator_category; + typedef typename _Iterator::value_type value_type; + typedef typename _Iterator::difference_type difference_type; + typedef typename _Iterator::pointer pointer; + typedef typename _Iterator::reference reference; + }; + + + template + struct iterator_traits<_Tp*> + { + typedef random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef _Tp& reference; + }; + + + template + struct iterator_traits + { + typedef random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef ptrdiff_t difference_type; + typedef const _Tp* pointer; + typedef const _Tp& reference; + }; + + + + + + template + inline typename iterator_traits<_Iter>::iterator_category + __iterator_category(const _Iter&) + { return typename iterator_traits<_Iter>::iterator_category(); } + + + +} +# 68 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator_base_funcs.h" 1 3 +# 61 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 +#define _STL_ITERATOR_BASE_FUNCS_H 1 + + +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + inline typename iterator_traits<_InputIterator>::difference_type + __distance(_InputIterator __first, _InputIterator __last, + input_iterator_tag) + { + + + + typename iterator_traits<_InputIterator>::difference_type __n = 0; + while (__first != __last) + { + ++__first; + ++__n; + } + return __n; + } + + template + inline typename iterator_traits<_RandomAccessIterator>::difference_type + __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, + random_access_iterator_tag) + { + + + + return __last - __first; + } +# 109 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 + template + inline typename iterator_traits<_InputIterator>::difference_type + distance(_InputIterator __first, _InputIterator __last) + { + + return std::__distance(__first, __last, + std::__iterator_category(__first)); + } + + template + inline void + __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) + { + + + while (__n--) + ++__i; + } + + template + inline void + __advance(_BidirectionalIterator& __i, _Distance __n, + bidirectional_iterator_tag) + { + + + + if (__n > 0) + while (__n--) + ++__i; + else + while (__n++) + --__i; + } + + template + inline void + __advance(_RandomAccessIterator& __i, _Distance __n, + random_access_iterator_tag) + { + + + + __i += __n; + } +# 167 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 + template + inline void + advance(_InputIterator& __i, _Distance __n) + { + + typename iterator_traits<_InputIterator>::difference_type __d = __n; + std::__advance(__i, __d, std::__iterator_category(__i)); + } + +} +# 69 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator.h" 1 3 +# 62 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator.h" 3 +#define _STL_ITERATOR_H 1 + + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 94 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator.h" 3 + template + class reverse_iterator + : public iterator::iterator_category, + typename iterator_traits<_Iterator>::value_type, + typename iterator_traits<_Iterator>::difference_type, + typename iterator_traits<_Iterator>::pointer, + typename iterator_traits<_Iterator>::reference> + { + protected: + _Iterator current; + + typedef iterator_traits<_Iterator> __traits_type; + + public: + typedef _Iterator iterator_type; + typedef typename __traits_type::difference_type difference_type; + typedef typename __traits_type::pointer pointer; + typedef typename __traits_type::reference reference; + + + + + + + + reverse_iterator() : current() { } + + + + + explicit + reverse_iterator(iterator_type __x) : current(__x) { } + + + + + reverse_iterator(const reverse_iterator& __x) + : current(__x.current) { } + + + + + + template + reverse_iterator(const reverse_iterator<_Iter>& __x) + : current(__x.base()) { } + + + + + iterator_type + base() const + { return current; } + + + + + + + reference + operator*() const + { + _Iterator __tmp = current; + return *--__tmp; + } + + + + + + + pointer + operator->() const + { return &(operator*()); } + + + + + + + reverse_iterator& + operator++() + { + --current; + return *this; + } + + + + + + + reverse_iterator + operator++(int) + { + reverse_iterator __tmp = *this; + --current; + return __tmp; + } + + + + + + + reverse_iterator& + operator--() + { + ++current; + return *this; + } + + + + + + + reverse_iterator + operator--(int) + { + reverse_iterator __tmp = *this; + ++current; + return __tmp; + } + + + + + + + reverse_iterator + operator+(difference_type __n) const + { return reverse_iterator(current - __n); } + + + + + + + reverse_iterator& + operator+=(difference_type __n) + { + current -= __n; + return *this; + } + + + + + + + reverse_iterator + operator-(difference_type __n) const + { return reverse_iterator(current + __n); } + + + + + + + reverse_iterator& + operator-=(difference_type __n) + { + current += __n; + return *this; + } + + + + + + + reference + operator[](difference_type __n) const + { return *(*this + __n); } + }; +# 281 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator.h" 3 + template + inline bool + operator==(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return __x.base() == __y.base(); } + + template + inline bool + operator<(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return __y.base() < __x.base(); } + + template + inline bool + operator!=(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return !(__x == __y); } + + template + inline bool + operator>(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return __y < __x; } + + template + inline bool + operator<=(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return !(__y < __x); } + + template + inline bool + operator>=(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return !(__x < __y); } + + template + inline typename reverse_iterator<_Iterator>::difference_type + operator-(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return __y.base() - __x.base(); } + + template + inline reverse_iterator<_Iterator> + operator+(typename reverse_iterator<_Iterator>::difference_type __n, + const reverse_iterator<_Iterator>& __x) + { return reverse_iterator<_Iterator>(__x.base() - __n); } + + + + template + inline bool + operator==(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __x.base() == __y.base(); } + + template + inline bool + operator<(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __y.base() < __x.base(); } + + template + inline bool + operator!=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return !(__x == __y); } + + template + inline bool + operator>(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __y < __x; } + + template + inline bool + operator<=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return !(__y < __x); } + + template + inline bool + operator>=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return !(__x < __y); } + + template + + + + + + + + inline typename reverse_iterator<_IteratorL>::difference_type + operator-(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + + { return __y.base() - __x.base(); } +# 393 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator.h" 3 + template + class back_insert_iterator + : public iterator + { + protected: + _Container* container; + + public: + + typedef _Container container_type; + + + explicit + back_insert_iterator(_Container& __x) : container(&__x) { } +# 420 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator.h" 3 + back_insert_iterator& + operator=(typename _Container::const_reference __value) + { + container->push_back(__value); + return *this; + } +# 443 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator.h" 3 + back_insert_iterator& + operator*() + { return *this; } + + + back_insert_iterator& + operator++() + { return *this; } + + + back_insert_iterator + operator++(int) + { return *this; } + }; +# 469 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator.h" 3 + template + inline back_insert_iterator<_Container> + back_inserter(_Container& __x) + { return back_insert_iterator<_Container>(__x); } +# 484 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator.h" 3 + template + class front_insert_iterator + : public iterator + { + protected: + _Container* container; + + public: + + typedef _Container container_type; + + + explicit front_insert_iterator(_Container& __x) : container(&__x) { } +# 510 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator.h" 3 + front_insert_iterator& + operator=(typename _Container::const_reference __value) + { + container->push_front(__value); + return *this; + } +# 533 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator.h" 3 + front_insert_iterator& + operator*() + { return *this; } + + + front_insert_iterator& + operator++() + { return *this; } + + + front_insert_iterator + operator++(int) + { return *this; } + }; +# 559 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator.h" 3 + template + inline front_insert_iterator<_Container> + front_inserter(_Container& __x) + { return front_insert_iterator<_Container>(__x); } +# 578 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator.h" 3 + template + class insert_iterator + : public iterator + { + protected: + _Container* container; + typename _Container::iterator iter; + + public: + + typedef _Container container_type; + + + + + + insert_iterator(_Container& __x, typename _Container::iterator __i) + : container(&__x), iter(__i) {} +# 621 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator.h" 3 + insert_iterator& + operator=(typename _Container::const_reference __value) + { + iter = container->insert(iter, __value); + ++iter; + return *this; + } +# 647 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator.h" 3 + insert_iterator& + operator*() + { return *this; } + + + insert_iterator& + operator++() + { return *this; } + + + insert_iterator& + operator++(int) + { return *this; } + }; +# 673 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator.h" 3 + template + inline insert_iterator<_Container> + inserter(_Container& __x, _Iterator __i) + { + return insert_iterator<_Container>(__x, + typename _Container::iterator(__i)); + } + + + +} + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { +# 694 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator.h" 3 + using std::iterator_traits; + using std::iterator; + template + class __normal_iterator + { + protected: + _Iterator _M_current; + + typedef iterator_traits<_Iterator> __traits_type; + + public: + typedef _Iterator iterator_type; + typedef typename __traits_type::iterator_category iterator_category; + typedef typename __traits_type::value_type value_type; + typedef typename __traits_type::difference_type difference_type; + typedef typename __traits_type::reference reference; + typedef typename __traits_type::pointer pointer; + + __normal_iterator() : _M_current(_Iterator()) { } + + explicit + __normal_iterator(const _Iterator& __i) : _M_current(__i) { } + + + template + __normal_iterator(const __normal_iterator<_Iter, + typename __enable_if< + (std::__are_same<_Iter, typename _Container::pointer>::__value), + _Container>::__type>& __i) + : _M_current(__i.base()) { } + + + reference + operator*() const + { return *_M_current; } + + pointer + operator->() const + { return _M_current; } + + __normal_iterator& + operator++() + { + ++_M_current; + return *this; + } + + __normal_iterator + operator++(int) + { return __normal_iterator(_M_current++); } + + + __normal_iterator& + operator--() + { + --_M_current; + return *this; + } + + __normal_iterator + operator--(int) + { return __normal_iterator(_M_current--); } + + + reference + operator[](const difference_type& __n) const + { return _M_current[__n]; } + + __normal_iterator& + operator+=(const difference_type& __n) + { _M_current += __n; return *this; } + + __normal_iterator + operator+(const difference_type& __n) const + { return __normal_iterator(_M_current + __n); } + + __normal_iterator& + operator-=(const difference_type& __n) + { _M_current -= __n; return *this; } + + __normal_iterator + operator-(const difference_type& __n) const + { return __normal_iterator(_M_current - __n); } + + const _Iterator& + base() const + { return _M_current; } + }; +# 792 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator.h" 3 + template + inline bool + operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() == __rhs.base(); } + + template + inline bool + operator==(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() == __rhs.base(); } + + template + inline bool + operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() != __rhs.base(); } + + template + inline bool + operator!=(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() != __rhs.base(); } + + + template + inline bool + operator<(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() < __rhs.base(); } + + template + inline bool + operator<(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() < __rhs.base(); } + + template + inline bool + operator>(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() > __rhs.base(); } + + template + inline bool + operator>(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() > __rhs.base(); } + + template + inline bool + operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() <= __rhs.base(); } + + template + inline bool + operator<=(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() <= __rhs.base(); } + + template + inline bool + operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() >= __rhs.base(); } + + template + inline bool + operator>=(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() >= __rhs.base(); } + + + + + + template + + + + + + + + inline typename __normal_iterator<_IteratorL, _Container>::difference_type + operator-(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + + { return __lhs.base() - __rhs.base(); } + + template + inline typename __normal_iterator<_Iterator, _Container>::difference_type + operator-(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() - __rhs.base(); } + + template + inline __normal_iterator<_Iterator, _Container> + operator+(typename __normal_iterator<_Iterator, _Container>::difference_type + __n, const __normal_iterator<_Iterator, _Container>& __i) + { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } + +} +# 1073 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_iterator.h" 3 +#define _GLIBCXX_MAKE_MOVE_ITERATOR(_Iter) (_Iter) +# 70 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 2 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/debug/debug.h" 1 3 +# 31 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/debug/debug.h" 3 +#define _GLIBCXX_DEBUG_MACRO_SWITCH_H 1 +# 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/debug/debug.h" 3 +namespace std +{ + namespace __debug { } +} + + + + +namespace __gnu_debug +{ + using namespace std::__debug; +} + + + +#define _GLIBCXX_DEBUG_ASSERT(_Condition) +#define _GLIBCXX_DEBUG_PEDASSERT(_Condition) +#define _GLIBCXX_DEBUG_ONLY(_Statement) ; +#define __glibcxx_requires_cond(_Cond,_Msg) +#define __glibcxx_requires_valid_range(_First,_Last) +#define __glibcxx_requires_sorted(_First,_Last) +#define __glibcxx_requires_sorted_pred(_First,_Last,_Pred) +#define __glibcxx_requires_sorted_set(_First1,_Last1,_First2) +#define __glibcxx_requires_sorted_set_pred(_First1,_Last1,_First2,_Pred) +#define __glibcxx_requires_partitioned_lower(_First,_Last,_Value) +#define __glibcxx_requires_partitioned_upper(_First,_Last,_Value) +#define __glibcxx_requires_partitioned_lower_pred(_First,_Last,_Value,_Pred) +#define __glibcxx_requires_partitioned_upper_pred(_First,_Last,_Value,_Pred) +#define __glibcxx_requires_heap(_First,_Last) +#define __glibcxx_requires_heap_pred(_First,_Last,_Pred) +#define __glibcxx_requires_nonempty() +#define __glibcxx_requires_string(_String) +#define __glibcxx_requires_string_len(_String,_Len) +#define __glibcxx_requires_subscript(_N) +# 72 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 2 3 + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + + + template + struct __iter_swap + { + template + static void + iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) + { + typedef typename iterator_traits<_ForwardIterator1>::value_type + _ValueType1; + _ValueType1 __tmp = (*__a); + *__a = (*__b); + *__b = (__tmp); + } + }; + + template<> + struct __iter_swap + { + template + static void + iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) + { + swap(*__a, *__b); + } + }; +# 115 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 3 + template + inline void + iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) + { + typedef typename iterator_traits<_ForwardIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_ForwardIterator2>::value_type + _ValueType2; + + + + + + + + + + + + typedef typename iterator_traits<_ForwardIterator1>::reference + _ReferenceType1; + typedef typename iterator_traits<_ForwardIterator2>::reference + _ReferenceType2; + std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value + && __are_same<_ValueType1&, _ReferenceType1>::__value + && __are_same<_ValueType2&, _ReferenceType2>::__value>:: + iter_swap(__a, __b); + } +# 156 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 3 + template + _ForwardIterator2 + swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2) + { + + + + + + ; + + for (; __first1 != __last1; ++__first1, ++__first2) + std::iter_swap(__first1, __first2); + return __first2; + } +# 184 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 3 + template + inline const _Tp& + min(const _Tp& __a, const _Tp& __b) + { + + + + if (__b < __a) + return __b; + return __a; + } +# 207 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 3 + template + inline const _Tp& + max(const _Tp& __a, const _Tp& __b) + { + + + + if (__a < __b) + return __b; + return __a; + } +# 230 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 3 + template + inline const _Tp& + min(const _Tp& __a, const _Tp& __b, _Compare __comp) + { + + if (__comp(__b, __a)) + return __b; + return __a; + } +# 251 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 3 + template + inline const _Tp& + max(const _Tp& __a, const _Tp& __b, _Compare __comp) + { + + if (__comp(__a, __b)) + return __b; + return __a; + } + + + + + template + struct _Iter_base + { + typedef _Iterator iterator_type; + static iterator_type + _S_base(_Iterator __it) + { return __it; } + }; + + template + struct _Iter_base<_Iterator, true> + { + typedef typename _Iterator::iterator_type iterator_type; + static iterator_type + _S_base(_Iterator __it) + { return __it.base(); } + }; + + + + template + struct _Niter_base + : _Iter_base<_Iterator, __is_normal_iterator<_Iterator>::__value> + { }; + + template + inline typename _Niter_base<_Iterator>::iterator_type + __niter_base(_Iterator __it) + { return std::_Niter_base<_Iterator>::_S_base(__it); } + + + template + struct _Miter_base + : _Iter_base<_Iterator, __is_move_iterator<_Iterator>::__value> + { }; + + template + inline typename _Miter_base<_Iterator>::iterator_type + __miter_base(_Iterator __it) + { return std::_Miter_base<_Iterator>::_S_base(__it); } + + + + + + + + template + struct __copy_move + { + template + static _OI + __copy_m(_II __first, _II __last, _OI __result) + { + for (; __first != __last; ++__result, ++__first) + *__result = *__first; + return __result; + } + }; +# 339 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 3 + template<> + struct __copy_move + { + template + static _OI + __copy_m(_II __first, _II __last, _OI __result) + { + typedef typename iterator_traits<_II>::difference_type _Distance; + for(_Distance __n = __last - __first; __n > 0; --__n) + { + *__result = *__first; + ++__first; + ++__result; + } + return __result; + } + }; +# 377 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 3 + template + struct __copy_move<_IsMove, true, random_access_iterator_tag> + { + template + static _Tp* + __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result) + { + const ptrdiff_t _Num = __last - __first; + if (_Num) + __builtin_memmove(__result, __first, sizeof(_Tp) * _Num); + return __result + _Num; + } + }; + + template + inline _OI + __copy_move_a(_II __first, _II __last, _OI __result) + { + typedef typename iterator_traits<_II>::value_type _ValueTypeI; + typedef typename iterator_traits<_OI>::value_type _ValueTypeO; + typedef typename iterator_traits<_II>::iterator_category _Category; + const bool __simple = (__is_pod(_ValueTypeI) + && __is_pointer<_II>::__value + && __is_pointer<_OI>::__value + && __are_same<_ValueTypeI, _ValueTypeO>::__value); + + return std::__copy_move<_IsMove, __simple, + _Category>::__copy_m(__first, __last, __result); + } + + + + template + struct char_traits; + + template + class istreambuf_iterator; + + template + class ostreambuf_iterator; + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type + __copy_move_a2(_CharT*, _CharT*, + ostreambuf_iterator<_CharT, char_traits<_CharT> >); + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type + __copy_move_a2(const _CharT*, const _CharT*, + ostreambuf_iterator<_CharT, char_traits<_CharT> >); + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + _CharT*>::__type + __copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >, + istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*); + + template + inline _OI + __copy_move_a2(_II __first, _II __last, _OI __result) + { + return _OI(std::__copy_move_a<_IsMove>(std::__niter_base(__first), + std::__niter_base(__last), + std::__niter_base(__result))); + } +# 462 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 3 + template + inline _OI + copy(_II __first, _II __last, _OI __result) + { + + + + + ; + + return (std::__copy_move_a2<__is_move_iterator<_II>::__value> + (std::__miter_base(__first), std::__miter_base(__last), + __result)); + } +# 511 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 3 +#define _GLIBCXX_MOVE3(_Tp,_Up,_Vp) std::copy(_Tp, _Up, _Vp) + + + template + struct __copy_move_backward + { + template + static _BI2 + __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) + { + while (__first != __last) + *--__result = *--__last; + return __result; + } + }; +# 542 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 3 + template<> + struct __copy_move_backward + { + template + static _BI2 + __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) + { + typename iterator_traits<_BI1>::difference_type __n; + for (__n = __last - __first; __n > 0; --__n) + *--__result = *--__last; + return __result; + } + }; +# 572 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 3 + template + struct __copy_move_backward<_IsMove, true, random_access_iterator_tag> + { + template + static _Tp* + __copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result) + { + const ptrdiff_t _Num = __last - __first; + if (_Num) + __builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num); + return __result - _Num; + } + }; + + template + inline _BI2 + __copy_move_backward_a(_BI1 __first, _BI1 __last, _BI2 __result) + { + typedef typename iterator_traits<_BI1>::value_type _ValueType1; + typedef typename iterator_traits<_BI2>::value_type _ValueType2; + typedef typename iterator_traits<_BI1>::iterator_category _Category; + const bool __simple = (__is_pod(_ValueType1) + && __is_pointer<_BI1>::__value + && __is_pointer<_BI2>::__value + && __are_same<_ValueType1, _ValueType2>::__value); + + return std::__copy_move_backward<_IsMove, __simple, + _Category>::__copy_move_b(__first, + __last, + __result); + } + + template + inline _BI2 + __copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result) + { + return _BI2(std::__copy_move_backward_a<_IsMove> + (std::__niter_base(__first), std::__niter_base(__last), + std::__niter_base(__result))); + } +# 631 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 3 + template + inline _BI2 + copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) + { + + + + + + + ; + + return (std::__copy_move_backward_a2<__is_move_iterator<_BI1>::__value> + (std::__miter_base(__first), std::__miter_base(__last), + __result)); + } +# 686 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 3 +#define _GLIBCXX_MOVE_BACKWARD3(_Tp,_Up,_Vp) std::copy_backward(_Tp, _Up, _Vp) + + + template + inline typename + __gnu_cxx::__enable_if::__value, void>::__type + __fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __value) + { + for (; __first != __last; ++__first) + *__first = __value; + } + + template + inline typename + __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type + __fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __value) + { + const _Tp __tmp = __value; + for (; __first != __last; ++__first) + *__first = __tmp; + } + + + template + inline typename + __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type + __fill_a(_Tp* __first, _Tp* __last, const _Tp& __c) + { + const _Tp __tmp = __c; + __builtin_memset(__first, static_cast(__tmp), + __last - __first); + } +# 733 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 3 + template + inline void + fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) + { + + + + ; + + std::__fill_a(std::__niter_base(__first), std::__niter_base(__last), + __value); + } + + template + inline typename + __gnu_cxx::__enable_if::__value, _OutputIterator>::__type + __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) + { + for (; __n > 0; --__n, ++__first) + *__first = __value; + return __first; + } + + template + inline typename + __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type + __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) + { + const _Tp __tmp = __value; + for (; __n > 0; --__n, ++__first) + *__first = __tmp; + return __first; + } + + template + inline typename + __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, _Tp*>::__type + __fill_n_a(_Tp* __first, _Size __n, const _Tp& __c) + { + std::__fill_a(__first, __first + __n, __c); + return __first + __n; + } +# 791 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 3 + template + inline _OI + fill_n(_OI __first, _Size __n, const _Tp& __value) + { + + + + return _OI(std::__fill_n_a(std::__niter_base(__first), __n, __value)); + } + + template + struct __equal + { + template + static bool + equal(_II1 __first1, _II1 __last1, _II2 __first2) + { + for (; __first1 != __last1; ++__first1, ++__first2) + if (!(*__first1 == *__first2)) + return false; + return true; + } + }; + + template<> + struct __equal + { + template + static bool + equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2) + { + return !__builtin_memcmp(__first1, __first2, sizeof(_Tp) + * (__last1 - __first1)); + } + }; + + template + inline bool + __equal_aux(_II1 __first1, _II1 __last1, _II2 __first2) + { + typedef typename iterator_traits<_II1>::value_type _ValueType1; + typedef typename iterator_traits<_II2>::value_type _ValueType2; + const bool __simple = (__is_integer<_ValueType1>::__value + && __is_pointer<_II1>::__value + && __is_pointer<_II2>::__value + && __are_same<_ValueType1, _ValueType2>::__value); + + return std::__equal<__simple>::equal(__first1, __last1, __first2); + } + + + template + struct __lc_rai + { + template + static _II1 + __newlast1(_II1, _II1 __last1, _II2, _II2) + { return __last1; } + + template + static bool + __cnd2(_II __first, _II __last) + { return __first != __last; } + }; + + template<> + struct __lc_rai + { + template + static _RAI1 + __newlast1(_RAI1 __first1, _RAI1 __last1, + _RAI2 __first2, _RAI2 __last2) + { + const typename iterator_traits<_RAI1>::difference_type + __diff1 = __last1 - __first1; + const typename iterator_traits<_RAI2>::difference_type + __diff2 = __last2 - __first2; + return __diff2 < __diff1 ? __first1 + __diff2 : __last1; + } + + template + static bool + __cnd2(_RAI, _RAI) + { return true; } + }; + + template + struct __lexicographical_compare + { + template + static bool __lc(_II1, _II1, _II2, _II2); + }; + + template + template + bool + __lexicographical_compare<_BoolType>:: + __lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) + { + typedef typename iterator_traits<_II1>::iterator_category _Category1; + typedef typename iterator_traits<_II2>::iterator_category _Category2; + typedef std::__lc_rai<_Category1, _Category2> __rai_type; + + __last1 = __rai_type::__newlast1(__first1, __last1, + __first2, __last2); + for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); + ++__first1, ++__first2) + { + if (*__first1 < *__first2) + return true; + if (*__first2 < *__first1) + return false; + } + return __first1 == __last1 && __first2 != __last2; + } + + template<> + struct __lexicographical_compare + { + template + static bool + __lc(const _Tp* __first1, const _Tp* __last1, + const _Up* __first2, const _Up* __last2) + { + const size_t __len1 = __last1 - __first1; + const size_t __len2 = __last2 - __first2; + const int __result = __builtin_memcmp(__first1, __first2, + std::min(__len1, __len2)); + return __result != 0 ? __result < 0 : __len1 < __len2; + } + }; + + template + inline bool + __lexicographical_compare_aux(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2) + { + typedef typename iterator_traits<_II1>::value_type _ValueType1; + typedef typename iterator_traits<_II2>::value_type _ValueType2; + const bool __simple = + (__is_byte<_ValueType1>::__value && __is_byte<_ValueType2>::__value + && !__gnu_cxx::__numeric_traits<_ValueType1>::__is_signed + && !__gnu_cxx::__numeric_traits<_ValueType2>::__is_signed + && __is_pointer<_II1>::__value + && __is_pointer<_II2>::__value); + + return std::__lexicographical_compare<__simple>::__lc(__first1, __last1, + __first2, __last2); + } +# 952 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 3 + template + _ForwardIterator + lower_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + + + ; + + _DistanceType __len = std::distance(__first, __last); + _DistanceType __half; + _ForwardIterator __middle; + + while (__len > 0) + { + __half = __len >> 1; + __middle = __first; + std::advance(__middle, __half); + if (*__middle < __val) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else + __len = __half; + } + return __first; + } + + + + template + inline _Size + __lg(_Size __n) + { + _Size __k; + for (__k = 0; __n != 0; __n >>= 1) + ++__k; + return __k - 1; + } + + inline int + __lg(int __n) + { return sizeof(int) * 8 - 1 - __builtin_clz(__n); } + + inline long + __lg(long __n) + { return sizeof(long) * 8 - 1 - __builtin_clzl(__n); } + + inline long long + __lg(long long __n) + { return sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } + +} + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 1028 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 3 + template + inline bool + equal(_II1 __first1, _II1 __last1, _II2 __first2) + { + + + + + + + ; + + return std::__equal_aux(std::__niter_base(__first1), + std::__niter_base(__last1), + std::__niter_base(__first2)); + } +# 1060 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 3 + template + inline bool + equal(_IIter1 __first1, _IIter1 __last1, + _IIter2 __first2, _BinaryPredicate __binary_pred) + { + + + + ; + + for (; __first1 != __last1; ++__first1, ++__first2) + if (!bool(__binary_pred(*__first1, *__first2))) + return false; + return true; + } +# 1091 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 3 + template + inline bool + lexicographical_compare(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2) + { + + typedef typename iterator_traits<_II1>::value_type _ValueType1; + typedef typename iterator_traits<_II2>::value_type _ValueType2; + + + + + ; + ; + + return std::__lexicographical_compare_aux(std::__niter_base(__first1), + std::__niter_base(__last1), + std::__niter_base(__first2), + std::__niter_base(__last2)); + } +# 1125 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 3 + template + bool + lexicographical_compare(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2, _Compare __comp) + { + typedef typename iterator_traits<_II1>::iterator_category _Category1; + typedef typename iterator_traits<_II2>::iterator_category _Category2; + typedef std::__lc_rai<_Category1, _Category2> __rai_type; + + + + + ; + ; + + __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2); + for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); + ++__first1, ++__first2) + { + if (__comp(*__first1, *__first2)) + return true; + if (__comp(*__first2, *__first1)) + return false; + } + return __first1 == __last1 && __first2 != __last2; + } +# 1165 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 3 + template + pair<_InputIterator1, _InputIterator2> + mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2) + { + + + + + + + ; + + while (__first1 != __last1 && *__first1 == *__first2) + { + ++__first1; + ++__first2; + } + return pair<_InputIterator1, _InputIterator2>(__first1, __first2); + } +# 1202 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_algobase.h" 3 + template + pair<_InputIterator1, _InputIterator2> + mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _BinaryPredicate __binary_pred) + { + + + + ; + + while (__first1 != __last1 && bool(__binary_pred(*__first1, *__first2))) + { + ++__first1; + ++__first2; + } + return pair<_InputIterator1, _InputIterator2>(__first1, __first2); + } + +} +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/char_traits.h" 2 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cwchar" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cwchar" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cwchar" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 2 3 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cwchar" 2 3 + + +# 1 "/usr/include/wchar.h" 1 3 4 +# 896 "/usr/include/wchar.h" 3 4 +#undef __need_mbstate_t +#undef __need_wint_t +# 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cwchar" 2 3 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/char_traits.h" 2 3 + + + + + +#define _CHAR_TRAITS_EOF (-1) + + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/char_traits.h" 3 + template + struct _Char_types + { + typedef unsigned long int_type; + typedef std::streampos pos_type; + typedef std::streamoff off_type; + typedef std::mbstate_t state_type; + }; +# 89 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/char_traits.h" 3 + template + struct char_traits + { + typedef _CharT char_type; + typedef typename _Char_types<_CharT>::int_type int_type; + typedef typename _Char_types<_CharT>::pos_type pos_type; + typedef typename _Char_types<_CharT>::off_type off_type; + typedef typename _Char_types<_CharT>::state_type state_type; + + static void + assign(char_type& __c1, const char_type& __c2) + { __c1 = __c2; } + + static bool + eq(const char_type& __c1, const char_type& __c2) + { return __c1 == __c2; } + + static bool + lt(const char_type& __c1, const char_type& __c2) + { return __c1 < __c2; } + + static int + compare(const char_type* __s1, const char_type* __s2, std::size_t __n); + + static std::size_t + length(const char_type* __s); + + static const char_type* + find(const char_type* __s, std::size_t __n, const char_type& __a); + + static char_type* + move(char_type* __s1, const char_type* __s2, std::size_t __n); + + static char_type* + copy(char_type* __s1, const char_type* __s2, std::size_t __n); + + static char_type* + assign(char_type* __s, std::size_t __n, char_type __a); + + static char_type + to_char_type(const int_type& __c) + { return static_cast(__c); } + + static int_type + to_int_type(const char_type& __c) + { return static_cast(__c); } + + static bool + eq_int_type(const int_type& __c1, const int_type& __c2) + { return __c1 == __c2; } + + static int_type + eof() + { return static_cast((-1)); } + + static int_type + not_eof(const int_type& __c) + { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); } + }; + + template + int + char_traits<_CharT>:: + compare(const char_type* __s1, const char_type* __s2, std::size_t __n) + { + for (std::size_t __i = 0; __i < __n; ++__i) + if (lt(__s1[__i], __s2[__i])) + return -1; + else if (lt(__s2[__i], __s1[__i])) + return 1; + return 0; + } + + template + std::size_t + char_traits<_CharT>:: + length(const char_type* __p) + { + std::size_t __i = 0; + while (!eq(__p[__i], char_type())) + ++__i; + return __i; + } + + template + const typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + find(const char_type* __s, std::size_t __n, const char_type& __a) + { + for (std::size_t __i = 0; __i < __n; ++__i) + if (eq(__s[__i], __a)) + return __s + __i; + return 0; + } + + template + typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + move(char_type* __s1, const char_type* __s2, std::size_t __n) + { + return static_cast<_CharT*>(__builtin_memmove(__s1, __s2, + __n * sizeof(char_type))); + } + + template + typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + copy(char_type* __s1, const char_type* __s2, std::size_t __n) + { + + std::copy(__s2, __s2 + __n, __s1); + return __s1; + } + + template + typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + assign(char_type* __s, std::size_t __n, char_type __a) + { + + std::fill_n(__s, __n, __a); + return __s; + } + +} + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 230 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/char_traits.h" 3 + template + struct char_traits : public __gnu_cxx::char_traits<_CharT> + { }; + + + + template<> + struct char_traits + { + typedef char char_type; + typedef int int_type; + typedef streampos pos_type; + typedef streamoff off_type; + typedef mbstate_t state_type; + + static void + assign(char_type& __c1, const char_type& __c2) + { __c1 = __c2; } + + static bool + eq(const char_type& __c1, const char_type& __c2) + { return __c1 == __c2; } + + static bool + lt(const char_type& __c1, const char_type& __c2) + { return __c1 < __c2; } + + static int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { return __builtin_memcmp(__s1, __s2, __n); } + + static size_t + length(const char_type* __s) + { return __builtin_strlen(__s); } + + static const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { return static_cast(__builtin_memchr(__s, __a, __n)); } + + static char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { return static_cast(__builtin_memmove(__s1, __s2, __n)); } + + static char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { return static_cast(__builtin_memcpy(__s1, __s2, __n)); } + + static char_type* + assign(char_type* __s, size_t __n, char_type __a) + { return static_cast(__builtin_memset(__s, __a, __n)); } + + static char_type + to_char_type(const int_type& __c) + { return static_cast(__c); } + + + + static int_type + to_int_type(const char_type& __c) + { return static_cast(static_cast(__c)); } + + static bool + eq_int_type(const int_type& __c1, const int_type& __c2) + { return __c1 == __c2; } + + static int_type + eof() + { return static_cast((-1)); } + + static int_type + not_eof(const int_type& __c) + { return (__c == eof()) ? 0 : __c; } + }; + + + + + template<> + struct char_traits + { + typedef wchar_t char_type; + typedef wint_t int_type; + typedef streamoff off_type; + typedef wstreampos pos_type; + typedef mbstate_t state_type; + + static void + assign(char_type& __c1, const char_type& __c2) + { __c1 = __c2; } + + static bool + eq(const char_type& __c1, const char_type& __c2) + { return __c1 == __c2; } + + static bool + lt(const char_type& __c1, const char_type& __c2) + { return __c1 < __c2; } + + static int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { return wmemcmp(__s1, __s2, __n); } + + static size_t + length(const char_type* __s) + { return wcslen(__s); } + + static const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { return wmemchr(__s, __a, __n); } + + static char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { return wmemmove(__s1, __s2, __n); } + + static char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { return wmemcpy(__s1, __s2, __n); } + + static char_type* + assign(char_type* __s, size_t __n, char_type __a) + { return wmemset(__s, __a, __n); } + + static char_type + to_char_type(const int_type& __c) + { return char_type(__c); } + + static int_type + to_int_type(const char_type& __c) + { return int_type(__c); } + + static bool + eq_int_type(const int_type& __c1, const int_type& __c2) + { return __c1 == __c2; } + + static int_type + eof() + { return static_cast((0xffffffffu)); } + + static int_type + not_eof(const int_type& __c) + { return eq_int_type(__c, eof()) ? 0 : __c; } + }; + + +} +# 573 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/char_traits.h" 3 +#undef _CHAR_TRAITS_EOF +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ios" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/localefwd.h" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/localefwd.h" 3 +#define _LOCALE_FWD_H 1 + + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/localefwd.h" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 1 3 +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 3 +#define _GLIBCXX_CXX_LOCALE_H 1 + + +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/clocale" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/clocale" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/clocale" 3 + + +# 1 "/usr/include/locale.h" 1 3 4 +# 24 "/usr/include/locale.h" 3 4 +#define _LOCALE_H 1 + + + +#define __need_NULL +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 30 "/usr/include/locale.h" 2 3 4 +# 1 "/usr/include/bits/locale.h" 1 3 4 +# 25 "/usr/include/bits/locale.h" 3 4 +#define _BITS_LOCALE_H 1 + +enum +{ + __LC_CTYPE = 0, + __LC_NUMERIC = 1, + __LC_TIME = 2, + __LC_COLLATE = 3, + __LC_MONETARY = 4, + __LC_MESSAGES = 5, + __LC_ALL = 6, + __LC_PAPER = 7, + __LC_NAME = 8, + __LC_ADDRESS = 9, + __LC_TELEPHONE = 10, + __LC_MEASUREMENT = 11, + __LC_IDENTIFICATION = 12 +}; +# 31 "/usr/include/locale.h" 2 3 4 + +extern "C" { + + + +#define LC_CTYPE __LC_CTYPE +#define LC_NUMERIC __LC_NUMERIC +#define LC_TIME __LC_TIME +#define LC_COLLATE __LC_COLLATE +#define LC_MONETARY __LC_MONETARY +#define LC_MESSAGES __LC_MESSAGES +#define LC_ALL __LC_ALL +#define LC_PAPER __LC_PAPER +#define LC_NAME __LC_NAME +#define LC_ADDRESS __LC_ADDRESS +#define LC_TELEPHONE __LC_TELEPHONE +#define LC_MEASUREMENT __LC_MEASUREMENT +#define LC_IDENTIFICATION __LC_IDENTIFICATION + + + + + +struct lconv +{ + + + char *decimal_point; + char *thousands_sep; + + + + + + char *grouping; + + + + + + char *int_curr_symbol; + char *currency_symbol; + char *mon_decimal_point; + char *mon_thousands_sep; + char *mon_grouping; + char *positive_sign; + char *negative_sign; + char int_frac_digits; + char frac_digits; + + char p_cs_precedes; + + char p_sep_by_space; + + char n_cs_precedes; + + char n_sep_by_space; + + + + + + + char p_sign_posn; + char n_sign_posn; + + + char int_p_cs_precedes; + + char int_p_sep_by_space; + + char int_n_cs_precedes; + + char int_n_sep_by_space; + + + + + + + char int_p_sign_posn; + char int_n_sign_posn; +# 121 "/usr/include/locale.h" 3 4 +}; + + + +extern char *setlocale (int __category, __const char *__locale) throw (); + + +extern struct lconv *localeconv (void) throw (); + + +# 152 "/usr/include/locale.h" 3 4 +extern __locale_t newlocale (int __category_mask, __const char *__locale, + __locale_t __base) throw (); + + + + + +#define LC_CTYPE_MASK (1 << __LC_CTYPE) +#define LC_NUMERIC_MASK (1 << __LC_NUMERIC) +#define LC_TIME_MASK (1 << __LC_TIME) +#define LC_COLLATE_MASK (1 << __LC_COLLATE) +#define LC_MONETARY_MASK (1 << __LC_MONETARY) +#define LC_MESSAGES_MASK (1 << __LC_MESSAGES) +#define LC_PAPER_MASK (1 << __LC_PAPER) +#define LC_NAME_MASK (1 << __LC_NAME) +#define LC_ADDRESS_MASK (1 << __LC_ADDRESS) +#define LC_TELEPHONE_MASK (1 << __LC_TELEPHONE) +#define LC_MEASUREMENT_MASK (1 << __LC_MEASUREMENT) +#define LC_IDENTIFICATION_MASK (1 << __LC_IDENTIFICATION) +#define LC_ALL_MASK (LC_CTYPE_MASK | LC_NUMERIC_MASK | LC_TIME_MASK | LC_COLLATE_MASK | LC_MONETARY_MASK | LC_MESSAGES_MASK | LC_PAPER_MASK | LC_NAME_MASK | LC_ADDRESS_MASK | LC_TELEPHONE_MASK | LC_MEASUREMENT_MASK | LC_IDENTIFICATION_MASK ) +# 187 "/usr/include/locale.h" 3 4 +extern __locale_t duplocale (__locale_t __dataset) throw (); + + + +extern void freelocale (__locale_t __dataset) throw (); + + + + + + +extern __locale_t uselocale (__locale_t __dataset) throw (); + + + +#define LC_GLOBAL_LOCALE ((__locale_t) -1L) + + + +} +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/clocale" 2 3 + + +#define _GLIBCXX_CLOCALE 1 + + +#undef setlocale +#undef localeconv + +namespace std __attribute__ ((__visibility__ ("default"))) { + + using ::lconv; + using ::setlocale; + using ::localeconv; + +} +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 2 3 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 2 3 + +#define _GLIBCXX_C_LOCALE_GNU 1 + +#define _GLIBCXX_NUM_CATEGORIES 6 + + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + + extern "C" __typeof(uselocale) __uselocale; + +} + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + typedef __locale_t __c_locale; + + + + + + inline int + __convert_from_v(const __c_locale& __cloc __attribute__ ((__unused__)), + char* __out, + const int __size __attribute__ ((__unused__)), + const char* __fmt, ...) + { + + __c_locale __old = __gnu_cxx::__uselocale(__cloc); +# 85 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 3 + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + + + const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); + + + + + __builtin_va_end(__args); + + + __gnu_cxx::__uselocale(__old); + + + + + + + + return __ret; + } + +} +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/localefwd.h" 2 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cctype" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cctype" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cctype" 3 + + +# 1 "/usr/include/ctype.h" 1 3 4 +# 25 "/usr/include/ctype.h" 3 4 +#define _CTYPE_H 1 + + +# 1 "/usr/include/bits/types.h" 1 3 4 +# 25 "/usr/include/bits/types.h" 3 4 +#define _BITS_TYPES_H 1 + + +# 1 "/usr/include/bits/wordsize.h" 1 3 4 + + + +#define __WORDSIZE 64 +#define __WORDSIZE_COMPAT32 1 +# 29 "/usr/include/bits/types.h" 2 3 4 + + +typedef unsigned char __u_char; +typedef unsigned short int __u_short; +typedef unsigned int __u_int; +typedef unsigned long int __u_long; + + +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; + +typedef signed long int __int64_t; +typedef unsigned long int __uint64_t; + + + + + + + +typedef long int __quad_t; +typedef unsigned long int __u_quad_t; +# 99 "/usr/include/bits/types.h" 3 4 +#define __S16_TYPE short int +#define __U16_TYPE unsigned short int +#define __S32_TYPE int +#define __U32_TYPE unsigned int +#define __SLONGWORD_TYPE long int +#define __ULONGWORD_TYPE unsigned long int +# 118 "/usr/include/bits/types.h" 3 4 +#define __SQUAD_TYPE long int +#define __UQUAD_TYPE unsigned long int +#define __SWORD_TYPE long int +#define __UWORD_TYPE unsigned long int +#define __SLONG32_TYPE int +#define __ULONG32_TYPE unsigned int +#define __S64_TYPE long int +#define __U64_TYPE unsigned long int + +#define __STD_TYPE typedef + + + +# 1 "/usr/include/bits/typesizes.h" 1 3 4 +# 25 "/usr/include/bits/typesizes.h" 3 4 +#define _BITS_TYPESIZES_H 1 + + + + +#define __DEV_T_TYPE __UQUAD_TYPE +#define __UID_T_TYPE __U32_TYPE +#define __GID_T_TYPE __U32_TYPE +#define __INO_T_TYPE __ULONGWORD_TYPE +#define __INO64_T_TYPE __UQUAD_TYPE +#define __MODE_T_TYPE __U32_TYPE +#define __NLINK_T_TYPE __UWORD_TYPE +#define __OFF_T_TYPE __SLONGWORD_TYPE +#define __OFF64_T_TYPE __SQUAD_TYPE +#define __PID_T_TYPE __S32_TYPE +#define __RLIM_T_TYPE __ULONGWORD_TYPE +#define __RLIM64_T_TYPE __UQUAD_TYPE +#define __BLKCNT_T_TYPE __SLONGWORD_TYPE +#define __BLKCNT64_T_TYPE __SQUAD_TYPE +#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE +#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE +#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE +#define __FSFILCNT64_T_TYPE __UQUAD_TYPE +#define __ID_T_TYPE __U32_TYPE +#define __CLOCK_T_TYPE __SLONGWORD_TYPE +#define __TIME_T_TYPE __SLONGWORD_TYPE +#define __USECONDS_T_TYPE __U32_TYPE +#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE +#define __DADDR_T_TYPE __S32_TYPE +#define __SWBLK_T_TYPE __SLONGWORD_TYPE +#define __KEY_T_TYPE __S32_TYPE +#define __CLOCKID_T_TYPE __S32_TYPE +#define __TIMER_T_TYPE void * +#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE +#define __FSID_T_TYPE struct { int __val[2]; } +#define __SSIZE_T_TYPE __SWORD_TYPE + + +#define __FD_SETSIZE 1024 +# 132 "/usr/include/bits/types.h" 2 3 4 + + +typedef unsigned long int __dev_t; +typedef unsigned int __uid_t; +typedef unsigned int __gid_t; +typedef unsigned long int __ino_t; +typedef unsigned long int __ino64_t; +typedef unsigned int __mode_t; +typedef unsigned long int __nlink_t; +typedef long int __off_t; +typedef long int __off64_t; +typedef int __pid_t; +typedef struct { int __val[2]; } __fsid_t; +typedef long int __clock_t; +typedef unsigned long int __rlim_t; +typedef unsigned long int __rlim64_t; +typedef unsigned int __id_t; +typedef long int __time_t; +typedef unsigned int __useconds_t; +typedef long int __suseconds_t; + +typedef int __daddr_t; +typedef long int __swblk_t; +typedef int __key_t; + + +typedef int __clockid_t; + + +typedef void * __timer_t; + + +typedef long int __blksize_t; + + + + +typedef long int __blkcnt_t; +typedef long int __blkcnt64_t; + + +typedef unsigned long int __fsblkcnt_t; +typedef unsigned long int __fsblkcnt64_t; + + +typedef unsigned long int __fsfilcnt_t; +typedef unsigned long int __fsfilcnt64_t; + +typedef long int __ssize_t; + + + +typedef __off64_t __loff_t; +typedef __quad_t *__qaddr_t; +typedef char *__caddr_t; + + +typedef long int __intptr_t; + + +typedef unsigned int __socklen_t; + + +#undef __STD_TYPE +# 29 "/usr/include/ctype.h" 2 3 4 + +extern "C" { +# 41 "/usr/include/ctype.h" 3 4 +# 1 "/usr/include/endian.h" 1 3 4 +# 20 "/usr/include/endian.h" 3 4 +#define _ENDIAN_H 1 +# 32 "/usr/include/endian.h" 3 4 +#define __LITTLE_ENDIAN 1234 +#define __BIG_ENDIAN 4321 +#define __PDP_ENDIAN 3412 + + +# 1 "/usr/include/bits/endian.h" 1 3 4 + + + + + + +#define __BYTE_ORDER __LITTLE_ENDIAN +# 38 "/usr/include/endian.h" 2 3 4 + + + + +#define __FLOAT_WORD_ORDER __BYTE_ORDER + + + +#define LITTLE_ENDIAN __LITTLE_ENDIAN +#define BIG_ENDIAN __BIG_ENDIAN +#define PDP_ENDIAN __PDP_ENDIAN +#define BYTE_ORDER __BYTE_ORDER + + + +#define __LONG_LONG_PAIR(HI,LO) LO, HI + + + + + + + +# 1 "/usr/include/bits/byteswap.h" 1 3 4 +# 26 "/usr/include/bits/byteswap.h" 3 4 +#define _BITS_BYTESWAP_H 1 + +# 1 "/usr/include/bits/wordsize.h" 1 3 4 + + + +#define __WORDSIZE 64 +#define __WORDSIZE_COMPAT32 1 +# 29 "/usr/include/bits/byteswap.h" 2 3 4 + + +#define __bswap_constant_16(x) ((unsigned short int) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))) + + + +#define __bswap_16(x) (__extension__ ({ register unsigned short int __v, __x = (unsigned short int) (x); if (__builtin_constant_p (__x)) __v = __bswap_constant_16 (__x); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })) +# 56 "/usr/include/bits/byteswap.h" 3 4 +#define __bswap_constant_32(x) ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | (((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24)) +# 69 "/usr/include/bits/byteswap.h" 3 4 +#define __bswap_32(x) (__extension__ ({ register unsigned int __v, __x = (x); if (__builtin_constant_p (__x)) __v = __bswap_constant_32 (__x); else __asm__ ("bswap %0" : "=r" (__v) : "0" (__x)); __v; })) +# 101 "/usr/include/bits/byteswap.h" 3 4 +#define __bswap_constant_64(x) ((((x) & 0xff00000000000000ull) >> 56) | (((x) & 0x00ff000000000000ull) >> 40) | (((x) & 0x0000ff0000000000ull) >> 24) | (((x) & 0x000000ff00000000ull) >> 8) | (((x) & 0x00000000ff000000ull) << 8) | (((x) & 0x0000000000ff0000ull) << 24) | (((x) & 0x000000000000ff00ull) << 40) | (((x) & 0x00000000000000ffull) << 56)) +# 112 "/usr/include/bits/byteswap.h" 3 4 +#define __bswap_64(x) (__extension__ ({ register unsigned long __v, __x = (x); if (__builtin_constant_p (__x)) __v = __bswap_constant_64 (__x); else __asm__ ("bswap %q0" : "=r" (__v) : "0" (__x)); __v; })) +# 62 "/usr/include/endian.h" 2 3 4 + + +#define htobe16(x) __bswap_16 (x) +#define htole16(x) (x) +#define be16toh(x) __bswap_16 (x) +#define le16toh(x) (x) + +#define htobe32(x) __bswap_32 (x) +#define htole32(x) (x) +#define be32toh(x) __bswap_32 (x) +#define le32toh(x) (x) + +#define htobe64(x) __bswap_64 (x) +#define htole64(x) (x) +#define be64toh(x) __bswap_64 (x) +#define le64toh(x) (x) +# 42 "/usr/include/ctype.h" 2 3 4 + + + +#define _ISbit(bit) ((bit) < 8 ? ((1 << (bit)) << 8) : ((1 << (bit)) >> 8)) + + +enum +{ + _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), + _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), + _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), + _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), + _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), + _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), + _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), + _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), + _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), + _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), + _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), + _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) +}; +# 81 "/usr/include/ctype.h" 3 4 +extern __const unsigned short int **__ctype_b_loc (void) + throw () __attribute__ ((__const)); +extern __const __int32_t **__ctype_tolower_loc (void) + throw () __attribute__ ((__const)); +extern __const __int32_t **__ctype_toupper_loc (void) + throw () __attribute__ ((__const)); + +#define __isctype(c,type) ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type) + + +#define __isascii(c) (((c) & ~0x7f) == 0) +#define __toascii(c) ((c) & 0x7f) + +#define __exctype(name) extern int name (int) __THROW + + + + + + + +extern int isalnum (int) throw (); +extern int isalpha (int) throw (); +extern int iscntrl (int) throw (); +extern int isdigit (int) throw (); +extern int islower (int) throw (); +extern int isgraph (int) throw (); +extern int isprint (int) throw (); +extern int ispunct (int) throw (); +extern int isspace (int) throw (); +extern int isupper (int) throw (); +extern int isxdigit (int) throw (); + + + +extern int tolower (int __c) throw (); + + +extern int toupper (int __c) throw (); + + + + + + + + +extern int isblank (int) throw (); + + + + + + +extern int isctype (int __c, int __mask) throw (); + + + + + + +extern int isascii (int __c) throw (); + + + +extern int toascii (int __c) throw (); + + + +extern int _toupper (int) throw (); +extern int _tolower (int) throw (); + + + +#define __tobody(c,f,a,args) (__extension__ ({ int __res; if (sizeof (c) > 1) { if (__builtin_constant_p (c)) { int __c = (c); __res = __c < -128 || __c > 255 ? __c : (a)[__c]; } else __res = f args; } else __res = (a)[(int) (c)]; __res; })) +# 237 "/usr/include/ctype.h" 3 4 +#define __isctype_l(c,type,locale) ((locale)->__ctype_b[(int) (c)] & (unsigned short int) type) + + +#define __exctype_l(name) extern int name (int, __locale_t) __THROW + + + + + + +extern int isalnum_l (int, __locale_t) throw (); +extern int isalpha_l (int, __locale_t) throw (); +extern int iscntrl_l (int, __locale_t) throw (); +extern int isdigit_l (int, __locale_t) throw (); +extern int islower_l (int, __locale_t) throw (); +extern int isgraph_l (int, __locale_t) throw (); +extern int isprint_l (int, __locale_t) throw (); +extern int ispunct_l (int, __locale_t) throw (); +extern int isspace_l (int, __locale_t) throw (); +extern int isupper_l (int, __locale_t) throw (); +extern int isxdigit_l (int, __locale_t) throw (); + +extern int isblank_l (int, __locale_t) throw (); + + + +extern int __tolower_l (int __c, __locale_t __l) throw (); +extern int tolower_l (int __c, __locale_t __l) throw (); + + +extern int __toupper_l (int __c, __locale_t __l) throw (); +extern int toupper_l (int __c, __locale_t __l) throw (); +# 323 "/usr/include/ctype.h" 3 4 +} +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cctype" 2 3 + + +#define _GLIBCXX_CCTYPE 1 + + +#undef isalnum +#undef isalpha +#undef iscntrl +#undef isdigit +#undef isgraph +#undef islower +#undef isprint +#undef ispunct +#undef isspace +#undef isupper +#undef isxdigit +#undef tolower +#undef toupper + +namespace std __attribute__ ((__visibility__ ("default"))) { + + using ::isalnum; + using ::isalpha; + using ::iscntrl; + using ::isdigit; + using ::isgraph; + using ::islower; + using ::isprint; + using ::ispunct; + using ::isspace; + using ::isupper; + using ::isxdigit; + using ::tolower; + using ::toupper; + +} +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/localefwd.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 55 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/localefwd.h" 3 + class locale; + + template + bool + has_facet(const locale&) throw(); + + template + const _Facet& + use_facet(const locale&); + + + template + bool + isspace(_CharT, const locale&); + + template + bool + isprint(_CharT, const locale&); + + template + bool + iscntrl(_CharT, const locale&); + + template + bool + isupper(_CharT, const locale&); + + template + bool + islower(_CharT, const locale&); + + template + bool + isalpha(_CharT, const locale&); + + template + bool + isdigit(_CharT, const locale&); + + template + bool + ispunct(_CharT, const locale&); + + template + bool + isxdigit(_CharT, const locale&); + + template + bool + isalnum(_CharT, const locale&); + + template + bool + isgraph(_CharT, const locale&); + + template + _CharT + toupper(_CharT, const locale&); + + template + _CharT + tolower(_CharT, const locale&); + + + class ctype_base; + template + class ctype; + template<> class ctype; + + template<> class ctype; + + template + class ctype_byname; + + + class codecvt_base; + template + class codecvt; + template<> class codecvt; + + template<> class codecvt; + + template + class codecvt_byname; + + + + template > + class num_get; + template > + class num_put; + + template class numpunct; + template class numpunct_byname; + + + template + class collate; + template class + collate_byname; + + + class time_base; + template > + class time_get; + template > + class time_get_byname; + template > + class time_put; + template > + class time_put_byname; + + + class money_base; + + template > + class money_get; + template > + class money_put; + + template + class moneypunct; + template + class moneypunct_byname; + + + class messages_base; + template + class messages; + template + class messages_byname; + +} +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ios" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 3 +#define _IOS_BASE_H 1 + + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ext/atomicity.h" 1 3 +# 31 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ext/atomicity.h" 3 +#define _GLIBCXX_ATOMICITY_H 1 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr.h" 1 3 +# 27 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr.h" 3 +#define _GLIBCXX_GCC_GTHR_H + + +#pragma GCC visibility push(default) +# 159 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr.h" 3 +#define _GLIBCXX_GTHREAD_USE_WEAK 1 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 1 3 +# 28 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 +#define _GLIBCXX_GCC_GTHR_POSIX_H + + + + +#define __GTHREADS 1 +#define __GTHREADS_CXX0X 1 + + + + + + +# 1 "/usr/include/pthread.h" 1 3 4 +# 21 "/usr/include/pthread.h" 3 4 +#define _PTHREAD_H 1 + + + +# 1 "/usr/include/sched.h" 1 3 4 +# 22 "/usr/include/sched.h" 3 4 +#define _SCHED_H 1 + + + + + + +#define __need_size_t +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 31 "/usr/include/sched.h" 2 3 4 + +#define __need_time_t +#define __need_timespec +# 1 "/usr/include/time.h" 1 3 4 +# 67 "/usr/include/time.h" 3 4 +#undef __need_clock_t + + +#define __time_t_defined 1 + + + + + +typedef __time_t time_t; + + + + + + +#undef __need_time_t +# 95 "/usr/include/time.h" 3 4 +#undef __clockid_time_t +# 107 "/usr/include/time.h" 3 4 +#undef __need_timer_t + + + + + + +#define __timespec_defined 1 + + + + + +struct timespec + { + __time_t tv_sec; + long int tv_nsec; + }; + + +#undef __need_timespec +# 35 "/usr/include/sched.h" 2 3 4 + + +typedef __pid_t pid_t; +#define __pid_t_defined + + + + +# 1 "/usr/include/bits/sched.h" 1 3 4 +# 30 "/usr/include/bits/sched.h" 3 4 +#define SCHED_OTHER 0 +#define SCHED_FIFO 1 +#define SCHED_RR 2 + +#define SCHED_BATCH 3 +#define SCHED_IDLE 5 + +#define SCHED_RESET_ON_FORK 0x40000000 + + + + +#define CSIGNAL 0x000000ff +#define CLONE_VM 0x00000100 +#define CLONE_FS 0x00000200 +#define CLONE_FILES 0x00000400 +#define CLONE_SIGHAND 0x00000800 +#define CLONE_PTRACE 0x00002000 +#define CLONE_VFORK 0x00004000 + +#define CLONE_PARENT 0x00008000 + +#define CLONE_THREAD 0x00010000 +#define CLONE_NEWNS 0x00020000 +#define CLONE_SYSVSEM 0x00040000 +#define CLONE_SETTLS 0x00080000 +#define CLONE_PARENT_SETTID 0x00100000 + +#define CLONE_CHILD_CLEARTID 0x00200000 + +#define CLONE_DETACHED 0x00400000 +#define CLONE_UNTRACED 0x00800000 + +#define CLONE_CHILD_SETTID 0x01000000 + +#define CLONE_NEWUTS 0x04000000 +#define CLONE_NEWIPC 0x08000000 +#define CLONE_NEWUSER 0x10000000 +#define CLONE_NEWPID 0x20000000 +#define CLONE_NEWNET 0x40000000 +#define CLONE_IO 0x80000000 + + + +struct sched_param + { + int __sched_priority; + }; + +extern "C" { + + + +extern int clone (int (*__fn) (void *__arg), void *__child_stack, + int __flags, void *__arg, ...) throw (); + + +extern int unshare (int __flags) throw (); + + +extern int sched_getcpu (void) throw (); + + +extern int setns (int __fd, int __nstype) throw (); + + + +} + + + + + +#define __defined_schedparam 1 + +struct __sched_param + { + int __sched_priority; + }; +#undef __need_schedparam + + + + +#define __cpu_set_t_defined + +#define __CPU_SETSIZE 1024 +#define __NCPUBITS (8 * sizeof (__cpu_mask)) + + +typedef unsigned long int __cpu_mask; + + +#define __CPUELT(cpu) ((cpu) / __NCPUBITS) +#define __CPUMASK(cpu) ((__cpu_mask) 1 << ((cpu) % __NCPUBITS)) + + +typedef struct +{ + __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; +} cpu_set_t; + + + +#define __CPU_ZERO_S(setsize,cpusetp) do __builtin_memset (cpusetp, '\0', setsize); while (0) +# 146 "/usr/include/bits/sched.h" 3 4 +#define __CPU_SET_S(cpu,setsize,cpusetp) (__extension__ ({ size_t __cpu = (cpu); __cpu < 8 * (setsize) ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] |= __CPUMASK (__cpu)) : 0; })) + + + + + + +#define __CPU_CLR_S(cpu,setsize,cpusetp) (__extension__ ({ size_t __cpu = (cpu); __cpu < 8 * (setsize) ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] &= ~__CPUMASK (__cpu)) : 0; })) + + + + + + +#define __CPU_ISSET_S(cpu,setsize,cpusetp) (__extension__ ({ size_t __cpu = (cpu); __cpu < 8 * (setsize) ? ((((__const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] & __CPUMASK (__cpu))) != 0 : 0; })) + + + + + + + +#define __CPU_COUNT_S(setsize,cpusetp) __sched_cpucount (setsize, cpusetp) + + + +#define __CPU_EQUAL_S(setsize,cpusetp1,cpusetp2) (__builtin_memcmp (cpusetp1, cpusetp2, setsize) == 0) +# 187 "/usr/include/bits/sched.h" 3 4 +#define __CPU_OP_S(setsize,destset,srcset1,srcset2,op) (__extension__ ({ cpu_set_t *__dest = (destset); __const __cpu_mask *__arr1 = (srcset1)->__bits; __const __cpu_mask *__arr2 = (srcset2)->__bits; size_t __imax = (setsize) / sizeof (__cpu_mask); size_t __i; for (__i = 0; __i < __imax; ++__i) ((__cpu_mask *) __dest->__bits)[__i] = __arr1[__i] op __arr2[__i]; __dest; })) +# 198 "/usr/include/bits/sched.h" 3 4 +#define __CPU_ALLOC_SIZE(count) ((((count) + __NCPUBITS - 1) / __NCPUBITS) * sizeof (__cpu_mask)) + +#define __CPU_ALLOC(count) __sched_cpualloc (count) +#define __CPU_FREE(cpuset) __sched_cpufree (cpuset) + +extern "C" { + +extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) + throw (); +extern cpu_set_t *__sched_cpualloc (size_t __count) throw () __attribute__ ((__warn_unused_result__)); +extern void __sched_cpufree (cpu_set_t *__set) throw (); + +} +# 44 "/usr/include/sched.h" 2 3 4 + +#define sched_priority __sched_priority + + +extern "C" { + + +extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param) + throw (); + + +extern int sched_getparam (__pid_t __pid, struct sched_param *__param) throw (); + + +extern int sched_setscheduler (__pid_t __pid, int __policy, + __const struct sched_param *__param) throw (); + + +extern int sched_getscheduler (__pid_t __pid) throw (); + + +extern int sched_yield (void) throw (); + + +extern int sched_get_priority_max (int __algorithm) throw (); + + +extern int sched_get_priority_min (int __algorithm) throw (); + + +extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) throw (); + + + + +#define CPU_SETSIZE __CPU_SETSIZE +#define CPU_SET(cpu,cpusetp) __CPU_SET_S (cpu, sizeof (cpu_set_t), cpusetp) +#define CPU_CLR(cpu,cpusetp) __CPU_CLR_S (cpu, sizeof (cpu_set_t), cpusetp) +#define CPU_ISSET(cpu,cpusetp) __CPU_ISSET_S (cpu, sizeof (cpu_set_t), cpusetp) + +#define CPU_ZERO(cpusetp) __CPU_ZERO_S (sizeof (cpu_set_t), cpusetp) +#define CPU_COUNT(cpusetp) __CPU_COUNT_S (sizeof (cpu_set_t), cpusetp) + +#define CPU_SET_S(cpu,setsize,cpusetp) __CPU_SET_S (cpu, setsize, cpusetp) +#define CPU_CLR_S(cpu,setsize,cpusetp) __CPU_CLR_S (cpu, setsize, cpusetp) +#define CPU_ISSET_S(cpu,setsize,cpusetp) __CPU_ISSET_S (cpu, setsize, cpusetp) + +#define CPU_ZERO_S(setsize,cpusetp) __CPU_ZERO_S (setsize, cpusetp) +#define CPU_COUNT_S(setsize,cpusetp) __CPU_COUNT_S (setsize, cpusetp) + +#define CPU_EQUAL(cpusetp1,cpusetp2) __CPU_EQUAL_S (sizeof (cpu_set_t), cpusetp1, cpusetp2) + +#define CPU_EQUAL_S(setsize,cpusetp1,cpusetp2) __CPU_EQUAL_S (setsize, cpusetp1, cpusetp2) + + +#define CPU_AND(destset,srcset1,srcset2) __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, &) + +#define CPU_OR(destset,srcset1,srcset2) __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, |) + +#define CPU_XOR(destset,srcset1,srcset2) __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, ^) + +#define CPU_AND_S(setsize,destset,srcset1,srcset2) __CPU_OP_S (setsize, destset, srcset1, srcset2, &) + +#define CPU_OR_S(setsize,destset,srcset1,srcset2) __CPU_OP_S (setsize, destset, srcset1, srcset2, |) + +#define CPU_XOR_S(setsize,destset,srcset1,srcset2) __CPU_OP_S (setsize, destset, srcset1, srcset2, ^) + + +#define CPU_ALLOC_SIZE(count) __CPU_ALLOC_SIZE (count) +#define CPU_ALLOC(count) __CPU_ALLOC (count) +#define CPU_FREE(cpuset) __CPU_FREE (cpuset) + + + +extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, + __const cpu_set_t *__cpuset) throw (); + + +extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, + cpu_set_t *__cpuset) throw (); + + +} +# 26 "/usr/include/pthread.h" 2 3 4 +# 1 "/usr/include/time.h" 1 3 4 +# 27 "/usr/include/time.h" 3 4 +#define _TIME_H 1 + + +extern "C" { + + + + + +#define __need_size_t +#define __need_NULL +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 39 "/usr/include/time.h" 2 3 4 + + + +# 1 "/usr/include/bits/time.h" 1 3 4 +# 26 "/usr/include/bits/time.h" 3 4 +#define _STRUCT_TIMEVAL 1 + + + + +struct timeval + { + __time_t tv_sec; + __suseconds_t tv_usec; + }; + + + + + +#define _BITS_TIME_H 1 + + + + + + + +#define CLOCKS_PER_SEC 1000000l +# 61 "/usr/include/bits/time.h" 3 4 +#define CLOCK_REALTIME 0 + +#define CLOCK_MONOTONIC 1 + +#define CLOCK_PROCESS_CPUTIME_ID 2 + +#define CLOCK_THREAD_CPUTIME_ID 3 + +#define CLOCK_MONOTONIC_RAW 4 + +#define CLOCK_REALTIME_COARSE 5 + +#define CLOCK_MONOTONIC_COARSE 6 + +#define CLOCK_BOOTTIME 7 + +#define CLOCK_REALTIME_ALARM 8 + +#define CLOCK_BOOTTIME_ALARM 9 + + +#define TIMER_ABSTIME 1 + + + +# 1 "/usr/include/bits/timex.h" 1 3 4 +# 20 "/usr/include/bits/timex.h" 3 4 +#define _BITS_TIMEX_H 1 + + + +struct timex +{ + unsigned int modes; + long int offset; + long int freq; + long int maxerror; + long int esterror; + int status; + long int constant; + long int precision; + long int tolerance; + struct timeval time; + long int tick; + + long int ppsfreq; + long int jitter; + int shift; + long int stabil; + long int jitcnt; + long int calcnt; + long int errcnt; + long int stbcnt; + + int tai; + + + int :32; int :32; int :32; int :32; + int :32; int :32; int :32; int :32; + int :32; int :32; int :32; +}; + + +#define ADJ_OFFSET 0x0001 +#define ADJ_FREQUENCY 0x0002 +#define ADJ_MAXERROR 0x0004 +#define ADJ_ESTERROR 0x0008 +#define ADJ_STATUS 0x0010 +#define ADJ_TIMECONST 0x0020 +#define ADJ_TAI 0x0080 +#define ADJ_MICRO 0x1000 +#define ADJ_NANO 0x2000 +#define ADJ_TICK 0x4000 +#define ADJ_OFFSET_SINGLESHOT 0x8001 +#define ADJ_OFFSET_SS_READ 0xa001 + + +#define MOD_OFFSET ADJ_OFFSET +#define MOD_FREQUENCY ADJ_FREQUENCY +#define MOD_MAXERROR ADJ_MAXERROR +#define MOD_ESTERROR ADJ_ESTERROR +#define MOD_STATUS ADJ_STATUS +#define MOD_TIMECONST ADJ_TIMECONST +#define MOD_CLKB ADJ_TICK +#define MOD_CLKA ADJ_OFFSET_SINGLESHOT +#define MOD_TAI ADJ_TAI +#define MOD_MICRO ADJ_MICRO +#define MOD_NANO ADJ_NANO + + + +#define STA_PLL 0x0001 +#define STA_PPSFREQ 0x0002 +#define STA_PPSTIME 0x0004 +#define STA_FLL 0x0008 + +#define STA_INS 0x0010 +#define STA_DEL 0x0020 +#define STA_UNSYNC 0x0040 +#define STA_FREQHOLD 0x0080 + +#define STA_PPSSIGNAL 0x0100 +#define STA_PPSJITTER 0x0200 +#define STA_PPSWANDER 0x0400 +#define STA_PPSERROR 0x0800 + +#define STA_CLOCKERR 0x1000 +#define STA_NANO 0x2000 +#define STA_MODE 0x4000 +#define STA_CLK 0x8000 + + +#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK) +# 87 "/usr/include/bits/time.h" 2 3 4 + +extern "C" { + + +extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) throw (); + +} + + + + + +#undef __need_timeval +# 43 "/usr/include/time.h" 2 3 4 +# 54 "/usr/include/time.h" 3 4 +#define __clock_t_defined 1 + + + + + +typedef __clock_t clock_t; + + + + + + +#undef __need_clock_t +# 83 "/usr/include/time.h" 3 4 +#undef __need_time_t + + + +#define __clockid_t_defined 1 + + + + +typedef __clockid_t clockid_t; + + +#undef __clockid_time_t + + + +#define __timer_t_defined 1 + + + + +typedef __timer_t timer_t; + + +#undef __need_timer_t +# 127 "/usr/include/time.h" 3 4 +#undef __need_timespec + + + + + +struct tm +{ + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; + + + long int tm_gmtoff; + __const char *tm_zone; + + + + +}; + + + + + + + + +struct itimerspec + { + struct timespec it_interval; + struct timespec it_value; + }; + + +struct sigevent; +# 180 "/usr/include/time.h" 3 4 + + + +extern clock_t clock (void) throw (); + + +extern time_t time (time_t *__timer) throw (); + + +extern double difftime (time_t __time1, time_t __time0) + throw () __attribute__ ((__const__)); + + +extern time_t mktime (struct tm *__tp) throw (); + + + + + +extern size_t strftime (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp) throw (); + + + + + +extern char *strptime (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp) + throw (); + + + + + + + +extern size_t strftime_l (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp, + __locale_t __loc) throw (); + + + +extern char *strptime_l (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp, + __locale_t __loc) throw (); + + + + + + +extern struct tm *gmtime (__const time_t *__timer) throw (); + + + +extern struct tm *localtime (__const time_t *__timer) throw (); + + + + + +extern struct tm *gmtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) throw (); + + + +extern struct tm *localtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) throw (); + + + + + +extern char *asctime (__const struct tm *__tp) throw (); + + +extern char *ctime (__const time_t *__timer) throw (); + + + + + + + +extern char *asctime_r (__const struct tm *__restrict __tp, + char *__restrict __buf) throw (); + + +extern char *ctime_r (__const time_t *__restrict __timer, + char *__restrict __buf) throw (); + + + + +extern char *__tzname[2]; +extern int __daylight; +extern long int __timezone; + + + + +extern char *tzname[2]; + + + +extern void tzset (void) throw (); + + + +extern int daylight; +extern long int timezone; + + + + + +extern int stime (__const time_t *__when) throw (); + + + + + +#define __isleap(year) ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) +# 313 "/usr/include/time.h" 3 4 +extern time_t timegm (struct tm *__tp) throw (); + + +extern time_t timelocal (struct tm *__tp) throw (); + + +extern int dysize (int __year) throw () __attribute__ ((__const__)); +# 328 "/usr/include/time.h" 3 4 +extern int nanosleep (__const struct timespec *__requested_time, + struct timespec *__remaining); + + + +extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw (); + + +extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw (); + + +extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) + throw (); + + + + + + +extern int clock_nanosleep (clockid_t __clock_id, int __flags, + __const struct timespec *__req, + struct timespec *__rem); + + +extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw (); + + + + +extern int timer_create (clockid_t __clock_id, + struct sigevent *__restrict __evp, + timer_t *__restrict __timerid) throw (); + + +extern int timer_delete (timer_t __timerid) throw (); + + +extern int timer_settime (timer_t __timerid, int __flags, + __const struct itimerspec *__restrict __value, + struct itimerspec *__restrict __ovalue) throw (); + + +extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) + throw (); + + +extern int timer_getoverrun (timer_t __timerid) throw (); +# 390 "/usr/include/time.h" 3 4 +extern int getdate_err; +# 399 "/usr/include/time.h" 3 4 +extern struct tm *getdate (__const char *__string); +# 413 "/usr/include/time.h" 3 4 +extern int getdate_r (__const char *__restrict __string, + struct tm *__restrict __resbufp); + + +} +# 27 "/usr/include/pthread.h" 2 3 4 + +# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 +# 21 "/usr/include/bits/pthreadtypes.h" 3 4 +#define _BITS_PTHREADTYPES_H 1 + +# 1 "/usr/include/bits/wordsize.h" 1 3 4 + + + +#define __WORDSIZE 64 +#define __WORDSIZE_COMPAT32 1 +# 24 "/usr/include/bits/pthreadtypes.h" 2 3 4 + + +#define __SIZEOF_PTHREAD_ATTR_T 56 +#define __SIZEOF_PTHREAD_MUTEX_T 40 +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_RWLOCK_T 56 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIER_T 32 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 +# 50 "/usr/include/bits/pthreadtypes.h" 3 4 +typedef unsigned long int pthread_t; + + +typedef union +{ + char __size[56]; + long int __align; +} pthread_attr_t; + + + +typedef struct __pthread_internal_list +{ + struct __pthread_internal_list *__prev; + struct __pthread_internal_list *__next; +} __pthread_list_t; +# 76 "/usr/include/bits/pthreadtypes.h" 3 4 +typedef union +{ + struct __pthread_mutex_s + { + int __lock; + unsigned int __count; + int __owner; + + unsigned int __nusers; + + + + int __kind; + + int __spins; + __pthread_list_t __list; +#define __PTHREAD_MUTEX_HAVE_PREV 1 +# 101 "/usr/include/bits/pthreadtypes.h" 3 4 + } __data; + char __size[40]; + long int __align; +} pthread_mutex_t; + +typedef union +{ + char __size[4]; + int __align; +} pthread_mutexattr_t; + + + + +typedef union +{ + struct + { + int __lock; + unsigned int __futex; + __extension__ unsigned long long int __total_seq; + __extension__ unsigned long long int __wakeup_seq; + __extension__ unsigned long long int __woken_seq; + void *__mutex; + unsigned int __nwaiters; + unsigned int __broadcast_seq; + } __data; + char __size[48]; + __extension__ long long int __align; +} pthread_cond_t; + +typedef union +{ + char __size[4]; + int __align; +} pthread_condattr_t; + + + +typedef unsigned int pthread_key_t; + + + +typedef int pthread_once_t; + + + + + +typedef union +{ + + struct + { + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + int __writer; + int __shared; + unsigned long int __pad1; + unsigned long int __pad2; + + + unsigned int __flags; + } __data; +# 187 "/usr/include/bits/pthreadtypes.h" 3 4 + char __size[56]; + long int __align; +} pthread_rwlock_t; + +typedef union +{ + char __size[8]; + long int __align; +} pthread_rwlockattr_t; + + + + + +typedef volatile int pthread_spinlock_t; + + + + +typedef union +{ + char __size[32]; + long int __align; +} pthread_barrier_t; + +typedef union +{ + char __size[4]; + int __align; +} pthread_barrierattr_t; +# 29 "/usr/include/pthread.h" 2 3 4 +# 1 "/usr/include/bits/setjmp.h" 1 3 4 +# 21 "/usr/include/bits/setjmp.h" 3 4 +#define _BITS_SETJMP_H 1 + + + + + +# 1 "/usr/include/bits/wordsize.h" 1 3 4 + + + +#define __WORDSIZE 64 +#define __WORDSIZE_COMPAT32 1 +# 28 "/usr/include/bits/setjmp.h" 2 3 4 + + + + +typedef long int __jmp_buf[8]; +# 30 "/usr/include/pthread.h" 2 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 + + + +#define __WORDSIZE 64 +#define __WORDSIZE_COMPAT32 1 +# 31 "/usr/include/pthread.h" 2 3 4 + + + +enum +{ + PTHREAD_CREATE_JOINABLE, +#define PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE + PTHREAD_CREATE_DETACHED +#define PTHREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED +}; + + + +enum +{ + PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_ADAPTIVE_NP + + , + PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL + + + + , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP + +}; + + + + +enum +{ + PTHREAD_MUTEX_STALLED, + PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, + PTHREAD_MUTEX_ROBUST, + PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST +}; + + + + + +enum +{ + PTHREAD_PRIO_NONE, + PTHREAD_PRIO_INHERIT, + PTHREAD_PRIO_PROTECT +}; + + + + + +#define PTHREAD_MUTEX_INITIALIZER { { 0, 0, 0, 0, 0, 0, { 0, 0 } } } + + +#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { 0, 0 } } } + +#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP { { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0, { 0, 0 } } } + +#define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP { { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0, { 0, 0 } } } +# 115 "/usr/include/pthread.h" 3 4 +enum +{ + PTHREAD_RWLOCK_PREFER_READER_NP, + PTHREAD_RWLOCK_PREFER_WRITER_NP, + PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, + PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP +}; + + +#define PTHREAD_RWLOCK_INITIALIZER { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } } + + + +#define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } } +# 147 "/usr/include/pthread.h" 3 4 +enum +{ + PTHREAD_INHERIT_SCHED, +#define PTHREAD_INHERIT_SCHED PTHREAD_INHERIT_SCHED + PTHREAD_EXPLICIT_SCHED +#define PTHREAD_EXPLICIT_SCHED PTHREAD_EXPLICIT_SCHED +}; + + + +enum +{ + PTHREAD_SCOPE_SYSTEM, +#define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_SYSTEM + PTHREAD_SCOPE_PROCESS +#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS +}; + + + +enum +{ + PTHREAD_PROCESS_PRIVATE, +#define PTHREAD_PROCESS_PRIVATE PTHREAD_PROCESS_PRIVATE + PTHREAD_PROCESS_SHARED +#define PTHREAD_PROCESS_SHARED PTHREAD_PROCESS_SHARED +}; + + + + +#define PTHREAD_COND_INITIALIZER { { 0, 0, 0, 0, 0, (void *) 0, 0, 0 } } + + + +struct _pthread_cleanup_buffer +{ + void (*__routine) (void *); + void *__arg; + int __canceltype; + struct _pthread_cleanup_buffer *__prev; +}; + + +enum +{ + PTHREAD_CANCEL_ENABLE, +#define PTHREAD_CANCEL_ENABLE PTHREAD_CANCEL_ENABLE + PTHREAD_CANCEL_DISABLE +#define PTHREAD_CANCEL_DISABLE PTHREAD_CANCEL_DISABLE +}; +enum +{ + PTHREAD_CANCEL_DEFERRED, +#define PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_DEFERRED + PTHREAD_CANCEL_ASYNCHRONOUS +#define PTHREAD_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS +}; +#define PTHREAD_CANCELED ((void *) -1) + + + +#define PTHREAD_ONCE_INIT 0 + + + + + + +#define PTHREAD_BARRIER_SERIAL_THREAD -1 + + + +extern "C" { + + + + +extern int pthread_create (pthread_t *__restrict __newthread, + __const pthread_attr_t *__restrict __attr, + void *(*__start_routine) (void *), + void *__restrict __arg) throw () __attribute__ ((__nonnull__ (1, 3))); + + + + + +extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); + + + + + + + +extern int pthread_join (pthread_t __th, void **__thread_return); + + + + +extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) throw (); + + + + + + + +extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, + __const struct timespec *__abstime); + + + + + + +extern int pthread_detach (pthread_t __th) throw (); + + + +extern pthread_t pthread_self (void) throw () __attribute__ ((__const__)); + + +extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) throw (); + + + + + + + +extern int pthread_attr_init (pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_destroy (pthread_attr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, + int *__detachstate) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, + int __detachstate) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, + size_t *__guardsize) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setguardsize (pthread_attr_t *__attr, + size_t __guardsize) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict + __attr, + struct sched_param *__restrict __param) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, + __const struct sched_param *__restrict + __param) throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict + __attr, int *__restrict __policy) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict + __attr, int *__restrict __inherit) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, + int __inherit) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, + int *__restrict __scope) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict + __attr, void **__restrict __stackaddr) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); + + + + + +extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, + void *__stackaddr) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); + + +extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict + __attr, size_t *__restrict __stacksize) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int pthread_attr_setstacksize (pthread_attr_t *__attr, + size_t __stacksize) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, + void **__restrict __stackaddr, + size_t *__restrict __stacksize) + throw () __attribute__ ((__nonnull__ (1, 2, 3))); + + + + +extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, + size_t __stacksize) throw () __attribute__ ((__nonnull__ (1))); + + + + + +extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, + size_t __cpusetsize, + __const cpu_set_t *__cpuset) + throw () __attribute__ ((__nonnull__ (1, 3))); + + + +extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr, + size_t __cpusetsize, + cpu_set_t *__cpuset) + throw () __attribute__ ((__nonnull__ (1, 3))); + + + + + +extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) + throw () __attribute__ ((__nonnull__ (2))); + + + + + + + +extern int pthread_setschedparam (pthread_t __target_thread, int __policy, + __const struct sched_param *__param) + throw () __attribute__ ((__nonnull__ (3))); + + +extern int pthread_getschedparam (pthread_t __target_thread, + int *__restrict __policy, + struct sched_param *__restrict __param) + throw () __attribute__ ((__nonnull__ (2, 3))); + + +extern int pthread_setschedprio (pthread_t __target_thread, int __prio) + throw (); + + + + +extern int pthread_getname_np (pthread_t __target_thread, char *__buf, + size_t __buflen) + throw () __attribute__ ((__nonnull__ (2))); + + +extern int pthread_setname_np (pthread_t __target_thread, __const char *__name) + throw () __attribute__ ((__nonnull__ (2))); + + + + + +extern int pthread_getconcurrency (void) throw (); + + +extern int pthread_setconcurrency (int __level) throw (); + + + + + + + +extern int pthread_yield (void) throw (); + + + + +extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, + __const cpu_set_t *__cpuset) + throw () __attribute__ ((__nonnull__ (3))); + + +extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, + cpu_set_t *__cpuset) + throw () __attribute__ ((__nonnull__ (3))); +# 478 "/usr/include/pthread.h" 3 4 +extern int pthread_once (pthread_once_t *__once_control, + void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); +# 490 "/usr/include/pthread.h" 3 4 +extern int pthread_setcancelstate (int __state, int *__oldstate); + + + +extern int pthread_setcanceltype (int __type, int *__oldtype); + + +extern int pthread_cancel (pthread_t __th); + + + + +extern void pthread_testcancel (void); + + + + +typedef struct +{ + struct + { + __jmp_buf __cancel_jmp_buf; + int __mask_was_saved; + } __cancel_jmp_buf[1]; + void *__pad[4]; +} __pthread_unwind_buf_t __attribute__ ((__aligned__)); + + + +#define __cleanup_fct_attribute + + + + +struct __pthread_cleanup_frame +{ + void (*__cancel_routine) (void *); + void *__cancel_arg; + int __do_it; + int __cancel_type; +}; + + + + +class __pthread_cleanup_class +{ + void (*__cancel_routine) (void *); + void *__cancel_arg; + int __do_it; + int __cancel_type; + + public: + __pthread_cleanup_class (void (*__fct) (void *), void *__arg) + : __cancel_routine (__fct), __cancel_arg (__arg), __do_it (1) { } + ~__pthread_cleanup_class () { if (__do_it) __cancel_routine (__cancel_arg); } + void __setdoit (int __newval) { __do_it = __newval; } + void __defer () { pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, + &__cancel_type); } + void __restore () const { pthread_setcanceltype (__cancel_type, 0); } +}; +# 559 "/usr/include/pthread.h" 3 4 +#define pthread_cleanup_push(routine,arg) do { __pthread_cleanup_class __clframe (routine, arg) + + + + + +#define pthread_cleanup_pop(execute) __clframe.__setdoit (execute); } while (0) + + + + + + + +#define pthread_cleanup_push_defer_np(routine,arg) do { __pthread_cleanup_class __clframe (routine, arg); __clframe.__defer () + + + + + + + +#define pthread_cleanup_pop_restore_np(execute) __clframe.__restore (); __clframe.__setdoit (execute); } while (0) +# 726 "/usr/include/pthread.h" 3 4 +struct __jmp_buf_tag; +extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) throw (); + + + + + +extern int pthread_mutex_init (pthread_mutex_t *__mutex, + __const pthread_mutexattr_t *__mutexattr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutex_lock (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, + __const struct timespec *__restrict + __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutex_getprioceiling (__const pthread_mutex_t * + __restrict __mutex, + int *__restrict __prioceiling) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, + int __prioceiling, + int *__restrict __old_ceiling) + throw () __attribute__ ((__nonnull__ (1, 3))); + + + + +extern int pthread_mutex_consistent (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); + +extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); +# 790 "/usr/include/pthread.h" 3 4 +extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __pshared) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, + int __pshared) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict + __attr, int *__restrict __kind) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __protocol) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, + int __protocol) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __prioceiling) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, + int __prioceiling) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr, + int *__robustness) + throw () __attribute__ ((__nonnull__ (1, 2))); + +extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr, + int *__robustness) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, + int __robustness) + throw () __attribute__ ((__nonnull__ (1))); + +extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, + int __robustness) + throw () __attribute__ ((__nonnull__ (1))); +# 872 "/usr/include/pthread.h" 3 4 +extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, + __const pthread_rwlockattr_t *__restrict + __attr) throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, + __const struct timespec *__restrict + __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, + __const struct timespec *__restrict + __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); + + + + + +extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * + __restrict __attr, + int *__restrict __pshared) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, + int __pshared) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t * + __restrict __attr, + int *__restrict __pref) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, + int __pref) throw () __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int pthread_cond_init (pthread_cond_t *__restrict __cond, + __const pthread_condattr_t *__restrict + __cond_attr) throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_cond_destroy (pthread_cond_t *__cond) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_cond_signal (pthread_cond_t *__cond) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_cond_broadcast (pthread_cond_t *__cond) + throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex) + __attribute__ ((__nonnull__ (1, 2))); +# 984 "/usr/include/pthread.h" 3 4 +extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex, + __const struct timespec *__restrict + __abstime) __attribute__ ((__nonnull__ (1, 2, 3))); + + + + +extern int pthread_condattr_init (pthread_condattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_condattr_destroy (pthread_condattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_condattr_getpshared (__const pthread_condattr_t * + __restrict __attr, + int *__restrict __pshared) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, + int __pshared) throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_condattr_getclock (__const pthread_condattr_t * + __restrict __attr, + __clockid_t *__restrict __clock_id) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_condattr_setclock (pthread_condattr_t *__attr, + __clockid_t __clock_id) + throw () __attribute__ ((__nonnull__ (1))); +# 1028 "/usr/include/pthread.h" 3 4 +extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_destroy (pthread_spinlock_t *__lock) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_lock (pthread_spinlock_t *__lock) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_trylock (pthread_spinlock_t *__lock) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_unlock (pthread_spinlock_t *__lock) + throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, + __const pthread_barrierattr_t *__restrict + __attr, unsigned int __count) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrier_wait (pthread_barrier_t *__barrier) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * + __restrict __attr, + int *__restrict __pshared) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, + int __pshared) + throw () __attribute__ ((__nonnull__ (1))); +# 1095 "/usr/include/pthread.h" 3 4 +extern int pthread_key_create (pthread_key_t *__key, + void (*__destr_function) (void *)) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_key_delete (pthread_key_t __key) throw (); + + +extern void *pthread_getspecific (pthread_key_t __key) throw (); + + +extern int pthread_setspecific (pthread_key_t __key, + __const void *__pointer) throw () ; + + + + +extern int pthread_getcpuclockid (pthread_t __thread_id, + __clockid_t *__clock_id) + throw () __attribute__ ((__nonnull__ (2))); +# 1129 "/usr/include/pthread.h" 3 4 +extern int pthread_atfork (void (*__prepare) (void), + void (*__parent) (void), + void (*__child) (void)) throw (); + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +pthread_equal (pthread_t __thread1, pthread_t __thread2) throw () +{ + return __thread1 == __thread2; +} + + +} +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 2 3 +# 1 "/usr/include/unistd.h" 1 3 4 +# 24 "/usr/include/unistd.h" 3 4 +#define _UNISTD_H 1 + + + +extern "C" { + + + + + + +#define _POSIX_VERSION 200809L +# 54 "/usr/include/unistd.h" 3 4 +#define __POSIX2_THIS_VERSION 200809L +# 68 "/usr/include/unistd.h" 3 4 +#define _POSIX2_VERSION __POSIX2_THIS_VERSION + + + +#define _POSIX2_C_BIND __POSIX2_THIS_VERSION + + + +#define _POSIX2_C_DEV __POSIX2_THIS_VERSION + + + +#define _POSIX2_SW_DEV __POSIX2_THIS_VERSION + + + +#define _POSIX2_LOCALEDEF __POSIX2_THIS_VERSION + + + +#define _XOPEN_VERSION 700 +# 98 "/usr/include/unistd.h" 3 4 +#define _XOPEN_XCU_VERSION 4 + + +#define _XOPEN_XPG2 1 +#define _XOPEN_XPG3 1 +#define _XOPEN_XPG4 1 + + +#define _XOPEN_UNIX 1 + + +#define _XOPEN_CRYPT 1 + + + +#define _XOPEN_ENH_I18N 1 + + +#define _XOPEN_LEGACY 1 +# 203 "/usr/include/unistd.h" 3 4 +# 1 "/usr/include/bits/posix_opt.h" 1 3 4 +# 21 "/usr/include/bits/posix_opt.h" 3 4 +#define _BITS_POSIX_OPT_H 1 + + +#define _POSIX_JOB_CONTROL 1 + + +#define _POSIX_SAVED_IDS 1 + + +#define _POSIX_PRIORITY_SCHEDULING 200809L + + +#define _POSIX_SYNCHRONIZED_IO 200809L + + +#define _POSIX_FSYNC 200809L + + +#define _POSIX_MAPPED_FILES 200809L + + +#define _POSIX_MEMLOCK 200809L + + +#define _POSIX_MEMLOCK_RANGE 200809L + + +#define _POSIX_MEMORY_PROTECTION 200809L + + +#define _POSIX_CHOWN_RESTRICTED 0 + + + +#define _POSIX_VDISABLE '\0' + + +#define _POSIX_NO_TRUNC 1 + + +#define _XOPEN_REALTIME 1 + + +#define _XOPEN_REALTIME_THREADS 1 + + +#define _XOPEN_SHM 1 + + +#define _POSIX_THREADS 200809L + + +#define _POSIX_REENTRANT_FUNCTIONS 1 +#define _POSIX_THREAD_SAFE_FUNCTIONS 200809L + + +#define _POSIX_THREAD_PRIORITY_SCHEDULING 200809L + + +#define _POSIX_THREAD_ATTR_STACKSIZE 200809L + + +#define _POSIX_THREAD_ATTR_STACKADDR 200809L + + +#define _POSIX_THREAD_PRIO_INHERIT 200809L + + + +#define _POSIX_THREAD_PRIO_PROTECT 200809L + + + +#define _POSIX_THREAD_ROBUST_PRIO_INHERIT 200809L + + +#define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1 + + + +#define _POSIX_SEMAPHORES 200809L + + +#define _POSIX_REALTIME_SIGNALS 200809L + + +#define _POSIX_ASYNCHRONOUS_IO 200809L +#define _POSIX_ASYNC_IO 1 + +#define _LFS_ASYNCHRONOUS_IO 1 + +#define _POSIX_PRIORITIZED_IO 200809L + + +#define _LFS64_ASYNCHRONOUS_IO 1 + + +#define _LFS_LARGEFILE 1 +#define _LFS64_LARGEFILE 1 +#define _LFS64_STDIO 1 + + +#define _POSIX_SHARED_MEMORY_OBJECTS 200809L + + +#define _POSIX_CPUTIME 0 + + +#define _POSIX_THREAD_CPUTIME 0 + + +#define _POSIX_REGEXP 1 + + +#define _POSIX_READER_WRITER_LOCKS 200809L + + +#define _POSIX_SHELL 1 + + +#define _POSIX_TIMEOUTS 200809L + + +#define _POSIX_SPIN_LOCKS 200809L + + +#define _POSIX_SPAWN 200809L + + +#define _POSIX_TIMERS 200809L + + +#define _POSIX_BARRIERS 200809L + + +#define _POSIX_MESSAGE_PASSING 200809L + + +#define _POSIX_THREAD_PROCESS_SHARED 200809L + + +#define _POSIX_MONOTONIC_CLOCK 0 + + +#define _POSIX_CLOCK_SELECTION 200809L + + +#define _POSIX_ADVISORY_INFO 200809L + + +#define _POSIX_IPV6 200809L + + +#define _POSIX_RAW_SOCKETS 200809L + + +#define _POSIX2_CHAR_TERM 200809L + + +#define _POSIX_SPORADIC_SERVER -1 +#define _POSIX_THREAD_SPORADIC_SERVER -1 + + +#define _POSIX_TRACE -1 +#define _POSIX_TRACE_EVENT_FILTER -1 +#define _POSIX_TRACE_INHERIT -1 +#define _POSIX_TRACE_LOG -1 + + +#define _POSIX_TYPED_MEMORY_OBJECTS -1 +# 204 "/usr/include/unistd.h" 2 3 4 + + + +# 1 "/usr/include/bits/environments.h" 1 3 4 +# 23 "/usr/include/bits/environments.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 + + + +#define __WORDSIZE 64 +#define __WORDSIZE_COMPAT32 1 +# 24 "/usr/include/bits/environments.h" 2 3 4 +# 57 "/usr/include/bits/environments.h" 3 4 +#define _POSIX_V7_LPBIG_OFFBIG -1 +#define _POSIX_V6_LPBIG_OFFBIG -1 +#define _XBS5_LPBIG_OFFBIG -1 + + +#define _POSIX_V7_LP64_OFF64 1 +#define _POSIX_V6_LP64_OFF64 1 +#define _XBS5_LP64_OFF64 1 +# 92 "/usr/include/bits/environments.h" 3 4 +#define __ILP32_OFF32_CFLAGS "-m32" +#define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" +#define __ILP32_OFF32_LDFLAGS "-m32" +#define __ILP32_OFFBIG_LDFLAGS "-m32" +#define __LP64_OFF64_CFLAGS "-m64" +#define __LP64_OFF64_LDFLAGS "-m64" +# 208 "/usr/include/unistd.h" 2 3 4 + + + +#define STDIN_FILENO 0 +#define STDOUT_FILENO 1 +#define STDERR_FILENO 2 + + + + + + + +typedef __ssize_t ssize_t; +#define __ssize_t_defined + + +#define __need_size_t +#define __need_NULL +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 228 "/usr/include/unistd.h" 2 3 4 + + + + + +typedef __gid_t gid_t; +#define __gid_t_defined + + + +typedef __uid_t uid_t; +#define __uid_t_defined + + + + +typedef __off_t off_t; + + + +#define __off_t_defined + + +typedef __off64_t off64_t; +#define __off64_t_defined + + + +typedef __useconds_t useconds_t; +#define __useconds_t_defined +# 268 "/usr/include/unistd.h" 3 4 +typedef __intptr_t intptr_t; +#define __intptr_t_defined + + + + + +typedef __socklen_t socklen_t; +#define __socklen_t_defined + + + + + +#define R_OK 4 +#define W_OK 2 +#define X_OK 1 +#define F_OK 0 + + +extern int access (__const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); + + + + +extern int euidaccess (__const char *__name, int __type) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int eaccess (__const char *__name, int __type) + throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern int faccessat (int __fd, __const char *__file, int __type, int __flag) + throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); + + + + + +#define SEEK_SET 0 +#define SEEK_CUR 1 +#define SEEK_END 2 + + + + +#define L_SET SEEK_SET +#define L_INCR SEEK_CUR +#define L_XTND SEEK_END +# 331 "/usr/include/unistd.h" 3 4 +extern __off_t lseek (int __fd, __off_t __offset, int __whence) throw (); +# 342 "/usr/include/unistd.h" 3 4 +extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) + throw (); + + + + + + +extern int close (int __fd); + + + + + + +extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__)); + + + + + +extern ssize_t write (int __fd, __const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__)); +# 373 "/usr/include/unistd.h" 3 4 +extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, + __off_t __offset) __attribute__ ((__warn_unused_result__)); + + + + + + +extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n, + __off_t __offset) __attribute__ ((__warn_unused_result__)); +# 401 "/usr/include/unistd.h" 3 4 +extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset) __attribute__ ((__warn_unused_result__)); + + +extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n, + __off64_t __offset) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern int pipe (int __pipedes[2]) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern int pipe2 (int __pipedes[2], int __flags) throw () __attribute__ ((__warn_unused_result__)); +# 429 "/usr/include/unistd.h" 3 4 +extern unsigned int alarm (unsigned int __seconds) throw (); +# 441 "/usr/include/unistd.h" 3 4 +extern unsigned int sleep (unsigned int __seconds); + + + + + + + +extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) + throw (); + + + + + + +extern int usleep (__useconds_t __useconds); +# 466 "/usr/include/unistd.h" 3 4 +extern int pause (void); + + + +extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + +extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + + +extern int fchownat (int __fd, __const char *__file, __uid_t __owner, + __gid_t __group, int __flag) + throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); + + + +extern int chdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + +extern int fchdir (int __fd) throw () __attribute__ ((__warn_unused_result__)); +# 508 "/usr/include/unistd.h" 3 4 +extern char *getcwd (char *__buf, size_t __size) throw () __attribute__ ((__warn_unused_result__)); + + + + + +extern char *get_current_dir_name (void) throw (); + + + + + + + +extern char *getwd (char *__buf) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)); + + + + +extern int dup (int __fd) throw () __attribute__ ((__warn_unused_result__)); + + +extern int dup2 (int __fd, int __fd2) throw (); + + + + +extern int dup3 (int __fd, int __fd2, int __flags) throw (); + + + +extern char **__environ; + +extern char **environ; + + + + + +extern int execve (__const char *__path, char *__const __argv[], + char *__const __envp[]) throw () __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[]) + throw () __attribute__ ((__nonnull__ (2))); + + + + +extern int execv (__const char *__path, char *__const __argv[]) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int execle (__const char *__path, __const char *__arg, ...) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int execl (__const char *__path, __const char *__arg, ...) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int execvp (__const char *__file, char *__const __argv[]) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int execlp (__const char *__file, __const char *__arg, ...) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int execvpe (__const char *__file, char *__const __argv[], + char *__const __envp[]) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern int nice (int __inc) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern void _exit (int __status) __attribute__ ((__noreturn__)); + + + + + +# 1 "/usr/include/bits/confname.h" 1 3 4 +# 26 "/usr/include/bits/confname.h" 3 4 +enum + { + _PC_LINK_MAX, +#define _PC_LINK_MAX _PC_LINK_MAX + _PC_MAX_CANON, +#define _PC_MAX_CANON _PC_MAX_CANON + _PC_MAX_INPUT, +#define _PC_MAX_INPUT _PC_MAX_INPUT + _PC_NAME_MAX, +#define _PC_NAME_MAX _PC_NAME_MAX + _PC_PATH_MAX, +#define _PC_PATH_MAX _PC_PATH_MAX + _PC_PIPE_BUF, +#define _PC_PIPE_BUF _PC_PIPE_BUF + _PC_CHOWN_RESTRICTED, +#define _PC_CHOWN_RESTRICTED _PC_CHOWN_RESTRICTED + _PC_NO_TRUNC, +#define _PC_NO_TRUNC _PC_NO_TRUNC + _PC_VDISABLE, +#define _PC_VDISABLE _PC_VDISABLE + _PC_SYNC_IO, +#define _PC_SYNC_IO _PC_SYNC_IO + _PC_ASYNC_IO, +#define _PC_ASYNC_IO _PC_ASYNC_IO + _PC_PRIO_IO, +#define _PC_PRIO_IO _PC_PRIO_IO + _PC_SOCK_MAXBUF, +#define _PC_SOCK_MAXBUF _PC_SOCK_MAXBUF + _PC_FILESIZEBITS, +#define _PC_FILESIZEBITS _PC_FILESIZEBITS + _PC_REC_INCR_XFER_SIZE, +#define _PC_REC_INCR_XFER_SIZE _PC_REC_INCR_XFER_SIZE + _PC_REC_MAX_XFER_SIZE, +#define _PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE + _PC_REC_MIN_XFER_SIZE, +#define _PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE + _PC_REC_XFER_ALIGN, +#define _PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN + _PC_ALLOC_SIZE_MIN, +#define _PC_ALLOC_SIZE_MIN _PC_ALLOC_SIZE_MIN + _PC_SYMLINK_MAX, +#define _PC_SYMLINK_MAX _PC_SYMLINK_MAX + _PC_2_SYMLINKS +#define _PC_2_SYMLINKS _PC_2_SYMLINKS + }; + + +enum + { + _SC_ARG_MAX, +#define _SC_ARG_MAX _SC_ARG_MAX + _SC_CHILD_MAX, +#define _SC_CHILD_MAX _SC_CHILD_MAX + _SC_CLK_TCK, +#define _SC_CLK_TCK _SC_CLK_TCK + _SC_NGROUPS_MAX, +#define _SC_NGROUPS_MAX _SC_NGROUPS_MAX + _SC_OPEN_MAX, +#define _SC_OPEN_MAX _SC_OPEN_MAX + _SC_STREAM_MAX, +#define _SC_STREAM_MAX _SC_STREAM_MAX + _SC_TZNAME_MAX, +#define _SC_TZNAME_MAX _SC_TZNAME_MAX + _SC_JOB_CONTROL, +#define _SC_JOB_CONTROL _SC_JOB_CONTROL + _SC_SAVED_IDS, +#define _SC_SAVED_IDS _SC_SAVED_IDS + _SC_REALTIME_SIGNALS, +#define _SC_REALTIME_SIGNALS _SC_REALTIME_SIGNALS + _SC_PRIORITY_SCHEDULING, +#define _SC_PRIORITY_SCHEDULING _SC_PRIORITY_SCHEDULING + _SC_TIMERS, +#define _SC_TIMERS _SC_TIMERS + _SC_ASYNCHRONOUS_IO, +#define _SC_ASYNCHRONOUS_IO _SC_ASYNCHRONOUS_IO + _SC_PRIORITIZED_IO, +#define _SC_PRIORITIZED_IO _SC_PRIORITIZED_IO + _SC_SYNCHRONIZED_IO, +#define _SC_SYNCHRONIZED_IO _SC_SYNCHRONIZED_IO + _SC_FSYNC, +#define _SC_FSYNC _SC_FSYNC + _SC_MAPPED_FILES, +#define _SC_MAPPED_FILES _SC_MAPPED_FILES + _SC_MEMLOCK, +#define _SC_MEMLOCK _SC_MEMLOCK + _SC_MEMLOCK_RANGE, +#define _SC_MEMLOCK_RANGE _SC_MEMLOCK_RANGE + _SC_MEMORY_PROTECTION, +#define _SC_MEMORY_PROTECTION _SC_MEMORY_PROTECTION + _SC_MESSAGE_PASSING, +#define _SC_MESSAGE_PASSING _SC_MESSAGE_PASSING + _SC_SEMAPHORES, +#define _SC_SEMAPHORES _SC_SEMAPHORES + _SC_SHARED_MEMORY_OBJECTS, +#define _SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS + _SC_AIO_LISTIO_MAX, +#define _SC_AIO_LISTIO_MAX _SC_AIO_LISTIO_MAX + _SC_AIO_MAX, +#define _SC_AIO_MAX _SC_AIO_MAX + _SC_AIO_PRIO_DELTA_MAX, +#define _SC_AIO_PRIO_DELTA_MAX _SC_AIO_PRIO_DELTA_MAX + _SC_DELAYTIMER_MAX, +#define _SC_DELAYTIMER_MAX _SC_DELAYTIMER_MAX + _SC_MQ_OPEN_MAX, +#define _SC_MQ_OPEN_MAX _SC_MQ_OPEN_MAX + _SC_MQ_PRIO_MAX, +#define _SC_MQ_PRIO_MAX _SC_MQ_PRIO_MAX + _SC_VERSION, +#define _SC_VERSION _SC_VERSION + _SC_PAGESIZE, +#define _SC_PAGESIZE _SC_PAGESIZE +#define _SC_PAGE_SIZE _SC_PAGESIZE + _SC_RTSIG_MAX, +#define _SC_RTSIG_MAX _SC_RTSIG_MAX + _SC_SEM_NSEMS_MAX, +#define _SC_SEM_NSEMS_MAX _SC_SEM_NSEMS_MAX + _SC_SEM_VALUE_MAX, +#define _SC_SEM_VALUE_MAX _SC_SEM_VALUE_MAX + _SC_SIGQUEUE_MAX, +#define _SC_SIGQUEUE_MAX _SC_SIGQUEUE_MAX + _SC_TIMER_MAX, +#define _SC_TIMER_MAX _SC_TIMER_MAX + + + + _SC_BC_BASE_MAX, +#define _SC_BC_BASE_MAX _SC_BC_BASE_MAX + _SC_BC_DIM_MAX, +#define _SC_BC_DIM_MAX _SC_BC_DIM_MAX + _SC_BC_SCALE_MAX, +#define _SC_BC_SCALE_MAX _SC_BC_SCALE_MAX + _SC_BC_STRING_MAX, +#define _SC_BC_STRING_MAX _SC_BC_STRING_MAX + _SC_COLL_WEIGHTS_MAX, +#define _SC_COLL_WEIGHTS_MAX _SC_COLL_WEIGHTS_MAX + _SC_EQUIV_CLASS_MAX, +#define _SC_EQUIV_CLASS_MAX _SC_EQUIV_CLASS_MAX + _SC_EXPR_NEST_MAX, +#define _SC_EXPR_NEST_MAX _SC_EXPR_NEST_MAX + _SC_LINE_MAX, +#define _SC_LINE_MAX _SC_LINE_MAX + _SC_RE_DUP_MAX, +#define _SC_RE_DUP_MAX _SC_RE_DUP_MAX + _SC_CHARCLASS_NAME_MAX, +#define _SC_CHARCLASS_NAME_MAX _SC_CHARCLASS_NAME_MAX + + _SC_2_VERSION, +#define _SC_2_VERSION _SC_2_VERSION + _SC_2_C_BIND, +#define _SC_2_C_BIND _SC_2_C_BIND + _SC_2_C_DEV, +#define _SC_2_C_DEV _SC_2_C_DEV + _SC_2_FORT_DEV, +#define _SC_2_FORT_DEV _SC_2_FORT_DEV + _SC_2_FORT_RUN, +#define _SC_2_FORT_RUN _SC_2_FORT_RUN + _SC_2_SW_DEV, +#define _SC_2_SW_DEV _SC_2_SW_DEV + _SC_2_LOCALEDEF, +#define _SC_2_LOCALEDEF _SC_2_LOCALEDEF + + _SC_PII, +#define _SC_PII _SC_PII + _SC_PII_XTI, +#define _SC_PII_XTI _SC_PII_XTI + _SC_PII_SOCKET, +#define _SC_PII_SOCKET _SC_PII_SOCKET + _SC_PII_INTERNET, +#define _SC_PII_INTERNET _SC_PII_INTERNET + _SC_PII_OSI, +#define _SC_PII_OSI _SC_PII_OSI + _SC_POLL, +#define _SC_POLL _SC_POLL + _SC_SELECT, +#define _SC_SELECT _SC_SELECT + _SC_UIO_MAXIOV, +#define _SC_UIO_MAXIOV _SC_UIO_MAXIOV + _SC_IOV_MAX = _SC_UIO_MAXIOV, +#define _SC_IOV_MAX _SC_IOV_MAX + _SC_PII_INTERNET_STREAM, +#define _SC_PII_INTERNET_STREAM _SC_PII_INTERNET_STREAM + _SC_PII_INTERNET_DGRAM, +#define _SC_PII_INTERNET_DGRAM _SC_PII_INTERNET_DGRAM + _SC_PII_OSI_COTS, +#define _SC_PII_OSI_COTS _SC_PII_OSI_COTS + _SC_PII_OSI_CLTS, +#define _SC_PII_OSI_CLTS _SC_PII_OSI_CLTS + _SC_PII_OSI_M, +#define _SC_PII_OSI_M _SC_PII_OSI_M + _SC_T_IOV_MAX, +#define _SC_T_IOV_MAX _SC_T_IOV_MAX + + + _SC_THREADS, +#define _SC_THREADS _SC_THREADS + _SC_THREAD_SAFE_FUNCTIONS, +#define _SC_THREAD_SAFE_FUNCTIONS _SC_THREAD_SAFE_FUNCTIONS + _SC_GETGR_R_SIZE_MAX, +#define _SC_GETGR_R_SIZE_MAX _SC_GETGR_R_SIZE_MAX + _SC_GETPW_R_SIZE_MAX, +#define _SC_GETPW_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX + _SC_LOGIN_NAME_MAX, +#define _SC_LOGIN_NAME_MAX _SC_LOGIN_NAME_MAX + _SC_TTY_NAME_MAX, +#define _SC_TTY_NAME_MAX _SC_TTY_NAME_MAX + _SC_THREAD_DESTRUCTOR_ITERATIONS, +#define _SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_DESTRUCTOR_ITERATIONS + _SC_THREAD_KEYS_MAX, +#define _SC_THREAD_KEYS_MAX _SC_THREAD_KEYS_MAX + _SC_THREAD_STACK_MIN, +#define _SC_THREAD_STACK_MIN _SC_THREAD_STACK_MIN + _SC_THREAD_THREADS_MAX, +#define _SC_THREAD_THREADS_MAX _SC_THREAD_THREADS_MAX + _SC_THREAD_ATTR_STACKADDR, +#define _SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKADDR + _SC_THREAD_ATTR_STACKSIZE, +#define _SC_THREAD_ATTR_STACKSIZE _SC_THREAD_ATTR_STACKSIZE + _SC_THREAD_PRIORITY_SCHEDULING, +#define _SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIORITY_SCHEDULING + _SC_THREAD_PRIO_INHERIT, +#define _SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_INHERIT + _SC_THREAD_PRIO_PROTECT, +#define _SC_THREAD_PRIO_PROTECT _SC_THREAD_PRIO_PROTECT + _SC_THREAD_PROCESS_SHARED, +#define _SC_THREAD_PROCESS_SHARED _SC_THREAD_PROCESS_SHARED + + _SC_NPROCESSORS_CONF, +#define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF + _SC_NPROCESSORS_ONLN, +#define _SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN + _SC_PHYS_PAGES, +#define _SC_PHYS_PAGES _SC_PHYS_PAGES + _SC_AVPHYS_PAGES, +#define _SC_AVPHYS_PAGES _SC_AVPHYS_PAGES + _SC_ATEXIT_MAX, +#define _SC_ATEXIT_MAX _SC_ATEXIT_MAX + _SC_PASS_MAX, +#define _SC_PASS_MAX _SC_PASS_MAX + + _SC_XOPEN_VERSION, +#define _SC_XOPEN_VERSION _SC_XOPEN_VERSION + _SC_XOPEN_XCU_VERSION, +#define _SC_XOPEN_XCU_VERSION _SC_XOPEN_XCU_VERSION + _SC_XOPEN_UNIX, +#define _SC_XOPEN_UNIX _SC_XOPEN_UNIX + _SC_XOPEN_CRYPT, +#define _SC_XOPEN_CRYPT _SC_XOPEN_CRYPT + _SC_XOPEN_ENH_I18N, +#define _SC_XOPEN_ENH_I18N _SC_XOPEN_ENH_I18N + _SC_XOPEN_SHM, +#define _SC_XOPEN_SHM _SC_XOPEN_SHM + + _SC_2_CHAR_TERM, +#define _SC_2_CHAR_TERM _SC_2_CHAR_TERM + _SC_2_C_VERSION, +#define _SC_2_C_VERSION _SC_2_C_VERSION + _SC_2_UPE, +#define _SC_2_UPE _SC_2_UPE + + _SC_XOPEN_XPG2, +#define _SC_XOPEN_XPG2 _SC_XOPEN_XPG2 + _SC_XOPEN_XPG3, +#define _SC_XOPEN_XPG3 _SC_XOPEN_XPG3 + _SC_XOPEN_XPG4, +#define _SC_XOPEN_XPG4 _SC_XOPEN_XPG4 + + _SC_CHAR_BIT, +#define _SC_CHAR_BIT _SC_CHAR_BIT + _SC_CHAR_MAX, +#define _SC_CHAR_MAX _SC_CHAR_MAX + _SC_CHAR_MIN, +#define _SC_CHAR_MIN _SC_CHAR_MIN + _SC_INT_MAX, +#define _SC_INT_MAX _SC_INT_MAX + _SC_INT_MIN, +#define _SC_INT_MIN _SC_INT_MIN + _SC_LONG_BIT, +#define _SC_LONG_BIT _SC_LONG_BIT + _SC_WORD_BIT, +#define _SC_WORD_BIT _SC_WORD_BIT + _SC_MB_LEN_MAX, +#define _SC_MB_LEN_MAX _SC_MB_LEN_MAX + _SC_NZERO, +#define _SC_NZERO _SC_NZERO + _SC_SSIZE_MAX, +#define _SC_SSIZE_MAX _SC_SSIZE_MAX + _SC_SCHAR_MAX, +#define _SC_SCHAR_MAX _SC_SCHAR_MAX + _SC_SCHAR_MIN, +#define _SC_SCHAR_MIN _SC_SCHAR_MIN + _SC_SHRT_MAX, +#define _SC_SHRT_MAX _SC_SHRT_MAX + _SC_SHRT_MIN, +#define _SC_SHRT_MIN _SC_SHRT_MIN + _SC_UCHAR_MAX, +#define _SC_UCHAR_MAX _SC_UCHAR_MAX + _SC_UINT_MAX, +#define _SC_UINT_MAX _SC_UINT_MAX + _SC_ULONG_MAX, +#define _SC_ULONG_MAX _SC_ULONG_MAX + _SC_USHRT_MAX, +#define _SC_USHRT_MAX _SC_USHRT_MAX + + _SC_NL_ARGMAX, +#define _SC_NL_ARGMAX _SC_NL_ARGMAX + _SC_NL_LANGMAX, +#define _SC_NL_LANGMAX _SC_NL_LANGMAX + _SC_NL_MSGMAX, +#define _SC_NL_MSGMAX _SC_NL_MSGMAX + _SC_NL_NMAX, +#define _SC_NL_NMAX _SC_NL_NMAX + _SC_NL_SETMAX, +#define _SC_NL_SETMAX _SC_NL_SETMAX + _SC_NL_TEXTMAX, +#define _SC_NL_TEXTMAX _SC_NL_TEXTMAX + + _SC_XBS5_ILP32_OFF32, +#define _SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFF32 + _SC_XBS5_ILP32_OFFBIG, +#define _SC_XBS5_ILP32_OFFBIG _SC_XBS5_ILP32_OFFBIG + _SC_XBS5_LP64_OFF64, +#define _SC_XBS5_LP64_OFF64 _SC_XBS5_LP64_OFF64 + _SC_XBS5_LPBIG_OFFBIG, +#define _SC_XBS5_LPBIG_OFFBIG _SC_XBS5_LPBIG_OFFBIG + + _SC_XOPEN_LEGACY, +#define _SC_XOPEN_LEGACY _SC_XOPEN_LEGACY + _SC_XOPEN_REALTIME, +#define _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME + _SC_XOPEN_REALTIME_THREADS, +#define _SC_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS + + _SC_ADVISORY_INFO, +#define _SC_ADVISORY_INFO _SC_ADVISORY_INFO + _SC_BARRIERS, +#define _SC_BARRIERS _SC_BARRIERS + _SC_BASE, +#define _SC_BASE _SC_BASE + _SC_C_LANG_SUPPORT, +#define _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT + _SC_C_LANG_SUPPORT_R, +#define _SC_C_LANG_SUPPORT_R _SC_C_LANG_SUPPORT_R + _SC_CLOCK_SELECTION, +#define _SC_CLOCK_SELECTION _SC_CLOCK_SELECTION + _SC_CPUTIME, +#define _SC_CPUTIME _SC_CPUTIME + _SC_THREAD_CPUTIME, +#define _SC_THREAD_CPUTIME _SC_THREAD_CPUTIME + _SC_DEVICE_IO, +#define _SC_DEVICE_IO _SC_DEVICE_IO + _SC_DEVICE_SPECIFIC, +#define _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC + _SC_DEVICE_SPECIFIC_R, +#define _SC_DEVICE_SPECIFIC_R _SC_DEVICE_SPECIFIC_R + _SC_FD_MGMT, +#define _SC_FD_MGMT _SC_FD_MGMT + _SC_FIFO, +#define _SC_FIFO _SC_FIFO + _SC_PIPE, +#define _SC_PIPE _SC_PIPE + _SC_FILE_ATTRIBUTES, +#define _SC_FILE_ATTRIBUTES _SC_FILE_ATTRIBUTES + _SC_FILE_LOCKING, +#define _SC_FILE_LOCKING _SC_FILE_LOCKING + _SC_FILE_SYSTEM, +#define _SC_FILE_SYSTEM _SC_FILE_SYSTEM + _SC_MONOTONIC_CLOCK, +#define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK + _SC_MULTI_PROCESS, +#define _SC_MULTI_PROCESS _SC_MULTI_PROCESS + _SC_SINGLE_PROCESS, +#define _SC_SINGLE_PROCESS _SC_SINGLE_PROCESS + _SC_NETWORKING, +#define _SC_NETWORKING _SC_NETWORKING + _SC_READER_WRITER_LOCKS, +#define _SC_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS + _SC_SPIN_LOCKS, +#define _SC_SPIN_LOCKS _SC_SPIN_LOCKS + _SC_REGEXP, +#define _SC_REGEXP _SC_REGEXP + _SC_REGEX_VERSION, +#define _SC_REGEX_VERSION _SC_REGEX_VERSION + _SC_SHELL, +#define _SC_SHELL _SC_SHELL + _SC_SIGNALS, +#define _SC_SIGNALS _SC_SIGNALS + _SC_SPAWN, +#define _SC_SPAWN _SC_SPAWN + _SC_SPORADIC_SERVER, +#define _SC_SPORADIC_SERVER _SC_SPORADIC_SERVER + _SC_THREAD_SPORADIC_SERVER, +#define _SC_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER + _SC_SYSTEM_DATABASE, +#define _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE + _SC_SYSTEM_DATABASE_R, +#define _SC_SYSTEM_DATABASE_R _SC_SYSTEM_DATABASE_R + _SC_TIMEOUTS, +#define _SC_TIMEOUTS _SC_TIMEOUTS + _SC_TYPED_MEMORY_OBJECTS, +#define _SC_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS + _SC_USER_GROUPS, +#define _SC_USER_GROUPS _SC_USER_GROUPS + _SC_USER_GROUPS_R, +#define _SC_USER_GROUPS_R _SC_USER_GROUPS_R + _SC_2_PBS, +#define _SC_2_PBS _SC_2_PBS + _SC_2_PBS_ACCOUNTING, +#define _SC_2_PBS_ACCOUNTING _SC_2_PBS_ACCOUNTING + _SC_2_PBS_LOCATE, +#define _SC_2_PBS_LOCATE _SC_2_PBS_LOCATE + _SC_2_PBS_MESSAGE, +#define _SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE + _SC_2_PBS_TRACK, +#define _SC_2_PBS_TRACK _SC_2_PBS_TRACK + _SC_SYMLOOP_MAX, +#define _SC_SYMLOOP_MAX _SC_SYMLOOP_MAX + _SC_STREAMS, +#define _SC_STREAMS _SC_STREAMS + _SC_2_PBS_CHECKPOINT, +#define _SC_2_PBS_CHECKPOINT _SC_2_PBS_CHECKPOINT + + _SC_V6_ILP32_OFF32, +#define _SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFF32 + _SC_V6_ILP32_OFFBIG, +#define _SC_V6_ILP32_OFFBIG _SC_V6_ILP32_OFFBIG + _SC_V6_LP64_OFF64, +#define _SC_V6_LP64_OFF64 _SC_V6_LP64_OFF64 + _SC_V6_LPBIG_OFFBIG, +#define _SC_V6_LPBIG_OFFBIG _SC_V6_LPBIG_OFFBIG + + _SC_HOST_NAME_MAX, +#define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX + _SC_TRACE, +#define _SC_TRACE _SC_TRACE + _SC_TRACE_EVENT_FILTER, +#define _SC_TRACE_EVENT_FILTER _SC_TRACE_EVENT_FILTER + _SC_TRACE_INHERIT, +#define _SC_TRACE_INHERIT _SC_TRACE_INHERIT + _SC_TRACE_LOG, +#define _SC_TRACE_LOG _SC_TRACE_LOG + + _SC_LEVEL1_ICACHE_SIZE, +#define _SC_LEVEL1_ICACHE_SIZE _SC_LEVEL1_ICACHE_SIZE + _SC_LEVEL1_ICACHE_ASSOC, +#define _SC_LEVEL1_ICACHE_ASSOC _SC_LEVEL1_ICACHE_ASSOC + _SC_LEVEL1_ICACHE_LINESIZE, +#define _SC_LEVEL1_ICACHE_LINESIZE _SC_LEVEL1_ICACHE_LINESIZE + _SC_LEVEL1_DCACHE_SIZE, +#define _SC_LEVEL1_DCACHE_SIZE _SC_LEVEL1_DCACHE_SIZE + _SC_LEVEL1_DCACHE_ASSOC, +#define _SC_LEVEL1_DCACHE_ASSOC _SC_LEVEL1_DCACHE_ASSOC + _SC_LEVEL1_DCACHE_LINESIZE, +#define _SC_LEVEL1_DCACHE_LINESIZE _SC_LEVEL1_DCACHE_LINESIZE + _SC_LEVEL2_CACHE_SIZE, +#define _SC_LEVEL2_CACHE_SIZE _SC_LEVEL2_CACHE_SIZE + _SC_LEVEL2_CACHE_ASSOC, +#define _SC_LEVEL2_CACHE_ASSOC _SC_LEVEL2_CACHE_ASSOC + _SC_LEVEL2_CACHE_LINESIZE, +#define _SC_LEVEL2_CACHE_LINESIZE _SC_LEVEL2_CACHE_LINESIZE + _SC_LEVEL3_CACHE_SIZE, +#define _SC_LEVEL3_CACHE_SIZE _SC_LEVEL3_CACHE_SIZE + _SC_LEVEL3_CACHE_ASSOC, +#define _SC_LEVEL3_CACHE_ASSOC _SC_LEVEL3_CACHE_ASSOC + _SC_LEVEL3_CACHE_LINESIZE, +#define _SC_LEVEL3_CACHE_LINESIZE _SC_LEVEL3_CACHE_LINESIZE + _SC_LEVEL4_CACHE_SIZE, +#define _SC_LEVEL4_CACHE_SIZE _SC_LEVEL4_CACHE_SIZE + _SC_LEVEL4_CACHE_ASSOC, +#define _SC_LEVEL4_CACHE_ASSOC _SC_LEVEL4_CACHE_ASSOC + _SC_LEVEL4_CACHE_LINESIZE, +#define _SC_LEVEL4_CACHE_LINESIZE _SC_LEVEL4_CACHE_LINESIZE + + + _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, +#define _SC_IPV6 _SC_IPV6 + _SC_RAW_SOCKETS, +#define _SC_RAW_SOCKETS _SC_RAW_SOCKETS + + _SC_V7_ILP32_OFF32, +#define _SC_V7_ILP32_OFF32 _SC_V7_ILP32_OFF32 + _SC_V7_ILP32_OFFBIG, +#define _SC_V7_ILP32_OFFBIG _SC_V7_ILP32_OFFBIG + _SC_V7_LP64_OFF64, +#define _SC_V7_LP64_OFF64 _SC_V7_LP64_OFF64 + _SC_V7_LPBIG_OFFBIG, +#define _SC_V7_LPBIG_OFFBIG _SC_V7_LPBIG_OFFBIG + + _SC_SS_REPL_MAX, +#define _SC_SS_REPL_MAX _SC_SS_REPL_MAX + + _SC_TRACE_EVENT_NAME_MAX, +#define _SC_TRACE_EVENT_NAME_MAX _SC_TRACE_EVENT_NAME_MAX + _SC_TRACE_NAME_MAX, +#define _SC_TRACE_NAME_MAX _SC_TRACE_NAME_MAX + _SC_TRACE_SYS_MAX, +#define _SC_TRACE_SYS_MAX _SC_TRACE_SYS_MAX + _SC_TRACE_USER_EVENT_MAX, +#define _SC_TRACE_USER_EVENT_MAX _SC_TRACE_USER_EVENT_MAX + + _SC_XOPEN_STREAMS, +#define _SC_XOPEN_STREAMS _SC_XOPEN_STREAMS + + _SC_THREAD_ROBUST_PRIO_INHERIT, +#define _SC_THREAD_ROBUST_PRIO_INHERIT _SC_THREAD_ROBUST_PRIO_INHERIT + _SC_THREAD_ROBUST_PRIO_PROTECT +#define _SC_THREAD_ROBUST_PRIO_PROTECT _SC_THREAD_ROBUST_PRIO_PROTECT + }; + + +enum + { + _CS_PATH, +#define _CS_PATH _CS_PATH + + _CS_V6_WIDTH_RESTRICTED_ENVS, +#define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS +#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS + + _CS_GNU_LIBC_VERSION, +#define _CS_GNU_LIBC_VERSION _CS_GNU_LIBC_VERSION + _CS_GNU_LIBPTHREAD_VERSION, +#define _CS_GNU_LIBPTHREAD_VERSION _CS_GNU_LIBPTHREAD_VERSION + + _CS_V5_WIDTH_RESTRICTED_ENVS, +#define _CS_V5_WIDTH_RESTRICTED_ENVS _CS_V5_WIDTH_RESTRICTED_ENVS +#define _CS_POSIX_V5_WIDTH_RESTRICTED_ENVS _CS_V5_WIDTH_RESTRICTED_ENVS + + _CS_V7_WIDTH_RESTRICTED_ENVS, +#define _CS_V7_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS +#define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS + + _CS_LFS_CFLAGS = 1000, +#define _CS_LFS_CFLAGS _CS_LFS_CFLAGS + _CS_LFS_LDFLAGS, +#define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS + _CS_LFS_LIBS, +#define _CS_LFS_LIBS _CS_LFS_LIBS + _CS_LFS_LINTFLAGS, +#define _CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS + _CS_LFS64_CFLAGS, +#define _CS_LFS64_CFLAGS _CS_LFS64_CFLAGS + _CS_LFS64_LDFLAGS, +#define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS + _CS_LFS64_LIBS, +#define _CS_LFS64_LIBS _CS_LFS64_LIBS + _CS_LFS64_LINTFLAGS, +#define _CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS + + _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, +#define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS + _CS_XBS5_ILP32_OFF32_LDFLAGS, +#define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS + _CS_XBS5_ILP32_OFF32_LIBS, +#define _CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LIBS + _CS_XBS5_ILP32_OFF32_LINTFLAGS, +#define _CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFF32_LINTFLAGS + _CS_XBS5_ILP32_OFFBIG_CFLAGS, +#define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS + _CS_XBS5_ILP32_OFFBIG_LDFLAGS, +#define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS + _CS_XBS5_ILP32_OFFBIG_LIBS, +#define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LIBS + _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, +#define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS + _CS_XBS5_LP64_OFF64_CFLAGS, +#define _CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_CFLAGS + _CS_XBS5_LP64_OFF64_LDFLAGS, +#define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS + _CS_XBS5_LP64_OFF64_LIBS, +#define _CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LIBS + _CS_XBS5_LP64_OFF64_LINTFLAGS, +#define _CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LP64_OFF64_LINTFLAGS + _CS_XBS5_LPBIG_OFFBIG_CFLAGS, +#define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS + _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, +#define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS + _CS_XBS5_LPBIG_OFFBIG_LIBS, +#define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LIBS + _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, +#define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS + + _CS_POSIX_V6_ILP32_OFF32_CFLAGS, +#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS + _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, +#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS + _CS_POSIX_V6_ILP32_OFF32_LIBS, +#define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LIBS + _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, +#define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS + _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, +#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS + _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, +#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS + _CS_POSIX_V6_ILP32_OFFBIG_LIBS, +#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LIBS + _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, +#define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS + _CS_POSIX_V6_LP64_OFF64_CFLAGS, +#define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS + _CS_POSIX_V6_LP64_OFF64_LDFLAGS, +#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS + _CS_POSIX_V6_LP64_OFF64_LIBS, +#define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LIBS + _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, +#define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS + _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, +#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS + _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, +#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS + _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, +#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS + _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, +#define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS + + _CS_POSIX_V7_ILP32_OFF32_CFLAGS, +#define _CS_POSIX_V7_ILP32_OFF32_CFLAGS _CS_POSIX_V7_ILP32_OFF32_CFLAGS + _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, +#define _CS_POSIX_V7_ILP32_OFF32_LDFLAGS _CS_POSIX_V7_ILP32_OFF32_LDFLAGS + _CS_POSIX_V7_ILP32_OFF32_LIBS, +#define _CS_POSIX_V7_ILP32_OFF32_LIBS _CS_POSIX_V7_ILP32_OFF32_LIBS + _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, +#define _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS + _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, +#define _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS + _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, +#define _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS + _CS_POSIX_V7_ILP32_OFFBIG_LIBS, +#define _CS_POSIX_V7_ILP32_OFFBIG_LIBS _CS_POSIX_V7_ILP32_OFFBIG_LIBS + _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, +#define _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS + _CS_POSIX_V7_LP64_OFF64_CFLAGS, +#define _CS_POSIX_V7_LP64_OFF64_CFLAGS _CS_POSIX_V7_LP64_OFF64_CFLAGS + _CS_POSIX_V7_LP64_OFF64_LDFLAGS, +#define _CS_POSIX_V7_LP64_OFF64_LDFLAGS _CS_POSIX_V7_LP64_OFF64_LDFLAGS + _CS_POSIX_V7_LP64_OFF64_LIBS, +#define _CS_POSIX_V7_LP64_OFF64_LIBS _CS_POSIX_V7_LP64_OFF64_LIBS + _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, +#define _CS_POSIX_V7_LP64_OFF64_LINTFLAGS _CS_POSIX_V7_LP64_OFF64_LINTFLAGS + _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, +#define _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS + _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, +#define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS + _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, +#define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS _CS_POSIX_V7_LPBIG_OFFBIG_LIBS + _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, +#define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS + + _CS_V6_ENV, +#define _CS_V6_ENV _CS_V6_ENV + _CS_V7_ENV +#define _CS_V7_ENV _CS_V7_ENV + }; +# 607 "/usr/include/unistd.h" 2 3 4 + + +extern long int pathconf (__const char *__path, int __name) + throw () __attribute__ ((__nonnull__ (1))); + + +extern long int fpathconf (int __fd, int __name) throw (); + + +extern long int sysconf (int __name) throw (); + + + +extern size_t confstr (int __name, char *__buf, size_t __len) throw (); + + + + +extern __pid_t getpid (void) throw (); + + +extern __pid_t getppid (void) throw (); + + + + +extern __pid_t getpgrp (void) throw (); +# 643 "/usr/include/unistd.h" 3 4 +extern __pid_t __getpgid (__pid_t __pid) throw (); + +extern __pid_t getpgid (__pid_t __pid) throw (); + + + + + + +extern int setpgid (__pid_t __pid, __pid_t __pgid) throw (); +# 669 "/usr/include/unistd.h" 3 4 +extern int setpgrp (void) throw (); +# 686 "/usr/include/unistd.h" 3 4 +extern __pid_t setsid (void) throw (); + + + +extern __pid_t getsid (__pid_t __pid) throw (); + + + +extern __uid_t getuid (void) throw (); + + +extern __uid_t geteuid (void) throw (); + + +extern __gid_t getgid (void) throw (); + + +extern __gid_t getegid (void) throw (); + + + + +extern int getgroups (int __size, __gid_t __list[]) throw () __attribute__ ((__warn_unused_result__)); + + + +extern int group_member (__gid_t __gid) throw (); + + + + + + +extern int setuid (__uid_t __uid) throw (); + + + + +extern int setreuid (__uid_t __ruid, __uid_t __euid) throw (); + + + + +extern int seteuid (__uid_t __uid) throw (); + + + + + + +extern int setgid (__gid_t __gid) throw (); + + + + +extern int setregid (__gid_t __rgid, __gid_t __egid) throw (); + + + + +extern int setegid (__gid_t __gid) throw (); + + + + + +extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) + throw (); + + + +extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) + throw (); + + + +extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) + throw (); + + + +extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) + throw (); + + + + + + +extern __pid_t fork (void) throw (); + + + + + + + +extern __pid_t vfork (void) throw (); + + + + + +extern char *ttyname (int __fd) throw (); + + + +extern int ttyname_r (int __fd, char *__buf, size_t __buflen) + throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); + + + +extern int isatty (int __fd) throw (); + + + + + +extern int ttyslot (void) throw (); + + + + +extern int link (__const char *__from, __const char *__to) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); + + + + +extern int linkat (int __fromfd, __const char *__from, int __tofd, + __const char *__to, int __flags) + throw () __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern int symlink (__const char *__from, __const char *__to) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); + + + + +extern ssize_t readlink (__const char *__restrict __path, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); + + + + +extern int symlinkat (__const char *__from, int __tofd, + __const char *__to) throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + + +extern ssize_t readlinkat (int __fd, __const char *__restrict __path, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); + + + +extern int unlink (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); + + + +extern int unlinkat (int __fd, __const char *__name, int __flag) + throw () __attribute__ ((__nonnull__ (2))); + + + +extern int rmdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))); + + + +extern __pid_t tcgetpgrp (int __fd) throw (); + + +extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw (); + + + + + + +extern char *getlogin (void); + + + + + + + +extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); + + + + +extern int setlogin (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); + + + + + + + +#define __need_getopt +# 1 "/usr/include/getopt.h" 1 3 4 +# 50 "/usr/include/getopt.h" 3 4 +extern "C" { +# 59 "/usr/include/getopt.h" 3 4 +extern char *optarg; +# 73 "/usr/include/getopt.h" 3 4 +extern int optind; + + + + +extern int opterr; + + + +extern int optopt; +# 152 "/usr/include/getopt.h" 3 4 +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) + throw (); +# 187 "/usr/include/getopt.h" 3 4 +} + + + +#undef __need_getopt +# 891 "/usr/include/unistd.h" 2 3 4 + + + + + + + +extern int gethostname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern int sethostname (__const char *__name, size_t __len) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + +extern int sethostid (long int __id) throw () __attribute__ ((__warn_unused_result__)); + + + + + +extern int getdomainname (char *__name, size_t __len) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int setdomainname (__const char *__name, size_t __len) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int vhangup (void) throw (); + + +extern int revoke (__const char *__file) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern int profil (unsigned short int *__sample_buffer, size_t __size, + size_t __offset, unsigned int __scale) + throw () __attribute__ ((__nonnull__ (1))); + + + + + +extern int acct (__const char *__name) throw (); + + + +extern char *getusershell (void) throw (); +extern void endusershell (void) throw (); +extern void setusershell (void) throw (); + + + + + +extern int daemon (int __nochdir, int __noclose) throw () __attribute__ ((__warn_unused_result__)); + + + + + + +extern int chroot (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + +extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1))); +# 976 "/usr/include/unistd.h" 3 4 +extern int fsync (int __fd); + + + + + + +extern int syncfs (int __fd) throw (); + + + + + + +extern long int gethostid (void); + + +extern void sync (void) throw (); + + + + + +extern int getpagesize (void) throw () __attribute__ ((__const__)); + + + + +extern int getdtablesize (void) throw (); +# 1014 "/usr/include/unistd.h" 3 4 +extern int truncate (__const char *__file, __off_t __length) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 1026 "/usr/include/unistd.h" 3 4 +extern int truncate64 (__const char *__file, __off64_t __length) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 1036 "/usr/include/unistd.h" 3 4 +extern int ftruncate (int __fd, __off_t __length) throw () __attribute__ ((__warn_unused_result__)); +# 1046 "/usr/include/unistd.h" 3 4 +extern int ftruncate64 (int __fd, __off64_t __length) throw () __attribute__ ((__warn_unused_result__)); +# 1057 "/usr/include/unistd.h" 3 4 +extern int brk (void *__addr) throw () __attribute__ ((__warn_unused_result__)); + + + + + +extern void *sbrk (intptr_t __delta) throw (); +# 1078 "/usr/include/unistd.h" 3 4 +extern long int syscall (long int __sysno, ...) throw (); +# 1095 "/usr/include/unistd.h" 3 4 +#define F_ULOCK 0 +#define F_LOCK 1 +#define F_TLOCK 2 +#define F_TEST 3 + + +extern int lockf (int __fd, int __cmd, __off_t __len) __attribute__ ((__warn_unused_result__)); +# 1111 "/usr/include/unistd.h" 3 4 +extern int lockf64 (int __fd, int __cmd, __off64_t __len) __attribute__ ((__warn_unused_result__)); +# 1121 "/usr/include/unistd.h" 3 4 +#define TEMP_FAILURE_RETRY(expression) (__extension__ ({ long int __result; do __result = (long int) (expression); while (__result == -1L && errno == EINTR); __result; })) +# 1132 "/usr/include/unistd.h" 3 4 +extern int fdatasync (int __fildes); + + + + + + + +extern char *crypt (__const char *__key, __const char *__salt) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern void encrypt (char *__block, int __edflag) throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern void swab (__const void *__restrict __from, void *__restrict __to, + ssize_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + + + +extern char *ctermid (char *__s) throw (); + + + + + +# 1 "/usr/include/bits/unistd.h" 1 3 4 +# 24 "/usr/include/bits/unistd.h" 3 4 +extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes, + size_t __buflen) __attribute__ ((__warn_unused_result__)); +extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read") + __attribute__ ((__warn_unused_result__)); +extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t +read (int __fd, void *__buf, size_t __nbytes) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__nbytes)) + return __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); + + if (__nbytes > __builtin_object_size (__buf, 0)) + return __read_chk_warn (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); + } + return __read_alias (__fd, __buf, __nbytes); +} + + +extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes, + __off_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread") + + __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") + + __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread called with bigger length than size of " "the destination buffer"))) + ; +extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk") + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread64 called with bigger length than size of " "the destination buffer"))) + ; + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t +pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__nbytes)) + return __pread_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)); + + if ( __nbytes > __builtin_object_size (__buf, 0)) + return __pread_chk_warn (__fd, __buf, __nbytes, __offset, + __builtin_object_size (__buf, 0)); + } + return __pread_alias (__fd, __buf, __nbytes, __offset); +} +# 105 "/usr/include/bits/unistd.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t +pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__nbytes)) + return __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)); + + if ( __nbytes > __builtin_object_size (__buf, 0)) + return __pread64_chk_warn (__fd, __buf, __nbytes, __offset, + __builtin_object_size (__buf, 0)); + } + + return __pread64_alias (__fd, __buf, __nbytes, __offset); +} + + + + +extern ssize_t __readlink_chk (__const char *__restrict __path, + char *__restrict __buf, size_t __len, + size_t __buflen) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlink_alias (__const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __asm__ ("" "readlink") + + + __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlink_chk_warn (__const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__readlink_chk") + + + + __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t +readlink (__const char *__restrict __path, char *__restrict __buf, size_t __len) throw () + +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + + if ( __len > __builtin_object_size (__buf, 2 > 1)) + return __readlink_chk_warn (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + } + return __readlink_alias (__path, __buf, __len); +} + + + +extern ssize_t __readlinkat_chk (int __fd, __const char *__restrict __path, + char *__restrict __buf, size_t __len, + size_t __buflen) + throw () __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlinkat_alias (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __asm__ ("" "readlinkat") + + + + __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlinkat_chk_warn (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__readlinkat_chk") + + + + __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer"))) + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t +readlinkat (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) throw () + +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __readlinkat_chk (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + + if (__len > __builtin_object_size (__buf, 2 > 1)) + return __readlinkat_chk_warn (__fd, __path, __buf, __len, + __builtin_object_size (__buf, 2 > 1)); + } + return __readlinkat_alias (__fd, __path, __buf, __len); +} + + +extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen) + throw () __attribute__ ((__warn_unused_result__)); +extern char *__getcwd_alias (char *__buf, size_t __size) throw () __asm__ ("" "getcwd") + __attribute__ ((__warn_unused_result__)); +extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) throw () __asm__ ("" "__getcwd_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +getcwd (char *__buf, size_t __size) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__size)) + return __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1)); + + if (__size > __builtin_object_size (__buf, 2 > 1)) + return __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1)); + } + return __getcwd_alias (__buf, __size); +} + + +extern char *__getwd_chk (char *__buf, size_t buflen) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern char *__getwd_warn (char *__buf) throw () __asm__ ("" "getwd") + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char * +getwd (char *__buf) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1)); + return __getwd_warn (__buf); +} + + +extern size_t __confstr_chk (int __name, char *__buf, size_t __len, + size_t __buflen) throw (); +extern size_t __confstr_alias (int __name, char *__buf, size_t __len) throw () __asm__ ("" "confstr") + ; +extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__confstr_chk") + + + __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +confstr (int __name, char *__buf, size_t __len) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + + if (__builtin_object_size (__buf, 2 > 1) < __len) + return __confstr_chk_warn (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + } + return __confstr_alias (__name, __buf, __len); +} + + +extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen) + throw () __attribute__ ((__warn_unused_result__)); +extern int __getgroups_alias (int __size, __gid_t __list[]) throw () __asm__ ("" "getgroups") + __attribute__ ((__warn_unused_result__)); +extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) throw () __asm__ ("" "__getgroups_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +getgroups (int __size, __gid_t __list[]) throw () +{ + if (__builtin_object_size (__list, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__size) || __size < 0) + return __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1)); + + if (__size * sizeof (__gid_t) > __builtin_object_size (__list, 2 > 1)) + return __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1)); + } + return __getgroups_alias (__size, __list); +} + + +extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen, + size_t __nreal) throw () __attribute__ ((__nonnull__ (2))); +extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) throw () __asm__ ("" "ttyname_r") + + __attribute__ ((__nonnull__ (2))); +extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__ttyname_r_chk") + + + __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +ttyname_r (int __fd, char *__buf, size_t __buflen) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __ttyname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __ttyname_r_alias (__fd, __buf, __buflen); +} + + + +extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal) + __attribute__ ((__nonnull__ (1))); +extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r") + __attribute__ ((__nonnull__ (1))); +extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk") + + + __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +getlogin_r (char *__buf, size_t __buflen) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __getlogin_r_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __getlogin_r_alias (__buf, __buflen); +} + + + + +extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal) + throw () __attribute__ ((__nonnull__ (1))); +extern int __gethostname_alias (char *__buf, size_t __buflen) throw () __asm__ ("" "gethostname") + __attribute__ ((__nonnull__ (1))); +extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__gethostname_chk") + + + __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +gethostname (char *__buf, size_t __buflen) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __gethostname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __gethostname_alias (__buf, __buflen); +} + + + + +extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int __getdomainname_alias (char *__buf, size_t __buflen) throw () __asm__ ("" "getdomainname") + + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__getdomainname_chk") + + + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer"))) + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +getdomainname (char *__buf, size_t __buflen) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __getdomainname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __getdomainname_alias (__buf, __buflen); +} +# 1168 "/usr/include/unistd.h" 2 3 4 + + +} +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 2 3 + +typedef pthread_t __gthread_t; +typedef pthread_key_t __gthread_key_t; +typedef pthread_once_t __gthread_once_t; +typedef pthread_mutex_t __gthread_mutex_t; +typedef pthread_mutex_t __gthread_recursive_mutex_t; +typedef pthread_cond_t __gthread_cond_t; +typedef struct timespec __gthread_time_t; + + + +#define __GTHREAD_HAS_COND 1 + +#define __GTHREAD_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER +#define __GTHREAD_ONCE_INIT PTHREAD_ONCE_INIT + + + +#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP + + + +#define __GTHREAD_COND_INIT PTHREAD_COND_INITIALIZER +#define __GTHREAD_TIME_INIT {0,0} + + + +#define __gthrw_pragma(pragma) + +#define __gthrw2(name,name2,type) static __typeof(type) name __attribute__ ((__weakref__(#name2))); __gthrw_pragma(weak type) + + +#define __gthrw_(name) __gthrw_ ## name + + + + + + +#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name) +# 118 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 +static __typeof(pthread_once) __gthrw_pthread_once __attribute__ ((__weakref__("pthread_once"))); +static __typeof(pthread_getspecific) __gthrw_pthread_getspecific __attribute__ ((__weakref__("pthread_getspecific"))); +static __typeof(pthread_setspecific) __gthrw_pthread_setspecific __attribute__ ((__weakref__("pthread_setspecific"))); + +static __typeof(pthread_create) __gthrw_pthread_create __attribute__ ((__weakref__("pthread_create"))); +static __typeof(pthread_join) __gthrw_pthread_join __attribute__ ((__weakref__("pthread_join"))); +static __typeof(pthread_equal) __gthrw_pthread_equal __attribute__ ((__weakref__("pthread_equal"))); +static __typeof(pthread_self) __gthrw_pthread_self __attribute__ ((__weakref__("pthread_self"))); +static __typeof(pthread_detach) __gthrw_pthread_detach __attribute__ ((__weakref__("pthread_detach"))); +static __typeof(pthread_cancel) __gthrw_pthread_cancel __attribute__ ((__weakref__("pthread_cancel"))); +static __typeof(sched_yield) __gthrw_sched_yield __attribute__ ((__weakref__("sched_yield"))); + +static __typeof(pthread_mutex_lock) __gthrw_pthread_mutex_lock __attribute__ ((__weakref__("pthread_mutex_lock"))); +static __typeof(pthread_mutex_trylock) __gthrw_pthread_mutex_trylock __attribute__ ((__weakref__("pthread_mutex_trylock"))); + + +static __typeof(pthread_mutex_timedlock) __gthrw_pthread_mutex_timedlock __attribute__ ((__weakref__("pthread_mutex_timedlock"))); + + +static __typeof(pthread_mutex_unlock) __gthrw_pthread_mutex_unlock __attribute__ ((__weakref__("pthread_mutex_unlock"))); +static __typeof(pthread_mutex_init) __gthrw_pthread_mutex_init __attribute__ ((__weakref__("pthread_mutex_init"))); +static __typeof(pthread_mutex_destroy) __gthrw_pthread_mutex_destroy __attribute__ ((__weakref__("pthread_mutex_destroy"))); + +static __typeof(pthread_cond_broadcast) __gthrw_pthread_cond_broadcast __attribute__ ((__weakref__("pthread_cond_broadcast"))); +static __typeof(pthread_cond_signal) __gthrw_pthread_cond_signal __attribute__ ((__weakref__("pthread_cond_signal"))); +static __typeof(pthread_cond_wait) __gthrw_pthread_cond_wait __attribute__ ((__weakref__("pthread_cond_wait"))); +static __typeof(pthread_cond_timedwait) __gthrw_pthread_cond_timedwait __attribute__ ((__weakref__("pthread_cond_timedwait"))); +static __typeof(pthread_cond_destroy) __gthrw_pthread_cond_destroy __attribute__ ((__weakref__("pthread_cond_destroy"))); + + +static __typeof(pthread_key_create) __gthrw_pthread_key_create __attribute__ ((__weakref__("pthread_key_create"))); +static __typeof(pthread_key_delete) __gthrw_pthread_key_delete __attribute__ ((__weakref__("pthread_key_delete"))); +static __typeof(pthread_mutexattr_init) __gthrw_pthread_mutexattr_init __attribute__ ((__weakref__("pthread_mutexattr_init"))); +static __typeof(pthread_mutexattr_settype) __gthrw_pthread_mutexattr_settype __attribute__ ((__weakref__("pthread_mutexattr_settype"))); +static __typeof(pthread_mutexattr_destroy) __gthrw_pthread_mutexattr_destroy __attribute__ ((__weakref__("pthread_mutexattr_destroy"))); +# 237 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 +static inline int +__gthread_active_p (void) +{ + static void *const __gthread_active_ptr + = __extension__ (void *) &__gthrw_pthread_cancel; + return __gthread_active_ptr != 0; +} +# 648 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 +static inline int +__gthread_create (__gthread_t *__threadid, void *(*__func) (void*), + void *__args) +{ + return __gthrw_pthread_create (__threadid, __null, __func, __args); +} + +static inline int +__gthread_join (__gthread_t __threadid, void **__value_ptr) +{ + return __gthrw_pthread_join (__threadid, __value_ptr); +} + +static inline int +__gthread_detach (__gthread_t __threadid) +{ + return __gthrw_pthread_detach (__threadid); +} + +static inline int +__gthread_equal (__gthread_t __t1, __gthread_t __t2) +{ + return __gthrw_pthread_equal (__t1, __t2); +} + +static inline __gthread_t +__gthread_self (void) +{ + return __gthrw_pthread_self (); +} + +static inline int +__gthread_yield (void) +{ + return __gthrw_sched_yield (); +} + +static inline int +__gthread_once (__gthread_once_t *__once, void (*__func) (void)) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_once (__once, __func); + else + return -1; +} + +static inline int +__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *)) +{ + return __gthrw_pthread_key_create (__key, __dtor); +} + +static inline int +__gthread_key_delete (__gthread_key_t __key) +{ + return __gthrw_pthread_key_delete (__key); +} + +static inline void * +__gthread_getspecific (__gthread_key_t __key) +{ + return __gthrw_pthread_getspecific (__key); +} + +static inline int +__gthread_setspecific (__gthread_key_t __key, const void *__ptr) +{ + return __gthrw_pthread_setspecific (__key, __ptr); +} + +static inline int +__gthread_mutex_destroy (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_destroy (__mutex); + else + return 0; +} + +static inline int +__gthread_mutex_lock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_lock (__mutex); + else + return 0; +} + +static inline int +__gthread_mutex_trylock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_trylock (__mutex); + else + return 0; +} + + + +static inline int +__gthread_mutex_timedlock (__gthread_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_timedlock (__mutex, __abs_timeout); + else + return 0; +} + + + +static inline int +__gthread_mutex_unlock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_unlock (__mutex); + else + return 0; +} +# 791 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 +static inline int +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_lock (__mutex); +} + +static inline int +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_trylock (__mutex); +} + + + +static inline int +__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return __gthread_mutex_timedlock (__mutex, __abs_timeout); +} + + + +static inline int +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_unlock (__mutex); +} + +static inline int +__gthread_cond_broadcast (__gthread_cond_t *__cond) +{ + return __gthrw_pthread_cond_broadcast (__cond); +} + +static inline int +__gthread_cond_signal (__gthread_cond_t *__cond) +{ + return __gthrw_pthread_cond_signal (__cond); +} + +static inline int +__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex) +{ + return __gthrw_pthread_cond_wait (__cond, __mutex); +} + +static inline int +__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return __gthrw_pthread_cond_timedwait (__cond, __mutex, __abs_timeout); +} + +static inline int +__gthread_cond_wait_recursive (__gthread_cond_t *__cond, + __gthread_recursive_mutex_t *__mutex) +{ + return __gthread_cond_wait (__cond, __mutex); +} + +static inline int +__gthread_cond_timedwait_recursive (__gthread_cond_t *__cond, + __gthread_recursive_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return __gthread_cond_timedwait (__cond, __mutex, __abs_timeout); +} + +static inline int +__gthread_cond_destroy (__gthread_cond_t* __cond) +{ + return __gthrw_pthread_cond_destroy (__cond); +} +# 163 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr.h" 2 3 + + + + + + + +#pragma GCC visibility pop +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ext/atomicity.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/atomic_word.h" 1 3 +# 30 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/atomic_word.h" 3 +#define _GLIBCXX_ATOMIC_WORD_H 1 + +typedef int _Atomic_word; +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ext/atomicity.h" 2 3 + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + + + + + + + static inline _Atomic_word + __exchange_and_add(volatile _Atomic_word* __mem, int __val) + { return __sync_fetch_and_add(__mem, __val); } + + static inline void + __atomic_add(volatile _Atomic_word* __mem, int __val) + { __sync_fetch_and_add(__mem, __val); } +# 61 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ext/atomicity.h" 3 + static inline _Atomic_word + __exchange_and_add_single(_Atomic_word* __mem, int __val) + { + _Atomic_word __result = *__mem; + *__mem += __val; + return __result; + } + + static inline void + __atomic_add_single(_Atomic_word* __mem, int __val) + { *__mem += __val; } + + static inline _Atomic_word + __attribute__ ((__unused__)) + __exchange_and_add_dispatch(_Atomic_word* __mem, int __val) + { + + if (__gthread_active_p()) + return __exchange_and_add(__mem, __val); + else + return __exchange_and_add_single(__mem, __val); + + + + } + + static inline void + __attribute__ ((__unused__)) + __atomic_add_dispatch(_Atomic_word* __mem, int __val) + { + + if (__gthread_active_p()) + __atomic_add(__mem, __val); + else + __atomic_add_single(__mem, __val); + + + + } + +} + + + + + +#define _GLIBCXX_READ_MEM_BARRIER __asm __volatile ("":::"memory") + + +#define _GLIBCXX_WRITE_MEM_BARRIER __asm __volatile ("":::"memory") +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 2 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 +#define _LOCALE_CLASSES_H 1 + + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/string" 1 3 +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/string" 3 +#define _GLIBCXX_STRING 1 + + +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/string" 3 + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/allocator.h" 1 3 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/allocator.h" 3 +#define _ALLOCATOR_H 1 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++allocator.h" 1 3 +# 31 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++allocator.h" 3 +#define _GLIBCXX_CXX_ALLOCATOR_H 1 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ext/new_allocator.h" 1 3 +# 31 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ext/new_allocator.h" 3 +#define _NEW_ALLOCATOR_H 1 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/new" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/new" 3 +#define _NEW + + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/new" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 2 3 +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/new" 2 3 + + +#pragma GCC visibility push(default) + +extern "C++" { + +namespace std +{ + + + + + + + class bad_alloc : public exception + { + public: + bad_alloc() throw() { } + + + + virtual ~bad_alloc() throw(); + + + virtual const char* what() const throw(); + }; + + struct nothrow_t { }; + + extern const nothrow_t nothrow; + + + + typedef void (*new_handler)(); + + + + new_handler set_new_handler(new_handler) throw(); +} +# 93 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/new" 3 +void* operator new(std::size_t) throw (std::bad_alloc); +void* operator new[](std::size_t) throw (std::bad_alloc); +void operator delete(void*) throw(); +void operator delete[](void*) throw(); +void* operator new(std::size_t, const std::nothrow_t&) throw(); +void* operator new[](std::size_t, const std::nothrow_t&) throw(); +void operator delete(void*, const std::nothrow_t&) throw(); +void operator delete[](void*, const std::nothrow_t&) throw(); + + +inline void* operator new(std::size_t, void* __p) throw() { return __p; } +inline void* operator new[](std::size_t, void* __p) throw() { return __p; } + + +inline void operator delete (void*, void*) throw() { } +inline void operator delete[](void*, void*) throw() { } + +} + +#pragma GCC visibility pop +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ext/new_allocator.h" 2 3 + + + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + + using std::size_t; + using std::ptrdiff_t; +# 50 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ext/new_allocator.h" 3 + template + class new_allocator + { + public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef const _Tp* const_pointer; + typedef _Tp& reference; + typedef const _Tp& const_reference; + typedef _Tp value_type; + + template + struct rebind + { typedef new_allocator<_Tp1> other; }; + + new_allocator() throw() { } + + new_allocator(const new_allocator&) throw() { } + + template + new_allocator(const new_allocator<_Tp1>&) throw() { } + + ~new_allocator() throw() { } + + pointer + address(reference __x) const { return &__x; } + + const_pointer + address(const_reference __x) const { return &__x; } + + + + pointer + allocate(size_type __n, const void* = 0) + { + if (__n > this->max_size()) + std::__throw_bad_alloc(); + + return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); + } + + + void + deallocate(pointer __p, size_type) + { ::operator delete(__p); } + + size_type + max_size() const throw() + { return size_t(-1) / sizeof(_Tp); } + + + + void + construct(pointer __p, const _Tp& __val) + { ::new((void *)__p) _Tp(__val); } +# 114 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ext/new_allocator.h" 3 + void + destroy(pointer __p) { __p->~_Tp(); } + }; + + template + inline bool + operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&) + { return true; } + + template + inline bool + operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&) + { return false; } + +} +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++allocator.h" 2 3 +#define __glibcxx_base_allocator __gnu_cxx::new_allocator +# 49 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/allocator.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 59 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/allocator.h" 3 + template + class allocator; + + + template<> + class allocator + { + public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef void* pointer; + typedef const void* const_pointer; + typedef void value_type; + + template + struct rebind + { typedef allocator<_Tp1> other; }; + }; +# 85 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/allocator.h" 3 + template + class allocator: public __gnu_cxx::new_allocator<_Tp> + { + public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef const _Tp* const_pointer; + typedef _Tp& reference; + typedef const _Tp& const_reference; + typedef _Tp value_type; + + template + struct rebind + { typedef allocator<_Tp1> other; }; + + allocator() throw() { } + + allocator(const allocator& __a) throw() + : __gnu_cxx::new_allocator<_Tp>(__a) { } + + template + allocator(const allocator<_Tp1>&) throw() { } + + ~allocator() throw() { } + + + }; + + template + inline bool + operator==(const allocator<_T1>&, const allocator<_T2>&) + { return true; } + + template + inline bool + operator==(const allocator<_Tp>&, const allocator<_Tp>&) + { return true; } + + template + inline bool + operator!=(const allocator<_T1>&, const allocator<_T2>&) + { return false; } + + template + inline bool + operator!=(const allocator<_Tp>&, const allocator<_Tp>&) + { return false; } + + + + + + extern template class allocator; + extern template class allocator; + + + +#undef __glibcxx_base_allocator + + + template + struct __alloc_swap + { static void _S_do_it(_Alloc&, _Alloc&) { } }; + + template + struct __alloc_swap<_Alloc, false> + { + static void + _S_do_it(_Alloc& __one, _Alloc& __two) + { + + if (__one != __two) + swap(__one, __two); + } + }; + + + template + struct __alloc_neq + { + static bool + _S_do_it(const _Alloc&, const _Alloc&) + { return false; } + }; + + template + struct __alloc_neq<_Alloc, false> + { + static bool + _S_do_it(const _Alloc& __one, const _Alloc& __two) + { return __one != __two; } + }; +# 204 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/allocator.h" 3 +} +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/string" 2 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ostream_insert.h" 1 3 +# 31 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ostream_insert.h" 3 +#define _OSTREAM_INSERT_H 1 + + +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ostream_insert.h" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cxxabi-forced.h" 1 3 +# 31 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cxxabi-forced.h" 3 +#define _CXXABI_FORCED_H 1 + + +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cxxabi-forced.h" 3 + +#pragma GCC visibility push(default) + + +namespace __cxxabiv1 +{ + + + + + + + + class __forced_unwind + { + virtual ~__forced_unwind() throw(); + + + virtual void __pure_dummy() = 0; + }; +} + + +#pragma GCC visibility pop +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ostream_insert.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + inline void + __ostream_write(basic_ostream<_CharT, _Traits>& __out, + const _CharT* __s, streamsize __n) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + + const streamsize __put = __out.rdbuf()->sputn(__s, __n); + if (__put != __n) + __out.setstate(__ios_base::badbit); + } + + template + inline void + __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + + const _CharT __c = __out.fill(); + for (; __n > 0; --__n) + { + const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c); + if (_Traits::eq_int_type(__put, _Traits::eof())) + { + __out.setstate(__ios_base::badbit); + break; + } + } + } + + template + basic_ostream<_CharT, _Traits>& + __ostream_insert(basic_ostream<_CharT, _Traits>& __out, + const _CharT* __s, streamsize __n) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + + typename __ostream_type::sentry __cerb(__out); + if (__cerb) + { + try + { + const streamsize __w = __out.width(); + if (__w > __n) + { + const bool __left = ((__out.flags() + & __ios_base::adjustfield) + == __ios_base::left); + if (!__left) + __ostream_fill(__out, __w - __n); + if (__out.good()) + __ostream_write(__out, __s, __n); + if (__left && __out.good()) + __ostream_fill(__out, __w - __n); + } + else + __ostream_write(__out, __s, __n); + __out.width(0); + } + catch(__cxxabiv1::__forced_unwind&) + { + __out._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { __out._M_setstate(__ios_base::badbit); } + } + return __out; + } + + + + + + extern template ostream& __ostream_insert(ostream&, const char*, streamsize); + + + extern template wostream& __ostream_insert(wostream&, const wchar_t*, + streamsize); + + + +} +# 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/string" 2 3 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_function.h" 1 3 +# 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_function.h" 3 +#define _STL_FUNCTION_H 1 + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 99 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_function.h" 3 + template + struct unary_function + { + typedef _Arg argument_type; + + + typedef _Result result_type; + }; + + + + + template + struct binary_function + { + typedef _Arg1 first_argument_type; + + + typedef _Arg2 second_argument_type; + typedef _Result result_type; + }; +# 134 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_function.h" 3 + template + struct plus : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x + __y; } + }; + + + template + struct minus : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x - __y; } + }; + + + template + struct multiplies : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x * __y; } + }; + + + template + struct divides : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x / __y; } + }; + + + template + struct modulus : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x % __y; } + }; + + + template + struct negate : public unary_function<_Tp, _Tp> + { + _Tp + operator()(const _Tp& __x) const + { return -__x; } + }; +# 198 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_function.h" 3 + template + struct equal_to : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x == __y; } + }; + + + template + struct not_equal_to : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x != __y; } + }; + + + template + struct greater : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x > __y; } + }; + + + template + struct less : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x < __y; } + }; + + + template + struct greater_equal : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x >= __y; } + }; + + + template + struct less_equal : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x <= __y; } + }; +# 262 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_function.h" 3 + template + struct logical_and : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x && __y; } + }; + + + template + struct logical_or : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x || __y; } + }; + + + template + struct logical_not : public unary_function<_Tp, bool> + { + bool + operator()(const _Tp& __x) const + { return !__x; } + }; + + + + + template + struct bit_and : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x & __y; } + }; + + template + struct bit_or : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x | __y; } + }; + + template + struct bit_xor : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x ^ __y; } + }; +# 345 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_function.h" 3 + template + class unary_negate + : public unary_function + { + protected: + _Predicate _M_pred; + + public: + explicit + unary_negate(const _Predicate& __x) : _M_pred(__x) { } + + bool + operator()(const typename _Predicate::argument_type& __x) const + { return !_M_pred(__x); } + }; + + + template + inline unary_negate<_Predicate> + not1(const _Predicate& __pred) + { return unary_negate<_Predicate>(__pred); } + + + template + class binary_negate + : public binary_function + { + protected: + _Predicate _M_pred; + + public: + explicit + binary_negate(const _Predicate& __x) : _M_pred(__x) { } + + bool + operator()(const typename _Predicate::first_argument_type& __x, + const typename _Predicate::second_argument_type& __y) const + { return !_M_pred(__x, __y); } + }; + + + template + inline binary_negate<_Predicate> + not2(const _Predicate& __pred) + { return binary_negate<_Predicate>(__pred); } +# 416 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_function.h" 3 + template + class pointer_to_unary_function : public unary_function<_Arg, _Result> + { + protected: + _Result (*_M_ptr)(_Arg); + + public: + pointer_to_unary_function() { } + + explicit + pointer_to_unary_function(_Result (*__x)(_Arg)) + : _M_ptr(__x) { } + + _Result + operator()(_Arg __x) const + { return _M_ptr(__x); } + }; + + + template + inline pointer_to_unary_function<_Arg, _Result> + ptr_fun(_Result (*__x)(_Arg)) + { return pointer_to_unary_function<_Arg, _Result>(__x); } + + + template + class pointer_to_binary_function + : public binary_function<_Arg1, _Arg2, _Result> + { + protected: + _Result (*_M_ptr)(_Arg1, _Arg2); + + public: + pointer_to_binary_function() { } + + explicit + pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) + : _M_ptr(__x) { } + + _Result + operator()(_Arg1 __x, _Arg2 __y) const + { return _M_ptr(__x, __y); } + }; + + + template + inline pointer_to_binary_function<_Arg1, _Arg2, _Result> + ptr_fun(_Result (*__x)(_Arg1, _Arg2)) + { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); } + + + template + struct _Identity : public unary_function<_Tp,_Tp> + { + _Tp& + operator()(_Tp& __x) const + { return __x; } + + const _Tp& + operator()(const _Tp& __x) const + { return __x; } + }; + + template + struct _Select1st : public unary_function<_Pair, + typename _Pair::first_type> + { + typename _Pair::first_type& + operator()(_Pair& __x) const + { return __x.first; } + + const typename _Pair::first_type& + operator()(const _Pair& __x) const + { return __x.first; } + }; + + template + struct _Select2nd : public unary_function<_Pair, + typename _Pair::second_type> + { + typename _Pair::second_type& + operator()(_Pair& __x) const + { return __x.second; } + + const typename _Pair::second_type& + operator()(const _Pair& __x) const + { return __x.second; } + }; +# 523 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_function.h" 3 + template + class mem_fun_t : public unary_function<_Tp*, _Ret> + { + public: + explicit + mem_fun_t(_Ret (_Tp::*__pf)()) + : _M_f(__pf) { } + + _Ret + operator()(_Tp* __p) const + { return (__p->*_M_f)(); } + + private: + _Ret (_Tp::*_M_f)(); + }; + + + + template + class const_mem_fun_t : public unary_function + { + public: + explicit + const_mem_fun_t(_Ret (_Tp::*__pf)() const) + : _M_f(__pf) { } + + _Ret + operator()(const _Tp* __p) const + { return (__p->*_M_f)(); } + + private: + _Ret (_Tp::*_M_f)() const; + }; + + + + template + class mem_fun_ref_t : public unary_function<_Tp, _Ret> + { + public: + explicit + mem_fun_ref_t(_Ret (_Tp::*__pf)()) + : _M_f(__pf) { } + + _Ret + operator()(_Tp& __r) const + { return (__r.*_M_f)(); } + + private: + _Ret (_Tp::*_M_f)(); + }; + + + + template + class const_mem_fun_ref_t : public unary_function<_Tp, _Ret> + { + public: + explicit + const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) + : _M_f(__pf) { } + + _Ret + operator()(const _Tp& __r) const + { return (__r.*_M_f)(); } + + private: + _Ret (_Tp::*_M_f)() const; + }; + + + + template + class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret> + { + public: + explicit + mem_fun1_t(_Ret (_Tp::*__pf)(_Arg)) + : _M_f(__pf) { } + + _Ret + operator()(_Tp* __p, _Arg __x) const + { return (__p->*_M_f)(__x); } + + private: + _Ret (_Tp::*_M_f)(_Arg); + }; + + + + template + class const_mem_fun1_t : public binary_function + { + public: + explicit + const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const) + : _M_f(__pf) { } + + _Ret + operator()(const _Tp* __p, _Arg __x) const + { return (__p->*_M_f)(__x); } + + private: + _Ret (_Tp::*_M_f)(_Arg) const; + }; + + + + template + class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> + { + public: + explicit + mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg)) + : _M_f(__pf) { } + + _Ret + operator()(_Tp& __r, _Arg __x) const + { return (__r.*_M_f)(__x); } + + private: + _Ret (_Tp::*_M_f)(_Arg); + }; + + + + template + class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> + { + public: + explicit + const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const) + : _M_f(__pf) { } + + _Ret + operator()(const _Tp& __r, _Arg __x) const + { return (__r.*_M_f)(__x); } + + private: + _Ret (_Tp::*_M_f)(_Arg) const; + }; + + + + template + inline mem_fun_t<_Ret, _Tp> + mem_fun(_Ret (_Tp::*__f)()) + { return mem_fun_t<_Ret, _Tp>(__f); } + + template + inline const_mem_fun_t<_Ret, _Tp> + mem_fun(_Ret (_Tp::*__f)() const) + { return const_mem_fun_t<_Ret, _Tp>(__f); } + + template + inline mem_fun_ref_t<_Ret, _Tp> + mem_fun_ref(_Ret (_Tp::*__f)()) + { return mem_fun_ref_t<_Ret, _Tp>(__f); } + + template + inline const_mem_fun_ref_t<_Ret, _Tp> + mem_fun_ref(_Ret (_Tp::*__f)() const) + { return const_mem_fun_ref_t<_Ret, _Tp>(__f); } + + template + inline mem_fun1_t<_Ret, _Tp, _Arg> + mem_fun(_Ret (_Tp::*__f)(_Arg)) + { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); } + + template + inline const_mem_fun1_t<_Ret, _Tp, _Arg> + mem_fun(_Ret (_Tp::*__f)(_Arg) const) + { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); } + + template + inline mem_fun1_ref_t<_Ret, _Tp, _Arg> + mem_fun_ref(_Ret (_Tp::*__f)(_Arg)) + { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } + + template + inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg> + mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const) + { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } + + + +} + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/backward/binders.h" 1 3 +# 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/backward/binders.h" 3 +#define _BACKWARD_BINDERS_H 1 + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 97 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/backward/binders.h" 3 + template + class binder1st + : public unary_function + { + protected: + _Operation op; + typename _Operation::first_argument_type value; + + public: + binder1st(const _Operation& __x, + const typename _Operation::first_argument_type& __y) + : op(__x), value(__y) { } + + typename _Operation::result_type + operator()(const typename _Operation::second_argument_type& __x) const + { return op(value, __x); } + + + + typename _Operation::result_type + operator()(typename _Operation::second_argument_type& __x) const + { return op(value, __x); } + } ; + + + template + inline binder1st<_Operation> + bind1st(const _Operation& __fn, const _Tp& __x) + { + typedef typename _Operation::first_argument_type _Arg1_type; + return binder1st<_Operation>(__fn, _Arg1_type(__x)); + } + + + template + class binder2nd + : public unary_function + { + protected: + _Operation op; + typename _Operation::second_argument_type value; + + public: + binder2nd(const _Operation& __x, + const typename _Operation::second_argument_type& __y) + : op(__x), value(__y) { } + + typename _Operation::result_type + operator()(const typename _Operation::first_argument_type& __x) const + { return op(__x, value); } + + + + typename _Operation::result_type + operator()(typename _Operation::first_argument_type& __x) const + { return op(__x, value); } + } ; + + + template + inline binder2nd<_Operation> + bind2nd(const _Operation& __fn, const _Tp& __x) + { + typedef typename _Operation::second_argument_type _Arg2_type; + return binder2nd<_Operation>(__fn, _Arg2_type(__x)); + } + + +} +# 713 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_function.h" 2 3 +# 51 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/string" 2 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 +#define _BASIC_STRING_H 1 + + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/initializer_list" 1 3 +# 31 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/initializer_list" 3 +#define _INITIALIZER_LIST + + +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/initializer_list" 3 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 104 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + template + class basic_string + { + typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type; + + + public: + typedef _Traits traits_type; + typedef typename _Traits::char_type value_type; + typedef _Alloc allocator_type; + typedef typename _CharT_alloc_type::size_type size_type; + typedef typename _CharT_alloc_type::difference_type difference_type; + typedef typename _CharT_alloc_type::reference reference; + typedef typename _CharT_alloc_type::const_reference const_reference; + typedef typename _CharT_alloc_type::pointer pointer; + typedef typename _CharT_alloc_type::const_pointer const_pointer; + typedef __gnu_cxx::__normal_iterator iterator; + typedef __gnu_cxx::__normal_iterator + const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + + private: +# 141 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + struct _Rep_base + { + size_type _M_length; + size_type _M_capacity; + _Atomic_word _M_refcount; + }; + + struct _Rep : _Rep_base + { + + typedef typename _Alloc::template rebind::other _Raw_bytes_alloc; +# 166 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + static const size_type _S_max_size; + static const _CharT _S_terminal; + + + + static size_type _S_empty_rep_storage[]; + + static _Rep& + _S_empty_rep() + { + + + + void* __p = reinterpret_cast(&_S_empty_rep_storage); + return *reinterpret_cast<_Rep*>(__p); + } + + bool + _M_is_leaked() const + { return this->_M_refcount < 0; } + + bool + _M_is_shared() const + { return this->_M_refcount > 0; } + + void + _M_set_leaked() + { this->_M_refcount = -1; } + + void + _M_set_sharable() + { this->_M_refcount = 0; } + + void + _M_set_length_and_sharable(size_type __n) + { + + if (__builtin_expect(this != &_S_empty_rep(), false)) + + { + this->_M_set_sharable(); + this->_M_length = __n; + traits_type::assign(this->_M_refdata()[__n], _S_terminal); + + + } + } + + _CharT* + _M_refdata() throw() + { return reinterpret_cast<_CharT*>(this + 1); } + + _CharT* + _M_grab(const _Alloc& __alloc1, const _Alloc& __alloc2) + { + return (!_M_is_leaked() && __alloc1 == __alloc2) + ? _M_refcopy() : _M_clone(__alloc1); + } + + + static _Rep* + _S_create(size_type, size_type, const _Alloc&); + + void + _M_dispose(const _Alloc& __a) + { + + if (__builtin_expect(this != &_S_empty_rep(), false)) + + if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount, + -1) <= 0) + _M_destroy(__a); + } + + void + _M_destroy(const _Alloc&) throw(); + + _CharT* + _M_refcopy() throw() + { + + if (__builtin_expect(this != &_S_empty_rep(), false)) + + __gnu_cxx::__atomic_add_dispatch(&this->_M_refcount, 1); + return _M_refdata(); + } + + _CharT* + _M_clone(const _Alloc&, size_type __res = 0); + }; + + + struct _Alloc_hider : _Alloc + { + _Alloc_hider(_CharT* __dat, const _Alloc& __a) + : _Alloc(__a), _M_p(__dat) { } + + _CharT* _M_p; + }; + + public: + + + + + static const size_type npos = static_cast(-1); + + private: + + mutable _Alloc_hider _M_dataplus; + + _CharT* + _M_data() const + { return _M_dataplus._M_p; } + + _CharT* + _M_data(_CharT* __p) + { return (_M_dataplus._M_p = __p); } + + _Rep* + _M_rep() const + { return &((reinterpret_cast<_Rep*> (_M_data()))[-1]); } + + + + iterator + _M_ibegin() const + { return iterator(_M_data()); } + + iterator + _M_iend() const + { return iterator(_M_data() + this->size()); } + + void + _M_leak() + { + if (!_M_rep()->_M_is_leaked()) + _M_leak_hard(); + } + + size_type + _M_check(size_type __pos, const char* __s) const + { + if (__pos > this->size()) + __throw_out_of_range((__s)); + return __pos; + } + + void + _M_check_length(size_type __n1, size_type __n2, const char* __s) const + { + if (this->max_size() - (this->size() - __n1) < __n2) + __throw_length_error((__s)); + } + + + size_type + _M_limit(size_type __pos, size_type __off) const + { + const bool __testoff = __off < this->size() - __pos; + return __testoff ? __off : this->size() - __pos; + } + + + bool + _M_disjunct(const _CharT* __s) const + { + return (less()(__s, _M_data()) + || less()(_M_data() + this->size(), __s)); + } + + + + static void + _M_copy(_CharT* __d, const _CharT* __s, size_type __n) + { + if (__n == 1) + traits_type::assign(*__d, *__s); + else + traits_type::copy(__d, __s, __n); + } + + static void + _M_move(_CharT* __d, const _CharT* __s, size_type __n) + { + if (__n == 1) + traits_type::assign(*__d, *__s); + else + traits_type::move(__d, __s, __n); + } + + static void + _M_assign(_CharT* __d, size_type __n, _CharT __c) + { + if (__n == 1) + traits_type::assign(*__d, __c); + else + traits_type::assign(__d, __n, __c); + } + + + + template + static void + _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) + { + for (; __k1 != __k2; ++__k1, ++__p) + traits_type::assign(*__p, *__k1); + } + + static void + _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) + { _S_copy_chars(__p, __k1.base(), __k2.base()); } + + static void + _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) + { _S_copy_chars(__p, __k1.base(), __k2.base()); } + + static void + _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) + { _M_copy(__p, __k1, __k2 - __k1); } + + static void + _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) + { _M_copy(__p, __k1, __k2 - __k1); } + + static int + _S_compare(size_type __n1, size_type __n2) + { + const difference_type __d = difference_type(__n1 - __n2); + + if (__d > __gnu_cxx::__numeric_traits::__max) + return __gnu_cxx::__numeric_traits::__max; + else if (__d < __gnu_cxx::__numeric_traits::__min) + return __gnu_cxx::__numeric_traits::__min; + else + return int(__d); + } + + void + _M_mutate(size_type __pos, size_type __len1, size_type __len2); + + void + _M_leak_hard(); + + static _Rep& + _S_empty_rep() + { return _Rep::_S_empty_rep(); } + + public: + + + + + + + + basic_string() + + : _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) { } + + + + + + + + explicit + basic_string(const _Alloc& __a); + + + + + + + basic_string(const basic_string& __str); + + + + + + + basic_string(const basic_string& __str, size_type __pos, + size_type __n = npos); + + + + + + + + basic_string(const basic_string& __str, size_type __pos, + size_type __n, const _Alloc& __a); +# 469 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string(const _CharT* __s, size_type __n, + const _Alloc& __a = _Alloc()); + + + + + + basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()); + + + + + + + basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()); +# 517 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + template + basic_string(_InputIterator __beg, _InputIterator __end, + const _Alloc& __a = _Alloc()); + + + + + ~basic_string() + { _M_rep()->_M_dispose(this->get_allocator()); } + + + + + + basic_string& + operator=(const basic_string& __str) + { return this->assign(__str); } + + + + + + basic_string& + operator=(const _CharT* __s) + { return this->assign(__s); } +# 550 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string& + operator=(_CharT __c) + { + this->assign(1, __c); + return *this; + } +# 590 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + iterator + begin() + { + _M_leak(); + return iterator(_M_data()); + } + + + + + + const_iterator + begin() const + { return const_iterator(_M_data()); } + + + + + + iterator + end() + { + _M_leak(); + return iterator(_M_data() + this->size()); + } + + + + + + const_iterator + end() const + { return const_iterator(_M_data() + this->size()); } + + + + + + + reverse_iterator + rbegin() + { return reverse_iterator(this->end()); } + + + + + + + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(this->end()); } + + + + + + + reverse_iterator + rend() + { return reverse_iterator(this->begin()); } + + + + + + + const_reverse_iterator + rend() const + { return const_reverse_iterator(this->begin()); } +# 696 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + public: + + + + size_type + size() const + { return _M_rep()->_M_length; } + + + + size_type + length() const + { return _M_rep()->_M_length; } + + + size_type + max_size() const + { return _Rep::_S_max_size; } +# 725 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + void + resize(size_type __n, _CharT __c); +# 738 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + void + resize(size_type __n) + { this->resize(__n, _CharT()); } +# 758 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + capacity() const + { return _M_rep()->_M_capacity; } +# 779 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + void + reserve(size_type __res_arg = 0); + + + + + void + clear() + { _M_mutate(0, this->size(), 0); } + + + + + + bool + empty() const + { return this->size() == 0; } +# 808 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + const_reference + operator[] (size_type __pos) const + { + ; + return _M_data()[__pos]; + } +# 825 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + reference + operator[](size_type __pos) + { + + ; + + ; + _M_leak(); + return _M_data()[__pos]; + } +# 846 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + const_reference + at(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range(("basic_string::at")); + return _M_data()[__n]; + } +# 865 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + reference + at(size_type __n) + { + if (__n >= size()) + __throw_out_of_range(("basic_string::at")); + _M_leak(); + return _M_data()[__n]; + } + + + + + + + + basic_string& + operator+=(const basic_string& __str) + { return this->append(__str); } + + + + + + + basic_string& + operator+=(const _CharT* __s) + { return this->append(__s); } + + + + + + + basic_string& + operator+=(_CharT __c) + { + this->push_back(__c); + return *this; + } +# 921 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string& + append(const basic_string& __str); +# 936 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string& + append(const basic_string& __str, size_type __pos, size_type __n); + + + + + + + + basic_string& + append(const _CharT* __s, size_type __n); + + + + + + + basic_string& + append(const _CharT* __s) + { + ; + return this->append(__s, traits_type::length(__s)); + } +# 968 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string& + append(size_type __n, _CharT __c); +# 990 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + template + basic_string& + append(_InputIterator __first, _InputIterator __last) + { return this->replace(_M_iend(), _M_iend(), __first, __last); } + + + + + + void + push_back(_CharT __c) + { + const size_type __len = 1 + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + this->reserve(__len); + traits_type::assign(_M_data()[this->size()], __c); + _M_rep()->_M_set_length_and_sharable(__len); + } + + + + + + + basic_string& + assign(const basic_string& __str); +# 1046 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string& + assign(const basic_string& __str, size_type __pos, size_type __n) + { return this->assign(__str._M_data() + + __str._M_check(__pos, "basic_string::assign"), + __str._M_limit(__pos, __n)); } +# 1062 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string& + assign(const _CharT* __s, size_type __n); +# 1074 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string& + assign(const _CharT* __s) + { + ; + return this->assign(__s, traits_type::length(__s)); + } +# 1090 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string& + assign(size_type __n, _CharT __c) + { return _M_replace_aux(size_type(0), this->size(), __n, __c); } +# 1102 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + template + basic_string& + assign(_InputIterator __first, _InputIterator __last) + { return this->replace(_M_ibegin(), _M_iend(), __first, __last); } +# 1130 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + void + insert(iterator __p, size_type __n, _CharT __c) + { this->replace(__p, __p, __n, __c); } +# 1145 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + template + void + insert(iterator __p, _InputIterator __beg, _InputIterator __end) + { this->replace(__p, __p, __beg, __end); } +# 1176 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos1, const basic_string& __str) + { return this->insert(__pos1, __str, size_type(0), __str.size()); } +# 1198 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos1, const basic_string& __str, + size_type __pos2, size_type __n) + { return this->insert(__pos1, __str._M_data() + + __str._M_check(__pos2, "basic_string::insert"), + __str._M_limit(__pos2, __n)); } +# 1221 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos, const _CharT* __s, size_type __n); +# 1239 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos, const _CharT* __s) + { + ; + return this->insert(__pos, __s, traits_type::length(__s)); + } +# 1262 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos, size_type __n, _CharT __c) + { return _M_replace_aux(_M_check(__pos, "basic_string::insert"), + size_type(0), __n, __c); } +# 1279 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + iterator + insert(iterator __p, _CharT __c) + { + ; + const size_type __pos = __p - _M_ibegin(); + _M_replace_aux(__pos, size_type(0), size_type(1), __c); + _M_rep()->_M_set_leaked(); + return iterator(_M_data() + __pos); + } +# 1303 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string& + erase(size_type __pos = 0, size_type __n = npos) + { + _M_mutate(_M_check(__pos, "basic_string::erase"), + _M_limit(__pos, __n), size_type(0)); + return *this; + } +# 1319 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + iterator + erase(iterator __position) + { + + ; + const size_type __pos = __position - _M_ibegin(); + _M_mutate(__pos, size_type(1), size_type(0)); + _M_rep()->_M_set_leaked(); + return iterator(_M_data() + __pos); + } +# 1339 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + iterator + erase(iterator __first, iterator __last); +# 1358 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos, size_type __n, const basic_string& __str) + { return this->replace(__pos, __n, __str._M_data(), __str.size()); } +# 1380 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2) + { return this->replace(__pos1, __n1, __str._M_data() + + __str._M_check(__pos2, "basic_string::replace"), + __str._M_limit(__pos2, __n2)); } +# 1404 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2); +# 1423 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos, size_type __n1, const _CharT* __s) + { + ; + return this->replace(__pos, __n1, __s, traits_type::length(__s)); + } +# 1446 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) + { return _M_replace_aux(_M_check(__pos, "basic_string::replace"), + _M_limit(__pos, __n1), __n2, __c); } +# 1464 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(iterator __i1, iterator __i2, const basic_string& __str) + { return this->replace(__i1, __i2, __str._M_data(), __str.size()); } +# 1482 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n) + { + + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n); + } +# 1503 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(iterator __i1, iterator __i2, const _CharT* __s) + { + ; + return this->replace(__i1, __i2, __s, traits_type::length(__s)); + } +# 1524 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(iterator __i1, iterator __i2, size_type __n, _CharT __c) + { + + ; + return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c); + } +# 1546 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + template + basic_string& + replace(iterator __i1, iterator __i2, + _InputIterator __k1, _InputIterator __k2) + { + + ; + ; + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral()); + } + + + + basic_string& + replace(iterator __i1, iterator __i2, _CharT* __k1, _CharT* __k2) + { + + ; + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, + __k1, __k2 - __k1); + } + + basic_string& + replace(iterator __i1, iterator __i2, + const _CharT* __k1, const _CharT* __k2) + { + + ; + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, + __k1, __k2 - __k1); + } + + basic_string& + replace(iterator __i1, iterator __i2, iterator __k1, iterator __k2) + { + + ; + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, + __k1.base(), __k2 - __k1); + } + + basic_string& + replace(iterator __i1, iterator __i2, + const_iterator __k1, const_iterator __k2) + { + + ; + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, + __k1.base(), __k2 - __k1); + } +# 1621 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + private: + template + basic_string& + _M_replace_dispatch(iterator __i1, iterator __i2, _Integer __n, + _Integer __val, __true_type) + { return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __val); } + + template + basic_string& + _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, + _InputIterator __k2, __false_type); + + basic_string& + _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, + _CharT __c); + + basic_string& + _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, + size_type __n2); + + + + template + static _CharT* + _S_construct_aux(_InIterator __beg, _InIterator __end, + const _Alloc& __a, __false_type) + { + typedef typename iterator_traits<_InIterator>::iterator_category _Tag; + return _S_construct(__beg, __end, __a, _Tag()); + } + + + + template + static _CharT* + _S_construct_aux(_Integer __beg, _Integer __end, + const _Alloc& __a, __true_type) + { return _S_construct_aux_2(static_cast(__beg), + __end, __a); } + + static _CharT* + _S_construct_aux_2(size_type __req, _CharT __c, const _Alloc& __a) + { return _S_construct(__req, __c, __a); } + + template + static _CharT* + _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a) + { + typedef typename std::__is_integer<_InIterator>::__type _Integral; + return _S_construct_aux(__beg, __end, __a, _Integral()); + } + + + template + static _CharT* + _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, + input_iterator_tag); + + + + template + static _CharT* + _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a, + forward_iterator_tag); + + static _CharT* + _S_construct(size_type __req, _CharT __c, const _Alloc& __a); + + public: +# 1702 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + copy(_CharT* __s, size_type __n, size_type __pos = 0) const; +# 1712 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + void + swap(basic_string& __s); +# 1722 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + const _CharT* + c_str() const + { return _M_data(); } + + + + + + + + const _CharT* + data() const + { return _M_data(); } + + + + + allocator_type + get_allocator() const + { return _M_dataplus; } +# 1754 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + find(const _CharT* __s, size_type __pos, size_type __n) const; +# 1767 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + find(const basic_string& __str, size_type __pos = 0) const + { return this->find(__str.data(), __pos, __str.size()); } +# 1781 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + find(const _CharT* __s, size_type __pos = 0) const + { + ; + return this->find(__s, __pos, traits_type::length(__s)); + } +# 1798 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + find(_CharT __c, size_type __pos = 0) const; +# 1811 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + rfind(const basic_string& __str, size_type __pos = npos) const + { return this->rfind(__str.data(), __pos, __str.size()); } +# 1826 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + rfind(const _CharT* __s, size_type __pos, size_type __n) const; +# 1839 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + rfind(const _CharT* __s, size_type __pos = npos) const + { + ; + return this->rfind(__s, __pos, traits_type::length(__s)); + } +# 1856 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + rfind(_CharT __c, size_type __pos = npos) const; +# 1869 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + find_first_of(const basic_string& __str, size_type __pos = 0) const + { return this->find_first_of(__str.data(), __pos, __str.size()); } +# 1884 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + find_first_of(const _CharT* __s, size_type __pos, size_type __n) const; +# 1897 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + find_first_of(const _CharT* __s, size_type __pos = 0) const + { + ; + return this->find_first_of(__s, __pos, traits_type::length(__s)); + } +# 1916 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + find_first_of(_CharT __c, size_type __pos = 0) const + { return this->find(__c, __pos); } +# 1930 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + find_last_of(const basic_string& __str, size_type __pos = npos) const + { return this->find_last_of(__str.data(), __pos, __str.size()); } +# 1945 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + find_last_of(const _CharT* __s, size_type __pos, size_type __n) const; +# 1958 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + find_last_of(const _CharT* __s, size_type __pos = npos) const + { + ; + return this->find_last_of(__s, __pos, traits_type::length(__s)); + } +# 1977 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + find_last_of(_CharT __c, size_type __pos = npos) const + { return this->rfind(__c, __pos); } +# 1991 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + find_first_not_of(const basic_string& __str, size_type __pos = 0) const + { return this->find_first_not_of(__str.data(), __pos, __str.size()); } +# 2006 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + find_first_not_of(const _CharT* __s, size_type __pos, + size_type __n) const; +# 2020 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + find_first_not_of(const _CharT* __s, size_type __pos = 0) const + { + ; + return this->find_first_not_of(__s, __pos, traits_type::length(__s)); + } +# 2037 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + find_first_not_of(_CharT __c, size_type __pos = 0) const; +# 2050 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + find_last_not_of(const basic_string& __str, size_type __pos = npos) const + { return this->find_last_not_of(__str.data(), __pos, __str.size()); } +# 2066 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + find_last_not_of(const _CharT* __s, size_type __pos, + size_type __n) const; +# 2079 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + find_last_not_of(const _CharT* __s, size_type __pos = npos) const + { + ; + return this->find_last_not_of(__s, __pos, traits_type::length(__s)); + } +# 2096 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + size_type + find_last_not_of(_CharT __c, size_type __pos = npos) const; +# 2111 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + basic_string + substr(size_type __pos = 0, size_type __n = npos) const + { return basic_string(*this, + _M_check(__pos, "basic_string::substr"), __n); } +# 2129 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + int + compare(const basic_string& __str) const + { + const size_type __size = this->size(); + const size_type __osize = __str.size(); + const size_type __len = std::min(__size, __osize); + + int __r = traits_type::compare(_M_data(), __str.data(), __len); + if (!__r) + __r = _S_compare(__size, __osize); + return __r; + } +# 2159 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + int + compare(size_type __pos, size_type __n, const basic_string& __str) const; +# 2183 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + int + compare(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2) const; +# 2201 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + int + compare(const _CharT* __s) const; +# 2224 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + int + compare(size_type __pos, size_type __n1, const _CharT* __s) const; +# 2249 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + int + compare(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) const; + }; +# 2261 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + template + basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + basic_string<_CharT, _Traits, _Alloc> __str(__lhs); + __str.append(__rhs); + return __str; + } + + + + + + + + template + basic_string<_CharT,_Traits,_Alloc> + operator+(const _CharT* __lhs, + const basic_string<_CharT,_Traits,_Alloc>& __rhs); + + + + + + + + template + basic_string<_CharT,_Traits,_Alloc> + operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); + + + + + + + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { + basic_string<_CharT, _Traits, _Alloc> __str(__lhs); + __str.append(__rhs); + return __str; + } + + + + + + + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) + { + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + __string_type __str(__lhs); + __str.append(__size_type(1), __rhs); + return __str; + } +# 2332 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + template + inline bool + operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) == 0; } + + template + inline + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, bool>::__type + operator==(const basic_string<_CharT>& __lhs, + const basic_string<_CharT>& __rhs) + { return (__lhs.size() == __rhs.size() + && !std::char_traits<_CharT>::compare(__lhs.data(), __rhs.data(), + __lhs.size())); } + + + + + + + + template + inline bool + operator==(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) == 0; } + + + + + + + + template + inline bool + operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) == 0; } +# 2378 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + template + inline bool + operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return !(__lhs == __rhs); } + + + + + + + + template + inline bool + operator!=(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return !(__lhs == __rhs); } + + + + + + + + template + inline bool + operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return !(__lhs == __rhs); } +# 2415 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + template + inline bool + operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) < 0; } + + + + + + + + template + inline bool + operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) < 0; } + + + + + + + + template + inline bool + operator<(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) > 0; } +# 2452 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + template + inline bool + operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) > 0; } + + + + + + + + template + inline bool + operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) > 0; } + + + + + + + + template + inline bool + operator>(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) < 0; } +# 2489 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + template + inline bool + operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) <= 0; } + + + + + + + + template + inline bool + operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) <= 0; } + + + + + + + + template + inline bool + operator<=(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) >= 0; } +# 2526 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + template + inline bool + operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) >= 0; } + + + + + + + + template + inline bool + operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) >= 0; } + + + + + + + + template + inline bool + operator>=(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) <= 0; } +# 2563 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + template + inline void + swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, + basic_string<_CharT, _Traits, _Alloc>& __rhs) + { __lhs.swap(__rhs); } +# 2580 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str); + + template<> + basic_istream& + operator>>(basic_istream& __is, basic_string& __str); +# 2598 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, + const basic_string<_CharT, _Traits, _Alloc>& __str) + { + + + return __ostream_insert(__os, __str.data(), __str.size()); + } +# 2621 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + template + basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim); +# 2639 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.h" 3 + template + inline basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str) + { return getline(__is, __str, __is.widen('\n')); } + + template<> + basic_istream& + getline(basic_istream& __in, basic_string& __str, + char __delim); + + + template<> + basic_istream& + getline(basic_istream& __in, basic_string& __str, + wchar_t __delim); + + +} +# 54 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/string" 2 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.tcc" 1 3 +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.tcc" 3 +#define _BASIC_STRING_TCC 1 + + +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.tcc" 3 + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + const typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + _Rep::_S_max_size = (((npos - sizeof(_Rep_base))/sizeof(_CharT)) - 1) / 4; + + template + const _CharT + basic_string<_CharT, _Traits, _Alloc>:: + _Rep::_S_terminal = _CharT(); + + template + const typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>::npos; + + + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_empty_rep_storage[ + (sizeof(_Rep_base) + sizeof(_CharT) + sizeof(size_type) - 1) / + sizeof(size_type)]; + + + + + + template + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>:: + _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, + input_iterator_tag) + { + + if (__beg == __end && __a == _Alloc()) + return _S_empty_rep()._M_refdata(); + + + _CharT __buf[128]; + size_type __len = 0; + while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT)) + { + __buf[__len++] = *__beg; + ++__beg; + } + _Rep* __r = _Rep::_S_create(__len, size_type(0), __a); + _M_copy(__r->_M_refdata(), __buf, __len); + try + { + while (__beg != __end) + { + if (__len == __r->_M_capacity) + { + + _Rep* __another = _Rep::_S_create(__len + 1, __len, __a); + _M_copy(__another->_M_refdata(), __r->_M_refdata(), __len); + __r->_M_destroy(__a); + __r = __another; + } + __r->_M_refdata()[__len++] = *__beg; + ++__beg; + } + } + catch(...) + { + __r->_M_destroy(__a); + throw; + } + __r->_M_set_length_and_sharable(__len); + return __r->_M_refdata(); + } + + template + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>:: + _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, + forward_iterator_tag) + { + + if (__beg == __end && __a == _Alloc()) + return _S_empty_rep()._M_refdata(); + + + if (__gnu_cxx::__is_null_pointer(__beg) && __beg != __end) + __throw_logic_error(("basic_string::_S_construct NULL not valid")); + + const size_type __dnew = static_cast(std::distance(__beg, + __end)); + + _Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a); + try + { _S_copy_chars(__r->_M_refdata(), __beg, __end); } + catch(...) + { + __r->_M_destroy(__a); + throw; + } + __r->_M_set_length_and_sharable(__dnew); + return __r->_M_refdata(); + } + + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>:: + _S_construct(size_type __n, _CharT __c, const _Alloc& __a) + { + + if (__n == 0 && __a == _Alloc()) + return _S_empty_rep()._M_refdata(); + + + _Rep* __r = _Rep::_S_create(__n, size_type(0), __a); + if (__n) + _M_assign(__r->_M_refdata(), __n, __c); + + __r->_M_set_length_and_sharable(__n); + return __r->_M_refdata(); + } + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const basic_string& __str) + : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(__str.get_allocator()), + __str.get_allocator()), + __str.get_allocator()) + { } + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const _Alloc& __a) + : _M_dataplus(_S_construct(size_type(), _CharT(), __a), __a) + { } + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const basic_string& __str, size_type __pos, size_type __n) + : _M_dataplus(_S_construct(__str._M_data() + + __str._M_check(__pos, + "basic_string::basic_string"), + __str._M_data() + __str._M_limit(__pos, __n) + + __pos, _Alloc()), _Alloc()) + { } + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const basic_string& __str, size_type __pos, + size_type __n, const _Alloc& __a) + : _M_dataplus(_S_construct(__str._M_data() + + __str._M_check(__pos, + "basic_string::basic_string"), + __str._M_data() + __str._M_limit(__pos, __n) + + __pos, __a), __a) + { } + + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const _CharT* __s, size_type __n, const _Alloc& __a) + : _M_dataplus(_S_construct(__s, __s + __n, __a), __a) + { } + + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const _CharT* __s, const _Alloc& __a) + : _M_dataplus(_S_construct(__s, __s ? __s + traits_type::length(__s) : + __s + npos, __a), __a) + { } + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(size_type __n, _CharT __c, const _Alloc& __a) + : _M_dataplus(_S_construct(__n, __c, __a), __a) + { } + + + template + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a) + : _M_dataplus(_S_construct(__beg, __end, __a), __a) + { } +# 240 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.tcc" 3 + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + assign(const basic_string& __str) + { + if (_M_rep() != __str._M_rep()) + { + + const allocator_type __a = this->get_allocator(); + _CharT* __tmp = __str._M_rep()->_M_grab(__a, __str.get_allocator()); + _M_rep()->_M_dispose(__a); + _M_data(__tmp); + } + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + assign(const _CharT* __s, size_type __n) + { + ; + _M_check_length(this->size(), __n, "basic_string::assign"); + if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) + return _M_replace_safe(size_type(0), this->size(), __s, __n); + else + { + + const size_type __pos = __s - _M_data(); + if (__pos >= __n) + _M_copy(_M_data(), __s, __n); + else if (__pos) + _M_move(_M_data(), __s, __n); + _M_rep()->_M_set_length_and_sharable(__n); + return *this; + } + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + append(size_type __n, _CharT __c) + { + if (__n) + { + _M_check_length(size_type(0), __n, "basic_string::append"); + const size_type __len = __n + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + this->reserve(__len); + _M_assign(_M_data() + this->size(), __n, __c); + _M_rep()->_M_set_length_and_sharable(__len); + } + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + append(const _CharT* __s, size_type __n) + { + ; + if (__n) + { + _M_check_length(size_type(0), __n, "basic_string::append"); + const size_type __len = __n + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + { + if (_M_disjunct(__s)) + this->reserve(__len); + else + { + const size_type __off = __s - _M_data(); + this->reserve(__len); + __s = _M_data() + __off; + } + } + _M_copy(_M_data() + this->size(), __s, __n); + _M_rep()->_M_set_length_and_sharable(__len); + } + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + append(const basic_string& __str) + { + const size_type __size = __str.size(); + if (__size) + { + const size_type __len = __size + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + this->reserve(__len); + _M_copy(_M_data() + this->size(), __str._M_data(), __size); + _M_rep()->_M_set_length_and_sharable(__len); + } + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + append(const basic_string& __str, size_type __pos, size_type __n) + { + __str._M_check(__pos, "basic_string::append"); + __n = __str._M_limit(__pos, __n); + if (__n) + { + const size_type __len = __n + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + this->reserve(__len); + _M_copy(_M_data() + this->size(), __str._M_data() + __pos, __n); + _M_rep()->_M_set_length_and_sharable(__len); + } + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + insert(size_type __pos, const _CharT* __s, size_type __n) + { + ; + _M_check(__pos, "basic_string::insert"); + _M_check_length(size_type(0), __n, "basic_string::insert"); + if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) + return _M_replace_safe(__pos, size_type(0), __s, __n); + else + { + + const size_type __off = __s - _M_data(); + _M_mutate(__pos, 0, __n); + __s = _M_data() + __off; + _CharT* __p = _M_data() + __pos; + if (__s + __n <= __p) + _M_copy(__p, __s, __n); + else if (__s >= __p) + _M_copy(__p, __s + __n, __n); + else + { + const size_type __nleft = __p - __s; + _M_copy(__p, __s, __nleft); + _M_copy(__p + __nleft, __p + __n, __n - __nleft); + } + return *this; + } + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::iterator + basic_string<_CharT, _Traits, _Alloc>:: + erase(iterator __first, iterator __last) + { + + ; + + + + + const size_type __size = __last - __first; + if (__size) + { + const size_type __pos = __first - _M_ibegin(); + _M_mutate(__pos, __size, size_type(0)); + _M_rep()->_M_set_leaked(); + return iterator(_M_data() + __pos); + } + else + return __first; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + replace(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) + { + ; + _M_check(__pos, "basic_string::replace"); + __n1 = _M_limit(__pos, __n1); + _M_check_length(__n1, __n2, "basic_string::replace"); + bool __left; + if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) + return _M_replace_safe(__pos, __n1, __s, __n2); + else if ((__left = __s + __n2 <= _M_data() + __pos) + || _M_data() + __pos + __n1 <= __s) + { + + size_type __off = __s - _M_data(); + __left ? __off : (__off += __n2 - __n1); + _M_mutate(__pos, __n1, __n2); + _M_copy(_M_data() + __pos, _M_data() + __off, __n2); + return *this; + } + else + { + + const basic_string __tmp(__s, __n2); + return _M_replace_safe(__pos, __n1, __tmp._M_data(), __n2); + } + } + + template + void + basic_string<_CharT, _Traits, _Alloc>::_Rep:: + _M_destroy(const _Alloc& __a) throw () + { + const size_type __size = sizeof(_Rep_base) + + (this->_M_capacity + 1) * sizeof(_CharT); + _Raw_bytes_alloc(__a).deallocate(reinterpret_cast(this), __size); + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_leak_hard() + { + + if (_M_rep() == &_S_empty_rep()) + return; + + if (_M_rep()->_M_is_shared()) + _M_mutate(0, 0, 0); + _M_rep()->_M_set_leaked(); + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_mutate(size_type __pos, size_type __len1, size_type __len2) + { + const size_type __old_size = this->size(); + const size_type __new_size = __old_size + __len2 - __len1; + const size_type __how_much = __old_size - __pos - __len1; + + if (__new_size > this->capacity() || _M_rep()->_M_is_shared()) + { + + const allocator_type __a = get_allocator(); + _Rep* __r = _Rep::_S_create(__new_size, this->capacity(), __a); + + if (__pos) + _M_copy(__r->_M_refdata(), _M_data(), __pos); + if (__how_much) + _M_copy(__r->_M_refdata() + __pos + __len2, + _M_data() + __pos + __len1, __how_much); + + _M_rep()->_M_dispose(__a); + _M_data(__r->_M_refdata()); + } + else if (__how_much && __len1 != __len2) + { + + _M_move(_M_data() + __pos + __len2, + _M_data() + __pos + __len1, __how_much); + } + _M_rep()->_M_set_length_and_sharable(__new_size); + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + reserve(size_type __res) + { + if (__res != this->capacity() || _M_rep()->_M_is_shared()) + { + + if (__res < this->size()) + __res = this->size(); + const allocator_type __a = get_allocator(); + _CharT* __tmp = _M_rep()->_M_clone(__a, __res - this->size()); + _M_rep()->_M_dispose(__a); + _M_data(__tmp); + } + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + swap(basic_string& __s) + { + if (_M_rep()->_M_is_leaked()) + _M_rep()->_M_set_sharable(); + if (__s._M_rep()->_M_is_leaked()) + __s._M_rep()->_M_set_sharable(); + if (this->get_allocator() == __s.get_allocator()) + { + _CharT* __tmp = _M_data(); + _M_data(__s._M_data()); + __s._M_data(__tmp); + } + + else + { + const basic_string __tmp1(_M_ibegin(), _M_iend(), + __s.get_allocator()); + const basic_string __tmp2(__s._M_ibegin(), __s._M_iend(), + this->get_allocator()); + *this = __tmp2; + __s = __tmp1; + } + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::_Rep* + basic_string<_CharT, _Traits, _Alloc>::_Rep:: + _S_create(size_type __capacity, size_type __old_capacity, + const _Alloc& __alloc) + { + + + if (__capacity > _S_max_size) + __throw_length_error(("basic_string::_S_create")); +# 577 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_string.tcc" 3 + const size_type __pagesize = 4096; + const size_type __malloc_header_size = 4 * sizeof(void*); + + + + + + + + if (__capacity > __old_capacity && __capacity < 2 * __old_capacity) + __capacity = 2 * __old_capacity; + + + + + size_type __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); + + const size_type __adj_size = __size + __malloc_header_size; + if (__adj_size > __pagesize && __capacity > __old_capacity) + { + const size_type __extra = __pagesize - __adj_size % __pagesize; + __capacity += __extra / sizeof(_CharT); + + if (__capacity > _S_max_size) + __capacity = _S_max_size; + __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); + } + + + + void* __place = _Raw_bytes_alloc(__alloc).allocate(__size); + _Rep *__p = new (__place) _Rep; + __p->_M_capacity = __capacity; + + + + + + + + __p->_M_set_sharable(); + return __p; + } + + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>::_Rep:: + _M_clone(const _Alloc& __alloc, size_type __res) + { + + const size_type __requested_cap = this->_M_length + __res; + _Rep* __r = _Rep::_S_create(__requested_cap, this->_M_capacity, + __alloc); + if (this->_M_length) + _M_copy(__r->_M_refdata(), _M_refdata(), this->_M_length); + + __r->_M_set_length_and_sharable(this->_M_length); + return __r->_M_refdata(); + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + resize(size_type __n, _CharT __c) + { + const size_type __size = this->size(); + _M_check_length(__size, __n, "basic_string::resize"); + if (__size < __n) + this->append(__n - __size, __c); + else if (__n < __size) + this->erase(__n); + + } + + template + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, + _InputIterator __k2, __false_type) + { + const basic_string __s(__k1, __k2); + const size_type __n1 = __i2 - __i1; + _M_check_length(__n1, __s.size(), "basic_string::_M_replace_dispatch"); + return _M_replace_safe(__i1 - _M_ibegin(), __n1, __s._M_data(), + __s.size()); + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, + _CharT __c) + { + _M_check_length(__n1, __n2, "basic_string::_M_replace_aux"); + _M_mutate(__pos1, __n1, __n2); + if (__n2) + _M_assign(_M_data() + __pos1, __n2, __c); + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, + size_type __n2) + { + _M_mutate(__pos1, __n1, __n2); + if (__n2) + _M_copy(_M_data() + __pos1, __s, __n2); + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc> + operator+(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + ; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + const __size_type __len = _Traits::length(__lhs); + __string_type __str; + __str.reserve(__len + __rhs.size()); + __str.append(__lhs, __len); + __str.append(__rhs); + return __str; + } + + template + basic_string<_CharT, _Traits, _Alloc> + operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + __string_type __str; + const __size_type __len = __rhs.size(); + __str.reserve(__len + 1); + __str.append(__size_type(1), __lhs); + __str.append(__rhs); + return __str; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + copy(_CharT* __s, size_type __n, size_type __pos) const + { + _M_check(__pos, "basic_string::copy"); + __n = _M_limit(__pos, __n); + ; + if (__n) + _M_copy(__s, _M_data() + __pos, __n); + + return __n; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + const size_type __size = this->size(); + const _CharT* __data = _M_data(); + + if (__n == 0) + return __pos <= __size ? __pos : npos; + + if (__n <= __size) + { + for (; __pos <= __size - __n; ++__pos) + if (traits_type::eq(__data[__pos], __s[0]) + && traits_type::compare(__data + __pos + 1, + __s + 1, __n - 1) == 0) + return __pos; + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find(_CharT __c, size_type __pos) const + { + size_type __ret = npos; + const size_type __size = this->size(); + if (__pos < __size) + { + const _CharT* __data = _M_data(); + const size_type __n = __size - __pos; + const _CharT* __p = traits_type::find(__data + __pos, __n, __c); + if (__p) + __ret = __p - __data; + } + return __ret; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + rfind(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + const size_type __size = this->size(); + if (__n <= __size) + { + __pos = std::min(size_type(__size - __n), __pos); + const _CharT* __data = _M_data(); + do + { + if (traits_type::compare(__data + __pos, __s, __n) == 0) + return __pos; + } + while (__pos-- > 0); + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + rfind(_CharT __c, size_type __pos) const + { + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + for (++__size; __size-- > 0; ) + if (traits_type::eq(_M_data()[__size], __c)) + return __size; + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_of(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + for (; __n && __pos < this->size(); ++__pos) + { + const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]); + if (__p) + return __pos; + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_of(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + size_type __size = this->size(); + if (__size && __n) + { + if (--__size > __pos) + __size = __pos; + do + { + if (traits_type::find(__s, __n, _M_data()[__size])) + return __size; + } + while (__size-- != 0); + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + for (; __pos < this->size(); ++__pos) + if (!traits_type::find(__s, __n, _M_data()[__pos])) + return __pos; + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_not_of(_CharT __c, size_type __pos) const + { + for (; __pos < this->size(); ++__pos) + if (!traits_type::eq(_M_data()[__pos], __c)) + return __pos; + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + do + { + if (!traits_type::find(__s, __n, _M_data()[__size])) + return __size; + } + while (__size--); + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_not_of(_CharT __c, size_type __pos) const + { + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + do + { + if (!traits_type::eq(_M_data()[__size], __c)) + return __size; + } + while (__size--); + } + return npos; + } + + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n, const basic_string& __str) const + { + _M_check(__pos, "basic_string::compare"); + __n = _M_limit(__pos, __n); + const size_type __osize = __str.size(); + const size_type __len = std::min(__n, __osize); + int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len); + if (!__r) + __r = _S_compare(__n, __osize); + return __r; + } + + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2) const + { + _M_check(__pos1, "basic_string::compare"); + __str._M_check(__pos2, "basic_string::compare"); + __n1 = _M_limit(__pos1, __n1); + __n2 = __str._M_limit(__pos2, __n2); + const size_type __len = std::min(__n1, __n2); + int __r = traits_type::compare(_M_data() + __pos1, + __str.data() + __pos2, __len); + if (!__r) + __r = _S_compare(__n1, __n2); + return __r; + } + + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(const _CharT* __s) const + { + ; + const size_type __size = this->size(); + const size_type __osize = traits_type::length(__s); + const size_type __len = std::min(__size, __osize); + int __r = traits_type::compare(_M_data(), __s, __len); + if (!__r) + __r = _S_compare(__size, __osize); + return __r; + } + + template + int + basic_string <_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n1, const _CharT* __s) const + { + ; + _M_check(__pos, "basic_string::compare"); + __n1 = _M_limit(__pos, __n1); + const size_type __osize = traits_type::length(__s); + const size_type __len = std::min(__n1, __osize); + int __r = traits_type::compare(_M_data() + __pos, __s, __len); + if (!__r) + __r = _S_compare(__n1, __osize); + return __r; + } + + template + int + basic_string <_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) const + { + ; + _M_check(__pos, "basic_string::compare"); + __n1 = _M_limit(__pos, __n1); + const size_type __len = std::min(__n1, __n2); + int __r = traits_type::compare(_M_data() + __pos, __s, __len); + if (!__r) + __r = _S_compare(__n1, __n2); + return __r; + } + + + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, + basic_string<_CharT, _Traits, _Alloc>& __str) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __istream_type::ios_base __ios_base; + typedef typename __istream_type::int_type __int_type; + typedef typename __string_type::size_type __size_type; + typedef ctype<_CharT> __ctype_type; + typedef typename __ctype_type::ctype_base __ctype_base; + + __size_type __extracted = 0; + typename __ios_base::iostate __err = __ios_base::goodbit; + typename __istream_type::sentry __cerb(__in, false); + if (__cerb) + { + try + { + + __str.erase(); + _CharT __buf[128]; + __size_type __len = 0; + const streamsize __w = __in.width(); + const __size_type __n = __w > 0 ? static_cast<__size_type>(__w) + : __str.max_size(); + const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); + const __int_type __eof = _Traits::eof(); + __int_type __c = __in.rdbuf()->sgetc(); + + while (__extracted < __n + && !_Traits::eq_int_type(__c, __eof) + && !__ct.is(__ctype_base::space, + _Traits::to_char_type(__c))) + { + if (__len == sizeof(__buf) / sizeof(_CharT)) + { + __str.append(__buf, sizeof(__buf) / sizeof(_CharT)); + __len = 0; + } + __buf[__len++] = _Traits::to_char_type(__c); + ++__extracted; + __c = __in.rdbuf()->snextc(); + } + __str.append(__buf, __len); + + if (_Traits::eq_int_type(__c, __eof)) + __err |= __ios_base::eofbit; + __in.width(0); + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { + + + + __in._M_setstate(__ios_base::badbit); + } + } + + if (!__extracted) + __err |= __ios_base::failbit; + if (__err) + __in.setstate(__err); + return __in; + } + + template + basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __in, + basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __istream_type::ios_base __ios_base; + typedef typename __istream_type::int_type __int_type; + typedef typename __string_type::size_type __size_type; + + __size_type __extracted = 0; + const __size_type __n = __str.max_size(); + typename __ios_base::iostate __err = __ios_base::goodbit; + typename __istream_type::sentry __cerb(__in, true); + if (__cerb) + { + try + { + __str.erase(); + const __int_type __idelim = _Traits::to_int_type(__delim); + const __int_type __eof = _Traits::eof(); + __int_type __c = __in.rdbuf()->sgetc(); + + while (__extracted < __n + && !_Traits::eq_int_type(__c, __eof) + && !_Traits::eq_int_type(__c, __idelim)) + { + __str += _Traits::to_char_type(__c); + ++__extracted; + __c = __in.rdbuf()->snextc(); + } + + if (_Traits::eq_int_type(__c, __eof)) + __err |= __ios_base::eofbit; + else if (_Traits::eq_int_type(__c, __idelim)) + { + ++__extracted; + __in.rdbuf()->sbumpc(); + } + else + __err |= __ios_base::failbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { + + + + __in._M_setstate(__ios_base::badbit); + } + } + if (!__extracted) + __err |= __ios_base::failbit; + if (__err) + __in.setstate(__err); + return __in; + } + + + + + + extern template class basic_string; + extern template + basic_istream& + operator>>(basic_istream&, string&); + extern template + basic_ostream& + operator<<(basic_ostream&, const string&); + extern template + basic_istream& + getline(basic_istream&, string&, char); + extern template + basic_istream& + getline(basic_istream&, string&); + + + extern template class basic_string; + extern template + basic_istream& + operator>>(basic_istream&, wstring&); + extern template + basic_ostream& + operator<<(basic_ostream&, const wstring&); + extern template + basic_istream& + getline(basic_istream&, wstring&, wchar_t); + extern template + basic_istream& + getline(basic_istream&, wstring&); + + + +} +# 57 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/string" 2 3 +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 2 3 + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 62 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + class locale + { + public: + + + typedef int category; + + + class facet; + class id; + class _Impl; + + friend class facet; + friend class _Impl; + + template + friend bool + has_facet(const locale&) throw(); + + template + friend const _Facet& + use_facet(const locale&); + + template + friend struct __use_cache; +# 98 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + static const category none = 0; + static const category ctype = 1L << 0; + static const category numeric = 1L << 1; + static const category collate = 1L << 2; + static const category time = 1L << 3; + static const category monetary = 1L << 4; + static const category messages = 1L << 5; + static const category all = (ctype | numeric | collate | + time | monetary | messages); +# 117 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + locale() throw(); +# 126 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + locale(const locale& __other) throw(); +# 136 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + explicit + locale(const char* __s); +# 151 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + locale(const locale& __base, const char* __s, category __cat); +# 164 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + locale(const locale& __base, const locale& __add, category __cat); +# 176 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + template + locale(const locale& __other, _Facet* __f); + + + ~locale() throw(); +# 190 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + const locale& + operator=(const locale& __other) throw(); +# 205 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + template + locale + combine(const locale& __other) const; + + + + + + + string + name() const; +# 224 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + bool + operator==(const locale& __other) const throw(); + + + + + + + + bool + operator!=(const locale& __other) const throw() + { return !(this->operator==(__other)); } +# 252 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + template + bool + operator()(const basic_string<_Char, _Traits, _Alloc>& __s1, + const basic_string<_Char, _Traits, _Alloc>& __s2) const; +# 268 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + static locale + global(const locale&); + + + + + static const locale& + classic(); + + private: + + _Impl* _M_impl; + + + static _Impl* _S_classic; + + + static _Impl* _S_global; + + + + + + static const char* const* const _S_categories; +# 303 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + enum { _S_categories_size = 6 + 6 }; + + + static __gthread_once_t _S_once; + + + explicit + locale(_Impl*) throw(); + + static void + _S_initialize(); + + static void + _S_initialize_once() throw(); + + static category + _S_normalize_category(category); + + void + _M_coalesce(const locale& __base, const locale& __add, category __cat); + }; +# 337 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + class locale::facet + { + private: + friend class locale; + friend class locale::_Impl; + + mutable _Atomic_word _M_refcount; + + + static __c_locale _S_c_locale; + + + static const char _S_c_name[2]; + + + static __gthread_once_t _S_once; + + + static void + _S_initialize_once(); + + protected: +# 368 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + explicit + facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0) + { } + + + virtual + ~facet(); + + static void + _S_create_c_locale(__c_locale& __cloc, const char* __s, + __c_locale __old = 0); + + static __c_locale + _S_clone_c_locale(__c_locale& __cloc) throw(); + + static void + _S_destroy_c_locale(__c_locale& __cloc); + + static __c_locale + _S_lc_ctype_c_locale(__c_locale __cloc, const char* __s); + + + + static __c_locale + _S_get_c_locale(); + + __attribute__ ((__const__)) static const char* + _S_get_c_name() throw(); + + private: + void + _M_add_reference() const throw() + { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } + + void + _M_remove_reference() const throw() + { + if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) + { + try + { delete this; } + catch(...) + { } + } + } + + facet(const facet&); + + facet& + operator=(const facet&); + }; +# 432 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + class locale::id + { + private: + friend class locale; + friend class locale::_Impl; + + template + friend const _Facet& + use_facet(const locale&); + + template + friend bool + has_facet(const locale&) throw(); + + + + + mutable size_t _M_index; + + + static _Atomic_word _S_refcount; + + void + operator=(const id&); + + id(const id&); + + public: + + + + id() { } + + size_t + _M_id() const throw(); + }; + + + + class locale::_Impl + { + public: + + friend class locale; + friend class locale::facet; + + template + friend bool + has_facet(const locale&) throw(); + + template + friend const _Facet& + use_facet(const locale&); + + template + friend struct __use_cache; + + private: + + _Atomic_word _M_refcount; + const facet** _M_facets; + size_t _M_facets_size; + const facet** _M_caches; + char** _M_names; + static const locale::id* const _S_id_ctype[]; + static const locale::id* const _S_id_numeric[]; + static const locale::id* const _S_id_collate[]; + static const locale::id* const _S_id_time[]; + static const locale::id* const _S_id_monetary[]; + static const locale::id* const _S_id_messages[]; + static const locale::id* const* const _S_facet_categories[]; + + void + _M_add_reference() throw() + { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } + + void + _M_remove_reference() throw() + { + if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) + { + try + { delete this; } + catch(...) + { } + } + } + + _Impl(const _Impl&, size_t); + _Impl(const char*, size_t); + _Impl(size_t) throw(); + + ~_Impl() throw(); + + _Impl(const _Impl&); + + void + operator=(const _Impl&); + + bool + _M_check_same_name() + { + bool __ret = true; + if (_M_names[1]) + + for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i) + __ret = __builtin_strcmp(_M_names[__i], _M_names[__i + 1]) == 0; + return __ret; + } + + void + _M_replace_categories(const _Impl*, category); + + void + _M_replace_category(const _Impl*, const locale::id* const*); + + void + _M_replace_facet(const _Impl*, const locale::id*); + + void + _M_install_facet(const locale::id*, const facet*); + + template + void + _M_init_facet(_Facet* __facet) + { _M_install_facet(&_Facet::id, __facet); } + + void + _M_install_cache(const facet*, size_t); + }; +# 575 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + template + bool + has_facet(const locale& __loc) throw(); +# 592 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + template + const _Facet& + use_facet(const locale& __loc); +# 609 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + template + class collate : public locale::facet + { + public: + + + + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + + protected: + + + __c_locale _M_c_locale_collate; + + public: + + static locale::id id; +# 636 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + explicit + collate(size_t __refs = 0) + : facet(__refs), _M_c_locale_collate(_S_get_c_locale()) + { } +# 650 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + explicit + collate(__c_locale __cloc, size_t __refs = 0) + : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc)) + { } +# 667 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + int + compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const + { return this->do_compare(__lo1, __hi1, __lo2, __hi2); } +# 686 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + string_type + transform(const _CharT* __lo, const _CharT* __hi) const + { return this->do_transform(__lo, __hi); } +# 700 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + long + hash(const _CharT* __lo, const _CharT* __hi) const + { return this->do_hash(__lo, __hi); } + + + int + _M_compare(const _CharT*, const _CharT*) const throw(); + + size_t + _M_transform(_CharT*, const _CharT*, size_t) const throw(); + + protected: + + virtual + ~collate() + { _S_destroy_c_locale(_M_c_locale_collate); } +# 729 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + virtual int + do_compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const; +# 745 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + virtual string_type + do_transform(const _CharT* __lo, const _CharT* __hi) const; +# 758 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 3 + virtual long + do_hash(const _CharT* __lo, const _CharT* __hi) const; + }; + + template + locale::id collate<_CharT>::id; + + + template<> + int + collate::_M_compare(const char*, const char*) const throw(); + + template<> + size_t + collate::_M_transform(char*, const char*, size_t) const throw(); + + + template<> + int + collate::_M_compare(const wchar_t*, const wchar_t*) const throw(); + + template<> + size_t + collate::_M_transform(wchar_t*, const wchar_t*, size_t) const throw(); + + + + template + class collate_byname : public collate<_CharT> + { + public: + + + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + + explicit + collate_byname(const char* __s, size_t __refs = 0) + : collate<_CharT>(__refs) + { + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + this->_S_destroy_c_locale(this->_M_c_locale_collate); + this->_S_create_c_locale(this->_M_c_locale_collate, __s); + } + } + + protected: + virtual + ~collate_byname() { } + }; + +} + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.tcc" 1 3 +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.tcc" 3 +#define _LOCALE_CLASSES_TCC 1 + + +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.tcc" 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + locale:: + locale(const locale& __other, _Facet* __f) + { + _M_impl = new _Impl(*__other._M_impl, 1); + + try + { _M_impl->_M_install_facet(&_Facet::id, __f); } + catch(...) + { + _M_impl->_M_remove_reference(); + throw; + } + delete [] _M_impl->_M_names[0]; + _M_impl->_M_names[0] = 0; + } + + template + locale + locale:: + combine(const locale& __other) const + { + _Impl* __tmp = new _Impl(*_M_impl, 1); + try + { + __tmp->_M_replace_facet(__other._M_impl, &_Facet::id); + } + catch(...) + { + __tmp->_M_remove_reference(); + throw; + } + return locale(__tmp); + } + + template + bool + locale:: + operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1, + const basic_string<_CharT, _Traits, _Alloc>& __s2) const + { + typedef std::collate<_CharT> __collate_type; + const __collate_type& __collate = use_facet<__collate_type>(*this); + return (__collate.compare(__s1.data(), __s1.data() + __s1.length(), + __s2.data(), __s2.data() + __s2.length()) < 0); + } + + + template + bool + has_facet(const locale& __loc) throw() + { + const size_t __i = _Facet::id._M_id(); + const locale::facet** __facets = __loc._M_impl->_M_facets; + return (__i < __loc._M_impl->_M_facets_size + + && dynamic_cast(__facets[__i])); + + + + } + + template + const _Facet& + use_facet(const locale& __loc) + { + const size_t __i = _Facet::id._M_id(); + const locale::facet** __facets = __loc._M_impl->_M_facets; + if (__i >= __loc._M_impl->_M_facets_size || !__facets[__i]) + __throw_bad_cast(); + + return dynamic_cast(*__facets[__i]); + + + + } + + + + template + int + collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const throw () + { return 0; } + + + template + size_t + collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const throw () + { return 0; } + + template + int + collate<_CharT>:: + do_compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const + { + + + const string_type __one(__lo1, __hi1); + const string_type __two(__lo2, __hi2); + + const _CharT* __p = __one.c_str(); + const _CharT* __pend = __one.data() + __one.length(); + const _CharT* __q = __two.c_str(); + const _CharT* __qend = __two.data() + __two.length(); + + + + + for (;;) + { + const int __res = _M_compare(__p, __q); + if (__res) + return __res; + + __p += char_traits<_CharT>::length(__p); + __q += char_traits<_CharT>::length(__q); + if (__p == __pend && __q == __qend) + return 0; + else if (__p == __pend) + return -1; + else if (__q == __qend) + return 1; + + __p++; + __q++; + } + } + + template + typename collate<_CharT>::string_type + collate<_CharT>:: + do_transform(const _CharT* __lo, const _CharT* __hi) const + { + string_type __ret; + + + const string_type __str(__lo, __hi); + + const _CharT* __p = __str.c_str(); + const _CharT* __pend = __str.data() + __str.length(); + + size_t __len = (__hi - __lo) * 2; + + _CharT* __c = new _CharT[__len]; + + try + { + + + + for (;;) + { + + size_t __res = _M_transform(__c, __p, __len); + + + if (__res >= __len) + { + __len = __res + 1; + delete [] __c, __c = 0; + __c = new _CharT[__len]; + __res = _M_transform(__c, __p, __len); + } + + __ret.append(__c, __res); + __p += char_traits<_CharT>::length(__p); + if (__p == __pend) + break; + + __p++; + __ret.push_back(_CharT()); + } + } + catch(...) + { + delete [] __c; + throw; + } + + delete [] __c; + + return __ret; + } + + template + long + collate<_CharT>:: + do_hash(const _CharT* __lo, const _CharT* __hi) const + { + unsigned long __val = 0; + for (; __lo < __hi; ++__lo) + __val = + *__lo + ((__val << 7) + | (__val >> (__gnu_cxx::__numeric_traits:: + __digits - 7))); + return static_cast(__val); + } + + + + + + extern template class collate; + extern template class collate_byname; + + extern template + const collate& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + extern template class collate; + extern template class collate_byname; + + extern template + const collate& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + +} +# 816 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_classes.h" 2 3 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 2 3 + + + + + + +#define _IOS_BASE_SEEK_CUR 1 +#define _IOS_BASE_SEEK_END 2 + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + + + + enum _Ios_Fmtflags + { + _S_boolalpha = 1L << 0, + _S_dec = 1L << 1, + _S_fixed = 1L << 2, + _S_hex = 1L << 3, + _S_internal = 1L << 4, + _S_left = 1L << 5, + _S_oct = 1L << 6, + _S_right = 1L << 7, + _S_scientific = 1L << 8, + _S_showbase = 1L << 9, + _S_showpoint = 1L << 10, + _S_showpos = 1L << 11, + _S_skipws = 1L << 12, + _S_unitbuf = 1L << 13, + _S_uppercase = 1L << 14, + _S_adjustfield = _S_left | _S_right | _S_internal, + _S_basefield = _S_dec | _S_oct | _S_hex, + _S_floatfield = _S_scientific | _S_fixed, + _S_ios_fmtflags_end = 1L << 16 + }; + + inline _Ios_Fmtflags + operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) & static_cast(__b)); } + + inline _Ios_Fmtflags + operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) | static_cast(__b)); } + + inline _Ios_Fmtflags + operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) ^ static_cast(__b)); } + + inline _Ios_Fmtflags& + operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a | __b; } + + inline _Ios_Fmtflags& + operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a & __b; } + + inline _Ios_Fmtflags& + operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a ^ __b; } + + inline _Ios_Fmtflags + operator~(_Ios_Fmtflags __a) + { return _Ios_Fmtflags(~static_cast(__a)); } + + + enum _Ios_Openmode + { + _S_app = 1L << 0, + _S_ate = 1L << 1, + _S_bin = 1L << 2, + _S_in = 1L << 3, + _S_out = 1L << 4, + _S_trunc = 1L << 5, + _S_ios_openmode_end = 1L << 16 + }; + + inline _Ios_Openmode + operator&(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) & static_cast(__b)); } + + inline _Ios_Openmode + operator|(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) | static_cast(__b)); } + + inline _Ios_Openmode + operator^(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) ^ static_cast(__b)); } + + inline _Ios_Openmode& + operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a | __b; } + + inline _Ios_Openmode& + operator&=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a & __b; } + + inline _Ios_Openmode& + operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a ^ __b; } + + inline _Ios_Openmode + operator~(_Ios_Openmode __a) + { return _Ios_Openmode(~static_cast(__a)); } + + + enum _Ios_Iostate + { + _S_goodbit = 0, + _S_badbit = 1L << 0, + _S_eofbit = 1L << 1, + _S_failbit = 1L << 2, + _S_ios_iostate_end = 1L << 16 + }; + + inline _Ios_Iostate + operator&(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) & static_cast(__b)); } + + inline _Ios_Iostate + operator|(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) | static_cast(__b)); } + + inline _Ios_Iostate + operator^(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) ^ static_cast(__b)); } + + inline _Ios_Iostate& + operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a | __b; } + + inline _Ios_Iostate& + operator&=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a & __b; } + + inline _Ios_Iostate& + operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a ^ __b; } + + inline _Ios_Iostate + operator~(_Ios_Iostate __a) + { return _Ios_Iostate(~static_cast(__a)); } + + enum _Ios_Seekdir + { + _S_beg = 0, + _S_cur = 1, + _S_end = 2, + _S_ios_seekdir_end = 1L << 16 + }; +# 207 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 3 + class ios_base + { + public: + + + + + + + + class failure : public exception + { + public: + + + explicit + failure(const string& __str) throw(); + + + + virtual + ~failure() throw(); + + virtual const char* + what() const throw(); + + private: + string _M_msg; + }; +# 263 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 3 + typedef _Ios_Fmtflags fmtflags; + + + static const fmtflags boolalpha = _S_boolalpha; + + + static const fmtflags dec = _S_dec; + + + static const fmtflags fixed = _S_fixed; + + + static const fmtflags hex = _S_hex; + + + + + static const fmtflags internal = _S_internal; + + + + static const fmtflags left = _S_left; + + + static const fmtflags oct = _S_oct; + + + + static const fmtflags right = _S_right; + + + static const fmtflags scientific = _S_scientific; + + + + static const fmtflags showbase = _S_showbase; + + + + static const fmtflags showpoint = _S_showpoint; + + + static const fmtflags showpos = _S_showpos; + + + static const fmtflags skipws = _S_skipws; + + + static const fmtflags unitbuf = _S_unitbuf; + + + + static const fmtflags uppercase = _S_uppercase; + + + static const fmtflags adjustfield = _S_adjustfield; + + + static const fmtflags basefield = _S_basefield; + + + static const fmtflags floatfield = _S_floatfield; +# 338 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 3 + typedef _Ios_Iostate iostate; + + + + static const iostate badbit = _S_badbit; + + + static const iostate eofbit = _S_eofbit; + + + + + static const iostate failbit = _S_failbit; + + + static const iostate goodbit = _S_goodbit; +# 369 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 3 + typedef _Ios_Openmode openmode; + + + static const openmode app = _S_app; + + + static const openmode ate = _S_ate; + + + + + static const openmode binary = _S_bin; + + + static const openmode in = _S_in; + + + static const openmode out = _S_out; + + + static const openmode trunc = _S_trunc; +# 401 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 3 + typedef _Ios_Seekdir seekdir; + + + static const seekdir beg = _S_beg; + + + static const seekdir cur = _S_cur; + + + static const seekdir end = _S_end; + + + typedef int io_state; + typedef int open_mode; + typedef int seek_dir; + + typedef std::streampos streampos; + typedef std::streamoff streamoff; +# 427 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 3 + enum event + { + erase_event, + imbue_event, + copyfmt_event + }; +# 444 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 3 + typedef void (*event_callback) (event, ios_base&, int); +# 456 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 3 + void + register_callback(event_callback __fn, int __index); + + protected: + streamsize _M_precision; + streamsize _M_width; + fmtflags _M_flags; + iostate _M_exception; + iostate _M_streambuf_state; + + + + struct _Callback_list + { + + _Callback_list* _M_next; + ios_base::event_callback _M_fn; + int _M_index; + _Atomic_word _M_refcount; + + _Callback_list(ios_base::event_callback __fn, int __index, + _Callback_list* __cb) + : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { } + + void + _M_add_reference() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } + + + int + _M_remove_reference() + { return __gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1); } + }; + + _Callback_list* _M_callbacks; + + void + _M_call_callbacks(event __ev) throw(); + + void + _M_dispose_callbacks(void) throw(); + + + struct _Words + { + void* _M_pword; + long _M_iword; + _Words() : _M_pword(0), _M_iword(0) { } + }; + + + _Words _M_word_zero; + + + + enum { _S_local_word_size = 8 }; + _Words _M_local_word[_S_local_word_size]; + + + int _M_word_size; + _Words* _M_word; + + _Words& + _M_grow_words(int __index, bool __iword); + + + locale _M_ios_locale; + + void + _M_init() throw(); + + public: + + + + + + class Init + { + friend class ios_base; + public: + Init(); + ~Init(); + + private: + static _Atomic_word _S_refcount; + static bool _S_synced_with_stdio; + }; + + + + + + + fmtflags + flags() const + { return _M_flags; } +# 560 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 3 + fmtflags + flags(fmtflags __fmtfl) + { + fmtflags __old = _M_flags; + _M_flags = __fmtfl; + return __old; + } +# 576 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 3 + fmtflags + setf(fmtflags __fmtfl) + { + fmtflags __old = _M_flags; + _M_flags |= __fmtfl; + return __old; + } +# 593 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 3 + fmtflags + setf(fmtflags __fmtfl, fmtflags __mask) + { + fmtflags __old = _M_flags; + _M_flags &= ~__mask; + _M_flags |= (__fmtfl & __mask); + return __old; + } + + + + + + + + void + unsetf(fmtflags __mask) + { _M_flags &= ~__mask; } +# 619 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 3 + streamsize + precision() const + { return _M_precision; } + + + + + + + streamsize + precision(streamsize __prec) + { + streamsize __old = _M_precision; + _M_precision = __prec; + return __old; + } + + + + + + + + streamsize + width() const + { return _M_width; } + + + + + + + streamsize + width(streamsize __wide) + { + streamsize __old = _M_width; + _M_width = __wide; + return __old; + } +# 670 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 3 + static bool + sync_with_stdio(bool __sync = true); +# 682 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 3 + locale + imbue(const locale& __loc) throw(); +# 693 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 3 + locale + getloc() const + { return _M_ios_locale; } +# 704 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 3 + const locale& + _M_getloc() const + { return _M_ios_locale; } +# 723 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 3 + static int + xalloc() throw(); +# 739 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 3 + long& + iword(int __ix) + { + _Words& __word = (__ix < _M_word_size) + ? _M_word[__ix] : _M_grow_words(__ix, true); + return __word._M_iword; + } +# 760 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 3 + void*& + pword(int __ix) + { + _Words& __word = (__ix < _M_word_size) + ? _M_word[__ix] : _M_grow_words(__ix, false); + return __word._M_pword; + } +# 777 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ios_base.h" 3 + virtual ~ios_base(); + + protected: + ios_base() throw (); + + + + private: + ios_base(const ios_base&); + + ios_base& + operator=(const ios_base&); + }; + + + + inline ios_base& + boolalpha(ios_base& __base) + { + __base.setf(ios_base::boolalpha); + return __base; + } + + + inline ios_base& + noboolalpha(ios_base& __base) + { + __base.unsetf(ios_base::boolalpha); + return __base; + } + + + inline ios_base& + showbase(ios_base& __base) + { + __base.setf(ios_base::showbase); + return __base; + } + + + inline ios_base& + noshowbase(ios_base& __base) + { + __base.unsetf(ios_base::showbase); + return __base; + } + + + inline ios_base& + showpoint(ios_base& __base) + { + __base.setf(ios_base::showpoint); + return __base; + } + + + inline ios_base& + noshowpoint(ios_base& __base) + { + __base.unsetf(ios_base::showpoint); + return __base; + } + + + inline ios_base& + showpos(ios_base& __base) + { + __base.setf(ios_base::showpos); + return __base; + } + + + inline ios_base& + noshowpos(ios_base& __base) + { + __base.unsetf(ios_base::showpos); + return __base; + } + + + inline ios_base& + skipws(ios_base& __base) + { + __base.setf(ios_base::skipws); + return __base; + } + + + inline ios_base& + noskipws(ios_base& __base) + { + __base.unsetf(ios_base::skipws); + return __base; + } + + + inline ios_base& + uppercase(ios_base& __base) + { + __base.setf(ios_base::uppercase); + return __base; + } + + + inline ios_base& + nouppercase(ios_base& __base) + { + __base.unsetf(ios_base::uppercase); + return __base; + } + + + inline ios_base& + unitbuf(ios_base& __base) + { + __base.setf(ios_base::unitbuf); + return __base; + } + + + inline ios_base& + nounitbuf(ios_base& __base) + { + __base.unsetf(ios_base::unitbuf); + return __base; + } + + + + inline ios_base& + internal(ios_base& __base) + { + __base.setf(ios_base::internal, ios_base::adjustfield); + return __base; + } + + + inline ios_base& + left(ios_base& __base) + { + __base.setf(ios_base::left, ios_base::adjustfield); + return __base; + } + + + inline ios_base& + right(ios_base& __base) + { + __base.setf(ios_base::right, ios_base::adjustfield); + return __base; + } + + + + inline ios_base& + dec(ios_base& __base) + { + __base.setf(ios_base::dec, ios_base::basefield); + return __base; + } + + + inline ios_base& + hex(ios_base& __base) + { + __base.setf(ios_base::hex, ios_base::basefield); + return __base; + } + + + inline ios_base& + oct(ios_base& __base) + { + __base.setf(ios_base::oct, ios_base::basefield); + return __base; + } + + + + inline ios_base& + fixed(ios_base& __base) + { + __base.setf(ios_base::fixed, ios_base::floatfield); + return __base; + } + + + inline ios_base& + scientific(ios_base& __base) + { + __base.setf(ios_base::scientific, ios_base::floatfield); + return __base; + } + +} + +#undef _IOS_BASE_SEEK_CUR +#undef _IOS_BASE_SEEK_END +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ios" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 1 3 +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 +#define _GLIBXX_STREAMBUF 1 + + +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 +# 46 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + streamsize + __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*, + basic_streambuf<_CharT, _Traits>*, bool&); +# 114 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + template + class basic_streambuf + { + public: + + + + + + + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + + + + typedef basic_streambuf __streambuf_type; + + + friend class basic_ios; + friend class basic_istream; + friend class basic_ostream; + friend class istreambuf_iterator; + friend class ostreambuf_iterator; + + friend streamsize + __copy_streambufs_eof<>(__streambuf_type*, __streambuf_type*, bool&); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + _CharT2*>::__type + __copy_move_a2(istreambuf_iterator<_CharT2>, + istreambuf_iterator<_CharT2>, _CharT2*); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + istreambuf_iterator<_CharT2> >::__type + find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + const _CharT2&); + + template + friend basic_istream<_CharT2, _Traits2>& + operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*); + + template + friend basic_istream<_CharT2, _Traits2>& + operator>>(basic_istream<_CharT2, _Traits2>&, + basic_string<_CharT2, _Traits2, _Alloc>&); + + template + friend basic_istream<_CharT2, _Traits2>& + getline(basic_istream<_CharT2, _Traits2>&, + basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2); + + protected: +# 180 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + char_type* _M_in_beg; + char_type* _M_in_cur; + char_type* _M_in_end; + char_type* _M_out_beg; + char_type* _M_out_cur; + char_type* _M_out_end; + + + locale _M_buf_locale; + + public: + + virtual + ~basic_streambuf() + { } +# 204 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + locale + pubimbue(const locale &__loc) + { + locale __tmp(this->getloc()); + this->imbue(__loc); + _M_buf_locale = __loc; + return __tmp; + } +# 221 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + locale + getloc() const + { return _M_buf_locale; } +# 234 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + __streambuf_type* + pubsetbuf(char_type* __s, streamsize __n) + { return this->setbuf(__s, __n); } + + pos_type + pubseekoff(off_type __off, ios_base::seekdir __way, + ios_base::openmode __mode = ios_base::in | ios_base::out) + { return this->seekoff(__off, __way, __mode); } + + pos_type + pubseekpos(pos_type __sp, + ios_base::openmode __mode = ios_base::in | ios_base::out) + { return this->seekpos(__sp, __mode); } + + int + pubsync() { return this->sync(); } +# 261 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + streamsize + in_avail() + { + const streamsize __ret = this->egptr() - this->gptr(); + return __ret ? __ret : this->showmanyc(); + } +# 275 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + int_type + snextc() + { + int_type __ret = traits_type::eof(); + if (__builtin_expect(!traits_type::eq_int_type(this->sbumpc(), + __ret), true)) + __ret = this->sgetc(); + return __ret; + } +# 293 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + int_type + sbumpc() + { + int_type __ret; + if (__builtin_expect(this->gptr() < this->egptr(), true)) + { + __ret = traits_type::to_int_type(*this->gptr()); + this->gbump(1); + } + else + __ret = this->uflow(); + return __ret; + } +# 315 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + int_type + sgetc() + { + int_type __ret; + if (__builtin_expect(this->gptr() < this->egptr(), true)) + __ret = traits_type::to_int_type(*this->gptr()); + else + __ret = this->underflow(); + return __ret; + } +# 334 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + streamsize + sgetn(char_type* __s, streamsize __n) + { return this->xsgetn(__s, __n); } +# 349 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + int_type + sputbackc(char_type __c) + { + int_type __ret; + const bool __testpos = this->eback() < this->gptr(); + if (__builtin_expect(!__testpos || + !traits_type::eq(__c, this->gptr()[-1]), false)) + __ret = this->pbackfail(traits_type::to_int_type(__c)); + else + { + this->gbump(-1); + __ret = traits_type::to_int_type(*this->gptr()); + } + return __ret; + } +# 374 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + int_type + sungetc() + { + int_type __ret; + if (__builtin_expect(this->eback() < this->gptr(), true)) + { + this->gbump(-1); + __ret = traits_type::to_int_type(*this->gptr()); + } + else + __ret = this->pbackfail(); + return __ret; + } +# 401 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + int_type + sputc(char_type __c) + { + int_type __ret; + if (__builtin_expect(this->pptr() < this->epptr(), true)) + { + *this->pptr() = __c; + this->pbump(1); + __ret = traits_type::to_int_type(__c); + } + else + __ret = this->overflow(traits_type::to_int_type(__c)); + return __ret; + } +# 427 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + streamsize + sputn(const char_type* __s, streamsize __n) + { return this->xsputn(__s, __n); } + + protected: +# 441 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + basic_streambuf() + : _M_in_beg(0), _M_in_cur(0), _M_in_end(0), + _M_out_beg(0), _M_out_cur(0), _M_out_end(0), + _M_buf_locale(locale()) + { } +# 459 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + char_type* + eback() const { return _M_in_beg; } + + char_type* + gptr() const { return _M_in_cur; } + + char_type* + egptr() const { return _M_in_end; } +# 475 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + void + gbump(int __n) { _M_in_cur += __n; } +# 486 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + void + setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) + { + _M_in_beg = __gbeg; + _M_in_cur = __gnext; + _M_in_end = __gend; + } +# 506 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + char_type* + pbase() const { return _M_out_beg; } + + char_type* + pptr() const { return _M_out_cur; } + + char_type* + epptr() const { return _M_out_end; } +# 522 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + void + pbump(int __n) { _M_out_cur += __n; } +# 532 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + void + setp(char_type* __pbeg, char_type* __pend) + { + _M_out_beg = _M_out_cur = __pbeg; + _M_out_end = __pend; + } +# 553 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + virtual void + imbue(const locale&) + { } +# 568 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + virtual basic_streambuf* + setbuf(char_type*, streamsize) + { return this; } +# 579 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + virtual pos_type + seekoff(off_type, ios_base::seekdir, + ios_base::openmode = ios_base::in | ios_base::out) + { return pos_type(off_type(-1)); } +# 591 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + virtual pos_type + seekpos(pos_type, + ios_base::openmode = ios_base::in | ios_base::out) + { return pos_type(off_type(-1)); } +# 604 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + virtual int + sync() { return 0; } +# 626 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + virtual streamsize + showmanyc() { return 0; } +# 642 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + virtual streamsize + xsgetn(char_type* __s, streamsize __n); +# 664 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + virtual int_type + underflow() + { return traits_type::eof(); } +# 677 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + virtual int_type + uflow() + { + int_type __ret = traits_type::eof(); + const bool __testeof = traits_type::eq_int_type(this->underflow(), + __ret); + if (!__testeof) + { + __ret = traits_type::to_int_type(*this->gptr()); + this->gbump(1); + } + return __ret; + } +# 701 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + virtual int_type + pbackfail(int_type = traits_type::eof()) + { return traits_type::eof(); } +# 719 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + virtual streamsize + xsputn(const char_type* __s, streamsize __n); +# 745 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + virtual int_type + overflow(int_type = traits_type::eof()) + { return traits_type::eof(); } + + + + public: +# 760 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 3 + void + stossc() + { + if (this->gptr() < this->egptr()) + this->gbump(1); + else + this->uflow(); + } + + + private: + + + basic_streambuf(const __streambuf_type& __sb) + : _M_in_beg(__sb._M_in_beg), _M_in_cur(__sb._M_in_cur), + _M_in_end(__sb._M_in_end), _M_out_beg(__sb._M_out_beg), + _M_out_cur(__sb._M_out_cur), _M_out_end(__sb._M_out_cur), + _M_buf_locale(__sb._M_buf_locale) + { } + + __streambuf_type& + operator=(const __streambuf_type&) { return *this; }; + }; + + + template<> + streamsize + __copy_streambufs_eof(basic_streambuf* __sbin, + basic_streambuf* __sbout, bool& __ineof); + + template<> + streamsize + __copy_streambufs_eof(basic_streambuf* __sbin, + basic_streambuf* __sbout, bool& __ineof); + + +} + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/streambuf.tcc" 1 3 +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/streambuf.tcc" 3 +#define _STREAMBUF_TCC 1 + + +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/streambuf.tcc" 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + streamsize + basic_streambuf<_CharT, _Traits>:: + xsgetn(char_type* __s, streamsize __n) + { + streamsize __ret = 0; + while (__ret < __n) + { + const streamsize __buf_len = this->egptr() - this->gptr(); + if (__buf_len) + { + const streamsize __remaining = __n - __ret; + const streamsize __len = std::min(__buf_len, __remaining); + traits_type::copy(__s, this->gptr(), __len); + __ret += __len; + __s += __len; + this->gbump(__len); + } + + if (__ret < __n) + { + const int_type __c = this->uflow(); + if (!traits_type::eq_int_type(__c, traits_type::eof())) + { + traits_type::assign(*__s++, traits_type::to_char_type(__c)); + ++__ret; + } + else + break; + } + } + return __ret; + } + + template + streamsize + basic_streambuf<_CharT, _Traits>:: + xsputn(const char_type* __s, streamsize __n) + { + streamsize __ret = 0; + while (__ret < __n) + { + const streamsize __buf_len = this->epptr() - this->pptr(); + if (__buf_len) + { + const streamsize __remaining = __n - __ret; + const streamsize __len = std::min(__buf_len, __remaining); + traits_type::copy(this->pptr(), __s, __len); + __ret += __len; + __s += __len; + this->pbump(__len); + } + + if (__ret < __n) + { + int_type __c = this->overflow(traits_type::to_int_type(*__s)); + if (!traits_type::eq_int_type(__c, traits_type::eof())) + { + ++__ret; + ++__s; + } + else + break; + } + } + return __ret; + } + + + + + template + streamsize + __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>* __sbin, + basic_streambuf<_CharT, _Traits>* __sbout, + bool& __ineof) + { + streamsize __ret = 0; + __ineof = true; + typename _Traits::int_type __c = __sbin->sgetc(); + while (!_Traits::eq_int_type(__c, _Traits::eof())) + { + __c = __sbout->sputc(_Traits::to_char_type(__c)); + if (_Traits::eq_int_type(__c, _Traits::eof())) + { + __ineof = false; + break; + } + ++__ret; + __c = __sbin->snextc(); + } + return __ret; + } + + template + inline streamsize + __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, + basic_streambuf<_CharT, _Traits>* __sbout) + { + bool __ineof; + return __copy_streambufs_eof(__sbin, __sbout, __ineof); + } + + + + + + extern template class basic_streambuf; + extern template + streamsize + __copy_streambufs(basic_streambuf*, + basic_streambuf*); + extern template + streamsize + __copy_streambufs_eof(basic_streambuf*, + basic_streambuf*, bool&); + + + extern template class basic_streambuf; + extern template + streamsize + __copy_streambufs(basic_streambuf*, + basic_streambuf*); + extern template + streamsize + __copy_streambufs_eof(basic_streambuf*, + basic_streambuf*, bool&); + + + +} +# 800 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/streambuf" 2 3 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ios" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_ios.h" 1 3 +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_ios.h" 3 +#define _BASIC_IOS_H 1 + + +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_ios.h" 3 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 +#define _LOCALE_FACETS_H 1 + + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cwctype" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cwctype" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cwctype" 3 + + + + +# 1 "/usr/include/wctype.h" 1 3 4 +# 30 "/usr/include/wctype.h" 3 4 +#define _WCTYPE_H 1 + + +#define __need_wint_t +# 1 "/usr/include/wchar.h" 1 3 4 +# 896 "/usr/include/wchar.h" 3 4 +#undef __need_mbstate_t +#undef __need_wint_t +# 35 "/usr/include/wctype.h" 2 3 4 + + + + + + + +#undef __need_iswxxx + + + + + +#define __iswxxx_defined 1 + + + + +typedef unsigned long int wctype_t; + +# 65 "/usr/include/wctype.h" 3 4 +#define _ISwbit(bit) ((bit) < 8 ? (int) ((1UL << (bit)) << 24) : ((bit) < 16 ? (int) ((1UL << (bit)) << 8) : ((bit) < 24 ? (int) ((1UL << (bit)) >> 8) : (int) ((1UL << (bit)) >> 24)))) + + + + + + +enum +{ + __ISwupper = 0, + __ISwlower = 1, + __ISwalpha = 2, + __ISwdigit = 3, + __ISwxdigit = 4, + __ISwspace = 5, + __ISwprint = 6, + __ISwgraph = 7, + __ISwblank = 8, + __ISwcntrl = 9, + __ISwpunct = 10, + __ISwalnum = 11, + + _ISwupper = ((__ISwupper) < 8 ? (int) ((1UL << (__ISwupper)) << 24) : ((__ISwupper) < 16 ? (int) ((1UL << (__ISwupper)) << 8) : ((__ISwupper) < 24 ? (int) ((1UL << (__ISwupper)) >> 8) : (int) ((1UL << (__ISwupper)) >> 24)))), + _ISwlower = ((__ISwlower) < 8 ? (int) ((1UL << (__ISwlower)) << 24) : ((__ISwlower) < 16 ? (int) ((1UL << (__ISwlower)) << 8) : ((__ISwlower) < 24 ? (int) ((1UL << (__ISwlower)) >> 8) : (int) ((1UL << (__ISwlower)) >> 24)))), + _ISwalpha = ((__ISwalpha) < 8 ? (int) ((1UL << (__ISwalpha)) << 24) : ((__ISwalpha) < 16 ? (int) ((1UL << (__ISwalpha)) << 8) : ((__ISwalpha) < 24 ? (int) ((1UL << (__ISwalpha)) >> 8) : (int) ((1UL << (__ISwalpha)) >> 24)))), + _ISwdigit = ((__ISwdigit) < 8 ? (int) ((1UL << (__ISwdigit)) << 24) : ((__ISwdigit) < 16 ? (int) ((1UL << (__ISwdigit)) << 8) : ((__ISwdigit) < 24 ? (int) ((1UL << (__ISwdigit)) >> 8) : (int) ((1UL << (__ISwdigit)) >> 24)))), + _ISwxdigit = ((__ISwxdigit) < 8 ? (int) ((1UL << (__ISwxdigit)) << 24) : ((__ISwxdigit) < 16 ? (int) ((1UL << (__ISwxdigit)) << 8) : ((__ISwxdigit) < 24 ? (int) ((1UL << (__ISwxdigit)) >> 8) : (int) ((1UL << (__ISwxdigit)) >> 24)))), + _ISwspace = ((__ISwspace) < 8 ? (int) ((1UL << (__ISwspace)) << 24) : ((__ISwspace) < 16 ? (int) ((1UL << (__ISwspace)) << 8) : ((__ISwspace) < 24 ? (int) ((1UL << (__ISwspace)) >> 8) : (int) ((1UL << (__ISwspace)) >> 24)))), + _ISwprint = ((__ISwprint) < 8 ? (int) ((1UL << (__ISwprint)) << 24) : ((__ISwprint) < 16 ? (int) ((1UL << (__ISwprint)) << 8) : ((__ISwprint) < 24 ? (int) ((1UL << (__ISwprint)) >> 8) : (int) ((1UL << (__ISwprint)) >> 24)))), + _ISwgraph = ((__ISwgraph) < 8 ? (int) ((1UL << (__ISwgraph)) << 24) : ((__ISwgraph) < 16 ? (int) ((1UL << (__ISwgraph)) << 8) : ((__ISwgraph) < 24 ? (int) ((1UL << (__ISwgraph)) >> 8) : (int) ((1UL << (__ISwgraph)) >> 24)))), + _ISwblank = ((__ISwblank) < 8 ? (int) ((1UL << (__ISwblank)) << 24) : ((__ISwblank) < 16 ? (int) ((1UL << (__ISwblank)) << 8) : ((__ISwblank) < 24 ? (int) ((1UL << (__ISwblank)) >> 8) : (int) ((1UL << (__ISwblank)) >> 24)))), + _ISwcntrl = ((__ISwcntrl) < 8 ? (int) ((1UL << (__ISwcntrl)) << 24) : ((__ISwcntrl) < 16 ? (int) ((1UL << (__ISwcntrl)) << 8) : ((__ISwcntrl) < 24 ? (int) ((1UL << (__ISwcntrl)) >> 8) : (int) ((1UL << (__ISwcntrl)) >> 24)))), + _ISwpunct = ((__ISwpunct) < 8 ? (int) ((1UL << (__ISwpunct)) << 24) : ((__ISwpunct) < 16 ? (int) ((1UL << (__ISwpunct)) << 8) : ((__ISwpunct) < 24 ? (int) ((1UL << (__ISwpunct)) >> 8) : (int) ((1UL << (__ISwpunct)) >> 24)))), + _ISwalnum = ((__ISwalnum) < 8 ? (int) ((1UL << (__ISwalnum)) << 24) : ((__ISwalnum) < 16 ? (int) ((1UL << (__ISwalnum)) << 8) : ((__ISwalnum) < 24 ? (int) ((1UL << (__ISwalnum)) >> 8) : (int) ((1UL << (__ISwalnum)) >> 24)))) +}; + + + +extern "C" { + + + + + + + + +extern int iswalnum (wint_t __wc) throw (); + + + + + +extern int iswalpha (wint_t __wc) throw (); + + +extern int iswcntrl (wint_t __wc) throw (); + + + +extern int iswdigit (wint_t __wc) throw (); + + + +extern int iswgraph (wint_t __wc) throw (); + + + + +extern int iswlower (wint_t __wc) throw (); + + +extern int iswprint (wint_t __wc) throw (); + + + + +extern int iswpunct (wint_t __wc) throw (); + + + + +extern int iswspace (wint_t __wc) throw (); + + + + +extern int iswupper (wint_t __wc) throw (); + + + + +extern int iswxdigit (wint_t __wc) throw (); + + + + + +extern int iswblank (wint_t __wc) throw (); +# 172 "/usr/include/wctype.h" 3 4 +extern wctype_t wctype (__const char *__property) throw (); + + + +extern int iswctype (wint_t __wc, wctype_t __desc) throw (); + + + + + + + + + + +typedef __const __int32_t *wctrans_t; + + + + + + + +extern wint_t towlower (wint_t __wc) throw (); + + +extern wint_t towupper (wint_t __wc) throw (); + + +} +# 214 "/usr/include/wctype.h" 3 4 +extern "C" { + + + + +extern wctrans_t wctrans (__const char *__property) throw (); + + +extern wint_t towctrans (wint_t __wc, wctrans_t __desc) throw (); + + + + + + + + +extern int iswalnum_l (wint_t __wc, __locale_t __locale) throw (); + + + + + +extern int iswalpha_l (wint_t __wc, __locale_t __locale) throw (); + + +extern int iswcntrl_l (wint_t __wc, __locale_t __locale) throw (); + + + +extern int iswdigit_l (wint_t __wc, __locale_t __locale) throw (); + + + +extern int iswgraph_l (wint_t __wc, __locale_t __locale) throw (); + + + + +extern int iswlower_l (wint_t __wc, __locale_t __locale) throw (); + + +extern int iswprint_l (wint_t __wc, __locale_t __locale) throw (); + + + + +extern int iswpunct_l (wint_t __wc, __locale_t __locale) throw (); + + + + +extern int iswspace_l (wint_t __wc, __locale_t __locale) throw (); + + + + +extern int iswupper_l (wint_t __wc, __locale_t __locale) throw (); + + + + +extern int iswxdigit_l (wint_t __wc, __locale_t __locale) throw (); + + + + +extern int iswblank_l (wint_t __wc, __locale_t __locale) throw (); + + + +extern wctype_t wctype_l (__const char *__property, __locale_t __locale) + throw (); + + + +extern int iswctype_l (wint_t __wc, wctype_t __desc, __locale_t __locale) + throw (); + + + + + + + +extern wint_t towlower_l (wint_t __wc, __locale_t __locale) throw (); + + +extern wint_t towupper_l (wint_t __wc, __locale_t __locale) throw (); + + + +extern wctrans_t wctrans_l (__const char *__property, __locale_t __locale) + throw (); + + +extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc, + __locale_t __locale) throw (); + + + +} +# 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cwctype" 2 3 + + + +#define _GLIBCXX_CWCTYPE 1 + + +#undef iswalnum +#undef iswalpha + +#undef iswblank + +#undef iswcntrl +#undef iswctype +#undef iswdigit +#undef iswgraph +#undef iswlower +#undef iswprint +#undef iswpunct +#undef iswspace +#undef iswupper +#undef iswxdigit +#undef towctrans +#undef towlower +#undef towupper +#undef wctrans +#undef wctype + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + using ::wctrans_t; + using ::wctype_t; + using ::wint_t; + + using ::iswalnum; + using ::iswalpha; + + using ::iswblank; + + using ::iswcntrl; + using ::iswctype; + using ::iswdigit; + using ::iswgraph; + using ::iswlower; + using ::iswprint; + using ::iswpunct; + using ::iswspace; + using ::iswupper; + using ::iswxdigit; + using ::towctrans; + using ::towlower; + using ::towupper; + using ::wctrans; + using ::wctype; + +} +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cctype" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cctype" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cctype" 3 +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/ctype_base.h" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/ctype_base.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + + struct ctype_base + { + + typedef const int* __to_type; + + + + typedef unsigned short mask; + static const mask upper = _ISupper; + static const mask lower = _ISlower; + static const mask alpha = _ISalpha; + static const mask digit = _ISdigit; + static const mask xdigit = _ISxdigit; + static const mask space = _ISspace; + static const mask print = _ISprint; + static const mask graph = _ISalpha | _ISdigit | _ISpunct; + static const mask cntrl = _IScntrl; + static const mask punct = _ISpunct; + static const mask alnum = _ISalpha | _ISdigit; + }; + +} +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 2 3 + + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/streambuf_iterator.h" 1 3 +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/streambuf_iterator.h" 3 +#define _STREAMBUF_ITERATOR_H 1 + + +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/streambuf_iterator.h" 3 + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 49 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/streambuf_iterator.h" 3 + template + class istreambuf_iterator + : public iterator + { + public: + + + + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename _Traits::int_type int_type; + typedef basic_streambuf<_CharT, _Traits> streambuf_type; + typedef basic_istream<_CharT, _Traits> istream_type; + + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + ostreambuf_iterator<_CharT2> >::__type + copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + ostreambuf_iterator<_CharT2>); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + _CharT2*>::__type + __copy_move_a2(istreambuf_iterator<_CharT2>, + istreambuf_iterator<_CharT2>, _CharT2*); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + istreambuf_iterator<_CharT2> >::__type + find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + const _CharT2&); + + private: + + + + + + + + mutable streambuf_type* _M_sbuf; + mutable int_type _M_c; + + public: + + istreambuf_iterator() throw() + : _M_sbuf(0), _M_c(traits_type::eof()) { } + + + istreambuf_iterator(istream_type& __s) throw() + : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { } + + + istreambuf_iterator(streambuf_type* __s) throw() + : _M_sbuf(__s), _M_c(traits_type::eof()) { } + + + + + char_type + operator*() const + { + + + + + + + + return traits_type::to_char_type(_M_get()); + } + + + istreambuf_iterator& + operator++() + { + + + ; + if (_M_sbuf) + { + _M_sbuf->sbumpc(); + _M_c = traits_type::eof(); + } + return *this; + } + + + istreambuf_iterator + operator++(int) + { + + + ; + + istreambuf_iterator __old = *this; + if (_M_sbuf) + { + __old._M_c = _M_sbuf->sbumpc(); + _M_c = traits_type::eof(); + } + return __old; + } + + + + + + bool + equal(const istreambuf_iterator& __b) const + { return _M_at_eof() == __b._M_at_eof(); } + + private: + int_type + _M_get() const + { + const int_type __eof = traits_type::eof(); + int_type __ret = __eof; + if (_M_sbuf) + { + if (!traits_type::eq_int_type(_M_c, __eof)) + __ret = _M_c; + else if (!traits_type::eq_int_type((__ret = _M_sbuf->sgetc()), + __eof)) + _M_c = __ret; + else + _M_sbuf = 0; + } + return __ret; + } + + bool + _M_at_eof() const + { + const int_type __eof = traits_type::eof(); + return traits_type::eq_int_type(_M_get(), __eof); + } + }; + + template + inline bool + operator==(const istreambuf_iterator<_CharT, _Traits>& __a, + const istreambuf_iterator<_CharT, _Traits>& __b) + { return __a.equal(__b); } + + template + inline bool + operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, + const istreambuf_iterator<_CharT, _Traits>& __b) + { return !__a.equal(__b); } + + + template + class ostreambuf_iterator + : public iterator + { + public: + + + + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_streambuf<_CharT, _Traits> streambuf_type; + typedef basic_ostream<_CharT, _Traits> ostream_type; + + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + ostreambuf_iterator<_CharT2> >::__type + copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + ostreambuf_iterator<_CharT2>); + + private: + streambuf_type* _M_sbuf; + bool _M_failed; + + public: + + ostreambuf_iterator(ostream_type& __s) throw () + : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { } + + + ostreambuf_iterator(streambuf_type* __s) throw () + : _M_sbuf(__s), _M_failed(!_M_sbuf) { } + + + ostreambuf_iterator& + operator=(_CharT __c) + { + if (!_M_failed && + _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof())) + _M_failed = true; + return *this; + } + + + ostreambuf_iterator& + operator*() + { return *this; } + + + ostreambuf_iterator& + operator++(int) + { return *this; } + + + ostreambuf_iterator& + operator++() + { return *this; } + + + bool + failed() const throw() + { return _M_failed; } + + ostreambuf_iterator& + _M_put(const _CharT* __ws, streamsize __len) + { + if (__builtin_expect(!_M_failed, true) + && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len, + false)) + _M_failed = true; + return *this; + } + }; + + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT> >::__type + copy(istreambuf_iterator<_CharT> __first, + istreambuf_iterator<_CharT> __last, + ostreambuf_iterator<_CharT> __result) + { + if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed) + { + bool __ineof; + __copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof); + if (!__ineof) + __result._M_failed = true; + } + return __result; + } + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT> >::__type + __copy_move_a2(_CharT* __first, _CharT* __last, + ostreambuf_iterator<_CharT> __result) + { + const streamsize __num = __last - __first; + if (__num > 0) + __result._M_put(__first, __num); + return __result; + } + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT> >::__type + __copy_move_a2(const _CharT* __first, const _CharT* __last, + ostreambuf_iterator<_CharT> __result) + { + const streamsize __num = __last - __first; + if (__num > 0) + __result._M_put(__first, __num); + return __result; + } + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + _CharT*>::__type + __copy_move_a2(istreambuf_iterator<_CharT> __first, + istreambuf_iterator<_CharT> __last, _CharT* __result) + { + typedef istreambuf_iterator<_CharT> __is_iterator_type; + typedef typename __is_iterator_type::traits_type traits_type; + typedef typename __is_iterator_type::streambuf_type streambuf_type; + typedef typename traits_type::int_type int_type; + + if (__first._M_sbuf && !__last._M_sbuf) + { + streambuf_type* __sb = __first._M_sbuf; + int_type __c = __sb->sgetc(); + while (!traits_type::eq_int_type(__c, traits_type::eof())) + { + const streamsize __n = __sb->egptr() - __sb->gptr(); + if (__n > 1) + { + traits_type::copy(__result, __sb->gptr(), __n); + __sb->gbump(__n); + __result += __n; + __c = __sb->underflow(); + } + else + { + *__result++ = traits_type::to_char_type(__c); + __c = __sb->snextc(); + } + } + } + return __result; + } + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + istreambuf_iterator<_CharT> >::__type + find(istreambuf_iterator<_CharT> __first, + istreambuf_iterator<_CharT> __last, const _CharT& __val) + { + typedef istreambuf_iterator<_CharT> __is_iterator_type; + typedef typename __is_iterator_type::traits_type traits_type; + typedef typename __is_iterator_type::streambuf_type streambuf_type; + typedef typename traits_type::int_type int_type; + + if (__first._M_sbuf && !__last._M_sbuf) + { + const int_type __ival = traits_type::to_int_type(__val); + streambuf_type* __sb = __first._M_sbuf; + int_type __c = __sb->sgetc(); + while (!traits_type::eq_int_type(__c, traits_type::eof()) + && !traits_type::eq_int_type(__c, __ival)) + { + streamsize __n = __sb->egptr() - __sb->gptr(); + if (__n > 1) + { + const _CharT* __p = traits_type::find(__sb->gptr(), + __n, __val); + if (__p) + __n = __p - __sb->gptr(); + __sb->gbump(__n); + __c = __sb->sgetc(); + } + else + __c = __sb->snextc(); + } + + if (!traits_type::eq_int_type(__c, traits_type::eof())) + __first._M_c = __c; + else + __first._M_sbuf = 0; + } + return __first; + } + + + +} +# 51 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + +#define _GLIBCXX_NUM_FACETS 28 + + + + + + + + template + void + __convert_to_v(const char*, _Tp&, ios_base::iostate&, + const __c_locale&) throw(); + + + template<> + void + __convert_to_v(const char*, float&, ios_base::iostate&, + const __c_locale&) throw(); + + template<> + void + __convert_to_v(const char*, double&, ios_base::iostate&, + const __c_locale&) throw(); + + template<> + void + __convert_to_v(const char*, long double&, ios_base::iostate&, + const __c_locale&) throw(); + + + + template + struct __pad + { + static void + _S_pad(ios_base& __io, _CharT __fill, _CharT* __news, + const _CharT* __olds, streamsize __newlen, streamsize __oldlen); + }; + + + + + + + template + _CharT* + __add_grouping(_CharT* __s, _CharT __sep, + const char* __gbeg, size_t __gsize, + const _CharT* __first, const _CharT* __last); + + + + + template + inline + ostreambuf_iterator<_CharT> + __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len) + { + __s._M_put(__ws, __len); + return __s; + } + + + template + inline + _OutIter + __write(_OutIter __s, const _CharT* __ws, int __len) + { + for (int __j = 0; __j < __len; __j++, ++__s) + *__s = __ws[__j]; + return __s; + } +# 142 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + template + class __ctype_abstract_base : public locale::facet, public ctype_base + { + public: + + + typedef _CharT char_type; +# 160 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + bool + is(mask __m, char_type __c) const + { return this->do_is(__m, __c); } +# 177 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + is(const char_type *__lo, const char_type *__hi, mask *__vec) const + { return this->do_is(__lo, __hi, __vec); } +# 193 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + scan_is(mask __m, const char_type* __lo, const char_type* __hi) const + { return this->do_scan_is(__m, __lo, __hi); } +# 209 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + scan_not(mask __m, const char_type* __lo, const char_type* __hi) const + { return this->do_scan_not(__m, __lo, __hi); } +# 223 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + char_type + toupper(char_type __c) const + { return this->do_toupper(__c); } +# 238 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + toupper(char_type *__lo, const char_type* __hi) const + { return this->do_toupper(__lo, __hi); } +# 252 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + char_type + tolower(char_type __c) const + { return this->do_tolower(__c); } +# 267 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + tolower(char_type* __lo, const char_type* __hi) const + { return this->do_tolower(__lo, __hi); } +# 284 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + char_type + widen(char __c) const + { return this->do_widen(__c); } +# 303 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + const char* + widen(const char* __lo, const char* __hi, char_type* __to) const + { return this->do_widen(__lo, __hi, __to); } +# 322 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + char + narrow(char_type __c, char __dfault) const + { return this->do_narrow(__c, __dfault); } +# 344 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char *__to) const + { return this->do_narrow(__lo, __hi, __dfault, __to); } + + protected: + explicit + __ctype_abstract_base(size_t __refs = 0): facet(__refs) { } + + virtual + ~__ctype_abstract_base() { } +# 369 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual bool + do_is(mask __m, char_type __c) const = 0; +# 388 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_is(const char_type* __lo, const char_type* __hi, + mask* __vec) const = 0; +# 407 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_scan_is(mask __m, const char_type* __lo, + const char_type* __hi) const = 0; +# 426 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_scan_not(mask __m, const char_type* __lo, + const char_type* __hi) const = 0; +# 444 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_toupper(char_type) const = 0; +# 461 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const = 0; +# 477 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_tolower(char_type) const = 0; +# 494 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const = 0; +# 513 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_widen(char) const = 0; +# 534 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual const char* + do_widen(const char* __lo, const char* __hi, + char_type* __dest) const = 0; +# 556 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual char + do_narrow(char_type, char __dfault) const = 0; +# 580 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char* __dest) const = 0; + }; +# 603 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + template + class ctype : public __ctype_abstract_base<_CharT> + { + public: + + typedef _CharT char_type; + typedef typename __ctype_abstract_base<_CharT>::mask mask; + + + static locale::id id; + + explicit + ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { } + + protected: + virtual + ~ctype(); + + virtual bool + do_is(mask __m, char_type __c) const; + + virtual const char_type* + do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; + + virtual const char_type* + do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; + + virtual const char_type* + do_scan_not(mask __m, const char_type* __lo, + const char_type* __hi) const; + + virtual char_type + do_toupper(char_type __c) const; + + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const; + + virtual char_type + do_tolower(char_type __c) const; + + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const; + + virtual char_type + do_widen(char __c) const; + + virtual const char* + do_widen(const char* __lo, const char* __hi, char_type* __dest) const; + + virtual char + do_narrow(char_type, char __dfault) const; + + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char* __dest) const; + }; + + template + locale::id ctype<_CharT>::id; +# 672 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + template<> + class ctype : public locale::facet, public ctype_base + { + public: + + + typedef char char_type; + + protected: + + __c_locale _M_c_locale_ctype; + bool _M_del; + __to_type _M_toupper; + __to_type _M_tolower; + const mask* _M_table; + mutable char _M_widen_ok; + mutable char _M_widen[1 + static_cast(-1)]; + mutable char _M_narrow[1 + static_cast(-1)]; + mutable char _M_narrow_ok; + + + public: + + static locale::id id; + + static const size_t table_size = 1 + static_cast(-1); +# 709 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + explicit + ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0); +# 722 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + explicit + ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false, + size_t __refs = 0); +# 735 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + inline bool + is(mask __m, char __c) const; +# 750 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + inline const char* + is(const char* __lo, const char* __hi, mask* __vec) const; +# 764 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + inline const char* + scan_is(mask __m, const char* __lo, const char* __hi) const; +# 778 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + inline const char* + scan_not(mask __m, const char* __lo, const char* __hi) const; +# 793 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + char_type + toupper(char_type __c) const + { return this->do_toupper(__c); } +# 810 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + toupper(char_type *__lo, const char_type* __hi) const + { return this->do_toupper(__lo, __hi); } +# 826 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + char_type + tolower(char_type __c) const + { return this->do_tolower(__c); } +# 843 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + tolower(char_type* __lo, const char_type* __hi) const + { return this->do_tolower(__lo, __hi); } +# 863 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + char_type + widen(char __c) const + { + if (_M_widen_ok) + return _M_widen[static_cast(__c)]; + this->_M_widen_init(); + return this->do_widen(__c); + } +# 890 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + const char* + widen(const char* __lo, const char* __hi, char_type* __to) const + { + if (_M_widen_ok == 1) + { + __builtin_memcpy(__to, __lo, __hi - __lo); + return __hi; + } + if (!_M_widen_ok) + _M_widen_init(); + return this->do_widen(__lo, __hi, __to); + } +# 921 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + char + narrow(char_type __c, char __dfault) const + { + if (_M_narrow[static_cast(__c)]) + return _M_narrow[static_cast(__c)]; + const char __t = do_narrow(__c, __dfault); + if (__t != __dfault) + _M_narrow[static_cast(__c)] = __t; + return __t; + } +# 954 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char *__to) const + { + if (__builtin_expect(_M_narrow_ok == 1, true)) + { + __builtin_memcpy(__to, __lo, __hi - __lo); + return __hi; + } + if (!_M_narrow_ok) + _M_narrow_init(); + return this->do_narrow(__lo, __hi, __dfault, __to); + } + + + + + + const mask* + table() const throw() + { return _M_table; } + + + static const mask* + classic_table() throw(); + protected: + + + + + + + + virtual + ~ctype(); +# 1003 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_toupper(char_type) const; +# 1020 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const; +# 1036 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_tolower(char_type) const; +# 1053 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const; +# 1073 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_widen(char __c) const + { return __c; } +# 1096 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual const char* + do_widen(const char* __lo, const char* __hi, char_type* __dest) const + { + __builtin_memcpy(__dest, __lo, __hi - __lo); + return __hi; + } +# 1122 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual char + do_narrow(char_type __c, char) const + { return __c; } +# 1148 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char, char* __dest) const + { + __builtin_memcpy(__dest, __lo, __hi - __lo); + return __hi; + } + + private: + void _M_narrow_init() const; + void _M_widen_init() const; + }; +# 1173 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + template<> + class ctype : public __ctype_abstract_base + { + public: + + + typedef wchar_t char_type; + typedef wctype_t __wmask_type; + + protected: + __c_locale _M_c_locale_ctype; + + + bool _M_narrow_ok; + char _M_narrow[128]; + wint_t _M_widen[1 + static_cast(-1)]; + + + mask _M_bit[16]; + __wmask_type _M_wmask[16]; + + public: + + + static locale::id id; +# 1206 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + explicit + ctype(size_t __refs = 0); +# 1217 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + explicit + ctype(__c_locale __cloc, size_t __refs = 0); + + protected: + __wmask_type + _M_convert_to_wmask(const mask __m) const throw(); + + + virtual + ~ctype(); +# 1241 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual bool + do_is(mask __m, char_type __c) const; +# 1260 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; +# 1278 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; +# 1296 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_scan_not(mask __m, const char_type* __lo, + const char_type* __hi) const; +# 1313 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_toupper(char_type) const; +# 1330 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const; +# 1346 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_tolower(char_type) const; +# 1363 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const; +# 1383 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_widen(char) const; +# 1405 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual const char* + do_widen(const char* __lo, const char* __hi, char_type* __dest) const; +# 1428 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual char + do_narrow(char_type, char __dfault) const; +# 1454 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char* __dest) const; + + + void + _M_initialize_ctype() throw(); + }; + + + + template + class ctype_byname : public ctype<_CharT> + { + public: + typedef typename ctype<_CharT>::mask mask; + + explicit + ctype_byname(const char* __s, size_t __refs = 0); + + protected: + virtual + ~ctype_byname() { }; + }; + + + template<> + class ctype_byname : public ctype + { + public: + explicit + ctype_byname(const char* __s, size_t __refs = 0); + + protected: + virtual + ~ctype_byname(); + }; + + + template<> + class ctype_byname : public ctype + { + public: + explicit + ctype_byname(const char* __s, size_t __refs = 0); + + protected: + virtual + ~ctype_byname(); + }; + + +} + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/ctype_inline.h" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/ctype_inline.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) { + + bool + ctype:: + is(mask __m, char __c) const + { return _M_table[static_cast(__c)] & __m; } + + const char* + ctype:: + is(const char* __low, const char* __high, mask* __vec) const + { + while (__low < __high) + *__vec++ = _M_table[static_cast(*__low++)]; + return __high; + } + + const char* + ctype:: + scan_is(mask __m, const char* __low, const char* __high) const + { + while (__low < __high + && !(_M_table[static_cast(*__low)] & __m)) + ++__low; + return __low; + } + + const char* + ctype:: + scan_not(mask __m, const char* __low, const char* __high) const + { + while (__low < __high + && (_M_table[static_cast(*__low)] & __m) != 0) + ++__low; + return __low; + } + +} +# 1510 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + class __num_base + { + public: + + + enum + { + _S_ominus, + _S_oplus, + _S_ox, + _S_oX, + _S_odigits, + _S_odigits_end = _S_odigits + 16, + _S_oudigits = _S_odigits_end, + _S_oudigits_end = _S_oudigits + 16, + _S_oe = _S_odigits + 14, + _S_oE = _S_oudigits + 14, + _S_oend = _S_oudigits_end + }; + + + + + + + static const char* _S_atoms_out; + + + + static const char* _S_atoms_in; + + enum + { + _S_iminus, + _S_iplus, + _S_ix, + _S_iX, + _S_izero, + _S_ie = _S_izero + 14, + _S_iE = _S_izero + 20, + _S_iend = 26 + }; + + + + static void + _S_format_float(const ios_base& __io, char* __fptr, char __mod) throw(); + }; + + template + struct __numpunct_cache : public locale::facet + { + const char* _M_grouping; + size_t _M_grouping_size; + bool _M_use_grouping; + const _CharT* _M_truename; + size_t _M_truename_size; + const _CharT* _M_falsename; + size_t _M_falsename_size; + _CharT _M_decimal_point; + _CharT _M_thousands_sep; + + + + + + _CharT _M_atoms_out[__num_base::_S_oend]; + + + + + + _CharT _M_atoms_in[__num_base::_S_iend]; + + bool _M_allocated; + + __numpunct_cache(size_t __refs = 0) : facet(__refs), + _M_grouping(__null), _M_grouping_size(0), _M_use_grouping(false), + _M_truename(__null), _M_truename_size(0), _M_falsename(__null), + _M_falsename_size(0), _M_decimal_point(_CharT()), + _M_thousands_sep(_CharT()), _M_allocated(false) + { } + + ~__numpunct_cache(); + + void + _M_cache(const locale& __loc); + + private: + __numpunct_cache& + operator=(const __numpunct_cache&); + + explicit + __numpunct_cache(const __numpunct_cache&); + }; + + template + __numpunct_cache<_CharT>::~__numpunct_cache() + { + if (_M_allocated) + { + delete [] _M_grouping; + delete [] _M_truename; + delete [] _M_falsename; + } + } +# 1635 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + template + class numpunct : public locale::facet + { + public: + + + + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + typedef __numpunct_cache<_CharT> __cache_type; + + protected: + __cache_type* _M_data; + + public: + + static locale::id id; + + + + + + + explicit + numpunct(size_t __refs = 0) : facet(__refs), _M_data(__null) + { _M_initialize_numpunct(); } +# 1672 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + explicit + numpunct(__cache_type* __cache, size_t __refs = 0) + : facet(__refs), _M_data(__cache) + { _M_initialize_numpunct(); } +# 1686 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + explicit + numpunct(__c_locale __cloc, size_t __refs = 0) + : facet(__refs), _M_data(__null) + { _M_initialize_numpunct(__cloc); } +# 1700 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + char_type + decimal_point() const + { return this->do_decimal_point(); } +# 1713 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + char_type + thousands_sep() const + { return this->do_thousands_sep(); } +# 1744 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + string + grouping() const + { return this->do_grouping(); } +# 1757 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + string_type + truename() const + { return this->do_truename(); } +# 1770 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + string_type + falsename() const + { return this->do_falsename(); } + + protected: + + virtual + ~numpunct(); +# 1787 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_decimal_point() const + { return _M_data->_M_decimal_point; } +# 1799 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_thousands_sep() const + { return _M_data->_M_thousands_sep; } +# 1812 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual string + do_grouping() const + { return _M_data->_M_grouping; } +# 1825 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual string_type + do_truename() const + { return _M_data->_M_truename; } +# 1838 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual string_type + do_falsename() const + { return _M_data->_M_falsename; } + + + void + _M_initialize_numpunct(__c_locale __cloc = __null); + }; + + template + locale::id numpunct<_CharT>::id; + + template<> + numpunct::~numpunct(); + + template<> + void + numpunct::_M_initialize_numpunct(__c_locale __cloc); + + + template<> + numpunct::~numpunct(); + + template<> + void + numpunct::_M_initialize_numpunct(__c_locale __cloc); + + + + template + class numpunct_byname : public numpunct<_CharT> + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + explicit + numpunct_byname(const char* __s, size_t __refs = 0) + : numpunct<_CharT>(__refs) + { + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + __c_locale __tmp; + this->_S_create_c_locale(__tmp, __s); + this->_M_initialize_numpunct(__tmp); + this->_S_destroy_c_locale(__tmp); + } + } + + protected: + virtual + ~numpunct_byname() { } + }; + + +# 1908 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + template + class num_get : public locale::facet + { + public: + + + + typedef _CharT char_type; + typedef _InIter iter_type; + + + + static locale::id id; +# 1929 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + explicit + num_get(size_t __refs = 0) : facet(__refs) { } +# 1955 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, bool& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } +# 1991 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned short& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned int& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long long& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long long& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } +# 2050 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, float& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, double& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long double& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } +# 2092 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, void*& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + + protected: + + virtual ~num_get() { } + + iter_type + _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&, + string&) const; + + template + iter_type + _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&, + _ValueT&) const; + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, int>::__type + _M_find(const _CharT2*, size_t __len, _CharT2 __c) const + { + int __ret = -1; + if (__len <= 10) + { + if (__c >= _CharT2('0') && __c < _CharT2(_CharT2('0') + __len)) + __ret = __c - _CharT2('0'); + } + else + { + if (__c >= _CharT2('0') && __c <= _CharT2('9')) + __ret = __c - _CharT2('0'); + else if (__c >= _CharT2('a') && __c <= _CharT2('f')) + __ret = 10 + (__c - _CharT2('a')); + else if (__c >= _CharT2('A') && __c <= _CharT2('F')) + __ret = 10 + (__c - _CharT2('A')); + } + return __ret; + } + + template + typename __gnu_cxx::__enable_if::__value, + int>::__type + _M_find(const _CharT2* __zero, size_t __len, _CharT2 __c) const + { + int __ret = -1; + const char_type* __q = char_traits<_CharT2>::find(__zero, __len, __c); + if (__q) + { + __ret = __q - __zero; + if (__ret > 15) + __ret -= 6; + } + return __ret; + } +# 2163 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const; + + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned short& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned int& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + + + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long long& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long long& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + + + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + float&) const; + + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + double&) const; + + + + + + + + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + long double&) const; + + + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + void*&) const; +# 2228 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + }; + + template + locale::id num_get<_CharT, _InIter>::id; +# 2246 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + template + class num_put : public locale::facet + { + public: + + + + typedef _CharT char_type; + typedef _OutIter iter_type; + + + + static locale::id id; +# 2267 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + explicit + num_put(size_t __refs = 0) : facet(__refs) { } +# 2285 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, bool __v) const + { return this->do_put(__s, __f, __fill, __v); } +# 2327 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, long __v) const + { return this->do_put(__s, __f, __fill, __v); } + + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + unsigned long __v) const + { return this->do_put(__s, __f, __fill, __v); } + + + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, long long __v) const + { return this->do_put(__s, __f, __fill, __v); } + + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + unsigned long long __v) const + { return this->do_put(__s, __f, __fill, __v); } +# 2390 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, double __v) const + { return this->do_put(__s, __f, __fill, __v); } + + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + long double __v) const + { return this->do_put(__s, __f, __fill, __v); } +# 2415 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + const void* __v) const + { return this->do_put(__s, __f, __fill, __v); } + + protected: + template + iter_type + _M_insert_float(iter_type, ios_base& __io, char_type __fill, + char __mod, _ValueT __v) const; + + void + _M_group_float(const char* __grouping, size_t __grouping_size, + char_type __sep, const char_type* __p, char_type* __new, + char_type* __cs, int& __len) const; + + template + iter_type + _M_insert_int(iter_type, ios_base& __io, char_type __fill, + _ValueT __v) const; + + void + _M_group_int(const char* __grouping, size_t __grouping_size, + char_type __sep, ios_base& __io, char_type* __new, + char_type* __cs, int& __len) const; + + void + _M_pad(char_type __fill, streamsize __w, ios_base& __io, + char_type* __new, const char_type* __cs, int& __len) const; + + + virtual + ~num_put() { }; +# 2463 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 3 + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, bool __v) const; + + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const + { return _M_insert_int(__s, __io, __fill, __v); } + + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, + unsigned long __v) const + { return _M_insert_int(__s, __io, __fill, __v); } + + + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, + long long __v) const + { return _M_insert_int(__s, __io, __fill, __v); } + + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, + unsigned long long __v) const + { return _M_insert_int(__s, __io, __fill, __v); } + + + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, double __v) const; + + + + + + + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, long double __v) const; + + + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, const void* __v) const; + + + + + + + + }; + + template + locale::id num_put<_CharT, _OutIter>::id; + + + + + + + + + + template + inline bool + isspace(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::space, __c); } + + + template + inline bool + isprint(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::print, __c); } + + + template + inline bool + iscntrl(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::cntrl, __c); } + + + template + inline bool + isupper(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::upper, __c); } + + + template + inline bool + islower(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::lower, __c); } + + + template + inline bool + isalpha(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::alpha, __c); } + + + template + inline bool + isdigit(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::digit, __c); } + + + template + inline bool + ispunct(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::punct, __c); } + + + template + inline bool + isxdigit(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::xdigit, __c); } + + + template + inline bool + isalnum(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::alnum, __c); } + + + template + inline bool + isgraph(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::graph, __c); } + + + template + inline _CharT + toupper(_CharT __c, const locale& __loc) + { return use_facet >(__loc).toupper(__c); } + + + template + inline _CharT + tolower(_CharT __c, const locale& __loc) + { return use_facet >(__loc).tolower(__c); } + +} + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.tcc" 1 3 +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.tcc" 3 +#define _LOCALE_FACETS_TCC 1 + + +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.tcc" 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + + template + struct __use_cache + { + const _Facet* + operator() (const locale& __loc) const; + }; + + + template + struct __use_cache<__numpunct_cache<_CharT> > + { + const __numpunct_cache<_CharT>* + operator() (const locale& __loc) const + { + const size_t __i = numpunct<_CharT>::id._M_id(); + const locale::facet** __caches = __loc._M_impl->_M_caches; + if (!__caches[__i]) + { + __numpunct_cache<_CharT>* __tmp = __null; + try + { + __tmp = new __numpunct_cache<_CharT>; + __tmp->_M_cache(__loc); + } + catch(...) + { + delete __tmp; + throw; + } + __loc._M_impl->_M_install_cache(__tmp, __i); + } + return static_cast*>(__caches[__i]); + } + }; + + template + void + __numpunct_cache<_CharT>::_M_cache(const locale& __loc) + { + _M_allocated = true; + + const numpunct<_CharT>& __np = use_facet >(__loc); + + char* __grouping = 0; + _CharT* __truename = 0; + _CharT* __falsename = 0; + try + { + _M_grouping_size = __np.grouping().size(); + __grouping = new char[_M_grouping_size]; + __np.grouping().copy(__grouping, _M_grouping_size); + _M_grouping = __grouping; + _M_use_grouping = (_M_grouping_size + && static_cast(_M_grouping[0]) > 0 + && (_M_grouping[0] + != __gnu_cxx::__numeric_traits::__max)); + + _M_truename_size = __np.truename().size(); + __truename = new _CharT[_M_truename_size]; + __np.truename().copy(__truename, _M_truename_size); + _M_truename = __truename; + + _M_falsename_size = __np.falsename().size(); + __falsename = new _CharT[_M_falsename_size]; + __np.falsename().copy(__falsename, _M_falsename_size); + _M_falsename = __falsename; + + _M_decimal_point = __np.decimal_point(); + _M_thousands_sep = __np.thousands_sep(); + + const ctype<_CharT>& __ct = use_facet >(__loc); + __ct.widen(__num_base::_S_atoms_out, + __num_base::_S_atoms_out + + __num_base::_S_oend, _M_atoms_out); + __ct.widen(__num_base::_S_atoms_in, + __num_base::_S_atoms_in + + __num_base::_S_iend, _M_atoms_in); + } + catch(...) + { + delete [] __grouping; + delete [] __truename; + delete [] __falsename; + throw; + } + } +# 136 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.tcc" 3 + __attribute__ ((__pure__)) bool + __verify_grouping(const char* __grouping, size_t __grouping_size, + const string& __grouping_tmp) throw (); + + + + template + _InIter + num_get<_CharT, _InIter>:: + _M_extract_float(_InIter __beg, _InIter __end, ios_base& __io, + ios_base::iostate& __err, string& __xtrc) const + { + typedef char_traits<_CharT> __traits_type; + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + const _CharT* __lit = __lc->_M_atoms_in; + char_type __c = char_type(); + + + bool __testeof = __beg == __end; + + + if (!__testeof) + { + __c = *__beg; + const bool __plus = __c == __lit[__num_base::_S_iplus]; + if ((__plus || __c == __lit[__num_base::_S_iminus]) + && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + && !(__c == __lc->_M_decimal_point)) + { + __xtrc += __plus ? '+' : '-'; + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + } + + + bool __found_mantissa = false; + int __sep_pos = 0; + while (!__testeof) + { + if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + || __c == __lc->_M_decimal_point) + break; + else if (__c == __lit[__num_base::_S_izero]) + { + if (!__found_mantissa) + { + __xtrc += '0'; + __found_mantissa = true; + } + ++__sep_pos; + + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + else + break; + } + + + bool __found_dec = false; + bool __found_sci = false; + string __found_grouping; + if (__lc->_M_use_grouping) + __found_grouping.reserve(32); + const char_type* __lit_zero = __lit + __num_base::_S_izero; + + if (!__lc->_M_allocated) + + while (!__testeof) + { + const int __digit = _M_find(__lit_zero, 10, __c); + if (__digit != -1) + { + __xtrc += '0' + __digit; + __found_mantissa = true; + } + else if (__c == __lc->_M_decimal_point + && !__found_dec && !__found_sci) + { + __xtrc += '.'; + __found_dec = true; + } + else if ((__c == __lit[__num_base::_S_ie] + || __c == __lit[__num_base::_S_iE]) + && !__found_sci && __found_mantissa) + { + + __xtrc += 'e'; + __found_sci = true; + + + if (++__beg != __end) + { + __c = *__beg; + const bool __plus = __c == __lit[__num_base::_S_iplus]; + if (__plus || __c == __lit[__num_base::_S_iminus]) + __xtrc += __plus ? '+' : '-'; + else + continue; + } + else + { + __testeof = true; + break; + } + } + else + break; + + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + else + while (!__testeof) + { + + + if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + { + if (!__found_dec && !__found_sci) + { + + + if (__sep_pos) + { + __found_grouping += static_cast(__sep_pos); + __sep_pos = 0; + } + else + { + + + __xtrc.clear(); + break; + } + } + else + break; + } + else if (__c == __lc->_M_decimal_point) + { + if (!__found_dec && !__found_sci) + { + + + + if (__found_grouping.size()) + __found_grouping += static_cast(__sep_pos); + __xtrc += '.'; + __found_dec = true; + } + else + break; + } + else + { + const char_type* __q = + __traits_type::find(__lit_zero, 10, __c); + if (__q) + { + __xtrc += '0' + (__q - __lit_zero); + __found_mantissa = true; + ++__sep_pos; + } + else if ((__c == __lit[__num_base::_S_ie] + || __c == __lit[__num_base::_S_iE]) + && !__found_sci && __found_mantissa) + { + + if (__found_grouping.size() && !__found_dec) + __found_grouping += static_cast(__sep_pos); + __xtrc += 'e'; + __found_sci = true; + + + if (++__beg != __end) + { + __c = *__beg; + const bool __plus = __c == __lit[__num_base::_S_iplus]; + if ((__plus || __c == __lit[__num_base::_S_iminus]) + && !(__lc->_M_use_grouping + && __c == __lc->_M_thousands_sep) + && !(__c == __lc->_M_decimal_point)) + __xtrc += __plus ? '+' : '-'; + else + continue; + } + else + { + __testeof = true; + break; + } + } + else + break; + } + + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + + + + if (__found_grouping.size()) + { + + if (!__found_dec && !__found_sci) + __found_grouping += static_cast(__sep_pos); + + if (!std::__verify_grouping(__lc->_M_grouping, + __lc->_M_grouping_size, + __found_grouping)) + __err = ios_base::failbit; + } + + return __beg; + } + + template + template + _InIter + num_get<_CharT, _InIter>:: + _M_extract_int(_InIter __beg, _InIter __end, ios_base& __io, + ios_base::iostate& __err, _ValueT& __v) const + { + typedef char_traits<_CharT> __traits_type; + using __gnu_cxx::__add_unsigned; + typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + const _CharT* __lit = __lc->_M_atoms_in; + char_type __c = char_type(); + + + const ios_base::fmtflags __basefield = __io.flags() + & ios_base::basefield; + const bool __oct = __basefield == ios_base::oct; + int __base = __oct ? 8 : (__basefield == ios_base::hex ? 16 : 10); + + + bool __testeof = __beg == __end; + + + bool __negative = false; + if (!__testeof) + { + __c = *__beg; + __negative = __c == __lit[__num_base::_S_iminus]; + if ((__negative || __c == __lit[__num_base::_S_iplus]) + && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + && !(__c == __lc->_M_decimal_point)) + { + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + } + + + + bool __found_zero = false; + int __sep_pos = 0; + while (!__testeof) + { + if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + || __c == __lc->_M_decimal_point) + break; + else if (__c == __lit[__num_base::_S_izero] + && (!__found_zero || __base == 10)) + { + __found_zero = true; + ++__sep_pos; + if (__basefield == 0) + __base = 8; + if (__base == 8) + __sep_pos = 0; + } + else if (__found_zero + && (__c == __lit[__num_base::_S_ix] + || __c == __lit[__num_base::_S_iX])) + { + if (__basefield == 0) + __base = 16; + if (__base == 16) + { + __found_zero = false; + __sep_pos = 0; + } + else + break; + } + else + break; + + if (++__beg != __end) + { + __c = *__beg; + if (!__found_zero) + break; + } + else + __testeof = true; + } + + + + const size_t __len = (__base == 16 ? __num_base::_S_iend + - __num_base::_S_izero : __base); + + + string __found_grouping; + if (__lc->_M_use_grouping) + __found_grouping.reserve(32); + bool __testfail = false; + bool __testoverflow = false; + const __unsigned_type __max = + (__negative && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) + ? -__gnu_cxx::__numeric_traits<_ValueT>::__min + : __gnu_cxx::__numeric_traits<_ValueT>::__max; + const __unsigned_type __smax = __max / __base; + __unsigned_type __result = 0; + int __digit = 0; + const char_type* __lit_zero = __lit + __num_base::_S_izero; + + if (!__lc->_M_allocated) + + while (!__testeof) + { + __digit = _M_find(__lit_zero, __len, __c); + if (__digit == -1) + break; + + if (__result > __smax) + __testoverflow = true; + else + { + __result *= __base; + __testoverflow |= __result > __max - __digit; + __result += __digit; + ++__sep_pos; + } + + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + else + while (!__testeof) + { + + + if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + { + + + if (__sep_pos) + { + __found_grouping += static_cast(__sep_pos); + __sep_pos = 0; + } + else + { + __testfail = true; + break; + } + } + else if (__c == __lc->_M_decimal_point) + break; + else + { + const char_type* __q = + __traits_type::find(__lit_zero, __len, __c); + if (!__q) + break; + + __digit = __q - __lit_zero; + if (__digit > 15) + __digit -= 6; + if (__result > __smax) + __testoverflow = true; + else + { + __result *= __base; + __testoverflow |= __result > __max - __digit; + __result += __digit; + ++__sep_pos; + } + } + + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + + + + if (__found_grouping.size()) + { + + __found_grouping += static_cast(__sep_pos); + + if (!std::__verify_grouping(__lc->_M_grouping, + __lc->_M_grouping_size, + __found_grouping)) + __err = ios_base::failbit; + } + + + + if ((!__sep_pos && !__found_zero && !__found_grouping.size()) + || __testfail) + { + __v = 0; + __err = ios_base::failbit; + } + else if (__testoverflow) + { + if (__negative + && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) + __v = __gnu_cxx::__numeric_traits<_ValueT>::__min; + else + __v = __gnu_cxx::__numeric_traits<_ValueT>::__max; + __err = ios_base::failbit; + } + else + __v = __negative ? -__result : __result; + + if (__testeof) + __err |= ios_base::eofbit; + return __beg; + } + + + + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, bool& __v) const + { + if (!(__io.flags() & ios_base::boolalpha)) + { + + + + long __l = -1; + __beg = _M_extract_int(__beg, __end, __io, __err, __l); + if (__l == 0 || __l == 1) + __v = bool(__l); + else + { + + + __v = true; + __err = ios_base::failbit; + if (__beg == __end) + __err |= ios_base::eofbit; + } + } + else + { + + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + + bool __testf = true; + bool __testt = true; + bool __donef = __lc->_M_falsename_size == 0; + bool __donet = __lc->_M_truename_size == 0; + bool __testeof = false; + size_t __n = 0; + while (!__donef || !__donet) + { + if (__beg == __end) + { + __testeof = true; + break; + } + + const char_type __c = *__beg; + + if (!__donef) + __testf = __c == __lc->_M_falsename[__n]; + + if (!__testf && __donet) + break; + + if (!__donet) + __testt = __c == __lc->_M_truename[__n]; + + if (!__testt && __donef) + break; + + if (!__testt && !__testf) + break; + + ++__n; + ++__beg; + + __donef = !__testf || __n >= __lc->_M_falsename_size; + __donet = !__testt || __n >= __lc->_M_truename_size; + } + if (__testf && __n == __lc->_M_falsename_size && __n) + { + __v = false; + if (__testt && __n == __lc->_M_truename_size) + __err = ios_base::failbit; + else + __err = __testeof ? ios_base::eofbit : ios_base::goodbit; + } + else if (__testt && __n == __lc->_M_truename_size && __n) + { + __v = true; + __err = __testeof ? ios_base::eofbit : ios_base::goodbit; + } + else + { + + + __v = false; + __err = ios_base::failbit; + if (__testeof) + __err |= ios_base::eofbit; + } + } + return __beg; + } + + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, float& __v) const + { + string __xtrc; + __xtrc.reserve(32); + __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); + std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, double& __v) const + { + string __xtrc; + __xtrc.reserve(32); + __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); + std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } +# 730 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.tcc" 3 + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long double& __v) const + { + string __xtrc; + __xtrc.reserve(32); + __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); + std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, void*& __v) const + { + + typedef ios_base::fmtflags fmtflags; + const fmtflags __fmt = __io.flags(); + __io.flags((__fmt & ~ios_base::basefield) | ios_base::hex); + + typedef __gnu_cxx::__conditional_type<(sizeof(void*) + <= sizeof(unsigned long)), + unsigned long, unsigned long long>::__type _UIntPtrType; + + _UIntPtrType __ul; + __beg = _M_extract_int(__beg, __end, __io, __err, __ul); + + + __io.flags(__fmt); + + __v = reinterpret_cast(__ul); + return __beg; + } + + + + template + void + num_put<_CharT, _OutIter>:: + _M_pad(_CharT __fill, streamsize __w, ios_base& __io, + _CharT* __new, const _CharT* __cs, int& __len) const + { + + + __pad<_CharT, char_traits<_CharT> >::_S_pad(__io, __fill, __new, + __cs, __w, __len); + __len = static_cast(__w); + } + + + + template + int + __int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit, + ios_base::fmtflags __flags, bool __dec) + { + _CharT* __buf = __bufend; + if (__builtin_expect(__dec, true)) + { + + do + { + *--__buf = __lit[(__v % 10) + __num_base::_S_odigits]; + __v /= 10; + } + while (__v != 0); + } + else if ((__flags & ios_base::basefield) == ios_base::oct) + { + + do + { + *--__buf = __lit[(__v & 0x7) + __num_base::_S_odigits]; + __v >>= 3; + } + while (__v != 0); + } + else + { + + const bool __uppercase = __flags & ios_base::uppercase; + const int __case_offset = __uppercase ? __num_base::_S_oudigits + : __num_base::_S_odigits; + do + { + *--__buf = __lit[(__v & 0xf) + __case_offset]; + __v >>= 4; + } + while (__v != 0); + } + return __bufend - __buf; + } + + + + template + void + num_put<_CharT, _OutIter>:: + _M_group_int(const char* __grouping, size_t __grouping_size, _CharT __sep, + ios_base&, _CharT* __new, _CharT* __cs, int& __len) const + { + _CharT* __p = std::__add_grouping(__new, __sep, __grouping, + __grouping_size, __cs, __cs + __len); + __len = __p - __new; + } + + template + template + _OutIter + num_put<_CharT, _OutIter>:: + _M_insert_int(_OutIter __s, ios_base& __io, _CharT __fill, + _ValueT __v) const + { + using __gnu_cxx::__add_unsigned; + typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + const _CharT* __lit = __lc->_M_atoms_out; + const ios_base::fmtflags __flags = __io.flags(); + + + const int __ilen = 5 * sizeof(_ValueT); + _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __ilen)); + + + + const ios_base::fmtflags __basefield = __flags & ios_base::basefield; + const bool __dec = (__basefield != ios_base::oct + && __basefield != ios_base::hex); + const __unsigned_type __u = ((__v > 0 || !__dec) + ? __unsigned_type(__v) + : -__unsigned_type(__v)); + int __len = __int_to_char(__cs + __ilen, __u, __lit, __flags, __dec); + __cs += __ilen - __len; + + + if (__lc->_M_use_grouping) + { + + + _CharT* __cs2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * (__len + 1) + * 2)); + _M_group_int(__lc->_M_grouping, __lc->_M_grouping_size, + __lc->_M_thousands_sep, __io, __cs2 + 2, __cs, __len); + __cs = __cs2 + 2; + } + + + if (__builtin_expect(__dec, true)) + { + + if (__v >= 0) + { + if (bool(__flags & ios_base::showpos) + && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) + *--__cs = __lit[__num_base::_S_oplus], ++__len; + } + else + *--__cs = __lit[__num_base::_S_ominus], ++__len; + } + else if (bool(__flags & ios_base::showbase) && __v) + { + if (__basefield == ios_base::oct) + *--__cs = __lit[__num_base::_S_odigits], ++__len; + else + { + + const bool __uppercase = __flags & ios_base::uppercase; + *--__cs = __lit[__num_base::_S_ox + __uppercase]; + + *--__cs = __lit[__num_base::_S_odigits]; + __len += 2; + } + } + + + const streamsize __w = __io.width(); + if (__w > static_cast(__len)) + { + _CharT* __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __w)); + _M_pad(__fill, __w, __io, __cs3, __cs, __len); + __cs = __cs3; + } + __io.width(0); + + + + return std::__write(__s, __cs, __len); + } + + template + void + num_put<_CharT, _OutIter>:: + _M_group_float(const char* __grouping, size_t __grouping_size, + _CharT __sep, const _CharT* __p, _CharT* __new, + _CharT* __cs, int& __len) const + { + + + + const int __declen = __p ? __p - __cs : __len; + _CharT* __p2 = std::__add_grouping(__new, __sep, __grouping, + __grouping_size, + __cs, __cs + __declen); + + + int __newlen = __p2 - __new; + if (__p) + { + char_traits<_CharT>::copy(__p2, __p, __len - __declen); + __newlen += __len - __declen; + } + __len = __newlen; + } +# 966 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.tcc" 3 + template + template + _OutIter + num_put<_CharT, _OutIter>:: + _M_insert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod, + _ValueT __v) const + { + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + + + const streamsize __prec = __io.precision() < 0 ? 6 : __io.precision(); + + const int __max_digits = + __gnu_cxx::__numeric_traits<_ValueT>::__digits10; + + + int __len; + + char __fbuf[16]; + __num_base::_S_format_float(__io, __fbuf, __mod); + + + + + int __cs_size = __max_digits * 3; + char* __cs = static_cast(__builtin_alloca(__cs_size)); + __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, + __fbuf, __prec, __v); + + + if (__len >= __cs_size) + { + __cs_size = __len + 1; + __cs = static_cast(__builtin_alloca(__cs_size)); + __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, + __fbuf, __prec, __v); + } +# 1027 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.tcc" 3 + const ctype<_CharT>& __ctype = use_facet >(__loc); + + _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __len)); + __ctype.widen(__cs, __cs + __len, __ws); + + + _CharT* __wp = 0; + const char* __p = char_traits::find(__cs, __len, '.'); + if (__p) + { + __wp = __ws + (__p - __cs); + *__wp = __lc->_M_decimal_point; + } + + + + + if (__lc->_M_use_grouping + && (__wp || __len < 3 || (__cs[1] <= '9' && __cs[2] <= '9' + && __cs[1] >= '0' && __cs[2] >= '0'))) + { + + + _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __len * 2)); + + streamsize __off = 0; + if (__cs[0] == '-' || __cs[0] == '+') + { + __off = 1; + __ws2[0] = __ws[0]; + __len -= 1; + } + + _M_group_float(__lc->_M_grouping, __lc->_M_grouping_size, + __lc->_M_thousands_sep, __wp, __ws2 + __off, + __ws + __off, __len); + __len += __off; + + __ws = __ws2; + } + + + const streamsize __w = __io.width(); + if (__w > static_cast(__len)) + { + _CharT* __ws3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __w)); + _M_pad(__fill, __w, __io, __ws3, __ws, __len); + __ws = __ws3; + } + __io.width(0); + + + + return std::__write(__s, __ws, __len); + } + + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const + { + const ios_base::fmtflags __flags = __io.flags(); + if ((__flags & ios_base::boolalpha) == 0) + { + const long __l = __v; + __s = _M_insert_int(__s, __io, __fill, __l); + } + else + { + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + + const _CharT* __name = __v ? __lc->_M_truename + : __lc->_M_falsename; + int __len = __v ? __lc->_M_truename_size + : __lc->_M_falsename_size; + + const streamsize __w = __io.width(); + if (__w > static_cast(__len)) + { + const streamsize __plen = __w - __len; + _CharT* __ps + = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __plen)); + + char_traits<_CharT>::assign(__ps, __plen, __fill); + __io.width(0); + + if ((__flags & ios_base::adjustfield) == ios_base::left) + { + __s = std::__write(__s, __name, __len); + __s = std::__write(__s, __ps, __plen); + } + else + { + __s = std::__write(__s, __ps, __plen); + __s = std::__write(__s, __name, __len); + } + return __s; + } + __io.width(0); + __s = std::__write(__s, __name, __len); + } + return __s; + } + + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const + { return _M_insert_float(__s, __io, __fill, char(), __v); } +# 1152 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.tcc" 3 + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, + long double __v) const + { return _M_insert_float(__s, __io, __fill, 'L', __v); } + + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, + const void* __v) const + { + const ios_base::fmtflags __flags = __io.flags(); + const ios_base::fmtflags __fmt = ~(ios_base::basefield + | ios_base::uppercase); + __io.flags((__flags & __fmt) | (ios_base::hex | ios_base::showbase)); + + typedef __gnu_cxx::__conditional_type<(sizeof(const void*) + <= sizeof(unsigned long)), + unsigned long, unsigned long long>::__type _UIntPtrType; + + __s = _M_insert_int(__s, __io, __fill, + reinterpret_cast<_UIntPtrType>(__v)); + __io.flags(__flags); + return __s; + } + + +# 1189 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.tcc" 3 + template + void + __pad<_CharT, _Traits>::_S_pad(ios_base& __io, _CharT __fill, + _CharT* __news, const _CharT* __olds, + streamsize __newlen, streamsize __oldlen) + { + const size_t __plen = static_cast(__newlen - __oldlen); + const ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield; + + + if (__adjust == ios_base::left) + { + _Traits::copy(__news, __olds, __oldlen); + _Traits::assign(__news + __oldlen, __plen, __fill); + return; + } + + size_t __mod = 0; + if (__adjust == ios_base::internal) + { + + + + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + + if (__ctype.widen('-') == __olds[0] + || __ctype.widen('+') == __olds[0]) + { + __news[0] = __olds[0]; + __mod = 1; + ++__news; + } + else if (__ctype.widen('0') == __olds[0] + && __oldlen > 1 + && (__ctype.widen('x') == __olds[1] + || __ctype.widen('X') == __olds[1])) + { + __news[0] = __olds[0]; + __news[1] = __olds[1]; + __mod = 2; + __news += 2; + } + + } + _Traits::assign(__news, __plen, __fill); + _Traits::copy(__news + __plen, __olds + __mod, __oldlen - __mod); + } + + template + _CharT* + __add_grouping(_CharT* __s, _CharT __sep, + const char* __gbeg, size_t __gsize, + const _CharT* __first, const _CharT* __last) + { + size_t __idx = 0; + size_t __ctr = 0; + + while (__last - __first > __gbeg[__idx] + && static_cast(__gbeg[__idx]) > 0 + && __gbeg[__idx] != __gnu_cxx::__numeric_traits::__max) + { + __last -= __gbeg[__idx]; + __idx < __gsize - 1 ? ++__idx : ++__ctr; + } + + while (__first != __last) + *__s++ = *__first++; + + while (__ctr--) + { + *__s++ = __sep; + for (char __i = __gbeg[__idx]; __i > 0; --__i) + *__s++ = *__first++; + } + + while (__idx--) + { + *__s++ = __sep; + for (char __i = __gbeg[__idx]; __i > 0; --__i) + *__s++ = *__first++; + } + + return __s; + } + + + + + + extern template class numpunct; + extern template class numpunct_byname; + extern template class num_get; + extern template class num_put; + extern template class ctype_byname; + + extern template + const ctype& + use_facet >(const locale&); + + extern template + const numpunct& + use_facet >(const locale&); + + extern template + const num_put& + use_facet >(const locale&); + + extern template + const num_get& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + extern template class numpunct; + extern template class numpunct_byname; + extern template class num_get; + extern template class num_put; + extern template class ctype_byname; + + extern template + const ctype& + use_facet >(const locale&); + + extern template + const numpunct& + use_facet >(const locale&); + + extern template + const num_put& + use_facet >(const locale&); + + extern template + const num_get& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + +} +# 2602 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/locale_facets.h" 2 3 +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_ios.h" 2 3 + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + inline const _Facet& + __check_facet(const _Facet* __f) + { + if (!__f) + __throw_bad_cast(); + return *__f; + } +# 61 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_ios.h" 3 + template + class basic_ios : public ios_base + { + public: + + + + + + + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + + + + + + + typedef ctype<_CharT> __ctype_type; + typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > + __num_put_type; + typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > + __num_get_type; + + + + protected: + basic_ostream<_CharT, _Traits>* _M_tie; + mutable char_type _M_fill; + mutable bool _M_fill_init; + basic_streambuf<_CharT, _Traits>* _M_streambuf; + + + const __ctype_type* _M_ctype; + + const __num_put_type* _M_num_put; + + const __num_get_type* _M_num_get; + + public: + + + + + + + + operator void*() const + { return this->fail() ? 0 : const_cast(this); } + + bool + operator!() const + { return this->fail(); } +# 126 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_ios.h" 3 + iostate + rdstate() const + { return _M_streambuf_state; } +# 137 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_ios.h" 3 + void + clear(iostate __state = goodbit); + + + + + + + + void + setstate(iostate __state) + { this->clear(this->rdstate() | __state); } + + + + + void + _M_setstate(iostate __state) + { + + + _M_streambuf_state |= __state; + if (this->exceptions() & __state) + throw; + } + + + + + + + + bool + good() const + { return this->rdstate() == 0; } + + + + + + + + bool + eof() const + { return (this->rdstate() & eofbit) != 0; } +# 190 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_ios.h" 3 + bool + fail() const + { return (this->rdstate() & (badbit | failbit)) != 0; } + + + + + + + + bool + bad() const + { return (this->rdstate() & badbit) != 0; } +# 211 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_ios.h" 3 + iostate + exceptions() const + { return _M_exception; } +# 246 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_ios.h" 3 + void + exceptions(iostate __except) + { + _M_exception = __except; + this->clear(_M_streambuf_state); + } + + + + + + + + explicit + basic_ios(basic_streambuf<_CharT, _Traits>* __sb) + : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0), + _M_ctype(0), _M_num_put(0), _M_num_get(0) + { this->init(__sb); } + + + + + + + + virtual + ~basic_ios() { } +# 284 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_ios.h" 3 + basic_ostream<_CharT, _Traits>* + tie() const + { return _M_tie; } +# 296 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_ios.h" 3 + basic_ostream<_CharT, _Traits>* + tie(basic_ostream<_CharT, _Traits>* __tiestr) + { + basic_ostream<_CharT, _Traits>* __old = _M_tie; + _M_tie = __tiestr; + return __old; + } + + + + + + + + basic_streambuf<_CharT, _Traits>* + rdbuf() const + { return _M_streambuf; } +# 336 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_ios.h" 3 + basic_streambuf<_CharT, _Traits>* + rdbuf(basic_streambuf<_CharT, _Traits>* __sb); +# 350 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_ios.h" 3 + basic_ios& + copyfmt(const basic_ios& __rhs); + + + + + + + + char_type + fill() const + { + if (!_M_fill_init) + { + _M_fill = this->widen(' '); + _M_fill_init = true; + } + return _M_fill; + } +# 379 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_ios.h" 3 + char_type + fill(char_type __ch) + { + char_type __old = this->fill(); + _M_fill = __ch; + return __old; + } +# 399 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_ios.h" 3 + locale + imbue(const locale& __loc); +# 419 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_ios.h" 3 + char + narrow(char_type __c, char __dfault) const + { return __check_facet(_M_ctype).narrow(__c, __dfault); } +# 438 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_ios.h" 3 + char_type + widen(char __c) const + { return __check_facet(_M_ctype).widen(__c); } + + protected: + + + + + + + + basic_ios() + : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false), + _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0) + { } + + + + + + + + void + init(basic_streambuf<_CharT, _Traits>* __sb); + + void + _M_cache_locale(const locale& __loc); + }; + +} + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_ios.tcc" 1 3 +# 32 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_ios.tcc" 3 +#define _BASIC_IOS_TCC 1 + + +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_ios.tcc" 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + void + basic_ios<_CharT, _Traits>::clear(iostate __state) + { + if (this->rdbuf()) + _M_streambuf_state = __state; + else + _M_streambuf_state = __state | badbit; + if (this->exceptions() & this->rdstate()) + __throw_ios_failure(("basic_ios::clear")); + } + + template + basic_streambuf<_CharT, _Traits>* + basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb) + { + basic_streambuf<_CharT, _Traits>* __old = _M_streambuf; + _M_streambuf = __sb; + this->clear(); + return __old; + } + + template + basic_ios<_CharT, _Traits>& + basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs) + { + + + if (this != &__rhs) + { + + + + + _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ? + _M_local_word : new _Words[__rhs._M_word_size]; + + + _Callback_list* __cb = __rhs._M_callbacks; + if (__cb) + __cb->_M_add_reference(); + _M_call_callbacks(erase_event); + if (_M_word != _M_local_word) + { + delete [] _M_word; + _M_word = 0; + } + _M_dispose_callbacks(); + + + _M_callbacks = __cb; + for (int __i = 0; __i < __rhs._M_word_size; ++__i) + __words[__i] = __rhs._M_word[__i]; + _M_word = __words; + _M_word_size = __rhs._M_word_size; + + this->flags(__rhs.flags()); + this->width(__rhs.width()); + this->precision(__rhs.precision()); + this->tie(__rhs.tie()); + this->fill(__rhs.fill()); + _M_ios_locale = __rhs.getloc(); + _M_cache_locale(_M_ios_locale); + + _M_call_callbacks(copyfmt_event); + + + this->exceptions(__rhs.exceptions()); + } + return *this; + } + + + template + locale + basic_ios<_CharT, _Traits>::imbue(const locale& __loc) + { + locale __old(this->getloc()); + ios_base::imbue(__loc); + _M_cache_locale(__loc); + if (this->rdbuf() != 0) + this->rdbuf()->pubimbue(__loc); + return __old; + } + + template + void + basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb) + { + + ios_base::_M_init(); + + + _M_cache_locale(_M_ios_locale); +# 145 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_ios.tcc" 3 + _M_fill = _CharT(); + _M_fill_init = false; + + _M_tie = 0; + _M_exception = goodbit; + _M_streambuf = __sb; + _M_streambuf_state = __sb ? goodbit : badbit; + } + + template + void + basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc) + { + if (__builtin_expect(has_facet<__ctype_type>(__loc), true)) + _M_ctype = &use_facet<__ctype_type>(__loc); + else + _M_ctype = 0; + + if (__builtin_expect(has_facet<__num_put_type>(__loc), true)) + _M_num_put = &use_facet<__num_put_type>(__loc); + else + _M_num_put = 0; + + if (__builtin_expect(has_facet<__num_get_type>(__loc), true)) + _M_num_get = &use_facet<__num_get_type>(__loc); + else + _M_num_get = 0; + } + + + + + + extern template class basic_ios; + + + extern template class basic_ios; + + + +} +# 472 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/basic_ios.h" 2 3 +# 46 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ios" 2 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ostream" 2 3 + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 54 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ostream" 3 + template + class basic_ostream : virtual public basic_ios<_CharT, _Traits> + { + public: + + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + + + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef basic_ios<_CharT, _Traits> __ios_type; + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > + __num_put_type; + typedef ctype<_CharT> __ctype_type; +# 81 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ostream" 3 + explicit + basic_ostream(__streambuf_type* __sb) + { this->init(__sb); } + + + + + + + virtual + ~basic_ostream() { } + + + class sentry; + friend class sentry; +# 107 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ostream" 3 + __ostream_type& + operator<<(__ostream_type& (*__pf)(__ostream_type&)) + { + + + + return __pf(*this); + } + + __ostream_type& + operator<<(__ios_type& (*__pf)(__ios_type&)) + { + + + + __pf(*this); + return *this; + } + + __ostream_type& + operator<<(ios_base& (*__pf) (ios_base&)) + { + + + + __pf(*this); + return *this; + } +# 164 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ostream" 3 + __ostream_type& + operator<<(long __n) + { return _M_insert(__n); } + + __ostream_type& + operator<<(unsigned long __n) + { return _M_insert(__n); } + + __ostream_type& + operator<<(bool __n) + { return _M_insert(__n); } + + __ostream_type& + operator<<(short __n); + + __ostream_type& + operator<<(unsigned short __n) + { + + + return _M_insert(static_cast(__n)); + } + + __ostream_type& + operator<<(int __n); + + __ostream_type& + operator<<(unsigned int __n) + { + + + return _M_insert(static_cast(__n)); + } + + + __ostream_type& + operator<<(long long __n) + { return _M_insert(__n); } + + __ostream_type& + operator<<(unsigned long long __n) + { return _M_insert(__n); } + + + __ostream_type& + operator<<(double __f) + { return _M_insert(__f); } + + __ostream_type& + operator<<(float __f) + { + + + return _M_insert(static_cast(__f)); + } + + __ostream_type& + operator<<(long double __f) + { return _M_insert(__f); } + + __ostream_type& + operator<<(const void* __p) + { return _M_insert(__p); } +# 249 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ostream" 3 + __ostream_type& + operator<<(__streambuf_type* __sb); +# 282 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ostream" 3 + __ostream_type& + put(char_type __c); + + + void + _M_write(const char_type* __s, streamsize __n) + { + const streamsize __put = this->rdbuf()->sputn(__s, __n); + if (__put != __n) + this->setstate(ios_base::badbit); + } +# 310 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ostream" 3 + __ostream_type& + write(const char_type* __s, streamsize __n); +# 323 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ostream" 3 + __ostream_type& + flush(); +# 334 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ostream" 3 + pos_type + tellp(); +# 345 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ostream" 3 + __ostream_type& + seekp(pos_type); +# 357 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ostream" 3 + __ostream_type& + seekp(off_type, ios_base::seekdir); + + protected: + basic_ostream() + { this->init(0); } + + template + __ostream_type& + _M_insert(_ValueT __v); + }; +# 376 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ostream" 3 + template + class basic_ostream<_CharT, _Traits>::sentry + { + + bool _M_ok; + basic_ostream<_CharT, _Traits>& _M_os; + + public: +# 395 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ostream" 3 + explicit + sentry(basic_ostream<_CharT, _Traits>& __os); +# 405 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ostream" 3 + ~sentry() + { + + if (bool(_M_os.flags() & ios_base::unitbuf) && !uncaught_exception()) + { + + if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1) + _M_os.setstate(ios_base::badbit); + } + } +# 426 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ostream" 3 + operator bool() const + { return _M_ok; } + }; +# 447 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ostream" 3 + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) + { return __ostream_insert(__out, &__c, 1); } + + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) + { return (__out << __out.widen(__c)); } + + + template + inline basic_ostream& + operator<<(basic_ostream& __out, char __c) + { return __ostream_insert(__out, &__c, 1); } + + + template + inline basic_ostream& + operator<<(basic_ostream& __out, signed char __c) + { return (__out << static_cast(__c)); } + + template + inline basic_ostream& + operator<<(basic_ostream& __out, unsigned char __c) + { return (__out << static_cast(__c)); } +# 489 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ostream" 3 + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) + { + if (!__s) + __out.setstate(ios_base::badbit); + else + __ostream_insert(__out, __s, + static_cast(_Traits::length(__s))); + return __out; + } + + template + basic_ostream<_CharT, _Traits> & + operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s); + + + template + inline basic_ostream& + operator<<(basic_ostream& __out, const char* __s) + { + if (!__s) + __out.setstate(ios_base::badbit); + else + __ostream_insert(__out, __s, + static_cast(_Traits::length(__s))); + return __out; + } + + + template + inline basic_ostream& + operator<<(basic_ostream& __out, const signed char* __s) + { return (__out << reinterpret_cast(__s)); } + + template + inline basic_ostream & + operator<<(basic_ostream& __out, const unsigned char* __s) + { return (__out << reinterpret_cast(__s)); } +# 539 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ostream" 3 + template + inline basic_ostream<_CharT, _Traits>& + endl(basic_ostream<_CharT, _Traits>& __os) + { return flush(__os.put(__os.widen('\n'))); } + + + + + + + + template + inline basic_ostream<_CharT, _Traits>& + ends(basic_ostream<_CharT, _Traits>& __os) + { return __os.put(_CharT()); } + + + + + + + template + inline basic_ostream<_CharT, _Traits>& + flush(basic_ostream<_CharT, _Traits>& __os) + { return __os.flush(); } +# 583 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ostream" 3 +} + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ostream.tcc" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ostream.tcc" 3 +#define _OSTREAM_TCC 1 + + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/ostream.tcc" 3 + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + basic_ostream<_CharT, _Traits>::sentry:: + sentry(basic_ostream<_CharT, _Traits>& __os) + : _M_ok(false), _M_os(__os) + { + + if (__os.tie() && __os.good()) + __os.tie()->flush(); + + if (__os.good()) + _M_ok = true; + else + __os.setstate(ios_base::failbit); + } + + template + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + _M_insert(_ValueT __v) + { + sentry __cerb(*this); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const __num_put_type& __np = __check_facet(this->_M_num_put); + if (__np.put(*this, *this, this->fill(), __v).failed()) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + operator<<(short __n) + { + + + const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; + if (__fmt == ios_base::oct || __fmt == ios_base::hex) + return _M_insert(static_cast(static_cast(__n))); + else + return _M_insert(static_cast(__n)); + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + operator<<(int __n) + { + + + const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; + if (__fmt == ios_base::oct || __fmt == ios_base::hex) + return _M_insert(static_cast(static_cast(__n))); + else + return _M_insert(static_cast(__n)); + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + operator<<(__streambuf_type* __sbin) + { + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this); + if (__cerb && __sbin) + { + try + { + if (!__copy_streambufs(__sbin, this->rdbuf())) + __err |= ios_base::failbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::failbit); } + } + else if (!__sbin) + __err |= ios_base::badbit; + if (__err) + this->setstate(__err); + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + put(char_type __c) + { + + + + + + + sentry __cerb(*this); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __put = this->rdbuf()->sputc(__c); + if (traits_type::eq_int_type(__put, traits_type::eof())) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + write(const _CharT* __s, streamsize __n) + { + + + + + + + + sentry __cerb(*this); + if (__cerb) + { + try + { _M_write(__s, __n); } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + flush() + { + + + + ios_base::iostate __err = ios_base::goodbit; + try + { + if (this->rdbuf() && this->rdbuf()->pubsync() == -1) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + + template + typename basic_ostream<_CharT, _Traits>::pos_type + basic_ostream<_CharT, _Traits>:: + tellp() + { + pos_type __ret = pos_type(-1); + try + { + if (!this->fail()) + __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + return __ret; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + seekp(pos_type __pos) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + if (!this->fail()) + { + + + const pos_type __p = this->rdbuf()->pubseekpos(__pos, + ios_base::out); + + + if (__p == pos_type(off_type(-1))) + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + seekp(off_type __off, ios_base::seekdir __dir) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + if (!this->fail()) + { + + + const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, + ios_base::out); + + + if (__p == pos_type(off_type(-1))) + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) + { + if (!__s) + __out.setstate(ios_base::badbit); + else + { + + + const size_t __clen = char_traits::length(__s); + try + { + struct __ptr_guard + { + _CharT *__p; + __ptr_guard (_CharT *__ip): __p(__ip) { } + ~__ptr_guard() { delete[] __p; } + _CharT* __get() { return __p; } + } __pg (new _CharT[__clen]); + + _CharT *__ws = __pg.__get(); + for (size_t __i = 0; __i < __clen; ++__i) + __ws[__i] = __out.widen(__s[__i]); + __ostream_insert(__out, __ws, __clen); + } + catch(__cxxabiv1::__forced_unwind&) + { + __out._M_setstate(ios_base::badbit); + throw; + } + catch(...) + { __out._M_setstate(ios_base::badbit); } + } + return __out; + } + + + + + + extern template class basic_ostream; + extern template ostream& endl(ostream&); + extern template ostream& ends(ostream&); + extern template ostream& flush(ostream&); + extern template ostream& operator<<(ostream&, char); + extern template ostream& operator<<(ostream&, unsigned char); + extern template ostream& operator<<(ostream&, signed char); + extern template ostream& operator<<(ostream&, const char*); + extern template ostream& operator<<(ostream&, const unsigned char*); + extern template ostream& operator<<(ostream&, const signed char*); + + extern template ostream& ostream::_M_insert(long); + extern template ostream& ostream::_M_insert(unsigned long); + extern template ostream& ostream::_M_insert(bool); + + extern template ostream& ostream::_M_insert(long long); + extern template ostream& ostream::_M_insert(unsigned long long); + + extern template ostream& ostream::_M_insert(double); + extern template ostream& ostream::_M_insert(long double); + extern template ostream& ostream::_M_insert(const void*); + + + extern template class basic_ostream; + extern template wostream& endl(wostream&); + extern template wostream& ends(wostream&); + extern template wostream& flush(wostream&); + extern template wostream& operator<<(wostream&, wchar_t); + extern template wostream& operator<<(wostream&, char); + extern template wostream& operator<<(wostream&, const wchar_t*); + extern template wostream& operator<<(wostream&, const char*); + + extern template wostream& wostream::_M_insert(long); + extern template wostream& wostream::_M_insert(unsigned long); + extern template wostream& wostream::_M_insert(bool); + + extern template wostream& wostream::_M_insert(long long); + extern template wostream& wostream::_M_insert(unsigned long long); + + extern template wostream& wostream::_M_insert(double); + extern template wostream& wostream::_M_insert(long double); + extern template wostream& wostream::_M_insert(const void*); + + + +} +# 587 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/ostream" 2 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/iostream" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 1 3 +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 +#define _GLIBCXX_ISTREAM 1 + + +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 54 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + template + class basic_istream : virtual public basic_ios<_CharT, _Traits> + { + public: + + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + + + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef basic_ios<_CharT, _Traits> __ios_type; + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > + __num_get_type; + typedef ctype<_CharT> __ctype_type; + + protected: + + + + + + streamsize _M_gcount; + + public: +# 90 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + explicit + basic_istream(__streambuf_type* __sb) + : _M_gcount(streamsize(0)) + { this->init(__sb); } + + + + + + + virtual + ~basic_istream() + { _M_gcount = streamsize(0); } + + + class sentry; + friend class sentry; +# 119 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + __istream_type& + operator>>(__istream_type& (*__pf)(__istream_type&)) + { return __pf(*this); } + + __istream_type& + operator>>(__ios_type& (*__pf)(__ios_type&)) + { + __pf(*this); + return *this; + } + + __istream_type& + operator>>(ios_base& (*__pf)(ios_base&)) + { + __pf(*this); + return *this; + } +# 166 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + __istream_type& + operator>>(bool& __n) + { return _M_extract(__n); } + + __istream_type& + operator>>(short& __n); + + __istream_type& + operator>>(unsigned short& __n) + { return _M_extract(__n); } + + __istream_type& + operator>>(int& __n); + + __istream_type& + operator>>(unsigned int& __n) + { return _M_extract(__n); } + + __istream_type& + operator>>(long& __n) + { return _M_extract(__n); } + + __istream_type& + operator>>(unsigned long& __n) + { return _M_extract(__n); } + + + __istream_type& + operator>>(long long& __n) + { return _M_extract(__n); } + + __istream_type& + operator>>(unsigned long long& __n) + { return _M_extract(__n); } + + + __istream_type& + operator>>(float& __f) + { return _M_extract(__f); } + + __istream_type& + operator>>(double& __f) + { return _M_extract(__f); } + + __istream_type& + operator>>(long double& __f) + { return _M_extract(__f); } + + __istream_type& + operator>>(void*& __p) + { return _M_extract(__p); } +# 238 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + __istream_type& + operator>>(__streambuf_type* __sb); +# 248 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + streamsize + gcount() const + { return _M_gcount; } +# 280 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + int_type + get(); +# 294 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + __istream_type& + get(char_type& __c); +# 321 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + __istream_type& + get(char_type* __s, streamsize __n, char_type __delim); +# 332 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + __istream_type& + get(char_type* __s, streamsize __n) + { return this->get(__s, __n, this->widen('\n')); } +# 355 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + __istream_type& + get(__streambuf_type& __sb, char_type __delim); +# 365 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + __istream_type& + get(__streambuf_type& __sb) + { return this->get(__sb, this->widen('\n')); } +# 394 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + __istream_type& + getline(char_type* __s, streamsize __n, char_type __delim); +# 405 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + __istream_type& + getline(char_type* __s, streamsize __n) + { return this->getline(__s, __n, this->widen('\n')); } +# 429 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + __istream_type& + ignore(); + + __istream_type& + ignore(streamsize __n); + + __istream_type& + ignore(streamsize __n, int_type __delim); +# 446 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + int_type + peek(); +# 464 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + __istream_type& + read(char_type* __s, streamsize __n); +# 483 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + streamsize + readsome(char_type* __s, streamsize __n); +# 499 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + __istream_type& + putback(char_type __c); +# 514 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + __istream_type& + unget(); +# 532 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + int + sync(); +# 546 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + pos_type + tellg(); +# 561 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + __istream_type& + seekg(pos_type); +# 577 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + __istream_type& + seekg(off_type, ios_base::seekdir); + + + protected: + basic_istream() + : _M_gcount(streamsize(0)) + { this->init(0); } + + template + __istream_type& + _M_extract(_ValueT& __v); + }; + + + template<> + basic_istream& + basic_istream:: + getline(char_type* __s, streamsize __n, char_type __delim); + + template<> + basic_istream& + basic_istream:: + ignore(streamsize __n); + + template<> + basic_istream& + basic_istream:: + ignore(streamsize __n, int_type __delim); + + + template<> + basic_istream& + basic_istream:: + getline(char_type* __s, streamsize __n, char_type __delim); + + template<> + basic_istream& + basic_istream:: + ignore(streamsize __n); + + template<> + basic_istream& + basic_istream:: + ignore(streamsize __n, int_type __delim); +# 632 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + template + class basic_istream<_CharT, _Traits>::sentry + { + + bool _M_ok; + + public: + + typedef _Traits traits_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef typename __istream_type::__ctype_type __ctype_type; + typedef typename _Traits::int_type __int_type; +# 668 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + explicit + sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false); +# 681 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + operator bool() const + { return _M_ok; } + }; +# 698 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c); + + template + inline basic_istream& + operator>>(basic_istream& __in, unsigned char& __c) + { return (__in >> reinterpret_cast(__c)); } + + template + inline basic_istream& + operator>>(basic_istream& __in, signed char& __c) + { return (__in >> reinterpret_cast(__c)); } +# 740 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s); + + + template<> + basic_istream& + operator>>(basic_istream& __in, char* __s); + + template + inline basic_istream& + operator>>(basic_istream& __in, unsigned char* __s) + { return (__in >> reinterpret_cast(__s)); } + + template + inline basic_istream& + operator>>(basic_istream& __in, signed char* __s) + { return (__in >> reinterpret_cast(__s)); } +# 768 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + template + class basic_iostream + : public basic_istream<_CharT, _Traits>, + public basic_ostream<_CharT, _Traits> + { + public: + + + + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + + + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_ostream<_CharT, _Traits> __ostream_type; + + + + + + + + explicit + basic_iostream(basic_streambuf<_CharT, _Traits>* __sb) + : __istream_type(__sb), __ostream_type(__sb) { } + + + + + virtual + ~basic_iostream() { } + + protected: + basic_iostream() + : __istream_type(), __ostream_type() { } + }; +# 829 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 + template + basic_istream<_CharT, _Traits>& + ws(basic_istream<_CharT, _Traits>& __is); +# 851 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 3 +} + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/istream.tcc" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/istream.tcc" 3 +#define _ISTREAM_TCC 1 + + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/istream.tcc" 3 + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + basic_istream<_CharT, _Traits>::sentry:: + sentry(basic_istream<_CharT, _Traits>& __in, bool __noskip) : _M_ok(false) + { + ios_base::iostate __err = ios_base::goodbit; + if (__in.good()) + { + if (__in.tie()) + __in.tie()->flush(); + if (!__noskip && bool(__in.flags() & ios_base::skipws)) + { + const __int_type __eof = traits_type::eof(); + __streambuf_type* __sb = __in.rdbuf(); + __int_type __c = __sb->sgetc(); + + const __ctype_type& __ct = __check_facet(__in._M_ctype); + while (!traits_type::eq_int_type(__c, __eof) + && __ct.is(ctype_base::space, + traits_type::to_char_type(__c))) + __c = __sb->snextc(); + + + + + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + } + } + + if (__in.good() && __err == ios_base::goodbit) + _M_ok = true; + else + { + __err |= ios_base::failbit; + __in.setstate(__err); + } + } + + template + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + _M_extract(_ValueT& __v) + { + sentry __cerb(*this, false); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const __num_get_type& __ng = __check_facet(this->_M_num_get); + __ng.get(*this, 0, *this, __err, __v); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(short& __n) + { + + + sentry __cerb(*this, false); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + long __l; + const __num_get_type& __ng = __check_facet(this->_M_num_get); + __ng.get(*this, 0, *this, __err, __l); + + + + if (__l < __gnu_cxx::__numeric_traits::__min) + { + __err |= ios_base::failbit; + __n = __gnu_cxx::__numeric_traits::__min; + } + else if (__l > __gnu_cxx::__numeric_traits::__max) + { + __err |= ios_base::failbit; + __n = __gnu_cxx::__numeric_traits::__max; + } + else + __n = short(__l); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(int& __n) + { + + + sentry __cerb(*this, false); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + long __l; + const __num_get_type& __ng = __check_facet(this->_M_num_get); + __ng.get(*this, 0, *this, __err, __l); + + + + if (__l < __gnu_cxx::__numeric_traits::__min) + { + __err |= ios_base::failbit; + __n = __gnu_cxx::__numeric_traits::__min; + } + else if (__l > __gnu_cxx::__numeric_traits::__max) + { + __err |= ios_base::failbit; + __n = __gnu_cxx::__numeric_traits::__max; + } + else + __n = int(__l); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(__streambuf_type* __sbout) + { + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, false); + if (__cerb && __sbout) + { + try + { + bool __ineof; + if (!__copy_streambufs_eof(this->rdbuf(), __sbout, __ineof)) + __err |= ios_base::failbit; + if (__ineof) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::failbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::failbit); } + } + else if (!__sbout) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + + template + typename basic_istream<_CharT, _Traits>::int_type + basic_istream<_CharT, _Traits>:: + get(void) + { + const int_type __eof = traits_type::eof(); + int_type __c = __eof; + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + __c = this->rdbuf()->sbumpc(); + + if (!traits_type::eq_int_type(__c, __eof)) + _M_gcount = 1; + else + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return __c; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + get(char_type& __c) + { + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __cb = this->rdbuf()->sbumpc(); + + if (!traits_type::eq_int_type(__cb, traits_type::eof())) + { + _M_gcount = 1; + __c = traits_type::to_char_type(__cb); + } + else + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + get(char_type* __s, streamsize __n, char_type __delim) + { + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __idelim = traits_type::to_int_type(__delim); + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sgetc(); + + while (_M_gcount + 1 < __n + && !traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __idelim)) + { + *__s++ = traits_type::to_char_type(__c); + ++_M_gcount; + __c = __sb->snextc(); + } + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + + + if (__n > 0) + *__s = char_type(); + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + get(__streambuf_type& __sb, char_type __delim) + { + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __idelim = traits_type::to_int_type(__delim); + const int_type __eof = traits_type::eof(); + __streambuf_type* __this_sb = this->rdbuf(); + int_type __c = __this_sb->sgetc(); + char_type __c2 = traits_type::to_char_type(__c); + + while (!traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __idelim) + && !traits_type::eq_int_type(__sb.sputc(__c2), __eof)) + { + ++_M_gcount; + __c = __this_sb->snextc(); + __c2 = traits_type::to_char_type(__c); + } + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + getline(char_type* __s, streamsize __n, char_type __delim) + { + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __idelim = traits_type::to_int_type(__delim); + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sgetc(); + + while (_M_gcount + 1 < __n + && !traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __idelim)) + { + *__s++ = traits_type::to_char_type(__c); + __c = __sb->snextc(); + ++_M_gcount; + } + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + else + { + if (traits_type::eq_int_type(__c, __idelim)) + { + __sb->sbumpc(); + ++_M_gcount; + } + else + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + + + if (__n > 0) + *__s = char_type(); + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + + + + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + ignore(void) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + + if (traits_type::eq_int_type(__sb->sbumpc(), __eof)) + __err |= ios_base::eofbit; + else + _M_gcount = 1; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + ignore(streamsize __n) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb && __n > 0) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sgetc(); +# 513 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/istream.tcc" 3 + bool __large_ignore = false; + while (true) + { + while (_M_gcount < __n + && !traits_type::eq_int_type(__c, __eof)) + { + ++_M_gcount; + __c = __sb->snextc(); + } + if (__n == __gnu_cxx::__numeric_traits::__max + && !traits_type::eq_int_type(__c, __eof)) + { + _M_gcount = + __gnu_cxx::__numeric_traits::__min; + __large_ignore = true; + } + else + break; + } + + if (__large_ignore) + _M_gcount = __gnu_cxx::__numeric_traits::__max; + + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + ignore(streamsize __n, int_type __delim) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb && __n > 0) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sgetc(); + + + bool __large_ignore = false; + while (true) + { + while (_M_gcount < __n + && !traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __delim)) + { + ++_M_gcount; + __c = __sb->snextc(); + } + if (__n == __gnu_cxx::__numeric_traits::__max + && !traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __delim)) + { + _M_gcount = + __gnu_cxx::__numeric_traits::__min; + __large_ignore = true; + } + else + break; + } + + if (__large_ignore) + _M_gcount = __gnu_cxx::__numeric_traits::__max; + + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + else if (traits_type::eq_int_type(__c, __delim)) + { + if (_M_gcount + < __gnu_cxx::__numeric_traits::__max) + ++_M_gcount; + __sb->sbumpc(); + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + typename basic_istream<_CharT, _Traits>::int_type + basic_istream<_CharT, _Traits>:: + peek(void) + { + int_type __c = traits_type::eof(); + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + __c = this->rdbuf()->sgetc(); + if (traits_type::eq_int_type(__c, traits_type::eof())) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return __c; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + read(char_type* __s, streamsize __n) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + _M_gcount = this->rdbuf()->sgetn(__s, __n); + if (_M_gcount != __n) + __err |= (ios_base::eofbit | ios_base::failbit); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + streamsize + basic_istream<_CharT, _Traits>:: + readsome(char_type* __s, streamsize __n) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + + const streamsize __num = this->rdbuf()->in_avail(); + if (__num > 0) + _M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n)); + else if (__num == -1) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return _M_gcount; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + putback(char_type __c) + { + + + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + if (!__sb + || traits_type::eq_int_type(__sb->sputbackc(__c), __eof)) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + unget(void) + { + + + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + if (!__sb + || traits_type::eq_int_type(__sb->sungetc(), __eof)) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + int + basic_istream<_CharT, _Traits>:: + sync(void) + { + + + int __ret = -1; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + __streambuf_type* __sb = this->rdbuf(); + if (__sb) + { + if (__sb->pubsync() == -1) + __err |= ios_base::badbit; + else + __ret = 0; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return __ret; + } + + template + typename basic_istream<_CharT, _Traits>::pos_type + basic_istream<_CharT, _Traits>:: + tellg(void) + { + + + pos_type __ret = pos_type(-1); + try + { + if (!this->fail()) + __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, + ios_base::in); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + return __ret; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + seekg(pos_type __pos) + { + + + ios_base::iostate __err = ios_base::goodbit; + try + { + if (!this->fail()) + { + + const pos_type __p = this->rdbuf()->pubseekpos(__pos, + ios_base::in); + + + if (__p == pos_type(off_type(-1))) + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + seekg(off_type __off, ios_base::seekdir __dir) + { + + + ios_base::iostate __err = ios_base::goodbit; + try + { + if (!this->fail()) + { + + const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, + ios_base::in); + + + if (__p == pos_type(off_type(-1))) + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + + + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef typename __istream_type::int_type __int_type; + + typename __istream_type::sentry __cerb(__in, false); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const __int_type __cb = __in.rdbuf()->sbumpc(); + if (!_Traits::eq_int_type(__cb, _Traits::eof())) + __c = _Traits::to_char_type(__cb); + else + __err |= (ios_base::eofbit | ios_base::failbit); + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(ios_base::badbit); + throw; + } + catch(...) + { __in._M_setstate(ios_base::badbit); } + if (__err) + __in.setstate(__err); + } + return __in; + } + + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef typename _Traits::int_type int_type; + typedef _CharT char_type; + typedef ctype<_CharT> __ctype_type; + + streamsize __extracted = 0; + ios_base::iostate __err = ios_base::goodbit; + typename __istream_type::sentry __cerb(__in, false); + if (__cerb) + { + try + { + + streamsize __num = __in.width(); + if (__num <= 0) + __num = __gnu_cxx::__numeric_traits::__max; + + const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); + + const int_type __eof = _Traits::eof(); + __streambuf_type* __sb = __in.rdbuf(); + int_type __c = __sb->sgetc(); + + while (__extracted < __num - 1 + && !_Traits::eq_int_type(__c, __eof) + && !__ct.is(ctype_base::space, + _Traits::to_char_type(__c))) + { + *__s++ = _Traits::to_char_type(__c); + ++__extracted; + __c = __sb->snextc(); + } + if (_Traits::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + + + + *__s = char_type(); + __in.width(0); + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(ios_base::badbit); + throw; + } + catch(...) + { __in._M_setstate(ios_base::badbit); } + } + if (!__extracted) + __err |= ios_base::failbit; + if (__err) + __in.setstate(__err); + return __in; + } + + + template + basic_istream<_CharT, _Traits>& + ws(basic_istream<_CharT, _Traits>& __in) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef typename __istream_type::int_type __int_type; + typedef ctype<_CharT> __ctype_type; + + const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); + const __int_type __eof = _Traits::eof(); + __streambuf_type* __sb = __in.rdbuf(); + __int_type __c = __sb->sgetc(); + + while (!_Traits::eq_int_type(__c, __eof) + && __ct.is(ctype_base::space, _Traits::to_char_type(__c))) + __c = __sb->snextc(); + + if (_Traits::eq_int_type(__c, __eof)) + __in.setstate(ios_base::eofbit); + return __in; + } + + + + + + extern template class basic_istream; + extern template istream& ws(istream&); + extern template istream& operator>>(istream&, char&); + extern template istream& operator>>(istream&, char*); + extern template istream& operator>>(istream&, unsigned char&); + extern template istream& operator>>(istream&, signed char&); + extern template istream& operator>>(istream&, unsigned char*); + extern template istream& operator>>(istream&, signed char*); + + extern template istream& istream::_M_extract(unsigned short&); + extern template istream& istream::_M_extract(unsigned int&); + extern template istream& istream::_M_extract(long&); + extern template istream& istream::_M_extract(unsigned long&); + extern template istream& istream::_M_extract(bool&); + + extern template istream& istream::_M_extract(long long&); + extern template istream& istream::_M_extract(unsigned long long&); + + extern template istream& istream::_M_extract(float&); + extern template istream& istream::_M_extract(double&); + extern template istream& istream::_M_extract(long double&); + extern template istream& istream::_M_extract(void*&); + + extern template class basic_iostream; + + + extern template class basic_istream; + extern template wistream& ws(wistream&); + extern template wistream& operator>>(wistream&, wchar_t&); + extern template wistream& operator>>(wistream&, wchar_t*); + + extern template wistream& wistream::_M_extract(unsigned short&); + extern template wistream& wistream::_M_extract(unsigned int&); + extern template wistream& wistream::_M_extract(long&); + extern template wistream& wistream::_M_extract(unsigned long&); + extern template wistream& wistream::_M_extract(bool&); + + extern template wistream& wistream::_M_extract(long long&); + extern template wistream& wistream::_M_extract(unsigned long long&); + + extern template wistream& wistream::_M_extract(float&); + extern template wistream& wistream::_M_extract(double&); + extern template wistream& wistream::_M_extract(long double&); + extern template wistream& wistream::_M_extract(void*&); + + extern template class basic_iostream; + + + +} +# 855 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/istream" 2 3 +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/iostream" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 59 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/iostream" 3 + extern istream cin; + extern ostream cout; + extern ostream cerr; + extern ostream clog; + + + extern wistream wcin; + extern wostream wcout; + extern wostream wcerr; + extern wostream wclog; + + + + + static ios_base::Init __ioinit; + +} +# 29 "Address.cpp" 2 + +# 1 "../fwbuilder/libfwbuilder-config.h" 1 + + + + + + +#define FWBUILDER_XML_VERSION "22" + + + + + +#define RES_DIR "/usr/share/fwbuilder-5.0.1.3592" +# 27 "../fwbuilder/libfwbuilder-config.h" +#define HAVE_GETOPT_H 1 +# 44 "../fwbuilder/libfwbuilder-config.h" +#define HAVE_XMLSAVEFORMATFILEENC 1 + +#define HAVE_LIBXSLT_XSLTCONFIG_H 1 + + +#define HAVE_STRTOK_R 1 + +#define WORDS_LITTLEENDIAN 1 +# 61 "../fwbuilder/libfwbuilder-config.h" +#define SNPRINTF snprintf +#define VSNPRINTF vsnprintf +#define FS_SEPARATOR "/" + + + + + + +#define FREEXMLBUFF(x) xmlFree((void*)(x)) +# 31 "Address.cpp" 2 +# 1 "../fwbuilder/Address.h" 1 +# 28 "../fwbuilder/Address.h" +#define __GEN_ADDRESS_HH_FLAG__ + +# 1 "../fwbuilder/FWObject.h" 1 +# 28 "../fwbuilder/FWObject.h" +#define __FWOBJECT_HH_FLAG__ + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/list" 1 3 +# 57 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/list" 3 +#define _GLIBCXX_LIST 1 + + +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/list" 3 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 1 3 +# 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 +#define _STL_LIST_H 1 + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + + + + + + struct _List_node_base + { + _List_node_base* _M_next; + _List_node_base* _M_prev; + + static void + swap(_List_node_base& __x, _List_node_base& __y) throw (); + + void + _M_transfer(_List_node_base * const __first, + _List_node_base * const __last) throw (); + + void + _M_reverse() throw (); + + void + _M_hook(_List_node_base * const __position) throw (); + + void + _M_unhook() throw (); + }; + + + template + struct _List_node : public _List_node_base + { + + _Tp _M_data; + + + + + + + }; + + + + + + + template + struct _List_iterator + { + typedef _List_iterator<_Tp> _Self; + typedef _List_node<_Tp> _Node; + + typedef ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + typedef _Tp value_type; + typedef _Tp* pointer; + typedef _Tp& reference; + + _List_iterator() + : _M_node() { } + + explicit + _List_iterator(_List_node_base* __x) + : _M_node(__x) { } + + + reference + operator*() const + { return static_cast<_Node*>(_M_node)->_M_data; } + + pointer + operator->() const + { return &static_cast<_Node*>(_M_node)->_M_data; } + + _Self& + operator++() + { + _M_node = _M_node->_M_next; + return *this; + } + + _Self + operator++(int) + { + _Self __tmp = *this; + _M_node = _M_node->_M_next; + return __tmp; + } + + _Self& + operator--() + { + _M_node = _M_node->_M_prev; + return *this; + } + + _Self + operator--(int) + { + _Self __tmp = *this; + _M_node = _M_node->_M_prev; + return __tmp; + } + + bool + operator==(const _Self& __x) const + { return _M_node == __x._M_node; } + + bool + operator!=(const _Self& __x) const + { return _M_node != __x._M_node; } + + + _List_node_base* _M_node; + }; + + + + + + + template + struct _List_const_iterator + { + typedef _List_const_iterator<_Tp> _Self; + typedef const _List_node<_Tp> _Node; + typedef _List_iterator<_Tp> iterator; + + typedef ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + typedef _Tp value_type; + typedef const _Tp* pointer; + typedef const _Tp& reference; + + _List_const_iterator() + : _M_node() { } + + explicit + _List_const_iterator(const _List_node_base* __x) + : _M_node(__x) { } + + _List_const_iterator(const iterator& __x) + : _M_node(__x._M_node) { } + + + + reference + operator*() const + { return static_cast<_Node*>(_M_node)->_M_data; } + + pointer + operator->() const + { return &static_cast<_Node*>(_M_node)->_M_data; } + + _Self& + operator++() + { + _M_node = _M_node->_M_next; + return *this; + } + + _Self + operator++(int) + { + _Self __tmp = *this; + _M_node = _M_node->_M_next; + return __tmp; + } + + _Self& + operator--() + { + _M_node = _M_node->_M_prev; + return *this; + } + + _Self + operator--(int) + { + _Self __tmp = *this; + _M_node = _M_node->_M_prev; + return __tmp; + } + + bool + operator==(const _Self& __x) const + { return _M_node == __x._M_node; } + + bool + operator!=(const _Self& __x) const + { return _M_node != __x._M_node; } + + + const _List_node_base* _M_node; + }; + + template + inline bool + operator==(const _List_iterator<_Val>& __x, + const _List_const_iterator<_Val>& __y) + { return __x._M_node == __y._M_node; } + + template + inline bool + operator!=(const _List_iterator<_Val>& __x, + const _List_const_iterator<_Val>& __y) + { return __x._M_node != __y._M_node; } + + + + template + class _List_base + { + protected: +# 293 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + typedef typename _Alloc::template rebind<_List_node<_Tp> >::other + _Node_alloc_type; + + typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; + + struct _List_impl + : public _Node_alloc_type + { + _List_node_base _M_node; + + _List_impl() + : _Node_alloc_type(), _M_node() + { } + + _List_impl(const _Node_alloc_type& __a) + : _Node_alloc_type(__a), _M_node() + { } + }; + + _List_impl _M_impl; + + _List_node<_Tp>* + _M_get_node() + { return _M_impl._Node_alloc_type::allocate(1); } + + void + _M_put_node(_List_node<_Tp>* __p) + { _M_impl._Node_alloc_type::deallocate(__p, 1); } + + public: + typedef _Alloc allocator_type; + + _Node_alloc_type& + _M_get_Node_allocator() + { return *static_cast<_Node_alloc_type*>(&this->_M_impl); } + + const _Node_alloc_type& + _M_get_Node_allocator() const + { return *static_cast(&this->_M_impl); } + + _Tp_alloc_type + _M_get_Tp_allocator() const + { return _Tp_alloc_type(_M_get_Node_allocator()); } + + allocator_type + get_allocator() const + { return allocator_type(_M_get_Node_allocator()); } + + _List_base() + : _M_impl() + { _M_init(); } + + _List_base(const allocator_type& __a) + : _M_impl(__a) + { _M_init(); } +# 359 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + ~_List_base() + { _M_clear(); } + + void + _M_clear(); + + void + _M_init() + { + this->_M_impl._M_node._M_next = &this->_M_impl._M_node; + this->_M_impl._M_node._M_prev = &this->_M_impl._M_node; + } + }; +# 416 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + template > + class list : protected _List_base<_Tp, _Alloc> + { + + typedef typename _Alloc::value_type _Alloc_value_type; + + + + typedef _List_base<_Tp, _Alloc> _Base; + typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; + + public: + typedef _Tp value_type; + typedef typename _Tp_alloc_type::pointer pointer; + typedef typename _Tp_alloc_type::const_pointer const_pointer; + typedef typename _Tp_alloc_type::reference reference; + typedef typename _Tp_alloc_type::const_reference const_reference; + typedef _List_iterator<_Tp> iterator; + typedef _List_const_iterator<_Tp> const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Alloc allocator_type; + + protected: + + + typedef _List_node<_Tp> _Node; + + using _Base::_M_impl; + using _Base::_M_put_node; + using _Base::_M_get_node; + using _Base::_M_get_Tp_allocator; + using _Base::_M_get_Node_allocator; + + + + + + + + _Node* + _M_create_node(const value_type& __x) + { + _Node* __p = this->_M_get_node(); + try + { + _M_get_Tp_allocator().construct(&__p->_M_data, __x); + } + catch(...) + { + _M_put_node(__p); + throw; + } + return __p; + } +# 493 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + public: + + + + + + list() + : _Base() { } + + + + + + explicit + list(const allocator_type& __a) + : _Base(__a) { } +# 518 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + explicit + list(size_type __n, const value_type& __value = value_type(), + const allocator_type& __a = allocator_type()) + : _Base(__a) + { _M_fill_initialize(__n, __value); } +# 531 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + list(const list& __x) + : _Base(__x._M_get_Node_allocator()) + { _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); } +# 570 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + template + list(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_initialize_dispatch(__first, __last, _Integral()); + } +# 595 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + list& + operator=(const list& __x); +# 641 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + void + assign(size_type __n, const value_type& __val) + { _M_fill_assign(__n, __val); } +# 657 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + template + void + assign(_InputIterator __first, _InputIterator __last) + { + + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } +# 680 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + allocator_type + get_allocator() const + { return _Base::get_allocator(); } + + + + + + + iterator + begin() + { return iterator(this->_M_impl._M_node._M_next); } + + + + + + + const_iterator + begin() const + { return const_iterator(this->_M_impl._M_node._M_next); } + + + + + + + iterator + end() + { return iterator(&this->_M_impl._M_node); } + + + + + + + const_iterator + end() const + { return const_iterator(&this->_M_impl._M_node); } + + + + + + + reverse_iterator + rbegin() + { return reverse_iterator(end()); } + + + + + + + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(end()); } + + + + + + + reverse_iterator + rend() + { return reverse_iterator(begin()); } + + + + + + + const_reverse_iterator + rend() const + { return const_reverse_iterator(begin()); } +# 799 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + bool + empty() const + { return this->_M_impl._M_node._M_next == &this->_M_impl._M_node; } + + + size_type + size() const + { return std::distance(begin(), end()); } + + + size_type + max_size() const + { return _M_get_Node_allocator().max_size(); } +# 823 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + void + resize(size_type __new_size, value_type __x = value_type()); + + + + + + + reference + front() + { return *begin(); } + + + + + + const_reference + front() const + { return *begin(); } + + + + + + reference + back() + { + iterator __tmp = end(); + --__tmp; + return *__tmp; + } + + + + + + const_reference + back() const + { + const_iterator __tmp = end(); + --__tmp; + return *__tmp; + } +# 878 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + void + push_front(const value_type& __x) + { this->_M_insert(begin(), __x); } +# 905 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + void + pop_front() + { this->_M_erase(begin()); } +# 919 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + void + push_back(const value_type& __x) + { this->_M_insert(end(), __x); } +# 945 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + void + pop_back() + { this->_M_erase(iterator(this->_M_impl._M_node._M_prev)); } +# 978 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + iterator + insert(iterator __position, const value_type& __x); +# 1027 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + void + insert(iterator __position, size_type __n, const value_type& __x) + { + list __tmp(__n, __x, _M_get_Node_allocator()); + splice(__position, __tmp); + } +# 1047 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + template + void + insert(iterator __position, _InputIterator __first, + _InputIterator __last) + { + list __tmp(__first, __last, _M_get_Node_allocator()); + splice(__position, __tmp); + } +# 1071 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + iterator + erase(iterator __position); +# 1092 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + iterator + erase(iterator __first, iterator __last) + { + while (__first != __last) + __first = erase(__first); + return __last; + } +# 1109 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + void + swap(list& __x) + { + _List_node_base::swap(this->_M_impl._M_node, __x._M_impl._M_node); + + + + std::__alloc_swap:: + _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator()); + } + + + + + + + + void + clear() + { + _Base::_M_clear(); + _Base::_M_init(); + } +# 1145 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + void + + + + splice(iterator __position, list& __x) + + { + if (!__x.empty()) + { + _M_check_equal_allocators(__x); + + this->_M_transfer(__position, __x.begin(), __x.end()); + } + } +# 1175 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + void + + + + splice(iterator __position, list& __x, iterator __i) + + { + iterator __j = __i; + ++__j; + if (__position == __i || __position == __j) + return; + + if (this != &__x) + _M_check_equal_allocators(__x); + + this->_M_transfer(__position, __i, __j); + } +# 1211 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + void + + + + + splice(iterator __position, list& __x, iterator __first, + iterator __last) + + { + if (__first != __last) + { + if (this != &__x) + _M_check_equal_allocators(__x); + + this->_M_transfer(__position, __first, __last); + } + } +# 1246 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + void + remove(const _Tp& __value); +# 1260 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + template + void + remove_if(_Predicate); +# 1274 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + void + unique(); +# 1289 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + template + void + unique(_BinaryPredicate); +# 1310 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + void + merge(list& __x); +# 1336 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + template + void + merge(list&, _StrictWeakOrdering); + + + + + + + + void + reverse() + { this->_M_impl._M_node._M_reverse(); } + + + + + + + + void + sort(); + + + + + + + + template + void + sort(_StrictWeakOrdering); + + protected: + + + + + + + template + void + _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) + { _M_fill_initialize(static_cast(__n), __x); } + + + template + void + _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { + for (; __first != __last; ++__first) + push_back(*__first); + } + + + + void + _M_fill_initialize(size_type __n, const value_type& __x) + { + for (; __n > 0; --__n) + push_back(__x); + } +# 1407 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + template + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } + + + template + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + __false_type); + + + + void + _M_fill_assign(size_type __n, const value_type& __val); + + + + void + _M_transfer(iterator __position, iterator __first, iterator __last) + { __position._M_node->_M_transfer(__first._M_node, __last._M_node); } + + + + void + _M_insert(iterator __position, const value_type& __x) + { + _Node* __tmp = _M_create_node(__x); + __tmp->_M_hook(__position._M_node); + } +# 1448 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + void + _M_erase(iterator __position) + { + __position._M_node->_M_unhook(); + _Node* __n = static_cast<_Node*>(__position._M_node); + + + + _M_get_Tp_allocator().destroy(&__n->_M_data); + + _M_put_node(__n); + } + + + void + _M_check_equal_allocators(list& __x) + { + if (std::__alloc_neq:: + _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator())) + __throw_runtime_error(("list::_M_check_equal_allocators")); + } + }; +# 1481 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + template + inline bool + operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { + typedef typename list<_Tp, _Alloc>::const_iterator const_iterator; + const_iterator __end1 = __x.end(); + const_iterator __end2 = __y.end(); + + const_iterator __i1 = __x.begin(); + const_iterator __i2 = __y.begin(); + while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2) + { + ++__i1; + ++__i2; + } + return __i1 == __end1 && __i2 == __end2; + } +# 1510 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_list.h" 3 + template + inline bool + operator<(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return std::lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); } + + + template + inline bool + operator!=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return !(__x == __y); } + + + template + inline bool + operator>(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return __y < __x; } + + + template + inline bool + operator<=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return !(__y < __x); } + + + template + inline bool + operator>=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return !(__x < __y); } + + + template + inline void + swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y) + { __x.swap(__y); } + +} +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/list" 2 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/list.tcc" 1 3 +# 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/list.tcc" 3 +#define _LIST_TCC 1 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + void + _List_base<_Tp, _Alloc>:: + _M_clear() + { + typedef _List_node<_Tp> _Node; + _Node* __cur = static_cast<_Node*>(this->_M_impl._M_node._M_next); + while (__cur != &this->_M_impl._M_node) + { + _Node* __tmp = __cur; + __cur = static_cast<_Node*>(__cur->_M_next); + + + + _M_get_Tp_allocator().destroy(&__tmp->_M_data); + + _M_put_node(__tmp); + } + } +# 95 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/list.tcc" 3 + template + typename list<_Tp, _Alloc>::iterator + list<_Tp, _Alloc>:: + insert(iterator __position, const value_type& __x) + { + _Node* __tmp = _M_create_node(__x); + __tmp->_M_hook(__position._M_node); + return iterator(__tmp); + } + + template + typename list<_Tp, _Alloc>::iterator + list<_Tp, _Alloc>:: + erase(iterator __position) + { + iterator __ret = iterator(__position._M_node->_M_next); + _M_erase(__position); + return __ret; + } + + template + void + list<_Tp, _Alloc>:: + resize(size_type __new_size, value_type __x) + { + iterator __i = begin(); + size_type __len = 0; + for (; __i != end() && __len < __new_size; ++__i, ++__len) + ; + if (__len == __new_size) + erase(__i, end()); + else + insert(end(), __new_size - __len, __x); + } + + template + list<_Tp, _Alloc>& + list<_Tp, _Alloc>:: + operator=(const list& __x) + { + if (this != &__x) + { + iterator __first1 = begin(); + iterator __last1 = end(); + const_iterator __first2 = __x.begin(); + const_iterator __last2 = __x.end(); + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, ++__first2) + *__first1 = *__first2; + if (__first2 == __last2) + erase(__first1, __last1); + else + insert(__last1, __first2, __last2); + } + return *this; + } + + template + void + list<_Tp, _Alloc>:: + _M_fill_assign(size_type __n, const value_type& __val) + { + iterator __i = begin(); + for (; __i != end() && __n > 0; ++__i, --__n) + *__i = __val; + if (__n > 0) + insert(end(), __n, __val); + else + erase(__i, end()); + } + + template + template + void + list<_Tp, _Alloc>:: + _M_assign_dispatch(_InputIterator __first2, _InputIterator __last2, + __false_type) + { + iterator __first1 = begin(); + iterator __last1 = end(); + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, ++__first2) + *__first1 = *__first2; + if (__first2 == __last2) + erase(__first1, __last1); + else + insert(__last1, __first2, __last2); + } + + template + void + list<_Tp, _Alloc>:: + remove(const value_type& __value) + { + iterator __first = begin(); + iterator __last = end(); + iterator __extra = __last; + while (__first != __last) + { + iterator __next = __first; + ++__next; + if (*__first == __value) + { + + + + if (&*__first != &__value) + _M_erase(__first); + else + __extra = __first; + } + __first = __next; + } + if (__extra != __last) + _M_erase(__extra); + } + + template + void + list<_Tp, _Alloc>:: + unique() + { + iterator __first = begin(); + iterator __last = end(); + if (__first == __last) + return; + iterator __next = __first; + while (++__next != __last) + { + if (*__first == *__next) + _M_erase(__next); + else + __first = __next; + __next = __first; + } + } + + template + void + list<_Tp, _Alloc>:: + + + + merge(list& __x) + + { + + + if (this != &__x) + { + _M_check_equal_allocators(__x); + + iterator __first1 = begin(); + iterator __last1 = end(); + iterator __first2 = __x.begin(); + iterator __last2 = __x.end(); + while (__first1 != __last1 && __first2 != __last2) + if (*__first2 < *__first1) + { + iterator __next = __first2; + _M_transfer(__first1, __first2, ++__next); + __first2 = __next; + } + else + ++__first1; + if (__first2 != __last2) + _M_transfer(__last1, __first2, __last2); + } + } + + template + template + void + list<_Tp, _Alloc>:: + + + + merge(list& __x, _StrictWeakOrdering __comp) + + { + + + if (this != &__x) + { + _M_check_equal_allocators(__x); + + iterator __first1 = begin(); + iterator __last1 = end(); + iterator __first2 = __x.begin(); + iterator __last2 = __x.end(); + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first2, *__first1)) + { + iterator __next = __first2; + _M_transfer(__first1, __first2, ++__next); + __first2 = __next; + } + else + ++__first1; + if (__first2 != __last2) + _M_transfer(__last1, __first2, __last2); + } + } + + template + void + list<_Tp, _Alloc>:: + sort() + { + + if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node + && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node) + { + list __carry; + list __tmp[64]; + list * __fill = &__tmp[0]; + list * __counter; + + do + { + __carry.splice(__carry.begin(), *this, begin()); + + for(__counter = &__tmp[0]; + __counter != __fill && !__counter->empty(); + ++__counter) + { + __counter->merge(__carry); + __carry.swap(*__counter); + } + __carry.swap(*__counter); + if (__counter == __fill) + ++__fill; + } + while ( !empty() ); + + for (__counter = &__tmp[1]; __counter != __fill; ++__counter) + __counter->merge(*(__counter - 1)); + swap( *(__fill - 1) ); + } + } + + template + template + void + list<_Tp, _Alloc>:: + remove_if(_Predicate __pred) + { + iterator __first = begin(); + iterator __last = end(); + while (__first != __last) + { + iterator __next = __first; + ++__next; + if (__pred(*__first)) + _M_erase(__first); + __first = __next; + } + } + + template + template + void + list<_Tp, _Alloc>:: + unique(_BinaryPredicate __binary_pred) + { + iterator __first = begin(); + iterator __last = end(); + if (__first == __last) + return; + iterator __next = __first; + while (++__next != __last) + { + if (__binary_pred(*__first, *__next)) + _M_erase(__next); + else + __first = __next; + __next = __first; + } + } + + template + template + void + list<_Tp, _Alloc>:: + sort(_StrictWeakOrdering __comp) + { + + if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node + && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node) + { + list __carry; + list __tmp[64]; + list * __fill = &__tmp[0]; + list * __counter; + + do + { + __carry.splice(__carry.begin(), *this, begin()); + + for(__counter = &__tmp[0]; + __counter != __fill && !__counter->empty(); + ++__counter) + { + __counter->merge(__carry, __comp); + __carry.swap(*__counter); + } + __carry.swap(*__counter); + if (__counter == __fill) + ++__fill; + } + while ( !empty() ); + + for (__counter = &__tmp[1]; __counter != __fill; ++__counter) + __counter->merge(*(__counter - 1), __comp); + swap(*(__fill - 1)); + } + } + +} +# 67 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/list" 2 3 +# 33 "../fwbuilder/FWObject.h" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/map" 1 3 +# 56 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/map" 3 +#define _GLIBCXX_MAP 1 + + +# 59 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/map" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_tree.h" 1 3 +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_tree.h" 3 +#define _STL_TREE_H 1 + + + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 85 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_tree.h" 3 + enum _Rb_tree_color { _S_red = false, _S_black = true }; + + struct _Rb_tree_node_base + { + typedef _Rb_tree_node_base* _Base_ptr; + typedef const _Rb_tree_node_base* _Const_Base_ptr; + + _Rb_tree_color _M_color; + _Base_ptr _M_parent; + _Base_ptr _M_left; + _Base_ptr _M_right; + + static _Base_ptr + _S_minimum(_Base_ptr __x) + { + while (__x->_M_left != 0) __x = __x->_M_left; + return __x; + } + + static _Const_Base_ptr + _S_minimum(_Const_Base_ptr __x) + { + while (__x->_M_left != 0) __x = __x->_M_left; + return __x; + } + + static _Base_ptr + _S_maximum(_Base_ptr __x) + { + while (__x->_M_right != 0) __x = __x->_M_right; + return __x; + } + + static _Const_Base_ptr + _S_maximum(_Const_Base_ptr __x) + { + while (__x->_M_right != 0) __x = __x->_M_right; + return __x; + } + }; + + template + struct _Rb_tree_node : public _Rb_tree_node_base + { + typedef _Rb_tree_node<_Val>* _Link_type; + _Val _M_value_field; + + + + + + + + }; + + __attribute__ ((__pure__)) _Rb_tree_node_base* + _Rb_tree_increment(_Rb_tree_node_base* __x) throw (); + + __attribute__ ((__pure__)) const _Rb_tree_node_base* + _Rb_tree_increment(const _Rb_tree_node_base* __x) throw (); + + __attribute__ ((__pure__)) _Rb_tree_node_base* + _Rb_tree_decrement(_Rb_tree_node_base* __x) throw (); + + __attribute__ ((__pure__)) const _Rb_tree_node_base* + _Rb_tree_decrement(const _Rb_tree_node_base* __x) throw (); + + template + struct _Rb_tree_iterator + { + typedef _Tp value_type; + typedef _Tp& reference; + typedef _Tp* pointer; + + typedef bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + + typedef _Rb_tree_iterator<_Tp> _Self; + typedef _Rb_tree_node_base::_Base_ptr _Base_ptr; + typedef _Rb_tree_node<_Tp>* _Link_type; + + _Rb_tree_iterator() + : _M_node() { } + + explicit + _Rb_tree_iterator(_Link_type __x) + : _M_node(__x) { } + + reference + operator*() const + { return static_cast<_Link_type>(_M_node)->_M_value_field; } + + pointer + operator->() const + { return &static_cast<_Link_type>(_M_node)->_M_value_field; } + + _Self& + operator++() + { + _M_node = _Rb_tree_increment(_M_node); + return *this; + } + + _Self + operator++(int) + { + _Self __tmp = *this; + _M_node = _Rb_tree_increment(_M_node); + return __tmp; + } + + _Self& + operator--() + { + _M_node = _Rb_tree_decrement(_M_node); + return *this; + } + + _Self + operator--(int) + { + _Self __tmp = *this; + _M_node = _Rb_tree_decrement(_M_node); + return __tmp; + } + + bool + operator==(const _Self& __x) const + { return _M_node == __x._M_node; } + + bool + operator!=(const _Self& __x) const + { return _M_node != __x._M_node; } + + _Base_ptr _M_node; + }; + + template + struct _Rb_tree_const_iterator + { + typedef _Tp value_type; + typedef const _Tp& reference; + typedef const _Tp* pointer; + + typedef _Rb_tree_iterator<_Tp> iterator; + + typedef bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + + typedef _Rb_tree_const_iterator<_Tp> _Self; + typedef _Rb_tree_node_base::_Const_Base_ptr _Base_ptr; + typedef const _Rb_tree_node<_Tp>* _Link_type; + + _Rb_tree_const_iterator() + : _M_node() { } + + explicit + _Rb_tree_const_iterator(_Link_type __x) + : _M_node(__x) { } + + _Rb_tree_const_iterator(const iterator& __it) + : _M_node(__it._M_node) { } + + reference + operator*() const + { return static_cast<_Link_type>(_M_node)->_M_value_field; } + + pointer + operator->() const + { return &static_cast<_Link_type>(_M_node)->_M_value_field; } + + _Self& + operator++() + { + _M_node = _Rb_tree_increment(_M_node); + return *this; + } + + _Self + operator++(int) + { + _Self __tmp = *this; + _M_node = _Rb_tree_increment(_M_node); + return __tmp; + } + + _Self& + operator--() + { + _M_node = _Rb_tree_decrement(_M_node); + return *this; + } + + _Self + operator--(int) + { + _Self __tmp = *this; + _M_node = _Rb_tree_decrement(_M_node); + return __tmp; + } + + bool + operator==(const _Self& __x) const + { return _M_node == __x._M_node; } + + bool + operator!=(const _Self& __x) const + { return _M_node != __x._M_node; } + + _Base_ptr _M_node; + }; + + template + inline bool + operator==(const _Rb_tree_iterator<_Val>& __x, + const _Rb_tree_const_iterator<_Val>& __y) + { return __x._M_node == __y._M_node; } + + template + inline bool + operator!=(const _Rb_tree_iterator<_Val>& __x, + const _Rb_tree_const_iterator<_Val>& __y) + { return __x._M_node != __y._M_node; } + + void + _Rb_tree_insert_and_rebalance(const bool __insert_left, + _Rb_tree_node_base* __x, + _Rb_tree_node_base* __p, + _Rb_tree_node_base& __header) throw (); + + _Rb_tree_node_base* + _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z, + _Rb_tree_node_base& __header) throw (); + + + template > + class _Rb_tree + { + typedef typename _Alloc::template rebind<_Rb_tree_node<_Val> >::other + _Node_allocator; + + protected: + typedef _Rb_tree_node_base* _Base_ptr; + typedef const _Rb_tree_node_base* _Const_Base_ptr; + + public: + typedef _Key key_type; + typedef _Val value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef _Rb_tree_node<_Val>* _Link_type; + typedef const _Rb_tree_node<_Val>* _Const_Link_type; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Alloc allocator_type; + + _Node_allocator& + _M_get_Node_allocator() + { return *static_cast<_Node_allocator*>(&this->_M_impl); } + + const _Node_allocator& + _M_get_Node_allocator() const + { return *static_cast(&this->_M_impl); } + + allocator_type + get_allocator() const + { return allocator_type(_M_get_Node_allocator()); } + + protected: + _Link_type + _M_get_node() + { return _M_impl._Node_allocator::allocate(1); } + + void + _M_put_node(_Link_type __p) + { _M_impl._Node_allocator::deallocate(__p, 1); } + + + _Link_type + _M_create_node(const value_type& __x) + { + _Link_type __tmp = _M_get_node(); + try + { get_allocator().construct(&__tmp->_M_value_field, __x); } + catch(...) + { + _M_put_node(__tmp); + throw; + } + return __tmp; + } + + void + _M_destroy_node(_Link_type __p) + { + get_allocator().destroy(&__p->_M_value_field); + _M_put_node(__p); + } +# 413 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_tree.h" 3 + _Link_type + _M_clone_node(_Const_Link_type __x) + { + _Link_type __tmp = _M_create_node(__x->_M_value_field); + __tmp->_M_color = __x->_M_color; + __tmp->_M_left = 0; + __tmp->_M_right = 0; + return __tmp; + } + + protected: + template + struct _Rb_tree_impl : public _Node_allocator + { + _Key_compare _M_key_compare; + _Rb_tree_node_base _M_header; + size_type _M_node_count; + + _Rb_tree_impl() + : _Node_allocator(), _M_key_compare(), _M_header(), + _M_node_count(0) + { _M_initialize(); } + + _Rb_tree_impl(const _Key_compare& __comp, const _Node_allocator& __a) + : _Node_allocator(__a), _M_key_compare(__comp), _M_header(), + _M_node_count(0) + { _M_initialize(); } + + private: + void + _M_initialize() + { + this->_M_header._M_color = _S_red; + this->_M_header._M_parent = 0; + this->_M_header._M_left = &this->_M_header; + this->_M_header._M_right = &this->_M_header; + } + }; + + _Rb_tree_impl<_Compare> _M_impl; + + protected: + _Base_ptr& + _M_root() + { return this->_M_impl._M_header._M_parent; } + + _Const_Base_ptr + _M_root() const + { return this->_M_impl._M_header._M_parent; } + + _Base_ptr& + _M_leftmost() + { return this->_M_impl._M_header._M_left; } + + _Const_Base_ptr + _M_leftmost() const + { return this->_M_impl._M_header._M_left; } + + _Base_ptr& + _M_rightmost() + { return this->_M_impl._M_header._M_right; } + + _Const_Base_ptr + _M_rightmost() const + { return this->_M_impl._M_header._M_right; } + + _Link_type + _M_begin() + { return static_cast<_Link_type>(this->_M_impl._M_header._M_parent); } + + _Const_Link_type + _M_begin() const + { + return static_cast<_Const_Link_type> + (this->_M_impl._M_header._M_parent); + } + + _Link_type + _M_end() + { return static_cast<_Link_type>(&this->_M_impl._M_header); } + + _Const_Link_type + _M_end() const + { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); } + + static const_reference + _S_value(_Const_Link_type __x) + { return __x->_M_value_field; } + + static const _Key& + _S_key(_Const_Link_type __x) + { return _KeyOfValue()(_S_value(__x)); } + + static _Link_type + _S_left(_Base_ptr __x) + { return static_cast<_Link_type>(__x->_M_left); } + + static _Const_Link_type + _S_left(_Const_Base_ptr __x) + { return static_cast<_Const_Link_type>(__x->_M_left); } + + static _Link_type + _S_right(_Base_ptr __x) + { return static_cast<_Link_type>(__x->_M_right); } + + static _Const_Link_type + _S_right(_Const_Base_ptr __x) + { return static_cast<_Const_Link_type>(__x->_M_right); } + + static const_reference + _S_value(_Const_Base_ptr __x) + { return static_cast<_Const_Link_type>(__x)->_M_value_field; } + + static const _Key& + _S_key(_Const_Base_ptr __x) + { return _KeyOfValue()(_S_value(__x)); } + + static _Base_ptr + _S_minimum(_Base_ptr __x) + { return _Rb_tree_node_base::_S_minimum(__x); } + + static _Const_Base_ptr + _S_minimum(_Const_Base_ptr __x) + { return _Rb_tree_node_base::_S_minimum(__x); } + + static _Base_ptr + _S_maximum(_Base_ptr __x) + { return _Rb_tree_node_base::_S_maximum(__x); } + + static _Const_Base_ptr + _S_maximum(_Const_Base_ptr __x) + { return _Rb_tree_node_base::_S_maximum(__x); } + + public: + typedef _Rb_tree_iterator iterator; + typedef _Rb_tree_const_iterator const_iterator; + + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + + private: + iterator + _M_insert_(_Const_Base_ptr __x, _Const_Base_ptr __y, + const value_type& __v); + + + + iterator + _M_insert_lower(_Base_ptr __x, _Base_ptr __y, const value_type& __v); + + iterator + _M_insert_equal_lower(const value_type& __x); + + _Link_type + _M_copy(_Const_Link_type __x, _Link_type __p); + + void + _M_erase(_Link_type __x); + + iterator + _M_lower_bound(_Link_type __x, _Link_type __y, + const _Key& __k); + + const_iterator + _M_lower_bound(_Const_Link_type __x, _Const_Link_type __y, + const _Key& __k) const; + + iterator + _M_upper_bound(_Link_type __x, _Link_type __y, + const _Key& __k); + + const_iterator + _M_upper_bound(_Const_Link_type __x, _Const_Link_type __y, + const _Key& __k) const; + + public: + + _Rb_tree() { } + + _Rb_tree(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_impl(__comp, __a) { } + + _Rb_tree(const _Rb_tree& __x) + : _M_impl(__x._M_impl._M_key_compare, __x._M_get_Node_allocator()) + { + if (__x._M_root() != 0) + { + _M_root() = _M_copy(__x._M_begin(), _M_end()); + _M_leftmost() = _S_minimum(_M_root()); + _M_rightmost() = _S_maximum(_M_root()); + _M_impl._M_node_count = __x._M_impl._M_node_count; + } + } + + + + + + ~_Rb_tree() + { _M_erase(_M_begin()); } + + _Rb_tree& + operator=(const _Rb_tree& __x); + + + _Compare + key_comp() const + { return _M_impl._M_key_compare; } + + iterator + begin() + { + return iterator(static_cast<_Link_type> + (this->_M_impl._M_header._M_left)); + } + + const_iterator + begin() const + { + return const_iterator(static_cast<_Const_Link_type> + (this->_M_impl._M_header._M_left)); + } + + iterator + end() + { return iterator(static_cast<_Link_type>(&this->_M_impl._M_header)); } + + const_iterator + end() const + { + return const_iterator(static_cast<_Const_Link_type> + (&this->_M_impl._M_header)); + } + + reverse_iterator + rbegin() + { return reverse_iterator(end()); } + + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(end()); } + + reverse_iterator + rend() + { return reverse_iterator(begin()); } + + const_reverse_iterator + rend() const + { return const_reverse_iterator(begin()); } + + bool + empty() const + { return _M_impl._M_node_count == 0; } + + size_type + size() const + { return _M_impl._M_node_count; } + + size_type + max_size() const + { return _M_get_Node_allocator().max_size(); } + + void + swap(_Rb_tree& __t); + + + pair + _M_insert_unique(const value_type& __x); + + iterator + _M_insert_equal(const value_type& __x); + + iterator + _M_insert_unique_(const_iterator __position, const value_type& __x); + + iterator + _M_insert_equal_(const_iterator __position, const value_type& __x); + + template + void + _M_insert_unique(_InputIterator __first, _InputIterator __last); + + template + void + _M_insert_equal(_InputIterator __first, _InputIterator __last); +# 712 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_tree.h" 3 + void + erase(iterator __position); + + void + erase(const_iterator __position); + + size_type + erase(const key_type& __x); +# 732 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_tree.h" 3 + void + erase(iterator __first, iterator __last); + + void + erase(const_iterator __first, const_iterator __last); + + void + erase(const key_type* __first, const key_type* __last); + + void + clear() + { + _M_erase(_M_begin()); + _M_leftmost() = _M_end(); + _M_root() = 0; + _M_rightmost() = _M_end(); + _M_impl._M_node_count = 0; + } + + + iterator + find(const key_type& __k); + + const_iterator + find(const key_type& __k) const; + + size_type + count(const key_type& __k) const; + + iterator + lower_bound(const key_type& __k) + { return _M_lower_bound(_M_begin(), _M_end(), __k); } + + const_iterator + lower_bound(const key_type& __k) const + { return _M_lower_bound(_M_begin(), _M_end(), __k); } + + iterator + upper_bound(const key_type& __k) + { return _M_upper_bound(_M_begin(), _M_end(), __k); } + + const_iterator + upper_bound(const key_type& __k) const + { return _M_upper_bound(_M_begin(), _M_end(), __k); } + + pair + equal_range(const key_type& __k); + + pair + equal_range(const key_type& __k) const; + + + bool + __rb_verify() const; + }; + + template + inline bool + operator==(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { + return __x.size() == __y.size() + && std::equal(__x.begin(), __x.end(), __y.begin()); + } + + template + inline bool + operator<(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { + return std::lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); + } + + template + inline bool + operator!=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { return !(__x == __y); } + + template + inline bool + operator>(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { return __y < __x; } + + template + inline bool + operator<=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { return !(__y < __x); } + + template + inline bool + operator>=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { return !(__x < __y); } + + template + inline void + swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { __x.swap(__y); } +# 867 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_tree.h" 3 + template + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + operator=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x) + { + if (this != &__x) + { + + clear(); + _M_impl._M_key_compare = __x._M_impl._M_key_compare; + if (__x._M_root() != 0) + { + _M_root() = _M_copy(__x._M_begin(), _M_end()); + _M_leftmost() = _S_minimum(_M_root()); + _M_rightmost() = _S_maximum(_M_root()); + _M_impl._M_node_count = __x._M_impl._M_node_count; + } + } + return *this; + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_(_Const_Base_ptr __x, _Const_Base_ptr __p, const _Val& __v) + { + bool __insert_left = (__x != 0 || __p == _M_end() + || _M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key(__p))); + + _Link_type __z = _M_create_node(__v); + + _Rb_tree_insert_and_rebalance(__insert_left, __z, + const_cast<_Base_ptr>(__p), + this->_M_impl._M_header); + ++_M_impl._M_node_count; + return iterator(__z); + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_lower(_Base_ptr __x, _Base_ptr __p, const _Val& __v) + { + bool __insert_left = (__x != 0 || __p == _M_end() + || !_M_impl._M_key_compare(_S_key(__p), + _KeyOfValue()(__v))); + + _Link_type __z = _M_create_node(__v); + + _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, + this->_M_impl._M_header); + ++_M_impl._M_node_count; + return iterator(__z); + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_equal_lower(const _Val& __v) + { + _Link_type __x = _M_begin(); + _Link_type __y = _M_end(); + while (__x != 0) + { + __y = __x; + __x = !_M_impl._M_key_compare(_S_key(__x), _KeyOfValue()(__v)) ? + _S_left(__x) : _S_right(__x); + } + return _M_insert_lower(__x, __y, __v); + } + + template + typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::_Link_type + _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>:: + _M_copy(_Const_Link_type __x, _Link_type __p) + { + + _Link_type __top = _M_clone_node(__x); + __top->_M_parent = __p; + + try + { + if (__x->_M_right) + __top->_M_right = _M_copy(_S_right(__x), __top); + __p = __top; + __x = _S_left(__x); + + while (__x != 0) + { + _Link_type __y = _M_clone_node(__x); + __p->_M_left = __y; + __y->_M_parent = __p; + if (__x->_M_right) + __y->_M_right = _M_copy(_S_right(__x), __y); + __p = __y; + __x = _S_left(__x); + } + } + catch(...) + { + _M_erase(__top); + throw; + } + return __top; + } + + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_erase(_Link_type __x) + { + + while (__x != 0) + { + _M_erase(_S_right(__x)); + _Link_type __y = _S_left(__x); + _M_destroy_node(__x); + __x = __y; + } + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_lower_bound(_Link_type __x, _Link_type __y, + const _Key& __k) + { + while (__x != 0) + if (!_M_impl._M_key_compare(_S_key(__x), __k)) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + return iterator(__y); + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::const_iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_lower_bound(_Const_Link_type __x, _Const_Link_type __y, + const _Key& __k) const + { + while (__x != 0) + if (!_M_impl._M_key_compare(_S_key(__x), __k)) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + return const_iterator(__y); + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_upper_bound(_Link_type __x, _Link_type __y, + const _Key& __k) + { + while (__x != 0) + if (_M_impl._M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + return iterator(__y); + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::const_iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_upper_bound(_Const_Link_type __x, _Const_Link_type __y, + const _Key& __k) const + { + while (__x != 0) + if (_M_impl._M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + return const_iterator(__y); + } + + template + pair::iterator, + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::iterator> + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + equal_range(const _Key& __k) + { + _Link_type __x = _M_begin(); + _Link_type __y = _M_end(); + while (__x != 0) + { + if (_M_impl._M_key_compare(_S_key(__x), __k)) + __x = _S_right(__x); + else if (_M_impl._M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + { + _Link_type __xu(__x), __yu(__y); + __y = __x, __x = _S_left(__x); + __xu = _S_right(__xu); + return pair(_M_lower_bound(__x, __y, __k), + _M_upper_bound(__xu, __yu, __k)); + } + } + return pair(iterator(__y), + iterator(__y)); + } + + template + pair::const_iterator, + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::const_iterator> + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + equal_range(const _Key& __k) const + { + _Const_Link_type __x = _M_begin(); + _Const_Link_type __y = _M_end(); + while (__x != 0) + { + if (_M_impl._M_key_compare(_S_key(__x), __k)) + __x = _S_right(__x); + else if (_M_impl._M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + { + _Const_Link_type __xu(__x), __yu(__y); + __y = __x, __x = _S_left(__x); + __xu = _S_right(__xu); + return pair(_M_lower_bound(__x, __y, __k), + _M_upper_bound(__xu, __yu, __k)); + } + } + return pair(const_iterator(__y), + const_iterator(__y)); + } + + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __t) + { + if (_M_root() == 0) + { + if (__t._M_root() != 0) + { + _M_root() = __t._M_root(); + _M_leftmost() = __t._M_leftmost(); + _M_rightmost() = __t._M_rightmost(); + _M_root()->_M_parent = _M_end(); + + __t._M_root() = 0; + __t._M_leftmost() = __t._M_end(); + __t._M_rightmost() = __t._M_end(); + } + } + else if (__t._M_root() == 0) + { + __t._M_root() = _M_root(); + __t._M_leftmost() = _M_leftmost(); + __t._M_rightmost() = _M_rightmost(); + __t._M_root()->_M_parent = __t._M_end(); + + _M_root() = 0; + _M_leftmost() = _M_end(); + _M_rightmost() = _M_end(); + } + else + { + std::swap(_M_root(),__t._M_root()); + std::swap(_M_leftmost(),__t._M_leftmost()); + std::swap(_M_rightmost(),__t._M_rightmost()); + + _M_root()->_M_parent = _M_end(); + __t._M_root()->_M_parent = __t._M_end(); + } + + std::swap(this->_M_impl._M_node_count, __t._M_impl._M_node_count); + std::swap(this->_M_impl._M_key_compare, __t._M_impl._M_key_compare); + + + + std::__alloc_swap<_Node_allocator>:: + _S_do_it(_M_get_Node_allocator(), __t._M_get_Node_allocator()); + } + + template + pair::iterator, bool> + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_unique(const _Val& __v) + { + _Link_type __x = _M_begin(); + _Link_type __y = _M_end(); + bool __comp = true; + while (__x != 0) + { + __y = __x; + __comp = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x)); + __x = __comp ? _S_left(__x) : _S_right(__x); + } + iterator __j = iterator(__y); + if (__comp) + { + if (__j == begin()) + return pair(_M_insert_(__x, __y, __v), true); + else + --__j; + } + if (_M_impl._M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v))) + return pair(_M_insert_(__x, __y, __v), true); + return pair(__j, false); + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_equal(const _Val& __v) + { + _Link_type __x = _M_begin(); + _Link_type __y = _M_end(); + while (__x != 0) + { + __y = __x; + __x = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x)) ? + _S_left(__x) : _S_right(__x); + } + return _M_insert_(__x, __y, __v); + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_unique_(const_iterator __position, const _Val& __v) + { + + if (__position._M_node == _M_end()) + { + if (size() > 0 + && _M_impl._M_key_compare(_S_key(_M_rightmost()), + _KeyOfValue()(__v))) + return _M_insert_(0, _M_rightmost(), __v); + else + return _M_insert_unique(__v).first; + } + else if (_M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key(__position._M_node))) + { + + const_iterator __before = __position; + if (__position._M_node == _M_leftmost()) + return _M_insert_(_M_leftmost(), _M_leftmost(), __v); + else if (_M_impl._M_key_compare(_S_key((--__before)._M_node), + _KeyOfValue()(__v))) + { + if (_S_right(__before._M_node) == 0) + return _M_insert_(0, __before._M_node, __v); + else + return _M_insert_(__position._M_node, + __position._M_node, __v); + } + else + return _M_insert_unique(__v).first; + } + else if (_M_impl._M_key_compare(_S_key(__position._M_node), + _KeyOfValue()(__v))) + { + + const_iterator __after = __position; + if (__position._M_node == _M_rightmost()) + return _M_insert_(0, _M_rightmost(), __v); + else if (_M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key((++__after)._M_node))) + { + if (_S_right(__position._M_node) == 0) + return _M_insert_(0, __position._M_node, __v); + else + return _M_insert_(__after._M_node, __after._M_node, __v); + } + else + return _M_insert_unique(__v).first; + } + else + + return iterator(static_cast<_Link_type> + (const_cast<_Base_ptr>(__position._M_node))); + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_equal_(const_iterator __position, const _Val& __v) + { + + if (__position._M_node == _M_end()) + { + if (size() > 0 + && !_M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key(_M_rightmost()))) + return _M_insert_(0, _M_rightmost(), __v); + else + return _M_insert_equal(__v); + } + else if (!_M_impl._M_key_compare(_S_key(__position._M_node), + _KeyOfValue()(__v))) + { + + const_iterator __before = __position; + if (__position._M_node == _M_leftmost()) + return _M_insert_(_M_leftmost(), _M_leftmost(), __v); + else if (!_M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key((--__before)._M_node))) + { + if (_S_right(__before._M_node) == 0) + return _M_insert_(0, __before._M_node, __v); + else + return _M_insert_(__position._M_node, + __position._M_node, __v); + } + else + return _M_insert_equal(__v); + } + else + { + + const_iterator __after = __position; + if (__position._M_node == _M_rightmost()) + return _M_insert_(0, _M_rightmost(), __v); + else if (!_M_impl._M_key_compare(_S_key((++__after)._M_node), + _KeyOfValue()(__v))) + { + if (_S_right(__position._M_node) == 0) + return _M_insert_(0, __position._M_node, __v); + else + return _M_insert_(__after._M_node, __after._M_node, __v); + } + else + return _M_insert_equal_lower(__v); + } + } + + template + template + void + _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: + _M_insert_unique(_II __first, _II __last) + { + for (; __first != __last; ++__first) + _M_insert_unique_(end(), *__first); + } + + template + template + void + _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: + _M_insert_equal(_II __first, _II __last) + { + for (; __first != __last; ++__first) + _M_insert_equal_(end(), *__first); + } +# 1391 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_tree.h" 3 + template + inline void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(iterator __position) + { + _Link_type __y = + static_cast<_Link_type>(_Rb_tree_rebalance_for_erase + (__position._M_node, + this->_M_impl._M_header)); + _M_destroy_node(__y); + --_M_impl._M_node_count; + } + + template + inline void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(const_iterator __position) + { + _Link_type __y = + static_cast<_Link_type>(_Rb_tree_rebalance_for_erase + (const_cast<_Base_ptr>(__position._M_node), + this->_M_impl._M_header)); + _M_destroy_node(__y); + --_M_impl._M_node_count; + } + + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(const _Key& __x) + { + pair __p = equal_range(__x); + const size_type __old_size = size(); + erase(__p.first, __p.second); + return __old_size - size(); + } +# 1475 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_tree.h" 3 + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(iterator __first, iterator __last) + { + if (__first == begin() && __last == end()) + clear(); + else + while (__first != __last) + erase(__first++); + } + + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(const_iterator __first, const_iterator __last) + { + if (__first == begin() && __last == end()) + clear(); + else + while (__first != __last) + erase(__first++); + } + + + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(const _Key* __first, const _Key* __last) + { + while (__first != __last) + erase(*__first++); + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + find(const _Key& __k) + { + iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k); + return (__j == end() + || _M_impl._M_key_compare(__k, + _S_key(__j._M_node))) ? end() : __j; + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::const_iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + find(const _Key& __k) const + { + const_iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k); + return (__j == end() + || _M_impl._M_key_compare(__k, + _S_key(__j._M_node))) ? end() : __j; + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + count(const _Key& __k) const + { + pair __p = equal_range(__k); + const size_type __n = std::distance(__p.first, __p.second); + return __n; + } + + __attribute__ ((__pure__)) unsigned int + _Rb_tree_black_count(const _Rb_tree_node_base* __node, + const _Rb_tree_node_base* __root) throw (); + + template + bool + _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::__rb_verify() const + { + if (_M_impl._M_node_count == 0 || begin() == end()) + return _M_impl._M_node_count == 0 && begin() == end() + && this->_M_impl._M_header._M_left == _M_end() + && this->_M_impl._M_header._M_right == _M_end(); + + unsigned int __len = _Rb_tree_black_count(_M_leftmost(), _M_root()); + for (const_iterator __it = begin(); __it != end(); ++__it) + { + _Const_Link_type __x = static_cast<_Const_Link_type>(__it._M_node); + _Const_Link_type __L = _S_left(__x); + _Const_Link_type __R = _S_right(__x); + + if (__x->_M_color == _S_red) + if ((__L && __L->_M_color == _S_red) + || (__R && __R->_M_color == _S_red)) + return false; + + if (__L && _M_impl._M_key_compare(_S_key(__x), _S_key(__L))) + return false; + if (__R && _M_impl._M_key_compare(_S_key(__R), _S_key(__x))) + return false; + + if (!__L && !__R && _Rb_tree_black_count(__x, _M_root()) != __len) + return false; + } + + if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root())) + return false; + if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root())) + return false; + return true; + } + +} +# 61 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/map" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 1 3 +# 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 +#define _STL_MAP_H 1 + + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 84 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + template , + typename _Alloc = std::allocator > > + class map + { + public: + typedef _Key key_type; + typedef _Tp mapped_type; + typedef std::pair value_type; + typedef _Compare key_compare; + typedef _Alloc allocator_type; + + private: + + typedef typename _Alloc::value_type _Alloc_value_type; + + + + + + public: + class value_compare + : public std::binary_function + { + friend class map<_Key, _Tp, _Compare, _Alloc>; + protected: + _Compare comp; + + value_compare(_Compare __c) + : comp(__c) { } + + public: + bool operator()(const value_type& __x, const value_type& __y) const + { return comp(__x.first, __y.first); } + }; + + private: + + typedef typename _Alloc::template rebind::other + _Pair_alloc_type; + + typedef _Rb_tree, + key_compare, _Pair_alloc_type> _Rep_type; + + + _Rep_type _M_t; + + public: + + + typedef typename _Pair_alloc_type::pointer pointer; + typedef typename _Pair_alloc_type::const_pointer const_pointer; + typedef typename _Pair_alloc_type::reference reference; + typedef typename _Pair_alloc_type::const_reference const_reference; + typedef typename _Rep_type::iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + typedef typename _Rep_type::reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; + + + + + + + + map() + : _M_t() { } + + + + + + + explicit + map(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) { } +# 170 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + map(const map& __x) + : _M_t(__x._M_t) { } +# 211 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + template + map(_InputIterator __first, _InputIterator __last) + : _M_t() + { _M_t._M_insert_unique(__first, __last); } +# 227 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + template + map(_InputIterator __first, _InputIterator __last, + const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) + { _M_t._M_insert_unique(__first, __last); } +# 250 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + map& + operator=(const map& __x) + { + _M_t = __x._M_t; + return *this; + } +# 296 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + allocator_type + get_allocator() const + { return _M_t.get_allocator(); } + + + + + + + + iterator + begin() + { return _M_t.begin(); } + + + + + + + const_iterator + begin() const + { return _M_t.begin(); } + + + + + + + iterator + end() + { return _M_t.end(); } + + + + + + + const_iterator + end() const + { return _M_t.end(); } + + + + + + + reverse_iterator + rbegin() + { return _M_t.rbegin(); } + + + + + + + const_reverse_iterator + rbegin() const + { return _M_t.rbegin(); } + + + + + + + reverse_iterator + rend() + { return _M_t.rend(); } + + + + + + + const_reverse_iterator + rend() const + { return _M_t.rend(); } +# 415 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + bool + empty() const + { return _M_t.empty(); } + + + size_type + size() const + { return _M_t.size(); } + + + size_type + max_size() const + { return _M_t.max_size(); } +# 442 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + mapped_type& + operator[](const key_type& __k) + { + + + + iterator __i = lower_bound(__k); + + if (__i == end() || key_comp()(__k, (*__i).first)) + __i = insert(__i, value_type(__k, mapped_type())); + return (*__i).second; + } +# 464 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + mapped_type& + at(const key_type& __k) + { + iterator __i = lower_bound(__k); + if (__i == end() || key_comp()(__k, (*__i).first)) + __throw_out_of_range(("map::at")); + return (*__i).second; + } + + const mapped_type& + at(const key_type& __k) const + { + const_iterator __i = lower_bound(__k); + if (__i == end() || key_comp()(__k, (*__i).first)) + __throw_out_of_range(("map::at")); + return (*__i).second; + } +# 499 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + std::pair + insert(const value_type& __x) + { return _M_t._M_insert_unique(__x); } +# 539 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + iterator + insert(iterator __position, const value_type& __x) + { return _M_t._M_insert_unique_(__position, __x); } +# 551 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + template + void + insert(_InputIterator __first, _InputIterator __last) + { _M_t._M_insert_unique(__first, __last); } +# 586 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + void + erase(iterator __position) + { _M_t.erase(__position); } +# 602 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + size_type + erase(const key_type& __x) + { return _M_t.erase(__x); } +# 636 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + void + erase(iterator __first, iterator __last) + { _M_t.erase(__first, __last); } +# 652 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + void + swap(map& __x) + { _M_t.swap(__x._M_t); } + + + + + + + + void + clear() + { _M_t.clear(); } + + + + + + + key_compare + key_comp() const + { return _M_t.key_comp(); } + + + + + + value_compare + value_comp() const + { return value_compare(_M_t.key_comp()); } +# 695 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + iterator + find(const key_type& __x) + { return _M_t.find(__x); } +# 710 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + const_iterator + find(const key_type& __x) const + { return _M_t.find(__x); } +# 722 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + size_type + count(const key_type& __x) const + { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } +# 737 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + iterator + lower_bound(const key_type& __x) + { return _M_t.lower_bound(__x); } +# 752 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + const_iterator + lower_bound(const key_type& __x) const + { return _M_t.lower_bound(__x); } + + + + + + + + iterator + upper_bound(const key_type& __x) + { return _M_t.upper_bound(__x); } + + + + + + + + const_iterator + upper_bound(const key_type& __x) const + { return _M_t.upper_bound(__x); } +# 791 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + std::pair + equal_range(const key_type& __x) + { return _M_t.equal_range(__x); } +# 810 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + std::pair + equal_range(const key_type& __x) const + { return _M_t.equal_range(__x); } + + template + friend bool + operator==(const map<_K1, _T1, _C1, _A1>&, + const map<_K1, _T1, _C1, _A1>&); + + template + friend bool + operator<(const map<_K1, _T1, _C1, _A1>&, + const map<_K1, _T1, _C1, _A1>&); + }; +# 835 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + template + inline bool + operator==(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return __x._M_t == __y._M_t; } +# 852 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_map.h" 3 + template + inline bool + operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return __x._M_t < __y._M_t; } + + + template + inline bool + operator!=(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__x == __y); } + + + template + inline bool + operator>(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return __y < __x; } + + + template + inline bool + operator<=(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__y < __x); } + + + template + inline bool + operator>=(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__x < __y); } + + + template + inline void + swap(map<_Key, _Tp, _Compare, _Alloc>& __x, + map<_Key, _Tp, _Compare, _Alloc>& __y) + { __x.swap(__y); } + +} +# 62 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/map" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multimap.h" 1 3 +# 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multimap.h" 3 +#define _STL_MULTIMAP_H 1 + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 83 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multimap.h" 3 + template , + typename _Alloc = std::allocator > > + class multimap + { + public: + typedef _Key key_type; + typedef _Tp mapped_type; + typedef std::pair value_type; + typedef _Compare key_compare; + typedef _Alloc allocator_type; + + private: + + typedef typename _Alloc::value_type _Alloc_value_type; + + + + + + public: + class value_compare + : public std::binary_function + { + friend class multimap<_Key, _Tp, _Compare, _Alloc>; + protected: + _Compare comp; + + value_compare(_Compare __c) + : comp(__c) { } + + public: + bool operator()(const value_type& __x, const value_type& __y) const + { return comp(__x.first, __y.first); } + }; + + private: + + typedef typename _Alloc::template rebind::other + _Pair_alloc_type; + + typedef _Rb_tree, + key_compare, _Pair_alloc_type> _Rep_type; + + _Rep_type _M_t; + + public: + + + typedef typename _Pair_alloc_type::pointer pointer; + typedef typename _Pair_alloc_type::const_pointer const_pointer; + typedef typename _Pair_alloc_type::reference reference; + typedef typename _Pair_alloc_type::const_reference const_reference; + typedef typename _Rep_type::iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + typedef typename _Rep_type::reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; + + + + + + + multimap() + : _M_t() { } + + + + + + + explicit + multimap(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) { } +# 168 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multimap.h" 3 + multimap(const multimap& __x) + : _M_t(__x._M_t) { } +# 208 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multimap.h" 3 + template + multimap(_InputIterator __first, _InputIterator __last) + : _M_t() + { _M_t._M_insert_equal(__first, __last); } +# 224 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multimap.h" 3 + template + multimap(_InputIterator __first, _InputIterator __last, + const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) + { _M_t._M_insert_equal(__first, __last); } +# 247 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multimap.h" 3 + multimap& + operator=(const multimap& __x) + { + _M_t = __x._M_t; + return *this; + } +# 293 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multimap.h" 3 + allocator_type + get_allocator() const + { return _M_t.get_allocator(); } + + + + + + + + iterator + begin() + { return _M_t.begin(); } + + + + + + + const_iterator + begin() const + { return _M_t.begin(); } + + + + + + + iterator + end() + { return _M_t.end(); } + + + + + + + const_iterator + end() const + { return _M_t.end(); } + + + + + + + reverse_iterator + rbegin() + { return _M_t.rbegin(); } + + + + + + + const_reverse_iterator + rbegin() const + { return _M_t.rbegin(); } + + + + + + + reverse_iterator + rend() + { return _M_t.rend(); } + + + + + + + const_reverse_iterator + rend() const + { return _M_t.rend(); } +# 410 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multimap.h" 3 + bool + empty() const + { return _M_t.empty(); } + + + size_type + size() const + { return _M_t.size(); } + + + size_type + max_size() const + { return _M_t.max_size(); } +# 437 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multimap.h" 3 + iterator + insert(const value_type& __x) + { return _M_t._M_insert_equal(__x); } +# 461 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multimap.h" 3 + iterator + insert(iterator __position, const value_type& __x) + { return _M_t._M_insert_equal_(__position, __x); } +# 474 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multimap.h" 3 + template + void + insert(_InputIterator __first, _InputIterator __last) + { _M_t._M_insert_equal(__first, __last); } +# 522 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multimap.h" 3 + void + erase(iterator __position) + { _M_t.erase(__position); } +# 538 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multimap.h" 3 + size_type + erase(const key_type& __x) + { return _M_t.erase(__x); } +# 574 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multimap.h" 3 + void + erase(iterator __first, iterator __last) + { _M_t.erase(__first, __last); } +# 590 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multimap.h" 3 + void + swap(multimap& __x) + { _M_t.swap(__x._M_t); } + + + + + + + + void + clear() + { _M_t.clear(); } + + + + + + + key_compare + key_comp() const + { return _M_t.key_comp(); } + + + + + + value_compare + value_comp() const + { return value_compare(_M_t.key_comp()); } +# 633 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multimap.h" 3 + iterator + find(const key_type& __x) + { return _M_t.find(__x); } +# 648 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multimap.h" 3 + const_iterator + find(const key_type& __x) const + { return _M_t.find(__x); } + + + + + + + size_type + count(const key_type& __x) const + { return _M_t.count(__x); } +# 672 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multimap.h" 3 + iterator + lower_bound(const key_type& __x) + { return _M_t.lower_bound(__x); } +# 687 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multimap.h" 3 + const_iterator + lower_bound(const key_type& __x) const + { return _M_t.lower_bound(__x); } + + + + + + + + iterator + upper_bound(const key_type& __x) + { return _M_t.upper_bound(__x); } + + + + + + + + const_iterator + upper_bound(const key_type& __x) const + { return _M_t.upper_bound(__x); } +# 724 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multimap.h" 3 + std::pair + equal_range(const key_type& __x) + { return _M_t.equal_range(__x); } +# 741 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multimap.h" 3 + std::pair + equal_range(const key_type& __x) const + { return _M_t.equal_range(__x); } + + template + friend bool + operator==(const multimap<_K1, _T1, _C1, _A1>&, + const multimap<_K1, _T1, _C1, _A1>&); + + template + friend bool + operator<(const multimap<_K1, _T1, _C1, _A1>&, + const multimap<_K1, _T1, _C1, _A1>&); + }; +# 766 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multimap.h" 3 + template + inline bool + operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return __x._M_t == __y._M_t; } +# 783 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multimap.h" 3 + template + inline bool + operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return __x._M_t < __y._M_t; } + + + template + inline bool + operator!=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__x == __y); } + + + template + inline bool + operator>(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return __y < __x; } + + + template + inline bool + operator<=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__y < __x); } + + + template + inline bool + operator>=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__x < __y); } + + + template + inline void + swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x, + multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { __x.swap(__y); } + +} +# 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/map" 2 3 +# 34 "../fwbuilder/FWObject.h" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/set" 1 3 +# 56 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/set" 3 +#define _GLIBCXX_SET 1 + + +# 59 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/set" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_set.h" 1 3 +# 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_set.h" 3 +#define _STL_SET_H 1 + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 85 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_set.h" 3 + template, + typename _Alloc = std::allocator<_Key> > + class set + { + + typedef typename _Alloc::value_type _Alloc_value_type; + + + + + + public: + + + + typedef _Key key_type; + typedef _Key value_type; + typedef _Compare key_compare; + typedef _Compare value_compare; + typedef _Alloc allocator_type; + + + private: + typedef typename _Alloc::template rebind<_Key>::other _Key_alloc_type; + + typedef _Rb_tree, + key_compare, _Key_alloc_type> _Rep_type; + _Rep_type _M_t; + + public: + + + typedef typename _Key_alloc_type::pointer pointer; + typedef typename _Key_alloc_type::const_pointer const_pointer; + typedef typename _Key_alloc_type::reference reference; + typedef typename _Key_alloc_type::const_reference const_reference; + + + + typedef typename _Rep_type::const_iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::const_reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + + + + + + + set() + : _M_t() { } + + + + + + + explicit + set(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) { } +# 158 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_set.h" 3 + template + set(_InputIterator __first, _InputIterator __last) + : _M_t() + { _M_t._M_insert_unique(__first, __last); } +# 174 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_set.h" 3 + template + set(_InputIterator __first, _InputIterator __last, + const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) + { _M_t._M_insert_unique(__first, __last); } +# 188 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_set.h" 3 + set(const set& __x) + : _M_t(__x._M_t) { } +# 226 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_set.h" 3 + set& + operator=(const set& __x) + { + _M_t = __x._M_t; + return *this; + } +# 274 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_set.h" 3 + key_compare + key_comp() const + { return _M_t.key_comp(); } + + value_compare + value_comp() const + { return _M_t.key_comp(); } + + allocator_type + get_allocator() const + { return _M_t.get_allocator(); } + + + + + + + iterator + begin() const + { return _M_t.begin(); } + + + + + + + iterator + end() const + { return _M_t.end(); } + + + + + + + reverse_iterator + rbegin() const + { return _M_t.rbegin(); } + + + + + + + reverse_iterator + rend() const + { return _M_t.rend(); } +# 361 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_set.h" 3 + bool + empty() const + { return _M_t.empty(); } + + + size_type + size() const + { return _M_t.size(); } + + + size_type + max_size() const + { return _M_t.max_size(); } +# 386 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_set.h" 3 + void + swap(set& __x) + { _M_t.swap(__x._M_t); } +# 404 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_set.h" 3 + std::pair + insert(const value_type& __x) + { + std::pair __p = + _M_t._M_insert_unique(__x); + return std::pair(__p.first, __p.second); + } +# 431 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_set.h" 3 + iterator + insert(iterator __position, const value_type& __x) + { return _M_t._M_insert_unique_(__position, __x); } +# 444 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_set.h" 3 + template + void + insert(_InputIterator __first, _InputIterator __last) + { _M_t._M_insert_unique(__first, __last); } +# 490 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_set.h" 3 + void + erase(iterator __position) + { _M_t.erase(__position); } +# 506 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_set.h" 3 + size_type + erase(const key_type& __x) + { return _M_t.erase(__x); } +# 540 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_set.h" 3 + void + erase(iterator __first, iterator __last) + { _M_t.erase(__first, __last); } +# 551 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_set.h" 3 + void + clear() + { _M_t.clear(); } +# 565 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_set.h" 3 + size_type + count(const key_type& __x) const + { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } +# 583 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_set.h" 3 + iterator + find(const key_type& __x) + { return _M_t.find(__x); } + + const_iterator + find(const key_type& __x) const + { return _M_t.find(__x); } +# 604 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_set.h" 3 + iterator + lower_bound(const key_type& __x) + { return _M_t.lower_bound(__x); } + + const_iterator + lower_bound(const key_type& __x) const + { return _M_t.lower_bound(__x); } +# 620 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_set.h" 3 + iterator + upper_bound(const key_type& __x) + { return _M_t.upper_bound(__x); } + + const_iterator + upper_bound(const key_type& __x) const + { return _M_t.upper_bound(__x); } +# 645 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_set.h" 3 + std::pair + equal_range(const key_type& __x) + { return _M_t.equal_range(__x); } + + std::pair + equal_range(const key_type& __x) const + { return _M_t.equal_range(__x); } + + + template + friend bool + operator==(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&); + + template + friend bool + operator<(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&); + }; +# 674 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_set.h" 3 + template + inline bool + operator==(const set<_Key, _Compare, _Alloc>& __x, + const set<_Key, _Compare, _Alloc>& __y) + { return __x._M_t == __y._M_t; } +# 691 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_set.h" 3 + template + inline bool + operator<(const set<_Key, _Compare, _Alloc>& __x, + const set<_Key, _Compare, _Alloc>& __y) + { return __x._M_t < __y._M_t; } + + + template + inline bool + operator!=(const set<_Key, _Compare, _Alloc>& __x, + const set<_Key, _Compare, _Alloc>& __y) + { return !(__x == __y); } + + + template + inline bool + operator>(const set<_Key, _Compare, _Alloc>& __x, + const set<_Key, _Compare, _Alloc>& __y) + { return __y < __x; } + + + template + inline bool + operator<=(const set<_Key, _Compare, _Alloc>& __x, + const set<_Key, _Compare, _Alloc>& __y) + { return !(__y < __x); } + + + template + inline bool + operator>=(const set<_Key, _Compare, _Alloc>& __x, + const set<_Key, _Compare, _Alloc>& __y) + { return !(__x < __y); } + + + template + inline void + swap(set<_Key, _Compare, _Alloc>& __x, set<_Key, _Compare, _Alloc>& __y) + { __x.swap(__y); } + +} +# 62 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/set" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multiset.h" 1 3 +# 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multiset.h" 3 +#define _STL_MULTISET_H 1 + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 82 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multiset.h" 3 + template , + typename _Alloc = std::allocator<_Key> > + class multiset + { + + typedef typename _Alloc::value_type _Alloc_value_type; + + + + + + public: + + typedef _Key key_type; + typedef _Key value_type; + typedef _Compare key_compare; + typedef _Compare value_compare; + typedef _Alloc allocator_type; + + private: + + typedef typename _Alloc::template rebind<_Key>::other _Key_alloc_type; + + typedef _Rb_tree, + key_compare, _Key_alloc_type> _Rep_type; + + _Rep_type _M_t; + + public: + typedef typename _Key_alloc_type::pointer pointer; + typedef typename _Key_alloc_type::const_pointer const_pointer; + typedef typename _Key_alloc_type::reference reference; + typedef typename _Key_alloc_type::const_reference const_reference; + + + + typedef typename _Rep_type::const_iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::const_reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + + + + + + multiset() + : _M_t() { } + + + + + + + explicit + multiset(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) { } +# 151 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multiset.h" 3 + template + multiset(_InputIterator __first, _InputIterator __last) + : _M_t() + { _M_t._M_insert_equal(__first, __last); } +# 167 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multiset.h" 3 + template + multiset(_InputIterator __first, _InputIterator __last, + const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) + { _M_t._M_insert_equal(__first, __last); } +# 181 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multiset.h" 3 + multiset(const multiset& __x) + : _M_t(__x._M_t) { } +# 219 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multiset.h" 3 + multiset& + operator=(const multiset& __x) + { + _M_t = __x._M_t; + return *this; + } +# 267 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multiset.h" 3 + key_compare + key_comp() const + { return _M_t.key_comp(); } + + value_compare + value_comp() const + { return _M_t.key_comp(); } + + allocator_type + get_allocator() const + { return _M_t.get_allocator(); } + + + + + + + iterator + begin() const + { return _M_t.begin(); } + + + + + + + iterator + end() const + { return _M_t.end(); } + + + + + + + reverse_iterator + rbegin() const + { return _M_t.rbegin(); } + + + + + + + reverse_iterator + rend() const + { return _M_t.rend(); } +# 354 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multiset.h" 3 + bool + empty() const + { return _M_t.empty(); } + + + size_type + size() const + { return _M_t.size(); } + + + size_type + max_size() const + { return _M_t.max_size(); } +# 379 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multiset.h" 3 + void + swap(multiset& __x) + { _M_t.swap(__x._M_t); } +# 395 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multiset.h" 3 + iterator + insert(const value_type& __x) + { return _M_t._M_insert_equal(__x); } +# 419 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multiset.h" 3 + iterator + insert(iterator __position, const value_type& __x) + { return _M_t._M_insert_equal_(__position, __x); } +# 431 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multiset.h" 3 + template + void + insert(_InputIterator __first, _InputIterator __last) + { _M_t._M_insert_equal(__first, __last); } +# 479 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multiset.h" 3 + void + erase(iterator __position) + { _M_t.erase(__position); } +# 495 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multiset.h" 3 + size_type + erase(const key_type& __x) + { return _M_t.erase(__x); } +# 529 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multiset.h" 3 + void + erase(iterator __first, iterator __last) + { _M_t.erase(__first, __last); } +# 540 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multiset.h" 3 + void + clear() + { _M_t.clear(); } +# 551 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multiset.h" 3 + size_type + count(const key_type& __x) const + { return _M_t.count(__x); } +# 569 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multiset.h" 3 + iterator + find(const key_type& __x) + { return _M_t.find(__x); } + + const_iterator + find(const key_type& __x) const + { return _M_t.find(__x); } +# 590 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multiset.h" 3 + iterator + lower_bound(const key_type& __x) + { return _M_t.lower_bound(__x); } + + const_iterator + lower_bound(const key_type& __x) const + { return _M_t.lower_bound(__x); } +# 606 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multiset.h" 3 + iterator + upper_bound(const key_type& __x) + { return _M_t.upper_bound(__x); } + + const_iterator + upper_bound(const key_type& __x) const + { return _M_t.upper_bound(__x); } +# 631 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multiset.h" 3 + std::pair + equal_range(const key_type& __x) + { return _M_t.equal_range(__x); } + + std::pair + equal_range(const key_type& __x) const + { return _M_t.equal_range(__x); } + + template + friend bool + operator==(const multiset<_K1, _C1, _A1>&, + const multiset<_K1, _C1, _A1>&); + + template + friend bool + operator< (const multiset<_K1, _C1, _A1>&, + const multiset<_K1, _C1, _A1>&); + }; +# 661 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multiset.h" 3 + template + inline bool + operator==(const multiset<_Key, _Compare, _Alloc>& __x, + const multiset<_Key, _Compare, _Alloc>& __y) + { return __x._M_t == __y._M_t; } +# 678 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_multiset.h" 3 + template + inline bool + operator<(const multiset<_Key, _Compare, _Alloc>& __x, + const multiset<_Key, _Compare, _Alloc>& __y) + { return __x._M_t < __y._M_t; } + + + template + inline bool + operator!=(const multiset<_Key, _Compare, _Alloc>& __x, + const multiset<_Key, _Compare, _Alloc>& __y) + { return !(__x == __y); } + + + template + inline bool + operator>(const multiset<_Key,_Compare,_Alloc>& __x, + const multiset<_Key,_Compare,_Alloc>& __y) + { return __y < __x; } + + + template + inline bool + operator<=(const multiset<_Key, _Compare, _Alloc>& __x, + const multiset<_Key, _Compare, _Alloc>& __y) + { return !(__y < __x); } + + + template + inline bool + operator>=(const multiset<_Key, _Compare, _Alloc>& __x, + const multiset<_Key, _Compare, _Alloc>& __y) + { return !(__x < __y); } + + + template + inline void + swap(multiset<_Key, _Compare, _Alloc>& __x, + multiset<_Key, _Compare, _Alloc>& __y) + { __x.swap(__y); } + +} +# 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/set" 2 3 +# 35 "../fwbuilder/FWObject.h" 2 + +# 1 "/usr/include/libxml2/libxml/parser.h" 1 +# 11 "/usr/include/libxml2/libxml/parser.h" +#define __XML_PARSER_H__ + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stdarg.h" 1 3 4 +# 31 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stdarg.h" 3 4 +#define _STDARG_H +#define _ANSI_STDARG_H_ + +#undef __need___va_list +# 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stdarg.h" 3 4 +#define va_start(v,l) __builtin_va_start(v,l) +#define va_end(v) __builtin_va_end(v) +#define va_arg(v,l) __builtin_va_arg(v,l) + +#define va_copy(d,s) __builtin_va_copy(d,s) + +#define __va_copy(d,s) __builtin_va_copy(d,s) +# 102 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stdarg.h" 3 4 +typedef __gnuc_va_list va_list; + + + + + +#define _VA_LIST_ + + +#define _VA_LIST + + +#define _VA_LIST_DEFINED + + +#define _VA_LIST_T_H + + +#define __va_list__ +# 14 "/usr/include/libxml2/libxml/parser.h" 2 + +# 1 "/usr/include/libxml2/libxml/xmlversion.h" 1 +# 11 "/usr/include/libxml2/libxml/xmlversion.h" +#define __XML_VERSION_H__ + +# 1 "/usr/include/libxml2/libxml/xmlexports.h" 1 +# 11 "/usr/include/libxml2/libxml/xmlexports.h" +#define __XML_EXPORTS_H__ +# 30 "/usr/include/libxml2/libxml/xmlexports.h" +#define XMLPUBFUN + + + + + +#define XMLPUBVAR extern + + + + + +#define XMLCALL + + + + + + +#define XMLCDECL +# 157 "/usr/include/libxml2/libxml/xmlexports.h" +#define LIBXML_DLL_IMPORT XMLPUBVAR +# 14 "/usr/include/libxml2/libxml/xmlversion.h" 2 + + +extern "C" { + + + + + + + + void xmlCheckVersion(int version); + + + + + + + +#define LIBXML_DOTTED_VERSION "2.7.8" + + + + + + +#define LIBXML_VERSION 20708 + + + + + + +#define LIBXML_VERSION_STRING "20708" + + + + + + +#define LIBXML_VERSION_EXTRA "" + + + + + + + +#define LIBXML_TEST_VERSION xmlCheckVersion(20708); +# 77 "/usr/include/libxml2/libxml/xmlversion.h" +#define WITHOUT_TRIO +# 96 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_THREAD_ENABLED +# 106 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_TREE_ENABLED +# 115 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_OUTPUT_ENABLED +# 124 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_PUSH_ENABLED +# 133 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_READER_ENABLED +# 142 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_PATTERN_ENABLED +# 151 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_WRITER_ENABLED +# 160 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_SAX1_ENABLED +# 169 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_FTP_ENABLED +# 178 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_HTTP_ENABLED +# 187 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_VALID_ENABLED +# 196 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_HTML_ENABLED +# 205 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_LEGACY_ENABLED +# 214 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_C14N_ENABLED +# 223 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_CATALOG_ENABLED +# 232 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_DOCB_ENABLED +# 241 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_XPATH_ENABLED +# 250 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_XPTR_ENABLED +# 259 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_XINCLUDE_ENABLED +# 268 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_ICONV_ENABLED +# 277 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_ICU_ENABLED +# 286 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_ISO8859X_ENABLED +# 295 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_DEBUG_ENABLED +# 322 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_UNICODE_ENABLED +# 331 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_REGEXP_ENABLED +# 340 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_AUTOMATA_ENABLED +# 349 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_EXPR_ENABLED +# 358 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_SCHEMAS_ENABLED +# 367 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_SCHEMATRON_ENABLED +# 376 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_MODULES_ENABLED + + + + + +#define LIBXML_MODULE_EXTENSION ".so" +# 391 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_ZLIB_ENABLED +# 406 "/usr/include/libxml2/libxml/xmlversion.h" +#define ATTRIBUTE_UNUSED __attribute__((unused)) +# 417 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x))) +# 433 "/usr/include/libxml2/libxml/xmlversion.h" +#define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args))) +# 463 "/usr/include/libxml2/libxml/xmlversion.h" +} +# 16 "/usr/include/libxml2/libxml/parser.h" 2 +# 1 "/usr/include/libxml2/libxml/tree.h" 1 +# 13 "/usr/include/libxml2/libxml/tree.h" +#define __XML_TREE_H__ + +# 1 "/usr/include/stdio.h" 1 3 4 +# 27 "/usr/include/stdio.h" 3 4 +#define _STDIO_H 1 + + +extern "C" { + +#define __need_size_t +#define __need_NULL +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 35 "/usr/include/stdio.h" 2 3 4 + + +#define __need_FILE +#define __need___FILE +# 59 "/usr/include/stdio.h" 3 4 +#undef __need_FILE +# 69 "/usr/include/stdio.h" 3 4 +#undef __need___FILE + + + +#define _STDIO_USES_IOSTREAM + +# 1 "/usr/include/libio.h" 1 3 4 +# 30 "/usr/include/libio.h" 3 4 +#define _IO_STDIO_H + +# 1 "/usr/include/_G_config.h" 1 3 4 + + + + +#define _G_config_h 1 + + + + +#define __need_size_t + + + +#define __need_NULL +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 16 "/usr/include/_G_config.h" 2 3 4 +#define __need_mbstate_t + + + +# 1 "/usr/include/wchar.h" 1 3 4 +# 896 "/usr/include/wchar.h" 3 4 +#undef __need_mbstate_t +#undef __need_wint_t +# 21 "/usr/include/_G_config.h" 2 3 4 +#define _G_size_t size_t +typedef struct +{ + __off_t __pos; + __mbstate_t __state; +} _G_fpos_t; +typedef struct +{ + __off64_t __pos; + __mbstate_t __state; +} _G_fpos64_t; +#define _G_ssize_t __ssize_t +#define _G_off_t __off_t +#define _G_off64_t __off64_t +#define _G_pid_t __pid_t +#define _G_uid_t __uid_t +#define _G_wchar_t wchar_t +#define _G_wint_t wint_t +#define _G_stat64 stat64 +# 53 "/usr/include/_G_config.h" 3 4 +typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); +typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); + +#define _G_HAVE_BOOL 1 + + + +#define _G_HAVE_ATEXIT 1 +#define _G_HAVE_SYS_CDEFS 1 +#define _G_HAVE_SYS_WAIT 1 +#define _G_NEED_STDARG_H 1 +#define _G_va_list __gnuc_va_list + +#define _G_HAVE_PRINTF_FP 1 +#define _G_HAVE_MMAP 1 +#define _G_HAVE_MREMAP 1 +#define _G_HAVE_LONG_DOUBLE_IO 1 +#define _G_HAVE_IO_FILE_OPEN 1 +#define _G_HAVE_IO_GETLINE_INFO 1 + +#define _G_IO_IO_FILE_VERSION 0x20001 + +#define _G_OPEN64 __open64 +#define _G_LSEEK64 __lseek64 +#define _G_MMAP64 __mmap64 +#define _G_FSTAT64(fd,buf) __fxstat64 (_STAT_VER, fd, buf) + + +#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE) + +#define _G_BUFSIZ 8192 + + +#define _G_NAMES_HAVE_UNDERSCORE 0 +#define _G_VTABLE_LABEL_HAS_LENGTH 1 +#define _G_USING_THUNKS 1 +#define _G_VTABLE_LABEL_PREFIX "__vt_" +#define _G_VTABLE_LABEL_PREFIX_ID __vt_ + + + +#define _G_ARGS(ARGLIST) ARGLIST +# 33 "/usr/include/libio.h" 2 3 4 + +#define _IO_pos_t _G_fpos_t +#define _IO_fpos_t _G_fpos_t +#define _IO_fpos64_t _G_fpos64_t +#define _IO_size_t _G_size_t +#define _IO_ssize_t _G_ssize_t +#define _IO_off_t _G_off_t +#define _IO_off64_t _G_off64_t +#define _IO_pid_t _G_pid_t +#define _IO_uid_t _G_uid_t +#define _IO_iconv_t _G_iconv_t +#define _IO_HAVE_SYS_WAIT _G_HAVE_SYS_WAIT +#define _IO_HAVE_ST_BLKSIZE _G_HAVE_ST_BLKSIZE +#define _IO_BUFSIZ _G_BUFSIZ +#define _IO_va_list _G_va_list +#define _IO_wint_t _G_wint_t + + + +#define __need___va_list + + +#undef _IO_va_list +#define _IO_va_list __gnuc_va_list +# 76 "/usr/include/libio.h" 3 4 +#define _PARAMS(protos) __P(protos) + + + + + + + +#define _IO_UNIFIED_JUMPTABLES 1 + + + + + +#define EOF (-1) +# 105 "/usr/include/libio.h" 3 4 +#define _IOS_INPUT 1 +#define _IOS_OUTPUT 2 +#define _IOS_ATEND 4 +#define _IOS_APPEND 8 +#define _IOS_TRUNC 16 +#define _IOS_NOCREATE 32 +#define _IOS_NOREPLACE 64 +#define _IOS_BIN 128 + + + + + + + +#define _IO_MAGIC 0xFBAD0000 +#define _OLD_STDIO_MAGIC 0xFABC0000 +#define _IO_MAGIC_MASK 0xFFFF0000 +#define _IO_USER_BUF 1 +#define _IO_UNBUFFERED 2 +#define _IO_NO_READS 4 +#define _IO_NO_WRITES 8 +#define _IO_EOF_SEEN 0x10 +#define _IO_ERR_SEEN 0x20 +#define _IO_DELETE_DONT_CLOSE 0x40 +#define _IO_LINKED 0x80 +#define _IO_IN_BACKUP 0x100 +#define _IO_LINE_BUF 0x200 +#define _IO_TIED_PUT_GET 0x400 +#define _IO_CURRENTLY_PUTTING 0x800 +#define _IO_IS_APPENDING 0x1000 +#define _IO_IS_FILEBUF 0x2000 +#define _IO_BAD_SEEN 0x4000 +#define _IO_USER_LOCK 0x8000 + +#define _IO_FLAGS2_MMAP 1 +#define _IO_FLAGS2_NOTCANCEL 2 + + + +#define _IO_FLAGS2_USER_WBUF 8 + + + + + + + +#define _IO_SKIPWS 01 +#define _IO_LEFT 02 +#define _IO_RIGHT 04 +#define _IO_INTERNAL 010 +#define _IO_DEC 020 +#define _IO_OCT 040 +#define _IO_HEX 0100 +#define _IO_SHOWBASE 0200 +#define _IO_SHOWPOINT 0400 +#define _IO_UPPERCASE 01000 +#define _IO_SHOWPOS 02000 +#define _IO_SCIENTIFIC 04000 +#define _IO_FIXED 010000 +#define _IO_UNITBUF 020000 +#define _IO_STDIO 040000 +#define _IO_DONT_CLOSE 0100000 +#define _IO_BOOLALPHA 0200000 + + +struct _IO_jump_t; struct _IO_FILE; +# 182 "/usr/include/libio.h" 3 4 +typedef void _IO_lock_t; + + + + + +struct _IO_marker { + struct _IO_marker *_next; + struct _IO_FILE *_sbuf; + + + + int _pos; +# 205 "/usr/include/libio.h" 3 4 +}; + + +enum __codecvt_result +{ + __codecvt_ok, + __codecvt_partial, + __codecvt_error, + __codecvt_noconv +}; +# 273 "/usr/include/libio.h" 3 4 +struct _IO_FILE { + int _flags; +#define _IO_file_flags _flags + + + + char* _IO_read_ptr; + char* _IO_read_end; + char* _IO_read_base; + char* _IO_write_base; + char* _IO_write_ptr; + char* _IO_write_end; + char* _IO_buf_base; + char* _IO_buf_end; + + char *_IO_save_base; + char *_IO_backup_base; + char *_IO_save_end; + + struct _IO_marker *_markers; + + struct _IO_FILE *_chain; + + int _fileno; + + + + int _flags2; + + __off_t _old_offset; + +#define __HAVE_COLUMN + + unsigned short _cur_column; + signed char _vtable_offset; + char _shortbuf[1]; + + + + _IO_lock_t *_lock; +# 321 "/usr/include/libio.h" 3 4 + __off64_t _offset; +# 330 "/usr/include/libio.h" 3 4 + void *__pad1; + void *__pad2; + void *__pad3; + void *__pad4; + size_t __pad5; + + int _mode; + + char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; + +}; + + + + + +struct _IO_FILE_plus; + +extern struct _IO_FILE_plus _IO_2_1_stdin_; +extern struct _IO_FILE_plus _IO_2_1_stdout_; +extern struct _IO_FILE_plus _IO_2_1_stderr_; + +#define _IO_stdin ((_IO_FILE*)(&_IO_2_1_stdin_)) +#define _IO_stdout ((_IO_FILE*)(&_IO_2_1_stdout_)) +#define _IO_stderr ((_IO_FILE*)(&_IO_2_1_stderr_)) +# 366 "/usr/include/libio.h" 3 4 +typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); + + + + + + + +typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, + size_t __n); + + + + + + + +typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); + + +typedef int __io_close_fn (void *__cookie); + + + + +typedef __io_read_fn cookie_read_function_t; +typedef __io_write_fn cookie_write_function_t; +typedef __io_seek_fn cookie_seek_function_t; +typedef __io_close_fn cookie_close_function_t; + + +typedef struct +{ + __io_read_fn *read; + __io_write_fn *write; + __io_seek_fn *seek; + __io_close_fn *close; +} _IO_cookie_io_functions_t; +typedef _IO_cookie_io_functions_t cookie_io_functions_t; + +struct _IO_cookie_file; + + +extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, + void *__cookie, _IO_cookie_io_functions_t __fns); + + + + +extern "C" { + + +extern int __underflow (_IO_FILE *); +extern int __uflow (_IO_FILE *); +extern int __overflow (_IO_FILE *, int); + + + + + + + +#define _IO_BE(expr,res) __builtin_expect ((expr), res) + + + + +#define _IO_getc_unlocked(_fp) (_IO_BE ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end, 0) ? __uflow (_fp) : *(unsigned char *) (_fp)->_IO_read_ptr++) + + +#define _IO_peekc_unlocked(_fp) (_IO_BE ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end, 0) && __underflow (_fp) == EOF ? EOF : *(unsigned char *) (_fp)->_IO_read_ptr) + + + +#define _IO_putc_unlocked(_ch,_fp) (_IO_BE ((_fp)->_IO_write_ptr >= (_fp)->_IO_write_end, 0) ? __overflow (_fp, (unsigned char) (_ch)) : (unsigned char) (*(_fp)->_IO_write_ptr++ = (_ch))) +# 459 "/usr/include/libio.h" 3 4 +#define _IO_feof_unlocked(__fp) (((__fp)->_flags & _IO_EOF_SEEN) != 0) +#define _IO_ferror_unlocked(__fp) (((__fp)->_flags & _IO_ERR_SEEN) != 0) + +extern int _IO_getc (_IO_FILE *__fp); +extern int _IO_putc (int __c, _IO_FILE *__fp); +extern int _IO_feof (_IO_FILE *__fp) throw (); +extern int _IO_ferror (_IO_FILE *__fp) throw (); + +extern int _IO_peekc_locked (_IO_FILE *__fp); + + +#define _IO_PENDING_OUTPUT_COUNT(_fp) ((_fp)->_IO_write_ptr - (_fp)->_IO_write_base) + + +extern void _IO_flockfile (_IO_FILE *) throw (); +extern void _IO_funlockfile (_IO_FILE *) throw (); +extern int _IO_ftrylockfile (_IO_FILE *) throw (); +# 484 "/usr/include/libio.h" 3 4 +#define _IO_peekc(_fp) _IO_peekc_unlocked (_fp) +#define _IO_flockfile(_fp) +#define _IO_funlockfile(_fp) +#define _IO_ftrylockfile(_fp) +#define _IO_cleanup_region_start(_fct,_fp) +#define _IO_cleanup_region_end(_Doit) + + +extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, + __gnuc_va_list, int *__restrict); +extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, + __gnuc_va_list); +extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); +extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); + +extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); +extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); + +extern void _IO_free_backup_area (_IO_FILE *) throw (); +# 554 "/usr/include/libio.h" 3 4 +} +# 76 "/usr/include/stdio.h" 2 3 4 +# 109 "/usr/include/stdio.h" 3 4 + + +typedef _G_fpos_t fpos_t; + + + + + +typedef _G_fpos64_t fpos64_t; + + + +#define _IOFBF 0 +#define _IOLBF 1 +#define _IONBF 2 + + + + +#define BUFSIZ _IO_BUFSIZ +# 141 "/usr/include/stdio.h" 3 4 +#define SEEK_SET 0 +#define SEEK_CUR 1 +#define SEEK_END 2 + + + + +#define P_tmpdir "/tmp" +# 161 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/bits/stdio_lim.h" 1 3 4 +# 24 "/usr/include/bits/stdio_lim.h" 3 4 +#define L_tmpnam 20 +#define TMP_MAX 238328 +#define FILENAME_MAX 4096 + + +#define L_ctermid 9 + +#define L_cuserid 9 + + + + + +#undef FOPEN_MAX +#define FOPEN_MAX 16 +# 162 "/usr/include/stdio.h" 2 3 4 + + + +extern struct _IO_FILE *stdin; +extern struct _IO_FILE *stdout; +extern struct _IO_FILE *stderr; + +#define stdin stdin +#define stdout stdout +#define stderr stderr + + + +extern int remove (__const char *__filename) throw (); + +extern int rename (__const char *__old, __const char *__new) throw (); + + + + +extern int renameat (int __oldfd, __const char *__old, int __newfd, + __const char *__new) throw (); + + + + + + + + +extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__)); +# 202 "/usr/include/stdio.h" 3 4 +extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__)); + + + +extern char *tmpnam (char *__s) throw () __attribute__ ((__warn_unused_result__)); + + + + + +extern char *tmpnam_r (char *__s) throw () __attribute__ ((__warn_unused_result__)); +# 224 "/usr/include/stdio.h" 3 4 +extern char *tempnam (__const char *__dir, __const char *__pfx) + throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fclose (FILE *__stream); + + + + +extern int fflush (FILE *__stream); + +# 249 "/usr/include/stdio.h" 3 4 +extern int fflush_unlocked (FILE *__stream); +# 259 "/usr/include/stdio.h" 3 4 +extern int fcloseall (void); + + + + + + + + + +extern FILE *fopen (__const char *__restrict __filename, + __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *freopen (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +# 292 "/usr/include/stdio.h" 3 4 + + +extern FILE *fopen64 (__const char *__restrict __filename, + __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); +extern FILE *freopen64 (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *fdopen (int __fd, __const char *__modes) throw () __attribute__ ((__warn_unused_result__)); + + + + + +extern FILE *fopencookie (void *__restrict __magic_cookie, + __const char *__restrict __modes, + _IO_cookie_io_functions_t __io_funcs) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) + throw () __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () __attribute__ ((__warn_unused_result__)); + + + + + + +extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); + + + +extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, + int __modes, size_t __n) throw (); + + + + + +extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, + size_t __size) throw (); + + +extern void setlinebuf (FILE *__stream) throw (); + + + + + + + + +extern int fprintf (FILE *__restrict __stream, + __const char *__restrict __format, ...); + + + + +extern int printf (__const char *__restrict __format, ...); + +extern int sprintf (char *__restrict __s, + __const char *__restrict __format, ...) throw (); + + + + + +extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg); + + + + +extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); + +extern int vsprintf (char *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) throw (); + + + + + +extern int snprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, ...) + throw () __attribute__ ((__format__ (__printf__, 3, 4))); + +extern int vsnprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__printf__, 3, 0))); + + + + + + +extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, + __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__)); +extern int __asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + throw () __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +extern int asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + throw () __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +# 414 "/usr/include/stdio.h" 3 4 +extern int vdprintf (int __fd, __const char *__restrict __fmt, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 2, 0))); +extern int dprintf (int __fd, __const char *__restrict __fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); + + + + + + + + +extern int fscanf (FILE *__restrict __stream, + __const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); + + + + +extern int scanf (__const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); + +extern int sscanf (__const char *__restrict __s, + __const char *__restrict __format, ...) throw (); +# 465 "/usr/include/stdio.h" 3 4 + + + + + + + + +extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); + + +extern int vsscanf (__const char *__restrict __s, + __const char *__restrict __format, __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__scanf__, 2, 0))); +# 524 "/usr/include/stdio.h" 3 4 + + + + + + + + + +extern int fgetc (FILE *__stream); +extern int getc (FILE *__stream); + + + + + +extern int getchar (void); + + + + +#define getc(_fp) _IO_getc (_fp) + + + + + + +extern int getc_unlocked (FILE *__stream); +extern int getchar_unlocked (void); +# 563 "/usr/include/stdio.h" 3 4 +extern int fgetc_unlocked (FILE *__stream); + + + + + + + + + + + +extern int fputc (int __c, FILE *__stream); +extern int putc (int __c, FILE *__stream); + + + + + +extern int putchar (int __c); + + + + +#define putc(_ch,_fp) _IO_putc (_ch, _fp) +# 596 "/usr/include/stdio.h" 3 4 +extern int fputc_unlocked (int __c, FILE *__stream); + + + + + + + +extern int putc_unlocked (int __c, FILE *__stream); +extern int putchar_unlocked (int __c); + + + + + + +extern int getw (FILE *__stream); + + +extern int putw (int __w, FILE *__stream); + + + + + + + + +extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) + __attribute__ ((__warn_unused_result__)); + + + + + + +extern char *gets (char *__s) __attribute__ ((__warn_unused_result__)); + +# 642 "/usr/include/stdio.h" 3 4 +extern char *fgets_unlocked (char *__restrict __s, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +# 658 "/usr/include/stdio.h" 3 4 +extern __ssize_t __getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern __ssize_t getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern __ssize_t getline (char **__restrict __lineptr, + size_t *__restrict __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); + + + + + +extern int puts (__const char *__s); + + + + + + +extern int ungetc (int __c, FILE *__stream); + + + + + + +extern size_t fread (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + +extern size_t fwrite (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __s) __attribute__ ((__warn_unused_result__)); + +# 719 "/usr/include/stdio.h" 3 4 +extern int fputs_unlocked (__const char *__restrict __s, + FILE *__restrict __stream); +# 730 "/usr/include/stdio.h" 3 4 +extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fseek (FILE *__stream, long int __off, int __whence); + + + + +extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)); + + + + +extern void rewind (FILE *__stream); + +# 766 "/usr/include/stdio.h" 3 4 +extern int fseeko (FILE *__stream, __off_t __off, int __whence); + + + + +extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__)); +# 785 "/usr/include/stdio.h" 3 4 + + + + + + +extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); + + + + +extern int fsetpos (FILE *__stream, __const fpos_t *__pos); +# 808 "/usr/include/stdio.h" 3 4 + + + +extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); +extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__)); +extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); +extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); + + + + +extern void clearerr (FILE *__stream) throw (); + +extern int feof (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + +extern int ferror (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern void clearerr_unlocked (FILE *__stream) throw (); +extern int feof_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); +extern int ferror_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern void perror (__const char *__s); + + + + + + +# 1 "/usr/include/bits/sys_errlist.h" 1 3 4 +# 27 "/usr/include/bits/sys_errlist.h" 3 4 +extern int sys_nerr; +extern __const char *__const sys_errlist[]; + + +extern int _sys_nerr; +extern __const char *__const _sys_errlist[]; +# 847 "/usr/include/stdio.h" 2 3 4 + + + + +extern int fileno (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern int fileno_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); +# 866 "/usr/include/stdio.h" 3 4 +extern FILE *popen (__const char *__command, __const char *__modes) __attribute__ ((__warn_unused_result__)); + + + + + +extern int pclose (FILE *__stream); + + + + + +extern char *ctermid (char *__s) throw (); + + + + + +extern char *cuserid (char *__s); + + + + +struct obstack; + + +extern int obstack_printf (struct obstack *__restrict __obstack, + __const char *__restrict __format, ...) + throw () __attribute__ ((__format__ (__printf__, 2, 3))); +extern int obstack_vprintf (struct obstack *__restrict __obstack, + __const char *__restrict __format, + __gnuc_va_list __args) + throw () __attribute__ ((__format__ (__printf__, 2, 0))); + + + + + + + +extern void flockfile (FILE *__stream) throw (); + + + +extern int ftrylockfile (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + + +extern void funlockfile (FILE *__stream) throw (); +# 927 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/bits/stdio.h" 1 3 4 +# 27 "/usr/include/bits/stdio.h" 3 4 +#define __STDIO_INLINE __extern_inline +# 44 "/usr/include/bits/stdio.h" 3 4 +extern __inline __attribute__ ((__gnu_inline__)) int +getchar (void) +{ + return _IO_getc (stdin); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +fgetc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +getc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +getchar_unlocked (void) +{ + return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +putchar (int __c) +{ + return _IO_putc (__c, stdout); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +fputc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +putc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +putchar_unlocked (int __c) +{ + return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) __ssize_t +getline (char **__lineptr, size_t *__n, FILE *__stream) +{ + return __getdelim (__lineptr, __n, '\n', __stream); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +feof_unlocked (FILE *__stream) throw () +{ + return (((__stream)->_flags & 0x10) != 0); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +ferror_unlocked (FILE *__stream) throw () +{ + return (((__stream)->_flags & 0x20) != 0); +} +# 191 "/usr/include/bits/stdio.h" 3 4 +#undef __STDIO_INLINE +# 928 "/usr/include/stdio.h" 2 3 4 + + +# 1 "/usr/include/bits/stdio2.h" 1 3 4 +# 24 "/usr/include/bits/stdio2.h" 3 4 +extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, + __const char *__restrict __format, ...) throw (); +extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, + __const char *__restrict __format, + __gnuc_va_list __ap) throw (); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +sprintf (char *__restrict __s, __const char *__restrict __fmt, ...) throw () +{ + return __builtin___sprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vsprintf (char *__restrict __s, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () + +{ + return __builtin___vsprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} + + + +extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, __const char *__restrict __format, + ...) throw (); +extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, __const char *__restrict __format, + __gnuc_va_list __ap) throw (); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +snprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, ...) throw () + +{ + return __builtin___snprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vsnprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () + +{ + return __builtin___vsnprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} + + + + + +extern int __fprintf_chk (FILE *__restrict __stream, int __flag, + __const char *__restrict __format, ...); +extern int __printf_chk (int __flag, __const char *__restrict __format, ...); +extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, + __const char *__restrict __format, __gnuc_va_list __ap); +extern int __vprintf_chk (int __flag, __const char *__restrict __format, + __gnuc_va_list __ap); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +fprintf (FILE *__restrict __stream, __const char *__restrict __fmt, ...) +{ + return __fprintf_chk (__stream, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +printf (__const char *__restrict __fmt, ...) +{ + return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); +} + + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vprintf (__const char *__restrict __fmt, __gnuc_va_list __ap) +{ + + return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap); + + + +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vfprintf (FILE *__restrict __stream, + __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap); +} + + + +extern int __asprintf_chk (char **__restrict __ptr, int __flag, + __const char *__restrict __fmt, ...) + throw () __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__)); +extern int __vasprintf_chk (char **__restrict __ptr, int __flag, + __const char *__restrict __fmt, __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__)); +extern int __dprintf_chk (int __fd, int __flag, __const char *__restrict __fmt, + ...) __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __vdprintf_chk (int __fd, int __flag, + __const char *__restrict __fmt, __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 3, 0))); +extern int __obstack_printf_chk (struct obstack *__restrict __obstack, + int __flag, __const char *__restrict __format, + ...) + throw () __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack, + int __flag, + __const char *__restrict __format, + __gnuc_va_list __args) + throw () __attribute__ ((__format__ (__printf__, 3, 0))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () + +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +dprintf (int __fd, __const char *__restrict __fmt, ...) +{ + return __dprintf_chk (__fd, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, ...) throw () + +{ + return __obstack_printf_chk (__obstack, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +# 195 "/usr/include/bits/stdio2.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vasprintf (char **__restrict __ptr, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () + +{ + return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () + +{ + return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt, + __ap); +} + + + + + +extern char *__gets_chk (char *__str, size_t) __attribute__ ((__warn_unused_result__)); +extern char *__gets_warn (char *__str) __asm__ ("" "gets") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use fgets or getline instead, gets can't " "specify buffer size"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +gets (char *__str) +{ + if (__builtin_object_size (__str, 2 > 1) != (size_t) -1) + return __gets_chk (__str, __builtin_object_size (__str, 2 > 1)); + return __gets_warn (__str); +} + +extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") + + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_alias (__s, __n, __stream); +} + +extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") + + + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk") + + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + } + return __fread_alias (__ptr, __size, __n, __stream); +} + + +extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size, + int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked") + + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_unlocked_alias (__s, __n, __stream); +} + + + +#undef fread_unlocked +extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") + + + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk") + + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + } + + + if (__builtin_constant_p (__size) + && __builtin_constant_p (__n) + && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) + && __size * __n <= 8) + { + size_t __cnt = __size * __n; + char *__cptr = (char *) __ptr; + if (__cnt == 0) + return 0; + + for (; __cnt > 0; --__cnt) + { + int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++); + if (__c == (-1)) + break; + *__cptr++ = __c; + } + return (__cptr - (char *) __ptr) / __size; + } + + return __fread_unlocked_alias (__ptr, __size, __n, __stream); +} +# 931 "/usr/include/stdio.h" 2 3 4 + + + + + +} +# 16 "/usr/include/libxml2/libxml/tree.h" 2 + +# 1 "/usr/include/libxml2/libxml/xmlstring.h" 1 +# 12 "/usr/include/libxml2/libxml/xmlstring.h" +#define __XML_STRING_H__ + + + + + +extern "C" { +# 28 "/usr/include/libxml2/libxml/xmlstring.h" +typedef unsigned char xmlChar; + + + + + + +#define BAD_CAST (xmlChar *) + + + + + xmlChar * + xmlStrdup (const xmlChar *cur); + xmlChar * + xmlStrndup (const xmlChar *cur, + int len); + xmlChar * + xmlCharStrndup (const char *cur, + int len); + xmlChar * + xmlCharStrdup (const char *cur); + xmlChar * + xmlStrsub (const xmlChar *str, + int start, + int len); + const xmlChar * + xmlStrchr (const xmlChar *str, + xmlChar val); + const xmlChar * + xmlStrstr (const xmlChar *str, + const xmlChar *val); + const xmlChar * + xmlStrcasestr (const xmlChar *str, + const xmlChar *val); + int + xmlStrcmp (const xmlChar *str1, + const xmlChar *str2); + int + xmlStrncmp (const xmlChar *str1, + const xmlChar *str2, + int len); + int + xmlStrcasecmp (const xmlChar *str1, + const xmlChar *str2); + int + xmlStrncasecmp (const xmlChar *str1, + const xmlChar *str2, + int len); + int + xmlStrEqual (const xmlChar *str1, + const xmlChar *str2); + int + xmlStrQEqual (const xmlChar *pref, + const xmlChar *name, + const xmlChar *str); + int + xmlStrlen (const xmlChar *str); + xmlChar * + xmlStrcat (xmlChar *cur, + const xmlChar *add); + xmlChar * + xmlStrncat (xmlChar *cur, + const xmlChar *add, + int len); + xmlChar * + xmlStrncatNew (const xmlChar *str1, + const xmlChar *str2, + int len); + int + xmlStrPrintf (xmlChar *buf, + int len, + const xmlChar *msg, + ...); + int + xmlStrVPrintf (xmlChar *buf, + int len, + const xmlChar *msg, + va_list ap); + + int + xmlGetUTF8Char (const unsigned char *utf, + int *len); + int + xmlCheckUTF8 (const unsigned char *utf); + int + xmlUTF8Strsize (const xmlChar *utf, + int len); + xmlChar * + xmlUTF8Strndup (const xmlChar *utf, + int len); + const xmlChar * + xmlUTF8Strpos (const xmlChar *utf, + int pos); + int + xmlUTF8Strloc (const xmlChar *utf, + const xmlChar *utfchar); + xmlChar * + xmlUTF8Strsub (const xmlChar *utf, + int start, + int len); + int + xmlUTF8Strlen (const xmlChar *utf); + int + xmlUTF8Size (const xmlChar *utf); + int + xmlUTF8Charcmp (const xmlChar *utf1, + const xmlChar *utf2); + + +} +# 18 "/usr/include/libxml2/libxml/tree.h" 2 + + +extern "C" { + + + + + + +typedef struct _xmlParserInputBuffer xmlParserInputBuffer; +typedef xmlParserInputBuffer *xmlParserInputBufferPtr; + +typedef struct _xmlOutputBuffer xmlOutputBuffer; +typedef xmlOutputBuffer *xmlOutputBufferPtr; + + +typedef struct _xmlParserInput xmlParserInput; +typedef xmlParserInput *xmlParserInputPtr; + +typedef struct _xmlParserCtxt xmlParserCtxt; +typedef xmlParserCtxt *xmlParserCtxtPtr; + +typedef struct _xmlSAXLocator xmlSAXLocator; +typedef xmlSAXLocator *xmlSAXLocatorPtr; + +typedef struct _xmlSAXHandler xmlSAXHandler; +typedef xmlSAXHandler *xmlSAXHandlerPtr; + + +typedef struct _xmlEntity xmlEntity; +typedef xmlEntity *xmlEntityPtr; + + + + + + +#define BASE_BUFFER_SIZE 4096 +# 73 "/usr/include/libxml2/libxml/tree.h" +typedef enum { + XML_BUFFER_ALLOC_DOUBLEIT, + XML_BUFFER_ALLOC_EXACT, + XML_BUFFER_ALLOC_IMMUTABLE, + XML_BUFFER_ALLOC_IO +} xmlBufferAllocationScheme; + + + + + + +typedef struct _xmlBuffer xmlBuffer; +typedef xmlBuffer *xmlBufferPtr; +struct _xmlBuffer { + xmlChar *content; + unsigned int use; + unsigned int size; + xmlBufferAllocationScheme alloc; + xmlChar *contentIO; +}; + + + + + + + +#define XML_XML_NAMESPACE (const xmlChar *) "http://www.w3.org/XML/1998/namespace" + + + + + + + +#define XML_XML_ID (const xmlChar *) "xml:id" +# 120 "/usr/include/libxml2/libxml/tree.h" +typedef enum { + XML_ELEMENT_NODE= 1, + XML_ATTRIBUTE_NODE= 2, + XML_TEXT_NODE= 3, + XML_CDATA_SECTION_NODE= 4, + XML_ENTITY_REF_NODE= 5, + XML_ENTITY_NODE= 6, + XML_PI_NODE= 7, + XML_COMMENT_NODE= 8, + XML_DOCUMENT_NODE= 9, + XML_DOCUMENT_TYPE_NODE= 10, + XML_DOCUMENT_FRAG_NODE= 11, + XML_NOTATION_NODE= 12, + XML_HTML_DOCUMENT_NODE= 13, + XML_DTD_NODE= 14, + XML_ELEMENT_DECL= 15, + XML_ATTRIBUTE_DECL= 16, + XML_ENTITY_DECL= 17, + XML_NAMESPACE_DECL= 18, + XML_XINCLUDE_START= 19, + XML_XINCLUDE_END= 20 + + ,XML_DOCB_DOCUMENT_NODE= 21 + +} xmlElementType; +# 153 "/usr/include/libxml2/libxml/tree.h" +typedef struct _xmlNotation xmlNotation; +typedef xmlNotation *xmlNotationPtr; +struct _xmlNotation { + const xmlChar *name; + const xmlChar *PublicID; + const xmlChar *SystemID; +}; + + + + + + + +typedef enum { + XML_ATTRIBUTE_CDATA = 1, + XML_ATTRIBUTE_ID, + XML_ATTRIBUTE_IDREF , + XML_ATTRIBUTE_IDREFS, + XML_ATTRIBUTE_ENTITY, + XML_ATTRIBUTE_ENTITIES, + XML_ATTRIBUTE_NMTOKEN, + XML_ATTRIBUTE_NMTOKENS, + XML_ATTRIBUTE_ENUMERATION, + XML_ATTRIBUTE_NOTATION +} xmlAttributeType; + + + + + + + +typedef enum { + XML_ATTRIBUTE_NONE = 1, + XML_ATTRIBUTE_REQUIRED, + XML_ATTRIBUTE_IMPLIED, + XML_ATTRIBUTE_FIXED +} xmlAttributeDefault; + + + + + + + +typedef struct _xmlEnumeration xmlEnumeration; +typedef xmlEnumeration *xmlEnumerationPtr; +struct _xmlEnumeration { + struct _xmlEnumeration *next; + const xmlChar *name; +}; + + + + + + + +typedef struct _xmlAttribute xmlAttribute; +typedef xmlAttribute *xmlAttributePtr; +struct _xmlAttribute { + void *_private; + xmlElementType type; + const xmlChar *name; + struct _xmlNode *children; + struct _xmlNode *last; + struct _xmlDtd *parent; + struct _xmlNode *next; + struct _xmlNode *prev; + struct _xmlDoc *doc; + + struct _xmlAttribute *nexth; + xmlAttributeType atype; + xmlAttributeDefault def; + const xmlChar *defaultValue; + xmlEnumerationPtr tree; + const xmlChar *prefix; + const xmlChar *elem; +}; + + + + + + +typedef enum { + XML_ELEMENT_CONTENT_PCDATA = 1, + XML_ELEMENT_CONTENT_ELEMENT, + XML_ELEMENT_CONTENT_SEQ, + XML_ELEMENT_CONTENT_OR +} xmlElementContentType; + + + + + + +typedef enum { + XML_ELEMENT_CONTENT_ONCE = 1, + XML_ELEMENT_CONTENT_OPT, + XML_ELEMENT_CONTENT_MULT, + XML_ELEMENT_CONTENT_PLUS +} xmlElementContentOccur; +# 265 "/usr/include/libxml2/libxml/tree.h" +typedef struct _xmlElementContent xmlElementContent; +typedef xmlElementContent *xmlElementContentPtr; +struct _xmlElementContent { + xmlElementContentType type; + xmlElementContentOccur ocur; + const xmlChar *name; + struct _xmlElementContent *c1; + struct _xmlElementContent *c2; + struct _xmlElementContent *parent; + const xmlChar *prefix; +}; + + + + + + + +typedef enum { + XML_ELEMENT_TYPE_UNDEFINED = 0, + XML_ELEMENT_TYPE_EMPTY = 1, + XML_ELEMENT_TYPE_ANY, + XML_ELEMENT_TYPE_MIXED, + XML_ELEMENT_TYPE_ELEMENT +} xmlElementTypeVal; + + +} + +# 1 "/usr/include/libxml2/libxml/xmlregexp.h" 1 +# 12 "/usr/include/libxml2/libxml/xmlregexp.h" +#define __XML_REGEXP_H__ + + + + + + +extern "C" { +# 28 "/usr/include/libxml2/libxml/xmlregexp.h" +typedef struct _xmlRegexp xmlRegexp; +typedef xmlRegexp *xmlRegexpPtr; + + + + + + +typedef struct _xmlRegExecCtxt xmlRegExecCtxt; +typedef xmlRegExecCtxt *xmlRegExecCtxtPtr; + + +} + +# 1 "/usr/include/libxml2/libxml/tree.h" 1 +# 43 "/usr/include/libxml2/libxml/xmlregexp.h" 2 +# 1 "/usr/include/libxml2/libxml/dict.h" 1 +# 12 "/usr/include/libxml2/libxml/dict.h" +#define __XML_DICT_H__ + + + + + +extern "C" { + + + + + +typedef struct _xmlDict xmlDict; +typedef xmlDict *xmlDictPtr; + + + + + xmlDictPtr + xmlDictCreate (void); + xmlDictPtr + xmlDictCreateSub(xmlDictPtr sub); + int + xmlDictReference(xmlDictPtr dict); + void + xmlDictFree (xmlDictPtr dict); + + + + + const xmlChar * + xmlDictLookup (xmlDictPtr dict, + const xmlChar *name, + int len); + const xmlChar * + xmlDictExists (xmlDictPtr dict, + const xmlChar *name, + int len); + const xmlChar * + xmlDictQLookup (xmlDictPtr dict, + const xmlChar *prefix, + const xmlChar *name); + int + xmlDictOwns (xmlDictPtr dict, + const xmlChar *str); + int + xmlDictSize (xmlDictPtr dict); + + + + + void + xmlDictCleanup (void); + + +} +# 44 "/usr/include/libxml2/libxml/xmlregexp.h" 2 + +extern "C" { + + + + + + xmlRegexpPtr + xmlRegexpCompile (const xmlChar *regexp); + void xmlRegFreeRegexp(xmlRegexpPtr regexp); + int + xmlRegexpExec (xmlRegexpPtr comp, + const xmlChar *value); + void + xmlRegexpPrint (FILE *output, + xmlRegexpPtr regexp); + int + xmlRegexpIsDeterminist(xmlRegexpPtr comp); +# 72 "/usr/include/libxml2/libxml/xmlregexp.h" +typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec, + const xmlChar *token, + void *transdata, + void *inputdata); + + + + + xmlRegExecCtxtPtr + xmlRegNewExecCtxt (xmlRegexpPtr comp, + xmlRegExecCallbacks callback, + void *data); + void + xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec); + int + xmlRegExecPushString(xmlRegExecCtxtPtr exec, + const xmlChar *value, + void *data); + int + xmlRegExecPushString2(xmlRegExecCtxtPtr exec, + const xmlChar *value, + const xmlChar *value2, + void *data); + + int + xmlRegExecNextValues(xmlRegExecCtxtPtr exec, + int *nbval, + int *nbneg, + xmlChar **values, + int *terminal); + int + xmlRegExecErrInfo (xmlRegExecCtxtPtr exec, + const xmlChar **string, + int *nbval, + int *nbneg, + xmlChar **values, + int *terminal); + + + + + + + +typedef struct _xmlExpCtxt xmlExpCtxt; +typedef xmlExpCtxt *xmlExpCtxtPtr; + + void + xmlExpFreeCtxt (xmlExpCtxtPtr ctxt); + xmlExpCtxtPtr + xmlExpNewCtxt (int maxNodes, + xmlDictPtr dict); + + int + xmlExpCtxtNbNodes(xmlExpCtxtPtr ctxt); + int + xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt); + + +typedef struct _xmlExpNode xmlExpNode; +typedef xmlExpNode *xmlExpNodePtr; + +typedef enum { + XML_EXP_EMPTY = 0, + XML_EXP_FORBID = 1, + XML_EXP_ATOM = 2, + XML_EXP_SEQ = 3, + XML_EXP_OR = 4, + XML_EXP_COUNT = 5 +} xmlExpNodeType; + + + + + +extern xmlExpNodePtr forbiddenExp; +extern xmlExpNodePtr emptyExp; + + + + + void + xmlExpFree (xmlExpCtxtPtr ctxt, + xmlExpNodePtr expr); + void + xmlExpRef (xmlExpNodePtr expr); + + + + + xmlExpNodePtr + xmlExpParse (xmlExpCtxtPtr ctxt, + const char *expr); + xmlExpNodePtr + xmlExpNewAtom (xmlExpCtxtPtr ctxt, + const xmlChar *name, + int len); + xmlExpNodePtr + xmlExpNewOr (xmlExpCtxtPtr ctxt, + xmlExpNodePtr left, + xmlExpNodePtr right); + xmlExpNodePtr + xmlExpNewSeq (xmlExpCtxtPtr ctxt, + xmlExpNodePtr left, + xmlExpNodePtr right); + xmlExpNodePtr + xmlExpNewRange (xmlExpCtxtPtr ctxt, + xmlExpNodePtr subset, + int min, + int max); + + + + int + xmlExpIsNillable(xmlExpNodePtr expr); + int + xmlExpMaxToken (xmlExpNodePtr expr); + int + xmlExpGetLanguage(xmlExpCtxtPtr ctxt, + xmlExpNodePtr expr, + const xmlChar**langList, + int len); + int + xmlExpGetStart (xmlExpCtxtPtr ctxt, + xmlExpNodePtr expr, + const xmlChar**tokList, + int len); + xmlExpNodePtr + xmlExpStringDerive(xmlExpCtxtPtr ctxt, + xmlExpNodePtr expr, + const xmlChar *str, + int len); + xmlExpNodePtr + xmlExpExpDerive (xmlExpCtxtPtr ctxt, + xmlExpNodePtr expr, + xmlExpNodePtr sub); + int + xmlExpSubsume (xmlExpCtxtPtr ctxt, + xmlExpNodePtr expr, + xmlExpNodePtr sub); + void + xmlExpDump (xmlBufferPtr buf, + xmlExpNodePtr expr); + + +} +# 295 "/usr/include/libxml2/libxml/tree.h" 2 + +extern "C" { +# 305 "/usr/include/libxml2/libxml/tree.h" +typedef struct _xmlElement xmlElement; +typedef xmlElement *xmlElementPtr; +struct _xmlElement { + void *_private; + xmlElementType type; + const xmlChar *name; + struct _xmlNode *children; + struct _xmlNode *last; + struct _xmlDtd *parent; + struct _xmlNode *next; + struct _xmlNode *prev; + struct _xmlDoc *doc; + + xmlElementTypeVal etype; + xmlElementContentPtr content; + xmlAttributePtr attributes; + const xmlChar *prefix; + + xmlRegexpPtr contModel; + + + +}; + + + + + + + +#define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL +typedef xmlElementType xmlNsType; +# 348 "/usr/include/libxml2/libxml/tree.h" +typedef struct _xmlNs xmlNs; +typedef xmlNs *xmlNsPtr; +struct _xmlNs { + struct _xmlNs *next; + xmlNsType type; + const xmlChar *href; + const xmlChar *prefix; + void *_private; + struct _xmlDoc *context; +}; + + + + + + + +typedef struct _xmlDtd xmlDtd; +typedef xmlDtd *xmlDtdPtr; +struct _xmlDtd { + void *_private; + xmlElementType type; + const xmlChar *name; + struct _xmlNode *children; + struct _xmlNode *last; + struct _xmlDoc *parent; + struct _xmlNode *next; + struct _xmlNode *prev; + struct _xmlDoc *doc; + + + void *notations; + void *elements; + void *attributes; + void *entities; + const xmlChar *ExternalID; + const xmlChar *SystemID; + void *pentities; +}; + + + + + + +typedef struct _xmlAttr xmlAttr; +typedef xmlAttr *xmlAttrPtr; +struct _xmlAttr { + void *_private; + xmlElementType type; + const xmlChar *name; + struct _xmlNode *children; + struct _xmlNode *last; + struct _xmlNode *parent; + struct _xmlAttr *next; + struct _xmlAttr *prev; + struct _xmlDoc *doc; + xmlNs *ns; + xmlAttributeType atype; + void *psvi; +}; + + + + + + + +typedef struct _xmlID xmlID; +typedef xmlID *xmlIDPtr; +struct _xmlID { + struct _xmlID *next; + const xmlChar *value; + xmlAttrPtr attr; + const xmlChar *name; + int lineno; + struct _xmlDoc *doc; +}; + + + + + + + +typedef struct _xmlRef xmlRef; +typedef xmlRef *xmlRefPtr; +struct _xmlRef { + struct _xmlRef *next; + const xmlChar *value; + xmlAttrPtr attr; + const xmlChar *name; + int lineno; +}; + + + + + + +typedef struct _xmlNode xmlNode; +typedef xmlNode *xmlNodePtr; +struct _xmlNode { + void *_private; + xmlElementType type; + const xmlChar *name; + struct _xmlNode *children; + struct _xmlNode *last; + struct _xmlNode *parent; + struct _xmlNode *next; + struct _xmlNode *prev; + struct _xmlDoc *doc; + + + xmlNs *ns; + xmlChar *content; + struct _xmlAttr *properties; + xmlNs *nsDef; + void *psvi; + unsigned short line; + unsigned short extra; +}; + + + + + + +#define XML_GET_CONTENT(n) ((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content) + + + + + + + +#define XML_GET_LINE(n) (xmlGetLineNo(n)) +# 493 "/usr/include/libxml2/libxml/tree.h" +typedef enum { + XML_DOC_WELLFORMED = 1<<0, + XML_DOC_NSVALID = 1<<1, + XML_DOC_OLD10 = 1<<2, + XML_DOC_DTDVALID = 1<<3, + XML_DOC_XINCLUDE = 1<<4, + XML_DOC_USERBUILT = 1<<5, + + XML_DOC_INTERNAL = 1<<6, + XML_DOC_HTML = 1<<7 +} xmlDocProperties; + + + + + + +typedef struct _xmlDoc xmlDoc; +typedef xmlDoc *xmlDocPtr; +struct _xmlDoc { + void *_private; + xmlElementType type; + char *name; + struct _xmlNode *children; + struct _xmlNode *last; + struct _xmlNode *parent; + struct _xmlNode *next; + struct _xmlNode *prev; + struct _xmlDoc *doc; + + + int compression; + int standalone; + + + + + + struct _xmlDtd *intSubset; + struct _xmlDtd *extSubset; + struct _xmlNs *oldNs; + const xmlChar *version; + const xmlChar *encoding; + void *ids; + void *refs; + const xmlChar *URL; + int charset; + + struct _xmlDict *dict; + void *psvi; + int parseFlags; + + int properties; + +}; + + +typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt; +typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr; +# 564 "/usr/include/libxml2/libxml/tree.h" +typedef xmlNsPtr (*xmlDOMWrapAcquireNsFunction) (xmlDOMWrapCtxtPtr ctxt, + xmlNodePtr node, + const xmlChar *nsName, + const xmlChar *nsPrefix); + + + + + + +struct _xmlDOMWrapCtxt { + void * _private; + + + + + int type; + + + + void * namespaceMap; + + + + + xmlDOMWrapAcquireNsFunction getNsForNodeFunc; +}; +# 599 "/usr/include/libxml2/libxml/tree.h" +#define xmlChildrenNode children +# 609 "/usr/include/libxml2/libxml/tree.h" +#define xmlRootNode children +# 620 "/usr/include/libxml2/libxml/tree.h" + int + xmlValidateNCName (const xmlChar *value, + int space); + + + + int + xmlValidateQName (const xmlChar *value, + int space); + int + xmlValidateName (const xmlChar *value, + int space); + int + xmlValidateNMToken (const xmlChar *value, + int space); + + + xmlChar * + xmlBuildQName (const xmlChar *ncname, + const xmlChar *prefix, + xmlChar *memory, + int len); + xmlChar * + xmlSplitQName2 (const xmlChar *name, + xmlChar **prefix); + const xmlChar * + xmlSplitQName3 (const xmlChar *name, + int *len); + + + + + + void + xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme); + xmlBufferAllocationScheme + xmlGetBufferAllocationScheme(void); + + xmlBufferPtr + xmlBufferCreate (void); + xmlBufferPtr + xmlBufferCreateSize (size_t size); + xmlBufferPtr + xmlBufferCreateStatic (void *mem, + size_t size); + int + xmlBufferResize (xmlBufferPtr buf, + unsigned int size); + void + xmlBufferFree (xmlBufferPtr buf); + int + xmlBufferDump (FILE *file, + xmlBufferPtr buf); + int + xmlBufferAdd (xmlBufferPtr buf, + const xmlChar *str, + int len); + int + xmlBufferAddHead (xmlBufferPtr buf, + const xmlChar *str, + int len); + int + xmlBufferCat (xmlBufferPtr buf, + const xmlChar *str); + int + xmlBufferCCat (xmlBufferPtr buf, + const char *str); + int + xmlBufferShrink (xmlBufferPtr buf, + unsigned int len); + int + xmlBufferGrow (xmlBufferPtr buf, + unsigned int len); + void + xmlBufferEmpty (xmlBufferPtr buf); + const xmlChar* + xmlBufferContent (const xmlBufferPtr buf); + void + xmlBufferSetAllocationScheme(xmlBufferPtr buf, + xmlBufferAllocationScheme scheme); + int + xmlBufferLength (const xmlBufferPtr buf); + + + + + xmlDtdPtr + xmlCreateIntSubset (xmlDocPtr doc, + const xmlChar *name, + const xmlChar *ExternalID, + const xmlChar *SystemID); + xmlDtdPtr + xmlNewDtd (xmlDocPtr doc, + const xmlChar *name, + const xmlChar *ExternalID, + const xmlChar *SystemID); + xmlDtdPtr + xmlGetIntSubset (xmlDocPtr doc); + void + xmlFreeDtd (xmlDtdPtr cur); + + xmlNsPtr + xmlNewGlobalNs (xmlDocPtr doc, + const xmlChar *href, + const xmlChar *prefix); + + xmlNsPtr + xmlNewNs (xmlNodePtr node, + const xmlChar *href, + const xmlChar *prefix); + void + xmlFreeNs (xmlNsPtr cur); + void + xmlFreeNsList (xmlNsPtr cur); + xmlDocPtr + xmlNewDoc (const xmlChar *version); + void + xmlFreeDoc (xmlDocPtr cur); + xmlAttrPtr + xmlNewDocProp (xmlDocPtr doc, + const xmlChar *name, + const xmlChar *value); + + + xmlAttrPtr + xmlNewProp (xmlNodePtr node, + const xmlChar *name, + const xmlChar *value); + + xmlAttrPtr + xmlNewNsProp (xmlNodePtr node, + xmlNsPtr ns, + const xmlChar *name, + const xmlChar *value); + xmlAttrPtr + xmlNewNsPropEatName (xmlNodePtr node, + xmlNsPtr ns, + xmlChar *name, + const xmlChar *value); + void + xmlFreePropList (xmlAttrPtr cur); + void + xmlFreeProp (xmlAttrPtr cur); + xmlAttrPtr + xmlCopyProp (xmlNodePtr target, + xmlAttrPtr cur); + xmlAttrPtr + xmlCopyPropList (xmlNodePtr target, + xmlAttrPtr cur); + + xmlDtdPtr + xmlCopyDtd (xmlDtdPtr dtd); + + + xmlDocPtr + xmlCopyDoc (xmlDocPtr doc, + int recursive); + + + + + xmlNodePtr + xmlNewDocNode (xmlDocPtr doc, + xmlNsPtr ns, + const xmlChar *name, + const xmlChar *content); + xmlNodePtr + xmlNewDocNodeEatName (xmlDocPtr doc, + xmlNsPtr ns, + xmlChar *name, + const xmlChar *content); + xmlNodePtr + xmlNewNode (xmlNsPtr ns, + const xmlChar *name); + xmlNodePtr + xmlNewNodeEatName (xmlNsPtr ns, + xmlChar *name); + + xmlNodePtr + xmlNewChild (xmlNodePtr parent, + xmlNsPtr ns, + const xmlChar *name, + const xmlChar *content); + + xmlNodePtr + xmlNewDocText (xmlDocPtr doc, + const xmlChar *content); + xmlNodePtr + xmlNewText (const xmlChar *content); + xmlNodePtr + xmlNewDocPI (xmlDocPtr doc, + const xmlChar *name, + const xmlChar *content); + xmlNodePtr + xmlNewPI (const xmlChar *name, + const xmlChar *content); + xmlNodePtr + xmlNewDocTextLen (xmlDocPtr doc, + const xmlChar *content, + int len); + xmlNodePtr + xmlNewTextLen (const xmlChar *content, + int len); + xmlNodePtr + xmlNewDocComment (xmlDocPtr doc, + const xmlChar *content); + xmlNodePtr + xmlNewComment (const xmlChar *content); + xmlNodePtr + xmlNewCDataBlock (xmlDocPtr doc, + const xmlChar *content, + int len); + xmlNodePtr + xmlNewCharRef (xmlDocPtr doc, + const xmlChar *name); + xmlNodePtr + xmlNewReference (xmlDocPtr doc, + const xmlChar *name); + xmlNodePtr + xmlCopyNode (const xmlNodePtr node, + int recursive); + xmlNodePtr + xmlDocCopyNode (const xmlNodePtr node, + xmlDocPtr doc, + int recursive); + xmlNodePtr + xmlDocCopyNodeList (xmlDocPtr doc, + const xmlNodePtr node); + xmlNodePtr + xmlCopyNodeList (const xmlNodePtr node); + + xmlNodePtr + xmlNewTextChild (xmlNodePtr parent, + xmlNsPtr ns, + const xmlChar *name, + const xmlChar *content); + xmlNodePtr + xmlNewDocRawNode (xmlDocPtr doc, + xmlNsPtr ns, + const xmlChar *name, + const xmlChar *content); + xmlNodePtr + xmlNewDocFragment (xmlDocPtr doc); + + + + + + long + xmlGetLineNo (xmlNodePtr node); + + xmlChar * + xmlGetNodePath (xmlNodePtr node); + + xmlNodePtr + xmlDocGetRootElement (xmlDocPtr doc); + xmlNodePtr + xmlGetLastChild (xmlNodePtr parent); + int + xmlNodeIsText (xmlNodePtr node); + int + xmlIsBlankNode (xmlNodePtr node); + + + + + + xmlNodePtr + xmlDocSetRootElement (xmlDocPtr doc, + xmlNodePtr root); + + + void + xmlNodeSetName (xmlNodePtr cur, + const xmlChar *name); + + xmlNodePtr + xmlAddChild (xmlNodePtr parent, + xmlNodePtr cur); + xmlNodePtr + xmlAddChildList (xmlNodePtr parent, + xmlNodePtr cur); + + xmlNodePtr + xmlReplaceNode (xmlNodePtr old, + xmlNodePtr cur); + + + + xmlNodePtr + xmlAddPrevSibling (xmlNodePtr cur, + xmlNodePtr elem); + + xmlNodePtr + xmlAddSibling (xmlNodePtr cur, + xmlNodePtr elem); + xmlNodePtr + xmlAddNextSibling (xmlNodePtr cur, + xmlNodePtr elem); + void + xmlUnlinkNode (xmlNodePtr cur); + xmlNodePtr + xmlTextMerge (xmlNodePtr first, + xmlNodePtr second); + int + xmlTextConcat (xmlNodePtr node, + const xmlChar *content, + int len); + void + xmlFreeNodeList (xmlNodePtr cur); + void + xmlFreeNode (xmlNodePtr cur); + void + xmlSetTreeDoc (xmlNodePtr tree, + xmlDocPtr doc); + void + xmlSetListDoc (xmlNodePtr list, + xmlDocPtr doc); + + + + xmlNsPtr + xmlSearchNs (xmlDocPtr doc, + xmlNodePtr node, + const xmlChar *nameSpace); + xmlNsPtr + xmlSearchNsByHref (xmlDocPtr doc, + xmlNodePtr node, + const xmlChar *href); + + xmlNsPtr * + xmlGetNsList (xmlDocPtr doc, + xmlNodePtr node); + + + void + xmlSetNs (xmlNodePtr node, + xmlNsPtr ns); + xmlNsPtr + xmlCopyNamespace (xmlNsPtr cur); + xmlNsPtr + xmlCopyNamespaceList (xmlNsPtr cur); + + + + + + xmlAttrPtr + xmlSetProp (xmlNodePtr node, + const xmlChar *name, + const xmlChar *value); + xmlAttrPtr + xmlSetNsProp (xmlNodePtr node, + xmlNsPtr ns, + const xmlChar *name, + const xmlChar *value); + + xmlChar * + xmlGetNoNsProp (xmlNodePtr node, + const xmlChar *name); + xmlChar * + xmlGetProp (xmlNodePtr node, + const xmlChar *name); + xmlAttrPtr + xmlHasProp (xmlNodePtr node, + const xmlChar *name); + xmlAttrPtr + xmlHasNsProp (xmlNodePtr node, + const xmlChar *name, + const xmlChar *nameSpace); + xmlChar * + xmlGetNsProp (xmlNodePtr node, + const xmlChar *name, + const xmlChar *nameSpace); + xmlNodePtr + xmlStringGetNodeList (xmlDocPtr doc, + const xmlChar *value); + xmlNodePtr + xmlStringLenGetNodeList (xmlDocPtr doc, + const xmlChar *value, + int len); + xmlChar * + xmlNodeListGetString (xmlDocPtr doc, + xmlNodePtr list, + int inLine); + + xmlChar * + xmlNodeListGetRawString (xmlDocPtr doc, + xmlNodePtr list, + int inLine); + + void + xmlNodeSetContent (xmlNodePtr cur, + const xmlChar *content); + + void + xmlNodeSetContentLen (xmlNodePtr cur, + const xmlChar *content, + int len); + + void + xmlNodeAddContent (xmlNodePtr cur, + const xmlChar *content); + void + xmlNodeAddContentLen (xmlNodePtr cur, + const xmlChar *content, + int len); + xmlChar * + xmlNodeGetContent (xmlNodePtr cur); + int + xmlNodeBufGetContent (xmlBufferPtr buffer, + xmlNodePtr cur); + xmlChar * + xmlNodeGetLang (xmlNodePtr cur); + int + xmlNodeGetSpacePreserve (xmlNodePtr cur); + + void + xmlNodeSetLang (xmlNodePtr cur, + const xmlChar *lang); + void + xmlNodeSetSpacePreserve (xmlNodePtr cur, + int val); + + xmlChar * + xmlNodeGetBase (xmlDocPtr doc, + xmlNodePtr cur); + + void + xmlNodeSetBase (xmlNodePtr cur, + const xmlChar *uri); + + + + + + int + xmlRemoveProp (xmlAttrPtr cur); + + int + xmlUnsetNsProp (xmlNodePtr node, + xmlNsPtr ns, + const xmlChar *name); + int + xmlUnsetProp (xmlNodePtr node, + const xmlChar *name); + + + + + + void + xmlBufferWriteCHAR (xmlBufferPtr buf, + const xmlChar *string); + void + xmlBufferWriteChar (xmlBufferPtr buf, + const char *string); + void + xmlBufferWriteQuotedString(xmlBufferPtr buf, + const xmlChar *string); + + + void xmlAttrSerializeTxtContent(xmlBufferPtr buf, + xmlDocPtr doc, + xmlAttrPtr attr, + const xmlChar *string); + + + + + + + int + xmlReconciliateNs (xmlDocPtr doc, + xmlNodePtr tree); + + + + + + + void + xmlDocDumpFormatMemory (xmlDocPtr cur, + xmlChar **mem, + int *size, + int format); + void + xmlDocDumpMemory (xmlDocPtr cur, + xmlChar **mem, + int *size); + void + xmlDocDumpMemoryEnc (xmlDocPtr out_doc, + xmlChar **doc_txt_ptr, + int * doc_txt_len, + const char *txt_encoding); + void + xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc, + xmlChar **doc_txt_ptr, + int * doc_txt_len, + const char *txt_encoding, + int format); + int + xmlDocFormatDump (FILE *f, + xmlDocPtr cur, + int format); + int + xmlDocDump (FILE *f, + xmlDocPtr cur); + void + xmlElemDump (FILE *f, + xmlDocPtr doc, + xmlNodePtr cur); + int + xmlSaveFile (const char *filename, + xmlDocPtr cur); + int + xmlSaveFormatFile (const char *filename, + xmlDocPtr cur, + int format); + int + xmlNodeDump (xmlBufferPtr buf, + xmlDocPtr doc, + xmlNodePtr cur, + int level, + int format); + + int + xmlSaveFileTo (xmlOutputBufferPtr buf, + xmlDocPtr cur, + const char *encoding); + int + xmlSaveFormatFileTo (xmlOutputBufferPtr buf, + xmlDocPtr cur, + const char *encoding, + int format); + void + xmlNodeDumpOutput (xmlOutputBufferPtr buf, + xmlDocPtr doc, + xmlNodePtr cur, + int level, + int format, + const char *encoding); + + int + xmlSaveFormatFileEnc (const char *filename, + xmlDocPtr cur, + const char *encoding, + int format); + + int + xmlSaveFileEnc (const char *filename, + xmlDocPtr cur, + const char *encoding); + + + + + + int + xmlIsXHTML (const xmlChar *systemID, + const xmlChar *publicID); + + + + + int + xmlGetDocCompressMode (xmlDocPtr doc); + void + xmlSetDocCompressMode (xmlDocPtr doc, + int mode); + int + xmlGetCompressMode (void); + void + xmlSetCompressMode (int mode); + + + + + xmlDOMWrapCtxtPtr + xmlDOMWrapNewCtxt (void); + void + xmlDOMWrapFreeCtxt (xmlDOMWrapCtxtPtr ctxt); + int + xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt, + xmlNodePtr elem, + int options); + int + xmlDOMWrapAdoptNode (xmlDOMWrapCtxtPtr ctxt, + xmlDocPtr sourceDoc, + xmlNodePtr node, + xmlDocPtr destDoc, + xmlNodePtr destParent, + int options); + int + xmlDOMWrapRemoveNode (xmlDOMWrapCtxtPtr ctxt, + xmlDocPtr doc, + xmlNodePtr node, + int options); + int + xmlDOMWrapCloneNode (xmlDOMWrapCtxtPtr ctxt, + xmlDocPtr sourceDoc, + xmlNodePtr node, + xmlNodePtr *clonedNode, + xmlDocPtr destDoc, + xmlNodePtr destParent, + int deep, + int options); + + + + + + + unsigned long + xmlChildElementCount (xmlNodePtr parent); + xmlNodePtr + xmlNextElementSibling (xmlNodePtr node); + xmlNodePtr + xmlFirstElementChild (xmlNodePtr parent); + xmlNodePtr + xmlLastElementChild (xmlNodePtr parent); + xmlNodePtr + xmlPreviousElementSibling (xmlNodePtr node); + + +} +# 17 "/usr/include/libxml2/libxml/parser.h" 2 + +# 1 "/usr/include/libxml2/libxml/hash.h" 1 +# 12 "/usr/include/libxml2/libxml/hash.h" +#define __XML_HASH_H__ + + +extern "C" { + + + + + +typedef struct _xmlHashTable xmlHashTable; +typedef xmlHashTable *xmlHashTablePtr; + + +} + + + +# 1 "/usr/include/libxml2/libxml/parser.h" 1 +# 30 "/usr/include/libxml2/libxml/hash.h" 2 + + + +extern "C" { +# 56 "/usr/include/libxml2/libxml/hash.h" +#define XML_CAST_FPTR(fptr) fptr +# 69 "/usr/include/libxml2/libxml/hash.h" +typedef void (*xmlHashDeallocator)(void *payload, xmlChar *name); +# 79 "/usr/include/libxml2/libxml/hash.h" +typedef void *(*xmlHashCopier)(void *payload, xmlChar *name); +# 88 "/usr/include/libxml2/libxml/hash.h" +typedef void (*xmlHashScanner)(void *payload, void *data, xmlChar *name); +# 99 "/usr/include/libxml2/libxml/hash.h" +typedef void (*xmlHashScannerFull)(void *payload, void *data, + const xmlChar *name, const xmlChar *name2, + const xmlChar *name3); + + + + + xmlHashTablePtr + xmlHashCreate (int size); + xmlHashTablePtr + xmlHashCreateDict(int size, + xmlDictPtr dict); + void + xmlHashFree (xmlHashTablePtr table, + xmlHashDeallocator f); + + + + + int + xmlHashAddEntry (xmlHashTablePtr table, + const xmlChar *name, + void *userdata); + int + xmlHashUpdateEntry(xmlHashTablePtr table, + const xmlChar *name, + void *userdata, + xmlHashDeallocator f); + int + xmlHashAddEntry2(xmlHashTablePtr table, + const xmlChar *name, + const xmlChar *name2, + void *userdata); + int + xmlHashUpdateEntry2(xmlHashTablePtr table, + const xmlChar *name, + const xmlChar *name2, + void *userdata, + xmlHashDeallocator f); + int + xmlHashAddEntry3(xmlHashTablePtr table, + const xmlChar *name, + const xmlChar *name2, + const xmlChar *name3, + void *userdata); + int + xmlHashUpdateEntry3(xmlHashTablePtr table, + const xmlChar *name, + const xmlChar *name2, + const xmlChar *name3, + void *userdata, + xmlHashDeallocator f); + + + + + int + xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name, + xmlHashDeallocator f); + int + xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name, + const xmlChar *name2, xmlHashDeallocator f); + int + xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name, + const xmlChar *name2, const xmlChar *name3, + xmlHashDeallocator f); + + + + + void * + xmlHashLookup (xmlHashTablePtr table, + const xmlChar *name); + void * + xmlHashLookup2 (xmlHashTablePtr table, + const xmlChar *name, + const xmlChar *name2); + void * + xmlHashLookup3 (xmlHashTablePtr table, + const xmlChar *name, + const xmlChar *name2, + const xmlChar *name3); + void * + xmlHashQLookup (xmlHashTablePtr table, + const xmlChar *name, + const xmlChar *prefix); + void * + xmlHashQLookup2 (xmlHashTablePtr table, + const xmlChar *name, + const xmlChar *prefix, + const xmlChar *name2, + const xmlChar *prefix2); + void * + xmlHashQLookup3 (xmlHashTablePtr table, + const xmlChar *name, + const xmlChar *prefix, + const xmlChar *name2, + const xmlChar *prefix2, + const xmlChar *name3, + const xmlChar *prefix3); + + + + + xmlHashTablePtr + xmlHashCopy (xmlHashTablePtr table, + xmlHashCopier f); + int + xmlHashSize (xmlHashTablePtr table); + void + xmlHashScan (xmlHashTablePtr table, + xmlHashScanner f, + void *data); + void + xmlHashScan3 (xmlHashTablePtr table, + const xmlChar *name, + const xmlChar *name2, + const xmlChar *name3, + xmlHashScanner f, + void *data); + void + xmlHashScanFull (xmlHashTablePtr table, + xmlHashScannerFull f, + void *data); + void + xmlHashScanFull3(xmlHashTablePtr table, + const xmlChar *name, + const xmlChar *name2, + const xmlChar *name3, + xmlHashScannerFull f, + void *data); + +} +# 19 "/usr/include/libxml2/libxml/parser.h" 2 +# 1 "/usr/include/libxml2/libxml/valid.h" 1 +# 12 "/usr/include/libxml2/libxml/valid.h" +#define __XML_VALID_H__ + + +# 1 "/usr/include/libxml2/libxml/xmlerror.h" 1 +# 13 "/usr/include/libxml2/libxml/xmlerror.h" +#define __XML_ERROR_H__ + + +extern "C" { + + + + + + + +typedef enum { + XML_ERR_NONE = 0, + XML_ERR_WARNING = 1, + XML_ERR_ERROR = 2, + XML_ERR_FATAL = 3 +} xmlErrorLevel; + + + + + + +typedef enum { + XML_FROM_NONE = 0, + XML_FROM_PARSER, + XML_FROM_TREE, + XML_FROM_NAMESPACE, + XML_FROM_DTD, + XML_FROM_HTML, + XML_FROM_MEMORY, + XML_FROM_OUTPUT, + XML_FROM_IO, + XML_FROM_FTP, + XML_FROM_HTTP, + XML_FROM_XINCLUDE, + XML_FROM_XPATH, + XML_FROM_XPOINTER, + XML_FROM_REGEXP, + XML_FROM_DATATYPE, + XML_FROM_SCHEMASP, + XML_FROM_SCHEMASV, + XML_FROM_RELAXNGP, + XML_FROM_RELAXNGV, + XML_FROM_CATALOG, + XML_FROM_C14N, + XML_FROM_XSLT, + XML_FROM_VALID, + XML_FROM_CHECK, + XML_FROM_WRITER, + XML_FROM_MODULE, + XML_FROM_I18N, + XML_FROM_SCHEMATRONV +} xmlErrorDomain; + + + + + + + +typedef struct _xmlError xmlError; +typedef xmlError *xmlErrorPtr; +struct _xmlError { + int domain; + int code; + char *message; + xmlErrorLevel level; + char *file; + int line; + char *str1; + char *str2; + char *str3; + int int1; + int int2; + void *ctxt; + void *node; +}; + + + + + + +typedef enum { + XML_ERR_OK = 0, + XML_ERR_INTERNAL_ERROR, + XML_ERR_NO_MEMORY, + XML_ERR_DOCUMENT_START, + XML_ERR_DOCUMENT_EMPTY, + XML_ERR_DOCUMENT_END, + XML_ERR_INVALID_HEX_CHARREF, + XML_ERR_INVALID_DEC_CHARREF, + XML_ERR_INVALID_CHARREF, + XML_ERR_INVALID_CHAR, + XML_ERR_CHARREF_AT_EOF, + XML_ERR_CHARREF_IN_PROLOG, + XML_ERR_CHARREF_IN_EPILOG, + XML_ERR_CHARREF_IN_DTD, + XML_ERR_ENTITYREF_AT_EOF, + XML_ERR_ENTITYREF_IN_PROLOG, + XML_ERR_ENTITYREF_IN_EPILOG, + XML_ERR_ENTITYREF_IN_DTD, + XML_ERR_PEREF_AT_EOF, + XML_ERR_PEREF_IN_PROLOG, + XML_ERR_PEREF_IN_EPILOG, + XML_ERR_PEREF_IN_INT_SUBSET, + XML_ERR_ENTITYREF_NO_NAME, + XML_ERR_ENTITYREF_SEMICOL_MISSING, + XML_ERR_PEREF_NO_NAME, + XML_ERR_PEREF_SEMICOL_MISSING, + XML_ERR_UNDECLARED_ENTITY, + XML_WAR_UNDECLARED_ENTITY, + XML_ERR_UNPARSED_ENTITY, + XML_ERR_ENTITY_IS_EXTERNAL, + XML_ERR_ENTITY_IS_PARAMETER, + XML_ERR_UNKNOWN_ENCODING, + XML_ERR_UNSUPPORTED_ENCODING, + XML_ERR_STRING_NOT_STARTED, + XML_ERR_STRING_NOT_CLOSED, + XML_ERR_NS_DECL_ERROR, + XML_ERR_ENTITY_NOT_STARTED, + XML_ERR_ENTITY_NOT_FINISHED, + XML_ERR_LT_IN_ATTRIBUTE, + XML_ERR_ATTRIBUTE_NOT_STARTED, + XML_ERR_ATTRIBUTE_NOT_FINISHED, + XML_ERR_ATTRIBUTE_WITHOUT_VALUE, + XML_ERR_ATTRIBUTE_REDEFINED, + XML_ERR_LITERAL_NOT_STARTED, + XML_ERR_LITERAL_NOT_FINISHED, + XML_ERR_COMMENT_NOT_FINISHED, + XML_ERR_PI_NOT_STARTED, + XML_ERR_PI_NOT_FINISHED, + XML_ERR_NOTATION_NOT_STARTED, + XML_ERR_NOTATION_NOT_FINISHED, + XML_ERR_ATTLIST_NOT_STARTED, + XML_ERR_ATTLIST_NOT_FINISHED, + XML_ERR_MIXED_NOT_STARTED, + XML_ERR_MIXED_NOT_FINISHED, + XML_ERR_ELEMCONTENT_NOT_STARTED, + XML_ERR_ELEMCONTENT_NOT_FINISHED, + XML_ERR_XMLDECL_NOT_STARTED, + XML_ERR_XMLDECL_NOT_FINISHED, + XML_ERR_CONDSEC_NOT_STARTED, + XML_ERR_CONDSEC_NOT_FINISHED, + XML_ERR_EXT_SUBSET_NOT_FINISHED, + XML_ERR_DOCTYPE_NOT_FINISHED, + XML_ERR_MISPLACED_CDATA_END, + XML_ERR_CDATA_NOT_FINISHED, + XML_ERR_RESERVED_XML_NAME, + XML_ERR_SPACE_REQUIRED, + XML_ERR_SEPARATOR_REQUIRED, + XML_ERR_NMTOKEN_REQUIRED, + XML_ERR_NAME_REQUIRED, + XML_ERR_PCDATA_REQUIRED, + XML_ERR_URI_REQUIRED, + XML_ERR_PUBID_REQUIRED, + XML_ERR_LT_REQUIRED, + XML_ERR_GT_REQUIRED, + XML_ERR_LTSLASH_REQUIRED, + XML_ERR_EQUAL_REQUIRED, + XML_ERR_TAG_NAME_MISMATCH, + XML_ERR_TAG_NOT_FINISHED, + XML_ERR_STANDALONE_VALUE, + XML_ERR_ENCODING_NAME, + XML_ERR_HYPHEN_IN_COMMENT, + XML_ERR_INVALID_ENCODING, + XML_ERR_EXT_ENTITY_STANDALONE, + XML_ERR_CONDSEC_INVALID, + XML_ERR_VALUE_REQUIRED, + XML_ERR_NOT_WELL_BALANCED, + XML_ERR_EXTRA_CONTENT, + XML_ERR_ENTITY_CHAR_ERROR, + XML_ERR_ENTITY_PE_INTERNAL, + XML_ERR_ENTITY_LOOP, + XML_ERR_ENTITY_BOUNDARY, + XML_ERR_INVALID_URI, + XML_ERR_URI_FRAGMENT, + XML_WAR_CATALOG_PI, + XML_ERR_NO_DTD, + XML_ERR_CONDSEC_INVALID_KEYWORD, + XML_ERR_VERSION_MISSING, + XML_WAR_UNKNOWN_VERSION, + XML_WAR_LANG_VALUE, + XML_WAR_NS_URI, + XML_WAR_NS_URI_RELATIVE, + XML_ERR_MISSING_ENCODING, + XML_WAR_SPACE_VALUE, + XML_ERR_NOT_STANDALONE, + XML_ERR_ENTITY_PROCESSING, + XML_ERR_NOTATION_PROCESSING, + XML_WAR_NS_COLUMN, + XML_WAR_ENTITY_REDEFINED, + XML_ERR_UNKNOWN_VERSION, + XML_ERR_VERSION_MISMATCH, + XML_NS_ERR_XML_NAMESPACE = 200, + XML_NS_ERR_UNDEFINED_NAMESPACE, + XML_NS_ERR_QNAME, + XML_NS_ERR_ATTRIBUTE_REDEFINED, + XML_NS_ERR_EMPTY, + XML_NS_ERR_COLON, + XML_DTD_ATTRIBUTE_DEFAULT = 500, + XML_DTD_ATTRIBUTE_REDEFINED, + XML_DTD_ATTRIBUTE_VALUE, + XML_DTD_CONTENT_ERROR, + XML_DTD_CONTENT_MODEL, + XML_DTD_CONTENT_NOT_DETERMINIST, + XML_DTD_DIFFERENT_PREFIX, + XML_DTD_ELEM_DEFAULT_NAMESPACE, + XML_DTD_ELEM_NAMESPACE, + XML_DTD_ELEM_REDEFINED, + XML_DTD_EMPTY_NOTATION, + XML_DTD_ENTITY_TYPE, + XML_DTD_ID_FIXED, + XML_DTD_ID_REDEFINED, + XML_DTD_ID_SUBSET, + XML_DTD_INVALID_CHILD, + XML_DTD_INVALID_DEFAULT, + XML_DTD_LOAD_ERROR, + XML_DTD_MISSING_ATTRIBUTE, + XML_DTD_MIXED_CORRUPT, + XML_DTD_MULTIPLE_ID, + XML_DTD_NO_DOC, + XML_DTD_NO_DTD, + XML_DTD_NO_ELEM_NAME, + XML_DTD_NO_PREFIX, + XML_DTD_NO_ROOT, + XML_DTD_NOTATION_REDEFINED, + XML_DTD_NOTATION_VALUE, + XML_DTD_NOT_EMPTY, + XML_DTD_NOT_PCDATA, + XML_DTD_NOT_STANDALONE, + XML_DTD_ROOT_NAME, + XML_DTD_STANDALONE_WHITE_SPACE, + XML_DTD_UNKNOWN_ATTRIBUTE, + XML_DTD_UNKNOWN_ELEM, + XML_DTD_UNKNOWN_ENTITY, + XML_DTD_UNKNOWN_ID, + XML_DTD_UNKNOWN_NOTATION, + XML_DTD_STANDALONE_DEFAULTED, + XML_DTD_XMLID_VALUE, + XML_DTD_XMLID_TYPE, + XML_DTD_DUP_TOKEN, + XML_HTML_STRUCURE_ERROR = 800, + XML_HTML_UNKNOWN_TAG, + XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000, + XML_RNGP_ATTR_CONFLICT, + XML_RNGP_ATTRIBUTE_CHILDREN, + XML_RNGP_ATTRIBUTE_CONTENT, + XML_RNGP_ATTRIBUTE_EMPTY, + XML_RNGP_ATTRIBUTE_NOOP, + XML_RNGP_CHOICE_CONTENT, + XML_RNGP_CHOICE_EMPTY, + XML_RNGP_CREATE_FAILURE, + XML_RNGP_DATA_CONTENT, + XML_RNGP_DEF_CHOICE_AND_INTERLEAVE, + XML_RNGP_DEFINE_CREATE_FAILED, + XML_RNGP_DEFINE_EMPTY, + XML_RNGP_DEFINE_MISSING, + XML_RNGP_DEFINE_NAME_MISSING, + XML_RNGP_ELEM_CONTENT_EMPTY, + XML_RNGP_ELEM_CONTENT_ERROR, + XML_RNGP_ELEMENT_EMPTY, + XML_RNGP_ELEMENT_CONTENT, + XML_RNGP_ELEMENT_NAME, + XML_RNGP_ELEMENT_NO_CONTENT, + XML_RNGP_ELEM_TEXT_CONFLICT, + XML_RNGP_EMPTY, + XML_RNGP_EMPTY_CONSTRUCT, + XML_RNGP_EMPTY_CONTENT, + XML_RNGP_EMPTY_NOT_EMPTY, + XML_RNGP_ERROR_TYPE_LIB, + XML_RNGP_EXCEPT_EMPTY, + XML_RNGP_EXCEPT_MISSING, + XML_RNGP_EXCEPT_MULTIPLE, + XML_RNGP_EXCEPT_NO_CONTENT, + XML_RNGP_EXTERNALREF_EMTPY, + XML_RNGP_EXTERNAL_REF_FAILURE, + XML_RNGP_EXTERNALREF_RECURSE, + XML_RNGP_FORBIDDEN_ATTRIBUTE, + XML_RNGP_FOREIGN_ELEMENT, + XML_RNGP_GRAMMAR_CONTENT, + XML_RNGP_GRAMMAR_EMPTY, + XML_RNGP_GRAMMAR_MISSING, + XML_RNGP_GRAMMAR_NO_START, + XML_RNGP_GROUP_ATTR_CONFLICT, + XML_RNGP_HREF_ERROR, + XML_RNGP_INCLUDE_EMPTY, + XML_RNGP_INCLUDE_FAILURE, + XML_RNGP_INCLUDE_RECURSE, + XML_RNGP_INTERLEAVE_ADD, + XML_RNGP_INTERLEAVE_CREATE_FAILED, + XML_RNGP_INTERLEAVE_EMPTY, + XML_RNGP_INTERLEAVE_NO_CONTENT, + XML_RNGP_INVALID_DEFINE_NAME, + XML_RNGP_INVALID_URI, + XML_RNGP_INVALID_VALUE, + XML_RNGP_MISSING_HREF, + XML_RNGP_NAME_MISSING, + XML_RNGP_NEED_COMBINE, + XML_RNGP_NOTALLOWED_NOT_EMPTY, + XML_RNGP_NSNAME_ATTR_ANCESTOR, + XML_RNGP_NSNAME_NO_NS, + XML_RNGP_PARAM_FORBIDDEN, + XML_RNGP_PARAM_NAME_MISSING, + XML_RNGP_PARENTREF_CREATE_FAILED, + XML_RNGP_PARENTREF_NAME_INVALID, + XML_RNGP_PARENTREF_NO_NAME, + XML_RNGP_PARENTREF_NO_PARENT, + XML_RNGP_PARENTREF_NOT_EMPTY, + XML_RNGP_PARSE_ERROR, + XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME, + XML_RNGP_PAT_ATTR_ATTR, + XML_RNGP_PAT_ATTR_ELEM, + XML_RNGP_PAT_DATA_EXCEPT_ATTR, + XML_RNGP_PAT_DATA_EXCEPT_ELEM, + XML_RNGP_PAT_DATA_EXCEPT_EMPTY, + XML_RNGP_PAT_DATA_EXCEPT_GROUP, + XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE, + XML_RNGP_PAT_DATA_EXCEPT_LIST, + XML_RNGP_PAT_DATA_EXCEPT_ONEMORE, + XML_RNGP_PAT_DATA_EXCEPT_REF, + XML_RNGP_PAT_DATA_EXCEPT_TEXT, + XML_RNGP_PAT_LIST_ATTR, + XML_RNGP_PAT_LIST_ELEM, + XML_RNGP_PAT_LIST_INTERLEAVE, + XML_RNGP_PAT_LIST_LIST, + XML_RNGP_PAT_LIST_REF, + XML_RNGP_PAT_LIST_TEXT, + XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME, + XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME, + XML_RNGP_PAT_ONEMORE_GROUP_ATTR, + XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR, + XML_RNGP_PAT_START_ATTR, + XML_RNGP_PAT_START_DATA, + XML_RNGP_PAT_START_EMPTY, + XML_RNGP_PAT_START_GROUP, + XML_RNGP_PAT_START_INTERLEAVE, + XML_RNGP_PAT_START_LIST, + XML_RNGP_PAT_START_ONEMORE, + XML_RNGP_PAT_START_TEXT, + XML_RNGP_PAT_START_VALUE, + XML_RNGP_PREFIX_UNDEFINED, + XML_RNGP_REF_CREATE_FAILED, + XML_RNGP_REF_CYCLE, + XML_RNGP_REF_NAME_INVALID, + XML_RNGP_REF_NO_DEF, + XML_RNGP_REF_NO_NAME, + XML_RNGP_REF_NOT_EMPTY, + XML_RNGP_START_CHOICE_AND_INTERLEAVE, + XML_RNGP_START_CONTENT, + XML_RNGP_START_EMPTY, + XML_RNGP_START_MISSING, + XML_RNGP_TEXT_EXPECTED, + XML_RNGP_TEXT_HAS_CHILD, + XML_RNGP_TYPE_MISSING, + XML_RNGP_TYPE_NOT_FOUND, + XML_RNGP_TYPE_VALUE, + XML_RNGP_UNKNOWN_ATTRIBUTE, + XML_RNGP_UNKNOWN_COMBINE, + XML_RNGP_UNKNOWN_CONSTRUCT, + XML_RNGP_UNKNOWN_TYPE_LIB, + XML_RNGP_URI_FRAGMENT, + XML_RNGP_URI_NOT_ABSOLUTE, + XML_RNGP_VALUE_EMPTY, + XML_RNGP_VALUE_NO_CONTENT, + XML_RNGP_XMLNS_NAME, + XML_RNGP_XML_NS, + XML_XPATH_EXPRESSION_OK = 1200, + XML_XPATH_NUMBER_ERROR, + XML_XPATH_UNFINISHED_LITERAL_ERROR, + XML_XPATH_START_LITERAL_ERROR, + XML_XPATH_VARIABLE_REF_ERROR, + XML_XPATH_UNDEF_VARIABLE_ERROR, + XML_XPATH_INVALID_PREDICATE_ERROR, + XML_XPATH_EXPR_ERROR, + XML_XPATH_UNCLOSED_ERROR, + XML_XPATH_UNKNOWN_FUNC_ERROR, + XML_XPATH_INVALID_OPERAND, + XML_XPATH_INVALID_TYPE, + XML_XPATH_INVALID_ARITY, + XML_XPATH_INVALID_CTXT_SIZE, + XML_XPATH_INVALID_CTXT_POSITION, + XML_XPATH_MEMORY_ERROR, + XML_XPTR_SYNTAX_ERROR, + XML_XPTR_RESOURCE_ERROR, + XML_XPTR_SUB_RESOURCE_ERROR, + XML_XPATH_UNDEF_PREFIX_ERROR, + XML_XPATH_ENCODING_ERROR, + XML_XPATH_INVALID_CHAR_ERROR, + XML_TREE_INVALID_HEX = 1300, + XML_TREE_INVALID_DEC, + XML_TREE_UNTERMINATED_ENTITY, + XML_TREE_NOT_UTF8, + XML_SAVE_NOT_UTF8 = 1400, + XML_SAVE_CHAR_INVALID, + XML_SAVE_NO_DOCTYPE, + XML_SAVE_UNKNOWN_ENCODING, + XML_REGEXP_COMPILE_ERROR = 1450, + XML_IO_UNKNOWN = 1500, + XML_IO_EACCES, + XML_IO_EAGAIN, + XML_IO_EBADF, + XML_IO_EBADMSG, + XML_IO_EBUSY, + XML_IO_ECANCELED, + XML_IO_ECHILD, + XML_IO_EDEADLK, + XML_IO_EDOM, + XML_IO_EEXIST, + XML_IO_EFAULT, + XML_IO_EFBIG, + XML_IO_EINPROGRESS, + XML_IO_EINTR, + XML_IO_EINVAL, + XML_IO_EIO, + XML_IO_EISDIR, + XML_IO_EMFILE, + XML_IO_EMLINK, + XML_IO_EMSGSIZE, + XML_IO_ENAMETOOLONG, + XML_IO_ENFILE, + XML_IO_ENODEV, + XML_IO_ENOENT, + XML_IO_ENOEXEC, + XML_IO_ENOLCK, + XML_IO_ENOMEM, + XML_IO_ENOSPC, + XML_IO_ENOSYS, + XML_IO_ENOTDIR, + XML_IO_ENOTEMPTY, + XML_IO_ENOTSUP, + XML_IO_ENOTTY, + XML_IO_ENXIO, + XML_IO_EPERM, + XML_IO_EPIPE, + XML_IO_ERANGE, + XML_IO_EROFS, + XML_IO_ESPIPE, + XML_IO_ESRCH, + XML_IO_ETIMEDOUT, + XML_IO_EXDEV, + XML_IO_NETWORK_ATTEMPT, + XML_IO_ENCODER, + XML_IO_FLUSH, + XML_IO_WRITE, + XML_IO_NO_INPUT, + XML_IO_BUFFER_FULL, + XML_IO_LOAD_ERROR, + XML_IO_ENOTSOCK, + XML_IO_EISCONN, + XML_IO_ECONNREFUSED, + XML_IO_ENETUNREACH, + XML_IO_EADDRINUSE, + XML_IO_EALREADY, + XML_IO_EAFNOSUPPORT, + XML_XINCLUDE_RECURSION=1600, + XML_XINCLUDE_PARSE_VALUE, + XML_XINCLUDE_ENTITY_DEF_MISMATCH, + XML_XINCLUDE_NO_HREF, + XML_XINCLUDE_NO_FALLBACK, + XML_XINCLUDE_HREF_URI, + XML_XINCLUDE_TEXT_FRAGMENT, + XML_XINCLUDE_TEXT_DOCUMENT, + XML_XINCLUDE_INVALID_CHAR, + XML_XINCLUDE_BUILD_FAILED, + XML_XINCLUDE_UNKNOWN_ENCODING, + XML_XINCLUDE_MULTIPLE_ROOT, + XML_XINCLUDE_XPTR_FAILED, + XML_XINCLUDE_XPTR_RESULT, + XML_XINCLUDE_INCLUDE_IN_INCLUDE, + XML_XINCLUDE_FALLBACKS_IN_INCLUDE, + XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE, + XML_XINCLUDE_DEPRECATED_NS, + XML_XINCLUDE_FRAGMENT_ID, + XML_CATALOG_MISSING_ATTR = 1650, + XML_CATALOG_ENTRY_BROKEN, + XML_CATALOG_PREFER_VALUE, + XML_CATALOG_NOT_CATALOG, + XML_CATALOG_RECURSION, + XML_SCHEMAP_PREFIX_UNDEFINED = 1700, + XML_SCHEMAP_ATTRFORMDEFAULT_VALUE, + XML_SCHEMAP_ATTRGRP_NONAME_NOREF, + XML_SCHEMAP_ATTR_NONAME_NOREF, + XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF, + XML_SCHEMAP_ELEMFORMDEFAULT_VALUE, + XML_SCHEMAP_ELEM_NONAME_NOREF, + XML_SCHEMAP_EXTENSION_NO_BASE, + XML_SCHEMAP_FACET_NO_VALUE, + XML_SCHEMAP_FAILED_BUILD_IMPORT, + XML_SCHEMAP_GROUP_NONAME_NOREF, + XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI, + XML_SCHEMAP_IMPORT_REDEFINE_NSNAME, + XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI, + XML_SCHEMAP_INVALID_BOOLEAN, + XML_SCHEMAP_INVALID_ENUM, + XML_SCHEMAP_INVALID_FACET, + XML_SCHEMAP_INVALID_FACET_VALUE, + XML_SCHEMAP_INVALID_MAXOCCURS, + XML_SCHEMAP_INVALID_MINOCCURS, + XML_SCHEMAP_INVALID_REF_AND_SUBTYPE, + XML_SCHEMAP_INVALID_WHITE_SPACE, + XML_SCHEMAP_NOATTR_NOREF, + XML_SCHEMAP_NOTATION_NO_NAME, + XML_SCHEMAP_NOTYPE_NOREF, + XML_SCHEMAP_REF_AND_SUBTYPE, + XML_SCHEMAP_RESTRICTION_NONAME_NOREF, + XML_SCHEMAP_SIMPLETYPE_NONAME, + XML_SCHEMAP_TYPE_AND_SUBTYPE, + XML_SCHEMAP_UNKNOWN_ALL_CHILD, + XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD, + XML_SCHEMAP_UNKNOWN_ATTR_CHILD, + XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD, + XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP, + XML_SCHEMAP_UNKNOWN_BASE_TYPE, + XML_SCHEMAP_UNKNOWN_CHOICE_CHILD, + XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD, + XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD, + XML_SCHEMAP_UNKNOWN_ELEM_CHILD, + XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD, + XML_SCHEMAP_UNKNOWN_FACET_CHILD, + XML_SCHEMAP_UNKNOWN_FACET_TYPE, + XML_SCHEMAP_UNKNOWN_GROUP_CHILD, + XML_SCHEMAP_UNKNOWN_IMPORT_CHILD, + XML_SCHEMAP_UNKNOWN_LIST_CHILD, + XML_SCHEMAP_UNKNOWN_NOTATION_CHILD, + XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD, + XML_SCHEMAP_UNKNOWN_REF, + XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD, + XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD, + XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD, + XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD, + XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD, + XML_SCHEMAP_UNKNOWN_TYPE, + XML_SCHEMAP_UNKNOWN_UNION_CHILD, + XML_SCHEMAP_ELEM_DEFAULT_FIXED, + XML_SCHEMAP_REGEXP_INVALID, + XML_SCHEMAP_FAILED_LOAD, + XML_SCHEMAP_NOTHING_TO_PARSE, + XML_SCHEMAP_NOROOT, + XML_SCHEMAP_REDEFINED_GROUP, + XML_SCHEMAP_REDEFINED_TYPE, + XML_SCHEMAP_REDEFINED_ELEMENT, + XML_SCHEMAP_REDEFINED_ATTRGROUP, + XML_SCHEMAP_REDEFINED_ATTR, + XML_SCHEMAP_REDEFINED_NOTATION, + XML_SCHEMAP_FAILED_PARSE, + XML_SCHEMAP_UNKNOWN_PREFIX, + XML_SCHEMAP_DEF_AND_PREFIX, + XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD, + XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI, + XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI, + XML_SCHEMAP_NOT_SCHEMA, + XML_SCHEMAP_UNKNOWN_MEMBER_TYPE, + XML_SCHEMAP_INVALID_ATTR_USE, + XML_SCHEMAP_RECURSIVE, + XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE, + XML_SCHEMAP_INVALID_ATTR_COMBINATION, + XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION, + XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD, + XML_SCHEMAP_INVALID_ATTR_NAME, + XML_SCHEMAP_REF_AND_CONTENT, + XML_SCHEMAP_CT_PROPS_CORRECT_1, + XML_SCHEMAP_CT_PROPS_CORRECT_2, + XML_SCHEMAP_CT_PROPS_CORRECT_3, + XML_SCHEMAP_CT_PROPS_CORRECT_4, + XML_SCHEMAP_CT_PROPS_CORRECT_5, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3, + XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER, + XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE, + XML_SCHEMAP_UNION_NOT_EXPRESSIBLE, + XML_SCHEMAP_SRC_IMPORT_3_1, + XML_SCHEMAP_SRC_IMPORT_3_2, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3, + XML_SCHEMAP_COS_CT_EXTENDS_1_3, + XML_SCHEMAV_NOROOT = 1801, + XML_SCHEMAV_UNDECLAREDELEM, + XML_SCHEMAV_NOTTOPLEVEL, + XML_SCHEMAV_MISSING, + XML_SCHEMAV_WRONGELEM, + XML_SCHEMAV_NOTYPE, + XML_SCHEMAV_NOROLLBACK, + XML_SCHEMAV_ISABSTRACT, + XML_SCHEMAV_NOTEMPTY, + XML_SCHEMAV_ELEMCONT, + XML_SCHEMAV_HAVEDEFAULT, + XML_SCHEMAV_NOTNILLABLE, + XML_SCHEMAV_EXTRACONTENT, + XML_SCHEMAV_INVALIDATTR, + XML_SCHEMAV_INVALIDELEM, + XML_SCHEMAV_NOTDETERMINIST, + XML_SCHEMAV_CONSTRUCT, + XML_SCHEMAV_INTERNAL, + XML_SCHEMAV_NOTSIMPLE, + XML_SCHEMAV_ATTRUNKNOWN, + XML_SCHEMAV_ATTRINVALID, + XML_SCHEMAV_VALUE, + XML_SCHEMAV_FACET, + XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1, + XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2, + XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3, + XML_SCHEMAV_CVC_TYPE_3_1_1, + XML_SCHEMAV_CVC_TYPE_3_1_2, + XML_SCHEMAV_CVC_FACET_VALID, + XML_SCHEMAV_CVC_LENGTH_VALID, + XML_SCHEMAV_CVC_MINLENGTH_VALID, + XML_SCHEMAV_CVC_MAXLENGTH_VALID, + XML_SCHEMAV_CVC_MININCLUSIVE_VALID, + XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID, + XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID, + XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID, + XML_SCHEMAV_CVC_TOTALDIGITS_VALID, + XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID, + XML_SCHEMAV_CVC_PATTERN_VALID, + XML_SCHEMAV_CVC_ENUMERATION_VALID, + XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1, + XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2, + XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3, + XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4, + XML_SCHEMAV_CVC_ELT_1, + XML_SCHEMAV_CVC_ELT_2, + XML_SCHEMAV_CVC_ELT_3_1, + XML_SCHEMAV_CVC_ELT_3_2_1, + XML_SCHEMAV_CVC_ELT_3_2_2, + XML_SCHEMAV_CVC_ELT_4_1, + XML_SCHEMAV_CVC_ELT_4_2, + XML_SCHEMAV_CVC_ELT_4_3, + XML_SCHEMAV_CVC_ELT_5_1_1, + XML_SCHEMAV_CVC_ELT_5_1_2, + XML_SCHEMAV_CVC_ELT_5_2_1, + XML_SCHEMAV_CVC_ELT_5_2_2_1, + XML_SCHEMAV_CVC_ELT_5_2_2_2_1, + XML_SCHEMAV_CVC_ELT_5_2_2_2_2, + XML_SCHEMAV_CVC_ELT_6, + XML_SCHEMAV_CVC_ELT_7, + XML_SCHEMAV_CVC_ATTRIBUTE_1, + XML_SCHEMAV_CVC_ATTRIBUTE_2, + XML_SCHEMAV_CVC_ATTRIBUTE_3, + XML_SCHEMAV_CVC_ATTRIBUTE_4, + XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1, + XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1, + XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2, + XML_SCHEMAV_CVC_COMPLEX_TYPE_4, + XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1, + XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2, + XML_SCHEMAV_ELEMENT_CONTENT, + XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING, + XML_SCHEMAV_CVC_COMPLEX_TYPE_1, + XML_SCHEMAV_CVC_AU, + XML_SCHEMAV_CVC_TYPE_1, + XML_SCHEMAV_CVC_TYPE_2, + XML_SCHEMAV_CVC_IDC, + XML_SCHEMAV_CVC_WILDCARD, + XML_SCHEMAV_MISC, + XML_XPTR_UNKNOWN_SCHEME = 1900, + XML_XPTR_CHILDSEQ_START, + XML_XPTR_EVAL_FAILED, + XML_XPTR_EXTRA_OBJECTS, + XML_C14N_CREATE_CTXT = 1950, + XML_C14N_REQUIRES_UTF8, + XML_C14N_CREATE_STACK, + XML_C14N_INVALID_NODE, + XML_C14N_UNKNOW_NODE, + XML_C14N_RELATIVE_NAMESPACE, + XML_FTP_PASV_ANSWER = 2000, + XML_FTP_EPSV_ANSWER, + XML_FTP_ACCNT, + XML_FTP_URL_SYNTAX, + XML_HTTP_URL_SYNTAX = 2020, + XML_HTTP_USE_IP, + XML_HTTP_UNKNOWN_HOST, + XML_SCHEMAP_SRC_SIMPLE_TYPE_1 = 3000, + XML_SCHEMAP_SRC_SIMPLE_TYPE_2, + XML_SCHEMAP_SRC_SIMPLE_TYPE_3, + XML_SCHEMAP_SRC_SIMPLE_TYPE_4, + XML_SCHEMAP_SRC_RESOLVE, + XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE, + XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE, + XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES, + XML_SCHEMAP_ST_PROPS_CORRECT_1, + XML_SCHEMAP_ST_PROPS_CORRECT_2, + XML_SCHEMAP_ST_PROPS_CORRECT_3, + XML_SCHEMAP_COS_ST_RESTRICTS_1_1, + XML_SCHEMAP_COS_ST_RESTRICTS_1_2, + XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1, + XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2, + XML_SCHEMAP_COS_ST_RESTRICTS_2_1, + XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1, + XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2, + XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1, + XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2, + XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3, + XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4, + XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5, + XML_SCHEMAP_COS_ST_RESTRICTS_3_1, + XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1, + XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2, + XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2, + XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1, + XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3, + XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4, + XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5, + XML_SCHEMAP_COS_ST_DERIVED_OK_2_1, + XML_SCHEMAP_COS_ST_DERIVED_OK_2_2, + XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, + XML_SCHEMAP_S4S_ELEM_MISSING, + XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, + XML_SCHEMAP_S4S_ATTR_MISSING, + XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, + XML_SCHEMAP_SRC_ELEMENT_1, + XML_SCHEMAP_SRC_ELEMENT_2_1, + XML_SCHEMAP_SRC_ELEMENT_2_2, + XML_SCHEMAP_SRC_ELEMENT_3, + XML_SCHEMAP_P_PROPS_CORRECT_1, + XML_SCHEMAP_P_PROPS_CORRECT_2_1, + XML_SCHEMAP_P_PROPS_CORRECT_2_2, + XML_SCHEMAP_E_PROPS_CORRECT_2, + XML_SCHEMAP_E_PROPS_CORRECT_3, + XML_SCHEMAP_E_PROPS_CORRECT_4, + XML_SCHEMAP_E_PROPS_CORRECT_5, + XML_SCHEMAP_E_PROPS_CORRECT_6, + XML_SCHEMAP_SRC_INCLUDE, + XML_SCHEMAP_SRC_ATTRIBUTE_1, + XML_SCHEMAP_SRC_ATTRIBUTE_2, + XML_SCHEMAP_SRC_ATTRIBUTE_3_1, + XML_SCHEMAP_SRC_ATTRIBUTE_3_2, + XML_SCHEMAP_SRC_ATTRIBUTE_4, + XML_SCHEMAP_NO_XMLNS, + XML_SCHEMAP_NO_XSI, + XML_SCHEMAP_COS_VALID_DEFAULT_1, + XML_SCHEMAP_COS_VALID_DEFAULT_2_1, + XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1, + XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2, + XML_SCHEMAP_CVC_SIMPLE_TYPE, + XML_SCHEMAP_COS_CT_EXTENDS_1_1, + XML_SCHEMAP_SRC_IMPORT_1_1, + XML_SCHEMAP_SRC_IMPORT_1_2, + XML_SCHEMAP_SRC_IMPORT_2, + XML_SCHEMAP_SRC_IMPORT_2_1, + XML_SCHEMAP_SRC_IMPORT_2_2, + XML_SCHEMAP_INTERNAL, + XML_SCHEMAP_NOT_DETERMINISTIC, + XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1, + XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2, + XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3, + XML_SCHEMAP_MG_PROPS_CORRECT_1, + XML_SCHEMAP_MG_PROPS_CORRECT_2, + XML_SCHEMAP_SRC_CT_1, + XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3, + XML_SCHEMAP_AU_PROPS_CORRECT_2, + XML_SCHEMAP_A_PROPS_CORRECT_2, + XML_SCHEMAP_C_PROPS_CORRECT, + XML_SCHEMAP_SRC_REDEFINE, + XML_SCHEMAP_SRC_IMPORT, + XML_SCHEMAP_WARN_SKIP_SCHEMA, + XML_SCHEMAP_WARN_UNLOCATED_SCHEMA, + XML_SCHEMAP_WARN_ATTR_REDECL_PROH, + XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, + XML_SCHEMAP_AG_PROPS_CORRECT, + XML_SCHEMAP_COS_CT_EXTENDS_1_2, + XML_SCHEMAP_AU_PROPS_CORRECT, + XML_SCHEMAP_A_PROPS_CORRECT_3, + XML_SCHEMAP_COS_ALL_LIMITED, + XML_SCHEMATRONV_ASSERT = 4000, + XML_SCHEMATRONV_REPORT, + XML_MODULE_OPEN = 4900, + XML_MODULE_CLOSE, + XML_CHECK_FOUND_ELEMENT = 5000, + XML_CHECK_FOUND_ATTRIBUTE, + XML_CHECK_FOUND_TEXT, + XML_CHECK_FOUND_CDATA, + XML_CHECK_FOUND_ENTITYREF, + XML_CHECK_FOUND_ENTITY, + XML_CHECK_FOUND_PI, + XML_CHECK_FOUND_COMMENT, + XML_CHECK_FOUND_DOCTYPE, + XML_CHECK_FOUND_FRAGMENT, + XML_CHECK_FOUND_NOTATION, + XML_CHECK_UNKNOWN_NODE, + XML_CHECK_ENTITY_TYPE, + XML_CHECK_NO_PARENT, + XML_CHECK_NO_DOC, + XML_CHECK_NO_NAME, + XML_CHECK_NO_ELEM, + XML_CHECK_WRONG_DOC, + XML_CHECK_NO_PREV, + XML_CHECK_WRONG_PREV, + XML_CHECK_NO_NEXT, + XML_CHECK_WRONG_NEXT, + XML_CHECK_NOT_DTD, + XML_CHECK_NOT_ATTR, + XML_CHECK_NOT_ATTR_DECL, + XML_CHECK_NOT_ELEM_DECL, + XML_CHECK_NOT_ENTITY_DECL, + XML_CHECK_NOT_NS_DECL, + XML_CHECK_NO_HREF, + XML_CHECK_WRONG_PARENT, + XML_CHECK_NS_SCOPE, + XML_CHECK_NS_ANCESTOR, + XML_CHECK_NOT_UTF8, + XML_CHECK_NO_DICT, + XML_CHECK_NOT_NCNAME, + XML_CHECK_OUTSIDE_DICT, + XML_CHECK_WRONG_NAME, + XML_CHECK_NAME_NOT_NULL, + XML_I18N_NO_NAME = 6000, + XML_I18N_NO_HANDLER, + XML_I18N_EXCESS_HANDLER, + XML_I18N_CONV_FAILED, + XML_I18N_NO_OUTPUT + + + + +} xmlParserErrors; +# 844 "/usr/include/libxml2/libxml/xmlerror.h" +typedef void ( *xmlGenericErrorFunc) (void *ctx, + const char *msg, + ...) __attribute__((__format__(__printf__,2,3))); +# 855 "/usr/include/libxml2/libxml/xmlerror.h" +typedef void ( *xmlStructuredErrorFunc) (void *userData, xmlErrorPtr error); + + + + + + void + xmlSetGenericErrorFunc (void *ctx, + xmlGenericErrorFunc handler); + void + initGenericErrorDefaultFunc (xmlGenericErrorFunc *handler); + + void + xmlSetStructuredErrorFunc (void *ctx, + xmlStructuredErrorFunc handler); + + + + + void + xmlParserError (void *ctx, + const char *msg, + ...) __attribute__((__format__(__printf__,2,3))); + void + xmlParserWarning (void *ctx, + const char *msg, + ...) __attribute__((__format__(__printf__,2,3))); + void + xmlParserValidityError (void *ctx, + const char *msg, + ...) __attribute__((__format__(__printf__,2,3))); + void + xmlParserValidityWarning (void *ctx, + const char *msg, + ...) __attribute__((__format__(__printf__,2,3))); + void + xmlParserPrintFileInfo (xmlParserInputPtr input); + void + xmlParserPrintFileContext (xmlParserInputPtr input); + + + + + xmlErrorPtr + xmlGetLastError (void); + void + xmlResetLastError (void); + xmlErrorPtr + xmlCtxtGetLastError (void *ctx); + void + xmlCtxtResetLastError (void *ctx); + void + xmlResetError (xmlErrorPtr err); + int + xmlCopyError (xmlErrorPtr from, + xmlErrorPtr to); +# 942 "/usr/include/libxml2/libxml/xmlerror.h" +} +# 16 "/usr/include/libxml2/libxml/valid.h" 2 + +# 1 "/usr/include/libxml2/libxml/list.h" 1 +# 12 "/usr/include/libxml2/libxml/list.h" +#define __XML_LINK_INCLUDE__ + + + + +extern "C" { + + +typedef struct _xmlLink xmlLink; +typedef xmlLink *xmlLinkPtr; + +typedef struct _xmlList xmlList; +typedef xmlList *xmlListPtr; + + + + + + + +typedef void (*xmlListDeallocator) (xmlLinkPtr lk); +# 42 "/usr/include/libxml2/libxml/list.h" +typedef int (*xmlListDataCompare) (const void *data0, const void *data1); +# 52 "/usr/include/libxml2/libxml/list.h" +typedef int (*xmlListWalker) (const void *data, const void *user); + + + xmlListPtr + xmlListCreate (xmlListDeallocator deallocator, + xmlListDataCompare compare); + void + xmlListDelete (xmlListPtr l); + + + void * + xmlListSearch (xmlListPtr l, + void *data); + void * + xmlListReverseSearch (xmlListPtr l, + void *data); + int + xmlListInsert (xmlListPtr l, + void *data) ; + int + xmlListAppend (xmlListPtr l, + void *data) ; + int + xmlListRemoveFirst (xmlListPtr l, + void *data); + int + xmlListRemoveLast (xmlListPtr l, + void *data); + int + xmlListRemoveAll (xmlListPtr l, + void *data); + void + xmlListClear (xmlListPtr l); + int + xmlListEmpty (xmlListPtr l); + xmlLinkPtr + xmlListFront (xmlListPtr l); + xmlLinkPtr + xmlListEnd (xmlListPtr l); + int + xmlListSize (xmlListPtr l); + + void + xmlListPopFront (xmlListPtr l); + void + xmlListPopBack (xmlListPtr l); + int + xmlListPushFront (xmlListPtr l, + void *data); + int + xmlListPushBack (xmlListPtr l, + void *data); + + + void + xmlListReverse (xmlListPtr l); + void + xmlListSort (xmlListPtr l); + void + xmlListWalk (xmlListPtr l, + xmlListWalker walker, + const void *user); + void + xmlListReverseWalk (xmlListPtr l, + xmlListWalker walker, + const void *user); + void + xmlListMerge (xmlListPtr l1, + xmlListPtr l2); + xmlListPtr + xmlListDup (const xmlListPtr old); + int + xmlListCopy (xmlListPtr cur, + const xmlListPtr old); + + void * + xmlLinkGetData (xmlLinkPtr lk); + + + + + +} +# 18 "/usr/include/libxml2/libxml/valid.h" 2 +# 1 "/usr/include/libxml2/libxml/xmlautomata.h" 1 +# 11 "/usr/include/libxml2/libxml/xmlautomata.h" +#define __XML_AUTOMATA_H__ +# 21 "/usr/include/libxml2/libxml/xmlautomata.h" +extern "C" { + + + + + + + +typedef struct _xmlAutomata xmlAutomata; +typedef xmlAutomata *xmlAutomataPtr; + + + + + + +typedef struct _xmlAutomataState xmlAutomataState; +typedef xmlAutomataState *xmlAutomataStatePtr; + + + + + xmlAutomataPtr + xmlNewAutomata (void); + void + xmlFreeAutomata (xmlAutomataPtr am); + + xmlAutomataStatePtr + xmlAutomataGetInitState (xmlAutomataPtr am); + int + xmlAutomataSetFinalState (xmlAutomataPtr am, + xmlAutomataStatePtr state); + xmlAutomataStatePtr + xmlAutomataNewState (xmlAutomataPtr am); + xmlAutomataStatePtr + xmlAutomataNewTransition (xmlAutomataPtr am, + xmlAutomataStatePtr from, + xmlAutomataStatePtr to, + const xmlChar *token, + void *data); + xmlAutomataStatePtr + xmlAutomataNewTransition2 (xmlAutomataPtr am, + xmlAutomataStatePtr from, + xmlAutomataStatePtr to, + const xmlChar *token, + const xmlChar *token2, + void *data); + xmlAutomataStatePtr + xmlAutomataNewNegTrans (xmlAutomataPtr am, + xmlAutomataStatePtr from, + xmlAutomataStatePtr to, + const xmlChar *token, + const xmlChar *token2, + void *data); + + xmlAutomataStatePtr + xmlAutomataNewCountTrans (xmlAutomataPtr am, + xmlAutomataStatePtr from, + xmlAutomataStatePtr to, + const xmlChar *token, + int min, + int max, + void *data); + xmlAutomataStatePtr + xmlAutomataNewCountTrans2 (xmlAutomataPtr am, + xmlAutomataStatePtr from, + xmlAutomataStatePtr to, + const xmlChar *token, + const xmlChar *token2, + int min, + int max, + void *data); + xmlAutomataStatePtr + xmlAutomataNewOnceTrans (xmlAutomataPtr am, + xmlAutomataStatePtr from, + xmlAutomataStatePtr to, + const xmlChar *token, + int min, + int max, + void *data); + xmlAutomataStatePtr + xmlAutomataNewOnceTrans2 (xmlAutomataPtr am, + xmlAutomataStatePtr from, + xmlAutomataStatePtr to, + const xmlChar *token, + const xmlChar *token2, + int min, + int max, + void *data); + xmlAutomataStatePtr + xmlAutomataNewAllTrans (xmlAutomataPtr am, + xmlAutomataStatePtr from, + xmlAutomataStatePtr to, + int lax); + xmlAutomataStatePtr + xmlAutomataNewEpsilon (xmlAutomataPtr am, + xmlAutomataStatePtr from, + xmlAutomataStatePtr to); + xmlAutomataStatePtr + xmlAutomataNewCountedTrans (xmlAutomataPtr am, + xmlAutomataStatePtr from, + xmlAutomataStatePtr to, + int counter); + xmlAutomataStatePtr + xmlAutomataNewCounterTrans (xmlAutomataPtr am, + xmlAutomataStatePtr from, + xmlAutomataStatePtr to, + int counter); + int + xmlAutomataNewCounter (xmlAutomataPtr am, + int min, + int max); + + xmlRegexpPtr + xmlAutomataCompile (xmlAutomataPtr am); + int + xmlAutomataIsDeterminist (xmlAutomataPtr am); + + +} +# 19 "/usr/include/libxml2/libxml/valid.h" 2 + + + +extern "C" { + + + + + +typedef struct _xmlValidState xmlValidState; +typedef xmlValidState *xmlValidStatePtr; +# 42 "/usr/include/libxml2/libxml/valid.h" +typedef void ( *xmlValidityErrorFunc) (void *ctx, + const char *msg, + ...) __attribute__((__format__(__printf__,2,3))); +# 57 "/usr/include/libxml2/libxml/valid.h" +typedef void ( *xmlValidityWarningFunc) (void *ctx, + const char *msg, + ...) __attribute__((__format__(__printf__,2,3))); +# 80 "/usr/include/libxml2/libxml/valid.h" +typedef struct _xmlValidCtxt xmlValidCtxt; +typedef xmlValidCtxt *xmlValidCtxtPtr; +struct _xmlValidCtxt { + void *userData; + xmlValidityErrorFunc error; + xmlValidityWarningFunc warning; + + + xmlNodePtr node; + int nodeNr; + int nodeMax; + xmlNodePtr *nodeTab; + + unsigned int finishDtd; + xmlDocPtr doc; + int valid; + + + xmlValidState *vstate; + int vstateNr; + int vstateMax; + xmlValidState *vstateTab; + + + xmlAutomataPtr am; + xmlAutomataStatePtr state; + + + + +}; + + + + + + +typedef struct _xmlHashTable xmlNotationTable; +typedef xmlNotationTable *xmlNotationTablePtr; + + + + + + +typedef struct _xmlHashTable xmlElementTable; +typedef xmlElementTable *xmlElementTablePtr; + + + + + + +typedef struct _xmlHashTable xmlAttributeTable; +typedef xmlAttributeTable *xmlAttributeTablePtr; + + + + + + +typedef struct _xmlHashTable xmlIDTable; +typedef xmlIDTable *xmlIDTablePtr; + + + + + + +typedef struct _xmlHashTable xmlRefTable; +typedef xmlRefTable *xmlRefTablePtr; + + + xmlNotationPtr + xmlAddNotationDecl (xmlValidCtxtPtr ctxt, + xmlDtdPtr dtd, + const xmlChar *name, + const xmlChar *PublicID, + const xmlChar *SystemID); + + xmlNotationTablePtr + xmlCopyNotationTable (xmlNotationTablePtr table); + + void + xmlFreeNotationTable (xmlNotationTablePtr table); + + void + xmlDumpNotationDecl (xmlBufferPtr buf, + xmlNotationPtr nota); + void + xmlDumpNotationTable (xmlBufferPtr buf, + xmlNotationTablePtr table); + + + + + xmlElementContentPtr + xmlNewElementContent (const xmlChar *name, + xmlElementContentType type); + xmlElementContentPtr + xmlCopyElementContent (xmlElementContentPtr content); + void + xmlFreeElementContent (xmlElementContentPtr cur); + + xmlElementContentPtr + xmlNewDocElementContent (xmlDocPtr doc, + const xmlChar *name, + xmlElementContentType type); + xmlElementContentPtr + xmlCopyDocElementContent(xmlDocPtr doc, + xmlElementContentPtr content); + void + xmlFreeDocElementContent(xmlDocPtr doc, + xmlElementContentPtr cur); + void + xmlSnprintfElementContent(char *buf, + int size, + xmlElementContentPtr content, + int englob); + + + void + xmlSprintfElementContent(char *buf, + xmlElementContentPtr content, + int englob); + + + + + xmlElementPtr + xmlAddElementDecl (xmlValidCtxtPtr ctxt, + xmlDtdPtr dtd, + const xmlChar *name, + xmlElementTypeVal type, + xmlElementContentPtr content); + + xmlElementTablePtr + xmlCopyElementTable (xmlElementTablePtr table); + + void + xmlFreeElementTable (xmlElementTablePtr table); + + void + xmlDumpElementTable (xmlBufferPtr buf, + xmlElementTablePtr table); + void + xmlDumpElementDecl (xmlBufferPtr buf, + xmlElementPtr elem); + + + + xmlEnumerationPtr + xmlCreateEnumeration (const xmlChar *name); + void + xmlFreeEnumeration (xmlEnumerationPtr cur); + + xmlEnumerationPtr + xmlCopyEnumeration (xmlEnumerationPtr cur); + + + + xmlAttributePtr + xmlAddAttributeDecl (xmlValidCtxtPtr ctxt, + xmlDtdPtr dtd, + const xmlChar *elem, + const xmlChar *name, + const xmlChar *ns, + xmlAttributeType type, + xmlAttributeDefault def, + const xmlChar *defaultValue, + xmlEnumerationPtr tree); + + xmlAttributeTablePtr + xmlCopyAttributeTable (xmlAttributeTablePtr table); + + void + xmlFreeAttributeTable (xmlAttributeTablePtr table); + + void + xmlDumpAttributeTable (xmlBufferPtr buf, + xmlAttributeTablePtr table); + void + xmlDumpAttributeDecl (xmlBufferPtr buf, + xmlAttributePtr attr); + + + + xmlIDPtr + xmlAddID (xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + const xmlChar *value, + xmlAttrPtr attr); + void + xmlFreeIDTable (xmlIDTablePtr table); + xmlAttrPtr + xmlGetID (xmlDocPtr doc, + const xmlChar *ID); + int + xmlIsID (xmlDocPtr doc, + xmlNodePtr elem, + xmlAttrPtr attr); + int + xmlRemoveID (xmlDocPtr doc, + xmlAttrPtr attr); + + + xmlRefPtr + xmlAddRef (xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + const xmlChar *value, + xmlAttrPtr attr); + void + xmlFreeRefTable (xmlRefTablePtr table); + int + xmlIsRef (xmlDocPtr doc, + xmlNodePtr elem, + xmlAttrPtr attr); + int + xmlRemoveRef (xmlDocPtr doc, + xmlAttrPtr attr); + xmlListPtr + xmlGetRefs (xmlDocPtr doc, + const xmlChar *ID); + + + + + + + xmlValidCtxtPtr + xmlNewValidCtxt(void); + void + xmlFreeValidCtxt(xmlValidCtxtPtr); + + int + xmlValidateRoot (xmlValidCtxtPtr ctxt, + xmlDocPtr doc); + int + xmlValidateElementDecl (xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlElementPtr elem); + xmlChar * + xmlValidNormalizeAttributeValue(xmlDocPtr doc, + xmlNodePtr elem, + const xmlChar *name, + const xmlChar *value); + xmlChar * + xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlNodePtr elem, + const xmlChar *name, + const xmlChar *value); + int + xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlAttributePtr attr); + int + xmlValidateAttributeValue(xmlAttributeType type, + const xmlChar *value); + int + xmlValidateNotationDecl (xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlNotationPtr nota); + int + xmlValidateDtd (xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlDtdPtr dtd); + int + xmlValidateDtdFinal (xmlValidCtxtPtr ctxt, + xmlDocPtr doc); + int + xmlValidateDocument (xmlValidCtxtPtr ctxt, + xmlDocPtr doc); + int + xmlValidateElement (xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlNodePtr elem); + int + xmlValidateOneElement (xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlNodePtr elem); + int + xmlValidateOneAttribute (xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlNodePtr elem, + xmlAttrPtr attr, + const xmlChar *value); + int + xmlValidateOneNamespace (xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlNodePtr elem, + const xmlChar *prefix, + xmlNsPtr ns, + const xmlChar *value); + int + xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt, + xmlDocPtr doc); + + + + int + xmlValidateNotationUse (xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + const xmlChar *notationName); + + + int + xmlIsMixedElement (xmlDocPtr doc, + const xmlChar *name); + xmlAttributePtr + xmlGetDtdAttrDesc (xmlDtdPtr dtd, + const xmlChar *elem, + const xmlChar *name); + xmlAttributePtr + xmlGetDtdQAttrDesc (xmlDtdPtr dtd, + const xmlChar *elem, + const xmlChar *name, + const xmlChar *prefix); + xmlNotationPtr + xmlGetDtdNotationDesc (xmlDtdPtr dtd, + const xmlChar *name); + xmlElementPtr + xmlGetDtdQElementDesc (xmlDtdPtr dtd, + const xmlChar *name, + const xmlChar *prefix); + xmlElementPtr + xmlGetDtdElementDesc (xmlDtdPtr dtd, + const xmlChar *name); + + + + int + xmlValidGetPotentialChildren(xmlElementContent *ctree, + const xmlChar **names, + int *len, + int max); + + int + xmlValidGetValidElements(xmlNode *prev, + xmlNode *next, + const xmlChar **names, + int max); + int + xmlValidateNameValue (const xmlChar *value); + int + xmlValidateNamesValue (const xmlChar *value); + int + xmlValidateNmtokenValue (const xmlChar *value); + int + xmlValidateNmtokensValue(const xmlChar *value); + + + + + + int + xmlValidBuildContentModel(xmlValidCtxtPtr ctxt, + xmlElementPtr elem); + + int + xmlValidatePushElement (xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlNodePtr elem, + const xmlChar *qname); + int + xmlValidatePushCData (xmlValidCtxtPtr ctxt, + const xmlChar *data, + int len); + int + xmlValidatePopElement (xmlValidCtxtPtr ctxt, + xmlDocPtr doc, + xmlNodePtr elem, + const xmlChar *qname); + + + +} +# 20 "/usr/include/libxml2/libxml/parser.h" 2 +# 1 "/usr/include/libxml2/libxml/entities.h" 1 +# 12 "/usr/include/libxml2/libxml/entities.h" +#define __XML_ENTITIES_H__ + + + + + +extern "C" { + + + + + +typedef enum { + XML_INTERNAL_GENERAL_ENTITY = 1, + XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2, + XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3, + XML_INTERNAL_PARAMETER_ENTITY = 4, + XML_EXTERNAL_PARAMETER_ENTITY = 5, + XML_INTERNAL_PREDEFINED_ENTITY = 6 +} xmlEntityType; + + + + + + +struct _xmlEntity { + void *_private; + xmlElementType type; + const xmlChar *name; + struct _xmlNode *children; + struct _xmlNode *last; + struct _xmlDtd *parent; + struct _xmlNode *next; + struct _xmlNode *prev; + struct _xmlDoc *doc; + + xmlChar *orig; + xmlChar *content; + int length; + xmlEntityType etype; + const xmlChar *ExternalID; + const xmlChar *SystemID; + + struct _xmlEntity *nexte; + const xmlChar *URI; + int owner; + int checked; + + +}; + + + + + + +typedef struct _xmlHashTable xmlEntitiesTable; +typedef xmlEntitiesTable *xmlEntitiesTablePtr; + + + + + + + void + xmlInitializePredefinedEntities (void); + + + xmlEntityPtr + xmlNewEntity (xmlDocPtr doc, + const xmlChar *name, + int type, + const xmlChar *ExternalID, + const xmlChar *SystemID, + const xmlChar *content); + xmlEntityPtr + xmlAddDocEntity (xmlDocPtr doc, + const xmlChar *name, + int type, + const xmlChar *ExternalID, + const xmlChar *SystemID, + const xmlChar *content); + xmlEntityPtr + xmlAddDtdEntity (xmlDocPtr doc, + const xmlChar *name, + int type, + const xmlChar *ExternalID, + const xmlChar *SystemID, + const xmlChar *content); + xmlEntityPtr + xmlGetPredefinedEntity (const xmlChar *name); + xmlEntityPtr + xmlGetDocEntity (xmlDocPtr doc, + const xmlChar *name); + xmlEntityPtr + xmlGetDtdEntity (xmlDocPtr doc, + const xmlChar *name); + xmlEntityPtr + xmlGetParameterEntity (xmlDocPtr doc, + const xmlChar *name); + + const xmlChar * + xmlEncodeEntities (xmlDocPtr doc, + const xmlChar *input); + + xmlChar * + xmlEncodeEntitiesReentrant(xmlDocPtr doc, + const xmlChar *input); + xmlChar * + xmlEncodeSpecialChars (xmlDocPtr doc, + const xmlChar *input); + xmlEntitiesTablePtr + xmlCreateEntitiesTable (void); + + xmlEntitiesTablePtr + xmlCopyEntitiesTable (xmlEntitiesTablePtr table); + + void + xmlFreeEntitiesTable (xmlEntitiesTablePtr table); + + void + xmlDumpEntitiesTable (xmlBufferPtr buf, + xmlEntitiesTablePtr table); + void + xmlDumpEntityDecl (xmlBufferPtr buf, + xmlEntityPtr ent); + + + void + xmlCleanupPredefinedEntities(void); + + + + +} +# 21 "/usr/include/libxml2/libxml/parser.h" 2 +# 1 "/usr/include/libxml2/libxml/xmlerror.h" 1 +# 22 "/usr/include/libxml2/libxml/parser.h" 2 + + + +extern "C" { + + + + + + + +#define XML_DEFAULT_VERSION "1.0" +# 52 "/usr/include/libxml2/libxml/parser.h" +typedef void (* xmlParserInputDeallocate)(xmlChar *str); + +struct _xmlParserInput { + + xmlParserInputBufferPtr buf; + + const char *filename; + const char *directory; + const xmlChar *base; + const xmlChar *cur; + const xmlChar *end; + int length; + int line; + int col; + + + + + + unsigned long consumed; + xmlParserInputDeallocate free; + const xmlChar *encoding; + const xmlChar *version; + int standalone; + int id; +}; +# 86 "/usr/include/libxml2/libxml/parser.h" +typedef struct _xmlParserNodeInfo xmlParserNodeInfo; +typedef xmlParserNodeInfo *xmlParserNodeInfoPtr; + +struct _xmlParserNodeInfo { + const struct _xmlNode* node; + + unsigned long begin_pos; + unsigned long begin_line; + unsigned long end_pos; + unsigned long end_line; +}; + +typedef struct _xmlParserNodeInfoSeq xmlParserNodeInfoSeq; +typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr; +struct _xmlParserNodeInfoSeq { + unsigned long maximum; + unsigned long length; + xmlParserNodeInfo* buffer; +}; + + + + + + + +typedef enum { + XML_PARSER_EOF = -1, + XML_PARSER_START = 0, + XML_PARSER_MISC, + XML_PARSER_PI, + XML_PARSER_DTD, + XML_PARSER_PROLOG, + XML_PARSER_COMMENT, + XML_PARSER_START_TAG, + XML_PARSER_CONTENT, + XML_PARSER_CDATA_SECTION, + XML_PARSER_END_TAG, + XML_PARSER_ENTITY_DECL, + XML_PARSER_ENTITY_VALUE, + XML_PARSER_ATTRIBUTE_VALUE, + XML_PARSER_SYSTEM_LITERAL, + XML_PARSER_EPILOG, + XML_PARSER_IGNORE, + XML_PARSER_PUBLIC_LITERAL +} xmlParserInputState; + + + + + + + +#define XML_DETECT_IDS 2 +# 148 "/usr/include/libxml2/libxml/parser.h" +#define XML_COMPLETE_ATTRS 4 + + + + + + + +#define XML_SKIP_IDS 8 + + + + + + +typedef enum { + XML_PARSE_UNKNOWN = 0, + XML_PARSE_DOM = 1, + XML_PARSE_SAX = 2, + XML_PARSE_PUSH_DOM = 3, + XML_PARSE_PUSH_SAX = 4, + XML_PARSE_READER = 5 +} xmlParserMode; +# 184 "/usr/include/libxml2/libxml/parser.h" +struct _xmlParserCtxt { + struct _xmlSAXHandler *sax; + void *userData; + xmlDocPtr myDoc; + int wellFormed; + int replaceEntities; + const xmlChar *version; + const xmlChar *encoding; + int standalone; + int html; + + + + + + xmlParserInputPtr input; + int inputNr; + int inputMax; + xmlParserInputPtr *inputTab; + + + xmlNodePtr node; + int nodeNr; + int nodeMax; + xmlNodePtr *nodeTab; + + int record_info; + xmlParserNodeInfoSeq node_seq; + + int errNo; + + int hasExternalSubset; + int hasPErefs; + int external; + + int valid; + int validate; + xmlValidCtxt vctxt; + + xmlParserInputState instate; + int token; + + char *directory; + + + const xmlChar *name; + int nameNr; + int nameMax; + const xmlChar * *nameTab; + + long nbChars; + long checkIndex; + int keepBlanks; + int disableSAX; + int inSubset; + const xmlChar * intSubName; + xmlChar * extSubURI; + xmlChar * extSubSystem; + + + int * space; + int spaceNr; + int spaceMax; + int * spaceTab; + + int depth; + xmlParserInputPtr entity; + int charset; + + int nodelen; + int nodemem; + int pedantic; + void *_private; + + int loadsubset; + int linenumbers; + void *catalogs; + int recovery; + int progressive; + xmlDictPtr dict; + const xmlChar * *atts; + int maxatts; + int docdict; + + + + + const xmlChar *str_xml; + const xmlChar *str_xmlns; + const xmlChar *str_xml_ns; + + + + + int sax2; + int nsNr; + int nsMax; + const xmlChar * *nsTab; + int *attallocs; + void * *pushTab; + xmlHashTablePtr attsDefault; + xmlHashTablePtr attsSpecial; + int nsWellFormed; + int options; + + + + + int dictNames; + int freeElemsNr; + xmlNodePtr freeElems; + int freeAttrsNr; + xmlAttrPtr freeAttrs; + + + + + xmlError lastError; + xmlParserMode parseMode; + unsigned long nbentities; + unsigned long sizeentities; + + + xmlParserNodeInfo *nodeInfo; + int nodeInfoNr; + int nodeInfoMax; + xmlParserNodeInfo *nodeInfoTab; +}; + + + + + + +struct _xmlSAXLocator { + const xmlChar *(*getPublicId)(void *ctx); + const xmlChar *(*getSystemId)(void *ctx); + int (*getLineNumber)(void *ctx); + int (*getColumnNumber)(void *ctx); +}; +# 347 "/usr/include/libxml2/libxml/parser.h" +typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx, + const xmlChar *publicId, + const xmlChar *systemId); +# 359 "/usr/include/libxml2/libxml/parser.h" +typedef void (*internalSubsetSAXFunc) (void *ctx, + const xmlChar *name, + const xmlChar *ExternalID, + const xmlChar *SystemID); +# 372 "/usr/include/libxml2/libxml/parser.h" +typedef void (*externalSubsetSAXFunc) (void *ctx, + const xmlChar *name, + const xmlChar *ExternalID, + const xmlChar *SystemID); +# 385 "/usr/include/libxml2/libxml/parser.h" +typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx, + const xmlChar *name); +# 396 "/usr/include/libxml2/libxml/parser.h" +typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx, + const xmlChar *name); +# 409 "/usr/include/libxml2/libxml/parser.h" +typedef void (*entityDeclSAXFunc) (void *ctx, + const xmlChar *name, + int type, + const xmlChar *publicId, + const xmlChar *systemId, + xmlChar *content); +# 424 "/usr/include/libxml2/libxml/parser.h" +typedef void (*notationDeclSAXFunc)(void *ctx, + const xmlChar *name, + const xmlChar *publicId, + const xmlChar *systemId); +# 440 "/usr/include/libxml2/libxml/parser.h" +typedef void (*attributeDeclSAXFunc)(void *ctx, + const xmlChar *elem, + const xmlChar *fullname, + int type, + int def, + const xmlChar *defaultValue, + xmlEnumerationPtr tree); +# 456 "/usr/include/libxml2/libxml/parser.h" +typedef void (*elementDeclSAXFunc)(void *ctx, + const xmlChar *name, + int type, + xmlElementContentPtr content); +# 470 "/usr/include/libxml2/libxml/parser.h" +typedef void (*unparsedEntityDeclSAXFunc)(void *ctx, + const xmlChar *name, + const xmlChar *publicId, + const xmlChar *systemId, + const xmlChar *notationName); +# 483 "/usr/include/libxml2/libxml/parser.h" +typedef void (*setDocumentLocatorSAXFunc) (void *ctx, + xmlSAXLocatorPtr loc); + + + + + + +typedef void (*startDocumentSAXFunc) (void *ctx); + + + + + + +typedef void (*endDocumentSAXFunc) (void *ctx); +# 507 "/usr/include/libxml2/libxml/parser.h" +typedef void (*startElementSAXFunc) (void *ctx, + const xmlChar *name, + const xmlChar **atts); + + + + + + + +typedef void (*endElementSAXFunc) (void *ctx, + const xmlChar *name); +# 530 "/usr/include/libxml2/libxml/parser.h" +typedef void (*attributeSAXFunc) (void *ctx, + const xmlChar *name, + const xmlChar *value); + + + + + + + +typedef void (*referenceSAXFunc) (void *ctx, + const xmlChar *name); +# 550 "/usr/include/libxml2/libxml/parser.h" +typedef void (*charactersSAXFunc) (void *ctx, + const xmlChar *ch, + int len); +# 562 "/usr/include/libxml2/libxml/parser.h" +typedef void (*ignorableWhitespaceSAXFunc) (void *ctx, + const xmlChar *ch, + int len); +# 573 "/usr/include/libxml2/libxml/parser.h" +typedef void (*processingInstructionSAXFunc) (void *ctx, + const xmlChar *target, + const xmlChar *data); + + + + + + + +typedef void (*commentSAXFunc) (void *ctx, + const xmlChar *value); +# 593 "/usr/include/libxml2/libxml/parser.h" +typedef void (*cdataBlockSAXFunc) ( + void *ctx, + const xmlChar *value, + int len); +# 605 "/usr/include/libxml2/libxml/parser.h" +typedef void ( *warningSAXFunc) (void *ctx, + const char *msg, ...) __attribute__((__format__(__printf__,2,3))); +# 615 "/usr/include/libxml2/libxml/parser.h" +typedef void ( *errorSAXFunc) (void *ctx, + const char *msg, ...) __attribute__((__format__(__printf__,2,3))); +# 627 "/usr/include/libxml2/libxml/parser.h" +typedef void ( *fatalErrorSAXFunc) (void *ctx, + const char *msg, ...) __attribute__((__format__(__printf__,2,3))); +# 637 "/usr/include/libxml2/libxml/parser.h" +typedef int (*isStandaloneSAXFunc) (void *ctx); +# 646 "/usr/include/libxml2/libxml/parser.h" +typedef int (*hasInternalSubsetSAXFunc) (void *ctx); +# 656 "/usr/include/libxml2/libxml/parser.h" +typedef int (*hasExternalSubsetSAXFunc) (void *ctx); +# 668 "/usr/include/libxml2/libxml/parser.h" +#define XML_SAX2_MAGIC 0xDEEDBEAF +# 689 "/usr/include/libxml2/libxml/parser.h" +typedef void (*startElementNsSAX2Func) (void *ctx, + const xmlChar *localname, + const xmlChar *prefix, + const xmlChar *URI, + int nb_namespaces, + const xmlChar **namespaces, + int nb_attributes, + int nb_defaulted, + const xmlChar **attributes); +# 710 "/usr/include/libxml2/libxml/parser.h" +typedef void (*endElementNsSAX2Func) (void *ctx, + const xmlChar *localname, + const xmlChar *prefix, + const xmlChar *URI); + + +struct _xmlSAXHandler { + internalSubsetSAXFunc internalSubset; + isStandaloneSAXFunc isStandalone; + hasInternalSubsetSAXFunc hasInternalSubset; + hasExternalSubsetSAXFunc hasExternalSubset; + resolveEntitySAXFunc resolveEntity; + getEntitySAXFunc getEntity; + entityDeclSAXFunc entityDecl; + notationDeclSAXFunc notationDecl; + attributeDeclSAXFunc attributeDecl; + elementDeclSAXFunc elementDecl; + unparsedEntityDeclSAXFunc unparsedEntityDecl; + setDocumentLocatorSAXFunc setDocumentLocator; + startDocumentSAXFunc startDocument; + endDocumentSAXFunc endDocument; + startElementSAXFunc startElement; + endElementSAXFunc endElement; + referenceSAXFunc reference; + charactersSAXFunc characters; + ignorableWhitespaceSAXFunc ignorableWhitespace; + processingInstructionSAXFunc processingInstruction; + commentSAXFunc comment; + warningSAXFunc warning; + errorSAXFunc error; + fatalErrorSAXFunc fatalError; + getParameterEntitySAXFunc getParameterEntity; + cdataBlockSAXFunc cdataBlock; + externalSubsetSAXFunc externalSubset; + unsigned int initialized; + + void *_private; + startElementNsSAX2Func startElementNs; + endElementNsSAX2Func endElementNs; + xmlStructuredErrorFunc serror; +}; + + + + +typedef struct _xmlSAXHandlerV1 xmlSAXHandlerV1; +typedef xmlSAXHandlerV1 *xmlSAXHandlerV1Ptr; +struct _xmlSAXHandlerV1 { + internalSubsetSAXFunc internalSubset; + isStandaloneSAXFunc isStandalone; + hasInternalSubsetSAXFunc hasInternalSubset; + hasExternalSubsetSAXFunc hasExternalSubset; + resolveEntitySAXFunc resolveEntity; + getEntitySAXFunc getEntity; + entityDeclSAXFunc entityDecl; + notationDeclSAXFunc notationDecl; + attributeDeclSAXFunc attributeDecl; + elementDeclSAXFunc elementDecl; + unparsedEntityDeclSAXFunc unparsedEntityDecl; + setDocumentLocatorSAXFunc setDocumentLocator; + startDocumentSAXFunc startDocument; + endDocumentSAXFunc endDocument; + startElementSAXFunc startElement; + endElementSAXFunc endElement; + referenceSAXFunc reference; + charactersSAXFunc characters; + ignorableWhitespaceSAXFunc ignorableWhitespace; + processingInstructionSAXFunc processingInstruction; + commentSAXFunc comment; + warningSAXFunc warning; + errorSAXFunc error; + fatalErrorSAXFunc fatalError; + getParameterEntitySAXFunc getParameterEntity; + cdataBlockSAXFunc cdataBlock; + externalSubsetSAXFunc externalSubset; + unsigned int initialized; +}; +# 799 "/usr/include/libxml2/libxml/parser.h" +typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL, + const char *ID, + xmlParserCtxtPtr context); + + +} + + +# 1 "/usr/include/libxml2/libxml/encoding.h" 1 +# 23 "/usr/include/libxml2/libxml/encoding.h" +#define __XML_CHAR_ENCODING_H__ + + + + +# 1 "/usr/include/iconv.h" 1 3 4 +# 20 "/usr/include/iconv.h" 3 4 +#define _ICONV_H 1 + + +#define __need_size_t +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 25 "/usr/include/iconv.h" 2 3 4 + + +extern "C" { + + +typedef void *iconv_t; + + + + + + + +extern iconv_t iconv_open (__const char *__tocode, __const char *__fromcode); + + + + +extern size_t iconv (iconv_t __cd, char **__restrict __inbuf, + size_t *__restrict __inbytesleft, + char **__restrict __outbuf, + size_t *__restrict __outbytesleft); + + + + + +extern int iconv_close (iconv_t __cd); + +} +# 29 "/usr/include/libxml2/libxml/encoding.h" 2 + + +# 1 "/usr/include/unicode/ucnv.h" 1 3 4 +# 48 "/usr/include/unicode/ucnv.h" 3 4 +#define UCNV_H + +# 1 "/usr/include/unicode/ucnv_err.h" 1 3 4 +# 84 "/usr/include/unicode/ucnv_err.h" 3 4 +#define UCNV_ERR_H + +# 1 "/usr/include/unicode/utypes.h" 1 3 4 +# 33 "/usr/include/unicode/utypes.h" 3 4 +#define UTYPES_H + + +# 1 "/usr/include/unicode/umachine.h" 1 3 4 +# 24 "/usr/include/unicode/umachine.h" 3 4 +#define __UMACHINE_H__ +# 58 "/usr/include/unicode/umachine.h" 3 4 +# 1 "/usr/include/unicode/ptypes.h" 1 3 4 +# 21 "/usr/include/unicode/ptypes.h" 3 4 +#define _PTYPES_H + +# 1 "/usr/include/sys/types.h" 1 3 4 +# 24 "/usr/include/sys/types.h" 3 4 +#define _SYS_TYPES_H 1 + + + +extern "C" { + + + + + +typedef __u_char u_char; +typedef __u_short u_short; +typedef __u_int u_int; +typedef __u_long u_long; +typedef __quad_t quad_t; +typedef __u_quad_t u_quad_t; +typedef __fsid_t fsid_t; +#define __u_char_defined + + + +typedef __loff_t loff_t; + + + +typedef __ino_t ino_t; + + + +#define __ino_t_defined + + +typedef __ino64_t ino64_t; +#define __ino64_t_defined + + + +typedef __dev_t dev_t; +#define __dev_t_defined +# 71 "/usr/include/sys/types.h" 3 4 +typedef __mode_t mode_t; +#define __mode_t_defined + + + +typedef __nlink_t nlink_t; +#define __nlink_t_defined +# 105 "/usr/include/sys/types.h" 3 4 +typedef __id_t id_t; +#define __id_t_defined +# 116 "/usr/include/sys/types.h" 3 4 +typedef __daddr_t daddr_t; +typedef __caddr_t caddr_t; +#define __daddr_t_defined + + + + +typedef __key_t key_t; +#define __key_t_defined + + + +#define __need_clock_t + +#define __need_time_t +#define __need_timer_t +#define __need_clockid_t +# 141 "/usr/include/sys/types.h" 3 4 +typedef __suseconds_t suseconds_t; +#define __suseconds_t_defined + + + +#define __need_size_t +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 148 "/usr/include/sys/types.h" 2 3 4 + + + +typedef unsigned long int ulong; +typedef unsigned short int ushort; +typedef unsigned int uint; +# 188 "/usr/include/sys/types.h" 3 4 +#define __intN_t(N,MODE) typedef int int ##N ##_t __attribute__ ((__mode__ (MODE))) + +#define __u_intN_t(N,MODE) typedef unsigned int u_int ##N ##_t __attribute__ ((__mode__ (MODE))) + + + +#define __int8_t_defined +typedef int int8_t __attribute__ ((__mode__ (__QI__))); +typedef int int16_t __attribute__ ((__mode__ (__HI__))); +typedef int int32_t __attribute__ ((__mode__ (__SI__))); +typedef int int64_t __attribute__ ((__mode__ (__DI__))); + + +typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); +typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); + +typedef int register_t __attribute__ ((__mode__ (__word__))); + + + + + +#define __BIT_TYPES_DEFINED__ 1 + + + + + + + +# 1 "/usr/include/sys/select.h" 1 3 4 +# 23 "/usr/include/sys/select.h" 3 4 +#define _SYS_SELECT_H 1 + + + + + + + +# 1 "/usr/include/bits/select.h" 1 3 4 +# 23 "/usr/include/bits/select.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 + + + +#define __WORDSIZE 64 +#define __WORDSIZE_COMPAT32 1 +# 24 "/usr/include/bits/select.h" 2 3 4 + + + + + +#define __FD_ZERO_STOS "stosq" + + + + +#define __FD_ZERO(fdsp) do { int __d0, __d1; __asm__ __volatile__ ("cld; rep; " __FD_ZERO_STOS : "=c" (__d0), "=D" (__d1) : "a" (0), "0" (sizeof (fd_set) / sizeof (__fd_mask)), "1" (&__FDS_BITS (fdsp)[0]) : "memory"); } while (0) +# 59 "/usr/include/bits/select.h" 3 4 +#define __FD_SET(d,set) ((void) (__FDS_BITS (set)[__FDELT (d)] |= __FDMASK (d))) + +#define __FD_CLR(d,set) ((void) (__FDS_BITS (set)[__FDELT (d)] &= ~__FDMASK (d))) + +#define __FD_ISSET(d,set) ((__FDS_BITS (set)[__FDELT (d)] & __FDMASK (d)) != 0) +# 32 "/usr/include/sys/select.h" 2 3 4 + + +# 1 "/usr/include/bits/sigset.h" 1 3 4 +# 22 "/usr/include/bits/sigset.h" 3 4 +#define _SIGSET_H_types 1 + +typedef int __sig_atomic_t; + + + +#define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) +typedef struct + { + unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; + } __sigset_t; +# 35 "/usr/include/sys/select.h" 2 3 4 + + +#define __sigset_t_defined +typedef __sigset_t sigset_t; + + + +#define __need_time_t +#define __need_timespec + +#define __need_timeval +# 1 "/usr/include/bits/time.h" 1 3 4 +# 99 "/usr/include/bits/time.h" 3 4 +#undef __need_timeval +# 47 "/usr/include/sys/select.h" 2 3 4 +# 55 "/usr/include/sys/select.h" 3 4 +typedef long int __fd_mask; + + +#undef __NFDBITS +#undef __FDELT +#undef __FDMASK + +#define __NFDBITS (8 * (int) sizeof (__fd_mask)) +#define __FDELT(d) ((d) / __NFDBITS) +#define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS)) + + +typedef struct + { + + + + __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; +#define __FDS_BITS(set) ((set)->fds_bits) + + + + + } fd_set; + + +#define FD_SETSIZE __FD_SETSIZE + + + +typedef __fd_mask fd_mask; + + +#define NFDBITS __NFDBITS + + + + +#define FD_SET(fd,fdsetp) __FD_SET (fd, fdsetp) +#define FD_CLR(fd,fdsetp) __FD_CLR (fd, fdsetp) +#define FD_ISSET(fd,fdsetp) __FD_ISSET (fd, fdsetp) +#define FD_ZERO(fdsetp) __FD_ZERO (fdsetp) + + +extern "C" { +# 109 "/usr/include/sys/select.h" 3 4 +extern int select (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + struct timeval *__restrict __timeout); +# 121 "/usr/include/sys/select.h" 3 4 +extern int pselect (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + const struct timespec *__restrict __timeout, + const __sigset_t *__restrict __sigmask); + + +} +# 221 "/usr/include/sys/types.h" 2 3 4 + + +# 1 "/usr/include/sys/sysmacros.h" 1 3 4 +# 22 "/usr/include/sys/sysmacros.h" 3 4 +#define _SYS_SYSMACROS_H 1 + + + + + + + +extern "C" { + +__extension__ +extern unsigned int gnu_dev_major (unsigned long long int __dev) + throw (); +__extension__ +extern unsigned int gnu_dev_minor (unsigned long long int __dev) + throw (); +__extension__ +extern unsigned long long int gnu_dev_makedev (unsigned int __major, + unsigned int __minor) + throw (); + + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int +gnu_dev_major (unsigned long long int __dev) throw () +{ + return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); +} + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int +gnu_dev_minor (unsigned long long int __dev) throw () +{ + return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); +} + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned long long int +gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw () +{ + return ((__minor & 0xff) | ((__major & 0xfff) << 8) + | (((unsigned long long int) (__minor & ~0xff)) << 12) + | (((unsigned long long int) (__major & ~0xfff)) << 32)); +} + +} + + +#define major(dev) gnu_dev_major (dev) +#define minor(dev) gnu_dev_minor (dev) +#define makedev(maj,min) gnu_dev_makedev (maj, min) +# 224 "/usr/include/sys/types.h" 2 3 4 + + + + + +typedef __blksize_t blksize_t; +#define __blksize_t_defined + + + + + +typedef __blkcnt_t blkcnt_t; +#define __blkcnt_t_defined + + +typedef __fsblkcnt_t fsblkcnt_t; +#define __fsblkcnt_t_defined + + +typedef __fsfilcnt_t fsfilcnt_t; +#define __fsfilcnt_t_defined +# 263 "/usr/include/sys/types.h" 3 4 +typedef __blkcnt64_t blkcnt64_t; +typedef __fsblkcnt64_t fsblkcnt64_t; +typedef __fsfilcnt64_t fsfilcnt64_t; +# 274 "/usr/include/sys/types.h" 3 4 +} +# 24 "/usr/include/unicode/ptypes.h" 2 3 4 + +# 1 "/usr/include/unicode/platform.h" 1 3 4 +# 24 "/usr/include/unicode/platform.h" 3 4 +#define _PLATFORM_H +# 41 "/usr/include/unicode/platform.h" 3 4 +#define UCLN_NO_AUTO_CLEANUP 1 +# 53 "/usr/include/unicode/platform.h" 3 4 +#define U_LINUX +# 62 "/usr/include/unicode/platform.h" 3 4 +#define U_HAVE_DIRENT_H 1 + + + + +#define U_HAVE_INTTYPES_H 1 +# 85 "/usr/include/unicode/platform.h" 3 4 +#define U_IOSTREAM_SOURCE 199711 +# 97 "/usr/include/unicode/platform.h" 3 4 +#define U_HAVE_STD_STRING 1 + + + + +#define U_HAVE_INT8_T 1 + + + +#define U_HAVE_UINT8_T 1 + + + +#define U_HAVE_INT16_T 1 + + + +#define U_HAVE_UINT16_T 1 + + + +#define U_HAVE_INT32_T 1 + + + +#define U_HAVE_UINT32_T 1 + + + +#define U_HAVE_INT64_T 1 + + + +#define U_HAVE_UINT64_T 1 +# 141 "/usr/include/unicode/platform.h" 3 4 +#define U_HAVE_NAMESPACE 1 + + + + + + +#define U_IS_BIG_ENDIAN (BYTE_ORDER == BIG_ENDIAN) + + + + + + +#define ICU_USE_THREADS 1 + + + +#define U_DEBUG 0 + + + +#define U_RELEASE 1 + + + + + +#define U_DISABLE_RENAMING 0 + + + + +#define U_OVERRIDE_CXX_ALLOCATION 1 + + + +#define U_HAVE_PLACEMENT_NEW 1 + + + + +#define U_ENABLE_TRACING 0 + + + + + + + +#define U_ENABLE_DYLOAD 1 + + + + + + + +#define U_CHECK_DYLOAD 1 + + + + + +#define U_DEFAULT_SHOW_DRAFT 1 +# 225 "/usr/include/unicode/platform.h" 3 4 +#define U_HAVE_WCHAR_H 1 + + + +#define U_SIZEOF_WCHAR_T 4 + + + +#define U_HAVE_WCSCPY 1 +# 249 "/usr/include/unicode/platform.h" 3 4 +#define U_GNUC_UTF16_STRING 0 +# 274 "/usr/include/unicode/platform.h" 3 4 +#define U_HAVE_NL_LANGINFO_CODESET 1 + + + +#define U_NL_LANGINFO_CODESET CODESET + + + +#define U_TZSET tzset + + +#define U_TIMEZONE __timezone + + +#define U_TZNAME tzname + + +#define U_HAVE_MMAP 1 +#define U_HAVE_POPEN 1 +# 303 "/usr/include/unicode/platform.h" 3 4 +#define U_EXPORT __attribute__((visibility("default"))) +# 314 "/usr/include/unicode/platform.h" 3 4 +#define U_EXPORT2 + + + + + +#define U_IMPORT +# 331 "/usr/include/unicode/platform.h" 3 4 +#define U_INLINE inline + + + + + + +#define U_ALIGN_CODE(n) +# 352 "/usr/include/unicode/platform.h" 3 4 +#define U_HAVE_GCC_ATOMICS 1 +# 366 "/usr/include/unicode/platform.h" 3 4 +#define U_MAKE "/usr/bin/gmake" +# 381 "/usr/include/unicode/platform.h" 3 4 +#define U_LIB_SUFFIX_C_NAME + + + + +#define U_LIB_SUFFIX_C_NAME_STRING "" + + + + +#define U_HAVE_LIB_SUFFIX 0 +# 26 "/usr/include/unicode/ptypes.h" 2 3 4 +# 51 "/usr/include/unicode/ptypes.h" 3 4 +# 1 "/usr/include/inttypes.h" 1 3 4 +# 24 "/usr/include/inttypes.h" 3 4 +#define _INTTYPES_H 1 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stdint.h" 1 3 4 + + +# 1 "/usr/include/stdint.h" 1 3 4 +# 24 "/usr/include/stdint.h" 3 4 +#define _STDINT_H 1 + + + +# 1 "/usr/include/bits/wordsize.h" 1 3 4 + + + +#define __WORDSIZE 64 +#define __WORDSIZE_COMPAT32 1 +# 29 "/usr/include/stdint.h" 2 3 4 +# 49 "/usr/include/stdint.h" 3 4 +typedef unsigned char uint8_t; +typedef unsigned short int uint16_t; + +typedef unsigned int uint32_t; +#define __uint32_t_defined + + +typedef unsigned long int uint64_t; +# 66 "/usr/include/stdint.h" 3 4 +typedef signed char int_least8_t; +typedef short int int_least16_t; +typedef int int_least32_t; + +typedef long int int_least64_t; + + + + + + +typedef unsigned char uint_least8_t; +typedef unsigned short int uint_least16_t; +typedef unsigned int uint_least32_t; + +typedef unsigned long int uint_least64_t; +# 91 "/usr/include/stdint.h" 3 4 +typedef signed char int_fast8_t; + +typedef long int int_fast16_t; +typedef long int int_fast32_t; +typedef long int int_fast64_t; +# 104 "/usr/include/stdint.h" 3 4 +typedef unsigned char uint_fast8_t; + +typedef unsigned long int uint_fast16_t; +typedef unsigned long int uint_fast32_t; +typedef unsigned long int uint_fast64_t; +# 123 "/usr/include/stdint.h" 3 4 +typedef unsigned long int uintptr_t; +# 135 "/usr/include/stdint.h" 3 4 +typedef long int intmax_t; +typedef unsigned long int uintmax_t; +# 4 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stdint.h" 2 3 4 + + + +#define _GCC_WRAP_STDINT_H +# 29 "/usr/include/inttypes.h" 2 3 4 + + + + +#define __gwchar_t wchar_t + + + + + + + +#define ____gwchar_t_defined 1 +# 274 "/usr/include/inttypes.h" 3 4 +extern "C" { + + + + +typedef struct + { + long int quot; + long int rem; + } imaxdiv_t; +# 298 "/usr/include/inttypes.h" 3 4 +extern intmax_t imaxabs (intmax_t __n) throw () __attribute__ ((__const__)); + + +extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom) + throw () __attribute__ ((__const__)); + + +extern intmax_t strtoimax (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) throw (); + + +extern uintmax_t strtoumax (__const char *__restrict __nptr, + char ** __restrict __endptr, int __base) throw (); + + +extern intmax_t wcstoimax (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + throw (); + + +extern uintmax_t wcstoumax (__const wchar_t *__restrict __nptr, + wchar_t ** __restrict __endptr, int __base) + throw (); + + + + + +extern long int __strtol_internal (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, int __group) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__gnu_inline__)) intmax_t +strtoimax (__const char *__restrict nptr, char **__restrict endptr, int base) throw () + +{ + return __strtol_internal (nptr, endptr, base, 0); +} + +extern unsigned long int __strtoul_internal (__const char * + __restrict __nptr, + char ** __restrict __endptr, + int __base, int __group) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__gnu_inline__)) uintmax_t +strtoumax (__const char *__restrict nptr, char **__restrict endptr, int base) throw () + +{ + return __strtoul_internal (nptr, endptr, base, 0); +} + +extern long int __wcstol_internal (__const wchar_t * __restrict __nptr, + wchar_t **__restrict __endptr, + int __base, int __group) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__gnu_inline__)) intmax_t +wcstoimax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr, int base) throw () + +{ + return __wcstol_internal (nptr, endptr, base, 0); +} + +extern unsigned long int __wcstoul_internal (__const wchar_t * + __restrict __nptr, + wchar_t ** + __restrict __endptr, + int __base, int __group) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__gnu_inline__)) uintmax_t +wcstoumax (__const wchar_t *__restrict nptr, wchar_t **__restrict endptr, int base) throw () + +{ + return __wcstoul_internal (nptr, endptr, base, 0); +} +# 442 "/usr/include/inttypes.h" 3 4 +} +# 52 "/usr/include/unicode/ptypes.h" 2 3 4 +# 59 "/usr/include/unicode/umachine.h" 2 3 4 + + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 66 "/usr/include/unicode/umachine.h" 2 3 4 +# 74 "/usr/include/unicode/umachine.h" 3 4 +#define XP_CPLUSPLUS +# 105 "/usr/include/unicode/umachine.h" 3 4 +#define U_CFUNC extern "C" +#define U_CDECL_BEGIN extern "C" { +#define U_CDECL_END } +# 121 "/usr/include/unicode/umachine.h" 3 4 +#define U_ATTRIBUTE_DEPRECATED __attribute__ ((deprecated)) +# 135 "/usr/include/unicode/umachine.h" 3 4 +#define U_CAPI U_CFUNC U_EXPORT + +#define U_STABLE U_CAPI + +#define U_DRAFT U_CAPI + +#define U_DEPRECATED U_CAPI U_ATTRIBUTE_DEPRECATED + +#define U_OBSOLETE U_CAPI + +#define U_INTERNAL U_CAPI + + + + + + + +#define INT8_MIN ((int8_t)(-128)) + + + +#define INT16_MIN ((int16_t)(-32767-1)) + + + +#define INT32_MIN ((int32_t)(-2147483647-1)) + + + + +#define INT8_MAX ((int8_t)(127)) + + + +#define INT16_MAX ((int16_t)(32767)) + + + +#define INT32_MAX ((int32_t)(2147483647)) + + + + +#define UINT8_MAX ((uint8_t)(255U)) + + + +#define UINT16_MAX ((uint16_t)(65535U)) + + + +#define UINT32_MAX ((uint32_t)(4294967295U)) +# 199 "/usr/include/unicode/umachine.h" 3 4 +#define INT64_C(c) c ## LL + + + + + + + +#define UINT64_C(c) c ## ULL + + + +#define U_INT64_MIN ((int64_t)(INT64_C(-9223372036854775807)-1)) + + + +#define U_INT64_MAX ((int64_t)(INT64_C(9223372036854775807))) + + + +#define U_UINT64_MAX ((uint64_t)(UINT64_C(18446744073709551615))) +# 228 "/usr/include/unicode/umachine.h" 3 4 +typedef int8_t UBool; + + + +#define TRUE 1 + + + +#define FALSE 0 +# 284 "/usr/include/unicode/umachine.h" 3 4 +#define U_WCHAR_IS_UTF32 +# 302 "/usr/include/unicode/umachine.h" 3 4 +#define U_SIZEOF_UCHAR 2 +# 325 "/usr/include/unicode/umachine.h" 3 4 + typedef uint16_t UChar; +# 345 "/usr/include/unicode/umachine.h" 3 4 +typedef int32_t UChar32; +# 382 "/usr/include/unicode/umachine.h" 3 4 +# 1 "/usr/include/unicode/urename.h" 1 3 4 +# 22 "/usr/include/unicode/urename.h" 3 4 +#define URENAME_H +# 35 "/usr/include/unicode/urename.h" 3 4 +# 1 "/usr/include/unicode/umachine.h" 1 3 4 +# 36 "/usr/include/unicode/urename.h" 2 3 4 + + + + +# 1 "/usr/include/unicode/uvernum.h" 1 3 4 +# 38 "/usr/include/unicode/uvernum.h" 3 4 +#define UVERNUM_H + + + + + +#define U_COPYRIGHT_STRING " Copyright (C) 2011, International Business Machines Corporation and others. All Rights Reserved. " + + + + + + +#define U_ICU_VERSION_MAJOR_NUM 4 + + + + + +#define U_ICU_VERSION_MINOR_NUM 8 + + + + + +#define U_ICU_VERSION_PATCHLEVEL_NUM 1 + + + + + + +#define U_ICU_VERSION_BUILDLEVEL_NUM 1 + + + + + + +#define U_ICU_VERSION_SUFFIX _48 +# 86 "/usr/include/unicode/uvernum.h" 3 4 +#define U_ICU_ENTRY_POINT_RENAME(x) x ## _48 + + + + + + + +#define U_ICU_VERSION "4.8.1.1" + + + + + +#define U_ICU_VERSION_SHORT "48" + + + + +#define U_ICU_DATA_VERSION "4.8.1" +# 120 "/usr/include/unicode/uvernum.h" 3 4 +#define UCOL_RUNTIME_VERSION 7 +# 129 "/usr/include/unicode/uvernum.h" 3 4 +#define UCOL_BUILDER_VERSION 8 + + + + + + +#define UCOL_TAILORINGS_VERSION 1 +# 41 "/usr/include/unicode/urename.h" 2 3 4 +# 51 "/usr/include/unicode/urename.h" 3 4 +#define DECPOWERS U_ICU_ENTRY_POINT_RENAME(DECPOWERS) +#define DECSTICKYTAB U_ICU_ENTRY_POINT_RENAME(DECSTICKYTAB) +#define LEN_CANONICAL_SYSTEM_LOCATION_ZONES U_ICU_ENTRY_POINT_RENAME(LEN_CANONICAL_SYSTEM_LOCATION_ZONES) +#define LEN_CANONICAL_SYSTEM_ZONES U_ICU_ENTRY_POINT_RENAME(LEN_CANONICAL_SYSTEM_ZONES) +#define LEN_SYSTEM_ZONES U_ICU_ENTRY_POINT_RENAME(LEN_SYSTEM_ZONES) +#define LNnn U_ICU_ENTRY_POINT_RENAME(LNnn) +#define T_CString_int64ToString U_ICU_ENTRY_POINT_RENAME(T_CString_int64ToString) +#define T_CString_integerToString U_ICU_ENTRY_POINT_RENAME(T_CString_integerToString) +#define T_CString_stricmp U_ICU_ENTRY_POINT_RENAME(T_CString_stricmp) +#define T_CString_stringToInteger U_ICU_ENTRY_POINT_RENAME(T_CString_stringToInteger) +#define T_CString_strnicmp U_ICU_ENTRY_POINT_RENAME(T_CString_strnicmp) +#define T_CString_toLowerCase U_ICU_ENTRY_POINT_RENAME(T_CString_toLowerCase) +#define T_CString_toUpperCase U_ICU_ENTRY_POINT_RENAME(T_CString_toUpperCase) +#define UCNV_FROM_U_CALLBACK_ESCAPE U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALLBACK_ESCAPE) +#define UCNV_FROM_U_CALLBACK_SKIP U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALLBACK_SKIP) +#define UCNV_FROM_U_CALLBACK_STOP U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALLBACK_STOP) +#define UCNV_FROM_U_CALLBACK_SUBSTITUTE U_ICU_ENTRY_POINT_RENAME(UCNV_FROM_U_CALLBACK_SUBSTITUTE) +#define UCNV_TO_U_CALLBACK_ESCAPE U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBACK_ESCAPE) +#define UCNV_TO_U_CALLBACK_SKIP U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBACK_SKIP) +#define UCNV_TO_U_CALLBACK_STOP U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBACK_STOP) +#define UCNV_TO_U_CALLBACK_SUBSTITUTE U_ICU_ENTRY_POINT_RENAME(UCNV_TO_U_CALLBACK_SUBSTITUTE) +#define UDataMemory_createNewInstance U_ICU_ENTRY_POINT_RENAME(UDataMemory_createNewInstance) +#define UDataMemory_init U_ICU_ENTRY_POINT_RENAME(UDataMemory_init) +#define UDataMemory_isLoaded U_ICU_ENTRY_POINT_RENAME(UDataMemory_isLoaded) +#define UDataMemory_normalizeDataPointer U_ICU_ENTRY_POINT_RENAME(UDataMemory_normalizeDataPointer) +#define UDataMemory_setData U_ICU_ENTRY_POINT_RENAME(UDataMemory_setData) +#define UDatamemory_assign U_ICU_ENTRY_POINT_RENAME(UDatamemory_assign) +#define _ASCIIData U_ICU_ENTRY_POINT_RENAME(_ASCIIData) +#define _Bocu1Data U_ICU_ENTRY_POINT_RENAME(_Bocu1Data) +#define _CESU8Data U_ICU_ENTRY_POINT_RENAME(_CESU8Data) +#define _CompoundTextData U_ICU_ENTRY_POINT_RENAME(_CompoundTextData) +#define _HZData U_ICU_ENTRY_POINT_RENAME(_HZData) +#define _IMAPData U_ICU_ENTRY_POINT_RENAME(_IMAPData) +#define _ISCIIData U_ICU_ENTRY_POINT_RENAME(_ISCIIData) +#define _ISO2022Data U_ICU_ENTRY_POINT_RENAME(_ISO2022Data) +#define _LMBCSData1 U_ICU_ENTRY_POINT_RENAME(_LMBCSData1) +#define _LMBCSData11 U_ICU_ENTRY_POINT_RENAME(_LMBCSData11) +#define _LMBCSData16 U_ICU_ENTRY_POINT_RENAME(_LMBCSData16) +#define _LMBCSData17 U_ICU_ENTRY_POINT_RENAME(_LMBCSData17) +#define _LMBCSData18 U_ICU_ENTRY_POINT_RENAME(_LMBCSData18) +#define _LMBCSData19 U_ICU_ENTRY_POINT_RENAME(_LMBCSData19) +#define _LMBCSData2 U_ICU_ENTRY_POINT_RENAME(_LMBCSData2) +#define _LMBCSData3 U_ICU_ENTRY_POINT_RENAME(_LMBCSData3) +#define _LMBCSData4 U_ICU_ENTRY_POINT_RENAME(_LMBCSData4) +#define _LMBCSData5 U_ICU_ENTRY_POINT_RENAME(_LMBCSData5) +#define _LMBCSData6 U_ICU_ENTRY_POINT_RENAME(_LMBCSData6) +#define _LMBCSData8 U_ICU_ENTRY_POINT_RENAME(_LMBCSData8) +#define _Latin1Data U_ICU_ENTRY_POINT_RENAME(_Latin1Data) +#define _MBCSData U_ICU_ENTRY_POINT_RENAME(_MBCSData) +#define _SCSUData U_ICU_ENTRY_POINT_RENAME(_SCSUData) +#define _UTF16BEData U_ICU_ENTRY_POINT_RENAME(_UTF16BEData) +#define _UTF16Data U_ICU_ENTRY_POINT_RENAME(_UTF16Data) +#define _UTF16LEData U_ICU_ENTRY_POINT_RENAME(_UTF16LEData) +#define _UTF32BEData U_ICU_ENTRY_POINT_RENAME(_UTF32BEData) +#define _UTF32Data U_ICU_ENTRY_POINT_RENAME(_UTF32Data) +#define _UTF32LEData U_ICU_ENTRY_POINT_RENAME(_UTF32LEData) +#define _UTF7Data U_ICU_ENTRY_POINT_RENAME(_UTF7Data) +#define _UTF8Data U_ICU_ENTRY_POINT_RENAME(_UTF8Data) +#define bms_close U_ICU_ENTRY_POINT_RENAME(bms_close) +#define bms_empty U_ICU_ENTRY_POINT_RENAME(bms_empty) +#define bms_getData U_ICU_ENTRY_POINT_RENAME(bms_getData) +#define bms_open U_ICU_ENTRY_POINT_RENAME(bms_open) +#define bms_search U_ICU_ENTRY_POINT_RENAME(bms_search) +#define bms_setTargetString U_ICU_ENTRY_POINT_RENAME(bms_setTargetString) +#define buildWSConfusableData U_ICU_ENTRY_POINT_RENAME(buildWSConfusableData) +#define cmemory_cleanup U_ICU_ENTRY_POINT_RENAME(cmemory_cleanup) +#define cmemory_inUse U_ICU_ENTRY_POINT_RENAME(cmemory_inUse) +#define d2utable U_ICU_ENTRY_POINT_RENAME(d2utable) +#define deleteCEList U_ICU_ENTRY_POINT_RENAME(deleteCEList) +#define deleteChars U_ICU_ENTRY_POINT_RENAME(deleteChars) +#define deleteCollDataCacheEntry U_ICU_ENTRY_POINT_RENAME(deleteCollDataCacheEntry) +#define deleteStringList U_ICU_ENTRY_POINT_RENAME(deleteStringList) +#define deleteUnicodeStringKey U_ICU_ENTRY_POINT_RENAME(deleteUnicodeStringKey) +#define izrule_clone U_ICU_ENTRY_POINT_RENAME(izrule_clone) +#define izrule_close U_ICU_ENTRY_POINT_RENAME(izrule_close) +#define izrule_equals U_ICU_ENTRY_POINT_RENAME(izrule_equals) +#define izrule_getDSTSavings U_ICU_ENTRY_POINT_RENAME(izrule_getDSTSavings) +#define izrule_getDynamicClassID U_ICU_ENTRY_POINT_RENAME(izrule_getDynamicClassID) +#define izrule_getFinalStart U_ICU_ENTRY_POINT_RENAME(izrule_getFinalStart) +#define izrule_getFirstStart U_ICU_ENTRY_POINT_RENAME(izrule_getFirstStart) +#define izrule_getName U_ICU_ENTRY_POINT_RENAME(izrule_getName) +#define izrule_getNextStart U_ICU_ENTRY_POINT_RENAME(izrule_getNextStart) +#define izrule_getPreviousStart U_ICU_ENTRY_POINT_RENAME(izrule_getPreviousStart) +#define izrule_getRawOffset U_ICU_ENTRY_POINT_RENAME(izrule_getRawOffset) +#define izrule_getStaticClassID U_ICU_ENTRY_POINT_RENAME(izrule_getStaticClassID) +#define izrule_isEquivalentTo U_ICU_ENTRY_POINT_RENAME(izrule_isEquivalentTo) +#define izrule_open U_ICU_ENTRY_POINT_RENAME(izrule_open) +#define le_close U_ICU_ENTRY_POINT_RENAME(le_close) +#define le_create U_ICU_ENTRY_POINT_RENAME(le_create) +#define le_getCharIndices U_ICU_ENTRY_POINT_RENAME(le_getCharIndices) +#define le_getCharIndicesWithBase U_ICU_ENTRY_POINT_RENAME(le_getCharIndicesWithBase) +#define le_getGlyphCount U_ICU_ENTRY_POINT_RENAME(le_getGlyphCount) +#define le_getGlyphPosition U_ICU_ENTRY_POINT_RENAME(le_getGlyphPosition) +#define le_getGlyphPositions U_ICU_ENTRY_POINT_RENAME(le_getGlyphPositions) +#define le_getGlyphs U_ICU_ENTRY_POINT_RENAME(le_getGlyphs) +#define le_layoutChars U_ICU_ENTRY_POINT_RENAME(le_layoutChars) +#define le_reset U_ICU_ENTRY_POINT_RENAME(le_reset) +#define locale_getKeywords U_ICU_ENTRY_POINT_RENAME(locale_getKeywords) +#define locale_getKeywordsStart U_ICU_ENTRY_POINT_RENAME(locale_getKeywordsStart) +#define locale_get_default U_ICU_ENTRY_POINT_RENAME(locale_get_default) +#define locale_set_default U_ICU_ENTRY_POINT_RENAME(locale_set_default) +#define pl_addFontRun U_ICU_ENTRY_POINT_RENAME(pl_addFontRun) +#define pl_addLocaleRun U_ICU_ENTRY_POINT_RENAME(pl_addLocaleRun) +#define pl_addValueRun U_ICU_ENTRY_POINT_RENAME(pl_addValueRun) +#define pl_close U_ICU_ENTRY_POINT_RENAME(pl_close) +#define pl_closeFontRuns U_ICU_ENTRY_POINT_RENAME(pl_closeFontRuns) +#define pl_closeLine U_ICU_ENTRY_POINT_RENAME(pl_closeLine) +#define pl_closeLocaleRuns U_ICU_ENTRY_POINT_RENAME(pl_closeLocaleRuns) +#define pl_closeValueRuns U_ICU_ENTRY_POINT_RENAME(pl_closeValueRuns) +#define pl_countLineRuns U_ICU_ENTRY_POINT_RENAME(pl_countLineRuns) +#define pl_create U_ICU_ENTRY_POINT_RENAME(pl_create) +#define pl_getAscent U_ICU_ENTRY_POINT_RENAME(pl_getAscent) +#define pl_getDescent U_ICU_ENTRY_POINT_RENAME(pl_getDescent) +#define pl_getFontRunCount U_ICU_ENTRY_POINT_RENAME(pl_getFontRunCount) +#define pl_getFontRunFont U_ICU_ENTRY_POINT_RENAME(pl_getFontRunFont) +#define pl_getFontRunLastLimit U_ICU_ENTRY_POINT_RENAME(pl_getFontRunLastLimit) +#define pl_getFontRunLimit U_ICU_ENTRY_POINT_RENAME(pl_getFontRunLimit) +#define pl_getLeading U_ICU_ENTRY_POINT_RENAME(pl_getLeading) +#define pl_getLineAscent U_ICU_ENTRY_POINT_RENAME(pl_getLineAscent) +#define pl_getLineDescent U_ICU_ENTRY_POINT_RENAME(pl_getLineDescent) +#define pl_getLineLeading U_ICU_ENTRY_POINT_RENAME(pl_getLineLeading) +#define pl_getLineVisualRun U_ICU_ENTRY_POINT_RENAME(pl_getLineVisualRun) +#define pl_getLineWidth U_ICU_ENTRY_POINT_RENAME(pl_getLineWidth) +#define pl_getLocaleRunCount U_ICU_ENTRY_POINT_RENAME(pl_getLocaleRunCount) +#define pl_getLocaleRunLastLimit U_ICU_ENTRY_POINT_RENAME(pl_getLocaleRunLastLimit) +#define pl_getLocaleRunLimit U_ICU_ENTRY_POINT_RENAME(pl_getLocaleRunLimit) +#define pl_getLocaleRunLocale U_ICU_ENTRY_POINT_RENAME(pl_getLocaleRunLocale) +#define pl_getParagraphLevel U_ICU_ENTRY_POINT_RENAME(pl_getParagraphLevel) +#define pl_getTextDirection U_ICU_ENTRY_POINT_RENAME(pl_getTextDirection) +#define pl_getValueRunCount U_ICU_ENTRY_POINT_RENAME(pl_getValueRunCount) +#define pl_getValueRunLastLimit U_ICU_ENTRY_POINT_RENAME(pl_getValueRunLastLimit) +#define pl_getValueRunLimit U_ICU_ENTRY_POINT_RENAME(pl_getValueRunLimit) +#define pl_getValueRunValue U_ICU_ENTRY_POINT_RENAME(pl_getValueRunValue) +#define pl_getVisualRunAscent U_ICU_ENTRY_POINT_RENAME(pl_getVisualRunAscent) +#define pl_getVisualRunDescent U_ICU_ENTRY_POINT_RENAME(pl_getVisualRunDescent) +#define pl_getVisualRunDirection U_ICU_ENTRY_POINT_RENAME(pl_getVisualRunDirection) +#define pl_getVisualRunFont U_ICU_ENTRY_POINT_RENAME(pl_getVisualRunFont) +#define pl_getVisualRunGlyphCount U_ICU_ENTRY_POINT_RENAME(pl_getVisualRunGlyphCount) +#define pl_getVisualRunGlyphToCharMap U_ICU_ENTRY_POINT_RENAME(pl_getVisualRunGlyphToCharMap) +#define pl_getVisualRunGlyphs U_ICU_ENTRY_POINT_RENAME(pl_getVisualRunGlyphs) +#define pl_getVisualRunLeading U_ICU_ENTRY_POINT_RENAME(pl_getVisualRunLeading) +#define pl_getVisualRunPositions U_ICU_ENTRY_POINT_RENAME(pl_getVisualRunPositions) +#define pl_isComplex U_ICU_ENTRY_POINT_RENAME(pl_isComplex) +#define pl_nextLine U_ICU_ENTRY_POINT_RENAME(pl_nextLine) +#define pl_openEmptyFontRuns U_ICU_ENTRY_POINT_RENAME(pl_openEmptyFontRuns) +#define pl_openEmptyLocaleRuns U_ICU_ENTRY_POINT_RENAME(pl_openEmptyLocaleRuns) +#define pl_openEmptyValueRuns U_ICU_ENTRY_POINT_RENAME(pl_openEmptyValueRuns) +#define pl_openFontRuns U_ICU_ENTRY_POINT_RENAME(pl_openFontRuns) +#define pl_openLocaleRuns U_ICU_ENTRY_POINT_RENAME(pl_openLocaleRuns) +#define pl_openValueRuns U_ICU_ENTRY_POINT_RENAME(pl_openValueRuns) +#define pl_reflow U_ICU_ENTRY_POINT_RENAME(pl_reflow) +#define pl_resetFontRuns U_ICU_ENTRY_POINT_RENAME(pl_resetFontRuns) +#define pl_resetLocaleRuns U_ICU_ENTRY_POINT_RENAME(pl_resetLocaleRuns) +#define pl_resetValueRuns U_ICU_ENTRY_POINT_RENAME(pl_resetValueRuns) +#define res_countArrayItems U_ICU_ENTRY_POINT_RENAME(res_countArrayItems) +#define res_findResource U_ICU_ENTRY_POINT_RENAME(res_findResource) +#define res_getAlias U_ICU_ENTRY_POINT_RENAME(res_getAlias) +#define res_getArrayItem U_ICU_ENTRY_POINT_RENAME(res_getArrayItem) +#define res_getBinary U_ICU_ENTRY_POINT_RENAME(res_getBinary) +#define res_getIntVector U_ICU_ENTRY_POINT_RENAME(res_getIntVector) +#define res_getPublicType U_ICU_ENTRY_POINT_RENAME(res_getPublicType) +#define res_getResource U_ICU_ENTRY_POINT_RENAME(res_getResource) +#define res_getString U_ICU_ENTRY_POINT_RENAME(res_getString) +#define res_getTableItemByIndex U_ICU_ENTRY_POINT_RENAME(res_getTableItemByIndex) +#define res_getTableItemByKey U_ICU_ENTRY_POINT_RENAME(res_getTableItemByKey) +#define res_load U_ICU_ENTRY_POINT_RENAME(res_load) +#define res_read U_ICU_ENTRY_POINT_RENAME(res_read) +#define res_unload U_ICU_ENTRY_POINT_RENAME(res_unload) +#define triedict_swap U_ICU_ENTRY_POINT_RENAME(triedict_swap) +#define u_UCharsToChars U_ICU_ENTRY_POINT_RENAME(u_UCharsToChars) +#define u_austrcpy U_ICU_ENTRY_POINT_RENAME(u_austrcpy) +#define u_austrncpy U_ICU_ENTRY_POINT_RENAME(u_austrncpy) +#define u_catclose U_ICU_ENTRY_POINT_RENAME(u_catclose) +#define u_catgets U_ICU_ENTRY_POINT_RENAME(u_catgets) +#define u_catopen U_ICU_ENTRY_POINT_RENAME(u_catopen) +#define u_charAge U_ICU_ENTRY_POINT_RENAME(u_charAge) +#define u_charDigitValue U_ICU_ENTRY_POINT_RENAME(u_charDigitValue) +#define u_charDirection U_ICU_ENTRY_POINT_RENAME(u_charDirection) +#define u_charFromName U_ICU_ENTRY_POINT_RENAME(u_charFromName) +#define u_charMirror U_ICU_ENTRY_POINT_RENAME(u_charMirror) +#define u_charName U_ICU_ENTRY_POINT_RENAME(u_charName) +#define u_charType U_ICU_ENTRY_POINT_RENAME(u_charType) +#define u_charsToUChars U_ICU_ENTRY_POINT_RENAME(u_charsToUChars) +#define u_cleanup U_ICU_ENTRY_POINT_RENAME(u_cleanup) +#define u_countChar32 U_ICU_ENTRY_POINT_RENAME(u_countChar32) +#define u_digit U_ICU_ENTRY_POINT_RENAME(u_digit) +#define u_enumCharNames U_ICU_ENTRY_POINT_RENAME(u_enumCharNames) +#define u_enumCharTypes U_ICU_ENTRY_POINT_RENAME(u_enumCharTypes) +#define u_errorName U_ICU_ENTRY_POINT_RENAME(u_errorName) +#define u_fadopt U_ICU_ENTRY_POINT_RENAME(u_fadopt) +#define u_fclose U_ICU_ENTRY_POINT_RENAME(u_fclose) +#define u_feof U_ICU_ENTRY_POINT_RENAME(u_feof) +#define u_fflush U_ICU_ENTRY_POINT_RENAME(u_fflush) +#define u_fgetConverter U_ICU_ENTRY_POINT_RENAME(u_fgetConverter) +#define u_fgetc U_ICU_ENTRY_POINT_RENAME(u_fgetc) +#define u_fgetcodepage U_ICU_ENTRY_POINT_RENAME(u_fgetcodepage) +#define u_fgetcx U_ICU_ENTRY_POINT_RENAME(u_fgetcx) +#define u_fgetfile U_ICU_ENTRY_POINT_RENAME(u_fgetfile) +#define u_fgetlocale U_ICU_ENTRY_POINT_RENAME(u_fgetlocale) +#define u_fgets U_ICU_ENTRY_POINT_RENAME(u_fgets) +#define u_file_read U_ICU_ENTRY_POINT_RENAME(u_file_read) +#define u_file_write U_ICU_ENTRY_POINT_RENAME(u_file_write) +#define u_file_write_flush U_ICU_ENTRY_POINT_RENAME(u_file_write_flush) +#define u_finit U_ICU_ENTRY_POINT_RENAME(u_finit) +#define u_flushDefaultConverter U_ICU_ENTRY_POINT_RENAME(u_flushDefaultConverter) +#define u_foldCase U_ICU_ENTRY_POINT_RENAME(u_foldCase) +#define u_fopen U_ICU_ENTRY_POINT_RENAME(u_fopen) +#define u_forDigit U_ICU_ENTRY_POINT_RENAME(u_forDigit) +#define u_formatMessage U_ICU_ENTRY_POINT_RENAME(u_formatMessage) +#define u_formatMessageWithError U_ICU_ENTRY_POINT_RENAME(u_formatMessageWithError) +#define u_fprintf U_ICU_ENTRY_POINT_RENAME(u_fprintf) +#define u_fprintf_u U_ICU_ENTRY_POINT_RENAME(u_fprintf_u) +#define u_fputc U_ICU_ENTRY_POINT_RENAME(u_fputc) +#define u_fputs U_ICU_ENTRY_POINT_RENAME(u_fputs) +#define u_frewind U_ICU_ENTRY_POINT_RENAME(u_frewind) +#define u_fscanf U_ICU_ENTRY_POINT_RENAME(u_fscanf) +#define u_fscanf_u U_ICU_ENTRY_POINT_RENAME(u_fscanf_u) +#define u_fsetcodepage U_ICU_ENTRY_POINT_RENAME(u_fsetcodepage) +#define u_fsetlocale U_ICU_ENTRY_POINT_RENAME(u_fsetlocale) +#define u_fsettransliterator U_ICU_ENTRY_POINT_RENAME(u_fsettransliterator) +#define u_fstropen U_ICU_ENTRY_POINT_RENAME(u_fstropen) +#define u_fungetc U_ICU_ENTRY_POINT_RENAME(u_fungetc) +#define u_getCombiningClass U_ICU_ENTRY_POINT_RENAME(u_getCombiningClass) +#define u_getDataDirectory U_ICU_ENTRY_POINT_RENAME(u_getDataDirectory) +#define u_getDataVersion U_ICU_ENTRY_POINT_RENAME(u_getDataVersion) +#define u_getDefaultConverter U_ICU_ENTRY_POINT_RENAME(u_getDefaultConverter) +#define u_getFC_NFKC_Closure U_ICU_ENTRY_POINT_RENAME(u_getFC_NFKC_Closure) +#define u_getISOComment U_ICU_ENTRY_POINT_RENAME(u_getISOComment) +#define u_getIntPropertyMaxValue U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyMaxValue) +#define u_getIntPropertyMinValue U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyMinValue) +#define u_getIntPropertyValue U_ICU_ENTRY_POINT_RENAME(u_getIntPropertyValue) +#define u_getNumericValue U_ICU_ENTRY_POINT_RENAME(u_getNumericValue) +#define u_getPropertyEnum U_ICU_ENTRY_POINT_RENAME(u_getPropertyEnum) +#define u_getPropertyName U_ICU_ENTRY_POINT_RENAME(u_getPropertyName) +#define u_getPropertyValueEnum U_ICU_ENTRY_POINT_RENAME(u_getPropertyValueEnum) +#define u_getPropertyValueName U_ICU_ENTRY_POINT_RENAME(u_getPropertyValueName) +#define u_getUnicodeProperties U_ICU_ENTRY_POINT_RENAME(u_getUnicodeProperties) +#define u_getUnicodeVersion U_ICU_ENTRY_POINT_RENAME(u_getUnicodeVersion) +#define u_getVersion U_ICU_ENTRY_POINT_RENAME(u_getVersion) +#define u_hasBinaryProperty U_ICU_ENTRY_POINT_RENAME(u_hasBinaryProperty) +#define u_init U_ICU_ENTRY_POINT_RENAME(u_init) +#define u_isDataOlder U_ICU_ENTRY_POINT_RENAME(u_isDataOlder) +#define u_isIDIgnorable U_ICU_ENTRY_POINT_RENAME(u_isIDIgnorable) +#define u_isIDPart U_ICU_ENTRY_POINT_RENAME(u_isIDPart) +#define u_isIDStart U_ICU_ENTRY_POINT_RENAME(u_isIDStart) +#define u_isISOControl U_ICU_ENTRY_POINT_RENAME(u_isISOControl) +#define u_isJavaIDPart U_ICU_ENTRY_POINT_RENAME(u_isJavaIDPart) +#define u_isJavaIDStart U_ICU_ENTRY_POINT_RENAME(u_isJavaIDStart) +#define u_isJavaSpaceChar U_ICU_ENTRY_POINT_RENAME(u_isJavaSpaceChar) +#define u_isMirrored U_ICU_ENTRY_POINT_RENAME(u_isMirrored) +#define u_isUAlphabetic U_ICU_ENTRY_POINT_RENAME(u_isUAlphabetic) +#define u_isULowercase U_ICU_ENTRY_POINT_RENAME(u_isULowercase) +#define u_isUUppercase U_ICU_ENTRY_POINT_RENAME(u_isUUppercase) +#define u_isUWhiteSpace U_ICU_ENTRY_POINT_RENAME(u_isUWhiteSpace) +#define u_isWhitespace U_ICU_ENTRY_POINT_RENAME(u_isWhitespace) +#define u_isalnum U_ICU_ENTRY_POINT_RENAME(u_isalnum) +#define u_isalnumPOSIX U_ICU_ENTRY_POINT_RENAME(u_isalnumPOSIX) +#define u_isalpha U_ICU_ENTRY_POINT_RENAME(u_isalpha) +#define u_isbase U_ICU_ENTRY_POINT_RENAME(u_isbase) +#define u_isblank U_ICU_ENTRY_POINT_RENAME(u_isblank) +#define u_iscntrl U_ICU_ENTRY_POINT_RENAME(u_iscntrl) +#define u_isdefined U_ICU_ENTRY_POINT_RENAME(u_isdefined) +#define u_isdigit U_ICU_ENTRY_POINT_RENAME(u_isdigit) +#define u_isgraph U_ICU_ENTRY_POINT_RENAME(u_isgraph) +#define u_isgraphPOSIX U_ICU_ENTRY_POINT_RENAME(u_isgraphPOSIX) +#define u_islower U_ICU_ENTRY_POINT_RENAME(u_islower) +#define u_isprint U_ICU_ENTRY_POINT_RENAME(u_isprint) +#define u_isprintPOSIX U_ICU_ENTRY_POINT_RENAME(u_isprintPOSIX) +#define u_ispunct U_ICU_ENTRY_POINT_RENAME(u_ispunct) +#define u_isspace U_ICU_ENTRY_POINT_RENAME(u_isspace) +#define u_istitle U_ICU_ENTRY_POINT_RENAME(u_istitle) +#define u_isupper U_ICU_ENTRY_POINT_RENAME(u_isupper) +#define u_isxdigit U_ICU_ENTRY_POINT_RENAME(u_isxdigit) +#define u_locbund_close U_ICU_ENTRY_POINT_RENAME(u_locbund_close) +#define u_locbund_getNumberFormat U_ICU_ENTRY_POINT_RENAME(u_locbund_getNumberFormat) +#define u_locbund_init U_ICU_ENTRY_POINT_RENAME(u_locbund_init) +#define u_memcasecmp U_ICU_ENTRY_POINT_RENAME(u_memcasecmp) +#define u_memchr U_ICU_ENTRY_POINT_RENAME(u_memchr) +#define u_memchr32 U_ICU_ENTRY_POINT_RENAME(u_memchr32) +#define u_memcmp U_ICU_ENTRY_POINT_RENAME(u_memcmp) +#define u_memcmpCodePointOrder U_ICU_ENTRY_POINT_RENAME(u_memcmpCodePointOrder) +#define u_memcpy U_ICU_ENTRY_POINT_RENAME(u_memcpy) +#define u_memmove U_ICU_ENTRY_POINT_RENAME(u_memmove) +#define u_memrchr U_ICU_ENTRY_POINT_RENAME(u_memrchr) +#define u_memrchr32 U_ICU_ENTRY_POINT_RENAME(u_memrchr32) +#define u_memset U_ICU_ENTRY_POINT_RENAME(u_memset) +#define u_parseMessage U_ICU_ENTRY_POINT_RENAME(u_parseMessage) +#define u_parseMessageWithError U_ICU_ENTRY_POINT_RENAME(u_parseMessageWithError) +#define u_printf_parse U_ICU_ENTRY_POINT_RENAME(u_printf_parse) +#define u_releaseDefaultConverter U_ICU_ENTRY_POINT_RENAME(u_releaseDefaultConverter) +#define u_scanf_parse U_ICU_ENTRY_POINT_RENAME(u_scanf_parse) +#define u_setAtomicIncDecFunctions U_ICU_ENTRY_POINT_RENAME(u_setAtomicIncDecFunctions) +#define u_setDataDirectory U_ICU_ENTRY_POINT_RENAME(u_setDataDirectory) +#define u_setMemoryFunctions U_ICU_ENTRY_POINT_RENAME(u_setMemoryFunctions) +#define u_setMutexFunctions U_ICU_ENTRY_POINT_RENAME(u_setMutexFunctions) +#define u_shapeArabic U_ICU_ENTRY_POINT_RENAME(u_shapeArabic) +#define u_snprintf U_ICU_ENTRY_POINT_RENAME(u_snprintf) +#define u_snprintf_u U_ICU_ENTRY_POINT_RENAME(u_snprintf_u) +#define u_sprintf U_ICU_ENTRY_POINT_RENAME(u_sprintf) +#define u_sprintf_u U_ICU_ENTRY_POINT_RENAME(u_sprintf_u) +#define u_sscanf U_ICU_ENTRY_POINT_RENAME(u_sscanf) +#define u_sscanf_u U_ICU_ENTRY_POINT_RENAME(u_sscanf_u) +#define u_strCaseCompare U_ICU_ENTRY_POINT_RENAME(u_strCaseCompare) +#define u_strCompare U_ICU_ENTRY_POINT_RENAME(u_strCompare) +#define u_strCompareIter U_ICU_ENTRY_POINT_RENAME(u_strCompareIter) +#define u_strFindFirst U_ICU_ENTRY_POINT_RENAME(u_strFindFirst) +#define u_strFindLast U_ICU_ENTRY_POINT_RENAME(u_strFindLast) +#define u_strFoldCase U_ICU_ENTRY_POINT_RENAME(u_strFoldCase) +#define u_strFromJavaModifiedUTF8WithSub U_ICU_ENTRY_POINT_RENAME(u_strFromJavaModifiedUTF8WithSub) +#define u_strFromPunycode U_ICU_ENTRY_POINT_RENAME(u_strFromPunycode) +#define u_strFromUTF32 U_ICU_ENTRY_POINT_RENAME(u_strFromUTF32) +#define u_strFromUTF32WithSub U_ICU_ENTRY_POINT_RENAME(u_strFromUTF32WithSub) +#define u_strFromUTF8 U_ICU_ENTRY_POINT_RENAME(u_strFromUTF8) +#define u_strFromUTF8Lenient U_ICU_ENTRY_POINT_RENAME(u_strFromUTF8Lenient) +#define u_strFromUTF8WithSub U_ICU_ENTRY_POINT_RENAME(u_strFromUTF8WithSub) +#define u_strFromWCS U_ICU_ENTRY_POINT_RENAME(u_strFromWCS) +#define u_strHasMoreChar32Than U_ICU_ENTRY_POINT_RENAME(u_strHasMoreChar32Than) +#define u_strToJavaModifiedUTF8 U_ICU_ENTRY_POINT_RENAME(u_strToJavaModifiedUTF8) +#define u_strToLower U_ICU_ENTRY_POINT_RENAME(u_strToLower) +#define u_strToPunycode U_ICU_ENTRY_POINT_RENAME(u_strToPunycode) +#define u_strToTitle U_ICU_ENTRY_POINT_RENAME(u_strToTitle) +#define u_strToUTF32 U_ICU_ENTRY_POINT_RENAME(u_strToUTF32) +#define u_strToUTF32WithSub U_ICU_ENTRY_POINT_RENAME(u_strToUTF32WithSub) +#define u_strToUTF8 U_ICU_ENTRY_POINT_RENAME(u_strToUTF8) +#define u_strToUTF8WithSub U_ICU_ENTRY_POINT_RENAME(u_strToUTF8WithSub) +#define u_strToUpper U_ICU_ENTRY_POINT_RENAME(u_strToUpper) +#define u_strToWCS U_ICU_ENTRY_POINT_RENAME(u_strToWCS) +#define u_strcasecmp U_ICU_ENTRY_POINT_RENAME(u_strcasecmp) +#define u_strcat U_ICU_ENTRY_POINT_RENAME(u_strcat) +#define u_strchr U_ICU_ENTRY_POINT_RENAME(u_strchr) +#define u_strchr32 U_ICU_ENTRY_POINT_RENAME(u_strchr32) +#define u_strcmp U_ICU_ENTRY_POINT_RENAME(u_strcmp) +#define u_strcmpCodePointOrder U_ICU_ENTRY_POINT_RENAME(u_strcmpCodePointOrder) +#define u_strcmpFold U_ICU_ENTRY_POINT_RENAME(u_strcmpFold) +#define u_strcpy U_ICU_ENTRY_POINT_RENAME(u_strcpy) +#define u_strcspn U_ICU_ENTRY_POINT_RENAME(u_strcspn) +#define u_strlen U_ICU_ENTRY_POINT_RENAME(u_strlen) +#define u_strncasecmp U_ICU_ENTRY_POINT_RENAME(u_strncasecmp) +#define u_strncat U_ICU_ENTRY_POINT_RENAME(u_strncat) +#define u_strncmp U_ICU_ENTRY_POINT_RENAME(u_strncmp) +#define u_strncmpCodePointOrder U_ICU_ENTRY_POINT_RENAME(u_strncmpCodePointOrder) +#define u_strncpy U_ICU_ENTRY_POINT_RENAME(u_strncpy) +#define u_strpbrk U_ICU_ENTRY_POINT_RENAME(u_strpbrk) +#define u_strrchr U_ICU_ENTRY_POINT_RENAME(u_strrchr) +#define u_strrchr32 U_ICU_ENTRY_POINT_RENAME(u_strrchr32) +#define u_strrstr U_ICU_ENTRY_POINT_RENAME(u_strrstr) +#define u_strspn U_ICU_ENTRY_POINT_RENAME(u_strspn) +#define u_strstr U_ICU_ENTRY_POINT_RENAME(u_strstr) +#define u_strtok_r U_ICU_ENTRY_POINT_RENAME(u_strtok_r) +#define u_terminateChars U_ICU_ENTRY_POINT_RENAME(u_terminateChars) +#define u_terminateUChar32s U_ICU_ENTRY_POINT_RENAME(u_terminateUChar32s) +#define u_terminateUChars U_ICU_ENTRY_POINT_RENAME(u_terminateUChars) +#define u_terminateWChars U_ICU_ENTRY_POINT_RENAME(u_terminateWChars) +#define u_tolower U_ICU_ENTRY_POINT_RENAME(u_tolower) +#define u_totitle U_ICU_ENTRY_POINT_RENAME(u_totitle) +#define u_toupper U_ICU_ENTRY_POINT_RENAME(u_toupper) +#define u_uastrcpy U_ICU_ENTRY_POINT_RENAME(u_uastrcpy) +#define u_uastrncpy U_ICU_ENTRY_POINT_RENAME(u_uastrncpy) +#define u_unescape U_ICU_ENTRY_POINT_RENAME(u_unescape) +#define u_unescapeAt U_ICU_ENTRY_POINT_RENAME(u_unescapeAt) +#define u_versionFromString U_ICU_ENTRY_POINT_RENAME(u_versionFromString) +#define u_versionFromUString U_ICU_ENTRY_POINT_RENAME(u_versionFromUString) +#define u_versionToString U_ICU_ENTRY_POINT_RENAME(u_versionToString) +#define u_vformatMessage U_ICU_ENTRY_POINT_RENAME(u_vformatMessage) +#define u_vformatMessageWithError U_ICU_ENTRY_POINT_RENAME(u_vformatMessageWithError) +#define u_vfprintf U_ICU_ENTRY_POINT_RENAME(u_vfprintf) +#define u_vfprintf_u U_ICU_ENTRY_POINT_RENAME(u_vfprintf_u) +#define u_vfscanf U_ICU_ENTRY_POINT_RENAME(u_vfscanf) +#define u_vfscanf_u U_ICU_ENTRY_POINT_RENAME(u_vfscanf_u) +#define u_vparseMessage U_ICU_ENTRY_POINT_RENAME(u_vparseMessage) +#define u_vparseMessageWithError U_ICU_ENTRY_POINT_RENAME(u_vparseMessageWithError) +#define u_vsnprintf U_ICU_ENTRY_POINT_RENAME(u_vsnprintf) +#define u_vsnprintf_u U_ICU_ENTRY_POINT_RENAME(u_vsnprintf_u) +#define u_vsprintf U_ICU_ENTRY_POINT_RENAME(u_vsprintf) +#define u_vsprintf_u U_ICU_ENTRY_POINT_RENAME(u_vsprintf_u) +#define u_vsscanf U_ICU_ENTRY_POINT_RENAME(u_vsscanf) +#define u_vsscanf_u U_ICU_ENTRY_POINT_RENAME(u_vsscanf_u) +#define u_writeDiff U_ICU_ENTRY_POINT_RENAME(u_writeDiff) +#define u_writeIdenticalLevelRun U_ICU_ENTRY_POINT_RENAME(u_writeIdenticalLevelRun) +#define u_writeIdenticalLevelRunTwoChars U_ICU_ENTRY_POINT_RENAME(u_writeIdenticalLevelRunTwoChars) +#define ubidi_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(ubidi_addPropertyStarts) +#define ubidi_close U_ICU_ENTRY_POINT_RENAME(ubidi_close) +#define ubidi_countParagraphs U_ICU_ENTRY_POINT_RENAME(ubidi_countParagraphs) +#define ubidi_countRuns U_ICU_ENTRY_POINT_RENAME(ubidi_countRuns) +#define ubidi_getBaseDirection U_ICU_ENTRY_POINT_RENAME(ubidi_getBaseDirection) +#define ubidi_getClass U_ICU_ENTRY_POINT_RENAME(ubidi_getClass) +#define ubidi_getClassCallback U_ICU_ENTRY_POINT_RENAME(ubidi_getClassCallback) +#define ubidi_getCustomizedClass U_ICU_ENTRY_POINT_RENAME(ubidi_getCustomizedClass) +#define ubidi_getDirection U_ICU_ENTRY_POINT_RENAME(ubidi_getDirection) +#define ubidi_getJoiningGroup U_ICU_ENTRY_POINT_RENAME(ubidi_getJoiningGroup) +#define ubidi_getJoiningType U_ICU_ENTRY_POINT_RENAME(ubidi_getJoiningType) +#define ubidi_getLength U_ICU_ENTRY_POINT_RENAME(ubidi_getLength) +#define ubidi_getLevelAt U_ICU_ENTRY_POINT_RENAME(ubidi_getLevelAt) +#define ubidi_getLevels U_ICU_ENTRY_POINT_RENAME(ubidi_getLevels) +#define ubidi_getLogicalIndex U_ICU_ENTRY_POINT_RENAME(ubidi_getLogicalIndex) +#define ubidi_getLogicalMap U_ICU_ENTRY_POINT_RENAME(ubidi_getLogicalMap) +#define ubidi_getLogicalRun U_ICU_ENTRY_POINT_RENAME(ubidi_getLogicalRun) +#define ubidi_getMaxValue U_ICU_ENTRY_POINT_RENAME(ubidi_getMaxValue) +#define ubidi_getMemory U_ICU_ENTRY_POINT_RENAME(ubidi_getMemory) +#define ubidi_getMirror U_ICU_ENTRY_POINT_RENAME(ubidi_getMirror) +#define ubidi_getParaLevel U_ICU_ENTRY_POINT_RENAME(ubidi_getParaLevel) +#define ubidi_getParagraph U_ICU_ENTRY_POINT_RENAME(ubidi_getParagraph) +#define ubidi_getParagraphByIndex U_ICU_ENTRY_POINT_RENAME(ubidi_getParagraphByIndex) +#define ubidi_getProcessedLength U_ICU_ENTRY_POINT_RENAME(ubidi_getProcessedLength) +#define ubidi_getReorderingMode U_ICU_ENTRY_POINT_RENAME(ubidi_getReorderingMode) +#define ubidi_getReorderingOptions U_ICU_ENTRY_POINT_RENAME(ubidi_getReorderingOptions) +#define ubidi_getResultLength U_ICU_ENTRY_POINT_RENAME(ubidi_getResultLength) +#define ubidi_getRuns U_ICU_ENTRY_POINT_RENAME(ubidi_getRuns) +#define ubidi_getSingleton U_ICU_ENTRY_POINT_RENAME(ubidi_getSingleton) +#define ubidi_getText U_ICU_ENTRY_POINT_RENAME(ubidi_getText) +#define ubidi_getVisualIndex U_ICU_ENTRY_POINT_RENAME(ubidi_getVisualIndex) +#define ubidi_getVisualMap U_ICU_ENTRY_POINT_RENAME(ubidi_getVisualMap) +#define ubidi_getVisualRun U_ICU_ENTRY_POINT_RENAME(ubidi_getVisualRun) +#define ubidi_invertMap U_ICU_ENTRY_POINT_RENAME(ubidi_invertMap) +#define ubidi_isBidiControl U_ICU_ENTRY_POINT_RENAME(ubidi_isBidiControl) +#define ubidi_isInverse U_ICU_ENTRY_POINT_RENAME(ubidi_isInverse) +#define ubidi_isJoinControl U_ICU_ENTRY_POINT_RENAME(ubidi_isJoinControl) +#define ubidi_isMirrored U_ICU_ENTRY_POINT_RENAME(ubidi_isMirrored) +#define ubidi_isOrderParagraphsLTR U_ICU_ENTRY_POINT_RENAME(ubidi_isOrderParagraphsLTR) +#define ubidi_open U_ICU_ENTRY_POINT_RENAME(ubidi_open) +#define ubidi_openSized U_ICU_ENTRY_POINT_RENAME(ubidi_openSized) +#define ubidi_orderParagraphsLTR U_ICU_ENTRY_POINT_RENAME(ubidi_orderParagraphsLTR) +#define ubidi_reorderLogical U_ICU_ENTRY_POINT_RENAME(ubidi_reorderLogical) +#define ubidi_reorderVisual U_ICU_ENTRY_POINT_RENAME(ubidi_reorderVisual) +#define ubidi_setClassCallback U_ICU_ENTRY_POINT_RENAME(ubidi_setClassCallback) +#define ubidi_setContext U_ICU_ENTRY_POINT_RENAME(ubidi_setContext) +#define ubidi_setInverse U_ICU_ENTRY_POINT_RENAME(ubidi_setInverse) +#define ubidi_setLine U_ICU_ENTRY_POINT_RENAME(ubidi_setLine) +#define ubidi_setPara U_ICU_ENTRY_POINT_RENAME(ubidi_setPara) +#define ubidi_setReorderingMode U_ICU_ENTRY_POINT_RENAME(ubidi_setReorderingMode) +#define ubidi_setReorderingOptions U_ICU_ENTRY_POINT_RENAME(ubidi_setReorderingOptions) +#define ubidi_writeReordered U_ICU_ENTRY_POINT_RENAME(ubidi_writeReordered) +#define ubidi_writeReverse U_ICU_ENTRY_POINT_RENAME(ubidi_writeReverse) +#define ublock_getCode U_ICU_ENTRY_POINT_RENAME(ublock_getCode) +#define ubrk_close U_ICU_ENTRY_POINT_RENAME(ubrk_close) +#define ubrk_countAvailable U_ICU_ENTRY_POINT_RENAME(ubrk_countAvailable) +#define ubrk_current U_ICU_ENTRY_POINT_RENAME(ubrk_current) +#define ubrk_first U_ICU_ENTRY_POINT_RENAME(ubrk_first) +#define ubrk_following U_ICU_ENTRY_POINT_RENAME(ubrk_following) +#define ubrk_getAvailable U_ICU_ENTRY_POINT_RENAME(ubrk_getAvailable) +#define ubrk_getLocaleByType U_ICU_ENTRY_POINT_RENAME(ubrk_getLocaleByType) +#define ubrk_getRuleStatus U_ICU_ENTRY_POINT_RENAME(ubrk_getRuleStatus) +#define ubrk_getRuleStatusVec U_ICU_ENTRY_POINT_RENAME(ubrk_getRuleStatusVec) +#define ubrk_isBoundary U_ICU_ENTRY_POINT_RENAME(ubrk_isBoundary) +#define ubrk_last U_ICU_ENTRY_POINT_RENAME(ubrk_last) +#define ubrk_next U_ICU_ENTRY_POINT_RENAME(ubrk_next) +#define ubrk_open U_ICU_ENTRY_POINT_RENAME(ubrk_open) +#define ubrk_openRules U_ICU_ENTRY_POINT_RENAME(ubrk_openRules) +#define ubrk_preceding U_ICU_ENTRY_POINT_RENAME(ubrk_preceding) +#define ubrk_previous U_ICU_ENTRY_POINT_RENAME(ubrk_previous) +#define ubrk_safeClone U_ICU_ENTRY_POINT_RENAME(ubrk_safeClone) +#define ubrk_setText U_ICU_ENTRY_POINT_RENAME(ubrk_setText) +#define ubrk_setUText U_ICU_ENTRY_POINT_RENAME(ubrk_setUText) +#define ubrk_swap U_ICU_ENTRY_POINT_RENAME(ubrk_swap) +#define ucal_add U_ICU_ENTRY_POINT_RENAME(ucal_add) +#define ucal_clear U_ICU_ENTRY_POINT_RENAME(ucal_clear) +#define ucal_clearField U_ICU_ENTRY_POINT_RENAME(ucal_clearField) +#define ucal_clone U_ICU_ENTRY_POINT_RENAME(ucal_clone) +#define ucal_close U_ICU_ENTRY_POINT_RENAME(ucal_close) +#define ucal_countAvailable U_ICU_ENTRY_POINT_RENAME(ucal_countAvailable) +#define ucal_equivalentTo U_ICU_ENTRY_POINT_RENAME(ucal_equivalentTo) +#define ucal_get U_ICU_ENTRY_POINT_RENAME(ucal_get) +#define ucal_getAttribute U_ICU_ENTRY_POINT_RENAME(ucal_getAttribute) +#define ucal_getAvailable U_ICU_ENTRY_POINT_RENAME(ucal_getAvailable) +#define ucal_getCanonicalTimeZoneID U_ICU_ENTRY_POINT_RENAME(ucal_getCanonicalTimeZoneID) +#define ucal_getDSTSavings U_ICU_ENTRY_POINT_RENAME(ucal_getDSTSavings) +#define ucal_getDayOfWeekType U_ICU_ENTRY_POINT_RENAME(ucal_getDayOfWeekType) +#define ucal_getDefaultTimeZone U_ICU_ENTRY_POINT_RENAME(ucal_getDefaultTimeZone) +#define ucal_getFieldDifference U_ICU_ENTRY_POINT_RENAME(ucal_getFieldDifference) +#define ucal_getGregorianChange U_ICU_ENTRY_POINT_RENAME(ucal_getGregorianChange) +#define ucal_getKeywordValuesForLocale U_ICU_ENTRY_POINT_RENAME(ucal_getKeywordValuesForLocale) +#define ucal_getLimit U_ICU_ENTRY_POINT_RENAME(ucal_getLimit) +#define ucal_getLocaleByType U_ICU_ENTRY_POINT_RENAME(ucal_getLocaleByType) +#define ucal_getMillis U_ICU_ENTRY_POINT_RENAME(ucal_getMillis) +#define ucal_getNow U_ICU_ENTRY_POINT_RENAME(ucal_getNow) +#define ucal_getTZDataVersion U_ICU_ENTRY_POINT_RENAME(ucal_getTZDataVersion) +#define ucal_getTimeZoneDisplayName U_ICU_ENTRY_POINT_RENAME(ucal_getTimeZoneDisplayName) +#define ucal_getType U_ICU_ENTRY_POINT_RENAME(ucal_getType) +#define ucal_getWeekendTransition U_ICU_ENTRY_POINT_RENAME(ucal_getWeekendTransition) +#define ucal_inDaylightTime U_ICU_ENTRY_POINT_RENAME(ucal_inDaylightTime) +#define ucal_isSet U_ICU_ENTRY_POINT_RENAME(ucal_isSet) +#define ucal_isWeekend U_ICU_ENTRY_POINT_RENAME(ucal_isWeekend) +#define ucal_open U_ICU_ENTRY_POINT_RENAME(ucal_open) +#define ucal_openCountryTimeZones U_ICU_ENTRY_POINT_RENAME(ucal_openCountryTimeZones) +#define ucal_openTimeZoneIDEnumeration U_ICU_ENTRY_POINT_RENAME(ucal_openTimeZoneIDEnumeration) +#define ucal_openTimeZones U_ICU_ENTRY_POINT_RENAME(ucal_openTimeZones) +#define ucal_roll U_ICU_ENTRY_POINT_RENAME(ucal_roll) +#define ucal_set U_ICU_ENTRY_POINT_RENAME(ucal_set) +#define ucal_setAttribute U_ICU_ENTRY_POINT_RENAME(ucal_setAttribute) +#define ucal_setDate U_ICU_ENTRY_POINT_RENAME(ucal_setDate) +#define ucal_setDateTime U_ICU_ENTRY_POINT_RENAME(ucal_setDateTime) +#define ucal_setDefaultTimeZone U_ICU_ENTRY_POINT_RENAME(ucal_setDefaultTimeZone) +#define ucal_setGregorianChange U_ICU_ENTRY_POINT_RENAME(ucal_setGregorianChange) +#define ucal_setMillis U_ICU_ENTRY_POINT_RENAME(ucal_setMillis) +#define ucal_setTimeZone U_ICU_ENTRY_POINT_RENAME(ucal_setTimeZone) +#define ucase_addCaseClosure U_ICU_ENTRY_POINT_RENAME(ucase_addCaseClosure) +#define ucase_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(ucase_addPropertyStarts) +#define ucase_addStringCaseClosure U_ICU_ENTRY_POINT_RENAME(ucase_addStringCaseClosure) +#define ucase_fold U_ICU_ENTRY_POINT_RENAME(ucase_fold) +#define ucase_getCaseLocale U_ICU_ENTRY_POINT_RENAME(ucase_getCaseLocale) +#define ucase_getSingleton U_ICU_ENTRY_POINT_RENAME(ucase_getSingleton) +#define ucase_getType U_ICU_ENTRY_POINT_RENAME(ucase_getType) +#define ucase_getTypeOrIgnorable U_ICU_ENTRY_POINT_RENAME(ucase_getTypeOrIgnorable) +#define ucase_hasBinaryProperty U_ICU_ENTRY_POINT_RENAME(ucase_hasBinaryProperty) +#define ucase_isCaseSensitive U_ICU_ENTRY_POINT_RENAME(ucase_isCaseSensitive) +#define ucase_isSoftDotted U_ICU_ENTRY_POINT_RENAME(ucase_isSoftDotted) +#define ucase_toFullFolding U_ICU_ENTRY_POINT_RENAME(ucase_toFullFolding) +#define ucase_toFullLower U_ICU_ENTRY_POINT_RENAME(ucase_toFullLower) +#define ucase_toFullTitle U_ICU_ENTRY_POINT_RENAME(ucase_toFullTitle) +#define ucase_toFullUpper U_ICU_ENTRY_POINT_RENAME(ucase_toFullUpper) +#define ucase_tolower U_ICU_ENTRY_POINT_RENAME(ucase_tolower) +#define ucase_totitle U_ICU_ENTRY_POINT_RENAME(ucase_totitle) +#define ucase_toupper U_ICU_ENTRY_POINT_RENAME(ucase_toupper) +#define ucasemap_close U_ICU_ENTRY_POINT_RENAME(ucasemap_close) +#define ucasemap_getBreakIterator U_ICU_ENTRY_POINT_RENAME(ucasemap_getBreakIterator) +#define ucasemap_getLocale U_ICU_ENTRY_POINT_RENAME(ucasemap_getLocale) +#define ucasemap_getOptions U_ICU_ENTRY_POINT_RENAME(ucasemap_getOptions) +#define ucasemap_open U_ICU_ENTRY_POINT_RENAME(ucasemap_open) +#define ucasemap_setBreakIterator U_ICU_ENTRY_POINT_RENAME(ucasemap_setBreakIterator) +#define ucasemap_setLocale U_ICU_ENTRY_POINT_RENAME(ucasemap_setLocale) +#define ucasemap_setOptions U_ICU_ENTRY_POINT_RENAME(ucasemap_setOptions) +#define ucasemap_toTitle U_ICU_ENTRY_POINT_RENAME(ucasemap_toTitle) +#define ucasemap_utf8FoldCase U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8FoldCase) +#define ucasemap_utf8ToLower U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8ToLower) +#define ucasemap_utf8ToTitle U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8ToTitle) +#define ucasemap_utf8ToUpper U_ICU_ENTRY_POINT_RENAME(ucasemap_utf8ToUpper) +#define ucd_close U_ICU_ENTRY_POINT_RENAME(ucd_close) +#define ucd_flushCache U_ICU_ENTRY_POINT_RENAME(ucd_flushCache) +#define ucd_freeCache U_ICU_ENTRY_POINT_RENAME(ucd_freeCache) +#define ucd_getCollator U_ICU_ENTRY_POINT_RENAME(ucd_getCollator) +#define ucd_open U_ICU_ENTRY_POINT_RENAME(ucd_open) +#define uchar_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(uchar_addPropertyStarts) +#define uchar_swapNames U_ICU_ENTRY_POINT_RENAME(uchar_swapNames) +#define ucln_cleanupOne U_ICU_ENTRY_POINT_RENAME(ucln_cleanupOne) +#define ucln_common_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_common_registerCleanup) +#define ucln_i18n_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_i18n_registerCleanup) +#define ucln_io_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_io_registerCleanup) +#define ucln_lib_cleanup U_ICU_ENTRY_POINT_RENAME(ucln_lib_cleanup) +#define ucln_registerCleanup U_ICU_ENTRY_POINT_RENAME(ucln_registerCleanup) +#define ucnv_MBCSFromUChar32 U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSFromUChar32) +#define ucnv_MBCSFromUnicodeWithOffsets U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSFromUnicodeWithOffsets) +#define ucnv_MBCSGetFilteredUnicodeSetForUnicode U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSGetFilteredUnicodeSetForUnicode) +#define ucnv_MBCSGetType U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSGetType) +#define ucnv_MBCSGetUnicodeSetForUnicode U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSGetUnicodeSetForUnicode) +#define ucnv_MBCSIsLeadByte U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSIsLeadByte) +#define ucnv_MBCSSimpleGetNextUChar U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSSimpleGetNextUChar) +#define ucnv_MBCSToUnicodeWithOffsets U_ICU_ENTRY_POINT_RENAME(ucnv_MBCSToUnicodeWithOffsets) +#define ucnv_bld_countAvailableConverters U_ICU_ENTRY_POINT_RENAME(ucnv_bld_countAvailableConverters) +#define ucnv_bld_getAvailableConverter U_ICU_ENTRY_POINT_RENAME(ucnv_bld_getAvailableConverter) +#define ucnv_canCreateConverter U_ICU_ENTRY_POINT_RENAME(ucnv_canCreateConverter) +#define ucnv_cbFromUWriteBytes U_ICU_ENTRY_POINT_RENAME(ucnv_cbFromUWriteBytes) +#define ucnv_cbFromUWriteSub U_ICU_ENTRY_POINT_RENAME(ucnv_cbFromUWriteSub) +#define ucnv_cbFromUWriteUChars U_ICU_ENTRY_POINT_RENAME(ucnv_cbFromUWriteUChars) +#define ucnv_cbToUWriteSub U_ICU_ENTRY_POINT_RENAME(ucnv_cbToUWriteSub) +#define ucnv_cbToUWriteUChars U_ICU_ENTRY_POINT_RENAME(ucnv_cbToUWriteUChars) +#define ucnv_close U_ICU_ENTRY_POINT_RENAME(ucnv_close) +#define ucnv_compareNames U_ICU_ENTRY_POINT_RENAME(ucnv_compareNames) +#define ucnv_convert U_ICU_ENTRY_POINT_RENAME(ucnv_convert) +#define ucnv_convertEx U_ICU_ENTRY_POINT_RENAME(ucnv_convertEx) +#define ucnv_countAliases U_ICU_ENTRY_POINT_RENAME(ucnv_countAliases) +#define ucnv_countAvailable U_ICU_ENTRY_POINT_RENAME(ucnv_countAvailable) +#define ucnv_countStandards U_ICU_ENTRY_POINT_RENAME(ucnv_countStandards) +#define ucnv_createAlgorithmicConverter U_ICU_ENTRY_POINT_RENAME(ucnv_createAlgorithmicConverter) +#define ucnv_createConverter U_ICU_ENTRY_POINT_RENAME(ucnv_createConverter) +#define ucnv_createConverterFromPackage U_ICU_ENTRY_POINT_RENAME(ucnv_createConverterFromPackage) +#define ucnv_createConverterFromSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_createConverterFromSharedData) +#define ucnv_detectUnicodeSignature U_ICU_ENTRY_POINT_RENAME(ucnv_detectUnicodeSignature) +#define ucnv_extContinueMatchFromU U_ICU_ENTRY_POINT_RENAME(ucnv_extContinueMatchFromU) +#define ucnv_extContinueMatchToU U_ICU_ENTRY_POINT_RENAME(ucnv_extContinueMatchToU) +#define ucnv_extGetUnicodeSet U_ICU_ENTRY_POINT_RENAME(ucnv_extGetUnicodeSet) +#define ucnv_extInitialMatchFromU U_ICU_ENTRY_POINT_RENAME(ucnv_extInitialMatchFromU) +#define ucnv_extInitialMatchToU U_ICU_ENTRY_POINT_RENAME(ucnv_extInitialMatchToU) +#define ucnv_extSimpleMatchFromU U_ICU_ENTRY_POINT_RENAME(ucnv_extSimpleMatchFromU) +#define ucnv_extSimpleMatchToU U_ICU_ENTRY_POINT_RENAME(ucnv_extSimpleMatchToU) +#define ucnv_fixFileSeparator U_ICU_ENTRY_POINT_RENAME(ucnv_fixFileSeparator) +#define ucnv_flushCache U_ICU_ENTRY_POINT_RENAME(ucnv_flushCache) +#define ucnv_fromAlgorithmic U_ICU_ENTRY_POINT_RENAME(ucnv_fromAlgorithmic) +#define ucnv_fromUChars U_ICU_ENTRY_POINT_RENAME(ucnv_fromUChars) +#define ucnv_fromUCountPending U_ICU_ENTRY_POINT_RENAME(ucnv_fromUCountPending) +#define ucnv_fromUWriteBytes U_ICU_ENTRY_POINT_RENAME(ucnv_fromUWriteBytes) +#define ucnv_fromUnicode U_ICU_ENTRY_POINT_RENAME(ucnv_fromUnicode) +#define ucnv_fromUnicode_UTF8 U_ICU_ENTRY_POINT_RENAME(ucnv_fromUnicode_UTF8) +#define ucnv_fromUnicode_UTF8_OFFSETS_LOGIC U_ICU_ENTRY_POINT_RENAME(ucnv_fromUnicode_UTF8_OFFSETS_LOGIC) +#define ucnv_getAlias U_ICU_ENTRY_POINT_RENAME(ucnv_getAlias) +#define ucnv_getAliases U_ICU_ENTRY_POINT_RENAME(ucnv_getAliases) +#define ucnv_getAvailableName U_ICU_ENTRY_POINT_RENAME(ucnv_getAvailableName) +#define ucnv_getCCSID U_ICU_ENTRY_POINT_RENAME(ucnv_getCCSID) +#define ucnv_getCanonicalName U_ICU_ENTRY_POINT_RENAME(ucnv_getCanonicalName) +#define ucnv_getCompleteUnicodeSet U_ICU_ENTRY_POINT_RENAME(ucnv_getCompleteUnicodeSet) +#define ucnv_getDefaultName U_ICU_ENTRY_POINT_RENAME(ucnv_getDefaultName) +#define ucnv_getDisplayName U_ICU_ENTRY_POINT_RENAME(ucnv_getDisplayName) +#define ucnv_getFromUCallBack U_ICU_ENTRY_POINT_RENAME(ucnv_getFromUCallBack) +#define ucnv_getInvalidChars U_ICU_ENTRY_POINT_RENAME(ucnv_getInvalidChars) +#define ucnv_getInvalidUChars U_ICU_ENTRY_POINT_RENAME(ucnv_getInvalidUChars) +#define ucnv_getMaxCharSize U_ICU_ENTRY_POINT_RENAME(ucnv_getMaxCharSize) +#define ucnv_getMinCharSize U_ICU_ENTRY_POINT_RENAME(ucnv_getMinCharSize) +#define ucnv_getName U_ICU_ENTRY_POINT_RENAME(ucnv_getName) +#define ucnv_getNextUChar U_ICU_ENTRY_POINT_RENAME(ucnv_getNextUChar) +#define ucnv_getNonSurrogateUnicodeSet U_ICU_ENTRY_POINT_RENAME(ucnv_getNonSurrogateUnicodeSet) +#define ucnv_getPlatform U_ICU_ENTRY_POINT_RENAME(ucnv_getPlatform) +#define ucnv_getStandard U_ICU_ENTRY_POINT_RENAME(ucnv_getStandard) +#define ucnv_getStandardName U_ICU_ENTRY_POINT_RENAME(ucnv_getStandardName) +#define ucnv_getStarters U_ICU_ENTRY_POINT_RENAME(ucnv_getStarters) +#define ucnv_getSubstChars U_ICU_ENTRY_POINT_RENAME(ucnv_getSubstChars) +#define ucnv_getToUCallBack U_ICU_ENTRY_POINT_RENAME(ucnv_getToUCallBack) +#define ucnv_getType U_ICU_ENTRY_POINT_RENAME(ucnv_getType) +#define ucnv_getUnicodeSet U_ICU_ENTRY_POINT_RENAME(ucnv_getUnicodeSet) +#define ucnv_incrementRefCount U_ICU_ENTRY_POINT_RENAME(ucnv_incrementRefCount) +#define ucnv_io_countKnownConverters U_ICU_ENTRY_POINT_RENAME(ucnv_io_countKnownConverters) +#define ucnv_io_getConverterName U_ICU_ENTRY_POINT_RENAME(ucnv_io_getConverterName) +#define ucnv_io_stripASCIIForCompare U_ICU_ENTRY_POINT_RENAME(ucnv_io_stripASCIIForCompare) +#define ucnv_io_stripEBCDICForCompare U_ICU_ENTRY_POINT_RENAME(ucnv_io_stripEBCDICForCompare) +#define ucnv_isAmbiguous U_ICU_ENTRY_POINT_RENAME(ucnv_isAmbiguous) +#define ucnv_isFixedWidth U_ICU_ENTRY_POINT_RENAME(ucnv_isFixedWidth) +#define ucnv_load U_ICU_ENTRY_POINT_RENAME(ucnv_load) +#define ucnv_loadSharedData U_ICU_ENTRY_POINT_RENAME(ucnv_loadSharedData) +#define ucnv_open U_ICU_ENTRY_POINT_RENAME(ucnv_open) +#define ucnv_openAllNames U_ICU_ENTRY_POINT_RENAME(ucnv_openAllNames) +#define ucnv_openCCSID U_ICU_ENTRY_POINT_RENAME(ucnv_openCCSID) +#define ucnv_openPackage U_ICU_ENTRY_POINT_RENAME(ucnv_openPackage) +#define ucnv_openStandardNames U_ICU_ENTRY_POINT_RENAME(ucnv_openStandardNames) +#define ucnv_openU U_ICU_ENTRY_POINT_RENAME(ucnv_openU) +#define ucnv_reset U_ICU_ENTRY_POINT_RENAME(ucnv_reset) +#define ucnv_resetFromUnicode U_ICU_ENTRY_POINT_RENAME(ucnv_resetFromUnicode) +#define ucnv_resetToUnicode U_ICU_ENTRY_POINT_RENAME(ucnv_resetToUnicode) +#define ucnv_safeClone U_ICU_ENTRY_POINT_RENAME(ucnv_safeClone) +#define ucnv_setDefaultName U_ICU_ENTRY_POINT_RENAME(ucnv_setDefaultName) +#define ucnv_setFallback U_ICU_ENTRY_POINT_RENAME(ucnv_setFallback) +#define ucnv_setFromUCallBack U_ICU_ENTRY_POINT_RENAME(ucnv_setFromUCallBack) +#define ucnv_setSubstChars U_ICU_ENTRY_POINT_RENAME(ucnv_setSubstChars) +#define ucnv_setSubstString U_ICU_ENTRY_POINT_RENAME(ucnv_setSubstString) +#define ucnv_setToUCallBack U_ICU_ENTRY_POINT_RENAME(ucnv_setToUCallBack) +#define ucnv_swap U_ICU_ENTRY_POINT_RENAME(ucnv_swap) +#define ucnv_swapAliases U_ICU_ENTRY_POINT_RENAME(ucnv_swapAliases) +#define ucnv_toAlgorithmic U_ICU_ENTRY_POINT_RENAME(ucnv_toAlgorithmic) +#define ucnv_toUChars U_ICU_ENTRY_POINT_RENAME(ucnv_toUChars) +#define ucnv_toUCountPending U_ICU_ENTRY_POINT_RENAME(ucnv_toUCountPending) +#define ucnv_toUWriteCodePoint U_ICU_ENTRY_POINT_RENAME(ucnv_toUWriteCodePoint) +#define ucnv_toUWriteUChars U_ICU_ENTRY_POINT_RENAME(ucnv_toUWriteUChars) +#define ucnv_toUnicode U_ICU_ENTRY_POINT_RENAME(ucnv_toUnicode) +#define ucnv_unload U_ICU_ENTRY_POINT_RENAME(ucnv_unload) +#define ucnv_unloadSharedDataIfReady U_ICU_ENTRY_POINT_RENAME(ucnv_unloadSharedDataIfReady) +#define ucnv_usesFallback U_ICU_ENTRY_POINT_RENAME(ucnv_usesFallback) +#define ucnvsel_close U_ICU_ENTRY_POINT_RENAME(ucnvsel_close) +#define ucnvsel_open U_ICU_ENTRY_POINT_RENAME(ucnvsel_open) +#define ucnvsel_openFromSerialized U_ICU_ENTRY_POINT_RENAME(ucnvsel_openFromSerialized) +#define ucnvsel_selectForString U_ICU_ENTRY_POINT_RENAME(ucnvsel_selectForString) +#define ucnvsel_selectForUTF8 U_ICU_ENTRY_POINT_RENAME(ucnvsel_selectForUTF8) +#define ucnvsel_serialize U_ICU_ENTRY_POINT_RENAME(ucnvsel_serialize) +#define ucol_allocWeights U_ICU_ENTRY_POINT_RENAME(ucol_allocWeights) +#define ucol_assembleTailoringTable U_ICU_ENTRY_POINT_RENAME(ucol_assembleTailoringTable) +#define ucol_buildPermutationTable U_ICU_ENTRY_POINT_RENAME(ucol_buildPermutationTable) +#define ucol_calcSortKey U_ICU_ENTRY_POINT_RENAME(ucol_calcSortKey) +#define ucol_calcSortKeySimpleTertiary U_ICU_ENTRY_POINT_RENAME(ucol_calcSortKeySimpleTertiary) +#define ucol_cloneBinary U_ICU_ENTRY_POINT_RENAME(ucol_cloneBinary) +#define ucol_cloneRuleData U_ICU_ENTRY_POINT_RENAME(ucol_cloneRuleData) +#define ucol_close U_ICU_ENTRY_POINT_RENAME(ucol_close) +#define ucol_closeElements U_ICU_ENTRY_POINT_RENAME(ucol_closeElements) +#define ucol_countAvailable U_ICU_ENTRY_POINT_RENAME(ucol_countAvailable) +#define ucol_createElements U_ICU_ENTRY_POINT_RENAME(ucol_createElements) +#define ucol_doCE U_ICU_ENTRY_POINT_RENAME(ucol_doCE) +#define ucol_equal U_ICU_ENTRY_POINT_RENAME(ucol_equal) +#define ucol_equals U_ICU_ENTRY_POINT_RENAME(ucol_equals) +#define ucol_findReorderingEntry U_ICU_ENTRY_POINT_RENAME(ucol_findReorderingEntry) +#define ucol_forceHanImplicit U_ICU_ENTRY_POINT_RENAME(ucol_forceHanImplicit) +#define ucol_forgetUCA U_ICU_ENTRY_POINT_RENAME(ucol_forgetUCA) +#define ucol_freeOffsetBuffer U_ICU_ENTRY_POINT_RENAME(ucol_freeOffsetBuffer) +#define ucol_getAttribute U_ICU_ENTRY_POINT_RENAME(ucol_getAttribute) +#define ucol_getAttributeOrDefault U_ICU_ENTRY_POINT_RENAME(ucol_getAttributeOrDefault) +#define ucol_getAvailable U_ICU_ENTRY_POINT_RENAME(ucol_getAvailable) +#define ucol_getBound U_ICU_ENTRY_POINT_RENAME(ucol_getBound) +#define ucol_getCEStrengthDifference U_ICU_ENTRY_POINT_RENAME(ucol_getCEStrengthDifference) +#define ucol_getContractions U_ICU_ENTRY_POINT_RENAME(ucol_getContractions) +#define ucol_getContractionsAndExpansions U_ICU_ENTRY_POINT_RENAME(ucol_getContractionsAndExpansions) +#define ucol_getDisplayName U_ICU_ENTRY_POINT_RENAME(ucol_getDisplayName) +#define ucol_getEquivalentReorderCodes U_ICU_ENTRY_POINT_RENAME(ucol_getEquivalentReorderCodes) +#define ucol_getFirstCE U_ICU_ENTRY_POINT_RENAME(ucol_getFirstCE) +#define ucol_getFunctionalEquivalent U_ICU_ENTRY_POINT_RENAME(ucol_getFunctionalEquivalent) +#define ucol_getKeywordValues U_ICU_ENTRY_POINT_RENAME(ucol_getKeywordValues) +#define ucol_getKeywordValuesForLocale U_ICU_ENTRY_POINT_RENAME(ucol_getKeywordValuesForLocale) +#define ucol_getKeywords U_ICU_ENTRY_POINT_RENAME(ucol_getKeywords) +#define ucol_getLeadBytesForReorderCode U_ICU_ENTRY_POINT_RENAME(ucol_getLeadBytesForReorderCode) +#define ucol_getLocale U_ICU_ENTRY_POINT_RENAME(ucol_getLocale) +#define ucol_getLocaleByType U_ICU_ENTRY_POINT_RENAME(ucol_getLocaleByType) +#define ucol_getMaxExpansion U_ICU_ENTRY_POINT_RENAME(ucol_getMaxExpansion) +#define ucol_getNextCE U_ICU_ENTRY_POINT_RENAME(ucol_getNextCE) +#define ucol_getOffset U_ICU_ENTRY_POINT_RENAME(ucol_getOffset) +#define ucol_getPrevCE U_ICU_ENTRY_POINT_RENAME(ucol_getPrevCE) +#define ucol_getReorderCodes U_ICU_ENTRY_POINT_RENAME(ucol_getReorderCodes) +#define ucol_getReorderCodesForLeadByte U_ICU_ENTRY_POINT_RENAME(ucol_getReorderCodesForLeadByte) +#define ucol_getRules U_ICU_ENTRY_POINT_RENAME(ucol_getRules) +#define ucol_getRulesEx U_ICU_ENTRY_POINT_RENAME(ucol_getRulesEx) +#define ucol_getShortDefinitionString U_ICU_ENTRY_POINT_RENAME(ucol_getShortDefinitionString) +#define ucol_getSortKey U_ICU_ENTRY_POINT_RENAME(ucol_getSortKey) +#define ucol_getSortKeyWithAllocation U_ICU_ENTRY_POINT_RENAME(ucol_getSortKeyWithAllocation) +#define ucol_getStrength U_ICU_ENTRY_POINT_RENAME(ucol_getStrength) +#define ucol_getTailoredSet U_ICU_ENTRY_POINT_RENAME(ucol_getTailoredSet) +#define ucol_getUCAVersion U_ICU_ENTRY_POINT_RENAME(ucol_getUCAVersion) +#define ucol_getUnsafeSet U_ICU_ENTRY_POINT_RENAME(ucol_getUnsafeSet) +#define ucol_getVariableTop U_ICU_ENTRY_POINT_RENAME(ucol_getVariableTop) +#define ucol_getVersion U_ICU_ENTRY_POINT_RENAME(ucol_getVersion) +#define ucol_greater U_ICU_ENTRY_POINT_RENAME(ucol_greater) +#define ucol_greaterOrEqual U_ICU_ENTRY_POINT_RENAME(ucol_greaterOrEqual) +#define ucol_initBuffers U_ICU_ENTRY_POINT_RENAME(ucol_initBuffers) +#define ucol_initCollator U_ICU_ENTRY_POINT_RENAME(ucol_initCollator) +#define ucol_initInverseUCA U_ICU_ENTRY_POINT_RENAME(ucol_initInverseUCA) +#define ucol_initUCA U_ICU_ENTRY_POINT_RENAME(ucol_initUCA) +#define ucol_inv_getNextCE U_ICU_ENTRY_POINT_RENAME(ucol_inv_getNextCE) +#define ucol_inv_getPrevCE U_ICU_ENTRY_POINT_RENAME(ucol_inv_getPrevCE) +#define ucol_isTailored U_ICU_ENTRY_POINT_RENAME(ucol_isTailored) +#define ucol_keyHashCode U_ICU_ENTRY_POINT_RENAME(ucol_keyHashCode) +#define ucol_looksLikeCollationBinary U_ICU_ENTRY_POINT_RENAME(ucol_looksLikeCollationBinary) +#define ucol_mergeSortkeys U_ICU_ENTRY_POINT_RENAME(ucol_mergeSortkeys) +#define ucol_next U_ICU_ENTRY_POINT_RENAME(ucol_next) +#define ucol_nextProcessed U_ICU_ENTRY_POINT_RENAME(ucol_nextProcessed) +#define ucol_nextSortKeyPart U_ICU_ENTRY_POINT_RENAME(ucol_nextSortKeyPart) +#define ucol_nextWeight U_ICU_ENTRY_POINT_RENAME(ucol_nextWeight) +#define ucol_normalizeShortDefinitionString U_ICU_ENTRY_POINT_RENAME(ucol_normalizeShortDefinitionString) +#define ucol_open U_ICU_ENTRY_POINT_RENAME(ucol_open) +#define ucol_openAvailableLocales U_ICU_ENTRY_POINT_RENAME(ucol_openAvailableLocales) +#define ucol_openBinary U_ICU_ENTRY_POINT_RENAME(ucol_openBinary) +#define ucol_openElements U_ICU_ENTRY_POINT_RENAME(ucol_openElements) +#define ucol_openFromShortString U_ICU_ENTRY_POINT_RENAME(ucol_openFromShortString) +#define ucol_openRules U_ICU_ENTRY_POINT_RENAME(ucol_openRules) +#define ucol_openRulesForImport U_ICU_ENTRY_POINT_RENAME(ucol_openRulesForImport) +#define ucol_open_internal U_ICU_ENTRY_POINT_RENAME(ucol_open_internal) +#define ucol_prepareShortStringOpen U_ICU_ENTRY_POINT_RENAME(ucol_prepareShortStringOpen) +#define ucol_previous U_ICU_ENTRY_POINT_RENAME(ucol_previous) +#define ucol_previousProcessed U_ICU_ENTRY_POINT_RENAME(ucol_previousProcessed) +#define ucol_primaryOrder U_ICU_ENTRY_POINT_RENAME(ucol_primaryOrder) +#define ucol_prv_getSpecialCE U_ICU_ENTRY_POINT_RENAME(ucol_prv_getSpecialCE) +#define ucol_prv_getSpecialPrevCE U_ICU_ENTRY_POINT_RENAME(ucol_prv_getSpecialPrevCE) +#define ucol_reset U_ICU_ENTRY_POINT_RENAME(ucol_reset) +#define ucol_restoreVariableTop U_ICU_ENTRY_POINT_RENAME(ucol_restoreVariableTop) +#define ucol_safeClone U_ICU_ENTRY_POINT_RENAME(ucol_safeClone) +#define ucol_secondaryOrder U_ICU_ENTRY_POINT_RENAME(ucol_secondaryOrder) +#define ucol_setAttribute U_ICU_ENTRY_POINT_RENAME(ucol_setAttribute) +#define ucol_setOffset U_ICU_ENTRY_POINT_RENAME(ucol_setOffset) +#define ucol_setOptionsFromHeader U_ICU_ENTRY_POINT_RENAME(ucol_setOptionsFromHeader) +#define ucol_setReorderCodes U_ICU_ENTRY_POINT_RENAME(ucol_setReorderCodes) +#define ucol_setReqValidLocales U_ICU_ENTRY_POINT_RENAME(ucol_setReqValidLocales) +#define ucol_setStrength U_ICU_ENTRY_POINT_RENAME(ucol_setStrength) +#define ucol_setText U_ICU_ENTRY_POINT_RENAME(ucol_setText) +#define ucol_setVariableTop U_ICU_ENTRY_POINT_RENAME(ucol_setVariableTop) +#define ucol_strcoll U_ICU_ENTRY_POINT_RENAME(ucol_strcoll) +#define ucol_strcollIter U_ICU_ENTRY_POINT_RENAME(ucol_strcollIter) +#define ucol_swap U_ICU_ENTRY_POINT_RENAME(ucol_swap) +#define ucol_swapBinary U_ICU_ENTRY_POINT_RENAME(ucol_swapBinary) +#define ucol_swapInverseUCA U_ICU_ENTRY_POINT_RENAME(ucol_swapInverseUCA) +#define ucol_tertiaryOrder U_ICU_ENTRY_POINT_RENAME(ucol_tertiaryOrder) +#define ucol_tok_assembleTokenList U_ICU_ENTRY_POINT_RENAME(ucol_tok_assembleTokenList) +#define ucol_tok_closeTokenList U_ICU_ENTRY_POINT_RENAME(ucol_tok_closeTokenList) +#define ucol_tok_getNextArgument U_ICU_ENTRY_POINT_RENAME(ucol_tok_getNextArgument) +#define ucol_tok_getRulesFromBundle U_ICU_ENTRY_POINT_RENAME(ucol_tok_getRulesFromBundle) +#define ucol_tok_initTokenList U_ICU_ENTRY_POINT_RENAME(ucol_tok_initTokenList) +#define ucol_tok_parseNextToken U_ICU_ENTRY_POINT_RENAME(ucol_tok_parseNextToken) +#define ucol_updateInternalState U_ICU_ENTRY_POINT_RENAME(ucol_updateInternalState) +#define ucsdet_close U_ICU_ENTRY_POINT_RENAME(ucsdet_close) +#define ucsdet_detect U_ICU_ENTRY_POINT_RENAME(ucsdet_detect) +#define ucsdet_detectAll U_ICU_ENTRY_POINT_RENAME(ucsdet_detectAll) +#define ucsdet_enableInputFilter U_ICU_ENTRY_POINT_RENAME(ucsdet_enableInputFilter) +#define ucsdet_getAllDetectableCharsets U_ICU_ENTRY_POINT_RENAME(ucsdet_getAllDetectableCharsets) +#define ucsdet_getConfidence U_ICU_ENTRY_POINT_RENAME(ucsdet_getConfidence) +#define ucsdet_getLanguage U_ICU_ENTRY_POINT_RENAME(ucsdet_getLanguage) +#define ucsdet_getName U_ICU_ENTRY_POINT_RENAME(ucsdet_getName) +#define ucsdet_getUChars U_ICU_ENTRY_POINT_RENAME(ucsdet_getUChars) +#define ucsdet_isInputFilterEnabled U_ICU_ENTRY_POINT_RENAME(ucsdet_isInputFilterEnabled) +#define ucsdet_open U_ICU_ENTRY_POINT_RENAME(ucsdet_open) +#define ucsdet_setDeclaredEncoding U_ICU_ENTRY_POINT_RENAME(ucsdet_setDeclaredEncoding) +#define ucsdet_setText U_ICU_ENTRY_POINT_RENAME(ucsdet_setText) +#define ucurr_countCurrencies U_ICU_ENTRY_POINT_RENAME(ucurr_countCurrencies) +#define ucurr_forLocale U_ICU_ENTRY_POINT_RENAME(ucurr_forLocale) +#define ucurr_forLocaleAndDate U_ICU_ENTRY_POINT_RENAME(ucurr_forLocaleAndDate) +#define ucurr_getDefaultFractionDigits U_ICU_ENTRY_POINT_RENAME(ucurr_getDefaultFractionDigits) +#define ucurr_getKeywordValuesForLocale U_ICU_ENTRY_POINT_RENAME(ucurr_getKeywordValuesForLocale) +#define ucurr_getName U_ICU_ENTRY_POINT_RENAME(ucurr_getName) +#define ucurr_getPluralName U_ICU_ENTRY_POINT_RENAME(ucurr_getPluralName) +#define ucurr_getRoundingIncrement U_ICU_ENTRY_POINT_RENAME(ucurr_getRoundingIncrement) +#define ucurr_isAvailable U_ICU_ENTRY_POINT_RENAME(ucurr_isAvailable) +#define ucurr_openISOCurrencies U_ICU_ENTRY_POINT_RENAME(ucurr_openISOCurrencies) +#define ucurr_register U_ICU_ENTRY_POINT_RENAME(ucurr_register) +#define ucurr_unregister U_ICU_ENTRY_POINT_RENAME(ucurr_unregister) +#define udat_applyPattern U_ICU_ENTRY_POINT_RENAME(udat_applyPattern) +#define udat_applyPatternRelative U_ICU_ENTRY_POINT_RENAME(udat_applyPatternRelative) +#define udat_clone U_ICU_ENTRY_POINT_RENAME(udat_clone) +#define udat_close U_ICU_ENTRY_POINT_RENAME(udat_close) +#define udat_countAvailable U_ICU_ENTRY_POINT_RENAME(udat_countAvailable) +#define udat_countSymbols U_ICU_ENTRY_POINT_RENAME(udat_countSymbols) +#define udat_format U_ICU_ENTRY_POINT_RENAME(udat_format) +#define udat_get2DigitYearStart U_ICU_ENTRY_POINT_RENAME(udat_get2DigitYearStart) +#define udat_getAvailable U_ICU_ENTRY_POINT_RENAME(udat_getAvailable) +#define udat_getCalendar U_ICU_ENTRY_POINT_RENAME(udat_getCalendar) +#define udat_getLocaleByType U_ICU_ENTRY_POINT_RENAME(udat_getLocaleByType) +#define udat_getNumberFormat U_ICU_ENTRY_POINT_RENAME(udat_getNumberFormat) +#define udat_getSymbols U_ICU_ENTRY_POINT_RENAME(udat_getSymbols) +#define udat_isLenient U_ICU_ENTRY_POINT_RENAME(udat_isLenient) +#define udat_open U_ICU_ENTRY_POINT_RENAME(udat_open) +#define udat_parse U_ICU_ENTRY_POINT_RENAME(udat_parse) +#define udat_parseCalendar U_ICU_ENTRY_POINT_RENAME(udat_parseCalendar) +#define udat_set2DigitYearStart U_ICU_ENTRY_POINT_RENAME(udat_set2DigitYearStart) +#define udat_setCalendar U_ICU_ENTRY_POINT_RENAME(udat_setCalendar) +#define udat_setLenient U_ICU_ENTRY_POINT_RENAME(udat_setLenient) +#define udat_setNumberFormat U_ICU_ENTRY_POINT_RENAME(udat_setNumberFormat) +#define udat_setSymbols U_ICU_ENTRY_POINT_RENAME(udat_setSymbols) +#define udat_toCalendarDateField U_ICU_ENTRY_POINT_RENAME(udat_toCalendarDateField) +#define udat_toPattern U_ICU_ENTRY_POINT_RENAME(udat_toPattern) +#define udat_toPatternRelativeDate U_ICU_ENTRY_POINT_RENAME(udat_toPatternRelativeDate) +#define udat_toPatternRelativeTime U_ICU_ENTRY_POINT_RENAME(udat_toPatternRelativeTime) +#define udata_checkCommonData U_ICU_ENTRY_POINT_RENAME(udata_checkCommonData) +#define udata_close U_ICU_ENTRY_POINT_RENAME(udata_close) +#define udata_closeSwapper U_ICU_ENTRY_POINT_RENAME(udata_closeSwapper) +#define udata_getHeaderSize U_ICU_ENTRY_POINT_RENAME(udata_getHeaderSize) +#define udata_getInfo U_ICU_ENTRY_POINT_RENAME(udata_getInfo) +#define udata_getInfoSize U_ICU_ENTRY_POINT_RENAME(udata_getInfoSize) +#define udata_getLength U_ICU_ENTRY_POINT_RENAME(udata_getLength) +#define udata_getMemory U_ICU_ENTRY_POINT_RENAME(udata_getMemory) +#define udata_getRawMemory U_ICU_ENTRY_POINT_RENAME(udata_getRawMemory) +#define udata_open U_ICU_ENTRY_POINT_RENAME(udata_open) +#define udata_openChoice U_ICU_ENTRY_POINT_RENAME(udata_openChoice) +#define udata_openSwapper U_ICU_ENTRY_POINT_RENAME(udata_openSwapper) +#define udata_openSwapperForInputData U_ICU_ENTRY_POINT_RENAME(udata_openSwapperForInputData) +#define udata_printError U_ICU_ENTRY_POINT_RENAME(udata_printError) +#define udata_readInt16 U_ICU_ENTRY_POINT_RENAME(udata_readInt16) +#define udata_readInt32 U_ICU_ENTRY_POINT_RENAME(udata_readInt32) +#define udata_setAppData U_ICU_ENTRY_POINT_RENAME(udata_setAppData) +#define udata_setCommonData U_ICU_ENTRY_POINT_RENAME(udata_setCommonData) +#define udata_setFileAccess U_ICU_ENTRY_POINT_RENAME(udata_setFileAccess) +#define udata_swapDataHeader U_ICU_ENTRY_POINT_RENAME(udata_swapDataHeader) +#define udata_swapInvStringBlock U_ICU_ENTRY_POINT_RENAME(udata_swapInvStringBlock) +#define udatpg_addPattern U_ICU_ENTRY_POINT_RENAME(udatpg_addPattern) +#define udatpg_clone U_ICU_ENTRY_POINT_RENAME(udatpg_clone) +#define udatpg_close U_ICU_ENTRY_POINT_RENAME(udatpg_close) +#define udatpg_getAppendItemFormat U_ICU_ENTRY_POINT_RENAME(udatpg_getAppendItemFormat) +#define udatpg_getAppendItemName U_ICU_ENTRY_POINT_RENAME(udatpg_getAppendItemName) +#define udatpg_getBaseSkeleton U_ICU_ENTRY_POINT_RENAME(udatpg_getBaseSkeleton) +#define udatpg_getBestPattern U_ICU_ENTRY_POINT_RENAME(udatpg_getBestPattern) +#define udatpg_getBestPatternWithOptions U_ICU_ENTRY_POINT_RENAME(udatpg_getBestPatternWithOptions) +#define udatpg_getDateTimeFormat U_ICU_ENTRY_POINT_RENAME(udatpg_getDateTimeFormat) +#define udatpg_getDecimal U_ICU_ENTRY_POINT_RENAME(udatpg_getDecimal) +#define udatpg_getPatternForSkeleton U_ICU_ENTRY_POINT_RENAME(udatpg_getPatternForSkeleton) +#define udatpg_getSkeleton U_ICU_ENTRY_POINT_RENAME(udatpg_getSkeleton) +#define udatpg_open U_ICU_ENTRY_POINT_RENAME(udatpg_open) +#define udatpg_openBaseSkeletons U_ICU_ENTRY_POINT_RENAME(udatpg_openBaseSkeletons) +#define udatpg_openEmpty U_ICU_ENTRY_POINT_RENAME(udatpg_openEmpty) +#define udatpg_openSkeletons U_ICU_ENTRY_POINT_RENAME(udatpg_openSkeletons) +#define udatpg_replaceFieldTypes U_ICU_ENTRY_POINT_RENAME(udatpg_replaceFieldTypes) +#define udatpg_replaceFieldTypesWithOptions U_ICU_ENTRY_POINT_RENAME(udatpg_replaceFieldTypesWithOptions) +#define udatpg_setAppendItemFormat U_ICU_ENTRY_POINT_RENAME(udatpg_setAppendItemFormat) +#define udatpg_setAppendItemName U_ICU_ENTRY_POINT_RENAME(udatpg_setAppendItemName) +#define udatpg_setDateTimeFormat U_ICU_ENTRY_POINT_RENAME(udatpg_setDateTimeFormat) +#define udatpg_setDecimal U_ICU_ENTRY_POINT_RENAME(udatpg_setDecimal) +#define udtitvfmt_close U_ICU_ENTRY_POINT_RENAME(udtitvfmt_close) +#define udtitvfmt_format U_ICU_ENTRY_POINT_RENAME(udtitvfmt_format) +#define udtitvfmt_open U_ICU_ENTRY_POINT_RENAME(udtitvfmt_open) +#define uenum_close U_ICU_ENTRY_POINT_RENAME(uenum_close) +#define uenum_count U_ICU_ENTRY_POINT_RENAME(uenum_count) +#define uenum_next U_ICU_ENTRY_POINT_RENAME(uenum_next) +#define uenum_nextDefault U_ICU_ENTRY_POINT_RENAME(uenum_nextDefault) +#define uenum_openCharStringsEnumeration U_ICU_ENTRY_POINT_RENAME(uenum_openCharStringsEnumeration) +#define uenum_openFromStringEnumeration U_ICU_ENTRY_POINT_RENAME(uenum_openFromStringEnumeration) +#define uenum_reset U_ICU_ENTRY_POINT_RENAME(uenum_reset) +#define uenum_unext U_ICU_ENTRY_POINT_RENAME(uenum_unext) +#define uenum_unextDefault U_ICU_ENTRY_POINT_RENAME(uenum_unextDefault) +#define ufile_close_translit U_ICU_ENTRY_POINT_RENAME(ufile_close_translit) +#define ufile_fill_uchar_buffer U_ICU_ENTRY_POINT_RENAME(ufile_fill_uchar_buffer) +#define ufile_flush_io U_ICU_ENTRY_POINT_RENAME(ufile_flush_io) +#define ufile_flush_translit U_ICU_ENTRY_POINT_RENAME(ufile_flush_translit) +#define ufile_getch U_ICU_ENTRY_POINT_RENAME(ufile_getch) +#define ufile_getch32 U_ICU_ENTRY_POINT_RENAME(ufile_getch32) +#define ufmt_64tou U_ICU_ENTRY_POINT_RENAME(ufmt_64tou) +#define ufmt_defaultCPToUnicode U_ICU_ENTRY_POINT_RENAME(ufmt_defaultCPToUnicode) +#define ufmt_digitvalue U_ICU_ENTRY_POINT_RENAME(ufmt_digitvalue) +#define ufmt_isdigit U_ICU_ENTRY_POINT_RENAME(ufmt_isdigit) +#define ufmt_ptou U_ICU_ENTRY_POINT_RENAME(ufmt_ptou) +#define ufmt_uto64 U_ICU_ENTRY_POINT_RENAME(ufmt_uto64) +#define ufmt_utop U_ICU_ENTRY_POINT_RENAME(ufmt_utop) +#define uhash_close U_ICU_ENTRY_POINT_RENAME(uhash_close) +#define uhash_compareCaselessUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_compareCaselessUnicodeString) +#define uhash_compareChars U_ICU_ENTRY_POINT_RENAME(uhash_compareChars) +#define uhash_compareIChars U_ICU_ENTRY_POINT_RENAME(uhash_compareIChars) +#define uhash_compareLong U_ICU_ENTRY_POINT_RENAME(uhash_compareLong) +#define uhash_compareUChars U_ICU_ENTRY_POINT_RENAME(uhash_compareUChars) +#define uhash_compareUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_compareUnicodeString) +#define uhash_count U_ICU_ENTRY_POINT_RENAME(uhash_count) +#define uhash_deleteHashtable U_ICU_ENTRY_POINT_RENAME(uhash_deleteHashtable) +#define uhash_deleteUObject U_ICU_ENTRY_POINT_RENAME(uhash_deleteUObject) +#define uhash_deleteUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_deleteUnicodeString) +#define uhash_equals U_ICU_ENTRY_POINT_RENAME(uhash_equals) +#define uhash_find U_ICU_ENTRY_POINT_RENAME(uhash_find) +#define uhash_freeBlock U_ICU_ENTRY_POINT_RENAME(uhash_freeBlock) +#define uhash_get U_ICU_ENTRY_POINT_RENAME(uhash_get) +#define uhash_geti U_ICU_ENTRY_POINT_RENAME(uhash_geti) +#define uhash_hashCaselessUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_hashCaselessUnicodeString) +#define uhash_hashChars U_ICU_ENTRY_POINT_RENAME(uhash_hashChars) +#define uhash_hashCharsN U_ICU_ENTRY_POINT_RENAME(uhash_hashCharsN) +#define uhash_hashIChars U_ICU_ENTRY_POINT_RENAME(uhash_hashIChars) +#define uhash_hashLong U_ICU_ENTRY_POINT_RENAME(uhash_hashLong) +#define uhash_hashUChars U_ICU_ENTRY_POINT_RENAME(uhash_hashUChars) +#define uhash_hashUCharsN U_ICU_ENTRY_POINT_RENAME(uhash_hashUCharsN) +#define uhash_hashUnicodeString U_ICU_ENTRY_POINT_RENAME(uhash_hashUnicodeString) +#define uhash_iget U_ICU_ENTRY_POINT_RENAME(uhash_iget) +#define uhash_igeti U_ICU_ENTRY_POINT_RENAME(uhash_igeti) +#define uhash_init U_ICU_ENTRY_POINT_RENAME(uhash_init) +#define uhash_iput U_ICU_ENTRY_POINT_RENAME(uhash_iput) +#define uhash_iputi U_ICU_ENTRY_POINT_RENAME(uhash_iputi) +#define uhash_iremove U_ICU_ENTRY_POINT_RENAME(uhash_iremove) +#define uhash_iremovei U_ICU_ENTRY_POINT_RENAME(uhash_iremovei) +#define uhash_nextElement U_ICU_ENTRY_POINT_RENAME(uhash_nextElement) +#define uhash_open U_ICU_ENTRY_POINT_RENAME(uhash_open) +#define uhash_openSize U_ICU_ENTRY_POINT_RENAME(uhash_openSize) +#define uhash_put U_ICU_ENTRY_POINT_RENAME(uhash_put) +#define uhash_puti U_ICU_ENTRY_POINT_RENAME(uhash_puti) +#define uhash_remove U_ICU_ENTRY_POINT_RENAME(uhash_remove) +#define uhash_removeAll U_ICU_ENTRY_POINT_RENAME(uhash_removeAll) +#define uhash_removeElement U_ICU_ENTRY_POINT_RENAME(uhash_removeElement) +#define uhash_removei U_ICU_ENTRY_POINT_RENAME(uhash_removei) +#define uhash_setKeyComparator U_ICU_ENTRY_POINT_RENAME(uhash_setKeyComparator) +#define uhash_setKeyDeleter U_ICU_ENTRY_POINT_RENAME(uhash_setKeyDeleter) +#define uhash_setKeyHasher U_ICU_ENTRY_POINT_RENAME(uhash_setKeyHasher) +#define uhash_setResizePolicy U_ICU_ENTRY_POINT_RENAME(uhash_setResizePolicy) +#define uhash_setValueComparator U_ICU_ENTRY_POINT_RENAME(uhash_setValueComparator) +#define uhash_setValueDeleter U_ICU_ENTRY_POINT_RENAME(uhash_setValueDeleter) +#define uidna_IDNToASCII U_ICU_ENTRY_POINT_RENAME(uidna_IDNToASCII) +#define uidna_IDNToUnicode U_ICU_ENTRY_POINT_RENAME(uidna_IDNToUnicode) +#define uidna_close U_ICU_ENTRY_POINT_RENAME(uidna_close) +#define uidna_compare U_ICU_ENTRY_POINT_RENAME(uidna_compare) +#define uidna_labelToASCII U_ICU_ENTRY_POINT_RENAME(uidna_labelToASCII) +#define uidna_labelToASCII_UTF8 U_ICU_ENTRY_POINT_RENAME(uidna_labelToASCII_UTF8) +#define uidna_labelToUnicode U_ICU_ENTRY_POINT_RENAME(uidna_labelToUnicode) +#define uidna_labelToUnicodeUTF8 U_ICU_ENTRY_POINT_RENAME(uidna_labelToUnicodeUTF8) +#define uidna_nameToASCII U_ICU_ENTRY_POINT_RENAME(uidna_nameToASCII) +#define uidna_nameToASCII_UTF8 U_ICU_ENTRY_POINT_RENAME(uidna_nameToASCII_UTF8) +#define uidna_nameToUnicode U_ICU_ENTRY_POINT_RENAME(uidna_nameToUnicode) +#define uidna_nameToUnicodeUTF8 U_ICU_ENTRY_POINT_RENAME(uidna_nameToUnicodeUTF8) +#define uidna_openUTS46 U_ICU_ENTRY_POINT_RENAME(uidna_openUTS46) +#define uidna_toASCII U_ICU_ENTRY_POINT_RENAME(uidna_toASCII) +#define uidna_toUnicode U_ICU_ENTRY_POINT_RENAME(uidna_toUnicode) +#define uiter_current32 U_ICU_ENTRY_POINT_RENAME(uiter_current32) +#define uiter_getState U_ICU_ENTRY_POINT_RENAME(uiter_getState) +#define uiter_next32 U_ICU_ENTRY_POINT_RENAME(uiter_next32) +#define uiter_previous32 U_ICU_ENTRY_POINT_RENAME(uiter_previous32) +#define uiter_setCharacterIterator U_ICU_ENTRY_POINT_RENAME(uiter_setCharacterIterator) +#define uiter_setReplaceable U_ICU_ENTRY_POINT_RENAME(uiter_setReplaceable) +#define uiter_setState U_ICU_ENTRY_POINT_RENAME(uiter_setState) +#define uiter_setString U_ICU_ENTRY_POINT_RENAME(uiter_setString) +#define uiter_setUTF16BE U_ICU_ENTRY_POINT_RENAME(uiter_setUTF16BE) +#define uiter_setUTF8 U_ICU_ENTRY_POINT_RENAME(uiter_setUTF8) +#define uldn_close U_ICU_ENTRY_POINT_RENAME(uldn_close) +#define uldn_getDialectHandling U_ICU_ENTRY_POINT_RENAME(uldn_getDialectHandling) +#define uldn_getLocale U_ICU_ENTRY_POINT_RENAME(uldn_getLocale) +#define uldn_keyDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_keyDisplayName) +#define uldn_keyValueDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_keyValueDisplayName) +#define uldn_languageDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_languageDisplayName) +#define uldn_localeDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_localeDisplayName) +#define uldn_open U_ICU_ENTRY_POINT_RENAME(uldn_open) +#define uldn_regionDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_regionDisplayName) +#define uldn_scriptCodeDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_scriptCodeDisplayName) +#define uldn_scriptDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_scriptDisplayName) +#define uldn_variantDisplayName U_ICU_ENTRY_POINT_RENAME(uldn_variantDisplayName) +#define ulist_addItemBeginList U_ICU_ENTRY_POINT_RENAME(ulist_addItemBeginList) +#define ulist_addItemEndList U_ICU_ENTRY_POINT_RENAME(ulist_addItemEndList) +#define ulist_close_keyword_values_iterator U_ICU_ENTRY_POINT_RENAME(ulist_close_keyword_values_iterator) +#define ulist_containsString U_ICU_ENTRY_POINT_RENAME(ulist_containsString) +#define ulist_count_keyword_values U_ICU_ENTRY_POINT_RENAME(ulist_count_keyword_values) +#define ulist_createEmptyList U_ICU_ENTRY_POINT_RENAME(ulist_createEmptyList) +#define ulist_deleteList U_ICU_ENTRY_POINT_RENAME(ulist_deleteList) +#define ulist_getListFromEnum U_ICU_ENTRY_POINT_RENAME(ulist_getListFromEnum) +#define ulist_getListSize U_ICU_ENTRY_POINT_RENAME(ulist_getListSize) +#define ulist_getNext U_ICU_ENTRY_POINT_RENAME(ulist_getNext) +#define ulist_next_keyword_value U_ICU_ENTRY_POINT_RENAME(ulist_next_keyword_value) +#define ulist_resetList U_ICU_ENTRY_POINT_RENAME(ulist_resetList) +#define ulist_reset_keyword_values_iterator U_ICU_ENTRY_POINT_RENAME(ulist_reset_keyword_values_iterator) +#define uloc_acceptLanguage U_ICU_ENTRY_POINT_RENAME(uloc_acceptLanguage) +#define uloc_acceptLanguageFromHTTP U_ICU_ENTRY_POINT_RENAME(uloc_acceptLanguageFromHTTP) +#define uloc_addLikelySubtags U_ICU_ENTRY_POINT_RENAME(uloc_addLikelySubtags) +#define uloc_canonicalize U_ICU_ENTRY_POINT_RENAME(uloc_canonicalize) +#define uloc_countAvailable U_ICU_ENTRY_POINT_RENAME(uloc_countAvailable) +#define uloc_forLanguageTag U_ICU_ENTRY_POINT_RENAME(uloc_forLanguageTag) +#define uloc_getAvailable U_ICU_ENTRY_POINT_RENAME(uloc_getAvailable) +#define uloc_getBaseName U_ICU_ENTRY_POINT_RENAME(uloc_getBaseName) +#define uloc_getCharacterOrientation U_ICU_ENTRY_POINT_RENAME(uloc_getCharacterOrientation) +#define uloc_getCountry U_ICU_ENTRY_POINT_RENAME(uloc_getCountry) +#define uloc_getCurrentCountryID U_ICU_ENTRY_POINT_RENAME(uloc_getCurrentCountryID) +#define uloc_getCurrentLanguageID U_ICU_ENTRY_POINT_RENAME(uloc_getCurrentLanguageID) +#define uloc_getDefault U_ICU_ENTRY_POINT_RENAME(uloc_getDefault) +#define uloc_getDisplayCountry U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayCountry) +#define uloc_getDisplayKeyword U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayKeyword) +#define uloc_getDisplayKeywordValue U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayKeywordValue) +#define uloc_getDisplayLanguage U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayLanguage) +#define uloc_getDisplayName U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayName) +#define uloc_getDisplayScript U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayScript) +#define uloc_getDisplayVariant U_ICU_ENTRY_POINT_RENAME(uloc_getDisplayVariant) +#define uloc_getISO3Country U_ICU_ENTRY_POINT_RENAME(uloc_getISO3Country) +#define uloc_getISO3Language U_ICU_ENTRY_POINT_RENAME(uloc_getISO3Language) +#define uloc_getISOCountries U_ICU_ENTRY_POINT_RENAME(uloc_getISOCountries) +#define uloc_getISOLanguages U_ICU_ENTRY_POINT_RENAME(uloc_getISOLanguages) +#define uloc_getKeywordValue U_ICU_ENTRY_POINT_RENAME(uloc_getKeywordValue) +#define uloc_getLCID U_ICU_ENTRY_POINT_RENAME(uloc_getLCID) +#define uloc_getLanguage U_ICU_ENTRY_POINT_RENAME(uloc_getLanguage) +#define uloc_getLineOrientation U_ICU_ENTRY_POINT_RENAME(uloc_getLineOrientation) +#define uloc_getLocaleForLCID U_ICU_ENTRY_POINT_RENAME(uloc_getLocaleForLCID) +#define uloc_getName U_ICU_ENTRY_POINT_RENAME(uloc_getName) +#define uloc_getParent U_ICU_ENTRY_POINT_RENAME(uloc_getParent) +#define uloc_getScript U_ICU_ENTRY_POINT_RENAME(uloc_getScript) +#define uloc_getTableStringWithFallback U_ICU_ENTRY_POINT_RENAME(uloc_getTableStringWithFallback) +#define uloc_getVariant U_ICU_ENTRY_POINT_RENAME(uloc_getVariant) +#define uloc_minimizeSubtags U_ICU_ENTRY_POINT_RENAME(uloc_minimizeSubtags) +#define uloc_openKeywordList U_ICU_ENTRY_POINT_RENAME(uloc_openKeywordList) +#define uloc_openKeywords U_ICU_ENTRY_POINT_RENAME(uloc_openKeywords) +#define uloc_setDefault U_ICU_ENTRY_POINT_RENAME(uloc_setDefault) +#define uloc_setKeywordValue U_ICU_ENTRY_POINT_RENAME(uloc_setKeywordValue) +#define uloc_toLanguageTag U_ICU_ENTRY_POINT_RENAME(uloc_toLanguageTag) +#define ulocdata_close U_ICU_ENTRY_POINT_RENAME(ulocdata_close) +#define ulocdata_getCLDRVersion U_ICU_ENTRY_POINT_RENAME(ulocdata_getCLDRVersion) +#define ulocdata_getDelimiter U_ICU_ENTRY_POINT_RENAME(ulocdata_getDelimiter) +#define ulocdata_getExemplarSet U_ICU_ENTRY_POINT_RENAME(ulocdata_getExemplarSet) +#define ulocdata_getLocaleDisplayPattern U_ICU_ENTRY_POINT_RENAME(ulocdata_getLocaleDisplayPattern) +#define ulocdata_getLocaleSeparator U_ICU_ENTRY_POINT_RENAME(ulocdata_getLocaleSeparator) +#define ulocdata_getMeasurementSystem U_ICU_ENTRY_POINT_RENAME(ulocdata_getMeasurementSystem) +#define ulocdata_getNoSubstitute U_ICU_ENTRY_POINT_RENAME(ulocdata_getNoSubstitute) +#define ulocdata_getPaperSize U_ICU_ENTRY_POINT_RENAME(ulocdata_getPaperSize) +#define ulocdata_open U_ICU_ENTRY_POINT_RENAME(ulocdata_open) +#define ulocdata_setNoSubstitute U_ICU_ENTRY_POINT_RENAME(ulocdata_setNoSubstitute) +#define ulocimp_getCountry U_ICU_ENTRY_POINT_RENAME(ulocimp_getCountry) +#define ulocimp_getLanguage U_ICU_ENTRY_POINT_RENAME(ulocimp_getLanguage) +#define ulocimp_getScript U_ICU_ENTRY_POINT_RENAME(ulocimp_getScript) +#define umsg_applyPattern U_ICU_ENTRY_POINT_RENAME(umsg_applyPattern) +#define umsg_autoQuoteApostrophe U_ICU_ENTRY_POINT_RENAME(umsg_autoQuoteApostrophe) +#define umsg_clone U_ICU_ENTRY_POINT_RENAME(umsg_clone) +#define umsg_close U_ICU_ENTRY_POINT_RENAME(umsg_close) +#define umsg_format U_ICU_ENTRY_POINT_RENAME(umsg_format) +#define umsg_getLocale U_ICU_ENTRY_POINT_RENAME(umsg_getLocale) +#define umsg_open U_ICU_ENTRY_POINT_RENAME(umsg_open) +#define umsg_parse U_ICU_ENTRY_POINT_RENAME(umsg_parse) +#define umsg_setLocale U_ICU_ENTRY_POINT_RENAME(umsg_setLocale) +#define umsg_toPattern U_ICU_ENTRY_POINT_RENAME(umsg_toPattern) +#define umsg_vformat U_ICU_ENTRY_POINT_RENAME(umsg_vformat) +#define umsg_vparse U_ICU_ENTRY_POINT_RENAME(umsg_vparse) +#define umtx_atomic_dec U_ICU_ENTRY_POINT_RENAME(umtx_atomic_dec) +#define umtx_atomic_inc U_ICU_ENTRY_POINT_RENAME(umtx_atomic_inc) +#define umtx_cleanup U_ICU_ENTRY_POINT_RENAME(umtx_cleanup) +#define umtx_destroy U_ICU_ENTRY_POINT_RENAME(umtx_destroy) +#define umtx_init U_ICU_ENTRY_POINT_RENAME(umtx_init) +#define umtx_lock U_ICU_ENTRY_POINT_RENAME(umtx_lock) +#define umtx_unlock U_ICU_ENTRY_POINT_RENAME(umtx_unlock) +#define uniset_getUnicode32Instance U_ICU_ENTRY_POINT_RENAME(uniset_getUnicode32Instance) +#define unorm2_append U_ICU_ENTRY_POINT_RENAME(unorm2_append) +#define unorm2_close U_ICU_ENTRY_POINT_RENAME(unorm2_close) +#define unorm2_getDecomposition U_ICU_ENTRY_POINT_RENAME(unorm2_getDecomposition) +#define unorm2_getInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getInstance) +#define unorm2_hasBoundaryAfter U_ICU_ENTRY_POINT_RENAME(unorm2_hasBoundaryAfter) +#define unorm2_hasBoundaryBefore U_ICU_ENTRY_POINT_RENAME(unorm2_hasBoundaryBefore) +#define unorm2_isInert U_ICU_ENTRY_POINT_RENAME(unorm2_isInert) +#define unorm2_isNormalized U_ICU_ENTRY_POINT_RENAME(unorm2_isNormalized) +#define unorm2_normalize U_ICU_ENTRY_POINT_RENAME(unorm2_normalize) +#define unorm2_normalizeSecondAndAppend U_ICU_ENTRY_POINT_RENAME(unorm2_normalizeSecondAndAppend) +#define unorm2_openFiltered U_ICU_ENTRY_POINT_RENAME(unorm2_openFiltered) +#define unorm2_quickCheck U_ICU_ENTRY_POINT_RENAME(unorm2_quickCheck) +#define unorm2_spanQuickCheckYes U_ICU_ENTRY_POINT_RENAME(unorm2_spanQuickCheckYes) +#define unorm2_swap U_ICU_ENTRY_POINT_RENAME(unorm2_swap) +#define unorm_closeIter U_ICU_ENTRY_POINT_RENAME(unorm_closeIter) +#define unorm_compare U_ICU_ENTRY_POINT_RENAME(unorm_compare) +#define unorm_concatenate U_ICU_ENTRY_POINT_RENAME(unorm_concatenate) +#define unorm_getFCDTrieIndex U_ICU_ENTRY_POINT_RENAME(unorm_getFCDTrieIndex) +#define unorm_getQuickCheck U_ICU_ENTRY_POINT_RENAME(unorm_getQuickCheck) +#define unorm_isNormalized U_ICU_ENTRY_POINT_RENAME(unorm_isNormalized) +#define unorm_isNormalizedWithOptions U_ICU_ENTRY_POINT_RENAME(unorm_isNormalizedWithOptions) +#define unorm_next U_ICU_ENTRY_POINT_RENAME(unorm_next) +#define unorm_normalize U_ICU_ENTRY_POINT_RENAME(unorm_normalize) +#define unorm_openIter U_ICU_ENTRY_POINT_RENAME(unorm_openIter) +#define unorm_previous U_ICU_ENTRY_POINT_RENAME(unorm_previous) +#define unorm_quickCheck U_ICU_ENTRY_POINT_RENAME(unorm_quickCheck) +#define unorm_quickCheckWithOptions U_ICU_ENTRY_POINT_RENAME(unorm_quickCheckWithOptions) +#define unorm_setIter U_ICU_ENTRY_POINT_RENAME(unorm_setIter) +#define unum_applyPattern U_ICU_ENTRY_POINT_RENAME(unum_applyPattern) +#define unum_clone U_ICU_ENTRY_POINT_RENAME(unum_clone) +#define unum_close U_ICU_ENTRY_POINT_RENAME(unum_close) +#define unum_countAvailable U_ICU_ENTRY_POINT_RENAME(unum_countAvailable) +#define unum_format U_ICU_ENTRY_POINT_RENAME(unum_format) +#define unum_formatDecimal U_ICU_ENTRY_POINT_RENAME(unum_formatDecimal) +#define unum_formatDouble U_ICU_ENTRY_POINT_RENAME(unum_formatDouble) +#define unum_formatDoubleCurrency U_ICU_ENTRY_POINT_RENAME(unum_formatDoubleCurrency) +#define unum_formatInt64 U_ICU_ENTRY_POINT_RENAME(unum_formatInt64) +#define unum_getAttribute U_ICU_ENTRY_POINT_RENAME(unum_getAttribute) +#define unum_getAvailable U_ICU_ENTRY_POINT_RENAME(unum_getAvailable) +#define unum_getDoubleAttribute U_ICU_ENTRY_POINT_RENAME(unum_getDoubleAttribute) +#define unum_getLocaleByType U_ICU_ENTRY_POINT_RENAME(unum_getLocaleByType) +#define unum_getSymbol U_ICU_ENTRY_POINT_RENAME(unum_getSymbol) +#define unum_getTextAttribute U_ICU_ENTRY_POINT_RENAME(unum_getTextAttribute) +#define unum_open U_ICU_ENTRY_POINT_RENAME(unum_open) +#define unum_parse U_ICU_ENTRY_POINT_RENAME(unum_parse) +#define unum_parseDecimal U_ICU_ENTRY_POINT_RENAME(unum_parseDecimal) +#define unum_parseDouble U_ICU_ENTRY_POINT_RENAME(unum_parseDouble) +#define unum_parseDoubleCurrency U_ICU_ENTRY_POINT_RENAME(unum_parseDoubleCurrency) +#define unum_parseInt64 U_ICU_ENTRY_POINT_RENAME(unum_parseInt64) +#define unum_setAttribute U_ICU_ENTRY_POINT_RENAME(unum_setAttribute) +#define unum_setDoubleAttribute U_ICU_ENTRY_POINT_RENAME(unum_setDoubleAttribute) +#define unum_setSymbol U_ICU_ENTRY_POINT_RENAME(unum_setSymbol) +#define unum_setTextAttribute U_ICU_ENTRY_POINT_RENAME(unum_setTextAttribute) +#define unum_toPattern U_ICU_ENTRY_POINT_RENAME(unum_toPattern) +#define uplrules_close U_ICU_ENTRY_POINT_RENAME(uplrules_close) +#define uplrules_open U_ICU_ENTRY_POINT_RENAME(uplrules_open) +#define uplrules_select U_ICU_ENTRY_POINT_RENAME(uplrules_select) +#define uplug_closeLibrary U_ICU_ENTRY_POINT_RENAME(uplug_closeLibrary) +#define uplug_findLibrary U_ICU_ENTRY_POINT_RENAME(uplug_findLibrary) +#define uplug_getConfiguration U_ICU_ENTRY_POINT_RENAME(uplug_getConfiguration) +#define uplug_getContext U_ICU_ENTRY_POINT_RENAME(uplug_getContext) +#define uplug_getCurrentLevel U_ICU_ENTRY_POINT_RENAME(uplug_getCurrentLevel) +#define uplug_getLibrary U_ICU_ENTRY_POINT_RENAME(uplug_getLibrary) +#define uplug_getLibraryName U_ICU_ENTRY_POINT_RENAME(uplug_getLibraryName) +#define uplug_getPlugInternal U_ICU_ENTRY_POINT_RENAME(uplug_getPlugInternal) +#define uplug_getPlugLevel U_ICU_ENTRY_POINT_RENAME(uplug_getPlugLevel) +#define uplug_getPlugLoadStatus U_ICU_ENTRY_POINT_RENAME(uplug_getPlugLoadStatus) +#define uplug_getPlugName U_ICU_ENTRY_POINT_RENAME(uplug_getPlugName) +#define uplug_getPluginFile U_ICU_ENTRY_POINT_RENAME(uplug_getPluginFile) +#define uplug_getSymbolName U_ICU_ENTRY_POINT_RENAME(uplug_getSymbolName) +#define uplug_init U_ICU_ENTRY_POINT_RENAME(uplug_init) +#define uplug_loadPlugFromEntrypoint U_ICU_ENTRY_POINT_RENAME(uplug_loadPlugFromEntrypoint) +#define uplug_loadPlugFromLibrary U_ICU_ENTRY_POINT_RENAME(uplug_loadPlugFromLibrary) +#define uplug_nextPlug U_ICU_ENTRY_POINT_RENAME(uplug_nextPlug) +#define uplug_openLibrary U_ICU_ENTRY_POINT_RENAME(uplug_openLibrary) +#define uplug_removePlug U_ICU_ENTRY_POINT_RENAME(uplug_removePlug) +#define uplug_setContext U_ICU_ENTRY_POINT_RENAME(uplug_setContext) +#define uplug_setPlugLevel U_ICU_ENTRY_POINT_RENAME(uplug_setPlugLevel) +#define uplug_setPlugName U_ICU_ENTRY_POINT_RENAME(uplug_setPlugName) +#define uplug_setPlugNoUnload U_ICU_ENTRY_POINT_RENAME(uplug_setPlugNoUnload) +#define uprops_getSource U_ICU_ENTRY_POINT_RENAME(uprops_getSource) +#define upropsvec_addPropertyStarts U_ICU_ENTRY_POINT_RENAME(upropsvec_addPropertyStarts) +#define uprv_aestrncpy U_ICU_ENTRY_POINT_RENAME(uprv_aestrncpy) +#define uprv_asciiFromEbcdic U_ICU_ENTRY_POINT_RENAME(uprv_asciiFromEbcdic) +#define uprv_asciitolower U_ICU_ENTRY_POINT_RENAME(uprv_asciitolower) +#define uprv_ceil U_ICU_ENTRY_POINT_RENAME(uprv_ceil) +#define uprv_cnttab_addContraction U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_addContraction) +#define uprv_cnttab_changeContraction U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_changeContraction) +#define uprv_cnttab_changeLastCE U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_changeLastCE) +#define uprv_cnttab_clone U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_clone) +#define uprv_cnttab_close U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_close) +#define uprv_cnttab_constructTable U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_constructTable) +#define uprv_cnttab_findCE U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_findCE) +#define uprv_cnttab_findCP U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_findCP) +#define uprv_cnttab_getCE U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_getCE) +#define uprv_cnttab_insertContraction U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_insertContraction) +#define uprv_cnttab_isTailored U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_isTailored) +#define uprv_cnttab_open U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_open) +#define uprv_cnttab_setContraction U_ICU_ENTRY_POINT_RENAME(uprv_cnttab_setContraction) +#define uprv_collIterateAtEnd U_ICU_ENTRY_POINT_RENAME(uprv_collIterateAtEnd) +#define uprv_compareASCIIPropertyNames U_ICU_ENTRY_POINT_RENAME(uprv_compareASCIIPropertyNames) +#define uprv_compareEBCDICPropertyNames U_ICU_ENTRY_POINT_RENAME(uprv_compareEBCDICPropertyNames) +#define uprv_compareInvAscii U_ICU_ENTRY_POINT_RENAME(uprv_compareInvAscii) +#define uprv_compareInvEbcdic U_ICU_ENTRY_POINT_RENAME(uprv_compareInvEbcdic) +#define uprv_compareInvEbcdicAsAscii U_ICU_ENTRY_POINT_RENAME(uprv_compareInvEbcdicAsAscii) +#define uprv_convertToLCID U_ICU_ENTRY_POINT_RENAME(uprv_convertToLCID) +#define uprv_convertToPosix U_ICU_ENTRY_POINT_RENAME(uprv_convertToPosix) +#define uprv_copyAscii U_ICU_ENTRY_POINT_RENAME(uprv_copyAscii) +#define uprv_copyEbcdic U_ICU_ENTRY_POINT_RENAME(uprv_copyEbcdic) +#define uprv_decContextClearStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextClearStatus) +#define uprv_decContextDefault U_ICU_ENTRY_POINT_RENAME(uprv_decContextDefault) +#define uprv_decContextGetRounding U_ICU_ENTRY_POINT_RENAME(uprv_decContextGetRounding) +#define uprv_decContextGetStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextGetStatus) +#define uprv_decContextRestoreStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextRestoreStatus) +#define uprv_decContextSaveStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextSaveStatus) +#define uprv_decContextSetRounding U_ICU_ENTRY_POINT_RENAME(uprv_decContextSetRounding) +#define uprv_decContextSetStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextSetStatus) +#define uprv_decContextSetStatusFromString U_ICU_ENTRY_POINT_RENAME(uprv_decContextSetStatusFromString) +#define uprv_decContextSetStatusFromStringQuiet U_ICU_ENTRY_POINT_RENAME(uprv_decContextSetStatusFromStringQuiet) +#define uprv_decContextSetStatusQuiet U_ICU_ENTRY_POINT_RENAME(uprv_decContextSetStatusQuiet) +#define uprv_decContextStatusToString U_ICU_ENTRY_POINT_RENAME(uprv_decContextStatusToString) +#define uprv_decContextTestEndian U_ICU_ENTRY_POINT_RENAME(uprv_decContextTestEndian) +#define uprv_decContextTestSavedStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextTestSavedStatus) +#define uprv_decContextTestStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextTestStatus) +#define uprv_decContextZeroStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextZeroStatus) +#define uprv_decNumberAbs U_ICU_ENTRY_POINT_RENAME(uprv_decNumberAbs) +#define uprv_decNumberAdd U_ICU_ENTRY_POINT_RENAME(uprv_decNumberAdd) +#define uprv_decNumberAnd U_ICU_ENTRY_POINT_RENAME(uprv_decNumberAnd) +#define uprv_decNumberClass U_ICU_ENTRY_POINT_RENAME(uprv_decNumberClass) +#define uprv_decNumberClassToString U_ICU_ENTRY_POINT_RENAME(uprv_decNumberClassToString) +#define uprv_decNumberCompare U_ICU_ENTRY_POINT_RENAME(uprv_decNumberCompare) +#define uprv_decNumberCompareSignal U_ICU_ENTRY_POINT_RENAME(uprv_decNumberCompareSignal) +#define uprv_decNumberCompareTotal U_ICU_ENTRY_POINT_RENAME(uprv_decNumberCompareTotal) +#define uprv_decNumberCompareTotalMag U_ICU_ENTRY_POINT_RENAME(uprv_decNumberCompareTotalMag) +#define uprv_decNumberCopy U_ICU_ENTRY_POINT_RENAME(uprv_decNumberCopy) +#define uprv_decNumberCopyAbs U_ICU_ENTRY_POINT_RENAME(uprv_decNumberCopyAbs) +#define uprv_decNumberCopyNegate U_ICU_ENTRY_POINT_RENAME(uprv_decNumberCopyNegate) +#define uprv_decNumberCopySign U_ICU_ENTRY_POINT_RENAME(uprv_decNumberCopySign) +#define uprv_decNumberDivide U_ICU_ENTRY_POINT_RENAME(uprv_decNumberDivide) +#define uprv_decNumberDivideInteger U_ICU_ENTRY_POINT_RENAME(uprv_decNumberDivideInteger) +#define uprv_decNumberExp U_ICU_ENTRY_POINT_RENAME(uprv_decNumberExp) +#define uprv_decNumberFMA U_ICU_ENTRY_POINT_RENAME(uprv_decNumberFMA) +#define uprv_decNumberFromInt32 U_ICU_ENTRY_POINT_RENAME(uprv_decNumberFromInt32) +#define uprv_decNumberFromString U_ICU_ENTRY_POINT_RENAME(uprv_decNumberFromString) +#define uprv_decNumberFromUInt32 U_ICU_ENTRY_POINT_RENAME(uprv_decNumberFromUInt32) +#define uprv_decNumberGetBCD U_ICU_ENTRY_POINT_RENAME(uprv_decNumberGetBCD) +#define uprv_decNumberInvert U_ICU_ENTRY_POINT_RENAME(uprv_decNumberInvert) +#define uprv_decNumberIsNormal U_ICU_ENTRY_POINT_RENAME(uprv_decNumberIsNormal) +#define uprv_decNumberIsSubnormal U_ICU_ENTRY_POINT_RENAME(uprv_decNumberIsSubnormal) +#define uprv_decNumberLn U_ICU_ENTRY_POINT_RENAME(uprv_decNumberLn) +#define uprv_decNumberLog10 U_ICU_ENTRY_POINT_RENAME(uprv_decNumberLog10) +#define uprv_decNumberLogB U_ICU_ENTRY_POINT_RENAME(uprv_decNumberLogB) +#define uprv_decNumberMax U_ICU_ENTRY_POINT_RENAME(uprv_decNumberMax) +#define uprv_decNumberMaxMag U_ICU_ENTRY_POINT_RENAME(uprv_decNumberMaxMag) +#define uprv_decNumberMin U_ICU_ENTRY_POINT_RENAME(uprv_decNumberMin) +#define uprv_decNumberMinMag U_ICU_ENTRY_POINT_RENAME(uprv_decNumberMinMag) +#define uprv_decNumberMinus U_ICU_ENTRY_POINT_RENAME(uprv_decNumberMinus) +#define uprv_decNumberMultiply U_ICU_ENTRY_POINT_RENAME(uprv_decNumberMultiply) +#define uprv_decNumberNextMinus U_ICU_ENTRY_POINT_RENAME(uprv_decNumberNextMinus) +#define uprv_decNumberNextPlus U_ICU_ENTRY_POINT_RENAME(uprv_decNumberNextPlus) +#define uprv_decNumberNextToward U_ICU_ENTRY_POINT_RENAME(uprv_decNumberNextToward) +#define uprv_decNumberNormalize U_ICU_ENTRY_POINT_RENAME(uprv_decNumberNormalize) +#define uprv_decNumberOr U_ICU_ENTRY_POINT_RENAME(uprv_decNumberOr) +#define uprv_decNumberPlus U_ICU_ENTRY_POINT_RENAME(uprv_decNumberPlus) +#define uprv_decNumberPower U_ICU_ENTRY_POINT_RENAME(uprv_decNumberPower) +#define uprv_decNumberQuantize U_ICU_ENTRY_POINT_RENAME(uprv_decNumberQuantize) +#define uprv_decNumberReduce U_ICU_ENTRY_POINT_RENAME(uprv_decNumberReduce) +#define uprv_decNumberRemainder U_ICU_ENTRY_POINT_RENAME(uprv_decNumberRemainder) +#define uprv_decNumberRemainderNear U_ICU_ENTRY_POINT_RENAME(uprv_decNumberRemainderNear) +#define uprv_decNumberRescale U_ICU_ENTRY_POINT_RENAME(uprv_decNumberRescale) +#define uprv_decNumberRotate U_ICU_ENTRY_POINT_RENAME(uprv_decNumberRotate) +#define uprv_decNumberSameQuantum U_ICU_ENTRY_POINT_RENAME(uprv_decNumberSameQuantum) +#define uprv_decNumberScaleB U_ICU_ENTRY_POINT_RENAME(uprv_decNumberScaleB) +#define uprv_decNumberSetBCD U_ICU_ENTRY_POINT_RENAME(uprv_decNumberSetBCD) +#define uprv_decNumberShift U_ICU_ENTRY_POINT_RENAME(uprv_decNumberShift) +#define uprv_decNumberSquareRoot U_ICU_ENTRY_POINT_RENAME(uprv_decNumberSquareRoot) +#define uprv_decNumberSubtract U_ICU_ENTRY_POINT_RENAME(uprv_decNumberSubtract) +#define uprv_decNumberToEngString U_ICU_ENTRY_POINT_RENAME(uprv_decNumberToEngString) +#define uprv_decNumberToInt32 U_ICU_ENTRY_POINT_RENAME(uprv_decNumberToInt32) +#define uprv_decNumberToIntegralExact U_ICU_ENTRY_POINT_RENAME(uprv_decNumberToIntegralExact) +#define uprv_decNumberToIntegralValue U_ICU_ENTRY_POINT_RENAME(uprv_decNumberToIntegralValue) +#define uprv_decNumberToString U_ICU_ENTRY_POINT_RENAME(uprv_decNumberToString) +#define uprv_decNumberToUInt32 U_ICU_ENTRY_POINT_RENAME(uprv_decNumberToUInt32) +#define uprv_decNumberTrim U_ICU_ENTRY_POINT_RENAME(uprv_decNumberTrim) +#define uprv_decNumberVersion U_ICU_ENTRY_POINT_RENAME(uprv_decNumberVersion) +#define uprv_decNumberXor U_ICU_ENTRY_POINT_RENAME(uprv_decNumberXor) +#define uprv_decNumberZero U_ICU_ENTRY_POINT_RENAME(uprv_decNumberZero) +#define uprv_delete_collIterate U_ICU_ENTRY_POINT_RENAME(uprv_delete_collIterate) +#define uprv_dl_close U_ICU_ENTRY_POINT_RENAME(uprv_dl_close) +#define uprv_dl_open U_ICU_ENTRY_POINT_RENAME(uprv_dl_open) +#define uprv_dlsym_func U_ICU_ENTRY_POINT_RENAME(uprv_dlsym_func) +#define uprv_eastrncpy U_ICU_ENTRY_POINT_RENAME(uprv_eastrncpy) +#define uprv_ebcdicFromAscii U_ICU_ENTRY_POINT_RENAME(uprv_ebcdicFromAscii) +#define uprv_ebcdicToLowercaseAscii U_ICU_ENTRY_POINT_RENAME(uprv_ebcdicToLowercaseAscii) +#define uprv_ebcdictolower U_ICU_ENTRY_POINT_RENAME(uprv_ebcdictolower) +#define uprv_fabs U_ICU_ENTRY_POINT_RENAME(uprv_fabs) +#define uprv_floor U_ICU_ENTRY_POINT_RENAME(uprv_floor) +#define uprv_fmax U_ICU_ENTRY_POINT_RENAME(uprv_fmax) +#define uprv_fmin U_ICU_ENTRY_POINT_RENAME(uprv_fmin) +#define uprv_fmod U_ICU_ENTRY_POINT_RENAME(uprv_fmod) +#define uprv_free U_ICU_ENTRY_POINT_RENAME(uprv_free) +#define uprv_getCharNameCharacters U_ICU_ENTRY_POINT_RENAME(uprv_getCharNameCharacters) +#define uprv_getDefaultCodepage U_ICU_ENTRY_POINT_RENAME(uprv_getDefaultCodepage) +#define uprv_getDefaultLocaleID U_ICU_ENTRY_POINT_RENAME(uprv_getDefaultLocaleID) +#define uprv_getInfinity U_ICU_ENTRY_POINT_RENAME(uprv_getInfinity) +#define uprv_getMaxCharNameLength U_ICU_ENTRY_POINT_RENAME(uprv_getMaxCharNameLength) +#define uprv_getMaxValues U_ICU_ENTRY_POINT_RENAME(uprv_getMaxValues) +#define uprv_getNaN U_ICU_ENTRY_POINT_RENAME(uprv_getNaN) +#define uprv_getRawUTCtime U_ICU_ENTRY_POINT_RENAME(uprv_getRawUTCtime) +#define uprv_getStaticCurrencyName U_ICU_ENTRY_POINT_RENAME(uprv_getStaticCurrencyName) +#define uprv_getUTCtime U_ICU_ENTRY_POINT_RENAME(uprv_getUTCtime) +#define uprv_haveProperties U_ICU_ENTRY_POINT_RENAME(uprv_haveProperties) +#define uprv_init_collIterate U_ICU_ENTRY_POINT_RENAME(uprv_init_collIterate) +#define uprv_init_pce U_ICU_ENTRY_POINT_RENAME(uprv_init_pce) +#define uprv_int32Comparator U_ICU_ENTRY_POINT_RENAME(uprv_int32Comparator) +#define uprv_isInfinite U_ICU_ENTRY_POINT_RENAME(uprv_isInfinite) +#define uprv_isInvariantString U_ICU_ENTRY_POINT_RENAME(uprv_isInvariantString) +#define uprv_isInvariantUString U_ICU_ENTRY_POINT_RENAME(uprv_isInvariantUString) +#define uprv_isNaN U_ICU_ENTRY_POINT_RENAME(uprv_isNaN) +#define uprv_isNegativeInfinity U_ICU_ENTRY_POINT_RENAME(uprv_isNegativeInfinity) +#define uprv_isPositiveInfinity U_ICU_ENTRY_POINT_RENAME(uprv_isPositiveInfinity) +#define uprv_itou U_ICU_ENTRY_POINT_RENAME(uprv_itou) +#define uprv_log U_ICU_ENTRY_POINT_RENAME(uprv_log) +#define uprv_malloc U_ICU_ENTRY_POINT_RENAME(uprv_malloc) +#define uprv_mapFile U_ICU_ENTRY_POINT_RENAME(uprv_mapFile) +#define uprv_max U_ICU_ENTRY_POINT_RENAME(uprv_max) +#define uprv_maxMantissa U_ICU_ENTRY_POINT_RENAME(uprv_maxMantissa) +#define uprv_maximumPtr U_ICU_ENTRY_POINT_RENAME(uprv_maximumPtr) +#define uprv_min U_ICU_ENTRY_POINT_RENAME(uprv_min) +#define uprv_modf U_ICU_ENTRY_POINT_RENAME(uprv_modf) +#define uprv_new_collIterate U_ICU_ENTRY_POINT_RENAME(uprv_new_collIterate) +#define uprv_openPatternWhiteSpaceSet U_ICU_ENTRY_POINT_RENAME(uprv_openPatternWhiteSpaceSet) +#define uprv_parseCurrency U_ICU_ENTRY_POINT_RENAME(uprv_parseCurrency) +#define uprv_pathIsAbsolute U_ICU_ENTRY_POINT_RENAME(uprv_pathIsAbsolute) +#define uprv_pow U_ICU_ENTRY_POINT_RENAME(uprv_pow) +#define uprv_pow10 U_ICU_ENTRY_POINT_RENAME(uprv_pow10) +#define uprv_realloc U_ICU_ENTRY_POINT_RENAME(uprv_realloc) +#define uprv_round U_ICU_ENTRY_POINT_RENAME(uprv_round) +#define uprv_sortArray U_ICU_ENTRY_POINT_RENAME(uprv_sortArray) +#define uprv_strCompare U_ICU_ENTRY_POINT_RENAME(uprv_strCompare) +#define uprv_strdup U_ICU_ENTRY_POINT_RENAME(uprv_strdup) +#define uprv_strndup U_ICU_ENTRY_POINT_RENAME(uprv_strndup) +#define uprv_syntaxError U_ICU_ENTRY_POINT_RENAME(uprv_syntaxError) +#define uprv_timezone U_ICU_ENTRY_POINT_RENAME(uprv_timezone) +#define uprv_toupper U_ICU_ENTRY_POINT_RENAME(uprv_toupper) +#define uprv_trunc U_ICU_ENTRY_POINT_RENAME(uprv_trunc) +#define uprv_tzname U_ICU_ENTRY_POINT_RENAME(uprv_tzname) +#define uprv_tzset U_ICU_ENTRY_POINT_RENAME(uprv_tzset) +#define uprv_uca_addAnElement U_ICU_ENTRY_POINT_RENAME(uprv_uca_addAnElement) +#define uprv_uca_assembleTable U_ICU_ENTRY_POINT_RENAME(uprv_uca_assembleTable) +#define uprv_uca_canonicalClosure U_ICU_ENTRY_POINT_RENAME(uprv_uca_canonicalClosure) +#define uprv_uca_closeTempTable U_ICU_ENTRY_POINT_RENAME(uprv_uca_closeTempTable) +#define uprv_uca_getCodePointFromRaw U_ICU_ENTRY_POINT_RENAME(uprv_uca_getCodePointFromRaw) +#define uprv_uca_getImplicitFromRaw U_ICU_ENTRY_POINT_RENAME(uprv_uca_getImplicitFromRaw) +#define uprv_uca_getRawFromCodePoint U_ICU_ENTRY_POINT_RENAME(uprv_uca_getRawFromCodePoint) +#define uprv_uca_getRawFromImplicit U_ICU_ENTRY_POINT_RENAME(uprv_uca_getRawFromImplicit) +#define uprv_uca_initImplicitConstants U_ICU_ENTRY_POINT_RENAME(uprv_uca_initImplicitConstants) +#define uprv_uca_initTempTable U_ICU_ENTRY_POINT_RENAME(uprv_uca_initTempTable) +#define uprv_uint16Comparator U_ICU_ENTRY_POINT_RENAME(uprv_uint16Comparator) +#define uprv_uint32Comparator U_ICU_ENTRY_POINT_RENAME(uprv_uint32Comparator) +#define uprv_unmapFile U_ICU_ENTRY_POINT_RENAME(uprv_unmapFile) +#define upvec_cloneArray U_ICU_ENTRY_POINT_RENAME(upvec_cloneArray) +#define upvec_close U_ICU_ENTRY_POINT_RENAME(upvec_close) +#define upvec_compact U_ICU_ENTRY_POINT_RENAME(upvec_compact) +#define upvec_compactToUTrie2Handler U_ICU_ENTRY_POINT_RENAME(upvec_compactToUTrie2Handler) +#define upvec_compactToUTrie2WithRowIndexes U_ICU_ENTRY_POINT_RENAME(upvec_compactToUTrie2WithRowIndexes) +#define upvec_getArray U_ICU_ENTRY_POINT_RENAME(upvec_getArray) +#define upvec_getRow U_ICU_ENTRY_POINT_RENAME(upvec_getRow) +#define upvec_getValue U_ICU_ENTRY_POINT_RENAME(upvec_getValue) +#define upvec_open U_ICU_ENTRY_POINT_RENAME(upvec_open) +#define upvec_setValue U_ICU_ENTRY_POINT_RENAME(upvec_setValue) +#define uregex_appendReplacement U_ICU_ENTRY_POINT_RENAME(uregex_appendReplacement) +#define uregex_appendReplacementUText U_ICU_ENTRY_POINT_RENAME(uregex_appendReplacementUText) +#define uregex_appendTail U_ICU_ENTRY_POINT_RENAME(uregex_appendTail) +#define uregex_appendTailUText U_ICU_ENTRY_POINT_RENAME(uregex_appendTailUText) +#define uregex_clone U_ICU_ENTRY_POINT_RENAME(uregex_clone) +#define uregex_close U_ICU_ENTRY_POINT_RENAME(uregex_close) +#define uregex_end U_ICU_ENTRY_POINT_RENAME(uregex_end) +#define uregex_end64 U_ICU_ENTRY_POINT_RENAME(uregex_end64) +#define uregex_find U_ICU_ENTRY_POINT_RENAME(uregex_find) +#define uregex_find64 U_ICU_ENTRY_POINT_RENAME(uregex_find64) +#define uregex_findNext U_ICU_ENTRY_POINT_RENAME(uregex_findNext) +#define uregex_flags U_ICU_ENTRY_POINT_RENAME(uregex_flags) +#define uregex_getFindProgressCallback U_ICU_ENTRY_POINT_RENAME(uregex_getFindProgressCallback) +#define uregex_getMatchCallback U_ICU_ENTRY_POINT_RENAME(uregex_getMatchCallback) +#define uregex_getStackLimit U_ICU_ENTRY_POINT_RENAME(uregex_getStackLimit) +#define uregex_getText U_ICU_ENTRY_POINT_RENAME(uregex_getText) +#define uregex_getTimeLimit U_ICU_ENTRY_POINT_RENAME(uregex_getTimeLimit) +#define uregex_getUText U_ICU_ENTRY_POINT_RENAME(uregex_getUText) +#define uregex_group U_ICU_ENTRY_POINT_RENAME(uregex_group) +#define uregex_groupCount U_ICU_ENTRY_POINT_RENAME(uregex_groupCount) +#define uregex_groupUText U_ICU_ENTRY_POINT_RENAME(uregex_groupUText) +#define uregex_groupUTextDeep U_ICU_ENTRY_POINT_RENAME(uregex_groupUTextDeep) +#define uregex_hasAnchoringBounds U_ICU_ENTRY_POINT_RENAME(uregex_hasAnchoringBounds) +#define uregex_hasTransparentBounds U_ICU_ENTRY_POINT_RENAME(uregex_hasTransparentBounds) +#define uregex_hitEnd U_ICU_ENTRY_POINT_RENAME(uregex_hitEnd) +#define uregex_lookingAt U_ICU_ENTRY_POINT_RENAME(uregex_lookingAt) +#define uregex_lookingAt64 U_ICU_ENTRY_POINT_RENAME(uregex_lookingAt64) +#define uregex_matches U_ICU_ENTRY_POINT_RENAME(uregex_matches) +#define uregex_matches64 U_ICU_ENTRY_POINT_RENAME(uregex_matches64) +#define uregex_open U_ICU_ENTRY_POINT_RENAME(uregex_open) +#define uregex_openC U_ICU_ENTRY_POINT_RENAME(uregex_openC) +#define uregex_openUText U_ICU_ENTRY_POINT_RENAME(uregex_openUText) +#define uregex_pattern U_ICU_ENTRY_POINT_RENAME(uregex_pattern) +#define uregex_patternUText U_ICU_ENTRY_POINT_RENAME(uregex_patternUText) +#define uregex_refreshUText U_ICU_ENTRY_POINT_RENAME(uregex_refreshUText) +#define uregex_regionEnd U_ICU_ENTRY_POINT_RENAME(uregex_regionEnd) +#define uregex_regionEnd64 U_ICU_ENTRY_POINT_RENAME(uregex_regionEnd64) +#define uregex_regionStart U_ICU_ENTRY_POINT_RENAME(uregex_regionStart) +#define uregex_regionStart64 U_ICU_ENTRY_POINT_RENAME(uregex_regionStart64) +#define uregex_replaceAll U_ICU_ENTRY_POINT_RENAME(uregex_replaceAll) +#define uregex_replaceAllUText U_ICU_ENTRY_POINT_RENAME(uregex_replaceAllUText) +#define uregex_replaceFirst U_ICU_ENTRY_POINT_RENAME(uregex_replaceFirst) +#define uregex_replaceFirstUText U_ICU_ENTRY_POINT_RENAME(uregex_replaceFirstUText) +#define uregex_requireEnd U_ICU_ENTRY_POINT_RENAME(uregex_requireEnd) +#define uregex_reset U_ICU_ENTRY_POINT_RENAME(uregex_reset) +#define uregex_reset64 U_ICU_ENTRY_POINT_RENAME(uregex_reset64) +#define uregex_setFindProgressCallback U_ICU_ENTRY_POINT_RENAME(uregex_setFindProgressCallback) +#define uregex_setMatchCallback U_ICU_ENTRY_POINT_RENAME(uregex_setMatchCallback) +#define uregex_setRegion U_ICU_ENTRY_POINT_RENAME(uregex_setRegion) +#define uregex_setRegion64 U_ICU_ENTRY_POINT_RENAME(uregex_setRegion64) +#define uregex_setRegionAndStart U_ICU_ENTRY_POINT_RENAME(uregex_setRegionAndStart) +#define uregex_setStackLimit U_ICU_ENTRY_POINT_RENAME(uregex_setStackLimit) +#define uregex_setText U_ICU_ENTRY_POINT_RENAME(uregex_setText) +#define uregex_setTimeLimit U_ICU_ENTRY_POINT_RENAME(uregex_setTimeLimit) +#define uregex_setUText U_ICU_ENTRY_POINT_RENAME(uregex_setUText) +#define uregex_split U_ICU_ENTRY_POINT_RENAME(uregex_split) +#define uregex_splitUText U_ICU_ENTRY_POINT_RENAME(uregex_splitUText) +#define uregex_start U_ICU_ENTRY_POINT_RENAME(uregex_start) +#define uregex_start64 U_ICU_ENTRY_POINT_RENAME(uregex_start64) +#define uregex_ucstr_unescape_charAt U_ICU_ENTRY_POINT_RENAME(uregex_ucstr_unescape_charAt) +#define uregex_useAnchoringBounds U_ICU_ENTRY_POINT_RENAME(uregex_useAnchoringBounds) +#define uregex_useTransparentBounds U_ICU_ENTRY_POINT_RENAME(uregex_useTransparentBounds) +#define uregex_utext_unescape_charAt U_ICU_ENTRY_POINT_RENAME(uregex_utext_unescape_charAt) +#define ures_close U_ICU_ENTRY_POINT_RENAME(ures_close) +#define ures_copyResb U_ICU_ENTRY_POINT_RENAME(ures_copyResb) +#define ures_countArrayItems U_ICU_ENTRY_POINT_RENAME(ures_countArrayItems) +#define ures_findResource U_ICU_ENTRY_POINT_RENAME(ures_findResource) +#define ures_findSubResource U_ICU_ENTRY_POINT_RENAME(ures_findSubResource) +#define ures_getBinary U_ICU_ENTRY_POINT_RENAME(ures_getBinary) +#define ures_getByIndex U_ICU_ENTRY_POINT_RENAME(ures_getByIndex) +#define ures_getByKey U_ICU_ENTRY_POINT_RENAME(ures_getByKey) +#define ures_getByKeyWithFallback U_ICU_ENTRY_POINT_RENAME(ures_getByKeyWithFallback) +#define ures_getFunctionalEquivalent U_ICU_ENTRY_POINT_RENAME(ures_getFunctionalEquivalent) +#define ures_getInt U_ICU_ENTRY_POINT_RENAME(ures_getInt) +#define ures_getIntVector U_ICU_ENTRY_POINT_RENAME(ures_getIntVector) +#define ures_getKey U_ICU_ENTRY_POINT_RENAME(ures_getKey) +#define ures_getKeywordValues U_ICU_ENTRY_POINT_RENAME(ures_getKeywordValues) +#define ures_getLocale U_ICU_ENTRY_POINT_RENAME(ures_getLocale) +#define ures_getLocaleByType U_ICU_ENTRY_POINT_RENAME(ures_getLocaleByType) +#define ures_getLocaleInternal U_ICU_ENTRY_POINT_RENAME(ures_getLocaleInternal) +#define ures_getName U_ICU_ENTRY_POINT_RENAME(ures_getName) +#define ures_getNextResource U_ICU_ENTRY_POINT_RENAME(ures_getNextResource) +#define ures_getNextString U_ICU_ENTRY_POINT_RENAME(ures_getNextString) +#define ures_getSize U_ICU_ENTRY_POINT_RENAME(ures_getSize) +#define ures_getString U_ICU_ENTRY_POINT_RENAME(ures_getString) +#define ures_getStringByIndex U_ICU_ENTRY_POINT_RENAME(ures_getStringByIndex) +#define ures_getStringByKey U_ICU_ENTRY_POINT_RENAME(ures_getStringByKey) +#define ures_getStringByKeyWithFallback U_ICU_ENTRY_POINT_RENAME(ures_getStringByKeyWithFallback) +#define ures_getType U_ICU_ENTRY_POINT_RENAME(ures_getType) +#define ures_getUInt U_ICU_ENTRY_POINT_RENAME(ures_getUInt) +#define ures_getUTF8String U_ICU_ENTRY_POINT_RENAME(ures_getUTF8String) +#define ures_getUTF8StringByIndex U_ICU_ENTRY_POINT_RENAME(ures_getUTF8StringByIndex) +#define ures_getUTF8StringByKey U_ICU_ENTRY_POINT_RENAME(ures_getUTF8StringByKey) +#define ures_getVersion U_ICU_ENTRY_POINT_RENAME(ures_getVersion) +#define ures_getVersionByKey U_ICU_ENTRY_POINT_RENAME(ures_getVersionByKey) +#define ures_getVersionNumber U_ICU_ENTRY_POINT_RENAME(ures_getVersionNumber) +#define ures_getVersionNumberInternal U_ICU_ENTRY_POINT_RENAME(ures_getVersionNumberInternal) +#define ures_hasNext U_ICU_ENTRY_POINT_RENAME(ures_hasNext) +#define ures_initStackObject U_ICU_ENTRY_POINT_RENAME(ures_initStackObject) +#define ures_open U_ICU_ENTRY_POINT_RENAME(ures_open) +#define ures_openAvailableLocales U_ICU_ENTRY_POINT_RENAME(ures_openAvailableLocales) +#define ures_openDirect U_ICU_ENTRY_POINT_RENAME(ures_openDirect) +#define ures_openFillIn U_ICU_ENTRY_POINT_RENAME(ures_openFillIn) +#define ures_openU U_ICU_ENTRY_POINT_RENAME(ures_openU) +#define ures_resetIterator U_ICU_ENTRY_POINT_RENAME(ures_resetIterator) +#define ures_swap U_ICU_ENTRY_POINT_RENAME(ures_swap) +#define uscript_closeRun U_ICU_ENTRY_POINT_RENAME(uscript_closeRun) +#define uscript_getCode U_ICU_ENTRY_POINT_RENAME(uscript_getCode) +#define uscript_getName U_ICU_ENTRY_POINT_RENAME(uscript_getName) +#define uscript_getScript U_ICU_ENTRY_POINT_RENAME(uscript_getScript) +#define uscript_getScriptExtensions U_ICU_ENTRY_POINT_RENAME(uscript_getScriptExtensions) +#define uscript_getShortName U_ICU_ENTRY_POINT_RENAME(uscript_getShortName) +#define uscript_hasScript U_ICU_ENTRY_POINT_RENAME(uscript_hasScript) +#define uscript_nextRun U_ICU_ENTRY_POINT_RENAME(uscript_nextRun) +#define uscript_openRun U_ICU_ENTRY_POINT_RENAME(uscript_openRun) +#define uscript_resetRun U_ICU_ENTRY_POINT_RENAME(uscript_resetRun) +#define uscript_setRunText U_ICU_ENTRY_POINT_RENAME(uscript_setRunText) +#define usearch_close U_ICU_ENTRY_POINT_RENAME(usearch_close) +#define usearch_first U_ICU_ENTRY_POINT_RENAME(usearch_first) +#define usearch_following U_ICU_ENTRY_POINT_RENAME(usearch_following) +#define usearch_getAttribute U_ICU_ENTRY_POINT_RENAME(usearch_getAttribute) +#define usearch_getBreakIterator U_ICU_ENTRY_POINT_RENAME(usearch_getBreakIterator) +#define usearch_getCollator U_ICU_ENTRY_POINT_RENAME(usearch_getCollator) +#define usearch_getMatchedLength U_ICU_ENTRY_POINT_RENAME(usearch_getMatchedLength) +#define usearch_getMatchedStart U_ICU_ENTRY_POINT_RENAME(usearch_getMatchedStart) +#define usearch_getMatchedText U_ICU_ENTRY_POINT_RENAME(usearch_getMatchedText) +#define usearch_getOffset U_ICU_ENTRY_POINT_RENAME(usearch_getOffset) +#define usearch_getPattern U_ICU_ENTRY_POINT_RENAME(usearch_getPattern) +#define usearch_getText U_ICU_ENTRY_POINT_RENAME(usearch_getText) +#define usearch_handleNextCanonical U_ICU_ENTRY_POINT_RENAME(usearch_handleNextCanonical) +#define usearch_handleNextExact U_ICU_ENTRY_POINT_RENAME(usearch_handleNextExact) +#define usearch_handlePreviousCanonical U_ICU_ENTRY_POINT_RENAME(usearch_handlePreviousCanonical) +#define usearch_handlePreviousExact U_ICU_ENTRY_POINT_RENAME(usearch_handlePreviousExact) +#define usearch_last U_ICU_ENTRY_POINT_RENAME(usearch_last) +#define usearch_next U_ICU_ENTRY_POINT_RENAME(usearch_next) +#define usearch_open U_ICU_ENTRY_POINT_RENAME(usearch_open) +#define usearch_openFromCollator U_ICU_ENTRY_POINT_RENAME(usearch_openFromCollator) +#define usearch_preceding U_ICU_ENTRY_POINT_RENAME(usearch_preceding) +#define usearch_previous U_ICU_ENTRY_POINT_RENAME(usearch_previous) +#define usearch_reset U_ICU_ENTRY_POINT_RENAME(usearch_reset) +#define usearch_search U_ICU_ENTRY_POINT_RENAME(usearch_search) +#define usearch_searchBackwards U_ICU_ENTRY_POINT_RENAME(usearch_searchBackwards) +#define usearch_setAttribute U_ICU_ENTRY_POINT_RENAME(usearch_setAttribute) +#define usearch_setBreakIterator U_ICU_ENTRY_POINT_RENAME(usearch_setBreakIterator) +#define usearch_setCollator U_ICU_ENTRY_POINT_RENAME(usearch_setCollator) +#define usearch_setOffset U_ICU_ENTRY_POINT_RENAME(usearch_setOffset) +#define usearch_setPattern U_ICU_ENTRY_POINT_RENAME(usearch_setPattern) +#define usearch_setText U_ICU_ENTRY_POINT_RENAME(usearch_setText) +#define uset_add U_ICU_ENTRY_POINT_RENAME(uset_add) +#define uset_addAll U_ICU_ENTRY_POINT_RENAME(uset_addAll) +#define uset_addAllCodePoints U_ICU_ENTRY_POINT_RENAME(uset_addAllCodePoints) +#define uset_addRange U_ICU_ENTRY_POINT_RENAME(uset_addRange) +#define uset_addString U_ICU_ENTRY_POINT_RENAME(uset_addString) +#define uset_applyIntPropertyValue U_ICU_ENTRY_POINT_RENAME(uset_applyIntPropertyValue) +#define uset_applyPattern U_ICU_ENTRY_POINT_RENAME(uset_applyPattern) +#define uset_applyPropertyAlias U_ICU_ENTRY_POINT_RENAME(uset_applyPropertyAlias) +#define uset_charAt U_ICU_ENTRY_POINT_RENAME(uset_charAt) +#define uset_clear U_ICU_ENTRY_POINT_RENAME(uset_clear) +#define uset_clone U_ICU_ENTRY_POINT_RENAME(uset_clone) +#define uset_cloneAsThawed U_ICU_ENTRY_POINT_RENAME(uset_cloneAsThawed) +#define uset_close U_ICU_ENTRY_POINT_RENAME(uset_close) +#define uset_closeOver U_ICU_ENTRY_POINT_RENAME(uset_closeOver) +#define uset_compact U_ICU_ENTRY_POINT_RENAME(uset_compact) +#define uset_complement U_ICU_ENTRY_POINT_RENAME(uset_complement) +#define uset_complementAll U_ICU_ENTRY_POINT_RENAME(uset_complementAll) +#define uset_contains U_ICU_ENTRY_POINT_RENAME(uset_contains) +#define uset_containsAll U_ICU_ENTRY_POINT_RENAME(uset_containsAll) +#define uset_containsAllCodePoints U_ICU_ENTRY_POINT_RENAME(uset_containsAllCodePoints) +#define uset_containsNone U_ICU_ENTRY_POINT_RENAME(uset_containsNone) +#define uset_containsRange U_ICU_ENTRY_POINT_RENAME(uset_containsRange) +#define uset_containsSome U_ICU_ENTRY_POINT_RENAME(uset_containsSome) +#define uset_containsString U_ICU_ENTRY_POINT_RENAME(uset_containsString) +#define uset_equals U_ICU_ENTRY_POINT_RENAME(uset_equals) +#define uset_freeze U_ICU_ENTRY_POINT_RENAME(uset_freeze) +#define uset_getItem U_ICU_ENTRY_POINT_RENAME(uset_getItem) +#define uset_getItemCount U_ICU_ENTRY_POINT_RENAME(uset_getItemCount) +#define uset_getSerializedRange U_ICU_ENTRY_POINT_RENAME(uset_getSerializedRange) +#define uset_getSerializedRangeCount U_ICU_ENTRY_POINT_RENAME(uset_getSerializedRangeCount) +#define uset_getSerializedSet U_ICU_ENTRY_POINT_RENAME(uset_getSerializedSet) +#define uset_indexOf U_ICU_ENTRY_POINT_RENAME(uset_indexOf) +#define uset_isEmpty U_ICU_ENTRY_POINT_RENAME(uset_isEmpty) +#define uset_isFrozen U_ICU_ENTRY_POINT_RENAME(uset_isFrozen) +#define uset_open U_ICU_ENTRY_POINT_RENAME(uset_open) +#define uset_openEmpty U_ICU_ENTRY_POINT_RENAME(uset_openEmpty) +#define uset_openPattern U_ICU_ENTRY_POINT_RENAME(uset_openPattern) +#define uset_openPatternOptions U_ICU_ENTRY_POINT_RENAME(uset_openPatternOptions) +#define uset_remove U_ICU_ENTRY_POINT_RENAME(uset_remove) +#define uset_removeAll U_ICU_ENTRY_POINT_RENAME(uset_removeAll) +#define uset_removeAllStrings U_ICU_ENTRY_POINT_RENAME(uset_removeAllStrings) +#define uset_removeRange U_ICU_ENTRY_POINT_RENAME(uset_removeRange) +#define uset_removeString U_ICU_ENTRY_POINT_RENAME(uset_removeString) +#define uset_resemblesPattern U_ICU_ENTRY_POINT_RENAME(uset_resemblesPattern) +#define uset_retain U_ICU_ENTRY_POINT_RENAME(uset_retain) +#define uset_retainAll U_ICU_ENTRY_POINT_RENAME(uset_retainAll) +#define uset_serialize U_ICU_ENTRY_POINT_RENAME(uset_serialize) +#define uset_serializedContains U_ICU_ENTRY_POINT_RENAME(uset_serializedContains) +#define uset_set U_ICU_ENTRY_POINT_RENAME(uset_set) +#define uset_setSerializedToOne U_ICU_ENTRY_POINT_RENAME(uset_setSerializedToOne) +#define uset_size U_ICU_ENTRY_POINT_RENAME(uset_size) +#define uset_span U_ICU_ENTRY_POINT_RENAME(uset_span) +#define uset_spanBack U_ICU_ENTRY_POINT_RENAME(uset_spanBack) +#define uset_spanBackUTF8 U_ICU_ENTRY_POINT_RENAME(uset_spanBackUTF8) +#define uset_spanUTF8 U_ICU_ENTRY_POINT_RENAME(uset_spanUTF8) +#define uset_toPattern U_ICU_ENTRY_POINT_RENAME(uset_toPattern) +#define uspoof_areConfusable U_ICU_ENTRY_POINT_RENAME(uspoof_areConfusable) +#define uspoof_areConfusableUTF8 U_ICU_ENTRY_POINT_RENAME(uspoof_areConfusableUTF8) +#define uspoof_areConfusableUnicodeString U_ICU_ENTRY_POINT_RENAME(uspoof_areConfusableUnicodeString) +#define uspoof_check U_ICU_ENTRY_POINT_RENAME(uspoof_check) +#define uspoof_checkUTF8 U_ICU_ENTRY_POINT_RENAME(uspoof_checkUTF8) +#define uspoof_checkUnicodeString U_ICU_ENTRY_POINT_RENAME(uspoof_checkUnicodeString) +#define uspoof_clone U_ICU_ENTRY_POINT_RENAME(uspoof_clone) +#define uspoof_close U_ICU_ENTRY_POINT_RENAME(uspoof_close) +#define uspoof_getAllowedChars U_ICU_ENTRY_POINT_RENAME(uspoof_getAllowedChars) +#define uspoof_getAllowedLocales U_ICU_ENTRY_POINT_RENAME(uspoof_getAllowedLocales) +#define uspoof_getAllowedUnicodeSet U_ICU_ENTRY_POINT_RENAME(uspoof_getAllowedUnicodeSet) +#define uspoof_getChecks U_ICU_ENTRY_POINT_RENAME(uspoof_getChecks) +#define uspoof_getSkeleton U_ICU_ENTRY_POINT_RENAME(uspoof_getSkeleton) +#define uspoof_getSkeletonUTF8 U_ICU_ENTRY_POINT_RENAME(uspoof_getSkeletonUTF8) +#define uspoof_getSkeletonUnicodeString U_ICU_ENTRY_POINT_RENAME(uspoof_getSkeletonUnicodeString) +#define uspoof_open U_ICU_ENTRY_POINT_RENAME(uspoof_open) +#define uspoof_openFromSerialized U_ICU_ENTRY_POINT_RENAME(uspoof_openFromSerialized) +#define uspoof_openFromSource U_ICU_ENTRY_POINT_RENAME(uspoof_openFromSource) +#define uspoof_serialize U_ICU_ENTRY_POINT_RENAME(uspoof_serialize) +#define uspoof_setAllowedChars U_ICU_ENTRY_POINT_RENAME(uspoof_setAllowedChars) +#define uspoof_setAllowedLocales U_ICU_ENTRY_POINT_RENAME(uspoof_setAllowedLocales) +#define uspoof_setAllowedUnicodeSet U_ICU_ENTRY_POINT_RENAME(uspoof_setAllowedUnicodeSet) +#define uspoof_setChecks U_ICU_ENTRY_POINT_RENAME(uspoof_setChecks) +#define uspoof_swap U_ICU_ENTRY_POINT_RENAME(uspoof_swap) +#define usprep_close U_ICU_ENTRY_POINT_RENAME(usprep_close) +#define usprep_open U_ICU_ENTRY_POINT_RENAME(usprep_open) +#define usprep_openByType U_ICU_ENTRY_POINT_RENAME(usprep_openByType) +#define usprep_prepare U_ICU_ENTRY_POINT_RENAME(usprep_prepare) +#define usprep_swap U_ICU_ENTRY_POINT_RENAME(usprep_swap) +#define ustr_foldCase U_ICU_ENTRY_POINT_RENAME(ustr_foldCase) +#define ustr_toLower U_ICU_ENTRY_POINT_RENAME(ustr_toLower) +#define ustr_toTitle U_ICU_ENTRY_POINT_RENAME(ustr_toTitle) +#define ustr_toUpper U_ICU_ENTRY_POINT_RENAME(ustr_toUpper) +#define utext_caseCompare U_ICU_ENTRY_POINT_RENAME(utext_caseCompare) +#define utext_caseCompareNativeLimit U_ICU_ENTRY_POINT_RENAME(utext_caseCompareNativeLimit) +#define utext_char32At U_ICU_ENTRY_POINT_RENAME(utext_char32At) +#define utext_clone U_ICU_ENTRY_POINT_RENAME(utext_clone) +#define utext_close U_ICU_ENTRY_POINT_RENAME(utext_close) +#define utext_compare U_ICU_ENTRY_POINT_RENAME(utext_compare) +#define utext_compareNativeLimit U_ICU_ENTRY_POINT_RENAME(utext_compareNativeLimit) +#define utext_copy U_ICU_ENTRY_POINT_RENAME(utext_copy) +#define utext_current32 U_ICU_ENTRY_POINT_RENAME(utext_current32) +#define utext_equals U_ICU_ENTRY_POINT_RENAME(utext_equals) +#define utext_extract U_ICU_ENTRY_POINT_RENAME(utext_extract) +#define utext_freeze U_ICU_ENTRY_POINT_RENAME(utext_freeze) +#define utext_getNativeIndex U_ICU_ENTRY_POINT_RENAME(utext_getNativeIndex) +#define utext_getPreviousNativeIndex U_ICU_ENTRY_POINT_RENAME(utext_getPreviousNativeIndex) +#define utext_hasMetaData U_ICU_ENTRY_POINT_RENAME(utext_hasMetaData) +#define utext_isLengthExpensive U_ICU_ENTRY_POINT_RENAME(utext_isLengthExpensive) +#define utext_isWritable U_ICU_ENTRY_POINT_RENAME(utext_isWritable) +#define utext_moveIndex32 U_ICU_ENTRY_POINT_RENAME(utext_moveIndex32) +#define utext_nativeLength U_ICU_ENTRY_POINT_RENAME(utext_nativeLength) +#define utext_next32 U_ICU_ENTRY_POINT_RENAME(utext_next32) +#define utext_next32From U_ICU_ENTRY_POINT_RENAME(utext_next32From) +#define utext_openCharacterIterator U_ICU_ENTRY_POINT_RENAME(utext_openCharacterIterator) +#define utext_openConstUnicodeString U_ICU_ENTRY_POINT_RENAME(utext_openConstUnicodeString) +#define utext_openReplaceable U_ICU_ENTRY_POINT_RENAME(utext_openReplaceable) +#define utext_openUChars U_ICU_ENTRY_POINT_RENAME(utext_openUChars) +#define utext_openUTF8 U_ICU_ENTRY_POINT_RENAME(utext_openUTF8) +#define utext_openUnicodeString U_ICU_ENTRY_POINT_RENAME(utext_openUnicodeString) +#define utext_previous32 U_ICU_ENTRY_POINT_RENAME(utext_previous32) +#define utext_previous32From U_ICU_ENTRY_POINT_RENAME(utext_previous32From) +#define utext_replace U_ICU_ENTRY_POINT_RENAME(utext_replace) +#define utext_setNativeIndex U_ICU_ENTRY_POINT_RENAME(utext_setNativeIndex) +#define utext_setup U_ICU_ENTRY_POINT_RENAME(utext_setup) +#define utf8_appendCharSafeBody U_ICU_ENTRY_POINT_RENAME(utf8_appendCharSafeBody) +#define utf8_back1SafeBody U_ICU_ENTRY_POINT_RENAME(utf8_back1SafeBody) +#define utf8_countTrailBytes U_ICU_ENTRY_POINT_RENAME(utf8_countTrailBytes) +#define utf8_nextCharSafeBody U_ICU_ENTRY_POINT_RENAME(utf8_nextCharSafeBody) +#define utf8_prevCharSafeBody U_ICU_ENTRY_POINT_RENAME(utf8_prevCharSafeBody) +#define utmscale_fromInt64 U_ICU_ENTRY_POINT_RENAME(utmscale_fromInt64) +#define utmscale_getTimeScaleValue U_ICU_ENTRY_POINT_RENAME(utmscale_getTimeScaleValue) +#define utmscale_toInt64 U_ICU_ENTRY_POINT_RENAME(utmscale_toInt64) +#define utrace_cleanup U_ICU_ENTRY_POINT_RENAME(utrace_cleanup) +#define utrace_data U_ICU_ENTRY_POINT_RENAME(utrace_data) +#define utrace_entry U_ICU_ENTRY_POINT_RENAME(utrace_entry) +#define utrace_exit U_ICU_ENTRY_POINT_RENAME(utrace_exit) +#define utrace_format U_ICU_ENTRY_POINT_RENAME(utrace_format) +#define utrace_functionName U_ICU_ENTRY_POINT_RENAME(utrace_functionName) +#define utrace_getFunctions U_ICU_ENTRY_POINT_RENAME(utrace_getFunctions) +#define utrace_getLevel U_ICU_ENTRY_POINT_RENAME(utrace_getLevel) +#define utrace_level U_ICU_ENTRY_POINT_RENAME(utrace_level) +#define utrace_setFunctions U_ICU_ENTRY_POINT_RENAME(utrace_setFunctions) +#define utrace_setLevel U_ICU_ENTRY_POINT_RENAME(utrace_setLevel) +#define utrace_vformat U_ICU_ENTRY_POINT_RENAME(utrace_vformat) +#define utrans_clone U_ICU_ENTRY_POINT_RENAME(utrans_clone) +#define utrans_close U_ICU_ENTRY_POINT_RENAME(utrans_close) +#define utrans_countAvailableIDs U_ICU_ENTRY_POINT_RENAME(utrans_countAvailableIDs) +#define utrans_getAvailableID U_ICU_ENTRY_POINT_RENAME(utrans_getAvailableID) +#define utrans_getID U_ICU_ENTRY_POINT_RENAME(utrans_getID) +#define utrans_getUnicodeID U_ICU_ENTRY_POINT_RENAME(utrans_getUnicodeID) +#define utrans_open U_ICU_ENTRY_POINT_RENAME(utrans_open) +#define utrans_openIDs U_ICU_ENTRY_POINT_RENAME(utrans_openIDs) +#define utrans_openInverse U_ICU_ENTRY_POINT_RENAME(utrans_openInverse) +#define utrans_openU U_ICU_ENTRY_POINT_RENAME(utrans_openU) +#define utrans_register U_ICU_ENTRY_POINT_RENAME(utrans_register) +#define utrans_rep_caseContextIterator U_ICU_ENTRY_POINT_RENAME(utrans_rep_caseContextIterator) +#define utrans_setFilter U_ICU_ENTRY_POINT_RENAME(utrans_setFilter) +#define utrans_stripRules U_ICU_ENTRY_POINT_RENAME(utrans_stripRules) +#define utrans_trans U_ICU_ENTRY_POINT_RENAME(utrans_trans) +#define utrans_transIncremental U_ICU_ENTRY_POINT_RENAME(utrans_transIncremental) +#define utrans_transIncrementalUChars U_ICU_ENTRY_POINT_RENAME(utrans_transIncrementalUChars) +#define utrans_transUChars U_ICU_ENTRY_POINT_RENAME(utrans_transUChars) +#define utrans_transliterator_cleanup U_ICU_ENTRY_POINT_RENAME(utrans_transliterator_cleanup) +#define utrans_unregister U_ICU_ENTRY_POINT_RENAME(utrans_unregister) +#define utrans_unregisterID U_ICU_ENTRY_POINT_RENAME(utrans_unregisterID) +#define utrie2_clone U_ICU_ENTRY_POINT_RENAME(utrie2_clone) +#define utrie2_cloneAsThawed U_ICU_ENTRY_POINT_RENAME(utrie2_cloneAsThawed) +#define utrie2_close U_ICU_ENTRY_POINT_RENAME(utrie2_close) +#define utrie2_enum U_ICU_ENTRY_POINT_RENAME(utrie2_enum) +#define utrie2_enumForLeadSurrogate U_ICU_ENTRY_POINT_RENAME(utrie2_enumForLeadSurrogate) +#define utrie2_freeze U_ICU_ENTRY_POINT_RENAME(utrie2_freeze) +#define utrie2_fromUTrie U_ICU_ENTRY_POINT_RENAME(utrie2_fromUTrie) +#define utrie2_get32 U_ICU_ENTRY_POINT_RENAME(utrie2_get32) +#define utrie2_get32FromLeadSurrogateCodeUnit U_ICU_ENTRY_POINT_RENAME(utrie2_get32FromLeadSurrogateCodeUnit) +#define utrie2_getVersion U_ICU_ENTRY_POINT_RENAME(utrie2_getVersion) +#define utrie2_internalU8NextIndex U_ICU_ENTRY_POINT_RENAME(utrie2_internalU8NextIndex) +#define utrie2_internalU8PrevIndex U_ICU_ENTRY_POINT_RENAME(utrie2_internalU8PrevIndex) +#define utrie2_isFrozen U_ICU_ENTRY_POINT_RENAME(utrie2_isFrozen) +#define utrie2_open U_ICU_ENTRY_POINT_RENAME(utrie2_open) +#define utrie2_openDummy U_ICU_ENTRY_POINT_RENAME(utrie2_openDummy) +#define utrie2_openFromSerialized U_ICU_ENTRY_POINT_RENAME(utrie2_openFromSerialized) +#define utrie2_serialize U_ICU_ENTRY_POINT_RENAME(utrie2_serialize) +#define utrie2_set32 U_ICU_ENTRY_POINT_RENAME(utrie2_set32) +#define utrie2_set32ForLeadSurrogateCodeUnit U_ICU_ENTRY_POINT_RENAME(utrie2_set32ForLeadSurrogateCodeUnit) +#define utrie2_setRange32 U_ICU_ENTRY_POINT_RENAME(utrie2_setRange32) +#define utrie2_swap U_ICU_ENTRY_POINT_RENAME(utrie2_swap) +#define utrie2_swapAnyVersion U_ICU_ENTRY_POINT_RENAME(utrie2_swapAnyVersion) +#define utrie_clone U_ICU_ENTRY_POINT_RENAME(utrie_clone) +#define utrie_close U_ICU_ENTRY_POINT_RENAME(utrie_close) +#define utrie_defaultGetFoldingOffset U_ICU_ENTRY_POINT_RENAME(utrie_defaultGetFoldingOffset) +#define utrie_enum U_ICU_ENTRY_POINT_RENAME(utrie_enum) +#define utrie_get32 U_ICU_ENTRY_POINT_RENAME(utrie_get32) +#define utrie_getData U_ICU_ENTRY_POINT_RENAME(utrie_getData) +#define utrie_open U_ICU_ENTRY_POINT_RENAME(utrie_open) +#define utrie_serialize U_ICU_ENTRY_POINT_RENAME(utrie_serialize) +#define utrie_set32 U_ICU_ENTRY_POINT_RENAME(utrie_set32) +#define utrie_setRange32 U_ICU_ENTRY_POINT_RENAME(utrie_setRange32) +#define utrie_swap U_ICU_ENTRY_POINT_RENAME(utrie_swap) +#define utrie_unserialize U_ICU_ENTRY_POINT_RENAME(utrie_unserialize) +#define utrie_unserializeDummy U_ICU_ENTRY_POINT_RENAME(utrie_unserializeDummy) +#define vzone_clone U_ICU_ENTRY_POINT_RENAME(vzone_clone) +#define vzone_close U_ICU_ENTRY_POINT_RENAME(vzone_close) +#define vzone_countTransitionRules U_ICU_ENTRY_POINT_RENAME(vzone_countTransitionRules) +#define vzone_equals U_ICU_ENTRY_POINT_RENAME(vzone_equals) +#define vzone_getDynamicClassID U_ICU_ENTRY_POINT_RENAME(vzone_getDynamicClassID) +#define vzone_getLastModified U_ICU_ENTRY_POINT_RENAME(vzone_getLastModified) +#define vzone_getNextTransition U_ICU_ENTRY_POINT_RENAME(vzone_getNextTransition) +#define vzone_getOffset U_ICU_ENTRY_POINT_RENAME(vzone_getOffset) +#define vzone_getOffset2 U_ICU_ENTRY_POINT_RENAME(vzone_getOffset2) +#define vzone_getOffset3 U_ICU_ENTRY_POINT_RENAME(vzone_getOffset3) +#define vzone_getPreviousTransition U_ICU_ENTRY_POINT_RENAME(vzone_getPreviousTransition) +#define vzone_getRawOffset U_ICU_ENTRY_POINT_RENAME(vzone_getRawOffset) +#define vzone_getStaticClassID U_ICU_ENTRY_POINT_RENAME(vzone_getStaticClassID) +#define vzone_getTZURL U_ICU_ENTRY_POINT_RENAME(vzone_getTZURL) +#define vzone_hasSameRules U_ICU_ENTRY_POINT_RENAME(vzone_hasSameRules) +#define vzone_inDaylightTime U_ICU_ENTRY_POINT_RENAME(vzone_inDaylightTime) +#define vzone_openData U_ICU_ENTRY_POINT_RENAME(vzone_openData) +#define vzone_openID U_ICU_ENTRY_POINT_RENAME(vzone_openID) +#define vzone_setLastModified U_ICU_ENTRY_POINT_RENAME(vzone_setLastModified) +#define vzone_setRawOffset U_ICU_ENTRY_POINT_RENAME(vzone_setRawOffset) +#define vzone_setTZURL U_ICU_ENTRY_POINT_RENAME(vzone_setTZURL) +#define vzone_useDaylightTime U_ICU_ENTRY_POINT_RENAME(vzone_useDaylightTime) +#define vzone_write U_ICU_ENTRY_POINT_RENAME(vzone_write) +#define vzone_writeFromStart U_ICU_ENTRY_POINT_RENAME(vzone_writeFromStart) +#define vzone_writeSimple U_ICU_ENTRY_POINT_RENAME(vzone_writeSimple) +#define zrule_close U_ICU_ENTRY_POINT_RENAME(zrule_close) +#define zrule_equals U_ICU_ENTRY_POINT_RENAME(zrule_equals) +#define zrule_getDSTSavings U_ICU_ENTRY_POINT_RENAME(zrule_getDSTSavings) +#define zrule_getName U_ICU_ENTRY_POINT_RENAME(zrule_getName) +#define zrule_getRawOffset U_ICU_ENTRY_POINT_RENAME(zrule_getRawOffset) +#define zrule_isEquivalentTo U_ICU_ENTRY_POINT_RENAME(zrule_isEquivalentTo) +#define ztrans_adoptFrom U_ICU_ENTRY_POINT_RENAME(ztrans_adoptFrom) +#define ztrans_adoptTo U_ICU_ENTRY_POINT_RENAME(ztrans_adoptTo) +#define ztrans_clone U_ICU_ENTRY_POINT_RENAME(ztrans_clone) +#define ztrans_close U_ICU_ENTRY_POINT_RENAME(ztrans_close) +#define ztrans_equals U_ICU_ENTRY_POINT_RENAME(ztrans_equals) +#define ztrans_getDynamicClassID U_ICU_ENTRY_POINT_RENAME(ztrans_getDynamicClassID) +#define ztrans_getFrom U_ICU_ENTRY_POINT_RENAME(ztrans_getFrom) +#define ztrans_getStaticClassID U_ICU_ENTRY_POINT_RENAME(ztrans_getStaticClassID) +#define ztrans_getTime U_ICU_ENTRY_POINT_RENAME(ztrans_getTime) +#define ztrans_getTo U_ICU_ENTRY_POINT_RENAME(ztrans_getTo) +#define ztrans_open U_ICU_ENTRY_POINT_RENAME(ztrans_open) +#define ztrans_openEmpty U_ICU_ENTRY_POINT_RENAME(ztrans_openEmpty) +#define ztrans_setFrom U_ICU_ENTRY_POINT_RENAME(ztrans_setFrom) +#define ztrans_setTime U_ICU_ENTRY_POINT_RENAME(ztrans_setTime) +#define ztrans_setTo U_ICU_ENTRY_POINT_RENAME(ztrans_setTo) +# 383 "/usr/include/unicode/umachine.h" 2 3 4 +# 37 "/usr/include/unicode/utypes.h" 2 3 4 +# 1 "/usr/include/unicode/utf.h" 1 3 4 +# 109 "/usr/include/unicode/utf.h" 3 4 +#define __UTF_H__ + +# 1 "/usr/include/unicode/utypes.h" 1 3 4 +# 112 "/usr/include/unicode/utf.h" 2 3 4 +# 134 "/usr/include/unicode/utf.h" 3 4 +#define U_SENTINEL (-1) + + + + + + + +#define U_IS_UNICODE_NONCHAR(c) ((c)>=0xfdd0 && ((uint32_t)(c)<=0xfdef || ((c)&0xfffe)==0xfffe) && (uint32_t)(c)<=0x10ffff) +# 164 "/usr/include/unicode/utf.h" 3 4 +#define U_IS_UNICODE_CHAR(c) ((uint32_t)(c)<0xd800 || ((uint32_t)(c)>0xdfff && (uint32_t)(c)<=0x10ffff && !U_IS_UNICODE_NONCHAR(c))) +# 176 "/usr/include/unicode/utf.h" 3 4 +#define U_IS_BMP(c) ((uint32_t)(c)<=0xffff) + + + + + + + +#define U_IS_SUPPLEMENTARY(c) ((uint32_t)((c)-0x10000)<=0xfffff) + + + + + + + +#define U_IS_LEAD(c) (((c)&0xfffffc00)==0xd800) + + + + + + + +#define U_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00) + + + + + + + +#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800) +# 217 "/usr/include/unicode/utf.h" 3 4 +#define U_IS_SURROGATE_LEAD(c) (((c)&0x400)==0) +# 226 "/usr/include/unicode/utf.h" 3 4 +#define U_IS_SURROGATE_TRAIL(c) (((c)&0x400)!=0) + + + +# 1 "/usr/include/unicode/utf8.h" 1 3 4 +# 35 "/usr/include/unicode/utf8.h" 3 4 +#define __UTF8_H__ +# 60 "/usr/include/unicode/utf8.h" 3 4 +extern "C" const uint8_t + +utf8_countTrailBytes_48[256]; +# 71 "/usr/include/unicode/utf8.h" 3 4 +#define U8_COUNT_TRAIL_BYTES(leadByte) (utf8_countTrailBytes[(uint8_t)leadByte]) +# 80 "/usr/include/unicode/utf8.h" 3 4 +#define U8_MASK_LEAD_BYTE(leadByte,countTrailBytes) ((leadByte)&=(1<<(6-(countTrailBytes)))-1) +# 91 "/usr/include/unicode/utf8.h" 3 4 +extern "C" __attribute__((visibility("default"))) UChar32 +utf8_nextCharSafeBody_48(const uint8_t *s, int32_t *pi, int32_t length, UChar32 c, UBool strict); +# 103 "/usr/include/unicode/utf8.h" 3 4 +extern "C" __attribute__((visibility("default"))) int32_t +utf8_appendCharSafeBody_48(uint8_t *s, int32_t i, int32_t length, UChar32 c, UBool *pIsError); +# 115 "/usr/include/unicode/utf8.h" 3 4 +extern "C" __attribute__((visibility("default"))) UChar32 +utf8_prevCharSafeBody_48(const uint8_t *s, int32_t start, int32_t *pi, UChar32 c, UBool strict); +# 127 "/usr/include/unicode/utf8.h" 3 4 +extern "C" __attribute__((visibility("default"))) int32_t +utf8_back1SafeBody_48(const uint8_t *s, int32_t start, int32_t i); +# 138 "/usr/include/unicode/utf8.h" 3 4 +#define U8_IS_SINGLE(c) (((c)&0x80)==0) + + + + + + + +#define U8_IS_LEAD(c) ((uint8_t)((c)-0xc0)<0x3e) + + + + + + + +#define U8_IS_TRAIL(c) (((c)&0xc0)==0x80) +# 163 "/usr/include/unicode/utf8.h" 3 4 +#define U8_LENGTH(c) ((uint32_t)(c)<=0x7f ? 1 : ((uint32_t)(c)<=0x7ff ? 2 : ((uint32_t)(c)<=0xd7ff ? 3 : ((uint32_t)(c)<=0xdfff || (uint32_t)(c)>0x10ffff ? 0 : ((uint32_t)(c)<=0xffff ? 3 : 4) ) ) ) ) +# 179 "/usr/include/unicode/utf8.h" 3 4 +#define U8_MAX_LENGTH 4 +# 197 "/usr/include/unicode/utf8.h" 3 4 +#define U8_GET_UNSAFE(s,i,c) { int32_t _u8_get_unsafe_index=(int32_t)(i); U8_SET_CP_START_UNSAFE(s, _u8_get_unsafe_index); U8_NEXT_UNSAFE(s, _u8_get_unsafe_index, c); } +# 221 "/usr/include/unicode/utf8.h" 3 4 +#define U8_GET(s,start,i,length,c) { int32_t _u8_get_index=(int32_t)(i); U8_SET_CP_START(s, start, _u8_get_index); U8_NEXT(s, _u8_get_index, length, c); } +# 246 "/usr/include/unicode/utf8.h" 3 4 +#define U8_NEXT_UNSAFE(s,i,c) { (c)=(uint8_t)(s)[(i)++]; if((uint8_t)((c)-0xc0)<0x35) { uint8_t __count=U8_COUNT_TRAIL_BYTES(c); U8_MASK_LEAD_BYTE(c, __count); switch(__count) { case 3: (c)=((c)<<6)|((s)[(i)++]&0x3f); case 2: (c)=((c)<<6)|((s)[(i)++]&0x3f); case 1: (c)=((c)<<6)|((s)[(i)++]&0x3f); break; } } } +# 283 "/usr/include/unicode/utf8.h" 3 4 +#define U8_NEXT(s,i,length,c) { (c)=(uint8_t)(s)[(i)++]; if((c)>=0x80) { uint8_t __t1, __t2; if( (0xe0<(c) && (c)<=0xec) && (((i)+1)<(length)) && (__t1=(uint8_t)((s)[i]-0x80))<=0x3f && (__t2=(uint8_t)((s)[(i)+1]-0x80))<= 0x3f ) { (c)=(UChar)(((c)<<12)|(__t1<<6)|__t2); (i)+=2; } else if( ((c)<0xe0 && (c)>=0xc2) && ((i)<(length)) && (__t1=(uint8_t)((s)[i]-0x80))<=0x3f ) { (c)=(UChar)((((c)&0x1f)<<6)|__t1); ++(i); } else if(U8_IS_LEAD(c)) { (c)=utf8_nextCharSafeBody((const uint8_t *)s, &(i), (int32_t)(length), c, -1); } else { (c)=U_SENTINEL; } } } +# 325 "/usr/include/unicode/utf8.h" 3 4 +#define U8_APPEND_UNSAFE(s,i,c) { if((uint32_t)(c)<=0x7f) { (s)[(i)++]=(uint8_t)(c); } else { if((uint32_t)(c)<=0x7ff) { (s)[(i)++]=(uint8_t)(((c)>>6)|0xc0); } else { if((uint32_t)(c)<=0xffff) { (s)[(i)++]=(uint8_t)(((c)>>12)|0xe0); } else { (s)[(i)++]=(uint8_t)(((c)>>18)|0xf0); (s)[(i)++]=(uint8_t)((((c)>>12)&0x3f)|0x80); } (s)[(i)++]=(uint8_t)((((c)>>6)&0x3f)|0x80); } (s)[(i)++]=(uint8_t)(((c)&0x3f)|0x80); } } +# 361 "/usr/include/unicode/utf8.h" 3 4 +#define U8_APPEND(s,i,capacity,c,isError) { if((uint32_t)(c)<=0x7f) { (s)[(i)++]=(uint8_t)(c); } else if((uint32_t)(c)<=0x7ff && (i)+1<(capacity)) { (s)[(i)++]=(uint8_t)(((c)>>6)|0xc0); (s)[(i)++]=(uint8_t)(((c)&0x3f)|0x80); } else if((uint32_t)(c)<=0xd7ff && (i)+2<(capacity)) { (s)[(i)++]=(uint8_t)(((c)>>12)|0xe0); (s)[(i)++]=(uint8_t)((((c)>>6)&0x3f)|0x80); (s)[(i)++]=(uint8_t)(((c)&0x3f)|0x80); } else { (i)=utf8_appendCharSafeBody(s, (int32_t)(i), (int32_t)(capacity), c, &(isError)); } } +# 386 "/usr/include/unicode/utf8.h" 3 4 +#define U8_FWD_1_UNSAFE(s,i) { (i)+=1+U8_COUNT_TRAIL_BYTES((s)[i]); } +# 401 "/usr/include/unicode/utf8.h" 3 4 +#define U8_FWD_1(s,i,length) { uint8_t __b=(uint8_t)(s)[(i)++]; if(U8_IS_LEAD(__b)) { uint8_t __count=U8_COUNT_TRAIL_BYTES(__b); if((i)+__count>(length)) { __count=(uint8_t)((length)-(i)); } while(__count>0 && U8_IS_TRAIL((s)[i])) { ++(i); --__count; } } } +# 427 "/usr/include/unicode/utf8.h" 3 4 +#define U8_FWD_N_UNSAFE(s,i,n) { int32_t __N=(n); while(__N>0) { U8_FWD_1_UNSAFE(s, i); --__N; } } +# 448 "/usr/include/unicode/utf8.h" 3 4 +#define U8_FWD_N(s,i,length,n) { int32_t __N=(n); while(__N>0 && (i)<(length)) { U8_FWD_1(s, i, length); --__N; } } +# 469 "/usr/include/unicode/utf8.h" 3 4 +#define U8_SET_CP_START_UNSAFE(s,i) { while(U8_IS_TRAIL((s)[i])) { --(i); } } +# 487 "/usr/include/unicode/utf8.h" 3 4 +#define U8_SET_CP_START(s,start,i) { if(U8_IS_TRAIL((s)[(i)])) { (i)=utf8_back1SafeBody(s, start, (int32_t)(i)); } } +# 514 "/usr/include/unicode/utf8.h" 3 4 +#define U8_PREV_UNSAFE(s,i,c) { (c)=(uint8_t)(s)[--(i)]; if(U8_IS_TRAIL(c)) { uint8_t __b, __count=1, __shift=6; (c)&=0x3f; for(;;) { __b=(uint8_t)(s)[--(i)]; if(__b>=0xc0) { U8_MASK_LEAD_BYTE(__b, __count); (c)|=(UChar32)__b<<__shift; break; } else { (c)|=(UChar32)(__b&0x3f)<<__shift; ++__count; __shift+=6; } } } } +# 556 "/usr/include/unicode/utf8.h" 3 4 +#define U8_PREV(s,start,i,c) { (c)=(uint8_t)(s)[--(i)]; if((c)>=0x80) { if((c)<=0xbf) { (c)=utf8_prevCharSafeBody((const uint8_t *)s, start, &(i), c, -1); } else { (c)=U_SENTINEL; } } } +# 578 "/usr/include/unicode/utf8.h" 3 4 +#define U8_BACK_1_UNSAFE(s,i) { while(U8_IS_TRAIL((s)[--(i)])) {} } +# 594 "/usr/include/unicode/utf8.h" 3 4 +#define U8_BACK_1(s,start,i) { if(U8_IS_TRAIL((s)[--(i)])) { (i)=utf8_back1SafeBody(s, start, (int32_t)(i)); } } +# 613 "/usr/include/unicode/utf8.h" 3 4 +#define U8_BACK_N_UNSAFE(s,i,n) { int32_t __N=(n); while(__N>0) { U8_BACK_1_UNSAFE(s, i); --__N; } } +# 635 "/usr/include/unicode/utf8.h" 3 4 +#define U8_BACK_N(s,start,i,n) { int32_t __N=(n); while(__N>0 && (i)>(start)) { U8_BACK_1(s, start, i); --__N; } } +# 656 "/usr/include/unicode/utf8.h" 3 4 +#define U8_SET_CP_LIMIT_UNSAFE(s,i) { U8_BACK_1_UNSAFE(s, i); U8_FWD_1_UNSAFE(s, i); } +# 676 "/usr/include/unicode/utf8.h" 3 4 +#define U8_SET_CP_LIMIT(s,start,i,length) { if((start)<(i) && (i)<(length)) { U8_BACK_1(s, start, i); U8_FWD_1(s, i, length); } } +# 231 "/usr/include/unicode/utf.h" 2 3 4 +# 1 "/usr/include/unicode/utf16.h" 1 3 4 +# 35 "/usr/include/unicode/utf16.h" 3 4 +#define __UTF16_H__ +# 50 "/usr/include/unicode/utf16.h" 3 4 +#define U16_IS_SINGLE(c) !U_IS_SURROGATE(c) + + + + + + + +#define U16_IS_LEAD(c) (((c)&0xfffffc00)==0xd800) + + + + + + + +#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00) + + + + + + + +#define U16_IS_SURROGATE(c) U_IS_SURROGATE(c) +# 83 "/usr/include/unicode/utf16.h" 3 4 +#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0) +# 92 "/usr/include/unicode/utf16.h" 3 4 +#define U16_IS_SURROGATE_TRAIL(c) (((c)&0x400)!=0) + + + + + +#define U16_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000) +# 111 "/usr/include/unicode/utf16.h" 3 4 +#define U16_GET_SUPPLEMENTARY(lead,trail) (((UChar32)(lead)<<10UL)+(UChar32)(trail)-U16_SURROGATE_OFFSET) +# 122 "/usr/include/unicode/utf16.h" 3 4 +#define U16_LEAD(supplementary) (UChar)(((supplementary)>>10)+0xd7c0) +# 131 "/usr/include/unicode/utf16.h" 3 4 +#define U16_TRAIL(supplementary) (UChar)(((supplementary)&0x3ff)|0xdc00) +# 140 "/usr/include/unicode/utf16.h" 3 4 +#define U16_LENGTH(c) ((uint32_t)(c)<=0xffff ? 1 : 2) + + + + + + +#define U16_MAX_LENGTH 2 +# 166 "/usr/include/unicode/utf16.h" 3 4 +#define U16_GET_UNSAFE(s,i,c) { (c)=(s)[i]; if(U16_IS_SURROGATE(c)) { if(U16_IS_SURROGATE_LEAD(c)) { (c)=U16_GET_SUPPLEMENTARY((c), (s)[(i)+1]); } else { (c)=U16_GET_SUPPLEMENTARY((s)[(i)-1], (c)); } } } +# 197 "/usr/include/unicode/utf16.h" 3 4 +#define U16_GET(s,start,i,length,c) { (c)=(s)[i]; if(U16_IS_SURROGATE(c)) { uint16_t __c2; if(U16_IS_SURROGATE_LEAD(c)) { if((i)+1<(length) && U16_IS_TRAIL(__c2=(s)[(i)+1])) { (c)=U16_GET_SUPPLEMENTARY((c), __c2); } } else { if((i)>(start) && U16_IS_LEAD(__c2=(s)[(i)-1])) { (c)=U16_GET_SUPPLEMENTARY(__c2, (c)); } } } } +# 234 "/usr/include/unicode/utf16.h" 3 4 +#define U16_NEXT_UNSAFE(s,i,c) { (c)=(s)[(i)++]; if(U16_IS_LEAD(c)) { (c)=U16_GET_SUPPLEMENTARY((c), (s)[(i)++]); } } +# 261 "/usr/include/unicode/utf16.h" 3 4 +#define U16_NEXT(s,i,length,c) { (c)=(s)[(i)++]; if(U16_IS_LEAD(c)) { uint16_t __c2; if((i)<(length) && U16_IS_TRAIL(__c2=(s)[(i)])) { ++(i); (c)=U16_GET_SUPPLEMENTARY((c), __c2); } } } +# 285 "/usr/include/unicode/utf16.h" 3 4 +#define U16_APPEND_UNSAFE(s,i,c) { if((uint32_t)(c)<=0xffff) { (s)[(i)++]=(uint16_t)(c); } else { (s)[(i)++]=(uint16_t)(((c)>>10)+0xd7c0); (s)[(i)++]=(uint16_t)(((c)&0x3ff)|0xdc00); } } +# 311 "/usr/include/unicode/utf16.h" 3 4 +#define U16_APPEND(s,i,capacity,c,isError) { if((uint32_t)(c)<=0xffff) { (s)[(i)++]=(uint16_t)(c); } else if((uint32_t)(c)<=0x10ffff && (i)+1<(capacity)) { (s)[(i)++]=(uint16_t)(((c)>>10)+0xd7c0); (s)[(i)++]=(uint16_t)(((c)&0x3ff)|0xdc00); } else { (isError)=TRUE; } } +# 332 "/usr/include/unicode/utf16.h" 3 4 +#define U16_FWD_1_UNSAFE(s,i) { if(U16_IS_LEAD((s)[(i)++])) { ++(i); } } +# 349 "/usr/include/unicode/utf16.h" 3 4 +#define U16_FWD_1(s,i,length) { if(U16_IS_LEAD((s)[(i)++]) && (i)<(length) && U16_IS_TRAIL((s)[i])) { ++(i); } } +# 367 "/usr/include/unicode/utf16.h" 3 4 +#define U16_FWD_N_UNSAFE(s,i,n) { int32_t __N=(n); while(__N>0) { U16_FWD_1_UNSAFE(s, i); --__N; } } +# 388 "/usr/include/unicode/utf16.h" 3 4 +#define U16_FWD_N(s,i,length,n) { int32_t __N=(n); while(__N>0 && (i)<(length)) { U16_FWD_1(s, i, length); --__N; } } +# 409 "/usr/include/unicode/utf16.h" 3 4 +#define U16_SET_CP_START_UNSAFE(s,i) { if(U16_IS_TRAIL((s)[i])) { --(i); } } +# 429 "/usr/include/unicode/utf16.h" 3 4 +#define U16_SET_CP_START(s,start,i) { if(U16_IS_TRAIL((s)[i]) && (i)>(start) && U16_IS_LEAD((s)[(i)-1])) { --(i); } } +# 457 "/usr/include/unicode/utf16.h" 3 4 +#define U16_PREV_UNSAFE(s,i,c) { (c)=(s)[--(i)]; if(U16_IS_TRAIL(c)) { (c)=U16_GET_SUPPLEMENTARY((s)[--(i)], (c)); } } +# 485 "/usr/include/unicode/utf16.h" 3 4 +#define U16_PREV(s,start,i,c) { (c)=(s)[--(i)]; if(U16_IS_TRAIL(c)) { uint16_t __c2; if((i)>(start) && U16_IS_LEAD(__c2=(s)[(i)-1])) { --(i); (c)=U16_GET_SUPPLEMENTARY(__c2, (c)); } } } +# 507 "/usr/include/unicode/utf16.h" 3 4 +#define U16_BACK_1_UNSAFE(s,i) { if(U16_IS_TRAIL((s)[--(i)])) { --(i); } } +# 525 "/usr/include/unicode/utf16.h" 3 4 +#define U16_BACK_1(s,start,i) { if(U16_IS_TRAIL((s)[--(i)]) && (i)>(start) && U16_IS_LEAD((s)[(i)-1])) { --(i); } } +# 544 "/usr/include/unicode/utf16.h" 3 4 +#define U16_BACK_N_UNSAFE(s,i,n) { int32_t __N=(n); while(__N>0) { U16_BACK_1_UNSAFE(s, i); --__N; } } +# 566 "/usr/include/unicode/utf16.h" 3 4 +#define U16_BACK_N(s,start,i,n) { int32_t __N=(n); while(__N>0 && (i)>(start)) { U16_BACK_1(s, start, i); --__N; } } +# 587 "/usr/include/unicode/utf16.h" 3 4 +#define U16_SET_CP_LIMIT_UNSAFE(s,i) { if(U16_IS_LEAD((s)[(i)-1])) { ++(i); } } +# 608 "/usr/include/unicode/utf16.h" 3 4 +#define U16_SET_CP_LIMIT(s,start,i,length) { if((start)<(i) && (i)<(length) && U16_IS_LEAD((s)[(i)-1]) && U16_IS_TRAIL((s)[i])) { ++(i); } } +# 232 "/usr/include/unicode/utf.h" 2 3 4 + + +# 1 "/usr/include/unicode/utf_old.h" 1 3 4 +# 147 "/usr/include/unicode/utf_old.h" 3 4 +#define __UTF_OLD_H__ +# 170 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF_SIZE 16 + + + + + + + +#define UTF_SAFE + +#undef UTF_UNSAFE + +#undef UTF_STRICT +# 198 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF8_ERROR_VALUE_1 0x15 + + + + + + +#define UTF8_ERROR_VALUE_2 0x9f + + + + + + + +#define UTF_ERROR_VALUE 0xffff + + + + + + + +#define UTF_IS_ERROR(c) (((c)&0xfffe)==0xfffe || (c)==UTF8_ERROR_VALUE_1 || (c)==UTF8_ERROR_VALUE_2) + + + + + + + +#define UTF_IS_VALID(c) (UTF_IS_UNICODE_CHAR(c) && (c)!=UTF8_ERROR_VALUE_1 && (c)!=UTF8_ERROR_VALUE_2) + + + + + + + +#define UTF_IS_SURROGATE(uchar) (((uchar)&0xfffff800)==0xd800) + + + + + + +#define UTF_IS_UNICODE_NONCHAR(c) ((c)>=0xfdd0 && ((uint32_t)(c)<=0xfdef || ((c)&0xfffe)==0xfffe) && (uint32_t)(c)<=0x10ffff) +# 264 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF_IS_UNICODE_CHAR(c) ((uint32_t)(c)<0xd800 || ((uint32_t)(c)>0xdfff && (uint32_t)(c)<=0x10ffff && !UTF_IS_UNICODE_NONCHAR(c))) +# 276 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF8_COUNT_TRAIL_BYTES(leadByte) (utf8_countTrailBytes[(uint8_t)leadByte]) + + + + + +#define UTF8_MASK_LEAD_BYTE(leadByte,countTrailBytes) ((leadByte)&=(1<<(6-(countTrailBytes)))-1) + + +#define UTF8_IS_SINGLE(uchar) (((uchar)&0x80)==0) + +#define UTF8_IS_LEAD(uchar) ((uint8_t)((uchar)-0xc0)<0x3e) + +#define UTF8_IS_TRAIL(uchar) (((uchar)&0xc0)==0x80) + + +#define UTF8_NEED_MULTIPLE_UCHAR(c) ((uint32_t)(c)>0x7f) +# 308 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF8_CHAR_LENGTH(c) ((uint32_t)(c)<=0x7f ? 1 : ((uint32_t)(c)<=0x7ff ? 2 : ((uint32_t)((c)-0x10000)>0xfffff ? 3 : 4) ) ) +# 330 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF8_MAX_CHAR_LENGTH 4 + + +#define UTF8_ARRAY_SIZE(size) ((5*(size))/2) + + +#define UTF8_GET_CHAR_UNSAFE(s,i,c) { int32_t _utf8_get_char_unsafe_index=(int32_t)(i); UTF8_SET_CHAR_START_UNSAFE(s, _utf8_get_char_unsafe_index); UTF8_NEXT_CHAR_UNSAFE(s, _utf8_get_char_unsafe_index, c); } + + + + + + +#define UTF8_GET_CHAR_SAFE(s,start,i,length,c,strict) { int32_t _utf8_get_char_safe_index=(int32_t)(i); UTF8_SET_CHAR_START_SAFE(s, start, _utf8_get_char_safe_index); UTF8_NEXT_CHAR_SAFE(s, _utf8_get_char_safe_index, length, c, strict); } + + + + + + +#define UTF8_NEXT_CHAR_UNSAFE(s,i,c) { (c)=(s)[(i)++]; if((uint8_t)((c)-0xc0)<0x35) { uint8_t __count=UTF8_COUNT_TRAIL_BYTES(c); UTF8_MASK_LEAD_BYTE(c, __count); switch(__count) { case 3: (c)=((c)<<6)|((s)[(i)++]&0x3f); case 2: (c)=((c)<<6)|((s)[(i)++]&0x3f); case 1: (c)=((c)<<6)|((s)[(i)++]&0x3f); break; } } } +# 370 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF8_APPEND_CHAR_UNSAFE(s,i,c) { if((uint32_t)(c)<=0x7f) { (s)[(i)++]=(uint8_t)(c); } else { if((uint32_t)(c)<=0x7ff) { (s)[(i)++]=(uint8_t)(((c)>>6)|0xc0); } else { if((uint32_t)(c)<=0xffff) { (s)[(i)++]=(uint8_t)(((c)>>12)|0xe0); } else { (s)[(i)++]=(uint8_t)(((c)>>18)|0xf0); (s)[(i)++]=(uint8_t)((((c)>>12)&0x3f)|0x80); } (s)[(i)++]=(uint8_t)((((c)>>6)&0x3f)|0x80); } (s)[(i)++]=(uint8_t)(((c)&0x3f)|0x80); } } +# 390 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF8_FWD_1_UNSAFE(s,i) { (i)+=1+UTF8_COUNT_TRAIL_BYTES((s)[i]); } + + + + +#define UTF8_FWD_N_UNSAFE(s,i,n) { int32_t __N=(n); while(__N>0) { UTF8_FWD_1_UNSAFE(s, i); --__N; } } +# 404 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF8_SET_CHAR_START_UNSAFE(s,i) { while(UTF8_IS_TRAIL((s)[i])) { --(i); } } + + + + +#define UTF8_NEXT_CHAR_SAFE(s,i,length,c,strict) { (c)=(s)[(i)++]; if((c)>=0x80) { if(UTF8_IS_LEAD(c)) { (c)=utf8_nextCharSafeBody(s, &(i), (int32_t)(length), c, strict); } else { (c)=UTF8_ERROR_VALUE_1; } } } +# 421 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF8_APPEND_CHAR_SAFE(s,i,length,c) { if((uint32_t)(c)<=0x7f) { (s)[(i)++]=(uint8_t)(c); } else { (i)=utf8_appendCharSafeBody(s, (int32_t)(i), (int32_t)(length), c, NULL); } } +# 430 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF8_FWD_1_SAFE(s,i,length) U8_FWD_1(s, i, length) + + +#define UTF8_FWD_N_SAFE(s,i,length,n) U8_FWD_N(s, i, length, n) + + +#define UTF8_SET_CHAR_START_SAFE(s,start,i) U8_SET_CP_START(s, start, i) + + +#define UTF8_PREV_CHAR_UNSAFE(s,i,c) { (c)=(s)[--(i)]; if(UTF8_IS_TRAIL(c)) { uint8_t __b, __count=1, __shift=6; (c)&=0x3f; for(;;) { __b=(s)[--(i)]; if(__b>=0xc0) { UTF8_MASK_LEAD_BYTE(__b, __count); (c)|=(UChar32)__b<<__shift; break; } else { (c)|=(UChar32)(__b&0x3f)<<__shift; ++__count; __shift+=6; } } } } +# 462 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF8_BACK_1_UNSAFE(s,i) { while(UTF8_IS_TRAIL((s)[--(i)])) {} } + + + + +#define UTF8_BACK_N_UNSAFE(s,i,n) { int32_t __N=(n); while(__N>0) { UTF8_BACK_1_UNSAFE(s, i); --__N; } } +# 476 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF8_SET_CHAR_LIMIT_UNSAFE(s,i) { UTF8_BACK_1_UNSAFE(s, i); UTF8_FWD_1_UNSAFE(s, i); } + + + + + +#define UTF8_PREV_CHAR_SAFE(s,start,i,c,strict) { (c)=(s)[--(i)]; if((c)>=0x80) { if((c)<=0xbf) { (c)=utf8_prevCharSafeBody(s, start, &(i), c, strict); } else { (c)=UTF8_ERROR_VALUE_1; } } } +# 494 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF8_BACK_1_SAFE(s,start,i) U8_BACK_1(s, start, i) + + +#define UTF8_BACK_N_SAFE(s,start,i,n) U8_BACK_N(s, start, i, n) + + +#define UTF8_SET_CHAR_LIMIT_SAFE(s,start,i,length) U8_SET_CP_LIMIT(s, start, i, length) + + + + +#define UTF_IS_FIRST_SURROGATE(uchar) (((uchar)&0xfffffc00)==0xd800) + + +#define UTF_IS_SECOND_SURROGATE(uchar) (((uchar)&0xfffffc00)==0xdc00) + + +#define UTF_IS_SURROGATE_FIRST(c) (((c)&0x400)==0) + + +#define UTF_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000) + + +#define UTF16_GET_PAIR_VALUE(first,second) (((first)<<10UL)+(second)-UTF_SURROGATE_OFFSET) + + + +#define UTF_FIRST_SURROGATE(supplementary) (UChar)(((supplementary)>>10)+0xd7c0) + + +#define UTF_SECOND_SURROGATE(supplementary) (UChar)(((supplementary)&0x3ff)|0xdc00) + + +#define UTF16_LEAD(supplementary) UTF_FIRST_SURROGATE(supplementary) + + +#define UTF16_TRAIL(supplementary) UTF_SECOND_SURROGATE(supplementary) + + +#define UTF16_IS_SINGLE(uchar) !UTF_IS_SURROGATE(uchar) + + +#define UTF16_IS_LEAD(uchar) UTF_IS_FIRST_SURROGATE(uchar) + + +#define UTF16_IS_TRAIL(uchar) UTF_IS_SECOND_SURROGATE(uchar) + + +#define UTF16_NEED_MULTIPLE_UCHAR(c) ((uint32_t)(c)>0xffff) + + +#define UTF16_CHAR_LENGTH(c) ((uint32_t)(c)<=0xffff ? 1 : 2) + + +#define UTF16_MAX_CHAR_LENGTH 2 + + +#define UTF16_ARRAY_SIZE(size) (size) +# 564 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF16_GET_CHAR_UNSAFE(s,i,c) { (c)=(s)[i]; if(UTF_IS_SURROGATE(c)) { if(UTF_IS_SURROGATE_FIRST(c)) { (c)=UTF16_GET_PAIR_VALUE((c), (s)[(i)+1]); } else { (c)=UTF16_GET_PAIR_VALUE((s)[(i)-1], (c)); } } } +# 576 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF16_GET_CHAR_SAFE(s,start,i,length,c,strict) { (c)=(s)[i]; if(UTF_IS_SURROGATE(c)) { uint16_t __c2; if(UTF_IS_SURROGATE_FIRST(c)) { if((i)+1<(length) && UTF_IS_SECOND_SURROGATE(__c2=(s)[(i)+1])) { (c)=UTF16_GET_PAIR_VALUE((c), __c2); } else if(strict) { (c)=UTF_ERROR_VALUE; } } else { if((i)-1>=(start) && UTF_IS_FIRST_SURROGATE(__c2=(s)[(i)-1])) { (c)=UTF16_GET_PAIR_VALUE(__c2, (c)); } else if(strict) { (c)=UTF_ERROR_VALUE; } } } else if((strict) && !UTF_IS_UNICODE_CHAR(c)) { (c)=UTF_ERROR_VALUE; } } +# 603 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF16_NEXT_CHAR_UNSAFE(s,i,c) { (c)=(s)[(i)++]; if(UTF_IS_FIRST_SURROGATE(c)) { (c)=UTF16_GET_PAIR_VALUE((c), (s)[(i)++]); } } + + + + + + + +#define UTF16_APPEND_CHAR_UNSAFE(s,i,c) { if((uint32_t)(c)<=0xffff) { (s)[(i)++]=(uint16_t)(c); } else { (s)[(i)++]=(uint16_t)(((c)>>10)+0xd7c0); (s)[(i)++]=(uint16_t)(((c)&0x3ff)|0xdc00); } } +# 621 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF16_FWD_1_UNSAFE(s,i) { if(UTF_IS_FIRST_SURROGATE((s)[(i)++])) { ++(i); } } + + + + + + +#define UTF16_FWD_N_UNSAFE(s,i,n) { int32_t __N=(n); while(__N>0) { UTF16_FWD_1_UNSAFE(s, i); --__N; } } +# 637 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF16_SET_CHAR_START_UNSAFE(s,i) { if(UTF_IS_SECOND_SURROGATE((s)[i])) { --(i); } } + + + + + + +#define UTF16_NEXT_CHAR_SAFE(s,i,length,c,strict) { (c)=(s)[(i)++]; if(UTF_IS_FIRST_SURROGATE(c)) { uint16_t __c2; if((i)<(length) && UTF_IS_SECOND_SURROGATE(__c2=(s)[(i)])) { ++(i); (c)=UTF16_GET_PAIR_VALUE((c), __c2); } else if(strict) { (c)=UTF_ERROR_VALUE; } } else if((strict) && !UTF_IS_UNICODE_CHAR(c)) { (c)=UTF_ERROR_VALUE; } } +# 663 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF16_APPEND_CHAR_SAFE(s,i,length,c) { if((uint32_t)(c)<=0xffff) { (s)[(i)++]=(uint16_t)(c); } else if((uint32_t)(c)<=0x10ffff) { if((i)+1<(length)) { (s)[(i)++]=(uint16_t)(((c)>>10)+0xd7c0); (s)[(i)++]=(uint16_t)(((c)&0x3ff)|0xdc00); } else { (s)[(i)++]=UTF_ERROR_VALUE; } } else { (s)[(i)++]=UTF_ERROR_VALUE; } } +# 679 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF16_FWD_1_SAFE(s,i,length) U16_FWD_1(s, i, length) + + +#define UTF16_FWD_N_SAFE(s,i,length,n) U16_FWD_N(s, i, length, n) + + +#define UTF16_SET_CHAR_START_SAFE(s,start,i) U16_SET_CP_START(s, start, i) + + +#define UTF16_PREV_CHAR_UNSAFE(s,i,c) { (c)=(s)[--(i)]; if(UTF_IS_SECOND_SURROGATE(c)) { (c)=UTF16_GET_PAIR_VALUE((s)[--(i)], (c)); } } + + + + + + + +#define UTF16_BACK_1_UNSAFE(s,i) { if(UTF_IS_SECOND_SURROGATE((s)[--(i)])) { --(i); } } + + + + + + +#define UTF16_BACK_N_UNSAFE(s,i,n) { int32_t __N=(n); while(__N>0) { UTF16_BACK_1_UNSAFE(s, i); --__N; } } +# 712 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF16_SET_CHAR_LIMIT_UNSAFE(s,i) { if(UTF_IS_FIRST_SURROGATE((s)[(i)-1])) { ++(i); } } + + + + + + +#define UTF16_PREV_CHAR_SAFE(s,start,i,c,strict) { (c)=(s)[--(i)]; if(UTF_IS_SECOND_SURROGATE(c)) { uint16_t __c2; if((i)>(start) && UTF_IS_FIRST_SURROGATE(__c2=(s)[(i)-1])) { --(i); (c)=UTF16_GET_PAIR_VALUE(__c2, (c)); } else if(strict) { (c)=UTF_ERROR_VALUE; } } else if((strict) && !UTF_IS_UNICODE_CHAR(c)) { (c)=UTF_ERROR_VALUE; } } +# 738 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF16_BACK_1_SAFE(s,start,i) U16_BACK_1(s, start, i) + + +#define UTF16_BACK_N_SAFE(s,start,i,n) U16_BACK_N(s, start, i, n) + + +#define UTF16_SET_CHAR_LIMIT_SAFE(s,start,i,length) U16_SET_CP_LIMIT(s, start, i, length) +# 764 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF32_IS_SAFE(c,strict) (!(strict) ? (uint32_t)(c)<=0x10ffff : UTF_IS_UNICODE_CHAR(c)) +# 780 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF32_IS_SINGLE(uchar) 1 + +#define UTF32_IS_LEAD(uchar) 0 + +#define UTF32_IS_TRAIL(uchar) 0 + + + + +#define UTF32_NEED_MULTIPLE_UCHAR(c) 0 + +#define UTF32_CHAR_LENGTH(c) 1 + +#define UTF32_MAX_CHAR_LENGTH 1 + + + + +#define UTF32_ARRAY_SIZE(size) (size) + + +#define UTF32_GET_CHAR_UNSAFE(s,i,c) { (c)=(s)[i]; } + + + + +#define UTF32_GET_CHAR_SAFE(s,start,i,length,c,strict) { (c)=(s)[i]; if(!UTF32_IS_SAFE(c, strict)) { (c)=UTF_ERROR_VALUE; } } +# 816 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF32_NEXT_CHAR_UNSAFE(s,i,c) { (c)=(s)[(i)++]; } + + + + +#define UTF32_APPEND_CHAR_UNSAFE(s,i,c) { (s)[(i)++]=(c); } + + + + +#define UTF32_FWD_1_UNSAFE(s,i) { ++(i); } + + + + +#define UTF32_FWD_N_UNSAFE(s,i,n) { (i)+=(n); } + + + + +#define UTF32_SET_CHAR_START_UNSAFE(s,i) { } + + + +#define UTF32_NEXT_CHAR_SAFE(s,i,length,c,strict) { (c)=(s)[(i)++]; if(!UTF32_IS_SAFE(c, strict)) { (c)=UTF_ERROR_VALUE; } } + + + + + + + +#define UTF32_APPEND_CHAR_SAFE(s,i,length,c) { if((uint32_t)(c)<=0x10ffff) { (s)[(i)++]=(c); } else { (s)[(i)++]=0xfffd; } } +# 857 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF32_FWD_1_SAFE(s,i,length) { ++(i); } + + + + +#define UTF32_FWD_N_SAFE(s,i,length,n) { if(((i)+=(n))>(length)) { (i)=(length); } } + + + + + + +#define UTF32_SET_CHAR_START_SAFE(s,start,i) { } + + + + + +#define UTF32_PREV_CHAR_UNSAFE(s,i,c) { (c)=(s)[--(i)]; } + + + + +#define UTF32_BACK_1_UNSAFE(s,i) { --(i); } + + + + +#define UTF32_BACK_N_UNSAFE(s,i,n) { (i)-=(n); } + + + + +#define UTF32_SET_CHAR_LIMIT_UNSAFE(s,i) { } + + + +#define UTF32_PREV_CHAR_SAFE(s,start,i,c,strict) { (c)=(s)[--(i)]; if(!UTF32_IS_SAFE(c, strict)) { (c)=UTF_ERROR_VALUE; } } + + + + + + + +#define UTF32_BACK_1_SAFE(s,start,i) { --(i); } + + + + +#define UTF32_BACK_N_SAFE(s,start,i,n) { (i)-=(n); if((i)<(start)) { (i)=(start); } } + + + + + + + +#define UTF32_SET_CHAR_LIMIT_SAFE(s,i,length) { } +# 925 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF_ARRAY_SIZE(size) UTF16_ARRAY_SIZE(size) + + +#define UTF_GET_CHAR_UNSAFE(s,i,c) UTF16_GET_CHAR_UNSAFE(s, i, c) + + +#define UTF_GET_CHAR_SAFE(s,start,i,length,c,strict) UTF16_GET_CHAR_SAFE(s, start, i, length, c, strict) + + + +#define UTF_NEXT_CHAR_UNSAFE(s,i,c) UTF16_NEXT_CHAR_UNSAFE(s, i, c) + + +#define UTF_NEXT_CHAR_SAFE(s,i,length,c,strict) UTF16_NEXT_CHAR_SAFE(s, i, length, c, strict) + + + +#define UTF_APPEND_CHAR_UNSAFE(s,i,c) UTF16_APPEND_CHAR_UNSAFE(s, i, c) + + +#define UTF_APPEND_CHAR_SAFE(s,i,length,c) UTF16_APPEND_CHAR_SAFE(s, i, length, c) + + + +#define UTF_FWD_1_UNSAFE(s,i) UTF16_FWD_1_UNSAFE(s, i) + + +#define UTF_FWD_1_SAFE(s,i,length) UTF16_FWD_1_SAFE(s, i, length) + + + +#define UTF_FWD_N_UNSAFE(s,i,n) UTF16_FWD_N_UNSAFE(s, i, n) + + +#define UTF_FWD_N_SAFE(s,i,length,n) UTF16_FWD_N_SAFE(s, i, length, n) + + + +#define UTF_SET_CHAR_START_UNSAFE(s,i) UTF16_SET_CHAR_START_UNSAFE(s, i) + + +#define UTF_SET_CHAR_START_SAFE(s,start,i) UTF16_SET_CHAR_START_SAFE(s, start, i) + + + +#define UTF_PREV_CHAR_UNSAFE(s,i,c) UTF16_PREV_CHAR_UNSAFE(s, i, c) + + +#define UTF_PREV_CHAR_SAFE(s,start,i,c,strict) UTF16_PREV_CHAR_SAFE(s, start, i, c, strict) + + + +#define UTF_BACK_1_UNSAFE(s,i) UTF16_BACK_1_UNSAFE(s, i) + + +#define UTF_BACK_1_SAFE(s,start,i) UTF16_BACK_1_SAFE(s, start, i) + + + +#define UTF_BACK_N_UNSAFE(s,i,n) UTF16_BACK_N_UNSAFE(s, i, n) + + +#define UTF_BACK_N_SAFE(s,start,i,n) UTF16_BACK_N_SAFE(s, start, i, n) + + + +#define UTF_SET_CHAR_LIMIT_UNSAFE(s,i) UTF16_SET_CHAR_LIMIT_UNSAFE(s, i) + + +#define UTF_SET_CHAR_LIMIT_SAFE(s,start,i,length) UTF16_SET_CHAR_LIMIT_SAFE(s, start, i, length) +# 1003 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF_IS_SINGLE(uchar) U16_IS_SINGLE(uchar) + + + + + + +#define UTF_IS_LEAD(uchar) U16_IS_LEAD(uchar) + + + + + + +#define UTF_IS_TRAIL(uchar) U16_IS_TRAIL(uchar) + + + + + + +#define UTF_NEED_MULTIPLE_UCHAR(c) UTF16_NEED_MULTIPLE_UCHAR(c) + + + + + + +#define UTF_CHAR_LENGTH(c) U16_LENGTH(c) + + + + + + +#define UTF_MAX_CHAR_LENGTH U16_MAX_LENGTH +# 1049 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF_GET_CHAR(s,start,i,length,c) U16_GET(s, start, i, length, c) +# 1062 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF_NEXT_CHAR(s,i,length,c) U16_NEXT(s, i, length, c) +# 1075 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF_APPEND_CHAR(s,i,length,c) UTF16_APPEND_CHAR_SAFE(s, i, length, c) +# 1086 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF_FWD_1(s,i,length) U16_FWD_1(s, i, length) +# 1097 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF_FWD_N(s,i,length,n) U16_FWD_N(s, i, length, n) +# 1113 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF_SET_CHAR_START(s,start,i) U16_SET_CP_START(s, start, i) +# 1126 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF_PREV_CHAR(s,start,i,c) U16_PREV(s, start, i, c) +# 1139 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF_BACK_1(s,start,i) U16_BACK_1(s, start, i) +# 1152 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF_BACK_N(s,start,i,n) U16_BACK_N(s, start, i, n) +# 1168 "/usr/include/unicode/utf_old.h" 3 4 +#define UTF_SET_CHAR_LIMIT(s,start,i,length) U16_SET_CP_LIMIT(s, start, i, length) +# 235 "/usr/include/unicode/utf.h" 2 3 4 +# 38 "/usr/include/unicode/utypes.h" 2 3 4 +# 1 "/usr/include/unicode/uversion.h" 1 3 4 +# 26 "/usr/include/unicode/uversion.h" 3 4 +#define UVERSION_H +# 36 "/usr/include/unicode/uversion.h" 3 4 +#define U_COPYRIGHT_STRING_LENGTH 128 + + + + +#define U_MAX_VERSION_LENGTH 4 + + + + +#define U_VERSION_DELIMITER '.' + + + + +#define U_MAX_VERSION_STRING_LENGTH 20 + + + + + +typedef uint8_t UVersionInfo[4]; +# 108 "/usr/include/unicode/uversion.h" 3 4 +#define U_ICU_NAMESPACE U_ICU_ENTRY_POINT_RENAME(icu) + namespace icu_48 { } + namespace icu = icu_48; + + +#define U_NAMESPACE_BEGIN extern "C++" { namespace U_ICU_NAMESPACE { +#define U_NAMESPACE_END } } +#define U_NAMESPACE_USE using namespace U_ICU_NAMESPACE; +#define U_NAMESPACE_QUALIFIER U_ICU_NAMESPACE:: + + +#define U_USING_ICU_NAMESPACE 1 + + + using namespace icu_48; +# 152 "/usr/include/unicode/uversion.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +u_versionFromString_48(UVersionInfo versionArray, const char *versionString); +# 166 "/usr/include/unicode/uversion.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +u_versionFromUString_48(UVersionInfo versionArray, const UChar *versionString); +# 182 "/usr/include/unicode/uversion.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +u_versionToString_48(UVersionInfo versionArray, char *versionString); +# 193 "/usr/include/unicode/uversion.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +u_getVersion_48(UVersionInfo versionArray); +# 39 "/usr/include/unicode/utypes.h" 2 3 4 +# 1 "/usr/include/unicode/uconfig.h" 1 3 4 +# 16 "/usr/include/unicode/uconfig.h" 3 4 +#define __UCONFIG_H__ +# 61 "/usr/include/unicode/uconfig.h" 3 4 +#define UCONFIG_ONLY_COLLATION 0 +# 99 "/usr/include/unicode/uconfig.h" 3 4 +#define UCONFIG_NO_FILE_IO 0 +# 114 "/usr/include/unicode/uconfig.h" 3 4 +#define UCONFIG_NO_CONVERSION 0 +# 134 "/usr/include/unicode/uconfig.h" 3 4 +#define UCONFIG_NO_LEGACY_CONVERSION 0 +# 146 "/usr/include/unicode/uconfig.h" 3 4 +#define UCONFIG_NO_NORMALIZATION 0 +# 166 "/usr/include/unicode/uconfig.h" 3 4 +#define UCONFIG_NO_BREAK_ITERATION 0 +# 176 "/usr/include/unicode/uconfig.h" 3 4 +#define UCONFIG_NO_IDNA 0 +# 187 "/usr/include/unicode/uconfig.h" 3 4 +#define UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE UMSGPAT_APOS_DOUBLE_OPTIONAL +# 199 "/usr/include/unicode/uconfig.h" 3 4 +#define UCONFIG_NO_COLLATION 0 +# 209 "/usr/include/unicode/uconfig.h" 3 4 +#define UCONFIG_NO_FORMATTING 0 +# 219 "/usr/include/unicode/uconfig.h" 3 4 +#define UCONFIG_NO_TRANSLITERATION 0 +# 229 "/usr/include/unicode/uconfig.h" 3 4 +#define UCONFIG_NO_REGULAR_EXPRESSIONS 0 +# 239 "/usr/include/unicode/uconfig.h" 3 4 +#define UCONFIG_NO_SERVICE 0 +# 40 "/usr/include/unicode/utypes.h" 2 3 4 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/float.h" 1 3 4 +# 29 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/float.h" 3 4 +#define _FLOAT_H___ + + +#undef FLT_RADIX +#define FLT_RADIX __FLT_RADIX__ + + +#undef FLT_MANT_DIG +#undef DBL_MANT_DIG +#undef LDBL_MANT_DIG +#define FLT_MANT_DIG __FLT_MANT_DIG__ +#define DBL_MANT_DIG __DBL_MANT_DIG__ +#define LDBL_MANT_DIG __LDBL_MANT_DIG__ +# 50 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/float.h" 3 4 +#undef FLT_DIG +#undef DBL_DIG +#undef LDBL_DIG +#define FLT_DIG __FLT_DIG__ +#define DBL_DIG __DBL_DIG__ +#define LDBL_DIG __LDBL_DIG__ + + +#undef FLT_MIN_EXP +#undef DBL_MIN_EXP +#undef LDBL_MIN_EXP +#define FLT_MIN_EXP __FLT_MIN_EXP__ +#define DBL_MIN_EXP __DBL_MIN_EXP__ +#define LDBL_MIN_EXP __LDBL_MIN_EXP__ + + + + + + +#undef FLT_MIN_10_EXP +#undef DBL_MIN_10_EXP +#undef LDBL_MIN_10_EXP +#define FLT_MIN_10_EXP __FLT_MIN_10_EXP__ +#define DBL_MIN_10_EXP __DBL_MIN_10_EXP__ +#define LDBL_MIN_10_EXP __LDBL_MIN_10_EXP__ + + +#undef FLT_MAX_EXP +#undef DBL_MAX_EXP +#undef LDBL_MAX_EXP +#define FLT_MAX_EXP __FLT_MAX_EXP__ +#define DBL_MAX_EXP __DBL_MAX_EXP__ +#define LDBL_MAX_EXP __LDBL_MAX_EXP__ + + + + + + +#undef FLT_MAX_10_EXP +#undef DBL_MAX_10_EXP +#undef LDBL_MAX_10_EXP +#define FLT_MAX_10_EXP __FLT_MAX_10_EXP__ +#define DBL_MAX_10_EXP __DBL_MAX_10_EXP__ +#define LDBL_MAX_10_EXP __LDBL_MAX_10_EXP__ + + + + + +#undef FLT_MAX +#undef DBL_MAX +#undef LDBL_MAX +#define FLT_MAX __FLT_MAX__ +#define DBL_MAX __DBL_MAX__ +#define LDBL_MAX __LDBL_MAX__ + + + +#undef FLT_EPSILON +#undef DBL_EPSILON +#undef LDBL_EPSILON +#define FLT_EPSILON __FLT_EPSILON__ +#define DBL_EPSILON __DBL_EPSILON__ +#define LDBL_EPSILON __LDBL_EPSILON__ + + +#undef FLT_MIN +#undef DBL_MIN +#undef LDBL_MIN +#define FLT_MIN __FLT_MIN__ +#define DBL_MIN __DBL_MIN__ +#define LDBL_MIN __LDBL_MIN__ + + + +#undef FLT_ROUNDS +#define FLT_ROUNDS 1 +# 41 "/usr/include/unicode/utypes.h" 2 3 4 +# 59 "/usr/include/unicode/utypes.h" 3 4 +#define U_SHOW_CPLUSPLUS_API 1 +# 116 "/usr/include/unicode/utypes.h" 3 4 +#define U_ASCII_FAMILY 0 + + + + + +#define U_EBCDIC_FAMILY 1 +# 168 "/usr/include/unicode/utypes.h" 3 4 +#define U_CHARSET_FAMILY 0 +# 192 "/usr/include/unicode/utypes.h" 3 4 +#define U_CHARSET_IS_UTF8 0 +# 232 "/usr/include/unicode/utypes.h" 3 4 +#define U_ICUDATA_TYPE_LETTER "l" +#define U_ICUDATA_TYPE_LITLETTER l +# 242 "/usr/include/unicode/utypes.h" 3 4 +#define U_ICUDATA_NAME "icudt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER +#define U_USRDATA_NAME "usrdt" U_ICU_VERSION_SHORT U_ICUDATA_TYPE_LETTER +#define U_USE_USRDATA 1 +# 257 "/usr/include/unicode/utypes.h" 3 4 +#define U_ICUDATA_ENTRY_POINT U_DEF2_ICUDATA_ENTRY_POINT(U_ICU_VERSION_MAJOR_NUM, U_ICU_VERSION_MINOR_NUM) + + + + + +#define U_DEF2_ICUDATA_ENTRY_POINT(major,minor) U_DEF_ICUDATA_ENTRY_POINT(major, minor) + + + + + + +#define U_DEF_ICUDATA_ENTRY_POINT(major,minor) icudt ##major ##minor ##_dat +# 287 "/usr/include/unicode/utypes.h" 3 4 +#define U_CALLCONV U_EXPORT2 +# 314 "/usr/include/unicode/utypes.h" 3 4 +typedef double UDate; + + +#define U_MILLIS_PER_SECOND (1000) + +#define U_MILLIS_PER_MINUTE (60000) + +#define U_MILLIS_PER_HOUR (3600000) + +#define U_MILLIS_PER_DAY (86400000) + + + + + +#define U_DATE_MAX DBL_MAX + + + + + +#define U_DATE_MIN -U_DATE_MAX +# 385 "/usr/include/unicode/utypes.h" 3 4 +typedef void* UClassID; +# 519 "/usr/include/unicode/utypes.h" 3 4 +#define U_DATA_API U_IMPORT +#define U_COMMON_API U_IMPORT +#define U_I18N_API U_IMPORT +#define U_LAYOUT_API U_IMPORT +#define U_LAYOUTEX_API U_IMPORT +#define U_IO_API U_IMPORT +#define U_TOOLUTIL_API U_IMPORT +# 534 "/usr/include/unicode/utypes.h" 3 4 +#define U_STANDARD_CPP_NAMESPACE :: +# 639 "/usr/include/unicode/utypes.h" 3 4 +typedef enum UErrorCode { + + + + + + U_USING_FALLBACK_WARNING = -128, + + U_ERROR_WARNING_START = -128, + + U_USING_DEFAULT_WARNING = -127, + + U_SAFECLONE_ALLOCATED_WARNING = -126, + + U_STATE_OLD_WARNING = -125, + + U_STRING_NOT_TERMINATED_WARNING = -124, + + U_SORT_KEY_TOO_SHORT_WARNING = -123, + + U_AMBIGUOUS_ALIAS_WARNING = -122, + + U_DIFFERENT_UCA_VERSION = -121, + + U_PLUGIN_CHANGED_LEVEL_WARNING = -120, + + U_ERROR_WARNING_LIMIT, + + + U_ZERO_ERROR = 0, + + U_ILLEGAL_ARGUMENT_ERROR = 1, + U_MISSING_RESOURCE_ERROR = 2, + U_INVALID_FORMAT_ERROR = 3, + U_FILE_ACCESS_ERROR = 4, + U_INTERNAL_PROGRAM_ERROR = 5, + U_MESSAGE_PARSE_ERROR = 6, + U_MEMORY_ALLOCATION_ERROR = 7, + U_INDEX_OUTOFBOUNDS_ERROR = 8, + U_PARSE_ERROR = 9, + U_INVALID_CHAR_FOUND = 10, + U_TRUNCATED_CHAR_FOUND = 11, + U_ILLEGAL_CHAR_FOUND = 12, + U_INVALID_TABLE_FORMAT = 13, + U_INVALID_TABLE_FILE = 14, + U_BUFFER_OVERFLOW_ERROR = 15, + U_UNSUPPORTED_ERROR = 16, + U_RESOURCE_TYPE_MISMATCH = 17, + U_ILLEGAL_ESCAPE_SEQUENCE = 18, + U_UNSUPPORTED_ESCAPE_SEQUENCE = 19, + U_NO_SPACE_AVAILABLE = 20, + U_CE_NOT_FOUND_ERROR = 21, + U_PRIMARY_TOO_LONG_ERROR = 22, + U_STATE_TOO_OLD_ERROR = 23, + U_TOO_MANY_ALIASES_ERROR = 24, + + U_ENUM_OUT_OF_SYNC_ERROR = 25, + U_INVARIANT_CONVERSION_ERROR = 26, + U_INVALID_STATE_ERROR = 27, + U_COLLATOR_VERSION_MISMATCH = 28, + U_USELESS_COLLATOR_ERROR = 29, + U_NO_WRITE_PERMISSION = 30, + + U_STANDARD_ERROR_LIMIT, + + + + U_BAD_VARIABLE_DEFINITION=0x10000, + U_PARSE_ERROR_START = 0x10000, + U_MALFORMED_RULE, + U_MALFORMED_SET, + U_MALFORMED_SYMBOL_REFERENCE, + U_MALFORMED_UNICODE_ESCAPE, + U_MALFORMED_VARIABLE_DEFINITION, + U_MALFORMED_VARIABLE_REFERENCE, + U_MISMATCHED_SEGMENT_DELIMITERS, + U_MISPLACED_ANCHOR_START, + U_MISPLACED_CURSOR_OFFSET, + U_MISPLACED_QUANTIFIER, + U_MISSING_OPERATOR, + U_MISSING_SEGMENT_CLOSE, + U_MULTIPLE_ANTE_CONTEXTS, + U_MULTIPLE_CURSORS, + U_MULTIPLE_POST_CONTEXTS, + U_TRAILING_BACKSLASH, + U_UNDEFINED_SEGMENT_REFERENCE, + U_UNDEFINED_VARIABLE, + U_UNQUOTED_SPECIAL, + U_UNTERMINATED_QUOTE, + U_RULE_MASK_ERROR, + U_MISPLACED_COMPOUND_FILTER, + U_MULTIPLE_COMPOUND_FILTERS, + U_INVALID_RBT_SYNTAX, + U_INVALID_PROPERTY_PATTERN, + U_MALFORMED_PRAGMA, + U_UNCLOSED_SEGMENT, + U_ILLEGAL_CHAR_IN_SEGMENT, + U_VARIABLE_RANGE_EXHAUSTED, + U_VARIABLE_RANGE_OVERLAP, + U_ILLEGAL_CHARACTER, + U_INTERNAL_TRANSLITERATOR_ERROR, + U_INVALID_ID, + U_INVALID_FUNCTION, + U_PARSE_ERROR_LIMIT, + + + + + U_UNEXPECTED_TOKEN=0x10100, + U_FMT_PARSE_ERROR_START=0x10100, + U_MULTIPLE_DECIMAL_SEPARATORS, + U_MULTIPLE_DECIMAL_SEPERATORS = U_MULTIPLE_DECIMAL_SEPARATORS, + U_MULTIPLE_EXPONENTIAL_SYMBOLS, + U_MALFORMED_EXPONENTIAL_PATTERN, + U_MULTIPLE_PERCENT_SYMBOLS, + U_MULTIPLE_PERMILL_SYMBOLS, + U_MULTIPLE_PAD_SPECIFIERS, + U_PATTERN_SYNTAX_ERROR, + U_ILLEGAL_PAD_POSITION, + U_UNMATCHED_BRACES, + U_UNSUPPORTED_PROPERTY, + U_UNSUPPORTED_ATTRIBUTE, + U_ARGUMENT_TYPE_MISMATCH, + U_DUPLICATE_KEYWORD, + U_UNDEFINED_KEYWORD, + U_DEFAULT_KEYWORD_MISSING, + U_DECIMAL_NUMBER_SYNTAX_ERROR, + U_FORMAT_INEXACT_ERROR, + U_FMT_PARSE_ERROR_LIMIT, + + + + + U_BRK_INTERNAL_ERROR=0x10200, + U_BRK_ERROR_START=0x10200, + U_BRK_HEX_DIGITS_EXPECTED, + U_BRK_SEMICOLON_EXPECTED, + U_BRK_RULE_SYNTAX, + U_BRK_UNCLOSED_SET, + U_BRK_ASSIGN_ERROR, + U_BRK_VARIABLE_REDFINITION, + U_BRK_MISMATCHED_PAREN, + U_BRK_NEW_LINE_IN_QUOTED_STRING, + U_BRK_UNDEFINED_VARIABLE, + U_BRK_INIT_ERROR, + U_BRK_RULE_EMPTY_SET, + U_BRK_UNRECOGNIZED_OPTION, + U_BRK_MALFORMED_RULE_TAG, + U_BRK_ERROR_LIMIT, + + + + + U_REGEX_INTERNAL_ERROR=0x10300, + U_REGEX_ERROR_START=0x10300, + U_REGEX_RULE_SYNTAX, + U_REGEX_INVALID_STATE, + U_REGEX_BAD_ESCAPE_SEQUENCE, + U_REGEX_PROPERTY_SYNTAX, + U_REGEX_UNIMPLEMENTED, + U_REGEX_MISMATCHED_PAREN, + U_REGEX_NUMBER_TOO_BIG, + U_REGEX_BAD_INTERVAL, + U_REGEX_MAX_LT_MIN, + U_REGEX_INVALID_BACK_REF, + U_REGEX_INVALID_FLAG, + U_REGEX_LOOK_BEHIND_LIMIT, + U_REGEX_SET_CONTAINS_STRING, + U_REGEX_OCTAL_TOO_BIG, + U_REGEX_MISSING_CLOSE_BRACKET, + U_REGEX_INVALID_RANGE, + U_REGEX_STACK_OVERFLOW, + U_REGEX_TIME_OUT, + U_REGEX_STOPPED_BY_CALLER, + U_REGEX_ERROR_LIMIT, + + + + + U_IDNA_PROHIBITED_ERROR=0x10400, + U_IDNA_ERROR_START=0x10400, + U_IDNA_UNASSIGNED_ERROR, + U_IDNA_CHECK_BIDI_ERROR, + U_IDNA_STD3_ASCII_RULES_ERROR, + U_IDNA_ACE_PREFIX_ERROR, + U_IDNA_VERIFICATION_ERROR, + U_IDNA_LABEL_TOO_LONG_ERROR, + U_IDNA_ZERO_LENGTH_LABEL_ERROR, + U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR, + U_IDNA_ERROR_LIMIT, + + + + U_STRINGPREP_PROHIBITED_ERROR = U_IDNA_PROHIBITED_ERROR, + U_STRINGPREP_UNASSIGNED_ERROR = U_IDNA_UNASSIGNED_ERROR, + U_STRINGPREP_CHECK_BIDI_ERROR = U_IDNA_CHECK_BIDI_ERROR, + + + + + U_PLUGIN_ERROR_START=0x10500, + U_PLUGIN_TOO_HIGH=0x10500, + U_PLUGIN_DIDNT_SET_LEVEL, + U_PLUGIN_ERROR_LIMIT, + + U_ERROR_LIMIT=U_PLUGIN_ERROR_LIMIT +} UErrorCode; +# 855 "/usr/include/unicode/utypes.h" 3 4 + static + inline UBool U_SUCCESS(UErrorCode code) { return (UBool)(code<=U_ZERO_ERROR); } + + + + + static + inline UBool U_FAILURE(UErrorCode code) { return (UBool)(code>U_ZERO_ERROR); } +# 882 "/usr/include/unicode/utypes.h" 3 4 +extern "C" __attribute__((visibility("default"))) const char * +u_errorName_48(UErrorCode code); +# 87 "/usr/include/unicode/ucnv_err.h" 2 3 4 + + + + +struct UConverter; + + +typedef struct UConverter UConverter; + + + + + +#define UCNV_SUB_STOP_ON_ILLEGAL "i" + + + + + +#define UCNV_SKIP_STOP_ON_ILLEGAL "i" + + + + + +#define UCNV_ESCAPE_ICU NULL + + + + +#define UCNV_ESCAPE_JAVA "J" + + + + + +#define UCNV_ESCAPE_C "C" + + + + + +#define UCNV_ESCAPE_XML_DEC "D" + + + + + +#define UCNV_ESCAPE_XML_HEX "X" + + + + +#define UCNV_ESCAPE_UNICODE "U" + + + + + + +#define UCNV_ESCAPE_CSS2 "S" + + + + + + + +typedef enum { + UCNV_UNASSIGNED = 0, + + UCNV_ILLEGAL = 1, + + + + + + + + UCNV_IRREGULAR = 2, + + + + + UCNV_RESET = 3, + + + UCNV_CLOSE = 4, + + UCNV_CLONE = 5 +# 185 "/usr/include/unicode/ucnv_err.h" 3 4 +} UConverterCallbackReason; + + + + + + +typedef struct { + uint16_t size; + UBool flush; + UConverter *converter; + const UChar *source; + const UChar *sourceLimit; + char *target; + const char *targetLimit; + int32_t *offsets; +} UConverterFromUnicodeArgs; + + + + + + +typedef struct { + uint16_t size; + UBool flush; + UConverter *converter; + const char *source; + const char *sourceLimit; + UChar *target; + const UChar *targetLimit; + int32_t *offsets; +} UConverterToUnicodeArgs; +# 234 "/usr/include/unicode/ucnv_err.h" 3 4 +extern "C" __attribute__((visibility("default"))) void UCNV_FROM_U_CALLBACK_STOP_48 ( + const void *context, + UConverterFromUnicodeArgs *fromUArgs, + const UChar* codeUnits, + int32_t length, + UChar32 codePoint, + UConverterCallbackReason reason, + UErrorCode * err); +# 258 "/usr/include/unicode/ucnv_err.h" 3 4 +extern "C" __attribute__((visibility("default"))) void UCNV_TO_U_CALLBACK_STOP_48 ( + const void *context, + UConverterToUnicodeArgs *toUArgs, + const char* codeUnits, + int32_t length, + UConverterCallbackReason reason, + UErrorCode * err); +# 285 "/usr/include/unicode/ucnv_err.h" 3 4 +extern "C" __attribute__((visibility("default"))) void UCNV_FROM_U_CALLBACK_SKIP_48 ( + const void *context, + UConverterFromUnicodeArgs *fromUArgs, + const UChar* codeUnits, + int32_t length, + UChar32 codePoint, + UConverterCallbackReason reason, + UErrorCode * err); +# 315 "/usr/include/unicode/ucnv_err.h" 3 4 +extern "C" __attribute__((visibility("default"))) void UCNV_FROM_U_CALLBACK_SUBSTITUTE_48 ( + const void *context, + UConverterFromUnicodeArgs *fromUArgs, + const UChar* codeUnits, + int32_t length, + UChar32 codePoint, + UConverterCallbackReason reason, + UErrorCode * err); +# 371 "/usr/include/unicode/ucnv_err.h" 3 4 +extern "C" __attribute__((visibility("default"))) void UCNV_FROM_U_CALLBACK_ESCAPE_48 ( + const void *context, + UConverterFromUnicodeArgs *fromUArgs, + const UChar* codeUnits, + int32_t length, + UChar32 codePoint, + UConverterCallbackReason reason, + UErrorCode * err); +# 399 "/usr/include/unicode/ucnv_err.h" 3 4 +extern "C" __attribute__((visibility("default"))) void UCNV_TO_U_CALLBACK_SKIP_48 ( + const void *context, + UConverterToUnicodeArgs *toUArgs, + const char* codeUnits, + int32_t length, + UConverterCallbackReason reason, + UErrorCode * err); +# 425 "/usr/include/unicode/ucnv_err.h" 3 4 +extern "C" __attribute__((visibility("default"))) void UCNV_TO_U_CALLBACK_SUBSTITUTE_48 ( + const void *context, + UConverterToUnicodeArgs *toUArgs, + const char* codeUnits, + int32_t length, + UConverterCallbackReason reason, + UErrorCode * err); +# 451 "/usr/include/unicode/ucnv_err.h" 3 4 +extern "C" __attribute__((visibility("default"))) void UCNV_TO_U_CALLBACK_ESCAPE_48 ( + const void *context, + UConverterToUnicodeArgs *toUArgs, + const char* codeUnits, + int32_t length, + UConverterCallbackReason reason, + UErrorCode * err); +# 51 "/usr/include/unicode/ucnv.h" 2 3 4 +# 1 "/usr/include/unicode/uenum.h" 1 3 4 +# 18 "/usr/include/unicode/uenum.h" 3 4 +#define __UENUM_H + + +# 1 "/usr/include/unicode/localpointer.h" 1 3 4 +# 18 "/usr/include/unicode/localpointer.h" 3 4 +#define __LOCALPOINTER_H__ +# 43 "/usr/include/unicode/localpointer.h" 3 4 +extern "C++" { namespace icu_48 { +# 63 "/usr/include/unicode/localpointer.h" 3 4 +template +class LocalPointerBase { +public: + + + + + + explicit LocalPointerBase(T *p=__null) : ptr(p) {} + + + + + + ~LocalPointerBase() { } + + + + + + UBool isNull() const { return ptr==__null; } + + + + + + UBool isValid() const { return ptr!=__null; } + + + + + + + + bool operator==(const T *other) const { return ptr==other; } + + + + + + + + bool operator!=(const T *other) const { return ptr!=other; } + + + + + + T *getAlias() const { return ptr; } + + + + + + T &operator*() const { return *ptr; } + + + + + + T *operator->() const { return ptr; } + + + + + + + T *orphan() { + T *p=ptr; + ptr=__null; + return p; + } + + + + + + + + void adoptInstead(T *p) { + + ptr=p; + } +protected: + T *ptr; +private: + + bool operator==(const LocalPointerBase &other); + bool operator!=(const LocalPointerBase &other); + + LocalPointerBase(const LocalPointerBase &other); + void operator=(const LocalPointerBase &other); + + static void * operator new(size_t size); + static void * operator new[](size_t size); + + static void * operator new(size_t, void *ptr); + +}; +# 181 "/usr/include/unicode/localpointer.h" 3 4 +template +class LocalPointer : public LocalPointerBase { +public: + + + + + + explicit LocalPointer(T *p=__null) : LocalPointerBase(p) {} + + + + + ~LocalPointer() { + delete LocalPointerBase::ptr; + } + + + + + + + void adoptInstead(T *p) { + delete LocalPointerBase::ptr; + LocalPointerBase::ptr=p; + } +}; +# 227 "/usr/include/unicode/localpointer.h" 3 4 +template +class LocalArray : public LocalPointerBase { +public: + + + + + + explicit LocalArray(T *p=__null) : LocalPointerBase(p) {} + + + + + ~LocalArray() { + delete[] LocalPointerBase::ptr; + } + + + + + + + void adoptInstead(T *p) { + delete[] LocalPointerBase::ptr; + LocalPointerBase::ptr=p; + } + + + + + + + + T &operator[](ptrdiff_t i) const { return LocalPointerBase::ptr[i]; } +}; +# 286 "/usr/include/unicode/localpointer.h" 3 4 +#define U_DEFINE_LOCAL_OPEN_POINTER(LocalPointerClassName,Type,closeFunction) class LocalPointerClassName : public LocalPointerBase { public: explicit LocalPointerClassName(Type *p=NULL) : LocalPointerBase(p) {} ~LocalPointerClassName() { closeFunction(ptr); } void adoptInstead(Type *p) { closeFunction(ptr); ptr=p; } } +# 297 "/usr/include/unicode/localpointer.h" 3 4 +} } +# 22 "/usr/include/unicode/uenum.h" 2 3 4 + + +# 1 "/usr/include/unicode/strenum.h" 1 3 4 +# 11 "/usr/include/unicode/strenum.h" 3 4 +#define STRENUM_H + +# 1 "/usr/include/unicode/uobject.h" 1 3 4 +# 18 "/usr/include/unicode/uobject.h" 3 4 +#define __UOBJECT_H__ + + + +extern "C++" { namespace icu_48 { +# 63 "/usr/include/unicode/uobject.h" 3 4 +#define U_HAVE_DEBUG_LOCATION_NEW 0 +# 81 "/usr/include/unicode/uobject.h" 3 4 +#define U_NO_THROW throw() +# 101 "/usr/include/unicode/uobject.h" 3 4 +class UMemory { +public: +# 120 "/usr/include/unicode/uobject.h" 3 4 + static void * operator new(size_t size) throw(); + + + + + + + static void * operator new[](size_t size) throw(); +# 137 "/usr/include/unicode/uobject.h" 3 4 + static void operator delete(void *p) throw(); + + + + + + + static void operator delete[](void *p) throw(); + + + + + + + + static inline void * operator new(size_t, void *ptr) throw() { return ptr; } + + + + + + + static inline void operator delete(void *, void *) throw() {} +# 191 "/usr/include/unicode/uobject.h" 3 4 +}; +# 215 "/usr/include/unicode/uobject.h" 3 4 +class UObject : public UMemory { +public: + + + + + + virtual ~UObject(); + + + + + + + virtual UClassID getDynamicClassID() const = 0; + +protected: +# 288 "/usr/include/unicode/uobject.h" 3 4 +}; +# 297 "/usr/include/unicode/uobject.h" 3 4 +#define UOBJECT_DEFINE_RTTI_IMPLEMENTATION(myClass) UClassID U_EXPORT2 myClass::getStaticClassID() { static char classID = 0; return (UClassID)&classID; } UClassID myClass::getDynamicClassID() const { return myClass::getStaticClassID(); } +# 314 "/usr/include/unicode/uobject.h" 3 4 +#define UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION(myClass) UClassID U_EXPORT2 myClass::getStaticClassID() { static char classID = 0; return (UClassID)&classID; } +# 330 "/usr/include/unicode/uobject.h" 3 4 +#define UOBJECT_DEFINE_NO_RTTI_IMPLEMENTATION(myClass) UClassID myClass::getDynamicClassID() const { return NULL; } +# 350 "/usr/include/unicode/uobject.h" 3 4 +} } +# 14 "/usr/include/unicode/strenum.h" 2 3 4 +# 1 "/usr/include/unicode/unistr.h" 1 3 4 +# 22 "/usr/include/unicode/unistr.h" 3 4 +#define UNISTR_H + + + + + + + +# 1 "/usr/include/unicode/rep.h" 1 3 4 +# 15 "/usr/include/unicode/rep.h" 3 4 +#define REP_H +# 24 "/usr/include/unicode/rep.h" 3 4 +extern "C++" { namespace icu_48 { + +class UnicodeString; +# 71 "/usr/include/unicode/rep.h" 3 4 +class Replaceable : public UObject { + +public: + + + + + virtual ~Replaceable(); + + + + + + + inline int32_t length() const; +# 94 "/usr/include/unicode/rep.h" 3 4 + inline UChar charAt(int32_t offset) const; +# 108 "/usr/include/unicode/rep.h" 3 4 + inline UChar32 char32At(int32_t offset) const; +# 120 "/usr/include/unicode/rep.h" 3 4 + virtual void extractBetween(int32_t start, + int32_t limit, + UnicodeString& target) const = 0; +# 144 "/usr/include/unicode/rep.h" 3 4 + virtual void handleReplaceBetween(int32_t start, + int32_t limit, + const UnicodeString& text) = 0; +# 172 "/usr/include/unicode/rep.h" 3 4 + virtual void copy(int32_t start, int32_t limit, int32_t dest) = 0; +# 183 "/usr/include/unicode/rep.h" 3 4 + virtual UBool hasMetaData() const; +# 200 "/usr/include/unicode/rep.h" 3 4 + virtual Replaceable *clone() const; + +protected: + + + + + + Replaceable(); +# 225 "/usr/include/unicode/rep.h" 3 4 + virtual int32_t getLength() const = 0; + + + + + + virtual UChar getCharAt(int32_t offset) const = 0; + + + + + + virtual UChar32 getChar32At(int32_t offset) const = 0; +}; + +inline int32_t +Replaceable::length() const { + return getLength(); +} + +inline UChar +Replaceable::charAt(int32_t offset) const { + return getCharAt(offset); +} + +inline UChar32 +Replaceable::char32At(int32_t offset) const { + return getChar32At(offset); +} + + + +} } +# 31 "/usr/include/unicode/unistr.h" 2 3 4 +# 1 "/usr/include/unicode/std_string.h" 1 3 4 +# 18 "/usr/include/unicode/std_string.h" 3 4 +#define __STD_STRING_H__ +# 66 "/usr/include/unicode/std_string.h" 3 4 +#define U_STD_NS std +#define U_STD_NSQ U_STD_NS:: +#define U_STD_NS_USE using namespace U_STD_NS; +# 32 "/usr/include/unicode/unistr.h" 2 3 4 +# 1 "/usr/include/unicode/stringpiece.h" 1 3 4 +# 21 "/usr/include/unicode/stringpiece.h" 3 4 +#define __STRINGPIECE_H__ +# 34 "/usr/include/unicode/stringpiece.h" 3 4 +extern "C++" { namespace icu_48 { +# 52 "/usr/include/unicode/stringpiece.h" 3 4 +class StringPiece : public UMemory { + private: + const char* ptr_; + int32_t length_; + + public: + + + + + StringPiece() : ptr_(__null), length_(0) { } + + + + + + StringPiece(const char* str); + + + + + + StringPiece(const std:: string& str) + : ptr_(str.data()), length_(static_cast(str.size())) { } + + + + + + + + StringPiece(const char* offset, int32_t len) : ptr_(offset), length_(len) { } + + + + + + + StringPiece(const StringPiece& x, int32_t pos); +# 99 "/usr/include/unicode/stringpiece.h" 3 4 + StringPiece(const StringPiece& x, int32_t pos, int32_t len); +# 111 "/usr/include/unicode/stringpiece.h" 3 4 + const char* data() const { return ptr_; } + + + + + + int32_t size() const { return length_; } + + + + + + int32_t length() const { return length_; } + + + + + + UBool empty() const { return length_ == 0; } + + + + + + void clear() { ptr_ = __null; length_ = 0; } + + + + + + + + void set(const char* xdata, int32_t len) { ptr_ = xdata; length_ = len; } + + + + + + + void set(const char* str); + + + + + + + void remove_prefix(int32_t n) { + if (n >= 0) { + if (n > length_) { + n = length_; + } + ptr_ += n; + length_ -= n; + } + } + + + + + + + void remove_suffix(int32_t n) { + if (n >= 0) { + if (n <= length_) { + length_ -= n; + } else { + length_ = 0; + } + } + } + + + + + + static const int32_t npos = 0x7fffffff; +# 196 "/usr/include/unicode/stringpiece.h" 3 4 + StringPiece substr(int32_t pos, int32_t len = npos) const { + return StringPiece(*this, pos, len); + } +}; +# 208 "/usr/include/unicode/stringpiece.h" 3 4 +__attribute__((visibility("default"))) UBool +operator==(const StringPiece& x, const StringPiece& y); +# 218 "/usr/include/unicode/stringpiece.h" 3 4 +inline UBool operator!=(const StringPiece& x, const StringPiece& y) { + return !(x == y); +} + +} } +# 33 "/usr/include/unicode/unistr.h" 2 3 4 +# 1 "/usr/include/unicode/bytestream.h" 1 3 4 +# 31 "/usr/include/unicode/bytestream.h" 3 4 +#define __BYTESTREAM_H__ +# 42 "/usr/include/unicode/bytestream.h" 3 4 +extern "C++" { namespace icu_48 { + + + + + +class ByteSink : public UMemory { +public: + + + + + ByteSink() { } + + + + + virtual ~ByteSink() { } + + + + + + + + virtual void Append(const char* bytes, int32_t n) = 0; +# 111 "/usr/include/unicode/bytestream.h" 3 4 + virtual char* GetAppendBuffer(int32_t min_capacity, + int32_t desired_capacity_hint, + char* scratch, int32_t scratch_capacity, + int32_t* result_capacity); +# 124 "/usr/include/unicode/bytestream.h" 3 4 + virtual void Flush(); + +private: + ByteSink(const ByteSink &); + ByteSink &operator=(const ByteSink &); +}; +# 143 "/usr/include/unicode/bytestream.h" 3 4 +class CheckedArrayByteSink : public ByteSink { +public: + + + + + + + CheckedArrayByteSink(char* outbuf, int32_t capacity); +# 160 "/usr/include/unicode/bytestream.h" 3 4 + virtual CheckedArrayByteSink& Reset(); + + + + + + + virtual void Append(const char* bytes, int32_t n); +# 182 "/usr/include/unicode/bytestream.h" 3 4 + virtual char* GetAppendBuffer(int32_t min_capacity, + int32_t desired_capacity_hint, + char* scratch, int32_t scratch_capacity, + int32_t* result_capacity); + + + + + + int32_t NumberOfBytesWritten() const { return size_; } + + + + + + + UBool Overflowed() const { return overflowed_; } + + + + + + + + int32_t NumberOfBytesAppended() const { return appended_; } +private: + char* outbuf_; + const int32_t capacity_; + int32_t size_; + int32_t appended_; + UBool overflowed_; + CheckedArrayByteSink(); + CheckedArrayByteSink(const CheckedArrayByteSink &); + CheckedArrayByteSink &operator=(const CheckedArrayByteSink &); +}; +# 225 "/usr/include/unicode/bytestream.h" 3 4 +template +class StringByteSink : public ByteSink { + public: + + + + + + StringByteSink(StringClass* dest) : dest_(dest) { } + + + + + + + virtual void Append(const char* data, int32_t n) { dest_->append(data, n); } + private: + StringClass* dest_; + StringByteSink(); + StringByteSink(const StringByteSink &); + StringByteSink &operator=(const StringByteSink &); +}; + + + +} } +# 34 "/usr/include/unicode/unistr.h" 2 3 4 + +struct UConverter; +class StringThreadTest; +# 45 "/usr/include/unicode/unistr.h" 3 4 +#define U_COMPARE_CODE_POINT_ORDER 0x8000 + + + + + + +extern "C" __attribute__((visibility("default"))) int32_t +u_strlen_48(const UChar *s); + + +extern "C++" { namespace icu_48 { + +class BreakIterator; +class Locale; +class StringCharacterIterator; +class UnicodeStringAppendable; +# 75 "/usr/include/unicode/unistr.h" 3 4 +#define US_INV U_NAMESPACE_QUALIFIER UnicodeString::kInvariant +# 101 "/usr/include/unicode/unistr.h" 3 4 +#define UNICODE_STRING(cs,_length) U_NAMESPACE_QUALIFIER UnicodeString(cs, _length, US_INV) +# 117 "/usr/include/unicode/unistr.h" 3 4 +#define UNICODE_STRING_SIMPLE(cs) UNICODE_STRING(cs, -1) +# 188 "/usr/include/unicode/unistr.h" 3 4 +class UnicodeString : public Replaceable +{ +public: +# 200 "/usr/include/unicode/unistr.h" 3 4 + enum EInvariant { + + + + + kInvariant + }; +# 221 "/usr/include/unicode/unistr.h" 3 4 + inline UBool operator== (const UnicodeString& text) const; +# 230 "/usr/include/unicode/unistr.h" 3 4 + inline UBool operator!= (const UnicodeString& text) const; +# 239 "/usr/include/unicode/unistr.h" 3 4 + inline UBool operator> (const UnicodeString& text) const; +# 248 "/usr/include/unicode/unistr.h" 3 4 + inline UBool operator< (const UnicodeString& text) const; +# 257 "/usr/include/unicode/unistr.h" 3 4 + inline UBool operator>= (const UnicodeString& text) const; +# 266 "/usr/include/unicode/unistr.h" 3 4 + inline UBool operator<= (const UnicodeString& text) const; +# 279 "/usr/include/unicode/unistr.h" 3 4 + inline int8_t compare(const UnicodeString& text) const; +# 295 "/usr/include/unicode/unistr.h" 3 4 + inline int8_t compare(int32_t start, + int32_t length, + const UnicodeString& text) const; +# 316 "/usr/include/unicode/unistr.h" 3 4 + inline int8_t compare(int32_t start, + int32_t length, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const; +# 334 "/usr/include/unicode/unistr.h" 3 4 + inline int8_t compare(const UChar *srcChars, + int32_t srcLength) const; +# 351 "/usr/include/unicode/unistr.h" 3 4 + inline int8_t compare(int32_t start, + int32_t length, + const UChar *srcChars) const; +# 372 "/usr/include/unicode/unistr.h" 3 4 + inline int8_t compare(int32_t start, + int32_t length, + const UChar *srcChars, + int32_t srcStart, + int32_t srcLength) const; +# 395 "/usr/include/unicode/unistr.h" 3 4 + inline int8_t compareBetween(int32_t start, + int32_t limit, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLimit) const; +# 418 "/usr/include/unicode/unistr.h" 3 4 + inline int8_t compareCodePointOrder(const UnicodeString& text) const; +# 439 "/usr/include/unicode/unistr.h" 3 4 + inline int8_t compareCodePointOrder(int32_t start, + int32_t length, + const UnicodeString& srcText) const; +# 464 "/usr/include/unicode/unistr.h" 3 4 + inline int8_t compareCodePointOrder(int32_t start, + int32_t length, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const; +# 488 "/usr/include/unicode/unistr.h" 3 4 + inline int8_t compareCodePointOrder(const UChar *srcChars, + int32_t srcLength) const; +# 510 "/usr/include/unicode/unistr.h" 3 4 + inline int8_t compareCodePointOrder(int32_t start, + int32_t length, + const UChar *srcChars) const; +# 535 "/usr/include/unicode/unistr.h" 3 4 + inline int8_t compareCodePointOrder(int32_t start, + int32_t length, + const UChar *srcChars, + int32_t srcStart, + int32_t srcLength) const; +# 562 "/usr/include/unicode/unistr.h" 3 4 + inline int8_t compareCodePointOrderBetween(int32_t start, + int32_t limit, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLimit) const; +# 586 "/usr/include/unicode/unistr.h" 3 4 + inline int8_t caseCompare(const UnicodeString& text, uint32_t options) const; +# 608 "/usr/include/unicode/unistr.h" 3 4 + inline int8_t caseCompare(int32_t start, + int32_t length, + const UnicodeString& srcText, + uint32_t options) const; +# 635 "/usr/include/unicode/unistr.h" 3 4 + inline int8_t caseCompare(int32_t start, + int32_t length, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength, + uint32_t options) const; +# 661 "/usr/include/unicode/unistr.h" 3 4 + inline int8_t caseCompare(const UChar *srcChars, + int32_t srcLength, + uint32_t options) const; +# 685 "/usr/include/unicode/unistr.h" 3 4 + inline int8_t caseCompare(int32_t start, + int32_t length, + const UChar *srcChars, + uint32_t options) const; +# 712 "/usr/include/unicode/unistr.h" 3 4 + inline int8_t caseCompare(int32_t start, + int32_t length, + const UChar *srcChars, + int32_t srcStart, + int32_t srcLength, + uint32_t options) const; +# 741 "/usr/include/unicode/unistr.h" 3 4 + inline int8_t caseCompareBetween(int32_t start, + int32_t limit, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLimit, + uint32_t options) const; +# 755 "/usr/include/unicode/unistr.h" 3 4 + inline UBool startsWith(const UnicodeString& text) const; +# 767 "/usr/include/unicode/unistr.h" 3 4 + inline UBool startsWith(const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const; +# 779 "/usr/include/unicode/unistr.h" 3 4 + inline UBool startsWith(const UChar *srcChars, + int32_t srcLength) const; +# 791 "/usr/include/unicode/unistr.h" 3 4 + inline UBool startsWith(const UChar *srcChars, + int32_t srcStart, + int32_t srcLength) const; +# 802 "/usr/include/unicode/unistr.h" 3 4 + inline UBool endsWith(const UnicodeString& text) const; +# 814 "/usr/include/unicode/unistr.h" 3 4 + inline UBool endsWith(const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const; +# 826 "/usr/include/unicode/unistr.h" 3 4 + inline UBool endsWith(const UChar *srcChars, + int32_t srcLength) const; +# 839 "/usr/include/unicode/unistr.h" 3 4 + inline UBool endsWith(const UChar *srcChars, + int32_t srcStart, + int32_t srcLength) const; +# 854 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t indexOf(const UnicodeString& text) const; +# 865 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t indexOf(const UnicodeString& text, + int32_t start) const; +# 879 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t indexOf(const UnicodeString& text, + int32_t start, + int32_t length) const; +# 899 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t indexOf(const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength, + int32_t start, + int32_t length) const; +# 916 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t indexOf(const UChar *srcChars, + int32_t srcLength, + int32_t start) const; +# 932 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t indexOf(const UChar *srcChars, + int32_t srcLength, + int32_t start, + int32_t length) const; +# 953 "/usr/include/unicode/unistr.h" 3 4 + int32_t indexOf(const UChar *srcChars, + int32_t srcStart, + int32_t srcLength, + int32_t start, + int32_t length) const; +# 966 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t indexOf(UChar c) const; +# 976 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t indexOf(UChar32 c) const; +# 986 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t indexOf(UChar c, + int32_t start) const; +# 998 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t indexOf(UChar32 c, + int32_t start) const; +# 1011 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t indexOf(UChar c, + int32_t start, + int32_t length) const; +# 1026 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t indexOf(UChar32 c, + int32_t start, + int32_t length) const; +# 1038 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t lastIndexOf(const UnicodeString& text) const; +# 1049 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t lastIndexOf(const UnicodeString& text, + int32_t start) const; +# 1063 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t lastIndexOf(const UnicodeString& text, + int32_t start, + int32_t length) const; +# 1083 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t lastIndexOf(const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength, + int32_t start, + int32_t length) const; +# 1099 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t lastIndexOf(const UChar *srcChars, + int32_t srcLength, + int32_t start) const; +# 1115 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t lastIndexOf(const UChar *srcChars, + int32_t srcLength, + int32_t start, + int32_t length) const; +# 1136 "/usr/include/unicode/unistr.h" 3 4 + int32_t lastIndexOf(const UChar *srcChars, + int32_t srcStart, + int32_t srcLength, + int32_t start, + int32_t length) const; +# 1149 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t lastIndexOf(UChar c) const; +# 1159 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t lastIndexOf(UChar32 c) const; +# 1169 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t lastIndexOf(UChar c, + int32_t start) const; +# 1181 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t lastIndexOf(UChar32 c, + int32_t start) const; +# 1194 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t lastIndexOf(UChar c, + int32_t start, + int32_t length) const; +# 1209 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t lastIndexOf(UChar32 c, + int32_t start, + int32_t length) const; +# 1224 "/usr/include/unicode/unistr.h" 3 4 + inline UChar charAt(int32_t offset) const; +# 1233 "/usr/include/unicode/unistr.h" 3 4 + inline UChar operator[] (int32_t offset) const; +# 1246 "/usr/include/unicode/unistr.h" 3 4 + inline UChar32 char32At(int32_t offset) const; +# 1263 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t getChar32Start(int32_t offset) const; +# 1281 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t getChar32Limit(int32_t offset) const; +# 1333 "/usr/include/unicode/unistr.h" 3 4 + int32_t moveIndex32(int32_t index, int32_t delta) const; +# 1352 "/usr/include/unicode/unistr.h" 3 4 + inline void extract(int32_t start, + int32_t length, + UChar *dst, + int32_t dstStart = 0) const; +# 1378 "/usr/include/unicode/unistr.h" 3 4 + int32_t + extract(UChar *dest, int32_t destCapacity, + UErrorCode &errorCode) const; +# 1392 "/usr/include/unicode/unistr.h" 3 4 + inline void extract(int32_t start, + int32_t length, + UnicodeString& target) const; +# 1407 "/usr/include/unicode/unistr.h" 3 4 + inline void extractBetween(int32_t start, + int32_t limit, + UChar *dst, + int32_t dstStart = 0) const; +# 1421 "/usr/include/unicode/unistr.h" 3 4 + virtual void extractBetween(int32_t start, + int32_t limit, + UnicodeString& target) const; +# 1446 "/usr/include/unicode/unistr.h" 3 4 + int32_t extract(int32_t start, + int32_t startLength, + char *target, + int32_t targetCapacity, + enum EInvariant inv) const; +# 1473 "/usr/include/unicode/unistr.h" 3 4 + int32_t extract(int32_t start, + int32_t startLength, + char *target, + uint32_t targetLength) const; +# 1507 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t extract(int32_t start, + int32_t startLength, + char *target, + const char *codepage = 0) const; +# 1541 "/usr/include/unicode/unistr.h" 3 4 + int32_t extract(int32_t start, + int32_t startLength, + char *target, + uint32_t targetLength, + const char *codepage) const; +# 1564 "/usr/include/unicode/unistr.h" 3 4 + int32_t extract(char *dest, int32_t destCapacity, + UConverter *cnv, + UErrorCode &errorCode) const; +# 1583 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString tempSubString(int32_t start=0, int32_t length=((int32_t)(2147483647))) const; +# 1595 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString tempSubStringBetween(int32_t start, int32_t limit=((int32_t)(2147483647))) const; +# 1608 "/usr/include/unicode/unistr.h" 3 4 + void toUTF8(ByteSink &sink) const; +# 1624 "/usr/include/unicode/unistr.h" 3 4 + template + StringClass &toUTF8String(StringClass &result) const { + StringByteSink sbs(&result); + toUTF8(sbs); + return result; + } +# 1648 "/usr/include/unicode/unistr.h" 3 4 + int32_t toUTF32(UChar32 *utf32, int32_t capacity, UErrorCode &errorCode) const; +# 1660 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t length(void) const; +# 1675 "/usr/include/unicode/unistr.h" 3 4 + int32_t + countChar32(int32_t start=0, int32_t length=((int32_t)(2147483647))) const; +# 1701 "/usr/include/unicode/unistr.h" 3 4 + UBool + hasMoreChar32Than(int32_t start, int32_t length, int32_t number) const; + + + + + + + inline UBool isEmpty(void) const; +# 1720 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t getCapacity(void) const; +# 1729 "/usr/include/unicode/unistr.h" 3 4 + inline int32_t hashCode(void) const; +# 1743 "/usr/include/unicode/unistr.h" 3 4 + inline UBool isBogus(void) const; +# 1759 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString &operator=(const UnicodeString &srcText); +# 1781 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString &fastCopyFrom(const UnicodeString &src); +# 1790 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& operator= (UChar ch); +# 1799 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& operator= (UChar32 ch); +# 1812 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& setTo(const UnicodeString& srcText, + int32_t srcStart); +# 1828 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& setTo(const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength); +# 1840 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& setTo(const UnicodeString& srcText); +# 1850 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& setTo(const UChar *srcChars, + int32_t srcLength); +# 1861 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString& setTo(UChar srcChar); +# 1871 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString& setTo(UChar32 srcChar); +# 1893 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString &setTo(UBool isTerminated, + const UChar *text, + int32_t textLength); +# 1916 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString &setTo(UChar *buffer, + int32_t buffLength, + int32_t buffCapacity); +# 1960 "/usr/include/unicode/unistr.h" 3 4 + void setToBogus(); +# 1969 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString& setCharAt(int32_t offset, + UChar ch); +# 1982 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& operator+= (UChar ch); +# 1991 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& operator+= (UChar32 ch); +# 2000 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& operator+= (const UnicodeString& srcText); +# 2016 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& append(const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength); +# 2027 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& append(const UnicodeString& srcText); +# 2042 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& append(const UChar *srcChars, + int32_t srcStart, + int32_t srcLength); +# 2055 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& append(const UChar *srcChars, + int32_t srcLength); + + + + + + + + inline UnicodeString& append(UChar srcChar); + + + + + + + + inline UnicodeString& append(UChar32 srcChar); +# 2090 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& insert(int32_t start, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength); +# 2103 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& insert(int32_t start, + const UnicodeString& srcText); +# 2119 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& insert(int32_t start, + const UChar *srcChars, + int32_t srcStart, + int32_t srcLength); +# 2133 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& insert(int32_t start, + const UChar *srcChars, + int32_t srcLength); +# 2145 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& insert(int32_t start, + UChar srcChar); +# 2156 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& insert(int32_t start, + UChar32 srcChar); +# 2179 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString& replace(int32_t start, + int32_t length, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength); +# 2197 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString& replace(int32_t start, + int32_t length, + const UnicodeString& srcText); +# 2218 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString& replace(int32_t start, + int32_t length, + const UChar *srcChars, + int32_t srcStart, + int32_t srcLength); +# 2236 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& replace(int32_t start, + int32_t length, + const UChar *srcChars, + int32_t srcLength); +# 2252 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& replace(int32_t start, + int32_t length, + UChar srcChar); +# 2267 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& replace(int32_t start, + int32_t length, + UChar32 srcChar); +# 2280 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& replaceBetween(int32_t start, + int32_t limit, + const UnicodeString& srcText); +# 2298 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& replaceBetween(int32_t start, + int32_t limit, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLimit); +# 2314 "/usr/include/unicode/unistr.h" 3 4 + virtual void handleReplaceBetween(int32_t start, + int32_t limit, + const UnicodeString& text); + + + + + + + virtual UBool hasMetaData() const; +# 2340 "/usr/include/unicode/unistr.h" 3 4 + virtual void copy(int32_t start, int32_t limit, int32_t dest); +# 2352 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& findAndReplace(const UnicodeString& oldText, + const UnicodeString& newText); +# 2366 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& findAndReplace(int32_t start, + int32_t length, + const UnicodeString& oldText, + const UnicodeString& newText); +# 2388 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString& findAndReplace(int32_t start, + int32_t length, + const UnicodeString& oldText, + int32_t oldStart, + int32_t oldLength, + const UnicodeString& newText, + int32_t newStart, + int32_t newLength); +# 2405 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& remove(void); +# 2415 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& remove(int32_t start, + int32_t length = (int32_t)((int32_t)(2147483647))); +# 2426 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& removeBetween(int32_t start, + int32_t limit = (int32_t)((int32_t)(2147483647))); +# 2438 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString &retainBetween(int32_t start, int32_t limit = ((int32_t)(2147483647))); +# 2453 "/usr/include/unicode/unistr.h" 3 4 + UBool padLeading(int32_t targetLength, + UChar padChar = 0x0020); +# 2467 "/usr/include/unicode/unistr.h" 3 4 + UBool padTrailing(int32_t targetLength, + UChar padChar = 0x0020); + + + + + + + + inline UBool truncate(int32_t targetLength); + + + + + + + UnicodeString& trim(void); +# 2493 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& reverse(void); +# 2503 "/usr/include/unicode/unistr.h" 3 4 + inline UnicodeString& reverse(int32_t start, + int32_t length); + + + + + + + + UnicodeString& toUpper(void); +# 2521 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString& toUpper(const Locale& locale); + + + + + + + + UnicodeString& toLower(void); +# 2538 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString& toLower(const Locale& locale); +# 2568 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString &toTitle(BreakIterator *titleIter); +# 2597 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString &toTitle(BreakIterator *titleIter, const Locale &locale); +# 2630 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString &toTitle(BreakIterator *titleIter, const Locale &locale, uint32_t options); +# 2645 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString &foldCase(uint32_t options=0 ); +# 2694 "/usr/include/unicode/unistr.h" 3 4 + UChar *getBuffer(int32_t minCapacity); +# 2716 "/usr/include/unicode/unistr.h" 3 4 + void releaseBuffer(int32_t newLength=-1); +# 2748 "/usr/include/unicode/unistr.h" 3 4 + inline const UChar *getBuffer() const; +# 2783 "/usr/include/unicode/unistr.h" 3 4 + inline const UChar *getTerminatedBuffer(); +# 2792 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString(); +# 2805 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString(int32_t capacity, UChar32 c, int32_t count); + + + + + + + UnicodeString(UChar ch); + + + + + + + UnicodeString(UChar32 ch); + + + + + + + + UnicodeString(const UChar *text); +# 2836 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString(const UChar *text, + int32_t textLength); +# 2858 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString(UBool isTerminated, + const UChar *text, + int32_t textLength); +# 2880 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString(UChar *buffer, int32_t buffLength, int32_t buffCapacity); +# 2890 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString(const char *codepageData); + + + + + + + + UnicodeString(const char *codepageData, int32_t dataLength); +# 2921 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString(const char *codepageData, const char *codepage); +# 2940 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString(const char *codepageData, int32_t dataLength, const char *codepage); +# 2963 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString( + const char *src, int32_t srcLength, + UConverter *cnv, + UErrorCode &errorCode); +# 2994 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString(const char *src, int32_t length, enum EInvariant inv); + + + + + + + + UnicodeString(const UnicodeString& that); + + + + + + + + UnicodeString(const UnicodeString& src, int32_t srcStart); +# 3019 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString(const UnicodeString& src, int32_t srcStart, int32_t srcLength); +# 3037 "/usr/include/unicode/unistr.h" 3 4 + virtual Replaceable *clone() const; + + + + + virtual ~UnicodeString(); +# 3057 "/usr/include/unicode/unistr.h" 3 4 + static UnicodeString fromUTF8(const StringPiece &utf8); +# 3070 "/usr/include/unicode/unistr.h" 3 4 + static UnicodeString fromUTF32(const UChar32 *utf32, int32_t length); +# 3108 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString unescape() const; +# 3129 "/usr/include/unicode/unistr.h" 3 4 + UChar32 unescapeAt(int32_t &offset) const; + + + + + + + static UClassID getStaticClassID(); + + + + + + + virtual UClassID getDynamicClassID() const; + + + + + +protected: + + + + + virtual int32_t getLength() const; + + + + + + + virtual UChar getCharAt(int32_t offset) const; + + + + + + + virtual UChar32 getChar32At(int32_t offset) const; + +private: + + UnicodeString &setToUTF8(const StringPiece &utf8); + + + + + + int32_t + toUTF8(int32_t start, int32_t len, + char *target, int32_t capacity) const; + + + inline int8_t + doCompare(int32_t start, + int32_t length, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const; + + int8_t doCompare(int32_t start, + int32_t length, + const UChar *srcChars, + int32_t srcStart, + int32_t srcLength) const; + + inline int8_t + doCompareCodePointOrder(int32_t start, + int32_t length, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const; + + int8_t doCompareCodePointOrder(int32_t start, + int32_t length, + const UChar *srcChars, + int32_t srcStart, + int32_t srcLength) const; + + inline int8_t + doCaseCompare(int32_t start, + int32_t length, + const UnicodeString &srcText, + int32_t srcStart, + int32_t srcLength, + uint32_t options) const; + + int8_t + doCaseCompare(int32_t start, + int32_t length, + const UChar *srcChars, + int32_t srcStart, + int32_t srcLength, + uint32_t options) const; + + int32_t doIndexOf(UChar c, + int32_t start, + int32_t length) const; + + int32_t doIndexOf(UChar32 c, + int32_t start, + int32_t length) const; + + int32_t doLastIndexOf(UChar c, + int32_t start, + int32_t length) const; + + int32_t doLastIndexOf(UChar32 c, + int32_t start, + int32_t length) const; + + void doExtract(int32_t start, + int32_t length, + UChar *dst, + int32_t dstStart) const; + + inline void doExtract(int32_t start, + int32_t length, + UnicodeString& target) const; + + inline UChar doCharAt(int32_t offset) const; + + UnicodeString& doReplace(int32_t start, + int32_t length, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength); + + UnicodeString& doReplace(int32_t start, + int32_t length, + const UChar *srcChars, + int32_t srcStart, + int32_t srcLength); + + UnicodeString& doReverse(int32_t start, + int32_t length); + + + int32_t doHashCode(void) const; + + + + inline UChar* getArrayStart(void); + inline const UChar* getArrayStart(void) const; + + + + inline UBool isWritable() const; + + + inline UBool isBufferWritable() const; + + + inline void setLength(int32_t len); + inline void setToEmpty(); + inline void setArray(UChar *array, int32_t len, int32_t capacity); + + + + + + UBool allocate(int32_t capacity); + + + void releaseArray(void); + + + void unBogus(); + + + UnicodeString ©From(const UnicodeString &src, UBool fastCopy=0); + + + inline void pinIndex(int32_t& start) const; + inline void pinIndices(int32_t& start, + int32_t& length) const; + + + + + int32_t doExtract(int32_t start, int32_t length, + char *dest, int32_t destCapacity, + UConverter *cnv, + UErrorCode &errorCode) const; +# 3325 "/usr/include/unicode/unistr.h" 3 4 + void doCodepageCreate(const char *codepageData, + int32_t dataLength, + const char *codepage); + + + + + + void + doCodepageCreate(const char *codepageData, + int32_t dataLength, + UConverter *converter, + UErrorCode &status); +# 3352 "/usr/include/unicode/unistr.h" 3 4 + UBool cloneArrayIfNeeded(int32_t newCapacity = -1, + int32_t growCapacity = -1, + UBool doCopyArray = 1, + int32_t **pBufferToDelete = 0, + UBool forceClone = 0); + + + UnicodeString & + caseMap(BreakIterator *titleIter, + const char *locale, + uint32_t options, + int32_t toWhichCase); + + + void addRef(void); + int32_t removeRef(void); + int32_t refCount(void) const; + + + enum { + + + US_STACKBUF_SIZE= sizeof(void *)==4 ? 13 : 15, + kInvalidUChar=0xffff, + kGrowSize=128, + kInvalidHashCode=0, + kEmptyHashCode=1, + + + kIsBogus=1, + kUsingStackBuffer=2, + kRefCounted=4, + kBufferIsReadonly=8, + kOpenGetBuffer=16, + + + + kShortString=kUsingStackBuffer, + kLongString=kRefCounted, + kReadonlyAlias=kBufferIsReadonly, + kWritableAlias=0 + }; + + friend class StringThreadTest; + friend class UnicodeStringAppendable; + + union StackBufferOrFields; + friend union StackBufferOrFields; +# 3436 "/usr/include/unicode/unistr.h" 3 4 + union StackBufferOrFields { + + + UChar fStackBuffer[8]; + struct { + UChar *fArray; + int32_t fCapacity; + int32_t fLength; + } fFields; + } fUnion; + UChar fRestOfStackBuffer[US_STACKBUF_SIZE-8]; + int8_t fShortLength; + uint8_t fFlags; +}; +# 3459 "/usr/include/unicode/unistr.h" 3 4 + UnicodeString +operator+ (const UnicodeString &s1, const UnicodeString &s2); +# 3470 "/usr/include/unicode/unistr.h" 3 4 +inline void +UnicodeString::pinIndex(int32_t& start) const +{ + + if(start < 0) { + start = 0; + } else if(start > length()) { + start = length(); + } +} + +inline void +UnicodeString::pinIndices(int32_t& start, + int32_t& _length) const +{ + + int32_t len = length(); + if(start < 0) { + start = 0; + } else if(start > len) { + start = len; + } + if(_length < 0) { + _length = 0; + } else if(_length > (len - start)) { + _length = (len - start); + } +} + +inline UChar* +UnicodeString::getArrayStart() +{ return (fFlags&kUsingStackBuffer) ? fUnion.fStackBuffer : fUnion.fFields.fArray; } + +inline const UChar* +UnicodeString::getArrayStart() const +{ return (fFlags&kUsingStackBuffer) ? fUnion.fStackBuffer : fUnion.fFields.fArray; } + + + + +inline int32_t +UnicodeString::length() const +{ return fShortLength>=0 ? fShortLength : fUnion.fFields.fLength; } + +inline int32_t +UnicodeString::getCapacity() const +{ return (fFlags&kUsingStackBuffer) ? US_STACKBUF_SIZE : fUnion.fFields.fCapacity; } + +inline int32_t +UnicodeString::hashCode() const +{ return doHashCode(); } + +inline UBool +UnicodeString::isBogus() const +{ return (UBool)(fFlags & kIsBogus); } + +inline UBool +UnicodeString::isWritable() const +{ return (UBool)!(fFlags&(kOpenGetBuffer|kIsBogus)); } + +inline UBool +UnicodeString::isBufferWritable() const +{ + return (UBool)( + !(fFlags&(kOpenGetBuffer|kIsBogus|kBufferIsReadonly)) && + (!(fFlags&kRefCounted) || refCount()==1)); +} + +inline const UChar * +UnicodeString::getBuffer() const { + if(fFlags&(kIsBogus|kOpenGetBuffer)) { + return 0; + } else if(fFlags&kUsingStackBuffer) { + return fUnion.fStackBuffer; + } else { + return fUnion.fFields.fArray; + } +} + + + + +inline int8_t +UnicodeString::doCompare(int32_t start, + int32_t thisLength, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const +{ + if(srcText.isBogus()) { + return (int8_t)!isBogus(); + } else { + srcText.pinIndices(srcStart, srcLength); + return doCompare(start, thisLength, srcText.getArrayStart(), srcStart, srcLength); + } +} + +inline UBool +UnicodeString::operator== (const UnicodeString& text) const +{ + if(isBogus()) { + return text.isBogus(); + } else { + int32_t len = length(), textLength = text.length(); + return + !text.isBogus() && + len == textLength && + doCompare(0, len, text, 0, textLength) == 0; + } +} + +inline UBool +UnicodeString::operator!= (const UnicodeString& text) const +{ return (! operator==(text)); } + +inline UBool +UnicodeString::operator> (const UnicodeString& text) const +{ return doCompare(0, length(), text, 0, text.length()) == 1; } + +inline UBool +UnicodeString::operator< (const UnicodeString& text) const +{ return doCompare(0, length(), text, 0, text.length()) == -1; } + +inline UBool +UnicodeString::operator>= (const UnicodeString& text) const +{ return doCompare(0, length(), text, 0, text.length()) != -1; } + +inline UBool +UnicodeString::operator<= (const UnicodeString& text) const +{ return doCompare(0, length(), text, 0, text.length()) != 1; } + +inline int8_t +UnicodeString::compare(const UnicodeString& text) const +{ return doCompare(0, length(), text, 0, text.length()); } + +inline int8_t +UnicodeString::compare(int32_t start, + int32_t _length, + const UnicodeString& srcText) const +{ return doCompare(start, _length, srcText, 0, srcText.length()); } + +inline int8_t +UnicodeString::compare(const UChar *srcChars, + int32_t srcLength) const +{ return doCompare(0, length(), srcChars, 0, srcLength); } + +inline int8_t +UnicodeString::compare(int32_t start, + int32_t _length, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const +{ return doCompare(start, _length, srcText, srcStart, srcLength); } + +inline int8_t +UnicodeString::compare(int32_t start, + int32_t _length, + const UChar *srcChars) const +{ return doCompare(start, _length, srcChars, 0, _length); } + +inline int8_t +UnicodeString::compare(int32_t start, + int32_t _length, + const UChar *srcChars, + int32_t srcStart, + int32_t srcLength) const +{ return doCompare(start, _length, srcChars, srcStart, srcLength); } + +inline int8_t +UnicodeString::compareBetween(int32_t start, + int32_t limit, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLimit) const +{ return doCompare(start, limit - start, + srcText, srcStart, srcLimit - srcStart); } + +inline int8_t +UnicodeString::doCompareCodePointOrder(int32_t start, + int32_t thisLength, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const +{ + if(srcText.isBogus()) { + return (int8_t)!isBogus(); + } else { + srcText.pinIndices(srcStart, srcLength); + return doCompareCodePointOrder(start, thisLength, srcText.getArrayStart(), srcStart, srcLength); + } +} + +inline int8_t +UnicodeString::compareCodePointOrder(const UnicodeString& text) const +{ return doCompareCodePointOrder(0, length(), text, 0, text.length()); } + +inline int8_t +UnicodeString::compareCodePointOrder(int32_t start, + int32_t _length, + const UnicodeString& srcText) const +{ return doCompareCodePointOrder(start, _length, srcText, 0, srcText.length()); } + +inline int8_t +UnicodeString::compareCodePointOrder(const UChar *srcChars, + int32_t srcLength) const +{ return doCompareCodePointOrder(0, length(), srcChars, 0, srcLength); } + +inline int8_t +UnicodeString::compareCodePointOrder(int32_t start, + int32_t _length, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const +{ return doCompareCodePointOrder(start, _length, srcText, srcStart, srcLength); } + +inline int8_t +UnicodeString::compareCodePointOrder(int32_t start, + int32_t _length, + const UChar *srcChars) const +{ return doCompareCodePointOrder(start, _length, srcChars, 0, _length); } + +inline int8_t +UnicodeString::compareCodePointOrder(int32_t start, + int32_t _length, + const UChar *srcChars, + int32_t srcStart, + int32_t srcLength) const +{ return doCompareCodePointOrder(start, _length, srcChars, srcStart, srcLength); } + +inline int8_t +UnicodeString::compareCodePointOrderBetween(int32_t start, + int32_t limit, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLimit) const +{ return doCompareCodePointOrder(start, limit - start, + srcText, srcStart, srcLimit - srcStart); } + +inline int8_t +UnicodeString::doCaseCompare(int32_t start, + int32_t thisLength, + const UnicodeString &srcText, + int32_t srcStart, + int32_t srcLength, + uint32_t options) const +{ + if(srcText.isBogus()) { + return (int8_t)!isBogus(); + } else { + srcText.pinIndices(srcStart, srcLength); + return doCaseCompare(start, thisLength, srcText.getArrayStart(), srcStart, srcLength, options); + } +} + +inline int8_t +UnicodeString::caseCompare(const UnicodeString &text, uint32_t options) const { + return doCaseCompare(0, length(), text, 0, text.length(), options); +} + +inline int8_t +UnicodeString::caseCompare(int32_t start, + int32_t _length, + const UnicodeString &srcText, + uint32_t options) const { + return doCaseCompare(start, _length, srcText, 0, srcText.length(), options); +} + +inline int8_t +UnicodeString::caseCompare(const UChar *srcChars, + int32_t srcLength, + uint32_t options) const { + return doCaseCompare(0, length(), srcChars, 0, srcLength, options); +} + +inline int8_t +UnicodeString::caseCompare(int32_t start, + int32_t _length, + const UnicodeString &srcText, + int32_t srcStart, + int32_t srcLength, + uint32_t options) const { + return doCaseCompare(start, _length, srcText, srcStart, srcLength, options); +} + +inline int8_t +UnicodeString::caseCompare(int32_t start, + int32_t _length, + const UChar *srcChars, + uint32_t options) const { + return doCaseCompare(start, _length, srcChars, 0, _length, options); +} + +inline int8_t +UnicodeString::caseCompare(int32_t start, + int32_t _length, + const UChar *srcChars, + int32_t srcStart, + int32_t srcLength, + uint32_t options) const { + return doCaseCompare(start, _length, srcChars, srcStart, srcLength, options); +} + +inline int8_t +UnicodeString::caseCompareBetween(int32_t start, + int32_t limit, + const UnicodeString &srcText, + int32_t srcStart, + int32_t srcLimit, + uint32_t options) const { + return doCaseCompare(start, limit - start, srcText, srcStart, srcLimit - srcStart, options); +} + +inline int32_t +UnicodeString::indexOf(const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength, + int32_t start, + int32_t _length) const +{ + if(!srcText.isBogus()) { + srcText.pinIndices(srcStart, srcLength); + if(srcLength > 0) { + return indexOf(srcText.getArrayStart(), srcStart, srcLength, start, _length); + } + } + return -1; +} + +inline int32_t +UnicodeString::indexOf(const UnicodeString& text) const +{ return indexOf(text, 0, text.length(), 0, length()); } + +inline int32_t +UnicodeString::indexOf(const UnicodeString& text, + int32_t start) const { + pinIndex(start); + return indexOf(text, 0, text.length(), start, length() - start); +} + +inline int32_t +UnicodeString::indexOf(const UnicodeString& text, + int32_t start, + int32_t _length) const +{ return indexOf(text, 0, text.length(), start, _length); } + +inline int32_t +UnicodeString::indexOf(const UChar *srcChars, + int32_t srcLength, + int32_t start) const { + pinIndex(start); + return indexOf(srcChars, 0, srcLength, start, length() - start); +} + +inline int32_t +UnicodeString::indexOf(const UChar *srcChars, + int32_t srcLength, + int32_t start, + int32_t _length) const +{ return indexOf(srcChars, 0, srcLength, start, _length); } + +inline int32_t +UnicodeString::indexOf(UChar c, + int32_t start, + int32_t _length) const +{ return doIndexOf(c, start, _length); } + +inline int32_t +UnicodeString::indexOf(UChar32 c, + int32_t start, + int32_t _length) const +{ return doIndexOf(c, start, _length); } + +inline int32_t +UnicodeString::indexOf(UChar c) const +{ return doIndexOf(c, 0, length()); } + +inline int32_t +UnicodeString::indexOf(UChar32 c) const +{ return indexOf(c, 0, length()); } + +inline int32_t +UnicodeString::indexOf(UChar c, + int32_t start) const { + pinIndex(start); + return doIndexOf(c, start, length() - start); +} + +inline int32_t +UnicodeString::indexOf(UChar32 c, + int32_t start) const { + pinIndex(start); + return indexOf(c, start, length() - start); +} + +inline int32_t +UnicodeString::lastIndexOf(const UChar *srcChars, + int32_t srcLength, + int32_t start, + int32_t _length) const +{ return lastIndexOf(srcChars, 0, srcLength, start, _length); } + +inline int32_t +UnicodeString::lastIndexOf(const UChar *srcChars, + int32_t srcLength, + int32_t start) const { + pinIndex(start); + return lastIndexOf(srcChars, 0, srcLength, start, length() - start); +} + +inline int32_t +UnicodeString::lastIndexOf(const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength, + int32_t start, + int32_t _length) const +{ + if(!srcText.isBogus()) { + srcText.pinIndices(srcStart, srcLength); + if(srcLength > 0) { + return lastIndexOf(srcText.getArrayStart(), srcStart, srcLength, start, _length); + } + } + return -1; +} + +inline int32_t +UnicodeString::lastIndexOf(const UnicodeString& text, + int32_t start, + int32_t _length) const +{ return lastIndexOf(text, 0, text.length(), start, _length); } + +inline int32_t +UnicodeString::lastIndexOf(const UnicodeString& text, + int32_t start) const { + pinIndex(start); + return lastIndexOf(text, 0, text.length(), start, length() - start); +} + +inline int32_t +UnicodeString::lastIndexOf(const UnicodeString& text) const +{ return lastIndexOf(text, 0, text.length(), 0, length()); } + +inline int32_t +UnicodeString::lastIndexOf(UChar c, + int32_t start, + int32_t _length) const +{ return doLastIndexOf(c, start, _length); } + +inline int32_t +UnicodeString::lastIndexOf(UChar32 c, + int32_t start, + int32_t _length) const { + return doLastIndexOf(c, start, _length); +} + +inline int32_t +UnicodeString::lastIndexOf(UChar c) const +{ return doLastIndexOf(c, 0, length()); } + +inline int32_t +UnicodeString::lastIndexOf(UChar32 c) const { + return lastIndexOf(c, 0, length()); +} + +inline int32_t +UnicodeString::lastIndexOf(UChar c, + int32_t start) const { + pinIndex(start); + return doLastIndexOf(c, start, length() - start); +} + +inline int32_t +UnicodeString::lastIndexOf(UChar32 c, + int32_t start) const { + pinIndex(start); + return lastIndexOf(c, start, length() - start); +} + +inline UBool +UnicodeString::startsWith(const UnicodeString& text) const +{ return compare(0, text.length(), text, 0, text.length()) == 0; } + +inline UBool +UnicodeString::startsWith(const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const +{ return doCompare(0, srcLength, srcText, srcStart, srcLength) == 0; } + +inline UBool +UnicodeString::startsWith(const UChar *srcChars, int32_t srcLength) const { + if(srcLength < 0) { + srcLength = u_strlen_48(srcChars); + } + return doCompare(0, srcLength, srcChars, 0, srcLength) == 0; +} + +inline UBool +UnicodeString::startsWith(const UChar *srcChars, int32_t srcStart, int32_t srcLength) const { + if(srcLength < 0) { + srcLength = u_strlen_48(srcChars); + } + return doCompare(0, srcLength, srcChars, srcStart, srcLength) == 0; +} + +inline UBool +UnicodeString::endsWith(const UnicodeString& text) const +{ return doCompare(length() - text.length(), text.length(), + text, 0, text.length()) == 0; } + +inline UBool +UnicodeString::endsWith(const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) const { + srcText.pinIndices(srcStart, srcLength); + return doCompare(length() - srcLength, srcLength, + srcText, srcStart, srcLength) == 0; +} + +inline UBool +UnicodeString::endsWith(const UChar *srcChars, + int32_t srcLength) const { + if(srcLength < 0) { + srcLength = u_strlen_48(srcChars); + } + return doCompare(length() - srcLength, srcLength, + srcChars, 0, srcLength) == 0; +} + +inline UBool +UnicodeString::endsWith(const UChar *srcChars, + int32_t srcStart, + int32_t srcLength) const { + if(srcLength < 0) { + srcLength = u_strlen_48(srcChars + srcStart); + } + return doCompare(length() - srcLength, srcLength, + srcChars, srcStart, srcLength) == 0; +} + + + + +inline UnicodeString& +UnicodeString::replace(int32_t start, + int32_t _length, + const UnicodeString& srcText) +{ return doReplace(start, _length, srcText, 0, srcText.length()); } + +inline UnicodeString& +UnicodeString::replace(int32_t start, + int32_t _length, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) +{ return doReplace(start, _length, srcText, srcStart, srcLength); } + +inline UnicodeString& +UnicodeString::replace(int32_t start, + int32_t _length, + const UChar *srcChars, + int32_t srcLength) +{ return doReplace(start, _length, srcChars, 0, srcLength); } + +inline UnicodeString& +UnicodeString::replace(int32_t start, + int32_t _length, + const UChar *srcChars, + int32_t srcStart, + int32_t srcLength) +{ return doReplace(start, _length, srcChars, srcStart, srcLength); } + +inline UnicodeString& +UnicodeString::replace(int32_t start, + int32_t _length, + UChar srcChar) +{ return doReplace(start, _length, &srcChar, 0, 1); } + +inline UnicodeString& +UnicodeString::replace(int32_t start, + int32_t _length, + UChar32 srcChar) { + UChar buffer[2]; + int32_t count = 0; + UBool isError = 0; + { if((uint32_t)(srcChar)<=0xffff) { (buffer)[(count)++]=(uint16_t)(srcChar); } else if((uint32_t)(srcChar)<=0x10ffff && (count)+1<(2)) { (buffer)[(count)++]=(uint16_t)(((srcChar)>>10)+0xd7c0); (buffer)[(count)++]=(uint16_t)(((srcChar)&0x3ff)|0xdc00); } else { (isError)=1; } }; + return doReplace(start, _length, buffer, 0, count); +} + +inline UnicodeString& +UnicodeString::replaceBetween(int32_t start, + int32_t limit, + const UnicodeString& srcText) +{ return doReplace(start, limit - start, srcText, 0, srcText.length()); } + +inline UnicodeString& +UnicodeString::replaceBetween(int32_t start, + int32_t limit, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLimit) +{ return doReplace(start, limit - start, srcText, srcStart, srcLimit - srcStart); } + +inline UnicodeString& +UnicodeString::findAndReplace(const UnicodeString& oldText, + const UnicodeString& newText) +{ return findAndReplace(0, length(), oldText, 0, oldText.length(), + newText, 0, newText.length()); } + +inline UnicodeString& +UnicodeString::findAndReplace(int32_t start, + int32_t _length, + const UnicodeString& oldText, + const UnicodeString& newText) +{ return findAndReplace(start, _length, oldText, 0, oldText.length(), + newText, 0, newText.length()); } + + + + +inline void +UnicodeString::doExtract(int32_t start, + int32_t _length, + UnicodeString& target) const +{ target.replace(0, target.length(), *this, start, _length); } + +inline void +UnicodeString::extract(int32_t start, + int32_t _length, + UChar *target, + int32_t targetStart) const +{ doExtract(start, _length, target, targetStart); } + +inline void +UnicodeString::extract(int32_t start, + int32_t _length, + UnicodeString& target) const +{ doExtract(start, _length, target); } + + + +inline int32_t +UnicodeString::extract(int32_t start, + int32_t _length, + char *dst, + const char *codepage) const + +{ + + return extract(start, _length, dst, dst!=0 ? 0xffffffff : 0, codepage); +} + + + +inline void +UnicodeString::extractBetween(int32_t start, + int32_t limit, + UChar *dst, + int32_t dstStart) const { + pinIndex(start); + pinIndex(limit); + doExtract(start, limit - start, dst, dstStart); +} + +inline UnicodeString +UnicodeString::tempSubStringBetween(int32_t start, int32_t limit) const { + return tempSubString(start, limit - start); +} + +inline UChar +UnicodeString::doCharAt(int32_t offset) const +{ + if((uint32_t)offset < (uint32_t)length()) { + return getArrayStart()[offset]; + } else { + return kInvalidUChar; + } +} + +inline UChar +UnicodeString::charAt(int32_t offset) const +{ return doCharAt(offset); } + +inline UChar +UnicodeString::operator[] (int32_t offset) const +{ return doCharAt(offset); } + +inline UChar32 +UnicodeString::char32At(int32_t offset) const +{ + int32_t len = length(); + if((uint32_t)offset < (uint32_t)len) { + const UChar *array = getArrayStart(); + UChar32 c; + { (c)=(array)[offset]; if((((c)&0xfffff800)==0xd800)) { uint16_t __c2; if((((c)&0x400)==0)) { if((offset)+1<(len) && (((__c2=(array)[(offset)+1])&0xfffffc00)==0xdc00)) { (c)=(((UChar32)((c))<<10UL)+(UChar32)(__c2)-((0xd800<<10UL)+0xdc00-0x10000)); } } else { if((offset)>(0) && (((__c2=(array)[(offset)-1])&0xfffffc00)==0xd800)) { (c)=(((UChar32)(__c2)<<10UL)+(UChar32)((c))-((0xd800<<10UL)+0xdc00-0x10000)); } } } }; + return c; + } else { + return kInvalidUChar; + } +} + +inline int32_t +UnicodeString::getChar32Start(int32_t offset) const { + if((uint32_t)offset < (uint32_t)length()) { + const UChar *array = getArrayStart(); + { if(((((array)[offset])&0xfffffc00)==0xdc00) && (offset)>(0) && ((((array)[(offset)-1])&0xfffffc00)==0xd800)) { --(offset); } }; + return offset; + } else { + return 0; + } +} + +inline int32_t +UnicodeString::getChar32Limit(int32_t offset) const { + int32_t len = length(); + if((uint32_t)offset < (uint32_t)len) { + const UChar *array = getArrayStart(); + { if((0)<(offset) && (offset)<(len) && ((((array)[(offset)-1])&0xfffffc00)==0xd800) && ((((array)[offset])&0xfffffc00)==0xdc00)) { ++(offset); } }; + return offset; + } else { + return len; + } +} + +inline UBool +UnicodeString::isEmpty() const { + return fShortLength == 0; +} + + + + +inline void +UnicodeString::setLength(int32_t len) { + if(len <= 127) { + fShortLength = (int8_t)len; + } else { + fShortLength = (int8_t)-1; + fUnion.fFields.fLength = len; + } +} + +inline void +UnicodeString::setToEmpty() { + fShortLength = 0; + fFlags = kShortString; +} + +inline void +UnicodeString::setArray(UChar *array, int32_t len, int32_t capacity) { + setLength(len); + fUnion.fFields.fArray = array; + fUnion.fFields.fCapacity = capacity; +} + +inline const UChar * +UnicodeString::getTerminatedBuffer() { + if(!isWritable()) { + return 0; + } else { + UChar *array = getArrayStart(); + int32_t len = length(); + if(len < getCapacity() && ((fFlags&kRefCounted) == 0 || refCount() == 1)) { + + + + + + + if(!(fFlags&kBufferIsReadonly)) { +# 4253 "/usr/include/unicode/unistr.h" 3 4 + array[len] = 0; + } + return array; + } else if(cloneArrayIfNeeded(len+1)) { + array = getArrayStart(); + array[len] = 0; + return array; + } else { + return 0; + } + } +} + +inline UnicodeString& +UnicodeString::operator= (UChar ch) +{ return doReplace(0, length(), &ch, 0, 1); } + +inline UnicodeString& +UnicodeString::operator= (UChar32 ch) +{ return replace(0, length(), ch); } + +inline UnicodeString& +UnicodeString::setTo(const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) +{ + unBogus(); + return doReplace(0, length(), srcText, srcStart, srcLength); +} + +inline UnicodeString& +UnicodeString::setTo(const UnicodeString& srcText, + int32_t srcStart) +{ + unBogus(); + srcText.pinIndex(srcStart); + return doReplace(0, length(), srcText, srcStart, srcText.length() - srcStart); +} + +inline UnicodeString& +UnicodeString::setTo(const UnicodeString& srcText) +{ + return copyFrom(srcText); +} + +inline UnicodeString& +UnicodeString::setTo(const UChar *srcChars, + int32_t srcLength) +{ + unBogus(); + return doReplace(0, length(), srcChars, 0, srcLength); +} + +inline UnicodeString& +UnicodeString::setTo(UChar srcChar) +{ + unBogus(); + return doReplace(0, length(), &srcChar, 0, 1); +} + +inline UnicodeString& +UnicodeString::setTo(UChar32 srcChar) +{ + unBogus(); + return replace(0, length(), srcChar); +} + +inline UnicodeString& +UnicodeString::append(const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) +{ return doReplace(length(), 0, srcText, srcStart, srcLength); } + +inline UnicodeString& +UnicodeString::append(const UnicodeString& srcText) +{ return doReplace(length(), 0, srcText, 0, srcText.length()); } + +inline UnicodeString& +UnicodeString::append(const UChar *srcChars, + int32_t srcStart, + int32_t srcLength) +{ return doReplace(length(), 0, srcChars, srcStart, srcLength); } + +inline UnicodeString& +UnicodeString::append(const UChar *srcChars, + int32_t srcLength) +{ return doReplace(length(), 0, srcChars, 0, srcLength); } + +inline UnicodeString& +UnicodeString::append(UChar srcChar) +{ return doReplace(length(), 0, &srcChar, 0, 1); } + +inline UnicodeString& +UnicodeString::append(UChar32 srcChar) { + UChar buffer[2]; + int32_t _length = 0; + UBool isError = 0; + { if((uint32_t)(srcChar)<=0xffff) { (buffer)[(_length)++]=(uint16_t)(srcChar); } else if((uint32_t)(srcChar)<=0x10ffff && (_length)+1<(2)) { (buffer)[(_length)++]=(uint16_t)(((srcChar)>>10)+0xd7c0); (buffer)[(_length)++]=(uint16_t)(((srcChar)&0x3ff)|0xdc00); } else { (isError)=1; } }; + return doReplace(length(), 0, buffer, 0, _length); +} + +inline UnicodeString& +UnicodeString::operator+= (UChar ch) +{ return doReplace(length(), 0, &ch, 0, 1); } + +inline UnicodeString& +UnicodeString::operator+= (UChar32 ch) { + return append(ch); +} + +inline UnicodeString& +UnicodeString::operator+= (const UnicodeString& srcText) +{ return doReplace(length(), 0, srcText, 0, srcText.length()); } + +inline UnicodeString& +UnicodeString::insert(int32_t start, + const UnicodeString& srcText, + int32_t srcStart, + int32_t srcLength) +{ return doReplace(start, 0, srcText, srcStart, srcLength); } + +inline UnicodeString& +UnicodeString::insert(int32_t start, + const UnicodeString& srcText) +{ return doReplace(start, 0, srcText, 0, srcText.length()); } + +inline UnicodeString& +UnicodeString::insert(int32_t start, + const UChar *srcChars, + int32_t srcStart, + int32_t srcLength) +{ return doReplace(start, 0, srcChars, srcStart, srcLength); } + +inline UnicodeString& +UnicodeString::insert(int32_t start, + const UChar *srcChars, + int32_t srcLength) +{ return doReplace(start, 0, srcChars, 0, srcLength); } + +inline UnicodeString& +UnicodeString::insert(int32_t start, + UChar srcChar) +{ return doReplace(start, 0, &srcChar, 0, 1); } + +inline UnicodeString& +UnicodeString::insert(int32_t start, + UChar32 srcChar) +{ return replace(start, 0, srcChar); } + + +inline UnicodeString& +UnicodeString::remove() +{ + + + + if(fFlags & (kIsBogus|kBufferIsReadonly)) { + setToEmpty(); + } else { + fShortLength = 0; + } + return *this; +} + +inline UnicodeString& +UnicodeString::remove(int32_t start, + int32_t _length) +{ + if(start <= 0 && _length == ((int32_t)(2147483647))) { + + return remove(); + } + return doReplace(start, _length, __null, 0, 0); +} + +inline UnicodeString& +UnicodeString::removeBetween(int32_t start, + int32_t limit) +{ return doReplace(start, limit - start, __null, 0, 0); } + +inline UnicodeString & +UnicodeString::retainBetween(int32_t start, int32_t limit) { + truncate(limit); + return doReplace(0, start, __null, 0, 0); +} + +inline UBool +UnicodeString::truncate(int32_t targetLength) +{ + if(isBogus() && targetLength == 0) { + + unBogus(); + return 0; + } else if((uint32_t)targetLength < (uint32_t)length()) { + setLength(targetLength); + if(fFlags&kBufferIsReadonly) { + fUnion.fFields.fCapacity = targetLength; + } + return 1; + } else { + return 0; + } +} + +inline UnicodeString& +UnicodeString::reverse() +{ return doReverse(0, length()); } + +inline UnicodeString& +UnicodeString::reverse(int32_t start, + int32_t _length) +{ return doReverse(start, _length); } + +} } +# 15 "/usr/include/unicode/strenum.h" 2 3 4 + + + + + + +extern "C++" { namespace icu_48 { +# 55 "/usr/include/unicode/strenum.h" 3 4 +class StringEnumeration : public UObject { +public: + + + + + virtual ~StringEnumeration(); +# 78 "/usr/include/unicode/strenum.h" 3 4 + virtual StringEnumeration *clone() const; +# 97 "/usr/include/unicode/strenum.h" 3 4 + virtual int32_t count(UErrorCode& status) const = 0; +# 128 "/usr/include/unicode/strenum.h" 3 4 + virtual const char* next(int32_t *resultLength, UErrorCode& status); +# 153 "/usr/include/unicode/strenum.h" 3 4 + virtual const UChar* unext(int32_t *resultLength, UErrorCode& status); +# 171 "/usr/include/unicode/strenum.h" 3 4 + virtual const UnicodeString* snext(UErrorCode& status) = 0; +# 185 "/usr/include/unicode/strenum.h" 3 4 + virtual void reset(UErrorCode& status) = 0; +# 194 "/usr/include/unicode/strenum.h" 3 4 + virtual UBool operator==(const StringEnumeration& that)const; + + + + + + + + virtual UBool operator!=(const StringEnumeration& that)const; + +protected: + + + + + UnicodeString unistr; + + + + + char charsBuffer[32]; + + + + + + char *chars; + + + + + int32_t charsCapacity; + + + + + + StringEnumeration(); +# 241 "/usr/include/unicode/strenum.h" 3 4 + void ensureCharsCapacity(int32_t capacity, UErrorCode &status); +# 265 "/usr/include/unicode/strenum.h" 3 4 + UnicodeString *setChars(const char *s, int32_t length, UErrorCode &status); +}; + +} } +# 25 "/usr/include/unicode/uenum.h" 2 3 4 +# 37 "/usr/include/unicode/uenum.h" 3 4 +struct UEnumeration; + +typedef struct UEnumeration UEnumeration; +# 48 "/usr/include/unicode/uenum.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +uenum_close_48(UEnumeration* en); + + + +extern "C++" { namespace icu_48 { +# 64 "/usr/include/unicode/uenum.h" 3 4 +class LocalUEnumerationPointer : public LocalPointerBase { public: explicit LocalUEnumerationPointer(UEnumeration *p=__null) : LocalPointerBase(p) {} ~LocalUEnumerationPointer() { uenum_close_48(ptr); } void adoptInstead(UEnumeration *p) { uenum_close_48(ptr); ptr=p; } }; + +} } +# 84 "/usr/include/unicode/uenum.h" 3 4 +extern "C" __attribute__((visibility("default"))) int32_t +uenum_count_48(UEnumeration* en, UErrorCode* status); +# 108 "/usr/include/unicode/uenum.h" 3 4 +extern "C" __attribute__((visibility("default"))) const UChar* +uenum_unext_48(UEnumeration* en, + int32_t* resultLength, + UErrorCode* status); +# 141 "/usr/include/unicode/uenum.h" 3 4 +extern "C" __attribute__((visibility("default"))) const char* +uenum_next_48(UEnumeration* en, + int32_t* resultLength, + UErrorCode* status); +# 155 "/usr/include/unicode/uenum.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +uenum_reset_48(UEnumeration* en, UErrorCode* status); +# 169 "/usr/include/unicode/uenum.h" 3 4 +extern "C" __attribute__((visibility("default"))) UEnumeration* +uenum_openFromStringEnumeration_48(icu_48:: StringEnumeration* adopted, UErrorCode* ec); +# 52 "/usr/include/unicode/ucnv.h" 2 3 4 +# 65 "/usr/include/unicode/ucnv.h" 3 4 +struct USet; + +typedef struct USet USet; + + + + + +extern "C" { + + +#define UCNV_MAX_CONVERTER_NAME_LENGTH 60 + +#define UCNV_MAX_FULL_FILE_NAME_LENGTH (600+UCNV_MAX_CONVERTER_NAME_LENGTH) + + +#define UCNV_SI 0x0F + +#define UCNV_SO 0x0E + + + + + + +typedef enum { + + UCNV_UNSUPPORTED_CONVERTER = -1, + + UCNV_SBCS = 0, + + UCNV_DBCS = 1, + + UCNV_MBCS = 2, + + UCNV_LATIN_1 = 3, + + UCNV_UTF8 = 4, + + UCNV_UTF16_BigEndian = 5, + + UCNV_UTF16_LittleEndian = 6, + + UCNV_UTF32_BigEndian = 7, + + UCNV_UTF32_LittleEndian = 8, + + UCNV_EBCDIC_STATEFUL = 9, + + UCNV_ISO_2022 = 10, + + + UCNV_LMBCS_1 = 11, + + UCNV_LMBCS_2, + + UCNV_LMBCS_3, + + UCNV_LMBCS_4, + + UCNV_LMBCS_5, + + UCNV_LMBCS_6, + + UCNV_LMBCS_8, + + UCNV_LMBCS_11, + + UCNV_LMBCS_16, + + UCNV_LMBCS_17, + + UCNV_LMBCS_18, + + UCNV_LMBCS_19, + + UCNV_LMBCS_LAST = UCNV_LMBCS_19, + + UCNV_HZ, + + UCNV_SCSU, + + UCNV_ISCII, + + UCNV_US_ASCII, + + UCNV_UTF7, + + UCNV_BOCU1, + + UCNV_UTF16, + + UCNV_UTF32, + + UCNV_CESU8, + + UCNV_IMAP_MAILBOX, + + UCNV_COMPOUND_TEXT, + + + UCNV_NUMBER_OF_SUPPORTED_CONVERTER_TYPES +} UConverterType; +# 178 "/usr/include/unicode/ucnv.h" 3 4 +typedef enum { + UCNV_UNKNOWN = -1, + UCNV_IBM = 0 +} UConverterPlatform; +# 198 "/usr/include/unicode/ucnv.h" 3 4 +typedef void ( *UConverterToUCallback) ( + const void* context, + UConverterToUnicodeArgs *args, + const char *codeUnits, + int32_t length, + UConverterCallbackReason reason, + UErrorCode *pErrorCode); +# 221 "/usr/include/unicode/ucnv.h" 3 4 +typedef void ( *UConverterFromUCallback) ( + const void* context, + UConverterFromUnicodeArgs *args, + const UChar* codeUnits, + int32_t length, + UChar32 codePoint, + UConverterCallbackReason reason, + UErrorCode *pErrorCode); + +} + + + + + + +#define UCNV_OPTION_SEP_CHAR ',' + + + + + + +#define UCNV_OPTION_SEP_STRING "," + + + + + + +#define UCNV_VALUE_SEP_CHAR '=' + + + + + + +#define UCNV_VALUE_SEP_STRING "=" +# 268 "/usr/include/unicode/ucnv.h" 3 4 +#define UCNV_LOCALE_OPTION_STRING ",locale=" +# 281 "/usr/include/unicode/ucnv.h" 3 4 +#define UCNV_VERSION_OPTION_STRING ",version=" +# 293 "/usr/include/unicode/ucnv.h" 3 4 +#define UCNV_SWAP_LFNL_OPTION_STRING ",swaplfnl" +# 310 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) int +ucnv_compareNames_48(const char *name1, const char *name2); +# 362 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) UConverter* +ucnv_open_48(const char *converterName, UErrorCode *err); +# 392 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) UConverter* +ucnv_openU_48(const UChar *name, + UErrorCode *err); +# 460 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) UConverter* +ucnv_openCCSID_48(int32_t codepage, + UConverterPlatform platform, + UErrorCode * err); +# 495 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) UConverter* +ucnv_openPackage_48(const char *packageName, const char *converterName, UErrorCode *err); +# 535 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) UConverter * +ucnv_safeClone_48(const UConverter *cnv, + void *stackBuffer, + int32_t *pBufferSize, + UErrorCode *status); + + + + + + + +#define U_CNV_SAFECLONE_BUFFERSIZE 1024 +# 560 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +ucnv_close_48(UConverter * converter); + + + +extern "C++" { namespace icu_48 { +# 576 "/usr/include/unicode/ucnv.h" 3 4 +class LocalUConverterPointer : public LocalPointerBase { public: explicit LocalUConverterPointer(UConverter *p=__null) : LocalPointerBase(p) {} ~LocalUConverterPointer() { ucnv_close_48(ptr); } void adoptInstead(UConverter *p) { ucnv_close_48(ptr); ptr=p; } }; + +} } +# 599 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +ucnv_getSubstChars_48(const UConverter *converter, + char *subChars, + int8_t *len, + UErrorCode *err); +# 624 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +ucnv_setSubstChars_48(UConverter *converter, + const char *subChars, + int8_t len, + UErrorCode *err); +# 657 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +ucnv_setSubstString_48(UConverter *cnv, + const UChar *s, + int32_t length, + UErrorCode *err); +# 676 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +ucnv_getInvalidChars_48(const UConverter *converter, + char *errBytes, + int8_t *len, + UErrorCode *err); +# 695 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +ucnv_getInvalidUChars_48(const UConverter *converter, + UChar *errUChars, + int8_t *len, + UErrorCode *err); +# 708 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +ucnv_reset_48(UConverter *converter); +# 719 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +ucnv_resetToUnicode_48(UConverter *converter); +# 730 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +ucnv_resetFromUnicode_48(UConverter *converter); +# 781 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) int8_t +ucnv_getMaxCharSize_48(const UConverter *converter); +# 803 "/usr/include/unicode/ucnv.h" 3 4 +#define UCNV_GET_MAX_BYTES_FOR_STRING(length,maxCharSize) (((int32_t)(length)+10)*(int32_t)(maxCharSize)) +# 814 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) int8_t +ucnv_getMinCharSize_48(const UConverter *converter); +# 831 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) int32_t +ucnv_getDisplayName_48(const UConverter *converter, + const char *displayLocale, + UChar *displayName, + int32_t displayNameCapacity, + UErrorCode *err); +# 848 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) const char * +ucnv_getName_48(const UConverter *converter, UErrorCode *err); +# 874 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) int32_t +ucnv_getCCSID_48(const UConverter *converter, + UErrorCode *err); +# 888 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) UConverterPlatform +ucnv_getPlatform_48(const UConverter *converter, + UErrorCode *err); +# 900 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) UConverterType +ucnv_getType_48(const UConverter * converter); +# 918 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +ucnv_getStarters_48(const UConverter* converter, + UBool starters[256], + UErrorCode* err); + + + + + + + +typedef enum UConverterUnicodeSet { + + UCNV_ROUNDTRIP_SET, + + UCNV_ROUNDTRIP_AND_FALLBACK_SET, + + UCNV_SET_COUNT +} UConverterUnicodeSet; +# 984 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +ucnv_getUnicodeSet_48(const UConverter *cnv, + USet *setFillIn, + UConverterUnicodeSet whichSet, + UErrorCode *pErrorCode); +# 1001 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +ucnv_getToUCallBack_48 (const UConverter * converter, + UConverterToUCallback *action, + const void **context); +# 1017 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +ucnv_getFromUCallBack_48 (const UConverter * converter, + UConverterFromUCallback *action, + const void **context); +# 1037 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +ucnv_setToUCallBack_48 (UConverter * converter, + UConverterToUCallback newAction, + const void* newContext, + UConverterToUCallback *oldAction, + const void** oldContext, + UErrorCode * err); +# 1060 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +ucnv_setFromUCallBack_48 (UConverter * converter, + UConverterFromUCallback newAction, + const void *newContext, + UConverterFromUCallback *oldAction, + const void **oldContext, + UErrorCode * err); +# 1126 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +ucnv_fromUnicode_48 (UConverter * converter, + char **target, + const char *targetLimit, + const UChar ** source, + const UChar * sourceLimit, + int32_t* offsets, + UBool flush, + UErrorCode * err); +# 1195 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +ucnv_toUnicode_48(UConverter *converter, + UChar **target, + const UChar *targetLimit, + const char **source, + const char *sourceLimit, + int32_t *offsets, + UBool flush, + UErrorCode *err); +# 1232 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) int32_t +ucnv_fromUChars_48(UConverter *cnv, + char *dest, int32_t destCapacity, + const UChar *src, int32_t srcLength, + UErrorCode *pErrorCode); +# 1264 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) int32_t +ucnv_toUChars_48(UConverter *cnv, + UChar *dest, int32_t destCapacity, + const char *src, int32_t srcLength, + UErrorCode *pErrorCode); +# 1340 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) UChar32 +ucnv_getNextUChar_48(UConverter * converter, + const char **source, + const char * sourceLimit, + UErrorCode * err); +# 1484 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +ucnv_convertEx_48(UConverter *targetCnv, UConverter *sourceCnv, + char **target, const char *targetLimit, + const char **source, const char *sourceLimit, + UChar *pivotStart, UChar **pivotSource, + UChar **pivotTarget, const UChar *pivotLimit, + UBool reset, UBool flush, + UErrorCode *pErrorCode); +# 1548 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) int32_t +ucnv_convert_48(const char *toConverterName, + const char *fromConverterName, + char *target, + int32_t targetCapacity, + const char *source, + int32_t sourceLength, + UErrorCode *pErrorCode); +# 1602 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) int32_t +ucnv_toAlgorithmic_48(UConverterType algorithmicType, + UConverter *cnv, + char *target, int32_t targetCapacity, + const char *source, int32_t sourceLength, + UErrorCode *pErrorCode); +# 1654 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) int32_t +ucnv_fromAlgorithmic_48(UConverter *cnv, + UConverterType algorithmicType, + char *target, int32_t targetCapacity, + const char *source, int32_t sourceLength, + UErrorCode *pErrorCode); +# 1668 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) int32_t +ucnv_flushCache_48(void); +# 1678 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) int32_t +ucnv_countAvailable_48(void); +# 1691 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) const char* +ucnv_getAvailableName_48(int32_t n); +# 1706 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) UEnumeration * +ucnv_openAllNames_48(UErrorCode *pErrorCode); +# 1719 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) uint16_t +ucnv_countAliases_48(const char *alias, UErrorCode *pErrorCode); +# 1734 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) const char * +ucnv_getAlias_48(const char *alias, uint16_t n, UErrorCode *pErrorCode); +# 1750 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +ucnv_getAliases_48(const char *alias, const char **aliases, UErrorCode *pErrorCode); +# 1776 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) UEnumeration * +ucnv_openStandardNames_48(const char *convName, + const char *standard, + UErrorCode *pErrorCode); + + + + + + +extern "C" __attribute__((visibility("default"))) uint16_t +ucnv_countStandards_48(void); +# 1796 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) const char * +ucnv_getStandard_48(uint16_t n, UErrorCode *pErrorCode); +# 1818 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) const char * +ucnv_getStandardName_48(const char *name, const char *standard, UErrorCode *pErrorCode); +# 1840 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) const char * +ucnv_getCanonicalName_48(const char *alias, const char *standard, UErrorCode *pErrorCode); +# 1857 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) const char * +ucnv_getDefaultName_48(void); +# 1876 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +ucnv_setDefaultName_48(const char *name); +# 1896 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +ucnv_fixFileSeparator_48(const UConverter *cnv, UChar *source, int32_t sourceLen); +# 1907 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) UBool +ucnv_isAmbiguous_48(const UConverter *cnv); +# 1925 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) void +ucnv_setFallback_48(UConverter *cnv, UBool usesFallback); +# 1937 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) UBool +ucnv_usesFallback_48(const UConverter *cnv); +# 1996 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) const char* +ucnv_detectUnicodeSignature_48(const char* source, + int32_t sourceLength, + int32_t *signatureLength, + UErrorCode *pErrorCode); +# 2013 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) int32_t +ucnv_fromUCountPending_48(const UConverter* cnv, UErrorCode* status); +# 2027 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) int32_t +ucnv_toUCountPending_48(const UConverter* cnv, UErrorCode* status); +# 2045 "/usr/include/unicode/ucnv.h" 3 4 +extern "C" __attribute__((visibility("default"))) UBool +ucnv_isFixedWidth_48(UConverter *cnv, UErrorCode *status); +# 32 "/usr/include/libxml2/libxml/encoding.h" 2 + + +extern "C" { +# 58 "/usr/include/libxml2/libxml/encoding.h" +typedef enum { + XML_CHAR_ENCODING_ERROR= -1, + XML_CHAR_ENCODING_NONE= 0, + XML_CHAR_ENCODING_UTF8= 1, + XML_CHAR_ENCODING_UTF16LE= 2, + XML_CHAR_ENCODING_UTF16BE= 3, + XML_CHAR_ENCODING_UCS4LE= 4, + XML_CHAR_ENCODING_UCS4BE= 5, + XML_CHAR_ENCODING_EBCDIC= 6, + XML_CHAR_ENCODING_UCS4_2143=7, + XML_CHAR_ENCODING_UCS4_3412=8, + XML_CHAR_ENCODING_UCS2= 9, + XML_CHAR_ENCODING_8859_1= 10, + XML_CHAR_ENCODING_8859_2= 11, + XML_CHAR_ENCODING_8859_3= 12, + XML_CHAR_ENCODING_8859_4= 13, + XML_CHAR_ENCODING_8859_5= 14, + XML_CHAR_ENCODING_8859_6= 15, + XML_CHAR_ENCODING_8859_7= 16, + XML_CHAR_ENCODING_8859_8= 17, + XML_CHAR_ENCODING_8859_9= 18, + XML_CHAR_ENCODING_2022_JP= 19, + XML_CHAR_ENCODING_SHIFT_JIS=20, + XML_CHAR_ENCODING_EUC_JP= 21, + XML_CHAR_ENCODING_ASCII= 22 +} xmlCharEncoding; +# 101 "/usr/include/libxml2/libxml/encoding.h" +typedef int (* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen, + const unsigned char *in, int *inlen); +# 123 "/usr/include/libxml2/libxml/encoding.h" +typedef int (* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen, + const unsigned char *in, int *inlen); + + + + + + + +struct _uconv_t { + UConverter *uconv; + UConverter *utf8; +}; +typedef struct _uconv_t uconv_t; + + +typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler; +typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr; +struct _xmlCharEncodingHandler { + char *name; + xmlCharEncodingInputFunc input; + xmlCharEncodingOutputFunc output; + + iconv_t iconv_in; + iconv_t iconv_out; + + + uconv_t *uconv_in; + uconv_t *uconv_out; + +}; + + +} + + + +extern "C" { + + + + + + void + xmlInitCharEncodingHandlers (void); + void + xmlCleanupCharEncodingHandlers (void); + void + xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler); + xmlCharEncodingHandlerPtr + xmlGetCharEncodingHandler (xmlCharEncoding enc); + xmlCharEncodingHandlerPtr + xmlFindCharEncodingHandler (const char *name); + xmlCharEncodingHandlerPtr + xmlNewCharEncodingHandler (const char *name, + xmlCharEncodingInputFunc input, + xmlCharEncodingOutputFunc output); + + + + + int + xmlAddEncodingAlias (const char *name, + const char *alias); + int + xmlDelEncodingAlias (const char *alias); + const char * + xmlGetEncodingAlias (const char *alias); + void + xmlCleanupEncodingAliases (void); + xmlCharEncoding + xmlParseCharEncoding (const char *name); + const char * + xmlGetCharEncodingName (xmlCharEncoding enc); + + + + + xmlCharEncoding + xmlDetectCharEncoding (const unsigned char *in, + int len); + + int + xmlCharEncOutFunc (xmlCharEncodingHandler *handler, + xmlBufferPtr out, + xmlBufferPtr in); + + int + xmlCharEncInFunc (xmlCharEncodingHandler *handler, + xmlBufferPtr out, + xmlBufferPtr in); + int + xmlCharEncFirstLine (xmlCharEncodingHandler *handler, + xmlBufferPtr out, + xmlBufferPtr in); + int + xmlCharEncCloseFunc (xmlCharEncodingHandler *handler); + + + + + + int + UTF8Toisolat1 (unsigned char *out, + int *outlen, + const unsigned char *in, + int *inlen); + + int + isolat1ToUTF8 (unsigned char *out, + int *outlen, + const unsigned char *in, + int *inlen); + +} +# 808 "/usr/include/libxml2/libxml/parser.h" 2 +# 1 "/usr/include/libxml2/libxml/xmlIO.h" 1 +# 11 "/usr/include/libxml2/libxml/xmlIO.h" +#define __XML_IO_H__ + + + + + +extern "C" { +# 34 "/usr/include/libxml2/libxml/xmlIO.h" +typedef int ( *xmlInputMatchCallback) (char const *filename); +# 43 "/usr/include/libxml2/libxml/xmlIO.h" +typedef void * ( *xmlInputOpenCallback) (char const *filename); +# 54 "/usr/include/libxml2/libxml/xmlIO.h" +typedef int ( *xmlInputReadCallback) (void * context, char * buffer, int len); +# 63 "/usr/include/libxml2/libxml/xmlIO.h" +typedef int ( *xmlInputCloseCallback) (void * context); +# 80 "/usr/include/libxml2/libxml/xmlIO.h" +typedef int ( *xmlOutputMatchCallback) (char const *filename); +# 89 "/usr/include/libxml2/libxml/xmlIO.h" +typedef void * ( *xmlOutputOpenCallback) (char const *filename); +# 100 "/usr/include/libxml2/libxml/xmlIO.h" +typedef int ( *xmlOutputWriteCallback) (void * context, const char * buffer, + int len); +# 110 "/usr/include/libxml2/libxml/xmlIO.h" +typedef int ( *xmlOutputCloseCallback) (void * context); + + + +} + + +# 1 "/usr/include/libxml2/libxml/globals.h" 1 +# 15 "/usr/include/libxml2/libxml/globals.h" +#define __XML_GLOBALS_H + + + +# 1 "/usr/include/libxml2/libxml/xmlerror.h" 1 +# 20 "/usr/include/libxml2/libxml/globals.h" 2 +# 1 "/usr/include/libxml2/libxml/SAX.h" 1 +# 13 "/usr/include/libxml2/libxml/SAX.h" +#define __XML_SAX_H__ + + +# 1 "/usr/include/stdlib.h" 1 3 4 +# 28 "/usr/include/stdlib.h" 3 4 +#define __need_size_t + +#define __need_wchar_t +#define __need_NULL + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 34 "/usr/include/stdlib.h" 2 3 4 + +extern "C" { + + +#define _STDLIB_H 1 + + + +# 1 "/usr/include/bits/waitflags.h" 1 3 4 +# 26 "/usr/include/bits/waitflags.h" 3 4 +#define WNOHANG 1 +#define WUNTRACED 2 + + +#define WSTOPPED 2 +#define WEXITED 4 +#define WCONTINUED 8 +#define WNOWAIT 0x01000000 + +#define __WNOTHREAD 0x20000000 + +#define __WALL 0x40000000 +#define __WCLONE 0x80000000 +# 43 "/usr/include/stdlib.h" 2 3 4 +# 1 "/usr/include/bits/waitstatus.h" 1 3 4 +# 29 "/usr/include/bits/waitstatus.h" 3 4 +#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8) + + +#define __WTERMSIG(status) ((status) & 0x7f) + + +#define __WSTOPSIG(status) __WEXITSTATUS(status) + + +#define __WIFEXITED(status) (__WTERMSIG(status) == 0) + + +#define __WIFSIGNALED(status) (((signed char) (((status) & 0x7f) + 1) >> 1) > 0) + + + +#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f) + + + + +#define __WIFCONTINUED(status) ((status) == __W_CONTINUED) + + + +#define __WCOREDUMP(status) ((status) & __WCOREFLAG) + + +#define __W_EXITCODE(ret,sig) ((ret) << 8 | (sig)) +#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f) +#define __W_CONTINUED 0xffff +#define __WCOREFLAG 0x80 + + + + + + +union wait + { + int w_status; + struct + { + + unsigned int __w_termsig:7; + unsigned int __w_coredump:1; + unsigned int __w_retcode:8; + unsigned int:16; + + + + + + + + } __wait_terminated; + struct + { + + unsigned int __w_stopval:8; + unsigned int __w_stopsig:8; + unsigned int:16; + + + + + + + } __wait_stopped; + }; + +#define w_termsig __wait_terminated.__w_termsig +#define w_coredump __wait_terminated.__w_coredump +#define w_retcode __wait_terminated.__w_retcode +#define w_stopsig __wait_stopped.__w_stopsig +#define w_stopval __wait_stopped.__w_stopval +# 44 "/usr/include/stdlib.h" 2 3 4 +# 55 "/usr/include/stdlib.h" 3 4 +#define __WAIT_INT(status) (*(int *) &(status)) +# 64 "/usr/include/stdlib.h" 3 4 +#define __WAIT_STATUS void * +#define __WAIT_STATUS_DEFN void * +# 85 "/usr/include/stdlib.h" 3 4 +#define WEXITSTATUS(status) __WEXITSTATUS (__WAIT_INT (status)) +#define WTERMSIG(status) __WTERMSIG (__WAIT_INT (status)) +#define WSTOPSIG(status) __WSTOPSIG (__WAIT_INT (status)) +#define WIFEXITED(status) __WIFEXITED (__WAIT_INT (status)) +#define WIFSIGNALED(status) __WIFSIGNALED (__WAIT_INT (status)) +#define WIFSTOPPED(status) __WIFSTOPPED (__WAIT_INT (status)) + +#define WIFCONTINUED(status) __WIFCONTINUED (__WAIT_INT (status)) + + + + + +typedef struct + { + int quot; + int rem; + } div_t; + + + +typedef struct + { + long int quot; + long int rem; + } ldiv_t; +#define __ldiv_t_defined 1 + + + + + + +__extension__ typedef struct + { + long long int quot; + long long int rem; + } lldiv_t; +#define __lldiv_t_defined 1 + + + + + +#define RAND_MAX 2147483647 + + + + +#define EXIT_FAILURE 1 +#define EXIT_SUCCESS 0 + + + +#define MB_CUR_MAX (__ctype_get_mb_cur_max ()) +extern size_t __ctype_get_mb_cur_max (void) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern double atof (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern int atoi (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern long int atol (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +__extension__ extern long long int atoll (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern double strtod (__const char *__restrict __nptr, + char **__restrict __endptr) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern float strtof (__const char *__restrict __nptr, + char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern long double strtold (__const char *__restrict __nptr, + char **__restrict __endptr) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern long int strtol (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern unsigned long int strtoul (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +__extension__ +extern long long int strtoq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtouq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +__extension__ +extern long long int strtoll (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtoull (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +# 240 "/usr/include/stdlib.h" 3 4 +extern long int strtol_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +extern unsigned long int strtoul_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern long long int strtoll_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtoull_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +extern double strtod_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + +extern float strtof_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + +extern long double strtold_l (__const char *__restrict __nptr, + char **__restrict __endptr, + __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + + + + + +extern __inline __attribute__ ((__gnu_inline__)) double +atof (__const char *__nptr) throw () +{ + return strtod (__nptr, (char **) __null); +} +extern __inline __attribute__ ((__gnu_inline__)) int +atoi (__const char *__nptr) throw () +{ + return (int) strtol (__nptr, (char **) __null, 10); +} +extern __inline __attribute__ ((__gnu_inline__)) long int +atol (__const char *__nptr) throw () +{ + return strtol (__nptr, (char **) __null, 10); +} + + + + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int +atoll (__const char *__nptr) throw () +{ + return strtoll (__nptr, (char **) __null, 10); +} + +# 311 "/usr/include/stdlib.h" 3 4 +extern char *l64a (long int __n) throw () __attribute__ ((__warn_unused_result__)); + + +extern long int a64l (__const char *__s) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 327 "/usr/include/stdlib.h" 3 4 +extern long int random (void) throw (); + + +extern void srandom (unsigned int __seed) throw (); + + + + + +extern char *initstate (unsigned int __seed, char *__statebuf, + size_t __statelen) throw () __attribute__ ((__nonnull__ (2))); + + + +extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1))); + + + + + + + +struct random_data + { + int32_t *fptr; + int32_t *rptr; + int32_t *state; + int rand_type; + int rand_deg; + int rand_sep; + int32_t *end_ptr; + }; + +extern int random_r (struct random_data *__restrict __buf, + int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); + +extern int srandom_r (unsigned int __seed, struct random_data *__buf) + throw () __attribute__ ((__nonnull__ (2))); + +extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, + size_t __statelen, + struct random_data *__restrict __buf) + throw () __attribute__ ((__nonnull__ (2, 4))); + +extern int setstate_r (char *__restrict __statebuf, + struct random_data *__restrict __buf) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern int rand (void) throw (); + +extern void srand (unsigned int __seed) throw (); + + + + +extern int rand_r (unsigned int *__seed) throw (); + + + + + + + +extern double drand48 (void) throw (); +extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); + + +extern long int lrand48 (void) throw (); +extern long int nrand48 (unsigned short int __xsubi[3]) + throw () __attribute__ ((__nonnull__ (1))); + + +extern long int mrand48 (void) throw (); +extern long int jrand48 (unsigned short int __xsubi[3]) + throw () __attribute__ ((__nonnull__ (1))); + + +extern void srand48 (long int __seedval) throw (); +extern unsigned short int *seed48 (unsigned short int __seed16v[3]) + throw () __attribute__ ((__nonnull__ (1))); +extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1))); + + + + + +struct drand48_data + { + unsigned short int __x[3]; + unsigned short int __old_x[3]; + unsigned short int __c; + unsigned short int __init; + unsigned long long int __a; + }; + + +extern int drand48_r (struct drand48_data *__restrict __buffer, + double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int erand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int lrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int nrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int mrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int jrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int srand48_r (long int __seedval, struct drand48_data *__buffer) + throw () __attribute__ ((__nonnull__ (2))); + +extern int seed48_r (unsigned short int __seed16v[3], + struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); + +extern int lcong48_r (unsigned short int __param[7], + struct drand48_data *__buffer) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + + +#define __malloc_and_calloc_defined + + +extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + +extern void *calloc (size_t __nmemb, size_t __size) + throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + + + + + + + +extern void *realloc (void *__ptr, size_t __size) + throw () __attribute__ ((__warn_unused_result__)); + +extern void free (void *__ptr) throw (); + + + + +extern void cfree (void *__ptr) throw (); + + + +# 1 "/usr/include/alloca.h" 1 3 4 +# 20 "/usr/include/alloca.h" 3 4 +#define _ALLOCA_H 1 + + + +#define __need_size_t +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 26 "/usr/include/alloca.h" 2 3 4 + +extern "C" { + + +#undef alloca + + +extern void *alloca (size_t __size) throw (); + + +#define alloca(size) __builtin_alloca (size) + + +} +# 498 "/usr/include/stdlib.h" 2 3 4 + + + + + +extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + +extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +extern void abort (void) throw () __attribute__ ((__noreturn__)); + + + +extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern "C++" int at_quick_exit (void (*__func) (void)) + throw () __asm ("at_quick_exit") __attribute__ ((__nonnull__ (1))); + + + + + + + + + +extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) + throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern void exit (int __status) throw () __attribute__ ((__noreturn__)); + + + + + + + +extern void quick_exit (int __status) throw () __attribute__ ((__noreturn__)); + + + + + + + +extern void _Exit (int __status) throw () __attribute__ ((__noreturn__)); + + + + + + +extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *__secure_getenv (__const char *__name) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1))); + + + + + +extern int setenv (__const char *__name, __const char *__value, int __replace) + throw () __attribute__ ((__nonnull__ (2))); + + +extern int unsetenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern int clearenv (void) throw (); +# 606 "/usr/include/stdlib.h" 3 4 +extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 620 "/usr/include/stdlib.h" 3 4 +extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 630 "/usr/include/stdlib.h" 3 4 +extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 642 "/usr/include/stdlib.h" 3 4 +extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 652 "/usr/include/stdlib.h" 3 4 +extern int mkstemps64 (char *__template, int __suffixlen) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 663 "/usr/include/stdlib.h" 3 4 +extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 674 "/usr/include/stdlib.h" 3 4 +extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 684 "/usr/include/stdlib.h" 3 4 +extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 694 "/usr/include/stdlib.h" 3 4 +extern int mkostemps (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 706 "/usr/include/stdlib.h" 3 4 +extern int mkostemps64 (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + + + + + +extern int system (__const char *__command) __attribute__ ((__warn_unused_result__)); + + + + + + +extern char *canonicalize_file_name (__const char *__name) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 734 "/usr/include/stdlib.h" 3 4 +extern char *realpath (__const char *__restrict __name, + char *__restrict __resolved) throw () __attribute__ ((__warn_unused_result__)); + + + + + +#define __COMPAR_FN_T +typedef int (*__compar_fn_t) (__const void *, __const void *); + + +typedef __compar_fn_t comparison_fn_t; + + + +typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *); + + + + + +extern void *bsearch (__const void *__key, __const void *__base, + size_t __nmemb, size_t __size, __compar_fn_t __compar) + __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__)); + + + +extern void qsort (void *__base, size_t __nmemb, size_t __size, + __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); + +extern void qsort_r (void *__base, size_t __nmemb, size_t __size, + __compar_d_fn_t __compar, void *__arg) + __attribute__ ((__nonnull__ (1, 4))); + + + + +extern int abs (int __x) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern long int labs (long int __x) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + +__extension__ extern long long int llabs (long long int __x) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern div_t div (int __numer, int __denom) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern ldiv_t ldiv (long int __numer, long int __denom) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + + +__extension__ extern lldiv_t lldiv (long long int __numer, + long long int __denom) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + +# 808 "/usr/include/stdlib.h" 3 4 +extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *gcvt (double __value, int __ndigit, char *__buf) + throw () __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *qecvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qfcvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qgcvt (long double __value, int __ndigit, char *__buf) + throw () __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); + + + + +extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); +extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); + +extern int qecvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (3, 4, 5))); +extern int qfcvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (3, 4, 5))); + + + + + + + +extern int mblen (__const char *__s, size_t __n) throw () __attribute__ ((__warn_unused_result__)); + + +extern int mbtowc (wchar_t *__restrict __pwc, + __const char *__restrict __s, size_t __n) throw () __attribute__ ((__warn_unused_result__)); + + +extern int wctomb (char *__s, wchar_t __wchar) throw () __attribute__ ((__warn_unused_result__)); + + + +extern size_t mbstowcs (wchar_t *__restrict __pwcs, + __const char *__restrict __s, size_t __n) throw (); + +extern size_t wcstombs (char *__restrict __s, + __const wchar_t *__restrict __pwcs, size_t __n) + throw (); + + + + + + + + +extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 896 "/usr/include/stdlib.h" 3 4 +extern int getsubopt (char **__restrict __optionp, + char *__const *__restrict __tokens, + char **__restrict __valuep) + throw () __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__)); + + + + + +extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern int grantpt (int __fd) throw (); + + + +extern int unlockpt (int __fd) throw (); + + + + +extern char *ptsname (int __fd) throw () __attribute__ ((__warn_unused_result__)); + + + + + + +extern int ptsname_r (int __fd, char *__buf, size_t __buflen) + throw () __attribute__ ((__nonnull__ (2))); + + +extern int getpt (void); + + + + + + +extern int getloadavg (double __loadavg[], int __nelem) + throw () __attribute__ ((__nonnull__ (1))); + + + + + +# 1 "/usr/include/bits/stdlib.h" 1 3 4 +# 24 "/usr/include/bits/stdlib.h" 3 4 +extern char *__realpath_chk (__const char *__restrict __name, + char *__restrict __resolved, + size_t __resolvedlen) throw () __attribute__ ((__warn_unused_result__)); +extern char *__realpath_alias (__const char *__restrict __name, char *__restrict __resolved) throw () __asm__ ("" "realpath") + + __attribute__ ((__warn_unused_result__)); +extern char *__realpath_chk_warn (__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) throw () __asm__ ("" "__realpath_chk") + + + __attribute__ ((__warn_unused_result__)) + __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +realpath (__const char *__restrict __name, char *__restrict __resolved) throw () +{ + if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1) + { + + + + + return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); + } + + return __realpath_alias (__name, __resolved); +} + + +extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, + size_t __nreal) throw () __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) throw () __asm__ ("" "ptsname_r") + + __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__ptsname_r_chk") + + + __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +ptsname_r (int __fd, char *__buf, size_t __buflen) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __ptsname_r_alias (__fd, __buf, __buflen); +} + + +extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) + throw () __attribute__ ((__warn_unused_result__)); +extern int __wctomb_alias (char *__s, wchar_t __wchar) throw () __asm__ ("" "wctomb") + __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) int +wctomb (char *__s, wchar_t __wchar) throw () +{ + + + +#define __STDLIB_MB_LEN_MAX 16 + + + + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) + return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1)); + return __wctomb_alias (__s, __wchar); +} + + +extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, + __const char *__restrict __src, + size_t __len, size_t __dstlen) throw (); +extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) throw () __asm__ ("" "mbstowcs") + + + ; +extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) throw () __asm__ ("" "__mbstowcs_chk") + + + + __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +mbstowcs (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) throw () + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __mbstowcs_chk (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + + if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) + return __mbstowcs_chk_warn (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + } + return __mbstowcs_alias (__dst, __src, __len); +} + + +extern size_t __wcstombs_chk (char *__restrict __dst, + __const wchar_t *__restrict __src, + size_t __len, size_t __dstlen) throw (); +extern size_t __wcstombs_alias (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) throw () __asm__ ("" "wcstombs") + + + ; +extern size_t __wcstombs_chk_warn (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) throw () __asm__ ("" "__wcstombs_chk") + + + + __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len"))); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +wcstombs (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) throw () + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + if (__len > __builtin_object_size (__dst, 2 > 1)) + return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + } + return __wcstombs_alias (__dst, __src, __len); +} +# 956 "/usr/include/stdlib.h" 2 3 4 + + + + + + +#undef __need_malloc_and_calloc + +} +# 17 "/usr/include/libxml2/libxml/SAX.h" 2 + + +# 1 "/usr/include/libxml2/libxml/xlink.h" 1 +# 11 "/usr/include/libxml2/libxml/xlink.h" +#define __XML_XLINK_H__ + + + + + + + +extern "C" { +# 32 "/usr/include/libxml2/libxml/xlink.h" +typedef xmlChar *xlinkHRef; +typedef xmlChar *xlinkRole; +typedef xmlChar *xlinkTitle; + +typedef enum { + XLINK_TYPE_NONE = 0, + XLINK_TYPE_SIMPLE, + XLINK_TYPE_EXTENDED, + XLINK_TYPE_EXTENDED_SET +} xlinkType; + +typedef enum { + XLINK_SHOW_NONE = 0, + XLINK_SHOW_NEW, + XLINK_SHOW_EMBED, + XLINK_SHOW_REPLACE +} xlinkShow; + +typedef enum { + XLINK_ACTUATE_NONE = 0, + XLINK_ACTUATE_AUTO, + XLINK_ACTUATE_ONREQUEST +} xlinkActuate; +# 64 "/usr/include/libxml2/libxml/xlink.h" +typedef void (*xlinkNodeDetectFunc) (void *ctx, xmlNodePtr node); +# 81 "/usr/include/libxml2/libxml/xlink.h" +typedef void +(*xlinkSimpleLinkFunk) (void *ctx, + xmlNodePtr node, + const xlinkHRef href, + const xlinkRole role, + const xlinkTitle title); +# 106 "/usr/include/libxml2/libxml/xlink.h" +typedef void +(*xlinkExtendedLinkFunk)(void *ctx, + xmlNodePtr node, + int nbLocators, + const xlinkHRef *hrefs, + const xlinkRole *roles, + int nbArcs, + const xlinkRole *from, + const xlinkRole *to, + xlinkShow *show, + xlinkActuate *actuate, + int nbTitles, + const xlinkTitle *titles, + const xmlChar **langs); +# 134 "/usr/include/libxml2/libxml/xlink.h" +typedef void +(*xlinkExtendedLinkSetFunk) (void *ctx, + xmlNodePtr node, + int nbLocators, + const xlinkHRef *hrefs, + const xlinkRole *roles, + int nbTitles, + const xlinkTitle *titles, + const xmlChar **langs); + + + + + + + +typedef struct _xlinkHandler xlinkHandler; +typedef xlinkHandler *xlinkHandlerPtr; +struct _xlinkHandler { + xlinkSimpleLinkFunk simple; + xlinkExtendedLinkFunk extended; + xlinkExtendedLinkSetFunk set; +}; + + + + + + + xlinkNodeDetectFunc + xlinkGetDefaultDetect (void); + void + xlinkSetDefaultDetect (xlinkNodeDetectFunc func); + + + + + xlinkHandlerPtr + xlinkGetDefaultHandler (void); + void + xlinkSetDefaultHandler (xlinkHandlerPtr handler); + + + + + xlinkType + xlinkIsLink (xmlDocPtr doc, + xmlNodePtr node); + + +} +# 20 "/usr/include/libxml2/libxml/SAX.h" 2 + + + + +extern "C" { + + const xmlChar * + getPublicId (void *ctx); + const xmlChar * + getSystemId (void *ctx); + void + setDocumentLocator (void *ctx, + xmlSAXLocatorPtr loc); + + int + getLineNumber (void *ctx); + int + getColumnNumber (void *ctx); + + int + isStandalone (void *ctx); + int + hasInternalSubset (void *ctx); + int + hasExternalSubset (void *ctx); + + void + internalSubset (void *ctx, + const xmlChar *name, + const xmlChar *ExternalID, + const xmlChar *SystemID); + void + externalSubset (void *ctx, + const xmlChar *name, + const xmlChar *ExternalID, + const xmlChar *SystemID); + xmlEntityPtr + getEntity (void *ctx, + const xmlChar *name); + xmlEntityPtr + getParameterEntity (void *ctx, + const xmlChar *name); + xmlParserInputPtr + resolveEntity (void *ctx, + const xmlChar *publicId, + const xmlChar *systemId); + + void + entityDecl (void *ctx, + const xmlChar *name, + int type, + const xmlChar *publicId, + const xmlChar *systemId, + xmlChar *content); + void + attributeDecl (void *ctx, + const xmlChar *elem, + const xmlChar *fullname, + int type, + int def, + const xmlChar *defaultValue, + xmlEnumerationPtr tree); + void + elementDecl (void *ctx, + const xmlChar *name, + int type, + xmlElementContentPtr content); + void + notationDecl (void *ctx, + const xmlChar *name, + const xmlChar *publicId, + const xmlChar *systemId); + void + unparsedEntityDecl (void *ctx, + const xmlChar *name, + const xmlChar *publicId, + const xmlChar *systemId, + const xmlChar *notationName); + + void + startDocument (void *ctx); + void + endDocument (void *ctx); + void + attribute (void *ctx, + const xmlChar *fullname, + const xmlChar *value); + void + startElement (void *ctx, + const xmlChar *fullname, + const xmlChar **atts); + void + endElement (void *ctx, + const xmlChar *name); + void + reference (void *ctx, + const xmlChar *name); + void + characters (void *ctx, + const xmlChar *ch, + int len); + void + ignorableWhitespace (void *ctx, + const xmlChar *ch, + int len); + void + processingInstruction (void *ctx, + const xmlChar *target, + const xmlChar *data); + void + globalNamespace (void *ctx, + const xmlChar *href, + const xmlChar *prefix); + void + setNamespace (void *ctx, + const xmlChar *name); + xmlNsPtr + getNamespace (void *ctx); + int + checkNamespace (void *ctx, + xmlChar *nameSpace); + void + namespaceDecl (void *ctx, + const xmlChar *href, + const xmlChar *prefix); + void + comment (void *ctx, + const xmlChar *value); + void + cdataBlock (void *ctx, + const xmlChar *value, + int len); + + + void + initxmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr, + int warning); + + void + inithtmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr); + + + void + initdocbDefaultSAXHandler (xmlSAXHandlerV1 *hdlr); + + + + +} +# 21 "/usr/include/libxml2/libxml/globals.h" 2 +# 1 "/usr/include/libxml2/libxml/SAX2.h" 1 +# 13 "/usr/include/libxml2/libxml/SAX2.h" +#define __XML_SAX2_H__ +# 22 "/usr/include/libxml2/libxml/SAX2.h" +extern "C" { + + const xmlChar * + xmlSAX2GetPublicId (void *ctx); + const xmlChar * + xmlSAX2GetSystemId (void *ctx); + void + xmlSAX2SetDocumentLocator (void *ctx, + xmlSAXLocatorPtr loc); + + int + xmlSAX2GetLineNumber (void *ctx); + int + xmlSAX2GetColumnNumber (void *ctx); + + int + xmlSAX2IsStandalone (void *ctx); + int + xmlSAX2HasInternalSubset (void *ctx); + int + xmlSAX2HasExternalSubset (void *ctx); + + void + xmlSAX2InternalSubset (void *ctx, + const xmlChar *name, + const xmlChar *ExternalID, + const xmlChar *SystemID); + void + xmlSAX2ExternalSubset (void *ctx, + const xmlChar *name, + const xmlChar *ExternalID, + const xmlChar *SystemID); + xmlEntityPtr + xmlSAX2GetEntity (void *ctx, + const xmlChar *name); + xmlEntityPtr + xmlSAX2GetParameterEntity (void *ctx, + const xmlChar *name); + xmlParserInputPtr + xmlSAX2ResolveEntity (void *ctx, + const xmlChar *publicId, + const xmlChar *systemId); + + void + xmlSAX2EntityDecl (void *ctx, + const xmlChar *name, + int type, + const xmlChar *publicId, + const xmlChar *systemId, + xmlChar *content); + void + xmlSAX2AttributeDecl (void *ctx, + const xmlChar *elem, + const xmlChar *fullname, + int type, + int def, + const xmlChar *defaultValue, + xmlEnumerationPtr tree); + void + xmlSAX2ElementDecl (void *ctx, + const xmlChar *name, + int type, + xmlElementContentPtr content); + void + xmlSAX2NotationDecl (void *ctx, + const xmlChar *name, + const xmlChar *publicId, + const xmlChar *systemId); + void + xmlSAX2UnparsedEntityDecl (void *ctx, + const xmlChar *name, + const xmlChar *publicId, + const xmlChar *systemId, + const xmlChar *notationName); + + void + xmlSAX2StartDocument (void *ctx); + void + xmlSAX2EndDocument (void *ctx); + + void + xmlSAX2StartElement (void *ctx, + const xmlChar *fullname, + const xmlChar **atts); + void + xmlSAX2EndElement (void *ctx, + const xmlChar *name); + + void + xmlSAX2StartElementNs (void *ctx, + const xmlChar *localname, + const xmlChar *prefix, + const xmlChar *URI, + int nb_namespaces, + const xmlChar **namespaces, + int nb_attributes, + int nb_defaulted, + const xmlChar **attributes); + void + xmlSAX2EndElementNs (void *ctx, + const xmlChar *localname, + const xmlChar *prefix, + const xmlChar *URI); + void + xmlSAX2Reference (void *ctx, + const xmlChar *name); + void + xmlSAX2Characters (void *ctx, + const xmlChar *ch, + int len); + void + xmlSAX2IgnorableWhitespace (void *ctx, + const xmlChar *ch, + int len); + void + xmlSAX2ProcessingInstruction (void *ctx, + const xmlChar *target, + const xmlChar *data); + void + xmlSAX2Comment (void *ctx, + const xmlChar *value); + void + xmlSAX2CDataBlock (void *ctx, + const xmlChar *value, + int len); + + + int + xmlSAXDefaultVersion (int version); + + + int + xmlSAXVersion (xmlSAXHandler *hdlr, + int version); + void + xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr, + int warning); + + void + xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr); + void + htmlDefaultSAXHandlerInit (void); + + + void + xmlSAX2InitDocbDefaultSAXHandler(xmlSAXHandler *hdlr); + void + docbDefaultSAXHandlerInit (void); + + void + xmlDefaultSAXHandlerInit (void); + +} +# 22 "/usr/include/libxml2/libxml/globals.h" 2 +# 1 "/usr/include/libxml2/libxml/xmlmemory.h" 1 +# 13 "/usr/include/libxml2/libxml/xmlmemory.h" +#define __DEBUG_MEMORY_ALLOC__ +# 45 "/usr/include/libxml2/libxml/xmlmemory.h" +extern "C" { +# 57 "/usr/include/libxml2/libxml/xmlmemory.h" +typedef void ( *xmlFreeFunc)(void *mem); +# 66 "/usr/include/libxml2/libxml/xmlmemory.h" +typedef void *(__attribute__((alloc_size(1))) *xmlMallocFunc)(size_t size); +# 77 "/usr/include/libxml2/libxml/xmlmemory.h" +typedef void *( *xmlReallocFunc)(void *mem, size_t size); +# 87 "/usr/include/libxml2/libxml/xmlmemory.h" +typedef char *( *xmlStrdupFunc)(const char *str); +# 103 "/usr/include/libxml2/libxml/xmlmemory.h" + int + xmlMemSetup (xmlFreeFunc freeFunc, + xmlMallocFunc mallocFunc, + xmlReallocFunc reallocFunc, + xmlStrdupFunc strdupFunc); + int + xmlMemGet (xmlFreeFunc *freeFunc, + xmlMallocFunc *mallocFunc, + xmlReallocFunc *reallocFunc, + xmlStrdupFunc *strdupFunc); + int + xmlGcMemSetup (xmlFreeFunc freeFunc, + xmlMallocFunc mallocFunc, + xmlMallocFunc mallocAtomicFunc, + xmlReallocFunc reallocFunc, + xmlStrdupFunc strdupFunc); + int + xmlGcMemGet (xmlFreeFunc *freeFunc, + xmlMallocFunc *mallocFunc, + xmlMallocFunc *mallocAtomicFunc, + xmlReallocFunc *reallocFunc, + xmlStrdupFunc *strdupFunc); + + + + + int + xmlInitMemory (void); + + + + + void + xmlCleanupMemory (void); + + + + int + xmlMemUsed (void); + int + xmlMemBlocks (void); + void + xmlMemDisplay (FILE *fp); + void + xmlMemDisplayLast(FILE *fp, long nbBytes); + void + xmlMemShow (FILE *fp, int nr); + void + xmlMemoryDump (void); + void * + xmlMemMalloc (size_t size) __attribute__((alloc_size(1))); + void * + xmlMemRealloc (void *ptr,size_t size); + void + xmlMemFree (void *ptr); + char * + xmlMemoryStrdup (const char *str); + void * + xmlMallocLoc (size_t size, const char *file, int line) __attribute__((alloc_size(1))); + void * + xmlReallocLoc (void *ptr, size_t size, const char *file, int line); + void * + xmlMallocAtomicLoc (size_t size, const char *file, int line) __attribute__((alloc_size(1))); + char * + xmlMemStrdupLoc (const char *str, const char *file, int line); +# 213 "/usr/include/libxml2/libxml/xmlmemory.h" +} +# 23 "/usr/include/libxml2/libxml/globals.h" 2 + + +extern "C" { + + + void xmlInitGlobals(void); + void xmlCleanupGlobals(void); +# 42 "/usr/include/libxml2/libxml/globals.h" +typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc) (const char *URI, xmlCharEncoding enc); +# 55 "/usr/include/libxml2/libxml/globals.h" +typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const char *URI, xmlCharEncodingHandlerPtr encoder, int compression); + + xmlParserInputBufferCreateFilenameFunc + xmlParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func); + xmlOutputBufferCreateFilenameFunc + xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func); + + + + + + +#undef docbDefaultSAXHandler +#undef htmlDefaultSAXHandler +#undef oldXMLWDcompatibility +#undef xmlBufferAllocScheme +#undef xmlDefaultBufferSize +#undef xmlDefaultSAXHandler +#undef xmlDefaultSAXLocator +#undef xmlDoValidityCheckingDefaultValue +#undef xmlFree +#undef xmlGenericError +#undef xmlStructuredError +#undef xmlGenericErrorContext +#undef xmlStructuredErrorContext +#undef xmlGetWarningsDefaultValue +#undef xmlIndentTreeOutput +#undef xmlTreeIndentString +#undef xmlKeepBlanksDefaultValue +#undef xmlLineNumbersDefaultValue +#undef xmlLoadExtDtdDefaultValue +#undef xmlMalloc +#undef xmlMallocAtomic +#undef xmlMemStrdup +#undef xmlParserDebugEntities +#undef xmlParserVersion +#undef xmlPedanticParserDefaultValue +#undef xmlRealloc +#undef xmlSaveNoEmptyTags +#undef xmlSubstituteEntitiesDefaultValue +#undef xmlRegisterNodeDefaultValue +#undef xmlDeregisterNodeDefaultValue +#undef xmlLastError +#undef xmlParserInputBufferCreateFilenameValue +#undef xmlOutputBufferCreateFilenameValue + + + + + + + +typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node); + + + + + + +typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node); + +typedef struct _xmlGlobalState xmlGlobalState; +typedef xmlGlobalState *xmlGlobalStatePtr; +struct _xmlGlobalState +{ + const char *xmlParserVersion; + + xmlSAXLocator xmlDefaultSAXLocator; + xmlSAXHandlerV1 xmlDefaultSAXHandler; + xmlSAXHandlerV1 docbDefaultSAXHandler; + xmlSAXHandlerV1 htmlDefaultSAXHandler; + + xmlFreeFunc xmlFree; + xmlMallocFunc xmlMalloc; + xmlStrdupFunc xmlMemStrdup; + xmlReallocFunc xmlRealloc; + + xmlGenericErrorFunc xmlGenericError; + xmlStructuredErrorFunc xmlStructuredError; + void *xmlGenericErrorContext; + + int oldXMLWDcompatibility; + + xmlBufferAllocationScheme xmlBufferAllocScheme; + int xmlDefaultBufferSize; + + int xmlSubstituteEntitiesDefaultValue; + int xmlDoValidityCheckingDefaultValue; + int xmlGetWarningsDefaultValue; + int xmlKeepBlanksDefaultValue; + int xmlLineNumbersDefaultValue; + int xmlLoadExtDtdDefaultValue; + int xmlParserDebugEntities; + int xmlPedanticParserDefaultValue; + + int xmlSaveNoEmptyTags; + int xmlIndentTreeOutput; + const char *xmlTreeIndentString; + + xmlRegisterNodeFunc xmlRegisterNodeDefaultValue; + xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue; + + xmlMallocFunc xmlMallocAtomic; + xmlError xmlLastError; + + xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue; + xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue; + + void *xmlStructuredErrorContext; +}; + + +} + +# 1 "/usr/include/libxml2/libxml/threads.h" 1 +# 12 "/usr/include/libxml2/libxml/threads.h" +#define __XML_THREADS_H__ + + + + +extern "C" { + + + + + +typedef struct _xmlMutex xmlMutex; +typedef xmlMutex *xmlMutexPtr; + + + + +typedef struct _xmlRMutex xmlRMutex; +typedef xmlRMutex *xmlRMutexPtr; + + +} + +# 1 "/usr/include/libxml2/libxml/globals.h" 1 +# 36 "/usr/include/libxml2/libxml/threads.h" 2 + +extern "C" { + + xmlMutexPtr + xmlNewMutex (void); + void + xmlMutexLock (xmlMutexPtr tok); + void + xmlMutexUnlock (xmlMutexPtr tok); + void + xmlFreeMutex (xmlMutexPtr tok); + + xmlRMutexPtr + xmlNewRMutex (void); + void + xmlRMutexLock (xmlRMutexPtr tok); + void + xmlRMutexUnlock (xmlRMutexPtr tok); + void + xmlFreeRMutex (xmlRMutexPtr tok); + + + + + void + xmlInitThreads (void); + void + xmlLockLibrary (void); + void + xmlUnlockLibrary(void); + int + xmlGetThreadId (void); + int + xmlIsMainThread (void); + void + xmlCleanupThreads(void); + xmlGlobalStatePtr + xmlGetGlobalState(void); + + + + + + +} +# 170 "/usr/include/libxml2/libxml/globals.h" 2 + +extern "C" { + + + void xmlInitializeGlobalState(xmlGlobalStatePtr gs); + + void xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler); + + void xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler); + + xmlRegisterNodeFunc xmlRegisterNodeDefault(xmlRegisterNodeFunc func); + xmlRegisterNodeFunc xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func); + xmlDeregisterNodeFunc xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func); + xmlDeregisterNodeFunc xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func); + + xmlOutputBufferCreateFilenameFunc + xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func); + xmlParserInputBufferCreateFilenameFunc + xmlThrDefParserInputBufferCreateFilenameDefault(xmlParserInputBufferCreateFilenameFunc func); +# 243 "/usr/include/libxml2/libxml/globals.h" +extern xmlMallocFunc xmlMalloc; +extern xmlMallocFunc xmlMallocAtomic; +extern xmlReallocFunc xmlRealloc; +extern xmlFreeFunc xmlFree; +extern xmlStrdupFunc xmlMemStrdup; + + + + xmlSAXHandlerV1 * __docbDefaultSAXHandler(void); + +#define docbDefaultSAXHandler (*(__docbDefaultSAXHandler())) + + + + + + + + xmlSAXHandlerV1 * __htmlDefaultSAXHandler(void); + +#define htmlDefaultSAXHandler (*(__htmlDefaultSAXHandler())) + + + + + + + xmlError * __xmlLastError(void); + +#define xmlLastError (*(__xmlLastError())) +# 285 "/usr/include/libxml2/libxml/globals.h" + int * __oldXMLWDcompatibility(void); + +#define oldXMLWDcompatibility (*(__oldXMLWDcompatibility())) + + + + + + xmlBufferAllocationScheme * __xmlBufferAllocScheme(void); + +#define xmlBufferAllocScheme (*(__xmlBufferAllocScheme())) + + + + + xmlBufferAllocationScheme xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v); + + int * __xmlDefaultBufferSize(void); + +#define xmlDefaultBufferSize (*(__xmlDefaultBufferSize())) + + + + + int xmlThrDefDefaultBufferSize(int v); + + xmlSAXHandlerV1 * __xmlDefaultSAXHandler(void); + +#define xmlDefaultSAXHandler (*(__xmlDefaultSAXHandler())) + + + + + + xmlSAXLocator * __xmlDefaultSAXLocator(void); + +#define xmlDefaultSAXLocator (*(__xmlDefaultSAXLocator())) + + + + + + int * __xmlDoValidityCheckingDefaultValue(void); + +#define xmlDoValidityCheckingDefaultValue (*(__xmlDoValidityCheckingDefaultValue())) + + + + + int xmlThrDefDoValidityCheckingDefaultValue(int v); + + xmlGenericErrorFunc * __xmlGenericError(void); + +#define xmlGenericError (*(__xmlGenericError())) + + + + + + xmlStructuredErrorFunc * __xmlStructuredError(void); + +#define xmlStructuredError (*(__xmlStructuredError())) + + + + + + void * * __xmlGenericErrorContext(void); + +#define xmlGenericErrorContext (*(__xmlGenericErrorContext())) + + + + + + void * * __xmlStructuredErrorContext(void); + +#define xmlStructuredErrorContext (*(__xmlStructuredErrorContext())) + + + + + + int * __xmlGetWarningsDefaultValue(void); + +#define xmlGetWarningsDefaultValue (*(__xmlGetWarningsDefaultValue())) + + + + + int xmlThrDefGetWarningsDefaultValue(int v); + + int * __xmlIndentTreeOutput(void); + +#define xmlIndentTreeOutput (*(__xmlIndentTreeOutput())) + + + + + int xmlThrDefIndentTreeOutput(int v); + + const char * * __xmlTreeIndentString(void); + +#define xmlTreeIndentString (*(__xmlTreeIndentString())) + + + + + const char * xmlThrDefTreeIndentString(const char * v); + + int * __xmlKeepBlanksDefaultValue(void); + +#define xmlKeepBlanksDefaultValue (*(__xmlKeepBlanksDefaultValue())) + + + + + int xmlThrDefKeepBlanksDefaultValue(int v); + + int * __xmlLineNumbersDefaultValue(void); + +#define xmlLineNumbersDefaultValue (*(__xmlLineNumbersDefaultValue())) + + + + + int xmlThrDefLineNumbersDefaultValue(int v); + + int * __xmlLoadExtDtdDefaultValue(void); + +#define xmlLoadExtDtdDefaultValue (*(__xmlLoadExtDtdDefaultValue())) + + + + + int xmlThrDefLoadExtDtdDefaultValue(int v); + + int * __xmlParserDebugEntities(void); + +#define xmlParserDebugEntities (*(__xmlParserDebugEntities())) + + + + + int xmlThrDefParserDebugEntities(int v); + + const char * * __xmlParserVersion(void); + +#define xmlParserVersion (*(__xmlParserVersion())) + + + + + + int * __xmlPedanticParserDefaultValue(void); + +#define xmlPedanticParserDefaultValue (*(__xmlPedanticParserDefaultValue())) + + + + + int xmlThrDefPedanticParserDefaultValue(int v); + + int * __xmlSaveNoEmptyTags(void); + +#define xmlSaveNoEmptyTags (*(__xmlSaveNoEmptyTags())) + + + + + int xmlThrDefSaveNoEmptyTags(int v); + + int * __xmlSubstituteEntitiesDefaultValue(void); + +#define xmlSubstituteEntitiesDefaultValue (*(__xmlSubstituteEntitiesDefaultValue())) + + + + + int xmlThrDefSubstituteEntitiesDefaultValue(int v); + + xmlRegisterNodeFunc * __xmlRegisterNodeDefaultValue(void); + +#define xmlRegisterNodeDefaultValue (*(__xmlRegisterNodeDefaultValue())) + + + + + + xmlDeregisterNodeFunc * __xmlDeregisterNodeDefaultValue(void); + +#define xmlDeregisterNodeDefaultValue (*(__xmlDeregisterNodeDefaultValue())) + + + + + + xmlParserInputBufferCreateFilenameFunc * __xmlParserInputBufferCreateFilenameValue(void); + +#define xmlParserInputBufferCreateFilenameValue (*(__xmlParserInputBufferCreateFilenameValue())) + + + + + + xmlOutputBufferCreateFilenameFunc * __xmlOutputBufferCreateFilenameValue(void); + +#define xmlOutputBufferCreateFilenameValue (*(__xmlOutputBufferCreateFilenameValue())) + + + + + + +} +# 118 "/usr/include/libxml2/libxml/xmlIO.h" 2 + + + + + +extern "C" { + +struct _xmlParserInputBuffer { + void* context; + xmlInputReadCallback readcallback; + xmlInputCloseCallback closecallback; + + xmlCharEncodingHandlerPtr encoder; + + xmlBufferPtr buffer; + xmlBufferPtr raw; + int compressed; + int error; + unsigned long rawconsumed; +}; + + + +struct _xmlOutputBuffer { + void* context; + xmlOutputWriteCallback writecallback; + xmlOutputCloseCallback closecallback; + + xmlCharEncodingHandlerPtr encoder; + + xmlBufferPtr buffer; + xmlBufferPtr conv; + int written; + int error; +}; + + + + + + void + xmlCleanupInputCallbacks (void); + + int + xmlPopInputCallbacks (void); + + void + xmlRegisterDefaultInputCallbacks (void); + xmlParserInputBufferPtr + xmlAllocParserInputBuffer (xmlCharEncoding enc); + + xmlParserInputBufferPtr + xmlParserInputBufferCreateFilename (const char *URI, + xmlCharEncoding enc); + xmlParserInputBufferPtr + xmlParserInputBufferCreateFile (FILE *file, + xmlCharEncoding enc); + xmlParserInputBufferPtr + xmlParserInputBufferCreateFd (int fd, + xmlCharEncoding enc); + xmlParserInputBufferPtr + xmlParserInputBufferCreateMem (const char *mem, int size, + xmlCharEncoding enc); + xmlParserInputBufferPtr + xmlParserInputBufferCreateStatic (const char *mem, int size, + xmlCharEncoding enc); + xmlParserInputBufferPtr + xmlParserInputBufferCreateIO (xmlInputReadCallback ioread, + xmlInputCloseCallback ioclose, + void *ioctx, + xmlCharEncoding enc); + int + xmlParserInputBufferRead (xmlParserInputBufferPtr in, + int len); + int + xmlParserInputBufferGrow (xmlParserInputBufferPtr in, + int len); + int + xmlParserInputBufferPush (xmlParserInputBufferPtr in, + int len, + const char *buf); + void + xmlFreeParserInputBuffer (xmlParserInputBufferPtr in); + char * + xmlParserGetDirectory (const char *filename); + + int + xmlRegisterInputCallbacks (xmlInputMatchCallback matchFunc, + xmlInputOpenCallback openFunc, + xmlInputReadCallback readFunc, + xmlInputCloseCallback closeFunc); + +xmlParserInputBufferPtr + __xmlParserInputBufferCreateFilename(const char *URI, + xmlCharEncoding enc); + + + + + + void + xmlCleanupOutputCallbacks (void); + void + xmlRegisterDefaultOutputCallbacks(void); + xmlOutputBufferPtr + xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder); + + xmlOutputBufferPtr + xmlOutputBufferCreateFilename (const char *URI, + xmlCharEncodingHandlerPtr encoder, + int compression); + + xmlOutputBufferPtr + xmlOutputBufferCreateFile (FILE *file, + xmlCharEncodingHandlerPtr encoder); + + xmlOutputBufferPtr + xmlOutputBufferCreateBuffer (xmlBufferPtr buffer, + xmlCharEncodingHandlerPtr encoder); + + xmlOutputBufferPtr + xmlOutputBufferCreateFd (int fd, + xmlCharEncodingHandlerPtr encoder); + + xmlOutputBufferPtr + xmlOutputBufferCreateIO (xmlOutputWriteCallback iowrite, + xmlOutputCloseCallback ioclose, + void *ioctx, + xmlCharEncodingHandlerPtr encoder); + + int + xmlOutputBufferWrite (xmlOutputBufferPtr out, + int len, + const char *buf); + int + xmlOutputBufferWriteString (xmlOutputBufferPtr out, + const char *str); + int + xmlOutputBufferWriteEscape (xmlOutputBufferPtr out, + const xmlChar *str, + xmlCharEncodingOutputFunc escaping); + + int + xmlOutputBufferFlush (xmlOutputBufferPtr out); + int + xmlOutputBufferClose (xmlOutputBufferPtr out); + + int + xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc, + xmlOutputOpenCallback openFunc, + xmlOutputWriteCallback writeFunc, + xmlOutputCloseCallback closeFunc); + +xmlOutputBufferPtr + __xmlOutputBufferCreateFilename(const char *URI, + xmlCharEncodingHandlerPtr encoder, + int compression); + + + + void + xmlRegisterHTTPPostCallbacks (void ); + + + + + xmlParserInputPtr + xmlCheckHTTPInput (xmlParserCtxtPtr ctxt, + xmlParserInputPtr ret); + + + + + xmlParserInputPtr + xmlNoNetExternalEntityLoader (const char *URL, + const char *ID, + xmlParserCtxtPtr ctxt); + + + + + + xmlChar * + xmlNormalizeWindowsPath (const xmlChar *path); + + int + xmlCheckFilename (const char *path); + + + + int + xmlFileMatch (const char *filename); + void * + xmlFileOpen (const char *filename); + int + xmlFileRead (void * context, + char * buffer, + int len); + int + xmlFileClose (void * context); + + + + + + int + xmlIOHTTPMatch (const char *filename); + void * + xmlIOHTTPOpen (const char *filename); + + void * + xmlIOHTTPOpenW (const char * post_uri, + int compression ); + + int + xmlIOHTTPRead (void * context, + char * buffer, + int len); + int + xmlIOHTTPClose (void * context); + + + + + + + int + xmlIOFTPMatch (const char *filename); + void * + xmlIOFTPOpen (const char *filename); + int + xmlIOFTPRead (void * context, + char * buffer, + int len); + int + xmlIOFTPClose (void * context); + + + +} +# 809 "/usr/include/libxml2/libxml/parser.h" 2 + + + +extern "C" { + + + + + + + void + xmlInitParser (void); + void + xmlCleanupParser (void); + + + + + int + xmlParserInputRead (xmlParserInputPtr in, + int len); + int + xmlParserInputGrow (xmlParserInputPtr in, + int len); + + + + + + xmlDocPtr + xmlParseDoc (const xmlChar *cur); + xmlDocPtr + xmlParseFile (const char *filename); + xmlDocPtr + xmlParseMemory (const char *buffer, + int size); + + int + xmlSubstituteEntitiesDefault(int val); + int + xmlKeepBlanksDefault (int val); + void + xmlStopParser (xmlParserCtxtPtr ctxt); + int + xmlPedanticParserDefault(int val); + int + xmlLineNumbersDefault (int val); + + + + + + xmlDocPtr + xmlRecoverDoc (const xmlChar *cur); + xmlDocPtr + xmlRecoverMemory (const char *buffer, + int size); + xmlDocPtr + xmlRecoverFile (const char *filename); + + + + + + int + xmlParseDocument (xmlParserCtxtPtr ctxt); + int + xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt); + + int + xmlSAXUserParseFile (xmlSAXHandlerPtr sax, + void *user_data, + const char *filename); + int + xmlSAXUserParseMemory (xmlSAXHandlerPtr sax, + void *user_data, + const char *buffer, + int size); + xmlDocPtr + xmlSAXParseDoc (xmlSAXHandlerPtr sax, + const xmlChar *cur, + int recovery); + xmlDocPtr + xmlSAXParseMemory (xmlSAXHandlerPtr sax, + const char *buffer, + int size, + int recovery); + xmlDocPtr + xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax, + const char *buffer, + int size, + int recovery, + void *data); + xmlDocPtr + xmlSAXParseFile (xmlSAXHandlerPtr sax, + const char *filename, + int recovery); + xmlDocPtr + xmlSAXParseFileWithData (xmlSAXHandlerPtr sax, + const char *filename, + int recovery, + void *data); + xmlDocPtr + xmlSAXParseEntity (xmlSAXHandlerPtr sax, + const char *filename); + xmlDocPtr + xmlParseEntity (const char *filename); + + + + xmlDtdPtr + xmlSAXParseDTD (xmlSAXHandlerPtr sax, + const xmlChar *ExternalID, + const xmlChar *SystemID); + xmlDtdPtr + xmlParseDTD (const xmlChar *ExternalID, + const xmlChar *SystemID); + xmlDtdPtr + xmlIOParseDTD (xmlSAXHandlerPtr sax, + xmlParserInputBufferPtr input, + xmlCharEncoding enc); + + + int + xmlParseBalancedChunkMemory(xmlDocPtr doc, + xmlSAXHandlerPtr sax, + void *user_data, + int depth, + const xmlChar *string, + xmlNodePtr *lst); + + xmlParserErrors + xmlParseInNodeContext (xmlNodePtr node, + const char *data, + int datalen, + int options, + xmlNodePtr *lst); + + int + xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc, + xmlSAXHandlerPtr sax, + void *user_data, + int depth, + const xmlChar *string, + xmlNodePtr *lst, + int recover); + int + xmlParseExternalEntity (xmlDocPtr doc, + xmlSAXHandlerPtr sax, + void *user_data, + int depth, + const xmlChar *URL, + const xmlChar *ID, + xmlNodePtr *lst); + + int + xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx, + const xmlChar *URL, + const xmlChar *ID, + xmlNodePtr *lst); + + + + + xmlParserCtxtPtr + xmlNewParserCtxt (void); + int + xmlInitParserCtxt (xmlParserCtxtPtr ctxt); + void + xmlClearParserCtxt (xmlParserCtxtPtr ctxt); + void + xmlFreeParserCtxt (xmlParserCtxtPtr ctxt); + + void + xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt, + const xmlChar* buffer, + const char *filename); + + xmlParserCtxtPtr + xmlCreateDocParserCtxt (const xmlChar *cur); + + + + + + int + xmlGetFeaturesList (int *len, + const char **result); + int + xmlGetFeature (xmlParserCtxtPtr ctxt, + const char *name, + void *result); + int + xmlSetFeature (xmlParserCtxtPtr ctxt, + const char *name, + void *value); + + + + + + + xmlParserCtxtPtr + xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, + void *user_data, + const char *chunk, + int size, + const char *filename); + int + xmlParseChunk (xmlParserCtxtPtr ctxt, + const char *chunk, + int size, + int terminate); + + + + + + + xmlParserCtxtPtr + xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax, + void *user_data, + xmlInputReadCallback ioread, + xmlInputCloseCallback ioclose, + void *ioctx, + xmlCharEncoding enc); + + xmlParserInputPtr + xmlNewIOInputStream (xmlParserCtxtPtr ctxt, + xmlParserInputBufferPtr input, + xmlCharEncoding enc); + + + + + const xmlParserNodeInfo* + xmlParserFindNodeInfo (const xmlParserCtxtPtr ctxt, + const xmlNodePtr node); + void + xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq); + void + xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq); + unsigned long + xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq, + const xmlNodePtr node); + void + xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt, + const xmlParserNodeInfoPtr info); + + + + + + void + xmlSetExternalEntityLoader(xmlExternalEntityLoader f); + xmlExternalEntityLoader + xmlGetExternalEntityLoader(void); + xmlParserInputPtr + xmlLoadExternalEntity (const char *URL, + const char *ID, + xmlParserCtxtPtr ctxt); + + + + + long + xmlByteConsumed (xmlParserCtxtPtr ctxt); +# 1086 "/usr/include/libxml2/libxml/parser.h" +typedef enum { + XML_PARSE_RECOVER = 1<<0, + XML_PARSE_NOENT = 1<<1, + XML_PARSE_DTDLOAD = 1<<2, + XML_PARSE_DTDATTR = 1<<3, + XML_PARSE_DTDVALID = 1<<4, + XML_PARSE_NOERROR = 1<<5, + XML_PARSE_NOWARNING = 1<<6, + XML_PARSE_PEDANTIC = 1<<7, + XML_PARSE_NOBLANKS = 1<<8, + XML_PARSE_SAX1 = 1<<9, + XML_PARSE_XINCLUDE = 1<<10, + XML_PARSE_NONET = 1<<11, + XML_PARSE_NODICT = 1<<12, + XML_PARSE_NSCLEAN = 1<<13, + XML_PARSE_NOCDATA = 1<<14, + XML_PARSE_NOXINCNODE= 1<<15, + XML_PARSE_COMPACT = 1<<16, + + + XML_PARSE_OLD10 = 1<<17, + XML_PARSE_NOBASEFIX = 1<<18, + XML_PARSE_HUGE = 1<<19, + XML_PARSE_OLDSAX = 1<<20 +} xmlParserOption; + + void + xmlCtxtReset (xmlParserCtxtPtr ctxt); + int + xmlCtxtResetPush (xmlParserCtxtPtr ctxt, + const char *chunk, + int size, + const char *filename, + const char *encoding); + int + xmlCtxtUseOptions (xmlParserCtxtPtr ctxt, + int options); + xmlDocPtr + xmlReadDoc (const xmlChar *cur, + const char *URL, + const char *encoding, + int options); + xmlDocPtr + xmlReadFile (const char *URL, + const char *encoding, + int options); + xmlDocPtr + xmlReadMemory (const char *buffer, + int size, + const char *URL, + const char *encoding, + int options); + xmlDocPtr + xmlReadFd (int fd, + const char *URL, + const char *encoding, + int options); + xmlDocPtr + xmlReadIO (xmlInputReadCallback ioread, + xmlInputCloseCallback ioclose, + void *ioctx, + const char *URL, + const char *encoding, + int options); + xmlDocPtr + xmlCtxtReadDoc (xmlParserCtxtPtr ctxt, + const xmlChar *cur, + const char *URL, + const char *encoding, + int options); + xmlDocPtr + xmlCtxtReadFile (xmlParserCtxtPtr ctxt, + const char *filename, + const char *encoding, + int options); + xmlDocPtr + xmlCtxtReadMemory (xmlParserCtxtPtr ctxt, + const char *buffer, + int size, + const char *URL, + const char *encoding, + int options); + xmlDocPtr + xmlCtxtReadFd (xmlParserCtxtPtr ctxt, + int fd, + const char *URL, + const char *encoding, + int options); + xmlDocPtr + xmlCtxtReadIO (xmlParserCtxtPtr ctxt, + xmlInputReadCallback ioread, + xmlInputCloseCallback ioclose, + void *ioctx, + const char *URL, + const char *encoding, + int options); +# 1193 "/usr/include/libxml2/libxml/parser.h" +typedef enum { + XML_WITH_THREAD = 1, + XML_WITH_TREE = 2, + XML_WITH_OUTPUT = 3, + XML_WITH_PUSH = 4, + XML_WITH_READER = 5, + XML_WITH_PATTERN = 6, + XML_WITH_WRITER = 7, + XML_WITH_SAX1 = 8, + XML_WITH_FTP = 9, + XML_WITH_HTTP = 10, + XML_WITH_VALID = 11, + XML_WITH_HTML = 12, + XML_WITH_LEGACY = 13, + XML_WITH_C14N = 14, + XML_WITH_CATALOG = 15, + XML_WITH_XPATH = 16, + XML_WITH_XPTR = 17, + XML_WITH_XINCLUDE = 18, + XML_WITH_ICONV = 19, + XML_WITH_ISO8859X = 20, + XML_WITH_UNICODE = 21, + XML_WITH_REGEXP = 22, + XML_WITH_AUTOMATA = 23, + XML_WITH_EXPR = 24, + XML_WITH_SCHEMAS = 25, + XML_WITH_SCHEMATRON = 26, + XML_WITH_MODULES = 27, + XML_WITH_DEBUG = 28, + XML_WITH_DEBUG_MEM = 29, + XML_WITH_DEBUG_RUN = 30, + XML_WITH_ZLIB = 31, + XML_WITH_ICU = 32, + XML_WITH_NONE = 99999 +} xmlFeature; + + int + xmlHasFeature (xmlFeature feature); + + +} +# 37 "../fwbuilder/FWObject.h" 2 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 1 3 +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 +#define _GLIBCXX_FSTREAM 1 + + +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/codecvt.h" 1 3 +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/codecvt.h" 3 +#define _CODECVT_H 1 + + +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/codecvt.h" 3 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + class codecvt_base + { + public: + enum result + { + ok, + partial, + error, + noconv + }; + }; +# 66 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/codecvt.h" 3 + template + class __codecvt_abstract_base + : public locale::facet, public codecvt_base + { + public: + + typedef codecvt_base::result result; + typedef _InternT intern_type; + typedef _ExternT extern_type; + typedef _StateT state_type; +# 114 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/codecvt.h" 3 + result + out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const + { + return this->do_out(__state, __from, __from_end, __from_next, + __to, __to_end, __to_next); + } +# 153 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/codecvt.h" 3 + result + unshift(state_type& __state, extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const + { return this->do_unshift(__state, __to,__to_end,__to_next); } +# 194 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/codecvt.h" 3 + result + in(state_type& __state, const extern_type* __from, + const extern_type* __from_end, const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const + { + return this->do_in(__state, __from, __from_end, __from_next, + __to, __to_end, __to_next); + } + + int + encoding() const throw() + { return this->do_encoding(); } + + bool + always_noconv() const throw() + { return this->do_always_noconv(); } + + int + length(state_type& __state, const extern_type* __from, + const extern_type* __end, size_t __max) const + { return this->do_length(__state, __from, __end, __max); } + + int + max_length() const throw() + { return this->do_max_length(); } + + protected: + explicit + __codecvt_abstract_base(size_t __refs = 0) : locale::facet(__refs) { } + + virtual + ~__codecvt_abstract_base() { } +# 235 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/codecvt.h" 3 + virtual result + do_out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const = 0; + + virtual result + do_unshift(state_type& __state, extern_type* __to, + extern_type* __to_end, extern_type*& __to_next) const = 0; + + virtual result + do_in(state_type& __state, const extern_type* __from, + const extern_type* __from_end, const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const = 0; + + virtual int + do_encoding() const throw() = 0; + + virtual bool + do_always_noconv() const throw() = 0; + + virtual int + do_length(state_type&, const extern_type* __from, + const extern_type* __end, size_t __max) const = 0; + + virtual int + do_max_length() const throw() = 0; + }; +# 274 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/codecvt.h" 3 + template + class codecvt + : public __codecvt_abstract_base<_InternT, _ExternT, _StateT> + { + public: + + typedef codecvt_base::result result; + typedef _InternT intern_type; + typedef _ExternT extern_type; + typedef _StateT state_type; + + protected: + __c_locale _M_c_locale_codecvt; + + public: + static locale::id id; + + explicit + codecvt(size_t __refs = 0) + : __codecvt_abstract_base<_InternT, _ExternT, _StateT> (__refs) { } + + explicit + codecvt(__c_locale __cloc, size_t __refs = 0); + + protected: + virtual + ~codecvt() { } + + virtual result + do_out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const; + + virtual result + do_unshift(state_type& __state, extern_type* __to, + extern_type* __to_end, extern_type*& __to_next) const; + + virtual result + do_in(state_type& __state, const extern_type* __from, + const extern_type* __from_end, const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const; + + virtual int + do_encoding() const throw(); + + virtual bool + do_always_noconv() const throw(); + + virtual int + do_length(state_type&, const extern_type* __from, + const extern_type* __end, size_t __max) const; + + virtual int + do_max_length() const throw(); + }; + + template + locale::id codecvt<_InternT, _ExternT, _StateT>::id; + + + template<> + class codecvt + : public __codecvt_abstract_base + { + public: + + typedef char intern_type; + typedef char extern_type; + typedef mbstate_t state_type; + + protected: + __c_locale _M_c_locale_codecvt; + + public: + static locale::id id; + + explicit + codecvt(size_t __refs = 0); + + explicit + codecvt(__c_locale __cloc, size_t __refs = 0); + + protected: + virtual + ~codecvt(); + + virtual result + do_out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const; + + virtual result + do_unshift(state_type& __state, extern_type* __to, + extern_type* __to_end, extern_type*& __to_next) const; + + virtual result + do_in(state_type& __state, const extern_type* __from, + const extern_type* __from_end, const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const; + + virtual int + do_encoding() const throw(); + + virtual bool + do_always_noconv() const throw(); + + virtual int + do_length(state_type&, const extern_type* __from, + const extern_type* __end, size_t __max) const; + + virtual int + do_max_length() const throw(); + }; + + + + template<> + class codecvt + : public __codecvt_abstract_base + { + public: + + typedef wchar_t intern_type; + typedef char extern_type; + typedef mbstate_t state_type; + + protected: + __c_locale _M_c_locale_codecvt; + + public: + static locale::id id; + + explicit + codecvt(size_t __refs = 0); + + explicit + codecvt(__c_locale __cloc, size_t __refs = 0); + + protected: + virtual + ~codecvt(); + + virtual result + do_out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const; + + virtual result + do_unshift(state_type& __state, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const; + + virtual result + do_in(state_type& __state, + const extern_type* __from, const extern_type* __from_end, + const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const; + + virtual + int do_encoding() const throw(); + + virtual + bool do_always_noconv() const throw(); + + virtual + int do_length(state_type&, const extern_type* __from, + const extern_type* __end, size_t __max) const; + + virtual int + do_max_length() const throw(); + }; + + + + template + class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT> + { + public: + explicit + codecvt_byname(const char* __s, size_t __refs = 0) + : codecvt<_InternT, _ExternT, _StateT>(__refs) + { + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + this->_S_destroy_c_locale(this->_M_c_locale_codecvt); + this->_S_create_c_locale(this->_M_c_locale_codecvt, __s); + } + } + + protected: + virtual + ~codecvt_byname() { } + }; + + + + + + extern template class codecvt_byname; + + extern template + const codecvt& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + extern template class codecvt_byname; + + extern template + const codecvt& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + +} +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstdio" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstdio" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstdio" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 2 3 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstdio" 2 3 + + + +#define _GLIBCXX_CSTDIO 1 + + +#undef clearerr +#undef fclose +#undef feof +#undef ferror +#undef fflush +#undef fgetc +#undef fgetpos +#undef fgets +#undef fopen +#undef fprintf +#undef fputc +#undef fputs +#undef fread +#undef freopen +#undef fscanf +#undef fseek +#undef fsetpos +#undef ftell +#undef fwrite +#undef getc +#undef getchar +#undef gets +#undef perror +#undef printf +#undef putc +#undef putchar +#undef puts +#undef remove +#undef rename +#undef rewind +#undef scanf +#undef setbuf +#undef setvbuf +#undef sprintf +#undef sscanf +#undef tmpfile +#undef tmpnam +#undef ungetc +#undef vfprintf +#undef vprintf +#undef vsprintf + +namespace std __attribute__ ((__visibility__ ("default"))) { + + using ::FILE; + using ::fpos_t; + + using ::clearerr; + using ::fclose; + using ::feof; + using ::ferror; + using ::fflush; + using ::fgetc; + using ::fgetpos; + using ::fgets; + using ::fopen; + using ::fprintf; + using ::fputc; + using ::fputs; + using ::fread; + using ::freopen; + using ::fscanf; + using ::fseek; + using ::fsetpos; + using ::ftell; + using ::fwrite; + using ::getc; + using ::getchar; + using ::gets; + using ::perror; + using ::printf; + using ::putc; + using ::putchar; + using ::puts; + using ::remove; + using ::rename; + using ::rewind; + using ::scanf; + using ::setbuf; + using ::setvbuf; + using ::sprintf; + using ::sscanf; + using ::tmpfile; + using ::tmpnam; + using ::ungetc; + using ::vfprintf; + using ::vprintf; + using ::vsprintf; + +} + + + +#undef snprintf +#undef vfscanf +#undef vscanf +#undef vsnprintf +#undef vsscanf + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { +# 167 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstdio" 3 + using ::snprintf; + using ::vfscanf; + using ::vscanf; + using ::vsnprintf; + using ::vsscanf; + + +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + + using ::__gnu_cxx::snprintf; + using ::__gnu_cxx::vfscanf; + using ::__gnu_cxx::vscanf; + using ::__gnu_cxx::vsnprintf; + using ::__gnu_cxx::vsscanf; + +} +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/basic_file.h" 1 3 +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/basic_file.h" 3 +#define _GLIBCXX_BASIC_FILE_STDIO_H 1 + + +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/basic_file.h" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++io.h" 1 3 +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++io.h" 3 +#define _GLIBCXX_CXX_IO_H 1 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstdio" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstdio" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstdio" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 2 3 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstdio" 2 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++io.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 2 3 +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/c++io.h" 2 3 + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + typedef __gthread_mutex_t __c_lock; + + + typedef FILE __c_file; + +} +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/x86_64-pc-linux-gnu/bits/basic_file.h" 2 3 + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + template + class __basic_file; + + + template<> + class __basic_file + { + + __c_file* _M_cfile; + + + bool _M_cfile_created; + + public: + __basic_file(__c_lock* __lock = 0) throw (); + + __basic_file* + open(const char* __name, ios_base::openmode __mode, int __prot = 0664); + + __basic_file* + sys_open(__c_file* __file, ios_base::openmode); + + __basic_file* + sys_open(int __fd, ios_base::openmode __mode) throw (); + + __basic_file* + close(); + + __attribute__ ((__pure__)) bool + is_open() const throw (); + + __attribute__ ((__pure__)) int + fd() throw (); + + __attribute__ ((__pure__)) __c_file* + file() throw (); + + ~__basic_file(); + + streamsize + xsputn(const char* __s, streamsize __n); + + streamsize + xsputn_2(const char* __s1, streamsize __n1, + const char* __s2, streamsize __n2); + + streamsize + xsgetn(char* __s, streamsize __n); + + streamoff + seekoff(streamoff __off, ios_base::seekdir __way) throw (); + + int + sync(); + + streamsize + showmanyc(); + }; + +} +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 2 3 + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 66 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + template + class basic_filebuf : public basic_streambuf<_CharT, _Traits> + { + public: + + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + typedef basic_streambuf __streambuf_type; + typedef basic_filebuf __filebuf_type; + typedef __basic_file __file_type; + typedef typename traits_type::state_type __state_type; + typedef codecvt __codecvt_type; + + friend class ios_base; + + protected: + + + __c_lock _M_lock; + + + __file_type _M_file; + + + ios_base::openmode _M_mode; + + + __state_type _M_state_beg; + + + + + __state_type _M_state_cur; + + + + __state_type _M_state_last; + + + char_type* _M_buf; + + + + + + + size_t _M_buf_size; + + + bool _M_buf_allocated; +# 128 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + bool _M_reading; + bool _M_writing; + + + + + + + + char_type _M_pback; + char_type* _M_pback_cur_save; + char_type* _M_pback_end_save; + bool _M_pback_init; + + + + const __codecvt_type* _M_codecvt; + + + + + + + char* _M_ext_buf; + + + + + streamsize _M_ext_buf_size; + + + + + + + const char* _M_ext_next; + char* _M_ext_end; + + + + + + + void + _M_create_pback() + { + if (!_M_pback_init) + { + _M_pback_cur_save = this->gptr(); + _M_pback_end_save = this->egptr(); + this->setg(&_M_pback, &_M_pback, &_M_pback + 1); + _M_pback_init = true; + } + } + + + + + + + void + _M_destroy_pback() throw() + { + if (_M_pback_init) + { + + _M_pback_cur_save += this->gptr() != this->eback(); + this->setg(_M_buf, _M_pback_cur_save, _M_pback_end_save); + _M_pback_init = false; + } + } + + public: + + + + + + + + basic_filebuf(); + + + + + virtual + ~basic_filebuf() + { this->close(); } + + + + + + bool + is_open() const throw() + { return _M_file.is_open(); } +# 264 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + __filebuf_type* + open(const char* __s, ios_base::openmode __mode); +# 291 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + __filebuf_type* + close(); + + protected: + void + _M_allocate_internal_buffer(); + + void + _M_destroy_internal_buffer() throw(); + + + virtual streamsize + showmanyc(); + + + + + + + virtual int_type + underflow(); + + virtual int_type + pbackfail(int_type __c = _Traits::eof()); +# 323 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + virtual int_type + overflow(int_type __c = _Traits::eof()); + + + + bool + _M_convert_to_external(char_type*, streamsize); +# 343 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + virtual __streambuf_type* + setbuf(char_type* __s, streamsize __n); + + virtual pos_type + seekoff(off_type __off, ios_base::seekdir __way, + ios_base::openmode __mode = ios_base::in | ios_base::out); + + virtual pos_type + seekpos(pos_type __pos, + ios_base::openmode __mode = ios_base::in | ios_base::out); + + + pos_type + _M_seek(off_type __off, ios_base::seekdir __way, __state_type __state); + + virtual int + sync(); + + virtual void + imbue(const locale& __loc); + + virtual streamsize + xsgetn(char_type* __s, streamsize __n); + + virtual streamsize + xsputn(const char_type* __s, streamsize __n); + + + bool + _M_terminate_output(); +# 386 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + void + _M_set_buffer(streamsize __off) + { + const bool __testin = _M_mode & ios_base::in; + const bool __testout = _M_mode & ios_base::out; + + if (__testin && __off > 0) + this->setg(_M_buf, _M_buf, _M_buf + __off); + else + this->setg(_M_buf, _M_buf, _M_buf); + + if (__testout && __off == 0 && _M_buf_size > 1 ) + this->setp(_M_buf, _M_buf + _M_buf_size - 1); + else + this->setp(__null, __null); + } + }; +# 414 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + template + class basic_ifstream : public basic_istream<_CharT, _Traits> + { + public: + + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + + typedef basic_filebuf __filebuf_type; + typedef basic_istream __istream_type; + + private: + __filebuf_type _M_filebuf; + + public: +# 441 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + basic_ifstream() : __istream_type(), _M_filebuf() + { this->init(&_M_filebuf); } +# 454 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + explicit + basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in) + : __istream_type(), _M_filebuf() + { + this->init(&_M_filebuf); + this->open(__s, __mode); + } +# 486 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + ~basic_ifstream() + { } +# 496 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + __filebuf_type* + rdbuf() const + { return const_cast<__filebuf_type*>(&_M_filebuf); } + + + + + + bool + is_open() + { return _M_filebuf.is_open(); } + + + + bool + is_open() const + { return _M_filebuf.is_open(); } +# 525 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + void + open(const char* __s, ios_base::openmode __mode = ios_base::in) + { + if (!_M_filebuf.open(__s, __mode | ios_base::in)) + this->setstate(ios_base::failbit); + else + + + this->clear(); + } +# 563 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + void + close() + { + if (!_M_filebuf.close()) + this->setstate(ios_base::failbit); + } + }; +# 582 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + template + class basic_ofstream : public basic_ostream<_CharT,_Traits> + { + public: + + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + + typedef basic_filebuf __filebuf_type; + typedef basic_ostream __ostream_type; + + private: + __filebuf_type _M_filebuf; + + public: +# 609 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + basic_ofstream(): __ostream_type(), _M_filebuf() + { this->init(&_M_filebuf); } +# 623 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + explicit + basic_ofstream(const char* __s, + ios_base::openmode __mode = ios_base::out|ios_base::trunc) + : __ostream_type(), _M_filebuf() + { + this->init(&_M_filebuf); + this->open(__s, __mode); + } +# 657 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + ~basic_ofstream() + { } +# 667 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + __filebuf_type* + rdbuf() const + { return const_cast<__filebuf_type*>(&_M_filebuf); } + + + + + + bool + is_open() + { return _M_filebuf.is_open(); } + + + + bool + is_open() const + { return _M_filebuf.is_open(); } +# 696 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + void + open(const char* __s, + ios_base::openmode __mode = ios_base::out | ios_base::trunc) + { + if (!_M_filebuf.open(__s, __mode | ios_base::out)) + this->setstate(ios_base::failbit); + else + + + this->clear(); + } +# 736 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + void + close() + { + if (!_M_filebuf.close()) + this->setstate(ios_base::failbit); + } + }; +# 755 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + template + class basic_fstream : public basic_iostream<_CharT, _Traits> + { + public: + + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + + typedef basic_filebuf __filebuf_type; + typedef basic_ios __ios_type; + typedef basic_iostream __iostream_type; + + private: + __filebuf_type _M_filebuf; + + public: +# 783 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + basic_fstream() + : __iostream_type(), _M_filebuf() + { this->init(&_M_filebuf); } +# 795 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + explicit + basic_fstream(const char* __s, + ios_base::openmode __mode = ios_base::in | ios_base::out) + : __iostream_type(__null), _M_filebuf() + { + this->init(&_M_filebuf); + this->open(__s, __mode); + } +# 826 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + ~basic_fstream() + { } +# 836 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + __filebuf_type* + rdbuf() const + { return const_cast<__filebuf_type*>(&_M_filebuf); } + + + + + + bool + is_open() + { return _M_filebuf.is_open(); } + + + + bool + is_open() const + { return _M_filebuf.is_open(); } +# 865 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + void + open(const char* __s, + ios_base::openmode __mode = ios_base::in | ios_base::out) + { + if (!_M_filebuf.open(__s, __mode)) + this->setstate(ios_base::failbit); + else + + + this->clear(); + } +# 905 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 3 + void + close() + { + if (!_M_filebuf.close()) + this->setstate(ios_base::failbit); + } + }; + +} + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/fstream.tcc" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/fstream.tcc" 3 +#define _FSTREAM_TCC 1 + + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/fstream.tcc" 3 + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + void + basic_filebuf<_CharT, _Traits>:: + _M_allocate_internal_buffer() + { + + + if (!_M_buf_allocated && !_M_buf) + { + _M_buf = new char_type[_M_buf_size]; + _M_buf_allocated = true; + } + } + + template + void + basic_filebuf<_CharT, _Traits>:: + _M_destroy_internal_buffer() throw() + { + if (_M_buf_allocated) + { + delete [] _M_buf; + _M_buf = __null; + _M_buf_allocated = false; + } + delete [] _M_ext_buf; + _M_ext_buf = __null; + _M_ext_buf_size = 0; + _M_ext_next = __null; + _M_ext_end = __null; + } + + template + basic_filebuf<_CharT, _Traits>:: + basic_filebuf() : __streambuf_type(), _M_lock(), _M_file(&_M_lock), + _M_mode(ios_base::openmode(0)), _M_state_beg(), _M_state_cur(), + _M_state_last(), _M_buf(__null), _M_buf_size(8192), + _M_buf_allocated(false), _M_reading(false), _M_writing(false), _M_pback(), + _M_pback_cur_save(0), _M_pback_end_save(0), _M_pback_init(false), + _M_codecvt(0), _M_ext_buf(0), _M_ext_buf_size(0), _M_ext_next(0), + _M_ext_end(0) + { + if (has_facet<__codecvt_type>(this->_M_buf_locale)) + _M_codecvt = &use_facet<__codecvt_type>(this->_M_buf_locale); + } + + template + typename basic_filebuf<_CharT, _Traits>::__filebuf_type* + basic_filebuf<_CharT, _Traits>:: + open(const char* __s, ios_base::openmode __mode) + { + __filebuf_type *__ret = __null; + if (!this->is_open()) + { + _M_file.open(__s, __mode); + if (this->is_open()) + { + _M_allocate_internal_buffer(); + _M_mode = __mode; + + + _M_reading = false; + _M_writing = false; + _M_set_buffer(-1); + + + _M_state_last = _M_state_cur = _M_state_beg; + + + if ((__mode & ios_base::ate) + && this->seekoff(0, ios_base::end, __mode) + == pos_type(off_type(-1))) + this->close(); + else + __ret = this; + } + } + return __ret; + } + + template + typename basic_filebuf<_CharT, _Traits>::__filebuf_type* + basic_filebuf<_CharT, _Traits>:: + close() + { + if (!this->is_open()) + return __null; + + bool __testfail = false; + { + + struct __close_sentry + { + basic_filebuf *__fb; + __close_sentry (basic_filebuf *__fbi): __fb(__fbi) { } + ~__close_sentry () + { + __fb->_M_mode = ios_base::openmode(0); + __fb->_M_pback_init = false; + __fb->_M_destroy_internal_buffer(); + __fb->_M_reading = false; + __fb->_M_writing = false; + __fb->_M_set_buffer(-1); + __fb->_M_state_last = __fb->_M_state_cur = __fb->_M_state_beg; + } + } __cs (this); + + try + { + if (!_M_terminate_output()) + __testfail = true; + } + catch(__cxxabiv1::__forced_unwind&) + { + _M_file.close(); + throw; + } + catch(...) + { __testfail = true; } + } + + if (!_M_file.close()) + __testfail = true; + + if (__testfail) + return __null; + else + return this; + } + + template + streamsize + basic_filebuf<_CharT, _Traits>:: + showmanyc() + { + streamsize __ret = -1; + const bool __testin = _M_mode & ios_base::in; + if (__testin && this->is_open()) + { + + + __ret = this->egptr() - this->gptr(); + + + + + + + + if (__check_facet(_M_codecvt).encoding() >= 0) + + __ret += _M_file.showmanyc() / _M_codecvt->max_length(); + } + return __ret; + } + + template + typename basic_filebuf<_CharT, _Traits>::int_type + basic_filebuf<_CharT, _Traits>:: + underflow() + { + int_type __ret = traits_type::eof(); + const bool __testin = _M_mode & ios_base::in; + if (__testin && !_M_writing) + { + + + + _M_destroy_pback(); + + if (this->gptr() < this->egptr()) + return traits_type::to_int_type(*this->gptr()); + + + const size_t __buflen = _M_buf_size > 1 ? _M_buf_size - 1 : 1; + + + bool __got_eof = false; + + streamsize __ilen = 0; + codecvt_base::result __r = codecvt_base::ok; + if (__check_facet(_M_codecvt).always_noconv()) + { + __ilen = _M_file.xsgetn(reinterpret_cast(this->eback()), + __buflen); + if (__ilen == 0) + __got_eof = true; + } + else + { + + + const int __enc = _M_codecvt->encoding(); + streamsize __blen; + streamsize __rlen; + if (__enc > 0) + __blen = __rlen = __buflen * __enc; + else + { + __blen = __buflen + _M_codecvt->max_length() - 1; + __rlen = __buflen; + } + const streamsize __remainder = _M_ext_end - _M_ext_next; + __rlen = __rlen > __remainder ? __rlen - __remainder : 0; + + + + if (_M_reading && this->egptr() == this->eback() && __remainder) + __rlen = 0; + + + + if (_M_ext_buf_size < __blen) + { + char* __buf = new char[__blen]; + if (__remainder) + __builtin_memcpy(__buf, _M_ext_next, __remainder); + + delete [] _M_ext_buf; + _M_ext_buf = __buf; + _M_ext_buf_size = __blen; + } + else if (__remainder) + __builtin_memmove(_M_ext_buf, _M_ext_next, __remainder); + + _M_ext_next = _M_ext_buf; + _M_ext_end = _M_ext_buf + __remainder; + _M_state_last = _M_state_cur; + + do + { + if (__rlen > 0) + { + + + + if (_M_ext_end - _M_ext_buf + __rlen > _M_ext_buf_size) + { + __throw_ios_failure(("basic_filebuf::underflow " "codecvt::max_length() " "is not valid") + + ); + } + streamsize __elen = _M_file.xsgetn(_M_ext_end, __rlen); + if (__elen == 0) + __got_eof = true; + else if (__elen == -1) + break; + _M_ext_end += __elen; + } + + char_type* __iend = this->eback(); + if (_M_ext_next < _M_ext_end) + __r = _M_codecvt->in(_M_state_cur, _M_ext_next, + _M_ext_end, _M_ext_next, + this->eback(), + this->eback() + __buflen, __iend); + if (__r == codecvt_base::noconv) + { + size_t __avail = _M_ext_end - _M_ext_buf; + __ilen = std::min(__avail, __buflen); + traits_type::copy(this->eback(), + reinterpret_cast + (_M_ext_buf), __ilen); + _M_ext_next = _M_ext_buf + __ilen; + } + else + __ilen = __iend - this->eback(); + + + + + if (__r == codecvt_base::error) + break; + + __rlen = 1; + } + while (__ilen == 0 && !__got_eof); + } + + if (__ilen > 0) + { + _M_set_buffer(__ilen); + _M_reading = true; + __ret = traits_type::to_int_type(*this->gptr()); + } + else if (__got_eof) + { + + + + _M_set_buffer(-1); + _M_reading = false; + + + if (__r == codecvt_base::partial) + __throw_ios_failure(("basic_filebuf::underflow " "incomplete character in file") + ); + } + else if (__r == codecvt_base::error) + __throw_ios_failure(("basic_filebuf::underflow " "invalid byte sequence in file") + ); + else + __throw_ios_failure(("basic_filebuf::underflow " "error reading the file") + ); + } + return __ret; + } + + template + typename basic_filebuf<_CharT, _Traits>::int_type + basic_filebuf<_CharT, _Traits>:: + pbackfail(int_type __i) + { + int_type __ret = traits_type::eof(); + const bool __testin = _M_mode & ios_base::in; + if (__testin && !_M_writing) + { + + + const bool __testpb = _M_pback_init; + const bool __testeof = traits_type::eq_int_type(__i, __ret); + int_type __tmp; + if (this->eback() < this->gptr()) + { + this->gbump(-1); + __tmp = traits_type::to_int_type(*this->gptr()); + } + else if (this->seekoff(-1, ios_base::cur) != pos_type(off_type(-1))) + { + __tmp = this->underflow(); + if (traits_type::eq_int_type(__tmp, __ret)) + return __ret; + } + else + { + + + + + + return __ret; + } + + + + if (!__testeof && traits_type::eq_int_type(__i, __tmp)) + __ret = __i; + else if (__testeof) + __ret = traits_type::not_eof(__i); + else if (!__testpb) + { + _M_create_pback(); + _M_reading = true; + *this->gptr() = traits_type::to_char_type(__i); + __ret = __i; + } + } + return __ret; + } + + template + typename basic_filebuf<_CharT, _Traits>::int_type + basic_filebuf<_CharT, _Traits>:: + overflow(int_type __c) + { + int_type __ret = traits_type::eof(); + const bool __testeof = traits_type::eq_int_type(__c, __ret); + const bool __testout = _M_mode & ios_base::out; + if (__testout && !_M_reading) + { + if (this->pbase() < this->pptr()) + { + + if (!__testeof) + { + *this->pptr() = traits_type::to_char_type(__c); + this->pbump(1); + } + + + + if (_M_convert_to_external(this->pbase(), + this->pptr() - this->pbase())) + { + _M_set_buffer(0); + __ret = traits_type::not_eof(__c); + } + } + else if (_M_buf_size > 1) + { + + + + _M_set_buffer(0); + _M_writing = true; + if (!__testeof) + { + *this->pptr() = traits_type::to_char_type(__c); + this->pbump(1); + } + __ret = traits_type::not_eof(__c); + } + else + { + + char_type __conv = traits_type::to_char_type(__c); + if (__testeof || _M_convert_to_external(&__conv, 1)) + { + _M_writing = true; + __ret = traits_type::not_eof(__c); + } + } + } + return __ret; + } + + template + bool + basic_filebuf<_CharT, _Traits>:: + _M_convert_to_external(_CharT* __ibuf, streamsize __ilen) + { + + streamsize __elen; + streamsize __plen; + if (__check_facet(_M_codecvt).always_noconv()) + { + __elen = _M_file.xsputn(reinterpret_cast(__ibuf), __ilen); + __plen = __ilen; + } + else + { + + + streamsize __blen = __ilen * _M_codecvt->max_length(); + char* __buf = static_cast(__builtin_alloca(__blen)); + + char* __bend; + const char_type* __iend; + codecvt_base::result __r; + __r = _M_codecvt->out(_M_state_cur, __ibuf, __ibuf + __ilen, + __iend, __buf, __buf + __blen, __bend); + + if (__r == codecvt_base::ok || __r == codecvt_base::partial) + __blen = __bend - __buf; + else if (__r == codecvt_base::noconv) + { + + __buf = reinterpret_cast(__ibuf); + __blen = __ilen; + } + else + __throw_ios_failure(("basic_filebuf::_M_convert_to_external " "conversion error") + ); + + __elen = _M_file.xsputn(__buf, __blen); + __plen = __blen; + + + if (__r == codecvt_base::partial && __elen == __plen) + { + const char_type* __iresume = __iend; + streamsize __rlen = this->pptr() - __iend; + __r = _M_codecvt->out(_M_state_cur, __iresume, + __iresume + __rlen, __iend, __buf, + __buf + __blen, __bend); + if (__r != codecvt_base::error) + { + __rlen = __bend - __buf; + __elen = _M_file.xsputn(__buf, __rlen); + __plen = __rlen; + } + else + __throw_ios_failure(("basic_filebuf::_M_convert_to_external " "conversion error") + ); + } + } + return __elen == __plen; + } + + template + streamsize + basic_filebuf<_CharT, _Traits>:: + xsgetn(_CharT* __s, streamsize __n) + { + + streamsize __ret = 0; + if (_M_pback_init) + { + if (__n > 0 && this->gptr() == this->eback()) + { + *__s++ = *this->gptr(); + this->gbump(1); + __ret = 1; + --__n; + } + _M_destroy_pback(); + } + + + + + const bool __testin = _M_mode & ios_base::in; + const streamsize __buflen = _M_buf_size > 1 ? _M_buf_size - 1 : 1; + + if (__n > __buflen && __check_facet(_M_codecvt).always_noconv() + && __testin && !_M_writing) + { + + const streamsize __avail = this->egptr() - this->gptr(); + if (__avail != 0) + { + if (__avail == 1) + *__s = *this->gptr(); + else + traits_type::copy(__s, this->gptr(), __avail); + __s += __avail; + this->gbump(__avail); + __ret += __avail; + __n -= __avail; + } + + + + streamsize __len; + for (;;) + { + __len = _M_file.xsgetn(reinterpret_cast(__s), + __n); + if (__len == -1) + __throw_ios_failure(("basic_filebuf::xsgetn " "error reading the file") + ); + if (__len == 0) + break; + + __n -= __len; + __ret += __len; + if (__n == 0) + break; + + __s += __len; + } + + if (__n == 0) + { + _M_set_buffer(0); + _M_reading = true; + } + else if (__len == 0) + { + + + + _M_set_buffer(-1); + _M_reading = false; + } + } + else + __ret += __streambuf_type::xsgetn(__s, __n); + + return __ret; + } + + template + streamsize + basic_filebuf<_CharT, _Traits>:: + xsputn(const _CharT* __s, streamsize __n) + { + + + + streamsize __ret = 0; + const bool __testout = _M_mode & ios_base::out; + if (__check_facet(_M_codecvt).always_noconv() + && __testout && !_M_reading) + { + + const streamsize __chunk = 1ul << 10; + streamsize __bufavail = this->epptr() - this->pptr(); + + + if (!_M_writing && _M_buf_size > 1) + __bufavail = _M_buf_size - 1; + + const streamsize __limit = std::min(__chunk, __bufavail); + if (__n >= __limit) + { + const streamsize __buffill = this->pptr() - this->pbase(); + const char* __buf = reinterpret_cast(this->pbase()); + __ret = _M_file.xsputn_2(__buf, __buffill, + reinterpret_cast(__s), + __n); + if (__ret == __buffill + __n) + { + _M_set_buffer(0); + _M_writing = true; + } + if (__ret > __buffill) + __ret -= __buffill; + else + __ret = 0; + } + else + __ret = __streambuf_type::xsputn(__s, __n); + } + else + __ret = __streambuf_type::xsputn(__s, __n); + return __ret; + } + + template + typename basic_filebuf<_CharT, _Traits>::__streambuf_type* + basic_filebuf<_CharT, _Traits>:: + setbuf(char_type* __s, streamsize __n) + { + if (!this->is_open()) + { + if (__s == 0 && __n == 0) + _M_buf_size = 1; + else if (__s && __n > 0) + { +# 673 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/fstream.tcc" 3 + _M_buf = __s; + _M_buf_size = __n; + } + } + return this; + } + + + + + template + typename basic_filebuf<_CharT, _Traits>::pos_type + basic_filebuf<_CharT, _Traits>:: + seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode) + { + int __width = 0; + if (_M_codecvt) + __width = _M_codecvt->encoding(); + if (__width < 0) + __width = 0; + + pos_type __ret = pos_type(off_type(-1)); + const bool __testfail = __off != 0 && __width <= 0; + if (this->is_open() && !__testfail) + { + + _M_destroy_pback(); + + + + + + + __state_type __state = _M_state_beg; + off_type __computed_off = __off * __width; + if (_M_reading && __way == ios_base::cur) + { + if (_M_codecvt->always_noconv()) + __computed_off += this->gptr() - this->egptr(); + else + { + + + + const int __gptr_off = + _M_codecvt->length(_M_state_last, _M_ext_buf, _M_ext_next, + this->gptr() - this->eback()); + __computed_off += _M_ext_buf + __gptr_off - _M_ext_end; + + + + __state = _M_state_last; + } + } + __ret = _M_seek(__computed_off, __way, __state); + } + return __ret; + } + + + + + + template + typename basic_filebuf<_CharT, _Traits>::pos_type + basic_filebuf<_CharT, _Traits>:: + seekpos(pos_type __pos, ios_base::openmode) + { + pos_type __ret = pos_type(off_type(-1)); + if (this->is_open()) + { + + _M_destroy_pback(); + __ret = _M_seek(off_type(__pos), ios_base::beg, __pos.state()); + } + return __ret; + } + + template + typename basic_filebuf<_CharT, _Traits>::pos_type + basic_filebuf<_CharT, _Traits>:: + _M_seek(off_type __off, ios_base::seekdir __way, __state_type __state) + { + pos_type __ret = pos_type(off_type(-1)); + if (_M_terminate_output()) + { + + __ret = pos_type(_M_file.seekoff(__off, __way)); + if (__ret != pos_type(off_type(-1))) + { + _M_reading = false; + _M_writing = false; + _M_ext_next = _M_ext_end = _M_ext_buf; + _M_set_buffer(-1); + _M_state_cur = __state; + __ret.state(_M_state_cur); + } + } + return __ret; + } + + template + bool + basic_filebuf<_CharT, _Traits>:: + _M_terminate_output() + { + + bool __testvalid = true; + if (this->pbase() < this->pptr()) + { + const int_type __tmp = this->overflow(); + if (traits_type::eq_int_type(__tmp, traits_type::eof())) + __testvalid = false; + } + + + if (_M_writing && !__check_facet(_M_codecvt).always_noconv() + && __testvalid) + { + + + + const size_t __blen = 128; + char __buf[__blen]; + codecvt_base::result __r; + streamsize __ilen = 0; + + do + { + char* __next; + __r = _M_codecvt->unshift(_M_state_cur, __buf, + __buf + __blen, __next); + if (__r == codecvt_base::error) + __testvalid = false; + else if (__r == codecvt_base::ok || + __r == codecvt_base::partial) + { + __ilen = __next - __buf; + if (__ilen > 0) + { + const streamsize __elen = _M_file.xsputn(__buf, __ilen); + if (__elen != __ilen) + __testvalid = false; + } + } + } + while (__r == codecvt_base::partial && __ilen > 0 && __testvalid); + + if (__testvalid) + { + + + + + const int_type __tmp = this->overflow(); + if (traits_type::eq_int_type(__tmp, traits_type::eof())) + __testvalid = false; + } + } + return __testvalid; + } + + template + int + basic_filebuf<_CharT, _Traits>:: + sync() + { + + + int __ret = 0; + if (this->pbase() < this->pptr()) + { + const int_type __tmp = this->overflow(); + if (traits_type::eq_int_type(__tmp, traits_type::eof())) + __ret = -1; + } + return __ret; + } + + template + void + basic_filebuf<_CharT, _Traits>:: + imbue(const locale& __loc) + { + bool __testvalid = true; + + const __codecvt_type* _M_codecvt_tmp = 0; + if (__builtin_expect(has_facet<__codecvt_type>(__loc), true)) + _M_codecvt_tmp = &use_facet<__codecvt_type>(__loc); + + if (this->is_open()) + { + + if ((_M_reading || _M_writing) + && __check_facet(_M_codecvt).encoding() == -1) + __testvalid = false; + else + { + if (_M_reading) + { + if (__check_facet(_M_codecvt).always_noconv()) + { + if (_M_codecvt_tmp + && !__check_facet(_M_codecvt_tmp).always_noconv()) + __testvalid = this->seekoff(0, ios_base::cur, _M_mode) + != pos_type(off_type(-1)); + } + else + { + + _M_ext_next = _M_ext_buf + + _M_codecvt->length(_M_state_last, _M_ext_buf, _M_ext_next, + this->gptr() - this->eback()); + const streamsize __remainder = _M_ext_end - _M_ext_next; + if (__remainder) + __builtin_memmove(_M_ext_buf, _M_ext_next, __remainder); + + _M_ext_next = _M_ext_buf; + _M_ext_end = _M_ext_buf + __remainder; + _M_set_buffer(-1); + _M_state_last = _M_state_cur = _M_state_beg; + } + } + else if (_M_writing && (__testvalid = _M_terminate_output())) + _M_set_buffer(-1); + } + } + + if (__testvalid) + _M_codecvt = _M_codecvt_tmp; + else + _M_codecvt = 0; + } + + + + + + extern template class basic_filebuf; + extern template class basic_ifstream; + extern template class basic_ofstream; + extern template class basic_fstream; + + + extern template class basic_filebuf; + extern template class basic_ifstream; + extern template class basic_ofstream; + extern template class basic_fstream; + + + +} +# 917 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/fstream" 2 3 +# 41 "../fwbuilder/FWObject.h" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstdlib" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstdlib" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstdlib" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstddef" 2 3 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstdlib" 2 3 + + +#define _GLIBCXX_CSTDLIB 1 +# 71 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstdlib" 3 +#undef abort +#undef abs +#undef atexit +#undef atof +#undef atoi +#undef atol +#undef bsearch +#undef calloc +#undef div +#undef exit +#undef free +#undef getenv +#undef labs +#undef ldiv +#undef malloc +#undef mblen +#undef mbstowcs +#undef mbtowc +#undef qsort +#undef rand +#undef realloc +#undef srand +#undef strtod +#undef strtol +#undef strtoul +#undef system +#undef wcstombs +#undef wctomb + +namespace std __attribute__ ((__visibility__ ("default"))) { + + using ::div_t; + using ::ldiv_t; + + using ::abort; + using ::abs; + using ::atexit; + using ::atof; + using ::atoi; + using ::atol; + using ::bsearch; + using ::calloc; + using ::div; + using ::exit; + using ::free; + using ::getenv; + using ::labs; + using ::ldiv; + using ::malloc; + + using ::mblen; + using ::mbstowcs; + using ::mbtowc; + + using ::qsort; + using ::rand; + using ::realloc; + using ::srand; + using ::strtod; + using ::strtol; + using ::strtoul; + using ::system; + + using ::wcstombs; + using ::wctomb; + + + inline long + abs(long __i) { return labs(__i); } + + inline ldiv_t + div(long __i, long __j) { return ldiv(__i, __j); } + +} + + + +#undef _Exit +#undef llabs +#undef lldiv +#undef atoll +#undef strtoll +#undef strtoull +#undef strtof +#undef strtold + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + + + using ::lldiv_t; + + + + + + using ::_Exit; + + + inline long long + abs(long long __x) { return __x >= 0 ? __x : -__x; } + + + using ::llabs; + + inline lldiv_t + div(long long __n, long long __d) + { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } + + using ::lldiv; +# 190 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/cstdlib" 3 + using ::atoll; + using ::strtoll; + using ::strtoull; + + using ::strtof; + using ::strtold; + +} + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + using ::__gnu_cxx::lldiv_t; + + using ::__gnu_cxx::_Exit; + using ::__gnu_cxx::abs; + + using ::__gnu_cxx::llabs; + using ::__gnu_cxx::div; + using ::__gnu_cxx::lldiv; + + using ::__gnu_cxx::atoll; + using ::__gnu_cxx::strtof; + using ::__gnu_cxx::strtoll; + using ::__gnu_cxx::strtoull; + using ::__gnu_cxx::strtold; + +} +# 42 "../fwbuilder/FWObject.h" 2 + +# 1 "../fwbuilder/libfwbuilder-config.h" 1 + + + + + + +#define FWBUILDER_XML_VERSION "22" + + + + + +#define RES_DIR "/usr/share/fwbuilder-5.0.1.3592" +# 27 "../fwbuilder/libfwbuilder-config.h" +#define HAVE_GETOPT_H 1 +# 44 "../fwbuilder/libfwbuilder-config.h" +#define HAVE_XMLSAVEFORMATFILEENC 1 + +#define HAVE_LIBXSLT_XSLTCONFIG_H 1 + + +#define HAVE_STRTOK_R 1 + +#define WORDS_LITTLEENDIAN 1 +# 61 "../fwbuilder/libfwbuilder-config.h" +#define SNPRINTF snprintf +#define VSNPRINTF vsnprintf +#define FS_SEPARATOR "/" + + + + + + +#define FREEXMLBUFF(x) xmlFree((void*)(x)) +# 44 "../fwbuilder/FWObject.h" 2 +# 1 "../fwbuilder/FWException.h" 1 +# 29 "../fwbuilder/FWException.h" +#define __FW_EXCEPTION_HH_FLAG__ + + + + +namespace libfwbuilder +{ + + + + +class FWException +{ + private: + + protected: + std::string reason; + std::map properties; + + public: + + + + + FWException(const std::string &reason); + virtual ~FWException() {}; + + + + + virtual const std::string &toString() const; + + std::map& getProperties(); + +}; + +class FWNotSupportedException: public FWException +{ + public: + + FWNotSupportedException(const std::string &reason):FWException(reason) {}; +}; + +} +# 45 "../fwbuilder/FWObject.h" 2 +# 1 "../fwbuilder/ObjectMatcher.h" 1 +# 28 "../fwbuilder/ObjectMatcher.h" +#define __OBJECTMATCHER_HH_FLAG__ + + + + +# 1 "../fwbuilder/libfwbuilder-config.h" 1 + + + + + + +#define FWBUILDER_XML_VERSION "22" + + + + + +#define RES_DIR "/usr/share/fwbuilder-5.0.1.3592" +# 27 "../fwbuilder/libfwbuilder-config.h" +#define HAVE_GETOPT_H 1 +# 44 "../fwbuilder/libfwbuilder-config.h" +#define HAVE_XMLSAVEFORMATFILEENC 1 + +#define HAVE_LIBXSLT_XSLTCONFIG_H 1 + + +#define HAVE_STRTOK_R 1 + +#define WORDS_LITTLEENDIAN 1 +# 61 "../fwbuilder/libfwbuilder-config.h" +#define SNPRINTF snprintf +#define VSNPRINTF vsnprintf +#define FS_SEPARATOR "/" + + + + + + +#define FREEXMLBUFF(x) xmlFree((void*)(x)) +# 34 "../fwbuilder/ObjectMatcher.h" 2 +# 1 "../fwbuilder/Dispatch.h" 1 +# 28 "../fwbuilder/Dispatch.h" +#define __DISPATCH_HH_FLAG__ + + + +# 1 "/usr/include/assert.h" 1 3 4 +# 26 "/usr/include/assert.h" 3 4 +#undef _ASSERT_H +#undef assert +#undef __ASSERT_VOID_CAST + + +#undef assert_perror + + + + +#define _ASSERT_H 1 + + + +#define __ASSERT_VOID_CAST static_cast +# 66 "/usr/include/assert.h" 3 4 +extern "C" { + + +extern void __assert_fail (__const char *__assertion, __const char *__file, + unsigned int __line, __const char *__function) + throw () __attribute__ ((__noreturn__)); + + +extern void __assert_perror_fail (int __errnum, __const char *__file, + unsigned int __line, + __const char *__function) + throw () __attribute__ ((__noreturn__)); + + + + +extern void __assert (const char *__assertion, const char *__file, int __line) + throw () __attribute__ ((__noreturn__)); + + +} + +#define assert(expr) ((expr) ? __ASSERT_VOID_CAST (0) : __assert_fail (__STRING(expr), __FILE__, __LINE__, __ASSERT_FUNCTION)) + + + + + +#define assert_perror(errnum) (!(errnum) ? __ASSERT_VOID_CAST (0) : __assert_perror_fail ((errnum), __FILE__, __LINE__, __ASSERT_FUNCTION)) +# 106 "/usr/include/assert.h" 3 4 +#define __ASSERT_FUNCTION __PRETTY_FUNCTION__ +# 33 "../fwbuilder/Dispatch.h" 2 + +# 1 "../fwbuilder/libfwbuilder-config.h" 1 + + + + + + +#define FWBUILDER_XML_VERSION "22" + + + + + +#define RES_DIR "/usr/share/fwbuilder-5.0.1.3592" +# 27 "../fwbuilder/libfwbuilder-config.h" +#define HAVE_GETOPT_H 1 +# 44 "../fwbuilder/libfwbuilder-config.h" +#define HAVE_XMLSAVEFORMATFILEENC 1 + +#define HAVE_LIBXSLT_XSLTCONFIG_H 1 + + +#define HAVE_STRTOK_R 1 + +#define WORDS_LITTLEENDIAN 1 +# 61 "../fwbuilder/libfwbuilder-config.h" +#define SNPRINTF snprintf +#define VSNPRINTF vsnprintf +#define FS_SEPARATOR "/" + + + + + + +#define FREEXMLBUFF(x) xmlFree((void*)(x)) +# 35 "../fwbuilder/Dispatch.h" 2 + +namespace libfwbuilder { + class InetAddr; + class InetAddrMask; + + class Address; + class AddressRange; + class AddressTable; + class Cluster; + class ClusterGroup; + class ClusterGroupOptions; + class CustomService; + class DNSName; + class FWBDManagement; + class FWIntervalReference; + class FWObject; + class FWObjectDatabase; + class FWObjectReference; + class FWOptions; + class FWReference; + class FWServiceReference; + class FailoverClusterGroup; + class Firewall; + class FirewallOptions; + class Group; + class Host; + class HostOptions; + class ICMP6Service; + class ICMPService; + class IPService; + class IPv4; + class IPv6; + class Interface; + class InterfaceOptions; + class Interval; + class IntervalGroup; + class Library; + class Management; + class MultiAddress; + class MultiAddressRunTime; + class NAT; + class NATRule; + class NATRuleOptions; + class Network; + class NetworkIPv6; + class ObjectGroup; + class Policy; + class PolicyInstallScript; + class PolicyRule; + class PolicyRuleOptions; + class Routing; + class RoutingRule; + class RoutingRuleOptions; + class Rule; + class RuleElement; + class RuleElementDst; + class RuleElementInterval; + class RuleElementItf; + class RuleElementODst; + class RuleElementOSrc; + class RuleElementOSrv; + class RuleElementRDst; + class RuleElementRGtw; + class RuleElementRItf; + class RuleElementSrc; + class RuleElementSrv; + class RuleElementTDst; + class RuleElementTSrc; + class RuleElementTSrv; + class RuleSet; + class RuleSetOptions; + class SNMPManagement; + class Service; + class ServiceGroup; + class StateSyncClusterGroup; + class TCPService; + class TCPUDPService; + class TagService; + class UDPService; + class UserService; + class physAddress; + class DynamicGroup; +}; + + + + + + +#define __DECLARE_DISPATCH_METHODS(classname) virtual void* dispatch(classname*, void*) { assert("Call to unimplemented virtual void* Dispatch::dispatch("#classname"*, void*)"==NULL); return NULL; } virtual void* dispatch(classname*, const void*) { assert("Call to unimplemented virtual void* Dispatch::dispatch("#classname"*, const void*)"==NULL); return NULL; } virtual void* dispatch(const classname*, void*) { assert("Call to unimplemented virtual void* Dispatch::dispatch(const "#classname"*, void*)"==NULL); return NULL; } virtual void* dispatch(const classname*, const void*) { assert("Call to unimplemented virtual void* Dispatch::dispatch(const "#classname"*, const void*)"==NULL); return NULL; } virtual const void* const_dispatch(const classname*, void*) { assert("Call to unimplemented virtual const void* Dispatch::const_dispatch(const "#classname"*, void*)"==NULL); return NULL; } virtual const void* const_dispatch(const classname*, const void*) { assert("Call to unimplemented virtual const void* Dispatch::const_dispatch(const "#classname"*, const void*)"==NULL); return NULL; } +# 144 "../fwbuilder/Dispatch.h" +namespace libfwbuilder +{ + + class Dispatch { + +public: + Dispatch() {} + virtual ~Dispatch() {} + + virtual void* dispatch(Address*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Address""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Address\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 153, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(Address*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Address""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Address\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 153, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Address*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Address""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Address\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 153, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Address*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Address""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Address\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 153, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Address*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Address""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Address\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 153, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Address*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Address""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Address\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 153, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(AddressRange*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""AddressRange""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"AddressRange\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 154, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(AddressRange*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""AddressRange""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"AddressRange\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 154, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const AddressRange*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""AddressRange""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"AddressRange\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 154, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const AddressRange*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""AddressRange""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"AddressRange\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 154, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const AddressRange*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""AddressRange""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"AddressRange\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 154, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const AddressRange*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""AddressRange""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"AddressRange\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 154, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(AddressTable*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""AddressTable""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"AddressTable\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 155, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(AddressTable*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""AddressTable""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"AddressTable\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 155, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const AddressTable*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""AddressTable""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"AddressTable\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 155, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const AddressTable*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""AddressTable""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"AddressTable\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 155, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const AddressTable*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""AddressTable""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"AddressTable\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 155, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const AddressTable*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""AddressTable""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"AddressTable\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 155, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(Cluster*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Cluster""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Cluster\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 156, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(Cluster*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Cluster""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Cluster\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 156, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Cluster*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Cluster""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Cluster\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 156, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Cluster*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Cluster""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Cluster\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 156, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Cluster*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Cluster""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Cluster\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 156, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Cluster*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Cluster""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Cluster\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 156, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(ClusterGroup*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""ClusterGroup""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"ClusterGroup\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 157, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(ClusterGroup*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""ClusterGroup""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"ClusterGroup\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 157, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const ClusterGroup*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""ClusterGroup""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"ClusterGroup\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 157, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const ClusterGroup*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""ClusterGroup""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"ClusterGroup\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 157, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const ClusterGroup*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""ClusterGroup""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"ClusterGroup\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 157, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const ClusterGroup*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""ClusterGroup""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"ClusterGroup\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 157, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(ClusterGroupOptions*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""ClusterGroupOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"ClusterGroupOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 158, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(ClusterGroupOptions*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""ClusterGroupOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"ClusterGroupOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 158, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const ClusterGroupOptions*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""ClusterGroupOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"ClusterGroupOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 158, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const ClusterGroupOptions*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""ClusterGroupOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"ClusterGroupOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 158, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const ClusterGroupOptions*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""ClusterGroupOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"ClusterGroupOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 158, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const ClusterGroupOptions*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""ClusterGroupOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"ClusterGroupOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 158, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(CustomService*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""CustomService""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"CustomService\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 159, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(CustomService*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""CustomService""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"CustomService\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 159, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const CustomService*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""CustomService""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"CustomService\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 159, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const CustomService*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""CustomService""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"CustomService\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 159, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const CustomService*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""CustomService""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"CustomService\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 159, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const CustomService*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""CustomService""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"CustomService\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 159, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(DNSName*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""DNSName""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"DNSName\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 160, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(DNSName*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""DNSName""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"DNSName\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 160, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const DNSName*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""DNSName""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"DNSName\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 160, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const DNSName*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""DNSName""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"DNSName\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 160, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const DNSName*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""DNSName""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"DNSName\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 160, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const DNSName*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""DNSName""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"DNSName\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 160, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(FWBDManagement*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""FWBDManagement""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"FWBDManagement\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 161, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(FWBDManagement*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""FWBDManagement""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"FWBDManagement\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 161, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const FWBDManagement*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""FWBDManagement""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"FWBDManagement\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 161, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const FWBDManagement*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""FWBDManagement""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"FWBDManagement\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 161, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const FWBDManagement*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""FWBDManagement""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"FWBDManagement\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 161, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const FWBDManagement*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""FWBDManagement""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"FWBDManagement\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 161, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(FWIntervalReference*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""FWIntervalReference""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"FWIntervalReference\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 162, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(FWIntervalReference*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""FWIntervalReference""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"FWIntervalReference\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 162, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const FWIntervalReference*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""FWIntervalReference""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"FWIntervalReference\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 162, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const FWIntervalReference*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""FWIntervalReference""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"FWIntervalReference\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 162, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const FWIntervalReference*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""FWIntervalReference""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"FWIntervalReference\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 162, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const FWIntervalReference*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""FWIntervalReference""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"FWIntervalReference\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 162, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(FWObject*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""FWObject""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"FWObject\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 163, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(FWObject*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""FWObject""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"FWObject\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 163, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const FWObject*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""FWObject""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"FWObject\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 163, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const FWObject*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""FWObject""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"FWObject\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 163, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const FWObject*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""FWObject""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"FWObject\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 163, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const FWObject*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""FWObject""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"FWObject\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 163, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(FWObjectDatabase*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""FWObjectDatabase""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"FWObjectDatabase\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 164, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(FWObjectDatabase*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""FWObjectDatabase""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"FWObjectDatabase\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 164, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const FWObjectDatabase*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""FWObjectDatabase""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"FWObjectDatabase\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 164, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const FWObjectDatabase*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""FWObjectDatabase""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"FWObjectDatabase\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 164, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const FWObjectDatabase*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""FWObjectDatabase""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"FWObjectDatabase\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 164, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const FWObjectDatabase*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""FWObjectDatabase""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"FWObjectDatabase\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 164, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(FWObjectReference*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""FWObjectReference""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"FWObjectReference\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 165, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(FWObjectReference*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""FWObjectReference""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"FWObjectReference\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 165, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const FWObjectReference*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""FWObjectReference""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"FWObjectReference\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 165, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const FWObjectReference*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""FWObjectReference""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"FWObjectReference\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 165, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const FWObjectReference*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""FWObjectReference""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"FWObjectReference\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 165, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const FWObjectReference*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""FWObjectReference""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"FWObjectReference\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 165, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(FWOptions*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""FWOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"FWOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 166, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(FWOptions*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""FWOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"FWOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 166, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const FWOptions*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""FWOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"FWOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 166, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const FWOptions*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""FWOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"FWOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 166, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const FWOptions*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""FWOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"FWOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 166, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const FWOptions*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""FWOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"FWOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 166, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(FWReference*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""FWReference""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"FWReference\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 167, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(FWReference*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""FWReference""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"FWReference\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 167, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const FWReference*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""FWReference""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"FWReference\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 167, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const FWReference*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""FWReference""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"FWReference\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 167, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const FWReference*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""FWReference""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"FWReference\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 167, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const FWReference*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""FWReference""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"FWReference\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 167, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(FWServiceReference*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""FWServiceReference""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"FWServiceReference\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 168, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(FWServiceReference*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""FWServiceReference""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"FWServiceReference\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 168, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const FWServiceReference*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""FWServiceReference""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"FWServiceReference\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 168, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const FWServiceReference*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""FWServiceReference""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"FWServiceReference\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 168, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const FWServiceReference*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""FWServiceReference""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"FWServiceReference\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 168, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const FWServiceReference*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""FWServiceReference""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"FWServiceReference\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 168, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(FailoverClusterGroup*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""FailoverClusterGroup""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"FailoverClusterGroup\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 169, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(FailoverClusterGroup*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""FailoverClusterGroup""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"FailoverClusterGroup\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 169, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const FailoverClusterGroup*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""FailoverClusterGroup""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"FailoverClusterGroup\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 169, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const FailoverClusterGroup*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""FailoverClusterGroup""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"FailoverClusterGroup\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 169, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const FailoverClusterGroup*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""FailoverClusterGroup""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"FailoverClusterGroup\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 169, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const FailoverClusterGroup*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""FailoverClusterGroup""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"FailoverClusterGroup\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 169, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(Firewall*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Firewall""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Firewall\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 170, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(Firewall*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Firewall""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Firewall\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 170, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Firewall*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Firewall""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Firewall\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 170, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Firewall*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Firewall""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Firewall\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 170, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Firewall*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Firewall""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Firewall\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 170, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Firewall*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Firewall""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Firewall\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 170, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(FirewallOptions*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""FirewallOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"FirewallOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 171, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(FirewallOptions*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""FirewallOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"FirewallOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 171, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const FirewallOptions*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""FirewallOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"FirewallOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 171, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const FirewallOptions*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""FirewallOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"FirewallOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 171, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const FirewallOptions*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""FirewallOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"FirewallOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 171, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const FirewallOptions*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""FirewallOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"FirewallOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 171, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(Group*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Group""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Group\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 172, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(Group*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Group""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Group\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 172, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Group*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Group""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Group\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 172, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Group*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Group""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Group\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 172, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Group*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Group""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Group\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 172, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Group*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Group""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Group\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 172, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(Host*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Host""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Host\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 173, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(Host*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Host""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Host\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 173, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Host*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Host""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Host\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 173, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Host*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Host""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Host\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 173, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Host*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Host""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Host\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 173, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Host*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Host""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Host\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 173, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(HostOptions*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""HostOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"HostOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 174, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(HostOptions*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""HostOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"HostOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 174, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const HostOptions*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""HostOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"HostOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 174, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const HostOptions*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""HostOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"HostOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 174, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const HostOptions*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""HostOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"HostOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 174, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const HostOptions*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""HostOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"HostOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 174, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(ICMP6Service*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""ICMP6Service""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"ICMP6Service\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 175, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(ICMP6Service*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""ICMP6Service""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"ICMP6Service\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 175, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const ICMP6Service*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""ICMP6Service""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"ICMP6Service\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 175, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const ICMP6Service*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""ICMP6Service""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"ICMP6Service\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 175, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const ICMP6Service*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""ICMP6Service""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"ICMP6Service\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 175, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const ICMP6Service*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""ICMP6Service""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"ICMP6Service\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 175, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(ICMPService*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""ICMPService""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"ICMPService\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 176, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(ICMPService*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""ICMPService""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"ICMPService\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 176, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const ICMPService*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""ICMPService""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"ICMPService\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 176, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const ICMPService*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""ICMPService""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"ICMPService\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 176, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const ICMPService*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""ICMPService""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"ICMPService\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 176, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const ICMPService*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""ICMPService""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"ICMPService\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 176, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(IPService*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""IPService""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"IPService\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 177, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(IPService*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""IPService""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"IPService\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 177, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const IPService*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""IPService""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"IPService\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 177, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const IPService*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""IPService""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"IPService\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 177, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const IPService*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""IPService""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"IPService\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 177, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const IPService*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""IPService""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"IPService\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 177, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(IPv4*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""IPv4""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"IPv4\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 178, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(IPv4*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""IPv4""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"IPv4\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 178, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const IPv4*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""IPv4""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"IPv4\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 178, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const IPv4*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""IPv4""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"IPv4\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 178, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const IPv4*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""IPv4""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"IPv4\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 178, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const IPv4*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""IPv4""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"IPv4\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 178, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(IPv6*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""IPv6""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"IPv6\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 179, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(IPv6*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""IPv6""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"IPv6\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 179, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const IPv6*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""IPv6""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"IPv6\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 179, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const IPv6*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""IPv6""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"IPv6\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 179, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const IPv6*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""IPv6""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"IPv6\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 179, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const IPv6*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""IPv6""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"IPv6\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 179, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(Interface*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Interface""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Interface\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 180, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(Interface*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Interface""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Interface\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 180, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Interface*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Interface""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Interface\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 180, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Interface*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Interface""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Interface\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 180, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Interface*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Interface""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Interface\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 180, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Interface*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Interface""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Interface\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 180, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(InterfaceOptions*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""InterfaceOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"InterfaceOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 181, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(InterfaceOptions*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""InterfaceOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"InterfaceOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 181, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const InterfaceOptions*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""InterfaceOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"InterfaceOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 181, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const InterfaceOptions*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""InterfaceOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"InterfaceOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 181, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const InterfaceOptions*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""InterfaceOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"InterfaceOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 181, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const InterfaceOptions*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""InterfaceOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"InterfaceOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 181, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(Interval*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Interval""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Interval\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 182, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(Interval*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Interval""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Interval\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 182, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Interval*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Interval""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Interval\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 182, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Interval*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Interval""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Interval\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 182, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Interval*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Interval""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Interval\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 182, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Interval*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Interval""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Interval\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 182, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(IntervalGroup*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""IntervalGroup""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"IntervalGroup\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 183, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(IntervalGroup*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""IntervalGroup""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"IntervalGroup\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 183, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const IntervalGroup*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""IntervalGroup""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"IntervalGroup\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 183, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const IntervalGroup*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""IntervalGroup""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"IntervalGroup\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 183, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const IntervalGroup*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""IntervalGroup""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"IntervalGroup\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 183, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const IntervalGroup*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""IntervalGroup""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"IntervalGroup\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 183, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(Library*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Library""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Library\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 184, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(Library*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Library""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Library\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 184, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Library*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Library""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Library\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 184, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Library*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Library""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Library\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 184, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Library*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Library""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Library\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 184, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Library*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Library""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Library\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 184, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(Management*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Management""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Management\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 185, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(Management*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Management""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Management\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 185, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Management*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Management""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Management\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 185, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Management*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Management""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Management\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 185, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Management*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Management""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Management\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 185, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Management*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Management""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Management\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 185, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(MultiAddress*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""MultiAddress""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"MultiAddress\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 186, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(MultiAddress*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""MultiAddress""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"MultiAddress\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 186, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const MultiAddress*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""MultiAddress""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"MultiAddress\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 186, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const MultiAddress*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""MultiAddress""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"MultiAddress\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 186, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const MultiAddress*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""MultiAddress""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"MultiAddress\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 186, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const MultiAddress*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""MultiAddress""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"MultiAddress\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 186, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(MultiAddressRunTime*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""MultiAddressRunTime""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"MultiAddressRunTime\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 187, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(MultiAddressRunTime*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""MultiAddressRunTime""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"MultiAddressRunTime\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 187, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const MultiAddressRunTime*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""MultiAddressRunTime""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"MultiAddressRunTime\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 187, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const MultiAddressRunTime*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""MultiAddressRunTime""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"MultiAddressRunTime\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 187, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const MultiAddressRunTime*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""MultiAddressRunTime""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"MultiAddressRunTime\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 187, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const MultiAddressRunTime*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""MultiAddressRunTime""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"MultiAddressRunTime\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 187, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(NAT*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""NAT""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"NAT\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 188, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(NAT*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""NAT""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"NAT\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 188, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const NAT*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""NAT""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"NAT\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 188, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const NAT*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""NAT""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"NAT\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 188, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const NAT*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""NAT""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"NAT\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 188, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const NAT*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""NAT""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"NAT\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 188, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(NATRule*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""NATRule""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"NATRule\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 189, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(NATRule*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""NATRule""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"NATRule\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 189, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const NATRule*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""NATRule""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"NATRule\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 189, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const NATRule*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""NATRule""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"NATRule\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 189, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const NATRule*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""NATRule""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"NATRule\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 189, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const NATRule*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""NATRule""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"NATRule\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 189, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(NATRuleOptions*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""NATRuleOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"NATRuleOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 190, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(NATRuleOptions*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""NATRuleOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"NATRuleOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 190, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const NATRuleOptions*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""NATRuleOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"NATRuleOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 190, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const NATRuleOptions*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""NATRuleOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"NATRuleOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 190, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const NATRuleOptions*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""NATRuleOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"NATRuleOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 190, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const NATRuleOptions*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""NATRuleOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"NATRuleOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 190, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(Network*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Network""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Network\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 191, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(Network*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Network""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Network\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 191, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Network*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Network""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Network\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 191, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Network*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Network""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Network\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 191, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Network*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Network""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Network\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 191, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Network*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Network""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Network\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 191, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(NetworkIPv6*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""NetworkIPv6""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"NetworkIPv6\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 192, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(NetworkIPv6*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""NetworkIPv6""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"NetworkIPv6\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 192, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const NetworkIPv6*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""NetworkIPv6""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"NetworkIPv6\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 192, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const NetworkIPv6*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""NetworkIPv6""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"NetworkIPv6\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 192, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const NetworkIPv6*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""NetworkIPv6""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"NetworkIPv6\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 192, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const NetworkIPv6*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""NetworkIPv6""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"NetworkIPv6\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 192, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(ObjectGroup*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""ObjectGroup""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"ObjectGroup\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 193, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(ObjectGroup*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""ObjectGroup""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"ObjectGroup\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 193, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const ObjectGroup*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""ObjectGroup""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"ObjectGroup\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 193, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const ObjectGroup*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""ObjectGroup""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"ObjectGroup\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 193, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const ObjectGroup*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""ObjectGroup""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"ObjectGroup\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 193, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const ObjectGroup*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""ObjectGroup""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"ObjectGroup\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 193, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(Policy*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Policy""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Policy\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 194, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(Policy*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Policy""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Policy\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 194, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Policy*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Policy""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Policy\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 194, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Policy*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Policy""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Policy\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 194, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Policy*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Policy""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Policy\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 194, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Policy*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Policy""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Policy\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 194, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(PolicyInstallScript*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""PolicyInstallScript""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"PolicyInstallScript\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 195, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(PolicyInstallScript*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""PolicyInstallScript""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"PolicyInstallScript\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 195, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const PolicyInstallScript*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""PolicyInstallScript""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"PolicyInstallScript\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 195, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const PolicyInstallScript*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""PolicyInstallScript""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"PolicyInstallScript\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 195, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const PolicyInstallScript*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""PolicyInstallScript""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"PolicyInstallScript\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 195, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const PolicyInstallScript*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""PolicyInstallScript""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"PolicyInstallScript\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 195, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(PolicyRule*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""PolicyRule""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"PolicyRule\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 196, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(PolicyRule*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""PolicyRule""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"PolicyRule\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 196, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const PolicyRule*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""PolicyRule""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"PolicyRule\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 196, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const PolicyRule*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""PolicyRule""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"PolicyRule\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 196, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const PolicyRule*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""PolicyRule""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"PolicyRule\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 196, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const PolicyRule*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""PolicyRule""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"PolicyRule\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 196, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(PolicyRuleOptions*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""PolicyRuleOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"PolicyRuleOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 197, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(PolicyRuleOptions*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""PolicyRuleOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"PolicyRuleOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 197, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const PolicyRuleOptions*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""PolicyRuleOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"PolicyRuleOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 197, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const PolicyRuleOptions*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""PolicyRuleOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"PolicyRuleOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 197, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const PolicyRuleOptions*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""PolicyRuleOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"PolicyRuleOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 197, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const PolicyRuleOptions*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""PolicyRuleOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"PolicyRuleOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 197, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(Routing*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Routing""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Routing\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 198, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(Routing*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Routing""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Routing\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 198, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Routing*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Routing""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Routing\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 198, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Routing*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Routing""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Routing\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 198, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Routing*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Routing""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Routing\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 198, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Routing*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Routing""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Routing\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 198, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(RoutingRule*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RoutingRule""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RoutingRule\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 199, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(RoutingRule*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RoutingRule""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RoutingRule\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 199, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RoutingRule*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RoutingRule""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RoutingRule\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 199, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RoutingRule*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RoutingRule""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RoutingRule\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 199, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RoutingRule*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RoutingRule""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RoutingRule\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 199, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RoutingRule*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RoutingRule""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RoutingRule\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 199, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(RoutingRuleOptions*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RoutingRuleOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RoutingRuleOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 200, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(RoutingRuleOptions*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RoutingRuleOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RoutingRuleOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 200, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RoutingRuleOptions*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RoutingRuleOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RoutingRuleOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 200, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RoutingRuleOptions*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RoutingRuleOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RoutingRuleOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 200, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RoutingRuleOptions*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RoutingRuleOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RoutingRuleOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 200, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RoutingRuleOptions*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RoutingRuleOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RoutingRuleOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 200, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(Rule*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Rule""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Rule\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 201, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(Rule*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Rule""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Rule\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 201, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Rule*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Rule""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Rule\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 201, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Rule*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Rule""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Rule\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 201, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Rule*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Rule""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Rule\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 201, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Rule*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Rule""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Rule\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 201, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(RuleElement*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElement""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElement\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 202, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(RuleElement*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElement""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElement\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 202, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElement*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElement""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElement\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 202, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElement*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElement""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElement\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 202, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElement*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElement""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElement\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 202, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElement*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElement""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElement\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 202, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(RuleElementDst*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementDst""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementDst\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 203, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(RuleElementDst*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementDst""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementDst\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 203, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementDst*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementDst""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementDst\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 203, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementDst*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementDst""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementDst\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 203, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementDst*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementDst""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementDst\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 203, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementDst*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementDst""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementDst\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 203, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(RuleElementInterval*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementInterval""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementInterval\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 204, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(RuleElementInterval*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementInterval""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementInterval\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 204, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementInterval*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementInterval""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementInterval\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 204, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementInterval*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementInterval""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementInterval\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 204, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementInterval*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementInterval""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementInterval\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 204, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementInterval*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementInterval""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementInterval\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 204, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(RuleElementItf*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementItf""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementItf\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 205, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(RuleElementItf*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementItf""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementItf\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 205, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementItf*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementItf""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementItf\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 205, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementItf*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementItf""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementItf\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 205, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementItf*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementItf""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementItf\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 205, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementItf*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementItf""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementItf\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 205, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(RuleElementODst*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementODst""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementODst\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 206, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(RuleElementODst*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementODst""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementODst\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 206, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementODst*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementODst""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementODst\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 206, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementODst*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementODst""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementODst\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 206, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementODst*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementODst""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementODst\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 206, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementODst*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementODst""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementODst\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 206, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(RuleElementOSrc*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementOSrc""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementOSrc\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 207, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(RuleElementOSrc*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementOSrc""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementOSrc\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 207, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementOSrc*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementOSrc""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementOSrc\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 207, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementOSrc*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementOSrc""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementOSrc\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 207, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementOSrc*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementOSrc""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementOSrc\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 207, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementOSrc*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementOSrc""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementOSrc\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 207, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(RuleElementOSrv*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementOSrv""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementOSrv\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 208, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(RuleElementOSrv*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementOSrv""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementOSrv\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 208, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementOSrv*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementOSrv""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementOSrv\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 208, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementOSrv*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementOSrv""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementOSrv\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 208, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementOSrv*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementOSrv""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementOSrv\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 208, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementOSrv*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementOSrv""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementOSrv\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 208, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(RuleElementRDst*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementRDst""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementRDst\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 209, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(RuleElementRDst*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementRDst""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementRDst\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 209, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementRDst*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementRDst""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementRDst\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 209, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementRDst*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementRDst""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementRDst\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 209, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementRDst*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementRDst""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementRDst\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 209, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementRDst*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementRDst""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementRDst\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 209, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(RuleElementRGtw*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementRGtw""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementRGtw\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 210, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(RuleElementRGtw*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementRGtw""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementRGtw\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 210, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementRGtw*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementRGtw""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementRGtw\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 210, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementRGtw*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementRGtw""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementRGtw\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 210, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementRGtw*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementRGtw""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementRGtw\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 210, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementRGtw*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementRGtw""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementRGtw\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 210, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(RuleElementRItf*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementRItf""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementRItf\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 211, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(RuleElementRItf*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementRItf""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementRItf\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 211, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementRItf*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementRItf""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementRItf\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 211, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementRItf*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementRItf""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementRItf\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 211, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementRItf*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementRItf""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementRItf\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 211, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementRItf*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementRItf""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementRItf\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 211, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(RuleElementSrc*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementSrc""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementSrc\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 212, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(RuleElementSrc*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementSrc""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementSrc\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 212, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementSrc*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementSrc""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementSrc\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 212, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementSrc*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementSrc""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementSrc\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 212, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementSrc*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementSrc""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementSrc\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 212, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementSrc*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementSrc""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementSrc\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 212, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(RuleElementSrv*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementSrv""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementSrv\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 213, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(RuleElementSrv*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementSrv""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementSrv\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 213, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementSrv*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementSrv""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementSrv\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 213, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementSrv*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementSrv""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementSrv\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 213, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementSrv*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementSrv""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementSrv\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 213, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementSrv*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementSrv""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementSrv\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 213, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(RuleElementTDst*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementTDst""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementTDst\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 214, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(RuleElementTDst*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementTDst""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementTDst\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 214, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementTDst*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementTDst""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementTDst\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 214, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementTDst*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementTDst""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementTDst\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 214, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementTDst*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementTDst""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementTDst\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 214, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementTDst*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementTDst""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementTDst\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 214, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(RuleElementTSrc*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementTSrc""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementTSrc\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 215, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(RuleElementTSrc*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementTSrc""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementTSrc\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 215, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementTSrc*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementTSrc""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementTSrc\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 215, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementTSrc*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementTSrc""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementTSrc\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 215, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementTSrc*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementTSrc""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementTSrc\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 215, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementTSrc*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementTSrc""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementTSrc\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 215, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(RuleElementTSrv*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementTSrv""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementTSrv\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 216, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(RuleElementTSrv*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleElementTSrv""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleElementTSrv\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 216, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementTSrv*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementTSrv""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementTSrv\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 216, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleElementTSrv*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleElementTSrv""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleElementTSrv\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 216, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementTSrv*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementTSrv""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementTSrv\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 216, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleElementTSrv*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleElementTSrv""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleElementTSrv\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 216, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(RuleSet*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleSet""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleSet\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 217, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(RuleSet*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleSet""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleSet\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 217, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleSet*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleSet""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleSet\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 217, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleSet*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleSet""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleSet\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 217, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleSet*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleSet""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleSet\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 217, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleSet*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleSet""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleSet\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 217, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(RuleSetOptions*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleSetOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleSetOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 218, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(RuleSetOptions*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""RuleSetOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"RuleSetOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 218, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleSetOptions*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleSetOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleSetOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 218, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const RuleSetOptions*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""RuleSetOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"RuleSetOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 218, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleSetOptions*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleSetOptions""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleSetOptions\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 218, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const RuleSetOptions*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""RuleSetOptions""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"RuleSetOptions\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 218, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(SNMPManagement*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""SNMPManagement""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"SNMPManagement\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 219, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(SNMPManagement*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""SNMPManagement""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"SNMPManagement\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 219, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const SNMPManagement*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""SNMPManagement""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"SNMPManagement\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 219, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const SNMPManagement*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""SNMPManagement""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"SNMPManagement\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 219, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const SNMPManagement*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""SNMPManagement""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"SNMPManagement\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 219, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const SNMPManagement*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""SNMPManagement""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"SNMPManagement\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 219, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(Service*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Service""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Service\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 220, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(Service*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""Service""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"Service\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 220, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Service*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Service""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Service\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 220, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const Service*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""Service""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"Service\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 220, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Service*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Service""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Service\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 220, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const Service*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""Service""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"Service\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 220, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(ServiceGroup*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""ServiceGroup""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"ServiceGroup\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 221, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(ServiceGroup*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""ServiceGroup""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"ServiceGroup\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 221, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const ServiceGroup*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""ServiceGroup""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"ServiceGroup\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 221, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const ServiceGroup*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""ServiceGroup""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"ServiceGroup\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 221, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const ServiceGroup*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""ServiceGroup""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"ServiceGroup\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 221, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const ServiceGroup*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""ServiceGroup""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"ServiceGroup\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 221, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(StateSyncClusterGroup*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""StateSyncClusterGroup""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"StateSyncClusterGroup\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 222, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(StateSyncClusterGroup*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""StateSyncClusterGroup""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"StateSyncClusterGroup\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 222, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const StateSyncClusterGroup*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""StateSyncClusterGroup""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"StateSyncClusterGroup\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 222, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const StateSyncClusterGroup*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""StateSyncClusterGroup""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"StateSyncClusterGroup\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 222, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const StateSyncClusterGroup*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""StateSyncClusterGroup""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"StateSyncClusterGroup\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 222, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const StateSyncClusterGroup*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""StateSyncClusterGroup""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"StateSyncClusterGroup\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 222, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(TCPService*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""TCPService""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"TCPService\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 223, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(TCPService*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""TCPService""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"TCPService\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 223, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const TCPService*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""TCPService""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"TCPService\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 223, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const TCPService*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""TCPService""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"TCPService\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 223, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const TCPService*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""TCPService""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"TCPService\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 223, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const TCPService*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""TCPService""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"TCPService\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 223, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(TCPUDPService*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""TCPUDPService""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"TCPUDPService\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 224, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(TCPUDPService*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""TCPUDPService""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"TCPUDPService\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 224, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const TCPUDPService*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""TCPUDPService""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"TCPUDPService\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 224, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const TCPUDPService*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""TCPUDPService""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"TCPUDPService\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 224, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const TCPUDPService*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""TCPUDPService""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"TCPUDPService\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 224, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const TCPUDPService*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""TCPUDPService""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"TCPUDPService\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 224, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(TagService*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""TagService""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"TagService\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 225, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(TagService*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""TagService""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"TagService\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 225, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const TagService*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""TagService""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"TagService\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 225, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const TagService*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""TagService""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"TagService\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 225, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const TagService*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""TagService""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"TagService\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 225, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const TagService*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""TagService""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"TagService\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 225, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(UDPService*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""UDPService""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"UDPService\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 226, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(UDPService*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""UDPService""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"UDPService\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 226, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const UDPService*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""UDPService""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"UDPService\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 226, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const UDPService*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""UDPService""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"UDPService\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 226, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const UDPService*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""UDPService""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"UDPService\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 226, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const UDPService*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""UDPService""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"UDPService\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 226, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(UserService*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""UserService""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"UserService\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 227, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(UserService*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""UserService""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"UserService\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 227, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const UserService*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""UserService""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"UserService\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 227, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const UserService*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""UserService""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"UserService\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 227, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const UserService*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""UserService""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"UserService\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 227, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const UserService*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""UserService""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"UserService\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 227, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(physAddress*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""physAddress""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"physAddress\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 228, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(physAddress*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""physAddress""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"physAddress\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 228, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const physAddress*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""physAddress""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"physAddress\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 228, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const physAddress*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""physAddress""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"physAddress\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 228, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const physAddress*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""physAddress""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"physAddress\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 228, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const physAddress*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""physAddress""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"physAddress\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 228, __PRETTY_FUNCTION__)); return __null; }; + virtual void* dispatch(DynamicGroup*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""DynamicGroup""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"DynamicGroup\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 229, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(DynamicGroup*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(""DynamicGroup""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(\"\"DynamicGroup\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 229, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const DynamicGroup*, void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""DynamicGroup""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"DynamicGroup\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 229, __PRETTY_FUNCTION__)); return __null; } virtual void* dispatch(const DynamicGroup*, const void*) { (("Call to unimplemented virtual void* Dispatch::dispatch(const ""DynamicGroup""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual void* Dispatch::dispatch(const \"\"DynamicGroup\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 229, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const DynamicGroup*, void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""DynamicGroup""*, void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"DynamicGroup\"\"*, void*)\"==__null", "../fwbuilder/Dispatch.h", 229, __PRETTY_FUNCTION__)); return __null; } virtual const void* const_dispatch(const DynamicGroup*, const void*) { (("Call to unimplemented virtual const void* Dispatch::const_dispatch(const ""DynamicGroup""*, const void*)"==__null) ? static_cast (0) : __assert_fail ("\"Call to unimplemented virtual const void* Dispatch::const_dispatch(const \"\"DynamicGroup\"\"*, const void*)\"==__null", "../fwbuilder/Dispatch.h", 229, __PRETTY_FUNCTION__)); return __null; }; + }; +}; +# 35 "../fwbuilder/ObjectMatcher.h" 2 + + +namespace libfwbuilder +{ + + class ObjectMatcher : public Dispatch + { + +public: + typedef enum {EXACT, PARTIAL} address_range_match; + +private: + bool recognize_broadcasts; + bool recognize_multicasts; + bool ipv6; + bool match_subnets; + address_range_match address_range_match_mode; + + bool checkComplexMatchForSingleAddress(const InetAddr *addr1, + FWObject *obj2); + int matchRHS(const InetAddr *addr1, Address *obj2); + int matchInetAddrRHS(const InetAddr *addr1, + const InetAddr *rhs_obj_addr); + int matchSubnetRHS(const InetAddr *addr1, + const InetAddr *rhs_obj_addr, + const InetAddr *rhs_obj_netm); + +public: + ObjectMatcher() : Dispatch() + { + recognize_broadcasts = false; + recognize_multicasts = false; + ipv6 = false; + match_subnets = false; + address_range_match_mode = PARTIAL; + } + + virtual ~ObjectMatcher() {} + + void setMatchSubnets(bool f) { match_subnets = f; } + void setAddressRangeMatchMode(address_range_match f) { address_range_match_mode = f; } + void setRecognizeBroadcasts(bool f) { recognize_broadcasts = f; } + void setRecognizeMulticasts(bool f) { recognize_multicasts = f; } + void setIPV6(bool f) { ipv6 = f; } + + + + + + bool checkComplexMatchForSingleAddress(Address *obj1, FWObject *obj2); + + + + + bool checkComplexMatchForSubnet(Address *obj1, FWObject *obj2); +# 101 "../fwbuilder/ObjectMatcher.h" + bool complexMatch(Address *obj1, Address *obj2); + + + virtual void* dispatch(Interface*, void*); + virtual void* dispatch(Network*, void*); + virtual void* dispatch(NetworkIPv6*, void*); + virtual void* dispatch(IPv4*, void*); + virtual void* dispatch(IPv6*, void*); + virtual void* dispatch(Host*, void*); + virtual void* dispatch(Firewall*, void*); + virtual void* dispatch(Cluster*, void*); + virtual void* dispatch(AddressRange*, void*); + virtual void* dispatch(physAddress*, void*); + virtual void* dispatch(MultiAddressRunTime*, void*); + + }; +}; +# 46 "../fwbuilder/FWObject.h" 2 + + + +namespace libfwbuilder +{ + +class FWObject; +class FWObjectDatabase; +class FWReference; +class FWObjectTypedChildIterator; +class FWObjectFindPredicate; + +#define DECLARE_FWOBJECT_SUBTYPE(name) static const char *TYPENAME; virtual std::string getTypeName() const { return TYPENAME; } static bool isA(const FWObject *o) { return o && o->getTypeName()==TYPENAME; } static name* cast(FWObject *o) { return dynamic_cast(o); } static const name* constcast(const FWObject *o) { return dynamic_cast(o); } + + + + + + +#define DECLARE_DISPATCH_METHODS(classname) virtual void* dispatch(Dispatch* _d, void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, void* _a1) const {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) const {return _d->dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, void* _a1) const {return _d->const_dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, const void* _a1) const {return _d->const_dispatch(this, _a1); } +# 87 "../fwbuilder/FWObject.h" +class FWObject : public std::list +{ + friend class libfwbuilder::FWObjectDatabase; + +private: + + int ref_counter; + + FWObject *parent; +# 113 "../fwbuilder/FWObject.h" + FWObjectDatabase *dbroot; + int id; + bool ro; + std::string name; + std::string comment; + + static std::string NOT_FOUND; + + time_t creation_time; + std::set keywords; + + static std::string dataDir; + +protected: + + std::string xml_name; + bool busy; + bool dirty; + + std::map data; + std::map private_data; + + void clearRefCounter() { ref_counter=0; } + + void _removeAll(FWObject *rm); + void _removeAllRef(FWObject *rm); + void _adopt(FWObject *obj); + void _findDependencies_internal(FWObject *obj, + std::list &deps, + int anti_loop_id); + + void setRO(bool f) { ro = f; } + + virtual void replaceReferenceInternal(int oldfw_id, int newfw_id, int &counter); + + + + + FWObject* _find(const std::string& name) const; + + + + + + + virtual void findAllReferences(const FWObject *obj, std::set &res); +# 170 "../fwbuilder/FWObject.h" + virtual void updateNonStandardObjectReferences(); + + FWObject(); + + + FWObject(bool new_id); + +public: + + static const char *TYPENAME; virtual std::string getTypeName() const { return TYPENAME; } static bool isA(const FWObject *o) { return o && o->getTypeName()==TYPENAME; } static FWObject* cast(FWObject *o) { return dynamic_cast(o); } static const FWObject* constcast(const FWObject *o) { return dynamic_cast(o); }; + + virtual void* dispatch(Dispatch* _d, void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, void* _a1) const {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) const {return _d->dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, void* _a1) const {return _d->const_dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, const void* _a1) const {return _d->const_dispatch(this, _a1); }; + + class tree_iterator + { + friend class libfwbuilder::FWObject; + + FWObject *node; + + public: + tree_iterator() { node=__null; } + tree_iterator(FWObject *_n) { node=_n; } + tree_iterator(const tree_iterator &ti) { node=ti.node; } + FWObject* operator*() { return node; } + tree_iterator& operator++(); + tree_iterator operator++(int); + tree_iterator& operator=(const tree_iterator &ti) + { node=ti.node; return *this; } + bool operator==(const tree_iterator& i) const; + bool operator!=(const tree_iterator& i) const; + }; + + + tree_iterator tree_begin(); + tree_iterator tree_end(); + + + FWObject(const FWObject ©); +# 216 "../fwbuilder/FWObject.h" + virtual void init(FWObjectDatabase *root); + + int getId() const; + void setId(int i); + bool haveId() { return (id != -1); } + + + + + + + + bool getRO() const { return ro; } + + virtual void fromXML(xmlNodePtr xml_parent_node) throw(FWException); + virtual xmlNodePtr toXML(xmlNodePtr xml_parent_node) throw(FWException); + xmlNodePtr toXML(xmlNodePtr xml_parent_node, bool process_children) + throw(FWException); +# 242 "../fwbuilder/FWObject.h" + void setXMLName (const std::string &); + + virtual ~FWObject(); + + int ref() { ++ref_counter; return(ref_counter); } + int unref() { --ref_counter; return(ref_counter); } + int getRefCounter() { return(ref_counter); } + + + + + virtual FWObject& operator=(const FWObject &) throw(FWException); + + + + + + + + virtual FWObject& duplicate(const FWObject *obj, + bool preserve_id = true) throw(FWException); + + + + + + virtual FWObject& shallowDuplicate(const FWObject *obj, bool preserve_id = true) + throw(FWException); +# 280 "../fwbuilder/FWObject.h" + virtual FWObject& duplicateForUndo(const FWObject *obj) throw(FWException); + + + + + + + virtual FWObject* addCopyOf(const FWObject *obj, bool preserve_id = true) + throw(FWException); + + + + + + virtual bool cmp(const FWObject *obj, bool recursive=false) throw(FWException); + + void Show(); + void Hide(); + + FWObject* getParent() const; + void setParent(FWObject *p); + + bool exists(const std::string &name) const; + + void remStr(const std::string &name); + + const std::string &getStr(const std::string& name) const; + void setStr(const std::string &name, const std::string &val); + + int getInt(const std::string &name) const; + void setInt(const std::string &name, int val); + + bool getBool(const std::string &name) const; + void setBool(const std::string &name, bool val); + void setBool(const std::string &name, const std::string &val); + + const std::string &getName() const; + void setName(const std::string& n); + + const std::string &getComment() const; + void setComment(const std::string& c); + + void storeCreationTime() { creation_time = time(__null); } + time_t getCreationTime() { return creation_time; } + + void setPrivateData(const std::string &key, void *data); + void* getPrivateData(const std::string &key) const; + std::map &getAllPrivateData(); + + + + + + + + const std::string &getLibraryName() const; + + + + + FWObject* getLibrary() const; + + + + + FWObjectDatabase* getRoot() const; + int getDistanceFromRoot() const; + + + + + void setRoot(const FWObjectDatabase *_dbroot) + { dbroot = (FWObjectDatabase*)_dbroot; } +# 361 "../fwbuilder/FWObject.h" + std::string getPath(bool relative=false, bool detailed=false) const; + + void addAt(int where_id, FWObject *obj); + virtual void add(FWObject *obj,bool validate=true); + virtual void insert_before(FWObject *o1,FWObject *obj); + virtual void insert_after(FWObject *o1,FWObject *obj); + + + + + virtual void reparent(FWObject *obj,bool validate=true); + + + + + + virtual void swapObjects(FWObject *o1,FWObject *o2); + + + + + + + virtual void remove(FWObject *obj, bool delete_if_last=true); + + + + + + virtual void removeAllInstances(FWObject *obj); + + + + + virtual void addRef(FWObject *obj); + + + + + + virtual void removeRef(FWObject *obj); + + + + + virtual bool hasRef(FWObject *obj); + + + + + + virtual void removeAllReferences(FWObject *obj); + + + + + + virtual std::set findAllReferences(const FWObject *obj); + + + + + + + + virtual FWReference* createRef(); + + + + + virtual bool validateChild(FWObject *o); + + + + + + + void destroyChildren(); + + void clearChildren(bool recursive=true); + + void sortChildrenByName(bool follow_references=false); + + + + + + + bool verifyTree(); +# 459 "../fwbuilder/FWObject.h" + void fixTree(); + + int getChildrenCount() const; + + virtual void dump(bool recursive,bool brief,int offset=0) const; + virtual void dump(std::ostream &f,bool recursive,bool brief,int offset=0) const; + + + + + + bool isChildOf(FWObject *obj); + + bool hasChild(FWObject *obj); + + + + + + + + virtual FWObject* getById(int id, bool recursive=false); + + + + + + + + virtual std::list getByType(const std::string &type_name) const; + + + + + + + virtual std::list getByTypeDeep(const std::string &type_name) const; + + + + + + + virtual FWObjectTypedChildIterator findByType( + const std::string &type_name) const; + + + + + + virtual FWObject* getFirstByType(const std::string &type_name) const; + + + + + FWObject* findObjectByName(const std::string &type, + const std::string &name) throw(FWException); + + + + + FWObject* findObjectByAttribute(const std::string &attr, + const std::string &val) throw(FWException); + + + + + + + std::list findIf(FWObjectFindPredicate *pred); + + + + + + virtual int replaceRef(int oldfw_id, int newfw_id); + + + + + + + void findDependencies(std::list &deps); + + + virtual void setDirty(bool f); + virtual bool isDirty(); + + + + + + + + virtual void setReadOnly(bool f); + virtual bool isReadOnly(); + virtual void checkReadOnly() throw(FWException); +# 564 "../fwbuilder/FWObject.h" + virtual bool isPrimaryObject() const; + + + std::map::const_iterator dataBegin() + { return data.begin(); } + std::map::const_iterator dataEnd() + { return data.end(); } + + const std::set &getKeywords() { return keywords; } + const std::set &getAllKeywords(); + void addKeyword(const std::string &keyword); + void removeKeyword(const std::string &keyword); + void clearKeywords(); + + static std::string getDataDir() { return dataDir; } + static void setDataDir(const std::string &dir) { dataDir = dir; } +}; + +class FWObjectTypedChildIterator +{ + public: + + FWObjectTypedChildIterator(); + FWObjectTypedChildIterator(const FWObjectTypedChildIterator &o); + FWObjectTypedChildIterator(const FWObject *o, const std::string &_type_name); + + bool operator==(const FWObject::const_iterator& __x) const; + bool operator!=(const FWObject::const_iterator& __x) const; + FWObject *operator*() const; + FWObjectTypedChildIterator& operator++(); + FWObjectTypedChildIterator& operator--(); + + const FWObject::const_iterator &begin() { return _begin; } + const FWObject::const_iterator & end() { return _end ; } + + protected: + + std::string type_name; + FWObject::const_iterator real_iterator; + FWObject::const_iterator _begin; + FWObject::const_iterator _end; + + void init(const FWObject *o, const std::string &_type_name); +}; + + + + + + +class FWObjectNameEQPredicate: public std::unary_function +{ + std::string n; + + public: + + FWObjectNameEQPredicate(const std::string &name):n(name) {} + + bool operator()(const FWObject *o) const + { + return o->getName()==n; + } +}; + +struct FWObjectNameCmpPredicate : + public std::binary_function +{ + bool follow_references; + FWObjectNameCmpPredicate(bool follow_refs=false); + bool operator()(FWObject *a,FWObject *b); +}; + +class findFWObjectIDPredicate : public std::unary_function +{ + int _id; + public: + findFWObjectIDPredicate(int id):_id(id) {} + bool operator()(const FWObject *o) const + {return o->getId()==_id;} +}; + + + + + + +class FWObjectTypeNameEQPredicate: public std::unary_function +{ + std::string n; + + public: + + FWObjectTypeNameEQPredicate(const std::string &name):n(name) {} + + bool operator()(const FWObject *o) const + { + return o->getTypeName()==n; + } +}; + + + + + +class FWObjectFindPredicate +{ + public: + FWObjectFindPredicate() {} + virtual ~FWObjectFindPredicate() {} + virtual bool operator()(FWObject*) const { std::cerr << "#"; return false; } +}; + + + +} +# 31 "../fwbuilder/Address.h" 2 +# 1 "../fwbuilder/InetAddr.h" 1 +# 28 "../fwbuilder/InetAddr.h" +#define __INETADDR_HH_FLAG__ + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/vector" 1 3 +# 57 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/vector" 3 +#define _GLIBCXX_VECTOR 1 + + +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/vector" 3 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_construct.h" 1 3 +# 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_construct.h" 3 +#define _STL_CONSTRUCT_H 1 + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + + + + template + inline void + + + + + _Construct(_T1* __p, const _T2& __value) + + { + + + ::new(static_cast(__p)) _T1((__value)); + } + + + + + template + inline void + _Destroy(_Tp* __pointer) + { __pointer->~_Tp(); } + + template + struct _Destroy_aux + { + template + static void + __destroy(_ForwardIterator __first, _ForwardIterator __last) + { + for (; __first != __last; ++__first) + std::_Destroy(&*__first); + } + }; + + template<> + struct _Destroy_aux + { + template + static void + __destroy(_ForwardIterator, _ForwardIterator) { } + }; + + + + + + + template + inline void + _Destroy(_ForwardIterator __first, _ForwardIterator __last) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _Value_type; + std::_Destroy_aux<__has_trivial_destructor(_Value_type)>:: + __destroy(__first, __last); + } + + + + + + + + template class allocator; + + template + void + _Destroy(_ForwardIterator __first, _ForwardIterator __last, + _Allocator& __alloc) + { + for (; __first != __last; ++__first) + __alloc.destroy(&*__first); + } + + template + inline void + _Destroy(_ForwardIterator __first, _ForwardIterator __last, + allocator<_Tp>&) + { + _Destroy(__first, __last); + } + +} +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/vector" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_uninitialized.h" 1 3 +# 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_uninitialized.h" 3 +#define _STL_UNINITIALIZED_H 1 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + struct __uninitialized_copy + { + template + static _ForwardIterator + uninitialized_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { + _ForwardIterator __cur = __result; + try + { + for (; __first != __last; ++__first, ++__cur) + std::_Construct(&*__cur, *__first); + return __cur; + } + catch(...) + { + std::_Destroy(__result, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_copy + { + template + static _ForwardIterator + uninitialized_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { return std::copy(__first, __last, __result); } + }; +# 104 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_uninitialized.h" 3 + template + inline _ForwardIterator + uninitialized_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { + typedef typename iterator_traits<_InputIterator>::value_type + _ValueType1; + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType2; + + return std::__uninitialized_copy<(__is_pod(_ValueType1) + && __is_pod(_ValueType2))>:: + uninitialized_copy(__first, __last, __result); + } + + + template + struct __uninitialized_fill + { + template + static void + uninitialized_fill(_ForwardIterator __first, + _ForwardIterator __last, const _Tp& __x) + { + _ForwardIterator __cur = __first; + try + { + for (; __cur != __last; ++__cur) + std::_Construct(&*__cur, __x); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_fill + { + template + static void + uninitialized_fill(_ForwardIterator __first, + _ForwardIterator __last, const _Tp& __x) + { std::fill(__first, __last, __x); } + }; +# 161 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_uninitialized.h" 3 + template + inline void + uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + std::__uninitialized_fill<__is_pod(_ValueType)>:: + uninitialized_fill(__first, __last, __x); + } + + + template + struct __uninitialized_construct_range_dispatch + { + template + static void + __ucr(_ForwardIterator __first, _ForwardIterator __last, + _Tp& __value) + { + if(__first == __last) + return; + + _ForwardIterator __cur = __first; + try + { + std::_Construct(&*__first, (__value)); + _ForwardIterator __prev = __cur; + ++__cur; + for(; __cur != __last; ++__cur, ++__prev) + std::_Construct(&*__cur, (*__prev)); + __value = (*__prev); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_construct_range_dispatch + { + template + static void + __ucr(_ForwardIterator, _ForwardIterator, _Tp&) { } + }; +# 221 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_uninitialized.h" 3 + template + inline void + __uninitialized_construct_range(_ForwardIterator __first, + _ForwardIterator __last, + _Tp& __value) + { + typedef typename std::iterator_traits<_ForwardIterator>::value_type + _ValueType; + + std::__uninitialized_construct_range_dispatch< + __has_trivial_constructor(_ValueType)>:: + __ucr(__first, __last, __value); + } + + + template + struct __uninitialized_fill_n + { + template + static void + uninitialized_fill_n(_ForwardIterator __first, _Size __n, + const _Tp& __x) + { + _ForwardIterator __cur = __first; + try + { + for (; __n > 0; --__n, ++__cur) + std::_Construct(&*__cur, __x); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_fill_n + { + template + static void + uninitialized_fill_n(_ForwardIterator __first, _Size __n, + const _Tp& __x) + { std::fill_n(__first, __n, __x); } + }; +# 277 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_uninitialized.h" 3 + template + inline void + uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + std::__uninitialized_fill_n<__is_pod(_ValueType)>:: + uninitialized_fill_n(__first, __n, __x); + } + + + + + + + + template + _ForwardIterator + __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _Allocator& __alloc) + { + _ForwardIterator __cur = __result; + try + { + for (; __first != __last; ++__first, ++__cur) + __alloc.construct(&*__cur, *__first); + return __cur; + } + catch(...) + { + std::_Destroy(__result, __cur, __alloc); + throw; + } + } + + template + inline _ForwardIterator + __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, allocator<_Tp>&) + { return std::uninitialized_copy(__first, __last, __result); } + + template + inline _ForwardIterator + __uninitialized_move_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _Allocator& __alloc) + { + return std::__uninitialized_copy_a((__first), + (__last), + __result, __alloc); + } + + template + void + __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x, _Allocator& __alloc) + { + _ForwardIterator __cur = __first; + try + { + for (; __cur != __last; ++__cur) + __alloc.construct(&*__cur, __x); + } + catch(...) + { + std::_Destroy(__first, __cur, __alloc); + throw; + } + } + + template + inline void + __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x, allocator<_Tp2>&) + { std::uninitialized_fill(__first, __last, __x); } + + template + void + __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, + const _Tp& __x, _Allocator& __alloc) + { + _ForwardIterator __cur = __first; + try + { + for (; __n > 0; --__n, ++__cur) + __alloc.construct(&*__cur, __x); + } + catch(...) + { + std::_Destroy(__first, __cur, __alloc); + throw; + } + } + + template + inline void + __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, + const _Tp& __x, allocator<_Tp2>&) + { std::uninitialized_fill_n(__first, __n, __x); } +# 391 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_uninitialized.h" 3 + template + inline _ForwardIterator + __uninitialized_copy_move(_InputIterator1 __first1, + _InputIterator1 __last1, + _InputIterator2 __first2, + _InputIterator2 __last2, + _ForwardIterator __result, + _Allocator& __alloc) + { + _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1, + __result, + __alloc); + try + { + return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc); + } + catch(...) + { + std::_Destroy(__result, __mid, __alloc); + throw; + } + } + + + + + + template + inline _ForwardIterator + __uninitialized_move_copy(_InputIterator1 __first1, + _InputIterator1 __last1, + _InputIterator2 __first2, + _InputIterator2 __last2, + _ForwardIterator __result, + _Allocator& __alloc) + { + _ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1, + __result, + __alloc); + try + { + return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc); + } + catch(...) + { + std::_Destroy(__result, __mid, __alloc); + throw; + } + } + + + + + template + inline _ForwardIterator + __uninitialized_fill_move(_ForwardIterator __result, _ForwardIterator __mid, + const _Tp& __x, _InputIterator __first, + _InputIterator __last, _Allocator& __alloc) + { + std::__uninitialized_fill_a(__result, __mid, __x, __alloc); + try + { + return std::__uninitialized_move_a(__first, __last, __mid, __alloc); + } + catch(...) + { + std::_Destroy(__result, __mid, __alloc); + throw; + } + } + + + + + template + inline void + __uninitialized_move_fill(_InputIterator __first1, _InputIterator __last1, + _ForwardIterator __first2, + _ForwardIterator __last2, const _Tp& __x, + _Allocator& __alloc) + { + _ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1, + __first2, + __alloc); + try + { + std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc); + } + catch(...) + { + std::_Destroy(__first2, __mid2, __alloc); + throw; + } + } +# 537 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_uninitialized.h" 3 +} +# 65 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/vector" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 1 3 +# 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 +#define _STL_VECTOR_H 1 + + + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + template + struct _Vector_base + { + typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; + + struct _Vector_impl + : public _Tp_alloc_type + { + typename _Tp_alloc_type::pointer _M_start; + typename _Tp_alloc_type::pointer _M_finish; + typename _Tp_alloc_type::pointer _M_end_of_storage; + + _Vector_impl() + : _Tp_alloc_type(), _M_start(0), _M_finish(0), _M_end_of_storage(0) + { } + + _Vector_impl(_Tp_alloc_type const& __a) + : _Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0) + { } + }; + + public: + typedef _Alloc allocator_type; + + _Tp_alloc_type& + _M_get_Tp_allocator() + { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); } + + const _Tp_alloc_type& + _M_get_Tp_allocator() const + { return *static_cast(&this->_M_impl); } + + allocator_type + get_allocator() const + { return allocator_type(_M_get_Tp_allocator()); } + + _Vector_base() + : _M_impl() { } + + _Vector_base(const allocator_type& __a) + : _M_impl(__a) { } + + _Vector_base(size_t __n, const allocator_type& __a) + : _M_impl(__a) + { + this->_M_impl._M_start = this->_M_allocate(__n); + this->_M_impl._M_finish = this->_M_impl._M_start; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + } +# 131 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + ~_Vector_base() + { _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); } + + public: + _Vector_impl _M_impl; + + typename _Tp_alloc_type::pointer + _M_allocate(size_t __n) + { return __n != 0 ? _M_impl.allocate(__n) : 0; } + + void + _M_deallocate(typename _Tp_alloc_type::pointer __p, size_t __n) + { + if (__p) + _M_impl.deallocate(__p, __n); + } + }; +# 169 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + template > + class vector : protected _Vector_base<_Tp, _Alloc> + { + + typedef typename _Alloc::value_type _Alloc_value_type; + + + + typedef _Vector_base<_Tp, _Alloc> _Base; + typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; + + public: + typedef _Tp value_type; + typedef typename _Tp_alloc_type::pointer pointer; + typedef typename _Tp_alloc_type::const_pointer const_pointer; + typedef typename _Tp_alloc_type::reference reference; + typedef typename _Tp_alloc_type::const_reference const_reference; + typedef __gnu_cxx::__normal_iterator iterator; + typedef __gnu_cxx::__normal_iterator + const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Alloc allocator_type; + + protected: + using _Base::_M_allocate; + using _Base::_M_deallocate; + using _Base::_M_impl; + using _Base::_M_get_Tp_allocator; + + public: + + + + + + vector() + : _Base() { } + + + + + + explicit + vector(const allocator_type& __a) + : _Base(__a) { } +# 226 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + explicit + vector(size_type __n, const value_type& __value = value_type(), + const allocator_type& __a = allocator_type()) + : _Base(__n, __a) + { _M_fill_initialize(__n, __value); } +# 241 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + vector(const vector& __x) + : _Base(__x.size(), __x._M_get_Tp_allocator()) + { this->_M_impl._M_finish = + std::__uninitialized_copy_a(__x.begin(), __x.end(), + this->_M_impl._M_start, + _M_get_Tp_allocator()); + } +# 296 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + template + vector(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_initialize_dispatch(__first, __last, _Integral()); + } + + + + + + + + ~vector() + { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); } +# 324 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + vector& + operator=(const vector& __x); +# 374 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + void + assign(size_type __n, const value_type& __val) + { _M_fill_assign(__n, __val); } +# 390 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + template + void + assign(_InputIterator __first, _InputIterator __last) + { + + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } +# 417 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + using _Base::get_allocator; + + + + + + + + iterator + begin() + { return iterator(this->_M_impl._M_start); } + + + + + + + const_iterator + begin() const + { return const_iterator(this->_M_impl._M_start); } + + + + + + + iterator + end() + { return iterator(this->_M_impl._M_finish); } + + + + + + + const_iterator + end() const + { return const_iterator(this->_M_impl._M_finish); } + + + + + + + reverse_iterator + rbegin() + { return reverse_iterator(end()); } + + + + + + + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(end()); } + + + + + + + reverse_iterator + rend() + { return reverse_iterator(begin()); } + + + + + + + const_reverse_iterator + rend() const + { return const_reverse_iterator(begin()); } +# 532 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + size_type + size() const + { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); } + + + size_type + max_size() const + { return _M_get_Tp_allocator().max_size(); } +# 552 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + void + resize(size_type __new_size, value_type __x = value_type()) + { + if (__new_size < size()) + _M_erase_at_end(this->_M_impl._M_start + __new_size); + else + insert(end(), __new_size - size(), __x); + } +# 572 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + size_type + capacity() const + { return size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); } + + + + + + bool + empty() const + { return begin() == end(); } +# 602 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + void + reserve(size_type __n); +# 617 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + reference + operator[](size_type __n) + { return *(this->_M_impl._M_start + __n); } +# 632 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + const_reference + operator[](size_type __n) const + { return *(this->_M_impl._M_start + __n); } + + protected: + + void + _M_range_check(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range(("vector::_M_range_check")); + } + + public: +# 657 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + reference + at(size_type __n) + { + _M_range_check(__n); + return (*this)[__n]; + } +# 675 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + const_reference + at(size_type __n) const + { + _M_range_check(__n); + return (*this)[__n]; + } + + + + + + reference + front() + { return *begin(); } + + + + + + const_reference + front() const + { return *begin(); } + + + + + + reference + back() + { return *(end() - 1); } + + + + + + const_reference + back() const + { return *(end() - 1); } +# 721 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + pointer + data() + { return pointer(this->_M_impl._M_start); } + + const_pointer + data() const + { return const_pointer(this->_M_impl._M_start); } +# 740 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + void + push_back(const value_type& __x) + { + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + { + this->_M_impl.construct(this->_M_impl._M_finish, __x); + ++this->_M_impl._M_finish; + } + else + _M_insert_aux(end(), __x); + } +# 771 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + void + pop_back() + { + --this->_M_impl._M_finish; + this->_M_impl.destroy(this->_M_impl._M_finish); + } +# 807 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + iterator + insert(iterator __position, const value_type& __x); +# 857 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + void + insert(iterator __position, size_type __n, const value_type& __x) + { _M_fill_insert(__position, __n, __x); } +# 875 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + template + void + insert(iterator __position, _InputIterator __first, + _InputIterator __last) + { + + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_insert_dispatch(__position, __first, __last, _Integral()); + } +# 900 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + iterator + erase(iterator __position); +# 921 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + iterator + erase(iterator __first, iterator __last); +# 933 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + void + swap(vector& __x) + { + std::swap(this->_M_impl._M_start, __x._M_impl._M_start); + std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); + std::swap(this->_M_impl._M_end_of_storage, + __x._M_impl._M_end_of_storage); + + + + std::__alloc_swap<_Tp_alloc_type>::_S_do_it(_M_get_Tp_allocator(), + __x._M_get_Tp_allocator()); + } + + + + + + + + void + clear() + { _M_erase_at_end(this->_M_impl._M_start); } + + protected: + + + + + template + pointer + _M_allocate_and_copy(size_type __n, + _ForwardIterator __first, _ForwardIterator __last) + { + pointer __result = this->_M_allocate(__n); + try + { + std::__uninitialized_copy_a(__first, __last, __result, + _M_get_Tp_allocator()); + return __result; + } + catch(...) + { + _M_deallocate(__result, __n); + throw; + } + } +# 988 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + template + void + _M_initialize_dispatch(_Integer __n, _Integer __value, __true_type) + { + this->_M_impl._M_start = _M_allocate(static_cast(__n)); + this->_M_impl._M_end_of_storage = + this->_M_impl._M_start + static_cast(__n); + _M_fill_initialize(static_cast(__n), __value); + } + + + template + void + _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { + typedef typename std::iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_range_initialize(__first, __last, _IterCategory()); + } + + + template + void + _M_range_initialize(_InputIterator __first, + _InputIterator __last, std::input_iterator_tag) + { + for (; __first != __last; ++__first) + push_back(*__first); + } + + + template + void + _M_range_initialize(_ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag) + { + const size_type __n = std::distance(__first, __last); + this->_M_impl._M_start = this->_M_allocate(__n); + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + this->_M_impl._M_finish = + std::__uninitialized_copy_a(__first, __last, + this->_M_impl._M_start, + _M_get_Tp_allocator()); + } + + + + void + _M_fill_initialize(size_type __n, const value_type& __value) + { + std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value, + _M_get_Tp_allocator()); + this->_M_impl._M_finish = this->_M_impl._M_end_of_storage; + } +# 1052 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + template + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } + + + template + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { + typedef typename std::iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_assign_aux(__first, __last, _IterCategory()); + } + + + template + void + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag); + + + template + void + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag); + + + + void + _M_fill_assign(size_type __n, const value_type& __val); +# 1092 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + template + void + _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, + __true_type) + { _M_fill_insert(__pos, __n, __val); } + + + template + void + _M_insert_dispatch(iterator __pos, _InputIterator __first, + _InputIterator __last, __false_type) + { + typedef typename std::iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_range_insert(__pos, __first, __last, _IterCategory()); + } + + + template + void + _M_range_insert(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag); + + + template + void + _M_range_insert(iterator __pos, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag); + + + + void + _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); + + + + void + _M_insert_aux(iterator __position, const value_type& __x); + + + + + + + + size_type + _M_check_len(size_type __n, const char* __s) const + { + if (max_size() - size() < __n) + __throw_length_error((__s)); + + const size_type __len = size() + std::max(size(), __n); + return (__len < size() || __len > max_size()) ? max_size() : __len; + } + + + + + + void + _M_erase_at_end(pointer __pos) + { + std::_Destroy(__pos, this->_M_impl._M_finish, _M_get_Tp_allocator()); + this->_M_impl._M_finish = __pos; + } + }; +# 1170 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + template + inline bool + operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return (__x.size() == __y.size() + && std::equal(__x.begin(), __x.end(), __y.begin())); } +# 1187 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_vector.h" 3 + template + inline bool + operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return std::lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); } + + + template + inline bool + operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return !(__x == __y); } + + + template + inline bool + operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return __y < __x; } + + + template + inline bool + operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return !(__y < __x); } + + + template + inline bool + operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return !(__x < __y); } + + + template + inline void + swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) + { __x.swap(__y); } + +} +# 66 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/vector" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_bvector.h" 1 3 +# 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_bvector.h" 3 +#define _STL_BVECTOR_H 1 + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + typedef unsigned long _Bit_type; + enum { _S_word_bit = int(8 * sizeof(_Bit_type)) }; + + struct _Bit_reference + { + _Bit_type * _M_p; + _Bit_type _M_mask; + + _Bit_reference(_Bit_type * __x, _Bit_type __y) + : _M_p(__x), _M_mask(__y) { } + + _Bit_reference() : _M_p(0), _M_mask(0) { } + + operator bool() const + { return !!(*_M_p & _M_mask); } + + _Bit_reference& + operator=(bool __x) + { + if (__x) + *_M_p |= _M_mask; + else + *_M_p &= ~_M_mask; + return *this; + } + + _Bit_reference& + operator=(const _Bit_reference& __x) + { return *this = bool(__x); } + + bool + operator==(const _Bit_reference& __x) const + { return bool(*this) == bool(__x); } + + bool + operator<(const _Bit_reference& __x) const + { return !bool(*this) && bool(__x); } + + void + flip() + { *_M_p ^= _M_mask; } + }; + + struct _Bit_iterator_base + : public std::iterator + { + _Bit_type * _M_p; + unsigned int _M_offset; + + _Bit_iterator_base(_Bit_type * __x, unsigned int __y) + : _M_p(__x), _M_offset(__y) { } + + void + _M_bump_up() + { + if (_M_offset++ == int(_S_word_bit) - 1) + { + _M_offset = 0; + ++_M_p; + } + } + + void + _M_bump_down() + { + if (_M_offset-- == 0) + { + _M_offset = int(_S_word_bit) - 1; + --_M_p; + } + } + + void + _M_incr(ptrdiff_t __i) + { + difference_type __n = __i + _M_offset; + _M_p += __n / int(_S_word_bit); + __n = __n % int(_S_word_bit); + if (__n < 0) + { + __n += int(_S_word_bit); + --_M_p; + } + _M_offset = static_cast(__n); + } + + bool + operator==(const _Bit_iterator_base& __i) const + { return _M_p == __i._M_p && _M_offset == __i._M_offset; } + + bool + operator<(const _Bit_iterator_base& __i) const + { + return _M_p < __i._M_p + || (_M_p == __i._M_p && _M_offset < __i._M_offset); + } + + bool + operator!=(const _Bit_iterator_base& __i) const + { return !(*this == __i); } + + bool + operator>(const _Bit_iterator_base& __i) const + { return __i < *this; } + + bool + operator<=(const _Bit_iterator_base& __i) const + { return !(__i < *this); } + + bool + operator>=(const _Bit_iterator_base& __i) const + { return !(*this < __i); } + }; + + inline ptrdiff_t + operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) + { + return (int(_S_word_bit) * (__x._M_p - __y._M_p) + + __x._M_offset - __y._M_offset); + } + + struct _Bit_iterator : public _Bit_iterator_base + { + typedef _Bit_reference reference; + typedef _Bit_reference* pointer; + typedef _Bit_iterator iterator; + + _Bit_iterator() : _Bit_iterator_base(0, 0) { } + + _Bit_iterator(_Bit_type * __x, unsigned int __y) + : _Bit_iterator_base(__x, __y) { } + + reference + operator*() const + { return reference(_M_p, 1UL << _M_offset); } + + iterator& + operator++() + { + _M_bump_up(); + return *this; + } + + iterator + operator++(int) + { + iterator __tmp = *this; + _M_bump_up(); + return __tmp; + } + + iterator& + operator--() + { + _M_bump_down(); + return *this; + } + + iterator + operator--(int) + { + iterator __tmp = *this; + _M_bump_down(); + return __tmp; + } + + iterator& + operator+=(difference_type __i) + { + _M_incr(__i); + return *this; + } + + iterator& + operator-=(difference_type __i) + { + *this += -__i; + return *this; + } + + iterator + operator+(difference_type __i) const + { + iterator __tmp = *this; + return __tmp += __i; + } + + iterator + operator-(difference_type __i) const + { + iterator __tmp = *this; + return __tmp -= __i; + } + + reference + operator[](difference_type __i) const + { return *(*this + __i); } + }; + + inline _Bit_iterator + operator+(ptrdiff_t __n, const _Bit_iterator& __x) + { return __x + __n; } + + struct _Bit_const_iterator : public _Bit_iterator_base + { + typedef bool reference; + typedef bool const_reference; + typedef const bool* pointer; + typedef _Bit_const_iterator const_iterator; + + _Bit_const_iterator() : _Bit_iterator_base(0, 0) { } + + _Bit_const_iterator(_Bit_type * __x, unsigned int __y) + : _Bit_iterator_base(__x, __y) { } + + _Bit_const_iterator(const _Bit_iterator& __x) + : _Bit_iterator_base(__x._M_p, __x._M_offset) { } + + const_reference + operator*() const + { return _Bit_reference(_M_p, 1UL << _M_offset); } + + const_iterator& + operator++() + { + _M_bump_up(); + return *this; + } + + const_iterator + operator++(int) + { + const_iterator __tmp = *this; + _M_bump_up(); + return __tmp; + } + + const_iterator& + operator--() + { + _M_bump_down(); + return *this; + } + + const_iterator + operator--(int) + { + const_iterator __tmp = *this; + _M_bump_down(); + return __tmp; + } + + const_iterator& + operator+=(difference_type __i) + { + _M_incr(__i); + return *this; + } + + const_iterator& + operator-=(difference_type __i) + { + *this += -__i; + return *this; + } + + const_iterator + operator+(difference_type __i) const + { + const_iterator __tmp = *this; + return __tmp += __i; + } + + const_iterator + operator-(difference_type __i) const + { + const_iterator __tmp = *this; + return __tmp -= __i; + } + + const_reference + operator[](difference_type __i) const + { return *(*this + __i); } + }; + + inline _Bit_const_iterator + operator+(ptrdiff_t __n, const _Bit_const_iterator& __x) + { return __x + __n; } + + inline void + __fill_bvector(_Bit_iterator __first, _Bit_iterator __last, bool __x) + { + for (; __first != __last; ++__first) + *__first = __x; + } + + inline void + fill(_Bit_iterator __first, _Bit_iterator __last, const bool& __x) + { + if (__first._M_p != __last._M_p) + { + std::fill(__first._M_p + 1, __last._M_p, __x ? ~0 : 0); + __fill_bvector(__first, _Bit_iterator(__first._M_p + 1, 0), __x); + __fill_bvector(_Bit_iterator(__last._M_p, 0), __last, __x); + } + else + __fill_bvector(__first, __last, __x); + } + + template + struct _Bvector_base + { + typedef typename _Alloc::template rebind<_Bit_type>::other + _Bit_alloc_type; + + struct _Bvector_impl + : public _Bit_alloc_type + { + _Bit_iterator _M_start; + _Bit_iterator _M_finish; + _Bit_type* _M_end_of_storage; + + _Bvector_impl() + : _Bit_alloc_type(), _M_start(), _M_finish(), _M_end_of_storage(0) + { } + + _Bvector_impl(const _Bit_alloc_type& __a) + : _Bit_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage(0) + { } + }; + + public: + typedef _Alloc allocator_type; + + _Bit_alloc_type& + _M_get_Bit_allocator() + { return *static_cast<_Bit_alloc_type*>(&this->_M_impl); } + + const _Bit_alloc_type& + _M_get_Bit_allocator() const + { return *static_cast(&this->_M_impl); } + + allocator_type + get_allocator() const + { return allocator_type(_M_get_Bit_allocator()); } + + _Bvector_base() + : _M_impl() { } + + _Bvector_base(const allocator_type& __a) + : _M_impl(__a) { } +# 429 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_bvector.h" 3 + ~_Bvector_base() + { this->_M_deallocate(); } + + protected: + _Bvector_impl _M_impl; + + _Bit_type* + _M_allocate(size_t __n) + { return _M_impl.allocate((__n + int(_S_word_bit) - 1) + / int(_S_word_bit)); } + + void + _M_deallocate() + { + if (_M_impl._M_start._M_p) + _M_impl.deallocate(_M_impl._M_start._M_p, + _M_impl._M_end_of_storage - _M_impl._M_start._M_p); + } + }; + +} + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 473 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_bvector.h" 3 +template + class vector : protected _Bvector_base<_Alloc> + { + typedef _Bvector_base<_Alloc> _Base; + + + + + + public: + typedef bool value_type; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Bit_reference reference; + typedef bool const_reference; + typedef _Bit_reference* pointer; + typedef const bool* const_pointer; + typedef _Bit_iterator iterator; + typedef _Bit_const_iterator const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef _Alloc allocator_type; + + allocator_type get_allocator() const + { return _Base::get_allocator(); } + + protected: + using _Base::_M_allocate; + using _Base::_M_deallocate; + using _Base::_M_get_Bit_allocator; + + public: + vector() + : _Base() { } + + explicit + vector(const allocator_type& __a) + : _Base(__a) { } + + explicit + vector(size_type __n, const bool& __value = bool(), + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + _M_initialize(__n); + std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage, + __value ? ~0 : 0); + } + + vector(const vector& __x) + : _Base(__x._M_get_Bit_allocator()) + { + _M_initialize(__x.size()); + _M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start); + } +# 542 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_bvector.h" 3 + template + vector(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_initialize_dispatch(__first, __last, _Integral()); + } + + ~vector() { } + + vector& + operator=(const vector& __x) + { + if (&__x == this) + return *this; + if (__x.size() > capacity()) + { + this->_M_deallocate(); + _M_initialize(__x.size()); + } + this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(), + begin()); + return *this; + } +# 591 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_bvector.h" 3 + void + assign(size_type __n, const bool& __x) + { _M_fill_assign(__n, __x); } + + template + void + assign(_InputIterator __first, _InputIterator __last) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } + + + + + + + + iterator + begin() + { return this->_M_impl._M_start; } + + const_iterator + begin() const + { return this->_M_impl._M_start; } + + iterator + end() + { return this->_M_impl._M_finish; } + + const_iterator + end() const + { return this->_M_impl._M_finish; } + + reverse_iterator + rbegin() + { return reverse_iterator(end()); } + + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(end()); } + + reverse_iterator + rend() + { return reverse_iterator(begin()); } + + const_reverse_iterator + rend() const + { return const_reverse_iterator(begin()); } +# 659 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_bvector.h" 3 + size_type + size() const + { return size_type(end() - begin()); } + + size_type + max_size() const + { + const size_type __isize = + __gnu_cxx::__numeric_traits::__max + - int(_S_word_bit) + 1; + const size_type __asize = _M_get_Bit_allocator().max_size(); + return (__asize <= __isize / int(_S_word_bit) + ? __asize * int(_S_word_bit) : __isize); + } + + size_type + capacity() const + { return size_type(const_iterator(this->_M_impl._M_end_of_storage, 0) + - begin()); } + + bool + empty() const + { return begin() == end(); } + + reference + operator[](size_type __n) + { + return *iterator(this->_M_impl._M_start._M_p + + __n / int(_S_word_bit), __n % int(_S_word_bit)); + } + + const_reference + operator[](size_type __n) const + { + return *const_iterator(this->_M_impl._M_start._M_p + + __n / int(_S_word_bit), __n % int(_S_word_bit)); + } + + protected: + void + _M_range_check(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range(("vector::_M_range_check")); + } + + public: + reference + at(size_type __n) + { _M_range_check(__n); return (*this)[__n]; } + + const_reference + at(size_type __n) const + { _M_range_check(__n); return (*this)[__n]; } + + void + reserve(size_type __n); + + reference + front() + { return *begin(); } + + const_reference + front() const + { return *begin(); } + + reference + back() + { return *(end() - 1); } + + const_reference + back() const + { return *(end() - 1); } + + + + + + + void + data() { } + + void + push_back(bool __x) + { + if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage) + *this->_M_impl._M_finish++ = __x; + else + _M_insert_aux(end(), __x); + } + + void + swap(vector& __x) + { + std::swap(this->_M_impl._M_start, __x._M_impl._M_start); + std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); + std::swap(this->_M_impl._M_end_of_storage, + __x._M_impl._M_end_of_storage); + + + + std::__alloc_swap:: + _S_do_it(_M_get_Bit_allocator(), __x._M_get_Bit_allocator()); + } + + + static void + swap(reference __x, reference __y) + { + bool __tmp = __x; + __x = __y; + __y = __tmp; + } + + iterator + insert(iterator __position, const bool& __x = bool()) + { + const difference_type __n = __position - begin(); + if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage + && __position == end()) + *this->_M_impl._M_finish++ = __x; + else + _M_insert_aux(__position, __x); + return begin() + __n; + } + + template + void + insert(iterator __position, + _InputIterator __first, _InputIterator __last) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_insert_dispatch(__position, __first, __last, _Integral()); + } + + void + insert(iterator __position, size_type __n, const bool& __x) + { _M_fill_insert(__position, __n, __x); } + + + + + + + void + pop_back() + { --this->_M_impl._M_finish; } + + iterator + erase(iterator __position) + { + if (__position + 1 != end()) + std::copy(__position + 1, end(), __position); + --this->_M_impl._M_finish; + return __position; + } + + iterator + erase(iterator __first, iterator __last) + { + _M_erase_at_end(std::copy(__last, end(), __first)); + return __first; + } + + void + resize(size_type __new_size, bool __x = bool()) + { + if (__new_size < size()) + _M_erase_at_end(begin() + difference_type(__new_size)); + else + insert(end(), __new_size - size(), __x); + } + + + + + + + + void + flip() + { + for (_Bit_type * __p = this->_M_impl._M_start._M_p; + __p != this->_M_impl._M_end_of_storage; ++__p) + *__p = ~*__p; + } + + void + clear() + { _M_erase_at_end(begin()); } + + + protected: + + iterator + _M_copy_aligned(const_iterator __first, const_iterator __last, + iterator __result) + { + _Bit_type* __q = std::copy(__first._M_p, __last._M_p, __result._M_p); + return std::copy(const_iterator(__last._M_p, 0), __last, + iterator(__q, 0)); + } + + void + _M_initialize(size_type __n) + { + _Bit_type* __q = this->_M_allocate(__n); + this->_M_impl._M_end_of_storage = (__q + + ((__n + int(_S_word_bit) - 1) + / int(_S_word_bit))); + this->_M_impl._M_start = iterator(__q, 0); + this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n); + } + + + + + + template + void + _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) + { + _M_initialize(static_cast(__n)); + std::fill(this->_M_impl._M_start._M_p, + this->_M_impl._M_end_of_storage, __x ? ~0 : 0); + } + + template + void + _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { _M_initialize_range(__first, __last, + std::__iterator_category(__first)); } + + template + void + _M_initialize_range(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + for (; __first != __last; ++__first) + push_back(*__first); + } + + template + void + _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __n = std::distance(__first, __last); + _M_initialize(__n); + std::copy(__first, __last, this->_M_impl._M_start); + } + + + + template + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } + + template + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } + + void + _M_fill_assign(size_t __n, bool __x) + { + if (__n > size()) + { + std::fill(this->_M_impl._M_start._M_p, + this->_M_impl._M_end_of_storage, __x ? ~0 : 0); + insert(end(), __n - size(), __x); + } + else + { + _M_erase_at_end(begin() + __n); + std::fill(this->_M_impl._M_start._M_p, + this->_M_impl._M_end_of_storage, __x ? ~0 : 0); + } + } + + template + void + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + iterator __cur = begin(); + for (; __first != __last && __cur != end(); ++__cur, ++__first) + *__cur = *__first; + if (__first == __last) + _M_erase_at_end(__cur); + else + insert(end(), __first, __last); + } + + template + void + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __len = std::distance(__first, __last); + if (__len < size()) + _M_erase_at_end(std::copy(__first, __last, begin())); + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, size()); + std::copy(__first, __mid, begin()); + insert(end(), __mid, __last); + } + } + + + + + + template + void + _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, + __true_type) + { _M_fill_insert(__pos, __n, __x); } + + template + void + _M_insert_dispatch(iterator __pos, + _InputIterator __first, _InputIterator __last, + __false_type) + { _M_insert_range(__pos, __first, __last, + std::__iterator_category(__first)); } + + void + _M_fill_insert(iterator __position, size_type __n, bool __x); + + template + void + _M_insert_range(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag) + { + for (; __first != __last; ++__first) + { + __pos = insert(__pos, *__first); + ++__pos; + } + } + + template + void + _M_insert_range(iterator __position, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag); + + void + _M_insert_aux(iterator __position, bool __x); + + size_type + _M_check_len(size_type __n, const char* __s) const + { + if (max_size() - size() < __n) + __throw_length_error((__s)); + + const size_type __len = size() + std::max(size(), __n); + return (__len < size() || __len > max_size()) ? max_size() : __len; + } + + void + _M_erase_at_end(iterator __pos) + { this->_M_impl._M_finish = __pos; } + }; + +} +# 67 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/vector" 2 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/vector.tcc" 1 3 +# 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/vector.tcc" 3 +#define _VECTOR_TCC 1 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + void + vector<_Tp, _Alloc>:: + reserve(size_type __n) + { + if (__n > this->max_size()) + __throw_length_error(("vector::reserve")); + if (this->capacity() < __n) + { + const size_type __old_size = size(); + pointer __tmp = _M_allocate_and_copy(__n, + (this->_M_impl._M_start), + (this->_M_impl._M_finish)); + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __tmp; + this->_M_impl._M_finish = __tmp + __old_size; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + } + } +# 104 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/vector.tcc" 3 + template + typename vector<_Tp, _Alloc>::iterator + vector<_Tp, _Alloc>:: + insert(iterator __position, const value_type& __x) + { + const size_type __n = __position - begin(); + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage + && __position == end()) + { + this->_M_impl.construct(this->_M_impl._M_finish, __x); + ++this->_M_impl._M_finish; + } + else + { +# 126 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/vector.tcc" 3 + _M_insert_aux(__position, __x); + } + return iterator(this->_M_impl._M_start + __n); + } + + template + typename vector<_Tp, _Alloc>::iterator + vector<_Tp, _Alloc>:: + erase(iterator __position) + { + if (__position + 1 != end()) + std::copy(__position + 1, end(), __position); + --this->_M_impl._M_finish; + this->_M_impl.destroy(this->_M_impl._M_finish); + return __position; + } + + template + typename vector<_Tp, _Alloc>::iterator + vector<_Tp, _Alloc>:: + erase(iterator __first, iterator __last) + { + if (__last != end()) + std::copy(__last, end(), __first); + _M_erase_at_end(__first.base() + (end() - __last)); + return __first; + } + + template + vector<_Tp, _Alloc>& + vector<_Tp, _Alloc>:: + operator=(const vector<_Tp, _Alloc>& __x) + { + if (&__x != this) + { + const size_type __xlen = __x.size(); + if (__xlen > capacity()) + { + pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(), + __x.end()); + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __tmp; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen; + } + else if (size() >= __xlen) + { + std::_Destroy(std::copy(__x.begin(), __x.end(), begin()), + end(), _M_get_Tp_allocator()); + } + else + { + std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(), + this->_M_impl._M_start); + std::__uninitialized_copy_a(__x._M_impl._M_start + size(), + __x._M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + } + this->_M_impl._M_finish = this->_M_impl._M_start + __xlen; + } + return *this; + } + + template + void + vector<_Tp, _Alloc>:: + _M_fill_assign(size_t __n, const value_type& __val) + { + if (__n > capacity()) + { + vector __tmp(__n, __val, _M_get_Tp_allocator()); + __tmp.swap(*this); + } + else if (__n > size()) + { + std::fill(begin(), end(), __val); + std::__uninitialized_fill_n_a(this->_M_impl._M_finish, + __n - size(), __val, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n - size(); + } + else + _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val)); + } + + template + template + void + vector<_Tp, _Alloc>:: + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + pointer __cur(this->_M_impl._M_start); + for (; __first != __last && __cur != this->_M_impl._M_finish; + ++__cur, ++__first) + *__cur = *__first; + if (__first == __last) + _M_erase_at_end(__cur); + else + insert(end(), __first, __last); + } + + template + template + void + vector<_Tp, _Alloc>:: + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __len = std::distance(__first, __last); + + if (__len > capacity()) + { + pointer __tmp(_M_allocate_and_copy(__len, __first, __last)); + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __tmp; + this->_M_impl._M_finish = this->_M_impl._M_start + __len; + this->_M_impl._M_end_of_storage = this->_M_impl._M_finish; + } + else if (size() >= __len) + _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start)); + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, size()); + std::copy(__first, __mid, this->_M_impl._M_start); + this->_M_impl._M_finish = + std::__uninitialized_copy_a(__mid, __last, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + } + } +# 293 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/vector.tcc" 3 + template + void + vector<_Tp, _Alloc>:: + _M_insert_aux(iterator __position, const _Tp& __x) + + { + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + { + this->_M_impl.construct(this->_M_impl._M_finish, + (*(this->_M_impl._M_finish - 1)) + ); + ++this->_M_impl._M_finish; + + _Tp __x_copy = __x; + + std::copy_backward(__position.base(), this->_M_impl._M_finish - 2, this->_M_impl._M_finish - 1) + + ; + + *__position = __x_copy; + + + + } + else + { + const size_type __len = + _M_check_len(size_type(1), "vector::_M_insert_aux"); + const size_type __elems_before = __position - begin(); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + try + { + + + + + this->_M_impl.construct(__new_start + __elems_before, + + + + __x); + + __new_finish = 0; + + __new_finish = + std::__uninitialized_move_a(this->_M_impl._M_start, + __position.base(), __new_start, + _M_get_Tp_allocator()); + ++__new_finish; + + __new_finish = + std::__uninitialized_move_a(__position.base(), + this->_M_impl._M_finish, + __new_finish, + _M_get_Tp_allocator()); + } + catch(...) + { + if (!__new_finish) + this->_M_impl.destroy(__new_start + __elems_before); + else + std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + } + + template + void + vector<_Tp, _Alloc>:: + _M_fill_insert(iterator __position, size_type __n, const value_type& __x) + { + if (__n != 0) + { + if (size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_finish) >= __n) + { + value_type __x_copy = __x; + const size_type __elems_after = end() - __position; + pointer __old_finish(this->_M_impl._M_finish); + if (__elems_after > __n) + { + std::__uninitialized_move_a(this->_M_impl._M_finish - __n, + this->_M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n; + std::copy_backward(__position.base(), __old_finish - __n, __old_finish) + ; + std::fill(__position.base(), __position.base() + __n, + __x_copy); + } + else + { + std::__uninitialized_fill_n_a(this->_M_impl._M_finish, + __n - __elems_after, + __x_copy, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n - __elems_after; + std::__uninitialized_move_a(__position.base(), __old_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __elems_after; + std::fill(__position.base(), __old_finish, __x_copy); + } + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_fill_insert"); + const size_type __elems_before = __position - begin(); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + try + { + + std::__uninitialized_fill_n_a(__new_start + __elems_before, + __n, __x, + _M_get_Tp_allocator()); + __new_finish = 0; + + __new_finish = + std::__uninitialized_move_a(this->_M_impl._M_start, + __position.base(), + __new_start, + _M_get_Tp_allocator()); + __new_finish += __n; + + __new_finish = + std::__uninitialized_move_a(__position.base(), + this->_M_impl._M_finish, + __new_finish, + _M_get_Tp_allocator()); + } + catch(...) + { + if (!__new_finish) + std::_Destroy(__new_start + __elems_before, + __new_start + __elems_before + __n, + _M_get_Tp_allocator()); + else + std::_Destroy(__new_start, __new_finish, + _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + } + } + + template + template + void + vector<_Tp, _Alloc>:: + _M_range_insert(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag) + { + for (; __first != __last; ++__first) + { + __pos = insert(__pos, *__first); + ++__pos; + } + } + + template + template + void + vector<_Tp, _Alloc>:: + _M_range_insert(iterator __position, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag) + { + if (__first != __last) + { + const size_type __n = std::distance(__first, __last); + if (size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_finish) >= __n) + { + const size_type __elems_after = end() - __position; + pointer __old_finish(this->_M_impl._M_finish); + if (__elems_after > __n) + { + std::__uninitialized_move_a(this->_M_impl._M_finish - __n, + this->_M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n; + std::copy_backward(__position.base(), __old_finish - __n, __old_finish) + ; + std::copy(__first, __last, __position); + } + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, __elems_after); + std::__uninitialized_copy_a(__mid, __last, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n - __elems_after; + std::__uninitialized_move_a(__position.base(), + __old_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __elems_after; + std::copy(__first, __mid, __position); + } + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_range_insert"); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + try + { + __new_finish = + std::__uninitialized_move_a(this->_M_impl._M_start, + __position.base(), + __new_start, + _M_get_Tp_allocator()); + __new_finish = + std::__uninitialized_copy_a(__first, __last, + __new_finish, + _M_get_Tp_allocator()); + __new_finish = + std::__uninitialized_move_a(__position.base(), + this->_M_impl._M_finish, + __new_finish, + _M_get_Tp_allocator()); + } + catch(...) + { + std::_Destroy(__new_start, __new_finish, + _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + } + } + + + + + template + void + vector:: + reserve(size_type __n) + { + if (__n > this->max_size()) + __throw_length_error(("vector::reserve")); + if (this->capacity() < __n) + { + _Bit_type* __q = this->_M_allocate(__n); + this->_M_impl._M_finish = _M_copy_aligned(begin(), end(), + iterator(__q, 0)); + this->_M_deallocate(); + this->_M_impl._M_start = iterator(__q, 0); + this->_M_impl._M_end_of_storage = (__q + (__n + int(_S_word_bit) - 1) + / int(_S_word_bit)); + } + } + + template + void + vector:: + _M_fill_insert(iterator __position, size_type __n, bool __x) + { + if (__n == 0) + return; + if (capacity() - size() >= __n) + { + std::copy_backward(__position, end(), + this->_M_impl._M_finish + difference_type(__n)); + std::fill(__position, __position + difference_type(__n), __x); + this->_M_impl._M_finish += difference_type(__n); + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_fill_insert"); + _Bit_type * __q = this->_M_allocate(__len); + iterator __i = _M_copy_aligned(begin(), __position, + iterator(__q, 0)); + std::fill(__i, __i + difference_type(__n), __x); + this->_M_impl._M_finish = std::copy(__position, end(), + __i + difference_type(__n)); + this->_M_deallocate(); + this->_M_impl._M_end_of_storage = (__q + ((__len + + int(_S_word_bit) - 1) + / int(_S_word_bit))); + this->_M_impl._M_start = iterator(__q, 0); + } + } + + template + template + void + vector:: + _M_insert_range(iterator __position, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag) + { + if (__first != __last) + { + size_type __n = std::distance(__first, __last); + if (capacity() - size() >= __n) + { + std::copy_backward(__position, end(), + this->_M_impl._M_finish + + difference_type(__n)); + std::copy(__first, __last, __position); + this->_M_impl._M_finish += difference_type(__n); + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_insert_range"); + _Bit_type * __q = this->_M_allocate(__len); + iterator __i = _M_copy_aligned(begin(), __position, + iterator(__q, 0)); + __i = std::copy(__first, __last, __i); + this->_M_impl._M_finish = std::copy(__position, end(), __i); + this->_M_deallocate(); + this->_M_impl._M_end_of_storage = (__q + + ((__len + + int(_S_word_bit) - 1) + / int(_S_word_bit))); + this->_M_impl._M_start = iterator(__q, 0); + } + } + } + + template + void + vector:: + _M_insert_aux(iterator __position, bool __x) + { + if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage) + { + std::copy_backward(__position, this->_M_impl._M_finish, + this->_M_impl._M_finish + 1); + *__position = __x; + ++this->_M_impl._M_finish; + } + else + { + const size_type __len = + _M_check_len(size_type(1), "vector::_M_insert_aux"); + _Bit_type * __q = this->_M_allocate(__len); + iterator __i = _M_copy_aligned(begin(), __position, + iterator(__q, 0)); + *__i++ = __x; + this->_M_impl._M_finish = std::copy(__position, end(), __i); + this->_M_deallocate(); + this->_M_impl._M_end_of_storage = (__q + ((__len + + int(_S_word_bit) - 1) + / int(_S_word_bit))); + this->_M_impl._M_start = iterator(__q, 0); + } + } + +} +# 70 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/vector" 2 3 +# 32 "../fwbuilder/InetAddr.h" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/typeinfo" 1 3 +# 32 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/typeinfo" 3 +#define _TYPEINFO + + +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/typeinfo" 3 + + + +#pragma GCC visibility push(default) + +extern "C++" { + +namespace __cxxabiv1 +{ + class __class_type_info; +} +# 67 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/typeinfo" 3 +#define __GXX_MERGED_TYPEINFO_NAMES 0 + + + + + + + +#define __GXX_TYPEINFO_EQUALITY_INLINE 1 + + + +namespace std +{ + + + + + + + class type_info + { + public: + + + + + virtual ~type_info(); + + + + const char* name() const + { return __name[0] == '*' ? __name + 1 : __name; } +# 114 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/typeinfo" 3 + bool before(const type_info& __arg) const + { return (__name[0] == '*' && __arg.__name[0] == '*') + ? __name < __arg.__name + : __builtin_strcmp (__name, __arg.__name) < 0; } + + bool operator==(const type_info& __arg) const + { + return ((__name == __arg.__name) + || (__name[0] != '*' && + __builtin_strcmp (__name, __arg.__name) == 0)); + } +# 135 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/typeinfo" 3 + bool operator!=(const type_info& __arg) const + { return !operator==(__arg); } + + + virtual bool __is_pointer_p() const; + + + virtual bool __is_function_p() const; + + + + + + + + virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj, + unsigned __outer) const; + + + virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target, + void **__obj_ptr) const; + + protected: + const char *__name; + + explicit type_info(const char *__n): __name(__n) { } + + private: + + type_info& operator=(const type_info&); + type_info(const type_info&); + }; + + + + + + + + class bad_cast : public exception + { + public: + bad_cast() throw() { } + + + + virtual ~bad_cast() throw(); + + + virtual const char* what() const throw(); + }; + + + + + + class bad_typeid : public exception + { + public: + bad_typeid () throw() { } + + + + virtual ~bad_typeid() throw(); + + + virtual const char* what() const throw(); + }; +} + +#pragma GCC visibility pop + +} +# 33 "../fwbuilder/InetAddr.h" 2 +# 1 "/usr/include/assert.h" 1 3 4 +# 26 "/usr/include/assert.h" 3 4 +#undef _ASSERT_H +#undef assert +#undef __ASSERT_VOID_CAST + + +#undef assert_perror + + + + +#define _ASSERT_H 1 + + + +#define __ASSERT_VOID_CAST static_cast +# 66 "/usr/include/assert.h" 3 4 +extern "C" { + + +extern void __assert_fail (__const char *__assertion, __const char *__file, + unsigned int __line, __const char *__function) + throw () __attribute__ ((__noreturn__)); + + +extern void __assert_perror_fail (int __errnum, __const char *__file, + unsigned int __line, + __const char *__function) + throw () __attribute__ ((__noreturn__)); + + + + +extern void __assert (const char *__assertion, const char *__file, int __line) + throw () __attribute__ ((__noreturn__)); + + +} + +#define assert(expr) ((expr) ? __ASSERT_VOID_CAST (0) : __assert_fail (__STRING(expr), __FILE__, __LINE__, __ASSERT_FUNCTION)) + + + + + +#define assert_perror(errnum) (!(errnum) ? __ASSERT_VOID_CAST (0) : __assert_perror_fail ((errnum), __FILE__, __LINE__, __ASSERT_FUNCTION)) +# 106 "/usr/include/assert.h" 3 4 +#define __ASSERT_FUNCTION __PRETTY_FUNCTION__ +# 34 "../fwbuilder/InetAddr.h" 2 + + + +# 1 "/usr/include/sys/socket.h" 1 3 4 +# 22 "/usr/include/sys/socket.h" 3 4 +#define _SYS_SOCKET_H 1 + + + +extern "C" { + +# 1 "/usr/include/sys/uio.h" 1 3 4 +# 20 "/usr/include/sys/uio.h" 3 4 +#define _SYS_UIO_H 1 + + + + + +extern "C" { + + +# 1 "/usr/include/bits/uio.h" 1 3 4 +# 24 "/usr/include/bits/uio.h" 3 4 +#define _BITS_UIO_H 1 +# 40 "/usr/include/bits/uio.h" 3 4 +#define UIO_MAXIOV 1024 + + + +struct iovec + { + void *iov_base; + size_t iov_len; + }; +# 30 "/usr/include/sys/uio.h" 2 3 4 +# 40 "/usr/include/sys/uio.h" 3 4 +extern ssize_t readv (int __fd, __const struct iovec *__iovec, int __count) + __attribute__ ((__warn_unused_result__)); +# 51 "/usr/include/sys/uio.h" 3 4 +extern ssize_t writev (int __fd, __const struct iovec *__iovec, int __count) + __attribute__ ((__warn_unused_result__)); +# 66 "/usr/include/sys/uio.h" 3 4 +extern ssize_t preadv (int __fd, __const struct iovec *__iovec, int __count, + __off_t __offset) __attribute__ ((__warn_unused_result__)); +# 78 "/usr/include/sys/uio.h" 3 4 +extern ssize_t pwritev (int __fd, __const struct iovec *__iovec, int __count, + __off_t __offset) __attribute__ ((__warn_unused_result__)); +# 104 "/usr/include/sys/uio.h" 3 4 +extern ssize_t preadv64 (int __fd, __const struct iovec *__iovec, int __count, + __off64_t __offset) __attribute__ ((__warn_unused_result__)); +# 116 "/usr/include/sys/uio.h" 3 4 +extern ssize_t pwritev64 (int __fd, __const struct iovec *__iovec, int __count, + __off64_t __offset) __attribute__ ((__warn_unused_result__)); + + + +} +# 29 "/usr/include/sys/socket.h" 2 3 4 +#define __need_size_t +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 31 "/usr/include/sys/socket.h" 2 3 4 + + +# 1 "/usr/include/bits/sigset.h" 1 3 4 +# 34 "/usr/include/sys/socket.h" 2 3 4 + + + + + + +# 1 "/usr/include/bits/socket.h" 1 3 4 +# 22 "/usr/include/bits/socket.h" 3 4 +#define __BITS_SOCKET_H + + + + + +#define __need_size_t +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 30 "/usr/include/bits/socket.h" 2 3 4 +# 40 "/usr/include/bits/socket.h" 3 4 +enum __socket_type +{ + SOCK_STREAM = 1, + +#define SOCK_STREAM SOCK_STREAM + SOCK_DGRAM = 2, + +#define SOCK_DGRAM SOCK_DGRAM + SOCK_RAW = 3, +#define SOCK_RAW SOCK_RAW + SOCK_RDM = 4, +#define SOCK_RDM SOCK_RDM + SOCK_SEQPACKET = 5, + +#define SOCK_SEQPACKET SOCK_SEQPACKET + SOCK_DCCP = 6, +#define SOCK_DCCP SOCK_DCCP + SOCK_PACKET = 10, + + +#define SOCK_PACKET SOCK_PACKET + + + + + SOCK_CLOEXEC = 02000000, + +#define SOCK_CLOEXEC SOCK_CLOEXEC + SOCK_NONBLOCK = 04000 + +#define SOCK_NONBLOCK SOCK_NONBLOCK +}; + + +#define PF_UNSPEC 0 +#define PF_LOCAL 1 +#define PF_UNIX PF_LOCAL +#define PF_FILE PF_LOCAL +#define PF_INET 2 +#define PF_AX25 3 +#define PF_IPX 4 +#define PF_APPLETALK 5 +#define PF_NETROM 6 +#define PF_BRIDGE 7 +#define PF_ATMPVC 8 +#define PF_X25 9 +#define PF_INET6 10 +#define PF_ROSE 11 +#define PF_DECnet 12 +#define PF_NETBEUI 13 +#define PF_SECURITY 14 +#define PF_KEY 15 +#define PF_NETLINK 16 +#define PF_ROUTE PF_NETLINK +#define PF_PACKET 17 +#define PF_ASH 18 +#define PF_ECONET 19 +#define PF_ATMSVC 20 +#define PF_RDS 21 +#define PF_SNA 22 +#define PF_IRDA 23 +#define PF_PPPOX 24 +#define PF_WANPIPE 25 +#define PF_LLC 26 +#define PF_CAN 29 +#define PF_TIPC 30 +#define PF_BLUETOOTH 31 +#define PF_IUCV 32 +#define PF_RXRPC 33 +#define PF_ISDN 34 +#define PF_PHONET 35 +#define PF_IEEE802154 36 +#define PF_CAIF 37 +#define PF_ALG 38 +#define PF_MAX 39 + + +#define AF_UNSPEC PF_UNSPEC +#define AF_LOCAL PF_LOCAL +#define AF_UNIX PF_UNIX +#define AF_FILE PF_FILE +#define AF_INET PF_INET +#define AF_AX25 PF_AX25 +#define AF_IPX PF_IPX +#define AF_APPLETALK PF_APPLETALK +#define AF_NETROM PF_NETROM +#define AF_BRIDGE PF_BRIDGE +#define AF_ATMPVC PF_ATMPVC +#define AF_X25 PF_X25 +#define AF_INET6 PF_INET6 +#define AF_ROSE PF_ROSE +#define AF_DECnet PF_DECnet +#define AF_NETBEUI PF_NETBEUI +#define AF_SECURITY PF_SECURITY +#define AF_KEY PF_KEY +#define AF_NETLINK PF_NETLINK +#define AF_ROUTE PF_ROUTE +#define AF_PACKET PF_PACKET +#define AF_ASH PF_ASH +#define AF_ECONET PF_ECONET +#define AF_ATMSVC PF_ATMSVC +#define AF_RDS PF_RDS +#define AF_SNA PF_SNA +#define AF_IRDA PF_IRDA +#define AF_PPPOX PF_PPPOX +#define AF_WANPIPE PF_WANPIPE +#define AF_LLC PF_LLC +#define AF_CAN PF_CAN +#define AF_TIPC PF_TIPC +#define AF_BLUETOOTH PF_BLUETOOTH +#define AF_IUCV PF_IUCV +#define AF_RXRPC PF_RXRPC +#define AF_ISDN PF_ISDN +#define AF_PHONET PF_PHONET +#define AF_IEEE802154 PF_IEEE802154 +#define AF_CAIF PF_CAIF +#define AF_ALG PF_ALG +#define AF_MAX PF_MAX + + + + + +#define SOL_RAW 255 +#define SOL_DECNET 261 +#define SOL_X25 262 +#define SOL_PACKET 263 +#define SOL_ATM 264 +#define SOL_AAL 265 +#define SOL_IRDA 266 + + +#define SOMAXCONN 128 + + +# 1 "/usr/include/bits/sockaddr.h" 1 3 4 +# 25 "/usr/include/bits/sockaddr.h" 3 4 +#define _BITS_SOCKADDR_H 1 + + + +typedef unsigned short int sa_family_t; + + + + + +#define __SOCKADDR_COMMON(sa_prefix) sa_family_t sa_prefix ##family + + +#define __SOCKADDR_COMMON_SIZE (sizeof (unsigned short int)) +# 176 "/usr/include/bits/socket.h" 2 3 4 + + +struct sockaddr + { + sa_family_t sa_family; + char sa_data[14]; + }; + + + + +#define __ss_aligntype unsigned long int +#define _SS_SIZE 128 +#define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) + +struct sockaddr_storage + { + sa_family_t ss_family; + unsigned long int __ss_align; + char __ss_padding[(128 - (2 * sizeof (unsigned long int)))]; + }; + + + +enum + { + MSG_OOB = 0x01, +#define MSG_OOB MSG_OOB + MSG_PEEK = 0x02, +#define MSG_PEEK MSG_PEEK + MSG_DONTROUTE = 0x04, +#define MSG_DONTROUTE MSG_DONTROUTE + + + MSG_TRYHARD = MSG_DONTROUTE, +#define MSG_TRYHARD MSG_DONTROUTE + + MSG_CTRUNC = 0x08, +#define MSG_CTRUNC MSG_CTRUNC + MSG_PROXY = 0x10, +#define MSG_PROXY MSG_PROXY + MSG_TRUNC = 0x20, +#define MSG_TRUNC MSG_TRUNC + MSG_DONTWAIT = 0x40, +#define MSG_DONTWAIT MSG_DONTWAIT + MSG_EOR = 0x80, +#define MSG_EOR MSG_EOR + MSG_WAITALL = 0x100, +#define MSG_WAITALL MSG_WAITALL + MSG_FIN = 0x200, +#define MSG_FIN MSG_FIN + MSG_SYN = 0x400, +#define MSG_SYN MSG_SYN + MSG_CONFIRM = 0x800, +#define MSG_CONFIRM MSG_CONFIRM + MSG_RST = 0x1000, +#define MSG_RST MSG_RST + MSG_ERRQUEUE = 0x2000, +#define MSG_ERRQUEUE MSG_ERRQUEUE + MSG_NOSIGNAL = 0x4000, +#define MSG_NOSIGNAL MSG_NOSIGNAL + MSG_MORE = 0x8000, +#define MSG_MORE MSG_MORE + MSG_WAITFORONE = 0x10000, +#define MSG_WAITFORONE MSG_WAITFORONE + + MSG_CMSG_CLOEXEC = 0x40000000 + + +#define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC + }; + + + + +struct msghdr + { + void *msg_name; + socklen_t msg_namelen; + + struct iovec *msg_iov; + size_t msg_iovlen; + + void *msg_control; + size_t msg_controllen; + + + + + int msg_flags; + }; + + + +struct mmsghdr + { + struct msghdr msg_hdr; + unsigned int msg_len; + }; + + + +struct cmsghdr + { + size_t cmsg_len; + + + + + int cmsg_level; + int cmsg_type; + + __extension__ unsigned char __cmsg_data []; + + }; + + + +#define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) + + + +#define CMSG_NXTHDR(mhdr,cmsg) __cmsg_nxthdr (mhdr, cmsg) +#define CMSG_FIRSTHDR(mhdr) ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0) + + +#define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1)) + +#define CMSG_SPACE(len) (CMSG_ALIGN (len) + CMSG_ALIGN (sizeof (struct cmsghdr))) + +#define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) + +extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, + struct cmsghdr *__cmsg) throw (); + + +#define _EXTERN_INLINE __extern_inline + +extern __inline __attribute__ ((__gnu_inline__)) struct cmsghdr * +__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) throw () +{ + if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) + + return 0; + + __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg + + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1))); + if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control + + __mhdr->msg_controllen) + || ((unsigned char *) __cmsg + (((__cmsg->cmsg_len) + sizeof (size_t) - 1) & (size_t) ~(sizeof (size_t) - 1)) + > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) + + return 0; + return __cmsg; +} + + + + +enum + { + SCM_RIGHTS = 0x01 +#define SCM_RIGHTS SCM_RIGHTS + + , SCM_CREDENTIALS = 0x02 +#define SCM_CREDENTIALS SCM_CREDENTIALS + + }; + + + +struct ucred +{ + pid_t pid; + uid_t uid; + gid_t gid; +}; +# 381 "/usr/include/bits/socket.h" 3 4 +# 1 "/usr/include/asm/socket.h" 1 3 4 +# 1 "/usr/include/asm-generic/socket.h" 1 3 4 + +#define __ASM_GENERIC_SOCKET_H + +# 1 "/usr/include/asm/sockios.h" 1 3 4 +# 1 "/usr/include/asm-generic/sockios.h" 1 3 4 + +#define __ASM_GENERIC_SOCKIOS_H + + +#define FIOSETOWN 0x8901 +#define SIOCSPGRP 0x8902 +#define FIOGETOWN 0x8903 +#define SIOCGPGRP 0x8904 +#define SIOCATMARK 0x8905 +#define SIOCGSTAMP 0x8906 +#define SIOCGSTAMPNS 0x8907 +# 1 "/usr/include/asm/sockios.h" 2 3 4 +# 5 "/usr/include/asm-generic/socket.h" 2 3 4 + + +#define SOL_SOCKET 1 + +#define SO_DEBUG 1 +#define SO_REUSEADDR 2 +#define SO_TYPE 3 +#define SO_ERROR 4 +#define SO_DONTROUTE 5 +#define SO_BROADCAST 6 +#define SO_SNDBUF 7 +#define SO_RCVBUF 8 +#define SO_SNDBUFFORCE 32 +#define SO_RCVBUFFORCE 33 +#define SO_KEEPALIVE 9 +#define SO_OOBINLINE 10 +#define SO_NO_CHECK 11 +#define SO_PRIORITY 12 +#define SO_LINGER 13 +#define SO_BSDCOMPAT 14 + + + +#define SO_PASSCRED 16 +#define SO_PEERCRED 17 +#define SO_RCVLOWAT 18 +#define SO_SNDLOWAT 19 +#define SO_RCVTIMEO 20 +#define SO_SNDTIMEO 21 + + + +#define SO_SECURITY_AUTHENTICATION 22 +#define SO_SECURITY_ENCRYPTION_TRANSPORT 23 +#define SO_SECURITY_ENCRYPTION_NETWORK 24 + +#define SO_BINDTODEVICE 25 + + +#define SO_ATTACH_FILTER 26 +#define SO_DETACH_FILTER 27 + +#define SO_PEERNAME 28 +#define SO_TIMESTAMP 29 +#define SCM_TIMESTAMP SO_TIMESTAMP + +#define SO_ACCEPTCONN 30 + +#define SO_PEERSEC 31 +#define SO_PASSSEC 34 +#define SO_TIMESTAMPNS 35 +#define SCM_TIMESTAMPNS SO_TIMESTAMPNS + +#define SO_MARK 36 + +#define SO_TIMESTAMPING 37 +#define SCM_TIMESTAMPING SO_TIMESTAMPING + +#define SO_PROTOCOL 38 +#define SO_DOMAIN 39 + +#define SO_RXQ_OVFL 40 +# 1 "/usr/include/asm/socket.h" 2 3 4 +# 382 "/usr/include/bits/socket.h" 2 3 4 +# 415 "/usr/include/bits/socket.h" 3 4 +struct linger + { + int l_onoff; + int l_linger; + }; + + +extern "C" { + + + + + + +extern int recvmmsg (int __fd, struct mmsghdr *__vmessages, + unsigned int __vlen, int __flags, + __const struct timespec *__tmo); + + + + + +extern int sendmmsg (int __fd, struct mmsghdr *__vmessages, + unsigned int __vlen, int __flags); + +} +# 41 "/usr/include/sys/socket.h" 2 3 4 + + + + +struct osockaddr + { + unsigned short int sa_family; + unsigned char sa_data[14]; + }; + + + + +enum +{ + SHUT_RD = 0, +#define SHUT_RD SHUT_RD + SHUT_WR, +#define SHUT_WR SHUT_WR + SHUT_RDWR +#define SHUT_RDWR SHUT_RDWR +}; +# 71 "/usr/include/sys/socket.h" 3 4 +#define __SOCKADDR_ARG struct sockaddr *__restrict +#define __CONST_SOCKADDR_ARG __const struct sockaddr * +# 105 "/usr/include/sys/socket.h" 3 4 +extern int socket (int __domain, int __type, int __protocol) throw (); + + + + + +extern int socketpair (int __domain, int __type, int __protocol, + int __fds[2]) throw (); + + +extern int bind (int __fd, __const struct sockaddr * __addr, socklen_t __len) + throw (); + + +extern int getsockname (int __fd, struct sockaddr *__restrict __addr, + socklen_t *__restrict __len) throw (); +# 129 "/usr/include/sys/socket.h" 3 4 +extern int connect (int __fd, __const struct sockaddr * __addr, socklen_t __len); + + + +extern int getpeername (int __fd, struct sockaddr *__restrict __addr, + socklen_t *__restrict __len) throw (); + + + + + + +extern ssize_t send (int __fd, __const void *__buf, size_t __n, int __flags); + + + + + + +extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags); + + + + + + +extern ssize_t sendto (int __fd, __const void *__buf, size_t __n, + int __flags, __const struct sockaddr * __addr, + socklen_t __addr_len); +# 166 "/usr/include/sys/socket.h" 3 4 +extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n, + int __flags, struct sockaddr *__restrict __addr, + socklen_t *__restrict __addr_len); + + + + + + + +extern ssize_t sendmsg (int __fd, __const struct msghdr *__message, + int __flags); + + + + + + +extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags); + + + + + +extern int getsockopt (int __fd, int __level, int __optname, + void *__restrict __optval, + socklen_t *__restrict __optlen) throw (); + + + + +extern int setsockopt (int __fd, int __level, int __optname, + __const void *__optval, socklen_t __optlen) throw (); + + + + + +extern int listen (int __fd, int __n) throw (); +# 214 "/usr/include/sys/socket.h" 3 4 +extern int accept (int __fd, struct sockaddr *__restrict __addr, + socklen_t *__restrict __addr_len); + + + + + + +extern int accept4 (int __fd, struct sockaddr *__restrict __addr, + socklen_t *__restrict __addr_len, int __flags); +# 232 "/usr/include/sys/socket.h" 3 4 +extern int shutdown (int __fd, int __how) throw (); + + + + +extern int sockatmark (int __fd) throw (); + + + + + + + +extern int isfdtype (int __fd, int __fdtype) throw (); + + + + + +# 1 "/usr/include/bits/socket2.h" 1 3 4 +# 24 "/usr/include/bits/socket2.h" 3 4 +extern ssize_t __recv_chk (int __fd, void *__buf, size_t __n, size_t __buflen, + int __flags); +extern ssize_t __recv_alias (int __fd, void *__buf, size_t __n, int __flags) __asm__ ("" "recv") + ; +extern ssize_t __recv_chk_warn (int __fd, void *__buf, size_t __n, size_t __buflen, int __flags) __asm__ ("" "__recv_chk") + + + __attribute__((__warning__ ("recv called with bigger length than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) ssize_t +recv (int __fd, void *__buf, size_t __n, int __flags) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __recv_chk (__fd, __buf, __n, __builtin_object_size (__buf, 0), __flags); + + if (__n > __builtin_object_size (__buf, 0)) + return __recv_chk_warn (__fd, __buf, __n, __builtin_object_size (__buf, 0), __flags); + } + return __recv_alias (__fd, __buf, __n, __flags); +} + +extern ssize_t __recvfrom_chk (int __fd, void *__restrict __buf, size_t __n, + size_t __buflen, int __flags, + struct sockaddr *__restrict __addr, + socklen_t *__restrict __addr_len); +extern ssize_t __recvfrom_alias (int __fd, void *__restrict __buf, size_t __n, int __flags, struct sockaddr *__restrict __addr, socklen_t *__restrict __addr_len) __asm__ ("" "recvfrom") + + + ; +extern ssize_t __recvfrom_chk_warn (int __fd, void *__restrict __buf, size_t __n, size_t __buflen, int __flags, struct sockaddr *__restrict __addr, socklen_t *__restrict __addr_len) __asm__ ("" "__recvfrom_chk") + + + + + __attribute__((__warning__ ("recvfrom called with bigger length than size of " "destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) ssize_t +recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags, + struct sockaddr *__restrict __addr, socklen_t *__restrict __addr_len) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __recvfrom_chk (__fd, __buf, __n, __builtin_object_size (__buf, 0), __flags, + __addr, __addr_len); + if (__n > __builtin_object_size (__buf, 0)) + return __recvfrom_chk_warn (__fd, __buf, __n, __builtin_object_size (__buf, 0), __flags, + __addr, __addr_len); + } + return __recvfrom_alias (__fd, __buf, __n, __flags, __addr, __addr_len); +} +# 252 "/usr/include/sys/socket.h" 2 3 4 + + +} +# 38 "../fwbuilder/InetAddr.h" 2 +# 1 "/usr/include/netinet/in.h" 1 3 4 +# 21 "/usr/include/netinet/in.h" 3 4 +#define _NETINET_IN_H 1 + + + + + + + +extern "C" { + + +enum + { + IPPROTO_IP = 0, +#define IPPROTO_IP IPPROTO_IP + IPPROTO_HOPOPTS = 0, +#define IPPROTO_HOPOPTS IPPROTO_HOPOPTS + IPPROTO_ICMP = 1, +#define IPPROTO_ICMP IPPROTO_ICMP + IPPROTO_IGMP = 2, +#define IPPROTO_IGMP IPPROTO_IGMP + IPPROTO_IPIP = 4, +#define IPPROTO_IPIP IPPROTO_IPIP + IPPROTO_TCP = 6, +#define IPPROTO_TCP IPPROTO_TCP + IPPROTO_EGP = 8, +#define IPPROTO_EGP IPPROTO_EGP + IPPROTO_PUP = 12, +#define IPPROTO_PUP IPPROTO_PUP + IPPROTO_UDP = 17, +#define IPPROTO_UDP IPPROTO_UDP + IPPROTO_IDP = 22, +#define IPPROTO_IDP IPPROTO_IDP + IPPROTO_TP = 29, +#define IPPROTO_TP IPPROTO_TP + IPPROTO_DCCP = 33, +#define IPPROTO_DCCP IPPROTO_DCCP + IPPROTO_IPV6 = 41, +#define IPPROTO_IPV6 IPPROTO_IPV6 + IPPROTO_ROUTING = 43, +#define IPPROTO_ROUTING IPPROTO_ROUTING + IPPROTO_FRAGMENT = 44, +#define IPPROTO_FRAGMENT IPPROTO_FRAGMENT + IPPROTO_RSVP = 46, +#define IPPROTO_RSVP IPPROTO_RSVP + IPPROTO_GRE = 47, +#define IPPROTO_GRE IPPROTO_GRE + IPPROTO_ESP = 50, +#define IPPROTO_ESP IPPROTO_ESP + IPPROTO_AH = 51, +#define IPPROTO_AH IPPROTO_AH + IPPROTO_ICMPV6 = 58, +#define IPPROTO_ICMPV6 IPPROTO_ICMPV6 + IPPROTO_NONE = 59, +#define IPPROTO_NONE IPPROTO_NONE + IPPROTO_DSTOPTS = 60, +#define IPPROTO_DSTOPTS IPPROTO_DSTOPTS + IPPROTO_MTP = 92, +#define IPPROTO_MTP IPPROTO_MTP + IPPROTO_ENCAP = 98, +#define IPPROTO_ENCAP IPPROTO_ENCAP + IPPROTO_PIM = 103, +#define IPPROTO_PIM IPPROTO_PIM + IPPROTO_COMP = 108, +#define IPPROTO_COMP IPPROTO_COMP + IPPROTO_SCTP = 132, +#define IPPROTO_SCTP IPPROTO_SCTP + IPPROTO_UDPLITE = 136, +#define IPPROTO_UDPLITE IPPROTO_UDPLITE + IPPROTO_RAW = 255, +#define IPPROTO_RAW IPPROTO_RAW + IPPROTO_MAX + }; + + + +typedef uint16_t in_port_t; + + +enum + { + IPPORT_ECHO = 7, + IPPORT_DISCARD = 9, + IPPORT_SYSTAT = 11, + IPPORT_DAYTIME = 13, + IPPORT_NETSTAT = 15, + IPPORT_FTP = 21, + IPPORT_TELNET = 23, + IPPORT_SMTP = 25, + IPPORT_TIMESERVER = 37, + IPPORT_NAMESERVER = 42, + IPPORT_WHOIS = 43, + IPPORT_MTP = 57, + + IPPORT_TFTP = 69, + IPPORT_RJE = 77, + IPPORT_FINGER = 79, + IPPORT_TTYLINK = 87, + IPPORT_SUPDUP = 95, + + + IPPORT_EXECSERVER = 512, + IPPORT_LOGINSERVER = 513, + IPPORT_CMDSERVER = 514, + IPPORT_EFSSERVER = 520, + + + IPPORT_BIFFUDP = 512, + IPPORT_WHOSERVER = 513, + IPPORT_ROUTESERVER = 520, + + + IPPORT_RESERVED = 1024, + + + IPPORT_USERRESERVED = 5000 + }; + + + +typedef uint32_t in_addr_t; +struct in_addr + { + in_addr_t s_addr; + }; + + + + + + + +#define IN_CLASSA(a) ((((in_addr_t)(a)) & 0x80000000) == 0) +#define IN_CLASSA_NET 0xff000000 +#define IN_CLASSA_NSHIFT 24 +#define IN_CLASSA_HOST (0xffffffff & ~IN_CLASSA_NET) +#define IN_CLASSA_MAX 128 + +#define IN_CLASSB(a) ((((in_addr_t)(a)) & 0xc0000000) == 0x80000000) +#define IN_CLASSB_NET 0xffff0000 +#define IN_CLASSB_NSHIFT 16 +#define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET) +#define IN_CLASSB_MAX 65536 + +#define IN_CLASSC(a) ((((in_addr_t)(a)) & 0xe0000000) == 0xc0000000) +#define IN_CLASSC_NET 0xffffff00 +#define IN_CLASSC_NSHIFT 8 +#define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET) + +#define IN_CLASSD(a) ((((in_addr_t)(a)) & 0xf0000000) == 0xe0000000) +#define IN_MULTICAST(a) IN_CLASSD(a) + +#define IN_EXPERIMENTAL(a) ((((in_addr_t)(a)) & 0xe0000000) == 0xe0000000) +#define IN_BADCLASS(a) ((((in_addr_t)(a)) & 0xf0000000) == 0xf0000000) + + +#define INADDR_ANY ((in_addr_t) 0x00000000) + +#define INADDR_BROADCAST ((in_addr_t) 0xffffffff) + +#define INADDR_NONE ((in_addr_t) 0xffffffff) + + +#define IN_LOOPBACKNET 127 + + +#define INADDR_LOOPBACK ((in_addr_t) 0x7f000001) + + + +#define INADDR_UNSPEC_GROUP ((in_addr_t) 0xe0000000) +#define INADDR_ALLHOSTS_GROUP ((in_addr_t) 0xe0000001) +#define INADDR_ALLRTRS_GROUP ((in_addr_t) 0xe0000002) +#define INADDR_MAX_LOCAL_GROUP ((in_addr_t) 0xe00000ff) + + + +struct in6_addr + { + union + { + uint8_t __u6_addr8[16]; + + uint16_t __u6_addr16[8]; + uint32_t __u6_addr32[4]; + + } __in6_u; +#define s6_addr __in6_u.__u6_addr8 + +#define s6_addr16 __in6_u.__u6_addr16 +#define s6_addr32 __in6_u.__u6_addr32 + + }; + +extern const struct in6_addr in6addr_any; +extern const struct in6_addr in6addr_loopback; +#define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } } +#define IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } } + +#define INET_ADDRSTRLEN 16 +#define INET6_ADDRSTRLEN 46 + + + +struct sockaddr_in + { + sa_family_t sin_family; + in_port_t sin_port; + struct in_addr sin_addr; + + + unsigned char sin_zero[sizeof (struct sockaddr) - + (sizeof (unsigned short int)) - + sizeof (in_port_t) - + sizeof (struct in_addr)]; + }; + + +struct sockaddr_in6 + { + sa_family_t sin6_family; + in_port_t sin6_port; + uint32_t sin6_flowinfo; + struct in6_addr sin6_addr; + uint32_t sin6_scope_id; + }; + + + + +struct ip_mreq + { + + struct in_addr imr_multiaddr; + + + struct in_addr imr_interface; + }; + +struct ip_mreq_source + { + + struct in_addr imr_multiaddr; + + + struct in_addr imr_interface; + + + struct in_addr imr_sourceaddr; + }; + + + + +struct ipv6_mreq + { + + struct in6_addr ipv6mr_multiaddr; + + + unsigned int ipv6mr_interface; + }; + + + + +struct group_req + { + + uint32_t gr_interface; + + + struct sockaddr_storage gr_group; + }; + +struct group_source_req + { + + uint32_t gsr_interface; + + + struct sockaddr_storage gsr_group; + + + struct sockaddr_storage gsr_source; + }; + + + +struct ip_msfilter + { + + struct in_addr imsf_multiaddr; + + + struct in_addr imsf_interface; + + + uint32_t imsf_fmode; + + + uint32_t imsf_numsrc; + + struct in_addr imsf_slist[1]; + }; + +#define IP_MSFILTER_SIZE(numsrc) (sizeof (struct ip_msfilter) - sizeof (struct in_addr) + (numsrc) * sizeof (struct in_addr)) + + + +struct group_filter + { + + uint32_t gf_interface; + + + struct sockaddr_storage gf_group; + + + uint32_t gf_fmode; + + + uint32_t gf_numsrc; + + struct sockaddr_storage gf_slist[1]; +}; + +#define GROUP_FILTER_SIZE(numsrc) (sizeof (struct group_filter) - sizeof (struct sockaddr_storage) + ((numsrc) * sizeof (struct sockaddr_storage))) + + + + + + + +# 1 "/usr/include/bits/in.h" 1 3 4 +# 28 "/usr/include/bits/in.h" 3 4 +#define IP_OPTIONS 4 +#define IP_HDRINCL 3 +#define IP_TOS 1 +#define IP_TTL 2 +#define IP_RECVOPTS 6 + +#define IP_RECVRETOPTS IP_RETOPTS +#define IP_RETOPTS 7 +#define IP_MULTICAST_IF 32 +#define IP_MULTICAST_TTL 33 +#define IP_MULTICAST_LOOP 34 +#define IP_ADD_MEMBERSHIP 35 +#define IP_DROP_MEMBERSHIP 36 +#define IP_UNBLOCK_SOURCE 37 +#define IP_BLOCK_SOURCE 38 +#define IP_ADD_SOURCE_MEMBERSHIP 39 +#define IP_DROP_SOURCE_MEMBERSHIP 40 +#define IP_MSFILTER 41 + +#define MCAST_JOIN_GROUP 42 +#define MCAST_BLOCK_SOURCE 43 +#define MCAST_UNBLOCK_SOURCE 44 +#define MCAST_LEAVE_GROUP 45 +#define MCAST_JOIN_SOURCE_GROUP 46 +#define MCAST_LEAVE_SOURCE_GROUP 47 +#define MCAST_MSFILTER 48 + +#define MCAST_EXCLUDE 0 +#define MCAST_INCLUDE 1 + + +#define IP_ROUTER_ALERT 5 +#define IP_PKTINFO 8 +#define IP_PKTOPTIONS 9 +#define IP_PMTUDISC 10 +#define IP_MTU_DISCOVER 10 +#define IP_RECVERR 11 +#define IP_RECVTTL 12 +#define IP_RECVTOS 13 +#define IP_MTU 14 +#define IP_FREEBIND 15 +#define IP_IPSEC_POLICY 16 +#define IP_XFRM_POLICY 17 +#define IP_PASSSEC 18 +#define IP_TRANSPARENT 19 + + +#define IP_ORIGDSTADDR 20 +#define IP_RECVORIGDSTADDR IP_ORIGDSTADDR + +#define IP_MINTTL 21 + + + +#define IP_PMTUDISC_DONT 0 +#define IP_PMTUDISC_WANT 1 +#define IP_PMTUDISC_DO 2 +#define IP_PMTUDISC_PROBE 3 + + +#define SOL_IP 0 + +#define IP_DEFAULT_MULTICAST_TTL 1 +#define IP_DEFAULT_MULTICAST_LOOP 1 +#define IP_MAX_MEMBERSHIPS 20 + + + + + +struct ip_opts + { + struct in_addr ip_dst; + char ip_opts[40]; + }; + + +struct ip_mreqn + { + struct in_addr imr_multiaddr; + struct in_addr imr_address; + int imr_ifindex; + }; + + +struct in_pktinfo + { + int ipi_ifindex; + struct in_addr ipi_spec_dst; + struct in_addr ipi_addr; + }; + + + + + +#define IPV6_ADDRFORM 1 +#define IPV6_2292PKTINFO 2 +#define IPV6_2292HOPOPTS 3 +#define IPV6_2292DSTOPTS 4 +#define IPV6_2292RTHDR 5 +#define IPV6_2292PKTOPTIONS 6 +#define IPV6_CHECKSUM 7 +#define IPV6_2292HOPLIMIT 8 + +#define SCM_SRCRT IPV6_RXSRCRT + +#define IPV6_NEXTHOP 9 +#define IPV6_AUTHHDR 10 +#define IPV6_UNICAST_HOPS 16 +#define IPV6_MULTICAST_IF 17 +#define IPV6_MULTICAST_HOPS 18 +#define IPV6_MULTICAST_LOOP 19 +#define IPV6_JOIN_GROUP 20 +#define IPV6_LEAVE_GROUP 21 +#define IPV6_ROUTER_ALERT 22 +#define IPV6_MTU_DISCOVER 23 +#define IPV6_MTU 24 +#define IPV6_RECVERR 25 +#define IPV6_V6ONLY 26 +#define IPV6_JOIN_ANYCAST 27 +#define IPV6_LEAVE_ANYCAST 28 +#define IPV6_IPSEC_POLICY 34 +#define IPV6_XFRM_POLICY 35 + +#define IPV6_RECVPKTINFO 49 +#define IPV6_PKTINFO 50 +#define IPV6_RECVHOPLIMIT 51 +#define IPV6_HOPLIMIT 52 +#define IPV6_RECVHOPOPTS 53 +#define IPV6_HOPOPTS 54 +#define IPV6_RTHDRDSTOPTS 55 +#define IPV6_RECVRTHDR 56 +#define IPV6_RTHDR 57 +#define IPV6_RECVDSTOPTS 58 +#define IPV6_DSTOPTS 59 + +#define IPV6_RECVTCLASS 66 +#define IPV6_TCLASS 67 + + +#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP +#define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP +#define IPV6_RXHOPOPTS IPV6_HOPOPTS +#define IPV6_RXDSTOPTS IPV6_DSTOPTS + + +#define IPV6_PMTUDISC_DONT 0 +#define IPV6_PMTUDISC_WANT 1 +#define IPV6_PMTUDISC_DO 2 +#define IPV6_PMTUDISC_PROBE 3 + + +#define SOL_IPV6 41 +#define SOL_ICMPV6 58 + + +#define IPV6_RTHDR_LOOSE 0 +#define IPV6_RTHDR_STRICT 1 + +#define IPV6_RTHDR_TYPE_0 0 +# 357 "/usr/include/netinet/in.h" 2 3 4 +# 365 "/usr/include/netinet/in.h" 3 4 +extern uint32_t ntohl (uint32_t __netlong) throw () __attribute__ ((__const__)); +extern uint16_t ntohs (uint16_t __netshort) + throw () __attribute__ ((__const__)); +extern uint32_t htonl (uint32_t __hostlong) + throw () __attribute__ ((__const__)); +extern uint16_t htons (uint16_t __hostshort) + throw () __attribute__ ((__const__)); + + + + +# 1 "/usr/include/bits/byteswap.h" 1 3 4 +# 377 "/usr/include/netinet/in.h" 2 3 4 +# 391 "/usr/include/netinet/in.h" 3 4 +#define ntohl(x) __bswap_32 (x) +#define ntohs(x) __bswap_16 (x) +#define htonl(x) __bswap_32 (x) +#define htons(x) __bswap_16 (x) + + + + +#define IN6_IS_ADDR_UNSPECIFIED(a) (((__const uint32_t *) (a))[0] == 0 && ((__const uint32_t *) (a))[1] == 0 && ((__const uint32_t *) (a))[2] == 0 && ((__const uint32_t *) (a))[3] == 0) + + + + + +#define IN6_IS_ADDR_LOOPBACK(a) (((__const uint32_t *) (a))[0] == 0 && ((__const uint32_t *) (a))[1] == 0 && ((__const uint32_t *) (a))[2] == 0 && ((__const uint32_t *) (a))[3] == htonl (1)) + + + + + +#define IN6_IS_ADDR_MULTICAST(a) (((__const uint8_t *) (a))[0] == 0xff) + +#define IN6_IS_ADDR_LINKLOCAL(a) ((((__const uint32_t *) (a))[0] & htonl (0xffc00000)) == htonl (0xfe800000)) + + + +#define IN6_IS_ADDR_SITELOCAL(a) ((((__const uint32_t *) (a))[0] & htonl (0xffc00000)) == htonl (0xfec00000)) + + + +#define IN6_IS_ADDR_V4MAPPED(a) ((((__const uint32_t *) (a))[0] == 0) && (((__const uint32_t *) (a))[1] == 0) && (((__const uint32_t *) (a))[2] == htonl (0xffff))) + + + + +#define IN6_IS_ADDR_V4COMPAT(a) ((((__const uint32_t *) (a))[0] == 0) && (((__const uint32_t *) (a))[1] == 0) && (((__const uint32_t *) (a))[2] == 0) && (ntohl (((__const uint32_t *) (a))[3]) > 1)) + + + + + +#define IN6_ARE_ADDR_EQUAL(a,b) ((((__const uint32_t *) (a))[0] == ((__const uint32_t *) (b))[0]) && (((__const uint32_t *) (a))[1] == ((__const uint32_t *) (b))[1]) && (((__const uint32_t *) (a))[2] == ((__const uint32_t *) (b))[2]) && (((__const uint32_t *) (a))[3] == ((__const uint32_t *) (b))[3])) + + + + + + + +extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) throw (); + + +extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in) + throw (); + + + +#define IN6_IS_ADDR_MC_NODELOCAL(a) (IN6_IS_ADDR_MULTICAST(a) && ((((__const uint8_t *) (a))[1] & 0xf) == 0x1)) + + + +#define IN6_IS_ADDR_MC_LINKLOCAL(a) (IN6_IS_ADDR_MULTICAST(a) && ((((__const uint8_t *) (a))[1] & 0xf) == 0x2)) + + + +#define IN6_IS_ADDR_MC_SITELOCAL(a) (IN6_IS_ADDR_MULTICAST(a) && ((((__const uint8_t *) (a))[1] & 0xf) == 0x5)) + + + +#define IN6_IS_ADDR_MC_ORGLOCAL(a) (IN6_IS_ADDR_MULTICAST(a) && ((((__const uint8_t *) (a))[1] & 0xf) == 0x8)) + + + +#define IN6_IS_ADDR_MC_GLOBAL(a) (IN6_IS_ADDR_MULTICAST(a) && ((((__const uint8_t *) (a))[1] & 0xf) == 0xe)) + + + + + + +struct in6_pktinfo + { + struct in6_addr ipi6_addr; + unsigned int ipi6_ifindex; + }; + + +struct ip6_mtuinfo + { + struct sockaddr_in6 ip6m_addr; + uint32_t ip6m_mtu; + }; + + + +extern int inet6_option_space (int __nbytes) + throw () __attribute__ ((__deprecated__)); +extern int inet6_option_init (void *__bp, struct cmsghdr **__cmsgp, + int __type) throw () __attribute__ ((__deprecated__)); +extern int inet6_option_append (struct cmsghdr *__cmsg, + __const uint8_t *__typep, int __multx, + int __plusy) throw () __attribute__ ((__deprecated__)); +extern uint8_t *inet6_option_alloc (struct cmsghdr *__cmsg, int __datalen, + int __multx, int __plusy) + throw () __attribute__ ((__deprecated__)); +extern int inet6_option_next (__const struct cmsghdr *__cmsg, + uint8_t **__tptrp) + throw () __attribute__ ((__deprecated__)); +extern int inet6_option_find (__const struct cmsghdr *__cmsg, + uint8_t **__tptrp, int __type) + throw () __attribute__ ((__deprecated__)); + + + +extern int inet6_opt_init (void *__extbuf, socklen_t __extlen) throw (); +extern int inet6_opt_append (void *__extbuf, socklen_t __extlen, int __offset, + uint8_t __type, socklen_t __len, uint8_t __align, + void **__databufp) throw (); +extern int inet6_opt_finish (void *__extbuf, socklen_t __extlen, int __offset) + throw (); +extern int inet6_opt_set_val (void *__databuf, int __offset, void *__val, + socklen_t __vallen) throw (); +extern int inet6_opt_next (void *__extbuf, socklen_t __extlen, int __offset, + uint8_t *__typep, socklen_t *__lenp, + void **__databufp) throw (); +extern int inet6_opt_find (void *__extbuf, socklen_t __extlen, int __offset, + uint8_t __type, socklen_t *__lenp, + void **__databufp) throw (); +extern int inet6_opt_get_val (void *__databuf, int __offset, void *__val, + socklen_t __vallen) throw (); + + + +extern socklen_t inet6_rth_space (int __type, int __segments) throw (); +extern void *inet6_rth_init (void *__bp, socklen_t __bp_len, int __type, + int __segments) throw (); +extern int inet6_rth_add (void *__bp, __const struct in6_addr *__addr) throw (); +extern int inet6_rth_reverse (__const void *__in, void *__out) throw (); +extern int inet6_rth_segments (__const void *__bp) throw (); +extern struct in6_addr *inet6_rth_getaddr (__const void *__bp, int __index) + throw (); + + + + + +extern int getipv4sourcefilter (int __s, struct in_addr __interface_addr, + struct in_addr __group, uint32_t *__fmode, + uint32_t *__numsrc, struct in_addr *__slist) + throw (); + + +extern int setipv4sourcefilter (int __s, struct in_addr __interface_addr, + struct in_addr __group, uint32_t __fmode, + uint32_t __numsrc, + __const struct in_addr *__slist) + throw (); + + + +extern int getsourcefilter (int __s, uint32_t __interface_addr, + __const struct sockaddr *__group, + socklen_t __grouplen, uint32_t *__fmode, + uint32_t *__numsrc, + struct sockaddr_storage *__slist) throw (); + + +extern int setsourcefilter (int __s, uint32_t __interface_addr, + __const struct sockaddr *__group, + socklen_t __grouplen, uint32_t __fmode, + uint32_t __numsrc, + __const struct sockaddr_storage *__slist) throw (); + + +} +# 39 "../fwbuilder/InetAddr.h" 2 +# 1 "/usr/include/arpa/inet.h" 1 3 4 +# 20 "/usr/include/arpa/inet.h" 3 4 +#define _ARPA_INET_H 1 +# 31 "/usr/include/arpa/inet.h" 3 4 +extern "C" { + + + +extern in_addr_t inet_addr (__const char *__cp) throw (); + + +extern in_addr_t inet_lnaof (struct in_addr __in) throw (); + + + +extern struct in_addr inet_makeaddr (in_addr_t __net, in_addr_t __host) + throw (); + + +extern in_addr_t inet_netof (struct in_addr __in) throw (); + + + +extern in_addr_t inet_network (__const char *__cp) throw (); + + + +extern char *inet_ntoa (struct in_addr __in) throw (); + + + + +extern int inet_pton (int __af, __const char *__restrict __cp, + void *__restrict __buf) throw (); + + + + +extern __const char *inet_ntop (int __af, __const void *__restrict __cp, + char *__restrict __buf, socklen_t __len) + throw (); + + + + + + +extern int inet_aton (__const char *__cp, struct in_addr *__inp) throw (); + + + +extern char *inet_neta (in_addr_t __net, char *__buf, size_t __len) throw (); + + + + +extern char *inet_net_ntop (int __af, __const void *__cp, int __bits, + char *__buf, size_t __len) throw (); + + + + +extern int inet_net_pton (int __af, __const char *__cp, + void *__buf, size_t __len) throw (); + + + + +extern unsigned int inet_nsap_addr (__const char *__cp, + unsigned char *__buf, int __len) throw (); + + + +extern char *inet_nsap_ntoa (int __len, __const unsigned char *__cp, + char *__buf) throw (); + + +} +# 40 "../fwbuilder/InetAddr.h" 2 +# 49 "../fwbuilder/InetAddr.h" +# 1 "../fwbuilder/uint128.h" 1 +# 25 "../fwbuilder/uint128.h" +#define UINT128_20050119_H_ + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/stdexcept" 1 3 +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/stdexcept" 3 +#define _GLIBCXX_STDEXCEPT 1 + + +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/stdexcept" 3 + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 53 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/stdexcept" 3 + class logic_error : public exception + { + string _M_msg; + + public: + + explicit + logic_error(const string& __arg); + + virtual + ~logic_error() throw(); + + + + virtual const char* + what() const throw(); + }; + + + + class domain_error : public logic_error + { + public: + explicit domain_error(const string& __arg); + }; + + + class invalid_argument : public logic_error + { + public: + explicit invalid_argument(const string& __arg); + }; + + + + class length_error : public logic_error + { + public: + explicit length_error(const string& __arg); + }; + + + + class out_of_range : public logic_error + { + public: + explicit out_of_range(const string& __arg); + }; + + + + + + + class runtime_error : public exception + { + string _M_msg; + + public: + + explicit + runtime_error(const string& __arg); + + virtual + ~runtime_error() throw(); + + + + virtual const char* + what() const throw(); + }; + + + class range_error : public runtime_error + { + public: + explicit range_error(const string& __arg); + }; + + + class overflow_error : public runtime_error + { + public: + explicit overflow_error(const string& __arg); + }; + + + class underflow_error : public runtime_error + { + public: + explicit underflow_error(const string& __arg); + }; + + + +} +# 28 "../fwbuilder/uint128.h" 2 + + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/limits" 1 3 +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/limits" 3 +#define _GLIBCXX_NUMERIC_LIMITS 1 + + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/limits" 3 +# 81 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/limits" 3 +#define __glibcxx_integral_traps true +# 90 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/limits" 3 +#define __glibcxx_float_has_denorm_loss false + + +#define __glibcxx_float_traps false + + +#define __glibcxx_float_tinyness_before false + + + + + + + +#define __glibcxx_double_has_denorm_loss false + + +#define __glibcxx_double_traps false + + +#define __glibcxx_double_tinyness_before false + + + + + + + +#define __glibcxx_long_double_has_denorm_loss false + + +#define __glibcxx_long_double_traps false + + +#define __glibcxx_long_double_tinyness_before false + + + + +#define __glibcxx_signed(T) ((T)(-1) < 0) + +#define __glibcxx_min(T) (__glibcxx_signed (T) ? (T)1 << __glibcxx_digits (T) : (T)0) + + +#define __glibcxx_max(T) (__glibcxx_signed (T) ? (((((T)1 << (__glibcxx_digits (T) - 1)) - 1) << 1) + 1) : ~(T)0) + + + +#define __glibcxx_digits(T) (sizeof(T) * __CHAR_BIT__ - __glibcxx_signed (T)) + + + +#define __glibcxx_digits10(T) (__glibcxx_digits (T) * 643 / 2136) + + +#define __glibcxx_max_digits10(T) (2 + (T) * 643 / 2136) + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + + + + + enum float_round_style + { + round_indeterminate = -1, + round_toward_zero = 0, + round_to_nearest = 1, + round_toward_infinity = 2, + round_toward_neg_infinity = 3 + }; + + + + + + + + enum float_denorm_style + { + + denorm_indeterminate = -1, + + denorm_absent = 0, + + denorm_present = 1 + }; +# 190 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/limits" 3 + struct __numeric_limits_base + { + + + static const bool is_specialized = false; + + + + + static const int digits = 0; + + static const int digits10 = 0; + + + + + + + static const bool is_signed = false; + + + static const bool is_integer = false; + + + + + static const bool is_exact = false; + + + static const int radix = 0; + + + + static const int min_exponent = 0; + + + static const int min_exponent10 = 0; + + + + static const int max_exponent = 0; + + + static const int max_exponent10 = 0; + + + static const bool has_infinity = false; + + + static const bool has_quiet_NaN = false; + + + static const bool has_signaling_NaN = false; + + static const float_denorm_style has_denorm = denorm_absent; + + + static const bool has_denorm_loss = false; + + + + static const bool is_iec559 = false; + + + + static const bool is_bounded = false; + + + + + static const bool is_modulo = false; + + + static const bool traps = false; + + static const bool tinyness_before = false; + + + + static const float_round_style round_style = round_toward_zero; + }; +# 283 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/limits" 3 + template + struct numeric_limits : public __numeric_limits_base + { + + + static _Tp min() throw() { return static_cast<_Tp>(0); } + + static _Tp max() throw() { return static_cast<_Tp>(0); } + + + + + + + + static _Tp epsilon() throw() { return static_cast<_Tp>(0); } + + static _Tp round_error() throw() { return static_cast<_Tp>(0); } + + static _Tp infinity() throw() { return static_cast<_Tp>(0); } + + + + static _Tp quiet_NaN() throw() { return static_cast<_Tp>(0); } + + + static _Tp signaling_NaN() throw() { return static_cast<_Tp>(0); } + + + + static _Tp denorm_min() throw() { return static_cast<_Tp>(0); } + }; +# 334 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/limits" 3 + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static bool min() throw() + { return false; } + static bool max() throw() + { return true; } + + + + + static const int digits = 1; + static const int digits10 = 0; + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static bool epsilon() throw() + { return false; } + static bool round_error() throw() + { return false; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static bool infinity() throw() + { return false; } + static bool quiet_NaN() throw() + { return false; } + static bool signaling_NaN() throw() + { return false; } + static bool denorm_min() throw() + { return false; } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = false; + + + + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static char min() throw() + { return (((char)(-1) < 0) ? (char)1 << (sizeof(char) * 8 - ((char)(-1) < 0)) : (char)0); } + static char max() throw() + { return (((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0); } + + + + + + static const int digits = (sizeof(char) * 8 - ((char)(-1) < 0)); + static const int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = ((char)(-1) < 0); + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static char epsilon() throw() + { return 0; } + static char round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static char infinity() throw() + { return char(); } + static char quiet_NaN() throw() + { return char(); } + static char signaling_NaN() throw() + { return char(); } + static char denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static signed char min() throw() + { return -127 - 1; } + static signed char max() throw() + { return 127; } + + + + + + static const int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0)); + static const int digits10 = ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static signed char epsilon() throw() + { return 0; } + static signed char round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static signed char infinity() throw() + { return static_cast(0); } + static signed char quiet_NaN() throw() + { return static_cast(0); } + static signed char signaling_NaN() throw() + { return static_cast(0); } + static signed char denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned char min() throw() + { return 0; } + static unsigned char max() throw() + { return 127 * 2U + 1; } + + + + + + static const int digits = (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned char epsilon() throw() + { return 0; } + static unsigned char round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned char infinity() throw() + { return static_cast(0); } + static unsigned char quiet_NaN() throw() + { return static_cast(0); } + static unsigned char signaling_NaN() throw() + { return static_cast(0); } + static unsigned char denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static wchar_t min() throw() + { return (((wchar_t)(-1) < 0) ? (wchar_t)1 << (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) : (wchar_t)0); } + static wchar_t max() throw() + { return (((wchar_t)(-1) < 0) ? (((((wchar_t)1 << ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(wchar_t)0); } + + + + + + static const int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)); + static const int digits10 = ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = ((wchar_t)(-1) < 0); + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static wchar_t epsilon() throw() + { return 0; } + static wchar_t round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static wchar_t infinity() throw() + { return wchar_t(); } + static wchar_t quiet_NaN() throw() + { return wchar_t(); } + static wchar_t signaling_NaN() throw() + { return wchar_t(); } + static wchar_t denorm_min() throw() + { return wchar_t(); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; +# 744 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/limits" 3 + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static short min() throw() + { return -32767 - 1; } + static short max() throw() + { return 32767; } + + + + + + static const int digits = (sizeof(short) * 8 - ((short)(-1) < 0)); + static const int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static short epsilon() throw() + { return 0; } + static short round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static short infinity() throw() + { return short(); } + static short quiet_NaN() throw() + { return short(); } + static short signaling_NaN() throw() + { return short(); } + static short denorm_min() throw() + { return short(); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned short min() throw() + { return 0; } + static unsigned short max() throw() + { return 32767 * 2U + 1; } + + + + + + static const int digits = (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned short epsilon() throw() + { return 0; } + static unsigned short round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned short infinity() throw() + { return static_cast(0); } + static unsigned short quiet_NaN() throw() + { return static_cast(0); } + static unsigned short signaling_NaN() throw() + { return static_cast(0); } + static unsigned short denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static int min() throw() + { return -2147483647 - 1; } + static int max() throw() + { return 2147483647; } + + + + + + static const int digits = (sizeof(int) * 8 - ((int)(-1) < 0)); + static const int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static int epsilon() throw() + { return 0; } + static int round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static int infinity() throw() + { return static_cast(0); } + static int quiet_NaN() throw() + { return static_cast(0); } + static int signaling_NaN() throw() + { return static_cast(0); } + static int denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned int min() throw() + { return 0; } + static unsigned int max() throw() + { return 2147483647 * 2U + 1; } + + + + + + static const int digits = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned int epsilon() throw() + { return 0; } + static unsigned int round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned int infinity() throw() + { return static_cast(0); } + static unsigned int quiet_NaN() throw() + { return static_cast(0); } + static unsigned int signaling_NaN() throw() + { return static_cast(0); } + static unsigned int denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static long min() throw() + { return -9223372036854775807L - 1; } + static long max() throw() + { return 9223372036854775807L; } + + + + + + static const int digits = (sizeof(long) * 8 - ((long)(-1) < 0)); + static const int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static long epsilon() throw() + { return 0; } + static long round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static long infinity() throw() + { return static_cast(0); } + static long quiet_NaN() throw() + { return static_cast(0); } + static long signaling_NaN() throw() + { return static_cast(0); } + static long denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned long min() throw() + { return 0; } + static unsigned long max() throw() + { return 9223372036854775807L * 2UL + 1; } + + + + + + static const int digits = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned long epsilon() throw() + { return 0; } + static unsigned long round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned long infinity() throw() + { return static_cast(0); } + static unsigned long quiet_NaN() throw() + { return static_cast(0); } + static unsigned long signaling_NaN() throw() + { return static_cast(0); } + static unsigned long denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static long long min() throw() + { return -9223372036854775807LL - 1; } + static long long max() throw() + { return 9223372036854775807LL; } + + + + + + static const int digits = (sizeof(long long) * 8 - ((long long)(-1) < 0)); + static const int digits10 = ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static long long epsilon() throw() + { return 0; } + static long long round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static long long infinity() throw() + { return static_cast(0); } + static long long quiet_NaN() throw() + { return static_cast(0); } + static long long signaling_NaN() throw() + { return static_cast(0); } + static long long denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned long long min() throw() + { return 0; } + static unsigned long long max() throw() + { return 9223372036854775807LL * 2ULL + 1; } + + + + + + static const int digits = (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned long long epsilon() throw() + { return 0; } + static unsigned long long round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned long long infinity() throw() + { return static_cast(0); } + static unsigned long long quiet_NaN() throw() + { return static_cast(0); } + static unsigned long long signaling_NaN() throw() + { return static_cast(0); } + static unsigned long long denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static float min() throw() + { return 1.17549435082228750797e-38F; } + static float max() throw() + { return 3.40282346638528859812e+38F; } + + + + + + static const int digits = 24; + static const int digits10 = 6; + + + + + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 2; + static float epsilon() throw() + { return 1.19209289550781250000e-7F; } + static float round_error() throw() + { return 0.5F; } + + static const int min_exponent = (-125); + static const int min_exponent10 = (-37); + static const int max_exponent = 128; + static const int max_exponent10 = 38; + + static const bool has_infinity = 1; + static const bool has_quiet_NaN = 1; + static const bool has_signaling_NaN = has_quiet_NaN; + static const float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static const bool has_denorm_loss = false; + + static float infinity() throw() + { return __builtin_huge_valf (); } + static float quiet_NaN() throw() + { return __builtin_nanf (""); } + static float signaling_NaN() throw() + { return __builtin_nansf (""); } + static float denorm_min() throw() + { return 1.40129846432481707092e-45F; } + + static const bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_to_nearest; + }; + +#undef __glibcxx_float_has_denorm_loss +#undef __glibcxx_float_traps +#undef __glibcxx_float_tinyness_before + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static double min() throw() + { return ((double)2.22507385850720138309e-308L); } + static double max() throw() + { return ((double)1.79769313486231570815e+308L); } + + + + + + static const int digits = 53; + static const int digits10 = 15; + + + + + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 2; + static double epsilon() throw() + { return ((double)2.22044604925031308085e-16L); } + static double round_error() throw() + { return 0.5; } + + static const int min_exponent = (-1021); + static const int min_exponent10 = (-307); + static const int max_exponent = 1024; + static const int max_exponent10 = 308; + + static const bool has_infinity = 1; + static const bool has_quiet_NaN = 1; + static const bool has_signaling_NaN = has_quiet_NaN; + static const float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static const bool has_denorm_loss = false; + + static double infinity() throw() + { return __builtin_huge_val(); } + static double quiet_NaN() throw() + { return __builtin_nan (""); } + static double signaling_NaN() throw() + { return __builtin_nans (""); } + static double denorm_min() throw() + { return ((double)4.94065645841246544177e-324L); } + + static const bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_to_nearest; + }; + +#undef __glibcxx_double_has_denorm_loss +#undef __glibcxx_double_traps +#undef __glibcxx_double_tinyness_before + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static long double min() throw() + { return 3.36210314311209350626e-4932L; } + static long double max() throw() + { return 1.18973149535723176502e+4932L; } + + + + + + static const int digits = 64; + static const int digits10 = 18; + + + + + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 2; + static long double epsilon() throw() + { return 1.08420217248550443401e-19L; } + static long double round_error() throw() + { return 0.5L; } + + static const int min_exponent = (-16381); + static const int min_exponent10 = (-4931); + static const int max_exponent = 16384; + static const int max_exponent10 = 4932; + + static const bool has_infinity = 1; + static const bool has_quiet_NaN = 1; + static const bool has_signaling_NaN = has_quiet_NaN; + static const float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static const bool has_denorm_loss + = false; + + static long double infinity() throw() + { return __builtin_huge_vall (); } + static long double quiet_NaN() throw() + { return __builtin_nanl (""); } + static long double signaling_NaN() throw() + { return __builtin_nansl (""); } + static long double denorm_min() throw() + { return 3.64519953188247460253e-4951L; } + + static const bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_to_nearest; + }; + +#undef __glibcxx_long_double_has_denorm_loss +#undef __glibcxx_long_double_traps +#undef __glibcxx_long_double_tinyness_before + +} + +#undef __glibcxx_signed +#undef __glibcxx_min +#undef __glibcxx_max +#undef __glibcxx_digits +#undef __glibcxx_digits10 +#undef __glibcxx_max_digits10 +# 35 "../fwbuilder/uint128.h" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include-fixed/limits.h" 1 3 4 +# 30 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include-fixed/limits.h" 3 4 +#define _GCC_LIMITS_H_ + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include-fixed/syslimits.h" 1 3 4 + + + + + +#define _GCC_NEXT_LIMITS_H +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include-fixed/limits.h" 1 3 4 +# 169 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include-fixed/limits.h" 3 4 +# 1 "/usr/include/limits.h" 1 3 4 +# 25 "/usr/include/limits.h" 3 4 +#define _LIBC_LIMITS_H_ 1 + + + + + + + +#define MB_LEN_MAX 16 +# 133 "/usr/include/limits.h" 3 4 +#define LLONG_MIN (-LLONG_MAX-1) + + +#define LLONG_MAX __LONG_LONG_MAX__ + + +#define ULLONG_MAX (LLONG_MAX * 2ULL + 1) + + + + + +# 1 "/usr/include/bits/posix1_lim.h" 1 3 4 +# 26 "/usr/include/bits/posix1_lim.h" 3 4 +#define _BITS_POSIX1_LIM_H 1 + + + + + +#define _POSIX_AIO_LISTIO_MAX 2 + + +#define _POSIX_AIO_MAX 1 + + +#define _POSIX_ARG_MAX 4096 + + + +#define _POSIX_CHILD_MAX 25 + + + + + +#define _POSIX_DELAYTIMER_MAX 32 + + + +#define _POSIX_HOST_NAME_MAX 255 + + +#define _POSIX_LINK_MAX 8 + + +#define _POSIX_LOGIN_NAME_MAX 9 + + +#define _POSIX_MAX_CANON 255 + + + +#define _POSIX_MAX_INPUT 255 + + +#define _POSIX_MQ_OPEN_MAX 8 + + +#define _POSIX_MQ_PRIO_MAX 32 + + +#define _POSIX_NAME_MAX 14 + + + +#define _POSIX_NGROUPS_MAX 8 + + + + + + +#define _POSIX_OPEN_MAX 20 + + + + + + + +#define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX + + + +#define _POSIX_PATH_MAX 256 + + +#define _POSIX_PIPE_BUF 512 + + + +#define _POSIX_RE_DUP_MAX 255 + + +#define _POSIX_RTSIG_MAX 8 + + +#define _POSIX_SEM_NSEMS_MAX 256 + + +#define _POSIX_SEM_VALUE_MAX 32767 + + +#define _POSIX_SIGQUEUE_MAX 32 + + +#define _POSIX_SSIZE_MAX 32767 + + +#define _POSIX_STREAM_MAX 8 + + +#define _POSIX_SYMLINK_MAX 255 + + + +#define _POSIX_SYMLOOP_MAX 8 + + +#define _POSIX_TIMER_MAX 32 + + +#define _POSIX_TTY_NAME_MAX 9 + + +#define _POSIX_TZNAME_MAX 6 + + + +#define _POSIX_QLIMIT 1 + + + +#define _POSIX_HIWAT _POSIX_PIPE_BUF + + +#define _POSIX_UIO_MAXIOV 16 + + + +#define _POSIX_CLOCKRES_MIN 20000000 + + + +# 1 "/usr/include/bits/local_lim.h" 1 3 4 +# 26 "/usr/include/bits/local_lim.h" 3 4 +#define __undef_NR_OPEN + + +#define __undef_LINK_MAX + + +#define __undef_OPEN_MAX + + +#define __undef_ARG_MAX + + + +# 1 "/usr/include/linux/limits.h" 1 3 4 + +#define _LINUX_LIMITS_H + +#define NR_OPEN 1024 + +#define NGROUPS_MAX 65536 +#define ARG_MAX 131072 +#define LINK_MAX 127 +#define MAX_CANON 255 +#define MAX_INPUT 255 +#define NAME_MAX 255 +#define PATH_MAX 4096 +#define PIPE_BUF 4096 +#define XATTR_NAME_MAX 255 +#define XATTR_SIZE_MAX 65536 +#define XATTR_LIST_MAX 65536 + +#define RTSIG_MAX 32 +# 40 "/usr/include/bits/local_lim.h" 2 3 4 + + + +#undef NR_OPEN +#undef __undef_NR_OPEN + + + +#undef LINK_MAX +#undef __undef_LINK_MAX + + + +#undef OPEN_MAX +#undef __undef_OPEN_MAX + + + +#undef ARG_MAX +#undef __undef_ARG_MAX + + + +#define _POSIX_THREAD_KEYS_MAX 128 + +#define PTHREAD_KEYS_MAX 1024 + + +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 + +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS + + +#define _POSIX_THREAD_THREADS_MAX 64 + +#undef PTHREAD_THREADS_MAX + + + +#define AIO_PRIO_DELTA_MAX 20 + + +#define PTHREAD_STACK_MIN 16384 + + +#define DELAYTIMER_MAX 2147483647 + + +#define TTY_NAME_MAX 32 + + +#define LOGIN_NAME_MAX 256 + + +#define HOST_NAME_MAX 64 + + +#define MQ_PRIO_MAX 32768 + + +#define SEM_VALUE_MAX (2147483647) +# 158 "/usr/include/bits/posix1_lim.h" 2 3 4 + + + +#define SSIZE_MAX LONG_MAX +# 146 "/usr/include/limits.h" 2 3 4 + + + +# 1 "/usr/include/bits/posix2_lim.h" 1 3 4 +# 24 "/usr/include/bits/posix2_lim.h" 3 4 +#define _BITS_POSIX2_LIM_H 1 + + + +#define _POSIX2_BC_BASE_MAX 99 + + +#define _POSIX2_BC_DIM_MAX 2048 + + +#define _POSIX2_BC_SCALE_MAX 99 + + +#define _POSIX2_BC_STRING_MAX 1000 + + + +#define _POSIX2_COLL_WEIGHTS_MAX 2 + + + +#define _POSIX2_EXPR_NEST_MAX 32 + + +#define _POSIX2_LINE_MAX 2048 + + + +#define _POSIX2_RE_DUP_MAX 255 + + + +#define _POSIX2_CHARCLASS_NAME_MAX 14 + + + + + + + +#define BC_BASE_MAX _POSIX2_BC_BASE_MAX + + +#define BC_DIM_MAX _POSIX2_BC_DIM_MAX + + +#define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX + + +#define BC_STRING_MAX _POSIX2_BC_STRING_MAX + + +#define COLL_WEIGHTS_MAX 255 + + +#define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX + + +#define LINE_MAX _POSIX2_LINE_MAX + + +#define CHARCLASS_NAME_MAX 2048 + + + +#define RE_DUP_MAX (0x7fff) +# 150 "/usr/include/limits.h" 2 3 4 + + + +# 1 "/usr/include/bits/xopen_lim.h" 1 3 4 +# 31 "/usr/include/bits/xopen_lim.h" 3 4 +#define _XOPEN_LIM_H 1 + +#define __need_IOV_MAX +# 1 "/usr/include/bits/stdio_lim.h" 1 3 4 +# 24 "/usr/include/bits/stdio_lim.h" 3 4 +#define L_tmpnam 20 +#define TMP_MAX 238328 +#define FILENAME_MAX 4096 + + +#define L_ctermid 9 + +#define L_cuserid 9 + + + + + +#undef FOPEN_MAX +#define FOPEN_MAX 16 + + + +#define IOV_MAX 1024 +# 35 "/usr/include/bits/xopen_lim.h" 2 3 4 +# 66 "/usr/include/bits/xopen_lim.h" 3 4 +#define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV + + + + +#define NL_ARGMAX _POSIX_ARG_MAX + + +#define NL_LANGMAX _POSIX2_LINE_MAX + + +#define NL_MSGMAX INT_MAX + + + +#define NL_NMAX INT_MAX + + +#define NL_SETMAX INT_MAX + + +#define NL_TEXTMAX INT_MAX + + +#define NZERO 20 +# 110 "/usr/include/bits/xopen_lim.h" 3 4 +#define WORD_BIT 32 +# 133 "/usr/include/bits/xopen_lim.h" 3 4 +#define LONG_BIT 64 +# 154 "/usr/include/limits.h" 2 3 4 +# 170 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include-fixed/limits.h" 2 3 4 +# 8 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include-fixed/syslimits.h" 2 3 4 +#undef _GCC_NEXT_LIMITS_H +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include-fixed/limits.h" 2 3 4 +# 61 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include-fixed/limits.h" 3 4 +#define _LIMITS_H___ + + +#undef CHAR_BIT +#define CHAR_BIT __CHAR_BIT__ + + + + + + + +#undef SCHAR_MIN +#define SCHAR_MIN (-SCHAR_MAX - 1) +#undef SCHAR_MAX +#define SCHAR_MAX __SCHAR_MAX__ + + +#undef UCHAR_MAX + + + +#define UCHAR_MAX (SCHAR_MAX * 2 + 1) +# 97 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include-fixed/limits.h" 3 4 +#undef CHAR_MIN +#define CHAR_MIN SCHAR_MIN +#undef CHAR_MAX +#define CHAR_MAX SCHAR_MAX + + + +#undef SHRT_MIN +#define SHRT_MIN (-SHRT_MAX - 1) +#undef SHRT_MAX +#define SHRT_MAX __SHRT_MAX__ + + +#undef USHRT_MAX + + + +#define USHRT_MAX (SHRT_MAX * 2 + 1) + + + +#undef INT_MIN +#define INT_MIN (-INT_MAX - 1) +#undef INT_MAX +#define INT_MAX __INT_MAX__ + + +#undef UINT_MAX +#define UINT_MAX (INT_MAX * 2U + 1U) + + + +#undef LONG_MIN +#define LONG_MIN (-LONG_MAX - 1L) +#undef LONG_MAX +#define LONG_MAX __LONG_MAX__ + + +#undef ULONG_MAX +#define ULONG_MAX (LONG_MAX * 2UL + 1UL) +# 152 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include-fixed/limits.h" 3 4 +#undef LONG_LONG_MIN +#define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL) +#undef LONG_LONG_MAX +#define LONG_LONG_MAX __LONG_LONG_MAX__ + + +#undef ULONG_LONG_MAX +#define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1ULL) +# 36 "../fwbuilder/uint128.h" 2 + + + +#define __STDC_FORMAT_MACROS + + + +#define U128_C(s) uint128(#s) + +class uint128 +{ +public: + typedef uint64_t base_type; + typedef uint128 Self; + +public: + static const int size = (sizeof(base_type) + sizeof(base_type)) * 8; + +private: + base_type lo; + base_type hi; + +public: + uint128(base_type _lo, base_type _hi) : lo(_lo), hi(_hi) {} + + + uint128() : lo(0), hi(0) {} + uint128(int value) : lo(static_cast(value)), hi(0) + { + if (value < 0) hi = static_cast(-1); + } + uint128(unsigned int value) : lo(static_cast(value)), hi(0) {} + uint128(float value) : lo(static_cast(value)), hi(0) {} + uint128(double value) : lo(static_cast(value)), hi(0) {} + uint128(const Self &value) : lo(value.lo), hi (value.hi) {} + uint128(base_type value) : lo(value), hi(0) {} + uint128(const uint32_t value[4]): lo((uint64_t(value[2])<<32)|value[3]),hi((uint64_t(value[0])<<32)|value[1]) {} + + uint128(const std::string &sz) : lo(0), hi(0) + { + + + if (!sz.empty()) + { + + + int radix = 10; + bool minus = false; + + std::string::const_iterator i = sz.begin(); + + + + if (*i == '-') + { + ++i; + minus = true; + } + + + if (i != sz.end()) + { + if (*i == '0') + { + radix = 8; + ++i; + if (i != sz.end()) + { + if (*i == 'x') + { + radix = 16; + ++i; + } + } + } + + while (i != sz.end()) + { + unsigned int n; + const char ch = *i; + + if (ch >= 'A' && ch <= 'Z') + { + if (((ch - 'A') + 10) < radix) + { + n = (ch - 'A') + 10; + } + else + { + break; + } + } + else if (ch >= 'a' && ch <= 'z') + { + if (((ch - 'a') + 10) < radix) + { + n = (ch - 'a') + 10; + } + else + { + break; + } + } + else if (ch >= '0' && ch <= '9') + { + if ((ch - '0') < radix) + { + n = (ch - '0'); + } + else + { + break; + } + } + else + { + + break; + } + + (*this) *= radix; + (*this) += n; + + ++i; + } + } + + + if (minus) + { + *this = -*this; + } + } + } + + Self &operator=(const Self &other) + { + if (&other != this) + { + lo = other.lo; + hi = other.hi; + } + return *this; + } + +public: + + bool operator==(const Self &o) const + { + return hi == o.hi && lo == o.lo; + } + + bool operator!=(const Self &o) const + { + return hi != o.hi || lo != o.lo; + } + + bool operator<(const Self &o) const + { + return (hi == o.hi) ? lo < o.lo : hi < o.hi; + } + + bool operator>(const Self &o) const + { + return (hi == o.hi) ? lo > o.lo : hi > o.hi; + } + + bool operator<=(const Self &o) const + { + return *this < o || *this == 0; + } + + bool operator>=(const Self &o) const + { + return *this > o || *this == 0; + } + +public: + + bool operator!() const + { + return !(hi != 0 || lo != 0); + } + + Self operator-() const + { + + return ~Self(*this) + 1; + } + + Self operator~() const + { + Self t(*this); + t.lo = ~t.lo; + t.hi = ~t.hi; + return t; + } + + Self &operator++() + { + if (++lo == 0) + { + ++hi; + } + return *this; + } + + Self &operator--() + { + if (lo-- == 0) + { + --hi; + } + return *this; + } + +public: + + Self &operator+=(const Self &b) + { + const base_type old_lo = lo; + + lo += b.lo; + hi += b.hi; + + if (lo < old_lo) + { + ++hi; + } + + return *this; + } + + Self &operator-=(const Self &b) + { + + + return *this += -b; + } + + Self &operator*=(const Self &b) + { + + + + if (b == 0) + { + hi = 0; + lo = 0; + } + else if (b != 1) + { + + + + Self a(*this); + Self t = b; + + lo = 0; + hi = 0; + + for (int i = 0; i < size; ++i) + { + if ((t & 1) != 0) + { + *this += (a << i); + } + + t >>= 1; + } + } + + return *this; + } + + Self &operator|=(const Self &b) + { + hi |= b.hi; + lo |= b.lo; + return *this; + } + + Self &operator&=(const Self &b) + { + hi &= b.hi; + lo &= b.lo; + return *this; + } + + Self &operator^=(const Self &b) + { + hi ^= b.hi; + lo ^= b.lo; + return *this; + } + + Self &operator/=(const Self &b) + { + Self remainder; + __do_div(*this, b, *this, remainder); + return *this; + } + + Self &operator%=(const Self &b) + { + Self quotient; + __do_div(*this, b, quotient, *this); + return *this; + } + + Self &operator<<=(const Self& rhs) + { + + int n = rhs.to_integer(); + + if (n >= size) + { + hi = 0; + lo = 0; + } + else + { + const int halfsize = size / 2; + + if (n >= halfsize) + { + n -= halfsize; + hi = lo; + lo = 0; + } + + if (n != 0) + { + + hi <<= n; + + const base_type mask(~(base_type(-1) >> n)); + + + hi |= (lo & mask) >> (halfsize - n); + + + lo <<= n; + } + } + + return *this; + } + + Self &operator>>=(const Self& rhs) + { + + int n = rhs.to_integer(); + + if (n >= size) + { + hi = 0; + lo = 0; + } + else + { + const int halfsize = size / 2; + + if (n >= halfsize) + { + n -= halfsize; + lo = hi; + hi = 0; + } + + if (n != 0) + { + + lo >>= n; + + + const base_type mask(~(base_type(-1) << n)); + + + lo |= (hi & mask) << (halfsize - n); + + + hi >>= n; + } + } + + return *this; + } + + Self operator+(const int &u) + { + Self temp(*this); + temp += u; + return temp; + } + + Self operator&(const int &u) + { + Self temp(*this); + temp &= u; + return temp; + } + + Self operator<<(const int &u) + { + Self temp(*this); + temp <<= u; + return temp; + } + + Self operator>>(const int &u) + { + Self temp(*this); + temp >>= u; + return temp; + } + + +public: + int to_integer() const + { + return static_cast(lo); + } + + base_type to_base_type() const + { + return lo; + } + + std::string to_string() const + { + char buf[33]; + if (hi) + sprintf(buf, "%"PRIX64"%08"PRIX64, (unsigned long long)hi,(unsigned long long)lo); + else + sprintf(buf,"%"PRIX64,(unsigned long long)lo); + return buf; + } + +private: + template + static void __do_div(const T &numerator, const T &denominator, T "ient, T &remainder) + { + + static const int bits = sizeof(T) * 8; + + if (denominator == 0) + { + throw std::domain_error("divide by zero"); + } + else + { + T n = numerator; + T d = denominator; + T x = 1; + T answer = 0; + + while ((n >= d) && (((d >> (bits - 1)) & 1) == 0)) + { + x <<= 1; + d <<= 1; + } + + while (x != 0) + { + if (n >= d) + { + n -= d; + answer |= x; + } + + x >>= 1; + d >>= 1; + } + + quotient = answer; + remainder = n; + } + } +}; + +std::ostream &operator<<(std::ostream &o, const uint128 &n); + +typedef uint128 uint128_t; + +namespace std +{ +template<> +struct numeric_limits +{ + static const bool is_specialized = true; +# 540 "../fwbuilder/uint128.h" + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + + static const int digits = 128; + static const int digits10 = 39; + static const int radix = 2; + + static uint128 epsilon() throw() + { + return 0; + } + + static uint128 round_error() throw() + { + return 0; + } + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static uint128 infinity() throw() + { + return static_cast(0); + } + + static uint128 quiet_NaN() throw() + { + return static_cast(0); + } + + static uint128 signaling_NaN() throw() + { + return static_cast(0); + } + + static uint128 denorm_min() throw() + { + return static_cast(0); + } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; +}; +}; +# 50 "../fwbuilder/InetAddr.h" 2 +# 1 "../fwbuilder/libfwbuilder-config.h" 1 + + + + + + +#define FWBUILDER_XML_VERSION "22" + + + + + +#define RES_DIR "/usr/share/fwbuilder-5.0.1.3592" +# 27 "../fwbuilder/libfwbuilder-config.h" +#define HAVE_GETOPT_H 1 +# 44 "../fwbuilder/libfwbuilder-config.h" +#define HAVE_XMLSAVEFORMATFILEENC 1 + +#define HAVE_LIBXSLT_XSLTCONFIG_H 1 + + +#define HAVE_STRTOK_R 1 + +#define WORDS_LITTLEENDIAN 1 +# 61 "../fwbuilder/libfwbuilder-config.h" +#define SNPRINTF snprintf +#define VSNPRINTF vsnprintf +#define FS_SEPARATOR "/" + + + + + + +#define FREEXMLBUFF(x) xmlFree((void*)(x)) +# 51 "../fwbuilder/InetAddr.h" 2 + + +namespace libfwbuilder +{ +# 68 "../fwbuilder/InetAddr.h" +class InetAddr +{ + protected: + + friend class InetAddrMask; + friend class Inet6AddrMask; + + int address_family; + + struct in_addr ipv4; + struct in6_addr ipv6; + + + static inline void _copy_in6_addr(struct in6_addr* da, + const struct in6_addr* sa) + { + ((uint32_t*)(da))[0] = ((uint32_t*)(sa))[0]; + ((uint32_t*)(da))[1] = ((uint32_t*)(sa))[1]; + ((uint32_t*)(da))[2] = ((uint32_t*)(sa))[2]; + ((uint32_t*)(da))[3] = ((uint32_t*)(sa))[3]; + } + + void init_from_string(const char* data); + void init_from_int(unsigned int n); + + public: + + explicit InetAddr() + { + address_family = 2; + ipv4.s_addr = 0; + ((uint32_t *) (&ipv6))[0] = 0; + ((uint32_t *) (&ipv6))[1] = 0; + ((uint32_t *) (&ipv6))[2] = 0; + ((uint32_t *) (&ipv6))[3] = 0; + } + + virtual ~InetAddr() {} + + inline unsigned int addressLengthBits() const + { + if (address_family == 2) return sizeof(ipv4) * 8; + return sizeof(ipv6) * 8; + } + + bool isValidV4Netmask(); + + void init_from_uint128(uint128 int128a); + uint128 to_uint128() const; + + InetAddr(const char *data) throw(FWException); + InetAddr(int af, const char *data) throw(FWException); + InetAddr(const struct in_addr*) throw(FWException); + InetAddr(const struct in6_addr*) throw(FWException); + explicit InetAddr(const std::string&) + throw(FWException, FWNotSupportedException); + explicit InetAddr(int af, const std::string&) + throw(FWException, FWNotSupportedException); + InetAddr(const InetAddr &); + + explicit InetAddr(int n) throw(FWException); + explicit InetAddr(int af, int n) throw(FWException); + + InetAddr& operator=(const InetAddr &addr); + + int addressFamily() const { return address_family; } + bool isV4() const { return (address_family==2); } + bool isV6() const { return (address_family==10); } + + const struct in_addr* getV4() const { return &ipv4; } + const struct in6_addr* getV6() const { return &ipv6; } + + static inline InetAddr getAny() + { + return InetAddr(); + } + + static inline InetAddr getAllOnes(int af=2) + { + if (af==2) + { + struct in_addr allones; + allones.s_addr = 0xffffffff; + return InetAddr(&allones); + } else + { + struct in6_addr a; + ((uint32_t *) (&a))[0] = 0xffffffff; + ((uint32_t *) (&a))[1] = 0xffffffff; + ((uint32_t *) (&a))[2] = 0xffffffff; + ((uint32_t *) (&a))[3] = 0xffffffff; + return InetAddr(&a); + } + } + + static inline InetAddr getLoopbackAddr(int af=2) + { + if (af==2) + { + struct in_addr loopback; + loopback.s_addr = (__extension__ ({ register unsigned int __v, __x = (((in_addr_t) 0x7f000001)); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ ("bswap %0" : "=r" (__v) : "0" (__x)); __v; })); + return InetAddr(&loopback); + } else + { + struct in6_addr a; + ((uint32_t *) (&a))[0] = 0; + ((uint32_t *) (&a))[1] = 0; + ((uint32_t *) (&a))[2] = 0; + ((uint32_t *) (&a))[3] = (__extension__ ({ register unsigned int __v, __x = (1); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ ("bswap %0" : "=r" (__v) : "0" (__x)); __v; })); + return InetAddr(&a); + } + } + + std::string toString() const; +# 191 "../fwbuilder/InetAddr.h" + inline bool isBroadcast() const + { + if (address_family==2) + return ipv4.s_addr == ((in_addr_t) 0xffffffff); + else + return ((((__const uint8_t *) (&ipv6))[0] == 0xff) && ((((__const uint8_t *) (&ipv6))[1] & 0xf) == 0x2)); + } + + + + + inline bool isMulticast() const + { + if (address_family==2) + return ((((in_addr_t)((__extension__ ({ register unsigned int __v, __x = (ipv4.s_addr); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ ("bswap %0" : "=r" (__v) : "0" (__x)); __v; })))) & 0xf0000000) == 0xe0000000); + else + return (((__const uint8_t *) (&ipv6))[0] == 0xff); + } + + + + + inline bool isAny() const + { + if (address_family==2) + return ipv4.s_addr == ((in_addr_t) 0x00000000); + else + return ((((__const uint32_t *) (&ipv6))[0] == 0 && ((__const uint32_t *) (&ipv6))[1] == 0 && ((__const uint32_t *) (&ipv6))[2] == 0 && ((__const uint32_t *) (&ipv6))[3] == 0)); + } + + + + + + + + inline unsigned int distance(const InetAddr &a2) const + { + if (address_family==2) + return (__extension__ ({ register unsigned int __v, __x = (a2.ipv4.s_addr); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ ("bswap %0" : "=r" (__v) : "0" (__x)); __v; })) - (__extension__ ({ register unsigned int __v, __x = (ipv4.s_addr); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ ("bswap %0" : "=r" (__v) : "0" (__x)); __v; })) + 1; + else + { + uint128 d1 = to_uint128(); + uint128 d2 = a2.to_uint128(); + uint128 res; + if (d1 < d2) + { + res = d2; + res -= d1; + } else + { + res = d1; + res -= d2; + } + return res.to_integer() + 1; + } + } + + + + + + int getLength() const; + + + + + inline bool isHostMask() const + { + if (address_family==2) + return ipv4.s_addr == ((in_addr_t) 0xffffffff); + else + return (((uint32_t*)(&ipv6))[0] == 0xffffffff && + ((uint32_t*)(&ipv6))[1] == 0xffffffff && + ((uint32_t*)(&ipv6))[2] == 0xffffffff && + ((uint32_t*)(&ipv6))[3] == 0xffffffff); + } + + + + InetAddr opAnd(const InetAddr &mask) const; + + InetAddr opOr(const InetAddr &mask) const; + + InetAddr opPlus(int increment) const; + + InetAddr opMinus(int decrement) const; + + bool opLT(const InetAddr &other) const; + + bool opGT(const InetAddr &other) const; + + bool opEQ(const InetAddr &other) const; + + bool opNEQ(const InetAddr &other) const; + + InetAddr opCompl() const; + + + + inline friend InetAddr operator&(const InetAddr &addr, + const InetAddr &mask) + { + ((typeid(addr) == typeid(mask)) ? static_cast (0) : __assert_fail ("typeid(addr) == typeid(mask)", "../fwbuilder/InetAddr.h", 294, __PRETTY_FUNCTION__)); + return addr.opAnd(mask); + } + + inline friend InetAddr operator|(const InetAddr &addr, + const InetAddr &mask) + { + ((typeid(addr) == typeid(mask)) ? static_cast (0) : __assert_fail ("typeid(addr) == typeid(mask)", "../fwbuilder/InetAddr.h", 301, __PRETTY_FUNCTION__)); + return addr.opOr(mask); + } + + inline friend InetAddr operator+(const InetAddr &addr, int increment) + { + return addr.opPlus(increment); + } + + inline friend InetAddr operator-(const InetAddr &addr, int decrement) + { + return addr.opMinus(decrement); + } + + inline friend bool operator<(const InetAddr &a, const InetAddr &b) + { + ((typeid(a) == typeid(b)) ? static_cast (0) : __assert_fail ("typeid(a) == typeid(b)", "../fwbuilder/InetAddr.h", 317, __PRETTY_FUNCTION__)); + return a.opLT(b); + } + + inline friend bool operator>(const InetAddr &a, const InetAddr &b) + { + ((typeid(a) == typeid(b)) ? static_cast (0) : __assert_fail ("typeid(a) == typeid(b)", "../fwbuilder/InetAddr.h", 323, __PRETTY_FUNCTION__)); + return a.opGT(b); + } + + inline friend bool operator==(const InetAddr &a, const InetAddr &b) + { + ((typeid(a) == typeid(b)) ? static_cast (0) : __assert_fail ("typeid(a) == typeid(b)", "../fwbuilder/InetAddr.h", 329, __PRETTY_FUNCTION__)); + return a.opEQ(b); + } + + inline friend bool operator!=(const InetAddr &a, const InetAddr &b) + { + ((typeid(a) == typeid(b)) ? static_cast (0) : __assert_fail ("typeid(a) == typeid(b)", "../fwbuilder/InetAddr.h", 335, __PRETTY_FUNCTION__)); + return a.opNEQ(b); + } + + inline friend InetAddr operator~(const InetAddr &a) + { + return a.opCompl(); + } + +}; + +} +# 32 "../fwbuilder/Address.h" 2 +# 1 "../fwbuilder/InetAddrMask.h" 1 +# 36 "../fwbuilder/InetAddrMask.h" +#define __INETADDRMASK_HH_FLAG__ +# 53 "../fwbuilder/InetAddrMask.h" +namespace libfwbuilder +{ + + class InetAddrMask; + + std::vector getOverlap(const InetAddrMask &n1, + const InetAddrMask &n2); + std::vector substract(const InetAddrMask &n1, + const InetAddrMask &n2); + std::vector convertAddressRange(const InetAddr &start, + const InetAddr &end); + bool _convert_range_to_networks(const InetAddr &start, + const InetAddr &end, + std::vector &res); + +class InetAddrMask +{ + +protected: + + InetAddr* address; + InetAddr* netmask; + InetAddr* broadcast_address; + InetAddr* network_address; + InetAddr* last_host; + + explicit InetAddrMask(bool no_address); + +public: + + InetAddrMask(); + InetAddrMask(const InetAddr&, const InetAddr&); + InetAddrMask(const std::string &s) throw(FWException); + InetAddrMask(const InetAddrMask&); + virtual ~InetAddrMask(); + void setNetworkAndBroadcastAddress(); + + virtual const InetAddr* getAddressPtr() const { return address; } + virtual const InetAddr* getNetmaskPtr() const { return netmask; } + + virtual const InetAddr* getNetworkAddressPtr() const { + return network_address; } + virtual const InetAddr* getBroadcastAddressPtr() const { + return broadcast_address; } + + const InetAddr* getFirstHostPtr() const { + return network_address;} + const InetAddr* getLastHostPtr() const{ + return last_host;} + + virtual void setAddress(const InetAddr &a); + virtual void setNetmask(const InetAddr &nm); + + virtual unsigned int dimension() const; + + bool isAny(); + + InetAddrMask& operator=(const InetAddrMask &o); + bool operator<(const InetAddrMask &b); + + friend bool operator==(const InetAddrMask &a, const InetAddrMask &b); + friend bool operator<(const InetAddrMask &a, const InetAddrMask &b); + + virtual std::string toString() const + { + return address->toString()+"/"+netmask->toString(); + } + + bool belongs(const InetAddr &) const; + + + + + + + + friend std::vector getOverlap(const InetAddrMask &n1, + const InetAddrMask &n2); + + + + + + + friend std::vector substract(const InetAddrMask &n1, + const InetAddrMask &n2); + + + + + + friend std::vector convertAddressRange(const InetAddr &start, + const InetAddr &end); +}; + +} +# 33 "../fwbuilder/Address.h" 2 + +namespace libfwbuilder +{ +# 46 "../fwbuilder/Address.h" +class Address : public FWObject +{ +protected: + InetAddrMask* inet_addr_mask; + +public: + + static const char *TYPENAME; virtual std::string getTypeName() const { return TYPENAME; } static bool isA(const FWObject *o) { return o && o->getTypeName()==TYPENAME; } static Address* cast(FWObject *o) { return dynamic_cast(o); } static const Address* constcast(const FWObject *o) { return dynamic_cast(o); }; + + virtual void* dispatch(Dispatch* _d, void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, void* _a1) const {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) const {return _d->dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, void* _a1) const {return _d->const_dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, const void* _a1) const {return _d->const_dispatch(this, _a1); }; + + Address(); + Address(const Address&); + virtual ~Address(); + + + + + virtual FWObject& shallowDuplicate(const FWObject *obj, + bool preserve_id = true) + throw(FWException); + + const InetAddrMask* getInetAddrMaskObjectPtr() const; +# 77 "../fwbuilder/Address.h" + virtual bool hasInetAddress() const; + + + + + virtual int countInetAddresses(bool skip_loopback) const; +# 93 "../fwbuilder/Address.h" + virtual const InetAddr* getAddressPtr() const; + virtual const InetAddr* getNetmaskPtr() const; + + virtual const InetAddr* getNetworkAddressPtr() const; + virtual const InetAddr* getBroadcastAddressPtr() const; + + virtual void setAddress(const InetAddr &a); + virtual void setNetmask(const InetAddr &nm); + virtual void setAddressNetmask(const std::string& s); + + virtual const Address* getAddressObject() const; + virtual unsigned int dimension() const; + bool belongs(const InetAddr &) const; + + virtual FWReference* createRef(); + virtual bool cmp(const FWObject *obj, bool recursive=false) throw(FWException); + + bool isAny() const; + + virtual bool isPrimaryObject() const { return true; } +}; + +} +# 32 "Address.cpp" 2 +# 1 "../fwbuilder/Interface.h" 1 +# 28 "../fwbuilder/Interface.h" +#define __INTERFACE_HH_FLAG__ + + + + +# 1 "../fwbuilder/physAddress.h" 1 +# 28 "../fwbuilder/physAddress.h" +#define __PHYS_ADDRESS_HH_FLAG__ + + + + + +namespace libfwbuilder +{ + +class physAddress : public Address +{ + private: + + public: + + static const char *TYPENAME; virtual std::string getTypeName() const { return TYPENAME; } static bool isA(const FWObject *o) { return o && o->getTypeName()==TYPENAME; } static physAddress* cast(FWObject *o) { return dynamic_cast(o); } static const physAddress* constcast(const FWObject *o) { return dynamic_cast(o); }; + + virtual void* dispatch(Dispatch* _d, void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, void* _a1) const {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) const {return _d->dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, void* _a1) const {return _d->const_dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, const void* _a1) const {return _d->const_dispatch(this, _a1); }; + + physAddress(); + + virtual void fromXML(xmlNodePtr parent) throw(FWException); + virtual xmlNodePtr toXML(xmlNodePtr xml_parent_node) throw(FWException); + + std::string getPhysAddress() const; + void setPhysAddress(const std::string &s); + + virtual FWReference* createRef(); + + bool isAny() const; + + virtual bool isPrimaryObject() const { return false; } + +}; + +} +# 34 "../fwbuilder/Interface.h" 2 + + +# 1 "../fwbuilder/FWOptions.h" 1 +# 28 "../fwbuilder/FWOptions.h" +#define __FWOPTINS_HH_FLAG__ + + +# 1 "../fwbuilder/XMLTools.h" 1 +# 32 "../fwbuilder/XMLTools.h" +#define __XML_TOOLS_HH_FLAG__ + +# 1 "../fwbuilder/libfwbuilder-config.h" 1 + + + + + + +#define FWBUILDER_XML_VERSION "22" + + + + + +#define RES_DIR "/usr/share/fwbuilder-5.0.1.3592" +# 27 "../fwbuilder/libfwbuilder-config.h" +#define HAVE_GETOPT_H 1 +# 44 "../fwbuilder/libfwbuilder-config.h" +#define HAVE_XMLSAVEFORMATFILEENC 1 + +#define HAVE_LIBXSLT_XSLTCONFIG_H 1 + + +#define HAVE_STRTOK_R 1 + +#define WORDS_LITTLEENDIAN 1 +# 61 "../fwbuilder/libfwbuilder-config.h" +#define SNPRINTF snprintf +#define VSNPRINTF vsnprintf +#define FS_SEPARATOR "/" + + + + + + +#define FREEXMLBUFF(x) xmlFree((void*)(x)) +# 35 "../fwbuilder/XMLTools.h" 2 + +# 1 "../fwbuilder/Tools.h" 1 +# 32 "../fwbuilder/Tools.h" +#define __FW_TOOLS_HH_FLAG__ + + +#define SAME 0 + + + +#define nil NULL + + +# 1 "../../../../config.h" 1 + + +# 1 "../../../../VERSION.h" 1 +#define VERSION "5.0.1.3592" +#define GENERATION "5.0" +# 4 "../../../../config.h" 2 + +#define BUILD_NUM "3592" + + + + + + +#define RCS_FILE_NAME "/usr/bin/rcs" +#define RCSDIFF_FILE_NAME "/usr/bin/rcsdiff" +#define RLOG_FILE_NAME "/usr/bin/rlog" +#define CI_FILE_NAME "/usr/bin/ci" +#define CO_FILE_NAME "/usr/bin/co" + + + + + +#define PACKAGE "fwbuilder" + + +#define OS "Linux" +# 34 "../../../../config.h" +#define OS_LINUX "1" + + + +#define OS_UNIX 1 + + + + + + + +#define DISTRO "Unknown" + + +#define PREFIX "/usr" + +#define MANIFEST_MARKER "# files: " + + +#define HAVE_GETOPT_H 1 + + + +#define HAVE_SIGNAL 1 +#define HAVE_SIGNAL_H 1 + +#define HAVE_PTY_H 1 + + +#define HAVE_UNISTD_H 1 + + +#define HAVE_DECL_GETOPT HAVE_GETOPT_H + + +#define HAVE_STRUCT_TM_TM_ZONE 1 + + +#define HAVE_FORKPTY 1 +#define HAVE_CFMAKERAW 1 +# 89 "../../../../config.h" +#define HAVE_STRCHR 1 + + + + + +#define HAVE_CPPUNIT +# 114 "../../../../config.h" +#define SNPRINTF snprintf +#define VSNPRINTF vsnprintf +# 43 "../fwbuilder/Tools.h" 2 +# 51 "../fwbuilder/Tools.h" +# 1 "/usr/include/dirent.h" 1 3 4 +# 24 "/usr/include/dirent.h" 3 4 +#define _DIRENT_H 1 + + + +extern "C" { +# 62 "/usr/include/dirent.h" 3 4 +# 1 "/usr/include/bits/dirent.h" 1 3 4 +# 23 "/usr/include/bits/dirent.h" 3 4 +struct dirent + { + + __ino_t d_ino; + __off_t d_off; + + + + + unsigned short int d_reclen; + unsigned char d_type; + char d_name[256]; + }; + + +struct dirent64 + { + __ino64_t d_ino; + __off64_t d_off; + unsigned short int d_reclen; + unsigned char d_type; + char d_name[256]; + }; + + +#define d_fileno d_ino + +#undef _DIRENT_HAVE_D_NAMLEN +#define _DIRENT_HAVE_D_RECLEN +#define _DIRENT_HAVE_D_OFF +#define _DIRENT_HAVE_D_TYPE +# 63 "/usr/include/dirent.h" 2 3 4 +# 86 "/usr/include/dirent.h" 3 4 +#define _D_EXACT_NAMLEN(d) (strlen ((d)->d_name)) + +#define _D_ALLOC_NAMLEN(d) (((char *) (d) + (d)->d_reclen) - &(d)->d_name[0]) +# 98 "/usr/include/dirent.h" 3 4 +enum + { + DT_UNKNOWN = 0, +#define DT_UNKNOWN DT_UNKNOWN + DT_FIFO = 1, +#define DT_FIFO DT_FIFO + DT_CHR = 2, +#define DT_CHR DT_CHR + DT_DIR = 4, +#define DT_DIR DT_DIR + DT_BLK = 6, +#define DT_BLK DT_BLK + DT_REG = 8, +#define DT_REG DT_REG + DT_LNK = 10, +#define DT_LNK DT_LNK + DT_SOCK = 12, +#define DT_SOCK DT_SOCK + DT_WHT = 14 +#define DT_WHT DT_WHT + }; + + +#define IFTODT(mode) (((mode) & 0170000) >> 12) +#define DTTOIF(dirtype) ((dirtype) << 12) + + + + + +typedef struct __dirstream DIR; + + + + + + +extern DIR *opendir (__const char *__name) __attribute__ ((__nonnull__ (1))); + + + + + + +extern DIR *fdopendir (int __fd); + + + + + + + +extern int closedir (DIR *__dirp) __attribute__ ((__nonnull__ (1))); +# 163 "/usr/include/dirent.h" 3 4 +extern struct dirent *readdir (DIR *__dirp) __attribute__ ((__nonnull__ (1))); +# 174 "/usr/include/dirent.h" 3 4 +extern struct dirent64 *readdir64 (DIR *__dirp) __attribute__ ((__nonnull__ (1))); +# 184 "/usr/include/dirent.h" 3 4 +extern int readdir_r (DIR *__restrict __dirp, + struct dirent *__restrict __entry, + struct dirent **__restrict __result) + __attribute__ ((__nonnull__ (1, 2, 3))); +# 201 "/usr/include/dirent.h" 3 4 +extern int readdir64_r (DIR *__restrict __dirp, + struct dirent64 *__restrict __entry, + struct dirent64 **__restrict __result) + __attribute__ ((__nonnull__ (1, 2, 3))); + + + + +extern void rewinddir (DIR *__dirp) throw () __attribute__ ((__nonnull__ (1))); + + + + + +extern void seekdir (DIR *__dirp, long int __pos) throw () __attribute__ ((__nonnull__ (1))); + + +extern long int telldir (DIR *__dirp) throw () __attribute__ ((__nonnull__ (1))); + + + + + +extern int dirfd (DIR *__dirp) throw () __attribute__ ((__nonnull__ (1))); +# 237 "/usr/include/dirent.h" 3 4 +#define MAXNAMLEN NAME_MAX + + + + + + +#define __need_size_t +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 246 "/usr/include/dirent.h" 2 3 4 + + + + + + +extern int scandir (__const char *__restrict __dir, + struct dirent ***__restrict __namelist, + int (*__selector) (__const struct dirent *), + int (*__cmp) (__const struct dirent **, + __const struct dirent **)) + __attribute__ ((__nonnull__ (1, 2))); +# 275 "/usr/include/dirent.h" 3 4 +extern int scandir64 (__const char *__restrict __dir, + struct dirent64 ***__restrict __namelist, + int (*__selector) (__const struct dirent64 *), + int (*__cmp) (__const struct dirent64 **, + __const struct dirent64 **)) + __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int alphasort (__const struct dirent **__e1, + __const struct dirent **__e2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 300 "/usr/include/dirent.h" 3 4 +extern int alphasort64 (__const struct dirent64 **__e1, + __const struct dirent64 **__e2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 313 "/usr/include/dirent.h" 3 4 +extern __ssize_t getdirentries (int __fd, char *__restrict __buf, + size_t __nbytes, + __off_t *__restrict __basep) + throw () __attribute__ ((__nonnull__ (2, 4))); +# 330 "/usr/include/dirent.h" 3 4 +extern __ssize_t getdirentries64 (int __fd, char *__restrict __buf, + size_t __nbytes, + __off64_t *__restrict __basep) + throw () __attribute__ ((__nonnull__ (2, 4))); + + + + + + +extern int versionsort (__const struct dirent **__e1, + __const struct dirent **__e2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 356 "/usr/include/dirent.h" 3 4 +extern int versionsort64 (__const struct dirent64 **__e1, + __const struct dirent64 **__e2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + +} +# 52 "../fwbuilder/Tools.h" 2 + + + + + + +namespace libfwbuilder +{ +# 72 "../fwbuilder/Tools.h" + void init(); + + + + + int cxx_strcasecmp(const char *s1, const char *s2); + + char *cxx_strdup(const char *x); + char *cxx_strdup(const std::string &x); + + std::string int2string(int n); + + + + + + std::list getDirList(const std::string &dir, + const std::string &ext); + + + + unsigned int cxx_sleep(unsigned int seconds); + + + + + void tokenize(const std::string& str, + std::vector& tokens, + const std::string& delimiters = " "); + + + + + + std::string stringify(const std::vector& parts, + const std::string& delimiter = " "); + + + + + std::string strip(const std::string& in, const std::string& identifier); + + + std::set stringToSet(const std::string &str); + std::string setToString(const std::set &s); + +} +# 37 "../fwbuilder/XMLTools.h" 2 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/functional" 1 3 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/functional" 3 +#define _GLIBCXX_FUNCTIONAL 1 + + +# 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/functional" 3 +# 41 "../fwbuilder/XMLTools.h" 2 + + + + +# 1 "/usr/include/libxml2/libxml/parserInternals.h" 1 +# 13 "/usr/include/libxml2/libxml/parserInternals.h" +#define __XML_PARSER_INTERNALS_H__ + + + +# 1 "/usr/include/libxml2/libxml/HTMLparser.h" 1 +# 14 "/usr/include/libxml2/libxml/HTMLparser.h" +#define __HTML_PARSER_H__ + + + + + + +extern "C" { + + + + + +typedef xmlParserCtxt htmlParserCtxt; +typedef xmlParserCtxtPtr htmlParserCtxtPtr; +typedef xmlParserNodeInfo htmlParserNodeInfo; +typedef xmlSAXHandler htmlSAXHandler; +typedef xmlSAXHandlerPtr htmlSAXHandlerPtr; +typedef xmlParserInput htmlParserInput; +typedef xmlParserInputPtr htmlParserInputPtr; +typedef xmlDocPtr htmlDocPtr; +typedef xmlNodePtr htmlNodePtr; + + + + + +typedef struct _htmlElemDesc htmlElemDesc; +typedef htmlElemDesc *htmlElemDescPtr; +struct _htmlElemDesc { + const char *name; + char startTag; + char endTag; + char saveEndTag; + char empty; + char depr; + char dtd; + char isinline; + const char *desc; +# 64 "/usr/include/libxml2/libxml/HTMLparser.h" + const char** subelts; + const char* defaultsubelt; + + const char** attrs_opt; + const char** attrs_depr; + const char** attrs_req; +}; + + + + +typedef struct _htmlEntityDesc htmlEntityDesc; +typedef htmlEntityDesc *htmlEntityDescPtr; +struct _htmlEntityDesc { + unsigned int value; + const char *name; + const char *desc; +}; + + + + + const htmlElemDesc * + htmlTagLookup (const xmlChar *tag); + const htmlEntityDesc * + htmlEntityLookup(const xmlChar *name); + const htmlEntityDesc * + htmlEntityValueLookup(unsigned int value); + + int + htmlIsAutoClosed(htmlDocPtr doc, + htmlNodePtr elem); + int + htmlAutoCloseTag(htmlDocPtr doc, + const xmlChar *name, + htmlNodePtr elem); + const htmlEntityDesc * + htmlParseEntityRef(htmlParserCtxtPtr ctxt, + const xmlChar **str); + int + htmlParseCharRef(htmlParserCtxtPtr ctxt); + void + htmlParseElement(htmlParserCtxtPtr ctxt); + + htmlParserCtxtPtr + htmlNewParserCtxt(void); + + htmlParserCtxtPtr + htmlCreateMemoryParserCtxt(const char *buffer, + int size); + + int + htmlParseDocument(htmlParserCtxtPtr ctxt); + htmlDocPtr + htmlSAXParseDoc (xmlChar *cur, + const char *encoding, + htmlSAXHandlerPtr sax, + void *userData); + htmlDocPtr + htmlParseDoc (xmlChar *cur, + const char *encoding); + htmlDocPtr + htmlSAXParseFile(const char *filename, + const char *encoding, + htmlSAXHandlerPtr sax, + void *userData); + htmlDocPtr + htmlParseFile (const char *filename, + const char *encoding); + int + UTF8ToHtml (unsigned char *out, + int *outlen, + const unsigned char *in, + int *inlen); + int + htmlEncodeEntities(unsigned char *out, + int *outlen, + const unsigned char *in, + int *inlen, int quoteChar); + int + htmlIsScriptAttribute(const xmlChar *name); + int + htmlHandleOmittedElem(int val); + + + + + + htmlParserCtxtPtr + htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax, + void *user_data, + const char *chunk, + int size, + const char *filename, + xmlCharEncoding enc); + int + htmlParseChunk (htmlParserCtxtPtr ctxt, + const char *chunk, + int size, + int terminate); + + + void + htmlFreeParserCtxt (htmlParserCtxtPtr ctxt); +# 178 "/usr/include/libxml2/libxml/HTMLparser.h" +typedef enum { + HTML_PARSE_RECOVER = 1<<0, + HTML_PARSE_NODEFDTD = 1<<2, + HTML_PARSE_NOERROR = 1<<5, + HTML_PARSE_NOWARNING= 1<<6, + HTML_PARSE_PEDANTIC = 1<<7, + HTML_PARSE_NOBLANKS = 1<<8, + HTML_PARSE_NONET = 1<<11, + HTML_PARSE_NOIMPLIED= 1<<13, + HTML_PARSE_COMPACT = 1<<16 +} htmlParserOption; + + void + htmlCtxtReset (htmlParserCtxtPtr ctxt); + int + htmlCtxtUseOptions (htmlParserCtxtPtr ctxt, + int options); + htmlDocPtr + htmlReadDoc (const xmlChar *cur, + const char *URL, + const char *encoding, + int options); + htmlDocPtr + htmlReadFile (const char *URL, + const char *encoding, + int options); + htmlDocPtr + htmlReadMemory (const char *buffer, + int size, + const char *URL, + const char *encoding, + int options); + htmlDocPtr + htmlReadFd (int fd, + const char *URL, + const char *encoding, + int options); + htmlDocPtr + htmlReadIO (xmlInputReadCallback ioread, + xmlInputCloseCallback ioclose, + void *ioctx, + const char *URL, + const char *encoding, + int options); + htmlDocPtr + htmlCtxtReadDoc (xmlParserCtxtPtr ctxt, + const xmlChar *cur, + const char *URL, + const char *encoding, + int options); + htmlDocPtr + htmlCtxtReadFile (xmlParserCtxtPtr ctxt, + const char *filename, + const char *encoding, + int options); + htmlDocPtr + htmlCtxtReadMemory (xmlParserCtxtPtr ctxt, + const char *buffer, + int size, + const char *URL, + const char *encoding, + int options); + htmlDocPtr + htmlCtxtReadFd (xmlParserCtxtPtr ctxt, + int fd, + const char *URL, + const char *encoding, + int options); + htmlDocPtr + htmlCtxtReadIO (xmlParserCtxtPtr ctxt, + xmlInputReadCallback ioread, + xmlInputCloseCallback ioclose, + void *ioctx, + const char *URL, + const char *encoding, + int options); + + + +typedef enum { + HTML_NA = 0 , + HTML_INVALID = 0x1 , + HTML_DEPRECATED = 0x2 , + HTML_VALID = 0x4 , + HTML_REQUIRED = 0xc +} htmlStatus ; + + + + + htmlStatus htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ; + int htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ; + htmlStatus htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ; + htmlStatus htmlNodeStatus(const htmlNodePtr, int) ; + + + + + + +#define htmlDefaultSubelement(elt) elt->defaultsubelt +# 289 "/usr/include/libxml2/libxml/HTMLparser.h" +#define htmlElementAllowedHereDesc(parent,elt) htmlElementAllowedHere((parent), (elt)->name) + + + + + + + +#define htmlRequiredAttrs(elt) (elt)->attrs_req + + + +} +# 18 "/usr/include/libxml2/libxml/parserInternals.h" 2 +# 1 "/usr/include/libxml2/libxml/chvalid.h" 1 +# 15 "/usr/include/libxml2/libxml/chvalid.h" +#define __XML_CHVALID_H__ + + + + + +extern "C" { + + + + + + +typedef struct _xmlChSRange xmlChSRange; +typedef xmlChSRange *xmlChSRangePtr; +struct _xmlChSRange { + unsigned short low; + unsigned short high; +}; + +typedef struct _xmlChLRange xmlChLRange; +typedef xmlChLRange *xmlChLRangePtr; +struct _xmlChLRange { + unsigned int low; + unsigned int high; +}; + +typedef struct _xmlChRangeGroup xmlChRangeGroup; +typedef xmlChRangeGroup *xmlChRangeGroupPtr; +struct _xmlChRangeGroup { + int nbShortRange; + int nbLongRange; + const xmlChSRange *shortRange; + const xmlChLRange *longRange; +}; + + + + + int + xmlCharInRange(unsigned int val, const xmlChRangeGroup *group); +# 64 "/usr/include/libxml2/libxml/chvalid.h" +#define xmlIsBaseChar_ch(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || ((0x61 <= (c)) && ((c) <= 0x7a)) || ((0xc0 <= (c)) && ((c) <= 0xd6)) || ((0xd8 <= (c)) && ((c) <= 0xf6)) || (0xf8 <= (c))) +# 76 "/usr/include/libxml2/libxml/chvalid.h" +#define xmlIsBaseCharQ(c) (((c) < 0x100) ? xmlIsBaseChar_ch((c)) : xmlCharInRange((c), &xmlIsBaseCharGroup)) + + + +extern const xmlChRangeGroup xmlIsBaseCharGroup; + + + + + + + +#define xmlIsBlank_ch(c) (((c) == 0x20) || ((0x9 <= (c)) && ((c) <= 0xa)) || ((c) == 0xd)) +# 98 "/usr/include/libxml2/libxml/chvalid.h" +#define xmlIsBlankQ(c) (((c) < 0x100) ? xmlIsBlank_ch((c)) : 0) +# 108 "/usr/include/libxml2/libxml/chvalid.h" +#define xmlIsChar_ch(c) (((0x9 <= (c)) && ((c) <= 0xa)) || ((c) == 0xd) || (0x20 <= (c))) +# 118 "/usr/include/libxml2/libxml/chvalid.h" +#define xmlIsCharQ(c) (((c) < 0x100) ? xmlIsChar_ch((c)) : (((0x100 <= (c)) && ((c) <= 0xd7ff)) || ((0xe000 <= (c)) && ((c) <= 0xfffd)) || ((0x10000 <= (c)) && ((c) <= 0x10ffff)))) + + + + + +extern const xmlChRangeGroup xmlIsCharGroup; + + + + + + + +#define xmlIsCombiningQ(c) (((c) < 0x100) ? 0 : xmlCharInRange((c), &xmlIsCombiningGroup)) + + + +extern const xmlChRangeGroup xmlIsCombiningGroup; + + + + + + + +#define xmlIsDigit_ch(c) (((0x30 <= (c)) && ((c) <= 0x39))) + + + + + + + +#define xmlIsDigitQ(c) (((c) < 0x100) ? xmlIsDigit_ch((c)) : xmlCharInRange((c), &xmlIsDigitGroup)) + + + +extern const xmlChRangeGroup xmlIsDigitGroup; + + + + + + + +#define xmlIsExtender_ch(c) (((c) == 0xb7)) + + + + + + + +#define xmlIsExtenderQ(c) (((c) < 0x100) ? xmlIsExtender_ch((c)) : xmlCharInRange((c), &xmlIsExtenderGroup)) + + + +extern const xmlChRangeGroup xmlIsExtenderGroup; + + + + + + + +#define xmlIsIdeographicQ(c) (((c) < 0x100) ? 0 : (((0x4e00 <= (c)) && ((c) <= 0x9fa5)) || ((c) == 0x3007) || ((0x3021 <= (c)) && ((c) <= 0x3029)))) + + + + + +extern const xmlChRangeGroup xmlIsIdeographicGroup; +extern const unsigned char xmlIsPubidChar_tab[256]; + + + + + + + +#define xmlIsPubidChar_ch(c) (xmlIsPubidChar_tab[(c)]) + + + + + + + +#define xmlIsPubidCharQ(c) (((c) < 0x100) ? xmlIsPubidChar_ch((c)) : 0) + + + int + xmlIsBaseChar(unsigned int ch); + int + xmlIsBlank(unsigned int ch); + int + xmlIsChar(unsigned int ch); + int + xmlIsCombining(unsigned int ch); + int + xmlIsDigit(unsigned int ch); + int + xmlIsExtender(unsigned int ch); + int + xmlIsIdeographic(unsigned int ch); + int + xmlIsPubidChar(unsigned int ch); + + +} +# 19 "/usr/include/libxml2/libxml/parserInternals.h" 2 + + +extern "C" { +# 31 "/usr/include/libxml2/libxml/parserInternals.h" +extern unsigned int xmlParserMaxDepth; +# 40 "/usr/include/libxml2/libxml/parserInternals.h" +#define XML_MAX_TEXT_LENGTH 10000000 + + + + + + + +#define XML_MAX_NAMELEN 100 + + + + + + + +#define INPUT_CHUNK 250 +# 72 "/usr/include/libxml2/libxml/parserInternals.h" +#define IS_BYTE_CHAR(c) xmlIsChar_ch(c) +# 84 "/usr/include/libxml2/libxml/parserInternals.h" +#define IS_CHAR(c) xmlIsCharQ(c) + + + + + + + +#define IS_CHAR_CH(c) xmlIsChar_ch(c) +# 102 "/usr/include/libxml2/libxml/parserInternals.h" +#define IS_BLANK(c) xmlIsBlankQ(c) + + + + + + + +#define IS_BLANK_CH(c) xmlIsBlank_ch(c) +# 120 "/usr/include/libxml2/libxml/parserInternals.h" +#define IS_BASECHAR(c) xmlIsBaseCharQ(c) +# 130 "/usr/include/libxml2/libxml/parserInternals.h" +#define IS_DIGIT(c) xmlIsDigitQ(c) + + + + + + + +#define IS_DIGIT_CH(c) xmlIsDigit_ch(c) +# 148 "/usr/include/libxml2/libxml/parserInternals.h" +#define IS_COMBINING(c) xmlIsCombiningQ(c) + + + + + + + +#define IS_COMBINING_CH(c) 0 +# 169 "/usr/include/libxml2/libxml/parserInternals.h" +#define IS_EXTENDER(c) xmlIsExtenderQ(c) + + + + + + + +#define IS_EXTENDER_CH(c) xmlIsExtender_ch(c) +# 188 "/usr/include/libxml2/libxml/parserInternals.h" +#define IS_IDEOGRAPHIC(c) xmlIsIdeographicQ(c) +# 199 "/usr/include/libxml2/libxml/parserInternals.h" +#define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c)) +# 208 "/usr/include/libxml2/libxml/parserInternals.h" +#define IS_LETTER_CH(c) xmlIsBaseChar_ch(c) +# 217 "/usr/include/libxml2/libxml/parserInternals.h" +#define IS_ASCII_LETTER(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || ((0x61 <= (c)) && ((c) <= 0x7a))) +# 227 "/usr/include/libxml2/libxml/parserInternals.h" +#define IS_ASCII_DIGIT(c) ((0x30 <= (c)) && ((c) <= 0x39)) +# 238 "/usr/include/libxml2/libxml/parserInternals.h" +#define IS_PUBIDCHAR(c) xmlIsPubidCharQ(c) + + + + + + + +#define IS_PUBIDCHAR_CH(c) xmlIsPubidChar_ch(c) + + + + + + + +#define SKIP_EOL(p) if (*(p) == 0x13) { p++ ; if (*(p) == 0x10) p++; } if (*(p) == 0x10) { p++ ; if (*(p) == 0x13) p++; } +# 264 "/usr/include/libxml2/libxml/parserInternals.h" +#define MOVETO_ENDTAG(p) while ((*p) && (*(p) != '>')) (p)++ +# 273 "/usr/include/libxml2/libxml/parserInternals.h" +#define MOVETO_STARTTAG(p) while ((*p) && (*(p) != '<')) (p)++ + + + + + +extern const xmlChar xmlStringText[]; +extern const xmlChar xmlStringTextNoenc[]; +extern const xmlChar xmlStringComment[]; + + + + + int xmlIsLetter (int c); + + + + + xmlParserCtxtPtr + xmlCreateFileParserCtxt (const char *filename); + xmlParserCtxtPtr + xmlCreateURLParserCtxt (const char *filename, + int options); + xmlParserCtxtPtr + xmlCreateMemoryParserCtxt(const char *buffer, + int size); + xmlParserCtxtPtr + xmlCreateEntityParserCtxt(const xmlChar *URL, + const xmlChar *ID, + const xmlChar *base); + int + xmlSwitchEncoding (xmlParserCtxtPtr ctxt, + xmlCharEncoding enc); + int + xmlSwitchToEncoding (xmlParserCtxtPtr ctxt, + xmlCharEncodingHandlerPtr handler); + int + xmlSwitchInputEncoding (xmlParserCtxtPtr ctxt, + xmlParserInputPtr input, + xmlCharEncodingHandlerPtr handler); +# 327 "/usr/include/libxml2/libxml/parserInternals.h" + xmlParserInputPtr + xmlNewStringInputStream (xmlParserCtxtPtr ctxt, + const xmlChar *buffer); + xmlParserInputPtr + xmlNewEntityInputStream (xmlParserCtxtPtr ctxt, + xmlEntityPtr entity); + int + xmlPushInput (xmlParserCtxtPtr ctxt, + xmlParserInputPtr input); + xmlChar + xmlPopInput (xmlParserCtxtPtr ctxt); + void + xmlFreeInputStream (xmlParserInputPtr input); + xmlParserInputPtr + xmlNewInputFromFile (xmlParserCtxtPtr ctxt, + const char *filename); + xmlParserInputPtr + xmlNewInputStream (xmlParserCtxtPtr ctxt); + + + + + xmlChar * + xmlSplitQName (xmlParserCtxtPtr ctxt, + const xmlChar *name, + xmlChar **prefix); + + + + + const xmlChar * + xmlParseName (xmlParserCtxtPtr ctxt); + xmlChar * + xmlParseNmtoken (xmlParserCtxtPtr ctxt); + xmlChar * + xmlParseEntityValue (xmlParserCtxtPtr ctxt, + xmlChar **orig); + xmlChar * + xmlParseAttValue (xmlParserCtxtPtr ctxt); + xmlChar * + xmlParseSystemLiteral (xmlParserCtxtPtr ctxt); + xmlChar * + xmlParsePubidLiteral (xmlParserCtxtPtr ctxt); + void + xmlParseCharData (xmlParserCtxtPtr ctxt, + int cdata); + xmlChar * + xmlParseExternalID (xmlParserCtxtPtr ctxt, + xmlChar **publicID, + int strict); + void + xmlParseComment (xmlParserCtxtPtr ctxt); + const xmlChar * + xmlParsePITarget (xmlParserCtxtPtr ctxt); + void + xmlParsePI (xmlParserCtxtPtr ctxt); + void + xmlParseNotationDecl (xmlParserCtxtPtr ctxt); + void + xmlParseEntityDecl (xmlParserCtxtPtr ctxt); + int + xmlParseDefaultDecl (xmlParserCtxtPtr ctxt, + xmlChar **value); + xmlEnumerationPtr + xmlParseNotationType (xmlParserCtxtPtr ctxt); + xmlEnumerationPtr + xmlParseEnumerationType (xmlParserCtxtPtr ctxt); + int + xmlParseEnumeratedType (xmlParserCtxtPtr ctxt, + xmlEnumerationPtr *tree); + int + xmlParseAttributeType (xmlParserCtxtPtr ctxt, + xmlEnumerationPtr *tree); + void + xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt); + xmlElementContentPtr + xmlParseElementMixedContentDecl + (xmlParserCtxtPtr ctxt, + int inputchk); + xmlElementContentPtr + xmlParseElementChildrenContentDecl + (xmlParserCtxtPtr ctxt, + int inputchk); + int + xmlParseElementContentDecl(xmlParserCtxtPtr ctxt, + const xmlChar *name, + xmlElementContentPtr *result); + int + xmlParseElementDecl (xmlParserCtxtPtr ctxt); + void + xmlParseMarkupDecl (xmlParserCtxtPtr ctxt); + int + xmlParseCharRef (xmlParserCtxtPtr ctxt); + xmlEntityPtr + xmlParseEntityRef (xmlParserCtxtPtr ctxt); + void + xmlParseReference (xmlParserCtxtPtr ctxt); + void + xmlParsePEReference (xmlParserCtxtPtr ctxt); + void + xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt); + + const xmlChar * + xmlParseAttribute (xmlParserCtxtPtr ctxt, + xmlChar **value); + const xmlChar * + xmlParseStartTag (xmlParserCtxtPtr ctxt); + void + xmlParseEndTag (xmlParserCtxtPtr ctxt); + + void + xmlParseCDSect (xmlParserCtxtPtr ctxt); + void + xmlParseContent (xmlParserCtxtPtr ctxt); + void + xmlParseElement (xmlParserCtxtPtr ctxt); + xmlChar * + xmlParseVersionNum (xmlParserCtxtPtr ctxt); + xmlChar * + xmlParseVersionInfo (xmlParserCtxtPtr ctxt); + xmlChar * + xmlParseEncName (xmlParserCtxtPtr ctxt); + const xmlChar * + xmlParseEncodingDecl (xmlParserCtxtPtr ctxt); + int + xmlParseSDDecl (xmlParserCtxtPtr ctxt); + void + xmlParseXMLDecl (xmlParserCtxtPtr ctxt); + void + xmlParseTextDecl (xmlParserCtxtPtr ctxt); + void + xmlParseMisc (xmlParserCtxtPtr ctxt); + void + xmlParseExternalSubset (xmlParserCtxtPtr ctxt, + const xmlChar *ExternalID, + const xmlChar *SystemID); + + + + + +#define XML_SUBSTITUTE_NONE 0 + + + + + +#define XML_SUBSTITUTE_REF 1 + + + + + +#define XML_SUBSTITUTE_PEREF 2 + + + + + +#define XML_SUBSTITUTE_BOTH 3 + + xmlChar * + xmlStringDecodeEntities (xmlParserCtxtPtr ctxt, + const xmlChar *str, + int what, + xmlChar end, + xmlChar end2, + xmlChar end3); + xmlChar * + xmlStringLenDecodeEntities (xmlParserCtxtPtr ctxt, + const xmlChar *str, + int len, + int what, + xmlChar end, + xmlChar end2, + xmlChar end3); + + + + + int nodePush (xmlParserCtxtPtr ctxt, + xmlNodePtr value); + xmlNodePtr nodePop (xmlParserCtxtPtr ctxt); + int inputPush (xmlParserCtxtPtr ctxt, + xmlParserInputPtr value); + xmlParserInputPtr inputPop (xmlParserCtxtPtr ctxt); + const xmlChar * namePop (xmlParserCtxtPtr ctxt); + int namePush (xmlParserCtxtPtr ctxt, + const xmlChar *value); + + + + + int xmlSkipBlankChars (xmlParserCtxtPtr ctxt); + int xmlStringCurrentChar (xmlParserCtxtPtr ctxt, + const xmlChar *cur, + int *len); + void xmlParserHandlePEReference(xmlParserCtxtPtr ctxt); + int xmlCheckLanguageID (const xmlChar *lang); + + + + + int xmlCurrentChar (xmlParserCtxtPtr ctxt, + int *len); + int xmlCopyCharMultiByte (xmlChar *out, + int val); + int xmlCopyChar (int len, + xmlChar *out, + int val); + void xmlNextChar (xmlParserCtxtPtr ctxt); + void xmlParserInputShrink (xmlParserInputPtr in); + + + + + + void htmlInitAutoClose (void); + htmlParserCtxtPtr htmlCreateFileParserCtxt(const char *filename, + const char *encoding); +# 563 "/usr/include/libxml2/libxml/parserInternals.h" +typedef void (*xmlEntityReferenceFunc) (xmlEntityPtr ent, + xmlNodePtr firstNode, + xmlNodePtr lastNode); + + void xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func); + + xmlChar * + xmlParseQuotedString (xmlParserCtxtPtr ctxt); + void + xmlParseNamespace (xmlParserCtxtPtr ctxt); + xmlChar * + xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt); + xmlChar * + xmlScanName (xmlParserCtxtPtr ctxt); + xmlChar * + xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt); + void xmlParserHandleReference(xmlParserCtxtPtr ctxt); + xmlChar * + xmlNamespaceParseQName (xmlParserCtxtPtr ctxt, + xmlChar **prefix); + + + + xmlChar * + xmlDecodeEntities (xmlParserCtxtPtr ctxt, + int len, + int what, + xmlChar end, + xmlChar end2, + xmlChar end3); + void + xmlHandleEntity (xmlParserCtxtPtr ctxt, + xmlEntityPtr entity); +# 609 "/usr/include/libxml2/libxml/parserInternals.h" +} +# 46 "../fwbuilder/XMLTools.h" 2 + + + +namespace libfwbuilder +{ + + +#define FROMXMLCAST(x) ((const char *)x) +#define STRTOXMLCAST(x) ((xmlChar *)x.c_str()) +#define TOXMLCAST(x) ((xmlChar *)x) + +class XMLTools +{ + public: + + static xmlNodePtr getXmlNodeByPath(xmlNodePtr r,const char *path ); + static xmlNodePtr getXmlNodeByPath(xmlNodePtr r,const std::string &path ); + + static xmlNodePtr getXmlChildNode (xmlNodePtr r,const char *child_name ); + + static void initXMLTools(); + static void close(); + + class UpgradePredicate + { + public: + + virtual ~UpgradePredicate() {} + + virtual bool operator()(const std::string&) const + { + return true; + } + }; + + static std::string readFile(const std::string &file_name) throw(FWException); + + + + + + static xmlDocPtr loadFile(const std::string &file_name, + const std::string &type_name, + const std::string &dtd_file, + const UpgradePredicate *upgrade, + const std::string &template_dir, + const std::string ¤t_version = std::string("22") + ) throw(FWException); + + static void setDTD(xmlDocPtr doc, + const std::string &type_name, + const std::string &dtd_file) throw(FWException); + + + + + static void saveFile(xmlDocPtr doc, + const std::string &file_name, + const std::string &type_name, + const std::string &dtd_file) throw(FWException); + + + + + static void dumpToMemory(xmlDocPtr doc, + xmlChar **buffer, + int *size, + const std::string &type_name, + const std::string &dtd_file) throw(FWException); + + static xmlExternalEntityLoader defaultLoader; +# 125 "../fwbuilder/XMLTools.h" + static xmlDocPtr parseFile(const std::string &file_name, + const std::string &buffer, + bool use_dtd, const std::string &template_dir + ) throw(FWException); + + + + + + static xmlDocPtr transformDocument(xmlDocPtr doc, + const std::string &stylesheet_file, + const char **params + ) throw(FWException); + + + + + + static void transformDocumentToFile(xmlDocPtr doc, + const std::string &stylesheet_file, + const char **params, + const std::string &dst_file + ) throw(FWException); + + + + + + static void transformFileToFile(const std::string &src_file, + const std::string &stylesheet_file, + const char **params, + const std::string &dst_file + ) throw(FWException); + + + static std::string quote_linefeeds (const std::string &s); + static std::string unquote_linefeeds(const std::string &s); + + + + + + static std::string cleanForUTF8(const std::string &str); + + + + + + static std::string cleanForNVTASCII(const std::string &str); + + + + + + + static int version_compare(const std::string &v1, const std::string &v2); + + + private: + + + + + + + + static xmlDocPtr convert(xmlDocPtr doc, + const std::string &file_name, + const std::string &type_name, + const std::string &template_dir, + const std::string ¤t_version = std::string("22") + ) throw(FWException); + + + + + static int major_number(const std::string &v, std::string &rest); + +}; + +} +# 32 "../fwbuilder/FWOptions.h" 2 + +namespace libfwbuilder +{ + +class FWOptions : public FWObject +{ + public: + FWOptions(); + + static const char *TYPENAME; virtual std::string getTypeName() const { return TYPENAME; } static bool isA(const FWObject *o) { return o && o->getTypeName()==TYPENAME; } static FWOptions* cast(FWObject *o) { return dynamic_cast(o); } static const FWOptions* constcast(const FWObject *o) { return dynamic_cast(o); }; + virtual void* dispatch(Dispatch* _d, void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, void* _a1) const {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) const {return _d->dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, void* _a1) const {return _d->const_dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, const void* _a1) const {return _d->const_dispatch(this, _a1); }; + virtual void fromXML(xmlNodePtr parent) throw(FWException); + virtual xmlNodePtr toXML(xmlNodePtr parent) throw(FWException); + virtual bool isPrimaryObject() const { return false; } +}; + +class HostOptions : public FWOptions +{ + public: + HostOptions(); + + static const char *TYPENAME; virtual std::string getTypeName() const { return TYPENAME; } static bool isA(const FWObject *o) { return o && o->getTypeName()==TYPENAME; } static HostOptions* cast(FWObject *o) { return dynamic_cast(o); } static const HostOptions* constcast(const FWObject *o) { return dynamic_cast(o); }; + virtual void* dispatch(Dispatch* _d, void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, void* _a1) const {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) const {return _d->dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, void* _a1) const {return _d->const_dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, const void* _a1) const {return _d->const_dispatch(this, _a1); }; +}; + +class FirewallOptions : public FWOptions +{ + public: + FirewallOptions(); + + static const char *TYPENAME; virtual std::string getTypeName() const { return TYPENAME; } static bool isA(const FWObject *o) { return o && o->getTypeName()==TYPENAME; } static FirewallOptions* cast(FWObject *o) { return dynamic_cast(o); } static const FirewallOptions* constcast(const FWObject *o) { return dynamic_cast(o); }; + virtual void* dispatch(Dispatch* _d, void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, void* _a1) const {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) const {return _d->dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, void* _a1) const {return _d->const_dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, const void* _a1) const {return _d->const_dispatch(this, _a1); }; +}; + +class InterfaceOptions : public FWOptions +{ + public: + InterfaceOptions(); + + static const char *TYPENAME; virtual std::string getTypeName() const { return TYPENAME; } static bool isA(const FWObject *o) { return o && o->getTypeName()==TYPENAME; } static InterfaceOptions* cast(FWObject *o) { return dynamic_cast(o); } static const InterfaceOptions* constcast(const FWObject *o) { return dynamic_cast(o); }; + virtual void* dispatch(Dispatch* _d, void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, void* _a1) const {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) const {return _d->dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, void* _a1) const {return _d->const_dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, const void* _a1) const {return _d->const_dispatch(this, _a1); }; +}; + +class RuleSetOptions : public FWOptions +{ + public: + + RuleSetOptions(); + + static const char *TYPENAME; virtual std::string getTypeName() const { return TYPENAME; } static bool isA(const FWObject *o) { return o && o->getTypeName()==TYPENAME; } static RuleSetOptions* cast(FWObject *o) { return dynamic_cast(o); } static const RuleSetOptions* constcast(const FWObject *o) { return dynamic_cast(o); }; + virtual void* dispatch(Dispatch* _d, void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, void* _a1) const {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) const {return _d->dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, void* _a1) const {return _d->const_dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, const void* _a1) const {return _d->const_dispatch(this, _a1); }; +}; + +class PolicyRuleOptions : public FWOptions +{ + public: + + PolicyRuleOptions(); + + static const char *TYPENAME; virtual std::string getTypeName() const { return TYPENAME; } static bool isA(const FWObject *o) { return o && o->getTypeName()==TYPENAME; } static PolicyRuleOptions* cast(FWObject *o) { return dynamic_cast(o); } static const PolicyRuleOptions* constcast(const FWObject *o) { return dynamic_cast(o); }; + virtual void* dispatch(Dispatch* _d, void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, void* _a1) const {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) const {return _d->dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, void* _a1) const {return _d->const_dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, const void* _a1) const {return _d->const_dispatch(this, _a1); }; +}; + +class NATRuleOptions : public FWOptions +{ + public: + + NATRuleOptions(); + + static const char *TYPENAME; virtual std::string getTypeName() const { return TYPENAME; } static bool isA(const FWObject *o) { return o && o->getTypeName()==TYPENAME; } static NATRuleOptions* cast(FWObject *o) { return dynamic_cast(o); } static const NATRuleOptions* constcast(const FWObject *o) { return dynamic_cast(o); }; + virtual void* dispatch(Dispatch* _d, void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, void* _a1) const {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) const {return _d->dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, void* _a1) const {return _d->const_dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, const void* _a1) const {return _d->const_dispatch(this, _a1); }; +}; + +class RoutingRuleOptions : public FWOptions +{ + public: + + RoutingRuleOptions(); + + static const char *TYPENAME; virtual std::string getTypeName() const { return TYPENAME; } static bool isA(const FWObject *o) { return o && o->getTypeName()==TYPENAME; } static RoutingRuleOptions* cast(FWObject *o) { return dynamic_cast(o); } static const RoutingRuleOptions* constcast(const FWObject *o) { return dynamic_cast(o); }; + virtual void* dispatch(Dispatch* _d, void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, void* _a1) const {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) const {return _d->dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, void* _a1) const {return _d->const_dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, const void* _a1) const {return _d->const_dispatch(this, _a1); }; +}; + +class ClusterGroupOptions : public FWOptions +{ + public: + ClusterGroupOptions(); + + static const char *TYPENAME; virtual std::string getTypeName() const { return TYPENAME; } static bool isA(const FWObject *o) { return o && o->getTypeName()==TYPENAME; } static ClusterGroupOptions* cast(FWObject *o) { return dynamic_cast(o); } static const ClusterGroupOptions* constcast(const FWObject *o) { return dynamic_cast(o); }; + virtual void* dispatch(Dispatch* _d, void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, void* _a1) const {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) const {return _d->dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, void* _a1) const {return _d->const_dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, const void* _a1) const {return _d->const_dispatch(this, _a1); }; +}; + +} +# 37 "../fwbuilder/Interface.h" 2 + +namespace libfwbuilder +{ + class IPv4; + class IPv6; + + class Interface : public Address + { +private: +# 64 "../fwbuilder/Interface.h" + int bcast_bits; + bool ostatus; + int snmp_type; + +protected: + + virtual void replaceReferenceInternal(int oldfw_id, int newfw_id, int &counter); + +public: + + Interface(); + Interface(const Interface &i); + virtual ~Interface(); + + + + + + + virtual void removeRef(FWObject *obj); + + + + + + virtual void addRef(FWObject *obj); + + virtual void fromXML(xmlNodePtr parent) throw(FWException); + virtual xmlNodePtr toXML(xmlNodePtr parent) throw(FWException); + + virtual bool validateChild(FWObject *o); + + virtual FWOptions* getOptionsObject(); + virtual FWOptions* getOptionsObjectConst() const; + + static const char *TYPENAME; virtual std::string getTypeName() const { return TYPENAME; } static bool isA(const FWObject *o) { return o && o->getTypeName()==TYPENAME; } static Interface* cast(FWObject *o) { return dynamic_cast(o); } static const Interface* constcast(const FWObject *o) { return dynamic_cast(o); }; + + virtual void* dispatch(Dispatch* _d, void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, void* _a1) const {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) const {return _d->dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, void* _a1) const {return _d->const_dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, const void* _a1) const {return _d->const_dispatch(this, _a1); }; + + + + + + + + int getSecurityLevel() const; + void setSecurityLevel(int level); + + + + + + void setDyn(bool value); + bool isDyn() const ; + + + + + void setUnnumbered(bool value); + bool isUnnumbered() const ; +# 138 "../fwbuilder/Interface.h" + bool isBridgePort() const; + + + + + + + + bool isSlave() const; + + + + + + bool isRegular() const + { return (!isDyn() && !isUnnumbered() && !isBridgePort()); } + + + + + + void setUnprotected(bool value); + bool isUnprotected() const ; + + void setDedicatedFailover(bool value); + bool isDedicatedFailover() const; + + void setManagement(bool value); + bool isManagement() const; + + bool isUp () const { return ostatus; } + void setOStatus(bool value); + + bool isFailoverInterface() const; + + void setInterfaceType(int _snmp_type); + int getInterfaceType() const { return snmp_type; } + + void setBroadcastBits(int _val); + + + + + + bool isLoopback() const; + + IPv4* addIPv4(); + IPv6* addIPv6(); + + physAddress* getPhysicalAddress () const; + void setPhysicalAddress(const std::string &pa); + + + virtual FWObject& shallowDuplicate(const FWObject *obj, + bool preserve_id = true) throw(FWException); + virtual FWObject& duplicate(const FWObject *obj, + bool preserve_id = true) throw(FWException); + + virtual bool cmp(const FWObject *obj, bool recursive=false) throw(FWException); + + void duplicateWithIdMapping(const FWObject *src, + std::map &id_mapping, bool preserve_id); + + const std::string &getLabel() const; + void setLabel(const std::string& n); + + virtual const Address* getAddressObject() const; + + virtual unsigned int dimension() const { return 1; } + + + + + virtual int countInetAddresses(bool skip_loopback) const; + + virtual bool isPrimaryObject() const { return false; } + + + + + + + + static void findAllInterfaces(FWObject *obj, std::list &interfaces); + + }; + +} +# 33 "Address.cpp" 2 + +# 1 "../fwbuilder/FWObjectReference.h" 1 +# 29 "../fwbuilder/FWObjectReference.h" +#define __FWOBJECTREF_HH_FLAG__ + +# 1 "../fwbuilder/FWReference.h" 1 +# 29 "../fwbuilder/FWReference.h" +#define __FWREF_HH_FLAG__ + + + +namespace libfwbuilder +{ + + + + +class FWReference : public FWObject +{ +private: + + std::string str_ref; + int int_ref; + +protected: + + FWReference(); + +public: + + static const char *TYPENAME; virtual std::string getTypeName() const { return TYPENAME; } static bool isA(const FWObject *o) { return o && o->getTypeName()==TYPENAME; } static FWReference* cast(FWObject *o) { return dynamic_cast(o); } static const FWReference* constcast(const FWObject *o) { return dynamic_cast(o); }; + + virtual void* dispatch(Dispatch* _d, void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, void* _a1) const {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) const {return _d->dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, void* _a1) const {return _d->const_dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, const void* _a1) const {return _d->const_dispatch(this, _a1); }; + + virtual ~FWReference(); + + virtual void fromXML(xmlNodePtr parent) throw(FWException); + virtual xmlNodePtr toXML(xmlNodePtr parent) throw(FWException); + + virtual FWObject& shallowDuplicate( + const FWObject *obj, bool preserve_id = true) throw(FWException); + + virtual bool cmp(const FWObject *obj, bool recursive=false) throw(FWException); + + virtual void add(FWObject *obj); + + virtual FWObject *getPointer(); + virtual int getPointerId(); + + void setPointer(FWObject *o); + void setPointerId(int ref_id); + + virtual void dump(std::ostream &f,bool recursive,bool brief,int offset=0) const; + + virtual bool isPrimaryObject() const { return false; } + + + + + + + + static FWObject* getObject(FWObject* obj); + + + + + + + + int getPointerIdDirect() const { return int_ref; } + +}; + +} +# 32 "../fwbuilder/FWObjectReference.h" 2 + +namespace libfwbuilder +{ + +class ObjectGroup; + + + + +class FWObjectReference : public FWReference +{ + public: + + static const char *TYPENAME; virtual std::string getTypeName() const { return TYPENAME; } static bool isA(const FWObject *o) { return o && o->getTypeName()==TYPENAME; } static FWObjectReference* cast(FWObject *o) { return dynamic_cast(o); } static const FWObjectReference* constcast(const FWObject *o) { return dynamic_cast(o); }; + + virtual void* dispatch(Dispatch* _d, void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, void* _a1) const {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) const {return _d->dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, void* _a1) const {return _d->const_dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, const void* _a1) const {return _d->const_dispatch(this, _a1); }; + + FWObjectReference(); + + void setPointer(FWObject *o); + void setPointer(ObjectGroup *o); + +}; + +} +# 35 "Address.cpp" 2 +# 1 "../fwbuilder/FWObjectDatabase.h" 1 +# 28 "../fwbuilder/FWObjectDatabase.h" +#define __FWOBJECTDATABASE_HH_FLAG__ + + + +# 1 "../fwbuilder/ThreadTools.h" 1 +# 28 "../fwbuilder/ThreadTools.h" +#define __THREAD_TOOLS_H_FLAG__ + +# 1 "../fwbuilder/libfwbuilder-config.h" 1 + + + + + + +#define FWBUILDER_XML_VERSION "22" + + + + + +#define RES_DIR "/usr/share/fwbuilder-5.0.1.3592" +# 27 "../fwbuilder/libfwbuilder-config.h" +#define HAVE_GETOPT_H 1 +# 44 "../fwbuilder/libfwbuilder-config.h" +#define HAVE_XMLSAVEFORMATFILEENC 1 + +#define HAVE_LIBXSLT_XSLTCONFIG_H 1 + + +#define HAVE_STRTOK_R 1 + +#define WORDS_LITTLEENDIAN 1 +# 61 "../fwbuilder/libfwbuilder-config.h" +#define SNPRINTF snprintf +#define VSNPRINTF vsnprintf +#define FS_SEPARATOR "/" + + + + + + +#define FREEXMLBUFF(x) xmlFree((void*)(x)) +# 31 "../fwbuilder/ThreadTools.h" 2 + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/queue" 1 3 +# 57 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/queue" 3 +#define _GLIBCXX_QUEUE 1 + + +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/queue" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/deque" 1 3 +# 57 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/deque" 3 +#define _GLIBCXX_DEQUE 1 + + +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/deque" 3 + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 1 3 +# 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 +#define _STL_DEQUE_H 1 + + + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 82 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 +#define _GLIBCXX_DEQUE_BUF_SIZE 512 + + + inline size_t + __deque_buf_size(size_t __size) + { return (__size < 512 + ? size_t(512 / __size) : size_t(1)); } +# 102 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + template + struct _Deque_iterator + { + typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator; + typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator; + + static size_t _S_buffer_size() + { return __deque_buf_size(sizeof(_Tp)); } + + typedef std::random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef _Ptr pointer; + typedef _Ref reference; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Tp** _Map_pointer; + typedef _Deque_iterator _Self; + + _Tp* _M_cur; + _Tp* _M_first; + _Tp* _M_last; + _Map_pointer _M_node; + + _Deque_iterator(_Tp* __x, _Map_pointer __y) + : _M_cur(__x), _M_first(*__y), + _M_last(*__y + _S_buffer_size()), _M_node(__y) { } + + _Deque_iterator() + : _M_cur(0), _M_first(0), _M_last(0), _M_node(0) { } + + _Deque_iterator(const iterator& __x) + : _M_cur(__x._M_cur), _M_first(__x._M_first), + _M_last(__x._M_last), _M_node(__x._M_node) { } + + reference + operator*() const + { return *_M_cur; } + + pointer + operator->() const + { return _M_cur; } + + _Self& + operator++() + { + ++_M_cur; + if (_M_cur == _M_last) + { + _M_set_node(_M_node + 1); + _M_cur = _M_first; + } + return *this; + } + + _Self + operator++(int) + { + _Self __tmp = *this; + ++*this; + return __tmp; + } + + _Self& + operator--() + { + if (_M_cur == _M_first) + { + _M_set_node(_M_node - 1); + _M_cur = _M_last; + } + --_M_cur; + return *this; + } + + _Self + operator--(int) + { + _Self __tmp = *this; + --*this; + return __tmp; + } + + _Self& + operator+=(difference_type __n) + { + const difference_type __offset = __n + (_M_cur - _M_first); + if (__offset >= 0 && __offset < difference_type(_S_buffer_size())) + _M_cur += __n; + else + { + const difference_type __node_offset = + __offset > 0 ? __offset / difference_type(_S_buffer_size()) + : -difference_type((-__offset - 1) + / _S_buffer_size()) - 1; + _M_set_node(_M_node + __node_offset); + _M_cur = _M_first + (__offset - __node_offset + * difference_type(_S_buffer_size())); + } + return *this; + } + + _Self + operator+(difference_type __n) const + { + _Self __tmp = *this; + return __tmp += __n; + } + + _Self& + operator-=(difference_type __n) + { return *this += -__n; } + + _Self + operator-(difference_type __n) const + { + _Self __tmp = *this; + return __tmp -= __n; + } + + reference + operator[](difference_type __n) const + { return *(*this + __n); } + + + + + + + void + _M_set_node(_Map_pointer __new_node) + { + _M_node = __new_node; + _M_first = *__new_node; + _M_last = _M_first + difference_type(_S_buffer_size()); + } + }; + + + + + template + inline bool + operator==(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, + const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) + { return __x._M_cur == __y._M_cur; } + + template + inline bool + operator==(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, + const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) + { return __x._M_cur == __y._M_cur; } + + template + inline bool + operator!=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, + const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) + { return !(__x == __y); } + + template + inline bool + operator!=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, + const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) + { return !(__x == __y); } + + template + inline bool + operator<(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, + const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) + { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur) + : (__x._M_node < __y._M_node); } + + template + inline bool + operator<(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, + const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) + { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur) + : (__x._M_node < __y._M_node); } + + template + inline bool + operator>(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, + const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) + { return __y < __x; } + + template + inline bool + operator>(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, + const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) + { return __y < __x; } + + template + inline bool + operator<=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, + const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) + { return !(__y < __x); } + + template + inline bool + operator<=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, + const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) + { return !(__y < __x); } + + template + inline bool + operator>=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, + const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) + { return !(__x < __y); } + + template + inline bool + operator>=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, + const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) + { return !(__x < __y); } + + + + + + template + inline typename _Deque_iterator<_Tp, _Ref, _Ptr>::difference_type + operator-(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, + const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) + { + return typename _Deque_iterator<_Tp, _Ref, _Ptr>::difference_type + (_Deque_iterator<_Tp, _Ref, _Ptr>::_S_buffer_size()) + * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first) + + (__y._M_last - __y._M_cur); + } + + template + inline typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type + operator-(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, + const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) + { + return typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type + (_Deque_iterator<_Tp, _RefL, _PtrL>::_S_buffer_size()) + * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first) + + (__y._M_last - __y._M_cur); + } + + template + inline _Deque_iterator<_Tp, _Ref, _Ptr> + operator+(ptrdiff_t __n, const _Deque_iterator<_Tp, _Ref, _Ptr>& __x) + { return __x + __n; } + + template + void + fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>&, + const _Deque_iterator<_Tp, _Tp&, _Tp*>&, const _Tp&); + + template + _Deque_iterator<_Tp, _Tp&, _Tp*> + copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*>, + _Deque_iterator<_Tp, const _Tp&, const _Tp*>, + _Deque_iterator<_Tp, _Tp&, _Tp*>); + + template + inline _Deque_iterator<_Tp, _Tp&, _Tp*> + copy(_Deque_iterator<_Tp, _Tp&, _Tp*> __first, + _Deque_iterator<_Tp, _Tp&, _Tp*> __last, + _Deque_iterator<_Tp, _Tp&, _Tp*> __result) + { return std::copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*>(__first), + _Deque_iterator<_Tp, const _Tp&, const _Tp*>(__last), + __result); } + + template + _Deque_iterator<_Tp, _Tp&, _Tp*> + copy_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*>, + _Deque_iterator<_Tp, const _Tp&, const _Tp*>, + _Deque_iterator<_Tp, _Tp&, _Tp*>); + + template + inline _Deque_iterator<_Tp, _Tp&, _Tp*> + copy_backward(_Deque_iterator<_Tp, _Tp&, _Tp*> __first, + _Deque_iterator<_Tp, _Tp&, _Tp*> __last, + _Deque_iterator<_Tp, _Tp&, _Tp*> __result) + { return std::copy_backward(_Deque_iterator<_Tp, + const _Tp&, const _Tp*>(__first), + _Deque_iterator<_Tp, + const _Tp&, const _Tp*>(__last), + __result); } +# 435 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + template + class _Deque_base + { + public: + typedef _Alloc allocator_type; + + allocator_type + get_allocator() const + { return allocator_type(_M_get_Tp_allocator()); } + + typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator; + typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator; + + _Deque_base() + : _M_impl() + { _M_initialize_map(0); } + + _Deque_base(const allocator_type& __a, size_t __num_elements) + : _M_impl(__a) + { _M_initialize_map(__num_elements); } + + _Deque_base(const allocator_type& __a) + : _M_impl(__a) + { } +# 475 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + ~_Deque_base(); + + protected: + + + + typedef typename _Alloc::template rebind<_Tp*>::other _Map_alloc_type; + + typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; + + struct _Deque_impl + : public _Tp_alloc_type + { + _Tp** _M_map; + size_t _M_map_size; + iterator _M_start; + iterator _M_finish; + + _Deque_impl() + : _Tp_alloc_type(), _M_map(0), _M_map_size(0), + _M_start(), _M_finish() + { } + + _Deque_impl(const _Tp_alloc_type& __a) + : _Tp_alloc_type(__a), _M_map(0), _M_map_size(0), + _M_start(), _M_finish() + { } + }; + + _Tp_alloc_type& + _M_get_Tp_allocator() + { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); } + + const _Tp_alloc_type& + _M_get_Tp_allocator() const + { return *static_cast(&this->_M_impl); } + + _Map_alloc_type + _M_get_map_allocator() const + { return _Map_alloc_type(_M_get_Tp_allocator()); } + + _Tp* + _M_allocate_node() + { + return _M_impl._Tp_alloc_type::allocate(__deque_buf_size(sizeof(_Tp))); + } + + void + _M_deallocate_node(_Tp* __p) + { + _M_impl._Tp_alloc_type::deallocate(__p, __deque_buf_size(sizeof(_Tp))); + } + + _Tp** + _M_allocate_map(size_t __n) + { return _M_get_map_allocator().allocate(__n); } + + void + _M_deallocate_map(_Tp** __p, size_t __n) + { _M_get_map_allocator().deallocate(__p, __n); } + + protected: + void _M_initialize_map(size_t); + void _M_create_nodes(_Tp** __nstart, _Tp** __nfinish); + void _M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish); + enum { _S_initial_map_size = 8 }; + + _Deque_impl _M_impl; + }; + + template + _Deque_base<_Tp, _Alloc>:: + ~_Deque_base() + { + if (this->_M_impl._M_map) + { + _M_destroy_nodes(this->_M_impl._M_start._M_node, + this->_M_impl._M_finish._M_node + 1); + _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); + } + } +# 565 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + template + void + _Deque_base<_Tp, _Alloc>:: + _M_initialize_map(size_t __num_elements) + { + const size_t __num_nodes = (__num_elements/ __deque_buf_size(sizeof(_Tp)) + + 1); + + this->_M_impl._M_map_size = std::max((size_t) _S_initial_map_size, + size_t(__num_nodes + 2)); + this->_M_impl._M_map = _M_allocate_map(this->_M_impl._M_map_size); + + + + + + + _Tp** __nstart = (this->_M_impl._M_map + + (this->_M_impl._M_map_size - __num_nodes) / 2); + _Tp** __nfinish = __nstart + __num_nodes; + + try + { _M_create_nodes(__nstart, __nfinish); } + catch(...) + { + _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); + this->_M_impl._M_map = 0; + this->_M_impl._M_map_size = 0; + throw; + } + + this->_M_impl._M_start._M_set_node(__nstart); + this->_M_impl._M_finish._M_set_node(__nfinish - 1); + this->_M_impl._M_start._M_cur = _M_impl._M_start._M_first; + this->_M_impl._M_finish._M_cur = (this->_M_impl._M_finish._M_first + + __num_elements + % __deque_buf_size(sizeof(_Tp))); + } + + template + void + _Deque_base<_Tp, _Alloc>:: + _M_create_nodes(_Tp** __nstart, _Tp** __nfinish) + { + _Tp** __cur; + try + { + for (__cur = __nstart; __cur < __nfinish; ++__cur) + *__cur = this->_M_allocate_node(); + } + catch(...) + { + _M_destroy_nodes(__nstart, __cur); + throw; + } + } + + template + void + _Deque_base<_Tp, _Alloc>:: + _M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish) + { + for (_Tp** __n = __nstart; __n < __nfinish; ++__n) + _M_deallocate_node(*__n); + } +# 712 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + template > + class deque : protected _Deque_base<_Tp, _Alloc> + { + + typedef typename _Alloc::value_type _Alloc_value_type; + + + + typedef _Deque_base<_Tp, _Alloc> _Base; + typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; + + public: + typedef _Tp value_type; + typedef typename _Tp_alloc_type::pointer pointer; + typedef typename _Tp_alloc_type::const_pointer const_pointer; + typedef typename _Tp_alloc_type::reference reference; + typedef typename _Tp_alloc_type::const_reference const_reference; + typedef typename _Base::iterator iterator; + typedef typename _Base::const_iterator const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Alloc allocator_type; + + protected: + typedef pointer* _Map_pointer; + + static size_t _S_buffer_size() + { return __deque_buf_size(sizeof(_Tp)); } + + + using _Base::_M_initialize_map; + using _Base::_M_create_nodes; + using _Base::_M_destroy_nodes; + using _Base::_M_allocate_node; + using _Base::_M_deallocate_node; + using _Base::_M_allocate_map; + using _Base::_M_deallocate_map; + using _Base::_M_get_Tp_allocator; + + + + + + using _Base::_M_impl; + + public: + + + + + + deque() + : _Base() { } + + + + + + explicit + deque(const allocator_type& __a) + : _Base(__a, 0) { } +# 784 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + explicit + deque(size_type __n, const value_type& __value = value_type(), + const allocator_type& __a = allocator_type()) + : _Base(__a, __n) + { _M_fill_initialize(__value); } +# 797 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + deque(const deque& __x) + : _Base(__x._M_get_Tp_allocator(), __x.size()) + { std::__uninitialized_copy_a(__x.begin(), __x.end(), + this->_M_impl._M_start, + _M_get_Tp_allocator()); } +# 849 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + template + deque(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_initialize_dispatch(__first, __last, _Integral()); + } + + + + + + + ~deque() + { _M_destroy_data(begin(), end(), _M_get_Tp_allocator()); } +# 874 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + deque& + operator=(const deque& __x); +# 924 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + void + assign(size_type __n, const value_type& __val) + { _M_fill_assign(__n, __val); } +# 940 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + template + void + assign(_InputIterator __first, _InputIterator __last) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } +# 966 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + allocator_type + get_allocator() const + { return _Base::get_allocator(); } + + + + + + + iterator + begin() + { return this->_M_impl._M_start; } + + + + + + const_iterator + begin() const + { return this->_M_impl._M_start; } + + + + + + + iterator + end() + { return this->_M_impl._M_finish; } + + + + + + + const_iterator + end() const + { return this->_M_impl._M_finish; } + + + + + + + reverse_iterator + rbegin() + { return reverse_iterator(this->_M_impl._M_finish); } + + + + + + + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(this->_M_impl._M_finish); } + + + + + + + reverse_iterator + rend() + { return reverse_iterator(this->_M_impl._M_start); } + + + + + + + const_reverse_iterator + rend() const + { return const_reverse_iterator(this->_M_impl._M_start); } +# 1080 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + size_type + size() const + { return this->_M_impl._M_finish - this->_M_impl._M_start; } + + + size_type + max_size() const + { return _M_get_Tp_allocator().max_size(); } +# 1100 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + void + resize(size_type __new_size, value_type __x = value_type()) + { + const size_type __len = size(); + if (__new_size < __len) + _M_erase_at_end(this->_M_impl._M_start + difference_type(__new_size)); + else + insert(this->_M_impl._M_finish, __new_size - __len, __x); + } +# 1121 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + bool + empty() const + { return this->_M_impl._M_finish == this->_M_impl._M_start; } +# 1137 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + reference + operator[](size_type __n) + { return this->_M_impl._M_start[difference_type(__n)]; } +# 1152 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + const_reference + operator[](size_type __n) const + { return this->_M_impl._M_start[difference_type(__n)]; } + + protected: + + void + _M_range_check(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range(("deque::_M_range_check")); + } + + public: +# 1177 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + reference + at(size_type __n) + { + _M_range_check(__n); + return (*this)[__n]; + } +# 1195 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + const_reference + at(size_type __n) const + { + _M_range_check(__n); + return (*this)[__n]; + } + + + + + + reference + front() + { return *begin(); } + + + + + + const_reference + front() const + { return *begin(); } + + + + + + reference + back() + { + iterator __tmp = end(); + --__tmp; + return *__tmp; + } + + + + + + const_reference + back() const + { + const_iterator __tmp = end(); + --__tmp; + return *__tmp; + } +# 1252 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + void + push_front(const value_type& __x) + { + if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first) + { + this->_M_impl.construct(this->_M_impl._M_start._M_cur - 1, __x); + --this->_M_impl._M_start._M_cur; + } + else + _M_push_front_aux(__x); + } +# 1283 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + void + push_back(const value_type& __x) + { + if (this->_M_impl._M_finish._M_cur + != this->_M_impl._M_finish._M_last - 1) + { + this->_M_impl.construct(this->_M_impl._M_finish._M_cur, __x); + ++this->_M_impl._M_finish._M_cur; + } + else + _M_push_back_aux(__x); + } +# 1314 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + void + pop_front() + { + if (this->_M_impl._M_start._M_cur + != this->_M_impl._M_start._M_last - 1) + { + this->_M_impl.destroy(this->_M_impl._M_start._M_cur); + ++this->_M_impl._M_start._M_cur; + } + else + _M_pop_front_aux(); + } +# 1335 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + void + pop_back() + { + if (this->_M_impl._M_finish._M_cur + != this->_M_impl._M_finish._M_first) + { + --this->_M_impl._M_finish._M_cur; + this->_M_impl.destroy(this->_M_impl._M_finish._M_cur); + } + else + _M_pop_back_aux(); + } +# 1372 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + iterator + insert(iterator __position, const value_type& __x); +# 1412 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + void + insert(iterator __position, size_type __n, const value_type& __x) + { _M_fill_insert(__position, __n, __x); } +# 1426 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + template + void + insert(iterator __position, _InputIterator __first, + _InputIterator __last) + { + + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_insert_dispatch(__position, __first, __last, _Integral()); + } +# 1449 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + iterator + erase(iterator __position); +# 1468 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + iterator + erase(iterator __first, iterator __last); +# 1480 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + void + swap(deque& __x) + { + std::swap(this->_M_impl._M_start, __x._M_impl._M_start); + std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); + std::swap(this->_M_impl._M_map, __x._M_impl._M_map); + std::swap(this->_M_impl._M_map_size, __x._M_impl._M_map_size); + + + + std::__alloc_swap<_Tp_alloc_type>::_S_do_it(_M_get_Tp_allocator(), + __x._M_get_Tp_allocator()); + } + + + + + + + + void + clear() + { _M_erase_at_end(begin()); } + + protected: + + + + + + + template + void + _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) + { + _M_initialize_map(static_cast(__n)); + _M_fill_initialize(__x); + } + + + template + void + _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { + typedef typename std::iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_range_initialize(__first, __last, _IterCategory()); + } +# 1542 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + template + void + _M_range_initialize(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag); + + + template + void + _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag); +# 1564 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + void + _M_fill_initialize(const value_type& __value); +# 1574 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + template + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } + + + template + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { + typedef typename std::iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_assign_aux(__first, __last, _IterCategory()); + } + + + template + void + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag); + + + template + void + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __len = std::distance(__first, __last); + if (__len > size()) + { + _ForwardIterator __mid = __first; + std::advance(__mid, size()); + std::copy(__first, __mid, begin()); + insert(end(), __mid, __last); + } + else + _M_erase_at_end(std::copy(__first, __last, begin())); + } + + + + void + _M_fill_assign(size_type __n, const value_type& __val) + { + if (__n > size()) + { + std::fill(begin(), end(), __val); + insert(end(), __n - size(), __val); + } + else + { + _M_erase_at_end(begin() + difference_type(__n)); + std::fill(begin(), end(), __val); + } + } + + + + + void _M_push_back_aux(const value_type&); + + void _M_push_front_aux(const value_type&); +# 1645 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + void _M_pop_back_aux(); + + void _M_pop_front_aux(); +# 1657 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + template + void + _M_insert_dispatch(iterator __pos, + _Integer __n, _Integer __x, __true_type) + { _M_fill_insert(__pos, __n, __x); } + + + template + void + _M_insert_dispatch(iterator __pos, + _InputIterator __first, _InputIterator __last, + __false_type) + { + typedef typename std::iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_range_insert_aux(__pos, __first, __last, _IterCategory()); + } + + + template + void + _M_range_insert_aux(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag); + + + template + void + _M_range_insert_aux(iterator __pos, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag); + + + + + void + _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); + + + + iterator + _M_insert_aux(iterator __pos, const value_type& __x); + + + + + + + + void + _M_insert_aux(iterator __pos, size_type __n, const value_type& __x); + + + template + void + _M_insert_aux(iterator __pos, + _ForwardIterator __first, _ForwardIterator __last, + size_type __n); + + + + + void + _M_destroy_data_aux(iterator __first, iterator __last); + + + + template + void + _M_destroy_data(iterator __first, iterator __last, const _Alloc1&) + { _M_destroy_data_aux(__first, __last); } + + void + _M_destroy_data(iterator __first, iterator __last, + const std::allocator<_Tp>&) + { + if (!__has_trivial_destructor(value_type)) + _M_destroy_data_aux(__first, __last); + } + + + void + _M_erase_at_begin(iterator __pos) + { + _M_destroy_data(begin(), __pos, _M_get_Tp_allocator()); + _M_destroy_nodes(this->_M_impl._M_start._M_node, __pos._M_node); + this->_M_impl._M_start = __pos; + } + + + + void + _M_erase_at_end(iterator __pos) + { + _M_destroy_data(__pos, end(), _M_get_Tp_allocator()); + _M_destroy_nodes(__pos._M_node + 1, + this->_M_impl._M_finish._M_node + 1); + this->_M_impl._M_finish = __pos; + } + + + + iterator + _M_reserve_elements_at_front(size_type __n) + { + const size_type __vacancies = this->_M_impl._M_start._M_cur + - this->_M_impl._M_start._M_first; + if (__n > __vacancies) + _M_new_elements_at_front(__n - __vacancies); + return this->_M_impl._M_start - difference_type(__n); + } + + iterator + _M_reserve_elements_at_back(size_type __n) + { + const size_type __vacancies = (this->_M_impl._M_finish._M_last + - this->_M_impl._M_finish._M_cur) - 1; + if (__n > __vacancies) + _M_new_elements_at_back(__n - __vacancies); + return this->_M_impl._M_finish + difference_type(__n); + } + + void + _M_new_elements_at_front(size_type __new_elements); + + void + _M_new_elements_at_back(size_type __new_elements); +# 1793 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + void + _M_reserve_map_at_back(size_type __nodes_to_add = 1) + { + if (__nodes_to_add + 1 > this->_M_impl._M_map_size + - (this->_M_impl._M_finish._M_node - this->_M_impl._M_map)) + _M_reallocate_map(__nodes_to_add, false); + } + + void + _M_reserve_map_at_front(size_type __nodes_to_add = 1) + { + if (__nodes_to_add > size_type(this->_M_impl._M_start._M_node + - this->_M_impl._M_map)) + _M_reallocate_map(__nodes_to_add, true); + } + + void + _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front); + + }; +# 1825 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + template + inline bool + operator==(const deque<_Tp, _Alloc>& __x, + const deque<_Tp, _Alloc>& __y) + { return __x.size() == __y.size() + && std::equal(__x.begin(), __x.end(), __y.begin()); } +# 1843 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_deque.h" 3 + template + inline bool + operator<(const deque<_Tp, _Alloc>& __x, + const deque<_Tp, _Alloc>& __y) + { return std::lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); } + + + template + inline bool + operator!=(const deque<_Tp, _Alloc>& __x, + const deque<_Tp, _Alloc>& __y) + { return !(__x == __y); } + + + template + inline bool + operator>(const deque<_Tp, _Alloc>& __x, + const deque<_Tp, _Alloc>& __y) + { return __y < __x; } + + + template + inline bool + operator<=(const deque<_Tp, _Alloc>& __x, + const deque<_Tp, _Alloc>& __y) + { return !(__y < __x); } + + + template + inline bool + operator>=(const deque<_Tp, _Alloc>& __x, + const deque<_Tp, _Alloc>& __y) + { return !(__x < __y); } + + + template + inline void + swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y) + { __x.swap(__y); } + +#undef _GLIBCXX_DEQUE_BUF_SIZE + +} +# 66 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/deque" 2 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/deque.tcc" 1 3 +# 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/deque.tcc" 3 +#define _DEQUE_TCC 1 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + template + deque<_Tp, _Alloc>& + deque<_Tp, _Alloc>:: + operator=(const deque& __x) + { + const size_type __len = size(); + if (&__x != this) + { + if (__len >= __x.size()) + _M_erase_at_end(std::copy(__x.begin(), __x.end(), + this->_M_impl._M_start)); + else + { + const_iterator __mid = __x.begin() + difference_type(__len); + std::copy(__x.begin(), __mid, this->_M_impl._M_start); + insert(this->_M_impl._M_finish, __mid, __x.end()); + } + } + return *this; + } +# 118 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/deque.tcc" 3 + template + typename deque<_Tp, _Alloc>::iterator + deque<_Tp, _Alloc>:: + insert(iterator __position, const value_type& __x) + { + if (__position._M_cur == this->_M_impl._M_start._M_cur) + { + push_front(__x); + return this->_M_impl._M_start; + } + else if (__position._M_cur == this->_M_impl._M_finish._M_cur) + { + push_back(__x); + iterator __tmp = this->_M_impl._M_finish; + --__tmp; + return __tmp; + } + else + return _M_insert_aux(__position, __x); + } +# 163 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/deque.tcc" 3 + template + typename deque<_Tp, _Alloc>::iterator + deque<_Tp, _Alloc>:: + erase(iterator __position) + { + iterator __next = __position; + ++__next; + const difference_type __index = __position - begin(); + if (static_cast(__index) < (size() >> 1)) + { + if (__position != begin()) + std::copy_backward(begin(), __position, __next); + pop_front(); + } + else + { + if (__next != end()) + std::copy(__next, end(), __position); + pop_back(); + } + return begin() + __index; + } + + template + typename deque<_Tp, _Alloc>::iterator + deque<_Tp, _Alloc>:: + erase(iterator __first, iterator __last) + { + if (__first == begin() && __last == end()) + { + clear(); + return end(); + } + else + { + const difference_type __n = __last - __first; + const difference_type __elems_before = __first - begin(); + if (static_cast(__elems_before) <= (size() - __n) / 2) + { + if (__first != begin()) + std::copy_backward(begin(), __first, __last); + _M_erase_at_begin(begin() + __n); + } + else + { + if (__last != end()) + std::copy(__last, end(), __first); + _M_erase_at_end(end() - __n); + } + return begin() + __elems_before; + } + } + + template + template + void + deque<_Tp, _Alloc>:: + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + iterator __cur = begin(); + for (; __first != __last && __cur != end(); ++__cur, ++__first) + *__cur = *__first; + if (__first == __last) + _M_erase_at_end(__cur); + else + insert(end(), __first, __last); + } + + template + void + deque<_Tp, _Alloc>:: + _M_fill_insert(iterator __pos, size_type __n, const value_type& __x) + { + if (__pos._M_cur == this->_M_impl._M_start._M_cur) + { + iterator __new_start = _M_reserve_elements_at_front(__n); + try + { + std::__uninitialized_fill_a(__new_start, this->_M_impl._M_start, + __x, _M_get_Tp_allocator()); + this->_M_impl._M_start = __new_start; + } + catch(...) + { + _M_destroy_nodes(__new_start._M_node, + this->_M_impl._M_start._M_node); + throw; + } + } + else if (__pos._M_cur == this->_M_impl._M_finish._M_cur) + { + iterator __new_finish = _M_reserve_elements_at_back(__n); + try + { + std::__uninitialized_fill_a(this->_M_impl._M_finish, + __new_finish, __x, + _M_get_Tp_allocator()); + this->_M_impl._M_finish = __new_finish; + } + catch(...) + { + _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, + __new_finish._M_node + 1); + throw; + } + } + else + _M_insert_aux(__pos, __n, __x); + } + + template + void + deque<_Tp, _Alloc>:: + _M_fill_initialize(const value_type& __value) + { + _Map_pointer __cur; + try + { + for (__cur = this->_M_impl._M_start._M_node; + __cur < this->_M_impl._M_finish._M_node; + ++__cur) + std::__uninitialized_fill_a(*__cur, *__cur + _S_buffer_size(), + __value, _M_get_Tp_allocator()); + std::__uninitialized_fill_a(this->_M_impl._M_finish._M_first, + this->_M_impl._M_finish._M_cur, + __value, _M_get_Tp_allocator()); + } + catch(...) + { + std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur), + _M_get_Tp_allocator()); + throw; + } + } + + template + template + void + deque<_Tp, _Alloc>:: + _M_range_initialize(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + this->_M_initialize_map(0); + try + { + for (; __first != __last; ++__first) + push_back(*__first); + } + catch(...) + { + clear(); + throw; + } + } + + template + template + void + deque<_Tp, _Alloc>:: + _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __n = std::distance(__first, __last); + this->_M_initialize_map(__n); + + _Map_pointer __cur_node; + try + { + for (__cur_node = this->_M_impl._M_start._M_node; + __cur_node < this->_M_impl._M_finish._M_node; + ++__cur_node) + { + _ForwardIterator __mid = __first; + std::advance(__mid, _S_buffer_size()); + std::__uninitialized_copy_a(__first, __mid, *__cur_node, + _M_get_Tp_allocator()); + __first = __mid; + } + std::__uninitialized_copy_a(__first, __last, + this->_M_impl._M_finish._M_first, + _M_get_Tp_allocator()); + } + catch(...) + { + std::_Destroy(this->_M_impl._M_start, + iterator(*__cur_node, __cur_node), + _M_get_Tp_allocator()); + throw; + } + } + + + template + + + + + + + void + deque<_Tp, _Alloc>:: + _M_push_back_aux(const value_type& __t) + + { + _M_reserve_map_at_back(); + *(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node(); + try + { + + + + + this->_M_impl.construct(this->_M_impl._M_finish._M_cur, __t); + + this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node + + 1); + this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first; + } + catch(...) + { + _M_deallocate_node(*(this->_M_impl._M_finish._M_node + 1)); + throw; + } + } + + + template + + + + + + + void + deque<_Tp, _Alloc>:: + _M_push_front_aux(const value_type& __t) + + { + _M_reserve_map_at_front(); + *(this->_M_impl._M_start._M_node - 1) = this->_M_allocate_node(); + try + { + this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node + - 1); + this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_last - 1; + + + + + this->_M_impl.construct(this->_M_impl._M_start._M_cur, __t); + + } + catch(...) + { + ++this->_M_impl._M_start; + _M_deallocate_node(*(this->_M_impl._M_start._M_node - 1)); + throw; + } + } + + + template + void deque<_Tp, _Alloc>:: + _M_pop_back_aux() + { + _M_deallocate_node(this->_M_impl._M_finish._M_first); + this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node - 1); + this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_last - 1; + this->_M_impl.destroy(this->_M_impl._M_finish._M_cur); + } + + + + + + + template + void deque<_Tp, _Alloc>:: + _M_pop_front_aux() + { + this->_M_impl.destroy(this->_M_impl._M_start._M_cur); + _M_deallocate_node(this->_M_impl._M_start._M_first); + this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node + 1); + this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_first; + } + + template + template + void + deque<_Tp, _Alloc>:: + _M_range_insert_aux(iterator __pos, + _InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { std::copy(__first, __last, std::inserter(*this, __pos)); } + + template + template + void + deque<_Tp, _Alloc>:: + _M_range_insert_aux(iterator __pos, + _ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __n = std::distance(__first, __last); + if (__pos._M_cur == this->_M_impl._M_start._M_cur) + { + iterator __new_start = _M_reserve_elements_at_front(__n); + try + { + std::__uninitialized_copy_a(__first, __last, __new_start, + _M_get_Tp_allocator()); + this->_M_impl._M_start = __new_start; + } + catch(...) + { + _M_destroy_nodes(__new_start._M_node, + this->_M_impl._M_start._M_node); + throw; + } + } + else if (__pos._M_cur == this->_M_impl._M_finish._M_cur) + { + iterator __new_finish = _M_reserve_elements_at_back(__n); + try + { + std::__uninitialized_copy_a(__first, __last, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish = __new_finish; + } + catch(...) + { + _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, + __new_finish._M_node + 1); + throw; + } + } + else + _M_insert_aux(__pos, __first, __last, __n); + } + + template +# 514 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/deque.tcc" 3 + typename deque<_Tp, _Alloc>::iterator + deque<_Tp, _Alloc>:: + _M_insert_aux(iterator __pos, const value_type& __x) + { + value_type __x_copy = __x; + + difference_type __index = __pos - this->_M_impl._M_start; + if (static_cast(__index) < size() / 2) + { + push_front((front())); + iterator __front1 = this->_M_impl._M_start; + ++__front1; + iterator __front2 = __front1; + ++__front2; + __pos = this->_M_impl._M_start + __index; + iterator __pos1 = __pos; + ++__pos1; + std::copy(__front2, __pos1, __front1); + } + else + { + push_back((back())); + iterator __back1 = this->_M_impl._M_finish; + --__back1; + iterator __back2 = __back1; + --__back2; + __pos = this->_M_impl._M_start + __index; + std::copy_backward(__pos, __back2, __back1); + } + *__pos = (__x_copy); + return __pos; + } + + template + void + deque<_Tp, _Alloc>:: + _M_insert_aux(iterator __pos, size_type __n, const value_type& __x) + { + const difference_type __elems_before = __pos - this->_M_impl._M_start; + const size_type __length = this->size(); + value_type __x_copy = __x; + if (__elems_before < difference_type(__length / 2)) + { + iterator __new_start = _M_reserve_elements_at_front(__n); + iterator __old_start = this->_M_impl._M_start; + __pos = this->_M_impl._M_start + __elems_before; + try + { + if (__elems_before >= difference_type(__n)) + { + iterator __start_n = (this->_M_impl._M_start + + difference_type(__n)); + std::__uninitialized_move_a(this->_M_impl._M_start, + __start_n, __new_start, + _M_get_Tp_allocator()); + this->_M_impl._M_start = __new_start; + std::copy(__start_n, __pos, __old_start); + std::fill(__pos - difference_type(__n), __pos, __x_copy); + } + else + { + std::__uninitialized_move_fill(this->_M_impl._M_start, + __pos, __new_start, + this->_M_impl._M_start, + __x_copy, + _M_get_Tp_allocator()); + this->_M_impl._M_start = __new_start; + std::fill(__old_start, __pos, __x_copy); + } + } + catch(...) + { + _M_destroy_nodes(__new_start._M_node, + this->_M_impl._M_start._M_node); + throw; + } + } + else + { + iterator __new_finish = _M_reserve_elements_at_back(__n); + iterator __old_finish = this->_M_impl._M_finish; + const difference_type __elems_after = + difference_type(__length) - __elems_before; + __pos = this->_M_impl._M_finish - __elems_after; + try + { + if (__elems_after > difference_type(__n)) + { + iterator __finish_n = (this->_M_impl._M_finish + - difference_type(__n)); + std::__uninitialized_move_a(__finish_n, + this->_M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish = __new_finish; + std::copy_backward(__pos, __finish_n, __old_finish); + std::fill(__pos, __pos + difference_type(__n), __x_copy); + } + else + { + std::__uninitialized_fill_move(this->_M_impl._M_finish, + __pos + difference_type(__n), + __x_copy, __pos, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish = __new_finish; + std::fill(__pos, __old_finish, __x_copy); + } + } + catch(...) + { + _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, + __new_finish._M_node + 1); + throw; + } + } + } + + template + template + void + deque<_Tp, _Alloc>:: + _M_insert_aux(iterator __pos, + _ForwardIterator __first, _ForwardIterator __last, + size_type __n) + { + const difference_type __elemsbefore = __pos - this->_M_impl._M_start; + const size_type __length = size(); + if (static_cast(__elemsbefore) < __length / 2) + { + iterator __new_start = _M_reserve_elements_at_front(__n); + iterator __old_start = this->_M_impl._M_start; + __pos = this->_M_impl._M_start + __elemsbefore; + try + { + if (__elemsbefore >= difference_type(__n)) + { + iterator __start_n = (this->_M_impl._M_start + + difference_type(__n)); + std::__uninitialized_move_a(this->_M_impl._M_start, + __start_n, __new_start, + _M_get_Tp_allocator()); + this->_M_impl._M_start = __new_start; + std::copy(__start_n, __pos, __old_start); + std::copy(__first, __last, __pos - difference_type(__n)); + } + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, difference_type(__n) - __elemsbefore); + std::__uninitialized_move_copy(this->_M_impl._M_start, + __pos, __first, __mid, + __new_start, + _M_get_Tp_allocator()); + this->_M_impl._M_start = __new_start; + std::copy(__mid, __last, __old_start); + } + } + catch(...) + { + _M_destroy_nodes(__new_start._M_node, + this->_M_impl._M_start._M_node); + throw; + } + } + else + { + iterator __new_finish = _M_reserve_elements_at_back(__n); + iterator __old_finish = this->_M_impl._M_finish; + const difference_type __elemsafter = + difference_type(__length) - __elemsbefore; + __pos = this->_M_impl._M_finish - __elemsafter; + try + { + if (__elemsafter > difference_type(__n)) + { + iterator __finish_n = (this->_M_impl._M_finish + - difference_type(__n)); + std::__uninitialized_move_a(__finish_n, + this->_M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish = __new_finish; + std::copy_backward(__pos, __finish_n, __old_finish); + std::copy(__first, __last, __pos); + } + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, __elemsafter); + std::__uninitialized_copy_move(__mid, __last, __pos, + this->_M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish = __new_finish; + std::copy(__first, __mid, __pos); + } + } + catch(...) + { + _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, + __new_finish._M_node + 1); + throw; + } + } + } + + template + void + deque<_Tp, _Alloc>:: + _M_destroy_data_aux(iterator __first, iterator __last) + { + for (_Map_pointer __node = __first._M_node + 1; + __node < __last._M_node; ++__node) + std::_Destroy(*__node, *__node + _S_buffer_size(), + _M_get_Tp_allocator()); + + if (__first._M_node != __last._M_node) + { + std::_Destroy(__first._M_cur, __first._M_last, + _M_get_Tp_allocator()); + std::_Destroy(__last._M_first, __last._M_cur, + _M_get_Tp_allocator()); + } + else + std::_Destroy(__first._M_cur, __last._M_cur, + _M_get_Tp_allocator()); + } + + template + void + deque<_Tp, _Alloc>:: + _M_new_elements_at_front(size_type __new_elems) + { + if (this->max_size() - this->size() < __new_elems) + __throw_length_error(("deque::_M_new_elements_at_front")); + + const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1) + / _S_buffer_size()); + _M_reserve_map_at_front(__new_nodes); + size_type __i; + try + { + for (__i = 1; __i <= __new_nodes; ++__i) + *(this->_M_impl._M_start._M_node - __i) = this->_M_allocate_node(); + } + catch(...) + { + for (size_type __j = 1; __j < __i; ++__j) + _M_deallocate_node(*(this->_M_impl._M_start._M_node - __j)); + throw; + } + } + + template + void + deque<_Tp, _Alloc>:: + _M_new_elements_at_back(size_type __new_elems) + { + if (this->max_size() - this->size() < __new_elems) + __throw_length_error(("deque::_M_new_elements_at_back")); + + const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1) + / _S_buffer_size()); + _M_reserve_map_at_back(__new_nodes); + size_type __i; + try + { + for (__i = 1; __i <= __new_nodes; ++__i) + *(this->_M_impl._M_finish._M_node + __i) = this->_M_allocate_node(); + } + catch(...) + { + for (size_type __j = 1; __j < __i; ++__j) + _M_deallocate_node(*(this->_M_impl._M_finish._M_node + __j)); + throw; + } + } + + template + void + deque<_Tp, _Alloc>:: + _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front) + { + const size_type __old_num_nodes + = this->_M_impl._M_finish._M_node - this->_M_impl._M_start._M_node + 1; + const size_type __new_num_nodes = __old_num_nodes + __nodes_to_add; + + _Map_pointer __new_nstart; + if (this->_M_impl._M_map_size > 2 * __new_num_nodes) + { + __new_nstart = this->_M_impl._M_map + (this->_M_impl._M_map_size + - __new_num_nodes) / 2 + + (__add_at_front ? __nodes_to_add : 0); + if (__new_nstart < this->_M_impl._M_start._M_node) + std::copy(this->_M_impl._M_start._M_node, + this->_M_impl._M_finish._M_node + 1, + __new_nstart); + else + std::copy_backward(this->_M_impl._M_start._M_node, + this->_M_impl._M_finish._M_node + 1, + __new_nstart + __old_num_nodes); + } + else + { + size_type __new_map_size = this->_M_impl._M_map_size + + std::max(this->_M_impl._M_map_size, + __nodes_to_add) + 2; + + _Map_pointer __new_map = this->_M_allocate_map(__new_map_size); + __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2 + + (__add_at_front ? __nodes_to_add : 0); + std::copy(this->_M_impl._M_start._M_node, + this->_M_impl._M_finish._M_node + 1, + __new_nstart); + _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); + + this->_M_impl._M_map = __new_map; + this->_M_impl._M_map_size = __new_map_size; + } + + this->_M_impl._M_start._M_set_node(__new_nstart); + this->_M_impl._M_finish._M_set_node(__new_nstart + __old_num_nodes - 1); + } + + + + template + void + fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>& __first, + const _Deque_iterator<_Tp, _Tp&, _Tp*>& __last, const _Tp& __value) + { + typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; + + for (typename _Self::_Map_pointer __node = __first._M_node + 1; + __node < __last._M_node; ++__node) + std::fill(*__node, *__node + _Self::_S_buffer_size(), __value); + + if (__first._M_node != __last._M_node) + { + std::fill(__first._M_cur, __first._M_last, __value); + std::fill(__last._M_first, __last._M_cur, __value); + } + else + std::fill(__first._M_cur, __last._M_cur, __value); + } + + template + _Deque_iterator<_Tp, _Tp&, _Tp*> + copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, + _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, + _Deque_iterator<_Tp, _Tp&, _Tp*> __result) + { + typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; + typedef typename _Self::difference_type difference_type; + + difference_type __len = __last - __first; + while (__len > 0) + { + const difference_type __clen + = std::min(__len, std::min(__first._M_last - __first._M_cur, + __result._M_last - __result._M_cur)); + std::copy(__first._M_cur, __first._M_cur + __clen, __result._M_cur); + __first += __clen; + __result += __clen; + __len -= __clen; + } + return __result; + } + + template + _Deque_iterator<_Tp, _Tp&, _Tp*> + copy_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, + _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, + _Deque_iterator<_Tp, _Tp&, _Tp*> __result) + { + typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; + typedef typename _Self::difference_type difference_type; + + difference_type __len = __last - __first; + while (__len > 0) + { + difference_type __llen = __last._M_cur - __last._M_first; + _Tp* __lend = __last._M_cur; + + difference_type __rlen = __result._M_cur - __result._M_first; + _Tp* __rend = __result._M_cur; + + if (!__llen) + { + __llen = _Self::_S_buffer_size(); + __lend = *(__last._M_node - 1) + __llen; + } + if (!__rlen) + { + __rlen = _Self::_S_buffer_size(); + __rend = *(__result._M_node - 1) + __rlen; + } + + const difference_type __clen = std::min(__len, + std::min(__llen, __rlen)); + std::copy_backward(__lend - __clen, __lend, __rend); + __last -= __clen; + __result -= __clen; + __len -= __clen; + } + return __result; + } +# 987 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/deque.tcc" 3 +} +# 69 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/deque" 2 3 +# 62 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/queue" 2 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_heap.h" 1 3 +# 57 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_heap.h" 3 +#define _STL_HEAP_H 1 + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + + + + + template + _Distance + __is_heap_until(_RandomAccessIterator __first, _Distance __n) + { + _Distance __parent = 0; + for (_Distance __child = 1; __child < __n; ++__child) + { + if (__first[__parent] < __first[__child]) + return __child; + if ((__child & 1) == 0) + ++__parent; + } + return __n; + } + + template + _Distance + __is_heap_until(_RandomAccessIterator __first, _Distance __n, + _Compare __comp) + { + _Distance __parent = 0; + for (_Distance __child = 1; __child < __n; ++__child) + { + if (__comp(__first[__parent], __first[__child])) + return __child; + if ((__child & 1) == 0) + ++__parent; + } + return __n; + } + + + + template + inline bool + __is_heap(_RandomAccessIterator __first, _Distance __n) + { return std::__is_heap_until(__first, __n) == __n; } + + template + inline bool + __is_heap(_RandomAccessIterator __first, _Compare __comp, _Distance __n) + { return std::__is_heap_until(__first, __n, __comp) == __n; } + + template + inline bool + __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { return std::__is_heap(__first, std::distance(__first, __last)); } + + template + inline bool + __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { return std::__is_heap(__first, __comp, std::distance(__first, __last)); } + + + + + template + void + __push_heap(_RandomAccessIterator __first, + _Distance __holeIndex, _Distance __topIndex, _Tp __value) + { + _Distance __parent = (__holeIndex - 1) / 2; + while (__holeIndex > __topIndex && *(__first + __parent) < __value) + { + *(__first + __holeIndex) = (*(__first + __parent)); + __holeIndex = __parent; + __parent = (__holeIndex - 1) / 2; + } + *(__first + __holeIndex) = (__value); + } +# 152 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_heap.h" 3 + template + inline void + push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + + ; + ; + + _ValueType __value = (*(__last - 1)); + std::__push_heap(__first, _DistanceType((__last - __first) - 1), + _DistanceType(0), (__value)); + } + + template + void + __push_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __topIndex, _Tp __value, _Compare __comp) + { + _Distance __parent = (__holeIndex - 1) / 2; + while (__holeIndex > __topIndex + && __comp(*(__first + __parent), __value)) + { + *(__first + __holeIndex) = (*(__first + __parent)); + __holeIndex = __parent; + __parent = (__holeIndex - 1) / 2; + } + *(__first + __holeIndex) = (__value); + } +# 201 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_heap.h" 3 + template + inline void + push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + ; + ; + + _ValueType __value = (*(__last - 1)); + std::__push_heap(__first, _DistanceType((__last - __first) - 1), + _DistanceType(0), (__value), __comp); + } + + template + void + __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __len, _Tp __value) + { + const _Distance __topIndex = __holeIndex; + _Distance __secondChild = __holeIndex; + while (__secondChild < (__len - 1) / 2) + { + __secondChild = 2 * (__secondChild + 1); + if (*(__first + __secondChild) < *(__first + (__secondChild - 1))) + __secondChild--; + *(__first + __holeIndex) = (*(__first + __secondChild)); + __holeIndex = __secondChild; + } + if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2) + { + __secondChild = 2 * (__secondChild + 1); + *(__first + __holeIndex) = (*(__first + (__secondChild - 1))) + ; + __holeIndex = __secondChild - 1; + } + std::__push_heap(__first, __holeIndex, __topIndex, + (__value)); + } + + template + inline void + __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _RandomAccessIterator __result) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + _ValueType __value = (*__result); + *__result = (*__first); + std::__adjust_heap(__first, _DistanceType(0), + _DistanceType(__last - __first), + (__value)); + } +# 274 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_heap.h" 3 + template + inline void + pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + + + + ; + ; + + --__last; + std::__pop_heap(__first, __last, __last); + } + + template + void + __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __len, _Tp __value, _Compare __comp) + { + const _Distance __topIndex = __holeIndex; + _Distance __secondChild = __holeIndex; + while (__secondChild < (__len - 1) / 2) + { + __secondChild = 2 * (__secondChild + 1); + if (__comp(*(__first + __secondChild), + *(__first + (__secondChild - 1)))) + __secondChild--; + *(__first + __holeIndex) = (*(__first + __secondChild)); + __holeIndex = __secondChild; + } + if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2) + { + __secondChild = 2 * (__secondChild + 1); + *(__first + __holeIndex) = (*(__first + (__secondChild - 1))) + ; + __holeIndex = __secondChild - 1; + } + std::__push_heap(__first, __holeIndex, __topIndex, + (__value), __comp); + } + + template + inline void + __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _RandomAccessIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + _ValueType __value = (*__result); + *__result = (*__first); + std::__adjust_heap(__first, _DistanceType(0), + _DistanceType(__last - __first), + (__value), __comp); + } +# 348 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_heap.h" 3 + template + inline void + pop_heap(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + + + + ; + ; + + --__last; + std::__pop_heap(__first, __last, __last, __comp); + } +# 371 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_heap.h" 3 + template + void + make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + + ; + + if (__last - __first < 2) + return; + + const _DistanceType __len = __last - __first; + _DistanceType __parent = (__len - 2) / 2; + while (true) + { + _ValueType __value = (*(__first + __parent)); + std::__adjust_heap(__first, __parent, __len, (__value)); + if (__parent == 0) + return; + __parent--; + } + } +# 411 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_heap.h" 3 + template + void + make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + ; + + if (__last - __first < 2) + return; + + const _DistanceType __len = __last - __first; + _DistanceType __parent = (__len - 2) / 2; + while (true) + { + _ValueType __value = (*(__first + __parent)); + std::__adjust_heap(__first, __parent, __len, (__value), + __comp); + if (__parent == 0) + return; + __parent--; + } + } +# 450 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_heap.h" 3 + template + void + sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + + + + + + ; + ; + + while (__last - __first > 1) + { + --__last; + std::__pop_heap(__first, __last, __last); + } + } +# 479 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_heap.h" 3 + template + void + sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + + + + ; + ; + + while (__last - __first > 1) + { + --__last; + std::__pop_heap(__first, __last, __last, __comp); + } + } +# 576 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_heap.h" 3 +} +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/queue" 2 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_queue.h" 1 3 +# 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_queue.h" 3 +#define _STL_QUEUE_H 1 + + + + +namespace std __attribute__ ((__visibility__ ("default"))) { +# 88 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_queue.h" 3 + template > + class queue + { + + typedef typename _Sequence::value_type _Sequence_value_type; + + + + + + template + friend bool + operator==(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&); + + template + friend bool + operator<(const queue<_Tp1, _Seq1>&, const queue<_Tp1, _Seq1>&); + + public: + typedef typename _Sequence::value_type value_type; + typedef typename _Sequence::reference reference; + typedef typename _Sequence::const_reference const_reference; + typedef typename _Sequence::size_type size_type; + typedef _Sequence container_type; + + protected: +# 122 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_queue.h" 3 + _Sequence c; + + public: + + + + + explicit + queue(const _Sequence& __c = _Sequence()) + : c(__c) { } +# 155 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_queue.h" 3 + bool + empty() const + { return c.empty(); } + + + size_type + size() const + { return c.size(); } + + + + + + reference + front() + { + ; + return c.front(); + } + + + + + + const_reference + front() const + { + ; + return c.front(); + } + + + + + + reference + back() + { + ; + return c.back(); + } + + + + + + const_reference + back() const + { + ; + return c.back(); + } +# 217 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_queue.h" 3 + void + push(const value_type& __x) + { c.push_back(__x); } +# 243 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_queue.h" 3 + void + pop() + { + ; + c.pop_front(); + } + + + + + + + }; +# 268 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_queue.h" 3 + template + inline bool + operator==(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) + { return __x.c == __y.c; } +# 286 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_queue.h" 3 + template + inline bool + operator<(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) + { return __x.c < __y.c; } + + + template + inline bool + operator!=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) + { return !(__x == __y); } + + + template + inline bool + operator>(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) + { return __y < __x; } + + + template + inline bool + operator<=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) + { return !(__y < __x); } + + + template + inline bool + operator>=(const queue<_Tp, _Seq>& __x, const queue<_Tp, _Seq>& __y) + { return !(__x < __y); } +# 357 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_queue.h" 3 + template, + typename _Compare = less > + class priority_queue + { + + typedef typename _Sequence::value_type _Sequence_value_type; + + + + + + + + public: + typedef typename _Sequence::value_type value_type; + typedef typename _Sequence::reference reference; + typedef typename _Sequence::const_reference const_reference; + typedef typename _Sequence::size_type size_type; + typedef _Sequence container_type; + + protected: + + _Sequence c; + _Compare comp; + + public: + + + + + explicit + priority_queue(const _Compare& __x = _Compare(), + const _Sequence& __s = _Sequence()) + : c(__s), comp(__x) + { std::make_heap(c.begin(), c.end(), comp); } +# 422 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_queue.h" 3 + template + priority_queue(_InputIterator __first, _InputIterator __last, + const _Compare& __x = _Compare(), + const _Sequence& __s = _Sequence()) + : c(__s), comp(__x) + { + ; + c.insert(c.end(), __first, __last); + std::make_heap(c.begin(), c.end(), comp); + } +# 470 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_queue.h" 3 + bool + empty() const + { return c.empty(); } + + + size_type + size() const + { return c.size(); } + + + + + + const_reference + top() const + { + ; + return c.front(); + } +# 498 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_queue.h" 3 + void + push(const value_type& __x) + { + c.push_back(__x); + std::push_heap(c.begin(), c.end(), comp); + } +# 533 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_queue.h" 3 + void + pop() + { + ; + std::pop_heap(c.begin(), c.end(), comp); + c.pop_back(); + } +# 550 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_queue.h" 3 + }; +# 562 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/bits/stl_queue.h" 3 +} +# 66 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/g++-v4/queue" 2 3 +# 37 "../fwbuilder/ThreadTools.h" 2 + + + +namespace libfwbuilder +{ + + + + +class Mutex +{ + friend class Cond; + + protected: + + pthread_mutex_t mutex; + + public: + + Mutex(); + virtual ~Mutex(); + + void lock() const; + void unlock() const; + +}; + + + + +class Cond +{ + protected: + + pthread_cond_t cond; + + public: + + Cond(); + virtual ~Cond(); + + bool wait(const Mutex &mutex) const; + void signal () const; + void broadcast() const; + +}; + + + + + +class SyncFlag: public Mutex +{ + private: + + bool value; + + public: + + SyncFlag(bool v=false); + + + + + + bool peek() const; + + + + + + void modify(bool v); + + bool get() const; + void set(bool v); + + operator bool() const; + SyncFlag& operator=(const SyncFlag &o); + SyncFlag& operator=(bool v); +}; + + + + + +class TimeoutCounter +{ + private: + + unsigned int timeout ; + std::string name ; + time_t finish ; + + public: +# 139 "../fwbuilder/ThreadTools.h" + TimeoutCounter(unsigned int timeout, const std::string &name); + + + + + + + void start(); + + + + + + unsigned int timeLeft() const; + + + + + bool isExpired() const; + + + + + void check() const throw(FWException) ; + + + + + + ssize_t read(int fd, void *buf, size_t n) const throw(FWException); + +}; + + + + + +} +# 33 "../fwbuilder/FWObjectDatabase.h" 2 +# 45 "../fwbuilder/FWObjectDatabase.h" +#define DECLARE_CREATE_OBJ_METHOD(classname) FWObject* create_ ##classname(int id=-1); + + +#define DECLARE_CREATE_OBJ_CLASS_METHOD(classname) classname * create ##classname(int id=-1); + + + +namespace libfwbuilder +{ + class Group; + + + class AddressRange; + class AddressTable; + class AttachedNetworks; + class Cluster; + class StateSyncClusterGroup; + class FailoverClusterGroup; + class ClusterGroupOptions; + class CustomService; + class DNSName; + class DynamicGroup; + class FWBDManagement; + class FWIntervalReference; + class FWObjectReference; + class FWServiceReference; + class Firewall; + class FirewallOptions; + class Host; + class HostOptions; + class ICMP6Service; + class ICMPService; + class IPService; + class IPv4; + class IPv6; + class Interface; + class InterfaceOptions; + class Interval; + class IntervalGroup; + class Library; + class Management; + class NAT; + class NATRule; + class NATRuleOptions; + class Network; + class NetworkIPv6; + class ObjectGroup; + class Policy; + class PolicyInstallScript; + class PolicyRule; + class PolicyRuleOptions; + class Routing; + class RoutingRule; + class RoutingRuleOptions; + class RuleElementDst; + class RuleElementInterval; + class RuleElementItf; + class RuleElementItfInb; + class RuleElementItfOutb; + class RuleElementODst; + class RuleElementOSrc; + class RuleElementOSrv; + class RuleElementRDst; + class RuleElementRGtw; + class RuleElementRItf; + class RuleElementSrc; + class RuleElementSrv; + class RuleElementTDst; + class RuleElementTSrc; + class RuleElementTSrv; + class RuleSetOptions; + class SNMPManagement; + class ServiceGroup; + class TCPService; + class TagService; + class UDPService; + class UserService; + class physAddress; + + + + FWObject* create_AddressRange(int id=-1);; + FWObject* create_AddressTable(int id=-1);; + FWObject* create_AttachedNetworks(int id=-1);; + FWObject* create_Cluster(int id=-1);; + FWObject* create_StateSyncClusterGroup(int id=-1);; + FWObject* create_FailoverClusterGroup(int id=-1);; + FWObject* create_ClusterGroupOptions(int id=-1);; + FWObject* create_CustomService(int id=-1);; + FWObject* create_DNSName(int id=-1);; + FWObject* create_DynamicGroup(int id=-1);; + FWObject* create_FWBDManagement(int id=-1);; + FWObject* create_FWIntervalReference(int id=-1);; + FWObject* create_FWObjectReference(int id=-1);; + FWObject* create_FWServiceReference(int id=-1);; + FWObject* create_Firewall(int id=-1);; + FWObject* create_FirewallOptions(int id=-1);; + FWObject* create_Host(int id=-1);; + FWObject* create_HostOptions(int id=-1);; + FWObject* create_ICMP6Service(int id=-1);; + FWObject* create_ICMPService(int id=-1);; + FWObject* create_IPService(int id=-1);; + FWObject* create_IPv4(int id=-1);; + FWObject* create_IPv6(int id=-1);; + FWObject* create_Interface(int id=-1);; + FWObject* create_InterfaceOptions(int id=-1);; + FWObject* create_Interval(int id=-1);; + FWObject* create_IntervalGroup(int id=-1);; + FWObject* create_Library(int id=-1);; + FWObject* create_Management(int id=-1);; + FWObject* create_NAT(int id=-1);; + FWObject* create_NATRule(int id=-1);; + FWObject* create_NATRuleOptions(int id=-1);; + FWObject* create_Network(int id=-1);; + FWObject* create_NetworkIPv6(int id=-1);; + FWObject* create_ObjectGroup(int id=-1);; + FWObject* create_Policy(int id=-1);; + FWObject* create_PolicyInstallScript(int id=-1);; + FWObject* create_PolicyRule(int id=-1);; + FWObject* create_PolicyRuleOptions(int id=-1);; + FWObject* create_Routing(int id=-1);; + FWObject* create_RoutingRule(int id=-1);; + FWObject* create_RoutingRuleOptions(int id=-1);; + FWObject* create_RuleElementDst(int id=-1);; + FWObject* create_RuleElementInterval(int id=-1);; + FWObject* create_RuleElementItf(int id=-1);; + FWObject* create_RuleElementItfInb(int id=-1);; + FWObject* create_RuleElementItfOutb(int id=-1);; + FWObject* create_RuleElementODst(int id=-1);; + FWObject* create_RuleElementOSrc(int id=-1);; + FWObject* create_RuleElementOSrv(int id=-1);; + FWObject* create_RuleElementRDst(int id=-1);; + FWObject* create_RuleElementRGtw(int id=-1);; + FWObject* create_RuleElementRItf(int id=-1);; + FWObject* create_RuleElementSrc(int id=-1);; + FWObject* create_RuleElementSrv(int id=-1);; + FWObject* create_RuleElementTDst(int id=-1);; + FWObject* create_RuleElementTSrc(int id=-1);; + FWObject* create_RuleElementTSrv(int id=-1);; + FWObject* create_RuleSetOptions(int id=-1);; + FWObject* create_SNMPManagement(int id=-1);; + FWObject* create_ServiceGroup(int id=-1);; + FWObject* create_TCPService(int id=-1);; + FWObject* create_TagService(int id=-1);; + FWObject* create_UDPService(int id=-1);; + FWObject* create_UserService(int id=-1);; + FWObject* create_physAddress(int id=-1);; + FWObject* create_Group(int id=-1);; + + + class IDcounter { + +protected: + long cntr; + +public: + IDcounter(); + long get() { ++cntr; return cntr; } + }; + + class FWObjectDatabase; + typedef FWObject*(*create_function_ptr)(int); + + + + + class FWObjectDatabase : public FWObject + { + +private: + void _clearReferenceCounters(FWObject *o); + void _fixReferenceCounters(FWObject *o); + bool _isInIgnoreList(FWObject *o); + + + + + + + bool _findWhereObjectIsUsed(libfwbuilder::FWObject *o, + libfwbuilder::FWObject *p, + std::set &resset, + int search_id); + + void _findObjectsInGroup( + libfwbuilder::Group *g, + std::set &res); + Firewall* _findFirewallByNameRecursive( + FWObject* db, const std::string &name) throw(FWException); + FWObject* _recursively_copy_subtree(FWObject *target, + FWObject *source, + std::map &id_map, + const std::string &dedup_attribute); + void _copy_foreign_obj_aux(FWObject *target, FWObject *source, + std::map &id_map, + const std::string &dedup_attribute); + + void _setPredictableStrIdsRecursively(FWObject *obj); + void _updateNonStandardObjectReferencesRecursively(FWObject *obj); + +protected: + + static const std::string DTD_FILE_NAME ; + + time_t lastModified; + int index_hits; + int index_misses; + std::string data_file; + std::map obj_index; + int searchId; + int predictable_id_tracker; + bool ignore_read_only; + + void init_create_methods_table(); + void init_id_dict(); + +public: + + static const char *TYPENAME; virtual std::string getTypeName() const { return TYPENAME; } static bool isA(const FWObject *o) { return o && o->getTypeName()==TYPENAME; } static FWObjectDatabase* cast(FWObject *o) { return dynamic_cast(o); } static const FWObjectDatabase* constcast(const FWObject *o) { return dynamic_cast(o); }; + + virtual void* dispatch(Dispatch* _d, void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, void* _a1) const {return _d->dispatch(this, _a1); } virtual void* dispatch(Dispatch* _d, const void* _a1) const {return _d->dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, void* _a1) const {return _d->const_dispatch(this, _a1); } virtual const void* const_dispatch(Dispatch* _d, const void* _a1) const {return _d->const_dispatch(this, _a1); }; + + enum {ROOT_ID = 0, + ANY_ADDRESS_ID = 1, + ANY_SERVICE_ID = 2, + ANY_INTERVAL_ID = 3, + STANDARD_LIB_ID = 4, + USER_LIB_ID = 5, + TEMPLATE_LIB_ID = 6, + DELETED_OBJECTS_ID = 7 + } standard_ids; + + static void registerObjectType(const std::string &type_name, + create_function_ptr create_function); + + + + + FWObjectDatabase(); + + + + + FWObjectDatabase(FWObjectDatabase& d); + + virtual ~FWObjectDatabase(); + + + + void addToIndexRecursive(FWObject *o); + + + + + void addToIndex(FWObject* obj); + + + + + void removeFromIndex(int id); + + + + + FWObject* checkIndex(int id); + + + + + FWObject* findInIndex(int id); + + + + + void buildIndex(); + + + + + void clearIndex(); + + + + + + + void reIndex(); + + + + + void getIndexStats(int &index_size, int &hit_counter, int &miss_counter); + + + + + void validateIndex(); + + + + + + bool getIgnoreReadOnlyFlag() { return ignore_read_only; } + void setIgnoreReadOnlyFlag(bool f) { ignore_read_only = f; } + + + + virtual void fromXML(xmlNodePtr xml_parent_node) throw(FWException); + virtual xmlNodePtr toXML(xmlNodePtr parent) throw(FWException); + + time_t getTimeLastModified() { return lastModified; } + void resetTimeLastModified(time_t t) { lastModified=t; } + + + + virtual void saveFile(const std::string &filename) throw(FWException); + virtual void saveToBuffer(xmlChar **buffer,int *size) throw(FWException); + virtual void load( const std::string &filename, + XMLTools::UpgradePredicate *upgrade, + const std::string &template_dir) throw(FWException); + virtual void setDirty(bool f); + + Firewall* findFirewallByName(const std::string &name) throw(FWException); + + FWObjectDatabase* exportSubtree( FWObject *lib ); + FWObjectDatabase* exportSubtree( const std::list &libs ); +# 385 "../fwbuilder/FWObjectDatabase.h" + void findWhereObjectIsUsed( + libfwbuilder::FWObject *o, + libfwbuilder::FWObject *p, + std::set &resset); + + + + + + + void findObjectsInGroup( + libfwbuilder::Group *g, + std::set &resset); + + + + + + virtual FWObject& duplicate(const FWObject *obj, + bool preserve_id = true) throw(FWException); + + + void recursivelyRemoveObjFromTree(FWObject* obj, bool remove_ref=false); + + + + + + + + FWObject* recursivelyCopySubtree(FWObject *target, + FWObject *source, + std::map &id_map); + + + + + + + + FWObject* reproduceRelativePath(FWObject *lib, const FWObject *source); + + + + + + int fixReferences(FWObject *obj, const std::map &map_ids); + + + + + + + class ConflictResolutionPredicate + { + public: + virtual ~ConflictResolutionPredicate() {} + virtual bool askUser(FWObject*,FWObject*) + { + return true; + } + }; + + void merge(FWObjectDatabase *ndb, ConflictResolutionPredicate *mp=__null); + void findDuplicateIds(FWObjectDatabase *ndb, std::set &dupids); + + void setFileName(const std::string &filename); + const std::string& getFileName (); + const std::string getFileDir (); + + static int generateUniqueId(); + static int registerStringId(const std::string &s_id); + static int getIntId(const std::string &s_id); + static std::string getStringId(int i_id); + + + + + + std::string getPredictableId(const std::string &prefix); +# 475 "../fwbuilder/FWObjectDatabase.h" + virtual void setPredictableIds(); +# 485 "../fwbuilder/FWObjectDatabase.h" + FWObject *create(const std::string &type, int id=-1, bool init=true); + + + + + virtual FWObject *createFromXML(xmlNodePtr data); +# 499 "../fwbuilder/FWObjectDatabase.h" + AddressRange * createAddressRange(int id=-1);; + AddressTable * createAddressTable(int id=-1);; + AttachedNetworks * createAttachedNetworks(int id=-1);; + Cluster * createCluster(int id=-1);; + StateSyncClusterGroup * createStateSyncClusterGroup(int id=-1);; + FailoverClusterGroup * createFailoverClusterGroup(int id=-1);; + ClusterGroupOptions * createClusterGroupOptions(int id=-1);; + CustomService * createCustomService(int id=-1);; + DNSName * createDNSName(int id=-1);; + DynamicGroup * createDynamicGroup(int id=-1);; + FWBDManagement * createFWBDManagement(int id=-1);; + FWIntervalReference * createFWIntervalReference(int id=-1);; + FWObjectReference * createFWObjectReference(int id=-1);; + FWServiceReference * createFWServiceReference(int id=-1);; + Firewall * createFirewall(int id=-1);; + FirewallOptions * createFirewallOptions(int id=-1);; + Host * createHost(int id=-1);; + HostOptions * createHostOptions(int id=-1);; + ICMP6Service * createICMP6Service(int id=-1);; + ICMPService * createICMPService(int id=-1);; + IPService * createIPService(int id=-1);; + IPv4 * createIPv4(int id=-1);; + IPv6 * createIPv6(int id=-1);; + Interface * createInterface(int id=-1);; + InterfaceOptions * createInterfaceOptions(int id=-1);; + Interval * createInterval(int id=-1);; + IntervalGroup * createIntervalGroup(int id=-1);; + Library * createLibrary(int id=-1);; + Management * createManagement(int id=-1);; + NAT * createNAT(int id=-1);; + NATRule * createNATRule(int id=-1);; + NATRuleOptions * createNATRuleOptions(int id=-1);; + Network * createNetwork(int id=-1);; + NetworkIPv6 * createNetworkIPv6(int id=-1);; + ObjectGroup * createObjectGroup(int id=-1);; + Policy * createPolicy(int id=-1);; + PolicyInstallScript * createPolicyInstallScript(int id=-1);; + PolicyRule * createPolicyRule(int id=-1);; + PolicyRuleOptions * createPolicyRuleOptions(int id=-1);; + Routing * createRouting(int id=-1);; + RoutingRule * createRoutingRule(int id=-1);; + RoutingRuleOptions * createRoutingRuleOptions(int id=-1);; + RuleElementDst * createRuleElementDst(int id=-1);; + RuleElementInterval * createRuleElementInterval(int id=-1);; + RuleElementItf * createRuleElementItf(int id=-1);; + RuleElementItfInb * createRuleElementItfInb(int id=-1);; + RuleElementItfOutb * createRuleElementItfOutb(int id=-1);; + RuleElementODst * createRuleElementODst(int id=-1);; + RuleElementOSrc * createRuleElementOSrc(int id=-1);; + RuleElementOSrv * createRuleElementOSrv(int id=-1);; + RuleElementRDst * createRuleElementRDst(int id=-1);; + RuleElementRGtw * createRuleElementRGtw(int id=-1);; + RuleElementRItf * createRuleElementRItf(int id=-1);; + RuleElementSrc * createRuleElementSrc(int id=-1);; + RuleElementSrv * createRuleElementSrv(int id=-1);; + RuleElementTDst * createRuleElementTDst(int id=-1);; + RuleElementTSrc * createRuleElementTSrc(int id=-1);; + RuleElementTSrv * createRuleElementTSrv(int id=-1);; + RuleSetOptions * createRuleSetOptions(int id=-1);; + SNMPManagement * createSNMPManagement(int id=-1);; + ServiceGroup * createServiceGroup(int id=-1);; + TCPService * createTCPService(int id=-1);; + TagService * createTagService(int id=-1);; + UDPService * createUDPService(int id=-1);; + UserService * createUserService(int id=-1);; + physAddress * createphysAddress(int id=-1);; + Group * createGroup(int id=-1);; + + + }; + +} +# 36 "Address.cpp" 2 + +using namespace libfwbuilder; +using namespace std; + +const char *Address::TYPENAME={"Address"}; + +Address::Address() : FWObject() +{ + inet_addr_mask = new InetAddrMask(); + setName("address"); +} + +Address::Address(const Address& other) : FWObject(other) +{ + inet_addr_mask = new InetAddrMask(*(other.inet_addr_mask)); +} + +Address::~Address() +{ + delete inet_addr_mask; +} + +FWObject& Address::shallowDuplicate(const FWObject *other, + bool preserve_id) throw(FWException) +{ + const Address* a_other = Address::constcast(other); + delete inet_addr_mask; + inet_addr_mask = new InetAddrMask(*(a_other->inet_addr_mask)); + return FWObject::shallowDuplicate(other, preserve_id); +} + +FWReference* Address::createRef() +{ + FWObjectReference *ref = getRoot()->createFWObjectReference(); + ref->setPointer(this); + return ref; +} + +bool Address::isAny() const +{ + return getId()==FWObjectDatabase::ANY_ADDRESS_ID; +} + +const Address* Address::getAddressObject() const +{ + return __null; +} + +const InetAddrMask* Address::getInetAddrMaskObjectPtr() const +{ + const Address *addr_obj = getAddressObject(); + if (addr_obj) return addr_obj->inet_addr_mask; + return __null; +} + +bool Address::hasInetAddress() const +{ + return false; +} + +int Address::countInetAddresses(bool ) const +{ + return 0; +} + +const InetAddr* Address::getAddressPtr() const +{ + const InetAddrMask *inet_addr_mask = getInetAddrMaskObjectPtr(); + if (inet_addr_mask) return inet_addr_mask->getAddressPtr(); + return __null; +} + +const InetAddr* Address::getNetmaskPtr() const +{ + const InetAddrMask *inet_addr_mask = getInetAddrMaskObjectPtr(); + if (inet_addr_mask) return inet_addr_mask->getNetmaskPtr(); + return __null; +} + +const InetAddr* Address::getNetworkAddressPtr() const +{ + const InetAddrMask *inet_addr_mask = getInetAddrMaskObjectPtr(); + if (inet_addr_mask) return inet_addr_mask->getNetworkAddressPtr(); + return __null; +} + +const InetAddr* Address::getBroadcastAddressPtr() const +{ + const InetAddrMask *inet_addr_mask = getInetAddrMaskObjectPtr(); + if (inet_addr_mask) return inet_addr_mask->getBroadcastAddressPtr(); + return __null; +} + +void Address::setAddress(const InetAddr& a) +{ + inet_addr_mask->setAddress(a); +} + +void Address::setNetmask(const InetAddr& nm) +{ + inet_addr_mask->setNetmask(nm); +} + +void Address::setAddressNetmask(const std::string&) +{ +} + + + + + +unsigned int Address::dimension() const +{ + const InetAddrMask *addr_obj = getInetAddrMaskObjectPtr(); + if (addr_obj!=__null) return addr_obj->dimension(); + return 1; +} + +bool Address::belongs(const InetAddr &other) const +{ + const InetAddrMask *addr_obj = getInetAddrMaskObjectPtr(); + if (addr_obj!=__null) return addr_obj->belongs(other); + return false; +} + +bool Address::cmp(const FWObject *obj, bool recursive) throw(FWException) +{ + if (Address::constcast(obj)==__null) return false; + if (!FWObject::cmp(obj, recursive)) return false; + if (hasInetAddress()!=Address::constcast(obj)->hasInetAddress()) return false; + if (!hasInetAddress()) return true; + + return (*inet_addr_mask == *(Address::constcast(obj)->inet_addr_mask)); +} diff --git a/411691/id_manager.i b/411691/id_manager.i new file mode 100644 index 0000000..4d30f97 --- /dev/null +++ b/411691/id_manager.i @@ -0,0 +1,57 @@ +int foo(int *__mem); +template < typename _Tp > class new_allocator { +}; + +template < typename _CharT > struct char_traits; +template < typename _Tp > class allocator:public new_allocator < _Tp > { +}; + +template < typename _CharT, typename _Traits = + char_traits < _CharT >, typename _Alloc = + allocator < _CharT > >class basic_string; +typedef basic_string < char >string; +template < typename _CharT, typename _Traits, + typename _Alloc > class basic_string { + private:struct _Rep { + int _M_refcount; + void _M_dispose() { + if (this != &_S_empty_rep()) + if (foo(&this->_M_refcount)) ; + }}; + public: private:mutable _Alloc _M_dataplus; + _Rep *_M_rep() const { + } static _Rep & _S_empty_rep() { + } + public: basic_string():_M_dataplus(_S_empty_rep()._M_refdata(), + _Alloc()) { + } + ~basic_string() { + _M_rep()->_M_dispose(); + } +}; + +template < class T > class intrusive_ptr { + public:~intrusive_ptr() { + T *px; + intrusive_ptr_release(px); + } +}; + +template < typename T > struct intrusive_base { + friend void intrusive_ptr_release(T * ptr) { + delete ptr; +}}; +struct si:intrusive_base < si > { + intrusive_ptr < si > parent; + string id_1_1; +}; +string normalize_id(string) +{ +} + +void add_id_to_section(string & id) +{ + string id_part = id; + normalize_id(id); + intrusive_ptr < si > parent; +}; diff --git a/411691/id_manager.i.0 b/411691/id_manager.i.0 new file mode 100644 index 0000000..469e4f0 --- /dev/null +++ b/411691/id_manager.i.0 @@ -0,0 +1,92496 @@ +# 1 "quickbook/src/id_manager.cpp" +# 1 "" +# 1 "" +# 1 "quickbook/src/id_manager.cpp" +# 9 "quickbook/src/id_manager.cpp" +# 1 "quickbook/src/id_manager.hpp" 1 +# 12 "quickbook/src/id_manager.hpp" +# 1 "../boost/scoped_ptr.hpp" 1 +# 14 "../boost/scoped_ptr.hpp" +# 1 "../boost/smart_ptr/scoped_ptr.hpp" 1 +# 14 "../boost/smart_ptr/scoped_ptr.hpp" +# 1 "../boost/assert.hpp" 1 +# 50 "../boost/assert.hpp" +# 1 "/usr/include/assert.h" 1 3 4 +# 37 "/usr/include/assert.h" 3 4 +# 1 "/usr/include/features.h" 1 3 4 +# 357 "/usr/include/features.h" 3 4 +# 1 "/usr/include/sys/cdefs.h" 1 3 4 +# 353 "/usr/include/sys/cdefs.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 354 "/usr/include/sys/cdefs.h" 2 3 4 +# 358 "/usr/include/features.h" 2 3 4 +# 381 "/usr/include/features.h" 3 4 +# 1 "/usr/include/gnu/stubs.h" 1 3 4 + + + +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 5 "/usr/include/gnu/stubs.h" 2 3 4 + + + + +# 1 "/usr/include/gnu/stubs-64.h" 1 3 4 +# 10 "/usr/include/gnu/stubs.h" 2 3 4 +# 382 "/usr/include/features.h" 2 3 4 +# 38 "/usr/include/assert.h" 2 3 4 +# 51 "../boost/assert.hpp" 2 +# 15 "../boost/smart_ptr/scoped_ptr.hpp" 2 +# 1 "../boost/checked_delete.hpp" 1 +# 24 "../boost/checked_delete.hpp" +namespace boost +{ + + + +template inline void checked_delete(T * x) +{ + + typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; + (void) sizeof(type_must_be_complete); + delete x; +} + +template inline void checked_array_delete(T * x) +{ + typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; + (void) sizeof(type_must_be_complete); + delete [] x; +} + +template struct checked_deleter +{ + typedef void result_type; + typedef T * argument_type; + + void operator()(T * x) const + { + + boost::checked_delete(x); + } +}; + +template struct checked_array_deleter +{ + typedef void result_type; + typedef T * argument_type; + + void operator()(T * x) const + { + boost::checked_array_delete(x); + } +}; + +} +# 16 "../boost/smart_ptr/scoped_ptr.hpp" 2 +# 1 "../boost/detail/workaround.hpp" 1 +# 41 "../boost/detail/workaround.hpp" +# 1 "../boost/config.hpp" 1 +# 26 "../boost/config.hpp" +# 1 "../boost/config/user.hpp" 1 +# 27 "../boost/config.hpp" 2 + + + + +# 1 "../boost/config/select_compiler_config.hpp" 1 +# 32 "../boost/config.hpp" 2 + + + +# 1 "../boost/config/compiler/gcc.hpp" 1 +# 36 "../boost/config.hpp" 2 + + + + +# 1 "../boost/config/select_stdlib_config.hpp" 1 +# 18 "../boost/config/select_stdlib_config.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 1 3 +# 153 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 3 +namespace std +{ + typedef long unsigned int size_t; + typedef long int ptrdiff_t; + + + + +} +# 393 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/os_defines.h" 1 3 +# 394 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 2 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/cpu_defines.h" 1 3 +# 397 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h" 2 3 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 150 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 3 4 +typedef long int ptrdiff_t; +# 212 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 3 4 +typedef long unsigned int size_t; +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 19 "../boost/config/select_stdlib_config.hpp" 2 +# 37 "../boost/config/select_stdlib_config.hpp" +# 1 "../boost/config/no_tr1/utility.hpp" 1 +# 21 "../boost/config/no_tr1/utility.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/utility" 1 3 +# 59 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/utility" 3 + +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/utility" 3 +# 70 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/utility" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_relops.h" 1 3 +# 68 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_relops.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + namespace rel_ops + { + +# 86 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_relops.h" 3 + template + inline bool + operator!=(const _Tp& __x, const _Tp& __y) + { return !(__x == __y); } +# 99 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_relops.h" 3 + template + inline bool + operator>(const _Tp& __x, const _Tp& __y) + { return __y < __x; } +# 112 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_relops.h" 3 + template + inline bool + operator<=(const _Tp& __x, const _Tp& __y) + { return !(__y < __x); } +# 125 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_relops.h" 3 + template + inline bool + operator>=(const _Tp& __x, const _Tp& __y) + { return !(__x < __y); } + + + } + +} +# 71 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/utility" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_pair.h" 1 3 +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_pair.h" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/move.h" 1 3 +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/move.h" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/concept_check.h" 1 3 +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/concept_check.h" 3 + +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/concept_check.h" 3 +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/move.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + + template + inline _Tp* + __addressof(_Tp& __r) + { + return reinterpret_cast<_Tp*> + (&const_cast(reinterpret_cast(__r))); + } + + +} +# 109 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/move.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 120 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/move.h" 3 + template + inline void + swap(_Tp& __a, _Tp& __b) + { + + + + _Tp __tmp = (__a); + __a = (__b); + __b = (__tmp); + } + + + + template + inline void + swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) + { + for (size_t __n = 0; __n < _Nm; ++__n) + swap(__a[__n], __b[__n]); + } + + +} +# 61 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_pair.h" 2 3 + + + + + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 86 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_pair.h" 3 + template + struct pair + { + typedef _T1 first_type; + typedef _T2 second_type; + + _T1 first; + _T2 second; + + + + + + pair() + : first(), second() { } + + + pair(const _T1& __a, const _T2& __b) + : first(__a), second(__b) { } + + + template + pair(const pair<_U1, _U2>& __p) + : first(__p.first), second(__p.second) { } +# 196 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_pair.h" 3 + }; + + + template + inline bool + operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __x.first == __y.first && __x.second == __y.second; } + + + template + inline bool + operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __x.first < __y.first + || (!(__y.first < __x.first) && __x.second < __y.second); } + + + template + inline bool + operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return !(__x == __y); } + + + template + inline bool + operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __y < __x; } + + + template + inline bool + operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return !(__y < __x); } + + + template + inline bool + operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return !(__x < __y); } +# 270 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_pair.h" 3 + template + inline pair<_T1, _T2> + make_pair(_T1 __x, _T2 __y) + { return pair<_T1, _T2>(__x, __y); } + + + +} +# 72 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/utility" 2 3 +# 22 "../boost/config/no_tr1/utility.hpp" 2 +# 38 "../boost/config/select_stdlib_config.hpp" 2 +# 41 "../boost/config.hpp" 2 + + + +# 1 "../boost/config/stdlib/libstdcpp3.hpp" 1 +# 76 "../boost/config/stdlib/libstdcpp3.hpp" +# 1 "/usr/include/unistd.h" 1 3 4 +# 28 "/usr/include/unistd.h" 3 4 +extern "C" { +# 203 "/usr/include/unistd.h" 3 4 +# 1 "/usr/include/bits/posix_opt.h" 1 3 4 +# 204 "/usr/include/unistd.h" 2 3 4 + + + +# 1 "/usr/include/bits/environments.h" 1 3 4 +# 23 "/usr/include/bits/environments.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 24 "/usr/include/bits/environments.h" 2 3 4 +# 208 "/usr/include/unistd.h" 2 3 4 +# 218 "/usr/include/unistd.h" 3 4 +# 1 "/usr/include/bits/types.h" 1 3 4 +# 28 "/usr/include/bits/types.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 29 "/usr/include/bits/types.h" 2 3 4 + + +typedef unsigned char __u_char; +typedef unsigned short int __u_short; +typedef unsigned int __u_int; +typedef unsigned long int __u_long; + + +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; + +typedef signed long int __int64_t; +typedef unsigned long int __uint64_t; + + + + + + + +typedef long int __quad_t; +typedef unsigned long int __u_quad_t; +# 131 "/usr/include/bits/types.h" 3 4 +# 1 "/usr/include/bits/typesizes.h" 1 3 4 +# 132 "/usr/include/bits/types.h" 2 3 4 + + +typedef unsigned long int __dev_t; +typedef unsigned int __uid_t; +typedef unsigned int __gid_t; +typedef unsigned long int __ino_t; +typedef unsigned long int __ino64_t; +typedef unsigned int __mode_t; +typedef unsigned long int __nlink_t; +typedef long int __off_t; +typedef long int __off64_t; +typedef int __pid_t; +typedef struct { int __val[2]; } __fsid_t; +typedef long int __clock_t; +typedef unsigned long int __rlim_t; +typedef unsigned long int __rlim64_t; +typedef unsigned int __id_t; +typedef long int __time_t; +typedef unsigned int __useconds_t; +typedef long int __suseconds_t; + +typedef int __daddr_t; +typedef long int __swblk_t; +typedef int __key_t; + + +typedef int __clockid_t; + + +typedef void * __timer_t; + + +typedef long int __blksize_t; + + + + +typedef long int __blkcnt_t; +typedef long int __blkcnt64_t; + + +typedef unsigned long int __fsblkcnt_t; +typedef unsigned long int __fsblkcnt64_t; + + +typedef unsigned long int __fsfilcnt_t; +typedef unsigned long int __fsfilcnt64_t; + +typedef long int __ssize_t; + + + +typedef __off64_t __loff_t; +typedef __quad_t *__qaddr_t; +typedef char *__caddr_t; + + +typedef long int __intptr_t; + + +typedef unsigned int __socklen_t; +# 219 "/usr/include/unistd.h" 2 3 4 + + +typedef __ssize_t ssize_t; + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 228 "/usr/include/unistd.h" 2 3 4 + + + + + +typedef __gid_t gid_t; + + + + +typedef __uid_t uid_t; + + + + + +typedef __off_t off_t; + + + + + + +typedef __off64_t off64_t; + + + + +typedef __useconds_t useconds_t; + + + + +typedef __pid_t pid_t; + + + + + + +typedef __intptr_t intptr_t; + + + + + + +typedef __socklen_t socklen_t; +# 288 "/usr/include/unistd.h" 3 4 +extern int access (__const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); + + + + +extern int euidaccess (__const char *__name, int __type) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int eaccess (__const char *__name, int __type) + throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern int faccessat (int __fd, __const char *__file, int __type, int __flag) + throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); +# 331 "/usr/include/unistd.h" 3 4 +extern __off_t lseek (int __fd, __off_t __offset, int __whence) throw (); +# 342 "/usr/include/unistd.h" 3 4 +extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) + throw (); + + + + + + +extern int close (int __fd); + + + + + + +extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__)); + + + + + +extern ssize_t write (int __fd, __const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__)); +# 373 "/usr/include/unistd.h" 3 4 +extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, + __off_t __offset) __attribute__ ((__warn_unused_result__)); + + + + + + +extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n, + __off_t __offset) __attribute__ ((__warn_unused_result__)); +# 401 "/usr/include/unistd.h" 3 4 +extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset) __attribute__ ((__warn_unused_result__)); + + +extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n, + __off64_t __offset) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern int pipe (int __pipedes[2]) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern int pipe2 (int __pipedes[2], int __flags) throw () __attribute__ ((__warn_unused_result__)); +# 429 "/usr/include/unistd.h" 3 4 +extern unsigned int alarm (unsigned int __seconds) throw (); +# 441 "/usr/include/unistd.h" 3 4 +extern unsigned int sleep (unsigned int __seconds); + + + + + + + +extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) + throw (); + + + + + + +extern int usleep (__useconds_t __useconds); +# 466 "/usr/include/unistd.h" 3 4 +extern int pause (void); + + + +extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + +extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + + +extern int fchownat (int __fd, __const char *__file, __uid_t __owner, + __gid_t __group, int __flag) + throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); + + + +extern int chdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + +extern int fchdir (int __fd) throw () __attribute__ ((__warn_unused_result__)); +# 508 "/usr/include/unistd.h" 3 4 +extern char *getcwd (char *__buf, size_t __size) throw () __attribute__ ((__warn_unused_result__)); + + + + + +extern char *get_current_dir_name (void) throw (); + + + + + + + +extern char *getwd (char *__buf) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)); + + + + +extern int dup (int __fd) throw () __attribute__ ((__warn_unused_result__)); + + +extern int dup2 (int __fd, int __fd2) throw (); + + + + +extern int dup3 (int __fd, int __fd2, int __flags) throw (); + + + +extern char **__environ; + +extern char **environ; + + + + + +extern int execve (__const char *__path, char *__const __argv[], + char *__const __envp[]) throw () __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[]) + throw () __attribute__ ((__nonnull__ (2))); + + + + +extern int execv (__const char *__path, char *__const __argv[]) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int execle (__const char *__path, __const char *__arg, ...) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int execl (__const char *__path, __const char *__arg, ...) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int execvp (__const char *__file, char *__const __argv[]) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int execlp (__const char *__file, __const char *__arg, ...) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int execvpe (__const char *__file, char *__const __argv[], + char *__const __envp[]) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern int nice (int __inc) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern void _exit (int __status) __attribute__ ((__noreturn__)); + + + + + +# 1 "/usr/include/bits/confname.h" 1 3 4 +# 26 "/usr/include/bits/confname.h" 3 4 +enum + { + _PC_LINK_MAX, + + _PC_MAX_CANON, + + _PC_MAX_INPUT, + + _PC_NAME_MAX, + + _PC_PATH_MAX, + + _PC_PIPE_BUF, + + _PC_CHOWN_RESTRICTED, + + _PC_NO_TRUNC, + + _PC_VDISABLE, + + _PC_SYNC_IO, + + _PC_ASYNC_IO, + + _PC_PRIO_IO, + + _PC_SOCK_MAXBUF, + + _PC_FILESIZEBITS, + + _PC_REC_INCR_XFER_SIZE, + + _PC_REC_MAX_XFER_SIZE, + + _PC_REC_MIN_XFER_SIZE, + + _PC_REC_XFER_ALIGN, + + _PC_ALLOC_SIZE_MIN, + + _PC_SYMLINK_MAX, + + _PC_2_SYMLINKS + + }; + + +enum + { + _SC_ARG_MAX, + + _SC_CHILD_MAX, + + _SC_CLK_TCK, + + _SC_NGROUPS_MAX, + + _SC_OPEN_MAX, + + _SC_STREAM_MAX, + + _SC_TZNAME_MAX, + + _SC_JOB_CONTROL, + + _SC_SAVED_IDS, + + _SC_REALTIME_SIGNALS, + + _SC_PRIORITY_SCHEDULING, + + _SC_TIMERS, + + _SC_ASYNCHRONOUS_IO, + + _SC_PRIORITIZED_IO, + + _SC_SYNCHRONIZED_IO, + + _SC_FSYNC, + + _SC_MAPPED_FILES, + + _SC_MEMLOCK, + + _SC_MEMLOCK_RANGE, + + _SC_MEMORY_PROTECTION, + + _SC_MESSAGE_PASSING, + + _SC_SEMAPHORES, + + _SC_SHARED_MEMORY_OBJECTS, + + _SC_AIO_LISTIO_MAX, + + _SC_AIO_MAX, + + _SC_AIO_PRIO_DELTA_MAX, + + _SC_DELAYTIMER_MAX, + + _SC_MQ_OPEN_MAX, + + _SC_MQ_PRIO_MAX, + + _SC_VERSION, + + _SC_PAGESIZE, + + + _SC_RTSIG_MAX, + + _SC_SEM_NSEMS_MAX, + + _SC_SEM_VALUE_MAX, + + _SC_SIGQUEUE_MAX, + + _SC_TIMER_MAX, + + + + + _SC_BC_BASE_MAX, + + _SC_BC_DIM_MAX, + + _SC_BC_SCALE_MAX, + + _SC_BC_STRING_MAX, + + _SC_COLL_WEIGHTS_MAX, + + _SC_EQUIV_CLASS_MAX, + + _SC_EXPR_NEST_MAX, + + _SC_LINE_MAX, + + _SC_RE_DUP_MAX, + + _SC_CHARCLASS_NAME_MAX, + + + _SC_2_VERSION, + + _SC_2_C_BIND, + + _SC_2_C_DEV, + + _SC_2_FORT_DEV, + + _SC_2_FORT_RUN, + + _SC_2_SW_DEV, + + _SC_2_LOCALEDEF, + + + _SC_PII, + + _SC_PII_XTI, + + _SC_PII_SOCKET, + + _SC_PII_INTERNET, + + _SC_PII_OSI, + + _SC_POLL, + + _SC_SELECT, + + _SC_UIO_MAXIOV, + + _SC_IOV_MAX = _SC_UIO_MAXIOV, + + _SC_PII_INTERNET_STREAM, + + _SC_PII_INTERNET_DGRAM, + + _SC_PII_OSI_COTS, + + _SC_PII_OSI_CLTS, + + _SC_PII_OSI_M, + + _SC_T_IOV_MAX, + + + + _SC_THREADS, + + _SC_THREAD_SAFE_FUNCTIONS, + + _SC_GETGR_R_SIZE_MAX, + + _SC_GETPW_R_SIZE_MAX, + + _SC_LOGIN_NAME_MAX, + + _SC_TTY_NAME_MAX, + + _SC_THREAD_DESTRUCTOR_ITERATIONS, + + _SC_THREAD_KEYS_MAX, + + _SC_THREAD_STACK_MIN, + + _SC_THREAD_THREADS_MAX, + + _SC_THREAD_ATTR_STACKADDR, + + _SC_THREAD_ATTR_STACKSIZE, + + _SC_THREAD_PRIORITY_SCHEDULING, + + _SC_THREAD_PRIO_INHERIT, + + _SC_THREAD_PRIO_PROTECT, + + _SC_THREAD_PROCESS_SHARED, + + + _SC_NPROCESSORS_CONF, + + _SC_NPROCESSORS_ONLN, + + _SC_PHYS_PAGES, + + _SC_AVPHYS_PAGES, + + _SC_ATEXIT_MAX, + + _SC_PASS_MAX, + + + _SC_XOPEN_VERSION, + + _SC_XOPEN_XCU_VERSION, + + _SC_XOPEN_UNIX, + + _SC_XOPEN_CRYPT, + + _SC_XOPEN_ENH_I18N, + + _SC_XOPEN_SHM, + + + _SC_2_CHAR_TERM, + + _SC_2_C_VERSION, + + _SC_2_UPE, + + + _SC_XOPEN_XPG2, + + _SC_XOPEN_XPG3, + + _SC_XOPEN_XPG4, + + + _SC_CHAR_BIT, + + _SC_CHAR_MAX, + + _SC_CHAR_MIN, + + _SC_INT_MAX, + + _SC_INT_MIN, + + _SC_LONG_BIT, + + _SC_WORD_BIT, + + _SC_MB_LEN_MAX, + + _SC_NZERO, + + _SC_SSIZE_MAX, + + _SC_SCHAR_MAX, + + _SC_SCHAR_MIN, + + _SC_SHRT_MAX, + + _SC_SHRT_MIN, + + _SC_UCHAR_MAX, + + _SC_UINT_MAX, + + _SC_ULONG_MAX, + + _SC_USHRT_MAX, + + + _SC_NL_ARGMAX, + + _SC_NL_LANGMAX, + + _SC_NL_MSGMAX, + + _SC_NL_NMAX, + + _SC_NL_SETMAX, + + _SC_NL_TEXTMAX, + + + _SC_XBS5_ILP32_OFF32, + + _SC_XBS5_ILP32_OFFBIG, + + _SC_XBS5_LP64_OFF64, + + _SC_XBS5_LPBIG_OFFBIG, + + + _SC_XOPEN_LEGACY, + + _SC_XOPEN_REALTIME, + + _SC_XOPEN_REALTIME_THREADS, + + + _SC_ADVISORY_INFO, + + _SC_BARRIERS, + + _SC_BASE, + + _SC_C_LANG_SUPPORT, + + _SC_C_LANG_SUPPORT_R, + + _SC_CLOCK_SELECTION, + + _SC_CPUTIME, + + _SC_THREAD_CPUTIME, + + _SC_DEVICE_IO, + + _SC_DEVICE_SPECIFIC, + + _SC_DEVICE_SPECIFIC_R, + + _SC_FD_MGMT, + + _SC_FIFO, + + _SC_PIPE, + + _SC_FILE_ATTRIBUTES, + + _SC_FILE_LOCKING, + + _SC_FILE_SYSTEM, + + _SC_MONOTONIC_CLOCK, + + _SC_MULTI_PROCESS, + + _SC_SINGLE_PROCESS, + + _SC_NETWORKING, + + _SC_READER_WRITER_LOCKS, + + _SC_SPIN_LOCKS, + + _SC_REGEXP, + + _SC_REGEX_VERSION, + + _SC_SHELL, + + _SC_SIGNALS, + + _SC_SPAWN, + + _SC_SPORADIC_SERVER, + + _SC_THREAD_SPORADIC_SERVER, + + _SC_SYSTEM_DATABASE, + + _SC_SYSTEM_DATABASE_R, + + _SC_TIMEOUTS, + + _SC_TYPED_MEMORY_OBJECTS, + + _SC_USER_GROUPS, + + _SC_USER_GROUPS_R, + + _SC_2_PBS, + + _SC_2_PBS_ACCOUNTING, + + _SC_2_PBS_LOCATE, + + _SC_2_PBS_MESSAGE, + + _SC_2_PBS_TRACK, + + _SC_SYMLOOP_MAX, + + _SC_STREAMS, + + _SC_2_PBS_CHECKPOINT, + + + _SC_V6_ILP32_OFF32, + + _SC_V6_ILP32_OFFBIG, + + _SC_V6_LP64_OFF64, + + _SC_V6_LPBIG_OFFBIG, + + + _SC_HOST_NAME_MAX, + + _SC_TRACE, + + _SC_TRACE_EVENT_FILTER, + + _SC_TRACE_INHERIT, + + _SC_TRACE_LOG, + + + _SC_LEVEL1_ICACHE_SIZE, + + _SC_LEVEL1_ICACHE_ASSOC, + + _SC_LEVEL1_ICACHE_LINESIZE, + + _SC_LEVEL1_DCACHE_SIZE, + + _SC_LEVEL1_DCACHE_ASSOC, + + _SC_LEVEL1_DCACHE_LINESIZE, + + _SC_LEVEL2_CACHE_SIZE, + + _SC_LEVEL2_CACHE_ASSOC, + + _SC_LEVEL2_CACHE_LINESIZE, + + _SC_LEVEL3_CACHE_SIZE, + + _SC_LEVEL3_CACHE_ASSOC, + + _SC_LEVEL3_CACHE_LINESIZE, + + _SC_LEVEL4_CACHE_SIZE, + + _SC_LEVEL4_CACHE_ASSOC, + + _SC_LEVEL4_CACHE_LINESIZE, + + + + _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, + + _SC_RAW_SOCKETS, + + + _SC_V7_ILP32_OFF32, + + _SC_V7_ILP32_OFFBIG, + + _SC_V7_LP64_OFF64, + + _SC_V7_LPBIG_OFFBIG, + + + _SC_SS_REPL_MAX, + + + _SC_TRACE_EVENT_NAME_MAX, + + _SC_TRACE_NAME_MAX, + + _SC_TRACE_SYS_MAX, + + _SC_TRACE_USER_EVENT_MAX, + + + _SC_XOPEN_STREAMS, + + + _SC_THREAD_ROBUST_PRIO_INHERIT, + + _SC_THREAD_ROBUST_PRIO_PROTECT + + }; + + +enum + { + _CS_PATH, + + + _CS_V6_WIDTH_RESTRICTED_ENVS, + + + + _CS_GNU_LIBC_VERSION, + + _CS_GNU_LIBPTHREAD_VERSION, + + + _CS_V5_WIDTH_RESTRICTED_ENVS, + + + + _CS_V7_WIDTH_RESTRICTED_ENVS, + + + + _CS_LFS_CFLAGS = 1000, + + _CS_LFS_LDFLAGS, + + _CS_LFS_LIBS, + + _CS_LFS_LINTFLAGS, + + _CS_LFS64_CFLAGS, + + _CS_LFS64_LDFLAGS, + + _CS_LFS64_LIBS, + + _CS_LFS64_LINTFLAGS, + + + _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, + + _CS_XBS5_ILP32_OFF32_LDFLAGS, + + _CS_XBS5_ILP32_OFF32_LIBS, + + _CS_XBS5_ILP32_OFF32_LINTFLAGS, + + _CS_XBS5_ILP32_OFFBIG_CFLAGS, + + _CS_XBS5_ILP32_OFFBIG_LDFLAGS, + + _CS_XBS5_ILP32_OFFBIG_LIBS, + + _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, + + _CS_XBS5_LP64_OFF64_CFLAGS, + + _CS_XBS5_LP64_OFF64_LDFLAGS, + + _CS_XBS5_LP64_OFF64_LIBS, + + _CS_XBS5_LP64_OFF64_LINTFLAGS, + + _CS_XBS5_LPBIG_OFFBIG_CFLAGS, + + _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, + + _CS_XBS5_LPBIG_OFFBIG_LIBS, + + _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, + + + _CS_POSIX_V6_ILP32_OFF32_CFLAGS, + + _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, + + _CS_POSIX_V6_ILP32_OFF32_LIBS, + + _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, + + _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, + + _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, + + _CS_POSIX_V6_ILP32_OFFBIG_LIBS, + + _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, + + _CS_POSIX_V6_LP64_OFF64_CFLAGS, + + _CS_POSIX_V6_LP64_OFF64_LDFLAGS, + + _CS_POSIX_V6_LP64_OFF64_LIBS, + + _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, + + _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, + + _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, + + _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, + + _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, + + + _CS_POSIX_V7_ILP32_OFF32_CFLAGS, + + _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, + + _CS_POSIX_V7_ILP32_OFF32_LIBS, + + _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, + + _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, + + _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, + + _CS_POSIX_V7_ILP32_OFFBIG_LIBS, + + _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, + + _CS_POSIX_V7_LP64_OFF64_CFLAGS, + + _CS_POSIX_V7_LP64_OFF64_LDFLAGS, + + _CS_POSIX_V7_LP64_OFF64_LIBS, + + _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, + + _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, + + _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, + + _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, + + _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, + + + _CS_V6_ENV, + + _CS_V7_ENV + + }; +# 607 "/usr/include/unistd.h" 2 3 4 + + +extern long int pathconf (__const char *__path, int __name) + throw () __attribute__ ((__nonnull__ (1))); + + +extern long int fpathconf (int __fd, int __name) throw (); + + +extern long int sysconf (int __name) throw (); + + + +extern size_t confstr (int __name, char *__buf, size_t __len) throw (); + + + + +extern __pid_t getpid (void) throw (); + + +extern __pid_t getppid (void) throw (); + + + + +extern __pid_t getpgrp (void) throw (); +# 643 "/usr/include/unistd.h" 3 4 +extern __pid_t __getpgid (__pid_t __pid) throw (); + +extern __pid_t getpgid (__pid_t __pid) throw (); + + + + + + +extern int setpgid (__pid_t __pid, __pid_t __pgid) throw (); +# 669 "/usr/include/unistd.h" 3 4 +extern int setpgrp (void) throw (); +# 686 "/usr/include/unistd.h" 3 4 +extern __pid_t setsid (void) throw (); + + + +extern __pid_t getsid (__pid_t __pid) throw (); + + + +extern __uid_t getuid (void) throw (); + + +extern __uid_t geteuid (void) throw (); + + +extern __gid_t getgid (void) throw (); + + +extern __gid_t getegid (void) throw (); + + + + +extern int getgroups (int __size, __gid_t __list[]) throw () __attribute__ ((__warn_unused_result__)); + + + +extern int group_member (__gid_t __gid) throw (); + + + + + + +extern int setuid (__uid_t __uid) throw (); + + + + +extern int setreuid (__uid_t __ruid, __uid_t __euid) throw (); + + + + +extern int seteuid (__uid_t __uid) throw (); + + + + + + +extern int setgid (__gid_t __gid) throw (); + + + + +extern int setregid (__gid_t __rgid, __gid_t __egid) throw (); + + + + +extern int setegid (__gid_t __gid) throw (); + + + + + +extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) + throw (); + + + +extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) + throw (); + + + +extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) + throw (); + + + +extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) + throw (); + + + + + + +extern __pid_t fork (void) throw (); + + + + + + + +extern __pid_t vfork (void) throw (); + + + + + +extern char *ttyname (int __fd) throw (); + + + +extern int ttyname_r (int __fd, char *__buf, size_t __buflen) + throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); + + + +extern int isatty (int __fd) throw (); + + + + + +extern int ttyslot (void) throw (); + + + + +extern int link (__const char *__from, __const char *__to) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); + + + + +extern int linkat (int __fromfd, __const char *__from, int __tofd, + __const char *__to, int __flags) + throw () __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern int symlink (__const char *__from, __const char *__to) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); + + + + +extern ssize_t readlink (__const char *__restrict __path, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); + + + + +extern int symlinkat (__const char *__from, int __tofd, + __const char *__to) throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + + +extern ssize_t readlinkat (int __fd, __const char *__restrict __path, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); + + + +extern int unlink (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); + + + +extern int unlinkat (int __fd, __const char *__name, int __flag) + throw () __attribute__ ((__nonnull__ (2))); + + + +extern int rmdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))); + + + +extern __pid_t tcgetpgrp (int __fd) throw (); + + +extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw (); + + + + + + +extern char *getlogin (void); + + + + + + + +extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); + + + + +extern int setlogin (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); +# 890 "/usr/include/unistd.h" 3 4 +# 1 "/usr/include/getopt.h" 1 3 4 +# 50 "/usr/include/getopt.h" 3 4 +extern "C" { +# 59 "/usr/include/getopt.h" 3 4 +extern char *optarg; +# 73 "/usr/include/getopt.h" 3 4 +extern int optind; + + + + +extern int opterr; + + + +extern int optopt; +# 152 "/usr/include/getopt.h" 3 4 +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) + throw (); +# 187 "/usr/include/getopt.h" 3 4 +} +# 891 "/usr/include/unistd.h" 2 3 4 + + + + + + + +extern int gethostname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern int sethostname (__const char *__name, size_t __len) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + +extern int sethostid (long int __id) throw () __attribute__ ((__warn_unused_result__)); + + + + + +extern int getdomainname (char *__name, size_t __len) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int setdomainname (__const char *__name, size_t __len) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int vhangup (void) throw (); + + +extern int revoke (__const char *__file) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern int profil (unsigned short int *__sample_buffer, size_t __size, + size_t __offset, unsigned int __scale) + throw () __attribute__ ((__nonnull__ (1))); + + + + + +extern int acct (__const char *__name) throw (); + + + +extern char *getusershell (void) throw (); +extern void endusershell (void) throw (); +extern void setusershell (void) throw (); + + + + + +extern int daemon (int __nochdir, int __noclose) throw () __attribute__ ((__warn_unused_result__)); + + + + + + +extern int chroot (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + +extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1))); +# 976 "/usr/include/unistd.h" 3 4 +extern int fsync (int __fd); + + + + + + +extern long int gethostid (void); + + +extern void sync (void) throw (); + + + + + +extern int getpagesize (void) throw () __attribute__ ((__const__)); + + + + +extern int getdtablesize (void) throw (); +# 1007 "/usr/include/unistd.h" 3 4 +extern int truncate (__const char *__file, __off_t __length) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 1019 "/usr/include/unistd.h" 3 4 +extern int truncate64 (__const char *__file, __off64_t __length) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 1029 "/usr/include/unistd.h" 3 4 +extern int ftruncate (int __fd, __off_t __length) throw () __attribute__ ((__warn_unused_result__)); +# 1039 "/usr/include/unistd.h" 3 4 +extern int ftruncate64 (int __fd, __off64_t __length) throw () __attribute__ ((__warn_unused_result__)); +# 1050 "/usr/include/unistd.h" 3 4 +extern int brk (void *__addr) throw () __attribute__ ((__warn_unused_result__)); + + + + + +extern void *sbrk (intptr_t __delta) throw (); +# 1071 "/usr/include/unistd.h" 3 4 +extern long int syscall (long int __sysno, ...) throw (); +# 1094 "/usr/include/unistd.h" 3 4 +extern int lockf (int __fd, int __cmd, __off_t __len) __attribute__ ((__warn_unused_result__)); +# 1104 "/usr/include/unistd.h" 3 4 +extern int lockf64 (int __fd, int __cmd, __off64_t __len) __attribute__ ((__warn_unused_result__)); +# 1125 "/usr/include/unistd.h" 3 4 +extern int fdatasync (int __fildes); + + + + + + + +extern char *crypt (__const char *__key, __const char *__salt) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern void encrypt (char *__block, int __edflag) throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern void swab (__const void *__restrict __from, void *__restrict __to, + ssize_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + + + +extern char *ctermid (char *__s) throw (); + + + + + +# 1 "/usr/include/bits/unistd.h" 1 3 4 +# 24 "/usr/include/bits/unistd.h" 3 4 +extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes, + size_t __buflen) __attribute__ ((__warn_unused_result__)); +extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read") + __attribute__ ((__warn_unused_result__)); +extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t +read (int __fd, void *__buf, size_t __nbytes) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__nbytes)) + return __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); + + if (__nbytes > __builtin_object_size (__buf, 0)) + return __read_chk_warn (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); + } + return __read_alias (__fd, __buf, __nbytes); +} + + +extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes, + __off_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread") + + __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") + + __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread called with bigger length than size of " "the destination buffer"))) + ; +extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk") + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread64 called with bigger length than size of " "the destination buffer"))) + ; + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t +pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__nbytes)) + return __pread_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)); + + if ( __nbytes > __builtin_object_size (__buf, 0)) + return __pread_chk_warn (__fd, __buf, __nbytes, __offset, + __builtin_object_size (__buf, 0)); + } + return __pread_alias (__fd, __buf, __nbytes, __offset); +} +# 105 "/usr/include/bits/unistd.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t +pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__nbytes)) + return __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)); + + if ( __nbytes > __builtin_object_size (__buf, 0)) + return __pread64_chk_warn (__fd, __buf, __nbytes, __offset, + __builtin_object_size (__buf, 0)); + } + + return __pread64_alias (__fd, __buf, __nbytes, __offset); +} + + + + +extern ssize_t __readlink_chk (__const char *__restrict __path, + char *__restrict __buf, size_t __len, + size_t __buflen) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlink_alias (__const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __asm__ ("" "readlink") + + + __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlink_chk_warn (__const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__readlink_chk") + + + + __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t +readlink (__const char *__restrict __path, char *__restrict __buf, size_t __len) throw () + +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + + if ( __len > __builtin_object_size (__buf, 2 > 1)) + return __readlink_chk_warn (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + } + return __readlink_alias (__path, __buf, __len); +} + + + +extern ssize_t __readlinkat_chk (int __fd, __const char *__restrict __path, + char *__restrict __buf, size_t __len, + size_t __buflen) + throw () __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlinkat_alias (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __asm__ ("" "readlinkat") + + + + __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlinkat_chk_warn (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__readlinkat_chk") + + + + __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer"))) + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t +readlinkat (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) throw () + +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __readlinkat_chk (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + + if (__len > __builtin_object_size (__buf, 2 > 1)) + return __readlinkat_chk_warn (__fd, __path, __buf, __len, + __builtin_object_size (__buf, 2 > 1)); + } + return __readlinkat_alias (__fd, __path, __buf, __len); +} + + +extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen) + throw () __attribute__ ((__warn_unused_result__)); +extern char *__getcwd_alias (char *__buf, size_t __size) throw () __asm__ ("" "getcwd") + __attribute__ ((__warn_unused_result__)); +extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) throw () __asm__ ("" "__getcwd_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +getcwd (char *__buf, size_t __size) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__size)) + return __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1)); + + if (__size > __builtin_object_size (__buf, 2 > 1)) + return __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1)); + } + return __getcwd_alias (__buf, __size); +} + + +extern char *__getwd_chk (char *__buf, size_t buflen) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern char *__getwd_warn (char *__buf) throw () __asm__ ("" "getwd") + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char * +getwd (char *__buf) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1)); + return __getwd_warn (__buf); +} + + +extern size_t __confstr_chk (int __name, char *__buf, size_t __len, + size_t __buflen) throw (); +extern size_t __confstr_alias (int __name, char *__buf, size_t __len) throw () __asm__ ("" "confstr") + ; +extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__confstr_chk") + + + __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +confstr (int __name, char *__buf, size_t __len) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + + if (__builtin_object_size (__buf, 2 > 1) < __len) + return __confstr_chk_warn (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + } + return __confstr_alias (__name, __buf, __len); +} + + +extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen) + throw () __attribute__ ((__warn_unused_result__)); +extern int __getgroups_alias (int __size, __gid_t __list[]) throw () __asm__ ("" "getgroups") + __attribute__ ((__warn_unused_result__)); +extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) throw () __asm__ ("" "__getgroups_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +getgroups (int __size, __gid_t __list[]) throw () +{ + if (__builtin_object_size (__list, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__size) || __size < 0) + return __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1)); + + if (__size * sizeof (__gid_t) > __builtin_object_size (__list, 2 > 1)) + return __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1)); + } + return __getgroups_alias (__size, __list); +} + + +extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen, + size_t __nreal) throw () __attribute__ ((__nonnull__ (2))); +extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) throw () __asm__ ("" "ttyname_r") + + __attribute__ ((__nonnull__ (2))); +extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__ttyname_r_chk") + + + __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +ttyname_r (int __fd, char *__buf, size_t __buflen) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __ttyname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __ttyname_r_alias (__fd, __buf, __buflen); +} + + + +extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal) + __attribute__ ((__nonnull__ (1))); +extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r") + __attribute__ ((__nonnull__ (1))); +extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk") + + + __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +getlogin_r (char *__buf, size_t __buflen) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __getlogin_r_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __getlogin_r_alias (__buf, __buflen); +} + + + + +extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal) + throw () __attribute__ ((__nonnull__ (1))); +extern int __gethostname_alias (char *__buf, size_t __buflen) throw () __asm__ ("" "gethostname") + __attribute__ ((__nonnull__ (1))); +extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__gethostname_chk") + + + __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +gethostname (char *__buf, size_t __buflen) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __gethostname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __gethostname_alias (__buf, __buflen); +} + + + + +extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int __getdomainname_alias (char *__buf, size_t __buflen) throw () __asm__ ("" "getdomainname") + + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__getdomainname_chk") + + + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer"))) + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +getdomainname (char *__buf, size_t __buflen) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __getdomainname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __getdomainname_alias (__buf, __buflen); +} +# 1161 "/usr/include/unistd.h" 2 3 4 + + +} +# 77 "../boost/config/stdlib/libstdcpp3.hpp" 2 +# 45 "../boost/config.hpp" 2 + + + + +# 1 "../boost/config/select_platform_config.hpp" 1 +# 50 "../boost/config.hpp" 2 + + + +# 1 "../boost/config/platform/linux.hpp" 1 +# 15 "../boost/config/platform/linux.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstdlib" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstdlib" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstdlib" 3 +# 66 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstdlib" 3 +# 1 "/usr/include/stdlib.h" 1 3 4 +# 33 "/usr/include/stdlib.h" 3 4 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 34 "/usr/include/stdlib.h" 2 3 4 + +extern "C" { + + + + + + +# 1 "/usr/include/bits/waitflags.h" 1 3 4 +# 43 "/usr/include/stdlib.h" 2 3 4 +# 1 "/usr/include/bits/waitstatus.h" 1 3 4 +# 65 "/usr/include/bits/waitstatus.h" 3 4 +# 1 "/usr/include/endian.h" 1 3 4 +# 37 "/usr/include/endian.h" 3 4 +# 1 "/usr/include/bits/endian.h" 1 3 4 +# 38 "/usr/include/endian.h" 2 3 4 +# 61 "/usr/include/endian.h" 3 4 +# 1 "/usr/include/bits/byteswap.h" 1 3 4 +# 28 "/usr/include/bits/byteswap.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 29 "/usr/include/bits/byteswap.h" 2 3 4 +# 62 "/usr/include/endian.h" 2 3 4 +# 66 "/usr/include/bits/waitstatus.h" 2 3 4 + +union wait + { + int w_status; + struct + { + + unsigned int __w_termsig:7; + unsigned int __w_coredump:1; + unsigned int __w_retcode:8; + unsigned int:16; + + + + + + + + } __wait_terminated; + struct + { + + unsigned int __w_stopval:8; + unsigned int __w_stopsig:8; + unsigned int:16; + + + + + + + } __wait_stopped; + }; +# 44 "/usr/include/stdlib.h" 2 3 4 +# 96 "/usr/include/stdlib.h" 3 4 + + +typedef struct + { + int quot; + int rem; + } div_t; + + + +typedef struct + { + long int quot; + long int rem; + } ldiv_t; + + + + + + + +__extension__ typedef struct + { + long long int quot; + long long int rem; + } lldiv_t; + + +# 140 "/usr/include/stdlib.h" 3 4 +extern size_t __ctype_get_mb_cur_max (void) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern double atof (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern int atoi (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern long int atol (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +__extension__ extern long long int atoll (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern double strtod (__const char *__restrict __nptr, + char **__restrict __endptr) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern float strtof (__const char *__restrict __nptr, + char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern long double strtold (__const char *__restrict __nptr, + char **__restrict __endptr) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern long int strtol (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern unsigned long int strtoul (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +__extension__ +extern long long int strtoq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtouq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +__extension__ +extern long long int strtoll (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtoull (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +# 236 "/usr/include/stdlib.h" 3 4 +# 1 "/usr/include/xlocale.h" 1 3 4 +# 28 "/usr/include/xlocale.h" 3 4 +typedef struct __locale_struct +{ + + struct __locale_data *__locales[13]; + + + const unsigned short int *__ctype_b; + const int *__ctype_tolower; + const int *__ctype_toupper; + + + const char *__names[13]; +} *__locale_t; + + +typedef __locale_t locale_t; +# 237 "/usr/include/stdlib.h" 2 3 4 + + + +extern long int strtol_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +extern unsigned long int strtoul_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern long long int strtoll_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtoull_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +extern double strtod_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + +extern float strtof_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + +extern long double strtold_l (__const char *__restrict __nptr, + char **__restrict __endptr, + __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + + + + + +extern __inline __attribute__ ((__gnu_inline__)) double +atof (__const char *__nptr) throw () +{ + return strtod (__nptr, (char **) __null); +} +extern __inline __attribute__ ((__gnu_inline__)) int +atoi (__const char *__nptr) throw () +{ + return (int) strtol (__nptr, (char **) __null, 10); +} +extern __inline __attribute__ ((__gnu_inline__)) long int +atol (__const char *__nptr) throw () +{ + return strtol (__nptr, (char **) __null, 10); +} + + + + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int +atoll (__const char *__nptr) throw () +{ + return strtoll (__nptr, (char **) __null, 10); +} + +# 311 "/usr/include/stdlib.h" 3 4 +extern char *l64a (long int __n) throw () __attribute__ ((__warn_unused_result__)); + + +extern long int a64l (__const char *__s) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +# 1 "/usr/include/sys/types.h" 1 3 4 +# 28 "/usr/include/sys/types.h" 3 4 +extern "C" { + + + + + +typedef __u_char u_char; +typedef __u_short u_short; +typedef __u_int u_int; +typedef __u_long u_long; +typedef __quad_t quad_t; +typedef __u_quad_t u_quad_t; +typedef __fsid_t fsid_t; + + + + +typedef __loff_t loff_t; + + + +typedef __ino_t ino_t; + + + + + + +typedef __ino64_t ino64_t; + + + + +typedef __dev_t dev_t; +# 71 "/usr/include/sys/types.h" 3 4 +typedef __mode_t mode_t; + + + + +typedef __nlink_t nlink_t; +# 105 "/usr/include/sys/types.h" 3 4 +typedef __id_t id_t; +# 116 "/usr/include/sys/types.h" 3 4 +typedef __daddr_t daddr_t; +typedef __caddr_t caddr_t; + + + + + +typedef __key_t key_t; +# 133 "/usr/include/sys/types.h" 3 4 +# 1 "/usr/include/time.h" 1 3 4 +# 58 "/usr/include/time.h" 3 4 + + +typedef __clock_t clock_t; + + + +# 74 "/usr/include/time.h" 3 4 + + +typedef __time_t time_t; + + + +# 92 "/usr/include/time.h" 3 4 +typedef __clockid_t clockid_t; +# 104 "/usr/include/time.h" 3 4 +typedef __timer_t timer_t; +# 134 "/usr/include/sys/types.h" 2 3 4 + + + + + + + +typedef __suseconds_t suseconds_t; + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 148 "/usr/include/sys/types.h" 2 3 4 + + + +typedef unsigned long int ulong; +typedef unsigned short int ushort; +typedef unsigned int uint; +# 195 "/usr/include/sys/types.h" 3 4 +typedef int int8_t __attribute__ ((__mode__ (__QI__))); +typedef int int16_t __attribute__ ((__mode__ (__HI__))); +typedef int int32_t __attribute__ ((__mode__ (__SI__))); +typedef int int64_t __attribute__ ((__mode__ (__DI__))); + + +typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); +typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); + +typedef int register_t __attribute__ ((__mode__ (__word__))); +# 220 "/usr/include/sys/types.h" 3 4 +# 1 "/usr/include/sys/select.h" 1 3 4 +# 31 "/usr/include/sys/select.h" 3 4 +# 1 "/usr/include/bits/select.h" 1 3 4 +# 23 "/usr/include/bits/select.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 24 "/usr/include/bits/select.h" 2 3 4 +# 32 "/usr/include/sys/select.h" 2 3 4 + + +# 1 "/usr/include/bits/sigset.h" 1 3 4 +# 24 "/usr/include/bits/sigset.h" 3 4 +typedef int __sig_atomic_t; + + + + +typedef struct + { + unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; + } __sigset_t; +# 35 "/usr/include/sys/select.h" 2 3 4 + + + +typedef __sigset_t sigset_t; + + + + + +# 1 "/usr/include/time.h" 1 3 4 +# 120 "/usr/include/time.h" 3 4 +struct timespec + { + __time_t tv_sec; + long int tv_nsec; + }; +# 45 "/usr/include/sys/select.h" 2 3 4 + +# 1 "/usr/include/bits/time.h" 1 3 4 +# 75 "/usr/include/bits/time.h" 3 4 +struct timeval + { + __time_t tv_sec; + __suseconds_t tv_usec; + }; +# 47 "/usr/include/sys/select.h" 2 3 4 +# 55 "/usr/include/sys/select.h" 3 4 +typedef long int __fd_mask; +# 67 "/usr/include/sys/select.h" 3 4 +typedef struct + { + + + + __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; + + + + + + } fd_set; + + + + + + +typedef __fd_mask fd_mask; +# 99 "/usr/include/sys/select.h" 3 4 +extern "C" { +# 109 "/usr/include/sys/select.h" 3 4 +extern int select (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + struct timeval *__restrict __timeout); +# 121 "/usr/include/sys/select.h" 3 4 +extern int pselect (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + const struct timespec *__restrict __timeout, + const __sigset_t *__restrict __sigmask); + + +} +# 221 "/usr/include/sys/types.h" 2 3 4 + + +# 1 "/usr/include/sys/sysmacros.h" 1 3 4 +# 30 "/usr/include/sys/sysmacros.h" 3 4 +__extension__ +extern unsigned int gnu_dev_major (unsigned long long int __dev) + throw (); +__extension__ +extern unsigned int gnu_dev_minor (unsigned long long int __dev) + throw (); +__extension__ +extern unsigned long long int gnu_dev_makedev (unsigned int __major, + unsigned int __minor) + throw (); + + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int +gnu_dev_major (unsigned long long int __dev) throw () +{ + return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); +} + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int +gnu_dev_minor (unsigned long long int __dev) throw () +{ + return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); +} + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned long long int +gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw () +{ + return ((__minor & 0xff) | ((__major & 0xfff) << 8) + | (((unsigned long long int) (__minor & ~0xff)) << 12) + | (((unsigned long long int) (__major & ~0xfff)) << 32)); +} +# 224 "/usr/include/sys/types.h" 2 3 4 + + + + + +typedef __blksize_t blksize_t; + + + + + + +typedef __blkcnt_t blkcnt_t; + + + +typedef __fsblkcnt_t fsblkcnt_t; + + + +typedef __fsfilcnt_t fsfilcnt_t; +# 263 "/usr/include/sys/types.h" 3 4 +typedef __blkcnt64_t blkcnt64_t; +typedef __fsblkcnt64_t fsblkcnt64_t; +typedef __fsfilcnt64_t fsfilcnt64_t; + + + + + +# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 +# 23 "/usr/include/bits/pthreadtypes.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 24 "/usr/include/bits/pthreadtypes.h" 2 3 4 +# 50 "/usr/include/bits/pthreadtypes.h" 3 4 +typedef unsigned long int pthread_t; + + +typedef union +{ + char __size[56]; + long int __align; +} pthread_attr_t; + + + +typedef struct __pthread_internal_list +{ + struct __pthread_internal_list *__prev; + struct __pthread_internal_list *__next; +} __pthread_list_t; +# 76 "/usr/include/bits/pthreadtypes.h" 3 4 +typedef union +{ + struct __pthread_mutex_s + { + int __lock; + unsigned int __count; + int __owner; + + unsigned int __nusers; + + + + int __kind; + + int __spins; + __pthread_list_t __list; +# 101 "/usr/include/bits/pthreadtypes.h" 3 4 + } __data; + char __size[40]; + long int __align; +} pthread_mutex_t; + +typedef union +{ + char __size[4]; + int __align; +} pthread_mutexattr_t; + + + + +typedef union +{ + struct + { + int __lock; + unsigned int __futex; + __extension__ unsigned long long int __total_seq; + __extension__ unsigned long long int __wakeup_seq; + __extension__ unsigned long long int __woken_seq; + void *__mutex; + unsigned int __nwaiters; + unsigned int __broadcast_seq; + } __data; + char __size[48]; + __extension__ long long int __align; +} pthread_cond_t; + +typedef union +{ + char __size[4]; + int __align; +} pthread_condattr_t; + + + +typedef unsigned int pthread_key_t; + + + +typedef int pthread_once_t; + + + + + +typedef union +{ + + struct + { + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + int __writer; + int __shared; + unsigned long int __pad1; + unsigned long int __pad2; + + + unsigned int __flags; + } __data; +# 187 "/usr/include/bits/pthreadtypes.h" 3 4 + char __size[56]; + long int __align; +} pthread_rwlock_t; + +typedef union +{ + char __size[8]; + long int __align; +} pthread_rwlockattr_t; + + + + + +typedef volatile int pthread_spinlock_t; + + + + +typedef union +{ + char __size[32]; + long int __align; +} pthread_barrier_t; + +typedef union +{ + char __size[4]; + int __align; +} pthread_barrierattr_t; +# 272 "/usr/include/sys/types.h" 2 3 4 + + +} +# 321 "/usr/include/stdlib.h" 2 3 4 + + + + + + +extern long int random (void) throw (); + + +extern void srandom (unsigned int __seed) throw (); + + + + + +extern char *initstate (unsigned int __seed, char *__statebuf, + size_t __statelen) throw () __attribute__ ((__nonnull__ (2))); + + + +extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1))); + + + + + + + +struct random_data + { + int32_t *fptr; + int32_t *rptr; + int32_t *state; + int rand_type; + int rand_deg; + int rand_sep; + int32_t *end_ptr; + }; + +extern int random_r (struct random_data *__restrict __buf, + int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); + +extern int srandom_r (unsigned int __seed, struct random_data *__buf) + throw () __attribute__ ((__nonnull__ (2))); + +extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, + size_t __statelen, + struct random_data *__restrict __buf) + throw () __attribute__ ((__nonnull__ (2, 4))); + +extern int setstate_r (char *__restrict __statebuf, + struct random_data *__restrict __buf) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern int rand (void) throw (); + +extern void srand (unsigned int __seed) throw (); + + + + +extern int rand_r (unsigned int *__seed) throw (); + + + + + + + +extern double drand48 (void) throw (); +extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); + + +extern long int lrand48 (void) throw (); +extern long int nrand48 (unsigned short int __xsubi[3]) + throw () __attribute__ ((__nonnull__ (1))); + + +extern long int mrand48 (void) throw (); +extern long int jrand48 (unsigned short int __xsubi[3]) + throw () __attribute__ ((__nonnull__ (1))); + + +extern void srand48 (long int __seedval) throw (); +extern unsigned short int *seed48 (unsigned short int __seed16v[3]) + throw () __attribute__ ((__nonnull__ (1))); +extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1))); + + + + + +struct drand48_data + { + unsigned short int __x[3]; + unsigned short int __old_x[3]; + unsigned short int __c; + unsigned short int __init; + unsigned long long int __a; + }; + + +extern int drand48_r (struct drand48_data *__restrict __buffer, + double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int erand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int lrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int nrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int mrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int jrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int srand48_r (long int __seedval, struct drand48_data *__buffer) + throw () __attribute__ ((__nonnull__ (2))); + +extern int seed48_r (unsigned short int __seed16v[3], + struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); + +extern int lcong48_r (unsigned short int __param[7], + struct drand48_data *__buffer) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + + + + + +extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + +extern void *calloc (size_t __nmemb, size_t __size) + throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + + + + + + + +extern void *realloc (void *__ptr, size_t __size) + throw () __attribute__ ((__warn_unused_result__)); + +extern void free (void *__ptr) throw (); + + + + +extern void cfree (void *__ptr) throw (); + + + +# 1 "/usr/include/alloca.h" 1 3 4 +# 25 "/usr/include/alloca.h" 3 4 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 26 "/usr/include/alloca.h" 2 3 4 + +extern "C" { + + + + + +extern void *alloca (size_t __size) throw (); + + + + + +} +# 498 "/usr/include/stdlib.h" 2 3 4 + + + + + +extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + +extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +extern void abort (void) throw () __attribute__ ((__noreturn__)); + + + +extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern "C++" int at_quick_exit (void (*__func) (void)) + throw () __asm ("at_quick_exit") __attribute__ ((__nonnull__ (1))); + + + + + + + + + +extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) + throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern void exit (int __status) throw () __attribute__ ((__noreturn__)); + + + + + + + +extern void quick_exit (int __status) throw () __attribute__ ((__noreturn__)); + + + + + + + +extern void _Exit (int __status) throw () __attribute__ ((__noreturn__)); + + + + + + +extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *__secure_getenv (__const char *__name) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1))); + + + + + +extern int setenv (__const char *__name, __const char *__value, int __replace) + throw () __attribute__ ((__nonnull__ (2))); + + +extern int unsetenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern int clearenv (void) throw (); +# 606 "/usr/include/stdlib.h" 3 4 +extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 620 "/usr/include/stdlib.h" 3 4 +extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 630 "/usr/include/stdlib.h" 3 4 +extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 642 "/usr/include/stdlib.h" 3 4 +extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 652 "/usr/include/stdlib.h" 3 4 +extern int mkstemps64 (char *__template, int __suffixlen) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 663 "/usr/include/stdlib.h" 3 4 +extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 674 "/usr/include/stdlib.h" 3 4 +extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 684 "/usr/include/stdlib.h" 3 4 +extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 694 "/usr/include/stdlib.h" 3 4 +extern int mkostemps (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 706 "/usr/include/stdlib.h" 3 4 +extern int mkostemps64 (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + + + + + +extern int system (__const char *__command) __attribute__ ((__warn_unused_result__)); + + + + + + +extern char *canonicalize_file_name (__const char *__name) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 734 "/usr/include/stdlib.h" 3 4 +extern char *realpath (__const char *__restrict __name, + char *__restrict __resolved) throw () __attribute__ ((__warn_unused_result__)); + + + + + + +typedef int (*__compar_fn_t) (__const void *, __const void *); + + +typedef __compar_fn_t comparison_fn_t; + + + +typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *); + + + + + +extern void *bsearch (__const void *__key, __const void *__base, + size_t __nmemb, size_t __size, __compar_fn_t __compar) + __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__)); + + + +extern void qsort (void *__base, size_t __nmemb, size_t __size, + __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); + +extern void qsort_r (void *__base, size_t __nmemb, size_t __size, + __compar_d_fn_t __compar, void *__arg) + __attribute__ ((__nonnull__ (1, 4))); + + + + +extern int abs (int __x) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern long int labs (long int __x) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + +__extension__ extern long long int llabs (long long int __x) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern div_t div (int __numer, int __denom) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern ldiv_t ldiv (long int __numer, long int __denom) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + + +__extension__ extern lldiv_t lldiv (long long int __numer, + long long int __denom) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + +# 808 "/usr/include/stdlib.h" 3 4 +extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *gcvt (double __value, int __ndigit, char *__buf) + throw () __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *qecvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qfcvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qgcvt (long double __value, int __ndigit, char *__buf) + throw () __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); + + + + +extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); +extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); + +extern int qecvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (3, 4, 5))); +extern int qfcvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (3, 4, 5))); + + + + + + + +extern int mblen (__const char *__s, size_t __n) throw () __attribute__ ((__warn_unused_result__)); + + +extern int mbtowc (wchar_t *__restrict __pwc, + __const char *__restrict __s, size_t __n) throw () __attribute__ ((__warn_unused_result__)); + + +extern int wctomb (char *__s, wchar_t __wchar) throw () __attribute__ ((__warn_unused_result__)); + + + +extern size_t mbstowcs (wchar_t *__restrict __pwcs, + __const char *__restrict __s, size_t __n) throw (); + +extern size_t wcstombs (char *__restrict __s, + __const wchar_t *__restrict __pwcs, size_t __n) + throw (); + + + + + + + + +extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 896 "/usr/include/stdlib.h" 3 4 +extern int getsubopt (char **__restrict __optionp, + char *__const *__restrict __tokens, + char **__restrict __valuep) + throw () __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__)); + + + + + +extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern int grantpt (int __fd) throw (); + + + +extern int unlockpt (int __fd) throw (); + + + + +extern char *ptsname (int __fd) throw () __attribute__ ((__warn_unused_result__)); + + + + + + +extern int ptsname_r (int __fd, char *__buf, size_t __buflen) + throw () __attribute__ ((__nonnull__ (2))); + + +extern int getpt (void); + + + + + + +extern int getloadavg (double __loadavg[], int __nelem) + throw () __attribute__ ((__nonnull__ (1))); + + + + + +# 1 "/usr/include/bits/stdlib.h" 1 3 4 +# 24 "/usr/include/bits/stdlib.h" 3 4 +extern char *__realpath_chk (__const char *__restrict __name, + char *__restrict __resolved, + size_t __resolvedlen) throw () __attribute__ ((__warn_unused_result__)); +extern char *__realpath_alias (__const char *__restrict __name, char *__restrict __resolved) throw () __asm__ ("" "realpath") + + __attribute__ ((__warn_unused_result__)); +extern char *__realpath_chk_warn (__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) throw () __asm__ ("" "__realpath_chk") + + + __attribute__ ((__warn_unused_result__)) + __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +realpath (__const char *__restrict __name, char *__restrict __resolved) throw () +{ + if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1) + { + + + + + return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); + } + + return __realpath_alias (__name, __resolved); +} + + +extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, + size_t __nreal) throw () __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) throw () __asm__ ("" "ptsname_r") + + __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__ptsname_r_chk") + + + __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +ptsname_r (int __fd, char *__buf, size_t __buflen) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __ptsname_r_alias (__fd, __buf, __buflen); +} + + +extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) + throw () __attribute__ ((__warn_unused_result__)); +extern int __wctomb_alias (char *__s, wchar_t __wchar) throw () __asm__ ("" "wctomb") + __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) int +wctomb (char *__s, wchar_t __wchar) throw () +{ + + + + + + + + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) + return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1)); + return __wctomb_alias (__s, __wchar); +} + + +extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, + __const char *__restrict __src, + size_t __len, size_t __dstlen) throw (); +extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) throw () __asm__ ("" "mbstowcs") + + + ; +extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) throw () __asm__ ("" "__mbstowcs_chk") + + + + __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +mbstowcs (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) throw () + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __mbstowcs_chk (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + + if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) + return __mbstowcs_chk_warn (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + } + return __mbstowcs_alias (__dst, __src, __len); +} + + +extern size_t __wcstombs_chk (char *__restrict __dst, + __const wchar_t *__restrict __src, + size_t __len, size_t __dstlen) throw (); +extern size_t __wcstombs_alias (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) throw () __asm__ ("" "wcstombs") + + + ; +extern size_t __wcstombs_chk_warn (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) throw () __asm__ ("" "__wcstombs_chk") + + + + __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len"))); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +wcstombs (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) throw () + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + if (__len > __builtin_object_size (__dst, 2 > 1)) + return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + } + return __wcstombs_alias (__dst, __src, __len); +} +# 956 "/usr/include/stdlib.h" 2 3 4 +# 964 "/usr/include/stdlib.h" 3 4 +} +# 67 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstdlib" 2 3 +# 98 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstdlib" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + using ::div_t; + using ::ldiv_t; + + using ::abort; + using ::abs; + using ::atexit; + using ::atof; + using ::atoi; + using ::atol; + using ::bsearch; + using ::calloc; + using ::div; + using ::exit; + using ::free; + using ::getenv; + using ::labs; + using ::ldiv; + using ::malloc; + + using ::mblen; + using ::mbstowcs; + using ::mbtowc; + + using ::qsort; + using ::rand; + using ::realloc; + using ::srand; + using ::strtod; + using ::strtol; + using ::strtoul; + using ::system; + + using ::wcstombs; + using ::wctomb; + + + inline long + abs(long __i) { return labs(__i); } + + inline ldiv_t + div(long __i, long __j) { return ldiv(__i, __j); } + + +} +# 158 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstdlib" 3 +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) +{ + + + + using ::lldiv_t; + + + + + + using ::_Exit; + + + inline long long + abs(long long __x) { return __x >= 0 ? __x : -__x; } + + + using ::llabs; + + inline lldiv_t + div(long long __n, long long __d) + { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } + + using ::lldiv; +# 193 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstdlib" 3 + using ::atoll; + using ::strtoll; + using ::strtoull; + + using ::strtof; + using ::strtold; + + +} + +namespace std +{ + + using ::__gnu_cxx::lldiv_t; + + using ::__gnu_cxx::_Exit; + using ::__gnu_cxx::abs; + + using ::__gnu_cxx::llabs; + using ::__gnu_cxx::div; + using ::__gnu_cxx::lldiv; + + using ::__gnu_cxx::atoll; + using ::__gnu_cxx::strtof; + using ::__gnu_cxx::strtoll; + using ::__gnu_cxx::strtoull; + using ::__gnu_cxx::strtold; +} +# 16 "../boost/config/platform/linux.hpp" 2 +# 74 "../boost/config/platform/linux.hpp" +# 1 "../boost/config/posix_features.hpp" 1 +# 75 "../boost/config/platform/linux.hpp" 2 +# 54 "../boost/config.hpp" 2 + + + +# 1 "../boost/config/suffix.hpp" 1 +# 33 "../boost/config/suffix.hpp" + +# 34 "../boost/config/suffix.hpp" 3 +# 520 "../boost/config/suffix.hpp" 3 +namespace boost{ + + __extension__ typedef long long long_long_type; + __extension__ typedef unsigned long long ulong_long_type; + + + + +} +# 58 "../boost/config.hpp" 2 +# 42 "../boost/detail/workaround.hpp" 2 +# 17 "../boost/smart_ptr/scoped_ptr.hpp" 2 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/memory" 1 3 +# 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/memory" 3 + +# 49 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/memory" 3 +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/memory" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 1 3 +# 61 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/functexcept.h" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/functexcept.h" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/exception_defines.h" 1 3 +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/functexcept.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + + void + __throw_bad_exception(void) __attribute__((__noreturn__)); + + + void + __throw_bad_alloc(void) __attribute__((__noreturn__)); + + + void + __throw_bad_cast(void) __attribute__((__noreturn__)); + + void + __throw_bad_typeid(void) __attribute__((__noreturn__)); + + + void + __throw_logic_error(const char*) __attribute__((__noreturn__)); + + void + __throw_domain_error(const char*) __attribute__((__noreturn__)); + + void + __throw_invalid_argument(const char*) __attribute__((__noreturn__)); + + void + __throw_length_error(const char*) __attribute__((__noreturn__)); + + void + __throw_out_of_range(const char*) __attribute__((__noreturn__)); + + void + __throw_runtime_error(const char*) __attribute__((__noreturn__)); + + void + __throw_range_error(const char*) __attribute__((__noreturn__)); + + void + __throw_overflow_error(const char*) __attribute__((__noreturn__)); + + void + __throw_underflow_error(const char*) __attribute__((__noreturn__)); + + + void + __throw_ios_failure(const char*) __attribute__((__noreturn__)); + + void + __throw_system_error(int) __attribute__((__noreturn__)); + + void + __throw_future_error(int) __attribute__((__noreturn__)); + + + void + __throw_bad_function_call() __attribute__((__noreturn__)); + + +} +# 62 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/cpp_type_traits.h" 1 3 +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/cpp_type_traits.h" 3 + +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/cpp_type_traits.h" 3 +# 69 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/cpp_type_traits.h" 3 +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) +{ + + + template + class __normal_iterator; + + +} + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + struct __true_type { }; + struct __false_type { }; + + template + struct __truth_type + { typedef __false_type __type; }; + + template<> + struct __truth_type + { typedef __true_type __type; }; + + + + template + struct __traitor + { + enum { __value = bool(_Sp::__value) || bool(_Tp::__value) }; + typedef typename __truth_type<__value>::__type __type; + }; + + + template + struct __are_same + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template + struct __are_same<_Tp, _Tp> + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template + struct __is_void + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template<> + struct __is_void + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_integer + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + + + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; +# 199 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/cpp_type_traits.h" 3 + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_floating + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_pointer + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template + struct __is_pointer<_Tp*> + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_normal_iterator + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template + struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator, + _Container> > + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_arithmetic + : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > + { }; + + + + + template + struct __is_fundamental + : public __traitor<__is_void<_Tp>, __is_arithmetic<_Tp> > + { }; + + + + + template + struct __is_scalar + : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > + { }; + + + + + template + struct __is_char + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template<> + struct __is_char + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template<> + struct __is_char + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + template + struct __is_byte + { + enum { __value = 0 }; + typedef __false_type __type; + }; + + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + + + + + template + struct __is_move_iterator + { + enum { __value = 0 }; + typedef __false_type __type; + }; +# 422 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/cpp_type_traits.h" 3 + +} +# 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ext/type_traits.h" 1 3 +# 32 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ext/type_traits.h" 3 + +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ext/type_traits.h" 3 + + + + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) +{ + + + + template + struct __enable_if + { }; + + template + struct __enable_if + { typedef _Tp __type; }; + + + + template + struct __conditional_type + { typedef _Iftrue __type; }; + + template + struct __conditional_type + { typedef _Iffalse __type; }; + + + + template + struct __add_unsigned + { + private: + typedef __enable_if::__value, _Tp> __if_type; + + public: + typedef typename __if_type::__type __type; + }; + + template<> + struct __add_unsigned + { typedef unsigned char __type; }; + + template<> + struct __add_unsigned + { typedef unsigned char __type; }; + + template<> + struct __add_unsigned + { typedef unsigned short __type; }; + + template<> + struct __add_unsigned + { typedef unsigned int __type; }; + + template<> + struct __add_unsigned + { typedef unsigned long __type; }; + + template<> + struct __add_unsigned + { typedef unsigned long long __type; }; + + + template<> + struct __add_unsigned; + + template<> + struct __add_unsigned; + + + + template + struct __remove_unsigned + { + private: + typedef __enable_if::__value, _Tp> __if_type; + + public: + typedef typename __if_type::__type __type; + }; + + template<> + struct __remove_unsigned + { typedef signed char __type; }; + + template<> + struct __remove_unsigned + { typedef signed char __type; }; + + template<> + struct __remove_unsigned + { typedef short __type; }; + + template<> + struct __remove_unsigned + { typedef int __type; }; + + template<> + struct __remove_unsigned + { typedef long __type; }; + + template<> + struct __remove_unsigned + { typedef long long __type; }; + + + template<> + struct __remove_unsigned; + + template<> + struct __remove_unsigned; + + + + template + inline bool + __is_null_pointer(_Type* __ptr) + { return __ptr == 0; } + + template + inline bool + __is_null_pointer(_Type) + { return false; } + + + + template::__value> + struct __promote + { typedef double __type; }; + + template + struct __promote<_Tp, false> + { typedef _Tp __type; }; + + template + struct __promote_2 + { + private: + typedef typename __promote<_Tp>::__type __type1; + typedef typename __promote<_Up>::__type __type2; + + public: + typedef __typeof__(__type1() + __type2()) __type; + }; + + template + struct __promote_3 + { + private: + typedef typename __promote<_Tp>::__type __type1; + typedef typename __promote<_Up>::__type __type2; + typedef typename __promote<_Vp>::__type __type3; + + public: + typedef __typeof__(__type1() + __type2() + __type3()) __type; + }; + + template + struct __promote_4 + { + private: + typedef typename __promote<_Tp>::__type __type1; + typedef typename __promote<_Up>::__type __type2; + typedef typename __promote<_Vp>::__type __type3; + typedef typename __promote<_Wp>::__type __type4; + + public: + typedef __typeof__(__type1() + __type2() + __type3() + __type4()) __type; + }; + + +} +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ext/numeric_traits.h" 1 3 +# 32 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ext/numeric_traits.h" 3 + +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ext/numeric_traits.h" 3 + + + + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) +{ + +# 54 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ext/numeric_traits.h" 3 + template + struct __numeric_traits_integer + { + + static const _Value __min = (((_Value)(-1) < 0) ? (_Value)1 << (sizeof(_Value) * 8 - ((_Value)(-1) < 0)) : (_Value)0); + static const _Value __max = (((_Value)(-1) < 0) ? (((((_Value)1 << ((sizeof(_Value) * 8 - ((_Value)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(_Value)0); + + + + static const bool __is_signed = ((_Value)(-1) < 0); + static const int __digits = (sizeof(_Value) * 8 - ((_Value)(-1) < 0)); + }; + + template + const _Value __numeric_traits_integer<_Value>::__min; + + template + const _Value __numeric_traits_integer<_Value>::__max; + + template + const bool __numeric_traits_integer<_Value>::__is_signed; + + template + const int __numeric_traits_integer<_Value>::__digits; +# 99 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ext/numeric_traits.h" 3 + template + struct __numeric_traits_floating + { + + static const int __max_digits10 = (2 + (std::__are_same<_Value, float>::__value ? 24 : std::__are_same<_Value, double>::__value ? 53 : 64) * 643L / 2136); + + + static const bool __is_signed = true; + static const int __digits10 = (std::__are_same<_Value, float>::__value ? 6 : std::__are_same<_Value, double>::__value ? 15 : 18); + static const int __max_exponent10 = (std::__are_same<_Value, float>::__value ? 38 : std::__are_same<_Value, double>::__value ? 308 : 4932); + }; + + template + const int __numeric_traits_floating<_Value>::__max_digits10; + + template + const bool __numeric_traits_floating<_Value>::__is_signed; + + template + const int __numeric_traits_floating<_Value>::__digits10; + + template + const int __numeric_traits_floating<_Value>::__max_exponent10; + + template + struct __numeric_traits + : public __conditional_type::__value, + __numeric_traits_integer<_Value>, + __numeric_traits_floating<_Value> >::__type + { }; + + +} +# 65 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 2 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator_base_types.h" 1 3 +# 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator_base_types.h" 3 + +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator_base_types.h" 3 + + + + + + + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 90 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator_base_types.h" 3 + struct input_iterator_tag { }; + + + struct output_iterator_tag { }; + + + struct forward_iterator_tag : public input_iterator_tag { }; + + + + struct bidirectional_iterator_tag : public forward_iterator_tag { }; + + + + struct random_access_iterator_tag : public bidirectional_iterator_tag { }; +# 117 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator_base_types.h" 3 + template + struct iterator + { + + typedef _Category iterator_category; + + typedef _Tp value_type; + + typedef _Distance difference_type; + + typedef _Pointer pointer; + + typedef _Reference reference; + }; +# 163 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator_base_types.h" 3 + template + struct iterator_traits + { + typedef typename _Iterator::iterator_category iterator_category; + typedef typename _Iterator::value_type value_type; + typedef typename _Iterator::difference_type difference_type; + typedef typename _Iterator::pointer pointer; + typedef typename _Iterator::reference reference; + }; + + + + template + struct iterator_traits<_Tp*> + { + typedef random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef _Tp& reference; + }; + + + template + struct iterator_traits + { + typedef random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef ptrdiff_t difference_type; + typedef const _Tp* pointer; + typedef const _Tp& reference; + }; + + + + + + template + inline typename iterator_traits<_Iter>::iterator_category + __iterator_category(const _Iter&) + { return typename iterator_traits<_Iter>::iterator_category(); } + + + + + + template + struct _Iter_base + { + typedef _Iterator iterator_type; + static iterator_type _S_base(_Iterator __it) + { return __it; } + }; + + template + struct _Iter_base<_Iterator, true> + { + typedef typename _Iterator::iterator_type iterator_type; + static iterator_type _S_base(_Iterator __it) + { return __it.base(); } + }; + + +} +# 67 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator_base_funcs.h" 1 3 +# 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 + +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 + + + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + template + inline typename iterator_traits<_InputIterator>::difference_type + __distance(_InputIterator __first, _InputIterator __last, + input_iterator_tag) + { + + + + typename iterator_traits<_InputIterator>::difference_type __n = 0; + while (__first != __last) + { + ++__first; + ++__n; + } + return __n; + } + + template + inline typename iterator_traits<_RandomAccessIterator>::difference_type + __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, + random_access_iterator_tag) + { + + + + return __last - __first; + } +# 111 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 + template + inline typename iterator_traits<_InputIterator>::difference_type + distance(_InputIterator __first, _InputIterator __last) + { + + return std::__distance(__first, __last, + std::__iterator_category(__first)); + } + + template + inline void + __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) + { + + + while (__n--) + ++__i; + } + + template + inline void + __advance(_BidirectionalIterator& __i, _Distance __n, + bidirectional_iterator_tag) + { + + + + if (__n > 0) + while (__n--) + ++__i; + else + while (__n++) + --__i; + } + + template + inline void + __advance(_RandomAccessIterator& __i, _Distance __n, + random_access_iterator_tag) + { + + + + __i += __n; + } +# 169 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 + template + inline void + advance(_InputIterator& __i, _Distance __n) + { + + typename iterator_traits<_InputIterator>::difference_type __d = __n; + std::__advance(__i, __d, std::__iterator_category(__i)); + } +# 200 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator_base_funcs.h" 3 + +} +# 68 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator.h" 1 3 +# 68 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 96 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator.h" 3 + template + class reverse_iterator + : public iterator::iterator_category, + typename iterator_traits<_Iterator>::value_type, + typename iterator_traits<_Iterator>::difference_type, + typename iterator_traits<_Iterator>::pointer, + typename iterator_traits<_Iterator>::reference> + { + protected: + _Iterator current; + + typedef iterator_traits<_Iterator> __traits_type; + + public: + typedef _Iterator iterator_type; + typedef typename __traits_type::difference_type difference_type; + typedef typename __traits_type::pointer pointer; + typedef typename __traits_type::reference reference; + + + + + + + + reverse_iterator() : current() { } + + + + + explicit + reverse_iterator(iterator_type __x) : current(__x) { } + + + + + reverse_iterator(const reverse_iterator& __x) + : current(__x.current) { } + + + + + + template + reverse_iterator(const reverse_iterator<_Iter>& __x) + : current(__x.base()) { } + + + + + iterator_type + base() const + { return current; } + + + + + + + reference + operator*() const + { + _Iterator __tmp = current; + return *--__tmp; + } + + + + + + + pointer + operator->() const + { return &(operator*()); } + + + + + + + reverse_iterator& + operator++() + { + --current; + return *this; + } + + + + + + + reverse_iterator + operator++(int) + { + reverse_iterator __tmp = *this; + --current; + return __tmp; + } + + + + + + + reverse_iterator& + operator--() + { + ++current; + return *this; + } + + + + + + + reverse_iterator + operator--(int) + { + reverse_iterator __tmp = *this; + ++current; + return __tmp; + } + + + + + + + reverse_iterator + operator+(difference_type __n) const + { return reverse_iterator(current - __n); } + + + + + + + reverse_iterator& + operator+=(difference_type __n) + { + current -= __n; + return *this; + } + + + + + + + reverse_iterator + operator-(difference_type __n) const + { return reverse_iterator(current + __n); } + + + + + + + reverse_iterator& + operator-=(difference_type __n) + { + current += __n; + return *this; + } + + + + + + + reference + operator[](difference_type __n) const + { return *(*this + __n); } + }; +# 283 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator.h" 3 + template + inline bool + operator==(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return __x.base() == __y.base(); } + + template + inline bool + operator<(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return __y.base() < __x.base(); } + + template + inline bool + operator!=(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return !(__x == __y); } + + template + inline bool + operator>(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return __y < __x; } + + template + inline bool + operator<=(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return !(__y < __x); } + + template + inline bool + operator>=(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return !(__x < __y); } + + template + inline typename reverse_iterator<_Iterator>::difference_type + operator-(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return __y.base() - __x.base(); } + + template + inline reverse_iterator<_Iterator> + operator+(typename reverse_iterator<_Iterator>::difference_type __n, + const reverse_iterator<_Iterator>& __x) + { return reverse_iterator<_Iterator>(__x.base() - __n); } + + + + template + inline bool + operator==(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __x.base() == __y.base(); } + + template + inline bool + operator<(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __y.base() < __x.base(); } + + template + inline bool + operator!=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return !(__x == __y); } + + template + inline bool + operator>(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __y < __x; } + + template + inline bool + operator<=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return !(__y < __x); } + + template + inline bool + operator>=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return !(__x < __y); } + + template + + + + + + + + inline typename reverse_iterator<_IteratorL>::difference_type + operator-(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + + { return __y.base() - __x.base(); } +# 395 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator.h" 3 + template + class back_insert_iterator + : public iterator + { + protected: + _Container* container; + + public: + + typedef _Container container_type; + + + explicit + back_insert_iterator(_Container& __x) : container(&__x) { } +# 422 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator.h" 3 + back_insert_iterator& + operator=(typename _Container::const_reference __value) + { + container->push_back(__value); + return *this; + } +# 445 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator.h" 3 + back_insert_iterator& + operator*() + { return *this; } + + + back_insert_iterator& + operator++() + { return *this; } + + + back_insert_iterator + operator++(int) + { return *this; } + }; +# 471 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator.h" 3 + template + inline back_insert_iterator<_Container> + back_inserter(_Container& __x) + { return back_insert_iterator<_Container>(__x); } +# 486 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator.h" 3 + template + class front_insert_iterator + : public iterator + { + protected: + _Container* container; + + public: + + typedef _Container container_type; + + + explicit front_insert_iterator(_Container& __x) : container(&__x) { } +# 512 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator.h" 3 + front_insert_iterator& + operator=(typename _Container::const_reference __value) + { + container->push_front(__value); + return *this; + } +# 535 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator.h" 3 + front_insert_iterator& + operator*() + { return *this; } + + + front_insert_iterator& + operator++() + { return *this; } + + + front_insert_iterator + operator++(int) + { return *this; } + }; +# 561 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator.h" 3 + template + inline front_insert_iterator<_Container> + front_inserter(_Container& __x) + { return front_insert_iterator<_Container>(__x); } +# 580 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator.h" 3 + template + class insert_iterator + : public iterator + { + protected: + _Container* container; + typename _Container::iterator iter; + + public: + + typedef _Container container_type; + + + + + + insert_iterator(_Container& __x, typename _Container::iterator __i) + : container(&__x), iter(__i) {} +# 623 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator.h" 3 + insert_iterator& + operator=(typename _Container::const_reference __value) + { + iter = container->insert(iter, __value); + ++iter; + return *this; + } +# 649 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator.h" 3 + insert_iterator& + operator*() + { return *this; } + + + insert_iterator& + operator++() + { return *this; } + + + insert_iterator& + operator++(int) + { return *this; } + }; +# 675 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator.h" 3 + template + inline insert_iterator<_Container> + inserter(_Container& __x, _Iterator __i) + { + return insert_iterator<_Container>(__x, + typename _Container::iterator(__i)); + } + + + + +} + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) +{ + +# 699 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator.h" 3 + using std::iterator_traits; + using std::iterator; + template + class __normal_iterator + { + protected: + _Iterator _M_current; + + typedef iterator_traits<_Iterator> __traits_type; + + public: + typedef _Iterator iterator_type; + typedef typename __traits_type::iterator_category iterator_category; + typedef typename __traits_type::value_type value_type; + typedef typename __traits_type::difference_type difference_type; + typedef typename __traits_type::reference reference; + typedef typename __traits_type::pointer pointer; + + __normal_iterator() : _M_current(_Iterator()) { } + + explicit + __normal_iterator(const _Iterator& __i) : _M_current(__i) { } + + + template + __normal_iterator(const __normal_iterator<_Iter, + typename __enable_if< + (std::__are_same<_Iter, typename _Container::pointer>::__value), + _Container>::__type>& __i) + : _M_current(__i.base()) { } + + + reference + operator*() const + { return *_M_current; } + + pointer + operator->() const + { return _M_current; } + + __normal_iterator& + operator++() + { + ++_M_current; + return *this; + } + + __normal_iterator + operator++(int) + { return __normal_iterator(_M_current++); } + + + __normal_iterator& + operator--() + { + --_M_current; + return *this; + } + + __normal_iterator + operator--(int) + { return __normal_iterator(_M_current--); } + + + reference + operator[](const difference_type& __n) const + { return _M_current[__n]; } + + __normal_iterator& + operator+=(const difference_type& __n) + { _M_current += __n; return *this; } + + __normal_iterator + operator+(const difference_type& __n) const + { return __normal_iterator(_M_current + __n); } + + __normal_iterator& + operator-=(const difference_type& __n) + { _M_current -= __n; return *this; } + + __normal_iterator + operator-(const difference_type& __n) const + { return __normal_iterator(_M_current - __n); } + + const _Iterator& + base() const + { return _M_current; } + }; +# 797 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_iterator.h" 3 + template + inline bool + operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() == __rhs.base(); } + + template + inline bool + operator==(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() == __rhs.base(); } + + template + inline bool + operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() != __rhs.base(); } + + template + inline bool + operator!=(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() != __rhs.base(); } + + + template + inline bool + operator<(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() < __rhs.base(); } + + template + inline bool + operator<(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() < __rhs.base(); } + + template + inline bool + operator>(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() > __rhs.base(); } + + template + inline bool + operator>(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() > __rhs.base(); } + + template + inline bool + operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() <= __rhs.base(); } + + template + inline bool + operator<=(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() <= __rhs.base(); } + + template + inline bool + operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() >= __rhs.base(); } + + template + inline bool + operator>=(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() >= __rhs.base(); } + + + + + + template + + + + + + + + inline typename __normal_iterator<_IteratorL, _Container>::difference_type + operator-(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + + { return __lhs.base() - __rhs.base(); } + + template + inline typename __normal_iterator<_Iterator, _Container>::difference_type + operator-(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() - __rhs.base(); } + + template + inline __normal_iterator<_Iterator, _Container> + operator+(typename __normal_iterator<_Iterator, _Container>::difference_type + __n, const __normal_iterator<_Iterator, _Container>& __i) + { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } + + +} +# 69 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 2 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/debug/debug.h" 1 3 +# 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/debug/debug.h" 3 +namespace std +{ + namespace __debug { } +} + + + + +namespace __gnu_debug +{ + using namespace std::__debug; +} +# 71 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 2 3 + + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + + + + template + struct __iter_swap + { + template + static void + iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) + { + typedef typename iterator_traits<_ForwardIterator1>::value_type + _ValueType1; + _ValueType1 __tmp = (*__a); + *__a = (*__b); + *__b = (__tmp); + } + }; + + template<> + struct __iter_swap + { + template + static void + iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) + { + swap(*__a, *__b); + } + }; +# 116 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 3 + template + inline void + iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) + { + typedef typename iterator_traits<_ForwardIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_ForwardIterator2>::value_type + _ValueType2; + + + + + + + + + + + + typedef typename iterator_traits<_ForwardIterator1>::reference + _ReferenceType1; + typedef typename iterator_traits<_ForwardIterator2>::reference + _ReferenceType2; + std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value + && __are_same<_ValueType1&, _ReferenceType1>::__value + && __are_same<_ValueType2&, _ReferenceType2>::__value>:: + iter_swap(__a, __b); + } +# 157 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 3 + template + _ForwardIterator2 + swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2) + { + + + + + + ; + + for (; __first1 != __last1; ++__first1, ++__first2) + std::iter_swap(__first1, __first2); + return __first2; + } +# 185 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 3 + template + inline const _Tp& + min(const _Tp& __a, const _Tp& __b) + { + + + + if (__b < __a) + return __b; + return __a; + } +# 208 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 3 + template + inline const _Tp& + max(const _Tp& __a, const _Tp& __b) + { + + + + if (__a < __b) + return __b; + return __a; + } +# 231 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 3 + template + inline const _Tp& + min(const _Tp& __a, const _Tp& __b, _Compare __comp) + { + + if (__comp(__b, __a)) + return __b; + return __a; + } +# 252 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 3 + template + inline const _Tp& + max(const _Tp& __a, const _Tp& __b, _Compare __comp) + { + + if (__comp(__a, __b)) + return __b; + return __a; + } + + + + template + struct _Niter_base + : _Iter_base<_Iterator, __is_normal_iterator<_Iterator>::__value> + { }; + + template + inline typename _Niter_base<_Iterator>::iterator_type + __niter_base(_Iterator __it) + { return std::_Niter_base<_Iterator>::_S_base(__it); } + + + template + struct _Miter_base + : _Iter_base<_Iterator, __is_move_iterator<_Iterator>::__value> + { }; + + template + inline typename _Miter_base<_Iterator>::iterator_type + __miter_base(_Iterator __it) + { return std::_Miter_base<_Iterator>::_S_base(__it); } + + + + + + + + template + struct __copy_move + { + template + static _OI + __copy_m(_II __first, _II __last, _OI __result) + { + for (; __first != __last; ++__result, ++__first) + *__result = *__first; + return __result; + } + }; +# 319 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 3 + template<> + struct __copy_move + { + template + static _OI + __copy_m(_II __first, _II __last, _OI __result) + { + typedef typename iterator_traits<_II>::difference_type _Distance; + for(_Distance __n = __last - __first; __n > 0; --__n) + { + *__result = *__first; + ++__first; + ++__result; + } + return __result; + } + }; +# 357 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 3 + template + struct __copy_move<_IsMove, true, random_access_iterator_tag> + { + template + static _Tp* + __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result) + { + const ptrdiff_t _Num = __last - __first; + if (_Num) + __builtin_memmove(__result, __first, sizeof(_Tp) * _Num); + return __result + _Num; + } + }; + + template + inline _OI + __copy_move_a(_II __first, _II __last, _OI __result) + { + typedef typename iterator_traits<_II>::value_type _ValueTypeI; + typedef typename iterator_traits<_OI>::value_type _ValueTypeO; + typedef typename iterator_traits<_II>::iterator_category _Category; + const bool __simple = (__is_trivial(_ValueTypeI) + && __is_pointer<_II>::__value + && __is_pointer<_OI>::__value + && __are_same<_ValueTypeI, _ValueTypeO>::__value); + + return std::__copy_move<_IsMove, __simple, + _Category>::__copy_m(__first, __last, __result); + } + + + + template + struct char_traits; + + template + class istreambuf_iterator; + + template + class ostreambuf_iterator; + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type + __copy_move_a2(_CharT*, _CharT*, + ostreambuf_iterator<_CharT, char_traits<_CharT> >); + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type + __copy_move_a2(const _CharT*, const _CharT*, + ostreambuf_iterator<_CharT, char_traits<_CharT> >); + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + _CharT*>::__type + __copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >, + istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*); + + template + inline _OI + __copy_move_a2(_II __first, _II __last, _OI __result) + { + return _OI(std::__copy_move_a<_IsMove>(std::__niter_base(__first), + std::__niter_base(__last), + std::__niter_base(__result))); + } +# 442 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 3 + template + inline _OI + copy(_II __first, _II __last, _OI __result) + { + + + + + ; + + return (std::__copy_move_a2<__is_move_iterator<_II>::__value> + (std::__miter_base(__first), std::__miter_base(__last), + __result)); + } +# 494 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 3 + template + struct __copy_move_backward + { + template + static _BI2 + __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) + { + while (__first != __last) + *--__result = *--__last; + return __result; + } + }; +# 522 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 3 + template<> + struct __copy_move_backward + { + template + static _BI2 + __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) + { + typename iterator_traits<_BI1>::difference_type __n; + for (__n = __last - __first; __n > 0; --__n) + *--__result = *--__last; + return __result; + } + }; +# 552 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 3 + template + struct __copy_move_backward<_IsMove, true, random_access_iterator_tag> + { + template + static _Tp* + __copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result) + { + const ptrdiff_t _Num = __last - __first; + if (_Num) + __builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num); + return __result - _Num; + } + }; + + template + inline _BI2 + __copy_move_backward_a(_BI1 __first, _BI1 __last, _BI2 __result) + { + typedef typename iterator_traits<_BI1>::value_type _ValueType1; + typedef typename iterator_traits<_BI2>::value_type _ValueType2; + typedef typename iterator_traits<_BI1>::iterator_category _Category; + const bool __simple = (__is_trivial(_ValueType1) + && __is_pointer<_BI1>::__value + && __is_pointer<_BI2>::__value + && __are_same<_ValueType1, _ValueType2>::__value); + + return std::__copy_move_backward<_IsMove, __simple, + _Category>::__copy_move_b(__first, + __last, + __result); + } + + template + inline _BI2 + __copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result) + { + return _BI2(std::__copy_move_backward_a<_IsMove> + (std::__niter_base(__first), std::__niter_base(__last), + std::__niter_base(__result))); + } +# 611 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 3 + template + inline _BI2 + copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) + { + + + + + + + ; + + return (std::__copy_move_backward_a2<__is_move_iterator<_BI1>::__value> + (std::__miter_base(__first), std::__miter_base(__last), + __result)); + } +# 669 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 3 + template + inline typename + __gnu_cxx::__enable_if::__value, void>::__type + __fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __value) + { + for (; __first != __last; ++__first) + *__first = __value; + } + + template + inline typename + __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type + __fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __value) + { + const _Tp __tmp = __value; + for (; __first != __last; ++__first) + *__first = __tmp; + } + + + template + inline typename + __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type + __fill_a(_Tp* __first, _Tp* __last, const _Tp& __c) + { + const _Tp __tmp = __c; + __builtin_memset(__first, static_cast(__tmp), + __last - __first); + } +# 713 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 3 + template + inline void + fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) + { + + + + ; + + std::__fill_a(std::__niter_base(__first), std::__niter_base(__last), + __value); + } + + template + inline typename + __gnu_cxx::__enable_if::__value, _OutputIterator>::__type + __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) + { + for (__decltype(__n + 0) __niter = __n; + __niter > 0; --__niter, ++__first) + *__first = __value; + return __first; + } + + template + inline typename + __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type + __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) + { + const _Tp __tmp = __value; + for (__decltype(__n + 0) __niter = __n; + __niter > 0; --__niter, ++__first) + *__first = __tmp; + return __first; + } + + template + inline typename + __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, _Tp*>::__type + __fill_n_a(_Tp* __first, _Size __n, const _Tp& __c) + { + std::__fill_a(__first, __first + __n, __c); + return __first + __n; + } +# 773 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 3 + template + inline _OI + fill_n(_OI __first, _Size __n, const _Tp& __value) + { + + + + return _OI(std::__fill_n_a(std::__niter_base(__first), __n, __value)); + } + + template + struct __equal + { + template + static bool + equal(_II1 __first1, _II1 __last1, _II2 __first2) + { + for (; __first1 != __last1; ++__first1, ++__first2) + if (!(*__first1 == *__first2)) + return false; + return true; + } + }; + + template<> + struct __equal + { + template + static bool + equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2) + { + return !__builtin_memcmp(__first1, __first2, sizeof(_Tp) + * (__last1 - __first1)); + } + }; + + template + inline bool + __equal_aux(_II1 __first1, _II1 __last1, _II2 __first2) + { + typedef typename iterator_traits<_II1>::value_type _ValueType1; + typedef typename iterator_traits<_II2>::value_type _ValueType2; + const bool __simple = (__is_integer<_ValueType1>::__value + && __is_pointer<_II1>::__value + && __is_pointer<_II2>::__value + && __are_same<_ValueType1, _ValueType2>::__value); + + return std::__equal<__simple>::equal(__first1, __last1, __first2); + } + + + template + struct __lc_rai + { + template + static _II1 + __newlast1(_II1, _II1 __last1, _II2, _II2) + { return __last1; } + + template + static bool + __cnd2(_II __first, _II __last) + { return __first != __last; } + }; + + template<> + struct __lc_rai + { + template + static _RAI1 + __newlast1(_RAI1 __first1, _RAI1 __last1, + _RAI2 __first2, _RAI2 __last2) + { + const typename iterator_traits<_RAI1>::difference_type + __diff1 = __last1 - __first1; + const typename iterator_traits<_RAI2>::difference_type + __diff2 = __last2 - __first2; + return __diff2 < __diff1 ? __first1 + __diff2 : __last1; + } + + template + static bool + __cnd2(_RAI, _RAI) + { return true; } + }; + + template + struct __lexicographical_compare + { + template + static bool __lc(_II1, _II1, _II2, _II2); + }; + + template + template + bool + __lexicographical_compare<_BoolType>:: + __lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) + { + typedef typename iterator_traits<_II1>::iterator_category _Category1; + typedef typename iterator_traits<_II2>::iterator_category _Category2; + typedef std::__lc_rai<_Category1, _Category2> __rai_type; + + __last1 = __rai_type::__newlast1(__first1, __last1, + __first2, __last2); + for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); + ++__first1, ++__first2) + { + if (*__first1 < *__first2) + return true; + if (*__first2 < *__first1) + return false; + } + return __first1 == __last1 && __first2 != __last2; + } + + template<> + struct __lexicographical_compare + { + template + static bool + __lc(const _Tp* __first1, const _Tp* __last1, + const _Up* __first2, const _Up* __last2) + { + const size_t __len1 = __last1 - __first1; + const size_t __len2 = __last2 - __first2; + const int __result = __builtin_memcmp(__first1, __first2, + std::min(__len1, __len2)); + return __result != 0 ? __result < 0 : __len1 < __len2; + } + }; + + template + inline bool + __lexicographical_compare_aux(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2) + { + typedef typename iterator_traits<_II1>::value_type _ValueType1; + typedef typename iterator_traits<_II2>::value_type _ValueType2; + const bool __simple = + (__is_byte<_ValueType1>::__value && __is_byte<_ValueType2>::__value + && !__gnu_cxx::__numeric_traits<_ValueType1>::__is_signed + && !__gnu_cxx::__numeric_traits<_ValueType2>::__is_signed + && __is_pointer<_II1>::__value + && __is_pointer<_II2>::__value); + + return std::__lexicographical_compare<__simple>::__lc(__first1, __last1, + __first2, __last2); + } +# 934 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 3 + template + _ForwardIterator + lower_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + + + ; + + _DistanceType __len = std::distance(__first, __last); + + while (__len > 0) + { + _DistanceType __half = __len >> 1; + _ForwardIterator __middle = __first; + std::advance(__middle, __half); + if (*__middle < __val) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else + __len = __half; + } + return __first; + } + + + + template + inline _Size + __lg(_Size __n) + { + _Size __k; + for (__k = 0; __n != 0; __n >>= 1) + ++__k; + return __k - 1; + } + + inline int + __lg(int __n) + { return sizeof(int) * 8 - 1 - __builtin_clz(__n); } + + inline long + __lg(long __n) + { return sizeof(long) * 8 - 1 - __builtin_clzl(__n); } + + inline long long + __lg(long long __n) + { return sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } + + + + +# 1008 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 3 + template + inline bool + equal(_II1 __first1, _II1 __last1, _II2 __first2) + { + + + + + + + ; + + return std::__equal_aux(std::__niter_base(__first1), + std::__niter_base(__last1), + std::__niter_base(__first2)); + } +# 1040 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 3 + template + inline bool + equal(_IIter1 __first1, _IIter1 __last1, + _IIter2 __first2, _BinaryPredicate __binary_pred) + { + + + + ; + + for (; __first1 != __last1; ++__first1, ++__first2) + if (!bool(__binary_pred(*__first1, *__first2))) + return false; + return true; + } +# 1071 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 3 + template + inline bool + lexicographical_compare(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2) + { + + typedef typename iterator_traits<_II1>::value_type _ValueType1; + typedef typename iterator_traits<_II2>::value_type _ValueType2; + + + + + ; + ; + + return std::__lexicographical_compare_aux(std::__niter_base(__first1), + std::__niter_base(__last1), + std::__niter_base(__first2), + std::__niter_base(__last2)); + } +# 1105 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 3 + template + bool + lexicographical_compare(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2, _Compare __comp) + { + typedef typename iterator_traits<_II1>::iterator_category _Category1; + typedef typename iterator_traits<_II2>::iterator_category _Category2; + typedef std::__lc_rai<_Category1, _Category2> __rai_type; + + + + + ; + ; + + __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2); + for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); + ++__first1, ++__first2) + { + if (__comp(*__first1, *__first2)) + return true; + if (__comp(*__first2, *__first1)) + return false; + } + return __first1 == __last1 && __first2 != __last2; + } +# 1145 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 3 + template + pair<_InputIterator1, _InputIterator2> + mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2) + { + + + + + + + ; + + while (__first1 != __last1 && *__first1 == *__first2) + { + ++__first1; + ++__first2; + } + return pair<_InputIterator1, _InputIterator2>(__first1, __first2); + } +# 1182 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algobase.h" 3 + template + pair<_InputIterator1, _InputIterator2> + mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _BinaryPredicate __binary_pred) + { + + + + ; + + while (__first1 != __last1 && bool(__binary_pred(*__first1, *__first2))) + { + ++__first1; + ++__first2; + } + return pair<_InputIterator1, _InputIterator2>(__first1, __first2); + } + + +} +# 65 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/memory" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/allocator.h" 1 3 +# 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/allocator.h" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/c++allocator.h" 1 3 +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/c++allocator.h" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ext/new_allocator.h" 1 3 +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ext/new_allocator.h" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/new" 1 3 +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/new" 3 + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/new" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/exception" 1 3 +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/exception" 3 + +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/exception" 3 + +#pragma GCC visibility push(default) + + + +extern "C++" { + +namespace std +{ +# 61 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/exception" 3 + class exception + { + public: + exception() throw() { } + virtual ~exception() throw(); + + + + virtual const char* what() const throw(); + }; + + + + class bad_exception : public exception + { + public: + bad_exception() throw() { } + + + + virtual ~bad_exception() throw(); + + + virtual const char* what() const throw(); + }; + + + typedef void (*terminate_handler) (); + + + typedef void (*unexpected_handler) (); + + + terminate_handler set_terminate(terminate_handler) throw(); + + + + void terminate() throw() __attribute__ ((__noreturn__)); + + + unexpected_handler set_unexpected(unexpected_handler) throw(); + + + + void unexpected() __attribute__ ((__noreturn__)); +# 118 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/exception" 3 + bool uncaught_exception() throw() __attribute__ ((__pure__)); + + +} + +namespace __gnu_cxx +{ + +# 143 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/exception" 3 + void __verbose_terminate_handler(); + + +} + +} + +#pragma GCC visibility pop +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/new" 2 3 + +#pragma GCC visibility push(default) + +extern "C++" { + +namespace std +{ + + + + + + + class bad_alloc : public exception + { + public: + bad_alloc() throw() { } + + + + virtual ~bad_alloc() throw(); + + + virtual const char* what() const throw(); + }; + + struct nothrow_t { }; + + extern const nothrow_t nothrow; + + + + typedef void (*new_handler)(); + + + + new_handler set_new_handler(new_handler) throw(); +} +# 93 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/new" 3 +void* operator new(std::size_t) throw (std::bad_alloc); +void* operator new[](std::size_t) throw (std::bad_alloc); +void operator delete(void*) throw(); +void operator delete[](void*) throw(); +void* operator new(std::size_t, const std::nothrow_t&) throw(); +void* operator new[](std::size_t, const std::nothrow_t&) throw(); +void operator delete(void*, const std::nothrow_t&) throw(); +void operator delete[](void*, const std::nothrow_t&) throw(); + + +inline void* operator new(std::size_t, void* __p) throw() { return __p; } +inline void* operator new[](std::size_t, void* __p) throw() { return __p; } + + +inline void operator delete (void*, void*) throw() { } +inline void operator delete[](void*, void*) throw() { } + +} + +#pragma GCC visibility pop +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ext/new_allocator.h" 2 3 + + + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) +{ + + + using std::size_t; + using std::ptrdiff_t; +# 53 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ext/new_allocator.h" 3 + template + class new_allocator + { + public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef const _Tp* const_pointer; + typedef _Tp& reference; + typedef const _Tp& const_reference; + typedef _Tp value_type; + + template + struct rebind + { typedef new_allocator<_Tp1> other; }; + + new_allocator() throw() { } + + new_allocator(const new_allocator&) throw() { } + + template + new_allocator(const new_allocator<_Tp1>&) throw() { } + + ~new_allocator() throw() { } + + pointer + address(reference __x) const { return std::__addressof(__x); } + + const_pointer + address(const_reference __x) const { return std::__addressof(__x); } + + + + pointer + allocate(size_type __n, const void* = 0) + { + if (__n > this->max_size()) + std::__throw_bad_alloc(); + + return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); + } + + + void + deallocate(pointer __p, size_type) + { ::operator delete(__p); } + + size_type + max_size() const throw() + { return size_t(-1) / sizeof(_Tp); } + + + + void + construct(pointer __p, const _Tp& __val) + { ::new((void *)__p) _Tp(__val); } +# 117 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ext/new_allocator.h" 3 + void + destroy(pointer __p) { __p->~_Tp(); } + }; + + template + inline bool + operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&) + { return true; } + + template + inline bool + operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&) + { return false; } + + +} +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/c++allocator.h" 2 3 +# 49 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/allocator.h" 2 3 + + + + + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 65 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/allocator.h" 3 + template + class allocator; + + + template<> + class allocator + { + public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef void* pointer; + typedef const void* const_pointer; + typedef void value_type; + + template + struct rebind + { typedef allocator<_Tp1> other; }; + }; +# 91 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/allocator.h" 3 + template + class allocator: public __gnu_cxx::new_allocator<_Tp> + { + public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef const _Tp* const_pointer; + typedef _Tp& reference; + typedef const _Tp& const_reference; + typedef _Tp value_type; + + template + struct rebind + { typedef allocator<_Tp1> other; }; + + allocator() throw() { } + + allocator(const allocator& __a) throw() + : __gnu_cxx::new_allocator<_Tp>(__a) { } + + template + allocator(const allocator<_Tp1>&) throw() { } + + ~allocator() throw() { } + + + }; + + template + inline bool + operator==(const allocator<_T1>&, const allocator<_T2>&) + { return true; } + + template + inline bool + operator==(const allocator<_Tp>&, const allocator<_Tp>&) + { return true; } + + template + inline bool + operator!=(const allocator<_T1>&, const allocator<_T2>&) + { return false; } + + template + inline bool + operator!=(const allocator<_Tp>&, const allocator<_Tp>&) + { return false; } + + + + + extern template class allocator; + extern template class allocator; + + + + + + + template + struct __alloc_swap + { static void _S_do_it(_Alloc&, _Alloc&) { } }; + + template + struct __alloc_swap<_Alloc, false> + { + static void + _S_do_it(_Alloc& __one, _Alloc& __two) + { + + if (__one != __two) + swap(__one, __two); + } + }; + + + template + struct __alloc_neq + { + static bool + _S_do_it(const _Alloc&, const _Alloc&) + { return false; } + }; + + template + struct __alloc_neq<_Alloc, false> + { + static bool + _S_do_it(const _Alloc& __one, const _Alloc& __two) + { return __one != __two; } + }; +# 236 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/allocator.h" 3 + +} +# 66 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/memory" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_construct.h" 1 3 +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_construct.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 78 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_construct.h" 3 + template + inline void + _Construct(_T1* __p, const _T2& __value) + { + + + ::new(static_cast(__p)) _T1(__value); + } + + + + + + template + inline void + _Destroy(_Tp* __pointer) + { __pointer->~_Tp(); } + + template + struct _Destroy_aux + { + template + static void + __destroy(_ForwardIterator __first, _ForwardIterator __last) + { + for (; __first != __last; ++__first) + std::_Destroy(std::__addressof(*__first)); + } + }; + + template<> + struct _Destroy_aux + { + template + static void + __destroy(_ForwardIterator, _ForwardIterator) { } + }; + + + + + + + template + inline void + _Destroy(_ForwardIterator __first, _ForwardIterator __last) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _Value_type; + std::_Destroy_aux<__has_trivial_destructor(_Value_type)>:: + __destroy(__first, __last); + } + + + + + + + + template class allocator; + + template + void + _Destroy(_ForwardIterator __first, _ForwardIterator __last, + _Allocator& __alloc) + { + for (; __first != __last; ++__first) + __alloc.destroy(std::__addressof(*__first)); + } + + template + inline void + _Destroy(_ForwardIterator __first, _ForwardIterator __last, + allocator<_Tp>&) + { + _Destroy(__first, __last); + } + + +} +# 67 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/memory" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_uninitialized.h" 1 3 +# 61 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_uninitialized.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + template + struct __uninitialized_copy + { + template + static _ForwardIterator + __uninit_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { + _ForwardIterator __cur = __result; + try + { + for (; __first != __last; ++__first, ++__cur) + std::_Construct(std::__addressof(*__cur), *__first); + return __cur; + } + catch(...) + { + std::_Destroy(__result, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_copy + { + template + static _ForwardIterator + __uninit_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { return std::copy(__first, __last, __result); } + }; +# 107 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_uninitialized.h" 3 + template + inline _ForwardIterator + uninitialized_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { + typedef typename iterator_traits<_InputIterator>::value_type + _ValueType1; + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType2; + + return std::__uninitialized_copy<(__is_trivial(_ValueType1) + && __is_trivial(_ValueType2))>:: + __uninit_copy(__first, __last, __result); + } + + + template + struct __uninitialized_fill + { + template + static void + __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x) + { + _ForwardIterator __cur = __first; + try + { + for (; __cur != __last; ++__cur) + std::_Construct(std::__addressof(*__cur), __x); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_fill + { + template + static void + __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x) + { std::fill(__first, __last, __x); } + }; +# 164 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_uninitialized.h" 3 + template + inline void + uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + std::__uninitialized_fill<__is_trivial(_ValueType)>:: + __uninit_fill(__first, __last, __x); + } + + + template + struct __uninitialized_fill_n + { + template + static void + __uninit_fill_n(_ForwardIterator __first, _Size __n, + const _Tp& __x) + { + _ForwardIterator __cur = __first; + try + { + for (; __n > 0; --__n, ++__cur) + std::_Construct(std::__addressof(*__cur), __x); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_fill_n + { + template + static void + __uninit_fill_n(_ForwardIterator __first, _Size __n, + const _Tp& __x) + { std::fill_n(__first, __n, __x); } + }; +# 218 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_uninitialized.h" 3 + template + inline void + uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + std::__uninitialized_fill_n<__is_trivial(_ValueType)>:: + __uninit_fill_n(__first, __n, __x); + } + + + + + + + + template + _ForwardIterator + __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _Allocator& __alloc) + { + _ForwardIterator __cur = __result; + try + { + for (; __first != __last; ++__first, ++__cur) + __alloc.construct(std::__addressof(*__cur), *__first); + return __cur; + } + catch(...) + { + std::_Destroy(__result, __cur, __alloc); + throw; + } + } + + template + inline _ForwardIterator + __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, allocator<_Tp>&) + { return std::uninitialized_copy(__first, __last, __result); } + + template + inline _ForwardIterator + __uninitialized_move_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _Allocator& __alloc) + { + return std::__uninitialized_copy_a((__first), + (__last), + __result, __alloc); + } + + template + void + __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x, _Allocator& __alloc) + { + _ForwardIterator __cur = __first; + try + { + for (; __cur != __last; ++__cur) + __alloc.construct(std::__addressof(*__cur), __x); + } + catch(...) + { + std::_Destroy(__first, __cur, __alloc); + throw; + } + } + + template + inline void + __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x, allocator<_Tp2>&) + { std::uninitialized_fill(__first, __last, __x); } + + template + void + __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, + const _Tp& __x, _Allocator& __alloc) + { + _ForwardIterator __cur = __first; + try + { + for (; __n > 0; --__n, ++__cur) + __alloc.construct(std::__addressof(*__cur), __x); + } + catch(...) + { + std::_Destroy(__first, __cur, __alloc); + throw; + } + } + + template + inline void + __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, + const _Tp& __x, allocator<_Tp2>&) + { std::uninitialized_fill_n(__first, __n, __x); } +# 332 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_uninitialized.h" 3 + template + inline _ForwardIterator + __uninitialized_copy_move(_InputIterator1 __first1, + _InputIterator1 __last1, + _InputIterator2 __first2, + _InputIterator2 __last2, + _ForwardIterator __result, + _Allocator& __alloc) + { + _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1, + __result, + __alloc); + try + { + return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc); + } + catch(...) + { + std::_Destroy(__result, __mid, __alloc); + throw; + } + } + + + + + + template + inline _ForwardIterator + __uninitialized_move_copy(_InputIterator1 __first1, + _InputIterator1 __last1, + _InputIterator2 __first2, + _InputIterator2 __last2, + _ForwardIterator __result, + _Allocator& __alloc) + { + _ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1, + __result, + __alloc); + try + { + return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc); + } + catch(...) + { + std::_Destroy(__result, __mid, __alloc); + throw; + } + } + + + + + template + inline _ForwardIterator + __uninitialized_fill_move(_ForwardIterator __result, _ForwardIterator __mid, + const _Tp& __x, _InputIterator __first, + _InputIterator __last, _Allocator& __alloc) + { + std::__uninitialized_fill_a(__result, __mid, __x, __alloc); + try + { + return std::__uninitialized_move_a(__first, __last, __mid, __alloc); + } + catch(...) + { + std::_Destroy(__result, __mid, __alloc); + throw; + } + } + + + + + template + inline void + __uninitialized_move_fill(_InputIterator __first1, _InputIterator __last1, + _ForwardIterator __first2, + _ForwardIterator __last2, const _Tp& __x, + _Allocator& __alloc) + { + _ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1, + __first2, + __alloc); + try + { + std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc); + } + catch(...) + { + std::_Destroy(__first2, __mid2, __alloc); + throw; + } + } +# 637 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_uninitialized.h" 3 + +} +# 68 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/memory" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_tempbuf.h" 1 3 +# 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_tempbuf.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 84 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_tempbuf.h" 3 + template + pair<_Tp*, ptrdiff_t> + get_temporary_buffer(ptrdiff_t __len) + { + const ptrdiff_t __max = + __gnu_cxx::__numeric_traits::__max / sizeof(_Tp); + if (__len > __max) + __len = __max; + + while (__len > 0) + { + _Tp* __tmp = static_cast<_Tp*>(::operator new(__len * sizeof(_Tp), + std::nothrow)); + if (__tmp != 0) + return std::pair<_Tp*, ptrdiff_t>(__tmp, __len); + __len /= 2; + } + return std::pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0); + } +# 111 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_tempbuf.h" 3 + template + inline void + return_temporary_buffer(_Tp* __p) + { ::operator delete(__p, std::nothrow); } + + + + + + + + template + class _Temporary_buffer + { + + + + public: + typedef _Tp value_type; + typedef value_type* pointer; + typedef pointer iterator; + typedef ptrdiff_t size_type; + + protected: + size_type _M_original_len; + size_type _M_len; + pointer _M_buffer; + + public: + + size_type + size() const + { return _M_len; } + + + size_type + requested_size() const + { return _M_original_len; } + + + iterator + begin() + { return _M_buffer; } + + + iterator + end() + { return _M_buffer + _M_len; } + + + + + + _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last); + + ~_Temporary_buffer() + { + std::_Destroy(_M_buffer, _M_buffer + _M_len); + std::return_temporary_buffer(_M_buffer); + } + + private: + + _Temporary_buffer(const _Temporary_buffer&); + + void + operator=(const _Temporary_buffer&); + }; + + + template + struct __uninitialized_construct_buf_dispatch + { + template + static void + __ucr(_ForwardIterator __first, _ForwardIterator __last, + _Tp& __value) + { + if(__first == __last) + return; + + _ForwardIterator __cur = __first; + try + { + std::_Construct(std::__addressof(*__first), + (__value)); + _ForwardIterator __prev = __cur; + ++__cur; + for(; __cur != __last; ++__cur, ++__prev) + std::_Construct(std::__addressof(*__cur), + (*__prev)); + __value = (*__prev); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + + template<> + struct __uninitialized_construct_buf_dispatch + { + template + static void + __ucr(_ForwardIterator, _ForwardIterator, _Tp&) { } + }; +# 230 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_tempbuf.h" 3 + template + inline void + __uninitialized_construct_buf(_ForwardIterator __first, + _ForwardIterator __last, + _Tp& __value) + { + typedef typename std::iterator_traits<_ForwardIterator>::value_type + _ValueType; + + std::__uninitialized_construct_buf_dispatch< + __has_trivial_constructor(_ValueType)>:: + __ucr(__first, __last, __value); + } + + template + _Temporary_buffer<_ForwardIterator, _Tp>:: + _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) + : _M_original_len(std::distance(__first, __last)), + _M_len(0), _M_buffer(0) + { + try + { + std::pair __p(std::get_temporary_buffer< + value_type>(_M_original_len)); + _M_buffer = __p.first; + _M_len = __p.second; + if(_M_buffer) + std::__uninitialized_construct_buf(_M_buffer, _M_buffer + _M_len, + *__first); + } + catch(...) + { + std::return_temporary_buffer(_M_buffer); + _M_buffer = 0; + _M_len = 0; + throw; + } + } + + +} +# 69 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/memory" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_raw_storage_iter.h" 1 3 +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_raw_storage_iter.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + + + + + template + class raw_storage_iterator + : public iterator + { + protected: + _OutputIterator _M_iter; + + public: + explicit + raw_storage_iterator(_OutputIterator __x) + : _M_iter(__x) {} + + raw_storage_iterator& + operator*() { return *this; } + + raw_storage_iterator& + operator=(const _Tp& __element) + { + std::_Construct(std::__addressof(*_M_iter), __element); + return *this; + } + + raw_storage_iterator<_OutputIterator, _Tp>& + operator++() + { + ++_M_iter; + return *this; + } + + raw_storage_iterator<_OutputIterator, _Tp> + operator++(int) + { + raw_storage_iterator<_OutputIterator, _Tp> __tmp = *this; + ++_M_iter; + return __tmp; + } + }; + + +} +# 70 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/memory" 2 3 +# 88 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/memory" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/backward/auto_ptr.h" 1 3 +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/backward/auto_ptr.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/backward/auto_ptr.h" 3 + template + struct auto_ptr_ref + { + _Tp1* _M_ptr; + + explicit + auto_ptr_ref(_Tp1* __p): _M_ptr(__p) { } + } ; +# 86 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/backward/auto_ptr.h" 3 + template + class auto_ptr + { + private: + _Tp* _M_ptr; + + public: + + typedef _Tp element_type; + + + + + + + + explicit + auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { } +# 112 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/backward/auto_ptr.h" 3 + auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) { } +# 124 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/backward/auto_ptr.h" 3 + template + auto_ptr(auto_ptr<_Tp1>& __a) throw() : _M_ptr(__a.release()) { } +# 135 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/backward/auto_ptr.h" 3 + auto_ptr& + operator=(auto_ptr& __a) throw() + { + reset(__a.release()); + return *this; + } +# 152 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/backward/auto_ptr.h" 3 + template + auto_ptr& + operator=(auto_ptr<_Tp1>& __a) throw() + { + reset(__a.release()); + return *this; + } +# 170 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/backward/auto_ptr.h" 3 + ~auto_ptr() { delete _M_ptr; } +# 180 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/backward/auto_ptr.h" 3 + element_type& + operator*() const throw() + { + ; + return *_M_ptr; + } + + + + + + + + element_type* + operator->() const throw() + { + ; + return _M_ptr; + } +# 210 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/backward/auto_ptr.h" 3 + element_type* + get() const throw() { return _M_ptr; } +# 224 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/backward/auto_ptr.h" 3 + element_type* + release() throw() + { + element_type* __tmp = _M_ptr; + _M_ptr = 0; + return __tmp; + } +# 239 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/backward/auto_ptr.h" 3 + void + reset(element_type* __p = 0) throw() + { + if (__p != _M_ptr) + { + delete _M_ptr; + _M_ptr = __p; + } + } +# 260 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/backward/auto_ptr.h" 3 + auto_ptr(auto_ptr_ref __ref) throw() + : _M_ptr(__ref._M_ptr) { } + + auto_ptr& + operator=(auto_ptr_ref __ref) throw() + { + if (__ref._M_ptr != this->get()) + { + delete _M_ptr; + _M_ptr = __ref._M_ptr; + } + return *this; + } + + template + operator auto_ptr_ref<_Tp1>() throw() + { return auto_ptr_ref<_Tp1>(this->release()); } + + template + operator auto_ptr<_Tp1>() throw() + { return auto_ptr<_Tp1>(this->release()); } + } ; + + + + template<> + class auto_ptr + { + public: + typedef void element_type; + } ; + + +} +# 89 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/memory" 2 3 +# 20 "../boost/smart_ptr/scoped_ptr.hpp" 2 + + +namespace boost +{ +# 39 "../boost/smart_ptr/scoped_ptr.hpp" +template class scoped_ptr +{ +private: + + T * px; + + scoped_ptr(scoped_ptr const &); + scoped_ptr & operator=(scoped_ptr const &); + + typedef scoped_ptr this_type; + + void operator==( scoped_ptr const& ) const; + void operator!=( scoped_ptr const& ) const; + +public: + + typedef T element_type; + + explicit scoped_ptr( T * p = 0 ): px( p ) + { + + + + } + + + + explicit scoped_ptr( std::auto_ptr p ): px( p.release() ) + { + + + + } + + + + ~scoped_ptr() + { + + + + boost::checked_delete( px ); + } + + void reset(T * p = 0) + { + (static_cast (0)); + this_type(p).swap(*this); + } + + T & operator*() const + { + (static_cast (0)); + return *px; + } + + T * operator->() const + { + (static_cast (0)); + return px; + } + + T * get() const + { + return px; + } + + +# 1 "../boost/smart_ptr/detail/operator_bool.hpp" 1 +# 43 "../boost/smart_ptr/detail/operator_bool.hpp" + typedef T * this_type::*unspecified_bool_type; + + operator unspecified_bool_type() const + { + return px == 0? 0: &this_type::px; + } + + + + + bool operator! () const + { + return px == 0; + } +# 108 "../boost/smart_ptr/scoped_ptr.hpp" 2 + + void swap(scoped_ptr & b) + { + T * tmp = b.px; + b.px = px; + px = tmp; + } +}; + +template inline void swap(scoped_ptr & a, scoped_ptr & b) +{ + a.swap(b); +} + + + +template inline T * get_pointer(scoped_ptr const & p) +{ + return p.get(); +} + +} +# 15 "../boost/scoped_ptr.hpp" 2 +# 13 "quickbook/src/id_manager.hpp" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/string" 1 3 +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/string" 3 + +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/string" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stringfwd.h" 1 3 +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stringfwd.h" 3 + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stringfwd.h" 3 + + + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + template + class allocator; + + + + + + + + template + struct char_traits; + + template, + typename _Alloc = allocator<_CharT> > + class basic_string; + + template<> struct char_traits; + + typedef basic_string string; + + + template<> struct char_traits; + + typedef basic_string wstring; +# 85 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stringfwd.h" 3 + +} +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/string" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/char_traits.h" 1 3 +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/char_traits.h" 3 + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/char_traits.h" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/postypes.h" 1 3 +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/postypes.h" 3 + +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/postypes.h" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwchar" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwchar" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwchar" 3 + + + + +# 1 "/usr/include/wchar.h" 1 3 4 +# 37 "/usr/include/wchar.h" 3 4 +# 1 "/usr/include/stdio.h" 1 3 4 +# 45 "/usr/include/stdio.h" 3 4 +struct _IO_FILE; + + + +typedef struct _IO_FILE FILE; + + + + + +# 65 "/usr/include/stdio.h" 3 4 +typedef struct _IO_FILE __FILE; +# 38 "/usr/include/wchar.h" 2 3 4 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stdarg.h" 1 3 4 +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stdarg.h" 3 4 +typedef __builtin_va_list __gnuc_va_list; +# 41 "/usr/include/wchar.h" 2 3 4 + +# 1 "/usr/include/bits/wchar.h" 1 3 4 +# 43 "/usr/include/wchar.h" 2 3 4 +# 52 "/usr/include/wchar.h" 3 4 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 353 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 3 4 +typedef unsigned int wint_t; +# 53 "/usr/include/wchar.h" 2 3 4 +# 83 "/usr/include/wchar.h" 3 4 +typedef struct +{ + int __count; + union + { + + unsigned int __wch; + + + + char __wchb[4]; + } __value; +} __mbstate_t; +# 104 "/usr/include/wchar.h" 3 4 + + +typedef __mbstate_t mbstate_t; + + + +# 129 "/usr/include/wchar.h" 3 4 +extern "C" { + + + + +struct tm; + + + + + + + + + +extern wchar_t *wcscpy (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src) throw (); + +extern wchar_t *wcsncpy (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n) + throw (); + + +extern wchar_t *wcscat (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src) throw (); + +extern wchar_t *wcsncat (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n) + throw (); + + +extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2) + throw () __attribute__ ((__pure__)); + +extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) + throw () __attribute__ ((__pure__)); + + + + +extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) throw (); + + +extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2, + size_t __n) throw (); + + + + + +extern int wcscasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, + __locale_t __loc) throw (); + +extern int wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, + size_t __n, __locale_t __loc) throw (); + + + + + +extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) throw (); + + + +extern size_t wcsxfrm (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) throw (); + + + + + + + + +extern int wcscoll_l (__const wchar_t *__s1, __const wchar_t *__s2, + __locale_t __loc) throw (); + + + + +extern size_t wcsxfrm_l (wchar_t *__s1, __const wchar_t *__s2, + size_t __n, __locale_t __loc) throw (); + + +extern wchar_t *wcsdup (__const wchar_t *__s) throw () __attribute__ ((__malloc__)); + + + + + +extern "C++" wchar_t *wcschr (wchar_t *__wcs, wchar_t __wc) + throw () __asm ("wcschr") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc) + throw () __asm ("wcschr") __attribute__ ((__pure__)); + + + + + + +extern "C++" wchar_t *wcsrchr (wchar_t *__wcs, wchar_t __wc) + throw () __asm ("wcsrchr") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc) + throw () __asm ("wcsrchr") __attribute__ ((__pure__)); + + + + + + + + + +extern wchar_t *wcschrnul (__const wchar_t *__s, wchar_t __wc) + throw () __attribute__ ((__pure__)); + + + + + +extern size_t wcscspn (__const wchar_t *__wcs, __const wchar_t *__reject) + throw () __attribute__ ((__pure__)); + + +extern size_t wcsspn (__const wchar_t *__wcs, __const wchar_t *__accept) + throw () __attribute__ ((__pure__)); + + +extern "C++" wchar_t *wcspbrk (wchar_t *__wcs, __const wchar_t *__accept) + throw () __asm ("wcspbrk") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcspbrk (__const wchar_t *__wcs, + __const wchar_t *__accept) + throw () __asm ("wcspbrk") __attribute__ ((__pure__)); + + + + + + +extern "C++" wchar_t *wcsstr (wchar_t *__haystack, __const wchar_t *__needle) + throw () __asm ("wcsstr") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcsstr (__const wchar_t *__haystack, + __const wchar_t *__needle) + throw () __asm ("wcsstr") __attribute__ ((__pure__)); + + + + + + +extern wchar_t *wcstok (wchar_t *__restrict __s, + __const wchar_t *__restrict __delim, + wchar_t **__restrict __ptr) throw (); + + +extern size_t wcslen (__const wchar_t *__s) throw () __attribute__ ((__pure__)); + + + + + +extern "C++" wchar_t *wcswcs (wchar_t *__haystack, __const wchar_t *__needle) + throw () __asm ("wcswcs") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcswcs (__const wchar_t *__haystack, + __const wchar_t *__needle) + throw () __asm ("wcswcs") __attribute__ ((__pure__)); +# 303 "/usr/include/wchar.h" 3 4 +extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen) + throw () __attribute__ ((__pure__)); + + + + + + +extern "C++" wchar_t *wmemchr (wchar_t *__s, wchar_t __c, size_t __n) + throw () __asm ("wmemchr") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, + size_t __n) + throw () __asm ("wmemchr") __attribute__ ((__pure__)); + + + + + + +extern int wmemcmp (__const wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) + throw () __attribute__ ((__pure__)); + + +extern wchar_t *wmemcpy (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) throw (); + + + +extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n) + throw (); + + +extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw (); + + + + + +extern wchar_t *wmempcpy (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) + throw (); + + + + + + +extern wint_t btowc (int __c) throw (); + + + +extern int wctob (wint_t __c) throw (); + + + +extern int mbsinit (__const mbstate_t *__ps) throw () __attribute__ ((__pure__)); + + + +extern size_t mbrtowc (wchar_t *__restrict __pwc, + __const char *__restrict __s, size_t __n, + mbstate_t *__p) throw (); + + +extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, + mbstate_t *__restrict __ps) throw (); + + +extern size_t __mbrlen (__const char *__restrict __s, size_t __n, + mbstate_t *__restrict __ps) throw (); +extern size_t mbrlen (__const char *__restrict __s, size_t __n, + mbstate_t *__restrict __ps) throw (); + + + + + + + + +extern wint_t __btowc_alias (int __c) __asm ("btowc"); +extern __inline __attribute__ ((__gnu_inline__)) wint_t +btowc (int __c) throw () +{ return (__builtin_constant_p (__c) && __c >= '\0' && __c <= '\x7f' + ? (wint_t) __c : __btowc_alias (__c)); } + +extern int __wctob_alias (wint_t __c) __asm ("wctob"); +extern __inline __attribute__ ((__gnu_inline__)) int +wctob (wint_t __wc) throw () +{ return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f' + ? (int) __wc : __wctob_alias (__wc)); } + +extern __inline __attribute__ ((__gnu_inline__)) size_t +mbrlen (__const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw () + +{ return (__ps != __null + ? mbrtowc (__null, __s, __n, __ps) : __mbrlen (__s, __n, __null)); } + + + + + +extern size_t mbsrtowcs (wchar_t *__restrict __dst, + __const char **__restrict __src, size_t __len, + mbstate_t *__restrict __ps) throw (); + + + +extern size_t wcsrtombs (char *__restrict __dst, + __const wchar_t **__restrict __src, size_t __len, + mbstate_t *__restrict __ps) throw (); + + + + + + +extern size_t mbsnrtowcs (wchar_t *__restrict __dst, + __const char **__restrict __src, size_t __nmc, + size_t __len, mbstate_t *__restrict __ps) throw (); + + + +extern size_t wcsnrtombs (char *__restrict __dst, + __const wchar_t **__restrict __src, + size_t __nwc, size_t __len, + mbstate_t *__restrict __ps) throw (); + + + + + + +extern int wcwidth (wchar_t __c) throw (); + + + +extern int wcswidth (__const wchar_t *__s, size_t __n) throw (); + + + + + + +extern double wcstod (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) throw (); + + + + + +extern float wcstof (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) throw (); +extern long double wcstold (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) throw (); + + + + + + + +extern long int wcstol (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) throw (); + + + +extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + throw (); + + + + + + +__extension__ +extern long long int wcstoll (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + throw (); + + + +__extension__ +extern unsigned long long int wcstoull (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base) throw (); + + + + + + +__extension__ +extern long long int wcstoq (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + throw (); + + + +__extension__ +extern unsigned long long int wcstouq (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base) throw (); +# 528 "/usr/include/wchar.h" 3 4 +extern long int wcstol_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base, + __locale_t __loc) throw (); + +extern unsigned long int wcstoul_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, __locale_t __loc) throw (); + +__extension__ +extern long long int wcstoll_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, __locale_t __loc) throw (); + +__extension__ +extern unsigned long long int wcstoull_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, __locale_t __loc) + throw (); + +extern double wcstod_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, __locale_t __loc) + throw (); + +extern float wcstof_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, __locale_t __loc) + throw (); + +extern long double wcstold_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + __locale_t __loc) throw (); + + + + +extern wchar_t *wcpcpy (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src) throw (); + + + +extern wchar_t *wcpncpy (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n) + throw (); +# 578 "/usr/include/wchar.h" 3 4 +extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) throw (); + + + + + + +extern int fwide (__FILE *__fp, int __mode) throw (); + + + + + + +extern int fwprintf (__FILE *__restrict __stream, + __const wchar_t *__restrict __format, ...) + ; + + + + +extern int wprintf (__const wchar_t *__restrict __format, ...) + ; + +extern int swprintf (wchar_t *__restrict __s, size_t __n, + __const wchar_t *__restrict __format, ...) + throw () ; + + + + + +extern int vfwprintf (__FILE *__restrict __s, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; + + + + +extern int vwprintf (__const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; + + +extern int vswprintf (wchar_t *__restrict __s, size_t __n, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + throw () ; + + + + + + +extern int fwscanf (__FILE *__restrict __stream, + __const wchar_t *__restrict __format, ...) + ; + + + + +extern int wscanf (__const wchar_t *__restrict __format, ...) + ; + +extern int swscanf (__const wchar_t *__restrict __s, + __const wchar_t *__restrict __format, ...) + throw () ; +# 678 "/usr/include/wchar.h" 3 4 + + + + + + + + + +extern int vfwscanf (__FILE *__restrict __s, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; + + + + +extern int vwscanf (__const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; + +extern int vswscanf (__const wchar_t *__restrict __s, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + throw () ; +# 734 "/usr/include/wchar.h" 3 4 + + + + + + + + + +extern wint_t fgetwc (__FILE *__stream); +extern wint_t getwc (__FILE *__stream); + + + + + +extern wint_t getwchar (void); + + + + + + +extern wint_t fputwc (wchar_t __wc, __FILE *__stream); +extern wint_t putwc (wchar_t __wc, __FILE *__stream); + + + + + +extern wint_t putwchar (wchar_t __wc); + + + + + + + +extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n, + __FILE *__restrict __stream); + + + + + +extern int fputws (__const wchar_t *__restrict __ws, + __FILE *__restrict __stream); + + + + + + +extern wint_t ungetwc (wint_t __wc, __FILE *__stream); + +# 799 "/usr/include/wchar.h" 3 4 +extern wint_t getwc_unlocked (__FILE *__stream); +extern wint_t getwchar_unlocked (void); + + + + + + + +extern wint_t fgetwc_unlocked (__FILE *__stream); + + + + + + + +extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream); +# 825 "/usr/include/wchar.h" 3 4 +extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream); +extern wint_t putwchar_unlocked (wchar_t __wc); +# 835 "/usr/include/wchar.h" 3 4 +extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n, + __FILE *__restrict __stream); + + + + + + + +extern int fputws_unlocked (__const wchar_t *__restrict __ws, + __FILE *__restrict __stream); + + + + + + + +extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize, + __const wchar_t *__restrict __format, + __const struct tm *__restrict __tp) throw (); + + + + + + + +extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, + __const wchar_t *__restrict __format, + __const struct tm *__restrict __tp, + __locale_t __loc) throw (); +# 882 "/usr/include/wchar.h" 3 4 +# 1 "/usr/include/bits/wchar2.h" 1 3 4 +# 25 "/usr/include/bits/wchar2.h" 3 4 +extern wchar_t *__wmemcpy_chk (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n, + size_t __ns1) throw (); +extern wchar_t *__wmemcpy_alias (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () __asm__ ("" "wmemcpy") + + + ; +extern wchar_t *__wmemcpy_chk_warn (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmemcpy_chk") + + + + __attribute__((__warning__ ("wmemcpy called with length bigger than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wmemcpy (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () + +{ + if (__builtin_object_size (__s1, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wmemcpy_chk (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + + if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t)) + return __wmemcpy_chk_warn (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + } + return __wmemcpy_alias (__s1, __s2, __n); +} + + +extern wchar_t *__wmemmove_chk (wchar_t *__s1, __const wchar_t *__s2, + size_t __n, size_t __ns1) throw (); +extern wchar_t *__wmemmove_alias (wchar_t *__s1, __const wchar_t *__s2, size_t __n) throw () __asm__ ("" "wmemmove") + + ; +extern wchar_t *__wmemmove_chk_warn (wchar_t *__s1, __const wchar_t *__s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmemmove_chk") + + + __attribute__((__warning__ ("wmemmove called with length bigger than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n) throw () +{ + if (__builtin_object_size (__s1, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wmemmove_chk (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + + if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t)) + return __wmemmove_chk_warn (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + } + return __wmemmove_alias (__s1, __s2, __n); +} + + + +extern wchar_t *__wmempcpy_chk (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n, + size_t __ns1) throw (); +extern wchar_t *__wmempcpy_alias (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () __asm__ ("" "wmempcpy") + + + ; +extern wchar_t *__wmempcpy_chk_warn (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmempcpy_chk") + + + + __attribute__((__warning__ ("wmempcpy called with length bigger than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wmempcpy (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () + +{ + if (__builtin_object_size (__s1, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wmempcpy_chk (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + + if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t)) + return __wmempcpy_chk_warn (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + } + return __wmempcpy_alias (__s1, __s2, __n); +} + + + +extern wchar_t *__wmemset_chk (wchar_t *__s, wchar_t __c, size_t __n, + size_t __ns) throw (); +extern wchar_t *__wmemset_alias (wchar_t *__s, wchar_t __c, size_t __n) throw () __asm__ ("" "wmemset") + ; +extern wchar_t *__wmemset_chk_warn (wchar_t *__s, wchar_t __c, size_t __n, size_t __ns) throw () __asm__ ("" "__wmemset_chk") + + + __attribute__((__warning__ ("wmemset called with length bigger than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw () +{ + if (__builtin_object_size (__s, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wmemset_chk (__s, __c, __n, __builtin_object_size (__s, 0) / sizeof (wchar_t)); + + if (__n > __builtin_object_size (__s, 0) / sizeof (wchar_t)) + return __wmemset_chk_warn (__s, __c, __n, + __builtin_object_size (__s, 0) / sizeof (wchar_t)); + } + return __wmemset_alias (__s, __c, __n); +} + + +extern wchar_t *__wcscpy_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, + size_t __n) throw (); +extern wchar_t *__wcscpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () __asm__ ("" "wcscpy") + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wcscpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + return __wcscpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + return __wcscpy_alias (__dest, __src); +} + + +extern wchar_t *__wcpcpy_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, + size_t __destlen) throw (); +extern wchar_t *__wcpcpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () __asm__ ("" "wcpcpy") + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wcpcpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + return __wcpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + return __wcpcpy_alias (__dest, __src); +} + + +extern wchar_t *__wcsncpy_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n, + size_t __destlen) throw (); +extern wchar_t *__wcsncpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcsncpy") + + + ; +extern wchar_t *__wcsncpy_chk_warn (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n, size_t __destlen) throw () __asm__ ("" "__wcsncpy_chk") + + + + __attribute__((__warning__ ("wcsncpy called with length bigger than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wcsncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () + +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wcsncpy_chk (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + if (__n > __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)) + return __wcsncpy_chk_warn (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + } + return __wcsncpy_alias (__dest, __src, __n); +} + + +extern wchar_t *__wcpncpy_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n, + size_t __destlen) throw (); +extern wchar_t *__wcpncpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcpncpy") + + + ; +extern wchar_t *__wcpncpy_chk_warn (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n, size_t __destlen) throw () __asm__ ("" "__wcpncpy_chk") + + + + __attribute__((__warning__ ("wcpncpy called with length bigger than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wcpncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () + +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wcpncpy_chk (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + if (__n > __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)) + return __wcpncpy_chk_warn (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + } + return __wcpncpy_alias (__dest, __src, __n); +} + + +extern wchar_t *__wcscat_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, + size_t __destlen) throw (); +extern wchar_t *__wcscat_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () __asm__ ("" "wcscat") + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wcscat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + return __wcscat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + return __wcscat_alias (__dest, __src); +} + + +extern wchar_t *__wcsncat_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, + size_t __n, size_t __destlen) throw (); +extern wchar_t *__wcsncat_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcsncat") + + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +wcsncat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () + +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + return __wcsncat_chk (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + return __wcsncat_alias (__dest, __src, __n); +} + + +extern int __swprintf_chk (wchar_t *__restrict __s, size_t __n, + int __flag, size_t __s_len, + __const wchar_t *__restrict __format, ...) + throw () ; + +extern int __swprintf_alias (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, ...) throw () __asm__ ("" "swprintf") + + + ; + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +swprintf (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, ...) throw () + +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 || 2 > 1) + return __swprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __fmt, __builtin_va_arg_pack ()); + return __swprintf_alias (__s, __n, __fmt, __builtin_va_arg_pack ()); +} +# 304 "/usr/include/bits/wchar2.h" 3 4 +extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n, + int __flag, size_t __s_len, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + throw () ; + +extern int __vswprintf_alias (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, __gnuc_va_list __ap) throw () __asm__ ("" "vswprintf") + + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vswprintf (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, __gnuc_va_list __ap) throw () + +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 || 2 > 1) + return __vswprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), __fmt, __ap); + return __vswprintf_alias (__s, __n, __fmt, __ap); +} + + + + +extern int __fwprintf_chk (__FILE *__restrict __stream, int __flag, + __const wchar_t *__restrict __format, ...); +extern int __wprintf_chk (int __flag, __const wchar_t *__restrict __format, + ...); +extern int __vfwprintf_chk (__FILE *__restrict __stream, int __flag, + __const wchar_t *__restrict __format, + __gnuc_va_list __ap); +extern int __vwprintf_chk (int __flag, __const wchar_t *__restrict __format, + __gnuc_va_list __ap); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +wprintf (__const wchar_t *__restrict __fmt, ...) +{ + return __wprintf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +fwprintf (__FILE *__restrict __stream, __const wchar_t *__restrict __fmt, ...) +{ + return __fwprintf_chk (__stream, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vwprintf (__const wchar_t *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vwprintf_chk (2 - 1, __fmt, __ap); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vfwprintf (__FILE *__restrict __stream, + __const wchar_t *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vfwprintf_chk (__stream, 2 - 1, __fmt, __ap); +} + + + +extern wchar_t *__fgetws_chk (wchar_t *__restrict __s, size_t __size, int __n, + __FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern wchar_t *__fgetws_alias (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) __asm__ ("" "fgetws") + + __attribute__ ((__warn_unused_result__)); +extern wchar_t *__fgetws_chk_warn (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __asm__ ("" "__fgetws_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgetws called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) wchar_t * +fgetws (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgetws_chk (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __n, __stream); + + if ((size_t) __n > __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t)) + return __fgetws_chk_warn (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __n, __stream); + } + return __fgetws_alias (__s, __n, __stream); +} + + +extern wchar_t *__fgetws_unlocked_chk (wchar_t *__restrict __s, size_t __size, + int __n, __FILE *__restrict __stream) + __attribute__ ((__warn_unused_result__)); +extern wchar_t *__fgetws_unlocked_alias (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) __asm__ ("" "fgetws_unlocked") + + + __attribute__ ((__warn_unused_result__)); +extern wchar_t *__fgetws_unlocked_chk_warn (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __asm__ ("" "__fgetws_unlocked_chk") + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgetws_unlocked called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) wchar_t * +fgetws_unlocked (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgetws_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __n, __stream); + + if ((size_t) __n > __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t)) + return __fgetws_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __n, __stream); + } + return __fgetws_unlocked_alias (__s, __n, __stream); +} + + + +extern size_t __wcrtomb_chk (char *__restrict __s, wchar_t __wchar, + mbstate_t *__restrict __p, + size_t __buflen) throw () __attribute__ ((__warn_unused_result__)); +extern size_t __wcrtomb_alias (char *__restrict __s, wchar_t __wchar, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcrtomb") + + __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +wcrtomb (char *__restrict __s, wchar_t __wchar, mbstate_t *__restrict __ps) throw () + +{ + + + + + + + + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) + return __wcrtomb_chk (__s, __wchar, __ps, __builtin_object_size (__s, 2 > 1)); + return __wcrtomb_alias (__s, __wchar, __ps); +} + + +extern size_t __mbsrtowcs_chk (wchar_t *__restrict __dst, + __const char **__restrict __src, + size_t __len, mbstate_t *__restrict __ps, + size_t __dstlen) throw (); +extern size_t __mbsrtowcs_alias (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "mbsrtowcs") + + + + ; +extern size_t __mbsrtowcs_chk_warn (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__mbsrtowcs_chk") + + + + + __attribute__((__warning__ ("mbsrtowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +mbsrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __mbsrtowcs_chk (__dst, __src, __len, __ps, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + + if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) + return __mbsrtowcs_chk_warn (__dst, __src, __len, __ps, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + } + return __mbsrtowcs_alias (__dst, __src, __len, __ps); +} + + +extern size_t __wcsrtombs_chk (char *__restrict __dst, + __const wchar_t **__restrict __src, + size_t __len, mbstate_t *__restrict __ps, + size_t __dstlen) throw (); +extern size_t __wcsrtombs_alias (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcsrtombs") + + + + ; +extern size_t __wcsrtombs_chk_warn (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__wcsrtombs_chk") + + + + + __attribute__((__warning__ ("wcsrtombs called with dst buffer smaller than len"))); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +wcsrtombs (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __wcsrtombs_chk (__dst, __src, __len, __ps, __builtin_object_size (__dst, 2 > 1)); + + if (__len > __builtin_object_size (__dst, 2 > 1)) + return __wcsrtombs_chk_warn (__dst, __src, __len, __ps, __builtin_object_size (__dst, 2 > 1)); + } + return __wcsrtombs_alias (__dst, __src, __len, __ps); +} + + + +extern size_t __mbsnrtowcs_chk (wchar_t *__restrict __dst, + __const char **__restrict __src, size_t __nmc, + size_t __len, mbstate_t *__restrict __ps, + size_t __dstlen) throw (); +extern size_t __mbsnrtowcs_alias (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "mbsnrtowcs") + + + + ; +extern size_t __mbsnrtowcs_chk_warn (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__mbsnrtowcs_chk") + + + + + __attribute__((__warning__ ("mbsnrtowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +mbsnrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) throw () + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __mbsnrtowcs_chk (__dst, __src, __nmc, __len, __ps, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + + if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) + return __mbsnrtowcs_chk_warn (__dst, __src, __nmc, __len, __ps, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + } + return __mbsnrtowcs_alias (__dst, __src, __nmc, __len, __ps); +} + + +extern size_t __wcsnrtombs_chk (char *__restrict __dst, + __const wchar_t **__restrict __src, + size_t __nwc, size_t __len, + mbstate_t *__restrict __ps, size_t __dstlen) + throw (); +extern size_t __wcsnrtombs_alias (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcsnrtombs") + + + + ; +extern size_t __wcsnrtombs_chk_warn (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__wcsnrtombs_chk") + + + + + + __attribute__((__warning__ ("wcsnrtombs called with dst buffer smaller than len"))); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +wcsnrtombs (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) throw () + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __wcsnrtombs_chk (__dst, __src, __nwc, __len, __ps, + __builtin_object_size (__dst, 2 > 1)); + + if (__len > __builtin_object_size (__dst, 2 > 1)) + return __wcsnrtombs_chk_warn (__dst, __src, __nwc, __len, __ps, + __builtin_object_size (__dst, 2 > 1)); + } + return __wcsnrtombs_alias (__dst, __src, __nwc, __len, __ps); +} +# 883 "/usr/include/wchar.h" 2 3 4 + + + + + + +} +# 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwchar" 2 3 +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwchar" 3 +namespace std +{ + using ::mbstate_t; +} +# 137 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwchar" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + using ::wint_t; + + using ::btowc; + using ::fgetwc; + using ::fgetws; + using ::fputwc; + using ::fputws; + using ::fwide; + using ::fwprintf; + using ::fwscanf; + using ::getwc; + using ::getwchar; + using ::mbrlen; + using ::mbrtowc; + using ::mbsinit; + using ::mbsrtowcs; + using ::putwc; + using ::putwchar; + + using ::swprintf; + + using ::swscanf; + using ::ungetwc; + using ::vfwprintf; + + using ::vfwscanf; + + + using ::vswprintf; + + + using ::vswscanf; + + using ::vwprintf; + + using ::vwscanf; + + using ::wcrtomb; + using ::wcscat; + using ::wcscmp; + using ::wcscoll; + using ::wcscpy; + using ::wcscspn; + using ::wcsftime; + using ::wcslen; + using ::wcsncat; + using ::wcsncmp; + using ::wcsncpy; + using ::wcsrtombs; + using ::wcsspn; + using ::wcstod; + + using ::wcstof; + + using ::wcstok; + using ::wcstol; + using ::wcstoul; + using ::wcsxfrm; + using ::wctob; + using ::wmemcmp; + using ::wmemcpy; + using ::wmemmove; + using ::wmemset; + using ::wprintf; + using ::wscanf; + using ::wcschr; + using ::wcspbrk; + using ::wcsrchr; + using ::wcsstr; + using ::wmemchr; +# 234 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwchar" 3 + +} + + + + + + + +namespace __gnu_cxx +{ + + + + + + using ::wcstold; +# 259 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwchar" 3 + using ::wcstoll; + using ::wcstoull; + +} + +namespace std +{ + using ::__gnu_cxx::wcstold; + using ::__gnu_cxx::wcstoll; + using ::__gnu_cxx::wcstoull; +} +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/postypes.h" 2 3 +# 70 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/postypes.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 90 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/postypes.h" 3 + typedef long streamoff; +# 100 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/postypes.h" 3 + typedef ptrdiff_t streamsize; +# 113 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/postypes.h" 3 + template + class fpos + { + private: + streamoff _M_off; + _StateT _M_state; + + public: + + + + + fpos() + : _M_off(0), _M_state() { } +# 135 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/postypes.h" 3 + fpos(streamoff __off) + : _M_off(__off), _M_state() { } + + + operator streamoff() const { return _M_off; } + + + void + state(_StateT __st) + { _M_state = __st; } + + + _StateT + state() const + { return _M_state; } + + + + + + fpos& + operator+=(streamoff __off) + { + _M_off += __off; + return *this; + } + + + + + + fpos& + operator-=(streamoff __off) + { + _M_off -= __off; + return *this; + } + + + + + + + + fpos + operator+(streamoff __off) const + { + fpos __pos(*this); + __pos += __off; + return __pos; + } + + + + + + + + fpos + operator-(streamoff __off) const + { + fpos __pos(*this); + __pos -= __off; + return __pos; + } + + + + + + + streamoff + operator-(const fpos& __other) const + { return _M_off - __other._M_off; } + }; + + + + + + + template + inline bool + operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) + { return streamoff(__lhs) == streamoff(__rhs); } + + template + inline bool + operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) + { return streamoff(__lhs) != streamoff(__rhs); } + + + + + + typedef fpos streampos; + + typedef fpos wstreampos; +# 241 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/postypes.h" 3 + +} +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/char_traits.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwchar" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwchar" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwchar" 3 + + + + +# 1 "/usr/include/wchar.h" 1 3 4 +# 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwchar" 2 3 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/char_traits.h" 2 3 + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) +{ + +# 59 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/char_traits.h" 3 + template + struct _Char_types + { + typedef unsigned long int_type; + typedef std::streampos pos_type; + typedef std::streamoff off_type; + typedef std::mbstate_t state_type; + }; +# 84 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/char_traits.h" 3 + template + struct char_traits + { + typedef _CharT char_type; + typedef typename _Char_types<_CharT>::int_type int_type; + typedef typename _Char_types<_CharT>::pos_type pos_type; + typedef typename _Char_types<_CharT>::off_type off_type; + typedef typename _Char_types<_CharT>::state_type state_type; + + static void + assign(char_type& __c1, const char_type& __c2) + { __c1 = __c2; } + + static bool + eq(const char_type& __c1, const char_type& __c2) + { return __c1 == __c2; } + + static bool + lt(const char_type& __c1, const char_type& __c2) + { return __c1 < __c2; } + + static int + compare(const char_type* __s1, const char_type* __s2, std::size_t __n); + + static std::size_t + length(const char_type* __s); + + static const char_type* + find(const char_type* __s, std::size_t __n, const char_type& __a); + + static char_type* + move(char_type* __s1, const char_type* __s2, std::size_t __n); + + static char_type* + copy(char_type* __s1, const char_type* __s2, std::size_t __n); + + static char_type* + assign(char_type* __s, std::size_t __n, char_type __a); + + static char_type + to_char_type(const int_type& __c) + { return static_cast(__c); } + + static int_type + to_int_type(const char_type& __c) + { return static_cast(__c); } + + static bool + eq_int_type(const int_type& __c1, const int_type& __c2) + { return __c1 == __c2; } + + static int_type + eof() + { return static_cast(-1); } + + static int_type + not_eof(const int_type& __c) + { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); } + }; + + template + int + char_traits<_CharT>:: + compare(const char_type* __s1, const char_type* __s2, std::size_t __n) + { + for (std::size_t __i = 0; __i < __n; ++__i) + if (lt(__s1[__i], __s2[__i])) + return -1; + else if (lt(__s2[__i], __s1[__i])) + return 1; + return 0; + } + + template + std::size_t + char_traits<_CharT>:: + length(const char_type* __p) + { + std::size_t __i = 0; + while (!eq(__p[__i], char_type())) + ++__i; + return __i; + } + + template + const typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + find(const char_type* __s, std::size_t __n, const char_type& __a) + { + for (std::size_t __i = 0; __i < __n; ++__i) + if (eq(__s[__i], __a)) + return __s + __i; + return 0; + } + + template + typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + move(char_type* __s1, const char_type* __s2, std::size_t __n) + { + return static_cast<_CharT*>(__builtin_memmove(__s1, __s2, + __n * sizeof(char_type))); + } + + template + typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + copy(char_type* __s1, const char_type* __s2, std::size_t __n) + { + + std::copy(__s2, __s2 + __n, __s1); + return __s1; + } + + template + typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + assign(char_type* __s, std::size_t __n, char_type __a) + { + + std::fill_n(__s, __n, __a); + return __s; + } + + +} + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 228 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/char_traits.h" 3 + template + struct char_traits : public __gnu_cxx::char_traits<_CharT> + { }; + + + + template<> + struct char_traits + { + typedef char char_type; + typedef int int_type; + typedef streampos pos_type; + typedef streamoff off_type; + typedef mbstate_t state_type; + + static void + assign(char_type& __c1, const char_type& __c2) + { __c1 = __c2; } + + static bool + eq(const char_type& __c1, const char_type& __c2) + { return __c1 == __c2; } + + static bool + lt(const char_type& __c1, const char_type& __c2) + { return __c1 < __c2; } + + static int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { return __builtin_memcmp(__s1, __s2, __n); } + + static size_t + length(const char_type* __s) + { return __builtin_strlen(__s); } + + static const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { return static_cast(__builtin_memchr(__s, __a, __n)); } + + static char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { return static_cast(__builtin_memmove(__s1, __s2, __n)); } + + static char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { return static_cast(__builtin_memcpy(__s1, __s2, __n)); } + + static char_type* + assign(char_type* __s, size_t __n, char_type __a) + { return static_cast(__builtin_memset(__s, __a, __n)); } + + static char_type + to_char_type(const int_type& __c) + { return static_cast(__c); } + + + + static int_type + to_int_type(const char_type& __c) + { return static_cast(static_cast(__c)); } + + static bool + eq_int_type(const int_type& __c1, const int_type& __c2) + { return __c1 == __c2; } + + static int_type + eof() + { return static_cast(-1); } + + static int_type + not_eof(const int_type& __c) + { return (__c == eof()) ? 0 : __c; } + }; + + + + + template<> + struct char_traits + { + typedef wchar_t char_type; + typedef wint_t int_type; + typedef streamoff off_type; + typedef wstreampos pos_type; + typedef mbstate_t state_type; + + static void + assign(char_type& __c1, const char_type& __c2) + { __c1 = __c2; } + + static bool + eq(const char_type& __c1, const char_type& __c2) + { return __c1 == __c2; } + + static bool + lt(const char_type& __c1, const char_type& __c2) + { return __c1 < __c2; } + + static int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { return wmemcmp(__s1, __s2, __n); } + + static size_t + length(const char_type* __s) + { return wcslen(__s); } + + static const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { return wmemchr(__s, __a, __n); } + + static char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { return wmemmove(__s1, __s2, __n); } + + static char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { return wmemcpy(__s1, __s2, __n); } + + static char_type* + assign(char_type* __s, size_t __n, char_type __a) + { return wmemset(__s, __a, __n); } + + static char_type + to_char_type(const int_type& __c) + { return char_type(__c); } + + static int_type + to_int_type(const char_type& __c) + { return int_type(__c); } + + static bool + eq_int_type(const int_type& __c1, const int_type& __c2) + { return __c1 == __c2; } + + static int_type + eof() + { return static_cast((0xffffffffu)); } + + static int_type + not_eof(const int_type& __c) + { return eq_int_type(__c, eof()) ? 0 : __c; } + }; + + + +} +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/string" 2 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/localefwd.h" 1 3 +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/localefwd.h" 3 + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/localefwd.h" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 1 3 +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 3 + +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/clocale" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/clocale" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/clocale" 3 + + +# 1 "/usr/include/locale.h" 1 3 4 +# 29 "/usr/include/locale.h" 3 4 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 30 "/usr/include/locale.h" 2 3 4 +# 1 "/usr/include/bits/locale.h" 1 3 4 +# 27 "/usr/include/bits/locale.h" 3 4 +enum +{ + __LC_CTYPE = 0, + __LC_NUMERIC = 1, + __LC_TIME = 2, + __LC_COLLATE = 3, + __LC_MONETARY = 4, + __LC_MESSAGES = 5, + __LC_ALL = 6, + __LC_PAPER = 7, + __LC_NAME = 8, + __LC_ADDRESS = 9, + __LC_TELEPHONE = 10, + __LC_MEASUREMENT = 11, + __LC_IDENTIFICATION = 12 +}; +# 31 "/usr/include/locale.h" 2 3 4 + +extern "C" { +# 51 "/usr/include/locale.h" 3 4 + + + +struct lconv +{ + + + char *decimal_point; + char *thousands_sep; + + + + + + char *grouping; + + + + + + char *int_curr_symbol; + char *currency_symbol; + char *mon_decimal_point; + char *mon_thousands_sep; + char *mon_grouping; + char *positive_sign; + char *negative_sign; + char int_frac_digits; + char frac_digits; + + char p_cs_precedes; + + char p_sep_by_space; + + char n_cs_precedes; + + char n_sep_by_space; + + + + + + + char p_sign_posn; + char n_sign_posn; + + + char int_p_cs_precedes; + + char int_p_sep_by_space; + + char int_n_cs_precedes; + + char int_n_sep_by_space; + + + + + + + char int_p_sign_posn; + char int_n_sign_posn; +# 121 "/usr/include/locale.h" 3 4 +}; + + + +extern char *setlocale (int __category, __const char *__locale) throw (); + + +extern struct lconv *localeconv (void) throw (); + + +# 152 "/usr/include/locale.h" 3 4 +extern __locale_t newlocale (int __category_mask, __const char *__locale, + __locale_t __base) throw (); +# 187 "/usr/include/locale.h" 3 4 +extern __locale_t duplocale (__locale_t __dataset) throw (); + + + +extern void freelocale (__locale_t __dataset) throw (); + + + + + + +extern __locale_t uselocale (__locale_t __dataset) throw (); + + + + + + + +} +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/clocale" 2 3 +# 53 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/clocale" 3 +namespace std +{ + using ::lconv; + using ::setlocale; + using ::localeconv; +} +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 2 3 + + + + + + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) +{ + + + extern "C" __typeof(uselocale) __uselocale; + + +} + + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + typedef __locale_t __c_locale; + + + + + + inline int + __convert_from_v(const __c_locale& __cloc __attribute__ ((__unused__)), + char* __out, + const int __size __attribute__ ((__unused__)), + const char* __fmt, ...) + { + + __c_locale __old = __gnu_cxx::__uselocale(__cloc); +# 89 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/c++locale.h" 3 + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + + + const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); + + + + + __builtin_va_end(__args); + + + __gnu_cxx::__uselocale(__old); + + + + + + + + return __ret; + } + + +} +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/localefwd.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/iosfwd" 1 3 +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/iosfwd" 3 + +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/iosfwd" 3 + + + + + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 76 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/iosfwd" 3 + class ios_base; + + template > + class basic_ios; + + template > + class basic_streambuf; + + template > + class basic_istream; + + template > + class basic_ostream; + + template > + class basic_iostream; + + template, + typename _Alloc = allocator<_CharT> > + class basic_stringbuf; + + template, + typename _Alloc = allocator<_CharT> > + class basic_istringstream; + + template, + typename _Alloc = allocator<_CharT> > + class basic_ostringstream; + + template, + typename _Alloc = allocator<_CharT> > + class basic_stringstream; + + template > + class basic_filebuf; + + template > + class basic_ifstream; + + template > + class basic_ofstream; + + template > + class basic_fstream; + + template > + class istreambuf_iterator; + + template > + class ostreambuf_iterator; + + + + typedef basic_ios ios; + + + typedef basic_streambuf streambuf; + + + typedef basic_istream istream; + + + typedef basic_ostream ostream; + + + typedef basic_iostream iostream; + + + typedef basic_stringbuf stringbuf; + + + typedef basic_istringstream istringstream; + + + typedef basic_ostringstream ostringstream; + + + typedef basic_stringstream stringstream; + + + typedef basic_filebuf filebuf; + + + typedef basic_ifstream ifstream; + + + typedef basic_ofstream ofstream; + + + typedef basic_fstream fstream; + + + + typedef basic_ios wios; + + + typedef basic_streambuf wstreambuf; + + + typedef basic_istream wistream; + + + typedef basic_ostream wostream; + + + typedef basic_iostream wiostream; + + + typedef basic_stringbuf wstringbuf; + + + typedef basic_istringstream wistringstream; + + + typedef basic_ostringstream wostringstream; + + + typedef basic_stringstream wstringstream; + + + typedef basic_filebuf wfilebuf; + + + typedef basic_ifstream wifstream; + + + typedef basic_ofstream wofstream; + + + typedef basic_fstream wfstream; + + + + +} +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/localefwd.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cctype" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cctype" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cctype" 3 + + +# 1 "/usr/include/ctype.h" 1 3 4 +# 30 "/usr/include/ctype.h" 3 4 +extern "C" { +# 48 "/usr/include/ctype.h" 3 4 +enum +{ + _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), + _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), + _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), + _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), + _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), + _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), + _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), + _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), + _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), + _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), + _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), + _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) +}; +# 81 "/usr/include/ctype.h" 3 4 +extern __const unsigned short int **__ctype_b_loc (void) + throw () __attribute__ ((__const)); +extern __const __int32_t **__ctype_tolower_loc (void) + throw () __attribute__ ((__const)); +extern __const __int32_t **__ctype_toupper_loc (void) + throw () __attribute__ ((__const)); +# 96 "/usr/include/ctype.h" 3 4 + + + + + + +extern int isalnum (int) throw (); +extern int isalpha (int) throw (); +extern int iscntrl (int) throw (); +extern int isdigit (int) throw (); +extern int islower (int) throw (); +extern int isgraph (int) throw (); +extern int isprint (int) throw (); +extern int ispunct (int) throw (); +extern int isspace (int) throw (); +extern int isupper (int) throw (); +extern int isxdigit (int) throw (); + + + +extern int tolower (int __c) throw (); + + +extern int toupper (int __c) throw (); + + + + + + + + +extern int isblank (int) throw (); + + + + + + +extern int isctype (int __c, int __mask) throw (); + + + + + + +extern int isascii (int __c) throw (); + + + +extern int toascii (int __c) throw (); + + + +extern int _toupper (int) throw (); +extern int _tolower (int) throw (); +# 247 "/usr/include/ctype.h" 3 4 +extern int isalnum_l (int, __locale_t) throw (); +extern int isalpha_l (int, __locale_t) throw (); +extern int iscntrl_l (int, __locale_t) throw (); +extern int isdigit_l (int, __locale_t) throw (); +extern int islower_l (int, __locale_t) throw (); +extern int isgraph_l (int, __locale_t) throw (); +extern int isprint_l (int, __locale_t) throw (); +extern int ispunct_l (int, __locale_t) throw (); +extern int isspace_l (int, __locale_t) throw (); +extern int isupper_l (int, __locale_t) throw (); +extern int isxdigit_l (int, __locale_t) throw (); + +extern int isblank_l (int, __locale_t) throw (); + + + +extern int __tolower_l (int __c, __locale_t __l) throw (); +extern int tolower_l (int __c, __locale_t __l) throw (); + + +extern int __toupper_l (int __c, __locale_t __l) throw (); +extern int toupper_l (int __c, __locale_t __l) throw (); +# 323 "/usr/include/ctype.h" 3 4 +} +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cctype" 2 3 +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cctype" 3 +namespace std +{ + using ::isalnum; + using ::isalpha; + using ::iscntrl; + using ::isdigit; + using ::isgraph; + using ::islower; + using ::isprint; + using ::ispunct; + using ::isspace; + using ::isupper; + using ::isxdigit; + using ::tolower; + using ::toupper; +} +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/localefwd.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 57 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/localefwd.h" 3 + class locale; + + template + bool + has_facet(const locale&) throw(); + + template + const _Facet& + use_facet(const locale&); + + + template + bool + isspace(_CharT, const locale&); + + template + bool + isprint(_CharT, const locale&); + + template + bool + iscntrl(_CharT, const locale&); + + template + bool + isupper(_CharT, const locale&); + + template + bool + islower(_CharT, const locale&); + + template + bool + isalpha(_CharT, const locale&); + + template + bool + isdigit(_CharT, const locale&); + + template + bool + ispunct(_CharT, const locale&); + + template + bool + isxdigit(_CharT, const locale&); + + template + bool + isalnum(_CharT, const locale&); + + template + bool + isgraph(_CharT, const locale&); + + template + _CharT + toupper(_CharT, const locale&); + + template + _CharT + tolower(_CharT, const locale&); + + + class ctype_base; + template + class ctype; + template<> class ctype; + + template<> class ctype; + + template + class ctype_byname; + + + class codecvt_base; + template + class codecvt; + template<> class codecvt; + + template<> class codecvt; + + template + class codecvt_byname; + + + + template > + class num_get; + template > + class num_put; + + template class numpunct; + template class numpunct_byname; + + + template + class collate; + template class + collate_byname; + + + class time_base; + template > + class time_get; + template > + class time_get_byname; + template > + class time_put; + template > + class time_put_byname; + + + class money_base; + + template > + class money_get; + template > + class money_put; + + template + class moneypunct; + template + class moneypunct_byname; + + + class messages_base; + template + class messages; + template + class messages_byname; + + +} +# 46 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/string" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ostream_insert.h" 1 3 +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ostream_insert.h" 3 + +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ostream_insert.h" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/cxxabi_forced.h" 1 3 +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/cxxabi_forced.h" 3 + +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/cxxabi_forced.h" 3 + +#pragma GCC visibility push(default) + + +namespace __cxxabiv1 +{ + + + + + + + + class __forced_unwind + { + virtual ~__forced_unwind() throw(); + + + virtual void __pure_dummy() = 0; + }; +} + + +#pragma GCC visibility pop +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ostream_insert.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + template + inline void + __ostream_write(basic_ostream<_CharT, _Traits>& __out, + const _CharT* __s, streamsize __n) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + + const streamsize __put = __out.rdbuf()->sputn(__s, __n); + if (__put != __n) + __out.setstate(__ios_base::badbit); + } + + template + inline void + __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + + const _CharT __c = __out.fill(); + for (; __n > 0; --__n) + { + const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c); + if (_Traits::eq_int_type(__put, _Traits::eof())) + { + __out.setstate(__ios_base::badbit); + break; + } + } + } + + template + basic_ostream<_CharT, _Traits>& + __ostream_insert(basic_ostream<_CharT, _Traits>& __out, + const _CharT* __s, streamsize __n) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + + typename __ostream_type::sentry __cerb(__out); + if (__cerb) + { + try + { + const streamsize __w = __out.width(); + if (__w > __n) + { + const bool __left = ((__out.flags() + & __ios_base::adjustfield) + == __ios_base::left); + if (!__left) + __ostream_fill(__out, __w - __n); + if (__out.good()) + __ostream_write(__out, __s, __n); + if (__left && __out.good()) + __ostream_fill(__out, __w - __n); + } + else + __ostream_write(__out, __s, __n); + __out.width(0); + } + catch(__cxxabiv1::__forced_unwind&) + { + __out._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { __out._M_setstate(__ios_base::badbit); } + } + return __out; + } + + + + + extern template ostream& __ostream_insert(ostream&, const char*, streamsize); + + + extern template wostream& __ostream_insert(wostream&, const wchar_t*, + streamsize); + + + + +} +# 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/string" 2 3 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_function.h" 1 3 +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_function.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 101 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_function.h" 3 + template + struct unary_function + { + + typedef _Arg argument_type; + + + typedef _Result result_type; + }; + + + + + template + struct binary_function + { + + typedef _Arg1 first_argument_type; + + + typedef _Arg2 second_argument_type; + + + typedef _Result result_type; + }; +# 140 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_function.h" 3 + template + struct plus : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x + __y; } + }; + + + template + struct minus : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x - __y; } + }; + + + template + struct multiplies : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x * __y; } + }; + + + template + struct divides : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x / __y; } + }; + + + template + struct modulus : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x % __y; } + }; + + + template + struct negate : public unary_function<_Tp, _Tp> + { + _Tp + operator()(const _Tp& __x) const + { return -__x; } + }; +# 204 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_function.h" 3 + template + struct equal_to : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x == __y; } + }; + + + template + struct not_equal_to : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x != __y; } + }; + + + template + struct greater : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x > __y; } + }; + + + template + struct less : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x < __y; } + }; + + + template + struct greater_equal : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x >= __y; } + }; + + + template + struct less_equal : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x <= __y; } + }; +# 268 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_function.h" 3 + template + struct logical_and : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x && __y; } + }; + + + template + struct logical_or : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x || __y; } + }; + + + template + struct logical_not : public unary_function<_Tp, bool> + { + bool + operator()(const _Tp& __x) const + { return !__x; } + }; + + + + + template + struct bit_and : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x & __y; } + }; + + template + struct bit_or : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x | __y; } + }; + + template + struct bit_xor : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x ^ __y; } + }; +# 351 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_function.h" 3 + template + class unary_negate + : public unary_function + { + protected: + _Predicate _M_pred; + + public: + explicit + unary_negate(const _Predicate& __x) : _M_pred(__x) { } + + bool + operator()(const typename _Predicate::argument_type& __x) const + { return !_M_pred(__x); } + }; + + + template + inline unary_negate<_Predicate> + not1(const _Predicate& __pred) + { return unary_negate<_Predicate>(__pred); } + + + template + class binary_negate + : public binary_function + { + protected: + _Predicate _M_pred; + + public: + explicit + binary_negate(const _Predicate& __x) : _M_pred(__x) { } + + bool + operator()(const typename _Predicate::first_argument_type& __x, + const typename _Predicate::second_argument_type& __y) const + { return !_M_pred(__x, __y); } + }; + + + template + inline binary_negate<_Predicate> + not2(const _Predicate& __pred) + { return binary_negate<_Predicate>(__pred); } +# 422 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_function.h" 3 + template + class pointer_to_unary_function : public unary_function<_Arg, _Result> + { + protected: + _Result (*_M_ptr)(_Arg); + + public: + pointer_to_unary_function() { } + + explicit + pointer_to_unary_function(_Result (*__x)(_Arg)) + : _M_ptr(__x) { } + + _Result + operator()(_Arg __x) const + { return _M_ptr(__x); } + }; + + + template + inline pointer_to_unary_function<_Arg, _Result> + ptr_fun(_Result (*__x)(_Arg)) + { return pointer_to_unary_function<_Arg, _Result>(__x); } + + + template + class pointer_to_binary_function + : public binary_function<_Arg1, _Arg2, _Result> + { + protected: + _Result (*_M_ptr)(_Arg1, _Arg2); + + public: + pointer_to_binary_function() { } + + explicit + pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) + : _M_ptr(__x) { } + + _Result + operator()(_Arg1 __x, _Arg2 __y) const + { return _M_ptr(__x, __y); } + }; + + + template + inline pointer_to_binary_function<_Arg1, _Arg2, _Result> + ptr_fun(_Result (*__x)(_Arg1, _Arg2)) + { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); } + + + template + struct _Identity : public unary_function<_Tp,_Tp> + { + _Tp& + operator()(_Tp& __x) const + { return __x; } + + const _Tp& + operator()(const _Tp& __x) const + { return __x; } + }; + + template + struct _Select1st : public unary_function<_Pair, + typename _Pair::first_type> + { + typename _Pair::first_type& + operator()(_Pair& __x) const + { return __x.first; } + + const typename _Pair::first_type& + operator()(const _Pair& __x) const + { return __x.first; } +# 508 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_function.h" 3 + }; + + template + struct _Select2nd : public unary_function<_Pair, + typename _Pair::second_type> + { + typename _Pair::second_type& + operator()(_Pair& __x) const + { return __x.second; } + + const typename _Pair::second_type& + operator()(const _Pair& __x) const + { return __x.second; } + }; +# 541 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_function.h" 3 + template + class mem_fun_t : public unary_function<_Tp*, _Ret> + { + public: + explicit + mem_fun_t(_Ret (_Tp::*__pf)()) + : _M_f(__pf) { } + + _Ret + operator()(_Tp* __p) const + { return (__p->*_M_f)(); } + + private: + _Ret (_Tp::*_M_f)(); + }; + + + + template + class const_mem_fun_t : public unary_function + { + public: + explicit + const_mem_fun_t(_Ret (_Tp::*__pf)() const) + : _M_f(__pf) { } + + _Ret + operator()(const _Tp* __p) const + { return (__p->*_M_f)(); } + + private: + _Ret (_Tp::*_M_f)() const; + }; + + + + template + class mem_fun_ref_t : public unary_function<_Tp, _Ret> + { + public: + explicit + mem_fun_ref_t(_Ret (_Tp::*__pf)()) + : _M_f(__pf) { } + + _Ret + operator()(_Tp& __r) const + { return (__r.*_M_f)(); } + + private: + _Ret (_Tp::*_M_f)(); + }; + + + + template + class const_mem_fun_ref_t : public unary_function<_Tp, _Ret> + { + public: + explicit + const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) + : _M_f(__pf) { } + + _Ret + operator()(const _Tp& __r) const + { return (__r.*_M_f)(); } + + private: + _Ret (_Tp::*_M_f)() const; + }; + + + + template + class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret> + { + public: + explicit + mem_fun1_t(_Ret (_Tp::*__pf)(_Arg)) + : _M_f(__pf) { } + + _Ret + operator()(_Tp* __p, _Arg __x) const + { return (__p->*_M_f)(__x); } + + private: + _Ret (_Tp::*_M_f)(_Arg); + }; + + + + template + class const_mem_fun1_t : public binary_function + { + public: + explicit + const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const) + : _M_f(__pf) { } + + _Ret + operator()(const _Tp* __p, _Arg __x) const + { return (__p->*_M_f)(__x); } + + private: + _Ret (_Tp::*_M_f)(_Arg) const; + }; + + + + template + class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> + { + public: + explicit + mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg)) + : _M_f(__pf) { } + + _Ret + operator()(_Tp& __r, _Arg __x) const + { return (__r.*_M_f)(__x); } + + private: + _Ret (_Tp::*_M_f)(_Arg); + }; + + + + template + class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> + { + public: + explicit + const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const) + : _M_f(__pf) { } + + _Ret + operator()(const _Tp& __r, _Arg __x) const + { return (__r.*_M_f)(__x); } + + private: + _Ret (_Tp::*_M_f)(_Arg) const; + }; + + + + template + inline mem_fun_t<_Ret, _Tp> + mem_fun(_Ret (_Tp::*__f)()) + { return mem_fun_t<_Ret, _Tp>(__f); } + + template + inline const_mem_fun_t<_Ret, _Tp> + mem_fun(_Ret (_Tp::*__f)() const) + { return const_mem_fun_t<_Ret, _Tp>(__f); } + + template + inline mem_fun_ref_t<_Ret, _Tp> + mem_fun_ref(_Ret (_Tp::*__f)()) + { return mem_fun_ref_t<_Ret, _Tp>(__f); } + + template + inline const_mem_fun_ref_t<_Ret, _Tp> + mem_fun_ref(_Ret (_Tp::*__f)() const) + { return const_mem_fun_ref_t<_Ret, _Tp>(__f); } + + template + inline mem_fun1_t<_Ret, _Tp, _Arg> + mem_fun(_Ret (_Tp::*__f)(_Arg)) + { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); } + + template + inline const_mem_fun1_t<_Ret, _Tp, _Arg> + mem_fun(_Ret (_Tp::*__f)(_Arg) const) + { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); } + + template + inline mem_fun1_ref_t<_Ret, _Tp, _Arg> + mem_fun_ref(_Ret (_Tp::*__f)(_Arg)) + { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } + + template + inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg> + mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const) + { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } + + + + +} + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/backward/binders.h" 1 3 +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/backward/binders.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 99 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/backward/binders.h" 3 + template + class binder1st + : public unary_function + { + protected: + _Operation op; + typename _Operation::first_argument_type value; + + public: + binder1st(const _Operation& __x, + const typename _Operation::first_argument_type& __y) + : op(__x), value(__y) { } + + typename _Operation::result_type + operator()(const typename _Operation::second_argument_type& __x) const + { return op(value, __x); } + + + + typename _Operation::result_type + operator()(typename _Operation::second_argument_type& __x) const + { return op(value, __x); } + } ; + + + template + inline binder1st<_Operation> + bind1st(const _Operation& __fn, const _Tp& __x) + { + typedef typename _Operation::first_argument_type _Arg1_type; + return binder1st<_Operation>(__fn, _Arg1_type(__x)); + } + + + template + class binder2nd + : public unary_function + { + protected: + _Operation op; + typename _Operation::second_argument_type value; + + public: + binder2nd(const _Operation& __x, + const typename _Operation::second_argument_type& __y) + : op(__x), value(__y) { } + + typename _Operation::result_type + operator()(const typename _Operation::first_argument_type& __x) const + { return op(__x, value); } + + + + typename _Operation::result_type + operator()(typename _Operation::first_argument_type& __x) const + { return op(__x, value); } + } ; + + + template + inline binder2nd<_Operation> + bind2nd(const _Operation& __fn, const _Tp& __x) + { + typedef typename _Operation::second_argument_type _Arg2_type; + return binder2nd<_Operation>(__fn, _Arg2_type(__x)); + } + + + +} +# 732 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_function.h" 2 3 +# 51 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/string" 2 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/range_access.h" 1 3 +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/range_access.h" 3 + +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/range_access.h" 3 +# 54 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/string" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 1 3 +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ext/atomicity.h" 1 3 +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ext/atomicity.h" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr.h" 1 3 +# 30 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr.h" 3 +#pragma GCC visibility push(default) +# 162 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr.h" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 +# 1 "/usr/include/pthread.h" 1 3 4 +# 25 "/usr/include/pthread.h" 3 4 +# 1 "/usr/include/sched.h" 1 3 4 +# 30 "/usr/include/sched.h" 3 4 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 31 "/usr/include/sched.h" 2 3 4 + + + +# 1 "/usr/include/time.h" 1 3 4 +# 35 "/usr/include/sched.h" 2 3 4 +# 43 "/usr/include/sched.h" 3 4 +# 1 "/usr/include/bits/sched.h" 1 3 4 +# 74 "/usr/include/bits/sched.h" 3 4 +struct sched_param + { + int __sched_priority; + }; + +extern "C" { + + + +extern int clone (int (*__fn) (void *__arg), void *__child_stack, + int __flags, void *__arg, ...) throw (); + + +extern int unshare (int __flags) throw (); + + +extern int sched_getcpu (void) throw (); + + +} + + + + + + + +struct __sched_param + { + int __sched_priority; + }; +# 116 "/usr/include/bits/sched.h" 3 4 +typedef unsigned long int __cpu_mask; + + + + + + +typedef struct +{ + __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; +} cpu_set_t; +# 199 "/usr/include/bits/sched.h" 3 4 +extern "C" { + +extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) + throw (); +extern cpu_set_t *__sched_cpualloc (size_t __count) throw () __attribute__ ((__warn_unused_result__)); +extern void __sched_cpufree (cpu_set_t *__set) throw (); + +} +# 44 "/usr/include/sched.h" 2 3 4 + + + + +extern "C" { + + +extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param) + throw (); + + +extern int sched_getparam (__pid_t __pid, struct sched_param *__param) throw (); + + +extern int sched_setscheduler (__pid_t __pid, int __policy, + __const struct sched_param *__param) throw (); + + +extern int sched_getscheduler (__pid_t __pid) throw (); + + +extern int sched_yield (void) throw (); + + +extern int sched_get_priority_max (int __algorithm) throw (); + + +extern int sched_get_priority_min (int __algorithm) throw (); + + +extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) throw (); +# 118 "/usr/include/sched.h" 3 4 +extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, + __const cpu_set_t *__cpuset) throw (); + + +extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, + cpu_set_t *__cpuset) throw (); + + +} +# 26 "/usr/include/pthread.h" 2 3 4 +# 1 "/usr/include/time.h" 1 3 4 +# 30 "/usr/include/time.h" 3 4 +extern "C" { + + + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 39 "/usr/include/time.h" 2 3 4 + + + +# 1 "/usr/include/bits/time.h" 1 3 4 +# 43 "/usr/include/time.h" 2 3 4 +# 131 "/usr/include/time.h" 3 4 + + +struct tm +{ + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; + + + long int tm_gmtoff; + __const char *tm_zone; + + + + +}; + + + + + + + + +struct itimerspec + { + struct timespec it_interval; + struct timespec it_value; + }; + + +struct sigevent; +# 180 "/usr/include/time.h" 3 4 + + + +extern clock_t clock (void) throw (); + + +extern time_t time (time_t *__timer) throw (); + + +extern double difftime (time_t __time1, time_t __time0) + throw () __attribute__ ((__const__)); + + +extern time_t mktime (struct tm *__tp) throw (); + + + + + +extern size_t strftime (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp) throw (); + + + + + +extern char *strptime (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp) + throw (); + + + + + + + +extern size_t strftime_l (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp, + __locale_t __loc) throw (); + + + +extern char *strptime_l (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp, + __locale_t __loc) throw (); + + + + + + +extern struct tm *gmtime (__const time_t *__timer) throw (); + + + +extern struct tm *localtime (__const time_t *__timer) throw (); + + + + + +extern struct tm *gmtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) throw (); + + + +extern struct tm *localtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) throw (); + + + + + +extern char *asctime (__const struct tm *__tp) throw (); + + +extern char *ctime (__const time_t *__timer) throw (); + + + + + + + +extern char *asctime_r (__const struct tm *__restrict __tp, + char *__restrict __buf) throw (); + + +extern char *ctime_r (__const time_t *__restrict __timer, + char *__restrict __buf) throw (); + + + + +extern char *__tzname[2]; +extern int __daylight; +extern long int __timezone; + + + + +extern char *tzname[2]; + + + +extern void tzset (void) throw (); + + + +extern int daylight; +extern long int timezone; + + + + + +extern int stime (__const time_t *__when) throw (); +# 313 "/usr/include/time.h" 3 4 +extern time_t timegm (struct tm *__tp) throw (); + + +extern time_t timelocal (struct tm *__tp) throw (); + + +extern int dysize (int __year) throw () __attribute__ ((__const__)); +# 328 "/usr/include/time.h" 3 4 +extern int nanosleep (__const struct timespec *__requested_time, + struct timespec *__remaining); + + + +extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw (); + + +extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw (); + + +extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) + throw (); + + + + + + +extern int clock_nanosleep (clockid_t __clock_id, int __flags, + __const struct timespec *__req, + struct timespec *__rem); + + +extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw (); + + + + +extern int timer_create (clockid_t __clock_id, + struct sigevent *__restrict __evp, + timer_t *__restrict __timerid) throw (); + + +extern int timer_delete (timer_t __timerid) throw (); + + +extern int timer_settime (timer_t __timerid, int __flags, + __const struct itimerspec *__restrict __value, + struct itimerspec *__restrict __ovalue) throw (); + + +extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) + throw (); + + +extern int timer_getoverrun (timer_t __timerid) throw (); +# 390 "/usr/include/time.h" 3 4 +extern int getdate_err; +# 399 "/usr/include/time.h" 3 4 +extern struct tm *getdate (__const char *__string); +# 413 "/usr/include/time.h" 3 4 +extern int getdate_r (__const char *__restrict __string, + struct tm *__restrict __resbufp); + + +} +# 27 "/usr/include/pthread.h" 2 3 4 + + +# 1 "/usr/include/bits/setjmp.h" 1 3 4 +# 27 "/usr/include/bits/setjmp.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 28 "/usr/include/bits/setjmp.h" 2 3 4 + + + + +typedef long int __jmp_buf[8]; +# 30 "/usr/include/pthread.h" 2 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 31 "/usr/include/pthread.h" 2 3 4 + + + +enum +{ + PTHREAD_CREATE_JOINABLE, + + PTHREAD_CREATE_DETACHED + +}; + + + +enum +{ + PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_ADAPTIVE_NP + + , + PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL + + + + , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP + +}; + + + + +enum +{ + PTHREAD_MUTEX_STALLED, + PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, + PTHREAD_MUTEX_ROBUST, + PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST +}; + + + + + +enum +{ + PTHREAD_PRIO_NONE, + PTHREAD_PRIO_INHERIT, + PTHREAD_PRIO_PROTECT +}; +# 115 "/usr/include/pthread.h" 3 4 +enum +{ + PTHREAD_RWLOCK_PREFER_READER_NP, + PTHREAD_RWLOCK_PREFER_WRITER_NP, + PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, + PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP +}; +# 147 "/usr/include/pthread.h" 3 4 +enum +{ + PTHREAD_INHERIT_SCHED, + + PTHREAD_EXPLICIT_SCHED + +}; + + + +enum +{ + PTHREAD_SCOPE_SYSTEM, + + PTHREAD_SCOPE_PROCESS + +}; + + + +enum +{ + PTHREAD_PROCESS_PRIVATE, + + PTHREAD_PROCESS_SHARED + +}; +# 182 "/usr/include/pthread.h" 3 4 +struct _pthread_cleanup_buffer +{ + void (*__routine) (void *); + void *__arg; + int __canceltype; + struct _pthread_cleanup_buffer *__prev; +}; + + +enum +{ + PTHREAD_CANCEL_ENABLE, + + PTHREAD_CANCEL_DISABLE + +}; +enum +{ + PTHREAD_CANCEL_DEFERRED, + + PTHREAD_CANCEL_ASYNCHRONOUS + +}; +# 220 "/usr/include/pthread.h" 3 4 +extern "C" { + + + + +extern int pthread_create (pthread_t *__restrict __newthread, + __const pthread_attr_t *__restrict __attr, + void *(*__start_routine) (void *), + void *__restrict __arg) throw () __attribute__ ((__nonnull__ (1, 3))); + + + + + +extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); + + + + + + + +extern int pthread_join (pthread_t __th, void **__thread_return); + + + + +extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) throw (); + + + + + + + +extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, + __const struct timespec *__abstime); + + + + + + +extern int pthread_detach (pthread_t __th) throw (); + + + +extern pthread_t pthread_self (void) throw () __attribute__ ((__const__)); + + +extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) throw (); + + + + + + + +extern int pthread_attr_init (pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_destroy (pthread_attr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, + int *__detachstate) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, + int __detachstate) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, + size_t *__guardsize) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setguardsize (pthread_attr_t *__attr, + size_t __guardsize) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict + __attr, + struct sched_param *__restrict __param) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, + __const struct sched_param *__restrict + __param) throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict + __attr, int *__restrict __policy) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict + __attr, int *__restrict __inherit) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, + int __inherit) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, + int *__restrict __scope) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict + __attr, void **__restrict __stackaddr) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); + + + + + +extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, + void *__stackaddr) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); + + +extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict + __attr, size_t *__restrict __stacksize) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int pthread_attr_setstacksize (pthread_attr_t *__attr, + size_t __stacksize) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, + void **__restrict __stackaddr, + size_t *__restrict __stacksize) + throw () __attribute__ ((__nonnull__ (1, 2, 3))); + + + + +extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, + size_t __stacksize) throw () __attribute__ ((__nonnull__ (1))); + + + + + +extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, + size_t __cpusetsize, + __const cpu_set_t *__cpuset) + throw () __attribute__ ((__nonnull__ (1, 3))); + + + +extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr, + size_t __cpusetsize, + cpu_set_t *__cpuset) + throw () __attribute__ ((__nonnull__ (1, 3))); + + + + + +extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) + throw () __attribute__ ((__nonnull__ (2))); + + + + + + + +extern int pthread_setschedparam (pthread_t __target_thread, int __policy, + __const struct sched_param *__param) + throw () __attribute__ ((__nonnull__ (3))); + + +extern int pthread_getschedparam (pthread_t __target_thread, + int *__restrict __policy, + struct sched_param *__restrict __param) + throw () __attribute__ ((__nonnull__ (2, 3))); + + +extern int pthread_setschedprio (pthread_t __target_thread, int __prio) + throw (); + + + + +extern int pthread_getname_np (pthread_t __target_thread, char *__buf, + size_t __buflen) + throw () __attribute__ ((__nonnull__ (2))); + + +extern int pthread_setname_np (pthread_t __target_thread, __const char *__name) + throw () __attribute__ ((__nonnull__ (2))); + + + + + +extern int pthread_getconcurrency (void) throw (); + + +extern int pthread_setconcurrency (int __level) throw (); + + + + + + + +extern int pthread_yield (void) throw (); + + + + +extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, + __const cpu_set_t *__cpuset) + throw () __attribute__ ((__nonnull__ (3))); + + +extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, + cpu_set_t *__cpuset) + throw () __attribute__ ((__nonnull__ (3))); +# 478 "/usr/include/pthread.h" 3 4 +extern int pthread_once (pthread_once_t *__once_control, + void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); +# 490 "/usr/include/pthread.h" 3 4 +extern int pthread_setcancelstate (int __state, int *__oldstate); + + + +extern int pthread_setcanceltype (int __type, int *__oldtype); + + +extern int pthread_cancel (pthread_t __th); + + + + +extern void pthread_testcancel (void); + + + + +typedef struct +{ + struct + { + __jmp_buf __cancel_jmp_buf; + int __mask_was_saved; + } __cancel_jmp_buf[1]; + void *__pad[4]; +} __pthread_unwind_buf_t __attribute__ ((__aligned__)); +# 524 "/usr/include/pthread.h" 3 4 +struct __pthread_cleanup_frame +{ + void (*__cancel_routine) (void *); + void *__cancel_arg; + int __do_it; + int __cancel_type; +}; + + + + +class __pthread_cleanup_class +{ + void (*__cancel_routine) (void *); + void *__cancel_arg; + int __do_it; + int __cancel_type; + + public: + __pthread_cleanup_class (void (*__fct) (void *), void *__arg) + : __cancel_routine (__fct), __cancel_arg (__arg), __do_it (1) { } + ~__pthread_cleanup_class () { if (__do_it) __cancel_routine (__cancel_arg); } + void __setdoit (int __newval) { __do_it = __newval; } + void __defer () { pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, + &__cancel_type); } + void __restore () const { pthread_setcanceltype (__cancel_type, 0); } +}; +# 726 "/usr/include/pthread.h" 3 4 +struct __jmp_buf_tag; +extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) throw (); + + + + + +extern int pthread_mutex_init (pthread_mutex_t *__mutex, + __const pthread_mutexattr_t *__mutexattr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutex_lock (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, + __const struct timespec *__restrict + __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutex_getprioceiling (__const pthread_mutex_t * + __restrict __mutex, + int *__restrict __prioceiling) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, + int __prioceiling, + int *__restrict __old_ceiling) + throw () __attribute__ ((__nonnull__ (1, 3))); + + + + +extern int pthread_mutex_consistent (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); + +extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); +# 790 "/usr/include/pthread.h" 3 4 +extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __pshared) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, + int __pshared) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict + __attr, int *__restrict __kind) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __protocol) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, + int __protocol) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __prioceiling) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, + int __prioceiling) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr, + int *__robustness) + throw () __attribute__ ((__nonnull__ (1, 2))); + +extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr, + int *__robustness) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, + int __robustness) + throw () __attribute__ ((__nonnull__ (1))); + +extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, + int __robustness) + throw () __attribute__ ((__nonnull__ (1))); +# 872 "/usr/include/pthread.h" 3 4 +extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, + __const pthread_rwlockattr_t *__restrict + __attr) throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, + __const struct timespec *__restrict + __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, + __const struct timespec *__restrict + __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); + + + + + +extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * + __restrict __attr, + int *__restrict __pshared) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, + int __pshared) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t * + __restrict __attr, + int *__restrict __pref) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, + int __pref) throw () __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int pthread_cond_init (pthread_cond_t *__restrict __cond, + __const pthread_condattr_t *__restrict + __cond_attr) throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_cond_destroy (pthread_cond_t *__cond) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_cond_signal (pthread_cond_t *__cond) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_cond_broadcast (pthread_cond_t *__cond) + throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex) + __attribute__ ((__nonnull__ (1, 2))); +# 984 "/usr/include/pthread.h" 3 4 +extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex, + __const struct timespec *__restrict + __abstime) __attribute__ ((__nonnull__ (1, 2, 3))); + + + + +extern int pthread_condattr_init (pthread_condattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_condattr_destroy (pthread_condattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_condattr_getpshared (__const pthread_condattr_t * + __restrict __attr, + int *__restrict __pshared) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, + int __pshared) throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_condattr_getclock (__const pthread_condattr_t * + __restrict __attr, + __clockid_t *__restrict __clock_id) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_condattr_setclock (pthread_condattr_t *__attr, + __clockid_t __clock_id) + throw () __attribute__ ((__nonnull__ (1))); +# 1028 "/usr/include/pthread.h" 3 4 +extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_destroy (pthread_spinlock_t *__lock) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_lock (pthread_spinlock_t *__lock) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_trylock (pthread_spinlock_t *__lock) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_unlock (pthread_spinlock_t *__lock) + throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, + __const pthread_barrierattr_t *__restrict + __attr, unsigned int __count) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrier_wait (pthread_barrier_t *__barrier) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * + __restrict __attr, + int *__restrict __pshared) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, + int __pshared) + throw () __attribute__ ((__nonnull__ (1))); +# 1095 "/usr/include/pthread.h" 3 4 +extern int pthread_key_create (pthread_key_t *__key, + void (*__destr_function) (void *)) + throw () __attribute__ ((__nonnull__ (1))); + + +extern int pthread_key_delete (pthread_key_t __key) throw (); + + +extern void *pthread_getspecific (pthread_key_t __key) throw (); + + +extern int pthread_setspecific (pthread_key_t __key, + __const void *__pointer) throw () ; + + + + +extern int pthread_getcpuclockid (pthread_t __thread_id, + __clockid_t *__clock_id) + throw () __attribute__ ((__nonnull__ (2))); +# 1129 "/usr/include/pthread.h" 3 4 +extern int pthread_atfork (void (*__prepare) (void), + void (*__parent) (void), + void (*__child) (void)) throw (); + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +pthread_equal (pthread_t __thread1, pthread_t __thread2) throw () +{ + return __thread1 == __thread2; +} + + +} +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 2 3 + + +typedef pthread_t __gthread_t; +typedef pthread_key_t __gthread_key_t; +typedef pthread_once_t __gthread_once_t; +typedef pthread_mutex_t __gthread_mutex_t; +typedef pthread_mutex_t __gthread_recursive_mutex_t; +typedef pthread_cond_t __gthread_cond_t; +typedef struct timespec __gthread_time_t; +# 118 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 +static __typeof(pthread_once) __gthrw_pthread_once __attribute__ ((__weakref__("pthread_once"))); +static __typeof(pthread_getspecific) __gthrw_pthread_getspecific __attribute__ ((__weakref__("pthread_getspecific"))); +static __typeof(pthread_setspecific) __gthrw_pthread_setspecific __attribute__ ((__weakref__("pthread_setspecific"))); + +static __typeof(pthread_create) __gthrw_pthread_create __attribute__ ((__weakref__("pthread_create"))); +static __typeof(pthread_join) __gthrw_pthread_join __attribute__ ((__weakref__("pthread_join"))); +static __typeof(pthread_equal) __gthrw_pthread_equal __attribute__ ((__weakref__("pthread_equal"))); +static __typeof(pthread_self) __gthrw_pthread_self __attribute__ ((__weakref__("pthread_self"))); +static __typeof(pthread_detach) __gthrw_pthread_detach __attribute__ ((__weakref__("pthread_detach"))); + +static __typeof(pthread_cancel) __gthrw_pthread_cancel __attribute__ ((__weakref__("pthread_cancel"))); + +static __typeof(sched_yield) __gthrw_sched_yield __attribute__ ((__weakref__("sched_yield"))); + +static __typeof(pthread_mutex_lock) __gthrw_pthread_mutex_lock __attribute__ ((__weakref__("pthread_mutex_lock"))); +static __typeof(pthread_mutex_trylock) __gthrw_pthread_mutex_trylock __attribute__ ((__weakref__("pthread_mutex_trylock"))); + + +static __typeof(pthread_mutex_timedlock) __gthrw_pthread_mutex_timedlock __attribute__ ((__weakref__("pthread_mutex_timedlock"))); + + +static __typeof(pthread_mutex_unlock) __gthrw_pthread_mutex_unlock __attribute__ ((__weakref__("pthread_mutex_unlock"))); +static __typeof(pthread_mutex_init) __gthrw_pthread_mutex_init __attribute__ ((__weakref__("pthread_mutex_init"))); +static __typeof(pthread_mutex_destroy) __gthrw_pthread_mutex_destroy __attribute__ ((__weakref__("pthread_mutex_destroy"))); + +static __typeof(pthread_cond_broadcast) __gthrw_pthread_cond_broadcast __attribute__ ((__weakref__("pthread_cond_broadcast"))); +static __typeof(pthread_cond_signal) __gthrw_pthread_cond_signal __attribute__ ((__weakref__("pthread_cond_signal"))); +static __typeof(pthread_cond_wait) __gthrw_pthread_cond_wait __attribute__ ((__weakref__("pthread_cond_wait"))); +static __typeof(pthread_cond_timedwait) __gthrw_pthread_cond_timedwait __attribute__ ((__weakref__("pthread_cond_timedwait"))); +static __typeof(pthread_cond_destroy) __gthrw_pthread_cond_destroy __attribute__ ((__weakref__("pthread_cond_destroy"))); + + +static __typeof(pthread_key_create) __gthrw_pthread_key_create __attribute__ ((__weakref__("pthread_key_create"))); +static __typeof(pthread_key_delete) __gthrw_pthread_key_delete __attribute__ ((__weakref__("pthread_key_delete"))); +static __typeof(pthread_mutexattr_init) __gthrw_pthread_mutexattr_init __attribute__ ((__weakref__("pthread_mutexattr_init"))); +static __typeof(pthread_mutexattr_settype) __gthrw_pthread_mutexattr_settype __attribute__ ((__weakref__("pthread_mutexattr_settype"))); +static __typeof(pthread_mutexattr_destroy) __gthrw_pthread_mutexattr_destroy __attribute__ ((__weakref__("pthread_mutexattr_destroy"))); +# 239 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 +static inline int +__gthread_active_p (void) +{ + static void *const __gthread_active_ptr + = __extension__ (void *) & + + + + + + + + __gthrw_pthread_cancel; + return __gthread_active_ptr != 0; +} +# 659 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 +static inline int +__gthread_create (__gthread_t *__threadid, void *(*__func) (void*), + void *__args) +{ + return __gthrw_pthread_create (__threadid, __null, __func, __args); +} + +static inline int +__gthread_join (__gthread_t __threadid, void **__value_ptr) +{ + return __gthrw_pthread_join (__threadid, __value_ptr); +} + +static inline int +__gthread_detach (__gthread_t __threadid) +{ + return __gthrw_pthread_detach (__threadid); +} + +static inline int +__gthread_equal (__gthread_t __t1, __gthread_t __t2) +{ + return __gthrw_pthread_equal (__t1, __t2); +} + +static inline __gthread_t +__gthread_self (void) +{ + return __gthrw_pthread_self (); +} + +static inline int +__gthread_yield (void) +{ + return __gthrw_sched_yield (); +} + +static inline int +__gthread_once (__gthread_once_t *__once, void (*__func) (void)) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_once (__once, __func); + else + return -1; +} + +static inline int +__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *)) +{ + return __gthrw_pthread_key_create (__key, __dtor); +} + +static inline int +__gthread_key_delete (__gthread_key_t __key) +{ + return __gthrw_pthread_key_delete (__key); +} + +static inline void * +__gthread_getspecific (__gthread_key_t __key) +{ + return __gthrw_pthread_getspecific (__key); +} + +static inline int +__gthread_setspecific (__gthread_key_t __key, const void *__ptr) +{ + return __gthrw_pthread_setspecific (__key, __ptr); +} + +static inline int +__gthread_mutex_destroy (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_destroy (__mutex); + else + return 0; +} + +static inline int +__gthread_mutex_lock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_lock (__mutex); + else + return 0; +} + +static inline int +__gthread_mutex_trylock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_trylock (__mutex); + else + return 0; +} + + + +static inline int +__gthread_mutex_timedlock (__gthread_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_timedlock (__mutex, __abs_timeout); + else + return 0; +} + + + +static inline int +__gthread_mutex_unlock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_unlock (__mutex); + else + return 0; +} +# 802 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr-default.h" 3 +static inline int +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_lock (__mutex); +} + +static inline int +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_trylock (__mutex); +} + + + +static inline int +__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return __gthread_mutex_timedlock (__mutex, __abs_timeout); +} + + + +static inline int +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_unlock (__mutex); +} + +static inline int +__gthread_cond_broadcast (__gthread_cond_t *__cond) +{ + return __gthrw_pthread_cond_broadcast (__cond); +} + +static inline int +__gthread_cond_signal (__gthread_cond_t *__cond) +{ + return __gthrw_pthread_cond_signal (__cond); +} + +static inline int +__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex) +{ + return __gthrw_pthread_cond_wait (__cond, __mutex); +} + +static inline int +__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return __gthrw_pthread_cond_timedwait (__cond, __mutex, __abs_timeout); +} + +static inline int +__gthread_cond_wait_recursive (__gthread_cond_t *__cond, + __gthread_recursive_mutex_t *__mutex) +{ + return __gthread_cond_wait (__cond, __mutex); +} + +static inline int +__gthread_cond_timedwait_recursive (__gthread_cond_t *__cond, + __gthread_recursive_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return __gthread_cond_timedwait (__cond, __mutex, __abs_timeout); +} + +static inline int +__gthread_cond_destroy (__gthread_cond_t* __cond) +{ + return __gthrw_pthread_cond_destroy (__cond); +} +# 163 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/gthr.h" 2 3 + + + + + + + +#pragma GCC visibility pop +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ext/atomicity.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/atomic_word.h" 1 3 +# 32 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/atomic_word.h" 3 +typedef int _Atomic_word; +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ext/atomicity.h" 2 3 + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) +{ + + + + + + + + static inline _Atomic_word + __exchange_and_add(volatile _Atomic_word* __mem, int __val) + { return __sync_fetch_and_add(__mem, __val); } + + static inline void + __atomic_add(volatile _Atomic_word* __mem, int __val) + { __sync_fetch_and_add(__mem, __val); } +# 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ext/atomicity.h" 3 + static inline _Atomic_word + __exchange_and_add_single(_Atomic_word* __mem, int __val) + { + _Atomic_word __result = *__mem; + *__mem += __val; + return __result; + } + + static inline void + __atomic_add_single(_Atomic_word* __mem, int __val) + { *__mem += __val; } + + static inline _Atomic_word + __attribute__ ((__unused__)) + __exchange_and_add_dispatch(_Atomic_word* __mem, int __val) + { + + if (__gthread_active_p()) + return __exchange_and_add(__mem, __val); + else + return __exchange_and_add_single(__mem, __val); + + + + } + + static inline void + __attribute__ ((__unused__)) + __atomic_add_dispatch(_Atomic_word* __mem, int __val) + { + + if (__gthread_active_p()) + __atomic_add(__mem, __val); + else + __atomic_add_single(__mem, __val); + + + + } + + +} +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 2 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/initializer_list" 1 3 +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/initializer_list" 3 + +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/initializer_list" 3 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 106 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + template + class basic_string + { + typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type; + + + public: + typedef _Traits traits_type; + typedef typename _Traits::char_type value_type; + typedef _Alloc allocator_type; + typedef typename _CharT_alloc_type::size_type size_type; + typedef typename _CharT_alloc_type::difference_type difference_type; + typedef typename _CharT_alloc_type::reference reference; + typedef typename _CharT_alloc_type::const_reference const_reference; + typedef typename _CharT_alloc_type::pointer pointer; + typedef typename _CharT_alloc_type::const_pointer const_pointer; + typedef __gnu_cxx::__normal_iterator iterator; + typedef __gnu_cxx::__normal_iterator + const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + + private: +# 143 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + struct _Rep_base + { + size_type _M_length; + size_type _M_capacity; + _Atomic_word _M_refcount; + }; + + struct _Rep : _Rep_base + { + + typedef typename _Alloc::template rebind::other _Raw_bytes_alloc; +# 168 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + static const size_type _S_max_size; + static const _CharT _S_terminal; + + + + static size_type _S_empty_rep_storage[]; + + static _Rep& + _S_empty_rep() + { + + + + void* __p = reinterpret_cast(&_S_empty_rep_storage); + return *reinterpret_cast<_Rep*>(__p); + } + + bool + _M_is_leaked() const + { return this->_M_refcount < 0; } + + bool + _M_is_shared() const + { return this->_M_refcount > 0; } + + void + _M_set_leaked() + { this->_M_refcount = -1; } + + void + _M_set_sharable() + { this->_M_refcount = 0; } + + void + _M_set_length_and_sharable(size_type __n) + { + + if (__builtin_expect(this != &_S_empty_rep(), false)) + + { + this->_M_set_sharable(); + this->_M_length = __n; + traits_type::assign(this->_M_refdata()[__n], _S_terminal); + + + } + } + + _CharT* + _M_refdata() throw() + { return reinterpret_cast<_CharT*>(this + 1); } + + _CharT* + _M_grab(const _Alloc& __alloc1, const _Alloc& __alloc2) + { + return (!_M_is_leaked() && __alloc1 == __alloc2) + ? _M_refcopy() : _M_clone(__alloc1); + } + + + static _Rep* + _S_create(size_type, size_type, const _Alloc&); + + void + _M_dispose(const _Alloc& __a) + { + + if (__builtin_expect(this != &_S_empty_rep(), false)) + + { + + ; + if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount, + -1) <= 0) + { + ; + _M_destroy(__a); + } + } + } + + void + _M_destroy(const _Alloc&) throw(); + + _CharT* + _M_refcopy() throw() + { + + if (__builtin_expect(this != &_S_empty_rep(), false)) + + __gnu_cxx::__atomic_add_dispatch(&this->_M_refcount, 1); + return _M_refdata(); + } + + _CharT* + _M_clone(const _Alloc&, size_type __res = 0); + }; + + + struct _Alloc_hider : _Alloc + { + _Alloc_hider(_CharT* __dat, const _Alloc& __a) + : _Alloc(__a), _M_p(__dat) { } + + _CharT* _M_p; + }; + + public: + + + + + static const size_type npos = static_cast(-1); + + private: + + mutable _Alloc_hider _M_dataplus; + + _CharT* + _M_data() const + { return _M_dataplus._M_p; } + + _CharT* + _M_data(_CharT* __p) + { return (_M_dataplus._M_p = __p); } + + _Rep* + _M_rep() const + { return &((reinterpret_cast<_Rep*> (_M_data()))[-1]); } + + + + iterator + _M_ibegin() const + { return iterator(_M_data()); } + + iterator + _M_iend() const + { return iterator(_M_data() + this->size()); } + + void + _M_leak() + { + if (!_M_rep()->_M_is_leaked()) + _M_leak_hard(); + } + + size_type + _M_check(size_type __pos, const char* __s) const + { + if (__pos > this->size()) + __throw_out_of_range((__s)); + return __pos; + } + + void + _M_check_length(size_type __n1, size_type __n2, const char* __s) const + { + if (this->max_size() - (this->size() - __n1) < __n2) + __throw_length_error((__s)); + } + + + size_type + _M_limit(size_type __pos, size_type __off) const + { + const bool __testoff = __off < this->size() - __pos; + return __testoff ? __off : this->size() - __pos; + } + + + bool + _M_disjunct(const _CharT* __s) const + { + return (less()(__s, _M_data()) + || less()(_M_data() + this->size(), __s)); + } + + + + static void + _M_copy(_CharT* __d, const _CharT* __s, size_type __n) + { + if (__n == 1) + traits_type::assign(*__d, *__s); + else + traits_type::copy(__d, __s, __n); + } + + static void + _M_move(_CharT* __d, const _CharT* __s, size_type __n) + { + if (__n == 1) + traits_type::assign(*__d, *__s); + else + traits_type::move(__d, __s, __n); + } + + static void + _M_assign(_CharT* __d, size_type __n, _CharT __c) + { + if (__n == 1) + traits_type::assign(*__d, __c); + else + traits_type::assign(__d, __n, __c); + } + + + + template + static void + _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) + { + for (; __k1 != __k2; ++__k1, ++__p) + traits_type::assign(*__p, *__k1); + } + + static void + _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) + { _S_copy_chars(__p, __k1.base(), __k2.base()); } + + static void + _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) + { _S_copy_chars(__p, __k1.base(), __k2.base()); } + + static void + _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) + { _M_copy(__p, __k1, __k2 - __k1); } + + static void + _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) + { _M_copy(__p, __k1, __k2 - __k1); } + + static int + _S_compare(size_type __n1, size_type __n2) + { + const difference_type __d = difference_type(__n1 - __n2); + + if (__d > __gnu_cxx::__numeric_traits::__max) + return __gnu_cxx::__numeric_traits::__max; + else if (__d < __gnu_cxx::__numeric_traits::__min) + return __gnu_cxx::__numeric_traits::__min; + else + return int(__d); + } + + void + _M_mutate(size_type __pos, size_type __len1, size_type __len2); + + void + _M_leak_hard(); + + static _Rep& + _S_empty_rep() + { return _Rep::_S_empty_rep(); } + + public: + + + + + + + + basic_string() + + : _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) { } + + + + + + + + explicit + basic_string(const _Alloc& __a); + + + + + + + basic_string(const basic_string& __str); + + + + + + + basic_string(const basic_string& __str, size_type __pos, + size_type __n = npos); + + + + + + + + basic_string(const basic_string& __str, size_type __pos, + size_type __n, const _Alloc& __a); +# 478 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string(const _CharT* __s, size_type __n, + const _Alloc& __a = _Alloc()); + + + + + + basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()); + + + + + + + basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()); +# 526 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + template + basic_string(_InputIterator __beg, _InputIterator __end, + const _Alloc& __a = _Alloc()); + + + + + ~basic_string() + { _M_rep()->_M_dispose(this->get_allocator()); } + + + + + + basic_string& + operator=(const basic_string& __str) + { return this->assign(__str); } + + + + + + basic_string& + operator=(const _CharT* __s) + { return this->assign(__s); } +# 559 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string& + operator=(_CharT __c) + { + this->assign(1, __c); + return *this; + } +# 599 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + iterator + begin() + { + _M_leak(); + return iterator(_M_data()); + } + + + + + + const_iterator + begin() const + { return const_iterator(_M_data()); } + + + + + + iterator + end() + { + _M_leak(); + return iterator(_M_data() + this->size()); + } + + + + + + const_iterator + end() const + { return const_iterator(_M_data() + this->size()); } + + + + + + + reverse_iterator + rbegin() + { return reverse_iterator(this->end()); } + + + + + + + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(this->end()); } + + + + + + + reverse_iterator + rend() + { return reverse_iterator(this->begin()); } + + + + + + + const_reverse_iterator + rend() const + { return const_reverse_iterator(this->begin()); } +# 705 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + public: + + + + size_type + size() const + { return _M_rep()->_M_length; } + + + + size_type + length() const + { return _M_rep()->_M_length; } + + + size_type + max_size() const + { return _Rep::_S_max_size; } +# 734 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + void + resize(size_type __n, _CharT __c); +# 747 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + void + resize(size_type __n) + { this->resize(__n, _CharT()); } +# 767 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + capacity() const + { return _M_rep()->_M_capacity; } +# 788 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + void + reserve(size_type __res_arg = 0); + + + + + void + clear() + { _M_mutate(0, this->size(), 0); } + + + + + + bool + empty() const + { return this->size() == 0; } +# 817 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + const_reference + operator[] (size_type __pos) const + { + ; + return _M_data()[__pos]; + } +# 834 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + reference + operator[](size_type __pos) + { + + ; + + ; + _M_leak(); + return _M_data()[__pos]; + } +# 855 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + const_reference + at(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range(("basic_string::at")); + return _M_data()[__n]; + } +# 908 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + reference + at(size_type __n) + { + if (__n >= size()) + __throw_out_of_range(("basic_string::at")); + _M_leak(); + return _M_data()[__n]; + } + + + + + + + + basic_string& + operator+=(const basic_string& __str) + { return this->append(__str); } + + + + + + + basic_string& + operator+=(const _CharT* __s) + { return this->append(__s); } + + + + + + + basic_string& + operator+=(_CharT __c) + { + this->push_back(__c); + return *this; + } +# 964 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string& + append(const basic_string& __str); +# 979 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string& + append(const basic_string& __str, size_type __pos, size_type __n); + + + + + + + + basic_string& + append(const _CharT* __s, size_type __n); + + + + + + + basic_string& + append(const _CharT* __s) + { + ; + return this->append(__s, traits_type::length(__s)); + } +# 1011 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string& + append(size_type __n, _CharT __c); +# 1033 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + template + basic_string& + append(_InputIterator __first, _InputIterator __last) + { return this->replace(_M_iend(), _M_iend(), __first, __last); } + + + + + + void + push_back(_CharT __c) + { + const size_type __len = 1 + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + this->reserve(__len); + traits_type::assign(_M_data()[this->size()], __c); + _M_rep()->_M_set_length_and_sharable(__len); + } + + + + + + + basic_string& + assign(const basic_string& __str); +# 1089 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string& + assign(const basic_string& __str, size_type __pos, size_type __n) + { return this->assign(__str._M_data() + + __str._M_check(__pos, "basic_string::assign"), + __str._M_limit(__pos, __n)); } +# 1105 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string& + assign(const _CharT* __s, size_type __n); +# 1117 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string& + assign(const _CharT* __s) + { + ; + return this->assign(__s, traits_type::length(__s)); + } +# 1133 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string& + assign(size_type __n, _CharT __c) + { return _M_replace_aux(size_type(0), this->size(), __n, __c); } +# 1145 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + template + basic_string& + assign(_InputIterator __first, _InputIterator __last) + { return this->replace(_M_ibegin(), _M_iend(), __first, __last); } +# 1173 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + void + insert(iterator __p, size_type __n, _CharT __c) + { this->replace(__p, __p, __n, __c); } +# 1188 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + template + void + insert(iterator __p, _InputIterator __beg, _InputIterator __end) + { this->replace(__p, __p, __beg, __end); } +# 1219 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos1, const basic_string& __str) + { return this->insert(__pos1, __str, size_type(0), __str.size()); } +# 1241 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos1, const basic_string& __str, + size_type __pos2, size_type __n) + { return this->insert(__pos1, __str._M_data() + + __str._M_check(__pos2, "basic_string::insert"), + __str._M_limit(__pos2, __n)); } +# 1264 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos, const _CharT* __s, size_type __n); +# 1282 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos, const _CharT* __s) + { + ; + return this->insert(__pos, __s, traits_type::length(__s)); + } +# 1305 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string& + insert(size_type __pos, size_type __n, _CharT __c) + { return _M_replace_aux(_M_check(__pos, "basic_string::insert"), + size_type(0), __n, __c); } +# 1322 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + iterator + insert(iterator __p, _CharT __c) + { + ; + const size_type __pos = __p - _M_ibegin(); + _M_replace_aux(__pos, size_type(0), size_type(1), __c); + _M_rep()->_M_set_leaked(); + return iterator(_M_data() + __pos); + } +# 1346 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string& + erase(size_type __pos = 0, size_type __n = npos) + { + _M_mutate(_M_check(__pos, "basic_string::erase"), + _M_limit(__pos, __n), size_type(0)); + return *this; + } +# 1362 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + iterator + erase(iterator __position) + { + + ; + const size_type __pos = __position - _M_ibegin(); + _M_mutate(__pos, size_type(1), size_type(0)); + _M_rep()->_M_set_leaked(); + return iterator(_M_data() + __pos); + } +# 1382 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + iterator + erase(iterator __first, iterator __last); +# 1401 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos, size_type __n, const basic_string& __str) + { return this->replace(__pos, __n, __str._M_data(), __str.size()); } +# 1423 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2) + { return this->replace(__pos1, __n1, __str._M_data() + + __str._M_check(__pos2, "basic_string::replace"), + __str._M_limit(__pos2, __n2)); } +# 1447 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2); +# 1466 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos, size_type __n1, const _CharT* __s) + { + ; + return this->replace(__pos, __n1, __s, traits_type::length(__s)); + } +# 1489 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) + { return _M_replace_aux(_M_check(__pos, "basic_string::replace"), + _M_limit(__pos, __n1), __n2, __c); } +# 1507 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(iterator __i1, iterator __i2, const basic_string& __str) + { return this->replace(__i1, __i2, __str._M_data(), __str.size()); } +# 1525 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n) + { + + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n); + } +# 1546 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(iterator __i1, iterator __i2, const _CharT* __s) + { + ; + return this->replace(__i1, __i2, __s, traits_type::length(__s)); + } +# 1567 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string& + replace(iterator __i1, iterator __i2, size_type __n, _CharT __c) + { + + ; + return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c); + } +# 1589 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + template + basic_string& + replace(iterator __i1, iterator __i2, + _InputIterator __k1, _InputIterator __k2) + { + + ; + ; + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral()); + } + + + + basic_string& + replace(iterator __i1, iterator __i2, _CharT* __k1, _CharT* __k2) + { + + ; + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, + __k1, __k2 - __k1); + } + + basic_string& + replace(iterator __i1, iterator __i2, + const _CharT* __k1, const _CharT* __k2) + { + + ; + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, + __k1, __k2 - __k1); + } + + basic_string& + replace(iterator __i1, iterator __i2, iterator __k1, iterator __k2) + { + + ; + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, + __k1.base(), __k2 - __k1); + } + + basic_string& + replace(iterator __i1, iterator __i2, + const_iterator __k1, const_iterator __k2) + { + + ; + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, + __k1.base(), __k2 - __k1); + } +# 1664 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + private: + template + basic_string& + _M_replace_dispatch(iterator __i1, iterator __i2, _Integer __n, + _Integer __val, __true_type) + { return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __val); } + + template + basic_string& + _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, + _InputIterator __k2, __false_type); + + basic_string& + _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, + _CharT __c); + + basic_string& + _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, + size_type __n2); + + + + template + static _CharT* + _S_construct_aux(_InIterator __beg, _InIterator __end, + const _Alloc& __a, __false_type) + { + typedef typename iterator_traits<_InIterator>::iterator_category _Tag; + return _S_construct(__beg, __end, __a, _Tag()); + } + + + + template + static _CharT* + _S_construct_aux(_Integer __beg, _Integer __end, + const _Alloc& __a, __true_type) + { return _S_construct_aux_2(static_cast(__beg), + __end, __a); } + + static _CharT* + _S_construct_aux_2(size_type __req, _CharT __c, const _Alloc& __a) + { return _S_construct(__req, __c, __a); } + + template + static _CharT* + _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a) + { + typedef typename std::__is_integer<_InIterator>::__type _Integral; + return _S_construct_aux(__beg, __end, __a, _Integral()); + } + + + template + static _CharT* + _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, + input_iterator_tag); + + + + template + static _CharT* + _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a, + forward_iterator_tag); + + static _CharT* + _S_construct(size_type __req, _CharT __c, const _Alloc& __a); + + public: +# 1745 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + copy(_CharT* __s, size_type __n, size_type __pos = 0) const; +# 1755 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + void + swap(basic_string& __s); +# 1765 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + const _CharT* + c_str() const + { return _M_data(); } + + + + + + + + const _CharT* + data() const + { return _M_data(); } + + + + + allocator_type + get_allocator() const + { return _M_dataplus; } +# 1797 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + find(const _CharT* __s, size_type __pos, size_type __n) const; +# 1810 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + find(const basic_string& __str, size_type __pos = 0) const + { return this->find(__str.data(), __pos, __str.size()); } +# 1824 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + find(const _CharT* __s, size_type __pos = 0) const + { + ; + return this->find(__s, __pos, traits_type::length(__s)); + } +# 1841 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + find(_CharT __c, size_type __pos = 0) const; +# 1854 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + rfind(const basic_string& __str, size_type __pos = npos) const + { return this->rfind(__str.data(), __pos, __str.size()); } +# 1869 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + rfind(const _CharT* __s, size_type __pos, size_type __n) const; +# 1882 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + rfind(const _CharT* __s, size_type __pos = npos) const + { + ; + return this->rfind(__s, __pos, traits_type::length(__s)); + } +# 1899 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + rfind(_CharT __c, size_type __pos = npos) const; +# 1912 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + find_first_of(const basic_string& __str, size_type __pos = 0) const + { return this->find_first_of(__str.data(), __pos, __str.size()); } +# 1927 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + find_first_of(const _CharT* __s, size_type __pos, size_type __n) const; +# 1940 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + find_first_of(const _CharT* __s, size_type __pos = 0) const + { + ; + return this->find_first_of(__s, __pos, traits_type::length(__s)); + } +# 1959 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + find_first_of(_CharT __c, size_type __pos = 0) const + { return this->find(__c, __pos); } +# 1973 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + find_last_of(const basic_string& __str, size_type __pos = npos) const + { return this->find_last_of(__str.data(), __pos, __str.size()); } +# 1988 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + find_last_of(const _CharT* __s, size_type __pos, size_type __n) const; +# 2001 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + find_last_of(const _CharT* __s, size_type __pos = npos) const + { + ; + return this->find_last_of(__s, __pos, traits_type::length(__s)); + } +# 2020 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + find_last_of(_CharT __c, size_type __pos = npos) const + { return this->rfind(__c, __pos); } +# 2034 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + find_first_not_of(const basic_string& __str, size_type __pos = 0) const + { return this->find_first_not_of(__str.data(), __pos, __str.size()); } +# 2049 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + find_first_not_of(const _CharT* __s, size_type __pos, + size_type __n) const; +# 2063 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + find_first_not_of(const _CharT* __s, size_type __pos = 0) const + { + ; + return this->find_first_not_of(__s, __pos, traits_type::length(__s)); + } +# 2080 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + find_first_not_of(_CharT __c, size_type __pos = 0) const; +# 2093 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + find_last_not_of(const basic_string& __str, size_type __pos = npos) const + { return this->find_last_not_of(__str.data(), __pos, __str.size()); } +# 2109 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + find_last_not_of(const _CharT* __s, size_type __pos, + size_type __n) const; +# 2122 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + find_last_not_of(const _CharT* __s, size_type __pos = npos) const + { + ; + return this->find_last_not_of(__s, __pos, traits_type::length(__s)); + } +# 2139 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + size_type + find_last_not_of(_CharT __c, size_type __pos = npos) const; +# 2154 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + basic_string + substr(size_type __pos = 0, size_type __n = npos) const + { return basic_string(*this, + _M_check(__pos, "basic_string::substr"), __n); } +# 2172 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + int + compare(const basic_string& __str) const + { + const size_type __size = this->size(); + const size_type __osize = __str.size(); + const size_type __len = std::min(__size, __osize); + + int __r = traits_type::compare(_M_data(), __str.data(), __len); + if (!__r) + __r = _S_compare(__size, __osize); + return __r; + } +# 2202 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + int + compare(size_type __pos, size_type __n, const basic_string& __str) const; +# 2226 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + int + compare(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2) const; +# 2244 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + int + compare(const _CharT* __s) const; +# 2267 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + int + compare(size_type __pos, size_type __n1, const _CharT* __s) const; +# 2292 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + int + compare(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) const; + }; +# 2304 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + template + basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + basic_string<_CharT, _Traits, _Alloc> __str(__lhs); + __str.append(__rhs); + return __str; + } + + + + + + + + template + basic_string<_CharT,_Traits,_Alloc> + operator+(const _CharT* __lhs, + const basic_string<_CharT,_Traits,_Alloc>& __rhs); + + + + + + + + template + basic_string<_CharT,_Traits,_Alloc> + operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); + + + + + + + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { + basic_string<_CharT, _Traits, _Alloc> __str(__lhs); + __str.append(__rhs); + return __str; + } + + + + + + + + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) + { + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + __string_type __str(__lhs); + __str.append(__size_type(1), __rhs); + return __str; + } +# 2425 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + template + inline bool + operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) == 0; } + + template + inline + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, bool>::__type + operator==(const basic_string<_CharT>& __lhs, + const basic_string<_CharT>& __rhs) + { return (__lhs.size() == __rhs.size() + && !std::char_traits<_CharT>::compare(__lhs.data(), __rhs.data(), + __lhs.size())); } + + + + + + + + template + inline bool + operator==(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) == 0; } + + + + + + + + template + inline bool + operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) == 0; } +# 2471 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + template + inline bool + operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return !(__lhs == __rhs); } + + + + + + + + template + inline bool + operator!=(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return !(__lhs == __rhs); } + + + + + + + + template + inline bool + operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return !(__lhs == __rhs); } +# 2508 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + template + inline bool + operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) < 0; } + + + + + + + + template + inline bool + operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) < 0; } + + + + + + + + template + inline bool + operator<(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) > 0; } +# 2545 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + template + inline bool + operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) > 0; } + + + + + + + + template + inline bool + operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) > 0; } + + + + + + + + template + inline bool + operator>(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) < 0; } +# 2582 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + template + inline bool + operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) <= 0; } + + + + + + + + template + inline bool + operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) <= 0; } + + + + + + + + template + inline bool + operator<=(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) >= 0; } +# 2619 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + template + inline bool + operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) >= 0; } + + + + + + + + template + inline bool + operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) >= 0; } + + + + + + + + template + inline bool + operator>=(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) <= 0; } +# 2656 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + template + inline void + swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, + basic_string<_CharT, _Traits, _Alloc>& __rhs) + { __lhs.swap(__rhs); } +# 2673 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str); + + template<> + basic_istream& + operator>>(basic_istream& __is, basic_string& __str); +# 2691 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, + const basic_string<_CharT, _Traits, _Alloc>& __str) + { + + + return __ostream_insert(__os, __str.data(), __str.size()); + } +# 2714 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + template + basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim); +# 2732 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.h" 3 + template + inline basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str) + { return getline(__is, __str, __is.widen('\n')); } + + template<> + basic_istream& + getline(basic_istream& __in, basic_string& __str, + char __delim); + + + template<> + basic_istream& + getline(basic_istream& __in, basic_string& __str, + wchar_t __delim); + + + +} +# 55 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/string" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.tcc" 1 3 +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.tcc" 3 + +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.tcc" 3 + + + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + template + const typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + _Rep::_S_max_size = (((npos - sizeof(_Rep_base))/sizeof(_CharT)) - 1) / 4; + + template + const _CharT + basic_string<_CharT, _Traits, _Alloc>:: + _Rep::_S_terminal = _CharT(); + + template + const typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>::npos; + + + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_empty_rep_storage[ + (sizeof(_Rep_base) + sizeof(_CharT) + sizeof(size_type) - 1) / + sizeof(size_type)]; + + + + + + template + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>:: + _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, + input_iterator_tag) + { + + if (__beg == __end && __a == _Alloc()) + return _S_empty_rep()._M_refdata(); + + + _CharT __buf[128]; + size_type __len = 0; + while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT)) + { + __buf[__len++] = *__beg; + ++__beg; + } + _Rep* __r = _Rep::_S_create(__len, size_type(0), __a); + _M_copy(__r->_M_refdata(), __buf, __len); + try + { + while (__beg != __end) + { + if (__len == __r->_M_capacity) + { + + _Rep* __another = _Rep::_S_create(__len + 1, __len, __a); + _M_copy(__another->_M_refdata(), __r->_M_refdata(), __len); + __r->_M_destroy(__a); + __r = __another; + } + __r->_M_refdata()[__len++] = *__beg; + ++__beg; + } + } + catch(...) + { + __r->_M_destroy(__a); + throw; + } + __r->_M_set_length_and_sharable(__len); + return __r->_M_refdata(); + } + + template + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>:: + _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, + forward_iterator_tag) + { + + if (__beg == __end && __a == _Alloc()) + return _S_empty_rep()._M_refdata(); + + + if (__gnu_cxx::__is_null_pointer(__beg) && __beg != __end) + __throw_logic_error(("basic_string::_S_construct null not valid")); + + const size_type __dnew = static_cast(std::distance(__beg, + __end)); + + _Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a); + try + { _S_copy_chars(__r->_M_refdata(), __beg, __end); } + catch(...) + { + __r->_M_destroy(__a); + throw; + } + __r->_M_set_length_and_sharable(__dnew); + return __r->_M_refdata(); + } + + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>:: + _S_construct(size_type __n, _CharT __c, const _Alloc& __a) + { + + if (__n == 0 && __a == _Alloc()) + return _S_empty_rep()._M_refdata(); + + + _Rep* __r = _Rep::_S_create(__n, size_type(0), __a); + if (__n) + _M_assign(__r->_M_refdata(), __n, __c); + + __r->_M_set_length_and_sharable(__n); + return __r->_M_refdata(); + } + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const basic_string& __str) + : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(__str.get_allocator()), + __str.get_allocator()), + __str.get_allocator()) + { } + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const _Alloc& __a) + : _M_dataplus(_S_construct(size_type(), _CharT(), __a), __a) + { } + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const basic_string& __str, size_type __pos, size_type __n) + : _M_dataplus(_S_construct(__str._M_data() + + __str._M_check(__pos, + "basic_string::basic_string"), + __str._M_data() + __str._M_limit(__pos, __n) + + __pos, _Alloc()), _Alloc()) + { } + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const basic_string& __str, size_type __pos, + size_type __n, const _Alloc& __a) + : _M_dataplus(_S_construct(__str._M_data() + + __str._M_check(__pos, + "basic_string::basic_string"), + __str._M_data() + __str._M_limit(__pos, __n) + + __pos, __a), __a) + { } + + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const _CharT* __s, size_type __n, const _Alloc& __a) + : _M_dataplus(_S_construct(__s, __s + __n, __a), __a) + { } + + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const _CharT* __s, const _Alloc& __a) + : _M_dataplus(_S_construct(__s, __s ? __s + traits_type::length(__s) : + __s + npos, __a), __a) + { } + + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(size_type __n, _CharT __c, const _Alloc& __a) + : _M_dataplus(_S_construct(__n, __c, __a), __a) + { } + + + template + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a) + : _M_dataplus(_S_construct(__beg, __end, __a), __a) + { } +# 242 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.tcc" 3 + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + assign(const basic_string& __str) + { + if (_M_rep() != __str._M_rep()) + { + + const allocator_type __a = this->get_allocator(); + _CharT* __tmp = __str._M_rep()->_M_grab(__a, __str.get_allocator()); + _M_rep()->_M_dispose(__a); + _M_data(__tmp); + } + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + assign(const _CharT* __s, size_type __n) + { + ; + _M_check_length(this->size(), __n, "basic_string::assign"); + if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) + return _M_replace_safe(size_type(0), this->size(), __s, __n); + else + { + + const size_type __pos = __s - _M_data(); + if (__pos >= __n) + _M_copy(_M_data(), __s, __n); + else if (__pos) + _M_move(_M_data(), __s, __n); + _M_rep()->_M_set_length_and_sharable(__n); + return *this; + } + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + append(size_type __n, _CharT __c) + { + if (__n) + { + _M_check_length(size_type(0), __n, "basic_string::append"); + const size_type __len = __n + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + this->reserve(__len); + _M_assign(_M_data() + this->size(), __n, __c); + _M_rep()->_M_set_length_and_sharable(__len); + } + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + append(const _CharT* __s, size_type __n) + { + ; + if (__n) + { + _M_check_length(size_type(0), __n, "basic_string::append"); + const size_type __len = __n + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + { + if (_M_disjunct(__s)) + this->reserve(__len); + else + { + const size_type __off = __s - _M_data(); + this->reserve(__len); + __s = _M_data() + __off; + } + } + _M_copy(_M_data() + this->size(), __s, __n); + _M_rep()->_M_set_length_and_sharable(__len); + } + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + append(const basic_string& __str) + { + const size_type __size = __str.size(); + if (__size) + { + const size_type __len = __size + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + this->reserve(__len); + _M_copy(_M_data() + this->size(), __str._M_data(), __size); + _M_rep()->_M_set_length_and_sharable(__len); + } + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + append(const basic_string& __str, size_type __pos, size_type __n) + { + __str._M_check(__pos, "basic_string::append"); + __n = __str._M_limit(__pos, __n); + if (__n) + { + const size_type __len = __n + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + this->reserve(__len); + _M_copy(_M_data() + this->size(), __str._M_data() + __pos, __n); + _M_rep()->_M_set_length_and_sharable(__len); + } + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + insert(size_type __pos, const _CharT* __s, size_type __n) + { + ; + _M_check(__pos, "basic_string::insert"); + _M_check_length(size_type(0), __n, "basic_string::insert"); + if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) + return _M_replace_safe(__pos, size_type(0), __s, __n); + else + { + + const size_type __off = __s - _M_data(); + _M_mutate(__pos, 0, __n); + __s = _M_data() + __off; + _CharT* __p = _M_data() + __pos; + if (__s + __n <= __p) + _M_copy(__p, __s, __n); + else if (__s >= __p) + _M_copy(__p, __s + __n, __n); + else + { + const size_type __nleft = __p - __s; + _M_copy(__p, __s, __nleft); + _M_copy(__p + __nleft, __p + __n, __n - __nleft); + } + return *this; + } + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::iterator + basic_string<_CharT, _Traits, _Alloc>:: + erase(iterator __first, iterator __last) + { + + ; + + + + + const size_type __size = __last - __first; + if (__size) + { + const size_type __pos = __first - _M_ibegin(); + _M_mutate(__pos, __size, size_type(0)); + _M_rep()->_M_set_leaked(); + return iterator(_M_data() + __pos); + } + else + return __first; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + replace(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) + { + ; + _M_check(__pos, "basic_string::replace"); + __n1 = _M_limit(__pos, __n1); + _M_check_length(__n1, __n2, "basic_string::replace"); + bool __left; + if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) + return _M_replace_safe(__pos, __n1, __s, __n2); + else if ((__left = __s + __n2 <= _M_data() + __pos) + || _M_data() + __pos + __n1 <= __s) + { + + size_type __off = __s - _M_data(); + __left ? __off : (__off += __n2 - __n1); + _M_mutate(__pos, __n1, __n2); + _M_copy(_M_data() + __pos, _M_data() + __off, __n2); + return *this; + } + else + { + + const basic_string __tmp(__s, __n2); + return _M_replace_safe(__pos, __n1, __tmp._M_data(), __n2); + } + } + + template + void + basic_string<_CharT, _Traits, _Alloc>::_Rep:: + _M_destroy(const _Alloc& __a) throw () + { + const size_type __size = sizeof(_Rep_base) + + (this->_M_capacity + 1) * sizeof(_CharT); + _Raw_bytes_alloc(__a).deallocate(reinterpret_cast(this), __size); + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_leak_hard() + { + + if (_M_rep() == &_S_empty_rep()) + return; + + if (_M_rep()->_M_is_shared()) + _M_mutate(0, 0, 0); + _M_rep()->_M_set_leaked(); + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_mutate(size_type __pos, size_type __len1, size_type __len2) + { + const size_type __old_size = this->size(); + const size_type __new_size = __old_size + __len2 - __len1; + const size_type __how_much = __old_size - __pos - __len1; + + if (__new_size > this->capacity() || _M_rep()->_M_is_shared()) + { + + const allocator_type __a = get_allocator(); + _Rep* __r = _Rep::_S_create(__new_size, this->capacity(), __a); + + if (__pos) + _M_copy(__r->_M_refdata(), _M_data(), __pos); + if (__how_much) + _M_copy(__r->_M_refdata() + __pos + __len2, + _M_data() + __pos + __len1, __how_much); + + _M_rep()->_M_dispose(__a); + _M_data(__r->_M_refdata()); + } + else if (__how_much && __len1 != __len2) + { + + _M_move(_M_data() + __pos + __len2, + _M_data() + __pos + __len1, __how_much); + } + _M_rep()->_M_set_length_and_sharable(__new_size); + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + reserve(size_type __res) + { + if (__res != this->capacity() || _M_rep()->_M_is_shared()) + { + + if (__res < this->size()) + __res = this->size(); + const allocator_type __a = get_allocator(); + _CharT* __tmp = _M_rep()->_M_clone(__a, __res - this->size()); + _M_rep()->_M_dispose(__a); + _M_data(__tmp); + } + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + swap(basic_string& __s) + { + if (_M_rep()->_M_is_leaked()) + _M_rep()->_M_set_sharable(); + if (__s._M_rep()->_M_is_leaked()) + __s._M_rep()->_M_set_sharable(); + if (this->get_allocator() == __s.get_allocator()) + { + _CharT* __tmp = _M_data(); + _M_data(__s._M_data()); + __s._M_data(__tmp); + } + + else + { + const basic_string __tmp1(_M_ibegin(), _M_iend(), + __s.get_allocator()); + const basic_string __tmp2(__s._M_ibegin(), __s._M_iend(), + this->get_allocator()); + *this = __tmp2; + __s = __tmp1; + } + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::_Rep* + basic_string<_CharT, _Traits, _Alloc>::_Rep:: + _S_create(size_type __capacity, size_type __old_capacity, + const _Alloc& __alloc) + { + + + if (__capacity > _S_max_size) + __throw_length_error(("basic_string::_S_create")); +# 579 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_string.tcc" 3 + const size_type __pagesize = 4096; + const size_type __malloc_header_size = 4 * sizeof(void*); + + + + + + + + if (__capacity > __old_capacity && __capacity < 2 * __old_capacity) + __capacity = 2 * __old_capacity; + + + + + size_type __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); + + const size_type __adj_size = __size + __malloc_header_size; + if (__adj_size > __pagesize && __capacity > __old_capacity) + { + const size_type __extra = __pagesize - __adj_size % __pagesize; + __capacity += __extra / sizeof(_CharT); + + if (__capacity > _S_max_size) + __capacity = _S_max_size; + __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); + } + + + + void* __place = _Raw_bytes_alloc(__alloc).allocate(__size); + _Rep *__p = new (__place) _Rep; + __p->_M_capacity = __capacity; + + + + + + + + __p->_M_set_sharable(); + return __p; + } + + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>::_Rep:: + _M_clone(const _Alloc& __alloc, size_type __res) + { + + const size_type __requested_cap = this->_M_length + __res; + _Rep* __r = _Rep::_S_create(__requested_cap, this->_M_capacity, + __alloc); + if (this->_M_length) + _M_copy(__r->_M_refdata(), _M_refdata(), this->_M_length); + + __r->_M_set_length_and_sharable(this->_M_length); + return __r->_M_refdata(); + } + + template + void + basic_string<_CharT, _Traits, _Alloc>:: + resize(size_type __n, _CharT __c) + { + const size_type __size = this->size(); + _M_check_length(__size, __n, "basic_string::resize"); + if (__size < __n) + this->append(__n - __size, __c); + else if (__n < __size) + this->erase(__n); + + } + + template + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, + _InputIterator __k2, __false_type) + { + const basic_string __s(__k1, __k2); + const size_type __n1 = __i2 - __i1; + _M_check_length(__n1, __s.size(), "basic_string::_M_replace_dispatch"); + return _M_replace_safe(__i1 - _M_ibegin(), __n1, __s._M_data(), + __s.size()); + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, + _CharT __c) + { + _M_check_length(__n1, __n2, "basic_string::_M_replace_aux"); + _M_mutate(__pos1, __n1, __n2); + if (__n2) + _M_assign(_M_data() + __pos1, __n2, __c); + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, + size_type __n2) + { + _M_mutate(__pos1, __n1, __n2); + if (__n2) + _M_copy(_M_data() + __pos1, __s, __n2); + return *this; + } + + template + basic_string<_CharT, _Traits, _Alloc> + operator+(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + ; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + const __size_type __len = _Traits::length(__lhs); + __string_type __str; + __str.reserve(__len + __rhs.size()); + __str.append(__lhs, __len); + __str.append(__rhs); + return __str; + } + + template + basic_string<_CharT, _Traits, _Alloc> + operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + __string_type __str; + const __size_type __len = __rhs.size(); + __str.reserve(__len + 1); + __str.append(__size_type(1), __lhs); + __str.append(__rhs); + return __str; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + copy(_CharT* __s, size_type __n, size_type __pos) const + { + _M_check(__pos, "basic_string::copy"); + __n = _M_limit(__pos, __n); + ; + if (__n) + _M_copy(__s, _M_data() + __pos, __n); + + return __n; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + const size_type __size = this->size(); + const _CharT* __data = _M_data(); + + if (__n == 0) + return __pos <= __size ? __pos : npos; + + if (__n <= __size) + { + for (; __pos <= __size - __n; ++__pos) + if (traits_type::eq(__data[__pos], __s[0]) + && traits_type::compare(__data + __pos + 1, + __s + 1, __n - 1) == 0) + return __pos; + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find(_CharT __c, size_type __pos) const + { + size_type __ret = npos; + const size_type __size = this->size(); + if (__pos < __size) + { + const _CharT* __data = _M_data(); + const size_type __n = __size - __pos; + const _CharT* __p = traits_type::find(__data + __pos, __n, __c); + if (__p) + __ret = __p - __data; + } + return __ret; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + rfind(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + const size_type __size = this->size(); + if (__n <= __size) + { + __pos = std::min(size_type(__size - __n), __pos); + const _CharT* __data = _M_data(); + do + { + if (traits_type::compare(__data + __pos, __s, __n) == 0) + return __pos; + } + while (__pos-- > 0); + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + rfind(_CharT __c, size_type __pos) const + { + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + for (++__size; __size-- > 0; ) + if (traits_type::eq(_M_data()[__size], __c)) + return __size; + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_of(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + for (; __n && __pos < this->size(); ++__pos) + { + const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]); + if (__p) + return __pos; + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_of(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + size_type __size = this->size(); + if (__size && __n) + { + if (--__size > __pos) + __size = __pos; + do + { + if (traits_type::find(__s, __n, _M_data()[__size])) + return __size; + } + while (__size-- != 0); + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + for (; __pos < this->size(); ++__pos) + if (!traits_type::find(__s, __n, _M_data()[__pos])) + return __pos; + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_not_of(_CharT __c, size_type __pos) const + { + for (; __pos < this->size(); ++__pos) + if (!traits_type::eq(_M_data()[__pos], __c)) + return __pos; + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + do + { + if (!traits_type::find(__s, __n, _M_data()[__size])) + return __size; + } + while (__size--); + } + return npos; + } + + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_not_of(_CharT __c, size_type __pos) const + { + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + do + { + if (!traits_type::eq(_M_data()[__size], __c)) + return __size; + } + while (__size--); + } + return npos; + } + + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n, const basic_string& __str) const + { + _M_check(__pos, "basic_string::compare"); + __n = _M_limit(__pos, __n); + const size_type __osize = __str.size(); + const size_type __len = std::min(__n, __osize); + int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len); + if (!__r) + __r = _S_compare(__n, __osize); + return __r; + } + + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2) const + { + _M_check(__pos1, "basic_string::compare"); + __str._M_check(__pos2, "basic_string::compare"); + __n1 = _M_limit(__pos1, __n1); + __n2 = __str._M_limit(__pos2, __n2); + const size_type __len = std::min(__n1, __n2); + int __r = traits_type::compare(_M_data() + __pos1, + __str.data() + __pos2, __len); + if (!__r) + __r = _S_compare(__n1, __n2); + return __r; + } + + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(const _CharT* __s) const + { + ; + const size_type __size = this->size(); + const size_type __osize = traits_type::length(__s); + const size_type __len = std::min(__size, __osize); + int __r = traits_type::compare(_M_data(), __s, __len); + if (!__r) + __r = _S_compare(__size, __osize); + return __r; + } + + template + int + basic_string <_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n1, const _CharT* __s) const + { + ; + _M_check(__pos, "basic_string::compare"); + __n1 = _M_limit(__pos, __n1); + const size_type __osize = traits_type::length(__s); + const size_type __len = std::min(__n1, __osize); + int __r = traits_type::compare(_M_data() + __pos, __s, __len); + if (!__r) + __r = _S_compare(__n1, __osize); + return __r; + } + + template + int + basic_string <_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) const + { + ; + _M_check(__pos, "basic_string::compare"); + __n1 = _M_limit(__pos, __n1); + const size_type __len = std::min(__n1, __n2); + int __r = traits_type::compare(_M_data() + __pos, __s, __len); + if (!__r) + __r = _S_compare(__n1, __n2); + return __r; + } + + + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, + basic_string<_CharT, _Traits, _Alloc>& __str) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __istream_type::ios_base __ios_base; + typedef typename __istream_type::int_type __int_type; + typedef typename __string_type::size_type __size_type; + typedef ctype<_CharT> __ctype_type; + typedef typename __ctype_type::ctype_base __ctype_base; + + __size_type __extracted = 0; + typename __ios_base::iostate __err = __ios_base::goodbit; + typename __istream_type::sentry __cerb(__in, false); + if (__cerb) + { + try + { + + __str.erase(); + _CharT __buf[128]; + __size_type __len = 0; + const streamsize __w = __in.width(); + const __size_type __n = __w > 0 ? static_cast<__size_type>(__w) + : __str.max_size(); + const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); + const __int_type __eof = _Traits::eof(); + __int_type __c = __in.rdbuf()->sgetc(); + + while (__extracted < __n + && !_Traits::eq_int_type(__c, __eof) + && !__ct.is(__ctype_base::space, + _Traits::to_char_type(__c))) + { + if (__len == sizeof(__buf) / sizeof(_CharT)) + { + __str.append(__buf, sizeof(__buf) / sizeof(_CharT)); + __len = 0; + } + __buf[__len++] = _Traits::to_char_type(__c); + ++__extracted; + __c = __in.rdbuf()->snextc(); + } + __str.append(__buf, __len); + + if (_Traits::eq_int_type(__c, __eof)) + __err |= __ios_base::eofbit; + __in.width(0); + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { + + + + __in._M_setstate(__ios_base::badbit); + } + } + + if (!__extracted) + __err |= __ios_base::failbit; + if (__err) + __in.setstate(__err); + return __in; + } + + template + basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __in, + basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __istream_type::ios_base __ios_base; + typedef typename __istream_type::int_type __int_type; + typedef typename __string_type::size_type __size_type; + + __size_type __extracted = 0; + const __size_type __n = __str.max_size(); + typename __ios_base::iostate __err = __ios_base::goodbit; + typename __istream_type::sentry __cerb(__in, true); + if (__cerb) + { + try + { + __str.erase(); + const __int_type __idelim = _Traits::to_int_type(__delim); + const __int_type __eof = _Traits::eof(); + __int_type __c = __in.rdbuf()->sgetc(); + + while (__extracted < __n + && !_Traits::eq_int_type(__c, __eof) + && !_Traits::eq_int_type(__c, __idelim)) + { + __str += _Traits::to_char_type(__c); + ++__extracted; + __c = __in.rdbuf()->snextc(); + } + + if (_Traits::eq_int_type(__c, __eof)) + __err |= __ios_base::eofbit; + else if (_Traits::eq_int_type(__c, __idelim)) + { + ++__extracted; + __in.rdbuf()->sbumpc(); + } + else + __err |= __ios_base::failbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { + + + + __in._M_setstate(__ios_base::badbit); + } + } + if (!__extracted) + __err |= __ios_base::failbit; + if (__err) + __in.setstate(__err); + return __in; + } + + + + + extern template class basic_string; + extern template + basic_istream& + operator>>(basic_istream&, string&); + extern template + basic_ostream& + operator<<(basic_ostream&, const string&); + extern template + basic_istream& + getline(basic_istream&, string&, char); + extern template + basic_istream& + getline(basic_istream&, string&); + + + extern template class basic_string; + extern template + basic_istream& + operator>>(basic_istream&, wstring&); + extern template + basic_ostream& + operator<<(basic_ostream&, const wstring&); + extern template + basic_istream& + getline(basic_istream&, wstring&, wchar_t); + extern template + basic_istream& + getline(basic_istream&, wstring&); + + + + +} +# 56 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/string" 2 3 +# 14 "quickbook/src/id_manager.hpp" 2 +# 1 "quickbook/src/values.hpp" 1 +# 16 "quickbook/src/values.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cassert" 1 3 +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cassert" 3 + +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cassert" 3 + +# 1 "/usr/include/assert.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cassert" 2 3 +# 17 "quickbook/src/values.hpp" 2 + +# 1 "../boost/iterator/iterator_traits.hpp" 1 + + + + + + + +# 1 "../boost/detail/iterator.hpp" 1 +# 54 "../boost/detail/iterator.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/iterator" 1 3 +# 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/iterator" 3 + +# 59 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/iterator" 3 + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ostream" 1 3 +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ostream" 3 + +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ostream" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ios" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ios" 3 + +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ios" 3 + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ios_base.h" 1 3 +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ios_base.h" 3 + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ios_base.h" 3 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 1 3 +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + + + + + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + class locale + { + public: + + + typedef int category; + + + class facet; + class id; + class _Impl; + + friend class facet; + friend class _Impl; + + template + friend bool + has_facet(const locale&) throw(); + + template + friend const _Facet& + use_facet(const locale&); + + template + friend struct __use_cache; +# 100 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + static const category none = 0; + static const category ctype = 1L << 0; + static const category numeric = 1L << 1; + static const category collate = 1L << 2; + static const category time = 1L << 3; + static const category monetary = 1L << 4; + static const category messages = 1L << 5; + static const category all = (ctype | numeric | collate | + time | monetary | messages); +# 119 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + locale() throw(); +# 128 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + locale(const locale& __other) throw(); +# 138 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + explicit + locale(const char* __s); +# 153 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + locale(const locale& __base, const char* __s, category __cat); +# 166 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + locale(const locale& __base, const locale& __add, category __cat); +# 178 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + template + locale(const locale& __other, _Facet* __f); + + + ~locale() throw(); +# 192 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + const locale& + operator=(const locale& __other) throw(); +# 207 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + template + locale + combine(const locale& __other) const; + + + + + + + string + name() const; +# 226 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + bool + operator==(const locale& __other) const throw(); + + + + + + + + bool + operator!=(const locale& __other) const throw() + { return !(this->operator==(__other)); } +# 254 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + template + bool + operator()(const basic_string<_Char, _Traits, _Alloc>& __s1, + const basic_string<_Char, _Traits, _Alloc>& __s2) const; +# 270 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + static locale + global(const locale&); + + + + + static const locale& + classic(); + + private: + + _Impl* _M_impl; + + + static _Impl* _S_classic; + + + static _Impl* _S_global; + + + + + + static const char* const* const _S_categories; +# 305 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + enum { _S_categories_size = 6 + 6 }; + + + static __gthread_once_t _S_once; + + + explicit + locale(_Impl*) throw(); + + static void + _S_initialize(); + + static void + _S_initialize_once() throw(); + + static category + _S_normalize_category(category); + + void + _M_coalesce(const locale& __base, const locale& __add, category __cat); + }; +# 339 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + class locale::facet + { + private: + friend class locale; + friend class locale::_Impl; + + mutable _Atomic_word _M_refcount; + + + static __c_locale _S_c_locale; + + + static const char _S_c_name[2]; + + + static __gthread_once_t _S_once; + + + static void + _S_initialize_once(); + + protected: +# 370 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + explicit + facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0) + { } + + + virtual + ~facet(); + + static void + _S_create_c_locale(__c_locale& __cloc, const char* __s, + __c_locale __old = 0); + + static __c_locale + _S_clone_c_locale(__c_locale& __cloc) throw(); + + static void + _S_destroy_c_locale(__c_locale& __cloc); + + static __c_locale + _S_lc_ctype_c_locale(__c_locale __cloc, const char* __s); + + + + static __c_locale + _S_get_c_locale(); + + __attribute__ ((__const__)) static const char* + _S_get_c_name() throw(); + + private: + void + _M_add_reference() const throw() + { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } + + void + _M_remove_reference() const throw() + { + + ; + if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) + { + ; + try + { delete this; } + catch(...) + { } + } + } + + facet(const facet&); + + facet& + operator=(const facet&); + }; +# 437 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + class locale::id + { + private: + friend class locale; + friend class locale::_Impl; + + template + friend const _Facet& + use_facet(const locale&); + + template + friend bool + has_facet(const locale&) throw(); + + + + + mutable size_t _M_index; + + + static _Atomic_word _S_refcount; + + void + operator=(const id&); + + id(const id&); + + public: + + + + id() { } + + size_t + _M_id() const throw(); + }; + + + + class locale::_Impl + { + public: + + friend class locale; + friend class locale::facet; + + template + friend bool + has_facet(const locale&) throw(); + + template + friend const _Facet& + use_facet(const locale&); + + template + friend struct __use_cache; + + private: + + _Atomic_word _M_refcount; + const facet** _M_facets; + size_t _M_facets_size; + const facet** _M_caches; + char** _M_names; + static const locale::id* const _S_id_ctype[]; + static const locale::id* const _S_id_numeric[]; + static const locale::id* const _S_id_collate[]; + static const locale::id* const _S_id_time[]; + static const locale::id* const _S_id_monetary[]; + static const locale::id* const _S_id_messages[]; + static const locale::id* const* const _S_facet_categories[]; + + void + _M_add_reference() throw() + { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } + + void + _M_remove_reference() throw() + { + + ; + if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) + { + ; + try + { delete this; } + catch(...) + { } + } + } + + _Impl(const _Impl&, size_t); + _Impl(const char*, size_t); + _Impl(size_t) throw(); + + ~_Impl() throw(); + + _Impl(const _Impl&); + + void + operator=(const _Impl&); + + bool + _M_check_same_name() + { + bool __ret = true; + if (_M_names[1]) + + for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i) + __ret = __builtin_strcmp(_M_names[__i], _M_names[__i + 1]) == 0; + return __ret; + } + + void + _M_replace_categories(const _Impl*, category); + + void + _M_replace_category(const _Impl*, const locale::id* const*); + + void + _M_replace_facet(const _Impl*, const locale::id*); + + void + _M_install_facet(const locale::id*, const facet*); + + template + void + _M_init_facet(_Facet* __facet) + { _M_install_facet(&_Facet::id, __facet); } + + void + _M_install_cache(const facet*, size_t); + }; +# 583 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + template + bool + has_facet(const locale& __loc) throw(); +# 600 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + template + const _Facet& + use_facet(const locale& __loc); +# 617 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + template + class collate : public locale::facet + { + public: + + + + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + + protected: + + + __c_locale _M_c_locale_collate; + + public: + + static locale::id id; +# 644 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + explicit + collate(size_t __refs = 0) + : facet(__refs), _M_c_locale_collate(_S_get_c_locale()) + { } +# 658 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + explicit + collate(__c_locale __cloc, size_t __refs = 0) + : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc)) + { } +# 675 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + int + compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const + { return this->do_compare(__lo1, __hi1, __lo2, __hi2); } +# 694 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + string_type + transform(const _CharT* __lo, const _CharT* __hi) const + { return this->do_transform(__lo, __hi); } +# 708 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + long + hash(const _CharT* __lo, const _CharT* __hi) const + { return this->do_hash(__lo, __hi); } + + + int + _M_compare(const _CharT*, const _CharT*) const throw(); + + size_t + _M_transform(_CharT*, const _CharT*, size_t) const throw(); + + protected: + + virtual + ~collate() + { _S_destroy_c_locale(_M_c_locale_collate); } +# 737 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + virtual int + do_compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const; +# 753 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + virtual string_type + do_transform(const _CharT* __lo, const _CharT* __hi) const; +# 766 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 3 + virtual long + do_hash(const _CharT* __lo, const _CharT* __hi) const; + }; + + template + locale::id collate<_CharT>::id; + + + template<> + int + collate::_M_compare(const char*, const char*) const throw(); + + template<> + size_t + collate::_M_transform(char*, const char*, size_t) const throw(); + + + template<> + int + collate::_M_compare(const wchar_t*, const wchar_t*) const throw(); + + template<> + size_t + collate::_M_transform(wchar_t*, const wchar_t*, size_t) const throw(); + + + + template + class collate_byname : public collate<_CharT> + { + public: + + + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + + explicit + collate_byname(const char* __s, size_t __refs = 0) + : collate<_CharT>(__refs) + { + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + this->_S_destroy_c_locale(this->_M_c_locale_collate); + this->_S_create_c_locale(this->_M_c_locale_collate, __s); + } + } + + protected: + virtual + ~collate_byname() { } + }; + + +} + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.tcc" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.tcc" 3 + +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.tcc" 3 + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + template + locale:: + locale(const locale& __other, _Facet* __f) + { + _M_impl = new _Impl(*__other._M_impl, 1); + + try + { _M_impl->_M_install_facet(&_Facet::id, __f); } + catch(...) + { + _M_impl->_M_remove_reference(); + throw; + } + delete [] _M_impl->_M_names[0]; + _M_impl->_M_names[0] = 0; + } + + template + locale + locale:: + combine(const locale& __other) const + { + _Impl* __tmp = new _Impl(*_M_impl, 1); + try + { + __tmp->_M_replace_facet(__other._M_impl, &_Facet::id); + } + catch(...) + { + __tmp->_M_remove_reference(); + throw; + } + return locale(__tmp); + } + + template + bool + locale:: + operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1, + const basic_string<_CharT, _Traits, _Alloc>& __s2) const + { + typedef std::collate<_CharT> __collate_type; + const __collate_type& __collate = use_facet<__collate_type>(*this); + return (__collate.compare(__s1.data(), __s1.data() + __s1.length(), + __s2.data(), __s2.data() + __s2.length()) < 0); + } + + + template + bool + has_facet(const locale& __loc) throw() + { + const size_t __i = _Facet::id._M_id(); + const locale::facet** __facets = __loc._M_impl->_M_facets; + return (__i < __loc._M_impl->_M_facets_size + + && dynamic_cast(__facets[__i])); + + + + } + + template + const _Facet& + use_facet(const locale& __loc) + { + const size_t __i = _Facet::id._M_id(); + const locale::facet** __facets = __loc._M_impl->_M_facets; + if (__i >= __loc._M_impl->_M_facets_size || !__facets[__i]) + __throw_bad_cast(); + + return dynamic_cast(*__facets[__i]); + + + + } + + + + template + int + collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const throw () + { return 0; } + + + template + size_t + collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const throw () + { return 0; } + + template + int + collate<_CharT>:: + do_compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const + { + + + const string_type __one(__lo1, __hi1); + const string_type __two(__lo2, __hi2); + + const _CharT* __p = __one.c_str(); + const _CharT* __pend = __one.data() + __one.length(); + const _CharT* __q = __two.c_str(); + const _CharT* __qend = __two.data() + __two.length(); + + + + + for (;;) + { + const int __res = _M_compare(__p, __q); + if (__res) + return __res; + + __p += char_traits<_CharT>::length(__p); + __q += char_traits<_CharT>::length(__q); + if (__p == __pend && __q == __qend) + return 0; + else if (__p == __pend) + return -1; + else if (__q == __qend) + return 1; + + __p++; + __q++; + } + } + + template + typename collate<_CharT>::string_type + collate<_CharT>:: + do_transform(const _CharT* __lo, const _CharT* __hi) const + { + string_type __ret; + + + const string_type __str(__lo, __hi); + + const _CharT* __p = __str.c_str(); + const _CharT* __pend = __str.data() + __str.length(); + + size_t __len = (__hi - __lo) * 2; + + _CharT* __c = new _CharT[__len]; + + try + { + + + + for (;;) + { + + size_t __res = _M_transform(__c, __p, __len); + + + if (__res >= __len) + { + __len = __res + 1; + delete [] __c, __c = 0; + __c = new _CharT[__len]; + __res = _M_transform(__c, __p, __len); + } + + __ret.append(__c, __res); + __p += char_traits<_CharT>::length(__p); + if (__p == __pend) + break; + + __p++; + __ret.push_back(_CharT()); + } + } + catch(...) + { + delete [] __c; + throw; + } + + delete [] __c; + + return __ret; + } + + template + long + collate<_CharT>:: + do_hash(const _CharT* __lo, const _CharT* __hi) const + { + unsigned long __val = 0; + for (; __lo < __hi; ++__lo) + __val = + *__lo + ((__val << 7) + | (__val >> (__gnu_cxx::__numeric_traits:: + __digits - 7))); + return static_cast(__val); + } + + + + + extern template class collate; + extern template class collate_byname; + + extern template + const collate& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + extern template class collate; + extern template class collate_byname; + + extern template + const collate& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + + +} +# 824 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_classes.h" 2 3 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ios_base.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + + + + + enum _Ios_Fmtflags + { + _S_boolalpha = 1L << 0, + _S_dec = 1L << 1, + _S_fixed = 1L << 2, + _S_hex = 1L << 3, + _S_internal = 1L << 4, + _S_left = 1L << 5, + _S_oct = 1L << 6, + _S_right = 1L << 7, + _S_scientific = 1L << 8, + _S_showbase = 1L << 9, + _S_showpoint = 1L << 10, + _S_showpos = 1L << 11, + _S_skipws = 1L << 12, + _S_unitbuf = 1L << 13, + _S_uppercase = 1L << 14, + _S_adjustfield = _S_left | _S_right | _S_internal, + _S_basefield = _S_dec | _S_oct | _S_hex, + _S_floatfield = _S_scientific | _S_fixed, + _S_ios_fmtflags_end = 1L << 16 + }; + + inline _Ios_Fmtflags + operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) & static_cast(__b)); } + + inline _Ios_Fmtflags + operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) | static_cast(__b)); } + + inline _Ios_Fmtflags + operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) ^ static_cast(__b)); } + + inline _Ios_Fmtflags + operator~(_Ios_Fmtflags __a) + { return _Ios_Fmtflags(~static_cast(__a)); } + + inline const _Ios_Fmtflags& + operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a | __b; } + + inline const _Ios_Fmtflags& + operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a & __b; } + + inline const _Ios_Fmtflags& + operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a ^ __b; } + + + enum _Ios_Openmode + { + _S_app = 1L << 0, + _S_ate = 1L << 1, + _S_bin = 1L << 2, + _S_in = 1L << 3, + _S_out = 1L << 4, + _S_trunc = 1L << 5, + _S_ios_openmode_end = 1L << 16 + }; + + inline _Ios_Openmode + operator&(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) & static_cast(__b)); } + + inline _Ios_Openmode + operator|(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) | static_cast(__b)); } + + inline _Ios_Openmode + operator^(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) ^ static_cast(__b)); } + + inline _Ios_Openmode + operator~(_Ios_Openmode __a) + { return _Ios_Openmode(~static_cast(__a)); } + + inline const _Ios_Openmode& + operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a | __b; } + + inline const _Ios_Openmode& + operator&=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a & __b; } + + inline const _Ios_Openmode& + operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a ^ __b; } + + + enum _Ios_Iostate + { + _S_goodbit = 0, + _S_badbit = 1L << 0, + _S_eofbit = 1L << 1, + _S_failbit = 1L << 2, + _S_ios_iostate_end = 1L << 16 + }; + + inline _Ios_Iostate + operator&(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) & static_cast(__b)); } + + inline _Ios_Iostate + operator|(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) | static_cast(__b)); } + + inline _Ios_Iostate + operator^(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) ^ static_cast(__b)); } + + inline _Ios_Iostate + operator~(_Ios_Iostate __a) + { return _Ios_Iostate(~static_cast(__a)); } + + inline const _Ios_Iostate& + operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a | __b; } + + inline const _Ios_Iostate& + operator&=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a & __b; } + + inline const _Ios_Iostate& + operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a ^ __b; } + + + enum _Ios_Seekdir + { + _S_beg = 0, + _S_cur = 1, + _S_end = 2, + _S_ios_seekdir_end = 1L << 16 + }; +# 201 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ios_base.h" 3 + class ios_base + { + public: + + + + + + + + class failure : public exception + { + public: + + + explicit + failure(const string& __str) throw(); + + + + virtual + ~failure() throw(); + + virtual const char* + what() const throw(); + + private: + string _M_msg; + }; +# 257 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ios_base.h" 3 + typedef _Ios_Fmtflags fmtflags; + + + static const fmtflags boolalpha = _S_boolalpha; + + + static const fmtflags dec = _S_dec; + + + static const fmtflags fixed = _S_fixed; + + + static const fmtflags hex = _S_hex; + + + + + static const fmtflags internal = _S_internal; + + + + static const fmtflags left = _S_left; + + + static const fmtflags oct = _S_oct; + + + + static const fmtflags right = _S_right; + + + static const fmtflags scientific = _S_scientific; + + + + static const fmtflags showbase = _S_showbase; + + + + static const fmtflags showpoint = _S_showpoint; + + + static const fmtflags showpos = _S_showpos; + + + static const fmtflags skipws = _S_skipws; + + + static const fmtflags unitbuf = _S_unitbuf; + + + + static const fmtflags uppercase = _S_uppercase; + + + static const fmtflags adjustfield = _S_adjustfield; + + + static const fmtflags basefield = _S_basefield; + + + static const fmtflags floatfield = _S_floatfield; +# 332 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ios_base.h" 3 + typedef _Ios_Iostate iostate; + + + + static const iostate badbit = _S_badbit; + + + static const iostate eofbit = _S_eofbit; + + + + + static const iostate failbit = _S_failbit; + + + static const iostate goodbit = _S_goodbit; +# 363 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ios_base.h" 3 + typedef _Ios_Openmode openmode; + + + static const openmode app = _S_app; + + + static const openmode ate = _S_ate; + + + + + static const openmode binary = _S_bin; + + + static const openmode in = _S_in; + + + static const openmode out = _S_out; + + + static const openmode trunc = _S_trunc; +# 395 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ios_base.h" 3 + typedef _Ios_Seekdir seekdir; + + + static const seekdir beg = _S_beg; + + + static const seekdir cur = _S_cur; + + + static const seekdir end = _S_end; + + + typedef int io_state; + typedef int open_mode; + typedef int seek_dir; + + typedef std::streampos streampos; + typedef std::streamoff streamoff; +# 421 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ios_base.h" 3 + enum event + { + erase_event, + imbue_event, + copyfmt_event + }; +# 438 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ios_base.h" 3 + typedef void (*event_callback) (event, ios_base&, int); +# 450 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ios_base.h" 3 + void + register_callback(event_callback __fn, int __index); + + protected: + streamsize _M_precision; + streamsize _M_width; + fmtflags _M_flags; + iostate _M_exception; + iostate _M_streambuf_state; + + + + struct _Callback_list + { + + _Callback_list* _M_next; + ios_base::event_callback _M_fn; + int _M_index; + _Atomic_word _M_refcount; + + _Callback_list(ios_base::event_callback __fn, int __index, + _Callback_list* __cb) + : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { } + + void + _M_add_reference() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } + + + int + _M_remove_reference() + { + + ; + int __res = __gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1); + if (__res == 0) + { + ; + } + return __res; + } + }; + + _Callback_list* _M_callbacks; + + void + _M_call_callbacks(event __ev) throw(); + + void + _M_dispose_callbacks(void) throw(); + + + struct _Words + { + void* _M_pword; + long _M_iword; + _Words() : _M_pword(0), _M_iword(0) { } + }; + + + _Words _M_word_zero; + + + + enum { _S_local_word_size = 8 }; + _Words _M_local_word[_S_local_word_size]; + + + int _M_word_size; + _Words* _M_word; + + _Words& + _M_grow_words(int __index, bool __iword); + + + locale _M_ios_locale; + + void + _M_init() throw(); + + public: + + + + + + class Init + { + friend class ios_base; + public: + Init(); + ~Init(); + + private: + static _Atomic_word _S_refcount; + static bool _S_synced_with_stdio; + }; + + + + + + + fmtflags + flags() const + { return _M_flags; } +# 563 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ios_base.h" 3 + fmtflags + flags(fmtflags __fmtfl) + { + fmtflags __old = _M_flags; + _M_flags = __fmtfl; + return __old; + } +# 579 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ios_base.h" 3 + fmtflags + setf(fmtflags __fmtfl) + { + fmtflags __old = _M_flags; + _M_flags |= __fmtfl; + return __old; + } +# 596 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ios_base.h" 3 + fmtflags + setf(fmtflags __fmtfl, fmtflags __mask) + { + fmtflags __old = _M_flags; + _M_flags &= ~__mask; + _M_flags |= (__fmtfl & __mask); + return __old; + } + + + + + + + + void + unsetf(fmtflags __mask) + { _M_flags &= ~__mask; } +# 622 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ios_base.h" 3 + streamsize + precision() const + { return _M_precision; } + + + + + + + streamsize + precision(streamsize __prec) + { + streamsize __old = _M_precision; + _M_precision = __prec; + return __old; + } + + + + + + + + streamsize + width() const + { return _M_width; } + + + + + + + streamsize + width(streamsize __wide) + { + streamsize __old = _M_width; + _M_width = __wide; + return __old; + } +# 673 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ios_base.h" 3 + static bool + sync_with_stdio(bool __sync = true); +# 685 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ios_base.h" 3 + locale + imbue(const locale& __loc) throw(); +# 696 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ios_base.h" 3 + locale + getloc() const + { return _M_ios_locale; } +# 707 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ios_base.h" 3 + const locale& + _M_getloc() const + { return _M_ios_locale; } +# 726 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ios_base.h" 3 + static int + xalloc() throw(); +# 742 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ios_base.h" 3 + long& + iword(int __ix) + { + _Words& __word = (__ix < _M_word_size) + ? _M_word[__ix] : _M_grow_words(__ix, true); + return __word._M_iword; + } +# 763 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ios_base.h" 3 + void*& + pword(int __ix) + { + _Words& __word = (__ix < _M_word_size) + ? _M_word[__ix] : _M_grow_words(__ix, false); + return __word._M_pword; + } +# 780 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ios_base.h" 3 + virtual ~ios_base(); + + protected: + ios_base() throw (); + + + + private: + ios_base(const ios_base&); + + ios_base& + operator=(const ios_base&); + }; + + + + inline ios_base& + boolalpha(ios_base& __base) + { + __base.setf(ios_base::boolalpha); + return __base; + } + + + inline ios_base& + noboolalpha(ios_base& __base) + { + __base.unsetf(ios_base::boolalpha); + return __base; + } + + + inline ios_base& + showbase(ios_base& __base) + { + __base.setf(ios_base::showbase); + return __base; + } + + + inline ios_base& + noshowbase(ios_base& __base) + { + __base.unsetf(ios_base::showbase); + return __base; + } + + + inline ios_base& + showpoint(ios_base& __base) + { + __base.setf(ios_base::showpoint); + return __base; + } + + + inline ios_base& + noshowpoint(ios_base& __base) + { + __base.unsetf(ios_base::showpoint); + return __base; + } + + + inline ios_base& + showpos(ios_base& __base) + { + __base.setf(ios_base::showpos); + return __base; + } + + + inline ios_base& + noshowpos(ios_base& __base) + { + __base.unsetf(ios_base::showpos); + return __base; + } + + + inline ios_base& + skipws(ios_base& __base) + { + __base.setf(ios_base::skipws); + return __base; + } + + + inline ios_base& + noskipws(ios_base& __base) + { + __base.unsetf(ios_base::skipws); + return __base; + } + + + inline ios_base& + uppercase(ios_base& __base) + { + __base.setf(ios_base::uppercase); + return __base; + } + + + inline ios_base& + nouppercase(ios_base& __base) + { + __base.unsetf(ios_base::uppercase); + return __base; + } + + + inline ios_base& + unitbuf(ios_base& __base) + { + __base.setf(ios_base::unitbuf); + return __base; + } + + + inline ios_base& + nounitbuf(ios_base& __base) + { + __base.unsetf(ios_base::unitbuf); + return __base; + } + + + + inline ios_base& + internal(ios_base& __base) + { + __base.setf(ios_base::internal, ios_base::adjustfield); + return __base; + } + + + inline ios_base& + left(ios_base& __base) + { + __base.setf(ios_base::left, ios_base::adjustfield); + return __base; + } + + + inline ios_base& + right(ios_base& __base) + { + __base.setf(ios_base::right, ios_base::adjustfield); + return __base; + } + + + + inline ios_base& + dec(ios_base& __base) + { + __base.setf(ios_base::dec, ios_base::basefield); + return __base; + } + + + inline ios_base& + hex(ios_base& __base) + { + __base.setf(ios_base::hex, ios_base::basefield); + return __base; + } + + + inline ios_base& + oct(ios_base& __base) + { + __base.setf(ios_base::oct, ios_base::basefield); + return __base; + } + + + + inline ios_base& + fixed(ios_base& __base) + { + __base.setf(ios_base::fixed, ios_base::floatfield); + return __base; + } + + + inline ios_base& + scientific(ios_base& __base) + { + __base.setf(ios_base::scientific, ios_base::floatfield); + return __base; + } + + +} +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ios" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 +# 46 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + template + streamsize + __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*, + basic_streambuf<_CharT, _Traits>*, bool&); +# 116 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + template + class basic_streambuf + { + public: + + + + + + + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + + + + typedef basic_streambuf __streambuf_type; + + + friend class basic_ios; + friend class basic_istream; + friend class basic_ostream; + friend class istreambuf_iterator; + friend class ostreambuf_iterator; + + friend streamsize + __copy_streambufs_eof<>(__streambuf_type*, __streambuf_type*, bool&); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + _CharT2*>::__type + __copy_move_a2(istreambuf_iterator<_CharT2>, + istreambuf_iterator<_CharT2>, _CharT2*); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + istreambuf_iterator<_CharT2> >::__type + find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + const _CharT2&); + + template + friend basic_istream<_CharT2, _Traits2>& + operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*); + + template + friend basic_istream<_CharT2, _Traits2>& + operator>>(basic_istream<_CharT2, _Traits2>&, + basic_string<_CharT2, _Traits2, _Alloc>&); + + template + friend basic_istream<_CharT2, _Traits2>& + getline(basic_istream<_CharT2, _Traits2>&, + basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2); + + protected: +# 182 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + char_type* _M_in_beg; + char_type* _M_in_cur; + char_type* _M_in_end; + char_type* _M_out_beg; + char_type* _M_out_cur; + char_type* _M_out_end; + + + locale _M_buf_locale; + + public: + + virtual + ~basic_streambuf() + { } +# 206 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + locale + pubimbue(const locale &__loc) + { + locale __tmp(this->getloc()); + this->imbue(__loc); + _M_buf_locale = __loc; + return __tmp; + } +# 223 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + locale + getloc() const + { return _M_buf_locale; } +# 236 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + __streambuf_type* + pubsetbuf(char_type* __s, streamsize __n) + { return this->setbuf(__s, __n); } + + pos_type + pubseekoff(off_type __off, ios_base::seekdir __way, + ios_base::openmode __mode = ios_base::in | ios_base::out) + { return this->seekoff(__off, __way, __mode); } + + pos_type + pubseekpos(pos_type __sp, + ios_base::openmode __mode = ios_base::in | ios_base::out) + { return this->seekpos(__sp, __mode); } + + int + pubsync() { return this->sync(); } +# 263 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + streamsize + in_avail() + { + const streamsize __ret = this->egptr() - this->gptr(); + return __ret ? __ret : this->showmanyc(); + } +# 277 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + int_type + snextc() + { + int_type __ret = traits_type::eof(); + if (__builtin_expect(!traits_type::eq_int_type(this->sbumpc(), + __ret), true)) + __ret = this->sgetc(); + return __ret; + } +# 295 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + int_type + sbumpc() + { + int_type __ret; + if (__builtin_expect(this->gptr() < this->egptr(), true)) + { + __ret = traits_type::to_int_type(*this->gptr()); + this->gbump(1); + } + else + __ret = this->uflow(); + return __ret; + } +# 317 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + int_type + sgetc() + { + int_type __ret; + if (__builtin_expect(this->gptr() < this->egptr(), true)) + __ret = traits_type::to_int_type(*this->gptr()); + else + __ret = this->underflow(); + return __ret; + } +# 336 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + streamsize + sgetn(char_type* __s, streamsize __n) + { return this->xsgetn(__s, __n); } +# 351 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + int_type + sputbackc(char_type __c) + { + int_type __ret; + const bool __testpos = this->eback() < this->gptr(); + if (__builtin_expect(!__testpos || + !traits_type::eq(__c, this->gptr()[-1]), false)) + __ret = this->pbackfail(traits_type::to_int_type(__c)); + else + { + this->gbump(-1); + __ret = traits_type::to_int_type(*this->gptr()); + } + return __ret; + } +# 376 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + int_type + sungetc() + { + int_type __ret; + if (__builtin_expect(this->eback() < this->gptr(), true)) + { + this->gbump(-1); + __ret = traits_type::to_int_type(*this->gptr()); + } + else + __ret = this->pbackfail(); + return __ret; + } +# 403 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + int_type + sputc(char_type __c) + { + int_type __ret; + if (__builtin_expect(this->pptr() < this->epptr(), true)) + { + *this->pptr() = __c; + this->pbump(1); + __ret = traits_type::to_int_type(__c); + } + else + __ret = this->overflow(traits_type::to_int_type(__c)); + return __ret; + } +# 429 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + streamsize + sputn(const char_type* __s, streamsize __n) + { return this->xsputn(__s, __n); } + + protected: +# 443 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + basic_streambuf() + : _M_in_beg(0), _M_in_cur(0), _M_in_end(0), + _M_out_beg(0), _M_out_cur(0), _M_out_end(0), + _M_buf_locale(locale()) + { } +# 461 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + char_type* + eback() const { return _M_in_beg; } + + char_type* + gptr() const { return _M_in_cur; } + + char_type* + egptr() const { return _M_in_end; } +# 477 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + void + gbump(int __n) { _M_in_cur += __n; } +# 488 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + void + setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) + { + _M_in_beg = __gbeg; + _M_in_cur = __gnext; + _M_in_end = __gend; + } +# 508 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + char_type* + pbase() const { return _M_out_beg; } + + char_type* + pptr() const { return _M_out_cur; } + + char_type* + epptr() const { return _M_out_end; } +# 524 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + void + pbump(int __n) { _M_out_cur += __n; } +# 534 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + void + setp(char_type* __pbeg, char_type* __pend) + { + _M_out_beg = _M_out_cur = __pbeg; + _M_out_end = __pend; + } +# 555 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + virtual void + imbue(const locale&) + { } +# 570 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + virtual basic_streambuf* + setbuf(char_type*, streamsize) + { return this; } +# 581 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + virtual pos_type + seekoff(off_type, ios_base::seekdir, + ios_base::openmode = ios_base::in | ios_base::out) + { return pos_type(off_type(-1)); } +# 593 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + virtual pos_type + seekpos(pos_type, + ios_base::openmode = ios_base::in | ios_base::out) + { return pos_type(off_type(-1)); } +# 606 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + virtual int + sync() { return 0; } +# 628 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + virtual streamsize + showmanyc() { return 0; } +# 644 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + virtual streamsize + xsgetn(char_type* __s, streamsize __n); +# 666 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + virtual int_type + underflow() + { return traits_type::eof(); } +# 679 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + virtual int_type + uflow() + { + int_type __ret = traits_type::eof(); + const bool __testeof = traits_type::eq_int_type(this->underflow(), + __ret); + if (!__testeof) + { + __ret = traits_type::to_int_type(*this->gptr()); + this->gbump(1); + } + return __ret; + } +# 703 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + virtual int_type + pbackfail(int_type = traits_type::eof()) + { return traits_type::eof(); } +# 721 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + virtual streamsize + xsputn(const char_type* __s, streamsize __n); +# 747 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + virtual int_type + overflow(int_type = traits_type::eof()) + { return traits_type::eof(); } + + + + public: +# 762 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 3 + void + stossc() + { + if (this->gptr() < this->egptr()) + this->gbump(1); + else + this->uflow(); + } + + + + void + __safe_gbump(streamsize __n) { _M_in_cur += __n; } + + void + __safe_pbump(streamsize __n) { _M_out_cur += __n; } + + private: + + + basic_streambuf(const __streambuf_type& __sb) + : _M_in_beg(__sb._M_in_beg), _M_in_cur(__sb._M_in_cur), + _M_in_end(__sb._M_in_end), _M_out_beg(__sb._M_out_beg), + _M_out_cur(__sb._M_out_cur), _M_out_end(__sb._M_out_cur), + _M_buf_locale(__sb._M_buf_locale) + { } + + __streambuf_type& + operator=(const __streambuf_type&) { return *this; }; + }; + + + template<> + streamsize + __copy_streambufs_eof(basic_streambuf* __sbin, + basic_streambuf* __sbout, bool& __ineof); + + template<> + streamsize + __copy_streambufs_eof(basic_streambuf* __sbin, + basic_streambuf* __sbout, bool& __ineof); + + + +} + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/streambuf.tcc" 1 3 +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/streambuf.tcc" 3 + +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/streambuf.tcc" 3 + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + template + streamsize + basic_streambuf<_CharT, _Traits>:: + xsgetn(char_type* __s, streamsize __n) + { + streamsize __ret = 0; + while (__ret < __n) + { + const streamsize __buf_len = this->egptr() - this->gptr(); + if (__buf_len) + { + const streamsize __remaining = __n - __ret; + const streamsize __len = std::min(__buf_len, __remaining); + traits_type::copy(__s, this->gptr(), __len); + __ret += __len; + __s += __len; + this->__safe_gbump(__len); + } + + if (__ret < __n) + { + const int_type __c = this->uflow(); + if (!traits_type::eq_int_type(__c, traits_type::eof())) + { + traits_type::assign(*__s++, traits_type::to_char_type(__c)); + ++__ret; + } + else + break; + } + } + return __ret; + } + + template + streamsize + basic_streambuf<_CharT, _Traits>:: + xsputn(const char_type* __s, streamsize __n) + { + streamsize __ret = 0; + while (__ret < __n) + { + const streamsize __buf_len = this->epptr() - this->pptr(); + if (__buf_len) + { + const streamsize __remaining = __n - __ret; + const streamsize __len = std::min(__buf_len, __remaining); + traits_type::copy(this->pptr(), __s, __len); + __ret += __len; + __s += __len; + this->__safe_pbump(__len); + } + + if (__ret < __n) + { + int_type __c = this->overflow(traits_type::to_int_type(*__s)); + if (!traits_type::eq_int_type(__c, traits_type::eof())) + { + ++__ret; + ++__s; + } + else + break; + } + } + return __ret; + } + + + + + template + streamsize + __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>* __sbin, + basic_streambuf<_CharT, _Traits>* __sbout, + bool& __ineof) + { + streamsize __ret = 0; + __ineof = true; + typename _Traits::int_type __c = __sbin->sgetc(); + while (!_Traits::eq_int_type(__c, _Traits::eof())) + { + __c = __sbout->sputc(_Traits::to_char_type(__c)); + if (_Traits::eq_int_type(__c, _Traits::eof())) + { + __ineof = false; + break; + } + ++__ret; + __c = __sbin->snextc(); + } + return __ret; + } + + template + inline streamsize + __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, + basic_streambuf<_CharT, _Traits>* __sbout) + { + bool __ineof; + return __copy_streambufs_eof(__sbin, __sbout, __ineof); + } + + + + + extern template class basic_streambuf; + extern template + streamsize + __copy_streambufs(basic_streambuf*, + basic_streambuf*); + extern template + streamsize + __copy_streambufs_eof(basic_streambuf*, + basic_streambuf*, bool&); + + + extern template class basic_streambuf; + extern template + streamsize + __copy_streambufs(basic_streambuf*, + basic_streambuf*); + extern template + streamsize + __copy_streambufs_eof(basic_streambuf*, + basic_streambuf*, bool&); + + + + +} +# 809 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/streambuf" 2 3 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ios" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_ios.h" 1 3 +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_ios.h" 3 + +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_ios.h" 3 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 1 3 +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwctype" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwctype" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwctype" 3 +# 52 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwctype" 3 +# 1 "/usr/include/wctype.h" 1 3 4 +# 34 "/usr/include/wctype.h" 3 4 +# 1 "/usr/include/wchar.h" 1 3 4 +# 35 "/usr/include/wctype.h" 2 3 4 +# 50 "/usr/include/wctype.h" 3 4 + + + +typedef unsigned long int wctype_t; + +# 72 "/usr/include/wctype.h" 3 4 +enum +{ + __ISwupper = 0, + __ISwlower = 1, + __ISwalpha = 2, + __ISwdigit = 3, + __ISwxdigit = 4, + __ISwspace = 5, + __ISwprint = 6, + __ISwgraph = 7, + __ISwblank = 8, + __ISwcntrl = 9, + __ISwpunct = 10, + __ISwalnum = 11, + + _ISwupper = ((__ISwupper) < 8 ? (int) ((1UL << (__ISwupper)) << 24) : ((__ISwupper) < 16 ? (int) ((1UL << (__ISwupper)) << 8) : ((__ISwupper) < 24 ? (int) ((1UL << (__ISwupper)) >> 8) : (int) ((1UL << (__ISwupper)) >> 24)))), + _ISwlower = ((__ISwlower) < 8 ? (int) ((1UL << (__ISwlower)) << 24) : ((__ISwlower) < 16 ? (int) ((1UL << (__ISwlower)) << 8) : ((__ISwlower) < 24 ? (int) ((1UL << (__ISwlower)) >> 8) : (int) ((1UL << (__ISwlower)) >> 24)))), + _ISwalpha = ((__ISwalpha) < 8 ? (int) ((1UL << (__ISwalpha)) << 24) : ((__ISwalpha) < 16 ? (int) ((1UL << (__ISwalpha)) << 8) : ((__ISwalpha) < 24 ? (int) ((1UL << (__ISwalpha)) >> 8) : (int) ((1UL << (__ISwalpha)) >> 24)))), + _ISwdigit = ((__ISwdigit) < 8 ? (int) ((1UL << (__ISwdigit)) << 24) : ((__ISwdigit) < 16 ? (int) ((1UL << (__ISwdigit)) << 8) : ((__ISwdigit) < 24 ? (int) ((1UL << (__ISwdigit)) >> 8) : (int) ((1UL << (__ISwdigit)) >> 24)))), + _ISwxdigit = ((__ISwxdigit) < 8 ? (int) ((1UL << (__ISwxdigit)) << 24) : ((__ISwxdigit) < 16 ? (int) ((1UL << (__ISwxdigit)) << 8) : ((__ISwxdigit) < 24 ? (int) ((1UL << (__ISwxdigit)) >> 8) : (int) ((1UL << (__ISwxdigit)) >> 24)))), + _ISwspace = ((__ISwspace) < 8 ? (int) ((1UL << (__ISwspace)) << 24) : ((__ISwspace) < 16 ? (int) ((1UL << (__ISwspace)) << 8) : ((__ISwspace) < 24 ? (int) ((1UL << (__ISwspace)) >> 8) : (int) ((1UL << (__ISwspace)) >> 24)))), + _ISwprint = ((__ISwprint) < 8 ? (int) ((1UL << (__ISwprint)) << 24) : ((__ISwprint) < 16 ? (int) ((1UL << (__ISwprint)) << 8) : ((__ISwprint) < 24 ? (int) ((1UL << (__ISwprint)) >> 8) : (int) ((1UL << (__ISwprint)) >> 24)))), + _ISwgraph = ((__ISwgraph) < 8 ? (int) ((1UL << (__ISwgraph)) << 24) : ((__ISwgraph) < 16 ? (int) ((1UL << (__ISwgraph)) << 8) : ((__ISwgraph) < 24 ? (int) ((1UL << (__ISwgraph)) >> 8) : (int) ((1UL << (__ISwgraph)) >> 24)))), + _ISwblank = ((__ISwblank) < 8 ? (int) ((1UL << (__ISwblank)) << 24) : ((__ISwblank) < 16 ? (int) ((1UL << (__ISwblank)) << 8) : ((__ISwblank) < 24 ? (int) ((1UL << (__ISwblank)) >> 8) : (int) ((1UL << (__ISwblank)) >> 24)))), + _ISwcntrl = ((__ISwcntrl) < 8 ? (int) ((1UL << (__ISwcntrl)) << 24) : ((__ISwcntrl) < 16 ? (int) ((1UL << (__ISwcntrl)) << 8) : ((__ISwcntrl) < 24 ? (int) ((1UL << (__ISwcntrl)) >> 8) : (int) ((1UL << (__ISwcntrl)) >> 24)))), + _ISwpunct = ((__ISwpunct) < 8 ? (int) ((1UL << (__ISwpunct)) << 24) : ((__ISwpunct) < 16 ? (int) ((1UL << (__ISwpunct)) << 8) : ((__ISwpunct) < 24 ? (int) ((1UL << (__ISwpunct)) >> 8) : (int) ((1UL << (__ISwpunct)) >> 24)))), + _ISwalnum = ((__ISwalnum) < 8 ? (int) ((1UL << (__ISwalnum)) << 24) : ((__ISwalnum) < 16 ? (int) ((1UL << (__ISwalnum)) << 8) : ((__ISwalnum) < 24 ? (int) ((1UL << (__ISwalnum)) >> 8) : (int) ((1UL << (__ISwalnum)) >> 24)))) +}; + + + +extern "C" { + + + + + + + + +extern int iswalnum (wint_t __wc) throw (); + + + + + +extern int iswalpha (wint_t __wc) throw (); + + +extern int iswcntrl (wint_t __wc) throw (); + + + +extern int iswdigit (wint_t __wc) throw (); + + + +extern int iswgraph (wint_t __wc) throw (); + + + + +extern int iswlower (wint_t __wc) throw (); + + +extern int iswprint (wint_t __wc) throw (); + + + + +extern int iswpunct (wint_t __wc) throw (); + + + + +extern int iswspace (wint_t __wc) throw (); + + + + +extern int iswupper (wint_t __wc) throw (); + + + + +extern int iswxdigit (wint_t __wc) throw (); + + + + + +extern int iswblank (wint_t __wc) throw (); +# 172 "/usr/include/wctype.h" 3 4 +extern wctype_t wctype (__const char *__property) throw (); + + + +extern int iswctype (wint_t __wc, wctype_t __desc) throw (); + + + + + + + + + + +typedef __const __int32_t *wctrans_t; + + + + + + + +extern wint_t towlower (wint_t __wc) throw (); + + +extern wint_t towupper (wint_t __wc) throw (); + + +} +# 214 "/usr/include/wctype.h" 3 4 +extern "C" { + + + + +extern wctrans_t wctrans (__const char *__property) throw (); + + +extern wint_t towctrans (wint_t __wc, wctrans_t __desc) throw (); + + + + + + + + +extern int iswalnum_l (wint_t __wc, __locale_t __locale) throw (); + + + + + +extern int iswalpha_l (wint_t __wc, __locale_t __locale) throw (); + + +extern int iswcntrl_l (wint_t __wc, __locale_t __locale) throw (); + + + +extern int iswdigit_l (wint_t __wc, __locale_t __locale) throw (); + + + +extern int iswgraph_l (wint_t __wc, __locale_t __locale) throw (); + + + + +extern int iswlower_l (wint_t __wc, __locale_t __locale) throw (); + + +extern int iswprint_l (wint_t __wc, __locale_t __locale) throw (); + + + + +extern int iswpunct_l (wint_t __wc, __locale_t __locale) throw (); + + + + +extern int iswspace_l (wint_t __wc, __locale_t __locale) throw (); + + + + +extern int iswupper_l (wint_t __wc, __locale_t __locale) throw (); + + + + +extern int iswxdigit_l (wint_t __wc, __locale_t __locale) throw (); + + + + +extern int iswblank_l (wint_t __wc, __locale_t __locale) throw (); + + + +extern wctype_t wctype_l (__const char *__property, __locale_t __locale) + throw (); + + + +extern int iswctype_l (wint_t __wc, wctype_t __desc, __locale_t __locale) + throw (); + + + + + + + +extern wint_t towlower_l (wint_t __wc, __locale_t __locale) throw (); + + +extern wint_t towupper_l (wint_t __wc, __locale_t __locale) throw (); + + + +extern wctrans_t wctrans_l (__const char *__property, __locale_t __locale) + throw (); + + +extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc, + __locale_t __locale) throw (); + + + +} +# 53 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwctype" 2 3 +# 82 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwctype" 3 +namespace std +{ + using ::wctrans_t; + using ::wctype_t; + using ::wint_t; + + using ::iswalnum; + using ::iswalpha; + + using ::iswblank; + + using ::iswcntrl; + using ::iswctype; + using ::iswdigit; + using ::iswgraph; + using ::iswlower; + using ::iswprint; + using ::iswpunct; + using ::iswspace; + using ::iswupper; + using ::iswxdigit; + using ::towctrans; + using ::towlower; + using ::towupper; + using ::wctrans; + using ::wctype; +} +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cctype" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cctype" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cctype" 3 +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/ctype_base.h" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/ctype_base.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + + struct ctype_base + { + + typedef const int* __to_type; + + + + typedef unsigned short mask; + static const mask upper = _ISupper; + static const mask lower = _ISlower; + static const mask alpha = _ISalpha; + static const mask digit = _ISdigit; + static const mask xdigit = _ISxdigit; + static const mask space = _ISspace; + static const mask print = _ISprint; + static const mask graph = _ISalpha | _ISdigit | _ISpunct; + static const mask cntrl = _IScntrl; + static const mask punct = _ISpunct; + static const mask alnum = _ISalpha | _ISdigit; + }; + + +} +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 2 3 + + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/streambuf_iterator.h" 1 3 +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/streambuf_iterator.h" 3 + +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/streambuf_iterator.h" 3 + + + + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 51 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/streambuf_iterator.h" 3 + template + class istreambuf_iterator + : public iterator + { + public: + + + + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename _Traits::int_type int_type; + typedef basic_streambuf<_CharT, _Traits> streambuf_type; + typedef basic_istream<_CharT, _Traits> istream_type; + + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + ostreambuf_iterator<_CharT2> >::__type + copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + ostreambuf_iterator<_CharT2>); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + _CharT2*>::__type + __copy_move_a2(istreambuf_iterator<_CharT2>, + istreambuf_iterator<_CharT2>, _CharT2*); + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + istreambuf_iterator<_CharT2> >::__type + find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + const _CharT2&); + + private: + + + + + + + + mutable streambuf_type* _M_sbuf; + mutable int_type _M_c; + + public: + + istreambuf_iterator() throw() + : _M_sbuf(0), _M_c(traits_type::eof()) { } + + + istreambuf_iterator(istream_type& __s) throw() + : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { } + + + istreambuf_iterator(streambuf_type* __s) throw() + : _M_sbuf(__s), _M_c(traits_type::eof()) { } + + + + + char_type + operator*() const + { + + + + + + + + return traits_type::to_char_type(_M_get()); + } + + + istreambuf_iterator& + operator++() + { + + + ; + if (_M_sbuf) + { + _M_sbuf->sbumpc(); + _M_c = traits_type::eof(); + } + return *this; + } + + + istreambuf_iterator + operator++(int) + { + + + ; + + istreambuf_iterator __old = *this; + if (_M_sbuf) + { + __old._M_c = _M_sbuf->sbumpc(); + _M_c = traits_type::eof(); + } + return __old; + } + + + + + + bool + equal(const istreambuf_iterator& __b) const + { return _M_at_eof() == __b._M_at_eof(); } + + private: + int_type + _M_get() const + { + const int_type __eof = traits_type::eof(); + int_type __ret = __eof; + if (_M_sbuf) + { + if (!traits_type::eq_int_type(_M_c, __eof)) + __ret = _M_c; + else if (!traits_type::eq_int_type((__ret = _M_sbuf->sgetc()), + __eof)) + _M_c = __ret; + else + _M_sbuf = 0; + } + return __ret; + } + + bool + _M_at_eof() const + { + const int_type __eof = traits_type::eof(); + return traits_type::eq_int_type(_M_get(), __eof); + } + }; + + template + inline bool + operator==(const istreambuf_iterator<_CharT, _Traits>& __a, + const istreambuf_iterator<_CharT, _Traits>& __b) + { return __a.equal(__b); } + + template + inline bool + operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, + const istreambuf_iterator<_CharT, _Traits>& __b) + { return !__a.equal(__b); } + + + template + class ostreambuf_iterator + : public iterator + { + public: + + + + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_streambuf<_CharT, _Traits> streambuf_type; + typedef basic_ostream<_CharT, _Traits> ostream_type; + + + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + ostreambuf_iterator<_CharT2> >::__type + copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + ostreambuf_iterator<_CharT2>); + + private: + streambuf_type* _M_sbuf; + bool _M_failed; + + public: + + ostreambuf_iterator(ostream_type& __s) throw () + : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { } + + + ostreambuf_iterator(streambuf_type* __s) throw () + : _M_sbuf(__s), _M_failed(!_M_sbuf) { } + + + ostreambuf_iterator& + operator=(_CharT __c) + { + if (!_M_failed && + _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof())) + _M_failed = true; + return *this; + } + + + ostreambuf_iterator& + operator*() + { return *this; } + + + ostreambuf_iterator& + operator++(int) + { return *this; } + + + ostreambuf_iterator& + operator++() + { return *this; } + + + bool + failed() const throw() + { return _M_failed; } + + ostreambuf_iterator& + _M_put(const _CharT* __ws, streamsize __len) + { + if (__builtin_expect(!_M_failed, true) + && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len, + false)) + _M_failed = true; + return *this; + } + }; + + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT> >::__type + copy(istreambuf_iterator<_CharT> __first, + istreambuf_iterator<_CharT> __last, + ostreambuf_iterator<_CharT> __result) + { + if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed) + { + bool __ineof; + __copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof); + if (!__ineof) + __result._M_failed = true; + } + return __result; + } + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT> >::__type + __copy_move_a2(_CharT* __first, _CharT* __last, + ostreambuf_iterator<_CharT> __result) + { + const streamsize __num = __last - __first; + if (__num > 0) + __result._M_put(__first, __num); + return __result; + } + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT> >::__type + __copy_move_a2(const _CharT* __first, const _CharT* __last, + ostreambuf_iterator<_CharT> __result) + { + const streamsize __num = __last - __first; + if (__num > 0) + __result._M_put(__first, __num); + return __result; + } + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + _CharT*>::__type + __copy_move_a2(istreambuf_iterator<_CharT> __first, + istreambuf_iterator<_CharT> __last, _CharT* __result) + { + typedef istreambuf_iterator<_CharT> __is_iterator_type; + typedef typename __is_iterator_type::traits_type traits_type; + typedef typename __is_iterator_type::streambuf_type streambuf_type; + typedef typename traits_type::int_type int_type; + + if (__first._M_sbuf && !__last._M_sbuf) + { + streambuf_type* __sb = __first._M_sbuf; + int_type __c = __sb->sgetc(); + while (!traits_type::eq_int_type(__c, traits_type::eof())) + { + const streamsize __n = __sb->egptr() - __sb->gptr(); + if (__n > 1) + { + traits_type::copy(__result, __sb->gptr(), __n); + __sb->__safe_gbump(__n); + __result += __n; + __c = __sb->underflow(); + } + else + { + *__result++ = traits_type::to_char_type(__c); + __c = __sb->snextc(); + } + } + } + return __result; + } + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + istreambuf_iterator<_CharT> >::__type + find(istreambuf_iterator<_CharT> __first, + istreambuf_iterator<_CharT> __last, const _CharT& __val) + { + typedef istreambuf_iterator<_CharT> __is_iterator_type; + typedef typename __is_iterator_type::traits_type traits_type; + typedef typename __is_iterator_type::streambuf_type streambuf_type; + typedef typename traits_type::int_type int_type; + + if (__first._M_sbuf && !__last._M_sbuf) + { + const int_type __ival = traits_type::to_int_type(__val); + streambuf_type* __sb = __first._M_sbuf; + int_type __c = __sb->sgetc(); + while (!traits_type::eq_int_type(__c, traits_type::eof()) + && !traits_type::eq_int_type(__c, __ival)) + { + streamsize __n = __sb->egptr() - __sb->gptr(); + if (__n > 1) + { + const _CharT* __p = traits_type::find(__sb->gptr(), + __n, __val); + if (__p) + __n = __p - __sb->gptr(); + __sb->__safe_gbump(__n); + __c = __sb->sgetc(); + } + else + __c = __sb->snextc(); + } + + if (!traits_type::eq_int_type(__c, traits_type::eof())) + __first._M_c = __c; + else + __first._M_sbuf = 0; + } + return __first; + } + + + + +} +# 51 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 66 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + template + void + __convert_to_v(const char*, _Tp&, ios_base::iostate&, + const __c_locale&) throw(); + + + template<> + void + __convert_to_v(const char*, float&, ios_base::iostate&, + const __c_locale&) throw(); + + template<> + void + __convert_to_v(const char*, double&, ios_base::iostate&, + const __c_locale&) throw(); + + template<> + void + __convert_to_v(const char*, long double&, ios_base::iostate&, + const __c_locale&) throw(); + + + + template + struct __pad + { + static void + _S_pad(ios_base& __io, _CharT __fill, _CharT* __news, + const _CharT* __olds, streamsize __newlen, streamsize __oldlen); + }; + + + + + + + template + _CharT* + __add_grouping(_CharT* __s, _CharT __sep, + const char* __gbeg, size_t __gsize, + const _CharT* __first, const _CharT* __last); + + + + + template + inline + ostreambuf_iterator<_CharT> + __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len) + { + __s._M_put(__ws, __len); + return __s; + } + + + template + inline + _OutIter + __write(_OutIter __s, const _CharT* __ws, int __len) + { + for (int __j = 0; __j < __len; __j++, ++__s) + *__s = __ws[__j]; + return __s; + } +# 144 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + template + class __ctype_abstract_base : public locale::facet, public ctype_base + { + public: + + + typedef _CharT char_type; +# 162 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + bool + is(mask __m, char_type __c) const + { return this->do_is(__m, __c); } +# 179 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + is(const char_type *__lo, const char_type *__hi, mask *__vec) const + { return this->do_is(__lo, __hi, __vec); } +# 195 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + scan_is(mask __m, const char_type* __lo, const char_type* __hi) const + { return this->do_scan_is(__m, __lo, __hi); } +# 211 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + scan_not(mask __m, const char_type* __lo, const char_type* __hi) const + { return this->do_scan_not(__m, __lo, __hi); } +# 225 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + char_type + toupper(char_type __c) const + { return this->do_toupper(__c); } +# 240 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + toupper(char_type *__lo, const char_type* __hi) const + { return this->do_toupper(__lo, __hi); } +# 254 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + char_type + tolower(char_type __c) const + { return this->do_tolower(__c); } +# 269 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + tolower(char_type* __lo, const char_type* __hi) const + { return this->do_tolower(__lo, __hi); } +# 286 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + char_type + widen(char __c) const + { return this->do_widen(__c); } +# 305 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + const char* + widen(const char* __lo, const char* __hi, char_type* __to) const + { return this->do_widen(__lo, __hi, __to); } +# 324 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + char + narrow(char_type __c, char __dfault) const + { return this->do_narrow(__c, __dfault); } +# 346 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char *__to) const + { return this->do_narrow(__lo, __hi, __dfault, __to); } + + protected: + explicit + __ctype_abstract_base(size_t __refs = 0): facet(__refs) { } + + virtual + ~__ctype_abstract_base() { } +# 371 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual bool + do_is(mask __m, char_type __c) const = 0; +# 390 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_is(const char_type* __lo, const char_type* __hi, + mask* __vec) const = 0; +# 409 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_scan_is(mask __m, const char_type* __lo, + const char_type* __hi) const = 0; +# 428 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_scan_not(mask __m, const char_type* __lo, + const char_type* __hi) const = 0; +# 446 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_toupper(char_type) const = 0; +# 463 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const = 0; +# 479 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_tolower(char_type) const = 0; +# 496 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const = 0; +# 515 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_widen(char) const = 0; +# 536 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual const char* + do_widen(const char* __lo, const char* __hi, + char_type* __dest) const = 0; +# 558 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual char + do_narrow(char_type, char __dfault) const = 0; +# 582 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char* __dest) const = 0; + }; +# 605 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + template + class ctype : public __ctype_abstract_base<_CharT> + { + public: + + typedef _CharT char_type; + typedef typename __ctype_abstract_base<_CharT>::mask mask; + + + static locale::id id; + + explicit + ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { } + + protected: + virtual + ~ctype(); + + virtual bool + do_is(mask __m, char_type __c) const; + + virtual const char_type* + do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; + + virtual const char_type* + do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; + + virtual const char_type* + do_scan_not(mask __m, const char_type* __lo, + const char_type* __hi) const; + + virtual char_type + do_toupper(char_type __c) const; + + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const; + + virtual char_type + do_tolower(char_type __c) const; + + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const; + + virtual char_type + do_widen(char __c) const; + + virtual const char* + do_widen(const char* __lo, const char* __hi, char_type* __dest) const; + + virtual char + do_narrow(char_type, char __dfault) const; + + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char* __dest) const; + }; + + template + locale::id ctype<_CharT>::id; +# 674 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + template<> + class ctype : public locale::facet, public ctype_base + { + public: + + + typedef char char_type; + + protected: + + __c_locale _M_c_locale_ctype; + bool _M_del; + __to_type _M_toupper; + __to_type _M_tolower; + const mask* _M_table; + mutable char _M_widen_ok; + mutable char _M_widen[1 + static_cast(-1)]; + mutable char _M_narrow[1 + static_cast(-1)]; + mutable char _M_narrow_ok; + + + public: + + static locale::id id; + + static const size_t table_size = 1 + static_cast(-1); +# 711 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + explicit + ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0); +# 724 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + explicit + ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false, + size_t __refs = 0); +# 737 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + inline bool + is(mask __m, char __c) const; +# 752 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + inline const char* + is(const char* __lo, const char* __hi, mask* __vec) const; +# 766 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + inline const char* + scan_is(mask __m, const char* __lo, const char* __hi) const; +# 780 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + inline const char* + scan_not(mask __m, const char* __lo, const char* __hi) const; +# 795 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + char_type + toupper(char_type __c) const + { return this->do_toupper(__c); } +# 812 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + toupper(char_type *__lo, const char_type* __hi) const + { return this->do_toupper(__lo, __hi); } +# 828 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + char_type + tolower(char_type __c) const + { return this->do_tolower(__c); } +# 845 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + tolower(char_type* __lo, const char_type* __hi) const + { return this->do_tolower(__lo, __hi); } +# 865 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + char_type + widen(char __c) const + { + if (_M_widen_ok) + return _M_widen[static_cast(__c)]; + this->_M_widen_init(); + return this->do_widen(__c); + } +# 892 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + const char* + widen(const char* __lo, const char* __hi, char_type* __to) const + { + if (_M_widen_ok == 1) + { + __builtin_memcpy(__to, __lo, __hi - __lo); + return __hi; + } + if (!_M_widen_ok) + _M_widen_init(); + return this->do_widen(__lo, __hi, __to); + } +# 923 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + char + narrow(char_type __c, char __dfault) const + { + if (_M_narrow[static_cast(__c)]) + return _M_narrow[static_cast(__c)]; + const char __t = do_narrow(__c, __dfault); + if (__t != __dfault) + _M_narrow[static_cast(__c)] = __t; + return __t; + } +# 956 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + const char_type* + narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char *__to) const + { + if (__builtin_expect(_M_narrow_ok == 1, true)) + { + __builtin_memcpy(__to, __lo, __hi - __lo); + return __hi; + } + if (!_M_narrow_ok) + _M_narrow_init(); + return this->do_narrow(__lo, __hi, __dfault, __to); + } + + + + + + const mask* + table() const throw() + { return _M_table; } + + + static const mask* + classic_table() throw(); + protected: + + + + + + + + virtual + ~ctype(); +# 1005 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_toupper(char_type) const; +# 1022 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const; +# 1038 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_tolower(char_type) const; +# 1055 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const; +# 1075 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_widen(char __c) const + { return __c; } +# 1098 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual const char* + do_widen(const char* __lo, const char* __hi, char_type* __dest) const + { + __builtin_memcpy(__dest, __lo, __hi - __lo); + return __hi; + } +# 1124 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual char + do_narrow(char_type __c, char) const + { return __c; } +# 1150 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char, char* __dest) const + { + __builtin_memcpy(__dest, __lo, __hi - __lo); + return __hi; + } + + private: + void _M_narrow_init() const; + void _M_widen_init() const; + }; +# 1175 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + template<> + class ctype : public __ctype_abstract_base + { + public: + + + typedef wchar_t char_type; + typedef wctype_t __wmask_type; + + protected: + __c_locale _M_c_locale_ctype; + + + bool _M_narrow_ok; + char _M_narrow[128]; + wint_t _M_widen[1 + static_cast(-1)]; + + + mask _M_bit[16]; + __wmask_type _M_wmask[16]; + + public: + + + static locale::id id; +# 1208 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + explicit + ctype(size_t __refs = 0); +# 1219 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + explicit + ctype(__c_locale __cloc, size_t __refs = 0); + + protected: + __wmask_type + _M_convert_to_wmask(const mask __m) const throw(); + + + virtual + ~ctype(); +# 1243 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual bool + do_is(mask __m, char_type __c) const; +# 1262 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; +# 1280 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; +# 1298 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_scan_not(mask __m, const char_type* __lo, + const char_type* __hi) const; +# 1315 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_toupper(char_type) const; +# 1332 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const; +# 1348 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_tolower(char_type) const; +# 1365 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const; +# 1385 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_widen(char) const; +# 1407 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual const char* + do_widen(const char* __lo, const char* __hi, char_type* __dest) const; +# 1430 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual char + do_narrow(char_type, char __dfault) const; +# 1456 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char* __dest) const; + + + void + _M_initialize_ctype() throw(); + }; + + + + template + class ctype_byname : public ctype<_CharT> + { + public: + typedef typename ctype<_CharT>::mask mask; + + explicit + ctype_byname(const char* __s, size_t __refs = 0); + + protected: + virtual + ~ctype_byname() { }; + }; + + + template<> + class ctype_byname : public ctype + { + public: + explicit + ctype_byname(const char* __s, size_t __refs = 0); + + protected: + virtual + ~ctype_byname(); + }; + + + template<> + class ctype_byname : public ctype + { + public: + explicit + ctype_byname(const char* __s, size_t __refs = 0); + + protected: + virtual + ~ctype_byname(); + }; + + + +} + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/ctype_inline.h" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/ctype_inline.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + bool + ctype:: + is(mask __m, char __c) const + { return _M_table[static_cast(__c)] & __m; } + + const char* + ctype:: + is(const char* __low, const char* __high, mask* __vec) const + { + while (__low < __high) + *__vec++ = _M_table[static_cast(*__low++)]; + return __high; + } + + const char* + ctype:: + scan_is(mask __m, const char* __low, const char* __high) const + { + while (__low < __high + && !(_M_table[static_cast(*__low)] & __m)) + ++__low; + return __low; + } + + const char* + ctype:: + scan_not(mask __m, const char* __low, const char* __high) const + { + while (__low < __high + && (_M_table[static_cast(*__low)] & __m) != 0) + ++__low; + return __low; + } + + +} +# 1513 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + + class __num_base + { + public: + + + enum + { + _S_ominus, + _S_oplus, + _S_ox, + _S_oX, + _S_odigits, + _S_odigits_end = _S_odigits + 16, + _S_oudigits = _S_odigits_end, + _S_oudigits_end = _S_oudigits + 16, + _S_oe = _S_odigits + 14, + _S_oE = _S_oudigits + 14, + _S_oend = _S_oudigits_end + }; + + + + + + + static const char* _S_atoms_out; + + + + static const char* _S_atoms_in; + + enum + { + _S_iminus, + _S_iplus, + _S_ix, + _S_iX, + _S_izero, + _S_ie = _S_izero + 14, + _S_iE = _S_izero + 20, + _S_iend = 26 + }; + + + + static void + _S_format_float(const ios_base& __io, char* __fptr, char __mod) throw(); + }; + + template + struct __numpunct_cache : public locale::facet + { + const char* _M_grouping; + size_t _M_grouping_size; + bool _M_use_grouping; + const _CharT* _M_truename; + size_t _M_truename_size; + const _CharT* _M_falsename; + size_t _M_falsename_size; + _CharT _M_decimal_point; + _CharT _M_thousands_sep; + + + + + + _CharT _M_atoms_out[__num_base::_S_oend]; + + + + + + _CharT _M_atoms_in[__num_base::_S_iend]; + + bool _M_allocated; + + __numpunct_cache(size_t __refs = 0) + : facet(__refs), _M_grouping(0), _M_grouping_size(0), + _M_use_grouping(false), + _M_truename(0), _M_truename_size(0), _M_falsename(0), + _M_falsename_size(0), _M_decimal_point(_CharT()), + _M_thousands_sep(_CharT()), _M_allocated(false) + { } + + ~__numpunct_cache(); + + void + _M_cache(const locale& __loc); + + private: + __numpunct_cache& + operator=(const __numpunct_cache&); + + explicit + __numpunct_cache(const __numpunct_cache&); + }; + + template + __numpunct_cache<_CharT>::~__numpunct_cache() + { + if (_M_allocated) + { + delete [] _M_grouping; + delete [] _M_truename; + delete [] _M_falsename; + } + } +# 1641 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + template + class numpunct : public locale::facet + { + public: + + + + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + typedef __numpunct_cache<_CharT> __cache_type; + + protected: + __cache_type* _M_data; + + public: + + static locale::id id; + + + + + + + explicit + numpunct(size_t __refs = 0) + : facet(__refs), _M_data(0) + { _M_initialize_numpunct(); } +# 1679 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + explicit + numpunct(__cache_type* __cache, size_t __refs = 0) + : facet(__refs), _M_data(__cache) + { _M_initialize_numpunct(); } +# 1693 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + explicit + numpunct(__c_locale __cloc, size_t __refs = 0) + : facet(__refs), _M_data(0) + { _M_initialize_numpunct(__cloc); } +# 1707 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + char_type + decimal_point() const + { return this->do_decimal_point(); } +# 1720 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + char_type + thousands_sep() const + { return this->do_thousands_sep(); } +# 1751 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + string + grouping() const + { return this->do_grouping(); } +# 1764 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + string_type + truename() const + { return this->do_truename(); } +# 1777 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + string_type + falsename() const + { return this->do_falsename(); } + + protected: + + virtual + ~numpunct(); +# 1794 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_decimal_point() const + { return _M_data->_M_decimal_point; } +# 1806 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual char_type + do_thousands_sep() const + { return _M_data->_M_thousands_sep; } +# 1819 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual string + do_grouping() const + { return _M_data->_M_grouping; } +# 1832 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual string_type + do_truename() const + { return _M_data->_M_truename; } +# 1845 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual string_type + do_falsename() const + { return _M_data->_M_falsename; } + + + void + _M_initialize_numpunct(__c_locale __cloc = 0); + }; + + template + locale::id numpunct<_CharT>::id; + + template<> + numpunct::~numpunct(); + + template<> + void + numpunct::_M_initialize_numpunct(__c_locale __cloc); + + + template<> + numpunct::~numpunct(); + + template<> + void + numpunct::_M_initialize_numpunct(__c_locale __cloc); + + + + template + class numpunct_byname : public numpunct<_CharT> + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + explicit + numpunct_byname(const char* __s, size_t __refs = 0) + : numpunct<_CharT>(__refs) + { + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + __c_locale __tmp; + this->_S_create_c_locale(__tmp, __s); + this->_M_initialize_numpunct(__tmp); + this->_S_destroy_c_locale(__tmp); + } + } + + protected: + virtual + ~numpunct_byname() { } + }; + + +# 1915 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + template + class num_get : public locale::facet + { + public: + + + + typedef _CharT char_type; + typedef _InIter iter_type; + + + + static locale::id id; +# 1936 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + explicit + num_get(size_t __refs = 0) : facet(__refs) { } +# 1962 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, bool& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } +# 1998 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned short& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned int& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long long& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long long& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } +# 2057 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, float& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, double& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long double& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } +# 2099 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, void*& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + + protected: + + virtual ~num_get() { } + + iter_type + _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&, + string&) const; + + template + iter_type + _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&, + _ValueT&) const; + + template + typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, int>::__type + _M_find(const _CharT2*, size_t __len, _CharT2 __c) const + { + int __ret = -1; + if (__len <= 10) + { + if (__c >= _CharT2('0') && __c < _CharT2(_CharT2('0') + __len)) + __ret = __c - _CharT2('0'); + } + else + { + if (__c >= _CharT2('0') && __c <= _CharT2('9')) + __ret = __c - _CharT2('0'); + else if (__c >= _CharT2('a') && __c <= _CharT2('f')) + __ret = 10 + (__c - _CharT2('a')); + else if (__c >= _CharT2('A') && __c <= _CharT2('F')) + __ret = 10 + (__c - _CharT2('A')); + } + return __ret; + } + + template + typename __gnu_cxx::__enable_if::__value, + int>::__type + _M_find(const _CharT2* __zero, size_t __len, _CharT2 __c) const + { + int __ret = -1; + const char_type* __q = char_traits<_CharT2>::find(__zero, __len, __c); + if (__q) + { + __ret = __q - __zero; + if (__ret > 15) + __ret -= 6; + } + return __ret; + } +# 2170 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const; + + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned short& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned int& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + + + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long long& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long long& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + + + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + float&) const; + + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + double&) const; + + + + + + + + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + long double&) const; + + + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + void*&) const; +# 2235 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + }; + + template + locale::id num_get<_CharT, _InIter>::id; +# 2253 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + template + class num_put : public locale::facet + { + public: + + + + typedef _CharT char_type; + typedef _OutIter iter_type; + + + + static locale::id id; +# 2274 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + explicit + num_put(size_t __refs = 0) : facet(__refs) { } +# 2292 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, bool __v) const + { return this->do_put(__s, __f, __fill, __v); } +# 2334 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, long __v) const + { return this->do_put(__s, __f, __fill, __v); } + + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + unsigned long __v) const + { return this->do_put(__s, __f, __fill, __v); } + + + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, long long __v) const + { return this->do_put(__s, __f, __fill, __v); } + + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + unsigned long long __v) const + { return this->do_put(__s, __f, __fill, __v); } +# 2397 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, double __v) const + { return this->do_put(__s, __f, __fill, __v); } + + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + long double __v) const + { return this->do_put(__s, __f, __fill, __v); } +# 2422 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + const void* __v) const + { return this->do_put(__s, __f, __fill, __v); } + + protected: + template + iter_type + _M_insert_float(iter_type, ios_base& __io, char_type __fill, + char __mod, _ValueT __v) const; + + void + _M_group_float(const char* __grouping, size_t __grouping_size, + char_type __sep, const char_type* __p, char_type* __new, + char_type* __cs, int& __len) const; + + template + iter_type + _M_insert_int(iter_type, ios_base& __io, char_type __fill, + _ValueT __v) const; + + void + _M_group_int(const char* __grouping, size_t __grouping_size, + char_type __sep, ios_base& __io, char_type* __new, + char_type* __cs, int& __len) const; + + void + _M_pad(char_type __fill, streamsize __w, ios_base& __io, + char_type* __new, const char_type* __cs, int& __len) const; + + + virtual + ~num_put() { }; +# 2470 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 3 + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, bool __v) const; + + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const + { return _M_insert_int(__s, __io, __fill, __v); } + + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, + unsigned long __v) const + { return _M_insert_int(__s, __io, __fill, __v); } + + + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, + long long __v) const + { return _M_insert_int(__s, __io, __fill, __v); } + + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, + unsigned long long __v) const + { return _M_insert_int(__s, __io, __fill, __v); } + + + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, double __v) const; + + + + + + + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, long double __v) const; + + + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, const void* __v) const; + + + + + + + + }; + + template + locale::id num_put<_CharT, _OutIter>::id; + + + + + + + + + + template + inline bool + isspace(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::space, __c); } + + + template + inline bool + isprint(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::print, __c); } + + + template + inline bool + iscntrl(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::cntrl, __c); } + + + template + inline bool + isupper(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::upper, __c); } + + + template + inline bool + islower(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::lower, __c); } + + + template + inline bool + isalpha(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::alpha, __c); } + + + template + inline bool + isdigit(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::digit, __c); } + + + template + inline bool + ispunct(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::punct, __c); } + + + template + inline bool + isxdigit(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::xdigit, __c); } + + + template + inline bool + isalnum(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::alnum, __c); } + + + template + inline bool + isgraph(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::graph, __c); } + + + template + inline _CharT + toupper(_CharT __c, const locale& __loc) + { return use_facet >(__loc).toupper(__c); } + + + template + inline _CharT + tolower(_CharT __c, const locale& __loc) + { return use_facet >(__loc).tolower(__c); } + + +} + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.tcc" 1 3 +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.tcc" 3 + +# 36 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.tcc" 3 + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + + + template + struct __use_cache + { + const _Facet* + operator() (const locale& __loc) const; + }; + + + template + struct __use_cache<__numpunct_cache<_CharT> > + { + const __numpunct_cache<_CharT>* + operator() (const locale& __loc) const + { + const size_t __i = numpunct<_CharT>::id._M_id(); + const locale::facet** __caches = __loc._M_impl->_M_caches; + if (!__caches[__i]) + { + __numpunct_cache<_CharT>* __tmp = 0; + try + { + __tmp = new __numpunct_cache<_CharT>; + __tmp->_M_cache(__loc); + } + catch(...) + { + delete __tmp; + throw; + } + __loc._M_impl->_M_install_cache(__tmp, __i); + } + return static_cast*>(__caches[__i]); + } + }; + + template + void + __numpunct_cache<_CharT>::_M_cache(const locale& __loc) + { + _M_allocated = true; + + const numpunct<_CharT>& __np = use_facet >(__loc); + + char* __grouping = 0; + _CharT* __truename = 0; + _CharT* __falsename = 0; + try + { + _M_grouping_size = __np.grouping().size(); + __grouping = new char[_M_grouping_size]; + __np.grouping().copy(__grouping, _M_grouping_size); + _M_grouping = __grouping; + _M_use_grouping = (_M_grouping_size + && static_cast(_M_grouping[0]) > 0 + && (_M_grouping[0] + != __gnu_cxx::__numeric_traits::__max)); + + _M_truename_size = __np.truename().size(); + __truename = new _CharT[_M_truename_size]; + __np.truename().copy(__truename, _M_truename_size); + _M_truename = __truename; + + _M_falsename_size = __np.falsename().size(); + __falsename = new _CharT[_M_falsename_size]; + __np.falsename().copy(__falsename, _M_falsename_size); + _M_falsename = __falsename; + + _M_decimal_point = __np.decimal_point(); + _M_thousands_sep = __np.thousands_sep(); + + const ctype<_CharT>& __ct = use_facet >(__loc); + __ct.widen(__num_base::_S_atoms_out, + __num_base::_S_atoms_out + + __num_base::_S_oend, _M_atoms_out); + __ct.widen(__num_base::_S_atoms_in, + __num_base::_S_atoms_in + + __num_base::_S_iend, _M_atoms_in); + } + catch(...) + { + delete [] __grouping; + delete [] __truename; + delete [] __falsename; + throw; + } + } +# 138 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.tcc" 3 + __attribute__ ((__pure__)) bool + __verify_grouping(const char* __grouping, size_t __grouping_size, + const string& __grouping_tmp) throw (); + + + + template + _InIter + num_get<_CharT, _InIter>:: + _M_extract_float(_InIter __beg, _InIter __end, ios_base& __io, + ios_base::iostate& __err, string& __xtrc) const + { + typedef char_traits<_CharT> __traits_type; + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + const _CharT* __lit = __lc->_M_atoms_in; + char_type __c = char_type(); + + + bool __testeof = __beg == __end; + + + if (!__testeof) + { + __c = *__beg; + const bool __plus = __c == __lit[__num_base::_S_iplus]; + if ((__plus || __c == __lit[__num_base::_S_iminus]) + && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + && !(__c == __lc->_M_decimal_point)) + { + __xtrc += __plus ? '+' : '-'; + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + } + + + bool __found_mantissa = false; + int __sep_pos = 0; + while (!__testeof) + { + if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + || __c == __lc->_M_decimal_point) + break; + else if (__c == __lit[__num_base::_S_izero]) + { + if (!__found_mantissa) + { + __xtrc += '0'; + __found_mantissa = true; + } + ++__sep_pos; + + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + else + break; + } + + + bool __found_dec = false; + bool __found_sci = false; + string __found_grouping; + if (__lc->_M_use_grouping) + __found_grouping.reserve(32); + const char_type* __lit_zero = __lit + __num_base::_S_izero; + + if (!__lc->_M_allocated) + + while (!__testeof) + { + const int __digit = _M_find(__lit_zero, 10, __c); + if (__digit != -1) + { + __xtrc += '0' + __digit; + __found_mantissa = true; + } + else if (__c == __lc->_M_decimal_point + && !__found_dec && !__found_sci) + { + __xtrc += '.'; + __found_dec = true; + } + else if ((__c == __lit[__num_base::_S_ie] + || __c == __lit[__num_base::_S_iE]) + && !__found_sci && __found_mantissa) + { + + __xtrc += 'e'; + __found_sci = true; + + + if (++__beg != __end) + { + __c = *__beg; + const bool __plus = __c == __lit[__num_base::_S_iplus]; + if (__plus || __c == __lit[__num_base::_S_iminus]) + __xtrc += __plus ? '+' : '-'; + else + continue; + } + else + { + __testeof = true; + break; + } + } + else + break; + + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + else + while (!__testeof) + { + + + if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + { + if (!__found_dec && !__found_sci) + { + + + if (__sep_pos) + { + __found_grouping += static_cast(__sep_pos); + __sep_pos = 0; + } + else + { + + + __xtrc.clear(); + break; + } + } + else + break; + } + else if (__c == __lc->_M_decimal_point) + { + if (!__found_dec && !__found_sci) + { + + + + if (__found_grouping.size()) + __found_grouping += static_cast(__sep_pos); + __xtrc += '.'; + __found_dec = true; + } + else + break; + } + else + { + const char_type* __q = + __traits_type::find(__lit_zero, 10, __c); + if (__q) + { + __xtrc += '0' + (__q - __lit_zero); + __found_mantissa = true; + ++__sep_pos; + } + else if ((__c == __lit[__num_base::_S_ie] + || __c == __lit[__num_base::_S_iE]) + && !__found_sci && __found_mantissa) + { + + if (__found_grouping.size() && !__found_dec) + __found_grouping += static_cast(__sep_pos); + __xtrc += 'e'; + __found_sci = true; + + + if (++__beg != __end) + { + __c = *__beg; + const bool __plus = __c == __lit[__num_base::_S_iplus]; + if ((__plus || __c == __lit[__num_base::_S_iminus]) + && !(__lc->_M_use_grouping + && __c == __lc->_M_thousands_sep) + && !(__c == __lc->_M_decimal_point)) + __xtrc += __plus ? '+' : '-'; + else + continue; + } + else + { + __testeof = true; + break; + } + } + else + break; + } + + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + + + + if (__found_grouping.size()) + { + + if (!__found_dec && !__found_sci) + __found_grouping += static_cast(__sep_pos); + + if (!std::__verify_grouping(__lc->_M_grouping, + __lc->_M_grouping_size, + __found_grouping)) + __err = ios_base::failbit; + } + + return __beg; + } + + template + template + _InIter + num_get<_CharT, _InIter>:: + _M_extract_int(_InIter __beg, _InIter __end, ios_base& __io, + ios_base::iostate& __err, _ValueT& __v) const + { + typedef char_traits<_CharT> __traits_type; + using __gnu_cxx::__add_unsigned; + typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + const _CharT* __lit = __lc->_M_atoms_in; + char_type __c = char_type(); + + + const ios_base::fmtflags __basefield = __io.flags() + & ios_base::basefield; + const bool __oct = __basefield == ios_base::oct; + int __base = __oct ? 8 : (__basefield == ios_base::hex ? 16 : 10); + + + bool __testeof = __beg == __end; + + + bool __negative = false; + if (!__testeof) + { + __c = *__beg; + __negative = __c == __lit[__num_base::_S_iminus]; + if ((__negative || __c == __lit[__num_base::_S_iplus]) + && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + && !(__c == __lc->_M_decimal_point)) + { + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + } + + + + bool __found_zero = false; + int __sep_pos = 0; + while (!__testeof) + { + if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + || __c == __lc->_M_decimal_point) + break; + else if (__c == __lit[__num_base::_S_izero] + && (!__found_zero || __base == 10)) + { + __found_zero = true; + ++__sep_pos; + if (__basefield == 0) + __base = 8; + if (__base == 8) + __sep_pos = 0; + } + else if (__found_zero + && (__c == __lit[__num_base::_S_ix] + || __c == __lit[__num_base::_S_iX])) + { + if (__basefield == 0) + __base = 16; + if (__base == 16) + { + __found_zero = false; + __sep_pos = 0; + } + else + break; + } + else + break; + + if (++__beg != __end) + { + __c = *__beg; + if (!__found_zero) + break; + } + else + __testeof = true; + } + + + + const size_t __len = (__base == 16 ? __num_base::_S_iend + - __num_base::_S_izero : __base); + + + string __found_grouping; + if (__lc->_M_use_grouping) + __found_grouping.reserve(32); + bool __testfail = false; + bool __testoverflow = false; + const __unsigned_type __max = + (__negative && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) + ? -__gnu_cxx::__numeric_traits<_ValueT>::__min + : __gnu_cxx::__numeric_traits<_ValueT>::__max; + const __unsigned_type __smax = __max / __base; + __unsigned_type __result = 0; + int __digit = 0; + const char_type* __lit_zero = __lit + __num_base::_S_izero; + + if (!__lc->_M_allocated) + + while (!__testeof) + { + __digit = _M_find(__lit_zero, __len, __c); + if (__digit == -1) + break; + + if (__result > __smax) + __testoverflow = true; + else + { + __result *= __base; + __testoverflow |= __result > __max - __digit; + __result += __digit; + ++__sep_pos; + } + + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + else + while (!__testeof) + { + + + if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + { + + + if (__sep_pos) + { + __found_grouping += static_cast(__sep_pos); + __sep_pos = 0; + } + else + { + __testfail = true; + break; + } + } + else if (__c == __lc->_M_decimal_point) + break; + else + { + const char_type* __q = + __traits_type::find(__lit_zero, __len, __c); + if (!__q) + break; + + __digit = __q - __lit_zero; + if (__digit > 15) + __digit -= 6; + if (__result > __smax) + __testoverflow = true; + else + { + __result *= __base; + __testoverflow |= __result > __max - __digit; + __result += __digit; + ++__sep_pos; + } + } + + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + + + + if (__found_grouping.size()) + { + + __found_grouping += static_cast(__sep_pos); + + if (!std::__verify_grouping(__lc->_M_grouping, + __lc->_M_grouping_size, + __found_grouping)) + __err = ios_base::failbit; + } + + + + if ((!__sep_pos && !__found_zero && !__found_grouping.size()) + || __testfail) + { + __v = 0; + __err = ios_base::failbit; + } + else if (__testoverflow) + { + if (__negative + && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) + __v = __gnu_cxx::__numeric_traits<_ValueT>::__min; + else + __v = __gnu_cxx::__numeric_traits<_ValueT>::__max; + __err = ios_base::failbit; + } + else + __v = __negative ? -__result : __result; + + if (__testeof) + __err |= ios_base::eofbit; + return __beg; + } + + + + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, bool& __v) const + { + if (!(__io.flags() & ios_base::boolalpha)) + { + + + + long __l = -1; + __beg = _M_extract_int(__beg, __end, __io, __err, __l); + if (__l == 0 || __l == 1) + __v = bool(__l); + else + { + + + __v = true; + __err = ios_base::failbit; + if (__beg == __end) + __err |= ios_base::eofbit; + } + } + else + { + + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + + bool __testf = true; + bool __testt = true; + bool __donef = __lc->_M_falsename_size == 0; + bool __donet = __lc->_M_truename_size == 0; + bool __testeof = false; + size_t __n = 0; + while (!__donef || !__donet) + { + if (__beg == __end) + { + __testeof = true; + break; + } + + const char_type __c = *__beg; + + if (!__donef) + __testf = __c == __lc->_M_falsename[__n]; + + if (!__testf && __donet) + break; + + if (!__donet) + __testt = __c == __lc->_M_truename[__n]; + + if (!__testt && __donef) + break; + + if (!__testt && !__testf) + break; + + ++__n; + ++__beg; + + __donef = !__testf || __n >= __lc->_M_falsename_size; + __donet = !__testt || __n >= __lc->_M_truename_size; + } + if (__testf && __n == __lc->_M_falsename_size && __n) + { + __v = false; + if (__testt && __n == __lc->_M_truename_size) + __err = ios_base::failbit; + else + __err = __testeof ? ios_base::eofbit : ios_base::goodbit; + } + else if (__testt && __n == __lc->_M_truename_size && __n) + { + __v = true; + __err = __testeof ? ios_base::eofbit : ios_base::goodbit; + } + else + { + + + __v = false; + __err = ios_base::failbit; + if (__testeof) + __err |= ios_base::eofbit; + } + } + return __beg; + } + + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, float& __v) const + { + string __xtrc; + __xtrc.reserve(32); + __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); + std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, double& __v) const + { + string __xtrc; + __xtrc.reserve(32); + __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); + std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } +# 732 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.tcc" 3 + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long double& __v) const + { + string __xtrc; + __xtrc.reserve(32); + __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); + std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, void*& __v) const + { + + typedef ios_base::fmtflags fmtflags; + const fmtflags __fmt = __io.flags(); + __io.flags((__fmt & ~ios_base::basefield) | ios_base::hex); + + typedef __gnu_cxx::__conditional_type<(sizeof(void*) + <= sizeof(unsigned long)), + unsigned long, unsigned long long>::__type _UIntPtrType; + + _UIntPtrType __ul; + __beg = _M_extract_int(__beg, __end, __io, __err, __ul); + + + __io.flags(__fmt); + + __v = reinterpret_cast(__ul); + return __beg; + } + + + + template + void + num_put<_CharT, _OutIter>:: + _M_pad(_CharT __fill, streamsize __w, ios_base& __io, + _CharT* __new, const _CharT* __cs, int& __len) const + { + + + __pad<_CharT, char_traits<_CharT> >::_S_pad(__io, __fill, __new, + __cs, __w, __len); + __len = static_cast(__w); + } + + + + template + int + __int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit, + ios_base::fmtflags __flags, bool __dec) + { + _CharT* __buf = __bufend; + if (__builtin_expect(__dec, true)) + { + + do + { + *--__buf = __lit[(__v % 10) + __num_base::_S_odigits]; + __v /= 10; + } + while (__v != 0); + } + else if ((__flags & ios_base::basefield) == ios_base::oct) + { + + do + { + *--__buf = __lit[(__v & 0x7) + __num_base::_S_odigits]; + __v >>= 3; + } + while (__v != 0); + } + else + { + + const bool __uppercase = __flags & ios_base::uppercase; + const int __case_offset = __uppercase ? __num_base::_S_oudigits + : __num_base::_S_odigits; + do + { + *--__buf = __lit[(__v & 0xf) + __case_offset]; + __v >>= 4; + } + while (__v != 0); + } + return __bufend - __buf; + } + + + + template + void + num_put<_CharT, _OutIter>:: + _M_group_int(const char* __grouping, size_t __grouping_size, _CharT __sep, + ios_base&, _CharT* __new, _CharT* __cs, int& __len) const + { + _CharT* __p = std::__add_grouping(__new, __sep, __grouping, + __grouping_size, __cs, __cs + __len); + __len = __p - __new; + } + + template + template + _OutIter + num_put<_CharT, _OutIter>:: + _M_insert_int(_OutIter __s, ios_base& __io, _CharT __fill, + _ValueT __v) const + { + using __gnu_cxx::__add_unsigned; + typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + const _CharT* __lit = __lc->_M_atoms_out; + const ios_base::fmtflags __flags = __io.flags(); + + + const int __ilen = 5 * sizeof(_ValueT); + _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __ilen)); + + + + const ios_base::fmtflags __basefield = __flags & ios_base::basefield; + const bool __dec = (__basefield != ios_base::oct + && __basefield != ios_base::hex); + const __unsigned_type __u = ((__v > 0 || !__dec) + ? __unsigned_type(__v) + : -__unsigned_type(__v)); + int __len = __int_to_char(__cs + __ilen, __u, __lit, __flags, __dec); + __cs += __ilen - __len; + + + if (__lc->_M_use_grouping) + { + + + _CharT* __cs2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * (__len + 1) + * 2)); + _M_group_int(__lc->_M_grouping, __lc->_M_grouping_size, + __lc->_M_thousands_sep, __io, __cs2 + 2, __cs, __len); + __cs = __cs2 + 2; + } + + + if (__builtin_expect(__dec, true)) + { + + if (__v >= 0) + { + if (bool(__flags & ios_base::showpos) + && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) + *--__cs = __lit[__num_base::_S_oplus], ++__len; + } + else + *--__cs = __lit[__num_base::_S_ominus], ++__len; + } + else if (bool(__flags & ios_base::showbase) && __v) + { + if (__basefield == ios_base::oct) + *--__cs = __lit[__num_base::_S_odigits], ++__len; + else + { + + const bool __uppercase = __flags & ios_base::uppercase; + *--__cs = __lit[__num_base::_S_ox + __uppercase]; + + *--__cs = __lit[__num_base::_S_odigits]; + __len += 2; + } + } + + + const streamsize __w = __io.width(); + if (__w > static_cast(__len)) + { + _CharT* __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __w)); + _M_pad(__fill, __w, __io, __cs3, __cs, __len); + __cs = __cs3; + } + __io.width(0); + + + + return std::__write(__s, __cs, __len); + } + + template + void + num_put<_CharT, _OutIter>:: + _M_group_float(const char* __grouping, size_t __grouping_size, + _CharT __sep, const _CharT* __p, _CharT* __new, + _CharT* __cs, int& __len) const + { + + + + const int __declen = __p ? __p - __cs : __len; + _CharT* __p2 = std::__add_grouping(__new, __sep, __grouping, + __grouping_size, + __cs, __cs + __declen); + + + int __newlen = __p2 - __new; + if (__p) + { + char_traits<_CharT>::copy(__p2, __p, __len - __declen); + __newlen += __len - __declen; + } + __len = __newlen; + } +# 968 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.tcc" 3 + template + template + _OutIter + num_put<_CharT, _OutIter>:: + _M_insert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod, + _ValueT __v) const + { + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + + + const streamsize __prec = __io.precision() < 0 ? 6 : __io.precision(); + + const int __max_digits = + __gnu_cxx::__numeric_traits<_ValueT>::__digits10; + + + int __len; + + char __fbuf[16]; + __num_base::_S_format_float(__io, __fbuf, __mod); + + + + + int __cs_size = __max_digits * 3; + char* __cs = static_cast(__builtin_alloca(__cs_size)); + __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, + __fbuf, __prec, __v); + + + if (__len >= __cs_size) + { + __cs_size = __len + 1; + __cs = static_cast(__builtin_alloca(__cs_size)); + __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, + __fbuf, __prec, __v); + } +# 1029 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.tcc" 3 + const ctype<_CharT>& __ctype = use_facet >(__loc); + + _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __len)); + __ctype.widen(__cs, __cs + __len, __ws); + + + _CharT* __wp = 0; + const char* __p = char_traits::find(__cs, __len, '.'); + if (__p) + { + __wp = __ws + (__p - __cs); + *__wp = __lc->_M_decimal_point; + } + + + + + if (__lc->_M_use_grouping + && (__wp || __len < 3 || (__cs[1] <= '9' && __cs[2] <= '9' + && __cs[1] >= '0' && __cs[2] >= '0'))) + { + + + _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __len * 2)); + + streamsize __off = 0; + if (__cs[0] == '-' || __cs[0] == '+') + { + __off = 1; + __ws2[0] = __ws[0]; + __len -= 1; + } + + _M_group_float(__lc->_M_grouping, __lc->_M_grouping_size, + __lc->_M_thousands_sep, __wp, __ws2 + __off, + __ws + __off, __len); + __len += __off; + + __ws = __ws2; + } + + + const streamsize __w = __io.width(); + if (__w > static_cast(__len)) + { + _CharT* __ws3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __w)); + _M_pad(__fill, __w, __io, __ws3, __ws, __len); + __ws = __ws3; + } + __io.width(0); + + + + return std::__write(__s, __ws, __len); + } + + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const + { + const ios_base::fmtflags __flags = __io.flags(); + if ((__flags & ios_base::boolalpha) == 0) + { + const long __l = __v; + __s = _M_insert_int(__s, __io, __fill, __l); + } + else + { + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + + const _CharT* __name = __v ? __lc->_M_truename + : __lc->_M_falsename; + int __len = __v ? __lc->_M_truename_size + : __lc->_M_falsename_size; + + const streamsize __w = __io.width(); + if (__w > static_cast(__len)) + { + const streamsize __plen = __w - __len; + _CharT* __ps + = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __plen)); + + char_traits<_CharT>::assign(__ps, __plen, __fill); + __io.width(0); + + if ((__flags & ios_base::adjustfield) == ios_base::left) + { + __s = std::__write(__s, __name, __len); + __s = std::__write(__s, __ps, __plen); + } + else + { + __s = std::__write(__s, __ps, __plen); + __s = std::__write(__s, __name, __len); + } + return __s; + } + __io.width(0); + __s = std::__write(__s, __name, __len); + } + return __s; + } + + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const + { return _M_insert_float(__s, __io, __fill, char(), __v); } +# 1154 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.tcc" 3 + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, + long double __v) const + { return _M_insert_float(__s, __io, __fill, 'L', __v); } + + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, + const void* __v) const + { + const ios_base::fmtflags __flags = __io.flags(); + const ios_base::fmtflags __fmt = ~(ios_base::basefield + | ios_base::uppercase); + __io.flags((__flags & __fmt) | (ios_base::hex | ios_base::showbase)); + + typedef __gnu_cxx::__conditional_type<(sizeof(const void*) + <= sizeof(unsigned long)), + unsigned long, unsigned long long>::__type _UIntPtrType; + + __s = _M_insert_int(__s, __io, __fill, + reinterpret_cast<_UIntPtrType>(__v)); + __io.flags(__flags); + return __s; + } + + +# 1191 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.tcc" 3 + template + void + __pad<_CharT, _Traits>::_S_pad(ios_base& __io, _CharT __fill, + _CharT* __news, const _CharT* __olds, + streamsize __newlen, streamsize __oldlen) + { + const size_t __plen = static_cast(__newlen - __oldlen); + const ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield; + + + if (__adjust == ios_base::left) + { + _Traits::copy(__news, __olds, __oldlen); + _Traits::assign(__news + __oldlen, __plen, __fill); + return; + } + + size_t __mod = 0; + if (__adjust == ios_base::internal) + { + + + + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + + if (__ctype.widen('-') == __olds[0] + || __ctype.widen('+') == __olds[0]) + { + __news[0] = __olds[0]; + __mod = 1; + ++__news; + } + else if (__ctype.widen('0') == __olds[0] + && __oldlen > 1 + && (__ctype.widen('x') == __olds[1] + || __ctype.widen('X') == __olds[1])) + { + __news[0] = __olds[0]; + __news[1] = __olds[1]; + __mod = 2; + __news += 2; + } + + } + _Traits::assign(__news, __plen, __fill); + _Traits::copy(__news + __plen, __olds + __mod, __oldlen - __mod); + } + + template + _CharT* + __add_grouping(_CharT* __s, _CharT __sep, + const char* __gbeg, size_t __gsize, + const _CharT* __first, const _CharT* __last) + { + size_t __idx = 0; + size_t __ctr = 0; + + while (__last - __first > __gbeg[__idx] + && static_cast(__gbeg[__idx]) > 0 + && __gbeg[__idx] != __gnu_cxx::__numeric_traits::__max) + { + __last -= __gbeg[__idx]; + __idx < __gsize - 1 ? ++__idx : ++__ctr; + } + + while (__first != __last) + *__s++ = *__first++; + + while (__ctr--) + { + *__s++ = __sep; + for (char __i = __gbeg[__idx]; __i > 0; --__i) + *__s++ = *__first++; + } + + while (__idx--) + { + *__s++ = __sep; + for (char __i = __gbeg[__idx]; __i > 0; --__i) + *__s++ = *__first++; + } + + return __s; + } + + + + + extern template class numpunct; + extern template class numpunct_byname; + extern template class num_get; + extern template class num_put; + extern template class ctype_byname; + + extern template + const ctype& + use_facet >(const locale&); + + extern template + const numpunct& + use_facet >(const locale&); + + extern template + const num_put& + use_facet >(const locale&); + + extern template + const num_get& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + extern template class numpunct; + extern template class numpunct_byname; + extern template class num_get; + extern template class num_put; + extern template class ctype_byname; + + extern template + const ctype& + use_facet >(const locale&); + + extern template + const numpunct& + use_facet >(const locale&); + + extern template + const num_put& + use_facet >(const locale&); + + extern template + const num_get& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + + +} +# 2609 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets.h" 2 3 +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_ios.h" 2 3 + + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + template + inline const _Facet& + __check_facet(const _Facet* __f) + { + if (!__f) + __throw_bad_cast(); + return *__f; + } +# 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_ios.h" 3 + template + class basic_ios : public ios_base + { + public: + + + + + + + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + + + + + + + typedef ctype<_CharT> __ctype_type; + typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > + __num_put_type; + typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > + __num_get_type; + + + + protected: + basic_ostream<_CharT, _Traits>* _M_tie; + mutable char_type _M_fill; + mutable bool _M_fill_init; + basic_streambuf<_CharT, _Traits>* _M_streambuf; + + + const __ctype_type* _M_ctype; + + const __num_put_type* _M_num_put; + + const __num_get_type* _M_num_get; + + public: + + + + + + + + operator void*() const + { return this->fail() ? 0 : const_cast(this); } + + bool + operator!() const + { return this->fail(); } +# 128 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_ios.h" 3 + iostate + rdstate() const + { return _M_streambuf_state; } +# 139 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_ios.h" 3 + void + clear(iostate __state = goodbit); + + + + + + + + void + setstate(iostate __state) + { this->clear(this->rdstate() | __state); } + + + + + void + _M_setstate(iostate __state) + { + + + _M_streambuf_state |= __state; + if (this->exceptions() & __state) + throw; + } + + + + + + + + bool + good() const + { return this->rdstate() == 0; } + + + + + + + + bool + eof() const + { return (this->rdstate() & eofbit) != 0; } +# 192 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_ios.h" 3 + bool + fail() const + { return (this->rdstate() & (badbit | failbit)) != 0; } + + + + + + + + bool + bad() const + { return (this->rdstate() & badbit) != 0; } +# 213 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_ios.h" 3 + iostate + exceptions() const + { return _M_exception; } +# 248 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_ios.h" 3 + void + exceptions(iostate __except) + { + _M_exception = __except; + this->clear(_M_streambuf_state); + } + + + + + + + + explicit + basic_ios(basic_streambuf<_CharT, _Traits>* __sb) + : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0), + _M_ctype(0), _M_num_put(0), _M_num_get(0) + { this->init(__sb); } + + + + + + + + virtual + ~basic_ios() { } +# 286 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_ios.h" 3 + basic_ostream<_CharT, _Traits>* + tie() const + { return _M_tie; } +# 298 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_ios.h" 3 + basic_ostream<_CharT, _Traits>* + tie(basic_ostream<_CharT, _Traits>* __tiestr) + { + basic_ostream<_CharT, _Traits>* __old = _M_tie; + _M_tie = __tiestr; + return __old; + } + + + + + + + + basic_streambuf<_CharT, _Traits>* + rdbuf() const + { return _M_streambuf; } +# 338 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_ios.h" 3 + basic_streambuf<_CharT, _Traits>* + rdbuf(basic_streambuf<_CharT, _Traits>* __sb); +# 352 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_ios.h" 3 + basic_ios& + copyfmt(const basic_ios& __rhs); + + + + + + + + char_type + fill() const + { + if (!_M_fill_init) + { + _M_fill = this->widen(' '); + _M_fill_init = true; + } + return _M_fill; + } +# 381 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_ios.h" 3 + char_type + fill(char_type __ch) + { + char_type __old = this->fill(); + _M_fill = __ch; + return __old; + } +# 401 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_ios.h" 3 + locale + imbue(const locale& __loc); +# 421 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_ios.h" 3 + char + narrow(char_type __c, char __dfault) const + { return __check_facet(_M_ctype).narrow(__c, __dfault); } +# 440 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_ios.h" 3 + char_type + widen(char __c) const + { return __check_facet(_M_ctype).widen(__c); } + + protected: + + + + + + + + basic_ios() + : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false), + _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0) + { } + + + + + + + + void + init(basic_streambuf<_CharT, _Traits>* __sb); + + void + _M_cache_locale(const locale& __loc); + }; + + +} + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_ios.tcc" 1 3 +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_ios.tcc" 3 + +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_ios.tcc" 3 + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + template + void + basic_ios<_CharT, _Traits>::clear(iostate __state) + { + if (this->rdbuf()) + _M_streambuf_state = __state; + else + _M_streambuf_state = __state | badbit; + if (this->exceptions() & this->rdstate()) + __throw_ios_failure(("basic_ios::clear")); + } + + template + basic_streambuf<_CharT, _Traits>* + basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb) + { + basic_streambuf<_CharT, _Traits>* __old = _M_streambuf; + _M_streambuf = __sb; + this->clear(); + return __old; + } + + template + basic_ios<_CharT, _Traits>& + basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs) + { + + + if (this != &__rhs) + { + + + + + _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ? + _M_local_word : new _Words[__rhs._M_word_size]; + + + _Callback_list* __cb = __rhs._M_callbacks; + if (__cb) + __cb->_M_add_reference(); + _M_call_callbacks(erase_event); + if (_M_word != _M_local_word) + { + delete [] _M_word; + _M_word = 0; + } + _M_dispose_callbacks(); + + + _M_callbacks = __cb; + for (int __i = 0; __i < __rhs._M_word_size; ++__i) + __words[__i] = __rhs._M_word[__i]; + _M_word = __words; + _M_word_size = __rhs._M_word_size; + + this->flags(__rhs.flags()); + this->width(__rhs.width()); + this->precision(__rhs.precision()); + this->tie(__rhs.tie()); + this->fill(__rhs.fill()); + _M_ios_locale = __rhs.getloc(); + _M_cache_locale(_M_ios_locale); + + _M_call_callbacks(copyfmt_event); + + + this->exceptions(__rhs.exceptions()); + } + return *this; + } + + + template + locale + basic_ios<_CharT, _Traits>::imbue(const locale& __loc) + { + locale __old(this->getloc()); + ios_base::imbue(__loc); + _M_cache_locale(__loc); + if (this->rdbuf() != 0) + this->rdbuf()->pubimbue(__loc); + return __old; + } + + template + void + basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb) + { + + ios_base::_M_init(); + + + _M_cache_locale(_M_ios_locale); +# 147 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_ios.tcc" 3 + _M_fill = _CharT(); + _M_fill_init = false; + + _M_tie = 0; + _M_exception = goodbit; + _M_streambuf = __sb; + _M_streambuf_state = __sb ? goodbit : badbit; + } + + template + void + basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc) + { + if (__builtin_expect(has_facet<__ctype_type>(__loc), true)) + _M_ctype = &use_facet<__ctype_type>(__loc); + else + _M_ctype = 0; + + if (__builtin_expect(has_facet<__num_put_type>(__loc), true)) + _M_num_put = &use_facet<__num_put_type>(__loc); + else + _M_num_put = 0; + + if (__builtin_expect(has_facet<__num_get_type>(__loc), true)) + _M_num_get = &use_facet<__num_get_type>(__loc); + else + _M_num_get = 0; + } + + + + + extern template class basic_ios; + + + extern template class basic_ios; + + + + +} +# 474 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/basic_ios.h" 2 3 +# 46 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ios" 2 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ostream" 2 3 + + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 56 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ostream" 3 + template + class basic_ostream : virtual public basic_ios<_CharT, _Traits> + { + public: + + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + + + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef basic_ios<_CharT, _Traits> __ios_type; + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > + __num_put_type; + typedef ctype<_CharT> __ctype_type; +# 83 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ostream" 3 + explicit + basic_ostream(__streambuf_type* __sb) + { this->init(__sb); } + + + + + + + virtual + ~basic_ostream() { } + + + class sentry; + friend class sentry; +# 109 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ostream" 3 + __ostream_type& + operator<<(__ostream_type& (*__pf)(__ostream_type&)) + { + + + + return __pf(*this); + } + + __ostream_type& + operator<<(__ios_type& (*__pf)(__ios_type&)) + { + + + + __pf(*this); + return *this; + } + + __ostream_type& + operator<<(ios_base& (*__pf) (ios_base&)) + { + + + + __pf(*this); + return *this; + } +# 166 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ostream" 3 + __ostream_type& + operator<<(long __n) + { return _M_insert(__n); } + + __ostream_type& + operator<<(unsigned long __n) + { return _M_insert(__n); } + + __ostream_type& + operator<<(bool __n) + { return _M_insert(__n); } + + __ostream_type& + operator<<(short __n); + + __ostream_type& + operator<<(unsigned short __n) + { + + + return _M_insert(static_cast(__n)); + } + + __ostream_type& + operator<<(int __n); + + __ostream_type& + operator<<(unsigned int __n) + { + + + return _M_insert(static_cast(__n)); + } + + + __ostream_type& + operator<<(long long __n) + { return _M_insert(__n); } + + __ostream_type& + operator<<(unsigned long long __n) + { return _M_insert(__n); } + + + __ostream_type& + operator<<(double __f) + { return _M_insert(__f); } + + __ostream_type& + operator<<(float __f) + { + + + return _M_insert(static_cast(__f)); + } + + __ostream_type& + operator<<(long double __f) + { return _M_insert(__f); } + + __ostream_type& + operator<<(const void* __p) + { return _M_insert(__p); } +# 251 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ostream" 3 + __ostream_type& + operator<<(__streambuf_type* __sb); +# 284 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ostream" 3 + __ostream_type& + put(char_type __c); + + + void + _M_write(const char_type* __s, streamsize __n) + { + const streamsize __put = this->rdbuf()->sputn(__s, __n); + if (__put != __n) + this->setstate(ios_base::badbit); + } +# 312 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ostream" 3 + __ostream_type& + write(const char_type* __s, streamsize __n); +# 325 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ostream" 3 + __ostream_type& + flush(); +# 336 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ostream" 3 + pos_type + tellp(); +# 347 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ostream" 3 + __ostream_type& + seekp(pos_type); +# 359 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ostream" 3 + __ostream_type& + seekp(off_type, ios_base::seekdir); + + protected: + basic_ostream() + { this->init(0); } + + template + __ostream_type& + _M_insert(_ValueT __v); + }; +# 378 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ostream" 3 + template + class basic_ostream<_CharT, _Traits>::sentry + { + + bool _M_ok; + basic_ostream<_CharT, _Traits>& _M_os; + + public: +# 397 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ostream" 3 + explicit + sentry(basic_ostream<_CharT, _Traits>& __os); +# 407 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ostream" 3 + ~sentry() + { + + if (bool(_M_os.flags() & ios_base::unitbuf) && !uncaught_exception()) + { + + if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1) + _M_os.setstate(ios_base::badbit); + } + } +# 428 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ostream" 3 + operator bool() const + { return _M_ok; } + }; +# 449 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ostream" 3 + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) + { return __ostream_insert(__out, &__c, 1); } + + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) + { return (__out << __out.widen(__c)); } + + + template + inline basic_ostream& + operator<<(basic_ostream& __out, char __c) + { return __ostream_insert(__out, &__c, 1); } + + + template + inline basic_ostream& + operator<<(basic_ostream& __out, signed char __c) + { return (__out << static_cast(__c)); } + + template + inline basic_ostream& + operator<<(basic_ostream& __out, unsigned char __c) + { return (__out << static_cast(__c)); } +# 491 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ostream" 3 + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) + { + if (!__s) + __out.setstate(ios_base::badbit); + else + __ostream_insert(__out, __s, + static_cast(_Traits::length(__s))); + return __out; + } + + template + basic_ostream<_CharT, _Traits> & + operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s); + + + template + inline basic_ostream& + operator<<(basic_ostream& __out, const char* __s) + { + if (!__s) + __out.setstate(ios_base::badbit); + else + __ostream_insert(__out, __s, + static_cast(_Traits::length(__s))); + return __out; + } + + + template + inline basic_ostream& + operator<<(basic_ostream& __out, const signed char* __s) + { return (__out << reinterpret_cast(__s)); } + + template + inline basic_ostream & + operator<<(basic_ostream& __out, const unsigned char* __s) + { return (__out << reinterpret_cast(__s)); } +# 541 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ostream" 3 + template + inline basic_ostream<_CharT, _Traits>& + endl(basic_ostream<_CharT, _Traits>& __os) + { return flush(__os.put(__os.widen('\n'))); } + + + + + + + + template + inline basic_ostream<_CharT, _Traits>& + ends(basic_ostream<_CharT, _Traits>& __os) + { return __os.put(_CharT()); } + + + + + + + template + inline basic_ostream<_CharT, _Traits>& + flush(basic_ostream<_CharT, _Traits>& __os) + { return __os.flush(); } +# 585 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ostream" 3 + +} + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ostream.tcc" 1 3 +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ostream.tcc" 3 + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/ostream.tcc" 3 + + + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + template + basic_ostream<_CharT, _Traits>::sentry:: + sentry(basic_ostream<_CharT, _Traits>& __os) + : _M_ok(false), _M_os(__os) + { + + if (__os.tie() && __os.good()) + __os.tie()->flush(); + + if (__os.good()) + _M_ok = true; + else + __os.setstate(ios_base::failbit); + } + + template + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + _M_insert(_ValueT __v) + { + sentry __cerb(*this); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const __num_put_type& __np = __check_facet(this->_M_num_put); + if (__np.put(*this, *this, this->fill(), __v).failed()) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + operator<<(short __n) + { + + + const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; + if (__fmt == ios_base::oct || __fmt == ios_base::hex) + return _M_insert(static_cast(static_cast(__n))); + else + return _M_insert(static_cast(__n)); + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + operator<<(int __n) + { + + + const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; + if (__fmt == ios_base::oct || __fmt == ios_base::hex) + return _M_insert(static_cast(static_cast(__n))); + else + return _M_insert(static_cast(__n)); + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + operator<<(__streambuf_type* __sbin) + { + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this); + if (__cerb && __sbin) + { + try + { + if (!__copy_streambufs(__sbin, this->rdbuf())) + __err |= ios_base::failbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::failbit); } + } + else if (!__sbin) + __err |= ios_base::badbit; + if (__err) + this->setstate(__err); + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + put(char_type __c) + { + + + + + + + sentry __cerb(*this); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __put = this->rdbuf()->sputc(__c); + if (traits_type::eq_int_type(__put, traits_type::eof())) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + write(const _CharT* __s, streamsize __n) + { + + + + + + + + sentry __cerb(*this); + if (__cerb) + { + try + { _M_write(__s, __n); } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + flush() + { + + + + ios_base::iostate __err = ios_base::goodbit; + try + { + if (this->rdbuf() && this->rdbuf()->pubsync() == -1) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + + template + typename basic_ostream<_CharT, _Traits>::pos_type + basic_ostream<_CharT, _Traits>:: + tellp() + { + pos_type __ret = pos_type(-1); + try + { + if (!this->fail()) + __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + return __ret; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + seekp(pos_type __pos) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + if (!this->fail()) + { + + + const pos_type __p = this->rdbuf()->pubseekpos(__pos, + ios_base::out); + + + if (__p == pos_type(off_type(-1))) + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + seekp(off_type __off, ios_base::seekdir __dir) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + if (!this->fail()) + { + + + const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, + ios_base::out); + + + if (__p == pos_type(off_type(-1))) + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + + template + basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) + { + if (!__s) + __out.setstate(ios_base::badbit); + else + { + + + const size_t __clen = char_traits::length(__s); + try + { + struct __ptr_guard + { + _CharT *__p; + __ptr_guard (_CharT *__ip): __p(__ip) { } + ~__ptr_guard() { delete[] __p; } + _CharT* __get() { return __p; } + } __pg (new _CharT[__clen]); + + _CharT *__ws = __pg.__get(); + for (size_t __i = 0; __i < __clen; ++__i) + __ws[__i] = __out.widen(__s[__i]); + __ostream_insert(__out, __ws, __clen); + } + catch(__cxxabiv1::__forced_unwind&) + { + __out._M_setstate(ios_base::badbit); + throw; + } + catch(...) + { __out._M_setstate(ios_base::badbit); } + } + return __out; + } + + + + + extern template class basic_ostream; + extern template ostream& endl(ostream&); + extern template ostream& ends(ostream&); + extern template ostream& flush(ostream&); + extern template ostream& operator<<(ostream&, char); + extern template ostream& operator<<(ostream&, unsigned char); + extern template ostream& operator<<(ostream&, signed char); + extern template ostream& operator<<(ostream&, const char*); + extern template ostream& operator<<(ostream&, const unsigned char*); + extern template ostream& operator<<(ostream&, const signed char*); + + extern template ostream& ostream::_M_insert(long); + extern template ostream& ostream::_M_insert(unsigned long); + extern template ostream& ostream::_M_insert(bool); + + extern template ostream& ostream::_M_insert(long long); + extern template ostream& ostream::_M_insert(unsigned long long); + + extern template ostream& ostream::_M_insert(double); + extern template ostream& ostream::_M_insert(long double); + extern template ostream& ostream::_M_insert(const void*); + + + extern template class basic_ostream; + extern template wostream& endl(wostream&); + extern template wostream& ends(wostream&); + extern template wostream& flush(wostream&); + extern template wostream& operator<<(wostream&, wchar_t); + extern template wostream& operator<<(wostream&, char); + extern template wostream& operator<<(wostream&, const wchar_t*); + extern template wostream& operator<<(wostream&, const char*); + + extern template wostream& wostream::_M_insert(long); + extern template wostream& wostream::_M_insert(unsigned long); + extern template wostream& wostream::_M_insert(bool); + + extern template wostream& wostream::_M_insert(long long); + extern template wostream& wostream::_M_insert(unsigned long long); + + extern template wostream& wostream::_M_insert(double); + extern template wostream& wostream::_M_insert(long double); + extern template wostream& wostream::_M_insert(const void*); + + + + +} +# 589 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ostream" 2 3 +# 65 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/iterator" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 1 3 +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + + + + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 56 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + template + class basic_istream : virtual public basic_ios<_CharT, _Traits> + { + public: + + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + + + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef basic_ios<_CharT, _Traits> __ios_type; + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > + __num_get_type; + typedef ctype<_CharT> __ctype_type; + + protected: + + + + + + streamsize _M_gcount; + + public: +# 92 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + explicit + basic_istream(__streambuf_type* __sb) + : _M_gcount(streamsize(0)) + { this->init(__sb); } + + + + + + + virtual + ~basic_istream() + { _M_gcount = streamsize(0); } + + + class sentry; + friend class sentry; +# 121 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + __istream_type& + operator>>(__istream_type& (*__pf)(__istream_type&)) + { return __pf(*this); } + + __istream_type& + operator>>(__ios_type& (*__pf)(__ios_type&)) + { + __pf(*this); + return *this; + } + + __istream_type& + operator>>(ios_base& (*__pf)(ios_base&)) + { + __pf(*this); + return *this; + } +# 168 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + __istream_type& + operator>>(bool& __n) + { return _M_extract(__n); } + + __istream_type& + operator>>(short& __n); + + __istream_type& + operator>>(unsigned short& __n) + { return _M_extract(__n); } + + __istream_type& + operator>>(int& __n); + + __istream_type& + operator>>(unsigned int& __n) + { return _M_extract(__n); } + + __istream_type& + operator>>(long& __n) + { return _M_extract(__n); } + + __istream_type& + operator>>(unsigned long& __n) + { return _M_extract(__n); } + + + __istream_type& + operator>>(long long& __n) + { return _M_extract(__n); } + + __istream_type& + operator>>(unsigned long long& __n) + { return _M_extract(__n); } + + + __istream_type& + operator>>(float& __f) + { return _M_extract(__f); } + + __istream_type& + operator>>(double& __f) + { return _M_extract(__f); } + + __istream_type& + operator>>(long double& __f) + { return _M_extract(__f); } + + __istream_type& + operator>>(void*& __p) + { return _M_extract(__p); } +# 240 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + __istream_type& + operator>>(__streambuf_type* __sb); +# 250 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + streamsize + gcount() const + { return _M_gcount; } +# 282 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + int_type + get(); +# 296 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + __istream_type& + get(char_type& __c); +# 323 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + __istream_type& + get(char_type* __s, streamsize __n, char_type __delim); +# 334 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + __istream_type& + get(char_type* __s, streamsize __n) + { return this->get(__s, __n, this->widen('\n')); } +# 357 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + __istream_type& + get(__streambuf_type& __sb, char_type __delim); +# 367 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + __istream_type& + get(__streambuf_type& __sb) + { return this->get(__sb, this->widen('\n')); } +# 396 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + __istream_type& + getline(char_type* __s, streamsize __n, char_type __delim); +# 407 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + __istream_type& + getline(char_type* __s, streamsize __n) + { return this->getline(__s, __n, this->widen('\n')); } +# 431 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + __istream_type& + ignore(); + + __istream_type& + ignore(streamsize __n); + + __istream_type& + ignore(streamsize __n, int_type __delim); +# 448 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + int_type + peek(); +# 466 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + __istream_type& + read(char_type* __s, streamsize __n); +# 485 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + streamsize + readsome(char_type* __s, streamsize __n); +# 502 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + __istream_type& + putback(char_type __c); +# 518 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + __istream_type& + unget(); +# 536 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + int + sync(); +# 551 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + pos_type + tellg(); +# 566 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + __istream_type& + seekg(pos_type); +# 582 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + __istream_type& + seekg(off_type, ios_base::seekdir); + + + protected: + basic_istream() + : _M_gcount(streamsize(0)) + { this->init(0); } + + template + __istream_type& + _M_extract(_ValueT& __v); + }; + + + template<> + basic_istream& + basic_istream:: + getline(char_type* __s, streamsize __n, char_type __delim); + + template<> + basic_istream& + basic_istream:: + ignore(streamsize __n); + + template<> + basic_istream& + basic_istream:: + ignore(streamsize __n, int_type __delim); + + + template<> + basic_istream& + basic_istream:: + getline(char_type* __s, streamsize __n, char_type __delim); + + template<> + basic_istream& + basic_istream:: + ignore(streamsize __n); + + template<> + basic_istream& + basic_istream:: + ignore(streamsize __n, int_type __delim); +# 637 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + template + class basic_istream<_CharT, _Traits>::sentry + { + + bool _M_ok; + + public: + + typedef _Traits traits_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef typename __istream_type::__ctype_type __ctype_type; + typedef typename _Traits::int_type __int_type; +# 673 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + explicit + sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false); +# 686 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + operator bool() const + { return _M_ok; } + }; +# 703 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c); + + template + inline basic_istream& + operator>>(basic_istream& __in, unsigned char& __c) + { return (__in >> reinterpret_cast(__c)); } + + template + inline basic_istream& + operator>>(basic_istream& __in, signed char& __c) + { return (__in >> reinterpret_cast(__c)); } +# 745 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s); + + + template<> + basic_istream& + operator>>(basic_istream& __in, char* __s); + + template + inline basic_istream& + operator>>(basic_istream& __in, unsigned char* __s) + { return (__in >> reinterpret_cast(__s)); } + + template + inline basic_istream& + operator>>(basic_istream& __in, signed char* __s) + { return (__in >> reinterpret_cast(__s)); } +# 773 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + template + class basic_iostream + : public basic_istream<_CharT, _Traits>, + public basic_ostream<_CharT, _Traits> + { + public: + + + + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + + + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_ostream<_CharT, _Traits> __ostream_type; + + + + + + + + explicit + basic_iostream(basic_streambuf<_CharT, _Traits>* __sb) + : __istream_type(__sb), __ostream_type(__sb) { } + + + + + virtual + ~basic_iostream() { } + + protected: + basic_iostream() + : __istream_type(), __ostream_type() { } + }; +# 834 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + template + basic_istream<_CharT, _Traits>& + ws(basic_istream<_CharT, _Traits>& __is); +# 856 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 3 + +} + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/istream.tcc" 1 3 +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/istream.tcc" 3 + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/istream.tcc" 3 + + + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + template + basic_istream<_CharT, _Traits>::sentry:: + sentry(basic_istream<_CharT, _Traits>& __in, bool __noskip) : _M_ok(false) + { + ios_base::iostate __err = ios_base::goodbit; + if (__in.good()) + { + if (__in.tie()) + __in.tie()->flush(); + if (!__noskip && bool(__in.flags() & ios_base::skipws)) + { + const __int_type __eof = traits_type::eof(); + __streambuf_type* __sb = __in.rdbuf(); + __int_type __c = __sb->sgetc(); + + const __ctype_type& __ct = __check_facet(__in._M_ctype); + while (!traits_type::eq_int_type(__c, __eof) + && __ct.is(ctype_base::space, + traits_type::to_char_type(__c))) + __c = __sb->snextc(); + + + + + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + } + } + + if (__in.good() && __err == ios_base::goodbit) + _M_ok = true; + else + { + __err |= ios_base::failbit; + __in.setstate(__err); + } + } + + template + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + _M_extract(_ValueT& __v) + { + sentry __cerb(*this, false); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const __num_get_type& __ng = __check_facet(this->_M_num_get); + __ng.get(*this, 0, *this, __err, __v); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(short& __n) + { + + + sentry __cerb(*this, false); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + long __l; + const __num_get_type& __ng = __check_facet(this->_M_num_get); + __ng.get(*this, 0, *this, __err, __l); + + + + if (__l < __gnu_cxx::__numeric_traits::__min) + { + __err |= ios_base::failbit; + __n = __gnu_cxx::__numeric_traits::__min; + } + else if (__l > __gnu_cxx::__numeric_traits::__max) + { + __err |= ios_base::failbit; + __n = __gnu_cxx::__numeric_traits::__max; + } + else + __n = short(__l); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(int& __n) + { + + + sentry __cerb(*this, false); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + long __l; + const __num_get_type& __ng = __check_facet(this->_M_num_get); + __ng.get(*this, 0, *this, __err, __l); + + + + if (__l < __gnu_cxx::__numeric_traits::__min) + { + __err |= ios_base::failbit; + __n = __gnu_cxx::__numeric_traits::__min; + } + else if (__l > __gnu_cxx::__numeric_traits::__max) + { + __err |= ios_base::failbit; + __n = __gnu_cxx::__numeric_traits::__max; + } + else + __n = int(__l); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(__streambuf_type* __sbout) + { + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, false); + if (__cerb && __sbout) + { + try + { + bool __ineof; + if (!__copy_streambufs_eof(this->rdbuf(), __sbout, __ineof)) + __err |= ios_base::failbit; + if (__ineof) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::failbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::failbit); } + } + else if (!__sbout) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + + template + typename basic_istream<_CharT, _Traits>::int_type + basic_istream<_CharT, _Traits>:: + get(void) + { + const int_type __eof = traits_type::eof(); + int_type __c = __eof; + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + __c = this->rdbuf()->sbumpc(); + + if (!traits_type::eq_int_type(__c, __eof)) + _M_gcount = 1; + else + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return __c; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + get(char_type& __c) + { + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __cb = this->rdbuf()->sbumpc(); + + if (!traits_type::eq_int_type(__cb, traits_type::eof())) + { + _M_gcount = 1; + __c = traits_type::to_char_type(__cb); + } + else + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + get(char_type* __s, streamsize __n, char_type __delim) + { + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __idelim = traits_type::to_int_type(__delim); + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sgetc(); + + while (_M_gcount + 1 < __n + && !traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __idelim)) + { + *__s++ = traits_type::to_char_type(__c); + ++_M_gcount; + __c = __sb->snextc(); + } + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + + + if (__n > 0) + *__s = char_type(); + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + get(__streambuf_type& __sb, char_type __delim) + { + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __idelim = traits_type::to_int_type(__delim); + const int_type __eof = traits_type::eof(); + __streambuf_type* __this_sb = this->rdbuf(); + int_type __c = __this_sb->sgetc(); + char_type __c2 = traits_type::to_char_type(__c); + + while (!traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __idelim) + && !traits_type::eq_int_type(__sb.sputc(__c2), __eof)) + { + ++_M_gcount; + __c = __this_sb->snextc(); + __c2 = traits_type::to_char_type(__c); + } + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + getline(char_type* __s, streamsize __n, char_type __delim) + { + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __idelim = traits_type::to_int_type(__delim); + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sgetc(); + + while (_M_gcount + 1 < __n + && !traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __idelim)) + { + *__s++ = traits_type::to_char_type(__c); + __c = __sb->snextc(); + ++_M_gcount; + } + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + else + { + if (traits_type::eq_int_type(__c, __idelim)) + { + __sb->sbumpc(); + ++_M_gcount; + } + else + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + + + if (__n > 0) + *__s = char_type(); + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + + + + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + ignore(void) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + + if (traits_type::eq_int_type(__sb->sbumpc(), __eof)) + __err |= ios_base::eofbit; + else + _M_gcount = 1; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + ignore(streamsize __n) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb && __n > 0) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sgetc(); +# 515 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/istream.tcc" 3 + bool __large_ignore = false; + while (true) + { + while (_M_gcount < __n + && !traits_type::eq_int_type(__c, __eof)) + { + ++_M_gcount; + __c = __sb->snextc(); + } + if (__n == __gnu_cxx::__numeric_traits::__max + && !traits_type::eq_int_type(__c, __eof)) + { + _M_gcount = + __gnu_cxx::__numeric_traits::__min; + __large_ignore = true; + } + else + break; + } + + if (__large_ignore) + _M_gcount = __gnu_cxx::__numeric_traits::__max; + + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + ignore(streamsize __n, int_type __delim) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb && __n > 0) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sgetc(); + + + bool __large_ignore = false; + while (true) + { + while (_M_gcount < __n + && !traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __delim)) + { + ++_M_gcount; + __c = __sb->snextc(); + } + if (__n == __gnu_cxx::__numeric_traits::__max + && !traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __delim)) + { + _M_gcount = + __gnu_cxx::__numeric_traits::__min; + __large_ignore = true; + } + else + break; + } + + if (__large_ignore) + _M_gcount = __gnu_cxx::__numeric_traits::__max; + + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + else if (traits_type::eq_int_type(__c, __delim)) + { + if (_M_gcount + < __gnu_cxx::__numeric_traits::__max) + ++_M_gcount; + __sb->sbumpc(); + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + typename basic_istream<_CharT, _Traits>::int_type + basic_istream<_CharT, _Traits>:: + peek(void) + { + int_type __c = traits_type::eof(); + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + __c = this->rdbuf()->sgetc(); + if (traits_type::eq_int_type(__c, traits_type::eof())) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return __c; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + read(char_type* __s, streamsize __n) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + _M_gcount = this->rdbuf()->sgetn(__s, __n); + if (_M_gcount != __n) + __err |= (ios_base::eofbit | ios_base::failbit); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + streamsize + basic_istream<_CharT, _Traits>:: + readsome(char_type* __s, streamsize __n) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + + const streamsize __num = this->rdbuf()->in_avail(); + if (__num > 0) + _M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n)); + else if (__num == -1) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return _M_gcount; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + putback(char_type __c) + { + + + _M_gcount = 0; + + this->clear(this->rdstate() & ~ios_base::eofbit); + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + if (!__sb + || traits_type::eq_int_type(__sb->sputbackc(__c), __eof)) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + unget(void) + { + + + _M_gcount = 0; + + this->clear(this->rdstate() & ~ios_base::eofbit); + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + if (!__sb + || traits_type::eq_int_type(__sb->sungetc(), __eof)) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + int + basic_istream<_CharT, _Traits>:: + sync(void) + { + + + int __ret = -1; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + __streambuf_type* __sb = this->rdbuf(); + if (__sb) + { + if (__sb->pubsync() == -1) + __err |= ios_base::badbit; + else + __ret = 0; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return __ret; + } + + template + typename basic_istream<_CharT, _Traits>::pos_type + basic_istream<_CharT, _Traits>:: + tellg(void) + { + + + pos_type __ret = pos_type(-1); + sentry __cerb(*this, true); + if (__cerb) + { + try + { + if (!this->fail()) + __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, + ios_base::in); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + return __ret; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + seekg(pos_type __pos) + { + + + + this->clear(this->rdstate() & ~ios_base::eofbit); + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + if (!this->fail()) + { + + const pos_type __p = this->rdbuf()->pubseekpos(__pos, + ios_base::in); + + + if (__p == pos_type(off_type(-1))) + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + seekg(off_type __off, ios_base::seekdir __dir) + { + + + + this->clear(this->rdstate() & ~ios_base::eofbit); + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + if (!this->fail()) + { + + const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, + ios_base::in); + + + if (__p == pos_type(off_type(-1))) + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + + + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef typename __istream_type::int_type __int_type; + + typename __istream_type::sentry __cerb(__in, false); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const __int_type __cb = __in.rdbuf()->sbumpc(); + if (!_Traits::eq_int_type(__cb, _Traits::eof())) + __c = _Traits::to_char_type(__cb); + else + __err |= (ios_base::eofbit | ios_base::failbit); + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(ios_base::badbit); + throw; + } + catch(...) + { __in._M_setstate(ios_base::badbit); } + if (__err) + __in.setstate(__err); + } + return __in; + } + + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef typename _Traits::int_type int_type; + typedef _CharT char_type; + typedef ctype<_CharT> __ctype_type; + + streamsize __extracted = 0; + ios_base::iostate __err = ios_base::goodbit; + typename __istream_type::sentry __cerb(__in, false); + if (__cerb) + { + try + { + + streamsize __num = __in.width(); + if (__num <= 0) + __num = __gnu_cxx::__numeric_traits::__max; + + const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); + + const int_type __eof = _Traits::eof(); + __streambuf_type* __sb = __in.rdbuf(); + int_type __c = __sb->sgetc(); + + while (__extracted < __num - 1 + && !_Traits::eq_int_type(__c, __eof) + && !__ct.is(ctype_base::space, + _Traits::to_char_type(__c))) + { + *__s++ = _Traits::to_char_type(__c); + ++__extracted; + __c = __sb->snextc(); + } + if (_Traits::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + + + + *__s = char_type(); + __in.width(0); + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(ios_base::badbit); + throw; + } + catch(...) + { __in._M_setstate(ios_base::badbit); } + } + if (!__extracted) + __err |= ios_base::failbit; + if (__err) + __in.setstate(__err); + return __in; + } + + + template + basic_istream<_CharT, _Traits>& + ws(basic_istream<_CharT, _Traits>& __in) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef typename __istream_type::int_type __int_type; + typedef ctype<_CharT> __ctype_type; + + const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); + const __int_type __eof = _Traits::eof(); + __streambuf_type* __sb = __in.rdbuf(); + __int_type __c = __sb->sgetc(); + + while (!_Traits::eq_int_type(__c, __eof) + && __ct.is(ctype_base::space, _Traits::to_char_type(__c))) + __c = __sb->snextc(); + + if (_Traits::eq_int_type(__c, __eof)) + __in.setstate(ios_base::eofbit); + return __in; + } + + + + + extern template class basic_istream; + extern template istream& ws(istream&); + extern template istream& operator>>(istream&, char&); + extern template istream& operator>>(istream&, char*); + extern template istream& operator>>(istream&, unsigned char&); + extern template istream& operator>>(istream&, signed char&); + extern template istream& operator>>(istream&, unsigned char*); + extern template istream& operator>>(istream&, signed char*); + + extern template istream& istream::_M_extract(unsigned short&); + extern template istream& istream::_M_extract(unsigned int&); + extern template istream& istream::_M_extract(long&); + extern template istream& istream::_M_extract(unsigned long&); + extern template istream& istream::_M_extract(bool&); + + extern template istream& istream::_M_extract(long long&); + extern template istream& istream::_M_extract(unsigned long long&); + + extern template istream& istream::_M_extract(float&); + extern template istream& istream::_M_extract(double&); + extern template istream& istream::_M_extract(long double&); + extern template istream& istream::_M_extract(void*&); + + extern template class basic_iostream; + + + extern template class basic_istream; + extern template wistream& ws(wistream&); + extern template wistream& operator>>(wistream&, wchar_t&); + extern template wistream& operator>>(wistream&, wchar_t*); + + extern template wistream& wistream::_M_extract(unsigned short&); + extern template wistream& wistream::_M_extract(unsigned int&); + extern template wistream& wistream::_M_extract(long&); + extern template wistream& wistream::_M_extract(unsigned long&); + extern template wistream& wistream::_M_extract(bool&); + + extern template wistream& wistream::_M_extract(long long&); + extern template wistream& wistream::_M_extract(unsigned long long&); + + extern template wistream& wistream::_M_extract(float&); + extern template wistream& wistream::_M_extract(double&); + extern template wistream& wistream::_M_extract(long double&); + extern template wistream& wistream::_M_extract(void*&); + + extern template class basic_iostream; + + + + +} +# 860 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/istream" 2 3 +# 66 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/iterator" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stream_iterator.h" 1 3 +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stream_iterator.h" 3 + +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stream_iterator.h" 3 + + + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + + + + + + + template, typename _Dist = ptrdiff_t> + class istream_iterator + : public iterator + { + public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_istream<_CharT, _Traits> istream_type; + + private: + istream_type* _M_stream; + _Tp _M_value; + bool _M_ok; + + public: + + istream_iterator() + : _M_stream(0), _M_value(), _M_ok(false) {} + + + istream_iterator(istream_type& __s) + : _M_stream(&__s) + { _M_read(); } + + istream_iterator(const istream_iterator& __obj) + : _M_stream(__obj._M_stream), _M_value(__obj._M_value), + _M_ok(__obj._M_ok) + { } + + const _Tp& + operator*() const + { + + + ; + return _M_value; + } + + const _Tp* + operator->() const { return &(operator*()); } + + istream_iterator& + operator++() + { + + + ; + _M_read(); + return *this; + } + + istream_iterator + operator++(int) + { + + + ; + istream_iterator __tmp = *this; + _M_read(); + return __tmp; + } + + bool + _M_equal(const istream_iterator& __x) const + { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); } + + private: + void + _M_read() + { + _M_ok = (_M_stream && *_M_stream) ? true : false; + if (_M_ok) + { + *_M_stream >> _M_value; + _M_ok = *_M_stream ? true : false; + } + } + }; + + + template + inline bool + operator==(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, + const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) + { return __x._M_equal(__y); } + + + template + inline bool + operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, + const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) + { return !__x._M_equal(__y); } +# 152 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stream_iterator.h" 3 + template > + class ostream_iterator + : public iterator + { + public: + + + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_ostream<_CharT, _Traits> ostream_type; + + + private: + ostream_type* _M_stream; + const _CharT* _M_string; + + public: + + ostream_iterator(ostream_type& __s) : _M_stream(&__s), _M_string(0) {} +# 183 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stream_iterator.h" 3 + ostream_iterator(ostream_type& __s, const _CharT* __c) + : _M_stream(&__s), _M_string(__c) { } + + + ostream_iterator(const ostream_iterator& __obj) + : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { } + + + + ostream_iterator& + operator=(const _Tp& __value) + { + + + ; + *_M_stream << __value; + if (_M_string) *_M_stream << _M_string; + return *this; + } + + ostream_iterator& + operator*() + { return *this; } + + ostream_iterator& + operator++() + { return *this; } + + ostream_iterator& + operator++(int) + { return *this; } + }; + + + + +} +# 67 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/iterator" 2 3 +# 55 "../boost/detail/iterator.hpp" 2 +# 77 "../boost/detail/iterator.hpp" +namespace boost { namespace detail { + + +template +struct iterator_traits + : std::iterator_traits +{}; +using std::distance; + +}} +# 9 "../boost/iterator/iterator_traits.hpp" 2 + + +namespace boost { +# 27 "../boost/iterator/iterator_traits.hpp" +template +struct iterator_value +{ + typedef typename boost::detail::iterator_traits::value_type type; +}; + +template +struct iterator_reference +{ + typedef typename boost::detail::iterator_traits::reference type; +}; + + +template +struct iterator_pointer +{ + typedef typename boost::detail::iterator_traits::pointer type; +}; + +template +struct iterator_difference +{ + typedef typename boost::detail::iterator_traits::difference_type type; +}; + +template +struct iterator_category +{ + typedef typename boost::detail::iterator_traits::iterator_category type; +}; +# 90 "../boost/iterator/iterator_traits.hpp" +} +# 19 "quickbook/src/values.hpp" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/stdexcept" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/stdexcept" 3 + +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/stdexcept" 3 + + + + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 56 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/stdexcept" 3 + class logic_error : public exception + { + string _M_msg; + + public: + + explicit + logic_error(const string& __arg); + + virtual ~logic_error() throw(); + + + + virtual const char* + what() const throw(); + }; + + + + class domain_error : public logic_error + { + public: + explicit domain_error(const string& __arg); + virtual ~domain_error() throw(); + }; + + + class invalid_argument : public logic_error + { + public: + explicit invalid_argument(const string& __arg); + virtual ~invalid_argument() throw(); + }; + + + + class length_error : public logic_error + { + public: + explicit length_error(const string& __arg); + virtual ~length_error() throw(); + }; + + + + class out_of_range : public logic_error + { + public: + explicit out_of_range(const string& __arg); + virtual ~out_of_range() throw(); + }; + + + + + + + class runtime_error : public exception + { + string _M_msg; + + public: + + explicit + runtime_error(const string& __arg); + + virtual ~runtime_error() throw(); + + + + virtual const char* + what() const throw(); + }; + + + class range_error : public runtime_error + { + public: + explicit range_error(const string& __arg); + virtual ~range_error() throw(); + }; + + + class overflow_error : public runtime_error + { + public: + explicit overflow_error(const string& __arg); + virtual ~overflow_error() throw(); + }; + + + class underflow_error : public runtime_error + { + public: + explicit underflow_error(const string& __arg); + virtual ~underflow_error() throw(); + }; + + + + +} +# 20 "quickbook/src/values.hpp" 2 +# 1 "quickbook/src/fwd.hpp" 1 +# 14 "quickbook/src/fwd.hpp" +# 1 "quickbook/src/iterator.hpp" 1 +# 12 "quickbook/src/iterator.hpp" +# 1 "../boost/operators.hpp" 1 +# 86 "../boost/operators.hpp" +# 1 "../boost/iterator.hpp" 1 +# 18 "../boost/iterator.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 19 "../boost/iterator.hpp" 2 + + +namespace boost +{ +# 39 "../boost/iterator.hpp" + namespace detail { + template + + struct iterator_base : std::iterator {}; +# 51 "../boost/iterator.hpp" + } + + template + struct iterator : boost::detail::iterator_base {}; + +} +# 87 "../boost/operators.hpp" 2 +# 97 "../boost/operators.hpp" +namespace boost { +namespace detail { + +template class empty_base { + + + + + + +}; + +} +} +# 120 "../boost/operators.hpp" +namespace boost +{ + + + + + + + +template > +struct less_than_comparable2 : B +{ + friend bool operator<=(const T& x, const U& y) { return !static_cast(x > y); } + friend bool operator>=(const T& x, const U& y) { return !static_cast(x < y); } + friend bool operator>(const U& x, const T& y) { return y < x; } + friend bool operator<(const U& x, const T& y) { return y > x; } + friend bool operator<=(const U& x, const T& y) { return !static_cast(y < x); } + friend bool operator>=(const U& x, const T& y) { return !static_cast(y > x); } +}; + +template > +struct less_than_comparable1 : B +{ + friend bool operator>(const T& x, const T& y) { return y < x; } + friend bool operator<=(const T& x, const T& y) { return !static_cast(y < x); } + friend bool operator>=(const T& x, const T& y) { return !static_cast(x < y); } +}; + +template > +struct equality_comparable2 : B +{ + friend bool operator==(const U& y, const T& x) { return x == y; } + friend bool operator!=(const U& y, const T& x) { return !static_cast(x == y); } + friend bool operator!=(const T& y, const U& x) { return !static_cast(y == x); } +}; + +template > +struct equality_comparable1 : B +{ + friend bool operator!=(const T& x, const T& y) { return !static_cast(x == y); } +}; +# 256 "../boost/operators.hpp" +template > struct multipliable2 : B { friend T operator *( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv *= rhs; return nrv; } friend T operator *( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv *= lhs; return nrv; } }; template > struct multipliable1 : B { friend T operator *( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv *= rhs; return nrv; } }; +template > struct addable2 : B { friend T operator +( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv += rhs; return nrv; } friend T operator +( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv += lhs; return nrv; } }; template > struct addable1 : B { friend T operator +( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv += rhs; return nrv; } }; +template > struct subtractable2 : B { friend T operator -( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv -= rhs; return nrv; } }; template > struct subtractable2_left : B { friend T operator -( const U& lhs, const T& rhs ) { T nrv( lhs ); nrv -= rhs; return nrv; } }; template > struct subtractable1 : B { friend T operator -( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv -= rhs; return nrv; } }; +template > struct dividable2 : B { friend T operator /( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv /= rhs; return nrv; } }; template > struct dividable2_left : B { friend T operator /( const U& lhs, const T& rhs ) { T nrv( lhs ); nrv /= rhs; return nrv; } }; template > struct dividable1 : B { friend T operator /( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv /= rhs; return nrv; } }; +template > struct modable2 : B { friend T operator %( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv %= rhs; return nrv; } }; template > struct modable2_left : B { friend T operator %( const U& lhs, const T& rhs ) { T nrv( lhs ); nrv %= rhs; return nrv; } }; template > struct modable1 : B { friend T operator %( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv %= rhs; return nrv; } }; +template > struct xorable2 : B { friend T operator ^( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv ^= rhs; return nrv; } friend T operator ^( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv ^= lhs; return nrv; } }; template > struct xorable1 : B { friend T operator ^( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv ^= rhs; return nrv; } }; +template > struct andable2 : B { friend T operator &( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv &= rhs; return nrv; } friend T operator &( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv &= lhs; return nrv; } }; template > struct andable1 : B { friend T operator &( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv &= rhs; return nrv; } }; +template > struct orable2 : B { friend T operator |( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv |= rhs; return nrv; } friend T operator |( const U& lhs, const T& rhs ) { T nrv( rhs ); nrv |= lhs; return nrv; } }; template > struct orable1 : B { friend T operator |( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv |= rhs; return nrv; } }; + + + + + + + +template > +struct incrementable : B +{ + friend T operator++(T& x, int) + { + incrementable_type nrv(x); + ++x; + return nrv; + } +private: + typedef T incrementable_type; +}; + +template > +struct decrementable : B +{ + friend T operator--(T& x, int) + { + decrementable_type nrv(x); + --x; + return nrv; + } +private: + typedef T decrementable_type; +}; + + + +template > +struct dereferenceable : B +{ + P operator->() const + { + return &*static_cast(*this); + } +}; + +template > +struct indexable : B +{ + R operator[](I n) const + { + return *(static_cast(*this) + n); + } +}; +# 354 "../boost/operators.hpp" +template > struct left_shiftable2 : B { friend T operator <<( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv <<= rhs; return nrv; } }; template > struct left_shiftable1 : B { friend T operator <<( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv <<= rhs; return nrv; } }; +template > struct right_shiftable2 : B { friend T operator >>( const T& lhs, const U& rhs ) { T nrv( lhs ); nrv >>= rhs; return nrv; } }; template > struct right_shiftable1 : B { friend T operator >>( const T& lhs, const T& rhs ) { T nrv( lhs ); nrv >>= rhs; return nrv; } }; + + + +template > +struct equivalent2 : B +{ + friend bool operator==(const T& x, const U& y) + { + return !static_cast(x < y) && !static_cast(x > y); + } +}; + +template > +struct equivalent1 : B +{ + friend bool operator==(const T&x, const T&y) + { + return !static_cast(x < y) && !static_cast(y < x); + } +}; + +template > +struct partially_ordered2 : B +{ + friend bool operator<=(const T& x, const U& y) + { return static_cast(x < y) || static_cast(x == y); } + friend bool operator>=(const T& x, const U& y) + { return static_cast(x > y) || static_cast(x == y); } + friend bool operator>(const U& x, const T& y) + { return y < x; } + friend bool operator<(const U& x, const T& y) + { return y > x; } + friend bool operator<=(const U& x, const T& y) + { return static_cast(y > x) || static_cast(y == x); } + friend bool operator>=(const U& x, const T& y) + { return static_cast(y < x) || static_cast(y == x); } +}; + +template > +struct partially_ordered1 : B +{ + friend bool operator>(const T& x, const T& y) + { return y < x; } + friend bool operator<=(const T& x, const T& y) + { return static_cast(x < y) || static_cast(x == y); } + friend bool operator>=(const T& x, const T& y) + { return static_cast(y < x) || static_cast(x == y); } +}; + + + +template > +struct totally_ordered2 + : less_than_comparable2 > {}; + +template > +struct totally_ordered1 + : less_than_comparable1 > {}; + +template > +struct additive2 + : addable2 > {}; + +template > +struct additive1 + : addable1 > {}; + +template > +struct multiplicative2 + : multipliable2 > {}; + +template > +struct multiplicative1 + : multipliable1 > {}; + +template > +struct integer_multiplicative2 + : multiplicative2 > {}; + +template > +struct integer_multiplicative1 + : multiplicative1 > {}; + +template > +struct arithmetic2 + : additive2 > {}; + +template > +struct arithmetic1 + : additive1 > {}; + +template > +struct integer_arithmetic2 + : additive2 > {}; + +template > +struct integer_arithmetic1 + : additive1 > {}; + +template > +struct bitwise2 + : xorable2 > > {}; + +template > +struct bitwise1 + : xorable1 > > {}; + +template > +struct unit_steppable + : incrementable > {}; + +template > +struct shiftable2 + : left_shiftable2 > {}; + +template > +struct shiftable1 + : left_shiftable1 > {}; + +template > +struct ring_operators2 + : additive2 > > {}; + +template > +struct ring_operators1 + : additive1 > {}; + +template > +struct ordered_ring_operators2 + : ring_operators2 > {}; + +template > +struct ordered_ring_operators1 + : ring_operators1 > {}; + +template > +struct field_operators2 + : ring_operators2 > > {}; + +template > +struct field_operators1 + : ring_operators1 > {}; + +template > +struct ordered_field_operators2 + : field_operators2 > {}; + +template > +struct ordered_field_operators1 + : field_operators1 > {}; + +template > +struct euclidian_ring_operators2 + : ring_operators2 > > > > {}; + +template > +struct euclidian_ring_operators1 + : ring_operators1 > > {}; + +template > +struct ordered_euclidian_ring_operators2 + : totally_ordered2 > {}; + +template > +struct ordered_euclidian_ring_operators1 + : totally_ordered1 > {}; + +template > +struct euclidean_ring_operators2 + : ring_operators2 > > > > {}; + +template > +struct euclidean_ring_operators1 + : ring_operators1 > > {}; + +template > +struct ordered_euclidean_ring_operators2 + : totally_ordered2 > {}; + +template > +struct ordered_euclidean_ring_operators1 + : totally_ordered1 > {}; + +template > +struct input_iteratable + : equality_comparable1 > > {}; + +template > +struct output_iteratable + : incrementable {}; + +template > +struct forward_iteratable + : input_iteratable {}; + +template > +struct bidirectional_iteratable + : forward_iteratable > {}; + + + + + +template > +struct random_access_iteratable + : bidirectional_iteratable > > > {}; + + +} +# 720 "../boost/operators.hpp" +namespace boost { + + +namespace detail { + struct true_t {}; + struct false_t {}; +} + + + + +template struct is_chained_base { + typedef ::boost::detail::false_t value; +}; + +} +# 831 "../boost/operators.hpp" +namespace boost { + +template ,class O = typename is_chained_base::value > struct less_than_comparable : less_than_comparable2 {}; template struct less_than_comparable : less_than_comparable1 {}; template struct less_than_comparable : less_than_comparable1 {}; template struct is_chained_base< ::boost::less_than_comparable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::less_than_comparable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::less_than_comparable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct equality_comparable : equality_comparable2 {}; template struct equality_comparable : equality_comparable1 {}; template struct equality_comparable : equality_comparable1 {}; template struct is_chained_base< ::boost::equality_comparable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::equality_comparable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::equality_comparable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct multipliable : multipliable2 {}; template struct multipliable : multipliable1 {}; template struct multipliable : multipliable1 {}; template struct is_chained_base< ::boost::multipliable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::multipliable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::multipliable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct addable : addable2 {}; template struct addable : addable1 {}; template struct addable : addable1 {}; template struct is_chained_base< ::boost::addable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::addable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::addable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct subtractable : subtractable2 {}; template struct subtractable : subtractable1 {}; template struct subtractable : subtractable1 {}; template struct is_chained_base< ::boost::subtractable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::subtractable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::subtractable1 > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::subtractable2_left > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct dividable : dividable2 {}; template struct dividable : dividable1 {}; template struct dividable : dividable1 {}; template struct is_chained_base< ::boost::dividable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::dividable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::dividable1 > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::dividable2_left > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct modable : modable2 {}; template struct modable : modable1 {}; template struct modable : modable1 {}; template struct is_chained_base< ::boost::modable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::modable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::modable1 > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::modable2_left > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct xorable : xorable2 {}; template struct xorable : xorable1 {}; template struct xorable : xorable1 {}; template struct is_chained_base< ::boost::xorable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::xorable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::xorable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct andable : andable2 {}; template struct andable : andable1 {}; template struct andable : andable1 {}; template struct is_chained_base< ::boost::andable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::andable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::andable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct orable : orable2 {}; template struct orable : orable1 {}; template struct orable : orable1 {}; template struct is_chained_base< ::boost::orable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::orable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::orable1 > { typedef ::boost::detail::true_t value; }; + + template struct is_chained_base< ::boost::incrementable > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::decrementable > { typedef ::boost::detail::true_t value; }; + + template struct is_chained_base< ::boost::dereferenceable > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::indexable > { typedef ::boost::detail::true_t value; }; + +template ,class O = typename is_chained_base::value > struct left_shiftable : left_shiftable2 {}; template struct left_shiftable : left_shiftable1 {}; template struct left_shiftable : left_shiftable1 {}; template struct is_chained_base< ::boost::left_shiftable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::left_shiftable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::left_shiftable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct right_shiftable : right_shiftable2 {}; template struct right_shiftable : right_shiftable1 {}; template struct right_shiftable : right_shiftable1 {}; template struct is_chained_base< ::boost::right_shiftable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::right_shiftable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::right_shiftable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct equivalent : equivalent2 {}; template struct equivalent : equivalent1 {}; template struct equivalent : equivalent1 {}; template struct is_chained_base< ::boost::equivalent > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::equivalent2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::equivalent1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct partially_ordered : partially_ordered2 {}; template struct partially_ordered : partially_ordered1 {}; template struct partially_ordered : partially_ordered1 {}; template struct is_chained_base< ::boost::partially_ordered > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::partially_ordered2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::partially_ordered1 > { typedef ::boost::detail::true_t value; }; + +template ,class O = typename is_chained_base::value > struct totally_ordered : totally_ordered2 {}; template struct totally_ordered : totally_ordered1 {}; template struct totally_ordered : totally_ordered1 {}; template struct is_chained_base< ::boost::totally_ordered > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::totally_ordered2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::totally_ordered1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct additive : additive2 {}; template struct additive : additive1 {}; template struct additive : additive1 {}; template struct is_chained_base< ::boost::additive > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::additive2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::additive1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct multiplicative : multiplicative2 {}; template struct multiplicative : multiplicative1 {}; template struct multiplicative : multiplicative1 {}; template struct is_chained_base< ::boost::multiplicative > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::multiplicative2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::multiplicative1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct integer_multiplicative : integer_multiplicative2 {}; template struct integer_multiplicative : integer_multiplicative1 {}; template struct integer_multiplicative : integer_multiplicative1 {}; template struct is_chained_base< ::boost::integer_multiplicative > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::integer_multiplicative2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::integer_multiplicative1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct arithmetic : arithmetic2 {}; template struct arithmetic : arithmetic1 {}; template struct arithmetic : arithmetic1 {}; template struct is_chained_base< ::boost::arithmetic > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::arithmetic2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::arithmetic1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct integer_arithmetic : integer_arithmetic2 {}; template struct integer_arithmetic : integer_arithmetic1 {}; template struct integer_arithmetic : integer_arithmetic1 {}; template struct is_chained_base< ::boost::integer_arithmetic > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::integer_arithmetic2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::integer_arithmetic1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct bitwise : bitwise2 {}; template struct bitwise : bitwise1 {}; template struct bitwise : bitwise1 {}; template struct is_chained_base< ::boost::bitwise > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::bitwise2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::bitwise1 > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::unit_steppable > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct shiftable : shiftable2 {}; template struct shiftable : shiftable1 {}; template struct shiftable : shiftable1 {}; template struct is_chained_base< ::boost::shiftable > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::shiftable2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::shiftable1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct ring_operators : ring_operators2 {}; template struct ring_operators : ring_operators1 {}; template struct ring_operators : ring_operators1 {}; template struct is_chained_base< ::boost::ring_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ring_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ring_operators1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct ordered_ring_operators : ordered_ring_operators2 {}; template struct ordered_ring_operators : ordered_ring_operators1 {}; template struct ordered_ring_operators : ordered_ring_operators1 {}; template struct is_chained_base< ::boost::ordered_ring_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_ring_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_ring_operators1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct field_operators : field_operators2 {}; template struct field_operators : field_operators1 {}; template struct field_operators : field_operators1 {}; template struct is_chained_base< ::boost::field_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::field_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::field_operators1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct ordered_field_operators : ordered_field_operators2 {}; template struct ordered_field_operators : ordered_field_operators1 {}; template struct ordered_field_operators : ordered_field_operators1 {}; template struct is_chained_base< ::boost::ordered_field_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_field_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_field_operators1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct euclidian_ring_operators : euclidian_ring_operators2 {}; template struct euclidian_ring_operators : euclidian_ring_operators1 {}; template struct euclidian_ring_operators : euclidian_ring_operators1 {}; template struct is_chained_base< ::boost::euclidian_ring_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::euclidian_ring_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::euclidian_ring_operators1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct ordered_euclidian_ring_operators : ordered_euclidian_ring_operators2 {}; template struct ordered_euclidian_ring_operators : ordered_euclidian_ring_operators1 {}; template struct ordered_euclidian_ring_operators : ordered_euclidian_ring_operators1 {}; template struct is_chained_base< ::boost::ordered_euclidian_ring_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_euclidian_ring_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_euclidian_ring_operators1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct euclidean_ring_operators : euclidean_ring_operators2 {}; template struct euclidean_ring_operators : euclidean_ring_operators1 {}; template struct euclidean_ring_operators : euclidean_ring_operators1 {}; template struct is_chained_base< ::boost::euclidean_ring_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::euclidean_ring_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::euclidean_ring_operators1 > { typedef ::boost::detail::true_t value; }; +template ,class O = typename is_chained_base::value > struct ordered_euclidean_ring_operators : ordered_euclidean_ring_operators2 {}; template struct ordered_euclidean_ring_operators : ordered_euclidean_ring_operators1 {}; template struct ordered_euclidean_ring_operators : ordered_euclidean_ring_operators1 {}; template struct is_chained_base< ::boost::ordered_euclidean_ring_operators > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_euclidean_ring_operators2 > { typedef ::boost::detail::true_t value; }; template struct is_chained_base< ::boost::ordered_euclidean_ring_operators1 > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::input_iteratable > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::output_iteratable > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::forward_iteratable > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::bidirectional_iteratable > { typedef ::boost::detail::true_t value; }; + template struct is_chained_base< ::boost::random_access_iteratable > { typedef ::boost::detail::true_t value; }; +# 893 "../boost/operators.hpp" +template +struct operators2 + : totally_ordered2 > > {}; + + +template +struct operators : operators2 {}; + +template struct operators + + + + : totally_ordered > > > {}; + + + + +template +struct input_iterator_helper + : input_iteratable > {}; + +template +struct output_iterator_helper + : output_iteratable > +{ + T& operator*() { return static_cast(*this); } + T& operator++() { return static_cast(*this); } +}; + +template +struct forward_iterator_helper + : forward_iteratable > {}; + +template +struct bidirectional_iterator_helper + : bidirectional_iteratable > {}; + +template +struct random_access_iterator_helper + : random_access_iteratable > +{ + friend D requires_difference_operator(const T& x, const T& y) { + return x - y; + } +}; + +} +# 13 "quickbook/src/iterator.hpp" 2 + +# 1 "../boost/range/iterator_range.hpp" 1 +# 13 "../boost/range/iterator_range.hpp" +# 1 "../boost/range/iterator_range_core.hpp" 1 +# 21 "../boost/range/iterator_range_core.hpp" +# 1 "../boost/assert.hpp" 1 +# 50 "../boost/assert.hpp" +# 1 "/usr/include/assert.h" 1 3 4 +# 51 "../boost/assert.hpp" 2 +# 22 "../boost/range/iterator_range_core.hpp" 2 + +# 1 "../boost/iterator/iterator_facade.hpp" 1 +# 11 "../boost/iterator/iterator_facade.hpp" +# 1 "../boost/iterator/interoperable.hpp" 1 +# 10 "../boost/iterator/interoperable.hpp" +# 1 "../boost/mpl/bool.hpp" 1 +# 17 "../boost/mpl/bool.hpp" +# 1 "../boost/mpl/bool_fwd.hpp" 1 +# 17 "../boost/mpl/bool_fwd.hpp" +# 1 "../boost/mpl/aux_/adl_barrier.hpp" 1 +# 17 "../boost/mpl/aux_/adl_barrier.hpp" +# 1 "../boost/mpl/aux_/config/adl.hpp" 1 +# 17 "../boost/mpl/aux_/config/adl.hpp" +# 1 "../boost/mpl/aux_/config/msvc.hpp" 1 +# 18 "../boost/mpl/aux_/config/adl.hpp" 2 +# 1 "../boost/mpl/aux_/config/intel.hpp" 1 +# 19 "../boost/mpl/aux_/config/adl.hpp" 2 +# 1 "../boost/mpl/aux_/config/gcc.hpp" 1 +# 20 "../boost/mpl/aux_/config/adl.hpp" 2 +# 1 "../boost/mpl/aux_/config/workaround.hpp" 1 +# 21 "../boost/mpl/aux_/config/adl.hpp" 2 +# 18 "../boost/mpl/aux_/adl_barrier.hpp" 2 +# 33 "../boost/mpl/aux_/adl_barrier.hpp" +namespace mpl_ { namespace aux {} } +namespace boost { namespace mpl { using namespace mpl_; +namespace aux { using namespace mpl_::aux; } +}} +# 18 "../boost/mpl/bool_fwd.hpp" 2 + +namespace mpl_ { + +template< bool C_ > struct bool_; + + +typedef bool_ true_; +typedef bool_ false_; + +} + +namespace boost { namespace mpl { using ::mpl_::bool_; } } +namespace boost { namespace mpl { using ::mpl_::true_; } } +namespace boost { namespace mpl { using ::mpl_::false_; } } +# 18 "../boost/mpl/bool.hpp" 2 +# 1 "../boost/mpl/integral_c_tag.hpp" 1 +# 19 "../boost/mpl/integral_c_tag.hpp" +# 1 "../boost/mpl/aux_/config/static_constant.hpp" 1 +# 20 "../boost/mpl/integral_c_tag.hpp" 2 + +namespace mpl_ { +struct integral_c_tag { static const int value = 0; }; +} +namespace boost { namespace mpl { using ::mpl_::integral_c_tag; } } +# 19 "../boost/mpl/bool.hpp" 2 + + +namespace mpl_ { + +template< bool C_ > struct bool_ +{ + static const bool value = C_; + typedef integral_c_tag tag; + typedef bool_ type; + typedef bool value_type; + operator bool() const { return this->value; } +}; + + +template< bool C_ > +bool const bool_::value; + + +} +# 11 "../boost/iterator/interoperable.hpp" 2 +# 1 "../boost/mpl/or.hpp" 1 +# 17 "../boost/mpl/or.hpp" +# 1 "../boost/mpl/aux_/config/use_preprocessed.hpp" 1 +# 18 "../boost/mpl/or.hpp" 2 + + + + + +# 1 "../boost/mpl/aux_/nested_type_wknd.hpp" 1 +# 25 "../boost/mpl/aux_/nested_type_wknd.hpp" +namespace boost { namespace mpl { namespace aux { +template< typename T > struct nested_type_wknd + : T::type +{ +}; +}}} +# 24 "../boost/mpl/or.hpp" 2 +# 1 "../boost/mpl/aux_/na_spec.hpp" 1 +# 18 "../boost/mpl/aux_/na_spec.hpp" +# 1 "../boost/mpl/lambda_fwd.hpp" 1 +# 17 "../boost/mpl/lambda_fwd.hpp" +# 1 "../boost/mpl/void_fwd.hpp" 1 +# 19 "../boost/mpl/void_fwd.hpp" +namespace mpl_ { + +struct void_; + +} +namespace boost { namespace mpl { using ::mpl_::void_; } } +# 18 "../boost/mpl/lambda_fwd.hpp" 2 +# 1 "../boost/mpl/aux_/na.hpp" 1 +# 18 "../boost/mpl/aux_/na.hpp" +# 1 "../boost/mpl/aux_/na_fwd.hpp" 1 +# 19 "../boost/mpl/aux_/na_fwd.hpp" +namespace mpl_ { + + +struct na +{ + typedef na type; + enum { value = 0 }; +}; + +} +namespace boost { namespace mpl { using ::mpl_::na; } } +# 19 "../boost/mpl/aux_/na.hpp" 2 + +# 1 "../boost/mpl/aux_/config/ctps.hpp" 1 +# 21 "../boost/mpl/aux_/na.hpp" 2 + +namespace boost { namespace mpl { + +template< typename T > +struct is_na + : false_ +{ + + + +}; + +template<> +struct is_na + : true_ +{ + + + +}; + +template< typename T > +struct is_not_na + : true_ +{ + + + +}; + +template<> +struct is_not_na + : false_ +{ + + + +}; + + +template< typename T, typename U > struct if_na +{ + typedef T type; +}; + +template< typename U > struct if_na +{ + typedef U type; +}; +# 93 "../boost/mpl/aux_/na.hpp" +}} +# 19 "../boost/mpl/lambda_fwd.hpp" 2 +# 1 "../boost/mpl/aux_/config/lambda.hpp" 1 +# 17 "../boost/mpl/aux_/config/lambda.hpp" +# 1 "../boost/mpl/aux_/config/ttp.hpp" 1 +# 18 "../boost/mpl/aux_/config/lambda.hpp" 2 +# 20 "../boost/mpl/lambda_fwd.hpp" 2 + + + +# 1 "../boost/mpl/int.hpp" 1 +# 17 "../boost/mpl/int.hpp" +# 1 "../boost/mpl/int_fwd.hpp" 1 +# 18 "../boost/mpl/int_fwd.hpp" +# 1 "../boost/mpl/aux_/nttp_decl.hpp" 1 +# 17 "../boost/mpl/aux_/nttp_decl.hpp" +# 1 "../boost/mpl/aux_/config/nttp.hpp" 1 +# 18 "../boost/mpl/aux_/nttp_decl.hpp" 2 +# 19 "../boost/mpl/int_fwd.hpp" 2 + +namespace mpl_ { + +template< int N > struct int_; + +} +namespace boost { namespace mpl { using ::mpl_::int_; } } +# 18 "../boost/mpl/int.hpp" 2 + + +# 1 "../boost/mpl/aux_/integral_wrapper.hpp" 1 +# 17 "../boost/mpl/aux_/integral_wrapper.hpp" +# 1 "../boost/mpl/aux_/static_cast.hpp" 1 +# 18 "../boost/mpl/aux_/integral_wrapper.hpp" 2 + + + + +# 1 "../boost/preprocessor/cat.hpp" 1 +# 17 "../boost/preprocessor/cat.hpp" +# 1 "../boost/preprocessor/config/config.hpp" 1 +# 18 "../boost/preprocessor/cat.hpp" 2 +# 23 "../boost/mpl/aux_/integral_wrapper.hpp" 2 +# 40 "../boost/mpl/aux_/integral_wrapper.hpp" +namespace mpl_ { + +template< int N > +struct int_ +{ + static const int value = N; + + + + + + typedef int_ type; + + typedef int value_type; + typedef integral_c_tag tag; +# 72 "../boost/mpl/aux_/integral_wrapper.hpp" + typedef mpl_::int_< static_cast((value + 1)) > next; + typedef mpl_::int_< static_cast((value - 1)) > prior; + + + + + + + operator int() const { return static_cast(this->value); } +}; + + +template< int N > +int const mpl_::int_< N >::value; + + +} +# 21 "../boost/mpl/int.hpp" 2 +# 24 "../boost/mpl/lambda_fwd.hpp" 2 +# 1 "../boost/mpl/aux_/lambda_arity_param.hpp" 1 +# 25 "../boost/mpl/lambda_fwd.hpp" 2 +# 1 "../boost/mpl/aux_/template_arity_fwd.hpp" 1 +# 17 "../boost/mpl/aux_/template_arity_fwd.hpp" +namespace boost { namespace mpl { namespace aux { + +template< typename F > struct template_arity; + +}}} +# 26 "../boost/mpl/lambda_fwd.hpp" 2 + +namespace boost { namespace mpl { + +template< + typename T = na + , typename Tag = void_ + , typename Arity = int_< aux::template_arity::value > + + + > +struct lambda; + +}} +# 19 "../boost/mpl/aux_/na_spec.hpp" 2 + + + +# 1 "../boost/mpl/aux_/arity.hpp" 1 +# 17 "../boost/mpl/aux_/arity.hpp" +# 1 "../boost/mpl/aux_/config/dtp.hpp" 1 +# 18 "../boost/mpl/aux_/arity.hpp" 2 +# 23 "../boost/mpl/aux_/na_spec.hpp" 2 + + + +# 1 "../boost/mpl/aux_/preprocessor/params.hpp" 1 +# 17 "../boost/mpl/aux_/preprocessor/params.hpp" +# 1 "../boost/mpl/aux_/config/preprocessor.hpp" 1 +# 18 "../boost/mpl/aux_/preprocessor/params.hpp" 2 +# 45 "../boost/mpl/aux_/preprocessor/params.hpp" +# 1 "../boost/preprocessor/comma_if.hpp" 1 +# 15 "../boost/preprocessor/comma_if.hpp" +# 1 "../boost/preprocessor/punctuation/comma_if.hpp" 1 +# 18 "../boost/preprocessor/punctuation/comma_if.hpp" +# 1 "../boost/preprocessor/control/if.hpp" 1 +# 18 "../boost/preprocessor/control/if.hpp" +# 1 "../boost/preprocessor/control/iif.hpp" 1 +# 19 "../boost/preprocessor/control/if.hpp" 2 +# 1 "../boost/preprocessor/logical/bool.hpp" 1 +# 20 "../boost/preprocessor/control/if.hpp" 2 +# 19 "../boost/preprocessor/punctuation/comma_if.hpp" 2 +# 1 "../boost/preprocessor/facilities/empty.hpp" 1 +# 20 "../boost/preprocessor/punctuation/comma_if.hpp" 2 +# 1 "../boost/preprocessor/punctuation/comma.hpp" 1 +# 21 "../boost/preprocessor/punctuation/comma_if.hpp" 2 +# 16 "../boost/preprocessor/comma_if.hpp" 2 +# 46 "../boost/mpl/aux_/preprocessor/params.hpp" 2 +# 1 "../boost/preprocessor/repeat.hpp" 1 +# 15 "../boost/preprocessor/repeat.hpp" +# 1 "../boost/preprocessor/repetition/repeat.hpp" 1 +# 19 "../boost/preprocessor/repetition/repeat.hpp" +# 1 "../boost/preprocessor/debug/error.hpp" 1 +# 20 "../boost/preprocessor/repetition/repeat.hpp" 2 +# 1 "../boost/preprocessor/detail/auto_rec.hpp" 1 +# 21 "../boost/preprocessor/repetition/repeat.hpp" 2 +# 1 "../boost/preprocessor/tuple/eat.hpp" 1 +# 22 "../boost/preprocessor/repetition/repeat.hpp" 2 +# 16 "../boost/preprocessor/repeat.hpp" 2 +# 47 "../boost/mpl/aux_/preprocessor/params.hpp" 2 +# 1 "../boost/preprocessor/inc.hpp" 1 +# 15 "../boost/preprocessor/inc.hpp" +# 1 "../boost/preprocessor/arithmetic/inc.hpp" 1 +# 16 "../boost/preprocessor/inc.hpp" 2 +# 48 "../boost/mpl/aux_/preprocessor/params.hpp" 2 +# 27 "../boost/mpl/aux_/na_spec.hpp" 2 +# 1 "../boost/mpl/aux_/preprocessor/enum.hpp" 1 +# 28 "../boost/mpl/aux_/na_spec.hpp" 2 +# 1 "../boost/mpl/aux_/preprocessor/def_params_tail.hpp" 1 +# 17 "../boost/mpl/aux_/preprocessor/def_params_tail.hpp" +# 1 "../boost/mpl/limits/arity.hpp" 1 +# 18 "../boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 + + + + +# 1 "../boost/preprocessor/logical/and.hpp" 1 +# 19 "../boost/preprocessor/logical/and.hpp" +# 1 "../boost/preprocessor/logical/bitand.hpp" 1 +# 20 "../boost/preprocessor/logical/and.hpp" 2 +# 23 "../boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 +# 1 "../boost/preprocessor/identity.hpp" 1 +# 15 "../boost/preprocessor/identity.hpp" +# 1 "../boost/preprocessor/facilities/identity.hpp" 1 +# 16 "../boost/preprocessor/identity.hpp" 2 +# 24 "../boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 +# 1 "../boost/preprocessor/empty.hpp" 1 +# 25 "../boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 +# 66 "../boost/mpl/aux_/preprocessor/def_params_tail.hpp" +# 1 "../boost/preprocessor/arithmetic/add.hpp" 1 +# 17 "../boost/preprocessor/arithmetic/add.hpp" +# 1 "../boost/preprocessor/arithmetic/dec.hpp" 1 +# 18 "../boost/preprocessor/arithmetic/add.hpp" 2 + + +# 1 "../boost/preprocessor/control/while.hpp" 1 +# 20 "../boost/preprocessor/control/while.hpp" +# 1 "../boost/preprocessor/detail/auto_rec.hpp" 1 +# 21 "../boost/preprocessor/control/while.hpp" 2 +# 1 "../boost/preprocessor/list/fold_left.hpp" 1 +# 18 "../boost/preprocessor/list/fold_left.hpp" +# 1 "../boost/preprocessor/control/while.hpp" 1 +# 19 "../boost/preprocessor/list/fold_left.hpp" 2 + +# 1 "../boost/preprocessor/detail/auto_rec.hpp" 1 +# 21 "../boost/preprocessor/list/fold_left.hpp" 2 +# 41 "../boost/preprocessor/list/fold_left.hpp" +# 1 "../boost/preprocessor/list/detail/fold_left.hpp" 1 +# 17 "../boost/preprocessor/list/detail/fold_left.hpp" +# 1 "../boost/preprocessor/control/expr_iif.hpp" 1 +# 18 "../boost/preprocessor/list/detail/fold_left.hpp" 2 + +# 1 "../boost/preprocessor/list/adt.hpp" 1 +# 18 "../boost/preprocessor/list/adt.hpp" +# 1 "../boost/preprocessor/detail/is_binary.hpp" 1 +# 16 "../boost/preprocessor/detail/is_binary.hpp" +# 1 "../boost/preprocessor/detail/check.hpp" 1 +# 17 "../boost/preprocessor/detail/is_binary.hpp" 2 +# 19 "../boost/preprocessor/list/adt.hpp" 2 +# 1 "../boost/preprocessor/logical/compl.hpp" 1 +# 20 "../boost/preprocessor/list/adt.hpp" 2 +# 20 "../boost/preprocessor/list/detail/fold_left.hpp" 2 +# 42 "../boost/preprocessor/list/fold_left.hpp" 2 +# 22 "../boost/preprocessor/control/while.hpp" 2 +# 1 "../boost/preprocessor/list/fold_right.hpp" 1 +# 20 "../boost/preprocessor/list/fold_right.hpp" +# 1 "../boost/preprocessor/detail/auto_rec.hpp" 1 +# 21 "../boost/preprocessor/list/fold_right.hpp" 2 +# 37 "../boost/preprocessor/list/fold_right.hpp" +# 1 "../boost/preprocessor/list/detail/fold_right.hpp" 1 +# 18 "../boost/preprocessor/list/detail/fold_right.hpp" +# 1 "../boost/preprocessor/list/reverse.hpp" 1 +# 19 "../boost/preprocessor/list/detail/fold_right.hpp" 2 +# 38 "../boost/preprocessor/list/fold_right.hpp" 2 +# 23 "../boost/preprocessor/control/while.hpp" 2 +# 48 "../boost/preprocessor/control/while.hpp" +# 1 "../boost/preprocessor/control/detail/while.hpp" 1 +# 49 "../boost/preprocessor/control/while.hpp" 2 +# 21 "../boost/preprocessor/arithmetic/add.hpp" 2 +# 1 "../boost/preprocessor/tuple/elem.hpp" 1 +# 20 "../boost/preprocessor/tuple/elem.hpp" +# 1 "../boost/preprocessor/facilities/overload.hpp" 1 +# 17 "../boost/preprocessor/facilities/overload.hpp" +# 1 "../boost/preprocessor/variadic/size.hpp" 1 +# 18 "../boost/preprocessor/facilities/overload.hpp" 2 +# 21 "../boost/preprocessor/tuple/elem.hpp" 2 +# 1 "../boost/preprocessor/tuple/rem.hpp" 1 +# 22 "../boost/preprocessor/tuple/elem.hpp" 2 +# 1 "../boost/preprocessor/variadic/elem.hpp" 1 +# 23 "../boost/preprocessor/tuple/elem.hpp" 2 +# 22 "../boost/preprocessor/arithmetic/add.hpp" 2 +# 67 "../boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 +# 1 "../boost/preprocessor/arithmetic/sub.hpp" 1 +# 68 "../boost/mpl/aux_/preprocessor/def_params_tail.hpp" 2 +# 29 "../boost/mpl/aux_/na_spec.hpp" 2 + + +# 1 "../boost/mpl/aux_/config/eti.hpp" 1 +# 32 "../boost/mpl/aux_/na_spec.hpp" 2 + + + +# 1 "../boost/mpl/aux_/config/overload_resolution.hpp" 1 +# 36 "../boost/mpl/aux_/na_spec.hpp" 2 +# 25 "../boost/mpl/or.hpp" 2 +# 1 "../boost/mpl/aux_/lambda_support.hpp" 1 +# 26 "../boost/mpl/or.hpp" 2 +# 43 "../boost/mpl/or.hpp" +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 16 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/config/compiler.hpp" 1 +# 17 "../boost/mpl/aux_/include_preprocessed.hpp" 2 + + + +# 1 "../boost/preprocessor/stringize.hpp" 1 +# 21 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/or.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/or.hpp" +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct or_impl + : true_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct or_impl< false,T1,T2,T3,T4 > + : or_impl< + ::boost::mpl::aux::nested_type_wknd::value + , T2, T3, T4 + , false_ + > +{ +}; + +template<> +struct or_impl< + false + , false_, false_, false_, false_ + > + : false_ +{ +}; + +} + +template< + typename T1 = na + , typename T2 = na + , typename T3 = false_, typename T4 = false_, typename T5 = false_ + > +struct or_ + + : aux::or_impl< + ::boost::mpl::aux::nested_type_wknd::value + , T2, T3, T4, T5 + > + +{ + + + + + +}; + +template<> struct or_< + + + + na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : or_< T1 , T2 > { }; }; template< typename Tag > struct lambda< or_< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef or_< na , na > result_; typedef or_< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< or_< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< or_< na , na > > : int_<-1> { }; } + +}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 44 "../boost/mpl/or.hpp" 2 +# 12 "../boost/iterator/interoperable.hpp" 2 + +# 1 "../boost/type_traits/is_convertible.hpp" 1 +# 15 "../boost/type_traits/is_convertible.hpp" +# 1 "../boost/type_traits/intrinsics.hpp" 1 +# 12 "../boost/type_traits/intrinsics.hpp" +# 1 "../boost/type_traits/config.hpp" 1 +# 13 "../boost/type_traits/intrinsics.hpp" 2 +# 189 "../boost/type_traits/intrinsics.hpp" +# 1 "../boost/type_traits/is_same.hpp" 1 +# 31 "../boost/type_traits/is_same.hpp" +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 1 "../boost/type_traits/integral_constant.hpp" 1 +# 11 "../boost/type_traits/integral_constant.hpp" +# 1 "../boost/mpl/integral_c.hpp" 1 +# 17 "../boost/mpl/integral_c.hpp" +# 1 "../boost/mpl/integral_c_fwd.hpp" 1 +# 20 "../boost/mpl/integral_c_fwd.hpp" +namespace mpl_ { + + + + + +template< typename T, T N > struct integral_c; + + +} +namespace boost { namespace mpl { using ::mpl_::integral_c; } } +# 18 "../boost/mpl/integral_c.hpp" 2 +# 32 "../boost/mpl/integral_c.hpp" +# 1 "../boost/mpl/aux_/integral_wrapper.hpp" 1 +# 40 "../boost/mpl/aux_/integral_wrapper.hpp" +namespace mpl_ { + +template< typename T, T N > +struct integral_c +{ + static const T value = N; + + + + + + typedef integral_c type; + + typedef T value_type; + typedef integral_c_tag tag; +# 72 "../boost/mpl/aux_/integral_wrapper.hpp" + typedef integral_c< T, static_cast((value + 1)) > next; + typedef integral_c< T, static_cast((value - 1)) > prior; + + + + + + + operator T() const { return static_cast(this->value); } +}; + + +template< typename T, T N > +T const integral_c< T, N >::value; + + +} +# 33 "../boost/mpl/integral_c.hpp" 2 + + + + +namespace mpl_ { + +template< bool C > +struct integral_c +{ + static const bool value = C; + typedef integral_c_tag tag; + typedef integral_c type; + typedef bool value_type; + operator bool() const { return this->value; } +}; +} +# 12 "../boost/type_traits/integral_constant.hpp" 2 + +namespace boost{ + + + + +template + +struct integral_constant : public mpl::integral_c +{ + typedef integral_constant type; +}; + +template<> struct integral_constant : public mpl::true_ +{ + + + + + + + + typedef integral_constant type; +}; +template<> struct integral_constant : public mpl::false_ +{ + + + + + + + + typedef integral_constant type; +}; + +typedef integral_constant true_type; +typedef integral_constant false_type; + +} +# 16 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 32 "../boost/type_traits/is_same.hpp" 2 + +namespace boost { + + + +template< typename T, typename U > struct is_same : public ::boost::integral_constant { public: }; +template< typename T > struct is_same< T,T > : public ::boost::integral_constant { public: }; +# 98 "../boost/type_traits/is_same.hpp" +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 101 "../boost/type_traits/is_same.hpp" 2 +# 190 "../boost/type_traits/intrinsics.hpp" 2 +# 1 "../boost/type_traits/is_reference.hpp" 1 +# 16 "../boost/type_traits/is_reference.hpp" +# 1 "../boost/type_traits/is_lvalue_reference.hpp" 1 +# 32 "../boost/type_traits/is_lvalue_reference.hpp" +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 33 "../boost/type_traits/is_lvalue_reference.hpp" 2 + +namespace boost { + + + + + +template< typename T > struct is_lvalue_reference : public ::boost::integral_constant { public: }; +template< typename T > struct is_lvalue_reference< T& > : public ::boost::integral_constant { public: }; +# 113 "../boost/type_traits/is_lvalue_reference.hpp" +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 116 "../boost/type_traits/is_lvalue_reference.hpp" 2 +# 17 "../boost/type_traits/is_reference.hpp" 2 +# 1 "../boost/type_traits/is_rvalue_reference.hpp" 1 +# 15 "../boost/type_traits/is_rvalue_reference.hpp" +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 16 "../boost/type_traits/is_rvalue_reference.hpp" 2 + +namespace boost { + +template< typename T > struct is_rvalue_reference : public ::boost::integral_constant { public: }; + + + + +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 27 "../boost/type_traits/is_rvalue_reference.hpp" 2 +# 18 "../boost/type_traits/is_reference.hpp" 2 +# 1 "../boost/type_traits/ice.hpp" 1 +# 14 "../boost/type_traits/ice.hpp" +# 1 "../boost/type_traits/detail/yes_no_type.hpp" 1 +# 14 "../boost/type_traits/detail/yes_no_type.hpp" +namespace boost { +namespace type_traits { + +typedef char yes_type; +struct no_type +{ + char padding[8]; +}; + +} +} +# 15 "../boost/type_traits/ice.hpp" 2 +# 1 "../boost/type_traits/detail/ice_or.hpp" 1 +# 13 "../boost/type_traits/detail/ice_or.hpp" +namespace boost { +namespace type_traits { + +template +struct ice_or; + +template +struct ice_or +{ + static const bool value = true; +}; + +template <> +struct ice_or +{ + static const bool value = false; +}; + +} +} +# 16 "../boost/type_traits/ice.hpp" 2 +# 1 "../boost/type_traits/detail/ice_and.hpp" 1 +# 14 "../boost/type_traits/detail/ice_and.hpp" +namespace boost { +namespace type_traits { + +template +struct ice_and; + +template +struct ice_and +{ + static const bool value = false; +}; + +template <> +struct ice_and +{ + static const bool value = true; +}; + +} +} +# 17 "../boost/type_traits/ice.hpp" 2 +# 1 "../boost/type_traits/detail/ice_not.hpp" 1 +# 13 "../boost/type_traits/detail/ice_not.hpp" +namespace boost { +namespace type_traits { + +template +struct ice_not +{ + static const bool value = true; +}; + +template <> +struct ice_not +{ + static const bool value = false; +}; + +} +} +# 18 "../boost/type_traits/ice.hpp" 2 +# 1 "../boost/type_traits/detail/ice_eq.hpp" 1 +# 13 "../boost/type_traits/detail/ice_eq.hpp" +namespace boost { +namespace type_traits { + +template +struct ice_eq +{ + static const bool value = (b1 == b2); +}; + +template +struct ice_ne +{ + static const bool value = (b1 != b2); +}; + + +template bool const ice_eq::value; +template bool const ice_ne::value; + + +} +} +# 19 "../boost/type_traits/ice.hpp" 2 +# 19 "../boost/type_traits/is_reference.hpp" 2 + + +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 22 "../boost/type_traits/is_reference.hpp" 2 + +namespace boost { + +namespace detail { + +template +struct is_reference_impl +{ + static const bool value = (::boost::type_traits::ice_or< ::boost::is_lvalue_reference::value, ::boost::is_rvalue_reference::value >::value) + + + ; +}; + +} + +template< typename T > struct is_reference : public ::boost::integral_constant::value> { public: }; + +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 43 "../boost/type_traits/is_reference.hpp" 2 +# 191 "../boost/type_traits/intrinsics.hpp" 2 +# 1 "../boost/type_traits/is_volatile.hpp" 1 +# 28 "../boost/type_traits/is_volatile.hpp" +# 1 "../boost/type_traits/detail/cv_traits_impl.hpp" 1 +# 23 "../boost/type_traits/detail/cv_traits_impl.hpp" +namespace boost { +namespace detail { + + + + + + + +template struct cv_traits_imp {}; + +template +struct cv_traits_imp +{ + static const bool is_const = false; + static const bool is_volatile = false; + typedef T unqualified_type; +}; + +template +struct cv_traits_imp +{ + static const bool is_const = true; + static const bool is_volatile = false; + typedef T unqualified_type; +}; + +template +struct cv_traits_imp +{ + static const bool is_const = false; + static const bool is_volatile = true; + typedef T unqualified_type; +}; + +template +struct cv_traits_imp +{ + static const bool is_const = true; + static const bool is_volatile = true; + typedef T unqualified_type; +}; +# 92 "../boost/type_traits/detail/cv_traits_impl.hpp" +} +} +# 29 "../boost/type_traits/is_volatile.hpp" 2 +# 40 "../boost/type_traits/is_volatile.hpp" +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 41 "../boost/type_traits/is_volatile.hpp" 2 + +namespace boost { + +namespace detail{ +template +struct is_volatile_rval_filter +{ + + + + static const bool value = ::boost::detail::cv_traits_imp::is_volatile; + +}; +# 65 "../boost/type_traits/is_volatile.hpp" +} + + + + + + +template< typename T > struct is_volatile : public ::boost::integral_constant::value> { public: }; +template< typename T > struct is_volatile< T& > : public ::boost::integral_constant { public: }; +# 148 "../boost/type_traits/is_volatile.hpp" +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 151 "../boost/type_traits/is_volatile.hpp" 2 +# 192 "../boost/type_traits/intrinsics.hpp" 2 +# 16 "../boost/type_traits/is_convertible.hpp" 2 + + + +# 1 "../boost/type_traits/is_array.hpp" 1 +# 24 "../boost/type_traits/is_array.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 25 "../boost/type_traits/is_array.hpp" 2 + + +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 28 "../boost/type_traits/is_array.hpp" 2 + +namespace boost { + + + + +template< typename T > struct is_array : public ::boost::integral_constant { public: }; + +template< typename T, std::size_t N > struct is_array< T[N] > : public ::boost::integral_constant { public: }; +template< typename T, std::size_t N > struct is_array< T const[N] > : public ::boost::integral_constant { public: }; +template< typename T, std::size_t N > struct is_array< T volatile[N] > : public ::boost::integral_constant { public: }; +template< typename T, std::size_t N > struct is_array< T const volatile[N] > : public ::boost::integral_constant { public: }; + +template< typename T > struct is_array< T[] > : public ::boost::integral_constant { public: }; +template< typename T > struct is_array< T const[] > : public ::boost::integral_constant { public: }; +template< typename T > struct is_array< T volatile[] > : public ::boost::integral_constant { public: }; +template< typename T > struct is_array< T const volatile[] > : public ::boost::integral_constant { public: }; +# 87 "../boost/type_traits/is_array.hpp" +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 90 "../boost/type_traits/is_array.hpp" 2 +# 20 "../boost/type_traits/is_convertible.hpp" 2 +# 1 "../boost/type_traits/add_reference.hpp" 1 +# 17 "../boost/type_traits/add_reference.hpp" +# 1 "../boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/type_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/type_trait_def.hpp" 2 +# 18 "../boost/type_traits/add_reference.hpp" 2 + +namespace boost { + +namespace detail { +# 59 "../boost/type_traits/add_reference.hpp" +template +struct add_reference_rvalue_layer +{ + typedef T& type; +}; +# 73 "../boost/type_traits/add_reference.hpp" +template +struct add_reference_impl +{ + typedef typename add_reference_rvalue_layer::type type; +}; + + +template< typename T > struct add_reference_impl { public: typedef T& type; }; + + + + + +template<> struct add_reference_impl { public: typedef void type; }; + +template<> struct add_reference_impl { public: typedef void const type; }; +template<> struct add_reference_impl { public: typedef void volatile type; }; +template<> struct add_reference_impl { public: typedef void const volatile type; }; + + +} + +template< typename T > struct add_reference { public: typedef typename boost::detail::add_reference_impl::type type; }; + + + + + + + +} + +# 1 "../boost/type_traits/detail/type_trait_undef.hpp" 1 +# 106 "../boost/type_traits/add_reference.hpp" 2 +# 21 "../boost/type_traits/is_convertible.hpp" 2 + +# 1 "../boost/type_traits/is_arithmetic.hpp" 1 +# 13 "../boost/type_traits/is_arithmetic.hpp" +# 1 "../boost/type_traits/is_integral.hpp" 1 +# 15 "../boost/type_traits/is_integral.hpp" +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 16 "../boost/type_traits/is_integral.hpp" 2 + +namespace boost { + + + + + + + +template< typename T > struct is_integral : public ::boost::integral_constant { public: }; + +template<> struct is_integral< unsigned char > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned char const > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned char volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned char const volatile > : public ::boost::integral_constant { public: }; +template<> struct is_integral< unsigned short > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned short const > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned short volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned short const volatile > : public ::boost::integral_constant { public: }; +template<> struct is_integral< unsigned int > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned int const > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned int volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned int const volatile > : public ::boost::integral_constant { public: }; +template<> struct is_integral< unsigned long > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned long const > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned long volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< unsigned long const volatile > : public ::boost::integral_constant { public: }; + +template<> struct is_integral< signed char > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed char const > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed char volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed char const volatile > : public ::boost::integral_constant { public: }; +template<> struct is_integral< signed short > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed short const > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed short volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed short const volatile > : public ::boost::integral_constant { public: }; +template<> struct is_integral< signed int > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed int const > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed int volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed int const volatile > : public ::boost::integral_constant { public: }; +template<> struct is_integral< signed long > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed long const > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed long volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< signed long const volatile > : public ::boost::integral_constant { public: }; + +template<> struct is_integral< bool > : public ::boost::integral_constant { public: }; template<> struct is_integral< bool const > : public ::boost::integral_constant { public: }; template<> struct is_integral< bool volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< bool const volatile > : public ::boost::integral_constant { public: }; +template<> struct is_integral< char > : public ::boost::integral_constant { public: }; template<> struct is_integral< char const > : public ::boost::integral_constant { public: }; template<> struct is_integral< char volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< char const volatile > : public ::boost::integral_constant { public: }; + + + + + +template<> struct is_integral< wchar_t > : public ::boost::integral_constant { public: }; template<> struct is_integral< wchar_t const > : public ::boost::integral_constant { public: }; template<> struct is_integral< wchar_t volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< wchar_t const volatile > : public ::boost::integral_constant { public: }; +# 65 "../boost/type_traits/is_integral.hpp" +template<> struct is_integral< ::boost::ulong_long_type > : public ::boost::integral_constant { public: }; template<> struct is_integral< ::boost::ulong_long_type const > : public ::boost::integral_constant { public: }; template<> struct is_integral< ::boost::ulong_long_type volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< ::boost::ulong_long_type const volatile > : public ::boost::integral_constant { public: }; +template<> struct is_integral< ::boost::long_long_type > : public ::boost::integral_constant { public: }; template<> struct is_integral< ::boost::long_long_type const > : public ::boost::integral_constant { public: }; template<> struct is_integral< ::boost::long_long_type volatile > : public ::boost::integral_constant { public: }; template<> struct is_integral< ::boost::long_long_type const volatile > : public ::boost::integral_constant { public: }; + + + + + + + +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 77 "../boost/type_traits/is_integral.hpp" 2 +# 14 "../boost/type_traits/is_arithmetic.hpp" 2 +# 1 "../boost/type_traits/is_float.hpp" 1 +# 13 "../boost/type_traits/is_float.hpp" +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 14 "../boost/type_traits/is_float.hpp" 2 + +namespace boost { + + +template< typename T > struct is_float : public ::boost::integral_constant { public: }; +template<> struct is_float< float > : public ::boost::integral_constant { public: }; template<> struct is_float< float const > : public ::boost::integral_constant { public: }; template<> struct is_float< float volatile > : public ::boost::integral_constant { public: }; template<> struct is_float< float const volatile > : public ::boost::integral_constant { public: }; +template<> struct is_float< double > : public ::boost::integral_constant { public: }; template<> struct is_float< double const > : public ::boost::integral_constant { public: }; template<> struct is_float< double volatile > : public ::boost::integral_constant { public: }; template<> struct is_float< double const volatile > : public ::boost::integral_constant { public: }; +template<> struct is_float< long double > : public ::boost::integral_constant { public: }; template<> struct is_float< long double const > : public ::boost::integral_constant { public: }; template<> struct is_float< long double volatile > : public ::boost::integral_constant { public: }; template<> struct is_float< long double const volatile > : public ::boost::integral_constant { public: }; + +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 26 "../boost/type_traits/is_float.hpp" 2 +# 15 "../boost/type_traits/is_arithmetic.hpp" 2 + + + + + +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 21 "../boost/type_traits/is_arithmetic.hpp" 2 + +namespace boost { + + +namespace detail { + +template< typename T > +struct is_arithmetic_impl +{ + static const bool value = (::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_float::value >::value) + + + + ; +}; + +} + + + + + + +template< typename T > struct is_arithmetic : public ::boost::integral_constant::value> { public: }; + + +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 50 "../boost/type_traits/is_arithmetic.hpp" 2 +# 23 "../boost/type_traits/is_convertible.hpp" 2 +# 1 "../boost/type_traits/is_void.hpp" 1 +# 15 "../boost/type_traits/is_void.hpp" +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 16 "../boost/type_traits/is_void.hpp" 2 + +namespace boost { + + + + + +template< typename T > struct is_void : public ::boost::integral_constant { public: }; +template<> struct is_void< void > : public ::boost::integral_constant { public: }; + + +template<> struct is_void< void const > : public ::boost::integral_constant { public: }; +template<> struct is_void< void volatile > : public ::boost::integral_constant { public: }; +template<> struct is_void< void const volatile > : public ::boost::integral_constant { public: }; + + + + +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 37 "../boost/type_traits/is_void.hpp" 2 +# 24 "../boost/type_traits/is_convertible.hpp" 2 + +# 1 "../boost/type_traits/is_abstract.hpp" 1 +# 62 "../boost/type_traits/is_abstract.hpp" +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 63 "../boost/type_traits/is_abstract.hpp" 2 + + +namespace boost { +namespace detail{ + + +template +struct is_abstract_imp +{ + static const bool value = __is_abstract(T); +}; +# 141 "../boost/type_traits/is_abstract.hpp" +} + + +template< typename T > struct is_abstract : public ::boost::integral_constant::value> { public: }; + + + + +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 152 "../boost/type_traits/is_abstract.hpp" 2 +# 26 "../boost/type_traits/is_convertible.hpp" 2 + +# 1 "../boost/type_traits/add_rvalue_reference.hpp" 1 +# 19 "../boost/type_traits/add_rvalue_reference.hpp" +# 1 "../boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/type_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/type_trait_def.hpp" 2 +# 20 "../boost/type_traits/add_rvalue_reference.hpp" 2 +# 34 "../boost/type_traits/add_rvalue_reference.hpp" +namespace boost { + +namespace type_traits_detail { + + template + struct add_rvalue_reference_helper + { typedef T type; }; +# 50 "../boost/type_traits/add_rvalue_reference.hpp" + template + struct add_rvalue_reference_imp + { + typedef typename boost::type_traits_detail::add_rvalue_reference_helper + ::value && !is_reference::value) >::type type; + }; + +} + +template< typename T > struct add_rvalue_reference { public: typedef typename boost::type_traits_detail::add_rvalue_reference_imp::type type; }; + +} + +# 1 "../boost/type_traits/detail/type_trait_undef.hpp" 1 +# 64 "../boost/type_traits/add_rvalue_reference.hpp" 2 +# 28 "../boost/type_traits/is_convertible.hpp" 2 +# 37 "../boost/type_traits/is_convertible.hpp" +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 38 "../boost/type_traits/is_convertible.hpp" 2 + +namespace boost { +# 53 "../boost/type_traits/is_convertible.hpp" +namespace detail { +# 120 "../boost/type_traits/is_convertible.hpp" +struct any_conversion +{ + template any_conversion(const volatile T&); + template any_conversion(T&); +}; + +template struct checker +{ + static boost::type_traits::no_type _m_check(any_conversion ...); + static boost::type_traits::yes_type _m_check(T, int); +}; + +template +struct is_convertible_basic_impl +{ + static typename add_rvalue_reference::type _m_from; + static bool const value = sizeof( boost::detail::checker::_m_check(_m_from, 0) ) + == sizeof(::boost::type_traits::yes_type); +}; +# 292 "../boost/type_traits/is_convertible.hpp" +template +struct is_convertible_impl +{ + typedef typename add_reference::type ref_type; + static const bool value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::detail::is_convertible_basic_impl::value, ::boost::is_void::value >::value, ::boost::type_traits::ice_not< ::boost::is_array::value >::value >::value) +# 306 "../boost/type_traits/is_convertible.hpp" + ; +}; + + +template +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef is_convertible_impl type; + }; +}; + +template <> +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef true_type type; + }; +}; + +template <> +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template <> +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template +struct is_convertible_impl_dispatch_base +{ + + typedef is_convertible_impl_select< + ::boost::is_arithmetic::value, + ::boost::is_arithmetic::value, + + ::boost::is_abstract::value + + + + > selector; + + + + typedef typename selector::template rebind isc_binder; + typedef typename isc_binder::type type; +}; + +template +struct is_convertible_impl_dispatch + : public is_convertible_impl_dispatch_base::type +{}; +# 395 "../boost/type_traits/is_convertible.hpp" + template<> struct is_convertible_impl< void,void > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void,void const > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void,void volatile > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void,void const volatile > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void const,void > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void const,void const > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void const,void volatile > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void const,void const volatile > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void const > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void volatile > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void volatile,void const volatile > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void const > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void volatile > { public: static const bool value = (true); }; template<> struct is_convertible_impl< void const volatile,void const volatile > { public: static const bool value = (true); }; +# 405 "../boost/type_traits/is_convertible.hpp" +template< typename To > struct is_convertible_impl< void,To > { public: static const bool value = (false); }; +template< typename From > struct is_convertible_impl< From,void > { public: static const bool value = (false); }; + +template< typename To > struct is_convertible_impl< void const,To > { public: static const bool value = (false); }; +template< typename To > struct is_convertible_impl< void volatile,To > { public: static const bool value = (false); }; +template< typename To > struct is_convertible_impl< void const volatile,To > { public: static const bool value = (false); }; +template< typename From > struct is_convertible_impl< From,void const > { public: static const bool value = (false); }; +template< typename From > struct is_convertible_impl< From,void volatile > { public: static const bool value = (false); }; +template< typename From > struct is_convertible_impl< From,void const volatile > { public: static const bool value = (false); }; + + + +} + +template< typename From, typename To > struct is_convertible : public ::boost::integral_constant::value)> { public: }; + + + + + + + +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 430 "../boost/type_traits/is_convertible.hpp" 2 +# 14 "../boost/iterator/interoperable.hpp" 2 + +# 1 "../boost/iterator/detail/config_def.hpp" 1 +# 16 "../boost/iterator/interoperable.hpp" 2 + +namespace boost +{ +# 34 "../boost/iterator/interoperable.hpp" + template + struct is_interoperable + + + + : mpl::or_< + is_convertible< A, B > + , is_convertible< B, A > > + + { + }; + +} + +# 1 "../boost/iterator/detail/config_undef.hpp" 1 +# 49 "../boost/iterator/interoperable.hpp" 2 +# 12 "../boost/iterator/iterator_facade.hpp" 2 + + +# 1 "../boost/iterator/detail/facade_iterator_category.hpp" 1 + + + + + + +# 1 "../boost/iterator/iterator_categories.hpp" 1 +# 11 "../boost/iterator/iterator_categories.hpp" +# 1 "../boost/iterator/detail/config_def.hpp" 1 +# 12 "../boost/iterator/iterator_categories.hpp" 2 + + + +# 1 "../boost/mpl/eval_if.hpp" 1 +# 17 "../boost/mpl/eval_if.hpp" +# 1 "../boost/mpl/if.hpp" 1 +# 17 "../boost/mpl/if.hpp" +# 1 "../boost/mpl/aux_/value_wknd.hpp" 1 +# 18 "../boost/mpl/aux_/value_wknd.hpp" +# 1 "../boost/mpl/aux_/config/integral.hpp" 1 +# 19 "../boost/mpl/aux_/value_wknd.hpp" 2 +# 73 "../boost/mpl/aux_/value_wknd.hpp" +namespace boost { namespace mpl { namespace aux { + +template< typename T > struct value_type_wknd +{ + typedef typename T::value_type type; +}; +# 87 "../boost/mpl/aux_/value_wknd.hpp" +}}} +# 18 "../boost/mpl/if.hpp" 2 + + + + + + + +namespace boost { namespace mpl { + + + +template< + bool C + , typename T1 + , typename T2 + > +struct if_c +{ + typedef T1 type; +}; + +template< + typename T1 + , typename T2 + > +struct if_c +{ + typedef T2 type; +}; + + + +template< + typename T1 = na + , typename T2 = na + , typename T3 = na + > +struct if_ +{ + private: + + typedef if_c< + + + + static_cast(T1::value) + + , T2 + , T3 + > almost_type_; + + public: + typedef typename almost_type_::type type; + + +}; +# 131 "../boost/mpl/if.hpp" +template<> struct if_< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : if_< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< if_< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef if_< na , na , na > result_; typedef if_< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< if_< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< if_< na , na , na > > : int_<-1> { }; } + +}} +# 18 "../boost/mpl/eval_if.hpp" 2 + + + + + + +namespace boost { namespace mpl { + +template< + typename C = na + , typename F1 = na + , typename F2 = na + > +struct eval_if + + + + +{ + typedef typename if_::type f_; + typedef typename f_::type type; + + + + + +}; + + + +template< + bool C + , typename F1 + , typename F2 + > +struct eval_if_c + + + + +{ + typedef typename if_c::type f_; + typedef typename f_::type type; + + + + +}; + +template<> struct eval_if< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : eval_if< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< eval_if< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef eval_if< na , na , na > result_; typedef eval_if< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< eval_if< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< eval_if< na , na , na > > : int_<-1> { }; } + +}} +# 16 "../boost/iterator/iterator_categories.hpp" 2 +# 1 "../boost/mpl/identity.hpp" 1 +# 20 "../boost/mpl/identity.hpp" +namespace boost { namespace mpl { + +template< + typename T = na + > +struct identity +{ + typedef T type; + +}; + +template< + typename T = na + > +struct make_identity +{ + typedef identity type; + +}; + +template<> struct identity< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : identity< T1 > { }; }; template< typename Tag > struct lambda< identity< na > , Tag , int_<-1> > { typedef false_ is_le; typedef identity< na > result_; typedef identity< na > type; }; namespace aux { template< typename T1 > struct template_arity< identity< T1 > > : int_<1> { }; template<> struct template_arity< identity< na > > : int_<-1> { }; } +template<> struct make_identity< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : make_identity< T1 > { }; }; template< typename Tag > struct lambda< make_identity< na > , Tag , int_<-1> > { typedef false_ is_le; typedef make_identity< na > result_; typedef make_identity< na > type; }; namespace aux { template< typename T1 > struct template_arity< make_identity< T1 > > : int_<1> { }; template<> struct template_arity< make_identity< na > > : int_<-1> { }; } + +}} +# 17 "../boost/iterator/iterator_categories.hpp" 2 +# 1 "../boost/mpl/placeholders.hpp" 1 +# 24 "../boost/mpl/placeholders.hpp" +# 1 "../boost/mpl/arg.hpp" 1 +# 23 "../boost/mpl/arg.hpp" +# 1 "../boost/mpl/arg_fwd.hpp" 1 +# 21 "../boost/mpl/arg_fwd.hpp" +namespace mpl_ { + +template< int N > struct arg; + +} +namespace boost { namespace mpl { using ::mpl_::arg; } } +# 24 "../boost/mpl/arg.hpp" 2 + +# 1 "../boost/mpl/aux_/na_assert.hpp" 1 +# 23 "../boost/mpl/aux_/na_assert.hpp" +# 1 "../boost/mpl/assert.hpp" 1 +# 17 "../boost/mpl/assert.hpp" +# 1 "../boost/mpl/not.hpp" 1 +# 23 "../boost/mpl/not.hpp" +namespace boost { namespace mpl { + +namespace aux { + +template< long C_ > +struct not_impl + : bool_ +{ +}; + +} + + +template< + typename T = na + > +struct not_ + : aux::not_impl< + ::boost::mpl::aux::nested_type_wknd::value + > +{ + +}; + +template<> struct not_< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : not_< T1 > { }; }; template< typename Tag > struct lambda< not_< na > , Tag , int_<-1> > { typedef false_ is_le; typedef not_< na > result_; typedef not_< na > type; }; namespace aux { template< typename T1 > struct template_arity< not_< T1 > > : int_<1> { }; template<> struct template_arity< not_< na > > : int_<-1> { }; } + +}} +# 18 "../boost/mpl/assert.hpp" 2 + + +# 1 "../boost/mpl/aux_/yes_no.hpp" 1 +# 18 "../boost/mpl/aux_/yes_no.hpp" +# 1 "../boost/mpl/aux_/config/arrays.hpp" 1 +# 19 "../boost/mpl/aux_/yes_no.hpp" 2 + + + + +namespace boost { namespace mpl { namespace aux { + +typedef char (&no_tag)[1]; +typedef char (&yes_tag)[2]; + +template< bool C_ > struct yes_no_tag +{ + typedef no_tag type; +}; + +template<> struct yes_no_tag +{ + typedef yes_tag type; +}; + + +template< long n > struct weighted_tag +{ + + typedef char (&type)[n]; + + + + +}; +# 56 "../boost/mpl/aux_/yes_no.hpp" +}}} +# 21 "../boost/mpl/assert.hpp" 2 +# 29 "../boost/mpl/assert.hpp" +# 1 "../boost/mpl/aux_/config/pp_counter.hpp" 1 +# 30 "../boost/mpl/assert.hpp" 2 + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 36 "../boost/mpl/assert.hpp" 2 +# 62 "../boost/mpl/assert.hpp" +namespace mpl_ { + +struct failed {}; +# 75 "../boost/mpl/assert.hpp" +template< bool C > struct assert { typedef void* type; }; +template<> struct assert { typedef assert type; }; + +template< bool C > +int assertion_failed( typename assert::type ); + +template< bool C > +struct assertion +{ + static int failed( assert ); +}; + +template<> +struct assertion +{ + static int failed( void* ); +}; + +struct assert_ +{ + + template< typename T1, typename T2 = na, typename T3 = na, typename T4 = na > struct types {}; + + static assert_ const arg; + enum relations { equal = 1, not_equal, greater, greater_equal, less, less_equal }; +}; +# 123 "../boost/mpl/assert.hpp" +boost::mpl::aux::weighted_tag<1>::type operator==( assert_, assert_ ); +boost::mpl::aux::weighted_tag<2>::type operator!=( assert_, assert_ ); +boost::mpl::aux::weighted_tag<3>::type operator>( assert_, assert_ ); +boost::mpl::aux::weighted_tag<4>::type operator>=( assert_, assert_ ); +boost::mpl::aux::weighted_tag<5>::type operator<( assert_, assert_ ); +boost::mpl::aux::weighted_tag<6>::type operator<=( assert_, assert_ ); + +template< assert_::relations r, long x, long y > struct assert_relation {}; + + + + + + +template< bool > struct assert_arg_pred_impl { typedef int type; }; +template<> struct assert_arg_pred_impl { typedef void* type; }; + +template< typename P > struct assert_arg_pred +{ + typedef typename P::type p_type; + typedef typename assert_arg_pred_impl< p_type::value >::type type; +}; + +template< typename P > struct assert_arg_pred_not +{ + typedef typename P::type p_type; + enum { p = !p_type::value }; + typedef typename assert_arg_pred_impl

::type type; +}; + +template< typename Pred > +failed ************ (Pred::************ + assert_arg( void (*)(Pred), typename assert_arg_pred::type ) + ); + +template< typename Pred > +failed ************ (boost::mpl::not_::************ + assert_not_arg( void (*)(Pred), typename assert_arg_pred_not::type ) + ); + +template< typename Pred > +assert +assert_arg( void (*)(Pred), typename assert_arg_pred_not::type ); + +template< typename Pred > +assert +assert_not_arg( void (*)(Pred), typename assert_arg_pred::type ); +# 212 "../boost/mpl/assert.hpp" +} +# 24 "../boost/mpl/aux_/na_assert.hpp" 2 +# 26 "../boost/mpl/arg.hpp" 2 +# 1 "../boost/mpl/aux_/arity_spec.hpp" 1 +# 27 "../boost/mpl/arg.hpp" 2 +# 1 "../boost/mpl/aux_/arg_typedef.hpp" 1 +# 28 "../boost/mpl/arg.hpp" 2 +# 37 "../boost/mpl/arg.hpp" +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/arg.hpp" 1 +# 13 "../boost/mpl/aux_/preprocessed/gcc/arg.hpp" +namespace mpl_ { +template<> struct arg< -1 > +{ + static const int value = -1; + + + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + enum { mpl_assertion_in_line_27 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na))0, 1 ) ) ) }; + }; +}; + +template<> struct arg<1> +{ + static const int value = 1; + typedef arg<2> next; + + + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + enum { mpl_assertion_in_line_45 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na))0, 1 ) ) ) }; + }; +}; + +template<> struct arg<2> +{ + static const int value = 2; + typedef arg<3> next; + + + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U2 type; + enum { mpl_assertion_in_line_63 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na))0, 1 ) ) ) }; + }; +}; + +template<> struct arg<3> +{ + static const int value = 3; + typedef arg<4> next; + + + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U3 type; + enum { mpl_assertion_in_line_81 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na))0, 1 ) ) ) }; + }; +}; + +template<> struct arg<4> +{ + static const int value = 4; + typedef arg<5> next; + + + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U4 type; + enum { mpl_assertion_in_line_99 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na))0, 1 ) ) ) }; + }; +}; + +template<> struct arg<5> +{ + static const int value = 5; + typedef arg<6> next; + + + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U5 type; + enum { mpl_assertion_in_line_117 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (boost::mpl::is_na))0, 1 ) ) ) }; + }; +}; + + + +} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 38 "../boost/mpl/arg.hpp" 2 +# 25 "../boost/mpl/placeholders.hpp" 2 +# 43 "../boost/mpl/placeholders.hpp" +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/placeholders.hpp" 1 +# 13 "../boost/mpl/aux_/preprocessed/gcc/placeholders.hpp" +namespace mpl_ { +typedef arg< -1 > _; +} +namespace boost { namespace mpl { + +using ::mpl_::_; + +namespace placeholders { +using mpl_::_; +} + +}} + + + +namespace mpl_ { +typedef arg<1> _1; + +} +namespace boost { namespace mpl { + +using ::mpl_::_1; + +namespace placeholders { +using mpl_::_1; +} + +}} +namespace mpl_ { +typedef arg<2> _2; + +} +namespace boost { namespace mpl { + +using ::mpl_::_2; + +namespace placeholders { +using mpl_::_2; +} + +}} +namespace mpl_ { +typedef arg<3> _3; + +} +namespace boost { namespace mpl { + +using ::mpl_::_3; + +namespace placeholders { +using mpl_::_3; +} + +}} +namespace mpl_ { +typedef arg<4> _4; + +} +namespace boost { namespace mpl { + +using ::mpl_::_4; + +namespace placeholders { +using mpl_::_4; +} + +}} +namespace mpl_ { +typedef arg<5> _5; + +} +namespace boost { namespace mpl { + +using ::mpl_::_5; + +namespace placeholders { +using mpl_::_5; +} + +}} +namespace mpl_ { +typedef arg<6> _6; + +} +namespace boost { namespace mpl { + +using ::mpl_::_6; + +namespace placeholders { +using mpl_::_6; +} + +}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 44 "../boost/mpl/placeholders.hpp" 2 +# 18 "../boost/iterator/iterator_categories.hpp" 2 + + + + +# 1 "../boost/static_assert.hpp" 1 +# 51 "../boost/static_assert.hpp" +namespace boost{ + + +template struct STATIC_ASSERTION_FAILURE; + +template <> struct STATIC_ASSERTION_FAILURE { enum { value = 1 }; }; + + +template struct static_assert_test{}; + +} +# 23 "../boost/iterator/iterator_categories.hpp" 2 + +namespace boost { + + + + + +struct no_traversal_tag {}; + +struct incrementable_traversal_tag + : no_traversal_tag +{ + + +}; + +struct single_pass_traversal_tag + : incrementable_traversal_tag +{ + + +}; + +struct forward_traversal_tag + : single_pass_traversal_tag +{ + + +}; + +struct bidirectional_traversal_tag + : forward_traversal_tag +{ + + +}; + +struct random_access_traversal_tag + : bidirectional_traversal_tag +{ + + +}; + +namespace detail +{ + + + + + + + template + struct old_category_to_traversal + : mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , void + > + > + > + > + > + {}; +# 108 "../boost/iterator/iterator_categories.hpp" + template + struct pure_traversal_tag + : mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::eval_if< + is_convertible + , mpl::identity + , void + > + > + > + > + > + { + }; +# 142 "../boost/iterator/iterator_categories.hpp" +} + + + + + +template +struct iterator_category_to_traversal + : mpl::eval_if< + is_convertible + , mpl::identity + , boost::detail::old_category_to_traversal + > +{}; + + +template +struct iterator_traversal + : iterator_category_to_traversal< + typename boost::detail::iterator_traits::iterator_category + > +{}; +# 184 "../boost/iterator/iterator_categories.hpp" +} + +# 1 "../boost/iterator/detail/config_undef.hpp" 1 +# 187 "../boost/iterator/iterator_categories.hpp" 2 +# 8 "../boost/iterator/detail/facade_iterator_category.hpp" 2 + + +# 1 "../boost/mpl/and.hpp" 1 +# 42 "../boost/mpl/and.hpp" +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/and.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/and.hpp" +namespace boost { namespace mpl { + +namespace aux { + +template< bool C_, typename T1, typename T2, typename T3, typename T4 > +struct and_impl + : false_ +{ +}; + +template< typename T1, typename T2, typename T3, typename T4 > +struct and_impl< true,T1,T2,T3,T4 > + : and_impl< + ::boost::mpl::aux::nested_type_wknd::value + , T2, T3, T4 + , true_ + > +{ +}; + +template<> +struct and_impl< + true + , true_, true_, true_, true_ + > + : true_ +{ +}; + +} + +template< + typename T1 = na + , typename T2 = na + , typename T3 = true_, typename T4 = true_, typename T5 = true_ + > +struct and_ + + : aux::and_impl< + ::boost::mpl::aux::nested_type_wknd::value + , T2, T3, T4, T5 + > + +{ + + + + + +}; + +template<> struct and_< + + + + na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : and_< T1 , T2 > { }; }; template< typename Tag > struct lambda< and_< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef and_< na , na > result_; typedef and_< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< and_< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< and_< na , na > > : int_<-1> { }; } + +}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 43 "../boost/mpl/and.hpp" 2 +# 11 "../boost/iterator/detail/facade_iterator_category.hpp" 2 + + + + + + +# 1 "../boost/type_traits/is_const.hpp" 1 +# 43 "../boost/type_traits/is_const.hpp" +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 44 "../boost/type_traits/is_const.hpp" 2 + +namespace boost { + + + + + + + +namespace detail{ + + + + +template +struct is_const_rvalue_filter +{ + + + + static const bool value = ::boost::detail::cv_traits_imp::is_const; + +}; + + + + + + + +} + + +template< typename T > struct is_const : public ::boost::integral_constant::value> { public: }; +template< typename T > struct is_const< T& > : public ::boost::integral_constant { public: }; +# 160 "../boost/type_traits/is_const.hpp" +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 163 "../boost/type_traits/is_const.hpp" 2 +# 18 "../boost/iterator/detail/facade_iterator_category.hpp" 2 + + + + + +# 1 "../boost/iterator/detail/config_def.hpp" 1 +# 24 "../boost/iterator/detail/facade_iterator_category.hpp" 2 + + +# 1 "../boost/detail/indirect_traits.hpp" 1 + + + + + + +# 1 "../boost/type_traits/is_function.hpp" 1 +# 15 "../boost/type_traits/is_function.hpp" +# 1 "../boost/type_traits/detail/false_result.hpp" 1 +# 14 "../boost/type_traits/detail/false_result.hpp" +namespace boost { +namespace type_traits { + + +struct false_result +{ + template struct result_ + { + static const bool value = false; + }; +}; + +}} +# 16 "../boost/type_traits/is_function.hpp" 2 + + + +# 1 "../boost/type_traits/detail/is_function_ptr_helper.hpp" 1 +# 26 "../boost/type_traits/detail/is_function_ptr_helper.hpp" +namespace boost { +namespace type_traits { + +template +struct is_function_ptr_helper +{ + static const bool value = false; +}; + + + + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; + +template +struct is_function_ptr_helper { static const bool value = true; }; +# 203 "../boost/type_traits/detail/is_function_ptr_helper.hpp" +} +} +# 20 "../boost/type_traits/is_function.hpp" 2 + + + + + + +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 27 "../boost/type_traits/is_function.hpp" 2 + + + + + + + +namespace boost { + + + +namespace detail { + + +template +struct is_function_chooser + : public ::boost::type_traits::false_result +{ +}; + +template <> +struct is_function_chooser +{ + template< typename T > struct result_ + : public ::boost::type_traits::is_function_ptr_helper + { + }; +}; + +template +struct is_function_impl + : public is_function_chooser< ::boost::is_reference::value > + ::template result_ +{ +}; +# 90 "../boost/type_traits/is_function.hpp" +} + + + + + + +template< typename T > struct is_function : public ::boost::integral_constant::value> { public: }; + + + + +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 105 "../boost/type_traits/is_function.hpp" 2 +# 8 "../boost/detail/indirect_traits.hpp" 2 + +# 1 "../boost/type_traits/is_pointer.hpp" 1 +# 24 "../boost/type_traits/is_pointer.hpp" +# 1 "../boost/type_traits/is_member_pointer.hpp" 1 +# 28 "../boost/type_traits/is_member_pointer.hpp" +# 1 "../boost/type_traits/is_member_function_pointer.hpp" 1 +# 24 "../boost/type_traits/is_member_function_pointer.hpp" +# 1 "../boost/type_traits/detail/is_mem_fun_pointer_impl.hpp" 1 +# 25 "../boost/type_traits/detail/is_mem_fun_pointer_impl.hpp" +namespace boost { +namespace type_traits { + +template +struct is_mem_fun_pointer_impl +{ + static const bool value = false; +}; + + + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; + +template +struct is_mem_fun_pointer_impl { static const bool value = true; }; +# 776 "../boost/type_traits/detail/is_mem_fun_pointer_impl.hpp" +} +} +# 25 "../boost/type_traits/is_member_function_pointer.hpp" 2 +# 1 "../boost/type_traits/remove_cv.hpp" 1 +# 14 "../boost/type_traits/remove_cv.hpp" +# 1 "../boost/type_traits/broken_compiler_spec.hpp" 1 +# 95 "../boost/type_traits/broken_compiler_spec.hpp" + + + + + + + + + + + + + + + +# 15 "../boost/type_traits/remove_cv.hpp" 2 + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 20 "../boost/type_traits/remove_cv.hpp" 2 + + + + + + +# 1 "../boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/type_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/type_trait_def.hpp" 2 +# 27 "../boost/type_traits/remove_cv.hpp" 2 + +namespace boost { + + + +namespace detail{ + +template +struct rvalue_ref_filter_rem_cv +{ + typedef typename boost::detail::cv_traits_imp::unqualified_type type; +}; +# 52 "../boost/type_traits/remove_cv.hpp" +} + + + +template< typename T > struct remove_cv { public: typedef typename boost::detail::rvalue_ref_filter_rem_cv::type type; }; +template< typename T > struct remove_cv { public: typedef T& type; }; + +template< typename T, std::size_t N > struct remove_cv { public: typedef T type[N]; }; +template< typename T, std::size_t N > struct remove_cv { public: typedef T type[N]; }; +template< typename T, std::size_t N > struct remove_cv { public: typedef T type[N]; }; +# 80 "../boost/type_traits/remove_cv.hpp" +} + +# 1 "../boost/type_traits/detail/type_trait_undef.hpp" 1 +# 83 "../boost/type_traits/remove_cv.hpp" 2 +# 26 "../boost/type_traits/is_member_function_pointer.hpp" 2 +# 36 "../boost/type_traits/is_member_function_pointer.hpp" +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 37 "../boost/type_traits/is_member_function_pointer.hpp" 2 + +namespace boost { + + + + + +template< typename T > struct is_member_function_pointer : public ::boost::integral_constant::type>::value> { public: }; +# 132 "../boost/type_traits/is_member_function_pointer.hpp" +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 135 "../boost/type_traits/is_member_function_pointer.hpp" 2 +# 29 "../boost/type_traits/is_member_pointer.hpp" 2 +# 39 "../boost/type_traits/is_member_pointer.hpp" +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 40 "../boost/type_traits/is_member_pointer.hpp" 2 + +namespace boost { +# 50 "../boost/type_traits/is_member_pointer.hpp" +template< typename T > struct is_member_pointer : public ::boost::integral_constant::value> { public: }; +template< typename T, typename U > struct is_member_pointer< U T::* > : public ::boost::integral_constant { public: }; + + +template< typename T, typename U > struct is_member_pointer< U T::*const > : public ::boost::integral_constant { public: }; +template< typename T, typename U > struct is_member_pointer< U T::*volatile > : public ::boost::integral_constant { public: }; +template< typename T, typename U > struct is_member_pointer< U T::*const volatile > : public ::boost::integral_constant { public: }; +# 112 "../boost/type_traits/is_member_pointer.hpp" +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 115 "../boost/type_traits/is_member_pointer.hpp" 2 +# 25 "../boost/type_traits/is_pointer.hpp" 2 +# 41 "../boost/type_traits/is_pointer.hpp" +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 42 "../boost/type_traits/is_pointer.hpp" 2 + +namespace boost { + + + + + +namespace detail { + +template< typename T > struct is_pointer_helper +{ + static const bool value = false; +}; +# 63 "../boost/type_traits/is_pointer.hpp" +template< typename T > struct is_pointer_helper { static const bool value = true; }; + + + +template< typename T > +struct is_pointer_impl +{ +# 80 "../boost/type_traits/is_pointer.hpp" + static const bool value = (::boost::type_traits::ice_and< ::boost::detail::is_pointer_helper::type>::value , ::boost::type_traits::ice_not< ::boost::is_member_pointer::value >::value >::value) + + + + + + + ; + +}; + +} + +template< typename T > struct is_pointer : public ::boost::integral_constant::value> { public: }; +# 158 "../boost/type_traits/is_pointer.hpp" +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 161 "../boost/type_traits/is_pointer.hpp" 2 +# 10 "../boost/detail/indirect_traits.hpp" 2 +# 1 "../boost/type_traits/is_class.hpp" 1 +# 37 "../boost/type_traits/is_class.hpp" +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 38 "../boost/type_traits/is_class.hpp" 2 + +namespace boost { + +namespace detail { +# 120 "../boost/type_traits/is_class.hpp" +template +struct is_class_impl +{ + static const bool value = __is_class(T); +}; + + +} + + + + + +template< typename T > struct is_class : public ::boost::integral_constant::value> { public: }; + + +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 139 "../boost/type_traits/is_class.hpp" 2 +# 11 "../boost/detail/indirect_traits.hpp" 2 + + + + + +# 1 "../boost/type_traits/remove_reference.hpp" 1 +# 21 "../boost/type_traits/remove_reference.hpp" +# 1 "../boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/type_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/type_trait_def.hpp" 2 +# 22 "../boost/type_traits/remove_reference.hpp" 2 + +namespace boost { + + + +namespace detail{ + + + + +template +struct remove_rvalue_ref +{ + typedef T type; +}; +# 45 "../boost/type_traits/remove_reference.hpp" +} + +template< typename T > struct remove_reference { public: typedef typename boost::detail::remove_rvalue_ref::type type; }; +template< typename T > struct remove_reference { public: typedef T type; }; +# 66 "../boost/type_traits/remove_reference.hpp" +} + +# 1 "../boost/type_traits/detail/type_trait_undef.hpp" 1 +# 69 "../boost/type_traits/remove_reference.hpp" 2 +# 17 "../boost/detail/indirect_traits.hpp" 2 +# 1 "../boost/type_traits/remove_pointer.hpp" 1 +# 26 "../boost/type_traits/remove_pointer.hpp" +# 1 "../boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/type_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/type_trait_def.hpp" 2 +# 27 "../boost/type_traits/remove_pointer.hpp" 2 + +namespace boost { +# 76 "../boost/type_traits/remove_pointer.hpp" +template< typename T > struct remove_pointer { public: typedef T type; }; +template< typename T > struct remove_pointer { public: typedef T type; }; +template< typename T > struct remove_pointer { public: typedef T type; }; +template< typename T > struct remove_pointer { public: typedef T type; }; +template< typename T > struct remove_pointer { public: typedef T type; }; + + + + + + + +} + +# 1 "../boost/type_traits/detail/type_trait_undef.hpp" 1 +# 91 "../boost/type_traits/remove_pointer.hpp" 2 +# 18 "../boost/detail/indirect_traits.hpp" 2 +# 33 "../boost/detail/indirect_traits.hpp" +namespace boost { namespace detail { + +namespace indirect_traits { + + +template +struct is_reference_to_const : mpl::false_ +{ +}; + +template +struct is_reference_to_const : mpl::true_ +{ +}; +# 55 "../boost/detail/indirect_traits.hpp" +template +struct is_reference_to_function : mpl::false_ +{ +}; + +template +struct is_reference_to_function : is_function +{ +}; + +template +struct is_pointer_to_function : mpl::false_ +{ +}; + + + +template +struct is_pointer_to_function : is_function +{ +}; + +template +struct is_reference_to_member_function_pointer_impl : mpl::false_ +{ +}; + +template +struct is_reference_to_member_function_pointer_impl + : is_member_function_pointer::type> +{ +}; + + +template +struct is_reference_to_member_function_pointer + : is_reference_to_member_function_pointer_impl +{ + +}; + +template +struct is_reference_to_function_pointer_aux + : mpl::and_< + is_reference + , is_pointer_to_function< + typename remove_cv< + typename remove_reference::type + >::type + > + > +{ + +}; + +template +struct is_reference_to_function_pointer + : mpl::if_< + is_reference_to_function + , mpl::false_ + , is_reference_to_function_pointer_aux + >::type +{ +}; + +template +struct is_reference_to_non_const + : mpl::and_< + is_reference + , mpl::not_< + is_reference_to_const + > + > +{ +}; + +template +struct is_reference_to_volatile : mpl::false_ +{ +}; + +template +struct is_reference_to_volatile : mpl::true_ +{ +}; +# 149 "../boost/detail/indirect_traits.hpp" +template +struct is_reference_to_pointer : mpl::false_ +{ +}; + +template +struct is_reference_to_pointer : mpl::true_ +{ +}; + +template +struct is_reference_to_pointer : mpl::true_ +{ +}; + +template +struct is_reference_to_pointer : mpl::true_ +{ +}; + +template +struct is_reference_to_pointer : mpl::true_ +{ +}; + +template +struct is_reference_to_class + : mpl::and_< + is_reference + , is_class< + typename remove_cv< + typename remove_reference::type + >::type + > + > +{ + +}; + +template +struct is_pointer_to_class + : mpl::and_< + is_pointer + , is_class< + typename remove_cv< + typename remove_pointer::type + >::type + > + > +{ + +}; +# 481 "../boost/detail/indirect_traits.hpp" +} + +using namespace indirect_traits; + +}} +# 27 "../boost/iterator/detail/facade_iterator_category.hpp" 2 + + + + + + + +namespace boost { struct use_default; } + +namespace boost { namespace detail { + +struct input_output_iterator_tag + : std::input_iterator_tag +{ + + + + + + + operator std::output_iterator_tag() const + { + return std::output_iterator_tag(); + } +}; + + + + + + +template +struct iterator_writability_disabled + + : mpl::or_< + is_const + , boost::detail::indirect_traits::is_reference_to_const + , is_const + > + + + +{}; +# 86 "../boost/iterator/detail/facade_iterator_category.hpp" +template +struct iterator_facade_default_category + : mpl::eval_if< + mpl::and_< + is_reference + , is_convertible + > + , mpl::eval_if< + is_convertible + , mpl::identity + , mpl::if_< + is_convertible + , std::bidirectional_iterator_tag + , std::forward_iterator_tag + > + > + , typename mpl::eval_if< + mpl::and_< + is_convertible + + + , is_convertible + > + , mpl::identity + , mpl::identity + > + > +{ +}; + + +template +struct is_iterator_category + : mpl::or_< + is_convertible + , is_convertible + > +{ +}; + +template +struct is_iterator_traversal + : is_convertible +{}; + + + + + + + +template +struct iterator_category_with_traversal + : Category, Traversal +{ + + + + + enum { mpl_assertion_in_line_149 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) ( is_convertible< typename iterator_category_to_traversal::type , Traversal >))0, 1 ) ) ) } + + + + ; + + enum { mpl_assertion_in_line_151 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_arg( (void (*) (is_iterator_category))0, 1 ) ) ) }; + enum { mpl_assertion_in_line_152 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (is_iterator_category))0, 1 ) ) ) }; + enum { mpl_assertion_in_line_153 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (is_iterator_traversal))0, 1 ) ) ) }; + + enum { mpl_assertion_in_line_155 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_arg( (void (*) (is_iterator_traversal))0, 1 ) ) ) }; + + +}; + + + +template +struct facade_iterator_category_impl +{ + + enum { mpl_assertion_in_line_166 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_not_arg( (void (*) (is_iterator_category))0, 1 ) ) ) }; + + + typedef typename iterator_facade_default_category< + Traversal,ValueParam,Reference + >::type category; + + typedef typename mpl::if_< + is_same< + Traversal + , typename iterator_category_to_traversal::type + > + , category + , iterator_category_with_traversal + >::type type; +}; + + + + +template +struct facade_iterator_category + : mpl::eval_if< + is_iterator_category + , mpl::identity + , facade_iterator_category_impl + > +{ +}; + +}} + +# 1 "../boost/iterator/detail/config_undef.hpp" 1 +# 199 "../boost/iterator/detail/facade_iterator_category.hpp" 2 +# 15 "../boost/iterator/iterator_facade.hpp" 2 +# 1 "../boost/iterator/detail/enable_if.hpp" 1 +# 13 "../boost/iterator/detail/enable_if.hpp" +# 1 "../boost/iterator/detail/config_def.hpp" 1 +# 14 "../boost/iterator/detail/enable_if.hpp" 2 + + + + + + + +namespace boost +{ + + namespace iterators + { + + + + template + struct enabled + { + template + struct base + { + typedef T type; + }; + }; + + + + + + + template<> + struct enabled + { + template + struct base + { +# 62 "../boost/iterator/detail/enable_if.hpp" + }; + }; + + + template + struct enable_if + + : enabled<(Cond::value)>::template base + + + + { + + + + }; + + } + +} + +# 1 "../boost/iterator/detail/config_undef.hpp" 1 +# 85 "../boost/iterator/detail/enable_if.hpp" 2 +# 16 "../boost/iterator/iterator_facade.hpp" 2 + +# 1 "../boost/implicit_cast.hpp" 1 +# 10 "../boost/implicit_cast.hpp" +namespace boost { + + + + + + +template +inline T implicit_cast (typename mpl::identity::type x) { + return x; +} + + + + + +} +# 18 "../boost/iterator/iterator_facade.hpp" 2 + + + +# 1 "../boost/type_traits/add_const.hpp" 1 +# 16 "../boost/type_traits/add_const.hpp" +# 1 "../boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/type_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/type_trait_def.hpp" 2 +# 17 "../boost/type_traits/add_const.hpp" 2 + +namespace boost { +# 33 "../boost/type_traits/add_const.hpp" +template< typename T > struct add_const { public: typedef T const type; }; + + + + + + +template< typename T > struct add_const { public: typedef T& type; }; + + +} + +# 1 "../boost/type_traits/detail/type_trait_undef.hpp" 1 +# 46 "../boost/type_traits/add_const.hpp" 2 +# 22 "../boost/iterator/iterator_facade.hpp" 2 +# 1 "../boost/type_traits/add_pointer.hpp" 1 +# 15 "../boost/type_traits/add_pointer.hpp" +# 1 "../boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/type_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/type_trait_def.hpp" 2 +# 16 "../boost/type_traits/add_pointer.hpp" 2 + +namespace boost { + +namespace detail { +# 55 "../boost/type_traits/add_pointer.hpp" +template +struct add_pointer_impl +{ + typedef typename remove_reference::type no_ref_type; + typedef no_ref_type* type; +}; + + + +} + +template< typename T > struct add_pointer { public: typedef typename boost::detail::add_pointer_impl::type type; }; + +} + +# 1 "../boost/type_traits/detail/type_trait_undef.hpp" 1 +# 71 "../boost/type_traits/add_pointer.hpp" 2 +# 23 "../boost/iterator/iterator_facade.hpp" 2 +# 1 "../boost/type_traits/remove_const.hpp" 1 +# 20 "../boost/type_traits/remove_const.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 21 "../boost/type_traits/remove_const.hpp" 2 + + + + + + +# 1 "../boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/type_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/type_trait_def.hpp" 2 +# 28 "../boost/type_traits/remove_const.hpp" 2 + +namespace boost { + + + +namespace detail { + +template +struct remove_const_helper +{ + typedef T type; +}; + +template +struct remove_const_helper +{ + typedef T volatile type; +}; + + +template +struct remove_const_impl +{ + typedef typename remove_const_helper< + typename cv_traits_imp::unqualified_type + , ::boost::is_volatile::value + >::type type; +}; +# 69 "../boost/type_traits/remove_const.hpp" +} + + + +template< typename T > struct remove_const { public: typedef typename boost::detail::remove_const_impl::type type; }; +template< typename T > struct remove_const { public: typedef T& type; }; + +template< typename T, std::size_t N > struct remove_const { public: typedef T type[N]; }; +template< typename T, std::size_t N > struct remove_const { public: typedef T volatile type[N]; }; +# 86 "../boost/type_traits/remove_const.hpp" +} + +# 1 "../boost/type_traits/detail/type_trait_undef.hpp" 1 +# 89 "../boost/type_traits/remove_const.hpp" 2 +# 24 "../boost/iterator/iterator_facade.hpp" 2 + + +# 1 "../boost/type_traits/is_pod.hpp" 1 +# 14 "../boost/type_traits/is_pod.hpp" +# 1 "../boost/type_traits/is_scalar.hpp" 1 +# 13 "../boost/type_traits/is_scalar.hpp" +# 1 "../boost/type_traits/is_enum.hpp" 1 +# 32 "../boost/type_traits/is_enum.hpp" +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 33 "../boost/type_traits/is_enum.hpp" 2 + +namespace boost { +# 181 "../boost/type_traits/is_enum.hpp" +template< typename T > struct is_enum : public ::boost::integral_constant { public: }; + + + +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 188 "../boost/type_traits/is_enum.hpp" 2 +# 14 "../boost/type_traits/is_scalar.hpp" 2 + + + + + + +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 21 "../boost/type_traits/is_scalar.hpp" 2 + +namespace boost { + +namespace detail { + +template +struct is_scalar_impl +{ + static const bool value = (::boost::type_traits::ice_or< ::boost::is_arithmetic::value, ::boost::is_enum::value, ::boost::is_pointer::value, ::boost::is_member_pointer::value >::value) + + + + + + ; +}; + + + +template <> struct is_scalar_impl{ static const bool value = false; }; + +template <> struct is_scalar_impl{ static const bool value = false; }; +template <> struct is_scalar_impl{ static const bool value = false; }; +template <> struct is_scalar_impl{ static const bool value = false; }; + + +} + +template< typename T > struct is_scalar : public ::boost::integral_constant::value> { public: }; + +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 54 "../boost/type_traits/is_scalar.hpp" 2 +# 15 "../boost/type_traits/is_pod.hpp" 2 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 19 "../boost/type_traits/is_pod.hpp" 2 + + +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 22 "../boost/type_traits/is_pod.hpp" 2 + + + + + + + +namespace boost { + + +template< typename T > struct is_POD; + +namespace detail { + + + +template struct is_pod_impl +{ + static const bool value = (::boost::type_traits::ice_or< ::boost::is_scalar::value, ::boost::is_void::value, __is_pod(T) >::value) + + + + + + ; +}; + + +template +struct is_pod_impl + : public is_pod_impl +{ +}; +# 124 "../boost/type_traits/is_pod.hpp" +template<> struct is_pod_impl< void > { public: static const bool value = (true); }; + + +template<> struct is_pod_impl< void const > { public: static const bool value = (true); }; +template<> struct is_pod_impl< void volatile > { public: static const bool value = (true); }; +template<> struct is_pod_impl< void const volatile > { public: static const bool value = (true); }; + + +} + +template< typename T > struct is_POD : public ::boost::integral_constant::value> { public: }; +template< typename T > struct is_pod : public ::boost::integral_constant::value> { public: }; + +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 140 "../boost/type_traits/is_pod.hpp" 2 +# 27 "../boost/iterator/iterator_facade.hpp" 2 + + + + + + +# 1 "../boost/mpl/always.hpp" 1 +# 21 "../boost/mpl/always.hpp" +namespace boost { namespace mpl { + +template< typename Value > struct always +{ + template< + typename T + , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na + > + struct apply + { + typedef Value type; + }; +}; + + + +}} +# 34 "../boost/iterator/iterator_facade.hpp" 2 +# 1 "../boost/mpl/apply.hpp" 1 +# 22 "../boost/mpl/apply.hpp" +# 1 "../boost/mpl/apply_fwd.hpp" 1 +# 31 "../boost/mpl/apply_fwd.hpp" +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp" +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 32 "../boost/mpl/apply_fwd.hpp" 2 +# 23 "../boost/mpl/apply.hpp" 2 +# 1 "../boost/mpl/apply_wrap.hpp" 1 +# 23 "../boost/mpl/apply_wrap.hpp" +# 1 "../boost/mpl/aux_/has_apply.hpp" 1 +# 17 "../boost/mpl/aux_/has_apply.hpp" +# 1 "../boost/mpl/has_xxx.hpp" 1 +# 21 "../boost/mpl/has_xxx.hpp" +# 1 "../boost/mpl/aux_/type_wrapper.hpp" 1 +# 20 "../boost/mpl/aux_/type_wrapper.hpp" +namespace boost { namespace mpl { namespace aux { + +template< typename T > struct type_wrapper +{ + typedef T type; +}; + + + + + + +template< typename T > struct wrapped_type; + +template< typename T > struct wrapped_type< type_wrapper > +{ + typedef T type; +}; + + + + + + + +}}} +# 22 "../boost/mpl/has_xxx.hpp" 2 + + +# 1 "../boost/mpl/aux_/config/has_xxx.hpp" 1 +# 25 "../boost/mpl/has_xxx.hpp" 2 +# 1 "../boost/mpl/aux_/config/msvc_typename.hpp" 1 +# 26 "../boost/mpl/has_xxx.hpp" 2 + + + + +# 1 "../boost/preprocessor/array/elem.hpp" 1 +# 15 "../boost/preprocessor/array/elem.hpp" +# 1 "../boost/preprocessor/array/data.hpp" 1 +# 16 "../boost/preprocessor/array/elem.hpp" 2 +# 1 "../boost/preprocessor/array/size.hpp" 1 +# 17 "../boost/preprocessor/array/elem.hpp" 2 +# 31 "../boost/mpl/has_xxx.hpp" 2 + + +# 1 "../boost/preprocessor/repetition/enum_params.hpp" 1 +# 34 "../boost/mpl/has_xxx.hpp" 2 +# 1 "../boost/preprocessor/repetition/enum_trailing_params.hpp" 1 +# 35 "../boost/mpl/has_xxx.hpp" 2 +# 18 "../boost/mpl/aux_/has_apply.hpp" 2 +# 1 "../boost/mpl/aux_/config/has_apply.hpp" 1 +# 19 "../boost/mpl/aux_/has_apply.hpp" 2 + +namespace boost { namespace mpl { namespace aux { + +template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_apply { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; + + + + + + + +}}} +# 24 "../boost/mpl/apply_wrap.hpp" 2 + +# 1 "../boost/mpl/aux_/msvc_never_true.hpp" 1 +# 26 "../boost/mpl/apply_wrap.hpp" 2 +# 34 "../boost/mpl/apply_wrap.hpp" +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp" +namespace boost { namespace mpl { + +template< + typename F + + , typename has_apply_ = typename aux::has_apply::type + + > +struct apply_wrap0 + + : F::template apply< > +{ +}; + +template< typename F > +struct apply_wrap0< F,true_ > + : F::apply +{ +}; + +template< + typename F, typename T1 + + > +struct apply_wrap1 + + : F::template apply +{ +}; + +template< + typename F, typename T1, typename T2 + + > +struct apply_wrap2 + + : F::template apply< T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + + > +struct apply_wrap3 + + : F::template apply< T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + + > +struct apply_wrap4 + + : F::template apply< T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + + > +struct apply_wrap5 + + : F::template apply< T1,T2,T3,T4,T5 > +{ +}; + +}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 35 "../boost/mpl/apply_wrap.hpp" 2 +# 24 "../boost/mpl/apply.hpp" 2 +# 1 "../boost/mpl/placeholders.hpp" 1 +# 25 "../boost/mpl/apply.hpp" 2 +# 1 "../boost/mpl/lambda.hpp" 1 +# 18 "../boost/mpl/lambda.hpp" +# 1 "../boost/mpl/bind.hpp" 1 +# 23 "../boost/mpl/bind.hpp" +# 1 "../boost/mpl/bind_fwd.hpp" 1 +# 25 "../boost/mpl/bind_fwd.hpp" +# 1 "../boost/mpl/aux_/config/bind.hpp" 1 +# 26 "../boost/mpl/bind_fwd.hpp" 2 + + + + + + +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp" +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct bind; + +template< + typename F + > +struct bind0; + +template< + typename F, typename T1 + > +struct bind1; + +template< + typename F, typename T1, typename T2 + > +struct bind2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5; + +}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 33 "../boost/mpl/bind_fwd.hpp" 2 +# 24 "../boost/mpl/bind.hpp" 2 +# 1 "../boost/mpl/placeholders.hpp" 1 +# 25 "../boost/mpl/bind.hpp" 2 +# 1 "../boost/mpl/next.hpp" 1 +# 17 "../boost/mpl/next.hpp" +# 1 "../boost/mpl/next_prior.hpp" 1 +# 17 "../boost/mpl/next_prior.hpp" +# 1 "../boost/mpl/aux_/common_name_wknd.hpp" 1 +# 18 "../boost/mpl/next_prior.hpp" 2 + + + +namespace boost { namespace mpl { + + + + +template< + typename T = na + > +struct next +{ + typedef typename T::next type; + +}; + +template< + typename T = na + > +struct prior +{ + typedef typename T::prior type; + +}; + +template<> struct next< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : next< T1 > { }; }; template< typename Tag > struct lambda< next< na > , Tag , int_<-1> > { typedef false_ is_le; typedef next< na > result_; typedef next< na > type; }; namespace aux { template< typename T1 > struct template_arity< next< T1 > > : int_<1> { }; template<> struct template_arity< next< na > > : int_<-1> { }; } +template<> struct prior< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : prior< T1 > { }; }; template< typename Tag > struct lambda< prior< na > , Tag , int_<-1> > { typedef false_ is_le; typedef prior< na > result_; typedef prior< na > type; }; namespace aux { template< typename T1 > struct template_arity< prior< T1 > > : int_<1> { }; template<> struct template_arity< prior< na > > : int_<-1> { }; } + +}} +# 18 "../boost/mpl/next.hpp" 2 +# 26 "../boost/mpl/bind.hpp" 2 +# 1 "../boost/mpl/protect.hpp" 1 +# 23 "../boost/mpl/protect.hpp" +namespace boost { namespace mpl { + +template< + typename T = na + , int not_le_ = 0 + > +struct protect : T +{ + + + + typedef protect type; + +}; +# 48 "../boost/mpl/protect.hpp" +template<> struct protect< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : protect< T1 > { }; }; + +namespace aux { template< typename T1 > struct template_arity< protect< T1 > > : int_<1> { }; template<> struct template_arity< protect< na > > : int_<-1> { }; } + + +}} +# 27 "../boost/mpl/bind.hpp" 2 +# 1 "../boost/mpl/apply_wrap.hpp" 1 +# 28 "../boost/mpl/bind.hpp" 2 +# 50 "../boost/mpl/bind.hpp" +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/bind.hpp" 1 +# 13 "../boost/mpl/aux_/preprocessed/gcc/bind.hpp" +namespace boost { namespace mpl { + +namespace aux { + +template< + typename T, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg +{ + typedef T type; +}; + +template< + typename T + , typename Arg + > +struct replace_unnamed_arg +{ + typedef Arg next; + typedef T type; +}; + +template< + typename Arg + > +struct replace_unnamed_arg< arg< -1 >, Arg > +{ + typedef typename Arg::next next; + typedef Arg type; +}; + +template< + int N, typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > +{ + typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > +{ + typedef bind< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} + +template< + typename F + > +struct bind0 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + + public: + typedef typename apply_wrap0< + f_ + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind0, U1, U2, U3, U4, U5 + > +{ + typedef bind0 f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} + + +namespace aux { template< typename T1 > struct template_arity< bind0< T1> > : int_<1> { }; } + +template< + typename F + > +struct bind< F,na,na,na,na,na > + : bind0 +{ +}; + +template< + typename F, typename T1 + > +struct bind1 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + + public: + typedef typename apply_wrap1< + f_ + , typename t1::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename U1, typename U2, typename U3 + , typename U4, typename U5 + > +struct resolve_bind_arg< + bind1< F,T1 >, U1, U2, U3, U4, U5 + > +{ + typedef bind1< F,T1 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} + + +namespace aux { template< typename T1 , typename T2 > struct template_arity< bind1< T1 , T2> > : int_<2> { }; } + +template< + typename F, typename T1 + > +struct bind< F,T1,na,na,na,na > + : bind1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct bind2 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + + public: + typedef typename apply_wrap2< + f_ + , typename t1::type, typename t2::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename U1, typename U2 + , typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind2< F,T1,T2 >, U1, U2, U3, U4, U5 + > +{ + typedef bind2< F,T1,T2 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} + + +namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< bind2< T1 , T2 , T3> > : int_<3> { }; } + +template< + typename F, typename T1, typename T2 + > +struct bind< F,T1,T2,na,na,na > + : bind2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind3 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + + public: + typedef typename apply_wrap3< + f_ + , typename t1::type, typename t2::type, typename t3::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename U1 + , typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 + > +{ + typedef bind3< F,T1,T2,T3 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} + + +namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 > struct template_arity< bind3< T1 , T2 , T3 , T4> > : int_<4> { }; } + +template< + typename F, typename T1, typename T2, typename T3 + > +struct bind< F,T1,T2,T3,na,na > + : bind3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind4 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + + public: + typedef typename apply_wrap4< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename U1, typename U2, typename U3, typename U4, typename U5 + > +struct resolve_bind_arg< + bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 + > +{ + typedef bind4< F,T1,T2,T3,T4 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} + + +namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< bind4< T1 , T2 , T3 , T4 , T5> > : int_<5> { }; } + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct bind< F,T1,T2,T3,T4,na > + : bind4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind5 +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; + + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + + typedef aux::replace_unnamed_arg< T4,n4 > r4; + typedef typename r4::type a4; + typedef typename r4::next n5; + typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; + + typedef aux::replace_unnamed_arg< T5,n5 > r5; + typedef typename r5::type a5; + typedef typename r5::next n6; + typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; + + public: + typedef typename apply_wrap5< + f_ + , typename t1::type, typename t2::type, typename t3::type + , typename t4::type, typename t5::type + >::type type; + + }; +}; + +namespace aux { + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename U1, typename U2, typename U3, typename U4 + , typename U5 + > +struct resolve_bind_arg< + bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 + > +{ + typedef bind5< F,T1,T2,T3,T4,T5 > f_; + typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; +}; + +} + + +namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > struct template_arity< bind5< T1 , T2 , T3 , T4 , T5 , T6> > : int_<6> { }; } + + + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct bind + : bind5< F,T1,T2,T3,T4,T5 > +{ +}; + + +template< template< typename T1, typename T2, typename T3 > class F, typename Tag > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct if_; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< if_,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + + typedef typename if_< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +template< + template< typename T1, typename T2, typename T3 > class F, typename Tag + > +struct quote3; + +template< typename T1, typename T2, typename T3 > struct eval_if; + +template< + typename Tag, typename T1, typename T2, typename T3 + > +struct bind3< + quote3< eval_if,Tag > + , T1, T2, T3 + > +{ + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + private: + typedef mpl::arg<1> n1; + typedef aux::replace_unnamed_arg< T1,n1 > r1; + typedef typename r1::type a1; + typedef typename r1::next n2; + typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; + + typedef aux::replace_unnamed_arg< T2,n2 > r2; + typedef typename r2::type a2; + typedef typename r2::next n3; + typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; + + typedef aux::replace_unnamed_arg< T3,n3 > r3; + typedef typename r3::type a3; + typedef typename r3::next n4; + typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; + + typedef typename eval_if< + typename t1::type + , t2, t3 + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 51 "../boost/mpl/bind.hpp" 2 +# 19 "../boost/mpl/lambda.hpp" 2 + + + +# 1 "../boost/mpl/aux_/full_lambda.hpp" 1 +# 23 "../boost/mpl/aux_/full_lambda.hpp" +# 1 "../boost/mpl/bind_fwd.hpp" 1 +# 24 "../boost/mpl/aux_/full_lambda.hpp" 2 + +# 1 "../boost/mpl/quote.hpp" 1 +# 22 "../boost/mpl/quote.hpp" +# 1 "../boost/mpl/void.hpp" 1 +# 23 "../boost/mpl/void.hpp" +namespace mpl_ { + + + + + +struct void_ { typedef void_ type; }; + +} + +namespace boost { namespace mpl { + +template< typename T > +struct is_void_ + : false_ +{ + + + +}; + +template<> +struct is_void_ + : true_ +{ + + + +}; + +template< typename T > +struct is_not_void_ + : true_ +{ + + + +}; + +template<> +struct is_not_void_ + : false_ +{ + + + +}; + +template<> struct is_void_< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : is_void_< T1 > { }; }; template< typename Tag > struct lambda< is_void_< na > , Tag , int_<-1> > { typedef false_ is_le; typedef is_void_< na > result_; typedef is_void_< na > type; }; namespace aux { template< typename T1 > struct template_arity< is_void_< T1 > > : int_<1> { }; template<> struct template_arity< is_void_< na > > : int_<-1> { }; } +template<> struct is_not_void_< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : is_not_void_< T1 > { }; }; template< typename Tag > struct lambda< is_not_void_< na > , Tag , int_<-1> > { typedef false_ is_le; typedef is_not_void_< na > result_; typedef is_not_void_< na > type; }; namespace aux { template< typename T1 > struct template_arity< is_not_void_< T1 > > : int_<1> { }; template<> struct template_arity< is_not_void_< na > > : int_<-1> { }; } + +}} +# 23 "../boost/mpl/quote.hpp" 2 +# 1 "../boost/mpl/aux_/has_type.hpp" 1 +# 19 "../boost/mpl/aux_/has_type.hpp" +namespace boost { namespace mpl { namespace aux { +template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_type { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; +}}} +# 24 "../boost/mpl/quote.hpp" 2 + + +# 1 "../boost/mpl/aux_/config/bcc.hpp" 1 +# 27 "../boost/mpl/quote.hpp" 2 +# 45 "../boost/mpl/quote.hpp" +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/quote.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/quote.hpp" +namespace boost { namespace mpl { + +template< typename T, bool has_type_ > +struct quote_impl +{ + typedef typename T::type type; +}; + +template< typename T > +struct quote_impl< T,false > +{ + typedef T type; +}; + +template< + template< typename P1 > class F + , typename Tag = void_ + > +struct quote1 +{ + template< typename U1 > struct apply + + : quote_impl< + F + , aux::has_type< F >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2 > class F + , typename Tag = void_ + > +struct quote2 +{ + template< typename U1, typename U2 > struct apply + + : quote_impl< + F< U1,U2 > + , aux::has_type< F< U1,U2 > >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3 > class F + , typename Tag = void_ + > +struct quote3 +{ + template< typename U1, typename U2, typename U3 > struct apply + + : quote_impl< + F< U1,U2,U3 > + , aux::has_type< F< U1,U2,U3 > >::value + > + + { + }; +}; + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename Tag = void_ + > +struct quote4 +{ + template< + typename U1, typename U2, typename U3, typename U4 + > + struct apply + + : quote_impl< + F< U1,U2,U3,U4 > + , aux::has_type< F< U1,U2,U3,U4 > >::value + > + + { + }; +}; + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename Tag = void_ + > +struct quote5 +{ + template< + typename U1, typename U2, typename U3, typename U4 + , typename U5 + > + struct apply + + : quote_impl< + F< U1,U2,U3,U4,U5 > + , aux::has_type< F< U1,U2,U3,U4,U5 > >::value + > + + { + }; +}; + +}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 46 "../boost/mpl/quote.hpp" 2 +# 26 "../boost/mpl/aux_/full_lambda.hpp" 2 +# 1 "../boost/mpl/arg.hpp" 1 +# 27 "../boost/mpl/aux_/full_lambda.hpp" 2 + + +# 1 "../boost/mpl/aux_/template_arity.hpp" 1 +# 43 "../boost/mpl/aux_/template_arity.hpp" +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/template_arity.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/template_arity.hpp" +namespace boost { namespace mpl { namespace aux { +template< int N > struct arity_tag +{ + typedef char (&type)[N + 1]; +}; + +template< + int C1, int C2, int C3, int C4, int C5, int C6 + > +struct max_arity +{ + static const int value = ( C6 > 0 ? C6 : ( C5 > 0 ? C5 : ( C4 > 0 ? C4 : ( C3 > 0 ? C3 : ( C2 > 0 ? C2 : ( C1 > 0 ? C1 : -1 ) ) ) ) ) ) + + ; +}; + +arity_tag<0>::type arity_helper(...); + +template< + template< typename P1 > class F + , typename T1 + > +typename arity_tag<1>::type +arity_helper(type_wrapper< F >, arity_tag<1>); + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + > +typename arity_tag<2>::type +arity_helper(type_wrapper< F< T1,T2 > >, arity_tag<2>); + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + > +typename arity_tag<3>::type +arity_helper(type_wrapper< F< T1,T2,T3 > >, arity_tag<3>); + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + > +typename arity_tag<4>::type +arity_helper(type_wrapper< F< T1,T2,T3,T4 > >, arity_tag<4>); + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + > +typename arity_tag<5>::type +arity_helper(type_wrapper< F< T1,T2,T3,T4,T5 > >, arity_tag<5>); + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5, typename P6 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename T6 + > +typename arity_tag<6>::type +arity_helper(type_wrapper< F< T1,T2,T3,T4,T5,T6 > >, arity_tag<6>); +template< typename F, int N > +struct template_arity_impl +{ + static const int value = sizeof(::boost::mpl::aux::arity_helper(type_wrapper(), arity_tag())) - 1 + + ; +}; + +template< typename F > +struct template_arity +{ + static const int value = ( max_arity< template_arity_impl< F,1 >::value, template_arity_impl< F,2 >::value, template_arity_impl< F,3 >::value, template_arity_impl< F,4 >::value, template_arity_impl< F,5 >::value, template_arity_impl< F,6 >::value >::value ) + + ; + typedef mpl::int_ type; +}; + +}}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 44 "../boost/mpl/aux_/template_arity.hpp" 2 +# 30 "../boost/mpl/aux_/full_lambda.hpp" 2 +# 44 "../boost/mpl/aux_/full_lambda.hpp" +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp" +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} + +template< + typename T + , typename Tag + , typename Arity + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg,Tag, int_< -1 > > +{ + typedef true_ is_le; + typedef mpl::arg result_; + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + , int_<1> + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + , int_<1> + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + , int_<2> + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + , int_<2> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + , int_<3> + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + , int_<3> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + , int_<4> + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + , int_<4> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + , int_<5> + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + , int_<5> + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + + +template< typename T, typename Tag > +struct lambda< mpl::protect,Tag, int_<1> > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + + + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + , int_<6> + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +template< + typename F + , typename Tag1 + , typename Tag2 + , typename Arity + > +struct lambda< + lambda< F,Tag1,Arity > + , Tag2 + , int_<3> + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef bind1< quote1, typename l1::result_ > arity_; + typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3; + typedef aux::le_result3 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template<> struct lambda< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : lambda< T1 , T2 > { }; }; template< typename Tag > struct lambda< lambda< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef lambda< na , na > result_; typedef lambda< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< lambda< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< lambda< na , na > > : int_<-1> { }; } + +}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 45 "../boost/mpl/aux_/full_lambda.hpp" 2 +# 23 "../boost/mpl/lambda.hpp" 2 +# 26 "../boost/mpl/apply.hpp" 2 +# 36 "../boost/mpl/apply.hpp" +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/apply.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/apply.hpp" +namespace boost { namespace mpl { + +template< + typename F + > +struct apply0 + + : apply_wrap0< + typename lambda::type + + > +{ + + + + + +}; + +template< + typename F + > +struct apply< F,na,na,na,na,na > + : apply0 +{ +}; + +template< + typename F, typename T1 + > +struct apply1 + + : apply_wrap1< + typename lambda::type + , T1 + > +{ + + + + + +}; + +template< + typename F, typename T1 + > +struct apply< F,T1,na,na,na,na > + : apply1< F,T1 > +{ +}; + +template< + typename F, typename T1, typename T2 + > +struct apply2 + + : apply_wrap2< + typename lambda::type + , T1, T2 + > +{ + + + + + +}; + +template< + typename F, typename T1, typename T2 + > +struct apply< F,T1,T2,na,na,na > + : apply2< F,T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3 + + : apply_wrap3< + typename lambda::type + , T1, T2, T3 + > +{ + + + + + +}; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply< F,T1,T2,T3,na,na > + : apply3< F,T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4 + + : apply_wrap4< + typename lambda::type + , T1, T2, T3, T4 + > +{ + + + + + +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply< F,T1,T2,T3,T4,na > + : apply4< F,T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5 + + : apply_wrap5< + typename lambda::type + , T1, T2, T3, T4, T5 + > +{ + + + + + +}; + + + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply + : apply5< F,T1,T2,T3,T4,T5 > +{ +}; + +}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 37 "../boost/mpl/apply.hpp" 2 +# 35 "../boost/iterator/iterator_facade.hpp" 2 + + +# 1 "../boost/iterator/detail/config_def.hpp" 1 +# 38 "../boost/iterator/iterator_facade.hpp" 2 + +namespace boost +{ + + + template class iterator_facade; + + namespace detail + { + + + + struct always_bool2 + { + template + struct apply + { + typedef bool type; + }; + }; + + + + + template < + class Facade1 + , class Facade2 + , class Return + > + struct enable_if_interoperable +# 80 "../boost/iterator/iterator_facade.hpp" + : ::boost::iterators::enable_if< + mpl::or_< + is_convertible + , is_convertible + > + , Return + > + {}; + + + + + + + template < + class ValueParam + , class CategoryOrTraversal + , class Reference + , class Difference + > + struct iterator_facade_types + { + typedef typename facade_iterator_category< + CategoryOrTraversal, ValueParam, Reference + >::type iterator_category; + + typedef typename remove_const::type value_type; + + + typedef typename mpl::eval_if< + boost::detail::iterator_writability_disabled + , add_pointer + , add_pointer + >::type pointer; +# 131 "../boost/iterator/iterator_facade.hpp" + }; + + + + + + + + template + class postfix_increment_proxy + { + typedef typename iterator_value::type value_type; + public: + explicit postfix_increment_proxy(Iterator const& x) + : stored_value(*x) + {} + + + + + + value_type& + operator*() const + { + return this->stored_value; + } + private: + mutable value_type stored_value; + }; + + + + + + template + class writable_postfix_increment_proxy + { + typedef typename iterator_value::type value_type; + public: + explicit writable_postfix_increment_proxy(Iterator const& x) + : stored_value(*x) + , stored_iterator(x) + {} + + + + + + writable_postfix_increment_proxy const& + operator*() const + { + return *this; + } + + + operator value_type&() const + { + return stored_value; + } + + + template + T const& operator=(T const& x) const + { + *this->stored_iterator = x; + return x; + } + + + template + T& operator=(T& x) const + { + *this->stored_iterator = x; + return x; + } + + + operator Iterator const&() const + { + return stored_iterator; + } + + private: + mutable value_type stored_value; + Iterator stored_iterator; + }; +# 245 "../boost/iterator/iterator_facade.hpp" + template + struct is_non_proxy_reference + : is_convertible< + typename remove_reference::type + const volatile* + , Value const volatile* + > + {}; +# 270 "../boost/iterator/iterator_facade.hpp" + template + struct postfix_increment_result + : mpl::eval_if< + mpl::and_< + + is_convertible + + + + , mpl::not_< + is_convertible< + typename iterator_category_to_traversal::type + , forward_traversal_tag + > + > + > + , mpl::if_< + is_non_proxy_reference + , postfix_increment_proxy + , writable_postfix_increment_proxy + > + , mpl::identity + > + {}; + + + + + + template + struct operator_arrow_proxy + { + operator_arrow_proxy(T const* px) : m_value(*px) {} + T* operator->() const { return &m_value; } + + + operator T*() const { return &m_value; } + mutable T m_value; + }; + + + + + template + struct operator_arrow_result + { + + + + typedef typename mpl::if_< + is_reference + , Pointer + , operator_arrow_proxy + >::type type; + + static type make(Reference x) + { + return boost::implicit_cast(&x); + } + }; +# 343 "../boost/iterator/iterator_facade.hpp" + template + class operator_brackets_proxy + { + + + typedef typename Iterator::reference reference; + typedef typename Iterator::value_type value_type; + + public: + operator_brackets_proxy(Iterator const& iter) + : m_iter(iter) + {} + + operator reference() const + { + return *m_iter; + } + + operator_brackets_proxy& operator=(value_type const& val) + { + *m_iter = val; + return *this; + } + + private: + Iterator m_iter; + }; + + + + template + struct use_operator_brackets_proxy + : mpl::not_< + mpl::and_< + + + boost::is_POD + , iterator_writability_disabled + > + > + {}; + + template + struct operator_brackets_result + { + typedef typename mpl::if_< + use_operator_brackets_proxy + , operator_brackets_proxy + , Value + >::type type; + }; + + template + operator_brackets_proxy make_operator_brackets_result(Iterator const& iter, mpl::true_) + { + return operator_brackets_proxy(iter); + } + + template + typename Iterator::value_type make_operator_brackets_result(Iterator const& iter, mpl::false_) + { + return *iter; + } + + struct choose_difference_type + { + template + struct apply + : +# 421 "../boost/iterator/iterator_facade.hpp" + mpl::eval_if< + is_convertible + , iterator_difference + , iterator_difference + > + + {}; + + }; + } +# 472 "../boost/iterator/iterator_facade.hpp" + class iterator_core_access + { + + + + + + + template friend class iterator_facade; + + + + + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator ==( iterator_facade const& lhs , iterator_facade const& rhs); + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator !=( iterator_facade const& lhs , iterator_facade const& rhs); + + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator <( iterator_facade const& lhs , iterator_facade const& rhs); + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator >( iterator_facade const& lhs , iterator_facade const& rhs); + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator <=( iterator_facade const& lhs , iterator_facade const& rhs); + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator >=( iterator_facade const& lhs , iterator_facade const& rhs); + + + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > friend typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator -( iterator_facade const& lhs , iterator_facade const& rhs) + + ; + + template friend inline Derived operator+ (iterator_facade const& , typename Derived::difference_type) + + + + + ; + + template friend inline Derived operator+ (typename Derived::difference_type , iterator_facade const&) + + + + + ; + + + + template + static typename Facade::reference dereference(Facade const& f) + { + return f.dereference(); + } + + template + static void increment(Facade& f) + { + f.increment(); + } + + template + static void decrement(Facade& f) + { + f.decrement(); + } + + template + static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::true_) + { + return f1.equal(f2); + } + + template + static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::false_) + { + return f2.equal(f1); + } + + template + static void advance(Facade& f, typename Facade::difference_type n) + { + f.advance(n); + } + + template + static typename Facade1::difference_type distance_from( + Facade1 const& f1, Facade2 const& f2, mpl::true_) + { + return -f1.distance_to(f2); + } + + template + static typename Facade2::difference_type distance_from( + Facade1 const& f1, Facade2 const& f2, mpl::false_) + { + return f2.distance_to(f1); + } + + + + + template + static I& derived(iterator_facade& facade) + { + return *static_cast(&facade); + } + + template + static I const& derived(iterator_facade const& facade) + { + return *static_cast(&facade); + } + + private: + + iterator_core_access(); + }; + + + + + + template < + class Derived + , class Value + , class CategoryOrTraversal + , class Reference = Value& + , class Difference = std::ptrdiff_t + > + class iterator_facade + + + + + + + { + private: + + + + Derived& derived() + { + return *static_cast(this); + } + + Derived const& derived() const + { + return *static_cast(this); + } + + typedef boost::detail::iterator_facade_types< + Value, CategoryOrTraversal, Reference, Difference + > associated_types; + + typedef boost::detail::operator_arrow_result< + typename associated_types::value_type + , Reference + , typename associated_types::pointer + > pointer_; + + protected: + + typedef iterator_facade iterator_facade_; + + public: + + typedef typename associated_types::value_type value_type; + typedef Reference reference; + typedef Difference difference_type; + + typedef typename pointer_::type pointer; + + typedef typename associated_types::iterator_category iterator_category; + + reference operator*() const + { + return iterator_core_access::dereference(this->derived()); + } + + pointer operator->() const + { + return pointer_::make(*this->derived()); + } + + typename boost::detail::operator_brackets_result::type + operator[](difference_type n) const + { + typedef boost::detail::use_operator_brackets_proxy use_proxy; + + return boost::detail::make_operator_brackets_result( + this->derived() + n + , use_proxy() + ); + } + + Derived& operator++() + { + iterator_core_access::increment(this->derived()); + return this->derived(); + } +# 679 "../boost/iterator/iterator_facade.hpp" + Derived& operator--() + { + iterator_core_access::decrement(this->derived()); + return this->derived(); + } + + Derived operator--(int) + { + Derived tmp(this->derived()); + --*this; + return tmp; + } + + Derived& operator+=(difference_type n) + { + iterator_core_access::advance(this->derived(), n); + return this->derived(); + } + + Derived& operator-=(difference_type n) + { + iterator_core_access::advance(this->derived(), -n); + return this->derived(); + } + + Derived operator-(difference_type x) const + { + Derived result(this->derived()); + return result -= x; + } +# 721 "../boost/iterator/iterator_facade.hpp" + }; + + + template + inline typename boost::detail::postfix_increment_result::type + operator++( + iterator_facade& i + , int + ) + { + typename boost::detail::postfix_increment_result::type + tmp(*static_cast(&i)); + + ++i; + + return tmp; + } +# 836 "../boost/iterator/iterator_facade.hpp" + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator ==( iterator_facade const& lhs , iterator_facade const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> boost_static_assert_typedef_836; return iterator_core_access::equal( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator !=( iterator_facade const& lhs , iterator_facade const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> boost_static_assert_typedef_837; return ! iterator_core_access::equal( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } + + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator <( iterator_facade const& lhs , iterator_facade const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> boost_static_assert_typedef_839; return 0 > iterator_core_access::distance_from( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator >( iterator_facade const& lhs , iterator_facade const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> boost_static_assert_typedef_840; return 0 < iterator_core_access::distance_from( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator <=( iterator_facade const& lhs , iterator_facade const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> boost_static_assert_typedef_841; return 0 >= iterator_core_access::distance_from( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator >=( iterator_facade const& lhs , iterator_facade const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> boost_static_assert_typedef_842; return 0 <= iterator_core_access::distance_from( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } + + + + template < class Derived1, class V1, class TC1, class Reference1, class Difference1 , class Derived2, class V2, class TC2, class Reference2, class Difference2 > inline typename boost::detail::enable_if_interoperable< Derived1, Derived2 , typename mpl::apply2::type >::type operator -( iterator_facade const& lhs , iterator_facade const& rhs) { typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( is_interoperable< Derived1, Derived2 >::value )) == 0 ? false : true) >)> + + + + + boost_static_assert_typedef_851 +# 846 "../boost/iterator/iterator_facade.hpp" + ; return iterator_core_access::distance_from( *static_cast(&lhs) , *static_cast(&rhs) , is_convertible() ); } +# 862 "../boost/iterator/iterator_facade.hpp" +template inline Derived operator+ ( iterator_facade const& i , typename Derived::difference_type n ) { Derived tmp(static_cast(i)); return tmp += n; } + + + + +template inline Derived operator+ ( typename Derived::difference_type n , iterator_facade const& i ) { Derived tmp(static_cast(i)); return tmp += n; } + + + + + + +} + +# 1 "../boost/iterator/detail/config_undef.hpp" 1 +# 877 "../boost/iterator/iterator_facade.hpp" 2 +# 24 "../boost/range/iterator_range_core.hpp" 2 + + +# 1 "../boost/range/functions.hpp" 1 +# 18 "../boost/range/functions.hpp" +# 1 "../boost/range/begin.hpp" 1 +# 18 "../boost/range/begin.hpp" +# 1 "../boost/range/config.hpp" 1 +# 19 "../boost/range/begin.hpp" 2 + + + + + +# 1 "../boost/range/iterator.hpp" 1 +# 19 "../boost/range/iterator.hpp" +# 1 "../boost/range/mutable_iterator.hpp" 1 +# 24 "../boost/range/mutable_iterator.hpp" +# 1 "../boost/range/detail/extract_optional_type.hpp" 1 +# 30 "../boost/range/detail/extract_optional_type.hpp" +namespace boost { + namespace range_detail { + template< typename T > struct exists { typedef void type; }; + } +} +# 25 "../boost/range/mutable_iterator.hpp" 2 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 27 "../boost/range/mutable_iterator.hpp" 2 + + +namespace boost +{ + + + + + namespace range_detail { + template< typename C, typename Enable=void > struct extract_iterator {}; template< typename C > struct extract_iterator< C , typename boost::range_detail::exists< typename C::iterator >::type > { typedef typename C::iterator type; }; + } + + template< typename C > + struct range_mutable_iterator : range_detail::extract_iterator + {}; + + + + + + template< typename Iterator > + struct range_mutable_iterator< std::pair > + { + typedef Iterator type; + }; + + + + + + template< typename T, std::size_t sz > + struct range_mutable_iterator< T[sz] > + { + typedef T* type; + }; + +} +# 20 "../boost/range/iterator.hpp" 2 +# 1 "../boost/range/const_iterator.hpp" 1 +# 26 "../boost/range/const_iterator.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 27 "../boost/range/const_iterator.hpp" 2 + + +namespace boost +{ + + + + + namespace range_detail { + template< typename C, typename Enable=void > struct extract_const_iterator {}; template< typename C > struct extract_const_iterator< C , typename boost::range_detail::exists< typename C::const_iterator >::type > { typedef typename C::const_iterator type; }; + } + + template< typename C > + struct range_const_iterator : range_detail::extract_const_iterator + {}; + + + + + + template< typename Iterator > + struct range_const_iterator< std::pair > + { + typedef Iterator type; + }; + + + + + + template< typename T, std::size_t sz > + struct range_const_iterator< T[sz] > + { + typedef const T* type; + }; + +} +# 21 "../boost/range/iterator.hpp" 2 + + + + +namespace boost +{ +# 50 "../boost/range/iterator.hpp" + template< typename C > + struct range_iterator + { + + + + + + + + typedef typename + mpl::eval_if_c< is_const::value, + range_const_iterator< typename remove_const::type >, + range_mutable_iterator >::type type; + + + }; + +} +# 25 "../boost/range/begin.hpp" 2 + +namespace boost +{ + + + + +namespace range_detail +{ + + + + + + + template< typename C > + inline typename range_iterator::type + range_begin( C& c ) + { + + + + + + return c.begin(); + } + + + + + + template< typename Iterator > + inline Iterator range_begin( const std::pair& p ) + { + return p.first; + } + + template< typename Iterator > + inline Iterator range_begin( std::pair& p ) + { + return p.first; + } +# 75 "../boost/range/begin.hpp" + template< typename T, std::size_t sz > + inline const T* range_begin( const T (&a)[sz] ) + { + return a; + } + + template< typename T, std::size_t sz > + inline T* range_begin( T (&a)[sz] ) + { + return a; + } + + + + + +} + + + + + +namespace range_adl_barrier +{ + +template< class T > +inline typename range_iterator::type begin( T& r ) +{ + + + + using namespace range_detail; + + return range_begin( r ); +} + +template< class T > +inline typename range_iterator::type begin( const T& r ) +{ + + + + using namespace range_detail; + + return range_begin( r ); +} + + } +} + + + +namespace boost +{ + namespace range_adl_barrier + { + template< class T > + inline typename range_iterator::type + const_begin( const T& r ) + { + return boost::range_adl_barrier::begin( r ); + } + } + + using namespace range_adl_barrier; +} +# 19 "../boost/range/functions.hpp" 2 +# 1 "../boost/range/end.hpp" 1 +# 24 "../boost/range/end.hpp" +# 1 "../boost/range/detail/implementation_help.hpp" 1 +# 15 "../boost/range/detail/implementation_help.hpp" +# 1 "../boost/range/detail/common.hpp" 1 +# 19 "../boost/range/detail/common.hpp" +# 1 "../boost/range/detail/sfinae.hpp" 1 +# 20 "../boost/range/detail/sfinae.hpp" +namespace boost +{ + namespace range_detail + { + using type_traits::yes_type; + using type_traits::no_type; + + + + + + yes_type is_string_impl( const char* const ); + yes_type is_string_impl( const wchar_t* const ); + no_type is_string_impl( ... ); + + template< std::size_t sz > + yes_type is_char_array_impl( char (&boost_range_array)[sz] ); + template< std::size_t sz > + yes_type is_char_array_impl( const char (&boost_range_array)[sz] ); + no_type is_char_array_impl( ... ); + + template< std::size_t sz > + yes_type is_wchar_t_array_impl( wchar_t (&boost_range_array)[sz] ); + template< std::size_t sz > + yes_type is_wchar_t_array_impl( const wchar_t (&boost_range_array)[sz] ); + no_type is_wchar_t_array_impl( ... ); + + yes_type is_char_ptr_impl( char* const ); + no_type is_char_ptr_impl( ... ); + + yes_type is_const_char_ptr_impl( const char* const ); + no_type is_const_char_ptr_impl( ... ); + + yes_type is_wchar_t_ptr_impl( wchar_t* const ); + no_type is_wchar_t_ptr_impl( ... ); + + yes_type is_const_wchar_t_ptr_impl( const wchar_t* const ); + no_type is_const_wchar_t_ptr_impl( ... ); + + + + + + template< typename Iterator > + yes_type is_pair_impl( const std::pair* ); + no_type is_pair_impl( ... ); + + + + + + struct char_or_wchar_t_array_tag {}; + + } + +} +# 20 "../boost/range/detail/common.hpp" 2 + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 25 "../boost/range/detail/common.hpp" 2 + + + + + +namespace boost +{ + namespace range_detail + { +# 47 "../boost/range/detail/common.hpp" + typedef mpl::int_<1>::type std_container_; + typedef mpl::int_<2>::type std_pair_; + typedef mpl::int_<3>::type const_std_pair_; + typedef mpl::int_<4>::type array_; + typedef mpl::int_<5>::type const_array_; + typedef mpl::int_<6>::type char_array_; + typedef mpl::int_<7>::type wchar_t_array_; + typedef mpl::int_<8>::type char_ptr_; + typedef mpl::int_<9>::type const_char_ptr_; + typedef mpl::int_<10>::type wchar_t_ptr_; + typedef mpl::int_<11>::type const_wchar_t_ptr_; + typedef mpl::int_<12>::type string_; + + template< typename C > + struct range_helper + { + static C* c; + static C ptr; + + static const bool is_pair_ = sizeof( boost::range_detail::is_pair_impl( c ) ) == sizeof( yes_type ); + static const bool is_char_ptr_ = sizeof( boost::range_detail::is_char_ptr_impl( ptr ) ) == sizeof( yes_type ); + static const bool is_const_char_ptr_ = sizeof( boost::range_detail::is_const_char_ptr_impl( ptr ) ) == sizeof( yes_type ); + static const bool is_wchar_t_ptr_ = sizeof( boost::range_detail::is_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ); + static const bool is_const_wchar_t_ptr_ = sizeof( boost::range_detail::is_const_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ); + static const bool is_char_array_ = sizeof( boost::range_detail::is_char_array_impl( ptr ) ) == sizeof( yes_type ); + static const bool is_wchar_t_array_ = sizeof( boost::range_detail::is_wchar_t_array_impl( ptr ) ) == sizeof( yes_type ); + static const bool is_string_ = (boost::type_traits::ice_or::value ); + static const bool is_array_ = boost::is_array::value; + + }; + + template< typename C > + class range + { + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_pair_, + boost::range_detail::std_pair_, + void >::type pair_t; + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_array_, + boost::range_detail::array_, + pair_t >::type array_t; + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_string_, + boost::range_detail::string_, + array_t >::type string_t; + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_const_char_ptr_, + boost::range_detail::const_char_ptr_, + string_t >::type const_char_ptr_t; + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_char_ptr_, + boost::range_detail::char_ptr_, + const_char_ptr_t >::type char_ptr_t; + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_const_wchar_t_ptr_, + boost::range_detail::const_wchar_t_ptr_, + char_ptr_t >::type const_wchar_ptr_t; + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_wchar_t_ptr_, + boost::range_detail::wchar_t_ptr_, + const_wchar_ptr_t >::type wchar_ptr_t; + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_wchar_t_array_, + boost::range_detail::wchar_t_array_, + wchar_ptr_t >::type wchar_array_t; + typedef typename boost::mpl::if_c< ::boost::range_detail::range_helper::is_char_array_, + boost::range_detail::char_array_, + wchar_array_t >::type char_array_t; + public: + typedef typename boost::mpl::if_c< ::boost::is_void::value, + boost::range_detail::std_container_, + char_array_t >::type type; + }; + } +} +# 16 "../boost/range/detail/implementation_help.hpp" 2 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 18 "../boost/range/detail/implementation_help.hpp" 2 +# 1 "/usr/include/string.h" 1 3 4 +# 29 "/usr/include/string.h" 3 4 +extern "C" { + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 35 "/usr/include/string.h" 2 3 4 + + + + + + + + + +extern void *memcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern void *memmove (void *__dest, __const void *__src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, + int __c, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1))); + + +extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern "C++" +{ +extern void *memchr (void *__s, int __c, size_t __n) + throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const void *memchr (__const void *__s, int __c, size_t __n) + throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +memchr (void *__s, int __c, size_t __n) throw () +{ + return __builtin_memchr (__s, __c, __n); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const void * +memchr (__const void *__s, int __c, size_t __n) throw () +{ + return __builtin_memchr (__s, __c, __n); +} + +} + + + + + + + + + + +extern "C++" void *rawmemchr (void *__s, int __c) + throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" __const void *rawmemchr (__const void *__s, int __c) + throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + + + +extern "C++" void *memrchr (void *__s, int __c, size_t __n) + throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" __const void *memrchr (__const void *__s, int __c, size_t __n) + throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + + + + + +extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); + +extern char *strncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern char *strcat (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); + +extern char *strncat (char *__restrict __dest, __const char *__restrict __src, + size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int strcmp (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strcoll (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern size_t strxfrm (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (2))); + +# 165 "/usr/include/string.h" 3 4 +extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); + +extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, + __locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4))); + + + + + +extern char *strdup (__const char *__s) + throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern char *strndup (__const char *__string, size_t __n) + throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); +# 210 "/usr/include/string.h" 3 4 + + + +extern "C++" +{ +extern char *strchr (char *__s, int __c) + throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *strchr (__const char *__s, int __c) + throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strchr (char *__s, int __c) throw () +{ + return __builtin_strchr (__s, __c); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +strchr (__const char *__s, int __c) throw () +{ + return __builtin_strchr (__s, __c); +} + +} + + + + + + +extern "C++" +{ +extern char *strrchr (char *__s, int __c) + throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *strrchr (__const char *__s, int __c) + throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strrchr (char *__s, int __c) throw () +{ + return __builtin_strrchr (__s, __c); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +strrchr (__const char *__s, int __c) throw () +{ + return __builtin_strrchr (__s, __c); +} + +} + + + + + + + + + + +extern "C++" char *strchrnul (char *__s, int __c) + throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" __const char *strchrnul (__const char *__s, int __c) + throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + + + + + +extern size_t strcspn (__const char *__s, __const char *__reject) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern size_t strspn (__const char *__s, __const char *__accept) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern "C++" +{ +extern char *strpbrk (char *__s, __const char *__accept) + throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern __const char *strpbrk (__const char *__s, __const char *__accept) + throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strpbrk (char *__s, __const char *__accept) throw () +{ + return __builtin_strpbrk (__s, __accept); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +strpbrk (__const char *__s, __const char *__accept) throw () +{ + return __builtin_strpbrk (__s, __accept); +} + +} + + + + + + +extern "C++" +{ +extern char *strstr (char *__haystack, __const char *__needle) + throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern __const char *strstr (__const char *__haystack, + __const char *__needle) + throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strstr (char *__haystack, __const char *__needle) throw () +{ + return __builtin_strstr (__haystack, __needle); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +strstr (__const char *__haystack, __const char *__needle) throw () +{ + return __builtin_strstr (__haystack, __needle); +} + +} + + + + + + + +extern char *strtok (char *__restrict __s, __const char *__restrict __delim) + throw () __attribute__ ((__nonnull__ (2))); + + + + +extern char *__strtok_r (char *__restrict __s, + __const char *__restrict __delim, + char **__restrict __save_ptr) + throw () __attribute__ ((__nonnull__ (2, 3))); + +extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, + char **__restrict __save_ptr) + throw () __attribute__ ((__nonnull__ (2, 3))); + + + + + +extern "C++" char *strcasestr (char *__haystack, __const char *__needle) + throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern "C++" __const char *strcasestr (__const char *__haystack, + __const char *__needle) + throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 382 "/usr/include/string.h" 3 4 +extern void *memmem (__const void *__haystack, size_t __haystacklen, + __const void *__needle, size_t __needlelen) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); + + + +extern void *__mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void *mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern size_t strlen (__const char *__s) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern size_t strnlen (__const char *__string, size_t __maxlen) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern char *strerror (int __errnum) throw (); + +# 438 "/usr/include/string.h" 3 4 +extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) + throw () __attribute__ ((__nonnull__ (2))); + + + + + +extern char *strerror_l (int __errnum, __locale_t __l) throw (); + + + + + +extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); + + + +extern void bcopy (__const void *__src, void *__dest, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); + + +extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern "C++" +{ +extern char *index (char *__s, int __c) + throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *index (__const char *__s, int __c) + throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +index (char *__s, int __c) throw () +{ + return __builtin_index (__s, __c); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +index (__const char *__s, int __c) throw () +{ + return __builtin_index (__s, __c); +} + +} + + + + + + + +extern "C++" +{ +extern char *rindex (char *__s, int __c) + throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *rindex (__const char *__s, int __c) + throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +rindex (char *__s, int __c) throw () +{ + return __builtin_rindex (__s, __c); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +rindex (__const char *__s, int __c) throw () +{ + return __builtin_rindex (__s, __c); +} + +} + + + + + + + +extern int ffs (int __i) throw () __attribute__ ((__const__)); + + + + +extern int ffsl (long int __l) throw () __attribute__ ((__const__)); + +__extension__ extern int ffsll (long long int __ll) + throw () __attribute__ ((__const__)); + + + + +extern int strcasecmp (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern int strcasecmp_l (__const char *__s1, __const char *__s2, + __locale_t __loc) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); + +extern int strncasecmp_l (__const char *__s1, __const char *__s2, + size_t __n, __locale_t __loc) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); + + + + + +extern char *strsep (char **__restrict __stringp, + __const char *__restrict __delim) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + +extern char *strsignal (int __sig) throw (); + + +extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern char *__stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int strverscmp (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1))); + + +extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); + + + + + + + +extern "C++" char *basename (char *__filename) + throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); +extern "C++" __const char *basename (__const char *__filename) + throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); +# 642 "/usr/include/string.h" 3 4 +# 1 "/usr/include/bits/string3.h" 1 3 4 +# 23 "/usr/include/bits/string3.h" 3 4 +extern void __warn_memset_zero_len (void) __attribute__((__warning__ ("memset used with constant zero length parameter; this could be due to transposed parameters"))) + ; +# 48 "/usr/include/bits/string3.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) throw () + +{ + return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +memmove (void *__dest, __const void *__src, size_t __len) throw () +{ + return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) throw () + +{ + return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} +# 76 "/usr/include/bits/string3.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +memset (void *__dest, int __ch, size_t __len) throw () +{ + if (__builtin_constant_p (__len) && __len == 0 + && (!__builtin_constant_p (__ch) || __ch != 0)) + { + __warn_memset_zero_len (); + return __dest; + } + return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void +bcopy (__const void *__src, void *__dest, size_t __len) throw () +{ + (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void +bzero (void *__dest, size_t __len) throw () +{ + (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strcpy (char *__restrict __dest, __const char *__restrict __src) throw () +{ + return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +stpcpy (char *__restrict __dest, __const char *__restrict __src) throw () +{ + return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __len) throw () + +{ + return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); +} + + +extern char *__stpncpy_chk (char *__dest, __const char *__src, size_t __n, + size_t __destlen) throw (); +extern char *__stpncpy_alias (char *__dest, __const char *__src, size_t __n) throw () __asm__ ("" "stpncpy") + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +stpncpy (char *__dest, __const char *__src, size_t __n) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1 + && (!__builtin_constant_p (__n) || __n <= __builtin_object_size (__dest, 2 > 1))) + return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1)); + return __stpncpy_alias (__dest, __src, __n); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strcat (char *__restrict __dest, __const char *__restrict __src) throw () +{ + return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strncat (char *__restrict __dest, __const char *__restrict __src, size_t __len) throw () + +{ + return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); +} +# 643 "/usr/include/string.h" 2 3 4 + + + +} +# 19 "../boost/range/detail/implementation_help.hpp" 2 + + +# 1 "/usr/include/wchar.h" 1 3 4 +# 22 "../boost/range/detail/implementation_help.hpp" 2 + + +namespace boost +{ + namespace range_detail + { + template + inline void boost_range_silence_warning( const T& ) { } + + + + + + inline const char* str_end( const char* s, const char* ) + { + return s + strlen( s ); + } + + + inline const wchar_t* str_end( const wchar_t* s, const wchar_t* ) + { + return s + wcslen( s ); + } +# 56 "../boost/range/detail/implementation_help.hpp" + template< class Char > + inline Char* str_end( Char* s ) + { + return const_cast( str_end( s, s ) ); + } + + template< class T, std::size_t sz > + inline T* array_end( T (&boost_range_array)[sz] ) + { + return boost_range_array + sz; + } + + template< class T, std::size_t sz > + inline const T* array_end( const T (&boost_range_array)[sz] ) + { + return boost_range_array + sz; + } + + + + + + template< class Char > + inline std::size_t str_size( const Char* const& s ) + { + return str_end( s ) - s; + } + + template< class T, std::size_t sz > + inline std::size_t array_size( T (&boost_range_array)[sz] ) + { + boost_range_silence_warning( boost_range_array ); + return sz; + } + + template< class T, std::size_t sz > + inline std::size_t array_size( const T (&boost_range_array)[sz] ) + { + boost_range_silence_warning( boost_range_array ); + return sz; + } + + } + +} +# 25 "../boost/range/end.hpp" 2 + + + +namespace boost +{ + + + + +namespace range_detail +{ + + + + + + template< typename C > + inline typename range_iterator::type + range_end( C& c ) + { + + + + + + return c.end(); + } + + + + + + template< typename Iterator > + inline Iterator range_end( const std::pair& p ) + { + return p.second; + } + + template< typename Iterator > + inline Iterator range_end( std::pair& p ) + { + return p.second; + } + + + + + + template< typename T, std::size_t sz > + inline const T* range_end( const T (&a)[sz] ) + { + return range_detail::array_end( a ); + } + + template< typename T, std::size_t sz > + inline T* range_end( T (&a)[sz] ) + { + return range_detail::array_end( a ); + } + + + + +} + + +namespace range_adl_barrier +{ + +template< class T > +inline typename range_iterator::type end( T& r ) +{ + + + + using namespace range_detail; + + return range_end( r ); +} + +template< class T > +inline typename range_iterator::type end( const T& r ) +{ + + + + using namespace range_detail; + + return range_end( r ); +} + + } +} + + + +namespace boost +{ + namespace range_adl_barrier + { + template< class T > + inline typename range_iterator::type + const_end( const T& r ) + { + return boost::range_adl_barrier::end( r ); + } + } + using namespace range_adl_barrier; +} +# 20 "../boost/range/functions.hpp" 2 +# 1 "../boost/range/size.hpp" 1 +# 21 "../boost/range/size.hpp" +# 1 "../boost/range/difference_type.hpp" 1 +# 22 "../boost/range/difference_type.hpp" +namespace boost +{ + template< class T > + struct range_difference : iterator_difference< typename range_iterator::type > + { }; +} +# 22 "../boost/range/size.hpp" 2 +# 1 "../boost/assert.hpp" 1 +# 50 "../boost/assert.hpp" +# 1 "/usr/include/assert.h" 1 3 4 +# 51 "../boost/assert.hpp" 2 +# 23 "../boost/range/size.hpp" 2 + +namespace boost +{ + namespace range_detail + { + template + inline typename range_difference::type + range_calculate_size(const SinglePassRange& rng) + { + (static_cast (0)) + ; + return boost::end(rng) - boost::begin(rng); + } + } + + template + inline typename range_difference::type + size(const SinglePassRange& rng) + { + + + + using namespace range_detail; + + return range_calculate_size(rng); + } + +} +# 21 "../boost/range/functions.hpp" 2 +# 1 "../boost/range/distance.hpp" 1 +# 22 "../boost/range/distance.hpp" +namespace boost +{ + + template< class T > + inline typename range_difference::type + distance( const T& r ) + { + return std::distance( boost::begin( r ), boost::end( r ) ); + } + +} +# 22 "../boost/range/functions.hpp" 2 +# 1 "../boost/range/empty.hpp" 1 +# 22 "../boost/range/empty.hpp" +namespace boost +{ + + template< class T > + inline bool empty( const T& r ) + { + return boost::begin( r ) == boost::end( r ); + } + +} +# 23 "../boost/range/functions.hpp" 2 +# 1 "../boost/range/rbegin.hpp" 1 +# 19 "../boost/range/rbegin.hpp" +# 1 "../boost/range/reverse_iterator.hpp" 1 +# 20 "../boost/range/reverse_iterator.hpp" +# 1 "../boost/iterator/reverse_iterator.hpp" 1 +# 11 "../boost/iterator/reverse_iterator.hpp" +# 1 "../boost/utility.hpp" 1 +# 12 "../boost/utility.hpp" +# 1 "../boost/utility/addressof.hpp" 1 +# 18 "../boost/utility/addressof.hpp" +namespace boost +{ + +namespace detail +{ + +template struct addr_impl_ref +{ + T & v_; + + inline addr_impl_ref( T & v ): v_( v ) {} + inline operator T& () const { return v_; } + +private: + addr_impl_ref & operator=(const addr_impl_ref &); +}; + +template struct addressof_impl +{ + static inline T * f( T & v, long ) + { + return reinterpret_cast( + &const_cast(reinterpret_cast(v))); + } + + static inline T * f( T * v, int ) + { + return v; + } +}; + +} + +template T * addressof( T & v ) +{ + + + + + + + return boost::detail::addressof_impl::f( boost::detail::addr_impl_ref( v ), 0 ); + + +} +# 100 "../boost/utility/addressof.hpp" +} +# 13 "../boost/utility.hpp" 2 +# 1 "../boost/utility/base_from_member.hpp" 1 +# 14 "../boost/utility/base_from_member.hpp" +# 1 "../boost/preprocessor/repetition/enum_binary_params.hpp" 1 +# 15 "../boost/utility/base_from_member.hpp" 2 + +# 1 "../boost/preprocessor/repetition/repeat_from_to.hpp" 1 +# 23 "../boost/preprocessor/repetition/repeat_from_to.hpp" +# 1 "../boost/preprocessor/detail/auto_rec.hpp" 1 +# 24 "../boost/preprocessor/repetition/repeat_from_to.hpp" 2 +# 17 "../boost/utility/base_from_member.hpp" 2 +# 53 "../boost/utility/base_from_member.hpp" +namespace boost +{ +# 65 "../boost/utility/base_from_member.hpp" +template < typename MemberType, int UniqueID = 0 > +class base_from_member +{ +protected: + MemberType member; + + base_from_member() + : member() + {} + + + template < typename T0 > explicit base_from_member( T0 x0 ) : member( x0 ) {} template < typename T0 , typename T1 > explicit base_from_member( T0 x0 , T1 x1 ) : member( x0 , x1 ) {} template < typename T0 , typename T1 , typename T2 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 ) : member( x0 , x1 , x2 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 ) : member( x0 , x1 , x2 , x3 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 ) : member( x0 , x1 , x2 , x3 , x4 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 ) : member( x0 , x1 , x2 , x3 , x4 , x5 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 , T6 x6 ) : member( x0 , x1 , x2 , x3 , x4 , x5 , x6 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 , T6 x6 , T7 x7 ) : member( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 , T6 x6 , T7 x7 , T8 x8 ) : member( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 ) {} template < typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 > explicit base_from_member( T0 x0 , T1 x1 , T2 x2 , T3 x3 , T4 x4 , T5 x5 , T6 x6 , T7 x7 , T8 x8 , T9 x9 ) : member( x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , x9 ) {} + +}; + +} +# 14 "../boost/utility.hpp" 2 +# 1 "../boost/utility/binary.hpp" 1 +# 26 "../boost/utility/binary.hpp" +# 1 "../boost/preprocessor/control/deduce_d.hpp" 1 +# 16 "../boost/preprocessor/control/deduce_d.hpp" +# 1 "../boost/preprocessor/detail/auto_rec.hpp" 1 +# 17 "../boost/preprocessor/control/deduce_d.hpp" 2 +# 27 "../boost/utility/binary.hpp" 2 + + +# 1 "../boost/preprocessor/seq/cat.hpp" 1 +# 18 "../boost/preprocessor/seq/cat.hpp" +# 1 "../boost/preprocessor/seq/fold_left.hpp" 1 +# 19 "../boost/preprocessor/seq/fold_left.hpp" +# 1 "../boost/preprocessor/detail/auto_rec.hpp" 1 +# 20 "../boost/preprocessor/seq/fold_left.hpp" 2 +# 1 "../boost/preprocessor/seq/seq.hpp" 1 +# 16 "../boost/preprocessor/seq/seq.hpp" +# 1 "../boost/preprocessor/seq/elem.hpp" 1 +# 17 "../boost/preprocessor/seq/seq.hpp" 2 +# 21 "../boost/preprocessor/seq/fold_left.hpp" 2 +# 1 "../boost/preprocessor/seq/size.hpp" 1 +# 22 "../boost/preprocessor/seq/fold_left.hpp" 2 +# 19 "../boost/preprocessor/seq/cat.hpp" 2 +# 30 "../boost/utility/binary.hpp" 2 +# 1 "../boost/preprocessor/seq/transform.hpp" 1 +# 31 "../boost/utility/binary.hpp" 2 +# 1 "../boost/preprocessor/arithmetic/mod.hpp" 1 +# 17 "../boost/preprocessor/arithmetic/mod.hpp" +# 1 "../boost/preprocessor/arithmetic/detail/div_base.hpp" 1 +# 19 "../boost/preprocessor/arithmetic/detail/div_base.hpp" +# 1 "../boost/preprocessor/comparison/less_equal.hpp" 1 +# 19 "../boost/preprocessor/comparison/less_equal.hpp" +# 1 "../boost/preprocessor/logical/not.hpp" 1 +# 20 "../boost/preprocessor/comparison/less_equal.hpp" 2 +# 20 "../boost/preprocessor/arithmetic/detail/div_base.hpp" 2 +# 18 "../boost/preprocessor/arithmetic/mod.hpp" 2 +# 32 "../boost/utility/binary.hpp" 2 +# 15 "../boost/utility.hpp" 2 +# 1 "../boost/utility/enable_if.hpp" 1 +# 24 "../boost/utility/enable_if.hpp" +namespace boost +{ + + template + struct enable_if_c { + typedef T type; + }; + + template + struct enable_if_c {}; + + template + struct enable_if : public enable_if_c {}; + + template + struct lazy_enable_if_c { + typedef typename T::type type; + }; + + template + struct lazy_enable_if_c {}; + + template + struct lazy_enable_if : public lazy_enable_if_c {}; + + + template + struct disable_if_c { + typedef T type; + }; + + template + struct disable_if_c {}; + + template + struct disable_if : public disable_if_c {}; + + template + struct lazy_disable_if_c { + typedef typename T::type type; + }; + + template + struct lazy_disable_if_c {}; + + template + struct lazy_disable_if : public lazy_disable_if_c {}; + +} +# 16 "../boost/utility.hpp" 2 + +# 1 "../boost/next_prior.hpp" 1 +# 17 "../boost/next_prior.hpp" +namespace boost { +# 29 "../boost/next_prior.hpp" +template +inline T next(T x) { return ++x; } + +template +inline T next(T x, Distance n) +{ + std::advance(x, n); + return x; +} + +template +inline T prior(T x) { return --x; } + +template +inline T prior(T x, Distance n) +{ + std::advance(x, -n); + return x; +} + +} +# 18 "../boost/utility.hpp" 2 +# 1 "../boost/noncopyable.hpp" 1 +# 12 "../boost/noncopyable.hpp" +namespace boost { + + + + + + +namespace noncopyable_ +{ + class noncopyable + { + protected: + noncopyable() {} + ~noncopyable() {} + private: + noncopyable( const noncopyable& ); + const noncopyable& operator=( const noncopyable& ); + }; +} + +typedef noncopyable_::noncopyable noncopyable; + +} +# 19 "../boost/utility.hpp" 2 +# 12 "../boost/iterator/reverse_iterator.hpp" 2 +# 1 "../boost/iterator/iterator_adaptor.hpp" 1 +# 30 "../boost/iterator/iterator_adaptor.hpp" +# 1 "../boost/iterator/detail/config_def.hpp" 1 +# 31 "../boost/iterator/iterator_adaptor.hpp" 2 + + + +namespace boost +{ + + + + struct use_default; + + + + + + template + struct is_convertible + : mpl::false_ {}; + + + namespace detail + { +# 60 "../boost/iterator/iterator_adaptor.hpp" + struct enable_type; + } +# 142 "../boost/iterator/iterator_adaptor.hpp" + template + struct enable_if_convertible + : iterators::enable_if< + is_convertible + , boost::detail::enable_type + > + {}; + + + + + + + namespace detail + { + + + template + struct ia_dflt_help + : mpl::eval_if< + is_same + , DefaultNullaryFn + , mpl::identity + > + { + }; + + + + template < + class Derived + , class Base + , class Value + , class Traversal + , class Reference + , class Difference + > + struct iterator_adaptor_base + { + typedef iterator_facade< + Derived + + + , typename boost::detail::ia_dflt_help< + Value + , mpl::eval_if< + is_same + , iterator_value + , remove_reference + > + >::type + + + + + + + , typename boost::detail::ia_dflt_help< + Traversal + , iterator_traversal + >::type + + , typename boost::detail::ia_dflt_help< + Reference + , mpl::eval_if< + is_same + , iterator_reference + , add_reference + > + >::type + + , typename boost::detail::ia_dflt_help< + Difference, iterator_difference + >::type + > + type; + }; + + + template + inline void iterator_adaptor_assert_traversal () + { + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((is_convertible::value)) == 0 ? false : true) >)> boost_static_assert_typedef_224; + } + } +# 253 "../boost/iterator/iterator_adaptor.hpp" + template < + class Derived + , class Base + , class Value = use_default + , class Traversal = use_default + , class Reference = use_default + , class Difference = use_default + > + class iterator_adaptor + : public boost::detail::iterator_adaptor_base< + Derived, Base, Value, Traversal, Reference, Difference + >::type + { + friend class iterator_core_access; + + protected: + typedef typename boost::detail::iterator_adaptor_base< + Derived, Base, Value, Traversal, Reference, Difference + >::type super_t; + public: + iterator_adaptor() {} + + explicit iterator_adaptor(Base const &iter) + : m_iterator(iter) + { + } + + typedef Base base_type; + + Base const& base() const + { return m_iterator; } + + protected: + + typedef iterator_adaptor iterator_adaptor_; + + + + + Base const& base_reference() const + { return m_iterator; } + + Base& base_reference() + { return m_iterator; } + + private: + + + + + + + typename super_t::reference dereference() const + { return *m_iterator; } + + template < + class OtherDerived, class OtherIterator, class V, class C, class R, class D + > + bool equal(iterator_adaptor const& x) const + { + + + + + return m_iterator == x.base(); + } + + typedef typename iterator_category_to_traversal< + typename super_t::iterator_category + >::type my_traversal; + + + + + void advance(typename super_t::difference_type n) + { + boost::detail::iterator_adaptor_assert_traversal(); + m_iterator += n; + } + + void increment() { ++m_iterator; } + + void decrement() + { + boost::detail::iterator_adaptor_assert_traversal(); + --m_iterator; + } + + template < + class OtherDerived, class OtherIterator, class V, class C, class R, class D + > + typename super_t::difference_type distance_to( + iterator_adaptor const& y) const + { + boost::detail::iterator_adaptor_assert_traversal(); + + + + + return y.base() - m_iterator; + } + + + + private: + Base m_iterator; + }; + +} + +# 1 "../boost/iterator/detail/config_undef.hpp" 1 +# 364 "../boost/iterator/iterator_adaptor.hpp" 2 +# 13 "../boost/iterator/reverse_iterator.hpp" 2 + +namespace boost +{ + + + + + template + class reverse_iterator + : public iterator_adaptor< reverse_iterator, Iterator > + { + typedef iterator_adaptor< reverse_iterator, Iterator > super_t; + + friend class iterator_core_access; + + public: + reverse_iterator() {} + + explicit reverse_iterator(Iterator x) + : super_t(x) {} + + template + reverse_iterator( + reverse_iterator const& r + , typename enable_if_convertible::type* = 0 + ) + : super_t(r.base()) + {} + + private: + typename super_t::reference dereference() const { return *boost::prior(this->base()); } + + void increment() { --this->base_reference(); } + void decrement() { ++this->base_reference(); } + + void advance(typename super_t::difference_type n) + { + this->base_reference() += -n; + } + + template + typename super_t::difference_type + distance_to(reverse_iterator const& y) const + { + return this->base_reference() - y.base(); + } + }; + + template + reverse_iterator make_reverse_iterator(BidirectionalIterator x) + { + return reverse_iterator(x); + } + +} +# 21 "../boost/range/reverse_iterator.hpp" 2 + + +namespace boost +{ + + + + + template< typename C > + struct range_reverse_iterator + { + typedef reverse_iterator< + typename range_iterator::type > type; + }; + + +} +# 20 "../boost/range/rbegin.hpp" 2 + +namespace boost +{ +# 35 "../boost/range/rbegin.hpp" +template< class C > +inline typename range_reverse_iterator::type +rbegin( C& c ) +{ + typedef typename range_reverse_iterator::type + iter_type; + return iter_type( boost::end( c ) ); +} + +template< class C > +inline typename range_reverse_iterator::type +rbegin( const C& c ) +{ + typedef typename range_reverse_iterator::type + iter_type; + return iter_type( boost::end( c ) ); +} + + + +template< class T > +inline typename range_reverse_iterator::type +const_rbegin( const T& r ) +{ + return boost::rbegin( r ); +} + +} +# 24 "../boost/range/functions.hpp" 2 +# 1 "../boost/range/rend.hpp" 1 +# 21 "../boost/range/rend.hpp" +namespace boost +{ +# 35 "../boost/range/rend.hpp" +template< class C > +inline typename range_reverse_iterator::type +rend( C& c ) +{ + typedef typename range_reverse_iterator::type + iter_type; + return iter_type( boost::begin( c ) ); +} + +template< class C > +inline typename range_reverse_iterator::type +rend( const C& c ) +{ + typedef typename range_reverse_iterator::type + iter_type; + return iter_type( boost::begin( c ) ); +} + + + +template< class T > +inline typename range_reverse_iterator::type +const_rend( const T& r ) +{ + return boost::rend( r ); +} + +} +# 25 "../boost/range/functions.hpp" 2 +# 27 "../boost/range/iterator_range_core.hpp" 2 + + +# 1 "../boost/range/algorithm/equal.hpp" 1 +# 14 "../boost/range/algorithm/equal.hpp" +# 1 "../boost/range/concepts.hpp" 1 +# 19 "../boost/range/concepts.hpp" +# 1 "../boost/concept_check.hpp" 1 +# 20 "../boost/concept_check.hpp" +# 1 "../boost/concept/assert.hpp" 1 +# 36 "../boost/concept/assert.hpp" +# 1 "../boost/concept/detail/general.hpp" 1 + + + + + + + +# 1 "../boost/concept/detail/backward_compatibility.hpp" 1 + + + + + + +namespace boost +{ + namespace concepts {} + + + + +} +# 9 "../boost/concept/detail/general.hpp" 2 + + +# 1 "../boost/concept/detail/has_constraints.hpp" 1 +# 11 "../boost/concept/detail/has_constraints.hpp" +namespace boost { namespace concepts { + +namespace detail +{ + + + + typedef char yes; + typedef char (&no)[2]; + + template + struct wrap_constraints {}; +# 31 "../boost/concept/detail/has_constraints.hpp" + template + inline yes has_constraints_(Model*, wrap_constraints* = 0); + inline no has_constraints_(...); + +} + + + +template +struct not_satisfied +{ + static const bool value = sizeof( detail::has_constraints_((Model*)0) ) == sizeof(detail::yes) + + ; + typedef mpl::bool_ type; +}; + +}} +# 12 "../boost/concept/detail/general.hpp" 2 + + + + + +namespace boost { namespace concepts { + +template +struct requirement_; + +namespace detail +{ + template struct instantiate {}; +} + +template +struct requirement +{ + static void failed() { ((Model*)0)->~Model(); } +}; + +struct failed {}; + +template +struct requirement +{ + static void failed() { ((Model*)0)->~Model(); } +}; + + + +template +struct constraint +{ + static void failed() { ((Model*)0)->constraints(); } +}; + +template +struct requirement_ + : mpl::if_< + concepts::not_satisfied + , constraint + , requirement + >::type +{}; +# 73 "../boost/concept/detail/general.hpp" +}} +# 37 "../boost/concept/assert.hpp" 2 +# 21 "../boost/concept_check.hpp" 2 + + +# 1 "../boost/type_traits/conversion_traits.hpp" 1 +# 24 "../boost/concept_check.hpp" 2 +# 32 "../boost/concept_check.hpp" +# 1 "../boost/concept/usage.hpp" 1 +# 11 "../boost/concept/usage.hpp" +namespace boost { namespace concepts { + + + + + + + +template +struct usage_requirements +{ + ~usage_requirements() { ((Model*)0)->~Model(); } +}; +# 42 "../boost/concept/usage.hpp" +}} +# 33 "../boost/concept_check.hpp" 2 +# 1 "../boost/concept/detail/concept_def.hpp" 1 + + + + + +# 1 "../boost/preprocessor/seq/for_each_i.hpp" 1 +# 18 "../boost/preprocessor/seq/for_each_i.hpp" +# 1 "../boost/preprocessor/repetition/for.hpp" 1 +# 19 "../boost/preprocessor/repetition/for.hpp" +# 1 "../boost/preprocessor/detail/auto_rec.hpp" 1 +# 20 "../boost/preprocessor/repetition/for.hpp" 2 +# 42 "../boost/preprocessor/repetition/for.hpp" +# 1 "../boost/preprocessor/repetition/detail/for.hpp" 1 +# 43 "../boost/preprocessor/repetition/for.hpp" 2 +# 19 "../boost/preprocessor/seq/for_each_i.hpp" 2 +# 7 "../boost/concept/detail/concept_def.hpp" 2 +# 1 "../boost/preprocessor/seq/enum.hpp" 1 +# 8 "../boost/concept/detail/concept_def.hpp" 2 +# 34 "../boost/concept_check.hpp" 2 + +namespace boost +{ + + + + + + template + inline void function_requires(Model* = 0) + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_::failed> boost_concept_check45; + } + template inline void ignore_unused_variable_warning(T const&) {} +# 65 "../boost/concept_check.hpp" + template < typename T > struct Integer; template < typename T > struct IntegerConcept : Integer< T > { }; template < typename T > struct Integer + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check67; ~Integer() + { + x.error_type_must_be_an_integer_type(); + } + private: + T x; + }; + + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + template <> struct Integer {}; + + template <> struct Integer< ::boost::long_long_type> {}; + template <> struct Integer< ::boost::ulong_long_type> {}; + + + + + + template < typename T > struct SignedInteger; template < typename T > struct SignedIntegerConcept : SignedInteger< T > { }; template < typename T > struct SignedInteger { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check93; ~SignedInteger() { + x.error_type_must_be_a_signed_integer_type(); + } + private: + T x; + }; + template <> struct SignedInteger { }; + template <> struct SignedInteger {}; + template <> struct SignedInteger {}; + template <> struct SignedInteger {}; + + template <> struct SignedInteger< ::boost::long_long_type> {}; + + + + + template < typename T > struct UnsignedInteger; template < typename T > struct UnsignedIntegerConcept : UnsignedInteger< T > { }; template < typename T > struct UnsignedInteger { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check110; ~UnsignedInteger() { + x.error_type_must_be_an_unsigned_integer_type(); + } + private: + T x; + }; + + template <> struct UnsignedInteger {}; + template <> struct UnsignedInteger {}; + template <> struct UnsignedInteger {}; + template <> struct UnsignedInteger {}; + + template <> struct UnsignedInteger< ::boost::ulong_long_type> {}; + + + + + + + + template < typename TT > struct DefaultConstructible; template < typename TT > struct DefaultConstructibleConcept : DefaultConstructible< TT > { }; template < typename TT > struct DefaultConstructible + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check132; ~DefaultConstructible() { + TT a; + ignore_unused_variable_warning(a); + } + }; + + template < typename TT > struct Assignable; template < typename TT > struct AssignableConcept : Assignable< TT > { }; template < typename TT > struct Assignable + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check140; ~Assignable() { + + a = b; + + const_constraints(b); + } + private: + void const_constraints(const TT& x) { + + a = x; + + + + } + private: + TT a; + TT b; + }; + + + template < typename TT > struct CopyConstructible; template < typename TT > struct CopyConstructibleConcept : CopyConstructible< TT > { }; template < typename TT > struct CopyConstructible + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check162; ~CopyConstructible() { + TT a(b); + TT* ptr = &a; + const_constraints(a); + ignore_unused_variable_warning(ptr); + } + private: + void const_constraints(const TT& a) { + TT c(a); + const TT* ptr = &a; + ignore_unused_variable_warning(c); + ignore_unused_variable_warning(ptr); + } + TT b; + }; + + + + + + + + template < typename TT > struct SGIAssignable; template < typename TT > struct SGIAssignableConcept : SGIAssignable< TT > { }; template < typename TT > struct SGIAssignable + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check186; ~SGIAssignable() { + TT c(a); + + a = b; + + const_constraints(b); + ignore_unused_variable_warning(c); + } + private: + void const_constraints(const TT& x) { + TT c(x); + + a = x; + + ignore_unused_variable_warning(c); + } + TT a; + TT b; + }; + + + + + template < typename X , typename Y > struct Convertible; template < typename X , typename Y > struct ConvertibleConcept : Convertible< X, Y > { }; template < typename X , typename Y > struct Convertible + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check211; ~Convertible() { + Y y = x; + ignore_unused_variable_warning(y); + } + private: + X x; + }; +# 228 "../boost/concept_check.hpp" + template + void require_boolean_expr(const TT& t) { + bool x = t; + ignore_unused_variable_warning(x); + } + + template < typename TT > struct EqualityComparable; template < typename TT > struct EqualityComparableConcept : EqualityComparable< TT > { }; template < typename TT > struct EqualityComparable + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check236; ~EqualityComparable() { + require_boolean_expr(a == b); + require_boolean_expr(a != b); + } + private: + TT a, b; + }; + + template < typename TT > struct LessThanComparable; template < typename TT > struct LessThanComparableConcept : LessThanComparable< TT > { }; template < typename TT > struct LessThanComparable + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check246; ~LessThanComparable() { + require_boolean_expr(a < b); + } + private: + TT a, b; + }; + + + template < typename TT > struct Comparable; template < typename TT > struct ComparableConcept : Comparable< TT > { }; template < typename TT > struct Comparable + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check256; ~Comparable() { + require_boolean_expr(a < b); + require_boolean_expr(a > b); + require_boolean_expr(a <= b); + require_boolean_expr(a >= b); + } + private: + TT a, b; + }; +# 286 "../boost/concept_check.hpp" + template < typename First , typename Second > struct EqualOp; template < typename First , typename Second > struct EqualOpConcept : EqualOp< First, Second > { }; template < typename First , typename Second > struct EqualOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check286; ~EqualOp() { (void)constraints_(); } private: bool constraints_() { return a == b; } First a; Second b; }; + template < typename First , typename Second > struct NotEqualOp; template < typename First , typename Second > struct NotEqualOpConcept : NotEqualOp< First, Second > { }; template < typename First , typename Second > struct NotEqualOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check287; ~NotEqualOp() { (void)constraints_(); } private: bool constraints_() { return a != b; } First a; Second b; }; + template < typename First , typename Second > struct LessThanOp; template < typename First , typename Second > struct LessThanOpConcept : LessThanOp< First, Second > { }; template < typename First , typename Second > struct LessThanOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check288; ~LessThanOp() { (void)constraints_(); } private: bool constraints_() { return a < b; } First a; Second b; }; + template < typename First , typename Second > struct LessEqualOp; template < typename First , typename Second > struct LessEqualOpConcept : LessEqualOp< First, Second > { }; template < typename First , typename Second > struct LessEqualOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check289; ~LessEqualOp() { (void)constraints_(); } private: bool constraints_() { return a <= b; } First a; Second b; }; + template < typename First , typename Second > struct GreaterThanOp; template < typename First , typename Second > struct GreaterThanOpConcept : GreaterThanOp< First, Second > { }; template < typename First , typename Second > struct GreaterThanOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check290; ~GreaterThanOp() { (void)constraints_(); } private: bool constraints_() { return a > b; } First a; Second b; }; + template < typename First , typename Second > struct GreaterEqualOp; template < typename First , typename Second > struct GreaterEqualOpConcept : GreaterEqualOp< First, Second > { }; template < typename First , typename Second > struct GreaterEqualOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check291; ~GreaterEqualOp() { (void)constraints_(); } private: bool constraints_() { return a >= b; } First a; Second b; }; + + template < typename Ret , typename First , typename Second > struct PlusOp; template < typename Ret , typename First , typename Second > struct PlusOpConcept : PlusOp< Ret, First, Second > { }; template < typename Ret , typename First , typename Second > struct PlusOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check293; ~PlusOp() { (void)constraints_(); } private: Ret constraints_() { return a + b; } First a; Second b; }; + template < typename Ret , typename First , typename Second > struct TimesOp; template < typename Ret , typename First , typename Second > struct TimesOpConcept : TimesOp< Ret, First, Second > { }; template < typename Ret , typename First , typename Second > struct TimesOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check294; ~TimesOp() { (void)constraints_(); } private: Ret constraints_() { return a * b; } First a; Second b; }; + template < typename Ret , typename First , typename Second > struct DivideOp; template < typename Ret , typename First , typename Second > struct DivideOpConcept : DivideOp< Ret, First, Second > { }; template < typename Ret , typename First , typename Second > struct DivideOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check295; ~DivideOp() { (void)constraints_(); } private: Ret constraints_() { return a / b; } First a; Second b; }; + template < typename Ret , typename First , typename Second > struct SubtractOp; template < typename Ret , typename First , typename Second > struct SubtractOpConcept : SubtractOp< Ret, First, Second > { }; template < typename Ret , typename First , typename Second > struct SubtractOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check296; ~SubtractOp() { (void)constraints_(); } private: Ret constraints_() { return a - b; } First a; Second b; }; + template < typename Ret , typename First , typename Second > struct ModOp; template < typename Ret , typename First , typename Second > struct ModOpConcept : ModOp< Ret, First, Second > { }; template < typename Ret , typename First , typename Second > struct ModOp { typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check297; ~ModOp() { (void)constraints_(); } private: Ret constraints_() { return a % b; } First a; Second b; }; + + + + + template < typename Func , typename Return > struct Generator; template < typename Func , typename Return > struct GeneratorConcept : Generator< Func, Return > { }; template < typename Func , typename Return > struct Generator + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check304; ~Generator() { test(is_void()); } + + private: + void test(boost::mpl::false_) + { + + const Return& r = f(); + ignore_unused_variable_warning(r); + } + + void test(boost::mpl::true_) + { + f(); + } + + Func f; + }; + + template < typename Func , typename Return , typename Arg > struct UnaryFunction; template < typename Func , typename Return , typename Arg > struct UnaryFunctionConcept : UnaryFunction< Func, Return, Arg > { }; template < typename Func , typename Return , typename Arg > struct UnaryFunction + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check324; ~UnaryFunction() { test(is_void()); } + + private: + void test(boost::mpl::false_) + { + f(arg); + Return r = f(arg); + ignore_unused_variable_warning(r); + } + + void test(boost::mpl::true_) + { + f(arg); + } + + + + + + + + UnaryFunction(); + + + Func f; + Arg arg; + }; + + template < typename Func , typename Return , typename First , typename Second > struct BinaryFunction; template < typename Func , typename Return , typename First , typename Second > struct BinaryFunctionConcept : BinaryFunction< Func, Return, First, Second > { }; template < typename Func , typename Return , typename First , typename Second > struct BinaryFunction + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check354; ~BinaryFunction() { test(is_void()); } + private: + void test(boost::mpl::false_) + { + f(first,second); + Return r = f(first, second); + (void)r; + } + + void test(boost::mpl::true_) + { + f(first,second); + } + + + + + + + + BinaryFunction(); + + + Func f; + First first; + Second second; + }; + + template < typename Func , typename Arg > struct UnaryPredicate; template < typename Func , typename Arg > struct UnaryPredicateConcept : UnaryPredicate< Func, Arg > { }; template < typename Func , typename Arg > struct UnaryPredicate + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check384; ~UnaryPredicate() { + require_boolean_expr(f(arg)); + } + private: + + + + + + + UnaryPredicate(); + + + Func f; + Arg arg; + }; + + template < typename Func , typename First , typename Second > struct BinaryPredicate; template < typename Func , typename First , typename Second > struct BinaryPredicateConcept : BinaryPredicate< Func, First, Second > { }; template < typename Func , typename First , typename Second > struct BinaryPredicate + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check403; ~BinaryPredicate() { + require_boolean_expr(f(a, b)); + } + private: + + + + + + + BinaryPredicate(); + + Func f; + First a; + Second b; + }; + + + template < typename Func , typename First , typename Second > struct Const_BinaryPredicate; template < typename Func , typename First , typename Second > struct Const_BinaryPredicateConcept : Const_BinaryPredicate< Func, First, Second > { }; template < typename Func , typename First , typename Second > struct Const_BinaryPredicate + : BinaryPredicate + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check424; ~Const_BinaryPredicate() { + const_constraints(f); + } + private: + void const_constraints(const Func& fun) { + + require_boolean_expr(fun(a, b)); + } + + + + + + + Const_BinaryPredicate(); + + + Func f; + First a; + Second b; + }; + + template < typename Func , typename Return > struct AdaptableGenerator; template < typename Func , typename Return > struct AdaptableGeneratorConcept : AdaptableGenerator< Func, Return > { }; template < typename Func , typename Return > struct AdaptableGenerator + : Generator + { + typedef typename Func::result_type result_type; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check451; ~AdaptableGenerator() + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check453; + } + }; + + template < typename Func , typename Return , typename Arg > struct AdaptableUnaryFunction; template < typename Func , typename Return , typename Arg > struct AdaptableUnaryFunctionConcept : AdaptableUnaryFunction< Func, Return, Arg > { }; template < typename Func , typename Return , typename Arg > struct AdaptableUnaryFunction + : UnaryFunction + { + typedef typename Func::argument_type argument_type; + typedef typename Func::result_type result_type; + + ~AdaptableUnaryFunction() + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check465; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check466; + } + }; + + template < typename Func , typename Return , typename First , typename Second > struct AdaptableBinaryFunction; template < typename Func , typename Return , typename First , typename Second > struct AdaptableBinaryFunctionConcept : AdaptableBinaryFunction< Func, Return, First, Second > { }; template < typename Func , typename Return , typename First , typename Second > struct AdaptableBinaryFunction + : BinaryFunction< + Func + , typename Func::result_type + , typename Func::first_argument_type + , typename Func::second_argument_type + > + { + typedef typename Func::first_argument_type first_argument_type; + typedef typename Func::second_argument_type second_argument_type; + typedef typename Func::result_type result_type; + + ~AdaptableBinaryFunction() + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check484; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check485; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check486; + } + }; + + template < typename Func , typename Arg > struct AdaptablePredicate; template < typename Func , typename Arg > struct AdaptablePredicateConcept : AdaptablePredicate< Func, Arg > { }; template < typename Func , typename Arg > struct AdaptablePredicate + : UnaryPredicate + , AdaptableUnaryFunction + { + }; + + template < typename Func , typename First , typename Second > struct AdaptableBinaryPredicate; template < typename Func , typename First , typename Second > struct AdaptableBinaryPredicateConcept : AdaptableBinaryPredicate< Func, First, Second > { }; template < typename Func , typename First , typename Second > struct AdaptableBinaryPredicate + : BinaryPredicate + , AdaptableBinaryFunction + { + }; + + + + + template < typename TT > struct InputIterator; template < typename TT > struct InputIteratorConcept : InputIterator< TT > { }; template < typename TT > struct InputIterator + : Assignable + , EqualityComparable + { + typedef typename boost::detail::iterator_traits::value_type value_type; + typedef typename boost::detail::iterator_traits::difference_type difference_type; + typedef typename boost::detail::iterator_traits::reference reference; + typedef typename boost::detail::iterator_traits::pointer pointer; + typedef typename boost::detail::iterator_traits::iterator_category iterator_category; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check515; ~InputIterator() + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check517; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check518; + + TT j(i); + (void)*i; + ++j; + i++; + } + private: + TT i; + }; + + template < typename TT , typename ValueT > struct OutputIterator; template < typename TT , typename ValueT > struct OutputIteratorConcept : OutputIterator< TT, ValueT > { }; template < typename TT , typename ValueT > struct OutputIterator + : Assignable + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check532; ~OutputIterator() { + + ++i; + i++; + *i++ = t; + } + private: + TT i, j; + ValueT t; + }; + + template < typename TT > struct ForwardIterator; template < typename TT > struct ForwardIteratorConcept : ForwardIterator< TT > { }; template < typename TT > struct ForwardIterator + : InputIterator + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check546; ~ForwardIterator() + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> + + + boost_concept_check551; + + typename InputIterator::reference r = *i; + ignore_unused_variable_warning(r); + } + + private: + TT i; + }; + + template < typename TT > struct Mutable_ForwardIterator; template < typename TT > struct Mutable_ForwardIteratorConcept : Mutable_ForwardIterator< TT > { }; template < typename TT > struct Mutable_ForwardIterator + : ForwardIterator + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check564; ~Mutable_ForwardIterator() { + *i++ = *i; + } + private: + TT i; + }; + + template < typename TT > struct BidirectionalIterator; template < typename TT > struct BidirectionalIteratorConcept : BidirectionalIterator< TT > { }; template < typename TT > struct BidirectionalIterator + : ForwardIterator + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check574; ~BidirectionalIterator() + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> + + + boost_concept_check579; + + --i; + i--; + } + private: + TT i; + }; + + template < typename TT > struct Mutable_BidirectionalIterator; template < typename TT > struct Mutable_BidirectionalIteratorConcept : Mutable_BidirectionalIterator< TT > { }; template < typename TT > struct Mutable_BidirectionalIterator + : BidirectionalIterator + , Mutable_ForwardIterator + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check592; ~Mutable_BidirectionalIterator() + { + *i-- = *i; + } + private: + TT i; + }; + + template < typename TT > struct RandomAccessIterator; template < typename TT > struct RandomAccessIteratorConcept : RandomAccessIterator< TT > { }; template < typename TT > struct RandomAccessIterator + : BidirectionalIterator + , Comparable + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check604; ~RandomAccessIterator() + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_::iterator_category , std::random_access_iterator_tag >)>::failed> + + + boost_concept_check609; + + i += n; + i = i + n; i = n + i; + i -= n; + i = i - n; + n = i - j; + (void)i[n]; + } + + private: + TT a, b; + TT i, j; + typename boost::detail::iterator_traits::difference_type n; + }; + + template < typename TT > struct Mutable_RandomAccessIterator; template < typename TT > struct Mutable_RandomAccessIteratorConcept : Mutable_RandomAccessIterator< TT > { }; template < typename TT > struct Mutable_RandomAccessIterator + : RandomAccessIterator + , Mutable_BidirectionalIterator + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check629; ~Mutable_RandomAccessIterator() + { + i[n] = *i; + } + private: + TT i; + typename boost::detail::iterator_traits::difference_type n; + }; + + + + + template < typename C > struct Container; template < typename C > struct ContainerConcept : Container< C > { }; template < typename C > struct Container + : Assignable + { + typedef typename C::value_type value_type; + typedef typename C::difference_type difference_type; + typedef typename C::size_type size_type; + typedef typename C::const_reference const_reference; + typedef typename C::const_pointer const_pointer; + typedef typename C::const_iterator const_iterator; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check651; ~Container() + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check653; + const_constraints(c); + } + + private: + void const_constraints(const C& cc) { + i = cc.begin(); + i = cc.end(); + n = cc.size(); + n = cc.max_size(); + b = cc.empty(); + } + C c; + bool b; + const_iterator i; + size_type n; + }; + + template < typename C > struct Mutable_Container; template < typename C > struct Mutable_ContainerConcept : Mutable_Container< C > { }; template < typename C > struct Mutable_Container + : Container + { + typedef typename C::reference reference; + typedef typename C::iterator iterator; + typedef typename C::pointer pointer; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check678; ~Mutable_Container() + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> + boost_concept_check681; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check683; + + i = c.begin(); + i = c.end(); + c.swap(c2); + } + + private: + iterator i; + C c, c2; + }; + + template < typename C > struct ForwardContainer; template < typename C > struct ForwardContainerConcept : ForwardContainer< C > { }; template < typename C > struct ForwardContainer + : Container + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check698; ~ForwardContainer() + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> + + + boost_concept_check703; + } + }; + + template < typename C > struct Mutable_ForwardContainer; template < typename C > struct Mutable_ForwardContainerConcept : Mutable_ForwardContainer< C > { }; template < typename C > struct Mutable_ForwardContainer + : ForwardContainer + , Mutable_Container + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check711; ~Mutable_ForwardContainer() + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> + + + boost_concept_check716; + } + }; + + template < typename C > struct ReversibleContainer; template < typename C > struct ReversibleContainerConcept : ReversibleContainer< C > { }; template < typename C > struct ReversibleContainer + : ForwardContainer + { + typedef typename + C::const_reverse_iterator + const_reverse_iterator; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check727; ~ReversibleContainer() + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> + + boost_concept_check731; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check733; + + const_constraints(c); + } + private: + void const_constraints(const C& cc) + { + const_reverse_iterator i = cc.rbegin(); + i = cc.rend(); + } + C c; + }; + + template < typename C > struct Mutable_ReversibleContainer; template < typename C > struct Mutable_ReversibleContainerConcept : Mutable_ReversibleContainer< C > { }; template < typename C > struct Mutable_ReversibleContainer + : Mutable_ForwardContainer + , ReversibleContainer + { + typedef typename C::reverse_iterator reverse_iterator; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check752; ~Mutable_ReversibleContainer() + { + typedef typename Mutable_ForwardContainer::iterator iterator; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check755; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check756; + + reverse_iterator i = c.rbegin(); + i = c.rend(); + } + private: + C c; + }; + + template < typename C > struct RandomAccessContainer; template < typename C > struct RandomAccessContainerConcept : RandomAccessContainer< C > { }; template < typename C > struct RandomAccessContainer + : ReversibleContainer + { + typedef typename C::size_type size_type; + typedef typename C::const_reference const_reference; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check771; ~RandomAccessContainer() + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> + + + boost_concept_check776; + + const_constraints(c); + } + private: + void const_constraints(const C& cc) + { + const_reference r = cc[n]; + ignore_unused_variable_warning(r); + } + + C c; + size_type n; + }; + + template < typename C > struct Mutable_RandomAccessContainer; template < typename C > struct Mutable_RandomAccessContainerConcept : Mutable_RandomAccessContainer< C > { }; template < typename C > struct Mutable_RandomAccessContainer + : Mutable_ReversibleContainer + , RandomAccessContainer + { + private: + typedef Mutable_RandomAccessContainer self; + public: + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check798; ~Mutable_RandomAccessContainer() + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check800; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check801; + + typename self::reference r = c[i]; + ignore_unused_variable_warning(r); + } + + private: + typename Mutable_ReversibleContainer::size_type i; + C c; + }; + + + template < typename S > struct Sequence; template < typename S > struct SequenceConcept : Sequence< S > { }; template < typename S > struct Sequence + : Mutable_ForwardContainer + + + + , DefaultConstructible + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check820; ~Sequence() + { + S + c(n), + c2(n, t), + c3(first, last); + + c.insert(p, t); + c.insert(p, n, t); + c.insert(p, first, last); + + c.erase(p); + c.erase(p, q); + + typename Sequence::reference r = c.front(); + + ignore_unused_variable_warning(c); + ignore_unused_variable_warning(c2); + ignore_unused_variable_warning(c3); + ignore_unused_variable_warning(r); + const_constraints(c); + } + private: + void const_constraints(const S& c) { + typename Sequence::const_reference r = c.front(); + ignore_unused_variable_warning(r); + } + + typename S::value_type t; + typename S::size_type n; + typename S::value_type* first, *last; + typename S::iterator p, q; + }; + + template < typename S > struct FrontInsertionSequence; template < typename S > struct FrontInsertionSequenceConcept : FrontInsertionSequence< S > { }; template < typename S > struct FrontInsertionSequence + : Sequence + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check857; ~FrontInsertionSequence() + { + c.push_front(t); + c.pop_front(); + } + private: + S c; + typename S::value_type t; + }; + + template < typename S > struct BackInsertionSequence; template < typename S > struct BackInsertionSequenceConcept : BackInsertionSequence< S > { }; template < typename S > struct BackInsertionSequence + : Sequence + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check870; ~BackInsertionSequence() + { + c.push_back(t); + c.pop_back(); + typename BackInsertionSequence::reference r = c.back(); + ignore_unused_variable_warning(r); + const_constraints(c); + } + private: + void const_constraints(const S& cc) { + typename BackInsertionSequence::const_reference + r = cc.back(); + ignore_unused_variable_warning(r); + }; + S c; + typename S::value_type t; + }; + + template < typename C > struct AssociativeContainer; template < typename C > struct AssociativeContainerConcept : AssociativeContainer< C > { }; template < typename C > struct AssociativeContainer + : ForwardContainer + , DefaultConstructible + { + typedef typename C::key_type key_type; + typedef typename C::key_compare key_compare; + typedef typename C::value_compare value_compare; + typedef typename C::iterator iterator; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check897; ~AssociativeContainer() + { + i = c.find(k); + r = c.equal_range(k); + c.erase(k); + c.erase(i); + c.erase(r.first, r.second); + const_constraints(c); + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check905; + + typedef typename AssociativeContainer::value_type value_type_; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check908; + } + + + typedef typename C::const_iterator const_iterator; + private: + void const_constraints(const C& cc) + { + ci = cc.find(k); + n = cc.count(k); + cr = cc.equal_range(k); + } + + C c; + iterator i; + std::pair r; + const_iterator ci; + std::pair cr; + typename C::key_type k; + typename C::size_type n; + }; + + template < typename C > struct UniqueAssociativeContainer; template < typename C > struct UniqueAssociativeContainerConcept : UniqueAssociativeContainer< C > { }; template < typename C > struct UniqueAssociativeContainer + : AssociativeContainer + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check933; ~UniqueAssociativeContainer() + { + C c(first, last); + + pos_flag = c.insert(t); + c.insert(first, last); + + ignore_unused_variable_warning(c); + } + private: + std::pair pos_flag; + typename C::value_type t; + typename C::value_type* first, *last; + }; + + template < typename C > struct MultipleAssociativeContainer; template < typename C > struct MultipleAssociativeContainerConcept : MultipleAssociativeContainer< C > { }; template < typename C > struct MultipleAssociativeContainer + : AssociativeContainer + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check951; ~MultipleAssociativeContainer() + { + C c(first, last); + + pos = c.insert(t); + c.insert(first, last); + + ignore_unused_variable_warning(c); + ignore_unused_variable_warning(pos); + } + private: + typename C::iterator pos; + typename C::value_type t; + typename C::value_type* first, *last; + }; + + template < typename C > struct SimpleAssociativeContainer; template < typename C > struct SimpleAssociativeContainerConcept : SimpleAssociativeContainer< C > { }; template < typename C > struct SimpleAssociativeContainer + : AssociativeContainer + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check970; ~SimpleAssociativeContainer() + { + typedef typename C::key_type key_type; + typedef typename C::value_type value_type; + enum { mpl_assertion_in_line_974 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_arg( (void (*) (boost::is_same))0, 1 ) ) ) }; + } + }; + + template < typename C > struct PairAssociativeContainer; template < typename C > struct PairAssociativeContainerConcept : PairAssociativeContainer< C > { }; template < typename C > struct PairAssociativeContainer + : AssociativeContainer + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check981; ~PairAssociativeContainer() + { + typedef typename C::key_type key_type; + typedef typename C::value_type value_type; + typedef typename C::mapped_type mapped_type; + typedef std::pair required_value_type; + enum { mpl_assertion_in_line_987 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_arg( (void (*) (boost::is_same))0, 1 ) ) ) }; + } + }; + + template < typename C > struct SortedAssociativeContainer; template < typename C > struct SortedAssociativeContainerConcept : SortedAssociativeContainer< C > { }; template < typename C > struct SortedAssociativeContainer + : AssociativeContainer + , ReversibleContainer + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check995; ~SortedAssociativeContainer() + { + C + c(kc), + c2(first, last), + c3(first, last, kc); + + p = c.upper_bound(k); + p = c.lower_bound(k); + r = c.equal_range(k); + + c.insert(p, t); + + ignore_unused_variable_warning(c); + ignore_unused_variable_warning(c2); + ignore_unused_variable_warning(c3); + const_constraints(c); + } + + void const_constraints(const C& c) + { + kc = c.key_comp(); + vc = c.value_comp(); + + cp = c.upper_bound(k); + cp = c.lower_bound(k); + cr = c.equal_range(k); + } + + private: + typename C::key_compare kc; + typename C::value_compare vc; + typename C::value_type t; + typename C::key_type k; + typedef typename C::iterator iterator; + typedef typename C::const_iterator const_iterator; + + typedef SortedAssociativeContainer self; + iterator p; + const_iterator cp; + std::pair r; + std::pair cr; + typename C::value_type* first, *last; + }; + + + + template < typename C > struct Collection; template < typename C > struct CollectionConcept : Collection< C > { }; template < typename C > struct Collection + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check1044; ~Collection() + { + boost::function_requires >(); + boost::function_requires >(); + boost::function_requires >(); + const_constraints(c); + i = c.begin(); + i = c.end(); + c.swap(c); + } + + void const_constraints(const C& c) { + ci = c.begin(); + ci = c.end(); + n = c.size(); + b = c.empty(); + } + + private: + typedef typename C::value_type value_type; + typedef typename C::iterator iterator; + typedef typename C::const_iterator const_iterator; + typedef typename C::reference reference; + typedef typename C::const_reference const_reference; + + typedef typename C::difference_type difference_type; + typedef typename C::size_type size_type; + + C c; + bool b; + iterator i; + const_iterator ci; + size_type n; + }; +} + +# 1 "../boost/concept/detail/concept_undef.hpp" 1 +# 1081 "../boost/concept_check.hpp" 2 +# 20 "../boost/range/concepts.hpp" 2 +# 1 "../boost/iterator/iterator_concepts.hpp" 1 +# 26 "../boost/iterator/iterator_concepts.hpp" +# 1 "../boost/limits.hpp" 1 +# 19 "../boost/limits.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/limits" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/limits" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/limits" 3 +# 148 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/limits" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + + + + + + enum float_round_style + { + round_indeterminate = -1, + round_toward_zero = 0, + round_to_nearest = 1, + round_toward_infinity = 2, + round_toward_neg_infinity = 3 + }; + + + + + + + + enum float_denorm_style + { + + denorm_indeterminate = -1, + + denorm_absent = 0, + + denorm_present = 1 + }; +# 192 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/limits" 3 + struct __numeric_limits_base + { + + + static const bool is_specialized = false; + + + + + static const int digits = 0; + + + static const int digits10 = 0; +# 213 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/limits" 3 + static const bool is_signed = false; + + + + static const bool is_integer = false; + + + + + + static const bool is_exact = false; + + + + static const int radix = 0; + + + + static const int min_exponent = 0; + + + + static const int min_exponent10 = 0; + + + + + static const int max_exponent = 0; + + + + static const int max_exponent10 = 0; + + + static const bool has_infinity = false; + + + + static const bool has_quiet_NaN = false; + + + + static const bool has_signaling_NaN = false; + + + static const float_denorm_style has_denorm = denorm_absent; + + + + static const bool has_denorm_loss = false; + + + + static const bool is_iec559 = false; + + + + + static const bool is_bounded = false; + + + + + + static const bool is_modulo = false; + + + static const bool traps = false; + + + static const bool tinyness_before = false; + + + + + static const float_round_style round_style = + round_toward_zero; + }; +# 303 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/limits" 3 + template + struct numeric_limits : public __numeric_limits_base + { + + + static _Tp + min() throw() { return static_cast<_Tp>(0); } + + + static _Tp + max() throw() { return static_cast<_Tp>(0); } +# 324 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/limits" 3 + static _Tp + epsilon() throw() { return static_cast<_Tp>(0); } + + + static _Tp + round_error() throw() { return static_cast<_Tp>(0); } + + + static _Tp + infinity() throw() { return static_cast<_Tp>(0); } + + + + static _Tp + quiet_NaN() throw() { return static_cast<_Tp>(0); } + + + + static _Tp + signaling_NaN() throw() { return static_cast<_Tp>(0); } + + + + + static _Tp + denorm_min() throw() { return static_cast<_Tp>(0); } + }; +# 370 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/limits" 3 + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static bool + min() throw() { return false; } + + static bool + max() throw() { return true; } + + + + + + static const int digits = 1; + static const int digits10 = 0; + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + + static bool + epsilon() throw() { return false; } + + static bool + round_error() throw() { return false; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm + = denorm_absent; + static const bool has_denorm_loss = false; + + static bool + infinity() throw() { return false; } + + static bool + quiet_NaN() throw() { return false; } + + static bool + signaling_NaN() throw() { return false; } + + static bool + denorm_min() throw() { return false; } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = false; + + + + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static char + min() throw() { return (((char)(-1) < 0) ? (char)1 << (sizeof(char) * 8 - ((char)(-1) < 0)) : (char)0); } + + static char + max() throw() { return (((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0); } + + + + + + + static const int digits = (sizeof(char) * 8 - ((char)(-1) < 0)); + static const int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643L / 2136); + + + + static const bool is_signed = ((char)(-1) < 0); + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + + static char + epsilon() throw() { return 0; } + + static char + round_error() throw() { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm + = denorm_absent; + static const bool has_denorm_loss = false; + + static + char infinity() throw() { return char(); } + + static char + quiet_NaN() throw() { return char(); } + + static char + signaling_NaN() throw() { return char(); } + + static char + denorm_min() throw() { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static signed char + min() throw() { return -127 - 1; } + + static signed char + max() throw() { return 127; } + + + + + + + static const int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0)); + static const int digits10 + = ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643L / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + + static signed char + epsilon() throw() { return 0; } + + static signed char + round_error() throw() { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm + = denorm_absent; + static const bool has_denorm_loss = false; + + static signed char + infinity() throw() { return static_cast(0); } + + static signed char + quiet_NaN() throw() { return static_cast(0); } + + static signed char + signaling_NaN() throw() { return static_cast(0); } + + static signed char + denorm_min() throw() { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned char + min() throw() { return 0; } + + static unsigned char + max() throw() { return 127 * 2U + 1; } + + + + + + + static const int digits + = (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)); + static const int digits10 + = ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643L / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + + static unsigned char + epsilon() throw() { return 0; } + + static unsigned char + round_error() throw() { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm + = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned char + infinity() throw() { return static_cast(0); } + + static unsigned char + quiet_NaN() throw() { return static_cast(0); } + + static unsigned char + signaling_NaN() throw() { return static_cast(0); } + + static unsigned char + denorm_min() throw() { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static wchar_t + min() throw() { return (((wchar_t)(-1) < 0) ? (wchar_t)1 << (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) : (wchar_t)0); } + + static wchar_t + max() throw() { return (((wchar_t)(-1) < 0) ? (((((wchar_t)1 << ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(wchar_t)0); } + + + + + + + static const int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)); + static const int digits10 + = ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643L / 2136); + + + + static const bool is_signed = ((wchar_t)(-1) < 0); + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + + static wchar_t + epsilon() throw() { return 0; } + + static wchar_t + round_error() throw() { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm + = denorm_absent; + static const bool has_denorm_loss = false; + + static wchar_t + infinity() throw() { return wchar_t(); } + + static wchar_t + quiet_NaN() throw() { return wchar_t(); } + + static wchar_t + signaling_NaN() throw() { return wchar_t(); } + + static wchar_t + denorm_min() throw() { return wchar_t(); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style + = round_toward_zero; + }; +# 852 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/limits" 3 + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static short + min() throw() { return -32767 - 1; } + + static short + max() throw() { return 32767; } + + + + + + + static const int digits = (sizeof(short) * 8 - ((short)(-1) < 0)); + static const int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643L / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + + static short + epsilon() throw() { return 0; } + + static short + round_error() throw() { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm + = denorm_absent; + static const bool has_denorm_loss = false; + + static short + infinity() throw() { return short(); } + + static short + quiet_NaN() throw() { return short(); } + + static short + signaling_NaN() throw() { return short(); } + + static short + denorm_min() throw() { return short(); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned short + min() throw() { return 0; } + + static unsigned short + max() throw() { return 32767 * 2U + 1; } + + + + + + + static const int digits + = (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)); + static const int digits10 + = ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643L / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + + static unsigned short + epsilon() throw() { return 0; } + + static unsigned short + round_error() throw() { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm + = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned short + infinity() throw() { return static_cast(0); } + + static unsigned short + quiet_NaN() throw() { return static_cast(0); } + + static unsigned short + signaling_NaN() throw() { return static_cast(0); } + + static unsigned short + denorm_min() throw() { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static int + min() throw() { return -2147483647 - 1; } + + static int + max() throw() { return 2147483647; } + + + + + + + static const int digits = (sizeof(int) * 8 - ((int)(-1) < 0)); + static const int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643L / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + + static int + epsilon() throw() { return 0; } + + static int + round_error() throw() { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm + = denorm_absent; + static const bool has_denorm_loss = false; + + static int + infinity() throw() { return static_cast(0); } + + static int + quiet_NaN() throw() { return static_cast(0); } + + static int + signaling_NaN() throw() { return static_cast(0); } + + static int + denorm_min() throw() { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned int + min() throw() { return 0; } + + static unsigned int + max() throw() { return 2147483647 * 2U + 1; } + + + + + + + static const int digits + = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)); + static const int digits10 + = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643L / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + + static unsigned int + epsilon() throw() { return 0; } + + static unsigned int + round_error() throw() { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm + = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned int + infinity() throw() { return static_cast(0); } + + static unsigned int + quiet_NaN() throw() { return static_cast(0); } + + static unsigned int + signaling_NaN() throw() { return static_cast(0); } + + static unsigned int + denorm_min() throw() { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static long + min() throw() { return -9223372036854775807L - 1; } + + static long + max() throw() { return 9223372036854775807L; } + + + + + + + static const int digits = (sizeof(long) * 8 - ((long)(-1) < 0)); + static const int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643L / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + + static long + epsilon() throw() { return 0; } + + static long + round_error() throw() { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm + = denorm_absent; + static const bool has_denorm_loss = false; + + static long + infinity() throw() { return static_cast(0); } + + static long + quiet_NaN() throw() { return static_cast(0); } + + static long + signaling_NaN() throw() { return static_cast(0); } + + static long + denorm_min() throw() { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned long + min() throw() { return 0; } + + static unsigned long + max() throw() { return 9223372036854775807L * 2UL + 1; } + + + + + + + static const int digits + = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)); + static const int digits10 + = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643L / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + + static unsigned long + epsilon() throw() { return 0; } + + static unsigned long + round_error() throw() { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm + = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned long + infinity() throw() { return static_cast(0); } + + static unsigned long + quiet_NaN() throw() { return static_cast(0); } + + static unsigned long + signaling_NaN() throw() { return static_cast(0); } + + static unsigned long + denorm_min() throw() { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static long long + min() throw() { return -9223372036854775807LL - 1; } + + static long long + max() throw() { return 9223372036854775807LL; } + + + + + + + static const int digits + = (sizeof(long long) * 8 - ((long long)(-1) < 0)); + static const int digits10 + = ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643L / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + + static long long + epsilon() throw() { return 0; } + + static long long + round_error() throw() { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm + = denorm_absent; + static const bool has_denorm_loss = false; + + static long long + infinity() throw() { return static_cast(0); } + + static long long + quiet_NaN() throw() { return static_cast(0); } + + static long long + signaling_NaN() throw() { return static_cast(0); } + + static long long + denorm_min() throw() { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned long long + min() throw() { return 0; } + + static unsigned long long + max() throw() { return 9223372036854775807LL * 2ULL + 1; } + + + + + + + static const int digits + = (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)); + static const int digits10 + = ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643L / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + + static unsigned long long + epsilon() throw() { return 0; } + + static unsigned long long + round_error() throw() { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm + = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned long long + infinity() throw() { return static_cast(0); } + + static unsigned long long + quiet_NaN() throw() { return static_cast(0); } + + static unsigned long long + signaling_NaN() throw() { return static_cast(0); } + + static unsigned long long + denorm_min() throw() { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style + = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static float + min() throw() { return 1.17549435082228750797e-38F; } + + static float + max() throw() { return 3.40282346638528859812e+38F; } + + + + + + + static const int digits = 24; + static const int digits10 = 6; + + + + + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 2; + + static float + epsilon() throw() { return 1.19209289550781250000e-7F; } + + static float + round_error() throw() { return 0.5F; } + + static const int min_exponent = (-125); + static const int min_exponent10 = (-37); + static const int max_exponent = 128; + static const int max_exponent10 = 38; + + static const bool has_infinity = 1; + static const bool has_quiet_NaN = 1; + static const bool has_signaling_NaN = has_quiet_NaN; + static const float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static const bool has_denorm_loss + = false; + + static float + infinity() throw() { return __builtin_huge_valf (); } + + static float + quiet_NaN() throw() { return __builtin_nanf (""); } + + static float + signaling_NaN() throw() { return __builtin_nansf (""); } + + static float + denorm_min() throw() { return 1.40129846432481707092e-45F; } + + static const bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before + = false; + static const float_round_style round_style + = round_to_nearest; + }; + + + + + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static double + min() throw() { return double(2.22507385850720138309e-308L); } + + static double + max() throw() { return double(1.79769313486231570815e+308L); } + + + + + + + static const int digits = 53; + static const int digits10 = 15; + + + + + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 2; + + static double + epsilon() throw() { return double(2.22044604925031308085e-16L); } + + static double + round_error() throw() { return 0.5; } + + static const int min_exponent = (-1021); + static const int min_exponent10 = (-307); + static const int max_exponent = 1024; + static const int max_exponent10 = 308; + + static const bool has_infinity = 1; + static const bool has_quiet_NaN = 1; + static const bool has_signaling_NaN = has_quiet_NaN; + static const float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static const bool has_denorm_loss + = false; + + static double + infinity() throw() { return __builtin_huge_val(); } + + static double + quiet_NaN() throw() { return __builtin_nan (""); } + + static double + signaling_NaN() throw() { return __builtin_nans (""); } + + static double + denorm_min() throw() { return double(4.94065645841246544177e-324L); } + + static const bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before + = false; + static const float_round_style round_style + = round_to_nearest; + }; + + + + + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static long double + min() throw() { return 3.36210314311209350626e-4932L; } + + static long double + max() throw() { return 1.18973149535723176502e+4932L; } + + + + + + + static const int digits = 64; + static const int digits10 = 18; + + + + + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 2; + + static long double + epsilon() throw() { return 1.08420217248550443401e-19L; } + + static long double + round_error() throw() { return 0.5L; } + + static const int min_exponent = (-16381); + static const int min_exponent10 = (-4931); + static const int max_exponent = 16384; + static const int max_exponent10 = 4932; + + static const bool has_infinity = 1; + static const bool has_quiet_NaN = 1; + static const bool has_signaling_NaN = has_quiet_NaN; + static const float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static const bool has_denorm_loss + = false; + + static long double + infinity() throw() { return __builtin_huge_vall (); } + + static long double + quiet_NaN() throw() { return __builtin_nanl (""); } + + static long double + signaling_NaN() throw() { return __builtin_nansl (""); } + + static long double + denorm_min() throw() { return 3.64519953188247460253e-4951L; } + + static const bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before = + false; + static const float_round_style round_style = + round_to_nearest; + }; + + + + + + +} +# 20 "../boost/limits.hpp" 2 +# 27 "../boost/iterator/iterator_concepts.hpp" 2 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/algorithm" 1 3 +# 59 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/algorithm" 3 + +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/algorithm" 3 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 1 3 +# 61 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstdlib" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstdlib" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstdlib" 3 +# 62 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/algorithmfwd.h" 1 3 +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/algorithmfwd.h" 3 + +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/algorithmfwd.h" 3 + + + + + + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 201 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/algorithmfwd.h" 3 + template + bool + binary_search(_FIter, _FIter, const _Tp&); + + template + bool + binary_search(_FIter, _FIter, const _Tp&, _Compare); + + template + _OIter + copy(_IIter, _IIter, _OIter); + + template + _BIter2 + copy_backward(_BIter1, _BIter1, _BIter2); +# 230 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/algorithmfwd.h" 3 + template + pair<_FIter, _FIter> + equal_range(_FIter, _FIter, const _Tp&); + + template + pair<_FIter, _FIter> + equal_range(_FIter, _FIter, const _Tp&, _Compare); + + template + void + fill(_FIter, _FIter, const _Tp&); + + template + _OIter + fill_n(_OIter, _Size, const _Tp&); + + + + template + _FIter1 + find_end(_FIter1, _FIter1, _FIter2, _FIter2); + + template + _FIter1 + find_end(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); +# 269 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/algorithmfwd.h" 3 + template + bool + includes(_IIter1, _IIter1, _IIter2, _IIter2); + + template + bool + includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); + + template + void + inplace_merge(_BIter, _BIter, _BIter); + + template + void + inplace_merge(_BIter, _BIter, _BIter, _Compare); +# 332 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/algorithmfwd.h" 3 + template + void + iter_swap(_FIter1, _FIter2); + + template + _FIter + lower_bound(_FIter, _FIter, const _Tp&); + + template + _FIter + lower_bound(_FIter, _FIter, const _Tp&, _Compare); + + template + void + make_heap(_RAIter, _RAIter); + + template + void + make_heap(_RAIter, _RAIter, _Compare); + + template + const _Tp& + max(const _Tp&, const _Tp&); + + template + const _Tp& + max(const _Tp&, const _Tp&, _Compare); + + + + + template + const _Tp& + min(const _Tp&, const _Tp&); + + template + const _Tp& + min(const _Tp&, const _Tp&, _Compare); +# 417 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/algorithmfwd.h" 3 + template + bool + next_permutation(_BIter, _BIter); + + template + bool + next_permutation(_BIter, _BIter, _Compare); +# 434 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/algorithmfwd.h" 3 + template + _RAIter + partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter); + + template + _RAIter + partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter, _Compare); +# 455 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/algorithmfwd.h" 3 + template + void + pop_heap(_RAIter, _RAIter); + + template + void + pop_heap(_RAIter, _RAIter, _Compare); + + template + bool + prev_permutation(_BIter, _BIter); + + template + bool + prev_permutation(_BIter, _BIter, _Compare); + + template + void + push_heap(_RAIter, _RAIter); + + template + void + push_heap(_RAIter, _RAIter, _Compare); + + + + template + _FIter + remove(_FIter, _FIter, const _Tp&); + + template + _FIter + remove_if(_FIter, _FIter, _Predicate); + + template + _OIter + remove_copy(_IIter, _IIter, _OIter, const _Tp&); + + template + _OIter + remove_copy_if(_IIter, _IIter, _OIter, _Predicate); + + + + template + _OIter + replace_copy(_IIter, _IIter, _OIter, const _Tp&, const _Tp&); + + template + _OIter + replace_copy_if(_Iter, _Iter, _OIter, _Predicate, const _Tp&); + + + + template + void + reverse(_BIter, _BIter); + + template + _OIter + reverse_copy(_BIter, _BIter, _OIter); + + template + void + rotate(_FIter, _FIter, _FIter); + + template + _OIter + rotate_copy(_FIter, _FIter, _FIter, _OIter); +# 538 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/algorithmfwd.h" 3 + template + void + sort_heap(_RAIter, _RAIter); + + template + void + sort_heap(_RAIter, _RAIter, _Compare); + + template + _BIter + stable_partition(_BIter, _BIter, _Predicate); + + template + void + swap(_Tp&, _Tp&); + + template + void + swap(_Tp (&)[_Nm], _Tp (&)[_Nm]); + + template + _FIter2 + swap_ranges(_FIter1, _FIter1, _FIter2); + + + + template + _FIter + unique(_FIter, _FIter); + + template + _FIter + unique(_FIter, _FIter, _BinaryPredicate); + + + + template + _FIter + upper_bound(_FIter, _FIter, const _Tp&); + + template + _FIter + upper_bound(_FIter, _FIter, const _Tp&, _Compare); + + + + + + template + _FIter + adjacent_find(_FIter, _FIter); + + template + _FIter + adjacent_find(_FIter, _FIter, _BinaryPredicate); + + template + typename iterator_traits<_IIter>::difference_type + count(_IIter, _IIter, const _Tp&); + + template + typename iterator_traits<_IIter>::difference_type + count_if(_IIter, _IIter, _Predicate); + + template + bool + equal(_IIter1, _IIter1, _IIter2); + + template + bool + equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate); + + template + _IIter + find(_IIter, _IIter, const _Tp&); + + template + _FIter1 + find_first_of(_FIter1, _FIter1, _FIter2, _FIter2); + + template + _FIter1 + find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); + + template + _IIter + find_if(_IIter, _IIter, _Predicate); + + template + _Funct + for_each(_IIter, _IIter, _Funct); + + template + void + generate(_FIter, _FIter, _Generator); + + template + _OIter + generate_n(_OIter, _Size, _Generator); + + template + bool + lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2); + + template + bool + lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); + + template + _FIter + max_element(_FIter, _FIter); + + template + _FIter + max_element(_FIter, _FIter, _Compare); + + template + _OIter + merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + + template + _OIter + merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + + template + _FIter + min_element(_FIter, _FIter); + + template + _FIter + min_element(_FIter, _FIter, _Compare); + + template + pair<_IIter1, _IIter2> + mismatch(_IIter1, _IIter1, _IIter2); + + template + pair<_IIter1, _IIter2> + mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate); + + template + void + nth_element(_RAIter, _RAIter, _RAIter); + + template + void + nth_element(_RAIter, _RAIter, _RAIter, _Compare); + + template + void + partial_sort(_RAIter, _RAIter, _RAIter); + + template + void + partial_sort(_RAIter, _RAIter, _RAIter, _Compare); + + template + _BIter + partition(_BIter, _BIter, _Predicate); + + template + void + random_shuffle(_RAIter, _RAIter); + + template + void + random_shuffle(_RAIter, _RAIter, + + + + _Generator&); + + + template + void + replace(_FIter, _FIter, const _Tp&, const _Tp&); + + template + void + replace_if(_FIter, _FIter, _Predicate, const _Tp&); + + template + _FIter1 + search(_FIter1, _FIter1, _FIter2, _FIter2); + + template + _FIter1 + search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); + + template + _FIter + search_n(_FIter, _FIter, _Size, const _Tp&); + + template + _FIter + search_n(_FIter, _FIter, _Size, const _Tp&, _BinaryPredicate); + + template + _OIter + set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + + template + _OIter + set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + + template + _OIter + set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + + template + _OIter + set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + + template + _OIter + set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + + template + _OIter + set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, + _OIter, _Compare); + + template + _OIter + set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + + template + _OIter + set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + + template + void + sort(_RAIter, _RAIter); + + template + void + sort(_RAIter, _RAIter, _Compare); + + template + void + stable_sort(_RAIter, _RAIter); + + template + void + stable_sort(_RAIter, _RAIter, _Compare); + + template + _OIter + transform(_IIter, _IIter, _OIter, _UnaryOperation); + + template + _OIter + transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation); + + template + _OIter + unique_copy(_IIter, _IIter, _OIter); + + template + _OIter + unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate); + + +} +# 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_heap.h" 1 3 +# 62 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_heap.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + + + + + + template + _Distance + __is_heap_until(_RandomAccessIterator __first, _Distance __n) + { + _Distance __parent = 0; + for (_Distance __child = 1; __child < __n; ++__child) + { + if (__first[__parent] < __first[__child]) + return __child; + if ((__child & 1) == 0) + ++__parent; + } + return __n; + } + + template + _Distance + __is_heap_until(_RandomAccessIterator __first, _Distance __n, + _Compare __comp) + { + _Distance __parent = 0; + for (_Distance __child = 1; __child < __n; ++__child) + { + if (__comp(__first[__parent], __first[__child])) + return __child; + if ((__child & 1) == 0) + ++__parent; + } + return __n; + } + + + + template + inline bool + __is_heap(_RandomAccessIterator __first, _Distance __n) + { return std::__is_heap_until(__first, __n) == __n; } + + template + inline bool + __is_heap(_RandomAccessIterator __first, _Compare __comp, _Distance __n) + { return std::__is_heap_until(__first, __n, __comp) == __n; } + + template + inline bool + __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { return std::__is_heap(__first, std::distance(__first, __last)); } + + template + inline bool + __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { return std::__is_heap(__first, __comp, std::distance(__first, __last)); } + + + + + template + void + __push_heap(_RandomAccessIterator __first, + _Distance __holeIndex, _Distance __topIndex, _Tp __value) + { + _Distance __parent = (__holeIndex - 1) / 2; + while (__holeIndex > __topIndex && *(__first + __parent) < __value) + { + *(__first + __holeIndex) = (*(__first + __parent)); + __holeIndex = __parent; + __parent = (__holeIndex - 1) / 2; + } + *(__first + __holeIndex) = (__value); + } +# 154 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_heap.h" 3 + template + inline void + push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + + ; + ; + + _ValueType __value = (*(__last - 1)); + std::__push_heap(__first, _DistanceType((__last - __first) - 1), + _DistanceType(0), (__value)); + } + + template + void + __push_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __topIndex, _Tp __value, _Compare __comp) + { + _Distance __parent = (__holeIndex - 1) / 2; + while (__holeIndex > __topIndex + && __comp(*(__first + __parent), __value)) + { + *(__first + __holeIndex) = (*(__first + __parent)); + __holeIndex = __parent; + __parent = (__holeIndex - 1) / 2; + } + *(__first + __holeIndex) = (__value); + } +# 203 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_heap.h" 3 + template + inline void + push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + ; + ; + + _ValueType __value = (*(__last - 1)); + std::__push_heap(__first, _DistanceType((__last - __first) - 1), + _DistanceType(0), (__value), __comp); + } + + template + void + __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __len, _Tp __value) + { + const _Distance __topIndex = __holeIndex; + _Distance __secondChild = __holeIndex; + while (__secondChild < (__len - 1) / 2) + { + __secondChild = 2 * (__secondChild + 1); + if (*(__first + __secondChild) < *(__first + (__secondChild - 1))) + __secondChild--; + *(__first + __holeIndex) = (*(__first + __secondChild)); + __holeIndex = __secondChild; + } + if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2) + { + __secondChild = 2 * (__secondChild + 1); + *(__first + __holeIndex) = (*(__first + (__secondChild - 1))) + ; + __holeIndex = __secondChild - 1; + } + std::__push_heap(__first, __holeIndex, __topIndex, + (__value)); + } + + template + inline void + __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _RandomAccessIterator __result) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + _ValueType __value = (*__result); + *__result = (*__first); + std::__adjust_heap(__first, _DistanceType(0), + _DistanceType(__last - __first), + (__value)); + } +# 276 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_heap.h" 3 + template + inline void + pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + + + + ; + ; + + --__last; + std::__pop_heap(__first, __last, __last); + } + + template + void + __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __len, _Tp __value, _Compare __comp) + { + const _Distance __topIndex = __holeIndex; + _Distance __secondChild = __holeIndex; + while (__secondChild < (__len - 1) / 2) + { + __secondChild = 2 * (__secondChild + 1); + if (__comp(*(__first + __secondChild), + *(__first + (__secondChild - 1)))) + __secondChild--; + *(__first + __holeIndex) = (*(__first + __secondChild)); + __holeIndex = __secondChild; + } + if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2) + { + __secondChild = 2 * (__secondChild + 1); + *(__first + __holeIndex) = (*(__first + (__secondChild - 1))) + ; + __holeIndex = __secondChild - 1; + } + std::__push_heap(__first, __holeIndex, __topIndex, + (__value), __comp); + } + + template + inline void + __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _RandomAccessIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + _ValueType __value = (*__result); + *__result = (*__first); + std::__adjust_heap(__first, _DistanceType(0), + _DistanceType(__last - __first), + (__value), __comp); + } +# 350 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_heap.h" 3 + template + inline void + pop_heap(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + + + + ; + ; + + --__last; + std::__pop_heap(__first, __last, __last, __comp); + } +# 373 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_heap.h" 3 + template + void + make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + + ; + + if (__last - __first < 2) + return; + + const _DistanceType __len = __last - __first; + _DistanceType __parent = (__len - 2) / 2; + while (true) + { + _ValueType __value = (*(__first + __parent)); + std::__adjust_heap(__first, __parent, __len, (__value)); + if (__parent == 0) + return; + __parent--; + } + } +# 413 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_heap.h" 3 + template + void + make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + ; + + if (__last - __first < 2) + return; + + const _DistanceType __len = __last - __first; + _DistanceType __parent = (__len - 2) / 2; + while (true) + { + _ValueType __value = (*(__first + __parent)); + std::__adjust_heap(__first, __parent, __len, (__value), + __comp); + if (__parent == 0) + return; + __parent--; + } + } +# 452 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_heap.h" 3 + template + void + sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + + + + + + ; + ; + + while (__last - __first > 1) + { + --__last; + std::__pop_heap(__first, __last, __last); + } + } +# 481 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_heap.h" 3 + template + void + sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + + + + ; + ; + + while (__last - __first > 1) + { + --__last; + std::__pop_heap(__first, __last, __last, __comp); + } + } +# 578 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_heap.h" 3 + +} +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 2 3 +# 73 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + + template + void + __move_median_first(_Iterator __a, _Iterator __b, _Iterator __c) + { + + + + + if (*__a < *__b) + { + if (*__b < *__c) + std::iter_swap(__a, __b); + else if (*__a < *__c) + std::iter_swap(__a, __c); + } + else if (*__a < *__c) + return; + else if (*__b < *__c) + std::iter_swap(__a, __c); + else + std::iter_swap(__a, __b); + } + + + template + void + __move_median_first(_Iterator __a, _Iterator __b, _Iterator __c, + _Compare __comp) + { + + + + + + if (__comp(*__a, *__b)) + { + if (__comp(*__b, *__c)) + std::iter_swap(__a, __b); + else if (__comp(*__a, *__c)) + std::iter_swap(__a, __c); + } + else if (__comp(*__a, *__c)) + return; + else if (__comp(*__b, *__c)) + std::iter_swap(__a, __c); + else + std::iter_swap(__a, __b); + } + + + + + template + inline _InputIterator + __find(_InputIterator __first, _InputIterator __last, + const _Tp& __val, input_iterator_tag) + { + while (__first != __last && !(*__first == __val)) + ++__first; + return __first; + } + + + template + inline _InputIterator + __find_if(_InputIterator __first, _InputIterator __last, + _Predicate __pred, input_iterator_tag) + { + while (__first != __last && !bool(__pred(*__first))) + ++__first; + return __first; + } + + + template + _RandomAccessIterator + __find(_RandomAccessIterator __first, _RandomAccessIterator __last, + const _Tp& __val, random_access_iterator_tag) + { + typename iterator_traits<_RandomAccessIterator>::difference_type + __trip_count = (__last - __first) >> 2; + + for (; __trip_count > 0; --__trip_count) + { + if (*__first == __val) + return __first; + ++__first; + + if (*__first == __val) + return __first; + ++__first; + + if (*__first == __val) + return __first; + ++__first; + + if (*__first == __val) + return __first; + ++__first; + } + + switch (__last - __first) + { + case 3: + if (*__first == __val) + return __first; + ++__first; + case 2: + if (*__first == __val) + return __first; + ++__first; + case 1: + if (*__first == __val) + return __first; + ++__first; + case 0: + default: + return __last; + } + } + + + template + _RandomAccessIterator + __find_if(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Predicate __pred, random_access_iterator_tag) + { + typename iterator_traits<_RandomAccessIterator>::difference_type + __trip_count = (__last - __first) >> 2; + + for (; __trip_count > 0; --__trip_count) + { + if (__pred(*__first)) + return __first; + ++__first; + + if (__pred(*__first)) + return __first; + ++__first; + + if (__pred(*__first)) + return __first; + ++__first; + + if (__pred(*__first)) + return __first; + ++__first; + } + + switch (__last - __first) + { + case 3: + if (__pred(*__first)) + return __first; + ++__first; + case 2: + if (__pred(*__first)) + return __first; + ++__first; + case 1: + if (__pred(*__first)) + return __first; + ++__first; + case 0: + default: + return __last; + } + } +# 326 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + __search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, const _Tp& __val, + std::forward_iterator_tag) + { + __first = std::find(__first, __last, __val); + while (__first != __last) + { + typename iterator_traits<_ForwardIterator>::difference_type + __n = __count; + _ForwardIterator __i = __first; + ++__i; + while (__i != __last && __n != 1 && *__i == __val) + { + ++__i; + --__n; + } + if (__n == 1) + return __first; + if (__i == __last) + return __last; + __first = std::find(++__i, __last, __val); + } + return __last; + } + + + + + + + template + _RandomAccessIter + __search_n(_RandomAccessIter __first, _RandomAccessIter __last, + _Integer __count, const _Tp& __val, + std::random_access_iterator_tag) + { + + typedef typename std::iterator_traits<_RandomAccessIter>::difference_type + _DistanceType; + + _DistanceType __tailSize = __last - __first; + const _DistanceType __pattSize = __count; + + if (__tailSize < __pattSize) + return __last; + + const _DistanceType __skipOffset = __pattSize - 1; + _RandomAccessIter __lookAhead = __first + __skipOffset; + __tailSize -= __pattSize; + + while (1) + { + + + while (!(*__lookAhead == __val)) + { + if (__tailSize < __pattSize) + return __last; + __lookAhead += __pattSize; + __tailSize -= __pattSize; + } + _DistanceType __remainder = __skipOffset; + for (_RandomAccessIter __backTrack = __lookAhead - 1; + *__backTrack == __val; --__backTrack) + { + if (--__remainder == 0) + return (__lookAhead - __skipOffset); + } + if (__remainder > __tailSize) + return __last; + __lookAhead += __remainder; + __tailSize -= __remainder; + } + } +# 411 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + __search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, const _Tp& __val, + _BinaryPredicate __binary_pred, std::forward_iterator_tag) + { + while (__first != __last && !bool(__binary_pred(*__first, __val))) + ++__first; + + while (__first != __last) + { + typename iterator_traits<_ForwardIterator>::difference_type + __n = __count; + _ForwardIterator __i = __first; + ++__i; + while (__i != __last && __n != 1 && bool(__binary_pred(*__i, __val))) + { + ++__i; + --__n; + } + if (__n == 1) + return __first; + if (__i == __last) + return __last; + __first = ++__i; + while (__first != __last + && !bool(__binary_pred(*__first, __val))) + ++__first; + } + return __last; + } + + + + + + + + template + _RandomAccessIter + __search_n(_RandomAccessIter __first, _RandomAccessIter __last, + _Integer __count, const _Tp& __val, + _BinaryPredicate __binary_pred, std::random_access_iterator_tag) + { + + typedef typename std::iterator_traits<_RandomAccessIter>::difference_type + _DistanceType; + + _DistanceType __tailSize = __last - __first; + const _DistanceType __pattSize = __count; + + if (__tailSize < __pattSize) + return __last; + + const _DistanceType __skipOffset = __pattSize - 1; + _RandomAccessIter __lookAhead = __first + __skipOffset; + __tailSize -= __pattSize; + + while (1) + { + + + while (!bool(__binary_pred(*__lookAhead, __val))) + { + if (__tailSize < __pattSize) + return __last; + __lookAhead += __pattSize; + __tailSize -= __pattSize; + } + _DistanceType __remainder = __skipOffset; + for (_RandomAccessIter __backTrack = __lookAhead - 1; + __binary_pred(*__backTrack, __val); --__backTrack) + { + if (--__remainder == 0) + return (__lookAhead - __skipOffset); + } + if (__remainder > __tailSize) + return __last; + __lookAhead += __remainder; + __tailSize -= __remainder; + } + } + + + template + _ForwardIterator1 + __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + forward_iterator_tag, forward_iterator_tag) + { + if (__first2 == __last2) + return __last1; + else + { + _ForwardIterator1 __result = __last1; + while (1) + { + _ForwardIterator1 __new_result + = std::search(__first1, __last1, __first2, __last2); + if (__new_result == __last1) + return __result; + else + { + __result = __new_result; + __first1 = __new_result; + ++__first1; + } + } + } + } + + template + _ForwardIterator1 + __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + forward_iterator_tag, forward_iterator_tag, + _BinaryPredicate __comp) + { + if (__first2 == __last2) + return __last1; + else + { + _ForwardIterator1 __result = __last1; + while (1) + { + _ForwardIterator1 __new_result + = std::search(__first1, __last1, __first2, + __last2, __comp); + if (__new_result == __last1) + return __result; + else + { + __result = __new_result; + __first1 = __new_result; + ++__first1; + } + } + } + } + + + template + _BidirectionalIterator1 + __find_end(_BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + bidirectional_iterator_tag, bidirectional_iterator_tag) + { + + + + + + + typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; + typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; + + _RevIterator1 __rlast1(__first1); + _RevIterator2 __rlast2(__first2); + _RevIterator1 __rresult = std::search(_RevIterator1(__last1), + __rlast1, + _RevIterator2(__last2), + __rlast2); + + if (__rresult == __rlast1) + return __last1; + else + { + _BidirectionalIterator1 __result = __rresult.base(); + std::advance(__result, -std::distance(__first2, __last2)); + return __result; + } + } + + template + _BidirectionalIterator1 + __find_end(_BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + bidirectional_iterator_tag, bidirectional_iterator_tag, + _BinaryPredicate __comp) + { + + + + + + + typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; + typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; + + _RevIterator1 __rlast1(__first1); + _RevIterator2 __rlast2(__first2); + _RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1, + _RevIterator2(__last2), __rlast2, + __comp); + + if (__rresult == __rlast1) + return __last1; + else + { + _BidirectionalIterator1 __result = __rresult.base(); + std::advance(__result, -std::distance(__first2, __last2)); + return __result; + } + } +# 649 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + inline _ForwardIterator1 + find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2) + { + + + + + + + ; + ; + + return std::__find_end(__first1, __last1, __first2, __last2, + std::__iterator_category(__first1), + std::__iterator_category(__first2)); + } +# 695 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + inline _ForwardIterator1 + find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + _BinaryPredicate __comp) + { + + + + + + + ; + ; + + return std::__find_end(__first1, __last1, __first2, __last2, + std::__iterator_category(__first1), + std::__iterator_category(__first2), + __comp); + } +# 874 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + remove_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, const _Tp& __value) + { + + + + + + + ; + + for (; __first != __last; ++__first) + if (!(*__first == __value)) + { + *__result = *__first; + ++__result; + } + return __result; + } +# 911 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + remove_copy_if(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _Predicate __pred) + { + + + + + + + ; + + for (; __first != __last; ++__first) + if (!bool(__pred(*__first))) + { + *__result = *__first; + ++__result; + } + return __result; + } +# 1086 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + remove(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __value) + { + + + + + + ; + + __first = std::find(__first, __last, __value); + if(__first == __last) + return __first; + _ForwardIterator __result = __first; + ++__first; + for(; __first != __last; ++__first) + if(!(*__first == __value)) + { + *__result = (*__first); + ++__result; + } + return __result; + } +# 1129 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + remove_if(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + + + + + + ; + + __first = std::find_if(__first, __last, __pred); + if(__first == __last) + return __first; + _ForwardIterator __result = __first; + ++__first; + for(; __first != __last; ++__first) + if(!bool(__pred(*__first))) + { + *__result = (*__first); + ++__result; + } + return __result; + } +# 1169 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + unique(_ForwardIterator __first, _ForwardIterator __last) + { + + + + + + ; + + + __first = std::adjacent_find(__first, __last); + if (__first == __last) + return __last; + + + _ForwardIterator __dest = __first; + ++__first; + while (++__first != __last) + if (!(*__dest == *__first)) + *++__dest = (*__first); + return ++__dest; + } +# 1209 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + unique(_ForwardIterator __first, _ForwardIterator __last, + _BinaryPredicate __binary_pred) + { + + + + + + + ; + + + __first = std::adjacent_find(__first, __last, __binary_pred); + if (__first == __last) + return __last; + + + _ForwardIterator __dest = __first; + ++__first; + while (++__first != __last) + if (!bool(__binary_pred(*__dest, *__first))) + *++__dest = (*__first); + return ++__dest; + } + + + + + + + template + _OutputIterator + __unique_copy(_ForwardIterator __first, _ForwardIterator __last, + _OutputIterator __result, + forward_iterator_tag, output_iterator_tag) + { + + _ForwardIterator __next = __first; + *__result = *__first; + while (++__next != __last) + if (!(*__first == *__next)) + { + __first = __next; + *++__result = *__first; + } + return ++__result; + } + + + + + + + template + _OutputIterator + __unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + input_iterator_tag, output_iterator_tag) + { + + typename iterator_traits<_InputIterator>::value_type __value = *__first; + *__result = __value; + while (++__first != __last) + if (!(__value == *__first)) + { + __value = *__first; + *++__result = __value; + } + return ++__result; + } + + + + + + + template + _ForwardIterator + __unique_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, + input_iterator_tag, forward_iterator_tag) + { + + *__result = *__first; + while (++__first != __last) + if (!(*__result == *__first)) + *++__result = *__first; + return ++__result; + } + + + + + + + + template + _OutputIterator + __unique_copy(_ForwardIterator __first, _ForwardIterator __last, + _OutputIterator __result, _BinaryPredicate __binary_pred, + forward_iterator_tag, output_iterator_tag) + { + + + + + + _ForwardIterator __next = __first; + *__result = *__first; + while (++__next != __last) + if (!bool(__binary_pred(*__first, *__next))) + { + __first = __next; + *++__result = *__first; + } + return ++__result; + } + + + + + + + + template + _OutputIterator + __unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _BinaryPredicate __binary_pred, + input_iterator_tag, output_iterator_tag) + { + + + + + + typename iterator_traits<_InputIterator>::value_type __value = *__first; + *__result = __value; + while (++__first != __last) + if (!bool(__binary_pred(__value, *__first))) + { + __value = *__first; + *++__result = __value; + } + return ++__result; + } + + + + + + + + template + _ForwardIterator + __unique_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _BinaryPredicate __binary_pred, + input_iterator_tag, forward_iterator_tag) + { + + + + + + *__result = *__first; + while (++__first != __last) + if (!bool(__binary_pred(*__result, *__first))) + *++__result = *__first; + return ++__result; + } + + + + + + + template + void + __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last, + bidirectional_iterator_tag) + { + while (true) + if (__first == __last || __first == --__last) + return; + else + { + std::iter_swap(__first, __last); + ++__first; + } + } + + + + + + + template + void + __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last, + random_access_iterator_tag) + { + if (__first == __last) + return; + --__last; + while (__first < __last) + { + std::iter_swap(__first, __last); + ++__first; + --__last; + } + } +# 1437 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + inline void + reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) + { + + + + ; + std::__reverse(__first, __last, std::__iterator_category(__first)); + } +# 1464 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, + _OutputIterator __result) + { + + + + + + ; + + while (__first != __last) + { + --__last; + *__result = *__last; + ++__result; + } + return __result; + } + + + + + + template + _EuclideanRingElement + __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n) + { + while (__n != 0) + { + _EuclideanRingElement __t = __m % __n; + __m = __n; + __n = __t; + } + return __m; + } + + + template + void + __rotate(_ForwardIterator __first, + _ForwardIterator __middle, + _ForwardIterator __last, + forward_iterator_tag) + { + if (__first == __middle || __last == __middle) + return; + + _ForwardIterator __first2 = __middle; + do + { + std::iter_swap(__first, __first2); + ++__first; + ++__first2; + if (__first == __middle) + __middle = __first2; + } + while (__first2 != __last); + + __first2 = __middle; + + while (__first2 != __last) + { + std::iter_swap(__first, __first2); + ++__first; + ++__first2; + if (__first == __middle) + __middle = __first2; + else if (__first2 == __last) + __first2 = __middle; + } + } + + + template + void + __rotate(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + bidirectional_iterator_tag) + { + + + + + if (__first == __middle || __last == __middle) + return; + + std::__reverse(__first, __middle, bidirectional_iterator_tag()); + std::__reverse(__middle, __last, bidirectional_iterator_tag()); + + while (__first != __middle && __middle != __last) + { + std::iter_swap(__first, --__last); + ++__first; + } + + if (__first == __middle) + std::__reverse(__middle, __last, bidirectional_iterator_tag()); + else + std::__reverse(__first, __middle, bidirectional_iterator_tag()); + } + + + template + void + __rotate(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last, + random_access_iterator_tag) + { + + + + + if (__first == __middle || __last == __middle) + return; + + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _Distance; + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + _Distance __n = __last - __first; + _Distance __k = __middle - __first; + + if (__k == __n - __k) + { + std::swap_ranges(__first, __middle, __middle); + return; + } + + _RandomAccessIterator __p = __first; + + for (;;) + { + if (__k < __n - __k) + { + if (__is_pod(_ValueType) && __k == 1) + { + _ValueType __t = (*__p); + std::copy(__p + 1, __p + __n, __p); + *(__p + __n - 1) = (__t); + return; + } + _RandomAccessIterator __q = __p + __k; + for (_Distance __i = 0; __i < __n - __k; ++ __i) + { + std::iter_swap(__p, __q); + ++__p; + ++__q; + } + __n %= __k; + if (__n == 0) + return; + std::swap(__n, __k); + __k = __n - __k; + } + else + { + __k = __n - __k; + if (__is_pod(_ValueType) && __k == 1) + { + _ValueType __t = (*(__p + __n - 1)); + std::copy_backward(__p, __p + __n - 1, __p + __n); + *__p = (__t); + return; + } + _RandomAccessIterator __q = __p + __n; + __p = __q - __k; + for (_Distance __i = 0; __i < __n - __k; ++ __i) + { + --__p; + --__q; + std::iter_swap(__p, __q); + } + __n %= __k; + if (__n == 0) + return; + std::swap(__n, __k); + } + } + } +# 1668 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + inline void + rotate(_ForwardIterator __first, _ForwardIterator __middle, + _ForwardIterator __last) + { + + + + ; + ; + + typedef typename iterator_traits<_ForwardIterator>::iterator_category + _IterType; + std::__rotate(__first, __middle, __last, _IterType()); + } +# 1702 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, + _ForwardIterator __last, _OutputIterator __result) + { + + + + + ; + ; + + return std::copy(__first, __middle, + std::copy(__middle, __last, __result)); + } + + + template + _ForwardIterator + __partition(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred, forward_iterator_tag) + { + if (__first == __last) + return __first; + + while (__pred(*__first)) + if (++__first == __last) + return __first; + + _ForwardIterator __next = __first; + + while (++__next != __last) + if (__pred(*__next)) + { + std::iter_swap(__first, __next); + ++__first; + } + + return __first; + } + + + template + _BidirectionalIterator + __partition(_BidirectionalIterator __first, _BidirectionalIterator __last, + _Predicate __pred, bidirectional_iterator_tag) + { + while (true) + { + while (true) + if (__first == __last) + return __first; + else if (__pred(*__first)) + ++__first; + else + break; + --__last; + while (true) + if (__first == __last) + return __first; + else if (!bool(__pred(*__last))) + --__last; + else + break; + std::iter_swap(__first, __last); + ++__first; + } + } + + + + + template + _ForwardIterator + __inplace_stable_partition(_ForwardIterator __first, + _ForwardIterator __last, + _Predicate __pred, _Distance __len) + { + if (__len == 1) + return __pred(*__first) ? __last : __first; + _ForwardIterator __middle = __first; + std::advance(__middle, __len / 2); + _ForwardIterator __begin = std::__inplace_stable_partition(__first, + __middle, + __pred, + __len / 2); + _ForwardIterator __end = std::__inplace_stable_partition(__middle, __last, + __pred, + __len + - __len / 2); + std::rotate(__begin, __middle, __end); + std::advance(__begin, std::distance(__middle, __end)); + return __begin; + } + + + template + _ForwardIterator + __stable_partition_adaptive(_ForwardIterator __first, + _ForwardIterator __last, + _Predicate __pred, _Distance __len, + _Pointer __buffer, + _Distance __buffer_size) + { + if (__len <= __buffer_size) + { + _ForwardIterator __result1 = __first; + _Pointer __result2 = __buffer; + for (; __first != __last; ++__first) + if (__pred(*__first)) + { + *__result1 = (*__first); + ++__result1; + } + else + { + *__result2 = (*__first); + ++__result2; + } + std::copy(__buffer, __result2, __result1); + return __result1; + } + else + { + _ForwardIterator __middle = __first; + std::advance(__middle, __len / 2); + _ForwardIterator __begin = + std::__stable_partition_adaptive(__first, __middle, __pred, + __len / 2, __buffer, + __buffer_size); + _ForwardIterator __end = + std::__stable_partition_adaptive(__middle, __last, __pred, + __len - __len / 2, + __buffer, __buffer_size); + std::rotate(__begin, __middle, __end); + std::advance(__begin, std::distance(__middle, __end)); + return __begin; + } + } +# 1860 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + stable_partition(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + + + + + + ; + + if (__first == __last) + return __first; + else + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + _Temporary_buffer<_ForwardIterator, _ValueType> __buf(__first, + __last); + if (__buf.size() > 0) + return + std::__stable_partition_adaptive(__first, __last, __pred, + _DistanceType(__buf.requested_size()), + __buf.begin(), + _DistanceType(__buf.size())); + else + return + std::__inplace_stable_partition(__first, __last, __pred, + _DistanceType(__buf.requested_size())); + } + } + + + template + void + __heap_select(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last) + { + std::make_heap(__first, __middle); + for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) + if (*__i < *__first) + std::__pop_heap(__first, __middle, __i); + } + + + template + void + __heap_select(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last, _Compare __comp) + { + std::make_heap(__first, __middle, __comp); + for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) + if (__comp(*__i, *__first)) + std::__pop_heap(__first, __middle, __i, __comp); + } +# 1942 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _RandomAccessIterator + partial_sort_copy(_InputIterator __first, _InputIterator __last, + _RandomAccessIterator __result_first, + _RandomAccessIterator __result_last) + { + typedef typename iterator_traits<_InputIterator>::value_type + _InputValueType; + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _OutputValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + + + + + ; + ; + + if (__result_first == __result_last) + return __result_last; + _RandomAccessIterator __result_real_last = __result_first; + while(__first != __last && __result_real_last != __result_last) + { + *__result_real_last = *__first; + ++__result_real_last; + ++__first; + } + std::make_heap(__result_first, __result_real_last); + while (__first != __last) + { + if (*__first < *__result_first) + std::__adjust_heap(__result_first, _DistanceType(0), + _DistanceType(__result_real_last + - __result_first), + _InputValueType(*__first)); + ++__first; + } + std::sort_heap(__result_first, __result_real_last); + return __result_real_last; + } +# 2008 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _RandomAccessIterator + partial_sort_copy(_InputIterator __first, _InputIterator __last, + _RandomAccessIterator __result_first, + _RandomAccessIterator __result_last, + _Compare __comp) + { + typedef typename iterator_traits<_InputIterator>::value_type + _InputValueType; + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _OutputValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + + + + + + + + ; + ; + + if (__result_first == __result_last) + return __result_last; + _RandomAccessIterator __result_real_last = __result_first; + while(__first != __last && __result_real_last != __result_last) + { + *__result_real_last = *__first; + ++__result_real_last; + ++__first; + } + std::make_heap(__result_first, __result_real_last, __comp); + while (__first != __last) + { + if (__comp(*__first, *__result_first)) + std::__adjust_heap(__result_first, _DistanceType(0), + _DistanceType(__result_real_last + - __result_first), + _InputValueType(*__first), + __comp); + ++__first; + } + std::sort_heap(__result_first, __result_real_last, __comp); + return __result_real_last; + } + + + template + void + __unguarded_linear_insert(_RandomAccessIterator __last) + { + typename iterator_traits<_RandomAccessIterator>::value_type + __val = (*__last); + _RandomAccessIterator __next = __last; + --__next; + while (__val < *__next) + { + *__last = (*__next); + __last = __next; + --__next; + } + *__last = (__val); + } + + + template + void + __unguarded_linear_insert(_RandomAccessIterator __last, + _Compare __comp) + { + typename iterator_traits<_RandomAccessIterator>::value_type + __val = (*__last); + _RandomAccessIterator __next = __last; + --__next; + while (__comp(__val, *__next)) + { + *__last = (*__next); + __last = __next; + --__next; + } + *__last = (__val); + } + + + template + void + __insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last) + { + if (__first == __last) + return; + + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + { + if (*__i < *__first) + { + typename iterator_traits<_RandomAccessIterator>::value_type + __val = (*__i); + std::copy_backward(__first, __i, __i + 1); + *__first = (__val); + } + else + std::__unguarded_linear_insert(__i); + } + } + + + template + void + __insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + if (__first == __last) return; + + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + { + if (__comp(*__i, *__first)) + { + typename iterator_traits<_RandomAccessIterator>::value_type + __val = (*__i); + std::copy_backward(__first, __i, __i + 1); + *__first = (__val); + } + else + std::__unguarded_linear_insert(__i, __comp); + } + } + + + template + inline void + __unguarded_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + for (_RandomAccessIterator __i = __first; __i != __last; ++__i) + std::__unguarded_linear_insert(__i); + } + + + template + inline void + __unguarded_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + for (_RandomAccessIterator __i = __first; __i != __last; ++__i) + std::__unguarded_linear_insert(__i, __comp); + } + + + + + + enum { _S_threshold = 16 }; + + + template + void + __final_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last) + { + if (__last - __first > int(_S_threshold)) + { + std::__insertion_sort(__first, __first + int(_S_threshold)); + std::__unguarded_insertion_sort(__first + int(_S_threshold), __last); + } + else + std::__insertion_sort(__first, __last); + } + + + template + void + __final_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + if (__last - __first > int(_S_threshold)) + { + std::__insertion_sort(__first, __first + int(_S_threshold), __comp); + std::__unguarded_insertion_sort(__first + int(_S_threshold), __last, + __comp); + } + else + std::__insertion_sort(__first, __last, __comp); + } + + + template + _RandomAccessIterator + __unguarded_partition(_RandomAccessIterator __first, + _RandomAccessIterator __last, const _Tp& __pivot) + { + while (true) + { + while (*__first < __pivot) + ++__first; + --__last; + while (__pivot < *__last) + --__last; + if (!(__first < __last)) + return __first; + std::iter_swap(__first, __last); + ++__first; + } + } + + + template + _RandomAccessIterator + __unguarded_partition(_RandomAccessIterator __first, + _RandomAccessIterator __last, + const _Tp& __pivot, _Compare __comp) + { + while (true) + { + while (__comp(*__first, __pivot)) + ++__first; + --__last; + while (__comp(__pivot, *__last)) + --__last; + if (!(__first < __last)) + return __first; + std::iter_swap(__first, __last); + ++__first; + } + } + + + template + inline _RandomAccessIterator + __unguarded_partition_pivot(_RandomAccessIterator __first, + _RandomAccessIterator __last) + { + _RandomAccessIterator __mid = __first + (__last - __first) / 2; + std::__move_median_first(__first, __mid, (__last - 1)); + return std::__unguarded_partition(__first + 1, __last, *__first); + } + + + + template + inline _RandomAccessIterator + __unguarded_partition_pivot(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + _RandomAccessIterator __mid = __first + (__last - __first) / 2; + std::__move_median_first(__first, __mid, (__last - 1), __comp); + return std::__unguarded_partition(__first + 1, __last, *__first, __comp); + } + + + template + void + __introsort_loop(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Size __depth_limit) + { + while (__last - __first > int(_S_threshold)) + { + if (__depth_limit == 0) + { + std::partial_sort(__first, __last, __last); + return; + } + --__depth_limit; + _RandomAccessIterator __cut = + std::__unguarded_partition_pivot(__first, __last); + std::__introsort_loop(__cut, __last, __depth_limit); + __last = __cut; + } + } + + + template + void + __introsort_loop(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Size __depth_limit, _Compare __comp) + { + while (__last - __first > int(_S_threshold)) + { + if (__depth_limit == 0) + { + std::partial_sort(__first, __last, __last, __comp); + return; + } + --__depth_limit; + _RandomAccessIterator __cut = + std::__unguarded_partition_pivot(__first, __last, __comp); + std::__introsort_loop(__cut, __last, __depth_limit, __comp); + __last = __cut; + } + } + + + + template + void + __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last, _Size __depth_limit) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + while (__last - __first > 3) + { + if (__depth_limit == 0) + { + std::__heap_select(__first, __nth + 1, __last); + + + std::iter_swap(__first, __nth); + return; + } + --__depth_limit; + _RandomAccessIterator __cut = + std::__unguarded_partition_pivot(__first, __last); + if (__cut <= __nth) + __first = __cut; + else + __last = __cut; + } + std::__insertion_sort(__first, __last); + } + + template + void + __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last, _Size __depth_limit, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + while (__last - __first > 3) + { + if (__depth_limit == 0) + { + std::__heap_select(__first, __nth + 1, __last, __comp); + + std::iter_swap(__first, __nth); + return; + } + --__depth_limit; + _RandomAccessIterator __cut = + std::__unguarded_partition_pivot(__first, __last, __comp); + if (__cut <= __nth) + __first = __cut; + else + __last = __cut; + } + std::__insertion_sort(__first, __last, __comp); + } +# 2392 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + lower_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + + + + + ; + + _DistanceType __len = std::distance(__first, __last); + + while (__len > 0) + { + _DistanceType __half = __len >> 1; + _ForwardIterator __middle = __first; + std::advance(__middle, __half); + if (__comp(*__middle, __val)) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else + __len = __half; + } + return __first; + } +# 2439 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + upper_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + + + ; + + _DistanceType __len = std::distance(__first, __last); + + while (__len > 0) + { + _DistanceType __half = __len >> 1; + _ForwardIterator __middle = __first; + std::advance(__middle, __half); + if (__val < *__middle) + __len = __half; + else + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + } + return __first; + } +# 2488 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + upper_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + + + + + ; + + _DistanceType __len = std::distance(__first, __last); + + while (__len > 0) + { + _DistanceType __half = __len >> 1; + _ForwardIterator __middle = __first; + std::advance(__middle, __half); + if (__comp(__val, *__middle)) + __len = __half; + else + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + } + return __first; + } +# 2541 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + pair<_ForwardIterator, _ForwardIterator> + equal_range(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + + + + ; + ; + + _DistanceType __len = std::distance(__first, __last); + + while (__len > 0) + { + _DistanceType __half = __len >> 1; + _ForwardIterator __middle = __first; + std::advance(__middle, __half); + if (*__middle < __val) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else if (__val < *__middle) + __len = __half; + else + { + _ForwardIterator __left = std::lower_bound(__first, __middle, + __val); + std::advance(__first, __len); + _ForwardIterator __right = std::upper_bound(++__middle, __first, + __val); + return pair<_ForwardIterator, _ForwardIterator>(__left, __right); + } + } + return pair<_ForwardIterator, _ForwardIterator>(__first, __first); + } +# 2603 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + pair<_ForwardIterator, _ForwardIterator> + equal_range(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + + + + + + + + + ; + + ; + + _DistanceType __len = std::distance(__first, __last); + + while (__len > 0) + { + _DistanceType __half = __len >> 1; + _ForwardIterator __middle = __first; + std::advance(__middle, __half); + if (__comp(*__middle, __val)) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else if (__comp(__val, *__middle)) + __len = __half; + else + { + _ForwardIterator __left = std::lower_bound(__first, __middle, + __val, __comp); + std::advance(__first, __len); + _ForwardIterator __right = std::upper_bound(++__middle, __first, + __val, __comp); + return pair<_ForwardIterator, _ForwardIterator>(__left, __right); + } + } + return pair<_ForwardIterator, _ForwardIterator>(__first, __first); + } +# 2663 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + bool + binary_search(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + + + + ; + ; + + _ForwardIterator __i = std::lower_bound(__first, __last, __val); + return __i != __last && !(__val < *__i); + } +# 2696 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + bool + binary_search(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + + + + + + + ; + + ; + + _ForwardIterator __i = std::lower_bound(__first, __last, __val, __comp); + return __i != __last && !bool(__comp(__val, *__i)); + } + + + + + template + void + __move_merge_adaptive(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + while (__first1 != __last1 && __first2 != __last2) + { + if (*__first2 < *__first1) + { + *__result = (*__first2); + ++__first2; + } + else + { + *__result = (*__first1); + ++__first1; + } + ++__result; + } + if (__first1 != __last1) + std::copy(__first1, __last1, __result); + } + + + template + void + __move_merge_adaptive(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(*__first2, *__first1)) + { + *__result = (*__first2); + ++__first2; + } + else + { + *__result = (*__first1); + ++__first1; + } + ++__result; + } + if (__first1 != __last1) + std::copy(__first1, __last1, __result); + } + + + template + void + __move_merge_adaptive_backward(_BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + _BidirectionalIterator3 __result) + { + if (__first1 == __last1) + { + std::copy_backward(__first2, __last2, __result); + return; + } + else if (__first2 == __last2) + return; + + --__last1; + --__last2; + while (true) + { + if (*__last2 < *__last1) + { + *--__result = (*__last1); + if (__first1 == __last1) + { + std::copy_backward(__first2, ++__last2, __result); + return; + } + --__last1; + } + else + { + *--__result = (*__last2); + if (__first2 == __last2) + return; + --__last2; + } + } + } + + + template + void + __move_merge_adaptive_backward(_BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + _BidirectionalIterator3 __result, + _Compare __comp) + { + if (__first1 == __last1) + { + std::copy_backward(__first2, __last2, __result); + return; + } + else if (__first2 == __last2) + return; + + --__last1; + --__last2; + while (true) + { + if (__comp(*__last2, *__last1)) + { + *--__result = (*__last1); + if (__first1 == __last1) + { + std::copy_backward(__first2, ++__last2, __result); + return; + } + --__last1; + } + else + { + *--__result = (*__last2); + if (__first2 == __last2) + return; + --__last2; + } + } + } + + + template + _BidirectionalIterator1 + __rotate_adaptive(_BidirectionalIterator1 __first, + _BidirectionalIterator1 __middle, + _BidirectionalIterator1 __last, + _Distance __len1, _Distance __len2, + _BidirectionalIterator2 __buffer, + _Distance __buffer_size) + { + _BidirectionalIterator2 __buffer_end; + if (__len1 > __len2 && __len2 <= __buffer_size) + { + if (__len2) + { + __buffer_end = std::copy(__middle, __last, __buffer); + std::copy_backward(__first, __middle, __last); + return std::copy(__buffer, __buffer_end, __first); + } + else + return __first; + } + else if (__len1 <= __buffer_size) + { + if (__len1) + { + __buffer_end = std::copy(__first, __middle, __buffer); + std::copy(__middle, __last, __first); + return std::copy_backward(__buffer, __buffer_end, __last); + } + else + return __last; + } + else + { + std::rotate(__first, __middle, __last); + std::advance(__first, std::distance(__middle, __last)); + return __first; + } + } + + + template + void + __merge_adaptive(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Distance __len1, _Distance __len2, + _Pointer __buffer, _Distance __buffer_size) + { + if (__len1 <= __len2 && __len1 <= __buffer_size) + { + _Pointer __buffer_end = std::copy(__first, __middle, __buffer); + std::__move_merge_adaptive(__buffer, __buffer_end, __middle, __last, + __first); + } + else if (__len2 <= __buffer_size) + { + _Pointer __buffer_end = std::copy(__middle, __last, __buffer); + std::__move_merge_adaptive_backward(__first, __middle, __buffer, + __buffer_end, __last); + } + else + { + _BidirectionalIterator __first_cut = __first; + _BidirectionalIterator __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) + { + __len11 = __len1 / 2; + std::advance(__first_cut, __len11); + __second_cut = std::lower_bound(__middle, __last, + *__first_cut); + __len22 = std::distance(__middle, __second_cut); + } + else + { + __len22 = __len2 / 2; + std::advance(__second_cut, __len22); + __first_cut = std::upper_bound(__first, __middle, + *__second_cut); + __len11 = std::distance(__first, __first_cut); + } + _BidirectionalIterator __new_middle = + std::__rotate_adaptive(__first_cut, __middle, __second_cut, + __len1 - __len11, __len22, __buffer, + __buffer_size); + std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, + __len22, __buffer, __buffer_size); + std::__merge_adaptive(__new_middle, __second_cut, __last, + __len1 - __len11, + __len2 - __len22, __buffer, __buffer_size); + } + } + + + template + void + __merge_adaptive(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Distance __len1, _Distance __len2, + _Pointer __buffer, _Distance __buffer_size, + _Compare __comp) + { + if (__len1 <= __len2 && __len1 <= __buffer_size) + { + _Pointer __buffer_end = std::copy(__first, __middle, __buffer); + std::__move_merge_adaptive(__buffer, __buffer_end, __middle, __last, + __first, __comp); + } + else if (__len2 <= __buffer_size) + { + _Pointer __buffer_end = std::copy(__middle, __last, __buffer); + std::__move_merge_adaptive_backward(__first, __middle, __buffer, + __buffer_end, __last, __comp); + } + else + { + _BidirectionalIterator __first_cut = __first; + _BidirectionalIterator __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) + { + __len11 = __len1 / 2; + std::advance(__first_cut, __len11); + __second_cut = std::lower_bound(__middle, __last, *__first_cut, + __comp); + __len22 = std::distance(__middle, __second_cut); + } + else + { + __len22 = __len2 / 2; + std::advance(__second_cut, __len22); + __first_cut = std::upper_bound(__first, __middle, *__second_cut, + __comp); + __len11 = std::distance(__first, __first_cut); + } + _BidirectionalIterator __new_middle = + std::__rotate_adaptive(__first_cut, __middle, __second_cut, + __len1 - __len11, __len22, __buffer, + __buffer_size); + std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, + __len22, __buffer, __buffer_size, __comp); + std::__merge_adaptive(__new_middle, __second_cut, __last, + __len1 - __len11, + __len2 - __len22, __buffer, + __buffer_size, __comp); + } + } + + + template + void + __merge_without_buffer(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Distance __len1, _Distance __len2) + { + if (__len1 == 0 || __len2 == 0) + return; + if (__len1 + __len2 == 2) + { + if (*__middle < *__first) + std::iter_swap(__first, __middle); + return; + } + _BidirectionalIterator __first_cut = __first; + _BidirectionalIterator __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) + { + __len11 = __len1 / 2; + std::advance(__first_cut, __len11); + __second_cut = std::lower_bound(__middle, __last, *__first_cut); + __len22 = std::distance(__middle, __second_cut); + } + else + { + __len22 = __len2 / 2; + std::advance(__second_cut, __len22); + __first_cut = std::upper_bound(__first, __middle, *__second_cut); + __len11 = std::distance(__first, __first_cut); + } + std::rotate(__first_cut, __middle, __second_cut); + _BidirectionalIterator __new_middle = __first_cut; + std::advance(__new_middle, std::distance(__middle, __second_cut)); + std::__merge_without_buffer(__first, __first_cut, __new_middle, + __len11, __len22); + std::__merge_without_buffer(__new_middle, __second_cut, __last, + __len1 - __len11, __len2 - __len22); + } + + + template + void + __merge_without_buffer(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Distance __len1, _Distance __len2, + _Compare __comp) + { + if (__len1 == 0 || __len2 == 0) + return; + if (__len1 + __len2 == 2) + { + if (__comp(*__middle, *__first)) + std::iter_swap(__first, __middle); + return; + } + _BidirectionalIterator __first_cut = __first; + _BidirectionalIterator __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) + { + __len11 = __len1 / 2; + std::advance(__first_cut, __len11); + __second_cut = std::lower_bound(__middle, __last, *__first_cut, + __comp); + __len22 = std::distance(__middle, __second_cut); + } + else + { + __len22 = __len2 / 2; + std::advance(__second_cut, __len22); + __first_cut = std::upper_bound(__first, __middle, *__second_cut, + __comp); + __len11 = std::distance(__first, __first_cut); + } + std::rotate(__first_cut, __middle, __second_cut); + _BidirectionalIterator __new_middle = __first_cut; + std::advance(__new_middle, std::distance(__middle, __second_cut)); + std::__merge_without_buffer(__first, __first_cut, __new_middle, + __len11, __len22, __comp); + std::__merge_without_buffer(__new_middle, __second_cut, __last, + __len1 - __len11, __len2 - __len22, __comp); + } +# 3120 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + void + inplace_merge(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last) + { + typedef typename iterator_traits<_BidirectionalIterator>::value_type + _ValueType; + typedef typename iterator_traits<_BidirectionalIterator>::difference_type + _DistanceType; + + + + + + ; + ; + + if (__first == __middle || __middle == __last) + return; + + _DistanceType __len1 = std::distance(__first, __middle); + _DistanceType __len2 = std::distance(__middle, __last); + + _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first, + __last); + if (__buf.begin() == 0) + std::__merge_without_buffer(__first, __middle, __last, __len1, __len2); + else + std::__merge_adaptive(__first, __middle, __last, __len1, __len2, + __buf.begin(), _DistanceType(__buf.size())); + } +# 3175 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + void + inplace_merge(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_BidirectionalIterator>::value_type + _ValueType; + typedef typename iterator_traits<_BidirectionalIterator>::difference_type + _DistanceType; + + + + + + + ; + ; + + if (__first == __middle || __middle == __last) + return; + + const _DistanceType __len1 = std::distance(__first, __middle); + const _DistanceType __len2 = std::distance(__middle, __last); + + _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first, + __last); + if (__buf.begin() == 0) + std::__merge_without_buffer(__first, __middle, __last, __len1, + __len2, __comp); + else + std::__merge_adaptive(__first, __middle, __last, __len1, __len2, + __buf.begin(), _DistanceType(__buf.size()), + __comp); + } + + + + template + _OutputIterator + __move_merge(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + while (__first1 != __last1 && __first2 != __last2) + { + if (*__first2 < *__first1) + { + *__result = (*__first2); + ++__first2; + } + else + { + *__result = (*__first1); + ++__first1; + } + ++__result; + } + return std::copy(__first2, __last2, std::copy(__first1, __last1, __result)) + + ; + } + + + template + _OutputIterator + __move_merge(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(*__first2, *__first1)) + { + *__result = (*__first2); + ++__first2; + } + else + { + *__result = (*__first1); + ++__first1; + } + ++__result; + } + return std::copy(__first2, __last2, std::copy(__first1, __last1, __result)) + + ; + } + + template + void + __merge_sort_loop(_RandomAccessIterator1 __first, + _RandomAccessIterator1 __last, + _RandomAccessIterator2 __result, + _Distance __step_size) + { + const _Distance __two_step = 2 * __step_size; + + while (__last - __first >= __two_step) + { + __result = std::__move_merge(__first, __first + __step_size, + __first + __step_size, + __first + __two_step, __result); + __first += __two_step; + } + + __step_size = std::min(_Distance(__last - __first), __step_size); + std::__move_merge(__first, __first + __step_size, + __first + __step_size, __last, __result); + } + + template + void + __merge_sort_loop(_RandomAccessIterator1 __first, + _RandomAccessIterator1 __last, + _RandomAccessIterator2 __result, _Distance __step_size, + _Compare __comp) + { + const _Distance __two_step = 2 * __step_size; + + while (__last - __first >= __two_step) + { + __result = std::__move_merge(__first, __first + __step_size, + __first + __step_size, + __first + __two_step, + __result, __comp); + __first += __two_step; + } + __step_size = std::min(_Distance(__last - __first), __step_size); + + std::__move_merge(__first,__first + __step_size, + __first + __step_size, __last, __result, __comp); + } + + template + void + __chunk_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Distance __chunk_size) + { + while (__last - __first >= __chunk_size) + { + std::__insertion_sort(__first, __first + __chunk_size); + __first += __chunk_size; + } + std::__insertion_sort(__first, __last); + } + + template + void + __chunk_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Distance __chunk_size, _Compare __comp) + { + while (__last - __first >= __chunk_size) + { + std::__insertion_sort(__first, __first + __chunk_size, __comp); + __first += __chunk_size; + } + std::__insertion_sort(__first, __last, __comp); + } + + enum { _S_chunk_size = 7 }; + + template + void + __merge_sort_with_buffer(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Pointer __buffer) + { + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _Distance; + + const _Distance __len = __last - __first; + const _Pointer __buffer_last = __buffer + __len; + + _Distance __step_size = _S_chunk_size; + std::__chunk_insertion_sort(__first, __last, __step_size); + + while (__step_size < __len) + { + std::__merge_sort_loop(__first, __last, __buffer, __step_size); + __step_size *= 2; + std::__merge_sort_loop(__buffer, __buffer_last, __first, __step_size); + __step_size *= 2; + } + } + + template + void + __merge_sort_with_buffer(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Pointer __buffer, _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _Distance; + + const _Distance __len = __last - __first; + const _Pointer __buffer_last = __buffer + __len; + + _Distance __step_size = _S_chunk_size; + std::__chunk_insertion_sort(__first, __last, __step_size, __comp); + + while (__step_size < __len) + { + std::__merge_sort_loop(__first, __last, __buffer, + __step_size, __comp); + __step_size *= 2; + std::__merge_sort_loop(__buffer, __buffer_last, __first, + __step_size, __comp); + __step_size *= 2; + } + } + + template + void + __stable_sort_adaptive(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Pointer __buffer, _Distance __buffer_size) + { + const _Distance __len = (__last - __first + 1) / 2; + const _RandomAccessIterator __middle = __first + __len; + if (__len > __buffer_size) + { + std::__stable_sort_adaptive(__first, __middle, + __buffer, __buffer_size); + std::__stable_sort_adaptive(__middle, __last, + __buffer, __buffer_size); + } + else + { + std::__merge_sort_with_buffer(__first, __middle, __buffer); + std::__merge_sort_with_buffer(__middle, __last, __buffer); + } + std::__merge_adaptive(__first, __middle, __last, + _Distance(__middle - __first), + _Distance(__last - __middle), + __buffer, __buffer_size); + } + + template + void + __stable_sort_adaptive(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Pointer __buffer, _Distance __buffer_size, + _Compare __comp) + { + const _Distance __len = (__last - __first + 1) / 2; + const _RandomAccessIterator __middle = __first + __len; + if (__len > __buffer_size) + { + std::__stable_sort_adaptive(__first, __middle, __buffer, + __buffer_size, __comp); + std::__stable_sort_adaptive(__middle, __last, __buffer, + __buffer_size, __comp); + } + else + { + std::__merge_sort_with_buffer(__first, __middle, __buffer, __comp); + std::__merge_sort_with_buffer(__middle, __last, __buffer, __comp); + } + std::__merge_adaptive(__first, __middle, __last, + _Distance(__middle - __first), + _Distance(__last - __middle), + __buffer, __buffer_size, + __comp); + } + + + template + void + __inplace_stable_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last) + { + if (__last - __first < 15) + { + std::__insertion_sort(__first, __last); + return; + } + _RandomAccessIterator __middle = __first + (__last - __first) / 2; + std::__inplace_stable_sort(__first, __middle); + std::__inplace_stable_sort(__middle, __last); + std::__merge_without_buffer(__first, __middle, __last, + __middle - __first, + __last - __middle); + } + + + template + void + __inplace_stable_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + if (__last - __first < 15) + { + std::__insertion_sort(__first, __last, __comp); + return; + } + _RandomAccessIterator __middle = __first + (__last - __first) / 2; + std::__inplace_stable_sort(__first, __middle, __comp); + std::__inplace_stable_sort(__middle, __last, __comp); + std::__merge_without_buffer(__first, __middle, __last, + __middle - __first, + __last - __middle, + __comp); + } +# 3513 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + bool + includes(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + ; + ; + + while (__first1 != __last1 && __first2 != __last2) + if (*__first2 < *__first1) + return false; + else if(*__first1 < *__first2) + ++__first1; + else + ++__first1, ++__first2; + + return __first2 == __last2; + } +# 3562 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + bool + includes(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + + + ; + ; + + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first2, *__first1)) + return false; + else if(__comp(*__first1, *__first2)) + ++__first1; + else + ++__first1, ++__first2; + + return __first2 == __last2; + } +# 3617 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + bool + next_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last) + { + + + + + + ; + + if (__first == __last) + return false; + _BidirectionalIterator __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + + for(;;) + { + _BidirectionalIterator __ii = __i; + --__i; + if (*__i < *__ii) + { + _BidirectionalIterator __j = __last; + while (!(*__i < *--__j)) + {} + std::iter_swap(__i, __j); + std::reverse(__ii, __last); + return true; + } + if (__i == __first) + { + std::reverse(__first, __last); + return false; + } + } + } +# 3674 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + bool + next_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last, _Compare __comp) + { + + + + + + + ; + + if (__first == __last) + return false; + _BidirectionalIterator __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + + for(;;) + { + _BidirectionalIterator __ii = __i; + --__i; + if (__comp(*__i, *__ii)) + { + _BidirectionalIterator __j = __last; + while (!bool(__comp(*__i, *--__j))) + {} + std::iter_swap(__i, __j); + std::reverse(__ii, __last); + return true; + } + if (__i == __first) + { + std::reverse(__first, __last); + return false; + } + } + } +# 3730 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + bool + prev_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last) + { + + + + + + ; + + if (__first == __last) + return false; + _BidirectionalIterator __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + + for(;;) + { + _BidirectionalIterator __ii = __i; + --__i; + if (*__ii < *__i) + { + _BidirectionalIterator __j = __last; + while (!(*--__j < *__i)) + {} + std::iter_swap(__i, __j); + std::reverse(__ii, __last); + return true; + } + if (__i == __first) + { + std::reverse(__first, __last); + return false; + } + } + } +# 3787 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + bool + prev_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last, _Compare __comp) + { + + + + + + + ; + + if (__first == __last) + return false; + _BidirectionalIterator __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + + for(;;) + { + _BidirectionalIterator __ii = __i; + --__i; + if (__comp(*__ii, *__i)) + { + _BidirectionalIterator __j = __last; + while (!bool(__comp(*--__j, *__i))) + {} + std::iter_swap(__i, __j); + std::reverse(__ii, __last); + return true; + } + if (__i == __first) + { + std::reverse(__first, __last); + return false; + } + } + } +# 3847 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + replace_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + const _Tp& __old_value, const _Tp& __new_value) + { + + + + + + + ; + + for (; __first != __last; ++__first, ++__result) + if (*__first == __old_value) + *__result = __new_value; + else + *__result = *__first; + return __result; + } +# 3884 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + replace_copy_if(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + _Predicate __pred, const _Tp& __new_value) + { + + + + + + + ; + + for (; __first != __last; ++__first, ++__result) + if (__pred(*__first)) + *__result = __new_value; + else + *__result = *__first; + return __result; + } +# 4355 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + + + +# 4371 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _Function + for_each(_InputIterator __first, _InputIterator __last, _Function __f) + { + + + ; + for (; __first != __last; ++__first) + __f(*__first); + return (__f); + } +# 4392 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + inline _InputIterator + find(_InputIterator __first, _InputIterator __last, + const _Tp& __val) + { + + + + + ; + return std::__find(__first, __last, __val, + std::__iterator_category(__first)); + } +# 4416 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + inline _InputIterator + find_if(_InputIterator __first, _InputIterator __last, + _Predicate __pred) + { + + + + + ; + return std::__find_if(__first, __last, __pred, + std::__iterator_category(__first)); + } +# 4445 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _InputIterator + find_first_of(_InputIterator __first1, _InputIterator __last1, + _ForwardIterator __first2, _ForwardIterator __last2) + { + + + + + + + ; + ; + + for (; __first1 != __last1; ++__first1) + for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) + if (*__first1 == *__iter) + return __first1; + return __last1; + } +# 4484 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _InputIterator + find_first_of(_InputIterator __first1, _InputIterator __last1, + _ForwardIterator __first2, _ForwardIterator __last2, + _BinaryPredicate __comp) + { + + + + + + + ; + ; + + for (; __first1 != __last1; ++__first1) + for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) + if (__comp(*__first1, *__iter)) + return __first1; + return __last1; + } +# 4516 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + adjacent_find(_ForwardIterator __first, _ForwardIterator __last) + { + + + + + ; + if (__first == __last) + return __last; + _ForwardIterator __next = __first; + while(++__next != __last) + { + if (*__first == *__next) + return __first; + __first = __next; + } + return __last; + } +# 4548 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + adjacent_find(_ForwardIterator __first, _ForwardIterator __last, + _BinaryPredicate __binary_pred) + { + + + + + + ; + if (__first == __last) + return __last; + _ForwardIterator __next = __first; + while(++__next != __last) + { + if (__binary_pred(*__first, *__next)) + return __first; + __first = __next; + } + return __last; + } +# 4580 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + typename iterator_traits<_InputIterator>::difference_type + count(_InputIterator __first, _InputIterator __last, const _Tp& __value) + { + + + + + ; + typename iterator_traits<_InputIterator>::difference_type __n = 0; + for (; __first != __last; ++__first) + if (*__first == __value) + ++__n; + return __n; + } +# 4605 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + typename iterator_traits<_InputIterator>::difference_type + count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) + { + + + + + ; + typename iterator_traits<_InputIterator>::difference_type __n = 0; + for (; __first != __last; ++__first) + if (__pred(*__first)) + ++__n; + return __n; + } +# 4645 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator1 + search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2) + { + + + + + + + ; + ; + + + if (__first1 == __last1 || __first2 == __last2) + return __first1; + + + _ForwardIterator2 __p1(__first2); + if (++__p1 == __last2) + return std::find(__first1, __last1, *__first2); + + + _ForwardIterator2 __p; + _ForwardIterator1 __current = __first1; + + for (;;) + { + __first1 = std::find(__first1, __last1, *__first2); + if (__first1 == __last1) + return __last1; + + __p = __p1; + __current = __first1; + if (++__current == __last1) + return __last1; + + while (*__current == *__p) + { + if (++__p == __last2) + return __first1; + if (++__current == __last1) + return __last1; + } + ++__first1; + } + return __first1; + } +# 4716 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator1 + search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + _BinaryPredicate __predicate) + { + + + + + + + ; + ; + + + if (__first1 == __last1 || __first2 == __last2) + return __first1; + + + _ForwardIterator2 __p1(__first2); + if (++__p1 == __last2) + { + while (__first1 != __last1 + && !bool(__predicate(*__first1, *__first2))) + ++__first1; + return __first1; + } + + + _ForwardIterator2 __p; + _ForwardIterator1 __current = __first1; + + for (;;) + { + while (__first1 != __last1 + && !bool(__predicate(*__first1, *__first2))) + ++__first1; + if (__first1 == __last1) + return __last1; + + __p = __p1; + __current = __first1; + if (++__current == __last1) + return __last1; + + while (__predicate(*__current, *__p)) + { + if (++__p == __last2) + return __first1; + if (++__current == __last1) + return __last1; + } + ++__first1; + } + return __first1; + } +# 4790 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, const _Tp& __val) + { + + + + + ; + + if (__count <= 0) + return __first; + if (__count == 1) + return std::find(__first, __last, __val); + return std::__search_n(__first, __last, __count, __val, + std::__iterator_category(__first)); + } +# 4826 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, const _Tp& __val, + _BinaryPredicate __binary_pred) + { + + + + + ; + + if (__count <= 0) + return __first; + if (__count == 1) + { + while (__first != __last && !bool(__binary_pred(*__first, __val))) + ++__first; + return __first; + } + return std::__search_n(__first, __last, __count, __val, __binary_pred, + std::__iterator_category(__first)); + } +# 4868 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + transform(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _UnaryOperation __unary_op) + { + + + + + + ; + + for (; __first != __last; ++__first, ++__result) + *__result = __unary_op(*__first); + return __result; + } +# 4904 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + transform(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _OutputIterator __result, + _BinaryOperation __binary_op) + { + + + + + + + ; + + for (; __first1 != __last1; ++__first1, ++__first2, ++__result) + *__result = __binary_op(*__first1, *__first2); + return __result; + } +# 4937 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + void + replace(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __old_value, const _Tp& __new_value) + { + + + + + + + + ; + + for (; __first != __last; ++__first) + if (*__first == __old_value) + *__first = __new_value; + } +# 4969 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + void + replace_if(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred, const _Tp& __new_value) + { + + + + + + + + ; + + for (; __first != __last; ++__first) + if (__pred(*__first)) + *__first = __new_value; + } +# 5001 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + void + generate(_ForwardIterator __first, _ForwardIterator __last, + _Generator __gen) + { + + + + + ; + + for (; __first != __last; ++__first) + *__first = __gen(); + } +# 5032 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + generate_n(_OutputIterator __first, _Size __n, _Generator __gen) + { + + + + + + for (__decltype(__n + 0) __niter = __n; + __niter > 0; --__niter, ++__first) + *__first = __gen(); + return __first; + } +# 5069 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + inline _OutputIterator + unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result) + { + + + + + + + ; + + if (__first == __last) + return __result; + return std::__unique_copy(__first, __last, __result, + std::__iterator_category(__first), + std::__iterator_category(__result)); + } +# 5108 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + inline _OutputIterator + unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + _BinaryPredicate __binary_pred) + { + + + + + ; + + if (__first == __last) + return __result; + return std::__unique_copy(__first, __last, __result, __binary_pred, + std::__iterator_category(__first), + std::__iterator_category(__result)); + } +# 5140 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + inline void + random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + + + + ; + + if (__first != __last) + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + std::iter_swap(__i, __first + (std::rand() % ((__i - __first) + 1))); + } +# 5168 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + void + random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, + + + + _RandomNumberGenerator& __rand) + + { + + + + ; + + if (__first == __last) + return; + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + std::iter_swap(__i, __first + __rand((__i - __first) + 1)); + } +# 5204 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + inline _ForwardIterator + partition(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + + + + + + ; + + return std::__partition(__first, __last, __pred, + std::__iterator_category(__first)); + } +# 5238 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + inline void + partial_sort(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + + + + ; + ; + + std::__heap_select(__first, __middle, __last); + std::sort_heap(__first, __middle); + } +# 5277 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + inline void + partial_sort(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + + + + + ; + ; + + std::__heap_select(__first, __middle, __last, __comp); + std::sort_heap(__first, __middle, __comp); + } +# 5315 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + inline void + nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + + + + ; + ; + + if (__first == __last || __nth == __last) + return; + + std::__introselect(__first, __nth, __last, + std::__lg(__last - __first) * 2); + } +# 5354 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + inline void + nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last, _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + + + + + ; + ; + + if (__first == __last || __nth == __last) + return; + + std::__introselect(__first, __nth, __last, + std::__lg(__last - __first) * 2, __comp); + } +# 5392 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + inline void + sort(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + + + + ; + + if (__first != __last) + { + std::__introsort_loop(__first, __last, + std::__lg(__last - __first) * 2); + std::__final_insertion_sort(__first, __last); + } + } +# 5428 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + inline void + sort(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + + + + + + + ; + + if (__first != __last) + { + std::__introsort_loop(__first, __last, + std::__lg(__last - __first) * 2, __comp); + std::__final_insertion_sort(__first, __last, __comp); + } + } +# 5469 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + merge(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + + + + ; + ; + + while (__first1 != __last1 && __first2 != __last2) + { + if (*__first2 < *__first1) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + } + ++__result; + } + return std::copy(__first2, __last2, std::copy(__first1, __last1, + __result)); + } +# 5532 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + merge(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + + + + + ; + ; + + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(*__first2, *__first1)) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + } + ++__result; + } + return std::copy(__first2, __last2, std::copy(__first1, __last1, + __result)); + } +# 5592 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + inline void + stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + + ; + + _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first, + __last); + if (__buf.begin() == 0) + std::__inplace_stable_sort(__first, __last); + else + std::__stable_sort_adaptive(__first, __last, __buf.begin(), + _DistanceType(__buf.size())); + } +# 5634 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + inline void + stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + + + + + + + + ; + + _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first, + __last); + if (__buf.begin() == 0) + std::__inplace_stable_sort(__first, __last, __comp); + else + std::__stable_sort_adaptive(__first, __last, __buf.begin(), + _DistanceType(__buf.size()), __comp); + } +# 5680 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + set_union(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + + + + + ; + ; + + while (__first1 != __last1 && __first2 != __last2) + { + if (*__first1 < *__first2) + { + *__result = *__first1; + ++__first1; + } + else if (*__first2 < *__first1) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + ++__first2; + } + ++__result; + } + return std::copy(__first2, __last2, std::copy(__first1, __last1, + __result)); + } +# 5747 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + set_union(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + + + + + + + ; + ; + + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(*__first1, *__first2)) + { + *__result = *__first1; + ++__first1; + } + else if (__comp(*__first2, *__first1)) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + ++__first2; + } + ++__result; + } + return std::copy(__first2, __last2, std::copy(__first1, __last1, + __result)); + } +# 5814 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + + + ; + ; + + while (__first1 != __last1 && __first2 != __last2) + if (*__first1 < *__first2) + ++__first1; + else if (*__first2 < *__first1) + ++__first2; + else + { + *__result = *__first1; + ++__first1; + ++__first2; + ++__result; + } + return __result; + } +# 5871 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + + + + + ; + ; + + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first1, *__first2)) + ++__first1; + else if (__comp(*__first2, *__first1)) + ++__first2; + else + { + *__result = *__first1; + ++__first1; + ++__first2; + ++__result; + } + return __result; + } +# 5929 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + set_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + + + ; + ; + + while (__first1 != __last1 && __first2 != __last2) + if (*__first1 < *__first2) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (*__first2 < *__first1) + ++__first2; + else + { + ++__first1; + ++__first2; + } + return std::copy(__first1, __last1, __result); + } +# 5990 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + set_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + + + + + ; + ; + + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first1, *__first2)) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (__comp(*__first2, *__first1)) + ++__first2; + else + { + ++__first1; + ++__first2; + } + return std::copy(__first1, __last1, __result); + } +# 6048 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + + + + + ; + ; + + while (__first1 != __last1 && __first2 != __last2) + if (*__first1 < *__first2) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (*__first2 < *__first1) + { + *__result = *__first2; + ++__first2; + ++__result; + } + else + { + ++__first1; + ++__first2; + } + return std::copy(__first2, __last2, std::copy(__first1, + __last1, __result)); + } +# 6114 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _OutputIterator + set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, + _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + + + + + + + + + + + + + ; + ; + + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first1, *__first2)) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (__comp(*__first2, *__first1)) + { + *__result = *__first2; + ++__first2; + ++__result; + } + else + { + ++__first1; + ++__first2; + } + return std::copy(__first2, __last2, + std::copy(__first1, __last1, __result)); + } +# 6171 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + min_element(_ForwardIterator __first, _ForwardIterator __last) + { + + + + + ; + + if (__first == __last) + return __first; + _ForwardIterator __result = __first; + while (++__first != __last) + if (*__first < *__result) + __result = __first; + return __result; + } +# 6199 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + min_element(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + + + + + + ; + + if (__first == __last) + return __first; + _ForwardIterator __result = __first; + while (++__first != __last) + if (__comp(*__first, *__result)) + __result = __first; + return __result; + } +# 6227 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + max_element(_ForwardIterator __first, _ForwardIterator __last) + { + + + + + ; + + if (__first == __last) + return __first; + _ForwardIterator __result = __first; + while (++__first != __last) + if (*__result < *__first) + __result = __first; + return __result; + } +# 6255 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_algo.h" 3 + template + _ForwardIterator + max_element(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + + + + + + ; + + if (__first == __last) return __first; + _ForwardIterator __result = __first; + while (++__first != __last) + if (__comp(*__result, *__first)) + __result = __first; + return __result; + } + + +} +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/algorithm" 2 3 +# 30 "../boost/iterator/iterator_concepts.hpp" 2 + +# 1 "../boost/concept/detail/concept_def.hpp" 1 +# 32 "../boost/iterator/iterator_concepts.hpp" 2 + +namespace boost_concepts +{ + + + + + + + + template < typename Iterator > struct ReadableIterator; template < typename Iterator > struct ReadableIteratorConcept : ReadableIterator< Iterator > { }; template < typename Iterator > struct ReadableIterator + : boost::Assignable + , boost::CopyConstructible + + { + typedef typename boost::detail::iterator_traits::value_type value_type; + typedef typename boost::detail::iterator_traits::reference reference; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check50; ~ReadableIterator() + { + + value_type v = *i; + boost::ignore_unused_variable_warning(v); + } + private: + Iterator i; + }; + + template < + typename Iterator + , typename ValueType = typename boost::detail::iterator_traits::value_type + > + struct WritableIterator + : boost::CopyConstructible + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check67; ~WritableIterator() + { + *i = v; + } + private: + ValueType v; + Iterator i; + }; + + template < + typename Iterator + , typename ValueType = typename boost::detail::iterator_traits::value_type + > + struct WritableIteratorConcept : WritableIterator {}; + + template < typename Iterator > struct SwappableIterator; template < typename Iterator > struct SwappableIteratorConcept : SwappableIterator< Iterator > { }; template < typename Iterator > struct SwappableIterator + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check84; ~SwappableIterator() + { + std::iter_swap(i1, i2); + } + private: + Iterator i1; + Iterator i2; + }; + + template < typename Iterator > struct LvalueIterator; template < typename Iterator > struct LvalueIteratorConcept : LvalueIterator< Iterator > { }; template < typename Iterator > struct LvalueIterator + { + typedef typename boost::detail::iterator_traits::value_type value_type; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check97; ~LvalueIterator() + { + value_type& r = const_cast(*i); + boost::ignore_unused_variable_warning(r); + } + private: + Iterator i; + }; + + + + + + template < typename Iterator > struct IncrementableIterator; template < typename Iterator > struct IncrementableIteratorConcept : IncrementableIterator< Iterator > { }; template < typename Iterator > struct IncrementableIterator + : boost::Assignable + , boost::CopyConstructible + { + typedef typename boost::iterator_traversal::type traversal_category; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> + + + + boost_concept_check120; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check122; ~IncrementableIterator() + { + ++i; + (void)i++; + } + private: + Iterator i; + }; + + template < typename Iterator > struct SinglePassIterator; template < typename Iterator > struct SinglePassIteratorConcept : SinglePassIterator< Iterator > { }; template < typename Iterator > struct SinglePassIterator + : IncrementableIterator + , boost::EqualityComparable + + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> + + + + boost_concept_check140; + }; + + template < typename Iterator > struct ForwardTraversal; template < typename Iterator > struct ForwardTraversalConcept : ForwardTraversal< Iterator > { }; template < typename Iterator > struct ForwardTraversal + : SinglePassIterator + , boost::DefaultConstructible + { + typedef typename boost::detail::iterator_traits::difference_type difference_type; + + enum { mpl_assertion_in_line_149 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_arg( (void (*) (boost::is_integral))0, 1 ) ) ) }; + enum { mpl_assert_rel_value150 = (std::numeric_limits::is_signed == true) }; enum { mpl_assertion_in_line_150 = sizeof( boost::mpl::assertion_failed( (boost::mpl::failed ************ ( boost::mpl::assert_relation< boost::mpl::assert_::relations( sizeof( boost::mpl::assert_::arg == boost::mpl::assert_::arg ) ) , std::numeric_limits::is_signed , true >::************)) 0 ) ) }; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> + + + + boost_concept_check156; + }; + + template < typename Iterator > struct BidirectionalTraversal; template < typename Iterator > struct BidirectionalTraversalConcept : BidirectionalTraversal< Iterator > { }; template < typename Iterator > struct BidirectionalTraversal + : ForwardTraversal + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> + + + + boost_concept_check166; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check168; ~BidirectionalTraversal() + { + --i; + (void)i--; + } + private: + Iterator i; + }; + + template < typename Iterator > struct RandomAccessTraversal; template < typename Iterator > struct RandomAccessTraversalConcept : RandomAccessTraversal< Iterator > { }; template < typename Iterator > struct RandomAccessTraversal + : BidirectionalTraversal + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> + + + + boost_concept_check184; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check186; ~RandomAccessTraversal() + { + i += n; + i = i + n; + i = n + i; + i -= n; + i = i - n; + n = i - j; + } + + private: + typename BidirectionalTraversal::difference_type n; + Iterator i, j; + }; + + + + + namespace detail + { + template + void interop_single_pass_constraints(Iterator1 const& i1, Iterator2 const& i2) + { + bool b; + b = i1 == i2; + b = i1 != i2; + + b = i2 == i1; + b = i2 != i1; + boost::ignore_unused_variable_warning(b); + } + + template + void interop_rand_access_constraints( + Iterator1 const& i1, Iterator2 const& i2, + boost::random_access_traversal_tag, boost::random_access_traversal_tag) + { + bool b; + typename boost::detail::iterator_traits::difference_type n; + b = i1 < i2; + b = i1 <= i2; + b = i1 > i2; + b = i1 >= i2; + n = i1 - i2; + + b = i2 < i1; + b = i2 <= i1; + b = i2 > i1; + b = i2 >= i1; + n = i2 - i1; + boost::ignore_unused_variable_warning(b); + boost::ignore_unused_variable_warning(n); + } + + template + void interop_rand_access_constraints( + Iterator1 const&, Iterator2 const&, + boost::single_pass_traversal_tag, boost::single_pass_traversal_tag) + { } + + } + + template < typename Iterator , typename ConstIterator > struct InteroperableIterator; template < typename Iterator , typename ConstIterator > struct InteroperableIteratorConcept : InteroperableIterator< Iterator, ConstIterator > { }; template < typename Iterator , typename ConstIterator > struct InteroperableIterator + { + private: + typedef typename boost::detail::pure_traversal_tag< + typename boost::iterator_traversal< + Iterator + >::type + >::type traversal_category; + + typedef typename boost::detail::pure_traversal_tag< + typename boost::iterator_traversal< + ConstIterator + >::type + >::type const_traversal_category; + + public: + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check264; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check265; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check267; ~InteroperableIterator() + { + detail::interop_single_pass_constraints(i, ci); + detail::interop_rand_access_constraints(i, ci, traversal_category(), const_traversal_category()); + + ci = i; + } + + private: + Iterator i; + ConstIterator ci; + }; + +} + +# 1 "../boost/concept/detail/concept_undef.hpp" 1 +# 283 "../boost/iterator/iterator_concepts.hpp" 2 +# 21 "../boost/range/concepts.hpp" 2 + + + +# 1 "../boost/range/value_type.hpp" 1 +# 27 "../boost/range/value_type.hpp" +namespace boost +{ + template< class T > + struct range_value : iterator_value< typename range_iterator::type > + { }; +} +# 25 "../boost/range/concepts.hpp" 2 +# 1 "../boost/range/detail/misc_concept.hpp" 1 +# 13 "../boost/range/detail/misc_concept.hpp" +namespace boost +{ + namespace range_detail + { + template + class SameTypeConcept + { + public: + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check21; ~SameTypeConcept() + { + same_type(a,b); + } + private: + template void same_type(T,T) {} + T1 a; + T2 b; + }; + } +} +# 26 "../boost/range/concepts.hpp" 2 +# 59 "../boost/range/concepts.hpp" +namespace boost { + + namespace range_detail { +# 112 "../boost/range/concepts.hpp" + template + struct IncrementableIteratorConcept : CopyConstructible + { + + typedef typename iterator_traversal::type traversal_category; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> + + + + boost_concept_check122; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check124; ~IncrementableIteratorConcept() + { + ++i; + (void)i++; + } + private: + Iterator i; + + }; + + template + struct SinglePassIteratorConcept + : IncrementableIteratorConcept + , EqualityComparable + { + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> + + + + boost_concept_check144; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check146; ~SinglePassIteratorConcept() + { + Iterator i2(++i); + boost::ignore_unused_variable_warning(i2); + + + + + + (void)(i++); + + typename boost::detail::iterator_traits::reference r1(*i); + boost::ignore_unused_variable_warning(r1); + + typename boost::detail::iterator_traits::reference r2(*(++i)); + boost::ignore_unused_variable_warning(r2); + } + private: + Iterator i; + + }; + + template + struct ForwardIteratorConcept + : SinglePassIteratorConcept + , DefaultConstructible + { + + typedef typename boost::detail::iterator_traits::difference_type difference_type; + + enum { mpl_assertion_in_line_176 = sizeof( boost::mpl::assertion_failed( boost::mpl::assert_arg( (void (*) (is_integral))0, 1 ) ) ) }; + enum { mpl_assert_rel_value177 = (std::numeric_limits::is_signed == true) }; enum { mpl_assertion_in_line_177 = sizeof( boost::mpl::assertion_failed( (boost::mpl::failed ************ ( boost::mpl::assert_relation< boost::mpl::assert_::relations( sizeof( boost::mpl::assert_::arg == boost::mpl::assert_::arg ) ) , std::numeric_limits::is_signed , true >::************)) 0 ) ) }; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> + + + + boost_concept_check183; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check185; ~ForwardIteratorConcept() + { + + + + + Iterator i2(i++); + boost::ignore_unused_variable_warning(i2); + typename boost::detail::iterator_traits::reference r(*(i++)); + boost::ignore_unused_variable_warning(r); + } + private: + Iterator i; + + }; + + template + struct BidirectionalIteratorConcept + : ForwardIteratorConcept + { + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> + + + + boost_concept_check210; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check212; ~BidirectionalIteratorConcept() + { + --i; + (void)i--; + } + private: + Iterator i; + + }; + + template + struct RandomAccessIteratorConcept + : BidirectionalIteratorConcept + { + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> + + + + boost_concept_check231; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check233; ~RandomAccessIteratorConcept() + { + i += n; + i = i + n; + i = n + i; + i -= n; + i = i - n; + n = i - j; + } + private: + typename RandomAccessIteratorConcept::difference_type n; + Iterator i; + Iterator j; + + }; + + } + + + template + struct SinglePassRangeConcept + { + + typedef typename range_iterator::type const_iterator; + typedef typename range_iterator::type iterator; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check259; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check260; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check262; ~SinglePassRangeConcept() + { + + + + iterator i1 = boost::begin(*m_range); + iterator i2 = boost::end(*m_range); + + ignore_unused_variable_warning(i1); + ignore_unused_variable_warning(i2); + + const_constraints(*m_range); + } + + private: + void const_constraints(const T& const_range) + { + const_iterator ci1 = boost::begin(const_range); + const_iterator ci2 = boost::end(const_range); + + ignore_unused_variable_warning(ci1); + ignore_unused_variable_warning(ci2); + } + + + + + + T* m_range; + + }; + + + template + struct ForwardRangeConcept : SinglePassRangeConcept + { + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check299; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check300; + + }; + + template + struct WriteableRangeConcept + { + + typedef typename range_iterator::type iterator; + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check310; ~WriteableRangeConcept() + { + *i = v; + } + private: + iterator i; + typename range_value::type v; + + }; + + + template + struct WriteableForwardRangeConcept + : ForwardRangeConcept + , WriteableRangeConcept + { + }; + + + template + struct BidirectionalRangeConcept : ForwardRangeConcept + { + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check333; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check334; + + }; + + + template + struct WriteableBidirectionalRangeConcept + : BidirectionalRangeConcept + , WriteableRangeConcept + { + }; + + + template + struct RandomAccessRangeConcept : BidirectionalRangeConcept + { + + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check351; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check352; + + }; + + + template + struct WriteableRandomAccessRangeConcept + : RandomAccessRangeConcept + , WriteableRangeConcept + { + }; + +} +# 15 "../boost/range/algorithm/equal.hpp" 2 + + +namespace boost +{ + namespace range_detail + { + + + template< class SinglePassTraversalReadableIterator1, + class SinglePassTraversalReadableIterator2, + class IteratorCategoryTag1, + class IteratorCategoryTag2 > + inline bool equal_impl( SinglePassTraversalReadableIterator1 first1, + SinglePassTraversalReadableIterator1 last1, + SinglePassTraversalReadableIterator2 first2, + SinglePassTraversalReadableIterator2 last2, + IteratorCategoryTag1, + IteratorCategoryTag2 ) + { + do + { + + + + if (first1 == last1) + return first2 == last2; + + + + + if (first2 == last2) + return false; + + + } while(*first1++ == *first2++); + + + + return false; + } + + template< class SinglePassTraversalReadableIterator1, + class SinglePassTraversalReadableIterator2, + class IteratorCategoryTag1, + class IteratorCategoryTag2, + class BinaryPredicate > + inline bool equal_impl( SinglePassTraversalReadableIterator1 first1, + SinglePassTraversalReadableIterator1 last1, + SinglePassTraversalReadableIterator2 first2, + SinglePassTraversalReadableIterator2 last2, + BinaryPredicate pred, + IteratorCategoryTag1, + IteratorCategoryTag2 ) + { + do + { + + + + if (first1 == last1) + return first2 == last2; + + + + + if (first2 == last2) + return false; + + + } while(pred(*first1++, *first2++)); + + + + return false; + } + + + + template< class RandomAccessTraversalReadableIterator1, + class RandomAccessTraversalReadableIterator2 > + inline bool equal_impl( RandomAccessTraversalReadableIterator1 first1, + RandomAccessTraversalReadableIterator1 last1, + RandomAccessTraversalReadableIterator2 first2, + RandomAccessTraversalReadableIterator2 last2, + std::random_access_iterator_tag, + std::random_access_iterator_tag ) + { + return ((last1 - first1) == (last2 - first2)) + && std::equal(first1, last1, first2); + } + + template< class RandomAccessTraversalReadableIterator1, + class RandomAccessTraversalReadableIterator2, + class BinaryPredicate > + inline bool equal_impl( RandomAccessTraversalReadableIterator1 first1, + RandomAccessTraversalReadableIterator1 last1, + RandomAccessTraversalReadableIterator2 first2, + RandomAccessTraversalReadableIterator2 last2, + BinaryPredicate pred ) + { + return ((last1 - first1) == (last2 - first2)) + && std::equal(first1, last1, first2, pred); + } + + template< class SinglePassTraversalReadableIterator1, + class SinglePassTraversalReadableIterator2 > + inline bool equal( SinglePassTraversalReadableIterator1 first1, + SinglePassTraversalReadableIterator1 last1, + SinglePassTraversalReadableIterator2 first2, + SinglePassTraversalReadableIterator2 last2 ) + { + typename std::iterator_traits< SinglePassTraversalReadableIterator1 >::iterator_category tag1; + typename std::iterator_traits< SinglePassTraversalReadableIterator2 >::iterator_category tag2; + + return equal_impl(first1, last1, first2, last2, tag1, tag2); + } + + template< class SinglePassTraversalReadableIterator1, + class SinglePassTraversalReadableIterator2, + class BinaryPredicate > + inline bool equal( SinglePassTraversalReadableIterator1 first1, + SinglePassTraversalReadableIterator1 last1, + SinglePassTraversalReadableIterator2 first2, + SinglePassTraversalReadableIterator2 last2, + BinaryPredicate pred ) + { + typename std::iterator_traits< SinglePassTraversalReadableIterator1 >::iterator_category tag1; + typename std::iterator_traits< SinglePassTraversalReadableIterator2 >::iterator_category tag2; + + return equal_impl(first1, last1, first2, last2, pred, tag1, tag2); + } + + } + + namespace range + { +# 159 "../boost/range/algorithm/equal.hpp" + template< class SinglePassRange1, class SinglePassRange2 > + inline bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2 ) + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check162; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check163; + + return ::boost::range_detail::equal( + ::boost::begin(rng1), ::boost::end(rng1), + ::boost::begin(rng2), ::boost::end(rng2) ); + } + + + template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate > + inline bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2, + BinaryPredicate pred ) + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check175; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check176; + + return ::boost::range_detail::equal( + ::boost::begin(rng1), ::boost::end(rng1), + ::boost::begin(rng2), ::boost::end(rng2), + pred); + } + + } + using range::equal; +} +# 30 "../boost/range/iterator_range_core.hpp" 2 +# 1 "../boost/range/detail/safe_bool.hpp" 1 +# 16 "../boost/range/detail/safe_bool.hpp" +namespace boost +{ + namespace range_detail + { + +template +class safe_bool +{ +public: + typedef safe_bool this_type; +# 56 "../boost/range/detail/safe_bool.hpp" + typedef DataMemberPtr unspecified_bool_type; + static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr p) + { + return x ? p : 0; + } + +private: + safe_bool(); + safe_bool(const safe_bool&); + void operator=(const safe_bool&); + ~safe_bool(); +}; + + } +} +# 31 "../boost/range/iterator_range_core.hpp" 2 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 35 "../boost/range/iterator_range_core.hpp" 2 +# 43 "../boost/range/iterator_range_core.hpp" +namespace boost +{ + namespace iterator_range_detail + { + + + + + template + struct iterator_range_impl { + template< class ForwardRange > + static IteratorT adl_begin( ForwardRange& r ) + { + return static_cast( boost::begin( r ) ); + } + + template< class ForwardRange > + static IteratorT adl_end( ForwardRange& r ) + { + return static_cast( boost::end( r ) ); + } + }; + + template< class Left, class Right > + inline bool less_than( const Left& l, const Right& r ) + { + return std::lexicographical_compare( boost::begin(l), + boost::end(l), + boost::begin(r), + boost::end(r) ); + } + + template< class Left, class Right > + inline bool greater_than( const Left& l, const Right& r ) + { + return less_than(r,l); + } + + template< class Left, class Right > + inline bool less_or_equal_than( const Left& l, const Right& r ) + { + return !iterator_range_detail::less_than(r,l); + } + + template< class Left, class Right > + inline bool greater_or_equal_than( const Left& l, const Right& r ) + { + return !iterator_range_detail::less_than(l,r); + } + + + + template< class Left, class Right > + inline bool equal(const Left& l, const Right& r) + { + return boost::equal(l, r); + } + + struct range_tag { }; + struct const_range_tag { }; + } +# 124 "../boost/range/iterator_range_core.hpp" + template + class iterator_range + { + typedef range_detail::safe_bool< IteratorT iterator_range::* > safe_bool_t; + protected: + + typedef iterator_range_detail::iterator_range_impl impl; + public: + + typedef iterator_range type; + typedef typename safe_bool_t::unspecified_bool_type unspecified_bool_type; + + + + typedef typename + iterator_value::type value_type; + + + typedef typename + iterator_difference::type difference_type; + + + typedef std::size_t size_type; + + + typedef iterator_range this_type; + + + + + + + typedef typename + iterator_reference::type reference; + + + + + + + typedef IteratorT const_iterator; + + typedef IteratorT iterator; + + private: + typedef typename + boost::mpl::if_< boost::is_abstract, + reference, value_type >::type abstract_value_type; + + public: + iterator_range() : m_Begin( iterator() ), m_End( iterator() ) + { } + + + template< class Iterator > + iterator_range( Iterator Begin, Iterator End ) : + m_Begin(Begin), m_End(End) + {} + + + template< class Range > + iterator_range( const Range& r ) : + m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) ) + {} + + + template< class Range > + iterator_range( Range& r ) : + m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) ) + {} + + + template< class Range > + iterator_range( const Range& r, iterator_range_detail::const_range_tag ) : + m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) ) + {} + + + template< class Range > + iterator_range( Range& r, iterator_range_detail::range_tag ) : + m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) ) + {} + + + this_type& operator=( const this_type& r ) + { + m_Begin = r.begin(); + m_End = r.end(); + return *this; + } + + + template< class Iterator > + iterator_range& operator=( const iterator_range& r ) + { + m_Begin = r.begin(); + m_End = r.end(); + return *this; + } + + template< class ForwardRange > + iterator_range& operator=( ForwardRange& r ) + { + m_Begin = impl::adl_begin( r ); + m_End = impl::adl_end( r ); + return *this; + } + + template< class ForwardRange > + iterator_range& operator=( const ForwardRange& r ) + { + m_Begin = impl::adl_begin( r ); + m_End = impl::adl_end( r ); + return *this; + } + + IteratorT begin() const + { + return m_Begin; + } + + IteratorT end() const + { + return m_End; + } + + difference_type size() const + { + return m_End - m_Begin; + } + + bool empty() const + { + return m_Begin == m_End; + } + + operator unspecified_bool_type() const + { + return safe_bool_t::to_unspecified_bool(m_Begin != m_End, &iterator_range::m_Begin); + } + + bool operator!() const + { + return empty(); + } + + bool equal( const iterator_range& r ) const + { + return m_Begin == r.m_Begin && m_End == r.m_End; + } +# 310 "../boost/range/iterator_range_core.hpp" + public: + reference front() const + { + (static_cast (0)); + return *m_Begin; + } + + reference back() const + { + (static_cast (0)); + IteratorT last( m_End ); + return *--last; + } + + + void pop_front() + { + (static_cast (0)); + ++m_Begin; + } + + + void pop_back() + { + (static_cast (0)); + --m_End; + } + + reference operator[]( difference_type at ) const + { + (static_cast (0)); + return m_Begin[at]; + } + + + + + + + abstract_value_type operator()( difference_type at ) const + { + (static_cast (0)); + return m_Begin[at]; + } + + iterator_range& advance_begin( difference_type n ) + { + std::advance( m_Begin, n ); + return *this; + } + + iterator_range& advance_end( difference_type n ) + { + std::advance( m_End, n ); + return *this; + } + + private: + + IteratorT m_Begin; + IteratorT m_End; + + protected: + + + + + typedef iterator_range iterator_range_; + }; + + + + + + + + template< class IteratorT, class ForwardRange > + inline bool operator==( const ForwardRange& l, + const iterator_range& r ) + { + return boost::equal( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline bool operator!=( const ForwardRange& l, + const iterator_range& r ) + { + return !boost::equal( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline bool operator<( const ForwardRange& l, + const iterator_range& r ) + { + return iterator_range_detail::less_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline bool operator<=( const ForwardRange& l, + const iterator_range& r ) + { + return iterator_range_detail::less_or_equal_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline bool operator>( const ForwardRange& l, + const iterator_range& r ) + { + return iterator_range_detail::greater_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline bool operator>=( const ForwardRange& l, + const iterator_range& r ) + { + return iterator_range_detail::greater_or_equal_than( l, r ); + } + + + + template< class Iterator1T, class Iterator2T > + inline bool operator==( const iterator_range& l, + const iterator_range& r ) + { + return boost::equal( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline bool operator==( const iterator_range& l, + const ForwardRange& r ) + { + return boost::equal( l, r ); + } + + + template< class Iterator1T, class Iterator2T > + inline bool operator!=( const iterator_range& l, + const iterator_range& r ) + { + return !boost::equal( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline bool operator!=( const iterator_range& l, + const ForwardRange& r ) + { + return !boost::equal( l, r ); + } + + + template< class Iterator1T, class Iterator2T > + inline bool operator<( const iterator_range& l, + const iterator_range& r ) + { + return iterator_range_detail::less_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline bool operator<( const iterator_range& l, + const ForwardRange& r ) + { + return iterator_range_detail::less_than( l, r ); + } + + template< class Iterator1T, class Iterator2T > + inline bool operator<=( const iterator_range& l, + const iterator_range& r ) + { + return iterator_range_detail::less_or_equal_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline bool operator<=( const iterator_range& l, + const ForwardRange& r ) + { + return iterator_range_detail::less_or_equal_than( l, r ); + } + + template< class Iterator1T, class Iterator2T > + inline bool operator>( const iterator_range& l, + const iterator_range& r ) + { + return iterator_range_detail::greater_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline bool operator>( const iterator_range& l, + const ForwardRange& r ) + { + return iterator_range_detail::greater_than( l, r ); + } + + template< class Iterator1T, class Iterator2T > + inline bool operator>=( const iterator_range& l, + const iterator_range& r ) + { + return iterator_range_detail::greater_or_equal_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline bool operator>=( const iterator_range& l, + const ForwardRange& r ) + { + return iterator_range_detail::greater_or_equal_than( l, r ); + } +# 528 "../boost/range/iterator_range_core.hpp" + template< typename IteratorT > + inline iterator_range< IteratorT > + make_iterator_range( IteratorT Begin, IteratorT End ) + { + return iterator_range( Begin, End ); + } +# 551 "../boost/range/iterator_range_core.hpp" + template< class ForwardRange > + inline iterator_range< typename range_iterator::type > + make_iterator_range( ForwardRange& r ) + { + return iterator_range< typename range_iterator::type > + ( r, iterator_range_detail::range_tag() ); + } + + template< class ForwardRange > + inline iterator_range< typename range_iterator::type > + make_iterator_range( const ForwardRange& r ) + { + return iterator_range< typename range_iterator::type > + ( r, iterator_range_detail::const_range_tag() ); + } + + + + namespace iterator_range_detail + { + template< class Range > + inline iterator_range< typename range_iterator::type > + make_range_impl( Range& r, + typename range_difference::type advance_begin, + typename range_difference::type advance_end ) + { + + + + + + + + typename range_iterator::type + new_begin = boost::begin( r ), + new_end = boost::end( r ); + std::advance( new_begin, advance_begin ); + std::advance( new_end, advance_end ); + return make_iterator_range( new_begin, new_end ); + } + } +# 607 "../boost/range/iterator_range_core.hpp" + template< class Range > + inline iterator_range< typename range_iterator::type > + make_iterator_range( Range& r, + typename range_difference::type advance_begin, + typename range_difference::type advance_end ) + { + + return iterator_range_detail::make_range_impl( r, advance_begin, advance_end ); + } + + template< class Range > + inline iterator_range< typename range_iterator::type > + make_iterator_range( const Range& r, + typename range_difference::type advance_begin, + typename range_difference::type advance_end ) + { + + return iterator_range_detail::make_range_impl( r, advance_begin, advance_end ); + } +# 637 "../boost/range/iterator_range_core.hpp" + template< typename SeqT, typename Range > + inline SeqT copy_range( const Range& r ) + { + return SeqT( boost::begin( r ), boost::end( r ) ); + } + +} +# 14 "../boost/range/iterator_range.hpp" 2 +# 1 "../boost/range/iterator_range_io.hpp" 1 +# 41 "../boost/range/iterator_range_io.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 42 "../boost/range/iterator_range_io.hpp" 2 + +namespace boost +{ +# 54 "../boost/range/iterator_range_io.hpp" + template< typename IteratorT, typename Elem, typename Traits > + inline std::basic_ostream& operator<<( + std::basic_ostream& Os, + const iterator_range& r ) + { + std::copy( r.begin(), r.end(), + std::ostream_iterator< typename + iterator_value::type, + Elem, Traits>(Os) ); + return Os; + } +# 85 "../boost/range/iterator_range_io.hpp" +} +# 15 "../boost/range/iterator_range.hpp" 2 +# 15 "quickbook/src/iterator.hpp" 2 + + +namespace quickbook +{ + template + struct lookback_iterator + : boost::forward_iterator_helper< + lookback_iterator, + typename boost::iterator_value::type, + typename boost::iterator_difference::type, + typename boost::iterator_pointer::type, + typename boost::iterator_reference::type + > + { + lookback_iterator() {} + explicit lookback_iterator(Iterator base) + : original_(base), base_(base) {} + + friend bool operator==( + lookback_iterator const& x, + lookback_iterator const& y) + { + return x.base_ == y.base_; + } + + lookback_iterator& operator++() + { + ++base_; + return *this; + } + + typename boost::iterator_reference::type operator*() const + { + return *base_; + } + + Iterator base() const { + return base_; + } + + typedef boost::iterator_range > + lookback_range; + + lookback_range lookback() const + { + return lookback_range(base_, original_); + } + + private: + Iterator original_; + Iterator base_; + }; +} +# 15 "quickbook/src/fwd.hpp" 2 +# 1 "../boost/intrusive_ptr.hpp" 1 +# 16 "../boost/intrusive_ptr.hpp" +# 1 "../boost/smart_ptr/intrusive_ptr.hpp" 1 +# 18 "../boost/smart_ptr/intrusive_ptr.hpp" +# 1 "../boost/assert.hpp" 1 +# 50 "../boost/assert.hpp" +# 1 "/usr/include/assert.h" 1 3 4 +# 51 "../boost/assert.hpp" 2 +# 19 "../boost/smart_ptr/intrusive_ptr.hpp" 2 + +# 1 "../boost/smart_ptr/detail/sp_convertible.hpp" 1 +# 34 "../boost/smart_ptr/detail/sp_convertible.hpp" +namespace boost +{ + +namespace detail +{ + +template< class Y, class T > struct sp_convertible +{ + typedef char (&yes) [1]; + typedef char (&no) [2]; + + static yes f( T* ); + static no f( ... ); + + enum _vt { value = sizeof( (f)( static_cast(0) ) ) == sizeof(yes) }; +}; + +struct sp_empty +{ +}; + +template< bool > struct sp_enable_if_convertible_impl; + +template<> struct sp_enable_if_convertible_impl +{ + typedef sp_empty type; +}; + +template<> struct sp_enable_if_convertible_impl +{ +}; + +template< class Y, class T > struct sp_enable_if_convertible: public sp_enable_if_convertible_impl< sp_convertible< Y, T >::value > +{ +}; + +} + +} +# 21 "../boost/smart_ptr/intrusive_ptr.hpp" 2 + +# 1 "../boost/config/no_tr1/functional.hpp" 1 +# 21 "../boost/config/no_tr1/functional.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/functional" 1 3 +# 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/functional" 3 + +# 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/functional" 3 +# 22 "../boost/config/no_tr1/functional.hpp" 2 +# 23 "../boost/smart_ptr/intrusive_ptr.hpp" 2 +# 33 "../boost/smart_ptr/intrusive_ptr.hpp" +namespace boost +{ +# 51 "../boost/smart_ptr/intrusive_ptr.hpp" +template class intrusive_ptr +{ +private: + + typedef intrusive_ptr this_type; + +public: + + typedef T element_type; + + intrusive_ptr(): px( 0 ) + { + } + + intrusive_ptr( T * p, bool add_ref = true ): px( p ) + { + if( px != 0 && add_ref ) intrusive_ptr_add_ref( px ); + } + + + + template + + + intrusive_ptr( intrusive_ptr const & rhs, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) + + + + + + + : px( rhs.get() ) + { + if( px != 0 ) intrusive_ptr_add_ref( px ); + } + + + + intrusive_ptr(intrusive_ptr const & rhs): px( rhs.px ) + { + if( px != 0 ) intrusive_ptr_add_ref( px ); + } + + ~intrusive_ptr() + { + if( px != 0 ) intrusive_ptr_release( px ); + } + + + + template intrusive_ptr & operator=(intrusive_ptr const & rhs) + { + this_type(rhs).swap(*this); + return *this; + } +# 126 "../boost/smart_ptr/intrusive_ptr.hpp" + intrusive_ptr & operator=(intrusive_ptr const & rhs) + { + this_type(rhs).swap(*this); + return *this; + } + + intrusive_ptr & operator=(T * rhs) + { + this_type(rhs).swap(*this); + return *this; + } + + void reset() + { + this_type().swap( *this ); + } + + void reset( T * rhs ) + { + this_type( rhs ).swap( *this ); + } + + T * get() const + { + return px; + } + + T & operator*() const + { + (static_cast (0)); + return *px; + } + + T * operator->() const + { + (static_cast (0)); + return px; + } + + +# 1 "../boost/smart_ptr/detail/operator_bool.hpp" 1 +# 43 "../boost/smart_ptr/detail/operator_bool.hpp" + typedef T * this_type::*unspecified_bool_type; + + operator unspecified_bool_type() const + { + return px == 0? 0: &this_type::px; + } + + + + + bool operator! () const + { + return px == 0; + } +# 167 "../boost/smart_ptr/intrusive_ptr.hpp" 2 + + void swap(intrusive_ptr & rhs) + { + T * tmp = px; + px = rhs.px; + rhs.px = tmp; + } + +private: + + T * px; +}; + +template inline bool operator==(intrusive_ptr const & a, intrusive_ptr const & b) +{ + return a.get() == b.get(); +} + +template inline bool operator!=(intrusive_ptr const & a, intrusive_ptr const & b) +{ + return a.get() != b.get(); +} + +template inline bool operator==(intrusive_ptr const & a, U * b) +{ + return a.get() == b; +} + +template inline bool operator!=(intrusive_ptr const & a, U * b) +{ + return a.get() != b; +} + +template inline bool operator==(T * a, intrusive_ptr const & b) +{ + return a == b.get(); +} + +template inline bool operator!=(T * a, intrusive_ptr const & b) +{ + return a != b.get(); +} +# 221 "../boost/smart_ptr/intrusive_ptr.hpp" +template inline bool operator<(intrusive_ptr const & a, intrusive_ptr const & b) +{ + return std::less()(a.get(), b.get()); +} + +template void swap(intrusive_ptr & lhs, intrusive_ptr & rhs) +{ + lhs.swap(rhs); +} + + + +template T * get_pointer(intrusive_ptr const & p) +{ + return p.get(); +} + +template intrusive_ptr static_pointer_cast(intrusive_ptr const & p) +{ + return static_cast(p.get()); +} + +template intrusive_ptr const_pointer_cast(intrusive_ptr const & p) +{ + return const_cast(p.get()); +} + +template intrusive_ptr dynamic_pointer_cast(intrusive_ptr const & p) +{ + return dynamic_cast(p.get()); +} +# 275 "../boost/smart_ptr/intrusive_ptr.hpp" +template std::basic_ostream & operator<< (std::basic_ostream & os, intrusive_ptr const & p) + +{ + os << p.get(); + return os; +} +# 290 "../boost/smart_ptr/intrusive_ptr.hpp" +template< class T > struct hash; + +template< class T > std::size_t hash_value( boost::intrusive_ptr const & p ) +{ + return boost::hash< T* >()( p.get() ); +} + +} +# 17 "../boost/intrusive_ptr.hpp" 2 +# 16 "quickbook/src/fwd.hpp" 2 + +namespace quickbook +{ + struct actions; + struct quickbook_grammar; + struct collector; + struct id_manager; + struct section_info; + struct file; + typedef boost::intrusive_ptr file_ptr; + + typedef std::string::const_iterator string_iterator; + typedef lookback_iterator parse_iterator; + + inline void ignore_variable(void const*) {} +} +# 21 "quickbook/src/values.hpp" 2 +# 1 "quickbook/src/string_ref.hpp" 1 +# 16 "quickbook/src/string_ref.hpp" +namespace quickbook +{ + struct string_ref + : boost::less_than_comparable > > > + { + public: + typedef std::string::const_iterator iterator; + typedef std::string::const_iterator const_iterator; + + private: + iterator begin_, end_; + + public: + string_ref() : begin_(), end_() {} + + explicit string_ref(iterator b, iterator e) + : begin_(b), end_(e) {} + + explicit string_ref(std::string const& x) + : begin_(x.begin()), end_(x.end()) {} + + operator std::string() const { + return std::string(begin_, end_); + } + + iterator begin() const { return begin_; } + iterator end() const { return end_; } + + std::size_t size() const + { + return static_cast(end_ - begin_); + } + + bool empty() const + { + return begin_ == end_; + } + }; + + bool operator==(string_ref const& x, string_ref const& y); + bool operator<(string_ref const& x, string_ref const& y); + std::ostream& operator<<(std::ostream&, string_ref const& x); + + inline bool operator==(string_ref const& x, std::string const& y) + { + return x == string_ref(y); + } + + inline bool operator<(string_ref const& x, std::string const& y) + { + return x < string_ref(y); + } + + inline bool operator>(string_ref const& x, std::string const& y) + { + return x > string_ref(y); + } +} +# 22 "quickbook/src/values.hpp" 2 +# 1 "quickbook/src/files.hpp" 1 +# 15 "quickbook/src/files.hpp" +# 1 "../boost/filesystem/v3/path.hpp" 1 +# 24 "../boost/filesystem/v3/path.hpp" +# 1 "../boost/filesystem/v3/config.hpp" 1 +# 29 "../boost/filesystem/v3/config.hpp" +# 1 "../boost/system/api_config.hpp" 1 +# 30 "../boost/filesystem/v3/config.hpp" 2 +# 25 "../boost/filesystem/v3/path.hpp" 2 +# 1 "../boost/filesystem/v3/path_traits.hpp" 1 +# 22 "../boost/filesystem/v3/path_traits.hpp" +# 1 "../boost/type_traits/decay.hpp" 1 +# 15 "../boost/type_traits/decay.hpp" +# 1 "../boost/type_traits/remove_bounds.hpp" 1 +# 13 "../boost/type_traits/remove_bounds.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 14 "../boost/type_traits/remove_bounds.hpp" 2 + + + + + + + +# 1 "../boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/type_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/type_trait_def.hpp" 2 +# 22 "../boost/type_traits/remove_bounds.hpp" 2 + + + +namespace boost { + +template< typename T > struct remove_bounds { public: typedef T type; }; + + +template< typename T, std::size_t N > struct remove_bounds { public: typedef T type; }; +template< typename T, std::size_t N > struct remove_bounds { public: typedef T const type; }; +template< typename T, std::size_t N > struct remove_bounds { public: typedef T volatile type; }; +template< typename T, std::size_t N > struct remove_bounds { public: typedef T const volatile type; }; + +template< typename T > struct remove_bounds { public: typedef T type; }; +template< typename T > struct remove_bounds { public: typedef T const type; }; +template< typename T > struct remove_bounds { public: typedef T volatile type; }; +template< typename T > struct remove_bounds { public: typedef T const volatile type; }; + + + +} + + + +# 1 "../boost/type_traits/detail/type_trait_undef.hpp" 1 +# 47 "../boost/type_traits/remove_bounds.hpp" 2 +# 16 "../boost/type_traits/decay.hpp" 2 + + + + + +namespace boost +{ + + template< class T > + struct decay + { + private: + typedef typename remove_reference::type Ty; + public: + typedef typename mpl::eval_if< + is_array, + mpl::identity::type*>, + typename mpl::eval_if< + is_function, + add_pointer, + mpl::identity + > + >::type type; + }; + +} +# 23 "../boost/filesystem/v3/path_traits.hpp" 2 +# 1 "../boost/system/error_code.hpp" 1 +# 14 "../boost/system/error_code.hpp" +# 1 "../boost/system/config.hpp" 1 +# 15 "../boost/system/error_code.hpp" 2 +# 1 "../boost/cstdint.hpp" 1 +# 57 "../boost/cstdint.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stdint.h" 1 3 4 + + +# 1 "/usr/include/stdint.h" 1 3 4 +# 28 "/usr/include/stdint.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 29 "/usr/include/stdint.h" 2 3 4 +# 49 "/usr/include/stdint.h" 3 4 +typedef unsigned char uint8_t; +typedef unsigned short int uint16_t; + +typedef unsigned int uint32_t; + + + +typedef unsigned long int uint64_t; +# 66 "/usr/include/stdint.h" 3 4 +typedef signed char int_least8_t; +typedef short int int_least16_t; +typedef int int_least32_t; + +typedef long int int_least64_t; + + + + + + +typedef unsigned char uint_least8_t; +typedef unsigned short int uint_least16_t; +typedef unsigned int uint_least32_t; + +typedef unsigned long int uint_least64_t; +# 91 "/usr/include/stdint.h" 3 4 +typedef signed char int_fast8_t; + +typedef long int int_fast16_t; +typedef long int int_fast32_t; +typedef long int int_fast64_t; +# 104 "/usr/include/stdint.h" 3 4 +typedef unsigned char uint_fast8_t; + +typedef unsigned long int uint_fast16_t; +typedef unsigned long int uint_fast32_t; +typedef unsigned long int uint_fast64_t; +# 123 "/usr/include/stdint.h" 3 4 +typedef unsigned long int uintptr_t; +# 135 "/usr/include/stdint.h" 3 4 +typedef long int intmax_t; +typedef unsigned long int uintmax_t; +# 4 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stdint.h" 2 3 4 +# 58 "../boost/cstdint.hpp" 2 +# 100 "../boost/cstdint.hpp" +namespace boost +{ + + using ::int8_t; + using ::int_least8_t; + using ::int_fast8_t; + using ::uint8_t; + using ::uint_least8_t; + using ::uint_fast8_t; + + using ::int16_t; + using ::int_least16_t; + using ::int_fast16_t; + using ::uint16_t; + using ::uint_least16_t; + using ::uint_fast16_t; + + using ::int32_t; + using ::int_least32_t; + using ::int_fast32_t; + using ::uint32_t; + using ::uint_least32_t; + using ::uint_fast32_t; + + + + using ::int64_t; + using ::int_least64_t; + using ::int_fast64_t; + using ::uint64_t; + using ::uint_least64_t; + using ::uint_fast64_t; + + + + using ::intmax_t; + using ::uintmax_t; + +} +# 16 "../boost/system/error_code.hpp" 2 +# 1 "../boost/assert.hpp" 1 +# 50 "../boost/assert.hpp" +# 1 "/usr/include/assert.h" 1 3 4 +# 51 "../boost/assert.hpp" 2 +# 17 "../boost/system/error_code.hpp" 2 +# 26 "../boost/system/error_code.hpp" +# 1 "../boost/cerrno.hpp" 1 +# 13 "../boost/cerrno.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cerrno" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cerrno" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cerrno" 3 + +# 1 "/usr/include/errno.h" 1 3 4 +# 32 "/usr/include/errno.h" 3 4 +extern "C" { + + + +# 1 "/usr/include/bits/errno.h" 1 3 4 +# 25 "/usr/include/bits/errno.h" 3 4 +# 1 "/usr/include/linux/errno.h" 1 3 4 + + + +# 1 "/usr/include/asm/errno.h" 1 3 4 +# 1 "/usr/include/asm-generic/errno.h" 1 3 4 + + + +# 1 "/usr/include/asm-generic/errno-base.h" 1 3 4 +# 5 "/usr/include/asm-generic/errno.h" 2 3 4 +# 1 "/usr/include/asm/errno.h" 2 3 4 +# 5 "/usr/include/linux/errno.h" 2 3 4 +# 26 "/usr/include/bits/errno.h" 2 3 4 +# 47 "/usr/include/bits/errno.h" 3 4 +extern int *__errno_location (void) throw () __attribute__ ((__const__)); +# 37 "/usr/include/errno.h" 2 3 4 +# 55 "/usr/include/errno.h" 3 4 +extern char *program_invocation_name, *program_invocation_short_name; + + + +} +# 69 "/usr/include/errno.h" 3 4 +typedef int error_t; +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cerrno" 2 3 +# 14 "../boost/cerrno.hpp" 2 +# 27 "../boost/system/error_code.hpp" 2 + + + + + +# 1 "../boost/config/abi_prefix.hpp" 1 +# 33 "../boost/system/error_code.hpp" 2 + +namespace boost +{ + namespace system + { + + class error_code; + class error_condition; + + + + template< class T > + struct is_error_code_enum { static const bool value = false; }; + + template< class T > + struct is_error_condition_enum { static const bool value = false; }; + + + + namespace errc + { + enum errc_t + { + success = 0, + address_family_not_supported = 97, + address_in_use = 98, + address_not_available = 99, + already_connected = 106, + argument_list_too_long = 7, + argument_out_of_domain = 33, + bad_address = 14, + bad_file_descriptor = 9, + bad_message = 74, + broken_pipe = 32, + connection_aborted = 103, + connection_already_in_progress = 114, + connection_refused = 111, + connection_reset = 104, + cross_device_link = 18, + destination_address_required = 89, + device_or_resource_busy = 16, + directory_not_empty = 39, + executable_format_error = 8, + file_exists = 17, + file_too_large = 27, + filename_too_long = 36, + function_not_supported = 38, + host_unreachable = 113, + identifier_removed = 43, + illegal_byte_sequence = 84, + inappropriate_io_control_operation = 25, + interrupted = 4, + invalid_argument = 22, + invalid_seek = 29, + io_error = 5, + is_a_directory = 21, + message_size = 90, + network_down = 100, + network_reset = 102, + network_unreachable = 101, + no_buffer_space = 105, + no_child_process = 10, + no_link = 67, + no_lock_available = 37, + no_message_available = 61, + no_message = 42, + no_protocol_option = 92, + no_space_on_device = 28, + no_stream_resources = 63, + no_such_device_or_address = 6, + no_such_device = 19, + no_such_file_or_directory = 2, + no_such_process = 3, + not_a_directory = 20, + not_a_socket = 88, + not_a_stream = 60, + not_connected = 107, + not_enough_memory = 12, + not_supported = 95, + operation_canceled = 125, + operation_in_progress = 115, + operation_not_permitted = 1, + operation_not_supported = 95, + operation_would_block = 11, + owner_dead = 130, + permission_denied = 13, + protocol_error = 71, + protocol_not_supported = 93, + read_only_file_system = 30, + resource_deadlock_would_occur = 35, + resource_unavailable_try_again = 11, + result_out_of_range = 34, + state_not_recoverable = 131, + stream_timeout = 62, + text_file_busy = 26, + timed_out = 110, + too_many_files_open_in_system = 23, + too_many_files_open = 24, + too_many_links = 31, + too_many_symbolic_link_levels = 40, + value_too_large = 75, + wrong_protocol_type = 91 + }; + + } + + + namespace posix = errc; + namespace posix_error = errc; + + + template<> struct is_error_condition_enum + { static const bool value = true; }; +# 182 "../boost/system/error_code.hpp" + class error_category : public noncopyable + { + public: + virtual ~error_category(){} + + virtual const char * name() const = 0; + virtual std::string message( int ev ) const = 0; + virtual error_condition default_error_condition( int ev ) const; + virtual bool equivalent( int code, + const error_condition & condition ) const; + virtual bool equivalent( const error_code & code, + int condition ) const; + + bool operator==(const error_category & rhs) const { return this == &rhs; } + bool operator!=(const error_category & rhs) const { return this != &rhs; } + bool operator<( const error_category & rhs ) const + { + return std::less()( this, &rhs ); + } + }; + + + + const error_category & system_category(); + const error_category & generic_category(); + + + + + inline const error_category & get_system_category() { return system_category(); } + inline const error_category & get_generic_category() { return generic_category(); } + inline const error_category & get_posix_category() { return generic_category(); } + static const error_category & posix_category = generic_category(); + static const error_category & errno_ecat = generic_category(); + static const error_category & native_ecat = system_category(); + + + + + + + class error_condition + { + public: + + + error_condition() : m_val(0), m_cat(&generic_category()) {} + error_condition( int val, const error_category & cat ) : m_val(val), m_cat(&cat) {} + + template + error_condition(ErrorConditionEnum e, + typename boost::enable_if >::type* = 0) + { + *this = make_error_condition(e); + } + + + + void assign( int val, const error_category & cat ) + { + m_val = val; + m_cat = &cat; + } + + template + typename boost::enable_if, error_condition>::type & + operator=( ErrorConditionEnum val ) + { + *this = make_error_condition(val); + return *this; + } + + void clear() + { + m_val = 0; + m_cat = &generic_category(); + } + + + int value() const { return m_val; } + const error_category & category() const { return *m_cat; } + std::string message() const { return m_cat->message(value()); } + + typedef void (*unspecified_bool_type)(); + static void unspecified_bool_true() {} + + operator unspecified_bool_type() const + { + return m_val == 0 ? 0 : unspecified_bool_true; + } + + bool operator!() const + { + return m_val == 0; + } + + + + + inline friend bool operator==( const error_condition & lhs, + const error_condition & rhs ) + { + return lhs.m_cat == rhs.m_cat && lhs.m_val == rhs.m_val; + } + + inline friend bool operator<( const error_condition & lhs, + const error_condition & rhs ) + + + { + return lhs.m_cat < rhs.m_cat + || (lhs.m_cat == rhs.m_cat && lhs.m_val < rhs.m_val); + } + + private: + int m_val; + const error_category * m_cat; + + }; +# 310 "../boost/system/error_code.hpp" + class error_code + { + public: + + + error_code() : m_val(0), m_cat(&system_category()) {} + error_code( int val, const error_category & cat ) : m_val(val), m_cat(&cat) {} + + template + error_code(ErrorCodeEnum e, + typename boost::enable_if >::type* = 0) + { + *this = make_error_code(e); + } + + + void assign( int val, const error_category & cat ) + { + m_val = val; + m_cat = &cat; + } + + template + typename boost::enable_if, error_code>::type & + operator=( ErrorCodeEnum val ) + { + *this = make_error_code(val); + return *this; + } + + void clear() + { + m_val = 0; + m_cat = &system_category(); + } + + + int value() const { return m_val; } + const error_category & category() const { return *m_cat; } + error_condition default_error_condition() const { return m_cat->default_error_condition(value()); } + std::string message() const { return m_cat->message(value()); } + + typedef void (*unspecified_bool_type)(); + static void unspecified_bool_true() {} + + operator unspecified_bool_type() const + { + return m_val == 0 ? 0 : unspecified_bool_true; + } + + bool operator!() const + { + return m_val == 0; + } + + + inline friend bool operator==( const error_code & lhs, + const error_code & rhs ) + + + { + return lhs.m_cat == rhs.m_cat && lhs.m_val == rhs.m_val; + } + + inline friend bool operator<( const error_code & lhs, + const error_code & rhs ) + + + { + return lhs.m_cat < rhs.m_cat + || (lhs.m_cat == rhs.m_cat && lhs.m_val < rhs.m_val); + } + + private: + int m_val; + const error_category * m_cat; + + }; + + + + extern error_code throws; + + + + + + + } + + namespace detail { inline system::error_code * throws() { return 0; } } +# 409 "../boost/system/error_code.hpp" + inline system::error_code & throws() + { return *detail::throws(); } + + namespace system + { + + + inline bool operator!=( const error_code & lhs, + const error_code & rhs ) + { + return !(lhs == rhs); + } + + inline bool operator!=( const error_condition & lhs, + const error_condition & rhs ) + { + return !(lhs == rhs); + } + + inline bool operator==( const error_code & code, + const error_condition & condition ) + { + return code.category().equivalent( code.value(), condition ) + || condition.category().equivalent( code, condition.value() ); + } + + inline bool operator!=( const error_code & lhs, + const error_condition & rhs ) + { + return !(lhs == rhs); + } + + inline bool operator==( const error_condition & condition, + const error_code & code ) + { + return condition.category().equivalent( code, condition.value() ) + || code.category().equivalent( code.value(), condition ); + } + + inline bool operator!=( const error_condition & lhs, + const error_code & rhs ) + { + return !(lhs == rhs); + } + + + + template + inline std::basic_ostream& + operator<< (std::basic_ostream& os, error_code ec) + { + os << ec.category().name() << ':' << ec.value(); + return os; + } + + inline std::size_t hash_value( const error_code & ec ) + { + return static_cast(ec.value()) + + reinterpret_cast(&ec.category()); + } + + + + namespace errc + { + + inline error_code make_error_code( errc_t e ) + { return error_code( e, generic_category() ); } + + + inline error_condition make_error_condition( errc_t e ) + { return error_condition( e, generic_category() ); } + } + + + + inline error_condition error_category::default_error_condition( int ev ) const + { + return error_condition( ev, *this ); + } + + inline bool error_category::equivalent( int code, + const error_condition & condition ) const + { + return default_error_condition( code ) == condition; + } + + inline bool error_category::equivalent( const error_code & code, + int condition ) const + { + return *this == code.category() && code.value() == condition; + } + + } +} + +# 1 "../boost/config/abi_suffix.hpp" 1 +# 506 "../boost/system/error_code.hpp" 2 +# 24 "../boost/filesystem/v3/path_traits.hpp" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwchar" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwchar" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwchar" 3 + + + + +# 1 "/usr/include/wchar.h" 1 3 4 +# 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwchar" 2 3 +# 25 "../boost/filesystem/v3/path_traits.hpp" 2 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/vector" 1 3 +# 59 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/vector" 3 + +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/vector" 3 + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 1 3 +# 65 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + + template + struct _Vector_base + { + typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; + + struct _Vector_impl + : public _Tp_alloc_type + { + typename _Tp_alloc_type::pointer _M_start; + typename _Tp_alloc_type::pointer _M_finish; + typename _Tp_alloc_type::pointer _M_end_of_storage; + + _Vector_impl() + : _Tp_alloc_type(), _M_start(0), _M_finish(0), _M_end_of_storage(0) + { } + + _Vector_impl(_Tp_alloc_type const& __a) + : _Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0) + { } + }; + + public: + typedef _Alloc allocator_type; + + _Tp_alloc_type& + _M_get_Tp_allocator() + { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); } + + const _Tp_alloc_type& + _M_get_Tp_allocator() const + { return *static_cast(&this->_M_impl); } + + allocator_type + get_allocator() const + { return allocator_type(_M_get_Tp_allocator()); } + + _Vector_base() + : _M_impl() { } + + _Vector_base(const allocator_type& __a) + : _M_impl(__a) { } + + _Vector_base(size_t __n) + : _M_impl() + { + this->_M_impl._M_start = this->_M_allocate(__n); + this->_M_impl._M_finish = this->_M_impl._M_start; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + } + + _Vector_base(size_t __n, const allocator_type& __a) + : _M_impl(__a) + { + this->_M_impl._M_start = this->_M_allocate(__n); + this->_M_impl._M_finish = this->_M_impl._M_start; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + } +# 141 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + ~_Vector_base() + { _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); } + + public: + _Vector_impl _M_impl; + + typename _Tp_alloc_type::pointer + _M_allocate(size_t __n) + { return __n != 0 ? _M_impl.allocate(__n) : 0; } + + void + _M_deallocate(typename _Tp_alloc_type::pointer __p, size_t __n) + { + if (__p) + _M_impl.deallocate(__p, __n); + } + }; +# 179 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + template > + class vector : protected _Vector_base<_Tp, _Alloc> + { + + typedef typename _Alloc::value_type _Alloc_value_type; + + + + typedef _Vector_base<_Tp, _Alloc> _Base; + typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; + + public: + typedef _Tp value_type; + typedef typename _Tp_alloc_type::pointer pointer; + typedef typename _Tp_alloc_type::const_pointer const_pointer; + typedef typename _Tp_alloc_type::reference reference; + typedef typename _Tp_alloc_type::const_reference const_reference; + typedef __gnu_cxx::__normal_iterator iterator; + typedef __gnu_cxx::__normal_iterator + const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Alloc allocator_type; + + protected: + using _Base::_M_allocate; + using _Base::_M_deallocate; + using _Base::_M_impl; + using _Base::_M_get_Tp_allocator; + + public: + + + + + + vector() + : _Base() { } + + + + + + explicit + vector(const allocator_type& __a) + : _Base(__a) { } +# 262 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + explicit + vector(size_type __n, const value_type& __value = value_type(), + const allocator_type& __a = allocator_type()) + : _Base(__n, __a) + { _M_fill_initialize(__n, __value); } +# 278 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + vector(const vector& __x) + : _Base(__x.size(), __x._M_get_Tp_allocator()) + { this->_M_impl._M_finish = + std::__uninitialized_copy_a(__x.begin(), __x.end(), + this->_M_impl._M_start, + _M_get_Tp_allocator()); + } +# 333 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + template + vector(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_initialize_dispatch(__first, __last, _Integral()); + } + + + + + + + + ~vector() + { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); } +# 361 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + vector& + operator=(const vector& __x); +# 411 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + void + assign(size_type __n, const value_type& __val) + { _M_fill_assign(__n, __val); } +# 427 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + template + void + assign(_InputIterator __first, _InputIterator __last) + { + + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } +# 454 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + using _Base::get_allocator; + + + + + + + + iterator + begin() + { return iterator(this->_M_impl._M_start); } + + + + + + + const_iterator + begin() const + { return const_iterator(this->_M_impl._M_start); } + + + + + + + iterator + end() + { return iterator(this->_M_impl._M_finish); } + + + + + + + const_iterator + end() const + { return const_iterator(this->_M_impl._M_finish); } + + + + + + + reverse_iterator + rbegin() + { return reverse_iterator(end()); } + + + + + + + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(end()); } + + + + + + + reverse_iterator + rend() + { return reverse_iterator(begin()); } + + + + + + + const_reverse_iterator + rend() const + { return const_reverse_iterator(begin()); } +# 569 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + size_type + size() const + { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); } + + + size_type + max_size() const + { return _M_get_Tp_allocator().max_size(); } +# 628 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + void + resize(size_type __new_size, value_type __x = value_type()) + { + if (__new_size > size()) + insert(end(), __new_size - size(), __x); + else if (__new_size < size()) + _M_erase_at_end(this->_M_impl._M_start + __new_size); + } +# 649 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + size_type + capacity() const + { return size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); } + + + + + + bool + empty() const + { return begin() == end(); } +# 679 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + void + reserve(size_type __n); +# 694 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + reference + operator[](size_type __n) + { return *(this->_M_impl._M_start + __n); } +# 709 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + const_reference + operator[](size_type __n) const + { return *(this->_M_impl._M_start + __n); } + + protected: + + void + _M_range_check(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range(("vector::_M_range_check")); + } + + public: +# 734 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + reference + at(size_type __n) + { + _M_range_check(__n); + return (*this)[__n]; + } +# 752 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + const_reference + at(size_type __n) const + { + _M_range_check(__n); + return (*this)[__n]; + } + + + + + + reference + front() + { return *begin(); } + + + + + + const_reference + front() const + { return *begin(); } + + + + + + reference + back() + { return *(end() - 1); } + + + + + + const_reference + back() const + { return *(end() - 1); } +# 801 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + pointer + + data() + { return std::__addressof(front()); } + + + + + const_pointer + + data() const + { return std::__addressof(front()); } +# 825 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + void + push_back(const value_type& __x) + { + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + { + this->_M_impl.construct(this->_M_impl._M_finish, __x); + ++this->_M_impl._M_finish; + } + else + _M_insert_aux(end(), __x); + } +# 856 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + void + pop_back() + { + --this->_M_impl._M_finish; + this->_M_impl.destroy(this->_M_impl._M_finish); + } +# 892 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + iterator + insert(iterator __position, const value_type& __x); +# 942 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + void + insert(iterator __position, size_type __n, const value_type& __x) + { _M_fill_insert(__position, __n, __x); } +# 960 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + template + void + insert(iterator __position, _InputIterator __first, + _InputIterator __last) + { + + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_insert_dispatch(__position, __first, __last, _Integral()); + } +# 985 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + iterator + erase(iterator __position); +# 1006 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + iterator + erase(iterator __first, iterator __last); +# 1018 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + void + swap(vector& __x) + { + std::swap(this->_M_impl._M_start, __x._M_impl._M_start); + std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); + std::swap(this->_M_impl._M_end_of_storage, + __x._M_impl._M_end_of_storage); + + + + std::__alloc_swap<_Tp_alloc_type>::_S_do_it(_M_get_Tp_allocator(), + __x._M_get_Tp_allocator()); + } + + + + + + + + void + clear() + { _M_erase_at_end(this->_M_impl._M_start); } + + protected: + + + + + template + pointer + _M_allocate_and_copy(size_type __n, + _ForwardIterator __first, _ForwardIterator __last) + { + pointer __result = this->_M_allocate(__n); + try + { + std::__uninitialized_copy_a(__first, __last, __result, + _M_get_Tp_allocator()); + return __result; + } + catch(...) + { + _M_deallocate(__result, __n); + throw; + } + } +# 1073 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + template + void + _M_initialize_dispatch(_Integer __n, _Integer __value, __true_type) + { + this->_M_impl._M_start = _M_allocate(static_cast(__n)); + this->_M_impl._M_end_of_storage = + this->_M_impl._M_start + static_cast(__n); + _M_fill_initialize(static_cast(__n), __value); + } + + + template + void + _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { + typedef typename std::iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_range_initialize(__first, __last, _IterCategory()); + } + + + template + void + _M_range_initialize(_InputIterator __first, + _InputIterator __last, std::input_iterator_tag) + { + for (; __first != __last; ++__first) + push_back(*__first); + } + + + template + void + _M_range_initialize(_ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag) + { + const size_type __n = std::distance(__first, __last); + this->_M_impl._M_start = this->_M_allocate(__n); + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + this->_M_impl._M_finish = + std::__uninitialized_copy_a(__first, __last, + this->_M_impl._M_start, + _M_get_Tp_allocator()); + } + + + + void + _M_fill_initialize(size_type __n, const value_type& __value) + { + std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value, + _M_get_Tp_allocator()); + this->_M_impl._M_finish = this->_M_impl._M_end_of_storage; + } +# 1147 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + template + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } + + + template + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { + typedef typename std::iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_assign_aux(__first, __last, _IterCategory()); + } + + + template + void + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag); + + + template + void + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag); + + + + void + _M_fill_assign(size_type __n, const value_type& __val); +# 1187 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + template + void + _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, + __true_type) + { _M_fill_insert(__pos, __n, __val); } + + + template + void + _M_insert_dispatch(iterator __pos, _InputIterator __first, + _InputIterator __last, __false_type) + { + typedef typename std::iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_range_insert(__pos, __first, __last, _IterCategory()); + } + + + template + void + _M_range_insert(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag); + + + template + void + _M_range_insert(iterator __pos, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag); + + + + void + _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); +# 1229 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + void + _M_insert_aux(iterator __position, const value_type& __x); + + + + + + + + size_type + _M_check_len(size_type __n, const char* __s) const + { + if (max_size() - size() < __n) + __throw_length_error((__s)); + + const size_type __len = size() + std::max(size(), __n); + return (__len < size() || __len > max_size()) ? max_size() : __len; + } + + + + + + void + _M_erase_at_end(pointer __pos) + { + std::_Destroy(__pos, this->_M_impl._M_finish, _M_get_Tp_allocator()); + this->_M_impl._M_finish = __pos; + } + }; +# 1271 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + template + inline bool + operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return (__x.size() == __y.size() + && std::equal(__x.begin(), __x.end(), __y.begin())); } +# 1288 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_vector.h" 3 + template + inline bool + operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return std::lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); } + + + template + inline bool + operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return !(__x == __y); } + + + template + inline bool + operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return __y < __x; } + + + template + inline bool + operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return !(__y < __x); } + + + template + inline bool + operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return !(__x < __y); } + + + template + inline void + swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) + { __x.swap(__y); } + + +} +# 66 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/vector" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_bvector.h" 1 3 +# 62 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_bvector.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + typedef unsigned long _Bit_type; + enum { _S_word_bit = int(8 * sizeof(_Bit_type)) }; + + struct _Bit_reference + { + _Bit_type * _M_p; + _Bit_type _M_mask; + + _Bit_reference(_Bit_type * __x, _Bit_type __y) + : _M_p(__x), _M_mask(__y) { } + + _Bit_reference() : _M_p(0), _M_mask(0) { } + + operator bool() const + { return !!(*_M_p & _M_mask); } + + _Bit_reference& + operator=(bool __x) + { + if (__x) + *_M_p |= _M_mask; + else + *_M_p &= ~_M_mask; + return *this; + } + + _Bit_reference& + operator=(const _Bit_reference& __x) + { return *this = bool(__x); } + + bool + operator==(const _Bit_reference& __x) const + { return bool(*this) == bool(__x); } + + bool + operator<(const _Bit_reference& __x) const + { return !bool(*this) && bool(__x); } + + void + flip() + { *_M_p ^= _M_mask; } + }; + + struct _Bit_iterator_base + : public std::iterator + { + _Bit_type * _M_p; + unsigned int _M_offset; + + _Bit_iterator_base(_Bit_type * __x, unsigned int __y) + : _M_p(__x), _M_offset(__y) { } + + void + _M_bump_up() + { + if (_M_offset++ == int(_S_word_bit) - 1) + { + _M_offset = 0; + ++_M_p; + } + } + + void + _M_bump_down() + { + if (_M_offset-- == 0) + { + _M_offset = int(_S_word_bit) - 1; + --_M_p; + } + } + + void + _M_incr(ptrdiff_t __i) + { + difference_type __n = __i + _M_offset; + _M_p += __n / int(_S_word_bit); + __n = __n % int(_S_word_bit); + if (__n < 0) + { + __n += int(_S_word_bit); + --_M_p; + } + _M_offset = static_cast(__n); + } + + bool + operator==(const _Bit_iterator_base& __i) const + { return _M_p == __i._M_p && _M_offset == __i._M_offset; } + + bool + operator<(const _Bit_iterator_base& __i) const + { + return _M_p < __i._M_p + || (_M_p == __i._M_p && _M_offset < __i._M_offset); + } + + bool + operator!=(const _Bit_iterator_base& __i) const + { return !(*this == __i); } + + bool + operator>(const _Bit_iterator_base& __i) const + { return __i < *this; } + + bool + operator<=(const _Bit_iterator_base& __i) const + { return !(__i < *this); } + + bool + operator>=(const _Bit_iterator_base& __i) const + { return !(*this < __i); } + }; + + inline ptrdiff_t + operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) + { + return (int(_S_word_bit) * (__x._M_p - __y._M_p) + + __x._M_offset - __y._M_offset); + } + + struct _Bit_iterator : public _Bit_iterator_base + { + typedef _Bit_reference reference; + typedef _Bit_reference* pointer; + typedef _Bit_iterator iterator; + + _Bit_iterator() : _Bit_iterator_base(0, 0) { } + + _Bit_iterator(_Bit_type * __x, unsigned int __y) + : _Bit_iterator_base(__x, __y) { } + + reference + operator*() const + { return reference(_M_p, 1UL << _M_offset); } + + iterator& + operator++() + { + _M_bump_up(); + return *this; + } + + iterator + operator++(int) + { + iterator __tmp = *this; + _M_bump_up(); + return __tmp; + } + + iterator& + operator--() + { + _M_bump_down(); + return *this; + } + + iterator + operator--(int) + { + iterator __tmp = *this; + _M_bump_down(); + return __tmp; + } + + iterator& + operator+=(difference_type __i) + { + _M_incr(__i); + return *this; + } + + iterator& + operator-=(difference_type __i) + { + *this += -__i; + return *this; + } + + iterator + operator+(difference_type __i) const + { + iterator __tmp = *this; + return __tmp += __i; + } + + iterator + operator-(difference_type __i) const + { + iterator __tmp = *this; + return __tmp -= __i; + } + + reference + operator[](difference_type __i) const + { return *(*this + __i); } + }; + + inline _Bit_iterator + operator+(ptrdiff_t __n, const _Bit_iterator& __x) + { return __x + __n; } + + struct _Bit_const_iterator : public _Bit_iterator_base + { + typedef bool reference; + typedef bool const_reference; + typedef const bool* pointer; + typedef _Bit_const_iterator const_iterator; + + _Bit_const_iterator() : _Bit_iterator_base(0, 0) { } + + _Bit_const_iterator(_Bit_type * __x, unsigned int __y) + : _Bit_iterator_base(__x, __y) { } + + _Bit_const_iterator(const _Bit_iterator& __x) + : _Bit_iterator_base(__x._M_p, __x._M_offset) { } + + const_reference + operator*() const + { return _Bit_reference(_M_p, 1UL << _M_offset); } + + const_iterator& + operator++() + { + _M_bump_up(); + return *this; + } + + const_iterator + operator++(int) + { + const_iterator __tmp = *this; + _M_bump_up(); + return __tmp; + } + + const_iterator& + operator--() + { + _M_bump_down(); + return *this; + } + + const_iterator + operator--(int) + { + const_iterator __tmp = *this; + _M_bump_down(); + return __tmp; + } + + const_iterator& + operator+=(difference_type __i) + { + _M_incr(__i); + return *this; + } + + const_iterator& + operator-=(difference_type __i) + { + *this += -__i; + return *this; + } + + const_iterator + operator+(difference_type __i) const + { + const_iterator __tmp = *this; + return __tmp += __i; + } + + const_iterator + operator-(difference_type __i) const + { + const_iterator __tmp = *this; + return __tmp -= __i; + } + + const_reference + operator[](difference_type __i) const + { return *(*this + __i); } + }; + + inline _Bit_const_iterator + operator+(ptrdiff_t __n, const _Bit_const_iterator& __x) + { return __x + __n; } + + inline void + __fill_bvector(_Bit_iterator __first, _Bit_iterator __last, bool __x) + { + for (; __first != __last; ++__first) + *__first = __x; + } + + inline void + fill(_Bit_iterator __first, _Bit_iterator __last, const bool& __x) + { + if (__first._M_p != __last._M_p) + { + std::fill(__first._M_p + 1, __last._M_p, __x ? ~0 : 0); + __fill_bvector(__first, _Bit_iterator(__first._M_p + 1, 0), __x); + __fill_bvector(_Bit_iterator(__last._M_p, 0), __last, __x); + } + else + __fill_bvector(__first, __last, __x); + } + + template + struct _Bvector_base + { + typedef typename _Alloc::template rebind<_Bit_type>::other + _Bit_alloc_type; + + struct _Bvector_impl + : public _Bit_alloc_type + { + _Bit_iterator _M_start; + _Bit_iterator _M_finish; + _Bit_type* _M_end_of_storage; + + _Bvector_impl() + : _Bit_alloc_type(), _M_start(), _M_finish(), _M_end_of_storage(0) + { } + + _Bvector_impl(const _Bit_alloc_type& __a) + : _Bit_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage(0) + { } + }; + + public: + typedef _Alloc allocator_type; + + _Bit_alloc_type& + _M_get_Bit_allocator() + { return *static_cast<_Bit_alloc_type*>(&this->_M_impl); } + + const _Bit_alloc_type& + _M_get_Bit_allocator() const + { return *static_cast(&this->_M_impl); } + + allocator_type + get_allocator() const + { return allocator_type(_M_get_Bit_allocator()); } + + _Bvector_base() + : _M_impl() { } + + _Bvector_base(const allocator_type& __a) + : _M_impl(__a) { } +# 431 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_bvector.h" 3 + ~_Bvector_base() + { this->_M_deallocate(); } + + protected: + _Bvector_impl _M_impl; + + _Bit_type* + _M_allocate(size_t __n) + { return _M_impl.allocate((__n + int(_S_word_bit) - 1) + / int(_S_word_bit)); } + + void + _M_deallocate() + { + if (_M_impl._M_start._M_p) + _M_impl.deallocate(_M_impl._M_start._M_p, + _M_impl._M_end_of_storage - _M_impl._M_start._M_p); + } + }; + + +} + + + + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 478 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_bvector.h" 3 +template + class vector : protected _Bvector_base<_Alloc> + { + typedef _Bvector_base<_Alloc> _Base; + + + + + + public: + typedef bool value_type; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Bit_reference reference; + typedef bool const_reference; + typedef _Bit_reference* pointer; + typedef const bool* const_pointer; + typedef _Bit_iterator iterator; + typedef _Bit_const_iterator const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef _Alloc allocator_type; + + allocator_type get_allocator() const + { return _Base::get_allocator(); } + + protected: + using _Base::_M_allocate; + using _Base::_M_deallocate; + using _Base::_M_get_Bit_allocator; + + public: + vector() + : _Base() { } + + explicit + vector(const allocator_type& __a) + : _Base(__a) { } + + explicit + vector(size_type __n, const bool& __value = bool(), + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + _M_initialize(__n); + std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage, + __value ? ~0 : 0); + } + + vector(const vector& __x) + : _Base(__x._M_get_Bit_allocator()) + { + _M_initialize(__x.size()); + _M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start); + } +# 547 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_bvector.h" 3 + template + vector(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_initialize_dispatch(__first, __last, _Integral()); + } + + ~vector() { } + + vector& + operator=(const vector& __x) + { + if (&__x == this) + return *this; + if (__x.size() > capacity()) + { + this->_M_deallocate(); + _M_initialize(__x.size()); + } + this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(), + begin()); + return *this; + } +# 596 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_bvector.h" 3 + void + assign(size_type __n, const bool& __x) + { _M_fill_assign(__n, __x); } + + template + void + assign(_InputIterator __first, _InputIterator __last) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } + + + + + + + + iterator + begin() + { return this->_M_impl._M_start; } + + const_iterator + begin() const + { return this->_M_impl._M_start; } + + iterator + end() + { return this->_M_impl._M_finish; } + + const_iterator + end() const + { return this->_M_impl._M_finish; } + + reverse_iterator + rbegin() + { return reverse_iterator(end()); } + + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(end()); } + + reverse_iterator + rend() + { return reverse_iterator(begin()); } + + const_reverse_iterator + rend() const + { return const_reverse_iterator(begin()); } +# 664 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_bvector.h" 3 + size_type + size() const + { return size_type(end() - begin()); } + + size_type + max_size() const + { + const size_type __isize = + __gnu_cxx::__numeric_traits::__max + - int(_S_word_bit) + 1; + const size_type __asize = _M_get_Bit_allocator().max_size(); + return (__asize <= __isize / int(_S_word_bit) + ? __asize * int(_S_word_bit) : __isize); + } + + size_type + capacity() const + { return size_type(const_iterator(this->_M_impl._M_end_of_storage, 0) + - begin()); } + + bool + empty() const + { return begin() == end(); } + + reference + operator[](size_type __n) + { + return *iterator(this->_M_impl._M_start._M_p + + __n / int(_S_word_bit), __n % int(_S_word_bit)); + } + + const_reference + operator[](size_type __n) const + { + return *const_iterator(this->_M_impl._M_start._M_p + + __n / int(_S_word_bit), __n % int(_S_word_bit)); + } + + protected: + void + _M_range_check(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range(("vector::_M_range_check")); + } + + public: + reference + at(size_type __n) + { _M_range_check(__n); return (*this)[__n]; } + + const_reference + at(size_type __n) const + { _M_range_check(__n); return (*this)[__n]; } + + void + reserve(size_type __n); + + reference + front() + { return *begin(); } + + const_reference + front() const + { return *begin(); } + + reference + back() + { return *(end() - 1); } + + const_reference + back() const + { return *(end() - 1); } + + + + + + + void + data() { } + + void + push_back(bool __x) + { + if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage) + *this->_M_impl._M_finish++ = __x; + else + _M_insert_aux(end(), __x); + } + + void + swap(vector& __x) + { + std::swap(this->_M_impl._M_start, __x._M_impl._M_start); + std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); + std::swap(this->_M_impl._M_end_of_storage, + __x._M_impl._M_end_of_storage); + + + + std::__alloc_swap:: + _S_do_it(_M_get_Bit_allocator(), __x._M_get_Bit_allocator()); + } + + + static void + swap(reference __x, reference __y) + { + bool __tmp = __x; + __x = __y; + __y = __tmp; + } + + iterator + insert(iterator __position, const bool& __x = bool()) + { + const difference_type __n = __position - begin(); + if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage + && __position == end()) + *this->_M_impl._M_finish++ = __x; + else + _M_insert_aux(__position, __x); + return begin() + __n; + } + + template + void + insert(iterator __position, + _InputIterator __first, _InputIterator __last) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_insert_dispatch(__position, __first, __last, _Integral()); + } + + void + insert(iterator __position, size_type __n, const bool& __x) + { _M_fill_insert(__position, __n, __x); } + + + + + + + void + pop_back() + { --this->_M_impl._M_finish; } + + iterator + erase(iterator __position) + { + if (__position + 1 != end()) + std::copy(__position + 1, end(), __position); + --this->_M_impl._M_finish; + return __position; + } + + iterator + erase(iterator __first, iterator __last) + { + if (__first != __last) + _M_erase_at_end(std::copy(__last, end(), __first)); + return __first; + } + + void + resize(size_type __new_size, bool __x = bool()) + { + if (__new_size < size()) + _M_erase_at_end(begin() + difference_type(__new_size)); + else + insert(end(), __new_size - size(), __x); + } + + + + + + + + void + flip() + { + for (_Bit_type * __p = this->_M_impl._M_start._M_p; + __p != this->_M_impl._M_end_of_storage; ++__p) + *__p = ~*__p; + } + + void + clear() + { _M_erase_at_end(begin()); } + + + protected: + + iterator + _M_copy_aligned(const_iterator __first, const_iterator __last, + iterator __result) + { + _Bit_type* __q = std::copy(__first._M_p, __last._M_p, __result._M_p); + return std::copy(const_iterator(__last._M_p, 0), __last, + iterator(__q, 0)); + } + + void + _M_initialize(size_type __n) + { + _Bit_type* __q = this->_M_allocate(__n); + this->_M_impl._M_end_of_storage = (__q + + ((__n + int(_S_word_bit) - 1) + / int(_S_word_bit))); + this->_M_impl._M_start = iterator(__q, 0); + this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n); + } + + + + + + template + void + _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) + { + _M_initialize(static_cast(__n)); + std::fill(this->_M_impl._M_start._M_p, + this->_M_impl._M_end_of_storage, __x ? ~0 : 0); + } + + template + void + _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { _M_initialize_range(__first, __last, + std::__iterator_category(__first)); } + + template + void + _M_initialize_range(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + for (; __first != __last; ++__first) + push_back(*__first); + } + + template + void + _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __n = std::distance(__first, __last); + _M_initialize(__n); + std::copy(__first, __last, this->_M_impl._M_start); + } + + + + template + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } + + template + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } + + void + _M_fill_assign(size_t __n, bool __x) + { + if (__n > size()) + { + std::fill(this->_M_impl._M_start._M_p, + this->_M_impl._M_end_of_storage, __x ? ~0 : 0); + insert(end(), __n - size(), __x); + } + else + { + _M_erase_at_end(begin() + __n); + std::fill(this->_M_impl._M_start._M_p, + this->_M_impl._M_end_of_storage, __x ? ~0 : 0); + } + } + + template + void + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + iterator __cur = begin(); + for (; __first != __last && __cur != end(); ++__cur, ++__first) + *__cur = *__first; + if (__first == __last) + _M_erase_at_end(__cur); + else + insert(end(), __first, __last); + } + + template + void + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __len = std::distance(__first, __last); + if (__len < size()) + _M_erase_at_end(std::copy(__first, __last, begin())); + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, size()); + std::copy(__first, __mid, begin()); + insert(end(), __mid, __last); + } + } + + + + + + template + void + _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, + __true_type) + { _M_fill_insert(__pos, __n, __x); } + + template + void + _M_insert_dispatch(iterator __pos, + _InputIterator __first, _InputIterator __last, + __false_type) + { _M_insert_range(__pos, __first, __last, + std::__iterator_category(__first)); } + + void + _M_fill_insert(iterator __position, size_type __n, bool __x); + + template + void + _M_insert_range(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag) + { + for (; __first != __last; ++__first) + { + __pos = insert(__pos, *__first); + ++__pos; + } + } + + template + void + _M_insert_range(iterator __position, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag); + + void + _M_insert_aux(iterator __position, bool __x); + + size_type + _M_check_len(size_type __n, const char* __s) const + { + if (max_size() - size() < __n) + __throw_length_error((__s)); + + const size_type __len = size() + std::max(size(), __n); + return (__len < size() || __len > max_size()) ? max_size() : __len; + } + + void + _M_erase_at_end(iterator __pos) + { this->_M_impl._M_finish = __pos; } + }; + + +} +# 67 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/vector" 2 3 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/vector.tcc" 1 3 +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/vector.tcc" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + template + void + vector<_Tp, _Alloc>:: + reserve(size_type __n) + { + if (__n > this->max_size()) + __throw_length_error(("vector::reserve")); + if (this->capacity() < __n) + { + const size_type __old_size = size(); + pointer __tmp = _M_allocate_and_copy(__n, + (this->_M_impl._M_start), + (this->_M_impl._M_finish)); + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __tmp; + this->_M_impl._M_finish = __tmp + __old_size; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + } + } +# 106 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/vector.tcc" 3 + template + typename vector<_Tp, _Alloc>::iterator + vector<_Tp, _Alloc>:: + insert(iterator __position, const value_type& __x) + { + const size_type __n = __position - begin(); + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage + && __position == end()) + { + this->_M_impl.construct(this->_M_impl._M_finish, __x); + ++this->_M_impl._M_finish; + } + else + { +# 128 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/vector.tcc" 3 + _M_insert_aux(__position, __x); + } + return iterator(this->_M_impl._M_start + __n); + } + + template + typename vector<_Tp, _Alloc>::iterator + vector<_Tp, _Alloc>:: + erase(iterator __position) + { + if (__position + 1 != end()) + std::copy(__position + 1, end(), __position); + --this->_M_impl._M_finish; + this->_M_impl.destroy(this->_M_impl._M_finish); + return __position; + } + + template + typename vector<_Tp, _Alloc>::iterator + vector<_Tp, _Alloc>:: + erase(iterator __first, iterator __last) + { + if (__first != __last) + { + if (__last != end()) + std::copy(__last, end(), __first); + _M_erase_at_end(__first.base() + (end() - __last)); + } + return __first; + } + + template + vector<_Tp, _Alloc>& + vector<_Tp, _Alloc>:: + operator=(const vector<_Tp, _Alloc>& __x) + { + if (&__x != this) + { + const size_type __xlen = __x.size(); + if (__xlen > capacity()) + { + pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(), + __x.end()); + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __tmp; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen; + } + else if (size() >= __xlen) + { + std::_Destroy(std::copy(__x.begin(), __x.end(), begin()), + end(), _M_get_Tp_allocator()); + } + else + { + std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(), + this->_M_impl._M_start); + std::__uninitialized_copy_a(__x._M_impl._M_start + size(), + __x._M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + } + this->_M_impl._M_finish = this->_M_impl._M_start + __xlen; + } + return *this; + } + + template + void + vector<_Tp, _Alloc>:: + _M_fill_assign(size_t __n, const value_type& __val) + { + if (__n > capacity()) + { + vector __tmp(__n, __val, _M_get_Tp_allocator()); + __tmp.swap(*this); + } + else if (__n > size()) + { + std::fill(begin(), end(), __val); + std::__uninitialized_fill_n_a(this->_M_impl._M_finish, + __n - size(), __val, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n - size(); + } + else + _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val)); + } + + template + template + void + vector<_Tp, _Alloc>:: + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + pointer __cur(this->_M_impl._M_start); + for (; __first != __last && __cur != this->_M_impl._M_finish; + ++__cur, ++__first) + *__cur = *__first; + if (__first == __last) + _M_erase_at_end(__cur); + else + insert(end(), __first, __last); + } + + template + template + void + vector<_Tp, _Alloc>:: + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __len = std::distance(__first, __last); + + if (__len > capacity()) + { + pointer __tmp(_M_allocate_and_copy(__len, __first, __last)); + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __tmp; + this->_M_impl._M_finish = this->_M_impl._M_start + __len; + this->_M_impl._M_end_of_storage = this->_M_impl._M_finish; + } + else if (size() >= __len) + _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start)); + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, size()); + std::copy(__first, __mid, this->_M_impl._M_start); + this->_M_impl._M_finish = + std::__uninitialized_copy_a(__mid, __last, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + } + } +# 298 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/vector.tcc" 3 + template + void + vector<_Tp, _Alloc>:: + _M_insert_aux(iterator __position, const _Tp& __x) + + { + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + { + this->_M_impl.construct(this->_M_impl._M_finish, + (*(this->_M_impl._M_finish - 1)) + ); + ++this->_M_impl._M_finish; + + _Tp __x_copy = __x; + + std::copy_backward(__position.base(), this->_M_impl._M_finish - 2, this->_M_impl._M_finish - 1) + + ; + + *__position = __x_copy; + + + + } + else + { + const size_type __len = + _M_check_len(size_type(1), "vector::_M_insert_aux"); + const size_type __elems_before = __position - begin(); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + try + { + + + + + this->_M_impl.construct(__new_start + __elems_before, + + + + __x); + + __new_finish = 0; + + __new_finish = + std::__uninitialized_move_a(this->_M_impl._M_start, + __position.base(), __new_start, + _M_get_Tp_allocator()); + ++__new_finish; + + __new_finish = + std::__uninitialized_move_a(__position.base(), + this->_M_impl._M_finish, + __new_finish, + _M_get_Tp_allocator()); + } + catch(...) + { + if (!__new_finish) + this->_M_impl.destroy(__new_start + __elems_before); + else + std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + } + + template + void + vector<_Tp, _Alloc>:: + _M_fill_insert(iterator __position, size_type __n, const value_type& __x) + { + if (__n != 0) + { + if (size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_finish) >= __n) + { + value_type __x_copy = __x; + const size_type __elems_after = end() - __position; + pointer __old_finish(this->_M_impl._M_finish); + if (__elems_after > __n) + { + std::__uninitialized_move_a(this->_M_impl._M_finish - __n, + this->_M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n; + std::copy_backward(__position.base(), __old_finish - __n, __old_finish) + ; + std::fill(__position.base(), __position.base() + __n, + __x_copy); + } + else + { + std::__uninitialized_fill_n_a(this->_M_impl._M_finish, + __n - __elems_after, + __x_copy, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n - __elems_after; + std::__uninitialized_move_a(__position.base(), __old_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __elems_after; + std::fill(__position.base(), __old_finish, __x_copy); + } + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_fill_insert"); + const size_type __elems_before = __position - begin(); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + try + { + + std::__uninitialized_fill_n_a(__new_start + __elems_before, + __n, __x, + _M_get_Tp_allocator()); + __new_finish = 0; + + __new_finish = + std::__uninitialized_move_a(this->_M_impl._M_start, + __position.base(), + __new_start, + _M_get_Tp_allocator()); + __new_finish += __n; + + __new_finish = + std::__uninitialized_move_a(__position.base(), + this->_M_impl._M_finish, + __new_finish, + _M_get_Tp_allocator()); + } + catch(...) + { + if (!__new_finish) + std::_Destroy(__new_start + __elems_before, + __new_start + __elems_before + __n, + _M_get_Tp_allocator()); + else + std::_Destroy(__new_start, __new_finish, + _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + } + } +# 519 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/vector.tcc" 3 + template + template + void + vector<_Tp, _Alloc>:: + _M_range_insert(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag) + { + for (; __first != __last; ++__first) + { + __pos = insert(__pos, *__first); + ++__pos; + } + } + + template + template + void + vector<_Tp, _Alloc>:: + _M_range_insert(iterator __position, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag) + { + if (__first != __last) + { + const size_type __n = std::distance(__first, __last); + if (size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_finish) >= __n) + { + const size_type __elems_after = end() - __position; + pointer __old_finish(this->_M_impl._M_finish); + if (__elems_after > __n) + { + std::__uninitialized_move_a(this->_M_impl._M_finish - __n, + this->_M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n; + std::copy_backward(__position.base(), __old_finish - __n, __old_finish) + ; + std::copy(__first, __last, __position); + } + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, __elems_after); + std::__uninitialized_copy_a(__mid, __last, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n - __elems_after; + std::__uninitialized_move_a(__position.base(), + __old_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __elems_after; + std::copy(__first, __mid, __position); + } + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_range_insert"); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + try + { + __new_finish = + std::__uninitialized_move_a(this->_M_impl._M_start, + __position.base(), + __new_start, + _M_get_Tp_allocator()); + __new_finish = + std::__uninitialized_copy_a(__first, __last, + __new_finish, + _M_get_Tp_allocator()); + __new_finish = + std::__uninitialized_move_a(__position.base(), + this->_M_impl._M_finish, + __new_finish, + _M_get_Tp_allocator()); + } + catch(...) + { + std::_Destroy(__new_start, __new_finish, + _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + } + } + + + + + template + void + vector:: + reserve(size_type __n) + { + if (__n > this->max_size()) + __throw_length_error(("vector::reserve")); + if (this->capacity() < __n) + { + _Bit_type* __q = this->_M_allocate(__n); + this->_M_impl._M_finish = _M_copy_aligned(begin(), end(), + iterator(__q, 0)); + this->_M_deallocate(); + this->_M_impl._M_start = iterator(__q, 0); + this->_M_impl._M_end_of_storage = (__q + (__n + int(_S_word_bit) - 1) + / int(_S_word_bit)); + } + } + + template + void + vector:: + _M_fill_insert(iterator __position, size_type __n, bool __x) + { + if (__n == 0) + return; + if (capacity() - size() >= __n) + { + std::copy_backward(__position, end(), + this->_M_impl._M_finish + difference_type(__n)); + std::fill(__position, __position + difference_type(__n), __x); + this->_M_impl._M_finish += difference_type(__n); + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_fill_insert"); + _Bit_type * __q = this->_M_allocate(__len); + iterator __i = _M_copy_aligned(begin(), __position, + iterator(__q, 0)); + std::fill(__i, __i + difference_type(__n), __x); + this->_M_impl._M_finish = std::copy(__position, end(), + __i + difference_type(__n)); + this->_M_deallocate(); + this->_M_impl._M_end_of_storage = (__q + ((__len + + int(_S_word_bit) - 1) + / int(_S_word_bit))); + this->_M_impl._M_start = iterator(__q, 0); + } + } + + template + template + void + vector:: + _M_insert_range(iterator __position, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag) + { + if (__first != __last) + { + size_type __n = std::distance(__first, __last); + if (capacity() - size() >= __n) + { + std::copy_backward(__position, end(), + this->_M_impl._M_finish + + difference_type(__n)); + std::copy(__first, __last, __position); + this->_M_impl._M_finish += difference_type(__n); + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_insert_range"); + _Bit_type * __q = this->_M_allocate(__len); + iterator __i = _M_copy_aligned(begin(), __position, + iterator(__q, 0)); + __i = std::copy(__first, __last, __i); + this->_M_impl._M_finish = std::copy(__position, end(), __i); + this->_M_deallocate(); + this->_M_impl._M_end_of_storage = (__q + + ((__len + + int(_S_word_bit) - 1) + / int(_S_word_bit))); + this->_M_impl._M_start = iterator(__q, 0); + } + } + } + + template + void + vector:: + _M_insert_aux(iterator __position, bool __x) + { + if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage) + { + std::copy_backward(__position, this->_M_impl._M_finish, + this->_M_impl._M_finish + 1); + *__position = __x; + ++this->_M_impl._M_finish; + } + else + { + const size_type __len = + _M_check_len(size_type(1), "vector::_M_insert_aux"); + _Bit_type * __q = this->_M_allocate(__len); + iterator __i = _M_copy_aligned(begin(), __position, + iterator(__q, 0)); + *__i++ = __x; + this->_M_impl._M_finish = std::copy(__position, end(), __i); + this->_M_deallocate(); + this->_M_impl._M_end_of_storage = (__q + ((__len + + int(_S_word_bit) - 1) + / int(_S_word_bit))); + this->_M_impl._M_start = iterator(__q, 0); + } + } + + +} +# 71 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/vector" 2 3 +# 27 "../boost/filesystem/v3/path_traits.hpp" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/list" 1 3 +# 59 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/list" 3 + +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/list" 3 + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 1 3 +# 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + namespace __detail + { + +# 76 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + struct _List_node_base + { + _List_node_base* _M_next; + _List_node_base* _M_prev; + + static void + swap(_List_node_base& __x, _List_node_base& __y) throw (); + + void + _M_transfer(_List_node_base* const __first, + _List_node_base* const __last) throw (); + + void + _M_reverse() throw (); + + void + _M_hook(_List_node_base* const __position) throw (); + + void + _M_unhook() throw (); + }; + + + } + + + + + template + struct _List_node : public __detail::_List_node_base + { + + _Tp _M_data; + + + + + + + + }; + + + + + + + template + struct _List_iterator + { + typedef _List_iterator<_Tp> _Self; + typedef _List_node<_Tp> _Node; + + typedef ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + typedef _Tp value_type; + typedef _Tp* pointer; + typedef _Tp& reference; + + _List_iterator() + : _M_node() { } + + explicit + _List_iterator(__detail::_List_node_base* __x) + : _M_node(__x) { } + + + reference + operator*() const + { return static_cast<_Node*>(_M_node)->_M_data; } + + pointer + operator->() const + { return std::__addressof(static_cast<_Node*>(_M_node)->_M_data); } + + _Self& + operator++() + { + _M_node = _M_node->_M_next; + return *this; + } + + _Self + operator++(int) + { + _Self __tmp = *this; + _M_node = _M_node->_M_next; + return __tmp; + } + + _Self& + operator--() + { + _M_node = _M_node->_M_prev; + return *this; + } + + _Self + operator--(int) + { + _Self __tmp = *this; + _M_node = _M_node->_M_prev; + return __tmp; + } + + bool + operator==(const _Self& __x) const + { return _M_node == __x._M_node; } + + bool + operator!=(const _Self& __x) const + { return _M_node != __x._M_node; } + + + __detail::_List_node_base* _M_node; + }; + + + + + + + template + struct _List_const_iterator + { + typedef _List_const_iterator<_Tp> _Self; + typedef const _List_node<_Tp> _Node; + typedef _List_iterator<_Tp> iterator; + + typedef ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + typedef _Tp value_type; + typedef const _Tp* pointer; + typedef const _Tp& reference; + + _List_const_iterator() + : _M_node() { } + + explicit + _List_const_iterator(const __detail::_List_node_base* __x) + : _M_node(__x) { } + + _List_const_iterator(const iterator& __x) + : _M_node(__x._M_node) { } + + + + reference + operator*() const + { return static_cast<_Node*>(_M_node)->_M_data; } + + pointer + operator->() const + { return std::__addressof(static_cast<_Node*>(_M_node)->_M_data); } + + _Self& + operator++() + { + _M_node = _M_node->_M_next; + return *this; + } + + _Self + operator++(int) + { + _Self __tmp = *this; + _M_node = _M_node->_M_next; + return __tmp; + } + + _Self& + operator--() + { + _M_node = _M_node->_M_prev; + return *this; + } + + _Self + operator--(int) + { + _Self __tmp = *this; + _M_node = _M_node->_M_prev; + return __tmp; + } + + bool + operator==(const _Self& __x) const + { return _M_node == __x._M_node; } + + bool + operator!=(const _Self& __x) const + { return _M_node != __x._M_node; } + + + const __detail::_List_node_base* _M_node; + }; + + template + inline bool + operator==(const _List_iterator<_Val>& __x, + const _List_const_iterator<_Val>& __y) + { return __x._M_node == __y._M_node; } + + template + inline bool + operator!=(const _List_iterator<_Val>& __x, + const _List_const_iterator<_Val>& __y) + { return __x._M_node != __y._M_node; } + + + + template + class _List_base + { + protected: +# 304 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + typedef typename _Alloc::template rebind<_List_node<_Tp> >::other + _Node_alloc_type; + + typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; + + struct _List_impl + : public _Node_alloc_type + { + __detail::_List_node_base _M_node; + + _List_impl() + : _Node_alloc_type(), _M_node() + { } + + _List_impl(const _Node_alloc_type& __a) + : _Node_alloc_type(__a), _M_node() + { } + }; + + _List_impl _M_impl; + + _List_node<_Tp>* + _M_get_node() + { return _M_impl._Node_alloc_type::allocate(1); } + + void + _M_put_node(_List_node<_Tp>* __p) + { _M_impl._Node_alloc_type::deallocate(__p, 1); } + + public: + typedef _Alloc allocator_type; + + _Node_alloc_type& + _M_get_Node_allocator() + { return *static_cast<_Node_alloc_type*>(&this->_M_impl); } + + const _Node_alloc_type& + _M_get_Node_allocator() const + { return *static_cast(&this->_M_impl); } + + _Tp_alloc_type + _M_get_Tp_allocator() const + { return _Tp_alloc_type(_M_get_Node_allocator()); } + + allocator_type + get_allocator() const + { return allocator_type(_M_get_Node_allocator()); } + + _List_base() + : _M_impl() + { _M_init(); } + + _List_base(const allocator_type& __a) + : _M_impl(__a) + { _M_init(); } +# 371 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + ~_List_base() + { _M_clear(); } + + void + _M_clear(); + + void + _M_init() + { + this->_M_impl._M_node._M_next = &this->_M_impl._M_node; + this->_M_impl._M_node._M_prev = &this->_M_impl._M_node; + } + }; +# 428 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + template > + class list : protected _List_base<_Tp, _Alloc> + { + + typedef typename _Alloc::value_type _Alloc_value_type; + + + + typedef _List_base<_Tp, _Alloc> _Base; + typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; + + public: + typedef _Tp value_type; + typedef typename _Tp_alloc_type::pointer pointer; + typedef typename _Tp_alloc_type::const_pointer const_pointer; + typedef typename _Tp_alloc_type::reference reference; + typedef typename _Tp_alloc_type::const_reference const_reference; + typedef _List_iterator<_Tp> iterator; + typedef _List_const_iterator<_Tp> const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Alloc allocator_type; + + protected: + + + typedef _List_node<_Tp> _Node; + + using _Base::_M_impl; + using _Base::_M_put_node; + using _Base::_M_get_node; + using _Base::_M_get_Tp_allocator; + using _Base::_M_get_Node_allocator; + + + + + + + + _Node* + _M_create_node(const value_type& __x) + { + _Node* __p = this->_M_get_node(); + try + { + _M_get_Tp_allocator().construct + (std::__addressof(__p->_M_data), __x); + } + catch(...) + { + _M_put_node(__p); + throw; + } + return __p; + } +# 506 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + public: + + + + + + list() + : _Base() { } + + + + + + explicit + list(const allocator_type& __a) + : _Base(__a) { } +# 557 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + explicit + list(size_type __n, const value_type& __value = value_type(), + const allocator_type& __a = allocator_type()) + : _Base(__a) + { _M_fill_initialize(__n, __value); } +# 571 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + list(const list& __x) + : _Base(__x._M_get_Node_allocator()) + { _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); } +# 610 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + template + list(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_initialize_dispatch(__first, __last, _Integral()); + } +# 635 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + list& + operator=(const list& __x); +# 681 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + void + assign(size_type __n, const value_type& __val) + { _M_fill_assign(__n, __val); } +# 697 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + template + void + assign(_InputIterator __first, _InputIterator __last) + { + + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } +# 720 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + allocator_type + get_allocator() const + { return _Base::get_allocator(); } + + + + + + + iterator + begin() + { return iterator(this->_M_impl._M_node._M_next); } + + + + + + + const_iterator + begin() const + { return const_iterator(this->_M_impl._M_node._M_next); } + + + + + + + iterator + end() + { return iterator(&this->_M_impl._M_node); } + + + + + + + const_iterator + end() const + { return const_iterator(&this->_M_impl._M_node); } + + + + + + + reverse_iterator + rbegin() + { return reverse_iterator(end()); } + + + + + + + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(end()); } + + + + + + + reverse_iterator + rend() + { return reverse_iterator(begin()); } + + + + + + + const_reverse_iterator + rend() const + { return const_reverse_iterator(begin()); } +# 839 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + bool + empty() const + { return this->_M_impl._M_node._M_next == &this->_M_impl._M_node; } + + + size_type + size() const + { return std::distance(begin(), end()); } + + + size_type + max_size() const + { return _M_get_Node_allocator().max_size(); } +# 889 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + void + resize(size_type __new_size, value_type __x = value_type()); + + + + + + + + reference + front() + { return *begin(); } + + + + + + const_reference + front() const + { return *begin(); } + + + + + + reference + back() + { + iterator __tmp = end(); + --__tmp; + return *__tmp; + } + + + + + + const_reference + back() const + { + const_iterator __tmp = end(); + --__tmp; + return *__tmp; + } +# 945 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + void + push_front(const value_type& __x) + { this->_M_insert(begin(), __x); } +# 972 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + void + pop_front() + { this->_M_erase(begin()); } +# 986 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + void + push_back(const value_type& __x) + { this->_M_insert(end(), __x); } +# 1012 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + void + pop_back() + { this->_M_erase(iterator(this->_M_impl._M_node._M_prev)); } +# 1045 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + iterator + insert(iterator __position, const value_type& __x); +# 1094 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + void + insert(iterator __position, size_type __n, const value_type& __x) + { + list __tmp(__n, __x, _M_get_Node_allocator()); + splice(__position, __tmp); + } +# 1114 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + template + void + insert(iterator __position, _InputIterator __first, + _InputIterator __last) + { + list __tmp(__first, __last, _M_get_Node_allocator()); + splice(__position, __tmp); + } +# 1138 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + iterator + erase(iterator __position); +# 1159 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + iterator + erase(iterator __first, iterator __last) + { + while (__first != __last) + __first = erase(__first); + return __last; + } +# 1176 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + void + swap(list& __x) + { + __detail::_List_node_base::swap(this->_M_impl._M_node, + __x._M_impl._M_node); + + + + std::__alloc_swap:: + _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator()); + } + + + + + + + + void + clear() + { + _Base::_M_clear(); + _Base::_M_init(); + } +# 1213 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + void + + + + splice(iterator __position, list& __x) + + { + if (!__x.empty()) + { + _M_check_equal_allocators(__x); + + this->_M_transfer(__position, __x.begin(), __x.end()); + } + } +# 1243 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + void + + + + splice(iterator __position, list& __x, iterator __i) + + { + iterator __j = __i; + ++__j; + if (__position == __i || __position == __j) + return; + + if (this != &__x) + _M_check_equal_allocators(__x); + + this->_M_transfer(__position, __i, __j); + } +# 1279 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + void + + + + + splice(iterator __position, list& __x, iterator __first, + iterator __last) + + { + if (__first != __last) + { + if (this != &__x) + _M_check_equal_allocators(__x); + + this->_M_transfer(__position, __first, __last); + } + } +# 1314 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + void + remove(const _Tp& __value); +# 1328 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + template + void + remove_if(_Predicate); +# 1342 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + void + unique(); +# 1357 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + template + void + unique(_BinaryPredicate); +# 1378 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + void + merge(list& __x); +# 1404 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + template + void + merge(list&, _StrictWeakOrdering); + + + + + + + + void + reverse() + { this->_M_impl._M_node._M_reverse(); } + + + + + + + + void + sort(); + + + + + + + + template + void + sort(_StrictWeakOrdering); + + protected: + + + + + + + template + void + _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) + { _M_fill_initialize(static_cast(__n), __x); } + + + template + void + _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { + for (; __first != __last; ++__first) + push_back(*__first); + } + + + + void + _M_fill_initialize(size_type __n, const value_type& __x) + { + for (; __n; --__n) + push_back(__x); + } +# 1488 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + template + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } + + + template + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + __false_type); + + + + void + _M_fill_assign(size_type __n, const value_type& __val); + + + + void + _M_transfer(iterator __position, iterator __first, iterator __last) + { __position._M_node->_M_transfer(__first._M_node, __last._M_node); } + + + + void + _M_insert(iterator __position, const value_type& __x) + { + _Node* __tmp = _M_create_node(__x); + __tmp->_M_hook(__position._M_node); + } +# 1529 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + void + _M_erase(iterator __position) + { + __position._M_node->_M_unhook(); + _Node* __n = static_cast<_Node*>(__position._M_node); + + + + _M_get_Tp_allocator().destroy(std::__addressof(__n->_M_data)); + + _M_put_node(__n); + } + + + void + _M_check_equal_allocators(list& __x) + { + if (std::__alloc_neq:: + _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator())) + __throw_runtime_error(("list::_M_check_equal_allocators")); + } + }; +# 1562 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + template + inline bool + operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { + typedef typename list<_Tp, _Alloc>::const_iterator const_iterator; + const_iterator __end1 = __x.end(); + const_iterator __end2 = __y.end(); + + const_iterator __i1 = __x.begin(); + const_iterator __i2 = __y.begin(); + while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2) + { + ++__i1; + ++__i2; + } + return __i1 == __end1 && __i2 == __end2; + } +# 1591 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_list.h" 3 + template + inline bool + operator<(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return std::lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); } + + + template + inline bool + operator!=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return !(__x == __y); } + + + template + inline bool + operator>(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return __y < __x; } + + + template + inline bool + operator<=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return !(__y < __x); } + + + template + inline bool + operator>=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return !(__x < __y); } + + + template + inline void + swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y) + { __x.swap(__y); } + + +} +# 65 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/list" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/list.tcc" 1 3 +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/list.tcc" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + template + void + _List_base<_Tp, _Alloc>:: + _M_clear() + { + typedef _List_node<_Tp> _Node; + _Node* __cur = static_cast<_Node*>(this->_M_impl._M_node._M_next); + while (__cur != &this->_M_impl._M_node) + { + _Node* __tmp = __cur; + __cur = static_cast<_Node*>(__cur->_M_next); + + + + _M_get_Tp_allocator().destroy(std::__addressof(__tmp->_M_data)); + + _M_put_node(__tmp); + } + } +# 97 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/list.tcc" 3 + template + typename list<_Tp, _Alloc>::iterator + list<_Tp, _Alloc>:: + insert(iterator __position, const value_type& __x) + { + _Node* __tmp = _M_create_node(__x); + __tmp->_M_hook(__position._M_node); + return iterator(__tmp); + } + + template + typename list<_Tp, _Alloc>::iterator + list<_Tp, _Alloc>:: + erase(iterator __position) + { + iterator __ret = iterator(__position._M_node->_M_next); + _M_erase(__position); + return __ret; + } +# 167 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/list.tcc" 3 + template + void + list<_Tp, _Alloc>:: + resize(size_type __new_size, value_type __x) + { + iterator __i = begin(); + size_type __len = 0; + for (; __i != end() && __len < __new_size; ++__i, ++__len) + ; + if (__len == __new_size) + erase(__i, end()); + else + insert(end(), __new_size - __len, __x); + } + + + template + list<_Tp, _Alloc>& + list<_Tp, _Alloc>:: + operator=(const list& __x) + { + if (this != &__x) + { + iterator __first1 = begin(); + iterator __last1 = end(); + const_iterator __first2 = __x.begin(); + const_iterator __last2 = __x.end(); + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, ++__first2) + *__first1 = *__first2; + if (__first2 == __last2) + erase(__first1, __last1); + else + insert(__last1, __first2, __last2); + } + return *this; + } + + template + void + list<_Tp, _Alloc>:: + _M_fill_assign(size_type __n, const value_type& __val) + { + iterator __i = begin(); + for (; __i != end() && __n > 0; ++__i, --__n) + *__i = __val; + if (__n > 0) + insert(end(), __n, __val); + else + erase(__i, end()); + } + + template + template + void + list<_Tp, _Alloc>:: + _M_assign_dispatch(_InputIterator __first2, _InputIterator __last2, + __false_type) + { + iterator __first1 = begin(); + iterator __last1 = end(); + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, ++__first2) + *__first1 = *__first2; + if (__first2 == __last2) + erase(__first1, __last1); + else + insert(__last1, __first2, __last2); + } + + template + void + list<_Tp, _Alloc>:: + remove(const value_type& __value) + { + iterator __first = begin(); + iterator __last = end(); + iterator __extra = __last; + while (__first != __last) + { + iterator __next = __first; + ++__next; + if (*__first == __value) + { + + + + if (std::__addressof(*__first) != std::__addressof(__value)) + _M_erase(__first); + else + __extra = __first; + } + __first = __next; + } + if (__extra != __last) + _M_erase(__extra); + } + + template + void + list<_Tp, _Alloc>:: + unique() + { + iterator __first = begin(); + iterator __last = end(); + if (__first == __last) + return; + iterator __next = __first; + while (++__next != __last) + { + if (*__first == *__next) + _M_erase(__next); + else + __first = __next; + __next = __first; + } + } + + template + void + list<_Tp, _Alloc>:: + + + + merge(list& __x) + + { + + + if (this != &__x) + { + _M_check_equal_allocators(__x); + + iterator __first1 = begin(); + iterator __last1 = end(); + iterator __first2 = __x.begin(); + iterator __last2 = __x.end(); + while (__first1 != __last1 && __first2 != __last2) + if (*__first2 < *__first1) + { + iterator __next = __first2; + _M_transfer(__first1, __first2, ++__next); + __first2 = __next; + } + else + ++__first1; + if (__first2 != __last2) + _M_transfer(__last1, __first2, __last2); + } + } + + template + template + void + list<_Tp, _Alloc>:: + + + + merge(list& __x, _StrictWeakOrdering __comp) + + { + + + if (this != &__x) + { + _M_check_equal_allocators(__x); + + iterator __first1 = begin(); + iterator __last1 = end(); + iterator __first2 = __x.begin(); + iterator __last2 = __x.end(); + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first2, *__first1)) + { + iterator __next = __first2; + _M_transfer(__first1, __first2, ++__next); + __first2 = __next; + } + else + ++__first1; + if (__first2 != __last2) + _M_transfer(__last1, __first2, __last2); + } + } + + template + void + list<_Tp, _Alloc>:: + sort() + { + + if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node + && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node) + { + list __carry; + list __tmp[64]; + list * __fill = &__tmp[0]; + list * __counter; + + do + { + __carry.splice(__carry.begin(), *this, begin()); + + for(__counter = &__tmp[0]; + __counter != __fill && !__counter->empty(); + ++__counter) + { + __counter->merge(__carry); + __carry.swap(*__counter); + } + __carry.swap(*__counter); + if (__counter == __fill) + ++__fill; + } + while ( !empty() ); + + for (__counter = &__tmp[1]; __counter != __fill; ++__counter) + __counter->merge(*(__counter - 1)); + swap( *(__fill - 1) ); + } + } + + template + template + void + list<_Tp, _Alloc>:: + remove_if(_Predicate __pred) + { + iterator __first = begin(); + iterator __last = end(); + while (__first != __last) + { + iterator __next = __first; + ++__next; + if (__pred(*__first)) + _M_erase(__first); + __first = __next; + } + } + + template + template + void + list<_Tp, _Alloc>:: + unique(_BinaryPredicate __binary_pred) + { + iterator __first = begin(); + iterator __last = end(); + if (__first == __last) + return; + iterator __next = __first; + while (++__next != __last) + { + if (__binary_pred(*__first, *__next)) + _M_erase(__next); + else + __first = __next; + __next = __first; + } + } + + template + template + void + list<_Tp, _Alloc>:: + sort(_StrictWeakOrdering __comp) + { + + if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node + && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node) + { + list __carry; + list __tmp[64]; + list * __fill = &__tmp[0]; + list * __counter; + + do + { + __carry.splice(__carry.begin(), *this, begin()); + + for(__counter = &__tmp[0]; + __counter != __fill && !__counter->empty(); + ++__counter) + { + __counter->merge(__carry, __comp); + __carry.swap(*__counter); + } + __carry.swap(*__counter); + if (__counter == __fill) + ++__fill; + } + while ( !empty() ); + + for (__counter = &__tmp[1]; __counter != __fill; ++__counter) + __counter->merge(*(__counter - 1), __comp); + swap(*(__fill - 1)); + } + } + + +} +# 66 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/list" 2 3 +# 28 "../boost/filesystem/v3/path_traits.hpp" 2 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/locale" 1 3 +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/locale" 3 + +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/locale" 3 + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ctime" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ctime" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ctime" 3 +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/ctime" 3 +namespace std +{ + using ::clock_t; + using ::time_t; + using ::tm; + + using ::clock; + using ::difftime; + using ::mktime; + using ::time; + using ::asctime; + using ::ctime; + using ::gmtime; + using ::localtime; + using ::strftime; +} +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 52 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + class time_base + { + public: + enum dateorder { no_order, dmy, mdy, ymd, ydm }; + }; + + template + struct __timepunct_cache : public locale::facet + { + + static const _CharT* _S_timezones[14]; + + const _CharT* _M_date_format; + const _CharT* _M_date_era_format; + const _CharT* _M_time_format; + const _CharT* _M_time_era_format; + const _CharT* _M_date_time_format; + const _CharT* _M_date_time_era_format; + const _CharT* _M_am; + const _CharT* _M_pm; + const _CharT* _M_am_pm_format; + + + const _CharT* _M_day1; + const _CharT* _M_day2; + const _CharT* _M_day3; + const _CharT* _M_day4; + const _CharT* _M_day5; + const _CharT* _M_day6; + const _CharT* _M_day7; + + + const _CharT* _M_aday1; + const _CharT* _M_aday2; + const _CharT* _M_aday3; + const _CharT* _M_aday4; + const _CharT* _M_aday5; + const _CharT* _M_aday6; + const _CharT* _M_aday7; + + + const _CharT* _M_month01; + const _CharT* _M_month02; + const _CharT* _M_month03; + const _CharT* _M_month04; + const _CharT* _M_month05; + const _CharT* _M_month06; + const _CharT* _M_month07; + const _CharT* _M_month08; + const _CharT* _M_month09; + const _CharT* _M_month10; + const _CharT* _M_month11; + const _CharT* _M_month12; + + + const _CharT* _M_amonth01; + const _CharT* _M_amonth02; + const _CharT* _M_amonth03; + const _CharT* _M_amonth04; + const _CharT* _M_amonth05; + const _CharT* _M_amonth06; + const _CharT* _M_amonth07; + const _CharT* _M_amonth08; + const _CharT* _M_amonth09; + const _CharT* _M_amonth10; + const _CharT* _M_amonth11; + const _CharT* _M_amonth12; + + bool _M_allocated; + + __timepunct_cache(size_t __refs = 0) : facet(__refs), + _M_date_format(0), _M_date_era_format(0), _M_time_format(0), + _M_time_era_format(0), _M_date_time_format(0), + _M_date_time_era_format(0), _M_am(0), _M_pm(0), + _M_am_pm_format(0), _M_day1(0), _M_day2(0), _M_day3(0), + _M_day4(0), _M_day5(0), _M_day6(0), _M_day7(0), + _M_aday1(0), _M_aday2(0), _M_aday3(0), _M_aday4(0), + _M_aday5(0), _M_aday6(0), _M_aday7(0), _M_month01(0), + _M_month02(0), _M_month03(0), _M_month04(0), _M_month05(0), + _M_month06(0), _M_month07(0), _M_month08(0), _M_month09(0), + _M_month10(0), _M_month11(0), _M_month12(0), _M_amonth01(0), + _M_amonth02(0), _M_amonth03(0), _M_amonth04(0), + _M_amonth05(0), _M_amonth06(0), _M_amonth07(0), + _M_amonth08(0), _M_amonth09(0), _M_amonth10(0), + _M_amonth11(0), _M_amonth12(0), _M_allocated(false) + { } + + ~__timepunct_cache(); + + void + _M_cache(const locale& __loc); + + private: + __timepunct_cache& + operator=(const __timepunct_cache&); + + explicit + __timepunct_cache(const __timepunct_cache&); + }; + + template + __timepunct_cache<_CharT>::~__timepunct_cache() + { + if (_M_allocated) + { + + } + } + + + template<> + const char* + __timepunct_cache::_S_timezones[14]; + + + template<> + const wchar_t* + __timepunct_cache::_S_timezones[14]; + + + + template + const _CharT* __timepunct_cache<_CharT>::_S_timezones[14]; + + template + class __timepunct : public locale::facet + { + public: + + typedef _CharT __char_type; + typedef basic_string<_CharT> __string_type; + typedef __timepunct_cache<_CharT> __cache_type; + + protected: + __cache_type* _M_data; + __c_locale _M_c_locale_timepunct; + const char* _M_name_timepunct; + + public: + + static locale::id id; + + explicit + __timepunct(size_t __refs = 0); + + explicit + __timepunct(__cache_type* __cache, size_t __refs = 0); +# 210 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + explicit + __timepunct(__c_locale __cloc, const char* __s, size_t __refs = 0); + + + + void + _M_put(_CharT* __s, size_t __maxlen, const _CharT* __format, + const tm* __tm) const throw (); + + void + _M_date_formats(const _CharT** __date) const + { + + __date[0] = _M_data->_M_date_format; + __date[1] = _M_data->_M_date_era_format; + } + + void + _M_time_formats(const _CharT** __time) const + { + + __time[0] = _M_data->_M_time_format; + __time[1] = _M_data->_M_time_era_format; + } + + void + _M_date_time_formats(const _CharT** __dt) const + { + + __dt[0] = _M_data->_M_date_time_format; + __dt[1] = _M_data->_M_date_time_era_format; + } + + void + _M_am_pm_format(const _CharT* __ampm) const + { __ampm = _M_data->_M_am_pm_format; } + + void + _M_am_pm(const _CharT** __ampm) const + { + __ampm[0] = _M_data->_M_am; + __ampm[1] = _M_data->_M_pm; + } + + void + _M_days(const _CharT** __days) const + { + __days[0] = _M_data->_M_day1; + __days[1] = _M_data->_M_day2; + __days[2] = _M_data->_M_day3; + __days[3] = _M_data->_M_day4; + __days[4] = _M_data->_M_day5; + __days[5] = _M_data->_M_day6; + __days[6] = _M_data->_M_day7; + } + + void + _M_days_abbreviated(const _CharT** __days) const + { + __days[0] = _M_data->_M_aday1; + __days[1] = _M_data->_M_aday2; + __days[2] = _M_data->_M_aday3; + __days[3] = _M_data->_M_aday4; + __days[4] = _M_data->_M_aday5; + __days[5] = _M_data->_M_aday6; + __days[6] = _M_data->_M_aday7; + } + + void + _M_months(const _CharT** __months) const + { + __months[0] = _M_data->_M_month01; + __months[1] = _M_data->_M_month02; + __months[2] = _M_data->_M_month03; + __months[3] = _M_data->_M_month04; + __months[4] = _M_data->_M_month05; + __months[5] = _M_data->_M_month06; + __months[6] = _M_data->_M_month07; + __months[7] = _M_data->_M_month08; + __months[8] = _M_data->_M_month09; + __months[9] = _M_data->_M_month10; + __months[10] = _M_data->_M_month11; + __months[11] = _M_data->_M_month12; + } + + void + _M_months_abbreviated(const _CharT** __months) const + { + __months[0] = _M_data->_M_amonth01; + __months[1] = _M_data->_M_amonth02; + __months[2] = _M_data->_M_amonth03; + __months[3] = _M_data->_M_amonth04; + __months[4] = _M_data->_M_amonth05; + __months[5] = _M_data->_M_amonth06; + __months[6] = _M_data->_M_amonth07; + __months[7] = _M_data->_M_amonth08; + __months[8] = _M_data->_M_amonth09; + __months[9] = _M_data->_M_amonth10; + __months[10] = _M_data->_M_amonth11; + __months[11] = _M_data->_M_amonth12; + } + + protected: + virtual + ~__timepunct(); + + + void + _M_initialize_timepunct(__c_locale __cloc = 0); + }; + + template + locale::id __timepunct<_CharT>::id; + + + template<> + void + __timepunct::_M_initialize_timepunct(__c_locale __cloc); + + template<> + void + __timepunct::_M_put(char*, size_t, const char*, const tm*) const throw (); + + + template<> + void + __timepunct::_M_initialize_timepunct(__c_locale __cloc); + + template<> + void + __timepunct::_M_put(wchar_t*, size_t, const wchar_t*, + const tm*) const throw (); + + + +} + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/time_members.h" 1 3 +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/time_members.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + template + __timepunct<_CharT>::__timepunct(size_t __refs) + : facet(__refs), _M_data(0), _M_c_locale_timepunct(0), + _M_name_timepunct(_S_get_c_name()) + { _M_initialize_timepunct(); } + + template + __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) + : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(0), + _M_name_timepunct(_S_get_c_name()) + { _M_initialize_timepunct(); } + + template + __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, + size_t __refs) + : facet(__refs), _M_data(0), _M_c_locale_timepunct(0), + _M_name_timepunct(0) + { + if (__builtin_strcmp(__s, _S_get_c_name()) != 0) + { + const size_t __len = __builtin_strlen(__s) + 1; + char* __tmp = new char[__len]; + __builtin_memcpy(__tmp, __s, __len); + _M_name_timepunct = __tmp; + } + else + _M_name_timepunct = _S_get_c_name(); + + try + { _M_initialize_timepunct(__cloc); } + catch(...) + { + if (_M_name_timepunct != _S_get_c_name()) + delete [] _M_name_timepunct; + throw; + } + } + + template + __timepunct<_CharT>::~__timepunct() + { + if (_M_name_timepunct != _S_get_c_name()) + delete [] _M_name_timepunct; + delete _M_data; + _S_destroy_c_locale(_M_c_locale_timepunct); + } + + +} +# 349 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 367 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + template + class time_get : public locale::facet, public time_base + { + public: + + + + typedef _CharT char_type; + typedef _InIter iter_type; + + typedef basic_string<_CharT> __string_type; + + + static locale::id id; +# 389 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + explicit + time_get(size_t __refs = 0) + : facet (__refs) { } +# 406 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + dateorder + date_order() const + { return this->do_date_order(); } +# 430 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + iter_type + get_time(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { return this->do_get_time(__beg, __end, __io, __err, __tm); } +# 455 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + iter_type + get_date(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { return this->do_get_date(__beg, __end, __io, __err, __tm); } +# 483 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + iter_type + get_weekday(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { return this->do_get_weekday(__beg, __end, __io, __err, __tm); } +# 512 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + iter_type + get_monthname(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { return this->do_get_monthname(__beg, __end, __io, __err, __tm); } +# 538 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + iter_type + get_year(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { return this->do_get_year(__beg, __end, __io, __err, __tm); } + + protected: + + virtual + ~time_get() { } +# 558 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual dateorder + do_date_order() const; +# 576 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual iter_type + do_get_time(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const; +# 595 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual iter_type + do_get_date(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const; +# 614 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual iter_type + do_get_weekday(iter_type __beg, iter_type __end, ios_base&, + ios_base::iostate& __err, tm* __tm) const; +# 633 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual iter_type + do_get_monthname(iter_type __beg, iter_type __end, ios_base&, + ios_base::iostate& __err, tm* __tm) const; +# 652 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual iter_type + do_get_year(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const; + + + iter_type + _M_extract_num(iter_type __beg, iter_type __end, int& __member, + int __min, int __max, size_t __len, + ios_base& __io, ios_base::iostate& __err) const; + + + iter_type + _M_extract_name(iter_type __beg, iter_type __end, int& __member, + const _CharT** __names, size_t __indexlen, + ios_base& __io, ios_base::iostate& __err) const; + + + iter_type + _M_extract_wday_or_month(iter_type __beg, iter_type __end, int& __member, + const _CharT** __names, size_t __indexlen, + ios_base& __io, ios_base::iostate& __err) const; + + + iter_type + _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm, + const _CharT* __format) const; + }; + + template + locale::id time_get<_CharT, _InIter>::id; + + + template + class time_get_byname : public time_get<_CharT, _InIter> + { + public: + + typedef _CharT char_type; + typedef _InIter iter_type; + + explicit + time_get_byname(const char*, size_t __refs = 0) + : time_get<_CharT, _InIter>(__refs) { } + + protected: + virtual + ~time_get_byname() { } + }; +# 714 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + template + class time_put : public locale::facet + { + public: + + + + typedef _CharT char_type; + typedef _OutIter iter_type; + + + + static locale::id id; +# 735 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + explicit + time_put(size_t __refs = 0) + : facet(__refs) { } +# 754 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + iter_type + put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, + const _CharT* __beg, const _CharT* __end) const; +# 774 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + iter_type + put(iter_type __s, ios_base& __io, char_type __fill, + const tm* __tm, char __format, char __mod = 0) const + { return this->do_put(__s, __io, __fill, __tm, __format, __mod); } + + protected: + + virtual + ~time_put() + { } +# 801 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, + char __format, char __mod) const; + }; + + template + locale::id time_put<_CharT, _OutIter>::id; + + + template + class time_put_byname : public time_put<_CharT, _OutIter> + { + public: + + typedef _CharT char_type; + typedef _OutIter iter_type; + + explicit + time_put_byname(const char*, size_t __refs = 0) + : time_put<_CharT, _OutIter>(__refs) + { }; + + protected: + virtual + ~time_put_byname() { } + }; +# 840 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + class money_base + { + public: + enum part { none, space, symbol, sign, value }; + struct pattern { char field[4]; }; + + static const pattern _S_default_pattern; + + enum + { + _S_minus, + _S_zero, + _S_end = 11 + }; + + + + static const char* _S_atoms; + + + + __attribute__ ((__const__)) static pattern + _S_construct_pattern(char __precedes, char __space, char __posn) throw (); + }; + + template + struct __moneypunct_cache : public locale::facet + { + const char* _M_grouping; + size_t _M_grouping_size; + bool _M_use_grouping; + _CharT _M_decimal_point; + _CharT _M_thousands_sep; + const _CharT* _M_curr_symbol; + size_t _M_curr_symbol_size; + const _CharT* _M_positive_sign; + size_t _M_positive_sign_size; + const _CharT* _M_negative_sign; + size_t _M_negative_sign_size; + int _M_frac_digits; + money_base::pattern _M_pos_format; + money_base::pattern _M_neg_format; + + + + + _CharT _M_atoms[money_base::_S_end]; + + bool _M_allocated; + + __moneypunct_cache(size_t __refs = 0) : facet(__refs), + _M_grouping(0), _M_grouping_size(0), _M_use_grouping(false), + _M_decimal_point(_CharT()), _M_thousands_sep(_CharT()), + _M_curr_symbol(0), _M_curr_symbol_size(0), + _M_positive_sign(0), _M_positive_sign_size(0), + _M_negative_sign(0), _M_negative_sign_size(0), + _M_frac_digits(0), + _M_pos_format(money_base::pattern()), + _M_neg_format(money_base::pattern()), _M_allocated(false) + { } + + ~__moneypunct_cache(); + + void + _M_cache(const locale& __loc); + + private: + __moneypunct_cache& + operator=(const __moneypunct_cache&); + + explicit + __moneypunct_cache(const __moneypunct_cache&); + }; + + template + __moneypunct_cache<_CharT, _Intl>::~__moneypunct_cache() + { + if (_M_allocated) + { + delete [] _M_grouping; + delete [] _M_curr_symbol; + delete [] _M_positive_sign; + delete [] _M_negative_sign; + } + } +# 933 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + template + class moneypunct : public locale::facet, public money_base + { + public: + + + + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + typedef __moneypunct_cache<_CharT, _Intl> __cache_type; + + private: + __cache_type* _M_data; + + public: + + + static const bool intl = _Intl; + + static locale::id id; +# 962 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + explicit + moneypunct(size_t __refs = 0) + : facet(__refs), _M_data(0) + { _M_initialize_moneypunct(); } +# 975 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + explicit + moneypunct(__cache_type* __cache, size_t __refs = 0) + : facet(__refs), _M_data(__cache) + { _M_initialize_moneypunct(); } +# 990 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + explicit + moneypunct(__c_locale __cloc, const char* __s, size_t __refs = 0) + : facet(__refs), _M_data(0) + { _M_initialize_moneypunct(__cloc, __s); } +# 1004 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + char_type + decimal_point() const + { return this->do_decimal_point(); } +# 1017 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + char_type + thousands_sep() const + { return this->do_thousands_sep(); } +# 1047 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + string + grouping() const + { return this->do_grouping(); } +# 1060 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + string_type + curr_symbol() const + { return this->do_curr_symbol(); } +# 1077 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + string_type + positive_sign() const + { return this->do_positive_sign(); } +# 1094 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + string_type + negative_sign() const + { return this->do_negative_sign(); } +# 1110 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + int + frac_digits() const + { return this->do_frac_digits(); } +# 1146 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + pattern + pos_format() const + { return this->do_pos_format(); } + + pattern + neg_format() const + { return this->do_neg_format(); } + + + protected: + + virtual + ~moneypunct(); +# 1168 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual char_type + do_decimal_point() const + { return _M_data->_M_decimal_point; } +# 1180 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual char_type + do_thousands_sep() const + { return _M_data->_M_thousands_sep; } +# 1193 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual string + do_grouping() const + { return _M_data->_M_grouping; } +# 1206 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual string_type + do_curr_symbol() const + { return _M_data->_M_curr_symbol; } +# 1219 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual string_type + do_positive_sign() const + { return _M_data->_M_positive_sign; } +# 1232 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual string_type + do_negative_sign() const + { return _M_data->_M_negative_sign; } +# 1246 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual int + do_frac_digits() const + { return _M_data->_M_frac_digits; } +# 1260 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual pattern + do_pos_format() const + { return _M_data->_M_pos_format; } +# 1274 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual pattern + do_neg_format() const + { return _M_data->_M_neg_format; } + + + void + _M_initialize_moneypunct(__c_locale __cloc = 0, + const char* __name = 0); + }; + + template + locale::id moneypunct<_CharT, _Intl>::id; + + template + const bool moneypunct<_CharT, _Intl>::intl; + + template<> + moneypunct::~moneypunct(); + + template<> + moneypunct::~moneypunct(); + + template<> + void + moneypunct::_M_initialize_moneypunct(__c_locale, const char*); + + template<> + void + moneypunct::_M_initialize_moneypunct(__c_locale, const char*); + + + template<> + moneypunct::~moneypunct(); + + template<> + moneypunct::~moneypunct(); + + template<> + void + moneypunct::_M_initialize_moneypunct(__c_locale, + const char*); + + template<> + void + moneypunct::_M_initialize_moneypunct(__c_locale, + const char*); + + + + template + class moneypunct_byname : public moneypunct<_CharT, _Intl> + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + static const bool intl = _Intl; + + explicit + moneypunct_byname(const char* __s, size_t __refs = 0) + : moneypunct<_CharT, _Intl>(__refs) + { + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + __c_locale __tmp; + this->_S_create_c_locale(__tmp, __s); + this->_M_initialize_moneypunct(__tmp); + this->_S_destroy_c_locale(__tmp); + } + } + + protected: + virtual + ~moneypunct_byname() { } + }; + + template + const bool moneypunct_byname<_CharT, _Intl>::intl; + + +# 1369 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + template + class money_get : public locale::facet + { + public: + + + + typedef _CharT char_type; + typedef _InIter iter_type; + typedef basic_string<_CharT> string_type; + + + + static locale::id id; +# 1391 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + explicit + money_get(size_t __refs = 0) : facet(__refs) { } +# 1421 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + iter_type + get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, + ios_base::iostate& __err, long double& __units) const + { return this->do_get(__s, __end, __intl, __io, __err, __units); } +# 1452 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + iter_type + get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, + ios_base::iostate& __err, string_type& __digits) const + { return this->do_get(__s, __end, __intl, __io, __err, __digits); } + + protected: + + virtual + ~money_get() { } +# 1475 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual iter_type + do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, + ios_base::iostate& __err, long double& __units) const; +# 1487 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual iter_type + do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, + ios_base::iostate& __err, string_type& __digits) const; +# 1498 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + template + iter_type + _M_extract(iter_type __s, iter_type __end, ios_base& __io, + ios_base::iostate& __err, string& __digits) const; + }; + + template + locale::id money_get<_CharT, _InIter>::id; +# 1520 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + template + class money_put : public locale::facet + { + public: + + + typedef _CharT char_type; + typedef _OutIter iter_type; + typedef basic_string<_CharT> string_type; + + + + static locale::id id; +# 1541 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + explicit + money_put(size_t __refs = 0) : facet(__refs) { } +# 1561 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + iter_type + put(iter_type __s, bool __intl, ios_base& __io, + char_type __fill, long double __units) const + { return this->do_put(__s, __intl, __io, __fill, __units); } +# 1584 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + iter_type + put(iter_type __s, bool __intl, ios_base& __io, + char_type __fill, const string_type& __digits) const + { return this->do_put(__s, __intl, __io, __fill, __digits); } + + protected: + + virtual + ~money_put() { } +# 1618 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual iter_type + do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, + long double __units) const; +# 1642 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual iter_type + do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, + const string_type& __digits) const; +# 1653 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + template + iter_type + _M_insert(iter_type __s, ios_base& __io, char_type __fill, + const string_type& __digits) const; + }; + + template + locale::id money_put<_CharT, _OutIter>::id; + + + + + + + + struct messages_base + { + typedef int catalog; + }; +# 1694 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + template + class messages : public locale::facet, public messages_base + { + public: + + + + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + + protected: + + + __c_locale _M_c_locale_messages; + const char* _M_name_messages; + + public: + + static locale::id id; +# 1722 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + explicit + messages(size_t __refs = 0); +# 1736 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + explicit + messages(__c_locale __cloc, const char* __s, size_t __refs = 0); +# 1749 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + catalog + open(const basic_string& __s, const locale& __loc) const + { return this->do_open(__s, __loc); } +# 1767 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + catalog + open(const basic_string&, const locale&, const char*) const; +# 1785 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + string_type + get(catalog __c, int __set, int __msgid, const string_type& __s) const + { return this->do_get(__c, __set, __msgid, __s); } +# 1796 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + void + close(catalog __c) const + { return this->do_close(__c); } + + protected: + + virtual + ~messages(); +# 1816 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual catalog + do_open(const basic_string&, const locale&) const; +# 1835 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + virtual string_type + do_get(catalog, int, int, const string_type& __dfault) const; + + + + + + + virtual void + do_close(catalog) const; + + + char* + _M_convert_to_char(const string_type& __msg) const + { + + return reinterpret_cast(const_cast<_CharT*>(__msg.c_str())); + } + + + string_type + _M_convert_from_char(char*) const + { +# 1892 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 3 + return string_type(); + } + }; + + template + locale::id messages<_CharT>::id; + + + template<> + string + messages::do_get(catalog, int, int, const string&) const; + + + template<> + wstring + messages::do_get(catalog, int, int, const wstring&) const; + + + + template + class messages_byname : public messages<_CharT> + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + explicit + messages_byname(const char* __s, size_t __refs = 0); + + protected: + virtual + ~messages_byname() + { } + }; + + +} + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/messages_members.h" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/messages_members.h" 3 +# 1 "/usr/include/libintl.h" 1 3 4 +# 35 "/usr/include/libintl.h" 3 4 +extern "C" { + + + + +extern char *gettext (__const char *__msgid) + throw () __attribute__ ((__format_arg__ (1))); + + + +extern char *dgettext (__const char *__domainname, __const char *__msgid) + throw () __attribute__ ((__format_arg__ (2))); +extern char *__dgettext (__const char *__domainname, __const char *__msgid) + throw () __attribute__ ((__format_arg__ (2))); + + + +extern char *dcgettext (__const char *__domainname, + __const char *__msgid, int __category) + throw () __attribute__ ((__format_arg__ (2))); +extern char *__dcgettext (__const char *__domainname, + __const char *__msgid, int __category) + throw () __attribute__ ((__format_arg__ (2))); + + + + +extern char *ngettext (__const char *__msgid1, __const char *__msgid2, + unsigned long int __n) + throw () __attribute__ ((__format_arg__ (1))) __attribute__ ((__format_arg__ (2))); + + + +extern char *dngettext (__const char *__domainname, __const char *__msgid1, + __const char *__msgid2, unsigned long int __n) + throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); + + + +extern char *dcngettext (__const char *__domainname, __const char *__msgid1, + __const char *__msgid2, unsigned long int __n, + int __category) + throw () __attribute__ ((__format_arg__ (2))) __attribute__ ((__format_arg__ (3))); + + + + + +extern char *textdomain (__const char *__domainname) throw (); + + + +extern char *bindtextdomain (__const char *__domainname, + __const char *__dirname) throw (); + + + +extern char *bind_textdomain_codeset (__const char *__domainname, + __const char *__codeset) throw (); +# 122 "/usr/include/libintl.h" 3 4 +} +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu/bits/messages_members.h" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + + template + messages<_CharT>::messages(size_t __refs) + : facet(__refs), _M_c_locale_messages(_S_get_c_locale()), + _M_name_messages(_S_get_c_name()) + { } + + template + messages<_CharT>::messages(__c_locale __cloc, const char* __s, + size_t __refs) + : facet(__refs), _M_c_locale_messages(0), _M_name_messages(0) + { + if (__builtin_strcmp(__s, _S_get_c_name()) != 0) + { + const size_t __len = __builtin_strlen(__s) + 1; + char* __tmp = new char[__len]; + __builtin_memcpy(__tmp, __s, __len); + _M_name_messages = __tmp; + } + else + _M_name_messages = _S_get_c_name(); + + + _M_c_locale_messages = _S_clone_c_locale(__cloc); + } + + template + typename messages<_CharT>::catalog + messages<_CharT>::open(const basic_string& __s, const locale& __loc, + const char* __dir) const + { + bindtextdomain(__s.c_str(), __dir); + return this->do_open(__s, __loc); + } + + + template + messages<_CharT>::~messages() + { + if (_M_name_messages != _S_get_c_name()) + delete [] _M_name_messages; + _S_destroy_c_locale(_M_c_locale_messages); + } + + template + typename messages<_CharT>::catalog + messages<_CharT>::do_open(const basic_string& __s, + const locale&) const + { + + + textdomain(__s.c_str()); + return 0; + } + + template + void + messages<_CharT>::do_close(catalog) const + { } + + + template + messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs) + : messages<_CharT>(__refs) + { + if (this->_M_name_messages != locale::facet::_S_get_c_name()) + { + delete [] this->_M_name_messages; + if (__builtin_strcmp(__s, locale::facet::_S_get_c_name()) != 0) + { + const size_t __len = __builtin_strlen(__s) + 1; + char* __tmp = new char[__len]; + __builtin_memcpy(__tmp, __s, __len); + this->_M_name_messages = __tmp; + } + else + this->_M_name_messages = locale::facet::_S_get_c_name(); + } + + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + this->_S_destroy_c_locale(this->_M_c_locale_messages); + this->_S_create_c_locale(this->_M_c_locale_messages, __s); + } + } + + +} +# 1932 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 2 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/codecvt.h" 1 3 +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/codecvt.h" 3 + +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/codecvt.h" 3 + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + + class codecvt_base + { + public: + enum result + { + ok, + partial, + error, + noconv + }; + }; +# 68 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/codecvt.h" 3 + template + class __codecvt_abstract_base + : public locale::facet, public codecvt_base + { + public: + + typedef codecvt_base::result result; + typedef _InternT intern_type; + typedef _ExternT extern_type; + typedef _StateT state_type; +# 116 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/codecvt.h" 3 + result + out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const + { + return this->do_out(__state, __from, __from_end, __from_next, + __to, __to_end, __to_next); + } +# 155 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/codecvt.h" 3 + result + unshift(state_type& __state, extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const + { return this->do_unshift(__state, __to,__to_end,__to_next); } +# 196 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/codecvt.h" 3 + result + in(state_type& __state, const extern_type* __from, + const extern_type* __from_end, const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const + { + return this->do_in(__state, __from, __from_end, __from_next, + __to, __to_end, __to_next); + } + + int + encoding() const throw() + { return this->do_encoding(); } + + bool + always_noconv() const throw() + { return this->do_always_noconv(); } + + int + length(state_type& __state, const extern_type* __from, + const extern_type* __end, size_t __max) const + { return this->do_length(__state, __from, __end, __max); } + + int + max_length() const throw() + { return this->do_max_length(); } + + protected: + explicit + __codecvt_abstract_base(size_t __refs = 0) : locale::facet(__refs) { } + + virtual + ~__codecvt_abstract_base() { } +# 237 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/codecvt.h" 3 + virtual result + do_out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const = 0; + + virtual result + do_unshift(state_type& __state, extern_type* __to, + extern_type* __to_end, extern_type*& __to_next) const = 0; + + virtual result + do_in(state_type& __state, const extern_type* __from, + const extern_type* __from_end, const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const = 0; + + virtual int + do_encoding() const throw() = 0; + + virtual bool + do_always_noconv() const throw() = 0; + + virtual int + do_length(state_type&, const extern_type* __from, + const extern_type* __end, size_t __max) const = 0; + + virtual int + do_max_length() const throw() = 0; + }; +# 276 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/codecvt.h" 3 + template + class codecvt + : public __codecvt_abstract_base<_InternT, _ExternT, _StateT> + { + public: + + typedef codecvt_base::result result; + typedef _InternT intern_type; + typedef _ExternT extern_type; + typedef _StateT state_type; + + protected: + __c_locale _M_c_locale_codecvt; + + public: + static locale::id id; + + explicit + codecvt(size_t __refs = 0) + : __codecvt_abstract_base<_InternT, _ExternT, _StateT> (__refs) { } + + explicit + codecvt(__c_locale __cloc, size_t __refs = 0); + + protected: + virtual + ~codecvt() { } + + virtual result + do_out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const; + + virtual result + do_unshift(state_type& __state, extern_type* __to, + extern_type* __to_end, extern_type*& __to_next) const; + + virtual result + do_in(state_type& __state, const extern_type* __from, + const extern_type* __from_end, const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const; + + virtual int + do_encoding() const throw(); + + virtual bool + do_always_noconv() const throw(); + + virtual int + do_length(state_type&, const extern_type* __from, + const extern_type* __end, size_t __max) const; + + virtual int + do_max_length() const throw(); + }; + + template + locale::id codecvt<_InternT, _ExternT, _StateT>::id; + + + template<> + class codecvt + : public __codecvt_abstract_base + { + public: + + typedef char intern_type; + typedef char extern_type; + typedef mbstate_t state_type; + + protected: + __c_locale _M_c_locale_codecvt; + + public: + static locale::id id; + + explicit + codecvt(size_t __refs = 0); + + explicit + codecvt(__c_locale __cloc, size_t __refs = 0); + + protected: + virtual + ~codecvt(); + + virtual result + do_out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const; + + virtual result + do_unshift(state_type& __state, extern_type* __to, + extern_type* __to_end, extern_type*& __to_next) const; + + virtual result + do_in(state_type& __state, const extern_type* __from, + const extern_type* __from_end, const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const; + + virtual int + do_encoding() const throw(); + + virtual bool + do_always_noconv() const throw(); + + virtual int + do_length(state_type&, const extern_type* __from, + const extern_type* __end, size_t __max) const; + + virtual int + do_max_length() const throw(); + }; + + + + template<> + class codecvt + : public __codecvt_abstract_base + { + public: + + typedef wchar_t intern_type; + typedef char extern_type; + typedef mbstate_t state_type; + + protected: + __c_locale _M_c_locale_codecvt; + + public: + static locale::id id; + + explicit + codecvt(size_t __refs = 0); + + explicit + codecvt(__c_locale __cloc, size_t __refs = 0); + + protected: + virtual + ~codecvt(); + + virtual result + do_out(state_type& __state, const intern_type* __from, + const intern_type* __from_end, const intern_type*& __from_next, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const; + + virtual result + do_unshift(state_type& __state, + extern_type* __to, extern_type* __to_end, + extern_type*& __to_next) const; + + virtual result + do_in(state_type& __state, + const extern_type* __from, const extern_type* __from_end, + const extern_type*& __from_next, + intern_type* __to, intern_type* __to_end, + intern_type*& __to_next) const; + + virtual + int do_encoding() const throw(); + + virtual + bool do_always_noconv() const throw(); + + virtual + int do_length(state_type&, const extern_type* __from, + const extern_type* __end, size_t __max) const; + + virtual int + do_max_length() const throw(); + }; + + + + template + class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT> + { + public: + explicit + codecvt_byname(const char* __s, size_t __refs = 0) + : codecvt<_InternT, _ExternT, _StateT>(__refs) + { + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + this->_S_destroy_c_locale(this->_M_c_locale_codecvt); + this->_S_create_c_locale(this->_M_c_locale_codecvt, __s); + } + } + + protected: + virtual + ~codecvt_byname() { } + }; + + + + + extern template class codecvt_byname; + + extern template + const codecvt& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + extern template class codecvt_byname; + + extern template + const codecvt& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + + +} +# 1935 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 2 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.tcc" 1 3 +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.tcc" 3 + +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.tcc" 3 + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + template + struct __use_cache<__moneypunct_cache<_CharT, _Intl> > + { + const __moneypunct_cache<_CharT, _Intl>* + operator() (const locale& __loc) const + { + const size_t __i = moneypunct<_CharT, _Intl>::id._M_id(); + const locale::facet** __caches = __loc._M_impl->_M_caches; + if (!__caches[__i]) + { + __moneypunct_cache<_CharT, _Intl>* __tmp = 0; + try + { + __tmp = new __moneypunct_cache<_CharT, _Intl>; + __tmp->_M_cache(__loc); + } + catch(...) + { + delete __tmp; + throw; + } + __loc._M_impl->_M_install_cache(__tmp, __i); + } + return static_cast< + const __moneypunct_cache<_CharT, _Intl>*>(__caches[__i]); + } + }; + + template + void + __moneypunct_cache<_CharT, _Intl>::_M_cache(const locale& __loc) + { + _M_allocated = true; + + const moneypunct<_CharT, _Intl>& __mp = + use_facet >(__loc); + + _M_decimal_point = __mp.decimal_point(); + _M_thousands_sep = __mp.thousands_sep(); + _M_frac_digits = __mp.frac_digits(); + + char* __grouping = 0; + _CharT* __curr_symbol = 0; + _CharT* __positive_sign = 0; + _CharT* __negative_sign = 0; + try + { + _M_grouping_size = __mp.grouping().size(); + __grouping = new char[_M_grouping_size]; + __mp.grouping().copy(__grouping, _M_grouping_size); + _M_grouping = __grouping; + _M_use_grouping = (_M_grouping_size + && static_cast(_M_grouping[0]) > 0 + && (_M_grouping[0] + != __gnu_cxx::__numeric_traits::__max)); + + _M_curr_symbol_size = __mp.curr_symbol().size(); + __curr_symbol = new _CharT[_M_curr_symbol_size]; + __mp.curr_symbol().copy(__curr_symbol, _M_curr_symbol_size); + _M_curr_symbol = __curr_symbol; + + _M_positive_sign_size = __mp.positive_sign().size(); + __positive_sign = new _CharT[_M_positive_sign_size]; + __mp.positive_sign().copy(__positive_sign, _M_positive_sign_size); + _M_positive_sign = __positive_sign; + + _M_negative_sign_size = __mp.negative_sign().size(); + __negative_sign = new _CharT[_M_negative_sign_size]; + __mp.negative_sign().copy(__negative_sign, _M_negative_sign_size); + _M_negative_sign = __negative_sign; + + _M_pos_format = __mp.pos_format(); + _M_neg_format = __mp.neg_format(); + + const ctype<_CharT>& __ct = use_facet >(__loc); + __ct.widen(money_base::_S_atoms, + money_base::_S_atoms + money_base::_S_end, _M_atoms); + } + catch(...) + { + delete [] __grouping; + delete [] __curr_symbol; + delete [] __positive_sign; + delete [] __negative_sign; + throw; + } + } + + + + template + template + _InIter + money_get<_CharT, _InIter>:: + _M_extract(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, string& __units) const + { + typedef char_traits<_CharT> __traits_type; + typedef typename string_type::size_type size_type; + typedef money_base::part part; + typedef __moneypunct_cache<_CharT, _Intl> __cache_type; + + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + + __use_cache<__cache_type> __uc; + const __cache_type* __lc = __uc(__loc); + const char_type* __lit = __lc->_M_atoms; + + + bool __negative = false; + + size_type __sign_size = 0; + + const bool __mandatory_sign = (__lc->_M_positive_sign_size + && __lc->_M_negative_sign_size); + + string __grouping_tmp; + if (__lc->_M_use_grouping) + __grouping_tmp.reserve(32); + + int __last_pos = 0; + + int __n = 0; + + bool __testvalid = true; + + bool __testdecfound = false; + + + string __res; + __res.reserve(32); + + const char_type* __lit_zero = __lit + money_base::_S_zero; + const money_base::pattern __p = __lc->_M_neg_format; + for (int __i = 0; __i < 4 && __testvalid; ++__i) + { + const part __which = static_cast(__p.field[__i]); + switch (__which) + { + case money_base::symbol: + + + + + if (__io.flags() & ios_base::showbase || __sign_size > 1 + || __i == 0 + || (__i == 1 && (__mandatory_sign + || (static_cast(__p.field[0]) + == money_base::sign) + || (static_cast(__p.field[2]) + == money_base::space))) + || (__i == 2 && ((static_cast(__p.field[3]) + == money_base::value) + || (__mandatory_sign + && (static_cast(__p.field[3]) + == money_base::sign))))) + { + const size_type __len = __lc->_M_curr_symbol_size; + size_type __j = 0; + for (; __beg != __end && __j < __len + && *__beg == __lc->_M_curr_symbol[__j]; + ++__beg, ++__j); + if (__j != __len + && (__j || __io.flags() & ios_base::showbase)) + __testvalid = false; + } + break; + case money_base::sign: + + if (__lc->_M_positive_sign_size && __beg != __end + && *__beg == __lc->_M_positive_sign[0]) + { + __sign_size = __lc->_M_positive_sign_size; + ++__beg; + } + else if (__lc->_M_negative_sign_size && __beg != __end + && *__beg == __lc->_M_negative_sign[0]) + { + __negative = true; + __sign_size = __lc->_M_negative_sign_size; + ++__beg; + } + else if (__lc->_M_positive_sign_size + && !__lc->_M_negative_sign_size) + + + __negative = true; + else if (__mandatory_sign) + __testvalid = false; + break; + case money_base::value: + + + for (; __beg != __end; ++__beg) + { + const char_type __c = *__beg; + const char_type* __q = __traits_type::find(__lit_zero, + 10, __c); + if (__q != 0) + { + __res += money_base::_S_atoms[__q - __lit]; + ++__n; + } + else if (__c == __lc->_M_decimal_point + && !__testdecfound) + { + if (__lc->_M_frac_digits <= 0) + break; + + __last_pos = __n; + __n = 0; + __testdecfound = true; + } + else if (__lc->_M_use_grouping + && __c == __lc->_M_thousands_sep + && !__testdecfound) + { + if (__n) + { + + __grouping_tmp += static_cast(__n); + __n = 0; + } + else + { + __testvalid = false; + break; + } + } + else + break; + } + if (__res.empty()) + __testvalid = false; + break; + case money_base::space: + + if (__beg != __end && __ctype.is(ctype_base::space, *__beg)) + ++__beg; + else + __testvalid = false; + case money_base::none: + + if (__i != 3) + for (; __beg != __end + && __ctype.is(ctype_base::space, *__beg); ++__beg); + break; + } + } + + + if (__sign_size > 1 && __testvalid) + { + const char_type* __sign = __negative ? __lc->_M_negative_sign + : __lc->_M_positive_sign; + size_type __i = 1; + for (; __beg != __end && __i < __sign_size + && *__beg == __sign[__i]; ++__beg, ++__i); + + if (__i != __sign_size) + __testvalid = false; + } + + if (__testvalid) + { + + if (__res.size() > 1) + { + const size_type __first = __res.find_first_not_of('0'); + const bool __only_zeros = __first == string::npos; + if (__first) + __res.erase(0, __only_zeros ? __res.size() - 1 : __first); + } + + + if (__negative && __res[0] != '0') + __res.insert(__res.begin(), '-'); + + + if (__grouping_tmp.size()) + { + + __grouping_tmp += static_cast(__testdecfound ? __last_pos + : __n); + if (!std::__verify_grouping(__lc->_M_grouping, + __lc->_M_grouping_size, + __grouping_tmp)) + __err |= ios_base::failbit; + } + + + if (__testdecfound && __n != __lc->_M_frac_digits) + __testvalid = false; + } + + + if (!__testvalid) + __err |= ios_base::failbit; + else + __units.swap(__res); + + + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } +# 362 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.tcc" 3 + template + _InIter + money_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, + ios_base::iostate& __err, long double& __units) const + { + string __str; + __beg = __intl ? _M_extract(__beg, __end, __io, __err, __str) + : _M_extract(__beg, __end, __io, __err, __str); + std::__convert_to_v(__str.c_str(), __units, __err, _S_get_c_locale()); + return __beg; + } + + template + _InIter + money_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, + ios_base::iostate& __err, string_type& __digits) const + { + typedef typename string::size_type size_type; + + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + + string __str; + __beg = __intl ? _M_extract(__beg, __end, __io, __err, __str) + : _M_extract(__beg, __end, __io, __err, __str); + const size_type __len = __str.size(); + if (__len) + { + __digits.resize(__len); + __ctype.widen(__str.data(), __str.data() + __len, &__digits[0]); + } + return __beg; + } + + template + template + _OutIter + money_put<_CharT, _OutIter>:: + _M_insert(iter_type __s, ios_base& __io, char_type __fill, + const string_type& __digits) const + { + typedef typename string_type::size_type size_type; + typedef money_base::part part; + typedef __moneypunct_cache<_CharT, _Intl> __cache_type; + + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + + __use_cache<__cache_type> __uc; + const __cache_type* __lc = __uc(__loc); + const char_type* __lit = __lc->_M_atoms; + + + + const char_type* __beg = __digits.data(); + + money_base::pattern __p; + const char_type* __sign; + size_type __sign_size; + if (!(*__beg == __lit[money_base::_S_minus])) + { + __p = __lc->_M_pos_format; + __sign = __lc->_M_positive_sign; + __sign_size = __lc->_M_positive_sign_size; + } + else + { + __p = __lc->_M_neg_format; + __sign = __lc->_M_negative_sign; + __sign_size = __lc->_M_negative_sign_size; + if (__digits.size()) + ++__beg; + } + + + size_type __len = __ctype.scan_not(ctype_base::digit, __beg, + __beg + __digits.size()) - __beg; + if (__len) + { + + + + string_type __value; + __value.reserve(2 * __len); + + + + long __paddec = __len - __lc->_M_frac_digits; + if (__paddec > 0) + { + if (__lc->_M_frac_digits < 0) + __paddec = __len; + if (__lc->_M_grouping_size) + { + __value.assign(2 * __paddec, char_type()); + _CharT* __vend = + std::__add_grouping(&__value[0], __lc->_M_thousands_sep, + __lc->_M_grouping, + __lc->_M_grouping_size, + __beg, __beg + __paddec); + __value.erase(__vend - &__value[0]); + } + else + __value.assign(__beg, __paddec); + } + + + if (__lc->_M_frac_digits > 0) + { + __value += __lc->_M_decimal_point; + if (__paddec >= 0) + __value.append(__beg + __paddec, __lc->_M_frac_digits); + else + { + + __value.append(-__paddec, __lit[money_base::_S_zero]); + __value.append(__beg, __len); + } + } + + + const ios_base::fmtflags __f = __io.flags() + & ios_base::adjustfield; + __len = __value.size() + __sign_size; + __len += ((__io.flags() & ios_base::showbase) + ? __lc->_M_curr_symbol_size : 0); + + string_type __res; + __res.reserve(2 * __len); + + const size_type __width = static_cast(__io.width()); + const bool __testipad = (__f == ios_base::internal + && __len < __width); + + for (int __i = 0; __i < 4; ++__i) + { + const part __which = static_cast(__p.field[__i]); + switch (__which) + { + case money_base::symbol: + if (__io.flags() & ios_base::showbase) + __res.append(__lc->_M_curr_symbol, + __lc->_M_curr_symbol_size); + break; + case money_base::sign: + + + + if (__sign_size) + __res += __sign[0]; + break; + case money_base::value: + __res += __value; + break; + case money_base::space: + + + + if (__testipad) + __res.append(__width - __len, __fill); + else + __res += __fill; + break; + case money_base::none: + if (__testipad) + __res.append(__width - __len, __fill); + break; + } + } + + + if (__sign_size > 1) + __res.append(__sign + 1, __sign_size - 1); + + + __len = __res.size(); + if (__width > __len) + { + if (__f == ios_base::left) + + __res.append(__width - __len, __fill); + else + + __res.insert(0, __width - __len, __fill); + __len = __width; + } + + + __s = std::__write(__s, __res.data(), __len); + } + __io.width(0); + return __s; + } +# 567 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.tcc" 3 + template + _OutIter + money_put<_CharT, _OutIter>:: + do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, + long double __units) const + { + const locale __loc = __io.getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + + + int __cs_size = 64; + char* __cs = static_cast(__builtin_alloca(__cs_size)); + + + int __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, + "%.*Lf", 0, __units); + + if (__len >= __cs_size) + { + __cs_size = __len + 1; + __cs = static_cast(__builtin_alloca(__cs_size)); + __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, + "%.*Lf", 0, __units); + } +# 599 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.tcc" 3 + string_type __digits(__len, char_type()); + __ctype.widen(__cs, __cs + __len, &__digits[0]); + return __intl ? _M_insert(__s, __io, __fill, __digits) + : _M_insert(__s, __io, __fill, __digits); + } + + template + _OutIter + money_put<_CharT, _OutIter>:: + do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill, + const string_type& __digits) const + { return __intl ? _M_insert(__s, __io, __fill, __digits) + : _M_insert(__s, __io, __fill, __digits); } + + + + + + + template + time_base::dateorder + time_get<_CharT, _InIter>::do_date_order() const + { return time_base::no_order; } + + + + template + _InIter + time_get<_CharT, _InIter>:: + _M_extract_via_format(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm, + const _CharT* __format) const + { + const locale& __loc = __io._M_getloc(); + const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); + const ctype<_CharT>& __ctype = use_facet >(__loc); + const size_t __len = char_traits<_CharT>::length(__format); + + ios_base::iostate __tmperr = ios_base::goodbit; + size_t __i = 0; + for (; __beg != __end && __i < __len && !__tmperr; ++__i) + { + if (__ctype.narrow(__format[__i], 0) == '%') + { + + char __c = __ctype.narrow(__format[++__i], 0); + int __mem = 0; + if (__c == 'E' || __c == 'O') + __c = __ctype.narrow(__format[++__i], 0); + switch (__c) + { + const char* __cs; + _CharT __wcs[10]; + case 'a': + + const char_type* __days1[7]; + __tp._M_days_abbreviated(__days1); + __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days1, + 7, __io, __tmperr); + break; + case 'A': + + const char_type* __days2[7]; + __tp._M_days(__days2); + __beg = _M_extract_name(__beg, __end, __tm->tm_wday, __days2, + 7, __io, __tmperr); + break; + case 'h': + case 'b': + + const char_type* __months1[12]; + __tp._M_months_abbreviated(__months1); + __beg = _M_extract_name(__beg, __end, __tm->tm_mon, + __months1, 12, __io, __tmperr); + break; + case 'B': + + const char_type* __months2[12]; + __tp._M_months(__months2); + __beg = _M_extract_name(__beg, __end, __tm->tm_mon, + __months2, 12, __io, __tmperr); + break; + case 'c': + + const char_type* __dt[2]; + __tp._M_date_time_formats(__dt); + __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, + __tm, __dt[0]); + break; + case 'd': + + __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 1, 31, 2, + __io, __tmperr); + break; + case 'e': + + + if (__ctype.is(ctype_base::space, *__beg)) + __beg = _M_extract_num(++__beg, __end, __tm->tm_mday, 1, 9, + 1, __io, __tmperr); + else + __beg = _M_extract_num(__beg, __end, __tm->tm_mday, 10, 31, + 2, __io, __tmperr); + break; + case 'D': + + __cs = "%m/%d/%y"; + __ctype.widen(__cs, __cs + 9, __wcs); + __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, + __tm, __wcs); + break; + case 'H': + + __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 0, 23, 2, + __io, __tmperr); + break; + case 'I': + + __beg = _M_extract_num(__beg, __end, __tm->tm_hour, 1, 12, 2, + __io, __tmperr); + break; + case 'm': + + __beg = _M_extract_num(__beg, __end, __mem, 1, 12, 2, + __io, __tmperr); + if (!__tmperr) + __tm->tm_mon = __mem - 1; + break; + case 'M': + + __beg = _M_extract_num(__beg, __end, __tm->tm_min, 0, 59, 2, + __io, __tmperr); + break; + case 'n': + if (__ctype.narrow(*__beg, 0) == '\n') + ++__beg; + else + __tmperr |= ios_base::failbit; + break; + case 'R': + + __cs = "%H:%M"; + __ctype.widen(__cs, __cs + 6, __wcs); + __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, + __tm, __wcs); + break; + case 'S': + + + + __beg = _M_extract_num(__beg, __end, __tm->tm_sec, 0, 60, 2, + + + + __io, __tmperr); + break; + case 't': + if (__ctype.narrow(*__beg, 0) == '\t') + ++__beg; + else + __tmperr |= ios_base::failbit; + break; + case 'T': + + __cs = "%H:%M:%S"; + __ctype.widen(__cs, __cs + 9, __wcs); + __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, + __tm, __wcs); + break; + case 'x': + + const char_type* __dates[2]; + __tp._M_date_formats(__dates); + __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, + __tm, __dates[0]); + break; + case 'X': + + const char_type* __times[2]; + __tp._M_time_formats(__times); + __beg = _M_extract_via_format(__beg, __end, __io, __tmperr, + __tm, __times[0]); + break; + case 'y': + case 'C': + + case 'Y': + + + + + __beg = _M_extract_num(__beg, __end, __mem, 0, 9999, 4, + __io, __tmperr); + if (!__tmperr) + __tm->tm_year = __mem < 0 ? __mem + 100 : __mem - 1900; + break; + case 'Z': + + if (__ctype.is(ctype_base::upper, *__beg)) + { + int __tmp; + __beg = _M_extract_name(__beg, __end, __tmp, + __timepunct_cache<_CharT>::_S_timezones, + 14, __io, __tmperr); + + + if (__beg != __end && !__tmperr && __tmp == 0 + && (*__beg == __ctype.widen('-') + || *__beg == __ctype.widen('+'))) + { + __beg = _M_extract_num(__beg, __end, __tmp, 0, 23, 2, + __io, __tmperr); + __beg = _M_extract_num(__beg, __end, __tmp, 0, 59, 2, + __io, __tmperr); + } + } + else + __tmperr |= ios_base::failbit; + break; + default: + + __tmperr |= ios_base::failbit; + } + } + else + { + + if (__format[__i] == *__beg) + ++__beg; + else + __tmperr |= ios_base::failbit; + } + } + + if (__tmperr || __i != __len) + __err |= ios_base::failbit; + + return __beg; + } + + template + _InIter + time_get<_CharT, _InIter>:: + _M_extract_num(iter_type __beg, iter_type __end, int& __member, + int __min, int __max, size_t __len, + ios_base& __io, ios_base::iostate& __err) const + { + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + + + int __mult = __len == 2 ? 10 : (__len == 4 ? 1000 : 1); + + ++__min; + size_t __i = 0; + int __value = 0; + for (; __beg != __end && __i < __len; ++__beg, ++__i) + { + const char __c = __ctype.narrow(*__beg, '*'); + if (__c >= '0' && __c <= '9') + { + __value = __value * 10 + (__c - '0'); + const int __valuec = __value * __mult; + if (__valuec > __max || __valuec + __mult < __min) + break; + __mult /= 10; + } + else + break; + } + if (__i == __len) + __member = __value; + + else if (__len == 4 && __i == 2) + __member = __value - 100; + else + __err |= ios_base::failbit; + + return __beg; + } + + + + template + _InIter + time_get<_CharT, _InIter>:: + _M_extract_name(iter_type __beg, iter_type __end, int& __member, + const _CharT** __names, size_t __indexlen, + ios_base& __io, ios_base::iostate& __err) const + { + typedef char_traits<_CharT> __traits_type; + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + + int* __matches = static_cast(__builtin_alloca(sizeof(int) + * __indexlen)); + size_t __nmatches = 0; + size_t __pos = 0; + bool __testvalid = true; + const char_type* __name; + + + + + + if (__beg != __end) + { + const char_type __c = *__beg; + for (size_t __i1 = 0; __i1 < __indexlen; ++__i1) + if (__c == __names[__i1][0] + || __c == __ctype.toupper(__names[__i1][0])) + __matches[__nmatches++] = __i1; + } + + while (__nmatches > 1) + { + + size_t __minlen = __traits_type::length(__names[__matches[0]]); + for (size_t __i2 = 1; __i2 < __nmatches; ++__i2) + __minlen = std::min(__minlen, + __traits_type::length(__names[__matches[__i2]])); + ++__beg, ++__pos; + if (__pos < __minlen && __beg != __end) + for (size_t __i3 = 0; __i3 < __nmatches;) + { + __name = __names[__matches[__i3]]; + if (!(__name[__pos] == *__beg)) + __matches[__i3] = __matches[--__nmatches]; + else + ++__i3; + } + else + break; + } + + if (__nmatches == 1) + { + + ++__beg, ++__pos; + __name = __names[__matches[0]]; + const size_t __len = __traits_type::length(__name); + while (__pos < __len && __beg != __end && __name[__pos] == *__beg) + ++__beg, ++__pos; + + if (__len == __pos) + __member = __matches[0]; + else + __testvalid = false; + } + else + __testvalid = false; + if (!__testvalid) + __err |= ios_base::failbit; + + return __beg; + } + + template + _InIter + time_get<_CharT, _InIter>:: + _M_extract_wday_or_month(iter_type __beg, iter_type __end, int& __member, + const _CharT** __names, size_t __indexlen, + ios_base& __io, ios_base::iostate& __err) const + { + typedef char_traits<_CharT> __traits_type; + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + + int* __matches = static_cast(__builtin_alloca(2 * sizeof(int) + * __indexlen)); + size_t __nmatches = 0; + size_t* __matches_lengths = 0; + size_t __pos = 0; + + if (__beg != __end) + { + const char_type __c = *__beg; + for (size_t __i = 0; __i < 2 * __indexlen; ++__i) + if (__c == __names[__i][0] + || __c == __ctype.toupper(__names[__i][0])) + __matches[__nmatches++] = __i; + } + + if (__nmatches) + { + ++__beg, ++__pos; + + __matches_lengths + = static_cast(__builtin_alloca(sizeof(size_t) + * __nmatches)); + for (size_t __i = 0; __i < __nmatches; ++__i) + __matches_lengths[__i] + = __traits_type::length(__names[__matches[__i]]); + } + + for (; __beg != __end; ++__beg, ++__pos) + { + size_t __nskipped = 0; + const char_type __c = *__beg; + for (size_t __i = 0; __i < __nmatches;) + { + const char_type* __name = __names[__matches[__i]]; + if (__pos >= __matches_lengths[__i]) + ++__nskipped, ++__i; + else if (!(__name[__pos] == __c)) + { + --__nmatches; + __matches[__i] = __matches[__nmatches]; + __matches_lengths[__i] = __matches_lengths[__nmatches]; + } + else + ++__i; + } + if (__nskipped == __nmatches) + break; + } + + if ((__nmatches == 1 && __matches_lengths[0] == __pos) + || (__nmatches == 2 && (__matches_lengths[0] == __pos + || __matches_lengths[1] == __pos))) + __member = (__matches[0] >= __indexlen + ? __matches[0] - __indexlen : __matches[0]); + else + __err |= ios_base::failbit; + + return __beg; + } + + template + _InIter + time_get<_CharT, _InIter>:: + do_get_time(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { + const locale& __loc = __io._M_getloc(); + const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); + const char_type* __times[2]; + __tp._M_time_formats(__times); + __beg = _M_extract_via_format(__beg, __end, __io, __err, + __tm, __times[0]); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + + template + _InIter + time_get<_CharT, _InIter>:: + do_get_date(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { + const locale& __loc = __io._M_getloc(); + const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); + const char_type* __dates[2]; + __tp._M_date_formats(__dates); + __beg = _M_extract_via_format(__beg, __end, __io, __err, + __tm, __dates[0]); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + + template + _InIter + time_get<_CharT, _InIter>:: + do_get_weekday(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { + typedef char_traits<_CharT> __traits_type; + const locale& __loc = __io._M_getloc(); + const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); + const ctype<_CharT>& __ctype = use_facet >(__loc); + const char_type* __days[14]; + __tp._M_days_abbreviated(__days); + __tp._M_days(__days + 7); + int __tmpwday; + ios_base::iostate __tmperr = ios_base::goodbit; + + __beg = _M_extract_wday_or_month(__beg, __end, __tmpwday, __days, 7, + __io, __tmperr); + if (!__tmperr) + __tm->tm_wday = __tmpwday; + else + __err |= ios_base::failbit; + + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + + template + _InIter + time_get<_CharT, _InIter>:: + do_get_monthname(iter_type __beg, iter_type __end, + ios_base& __io, ios_base::iostate& __err, tm* __tm) const + { + typedef char_traits<_CharT> __traits_type; + const locale& __loc = __io._M_getloc(); + const __timepunct<_CharT>& __tp = use_facet<__timepunct<_CharT> >(__loc); + const ctype<_CharT>& __ctype = use_facet >(__loc); + const char_type* __months[24]; + __tp._M_months_abbreviated(__months); + __tp._M_months(__months + 12); + int __tmpmon; + ios_base::iostate __tmperr = ios_base::goodbit; + + __beg = _M_extract_wday_or_month(__beg, __end, __tmpmon, __months, 12, + __io, __tmperr); + if (!__tmperr) + __tm->tm_mon = __tmpmon; + else + __err |= ios_base::failbit; + + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + + template + _InIter + time_get<_CharT, _InIter>:: + do_get_year(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, tm* __tm) const + { + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + int __tmpyear; + ios_base::iostate __tmperr = ios_base::goodbit; + + __beg = _M_extract_num(__beg, __end, __tmpyear, 0, 9999, 4, + __io, __tmperr); + if (!__tmperr) + __tm->tm_year = __tmpyear < 0 ? __tmpyear + 100 : __tmpyear - 1900; + else + __err |= ios_base::failbit; + + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + + template + _OutIter + time_put<_CharT, _OutIter>:: + put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, + const _CharT* __beg, const _CharT* __end) const + { + const locale& __loc = __io._M_getloc(); + ctype<_CharT> const& __ctype = use_facet >(__loc); + for (; __beg != __end; ++__beg) + if (__ctype.narrow(*__beg, 0) != '%') + { + *__s = *__beg; + ++__s; + } + else if (++__beg != __end) + { + char __format; + char __mod = 0; + const char __c = __ctype.narrow(*__beg, 0); + if (__c != 'E' && __c != 'O') + __format = __c; + else if (++__beg != __end) + { + __mod = __c; + __format = __ctype.narrow(*__beg, 0); + } + else + break; + __s = this->do_put(__s, __io, __fill, __tm, __format, __mod); + } + else + break; + return __s; + } + + template + _OutIter + time_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type, const tm* __tm, + char __format, char __mod) const + { + const locale& __loc = __io._M_getloc(); + ctype<_CharT> const& __ctype = use_facet >(__loc); + __timepunct<_CharT> const& __tp = use_facet<__timepunct<_CharT> >(__loc); + + + + const size_t __maxlen = 128; + char_type __res[__maxlen]; + + + + + + + char_type __fmt[4]; + __fmt[0] = __ctype.widen('%'); + if (!__mod) + { + __fmt[1] = __format; + __fmt[2] = char_type(); + } + else + { + __fmt[1] = __mod; + __fmt[2] = __format; + __fmt[3] = char_type(); + } + + __tp._M_put(__res, __maxlen, __fmt, __tm); + + + return std::__write(__s, __res, char_traits::length(__res)); + } + + + + + + extern template class moneypunct; + extern template class moneypunct; + extern template class moneypunct_byname; + extern template class moneypunct_byname; + extern template class money_get; + extern template class money_put; + extern template class __timepunct; + extern template class time_put; + extern template class time_put_byname; + extern template class time_get; + extern template class time_get_byname; + extern template class messages; + extern template class messages_byname; + + extern template + const moneypunct& + use_facet >(const locale&); + + extern template + const moneypunct& + use_facet >(const locale&); + + extern template + const money_put& + use_facet >(const locale&); + + extern template + const money_get& + use_facet >(const locale&); + + extern template + const __timepunct& + use_facet<__timepunct >(const locale&); + + extern template + const time_put& + use_facet >(const locale&); + + extern template + const time_get& + use_facet >(const locale&); + + extern template + const messages& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet<__timepunct >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + extern template class moneypunct; + extern template class moneypunct; + extern template class moneypunct_byname; + extern template class moneypunct_byname; + extern template class money_get; + extern template class money_put; + extern template class __timepunct; + extern template class time_put; + extern template class time_put_byname; + extern template class time_get; + extern template class time_get_byname; + extern template class messages; + extern template class messages_byname; + + extern template + const moneypunct& + use_facet >(const locale&); + + extern template + const moneypunct& + use_facet >(const locale&); + + extern template + const money_put& + use_facet >(const locale&); + + extern template + const money_get& + use_facet >(const locale&); + + extern template + const __timepunct& + use_facet<__timepunct >(const locale&); + + extern template + const time_put& + use_facet >(const locale&); + + extern template + const time_get& + use_facet >(const locale&); + + extern template + const messages& + use_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet<__timepunct >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + extern template + bool + has_facet >(const locale&); + + + + +} +# 1937 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/locale_facets_nonio.h" 2 3 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/locale" 2 3 +# 30 "../boost/filesystem/v3/path_traits.hpp" 2 +# 1 "../boost/assert.hpp" 1 +# 50 "../boost/assert.hpp" +# 1 "/usr/include/assert.h" 1 3 4 +# 51 "../boost/assert.hpp" 2 +# 31 "../boost/filesystem/v3/path_traits.hpp" 2 + + +# 1 "../boost/config/abi_prefix.hpp" 1 +# 34 "../boost/filesystem/v3/path_traits.hpp" 2 + +namespace boost { namespace filesystem3 { + + const system::error_category& codecvt_error_category(); +# 48 "../boost/filesystem/v3/path_traits.hpp" + class directory_entry; + +namespace path_traits { + + typedef std::codecvt codecvt_type; + + + + template + struct is_pathable { static const bool value = false; }; + + template<> struct is_pathable { static const bool value = true; }; + template<> struct is_pathable { static const bool value = true; }; + template<> struct is_pathable { static const bool value = true; }; + template<> struct is_pathable { static const bool value = true; }; + template<> struct is_pathable { static const bool value = true; }; + template<> struct is_pathable { static const bool value = true; }; + template<> struct is_pathable > { static const bool value = true; }; + template<> struct is_pathable > { static const bool value = true; }; + template<> struct is_pathable > { static const bool value = true; }; + template<> struct is_pathable > { static const bool value = true; }; + template<> struct is_pathable { static const bool value = true; }; + + + + template inline + + + typename boost::disable_if, bool>::type + empty(const Container & c) + { return c.begin() == c.end(); } + + template inline + bool empty(T * const & c_str) + { + (static_cast (0)); + return !*c_str; + } + + template inline + bool empty(T (&)[N]) + { return N <= 1; } + + + + + + + void convert(const char* from, + const char* from_end, + std::wstring & to, + const codecvt_type& cvt); + + + void convert(const wchar_t* from, + const wchar_t* from_end, + std::string & to, + const codecvt_type& cvt); + + inline + void convert(const char* from, + std::wstring & to, + const codecvt_type& cvt) + { + (static_cast (0)); + convert(from, 0, to, cvt); + } + + inline + void convert(const wchar_t* from, + std::string & to, + const codecvt_type& cvt) + { + (static_cast (0)); + convert(from, 0, to, cvt); + } + + + + + + inline + void convert(const char* from, const char* from_end, std::string & to, + const codecvt_type&) + { + (static_cast (0)); + (static_cast (0)); + to.append(from, from_end); + } + + inline + void convert(const char* from, + std::string & to, + const codecvt_type&) + { + (static_cast (0)); + to += from; + } + + + + inline + void convert(const wchar_t* from, const wchar_t* from_end, std::wstring & to, + const codecvt_type&) + { + (static_cast (0)); + (static_cast (0)); + to.append(from, from_end); + } + + inline + void convert(const wchar_t* from, + std::wstring & to, + const codecvt_type&) + { + (static_cast (0)); + to += from; + } + + + + + template inline + void dispatch(const std::string& c, U& to, const codecvt_type& cvt) + { + if (c.size()) + convert(&*c.begin(), &*c.begin() + c.size(), to, cvt); + } + template inline + void dispatch(const std::wstring& c, U& to, const codecvt_type& cvt) + { + if (c.size()) + convert(&*c.begin(), &*c.begin() + c.size(), to, cvt); + } + template inline + void dispatch(const std::vector& c, U& to, const codecvt_type& cvt) + { + if (c.size()) + convert(&*c.begin(), &*c.begin() + c.size(), to, cvt); + } + template inline + void dispatch(const std::vector& c, U& to, const codecvt_type& cvt) + { + if (c.size()) + convert(&*c.begin(), &*c.begin() + c.size(), to, cvt); + } + + + template inline + + + typename boost::disable_if, void>::type + dispatch(const Container & c, U& to, const codecvt_type& cvt) + { + if (c.size()) + { + std::basic_string s(c.begin(), c.end()); + convert(s.c_str(), s.c_str()+s.size(), to, cvt); + } + } + + + template inline + void dispatch(T * const & c_str, U& to, const codecvt_type& cvt) + { + + (static_cast (0)); + convert(c_str, to, cvt); + } + + + + + + void dispatch(const directory_entry & de, + + + + std::string & to, + + const codecvt_type&); + + +}}} + + + +namespace boost +{ + namespace filesystem + { + using filesystem3::codecvt_error_category; + + + } +} + +# 1 "../boost/config/abi_suffix.hpp" 1 +# 246 "../boost/filesystem/v3/path_traits.hpp" 2 +# 26 "../boost/filesystem/v3/path.hpp" 2 + +# 1 "../boost/system/system_error.hpp" 1 +# 13 "../boost/system/system_error.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cassert" 1 3 +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cassert" 3 + +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cassert" 3 + +# 1 "/usr/include/assert.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cassert" 2 3 +# 14 "../boost/system/system_error.hpp" 2 + + +namespace boost +{ + namespace system + { + + + class __attribute__((visibility("default"))) system_error : public std::runtime_error + + + { + public: + system_error( error_code ec ) + : std::runtime_error(""), m_error_code(ec) {} + + system_error( error_code ec, const std::string & what_arg ) + : std::runtime_error(what_arg), m_error_code(ec) {} + + system_error( error_code ec, const char* what_arg ) + : std::runtime_error(what_arg), m_error_code(ec) {} + + system_error( int ev, const error_category & ecat ) + : std::runtime_error(""), m_error_code(ev,ecat) {} + + system_error( int ev, const error_category & ecat, + const std::string & what_arg ) + : std::runtime_error(what_arg), m_error_code(ev,ecat) {} + + system_error( int ev, const error_category & ecat, + const char * what_arg ) + : std::runtime_error(what_arg), m_error_code(ev,ecat) {} + + virtual ~system_error() throw() {} + + const error_code & code() const throw() { return m_error_code; } + const char * what() const throw(); + + private: + error_code m_error_code; + mutable std::string m_what; + }; + + + + inline const char * system_error::what() const throw() + + { + if ( m_what.empty() ) + { + try + { + m_what = this->std::runtime_error::what(); + if ( !m_what.empty() ) m_what += ": "; + m_what += m_error_code.message(); + } + catch (...) { return std::runtime_error::what(); } + } + return m_what.c_str(); + } + + } +} +# 28 "../boost/filesystem/v3/path.hpp" 2 + +# 1 "../boost/shared_ptr.hpp" 1 +# 17 "../boost/shared_ptr.hpp" +# 1 "../boost/smart_ptr/shared_ptr.hpp" 1 +# 27 "../boost/smart_ptr/shared_ptr.hpp" +# 1 "../boost/config/no_tr1/memory.hpp" 1 +# 28 "../boost/smart_ptr/shared_ptr.hpp" 2 + +# 1 "../boost/assert.hpp" 1 +# 50 "../boost/assert.hpp" +# 1 "/usr/include/assert.h" 1 3 4 +# 51 "../boost/assert.hpp" 2 +# 30 "../boost/smart_ptr/shared_ptr.hpp" 2 + +# 1 "../boost/throw_exception.hpp" 1 +# 23 "../boost/throw_exception.hpp" +# 1 "../boost/exception/detail/attribute_noreturn.hpp" 1 +# 24 "../boost/throw_exception.hpp" 2 +# 37 "../boost/throw_exception.hpp" +# 1 "../boost/exception/exception.hpp" 1 +# 9 "../boost/exception/exception.hpp" + +# 10 "../boost/exception/exception.hpp" 3 + + + + + +namespace +boost + { + namespace + exception_detail + { + template + class + refcount_ptr + { + public: + + refcount_ptr(): + px_(0) + { + } + + ~refcount_ptr() + { + release(); + } + + refcount_ptr( refcount_ptr const & x ): + px_(x.px_) + { + add_ref(); + } + + refcount_ptr & + operator=( refcount_ptr const & x ) + { + adopt(x.px_); + return *this; + } + + void + adopt( T * px ) + { + release(); + px_=px; + add_ref(); + } + + T * + get() const + { + return px_; + } + + private: + + T * px_; + + void + add_ref() + { + if( px_ ) + px_->add_ref(); + } + + void + release() + { + if( px_ && px_->release() ) + px_=0; + } + }; + } + + + + template + class error_info; + + typedef error_info throw_function; + typedef error_info throw_file; + typedef error_info throw_line; + + template <> + class + error_info + { + public: + typedef char const * value_type; + value_type v_; + explicit + error_info( value_type v ): + v_(v) + { + } + }; + + template <> + class + error_info + { + public: + typedef char const * value_type; + value_type v_; + explicit + error_info( value_type v ): + v_(v) + { + } + }; + + template <> + class + error_info + { + public: + typedef int value_type; + value_type v_; + explicit + error_info( value_type v ): + v_(v) + { + } + }; + + + +#pragma GCC visibility push (default) + + + class exception; + + +#pragma GCC visibility pop + + + + template + class shared_ptr; + + namespace + exception_detail + { + class error_info_base; + struct type_info_; + + struct + error_info_container + { + virtual char const * diagnostic_information( char const * ) const = 0; + virtual shared_ptr get( type_info_ const & ) const = 0; + virtual void set( shared_ptr const &, type_info_ const & ) = 0; + virtual void add_ref() const = 0; + virtual bool release() const = 0; + virtual refcount_ptr clone() const = 0; + + protected: + + ~error_info_container() throw() + { + } + }; + + template + struct get_info; + + template <> + struct get_info; + + template <> + struct get_info; + + template <> + struct get_info; + + char const * get_diagnostic_information( exception const &, char const * ); + + void copy_boost_exception( exception *, exception const * ); + + template + E const & set_info( E const &, error_info const & ); + + template + E const & set_info( E const &, throw_function const & ); + + template + E const & set_info( E const &, throw_file const & ); + + template + E const & set_info( E const &, throw_line const & ); + } + + + +#pragma GCC visibility push (default) + + + class + exception + { + protected: + + exception(): + throw_function_(0), + throw_file_(0), + throw_line_(-1) + { + } +# 231 "../boost/exception/exception.hpp" 3 + virtual ~exception() throw() + + = 0 + + ; + + + + + private: + + template + friend E const & exception_detail::set_info( E const &, throw_function const & ); + + template + friend E const & exception_detail::set_info( E const &, throw_file const & ); + + template + friend E const & exception_detail::set_info( E const &, throw_line const & ); + + template + friend E const & exception_detail::set_info( E const &, error_info const & ); + + friend char const * exception_detail::get_diagnostic_information( exception const &, char const * ); + + template + friend struct exception_detail::get_info; + friend struct exception_detail::get_info; + friend struct exception_detail::get_info; + friend struct exception_detail::get_info; + friend void exception_detail::copy_boost_exception( exception *, exception const * ); + + mutable exception_detail::refcount_ptr data_; + mutable char const * throw_function_; + mutable char const * throw_file_; + mutable int throw_line_; + }; + + +#pragma GCC visibility pop + + + + inline + exception:: + ~exception() throw() + { + } + + namespace + exception_detail + { + template + E const & + set_info( E const & x, throw_function const & y ) + { + x.throw_function_=y.v_; + return x; + } + + template + E const & + set_info( E const & x, throw_file const & y ) + { + x.throw_file_=y.v_; + return x; + } + + template + E const & + set_info( E const & x, throw_line const & y ) + { + x.throw_line_=y.v_; + return x; + } + } + + + + namespace + exception_detail + { + template + struct + error_info_injector: + public T, + public exception + { + explicit + error_info_injector( T const & x ): + T(x) + { + } + + ~error_info_injector() throw() + { + } + }; + + struct large_size { char c[256]; }; + large_size dispatch_boost_exception( exception const * ); + + struct small_size { }; + small_size dispatch_boost_exception( void const * ); + + template + struct enable_error_info_helper; + + template + struct + enable_error_info_helper + { + typedef T type; + }; + + template + struct + enable_error_info_helper + { + typedef error_info_injector type; + }; + + template + struct + enable_error_info_return_type + { + typedef typename enable_error_info_helper(0)))>::type type; + }; + } + + template + inline + typename + exception_detail::enable_error_info_return_type::type + enable_error_info( T const & x ) + { + typedef typename exception_detail::enable_error_info_return_type::type rt; + return rt(x); + } + + + + namespace + exception_detail + { + class + clone_base + { + public: + + virtual clone_base const * clone() const = 0; + virtual void rethrow() const = 0; + + virtual + ~clone_base() throw() + { + } + }; + + inline + void + copy_boost_exception( exception * a, exception const * b ) + { + refcount_ptr data; + if( error_info_container * d=b->data_.get() ) + data = d->clone(); + a->throw_file_ = b->throw_file_; + a->throw_line_ = b->throw_line_; + a->throw_function_ = b->throw_function_; + a->data_ = data; + } + + inline + void + copy_boost_exception( void *, void const * ) + { + } + + template + class + clone_impl: + public T, + public clone_base + { + public: + + explicit + clone_impl( T const & x ): + T(x) + { + copy_boost_exception(this,&x); + } + + ~clone_impl() throw() + { + } + + private: + + clone_base const * + clone() const + { + return new clone_impl(*this); + } + + void + rethrow() const + { + throw*this; + } + }; + } + + template + inline + exception_detail::clone_impl + enable_current_exception( T const & x ) + { + return exception_detail::clone_impl(x); + } + } +# 38 "../boost/throw_exception.hpp" 2 +# 1 "../boost/current_function.hpp" 1 +# 22 "../boost/current_function.hpp" +namespace boost +{ + +namespace detail +{ + +inline void current_function_helper() +{ +# 61 "../boost/current_function.hpp" +} + +} + +} +# 39 "../boost/throw_exception.hpp" 2 + + + + + +namespace boost +{ + + + + + + +inline void throw_exception_assert_compatibility( std::exception const & ) { } + +template __attribute__((noreturn)) inline void throw_exception( E const & e ) +{ + + + throw_exception_assert_compatibility(e); + + + throw enable_current_exception(enable_error_info(e)); + + + +} + + + + + namespace + exception_detail + { + template + __attribute__((noreturn)) + void + throw_exception_( E const & x, char const * current_function, char const * file, int line ) + { + boost::throw_exception( + set_info( + set_info( + set_info( + boost::enable_error_info(x), + throw_function(current_function)), + throw_file(file)), + throw_line(line))); + } + } + +} +# 32 "../boost/smart_ptr/shared_ptr.hpp" 2 +# 1 "../boost/smart_ptr/detail/shared_count.hpp" 1 +# 28 "../boost/smart_ptr/detail/shared_count.hpp" +# 1 "../boost/smart_ptr/bad_weak_ptr.hpp" 1 +# 26 "../boost/smart_ptr/bad_weak_ptr.hpp" +namespace boost +{ +# 39 "../boost/smart_ptr/bad_weak_ptr.hpp" +class bad_weak_ptr: public std::exception +{ +public: + + virtual char const * what() const throw() + { + return "tr1::bad_weak_ptr"; + } +}; + + + + + +} +# 29 "../boost/smart_ptr/detail/shared_count.hpp" 2 +# 1 "../boost/smart_ptr/detail/sp_counted_base.hpp" 1 +# 21 "../boost/smart_ptr/detail/sp_counted_base.hpp" +# 1 "../boost/smart_ptr/detail/sp_has_sync.hpp" 1 +# 22 "../boost/smart_ptr/detail/sp_counted_base.hpp" 2 +# 36 "../boost/smart_ptr/detail/sp_counted_base.hpp" +# 1 "../boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp" 1 +# 27 "../boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp" +# 1 "../boost/detail/sp_typeinfo.hpp" 1 +# 109 "../boost/detail/sp_typeinfo.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/typeinfo" 1 3 +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/typeinfo" 3 + +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/typeinfo" 3 + + + + + + + +#pragma GCC visibility push(default) + +extern "C++" { + +namespace __cxxabiv1 +{ + class __class_type_info; +} +# 83 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/typeinfo" 3 +namespace std +{ + + + + + + + class type_info + { + public: + + + + + virtual ~type_info(); + + + + const char* name() const + { return __name[0] == '*' ? __name + 1 : __name; } +# 118 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/typeinfo" 3 + bool before(const type_info& __arg) const + { return (__name[0] == '*' && __arg.__name[0] == '*') + ? __name < __arg.__name + : __builtin_strcmp (__name, __arg.__name) < 0; } + + bool operator==(const type_info& __arg) const + { + return ((__name == __arg.__name) + || (__name[0] != '*' && + __builtin_strcmp (__name, __arg.__name) == 0)); + } +# 139 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/typeinfo" 3 + bool operator!=(const type_info& __arg) const + { return !operator==(__arg); } +# 155 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/typeinfo" 3 + virtual bool __is_pointer_p() const; + + + virtual bool __is_function_p() const; + + + + + + + + virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj, + unsigned __outer) const; + + + virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target, + void **__obj_ptr) const; + + protected: + const char *__name; + + explicit type_info(const char *__n): __name(__n) { } + + private: + + type_info& operator=(const type_info&); + type_info(const type_info&); + }; + + + + + + + + class bad_cast : public exception + { + public: + bad_cast() throw() { } + + + + virtual ~bad_cast() throw(); + + + virtual const char* what() const throw(); + }; + + + + + + class bad_typeid : public exception + { + public: + bad_typeid () throw() { } + + + + virtual ~bad_typeid() throw(); + + + virtual const char* what() const throw(); + }; +} + +#pragma GCC visibility pop + +} +# 110 "../boost/detail/sp_typeinfo.hpp" 2 + +namespace boost +{ + +namespace detail +{ + + + + + + + +typedef std::type_info sp_typeinfo; + + + +} + +} +# 28 "../boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp" 2 + +namespace boost +{ + +namespace detail +{ + +inline int atomic_exchange_and_add( int * pw, int dv ) +{ + + + + + int r; + + __asm__ __volatile__ + ( + "lock\n\t" + "xadd %1, %0": + "=m"( *pw ), "=r"( r ): + "m"( *pw ), "1"( dv ): + "memory", "cc" + ); + + return r; +} + +inline void atomic_increment( int * pw ) +{ + + + __asm__ + ( + "lock\n\t" + "incl %0": + "=m"( *pw ): + "m"( *pw ): + "cc" + ); +} + +inline int atomic_conditional_increment( int * pw ) +{ + + + + + int rv, tmp; + + __asm__ + ( + "movl %0, %%eax\n\t" + "0:\n\t" + "test %%eax, %%eax\n\t" + "je 1f\n\t" + "movl %%eax, %2\n\t" + "incl %2\n\t" + "lock\n\t" + "cmpxchgl %2, %0\n\t" + "jne 0b\n\t" + "1:": + "=m"( *pw ), "=&a"( rv ), "=&r"( tmp ): + "m"( *pw ): + "cc" + ); + + return rv; +} + +class sp_counted_base +{ +private: + + sp_counted_base( sp_counted_base const & ); + sp_counted_base & operator= ( sp_counted_base const & ); + + int use_count_; + int weak_count_; + +public: + + sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) + { + } + + virtual ~sp_counted_base() + { + } + + + + + virtual void dispose() = 0; + + + + virtual void destroy() + { + delete this; + } + + virtual void * get_deleter( sp_typeinfo const & ti ) = 0; + + void add_ref_copy() + { + atomic_increment( &use_count_ ); + } + + bool add_ref_lock() + { + return atomic_conditional_increment( &use_count_ ) != 0; + } + + void release() + { + if( atomic_exchange_and_add( &use_count_, -1 ) == 1 ) + { + dispose(); + weak_release(); + } + } + + void weak_add_ref() + { + atomic_increment( &weak_count_ ); + } + + void weak_release() + { + if( atomic_exchange_and_add( &weak_count_, -1 ) == 1 ) + { + destroy(); + } + } + + long use_count() const + { + return static_cast( use_count_ ); + } +}; + +} + +} +# 37 "../boost/smart_ptr/detail/sp_counted_base.hpp" 2 +# 30 "../boost/smart_ptr/detail/shared_count.hpp" 2 +# 1 "../boost/smart_ptr/detail/sp_counted_impl.hpp" 1 +# 38 "../boost/smart_ptr/detail/sp_counted_impl.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 39 "../boost/smart_ptr/detail/sp_counted_impl.hpp" 2 + +namespace boost +{ +# 50 "../boost/smart_ptr/detail/sp_counted_impl.hpp" +namespace detail +{ + +template class sp_counted_impl_p: public sp_counted_base +{ +private: + + X * px_; + + sp_counted_impl_p( sp_counted_impl_p const & ); + sp_counted_impl_p & operator= ( sp_counted_impl_p const & ); + + typedef sp_counted_impl_p this_type; + +public: + + explicit sp_counted_impl_p( X * px ): px_( px ) + { + + + + } + + virtual void dispose() + { + + + + boost::checked_delete( px_ ); + } + + virtual void * get_deleter( detail::sp_typeinfo const & ) + { + return 0; + } +# 113 "../boost/smart_ptr/detail/sp_counted_impl.hpp" +}; +# 122 "../boost/smart_ptr/detail/sp_counted_impl.hpp" +template class sp_counted_impl_pd: public sp_counted_base +{ +private: + + P ptr; + D del; + + sp_counted_impl_pd( sp_counted_impl_pd const & ); + sp_counted_impl_pd & operator= ( sp_counted_impl_pd const & ); + + typedef sp_counted_impl_pd this_type; + +public: + + + + sp_counted_impl_pd( P p, D & d ): ptr( p ), del( d ) + { + } + + sp_counted_impl_pd( P p ): ptr( p ), del() + { + } + + virtual void dispose() + { + del( ptr ); + } + + virtual void * get_deleter( detail::sp_typeinfo const & ti ) + { + return ti == typeid(D)? &reinterpret_cast( del ): 0; + } +# 183 "../boost/smart_ptr/detail/sp_counted_impl.hpp" +}; + +template class sp_counted_impl_pda: public sp_counted_base +{ +private: + + P p_; + D d_; + A a_; + + sp_counted_impl_pda( sp_counted_impl_pda const & ); + sp_counted_impl_pda & operator= ( sp_counted_impl_pda const & ); + + typedef sp_counted_impl_pda this_type; + +public: + + + + sp_counted_impl_pda( P p, D & d, A a ): p_( p ), d_( d ), a_( a ) + { + } + + sp_counted_impl_pda( P p, A a ): p_( p ), d_(), a_( a ) + { + } + + virtual void dispose() + { + d_( p_ ); + } + + virtual void destroy() + { + typedef typename A::template rebind< this_type >::other A2; + + A2 a2( a_ ); + + this->~this_type(); + a2.deallocate( this, 1 ); + } + + virtual void * get_deleter( detail::sp_typeinfo const & ti ) + { + return ti == typeid(D)? &reinterpret_cast( d_ ): 0; + } +}; + + + + + +} + +} +# 31 "../boost/smart_ptr/detail/shared_count.hpp" 2 +# 40 "../boost/smart_ptr/detail/shared_count.hpp" +namespace boost +{ + +namespace detail +{ +# 53 "../boost/smart_ptr/detail/shared_count.hpp" +struct sp_nothrow_tag {}; + +template< class D > struct sp_inplace_tag +{ +}; + +class weak_count; + +class shared_count +{ +private: + + sp_counted_base * pi_; + + + + + + friend class weak_count; + +public: + + shared_count(): pi_(0) + + + + { + } + + template explicit shared_count( Y * p ): pi_( 0 ) + + + + { + + + try + { + pi_ = new sp_counted_impl_p( p ); + } + catch(...) + { + boost::checked_delete( p ); + throw; + } +# 110 "../boost/smart_ptr/detail/shared_count.hpp" + } + + + + + template shared_count( P p, D d ): pi_(0) + + + + + { + + + + + + try + { + pi_ = new sp_counted_impl_pd(p, d); + } + catch(...) + { + d(p); + throw; + } +# 147 "../boost/smart_ptr/detail/shared_count.hpp" + } + + + + template< class P, class D > shared_count( P p, sp_inplace_tag ): pi_( 0 ) + + + + { + + + try + { + pi_ = new sp_counted_impl_pd< P, D >( p ); + } + catch( ... ) + { + D()( p ); + throw; + } +# 179 "../boost/smart_ptr/detail/shared_count.hpp" + } + + + + template shared_count( P p, D d, A a ): pi_( 0 ) + + + + { + typedef sp_counted_impl_pda impl_type; + typedef typename A::template rebind< impl_type >::other A2; + + A2 a2( a ); + + + + try + { + pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); + new( static_cast< void* >( pi_ ) ) impl_type( p, d, a ); + } + catch(...) + { + d( p ); + + if( pi_ != 0 ) + { + a2.deallocate( static_cast< impl_type* >( pi_ ), 1 ); + } + + throw; + } +# 227 "../boost/smart_ptr/detail/shared_count.hpp" + } + + + + template< class P, class D, class A > shared_count( P p, sp_inplace_tag< D >, A a ): pi_( 0 ) + + + + { + typedef sp_counted_impl_pda< P, D, A > impl_type; + typedef typename A::template rebind< impl_type >::other A2; + + A2 a2( a ); + + + + try + { + pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); + new( static_cast< void* >( pi_ ) ) impl_type( p, a ); + } + catch(...) + { + D()( p ); + + if( pi_ != 0 ) + { + a2.deallocate( static_cast< impl_type* >( pi_ ), 1 ); + } + + throw; + } +# 275 "../boost/smart_ptr/detail/shared_count.hpp" + } + + + + + + + + template + explicit shared_count( std::auto_ptr & r ): pi_( new sp_counted_impl_p( r.get() ) ) + + + + { +# 298 "../boost/smart_ptr/detail/shared_count.hpp" + r.release(); + } + + + + ~shared_count() + { + if( pi_ != 0 ) pi_->release(); + + + + } + + shared_count(shared_count const & r): pi_(r.pi_) + + + + { + if( pi_ != 0 ) pi_->add_ref_copy(); + } +# 331 "../boost/smart_ptr/detail/shared_count.hpp" + explicit shared_count(weak_count const & r); + shared_count( weak_count const & r, sp_nothrow_tag ); + + shared_count & operator= (shared_count const & r) + { + sp_counted_base * tmp = r.pi_; + + if( tmp != pi_ ) + { + if( tmp != 0 ) tmp->add_ref_copy(); + if( pi_ != 0 ) pi_->release(); + pi_ = tmp; + } + + return *this; + } + + void swap(shared_count & r) + { + sp_counted_base * tmp = r.pi_; + r.pi_ = pi_; + pi_ = tmp; + } + + long use_count() const + { + return pi_ != 0? pi_->use_count(): 0; + } + + bool unique() const + { + return use_count() == 1; + } + + bool empty() const + { + return pi_ == 0; + } + + friend inline bool operator==(shared_count const & a, shared_count const & b) + { + return a.pi_ == b.pi_; + } + + friend inline bool operator<(shared_count const & a, shared_count const & b) + { + return std::less()( a.pi_, b.pi_ ); + } + + void * get_deleter( sp_typeinfo const & ti ) const + { + return pi_? pi_->get_deleter( ti ): 0; + } +}; + + +class weak_count +{ +private: + + sp_counted_base * pi_; + + + + + + friend class shared_count; + +public: + + weak_count(): pi_(0) + + + + { + } + + weak_count(shared_count const & r): pi_(r.pi_) + + + + { + if(pi_ != 0) pi_->weak_add_ref(); + } + + weak_count(weak_count const & r): pi_(r.pi_) + + + + { + if(pi_ != 0) pi_->weak_add_ref(); + } +# 438 "../boost/smart_ptr/detail/shared_count.hpp" + ~weak_count() + { + if(pi_ != 0) pi_->weak_release(); + + + + } + + weak_count & operator= (shared_count const & r) + { + sp_counted_base * tmp = r.pi_; + + if( tmp != pi_ ) + { + if(tmp != 0) tmp->weak_add_ref(); + if(pi_ != 0) pi_->weak_release(); + pi_ = tmp; + } + + return *this; + } + + weak_count & operator= (weak_count const & r) + { + sp_counted_base * tmp = r.pi_; + + if( tmp != pi_ ) + { + if(tmp != 0) tmp->weak_add_ref(); + if(pi_ != 0) pi_->weak_release(); + pi_ = tmp; + } + + return *this; + } + + void swap(weak_count & r) + { + sp_counted_base * tmp = r.pi_; + r.pi_ = pi_; + pi_ = tmp; + } + + long use_count() const + { + return pi_ != 0? pi_->use_count(): 0; + } + + bool empty() const + { + return pi_ == 0; + } + + friend inline bool operator==(weak_count const & a, weak_count const & b) + { + return a.pi_ == b.pi_; + } + + friend inline bool operator<(weak_count const & a, weak_count const & b) + { + return std::less()(a.pi_, b.pi_); + } +}; + +inline shared_count::shared_count( weak_count const & r ): pi_( r.pi_ ) + + + +{ + if( pi_ == 0 || !pi_->add_ref_lock() ) + { + boost::throw_exception( boost::bad_weak_ptr() ); + } +} + +inline shared_count::shared_count( weak_count const & r, sp_nothrow_tag ): pi_( r.pi_ ) + + + +{ + if( pi_ != 0 && !pi_->add_ref_lock() ) + { + pi_ = 0; + } +} + +} + +} +# 33 "../boost/smart_ptr/shared_ptr.hpp" 2 + + + + +# 1 "../boost/smart_ptr/detail/spinlock_pool.hpp" 1 +# 25 "../boost/smart_ptr/detail/spinlock_pool.hpp" +# 1 "../boost/smart_ptr/detail/spinlock.hpp" 1 +# 41 "../boost/smart_ptr/detail/spinlock.hpp" +# 1 "../boost/smart_ptr/detail/spinlock_sync.hpp" 1 +# 18 "../boost/smart_ptr/detail/spinlock_sync.hpp" +# 1 "../boost/smart_ptr/detail/yield_k.hpp" 1 +# 91 "../boost/smart_ptr/detail/yield_k.hpp" +namespace boost +{ + +namespace detail +{ + +inline void yield( unsigned k ) +{ + if( k < 4 ) + { + } + + else if( k < 16 ) + { + __asm__ __volatile__( "rep; nop" : : : "memory" ); + } + + else if( k < 32 || k & 1 ) + { + sched_yield(); + } + else + { + + struct timespec rqtp = { 0, 0 }; + + + + + rqtp.tv_sec = 0; + rqtp.tv_nsec = 1000; + + nanosleep( &rqtp, 0 ); + } +} + +} + +} +# 19 "../boost/smart_ptr/detail/spinlock_sync.hpp" 2 + + + + + +namespace boost +{ + +namespace detail +{ + +class spinlock +{ +public: + + int v_; + +public: + + bool try_lock() + { + int r = __sync_lock_test_and_set( &v_, 1 ); + return r == 0; + } + + void lock() + { + for( unsigned k = 0; !try_lock(); ++k ) + { + boost::detail::yield( k ); + } + } + + void unlock() + { + __sync_lock_release( &v_ ); + } + +public: + + class scoped_lock + { + private: + + spinlock & sp_; + + scoped_lock( scoped_lock const & ); + scoped_lock & operator=( scoped_lock const & ); + + public: + + explicit scoped_lock( spinlock & sp ): sp_( sp ) + { + sp.lock(); + } + + ~scoped_lock() + { + sp_.unlock(); + } + }; +}; + +} +} +# 42 "../boost/smart_ptr/detail/spinlock.hpp" 2 +# 26 "../boost/smart_ptr/detail/spinlock_pool.hpp" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 27 "../boost/smart_ptr/detail/spinlock_pool.hpp" 2 + +namespace boost +{ + +namespace detail +{ + +template< int I > class spinlock_pool +{ +private: + + static spinlock pool_[ 41 ]; + +public: + + static spinlock & spinlock_for( void const * pv ) + { + + + + std::size_t i = reinterpret_cast< std::size_t >( pv ) % 41; + + return pool_[ i ]; + } + + class scoped_lock + { + private: + + spinlock & sp_; + + scoped_lock( scoped_lock const & ); + scoped_lock & operator=( scoped_lock const & ); + + public: + + explicit scoped_lock( void const * pv ): sp_( spinlock_for( pv ) ) + { + sp_.lock(); + } + + ~scoped_lock() + { + sp_.unlock(); + } + }; +}; + +template< int I > spinlock spinlock_pool< I >::pool_[ 41 ] = +{ + {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, + {0} +}; + +} +} +# 38 "../boost/smart_ptr/shared_ptr.hpp" 2 +# 1 "../boost/memory_order.hpp" 1 +# 21 "../boost/memory_order.hpp" +namespace boost +{ +# 41 "../boost/memory_order.hpp" +enum memory_order +{ + memory_order_relaxed = 0, + memory_order_acquire = 1, + memory_order_release = 2, + memory_order_acq_rel = 3, + memory_order_seq_cst = 7, + memory_order_consume = 8 +}; + +} +# 39 "../boost/smart_ptr/shared_ptr.hpp" 2 + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 45 "../boost/smart_ptr/shared_ptr.hpp" 2 +# 54 "../boost/smart_ptr/shared_ptr.hpp" +namespace boost +{ + +template class shared_ptr; +template class weak_ptr; +template class enable_shared_from_this; +template class enable_shared_from_this2; + +namespace detail +{ + +struct static_cast_tag {}; +struct const_cast_tag {}; +struct dynamic_cast_tag {}; +struct polymorphic_cast_tag {}; + +template struct shared_ptr_traits +{ + typedef T & reference; +}; + +template<> struct shared_ptr_traits +{ + typedef void reference; +}; + + + +template<> struct shared_ptr_traits +{ + typedef void reference; +}; + +template<> struct shared_ptr_traits +{ + typedef void reference; +}; + +template<> struct shared_ptr_traits +{ + typedef void reference; +}; + + + + + +template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr const * ppx, Y const * py, boost::enable_shared_from_this< T > const * pe ) +{ + if( pe != 0 ) + { + pe->_internal_accept_owner( ppx, const_cast< Y* >( py ) ); + } +} + +template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr * ppx, Y const * py, boost::enable_shared_from_this2< T > const * pe ) +{ + if( pe != 0 ) + { + pe->_internal_accept_owner( ppx, const_cast< Y* >( py ) ); + } +} +# 132 "../boost/smart_ptr/shared_ptr.hpp" +inline void sp_enable_shared_from_this( ... ) +{ +} + + + + + + + +template< class T, class R > struct sp_enable_if_auto_ptr +{ +}; + +template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R > +{ + typedef R type; +}; + + + +} +# 164 "../boost/smart_ptr/shared_ptr.hpp" +template class shared_ptr +{ +private: + + + typedef shared_ptr this_type; + +public: + + typedef T element_type; + typedef T value_type; + typedef T * pointer; + typedef typename boost::detail::shared_ptr_traits::reference reference; + + shared_ptr(): px(0), pn() + { + } + + template + explicit shared_ptr( Y * p ): px( p ), pn( p ) + { + boost::detail::sp_enable_shared_from_this( this, p, p ); + } + + + + + + + + template shared_ptr(Y * p, D d): px(p), pn(p, d) + { + boost::detail::sp_enable_shared_from_this( this, p, p ); + } + + + + template shared_ptr( Y * p, D d, A a ): px( p ), pn( p, d, a ) + { + boost::detail::sp_enable_shared_from_this( this, p, p ); + } +# 218 "../boost/smart_ptr/shared_ptr.hpp" + template + explicit shared_ptr(weak_ptr const & r): pn(r.pn) + { + + px = r.px; + } + + template + shared_ptr( weak_ptr const & r, boost::detail::sp_nothrow_tag ): px( 0 ), pn( r.pn, boost::detail::sp_nothrow_tag() ) + { + if( !pn.empty() ) + { + px = r.px; + } + } + + template + + + shared_ptr( shared_ptr const & r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) + + + + + + + : px( r.px ), pn( r.pn ) + { + } + + + template< class Y > + shared_ptr( shared_ptr const & r, T * p ): px( p ), pn( r.pn ) + { + } + + template + shared_ptr(shared_ptr const & r, boost::detail::static_cast_tag): px(static_cast(r.px)), pn(r.pn) + { + } + + template + shared_ptr(shared_ptr const & r, boost::detail::const_cast_tag): px(const_cast(r.px)), pn(r.pn) + { + } + + template + shared_ptr(shared_ptr const & r, boost::detail::dynamic_cast_tag): px(dynamic_cast(r.px)), pn(r.pn) + { + if(px == 0) + { + pn = boost::detail::shared_count(); + } + } + + template + shared_ptr(shared_ptr const & r, boost::detail::polymorphic_cast_tag): px(dynamic_cast(r.px)), pn(r.pn) + { + if(px == 0) + { + boost::throw_exception(std::bad_cast()); + } + } + + + + template + explicit shared_ptr(std::auto_ptr & r): px(r.get()), pn() + { + Y * tmp = r.get(); + pn = boost::detail::shared_count(r); + boost::detail::sp_enable_shared_from_this( this, tmp, tmp ); + } + + + + template + explicit shared_ptr( Ap r, typename boost::detail::sp_enable_if_auto_ptr::type = 0 ): px( r.get() ), pn() + { + typename Ap::element_type * tmp = r.get(); + pn = boost::detail::shared_count( r ); + boost::detail::sp_enable_shared_from_this( this, tmp, tmp ); + } +# 309 "../boost/smart_ptr/shared_ptr.hpp" + shared_ptr & operator=( shared_ptr const & r ) + { + this_type(r).swap(*this); + return *this; + } + + + + template + shared_ptr & operator=(shared_ptr const & r) + { + this_type(r).swap(*this); + return *this; + } + + + + + + template + shared_ptr & operator=( std::auto_ptr & r ) + { + this_type(r).swap(*this); + return *this; + } + + + + template + typename boost::detail::sp_enable_if_auto_ptr< Ap, shared_ptr & >::type operator=( Ap r ) + { + this_type( r ).swap( *this ); + return *this; + } +# 390 "../boost/smart_ptr/shared_ptr.hpp" + void reset() + { + this_type().swap(*this); + } + + template void reset(Y * p) + { + (static_cast (0)); + this_type(p).swap(*this); + } + + template void reset( Y * p, D d ) + { + this_type( p, d ).swap( *this ); + } + + template void reset( Y * p, D d, A a ) + { + this_type( p, d, a ).swap( *this ); + } + + template void reset( shared_ptr const & r, T * p ) + { + this_type( r, p ).swap( *this ); + } + + reference operator* () const + { + (static_cast (0)); + return *px; + } + + T * operator-> () const + { + (static_cast (0)); + return px; + } + + T * get() const + { + return px; + } + + +# 1 "../boost/smart_ptr/detail/operator_bool.hpp" 1 +# 43 "../boost/smart_ptr/detail/operator_bool.hpp" + typedef T * this_type::*unspecified_bool_type; + + operator unspecified_bool_type() const + { + return px == 0? 0: &this_type::px; + } + + + + + bool operator! () const + { + return px == 0; + } +# 435 "../boost/smart_ptr/shared_ptr.hpp" 2 + + bool unique() const + { + return pn.unique(); + } + + long use_count() const + { + return pn.use_count(); + } + + void swap(shared_ptr & other) + { + std::swap(px, other.px); + pn.swap(other.pn); + } + + template bool owner_before( shared_ptr const & rhs ) const + { + return pn < rhs.pn; + } + + template bool owner_before( weak_ptr const & rhs ) const + { + return pn < rhs.pn; + } + + void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const + { + return pn.get_deleter( ti ); + } + + bool _internal_equiv( shared_ptr const & r ) const + { + return px == r.px && pn == r.pn; + } + + + + + + +private: + + template friend class shared_ptr; + template friend class weak_ptr; + + + + + T * px; + boost::detail::shared_count pn; + +}; + +template inline bool operator==(shared_ptr const & a, shared_ptr const & b) +{ + return a.get() == b.get(); +} + +template inline bool operator!=(shared_ptr const & a, shared_ptr const & b) +{ + return a.get() != b.get(); +} +# 511 "../boost/smart_ptr/shared_ptr.hpp" +template inline bool operator<(shared_ptr const & a, shared_ptr const & b) +{ + return a.owner_before( b ); +} + +template inline void swap(shared_ptr & a, shared_ptr & b) +{ + a.swap(b); +} + +template shared_ptr static_pointer_cast(shared_ptr const & r) +{ + return shared_ptr(r, boost::detail::static_cast_tag()); +} + +template shared_ptr const_pointer_cast(shared_ptr const & r) +{ + return shared_ptr(r, boost::detail::const_cast_tag()); +} + +template shared_ptr dynamic_pointer_cast(shared_ptr const & r) +{ + return shared_ptr(r, boost::detail::dynamic_cast_tag()); +} + + + +template shared_ptr shared_static_cast(shared_ptr const & r) +{ + return shared_ptr(r, boost::detail::static_cast_tag()); +} + +template shared_ptr shared_dynamic_cast(shared_ptr const & r) +{ + return shared_ptr(r, boost::detail::dynamic_cast_tag()); +} + +template shared_ptr shared_polymorphic_cast(shared_ptr const & r) +{ + return shared_ptr(r, boost::detail::polymorphic_cast_tag()); +} + +template shared_ptr shared_polymorphic_downcast(shared_ptr const & r) +{ + (static_cast (0)); + return shared_static_cast(r); +} + + + +template inline T * get_pointer(shared_ptr const & p) +{ + return p.get(); +} +# 588 "../boost/smart_ptr/shared_ptr.hpp" +template std::basic_ostream & operator<< (std::basic_ostream & os, shared_ptr const & p) + +{ + os << p.get(); + return os; +} +# 618 "../boost/smart_ptr/shared_ptr.hpp" +template D * get_deleter(shared_ptr const & p) +{ + return static_cast(p._internal_get_deleter(typeid(D))); +} + + + + + + + +template inline bool atomic_is_lock_free( shared_ptr const * ) +{ + return false; +} + +template shared_ptr atomic_load( shared_ptr const * p ) +{ + boost::detail::spinlock_pool<2>::scoped_lock lock( p ); + return *p; +} + +template inline shared_ptr atomic_load_explicit( shared_ptr const * p, memory_order ) +{ + return atomic_load( p ); +} + +template void atomic_store( shared_ptr * p, shared_ptr r ) +{ + boost::detail::spinlock_pool<2>::scoped_lock lock( p ); + p->swap( r ); +} + +template inline void atomic_store_explicit( shared_ptr * p, shared_ptr r, memory_order ) +{ + atomic_store( p, r ); +} + +template shared_ptr atomic_exchange( shared_ptr * p, shared_ptr r ) +{ + boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p ); + + sp.lock(); + p->swap( r ); + sp.unlock(); + + return r; +} + +template shared_ptr atomic_exchange_explicit( shared_ptr * p, shared_ptr r, memory_order ) +{ + return atomic_exchange( p, r ); +} + +template bool atomic_compare_exchange( shared_ptr * p, shared_ptr * v, shared_ptr w ) +{ + boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p ); + + sp.lock(); + + if( p->_internal_equiv( *v ) ) + { + p->swap( w ); + + sp.unlock(); + + return true; + } + else + { + shared_ptr tmp( *p ); + + sp.unlock(); + + tmp.swap( *v ); + return false; + } +} + +template inline bool atomic_compare_exchange_explicit( shared_ptr * p, shared_ptr * v, shared_ptr w, memory_order , memory_order ) +{ + return atomic_compare_exchange( p, v, w ); +} + + + + + +template< class T > struct hash; + +template< class T > std::size_t hash_value( boost::shared_ptr const & p ) +{ + return boost::hash< T* >()( p.get() ); +} + +} +# 18 "../boost/shared_ptr.hpp" 2 +# 30 "../boost/filesystem/v3/path.hpp" 2 +# 1 "../boost/io/detail/quoted_manip.hpp" 1 +# 19 "../boost/io/detail/quoted_manip.hpp" +# 1 "../boost/io/ios_state.hpp" 1 +# 12 "../boost/io/ios_state.hpp" +# 1 "../boost/io_fwd.hpp" 1 +# 15 "../boost/io_fwd.hpp" +namespace boost +{ +namespace io +{ + + + + +class ios_flags_saver; +class ios_precision_saver; +class ios_width_saver; +class ios_base_all_saver; + +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_iostate_saver; +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_exception_saver; +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_tie_saver; +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_rdbuf_saver; +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_fill_saver; +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_locale_saver; +template < typename Ch, class Tr = ::std::char_traits > + class basic_ios_all_saver; + +typedef basic_ios_iostate_saver ios_iostate_saver; +typedef basic_ios_iostate_saver wios_iostate_saver; +typedef basic_ios_exception_saver ios_exception_saver; +typedef basic_ios_exception_saver wios_exception_saver; +typedef basic_ios_tie_saver ios_tie_saver; +typedef basic_ios_tie_saver wios_tie_saver; +typedef basic_ios_rdbuf_saver ios_rdbuf_saver; +typedef basic_ios_rdbuf_saver wios_rdbuf_saver; +typedef basic_ios_fill_saver ios_fill_saver; +typedef basic_ios_fill_saver wios_fill_saver; +typedef basic_ios_locale_saver ios_locale_saver; +typedef basic_ios_locale_saver wios_locale_saver; +typedef basic_ios_all_saver ios_all_saver; +typedef basic_ios_all_saver wios_all_saver; + +class ios_iword_saver; +class ios_pword_saver; +class ios_all_word_saver; + + +} +} +# 13 "../boost/io/ios_state.hpp" 2 +# 24 "../boost/io/ios_state.hpp" +namespace boost +{ +namespace io +{ + + + + +class ios_flags_saver +{ +public: + typedef ::std::ios_base state_type; + typedef ::std::ios_base::fmtflags aspect_type; + + explicit ios_flags_saver( state_type &s ) + : s_save_( s ), a_save_( s.flags() ) + {} + ios_flags_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.flags(a) ) + {} + ~ios_flags_saver() + { this->restore(); } + + void restore() + { s_save_.flags( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + + ios_flags_saver& operator=(const ios_flags_saver&); +}; + +class ios_precision_saver +{ +public: + typedef ::std::ios_base state_type; + typedef ::std::streamsize aspect_type; + + explicit ios_precision_saver( state_type &s ) + : s_save_( s ), a_save_( s.precision() ) + {} + ios_precision_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.precision(a) ) + {} + ~ios_precision_saver() + { this->restore(); } + + void restore() + { s_save_.precision( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + + ios_precision_saver& operator=(const ios_precision_saver&); +}; + +class ios_width_saver +{ +public: + typedef ::std::ios_base state_type; + typedef ::std::streamsize aspect_type; + + explicit ios_width_saver( state_type &s ) + : s_save_( s ), a_save_( s.width() ) + {} + ios_width_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.width(a) ) + {} + ~ios_width_saver() + { this->restore(); } + + void restore() + { s_save_.width( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + ios_width_saver& operator=(const ios_width_saver&); +}; + + + + +template < typename Ch, class Tr > +class basic_ios_iostate_saver +{ +public: + typedef ::std::basic_ios state_type; + typedef ::std::ios_base::iostate aspect_type; + + explicit basic_ios_iostate_saver( state_type &s ) + : s_save_( s ), a_save_( s.rdstate() ) + {} + basic_ios_iostate_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.rdstate() ) + { s.clear(a); } + ~basic_ios_iostate_saver() + { this->restore(); } + + void restore() + { s_save_.clear( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + basic_ios_iostate_saver& operator=(const basic_ios_iostate_saver&); +}; + +template < typename Ch, class Tr > +class basic_ios_exception_saver +{ +public: + typedef ::std::basic_ios state_type; + typedef ::std::ios_base::iostate aspect_type; + + explicit basic_ios_exception_saver( state_type &s ) + : s_save_( s ), a_save_( s.exceptions() ) + {} + + + + basic_ios_exception_saver( state_type &s, aspect_type const &a ) + + : s_save_( s ), a_save_( s.exceptions() ) + { s.exceptions(a); } + ~basic_ios_exception_saver() + { this->restore(); } + + void restore() + { s_save_.exceptions( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + basic_ios_exception_saver& operator=(const basic_ios_exception_saver&); +}; + +template < typename Ch, class Tr > +class basic_ios_tie_saver +{ +public: + typedef ::std::basic_ios state_type; + typedef ::std::basic_ostream * aspect_type; + + explicit basic_ios_tie_saver( state_type &s ) + : s_save_( s ), a_save_( s.tie() ) + {} + basic_ios_tie_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.tie(a) ) + {} + ~basic_ios_tie_saver() + { this->restore(); } + + void restore() + { s_save_.tie( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + basic_ios_tie_saver& operator=(const basic_ios_tie_saver&); +}; + +template < typename Ch, class Tr > +class basic_ios_rdbuf_saver +{ +public: + typedef ::std::basic_ios state_type; + typedef ::std::basic_streambuf * aspect_type; + + explicit basic_ios_rdbuf_saver( state_type &s ) + : s_save_( s ), a_save_( s.rdbuf() ) + {} + basic_ios_rdbuf_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.rdbuf(a) ) + {} + ~basic_ios_rdbuf_saver() + { this->restore(); } + + void restore() + { s_save_.rdbuf( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + basic_ios_rdbuf_saver& operator=(const basic_ios_rdbuf_saver&); +}; + +template < typename Ch, class Tr > +class basic_ios_fill_saver +{ +public: + typedef ::std::basic_ios state_type; + typedef typename state_type::char_type aspect_type; + + explicit basic_ios_fill_saver( state_type &s ) + : s_save_( s ), a_save_( s.fill() ) + {} + basic_ios_fill_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.fill(a) ) + {} + ~basic_ios_fill_saver() + { this->restore(); } + + void restore() + { s_save_.fill( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + basic_ios_fill_saver& operator=(const basic_ios_fill_saver&); +}; + + +template < typename Ch, class Tr > +class basic_ios_locale_saver +{ +public: + typedef ::std::basic_ios state_type; + typedef ::std::locale aspect_type; + + explicit basic_ios_locale_saver( state_type &s ) + : s_save_( s ), a_save_( s.getloc() ) + {} + basic_ios_locale_saver( state_type &s, aspect_type const &a ) + : s_save_( s ), a_save_( s.imbue(a) ) + {} + ~basic_ios_locale_saver() + { this->restore(); } + + void restore() + { s_save_.imbue( a_save_ ); } + +private: + state_type & s_save_; + aspect_type const a_save_; + basic_ios_locale_saver& operator=(const basic_ios_locale_saver&); +}; + + + + + +class ios_iword_saver +{ +public: + typedef ::std::ios_base state_type; + typedef int index_type; + typedef long aspect_type; + + explicit ios_iword_saver( state_type &s, index_type i ) + : s_save_( s ), a_save_( s.iword(i) ), i_save_( i ) + {} + ios_iword_saver( state_type &s, index_type i, aspect_type const &a ) + : s_save_( s ), a_save_( s.iword(i) ), i_save_( i ) + { s.iword(i) = a; } + ~ios_iword_saver() + { this->restore(); } + + void restore() + { s_save_.iword( i_save_ ) = a_save_; } + +private: + state_type & s_save_; + aspect_type const a_save_; + index_type const i_save_; + + ios_iword_saver& operator=(const ios_iword_saver&); +}; + +class ios_pword_saver +{ +public: + typedef ::std::ios_base state_type; + typedef int index_type; + typedef void * aspect_type; + + explicit ios_pword_saver( state_type &s, index_type i ) + : s_save_( s ), a_save_( s.pword(i) ), i_save_( i ) + {} + ios_pword_saver( state_type &s, index_type i, aspect_type const &a ) + : s_save_( s ), a_save_( s.pword(i) ), i_save_( i ) + { s.pword(i) = a; } + ~ios_pword_saver() + { this->restore(); } + + void restore() + { s_save_.pword( i_save_ ) = a_save_; } + +private: + state_type & s_save_; + aspect_type const a_save_; + index_type const i_save_; + + ios_pword_saver operator=(const ios_pword_saver&); +}; + + + + +class ios_base_all_saver +{ +public: + typedef ::std::ios_base state_type; + + explicit ios_base_all_saver( state_type &s ) + : s_save_( s ), a1_save_( s.flags() ), a2_save_( s.precision() ) + , a3_save_( s.width() ) + {} + + ~ios_base_all_saver() + { this->restore(); } + + void restore() + { + s_save_.width( a3_save_ ); + s_save_.precision( a2_save_ ); + s_save_.flags( a1_save_ ); + } + +private: + state_type & s_save_; + state_type::fmtflags const a1_save_; + ::std::streamsize const a2_save_; + ::std::streamsize const a3_save_; + + ios_base_all_saver& operator=(const ios_base_all_saver&); +}; + +template < typename Ch, class Tr > +class basic_ios_all_saver +{ +public: + typedef ::std::basic_ios state_type; + + explicit basic_ios_all_saver( state_type &s ) + : s_save_( s ), a1_save_( s.flags() ), a2_save_( s.precision() ) + , a3_save_( s.width() ), a4_save_( s.rdstate() ) + , a5_save_( s.exceptions() ), a6_save_( s.tie() ) + , a7_save_( s.rdbuf() ), a8_save_( s.fill() ) + + , a9_save_( s.getloc() ) + + {} + + ~basic_ios_all_saver() + { this->restore(); } + + void restore() + { + + s_save_.imbue( a9_save_ ); + + s_save_.fill( a8_save_ ); + s_save_.rdbuf( a7_save_ ); + s_save_.tie( a6_save_ ); + s_save_.exceptions( a5_save_ ); + s_save_.clear( a4_save_ ); + s_save_.width( a3_save_ ); + s_save_.precision( a2_save_ ); + s_save_.flags( a1_save_ ); + } + +private: + state_type & s_save_; + typename state_type::fmtflags const a1_save_; + ::std::streamsize const a2_save_; + ::std::streamsize const a3_save_; + typename state_type::iostate const a4_save_; + typename state_type::iostate const a5_save_; + ::std::basic_ostream * const a6_save_; + ::std::basic_streambuf * const a7_save_; + typename state_type::char_type const a8_save_; + + ::std::locale const a9_save_; + + + basic_ios_all_saver& operator=(const basic_ios_all_saver&); +}; + +class ios_all_word_saver +{ +public: + typedef ::std::ios_base state_type; + typedef int index_type; + + ios_all_word_saver( state_type &s, index_type i ) + : s_save_( s ), i_save_( i ), a1_save_( s.iword(i) ) + , a2_save_( s.pword(i) ) + {} + + ~ios_all_word_saver() + { this->restore(); } + + void restore() + { + s_save_.pword( i_save_ ) = a2_save_; + s_save_.iword( i_save_ ) = a1_save_; + } + +private: + state_type & s_save_; + index_type const i_save_; + long const a1_save_; + void * const a2_save_; + + ios_all_word_saver& operator=(const ios_all_word_saver&); +}; + + +} +} +# 20 "../boost/io/detail/quoted_manip.hpp" 2 + +namespace boost +{ + namespace io + { + namespace detail { template struct quoted_proxy; } + + + + + template + detail::quoted_proxy const &, Char> + quoted(const std::basic_string& s, + Char escape='\\', Char delim='\"'); + + + template + detail::quoted_proxy &, Char> + quoted(std::basic_string& s, + Char escape='\\', Char delim='\"'); + + + template + detail::quoted_proxy + quoted(const Char* s, Char escape='\\', Char delim='\"'); + + + + namespace detail + { + + template + struct quoted_proxy + { + String string; + Char escape; + Char delim; + + quoted_proxy(String s_, Char escape_, Char delim_) + : string(s_), escape(escape_), delim(delim_) {} + private: + + quoted_proxy& operator=(const quoted_proxy&); + }; + + + template + std::basic_ostream& + basic_string_inserter_imp(std::basic_ostream& os, + std::basic_string const & string, Char escape, Char delim) + { + os << delim; + typename std::basic_string::const_iterator + end_it = string.end(); + for (typename std::basic_string::const_iterator + it = string.begin(); + it != end_it; + ++it ) + { + if (*it == delim || *it == escape) + os << escape; + os << *it; + } + os << delim; + return os; + } + + + template + inline + std::basic_ostream& operator<<(std::basic_ostream& os, + const quoted_proxy const &, Char>& proxy) + { + return basic_string_inserter_imp(os, proxy.string, proxy.escape, proxy.delim); + } + + + template + inline + std::basic_ostream& operator<<(std::basic_ostream& os, + const quoted_proxy&, Char>& proxy) + { + return basic_string_inserter_imp(os, proxy.string, proxy.escape, proxy.delim); + } + + + template + std::basic_ostream& operator<<(std::basic_ostream& os, + const quoted_proxy& proxy) + { + os << proxy.delim; + for (const Char* it = proxy.string; + *it; + ++it ) + { + if (*it == proxy.delim || *it == proxy.escape) + os << proxy.escape; + os << *it; + } + os << proxy.delim; + return os; + } + + + template + std::basic_istream& operator>>(std::basic_istream& is, + const quoted_proxy&, Char>& proxy) + { + proxy.string.clear(); + Char c; + is >> c; + if (c != proxy.delim) + { + is.unget(); + is >> proxy.string; + return is; + } + { + boost::io::ios_flags_saver ifs(is); + is >> std::noskipws; + for (;;) + { + is >> c; + if (!is.good()) + break; + if (c == proxy.escape) + { + is >> c; + if (!is.good()) + break; + } + else if (c == proxy.delim) + break; + proxy.string += c; + } + } + return is; + } + + } + + + template + inline detail::quoted_proxy const &, Char> + quoted(const std::basic_string& s, Char escape, Char delim) + { + return detail::quoted_proxy const &, Char> + (s, escape, delim); + } + + + template + inline detail::quoted_proxy &, Char> + quoted(std::basic_string& s, Char escape, Char delim) + { + return detail::quoted_proxy&, Char> + (s, escape, delim); + } + + + template + inline detail::quoted_proxy + quoted(const Char* s, Char escape, Char delim) + { + return detail::quoted_proxy (s, escape, delim); + } + + } +} +# 31 "../boost/filesystem/v3/path.hpp" 2 + +# 1 "../boost/functional/hash_fwd.hpp" 1 + + + + + +# 1 "../boost/functional/hash/hash_fwd.hpp" 1 +# 18 "../boost/functional/hash/hash_fwd.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 19 "../boost/functional/hash/hash_fwd.hpp" 2 + + +namespace boost +{ + template struct hash; + + + + + template void hash_combine(std::size_t& seed, T const& v); + + + template std::size_t hash_range(It, It); + template void hash_range(std::size_t&, It, It); + + + + + +} +# 7 "../boost/functional/hash_fwd.hpp" 2 +# 33 "../boost/filesystem/v3/path.hpp" 2 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstring" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstring" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstring" 3 +# 73 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstring" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + using ::memchr; + using ::memcmp; + using ::memcpy; + using ::memmove; + using ::memset; + using ::strcat; + using ::strcmp; + using ::strcoll; + using ::strcpy; + using ::strcspn; + using ::strerror; + using ::strlen; + using ::strncat; + using ::strncmp; + using ::strncpy; + using ::strspn; + using ::strtok; + using ::strxfrm; + using ::strchr; + using ::strpbrk; + using ::strrchr; + using ::strstr; +# 122 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstring" 3 + +} +# 36 "../boost/filesystem/v3/path.hpp" 2 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cassert" 1 3 +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cassert" 3 + +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cassert" 3 + +# 1 "/usr/include/assert.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cassert" 2 3 +# 39 "../boost/filesystem/v3/path.hpp" 2 + + + +# 1 "../boost/config/abi_prefix.hpp" 1 +# 43 "../boost/filesystem/v3/path.hpp" 2 + +namespace boost +{ +namespace filesystem3 +{ + + + + + + + class path + { + public: + + + + + + + + typedef char value_type; + + typedef std::basic_string string_type; + typedef std::codecvt codecvt_type; +# 126 "../boost/filesystem/v3/path.hpp" + path(){} + + path(const path& p) : m_pathname(p.m_pathname) {} + + template + path(Source const& source, + typename boost::enable_if::type> >::type* =0) + { + path_traits::dispatch(source, m_pathname, codecvt()); + } +# 146 "../boost/filesystem/v3/path.hpp" + path(const value_type* s) : m_pathname(s) {} + path(const std::basic_string& s) : m_pathname(s) {} + + template + path(Source const& source, const codecvt_type& cvt) + + { + path_traits::dispatch(source, m_pathname, cvt); + } + + template + path(InputIterator begin, InputIterator end) + { + if (begin != end) + { + std::basic_string::value_type> + s(begin, end); + path_traits::convert(s.c_str(), s.c_str()+s.size(), m_pathname, codecvt()); + } + } + + template + path(InputIterator begin, InputIterator end, const codecvt_type& cvt) + { + if (begin != end) + { + std::basic_string::value_type> + s(begin, end); + path_traits::convert(s.c_str(), s.c_str()+s.size(), m_pathname, cvt); + } + } + + + + path& operator=(const path& p) + { + m_pathname = p.m_pathname; + return *this; + } + + path& operator=(const value_type* ptr) + { + m_pathname = ptr; + return *this; + } + + template + typename boost::enable_if::type>, path&>::type + operator=(Source const& source) + { + m_pathname.clear(); + path_traits::dispatch(source, m_pathname, codecvt()); + return *this; + } + + path& assign(const value_type* ptr, const codecvt_type&) + { + m_pathname = ptr; + return *this; + } + + template + path& assign(Source const& source, const codecvt_type& cvt) + { + m_pathname.clear(); + path_traits::dispatch(source, m_pathname, cvt); + return *this; + } + + template + path& assign(InputIterator begin, InputIterator end) + { + return assign(begin, end, codecvt()); + } + + template + path& assign(InputIterator begin, InputIterator end, const codecvt_type& cvt) + { + m_pathname.clear(); + if (begin != end) + { + std::basic_string::value_type> + s(begin, end); + path_traits::convert(s.c_str(), s.c_str()+s.size(), m_pathname, cvt); + } + return *this; + } + + + + + + + path& operator/=(const path& p); + + path& operator/=(const value_type* ptr); + + template + typename boost::enable_if::type>, path&>::type + operator/=(Source const& source) + { + return append(source, codecvt()); + } + + path& append(const value_type* ptr, const codecvt_type&) + { + this->operator/=(ptr); + return *this; + } + + template + path& append(Source const& source, const codecvt_type& cvt); + + template + path& append(InputIterator begin, InputIterator end) + { + return append(begin, end, codecvt()); + } + + template + path& append(InputIterator begin, InputIterator end, const codecvt_type& cvt); + + + + void clear() { m_pathname.clear(); } + path& make_preferred() + + { return *this; } + + + + path& remove_filename(); + path& replace_extension(const path& new_extension = path()); + void swap(path& rhs) { m_pathname.swap(rhs.m_pathname); } +# 304 "../boost/filesystem/v3/path.hpp" + const string_type& native() const { return m_pathname; } + const value_type* c_str() const { return m_pathname.c_str(); } + + template + String string() const; + + template + String string(const codecvt_type& cvt) const; +# 330 "../boost/filesystem/v3/path.hpp" + const std::string& string() const { return m_pathname; } + const std::string& string(const codecvt_type&) const { return m_pathname; } + + const std::wstring wstring() const { return wstring(codecvt()); } + const std::wstring wstring(const codecvt_type& cvt) const + { + std::wstring tmp; + if (!m_pathname.empty()) + path_traits::convert(&*m_pathname.begin(), &*m_pathname.begin()+m_pathname.size(), + tmp, cvt); + return tmp; + } + + + + + + template + String generic_string() const; + + template + String generic_string(const codecvt_type& cvt) const; +# 361 "../boost/filesystem/v3/path.hpp" + const std::string& generic_string() const { return m_pathname; } + const std::string& generic_string(const codecvt_type&) const { return m_pathname; } + const std::wstring generic_wstring() const { return wstring(codecvt()); } + const std::wstring generic_wstring(const codecvt_type& cvt) const { return wstring(cvt); } + + + + + + path root_path() const; + path root_name() const; + + path root_directory() const; + path relative_path() const; + path parent_path() const; + path filename() const; + path stem() const; + path extension() const; + + + + bool empty() const { return m_pathname.empty(); } + bool has_root_path() const { return has_root_directory() || has_root_name(); } + bool has_root_name() const { return !root_name().empty(); } + bool has_root_directory() const { return !root_directory().empty(); } + bool has_relative_path() const { return !relative_path().empty(); } + bool has_parent_path() const { return !parent_path().empty(); } + bool has_filename() const { return !m_pathname.empty(); } + bool has_stem() const { return !stem().empty(); } + bool has_extension() const { return !extension().empty(); } + bool is_absolute() const + { + + + + return has_root_directory(); + + } + bool is_relative() const { return !is_absolute(); } + + + + class iterator; + typedef iterator const_iterator; + + iterator begin() const; + iterator end() const; + + + + + + static std::locale imbue(const std::locale& loc); + + + + static const codecvt_type& codecvt() + { + return *wchar_t_codecvt_facet(); + } +# 464 "../boost/filesystem/v3/path.hpp" + private: +# 477 "../boost/filesystem/v3/path.hpp" + string_type m_pathname; + + + + + + string_type::size_type m_append_separator_if_needed(); + + + + void m_erase_redundant_separator(string_type::size_type sep_pos); + string_type::size_type m_parent_path_end() const; + + path& m_normalize(); + + + + friend class iterator; + friend bool operator<(const path& lhs, const path& rhs); + + + static void m_path_iterator_increment(path::iterator & it); + static void m_path_iterator_decrement(path::iterator & it); + + static const codecvt_type *& wchar_t_codecvt_facet(); + + }; +# 513 "../boost/filesystem/v3/path.hpp" + class path::iterator + : public boost::iterator_facade< + path::iterator, + path const, + boost::bidirectional_traversal_tag > + { + private: + friend class boost::iterator_core_access; + friend class boost::filesystem3::path; + friend void m_path_iterator_increment(path::iterator & it); + friend void m_path_iterator_decrement(path::iterator & it); + + const path& dereference() const { return m_element; } + + bool equal(const iterator & rhs) const + { + return m_path_ptr == rhs.m_path_ptr && m_pos == rhs.m_pos; + } + + + + void increment() { m_path_iterator_increment(*this); } + void decrement() { m_path_iterator_decrement(*this); } + + path m_element; + const path * m_path_ptr; + string_type::size_type m_pos; + + + + }; +# 553 "../boost/filesystem/v3/path.hpp" + inline bool lexicographical_compare(path::iterator first1, path::iterator last1, + path::iterator first2, path::iterator last2) + { + for (; first1 != last1 && first2 != last2 ; ++first1, ++first2) + { + if (first1->native() < first2->native()) return true; + if (first2->native() < first1->native()) return false; + } + return first1 == last1 && first2 != last2; + } + + inline bool operator<(const path& lhs, const path& rhs) + { + return lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end()); + } + + inline bool operator<=(const path& lhs, const path& rhs) { return !(rhs < lhs); } + inline bool operator> (const path& lhs, const path& rhs) { return rhs < lhs; } + inline bool operator>=(const path& lhs, const path& rhs) { return !(lhs < rhs); } +# 600 "../boost/filesystem/v3/path.hpp" + inline bool operator==(const path& lhs, const path& rhs) { return lhs.native() == rhs.native(); } + inline bool operator==(const path& lhs, const path::string_type& rhs) { return lhs.native() == rhs; } + inline bool operator==(const path& lhs, const path::value_type* rhs) { return lhs.native() == rhs; } + inline bool operator==(const path::string_type& lhs, const path& rhs) { return lhs == rhs.native(); } + inline bool operator==(const path::value_type* lhs, const path& rhs) { return lhs == rhs.native(); } + + inline std::size_t hash_value(const path& x) + { + return hash_range(x.native().begin(), x.native().end()); + } + + + inline bool operator!=(const path& lhs, const path& rhs) { return !(lhs == rhs); } + inline bool operator!=(const path& lhs, const path::string_type& rhs) { return !(lhs == rhs); } + inline bool operator!=(const path& lhs, const path::value_type* rhs) { return !(lhs == rhs); } + inline bool operator!=(const path::string_type& lhs, const path& rhs) { return !(lhs == rhs); } + inline bool operator!=(const path::value_type* lhs, const path& rhs) { return !(lhs == rhs); } + + inline void swap(path& lhs, path& rhs) { lhs.swap(rhs); } + + inline path operator/(const path& lhs, const path& rhs) { return path(lhs) /= rhs; } + + + + + + template + inline std::basic_ostream& + operator<<(std::basic_ostream& os, const path& p) + { + return os + << boost::io::quoted(p.template string >(), static_cast('&')); + } + + template + inline std::basic_istream& + operator>>(std::basic_istream& is, path& p) + { + std::basic_string str; + is >> boost::io::quoted(str, static_cast('&')); + p = str; + return is; + } + + + + + + + bool portable_posix_name(const std::string & name); + bool windows_name(const std::string & name); + bool portable_name(const std::string & name); + bool portable_directory_name(const std::string & name); + bool portable_file_name(const std::string & name); + bool native(const std::string & name); + + + + + + template + path& path::append(InputIterator begin, InputIterator end, const codecvt_type& cvt) + { + if (begin == end) + return *this; + string_type::size_type sep_pos(m_append_separator_if_needed()); + std::basic_string::value_type> + s(begin, end); + path_traits::convert(s.c_str(), s.c_str()+s.size(), m_pathname, cvt); + if (sep_pos) + m_erase_redundant_separator(sep_pos); + return *this; + } + + template + path& path::append(Source const& source, const codecvt_type& cvt) + { + if (path_traits::empty(source)) + return *this; + string_type::size_type sep_pos(m_append_separator_if_needed()); + path_traits::dispatch(source, m_pathname, cvt); + if (sep_pos) + m_erase_redundant_separator(sep_pos); + return *this; + } + + + + + + template <> inline + std::string path::string() const + { return string(); } + + template <> inline + std::wstring path::string() const + { return wstring(); } + + template <> inline + std::string path::string(const codecvt_type& cvt) const + { return string(cvt); } + + template <> inline + std::wstring path::string(const codecvt_type& cvt) const + { return wstring(cvt); } + + template <> inline + std::string path::generic_string() const + { return generic_string(); } + + template <> inline + std::wstring path::generic_string() const + { return generic_wstring(); } + + template <> inline + std::string path::generic_string(const codecvt_type& cvt) const + { return generic_string(cvt); } + + template <> inline + std::wstring path::generic_string(const codecvt_type& cvt) const + { return generic_wstring(cvt); } + + +} +} + + + +namespace boost +{ + namespace filesystem + { + using filesystem3::path; + + + + using filesystem3::lexicographical_compare; + using filesystem3::portable_posix_name; + using filesystem3::windows_name; + using filesystem3::portable_name; + using filesystem3::portable_directory_name; + using filesystem3::portable_file_name; + using filesystem3::native; + using filesystem3::swap; + using filesystem3::operator<; + using filesystem3::operator==; + using filesystem3::operator!=; + using filesystem3::operator>; + using filesystem3::operator<=; + using filesystem3::operator>=; + using filesystem3::operator/; + using filesystem3::operator<<; + using filesystem3::operator>>; + } +} + + + +# 1 "../boost/config/abi_suffix.hpp" 1 +# 759 "../boost/filesystem/v3/path.hpp" 2 +# 16 "quickbook/src/files.hpp" 2 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cassert" 1 3 +# 43 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cassert" 3 + +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cassert" 3 + +# 1 "/usr/include/assert.h" 1 3 4 +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cassert" 2 3 +# 19 "quickbook/src/files.hpp" 2 +# 1 "quickbook/src/intrusive_base.hpp" 1 +# 12 "quickbook/src/intrusive_base.hpp" +namespace quickbook +{ + + + + + template + struct intrusive_base + { + intrusive_base() : ref_count_(0) {} + intrusive_base(intrusive_base const&) : ref_count_(0) {} + intrusive_base& operator=(intrusive_base const&) { return *this; } + ~intrusive_base() { (static_cast (0)); } + + friend void intrusive_ptr_add_ref(T* ptr) + { ++ptr->ref_count_; } + + friend void intrusive_ptr_release(T* ptr) + { if(--ptr->ref_count_ == 0) delete ptr; } + private: + unsigned ref_count_; + }; +} +# 20 "quickbook/src/files.hpp" 2 + +namespace quickbook { + + namespace fs = boost::filesystem; + + struct file; + typedef boost::intrusive_ptr file_ptr; + + struct file_position + { + file_position() : line(1), column(1) {} + file_position(int l, int c) : line(l), column(c) {} + + int line; + int column; + }; + + struct file : intrusive_base + { + fs::path const path; + std::string source; + private: + unsigned qbk_version; + public: + + file(fs::path const& path, std::string const& source, + unsigned qbk_version) : + path(path), source(source), qbk_version(qbk_version) + {} + + virtual ~file() {} + + unsigned version() const { + (static_cast (0)); + return qbk_version; + } + + void version(unsigned v) { + + + + (static_cast (0)); + qbk_version = v; + } + + virtual file_position position_of(std::string::const_iterator) const; + }; + + + file_ptr load(fs::path const& filename, + unsigned qbk_version = 0); + + struct load_error : std::runtime_error + { + explicit load_error(std::string const& arg) + : std::runtime_error(arg) {} + }; + + + + + struct mapped_file_builder_data; + + struct mapped_file_builder + { + typedef std::string::const_iterator iterator; + typedef std::string::size_type pos; + + mapped_file_builder(); + ~mapped_file_builder(); + + void start(file_ptr); + file_ptr release(); + void clear(); + + bool empty() const; + pos get_pos() const; + + void add(char const*, iterator); + void add(std::string const&, iterator); + void add(iterator, iterator); + void add(mapped_file_builder const&); + void add(mapped_file_builder const&, pos, pos); + void unindent_and_add(iterator, iterator); + private: + mapped_file_builder_data* data; + + mapped_file_builder(mapped_file_builder const&); + mapped_file_builder& operator=(mapped_file_builder const&); + }; +} +# 23 "quickbook/src/values.hpp" 2 + +namespace quickbook +{ + struct value; + struct value_builder; + struct value_error; + + namespace detail + { + + + + struct value_node + { + private: + value_node(value_node const&); + value_node& operator=(value_node const&); + + public: + typedef int tag_type; + + protected: + explicit value_node(tag_type); + virtual ~value_node(); + + public: + virtual char const* type_name() const = 0; + virtual value_node* clone() const = 0; + + virtual file_ptr get_file() const; + virtual string_iterator get_position() const; + virtual string_ref get_quickbook() const; + virtual std::string get_encoded() const; + virtual int get_int() const; + + virtual bool check() const; + virtual bool empty() const; + virtual bool is_encoded() const; + virtual bool is_list() const; + virtual bool equals(value_node*) const; + + virtual value_node* get_list() const; + + int ref_count_; + const tag_type tag_; + value_node* next_; + + friend void intrusive_ptr_add_ref(value_node* ptr) + { ++ptr->ref_count_; } + friend void intrusive_ptr_release(value_node* ptr) + { if(--ptr->ref_count_ == 0) delete ptr; } + }; + + + + + + + + struct value_base + { + public: + struct iterator; + + typedef iterator const_iterator; + typedef value_node::tag_type tag_type; + enum { default_tag = 0 }; + + protected: + explicit value_base(value_node* base) + : value_(base) + { + (static_cast (0)); + } + + ~value_base() {} + + void swap(value_base& x) { std::swap(value_, x.value_); } + public: + bool check() const { return value_->check(); } + bool empty() const { return value_->empty(); } + bool is_encoded() const { return value_->is_encoded(); } + bool is_list() const { return value_->is_list(); } + + iterator begin() const; + iterator end() const; + + + int get_tag() const { return value_->tag_; } + file_ptr get_file() const + { return value_->get_file(); } + string_iterator get_position() const + { return value_->get_position(); } + string_ref get_quickbook() const + { return value_->get_quickbook(); } + std::string get_encoded() const + { return value_->get_encoded(); } + int get_int() const + { return value_->get_int(); } + + + + friend bool operator==(value_base const& x, value_base const& y) + { return x.value_->equals(y.value_); } + + protected: + value_node* value_; + + + + friend struct quickbook::value_builder; + }; + + + + + struct value_ref : public value_base + { + public: + explicit value_ref(value_node* base) : value_base(base) {} + }; + + struct value_proxy : public value_base + { + public: + explicit value_proxy(value_node* base) : value_base(base) {} + value_proxy* operator->() { return this; } + value_ref operator*() const { return value_ref(value_); } + }; + + + + + struct value_base::iterator + : public boost::forward_iterator_helper< + iterator, value, int, value_proxy, value_ref> + { + public: + iterator(); + explicit iterator(value_node* p) : ptr_(p) {} + friend bool operator==(iterator x, iterator y) + { return x.ptr_ == y.ptr_; } + iterator& operator++() { ptr_ = ptr_->next_; return *this; } + value_ref operator*() const { return value_ref(ptr_); } + value_proxy operator->() const { return value_proxy(ptr_); } + private: + value_node* ptr_; + }; + + inline value_base::iterator value_base::begin() const + { + return iterator(value_->get_list()); + } + + inline value_base::iterator value_base::end() const + { + return iterator(); + } + + + + + struct value_counted : public value_base + { + value_counted& operator=(value_counted const&); + protected: + value_counted(); + value_counted(value_counted const&); + value_counted(value_base const&); + value_counted(value_node*); + ~value_counted(); + }; + + + + + + + + struct value_list_builder { + value_list_builder(value_list_builder const&); + value_list_builder& operator=(value_list_builder const&); + public: + value_list_builder(); + value_list_builder(value_node*); + ~value_list_builder(); + void swap(value_list_builder& b); + value_node* release(); + + void append(value_node*); + void sort(); + private: + value_node* head_; + value_node** back_; + }; + } + + + + + + + struct value : public detail::value_counted + { + public: + value(); + value(value const&); + value(detail::value_base const&); + explicit value(detail::value_node*); + value& operator=(value); + void swap(value& x) { detail::value_counted::swap(x); } + }; + + + value empty_value(value::tag_type = value::default_tag); + + + value int_value(int, value::tag_type = value::default_tag); + + + + + value qbk_value(file_ptr const&, string_iterator, string_iterator, + value::tag_type = value::default_tag); + + + value encoded_value(std::string const&, + value::tag_type = value::default_tag); + + + + value encoded_qbk_value(file_ptr const&, string_iterator, string_iterator, + std::string const&, value::tag_type = value::default_tag); + + + + + + + struct value_builder { + public: + value_builder(); + void swap(value_builder& b); + + void save(); + void restore(); + + value release(); + + void reset(); + void set_tag(value::tag_type); + void insert(value const&); + void extend(value const&); + + void start_list(value::tag_type = value::default_tag); + void finish_list(); + void clear_list(); + void sort_list(); + + private: + detail::value_list_builder current; + value::tag_type list_tag; + boost::scoped_ptr saved; + }; + + + + + + struct value_error : public std::logic_error + { + public: + explicit value_error(std::string const&); + }; + + + + + + + struct value_consumer { + public: + struct iterator + : public boost::input_iterator_helper::type, + boost::iterator_difference::type, + boost::iterator_pointer::type, + boost::iterator_reference::type> + { + public: + iterator(); + explicit iterator(value::iterator* p) : ptr_(p) {} + friend bool operator==(iterator x, iterator y) + { return *x.ptr_ == *y.ptr_; } + iterator& operator++() { ++*ptr_; return *this; } + reference operator*() const { return **ptr_; } + pointer operator->() const { return ptr_->operator->(); } + private: + value::iterator* ptr_; + }; + + typedef iterator const_iterator; + typedef iterator::reference reference; + + value_consumer(value const& x) + : list_(x) + , pos_(x.begin()) + , end_(x.end()) + {} + + value_consumer(reference x) + : list_(x) + , pos_(x.begin()) + , end_(x.end()) + {} + + reference consume() + { + assert_check(); + return *pos_++; + } + + reference consume(value::tag_type t) + { + assert_check(t); + return *pos_++; + } + + value optional_consume() + { + if(check()) { + return *pos_++; + } + else { + return value(); + } + } + + value optional_consume(value::tag_type t) + { + if(check(t)) { + return *pos_++; + } + else { + return value(); + } + } + + bool check() const + { + return pos_ != end_; + } + + bool check(value::tag_type t) const + { + return pos_ != end_ && t == pos_->get_tag(); + } + + void finish() const + { + if (pos_ != end_) + throw value_error("Not all values handled."); + } + + iterator begin() { return iterator(&pos_); } + iterator end() { return iterator(&end_); } + private: + + void assert_check() const + { + if (pos_ == end_) + throw value_error("Attempt to read past end of value list."); + } + + void assert_check(value::tag_type t) const + { + assert_check(); + if (t != pos_->get_tag()) + throw value_error("Incorrect value tag."); + } + + value list_; + value::iterator pos_, end_; + }; +} +# 15 "quickbook/src/id_manager.hpp" 2 + +namespace quickbook +{ + + + + + struct id_category + { + enum categories + { + default_category = 0, + numbered, + generated, + generated_heading, + generated_section, + generated_doc, + explicit_id, + explicit_section_id, + explicit_anchor_id + }; + + id_category() : c(default_category) {} + id_category(categories c) : c(c) {} + explicit id_category(int c) : c(categories(c)) {} + + bool operator==(id_category rhs) const { return c == rhs.c; } + + categories c; + }; + + struct id_state; + struct section_manager; + + struct id_manager + { + id_manager(); + ~id_manager(); + + std::string start_file_with_docinfo( + unsigned compatibility_version, + std::string const& include_doc_id, + std::string const& id, + value const& title); + + void start_file( + unsigned compatibility_version, + std::string const& include_doc_id, + std::string const& id, + value const& title); + + void end_file(); + + std::string begin_section(std::string const&, id_category); + void end_section(); + int section_level() const; + + std::string old_style_id(std::string const&, id_category); + std::string add_id(std::string const&, id_category); + std::string add_anchor(std::string const&, id_category); + + std::string replace_placeholders_with_unresolved_ids( + std::string const&) const; + std::string replace_placeholders(std::string const&) const; + + unsigned compatibility_version() const; + private: + boost::scoped_ptr state; + }; +} +# 10 "quickbook/src/id_manager.cpp" 2 +# 1 "quickbook/src/utils.hpp" 1 +# 15 "quickbook/src/utils.hpp" +# 1 "../boost/range/algorithm_ext/push_back.hpp" 1 +# 18 "../boost/range/algorithm_ext/push_back.hpp" +# 1 "../boost/assert.hpp" 1 +# 50 "../boost/assert.hpp" +# 1 "/usr/include/assert.h" 1 3 4 +# 51 "../boost/assert.hpp" 2 +# 19 "../boost/range/algorithm_ext/push_back.hpp" 2 + +namespace boost +{ + namespace range + { + +template< class Container, class Range > +inline Container& push_back( Container& on, const Range& from ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check28; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check29; + (static_cast (0)) + ; + on.insert( on.end(), boost::begin(from), boost::end(from) ); + return on; +} + + } + using range::push_back; +} +# 16 "quickbook/src/utils.hpp" 2 +# 1 "../boost/range/adaptor/transformed.hpp" 1 +# 14 "../boost/range/adaptor/transformed.hpp" +# 1 "../boost/range/adaptor/argument_fwd.hpp" 1 +# 21 "../boost/range/adaptor/argument_fwd.hpp" +namespace boost +{ + namespace range_detail + { + template< class T > + struct holder + { + T val; + holder( T t ) : val(t) + { } + }; + + template< class T > + struct holder2 + { + T val1, val2; + holder2( T t, T u ) : val1(t), val2(u) + { } + }; + + template< template class Holder > + struct forwarder + { + template< class T > + Holder operator()( T t ) const + { + return Holder(t); + } + }; + + template< template class Holder > + struct forwarder2 + { + template< class T > + Holder operator()( T t, T u ) const + { + return Holder(t,u); + } + }; + + template< template class Holder > + struct forwarder2TU + { + template< class T, class U > + Holder operator()( T t, U u ) const + { + return Holder(t, u); + } + }; + + + } + +} +# 15 "../boost/range/adaptor/transformed.hpp" 2 + +# 1 "../boost/iterator/transform_iterator.hpp" 1 +# 16 "../boost/iterator/transform_iterator.hpp" +# 1 "../boost/type_traits/function_traits.hpp" 1 +# 16 "../boost/type_traits/function_traits.hpp" +namespace boost { + + +namespace detail { + +template struct function_traits_helper; + +template +struct function_traits_helper +{ + static const unsigned arity = 0; + typedef R result_type; +}; + +template +struct function_traits_helper +{ + static const unsigned arity = 1; + typedef R result_type; + typedef T1 arg1_type; + typedef T1 argument_type; +}; + +template +struct function_traits_helper +{ + static const unsigned arity = 2; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T1 first_argument_type; + typedef T2 second_argument_type; +}; + +template +struct function_traits_helper +{ + static const unsigned arity = 3; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; +}; + +template +struct function_traits_helper +{ + static const unsigned arity = 4; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; +}; + +template +struct function_traits_helper +{ + static const unsigned arity = 5; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; +}; + +template +struct function_traits_helper +{ + static const unsigned arity = 6; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; +}; + +template +struct function_traits_helper +{ + static const unsigned arity = 7; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; + typedef T7 arg7_type; +}; + +template +struct function_traits_helper +{ + static const unsigned arity = 8; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; + typedef T7 arg7_type; + typedef T8 arg8_type; +}; + +template +struct function_traits_helper +{ + static const unsigned arity = 9; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; + typedef T7 arg7_type; + typedef T8 arg8_type; + typedef T9 arg9_type; +}; + +template +struct function_traits_helper +{ + static const unsigned arity = 10; + typedef R result_type; + typedef T1 arg1_type; + typedef T2 arg2_type; + typedef T3 arg3_type; + typedef T4 arg4_type; + typedef T5 arg5_type; + typedef T6 arg6_type; + typedef T7 arg7_type; + typedef T8 arg8_type; + typedef T9 arg9_type; + typedef T10 arg10_type; +}; + +} + +template +struct function_traits : + public boost::detail::function_traits_helper::type> +{ +}; +# 234 "../boost/type_traits/function_traits.hpp" +} +# 17 "../boost/iterator/transform_iterator.hpp" 2 + + + + + + +# 1 "../boost/utility/result_of.hpp" 1 +# 13 "../boost/utility/result_of.hpp" +# 1 "../boost/preprocessor/iteration/iterate.hpp" 1 +# 20 "../boost/preprocessor/iteration/iterate.hpp" +# 1 "../boost/preprocessor/slot/slot.hpp" 1 +# 16 "../boost/preprocessor/slot/slot.hpp" +# 1 "../boost/preprocessor/slot/detail/def.hpp" 1 +# 17 "../boost/preprocessor/slot/slot.hpp" 2 +# 21 "../boost/preprocessor/iteration/iterate.hpp" 2 +# 14 "../boost/utility/result_of.hpp" 2 + + + +# 1 "../boost/preprocessor/repetition/enum_shifted_params.hpp" 1 +# 18 "../boost/utility/result_of.hpp" 2 +# 1 "../boost/preprocessor/facilities/intercept.hpp" 1 +# 19 "../boost/utility/result_of.hpp" 2 +# 27 "../boost/utility/result_of.hpp" +# 1 "../boost/utility/declval.hpp" 1 +# 37 "../boost/utility/declval.hpp" +namespace boost { + + template + typename add_rvalue_reference::type declval(); + +} +# 28 "../boost/utility/result_of.hpp" 2 + + + + + +namespace boost { + +template struct result_of; +template struct tr1_result_of; + + +namespace detail { + +template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_result_type { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; + +template struct tr1_result_of_impl; +template struct cpp0x_result_of_impl; + +template +struct result_of_void_impl +{ + typedef void type; +}; + +template +struct result_of_void_impl +{ + typedef R type; +}; + +template +struct result_of_void_impl +{ + typedef R type; +}; + + +template +struct result_of_pointer + : tr1_result_of_impl::type, FArgs, false> { }; + +template +struct tr1_result_of_impl +{ + typedef typename F::result_type type; +}; + +template +struct is_function_with_no_args : mpl::false_ {}; + +template +struct is_function_with_no_args : mpl::true_ {}; + +template +struct result_of_nested_result : F::template result +{}; + +template +struct tr1_result_of_impl + : mpl::if_, + result_of_void_impl, + result_of_nested_result >::type +{}; + +} + + +# 1 "../boost/preprocessor/iteration/detail/iter/forward1.hpp" 1 +# 24 "../boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "../boost/preprocessor/iteration/detail/bounds/lower1.hpp" 1 +# 12 "../boost/preprocessor/iteration/detail/bounds/lower1.hpp" +# 1 "../boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "../boost/preprocessor/iteration/detail/bounds/lower1.hpp" 2 +# 25 "../boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + +# 1 "../boost/preprocessor/iteration/detail/bounds/upper1.hpp" 1 +# 12 "../boost/preprocessor/iteration/detail/bounds/upper1.hpp" +# 1 "../boost/preprocessor/slot/detail/shared.hpp" 1 +# 13 "../boost/preprocessor/iteration/detail/bounds/upper1.hpp" 2 +# 27 "../boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 47 "../boost/preprocessor/iteration/detail/iter/forward1.hpp" +# 1 "../boost/utility/detail/result_of_iterate.hpp" 1 +# 21 "../boost/utility/detail/result_of_iterate.hpp" +template +struct tr1_result_of + : mpl::if_< + mpl::or_< is_pointer, is_member_function_pointer > + , boost::detail::tr1_result_of_impl< + typename remove_cv::type, + typename remove_cv::type(), + (boost::detail::has_result_type::value)> + , boost::detail::tr1_result_of_impl< + F, + F(), + (boost::detail::has_result_type::value)> >::type { }; +# 72 "../boost/utility/detail/result_of_iterate.hpp" +template +struct result_of + : tr1_result_of { }; +# 48 "../boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "../boost/utility/detail/result_of_iterate.hpp" 1 +# 21 "../boost/utility/detail/result_of_iterate.hpp" +template +struct tr1_result_of + : mpl::if_< + mpl::or_< is_pointer, is_member_function_pointer > + , boost::detail::tr1_result_of_impl< + typename remove_cv::type, + typename remove_cv::type( T0), + (boost::detail::has_result_type::value)> + , boost::detail::tr1_result_of_impl< + F, + F( T0), + (boost::detail::has_result_type::value)> >::type { }; +# 72 "../boost/utility/detail/result_of_iterate.hpp" +template +struct result_of + : tr1_result_of { }; +# 84 "../boost/utility/detail/result_of_iterate.hpp" +namespace detail { + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + + +} +# 53 "../boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "../boost/utility/detail/result_of_iterate.hpp" 1 +# 21 "../boost/utility/detail/result_of_iterate.hpp" +template +struct tr1_result_of + : mpl::if_< + mpl::or_< is_pointer, is_member_function_pointer > + , boost::detail::tr1_result_of_impl< + typename remove_cv::type, + typename remove_cv::type( T0 , T1), + (boost::detail::has_result_type::value)> + , boost::detail::tr1_result_of_impl< + F, + F( T0 , T1), + (boost::detail::has_result_type::value)> >::type { }; +# 72 "../boost/utility/detail/result_of_iterate.hpp" +template +struct result_of + : tr1_result_of { }; +# 84 "../boost/utility/detail/result_of_iterate.hpp" +namespace detail { + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + + +} +# 58 "../boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "../boost/utility/detail/result_of_iterate.hpp" 1 +# 21 "../boost/utility/detail/result_of_iterate.hpp" +template +struct tr1_result_of + : mpl::if_< + mpl::or_< is_pointer, is_member_function_pointer > + , boost::detail::tr1_result_of_impl< + typename remove_cv::type, + typename remove_cv::type( T0 , T1 , T2), + (boost::detail::has_result_type::value)> + , boost::detail::tr1_result_of_impl< + F, + F( T0 , T1 , T2), + (boost::detail::has_result_type::value)> >::type { }; +# 72 "../boost/utility/detail/result_of_iterate.hpp" +template +struct result_of + : tr1_result_of { }; +# 84 "../boost/utility/detail/result_of_iterate.hpp" +namespace detail { + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + + +} +# 63 "../boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "../boost/utility/detail/result_of_iterate.hpp" 1 +# 21 "../boost/utility/detail/result_of_iterate.hpp" +template +struct tr1_result_of + : mpl::if_< + mpl::or_< is_pointer, is_member_function_pointer > + , boost::detail::tr1_result_of_impl< + typename remove_cv::type, + typename remove_cv::type( T0 , T1 , T2 , T3), + (boost::detail::has_result_type::value)> + , boost::detail::tr1_result_of_impl< + F, + F( T0 , T1 , T2 , T3), + (boost::detail::has_result_type::value)> >::type { }; +# 72 "../boost/utility/detail/result_of_iterate.hpp" +template +struct result_of + : tr1_result_of { }; +# 84 "../boost/utility/detail/result_of_iterate.hpp" +namespace detail { + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + + +} +# 68 "../boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "../boost/utility/detail/result_of_iterate.hpp" 1 +# 21 "../boost/utility/detail/result_of_iterate.hpp" +template +struct tr1_result_of + : mpl::if_< + mpl::or_< is_pointer, is_member_function_pointer > + , boost::detail::tr1_result_of_impl< + typename remove_cv::type, + typename remove_cv::type( T0 , T1 , T2 , T3 , T4), + (boost::detail::has_result_type::value)> + , boost::detail::tr1_result_of_impl< + F, + F( T0 , T1 , T2 , T3 , T4), + (boost::detail::has_result_type::value)> >::type { }; +# 72 "../boost/utility/detail/result_of_iterate.hpp" +template +struct result_of + : tr1_result_of { }; +# 84 "../boost/utility/detail/result_of_iterate.hpp" +namespace detail { + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + + +} +# 73 "../boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "../boost/utility/detail/result_of_iterate.hpp" 1 +# 21 "../boost/utility/detail/result_of_iterate.hpp" +template +struct tr1_result_of + : mpl::if_< + mpl::or_< is_pointer, is_member_function_pointer > + , boost::detail::tr1_result_of_impl< + typename remove_cv::type, + typename remove_cv::type( T0 , T1 , T2 , T3 , T4 , T5), + (boost::detail::has_result_type::value)> + , boost::detail::tr1_result_of_impl< + F, + F( T0 , T1 , T2 , T3 , T4 , T5), + (boost::detail::has_result_type::value)> >::type { }; +# 72 "../boost/utility/detail/result_of_iterate.hpp" +template +struct result_of + : tr1_result_of { }; +# 84 "../boost/utility/detail/result_of_iterate.hpp" +namespace detail { + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + + +} +# 78 "../boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "../boost/utility/detail/result_of_iterate.hpp" 1 +# 21 "../boost/utility/detail/result_of_iterate.hpp" +template +struct tr1_result_of + : mpl::if_< + mpl::or_< is_pointer, is_member_function_pointer > + , boost::detail::tr1_result_of_impl< + typename remove_cv::type, + typename remove_cv::type( T0 , T1 , T2 , T3 , T4 , T5 , T6), + (boost::detail::has_result_type::value)> + , boost::detail::tr1_result_of_impl< + F, + F( T0 , T1 , T2 , T3 , T4 , T5 , T6), + (boost::detail::has_result_type::value)> >::type { }; +# 72 "../boost/utility/detail/result_of_iterate.hpp" +template +struct result_of + : tr1_result_of { }; +# 84 "../boost/utility/detail/result_of_iterate.hpp" +namespace detail { + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + + +} +# 83 "../boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "../boost/utility/detail/result_of_iterate.hpp" 1 +# 21 "../boost/utility/detail/result_of_iterate.hpp" +template +struct tr1_result_of + : mpl::if_< + mpl::or_< is_pointer, is_member_function_pointer > + , boost::detail::tr1_result_of_impl< + typename remove_cv::type, + typename remove_cv::type( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7), + (boost::detail::has_result_type::value)> + , boost::detail::tr1_result_of_impl< + F, + F( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7), + (boost::detail::has_result_type::value)> >::type { }; +# 72 "../boost/utility/detail/result_of_iterate.hpp" +template +struct result_of + : tr1_result_of { }; +# 84 "../boost/utility/detail/result_of_iterate.hpp" +namespace detail { + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + + +} +# 88 "../boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "../boost/utility/detail/result_of_iterate.hpp" 1 +# 21 "../boost/utility/detail/result_of_iterate.hpp" +template +struct tr1_result_of + : mpl::if_< + mpl::or_< is_pointer, is_member_function_pointer > + , boost::detail::tr1_result_of_impl< + typename remove_cv::type, + typename remove_cv::type( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8), + (boost::detail::has_result_type::value)> + , boost::detail::tr1_result_of_impl< + F, + F( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8), + (boost::detail::has_result_type::value)> >::type { }; +# 72 "../boost/utility/detail/result_of_iterate.hpp" +template +struct result_of + : tr1_result_of { }; +# 84 "../boost/utility/detail/result_of_iterate.hpp" +namespace detail { + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + + +} +# 93 "../boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 + + + + +# 1 "../boost/utility/detail/result_of_iterate.hpp" 1 +# 21 "../boost/utility/detail/result_of_iterate.hpp" +template +struct tr1_result_of + : mpl::if_< + mpl::or_< is_pointer, is_member_function_pointer > + , boost::detail::tr1_result_of_impl< + typename remove_cv::type, + typename remove_cv::type( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9), + (boost::detail::has_result_type::value)> + , boost::detail::tr1_result_of_impl< + F, + F( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9), + (boost::detail::has_result_type::value)> >::type { }; +# 72 "../boost/utility/detail/result_of_iterate.hpp" +template +struct result_of + : tr1_result_of { }; +# 84 "../boost/utility/detail/result_of_iterate.hpp" +namespace detail { + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + +template +struct tr1_result_of_impl +{ + typedef R type; +}; + + +} +# 98 "../boost/preprocessor/iteration/detail/iter/forward1.hpp" 2 +# 96 "../boost/utility/result_of.hpp" 2 + + + + + +} +# 24 "../boost/iterator/transform_iterator.hpp" 2 + + + + + + +# 1 "../boost/iterator/detail/config_def.hpp" 1 +# 31 "../boost/iterator/transform_iterator.hpp" 2 + + +namespace boost +{ + template + class transform_iterator; + + namespace detail + { + + template + struct transform_iterator_base + { + private: + + + typedef typename ia_dflt_help< + Reference + , result_of::reference)> + >::type reference; + + + + + + + typedef typename ia_dflt_help< + Value + , remove_reference + >::type cv_value_type; + + public: + typedef iterator_adaptor< + transform_iterator + , Iterator + , cv_value_type + , use_default + , reference + > type; + }; + } + + template + class transform_iterator + : public boost::detail::transform_iterator_base::type + { + typedef typename + boost::detail::transform_iterator_base::type + super_t; + + friend class iterator_core_access; + + public: + transform_iterator() { } + + transform_iterator(Iterator const& x, UnaryFunc f) + : super_t(x), m_f(f) { } + + explicit transform_iterator(Iterator const& x) + : super_t(x) + { + + + + + + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((is_class::value) == 0 ? false : true) >)> boost_static_assert_typedef_97; + + } + + template < + class OtherUnaryFunction + , class OtherIterator + , class OtherReference + , class OtherValue> + transform_iterator( + transform_iterator const& t + , typename enable_if_convertible::type* = 0 + + , typename enable_if_convertible::type* = 0 + + ) + : super_t(t.base()), m_f(t.functor()) + {} + + UnaryFunc functor() const + { return m_f; } + + private: + typename super_t::reference dereference() const + { return m_f(*this->base()); } + + + + UnaryFunc m_f; + }; + + template + transform_iterator + make_transform_iterator(Iterator it, UnaryFunc fun) + { + return transform_iterator(it, fun); + } +# 142 "../boost/iterator/transform_iterator.hpp" + template + + + + typename iterators::enable_if< + + is_class + , transform_iterator + + + + >::type + make_transform_iterator(Iterator it) + { + return transform_iterator(it, UnaryFunc()); + } +# 168 "../boost/iterator/transform_iterator.hpp" +} + +# 1 "../boost/iterator/detail/config_undef.hpp" 1 +# 171 "../boost/iterator/transform_iterator.hpp" 2 +# 17 "../boost/range/adaptor/transformed.hpp" 2 + + +namespace boost +{ + namespace range_detail + { + + template< class F, class R > + struct transformed_range : + public boost::iterator_range< + boost::transform_iterator< F, + typename range_iterator::type + > + > + { + private: + typedef boost::iterator_range< + boost::transform_iterator< F, + typename range_iterator::type + > + > + base; + + public: + typedef F transform_fn_type; + typedef R source_range_type; + + transformed_range( F f, R& r ) + : base( boost::make_transform_iterator( boost::begin(r), f ), + boost::make_transform_iterator( boost::end(r), f ) ) + + { } + }; + + template< class T > + struct transform_holder : holder + { + transform_holder( T r ) : holder(r) + { } + }; + + template< class InputRng, class UnaryFunction > + inline transformed_range + operator|( InputRng& r, + const transform_holder& f ) + { + return transformed_range( f.val, r ); + } + + template< class InputRng, class UnaryFunction > + inline transformed_range + operator|( const InputRng& r, + const transform_holder& f ) + { + return transformed_range( f.val, r ); + } + + } + + using range_detail::transformed_range; + + namespace adaptors + { + namespace + { + const range_detail::forwarder + transformed = + range_detail::forwarder(); + } + + template + inline transformed_range + transform(InputRange& rng, UnaryFunction fn) + { + return transformed_range(fn, rng); + } + + template + inline transformed_range + transform(const InputRange& rng, UnaryFunction fn) + { + return transformed_range(fn, rng); + } + } + +} +# 17 "quickbook/src/utils.hpp" 2 + +namespace quickbook { namespace detail { + void print_char(char ch, std::ostream& out); + void print_string(std::basic_string const& str, std::ostream& out); + char filter_identifier_char(char ch); + + template + inline std::string + make_identifier(Range const& range) + { + std::string out_name; + + boost::push_back(out_name, + range | boost::adaptors::transformed(filter_identifier_char)); + + return out_name; + } + + std::string escape_uri(std::string uri); + + + + + enum file_type + { + cpp_file + , python_file + }; + + file_type get_file_type(std::string const& extension); +}} +# 11 "quickbook/src/id_manager.cpp" 2 + + + +# 1 "../boost/unordered_map.hpp" 1 +# 16 "../boost/unordered_map.hpp" +# 1 "../boost/unordered/unordered_map.hpp" 1 +# 16 "../boost/unordered/unordered_map.hpp" +# 1 "../boost/unordered/unordered_map_fwd.hpp" 1 +# 13 "../boost/unordered/unordered_map_fwd.hpp" +# 1 "../boost/unordered/detail/fwd.hpp" 1 +# 16 "../boost/unordered/detail/fwd.hpp" +# 1 "../boost/functional/hash_fwd.hpp" 1 +# 17 "../boost/unordered/detail/fwd.hpp" 2 + +namespace boost +{ +namespace unordered +{ + template , + class P = std::equal_to, + class A = std::allocator > > + class unordered_map; + + template , + class P = std::equal_to, + class A = std::allocator > > + class unordered_multimap; + + template , + class P = std::equal_to, + class A = std::allocator > + class unordered_set; + + template , + class P = std::equal_to, + class A = std::allocator > + class unordered_multiset; + + struct piecewise_construct_t {}; + const piecewise_construct_t piecewise_construct = piecewise_construct_t(); +} +} +# 14 "../boost/unordered/unordered_map_fwd.hpp" 2 + +namespace boost +{ + namespace unordered + { + template + inline bool operator==(unordered_map const&, + unordered_map const&); + template + inline bool operator!=(unordered_map const&, + unordered_map const&); + template + inline void swap(unordered_map&, + unordered_map&); + + template + inline bool operator==(unordered_multimap const&, + unordered_multimap const&); + template + inline bool operator!=(unordered_multimap const&, + unordered_multimap const&); + template + inline void swap(unordered_multimap&, + unordered_multimap&); + } + + using boost::unordered::unordered_map; + using boost::unordered::unordered_multimap; + using boost::unordered::swap; + using boost::unordered::operator==; + using boost::unordered::operator!=; +} +# 17 "../boost/unordered/unordered_map.hpp" 2 +# 1 "../boost/unordered/detail/allocator_helpers.hpp" 1 +# 19 "../boost/unordered/detail/allocator_helpers.hpp" +# 1 "../boost/detail/select_type.hpp" 1 +# 16 "../boost/detail/select_type.hpp" +namespace boost { namespace detail { + + + + + + + template struct if_true + { + template + struct then { typedef T type; }; + }; + + template <> + struct if_true + { + template + struct then { typedef F type; }; + }; +}} +# 20 "../boost/unordered/detail/allocator_helpers.hpp" 2 + + +# 1 "../boost/preprocessor/enum.hpp" 1 +# 15 "../boost/preprocessor/enum.hpp" +# 1 "../boost/preprocessor/repetition/enum.hpp" 1 +# 20 "../boost/preprocessor/repetition/enum.hpp" +# 1 "../boost/preprocessor/detail/auto_rec.hpp" 1 +# 21 "../boost/preprocessor/repetition/enum.hpp" 2 +# 16 "../boost/preprocessor/enum.hpp" 2 +# 23 "../boost/unordered/detail/allocator_helpers.hpp" 2 + +# 1 "../boost/type_traits/add_lvalue_reference.hpp" 1 +# 12 "../boost/type_traits/add_lvalue_reference.hpp" +# 1 "../boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/type_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/type_trait_def.hpp" 2 +# 13 "../boost/type_traits/add_lvalue_reference.hpp" 2 + +namespace boost{ + +template< typename T > struct add_lvalue_reference { public: typedef typename boost::add_reference::type type; }; + + + + + +} + +# 1 "../boost/type_traits/detail/type_trait_undef.hpp" 1 +# 25 "../boost/type_traits/add_lvalue_reference.hpp" 2 +# 25 "../boost/unordered/detail/allocator_helpers.hpp" 2 +# 1 "../boost/pointer_to_other.hpp" 1 +# 18 "../boost/pointer_to_other.hpp" +namespace boost +{ + + + +template +struct pointer_to_other; + +template class Sp> +struct pointer_to_other< Sp, U > +{ + typedef Sp type; +}; + +template class Sp> +struct pointer_to_other< Sp, U > +{ + typedef Sp type; +}; + +template class Sp> +struct pointer_to_other< Sp, U > +{ + typedef Sp type; +}; + +template +struct pointer_to_other< T*, U > +{ + typedef U* type; +}; + +} +# 26 "../boost/unordered/detail/allocator_helpers.hpp" 2 +# 1 "../boost/assert.hpp" 1 +# 50 "../boost/assert.hpp" +# 1 "/usr/include/assert.h" 1 3 4 +# 51 "../boost/assert.hpp" 2 +# 27 "../boost/unordered/detail/allocator_helpers.hpp" 2 +# 41 "../boost/unordered/detail/allocator_helpers.hpp" +namespace boost { namespace unordered { namespace detail { +# 56 "../boost/unordered/detail/allocator_helpers.hpp" + template + struct integral_constant { enum { value = Value }; }; + + typedef boost::unordered::detail::integral_constant true_type; + typedef boost::unordered::detail::integral_constant false_type; +# 72 "../boost/unordered/detail/allocator_helpers.hpp" + template + inline void destroy(T* x) { + x->~T(); + } +# 86 "../boost/unordered/detail/allocator_helpers.hpp" + template typename boost::add_lvalue_reference::type make(); + struct choice9 { typedef char (&type)[9]; }; + struct choice8 : choice9 { typedef char (&type)[8]; }; + struct choice7 : choice8 { typedef char (&type)[7]; }; + struct choice6 : choice7 { typedef char (&type)[6]; }; + struct choice5 : choice6 { typedef char (&type)[5]; }; + struct choice4 : choice5 { typedef char (&type)[4]; }; + struct choice3 : choice4 { typedef char (&type)[3]; }; + struct choice2 : choice3 { typedef char (&type)[2]; }; + struct choice1 : choice2 { typedef char (&type)[1]; }; + choice1 choose(); + + typedef choice1::type yes_type; + typedef choice2::type no_type; + + struct private_type + { + private_type const &operator,(int) const; + }; + + template + no_type is_private_type(T const&); + yes_type is_private_type(private_type const&); + + struct convert_from_anything { + template + convert_from_anything(T const&); + }; + + + + + + template struct expr_test; + template struct expr_test : T {}; + template static char for_expr_test(U const&); +# 212 "../boost/unordered/detail/allocator_helpers.hpp" + template + struct rebind_wrap + { + typedef typename Alloc::template rebind::other + type; + }; +# 242 "../boost/unordered/detail/allocator_helpers.hpp" + template + struct sfinae : T2 {}; +# 271 "../boost/unordered/detail/allocator_helpers.hpp" + template struct default_type_pointer { template static typename boost::unordered::detail::sfinae< typename X::pointer, choice1>::type test(choice1); template static choice2::type test(choice2); struct DefaultWrap { typedef Default pointer; }; enum { value = (1 == sizeof(test(choose()))) }; typedef typename boost::detail::if_true:: template then ::type::pointer type; }; + template struct default_type_const_pointer { template static typename boost::unordered::detail::sfinae< typename X::const_pointer, choice1>::type test(choice1); template static choice2::type test(choice2); struct DefaultWrap { typedef Default const_pointer; }; enum { value = (1 == sizeof(test(choose()))) }; typedef typename boost::detail::if_true:: template then ::type::const_pointer type; }; + template struct default_type_void_pointer { template static typename boost::unordered::detail::sfinae< typename X::void_pointer, choice1>::type test(choice1); template static choice2::type test(choice2); struct DefaultWrap { typedef Default void_pointer; }; enum { value = (1 == sizeof(test(choose()))) }; typedef typename boost::detail::if_true:: template then ::type::void_pointer type; }; + template struct default_type_const_void_pointer { template static typename boost::unordered::detail::sfinae< typename X::const_void_pointer, choice1>::type test(choice1); template static choice2::type test(choice2); struct DefaultWrap { typedef Default const_void_pointer; }; enum { value = (1 == sizeof(test(choose()))) }; typedef typename boost::detail::if_true:: template then ::type::const_void_pointer type; }; + template struct default_type_difference_type { template static typename boost::unordered::detail::sfinae< typename X::difference_type, choice1>::type test(choice1); template static choice2::type test(choice2); struct DefaultWrap { typedef Default difference_type; }; enum { value = (1 == sizeof(test(choose()))) }; typedef typename boost::detail::if_true:: template then ::type::difference_type type; }; + template struct default_type_size_type { template static typename boost::unordered::detail::sfinae< typename X::size_type, choice1>::type test(choice1); template static choice2::type test(choice2); struct DefaultWrap { typedef Default size_type; }; enum { value = (1 == sizeof(test(choose()))) }; typedef typename boost::detail::if_true:: template then ::type::size_type type; }; + template struct default_type_propagate_on_container_copy_assignment { template static typename boost::unordered::detail::sfinae< typename X::propagate_on_container_copy_assignment, choice1>::type test(choice1); template static choice2::type test(choice2); struct DefaultWrap { typedef Default propagate_on_container_copy_assignment; }; enum { value = (1 == sizeof(test(choose()))) }; typedef typename boost::detail::if_true:: template then ::type::propagate_on_container_copy_assignment type; }; + template struct default_type_propagate_on_container_move_assignment { template static typename boost::unordered::detail::sfinae< typename X::propagate_on_container_move_assignment, choice1>::type test(choice1); template static choice2::type test(choice2); struct DefaultWrap { typedef Default propagate_on_container_move_assignment; }; enum { value = (1 == sizeof(test(choose()))) }; typedef typename boost::detail::if_true:: template then ::type::propagate_on_container_move_assignment type; }; + template struct default_type_propagate_on_container_swap { template static typename boost::unordered::detail::sfinae< typename X::propagate_on_container_swap, choice1>::type test(choice1); template static choice2::type test(choice2); struct DefaultWrap { typedef Default propagate_on_container_swap; }; enum { value = (1 == sizeof(test(choose()))) }; typedef typename boost::detail::if_true:: template then ::type::propagate_on_container_swap type; }; + + + template + struct + + has_select_on_container_copy_construction +# 283 "../boost/unordered/detail/allocator_helpers.hpp" + { template static typename boost::unordered::detail::expr_test< + + choice1 +# 283 "../boost/unordered/detail/allocator_helpers.hpp" + , sizeof(boost::unordered::detail::for_expr_test(( (boost::unordered::detail::make< U const >().select_on_container_copy_construction ()), 0)))>::type test( + + choice1 +# 283 "../boost/unordered/detail/allocator_helpers.hpp" + ); template static + + choice2 +# 283 "../boost/unordered/detail/allocator_helpers.hpp" + ::type test( + + choice2 +# 283 "../boost/unordered/detail/allocator_helpers.hpp" + ); enum { value = sizeof(test(choose())) == sizeof(choice1::type) }; } + + ; + + template + struct + + has_max_size +# 288 "../boost/unordered/detail/allocator_helpers.hpp" + { template static typename boost::unordered::detail::expr_test< + + choice1 +# 288 "../boost/unordered/detail/allocator_helpers.hpp" + , sizeof(boost::unordered::detail::for_expr_test(( (boost::unordered::detail::make< U const >().max_size ()), 0)))>::type test( + + choice1 +# 288 "../boost/unordered/detail/allocator_helpers.hpp" + ); template static + + choice2 +# 288 "../boost/unordered/detail/allocator_helpers.hpp" + ::type test( + + choice2 +# 288 "../boost/unordered/detail/allocator_helpers.hpp" + ); enum { value = sizeof(test(choose())) == sizeof(choice1::type) }; } + + ; + + template + struct + + + + has_construct +# 293 "../boost/unordered/detail/allocator_helpers.hpp" + { template static typename boost::unordered::detail::expr_test< + + + + choice1 +# 293 "../boost/unordered/detail/allocator_helpers.hpp" + , sizeof(boost::unordered::detail::for_expr_test(( (boost::unordered::detail::make< U >().construct ( boost::unordered::detail::make(), boost::unordered::detail::make())), 0)))>::type test( + + + + choice1 +# 293 "../boost/unordered/detail/allocator_helpers.hpp" + ); template static + + + + choice2 +# 293 "../boost/unordered/detail/allocator_helpers.hpp" + ::type test( + + + + choice2 +# 293 "../boost/unordered/detail/allocator_helpers.hpp" + ); enum { value = sizeof(test(choose())) == sizeof(choice1::type) }; } + + + + ; + + template + struct + + has_destroy +# 300 "../boost/unordered/detail/allocator_helpers.hpp" + { template static typename boost::unordered::detail::expr_test< + + choice1 +# 300 "../boost/unordered/detail/allocator_helpers.hpp" + , sizeof(boost::unordered::detail::for_expr_test(( (boost::unordered::detail::make< U >().destroy (boost::unordered::detail::make())), 0)))>::type test( + + choice1 +# 300 "../boost/unordered/detail/allocator_helpers.hpp" + ); template static + + choice2 +# 300 "../boost/unordered/detail/allocator_helpers.hpp" + ::type test( + + choice2 +# 300 "../boost/unordered/detail/allocator_helpers.hpp" + ); enum { value = sizeof(test(choose())) == sizeof(choice1::type) }; } + + ; +# 317 "../boost/unordered/detail/allocator_helpers.hpp" + template + inline typename boost::enable_if_c< + boost::unordered::detail:: + has_select_on_container_copy_construction::value, Alloc + >::type call_select_on_container_copy_construction(const Alloc& rhs) + { + return rhs.select_on_container_copy_construction(); + } + + template + inline typename boost::disable_if_c< + boost::unordered::detail:: + has_select_on_container_copy_construction::value, Alloc + >::type call_select_on_container_copy_construction(const Alloc& rhs) + { + return rhs; + } + + template + inline typename boost::enable_if_c< + boost::unordered::detail::has_max_size::value, SizeType + >::type call_max_size(const Alloc& a) + { + return a.max_size(); + } + + template + inline typename boost::disable_if_c< + boost::unordered::detail::has_max_size::value, SizeType + >::type call_max_size(const Alloc&) + { + return (std::numeric_limits::max)(); + } + + template + struct allocator_traits + { + typedef Alloc allocator_type; + typedef typename Alloc::value_type value_type; + + typedef typename default_type_pointer::type + pointer; + + template + struct pointer_to_other : boost::pointer_to_other {}; + + typedef typename + default_type_const_pointer +# 363 "../boost/unordered/detail/allocator_helpers.hpp" + ::type>::type + + const_pointer; +# 375 "../boost/unordered/detail/allocator_helpers.hpp" + typedef typename + default_type_difference_type +# 375 "../boost/unordered/detail/allocator_helpers.hpp" + ::type + difference_type; + + typedef typename default_type_size_type::type + size_type; + + + + static pointer allocate(Alloc& a, size_type n) + { return a.allocate(n); } + + + + + + + + static void deallocate(Alloc& a, pointer p, size_type n) + { a.deallocate(p, n); } + + public: + + + + template + static typename boost::enable_if_c< + boost::unordered::detail::has_construct::value>::type + construct(Alloc& a, T* p, T const& x) + { + a.construct(p, x); + } + + template + static typename boost::disable_if_c< + boost::unordered::detail::has_construct::value>::type + construct(Alloc&, T* p, T const& x) + { + new ((void*) p) T(x); + } + + template + static typename boost::enable_if_c< + boost::unordered::detail::has_destroy::value>::type + destroy(Alloc& a, T* p) + { + a.destroy(p); + } + + template + static typename boost::disable_if_c< + boost::unordered::detail::has_destroy::value>::type + destroy(Alloc&, T* p) + { + boost::unordered::detail::destroy(p); + } + + static size_type max_size(const Alloc& a) + { + return boost::unordered::detail::call_max_size(a); + } + + + + static Alloc select_on_container_copy_construction(Alloc const& rhs) + { + return boost::unordered::detail:: + call_select_on_container_copy_construction(rhs); + } + + + + typedef typename + default_type_propagate_on_container_copy_assignment +# 446 "../boost/unordered/detail/allocator_helpers.hpp" + ::type + + propagate_on_container_copy_assignment; + typedef typename + default_type_propagate_on_container_move_assignment +# 449 "../boost/unordered/detail/allocator_helpers.hpp" + ::type + + propagate_on_container_move_assignment; + typedef typename + default_type_propagate_on_container_swap +# 452 "../boost/unordered/detail/allocator_helpers.hpp" + ::type + + propagate_on_container_swap; + }; +# 468 "../boost/unordered/detail/allocator_helpers.hpp" + template + struct array_constructor + { + typedef boost::unordered::detail::allocator_traits traits; + typedef typename traits::pointer pointer; + + Allocator& alloc_; + pointer ptr_; + pointer constructed_; + std::size_t length_; + + array_constructor(Allocator& a) + : alloc_(a), ptr_(), constructed_(), length_(0) + { + constructed_ = pointer(); + ptr_ = pointer(); + } + + ~array_constructor() { + if (ptr_) { + for(pointer p = ptr_; p != constructed_; ++p) + traits::destroy(alloc_, boost::addressof(*p)); + + traits::deallocate(alloc_, ptr_, length_); + } + } + + template + void construct(V const& v, std::size_t l) + { + (static_cast (0)); + length_ = l; + ptr_ = traits::allocate(alloc_, length_); + pointer end = ptr_ + static_cast(length_); + for(constructed_ = ptr_; constructed_ != end; ++constructed_) + traits::construct(alloc_, boost::addressof(*constructed_), v); + } + + pointer get() const + { + return ptr_; + } + + pointer release() + { + pointer p(ptr_); + ptr_ = pointer(); + return p; + } + private: + array_constructor(array_constructor const&); + array_constructor& operator=(array_constructor const&); + }; +}}} +# 18 "../boost/unordered/unordered_map.hpp" 2 +# 1 "../boost/unordered/detail/equivalent.hpp" 1 +# 14 "../boost/unordered/detail/equivalent.hpp" +# 1 "../boost/unordered/detail/table.hpp" 1 +# 10 "../boost/unordered/detail/table.hpp" +# 1 "../boost/unordered/detail/buckets.hpp" 1 +# 14 "../boost/unordered/detail/buckets.hpp" +# 1 "../boost/unordered/detail/util.hpp" 1 +# 15 "../boost/unordered/detail/util.hpp" +# 1 "../boost/type_traits/is_empty.hpp" 1 +# 32 "../boost/type_traits/is_empty.hpp" +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 33 "../boost/type_traits/is_empty.hpp" 2 + + + + + + + +namespace boost { + +namespace detail { +# 51 "../boost/type_traits/is_empty.hpp" +template +struct empty_helper_t1 : public T +{ + empty_helper_t1(); + int i[256]; +private: + + empty_helper_t1(const empty_helper_t1&); + empty_helper_t1& operator=(const empty_helper_t1&); +}; + + + + + +struct empty_helper_t2 { int i[256]; }; + + + +template +struct empty_helper +{ + static const bool value = false; +}; + +template +struct empty_helper +{ + static const bool value = (sizeof(empty_helper_t1) == sizeof(empty_helper_t2)) + + ; +}; + +template +struct is_empty_impl +{ + typedef typename remove_cv::type cvt; + static const bool value = ( ::boost::type_traits::ice_or< ::boost::detail::empty_helper::value>::value , false >::value ) + + + + + + ; +}; +# 211 "../boost/type_traits/is_empty.hpp" +template<> struct is_empty_impl< void > { public: static const bool value = (false); }; + +template<> struct is_empty_impl< void const > { public: static const bool value = (false); }; +template<> struct is_empty_impl< void volatile > { public: static const bool value = (false); }; +template<> struct is_empty_impl< void const volatile > { public: static const bool value = (false); }; + + +} + +template< typename T > struct is_empty : public ::boost::integral_constant::value> { public: }; + +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 225 "../boost/type_traits/is_empty.hpp" 2 +# 16 "../boost/unordered/detail/util.hpp" 2 + + + +# 1 "../boost/move/move.hpp" 1 +# 67 "../boost/move/move.hpp" + namespace boost { + namespace move_detail { + + + template + struct if_c + { + typedef T1 type; + }; + + template + struct if_c + { + typedef T2 type; + }; + + template + struct if_ + { + typedef typename if_c<0 != T1::value, T2, T3>::type type; + }; + + + template + struct enable_if_c + { + typedef T type; + }; + + template + struct enable_if_c {}; + + template + struct enable_if : public enable_if_c {}; + + template + struct disable_if : public enable_if_c {}; + + + template + struct integral_constant + { + static const T value = v; + typedef T value_type; + typedef integral_constant type; + }; + + + template + struct identity + { + typedef T type; + }; + + + template + class is_convertible + { + typedef char true_t; + class false_t { char dummy[2]; }; + static true_t dispatch(U); + static false_t dispatch(...); + static T &trigger(); + public: + enum { value = sizeof(dispatch(trigger())) == sizeof(true_t) }; + }; + + + template > + struct and_ + : public integral_constant + {}; + + template + struct not_ + : public integral_constant + {}; + + + template + struct is_lvalue_reference + : public integral_constant + {}; + + template + struct is_lvalue_reference + : public integral_constant + {}; + + + template + struct has_trivial_destructor + : public integral_constant + {}; + + + template struct addr_impl_ref + { + T & v_; + inline addr_impl_ref( T & v ): v_( v ) {} + inline operator T& () const { return v_; } + + private: + addr_impl_ref & operator=(const addr_impl_ref &); + }; + + template struct addressof_impl + { + static inline T * f( T & v, long ) + { + return reinterpret_cast( + &const_cast(reinterpret_cast(v))); + } + + static inline T * f( T * v, int ) + { return v; } + }; + + template + inline T * addressof( T & v ) + { + return ::boost::move_detail::addressof_impl::f + ( ::boost::move_detail::addr_impl_ref( v ), 0 ); + } + + } + } +# 226 "../boost/move/move.hpp" + namespace boost { + + namespace move_detail { + template + struct is_class_or_union + { + struct twochar { char _[2]; }; + template + static char is_class_or_union_tester(void(U::*)(void)); + template + static twochar is_class_or_union_tester(...); + static const bool value = sizeof(is_class_or_union_tester(0)) == sizeof(char); + }; + struct empty{}; + } + + + + + + + template + class rv + : public ::boost::move_detail::if_c + < ::boost::move_detail::is_class_or_union::value + , T + , ::boost::move_detail::empty + >::type + { + rv(); + ~rv(); + rv(rv const&); + void operator=(rv const&); + } __attribute__((__may_alias__)); +# 269 "../boost/move/move.hpp" + namespace move_detail { + + template + struct is_rv + : ::boost::move_detail::integral_constant + {}; + + template + struct is_rv< rv > + : ::boost::move_detail::integral_constant + {}; + + template + struct is_rv< const rv > + : ::boost::move_detail::integral_constant + {}; + + } + + + + + + + template + struct has_move_emulation_enabled + : ::boost::move_detail::is_convertible< T, ::boost::rv& > + {}; + + template + struct has_move_emulation_enabled + : ::boost::move_detail::integral_constant + {}; + + template + struct has_move_emulation_enabled< ::boost::rv > + : ::boost::move_detail::integral_constant + {}; + + template + struct has_move_emulation_enabled_aux + : has_move_emulation_enabled {}; + + template + struct has_nothrow_move + : public ::boost::move_detail::integral_constant + {}; + + + + + + + + template + inline typename ::boost::move_detail::disable_if, T&>::type move(T& x) + { + return x; + } + + template + inline typename ::boost::move_detail::enable_if, rv&>::type move(T& x) + { + return *static_cast* >(::boost::move_detail::addressof(x)); + } + + template + inline typename ::boost::move_detail::enable_if, rv&>::type move(rv& x) + { + return x; + } +# 380 "../boost/move/move.hpp" + template + inline typename ::boost::move_detail::enable_if< ::boost::move_detail::is_rv, T &>::type + forward(const typename ::boost::move_detail::identity::type &x) + { + return const_cast(x); + } + + template + inline typename ::boost::move_detail::disable_if< ::boost::move_detail::is_rv, const T &>::type + forward(const typename ::boost::move_detail::identity::type &x) + { + return x; + } +# 438 "../boost/move/move.hpp" + } +# 614 "../boost/move/move.hpp" +namespace boost { +# 627 "../boost/move/move.hpp" +template +class move_iterator +{ + public: + typedef It iterator_type; + typedef typename std::iterator_traits::value_type value_type; + + + + typedef typename ::boost::move_detail::if_ + < ::boost::has_move_emulation_enabled + , ::boost::rv& + , value_type & >::type reference; + + typedef It pointer; + typedef typename std::iterator_traits::difference_type difference_type; + typedef typename std::iterator_traits::iterator_category iterator_category; + + move_iterator() + {} + + explicit move_iterator(It i) + : m_it(i) + {} + + template + move_iterator(const move_iterator& u) + : m_it(u.base()) + {} + + iterator_type base() const + { return m_it; } + + reference operator*() const + { + + return *m_it; + + + + } + + pointer operator->() const + { return m_it; } + + move_iterator& operator++() + { ++m_it; return *this; } + + move_iterator operator++(int) + { move_iterator tmp(*this); ++(*this); return tmp; } + + move_iterator& operator--() + { --m_it; return *this; } + + move_iterator operator--(int) + { move_iterator tmp(*this); --(*this); return tmp; } + + move_iterator operator+ (difference_type n) const + { return move_iterator(m_it + n); } + + move_iterator& operator+=(difference_type n) + { m_it += n; return *this; } + + move_iterator operator- (difference_type n) const + { return move_iterator(m_it - n); } + + move_iterator& operator-=(difference_type n) + { m_it -= n; return *this; } + + reference operator[](difference_type n) const + { + + return m_it[n]; + + + + } + + friend bool operator==(const move_iterator& x, const move_iterator& y) + { return x.base() == y.base(); } + + friend bool operator!=(const move_iterator& x, const move_iterator& y) + { return x.base() != y.base(); } + + friend bool operator< (const move_iterator& x, const move_iterator& y) + { return x.base() < y.base(); } + + friend bool operator<=(const move_iterator& x, const move_iterator& y) + { return x.base() <= y.base(); } + + friend bool operator> (const move_iterator& x, const move_iterator& y) + { return x.base() > y.base(); } + + friend bool operator>=(const move_iterator& x, const move_iterator& y) + { return x.base() >= y.base(); } + + friend difference_type operator-(const move_iterator& x, const move_iterator& y) + { return x.base() - y.base(); } + + friend move_iterator operator+(difference_type n, const move_iterator& x) + { return move_iterator(x.base() + n); } + + private: + It m_it; +}; + + + +namespace move_detail { + +template +struct is_move_iterator + : public ::boost::move_detail::integral_constant +{ +}; + +template +struct is_move_iterator< ::boost::move_iterator > + : public ::boost::move_detail::integral_constant +{ +}; + +} +# 759 "../boost/move/move.hpp" +template +inline move_iterator make_move_iterator(const It &it) +{ return move_iterator(it); } +# 772 "../boost/move/move.hpp" +template +class back_move_insert_iterator + : public std::iterator +{ + C* container_m; + + public: + typedef C container_type; + + explicit back_move_insert_iterator(C& x) : container_m(&x) { } + + back_move_insert_iterator& operator=(typename C::reference x) + { container_m->push_back(boost::move(x)); return *this; } + + back_move_insert_iterator& operator*() { return *this; } + back_move_insert_iterator& operator++() { return *this; } + back_move_insert_iterator& operator++(int) { return *this; } +}; + + + +template +inline back_move_insert_iterator back_move_inserter(C& x) +{ + return back_move_insert_iterator(x); +} +# 807 "../boost/move/move.hpp" +template +class front_move_insert_iterator + : public std::iterator +{ + C* container_m; + +public: + typedef C container_type; + + explicit front_move_insert_iterator(C& x) : container_m(&x) { } + + front_move_insert_iterator& operator=(typename C::reference x) + { container_m->push_front(boost::move(x)); return *this; } + + front_move_insert_iterator& operator*() { return *this; } + front_move_insert_iterator& operator++() { return *this; } + front_move_insert_iterator& operator++(int) { return *this; } +}; + + + +template +inline front_move_insert_iterator front_move_inserter(C& x) +{ + return front_move_insert_iterator(x); +} + + + + + + +template +class move_insert_iterator + : public std::iterator +{ + C* container_m; + typename C::iterator pos_; + + public: + typedef C container_type; + + explicit move_insert_iterator(C& x, typename C::iterator pos) + : container_m(&x), pos_(pos) + {} + + move_insert_iterator& operator=(typename C::reference x) + { + pos_ = container_m->insert(pos_, ::boost::move(x)); + ++pos_; + return *this; + } + + move_insert_iterator& operator*() { return *this; } + move_insert_iterator& operator++() { return *this; } + move_insert_iterator& operator++(int) { return *this; } +}; + + + +template +inline move_insert_iterator move_inserter(C& x, typename C::iterator it) +{ + return move_insert_iterator(x, it); +} +# 890 "../boost/move/move.hpp" + template + O move(I f, I l, O result) + { + while (f != l) { + *result = ::boost::move(*f); + ++f; ++result; + } + return result; + } +# 917 "../boost/move/move.hpp" + template + O move_backward(I f, I l, O result) + { + while (f != l) { + --l; --result; + *result = ::boost::move(*l); + } + return result; + } +# 944 "../boost/move/move.hpp" +template + +F uninitialized_move(I f, I l, F r + + + + ) +{ + typedef typename std::iterator_traits::value_type input_value_type; + while (f != l) { + ::new(static_cast(&*r)) input_value_type(boost::move(*f)); + ++f; ++r; + } + return r; +} +# 979 "../boost/move/move.hpp" +namespace move_detail { + +template + +inline F uninitialized_move_move_iterator(I f, I l, F r + +) +{ + return ::boost::uninitialized_move(f, l, r); +} +# 1000 "../boost/move/move.hpp" +} + +template + +inline F uninitialized_copy_or_move(I f, I l, F r, + typename ::boost::move_detail::enable_if< move_detail::is_move_iterator >::type* = 0) +{ + return ::boost::move_detail::uninitialized_move_move_iterator(f, l, r); +} + + + + + + + +namespace move_detail { + +template + +inline F move_move_iterator(I f, I l, F r + +) +{ + return ::boost::move(f, l, r); +} +# 1039 "../boost/move/move.hpp" +} + +template + +inline F copy_or_move(I f, I l, F r, + typename ::boost::move_detail::enable_if< move_detail::is_move_iterator >::type* = 0) +{ + return ::boost::move_detail::move_move_iterator(f, l, r); +} +# 1064 "../boost/move/move.hpp" +template + +inline F uninitialized_copy_or_move(I f, I l, F r + + ,typename ::boost::move_detail::disable_if< move_detail::is_move_iterator >::type* = 0 + + ) +{ + return std::uninitialized_copy(f, l, r); +} +# 1087 "../boost/move/move.hpp" +template + +inline F copy_or_move(I f, I l, F r + + ,typename ::boost::move_detail::disable_if< move_detail::is_move_iterator >::type* = 0 + + ) +{ + return std::copy(f, l, r); +} +# 1108 "../boost/move/move.hpp" +template +struct has_trivial_destructor_after_move + : ::boost::move_detail::has_trivial_destructor +{}; + + + +namespace move_detail { + + + + + + + template< class T> + struct forward_type + { typedef const T &type; }; + + template< class T> + struct forward_type< boost::rv > + { typedef T type; }; + + + + + + +template< class T > struct is_rvalue_reference : ::boost::move_detail::integral_constant { }; + + + + template< class T > struct is_rvalue_reference< boost::rv& > + : ::boost::move_detail::integral_constant + {}; + + template< class T > struct is_rvalue_reference< const boost::rv& > + : ::boost::move_detail::integral_constant + {}; + + + + + + namespace detail_add_rvalue_reference + { + template< class T + , bool emulation = ::boost::has_move_emulation_enabled::value + , bool rv = ::boost::move_detail::is_rv::value > + struct add_rvalue_reference_impl { typedef T type; }; + + template< class T, bool emulation> + struct add_rvalue_reference_impl< T, emulation, true > { typedef T & type; }; + + template< class T, bool rv > + struct add_rvalue_reference_impl< T, true, rv > { typedef ::boost::rv& type; }; + } + + template< class T > + struct add_rvalue_reference + : detail_add_rvalue_reference::add_rvalue_reference_impl + { }; + + template< class T > + struct add_rvalue_reference + { typedef T & type; }; + + + +template< class T > struct remove_rvalue_reference { typedef T type; }; + + + + + template< class T > struct remove_rvalue_reference< rv > { typedef T type; }; + template< class T > struct remove_rvalue_reference< const rv > { typedef T type; }; + template< class T > struct remove_rvalue_reference< volatile rv > { typedef T type; }; + template< class T > struct remove_rvalue_reference< const volatile rv > { typedef T type; }; + template< class T > struct remove_rvalue_reference< rv& > { typedef T type; }; + template< class T > struct remove_rvalue_reference< const rv& > { typedef T type; }; + template< class T > struct remove_rvalue_reference< volatile rv& > { typedef T type; }; + template< class T > struct remove_rvalue_reference< const volatile rv& >{ typedef T type; }; + + +template +typename boost::move_detail::add_rvalue_reference::type declval(); + +} +# 1207 "../boost/move/move.hpp" +} +# 20 "../boost/unordered/detail/util.hpp" 2 + + +# 1 "../boost/swap.hpp" 1 +# 10 "../boost/swap.hpp" +# 1 "../boost/utility/swap.hpp" 1 +# 25 "../boost/utility/swap.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 26 "../boost/utility/swap.hpp" 2 + +namespace boost_swap_impl +{ + template + void swap_impl(T& left, T& right) + { + using namespace std; + swap(left,right); + } + + template + void swap_impl(T (& left)[N], T (& right)[N]) + { + for (std::size_t i = 0; i < N; ++i) + { + ::boost_swap_impl::swap_impl(left[i], right[i]); + } + } +} + +namespace boost +{ + template + void swap(T1& left, T2& right) + { + ::boost_swap_impl::swap_impl(left, right); + } +} +# 11 "../boost/swap.hpp" 2 +# 23 "../boost/unordered/detail/util.hpp" 2 + +namespace boost { namespace unordered { namespace detail { + + static const float minimum_max_load_factor = 1e-3f; + static const std::size_t default_bucket_count = 11; + struct move_tag {}; + struct empty_emplace {}; + + + + + template + struct is_forward : + boost::is_convertible< + typename boost::iterator_traversal::type, + boost::forward_traversal_tag> + {}; + + template + struct enable_if_forward : + boost::enable_if_c< + boost::unordered::detail::is_forward::value, + ReturnType> + {}; + + template + struct disable_if_forward : + boost::disable_if_c< + boost::unordered::detail::is_forward::value, + ReturnType> + {}; +# 67 "../boost/unordered/detail/util.hpp" + template struct prime_list_template + { + static std::size_t const value[]; + + + static std::ptrdiff_t const length; + + + + + }; + + template + std::size_t const prime_list_template::value[] = { + 5ul, 11ul, 17ul, 29ul, 37ul, 53ul, 67ul, 79ul, 97ul, 131ul, 193ul, 257ul, 389ul, 521ul, 769ul, 1031ul, 1543ul, 2053ul, 3079ul, 6151ul, 12289ul, 24593ul, 49157ul, 98317ul, 196613ul, 393241ul, 786433ul, 1572869ul, 3145739ul, 6291469ul, 12582917ul, 25165843ul, 50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul, 1610612741ul, 3221225473ul, 4294967291ul + }; + + + template + std::ptrdiff_t const prime_list_template::length + = 40; + + + + + typedef prime_list_template prime_list; + + + inline std::size_t next_prime(std::size_t num) { + std::size_t const* const prime_list_begin = prime_list::value; + std::size_t const* const prime_list_end = prime_list_begin + + prime_list::length; + std::size_t const* bound = + std::lower_bound(prime_list_begin, prime_list_end, num); + if(bound == prime_list_end) + bound--; + return *bound; + } + + + inline std::size_t prev_prime(std::size_t num) { + std::size_t const* const prime_list_begin = prime_list::value; + std::size_t const* const prime_list_end = prime_list_begin + + prime_list::length; + std::size_t const* bound = + std::upper_bound(prime_list_begin,prime_list_end, num); + if(bound != prime_list_begin) + bound--; + return *bound; + } + + + + + + + using ::std::distance; +# 136 "../boost/unordered/detail/util.hpp" + template + inline typename + boost::unordered::detail::enable_if_forward::type + insert_size(I i, I j) + { + return std::distance(i, j); + } + + template + inline typename + boost::unordered::detail::disable_if_forward::type + insert_size(I, I) + { + return 1; + } + + template + inline std::size_t initial_size(I i, I j, + std::size_t num_buckets = + boost::unordered::detail::default_bucket_count) + { + + return (std::max)( + boost::unordered::detail::insert_size(i, j) + 1, + num_buckets); + } + + + + + template + struct compressed_base : private T + { + compressed_base(T const& x) : T(x) {} + compressed_base(T& x, move_tag) : T(boost::move(x)) {} + + T& get() { return *this; } + T const& get() const { return *this; } + }; + + template + struct uncompressed_base + { + uncompressed_base(T const& x) : value_(x) {} + uncompressed_base(T& x, move_tag) : value_(boost::move(x)) {} + + T& get() { return value_; } + T const& get() const { return value_; } + private: + T value_; + }; + + template + struct generate_base + : boost::detail::if_true< + boost::is_empty::value + >:: template then< + boost::unordered::detail::compressed_base, + boost::unordered::detail::uncompressed_base + > + {}; + + template + struct compressed + : private boost::unordered::detail::generate_base::type, + private boost::unordered::detail::generate_base::type + { + typedef typename generate_base::type base1; + typedef typename generate_base::type base2; + + typedef T1 first_type; + typedef T2 second_type; + + first_type& first() { + return static_cast(this)->get(); + } + + first_type const& first() const { + return static_cast(this)->get(); + } + + second_type& second() { + return static_cast(this)->get(); + } + + second_type const& second() const { + return static_cast(this)->get(); + } + + template + compressed(First const& x1, Second const& x2) + : base1(x1), base2(x2) {} + + compressed(compressed const& x) + : base1(x.first()), base2(x.second()) {} + + compressed(compressed& x, move_tag m) + : base1(x.first(), m), base2(x.second(), m) {} + + void assign(compressed const& x) + { + first() = x.first(); + second() = x.second(); + } + + void move_assign(compressed& x) + { + first() = boost::move(x.first()); + second() = boost::move(x.second()); + } + + void swap(compressed& x) + { + boost::swap(first(), x.first()); + boost::swap(second(), x.second()); + } + + private: + + + compressed& operator=(compressed const&); + }; +}}} +# 15 "../boost/unordered/detail/buckets.hpp" 2 + +# 1 "../boost/unordered/detail/emplace_args.hpp" 1 +# 18 "../boost/unordered/detail/emplace_args.hpp" +# 1 "../boost/preprocessor/dec.hpp" 1 +# 19 "../boost/unordered/detail/emplace_args.hpp" 2 + + + + + +# 1 "../boost/tuple/tuple.hpp" 1 +# 32 "../boost/tuple/tuple.hpp" +# 1 "../boost/ref.hpp" 1 +# 29 "../boost/ref.hpp" +namespace boost +{ + +template class reference_wrapper +{ +public: + typedef T type; + + + + + + + + explicit reference_wrapper(T& t): t_(boost::addressof(t)) {} + + + + operator T& () const { return *t_; } + + T& get() const { return *t_; } + + T* get_pointer() const { return t_; } + +private: + + T* t_; +}; + + + + + + + +template inline reference_wrapper const ref(T & t) +{ + return reference_wrapper(t); +} + +template inline reference_wrapper const cref(T const & t) +{ + return reference_wrapper(t); +} + + + + + +template +class is_reference_wrapper + : public mpl::false_ +{ +}; + +template +class unwrap_reference +{ + public: + typedef T type; +}; +# 106 "../boost/ref.hpp" +template class is_reference_wrapper< reference_wrapper > : public mpl::true_ { }; template class unwrap_reference< reference_wrapper > { public: typedef T type; }; + +template class is_reference_wrapper< reference_wrapper const > : public mpl::true_ { }; template class unwrap_reference< reference_wrapper const > { public: typedef T type; }; +template class is_reference_wrapper< reference_wrapper volatile > : public mpl::true_ { }; template class unwrap_reference< reference_wrapper volatile > { public: typedef T type; }; +template class is_reference_wrapper< reference_wrapper const volatile > : public mpl::true_ { }; template class unwrap_reference< reference_wrapper const volatile > { public: typedef T type; }; +# 176 "../boost/ref.hpp" +template inline typename unwrap_reference::type& +unwrap_ref(T& t) +{ + return t; +} + +template inline T* get_pointer( reference_wrapper const & r ) +{ + return r.get_pointer(); +} + +} +# 33 "../boost/tuple/tuple.hpp" 2 +# 1 "../boost/tuple/detail/tuple_basic.hpp" 1 +# 38 "../boost/tuple/detail/tuple_basic.hpp" +# 1 "../boost/type_traits/cv_traits.hpp" 1 +# 16 "../boost/type_traits/cv_traits.hpp" +# 1 "../boost/type_traits/add_volatile.hpp" 1 +# 16 "../boost/type_traits/add_volatile.hpp" +# 1 "../boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/type_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/type_trait_def.hpp" 2 +# 17 "../boost/type_traits/add_volatile.hpp" 2 + +namespace boost { +# 33 "../boost/type_traits/add_volatile.hpp" +template< typename T > struct add_volatile { public: typedef T volatile type; }; + + + + + + +template< typename T > struct add_volatile { public: typedef T& type; }; + + +} + +# 1 "../boost/type_traits/detail/type_trait_undef.hpp" 1 +# 46 "../boost/type_traits/add_volatile.hpp" 2 +# 17 "../boost/type_traits/cv_traits.hpp" 2 +# 1 "../boost/type_traits/add_cv.hpp" 1 +# 17 "../boost/type_traits/add_cv.hpp" +# 1 "../boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/type_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/type_trait_def.hpp" 2 +# 18 "../boost/type_traits/add_cv.hpp" 2 + +namespace boost { +# 34 "../boost/type_traits/add_cv.hpp" +template< typename T > struct add_cv { public: typedef T const volatile type; }; + + + + + + +template< typename T > struct add_cv { public: typedef T& type; }; + + +} + +# 1 "../boost/type_traits/detail/type_trait_undef.hpp" 1 +# 47 "../boost/type_traits/add_cv.hpp" 2 +# 18 "../boost/type_traits/cv_traits.hpp" 2 + + + +# 1 "../boost/type_traits/remove_volatile.hpp" 1 +# 20 "../boost/type_traits/remove_volatile.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 21 "../boost/type_traits/remove_volatile.hpp" 2 + + + + + + +# 1 "../boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/type_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/type_trait_def.hpp" 2 +# 28 "../boost/type_traits/remove_volatile.hpp" 2 + +namespace boost { + + + +namespace detail { + +template +struct remove_volatile_helper +{ + typedef T type; +}; + +template +struct remove_volatile_helper +{ + typedef T const type; +}; + +template +struct remove_volatile_impl +{ + typedef typename remove_volatile_helper< + typename cv_traits_imp::unqualified_type + , ::boost::is_const::value + >::type type; +}; +# 67 "../boost/type_traits/remove_volatile.hpp" +} + + + +template< typename T > struct remove_volatile { public: typedef typename boost::detail::remove_volatile_impl::type type; }; +template< typename T > struct remove_volatile { public: typedef T& type; }; + +template< typename T, std::size_t N > struct remove_volatile { public: typedef T type[N]; }; +template< typename T, std::size_t N > struct remove_volatile { public: typedef T const type[N]; }; +# 84 "../boost/type_traits/remove_volatile.hpp" +} + +# 1 "../boost/type_traits/detail/type_trait_undef.hpp" 1 +# 87 "../boost/type_traits/remove_volatile.hpp" 2 +# 22 "../boost/type_traits/cv_traits.hpp" 2 +# 39 "../boost/tuple/detail/tuple_basic.hpp" 2 + + + + + +namespace boost { +namespace tuples { + + +struct null_type {}; + + +namespace detail { + inline const null_type cnull() { return null_type(); } + + + + + +template struct IF { typedef Then RET; }; + +template struct IF { + typedef Else RET; +}; + +} + + +template struct cons; + + + +template < + class T0 = null_type, class T1 = null_type, class T2 = null_type, + class T3 = null_type, class T4 = null_type, class T5 = null_type, + class T6 = null_type, class T7 = null_type, class T8 = null_type, + class T9 = null_type> +class tuple; + + +template struct length; + + + +namespace detail { + + + +template +class generate_error; + +template +struct drop_front { + template + struct apply { + typedef typename drop_front::template + apply next; + typedef typename next::type::tail_type type; + static const type& call(const Tuple& tup) { + return next::call(tup).tail; + } + }; +}; + +template<> +struct drop_front<0> { + template + struct apply { + typedef Tuple type; + static const type& call(const Tuple& tup) { + return tup; + } + }; +}; + +} +# 124 "../boost/tuple/detail/tuple_basic.hpp" +template +struct element +{ + typedef typename detail::drop_front::template + apply::type::head_type type; +}; + +template +struct element +{ +private: + typedef typename detail::drop_front::template + apply::type::head_type unqualified_type; +public: + + + + typedef typename boost::add_const::type type; + +}; +# 184 "../boost/tuple/detail/tuple_basic.hpp" +template struct access_traits { + typedef const T& const_type; + typedef T& non_const_type; + + typedef const typename boost::remove_cv::type& parameter_type; + + + + + + +}; + +template struct access_traits { + + typedef T& const_type; + typedef T& non_const_type; + + typedef T& parameter_type; +}; + + + +template +inline typename access_traits< + typename element >::type + >::non_const_type +get(cons& c ) { + typedef typename detail::drop_front::template + apply > impl; + typedef typename impl::type cons_element; + return const_cast(impl::call(c)).head; +} + + + + +template +inline typename access_traits< + typename element >::type + >::const_type +get(const cons& c ) { + typedef typename detail::drop_front::template + apply > impl; + typedef typename impl::type cons_element; + return impl::call(c).head; +} + + +namespace detail { + + + + + + + +template class non_storeable_type { + non_storeable_type(); +}; + +template struct wrap_non_storeable_type { + typedef typename IF< + ::boost::is_function::value, non_storeable_type, T + >::RET type; +}; +template <> struct wrap_non_storeable_type { + typedef non_storeable_type type; +}; + +} + +template +struct cons { + + typedef HT head_type; + typedef TT tail_type; + + typedef typename + detail::wrap_non_storeable_type::type stored_head_type; + + stored_head_type head; + tail_type tail; + + typename access_traits::non_const_type + get_head() { return head; } + + typename access_traits::non_const_type + get_tail() { return tail; } + + typename access_traits::const_type + get_head() const { return head; } + + typename access_traits::const_type + get_tail() const { return tail; } + + cons() : head(), tail() {} + + + + + + + + cons(typename access_traits::parameter_type h, + const tail_type& t) + : head (h), tail(t) {} + + template + cons( T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, + T6& t6, T7& t7, T8& t8, T9& t9, T10& t10 ) + : head (t1), + tail (t2, t3, t4, t5, t6, t7, t8, t9, t10, detail::cnull()) + {} + + template + cons( const null_type& , T2& t2, T3& t3, T4& t4, T5& t5, + T6& t6, T7& t7, T8& t8, T9& t9, T10& t10 ) + : head (), + tail (t2, t3, t4, t5, t6, t7, t8, t9, t10, detail::cnull()) + {} + + + template + cons( const cons& u ) : head(u.head), tail(u.tail) {} + + template + cons& operator=( const cons& u ) { + head=u.head; tail=u.tail; return *this; + } + + + + cons& operator=(const cons& u) { + head = u.head; tail = u.tail; return *this; + } + + template + cons& operator=( const std::pair& u ) { + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((length::value == 2) == 0 ? false : true) >)> boost_static_assert_typedef_325; + head = u.first; tail.head = u.second; return *this; + } + + + template + typename access_traits< + typename element >::type + >::non_const_type + get() { + return boost::tuples::get(*this); + } + + template + typename access_traits< + typename element >::type + >::const_type + get() const { + return boost::tuples::get(*this); + } +}; + +template +struct cons { + + typedef HT head_type; + typedef null_type tail_type; + typedef cons self_type; + + typedef typename + detail::wrap_non_storeable_type::type stored_head_type; + stored_head_type head; + + typename access_traits::non_const_type + get_head() { return head; } + + null_type get_tail() { return null_type(); } + + typename access_traits::const_type + get_head() const { return head; } + + const null_type get_tail() const { return null_type(); } + + + cons() : head() {} + + cons(typename access_traits::parameter_type h, + const null_type& = null_type()) + : head (h) {} + + template + cons(T1& t1, const null_type&, const null_type&, const null_type&, + const null_type&, const null_type&, const null_type&, + const null_type&, const null_type&, const null_type&) + : head (t1) {} + + cons(const null_type&, + const null_type&, const null_type&, const null_type&, + const null_type&, const null_type&, const null_type&, + const null_type&, const null_type&, const null_type&) + : head () {} + + template + cons( const cons& u ) : head(u.head) {} + + template + cons& operator=(const cons& u ) + { head = u.head; return *this; } + + + + cons& operator=(const cons& u) { head = u.head; return *this; } + + template + typename access_traits< + typename element::type + >::non_const_type + get() { + return boost::tuples::get(*this); + } + + template + typename access_traits< + typename element::type + >::const_type + get() const { + return boost::tuples::get(*this); + } + +}; + + + +template +struct length { + static const int value = 1 + length::value; +}; + +template<> +struct length > { + static const int value = 0; +}; + +template<> +struct length const> { + static const int value = 0; +}; + +template<> +struct length { + static const int value = 0; +}; + +template<> +struct length { + static const int value = 0; +}; + +namespace detail { + + +template +struct map_tuple_to_cons +{ + typedef cons::type + > type; +}; + + +template <> +struct map_tuple_to_cons +{ + typedef null_type type; +}; + +} + + + +template + +class tuple : + public detail::map_tuple_to_cons::type +{ +public: + typedef typename + detail::map_tuple_to_cons::type inherited; + typedef typename inherited::head_type head_type; + typedef typename inherited::tail_type tail_type; + + + + tuple() {} + + tuple(typename access_traits::parameter_type t0) + : inherited(t0, detail::cnull(), detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull()) {} + + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1) + : inherited(t0, t1, detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull()) {} + + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1, + typename access_traits::parameter_type t2) + : inherited(t0, t1, t2, detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull()) {} + + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1, + typename access_traits::parameter_type t2, + typename access_traits::parameter_type t3) + : inherited(t0, t1, t2, t3, detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull(), + detail::cnull()) {} + + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1, + typename access_traits::parameter_type t2, + typename access_traits::parameter_type t3, + typename access_traits::parameter_type t4) + : inherited(t0, t1, t2, t3, t4, detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull(), detail::cnull()) {} + + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1, + typename access_traits::parameter_type t2, + typename access_traits::parameter_type t3, + typename access_traits::parameter_type t4, + typename access_traits::parameter_type t5) + : inherited(t0, t1, t2, t3, t4, t5, detail::cnull(), detail::cnull(), + detail::cnull(), detail::cnull()) {} + + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1, + typename access_traits::parameter_type t2, + typename access_traits::parameter_type t3, + typename access_traits::parameter_type t4, + typename access_traits::parameter_type t5, + typename access_traits::parameter_type t6) + : inherited(t0, t1, t2, t3, t4, t5, t6, detail::cnull(), + detail::cnull(), detail::cnull()) {} + + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1, + typename access_traits::parameter_type t2, + typename access_traits::parameter_type t3, + typename access_traits::parameter_type t4, + typename access_traits::parameter_type t5, + typename access_traits::parameter_type t6, + typename access_traits::parameter_type t7) + : inherited(t0, t1, t2, t3, t4, t5, t6, t7, detail::cnull(), + detail::cnull()) {} + + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1, + typename access_traits::parameter_type t2, + typename access_traits::parameter_type t3, + typename access_traits::parameter_type t4, + typename access_traits::parameter_type t5, + typename access_traits::parameter_type t6, + typename access_traits::parameter_type t7, + typename access_traits::parameter_type t8) + : inherited(t0, t1, t2, t3, t4, t5, t6, t7, t8, detail::cnull()) {} + + tuple(typename access_traits::parameter_type t0, + typename access_traits::parameter_type t1, + typename access_traits::parameter_type t2, + typename access_traits::parameter_type t3, + typename access_traits::parameter_type t4, + typename access_traits::parameter_type t5, + typename access_traits::parameter_type t6, + typename access_traits::parameter_type t7, + typename access_traits::parameter_type t8, + typename access_traits::parameter_type t9) + : inherited(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) {} + + + template + tuple(const cons& p) : inherited(p) {} + + template + tuple& operator=(const cons& k) { + inherited::operator=(k); + return *this; + } + + template + tuple& operator=(const std::pair& k) { + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((length::value == 2) == 0 ? false : true) >)> boost_static_assert_typedef_582; + this->head = k.first; + this->tail.head = k.second; + return *this; + } + +}; + + +template <> +class tuple : + public null_type +{ +public: + typedef null_type inherited; +}; + + + +namespace detail { + +struct swallow_assign; +typedef void (detail::swallow_assign::*ignore_t)(); +struct swallow_assign { + swallow_assign(ignore_t(*)(ignore_t)) {} + template + swallow_assign const& operator=(const T&) const { + return *this; + } +}; + + +} + + +inline detail::ignore_t ignore(detail::ignore_t) { return 0; } +# 636 "../boost/tuple/detail/tuple_basic.hpp" +template +struct make_tuple_traits { + typedef T type; + + + + + + + +}; +# 660 "../boost/tuple/detail/tuple_basic.hpp" +template +struct make_tuple_traits { + typedef typename + detail::generate_error:: + do_not_use_with_reference_type error; +}; + + + + + +template struct make_tuple_traits { + typedef const T (&type)[n]; +}; + +template +struct make_tuple_traits { + typedef const T (&type)[n]; +}; + +template struct make_tuple_traits { + typedef const volatile T (&type)[n]; +}; + +template +struct make_tuple_traits { + typedef const volatile T (&type)[n]; +}; + +template +struct make_tuple_traits >{ + typedef T& type; +}; + +template +struct make_tuple_traits >{ + typedef T& type; +}; + +template<> +struct make_tuple_traits { + typedef detail::swallow_assign type; +}; + + + +namespace detail { + + + +template < + class T0 = null_type, class T1 = null_type, class T2 = null_type, + class T3 = null_type, class T4 = null_type, class T5 = null_type, + class T6 = null_type, class T7 = null_type, class T8 = null_type, + class T9 = null_type +> +struct make_tuple_mapper { + typedef + tuple::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type, + typename make_tuple_traits::type> type; +}; + +} + + +inline tuple<> make_tuple() { + return tuple<>(); +} + +template +inline typename detail::make_tuple_mapper::type +make_tuple(const T0& t0) { + typedef typename detail::make_tuple_mapper::type t; + return t(t0); +} + +template +inline typename detail::make_tuple_mapper::type +make_tuple(const T0& t0, const T1& t1) { + typedef typename detail::make_tuple_mapper::type t; + return t(t0, t1); +} + +template +inline typename detail::make_tuple_mapper::type +make_tuple(const T0& t0, const T1& t1, const T2& t2) { + typedef typename detail::make_tuple_mapper::type t; + return t(t0, t1, t2); +} + +template +inline typename detail::make_tuple_mapper::type +make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3) { + typedef typename detail::make_tuple_mapper::type t; + return t(t0, t1, t2, t3); +} + +template +inline typename detail::make_tuple_mapper::type +make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, + const T4& t4) { + typedef typename detail::make_tuple_mapper::type t; + return t(t0, t1, t2, t3, t4); +} + +template +inline typename detail::make_tuple_mapper::type +make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, + const T4& t4, const T5& t5) { + typedef typename detail::make_tuple_mapper::type t; + return t(t0, t1, t2, t3, t4, t5); +} + +template +inline typename detail::make_tuple_mapper::type +make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, + const T4& t4, const T5& t5, const T6& t6) { + typedef typename detail::make_tuple_mapper + ::type t; + return t(t0, t1, t2, t3, t4, t5, t6); +} + +template +inline typename detail::make_tuple_mapper::type +make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, + const T4& t4, const T5& t5, const T6& t6, const T7& t7) { + typedef typename detail::make_tuple_mapper + ::type t; + return t(t0, t1, t2, t3, t4, t5, t6, t7); +} + +template +inline typename detail::make_tuple_mapper + ::type +make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, + const T4& t4, const T5& t5, const T6& t6, const T7& t7, + const T8& t8) { + typedef typename detail::make_tuple_mapper + ::type t; + return t(t0, t1, t2, t3, t4, t5, t6, t7, t8); +} + +template +inline typename detail::make_tuple_mapper + ::type +make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, + const T4& t4, const T5& t5, const T6& t6, const T7& t7, + const T8& t8, const T9& t9) { + typedef typename detail::make_tuple_mapper + ::type t; + return t(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9); +} + +namespace detail { + +template +struct tie_traits { + typedef T& type; +}; + +template<> +struct tie_traits { + typedef swallow_assign type; +}; + +template<> +struct tie_traits { + typedef null_type type; +}; + +template < + class T0 = void, class T1 = void, class T2 = void, + class T3 = void, class T4 = void, class T5 = void, + class T6 = void, class T7 = void, class T8 = void, + class T9 = void +> +struct tie_mapper { + typedef + tuple::type, + typename tie_traits::type, + typename tie_traits::type, + typename tie_traits::type, + typename tie_traits::type, + typename tie_traits::type, + typename tie_traits::type, + typename tie_traits::type, + typename tie_traits::type, + typename tie_traits::type> type; +}; + +} + + +template +inline typename detail::tie_mapper::type +tie(T0& t0) { + typedef typename detail::tie_mapper::type t; + return t(t0); +} + +template +inline typename detail::tie_mapper::type +tie(T0& t0, T1& t1) { + typedef typename detail::tie_mapper::type t; + return t(t0, t1); +} + +template +inline typename detail::tie_mapper::type +tie(T0& t0, T1& t1, T2& t2) { + typedef typename detail::tie_mapper::type t; + return t(t0, t1, t2); +} + +template +inline typename detail::tie_mapper::type +tie(T0& t0, T1& t1, T2& t2, T3& t3) { + typedef typename detail::tie_mapper::type t; + return t(t0, t1, t2, t3); +} + +template +inline typename detail::tie_mapper::type +tie(T0& t0, T1& t1, T2& t2, T3& t3, + T4& t4) { + typedef typename detail::tie_mapper::type t; + return t(t0, t1, t2, t3, t4); +} + +template +inline typename detail::tie_mapper::type +tie(T0& t0, T1& t1, T2& t2, T3& t3, + T4& t4, T5& t5) { + typedef typename detail::tie_mapper::type t; + return t(t0, t1, t2, t3, t4, t5); +} + +template +inline typename detail::tie_mapper::type +tie(T0& t0, T1& t1, T2& t2, T3& t3, + T4& t4, T5& t5, T6& t6) { + typedef typename detail::tie_mapper + ::type t; + return t(t0, t1, t2, t3, t4, t5, t6); +} + +template +inline typename detail::tie_mapper::type +tie(T0& t0, T1& t1, T2& t2, T3& t3, + T4& t4, T5& t5, T6& t6, T7& t7) { + typedef typename detail::tie_mapper + ::type t; + return t(t0, t1, t2, t3, t4, t5, t6, t7); +} + +template +inline typename detail::tie_mapper + ::type +tie(T0& t0, T1& t1, T2& t2, T3& t3, + T4& t4, T5& t5, T6& t6, T7& t7, + T8& t8) { + typedef typename detail::tie_mapper + ::type t; + return t(t0, t1, t2, t3, t4, t5, t6, t7, t8); +} + +template +inline typename detail::tie_mapper + ::type +tie(T0& t0, T1& t1, T2& t2, T3& t3, + T4& t4, T5& t5, T6& t6, T7& t7, + T8& t8, T9& t9) { + typedef typename detail::tie_mapper + ::type t; + return t(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9); +} + +template +void swap(tuple& lhs, + tuple& rhs); +inline void swap(null_type&, null_type&) {} +template +inline void swap(cons& lhs, cons& rhs) { + ::boost::swap(lhs.head, rhs.head); +} +template +inline void swap(cons& lhs, cons& rhs) { + ::boost::swap(lhs.head, rhs.head); + ::boost::tuples::swap(lhs.tail, rhs.tail); +} +template +inline void swap(tuple& lhs, + tuple& rhs) { + typedef tuple tuple_type; + typedef typename tuple_type::inherited base; + ::boost::tuples::swap(static_cast(lhs), static_cast(rhs)); +} + +} +} +# 34 "../boost/tuple/tuple.hpp" 2 + + + +namespace boost { + +using tuples::tuple; +using tuples::make_tuple; +using tuples::tie; + +using tuples::get; +# 87 "../boost/tuple/tuple.hpp" +} +# 25 "../boost/unordered/detail/emplace_args.hpp" 2 +# 46 "../boost/unordered/detail/emplace_args.hpp" +namespace boost { namespace unordered { namespace detail { +# 119 "../boost/unordered/detail/emplace_args.hpp" + + template < typename A0> struct emplace_args1 { typedef const A0 & Arg0; Arg0 a0; emplace_args1 ( Arg0 a0 ) : a0( boost::forward(a0)) {} }; template < typename A0> inline emplace_args1 < A0 > create_emplace_args( const A0 & a0 ) { emplace_args1 < A0 > e( a0); return e; } template < typename A0 , typename A1> struct emplace_args2 { typedef const A0 & Arg0; Arg0 a0; typedef const A1 & Arg1; Arg1 a1; emplace_args2 ( Arg0 a0 , Arg1 a1 ) : a0( boost::forward(a0)) , a1( boost::forward(a1)) {} }; template < typename A0 , typename A1> inline emplace_args2 < A0 , A1 > create_emplace_args( const A0 & a0 , const A1 & a1 ) { emplace_args2 < A0 , A1 > e( a0 , a1); return e; } template < typename A0 , typename A1 , typename A2> struct emplace_args3 { typedef const A0 & Arg0; Arg0 a0; typedef const A1 & Arg1; Arg1 a1; typedef const A2 & Arg2; Arg2 a2; emplace_args3 ( Arg0 a0 , Arg1 a1 , Arg2 a2 ) : a0( boost::forward(a0)) , a1( boost::forward(a1)) , a2( boost::forward(a2)) {} }; template < typename A0 , typename A1 , typename A2> inline emplace_args3 < A0 , A1 , A2 > create_emplace_args( const A0 & a0 , const A1 & a1 , const A2 & a2 ) { emplace_args3 < A0 , A1 , A2 > e( a0 , a1 , a2); return e; } template < typename A0 , typename A1 , typename A2 , typename A3> struct emplace_args4 { typedef const A0 & Arg0; Arg0 a0; typedef const A1 & Arg1; Arg1 a1; typedef const A2 & Arg2; Arg2 a2; typedef const A3 & Arg3; Arg3 a3; emplace_args4 ( Arg0 a0 , Arg1 a1 , Arg2 a2 , Arg3 a3 ) : a0( boost::forward(a0)) , a1( boost::forward(a1)) , a2( boost::forward(a2)) , a3( boost::forward(a3)) {} }; template < typename A0 , typename A1 , typename A2 , typename A3> inline emplace_args4 < A0 , A1 , A2 , A3 > create_emplace_args( const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 ) { emplace_args4 < A0 , A1 , A2 , A3 > e( a0 , a1 , a2 , a3); return e; } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4> struct emplace_args5 { typedef const A0 & Arg0; Arg0 a0; typedef const A1 & Arg1; Arg1 a1; typedef const A2 & Arg2; Arg2 a2; typedef const A3 & Arg3; Arg3 a3; typedef const A4 & Arg4; Arg4 a4; emplace_args5 ( Arg0 a0 , Arg1 a1 , Arg2 a2 , Arg3 a3 , Arg4 a4 ) : a0( boost::forward(a0)) , a1( boost::forward(a1)) , a2( boost::forward(a2)) , a3( boost::forward(a3)) , a4( boost::forward(a4)) {} }; template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4> inline emplace_args5 < A0 , A1 , A2 , A3 , A4 > create_emplace_args( const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 ) { emplace_args5 < A0 , A1 , A2 , A3 , A4 > e( a0 , a1 , a2 , a3 , a4); return e; } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5> struct emplace_args6 { typedef const A0 & Arg0; Arg0 a0; typedef const A1 & Arg1; Arg1 a1; typedef const A2 & Arg2; Arg2 a2; typedef const A3 & Arg3; Arg3 a3; typedef const A4 & Arg4; Arg4 a4; typedef const A5 & Arg5; Arg5 a5; emplace_args6 ( Arg0 a0 , Arg1 a1 , Arg2 a2 , Arg3 a3 , Arg4 a4 , Arg5 a5 ) : a0( boost::forward(a0)) , a1( boost::forward(a1)) , a2( boost::forward(a2)) , a3( boost::forward(a3)) , a4( boost::forward(a4)) , a5( boost::forward(a5)) {} }; template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5> inline emplace_args6 < A0 , A1 , A2 , A3 , A4 , A5 > create_emplace_args( const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 , const A5 & a5 ) { emplace_args6 < A0 , A1 , A2 , A3 , A4 , A5 > e( a0 , a1 , a2 , a3 , a4 , a5); return e; } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6> struct emplace_args7 { typedef const A0 & Arg0; Arg0 a0; typedef const A1 & Arg1; Arg1 a1; typedef const A2 & Arg2; Arg2 a2; typedef const A3 & Arg3; Arg3 a3; typedef const A4 & Arg4; Arg4 a4; typedef const A5 & Arg5; Arg5 a5; typedef const A6 & Arg6; Arg6 a6; emplace_args7 ( Arg0 a0 , Arg1 a1 , Arg2 a2 , Arg3 a3 , Arg4 a4 , Arg5 a5 , Arg6 a6 ) : a0( boost::forward(a0)) , a1( boost::forward(a1)) , a2( boost::forward(a2)) , a3( boost::forward(a3)) , a4( boost::forward(a4)) , a5( boost::forward(a5)) , a6( boost::forward(a6)) {} }; template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6> inline emplace_args7 < A0 , A1 , A2 , A3 , A4 , A5 , A6 > create_emplace_args( const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 , const A5 & a5 , const A6 & a6 ) { emplace_args7 < A0 , A1 , A2 , A3 , A4 , A5 , A6 > e( a0 , a1 , a2 , a3 , a4 , a5 , a6); return e; } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7> struct emplace_args8 { typedef const A0 & Arg0; Arg0 a0; typedef const A1 & Arg1; Arg1 a1; typedef const A2 & Arg2; Arg2 a2; typedef const A3 & Arg3; Arg3 a3; typedef const A4 & Arg4; Arg4 a4; typedef const A5 & Arg5; Arg5 a5; typedef const A6 & Arg6; Arg6 a6; typedef const A7 & Arg7; Arg7 a7; emplace_args8 ( Arg0 a0 , Arg1 a1 , Arg2 a2 , Arg3 a3 , Arg4 a4 , Arg5 a5 , Arg6 a6 , Arg7 a7 ) : a0( boost::forward(a0)) , a1( boost::forward(a1)) , a2( boost::forward(a2)) , a3( boost::forward(a3)) , a4( boost::forward(a4)) , a5( boost::forward(a5)) , a6( boost::forward(a6)) , a7( boost::forward(a7)) {} }; template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7> inline emplace_args8 < A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 > create_emplace_args( const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 , const A5 & a5 , const A6 & a6 , const A7 & a7 ) { emplace_args8 < A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 > e( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7); return e; } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8> struct emplace_args9 { typedef const A0 & Arg0; Arg0 a0; typedef const A1 & Arg1; Arg1 a1; typedef const A2 & Arg2; Arg2 a2; typedef const A3 & Arg3; Arg3 a3; typedef const A4 & Arg4; Arg4 a4; typedef const A5 & Arg5; Arg5 a5; typedef const A6 & Arg6; Arg6 a6; typedef const A7 & Arg7; Arg7 a7; typedef const A8 & Arg8; Arg8 a8; emplace_args9 ( Arg0 a0 , Arg1 a1 , Arg2 a2 , Arg3 a3 , Arg4 a4 , Arg5 a5 , Arg6 a6 , Arg7 a7 , Arg8 a8 ) : a0( boost::forward(a0)) , a1( boost::forward(a1)) , a2( boost::forward(a2)) , a3( boost::forward(a3)) , a4( boost::forward(a4)) , a5( boost::forward(a5)) , a6( boost::forward(a6)) , a7( boost::forward(a7)) , a8( boost::forward(a8)) {} }; template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8> inline emplace_args9 < A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 > create_emplace_args( const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 , const A5 & a5 , const A6 & a6 , const A7 & a7 , const A8 & a8 ) { emplace_args9 < A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 > e( a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8); return e; } +# 135 "../boost/unordered/detail/emplace_args.hpp" + struct please_ignore_this_overload { + typedef please_ignore_this_overload type; + }; + + template + struct rv_ref_impl { + typedef ::boost::rv< T >& type; + }; + + template + struct rv_ref : + boost::detail::if_true< + boost::is_class::value + >::template then < + boost::unordered::detail::rv_ref_impl, + please_ignore_this_overload + >::type + {}; +# 188 "../boost/unordered/detail/emplace_args.hpp" +template void construct_from_tuple(T* ptr, boost::tuple<>) { new ((void*) ptr) T(); } template void construct_from_tuple(T* ptr, boost::tuple< A0> const& x) { new ((void*) ptr) T( boost::get<0>(x) ); } template void construct_from_tuple(T* ptr, boost::tuple< A0 , A1> const& x) { new ((void*) ptr) T( boost::get<0>(x) , boost::get<1>(x) ); } template void construct_from_tuple(T* ptr, boost::tuple< A0 , A1 , A2> const& x) { new ((void*) ptr) T( boost::get<0>(x) , boost::get<1>(x) , boost::get<2>(x) ); } template void construct_from_tuple(T* ptr, boost::tuple< A0 , A1 , A2 , A3> const& x) { new ((void*) ptr) T( boost::get<0>(x) , boost::get<1>(x) , boost::get<2>(x) , boost::get<3>(x) ); } template void construct_from_tuple(T* ptr, boost::tuple< A0 , A1 , A2 , A3 , A4> const& x) { new ((void*) ptr) T( boost::get<0>(x) , boost::get<1>(x) , boost::get<2>(x) , boost::get<3>(x) , boost::get<4>(x) ); } template void construct_from_tuple(T* ptr, boost::tuple< A0 , A1 , A2 , A3 , A4 , A5> const& x) { new ((void*) ptr) T( boost::get<0>(x) , boost::get<1>(x) , boost::get<2>(x) , boost::get<3>(x) , boost::get<4>(x) , boost::get<5>(x) ); } template void construct_from_tuple(T* ptr, boost::tuple< A0 , A1 , A2 , A3 , A4 , A5 , A6> const& x) { new ((void*) ptr) T( boost::get<0>(x) , boost::get<1>(x) , boost::get<2>(x) , boost::get<3>(x) , boost::get<4>(x) , boost::get<5>(x) , boost::get<6>(x) ); } template void construct_from_tuple(T* ptr, boost::tuple< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7> const& x) { new ((void*) ptr) T( boost::get<0>(x) , boost::get<1>(x) , boost::get<2>(x) , boost::get<3>(x) , boost::get<4>(x) , boost::get<5>(x) , boost::get<6>(x) , boost::get<7>(x) ); } template void construct_from_tuple(T* ptr, boost::tuple< A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8> const& x) { new ((void*) ptr) T( boost::get<0>(x) , boost::get<1>(x) , boost::get<2>(x) , boost::get<3>(x) , boost::get<4>(x) , boost::get<5>(x) , boost::get<6>(x) , boost::get<7>(x) , boost::get<8>(x) ); } +# 264 "../boost/unordered/detail/emplace_args.hpp" + template + struct check3_base { + static choice1::type test(choice1, + boost::unordered::piecewise_construct_t); + + + + + + static choice3::type test(choice3, ...); + + enum { value = + sizeof(test(choose(), boost::unordered::detail::make())) }; + }; + + template + struct piecewise3 { + enum { value = check3_base::value == sizeof(choice1::type) }; + }; +# 369 "../boost/unordered/detail/emplace_args.hpp" + template + inline void construct_impl(T* address, emplace_args1 const& args) + { + new((void*) address) T(boost::forward(args.a0)); + } + + template + inline void construct_impl(T* address, emplace_args2 const& args) + { + new((void*) address) T( + boost::forward(args.a0), + boost::forward(args.a1) + ); + } + + template + inline void construct_impl(T* address, emplace_args3 const& args) + { + new((void*) address) T( + boost::forward(args.a0), + boost::forward(args.a1), + boost::forward(args.a2) + ); + } + + + template < typename T, typename A0 , typename A1 , typename A2 , typename A3 > inline void construct_impl(T* address, boost::unordered::detail::emplace_args4 < A0 , A1 , A2 , A3 > const& args) { new((void*) address) T( boost::forward(args.a0) , boost::forward(args.a1) , boost::forward(args.a2) , boost::forward(args.a3)); } template < typename T, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 > inline void construct_impl(T* address, boost::unordered::detail::emplace_args5 < A0 , A1 , A2 , A3 , A4 > const& args) { new((void*) address) T( boost::forward(args.a0) , boost::forward(args.a1) , boost::forward(args.a2) , boost::forward(args.a3) , boost::forward(args.a4)); } template < typename T, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 > inline void construct_impl(T* address, boost::unordered::detail::emplace_args6 < A0 , A1 , A2 , A3 , A4 , A5 > const& args) { new((void*) address) T( boost::forward(args.a0) , boost::forward(args.a1) , boost::forward(args.a2) , boost::forward(args.a3) , boost::forward(args.a4) , boost::forward(args.a5)); } template < typename T, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 > inline void construct_impl(T* address, boost::unordered::detail::emplace_args7 < A0 , A1 , A2 , A3 , A4 , A5 , A6 > const& args) { new((void*) address) T( boost::forward(args.a0) , boost::forward(args.a1) , boost::forward(args.a2) , boost::forward(args.a3) , boost::forward(args.a4) , boost::forward(args.a5) , boost::forward(args.a6)); } template < typename T, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 > inline void construct_impl(T* address, boost::unordered::detail::emplace_args8 < A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 > const& args) { new((void*) address) T( boost::forward(args.a0) , boost::forward(args.a1) , boost::forward(args.a2) , boost::forward(args.a3) , boost::forward(args.a4) , boost::forward(args.a5) , boost::forward(args.a6) , boost::forward(args.a7)); } template < typename T, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 > inline void construct_impl(T* address, boost::unordered::detail::emplace_args9 < A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 > const& args) { new((void*) address) T( boost::forward(args.a0) , boost::forward(args.a1) , boost::forward(args.a2) , boost::forward(args.a3) , boost::forward(args.a4) , boost::forward(args.a5) , boost::forward(args.a6) , boost::forward(args.a7) , boost::forward(args.a8)); } + + + + template + inline typename enable_if, void>::type + construct_impl(std::pair* address, + boost::unordered::detail::emplace_args3 const& args) + { + boost::unordered::detail::construct_from_tuple( + boost::addressof(address->first), args.a1); + boost::unordered::detail::construct_from_tuple( + boost::addressof(address->second), args.a2); + } +# 466 "../boost/unordered/detail/emplace_args.hpp" + template + inline void construct_impl2(T* address, const A0 & a0) + { + new((void*) address) T( + boost::forward(a0) + ); + } + +}}} +# 17 "../boost/unordered/detail/buckets.hpp" 2 +# 1 "../boost/type_traits/aligned_storage.hpp" 1 +# 11 "../boost/type_traits/aligned_storage.hpp" +# 1 "../boost/aligned_storage.hpp" 1 +# 16 "../boost/aligned_storage.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 17 "../boost/aligned_storage.hpp" 2 + + + +# 1 "../boost/type_traits/alignment_of.hpp" 1 +# 13 "../boost/type_traits/alignment_of.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 14 "../boost/type_traits/alignment_of.hpp" 2 + + + +# 1 "../boost/type_traits/detail/size_t_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/size_t_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/size_t_trait_def.hpp" 2 + + +# 1 "../boost/mpl/size_t.hpp" 1 +# 17 "../boost/mpl/size_t.hpp" +# 1 "../boost/mpl/size_t_fwd.hpp" 1 +# 19 "../boost/mpl/size_t_fwd.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 20 "../boost/mpl/size_t_fwd.hpp" 2 + +namespace mpl_ { + +template< std::size_t N > struct size_t; + +} +namespace boost { namespace mpl { using ::mpl_::size_t; } } +# 18 "../boost/mpl/size_t.hpp" 2 + + + + + +# 1 "../boost/mpl/aux_/integral_wrapper.hpp" 1 +# 40 "../boost/mpl/aux_/integral_wrapper.hpp" +namespace mpl_ { + +template< std::size_t N > +struct size_t +{ + static const std::size_t value = N; + + + + + + typedef size_t type; + + typedef std::size_t value_type; + typedef integral_c_tag tag; +# 72 "../boost/mpl/aux_/integral_wrapper.hpp" + typedef mpl_::size_t< static_cast((value + 1)) > next; + typedef mpl_::size_t< static_cast((value - 1)) > prior; + + + + + + + operator std::size_t() const { return static_cast(this->value); } +}; + + +template< std::size_t N > +std::size_t const mpl_::size_t< N >::value; + + +} +# 24 "../boost/mpl/size_t.hpp" 2 +# 18 "../boost/type_traits/detail/size_t_trait_def.hpp" 2 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 20 "../boost/type_traits/detail/size_t_trait_def.hpp" 2 +# 18 "../boost/type_traits/alignment_of.hpp" 2 +# 27 "../boost/type_traits/alignment_of.hpp" +namespace boost { + +template struct alignment_of; + + +namespace detail { + + + + + +template +struct alignment_of_hack +{ + char c; + T t; + alignment_of_hack(); +}; + + + + +template +struct alignment_logic +{ + static const std::size_t value = A < S ? A : S; +}; + + +template< typename T > +struct alignment_of_impl +{ +# 83 "../boost/type_traits/alignment_of.hpp" + static const std::size_t value = __alignof__(T); + +}; + +} + +template< typename T > struct alignment_of : public ::boost::integral_constant::value> { public: }; + + + + +template +struct alignment_of + : public alignment_of +{ +}; +# 109 "../boost/type_traits/alignment_of.hpp" +template<> struct alignment_of : public ::boost::integral_constant { public: }; + +template<> struct alignment_of : public ::boost::integral_constant { public: }; +template<> struct alignment_of : public ::boost::integral_constant { public: }; +template<> struct alignment_of : public ::boost::integral_constant { public: }; + + +} +# 125 "../boost/type_traits/alignment_of.hpp" +# 1 "../boost/type_traits/detail/size_t_trait_undef.hpp" 1 +# 126 "../boost/type_traits/alignment_of.hpp" 2 +# 21 "../boost/aligned_storage.hpp" 2 +# 1 "../boost/type_traits/type_with_alignment.hpp" 1 +# 12 "../boost/type_traits/type_with_alignment.hpp" +# 1 "../boost/preprocessor/list/for_each_i.hpp" 1 +# 13 "../boost/type_traits/type_with_alignment.hpp" 2 +# 1 "../boost/preprocessor/tuple/to_list.hpp" 1 +# 14 "../boost/type_traits/type_with_alignment.hpp" 2 + +# 1 "../boost/preprocessor/list/transform.hpp" 1 +# 16 "../boost/type_traits/type_with_alignment.hpp" 2 +# 1 "../boost/preprocessor/list/append.hpp" 1 +# 17 "../boost/type_traits/type_with_alignment.hpp" 2 + + + + + + +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 24 "../boost/type_traits/type_with_alignment.hpp" 2 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 26 "../boost/type_traits/type_with_alignment.hpp" 2 + + + + + + +namespace boost { + + + +namespace detail { + +class alignment_dummy; +typedef void (*function_ptr)(); +typedef int (alignment_dummy::*member_ptr); +typedef int (alignment_dummy::*member_function_ptr)(); +# 101 "../boost/type_traits/type_with_alignment.hpp" +template +struct lower_alignment_helper +{ + typedef char type; + enum { value = true }; +}; + +template +struct lower_alignment_helper +{ + enum { value = (alignment_of::value == target) }; + typedef typename mpl::if_c::type type; +}; +# 127 "../boost/type_traits/type_with_alignment.hpp" +template +struct has_one_T +{ + T data; +}; + +template +union lower_alignment +{ + enum { found0 = false }; + + + + + + typename lower_alignment_helper< found0,target,char >::type t0; enum { found1 = lower_alignment_helper::value }; typename lower_alignment_helper< found1,target,short >::type t1; enum { found2 = lower_alignment_helper::value }; typename lower_alignment_helper< found2,target,int >::type t2; enum { found3 = lower_alignment_helper::value }; typename lower_alignment_helper< found3,target,long >::type t3; enum { found4 = lower_alignment_helper::value }; typename lower_alignment_helper< found4,target,::boost::long_long_type >::type t4; enum { found5 = lower_alignment_helper::value }; typename lower_alignment_helper< found5,target,float >::type t5; enum { found6 = lower_alignment_helper::value }; typename lower_alignment_helper< found6,target,double >::type t6; enum { found7 = lower_alignment_helper::value }; typename lower_alignment_helper< found7,target,long double >::type t7; enum { found8 = lower_alignment_helper::value }; typename lower_alignment_helper< found8,target,void* >::type t8; enum { found9 = lower_alignment_helper::value }; typename lower_alignment_helper< found9,target,function_ptr >::type t9; enum { found10 = lower_alignment_helper::value }; typename lower_alignment_helper< found10,target,member_ptr >::type t10; enum { found11 = lower_alignment_helper::value }; typename lower_alignment_helper< found11,target,member_function_ptr >::type t11; enum { found12 = lower_alignment_helper::value }; typename lower_alignment_helper< found12,target,boost::detail::has_one_T< char > >::type t12; enum { found13 = lower_alignment_helper >::value }; typename lower_alignment_helper< found13,target,boost::detail::has_one_T< short > >::type t13; enum { found14 = lower_alignment_helper >::value }; typename lower_alignment_helper< found14,target,boost::detail::has_one_T< int > >::type t14; enum { found15 = lower_alignment_helper >::value }; typename lower_alignment_helper< found15,target,boost::detail::has_one_T< long > >::type t15; enum { found16 = lower_alignment_helper >::value }; typename lower_alignment_helper< found16,target,boost::detail::has_one_T< ::boost::long_long_type > >::type t16; enum { found17 = lower_alignment_helper >::value }; typename lower_alignment_helper< found17,target,boost::detail::has_one_T< float > >::type t17; enum { found18 = lower_alignment_helper >::value }; typename lower_alignment_helper< found18,target,boost::detail::has_one_T< double > >::type t18; enum { found19 = lower_alignment_helper >::value }; typename lower_alignment_helper< found19,target,boost::detail::has_one_T< long double > >::type t19; enum { found20 = lower_alignment_helper >::value }; typename lower_alignment_helper< found20,target,boost::detail::has_one_T< void* > >::type t20; enum { found21 = lower_alignment_helper >::value }; typename lower_alignment_helper< found21,target,boost::detail::has_one_T< function_ptr > >::type t21; enum { found22 = lower_alignment_helper >::value }; typename lower_alignment_helper< found22,target,boost::detail::has_one_T< member_ptr > >::type t22; enum { found23 = lower_alignment_helper >::value }; typename lower_alignment_helper< found23,target,boost::detail::has_one_T< member_function_ptr > >::type t23; enum { found24 = lower_alignment_helper >::value }; +}; + +union max_align +{ + + + + + char t0; short t1; int t2; long t3; ::boost::long_long_type t4; float t5; double t6; long double t7; void* t8; function_ptr t9; member_ptr t10; member_function_ptr t11; boost::detail::has_one_T< char > t12; boost::detail::has_one_T< short > t13; boost::detail::has_one_T< int > t14; boost::detail::has_one_T< long > t15; boost::detail::has_one_T< ::boost::long_long_type > t16; boost::detail::has_one_T< float > t17; boost::detail::has_one_T< double > t18; boost::detail::has_one_T< long double > t19; boost::detail::has_one_T< void* > t20; boost::detail::has_one_T< function_ptr > t21; boost::detail::has_one_T< member_ptr > t22; boost::detail::has_one_T< member_function_ptr > t23; +}; +# 161 "../boost/type_traits/type_with_alignment.hpp" +template +struct is_aligned +{ + static const bool value = (TAlign >= Align) & (TAlign % Align == 0) + + ; +}; +# 180 "../boost/type_traits/type_with_alignment.hpp" +} + + +template +struct is_pod< ::boost::detail::lower_alignment > +{ + static const std::size_t value = true; +}; + + + + +namespace detail{ + +template +class type_with_alignment_imp +{ + typedef ::boost::detail::lower_alignment t1; + typedef typename mpl::if_c< + ::boost::detail::is_aligned< ::boost::alignment_of::value,Align >::value + , t1 + , ::boost::detail::max_align + >::type align_t; + + static const std::size_t found = alignment_of::value; + + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((found >= Align) == 0 ? false : true) >)> boost_static_assert_typedef_206; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((found % Align == 0) == 0 ? false : true) >)> boost_static_assert_typedef_207; + + public: + typedef align_t type; +}; + +} + +template +class type_with_alignment + : public ::boost::detail::type_with_alignment_imp +{ +}; + + +namespace align { +struct __attribute__((__aligned__(2))) a2 {}; +struct __attribute__((__aligned__(4))) a4 {}; +struct __attribute__((__aligned__(8))) a8 {}; +struct __attribute__((__aligned__(16))) a16 {}; +struct __attribute__((__aligned__(32))) a32 {}; +struct __attribute__((__aligned__(64))) a64 {}; +struct __attribute__((__aligned__(128))) a128 {}; +} + +template<> class type_with_alignment<1> { public: typedef char type; }; +template<> class type_with_alignment<2> { public: typedef align::a2 type; }; +template<> class type_with_alignment<4> { public: typedef align::a4 type; }; +template<> class type_with_alignment<8> { public: typedef align::a8 type; }; +template<> class type_with_alignment<16> { public: typedef align::a16 type; }; +template<> class type_with_alignment<32> { public: typedef align::a32 type; }; +template<> class type_with_alignment<64> { public: typedef align::a64 type; }; +template<> class type_with_alignment<128> { public: typedef align::a128 type; }; + +namespace detail { +template<> struct is_pod_impl< ::boost::align::a2 > { public: static const bool value = (true); }; +template<> struct is_pod_impl< ::boost::align::a4 > { public: static const bool value = (true); }; +template<> struct is_pod_impl< ::boost::align::a8 > { public: static const bool value = (true); }; +template<> struct is_pod_impl< ::boost::align::a16 > { public: static const bool value = (true); }; +template<> struct is_pod_impl< ::boost::align::a32 > { public: static const bool value = (true); }; +template<> struct is_pod_impl< ::boost::align::a64 > { public: static const bool value = (true); }; +template<> struct is_pod_impl< ::boost::align::a128 > { public: static const bool value = (true); }; +} +# 389 "../boost/type_traits/type_with_alignment.hpp" +} + + + + + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 396 "../boost/type_traits/type_with_alignment.hpp" 2 +# 22 "../boost/aligned_storage.hpp" 2 + + + + + +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 28 "../boost/aligned_storage.hpp" 2 + +namespace boost { + +namespace detail { namespace aligned_storage { + +static const std::size_t alignment_of_max_align = ::boost::alignment_of::value + + + ; + + + + +template < + std::size_t size_ + , std::size_t alignment_ +> +struct aligned_storage_imp +{ + union data_t + { + char buf[size_]; + + typename mpl::eval_if_c< + alignment_ == std::size_t(-1) + , mpl::identity + , type_with_alignment + >::type align_; + } data_; + void* address() const { return const_cast(this); } +}; + +template< std::size_t alignment_ > +struct aligned_storage_imp<0u,alignment_> +{ + + void* address() const { return 0; } +}; + +}} + +template < + std::size_t size_ + , std::size_t alignment_ = std::size_t(-1) +> +class aligned_storage : + + private + + + + detail::aligned_storage::aligned_storage_imp +{ + +public: + + typedef detail::aligned_storage::aligned_storage_imp type; + + static const std::size_t size = size_ + + + ; + static const std::size_t alignment = ( alignment_ == std::size_t(-1) ? ::boost::detail::aligned_storage::alignment_of_max_align : alignment_ ) + + + + + + + ; + + + + + + +private: + + aligned_storage(const aligned_storage&); + aligned_storage& operator=(const aligned_storage&); +# 118 "../boost/aligned_storage.hpp" +public: + + aligned_storage() + { + } + + ~aligned_storage() + { + } + +public: + + void* address() + { + return static_cast(this)->address(); + } + + + + const void* address() const + { + return static_cast(this)->address(); + } + + + + + + + +}; +# 168 "../boost/aligned_storage.hpp" +template +struct is_pod > + : public ::boost::integral_constant +{ + +}; + + + +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 180 "../boost/aligned_storage.hpp" 2 +# 12 "../boost/type_traits/aligned_storage.hpp" 2 +# 18 "../boost/unordered/detail/buckets.hpp" 2 + + +# 1 "../boost/assert.hpp" 1 +# 50 "../boost/assert.hpp" +# 1 "/usr/include/assert.h" 1 3 4 +# 51 "../boost/assert.hpp" 2 +# 21 "../boost/unordered/detail/buckets.hpp" 2 + + + + + + +namespace boost { namespace unordered { namespace detail { + + template struct table; + template struct bucket; + struct ptr_bucket; + template struct buckets; + + + + + + template + struct node_constructor + { + private: + + typedef NodeAlloc node_allocator; + typedef boost::unordered::detail::allocator_traits + node_allocator_traits; + typedef typename node_allocator_traits::value_type node; + typedef typename node_allocator_traits::pointer node_pointer; + typedef typename node::value_type value_type; + + node_allocator& alloc_; + node_pointer node_; + bool node_constructed_; + bool value_constructed_; + + public: + + node_constructor(node_allocator& n) : + alloc_(n), + node_(), + node_constructed_(false), + value_constructed_(false) + { + } + + ~node_constructor(); + + void construct_node(); + + template + void construct_value(Args const& args) + { + (static_cast (0)); + boost::unordered::detail::construct_impl( + node_->value_ptr(), args); + value_constructed_ = true; + } + + template + void construct_value2(const A0 & a0) + { + (static_cast (0)); + boost::unordered::detail::construct_impl2( + node_->value_ptr(), boost::forward(a0)); + value_constructed_ = true; + } + + value_type const& value() const { + (static_cast (0)); + return node_->value(); + } + + + node_pointer release() + { + node_pointer p = node_; + node_ = node_pointer(); + return p; + } + + private: + node_constructor(node_constructor const&); + node_constructor& operator=(node_constructor const&); + }; + + template + node_constructor::~node_constructor() + { + if (node_) { + if (value_constructed_) { + boost::unordered::detail::destroy(node_->value_ptr()); + } + + if (node_constructed_) { + node_allocator_traits::destroy(alloc_, + boost::addressof(*node_)); + } + + node_allocator_traits::deallocate(alloc_, node_, 1); + } + } + + template + void node_constructor::construct_node() + { + if(!node_) { + node_constructed_ = false; + value_constructed_ = false; + + node_ = node_allocator_traits::allocate(alloc_, 1); + + node_allocator_traits::construct(alloc_, + boost::addressof(*node_), node()); + node_->init(static_cast(node_)); + node_constructed_ = true; + } + else { + (static_cast (0)); + + if (value_constructed_) + { + boost::unordered::detail::destroy(node_->value_ptr()); + value_constructed_ = false; + } + } + } + + + + + + template + struct bucket + { + typedef NodePointer previous_pointer; + previous_pointer next_; + + bucket() : next_() {} + + previous_pointer first_from_start() + { + return next_; + } + + enum { extra_node = true }; + }; + + struct ptr_bucket + { + typedef ptr_bucket* previous_pointer; + previous_pointer next_; + + ptr_bucket() : next_(0) {} + + previous_pointer first_from_start() + { + return this; + } + + enum { extra_node = false }; + }; + + + + + + template + struct buckets + { + private: + buckets(buckets const&); + buckets& operator=(buckets const&); + public: + typedef boost::unordered::detail::allocator_traits traits; + typedef typename traits::value_type value_type; + + typedef Node node; + typedef Bucket bucket; + typedef typename boost::unordered::detail::rebind_wrap::type + node_allocator; + typedef typename boost::unordered::detail::rebind_wrap::type + bucket_allocator; + typedef boost::unordered::detail::allocator_traits + node_allocator_traits; + typedef boost::unordered::detail::allocator_traits + bucket_allocator_traits; + typedef typename node_allocator_traits::pointer + node_pointer; + typedef typename node_allocator_traits::const_pointer + const_node_pointer; + typedef typename bucket_allocator_traits::pointer + bucket_pointer; + typedef typename bucket::previous_pointer + previous_pointer; + typedef boost::unordered::detail::node_constructor + node_constructor; + + + + bucket_pointer buckets_; + std::size_t bucket_count_; + std::size_t size_; + boost::unordered::detail::compressed + allocators_; + + + + bucket_allocator const& bucket_alloc() const + { + return allocators_.first(); + } + + node_allocator const& node_alloc() const + { + return allocators_.second(); + } + + bucket_allocator& bucket_alloc() + { + return allocators_.first(); + } + + node_allocator& node_alloc() + { + return allocators_.second(); + } + + std::size_t max_bucket_count() const + { + + return boost::unordered::detail::prev_prime( + bucket_allocator_traits::max_size(bucket_alloc()) - 1); + } + + bucket_pointer get_bucket(std::size_t bucket_index) const + { + return buckets_ + static_cast(bucket_index); + } + + previous_pointer get_previous_start() const + { + return this->get_bucket(this->bucket_count_)->first_from_start(); + } + + previous_pointer get_previous_start(std::size_t bucket_index) const + { + return this->get_bucket(bucket_index)->next_; + } + + node_pointer get_start() const + { + return static_cast(this->get_previous_start()->next_); + } + + node_pointer get_start(std::size_t bucket_index) const + { + previous_pointer prev = this->get_previous_start(bucket_index); + return prev ? static_cast(prev->next_) : + node_pointer(); + } + + float load_factor() const + { + (static_cast (0)); + return static_cast(this->size_) + / static_cast(this->bucket_count_); + } + + std::size_t bucket_size(std::size_t index) const + { + if (!this->size_) return 0; + node_pointer ptr = this->get_start(index); + if (!ptr) return 0; + + std::size_t count = 0; + while(ptr && ptr->hash_ % this->bucket_count_ == index) + { + ++count; + ptr = static_cast(ptr->next_); + } + + return count; + } + + + + + buckets(node_allocator const& a, std::size_t bucket_count) : + buckets_(), + bucket_count_(bucket_count), + size_(), + allocators_(a,a) + { + } + + buckets(buckets& b, boost::unordered::detail::move_tag m) : + buckets_(), + bucket_count_(b.bucket_count_), + size_(), + allocators_(b.allocators_, m) + { + swap(b); + } + + template + buckets(boost::unordered::detail::table& x, + boost::unordered::detail::move_tag m) : + buckets_(), + bucket_count_(x.bucket_count_), + size_(), + allocators_(x.allocators_, m) + { + swap(x); + } + + + + + + void create_buckets() + { + boost::unordered::detail::array_constructor + constructor(bucket_alloc()); + + + constructor.construct(bucket(), this->bucket_count_ + 1); + + if (bucket::extra_node) + { + node_constructor a(this->node_alloc()); + a.construct_node(); + + (constructor.get() + + static_cast(this->bucket_count_))->next_ = + a.release(); + } + + this->buckets_ = constructor.release(); + } + + + + + void swap(buckets& other, false_type = false_type()) + { + (static_cast (0)); + boost::swap(buckets_, other.buckets_); + boost::swap(bucket_count_, other.bucket_count_); + boost::swap(size_, other.size_); + } + + void swap(buckets& other, true_type) + { + allocators_.swap(other.allocators_); + boost::swap(buckets_, other.buckets_); + boost::swap(bucket_count_, other.bucket_count_); + boost::swap(size_, other.size_); + } + + void move_buckets_from(buckets& other) + { + (static_cast (0)); + (static_cast (0)); + this->buckets_ = other.buckets_; + this->bucket_count_ = other.bucket_count_; + this->size_ = other.size_; + other.buckets_ = bucket_pointer(); + other.bucket_count_ = 0; + other.size_ = 0; + } + + + + + inline void delete_node(node_pointer n) + { + boost::unordered::detail::destroy(n->value_ptr()); + node_allocator_traits::destroy(node_alloc(), boost::addressof(*n)); + node_allocator_traits::deallocate(node_alloc(), n, 1); + --size_; + } + + std::size_t delete_nodes(node_pointer begin, node_pointer end) + { + std::size_t count = 0; + + while(begin != end) { + node_pointer n = begin; + begin = static_cast(begin->next_); + delete_node(n); + ++count; + } + + return count; + } + + inline void delete_extra_node(bucket_pointer) {} + + inline void delete_extra_node(node_pointer n) { + node_allocator_traits::destroy(node_alloc(), boost::addressof(*n)); + node_allocator_traits::deallocate(node_alloc(), n, 1); + } + + inline ~buckets() + { + this->delete_buckets(); + } + + void delete_buckets() + { + if(this->buckets_) { + previous_pointer prev = this->get_previous_start(); + + while(prev->next_) { + node_pointer n = static_cast(prev->next_); + prev->next_ = n->next_; + delete_node(n); + } + + delete_extra_node(prev); + + bucket_pointer end = this->get_bucket(this->bucket_count_ + 1); + for(bucket_pointer it = this->buckets_; it != end; ++it) + { + bucket_allocator_traits::destroy(bucket_alloc(), + boost::addressof(*it)); + } + + bucket_allocator_traits::deallocate(bucket_alloc(), + this->buckets_, this->bucket_count_ + 1); + + this->buckets_ = bucket_pointer(); + } + + (static_cast (0)); + } + + void clear() + { + if(!this->size_) return; + + previous_pointer prev = this->get_previous_start(); + + while(prev->next_) { + node_pointer n = static_cast(prev->next_); + prev->next_ = n->next_; + delete_node(n); + } + + bucket_pointer end = this->get_bucket(this->bucket_count_); + for(bucket_pointer it = this->buckets_; it != end; ++it) + { + it->next_ = node_pointer(); + } + + (static_cast (0)); + } + + + + void fix_buckets(bucket_pointer bucket, + previous_pointer prev, node_pointer next) + { + if (!next) + { + if (bucket->next_ == prev) bucket->next_ = node_pointer(); + } + else + { + bucket_pointer next_bucket = this->get_bucket( + next->hash_ % this->bucket_count_); + + if (next_bucket != bucket) + { + next_bucket->next_ = prev; + if (bucket->next_ == prev) bucket->next_ = node_pointer(); + } + } + } + + + + void fix_buckets_range(std::size_t bucket_index, + previous_pointer prev, node_pointer begin, node_pointer end) + { + node_pointer n = begin; + + + + if (this->get_bucket(bucket_index)->next_ != prev) + { + for(;;) { + n = static_cast(n->next_); + if (n == end) return; + + std::size_t new_bucket_index = + n->hash_ % this->bucket_count_; + if (bucket_index != new_bucket_index) { + bucket_index = new_bucket_index; + break; + } + } + } + + + + this->get_bucket(bucket_index)->next_ = previous_pointer(); + for(;;) { + n = static_cast(n->next_); + if (n == end) break; + + std::size_t new_bucket_index = + n->hash_ % this->bucket_count_; + if (bucket_index != new_bucket_index) { + bucket_index = new_bucket_index; + this->get_bucket(bucket_index)->next_ = previous_pointer(); + } + }; + + + if (n) { + this->get_bucket(n->hash_ % this->bucket_count_)->next_ + = prev; + } + } + }; +# 561 "../boost/unordered/detail/buckets.hpp" + template class set_hash_functions; + + template + class functions + { + friend class boost::unordered::detail::set_hash_functions; + functions& operator=(functions const&); + + typedef compressed function_pair; + + typedef typename boost::aligned_storage< + sizeof(function_pair), + boost::alignment_of::value>::type aligned_function; + + bool current_; + aligned_function funcs_[2]; + + function_pair const& current() const { + return *static_cast( + static_cast(&funcs_[current_])); + } + + void construct(bool which, H const& hf, P const& eq) + { + new((void*) &funcs_[which]) function_pair(hf, eq); + } + + void construct(bool which, function_pair const& f) + { + new((void*) &funcs_[which]) function_pair(f); + } + + void destroy(bool which) + { + boost::unordered::detail::destroy((function_pair*)(&funcs_[which])); + } + + public: + + functions(H const& hf, P const& eq) + : current_(false) + { + construct(current_, hf, eq); + } + + functions(functions const& bf) + : current_(false) + { + construct(current_, bf.current()); + } + + ~functions() { + this->destroy(current_); + } + + H const& hash_function() const { + return current().first(); + } + + P const& key_eq() const { + return current().second(); + } + }; + + template + class set_hash_functions + { + set_hash_functions(set_hash_functions const&); + set_hash_functions& operator=(set_hash_functions const&); + + functions& functions_; + bool tmp_functions_; + + public: + + set_hash_functions(functions& f, H const& h, P const& p) + : functions_(f), + tmp_functions_(!f.current_) + { + f.construct(tmp_functions_, h, p); + } + + set_hash_functions(functions& f, functions const& other) + : functions_(f), + tmp_functions_(!f.current_) + { + f.construct(tmp_functions_, other.current()); + } + + ~set_hash_functions() + { + functions_.destroy(tmp_functions_); + } + + void commit() + { + functions_.current_ = tmp_functions_; + tmp_functions_ = !tmp_functions_; + } + }; +}}} +# 11 "../boost/unordered/detail/table.hpp" 2 + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cmath" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cmath" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cmath" 3 + + + + +# 1 "/usr/include/math.h" 1 3 4 +# 30 "/usr/include/math.h" 3 4 +extern "C" { + + + +# 1 "/usr/include/bits/huge_val.h" 1 3 4 +# 35 "/usr/include/math.h" 2 3 4 + +# 1 "/usr/include/bits/huge_valf.h" 1 3 4 +# 37 "/usr/include/math.h" 2 3 4 +# 1 "/usr/include/bits/huge_vall.h" 1 3 4 +# 38 "/usr/include/math.h" 2 3 4 + + +# 1 "/usr/include/bits/inf.h" 1 3 4 +# 41 "/usr/include/math.h" 2 3 4 + + +# 1 "/usr/include/bits/nan.h" 1 3 4 +# 44 "/usr/include/math.h" 2 3 4 + + + +# 1 "/usr/include/bits/mathdef.h" 1 3 4 +# 26 "/usr/include/bits/mathdef.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 27 "/usr/include/bits/mathdef.h" 2 3 4 + + + + +typedef float float_t; +typedef double double_t; +# 48 "/usr/include/math.h" 2 3 4 +# 71 "/usr/include/math.h" 3 4 +# 1 "/usr/include/bits/mathcalls.h" 1 3 4 +# 53 "/usr/include/bits/mathcalls.h" 3 4 + + +extern double acos (double __x) throw (); extern double __acos (double __x) throw (); + +extern double asin (double __x) throw (); extern double __asin (double __x) throw (); + +extern double atan (double __x) throw (); extern double __atan (double __x) throw (); + +extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw (); + + +extern double cos (double __x) throw (); extern double __cos (double __x) throw (); + +extern double sin (double __x) throw (); extern double __sin (double __x) throw (); + +extern double tan (double __x) throw (); extern double __tan (double __x) throw (); + + + + +extern double cosh (double __x) throw (); extern double __cosh (double __x) throw (); + +extern double sinh (double __x) throw (); extern double __sinh (double __x) throw (); + +extern double tanh (double __x) throw (); extern double __tanh (double __x) throw (); + + + + +extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw () + ; + + + + + +extern double acosh (double __x) throw (); extern double __acosh (double __x) throw (); + +extern double asinh (double __x) throw (); extern double __asinh (double __x) throw (); + +extern double atanh (double __x) throw (); extern double __atanh (double __x) throw (); + + + + + + + +extern double exp (double __x) throw (); extern double __exp (double __x) throw (); + + +extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw (); + + +extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw (); + + +extern double log (double __x) throw (); extern double __log (double __x) throw (); + + +extern double log10 (double __x) throw (); extern double __log10 (double __x) throw (); + + +extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw (); + + + + +extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw (); + +extern double pow10 (double __x) throw (); extern double __pow10 (double __x) throw (); + + + + + +extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw (); + + +extern double log1p (double __x) throw (); extern double __log1p (double __x) throw (); + + +extern double logb (double __x) throw (); extern double __logb (double __x) throw (); + + + + + + +extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw (); + + +extern double log2 (double __x) throw (); extern double __log2 (double __x) throw (); + + + + + + + + +extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw (); + + +extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw (); + + + + + +extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw (); + + + + + + +extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw (); + + + + + + + + +extern double ceil (double __x) throw () __attribute__ ((__const__)); extern double __ceil (double __x) throw () __attribute__ ((__const__)); + + +extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__)); + + +extern double floor (double __x) throw () __attribute__ ((__const__)); extern double __floor (double __x) throw () __attribute__ ((__const__)); + + +extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw (); + + + + +extern int __isinf (double __value) throw () __attribute__ ((__const__)); + + +extern int __finite (double __value) throw () __attribute__ ((__const__)); + + + + + +extern int isinf (double __value) throw () __attribute__ ((__const__)); + + +extern int finite (double __value) throw () __attribute__ ((__const__)); + + +extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw (); + + + +extern double significand (double __x) throw (); extern double __significand (double __x) throw (); + + + + + +extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__)); + + + + + + +extern double nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern double __nan (__const char *__tagb) throw () __attribute__ ((__const__)); + + + + + +extern int __isnan (double __value) throw () __attribute__ ((__const__)); + + + +extern int isnan (double __value) throw () __attribute__ ((__const__)); + + +extern double j0 (double) throw (); extern double __j0 (double) throw (); +extern double j1 (double) throw (); extern double __j1 (double) throw (); +extern double jn (int, double) throw (); extern double __jn (int, double) throw (); +extern double y0 (double) throw (); extern double __y0 (double) throw (); +extern double y1 (double) throw (); extern double __y1 (double) throw (); +extern double yn (int, double) throw (); extern double __yn (int, double) throw (); + + + + + + +extern double erf (double) throw (); extern double __erf (double) throw (); +extern double erfc (double) throw (); extern double __erfc (double) throw (); +extern double lgamma (double) throw (); extern double __lgamma (double) throw (); + + + + + + +extern double tgamma (double) throw (); extern double __tgamma (double) throw (); + + + + + +extern double gamma (double) throw (); extern double __gamma (double) throw (); + + + + + + +extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw (); + + + + + + + +extern double rint (double __x) throw (); extern double __rint (double __x) throw (); + + +extern double nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) throw () __attribute__ ((__const__)); + +extern double nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); + + + +extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw (); + + + +extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw (); + + + +extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw (); + + + + +extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw (); + + + +extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw (); + + + +extern double round (double __x) throw () __attribute__ ((__const__)); extern double __round (double __x) throw () __attribute__ ((__const__)); + + + +extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__)); + + + + +extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw (); + + + + + + +extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw (); +extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw (); + + + +extern long int lround (double __x) throw (); extern long int __lround (double __x) throw (); +extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw (); + + + +extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw (); + + +extern double fmax (double __x, double __y) throw (); extern double __fmax (double __x, double __y) throw (); + + +extern double fmin (double __x, double __y) throw (); extern double __fmin (double __x, double __y) throw (); + + + +extern int __fpclassify (double __value) throw () + __attribute__ ((__const__)); + + +extern int __signbit (double __value) throw () + __attribute__ ((__const__)); + + + +extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw (); + + + + + + + + +extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw (); +# 72 "/usr/include/math.h" 2 3 4 +# 94 "/usr/include/math.h" 3 4 +# 1 "/usr/include/bits/mathcalls.h" 1 3 4 +# 53 "/usr/include/bits/mathcalls.h" 3 4 + + +extern float acosf (float __x) throw (); extern float __acosf (float __x) throw (); + +extern float asinf (float __x) throw (); extern float __asinf (float __x) throw (); + +extern float atanf (float __x) throw (); extern float __atanf (float __x) throw (); + +extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw (); + + +extern float cosf (float __x) throw (); extern float __cosf (float __x) throw (); + +extern float sinf (float __x) throw (); extern float __sinf (float __x) throw (); + +extern float tanf (float __x) throw (); extern float __tanf (float __x) throw (); + + + + +extern float coshf (float __x) throw (); extern float __coshf (float __x) throw (); + +extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw (); + +extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw (); + + + + +extern void + sincosf +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (float __x, float *__sinx, float *__cosx) throw (); extern void + __sincosf +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (float __x, float *__sinx, float *__cosx) throw () + ; + + + + + +extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw (); + +extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw (); + +extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw (); + + + + + + + +extern float expf (float __x) throw (); extern float __expf (float __x) throw (); + + +extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw (); + + +extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw (); + + +extern float logf (float __x) throw (); extern float __logf (float __x) throw (); + + +extern float log10f (float __x) throw (); extern float __log10f (float __x) throw (); + + +extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw (); + + + + +extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw (); + +extern float pow10f (float __x) throw (); extern float __pow10f (float __x) throw (); + + + + + +extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw (); + + +extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw (); + + +extern float logbf (float __x) throw (); extern float __logbf (float __x) throw (); + + + + + + +extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw (); + + +extern float log2f (float __x) throw (); extern float __log2f (float __x) throw (); + + + + + + + + +extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw (); + + +extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw (); + + + + + +extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw (); + + + + + + +extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw (); + + + + + + + + +extern float ceilf (float __x) throw () __attribute__ ((__const__)); extern float __ceilf (float __x) throw () __attribute__ ((__const__)); + + +extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__)); + + +extern float floorf (float __x) throw () __attribute__ ((__const__)); extern float __floorf (float __x) throw () __attribute__ ((__const__)); + + +extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw (); + + + + +extern int __isinff (float __value) throw () __attribute__ ((__const__)); + + +extern int __finitef (float __value) throw () __attribute__ ((__const__)); + + + + + +extern int isinff (float __value) throw () __attribute__ ((__const__)); + + +extern int finitef (float __value) throw () __attribute__ ((__const__)); + + +extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw (); + + + +extern float significandf (float __x) throw (); extern float __significandf (float __x) throw (); + + + + + +extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__)); + + + + + + +extern float nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) throw () __attribute__ ((__const__)); + + + + + +extern int __isnanf (float __value) throw () __attribute__ ((__const__)); + + + +extern int isnanf (float __value) throw () __attribute__ ((__const__)); + + +extern float j0f (float) throw (); extern float __j0f (float) throw (); +extern float j1f (float) throw (); extern float __j1f (float) throw (); +extern float jnf (int, float) throw (); extern float __jnf (int, float) throw (); +extern float y0f (float) throw (); extern float __y0f (float) throw (); +extern float y1f (float) throw (); extern float __y1f (float) throw (); +extern float ynf (int, float) throw (); extern float __ynf (int, float) throw (); + + + + + + +extern float erff (float) throw (); extern float __erff (float) throw (); +extern float erfcf (float) throw (); extern float __erfcf (float) throw (); +extern float lgammaf (float) throw (); extern float __lgammaf (float) throw (); + + + + + + +extern float tgammaf (float) throw (); extern float __tgammaf (float) throw (); + + + + + +extern float gammaf (float) throw (); extern float __gammaf (float) throw (); + + + + + + +extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw (); + + + + + + + +extern float rintf (float __x) throw (); extern float __rintf (float __x) throw (); + + +extern float nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); + +extern float nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); + + + +extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw (); + + + +extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw (); + + + +extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw (); + + + + +extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw (); + + + +extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw (); + + + +extern float roundf (float __x) throw () __attribute__ ((__const__)); extern float __roundf (float __x) throw () __attribute__ ((__const__)); + + + +extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__)); + + + + +extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw (); + + + + + + +extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw (); +extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw (); + + + +extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw (); +extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw (); + + + +extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw (); + + +extern float fmaxf (float __x, float __y) throw (); extern float __fmaxf (float __x, float __y) throw (); + + +extern float fminf (float __x, float __y) throw (); extern float __fminf (float __x, float __y) throw (); + + + +extern int __fpclassifyf (float __value) throw () + __attribute__ ((__const__)); + + +extern int __signbitf (float __value) throw () + __attribute__ ((__const__)); + + + +extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw (); + + + + + + + + +extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw (); +# 95 "/usr/include/math.h" 2 3 4 +# 141 "/usr/include/math.h" 3 4 +# 1 "/usr/include/bits/mathcalls.h" 1 3 4 +# 53 "/usr/include/bits/mathcalls.h" 3 4 + + +extern long double acosl (long double __x) throw (); extern long double __acosl (long double __x) throw (); + +extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw (); + +extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw (); + +extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw (); + + +extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw (); + +extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw (); + +extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw (); + + + + +extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw (); + +extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw (); + +extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw (); + + + + +extern void + sincosl +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (long double __x, long double *__sinx, long double *__cosx) throw (); extern void + __sincosl +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (long double __x, long double *__sinx, long double *__cosx) throw () + ; + + + + + +extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw (); + +extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw (); + +extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw (); + + + + + + + +extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw (); + + +extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw (); + + +extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw (); + + +extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw (); + + +extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw (); + + +extern long double modfl (long double __x, long double *__iptr) throw (); extern long double __modfl (long double __x, long double *__iptr) throw (); + + + + +extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw (); + +extern long double pow10l (long double __x) throw (); extern long double __pow10l (long double __x) throw (); + + + + + +extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw (); + + +extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw (); + + +extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw (); + + + + + + +extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw (); + + +extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw (); + + + + + + + + +extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw (); + + +extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw (); + + + + + +extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw (); + + + + + + +extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw (); + + + + + + + + +extern long double ceill (long double __x) throw () __attribute__ ((__const__)); extern long double __ceill (long double __x) throw () __attribute__ ((__const__)); + + +extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__)); + + +extern long double floorl (long double __x) throw () __attribute__ ((__const__)); extern long double __floorl (long double __x) throw () __attribute__ ((__const__)); + + +extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw (); + + + + +extern int __isinfl (long double __value) throw () __attribute__ ((__const__)); + + +extern int __finitel (long double __value) throw () __attribute__ ((__const__)); + + + + + +extern int isinfl (long double __value) throw () __attribute__ ((__const__)); + + +extern int finitel (long double __value) throw () __attribute__ ((__const__)); + + +extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw (); + + + +extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw (); + + + + + +extern long double copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); + + + + + + +extern long double nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) throw () __attribute__ ((__const__)); + + + + + +extern int __isnanl (long double __value) throw () __attribute__ ((__const__)); + + + +extern int isnanl (long double __value) throw () __attribute__ ((__const__)); + + +extern long double j0l (long double) throw (); extern long double __j0l (long double) throw (); +extern long double j1l (long double) throw (); extern long double __j1l (long double) throw (); +extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw (); +extern long double y0l (long double) throw (); extern long double __y0l (long double) throw (); +extern long double y1l (long double) throw (); extern long double __y1l (long double) throw (); +extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw (); + + + + + + +extern long double erfl (long double) throw (); extern long double __erfl (long double) throw (); +extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw (); +extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw (); + + + + + + +extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw (); + + + + + +extern long double gammal (long double) throw (); extern long double __gammal (long double) throw (); + + + + + + +extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw (); + + + + + + + +extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw (); + + +extern long double nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); + +extern long double nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); + + + +extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw (); + + + +extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw (); + + + +extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw (); + + + + +extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw (); + + + +extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw (); + + + +extern long double roundl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundl (long double __x) throw () __attribute__ ((__const__)); + + + +extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__)); + + + + +extern long double remquol (long double __x, long double __y, int *__quo) throw (); extern long double __remquol (long double __x, long double __y, int *__quo) throw (); + + + + + + +extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw (); +extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw (); + + + +extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw (); +extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw (); + + + +extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw (); + + +extern long double fmaxl (long double __x, long double __y) throw (); extern long double __fmaxl (long double __x, long double __y) throw (); + + +extern long double fminl (long double __x, long double __y) throw (); extern long double __fminl (long double __x, long double __y) throw (); + + + +extern int __fpclassifyl (long double __value) throw () + __attribute__ ((__const__)); + + +extern int __signbitl (long double __value) throw () + __attribute__ ((__const__)); + + + +extern long double fmal (long double __x, long double __y, long double __z) throw (); extern long double __fmal (long double __x, long double __y, long double __z) throw (); + + + + + + + + +extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw (); +# 142 "/usr/include/math.h" 2 3 4 +# 157 "/usr/include/math.h" 3 4 +extern int signgam; +# 198 "/usr/include/math.h" 3 4 +enum + { + FP_NAN, + + FP_INFINITE, + + FP_ZERO, + + FP_SUBNORMAL, + + FP_NORMAL + + }; +# 291 "/usr/include/math.h" 3 4 +typedef enum +{ + _IEEE_ = -1, + _SVID_, + _XOPEN_, + _POSIX_, + _ISOC_ +} _LIB_VERSION_TYPE; + + + + +extern _LIB_VERSION_TYPE _LIB_VERSION; +# 314 "/usr/include/math.h" 3 4 +struct __exception + + + + { + int type; + char *name; + double arg1; + double arg2; + double retval; + }; + + +extern int matherr (struct __exception *__exc) throw (); +# 416 "/usr/include/math.h" 3 4 +# 1 "/usr/include/bits/mathinline.h" 1 3 4 +# 25 "/usr/include/bits/mathinline.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 26 "/usr/include/bits/mathinline.h" 2 3 4 +# 37 "/usr/include/bits/mathinline.h" 3 4 +extern __inline __attribute__ ((__gnu_inline__)) int +__signbitf (float __x) throw () +{ + + + + + int __m; + __asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x)); + return __m & 0x8; + +} +extern __inline __attribute__ ((__gnu_inline__)) int +__signbit (double __x) throw () +{ + + + + + int __m; + __asm ("pmovmskb %1, %0" : "=r" (__m) : "x" (__x)); + return __m & 0x80; + +} +extern __inline __attribute__ ((__gnu_inline__)) int +__signbitl (long double __x) throw () +{ + __extension__ union { long double __l; int __i[3]; } __u = { __l: __x }; + return (__u.__i[2] & 0x8000) != 0; +} +# 417 "/usr/include/math.h" 2 3 4 +# 472 "/usr/include/math.h" 3 4 +} +# 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cmath" 2 3 +# 77 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cmath" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + inline double + abs(double __x) + { return __builtin_fabs(__x); } + + inline float + abs(float __x) + { return __builtin_fabsf(__x); } + + inline long double + abs(long double __x) + { return __builtin_fabsl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + abs(_Tp __x) + { return __builtin_fabs(__x); } + + using ::acos; + + inline float + acos(float __x) + { return __builtin_acosf(__x); } + + inline long double + acos(long double __x) + { return __builtin_acosl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + acos(_Tp __x) + { return __builtin_acos(__x); } + + using ::asin; + + inline float + asin(float __x) + { return __builtin_asinf(__x); } + + inline long double + asin(long double __x) + { return __builtin_asinl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + asin(_Tp __x) + { return __builtin_asin(__x); } + + using ::atan; + + inline float + atan(float __x) + { return __builtin_atanf(__x); } + + inline long double + atan(long double __x) + { return __builtin_atanl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + atan(_Tp __x) + { return __builtin_atan(__x); } + + using ::atan2; + + inline float + atan2(float __y, float __x) + { return __builtin_atan2f(__y, __x); } + + inline long double + atan2(long double __y, long double __x) + { return __builtin_atan2l(__y, __x); } + + template + inline + typename __gnu_cxx::__promote_2< + typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value + && __is_arithmetic<_Up>::__value, + _Tp>::__type, _Up>::__type + atan2(_Tp __y, _Up __x) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return atan2(__type(__y), __type(__x)); + } + + using ::ceil; + + inline float + ceil(float __x) + { return __builtin_ceilf(__x); } + + inline long double + ceil(long double __x) + { return __builtin_ceill(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + ceil(_Tp __x) + { return __builtin_ceil(__x); } + + using ::cos; + + inline float + cos(float __x) + { return __builtin_cosf(__x); } + + inline long double + cos(long double __x) + { return __builtin_cosl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + cos(_Tp __x) + { return __builtin_cos(__x); } + + using ::cosh; + + inline float + cosh(float __x) + { return __builtin_coshf(__x); } + + inline long double + cosh(long double __x) + { return __builtin_coshl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + cosh(_Tp __x) + { return __builtin_cosh(__x); } + + using ::exp; + + inline float + exp(float __x) + { return __builtin_expf(__x); } + + inline long double + exp(long double __x) + { return __builtin_expl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + exp(_Tp __x) + { return __builtin_exp(__x); } + + using ::fabs; + + inline float + fabs(float __x) + { return __builtin_fabsf(__x); } + + inline long double + fabs(long double __x) + { return __builtin_fabsl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + fabs(_Tp __x) + { return __builtin_fabs(__x); } + + using ::floor; + + inline float + floor(float __x) + { return __builtin_floorf(__x); } + + inline long double + floor(long double __x) + { return __builtin_floorl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + floor(_Tp __x) + { return __builtin_floor(__x); } + + using ::fmod; + + inline float + fmod(float __x, float __y) + { return __builtin_fmodf(__x, __y); } + + inline long double + fmod(long double __x, long double __y) + { return __builtin_fmodl(__x, __y); } + + using ::frexp; + + inline float + frexp(float __x, int* __exp) + { return __builtin_frexpf(__x, __exp); } + + inline long double + frexp(long double __x, int* __exp) + { return __builtin_frexpl(__x, __exp); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + frexp(_Tp __x, int* __exp) + { return __builtin_frexp(__x, __exp); } + + using ::ldexp; + + inline float + ldexp(float __x, int __exp) + { return __builtin_ldexpf(__x, __exp); } + + inline long double + ldexp(long double __x, int __exp) + { return __builtin_ldexpl(__x, __exp); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + ldexp(_Tp __x, int __exp) + { return __builtin_ldexp(__x, __exp); } + + using ::log; + + inline float + log(float __x) + { return __builtin_logf(__x); } + + inline long double + log(long double __x) + { return __builtin_logl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + log(_Tp __x) + { return __builtin_log(__x); } + + using ::log10; + + inline float + log10(float __x) + { return __builtin_log10f(__x); } + + inline long double + log10(long double __x) + { return __builtin_log10l(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + log10(_Tp __x) + { return __builtin_log10(__x); } + + using ::modf; + + inline float + modf(float __x, float* __iptr) + { return __builtin_modff(__x, __iptr); } + + inline long double + modf(long double __x, long double* __iptr) + { return __builtin_modfl(__x, __iptr); } + + using ::pow; + + inline float + pow(float __x, float __y) + { return __builtin_powf(__x, __y); } + + inline long double + pow(long double __x, long double __y) + { return __builtin_powl(__x, __y); } + + + + + inline double + pow(double __x, int __i) + { return __builtin_powi(__x, __i); } + + inline float + pow(float __x, int __n) + { return __builtin_powif(__x, __n); } + + inline long double + pow(long double __x, int __n) + { return __builtin_powil(__x, __n); } + + + template + inline + typename __gnu_cxx::__promote_2< + typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value + && __is_arithmetic<_Up>::__value, + _Tp>::__type, _Up>::__type + pow(_Tp __x, _Up __y) + { + typedef typename __gnu_cxx::__promote_2<_Tp, _Up>::__type __type; + return pow(__type(__x), __type(__y)); + } + + using ::sin; + + inline float + sin(float __x) + { return __builtin_sinf(__x); } + + inline long double + sin(long double __x) + { return __builtin_sinl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + sin(_Tp __x) + { return __builtin_sin(__x); } + + using ::sinh; + + inline float + sinh(float __x) + { return __builtin_sinhf(__x); } + + inline long double + sinh(long double __x) + { return __builtin_sinhl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + sinh(_Tp __x) + { return __builtin_sinh(__x); } + + using ::sqrt; + + inline float + sqrt(float __x) + { return __builtin_sqrtf(__x); } + + inline long double + sqrt(long double __x) + { return __builtin_sqrtl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + sqrt(_Tp __x) + { return __builtin_sqrt(__x); } + + using ::tan; + + inline float + tan(float __x) + { return __builtin_tanf(__x); } + + inline long double + tan(long double __x) + { return __builtin_tanl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + tan(_Tp __x) + { return __builtin_tan(__x); } + + using ::tanh; + + inline float + tanh(float __x) + { return __builtin_tanhf(__x); } + + inline long double + tanh(long double __x) + { return __builtin_tanhl(__x); } + + template + inline typename __gnu_cxx::__enable_if<__is_integer<_Tp>::__value, + double>::__type + tanh(_Tp __x) + { return __builtin_tanh(__x); } + + +} +# 487 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cmath" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 737 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cmath" 3 + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + fpclassify(_Tp __f) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, + FP_SUBNORMAL, FP_ZERO, __type(__f)); + } + + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + isfinite(_Tp __f) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_isfinite(__type(__f)); + } + + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + isinf(_Tp __f) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_isinf(__type(__f)); + } + + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + isnan(_Tp __f) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_isnan(__type(__f)); + } + + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + isnormal(_Tp __f) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_isnormal(__type(__f)); + } + + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + signbit(_Tp __f) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_signbit(__type(__f)); + } + + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + isgreater(_Tp __f1, _Tp __f2) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_isgreater(__type(__f1), __type(__f2)); + } + + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + isgreaterequal(_Tp __f1, _Tp __f2) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_isgreaterequal(__type(__f1), __type(__f2)); + } + + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + isless(_Tp __f1, _Tp __f2) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_isless(__type(__f1), __type(__f2)); + } + + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + islessequal(_Tp __f1, _Tp __f2) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_islessequal(__type(__f1), __type(__f2)); + } + + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + islessgreater(_Tp __f1, _Tp __f2) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_islessgreater(__type(__f1), __type(__f2)); + } + + template + inline typename __gnu_cxx::__enable_if<__is_arithmetic<_Tp>::__value, + int>::__type + isunordered(_Tp __f1, _Tp __f2) + { + typedef typename __gnu_cxx::__promote<_Tp>::__type __type; + return __builtin_isunordered(__type(__f1), __type(__f2)); + } + + + + +} +# 16 "../boost/unordered/detail/table.hpp" 2 + +namespace boost { namespace unordered { namespace iterator_detail { + + + + + + + template struct iterator; + template struct c_iterator; + template struct l_iterator; + template struct cl_iterator; + + + + + + template + struct l_iterator + : public boost::iterator< + std::forward_iterator_tag, Value, std::ptrdiff_t, + NodePointer, Value&> + { + + template + friend struct boost::unordered::iterator_detail::cl_iterator; + private: + + typedef NodePointer node_pointer; + node_pointer ptr_; + std::size_t bucket_; + std::size_t bucket_count_; + + public: + + l_iterator() : ptr_() {} + + l_iterator(node_pointer x, std::size_t b, std::size_t c) + : ptr_(x), bucket_(b), bucket_count_(c) {} + + Value& operator*() const { + return ptr_->value(); + } + + Value* operator->() const { + return ptr_->value_ptr(); + } + + l_iterator& operator++() { + ptr_ = static_cast(ptr_->next_); + if (ptr_ && ptr_->hash_ % bucket_count_ != bucket_) + ptr_ = node_pointer(); + return *this; + } + + l_iterator operator++(int) { + l_iterator tmp(*this); + ++(*this); + return tmp; + } + + bool operator==(l_iterator x) const { + return ptr_ == x.ptr_; + } + + bool operator!=(l_iterator x) const { + return ptr_ != x.ptr_; + } + }; + + template + struct cl_iterator + : public boost::iterator< + std::forward_iterator_tag, Value, std::ptrdiff_t, + ConstNodePointer, Value const&> + { + friend struct boost::unordered::iterator_detail::l_iterator + ; + private: + + typedef NodePointer node_pointer; + node_pointer ptr_; + std::size_t bucket_; + std::size_t bucket_count_; + + public: + + cl_iterator() : ptr_() {} + + cl_iterator(node_pointer x, std::size_t b, std::size_t c) : + ptr_(x), bucket_(b), bucket_count_(c) {} + + cl_iterator(boost::unordered::iterator_detail::l_iterator< + NodePointer, Value> const& x) : + ptr_(x.ptr_), bucket_(x.bucket_), bucket_count_(x.bucket_count_) + {} + + Value const& + operator*() const { + return ptr_->value(); + } + + Value const* operator->() const { + return ptr_->value_ptr(); + } + + cl_iterator& operator++() { + ptr_ = static_cast(ptr_->next_); + if (ptr_ && ptr_->hash_ % bucket_count_ != bucket_) + ptr_ = node_pointer(); + return *this; + } + + cl_iterator operator++(int) { + cl_iterator tmp(*this); + ++(*this); + return tmp; + } + + friend bool operator==(cl_iterator const& x, cl_iterator const& y) { + return x.ptr_ == y.ptr_; + } + + friend bool operator!=(cl_iterator const& x, cl_iterator const& y) { + return x.ptr_ != y.ptr_; + } + }; + + template + struct iterator + : public boost::iterator< + std::forward_iterator_tag, Value, std::ptrdiff_t, + NodePointer, Value&> + { + + template + friend struct boost::unordered::iterator_detail::c_iterator; + private: + + typedef NodePointer node_pointer; + node_pointer node_; + + public: + + iterator() : node_() {} + + explicit iterator(node_pointer const& x) : node_(x) {} + + Value& operator*() const { + return node_->value(); + } + + Value* operator->() const { + return &node_->value(); + } + + iterator& operator++() { + node_ = static_cast(node_->next_); + return *this; + } + + iterator operator++(int) { + iterator tmp(node_); + node_ = static_cast(node_->next_); + return tmp; + } + + bool operator==(iterator const& x) const { + return node_ == x.node_; + } + + bool operator!=(iterator const& x) const { + return node_ != x.node_; + } + }; + + template + struct c_iterator + : public boost::iterator< + std::forward_iterator_tag, Value, std::ptrdiff_t, + ConstNodePointer, Value const&> + { + friend struct boost::unordered::iterator_detail::iterator< + NodePointer, Value>; + + + template + friend class boost::unordered::unordered_map; + template + friend class boost::unordered::unordered_multimap; + template + friend class boost::unordered::unordered_set; + template + friend class boost::unordered::unordered_multiset; + + private: + + + typedef NodePointer node_pointer; + node_pointer node_; + + public: + + c_iterator() : node_() {} + + explicit c_iterator(node_pointer const& x) : node_(x) {} + + c_iterator(boost::unordered::iterator_detail::iterator< + NodePointer, Value> const& x) : node_(x.node_) {} + + Value const& operator*() const { + return node_->value(); + } + + Value const* operator->() const { + return &node_->value(); + } + + c_iterator& operator++() { + node_ = static_cast(node_->next_); + return *this; + } + + c_iterator operator++(int) { + c_iterator tmp(node_); + node_ = static_cast(node_->next_); + return tmp; + } + + friend bool operator==(c_iterator const& x, c_iterator const& y) { + return x.node_ == y.node_; + } + + friend bool operator!=(c_iterator const& x, c_iterator const& y) { + return x.node_ != y.node_; + } + }; +}}} + +namespace boost { namespace unordered { namespace detail { + + + + + inline std::size_t double_to_size(double f) + { + return f >= static_cast( + (std::numeric_limits::max)()) ? + (std::numeric_limits::max)() : + static_cast(f); + } + + + + template + struct value_base + { + typedef ValueType value_type; + + typename boost::aligned_storage< + sizeof(value_type), + boost::alignment_of::value>::type data_; + + void* address() { + return this; + } + + value_type& value() { + return *(ValueType*) this; + } + + value_type* value_ptr() { + return (ValueType*) this; + } + + private: + + value_base& operator=(value_base const&); + }; + + template + struct table : + boost::unordered::detail::buckets< + typename Types::allocator, + typename Types::bucket, + typename Types::node>, + boost::unordered::detail::functions< + typename Types::hasher, + typename Types::key_equal> + { + private: + table(table const&); + table& operator=(table const&); + public: + typedef typename Types::hasher hasher; + typedef typename Types::key_equal key_equal; + typedef typename Types::key_type key_type; + typedef typename Types::extractor extractor; + typedef typename Types::value_type value_type; + typedef typename Types::table table_impl; + typedef typename Types::link_pointer link_pointer; + + typedef boost::unordered::detail::functions< + typename Types::hasher, + typename Types::key_equal> functions; + + typedef boost::unordered::detail::buckets< + typename Types::allocator, + typename Types::bucket, + typename Types::node> buckets; + + typedef typename buckets::node_allocator node_allocator; + typedef typename buckets::node_allocator_traits node_allocator_traits; + typedef typename buckets::node_pointer node_pointer; + typedef typename buckets::const_node_pointer const_node_pointer; + + typedef boost::unordered::iterator_detail:: + iterator iterator; + typedef boost::unordered::iterator_detail:: + c_iterator c_iterator; + typedef boost::unordered::iterator_detail:: + l_iterator l_iterator; + typedef boost::unordered::iterator_detail:: + cl_iterator + cl_iterator; + + + + float mlf_; + std::size_t max_load_; + + + + + std::size_t max_size() const + { + using namespace std; + + + return boost::unordered::detail::double_to_size(ceil( + static_cast(this->mlf_) * + static_cast(this->max_bucket_count()) + )) - 1; + } + + std::size_t calculate_max_load() + { + using namespace std; + + + + return boost::unordered::detail::double_to_size(ceil( + static_cast(this->mlf_) * + static_cast(this->bucket_count_) + )); + + } + void max_load_factor(float z) + { + (static_cast (0)); + mlf_ = (std::max)(z, minimum_max_load_factor); + if (this->buckets_) + this->max_load_ = this->calculate_max_load(); + } + + std::size_t min_buckets_for_size(std::size_t size) const + { + (static_cast (0)); + + using namespace std; +# 398 "../boost/unordered/detail/table.hpp" + return boost::unordered::detail::next_prime( + boost::unordered::detail::double_to_size(floor( + static_cast(size) / + static_cast(mlf_))) + 1); + } + + + + + table(std::size_t num_buckets, + hasher const& hf, + key_equal const& eq, + node_allocator const& a) : + buckets(a, boost::unordered::detail::next_prime(num_buckets)), + functions(hf, eq), + mlf_(1.0f), + max_load_(0) + {} + + table(table const& x, node_allocator const& a) : + buckets(a, x.min_buckets_for_size(x.size_)), + functions(x), + mlf_(x.mlf_), + max_load_(0) + { + if(x.size_) { + table_impl::copy_buckets_to(x, *this); + this->max_load_ = calculate_max_load(); + } + } + + + table(table& x, boost::unordered::detail::move_tag m) : + buckets(x, m), + functions(x), + mlf_(x.mlf_), + max_load_(calculate_max_load()) + {} + + + + table(table& x, node_allocator const& a, + boost::unordered::detail::move_tag m) : + buckets(a, x.bucket_count_), + functions(x), + mlf_(x.mlf_), + max_load_(x.max_load_) + { + if(a == x.node_alloc()) { + this->buckets::swap(x, false_type()); + } + else if(x.size_) { + + + + buckets tmp(x, m); + table_impl::move_buckets_to(tmp, *this); + this->max_load_ = calculate_max_load(); + } + } + + + + node_pointer begin() const { + return !this->buckets_ ? + node_pointer() : this->get_start(); + } + + + + void assign(table const& x) + { + assign(x, + boost::unordered::detail::integral_constant:: + propagate_on_container_copy_assignment::value>()); + } + + void assign(table const& x, false_type) + { + table tmp(x, this->node_alloc()); + this->swap(tmp, false_type()); + } + + void assign(table const& x, true_type) + { + table tmp(x, x.node_alloc()); + + + if(this->buckets_) this->delete_buckets(); + + this->allocators_.assign(x.allocators_); + this->swap(tmp, false_type()); + } + + void move_assign(table& x) + { + move_assign(x, + boost::unordered::detail::integral_constant:: + propagate_on_container_move_assignment::value>()); + } + + void move_assign(table& x, true_type) + { + if(this->buckets_) this->delete_buckets(); + this->allocators_.move_assign(x.allocators_); + move_assign_no_alloc(x); + } + + void move_assign(table& x, false_type) + { + if(this->node_alloc() == x.node_alloc()) { + if(this->buckets_) this->delete_buckets(); + move_assign_no_alloc(x); + } + else { + boost::unordered::detail::set_hash_functions + new_func_this(*this, x); + + if (x.size_) { + buckets b(this->node_alloc(), + x.min_buckets_for_size(x.size_)); + buckets tmp(x, move_tag()); + table_impl::move_buckets_to(tmp, b); + b.swap(*this); + } + else { + this->clear(); + } + + this->mlf_ = x.mlf_; + if (this->buckets_) this->max_load_ = calculate_max_load(); + new_func_this.commit(); + } + } + + void move_assign_no_alloc(table& x) + { + boost::unordered::detail::set_hash_functions + new_func_this(*this, x); + + this->move_buckets_from(x); + this->mlf_ = x.mlf_; + this->max_load_ = x.max_load_; + new_func_this.commit(); + } + + + + + void swap(table& x) + { + swap(x, + boost::unordered::detail::integral_constant:: + propagate_on_container_swap::value>()); + } + + + template + void swap(table& x, Propagate p) + { + boost::unordered::detail::set_hash_functions + op1(*this, x); + boost::unordered::detail::set_hash_functions + op2(x, *this); + + + this->buckets::swap(x, p); + std::swap(this->mlf_, x.mlf_); + std::swap(this->max_load_, x.max_load_); + op1.commit(); + op2.commit(); + } + + + void swap_contents(table& x) + { + this->buckets::swap(x, false_type()); + std::swap(this->mlf_, x.mlf_); + std::swap(this->max_load_, x.max_load_); + } + + + + key_type const& get_key(value_type const& x) const + { + return extractor::extract(x); + } + + + + template + node_pointer generic_find_node( + Key const& k, + Hash const& hash_function, + Pred const& eq) const + { + if (!this->size_) return node_pointer(); + return static_cast(this)-> + find_node_impl(hash_function(k), k, eq); + } + + node_pointer find_node( + std::size_t hash, + key_type const& k) const + { + if (!this->size_) return node_pointer(); + return static_cast(this)-> + find_node_impl(hash, k, this->key_eq()); + } + + node_pointer find_node(key_type const& k) const + { + if (!this->size_) return node_pointer(); + return static_cast(this)-> + find_node_impl(this->hash_function()(k), k, this->key_eq()); + } + + node_pointer find_matching_node(node_pointer n) const + { + + + + + + + return find_node(get_key(n->value())); + } + + + + void reserve_for_insert(std::size_t); + void rehash(std::size_t); + }; + + + + + + template + inline void table::reserve_for_insert(std::size_t size) + { + if (!this->buckets_) { + this->bucket_count_ = (std::max)(this->bucket_count_, + this->min_buckets_for_size(size)); + this->create_buckets(); + this->max_load_ = this->calculate_max_load(); + } + else if(size >= max_load_) { + std::size_t num_buckets + = this->min_buckets_for_size((std::max)(size, + this->size_ + (this->size_ >> 1))); + if (num_buckets != this->bucket_count_) { + static_cast(this)->rehash_impl(num_buckets); + this->max_load_ = this->calculate_max_load(); + } + } + } + + + + + template + void table::rehash(std::size_t min_buckets) + { + using namespace std; + + if(!this->size_) { + if(this->buckets_) this->delete_buckets(); + this->bucket_count_ = next_prime(min_buckets); + } + else { + min_buckets = next_prime((std::max)(min_buckets, + boost::unordered::detail::double_to_size(floor( + static_cast(this->size_) / + static_cast(mlf_))) + 1)); + + if(min_buckets != this->bucket_count_) { + static_cast(this)->rehash_impl(min_buckets); + this->max_load_ = this->calculate_max_load(); + } + } + } +}}} +# 15 "../boost/unordered/detail/equivalent.hpp" 2 + +# 1 "../boost/unordered/detail/extract_key.hpp" 1 +# 11 "../boost/unordered/detail/extract_key.hpp" +namespace boost { +namespace unordered { +namespace detail { +# 25 "../boost/unordered/detail/extract_key.hpp" + struct no_key { + no_key() {} + template no_key(T const&) {} + }; + + template + struct is_key { + template + static choice1::type test(T2 const&); + static choice2::type test(Key const&); + + enum { value = sizeof(test(boost::unordered::detail::make())) == + sizeof(choice2::type) }; + + typedef typename boost::detail::if_true:: + template then::type type; + }; + + template + struct set_extractor + { + typedef ValueType value_type; + typedef ValueType key_type; + + static key_type const& extract(key_type const& v) + { + return v; + } + + static no_key extract() + { + return no_key(); + } +# 66 "../boost/unordered/detail/extract_key.hpp" + template + static no_key extract(Arg const&) + { + return no_key(); + } + + template + static no_key extract(Arg1 const&, Arg2 const&) + { + return no_key(); + } + + + static bool compare_mapped(value_type const&, value_type const&) + { + return true; + } + }; + + template + struct map_extractor + { + typedef ValueType value_type; + typedef typename boost::remove_const::type key_type; + + static key_type const& extract(value_type const& v) + { + return v.first; + } + + static key_type const& extract(key_type const& v) + { + return v; + } + + template + static key_type const& extract(std::pair const& v) + { + return v.first; + } + + template + static key_type const& extract( + std::pair const& v) + { + return v.first; + } +# 129 "../boost/unordered/detail/extract_key.hpp" + template + static key_type const& extract(key_type const& k, Arg1 const&) + { + return k; + } + + static no_key extract() + { + return no_key(); + } + + template + static no_key extract(Arg const&) + { + return no_key(); + } + + template + static no_key extract(Arg const&, Arg1 const&) + { + return no_key(); + } +# 192 "../boost/unordered/detail/extract_key.hpp" +static no_key extract(boost::unordered::piecewise_construct_t, boost::tuple<> const&) { return no_key(); } template static typename is_key::type extract(boost::unordered::piecewise_construct_t, boost::tuple const& k) { return typename is_key::type( boost::get<0>(k)); } + + + + + + + static bool compare_mapped(value_type const& x, value_type const& y) + { + return x.second == y.second; + } + }; +}}} +# 17 "../boost/unordered/detail/equivalent.hpp" 2 + +namespace boost { namespace unordered { namespace detail { + + template struct grouped_node; + template struct grouped_ptr_node; + template struct grouped_table_impl; + + template + struct grouped_node : + boost::unordered::detail::value_base + { + typedef typename ::boost::unordered::detail::rebind_wrap< + A, grouped_node >::type::pointer link_pointer; + + link_pointer next_; + link_pointer group_prev_; + std::size_t hash_; + + grouped_node() : + next_(), + group_prev_(), + hash_(0) + {} + + void init(link_pointer self) + { + group_prev_ = self; + } + }; + + template + struct grouped_ptr_node : + boost::unordered::detail::value_base, + boost::unordered::detail::ptr_bucket + { + typedef boost::unordered::detail::ptr_bucket bucket_base; + typedef ptr_bucket* link_pointer; + + link_pointer group_prev_; + std::size_t hash_; + + grouped_ptr_node() : + bucket_base(), + group_prev_(0), + hash_(0) + {} + + void init(link_pointer self) + { + group_prev_ = self; + } + }; + + + + + template + struct pick_grouped_node2 + { + typedef boost::unordered::detail::grouped_node node; + + typedef typename boost::unordered::detail::allocator_traits< + typename boost::unordered::detail::rebind_wrap::type + >::pointer node_pointer; + + typedef boost::unordered::detail::bucket bucket; + typedef node_pointer link_pointer; + }; + + template + struct pick_grouped_node2*, + boost::unordered::detail::ptr_bucket*> + { + typedef boost::unordered::detail::grouped_ptr_node node; + typedef boost::unordered::detail::ptr_bucket bucket; + typedef bucket* link_pointer; + }; + + template + struct pick_grouped_node + { + typedef boost::unordered::detail::allocator_traits< + typename boost::unordered::detail::rebind_wrap >::type + > tentative_node_traits; + + typedef boost::unordered::detail::allocator_traits< + typename boost::unordered::detail::rebind_wrap::type + > tentative_bucket_traits; + + typedef pick_grouped_node2 pick; + + typedef typename pick::node node; + typedef typename pick::bucket bucket; + typedef typename pick::link_pointer link_pointer; + }; + + template + struct multiset + { + typedef boost::unordered::detail::multiset types; + + typedef T value_type; + typedef H hasher; + typedef P key_equal; + typedef T key_type; + + typedef typename boost::unordered::detail::rebind_wrap< + A, value_type>::type allocator; + + typedef boost::unordered::detail::allocator_traits traits; + typedef boost::unordered::detail::pick_grouped_node pick; + typedef typename pick::node node; + typedef typename pick::bucket bucket; + typedef typename pick::link_pointer link_pointer; + + typedef boost::unordered::detail::grouped_table_impl table; + typedef boost::unordered::detail::set_extractor extractor; + }; + + template + struct multimap + { + typedef boost::unordered::detail::multimap types; + + typedef std::pair value_type; + typedef H hasher; + typedef P key_equal; + typedef K key_type; + + typedef typename boost::unordered::detail::rebind_wrap< + A, value_type>::type allocator; + + typedef boost::unordered::detail::allocator_traits traits; + typedef boost::unordered::detail::pick_grouped_node pick; + typedef typename pick::node node; + typedef typename pick::bucket bucket; + typedef typename pick::link_pointer link_pointer; + + typedef boost::unordered::detail::grouped_table_impl table; + typedef boost::unordered::detail::map_extractor + extractor; + }; + + template + struct grouped_table_impl : boost::unordered::detail::table + { + typedef boost::unordered::detail::table table; + typedef typename table::value_type value_type; + typedef typename table::bucket bucket; + typedef typename table::buckets buckets; + typedef typename table::node_pointer node_pointer; + typedef typename table::node_allocator node_allocator; + typedef typename table::node_allocator_traits node_allocator_traits; + typedef typename table::bucket_pointer bucket_pointer; + typedef typename table::link_pointer link_pointer; + typedef typename table::previous_pointer previous_pointer; + typedef typename table::hasher hasher; + typedef typename table::key_equal key_equal; + typedef typename table::key_type key_type; + typedef typename table::node_constructor node_constructor; + typedef typename table::extractor extractor; + typedef typename table::iterator iterator; + + + + grouped_table_impl(std::size_t n, + hasher const& hf, + key_equal const& eq, + node_allocator const& a) + : table(n, hf, eq, a) + {} + + grouped_table_impl(grouped_table_impl const& x) + : table(x, node_allocator_traits:: + select_on_container_copy_construction(x.node_alloc())) {} + + grouped_table_impl(grouped_table_impl const& x, + node_allocator const& a) + : table(x, a) + {} + + grouped_table_impl(grouped_table_impl& x, + boost::unordered::detail::move_tag m) + : table(x, m) + {} + + grouped_table_impl(grouped_table_impl& x, + node_allocator const& a, + boost::unordered::detail::move_tag m) + : table(x, a, m) + {} + + + + template + node_pointer find_node_impl( + std::size_t hash, + Key const& k, + Pred const& eq) const + { + std::size_t bucket_index = hash % this->bucket_count_; + node_pointer n = this->get_start(bucket_index); + + for (;;) + { + if (!n) return n; + + std::size_t node_hash = n->hash_; + if (hash == node_hash) + { + if (eq(k, this->get_key(n->value()))) + return n; + } + else + { + if (node_hash % this->bucket_count_ != bucket_index) + return node_pointer(); + } + + n = static_cast( + static_cast(n->group_prev_)->next_); + } + } + + std::size_t count(key_type const& k) const + { + node_pointer n = this->find_node(k); + if (!n) return 0; + + std::size_t count = 0; + node_pointer it = n; + do { + it = static_cast(it->group_prev_); + ++count; + } while(it != n); + + return count; + } + + std::pair + equal_range(key_type const& k) const + { + node_pointer n = this->find_node(k); + return std::make_pair( + iterator(n), iterator(n ? + static_cast( + static_cast(n->group_prev_)->next_) : + n)); + } + + + + bool equals(grouped_table_impl const& other) const + { + if(this->size_ != other.size_) return false; + if(!this->size_) return true; + + for(node_pointer n1 = this->get_start(); n1;) + { + node_pointer n2 = other.find_matching_node(n1); + if (!n2) return false; + node_pointer end1 = static_cast( + static_cast(n1->group_prev_)->next_); + node_pointer end2 = static_cast( + static_cast(n2->group_prev_)->next_); + if (!group_equals(n1, end1, n2, end2)) return false; + n1 = end1; + } + + return true; + } + + + + static bool group_equals(node_pointer n1, node_pointer end1, + node_pointer n2, node_pointer end2) + { + for(;;) + { + if (n1->value() != n2->value()) + break; + + n1 = static_cast(n1->next_); + n2 = static_cast(n2->next_); + + if (n1 == end1) return n2 == end2; + if (n2 == end2) return false; + } + + for(node_pointer n1a = n1, n2a = n2;;) + { + n1a = static_cast(n1a->next_); + n2a = static_cast(n2a->next_); + + if (n1a == end1) + { + if (n2a == end2) break; + else return false; + } + + if (n2a == end2) return false; + } + + node_pointer start = n1; + for(;n1 != end2; n1 = static_cast(n1->next_)) + { + value_type const& v = n1->value(); + if (find(start, n1, v)) continue; + std::size_t matches = count_equal(n2, end2, v); + if (!matches || matches != 1 + count_equal( + static_cast(n1->next_), end1, v)) + return false; + } + + return true; + } + + static bool find(node_pointer n, node_pointer end, value_type const& v) + { + for(;n != end; n = static_cast(n->next_)) + if (n->value() == v) + return true; + return false; + } + + static std::size_t count_equal(node_pointer n, node_pointer end, + value_type const& v) + { + std::size_t count = 0; + for(;n != end; n = static_cast(n->next_)) + if (n->value() == v) ++count; + return count; + } +# 379 "../boost/unordered/detail/equivalent.hpp" + static inline void add_after_node( + node_pointer n, + node_pointer pos) + { + n->next_ = static_cast(pos->group_prev_)->next_; + n->group_prev_ = pos->group_prev_; + static_cast(pos->group_prev_)->next_ = + static_cast(n); + pos->group_prev_ = static_cast(n); + } + + inline node_pointer add_node( + node_constructor& a, + std::size_t hash, + node_pointer pos) + { + node_pointer n = a.release(); + n->hash_ = hash; + if(pos) { + this->add_after_node(n, pos); + if (n->next_) { + std::size_t next_bucket = + static_cast(n->next_)->hash_ % + this->bucket_count_; + if (next_bucket != hash % this->bucket_count_) { + this->get_bucket(next_bucket)->next_ = n; + } + } + } + else { + bucket_pointer b = this->get_bucket(hash % this->bucket_count_); + + if (!b->next_) + { + previous_pointer start_node = this->get_previous_start(); + + if (start_node->next_) { + this->get_bucket( + static_cast(start_node->next_)->hash_ + % this->bucket_count_)->next_ = n; + } + + b->next_ = start_node; + n->next_ = start_node->next_; + start_node->next_ = static_cast(n); + } + else + { + n->next_ = b->next_->next_; + b->next_->next_ = static_cast(n); + } + } + ++this->size_; + return n; + } + + node_pointer emplace_impl(node_constructor& a) + { + key_type const& k = this->get_key(a.value()); + std::size_t hash = this->hash_function()(k); + node_pointer position = this->find_node(hash, k); + + + + this->reserve_for_insert(this->size_ + 1); + return this->add_node(a, hash, position); + } + + void emplace_impl_no_rehash(node_constructor& a) + { + key_type const& k = this->get_key(a.value()); + std::size_t hash = this->hash_function()(k); + this->add_node(a, hash, + this->find_node(hash, k)); + } + + + iterator emplace(boost::unordered::detail::emplace_args1< + boost::unordered::detail::please_ignore_this_overload> const&) + { + (static_cast (0)); + return iterator(); + } + + + template + iterator emplace(Args const& args) + { + node_constructor a(this->node_alloc()); + a.construct_node(); + a.construct_value(args); + + return iterator(emplace_impl(a)); + } + + + + + + + template + typename boost::unordered::detail::enable_if_forward::type + insert_range(I i, I j) + { + if(i == j) return; + + std::size_t distance = boost::unordered::detail::distance(i, j); + if(distance == 1) { + node_constructor a(this->node_alloc()); + a.construct_node(); + a.construct_value2(*i); + emplace_impl(a); + } + else { + + this->reserve_for_insert(this->size_ + distance); + + node_constructor a(this->node_alloc()); + for (; i != j; ++i) { + a.construct_node(); + a.construct_value2(*i); + emplace_impl_no_rehash(a); + } + } + } + + template + typename boost::unordered::detail::disable_if_forward::type + insert_range(I i, I j) + { + node_constructor a(this->node_alloc()); + for (; i != j; ++i) { + a.construct_node(); + a.construct_value2(*i); + emplace_impl(a); + } + } + + + + + + + std::size_t erase_key(key_type const& k) + { + if(!this->size_) return 0; + + std::size_t hash = this->hash_function()(k); + std::size_t bucket_index = hash % this->bucket_count_; + bucket_pointer bucket = this->get_bucket(bucket_index); + + previous_pointer prev = bucket->next_; + if (!prev) return 0; + + for (;;) + { + if (!prev->next_) return 0; + std::size_t node_hash = + static_cast(prev->next_)->hash_; + if (node_hash % this->bucket_count_ != bucket_index) + return 0; + if (node_hash == hash && + this->key_eq()(k, this->get_key( + static_cast(prev->next_)->value()))) + break; + prev = static_cast( + static_cast(prev->next_)->group_prev_); + } + + node_pointer pos = static_cast(prev->next_); + link_pointer end1 = + static_cast(pos->group_prev_)->next_; + node_pointer end = static_cast(end1); + prev->next_ = end1; + this->fix_buckets(bucket, prev, end); + return this->delete_nodes(pos, end); + } + + node_pointer erase(node_pointer r) + { + (static_cast (0)); + node_pointer next = static_cast(r->next_); + + bucket_pointer bucket = this->get_bucket( + r->hash_ % this->bucket_count_); + previous_pointer prev = unlink_node(*bucket, r); + + this->fix_buckets(bucket, prev, next); + + this->delete_node(r); + + return next; + } + + node_pointer erase_range(node_pointer r1, node_pointer r2) + { + if (r1 == r2) return r2; + + std::size_t bucket_index = r1->hash_ % this->bucket_count_; + previous_pointer prev = unlink_nodes( + *this->get_bucket(bucket_index), r1, r2); + this->fix_buckets_range(bucket_index, prev, r1, r2); + this->delete_nodes(r1, r2); + + return r2; + } + + static previous_pointer unlink_node(bucket& b, node_pointer n) + { + node_pointer next = static_cast(n->next_); + previous_pointer prev = + static_cast(n->group_prev_); + + if(prev->next_ != n) { + + + + prev = b.next_; + while(prev->next_ != n) { + prev = static_cast( + static_cast(prev->next_)->group_prev_); + } + + + if (next && next->group_prev_ == static_cast(n)) + { + next->group_prev_ = n->group_prev_; + } + } + else if (next && next->group_prev_ == static_cast(n)) + { + + + next->group_prev_ = n->group_prev_; + } + else { + + + + node_pointer x = static_cast(n->group_prev_); + while(x->group_prev_ != static_cast(n)) { + x = static_cast(x->group_prev_); + } + x->group_prev_ = n->group_prev_; + } + + prev->next_ = static_cast(next); + return prev; + } + + static previous_pointer unlink_nodes(bucket& b, + node_pointer begin, node_pointer end) + { + previous_pointer prev = static_cast( + begin->group_prev_); + + if(prev->next_ != static_cast(begin)) { + + + + prev = b.next_; + while(prev->next_ != static_cast(begin)) + prev = static_cast( + static_cast(prev->next_)->group_prev_); + + if (end) split_group(end); + } + else { + node_pointer group1 = split_group(begin); + + if (end) { + node_pointer group2 = split_group(end); + + if(begin == group2) { + link_pointer end1 = group1->group_prev_; + link_pointer end2 = group2->group_prev_; + group1->group_prev_ = end2; + group2->group_prev_ = end1; + } + } + } + + prev->next_ = static_cast(end); + + return prev; + } + + + + + static node_pointer split_group(node_pointer split) + { + + node_pointer first = split; + while (static_cast(first->group_prev_)->next_ == + static_cast(first)) + first = static_cast(first->group_prev_); + + if(first == split) return split; + + link_pointer last = first->group_prev_; + first->group_prev_ = split->group_prev_; + split->group_prev_ = last; + + return first; + } + + + + + + + + static void copy_buckets_to(buckets const& src, buckets& dst) + { + (static_cast (0)); + + dst.create_buckets(); + + node_constructor a(dst.node_alloc()); + + node_pointer n = src.get_start(); + previous_pointer prev = dst.get_previous_start(); + + while(n) { + std::size_t hash = n->hash_; + node_pointer group_end = + static_cast( + static_cast(n->group_prev_)->next_); + + a.construct_node(); + a.construct_value2(n->value()); + + node_pointer first_node = a.release(); + node_pointer end = first_node; + first_node->hash_ = hash; + prev->next_ = static_cast(first_node); + ++dst.size_; + + for(n = static_cast(n->next_); n != group_end; + n = static_cast(n->next_)) + { + a.construct_node(); + a.construct_value2(n->value()); + end = a.release(); + end->hash_ = hash; + add_after_node(end, first_node); + ++dst.size_; + } + + prev = place_in_bucket(dst, prev, end); + } + } + + + + + + + + static void move_buckets_to(buckets& src, buckets& dst) + { + (static_cast (0)); + + dst.create_buckets(); + + node_constructor a(dst.node_alloc()); + + node_pointer n = src.get_start(); + previous_pointer prev = dst.get_previous_start(); + + while(n) { + std::size_t hash = n->hash_; + node_pointer group_end = + static_cast( + static_cast(n->group_prev_)->next_); + + a.construct_node(); + a.construct_value2(boost::move(n->value())); + + node_pointer first_node = a.release(); + node_pointer end = first_node; + first_node->hash_ = hash; + prev->next_ = static_cast(first_node); + ++dst.size_; + + for(n = static_cast(n->next_); n != group_end; + n = static_cast(n->next_)) + { + a.construct_node(); + a.construct_value2(boost::move(n->value())); + end = a.release(); + end->hash_ = hash; + add_after_node(end, first_node); + ++dst.size_; + } + + prev = place_in_bucket(dst, prev, end); + } + } + + + void rehash_impl(std::size_t num_buckets) + { + (static_cast (0)); + + buckets dst(this->node_alloc(), num_buckets); + dst.create_buckets(); + + previous_pointer src_start = this->get_previous_start(); + previous_pointer dst_start = dst.get_previous_start(); + + dst_start->next_ = src_start->next_; + src_start->next_ = link_pointer(); + dst.size_ = this->size_; + this->size_ = 0; + + previous_pointer prev = dst_start; + while (prev->next_) + prev = place_in_bucket(dst, prev, + static_cast( + static_cast(prev->next_)->group_prev_)); + + + + dst.swap(*this); + } + + + + static previous_pointer place_in_bucket(buckets& dst, + previous_pointer prev, node_pointer end) + { + bucket_pointer b = dst.get_bucket(end->hash_ % dst.bucket_count_); + + if (!b->next_) { + b->next_ = static_cast(prev); + return static_cast(end); + } + else { + link_pointer next = end->next_; + end->next_ = b->next_->next_; + b->next_->next_ = prev->next_; + prev->next_ = next; + return prev; + } + } + }; +}}} +# 19 "../boost/unordered/unordered_map.hpp" 2 +# 1 "../boost/unordered/detail/unique.hpp" 1 +# 20 "../boost/unordered/detail/unique.hpp" +namespace boost { namespace unordered { namespace detail { + + template struct node; + template struct ptr_node; + template struct table_impl; + + template + struct node : + boost::unordered::detail::value_base + { + typedef typename ::boost::unordered::detail::rebind_wrap< + A, node >::type::pointer link_pointer; + + link_pointer next_; + std::size_t hash_; + + node() : + next_(), + hash_(0) + {} + + void init(link_pointer) + { + } + }; + + template + struct ptr_node : + boost::unordered::detail::value_base, + boost::unordered::detail::ptr_bucket + { + typedef boost::unordered::detail::ptr_bucket bucket_base; + typedef ptr_bucket* link_pointer; + + std::size_t hash_; + + ptr_node() : + bucket_base(), + hash_(0) + {} + + void init(link_pointer) + { + } + }; + + + + + template + struct pick_node2 + { + typedef boost::unordered::detail::node node; + + typedef typename boost::unordered::detail::allocator_traits< + typename boost::unordered::detail::rebind_wrap::type + >::pointer node_pointer; + + typedef boost::unordered::detail::bucket bucket; + typedef node_pointer link_pointer; + }; + + template + struct pick_node2*, + boost::unordered::detail::ptr_bucket*> + { + typedef boost::unordered::detail::ptr_node node; + typedef boost::unordered::detail::ptr_bucket bucket; + typedef bucket* link_pointer; + }; + + template + struct pick_node + { + typedef boost::unordered::detail::allocator_traits< + typename boost::unordered::detail::rebind_wrap >::type + > tentative_node_traits; + + typedef boost::unordered::detail::allocator_traits< + typename boost::unordered::detail::rebind_wrap::type + > tentative_bucket_traits; + + typedef pick_node2 pick; + + typedef typename pick::node node; + typedef typename pick::bucket bucket; + typedef typename pick::link_pointer link_pointer; + }; + + template + struct set + { + typedef boost::unordered::detail::set types; + + typedef T value_type; + typedef H hasher; + typedef P key_equal; + typedef T key_type; + + typedef typename boost::unordered::detail::rebind_wrap< + A, value_type>::type allocator; + + typedef boost::unordered::detail::allocator_traits traits; + typedef boost::unordered::detail::pick_node pick; + typedef typename pick::node node; + typedef typename pick::bucket bucket; + typedef typename pick::link_pointer link_pointer; + + typedef boost::unordered::detail::table_impl table; + typedef boost::unordered::detail::set_extractor extractor; + }; + + template + struct map + { + typedef boost::unordered::detail::map types; + + typedef std::pair value_type; + typedef H hasher; + typedef P key_equal; + typedef K key_type; + + typedef typename boost::unordered::detail::rebind_wrap< + A, value_type>::type allocator; + + typedef boost::unordered::detail::allocator_traits traits; + typedef boost::unordered::detail::pick_node pick; + typedef typename pick::node node; + typedef typename pick::bucket bucket; + typedef typename pick::link_pointer link_pointer; + + typedef boost::unordered::detail::table_impl table; + typedef boost::unordered::detail::map_extractor + extractor; + }; + + template + struct table_impl : boost::unordered::detail::table + { + typedef boost::unordered::detail::table table; + typedef typename table::value_type value_type; + typedef typename table::bucket bucket; + typedef typename table::buckets buckets; + typedef typename table::node_pointer node_pointer; + typedef typename table::node_allocator node_allocator; + typedef typename table::node_allocator_traits node_allocator_traits; + typedef typename table::bucket_pointer bucket_pointer; + typedef typename table::link_pointer link_pointer; + typedef typename table::previous_pointer previous_pointer; + typedef typename table::hasher hasher; + typedef typename table::key_equal key_equal; + typedef typename table::key_type key_type; + typedef typename table::node_constructor node_constructor; + typedef typename table::extractor extractor; + typedef typename table::iterator iterator; + + typedef std::pair emplace_return; + + + + table_impl(std::size_t n, + hasher const& hf, + key_equal const& eq, + node_allocator const& a) + : table(n, hf, eq, a) + {} + + table_impl(table_impl const& x) + : table(x, node_allocator_traits:: + select_on_container_copy_construction(x.node_alloc())) {} + + table_impl(table_impl const& x, + node_allocator const& a) + : table(x, a) + {} + + table_impl(table_impl& x, + boost::unordered::detail::move_tag m) + : table(x, m) + {} + + table_impl(table_impl& x, + node_allocator const& a, + boost::unordered::detail::move_tag m) + : table(x, a, m) + {} + + + + template + node_pointer find_node_impl( + std::size_t hash, + Key const& k, + Pred const& eq) const + { + std::size_t bucket_index = hash % this->bucket_count_; + node_pointer n = this->get_start(bucket_index); + + for (;;) + { + if (!n) return n; + + std::size_t node_hash = n->hash_; + if (hash == node_hash) + { + if (eq(k, this->get_key(n->value()))) + return n; + } + else + { + if (node_hash % this->bucket_count_ != bucket_index) + return node_pointer(); + } + + n = static_cast(n->next_); + } + } + + std::size_t count(key_type const& k) const + { + return this->find_node(k) ? 1 : 0; + } + + value_type& at(key_type const& k) const + { + if (this->size_) { + node_pointer it = this->find_node(k); + if (it) return it->value(); + } + + boost::throw_exception( + std::out_of_range("Unable to find key in unordered_map.")); + } + + std::pair + equal_range(key_type const& k) const + { + node_pointer n = this->find_node(k); + return std::make_pair(iterator(n), + iterator(n ? static_cast(n->next_) : n)); + } + + + + bool equals(table_impl const& other) const + { + if(this->size_ != other.size_) return false; + if(!this->size_) return true; + + for(node_pointer n1 = this->get_start(); n1; + n1 = static_cast(n1->next_)) + { + node_pointer n2 = other.find_matching_node(n1); + + + if(!n2 || n1->value() != n2->value()) + return false; + + + + + + } + + return true; + } + + + + inline node_pointer add_node( + node_constructor& a, + std::size_t hash) + { + node_pointer n = a.release(); + n->hash_ = hash; + + bucket_pointer b = this->get_bucket(hash % this->bucket_count_); + + if (!b->next_) + { + previous_pointer start_node = this->get_previous_start(); + + if (start_node->next_) { + this->get_bucket( + static_cast(start_node->next_)->hash_ % + this->bucket_count_)->next_ = n; + } + + b->next_ = start_node; + n->next_ = start_node->next_; + start_node->next_ = static_cast(n); + } + else + { + n->next_ = b->next_->next_; + b->next_->next_ = static_cast(n); + } + + ++this->size_; + return n; + } + + value_type& operator[](key_type const& k) + { + typedef typename value_type::second_type mapped_type; + + std::size_t hash = this->hash_function()(k); + node_pointer pos = this->find_node(hash, k); + + if (pos) return pos->value(); + + + + node_constructor a(this->node_alloc()); + a.construct_node(); + + + + + a.construct_value( + boost::unordered::detail::create_emplace_args( + boost::unordered::piecewise_construct, + boost::make_tuple(k), + boost::make_tuple())); + + + this->reserve_for_insert(this->size_ + 1); + return add_node(a, hash)->value(); + } + + + emplace_return emplace(boost::unordered::detail::emplace_args1< + boost::unordered::detail::please_ignore_this_overload> const&) + { + (static_cast (0)); + return emplace_return(iterator(this->begin()), false); + } + + + template + emplace_return emplace(Args const& args) + { + + + + + + + return emplace_impl( + extractor::extract(args.a0, args.a1), + args); + + } + + + template + emplace_return emplace( + boost::unordered::detail::emplace_args1 const& args) + { + return emplace_impl(extractor::extract(args.a0), args); + } + + + template + emplace_return emplace_impl(key_type const& k, + Args const& args) + { + std::size_t hash = this->hash_function()(k); + node_pointer pos = this->find_node(hash, k); + + if (pos) return emplace_return(iterator(pos), false); + + + + node_constructor a(this->node_alloc()); + a.construct_node(); + a.construct_value(args); + + + + this->reserve_for_insert(this->size_ + 1); + return emplace_return(iterator(this->add_node(a, hash)), true); + } + + emplace_return emplace_impl_with_node(node_constructor& a) + { + key_type const& k = this->get_key(a.value()); + std::size_t hash = this->hash_function()(k); + node_pointer pos = this->find_node(hash, k); + + if (pos) return emplace_return(iterator(pos), false); + + + + this->reserve_for_insert(this->size_ + 1); + return emplace_return(iterator(this->add_node(a, hash)), true); + } + + template + emplace_return emplace_impl(no_key, Args const& args) + { + + + node_constructor a(this->node_alloc()); + a.construct_node(); + a.construct_value(args); + return emplace_impl_with_node(a); + } + + + + + + + + template + void insert_range(InputIt i, InputIt j) + { + if(i != j) + return insert_range_impl(extractor::extract(*i), i, j); + } + + template + void insert_range_impl(key_type const& k, InputIt i, InputIt j) + { + node_constructor a(this->node_alloc()); + + + + if (!this->buckets_) { + insert_range_empty(a, k, i, j); + if (++i == j) return; + } + + do { +# 468 "../boost/unordered/detail/unique.hpp" + insert_range_impl2(a, extractor::extract(*i), i, j); + } while(++i != j); + } + + template + void insert_range_empty(node_constructor& a, key_type const& k, + InputIt i, InputIt j) + { + std::size_t hash = this->hash_function()(k); + a.construct_node(); + a.construct_value2(*i); + this->reserve_for_insert(this->size_ + + boost::unordered::detail::insert_size(i, j)); + this->add_node(a, hash); + } + + template + void insert_range_impl2(node_constructor& a, key_type const& k, + InputIt i, InputIt j) + { + + std::size_t hash = this->hash_function()(k); + node_pointer pos = this->find_node(hash, k); + + if (!pos) { + a.construct_node(); + a.construct_value2(*i); + + if(this->size_ + 1 >= this->max_load_) + this->reserve_for_insert(this->size_ + + boost::unordered::detail::insert_size(i, j)); + + + this->add_node(a, hash); + } + } + + template + void insert_range_impl(no_key, InputIt i, InputIt j) + { + node_constructor a(this->node_alloc()); + + do { + a.construct_node(); + a.construct_value2(*i); + emplace_impl_with_node(a); + } while(++i != j); + } + + + + + + + std::size_t erase_key(key_type const& k) + { + if(!this->size_) return 0; + + std::size_t hash = this->hash_function()(k); + std::size_t bucket_index = hash % this->bucket_count_; + bucket_pointer bucket = this->get_bucket(bucket_index); + + previous_pointer prev = bucket->next_; + if (!prev) return 0; + + for (;;) + { + if (!prev->next_) return 0; + std::size_t node_hash = + static_cast(prev->next_)->hash_; + if (node_hash % this->bucket_count_ != bucket_index) + return 0; + if (node_hash == hash && + this->key_eq()(k, this->get_key( + static_cast(prev->next_)->value()))) + break; + prev = static_cast(prev->next_); + } + + node_pointer pos = static_cast(prev->next_); + node_pointer end = static_cast(pos->next_); + prev->next_ = pos->next_; + this->fix_buckets(bucket, prev, end); + return this->delete_nodes(pos, end); + } + + node_pointer erase(node_pointer r) + { + (static_cast (0)); + node_pointer next = static_cast(r->next_); + + bucket_pointer bucket = this->get_bucket( + r->hash_ % this->bucket_count_); + previous_pointer prev = unlink_node(*bucket, r); + + this->fix_buckets(bucket, prev, next); + + this->delete_node(r); + + return next; + } + + node_pointer erase_range(node_pointer r1, node_pointer r2) + { + if (r1 == r2) return r2; + + std::size_t bucket_index = r1->hash_ % this->bucket_count_; + previous_pointer prev = unlink_nodes( + *this->get_bucket(bucket_index), r1, r2); + this->fix_buckets_range(bucket_index, prev, r1, r2); + this->delete_nodes(r1, r2); + + return r2; + } + + static previous_pointer unlink_node(bucket& b, node_pointer n) + { + return unlink_nodes(b, n, static_cast(n->next_)); + } + + static previous_pointer unlink_nodes(bucket& b, + node_pointer begin, node_pointer end) + { + previous_pointer prev = b.next_; + link_pointer begin_void = static_cast(begin); + while(prev->next_ != begin_void) + prev = static_cast(prev->next_); + prev->next_ = static_cast(end); + return prev; + } + + + + + + + + static void copy_buckets_to(buckets const& src, buckets& dst) + { + (static_cast (0)); + + dst.create_buckets(); + + node_constructor a(dst.node_alloc()); + + node_pointer n = src.get_start(); + previous_pointer prev = dst.get_previous_start(); + + while(n) { + a.construct_node(); + a.construct_value2(n->value()); + + node_pointer node = a.release(); + node->hash_ = n->hash_; + prev->next_ = static_cast(node); + ++dst.size_; + n = static_cast(n->next_); + + prev = place_in_bucket(dst, prev); + } + } + + + + + + + + static void move_buckets_to(buckets& src, buckets& dst) + { + (static_cast (0)); + + dst.create_buckets(); + + node_constructor a(dst.node_alloc()); + + node_pointer n = src.get_start(); + previous_pointer prev = dst.get_previous_start(); + + while(n) { + a.construct_node(); + a.construct_value2(boost::move(n->value())); + + node_pointer node = a.release(); + node->hash_ = n->hash_; + prev->next_ = static_cast(node); + ++dst.size_; + n = static_cast(n->next_); + + prev = place_in_bucket(dst, prev); + } + } + + + void rehash_impl(std::size_t num_buckets) + { + (static_cast (0)); + + buckets dst(this->node_alloc(), num_buckets); + dst.create_buckets(); + + previous_pointer src_start = this->get_previous_start(); + previous_pointer dst_start = dst.get_previous_start(); + + dst_start->next_ = src_start->next_; + src_start->next_ = link_pointer(); + dst.size_ = this->size_; + this->size_ = 0; + + previous_pointer prev = dst.get_previous_start(); + while (prev->next_) + prev = place_in_bucket(dst, prev); + + + + dst.swap(*this); + } + + + + static previous_pointer place_in_bucket(buckets& dst, + previous_pointer prev) + { + node_pointer n = static_cast(prev->next_); + bucket_pointer b = dst.get_bucket(n->hash_ % dst.bucket_count_); + + if (!b->next_) { + b->next_ = prev; + return static_cast(n); + } + else { + prev->next_ = n->next_; + n->next_ = b->next_->next_; + b->next_->next_ = static_cast(n); + return prev; + } + } + }; +}}} +# 20 "../boost/unordered/unordered_map.hpp" 2 + +# 1 "../boost/functional/hash.hpp" 1 + + + + + +# 1 "../boost/functional/hash/hash.hpp" 1 +# 15 "../boost/functional/hash/hash.hpp" +# 1 "../boost/functional/hash/detail/hash_float.hpp" 1 +# 14 "../boost/functional/hash/detail/hash_float.hpp" +# 1 "../boost/functional/hash/detail/float_functions.hpp" 1 +# 10 "../boost/functional/hash/detail/float_functions.hpp" +# 1 "../boost/config/no_tr1/cmath.hpp" 1 +# 21 "../boost/config/no_tr1/cmath.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cmath" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cmath" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cmath" 3 +# 22 "../boost/config/no_tr1/cmath.hpp" 2 +# 11 "../boost/functional/hash/detail/float_functions.hpp" 2 +# 23 "../boost/functional/hash/detail/float_functions.hpp" +namespace boost { + namespace hash_detail { + + + + struct not_found { + + + + inline operator float() const { return 0; } + inline operator long double() const { return 0; } + }; + + + + template struct is; + template <> struct is { char x[10]; }; + template <> struct is { char x[20]; }; + template <> struct is { char x[30]; }; + template <> struct is { char x[40]; }; + + + + template is float_type(T); + + + + + + template struct call_ldexp + { + typedef double float_type; + + inline double operator()(double a, int b) const + { + using namespace std; + return ldexp(a, b); + } + }; + + + + + + template struct call_frexp + { + typedef double float_type; + + inline double operator()(double a, int* b) const + { + using namespace std; + return frexp(a, b); + } + }; + } +} +# 87 "../boost/functional/hash/detail/float_functions.hpp" +namespace boost_hash_detect_float_functions { + template boost::hash_detail::not_found ldexp(Float, int); + template boost::hash_detail::not_found frexp(Float, int*); +} +# 188 "../boost/functional/hash/detail/float_functions.hpp" +namespace boost_hash_detect_float_functions { template boost::hash_detail::not_found ldexpf(Float, int); } namespace boost { namespace hash_detail { namespace ldexpf_detect { using namespace std; using namespace boost_hash_detect_float_functions; struct check { static float x; static int y; static const bool cpp = sizeof(float_type(ldexp(x,y))) == sizeof(is); static const bool c99 = sizeof(float_type(ldexpf(x,y))) == sizeof(is); }; } template struct call_c99_ldexpf : boost::hash_detail::call_ldexp {}; template <> struct call_c99_ldexpf { typedef float float_type; template inline float operator()(float a, T b) const { using namespace std; return ldexpf(a, b); } }; template struct call_cpp_ldexpf : call_c99_ldexpf< ::boost::hash_detail::ldexpf_detect::check::c99 > {}; template <> struct call_cpp_ldexpf { typedef float float_type; template inline float operator()(float a, T b) const { using namespace std; return ldexp(a, b); } }; template <> struct call_ldexp : call_cpp_ldexpf< ::boost::hash_detail::ldexpf_detect::check::cpp > {}; } } + + + + + +namespace boost_hash_detect_float_functions { template boost::hash_detail::not_found ldexpl(Float, int); } namespace boost { namespace hash_detail { namespace ldexpl_detect { using namespace std; using namespace boost_hash_detect_float_functions; struct check { static long double x; static int y; static const bool cpp = sizeof(float_type(ldexp(x,y))) == sizeof(is); static const bool c99 = sizeof(float_type(ldexpl(x,y))) == sizeof(is); }; } template struct call_c99_ldexpl : boost::hash_detail::call_ldexp {}; template <> struct call_c99_ldexpl { typedef long double float_type; template inline long double operator()(long double a, T b) const { using namespace std; return ldexpl(a, b); } }; template struct call_cpp_ldexpl : call_c99_ldexpl< ::boost::hash_detail::ldexpl_detect::check::c99 > {}; template <> struct call_cpp_ldexpl { typedef long double float_type; template inline long double operator()(long double a, T b) const { using namespace std; return ldexp(a, b); } }; template <> struct call_ldexp : call_cpp_ldexpl< ::boost::hash_detail::ldexpl_detect::check::cpp > {}; } } + + + + + +namespace boost_hash_detect_float_functions { template boost::hash_detail::not_found frexpf(Float, int*); } namespace boost { namespace hash_detail { namespace frexpf_detect { using namespace std; using namespace boost_hash_detect_float_functions; struct check { static float x; static int* y; static const bool cpp = sizeof(float_type(frexp(x,y))) == sizeof(is); static const bool c99 = sizeof(float_type(frexpf(x,y))) == sizeof(is); }; } template struct call_c99_frexpf : boost::hash_detail::call_frexp {}; template <> struct call_c99_frexpf { typedef float float_type; template inline float operator()(float a, T b) const { using namespace std; return frexpf(a, b); } }; template struct call_cpp_frexpf : call_c99_frexpf< ::boost::hash_detail::frexpf_detect::check::c99 > {}; template <> struct call_cpp_frexpf { typedef float float_type; template inline float operator()(float a, T b) const { using namespace std; return frexp(a, b); } }; template <> struct call_frexp : call_cpp_frexpf< ::boost::hash_detail::frexpf_detect::check::cpp > {}; } } + + + + + +namespace boost_hash_detect_float_functions { template boost::hash_detail::not_found frexpl(Float, int*); } namespace boost { namespace hash_detail { namespace frexpl_detect { using namespace std; using namespace boost_hash_detect_float_functions; struct check { static long double x; static int* y; static const bool cpp = sizeof(float_type(frexp(x,y))) == sizeof(is); static const bool c99 = sizeof(float_type(frexpl(x,y))) == sizeof(is); }; } template struct call_c99_frexpl : boost::hash_detail::call_frexp {}; template <> struct call_c99_frexpl { typedef long double float_type; template inline long double operator()(long double a, T b) const { using namespace std; return frexpl(a, b); } }; template struct call_cpp_frexpl : call_c99_frexpl< ::boost::hash_detail::frexpl_detect::check::c99 > {}; template <> struct call_cpp_frexpl { typedef long double float_type; template inline long double operator()(long double a, T b) const { using namespace std; return frexp(a, b); } }; template <> struct call_frexp : call_cpp_frexpl< ::boost::hash_detail::frexpl_detect::check::cpp > {}; } } + + + + + + +namespace boost +{ + namespace hash_detail + { + template + struct select_hash_type_impl { + typedef double type; + }; + + template <> + struct select_hash_type_impl { + typedef float type; + }; + + template <> + struct select_hash_type_impl { + typedef long double type; + }; + + + + + + + + template + struct select_hash_type : select_hash_type_impl< + typename call_ldexp::float_type, + typename call_frexp::float_type + > {}; + } +} +# 15 "../boost/functional/hash/detail/hash_float.hpp" 2 +# 1 "../boost/functional/hash/detail/limits.hpp" 1 +# 26 "../boost/functional/hash/detail/limits.hpp" +namespace boost +{ + namespace hash_detail + { + template + struct limits : std::numeric_limits {}; +# 58 "../boost/functional/hash/detail/limits.hpp" + } +} +# 16 "../boost/functional/hash/detail/hash_float.hpp" 2 +# 1 "../boost/integer/static_log2.hpp" 1 +# 19 "../boost/integer/static_log2.hpp" +# 1 "../boost/integer_fwd.hpp" 1 +# 12 "../boost/integer_fwd.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/climits" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/climits" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/climits" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include-fixed/limits.h" 1 3 4 +# 34 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include-fixed/limits.h" 3 4 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include-fixed/syslimits.h" 1 3 4 + + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include-fixed/limits.h" 1 3 4 +# 169 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include-fixed/limits.h" 3 4 +# 1 "/usr/include/limits.h" 1 3 4 +# 145 "/usr/include/limits.h" 3 4 +# 1 "/usr/include/bits/posix1_lim.h" 1 3 4 +# 157 "/usr/include/bits/posix1_lim.h" 3 4 +# 1 "/usr/include/bits/local_lim.h" 1 3 4 +# 39 "/usr/include/bits/local_lim.h" 3 4 +# 1 "/usr/include/linux/limits.h" 1 3 4 +# 40 "/usr/include/bits/local_lim.h" 2 3 4 +# 158 "/usr/include/bits/posix1_lim.h" 2 3 4 +# 146 "/usr/include/limits.h" 2 3 4 + + + +# 1 "/usr/include/bits/posix2_lim.h" 1 3 4 +# 150 "/usr/include/limits.h" 2 3 4 + + + +# 1 "/usr/include/bits/xopen_lim.h" 1 3 4 +# 34 "/usr/include/bits/xopen_lim.h" 3 4 +# 1 "/usr/include/bits/stdio_lim.h" 1 3 4 +# 35 "/usr/include/bits/xopen_lim.h" 2 3 4 +# 154 "/usr/include/limits.h" 2 3 4 +# 170 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include-fixed/limits.h" 2 3 4 +# 8 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include-fixed/syslimits.h" 2 3 4 +# 35 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include-fixed/limits.h" 2 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/climits" 2 3 +# 13 "../boost/integer_fwd.hpp" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 14 "../boost/integer_fwd.hpp" 2 + + + +# 1 "../boost/cstdint.hpp" 1 +# 18 "../boost/integer_fwd.hpp" 2 + + +namespace boost +{ + + + + + + + + typedef boost::uintmax_t static_min_max_unsigned_type; + typedef boost::intmax_t static_min_max_signed_type; + typedef boost::uintmax_t static_log2_argument_type; + typedef int static_log2_result_type; +# 42 "../boost/integer_fwd.hpp" +template < class T > + class integer_traits; + +template < > + class integer_traits< bool >; + +template < > + class integer_traits< char >; + +template < > + class integer_traits< signed char >; + +template < > + class integer_traits< unsigned char >; + + +template < > + class integer_traits< wchar_t >; + + +template < > + class integer_traits< short >; + +template < > + class integer_traits< unsigned short >; + +template < > + class integer_traits< int >; + +template < > + class integer_traits< unsigned int >; + +template < > + class integer_traits< long >; + +template < > + class integer_traits< unsigned long >; + + +template < > +class integer_traits< ::boost::long_long_type>; + +template < > +class integer_traits< ::boost::ulong_long_type >; +# 97 "../boost/integer_fwd.hpp" +template < typename LeastInt > + struct int_fast_t; + +template< int Bits > + struct int_t; + +template< int Bits > + struct uint_t; + + + template< boost::long_long_type MaxValue > + + + + struct int_max_value_t; + + + template< boost::long_long_type MinValue > + + + + struct int_min_value_t; + + + template< boost::ulong_long_type MaxValue > + + + + struct uint_value_t; + + + + +template < std::size_t Bit > + struct high_bit_mask_t; + +template < std::size_t Bits > + struct low_bits_mask_t; + +template < > + struct low_bits_mask_t< ::std::numeric_limits::digits >; + + + +template + struct static_log2; + +template <> struct static_log2<0u>; + + + + +template + struct static_signed_min; + +template + struct static_signed_max; + +template + struct static_unsigned_min; + +template + struct static_unsigned_max; + +} +# 20 "../boost/integer/static_log2.hpp" 2 + +namespace boost { + + namespace detail { + + namespace static_log2_impl { +# 44 "../boost/integer/static_log2.hpp" + typedef boost::static_log2_argument_type argument_type; + typedef boost::static_log2_result_type result_type; + + template + struct choose_initial_n { + + static const bool c = (argument_type(1) << n << n) != 0; + static const result_type value = !c*n + choose_initial_n<2*c*n>::value + + + ; + + }; + + template <> + struct choose_initial_n<0> { + static const result_type value = 0; + }; + + + + + const result_type n_zero = 16; + const result_type initial_n = choose_initial_n::value; +# 84 "../boost/integer/static_log2.hpp" + template + struct static_log2_impl { + + static const bool c = (x >> n) > 0; + static const result_type value = c*n + (static_log2_impl< (x>>c*n), n/2 >::value) + + + ; + + }; + + template <> + struct static_log2_impl<1, 0> { + static const result_type value = 0; + }; + + } + } + + + + + + + + template + struct static_log2 { + + static const static_log2_result_type value = detail::static_log2_impl::static_log2_impl::value + + + ; + + }; + + + template <> + struct static_log2<0> { }; + +} +# 17 "../boost/functional/hash/detail/hash_float.hpp" 2 +# 1 "../boost/cstdint.hpp" 1 +# 18 "../boost/functional/hash/detail/hash_float.hpp" 2 +# 1 "../boost/assert.hpp" 1 +# 50 "../boost/assert.hpp" +# 1 "/usr/include/assert.h" 1 3 4 +# 51 "../boost/assert.hpp" 2 +# 19 "../boost/functional/hash/detail/hash_float.hpp" 2 +# 30 "../boost/functional/hash/detail/hash_float.hpp" +# 1 "../boost/functional/hash/detail/hash_float_generic.hpp" 1 +# 27 "../boost/functional/hash/detail/hash_float_generic.hpp" +namespace boost +{ + namespace hash_detail + { + inline void hash_float_combine(std::size_t& seed, std::size_t value) + { + seed ^= value + (seed<<6) + (seed>>2); + } + + template + inline std::size_t float_hash_impl2(T v) + { + boost::hash_detail::call_frexp frexp; + boost::hash_detail::call_ldexp ldexp; + + int exp = 0; + + v = frexp(v, &exp); + + + + if(v < 0) { + v = -v; + exp += limits::max_exponent - + limits::min_exponent; + } + + v = ldexp(v, limits::digits); + std::size_t seed = static_cast(v); + v -= static_cast(seed); + + + std::size_t const length + = (limits::digits * + boost::static_log2::radix>::value + + limits::digits - 1) + / limits::digits; + + for(std::size_t i = 0; i != length; ++i) + { + v = ldexp(v, limits::digits); + std::size_t part = static_cast(v); + v -= static_cast(part); + hash_float_combine(seed, part); + } + + hash_float_combine(seed, exp); + + return seed; + } + + template + inline std::size_t float_hash_impl(T v) + { + typedef typename select_hash_type::type type; + return float_hash_impl2(static_cast(v)); + } + } +} +# 31 "../boost/functional/hash/detail/hash_float.hpp" 2 +# 57 "../boost/functional/hash/detail/hash_float.hpp" +namespace boost +{ + namespace hash_detail + { + template + inline std::size_t float_hash_value(T v) + { + using namespace std; + switch (fpclassify(v)) { + case FP_ZERO: + return 0; + case FP_INFINITE: + return (std::size_t)(v > 0 ? -1 : -2); + case FP_NAN: + return (std::size_t)(-3); + case FP_NORMAL: + case FP_SUBNORMAL: + return float_hash_impl(v); + default: + (static_cast (0)); + return 0; + } + } + } +} +# 16 "../boost/functional/hash/hash.hpp" 2 +# 38 "../boost/functional/hash/hash.hpp" +namespace boost +{ +# 52 "../boost/functional/hash/hash.hpp" + std::size_t hash_value(bool); + std::size_t hash_value(char); + std::size_t hash_value(unsigned char); + std::size_t hash_value(signed char); + std::size_t hash_value(short); + std::size_t hash_value(unsigned short); + std::size_t hash_value(int); + std::size_t hash_value(unsigned int); + std::size_t hash_value(long); + std::size_t hash_value(unsigned long); + + + std::size_t hash_value(wchar_t); + + + + std::size_t hash_value(boost::long_long_type); + std::size_t hash_value(boost::ulong_long_type); + + + + template std::size_t hash_value(T* const&); + + + + + + template< class T, unsigned N > + std::size_t hash_value(const T (&x)[N]); + + template< class T, unsigned N > + std::size_t hash_value(T (&x)[N]); + + + std::size_t hash_value(float v); + std::size_t hash_value(double v); + std::size_t hash_value(long double v); + + template + std::size_t hash_value( + std::basic_string, A> const&); + + + + + + + + namespace hash_detail + { + template + inline std::size_t hash_value_signed(T val) + { + const int size_t_bits = std::numeric_limits::digits; + + const int length = (std::numeric_limits::digits - 1) + / size_t_bits; + + std::size_t seed = 0; + T positive = val < 0 ? -1 - val : val; + + + for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits) + { + seed ^= (std::size_t) (positive >> i) + (seed<<6) + (seed>>2); + } + seed ^= (std::size_t) val + (seed<<6) + (seed>>2); + + return seed; + } + + template + inline std::size_t hash_value_unsigned(T val) + { + const int size_t_bits = std::numeric_limits::digits; + + const int length = (std::numeric_limits::digits - 1) + / size_t_bits; + + std::size_t seed = 0; + + + for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits) + { + seed ^= (std::size_t) (val >> i) + (seed<<6) + (seed>>2); + } + seed ^= (std::size_t) val + (seed<<6) + (seed>>2); + + return seed; + } + } + + inline std::size_t hash_value(bool v) + { + return static_cast(v); + } + + inline std::size_t hash_value(char v) + { + return static_cast(v); + } + + inline std::size_t hash_value(unsigned char v) + { + return static_cast(v); + } + + inline std::size_t hash_value(signed char v) + { + return static_cast(v); + } + + inline std::size_t hash_value(short v) + { + return static_cast(v); + } + + inline std::size_t hash_value(unsigned short v) + { + return static_cast(v); + } + + inline std::size_t hash_value(int v) + { + return static_cast(v); + } + + inline std::size_t hash_value(unsigned int v) + { + return static_cast(v); + } + + inline std::size_t hash_value(long v) + { + return static_cast(v); + } + + inline std::size_t hash_value(unsigned long v) + { + return static_cast(v); + } + + + inline std::size_t hash_value(wchar_t v) + { + return static_cast(v); + } + + + + inline std::size_t hash_value(boost::long_long_type v) + { + return hash_detail::hash_value_signed(v); + } + + inline std::size_t hash_value(boost::ulong_long_type v) + { + return hash_detail::hash_value_unsigned(v); + } + + + + + template std::size_t hash_value(T* const& v) + + + + { + + + + + + + std::size_t x = static_cast( + reinterpret_cast(v)); + + return x + (x >> 3); + } +# 246 "../boost/functional/hash/hash.hpp" + template + inline void hash_combine(std::size_t& seed, T const& v) + + { + boost::hash hasher; + seed ^= hasher(v) + 0x9e3779b9 + (seed<<6) + (seed>>2); + } + + + + + + template + inline std::size_t hash_range(It first, It last) + { + std::size_t seed = 0; + + for(; first != last; ++first) + { + hash_combine(seed, *first); + } + + return seed; + } + + template + inline void hash_range(std::size_t& seed, It first, It last) + { + for(; first != last; ++first) + { + hash_combine(seed, *first); + } + } +# 307 "../boost/functional/hash/hash.hpp" + template< class T, unsigned N > + inline std::size_t hash_value(const T (&x)[N]) + { + return hash_range(x, x + N); + } + + template< class T, unsigned N > + inline std::size_t hash_value(T (&x)[N]) + { + return hash_range(x, x + N); + } + + + template + inline std::size_t hash_value( + std::basic_string, A> const& v) + { + return hash_range(v.begin(), v.end()); + } + + inline std::size_t hash_value(float v) + { + return boost::hash_detail::float_hash_value(v); + } + + inline std::size_t hash_value(double v) + { + return boost::hash_detail::float_hash_value(v); + } + + inline std::size_t hash_value(long double v) + { + return boost::hash_detail::float_hash_value(v); + } +# 425 "../boost/functional/hash/hash.hpp" + template <> struct hash : public std::unary_function { std::size_t operator()(bool v) const { return boost::hash_value(v); } }; + template <> struct hash : public std::unary_function { std::size_t operator()(char v) const { return boost::hash_value(v); } }; + template <> struct hash : public std::unary_function { std::size_t operator()(signed char v) const { return boost::hash_value(v); } }; + template <> struct hash : public std::unary_function { std::size_t operator()(unsigned char v) const { return boost::hash_value(v); } }; + + template <> struct hash : public std::unary_function { std::size_t operator()(wchar_t v) const { return boost::hash_value(v); } }; + + template <> struct hash : public std::unary_function { std::size_t operator()(short v) const { return boost::hash_value(v); } }; + template <> struct hash : public std::unary_function { std::size_t operator()(unsigned short v) const { return boost::hash_value(v); } }; + template <> struct hash : public std::unary_function { std::size_t operator()(int v) const { return boost::hash_value(v); } }; + template <> struct hash : public std::unary_function { std::size_t operator()(unsigned int v) const { return boost::hash_value(v); } }; + template <> struct hash : public std::unary_function { std::size_t operator()(long v) const { return boost::hash_value(v); } }; + template <> struct hash : public std::unary_function { std::size_t operator()(unsigned long v) const { return boost::hash_value(v); } }; + + template <> struct hash : public std::unary_function { std::size_t operator()(float v) const { return boost::hash_value(v); } }; + template <> struct hash : public std::unary_function { std::size_t operator()(double v) const { return boost::hash_value(v); } }; + template <> struct hash : public std::unary_function { std::size_t operator()(long double v) const { return boost::hash_value(v); } }; + + template <> struct hash : public std::unary_function { std::size_t operator()(std::string const& v) const { return boost::hash_value(v); } }; + + template <> struct hash : public std::unary_function { std::size_t operator()(std::wstring const& v) const { return boost::hash_value(v); } }; + + + + template <> struct hash : public std::unary_function { std::size_t operator()(boost::long_long_type v) const { return boost::hash_value(v); } }; + template <> struct hash : public std::unary_function { std::size_t operator()(boost::ulong_long_type v) const { return boost::hash_value(v); } }; +# 464 "../boost/functional/hash/hash.hpp" + template + struct hash + : public std::unary_function + { + std::size_t operator()(T* v) const + { + + return boost::hash_value(v); + + + + + + + } + }; +# 523 "../boost/functional/hash/hash.hpp" +} +# 535 "../boost/functional/hash/hash.hpp" +# 1 "../boost/functional/hash/extensions.hpp" 1 +# 16 "../boost/functional/hash/extensions.hpp" +# 1 "../boost/functional/hash/hash.hpp" 1 +# 17 "../boost/functional/hash/extensions.hpp" 2 +# 1 "../boost/detail/container_fwd.hpp" 1 +# 89 "../boost/detail/container_fwd.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/deque" 1 3 +# 59 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/deque" 3 + +# 60 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/deque" 3 + + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 1 3 +# 65 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 87 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + inline size_t + __deque_buf_size(size_t __size) + { return (__size < 512 + ? size_t(512 / __size) : size_t(1)); } +# 104 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + template + struct _Deque_iterator + { + typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator; + typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator; + + static size_t _S_buffer_size() + { return __deque_buf_size(sizeof(_Tp)); } + + typedef std::random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef _Ptr pointer; + typedef _Ref reference; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Tp** _Map_pointer; + typedef _Deque_iterator _Self; + + _Tp* _M_cur; + _Tp* _M_first; + _Tp* _M_last; + _Map_pointer _M_node; + + _Deque_iterator(_Tp* __x, _Map_pointer __y) + : _M_cur(__x), _M_first(*__y), + _M_last(*__y + _S_buffer_size()), _M_node(__y) { } + + _Deque_iterator() + : _M_cur(0), _M_first(0), _M_last(0), _M_node(0) { } + + _Deque_iterator(const iterator& __x) + : _M_cur(__x._M_cur), _M_first(__x._M_first), + _M_last(__x._M_last), _M_node(__x._M_node) { } + + reference + operator*() const + { return *_M_cur; } + + pointer + operator->() const + { return _M_cur; } + + _Self& + operator++() + { + ++_M_cur; + if (_M_cur == _M_last) + { + _M_set_node(_M_node + 1); + _M_cur = _M_first; + } + return *this; + } + + _Self + operator++(int) + { + _Self __tmp = *this; + ++*this; + return __tmp; + } + + _Self& + operator--() + { + if (_M_cur == _M_first) + { + _M_set_node(_M_node - 1); + _M_cur = _M_last; + } + --_M_cur; + return *this; + } + + _Self + operator--(int) + { + _Self __tmp = *this; + --*this; + return __tmp; + } + + _Self& + operator+=(difference_type __n) + { + const difference_type __offset = __n + (_M_cur - _M_first); + if (__offset >= 0 && __offset < difference_type(_S_buffer_size())) + _M_cur += __n; + else + { + const difference_type __node_offset = + __offset > 0 ? __offset / difference_type(_S_buffer_size()) + : -difference_type((-__offset - 1) + / _S_buffer_size()) - 1; + _M_set_node(_M_node + __node_offset); + _M_cur = _M_first + (__offset - __node_offset + * difference_type(_S_buffer_size())); + } + return *this; + } + + _Self + operator+(difference_type __n) const + { + _Self __tmp = *this; + return __tmp += __n; + } + + _Self& + operator-=(difference_type __n) + { return *this += -__n; } + + _Self + operator-(difference_type __n) const + { + _Self __tmp = *this; + return __tmp -= __n; + } + + reference + operator[](difference_type __n) const + { return *(*this + __n); } + + + + + + + void + _M_set_node(_Map_pointer __new_node) + { + _M_node = __new_node; + _M_first = *__new_node; + _M_last = _M_first + difference_type(_S_buffer_size()); + } + }; + + + + + template + inline bool + operator==(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, + const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) + { return __x._M_cur == __y._M_cur; } + + template + inline bool + operator==(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, + const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) + { return __x._M_cur == __y._M_cur; } + + template + inline bool + operator!=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, + const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) + { return !(__x == __y); } + + template + inline bool + operator!=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, + const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) + { return !(__x == __y); } + + template + inline bool + operator<(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, + const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) + { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur) + : (__x._M_node < __y._M_node); } + + template + inline bool + operator<(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, + const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) + { return (__x._M_node == __y._M_node) ? (__x._M_cur < __y._M_cur) + : (__x._M_node < __y._M_node); } + + template + inline bool + operator>(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, + const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) + { return __y < __x; } + + template + inline bool + operator>(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, + const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) + { return __y < __x; } + + template + inline bool + operator<=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, + const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) + { return !(__y < __x); } + + template + inline bool + operator<=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, + const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) + { return !(__y < __x); } + + template + inline bool + operator>=(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, + const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) + { return !(__x < __y); } + + template + inline bool + operator>=(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, + const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) + { return !(__x < __y); } + + + + + + template + inline typename _Deque_iterator<_Tp, _Ref, _Ptr>::difference_type + operator-(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x, + const _Deque_iterator<_Tp, _Ref, _Ptr>& __y) + { + return typename _Deque_iterator<_Tp, _Ref, _Ptr>::difference_type + (_Deque_iterator<_Tp, _Ref, _Ptr>::_S_buffer_size()) + * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first) + + (__y._M_last - __y._M_cur); + } + + template + inline typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type + operator-(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x, + const _Deque_iterator<_Tp, _RefR, _PtrR>& __y) + { + return typename _Deque_iterator<_Tp, _RefL, _PtrL>::difference_type + (_Deque_iterator<_Tp, _RefL, _PtrL>::_S_buffer_size()) + * (__x._M_node - __y._M_node - 1) + (__x._M_cur - __x._M_first) + + (__y._M_last - __y._M_cur); + } + + template + inline _Deque_iterator<_Tp, _Ref, _Ptr> + operator+(ptrdiff_t __n, const _Deque_iterator<_Tp, _Ref, _Ptr>& __x) + { return __x + __n; } + + template + void + fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>&, + const _Deque_iterator<_Tp, _Tp&, _Tp*>&, const _Tp&); + + template + _Deque_iterator<_Tp, _Tp&, _Tp*> + copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*>, + _Deque_iterator<_Tp, const _Tp&, const _Tp*>, + _Deque_iterator<_Tp, _Tp&, _Tp*>); + + template + inline _Deque_iterator<_Tp, _Tp&, _Tp*> + copy(_Deque_iterator<_Tp, _Tp&, _Tp*> __first, + _Deque_iterator<_Tp, _Tp&, _Tp*> __last, + _Deque_iterator<_Tp, _Tp&, _Tp*> __result) + { return std::copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*>(__first), + _Deque_iterator<_Tp, const _Tp&, const _Tp*>(__last), + __result); } + + template + _Deque_iterator<_Tp, _Tp&, _Tp*> + copy_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*>, + _Deque_iterator<_Tp, const _Tp&, const _Tp*>, + _Deque_iterator<_Tp, _Tp&, _Tp*>); + + template + inline _Deque_iterator<_Tp, _Tp&, _Tp*> + copy_backward(_Deque_iterator<_Tp, _Tp&, _Tp*> __first, + _Deque_iterator<_Tp, _Tp&, _Tp*> __last, + _Deque_iterator<_Tp, _Tp&, _Tp*> __result) + { return std::copy_backward(_Deque_iterator<_Tp, + const _Tp&, const _Tp*>(__first), + _Deque_iterator<_Tp, + const _Tp&, const _Tp*>(__last), + __result); } +# 437 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + template + class _Deque_base + { + public: + typedef _Alloc allocator_type; + + allocator_type + get_allocator() const + { return allocator_type(_M_get_Tp_allocator()); } + + typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator; + typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator; + + _Deque_base() + : _M_impl() + { _M_initialize_map(0); } + + _Deque_base(size_t __num_elements) + : _M_impl() + { _M_initialize_map(__num_elements); } + + _Deque_base(const allocator_type& __a, size_t __num_elements) + : _M_impl(__a) + { _M_initialize_map(__num_elements); } + + _Deque_base(const allocator_type& __a) + : _M_impl(__a) + { } +# 481 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + ~_Deque_base(); + + protected: + + + + typedef typename _Alloc::template rebind<_Tp*>::other _Map_alloc_type; + + typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; + + struct _Deque_impl + : public _Tp_alloc_type + { + _Tp** _M_map; + size_t _M_map_size; + iterator _M_start; + iterator _M_finish; + + _Deque_impl() + : _Tp_alloc_type(), _M_map(0), _M_map_size(0), + _M_start(), _M_finish() + { } + + _Deque_impl(const _Tp_alloc_type& __a) + : _Tp_alloc_type(__a), _M_map(0), _M_map_size(0), + _M_start(), _M_finish() + { } + }; + + _Tp_alloc_type& + _M_get_Tp_allocator() + { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); } + + const _Tp_alloc_type& + _M_get_Tp_allocator() const + { return *static_cast(&this->_M_impl); } + + _Map_alloc_type + _M_get_map_allocator() const + { return _Map_alloc_type(_M_get_Tp_allocator()); } + + _Tp* + _M_allocate_node() + { + return _M_impl._Tp_alloc_type::allocate(__deque_buf_size(sizeof(_Tp))); + } + + void + _M_deallocate_node(_Tp* __p) + { + _M_impl._Tp_alloc_type::deallocate(__p, __deque_buf_size(sizeof(_Tp))); + } + + _Tp** + _M_allocate_map(size_t __n) + { return _M_get_map_allocator().allocate(__n); } + + void + _M_deallocate_map(_Tp** __p, size_t __n) + { _M_get_map_allocator().deallocate(__p, __n); } + + protected: + void _M_initialize_map(size_t); + void _M_create_nodes(_Tp** __nstart, _Tp** __nfinish); + void _M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish); + enum { _S_initial_map_size = 8 }; + + _Deque_impl _M_impl; + }; + + template + _Deque_base<_Tp, _Alloc>:: + ~_Deque_base() + { + if (this->_M_impl._M_map) + { + _M_destroy_nodes(this->_M_impl._M_start._M_node, + this->_M_impl._M_finish._M_node + 1); + _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); + } + } +# 571 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + template + void + _Deque_base<_Tp, _Alloc>:: + _M_initialize_map(size_t __num_elements) + { + const size_t __num_nodes = (__num_elements/ __deque_buf_size(sizeof(_Tp)) + + 1); + + this->_M_impl._M_map_size = std::max((size_t) _S_initial_map_size, + size_t(__num_nodes + 2)); + this->_M_impl._M_map = _M_allocate_map(this->_M_impl._M_map_size); + + + + + + + _Tp** __nstart = (this->_M_impl._M_map + + (this->_M_impl._M_map_size - __num_nodes) / 2); + _Tp** __nfinish = __nstart + __num_nodes; + + try + { _M_create_nodes(__nstart, __nfinish); } + catch(...) + { + _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); + this->_M_impl._M_map = 0; + this->_M_impl._M_map_size = 0; + throw; + } + + this->_M_impl._M_start._M_set_node(__nstart); + this->_M_impl._M_finish._M_set_node(__nfinish - 1); + this->_M_impl._M_start._M_cur = _M_impl._M_start._M_first; + this->_M_impl._M_finish._M_cur = (this->_M_impl._M_finish._M_first + + __num_elements + % __deque_buf_size(sizeof(_Tp))); + } + + template + void + _Deque_base<_Tp, _Alloc>:: + _M_create_nodes(_Tp** __nstart, _Tp** __nfinish) + { + _Tp** __cur; + try + { + for (__cur = __nstart; __cur < __nfinish; ++__cur) + *__cur = this->_M_allocate_node(); + } + catch(...) + { + _M_destroy_nodes(__nstart, __cur); + throw; + } + } + + template + void + _Deque_base<_Tp, _Alloc>:: + _M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish) + { + for (_Tp** __n = __nstart; __n < __nfinish; ++__n) + _M_deallocate_node(*__n); + } +# 718 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + template > + class deque : protected _Deque_base<_Tp, _Alloc> + { + + typedef typename _Alloc::value_type _Alloc_value_type; + + + + typedef _Deque_base<_Tp, _Alloc> _Base; + typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; + + public: + typedef _Tp value_type; + typedef typename _Tp_alloc_type::pointer pointer; + typedef typename _Tp_alloc_type::const_pointer const_pointer; + typedef typename _Tp_alloc_type::reference reference; + typedef typename _Tp_alloc_type::const_reference const_reference; + typedef typename _Base::iterator iterator; + typedef typename _Base::const_iterator const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Alloc allocator_type; + + protected: + typedef pointer* _Map_pointer; + + static size_t _S_buffer_size() + { return __deque_buf_size(sizeof(_Tp)); } + + + using _Base::_M_initialize_map; + using _Base::_M_create_nodes; + using _Base::_M_destroy_nodes; + using _Base::_M_allocate_node; + using _Base::_M_deallocate_node; + using _Base::_M_allocate_map; + using _Base::_M_deallocate_map; + using _Base::_M_get_Tp_allocator; + + + + + + using _Base::_M_impl; + + public: + + + + + + deque() + : _Base() { } + + + + + + explicit + deque(const allocator_type& __a) + : _Base(__a, 0) { } +# 816 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + explicit + deque(size_type __n, const value_type& __value = value_type(), + const allocator_type& __a = allocator_type()) + : _Base(__a, __n) + { _M_fill_initialize(__value); } +# 830 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + deque(const deque& __x) + : _Base(__x._M_get_Tp_allocator(), __x.size()) + { std::__uninitialized_copy_a(__x.begin(), __x.end(), + this->_M_impl._M_start, + _M_get_Tp_allocator()); } +# 882 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + template + deque(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_initialize_dispatch(__first, __last, _Integral()); + } + + + + + + + ~deque() + { _M_destroy_data(begin(), end(), _M_get_Tp_allocator()); } +# 907 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + deque& + operator=(const deque& __x); +# 957 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + void + assign(size_type __n, const value_type& __val) + { _M_fill_assign(__n, __val); } +# 973 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + template + void + assign(_InputIterator __first, _InputIterator __last) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } +# 999 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + allocator_type + get_allocator() const + { return _Base::get_allocator(); } + + + + + + + iterator + begin() + { return this->_M_impl._M_start; } + + + + + + const_iterator + begin() const + { return this->_M_impl._M_start; } + + + + + + + iterator + end() + { return this->_M_impl._M_finish; } + + + + + + + const_iterator + end() const + { return this->_M_impl._M_finish; } + + + + + + + reverse_iterator + rbegin() + { return reverse_iterator(this->_M_impl._M_finish); } + + + + + + + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(this->_M_impl._M_finish); } + + + + + + + reverse_iterator + rend() + { return reverse_iterator(this->_M_impl._M_start); } + + + + + + + const_reverse_iterator + rend() const + { return const_reverse_iterator(this->_M_impl._M_start); } +# 1113 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + size_type + size() const + { return this->_M_impl._M_finish - this->_M_impl._M_start; } + + + size_type + max_size() const + { return _M_get_Tp_allocator().max_size(); } +# 1176 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + void + resize(size_type __new_size, value_type __x = value_type()) + { + const size_type __len = size(); + if (__new_size > __len) + insert(this->_M_impl._M_finish, __new_size - __len, __x); + else if (__new_size < __len) + _M_erase_at_end(this->_M_impl._M_start + + difference_type(__new_size)); + } +# 1199 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + bool + empty() const + { return this->_M_impl._M_finish == this->_M_impl._M_start; } +# 1215 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + reference + operator[](size_type __n) + { return this->_M_impl._M_start[difference_type(__n)]; } +# 1230 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + const_reference + operator[](size_type __n) const + { return this->_M_impl._M_start[difference_type(__n)]; } + + protected: + + void + _M_range_check(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range(("deque::_M_range_check")); + } + + public: +# 1255 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + reference + at(size_type __n) + { + _M_range_check(__n); + return (*this)[__n]; + } +# 1273 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + const_reference + at(size_type __n) const + { + _M_range_check(__n); + return (*this)[__n]; + } + + + + + + reference + front() + { return *begin(); } + + + + + + const_reference + front() const + { return *begin(); } + + + + + + reference + back() + { + iterator __tmp = end(); + --__tmp; + return *__tmp; + } + + + + + + const_reference + back() const + { + const_iterator __tmp = end(); + --__tmp; + return *__tmp; + } +# 1330 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + void + push_front(const value_type& __x) + { + if (this->_M_impl._M_start._M_cur != this->_M_impl._M_start._M_first) + { + this->_M_impl.construct(this->_M_impl._M_start._M_cur - 1, __x); + --this->_M_impl._M_start._M_cur; + } + else + _M_push_front_aux(__x); + } +# 1361 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + void + push_back(const value_type& __x) + { + if (this->_M_impl._M_finish._M_cur + != this->_M_impl._M_finish._M_last - 1) + { + this->_M_impl.construct(this->_M_impl._M_finish._M_cur, __x); + ++this->_M_impl._M_finish._M_cur; + } + else + _M_push_back_aux(__x); + } +# 1392 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + void + pop_front() + { + if (this->_M_impl._M_start._M_cur + != this->_M_impl._M_start._M_last - 1) + { + this->_M_impl.destroy(this->_M_impl._M_start._M_cur); + ++this->_M_impl._M_start._M_cur; + } + else + _M_pop_front_aux(); + } +# 1413 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + void + pop_back() + { + if (this->_M_impl._M_finish._M_cur + != this->_M_impl._M_finish._M_first) + { + --this->_M_impl._M_finish._M_cur; + this->_M_impl.destroy(this->_M_impl._M_finish._M_cur); + } + else + _M_pop_back_aux(); + } +# 1450 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + iterator + insert(iterator __position, const value_type& __x); +# 1490 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + void + insert(iterator __position, size_type __n, const value_type& __x) + { _M_fill_insert(__position, __n, __x); } +# 1504 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + template + void + insert(iterator __position, _InputIterator __first, + _InputIterator __last) + { + + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_insert_dispatch(__position, __first, __last, _Integral()); + } +# 1527 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + iterator + erase(iterator __position); +# 1546 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + iterator + erase(iterator __first, iterator __last); +# 1558 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + void + swap(deque& __x) + { + std::swap(this->_M_impl._M_start, __x._M_impl._M_start); + std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); + std::swap(this->_M_impl._M_map, __x._M_impl._M_map); + std::swap(this->_M_impl._M_map_size, __x._M_impl._M_map_size); + + + + std::__alloc_swap<_Tp_alloc_type>::_S_do_it(_M_get_Tp_allocator(), + __x._M_get_Tp_allocator()); + } + + + + + + + + void + clear() + { _M_erase_at_end(begin()); } + + protected: + + + + + + + template + void + _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) + { + _M_initialize_map(static_cast(__n)); + _M_fill_initialize(__x); + } + + + template + void + _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { + typedef typename std::iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_range_initialize(__first, __last, _IterCategory()); + } +# 1620 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + template + void + _M_range_initialize(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag); + + + template + void + _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag); +# 1642 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + void + _M_fill_initialize(const value_type& __value); +# 1658 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + template + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } + + + template + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { + typedef typename std::iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_assign_aux(__first, __last, _IterCategory()); + } + + + template + void + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag); + + + template + void + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __len = std::distance(__first, __last); + if (__len > size()) + { + _ForwardIterator __mid = __first; + std::advance(__mid, size()); + std::copy(__first, __mid, begin()); + insert(end(), __mid, __last); + } + else + _M_erase_at_end(std::copy(__first, __last, begin())); + } + + + + void + _M_fill_assign(size_type __n, const value_type& __val) + { + if (__n > size()) + { + std::fill(begin(), end(), __val); + insert(end(), __n - size(), __val); + } + else + { + _M_erase_at_end(begin() + difference_type(__n)); + std::fill(begin(), end(), __val); + } + } + + + + + void _M_push_back_aux(const value_type&); + + void _M_push_front_aux(const value_type&); +# 1729 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + void _M_pop_back_aux(); + + void _M_pop_front_aux(); +# 1741 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + template + void + _M_insert_dispatch(iterator __pos, + _Integer __n, _Integer __x, __true_type) + { _M_fill_insert(__pos, __n, __x); } + + + template + void + _M_insert_dispatch(iterator __pos, + _InputIterator __first, _InputIterator __last, + __false_type) + { + typedef typename std::iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_range_insert_aux(__pos, __first, __last, _IterCategory()); + } + + + template + void + _M_range_insert_aux(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag); + + + template + void + _M_range_insert_aux(iterator __pos, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag); + + + + + void + _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); + + + + iterator + _M_insert_aux(iterator __pos, const value_type& __x); + + + + + + + + void + _M_insert_aux(iterator __pos, size_type __n, const value_type& __x); + + + template + void + _M_insert_aux(iterator __pos, + _ForwardIterator __first, _ForwardIterator __last, + size_type __n); + + + + + void + _M_destroy_data_aux(iterator __first, iterator __last); + + + + template + void + _M_destroy_data(iterator __first, iterator __last, const _Alloc1&) + { _M_destroy_data_aux(__first, __last); } + + void + _M_destroy_data(iterator __first, iterator __last, + const std::allocator<_Tp>&) + { + if (!__has_trivial_destructor(value_type)) + _M_destroy_data_aux(__first, __last); + } + + + void + _M_erase_at_begin(iterator __pos) + { + _M_destroy_data(begin(), __pos, _M_get_Tp_allocator()); + _M_destroy_nodes(this->_M_impl._M_start._M_node, __pos._M_node); + this->_M_impl._M_start = __pos; + } + + + + void + _M_erase_at_end(iterator __pos) + { + _M_destroy_data(__pos, end(), _M_get_Tp_allocator()); + _M_destroy_nodes(__pos._M_node + 1, + this->_M_impl._M_finish._M_node + 1); + this->_M_impl._M_finish = __pos; + } +# 1847 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + iterator + _M_reserve_elements_at_front(size_type __n) + { + const size_type __vacancies = this->_M_impl._M_start._M_cur + - this->_M_impl._M_start._M_first; + if (__n > __vacancies) + _M_new_elements_at_front(__n - __vacancies); + return this->_M_impl._M_start - difference_type(__n); + } + + iterator + _M_reserve_elements_at_back(size_type __n) + { + const size_type __vacancies = (this->_M_impl._M_finish._M_last + - this->_M_impl._M_finish._M_cur) - 1; + if (__n > __vacancies) + _M_new_elements_at_back(__n - __vacancies); + return this->_M_impl._M_finish + difference_type(__n); + } + + void + _M_new_elements_at_front(size_type __new_elements); + + void + _M_new_elements_at_back(size_type __new_elements); +# 1883 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + void + _M_reserve_map_at_back(size_type __nodes_to_add = 1) + { + if (__nodes_to_add + 1 > this->_M_impl._M_map_size + - (this->_M_impl._M_finish._M_node - this->_M_impl._M_map)) + _M_reallocate_map(__nodes_to_add, false); + } + + void + _M_reserve_map_at_front(size_type __nodes_to_add = 1) + { + if (__nodes_to_add > size_type(this->_M_impl._M_start._M_node + - this->_M_impl._M_map)) + _M_reallocate_map(__nodes_to_add, true); + } + + void + _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front); + + }; +# 1915 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + template + inline bool + operator==(const deque<_Tp, _Alloc>& __x, + const deque<_Tp, _Alloc>& __y) + { return __x.size() == __y.size() + && std::equal(__x.begin(), __x.end(), __y.begin()); } +# 1933 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_deque.h" 3 + template + inline bool + operator<(const deque<_Tp, _Alloc>& __x, + const deque<_Tp, _Alloc>& __y) + { return std::lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); } + + + template + inline bool + operator!=(const deque<_Tp, _Alloc>& __x, + const deque<_Tp, _Alloc>& __y) + { return !(__x == __y); } + + + template + inline bool + operator>(const deque<_Tp, _Alloc>& __x, + const deque<_Tp, _Alloc>& __y) + { return __y < __x; } + + + template + inline bool + operator<=(const deque<_Tp, _Alloc>& __x, + const deque<_Tp, _Alloc>& __y) + { return !(__y < __x); } + + + template + inline bool + operator>=(const deque<_Tp, _Alloc>& __x, + const deque<_Tp, _Alloc>& __y) + { return !(__x < __y); } + + + template + inline void + swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y) + { __x.swap(__y); } + + + + +} +# 66 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/deque" 2 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/deque.tcc" 1 3 +# 61 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/deque.tcc" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 92 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/deque.tcc" 3 + template + deque<_Tp, _Alloc>& + deque<_Tp, _Alloc>:: + operator=(const deque& __x) + { + const size_type __len = size(); + if (&__x != this) + { + if (__len >= __x.size()) + _M_erase_at_end(std::copy(__x.begin(), __x.end(), + this->_M_impl._M_start)); + else + { + const_iterator __mid = __x.begin() + difference_type(__len); + std::copy(__x.begin(), __mid, this->_M_impl._M_start); + insert(this->_M_impl._M_finish, __mid, __x.end()); + } + } + return *this; + } +# 148 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/deque.tcc" 3 + template + typename deque<_Tp, _Alloc>::iterator + deque<_Tp, _Alloc>:: + insert(iterator __position, const value_type& __x) + { + if (__position._M_cur == this->_M_impl._M_start._M_cur) + { + push_front(__x); + return this->_M_impl._M_start; + } + else if (__position._M_cur == this->_M_impl._M_finish._M_cur) + { + push_back(__x); + iterator __tmp = this->_M_impl._M_finish; + --__tmp; + return __tmp; + } + else + return _M_insert_aux(__position, __x); + } +# 193 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/deque.tcc" 3 + template + typename deque<_Tp, _Alloc>::iterator + deque<_Tp, _Alloc>:: + erase(iterator __position) + { + iterator __next = __position; + ++__next; + const difference_type __index = __position - begin(); + if (static_cast(__index) < (size() >> 1)) + { + if (__position != begin()) + std::copy_backward(begin(), __position, __next); + pop_front(); + } + else + { + if (__next != end()) + std::copy(__next, end(), __position); + pop_back(); + } + return begin() + __index; + } + + template + typename deque<_Tp, _Alloc>::iterator + deque<_Tp, _Alloc>:: + erase(iterator __first, iterator __last) + { + if (__first == __last) + return __first; + else if (__first == begin() && __last == end()) + { + clear(); + return end(); + } + else + { + const difference_type __n = __last - __first; + const difference_type __elems_before = __first - begin(); + if (static_cast(__elems_before) <= (size() - __n) / 2) + { + if (__first != begin()) + std::copy_backward(begin(), __first, __last); + _M_erase_at_begin(begin() + __n); + } + else + { + if (__last != end()) + std::copy(__last, end(), __first); + _M_erase_at_end(end() - __n); + } + return begin() + __elems_before; + } + } + + template + template + void + deque<_Tp, _Alloc>:: + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + iterator __cur = begin(); + for (; __first != __last && __cur != end(); ++__cur, ++__first) + *__cur = *__first; + if (__first == __last) + _M_erase_at_end(__cur); + else + insert(end(), __first, __last); + } + + template + void + deque<_Tp, _Alloc>:: + _M_fill_insert(iterator __pos, size_type __n, const value_type& __x) + { + if (__pos._M_cur == this->_M_impl._M_start._M_cur) + { + iterator __new_start = _M_reserve_elements_at_front(__n); + try + { + std::__uninitialized_fill_a(__new_start, this->_M_impl._M_start, + __x, _M_get_Tp_allocator()); + this->_M_impl._M_start = __new_start; + } + catch(...) + { + _M_destroy_nodes(__new_start._M_node, + this->_M_impl._M_start._M_node); + throw; + } + } + else if (__pos._M_cur == this->_M_impl._M_finish._M_cur) + { + iterator __new_finish = _M_reserve_elements_at_back(__n); + try + { + std::__uninitialized_fill_a(this->_M_impl._M_finish, + __new_finish, __x, + _M_get_Tp_allocator()); + this->_M_impl._M_finish = __new_finish; + } + catch(...) + { + _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, + __new_finish._M_node + 1); + throw; + } + } + else + _M_insert_aux(__pos, __n, __x); + } +# 332 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/deque.tcc" 3 + template + void + deque<_Tp, _Alloc>:: + _M_fill_initialize(const value_type& __value) + { + _Map_pointer __cur; + try + { + for (__cur = this->_M_impl._M_start._M_node; + __cur < this->_M_impl._M_finish._M_node; + ++__cur) + std::__uninitialized_fill_a(*__cur, *__cur + _S_buffer_size(), + __value, _M_get_Tp_allocator()); + std::__uninitialized_fill_a(this->_M_impl._M_finish._M_first, + this->_M_impl._M_finish._M_cur, + __value, _M_get_Tp_allocator()); + } + catch(...) + { + std::_Destroy(this->_M_impl._M_start, iterator(*__cur, __cur), + _M_get_Tp_allocator()); + throw; + } + } + + template + template + void + deque<_Tp, _Alloc>:: + _M_range_initialize(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + this->_M_initialize_map(0); + try + { + for (; __first != __last; ++__first) + push_back(*__first); + } + catch(...) + { + clear(); + throw; + } + } + + template + template + void + deque<_Tp, _Alloc>:: + _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __n = std::distance(__first, __last); + this->_M_initialize_map(__n); + + _Map_pointer __cur_node; + try + { + for (__cur_node = this->_M_impl._M_start._M_node; + __cur_node < this->_M_impl._M_finish._M_node; + ++__cur_node) + { + _ForwardIterator __mid = __first; + std::advance(__mid, _S_buffer_size()); + std::__uninitialized_copy_a(__first, __mid, *__cur_node, + _M_get_Tp_allocator()); + __first = __mid; + } + std::__uninitialized_copy_a(__first, __last, + this->_M_impl._M_finish._M_first, + _M_get_Tp_allocator()); + } + catch(...) + { + std::_Destroy(this->_M_impl._M_start, + iterator(*__cur_node, __cur_node), + _M_get_Tp_allocator()); + throw; + } + } + + + template + + + + + + + void + deque<_Tp, _Alloc>:: + _M_push_back_aux(const value_type& __t) + + { + _M_reserve_map_at_back(); + *(this->_M_impl._M_finish._M_node + 1) = this->_M_allocate_node(); + try + { + + + + + this->_M_impl.construct(this->_M_impl._M_finish._M_cur, __t); + + this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node + + 1); + this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_first; + } + catch(...) + { + _M_deallocate_node(*(this->_M_impl._M_finish._M_node + 1)); + throw; + } + } + + + template + + + + + + + void + deque<_Tp, _Alloc>:: + _M_push_front_aux(const value_type& __t) + + { + _M_reserve_map_at_front(); + *(this->_M_impl._M_start._M_node - 1) = this->_M_allocate_node(); + try + { + this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node + - 1); + this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_last - 1; + + + + + this->_M_impl.construct(this->_M_impl._M_start._M_cur, __t); + + } + catch(...) + { + ++this->_M_impl._M_start; + _M_deallocate_node(*(this->_M_impl._M_start._M_node - 1)); + throw; + } + } + + + template + void deque<_Tp, _Alloc>:: + _M_pop_back_aux() + { + _M_deallocate_node(this->_M_impl._M_finish._M_first); + this->_M_impl._M_finish._M_set_node(this->_M_impl._M_finish._M_node - 1); + this->_M_impl._M_finish._M_cur = this->_M_impl._M_finish._M_last - 1; + this->_M_impl.destroy(this->_M_impl._M_finish._M_cur); + } + + + + + + + template + void deque<_Tp, _Alloc>:: + _M_pop_front_aux() + { + this->_M_impl.destroy(this->_M_impl._M_start._M_cur); + _M_deallocate_node(this->_M_impl._M_start._M_first); + this->_M_impl._M_start._M_set_node(this->_M_impl._M_start._M_node + 1); + this->_M_impl._M_start._M_cur = this->_M_impl._M_start._M_first; + } + + template + template + void + deque<_Tp, _Alloc>:: + _M_range_insert_aux(iterator __pos, + _InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { std::copy(__first, __last, std::inserter(*this, __pos)); } + + template + template + void + deque<_Tp, _Alloc>:: + _M_range_insert_aux(iterator __pos, + _ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __n = std::distance(__first, __last); + if (__pos._M_cur == this->_M_impl._M_start._M_cur) + { + iterator __new_start = _M_reserve_elements_at_front(__n); + try + { + std::__uninitialized_copy_a(__first, __last, __new_start, + _M_get_Tp_allocator()); + this->_M_impl._M_start = __new_start; + } + catch(...) + { + _M_destroy_nodes(__new_start._M_node, + this->_M_impl._M_start._M_node); + throw; + } + } + else if (__pos._M_cur == this->_M_impl._M_finish._M_cur) + { + iterator __new_finish = _M_reserve_elements_at_back(__n); + try + { + std::__uninitialized_copy_a(__first, __last, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish = __new_finish; + } + catch(...) + { + _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, + __new_finish._M_node + 1); + throw; + } + } + else + _M_insert_aux(__pos, __first, __last, __n); + } + + template +# 572 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/deque.tcc" 3 + typename deque<_Tp, _Alloc>::iterator + deque<_Tp, _Alloc>:: + _M_insert_aux(iterator __pos, const value_type& __x) + { + value_type __x_copy = __x; + + difference_type __index = __pos - this->_M_impl._M_start; + if (static_cast(__index) < size() / 2) + { + push_front((front())); + iterator __front1 = this->_M_impl._M_start; + ++__front1; + iterator __front2 = __front1; + ++__front2; + __pos = this->_M_impl._M_start + __index; + iterator __pos1 = __pos; + ++__pos1; + std::copy(__front2, __pos1, __front1); + } + else + { + push_back((back())); + iterator __back1 = this->_M_impl._M_finish; + --__back1; + iterator __back2 = __back1; + --__back2; + __pos = this->_M_impl._M_start + __index; + std::copy_backward(__pos, __back2, __back1); + } + *__pos = (__x_copy); + return __pos; + } + + template + void + deque<_Tp, _Alloc>:: + _M_insert_aux(iterator __pos, size_type __n, const value_type& __x) + { + const difference_type __elems_before = __pos - this->_M_impl._M_start; + const size_type __length = this->size(); + value_type __x_copy = __x; + if (__elems_before < difference_type(__length / 2)) + { + iterator __new_start = _M_reserve_elements_at_front(__n); + iterator __old_start = this->_M_impl._M_start; + __pos = this->_M_impl._M_start + __elems_before; + try + { + if (__elems_before >= difference_type(__n)) + { + iterator __start_n = (this->_M_impl._M_start + + difference_type(__n)); + std::__uninitialized_move_a(this->_M_impl._M_start, + __start_n, __new_start, + _M_get_Tp_allocator()); + this->_M_impl._M_start = __new_start; + std::copy(__start_n, __pos, __old_start); + std::fill(__pos - difference_type(__n), __pos, __x_copy); + } + else + { + std::__uninitialized_move_fill(this->_M_impl._M_start, + __pos, __new_start, + this->_M_impl._M_start, + __x_copy, + _M_get_Tp_allocator()); + this->_M_impl._M_start = __new_start; + std::fill(__old_start, __pos, __x_copy); + } + } + catch(...) + { + _M_destroy_nodes(__new_start._M_node, + this->_M_impl._M_start._M_node); + throw; + } + } + else + { + iterator __new_finish = _M_reserve_elements_at_back(__n); + iterator __old_finish = this->_M_impl._M_finish; + const difference_type __elems_after = + difference_type(__length) - __elems_before; + __pos = this->_M_impl._M_finish - __elems_after; + try + { + if (__elems_after > difference_type(__n)) + { + iterator __finish_n = (this->_M_impl._M_finish + - difference_type(__n)); + std::__uninitialized_move_a(__finish_n, + this->_M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish = __new_finish; + std::copy_backward(__pos, __finish_n, __old_finish); + std::fill(__pos, __pos + difference_type(__n), __x_copy); + } + else + { + std::__uninitialized_fill_move(this->_M_impl._M_finish, + __pos + difference_type(__n), + __x_copy, __pos, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish = __new_finish; + std::fill(__pos, __old_finish, __x_copy); + } + } + catch(...) + { + _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, + __new_finish._M_node + 1); + throw; + } + } + } + + template + template + void + deque<_Tp, _Alloc>:: + _M_insert_aux(iterator __pos, + _ForwardIterator __first, _ForwardIterator __last, + size_type __n) + { + const difference_type __elemsbefore = __pos - this->_M_impl._M_start; + const size_type __length = size(); + if (static_cast(__elemsbefore) < __length / 2) + { + iterator __new_start = _M_reserve_elements_at_front(__n); + iterator __old_start = this->_M_impl._M_start; + __pos = this->_M_impl._M_start + __elemsbefore; + try + { + if (__elemsbefore >= difference_type(__n)) + { + iterator __start_n = (this->_M_impl._M_start + + difference_type(__n)); + std::__uninitialized_move_a(this->_M_impl._M_start, + __start_n, __new_start, + _M_get_Tp_allocator()); + this->_M_impl._M_start = __new_start; + std::copy(__start_n, __pos, __old_start); + std::copy(__first, __last, __pos - difference_type(__n)); + } + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, difference_type(__n) - __elemsbefore); + std::__uninitialized_move_copy(this->_M_impl._M_start, + __pos, __first, __mid, + __new_start, + _M_get_Tp_allocator()); + this->_M_impl._M_start = __new_start; + std::copy(__mid, __last, __old_start); + } + } + catch(...) + { + _M_destroy_nodes(__new_start._M_node, + this->_M_impl._M_start._M_node); + throw; + } + } + else + { + iterator __new_finish = _M_reserve_elements_at_back(__n); + iterator __old_finish = this->_M_impl._M_finish; + const difference_type __elemsafter = + difference_type(__length) - __elemsbefore; + __pos = this->_M_impl._M_finish - __elemsafter; + try + { + if (__elemsafter > difference_type(__n)) + { + iterator __finish_n = (this->_M_impl._M_finish + - difference_type(__n)); + std::__uninitialized_move_a(__finish_n, + this->_M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish = __new_finish; + std::copy_backward(__pos, __finish_n, __old_finish); + std::copy(__first, __last, __pos); + } + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, __elemsafter); + std::__uninitialized_copy_move(__mid, __last, __pos, + this->_M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish = __new_finish; + std::copy(__first, __mid, __pos); + } + } + catch(...) + { + _M_destroy_nodes(this->_M_impl._M_finish._M_node + 1, + __new_finish._M_node + 1); + throw; + } + } + } + + template + void + deque<_Tp, _Alloc>:: + _M_destroy_data_aux(iterator __first, iterator __last) + { + for (_Map_pointer __node = __first._M_node + 1; + __node < __last._M_node; ++__node) + std::_Destroy(*__node, *__node + _S_buffer_size(), + _M_get_Tp_allocator()); + + if (__first._M_node != __last._M_node) + { + std::_Destroy(__first._M_cur, __first._M_last, + _M_get_Tp_allocator()); + std::_Destroy(__last._M_first, __last._M_cur, + _M_get_Tp_allocator()); + } + else + std::_Destroy(__first._M_cur, __last._M_cur, + _M_get_Tp_allocator()); + } + + template + void + deque<_Tp, _Alloc>:: + _M_new_elements_at_front(size_type __new_elems) + { + if (this->max_size() - this->size() < __new_elems) + __throw_length_error(("deque::_M_new_elements_at_front")); + + const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1) + / _S_buffer_size()); + _M_reserve_map_at_front(__new_nodes); + size_type __i; + try + { + for (__i = 1; __i <= __new_nodes; ++__i) + *(this->_M_impl._M_start._M_node - __i) = this->_M_allocate_node(); + } + catch(...) + { + for (size_type __j = 1; __j < __i; ++__j) + _M_deallocate_node(*(this->_M_impl._M_start._M_node - __j)); + throw; + } + } + + template + void + deque<_Tp, _Alloc>:: + _M_new_elements_at_back(size_type __new_elems) + { + if (this->max_size() - this->size() < __new_elems) + __throw_length_error(("deque::_M_new_elements_at_back")); + + const size_type __new_nodes = ((__new_elems + _S_buffer_size() - 1) + / _S_buffer_size()); + _M_reserve_map_at_back(__new_nodes); + size_type __i; + try + { + for (__i = 1; __i <= __new_nodes; ++__i) + *(this->_M_impl._M_finish._M_node + __i) = this->_M_allocate_node(); + } + catch(...) + { + for (size_type __j = 1; __j < __i; ++__j) + _M_deallocate_node(*(this->_M_impl._M_finish._M_node + __j)); + throw; + } + } + + template + void + deque<_Tp, _Alloc>:: + _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front) + { + const size_type __old_num_nodes + = this->_M_impl._M_finish._M_node - this->_M_impl._M_start._M_node + 1; + const size_type __new_num_nodes = __old_num_nodes + __nodes_to_add; + + _Map_pointer __new_nstart; + if (this->_M_impl._M_map_size > 2 * __new_num_nodes) + { + __new_nstart = this->_M_impl._M_map + (this->_M_impl._M_map_size + - __new_num_nodes) / 2 + + (__add_at_front ? __nodes_to_add : 0); + if (__new_nstart < this->_M_impl._M_start._M_node) + std::copy(this->_M_impl._M_start._M_node, + this->_M_impl._M_finish._M_node + 1, + __new_nstart); + else + std::copy_backward(this->_M_impl._M_start._M_node, + this->_M_impl._M_finish._M_node + 1, + __new_nstart + __old_num_nodes); + } + else + { + size_type __new_map_size = this->_M_impl._M_map_size + + std::max(this->_M_impl._M_map_size, + __nodes_to_add) + 2; + + _Map_pointer __new_map = this->_M_allocate_map(__new_map_size); + __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2 + + (__add_at_front ? __nodes_to_add : 0); + std::copy(this->_M_impl._M_start._M_node, + this->_M_impl._M_finish._M_node + 1, + __new_nstart); + _M_deallocate_map(this->_M_impl._M_map, this->_M_impl._M_map_size); + + this->_M_impl._M_map = __new_map; + this->_M_impl._M_map_size = __new_map_size; + } + + this->_M_impl._M_start._M_set_node(__new_nstart); + this->_M_impl._M_finish._M_set_node(__new_nstart + __old_num_nodes - 1); + } + + + + template + void + fill(const _Deque_iterator<_Tp, _Tp&, _Tp*>& __first, + const _Deque_iterator<_Tp, _Tp&, _Tp*>& __last, const _Tp& __value) + { + typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; + + for (typename _Self::_Map_pointer __node = __first._M_node + 1; + __node < __last._M_node; ++__node) + std::fill(*__node, *__node + _Self::_S_buffer_size(), __value); + + if (__first._M_node != __last._M_node) + { + std::fill(__first._M_cur, __first._M_last, __value); + std::fill(__last._M_first, __last._M_cur, __value); + } + else + std::fill(__first._M_cur, __last._M_cur, __value); + } + + template + _Deque_iterator<_Tp, _Tp&, _Tp*> + copy(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, + _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, + _Deque_iterator<_Tp, _Tp&, _Tp*> __result) + { + typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; + typedef typename _Self::difference_type difference_type; + + difference_type __len = __last - __first; + while (__len > 0) + { + const difference_type __clen + = std::min(__len, std::min(__first._M_last - __first._M_cur, + __result._M_last - __result._M_cur)); + std::copy(__first._M_cur, __first._M_cur + __clen, __result._M_cur); + __first += __clen; + __result += __clen; + __len -= __clen; + } + return __result; + } + + template + _Deque_iterator<_Tp, _Tp&, _Tp*> + copy_backward(_Deque_iterator<_Tp, const _Tp&, const _Tp*> __first, + _Deque_iterator<_Tp, const _Tp&, const _Tp*> __last, + _Deque_iterator<_Tp, _Tp&, _Tp*> __result) + { + typedef typename _Deque_iterator<_Tp, _Tp&, _Tp*>::_Self _Self; + typedef typename _Self::difference_type difference_type; + + difference_type __len = __last - __first; + while (__len > 0) + { + difference_type __llen = __last._M_cur - __last._M_first; + _Tp* __lend = __last._M_cur; + + difference_type __rlen = __result._M_cur - __result._M_first; + _Tp* __rend = __result._M_cur; + + if (!__llen) + { + __llen = _Self::_S_buffer_size(); + __lend = *(__last._M_node - 1) + __llen; + } + if (!__rlen) + { + __rlen = _Self::_S_buffer_size(); + __rend = *(__result._M_node - 1) + __rlen; + } + + const difference_type __clen = std::min(__len, + std::min(__llen, __rlen)); + std::copy_backward(__lend - __clen, __lend, __rend); + __last -= __clen; + __result -= __clen; + __len -= __clen; + } + return __result; + } +# 1045 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/deque.tcc" 3 + +} +# 68 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/deque" 2 3 +# 90 "../boost/detail/container_fwd.hpp" 2 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/map" 1 3 +# 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/map" 3 + +# 59 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/map" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_tree.h" 1 3 +# 68 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_tree.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 88 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_tree.h" 3 + enum _Rb_tree_color { _S_red = false, _S_black = true }; + + struct _Rb_tree_node_base + { + typedef _Rb_tree_node_base* _Base_ptr; + typedef const _Rb_tree_node_base* _Const_Base_ptr; + + _Rb_tree_color _M_color; + _Base_ptr _M_parent; + _Base_ptr _M_left; + _Base_ptr _M_right; + + static _Base_ptr + _S_minimum(_Base_ptr __x) + { + while (__x->_M_left != 0) __x = __x->_M_left; + return __x; + } + + static _Const_Base_ptr + _S_minimum(_Const_Base_ptr __x) + { + while (__x->_M_left != 0) __x = __x->_M_left; + return __x; + } + + static _Base_ptr + _S_maximum(_Base_ptr __x) + { + while (__x->_M_right != 0) __x = __x->_M_right; + return __x; + } + + static _Const_Base_ptr + _S_maximum(_Const_Base_ptr __x) + { + while (__x->_M_right != 0) __x = __x->_M_right; + return __x; + } + }; + + template + struct _Rb_tree_node : public _Rb_tree_node_base + { + typedef _Rb_tree_node<_Val>* _Link_type; + _Val _M_value_field; + + + + + + + + }; + + __attribute__ ((__pure__)) _Rb_tree_node_base* + _Rb_tree_increment(_Rb_tree_node_base* __x) throw (); + + __attribute__ ((__pure__)) const _Rb_tree_node_base* + _Rb_tree_increment(const _Rb_tree_node_base* __x) throw (); + + __attribute__ ((__pure__)) _Rb_tree_node_base* + _Rb_tree_decrement(_Rb_tree_node_base* __x) throw (); + + __attribute__ ((__pure__)) const _Rb_tree_node_base* + _Rb_tree_decrement(const _Rb_tree_node_base* __x) throw (); + + template + struct _Rb_tree_iterator + { + typedef _Tp value_type; + typedef _Tp& reference; + typedef _Tp* pointer; + + typedef bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + + typedef _Rb_tree_iterator<_Tp> _Self; + typedef _Rb_tree_node_base::_Base_ptr _Base_ptr; + typedef _Rb_tree_node<_Tp>* _Link_type; + + _Rb_tree_iterator() + : _M_node() { } + + explicit + _Rb_tree_iterator(_Link_type __x) + : _M_node(__x) { } + + reference + operator*() const + { return static_cast<_Link_type>(_M_node)->_M_value_field; } + + pointer + operator->() const + { return std::__addressof(static_cast<_Link_type> + (_M_node)->_M_value_field); } + + _Self& + operator++() + { + _M_node = _Rb_tree_increment(_M_node); + return *this; + } + + _Self + operator++(int) + { + _Self __tmp = *this; + _M_node = _Rb_tree_increment(_M_node); + return __tmp; + } + + _Self& + operator--() + { + _M_node = _Rb_tree_decrement(_M_node); + return *this; + } + + _Self + operator--(int) + { + _Self __tmp = *this; + _M_node = _Rb_tree_decrement(_M_node); + return __tmp; + } + + bool + operator==(const _Self& __x) const + { return _M_node == __x._M_node; } + + bool + operator!=(const _Self& __x) const + { return _M_node != __x._M_node; } + + _Base_ptr _M_node; + }; + + template + struct _Rb_tree_const_iterator + { + typedef _Tp value_type; + typedef const _Tp& reference; + typedef const _Tp* pointer; + + typedef _Rb_tree_iterator<_Tp> iterator; + + typedef bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + + typedef _Rb_tree_const_iterator<_Tp> _Self; + typedef _Rb_tree_node_base::_Const_Base_ptr _Base_ptr; + typedef const _Rb_tree_node<_Tp>* _Link_type; + + _Rb_tree_const_iterator() + : _M_node() { } + + explicit + _Rb_tree_const_iterator(_Link_type __x) + : _M_node(__x) { } + + _Rb_tree_const_iterator(const iterator& __it) + : _M_node(__it._M_node) { } + + iterator + _M_const_cast() const + { return iterator(static_cast + (const_cast(_M_node))); } + + reference + operator*() const + { return static_cast<_Link_type>(_M_node)->_M_value_field; } + + pointer + operator->() const + { return std::__addressof(static_cast<_Link_type> + (_M_node)->_M_value_field); } + + _Self& + operator++() + { + _M_node = _Rb_tree_increment(_M_node); + return *this; + } + + _Self + operator++(int) + { + _Self __tmp = *this; + _M_node = _Rb_tree_increment(_M_node); + return __tmp; + } + + _Self& + operator--() + { + _M_node = _Rb_tree_decrement(_M_node); + return *this; + } + + _Self + operator--(int) + { + _Self __tmp = *this; + _M_node = _Rb_tree_decrement(_M_node); + return __tmp; + } + + bool + operator==(const _Self& __x) const + { return _M_node == __x._M_node; } + + bool + operator!=(const _Self& __x) const + { return _M_node != __x._M_node; } + + _Base_ptr _M_node; + }; + + template + inline bool + operator==(const _Rb_tree_iterator<_Val>& __x, + const _Rb_tree_const_iterator<_Val>& __y) + { return __x._M_node == __y._M_node; } + + template + inline bool + operator!=(const _Rb_tree_iterator<_Val>& __x, + const _Rb_tree_const_iterator<_Val>& __y) + { return __x._M_node != __y._M_node; } + + void + _Rb_tree_insert_and_rebalance(const bool __insert_left, + _Rb_tree_node_base* __x, + _Rb_tree_node_base* __p, + _Rb_tree_node_base& __header) throw (); + + _Rb_tree_node_base* + _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z, + _Rb_tree_node_base& __header) throw (); + + + template > + class _Rb_tree + { + typedef typename _Alloc::template rebind<_Rb_tree_node<_Val> >::other + _Node_allocator; + + protected: + typedef _Rb_tree_node_base* _Base_ptr; + typedef const _Rb_tree_node_base* _Const_Base_ptr; + + public: + typedef _Key key_type; + typedef _Val value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef _Rb_tree_node<_Val>* _Link_type; + typedef const _Rb_tree_node<_Val>* _Const_Link_type; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Alloc allocator_type; + + _Node_allocator& + _M_get_Node_allocator() + { return *static_cast<_Node_allocator*>(&this->_M_impl); } + + const _Node_allocator& + _M_get_Node_allocator() const + { return *static_cast(&this->_M_impl); } + + allocator_type + get_allocator() const + { return allocator_type(_M_get_Node_allocator()); } + + protected: + _Link_type + _M_get_node() + { return _M_impl._Node_allocator::allocate(1); } + + void + _M_put_node(_Link_type __p) + { _M_impl._Node_allocator::deallocate(__p, 1); } + + + _Link_type + _M_create_node(const value_type& __x) + { + _Link_type __tmp = _M_get_node(); + try + { get_allocator().construct + (std::__addressof(__tmp->_M_value_field), __x); } + catch(...) + { + _M_put_node(__tmp); + throw; + } + return __tmp; + } + + void + _M_destroy_node(_Link_type __p) + { + get_allocator().destroy(std::__addressof(__p->_M_value_field)); + _M_put_node(__p); + } +# 424 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_tree.h" 3 + _Link_type + _M_clone_node(_Const_Link_type __x) + { + _Link_type __tmp = _M_create_node(__x->_M_value_field); + __tmp->_M_color = __x->_M_color; + __tmp->_M_left = 0; + __tmp->_M_right = 0; + return __tmp; + } + + protected: + template + struct _Rb_tree_impl : public _Node_allocator + { + _Key_compare _M_key_compare; + _Rb_tree_node_base _M_header; + size_type _M_node_count; + + _Rb_tree_impl() + : _Node_allocator(), _M_key_compare(), _M_header(), + _M_node_count(0) + { _M_initialize(); } + + _Rb_tree_impl(const _Key_compare& __comp, const _Node_allocator& __a) + : _Node_allocator(__a), _M_key_compare(__comp), _M_header(), + _M_node_count(0) + { _M_initialize(); } + + private: + void + _M_initialize() + { + this->_M_header._M_color = _S_red; + this->_M_header._M_parent = 0; + this->_M_header._M_left = &this->_M_header; + this->_M_header._M_right = &this->_M_header; + } + }; + + _Rb_tree_impl<_Compare> _M_impl; + + protected: + _Base_ptr& + _M_root() + { return this->_M_impl._M_header._M_parent; } + + _Const_Base_ptr + _M_root() const + { return this->_M_impl._M_header._M_parent; } + + _Base_ptr& + _M_leftmost() + { return this->_M_impl._M_header._M_left; } + + _Const_Base_ptr + _M_leftmost() const + { return this->_M_impl._M_header._M_left; } + + _Base_ptr& + _M_rightmost() + { return this->_M_impl._M_header._M_right; } + + _Const_Base_ptr + _M_rightmost() const + { return this->_M_impl._M_header._M_right; } + + _Link_type + _M_begin() + { return static_cast<_Link_type>(this->_M_impl._M_header._M_parent); } + + _Const_Link_type + _M_begin() const + { + return static_cast<_Const_Link_type> + (this->_M_impl._M_header._M_parent); + } + + _Link_type + _M_end() + { return static_cast<_Link_type>(&this->_M_impl._M_header); } + + _Const_Link_type + _M_end() const + { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); } + + static const_reference + _S_value(_Const_Link_type __x) + { return __x->_M_value_field; } + + static const _Key& + _S_key(_Const_Link_type __x) + { return _KeyOfValue()(_S_value(__x)); } + + static _Link_type + _S_left(_Base_ptr __x) + { return static_cast<_Link_type>(__x->_M_left); } + + static _Const_Link_type + _S_left(_Const_Base_ptr __x) + { return static_cast<_Const_Link_type>(__x->_M_left); } + + static _Link_type + _S_right(_Base_ptr __x) + { return static_cast<_Link_type>(__x->_M_right); } + + static _Const_Link_type + _S_right(_Const_Base_ptr __x) + { return static_cast<_Const_Link_type>(__x->_M_right); } + + static const_reference + _S_value(_Const_Base_ptr __x) + { return static_cast<_Const_Link_type>(__x)->_M_value_field; } + + static const _Key& + _S_key(_Const_Base_ptr __x) + { return _KeyOfValue()(_S_value(__x)); } + + static _Base_ptr + _S_minimum(_Base_ptr __x) + { return _Rb_tree_node_base::_S_minimum(__x); } + + static _Const_Base_ptr + _S_minimum(_Const_Base_ptr __x) + { return _Rb_tree_node_base::_S_minimum(__x); } + + static _Base_ptr + _S_maximum(_Base_ptr __x) + { return _Rb_tree_node_base::_S_maximum(__x); } + + static _Const_Base_ptr + _S_maximum(_Const_Base_ptr __x) + { return _Rb_tree_node_base::_S_maximum(__x); } + + public: + typedef _Rb_tree_iterator iterator; + typedef _Rb_tree_const_iterator const_iterator; + + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + + private: +# 579 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_tree.h" 3 + iterator + _M_insert_(_Const_Base_ptr __x, _Const_Base_ptr __y, + const value_type& __v); + + + + iterator + _M_insert_lower(_Base_ptr __x, _Base_ptr __y, const value_type& __v); + + iterator + _M_insert_equal_lower(const value_type& __x); + + + _Link_type + _M_copy(_Const_Link_type __x, _Link_type __p); + + void + _M_erase(_Link_type __x); + + iterator + _M_lower_bound(_Link_type __x, _Link_type __y, + const _Key& __k); + + const_iterator + _M_lower_bound(_Const_Link_type __x, _Const_Link_type __y, + const _Key& __k) const; + + iterator + _M_upper_bound(_Link_type __x, _Link_type __y, + const _Key& __k); + + const_iterator + _M_upper_bound(_Const_Link_type __x, _Const_Link_type __y, + const _Key& __k) const; + + public: + + _Rb_tree() { } + + _Rb_tree(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_impl(__comp, __a) { } + + _Rb_tree(const _Rb_tree& __x) + : _M_impl(__x._M_impl._M_key_compare, __x._M_get_Node_allocator()) + { + if (__x._M_root() != 0) + { + _M_root() = _M_copy(__x._M_begin(), _M_end()); + _M_leftmost() = _S_minimum(_M_root()); + _M_rightmost() = _S_maximum(_M_root()); + _M_impl._M_node_count = __x._M_impl._M_node_count; + } + } + + + + + + ~_Rb_tree() + { _M_erase(_M_begin()); } + + _Rb_tree& + operator=(const _Rb_tree& __x); + + + _Compare + key_comp() const + { return _M_impl._M_key_compare; } + + iterator + begin() + { + return iterator(static_cast<_Link_type> + (this->_M_impl._M_header._M_left)); + } + + const_iterator + begin() const + { + return const_iterator(static_cast<_Const_Link_type> + (this->_M_impl._M_header._M_left)); + } + + iterator + end() + { return iterator(static_cast<_Link_type>(&this->_M_impl._M_header)); } + + const_iterator + end() const + { + return const_iterator(static_cast<_Const_Link_type> + (&this->_M_impl._M_header)); + } + + reverse_iterator + rbegin() + { return reverse_iterator(end()); } + + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(end()); } + + reverse_iterator + rend() + { return reverse_iterator(begin()); } + + const_reverse_iterator + rend() const + { return const_reverse_iterator(begin()); } + + bool + empty() const + { return _M_impl._M_node_count == 0; } + + size_type + size() const + { return _M_impl._M_node_count; } + + size_type + max_size() const + { return _M_get_Node_allocator().max_size(); } + + void + swap(_Rb_tree& __t); +# 723 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_tree.h" 3 + pair + _M_insert_unique(const value_type& __x); + + iterator + _M_insert_equal(const value_type& __x); + + iterator + _M_insert_unique_(const_iterator __position, const value_type& __x); + + iterator + _M_insert_equal_(const_iterator __position, const value_type& __x); + + + template + void + _M_insert_unique(_InputIterator __first, _InputIterator __last); + + template + void + _M_insert_equal(_InputIterator __first, _InputIterator __last); + + private: + void + _M_erase_aux(const_iterator __position); + + void + _M_erase_aux(const_iterator __first, const_iterator __last); + + public: +# 764 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_tree.h" 3 + void + erase(iterator __position) + { _M_erase_aux(__position); } + + void + erase(const_iterator __position) + { _M_erase_aux(__position); } + + size_type + erase(const key_type& __x); +# 785 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_tree.h" 3 + void + erase(iterator __first, iterator __last) + { _M_erase_aux(__first, __last); } + + void + erase(const_iterator __first, const_iterator __last) + { _M_erase_aux(__first, __last); } + + void + erase(const key_type* __first, const key_type* __last); + + void + clear() + { + _M_erase(_M_begin()); + _M_leftmost() = _M_end(); + _M_root() = 0; + _M_rightmost() = _M_end(); + _M_impl._M_node_count = 0; + } + + + iterator + find(const key_type& __k); + + const_iterator + find(const key_type& __k) const; + + size_type + count(const key_type& __k) const; + + iterator + lower_bound(const key_type& __k) + { return _M_lower_bound(_M_begin(), _M_end(), __k); } + + const_iterator + lower_bound(const key_type& __k) const + { return _M_lower_bound(_M_begin(), _M_end(), __k); } + + iterator + upper_bound(const key_type& __k) + { return _M_upper_bound(_M_begin(), _M_end(), __k); } + + const_iterator + upper_bound(const key_type& __k) const + { return _M_upper_bound(_M_begin(), _M_end(), __k); } + + pair + equal_range(const key_type& __k); + + pair + equal_range(const key_type& __k) const; + + + bool + __rb_verify() const; + }; + + template + inline bool + operator==(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { + return __x.size() == __y.size() + && std::equal(__x.begin(), __x.end(), __y.begin()); + } + + template + inline bool + operator<(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { + return std::lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); + } + + template + inline bool + operator!=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { return !(__x == __y); } + + template + inline bool + operator>(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { return __y < __x; } + + template + inline bool + operator<=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { return !(__y < __x); } + + template + inline bool + operator>=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { return !(__x < __y); } + + template + inline void + swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { __x.swap(__y); } +# 922 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_tree.h" 3 + template + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + operator=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x) + { + if (this != &__x) + { + + clear(); + _M_impl._M_key_compare = __x._M_impl._M_key_compare; + if (__x._M_root() != 0) + { + _M_root() = _M_copy(__x._M_begin(), _M_end()); + _M_leftmost() = _S_minimum(_M_root()); + _M_rightmost() = _S_maximum(_M_root()); + _M_impl._M_node_count = __x._M_impl._M_node_count; + } + } + return *this; + } + + template + + + + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + + + + _M_insert_(_Const_Base_ptr __x, _Const_Base_ptr __p, const _Val& __v) + + { + bool __insert_left = (__x != 0 || __p == _M_end() + || _M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key(__p))); + + _Link_type __z = _M_create_node((__v)); + + _Rb_tree_insert_and_rebalance(__insert_left, __z, + const_cast<_Base_ptr>(__p), + this->_M_impl._M_header); + ++_M_impl._M_node_count; + return iterator(__z); + } + + template + + + + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + + + + _M_insert_lower(_Base_ptr __x, _Base_ptr __p, const _Val& __v) + + { + bool __insert_left = (__x != 0 || __p == _M_end() + || !_M_impl._M_key_compare(_S_key(__p), + _KeyOfValue()(__v))); + + _Link_type __z = _M_create_node((__v)); + + _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, + this->_M_impl._M_header); + ++_M_impl._M_node_count; + return iterator(__z); + } + + template + + + + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + + + + _M_insert_equal_lower(const _Val& __v) + + { + _Link_type __x = _M_begin(); + _Link_type __y = _M_end(); + while (__x != 0) + { + __y = __x; + __x = !_M_impl._M_key_compare(_S_key(__x), _KeyOfValue()(__v)) ? + _S_left(__x) : _S_right(__x); + } + return _M_insert_lower(__x, __y, (__v)); + } + + template + typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::_Link_type + _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>:: + _M_copy(_Const_Link_type __x, _Link_type __p) + { + + _Link_type __top = _M_clone_node(__x); + __top->_M_parent = __p; + + try + { + if (__x->_M_right) + __top->_M_right = _M_copy(_S_right(__x), __top); + __p = __top; + __x = _S_left(__x); + + while (__x != 0) + { + _Link_type __y = _M_clone_node(__x); + __p->_M_left = __y; + __y->_M_parent = __p; + if (__x->_M_right) + __y->_M_right = _M_copy(_S_right(__x), __y); + __p = __y; + __x = _S_left(__x); + } + } + catch(...) + { + _M_erase(__top); + throw; + } + return __top; + } + + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_erase(_Link_type __x) + { + + while (__x != 0) + { + _M_erase(_S_right(__x)); + _Link_type __y = _S_left(__x); + _M_destroy_node(__x); + __x = __y; + } + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_lower_bound(_Link_type __x, _Link_type __y, + const _Key& __k) + { + while (__x != 0) + if (!_M_impl._M_key_compare(_S_key(__x), __k)) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + return iterator(__y); + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::const_iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_lower_bound(_Const_Link_type __x, _Const_Link_type __y, + const _Key& __k) const + { + while (__x != 0) + if (!_M_impl._M_key_compare(_S_key(__x), __k)) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + return const_iterator(__y); + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_upper_bound(_Link_type __x, _Link_type __y, + const _Key& __k) + { + while (__x != 0) + if (_M_impl._M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + return iterator(__y); + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::const_iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_upper_bound(_Const_Link_type __x, _Const_Link_type __y, + const _Key& __k) const + { + while (__x != 0) + if (_M_impl._M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + return const_iterator(__y); + } + + template + pair::iterator, + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::iterator> + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + equal_range(const _Key& __k) + { + _Link_type __x = _M_begin(); + _Link_type __y = _M_end(); + while (__x != 0) + { + if (_M_impl._M_key_compare(_S_key(__x), __k)) + __x = _S_right(__x); + else if (_M_impl._M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + { + _Link_type __xu(__x), __yu(__y); + __y = __x, __x = _S_left(__x); + __xu = _S_right(__xu); + return pair(_M_lower_bound(__x, __y, __k), + _M_upper_bound(__xu, __yu, __k)); + } + } + return pair(iterator(__y), + iterator(__y)); + } + + template + pair::const_iterator, + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::const_iterator> + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + equal_range(const _Key& __k) const + { + _Const_Link_type __x = _M_begin(); + _Const_Link_type __y = _M_end(); + while (__x != 0) + { + if (_M_impl._M_key_compare(_S_key(__x), __k)) + __x = _S_right(__x); + else if (_M_impl._M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + { + _Const_Link_type __xu(__x), __yu(__y); + __y = __x, __x = _S_left(__x); + __xu = _S_right(__xu); + return pair(_M_lower_bound(__x, __y, __k), + _M_upper_bound(__xu, __yu, __k)); + } + } + return pair(const_iterator(__y), + const_iterator(__y)); + } + + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __t) + { + if (_M_root() == 0) + { + if (__t._M_root() != 0) + { + _M_root() = __t._M_root(); + _M_leftmost() = __t._M_leftmost(); + _M_rightmost() = __t._M_rightmost(); + _M_root()->_M_parent = _M_end(); + + __t._M_root() = 0; + __t._M_leftmost() = __t._M_end(); + __t._M_rightmost() = __t._M_end(); + } + } + else if (__t._M_root() == 0) + { + __t._M_root() = _M_root(); + __t._M_leftmost() = _M_leftmost(); + __t._M_rightmost() = _M_rightmost(); + __t._M_root()->_M_parent = __t._M_end(); + + _M_root() = 0; + _M_leftmost() = _M_end(); + _M_rightmost() = _M_end(); + } + else + { + std::swap(_M_root(),__t._M_root()); + std::swap(_M_leftmost(),__t._M_leftmost()); + std::swap(_M_rightmost(),__t._M_rightmost()); + + _M_root()->_M_parent = _M_end(); + __t._M_root()->_M_parent = __t._M_end(); + } + + std::swap(this->_M_impl._M_node_count, __t._M_impl._M_node_count); + std::swap(this->_M_impl._M_key_compare, __t._M_impl._M_key_compare); + + + + std::__alloc_swap<_Node_allocator>:: + _S_do_it(_M_get_Node_allocator(), __t._M_get_Node_allocator()); + } + + template + + + + pair::iterator, bool> + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + + + + _M_insert_unique(const _Val& __v) + + { + _Link_type __x = _M_begin(); + _Link_type __y = _M_end(); + bool __comp = true; + while (__x != 0) + { + __y = __x; + __comp = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x)); + __x = __comp ? _S_left(__x) : _S_right(__x); + } + iterator __j = iterator(__y); + if (__comp) + { + if (__j == begin()) + return pair + (_M_insert_(__x, __y, (__v)), true); + else + --__j; + } + if (_M_impl._M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v))) + return pair + (_M_insert_(__x, __y, (__v)), true); + return pair(__j, false); + } + + template + + + + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + + + + _M_insert_equal(const _Val& __v) + + { + _Link_type __x = _M_begin(); + _Link_type __y = _M_end(); + while (__x != 0) + { + __y = __x; + __x = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x)) ? + _S_left(__x) : _S_right(__x); + } + return _M_insert_(__x, __y, (__v)); + } + + template + + + + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + + + + _M_insert_unique_(const_iterator __position, const _Val& __v) + + { + + if (__position._M_node == _M_end()) + { + if (size() > 0 + && _M_impl._M_key_compare(_S_key(_M_rightmost()), + _KeyOfValue()(__v))) + return _M_insert_(0, _M_rightmost(), (__v)); + else + return _M_insert_unique((__v)).first; + } + else if (_M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key(__position._M_node))) + { + + const_iterator __before = __position; + if (__position._M_node == _M_leftmost()) + return _M_insert_(_M_leftmost(), _M_leftmost(), + (__v)); + else if (_M_impl._M_key_compare(_S_key((--__before)._M_node), + _KeyOfValue()(__v))) + { + if (_S_right(__before._M_node) == 0) + return _M_insert_(0, __before._M_node, + (__v)); + else + return _M_insert_(__position._M_node, + __position._M_node, + (__v)); + } + else + return _M_insert_unique((__v)).first; + } + else if (_M_impl._M_key_compare(_S_key(__position._M_node), + _KeyOfValue()(__v))) + { + + const_iterator __after = __position; + if (__position._M_node == _M_rightmost()) + return _M_insert_(0, _M_rightmost(), + (__v)); + else if (_M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key((++__after)._M_node))) + { + if (_S_right(__position._M_node) == 0) + return _M_insert_(0, __position._M_node, + (__v)); + else + return _M_insert_(__after._M_node, __after._M_node, + (__v)); + } + else + return _M_insert_unique((__v)).first; + } + else + + return __position._M_const_cast(); + } + + template + + + + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + + + + _M_insert_equal_(const_iterator __position, const _Val& __v) + + { + + if (__position._M_node == _M_end()) + { + if (size() > 0 + && !_M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key(_M_rightmost()))) + return _M_insert_(0, _M_rightmost(), + (__v)); + else + return _M_insert_equal((__v)); + } + else if (!_M_impl._M_key_compare(_S_key(__position._M_node), + _KeyOfValue()(__v))) + { + + const_iterator __before = __position; + if (__position._M_node == _M_leftmost()) + return _M_insert_(_M_leftmost(), _M_leftmost(), + (__v)); + else if (!_M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key((--__before)._M_node))) + { + if (_S_right(__before._M_node) == 0) + return _M_insert_(0, __before._M_node, + (__v)); + else + return _M_insert_(__position._M_node, + __position._M_node, + (__v)); + } + else + return _M_insert_equal((__v)); + } + else + { + + const_iterator __after = __position; + if (__position._M_node == _M_rightmost()) + return _M_insert_(0, _M_rightmost(), + (__v)); + else if (!_M_impl._M_key_compare(_S_key((++__after)._M_node), + _KeyOfValue()(__v))) + { + if (_S_right(__position._M_node) == 0) + return _M_insert_(0, __position._M_node, + (__v)); + else + return _M_insert_(__after._M_node, __after._M_node, + (__v)); + } + else + return _M_insert_equal_lower((__v)); + } + } + + template + template + void + _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: + _M_insert_unique(_II __first, _II __last) + { + for (; __first != __last; ++__first) + _M_insert_unique_(end(), *__first); + } + + template + template + void + _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: + _M_insert_equal(_II __first, _II __last) + { + for (; __first != __last; ++__first) + _M_insert_equal_(end(), *__first); + } + + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_erase_aux(const_iterator __position) + { + _Link_type __y = + static_cast<_Link_type>(_Rb_tree_rebalance_for_erase + (const_cast<_Base_ptr>(__position._M_node), + this->_M_impl._M_header)); + _M_destroy_node(__y); + --_M_impl._M_node_count; + } + + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_erase_aux(const_iterator __first, const_iterator __last) + { + if (__first == begin() && __last == end()) + clear(); + else + while (__first != __last) + erase(__first++); + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(const _Key& __x) + { + pair __p = equal_range(__x); + const size_type __old_size = size(); + erase(__p.first, __p.second); + return __old_size - size(); + } + + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(const _Key* __first, const _Key* __last) + { + while (__first != __last) + erase(*__first++); + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + find(const _Key& __k) + { + iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k); + return (__j == end() + || _M_impl._M_key_compare(__k, + _S_key(__j._M_node))) ? end() : __j; + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::const_iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + find(const _Key& __k) const + { + const_iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k); + return (__j == end() + || _M_impl._M_key_compare(__k, + _S_key(__j._M_node))) ? end() : __j; + } + + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + count(const _Key& __k) const + { + pair __p = equal_range(__k); + const size_type __n = std::distance(__p.first, __p.second); + return __n; + } + + __attribute__ ((__pure__)) unsigned int + _Rb_tree_black_count(const _Rb_tree_node_base* __node, + const _Rb_tree_node_base* __root) throw (); + + template + bool + _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::__rb_verify() const + { + if (_M_impl._M_node_count == 0 || begin() == end()) + return _M_impl._M_node_count == 0 && begin() == end() + && this->_M_impl._M_header._M_left == _M_end() + && this->_M_impl._M_header._M_right == _M_end(); + + unsigned int __len = _Rb_tree_black_count(_M_leftmost(), _M_root()); + for (const_iterator __it = begin(); __it != end(); ++__it) + { + _Const_Link_type __x = static_cast<_Const_Link_type>(__it._M_node); + _Const_Link_type __L = _S_left(__x); + _Const_Link_type __R = _S_right(__x); + + if (__x->_M_color == _S_red) + if ((__L && __L->_M_color == _S_red) + || (__R && __R->_M_color == _S_red)) + return false; + + if (__L && _M_impl._M_key_compare(_S_key(__x), _S_key(__L))) + return false; + if (__R && _M_impl._M_key_compare(_S_key(__R), _S_key(__x))) + return false; + + if (!__L && !__R && _Rb_tree_black_count(__x, _M_root()) != __len) + return false; + } + + if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root())) + return false; + if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root())) + return false; + return true; + } + + +} +# 61 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/map" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 1 3 +# 64 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 86 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + template , + typename _Alloc = std::allocator > > + class map + { + public: + typedef _Key key_type; + typedef _Tp mapped_type; + typedef std::pair value_type; + typedef _Compare key_compare; + typedef _Alloc allocator_type; + + private: + + typedef typename _Alloc::value_type _Alloc_value_type; + + + + + + public: + class value_compare + : public std::binary_function + { + friend class map<_Key, _Tp, _Compare, _Alloc>; + protected: + _Compare comp; + + value_compare(_Compare __c) + : comp(__c) { } + + public: + bool operator()(const value_type& __x, const value_type& __y) const + { return comp(__x.first, __y.first); } + }; + + private: + + typedef typename _Alloc::template rebind::other + _Pair_alloc_type; + + typedef _Rb_tree, + key_compare, _Pair_alloc_type> _Rep_type; + + + _Rep_type _M_t; + + public: + + + typedef typename _Pair_alloc_type::pointer pointer; + typedef typename _Pair_alloc_type::const_pointer const_pointer; + typedef typename _Pair_alloc_type::reference reference; + typedef typename _Pair_alloc_type::const_reference const_reference; + typedef typename _Rep_type::iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + typedef typename _Rep_type::reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; + + + + + + + + map() + : _M_t() { } + + + + + + + explicit + map(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) { } +# 172 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + map(const map& __x) + : _M_t(__x._M_t) { } +# 213 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + template + map(_InputIterator __first, _InputIterator __last) + : _M_t() + { _M_t._M_insert_unique(__first, __last); } +# 229 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + template + map(_InputIterator __first, _InputIterator __last, + const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) + { _M_t._M_insert_unique(__first, __last); } +# 252 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + map& + operator=(const map& __x) + { + _M_t = __x._M_t; + return *this; + } +# 298 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + allocator_type + get_allocator() const + { return _M_t.get_allocator(); } + + + + + + + + iterator + begin() + { return _M_t.begin(); } + + + + + + + const_iterator + begin() const + { return _M_t.begin(); } + + + + + + + iterator + end() + { return _M_t.end(); } + + + + + + + const_iterator + end() const + { return _M_t.end(); } + + + + + + + reverse_iterator + rbegin() + { return _M_t.rbegin(); } + + + + + + + const_reverse_iterator + rbegin() const + { return _M_t.rbegin(); } + + + + + + + reverse_iterator + rend() + { return _M_t.rend(); } + + + + + + + const_reverse_iterator + rend() const + { return _M_t.rend(); } +# 417 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + bool + empty() const + { return _M_t.empty(); } + + + size_type + size() const + { return _M_t.size(); } + + + size_type + max_size() const + { return _M_t.max_size(); } +# 444 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + mapped_type& + operator[](const key_type& __k) + { + + + + iterator __i = lower_bound(__k); + + if (__i == end() || key_comp()(__k, (*__i).first)) + __i = insert(__i, value_type(__k, mapped_type())); + return (*__i).second; + } +# 481 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + mapped_type& + at(const key_type& __k) + { + iterator __i = lower_bound(__k); + if (__i == end() || key_comp()(__k, (*__i).first)) + __throw_out_of_range(("map::at")); + return (*__i).second; + } + + const mapped_type& + at(const key_type& __k) const + { + const_iterator __i = lower_bound(__k); + if (__i == end() || key_comp()(__k, (*__i).first)) + __throw_out_of_range(("map::at")); + return (*__i).second; + } +# 516 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + std::pair + insert(const value_type& __x) + { return _M_t._M_insert_unique(__x); } +# 565 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + iterator + + + + insert(iterator __position, const value_type& __x) + + { return _M_t._M_insert_unique_(__position, __x); } +# 591 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + template + void + insert(_InputIterator __first, _InputIterator __last) + { _M_t._M_insert_unique(__first, __last); } +# 626 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + void + erase(iterator __position) + { _M_t.erase(__position); } +# 642 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + size_type + erase(const key_type& __x) + { return _M_t.erase(__x); } +# 676 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + void + erase(iterator __first, iterator __last) + { _M_t.erase(__first, __last); } +# 692 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + void + swap(map& __x) + { _M_t.swap(__x._M_t); } + + + + + + + + void + clear() + { _M_t.clear(); } + + + + + + + key_compare + key_comp() const + { return _M_t.key_comp(); } + + + + + + value_compare + value_comp() const + { return value_compare(_M_t.key_comp()); } +# 735 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + iterator + find(const key_type& __x) + { return _M_t.find(__x); } +# 750 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + const_iterator + find(const key_type& __x) const + { return _M_t.find(__x); } +# 762 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + size_type + count(const key_type& __x) const + { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } +# 777 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + iterator + lower_bound(const key_type& __x) + { return _M_t.lower_bound(__x); } +# 792 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + const_iterator + lower_bound(const key_type& __x) const + { return _M_t.lower_bound(__x); } + + + + + + + + iterator + upper_bound(const key_type& __x) + { return _M_t.upper_bound(__x); } + + + + + + + + const_iterator + upper_bound(const key_type& __x) const + { return _M_t.upper_bound(__x); } +# 831 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + std::pair + equal_range(const key_type& __x) + { return _M_t.equal_range(__x); } +# 850 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + std::pair + equal_range(const key_type& __x) const + { return _M_t.equal_range(__x); } + + template + friend bool + operator==(const map<_K1, _T1, _C1, _A1>&, + const map<_K1, _T1, _C1, _A1>&); + + template + friend bool + operator<(const map<_K1, _T1, _C1, _A1>&, + const map<_K1, _T1, _C1, _A1>&); + }; +# 875 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + template + inline bool + operator==(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return __x._M_t == __y._M_t; } +# 892 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_map.h" 3 + template + inline bool + operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return __x._M_t < __y._M_t; } + + + template + inline bool + operator!=(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__x == __y); } + + + template + inline bool + operator>(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return __y < __x; } + + + template + inline bool + operator<=(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__y < __x); } + + + template + inline bool + operator>=(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__x < __y); } + + + template + inline void + swap(map<_Key, _Tp, _Compare, _Alloc>& __x, + map<_Key, _Tp, _Compare, _Alloc>& __y) + { __x.swap(__y); } + + +} +# 62 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/map" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multimap.h" 1 3 +# 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multimap.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 85 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multimap.h" 3 + template , + typename _Alloc = std::allocator > > + class multimap + { + public: + typedef _Key key_type; + typedef _Tp mapped_type; + typedef std::pair value_type; + typedef _Compare key_compare; + typedef _Alloc allocator_type; + + private: + + typedef typename _Alloc::value_type _Alloc_value_type; + + + + + + public: + class value_compare + : public std::binary_function + { + friend class multimap<_Key, _Tp, _Compare, _Alloc>; + protected: + _Compare comp; + + value_compare(_Compare __c) + : comp(__c) { } + + public: + bool operator()(const value_type& __x, const value_type& __y) const + { return comp(__x.first, __y.first); } + }; + + private: + + typedef typename _Alloc::template rebind::other + _Pair_alloc_type; + + typedef _Rb_tree, + key_compare, _Pair_alloc_type> _Rep_type; + + _Rep_type _M_t; + + public: + + + typedef typename _Pair_alloc_type::pointer pointer; + typedef typename _Pair_alloc_type::const_pointer const_pointer; + typedef typename _Pair_alloc_type::reference reference; + typedef typename _Pair_alloc_type::const_reference const_reference; + typedef typename _Rep_type::iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + typedef typename _Rep_type::reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; + + + + + + + multimap() + : _M_t() { } + + + + + + + explicit + multimap(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) { } +# 170 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multimap.h" 3 + multimap(const multimap& __x) + : _M_t(__x._M_t) { } +# 210 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multimap.h" 3 + template + multimap(_InputIterator __first, _InputIterator __last) + : _M_t() + { _M_t._M_insert_equal(__first, __last); } +# 226 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multimap.h" 3 + template + multimap(_InputIterator __first, _InputIterator __last, + const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) + { _M_t._M_insert_equal(__first, __last); } +# 249 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multimap.h" 3 + multimap& + operator=(const multimap& __x) + { + _M_t = __x._M_t; + return *this; + } +# 295 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multimap.h" 3 + allocator_type + get_allocator() const + { return _M_t.get_allocator(); } + + + + + + + + iterator + begin() + { return _M_t.begin(); } + + + + + + + const_iterator + begin() const + { return _M_t.begin(); } + + + + + + + iterator + end() + { return _M_t.end(); } + + + + + + + const_iterator + end() const + { return _M_t.end(); } + + + + + + + reverse_iterator + rbegin() + { return _M_t.rbegin(); } + + + + + + + const_reverse_iterator + rbegin() const + { return _M_t.rbegin(); } + + + + + + + reverse_iterator + rend() + { return _M_t.rend(); } + + + + + + + const_reverse_iterator + rend() const + { return _M_t.rend(); } +# 412 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multimap.h" 3 + bool + empty() const + { return _M_t.empty(); } + + + size_type + size() const + { return _M_t.size(); } + + + size_type + max_size() const + { return _M_t.max_size(); } +# 439 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multimap.h" 3 + iterator + insert(const value_type& __x) + { return _M_t._M_insert_equal(__x); } +# 472 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multimap.h" 3 + iterator + + + + insert(iterator __position, const value_type& __x) + + { return _M_t._M_insert_equal_(__position, __x); } +# 499 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multimap.h" 3 + template + void + insert(_InputIterator __first, _InputIterator __last) + { _M_t._M_insert_equal(__first, __last); } +# 547 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multimap.h" 3 + void + erase(iterator __position) + { _M_t.erase(__position); } +# 563 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multimap.h" 3 + size_type + erase(const key_type& __x) + { return _M_t.erase(__x); } +# 601 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multimap.h" 3 + void + erase(iterator __first, iterator __last) + { _M_t.erase(__first, __last); } +# 617 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multimap.h" 3 + void + swap(multimap& __x) + { _M_t.swap(__x._M_t); } + + + + + + + + void + clear() + { _M_t.clear(); } + + + + + + + key_compare + key_comp() const + { return _M_t.key_comp(); } + + + + + + value_compare + value_comp() const + { return value_compare(_M_t.key_comp()); } +# 660 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multimap.h" 3 + iterator + find(const key_type& __x) + { return _M_t.find(__x); } +# 675 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multimap.h" 3 + const_iterator + find(const key_type& __x) const + { return _M_t.find(__x); } + + + + + + + size_type + count(const key_type& __x) const + { return _M_t.count(__x); } +# 699 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multimap.h" 3 + iterator + lower_bound(const key_type& __x) + { return _M_t.lower_bound(__x); } +# 714 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multimap.h" 3 + const_iterator + lower_bound(const key_type& __x) const + { return _M_t.lower_bound(__x); } + + + + + + + + iterator + upper_bound(const key_type& __x) + { return _M_t.upper_bound(__x); } + + + + + + + + const_iterator + upper_bound(const key_type& __x) const + { return _M_t.upper_bound(__x); } +# 751 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multimap.h" 3 + std::pair + equal_range(const key_type& __x) + { return _M_t.equal_range(__x); } +# 768 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multimap.h" 3 + std::pair + equal_range(const key_type& __x) const + { return _M_t.equal_range(__x); } + + template + friend bool + operator==(const multimap<_K1, _T1, _C1, _A1>&, + const multimap<_K1, _T1, _C1, _A1>&); + + template + friend bool + operator<(const multimap<_K1, _T1, _C1, _A1>&, + const multimap<_K1, _T1, _C1, _A1>&); + }; +# 793 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multimap.h" 3 + template + inline bool + operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return __x._M_t == __y._M_t; } +# 810 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multimap.h" 3 + template + inline bool + operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return __x._M_t < __y._M_t; } + + + template + inline bool + operator!=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__x == __y); } + + + template + inline bool + operator>(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return __y < __x; } + + + template + inline bool + operator<=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__y < __x); } + + + template + inline bool + operator>=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__x < __y); } + + + template + inline void + swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x, + multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { __x.swap(__y); } + + +} +# 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/map" 2 3 +# 93 "../boost/detail/container_fwd.hpp" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/set" 1 3 +# 58 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/set" 3 + +# 59 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/set" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_set.h" 1 3 +# 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_set.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 87 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_set.h" 3 + template, + typename _Alloc = std::allocator<_Key> > + class set + { + + typedef typename _Alloc::value_type _Alloc_value_type; + + + + + + public: + + + + typedef _Key key_type; + typedef _Key value_type; + typedef _Compare key_compare; + typedef _Compare value_compare; + typedef _Alloc allocator_type; + + + private: + typedef typename _Alloc::template rebind<_Key>::other _Key_alloc_type; + + typedef _Rb_tree, + key_compare, _Key_alloc_type> _Rep_type; + _Rep_type _M_t; + + public: + + + typedef typename _Key_alloc_type::pointer pointer; + typedef typename _Key_alloc_type::const_pointer const_pointer; + typedef typename _Key_alloc_type::reference reference; + typedef typename _Key_alloc_type::const_reference const_reference; + + + + typedef typename _Rep_type::const_iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::const_reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + + + + + + + set() + : _M_t() { } + + + + + + + explicit + set(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) { } +# 160 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_set.h" 3 + template + set(_InputIterator __first, _InputIterator __last) + : _M_t() + { _M_t._M_insert_unique(__first, __last); } +# 176 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_set.h" 3 + template + set(_InputIterator __first, _InputIterator __last, + const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) + { _M_t._M_insert_unique(__first, __last); } +# 190 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_set.h" 3 + set(const set& __x) + : _M_t(__x._M_t) { } +# 228 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_set.h" 3 + set& + operator=(const set& __x) + { + _M_t = __x._M_t; + return *this; + } +# 276 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_set.h" 3 + key_compare + key_comp() const + { return _M_t.key_comp(); } + + value_compare + value_comp() const + { return _M_t.key_comp(); } + + allocator_type + get_allocator() const + { return _M_t.get_allocator(); } + + + + + + + iterator + begin() const + { return _M_t.begin(); } + + + + + + + iterator + end() const + { return _M_t.end(); } + + + + + + + reverse_iterator + rbegin() const + { return _M_t.rbegin(); } + + + + + + + reverse_iterator + rend() const + { return _M_t.rend(); } +# 363 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_set.h" 3 + bool + empty() const + { return _M_t.empty(); } + + + size_type + size() const + { return _M_t.size(); } + + + size_type + max_size() const + { return _M_t.max_size(); } +# 388 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_set.h" 3 + void + swap(set& __x) + { _M_t.swap(__x._M_t); } +# 406 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_set.h" 3 + std::pair + insert(const value_type& __x) + { + std::pair __p = + _M_t._M_insert_unique(__x); + return std::pair(__p.first, __p.second); + } +# 443 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_set.h" 3 + iterator + insert(const_iterator __position, const value_type& __x) + { return _M_t._M_insert_unique_(__position, __x); } +# 462 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_set.h" 3 + template + void + insert(_InputIterator __first, _InputIterator __last) + { _M_t._M_insert_unique(__first, __last); } +# 510 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_set.h" 3 + void + erase(iterator __position) + { _M_t.erase(__position); } +# 526 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_set.h" 3 + size_type + erase(const key_type& __x) + { return _M_t.erase(__x); } +# 560 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_set.h" 3 + void + erase(iterator __first, iterator __last) + { _M_t.erase(__first, __last); } +# 571 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_set.h" 3 + void + clear() + { _M_t.clear(); } +# 585 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_set.h" 3 + size_type + count(const key_type& __x) const + { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } +# 603 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_set.h" 3 + iterator + find(const key_type& __x) + { return _M_t.find(__x); } + + const_iterator + find(const key_type& __x) const + { return _M_t.find(__x); } +# 624 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_set.h" 3 + iterator + lower_bound(const key_type& __x) + { return _M_t.lower_bound(__x); } + + const_iterator + lower_bound(const key_type& __x) const + { return _M_t.lower_bound(__x); } +# 640 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_set.h" 3 + iterator + upper_bound(const key_type& __x) + { return _M_t.upper_bound(__x); } + + const_iterator + upper_bound(const key_type& __x) const + { return _M_t.upper_bound(__x); } +# 665 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_set.h" 3 + std::pair + equal_range(const key_type& __x) + { return _M_t.equal_range(__x); } + + std::pair + equal_range(const key_type& __x) const + { return _M_t.equal_range(__x); } + + + template + friend bool + operator==(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&); + + template + friend bool + operator<(const set<_K1, _C1, _A1>&, const set<_K1, _C1, _A1>&); + }; +# 694 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_set.h" 3 + template + inline bool + operator==(const set<_Key, _Compare, _Alloc>& __x, + const set<_Key, _Compare, _Alloc>& __y) + { return __x._M_t == __y._M_t; } +# 711 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_set.h" 3 + template + inline bool + operator<(const set<_Key, _Compare, _Alloc>& __x, + const set<_Key, _Compare, _Alloc>& __y) + { return __x._M_t < __y._M_t; } + + + template + inline bool + operator!=(const set<_Key, _Compare, _Alloc>& __x, + const set<_Key, _Compare, _Alloc>& __y) + { return !(__x == __y); } + + + template + inline bool + operator>(const set<_Key, _Compare, _Alloc>& __x, + const set<_Key, _Compare, _Alloc>& __y) + { return __y < __x; } + + + template + inline bool + operator<=(const set<_Key, _Compare, _Alloc>& __x, + const set<_Key, _Compare, _Alloc>& __y) + { return !(__y < __x); } + + + template + inline bool + operator>=(const set<_Key, _Compare, _Alloc>& __x, + const set<_Key, _Compare, _Alloc>& __y) + { return !(__x < __y); } + + + template + inline void + swap(set<_Key, _Compare, _Alloc>& __x, set<_Key, _Compare, _Alloc>& __y) + { __x.swap(__y); } + + +} +# 62 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/set" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multiset.h" 1 3 +# 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multiset.h" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 84 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multiset.h" 3 + template , + typename _Alloc = std::allocator<_Key> > + class multiset + { + + typedef typename _Alloc::value_type _Alloc_value_type; + + + + + + public: + + typedef _Key key_type; + typedef _Key value_type; + typedef _Compare key_compare; + typedef _Compare value_compare; + typedef _Alloc allocator_type; + + private: + + typedef typename _Alloc::template rebind<_Key>::other _Key_alloc_type; + + typedef _Rb_tree, + key_compare, _Key_alloc_type> _Rep_type; + + _Rep_type _M_t; + + public: + typedef typename _Key_alloc_type::pointer pointer; + typedef typename _Key_alloc_type::const_pointer const_pointer; + typedef typename _Key_alloc_type::reference reference; + typedef typename _Key_alloc_type::const_reference const_reference; + + + + typedef typename _Rep_type::const_iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::const_reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + + + + + + multiset() + : _M_t() { } + + + + + + + explicit + multiset(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) { } +# 153 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multiset.h" 3 + template + multiset(_InputIterator __first, _InputIterator __last) + : _M_t() + { _M_t._M_insert_equal(__first, __last); } +# 169 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multiset.h" 3 + template + multiset(_InputIterator __first, _InputIterator __last, + const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) + { _M_t._M_insert_equal(__first, __last); } +# 183 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multiset.h" 3 + multiset(const multiset& __x) + : _M_t(__x._M_t) { } +# 221 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multiset.h" 3 + multiset& + operator=(const multiset& __x) + { + _M_t = __x._M_t; + return *this; + } +# 269 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multiset.h" 3 + key_compare + key_comp() const + { return _M_t.key_comp(); } + + value_compare + value_comp() const + { return _M_t.key_comp(); } + + allocator_type + get_allocator() const + { return _M_t.get_allocator(); } + + + + + + + iterator + begin() const + { return _M_t.begin(); } + + + + + + + iterator + end() const + { return _M_t.end(); } + + + + + + + reverse_iterator + rbegin() const + { return _M_t.rbegin(); } + + + + + + + reverse_iterator + rend() const + { return _M_t.rend(); } +# 356 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multiset.h" 3 + bool + empty() const + { return _M_t.empty(); } + + + size_type + size() const + { return _M_t.size(); } + + + size_type + max_size() const + { return _M_t.max_size(); } +# 381 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multiset.h" 3 + void + swap(multiset& __x) + { _M_t.swap(__x._M_t); } +# 397 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multiset.h" 3 + iterator + insert(const value_type& __x) + { return _M_t._M_insert_equal(__x); } +# 427 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multiset.h" 3 + iterator + insert(const_iterator __position, const value_type& __x) + { return _M_t._M_insert_equal_(__position, __x); } +# 445 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multiset.h" 3 + template + void + insert(_InputIterator __first, _InputIterator __last) + { _M_t._M_insert_equal(__first, __last); } +# 493 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multiset.h" 3 + void + erase(iterator __position) + { _M_t.erase(__position); } +# 509 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multiset.h" 3 + size_type + erase(const key_type& __x) + { return _M_t.erase(__x); } +# 545 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multiset.h" 3 + void + erase(iterator __first, iterator __last) + { _M_t.erase(__first, __last); } +# 556 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multiset.h" 3 + void + clear() + { _M_t.clear(); } +# 567 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multiset.h" 3 + size_type + count(const key_type& __x) const + { return _M_t.count(__x); } +# 585 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multiset.h" 3 + iterator + find(const key_type& __x) + { return _M_t.find(__x); } + + const_iterator + find(const key_type& __x) const + { return _M_t.find(__x); } +# 606 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multiset.h" 3 + iterator + lower_bound(const key_type& __x) + { return _M_t.lower_bound(__x); } + + const_iterator + lower_bound(const key_type& __x) const + { return _M_t.lower_bound(__x); } +# 622 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multiset.h" 3 + iterator + upper_bound(const key_type& __x) + { return _M_t.upper_bound(__x); } + + const_iterator + upper_bound(const key_type& __x) const + { return _M_t.upper_bound(__x); } +# 647 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multiset.h" 3 + std::pair + equal_range(const key_type& __x) + { return _M_t.equal_range(__x); } + + std::pair + equal_range(const key_type& __x) const + { return _M_t.equal_range(__x); } + + template + friend bool + operator==(const multiset<_K1, _C1, _A1>&, + const multiset<_K1, _C1, _A1>&); + + template + friend bool + operator< (const multiset<_K1, _C1, _A1>&, + const multiset<_K1, _C1, _A1>&); + }; +# 677 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multiset.h" 3 + template + inline bool + operator==(const multiset<_Key, _Compare, _Alloc>& __x, + const multiset<_Key, _Compare, _Alloc>& __y) + { return __x._M_t == __y._M_t; } +# 694 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/stl_multiset.h" 3 + template + inline bool + operator<(const multiset<_Key, _Compare, _Alloc>& __x, + const multiset<_Key, _Compare, _Alloc>& __y) + { return __x._M_t < __y._M_t; } + + + template + inline bool + operator!=(const multiset<_Key, _Compare, _Alloc>& __x, + const multiset<_Key, _Compare, _Alloc>& __y) + { return !(__x == __y); } + + + template + inline bool + operator>(const multiset<_Key,_Compare,_Alloc>& __x, + const multiset<_Key,_Compare,_Alloc>& __y) + { return __y < __x; } + + + template + inline bool + operator<=(const multiset<_Key, _Compare, _Alloc>& __x, + const multiset<_Key, _Compare, _Alloc>& __y) + { return !(__y < __x); } + + + template + inline bool + operator>=(const multiset<_Key, _Compare, _Alloc>& __x, + const multiset<_Key, _Compare, _Alloc>& __y) + { return !(__x < __y); } + + + template + inline void + swap(multiset<_Key, _Compare, _Alloc>& __x, + multiset<_Key, _Compare, _Alloc>& __y) + { __x.swap(__y); } + + +} +# 63 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/set" 2 3 +# 94 "../boost/detail/container_fwd.hpp" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bitset" 1 3 +# 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bitset" 3 + +# 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bitset" 3 +# 62 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bitset" 3 +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + + + + + + + template + struct _Base_bitset + { + typedef unsigned long _WordT; + + + _WordT _M_w[_Nw]; + + _Base_bitset() + : _M_w() { } +# 91 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bitset" 3 + _Base_bitset(unsigned long __val) + : _M_w() + { _M_w[0] = __val; } + + + static size_t + _S_whichword(size_t __pos ) + { return __pos / (8 * 8); } + + static size_t + _S_whichbyte(size_t __pos ) + { return (__pos % (8 * 8)) / 8; } + + static size_t + _S_whichbit(size_t __pos ) + { return __pos % (8 * 8); } + + static _WordT + _S_maskbit(size_t __pos ) + { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); } + + _WordT& + _M_getword(size_t __pos) + { return _M_w[_S_whichword(__pos)]; } + + _WordT + _M_getword(size_t __pos) const + { return _M_w[_S_whichword(__pos)]; } + + + + + + + + _WordT& + _M_hiword() + { return _M_w[_Nw - 1]; } + + _WordT + _M_hiword() const + { return _M_w[_Nw - 1]; } + + void + _M_do_and(const _Base_bitset<_Nw>& __x) + { + for (size_t __i = 0; __i < _Nw; __i++) + _M_w[__i] &= __x._M_w[__i]; + } + + void + _M_do_or(const _Base_bitset<_Nw>& __x) + { + for (size_t __i = 0; __i < _Nw; __i++) + _M_w[__i] |= __x._M_w[__i]; + } + + void + _M_do_xor(const _Base_bitset<_Nw>& __x) + { + for (size_t __i = 0; __i < _Nw; __i++) + _M_w[__i] ^= __x._M_w[__i]; + } + + void + _M_do_left_shift(size_t __shift); + + void + _M_do_right_shift(size_t __shift); + + void + _M_do_flip() + { + for (size_t __i = 0; __i < _Nw; __i++) + _M_w[__i] = ~_M_w[__i]; + } + + void + _M_do_set() + { + for (size_t __i = 0; __i < _Nw; __i++) + _M_w[__i] = ~static_cast<_WordT>(0); + } + + void + _M_do_reset() + { __builtin_memset(_M_w, 0, _Nw * sizeof(_WordT)); } + + bool + _M_is_equal(const _Base_bitset<_Nw>& __x) const + { + for (size_t __i = 0; __i < _Nw; ++__i) + if (_M_w[__i] != __x._M_w[__i]) + return false; + return true; + } + + size_t + _M_are_all_aux() const + { + for (size_t __i = 0; __i < _Nw - 1; __i++) + if (_M_w[__i] != ~static_cast<_WordT>(0)) + return 0; + return ((_Nw - 1) * (8 * 8) + + __builtin_popcountl(_M_hiword())); + } + + bool + _M_is_any() const + { + for (size_t __i = 0; __i < _Nw; __i++) + if (_M_w[__i] != static_cast<_WordT>(0)) + return true; + return false; + } + + size_t + _M_do_count() const + { + size_t __result = 0; + for (size_t __i = 0; __i < _Nw; __i++) + __result += __builtin_popcountl(_M_w[__i]); + return __result; + } + + unsigned long + _M_do_to_ulong() const; + + + + + + + + size_t + _M_do_find_first(size_t __not_found) const; + + + size_t + _M_do_find_next(size_t __prev, size_t __not_found) const; + }; + + + template + void + _Base_bitset<_Nw>::_M_do_left_shift(size_t __shift) + { + if (__builtin_expect(__shift != 0, 1)) + { + const size_t __wshift = __shift / (8 * 8); + const size_t __offset = __shift % (8 * 8); + + if (__offset == 0) + for (size_t __n = _Nw - 1; __n >= __wshift; --__n) + _M_w[__n] = _M_w[__n - __wshift]; + else + { + const size_t __sub_offset = ((8 * 8) + - __offset); + for (size_t __n = _Nw - 1; __n > __wshift; --__n) + _M_w[__n] = ((_M_w[__n - __wshift] << __offset) + | (_M_w[__n - __wshift - 1] >> __sub_offset)); + _M_w[__wshift] = _M_w[0] << __offset; + } + + std::fill(_M_w + 0, _M_w + __wshift, static_cast<_WordT>(0)); + } + } + + template + void + _Base_bitset<_Nw>::_M_do_right_shift(size_t __shift) + { + if (__builtin_expect(__shift != 0, 1)) + { + const size_t __wshift = __shift / (8 * 8); + const size_t __offset = __shift % (8 * 8); + const size_t __limit = _Nw - __wshift - 1; + + if (__offset == 0) + for (size_t __n = 0; __n <= __limit; ++__n) + _M_w[__n] = _M_w[__n + __wshift]; + else + { + const size_t __sub_offset = ((8 * 8) + - __offset); + for (size_t __n = 0; __n < __limit; ++__n) + _M_w[__n] = ((_M_w[__n + __wshift] >> __offset) + | (_M_w[__n + __wshift + 1] << __sub_offset)); + _M_w[__limit] = _M_w[_Nw-1] >> __offset; + } + + std::fill(_M_w + __limit + 1, _M_w + _Nw, static_cast<_WordT>(0)); + } + } + + template + unsigned long + _Base_bitset<_Nw>::_M_do_to_ulong() const + { + for (size_t __i = 1; __i < _Nw; ++__i) + if (_M_w[__i]) + __throw_overflow_error(("_Base_bitset::_M_do_to_ulong")); + return _M_w[0]; + } +# 314 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bitset" 3 + template + size_t + _Base_bitset<_Nw>::_M_do_find_first(size_t __not_found) const + { + for (size_t __i = 0; __i < _Nw; __i++) + { + _WordT __thisword = _M_w[__i]; + if (__thisword != static_cast<_WordT>(0)) + return (__i * (8 * 8) + + __builtin_ctzl(__thisword)); + } + + return __not_found; + } + + template + size_t + _Base_bitset<_Nw>::_M_do_find_next(size_t __prev, size_t __not_found) const + { + + ++__prev; + + + if (__prev >= _Nw * (8 * 8)) + return __not_found; + + + size_t __i = _S_whichword(__prev); + _WordT __thisword = _M_w[__i]; + + + __thisword &= (~static_cast<_WordT>(0)) << _S_whichbit(__prev); + + if (__thisword != static_cast<_WordT>(0)) + return (__i * (8 * 8) + + __builtin_ctzl(__thisword)); + + + __i++; + for (; __i < _Nw; __i++) + { + __thisword = _M_w[__i]; + if (__thisword != static_cast<_WordT>(0)) + return (__i * (8 * 8) + + __builtin_ctzl(__thisword)); + } + + return __not_found; + } + + + + + + + template<> + struct _Base_bitset<1> + { + typedef unsigned long _WordT; + _WordT _M_w; + + _Base_bitset() + : _M_w(0) + { } + + + + + _Base_bitset(unsigned long __val) + + : _M_w(__val) + { } + + static size_t + _S_whichword(size_t __pos ) + { return __pos / (8 * 8); } + + static size_t + _S_whichbyte(size_t __pos ) + { return (__pos % (8 * 8)) / 8; } + + static size_t + _S_whichbit(size_t __pos ) + { return __pos % (8 * 8); } + + static _WordT + _S_maskbit(size_t __pos ) + { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); } + + _WordT& + _M_getword(size_t) + { return _M_w; } + + _WordT + _M_getword(size_t) const + { return _M_w; } + + + + + + + + _WordT& + _M_hiword() + { return _M_w; } + + _WordT + _M_hiword() const + { return _M_w; } + + void + _M_do_and(const _Base_bitset<1>& __x) + { _M_w &= __x._M_w; } + + void + _M_do_or(const _Base_bitset<1>& __x) + { _M_w |= __x._M_w; } + + void + _M_do_xor(const _Base_bitset<1>& __x) + { _M_w ^= __x._M_w; } + + void + _M_do_left_shift(size_t __shift) + { _M_w <<= __shift; } + + void + _M_do_right_shift(size_t __shift) + { _M_w >>= __shift; } + + void + _M_do_flip() + { _M_w = ~_M_w; } + + void + _M_do_set() + { _M_w = ~static_cast<_WordT>(0); } + + void + _M_do_reset() + { _M_w = 0; } + + bool + _M_is_equal(const _Base_bitset<1>& __x) const + { return _M_w == __x._M_w; } + + size_t + _M_are_all_aux() const + { return __builtin_popcountl(_M_w); } + + bool + _M_is_any() const + { return _M_w != 0; } + + size_t + _M_do_count() const + { return __builtin_popcountl(_M_w); } + + unsigned long + _M_do_to_ulong() const + { return _M_w; } + + + + + + + + size_t + _M_do_find_first(size_t __not_found) const + { + if (_M_w != 0) + return __builtin_ctzl(_M_w); + else + return __not_found; + } + + + size_t + _M_do_find_next(size_t __prev, size_t __not_found) const + { + ++__prev; + if (__prev >= ((size_t) (8 * 8))) + return __not_found; + + _WordT __x = _M_w >> __prev; + if (__x != 0) + return __builtin_ctzl(__x) + __prev; + else + return __not_found; + } + }; + + + + + + + template<> + struct _Base_bitset<0> + { + typedef unsigned long _WordT; + + _Base_bitset() + { } + + + + + _Base_bitset(unsigned long) + + { } + + static size_t + _S_whichword(size_t __pos ) + { return __pos / (8 * 8); } + + static size_t + _S_whichbyte(size_t __pos ) + { return (__pos % (8 * 8)) / 8; } + + static size_t + _S_whichbit(size_t __pos ) + { return __pos % (8 * 8); } + + static _WordT + _S_maskbit(size_t __pos ) + { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); } +# 551 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bitset" 3 + _WordT& + _M_getword(size_t) + { + __throw_out_of_range(("_Base_bitset::_M_getword")); + return *new _WordT; + } + + _WordT + _M_getword(size_t __pos) const + { return 0; } + + _WordT + _M_hiword() const + { return 0; } + + void + _M_do_and(const _Base_bitset<0>&) + { } + + void + _M_do_or(const _Base_bitset<0>&) + { } + + void + _M_do_xor(const _Base_bitset<0>&) + { } + + void + _M_do_left_shift(size_t) + { } + + void + _M_do_right_shift(size_t) + { } + + void + _M_do_flip() + { } + + void + _M_do_set() + { } + + void + _M_do_reset() + { } + + + + + bool + _M_is_equal(const _Base_bitset<0>&) const + { return true; } + + size_t + _M_are_all_aux() const + { return 0; } + + bool + _M_is_any() const + { return false; } + + size_t + _M_do_count() const + { return 0; } + + unsigned long + _M_do_to_ulong() const + { return 0; } +# 629 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bitset" 3 + size_t + _M_do_find_first(size_t) const + { return 0; } + + size_t + _M_do_find_next(size_t, size_t) const + { return 0; } + }; + + + + template + struct _Sanitize + { + typedef unsigned long _WordT; + + static void + _S_do_sanitize(_WordT& __val) + { __val &= ~((~static_cast<_WordT>(0)) << _Extrabits); } + }; + + template<> + struct _Sanitize<0> + { + typedef unsigned long _WordT; + + static void + _S_do_sanitize(_WordT) { } + }; +# 741 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bitset" 3 + template + class bitset + : private _Base_bitset<((_Nb) / (8 * 8) + ((_Nb) % (8 * 8) == 0 ? 0 : 1))> + { + private: + typedef _Base_bitset<((_Nb) / (8 * 8) + ((_Nb) % (8 * 8) == 0 ? 0 : 1))> _Base; + typedef unsigned long _WordT; + + void + _M_do_sanitize() + { + typedef _Sanitize<_Nb % (8 * 8)> __sanitize_type; + __sanitize_type::_S_do_sanitize(this->_M_hiword()); + } + + + + + + public: +# 773 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bitset" 3 + class reference + { + friend class bitset; + + _WordT* _M_wp; + size_t _M_bpos; + + + reference(); + + public: + reference(bitset& __b, size_t __pos) + { + _M_wp = &__b._M_getword(__pos); + _M_bpos = _Base::_S_whichbit(__pos); + } + + ~reference() + { } + + + reference& + operator=(bool __x) + { + if (__x) + *_M_wp |= _Base::_S_maskbit(_M_bpos); + else + *_M_wp &= ~_Base::_S_maskbit(_M_bpos); + return *this; + } + + + reference& + operator=(const reference& __j) + { + if ((*(__j._M_wp) & _Base::_S_maskbit(__j._M_bpos))) + *_M_wp |= _Base::_S_maskbit(_M_bpos); + else + *_M_wp &= ~_Base::_S_maskbit(_M_bpos); + return *this; + } + + + bool + operator~() const + { return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) == 0; } + + + operator bool() const + { return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) != 0; } + + + reference& + flip() + { + *_M_wp ^= _Base::_S_maskbit(_M_bpos); + return *this; + } + }; + friend class reference; + + + + bitset() + { } + + + + + + + bitset(unsigned long __val) + : _Base(__val) + { _M_do_sanitize(); } +# 858 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bitset" 3 + template + explicit + bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s, + size_t __position = 0) + : _Base() + { + if (__position > __s.size()) + __throw_out_of_range(("bitset::bitset initial position " "not valid") + ); + _M_copy_from_string(__s, __position, + std::basic_string<_CharT, _Traits, _Alloc>::npos, + _CharT('0'), _CharT('1')); + } +# 881 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bitset" 3 + template + bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s, + size_t __position, size_t __n) + : _Base() + { + if (__position > __s.size()) + __throw_out_of_range(("bitset::bitset initial position " "not valid") + ); + _M_copy_from_string(__s, __position, __n, _CharT('0'), _CharT('1')); + } + + + + template + bitset(const std::basic_string<_CharT, _Traits, _Alloc>& __s, + size_t __position, size_t __n, + _CharT __zero, _CharT __one = _CharT('1')) + : _Base() + { + if (__position > __s.size()) + __throw_out_of_range(("bitset::bitset initial position " "not valid") + ); + _M_copy_from_string(__s, __position, __n, __zero, __one); + } +# 943 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bitset" 3 + bitset<_Nb>& + operator&=(const bitset<_Nb>& __rhs) + { + this->_M_do_and(__rhs); + return *this; + } + + bitset<_Nb>& + operator|=(const bitset<_Nb>& __rhs) + { + this->_M_do_or(__rhs); + return *this; + } + + bitset<_Nb>& + operator^=(const bitset<_Nb>& __rhs) + { + this->_M_do_xor(__rhs); + return *this; + } +# 972 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bitset" 3 + bitset<_Nb>& + operator<<=(size_t __position) + { + if (__builtin_expect(__position < _Nb, 1)) + { + this->_M_do_left_shift(__position); + this->_M_do_sanitize(); + } + else + this->_M_do_reset(); + return *this; + } + + bitset<_Nb>& + operator>>=(size_t __position) + { + if (__builtin_expect(__position < _Nb, 1)) + { + this->_M_do_right_shift(__position); + this->_M_do_sanitize(); + } + else + this->_M_do_reset(); + return *this; + } +# 1005 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bitset" 3 + bitset<_Nb>& + _Unchecked_set(size_t __pos) + { + this->_M_getword(__pos) |= _Base::_S_maskbit(__pos); + return *this; + } + + bitset<_Nb>& + _Unchecked_set(size_t __pos, int __val) + { + if (__val) + this->_M_getword(__pos) |= _Base::_S_maskbit(__pos); + else + this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos); + return *this; + } + + bitset<_Nb>& + _Unchecked_reset(size_t __pos) + { + this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos); + return *this; + } + + bitset<_Nb>& + _Unchecked_flip(size_t __pos) + { + this->_M_getword(__pos) ^= _Base::_S_maskbit(__pos); + return *this; + } + + bool + _Unchecked_test(size_t __pos) const + { return ((this->_M_getword(__pos) & _Base::_S_maskbit(__pos)) + != static_cast<_WordT>(0)); } + + + + + + + bitset<_Nb>& + set() + { + this->_M_do_set(); + this->_M_do_sanitize(); + return *this; + } + + + + + + + + bitset<_Nb>& + set(size_t __position, bool __val = true) + { + if (__position >= _Nb) + __throw_out_of_range(("bitset::set")); + return _Unchecked_set(__position, __val); + } + + + + + bitset<_Nb>& + reset() + { + this->_M_do_reset(); + return *this; + } +# 1085 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bitset" 3 + bitset<_Nb>& + reset(size_t __position) + { + if (__position >= _Nb) + __throw_out_of_range(("bitset::reset")); + return _Unchecked_reset(__position); + } + + + + + bitset<_Nb>& + flip() + { + this->_M_do_flip(); + this->_M_do_sanitize(); + return *this; + } + + + + + + + bitset<_Nb>& + flip(size_t __position) + { + if (__position >= _Nb) + __throw_out_of_range(("bitset::flip")); + return _Unchecked_flip(__position); + } + + + bitset<_Nb> + operator~() const + { return bitset<_Nb>(*this).flip(); } +# 1137 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bitset" 3 + reference + operator[](size_t __position) + { return reference(*this, __position); } + + bool + operator[](size_t __position) const + { return _Unchecked_test(__position); } +# 1152 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bitset" 3 + unsigned long + to_ulong() const + { return this->_M_do_to_ulong(); } +# 1170 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bitset" 3 + template + std::basic_string<_CharT, _Traits, _Alloc> + to_string() const + { + std::basic_string<_CharT, _Traits, _Alloc> __result; + _M_copy_to_string(__result, _CharT('0'), _CharT('1')); + return __result; + } + + + + template + std::basic_string<_CharT, _Traits, _Alloc> + to_string(_CharT __zero, _CharT __one = _CharT('1')) const + { + std::basic_string<_CharT, _Traits, _Alloc> __result; + _M_copy_to_string(__result, __zero, __one); + return __result; + } + + + + template + std::basic_string<_CharT, _Traits, std::allocator<_CharT> > + to_string() const + { return to_string<_CharT, _Traits, std::allocator<_CharT> >(); } + + + + template + std::basic_string<_CharT, _Traits, std::allocator<_CharT> > + to_string(_CharT __zero, _CharT __one = _CharT('1')) const + { return to_string<_CharT, _Traits, + std::allocator<_CharT> >(__zero, __one); } + + template + std::basic_string<_CharT, std::char_traits<_CharT>, + std::allocator<_CharT> > + to_string() const + { + return to_string<_CharT, std::char_traits<_CharT>, + std::allocator<_CharT> >(); + } + + template + std::basic_string<_CharT, std::char_traits<_CharT>, + std::allocator<_CharT> > + to_string(_CharT __zero, _CharT __one = _CharT('1')) const + { + return to_string<_CharT, std::char_traits<_CharT>, + std::allocator<_CharT> >(__zero, __one); + } + + std::basic_string, std::allocator > + to_string() const + { + return to_string, + std::allocator >(); + } + + std::basic_string, std::allocator > + to_string(char __zero, char __one = '1') const + { + return to_string, + std::allocator >(__zero, __one); + } + + + template + void + _M_copy_from_ptr(const _CharT*, size_t, size_t, size_t, + _CharT, _CharT); + + template + void + _M_copy_from_string(const std::basic_string<_CharT, + _Traits, _Alloc>& __s, size_t __pos, size_t __n, + _CharT __zero, _CharT __one) + { _M_copy_from_ptr<_CharT, _Traits>(__s.data(), __s.size(), __pos, __n, + __zero, __one); } + + template + void + _M_copy_to_string(std::basic_string<_CharT, _Traits, _Alloc>&, + _CharT, _CharT) const; + + + template + void + _M_copy_from_string(const std::basic_string<_CharT, + _Traits, _Alloc>& __s, size_t __pos, size_t __n) + { _M_copy_from_string(__s, __pos, __n, _CharT('0'), _CharT('1')); } + + template + void + _M_copy_to_string(std::basic_string<_CharT, _Traits,_Alloc>& __s) const + { _M_copy_to_string(__s, _CharT('0'), _CharT('1')); } + + + size_t + count() const + { return this->_M_do_count(); } + + + size_t + size() const + { return _Nb; } + + + + bool + operator==(const bitset<_Nb>& __rhs) const + { return this->_M_is_equal(__rhs); } + + bool + operator!=(const bitset<_Nb>& __rhs) const + { return !this->_M_is_equal(__rhs); } +# 1295 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bitset" 3 + bool + test(size_t __position) const + { + if (__position >= _Nb) + __throw_out_of_range(("bitset::test")); + return _Unchecked_test(__position); + } + + + + + + + + bool + all() const + { return this->_M_are_all_aux() == _Nb; } + + + + + + bool + any() const + { return this->_M_is_any(); } + + + + + + bool + none() const + { return !this->_M_is_any(); } + + + + bitset<_Nb> + operator<<(size_t __position) const + { return bitset<_Nb>(*this) <<= __position; } + + bitset<_Nb> + operator>>(size_t __position) const + { return bitset<_Nb>(*this) >>= __position; } +# 1346 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bitset" 3 + size_t + _Find_first() const + { return this->_M_do_find_first(_Nb); } +# 1357 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bitset" 3 + size_t + _Find_next(size_t __prev ) const + { return this->_M_do_find_next(__prev, _Nb); } + }; + + + template + template + void + bitset<_Nb>:: + _M_copy_from_ptr(const _CharT* __s, size_t __len, + size_t __pos, size_t __n, _CharT __zero, _CharT __one) + { + reset(); + const size_t __nbits = std::min(_Nb, std::min(__n, __len - __pos)); + for (size_t __i = __nbits; __i > 0; --__i) + { + const _CharT __c = __s[__pos + __nbits - __i]; + if (_Traits::eq(__c, __zero)) + ; + else if (_Traits::eq(__c, __one)) + _Unchecked_set(__i - 1); + else + __throw_invalid_argument(("bitset::_M_copy_from_ptr")); + } + } + + template + template + void + bitset<_Nb>:: + _M_copy_to_string(std::basic_string<_CharT, _Traits, _Alloc>& __s, + _CharT __zero, _CharT __one) const + { + __s.assign(_Nb, __zero); + for (size_t __i = _Nb; __i > 0; --__i) + if (_Unchecked_test(__i - 1)) + _Traits::assign(__s[_Nb - __i], __one); + } +# 1407 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bitset" 3 + template + inline bitset<_Nb> + operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y) + { + bitset<_Nb> __result(__x); + __result &= __y; + return __result; + } + + template + inline bitset<_Nb> + operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y) + { + bitset<_Nb> __result(__x); + __result |= __y; + return __result; + } + + template + inline bitset<_Nb> + operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y) + { + bitset<_Nb> __result(__x); + __result ^= __y; + return __result; + } +# 1444 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bitset" 3 + template + std::basic_istream<_CharT, _Traits>& + operator>>(std::basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x) + { + typedef typename _Traits::char_type char_type; + typedef std::basic_istream<_CharT, _Traits> __istream_type; + typedef typename __istream_type::ios_base __ios_base; + + std::basic_string<_CharT, _Traits> __tmp; + __tmp.reserve(_Nb); + + + + const char_type __zero = __is.widen('0'); + const char_type __one = __is.widen('1'); + + typename __ios_base::iostate __state = __ios_base::goodbit; + typename __istream_type::sentry __sentry(__is); + if (__sentry) + { + try + { + for (size_t __i = _Nb; __i > 0; --__i) + { + static typename _Traits::int_type __eof = _Traits::eof(); + + typename _Traits::int_type __c1 = __is.rdbuf()->sbumpc(); + if (_Traits::eq_int_type(__c1, __eof)) + { + __state |= __ios_base::eofbit; + break; + } + else + { + const char_type __c2 = _Traits::to_char_type(__c1); + if (_Traits::eq(__c2, __zero)) + __tmp.push_back(__zero); + else if (_Traits::eq(__c2, __one)) + __tmp.push_back(__one); + else if (_Traits:: + eq_int_type(__is.rdbuf()->sputbackc(__c2), + __eof)) + { + __state |= __ios_base::failbit; + break; + } + } + } + } + catch(__cxxabiv1::__forced_unwind&) + { + __is._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { __is._M_setstate(__ios_base::badbit); } + } + + if (__tmp.empty() && _Nb) + __state |= __ios_base::failbit; + else + __x._M_copy_from_string(__tmp, static_cast(0), _Nb, + __zero, __one); + if (__state) + __is.setstate(__state); + return __is; + } + + template + std::basic_ostream<_CharT, _Traits>& + operator<<(std::basic_ostream<_CharT, _Traits>& __os, + const bitset<_Nb>& __x) + { + std::basic_string<_CharT, _Traits> __tmp; + + + + const ctype<_CharT>& __ct = use_facet >(__os.getloc()); + __x._M_copy_to_string(__tmp, __ct.widen('0'), __ct.widen('1')); + return __os << __tmp; + } + + + +} +# 95 "../boost/detail/container_fwd.hpp" 2 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/complex" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/complex" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/complex" 3 + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cmath" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cmath" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cmath" 3 +# 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/complex" 2 3 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/sstream" 1 3 +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/sstream" 3 + +# 38 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/sstream" 3 + + + + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 59 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/sstream" 3 + template + class basic_stringbuf : public basic_streambuf<_CharT, _Traits> + { + public: + + typedef _CharT char_type; + typedef _Traits traits_type; + + + typedef _Alloc allocator_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + typedef basic_streambuf __streambuf_type; + typedef basic_string __string_type; + typedef typename __string_type::size_type __size_type; + + protected: + + ios_base::openmode _M_mode; + + + __string_type _M_string; + + public: +# 93 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/sstream" 3 + explicit + basic_stringbuf(ios_base::openmode __mode = ios_base::in | ios_base::out) + : __streambuf_type(), _M_mode(__mode), _M_string() + { } +# 106 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/sstream" 3 + explicit + basic_stringbuf(const __string_type& __str, + ios_base::openmode __mode = ios_base::in | ios_base::out) + : __streambuf_type(), _M_mode(), _M_string(__str.data(), __str.size()) + { _M_stringbuf_init(__mode); } +# 121 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/sstream" 3 + __string_type + str() const + { + __string_type __ret; + if (this->pptr()) + { + + if (this->pptr() > this->egptr()) + __ret = __string_type(this->pbase(), this->pptr()); + else + __ret = __string_type(this->pbase(), this->egptr()); + } + else + __ret = _M_string; + return __ret; + } +# 145 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/sstream" 3 + void + str(const __string_type& __s) + { + + _M_string.assign(__s.data(), __s.size()); + _M_stringbuf_init(_M_mode); + } + + protected: + + void + _M_stringbuf_init(ios_base::openmode __mode) + { + _M_mode = __mode; + __size_type __len = 0; + if (_M_mode & (ios_base::ate | ios_base::app)) + __len = _M_string.size(); + _M_sync(const_cast(_M_string.data()), 0, __len); + } + + virtual streamsize + showmanyc() + { + streamsize __ret = -1; + if (_M_mode & ios_base::in) + { + _M_update_egptr(); + __ret = this->egptr() - this->gptr(); + } + return __ret; + } + + virtual int_type + underflow(); + + virtual int_type + pbackfail(int_type __c = traits_type::eof()); + + virtual int_type + overflow(int_type __c = traits_type::eof()); +# 197 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/sstream" 3 + virtual __streambuf_type* + setbuf(char_type* __s, streamsize __n) + { + if (__s && __n >= 0) + { + + + + + + + _M_string.clear(); + + + _M_sync(__s, __n, 0); + } + return this; + } + + virtual pos_type + seekoff(off_type __off, ios_base::seekdir __way, + ios_base::openmode __mode = ios_base::in | ios_base::out); + + virtual pos_type + seekpos(pos_type __sp, + ios_base::openmode __mode = ios_base::in | ios_base::out); + + + + + void + _M_sync(char_type* __base, __size_type __i, __size_type __o); + + + + void + _M_update_egptr() + { + const bool __testin = _M_mode & ios_base::in; + if (this->pptr() && this->pptr() > this->egptr()) + { + if (__testin) + this->setg(this->eback(), this->gptr(), this->pptr()); + else + this->setg(this->pptr(), this->pptr(), this->pptr()); + } + } + + + + void + _M_pbump(char_type* __pbeg, char_type* __pend, off_type __off); + }; +# 262 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/sstream" 3 + template + class basic_istringstream : public basic_istream<_CharT, _Traits> + { + public: + + typedef _CharT char_type; + typedef _Traits traits_type; + + + typedef _Alloc allocator_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; + typedef basic_istream __istream_type; + + private: + __stringbuf_type _M_stringbuf; + + public: +# 298 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/sstream" 3 + explicit + basic_istringstream(ios_base::openmode __mode = ios_base::in) + : __istream_type(), _M_stringbuf(__mode | ios_base::in) + { this->init(&_M_stringbuf); } +# 316 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/sstream" 3 + explicit + basic_istringstream(const __string_type& __str, + ios_base::openmode __mode = ios_base::in) + : __istream_type(), _M_stringbuf(__str, __mode | ios_base::in) + { this->init(&_M_stringbuf); } + + + + + + + + ~basic_istringstream() + { } +# 338 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/sstream" 3 + __stringbuf_type* + rdbuf() const + { return const_cast<__stringbuf_type*>(&_M_stringbuf); } + + + + + + __string_type + str() const + { return _M_stringbuf.str(); } + + + + + + + + void + str(const __string_type& __s) + { _M_stringbuf.str(__s); } + }; +# 372 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/sstream" 3 + template + class basic_ostringstream : public basic_ostream<_CharT, _Traits> + { + public: + + typedef _CharT char_type; + typedef _Traits traits_type; + + + typedef _Alloc allocator_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; + typedef basic_ostream __ostream_type; + + private: + __stringbuf_type _M_stringbuf; + + public: +# 408 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/sstream" 3 + explicit + basic_ostringstream(ios_base::openmode __mode = ios_base::out) + : __ostream_type(), _M_stringbuf(__mode | ios_base::out) + { this->init(&_M_stringbuf); } +# 426 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/sstream" 3 + explicit + basic_ostringstream(const __string_type& __str, + ios_base::openmode __mode = ios_base::out) + : __ostream_type(), _M_stringbuf(__str, __mode | ios_base::out) + { this->init(&_M_stringbuf); } + + + + + + + + ~basic_ostringstream() + { } +# 448 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/sstream" 3 + __stringbuf_type* + rdbuf() const + { return const_cast<__stringbuf_type*>(&_M_stringbuf); } + + + + + + __string_type + str() const + { return _M_stringbuf.str(); } + + + + + + + + void + str(const __string_type& __s) + { _M_stringbuf.str(__s); } + }; +# 482 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/sstream" 3 + template + class basic_stringstream : public basic_iostream<_CharT, _Traits> + { + public: + + typedef _CharT char_type; + typedef _Traits traits_type; + + + typedef _Alloc allocator_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + + + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef basic_stringbuf<_CharT, _Traits, _Alloc> __stringbuf_type; + typedef basic_iostream __iostream_type; + + private: + __stringbuf_type _M_stringbuf; + + public: +# 516 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/sstream" 3 + explicit + basic_stringstream(ios_base::openmode __m = ios_base::out | ios_base::in) + : __iostream_type(), _M_stringbuf(__m) + { this->init(&_M_stringbuf); } +# 532 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/sstream" 3 + explicit + basic_stringstream(const __string_type& __str, + ios_base::openmode __m = ios_base::out | ios_base::in) + : __iostream_type(), _M_stringbuf(__str, __m) + { this->init(&_M_stringbuf); } + + + + + + + + ~basic_stringstream() + { } +# 554 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/sstream" 3 + __stringbuf_type* + rdbuf() const + { return const_cast<__stringbuf_type*>(&_M_stringbuf); } + + + + + + __string_type + str() const + { return _M_stringbuf.str(); } + + + + + + + + void + str(const __string_type& __s) + { _M_stringbuf.str(__s); } + }; + + +} + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/sstream.tcc" 1 3 +# 39 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/sstream.tcc" 3 + +# 40 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/sstream.tcc" 3 + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + + + template + typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type + basic_stringbuf<_CharT, _Traits, _Alloc>:: + pbackfail(int_type __c) + { + int_type __ret = traits_type::eof(); + if (this->eback() < this->gptr()) + { + + + const bool __testeof = traits_type::eq_int_type(__c, __ret); + if (!__testeof) + { + const bool __testeq = traits_type::eq(traits_type:: + to_char_type(__c), + this->gptr()[-1]); + const bool __testout = this->_M_mode & ios_base::out; + if (__testeq || __testout) + { + this->gbump(-1); + if (!__testeq) + *this->gptr() = traits_type::to_char_type(__c); + __ret = __c; + } + } + else + { + this->gbump(-1); + __ret = traits_type::not_eof(__c); + } + } + return __ret; + } + + template + typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type + basic_stringbuf<_CharT, _Traits, _Alloc>:: + overflow(int_type __c) + { + const bool __testout = this->_M_mode & ios_base::out; + if (__builtin_expect(!__testout, false)) + return traits_type::eof(); + + const bool __testeof = traits_type::eq_int_type(__c, traits_type::eof()); + if (__builtin_expect(__testeof, false)) + return traits_type::not_eof(__c); + + const __size_type __capacity = _M_string.capacity(); + const __size_type __max_size = _M_string.max_size(); + const bool __testput = this->pptr() < this->epptr(); + if (__builtin_expect(!__testput && __capacity == __max_size, false)) + return traits_type::eof(); + + + + const char_type __conv = traits_type::to_char_type(__c); + if (!__testput) + { +# 112 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/bits/sstream.tcc" 3 + const __size_type __opt_len = std::max(__size_type(2 * __capacity), + __size_type(512)); + const __size_type __len = std::min(__opt_len, __max_size); + __string_type __tmp; + __tmp.reserve(__len); + if (this->pbase()) + __tmp.assign(this->pbase(), this->epptr() - this->pbase()); + __tmp.push_back(__conv); + _M_string.swap(__tmp); + _M_sync(const_cast(_M_string.data()), + this->gptr() - this->eback(), this->pptr() - this->pbase()); + } + else + *this->pptr() = __conv; + this->pbump(1); + return __c; + } + + template + typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type + basic_stringbuf<_CharT, _Traits, _Alloc>:: + underflow() + { + int_type __ret = traits_type::eof(); + const bool __testin = this->_M_mode & ios_base::in; + if (__testin) + { + + _M_update_egptr(); + + if (this->gptr() < this->egptr()) + __ret = traits_type::to_int_type(*this->gptr()); + } + return __ret; + } + + template + typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type + basic_stringbuf<_CharT, _Traits, _Alloc>:: + seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode) + { + pos_type __ret = pos_type(off_type(-1)); + bool __testin = (ios_base::in & this->_M_mode & __mode) != 0; + bool __testout = (ios_base::out & this->_M_mode & __mode) != 0; + const bool __testboth = __testin && __testout && __way != ios_base::cur; + __testin &= !(__mode & ios_base::out); + __testout &= !(__mode & ios_base::in); + + + + const char_type* __beg = __testin ? this->eback() : this->pbase(); + if ((__beg || !__off) && (__testin || __testout || __testboth)) + { + _M_update_egptr(); + + off_type __newoffi = __off; + off_type __newoffo = __newoffi; + if (__way == ios_base::cur) + { + __newoffi += this->gptr() - __beg; + __newoffo += this->pptr() - __beg; + } + else if (__way == ios_base::end) + __newoffo = __newoffi += this->egptr() - __beg; + + if ((__testin || __testboth) + && __newoffi >= 0 + && this->egptr() - __beg >= __newoffi) + { + this->setg(this->eback(), this->eback() + __newoffi, + this->egptr()); + __ret = pos_type(__newoffi); + } + if ((__testout || __testboth) + && __newoffo >= 0 + && this->egptr() - __beg >= __newoffo) + { + _M_pbump(this->pbase(), this->epptr(), __newoffo); + __ret = pos_type(__newoffo); + } + } + return __ret; + } + + template + typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type + basic_stringbuf<_CharT, _Traits, _Alloc>:: + seekpos(pos_type __sp, ios_base::openmode __mode) + { + pos_type __ret = pos_type(off_type(-1)); + const bool __testin = (ios_base::in & this->_M_mode & __mode) != 0; + const bool __testout = (ios_base::out & this->_M_mode & __mode) != 0; + + const char_type* __beg = __testin ? this->eback() : this->pbase(); + if ((__beg || !off_type(__sp)) && (__testin || __testout)) + { + _M_update_egptr(); + + const off_type __pos(__sp); + const bool __testpos = (0 <= __pos + && __pos <= this->egptr() - __beg); + if (__testpos) + { + if (__testin) + this->setg(this->eback(), this->eback() + __pos, + this->egptr()); + if (__testout) + _M_pbump(this->pbase(), this->epptr(), __pos); + __ret = __sp; + } + } + return __ret; + } + + template + void + basic_stringbuf<_CharT, _Traits, _Alloc>:: + _M_sync(char_type* __base, __size_type __i, __size_type __o) + { + const bool __testin = _M_mode & ios_base::in; + const bool __testout = _M_mode & ios_base::out; + char_type* __endg = __base + _M_string.size(); + char_type* __endp = __base + _M_string.capacity(); + + if (__base != _M_string.data()) + { + + __endg += __i; + __i = 0; + __endp = __endg; + } + + if (__testin) + this->setg(__base, __base + __i, __endg); + if (__testout) + { + _M_pbump(__base, __endp, __o); + + + + if (!__testin) + this->setg(__endg, __endg, __endg); + } + } + + template + void + basic_stringbuf<_CharT, _Traits, _Alloc>:: + _M_pbump(char_type* __pbeg, char_type* __pend, off_type __off) + { + this->setp(__pbeg, __pend); + while (__off > __gnu_cxx::__numeric_traits::__max) + { + this->pbump(__gnu_cxx::__numeric_traits::__max); + __off -= __gnu_cxx::__numeric_traits::__max; + } + this->pbump(__off); + } + + + + + extern template class basic_stringbuf; + extern template class basic_istringstream; + extern template class basic_ostringstream; + extern template class basic_stringstream; + + + extern template class basic_stringbuf; + extern template class basic_istringstream; + extern template class basic_ostringstream; + extern template class basic_stringstream; + + + + +} +# 581 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/sstream" 2 3 +# 48 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/complex" 2 3 + +namespace std __attribute__ ((__visibility__ ("default"))) +{ + +# 62 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/complex" 3 + template class complex; + template<> class complex; + template<> class complex; + template<> class complex; + + + template _Tp abs(const complex<_Tp>&); + + template _Tp arg(const complex<_Tp>&); + + template _Tp norm(const complex<_Tp>&); + + + template complex<_Tp> conj(const complex<_Tp>&); + + template complex<_Tp> polar(const _Tp&, const _Tp& = 0); + + + + template complex<_Tp> cos(const complex<_Tp>&); + + template complex<_Tp> cosh(const complex<_Tp>&); + + template complex<_Tp> exp(const complex<_Tp>&); + + template complex<_Tp> log(const complex<_Tp>&); + + template complex<_Tp> log10(const complex<_Tp>&); + + + + template complex<_Tp> pow(const complex<_Tp>&, int); + + + template complex<_Tp> pow(const complex<_Tp>&, const _Tp&); + + template complex<_Tp> pow(const complex<_Tp>&, + const complex<_Tp>&); + + template complex<_Tp> pow(const _Tp&, const complex<_Tp>&); + + template complex<_Tp> sin(const complex<_Tp>&); + + template complex<_Tp> sinh(const complex<_Tp>&); + + template complex<_Tp> sqrt(const complex<_Tp>&); + + template complex<_Tp> tan(const complex<_Tp>&); + + template complex<_Tp> tanh(const complex<_Tp>&); +# 123 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/complex" 3 + template + struct complex + { + + typedef _Tp value_type; + + + + complex(const _Tp& __r = _Tp(), const _Tp& __i = _Tp()) + : _M_real(__r), _M_imag(__i) { } + + + + + template + complex(const complex<_Up>& __z) + : _M_real(__z.real()), _M_imag(__z.imag()) { } +# 151 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/complex" 3 + _Tp& + real() { return _M_real; } + + + const _Tp& + real() const { return _M_real; } + + + _Tp& + imag() { return _M_imag; } + + + const _Tp& + imag() const { return _M_imag; } + + + + + void + real(_Tp __val) { _M_real = __val; } + + void + imag(_Tp __val) { _M_imag = __val; } + + + complex<_Tp>& operator=(const _Tp&); + + + + complex<_Tp>& + operator+=(const _Tp& __t) + { + _M_real += __t; + return *this; + } + + + + complex<_Tp>& + operator-=(const _Tp& __t) + { + _M_real -= __t; + return *this; + } + + + complex<_Tp>& operator*=(const _Tp&); + + complex<_Tp>& operator/=(const _Tp&); + + + + + + template + complex<_Tp>& operator=(const complex<_Up>&); + + template + complex<_Tp>& operator+=(const complex<_Up>&); + + template + complex<_Tp>& operator-=(const complex<_Up>&); + + template + complex<_Tp>& operator*=(const complex<_Up>&); + + template + complex<_Tp>& operator/=(const complex<_Up>&); + + const complex __rep() const + { return *this; } + + private: + _Tp _M_real; + _Tp _M_imag; + }; + + template + complex<_Tp>& + complex<_Tp>::operator=(const _Tp& __t) + { + _M_real = __t; + _M_imag = _Tp(); + return *this; + } + + + template + complex<_Tp>& + complex<_Tp>::operator*=(const _Tp& __t) + { + _M_real *= __t; + _M_imag *= __t; + return *this; + } + + + template + complex<_Tp>& + complex<_Tp>::operator/=(const _Tp& __t) + { + _M_real /= __t; + _M_imag /= __t; + return *this; + } + + template + template + complex<_Tp>& + complex<_Tp>::operator=(const complex<_Up>& __z) + { + _M_real = __z.real(); + _M_imag = __z.imag(); + return *this; + } + + + template + template + complex<_Tp>& + complex<_Tp>::operator+=(const complex<_Up>& __z) + { + _M_real += __z.real(); + _M_imag += __z.imag(); + return *this; + } + + + template + template + complex<_Tp>& + complex<_Tp>::operator-=(const complex<_Up>& __z) + { + _M_real -= __z.real(); + _M_imag -= __z.imag(); + return *this; + } + + + + template + template + complex<_Tp>& + complex<_Tp>::operator*=(const complex<_Up>& __z) + { + const _Tp __r = _M_real * __z.real() - _M_imag * __z.imag(); + _M_imag = _M_real * __z.imag() + _M_imag * __z.real(); + _M_real = __r; + return *this; + } + + + + template + template + complex<_Tp>& + complex<_Tp>::operator/=(const complex<_Up>& __z) + { + const _Tp __r = _M_real * __z.real() + _M_imag * __z.imag(); + const _Tp __n = std::norm(__z); + _M_imag = (_M_imag * __z.real() - _M_real * __z.imag()) / __n; + _M_real = __r / __n; + return *this; + } + + + + + template + inline complex<_Tp> + operator+(const complex<_Tp>& __x, const complex<_Tp>& __y) + { + complex<_Tp> __r = __x; + __r += __y; + return __r; + } + + template + inline complex<_Tp> + operator+(const complex<_Tp>& __x, const _Tp& __y) + { + complex<_Tp> __r = __x; + __r += __y; + return __r; + } + + template + inline complex<_Tp> + operator+(const _Tp& __x, const complex<_Tp>& __y) + { + complex<_Tp> __r = __y; + __r += __x; + return __r; + } + + + + + template + inline complex<_Tp> + operator-(const complex<_Tp>& __x, const complex<_Tp>& __y) + { + complex<_Tp> __r = __x; + __r -= __y; + return __r; + } + + template + inline complex<_Tp> + operator-(const complex<_Tp>& __x, const _Tp& __y) + { + complex<_Tp> __r = __x; + __r -= __y; + return __r; + } + + template + inline complex<_Tp> + operator-(const _Tp& __x, const complex<_Tp>& __y) + { + complex<_Tp> __r(__x, -__y.imag()); + __r -= __y.real(); + return __r; + } + + + + + template + inline complex<_Tp> + operator*(const complex<_Tp>& __x, const complex<_Tp>& __y) + { + complex<_Tp> __r = __x; + __r *= __y; + return __r; + } + + template + inline complex<_Tp> + operator*(const complex<_Tp>& __x, const _Tp& __y) + { + complex<_Tp> __r = __x; + __r *= __y; + return __r; + } + + template + inline complex<_Tp> + operator*(const _Tp& __x, const complex<_Tp>& __y) + { + complex<_Tp> __r = __y; + __r *= __x; + return __r; + } + + + + + template + inline complex<_Tp> + operator/(const complex<_Tp>& __x, const complex<_Tp>& __y) + { + complex<_Tp> __r = __x; + __r /= __y; + return __r; + } + + template + inline complex<_Tp> + operator/(const complex<_Tp>& __x, const _Tp& __y) + { + complex<_Tp> __r = __x; + __r /= __y; + return __r; + } + + template + inline complex<_Tp> + operator/(const _Tp& __x, const complex<_Tp>& __y) + { + complex<_Tp> __r = __x; + __r /= __y; + return __r; + } + + + + template + inline complex<_Tp> + operator+(const complex<_Tp>& __x) + { return __x; } + + + template + inline complex<_Tp> + operator-(const complex<_Tp>& __x) + { return complex<_Tp>(-__x.real(), -__x.imag()); } + + + + template + inline bool + operator==(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return __x.real() == __y.real() && __x.imag() == __y.imag(); } + + template + inline bool + operator==(const complex<_Tp>& __x, const _Tp& __y) + { return __x.real() == __y && __x.imag() == _Tp(); } + + template + inline bool + operator==(const _Tp& __x, const complex<_Tp>& __y) + { return __x == __y.real() && _Tp() == __y.imag(); } + + + + + template + inline bool + operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return __x.real() != __y.real() || __x.imag() != __y.imag(); } + + template + inline bool + operator!=(const complex<_Tp>& __x, const _Tp& __y) + { return __x.real() != __y || __x.imag() != _Tp(); } + + template + inline bool + operator!=(const _Tp& __x, const complex<_Tp>& __y) + { return __x != __y.real() || _Tp() != __y.imag(); } + + + + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x) + { + _Tp __re_x, __im_x; + _CharT __ch; + __is >> __ch; + if (__ch == '(') + { + __is >> __re_x >> __ch; + if (__ch == ',') + { + __is >> __im_x >> __ch; + if (__ch == ')') + __x = complex<_Tp>(__re_x, __im_x); + else + __is.setstate(ios_base::failbit); + } + else if (__ch == ')') + __x = __re_x; + else + __is.setstate(ios_base::failbit); + } + else + { + __is.putback(__ch); + __is >> __re_x; + __x = __re_x; + } + return __is; + } + + + template + basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x) + { + basic_ostringstream<_CharT, _Traits> __s; + __s.flags(__os.flags()); + __s.imbue(__os.getloc()); + __s.precision(__os.precision()); + __s << '(' << __x.real() << ',' << __x.imag() << ')'; + return __os << __s.str(); + } +# 543 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/complex" 3 + template + inline _Tp& + real(complex<_Tp>& __z) + { return __z.real(); } + + template + inline const _Tp& + real(const complex<_Tp>& __z) + { return __z.real(); } + + template + inline _Tp& + imag(complex<_Tp>& __z) + { return __z.imag(); } + + template + inline const _Tp& + imag(const complex<_Tp>& __z) + { return __z.imag(); } + + + + template + inline _Tp + __complex_abs(const complex<_Tp>& __z) + { + _Tp __x = __z.real(); + _Tp __y = __z.imag(); + const _Tp __s = std::max(abs(__x), abs(__y)); + if (__s == _Tp()) + return __s; + __x /= __s; + __y /= __s; + return __s * sqrt(__x * __x + __y * __y); + } + + + inline float + __complex_abs(__complex__ float __z) { return __builtin_cabsf(__z); } + + inline double + __complex_abs(__complex__ double __z) { return __builtin_cabs(__z); } + + inline long double + __complex_abs(const __complex__ long double& __z) + { return __builtin_cabsl(__z); } + + template + inline _Tp + abs(const complex<_Tp>& __z) { return __complex_abs(__z.__rep()); } +# 601 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/complex" 3 + template + inline _Tp + __complex_arg(const complex<_Tp>& __z) + { return atan2(__z.imag(), __z.real()); } + + + inline float + __complex_arg(__complex__ float __z) { return __builtin_cargf(__z); } + + inline double + __complex_arg(__complex__ double __z) { return __builtin_carg(__z); } + + inline long double + __complex_arg(const __complex__ long double& __z) + { return __builtin_cargl(__z); } + + template + inline _Tp + arg(const complex<_Tp>& __z) { return __complex_arg(__z.__rep()); } +# 631 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/complex" 3 + template + struct _Norm_helper + { + template + static inline _Tp _S_do_it(const complex<_Tp>& __z) + { + const _Tp __x = __z.real(); + const _Tp __y = __z.imag(); + return __x * __x + __y * __y; + } + }; + + template<> + struct _Norm_helper + { + template + static inline _Tp _S_do_it(const complex<_Tp>& __z) + { + _Tp __res = std::abs(__z); + return __res * __res; + } + }; + + template + inline _Tp + norm(const complex<_Tp>& __z) + { + return _Norm_helper<__is_floating<_Tp>::__value + && !0>::_S_do_it(__z); + } + + template + inline complex<_Tp> + polar(const _Tp& __rho, const _Tp& __theta) + { return complex<_Tp>(__rho * cos(__theta), __rho * sin(__theta)); } + + template + inline complex<_Tp> + conj(const complex<_Tp>& __z) + { return complex<_Tp>(__z.real(), -__z.imag()); } + + + + + template + inline complex<_Tp> + __complex_cos(const complex<_Tp>& __z) + { + const _Tp __x = __z.real(); + const _Tp __y = __z.imag(); + return complex<_Tp>(cos(__x) * cosh(__y), -sin(__x) * sinh(__y)); + } + + + inline __complex__ float + __complex_cos(__complex__ float __z) { return __builtin_ccosf(__z); } + + inline __complex__ double + __complex_cos(__complex__ double __z) { return __builtin_ccos(__z); } + + inline __complex__ long double + __complex_cos(const __complex__ long double& __z) + { return __builtin_ccosl(__z); } + + template + inline complex<_Tp> + cos(const complex<_Tp>& __z) { return __complex_cos(__z.__rep()); } + + + + + + + + template + inline complex<_Tp> + __complex_cosh(const complex<_Tp>& __z) + { + const _Tp __x = __z.real(); + const _Tp __y = __z.imag(); + return complex<_Tp>(cosh(__x) * cos(__y), sinh(__x) * sin(__y)); + } + + + inline __complex__ float + __complex_cosh(__complex__ float __z) { return __builtin_ccoshf(__z); } + + inline __complex__ double + __complex_cosh(__complex__ double __z) { return __builtin_ccosh(__z); } + + inline __complex__ long double + __complex_cosh(const __complex__ long double& __z) + { return __builtin_ccoshl(__z); } + + template + inline complex<_Tp> + cosh(const complex<_Tp>& __z) { return __complex_cosh(__z.__rep()); } + + + + + + + + template + inline complex<_Tp> + __complex_exp(const complex<_Tp>& __z) + { return std::polar(exp(__z.real()), __z.imag()); } + + + inline __complex__ float + __complex_exp(__complex__ float __z) { return __builtin_cexpf(__z); } + + inline __complex__ double + __complex_exp(__complex__ double __z) { return __builtin_cexp(__z); } + + inline __complex__ long double + __complex_exp(const __complex__ long double& __z) + { return __builtin_cexpl(__z); } + + template + inline complex<_Tp> + exp(const complex<_Tp>& __z) { return __complex_exp(__z.__rep()); } +# 762 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/complex" 3 + template + inline complex<_Tp> + __complex_log(const complex<_Tp>& __z) + { return complex<_Tp>(log(std::abs(__z)), std::arg(__z)); } + + + inline __complex__ float + __complex_log(__complex__ float __z) { return __builtin_clogf(__z); } + + inline __complex__ double + __complex_log(__complex__ double __z) { return __builtin_clog(__z); } + + inline __complex__ long double + __complex_log(const __complex__ long double& __z) + { return __builtin_clogl(__z); } + + template + inline complex<_Tp> + log(const complex<_Tp>& __z) { return __complex_log(__z.__rep()); } + + + + + + + template + inline complex<_Tp> + log10(const complex<_Tp>& __z) + { return std::log(__z) / log(_Tp(10.0)); } + + + template + inline complex<_Tp> + __complex_sin(const complex<_Tp>& __z) + { + const _Tp __x = __z.real(); + const _Tp __y = __z.imag(); + return complex<_Tp>(sin(__x) * cosh(__y), cos(__x) * sinh(__y)); + } + + + inline __complex__ float + __complex_sin(__complex__ float __z) { return __builtin_csinf(__z); } + + inline __complex__ double + __complex_sin(__complex__ double __z) { return __builtin_csin(__z); } + + inline __complex__ long double + __complex_sin(const __complex__ long double& __z) + { return __builtin_csinl(__z); } + + template + inline complex<_Tp> + sin(const complex<_Tp>& __z) { return __complex_sin(__z.__rep()); } + + + + + + + + template + inline complex<_Tp> + __complex_sinh(const complex<_Tp>& __z) + { + const _Tp __x = __z.real(); + const _Tp __y = __z.imag(); + return complex<_Tp>(sinh(__x) * cos(__y), cosh(__x) * sin(__y)); + } + + + inline __complex__ float + __complex_sinh(__complex__ float __z) { return __builtin_csinhf(__z); } + + inline __complex__ double + __complex_sinh(__complex__ double __z) { return __builtin_csinh(__z); } + + inline __complex__ long double + __complex_sinh(const __complex__ long double& __z) + { return __builtin_csinhl(__z); } + + template + inline complex<_Tp> + sinh(const complex<_Tp>& __z) { return __complex_sinh(__z.__rep()); } +# 854 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/complex" 3 + template + complex<_Tp> + __complex_sqrt(const complex<_Tp>& __z) + { + _Tp __x = __z.real(); + _Tp __y = __z.imag(); + + if (__x == _Tp()) + { + _Tp __t = sqrt(abs(__y) / 2); + return complex<_Tp>(__t, __y < _Tp() ? -__t : __t); + } + else + { + _Tp __t = sqrt(2 * (std::abs(__z) + abs(__x))); + _Tp __u = __t / 2; + return __x > _Tp() + ? complex<_Tp>(__u, __y / __t) + : complex<_Tp>(abs(__y) / __t, __y < _Tp() ? -__u : __u); + } + } + + + inline __complex__ float + __complex_sqrt(__complex__ float __z) { return __builtin_csqrtf(__z); } + + inline __complex__ double + __complex_sqrt(__complex__ double __z) { return __builtin_csqrt(__z); } + + inline __complex__ long double + __complex_sqrt(const __complex__ long double& __z) + { return __builtin_csqrtl(__z); } + + template + inline complex<_Tp> + sqrt(const complex<_Tp>& __z) { return __complex_sqrt(__z.__rep()); } +# 898 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/complex" 3 + template + inline complex<_Tp> + __complex_tan(const complex<_Tp>& __z) + { return std::sin(__z) / std::cos(__z); } + + + inline __complex__ float + __complex_tan(__complex__ float __z) { return __builtin_ctanf(__z); } + + inline __complex__ double + __complex_tan(__complex__ double __z) { return __builtin_ctan(__z); } + + inline __complex__ long double + __complex_tan(const __complex__ long double& __z) + { return __builtin_ctanl(__z); } + + template + inline complex<_Tp> + tan(const complex<_Tp>& __z) { return __complex_tan(__z.__rep()); } +# 926 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/complex" 3 + template + inline complex<_Tp> + __complex_tanh(const complex<_Tp>& __z) + { return std::sinh(__z) / std::cosh(__z); } + + + inline __complex__ float + __complex_tanh(__complex__ float __z) { return __builtin_ctanhf(__z); } + + inline __complex__ double + __complex_tanh(__complex__ double __z) { return __builtin_ctanh(__z); } + + inline __complex__ long double + __complex_tanh(const __complex__ long double& __z) + { return __builtin_ctanhl(__z); } + + template + inline complex<_Tp> + tanh(const complex<_Tp>& __z) { return __complex_tanh(__z.__rep()); } +# 956 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/complex" 3 + template + complex<_Tp> + __complex_pow_unsigned(complex<_Tp> __x, unsigned __n) + { + complex<_Tp> __y = __n % 2 ? __x : complex<_Tp>(1); + + while (__n >>= 1) + { + __x *= __x; + if (__n % 2) + __y *= __x; + } + + return __y; + } + + + + template + inline complex<_Tp> + pow(const complex<_Tp>& __z, int __n) + { + return __n < 0 + ? complex<_Tp>(1) / std::__complex_pow_unsigned(__z, -__n) + : std::__complex_pow_unsigned(__z, __n); + } + + + template + complex<_Tp> + pow(const complex<_Tp>& __x, const _Tp& __y) + { + + + + + if (__x.imag() == _Tp() && __x.real() > _Tp()) + return pow(__x.real(), __y); + + complex<_Tp> __t = std::log(__x); + return std::polar(exp(__y * __t.real()), __y * __t.imag()); + } + + template + inline complex<_Tp> + __complex_pow(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return __x == _Tp() ? _Tp() : std::exp(__y * std::log(__x)); } + + + inline __complex__ float + __complex_pow(__complex__ float __x, __complex__ float __y) + { return __builtin_cpowf(__x, __y); } + + inline __complex__ double + __complex_pow(__complex__ double __x, __complex__ double __y) + { return __builtin_cpow(__x, __y); } + + inline __complex__ long double + __complex_pow(const __complex__ long double& __x, + const __complex__ long double& __y) + { return __builtin_cpowl(__x, __y); } + + template + inline complex<_Tp> + pow(const complex<_Tp>& __x, const complex<_Tp>& __y) + { return __complex_pow(__x.__rep(), __y.__rep()); } + + + + + + + + template + inline complex<_Tp> + pow(const _Tp& __x, const complex<_Tp>& __y) + { + return __x > _Tp() ? std::polar(pow(__x, __y.real()), + __y.imag() * log(__x)) + : std::pow(complex<_Tp>(__x), __y); + } + + + + template<> + struct complex + { + typedef float value_type; + typedef __complex__ float _ComplexT; + + complex(_ComplexT __z) : _M_value(__z) { } + + complex(float __r = 0.0f, float __i = 0.0f) + + + + + + + { + __real__ _M_value = __r; + __imag__ _M_value = __i; + } + + + explicit complex(const complex&); + explicit complex(const complex&); +# 1073 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/complex" 3 + float& + real() { return __real__ _M_value; } + + const float& + real() const { return __real__ _M_value; } + + float& + imag() { return __imag__ _M_value; } + + const float& + imag() const { return __imag__ _M_value; } + + + + + void + real(float __val) { __real__ _M_value = __val; } + + void + imag(float __val) { __imag__ _M_value = __val; } + + complex& + operator=(float __f) + { + _M_value = __f; + return *this; + } + + complex& + operator+=(float __f) + { + _M_value += __f; + return *this; + } + + complex& + operator-=(float __f) + { + _M_value -= __f; + return *this; + } + + complex& + operator*=(float __f) + { + _M_value *= __f; + return *this; + } + + complex& + operator/=(float __f) + { + _M_value /= __f; + return *this; + } + + + + + + template + complex& + operator=(const complex<_Tp>& __z) + { + __real__ _M_value = __z.real(); + __imag__ _M_value = __z.imag(); + return *this; + } + + template + complex& + operator+=(const complex<_Tp>& __z) + { + __real__ _M_value += __z.real(); + __imag__ _M_value += __z.imag(); + return *this; + } + + template + complex& + operator-=(const complex<_Tp>& __z) + { + __real__ _M_value -= __z.real(); + __imag__ _M_value -= __z.imag(); + return *this; + } + + template + complex& + operator*=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value *= __t; + return *this; + } + + template + complex& + operator/=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value /= __t; + return *this; + } + + const _ComplexT __rep() const { return _M_value; } + + private: + _ComplexT _M_value; + }; + + + + template<> + struct complex + { + typedef double value_type; + typedef __complex__ double _ComplexT; + + complex(_ComplexT __z) : _M_value(__z) { } + + complex(double __r = 0.0, double __i = 0.0) + + + + + + + { + __real__ _M_value = __r; + __imag__ _M_value = __i; + } + + + complex(const complex& __z) + : _M_value(__z.__rep()) { } + + explicit complex(const complex&); +# 1225 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/complex" 3 + double& + real() { return __real__ _M_value; } + + const double& + real() const { return __real__ _M_value; } + + double& + imag() { return __imag__ _M_value; } + + const double& + imag() const { return __imag__ _M_value; } + + + + + void + real(double __val) { __real__ _M_value = __val; } + + void + imag(double __val) { __imag__ _M_value = __val; } + + complex& + operator=(double __d) + { + _M_value = __d; + return *this; + } + + complex& + operator+=(double __d) + { + _M_value += __d; + return *this; + } + + complex& + operator-=(double __d) + { + _M_value -= __d; + return *this; + } + + complex& + operator*=(double __d) + { + _M_value *= __d; + return *this; + } + + complex& + operator/=(double __d) + { + _M_value /= __d; + return *this; + } + + + + + template + complex& + operator=(const complex<_Tp>& __z) + { + __real__ _M_value = __z.real(); + __imag__ _M_value = __z.imag(); + return *this; + } + + template + complex& + operator+=(const complex<_Tp>& __z) + { + __real__ _M_value += __z.real(); + __imag__ _M_value += __z.imag(); + return *this; + } + + template + complex& + operator-=(const complex<_Tp>& __z) + { + __real__ _M_value -= __z.real(); + __imag__ _M_value -= __z.imag(); + return *this; + } + + template + complex& + operator*=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value *= __t; + return *this; + } + + template + complex& + operator/=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value /= __t; + return *this; + } + + const _ComplexT __rep() const { return _M_value; } + + private: + _ComplexT _M_value; + }; + + + + template<> + struct complex + { + typedef long double value_type; + typedef __complex__ long double _ComplexT; + + complex(_ComplexT __z) : _M_value(__z) { } + + complex(long double __r = 0.0L, + long double __i = 0.0L) + + + + + + + { + __real__ _M_value = __r; + __imag__ _M_value = __i; + } + + + complex(const complex& __z) + : _M_value(__z.__rep()) { } + + complex(const complex& __z) + : _M_value(__z.__rep()) { } +# 1378 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/complex" 3 + long double& + real() { return __real__ _M_value; } + + const long double& + real() const { return __real__ _M_value; } + + long double& + imag() { return __imag__ _M_value; } + + const long double& + imag() const { return __imag__ _M_value; } + + + + + void + real(long double __val) { __real__ _M_value = __val; } + + void + imag(long double __val) { __imag__ _M_value = __val; } + + complex& + operator=(long double __r) + { + _M_value = __r; + return *this; + } + + complex& + operator+=(long double __r) + { + _M_value += __r; + return *this; + } + + complex& + operator-=(long double __r) + { + _M_value -= __r; + return *this; + } + + complex& + operator*=(long double __r) + { + _M_value *= __r; + return *this; + } + + complex& + operator/=(long double __r) + { + _M_value /= __r; + return *this; + } + + + + + template + complex& + operator=(const complex<_Tp>& __z) + { + __real__ _M_value = __z.real(); + __imag__ _M_value = __z.imag(); + return *this; + } + + template + complex& + operator+=(const complex<_Tp>& __z) + { + __real__ _M_value += __z.real(); + __imag__ _M_value += __z.imag(); + return *this; + } + + template + complex& + operator-=(const complex<_Tp>& __z) + { + __real__ _M_value -= __z.real(); + __imag__ _M_value -= __z.imag(); + return *this; + } + + template + complex& + operator*=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value *= __t; + return *this; + } + + template + complex& + operator/=(const complex<_Tp>& __z) + { + _ComplexT __t; + __real__ __t = __z.real(); + __imag__ __t = __z.imag(); + _M_value /= __t; + return *this; + } + + const _ComplexT __rep() const { return _M_value; } + + private: + _ComplexT _M_value; + }; + + + + inline + complex::complex(const complex& __z) + : _M_value(__z.__rep()) { } + + inline + complex::complex(const complex& __z) + : _M_value(__z.__rep()) { } + + inline + complex::complex(const complex& __z) + : _M_value(__z.__rep()) { } + + + + + + extern template istream& operator>>(istream&, complex&); + extern template ostream& operator<<(ostream&, const complex&); + extern template istream& operator>>(istream&, complex&); + extern template ostream& operator<<(ostream&, const complex&); + extern template istream& operator>>(istream&, complex&); + extern template ostream& operator<<(ostream&, const complex&); + + + extern template wistream& operator>>(wistream&, complex&); + extern template wostream& operator<<(wostream&, const complex&); + extern template wistream& operator>>(wistream&, complex&); + extern template wostream& operator<<(wostream&, const complex&); + extern template wistream& operator>>(wistream&, complex&); + extern template wostream& operator<<(wostream&, const complex&); + + + + + + +} + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) +{ + + + + template + struct __promote_2, _Up> + { + public: + typedef std::complex::__type> __type; + }; + + template + struct __promote_2<_Tp, std::complex<_Up> > + { + public: + typedef std::complex::__type> __type; + }; + + template + struct __promote_2, std::complex<_Up> > + { + public: + typedef std::complex::__type> __type; + }; + + +} +# 97 "../boost/detail/container_fwd.hpp" 2 +# 18 "../boost/functional/hash/extensions.hpp" 2 +# 31 "../boost/functional/hash/extensions.hpp" +namespace boost +{ + template + std::size_t hash_value(std::pair const&); + template + std::size_t hash_value(std::vector const&); + template + std::size_t hash_value(std::list const& v); + template + std::size_t hash_value(std::deque const& v); + template + std::size_t hash_value(std::set const& v); + template + std::size_t hash_value(std::multiset const& v); + template + std::size_t hash_value(std::map const& v); + template + std::size_t hash_value(std::multimap const& v); + + template + std::size_t hash_value(std::complex const&); + + template + std::size_t hash_value(std::pair const& v) + { + std::size_t seed = 0; + hash_combine(seed, v.first); + hash_combine(seed, v.second); + return seed; + } + + template + std::size_t hash_value(std::vector const& v) + { + return hash_range(v.begin(), v.end()); + } + + template + std::size_t hash_value(std::list const& v) + { + return hash_range(v.begin(), v.end()); + } + + template + std::size_t hash_value(std::deque const& v) + { + return hash_range(v.begin(), v.end()); + } + + template + std::size_t hash_value(std::set const& v) + { + return hash_range(v.begin(), v.end()); + } + + template + std::size_t hash_value(std::multiset const& v) + { + return hash_range(v.begin(), v.end()); + } + + template + std::size_t hash_value(std::map const& v) + { + return hash_range(v.begin(), v.end()); + } + + template + std::size_t hash_value(std::multimap const& v) + { + return hash_range(v.begin(), v.end()); + } + + template + std::size_t hash_value(std::complex const& v) + { + boost::hash hasher; + std::size_t seed = hasher(v.imag()); + seed ^= hasher(v.real()) + (seed<<6) + (seed>>2); + return seed; + } +# 170 "../boost/functional/hash/extensions.hpp" + template struct hash + : std::unary_function + { + + std::size_t operator()(T const& val) const + { + return hash_value(val); + } + + + + + + + }; +# 284 "../boost/functional/hash/extensions.hpp" +} +# 536 "../boost/functional/hash/hash.hpp" 2 +# 7 "../boost/functional/hash.hpp" 2 +# 22 "../boost/unordered/unordered_map.hpp" 2 +# 37 "../boost/unordered/unordered_map.hpp" +namespace boost +{ +namespace unordered +{ + template + class unordered_map + { + + + + + public: + + typedef K key_type; + typedef std::pair value_type; + typedef T mapped_type; + typedef H hasher; + typedef P key_equal; + typedef A allocator_type; + + private: + + typedef boost::unordered::detail::map types; + typedef typename types::allocator value_allocator; + typedef typename types::traits allocator_traits; + typedef typename types::table table; + + public: + + typedef typename allocator_traits::pointer pointer; + typedef typename allocator_traits::const_pointer const_pointer; + + typedef value_type& reference; + typedef value_type const& const_reference; + + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + + typedef typename table::cl_iterator const_local_iterator; + typedef typename table::l_iterator local_iterator; + typedef typename table::c_iterator const_iterator; + typedef typename table::iterator iterator; + + private: + + table table_; + + public: + + + + explicit unordered_map( + size_type = boost::unordered::detail::default_bucket_count, + const hasher& = hasher(), + const key_equal& = key_equal(), + const allocator_type& = allocator_type()); + + explicit unordered_map(allocator_type const&); + + template + unordered_map(InputIt, InputIt); + + template + unordered_map( + InputIt, InputIt, + size_type, + const hasher& = hasher(), + const key_equal& = key_equal()); + + template + unordered_map( + InputIt, InputIt, + size_type, + const hasher&, + const key_equal&, + const allocator_type&); + + + + unordered_map(unordered_map const&); + + unordered_map(unordered_map const&, allocator_type const&); +# 147 "../boost/unordered/unordered_map.hpp" + ~unordered_map(); +# 164 "../boost/unordered/unordered_map.hpp" + unordered_map& operator=(unordered_map const& x) + { + table_.assign(x.table_); + return *this; + } +# 183 "../boost/unordered/unordered_map.hpp" + allocator_type get_allocator() const + { + return table_.node_alloc(); + } + + + + bool empty() const + { + return table_.size_ == 0; + } + + size_type size() const + { + return table_.size_; + } + + size_type max_size() const; + + + + iterator begin() + { + return iterator(table_.begin()); + } + + const_iterator begin() const + { + return const_iterator(table_.begin()); + } + + iterator end() + { + return iterator(); + } + + const_iterator end() const + { + return const_iterator(); + } + + const_iterator cbegin() const + { + return const_iterator(table_.begin()); + } + + const_iterator cend() const + { + return const_iterator(); + } +# 256 "../boost/unordered/unordered_map.hpp" + std::pair emplace( + boost::unordered::detail::empty_emplace + = boost::unordered::detail::empty_emplace(), + value_type v = value_type()) + { + return this->emplace(boost::move(v)); + } + + iterator emplace_hint(const_iterator hint, + boost::unordered::detail::empty_emplace + = boost::unordered::detail::empty_emplace(), + value_type v = value_type() + ) + { + return this->emplace_hint(hint, boost::move(v)); + } + + + + template + std::pair emplace(const A0 & a0) + { + return table_.emplace( + boost::unordered::detail::create_emplace_args( + boost::forward(a0)) + ); + } + + template + iterator emplace_hint(const_iterator, const A0 & a0) + { + return table_.emplace( + boost::unordered::detail::create_emplace_args( + boost::forward(a0)) + ).first; + } + + template + std::pair emplace( + const A0 & a0, + const A1 & a1) + { + return table_.emplace( + boost::unordered::detail::create_emplace_args( + boost::forward(a0), + boost::forward(a1)) + ); + } + + template + iterator emplace_hint(const_iterator, + const A0 & a0, + const A1 & a1) + { + return table_.emplace( + boost::unordered::detail::create_emplace_args( + boost::forward(a0), + boost::forward(a1)) + ).first; + } + + template + std::pair emplace( + const A0 & a0, + const A1 & a1, + const A2 & a2) + { + return table_.emplace( + boost::unordered::detail::create_emplace_args( + boost::forward(a0), + boost::forward(a1), + boost::forward(a2)) + ); + } + + template + iterator emplace_hint(const_iterator, + const A0 & a0, + const A1 & a1, + const A2 & a2) + { + return table_.emplace( + boost::unordered::detail::create_emplace_args( + boost::forward(a0), + boost::forward(a1), + boost::forward(a2)) + ).first; + } +# 375 "../boost/unordered/unordered_map.hpp" + + template < typename A0 , typename A1 , typename A2 , typename A3 > std::pair emplace( const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 ) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0) , boost::forward(a1) , boost::forward(a2) , boost::forward(a3) )); } template < typename A0 , typename A1 , typename A2 , typename A3 > iterator emplace_hint( const_iterator, const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 ) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0) , boost::forward(a1) , boost::forward(a2) , boost::forward(a3) )).first; } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 > std::pair emplace( const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 ) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0) , boost::forward(a1) , boost::forward(a2) , boost::forward(a3) , boost::forward(a4) )); } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 > iterator emplace_hint( const_iterator, const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 ) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0) , boost::forward(a1) , boost::forward(a2) , boost::forward(a3) , boost::forward(a4) )).first; } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 > std::pair emplace( const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 , const A5 & a5 ) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0) , boost::forward(a1) , boost::forward(a2) , boost::forward(a3) , boost::forward(a4) , boost::forward(a5) )); } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 > iterator emplace_hint( const_iterator, const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 , const A5 & a5 ) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0) , boost::forward(a1) , boost::forward(a2) , boost::forward(a3) , boost::forward(a4) , boost::forward(a5) )).first; } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 > std::pair emplace( const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 , const A5 & a5 , const A6 & a6 ) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0) , boost::forward(a1) , boost::forward(a2) , boost::forward(a3) , boost::forward(a4) , boost::forward(a5) , boost::forward(a6) )); } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 > iterator emplace_hint( const_iterator, const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 , const A5 & a5 , const A6 & a6 ) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0) , boost::forward(a1) , boost::forward(a2) , boost::forward(a3) , boost::forward(a4) , boost::forward(a5) , boost::forward(a6) )).first; } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 > std::pair emplace( const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 , const A5 & a5 , const A6 & a6 , const A7 & a7 ) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0) , boost::forward(a1) , boost::forward(a2) , boost::forward(a3) , boost::forward(a4) , boost::forward(a5) , boost::forward(a6) , boost::forward(a7) )); } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 > iterator emplace_hint( const_iterator, const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 , const A5 & a5 , const A6 & a6 , const A7 & a7 ) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0) , boost::forward(a1) , boost::forward(a2) , boost::forward(a3) , boost::forward(a4) , boost::forward(a5) , boost::forward(a6) , boost::forward(a7) )).first; } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 > std::pair emplace( const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 , const A5 & a5 , const A6 & a6 , const A7 & a7 , const A8 & a8 ) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0) , boost::forward(a1) , boost::forward(a2) , boost::forward(a3) , boost::forward(a4) , boost::forward(a5) , boost::forward(a6) , boost::forward(a7) , boost::forward(a8) )); } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 > iterator emplace_hint( const_iterator, const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 , const A5 & a5 , const A6 & a6 , const A7 & a7 , const A8 & a8 ) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0) , boost::forward(a1) , boost::forward(a2) , boost::forward(a3) , boost::forward(a4) , boost::forward(a5) , boost::forward(a6) , boost::forward(a7) , boost::forward(a8) )).first; } + + + + + + std::pair insert(value_type const& x) + { + return this->emplace(x); + } + + std::pair insert(::boost::rv< value_type >& x) + { + return this->emplace(boost::move(x)); + } + + iterator insert(const_iterator hint, value_type const& x) + { + return this->emplace_hint(hint, x); + } + + iterator insert(const_iterator hint, ::boost::rv< value_type >& x) + { + return this->emplace_hint(hint, boost::move(x)); + } + + template void insert(InputIt, InputIt); + + + + + + iterator erase(const_iterator); + size_type erase(const key_type&); + iterator erase(const_iterator, const_iterator); + void quick_erase(const_iterator it) { erase(it); } + void erase_return_void(const_iterator it) { erase(it); } + + void clear(); + void swap(unordered_map&); + + + + hasher hash_function() const; + key_equal key_eq() const; + + mapped_type& operator[](const key_type&); + mapped_type& at(const key_type&); + mapped_type const& at(const key_type&) const; + + + + iterator find(const key_type&); + const_iterator find(const key_type&) const; + + template + iterator find( + CompatibleKey const&, + CompatibleHash const&, + CompatiblePredicate const&); + + template + const_iterator find( + CompatibleKey const&, + CompatibleHash const&, + CompatiblePredicate const&) const; + + size_type count(const key_type&) const; + + std::pair + equal_range(const key_type&); + std::pair + equal_range(const key_type&) const; + + + + size_type bucket_count() const + { + return table_.bucket_count_; + } + + size_type max_bucket_count() const + { + return table_.max_bucket_count(); + } + + size_type bucket_size(size_type) const; + + size_type bucket(const key_type& k) const + { + return table_.hash_function()(k) % table_.bucket_count_; + } + + local_iterator begin(size_type n) + { + return table_.size_ ? local_iterator( + table_.get_start(n), n, table_.bucket_count_) : + local_iterator(); + } + + const_local_iterator begin(size_type n) const + { + return table_.size_ ? const_local_iterator( + table_.get_start(n), n, table_.bucket_count_) : + const_local_iterator(); + } + + local_iterator end(size_type) + { + return local_iterator(); + } + + const_local_iterator end(size_type) const + { + return const_local_iterator(); + } + + const_local_iterator cbegin(size_type n) const + { + return table_.size_ ? const_local_iterator( + table_.get_start(n), n, table_.bucket_count_) : + const_local_iterator(); + } + + const_local_iterator cend(size_type) const + { + return const_local_iterator(); + } + + + + float max_load_factor() const + { + return table_.mlf_; + } + + float load_factor() const; + void max_load_factor(float); + void rehash(size_type); + + + friend bool operator==( + unordered_map const&, unordered_map const&); + friend bool operator!=( + unordered_map const&, unordered_map const&); + + }; + + template + class unordered_multimap + { + + + + public: + + typedef K key_type; + typedef std::pair value_type; + typedef T mapped_type; + typedef H hasher; + typedef P key_equal; + typedef A allocator_type; + + private: + + typedef boost::unordered::detail::multimap types; + typedef typename types::allocator value_allocator; + typedef typename types::traits allocator_traits; + typedef typename types::table table; + + public: + + typedef typename allocator_traits::pointer pointer; + typedef typename allocator_traits::const_pointer const_pointer; + + typedef value_type& reference; + typedef value_type const& const_reference; + + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + + typedef typename table::cl_iterator const_local_iterator; + typedef typename table::l_iterator local_iterator; + typedef typename table::c_iterator const_iterator; + typedef typename table::iterator iterator; + + private: + + table table_; + + public: + + + + explicit unordered_multimap( + size_type = boost::unordered::detail::default_bucket_count, + const hasher& = hasher(), + const key_equal& = key_equal(), + const allocator_type& = allocator_type()); + + explicit unordered_multimap(allocator_type const&); + + template + unordered_multimap(InputIt, InputIt); + + template + unordered_multimap( + InputIt, InputIt, + size_type, + const hasher& = hasher(), + const key_equal& = key_equal()); + + template + unordered_multimap( + InputIt, InputIt, + size_type, + const hasher&, + const key_equal&, + const allocator_type&); + + + + unordered_multimap(unordered_multimap const&); + + unordered_multimap(unordered_multimap const&, allocator_type const&); +# 631 "../boost/unordered/unordered_map.hpp" + ~unordered_multimap(); +# 649 "../boost/unordered/unordered_map.hpp" + unordered_multimap& operator=(unordered_multimap const& x) + { + table_.assign(x.table_); + return *this; + } +# 668 "../boost/unordered/unordered_map.hpp" + allocator_type get_allocator() const + { + return table_.node_alloc(); + } + + + + bool empty() const + { + return table_.size_ == 0; + } + + size_type size() const + { + return table_.size_; + } + + size_type max_size() const; + + + + iterator begin() + { + return iterator(table_.begin()); + } + + const_iterator begin() const + { + return const_iterator(table_.begin()); + } + + iterator end() + { + return iterator(); + } + + const_iterator end() const + { + return const_iterator(); + } + + const_iterator cbegin() const + { + return const_iterator(table_.begin()); + } + + const_iterator cend() const + { + return const_iterator(); + } +# 741 "../boost/unordered/unordered_map.hpp" + iterator emplace( + boost::unordered::detail::empty_emplace + = boost::unordered::detail::empty_emplace(), + value_type v = value_type()) + { + return this->emplace(boost::move(v)); + } + + iterator emplace_hint(const_iterator hint, + boost::unordered::detail::empty_emplace + = boost::unordered::detail::empty_emplace(), + value_type v = value_type() + ) + { + return this->emplace_hint(hint, boost::move(v)); + } + + + + template + iterator emplace(const A0 & a0) + { + return table_.emplace( + boost::unordered::detail::create_emplace_args( + boost::forward(a0)) + ); + } + + template + iterator emplace_hint(const_iterator, const A0 & a0) + { + return table_.emplace( + boost::unordered::detail::create_emplace_args( + boost::forward(a0)) + ); + } + + template + iterator emplace( + const A0 & a0, + const A1 & a1) + { + return table_.emplace( + boost::unordered::detail::create_emplace_args( + boost::forward(a0), + boost::forward(a1)) + ); + } + + template + iterator emplace_hint(const_iterator, + const A0 & a0, + const A1 & a1) + { + return table_.emplace( + boost::unordered::detail::create_emplace_args( + boost::forward(a0), + boost::forward(a1)) + ); + } + + template + iterator emplace( + const A0 & a0, + const A1 & a1, + const A2 & a2) + { + return table_.emplace( + boost::unordered::detail::create_emplace_args( + boost::forward(a0), + boost::forward(a1), + boost::forward(a2)) + ); + } + + template + iterator emplace_hint(const_iterator, + const A0 & a0, + const A1 & a1, + const A2 & a2) + { + return table_.emplace( + boost::unordered::detail::create_emplace_args( + boost::forward(a0), + boost::forward(a1), + boost::forward(a2)) + ); + } +# 860 "../boost/unordered/unordered_map.hpp" + + template < typename A0 , typename A1 , typename A2 , typename A3 > iterator emplace( const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 ) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0) , boost::forward(a1) , boost::forward(a2) , boost::forward(a3) )); } template < typename A0 , typename A1 , typename A2 , typename A3 > iterator emplace_hint( const_iterator, const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 ) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0) , boost::forward(a1) , boost::forward(a2) , boost::forward(a3) )); } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 > iterator emplace( const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 ) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0) , boost::forward(a1) , boost::forward(a2) , boost::forward(a3) , boost::forward(a4) )); } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 > iterator emplace_hint( const_iterator, const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 ) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0) , boost::forward(a1) , boost::forward(a2) , boost::forward(a3) , boost::forward(a4) )); } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 > iterator emplace( const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 , const A5 & a5 ) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0) , boost::forward(a1) , boost::forward(a2) , boost::forward(a3) , boost::forward(a4) , boost::forward(a5) )); } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 > iterator emplace_hint( const_iterator, const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 , const A5 & a5 ) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0) , boost::forward(a1) , boost::forward(a2) , boost::forward(a3) , boost::forward(a4) , boost::forward(a5) )); } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 > iterator emplace( const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 , const A5 & a5 , const A6 & a6 ) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0) , boost::forward(a1) , boost::forward(a2) , boost::forward(a3) , boost::forward(a4) , boost::forward(a5) , boost::forward(a6) )); } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 > iterator emplace_hint( const_iterator, const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 , const A5 & a5 , const A6 & a6 ) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0) , boost::forward(a1) , boost::forward(a2) , boost::forward(a3) , boost::forward(a4) , boost::forward(a5) , boost::forward(a6) )); } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 > iterator emplace( const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 , const A5 & a5 , const A6 & a6 , const A7 & a7 ) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0) , boost::forward(a1) , boost::forward(a2) , boost::forward(a3) , boost::forward(a4) , boost::forward(a5) , boost::forward(a6) , boost::forward(a7) )); } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 > iterator emplace_hint( const_iterator, const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 , const A5 & a5 , const A6 & a6 , const A7 & a7 ) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0) , boost::forward(a1) , boost::forward(a2) , boost::forward(a3) , boost::forward(a4) , boost::forward(a5) , boost::forward(a6) , boost::forward(a7) )); } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 > iterator emplace( const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 , const A5 & a5 , const A6 & a6 , const A7 & a7 , const A8 & a8 ) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0) , boost::forward(a1) , boost::forward(a2) , boost::forward(a3) , boost::forward(a4) , boost::forward(a5) , boost::forward(a6) , boost::forward(a7) , boost::forward(a8) )); } template < typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 > iterator emplace_hint( const_iterator, const A0 & a0 , const A1 & a1 , const A2 & a2 , const A3 & a3 , const A4 & a4 , const A5 & a5 , const A6 & a6 , const A7 & a7 , const A8 & a8 ) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0) , boost::forward(a1) , boost::forward(a2) , boost::forward(a3) , boost::forward(a4) , boost::forward(a5) , boost::forward(a6) , boost::forward(a7) , boost::forward(a8) )); } + + + + + + iterator insert(value_type const& x) + { + return this->emplace(x); + } + + iterator insert(::boost::rv< value_type >& x) + { + return this->emplace(boost::move(x)); + } + + iterator insert(const_iterator hint, value_type const& x) + { + return this->emplace_hint(hint, x); + } + + iterator insert(const_iterator hint, ::boost::rv< value_type >& x) + { + return this->emplace_hint(hint, boost::move(x)); + } + + template void insert(InputIt, InputIt); + + + + + + iterator erase(const_iterator); + size_type erase(const key_type&); + iterator erase(const_iterator, const_iterator); + void quick_erase(const_iterator it) { erase(it); } + void erase_return_void(const_iterator it) { erase(it); } + + void clear(); + void swap(unordered_multimap&); + + + + hasher hash_function() const; + key_equal key_eq() const; + + + + iterator find(const key_type&); + const_iterator find(const key_type&) const; + + template + iterator find( + CompatibleKey const&, + CompatibleHash const&, + CompatiblePredicate const&); + + template + const_iterator find( + CompatibleKey const&, + CompatibleHash const&, + CompatiblePredicate const&) const; + + size_type count(const key_type&) const; + + std::pair + equal_range(const key_type&); + std::pair + equal_range(const key_type&) const; + + + + size_type bucket_count() const + { + return table_.bucket_count_; + } + + size_type max_bucket_count() const + { + return table_.max_bucket_count(); + } + + size_type bucket_size(size_type) const; + + size_type bucket(const key_type& k) const + { + return table_.hash_function()(k) % table_.bucket_count_; + } + + local_iterator begin(size_type n) + { + return table_.size_ ? local_iterator( + table_.get_start(n), n, table_.bucket_count_) : + local_iterator(); + } + + const_local_iterator begin(size_type n) const + { + return table_.size_ ? const_local_iterator( + table_.get_start(n), n, table_.bucket_count_) : + const_local_iterator(); + } + + local_iterator end(size_type) + { + return local_iterator(); + } + + const_local_iterator end(size_type) const + { + return const_local_iterator(); + } + + const_local_iterator cbegin(size_type n) const + { + return table_.size_ ? const_local_iterator( + table_.get_start(n), n, table_.bucket_count_) : + const_local_iterator(); + } + + const_local_iterator cend(size_type) const + { + return const_local_iterator(); + } + + + + float max_load_factor() const + { + return table_.mlf_; + } + + float load_factor() const; + void max_load_factor(float); + void rehash(size_type); + + + friend bool operator==( + unordered_multimap const&, unordered_multimap const&); + friend bool operator!=( + unordered_multimap const&, unordered_multimap const&); + + }; + + + + template + unordered_map::unordered_map( + size_type n, const hasher &hf, const key_equal &eql, + const allocator_type &a) + : table_(n, hf, eql, a) + { + } + + template + unordered_map::unordered_map(allocator_type const& a) + : table_(boost::unordered::detail::default_bucket_count, + hasher(), key_equal(), a) + { + } + + template + unordered_map::unordered_map( + unordered_map const& other, allocator_type const& a) + : table_(other.table_, a) + { + } + + template + template + unordered_map::unordered_map(InputIt f, InputIt l) + : table_(boost::unordered::detail::initial_size(f, l), + hasher(), key_equal(), allocator_type()) + { + table_.insert_range(f, l); + } + + template + template + unordered_map::unordered_map( + InputIt f, InputIt l, + size_type n, + const hasher &hf, + const key_equal &eql) + : table_(boost::unordered::detail::initial_size(f, l, n), + hf, eql, allocator_type()) + { + table_.insert_range(f, l); + } + + template + template + unordered_map::unordered_map( + InputIt f, InputIt l, + size_type n, + const hasher &hf, + const key_equal &eql, + const allocator_type &a) + : table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, a) + { + table_.insert_range(f, l); + } + + template + unordered_map::~unordered_map() {} + + template + unordered_map::unordered_map( + unordered_map const& other) + : table_(other.table_) + { + } +# 1114 "../boost/unordered/unordered_map.hpp" + template + std::size_t unordered_map::max_size() const + { + return table_.max_size(); + } + + + + template + template + void unordered_map::insert(InputIt first, InputIt last) + { + table_.insert_range(first, last); + } +# 1138 "../boost/unordered/unordered_map.hpp" + template + typename unordered_map::iterator + unordered_map::erase(const_iterator position) + { + return iterator(table_.erase(position.node_)); + } + + template + typename unordered_map::size_type + unordered_map::erase(const key_type& k) + { + return table_.erase_key(k); + } + + template + typename unordered_map::iterator + unordered_map::erase( + const_iterator first, const_iterator last) + { + return iterator(table_.erase_range(first.node_, last.node_)); + } + + template + void unordered_map::clear() + { + table_.clear(); + } + + template + void unordered_map::swap(unordered_map& other) + { + table_.swap(other.table_); + } + + + + template + typename unordered_map::hasher + unordered_map::hash_function() const + { + return table_.hash_function(); + } + + template + typename unordered_map::key_equal + unordered_map::key_eq() const + { + return table_.key_eq(); + } + + template + typename unordered_map::mapped_type& + unordered_map::operator[](const key_type &k) + { + return table_[k].second; + } + + template + typename unordered_map::mapped_type& + unordered_map::at(const key_type& k) + { + return table_.at(k).second; + } + + template + typename unordered_map::mapped_type const& + unordered_map::at(const key_type& k) const + { + return table_.at(k).second; + } + + + + template + typename unordered_map::iterator + unordered_map::find(const key_type& k) + { + return iterator(table_.find_node(k)); + } + + template + typename unordered_map::const_iterator + unordered_map::find(const key_type& k) const + { + return const_iterator(table_.find_node(k)); + } + + template + template + typename unordered_map::iterator + unordered_map::find( + CompatibleKey const& k, + CompatibleHash const& hash, + CompatiblePredicate const& eq) + { + return iterator(table_.generic_find_node(k, hash, eq)); + } + + template + template + typename unordered_map::const_iterator + unordered_map::find( + CompatibleKey const& k, + CompatibleHash const& hash, + CompatiblePredicate const& eq) const + { + return const_iterator(table_.generic_find_node(k, hash, eq)); + } + + template + typename unordered_map::size_type + unordered_map::count(const key_type& k) const + { + return table_.count(k); + } + + template + std::pair< + typename unordered_map::iterator, + typename unordered_map::iterator> + unordered_map::equal_range(const key_type& k) + { + return table_.equal_range(k); + } + + template + std::pair< + typename unordered_map::const_iterator, + typename unordered_map::const_iterator> + unordered_map::equal_range(const key_type& k) const + { + return table_.equal_range(k); + } + + template + typename unordered_map::size_type + unordered_map::bucket_size(size_type n) const + { + return table_.bucket_size(n); + } + + + + template + float unordered_map::load_factor() const + { + return table_.load_factor(); + } + + template + void unordered_map::max_load_factor(float m) + { + table_.max_load_factor(m); + } + + template + void unordered_map::rehash(size_type n) + { + table_.rehash(n); + } + + template + inline bool operator==( + unordered_map const& m1, + unordered_map const& m2) + { + + + + return m1.table_.equals(m2.table_); + } + + template + inline bool operator!=( + unordered_map const& m1, + unordered_map const& m2) + { + + + + return !m1.table_.equals(m2.table_); + } + + template + inline void swap( + unordered_map &m1, + unordered_map &m2) + { + + + + m1.swap(m2); + } + + + + template + unordered_multimap::unordered_multimap( + size_type n, const hasher &hf, const key_equal &eql, + const allocator_type &a) + : table_(n, hf, eql, a) + { + } + + template + unordered_multimap::unordered_multimap(allocator_type const& a) + : table_(boost::unordered::detail::default_bucket_count, + hasher(), key_equal(), a) + { + } + + template + unordered_multimap::unordered_multimap( + unordered_multimap const& other, allocator_type const& a) + : table_(other.table_, a) + { + } + + template + template + unordered_multimap::unordered_multimap(InputIt f, InputIt l) + : table_(boost::unordered::detail::initial_size(f, l), + hasher(), key_equal(), allocator_type()) + { + table_.insert_range(f, l); + } + + template + template + unordered_multimap::unordered_multimap( + InputIt f, InputIt l, + size_type n, + const hasher &hf, + const key_equal &eql) + : table_(boost::unordered::detail::initial_size(f, l, n), + hf, eql, allocator_type()) + { + table_.insert_range(f, l); + } + + template + template + unordered_multimap::unordered_multimap( + InputIt f, InputIt l, + size_type n, + const hasher &hf, + const key_equal &eql, + const allocator_type &a) + : table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, a) + { + table_.insert_range(f, l); + } + + template + unordered_multimap::~unordered_multimap() {} + + template + unordered_multimap::unordered_multimap( + unordered_multimap const& other) + : table_(other.table_) + { + } +# 1441 "../boost/unordered/unordered_map.hpp" + template + std::size_t unordered_multimap::max_size() const + { + return table_.max_size(); + } + + + + template + template + void unordered_multimap::insert(InputIt first, InputIt last) + { + table_.insert_range(first, last); + } +# 1465 "../boost/unordered/unordered_map.hpp" + template + typename unordered_multimap::iterator + unordered_multimap::erase(const_iterator position) + { + return iterator(table_.erase(position.node_)); + } + + template + typename unordered_multimap::size_type + unordered_multimap::erase(const key_type& k) + { + return table_.erase_key(k); + } + + template + typename unordered_multimap::iterator + unordered_multimap::erase( + const_iterator first, const_iterator last) + { + return iterator(table_.erase_range(first.node_, last.node_)); + } + + template + void unordered_multimap::clear() + { + table_.clear(); + } + + template + void unordered_multimap::swap(unordered_multimap& other) + { + table_.swap(other.table_); + } + + + + template + typename unordered_multimap::hasher + unordered_multimap::hash_function() const + { + return table_.hash_function(); + } + + template + typename unordered_multimap::key_equal + unordered_multimap::key_eq() const + { + return table_.key_eq(); + } + + + + template + typename unordered_multimap::iterator + unordered_multimap::find(const key_type& k) + { + return iterator(table_.find_node(k)); + } + + template + typename unordered_multimap::const_iterator + unordered_multimap::find(const key_type& k) const + { + return const_iterator(table_.find_node(k)); + } + + template + template + typename unordered_multimap::iterator + unordered_multimap::find( + CompatibleKey const& k, + CompatibleHash const& hash, + CompatiblePredicate const& eq) + { + return iterator(table_.generic_find_node(k, hash, eq)); + } + + template + template + typename unordered_multimap::const_iterator + unordered_multimap::find( + CompatibleKey const& k, + CompatibleHash const& hash, + CompatiblePredicate const& eq) const + { + return const_iterator(table_.generic_find_node(k, hash, eq)); + } + + template + typename unordered_multimap::size_type + unordered_multimap::count(const key_type& k) const + { + return table_.count(k); + } + + template + std::pair< + typename unordered_multimap::iterator, + typename unordered_multimap::iterator> + unordered_multimap::equal_range(const key_type& k) + { + return table_.equal_range(k); + } + + template + std::pair< + typename unordered_multimap::const_iterator, + typename unordered_multimap::const_iterator> + unordered_multimap::equal_range(const key_type& k) const + { + return table_.equal_range(k); + } + + template + typename unordered_multimap::size_type + unordered_multimap::bucket_size(size_type n) const + { + return table_.bucket_size(n); + } + + + + template + float unordered_multimap::load_factor() const + { + return table_.load_factor(); + } + + template + void unordered_multimap::max_load_factor(float m) + { + table_.max_load_factor(m); + } + + template + void unordered_multimap::rehash(size_type n) + { + table_.rehash(n); + } + + template + inline bool operator==( + unordered_multimap const& m1, + unordered_multimap const& m2) + { + + + + return m1.table_.equals(m2.table_); + } + + template + inline bool operator!=( + unordered_multimap const& m1, + unordered_multimap const& m2) + { + + + + return !m1.table_.equals(m2.table_); + } + + template + inline void swap( + unordered_multimap &m1, + unordered_multimap &m2) + { + + + + m1.swap(m2); + } + +} +} +# 17 "../boost/unordered_map.hpp" 2 +# 15 "quickbook/src/id_manager.cpp" 2 +# 1 "../boost/lexical_cast.hpp" 1 +# 50 "../boost/lexical_cast.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/climits" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/climits" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/climits" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include-fixed/limits.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/climits" 2 3 +# 51 "../boost/lexical_cast.hpp" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 52 "../boost/lexical_cast.hpp" 2 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstring" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstring" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstring" 3 +# 55 "../boost/lexical_cast.hpp" 2 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstdio" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstdio" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstdio" 3 + + +# 1 "/usr/include/stdio.h" 1 3 4 +# 30 "/usr/include/stdio.h" 3 4 +extern "C" { + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 35 "/usr/include/stdio.h" 2 3 4 +# 75 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/libio.h" 1 3 4 +# 32 "/usr/include/libio.h" 3 4 +# 1 "/usr/include/_G_config.h" 1 3 4 +# 15 "/usr/include/_G_config.h" 3 4 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 16 "/usr/include/_G_config.h" 2 3 4 + + + + +# 1 "/usr/include/wchar.h" 1 3 4 +# 21 "/usr/include/_G_config.h" 2 3 4 + +typedef struct +{ + __off_t __pos; + __mbstate_t __state; +} _G_fpos_t; +typedef struct +{ + __off64_t __pos; + __mbstate_t __state; +} _G_fpos64_t; +# 53 "/usr/include/_G_config.h" 3 4 +typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); +typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); +# 33 "/usr/include/libio.h" 2 3 4 +# 53 "/usr/include/libio.h" 3 4 +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stdarg.h" 1 3 4 +# 54 "/usr/include/libio.h" 2 3 4 +# 170 "/usr/include/libio.h" 3 4 +struct _IO_jump_t; struct _IO_FILE; +# 180 "/usr/include/libio.h" 3 4 +typedef void _IO_lock_t; + + + + + +struct _IO_marker { + struct _IO_marker *_next; + struct _IO_FILE *_sbuf; + + + + int _pos; +# 203 "/usr/include/libio.h" 3 4 +}; + + +enum __codecvt_result +{ + __codecvt_ok, + __codecvt_partial, + __codecvt_error, + __codecvt_noconv +}; +# 271 "/usr/include/libio.h" 3 4 +struct _IO_FILE { + int _flags; + + + + + char* _IO_read_ptr; + char* _IO_read_end; + char* _IO_read_base; + char* _IO_write_base; + char* _IO_write_ptr; + char* _IO_write_end; + char* _IO_buf_base; + char* _IO_buf_end; + + char *_IO_save_base; + char *_IO_backup_base; + char *_IO_save_end; + + struct _IO_marker *_markers; + + struct _IO_FILE *_chain; + + int _fileno; + + + + int _flags2; + + __off_t _old_offset; + + + + unsigned short _cur_column; + signed char _vtable_offset; + char _shortbuf[1]; + + + + _IO_lock_t *_lock; +# 319 "/usr/include/libio.h" 3 4 + __off64_t _offset; +# 328 "/usr/include/libio.h" 3 4 + void *__pad1; + void *__pad2; + void *__pad3; + void *__pad4; + size_t __pad5; + + int _mode; + + char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; + +}; + + + + + +struct _IO_FILE_plus; + +extern struct _IO_FILE_plus _IO_2_1_stdin_; +extern struct _IO_FILE_plus _IO_2_1_stdout_; +extern struct _IO_FILE_plus _IO_2_1_stderr_; +# 364 "/usr/include/libio.h" 3 4 +typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); + + + + + + + +typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, + size_t __n); + + + + + + + +typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); + + +typedef int __io_close_fn (void *__cookie); + + + + +typedef __io_read_fn cookie_read_function_t; +typedef __io_write_fn cookie_write_function_t; +typedef __io_seek_fn cookie_seek_function_t; +typedef __io_close_fn cookie_close_function_t; + + +typedef struct +{ + __io_read_fn *read; + __io_write_fn *write; + __io_seek_fn *seek; + __io_close_fn *close; +} _IO_cookie_io_functions_t; +typedef _IO_cookie_io_functions_t cookie_io_functions_t; + +struct _IO_cookie_file; + + +extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, + void *__cookie, _IO_cookie_io_functions_t __fns); + + + + +extern "C" { + + +extern int __underflow (_IO_FILE *); +extern int __uflow (_IO_FILE *); +extern int __overflow (_IO_FILE *, int); +# 460 "/usr/include/libio.h" 3 4 +extern int _IO_getc (_IO_FILE *__fp); +extern int _IO_putc (int __c, _IO_FILE *__fp); +extern int _IO_feof (_IO_FILE *__fp) throw (); +extern int _IO_ferror (_IO_FILE *__fp) throw (); + +extern int _IO_peekc_locked (_IO_FILE *__fp); + + + + + +extern void _IO_flockfile (_IO_FILE *) throw (); +extern void _IO_funlockfile (_IO_FILE *) throw (); +extern int _IO_ftrylockfile (_IO_FILE *) throw (); +# 490 "/usr/include/libio.h" 3 4 +extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, + __gnuc_va_list, int *__restrict); +extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, + __gnuc_va_list); +extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); +extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); + +extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); +extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); + +extern void _IO_free_backup_area (_IO_FILE *) throw (); +# 552 "/usr/include/libio.h" 3 4 +} +# 76 "/usr/include/stdio.h" 2 3 4 + + + + +typedef __gnuc_va_list va_list; +# 109 "/usr/include/stdio.h" 3 4 + + +typedef _G_fpos_t fpos_t; + + + + + +typedef _G_fpos64_t fpos64_t; +# 161 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/bits/stdio_lim.h" 1 3 4 +# 162 "/usr/include/stdio.h" 2 3 4 + + + +extern struct _IO_FILE *stdin; +extern struct _IO_FILE *stdout; +extern struct _IO_FILE *stderr; + + + + + + + +extern int remove (__const char *__filename) throw (); + +extern int rename (__const char *__old, __const char *__new) throw (); + + + + +extern int renameat (int __oldfd, __const char *__old, int __newfd, + __const char *__new) throw (); + + + + + + + + +extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__)); +# 202 "/usr/include/stdio.h" 3 4 +extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__)); + + + +extern char *tmpnam (char *__s) throw () __attribute__ ((__warn_unused_result__)); + + + + + +extern char *tmpnam_r (char *__s) throw () __attribute__ ((__warn_unused_result__)); +# 224 "/usr/include/stdio.h" 3 4 +extern char *tempnam (__const char *__dir, __const char *__pfx) + throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fclose (FILE *__stream); + + + + +extern int fflush (FILE *__stream); + +# 249 "/usr/include/stdio.h" 3 4 +extern int fflush_unlocked (FILE *__stream); +# 259 "/usr/include/stdio.h" 3 4 +extern int fcloseall (void); + + + + + + + + + +extern FILE *fopen (__const char *__restrict __filename, + __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *freopen (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +# 292 "/usr/include/stdio.h" 3 4 + + +extern FILE *fopen64 (__const char *__restrict __filename, + __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); +extern FILE *freopen64 (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *fdopen (int __fd, __const char *__modes) throw () __attribute__ ((__warn_unused_result__)); + + + + + +extern FILE *fopencookie (void *__restrict __magic_cookie, + __const char *__restrict __modes, + _IO_cookie_io_functions_t __io_funcs) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) + throw () __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () __attribute__ ((__warn_unused_result__)); + + + + + + +extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); + + + +extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, + int __modes, size_t __n) throw (); + + + + + +extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, + size_t __size) throw (); + + +extern void setlinebuf (FILE *__stream) throw (); + + + + + + + + +extern int fprintf (FILE *__restrict __stream, + __const char *__restrict __format, ...); + + + + +extern int printf (__const char *__restrict __format, ...); + +extern int sprintf (char *__restrict __s, + __const char *__restrict __format, ...) throw (); + + + + + +extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg); + + + + +extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); + +extern int vsprintf (char *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) throw (); + + + + + +extern int snprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, ...) + throw () __attribute__ ((__format__ (__printf__, 3, 4))); + +extern int vsnprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__printf__, 3, 0))); + + + + + + +extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, + __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__)); +extern int __asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + throw () __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +extern int asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + throw () __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +# 414 "/usr/include/stdio.h" 3 4 +extern int vdprintf (int __fd, __const char *__restrict __fmt, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 2, 0))); +extern int dprintf (int __fd, __const char *__restrict __fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); + + + + + + + + +extern int fscanf (FILE *__restrict __stream, + __const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); + + + + +extern int scanf (__const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); + +extern int sscanf (__const char *__restrict __s, + __const char *__restrict __format, ...) throw (); +# 465 "/usr/include/stdio.h" 3 4 + + + + + + + + +extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); + + +extern int vsscanf (__const char *__restrict __s, + __const char *__restrict __format, __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__scanf__, 2, 0))); +# 524 "/usr/include/stdio.h" 3 4 + + + + + + + + + +extern int fgetc (FILE *__stream); +extern int getc (FILE *__stream); + + + + + +extern int getchar (void); + +# 552 "/usr/include/stdio.h" 3 4 +extern int getc_unlocked (FILE *__stream); +extern int getchar_unlocked (void); +# 563 "/usr/include/stdio.h" 3 4 +extern int fgetc_unlocked (FILE *__stream); + + + + + + + + + + + +extern int fputc (int __c, FILE *__stream); +extern int putc (int __c, FILE *__stream); + + + + + +extern int putchar (int __c); + +# 596 "/usr/include/stdio.h" 3 4 +extern int fputc_unlocked (int __c, FILE *__stream); + + + + + + + +extern int putc_unlocked (int __c, FILE *__stream); +extern int putchar_unlocked (int __c); + + + + + + +extern int getw (FILE *__stream); + + +extern int putw (int __w, FILE *__stream); + + + + + + + + +extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) + __attribute__ ((__warn_unused_result__)); + + + + + + +extern char *gets (char *__s) __attribute__ ((__warn_unused_result__)); + +# 642 "/usr/include/stdio.h" 3 4 +extern char *fgets_unlocked (char *__restrict __s, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +# 658 "/usr/include/stdio.h" 3 4 +extern __ssize_t __getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern __ssize_t getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern __ssize_t getline (char **__restrict __lineptr, + size_t *__restrict __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); + + + + + +extern int puts (__const char *__s); + + + + + + +extern int ungetc (int __c, FILE *__stream); + + + + + + +extern size_t fread (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + +extern size_t fwrite (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __s) __attribute__ ((__warn_unused_result__)); + +# 719 "/usr/include/stdio.h" 3 4 +extern int fputs_unlocked (__const char *__restrict __s, + FILE *__restrict __stream); +# 730 "/usr/include/stdio.h" 3 4 +extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fseek (FILE *__stream, long int __off, int __whence); + + + + +extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)); + + + + +extern void rewind (FILE *__stream); + +# 766 "/usr/include/stdio.h" 3 4 +extern int fseeko (FILE *__stream, __off_t __off, int __whence); + + + + +extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__)); +# 785 "/usr/include/stdio.h" 3 4 + + + + + + +extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); + + + + +extern int fsetpos (FILE *__stream, __const fpos_t *__pos); +# 808 "/usr/include/stdio.h" 3 4 + + + +extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); +extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__)); +extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); +extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); + + + + +extern void clearerr (FILE *__stream) throw (); + +extern int feof (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + +extern int ferror (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern void clearerr_unlocked (FILE *__stream) throw (); +extern int feof_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); +extern int ferror_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern void perror (__const char *__s); + + + + + + +# 1 "/usr/include/bits/sys_errlist.h" 1 3 4 +# 27 "/usr/include/bits/sys_errlist.h" 3 4 +extern int sys_nerr; +extern __const char *__const sys_errlist[]; + + +extern int _sys_nerr; +extern __const char *__const _sys_errlist[]; +# 847 "/usr/include/stdio.h" 2 3 4 + + + + +extern int fileno (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern int fileno_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); +# 866 "/usr/include/stdio.h" 3 4 +extern FILE *popen (__const char *__command, __const char *__modes) __attribute__ ((__warn_unused_result__)); + + + + + +extern int pclose (FILE *__stream); + + + + + +extern char *ctermid (char *__s) throw (); + + + + + +extern char *cuserid (char *__s); + + + + +struct obstack; + + +extern int obstack_printf (struct obstack *__restrict __obstack, + __const char *__restrict __format, ...) + throw () __attribute__ ((__format__ (__printf__, 2, 3))); +extern int obstack_vprintf (struct obstack *__restrict __obstack, + __const char *__restrict __format, + __gnuc_va_list __args) + throw () __attribute__ ((__format__ (__printf__, 2, 0))); + + + + + + + +extern void flockfile (FILE *__stream) throw (); + + + +extern int ftrylockfile (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + + +extern void funlockfile (FILE *__stream) throw (); +# 927 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/bits/stdio.h" 1 3 4 +# 44 "/usr/include/bits/stdio.h" 3 4 +extern __inline __attribute__ ((__gnu_inline__)) int +getchar (void) +{ + return _IO_getc (stdin); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +fgetc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +getc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +getchar_unlocked (void) +{ + return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +putchar (int __c) +{ + return _IO_putc (__c, stdout); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +fputc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +putc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +putchar_unlocked (int __c) +{ + return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) __ssize_t +getline (char **__lineptr, size_t *__n, FILE *__stream) +{ + return __getdelim (__lineptr, __n, '\n', __stream); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +feof_unlocked (FILE *__stream) throw () +{ + return (((__stream)->_flags & 0x10) != 0); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +ferror_unlocked (FILE *__stream) throw () +{ + return (((__stream)->_flags & 0x20) != 0); +} +# 928 "/usr/include/stdio.h" 2 3 4 + + +# 1 "/usr/include/bits/stdio2.h" 1 3 4 +# 24 "/usr/include/bits/stdio2.h" 3 4 +extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, + __const char *__restrict __format, ...) throw (); +extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, + __const char *__restrict __format, + __gnuc_va_list __ap) throw (); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +sprintf (char *__restrict __s, __const char *__restrict __fmt, ...) throw () +{ + return __builtin___sprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vsprintf (char *__restrict __s, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () + +{ + return __builtin___vsprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} + + + +extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, __const char *__restrict __format, + ...) throw (); +extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, __const char *__restrict __format, + __gnuc_va_list __ap) throw (); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +snprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, ...) throw () + +{ + return __builtin___snprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vsnprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () + +{ + return __builtin___vsnprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} + + + + + +extern int __fprintf_chk (FILE *__restrict __stream, int __flag, + __const char *__restrict __format, ...); +extern int __printf_chk (int __flag, __const char *__restrict __format, ...); +extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, + __const char *__restrict __format, __gnuc_va_list __ap); +extern int __vprintf_chk (int __flag, __const char *__restrict __format, + __gnuc_va_list __ap); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +fprintf (FILE *__restrict __stream, __const char *__restrict __fmt, ...) +{ + return __fprintf_chk (__stream, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +printf (__const char *__restrict __fmt, ...) +{ + return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); +} + + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vprintf (__const char *__restrict __fmt, __gnuc_va_list __ap) +{ + + return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap); + + + +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vfprintf (FILE *__restrict __stream, + __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap); +} + + + +extern int __asprintf_chk (char **__restrict __ptr, int __flag, + __const char *__restrict __fmt, ...) + throw () __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__)); +extern int __vasprintf_chk (char **__restrict __ptr, int __flag, + __const char *__restrict __fmt, __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__)); +extern int __dprintf_chk (int __fd, int __flag, __const char *__restrict __fmt, + ...) __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __vdprintf_chk (int __fd, int __flag, + __const char *__restrict __fmt, __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 3, 0))); +extern int __obstack_printf_chk (struct obstack *__restrict __obstack, + int __flag, __const char *__restrict __format, + ...) + throw () __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack, + int __flag, + __const char *__restrict __format, + __gnuc_va_list __args) + throw () __attribute__ ((__format__ (__printf__, 3, 0))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () + +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +dprintf (int __fd, __const char *__restrict __fmt, ...) +{ + return __dprintf_chk (__fd, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, ...) throw () + +{ + return __obstack_printf_chk (__obstack, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +# 195 "/usr/include/bits/stdio2.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vasprintf (char **__restrict __ptr, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () + +{ + return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () + +{ + return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt, + __ap); +} + + + + + +extern char *__gets_chk (char *__str, size_t) __attribute__ ((__warn_unused_result__)); +extern char *__gets_warn (char *__str) __asm__ ("" "gets") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use fgets or getline instead, gets can't " "specify buffer size"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +gets (char *__str) +{ + if (__builtin_object_size (__str, 2 > 1) != (size_t) -1) + return __gets_chk (__str, __builtin_object_size (__str, 2 > 1)); + return __gets_warn (__str); +} + +extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") + + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_alias (__s, __n, __stream); +} + +extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") + + + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk") + + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + } + return __fread_alias (__ptr, __size, __n, __stream); +} + + +extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size, + int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked") + + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_unlocked_alias (__s, __n, __stream); +} + + + + +extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") + + + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk") + + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + } + + + if (__builtin_constant_p (__size) + && __builtin_constant_p (__n) + && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) + && __size * __n <= 8) + { + size_t __cnt = __size * __n; + char *__cptr = (char *) __ptr; + if (__cnt == 0) + return 0; + + for (; __cnt > 0; --__cnt) + { + int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++); + if (__c == (-1)) + break; + *__cptr++ = __c; + } + return (__cptr - (char *) __ptr) / __size; + } + + return __fread_unlocked_alias (__ptr, __size, __n, __stream); +} +# 931 "/usr/include/stdio.h" 2 3 4 + + + + + +} +# 45 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstdio" 2 3 +# 92 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstdio" 3 +namespace std +{ + using ::FILE; + using ::fpos_t; + + using ::clearerr; + using ::fclose; + using ::feof; + using ::ferror; + using ::fflush; + using ::fgetc; + using ::fgetpos; + using ::fgets; + using ::fopen; + using ::fprintf; + using ::fputc; + using ::fputs; + using ::fread; + using ::freopen; + using ::fscanf; + using ::fseek; + using ::fsetpos; + using ::ftell; + using ::fwrite; + using ::getc; + using ::getchar; + using ::gets; + using ::perror; + using ::printf; + using ::putc; + using ::putchar; + using ::puts; + using ::remove; + using ::rename; + using ::rewind; + using ::scanf; + using ::setbuf; + using ::setvbuf; + using ::sprintf; + using ::sscanf; + using ::tmpfile; + using ::tmpnam; + using ::ungetc; + using ::vfprintf; + using ::vprintf; + using ::vsprintf; +} +# 148 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstdio" 3 +namespace __gnu_cxx +{ +# 166 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstdio" 3 + using ::snprintf; + using ::vfscanf; + using ::vscanf; + using ::vsnprintf; + using ::vsscanf; + +} + +namespace std +{ + using ::__gnu_cxx::snprintf; + using ::__gnu_cxx::vfscanf; + using ::__gnu_cxx::vscanf; + using ::__gnu_cxx::vsnprintf; + using ::__gnu_cxx::vsscanf; +} +# 56 "../boost/lexical_cast.hpp" 2 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cmath" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cmath" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cmath" 3 +# 59 "../boost/lexical_cast.hpp" 2 + + + + + + + +# 1 "../boost/numeric/conversion/cast.hpp" 1 +# 32 "../boost/numeric/conversion/cast.hpp" +# 1 "../boost/type.hpp" 1 +# 9 "../boost/type.hpp" +namespace boost { + + + + template + struct type {}; + +} +# 33 "../boost/numeric/conversion/cast.hpp" 2 +# 1 "../boost/numeric/conversion/converter.hpp" 1 +# 13 "../boost/numeric/conversion/converter.hpp" +# 1 "../boost/numeric/conversion/conversion_traits.hpp" 1 +# 13 "../boost/numeric/conversion/conversion_traits.hpp" +# 1 "../boost/numeric/conversion/detail/conversion_traits.hpp" 1 +# 17 "../boost/numeric/conversion/detail/conversion_traits.hpp" +# 1 "../boost/numeric/conversion/detail/meta.hpp" 1 +# 17 "../boost/numeric/conversion/detail/meta.hpp" +# 1 "../boost/mpl/equal_to.hpp" 1 +# 19 "../boost/mpl/equal_to.hpp" +# 1 "../boost/mpl/aux_/comparison_op.hpp" 1 +# 27 "../boost/mpl/aux_/comparison_op.hpp" +# 1 "../boost/mpl/aux_/numeric_op.hpp" 1 +# 21 "../boost/mpl/aux_/numeric_op.hpp" +# 1 "../boost/mpl/numeric_cast.hpp" 1 +# 30 "../boost/mpl/numeric_cast.hpp" +namespace boost { namespace mpl { + + + +template< typename SourceTag, typename TargetTag > struct numeric_cast +{ + template< typename N > struct apply; +}; + +}} +# 22 "../boost/mpl/aux_/numeric_op.hpp" 2 +# 1 "../boost/mpl/apply_wrap.hpp" 1 +# 23 "../boost/mpl/aux_/numeric_op.hpp" 2 + +# 1 "../boost/mpl/tag.hpp" 1 +# 19 "../boost/mpl/tag.hpp" +# 1 "../boost/mpl/aux_/has_tag.hpp" 1 +# 19 "../boost/mpl/aux_/has_tag.hpp" +namespace boost { namespace mpl { namespace aux { +template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_tag { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; +}}} +# 20 "../boost/mpl/tag.hpp" 2 + + +namespace boost { namespace mpl { + +namespace aux { +template< typename T > struct tag_impl +{ + typedef typename T::tag type; +}; +} + +template< typename T, typename Default = void_ > struct tag + + : if_< + aux::has_tag + , aux::tag_impl + , Default + >::type +{ +# 48 "../boost/mpl/tag.hpp" +}; + +}} +# 25 "../boost/mpl/aux_/numeric_op.hpp" 2 +# 1 "../boost/mpl/aux_/numeric_cast_utils.hpp" 1 +# 18 "../boost/mpl/aux_/numeric_cast_utils.hpp" +# 1 "../boost/mpl/apply_wrap.hpp" 1 +# 19 "../boost/mpl/aux_/numeric_cast_utils.hpp" 2 +# 1 "../boost/mpl/aux_/config/forwarding.hpp" 1 +# 20 "../boost/mpl/aux_/numeric_cast_utils.hpp" 2 + +namespace boost { namespace mpl { namespace aux { + +template< + typename F + , typename Tag1 + , typename Tag2 + > +struct cast1st_impl +{ + template< typename N1, typename N2 > struct apply + + : apply_wrap2< + F + , typename apply_wrap1< numeric_cast,N1 >::type + , N2 + > + { +# 46 "../boost/mpl/aux_/numeric_cast_utils.hpp" + }; +}; + +template< + typename F + , typename Tag1 + , typename Tag2 + > +struct cast2nd_impl +{ + template< typename N1, typename N2 > struct apply + + : apply_wrap2< + F + , N1 + , typename apply_wrap1< numeric_cast,N2 >::type + > + { +# 72 "../boost/mpl/aux_/numeric_cast_utils.hpp" + }; +}; + +}}} +# 26 "../boost/mpl/aux_/numeric_op.hpp" 2 + + + +# 1 "../boost/mpl/aux_/msvc_eti_base.hpp" 1 +# 17 "../boost/mpl/aux_/msvc_eti_base.hpp" +# 1 "../boost/mpl/aux_/is_msvc_eti_arg.hpp" 1 +# 21 "../boost/mpl/aux_/is_msvc_eti_arg.hpp" +namespace boost { namespace mpl { namespace aux { +# 62 "../boost/mpl/aux_/is_msvc_eti_arg.hpp" +}}} +# 18 "../boost/mpl/aux_/msvc_eti_base.hpp" 2 + + + + +namespace boost { namespace mpl { namespace aux { +# 55 "../boost/mpl/aux_/msvc_eti_base.hpp" +template< typename T > struct msvc_eti_base + : T +{ + + msvc_eti_base(); + + typedef T type; +}; + + + +template<> struct msvc_eti_base +{ + typedef msvc_eti_base type; + typedef msvc_eti_base first; + typedef msvc_eti_base second; + typedef msvc_eti_base tag; + enum { value = 0 }; +}; + +}}} +# 30 "../boost/mpl/aux_/numeric_op.hpp" 2 +# 28 "../boost/mpl/aux_/comparison_op.hpp" 2 + + + + + + + +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/equal_to.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/equal_to.hpp" +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct equal_to_impl + : if_c< + ( Tag1::value + > Tag2::value + ) + + , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + + +template<> struct equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename T > struct equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename N1 = na + , typename N2 = na + > +struct equal_to + + : equal_to_impl< + typename equal_to_tag::type + , typename equal_to_tag::type + >::template apply< N1,N2 >::type +{ + + +}; + +template<> struct equal_to< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : equal_to< T1 , T2 > { }; }; template< typename Tag > struct lambda< equal_to< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef equal_to< na , na > result_; typedef equal_to< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< equal_to< T1 , T2 > > : int_<2> { }; template<> struct template_arity< equal_to< na , na > > : int_<-1> { }; } + +}} + +namespace boost { namespace mpl { + +template<> +struct equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( N1::value == N2::value ) > + { + }; +}; + +}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 36 "../boost/mpl/aux_/comparison_op.hpp" 2 +# 20 "../boost/mpl/equal_to.hpp" 2 +# 18 "../boost/numeric/conversion/detail/meta.hpp" 2 + + + + + +namespace boost { namespace numeric { namespace convdetail +{ + template< class T1, class T2> + struct equal_to + { + + + enum { x = ( T1::value == T2::value ) }; + + static const bool value = x; + + typedef mpl::bool_ type; +# 48 "../boost/numeric/conversion/detail/meta.hpp" + }; +# 59 "../boost/numeric/conversion/detail/meta.hpp" + template + struct ct_switch4 + { + typedef mpl::identity Case0TypeQ ; + typedef mpl::identity Case1TypeQ ; + + typedef equal_to is_case0 ; + typedef equal_to is_case1 ; + typedef equal_to is_case2 ; + + typedef mpl::if_ choose_2_3Q ; + typedef mpl::eval_if choose_1_2_3Q ; + + typedef typename + mpl::eval_if::type + type ; + } ; +# 97 "../boost/numeric/conversion/detail/meta.hpp" + template + struct for_both + { + typedef mpl::identity TF_Q ; + typedef mpl::identity TT_Q ; + + typedef typename mpl::not_::type not_expr0 ; + typedef typename mpl::not_::type not_expr1 ; + + typedef typename mpl::and_::type caseTT ; + typedef typename mpl::and_::type caseTF ; + typedef typename mpl::and_::type caseFT ; + + typedef mpl::if_ choose_FT_FF_Q ; + typedef mpl::eval_if choose_TF_FT_FF_Q ; + + typedef typename mpl::eval_if::type type ; + } ; + +} } } +# 18 "../boost/numeric/conversion/detail/conversion_traits.hpp" 2 +# 1 "../boost/numeric/conversion/detail/int_float_mixture.hpp" 1 +# 16 "../boost/numeric/conversion/detail/int_float_mixture.hpp" +# 1 "../boost/numeric/conversion/int_float_mixture_enum.hpp" 1 +# 13 "../boost/numeric/conversion/int_float_mixture_enum.hpp" +namespace boost { namespace numeric +{ + enum int_float_mixture_enum + { + integral_to_integral + ,integral_to_float + ,float_to_integral + ,float_to_float + } ; + +} } +# 17 "../boost/numeric/conversion/detail/int_float_mixture.hpp" 2 + + + + +namespace boost { namespace numeric { namespace convdetail +{ + + typedef mpl::integral_c int2int_c ; + typedef mpl::integral_c int2float_c ; + typedef mpl::integral_c float2int_c ; + typedef mpl::integral_c float2float_c ; + + + + + + + + template + struct get_int_float_mixture + { + typedef mpl::bool_< ::std::numeric_limits::is_integer > S_int ; + typedef mpl::bool_< ::std::numeric_limits::is_integer > T_int ; + + typedef typename + for_both::type + type ; + } ; +# 55 "../boost/numeric/conversion/detail/int_float_mixture.hpp" + template + struct for_int_float_mixture + { + typedef typename + ct_switch4::type + type ; + } ; + +} } } +# 19 "../boost/numeric/conversion/detail/conversion_traits.hpp" 2 +# 1 "../boost/numeric/conversion/detail/sign_mixture.hpp" 1 +# 16 "../boost/numeric/conversion/detail/sign_mixture.hpp" +# 1 "../boost/numeric/conversion/sign_mixture_enum.hpp" 1 +# 13 "../boost/numeric/conversion/sign_mixture_enum.hpp" +namespace boost { namespace numeric +{ + enum sign_mixture_enum + { + unsigned_to_unsigned + ,signed_to_signed + ,signed_to_unsigned + ,unsigned_to_signed + } ; + +} } +# 17 "../boost/numeric/conversion/detail/sign_mixture.hpp" 2 + + + + +namespace boost { namespace numeric { namespace convdetail +{ + + typedef mpl::integral_c unsig2unsig_c ; + typedef mpl::integral_c sig2sig_c ; + typedef mpl::integral_c sig2unsig_c ; + typedef mpl::integral_c unsig2sig_c ; + + + + + + + + template + struct get_sign_mixture + { + typedef mpl::bool_< ::std::numeric_limits::is_signed > S_signed ; + typedef mpl::bool_< ::std::numeric_limits::is_signed > T_signed ; + + typedef typename + for_both::type + type ; + } ; +# 55 "../boost/numeric/conversion/detail/sign_mixture.hpp" + template + struct for_sign_mixture + { + typedef typename + ct_switch4::type + type ; + } ; + +} } } +# 20 "../boost/numeric/conversion/detail/conversion_traits.hpp" 2 +# 1 "../boost/numeric/conversion/detail/udt_builtin_mixture.hpp" 1 +# 15 "../boost/numeric/conversion/detail/udt_builtin_mixture.hpp" +# 1 "../boost/numeric/conversion/udt_builtin_mixture_enum.hpp" 1 +# 13 "../boost/numeric/conversion/udt_builtin_mixture_enum.hpp" +namespace boost { namespace numeric +{ + enum udt_builtin_mixture_enum + { + builtin_to_builtin + ,builtin_to_udt + ,udt_to_builtin + ,udt_to_udt + } ; + +} } +# 16 "../boost/numeric/conversion/detail/udt_builtin_mixture.hpp" 2 + + + + +namespace boost { namespace numeric { namespace convdetail +{ + + typedef mpl::integral_c builtin2builtin_c ; + typedef mpl::integral_c builtin2udt_c ; + typedef mpl::integral_c udt2builtin_c ; + typedef mpl::integral_c udt2udt_c ; +# 37 "../boost/numeric/conversion/detail/udt_builtin_mixture.hpp" + template + struct for_udt_builtin_mixture + { + typedef typename + ct_switch4::type + type ; + } ; + + + + + + + + template + struct get_udt_builtin_mixture + { + typedef is_arithmetic S_builtin ; + typedef is_arithmetic T_builtin ; + + typedef typename + for_both::type + type ; + } ; + +} } } +# 21 "../boost/numeric/conversion/detail/conversion_traits.hpp" 2 +# 1 "../boost/numeric/conversion/detail/is_subranged.hpp" 1 +# 17 "../boost/numeric/conversion/detail/is_subranged.hpp" +# 1 "../boost/mpl/multiplies.hpp" 1 +# 17 "../boost/mpl/multiplies.hpp" +# 1 "../boost/mpl/times.hpp" 1 +# 19 "../boost/mpl/times.hpp" +# 1 "../boost/mpl/aux_/arithmetic_op.hpp" 1 +# 18 "../boost/mpl/aux_/arithmetic_op.hpp" +# 1 "../boost/mpl/aux_/largest_int.hpp" 1 +# 22 "../boost/mpl/aux_/largest_int.hpp" +namespace boost { namespace mpl { namespace aux { + +template< typename T > struct integral_rank; + +template<> struct integral_rank : int_<1> {}; +template<> struct integral_rank : int_<2> {}; +template<> struct integral_rank : int_<3> {}; +template<> struct integral_rank : int_<4> {}; + +template<> struct integral_rank : int_<5> {}; + +template<> struct integral_rank : int_<6> {}; +template<> struct integral_rank : int_<7> {}; +template<> struct integral_rank : int_<8> {}; +template<> struct integral_rank : int_<9> {}; +template<> struct integral_rank : int_<10> {}; +template<> struct integral_rank : int_<11> {}; + + +template<> struct integral_rank : int_<12> {}; +template<> struct integral_rank: int_<13> {}; + + +template< typename T1, typename T2 > struct largest_int + + : if_c< + ( integral_rank::value >= integral_rank::value ) + , T1 + , T2 + > +{ + + + + + + +}; + +}}} +# 19 "../boost/mpl/aux_/arithmetic_op.hpp" 2 + + + + + + + +# 1 "../boost/mpl/aux_/numeric_op.hpp" 1 +# 22 "../boost/mpl/aux_/numeric_op.hpp" +# 1 "../boost/mpl/apply_wrap.hpp" 1 +# 23 "../boost/mpl/aux_/numeric_op.hpp" 2 +# 27 "../boost/mpl/aux_/arithmetic_op.hpp" 2 + + + + + + + +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/times.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/times.hpp" +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct times_impl + : if_c< + ( Tag1::value + > Tag2::value + ) + + , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + + +template<> struct times_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct times_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct times_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename T > struct times_tag +{ + typedef typename T::tag type; +}; + +template< + typename N1 = na + , typename N2 = na + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct times + : times< times< times< times< N1,N2 >, N3>, N4>, N5> +{ + + + + + +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct times< N1,N2,N3,N4,na > + + : times< times< times< N1,N2 >, N3>, N4> +{ + + + + + +}; + +template< + typename N1, typename N2, typename N3 + > +struct times< N1,N2,N3,na,na > + + : times< times< N1,N2 >, N3> +{ + + + + + +}; + +template< + typename N1, typename N2 + > +struct times< N1,N2,na,na,na > + : times_impl< + typename times_tag::type + , typename times_tag::type + >::template apply< N1,N2 >::type +{ + + + + + + +}; + +template<> struct times< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : times< T1 , T2 > { }; }; template< typename Tag > struct lambda< times< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef times< na , na > result_; typedef times< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< times< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< times< na , na > > : int_<-1> { }; } + +}} + +namespace boost { namespace mpl { +template<> +struct times_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( N1::value + * N2::value + ) + > + { + }; +}; + +}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 35 "../boost/mpl/aux_/arithmetic_op.hpp" 2 +# 20 "../boost/mpl/times.hpp" 2 +# 18 "../boost/mpl/multiplies.hpp" 2 + + +# 1 "../boost/mpl/aux_/preprocessor/default_params.hpp" 1 +# 21 "../boost/mpl/multiplies.hpp" 2 + + + + + +namespace boost { namespace mpl { + + + + + + + +template< + typename N1 = na , typename N2 = na , typename N3 = na , typename N4 = na , typename N5 = na + > +struct multiplies + : times< N1 , N2 , N3 , N4 , N5 > +{ + + + + + +}; + +template<> struct multiplies< na , na , na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct apply : multiplies< T1 , T2 , T3 , T4 , T5 > { }; }; template< typename Tag > struct lambda< multiplies< na , na , na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef multiplies< na , na , na , na , na > result_; typedef multiplies< na , na , na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< multiplies< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< multiplies< na , na , na , na , na > > : int_<-1> { }; } + + + +}} +# 18 "../boost/numeric/conversion/detail/is_subranged.hpp" 2 +# 1 "../boost/mpl/less.hpp" 1 +# 19 "../boost/mpl/less.hpp" +# 1 "../boost/mpl/aux_/comparison_op.hpp" 1 +# 27 "../boost/mpl/aux_/comparison_op.hpp" +# 1 "../boost/mpl/aux_/numeric_op.hpp" 1 +# 22 "../boost/mpl/aux_/numeric_op.hpp" +# 1 "../boost/mpl/apply_wrap.hpp" 1 +# 23 "../boost/mpl/aux_/numeric_op.hpp" 2 +# 28 "../boost/mpl/aux_/comparison_op.hpp" 2 + + + + + + + +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/less.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/less.hpp" +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_impl + : if_c< + ( Tag1::value + > Tag2::value + ) + + , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + + +template<> struct less_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct less_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct less_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename T > struct less_tag +{ + typedef typename T::tag type; +}; + +template< + typename N1 = na + , typename N2 = na + > +struct less + + : less_impl< + typename less_tag::type + , typename less_tag::type + >::template apply< N1,N2 >::type +{ + + +}; + +template<> struct less< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : less< T1 , T2 > { }; }; template< typename Tag > struct lambda< less< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef less< na , na > result_; typedef less< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< less< T1 , T2 > > : int_<2> { }; template<> struct template_arity< less< na , na > > : int_<-1> { }; } + +}} + +namespace boost { namespace mpl { + +template<> +struct less_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( N2::value > N1::value ) > + { + }; +}; + +}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 36 "../boost/mpl/aux_/comparison_op.hpp" 2 +# 20 "../boost/mpl/less.hpp" 2 +# 19 "../boost/numeric/conversion/detail/is_subranged.hpp" 2 +# 28 "../boost/numeric/conversion/detail/is_subranged.hpp" +namespace boost { namespace numeric { namespace convdetail +{ + + + + + + template + struct subranged_Sig2Unsig + { + + + typedef mpl::true_ type ; + } ; + + + template + struct subranged_Unsig2Sig + { +# 62 "../boost/numeric/conversion/detail/is_subranged.hpp" + typedef mpl::int_< ::std::numeric_limits::digits > S_digits ; + typedef mpl::int_< ::std::numeric_limits::digits > T_digits ; + + + typedef typename T_digits::next u_T_digits ; + + typedef mpl::int_<2> Two ; + + typedef typename mpl::multiplies::type S_digits_times_2 ; + + typedef typename mpl::less::type type ; + } ; + + + template + struct subranged_SameSign + { + + + typedef mpl::int_< ::std::numeric_limits::digits > S_digits ; + typedef mpl::int_< ::std::numeric_limits::digits > T_digits ; + + typedef typename mpl::less::type type ; + } ; + + + template + struct subranged_Int2Float + { + typedef mpl::false_ type ; + } ; + + + template + struct subranged_Float2Int + { + typedef mpl::true_ type ; + } ; + + + template + struct subranged_Float2Float + { + + + + typedef mpl::int_< ::std::numeric_limits::digits > S_mantisa ; + typedef mpl::int_< ::std::numeric_limits::digits > T_mantisa ; + + typedef mpl::int_< ::std::numeric_limits::max_exponent > S_exponent ; + typedef mpl::int_< ::std::numeric_limits::max_exponent > T_exponent ; + + typedef typename mpl::less::type T_smaller_exponent ; + + typedef typename mpl::equal_to::type equal_exponents ; + + typedef mpl::less T_smaller_mantisa ; + + typedef mpl::eval_if not_bigger_exponent_case ; + + typedef typename + mpl::eval_if::type + type ; + } ; + + + template + struct subranged_Udt2BuiltIn + { + typedef mpl::true_ type ; + } ; + + + template + struct subranged_BuiltIn2Udt + { + typedef mpl::false_ type ; + } ; + + + template + struct subranged_Udt2Udt + { + typedef mpl::false_ type ; + } ; + + + + + + template + struct get_subranged_Int2Int + { + typedef subranged_SameSign Sig2Sig ; + typedef subranged_Sig2Unsig Sig2Unsig ; + typedef subranged_Unsig2Sig Unsig2Sig ; + typedef Sig2Sig Unsig2Unsig ; + + typedef typename get_sign_mixture::type sign_mixture ; + + typedef typename + for_sign_mixture::type + type ; + } ; + + template + struct get_subranged_BuiltIn2BuiltIn + { + typedef get_subranged_Int2Int Int2IntQ ; + + typedef subranged_Int2Float Int2Float ; + typedef subranged_Float2Int Float2Int ; + typedef subranged_Float2Float Float2Float ; + + typedef mpl::identity Int2FloatQ ; + typedef mpl::identity Float2IntQ ; + typedef mpl::identity Float2FloatQ ; + + typedef typename get_int_float_mixture::type int_float_mixture ; + + typedef for_int_float_mixture for_ ; + + typedef typename for_::type selected ; + + typedef typename selected::type type ; + } ; + + template + struct get_subranged + { + typedef get_subranged_BuiltIn2BuiltIn BuiltIn2BuiltInQ ; + + typedef subranged_BuiltIn2Udt BuiltIn2Udt ; + typedef subranged_Udt2BuiltIn Udt2BuiltIn ; + typedef subranged_Udt2Udt Udt2Udt ; + + typedef mpl::identity BuiltIn2UdtQ ; + typedef mpl::identity Udt2BuiltInQ ; + typedef mpl::identity Udt2UdtQ ; + + typedef typename get_udt_builtin_mixture::type udt_builtin_mixture ; + + typedef typename + for_udt_builtin_mixture::type + selected ; + + typedef typename selected::type selected2 ; + + typedef typename selected2::type type ; + } ; + + + + + + template + struct get_is_subranged + { + typedef get_subranged non_trivial_case ; + typedef mpl::identity trivial_case ; + + typedef is_same is_trivial ; + + typedef typename mpl::if_::type selected ; + + typedef typename selected::type type ; + } ; + +} } } +# 22 "../boost/numeric/conversion/detail/conversion_traits.hpp" 2 + +namespace boost { namespace numeric { namespace convdetail +{ + + + + + + template + struct non_trivial_traits_impl + { + typedef typename get_int_float_mixture ::type int_float_mixture ; + typedef typename get_sign_mixture ::type sign_mixture ; + typedef typename get_udt_builtin_mixture ::type udt_builtin_mixture ; + + typedef typename get_is_subranged::type subranged ; + + typedef mpl::false_ trivial ; + + typedef T target_type ; + typedef S source_type ; + typedef T result_type ; + + typedef typename mpl::if_< is_arithmetic, S, S const&>::type argument_type ; + + typedef typename mpl::if_::type supertype ; + typedef typename mpl::if_::type subtype ; + } ; + + + + + + + template + struct trivial_traits_impl + { + typedef typename get_int_float_mixture ::type int_float_mixture ; + typedef typename get_sign_mixture ::type sign_mixture ; + typedef typename get_udt_builtin_mixture::type udt_builtin_mixture ; + + typedef mpl::false_ subranged ; + typedef mpl::true_ trivial ; + + typedef N target_type ; + typedef N source_type ; + typedef N const& result_type ; + typedef N const& argument_type ; + + typedef N supertype ; + typedef N subtype ; + + } ; + + + + + template + struct get_conversion_traits + { + typedef typename remove_cv::type target_type ; + typedef typename remove_cv::type source_type ; + + typedef typename is_same::type is_trivial ; + + typedef trivial_traits_impl trivial_imp ; + typedef non_trivial_traits_impl non_trivial_imp ; + + typedef typename mpl::if_::type type ; + } ; + +} } } +# 14 "../boost/numeric/conversion/conversion_traits.hpp" 2 + + + +namespace boost { namespace numeric +{ + +template +struct conversion_traits + : convdetail::get_conversion_traits::type +{ + + + + + + + +} ; + +} } +# 14 "../boost/numeric/conversion/converter.hpp" 2 +# 1 "../boost/numeric/conversion/converter_policies.hpp" 1 +# 24 "../boost/numeric/conversion/converter_policies.hpp" +namespace boost { namespace numeric +{ + +template +struct Trunc +{ + typedef S source_type ; + + typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; + + static source_type nearbyint ( argument_type s ) + { + + using std::floor ; + using std::ceil ; + + + return s < static_cast(0) ? ceil(s) : floor(s) ; + } + + typedef mpl::integral_c< std::float_round_style, std::round_toward_zero> round_style ; +} ; + + + +template +struct Floor +{ + typedef S source_type ; + + typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; + + static source_type nearbyint ( argument_type s ) + { + + using std::floor ; + + + return floor(s) ; + } + + typedef mpl::integral_c< std::float_round_style, std::round_toward_neg_infinity> round_style ; +} ; + +template +struct Ceil +{ + typedef S source_type ; + + typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; + + static source_type nearbyint ( argument_type s ) + { + + using std::ceil ; + + + return ceil(s) ; + } + + typedef mpl::integral_c< std::float_round_style, std::round_toward_infinity> round_style ; +} ; + +template +struct RoundEven +{ + typedef S source_type ; + + typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; + + static source_type nearbyint ( argument_type s ) + { + + + + using std::floor ; + using std::ceil ; + + + + S prev = floor(s); + S next = ceil(s); + + S rt = (s - prev) - (next - s); + + S const zero(0.0); + S const two(2.0); + + if ( rt < zero ) + return prev; + else if ( rt > zero ) + return next; + else + { + bool is_prev_even = two * floor(prev / two) == prev ; + return ( is_prev_even ? prev : next ) ; + } + } + + typedef mpl::integral_c< std::float_round_style, std::round_to_nearest> round_style ; +} ; + + +enum range_check_result +{ + cInRange = 0 , + cNegOverflow = 1 , + cPosOverflow = 2 +} ; + +class bad_numeric_cast : public std::bad_cast +{ + public: + + virtual const char * what() const throw() + { return "bad numeric conversion: overflow"; } +}; + +class negative_overflow : public bad_numeric_cast +{ + public: + + virtual const char * what() const throw() + { return "bad numeric conversion: negative overflow"; } +}; +class positive_overflow : public bad_numeric_cast +{ + public: + + virtual const char * what() const throw() + { return "bad numeric conversion: positive overflow"; } +}; + +struct def_overflow_handler +{ + void operator() ( range_check_result r ) + { + if ( r == cNegOverflow ) + throw negative_overflow() ; + else if ( r == cPosOverflow ) + throw positive_overflow() ; + } +} ; + +struct silent_overflow_handler +{ + void operator() ( range_check_result ) {} +} ; + +template +struct raw_converter +{ + typedef typename Traits::result_type result_type ; + typedef typename Traits::argument_type argument_type ; + + static result_type low_level_convert ( argument_type s ) { return static_cast(s) ; } +} ; + +struct UseInternalRangeChecker {} ; + +} } +# 15 "../boost/numeric/conversion/converter.hpp" 2 + +# 1 "../boost/numeric/conversion/detail/converter.hpp" 1 +# 17 "../boost/numeric/conversion/detail/converter.hpp" +# 1 "../boost/numeric/conversion/bounds.hpp" 1 +# 13 "../boost/numeric/conversion/bounds.hpp" +# 1 "../boost/numeric/conversion/detail/bounds.hpp" 1 +# 17 "../boost/numeric/conversion/detail/bounds.hpp" +namespace boost { namespace numeric { namespace boundsdetail +{ + template + class Integral + { + typedef std::numeric_limits limits ; + + public : + + static N lowest () { return limits::min (); } + static N highest () { return limits::max (); } + static N smallest() { return static_cast(1); } + } ; + + template + class Float + { + typedef std::numeric_limits limits ; + + public : + + static N lowest () { return static_cast(-limits::max ()) ; } + static N highest () { return limits::max (); } + static N smallest() { return limits::min (); } + } ; + + template + struct get_impl + { + typedef mpl::bool_< ::std::numeric_limits::is_integer > is_int ; + + typedef Integral impl_int ; + typedef Float impl_float ; + + typedef typename mpl::if_::type type ; + } ; + +} } } +# 14 "../boost/numeric/conversion/bounds.hpp" 2 + +namespace boost { namespace numeric +{ + +template +struct bounds : boundsdetail::get_impl::type +{} ; + +} } +# 18 "../boost/numeric/conversion/detail/converter.hpp" 2 + + + + + +namespace boost { namespace numeric { namespace convdetail +{ + + typedef mpl::integral_c round2zero_c ; + typedef mpl::integral_c round2nearest_c ; + typedef mpl::integral_c round2inf_c ; + typedef mpl::integral_c round2neg_inf_c ; +# 40 "../boost/numeric/conversion/detail/converter.hpp" + template + struct for_round_style + { + typedef ct_switch4 selector ; + + typedef typename selector::type type ; + } ; +# 81 "../boost/numeric/conversion/detail/converter.hpp" + struct non_applicable { typedef mpl::false_ do_apply ; } ; + struct applicable { typedef mpl::true_ do_apply ; } ; +# 96 "../boost/numeric/conversion/detail/converter.hpp" + template + struct LT_LoT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s < static_cast(bounds::lowest()) ? cNegOverflow : cInRange ; + } + } ; + + + + template + struct LT_Zero : applicable + { + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s < static_cast(0) ? cNegOverflow : cInRange ; + } + } ; + + + + template + struct LE_PrevLoT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s <= static_cast(bounds::lowest()) - static_cast(1.0) + ? cNegOverflow : cInRange ; + } + } ; + + + + template + struct LT_HalfPrevLoT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s < static_cast(bounds::lowest()) - static_cast(0.5) + ? cNegOverflow : cInRange ; + } + } ; + + + + template + struct GT_HiT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s > static_cast(bounds::highest()) + ? cPosOverflow : cInRange ; + } + } ; + + + + template + struct GE_SuccHiT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s >= static_cast(bounds::highest()) + static_cast(1.0) + ? cPosOverflow : cInRange ; + } + } ; + + + + template + struct GT_HalfSuccHiT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s >= static_cast(bounds::highest()) + static_cast(0.5) + ? cPosOverflow : cInRange ; + } + } ; +# 215 "../boost/numeric/conversion/detail/converter.hpp" + template + struct applyBoth + { + typedef typename PredA::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + range_check_result r = PredA::apply(s) ; + if ( r == cInRange ) + r = PredB::apply(s); + return r ; + } + } ; + + template + struct combine + { + typedef applyBoth Both ; + typedef void NNone ; + + typedef typename PredA::do_apply do_applyA ; + typedef typename PredB::do_apply do_applyB ; + + typedef typename for_both::type type ; + } ; +# 262 "../boost/numeric/conversion/detail/converter.hpp" + template + struct dummy_range_checker + { + typedef typename Traits::argument_type argument_type ; + + static range_check_result out_of_range ( argument_type ) { return cInRange ; } + static void validate_range ( argument_type ) {} + } ; +# 279 "../boost/numeric/conversion/detail/converter.hpp" + template + struct generic_range_checker + { + typedef OverflowHandler overflow_handler ; + + typedef typename Traits::argument_type argument_type ; + + static range_check_result out_of_range ( argument_type s ) + { + typedef typename combine::type Predicate ; + + return Predicate::apply(s); + } + + static void validate_range ( argument_type s ) + { OverflowHandler()( out_of_range(s) ) ; } + } ; +# 305 "../boost/numeric/conversion/detail/converter.hpp" + template + struct GetRC_Sig2Sig_or_Unsig2Unsig + { + typedef dummy_range_checker Dummy ; + + typedef LT_LoT Pred1 ; + typedef GT_HiT Pred2 ; + + typedef generic_range_checker Normal ; + + typedef typename Traits::subranged subranged ; + + typedef typename mpl::if_::type type ; + } ; + + template + struct GetRC_Sig2Unsig + { + typedef LT_Zero Pred1 ; + typedef GT_HiT Pred2 ; + + typedef generic_range_checker ChoiceA ; + + typedef generic_range_checker ChoiceB ; + + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + + typedef typename subranged_Unsig2Sig::type oposite_subranged ; + + typedef typename mpl::not_::type positively_subranged ; + + typedef typename mpl::if_::type type ; + } ; + + template + struct GetRC_Unsig2Sig + { + typedef GT_HiT Pred1 ; + + typedef generic_range_checker type ; + } ; + + template + struct GetRC_Int2Int + { + typedef GetRC_Sig2Sig_or_Unsig2Unsig Sig2SigQ ; + typedef GetRC_Sig2Unsig Sig2UnsigQ ; + typedef GetRC_Unsig2Sig Unsig2SigQ ; + typedef Sig2SigQ Unsig2UnsigQ ; + + typedef typename Traits::sign_mixture sign_mixture ; + + typedef typename + for_sign_mixture::type + selector ; + + typedef typename selector::type type ; + } ; + + template + struct GetRC_Int2Float + { + typedef dummy_range_checker type ; + } ; + + template + struct GetRC_Float2Int + { + typedef LE_PrevLoT Pred1 ; + typedef GE_SuccHiT Pred2 ; + typedef LT_HalfPrevLoT Pred3 ; + typedef GT_HalfSuccHiT Pred4 ; + typedef GT_HiT Pred5 ; + typedef LT_LoT Pred6 ; + + typedef generic_range_checker ToZero ; + typedef generic_range_checker ToNearest ; + typedef generic_range_checker ToInf ; + typedef generic_range_checker ToNegInf ; + + typedef typename Float2IntRounder::round_style round_style ; + + typedef typename for_round_style::type type ; + } ; + + template + struct GetRC_Float2Float + { + typedef dummy_range_checker Dummy ; + + typedef LT_LoT Pred1 ; + typedef GT_HiT Pred2 ; + + typedef generic_range_checker Normal ; + + typedef typename Traits::subranged subranged ; + + typedef typename mpl::if_::type type ; + } ; + + template + struct GetRC_BuiltIn2BuiltIn + { + typedef GetRC_Int2Int Int2IntQ ; + typedef GetRC_Int2Float Int2FloatQ ; + typedef GetRC_Float2Int Float2IntQ ; + typedef GetRC_Float2Float Float2FloatQ ; + + typedef typename Traits::int_float_mixture int_float_mixture ; + + typedef typename for_int_float_mixture::type selector ; + + typedef typename selector::type type ; + } ; + + template + struct GetRC + { + typedef GetRC_BuiltIn2BuiltIn BuiltIn2BuiltInQ ; + + typedef dummy_range_checker Dummy ; + + typedef mpl::identity DummyQ ; + + typedef typename Traits::udt_builtin_mixture udt_builtin_mixture ; + + typedef typename for_udt_builtin_mixture::type selector ; + + typedef typename selector::type type ; + } ; +# 452 "../boost/numeric/conversion/detail/converter.hpp" + template + struct trivial_converter_impl : public std::unary_function< typename Traits::argument_type + ,typename Traits::result_type + > + ,public dummy_range_checker + { + typedef Traits traits ; + + typedef typename Traits::source_type source_type ; + typedef typename Traits::argument_type argument_type ; + typedef typename Traits::result_type result_type ; + + static result_type low_level_convert ( argument_type s ) { return s ; } + static source_type nearbyint ( argument_type s ) { return s ; } + static result_type convert ( argument_type s ) { return s ; } + } ; + + + + + + template + struct rounding_converter : public std::unary_function< typename Traits::argument_type + ,typename Traits::result_type + > + ,public RangeChecker + ,public Float2IntRounder + ,public RawConverter + { + typedef RangeChecker RangeCheckerBase ; + typedef Float2IntRounder Float2IntRounderBase ; + typedef RawConverter RawConverterBase ; + + typedef Traits traits ; + + typedef typename Traits::source_type source_type ; + typedef typename Traits::argument_type argument_type ; + typedef typename Traits::result_type result_type ; + + static result_type convert ( argument_type s ) + { + RangeCheckerBase::validate_range(s); + source_type s1 = Float2IntRounderBase::nearbyint(s); + return RawConverterBase::low_level_convert(s1); + } + } ; + + + + + + template + struct non_rounding_converter : public std::unary_function< typename Traits::argument_type + ,typename Traits::result_type + > + ,public RangeChecker + ,public RawConverter + { + typedef RangeChecker RangeCheckerBase ; + typedef RawConverter RawConverterBase ; + + typedef Traits traits ; + + typedef typename Traits::source_type source_type ; + typedef typename Traits::argument_type argument_type ; + typedef typename Traits::result_type result_type ; + + static source_type nearbyint ( argument_type s ) { return s ; } + + static result_type convert ( argument_type s ) + { + RangeCheckerBase::validate_range(s); + return RawConverterBase::low_level_convert(s); + } + } ; +# 537 "../boost/numeric/conversion/detail/converter.hpp" + template + struct get_non_trivial_converter + { + typedef GetRC InternalRangeCheckerQ ; + + typedef is_same use_internal_RC ; + + typedef mpl::identity UserRangeCheckerQ ; + + typedef typename + mpl::eval_if::type + RangeChecker ; + + typedef non_rounding_converter NonRounding ; + typedef rounding_converter Rounding ; + + typedef mpl::identity NonRoundingQ ; + typedef mpl::identity RoundingQ ; + + typedef typename Traits::int_float_mixture int_float_mixture ; + + typedef typename + for_int_float_mixture::type + selector ; + + typedef typename selector::type type ; + } ; + + template< class Traits + ,class OverflowHandler + ,class Float2IntRounder + ,class RawConverter + ,class UserRangeChecker + > + struct get_converter_impl + { +# 583 "../boost/numeric/conversion/detail/converter.hpp" + typedef trivial_converter_impl Trivial ; + typedef mpl::identity TrivialQ ; + + typedef get_non_trivial_converter< Traits + ,OverflowHandler + ,Float2IntRounder + ,RawConverter + ,UserRangeChecker + > NonTrivialQ ; + + typedef typename Traits::trivial trivial ; + + typedef typename mpl::eval_if::type type ; + } ; + +} } } +# 17 "../boost/numeric/conversion/converter.hpp" 2 + +namespace boost { namespace numeric +{ + +template, + class OverflowHandler = def_overflow_handler, + class Float2IntRounder = Trunc< typename Traits::source_type> , + class RawConverter = raw_converter, + class UserRangeChecker = UseInternalRangeChecker + > +struct converter : convdetail::get_converter_impl::type +{ + typedef Traits traits ; + + typedef typename Traits::argument_type argument_type ; + typedef typename Traits::result_type result_type ; + + result_type operator() ( argument_type s ) const { return this->convert(s) ; } +} ; + + + +template , + class UserRangeChecker = UseInternalRangeChecker + > +struct make_converter_from +{ + template, + class RawConverter = raw_converter + > + struct to + { + typedef converter type ; + } ; + +} ; + +} } +# 34 "../boost/numeric/conversion/cast.hpp" 2 +# 1 "../boost/numeric/conversion/numeric_cast_traits.hpp" 1 +# 14 "../boost/numeric/conversion/numeric_cast_traits.hpp" +namespace boost { namespace numeric { + + template + struct numeric_cast_traits + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + +}} + + +# 1 "../boost/cstdint.hpp" 1 +# 28 "../boost/numeric/conversion/numeric_cast_traits.hpp" 2 +# 1 "../boost/numeric/conversion/detail/numeric_cast_traits.hpp" 1 +# 12 "../boost/numeric/conversion/detail/numeric_cast_traits.hpp" +# 1 "../boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp" 1 +# 12 "../boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp" +namespace boost { namespace numeric { + + template <> + struct numeric_cast_traits + < + char + , char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + char + , signed char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + char + , unsigned char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + char + , short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + char + , unsigned short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + char + , int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + char + , unsigned int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + char + , long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + char + , unsigned long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + char + , float + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + char + , double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + char + , long double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , signed char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , unsigned char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , unsigned short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , unsigned int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , unsigned long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , float + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , long double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , signed char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , unsigned char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , unsigned short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , unsigned int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , unsigned long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , float + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , long double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , signed char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , unsigned char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , unsigned short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , unsigned int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , unsigned long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , float + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , long double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , signed char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , unsigned char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , unsigned short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , unsigned int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , unsigned long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , float + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , long double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , signed char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , unsigned char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , unsigned short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , unsigned int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , unsigned long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , float + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , long double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , signed char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , unsigned char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , unsigned short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , unsigned int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , unsigned long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , float + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , long double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , signed char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , unsigned char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , unsigned short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , unsigned int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , unsigned long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , float + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , long double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , signed char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , unsigned char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , unsigned short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , unsigned int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , unsigned long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , float + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , long double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , signed char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , unsigned char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , unsigned short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , unsigned int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , unsigned long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , float + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , long double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , signed char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , unsigned char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , unsigned short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , unsigned int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , unsigned long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , float + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , long double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , signed char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , unsigned char + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , unsigned short + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , unsigned int + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , unsigned long + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , float + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , long double + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; +}} +# 13 "../boost/numeric/conversion/detail/numeric_cast_traits.hpp" 2 + + +# 1 "../boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp" 1 +# 9 "../boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp" +namespace boost { namespace numeric { + + + template <> + struct numeric_cast_traits + < + char + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + char + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + signed char + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned char + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + short + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned short + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + int + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned int + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + unsigned long + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + float + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + double + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + long double + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + boost::long_long_type + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + boost::long_long_type + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + boost::ulong_long_type + , boost::long_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; + + template <> + struct numeric_cast_traits + < + boost::ulong_long_type + , boost::ulong_long_type + > + { + typedef def_overflow_handler overflow_policy; + typedef UseInternalRangeChecker range_checking_policy; + typedef Trunc rounding_policy; + }; +}} +# 16 "../boost/numeric/conversion/detail/numeric_cast_traits.hpp" 2 +# 29 "../boost/numeric/conversion/numeric_cast_traits.hpp" 2 +# 35 "../boost/numeric/conversion/cast.hpp" 2 + +namespace boost +{ + template + inline Target numeric_cast( Source arg ) + { + typedef numeric::conversion_traits conv_traits; + typedef numeric::numeric_cast_traits cast_traits; + typedef boost::numeric::converter + < + Target, + Source, + conv_traits, + typename cast_traits::overflow_policy, + typename cast_traits::rounding_policy, + boost::numeric::raw_converter< conv_traits >, + typename cast_traits::range_checking_policy + > converter; + return converter::convert(arg); + } + + using numeric::bad_numeric_cast; +} +# 67 "../boost/lexical_cast.hpp" 2 + +# 1 "../boost/type_traits/make_unsigned.hpp" 1 +# 14 "../boost/type_traits/make_unsigned.hpp" +# 1 "../boost/type_traits/is_signed.hpp" 1 +# 19 "../boost/type_traits/is_signed.hpp" +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 20 "../boost/type_traits/is_signed.hpp" 2 + +namespace boost { + + + +namespace detail{ + + + +template +struct is_signed_values +{ + + + + + + typedef typename remove_cv::type no_cv_t; + static const no_cv_t minus_one = (static_cast(-1)); + static const no_cv_t zero = (static_cast(0)); +}; + +template +struct is_signed_helper +{ + typedef typename remove_cv::type no_cv_t; + static const bool value = (!(::boost::detail::is_signed_values::minus_one > boost::detail::is_signed_values::zero)); +}; + +template +struct is_signed_select_helper +{ + template + struct rebind + { + typedef is_signed_helper type; + }; +}; + +template <> +struct is_signed_select_helper +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template +struct is_signed_imp +{ + typedef is_signed_select_helper< + ::boost::type_traits::ice_or< + ::boost::is_integral::value, + ::boost::is_enum::value>::value + > selector; + typedef typename selector::template rebind binder; + typedef typename binder::type type; + + + + static const bool value = type::value; + +}; +# 126 "../boost/type_traits/is_signed.hpp" +} + + + + + + +template< typename T > struct is_signed : public ::boost::integral_constant::value> { public: }; + + +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 139 "../boost/type_traits/is_signed.hpp" 2 +# 15 "../boost/type_traits/make_unsigned.hpp" 2 +# 1 "../boost/type_traits/is_unsigned.hpp" 1 +# 19 "../boost/type_traits/is_unsigned.hpp" +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 20 "../boost/type_traits/is_unsigned.hpp" 2 + +namespace boost { + + + +namespace detail{ + + + +template +struct is_unsigned_values +{ + + + + + + typedef typename remove_cv::type no_cv_t; + static const no_cv_t minus_one = (static_cast(-1)); + static const no_cv_t zero = (static_cast(0)); +}; + +template +struct is_ununsigned_helper +{ + static const bool value = (::boost::detail::is_unsigned_values::minus_one > ::boost::detail::is_unsigned_values::zero); +}; + +template +struct is_ununsigned_select_helper +{ + template + struct rebind + { + typedef is_ununsigned_helper type; + }; +}; + +template <> +struct is_ununsigned_select_helper +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template +struct is_unsigned_imp +{ + typedef is_ununsigned_select_helper< + ::boost::type_traits::ice_or< + ::boost::is_integral::value, + ::boost::is_enum::value>::value + > selector; + typedef typename selector::template rebind binder; + typedef typename binder::type type; + static const bool value = type::value; +}; +# 121 "../boost/type_traits/is_unsigned.hpp" +} + + + + + + +template< typename T > struct is_unsigned : public ::boost::integral_constant::value> { public: }; + + +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 134 "../boost/type_traits/is_unsigned.hpp" 2 +# 16 "../boost/type_traits/make_unsigned.hpp" 2 +# 29 "../boost/type_traits/make_unsigned.hpp" +# 1 "../boost/type_traits/detail/type_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/type_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/type_trait_def.hpp" 2 +# 30 "../boost/type_traits/make_unsigned.hpp" 2 + +namespace boost { + +namespace detail { + +template +struct make_unsigned_imp +{ + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_enum::value>::value)) == 0 ? false : true) >)> + boost_static_assert_typedef_39; + + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((::boost::type_traits::ice_not< ::boost::is_same< typename remove_cv::type, bool>::value>::value)) == 0 ? false : true) >)> + + boost_static_assert_typedef_43; + + + typedef typename remove_cv::type t_no_cv; + typedef typename mpl::if_c< + (::boost::type_traits::ice_and< + ::boost::is_unsigned::value, + ::boost::is_integral::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value >::value), + T, + typename mpl::if_c< + (::boost::type_traits::ice_and< + ::boost::is_integral::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value, + ::boost::type_traits::ice_not< ::boost::is_same::value>::value> + ::value), + typename mpl::if_< + is_same, + unsigned char, + typename mpl::if_< + is_same, + unsigned short, + typename mpl::if_< + is_same, + unsigned int, + typename mpl::if_< + is_same, + unsigned long, + + boost::ulong_long_type + + + + + + >::type + >::type + >::type + >::type, + + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned char), + unsigned char, + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned short), + unsigned short, + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned int), + unsigned int, + typename mpl::if_c< + sizeof(t_no_cv) == sizeof(unsigned long), + unsigned long, + + boost::ulong_long_type + + + + + + >::type + >::type + >::type + >::type + >::type + >::type base_integer_type; + + + typedef typename mpl::if_< + is_const, + typename add_const::type, + base_integer_type + >::type const_base_integer_type; + + + typedef typename mpl::if_< + is_volatile, + typename add_volatile::type, + const_base_integer_type + >::type type; +}; + + +} + +template< typename T > struct make_unsigned { public: typedef typename boost::detail::make_unsigned_imp::type type; }; + +} + +# 1 "../boost/type_traits/detail/type_trait_undef.hpp" 1 +# 135 "../boost/type_traits/make_unsigned.hpp" 2 +# 69 "../boost/lexical_cast.hpp" 2 + +# 1 "../boost/math/special_functions/sign.hpp" 1 +# 16 "../boost/math/special_functions/sign.hpp" +# 1 "../boost/math/tools/config.hpp" 1 +# 14 "../boost/math/tools/config.hpp" +# 1 "../boost/cstdint.hpp" 1 +# 15 "../boost/math/tools/config.hpp" 2 + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/climits" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/climits" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/climits" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include-fixed/limits.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/climits" 2 3 +# 19 "../boost/math/tools/config.hpp" 2 + + + + +# 1 "../boost/math/tools/user.hpp" 1 +# 24 "../boost/math/tools/config.hpp" 2 +# 1 "../boost/math/special_functions/detail/round_fwd.hpp" 1 +# 17 "../boost/math/special_functions/detail/round_fwd.hpp" +namespace boost +{ + namespace math + { + + template + T trunc(const T& v, const Policy& pol); + template + T trunc(const T& v); + template + int itrunc(const T& v, const Policy& pol); + template + int itrunc(const T& v); + template + long ltrunc(const T& v, const Policy& pol); + template + long ltrunc(const T& v); + + template + boost::long_long_type lltrunc(const T& v, const Policy& pol); + template + boost::long_long_type lltrunc(const T& v); + + template + T round(const T& v, const Policy& pol); + template + T round(const T& v); + template + int iround(const T& v, const Policy& pol); + template + int iround(const T& v); + template + long lround(const T& v, const Policy& pol); + template + long lround(const T& v); + + template + boost::long_long_type llround(const T& v, const Policy& pol); + template + boost::long_long_type llround(const T& v); + + template + T modf(const T& v, T* ipart, const Policy& pol); + template + T modf(const T& v, T* ipart); + template + T modf(const T& v, int* ipart, const Policy& pol); + template + T modf(const T& v, int* ipart); + template + T modf(const T& v, long* ipart, const Policy& pol); + template + T modf(const T& v, long* ipart); + + template + T modf(const T& v, boost::long_long_type* ipart, const Policy& pol); + template + T modf(const T& v, boost::long_long_type* ipart); + + + } +} +# 25 "../boost/math/tools/config.hpp" 2 +# 240 "../boost/math/tools/config.hpp" +namespace boost{ namespace math{ +namespace tools +{ + +template +inline T max (T a, T b, T c) +{ + return (std::max)((std::max)(a, b), c); +} + +template +inline T max (T a, T b, T c, T d) +{ + return (std::max)((std::max)(a, b), (std::max)(c, d)); +} + +} + +template +void suppress_unused_variable_warning(const T&) +{ +} + +}} + + + +# 1 "../boost/detail/fenv.hpp" 1 +# 69 "../boost/detail/fenv.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/fenv.h" 1 3 +# 32 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/fenv.h" 3 + +# 33 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/fenv.h" 3 + + + +# 1 "/usr/include/fenv.h" 1 3 4 +# 58 "/usr/include/fenv.h" 3 4 +# 1 "/usr/include/bits/fenv.h" 1 3 4 +# 23 "/usr/include/bits/fenv.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 24 "/usr/include/bits/fenv.h" 2 3 4 + + + + +enum + { + FE_INVALID = 0x01, + + __FE_DENORM = 0x02, + FE_DIVBYZERO = 0x04, + + FE_OVERFLOW = 0x08, + + FE_UNDERFLOW = 0x10, + + FE_INEXACT = 0x20 + + }; + + + + + + + +enum + { + FE_TONEAREST = 0, + + FE_DOWNWARD = 0x400, + + FE_UPWARD = 0x800, + + FE_TOWARDZERO = 0xc00 + + }; + + + +typedef unsigned short int fexcept_t; + + + + + + +typedef struct + { + unsigned short int __control_word; + unsigned short int __unused1; + unsigned short int __status_word; + unsigned short int __unused2; + unsigned short int __tags; + unsigned short int __unused3; + unsigned int __eip; + unsigned short int __cs_selector; + unsigned int __opcode:11; + unsigned int __unused4:5; + unsigned int __data_offset; + unsigned short int __data_selector; + unsigned short int __unused5; + + unsigned int __mxcsr; + + } +fenv_t; +# 59 "/usr/include/fenv.h" 2 3 4 + +extern "C" { + + + + +extern int feclearexcept (int __excepts) throw (); + + + +extern int fegetexceptflag (fexcept_t *__flagp, int __excepts) throw (); + + +extern int feraiseexcept (int __excepts) throw (); + + + +extern int fesetexceptflag (__const fexcept_t *__flagp, int __excepts) throw (); + + + +extern int fetestexcept (int __excepts) throw (); + + + + + +extern int fegetround (void) throw (); + + +extern int fesetround (int __rounding_direction) throw (); + + + + + + +extern int fegetenv (fenv_t *__envp) throw (); + + + + +extern int feholdexcept (fenv_t *__envp) throw (); + + + +extern int fesetenv (__const fenv_t *__envp) throw (); + + + + +extern int feupdateenv (__const fenv_t *__envp) throw (); + + + + +# 1 "/usr/include/bits/fenvinline.h" 1 3 4 +# 116 "/usr/include/fenv.h" 2 3 4 + + + + + + + +extern int feenableexcept (int __excepts) throw (); + + + + +extern int fedisableexcept (int __excepts) throw (); + + +extern int fegetexcept (void) throw (); + + +} +# 37 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/fenv.h" 2 3 +# 70 "../boost/detail/fenv.hpp" 2 +# 268 "../boost/math/tools/config.hpp" 2 + + + +namespace boost{ namespace math{ + namespace detail + { + struct fpu_guard + { + fpu_guard() + { + fegetexceptflag(&m_flags, (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)); + feclearexcept((FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)); + } + ~fpu_guard() + { + fesetexceptflag(&m_flags, (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)); + } + private: + fexcept_t m_flags; + }; + + } + }} +# 17 "../boost/math/special_functions/sign.hpp" 2 +# 1 "../boost/math/special_functions/math_fwd.hpp" 1 +# 27 "../boost/math/special_functions/math_fwd.hpp" +# 1 "../boost/math/tools/promotion.hpp" 1 +# 27 "../boost/math/tools/promotion.hpp" +# 1 "../boost/type_traits/is_floating_point.hpp" 1 +# 13 "../boost/type_traits/is_floating_point.hpp" +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 14 "../boost/type_traits/is_floating_point.hpp" 2 + +namespace boost { + + +template< typename T > struct is_floating_point : public ::boost::integral_constant { public: }; +template<> struct is_floating_point< float > : public ::boost::integral_constant { public: }; template<> struct is_floating_point< float const > : public ::boost::integral_constant { public: }; template<> struct is_floating_point< float volatile > : public ::boost::integral_constant { public: }; template<> struct is_floating_point< float const volatile > : public ::boost::integral_constant { public: }; +template<> struct is_floating_point< double > : public ::boost::integral_constant { public: }; template<> struct is_floating_point< double const > : public ::boost::integral_constant { public: }; template<> struct is_floating_point< double volatile > : public ::boost::integral_constant { public: }; template<> struct is_floating_point< double const volatile > : public ::boost::integral_constant { public: }; +template<> struct is_floating_point< long double > : public ::boost::integral_constant { public: }; template<> struct is_floating_point< long double const > : public ::boost::integral_constant { public: }; template<> struct is_floating_point< long double volatile > : public ::boost::integral_constant { public: }; template<> struct is_floating_point< long double const volatile > : public ::boost::integral_constant { public: }; + +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 26 "../boost/type_traits/is_floating_point.hpp" 2 +# 28 "../boost/math/tools/promotion.hpp" 2 +# 42 "../boost/math/tools/promotion.hpp" +namespace boost +{ + namespace math + { + namespace tools + { +# 68 "../boost/math/tools/promotion.hpp" + template + struct promote_arg + { + typedef typename mpl::if_, double, T>::type type; + }; + + + template <> struct promote_arg { typedef float type; }; + template <> struct promote_arg{ typedef double type; }; + template <> struct promote_arg { typedef long double type; }; + template <> struct promote_arg { typedef double type; }; + + template + struct promote_args_2 + { + + typedef typename promote_arg::type T1P; + typedef typename promote_arg::type T2P; + + typedef typename mpl::if_< + typename mpl::and_, is_floating_point >::type, + typename mpl::if_< typename mpl::or_, is_same >::type, + long double, + typename mpl::if_< typename mpl::or_, is_same >::type, + double, + float + >::type + >::type, + + typename mpl::if_< typename mpl::and_ >, ::boost::is_convertible >, T2P, T1P>::type>::type type; + }; + + + template <> struct promote_args_2 { typedef float type; }; + template <> struct promote_args_2{ typedef double type; }; + template <> struct promote_args_2 { typedef long double type; }; + template <> struct promote_args_2 { typedef double type; }; + template <> struct promote_args_2 { typedef double type; }; + template <> struct promote_args_2 { typedef double type; }; + template <> struct promote_args_2 { typedef double type; }; + template <> struct promote_args_2 { typedef double type; }; + template <> struct promote_args_2 { typedef long double type; }; + template <> struct promote_args_2 { typedef long double type; }; + template <> struct promote_args_2 { typedef double type; }; + template <> struct promote_args_2 { typedef double type; }; + template <> struct promote_args_2 { typedef long double type; }; + template <> struct promote_args_2 { typedef long double type; }; + template <> struct promote_args_2 { typedef long double type; }; + template <> struct promote_args_2 { typedef long double type; }; + + template + struct promote_args + { + typedef typename promote_args_2< + typename remove_cv::type, + typename promote_args_2< + typename remove_cv::type, + typename promote_args_2< + typename remove_cv::type, + typename promote_args_2< + typename remove_cv::type, + typename promote_args_2< + typename remove_cv::type, typename remove_cv::type + >::type + >::type + >::type + >::type + >::type type; + + + + + + + + }; + + } + } +} +# 28 "../boost/math/special_functions/math_fwd.hpp" 2 +# 1 "../boost/math/policies/policy.hpp" 1 +# 9 "../boost/math/policies/policy.hpp" +# 1 "../boost/mpl/list.hpp" 1 +# 18 "../boost/mpl/list.hpp" +# 1 "../boost/mpl/limits/list.hpp" 1 +# 19 "../boost/mpl/list.hpp" 2 +# 36 "../boost/mpl/list.hpp" +# 1 "../boost/mpl/list/list20.hpp" 1 +# 18 "../boost/mpl/list/list20.hpp" +# 1 "../boost/mpl/list/list10.hpp" 1 +# 18 "../boost/mpl/list/list10.hpp" +# 1 "../boost/mpl/list/list0.hpp" 1 +# 17 "../boost/mpl/list/list0.hpp" +# 1 "../boost/mpl/long.hpp" 1 +# 17 "../boost/mpl/long.hpp" +# 1 "../boost/mpl/long_fwd.hpp" 1 +# 20 "../boost/mpl/long_fwd.hpp" +namespace mpl_ { + +template< long N > struct long_; + +} +namespace boost { namespace mpl { using ::mpl_::long_; } } +# 18 "../boost/mpl/long.hpp" 2 + + +# 1 "../boost/mpl/aux_/integral_wrapper.hpp" 1 +# 40 "../boost/mpl/aux_/integral_wrapper.hpp" +namespace mpl_ { + +template< long N > +struct long_ +{ + static const long value = N; + + + + + + typedef long_ type; + + typedef long value_type; + typedef integral_c_tag tag; +# 72 "../boost/mpl/aux_/integral_wrapper.hpp" + typedef mpl_::long_< static_cast((value + 1)) > next; + typedef mpl_::long_< static_cast((value - 1)) > prior; + + + + + + + operator long() const { return static_cast(this->value); } +}; + + +template< long N > +long const mpl_::long_< N >::value; + + +} +# 21 "../boost/mpl/long.hpp" 2 +# 18 "../boost/mpl/list/list0.hpp" 2 + +# 1 "../boost/mpl/list/aux_/push_front.hpp" 1 +# 17 "../boost/mpl/list/aux_/push_front.hpp" +# 1 "../boost/mpl/push_front_fwd.hpp" 1 +# 17 "../boost/mpl/push_front_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct push_front_impl; +template< typename Sequence, typename T > struct push_front; + +}} +# 18 "../boost/mpl/list/aux_/push_front.hpp" 2 + +# 1 "../boost/mpl/list/aux_/item.hpp" 1 +# 18 "../boost/mpl/list/aux_/item.hpp" +# 1 "../boost/mpl/list/aux_/tag.hpp" 1 +# 17 "../boost/mpl/list/aux_/tag.hpp" +namespace boost { namespace mpl { namespace aux { + +struct list_tag; +struct l_iter_tag; + +}}} +# 19 "../boost/mpl/list/aux_/item.hpp" 2 + + + +namespace boost { namespace mpl { + +template< + typename Size + , typename T + , typename Next + > +struct l_item +{ + + + + + typedef aux::list_tag tag; + typedef l_item type; + + typedef Size size; + typedef T item; + typedef Next next; +}; + +struct l_end +{ + + + + typedef aux::list_tag tag; + typedef l_end type; + typedef long_<0> size; +}; + +}} +# 20 "../boost/mpl/list/aux_/push_front.hpp" 2 + + +namespace boost { namespace mpl { + +template<> +struct push_front_impl< aux::list_tag > +{ + template< typename List, typename T > struct apply + { + typedef l_item< + typename next::type + , T + , typename List::type + > type; + }; +}; + +}} +# 20 "../boost/mpl/list/list0.hpp" 2 +# 1 "../boost/mpl/list/aux_/pop_front.hpp" 1 +# 17 "../boost/mpl/list/aux_/pop_front.hpp" +# 1 "../boost/mpl/pop_front_fwd.hpp" 1 +# 17 "../boost/mpl/pop_front_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct pop_front_impl; +template< typename Sequence > struct pop_front; + +}} +# 18 "../boost/mpl/list/aux_/pop_front.hpp" 2 + + + +namespace boost { namespace mpl { + +template<> +struct pop_front_impl< aux::list_tag > +{ + template< typename List > struct apply + { + typedef typename mpl::next::type type; + }; +}; + +}} +# 21 "../boost/mpl/list/list0.hpp" 2 +# 1 "../boost/mpl/list/aux_/push_back.hpp" 1 +# 17 "../boost/mpl/list/aux_/push_back.hpp" +# 1 "../boost/mpl/push_back_fwd.hpp" 1 +# 17 "../boost/mpl/push_back_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct push_back_impl; +template< typename Sequence, typename T > struct push_back; + +}} +# 18 "../boost/mpl/list/aux_/push_back.hpp" 2 + + + +namespace boost { namespace mpl { + +template< typename Tag > struct has_push_back_impl; + +template<> +struct has_push_back_impl< aux::list_tag > +{ + template< typename Seq > struct apply + : false_ + { + }; +}; + +}} +# 22 "../boost/mpl/list/list0.hpp" 2 +# 1 "../boost/mpl/list/aux_/front.hpp" 1 +# 17 "../boost/mpl/list/aux_/front.hpp" +# 1 "../boost/mpl/front_fwd.hpp" 1 +# 17 "../boost/mpl/front_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct front_impl; +template< typename Sequence > struct front; + +}} +# 18 "../boost/mpl/list/aux_/front.hpp" 2 + + +namespace boost { namespace mpl { + +template<> +struct front_impl< aux::list_tag > +{ + template< typename List > struct apply + { + typedef typename List::item type; + }; +}; + +}} +# 23 "../boost/mpl/list/list0.hpp" 2 +# 1 "../boost/mpl/list/aux_/clear.hpp" 1 +# 17 "../boost/mpl/list/aux_/clear.hpp" +# 1 "../boost/mpl/clear_fwd.hpp" 1 +# 17 "../boost/mpl/clear_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct clear_impl; +template< typename Sequence > struct clear; + +}} +# 18 "../boost/mpl/list/aux_/clear.hpp" 2 + + + +namespace boost { namespace mpl { + +template<> +struct clear_impl< aux::list_tag > +{ + template< typename List > struct apply + { + typedef l_end type; + }; +}; + +}} +# 24 "../boost/mpl/list/list0.hpp" 2 +# 1 "../boost/mpl/list/aux_/O1_size.hpp" 1 +# 17 "../boost/mpl/list/aux_/O1_size.hpp" +# 1 "../boost/mpl/O1_size_fwd.hpp" 1 +# 17 "../boost/mpl/O1_size_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct O1_size_impl; +template< typename Sequence > struct O1_size; + +}} +# 18 "../boost/mpl/list/aux_/O1_size.hpp" 2 + + +namespace boost { namespace mpl { + +template<> +struct O1_size_impl< aux::list_tag > +{ + template< typename List > struct apply + : List::size + { + }; +}; + +}} +# 25 "../boost/mpl/list/list0.hpp" 2 +# 1 "../boost/mpl/list/aux_/size.hpp" 1 +# 17 "../boost/mpl/list/aux_/size.hpp" +# 1 "../boost/mpl/size_fwd.hpp" 1 +# 17 "../boost/mpl/size_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct size_impl; +template< typename Sequence > struct size; + +}} +# 18 "../boost/mpl/list/aux_/size.hpp" 2 + + +namespace boost { namespace mpl { + +template<> +struct size_impl< aux::list_tag > +{ + template< typename List > struct apply + : List::size + { + }; +}; + +}} +# 26 "../boost/mpl/list/list0.hpp" 2 +# 1 "../boost/mpl/list/aux_/empty.hpp" 1 +# 17 "../boost/mpl/list/aux_/empty.hpp" +# 1 "../boost/mpl/empty_fwd.hpp" 1 +# 17 "../boost/mpl/empty_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct empty_impl; +template< typename Sequence > struct empty; + +}} +# 18 "../boost/mpl/list/aux_/empty.hpp" 2 + + + +namespace boost { namespace mpl { + +template<> +struct empty_impl< aux::list_tag > +{ + template< typename List > struct apply + : not_ + { + }; +}; + +}} +# 27 "../boost/mpl/list/list0.hpp" 2 +# 1 "../boost/mpl/list/aux_/begin_end.hpp" 1 +# 17 "../boost/mpl/list/aux_/begin_end.hpp" +# 1 "../boost/mpl/begin_end_fwd.hpp" 1 +# 17 "../boost/mpl/begin_end_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct begin_impl; +template< typename Tag > struct end_impl; + +template< typename Sequence > struct begin; +template< typename Sequence > struct end; + +}} +# 18 "../boost/mpl/list/aux_/begin_end.hpp" 2 +# 1 "../boost/mpl/list/aux_/iterator.hpp" 1 +# 17 "../boost/mpl/list/aux_/iterator.hpp" +# 1 "../boost/mpl/iterator_tags.hpp" 1 +# 19 "../boost/mpl/iterator_tags.hpp" +namespace boost { namespace mpl { + +struct forward_iterator_tag : int_<0> { typedef forward_iterator_tag type; }; +struct bidirectional_iterator_tag : int_<1> { typedef bidirectional_iterator_tag type; }; +struct random_access_iterator_tag : int_<2> { typedef random_access_iterator_tag type; }; + +}} +# 18 "../boost/mpl/list/aux_/iterator.hpp" 2 + +# 1 "../boost/mpl/deref.hpp" 1 +# 17 "../boost/mpl/deref.hpp" +# 1 "../boost/mpl/aux_/msvc_type.hpp" 1 +# 20 "../boost/mpl/aux_/msvc_type.hpp" +namespace boost { namespace mpl { namespace aux { +# 48 "../boost/mpl/aux_/msvc_type.hpp" +template< typename T > struct msvc_type +{ + typedef typename T::type type; +}; + +template<> struct msvc_type +{ + typedef int type; +}; + + + +}}} +# 18 "../boost/mpl/deref.hpp" 2 + + + + +namespace boost { namespace mpl { + +template< + typename Iterator = na + > +struct deref +{ + + typedef typename Iterator::type type; + + + + +}; + +template<> struct deref< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : deref< T1 > { }; }; template< typename Tag > struct lambda< deref< na > , Tag , int_<-1> > { typedef false_ is_le; typedef deref< na > result_; typedef deref< na > type; }; namespace aux { template< typename T1 > struct template_arity< deref< T1 > > : int_<1> { }; template<> struct template_arity< deref< na > > : int_<-1> { }; } + +}} +# 20 "../boost/mpl/list/aux_/iterator.hpp" 2 + + +# 1 "../boost/mpl/aux_/lambda_spec.hpp" 1 +# 23 "../boost/mpl/list/aux_/iterator.hpp" 2 + + +namespace boost { namespace mpl { + + + +template< typename Node > +struct l_iter +{ + typedef aux::l_iter_tag tag; + typedef forward_iterator_tag category; +}; + +template< typename Node > +struct deref< l_iter > +{ + typedef typename Node::item type; +}; + +template< typename Node > +struct next< l_iter > +{ + typedef l_iter< typename Node::next > type; +}; +# 62 "../boost/mpl/list/aux_/iterator.hpp" +template<> struct l_iter +{ + typedef aux::l_iter_tag tag; + typedef forward_iterator_tag category; + + + + +}; + +template< typename T1 , typename Tag > struct lambda< l_iter< T1 > , Tag , int_<1> > { typedef false_ is_le; typedef l_iter< T1 > result_; typedef result_ type; }; + +}} +# 19 "../boost/mpl/list/aux_/begin_end.hpp" 2 + + + +namespace boost { namespace mpl { + +template<> +struct begin_impl< aux::list_tag > +{ + template< typename List > struct apply + { + typedef l_iter type; + }; +}; + +template<> +struct end_impl< aux::list_tag > +{ + template< typename > struct apply + { + typedef l_iter type; + }; +}; + +}} +# 28 "../boost/mpl/list/list0.hpp" 2 + + +namespace boost { namespace mpl { + +template< typename Dummy = na > struct list0; + +template<> struct list0 + : l_end +{ + typedef l_end type; +}; + +}} +# 19 "../boost/mpl/list/list10.hpp" 2 +# 27 "../boost/mpl/list/list10.hpp" +# 1 "../boost/mpl/list/aux_/include_preprocessed.hpp" 1 +# 30 "../boost/mpl/list/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/list/aux_/preprocessed/plain/list10.hpp" 1 +# 12 "../boost/mpl/list/aux_/preprocessed/plain/list10.hpp" +namespace boost { namespace mpl { + +template< + typename T0 + > +struct list1 + : l_item< + long_<1> + , T0 + , l_end + > +{ + typedef list1 type; +}; + +template< + typename T0, typename T1 + > +struct list2 + : l_item< + long_<2> + , T0 + , list1 + > +{ + typedef list2 type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct list3 + : l_item< + long_<3> + , T0 + , list2< T1,T2 > + > +{ + typedef list3 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct list4 + : l_item< + long_<4> + , T0 + , list3< T1,T2,T3 > + > +{ + typedef list4 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct list5 + : l_item< + long_<5> + , T0 + , list4< T1,T2,T3,T4 > + > +{ + typedef list5 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct list6 + : l_item< + long_<6> + , T0 + , list5< T1,T2,T3,T4,T5 > + > +{ + typedef list6 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct list7 + : l_item< + long_<7> + , T0 + , list6< T1,T2,T3,T4,T5,T6 > + > +{ + typedef list7 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct list8 + : l_item< + long_<8> + , T0 + , list7< T1,T2,T3,T4,T5,T6,T7 > + > +{ + typedef list8 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct list9 + : l_item< + long_<9> + , T0 + , list8< T1,T2,T3,T4,T5,T6,T7,T8 > + > +{ + typedef list9 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct list10 + : l_item< + long_<10> + , T0 + , list9< T1,T2,T3,T4,T5,T6,T7,T8,T9 > + > +{ + typedef list10 type; +}; + +}} +# 31 "../boost/mpl/list/aux_/include_preprocessed.hpp" 2 +# 28 "../boost/mpl/list/list10.hpp" 2 +# 19 "../boost/mpl/list/list20.hpp" 2 +# 27 "../boost/mpl/list/list20.hpp" +# 1 "../boost/mpl/list/aux_/include_preprocessed.hpp" 1 +# 30 "../boost/mpl/list/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/list/aux_/preprocessed/plain/list20.hpp" 1 +# 12 "../boost/mpl/list/aux_/preprocessed/plain/list20.hpp" +namespace boost { namespace mpl { + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list11 + : l_item< + long_<11> + , T0 + , list10< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > + > +{ + typedef list11 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list12 + : l_item< + long_<12> + , T0 + , list11< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > + > +{ + typedef list12 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list13 + : l_item< + long_<13> + , T0 + , list12< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > + > +{ + typedef list13 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list14 + : l_item< + long_<14> + , T0 + , list13< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > + > +{ + typedef list14 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list15 + : l_item< + long_<15> + , T0 + , list14< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 > + > +{ + typedef list15 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list16 + : l_item< + long_<16> + , T0 + , list15< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 > + > +{ + typedef list16 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list17 + : l_item< + long_<17> + , T0 + , list16< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 > + > +{ + typedef list17 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list18 + : l_item< + long_<18> + , T0 + , list17< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 > + > +{ + typedef list18 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list19 + : l_item< + long_<19> + , T0 + , list18< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 > + > +{ + typedef list19 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list20 + : l_item< + long_<20> + , T0 + , list19< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 > + > +{ + typedef list20 type; +}; + +}} +# 31 "../boost/mpl/list/aux_/include_preprocessed.hpp" 2 +# 28 "../boost/mpl/list/list20.hpp" 2 +# 37 "../boost/mpl/list.hpp" 2 +# 46 "../boost/mpl/list.hpp" +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/list.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/list.hpp" +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct list; + +template< + + > +struct list< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list0< > +{ + typedef list0< >::type type; +}; + +template< + typename T0 + > +struct list< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list1 +{ + typedef typename list1::type type; +}; + +template< + typename T0, typename T1 + > +struct list< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list2< T0,T1 > +{ + typedef typename list2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct list< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list3< T0,T1,T2 > +{ + typedef typename list3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct list< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list4< T0,T1,T2,T3 > +{ + typedef typename list4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct list< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list5< T0,T1,T2,T3,T4 > +{ + typedef typename list5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct list< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : list8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : list15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : list16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : list17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : list18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct list< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : list19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + + + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct list + : list20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 47 "../boost/mpl/list.hpp" 2 +# 10 "../boost/math/policies/policy.hpp" 2 +# 1 "../boost/mpl/contains.hpp" 1 +# 18 "../boost/mpl/contains.hpp" +# 1 "../boost/mpl/contains_fwd.hpp" 1 +# 18 "../boost/mpl/contains_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct contains_impl; +template< typename Sequence, typename T > struct contains; + +}} +# 19 "../boost/mpl/contains.hpp" 2 +# 1 "../boost/mpl/sequence_tag.hpp" 1 +# 17 "../boost/mpl/sequence_tag.hpp" +# 1 "../boost/mpl/sequence_tag_fwd.hpp" 1 +# 17 "../boost/mpl/sequence_tag_fwd.hpp" +namespace boost { namespace mpl { + +struct nested_begin_end_tag; +struct non_sequence_tag; + +template< typename Sequence > struct sequence_tag; + +}} +# 18 "../boost/mpl/sequence_tag.hpp" 2 + +# 1 "../boost/mpl/aux_/has_begin.hpp" 1 +# 19 "../boost/mpl/aux_/has_begin.hpp" +namespace boost { namespace mpl { namespace aux { +template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_begin { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; +}}} +# 20 "../boost/mpl/sequence_tag.hpp" 2 + + + + + + +namespace boost { namespace mpl { +# 78 "../boost/mpl/sequence_tag.hpp" +namespace aux { + +template< bool has_tag_, bool has_begin_ > +struct sequence_tag_impl +{ + + + template< typename Sequence > struct result2_; +}; +# 98 "../boost/mpl/sequence_tag.hpp" +template<> struct sequence_tag_impl { template< typename Sequence > struct result2_ { typedef typename Sequence::tag type; }; }; +template<> struct sequence_tag_impl { template< typename Sequence > struct result2_ { typedef typename Sequence::tag type; }; }; +template<> struct sequence_tag_impl { template< typename Sequence > struct result2_ { typedef nested_begin_end_tag type; }; }; +template<> struct sequence_tag_impl { template< typename Sequence > struct result2_ { typedef non_sequence_tag type; }; }; + + + +} + +template< + typename Sequence = na + > +struct sequence_tag + : aux::sequence_tag_impl< + ::boost::mpl::aux::has_tag::value + , ::boost::mpl::aux::has_begin::value + >::template result2_ +{ +}; + + + +template<> struct sequence_tag< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : sequence_tag< T1 > { }; }; template< typename Tag > struct lambda< sequence_tag< na > , Tag , int_<-1> > { typedef false_ is_le; typedef sequence_tag< na > result_; typedef sequence_tag< na > type; }; namespace aux { template< typename T1 > struct template_arity< sequence_tag< T1 > > : int_<1> { }; template<> struct template_arity< sequence_tag< na > > : int_<-1> { }; } + +}} +# 20 "../boost/mpl/contains.hpp" 2 +# 1 "../boost/mpl/aux_/contains_impl.hpp" 1 +# 19 "../boost/mpl/aux_/contains_impl.hpp" +# 1 "../boost/mpl/begin_end.hpp" 1 +# 18 "../boost/mpl/begin_end.hpp" +# 1 "../boost/mpl/aux_/begin_end_impl.hpp" 1 +# 23 "../boost/mpl/aux_/begin_end_impl.hpp" +# 1 "../boost/mpl/aux_/traits_lambda_spec.hpp" 1 +# 24 "../boost/mpl/aux_/begin_end_impl.hpp" 2 + + +namespace boost { namespace mpl { + + +namespace aux { + +template< typename Sequence > +struct begin_type +{ + typedef typename Sequence::begin type; +}; +template< typename Sequence > +struct end_type +{ + typedef typename Sequence::end type; +}; + +} + + + + + +template< typename Tag > +struct begin_impl +{ + template< typename Sequence > struct apply + { + typedef typename eval_if, + aux::begin_type, void_>::type type; + }; +}; + +template< typename Tag > +struct end_impl +{ + template< typename Sequence > struct apply + { + typedef typename eval_if, + aux::end_type, void_>::type type; + }; +}; +# 82 "../boost/mpl/aux_/begin_end_impl.hpp" +template<> struct begin_impl { template< typename Sequence > struct apply { typedef typename Sequence::begin type; }; }; +template<> struct end_impl { template< typename Sequence > struct apply { typedef typename Sequence::end type; }; }; + + + + +template<> struct begin_impl { template< typename Sequence > struct apply { typedef void_ type; }; }; +template<> struct end_impl { template< typename Sequence > struct apply { typedef void_ type; }; }; +template<> struct begin_impl { template< typename Sequence > struct apply { typedef void_ type; }; }; +template<> struct end_impl { template< typename Sequence > struct apply { typedef void_ type; }; }; + + + + + + + +}} +# 19 "../boost/mpl/begin_end.hpp" 2 + + + + +namespace boost { namespace mpl { + + + + +template< + typename Sequence = na + > +struct begin +{ + typedef typename sequence_tag::type tag_; + typedef typename begin_impl< tag_ > + ::template apply< Sequence >::type type; + + +}; + +template< + typename Sequence = na + > +struct end +{ + typedef typename sequence_tag::type tag_; + typedef typename end_impl< tag_ > + ::template apply< Sequence >::type type; + + +}; + +template<> struct begin< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : begin< T1 > { }; }; template< typename Tag > struct lambda< begin< na > , Tag , int_<-1> > { typedef false_ is_le; typedef begin< na > result_; typedef begin< na > type; }; namespace aux { template< typename T1 > struct template_arity< begin< T1 > > : int_<1> { }; template<> struct template_arity< begin< na > > : int_<-1> { }; } +template<> struct end< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : end< T1 > { }; }; template< typename Tag > struct lambda< end< na > , Tag , int_<-1> > { typedef false_ is_le; typedef end< na > result_; typedef end< na > type; }; namespace aux { template< typename T1 > struct template_arity< end< T1 > > : int_<1> { }; template<> struct template_arity< end< na > > : int_<-1> { }; } + +}} +# 20 "../boost/mpl/aux_/contains_impl.hpp" 2 +# 1 "../boost/mpl/find.hpp" 1 +# 17 "../boost/mpl/find.hpp" +# 1 "../boost/mpl/find_if.hpp" 1 +# 17 "../boost/mpl/find_if.hpp" +# 1 "../boost/mpl/aux_/find_if_pred.hpp" 1 +# 14 "../boost/mpl/aux_/find_if_pred.hpp" +# 1 "../boost/mpl/aux_/iter_apply.hpp" 1 +# 17 "../boost/mpl/aux_/iter_apply.hpp" +# 1 "../boost/mpl/apply.hpp" 1 +# 18 "../boost/mpl/aux_/iter_apply.hpp" 2 + + +namespace boost { namespace mpl { namespace aux { + +template< + typename F + , typename Iterator + > +struct iter_apply1 + : apply1< F,typename deref::type > +{ +}; + +template< + typename F + , typename Iterator1 + , typename Iterator2 + > +struct iter_apply2 + : apply2< + F + , typename deref::type + , typename deref::type + > +{ +}; + +}}} +# 15 "../boost/mpl/aux_/find_if_pred.hpp" 2 + + +namespace boost { namespace mpl { namespace aux { + +template< typename Predicate > +struct find_if_pred +{ + template< typename Iterator > + struct apply + { + typedef not_< aux::iter_apply1 > type; + }; +}; + +}}} +# 18 "../boost/mpl/find_if.hpp" 2 +# 1 "../boost/mpl/arg.hpp" 1 +# 19 "../boost/mpl/find_if.hpp" 2 +# 1 "../boost/mpl/iter_fold_if.hpp" 1 +# 19 "../boost/mpl/iter_fold_if.hpp" +# 1 "../boost/mpl/logical.hpp" 1 +# 20 "../boost/mpl/iter_fold_if.hpp" 2 + + + +# 1 "../boost/mpl/pair.hpp" 1 +# 22 "../boost/mpl/pair.hpp" +namespace boost { namespace mpl { + +template< + typename T1 = na + , typename T2 = na + > +struct pair +{ + typedef pair type; + typedef T1 first; + typedef T2 second; + + +}; + +template< + typename P = na + > +struct first +{ + + typedef typename P::first type; + + + + +}; + +template< + typename P = na + > +struct second +{ + + typedef typename P::second type; + + + + +}; + + +template<> struct pair< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : pair< T1 , T2 > { }; }; template< typename Tag > struct lambda< pair< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef pair< na , na > result_; typedef pair< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< pair< T1 , T2 > > : int_<2> { }; template<> struct template_arity< pair< na , na > > : int_<-1> { }; } +template<> struct first< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : first< T1 > { }; }; template< typename Tag > struct lambda< first< na > , Tag , int_<-1> > { typedef false_ is_le; typedef first< na > result_; typedef first< na > type; }; namespace aux { template< typename T1 > struct template_arity< first< T1 > > : int_<1> { }; template<> struct template_arity< first< na > > : int_<-1> { }; } +template<> struct second< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : second< T1 > { }; }; template< typename Tag > struct lambda< second< na > , Tag , int_<-1> > { typedef false_ is_le; typedef second< na > result_; typedef second< na > type; }; namespace aux { template< typename T1 > struct template_arity< second< T1 > > : int_<1> { }; template<> struct template_arity< second< na > > : int_<-1> { }; } + +}} +# 24 "../boost/mpl/iter_fold_if.hpp" 2 +# 1 "../boost/mpl/apply.hpp" 1 +# 25 "../boost/mpl/iter_fold_if.hpp" 2 +# 1 "../boost/mpl/aux_/iter_fold_if_impl.hpp" 1 +# 22 "../boost/mpl/aux_/iter_fold_if_impl.hpp" +# 1 "../boost/mpl/apply.hpp" 1 +# 23 "../boost/mpl/aux_/iter_fold_if_impl.hpp" 2 +# 32 "../boost/mpl/aux_/iter_fold_if_impl.hpp" +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp" 1 +# 13 "../boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp" +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + not_last::value + >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + not_last::value + >::template result_< Iterator,State,BackwardOp, identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 33 "../boost/mpl/aux_/iter_fold_if_impl.hpp" 2 +# 26 "../boost/mpl/iter_fold_if.hpp" 2 + + + + + + + +namespace boost { namespace mpl { + +namespace aux { + +template< typename Predicate, typename LastIterator > +struct iter_fold_if_pred +{ + template< typename State, typename Iterator > struct apply + + : and_< + not_< is_same > + , apply1 + > + { + + + + + + + + }; +}; + +} + +template< + typename Sequence = na + , typename State = na + , typename ForwardOp = na + , typename ForwardPredicate = na + , typename BackwardOp = na + , typename BackwardPredicate = na + > +struct iter_fold_if +{ + + typedef typename begin::type first_; + typedef typename end::type last_; + + typedef typename eval_if< + is_na + , if_< is_na, always, always > + , identity + >::type backward_pred_; + + + + struct result_ : + + + + aux::iter_fold_if_impl< + first_ + , State + , ForwardOp + , protect< aux::iter_fold_if_pred< ForwardPredicate,last_ > > + , BackwardOp + , backward_pred_ + > + + { }; + + + + +public: + + typedef pair< + typename result_::state + , typename result_::iterator + > type; + + + + + + +}; + +template<> struct iter_fold_if< na , na , na , na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > struct apply : iter_fold_if< T1 , T2 , T3 , T4 , T5 , T6 > { }; }; template< typename Tag > struct lambda< iter_fold_if< na , na , na , na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef iter_fold_if< na , na , na , na , na , na > result_; typedef iter_fold_if< na , na , na , na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > struct template_arity< iter_fold_if< T1 , T2 , T3 , T4 , T5 , T6 > > : int_<6> { }; template<> struct template_arity< iter_fold_if< na , na , na , na , na , na > > : int_<-1> { }; } + +}} +# 20 "../boost/mpl/find_if.hpp" 2 + + + + +namespace boost { namespace mpl { + + + +template< + typename Sequence = na + , typename Predicate = na + > +struct find_if +{ + typedef typename iter_fold_if< + Sequence + , void + , mpl::arg<1> + , protect< aux::find_if_pred > + >::type result_; + + typedef typename second::type type; + + +}; + +template<> struct find_if< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : find_if< T1 , T2 > { }; }; template< typename Tag > struct lambda< find_if< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef find_if< na , na > result_; typedef find_if< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< find_if< T1 , T2 > > : int_<2> { }; template<> struct template_arity< find_if< na , na > > : int_<-1> { }; } + +}} +# 18 "../boost/mpl/find.hpp" 2 +# 1 "../boost/mpl/same_as.hpp" 1 +# 23 "../boost/mpl/same_as.hpp" +namespace boost { namespace mpl { + +template< typename T1 > +struct same_as +{ + template< typename T2 > struct apply + + : is_same + { + + + + + }; +}; + +template< typename T1 > +struct not_same_as +{ + template< typename T2 > struct apply + + : not_< is_same > + { + + + + + }; +}; + +}} +# 19 "../boost/mpl/find.hpp" 2 + + + +namespace boost { namespace mpl { + +template< + typename Sequence = na + , typename T = na + > +struct find + : find_if< Sequence,same_as > +{ + +}; + +template<> struct find< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : find< T1 , T2 > { }; }; template< typename Tag > struct lambda< find< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef find< na , na > result_; typedef find< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< find< T1 , T2 > > : int_<2> { }; template<> struct template_arity< find< na , na > > : int_<-1> { }; } + +}} +# 21 "../boost/mpl/aux_/contains_impl.hpp" 2 + + + + + + + +namespace boost { namespace mpl { + +template< typename Tag > +struct contains_impl +{ + template< typename Sequence, typename T > struct apply + + : not_< is_same< + typename find::type + , typename end::type + > > + { +# 54 "../boost/mpl/aux_/contains_impl.hpp" + }; +}; + + template<> struct contains_impl {}; + +}} +# 21 "../boost/mpl/contains.hpp" 2 + + + +namespace boost { namespace mpl { + +template< + typename Sequence = na + , typename T = na + > +struct contains + : contains_impl< typename sequence_tag::type > + ::template apply< Sequence,T > +{ + +}; + +template<> struct contains< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : contains< T1 , T2 > { }; }; template< typename Tag > struct lambda< contains< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef contains< na , na > result_; typedef contains< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< contains< T1 , T2 > > : int_<2> { }; template<> struct template_arity< contains< na , na > > : int_<-1> { }; } + +}} +# 11 "../boost/math/policies/policy.hpp" 2 + + +# 1 "../boost/mpl/remove_if.hpp" 1 +# 18 "../boost/mpl/remove_if.hpp" +# 1 "../boost/mpl/fold.hpp" 1 +# 19 "../boost/mpl/fold.hpp" +# 1 "../boost/mpl/O1_size.hpp" 1 +# 19 "../boost/mpl/O1_size.hpp" +# 1 "../boost/mpl/aux_/O1_size_impl.hpp" 1 +# 20 "../boost/mpl/aux_/O1_size_impl.hpp" +# 1 "../boost/mpl/aux_/has_size.hpp" 1 +# 19 "../boost/mpl/aux_/has_size.hpp" +namespace boost { namespace mpl { namespace aux { +template< typename T, typename fallback_ = boost::mpl::bool_ > struct has_size { struct gcc_3_2_wknd { template< typename U > static boost::mpl::aux::yes_tag test( boost::mpl::aux::type_wrapper const volatile* , boost::mpl::aux::type_wrapper* = 0 ); static boost::mpl::aux::no_tag test(...); }; typedef boost::mpl::aux::type_wrapper t_; static const bool value = sizeof(gcc_3_2_wknd::test(static_cast(0))) == sizeof(boost::mpl::aux::yes_tag); typedef boost::mpl::bool_ type; }; +}}} +# 21 "../boost/mpl/aux_/O1_size_impl.hpp" 2 + + + + + +namespace boost { namespace mpl { +# 35 "../boost/mpl/aux_/O1_size_impl.hpp" +namespace aux { +template< typename Sequence > struct O1_size_impl + : Sequence::size +{ +}; +} + +template< typename Tag > +struct O1_size_impl +{ + template< typename Sequence > struct apply + + : if_< + aux::has_size + , aux::O1_size_impl + , long_<-1> + >::type + { +# 69 "../boost/mpl/aux_/O1_size_impl.hpp" + }; +}; +# 85 "../boost/mpl/aux_/O1_size_impl.hpp" +}} +# 20 "../boost/mpl/O1_size.hpp" 2 + + + +namespace boost { namespace mpl { + + +template< + typename Sequence = na + > +struct O1_size + : O1_size_impl< typename sequence_tag::type > + ::template apply< Sequence > +{ + +}; + +template<> struct O1_size< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : O1_size< T1 > { }; }; template< typename Tag > struct lambda< O1_size< na > , Tag , int_<-1> > { typedef false_ is_le; typedef O1_size< na > result_; typedef O1_size< na > type; }; namespace aux { template< typename T1 > struct template_arity< O1_size< T1 > > : int_<1> { }; template<> struct template_arity< O1_size< na > > : int_<-1> { }; } + +}} +# 20 "../boost/mpl/fold.hpp" 2 +# 1 "../boost/mpl/aux_/fold_impl.hpp" 1 +# 19 "../boost/mpl/aux_/fold_impl.hpp" +# 1 "../boost/mpl/apply.hpp" 1 +# 20 "../boost/mpl/aux_/fold_impl.hpp" 2 +# 34 "../boost/mpl/aux_/fold_impl.hpp" +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp" +namespace boost { namespace mpl { namespace aux { + + + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl +{ + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,First,Last,State,ForwardOp > + : fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 35 "../boost/mpl/aux_/fold_impl.hpp" 2 +# 21 "../boost/mpl/fold.hpp" 2 + + + +namespace boost { namespace mpl { + +template< + typename Sequence = na + , typename State = na + , typename ForwardOp = na + > +struct fold +{ + typedef typename aux::fold_impl< + ::boost::mpl::O1_size::value + , typename begin::type + , typename end::type + , State + , ForwardOp + >::state type; + + +}; + +template<> struct fold< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : fold< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< fold< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef fold< na , na , na > result_; typedef fold< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< fold< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< fold< na , na , na > > : int_<-1> { }; } + +}} +# 19 "../boost/mpl/remove_if.hpp" 2 +# 1 "../boost/mpl/reverse_fold.hpp" 1 +# 20 "../boost/mpl/reverse_fold.hpp" +# 1 "../boost/mpl/arg.hpp" 1 +# 21 "../boost/mpl/reverse_fold.hpp" 2 +# 1 "../boost/mpl/aux_/reverse_fold_impl.hpp" 1 +# 20 "../boost/mpl/aux_/reverse_fold_impl.hpp" +# 1 "../boost/mpl/apply.hpp" 1 +# 21 "../boost/mpl/aux_/reverse_fold_impl.hpp" 2 +# 35 "../boost/mpl/aux_/reverse_fold_impl.hpp" +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp" +namespace boost { namespace mpl { namespace aux { + + + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef fwd_state0 bkwd_state0; + typedef bkwd_state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + + + typedef fwd_state1 bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + typedef bkwd_state0 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + + + typedef fwd_state2 bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + + + typedef fwd_state3 bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef fwd_state4 bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef iter4 iterator; +}; + +template< + long N + , typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl +{ + typedef First iter0; + typedef State fwd_state0; + typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; + typedef typename mpl::next::type iter4; + + + typedef reverse_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , iter4 + , Last + , fwd_state4 + , BackwardOp + , ForwardOp + > nested_chunk; + + typedef typename nested_chunk::state bkwd_state4; + typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; + typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; + typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; + typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; + + + typedef bkwd_state0 state; + typedef typename nested_chunk::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > +{ + typedef reverse_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , BackwardOp + , ForwardOp + > nested_step; + + typedef typename apply2< + BackwardOp + , typename nested_step::state + , typename deref::type + >::type state; + + typedef typename nested_step::iterator iterator; +}; + +template< + typename Last + , typename State + , typename BackwardOp + , typename ForwardOp + > +struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 36 "../boost/mpl/aux_/reverse_fold_impl.hpp" 2 +# 22 "../boost/mpl/reverse_fold.hpp" 2 + + +namespace boost { namespace mpl { + +template< + typename Sequence = na + , typename State = na + , typename BackwardOp = na + , typename ForwardOp = arg<1> + > +struct reverse_fold +{ + typedef typename aux::reverse_fold_impl< + ::boost::mpl::O1_size::value + , typename begin::type + , typename end::type + , State + , BackwardOp + , ForwardOp + >::state type; + + +}; + +template<> struct reverse_fold< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : reverse_fold< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< reverse_fold< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef reverse_fold< na , na , na > result_; typedef reverse_fold< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< reverse_fold< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< reverse_fold< na , na , na > > : int_<-1> { }; } + +}} +# 20 "../boost/mpl/remove_if.hpp" 2 + + + + +# 1 "../boost/mpl/apply.hpp" 1 +# 25 "../boost/mpl/remove_if.hpp" 2 +# 1 "../boost/mpl/aux_/inserter_algorithm.hpp" 1 +# 18 "../boost/mpl/aux_/inserter_algorithm.hpp" +# 1 "../boost/mpl/back_inserter.hpp" 1 +# 18 "../boost/mpl/back_inserter.hpp" +# 1 "../boost/mpl/push_back.hpp" 1 +# 18 "../boost/mpl/push_back.hpp" +# 1 "../boost/mpl/aux_/push_back_impl.hpp" 1 +# 26 "../boost/mpl/aux_/push_back_impl.hpp" +namespace boost { namespace mpl { + +struct has_push_back_arg {}; + + + +template< typename Tag > +struct push_back_impl +{ + template< typename Sequence, typename T > struct apply + { + + + + struct REQUESTED_PUSH_BACK_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST; typedef struct + + + + REQUESTED_PUSH_BACK_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST44 +# 40 "../boost/mpl/aux_/push_back_impl.hpp" + : boost::mpl::assert_ { static boost::mpl::failed ************ (REQUESTED_PUSH_BACK_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST::************ assert_arg()) ( Sequence ) { return 0; } } + + + + mpl_assert_arg44 +# 40 "../boost/mpl/aux_/push_back_impl.hpp" + ; enum { mpl_assertion_in_line_44 = sizeof( boost::mpl::assertion_failed<(( boost::is_same< T, has_push_back_arg >::value ))>( mpl_assert_arg44::assert_arg() ) ) } + + + + ; + }; +}; + +template< typename Tag > +struct has_push_back_impl +{ + template< typename Seq > struct apply + + : aux::has_type< push_back< Seq, has_push_back_arg > > + { + + + + + + + + }; +}; + + template<> struct push_back_impl {}; + template<> struct has_push_back_impl {}; + +}} +# 19 "../boost/mpl/push_back.hpp" 2 + + + + +namespace boost { namespace mpl { + +template< + typename Sequence = na + , typename T = na + > +struct push_back + : push_back_impl< typename sequence_tag::type > + ::template apply< Sequence,T > +{ + +}; + + +template< + typename Sequence = na + > +struct has_push_back + : has_push_back_impl< typename sequence_tag::type > + ::template apply< Sequence > +{ + +}; + + +template<> struct push_back< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : push_back< T1 , T2 > { }; }; template< typename Tag > struct lambda< push_back< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef push_back< na , na > result_; typedef push_back< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< push_back< T1 , T2 > > : int_<2> { }; template<> struct template_arity< push_back< na , na > > : int_<-1> { }; } +template<> struct has_push_back< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : has_push_back< T1 > { }; }; template< typename Tag > struct lambda< has_push_back< na > , Tag , int_<-1> > { typedef false_ is_le; typedef has_push_back< na > result_; typedef has_push_back< na > type; }; namespace aux { template< typename T1 > struct template_arity< has_push_back< T1 > > : int_<1> { }; template<> struct template_arity< has_push_back< na > > : int_<-1> { }; } + +}} +# 19 "../boost/mpl/back_inserter.hpp" 2 +# 1 "../boost/mpl/inserter.hpp" 1 +# 18 "../boost/mpl/inserter.hpp" +namespace boost { namespace mpl { + +template< + typename Sequence + , typename Operation + > +struct inserter +{ + typedef Sequence state; + typedef Operation operation; +}; + +}} +# 20 "../boost/mpl/back_inserter.hpp" 2 + +namespace boost { +namespace mpl { + +template< + typename Sequence + > +struct back_inserter + : inserter< Sequence,push_back<> > +{ +}; + +}} +# 19 "../boost/mpl/aux_/inserter_algorithm.hpp" 2 +# 1 "../boost/mpl/front_inserter.hpp" 1 +# 18 "../boost/mpl/front_inserter.hpp" +# 1 "../boost/mpl/push_front.hpp" 1 +# 18 "../boost/mpl/push_front.hpp" +# 1 "../boost/mpl/aux_/push_front_impl.hpp" 1 +# 26 "../boost/mpl/aux_/push_front_impl.hpp" +namespace boost { namespace mpl { + +struct has_push_front_arg {}; + + + + +template< typename Tag > +struct push_front_impl +{ + template< typename Sequence, typename T > struct apply + { + + + + struct REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST; typedef struct + + + + REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST45 +# 41 "../boost/mpl/aux_/push_front_impl.hpp" + : boost::mpl::assert_ { static boost::mpl::failed ************ (REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST::************ assert_arg()) ( Sequence ) { return 0; } } + + + + mpl_assert_arg45 +# 41 "../boost/mpl/aux_/push_front_impl.hpp" + ; enum { mpl_assertion_in_line_45 = sizeof( boost::mpl::assertion_failed<(( boost::is_same< T, has_push_front_arg >::value ))>( mpl_assert_arg45::assert_arg() ) ) } + + + + ; + }; +}; + +template< typename Tag > +struct has_push_front_impl +{ + template< typename Seq > struct apply + + : aux::has_type< push_front< Seq, has_push_front_arg > > + { + + + + + + + + }; +}; + + template<> struct push_front_impl {}; + template<> struct has_push_front_impl {}; + +}} +# 19 "../boost/mpl/push_front.hpp" 2 + + + + +namespace boost { namespace mpl { + +template< + typename Sequence = na + , typename T = na + > +struct push_front + : push_front_impl< typename sequence_tag::type > + ::template apply< Sequence,T > +{ + +}; + + +template< + typename Sequence = na + > +struct has_push_front + : has_push_front_impl< typename sequence_tag::type > + ::template apply< Sequence > +{ + +}; + +template<> struct push_front< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : push_front< T1 , T2 > { }; }; template< typename Tag > struct lambda< push_front< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef push_front< na , na > result_; typedef push_front< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< push_front< T1 , T2 > > : int_<2> { }; template<> struct template_arity< push_front< na , na > > : int_<-1> { }; } +template<> struct has_push_front< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : has_push_front< T1 > { }; }; template< typename Tag > struct lambda< has_push_front< na > , Tag , int_<-1> > { typedef false_ is_le; typedef has_push_front< na > result_; typedef has_push_front< na > type; }; namespace aux { template< typename T1 > struct template_arity< has_push_front< T1 > > : int_<1> { }; template<> struct template_arity< has_push_front< na > > : int_<-1> { }; } + +}} +# 19 "../boost/mpl/front_inserter.hpp" 2 + + +namespace boost { namespace mpl { + +template< + typename Sequence + > +struct front_inserter + : inserter< Sequence,push_front<> > +{ +}; + +}} +# 20 "../boost/mpl/aux_/inserter_algorithm.hpp" 2 + + + + +# 1 "../boost/mpl/clear.hpp" 1 +# 18 "../boost/mpl/clear.hpp" +# 1 "../boost/mpl/aux_/clear_impl.hpp" 1 +# 21 "../boost/mpl/aux_/clear_impl.hpp" +namespace boost { namespace mpl { + + + +template< typename Tag > +struct clear_impl +{ + template< typename Sequence > struct apply; +}; + + template<> struct clear_impl {}; + +}} +# 19 "../boost/mpl/clear.hpp" 2 + + + + +namespace boost { namespace mpl { + +template< + typename Sequence = na + > +struct clear + : clear_impl< typename sequence_tag::type > + ::template apply< Sequence > +{ + +}; + +template<> struct clear< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : clear< T1 > { }; }; template< typename Tag > struct lambda< clear< na > , Tag , int_<-1> > { typedef false_ is_le; typedef clear< na > result_; typedef clear< na > type; }; namespace aux { template< typename T1 > struct template_arity< clear< T1 > > : int_<1> { }; template<> struct template_arity< clear< na > > : int_<-1> { }; } + +}} +# 25 "../boost/mpl/aux_/inserter_algorithm.hpp" 2 +# 26 "../boost/mpl/remove_if.hpp" 2 + +namespace boost { namespace mpl { + +namespace aux { + +template< typename Pred, typename InsertOp > struct remove_if_helper +{ + template< typename Sequence, typename U > struct apply + { + typedef typename eval_if< + typename apply1::type + , identity + , apply2 + >::type type; + }; +}; + +template< + typename Sequence + , typename Predicate + , typename Inserter + > +struct remove_if_impl + : fold< + Sequence + , typename Inserter::state + , protect< aux::remove_if_helper< + typename lambda::type + , typename Inserter::operation + > > + > +{ +}; + +template< + typename Sequence + , typename Predicate + , typename Inserter + > +struct reverse_remove_if_impl + : reverse_fold< + Sequence + , typename Inserter::state + , protect< aux::remove_if_helper< + typename lambda::type + , typename Inserter::operation + > > + > +{ +}; + +} + + template< typename P1 = na , typename P2 = na , typename P3 = na > struct remove_if : aux::remove_if_impl< P1 , P2 , P3> { }; template< typename P1 , typename P2 > struct remove_if< P1 , P2,na > : if_< has_push_back< typename clear::type> , aux::remove_if_impl< P1 , P2 , back_inserter< typename clear::type > > , aux::reverse_remove_if_impl< P1 , P2 , front_inserter< typename clear::type > > >::type { }; template< typename P1 = na , typename P2 = na , typename P3 = na > struct reverse_remove_if : aux::reverse_remove_if_impl< P1 , P2 , P3> { }; template< typename P1 , typename P2 > struct reverse_remove_if< P1 , P2,na > : if_< has_push_back , aux::reverse_remove_if_impl< P1 , P2 , back_inserter< typename clear::type > > , aux::remove_if_impl< P1 , P2 , front_inserter< typename clear::type > > >::type { }; template<> struct remove_if< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : remove_if< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< remove_if< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef remove_if< na , na , na > result_; typedef remove_if< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< remove_if< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< remove_if< na , na , na > > : int_<-1> { }; } template<> struct reverse_remove_if< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : reverse_remove_if< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< reverse_remove_if< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef reverse_remove_if< na , na , na > result_; typedef reverse_remove_if< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< reverse_remove_if< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< reverse_remove_if< na , na , na > > : int_<-1> { }; } + +}} +# 14 "../boost/math/policies/policy.hpp" 2 +# 1 "../boost/mpl/vector.hpp" 1 +# 18 "../boost/mpl/vector.hpp" +# 1 "../boost/mpl/limits/vector.hpp" 1 +# 19 "../boost/mpl/vector.hpp" 2 +# 36 "../boost/mpl/vector.hpp" +# 1 "../boost/mpl/vector/vector20.hpp" 1 +# 18 "../boost/mpl/vector/vector20.hpp" +# 1 "../boost/mpl/vector/vector10.hpp" 1 +# 18 "../boost/mpl/vector/vector10.hpp" +# 1 "../boost/mpl/vector/vector0.hpp" 1 +# 17 "../boost/mpl/vector/vector0.hpp" +# 1 "../boost/mpl/vector/aux_/at.hpp" 1 +# 17 "../boost/mpl/vector/aux_/at.hpp" +# 1 "../boost/mpl/at_fwd.hpp" 1 +# 17 "../boost/mpl/at_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct at_impl; +template< typename Sequence, typename N > struct at; + +}} +# 18 "../boost/mpl/vector/aux_/at.hpp" 2 +# 1 "../boost/mpl/vector/aux_/tag.hpp" 1 +# 17 "../boost/mpl/vector/aux_/tag.hpp" +# 1 "../boost/mpl/aux_/config/typeof.hpp" 1 +# 18 "../boost/mpl/vector/aux_/tag.hpp" 2 + + +namespace boost { namespace mpl { namespace aux { + +struct v_iter_tag; + + +struct vector_tag; + + + + +}}} +# 19 "../boost/mpl/vector/aux_/at.hpp" 2 +# 27 "../boost/mpl/vector/aux_/at.hpp" +namespace boost { namespace mpl { + + + +template< typename Vector, long n_ > +struct v_at_impl +{ + typedef long_< (Vector::lower_bound_::value + n_) > index_; + typedef __typeof__( Vector::item_(index_()) ) type; +}; + + +template< typename Vector, long n_ > +struct v_at + : aux::wrapped_type< typename v_at_impl::type > +{ +}; + +template<> +struct at_impl< aux::vector_tag > +{ + template< typename Vector, typename N > struct apply + : v_at< + Vector + , N::value + > + { + }; +}; +# 114 "../boost/mpl/vector/aux_/at.hpp" +}} +# 18 "../boost/mpl/vector/vector0.hpp" 2 +# 1 "../boost/mpl/vector/aux_/front.hpp" 1 +# 24 "../boost/mpl/vector/aux_/front.hpp" +namespace boost { namespace mpl { + + + +template<> +struct front_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + : v_at + { + }; +}; +# 54 "../boost/mpl/vector/aux_/front.hpp" +}} +# 19 "../boost/mpl/vector/vector0.hpp" 2 +# 1 "../boost/mpl/vector/aux_/push_front.hpp" 1 +# 22 "../boost/mpl/vector/aux_/push_front.hpp" +# 1 "../boost/mpl/vector/aux_/item.hpp" 1 +# 24 "../boost/mpl/vector/aux_/item.hpp" +namespace boost { namespace mpl { + + + +template< + typename T + , typename Base + , int at_front = 0 + > +struct v_item + : Base +{ + typedef typename Base::upper_bound_ index_; + typedef typename next::type upper_bound_; + typedef typename next::type size; + typedef Base base; + typedef v_item type; + + + + static aux::type_wrapper item_(index_); + using Base::item_; +}; + +template< + typename T + , typename Base + > +struct v_item + : Base +{ + typedef typename prior::type index_; + typedef index_ lower_bound_; + typedef typename next::type size; + typedef Base base; + typedef v_item type; + + static aux::type_wrapper item_(index_); + using Base::item_; +}; + + +template< + typename Base + , int at_front + > +struct v_mask + : Base +{ + typedef typename prior::type index_; + typedef index_ upper_bound_; + typedef typename prior::type size; + typedef Base base; + typedef v_mask type; + + static aux::type_wrapper item_(index_); + using Base::item_; +}; + +template< + typename Base + > +struct v_mask + : Base +{ + typedef typename Base::lower_bound_ index_; + typedef typename next::type lower_bound_; + typedef typename prior::type size; + typedef Base base; + typedef v_mask type; + + static aux::type_wrapper item_(index_); + using Base::item_; +}; + + + +}} +# 23 "../boost/mpl/vector/aux_/push_front.hpp" 2 + + +namespace boost { namespace mpl { + +template<> +struct push_front_impl< aux::vector_tag > +{ + template< typename Vector, typename T > struct apply + { + typedef v_item type; + }; +}; + +}} +# 20 "../boost/mpl/vector/vector0.hpp" 2 +# 1 "../boost/mpl/vector/aux_/pop_front.hpp" 1 +# 25 "../boost/mpl/vector/aux_/pop_front.hpp" +namespace boost { namespace mpl { + +template<> +struct pop_front_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef v_mask type; + }; +}; + +}} +# 21 "../boost/mpl/vector/vector0.hpp" 2 +# 1 "../boost/mpl/vector/aux_/push_back.hpp" 1 +# 25 "../boost/mpl/vector/aux_/push_back.hpp" +namespace boost { namespace mpl { + +template<> +struct push_back_impl< aux::vector_tag > +{ + template< typename Vector, typename T > struct apply + { + typedef v_item type; + }; +}; + +}} +# 22 "../boost/mpl/vector/vector0.hpp" 2 +# 1 "../boost/mpl/vector/aux_/pop_back.hpp" 1 +# 17 "../boost/mpl/vector/aux_/pop_back.hpp" +# 1 "../boost/mpl/pop_back_fwd.hpp" 1 +# 17 "../boost/mpl/pop_back_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct pop_back_impl; +template< typename Sequence > struct pop_back; + +}} +# 18 "../boost/mpl/vector/aux_/pop_back.hpp" 2 + + + + + + + +namespace boost { namespace mpl { + +template<> +struct pop_back_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef v_mask type; + }; +}; + +}} +# 23 "../boost/mpl/vector/vector0.hpp" 2 +# 1 "../boost/mpl/vector/aux_/back.hpp" 1 +# 17 "../boost/mpl/vector/aux_/back.hpp" +# 1 "../boost/mpl/back_fwd.hpp" 1 +# 17 "../boost/mpl/back_fwd.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct back_impl; +template< typename Sequence > struct back; + +}} +# 18 "../boost/mpl/vector/aux_/back.hpp" 2 + + + + + + +namespace boost { namespace mpl { + + + +template<> +struct back_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + : v_at< + Vector + , prior::type::value + > + { + }; +}; +# 57 "../boost/mpl/vector/aux_/back.hpp" +}} +# 24 "../boost/mpl/vector/vector0.hpp" 2 +# 1 "../boost/mpl/vector/aux_/clear.hpp" 1 +# 18 "../boost/mpl/vector/aux_/clear.hpp" +# 1 "../boost/mpl/vector/aux_/vector0.hpp" 1 +# 22 "../boost/mpl/vector/aux_/vector0.hpp" +# 1 "../boost/mpl/vector/aux_/iterator.hpp" 1 +# 19 "../boost/mpl/vector/aux_/iterator.hpp" +# 1 "../boost/mpl/plus.hpp" 1 +# 19 "../boost/mpl/plus.hpp" +# 1 "../boost/mpl/aux_/arithmetic_op.hpp" 1 +# 26 "../boost/mpl/aux_/arithmetic_op.hpp" +# 1 "../boost/mpl/aux_/numeric_op.hpp" 1 +# 22 "../boost/mpl/aux_/numeric_op.hpp" +# 1 "../boost/mpl/apply_wrap.hpp" 1 +# 23 "../boost/mpl/aux_/numeric_op.hpp" 2 +# 27 "../boost/mpl/aux_/arithmetic_op.hpp" 2 + + + + + + + +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/plus.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/plus.hpp" +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct plus_impl + : if_c< + ( Tag1::value + > Tag2::value + ) + + , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + + +template<> struct plus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct plus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct plus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename T > struct plus_tag +{ + typedef typename T::tag type; +}; + +template< + typename N1 = na + , typename N2 = na + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct plus + : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> +{ + + + + + +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct plus< N1,N2,N3,N4,na > + + : plus< plus< plus< N1,N2 >, N3>, N4> +{ + + + + + +}; + +template< + typename N1, typename N2, typename N3 + > +struct plus< N1,N2,N3,na,na > + + : plus< plus< N1,N2 >, N3> +{ + + + + + +}; + +template< + typename N1, typename N2 + > +struct plus< N1,N2,na,na,na > + : plus_impl< + typename plus_tag::type + , typename plus_tag::type + >::template apply< N1,N2 >::type +{ + + + + + + +}; + +template<> struct plus< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : plus< T1 , T2 > { }; }; template< typename Tag > struct lambda< plus< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef plus< na , na > result_; typedef plus< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< plus< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< plus< na , na > > : int_<-1> { }; } + +}} + +namespace boost { namespace mpl { +template<> +struct plus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( N1::value + + N2::value + ) + > + { + }; +}; + +}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 35 "../boost/mpl/aux_/arithmetic_op.hpp" 2 +# 20 "../boost/mpl/plus.hpp" 2 +# 20 "../boost/mpl/vector/aux_/iterator.hpp" 2 +# 1 "../boost/mpl/minus.hpp" 1 +# 19 "../boost/mpl/minus.hpp" +# 1 "../boost/mpl/aux_/arithmetic_op.hpp" 1 +# 26 "../boost/mpl/aux_/arithmetic_op.hpp" +# 1 "../boost/mpl/aux_/numeric_op.hpp" 1 +# 22 "../boost/mpl/aux_/numeric_op.hpp" +# 1 "../boost/mpl/apply_wrap.hpp" 1 +# 23 "../boost/mpl/aux_/numeric_op.hpp" 2 +# 27 "../boost/mpl/aux_/arithmetic_op.hpp" 2 + + + + + + + +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/minus.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/minus.hpp" +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct minus_impl + : if_c< + ( Tag1::value + > Tag2::value + ) + + , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + + +template<> struct minus_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct minus_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct minus_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename T > struct minus_tag +{ + typedef typename T::tag type; +}; + +template< + typename N1 = na + , typename N2 = na + , typename N3 = na, typename N4 = na, typename N5 = na + > +struct minus + : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> +{ + + + + + +}; + +template< + typename N1, typename N2, typename N3, typename N4 + > +struct minus< N1,N2,N3,N4,na > + + : minus< minus< minus< N1,N2 >, N3>, N4> +{ + + + + + +}; + +template< + typename N1, typename N2, typename N3 + > +struct minus< N1,N2,N3,na,na > + + : minus< minus< N1,N2 >, N3> +{ + + + + + +}; + +template< + typename N1, typename N2 + > +struct minus< N1,N2,na,na,na > + : minus_impl< + typename minus_tag::type + , typename minus_tag::type + >::template apply< N1,N2 >::type +{ + + + + + + +}; + +template<> struct minus< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : minus< T1 , T2 > { }; }; template< typename Tag > struct lambda< minus< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef minus< na , na > result_; typedef minus< na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > struct template_arity< minus< T1 , T2 , T3 , T4 , T5 > > : int_<5> { }; template<> struct template_arity< minus< na , na > > : int_<-1> { }; } + +}} + +namespace boost { namespace mpl { +template<> +struct minus_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : integral_c< + typename aux::largest_int< + typename N1::value_type + , typename N2::value_type + >::type + , ( N1::value + - N2::value + ) + > + { + }; +}; + +}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 35 "../boost/mpl/aux_/arithmetic_op.hpp" 2 +# 20 "../boost/mpl/minus.hpp" 2 +# 21 "../boost/mpl/vector/aux_/iterator.hpp" 2 +# 1 "../boost/mpl/advance_fwd.hpp" 1 +# 19 "../boost/mpl/advance_fwd.hpp" +namespace boost { namespace mpl { + + + +template< typename Tag > struct advance_impl; +template< typename Iterator, typename N > struct advance; + +}} +# 22 "../boost/mpl/vector/aux_/iterator.hpp" 2 +# 1 "../boost/mpl/distance_fwd.hpp" 1 +# 19 "../boost/mpl/distance_fwd.hpp" +namespace boost { namespace mpl { + + + +template< typename Tag > struct distance_impl; +template< typename First, typename Last > struct distance; + +}} +# 23 "../boost/mpl/vector/aux_/iterator.hpp" 2 + +# 1 "../boost/mpl/prior.hpp" 1 +# 25 "../boost/mpl/vector/aux_/iterator.hpp" 2 + + + + + +namespace boost { namespace mpl { + +template< + typename Vector + , long n_ + > +struct v_iter +{ + typedef aux::v_iter_tag tag; + typedef random_access_iterator_tag category; + typedef typename v_at::type type; + + typedef Vector vector_; + typedef mpl::long_ pos; +# 56 "../boost/mpl/vector/aux_/iterator.hpp" +}; + + + + +template< + typename Vector + , long n_ + > +struct next< v_iter > +{ + typedef v_iter type; +}; + +template< + typename Vector + , long n_ + > +struct prior< v_iter > +{ + typedef v_iter type; +}; + +template< + typename Vector + , long n_ + , typename Distance + > +struct advance< v_iter,Distance> +{ + typedef v_iter< + Vector + , (n_ + Distance::value) + > type; +}; + +template< + typename Vector + , long n_ + , long m_ + > +struct distance< v_iter, v_iter > + : mpl::long_<(m_ - n_)> +{ +}; +# 128 "../boost/mpl/vector/aux_/iterator.hpp" +}} +# 23 "../boost/mpl/vector/aux_/vector0.hpp" 2 + + + +namespace boost { namespace mpl { + +template< typename Dummy = na > struct vector0; + +template<> struct vector0 +{ + + typedef aux::vector_tag tag; + typedef vector0 type; + typedef long_<32768> lower_bound_; + typedef lower_bound_ upper_bound_; + typedef long_<0> size; + + static aux::type_wrapper item_(...); +# 48 "../boost/mpl/vector/aux_/vector0.hpp" +}; + +}} +# 19 "../boost/mpl/vector/aux_/clear.hpp" 2 + + + + +namespace boost { namespace mpl { + + + +template<> +struct clear_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; +# 53 "../boost/mpl/vector/aux_/clear.hpp" +}} +# 25 "../boost/mpl/vector/vector0.hpp" 2 +# 1 "../boost/mpl/vector/aux_/O1_size.hpp" 1 +# 24 "../boost/mpl/vector/aux_/O1_size.hpp" +namespace boost { namespace mpl { + + + +template<> +struct O1_size_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + : Vector::size + { + }; +}; +# 54 "../boost/mpl/vector/aux_/O1_size.hpp" +}} +# 26 "../boost/mpl/vector/vector0.hpp" 2 +# 1 "../boost/mpl/vector/aux_/size.hpp" 1 +# 23 "../boost/mpl/vector/aux_/size.hpp" +namespace boost { namespace mpl { + + + +template<> +struct size_impl< aux::vector_tag > + : O1_size_impl< aux::vector_tag > +{ +}; +# 47 "../boost/mpl/vector/aux_/size.hpp" +}} +# 27 "../boost/mpl/vector/vector0.hpp" 2 +# 1 "../boost/mpl/vector/aux_/empty.hpp" 1 +# 24 "../boost/mpl/vector/aux_/empty.hpp" +namespace boost { namespace mpl { + + + +template<> +struct empty_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + : is_same< + typename Vector::lower_bound_ + , typename Vector::upper_bound_ + > + { + }; +}; +# 66 "../boost/mpl/vector/aux_/empty.hpp" +}} +# 28 "../boost/mpl/vector/vector0.hpp" 2 + + + +# 1 "../boost/mpl/vector/aux_/begin_end.hpp" 1 +# 25 "../boost/mpl/vector/aux_/begin_end.hpp" +namespace boost { namespace mpl { + +template<> +struct begin_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef v_iter type; + }; +}; + +template<> +struct end_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef v_iter type; + }; +}; + +}} +# 32 "../boost/mpl/vector/vector0.hpp" 2 +# 19 "../boost/mpl/vector/vector10.hpp" 2 +# 27 "../boost/mpl/vector/vector10.hpp" +# 1 "../boost/mpl/vector/aux_/include_preprocessed.hpp" 1 +# 49 "../boost/mpl/vector/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp" 1 +# 12 "../boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp" +namespace boost { namespace mpl { + +template< + typename T0 + > +struct vector1 + : v_item< + T0 + , vector0< > + > +{ + typedef vector1 type; +}; + +template< + typename T0, typename T1 + > +struct vector2 + : v_item< + T1 + , vector1 + > +{ + typedef vector2 type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct vector3 + : v_item< + T2 + , vector2< T0,T1 > + > +{ + typedef vector3 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct vector4 + : v_item< + T3 + , vector3< T0,T1,T2 > + > +{ + typedef vector4 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct vector5 + : v_item< + T4 + , vector4< T0,T1,T2,T3 > + > +{ + typedef vector5 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct vector6 + : v_item< + T5 + , vector5< T0,T1,T2,T3,T4 > + > +{ + typedef vector6 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct vector7 + : v_item< + T6 + , vector6< T0,T1,T2,T3,T4,T5 > + > +{ + typedef vector7 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct vector8 + : v_item< + T7 + , vector7< T0,T1,T2,T3,T4,T5,T6 > + > +{ + typedef vector8 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct vector9 + : v_item< + T8 + , vector8< T0,T1,T2,T3,T4,T5,T6,T7 > + > +{ + typedef vector9 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct vector10 + : v_item< + T9 + , vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > + > +{ + typedef vector10 type; +}; + +}} +# 50 "../boost/mpl/vector/aux_/include_preprocessed.hpp" 2 +# 28 "../boost/mpl/vector/vector10.hpp" 2 +# 19 "../boost/mpl/vector/vector20.hpp" 2 +# 27 "../boost/mpl/vector/vector20.hpp" +# 1 "../boost/mpl/vector/aux_/include_preprocessed.hpp" 1 +# 49 "../boost/mpl/vector/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp" 1 +# 12 "../boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp" +namespace boost { namespace mpl { + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector11 + : v_item< + T10 + , vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > + > +{ + typedef vector11 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector12 + : v_item< + T11 + , vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > + > +{ + typedef vector12 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector13 + : v_item< + T12 + , vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > + > +{ + typedef vector13 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector14 + : v_item< + T13 + , vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > + > +{ + typedef vector14 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector15 + : v_item< + T14 + , vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > + > +{ + typedef vector15 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector16 + : v_item< + T15 + , vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 > + > +{ + typedef vector16 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector17 + : v_item< + T16 + , vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 > + > +{ + typedef vector17 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector18 + : v_item< + T17 + , vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 > + > +{ + typedef vector18 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector19 + : v_item< + T18 + , vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 > + > +{ + typedef vector19 type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector20 + : v_item< + T19 + , vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 > + > +{ + typedef vector20 type; +}; + +}} +# 50 "../boost/mpl/vector/aux_/include_preprocessed.hpp" 2 +# 28 "../boost/mpl/vector/vector20.hpp" 2 +# 37 "../boost/mpl/vector.hpp" 2 +# 46 "../boost/mpl/vector.hpp" +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/vector.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/vector.hpp" +namespace boost { namespace mpl { + +template< + typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na + , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na + , typename T12 = na, typename T13 = na, typename T14 = na + , typename T15 = na, typename T16 = na, typename T17 = na + , typename T18 = na, typename T19 = na + > +struct vector; + +template< + + > +struct vector< + na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector0< > +{ + typedef vector0< >::type type; +}; + +template< + typename T0 + > +struct vector< + T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector1 +{ + typedef typename vector1::type type; +}; + +template< + typename T0, typename T1 + > +struct vector< + T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector2< T0,T1 > +{ + typedef typename vector2< T0,T1 >::type type; +}; + +template< + typename T0, typename T1, typename T2 + > +struct vector< + T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector3< T0,T1,T2 > +{ + typedef typename vector3< T0,T1,T2 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3 + > +struct vector< + T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector4< T0,T1,T2,T3 > +{ + typedef typename vector4< T0,T1,T2,T3 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + > +struct vector< + T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector5< T0,T1,T2,T3,T4 > +{ + typedef typename vector5< T0,T1,T2,T3,T4 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct vector< + T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector6< T0,T1,T2,T3,T4,T5 > +{ + typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector7< T0,T1,T2,T3,T4,T5,T6 > +{ + typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na + , na, na, na + > + : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > +{ + typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na + , na, na, na + > + : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > +{ + typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na + , na, na, na + > + : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > +{ + typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na + , na, na, na + > + : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > +{ + typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na + , na, na, na, na + > + : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > +{ + typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na + , na, na, na, na + > + : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > +{ + typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na + , na, na, na, na + > + : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > +{ + typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na + , na, na, na, na + > + : vector15< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + > +{ + typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, na, na, na, na + > + : vector16< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15 + > +{ + typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, na, na, na + > + : vector17< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16 + > +{ + typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, na, na + > + : vector18< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17 + > +{ + typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; +}; + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18 + > +struct vector< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, na + > + : vector19< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18 + > +{ + typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; +}; + + + +template< + typename T0, typename T1, typename T2, typename T3, typename T4 + , typename T5, typename T6, typename T7, typename T8, typename T9 + , typename T10, typename T11, typename T12, typename T13, typename T14 + , typename T15, typename T16, typename T17, typename T18, typename T19 + > +struct vector + : vector20< + T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 + , T15, T16, T17, T18, T19 + > +{ + typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; +}; + +}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 47 "../boost/mpl/vector.hpp" 2 +# 15 "../boost/math/policies/policy.hpp" 2 + +# 1 "../boost/mpl/at.hpp" 1 +# 18 "../boost/mpl/at.hpp" +# 1 "../boost/mpl/aux_/at_impl.hpp" 1 +# 18 "../boost/mpl/aux_/at_impl.hpp" +# 1 "../boost/mpl/advance.hpp" 1 +# 19 "../boost/mpl/advance.hpp" +# 1 "../boost/mpl/negate.hpp" 1 +# 25 "../boost/mpl/negate.hpp" +namespace boost { namespace mpl { + +template< typename Tag > struct negate_impl; + +template< typename T > struct negate_tag +{ + typedef typename T::tag type; +}; + +template< + typename N = na + > +struct negate + + : negate_impl< + typename negate_tag::type + >::template apply::type + + + + + + +{ + +}; + +template<> struct negate< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : negate< T1 > { }; }; template< typename Tag > struct lambda< negate< na > , Tag , int_<-1> > { typedef false_ is_le; typedef negate< na > result_; typedef negate< na > type; }; namespace aux { template< typename T1 > struct template_arity< negate< T1 > > : int_<1> { }; template<> struct template_arity< negate< na > > : int_<-1> { }; } +# 65 "../boost/mpl/negate.hpp" +template<> +struct negate_impl +{ + + + + + template< typename N > struct apply + : integral_c< typename N::value_type, (-N::value) > + + { + }; +}; + +}} +# 20 "../boost/mpl/advance.hpp" 2 + + + +# 1 "../boost/mpl/apply_wrap.hpp" 1 +# 24 "../boost/mpl/advance.hpp" 2 +# 1 "../boost/mpl/aux_/advance_forward.hpp" 1 +# 23 "../boost/mpl/aux_/advance_forward.hpp" +# 1 "../boost/mpl/apply_wrap.hpp" 1 +# 24 "../boost/mpl/aux_/advance_forward.hpp" 2 +# 32 "../boost/mpl/aux_/advance_forward.hpp" +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp" +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 33 "../boost/mpl/aux_/advance_forward.hpp" 2 +# 25 "../boost/mpl/advance.hpp" 2 +# 1 "../boost/mpl/aux_/advance_backward.hpp" 1 +# 23 "../boost/mpl/aux_/advance_backward.hpp" +# 1 "../boost/mpl/apply_wrap.hpp" 1 +# 24 "../boost/mpl/aux_/advance_backward.hpp" 2 +# 32 "../boost/mpl/aux_/advance_backward.hpp" +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp" +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 33 "../boost/mpl/aux_/advance_backward.hpp" 2 +# 26 "../boost/mpl/advance.hpp" 2 + + + + +namespace boost { namespace mpl { + + +template< typename Tag > +struct advance_impl +{ + template< typename Iterator, typename N > struct apply + { + typedef typename less< N,long_<0> >::type backward_; + typedef typename if_< backward_, negate, N >::type offset_; + + typedef typename if_< + backward_ + , aux::advance_backward< offset_::value > + , aux::advance_forward< offset_::value > + >::type f_; + + typedef typename apply_wrap1::type type; + }; +}; + + +template< + typename Iterator = na + , typename N = na + > +struct advance + : advance_impl< typename tag::type > + ::template apply +{ +}; + +template< + typename Iterator + , long N + > +struct advance_c + : advance_impl< typename tag::type > + ::template apply > +{ +}; + +template<> struct advance< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : advance< T1 , T2 > { }; }; template< typename Tag > struct lambda< advance< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef advance< na , na > result_; typedef advance< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< advance< T1 , T2 > > : int_<2> { }; template<> struct template_arity< advance< na , na > > : int_<-1> { }; } + +}} +# 19 "../boost/mpl/aux_/at_impl.hpp" 2 + + + +namespace boost { namespace mpl { + + + + +template< typename Tag > +struct at_impl +{ + template< typename Sequence, typename N > struct apply + { + typedef typename advance< + typename begin::type + , N + >::type iter_; + + typedef typename deref::type type; + }; +}; + + template<> struct at_impl {}; + +}} +# 19 "../boost/mpl/at.hpp" 2 + + + + + + +namespace boost { namespace mpl { + +template< + typename Sequence = na + , typename N = na + > +struct at + : at_impl< typename sequence_tag::type > + ::template apply< Sequence,N > +{ + +}; + +template< + typename Sequence + , long N + > +struct at_c + : at_impl< typename sequence_tag::type > + ::template apply< Sequence,mpl::long_ > +{ +}; + +template<> struct at< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : at< T1 , T2 > { }; }; template< typename Tag > struct lambda< at< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef at< na , na > result_; typedef at< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< at< T1 , T2 > > : int_<2> { }; template<> struct template_arity< at< na , na > > : int_<-1> { }; } + +}} +# 17 "../boost/math/policies/policy.hpp" 2 +# 1 "../boost/mpl/size.hpp" 1 +# 19 "../boost/mpl/size.hpp" +# 1 "../boost/mpl/aux_/size_impl.hpp" 1 +# 19 "../boost/mpl/aux_/size_impl.hpp" +# 1 "../boost/mpl/distance.hpp" 1 +# 18 "../boost/mpl/distance.hpp" +# 1 "../boost/mpl/iter_fold.hpp" 1 +# 21 "../boost/mpl/iter_fold.hpp" +# 1 "../boost/mpl/aux_/iter_fold_impl.hpp" 1 +# 19 "../boost/mpl/aux_/iter_fold_impl.hpp" +# 1 "../boost/mpl/apply.hpp" 1 +# 20 "../boost/mpl/aux_/iter_fold_impl.hpp" 2 +# 33 "../boost/mpl/aux_/iter_fold_impl.hpp" +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp" +namespace boost { namespace mpl { namespace aux { + + + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl +{ + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,First,Last,State,ForwardOp > + : iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 34 "../boost/mpl/aux_/iter_fold_impl.hpp" 2 +# 22 "../boost/mpl/iter_fold.hpp" 2 + + + +namespace boost { namespace mpl { + +template< + typename Sequence = na + , typename State = na + , typename ForwardOp = na + > +struct iter_fold +{ + typedef typename aux::iter_fold_impl< + ::boost::mpl::O1_size::value + , typename begin::type + , typename end::type + , State + , typename lambda::type + >::state type; + + +}; + +template<> struct iter_fold< na , na , na > { template< typename T1 , typename T2 , typename T3 , typename T4 =na , typename T5 =na > struct apply : iter_fold< T1 , T2 , T3 > { }; }; template< typename Tag > struct lambda< iter_fold< na , na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef iter_fold< na , na , na > result_; typedef iter_fold< na , na , na > type; }; namespace aux { template< typename T1 , typename T2 , typename T3 > struct template_arity< iter_fold< T1 , T2 , T3 > > : int_<3> { }; template<> struct template_arity< iter_fold< na , na , na > > : int_<-1> { }; } + +}} +# 19 "../boost/mpl/distance.hpp" 2 +# 1 "../boost/mpl/iterator_range.hpp" 1 +# 20 "../boost/mpl/iterator_range.hpp" +namespace boost { namespace mpl { + +struct iterator_range_tag; + +template< + typename First = na + , typename Last = na + > +struct iterator_range +{ + typedef iterator_range_tag tag; + typedef iterator_range type; + typedef First begin; + typedef Last end; + + +}; + +template<> struct iterator_range< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : iterator_range< T1 , T2 > { }; }; template< typename Tag > struct lambda< iterator_range< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef iterator_range< na , na > result_; typedef iterator_range< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< iterator_range< T1 , T2 > > : int_<2> { }; template<> struct template_arity< iterator_range< na , na > > : int_<-1> { }; } + +}} +# 20 "../boost/mpl/distance.hpp" 2 + + + +# 1 "../boost/mpl/apply_wrap.hpp" 1 +# 24 "../boost/mpl/distance.hpp" 2 + + + + + + + +namespace boost { namespace mpl { + + +template< typename Tag > struct distance_impl +{ + template< typename First, typename Last > struct apply + + : aux::msvc_eti_base< typename iter_fold< + iterator_range + , mpl::long_<0> + , next<> + >::type > + { +# 60 "../boost/mpl/distance.hpp" + }; +}; + +template< + typename First = na + , typename Last = na + > +struct distance + : distance_impl< typename tag::type > + ::template apply +{ + +}; + +template<> struct distance< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : distance< T1 , T2 > { }; }; template< typename Tag > struct lambda< distance< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef distance< na , na > result_; typedef distance< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< distance< T1 , T2 > > : int_<2> { }; template<> struct template_arity< distance< na , na > > : int_<-1> { }; } + +}} +# 20 "../boost/mpl/aux_/size_impl.hpp" 2 + + + +namespace boost { namespace mpl { + + + + +template< typename Tag > +struct size_impl +{ + template< typename Sequence > struct apply + + : distance< + typename begin::type + , typename end::type + > + { + + + + + + + + }; +}; + + template<> struct size_impl {}; + +}} +# 20 "../boost/mpl/size.hpp" 2 + + + + +namespace boost { namespace mpl { + +template< + typename Sequence = na + > +struct size + : aux::msvc_eti_base< + typename size_impl< typename sequence_tag::type > + ::template apply< Sequence >::type + >::type +{ + +}; + +template<> struct size< na > { template< typename T1 , typename T2 =na , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : size< T1 > { }; }; template< typename Tag > struct lambda< size< na > , Tag , int_<-1> > { typedef false_ is_le; typedef size< na > result_; typedef size< na > type; }; namespace aux { template< typename T1 > struct template_arity< size< T1 > > : int_<1> { }; template<> struct template_arity< size< na > > : int_<-1> { }; } + +}} +# 18 "../boost/math/policies/policy.hpp" 2 +# 1 "../boost/mpl/comparison.hpp" 1 +# 18 "../boost/mpl/comparison.hpp" +# 1 "../boost/mpl/not_equal_to.hpp" 1 +# 19 "../boost/mpl/not_equal_to.hpp" +# 1 "../boost/mpl/aux_/comparison_op.hpp" 1 +# 27 "../boost/mpl/aux_/comparison_op.hpp" +# 1 "../boost/mpl/aux_/numeric_op.hpp" 1 +# 22 "../boost/mpl/aux_/numeric_op.hpp" +# 1 "../boost/mpl/apply_wrap.hpp" 1 +# 23 "../boost/mpl/aux_/numeric_op.hpp" 2 +# 28 "../boost/mpl/aux_/comparison_op.hpp" 2 + + + + + + + +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp" +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct not_equal_to_impl + : if_c< + ( Tag1::value + > Tag2::value + ) + + , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + + +template<> struct not_equal_to_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct not_equal_to_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct not_equal_to_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename T > struct not_equal_to_tag +{ + typedef typename T::tag type; +}; + +template< + typename N1 = na + , typename N2 = na + > +struct not_equal_to + + : not_equal_to_impl< + typename not_equal_to_tag::type + , typename not_equal_to_tag::type + >::template apply< N1,N2 >::type +{ + + +}; + +template<> struct not_equal_to< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : not_equal_to< T1 , T2 > { }; }; template< typename Tag > struct lambda< not_equal_to< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef not_equal_to< na , na > result_; typedef not_equal_to< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< not_equal_to< T1 , T2 > > : int_<2> { }; template<> struct template_arity< not_equal_to< na , na > > : int_<-1> { }; } + +}} + +namespace boost { namespace mpl { + +template<> +struct not_equal_to_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( N1::value != N2::value ) > + { + }; +}; + +}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 36 "../boost/mpl/aux_/comparison_op.hpp" 2 +# 20 "../boost/mpl/not_equal_to.hpp" 2 +# 19 "../boost/mpl/comparison.hpp" 2 + +# 1 "../boost/mpl/greater.hpp" 1 +# 19 "../boost/mpl/greater.hpp" +# 1 "../boost/mpl/aux_/comparison_op.hpp" 1 +# 27 "../boost/mpl/aux_/comparison_op.hpp" +# 1 "../boost/mpl/aux_/numeric_op.hpp" 1 +# 22 "../boost/mpl/aux_/numeric_op.hpp" +# 1 "../boost/mpl/apply_wrap.hpp" 1 +# 23 "../boost/mpl/aux_/numeric_op.hpp" 2 +# 28 "../boost/mpl/aux_/comparison_op.hpp" 2 + + + + + + + +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/greater.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/greater.hpp" +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_impl + : if_c< + ( Tag1::value + > Tag2::value + ) + + , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + + +template<> struct greater_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct greater_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct greater_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename T > struct greater_tag +{ + typedef typename T::tag type; +}; + +template< + typename N1 = na + , typename N2 = na + > +struct greater + + : greater_impl< + typename greater_tag::type + , typename greater_tag::type + >::template apply< N1,N2 >::type +{ + + +}; + +template<> struct greater< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : greater< T1 , T2 > { }; }; template< typename Tag > struct lambda< greater< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef greater< na , na > result_; typedef greater< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< greater< T1 , T2 > > : int_<2> { }; template<> struct template_arity< greater< na , na > > : int_<-1> { }; } + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( N1::value > N2::value ) > + { + }; +}; + +}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 36 "../boost/mpl/aux_/comparison_op.hpp" 2 +# 20 "../boost/mpl/greater.hpp" 2 +# 21 "../boost/mpl/comparison.hpp" 2 +# 1 "../boost/mpl/less_equal.hpp" 1 +# 19 "../boost/mpl/less_equal.hpp" +# 1 "../boost/mpl/aux_/comparison_op.hpp" 1 +# 27 "../boost/mpl/aux_/comparison_op.hpp" +# 1 "../boost/mpl/aux_/numeric_op.hpp" 1 +# 22 "../boost/mpl/aux_/numeric_op.hpp" +# 1 "../boost/mpl/apply_wrap.hpp" 1 +# 23 "../boost/mpl/aux_/numeric_op.hpp" 2 +# 28 "../boost/mpl/aux_/comparison_op.hpp" 2 + + + + + + + +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/less_equal.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/less_equal.hpp" +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct less_equal_impl + : if_c< + ( Tag1::value + > Tag2::value + ) + + , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + + +template<> struct less_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct less_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct less_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename T > struct less_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename N1 = na + , typename N2 = na + > +struct less_equal + + : less_equal_impl< + typename less_equal_tag::type + , typename less_equal_tag::type + >::template apply< N1,N2 >::type +{ + + +}; + +template<> struct less_equal< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : less_equal< T1 , T2 > { }; }; template< typename Tag > struct lambda< less_equal< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef less_equal< na , na > result_; typedef less_equal< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< less_equal< T1 , T2 > > : int_<2> { }; template<> struct template_arity< less_equal< na , na > > : int_<-1> { }; } + +}} + +namespace boost { namespace mpl { + +template<> +struct less_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( N1::value <= N2::value ) > + { + }; +}; + +}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 36 "../boost/mpl/aux_/comparison_op.hpp" 2 +# 20 "../boost/mpl/less_equal.hpp" 2 +# 22 "../boost/mpl/comparison.hpp" 2 +# 1 "../boost/mpl/greater_equal.hpp" 1 +# 19 "../boost/mpl/greater_equal.hpp" +# 1 "../boost/mpl/aux_/comparison_op.hpp" 1 +# 27 "../boost/mpl/aux_/comparison_op.hpp" +# 1 "../boost/mpl/aux_/numeric_op.hpp" 1 +# 22 "../boost/mpl/aux_/numeric_op.hpp" +# 1 "../boost/mpl/apply_wrap.hpp" 1 +# 23 "../boost/mpl/aux_/numeric_op.hpp" 2 +# 28 "../boost/mpl/aux_/comparison_op.hpp" 2 + + + + + + + +# 1 "../boost/mpl/aux_/include_preprocessed.hpp" 1 +# 37 "../boost/mpl/aux_/include_preprocessed.hpp" +# 1 "../boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp" 1 +# 12 "../boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp" +namespace boost { namespace mpl { + +template< + typename Tag1 + , typename Tag2 + > +struct greater_equal_impl + : if_c< + ( Tag1::value + > Tag2::value + ) + + , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > + , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > + >::type +{ +}; + + +template<> struct greater_equal_impl< na,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct greater_equal_impl< na,Tag > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename Tag > struct greater_equal_impl< Tag,na > +{ + template< typename U1, typename U2 > struct apply + { + typedef apply type; + static const int value = 0; + }; +}; + +template< typename T > struct greater_equal_tag +{ + typedef typename T::tag type; +}; + +template< + typename N1 = na + , typename N2 = na + > +struct greater_equal + + : greater_equal_impl< + typename greater_equal_tag::type + , typename greater_equal_tag::type + >::template apply< N1,N2 >::type +{ + + +}; + +template<> struct greater_equal< na , na > { template< typename T1 , typename T2 , typename T3 =na , typename T4 =na , typename T5 =na > struct apply : greater_equal< T1 , T2 > { }; }; template< typename Tag > struct lambda< greater_equal< na , na > , Tag , int_<-1> > { typedef false_ is_le; typedef greater_equal< na , na > result_; typedef greater_equal< na , na > type; }; namespace aux { template< typename T1 , typename T2 > struct template_arity< greater_equal< T1 , T2 > > : int_<2> { }; template<> struct template_arity< greater_equal< na , na > > : int_<-1> { }; } + +}} + +namespace boost { namespace mpl { + +template<> +struct greater_equal_impl< integral_c_tag,integral_c_tag > +{ + template< typename N1, typename N2 > struct apply + + : bool_< ( N1::value >= N2::value ) > + { + }; +}; + +}} +# 38 "../boost/mpl/aux_/include_preprocessed.hpp" 2 +# 36 "../boost/mpl/aux_/comparison_op.hpp" 2 +# 20 "../boost/mpl/greater_equal.hpp" 2 +# 23 "../boost/mpl/comparison.hpp" 2 +# 19 "../boost/math/policies/policy.hpp" 2 + + +# 1 "../boost/assert.hpp" 1 +# 50 "../boost/assert.hpp" +# 1 "/usr/include/assert.h" 1 3 4 +# 51 "../boost/assert.hpp" 2 +# 22 "../boost/math/policies/policy.hpp" 2 + + + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include-fixed/limits.h" 1 3 4 +# 27 "../boost/math/policies/policy.hpp" 2 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 29 "../boost/math/policies/policy.hpp" 2 + + +namespace boost{ namespace math{ + +namespace tools{ + +template +int digits(); +template +T epsilon(); + +} + +namespace policies{ +# 176 "../boost/math/policies/policy.hpp" +enum error_policy_type +{ + throw_on_error = 0, + errno_on_error = 1, + ignore_error = 2, + user_error = 3 +}; + +template struct domain_error : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const domain_error*); char test_is_default_arg(const domain_error*); template struct is_domain_error_imp { template static char test(const domain_error*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_domain_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_domain_error_imp::value>{}; +template struct pole_error : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const pole_error*); char test_is_default_arg(const pole_error*); template struct is_pole_error_imp { template static char test(const pole_error*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_pole_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_pole_error_imp::value>{}; +template struct overflow_error : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const overflow_error*); char test_is_default_arg(const overflow_error*); template struct is_overflow_error_imp { template static char test(const overflow_error*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_overflow_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_overflow_error_imp::value>{}; +template struct underflow_error : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const underflow_error*); char test_is_default_arg(const underflow_error*); template struct is_underflow_error_imp { template static char test(const underflow_error*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_underflow_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_underflow_error_imp::value>{}; +template struct denorm_error : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const denorm_error*); char test_is_default_arg(const denorm_error*); template struct is_denorm_error_imp { template static char test(const denorm_error*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_denorm_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_denorm_error_imp::value>{}; +template struct evaluation_error : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const evaluation_error*); char test_is_default_arg(const evaluation_error*); template struct is_evaluation_error_imp { template static char test(const evaluation_error*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_evaluation_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_evaluation_error_imp::value>{}; +template struct rounding_error : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const rounding_error*); char test_is_default_arg(const rounding_error*); template struct is_rounding_error_imp { template static char test(const rounding_error*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_rounding_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_rounding_error_imp::value>{}; +template struct indeterminate_result_error : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const indeterminate_result_error*); char test_is_default_arg(const indeterminate_result_error*); template struct is_indeterminate_result_error_imp { template static char test(const indeterminate_result_error*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_indeterminate_result_error : public boost::mpl::bool_< ::boost::math::policies::detail::is_indeterminate_result_error_imp::value>{}; + + + + +template struct promote_float : public boost::mpl::bool_{}; namespace detail{ template char test_is_valid_arg(const promote_float*); char test_is_default_arg(const promote_float*); template struct is_promote_float_imp { template static char test(const promote_float*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_promote_float : public boost::mpl::bool_< ::boost::math::policies::detail::is_promote_float_imp::value>{}; +template struct promote_double : public boost::mpl::bool_{}; namespace detail{ template char test_is_valid_arg(const promote_double*); char test_is_default_arg(const promote_double*); template struct is_promote_double_imp { template static char test(const promote_double*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_promote_double : public boost::mpl::bool_< ::boost::math::policies::detail::is_promote_double_imp::value>{}; +template struct assert_undefined : public boost::mpl::bool_{}; namespace detail{ template char test_is_valid_arg(const assert_undefined*); char test_is_default_arg(const assert_undefined*); template struct is_assert_undefined_imp { template static char test(const assert_undefined*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_assert_undefined : public boost::mpl::bool_< ::boost::math::policies::detail::is_assert_undefined_imp::value>{}; + + + +enum discrete_quantile_policy_type +{ + real, + integer_round_outwards, + integer_round_inwards, + integer_round_down, + integer_round_up, + integer_round_nearest +}; + +template struct discrete_quantile : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const discrete_quantile*); char test_is_default_arg(const discrete_quantile*); template struct is_discrete_quantile_imp { template static char test(const discrete_quantile*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_discrete_quantile : public boost::mpl::bool_< ::boost::math::policies::detail::is_discrete_quantile_imp::value>{}; + + + +template struct digits10 : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const digits10*); char test_is_default_arg(const digits10<0>*); template struct is_digits10_imp { template static char test(const digits10*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_digits10 : public boost::mpl::bool_< ::boost::math::policies::detail::is_digits10_imp::value>{}; +template struct digits2 : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const digits2*); char test_is_default_arg(const digits2<0>*); template struct is_digits2_imp { template static char test(const digits2*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_digits2 : public boost::mpl::bool_< ::boost::math::policies::detail::is_digits2_imp::value>{}; + + + +template struct max_series_iterations : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const max_series_iterations*); char test_is_default_arg(const max_series_iterations<1000000>*); template struct is_max_series_iterations_imp { template static char test(const max_series_iterations*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_max_series_iterations : public boost::mpl::bool_< ::boost::math::policies::detail::is_max_series_iterations_imp::value>{}; +template struct max_root_iterations : public boost::mpl::int_{}; namespace detail{ template char test_is_valid_arg(const max_root_iterations*); char test_is_default_arg(const max_root_iterations<200>*); template struct is_max_root_iterations_imp { template static char test(const max_root_iterations*); static double test(...); static const bool value = sizeof(test(static_cast(0))) == 1; }; } template struct is_max_root_iterations : public boost::mpl::bool_< ::boost::math::policies::detail::is_max_root_iterations_imp::value>{}; + + + + + + + +struct default_policy{}; + +namespace detail{ + + + +template +struct precision +{ + + + + typedef typename mpl::if_c< + (Digits10::value == 0), + digits2<0>, + digits2<((Digits10::value + 1) * 1000L) / 301L> + >::type digits2_type; +public: + + + + + + typedef typename mpl::if_c< + (Digits2::value > digits2_type::value), + Digits2, digits2_type>::type type; + +}; + +template +struct select_result +{ + typedef A type; +}; +template +struct select_result +{ + typedef typename mpl::deref::type type; +}; + +template +struct find_arg +{ +private: + typedef typename mpl::find_if::type iter; + typedef typename mpl::end::type end_type; +public: + typedef typename select_result< + DefaultType, iter, + ::boost::is_same::value>::type type; +}; + +double test_is_valid_arg(...); +double test_is_default_arg(...); +char test_is_valid_arg(const default_policy*); +char test_is_default_arg(const default_policy*); + +template +struct is_valid_policy_imp +{ + static const bool value = sizeof(::boost::math::policies::detail::test_is_valid_arg(static_cast(0))) == 1; +}; + +template +struct is_default_policy_imp +{ + static const bool value = sizeof(::boost::math::policies::detail::test_is_default_arg(static_cast(0))) == 1; +}; + +template struct is_valid_policy +: public mpl::bool_< + ::boost::math::policies::detail::is_valid_policy_imp::value> +{}; + +template struct is_default_policy +: public mpl::bool_< + ::boost::math::policies::detail::is_default_policy_imp::value> +{ + template + struct apply + { + typedef is_default_policy type; + }; +}; + +template +struct append_N +{ + typedef typename mpl::push_back::type new_seq; + typedef typename append_N::type type; +}; + +template +struct append_N +{ + typedef Seq type; +}; + + + + + +template +struct default_args +{ + typedef promote_float arg1; + typedef promote_double arg2; +}; + +template <> +struct default_args +{ + typedef default_policy arg1; + typedef default_policy arg2; +}; + +template <> +struct default_args +{ + typedef promote_float arg1; + typedef default_policy arg2; +}; + +template <> +struct default_args +{ + typedef promote_double arg1; + typedef default_policy arg2; +}; + +typedef default_args::arg1 forwarding_arg1; +typedef default_args::arg2 forwarding_arg2; + +} + + + + +template +struct policy +{ +private: + + + + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy::value) == 0 ? false : true) >)> boost_static_assert_typedef_387; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy::value) == 0 ? false : true) >)> boost_static_assert_typedef_388; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy::value) == 0 ? false : true) >)> boost_static_assert_typedef_389; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy::value) == 0 ? false : true) >)> boost_static_assert_typedef_390; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy::value) == 0 ? false : true) >)> boost_static_assert_typedef_391; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy::value) == 0 ? false : true) >)> boost_static_assert_typedef_392; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy::value) == 0 ? false : true) >)> boost_static_assert_typedef_393; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy::value) == 0 ? false : true) >)> boost_static_assert_typedef_394; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy::value) == 0 ? false : true) >)> boost_static_assert_typedef_395; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy::value) == 0 ? false : true) >)> boost_static_assert_typedef_396; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy::value) == 0 ? false : true) >)> boost_static_assert_typedef_397; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy::value) == 0 ? false : true) >)> boost_static_assert_typedef_398; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::boost::math::policies::detail::is_valid_policy::value) == 0 ? false : true) >)> boost_static_assert_typedef_399; + + + + typedef mpl::list arg_list; + +public: + typedef typename detail::find_arg, domain_error<> >::type domain_error_type; + typedef typename detail::find_arg, pole_error<> >::type pole_error_type; + typedef typename detail::find_arg, overflow_error<> >::type overflow_error_type; + typedef typename detail::find_arg, underflow_error<> >::type underflow_error_type; + typedef typename detail::find_arg, denorm_error<> >::type denorm_error_type; + typedef typename detail::find_arg, evaluation_error<> >::type evaluation_error_type; + typedef typename detail::find_arg, rounding_error<> >::type rounding_error_type; + typedef typename detail::find_arg, indeterminate_result_error<> >::type indeterminate_result_error_type; +private: + + + + typedef typename detail::find_arg, digits10<> >::type digits10_type; + typedef typename detail::find_arg, digits2<> >::type bits_precision_type; +public: + typedef typename detail::precision::type precision_type; + + + + typedef typename detail::find_arg, promote_float<> >::type promote_float_type; + typedef typename detail::find_arg, promote_double<> >::type promote_double_type; + + + + typedef typename detail::find_arg, discrete_quantile<> >::type discrete_quantile_type; + + + + typedef typename detail::find_arg, discrete_quantile<> >::type assert_undefined_type; + + + + typedef typename detail::find_arg, max_series_iterations<> >::type max_series_iterations_type; + typedef typename detail::find_arg, max_root_iterations<> >::type max_root_iterations_type; +}; + + + + + +template <> +struct policy +{ +public: + typedef domain_error<> domain_error_type; + typedef pole_error<> pole_error_type; + typedef overflow_error<> overflow_error_type; + typedef underflow_error<> underflow_error_type; + typedef denorm_error<> denorm_error_type; + typedef evaluation_error<> evaluation_error_type; + typedef rounding_error<> rounding_error_type; + typedef indeterminate_result_error<> indeterminate_result_error_type; + + typedef digits2<> precision_type; + + + + typedef promote_float<> promote_float_type; + typedef promote_double<> promote_double_type; + typedef discrete_quantile<> discrete_quantile_type; + typedef assert_undefined<> assert_undefined_type; + typedef max_series_iterations<> max_series_iterations_type; + typedef max_root_iterations<> max_root_iterations_type; +}; + +template <> +struct policy +{ +public: + typedef domain_error<> domain_error_type; + typedef pole_error<> pole_error_type; + typedef overflow_error<> overflow_error_type; + typedef underflow_error<> underflow_error_type; + typedef denorm_error<> denorm_error_type; + typedef evaluation_error<> evaluation_error_type; + typedef rounding_error<> rounding_error_type; + typedef indeterminate_result_error<> indeterminate_result_error_type; + + typedef digits2<> precision_type; + + + + typedef promote_float promote_float_type; + typedef promote_double promote_double_type; + typedef discrete_quantile<> discrete_quantile_type; + typedef assert_undefined<> assert_undefined_type; + typedef max_series_iterations<> max_series_iterations_type; + typedef max_root_iterations<> max_root_iterations_type; +}; + +template +struct normalise +{ +private: + typedef mpl::list arg_list; + typedef typename detail::find_arg, typename Policy::domain_error_type >::type domain_error_type; + typedef typename detail::find_arg, typename Policy::pole_error_type >::type pole_error_type; + typedef typename detail::find_arg, typename Policy::overflow_error_type >::type overflow_error_type; + typedef typename detail::find_arg, typename Policy::underflow_error_type >::type underflow_error_type; + typedef typename detail::find_arg, typename Policy::denorm_error_type >::type denorm_error_type; + typedef typename detail::find_arg, typename Policy::evaluation_error_type >::type evaluation_error_type; + typedef typename detail::find_arg, typename Policy::rounding_error_type >::type rounding_error_type; + typedef typename detail::find_arg, typename Policy::indeterminate_result_error_type >::type indeterminate_result_error_type; + + + + typedef typename detail::find_arg, digits10<> >::type digits10_type; + typedef typename detail::find_arg, typename Policy::precision_type >::type bits_precision_type; + typedef typename detail::precision::type precision_type; + + + + typedef typename detail::find_arg, typename Policy::promote_float_type >::type promote_float_type; + typedef typename detail::find_arg, typename Policy::promote_double_type >::type promote_double_type; + + + + typedef typename detail::find_arg, typename Policy::discrete_quantile_type >::type discrete_quantile_type; + + + + typedef typename detail::find_arg, discrete_quantile<> >::type assert_undefined_type; + + + + typedef typename detail::find_arg, max_series_iterations<> >::type max_series_iterations_type; + typedef typename detail::find_arg, max_root_iterations<> >::type max_root_iterations_type; + + + + typedef mpl::vector< + domain_error_type, + pole_error_type, + overflow_error_type, + underflow_error_type, + denorm_error_type, + evaluation_error_type, + rounding_error_type, + indeterminate_result_error_type, + precision_type, + promote_float_type, + promote_double_type, + discrete_quantile_type, + assert_undefined_type, + max_series_iterations_type, + max_root_iterations_type> result_list; + + + + typedef typename mpl::remove_if >::type reduced_list; + + + + typedef typename detail::append_N::value)>::type result_type; +public: + typedef policy< + typename mpl::at >::type, + typename mpl::at >::type, + typename mpl::at >::type, + typename mpl::at >::type, + typename mpl::at >::type, + typename mpl::at >::type, + typename mpl::at >::type, + typename mpl::at >::type, + typename mpl::at >::type, + typename mpl::at >::type, + typename mpl::at >::type, + typename mpl::at >::type, + typename mpl::at >::type > type; +}; + + + +template <> +struct normalise, + promote_float, + promote_double, + discrete_quantile<>, + assert_undefined<>, + default_policy, + default_policy, + default_policy, + default_policy, + default_policy, + default_policy, + default_policy> +{ + typedef policy type; +}; + +template <> +struct normalise, + promote_float, + promote_double, + discrete_quantile<>, + assert_undefined<>, + default_policy, + default_policy, + default_policy, + default_policy, + default_policy, + default_policy, + default_policy> +{ + typedef policy type; +}; + +inline policy<> make_policy() +{ return policy<>(); } + +template +inline typename normalise, A1>::type make_policy(const A1&) +{ + typedef typename normalise, A1>::type result_type; + return result_type(); +} + +template +inline typename normalise, A1, A2>::type make_policy(const A1&, const A2&) +{ + typedef typename normalise, A1, A2>::type result_type; + return result_type(); +} + +template +inline typename normalise, A1, A2, A3>::type make_policy(const A1&, const A2&, const A3&) +{ + typedef typename normalise, A1, A2, A3>::type result_type; + return result_type(); +} + +template +inline typename normalise, A1, A2, A3, A4>::type make_policy(const A1&, const A2&, const A3&, const A4&) +{ + typedef typename normalise, A1, A2, A3, A4>::type result_type; + return result_type(); +} + +template +inline typename normalise, A1, A2, A3, A4, A5>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&) +{ + typedef typename normalise, A1, A2, A3, A4, A5>::type result_type; + return result_type(); +} + +template +inline typename normalise, A1, A2, A3, A4, A5, A6>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&) +{ + typedef typename normalise, A1, A2, A3, A4, A5, A6>::type result_type; + return result_type(); +} + +template +inline typename normalise, A1, A2, A3, A4, A5, A6, A7>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&) +{ + typedef typename normalise, A1, A2, A3, A4, A5, A6, A7>::type result_type; + return result_type(); +} + +template +inline typename normalise, A1, A2, A3, A4, A5, A6, A7, A8>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&) +{ + typedef typename normalise, A1, A2, A3, A4, A5, A6, A7, A8>::type result_type; + return result_type(); +} + +template +inline typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&) +{ + typedef typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9>::type result_type; + return result_type(); +} + +template +inline typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&, const A10&) +{ + typedef typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>::type result_type; + return result_type(); +} + +template +inline typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&, const A10&, const A11&) +{ + typedef typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>::type result_type; + return result_type(); +} + + + + +template +struct evaluation +{ + typedef Real type; +}; + +template +struct evaluation +{ + typedef typename mpl::if_::type type; +}; + +template +struct evaluation +{ + typedef typename mpl::if_::type type; +}; +# 776 "../boost/math/policies/policy.hpp" +template +struct precision +{ + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< (((::std::numeric_limits::radix == 2) || ((::std::numeric_limits::is_specialized == 0) || (::std::numeric_limits::digits == 0))) == 0 ? false : true) >)> boost_static_assert_typedef_779; + + typedef typename Policy::precision_type precision_type; + typedef typename mpl::if_c< + ((::std::numeric_limits::is_specialized == 0) || (::std::numeric_limits::digits == 0)), + + precision_type, + typename mpl::if_c< + ((::std::numeric_limits::digits <= precision_type::value) + || (Policy::precision_type::value <= 0)), + + digits2< ::std::numeric_limits::digits>, + + precision_type + >::type + >::type type; +# 812 "../boost/math/policies/policy.hpp" +}; + + + +namespace detail{ + +template +inline int digits_imp(mpl::true_ const&) +{ + + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::std::numeric_limits::is_specialized) == 0 ? false : true) >)> boost_static_assert_typedef_822; + + + + typedef typename boost::math::policies::precision::type p_t; + return p_t::value; +} + +template +inline int digits_imp(mpl::false_ const&) +{ + return tools::digits(); +} + +} + +template +inline int digits() +{ + typedef mpl::bool_< std::numeric_limits::is_specialized > tag_type; + return detail::digits_imp(tag_type()); +} + +template +inline unsigned long get_max_series_iterations() +{ + typedef typename Policy::max_series_iterations_type iter_type; + return iter_type::value; +} + +template +inline unsigned long get_max_root_iterations() +{ + typedef typename Policy::max_root_iterations_type iter_type; + return iter_type::value; +} + +namespace detail{ + +template +struct series_factor_calc +{ + static T get() + { + return ldexp(T(1.0), 1 - Digits::value); + } +}; + +template +struct series_factor_calc +{ + static T get() + { + return boost::math::tools::epsilon(); + } +}; +template +struct series_factor_calc +{ + static T get() + { + static const boost::uintmax_t v = static_cast(1u) << (Digits::value - 1); + return 1 / static_cast(v); + } +}; +template +struct series_factor_calc +{ + static T get() + { + return boost::math::tools::epsilon(); + } +}; + +template +inline T get_epsilon_imp(mpl::true_ const&) +{ + + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::std::numeric_limits::is_specialized) == 0 ? false : true) >)> boost_static_assert_typedef_900; + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((::std::numeric_limits::radix == 2) == 0 ? false : true) >)> boost_static_assert_typedef_901; + + + + + typedef typename boost::math::policies::precision::type p_t; + typedef mpl::bool_::digits> is_small_int; + typedef mpl::bool_= std::numeric_limits::digits> is_default_value; + return series_factor_calc::get(); +} + +template +inline T get_epsilon_imp(mpl::false_ const&) +{ + return tools::epsilon(); +} + +} + +template +inline T get_epsilon() +{ + typedef mpl::bool_< (std::numeric_limits::is_specialized && (std::numeric_limits::radix == 2)) > tag_type; + return detail::get_epsilon_imp(tag_type()); +} + +namespace detail{ + +template +char test_is_policy(const policy*); +double test_is_policy(...); + +template +struct is_policy_imp +{ + static const bool value = (sizeof(::boost::math::policies::detail::test_is_policy(static_cast(0))) == 1); +}; + +} + +template +struct is_policy : public mpl::bool_< ::boost::math::policies::detail::is_policy_imp

::value> {}; + + + + +template +struct constructor_error_check +{ + typedef typename Policy::domain_error_type domain_error_type; + typedef typename mpl::if_c< + (domain_error_type::value == throw_on_error) || (domain_error_type::value == user_error), + mpl::true_, + mpl::false_>::type type; +}; + +template +struct method_error_check +{ + typedef typename Policy::domain_error_type domain_error_type; + typedef typename mpl::if_c< + (domain_error_type::value == throw_on_error) && (domain_error_type::value != user_error), + mpl::false_, + mpl::true_>::type type; +}; + +}}} +# 29 "../boost/math/special_functions/math_fwd.hpp" 2 + +# 1 "../boost/config/no_tr1/complex.hpp" 1 +# 31 "../boost/math/special_functions/math_fwd.hpp" 2 + + + +namespace boost +{ + namespace math + { + + + template + typename tools::promote_args::type + beta(RT1 a, RT2 b); + + template + typename tools::promote_args::type + beta(RT1 a, RT2 b, A x); + + template + typename tools::promote_args::type + beta(RT1 a, RT2 b, RT3 x, const Policy& pol); + + template + typename tools::promote_args::type + betac(RT1 a, RT2 b, RT3 x); + + template + typename tools::promote_args::type + betac(RT1 a, RT2 b, RT3 x, const Policy& pol); + + template + typename tools::promote_args::type + ibeta(RT1 a, RT2 b, RT3 x); + + template + typename tools::promote_args::type + ibeta(RT1 a, RT2 b, RT3 x, const Policy& pol); + + template + typename tools::promote_args::type + ibetac(RT1 a, RT2 b, RT3 x); + + template + typename tools::promote_args::type + ibetac(RT1 a, RT2 b, RT3 x, const Policy& pol); + + template + typename tools::promote_args::type + ibeta_inv(T1 a, T2 b, T3 p, T4* py); + + template + typename tools::promote_args::type + ibeta_inv(T1 a, T2 b, T3 p, T4* py, const Policy& pol); + + template + typename tools::promote_args::type + ibeta_inv(RT1 a, RT2 b, RT3 p); + + template + typename tools::promote_args::type + ibeta_inv(RT1 a, RT2 b, RT3 p, const Policy&); + + template + typename tools::promote_args::type + ibeta_inva(RT1 a, RT2 b, RT3 p); + + template + typename tools::promote_args::type + ibeta_inva(RT1 a, RT2 b, RT3 p, const Policy&); + + template + typename tools::promote_args::type + ibeta_invb(RT1 a, RT2 b, RT3 p); + + template + typename tools::promote_args::type + ibeta_invb(RT1 a, RT2 b, RT3 p, const Policy&); + + template + typename tools::promote_args::type + ibetac_inv(T1 a, T2 b, T3 q, T4* py); + + template + typename tools::promote_args::type + ibetac_inv(T1 a, T2 b, T3 q, T4* py, const Policy& pol); + + template + typename tools::promote_args::type + ibetac_inv(RT1 a, RT2 b, RT3 q); + + template + typename tools::promote_args::type + ibetac_inv(RT1 a, RT2 b, RT3 q, const Policy&); + + template + typename tools::promote_args::type + ibetac_inva(RT1 a, RT2 b, RT3 q); + + template + typename tools::promote_args::type + ibetac_inva(RT1 a, RT2 b, RT3 q, const Policy&); + + template + typename tools::promote_args::type + ibetac_invb(RT1 a, RT2 b, RT3 q); + + template + typename tools::promote_args::type + ibetac_invb(RT1 a, RT2 b, RT3 q, const Policy&); + + template + typename tools::promote_args::type + ibeta_derivative(RT1 a, RT2 b, RT3 x); + + template + typename tools::promote_args::type + ibeta_derivative(RT1 a, RT2 b, RT3 x, const Policy& pol); + + + template + typename tools::promote_args::type erf(RT z); + template + typename tools::promote_args::type erf(RT z, const Policy&); + + template + typename tools::promote_args::type erfc(RT z); + template + typename tools::promote_args::type erfc(RT z, const Policy&); + + template + typename tools::promote_args::type erf_inv(RT z); + template + typename tools::promote_args::type erf_inv(RT z, const Policy& pol); + + template + typename tools::promote_args::type erfc_inv(RT z); + template + typename tools::promote_args::type erfc_inv(RT z, const Policy& pol); + + + template + typename tools::promote_args::type + legendre_next(unsigned l, T1 x, T2 Pl, T3 Plm1); + + template + typename tools::promote_args::type + legendre_p(int l, T x); + + template + typename tools::promote_args::type + legendre_p(int l, T x, const Policy& pol); + + template + typename tools::promote_args::type + legendre_q(unsigned l, T x); + + template + typename tools::promote_args::type + legendre_q(unsigned l, T x, const Policy& pol); + + template + typename tools::promote_args::type + legendre_next(unsigned l, unsigned m, T1 x, T2 Pl, T3 Plm1); + + template + typename tools::promote_args::type + legendre_p(int l, int m, T x); + + template + typename tools::promote_args::type + legendre_p(int l, int m, T x, const Policy& pol); + + template + typename tools::promote_args::type + laguerre_next(unsigned n, T1 x, T2 Ln, T3 Lnm1); + + template + typename tools::promote_args::type + laguerre_next(unsigned n, unsigned l, T1 x, T2 Pl, T3 Plm1); + + template + typename tools::promote_args::type + laguerre(unsigned n, T x); + + template + typename tools::promote_args::type + laguerre(unsigned n, unsigned m, T x, const Policy& pol); + + template + struct laguerre_result + { + typedef typename mpl::if_< + policies::is_policy, + typename tools::promote_args::type, + typename tools::promote_args::type + >::type type; + }; + + template + typename laguerre_result::type + laguerre(unsigned n, T1 m, T2 x); + + template + typename tools::promote_args::type + hermite(unsigned n, T x); + + template + typename tools::promote_args::type + hermite(unsigned n, T x, const Policy& pol); + + template + typename tools::promote_args::type + hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1); + + template + std::complex::type> + spherical_harmonic(unsigned n, int m, T1 theta, T2 phi); + + template + std::complex::type> + spherical_harmonic(unsigned n, int m, T1 theta, T2 phi, const Policy& pol); + + template + typename tools::promote_args::type + spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi); + + template + typename tools::promote_args::type + spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi, const Policy& pol); + + template + typename tools::promote_args::type + spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi); + + template + typename tools::promote_args::type + spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol); + + + template + typename tools::promote_args::type + ellint_rf(T1 x, T2 y, T3 z); + + template + typename tools::promote_args::type + ellint_rf(T1 x, T2 y, T3 z, const Policy& pol); + + template + typename tools::promote_args::type + ellint_rd(T1 x, T2 y, T3 z); + + template + typename tools::promote_args::type + ellint_rd(T1 x, T2 y, T3 z, const Policy& pol); + + template + typename tools::promote_args::type + ellint_rc(T1 x, T2 y); + + template + typename tools::promote_args::type + ellint_rc(T1 x, T2 y, const Policy& pol); + + template + typename tools::promote_args::type + ellint_rj(T1 x, T2 y, T3 z, T4 p); + + template + typename tools::promote_args::type + ellint_rj(T1 x, T2 y, T3 z, T4 p, const Policy& pol); + + template + typename tools::promote_args::type ellint_2(T k); + + template + typename tools::promote_args::type ellint_2(T1 k, T2 phi); + + template + typename tools::promote_args::type ellint_2(T1 k, T2 phi, const Policy& pol); + + template + typename tools::promote_args::type ellint_1(T k); + + template + typename tools::promote_args::type ellint_1(T1 k, T2 phi); + + template + typename tools::promote_args::type ellint_1(T1 k, T2 phi, const Policy& pol); + + namespace detail{ + + template + struct ellint_3_result + { + typedef typename mpl::if_< + policies::is_policy, + typename tools::promote_args::type, + typename tools::promote_args::type + >::type type; + }; + + } + + + template + typename detail::ellint_3_result::type ellint_3(T1 k, T2 v, T3 phi); + + template + typename tools::promote_args::type ellint_3(T1 k, T2 v, T3 phi, const Policy& pol); + + template + typename tools::promote_args::type ellint_3(T1 k, T2 v); + + + + template + struct max_factorial; + template + RT factorial(unsigned int); + template + RT factorial(unsigned int, const Policy& pol); + template + RT unchecked_factorial(unsigned int ); + template + RT double_factorial(unsigned i); + template + RT double_factorial(unsigned i, const Policy& pol); + + template + typename tools::promote_args::type falling_factorial(RT x, unsigned n); + + template + typename tools::promote_args::type falling_factorial(RT x, unsigned n, const Policy& pol); + + template + typename tools::promote_args::type rising_factorial(RT x, int n); + + template + typename tools::promote_args::type rising_factorial(RT x, int n, const Policy& pol); + + + template + typename tools::promote_args::type tgamma(RT z); + + template + typename tools::promote_args::type tgamma1pm1(RT z); + + template + typename tools::promote_args::type tgamma1pm1(RT z, const Policy& pol); + + template + typename tools::promote_args::type tgamma(RT1 a, RT2 z); + + template + typename tools::promote_args::type tgamma(RT1 a, RT2 z, const Policy& pol); + + template + typename tools::promote_args::type lgamma(RT z, int* sign); + + template + typename tools::promote_args::type lgamma(RT z, int* sign, const Policy& pol); + + template + typename tools::promote_args::type lgamma(RT x); + + template + typename tools::promote_args::type lgamma(RT x, const Policy& pol); + + template + typename tools::promote_args::type tgamma_lower(RT1 a, RT2 z); + + template + typename tools::promote_args::type tgamma_lower(RT1 a, RT2 z, const Policy&); + + template + typename tools::promote_args::type gamma_q(RT1 a, RT2 z); + + template + typename tools::promote_args::type gamma_q(RT1 a, RT2 z, const Policy&); + + template + typename tools::promote_args::type gamma_p(RT1 a, RT2 z); + + template + typename tools::promote_args::type gamma_p(RT1 a, RT2 z, const Policy&); + + template + typename tools::promote_args::type tgamma_delta_ratio(T1 z, T2 delta); + + template + typename tools::promote_args::type tgamma_delta_ratio(T1 z, T2 delta, const Policy&); + + template + typename tools::promote_args::type tgamma_ratio(T1 a, T2 b); + + template + typename tools::promote_args::type tgamma_ratio(T1 a, T2 b, const Policy&); + + template + typename tools::promote_args::type gamma_p_derivative(T1 a, T2 x); + + template + typename tools::promote_args::type gamma_p_derivative(T1 a, T2 x, const Policy&); + + + template + typename tools::promote_args::type gamma_p_inv(T1 a, T2 p); + + template + typename tools::promote_args::type gamma_p_inva(T1 a, T2 p, const Policy&); + + template + typename tools::promote_args::type gamma_p_inva(T1 a, T2 p); + + template + typename tools::promote_args::type gamma_p_inv(T1 a, T2 p, const Policy&); + + template + typename tools::promote_args::type gamma_q_inv(T1 a, T2 q); + + template + typename tools::promote_args::type gamma_q_inv(T1 a, T2 q, const Policy&); + + template + typename tools::promote_args::type gamma_q_inva(T1 a, T2 q); + + template + typename tools::promote_args::type gamma_q_inva(T1 a, T2 q, const Policy&); + + + template + typename tools::promote_args::type digamma(T x); + + template + typename tools::promote_args::type digamma(T x, const Policy&); + + + template + typename tools::promote_args::type + hypot(T1 x, T2 y); + + template + typename tools::promote_args::type + hypot(T1 x, T2 y, const Policy&); + + + template + typename tools::promote_args::type cbrt(RT z); + + template + typename tools::promote_args::type cbrt(RT z, const Policy&); + + + template + typename tools::promote_args::type log1p(T); + + template + typename tools::promote_args::type log1p(T, const Policy&); + + + template + typename tools::promote_args::type log1pmx(T); + + template + typename tools::promote_args::type log1pmx(T, const Policy&); + + + template + typename tools::promote_args::type expm1(T); + + template + typename tools::promote_args::type expm1(T, const Policy&); + + + template + typename tools::promote_args::type + powm1(const T1 a, const T2 z); + + template + typename tools::promote_args::type + powm1(const T1 a, const T2 z, const Policy&); + + + template + typename tools::promote_args::type sqrt1pm1(const T& val); + + template + typename tools::promote_args::type sqrt1pm1(const T& val, const Policy&); + + + template + typename tools::promote_args::type sinc_pi(T x); + + template + typename tools::promote_args::type sinc_pi(T x, const Policy&); + + template + typename tools::promote_args::type sinhc_pi(T x); + + template + typename tools::promote_args::type sinhc_pi(T x, const Policy&); + + + template + typename tools::promote_args::type asinh(T x); + + template + typename tools::promote_args::type asinh(T x, const Policy&); + + template + typename tools::promote_args::type acosh(T x); + + template + typename tools::promote_args::type acosh(T x, const Policy&); + + template + typename tools::promote_args::type atanh(T x); + + template + typename tools::promote_args::type atanh(T x, const Policy&); + + namespace detail{ + + typedef mpl::int_<0> bessel_no_int_tag; + typedef mpl::int_<1> bessel_maybe_int_tag; + typedef mpl::int_<2> bessel_int_tag; + + template + struct bessel_traits + { + typedef typename tools::promote_args< + T1, T2 + >::type result_type; + + typedef typename policies::precision::type precision_type; + + typedef typename mpl::if_< + mpl::or_< + mpl::less_equal >, + mpl::greater > >, + bessel_no_int_tag, + typename mpl::if_< + is_integral, + bessel_int_tag, + bessel_maybe_int_tag + >::type + >::type optimisation_tag; + }; + } + + + template + typename detail::bessel_traits::result_type cyl_bessel_j(T1 v, T2 x, const Policy& pol); + + template + typename detail::bessel_traits >::result_type cyl_bessel_j(T1 v, T2 x); + + template + typename detail::bessel_traits::result_type sph_bessel(unsigned v, T x, const Policy& pol); + + template + typename detail::bessel_traits >::result_type sph_bessel(unsigned v, T x); + + template + typename detail::bessel_traits::result_type cyl_bessel_i(T1 v, T2 x, const Policy& pol); + + template + typename detail::bessel_traits >::result_type cyl_bessel_i(T1 v, T2 x); + + template + typename detail::bessel_traits::result_type cyl_bessel_k(T1 v, T2 x, const Policy& pol); + + template + typename detail::bessel_traits >::result_type cyl_bessel_k(T1 v, T2 x); + + template + typename detail::bessel_traits::result_type cyl_neumann(T1 v, T2 x, const Policy& pol); + + template + typename detail::bessel_traits >::result_type cyl_neumann(T1 v, T2 x); + + template + typename detail::bessel_traits::result_type sph_neumann(unsigned v, T x, const Policy& pol); + + template + typename detail::bessel_traits >::result_type sph_neumann(unsigned v, T x); + + template + typename tools::promote_args::type sin_pi(T x, const Policy&); + + template + typename tools::promote_args::type sin_pi(T x); + + template + typename tools::promote_args::type cos_pi(T x, const Policy&); + + template + typename tools::promote_args::type cos_pi(T x); + + template + int fpclassify (T t); + + template + bool isfinite (T z); + + template + bool isinf (T t); + + template + bool isnan (T t); + + template + bool isnormal (T t); + + template + int signbit (T x); + + template + int sign (const T& z); + + template + T copysign (const T& x, const T& y); + + template + T changesign (const T& z); + + + namespace detail{ + + template + struct expint_result + { + typedef typename mpl::if_< + policies::is_policy, + typename tools::promote_args::type, + typename tools::promote_args::type + >::type type; + }; + + } + + template + typename tools::promote_args::type expint(unsigned n, T z, const Policy&); + + template + typename detail::expint_result::type expint(T const z, U const u); + + template + typename tools::promote_args::type expint(T z); + + + template + typename tools::promote_args::type zeta(T s, const Policy&); + + template + typename tools::promote_args::type zeta(T s); + + + template + typename tools::promote_args::type pow(T base, const Policy& policy); + + template + typename tools::promote_args::type pow(T base); + + + template + T nextafter(const T&, const T&, const Policy&); + template + T nextafter(const T&, const T&); + template + T float_next(const T&, const Policy&); + template + T float_next(const T&); + template + T float_prior(const T&, const Policy&); + template + T float_prior(const T&); + template + T float_distance(const T&, const T&, const Policy&); + template + T float_distance(const T&, const T&); + + } +} +# 18 "../boost/math/special_functions/sign.hpp" 2 +# 1 "../boost/math/special_functions/detail/fp_traits.hpp" 1 +# 23 "../boost/math/special_functions/detail/fp_traits.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstring" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstring" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstring" 3 +# 24 "../boost/math/special_functions/detail/fp_traits.hpp" 2 + +# 1 "../boost/assert.hpp" 1 +# 50 "../boost/assert.hpp" +# 1 "/usr/include/assert.h" 1 3 4 +# 51 "../boost/assert.hpp" 2 +# 26 "../boost/math/special_functions/detail/fp_traits.hpp" 2 +# 1 "../boost/cstdint.hpp" 1 +# 27 "../boost/math/special_functions/detail/fp_traits.hpp" 2 +# 1 "../boost/detail/endian.hpp" 1 +# 28 "../boost/math/special_functions/detail/fp_traits.hpp" 2 +# 81 "../boost/math/special_functions/detail/fp_traits.hpp" +namespace boost { +namespace math { +namespace detail { +# 92 "../boost/math/special_functions/detail/fp_traits.hpp" +struct native_tag {}; +template +struct generic_tag {}; +struct ieee_tag {}; +struct ieee_copy_all_bits_tag : public ieee_tag {}; +struct ieee_copy_leading_bits_tag : public ieee_tag {}; +# 125 "../boost/math/special_functions/detail/fp_traits.hpp" +struct unknown_precision{}; +struct single_precision {}; +struct double_precision {}; +struct extended_double_precision {}; + + + +template struct fp_traits_native +{ + typedef native_tag method; +}; + + + +template struct fp_traits_non_native +{ + + typedef generic_tag::is_specialized> method; + + + +}; +# 177 "../boost/math/special_functions/detail/fp_traits.hpp" +template<> struct fp_traits_non_native +{ + typedef ieee_copy_all_bits_tag method; + + static const uint32_t sign = 0x80000000u; + static const uint32_t exponent = 0x7f800000; + static const uint32_t flag = 0x00000000; + static const uint32_t significand = 0x007fffff; + + typedef uint32_t bits; + static void get_bits(float x, uint32_t& a) { std::memcpy(&a, &x, 4); } + static void set_bits(float& x, uint32_t a) { std::memcpy(&x, &a, 4); } +}; +# 232 "../boost/math/special_functions/detail/fp_traits.hpp" +template<> struct fp_traits_non_native +{ + typedef ieee_copy_all_bits_tag method; + + static const uint64_t sign = ((uint64_t)0x80000000u) << 32; + static const uint64_t exponent = ((uint64_t)0x7ff00000) << 32; + static const uint64_t flag = 0; + static const uint64_t significand + = (((uint64_t)0x000fffff) << 32) + ((uint64_t)0xffffffffu); + + typedef uint64_t bits; + static void get_bits(double x, uint64_t& a) { std::memcpy(&a, &x, 8); } + static void set_bits(double& x, uint64_t a) { std::memcpy(&x, &a, 8); } +}; +# 292 "../boost/math/special_functions/detail/fp_traits.hpp" +template<> struct fp_traits_non_native +{ + typedef ieee_copy_all_bits_tag method; + + static const uint64_t sign = (uint64_t)0x80000000u << 32; + static const uint64_t exponent = (uint64_t)0x7ff00000 << 32; + static const uint64_t flag = 0; + static const uint64_t significand + = ((uint64_t)0x000fffff << 32) + (uint64_t)0xffffffffu; + + typedef uint64_t bits; + static void get_bits(long double x, uint64_t& a) { std::memcpy(&a, &x, 8); } + static void set_bits(long double& x, uint64_t a) { std::memcpy(&x, &a, 8); } +}; +# 318 "../boost/math/special_functions/detail/fp_traits.hpp" +template<> +struct fp_traits_non_native +{ + typedef ieee_copy_leading_bits_tag method; + + static const uint32_t sign = 0x80000000u; + static const uint32_t exponent = 0x7fff0000; + static const uint32_t flag = 0x00008000; + static const uint32_t significand = 0x00007fff; + + typedef uint32_t bits; + + static void get_bits(long double x, uint32_t& a) + { + std::memcpy(&a, reinterpret_cast(&x) + 6, 4); + } + + static void set_bits(long double& x, uint32_t a) + { + std::memcpy(reinterpret_cast(&x) + 6, &a, 4); + } +}; +# 483 "../boost/math/special_functions/detail/fp_traits.hpp" +template struct size_to_precision +{ + typedef unknown_precision type; +}; + +template<> struct size_to_precision<4, true> +{ + typedef single_precision type; +}; + +template<> struct size_to_precision<8, true> +{ + typedef double_precision type; +}; + +template<> struct size_to_precision<10, true> +{ + typedef extended_double_precision type; +}; + +template<> struct size_to_precision<12, true> +{ + typedef extended_double_precision type; +}; + +template<> struct size_to_precision<16, true> +{ + typedef extended_double_precision type; +}; + + + + + + +template +struct select_native +{ + typedef typename size_to_precision::value>::type precision; + typedef fp_traits_non_native type; +}; +template<> +struct select_native +{ + typedef fp_traits_native type; +}; +template<> +struct select_native +{ + typedef fp_traits_native type; +}; +template<> +struct select_native +{ + typedef fp_traits_native type; +}; +# 553 "../boost/math/special_functions/detail/fp_traits.hpp" +template struct fp_traits +{ + typedef typename size_to_precision::value>::type precision; + + typedef typename select_native::type type; + + + + typedef fp_traits_non_native sign_change_type; +}; + + + +} +} +} +# 19 "../boost/math/special_functions/sign.hpp" 2 + +namespace boost{ namespace math{ + +namespace detail { + + + + + template + inline int signbit_impl(T x, native_tag const&) + { + return (std::signbit)(x); + } + + + template + inline int signbit_impl(T x, generic_tag const&) + { + return x < 0; + } + + template + inline int signbit_impl(T x, generic_tag const&) + { + return x < 0; + } + + template + inline int signbit_impl(T x, ieee_copy_all_bits_tag const&) + { + typedef typename fp_traits::type traits; + + typename traits::bits a; + traits::get_bits(x,a); + return a & traits::sign ? 1 : 0; + } + + template + inline int signbit_impl(T x, ieee_copy_leading_bits_tag const&) + { + typedef typename fp_traits::type traits; + + typename traits::bits a; + traits::get_bits(x,a); + + return a & traits::sign ? 1 : 0; + } + + + + template + inline T (changesign_impl)(T x, generic_tag const&) + { + return -x; + } + + template + inline T (changesign_impl)(T x, generic_tag const&) + { + return -x; + } + + + template + inline T changesign_impl(T x, ieee_copy_all_bits_tag const&) + { + typedef typename fp_traits::sign_change_type traits; + + typename traits::bits a; + traits::get_bits(x,a); + a ^= traits::sign; + traits::set_bits(x,a); + return x; + } + + template + inline T (changesign_impl)(T x, ieee_copy_leading_bits_tag const&) + { + typedef typename fp_traits::sign_change_type traits; + + typename traits::bits a; + traits::get_bits(x,a); + a ^= traits::sign; + traits::set_bits(x,a); + return x; + } + + +} + +template int (signbit)(T x) +{ + typedef typename detail::fp_traits::type traits; + typedef typename traits::method method; + typedef typename boost::is_floating_point::type fp_tag; + return detail::signbit_impl(x, method()); +} + +template +inline int sign (const T& z) +{ + return (z == 0) ? 0 : (boost::math::signbit)(z) ? -1 : 1; +} + +template T (changesign)(const T& x) +{ + typedef typename detail::fp_traits::sign_change_type traits; + typedef typename traits::method method; + typedef typename boost::is_floating_point::type fp_tag; + + return detail::changesign_impl(x, method()); +} + +template +inline T copysign (const T& x, const T& y) +{ + using std::abs; using std::acos; using std::cos; using std::fmod; using std::modf; using std::tan; using std::asin; using std::cosh; using std::frexp; using std::pow; using std::tanh; using std::atan; using std::exp; using std::ldexp; using std::sin; using std::atan2; using std::fabs; using std::log; using std::sinh; using std::ceil; using std::floor; using std::log10; using std::sqrt; using boost::math::round; using boost::math::iround; using boost::math::lround; using boost::math::trunc; using boost::math::itrunc; using boost::math::ltrunc; using boost::math::modf; + return (boost::math::signbit)(x) != (boost::math::signbit)(y) ? (boost::math::changesign)(x) : x; +} + +} +} +# 71 "../boost/lexical_cast.hpp" 2 +# 1 "../boost/math/special_functions/fpclassify.hpp" 1 +# 17 "../boost/math/special_functions/fpclassify.hpp" +# 1 "../boost/math/tools/real_cast.hpp" 1 +# 13 "../boost/math/tools/real_cast.hpp" +namespace boost{ namespace math +{ + namespace tools + { + template + inline To real_cast(T t) + { + return static_cast(t); + } + } +} +} +# 18 "../boost/math/special_functions/fpclassify.hpp" 2 +# 88 "../boost/math/special_functions/fpclassify.hpp" +namespace boost{ + + + + + + +namespace math_detail{ + +template +inline bool is_nan_helper(T t, const boost::true_type&) +{ + + + + + + return (::std:: fpclassify(t) == (int)FP_NAN); + +} + +template +inline bool is_nan_helper(T, const boost::false_type&) +{ + return false; +} + +} + +namespace math{ + +namespace detail{ + + +template +inline int fpclassify_imp (T t, const native_tag&) +{ + return (std::fpclassify)(t); +} + + +template +inline int fpclassify_imp (T t, const generic_tag&) +{ + ; + + + + if(::boost::math_detail::is_nan_helper(t, ::boost::is_floating_point())) + return FP_NAN; +# 146 "../boost/math/special_functions/fpclassify.hpp" + T at = (t < T(0)) ? -t : t; + + + + + + + + if(at <= (std::numeric_limits::max)()) + { + if(at >= (std::numeric_limits::min)()) + return FP_NORMAL; + return (at != 0) ? FP_SUBNORMAL : FP_ZERO; + } + else if(at > (std::numeric_limits::max)()) + return FP_INFINITE; + return FP_NAN; +} + +template +inline int fpclassify_imp (T t, const generic_tag&) +{ +# 176 "../boost/math/special_functions/fpclassify.hpp" + ; + + return t == 0 ? FP_ZERO : FP_NORMAL; +} + +template +int fpclassify_imp (T x, ieee_copy_all_bits_tag) +{ + typedef typename fp_traits::type traits; + + ; + + typename traits::bits a; + traits::get_bits(x,a); + ; + a &= traits::exponent | traits::flag | traits::significand; + ; + ; + + if(a <= traits::significand) { + if(a == 0) + return FP_ZERO; + else + return FP_SUBNORMAL; + } + + if(a < traits::exponent) return FP_NORMAL; + + a &= traits::significand; + if(a == 0) return FP_INFINITE; + + return FP_NAN; +} + +template +int fpclassify_imp (T x, ieee_copy_leading_bits_tag) +{ + typedef typename fp_traits::type traits; + + ; + + typename traits::bits a; + traits::get_bits(x,a); + a &= traits::exponent | traits::flag | traits::significand; + + if(a <= traits::significand) { + if(x == 0) + return FP_ZERO; + else + return FP_SUBNORMAL; + } + + if(a < traits::exponent) return FP_NORMAL; + + a &= traits::significand; + traits::set_bits(x,a); + if(x == 0) return FP_INFINITE; + + return FP_NAN; +} +# 245 "../boost/math/special_functions/fpclassify.hpp" +} + +template +inline int fpclassify (T t) +{ + typedef typename detail::fp_traits::type traits; + typedef typename traits::method method; + + + + + + return detail::fpclassify_imp(t, method()); + +} + +namespace detail { + + + template + inline bool isfinite_impl(T x, native_tag const&) + { + return (std::isfinite)(x); + } + + + template + inline bool isfinite_impl(T x, generic_tag const&) + { + return x >= -(std::numeric_limits::max)() + && x <= (std::numeric_limits::max)(); + } + + template + inline bool isfinite_impl(T x, generic_tag const&) + { + + + + + (void)x; + return true; + } + + template + inline bool isfinite_impl(T x, ieee_tag const&) + { + typedef typename detail::fp_traits::type traits; + typename traits::bits a; + traits::get_bits(x,a); + a &= traits::exponent; + return a != traits::exponent; + } +# 307 "../boost/math/special_functions/fpclassify.hpp" +} + +template +inline bool (isfinite)(T x) +{ + typedef typename detail::fp_traits::type traits; + typedef typename traits::method method; + typedef typename boost::is_floating_point::type fp_tag; + return detail::isfinite_impl(x, method()); +} + + + +namespace detail { + + + template + inline bool isnormal_impl(T x, native_tag const&) + { + return (std::isnormal)(x); + } + + + template + inline bool isnormal_impl(T x, generic_tag const&) + { + if(x < 0) x = -x; + return x >= (std::numeric_limits::min)() + && x <= (std::numeric_limits::max)(); + } + + template + inline bool isnormal_impl(T x, generic_tag const&) + { + + + + + return !(x == 0); + } + + template + inline bool isnormal_impl(T x, ieee_tag const&) + { + typedef typename detail::fp_traits::type traits; + typename traits::bits a; + traits::get_bits(x,a); + a &= traits::exponent | traits::flag; + return (a != 0) && (a < traits::exponent); + } +# 366 "../boost/math/special_functions/fpclassify.hpp" +} + +template +inline bool (isnormal)(T x) +{ + typedef typename detail::fp_traits::type traits; + typedef typename traits::method method; + typedef typename boost::is_floating_point::type fp_tag; + return detail::isnormal_impl(x, method()); +} + + + +namespace detail { + + + template + inline bool isinf_impl(T x, native_tag const&) + { + return (std::isinf)(x); + } + + + template + inline bool isinf_impl(T x, generic_tag const&) + { + (void)x; + return std::numeric_limits::has_infinity + && ( x == std::numeric_limits::infinity() + || x == -std::numeric_limits::infinity()); + } + + template + inline bool isinf_impl(T x, generic_tag const&) + { + + + + + (void)x; + return false; + } + + template + inline bool isinf_impl(T x, ieee_copy_all_bits_tag const&) + { + typedef typename fp_traits::type traits; + + typename traits::bits a; + traits::get_bits(x,a); + a &= traits::exponent | traits::significand; + return a == traits::exponent; + } + + template + inline bool isinf_impl(T x, ieee_copy_leading_bits_tag const&) + { + typedef typename fp_traits::type traits; + + typename traits::bits a; + traits::get_bits(x,a); + a &= traits::exponent | traits::significand; + if(a != traits::exponent) + return false; + + traits::set_bits(x,0); + return x == 0; + } +# 443 "../boost/math/special_functions/fpclassify.hpp" +} + +template +inline bool (isinf)(T x) +{ + typedef typename detail::fp_traits::type traits; + typedef typename traits::method method; + typedef typename boost::is_floating_point::type fp_tag; + return detail::isinf_impl(x, method()); +} + + + +namespace detail { + + + template + inline bool isnan_impl(T x, native_tag const&) + { + return (std::isnan)(x); + } + + + template + inline bool isnan_impl(T x, generic_tag const&) + { + return std::numeric_limits::has_infinity + ? !(x <= std::numeric_limits::infinity()) + : x != x; + } + + template + inline bool isnan_impl(T x, generic_tag const&) + { + + + + + (void)x; + return false; + } + + template + inline bool isnan_impl(T x, ieee_copy_all_bits_tag const&) + { + typedef typename fp_traits::type traits; + + typename traits::bits a; + traits::get_bits(x,a); + a &= traits::exponent | traits::significand; + return a > traits::exponent; + } + + template + inline bool isnan_impl(T x, ieee_copy_leading_bits_tag const&) + { + typedef typename fp_traits::type traits; + + typename traits::bits a; + traits::get_bits(x,a); + + a &= traits::exponent | traits::significand; + if(a < traits::exponent) + return false; + + a &= traits::significand; + traits::set_bits(x,a); + return x != 0; + } + +} + +template bool (isnan)(T x) +{ + typedef typename detail::fp_traits::type traits; + typedef typename traits::method method; + typedef typename boost::is_floating_point::type fp_tag; + return detail::isnan_impl(x, method()); +} + + + + + + + +} +} +# 72 "../boost/lexical_cast.hpp" 2 + +# 1 "../boost/detail/lcast_precision.hpp" 1 +# 11 "../boost/detail/lcast_precision.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/climits" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/climits" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/climits" 3 + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include-fixed/limits.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/climits" 2 3 +# 12 "../boost/detail/lcast_precision.hpp" 2 + + + + +# 1 "../boost/integer_traits.hpp" 1 +# 23 "../boost/integer_traits.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include-fixed/limits.h" 1 3 4 +# 24 "../boost/integer_traits.hpp" 2 + + + +# 1 "/usr/include/wchar.h" 1 3 4 +# 28 "../boost/integer_traits.hpp" 2 +# 39 "../boost/integer_traits.hpp" + +# 40 "../boost/integer_traits.hpp" 3 + + +namespace boost { +template +class integer_traits : public std::numeric_limits +{ +public: + static const bool is_integral = false; +}; + +namespace detail { +template +class integer_traits_base +{ +public: + static const bool is_integral = true; + static const T const_min = min_val; + static const T const_max = max_val; +}; + + + +template +const bool integer_traits_base::is_integral; + +template +const T integer_traits_base::const_min; + +template +const T integer_traits_base::const_max; + + +} + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + + +template<> +class integer_traits + : public std::numeric_limits, + + + + public detail::integer_traits_base +# 130 "../boost/integer_traits.hpp" 3 +{ }; + + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + +template<> +class integer_traits + : public std::numeric_limits, + public detail::integer_traits_base +{ }; + + + + +template<> +class integer_traits< ::boost::long_long_type> + : public std::numeric_limits< ::boost::long_long_type>, + public detail::integer_traits_base< ::boost::long_long_type, (-9223372036854775807LL -1), 9223372036854775807LL> +{ }; + +template<> +class integer_traits< ::boost::ulong_long_type> + : public std::numeric_limits< ::boost::ulong_long_type>, + public detail::integer_traits_base< ::boost::ulong_long_type, 0, (9223372036854775807LL * 2ULL + 1)> +{ }; +# 256 "../boost/integer_traits.hpp" 3 +} +# 17 "../boost/detail/lcast_precision.hpp" 2 +# 36 "../boost/detail/lcast_precision.hpp" +namespace boost { namespace detail { + +class lcast_abstract_stub {}; + + + + + +template +struct lcast_precision +{ + + + + typedef typename boost::mpl::if_< + boost::is_abstract + , std::numeric_limits + , std::numeric_limits + >::type limits; + + + static const bool use_default_precision = !limits::is_specialized || limits::is_exact + + ; + + static const bool is_specialized_bin = !use_default_precision && limits::radix == 2 && limits::digits > 0 + + + ; + + static const bool is_specialized_dec = !use_default_precision && limits::radix == 10 && limits::digits10 > 0 + + + ; + + static const std::streamsize streamsize_max = boost::integer_traits::const_max + + ; + + static const unsigned int precision_dec = limits::digits10 + 1U; + + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((!is_specialized_dec || precision_dec <= streamsize_max + 0UL) == 0 ? false : true) >)> + + boost_static_assert_typedef_79; + + static const unsigned long precision_bin = 2UL + limits::digits * 30103UL / 100000UL + + ; + + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((!is_specialized_bin || (limits::digits + 0UL < (9223372036854775807L * 2UL + 1UL) / 30103UL && precision_bin > limits::digits10 + 0UL && precision_bin <= streamsize_max + 0UL)) == 0 ? false : true) >)> + + + + boost_static_assert_typedef_89; + + static const std::streamsize value = is_specialized_bin ? precision_bin : is_specialized_dec ? precision_dec : 6 + + + ; +}; + + +template +inline std::streamsize lcast_get_precision(T* = 0) +{ + + return lcast_precision::value; +# 165 "../boost/detail/lcast_precision.hpp" +} + +template +inline void lcast_set_precision(std::ios_base& stream, T*) +{ + stream.precision(lcast_get_precision()); +} + +template +inline void lcast_set_precision(std::ios_base& stream, Source*, Target*) +{ + std::streamsize const s = lcast_get_precision(static_cast(0)); + std::streamsize const t = lcast_get_precision(static_cast(0)); + stream.precision(s > t ? s : t); +} + +}} +# 74 "../boost/lexical_cast.hpp" 2 + + +# 1 "../boost/container/container_fwd.hpp" 1 +# 24 "../boost/container/container_fwd.hpp" +namespace boost{ +namespace intrusive{ + +}} + +namespace boost{ namespace container{ namespace container_detail{ + +namespace bi = boost::intrusive; + +}}} +# 47 "../boost/container/container_fwd.hpp" +namespace boost { +namespace container { + + +template > +class vector; + + +template > +class stable_vector; + + +template > +class deque; + + +template > +class list; + + +template > +class slist; + + +template + ,class A = std::allocator > +class set; + + +template + ,class A = std::allocator > +class multiset; + + +template + ,class A = std::allocator > > +class map; + + +template + ,class A = std::allocator > > +class multimap; + + +template + ,class A = std::allocator > +class flat_set; + + +template + ,class A = std::allocator > +class flat_multiset; + + +template + ,class A = std::allocator > > +class flat_map; + + +template + ,class A = std::allocator > > +class flat_multimap; + + +template + ,class A = std::allocator > +class basic_string; + + + +struct ordered_range_impl_t {}; + + + +struct ordered_unique_range_impl_t{}; + + + +typedef ordered_range_impl_t * ordered_range_t; +typedef ordered_unique_range_impl_t *ordered_unique_range_t; + + + + + +static const ordered_range_t ordered_range = 0; + + + +static const ordered_unique_range_t ordered_unique_range = 0; + + + +namespace detail_really_deep_namespace { + + + +struct dummy +{ + dummy() + { + (void)ordered_range; + (void)ordered_unique_range; + } +}; + +} + + + +}} +# 77 "../boost/lexical_cast.hpp" 2 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwchar" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwchar" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwchar" 3 + + + + +# 1 "/usr/include/wchar.h" 1 3 4 +# 47 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cwchar" 2 3 +# 80 "../boost/lexical_cast.hpp" 2 +# 104 "../boost/lexical_cast.hpp" +namespace boost +{ + + class bad_lexical_cast : + + + + + public std::bad_cast + + + + + + + + { + public: + bad_lexical_cast() : + + source(&typeid(void)), target(&typeid(void)) + + + + { + } + + bad_lexical_cast( + const std::type_info &source_type_arg, + const std::type_info &target_type_arg) : + source(&source_type_arg), target(&target_type_arg) + { + } + + const std::type_info &source_type() const + { + return *source; + } + const std::type_info &target_type() const + { + return *target; + } + + virtual const char *what() const throw() + { + return "bad lexical cast: " + "source type value could not be interpreted as target"; + } + virtual ~bad_lexical_cast() throw() + { + } + private: + const std::type_info *source; + const std::type_info *target; + }; + + namespace detail + { + template + struct stream_char + { + typedef char type; + }; + + + template + struct stream_char< std::basic_string > + { + typedef CharT type; + }; + + + template + struct stream_char< ::boost::container::basic_string > + { + typedef CharT type; + }; + + + + + + template<> + struct stream_char + { + typedef wchar_t type; + }; + + + template<> + struct stream_char + { + typedef wchar_t type; + }; + + template<> + struct stream_char + { + typedef wchar_t type; + }; +# 259 "../boost/lexical_cast.hpp" + template + struct widest_char + { + typedef typename boost::mpl::if_c< + (sizeof(TargetChar) > sizeof(SourceChar)) + , TargetChar + , SourceChar >::type type; + }; + } + + namespace detail + { + + template + struct deduce_char_traits + { + typedef std::char_traits type; + }; + + template + struct deduce_char_traits< CharT + , std::basic_string + , Source + > + { + typedef Traits type; + }; + + template + struct deduce_char_traits< CharT + , Target + , std::basic_string + > + { + typedef Traits type; + }; + + + template + struct deduce_char_traits< CharT + , ::boost::container::basic_string + , Source + > + { + typedef Traits type; + }; + + template + struct deduce_char_traits< CharT + , Target + , ::boost::container::basic_string + > + { + typedef Traits type; + }; + + template + struct deduce_char_traits< CharT + , std::basic_string + , std::basic_string + > + { + typedef Traits type; + }; + + template + struct deduce_char_traits< CharT + , ::boost::container::basic_string + , ::boost::container::basic_string + > + { + typedef Traits type; + }; + + template + struct deduce_char_traits< CharT + , ::boost::container::basic_string + , std::basic_string + > + { + typedef Traits type; + }; + + template + struct deduce_char_traits< CharT + , std::basic_string + , ::boost::container::basic_string + > + { + typedef Traits type; + }; + + + } + + namespace detail + { + + template< class Source + > + struct lcast_src_length + { + static const std::size_t value = 1; + + + static void check_coverage() {} + }; +# 380 "../boost/lexical_cast.hpp" + template + struct lcast_src_length_integral + { + + static const std::size_t value = std::numeric_limits::is_signed + std::numeric_limits::is_specialized + std::numeric_limits::digits10 * 2 + + + + ; + + + + + }; + + + + + + + template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; + template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; + template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; + template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; + template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; + template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; + + template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; + template<> struct lcast_src_length : lcast_src_length_integral { static void check_coverage() {} }; +# 427 "../boost/lexical_cast.hpp" + template + struct lcast_src_length_floating + { + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((std::numeric_limits::max_exponent10 <= 999999L && std::numeric_limits::min_exponent10 >= -999999L) == 0 ? false : true) >)> + + + boost_static_assert_typedef_433; + static const std::size_t value = 5 + lcast_precision::value + 6 + + ; + }; + + template<> + struct lcast_src_length + : lcast_src_length_floating + { + static void check_coverage() {} + }; + + template<> + struct lcast_src_length + : lcast_src_length_floating + { + static void check_coverage() {} + }; + + template<> + struct lcast_src_length + : lcast_src_length_floating + { + static void check_coverage() {} + }; + + + } + + namespace detail + { + template struct lcast_char_constants; + + template<> + struct lcast_char_constants + { + static const char zero = '0'; + static const char minus = '-'; + static const char plus = '+'; + static const char lowercase_e = 'e'; + static const char capital_e = 'E'; + static const char c_decimal_separator = '.'; + }; + + + template<> + struct lcast_char_constants + { + static const wchar_t zero = L'0'; + static const wchar_t minus = L'-'; + static const wchar_t plus = L'+'; + static const wchar_t lowercase_e = L'e'; + static const wchar_t capital_e = L'E'; + static const wchar_t c_decimal_separator = L'.'; + }; +# 516 "../boost/lexical_cast.hpp" + } + + namespace detail + { + + + + + + + + template + inline + typename make_unsigned::type lcast_to_unsigned(T value) + { + typedef typename make_unsigned::type result_type; + result_type uvalue = static_cast(value); + return value < 0 ? -uvalue : uvalue; + } + + + + + + } + + namespace detail + { + template + CharT* lcast_put_unsigned(const T n_param, CharT* finish) + { + + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((!std::numeric_limits::is_signed) == 0 ? false : true) >)> boost_static_assert_typedef_548; + + + typedef typename Traits::int_type int_type; + CharT const czero = lcast_char_constants::zero; + int_type const zero = Traits::to_int_type(czero); + typename boost::mpl::if_c< + (sizeof(int_type) > sizeof(T)) + , int_type + , T + >::type n = n_param; + + + std::locale loc; + if (loc != std::locale::classic()) { + typedef std::numpunct numpunct; + numpunct const& np = std::use_facet< numpunct >(loc); + std::string const grouping = np.grouping(); + std::string::size_type const grouping_size = grouping.size(); + + if ( grouping_size && grouping[0] > 0 ) + { + + + + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((std::numeric_limits::digits10 < 127) == 0 ? false : true) >)> boost_static_assert_typedef_573; + + CharT thousands_sep = np.thousands_sep(); + std::string::size_type group = 0; + char last_grp_size = grouping[0]; + char left = last_grp_size; + + do + { + if(left == 0) + { + ++group; + if(group < grouping_size) + { + char const grp_size = grouping[group]; + last_grp_size = grp_size <= 0 ? 127 : grp_size; + } + + left = last_grp_size; + --finish; + Traits::assign(*finish, thousands_sep); + } + + --left; + + --finish; + int_type const digit = static_cast(n % 10U); + Traits::assign(*finish, Traits::to_char_type(zero + digit)); + n /= 10; + } while(n); + return finish; + } + } + + { + do + { + --finish; + int_type const digit = static_cast(n % 10U); + Traits::assign(*finish, Traits::to_char_type(zero + digit)); + n /= 10; + } while(n); + } + + return finish; + } + } + + namespace detail + { + template + inline bool lcast_ret_unsigned(T& value, const CharT* const begin, const CharT* end) + { + + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((!std::numeric_limits::is_signed) == 0 ? false : true) >)> boost_static_assert_typedef_627; + + typedef typename Traits::int_type int_type; + CharT const czero = lcast_char_constants::zero; + --end; + value = 0; + + if (begin > end || *end < czero || *end >= czero + 10) + return false; + value = *end - czero; + --end; + T multiplier = 1; + bool multiplier_overflowed = false; + + + std::locale loc; + if (loc != std::locale::classic()) { + typedef std::numpunct numpunct; + numpunct const& np = std::use_facet< numpunct >(loc); + std::string const& grouping = np.grouping(); + std::string::size_type const grouping_size = grouping.size(); + + + + + if (grouping_size && grouping[0] > 0) + { + unsigned char current_grouping = 0; + CharT const thousands_sep = np.thousands_sep(); + char remained = grouping[current_grouping] - 1; + bool shall_we_return = true; + + for(;end>=begin; --end) + { + if (remained) { + T const multiplier_10 = multiplier * 10; + if (multiplier_10 / 10 != multiplier) multiplier_overflowed = true; + + T const dig_value = *end - czero; + T const new_sub_value = multiplier_10 * dig_value; + + if (*end < czero || *end >= czero + 10 + + || (dig_value && new_sub_value / dig_value != multiplier_10) + || static_cast((std::numeric_limits::max)()-new_sub_value) < value + || (multiplier_overflowed && dig_value) + ) + return false; + + value += new_sub_value; + multiplier *= 10; + --remained; + } else { + if ( !Traits::eq(*end, thousands_sep) ) + { +# 693 "../boost/lexical_cast.hpp" + shall_we_return = false; + break; + } else { + if ( begin == end ) return false; + if (current_grouping < grouping_size-1 ) ++current_grouping; + remained = grouping[current_grouping]; + } + } + } + + if (shall_we_return) return true; + } + } + + { + while ( begin <= end ) + { + T const multiplier_10 = multiplier * 10; + if (multiplier_10 / 10 != multiplier) multiplier_overflowed = true; + + T const dig_value = *end - czero; + T const new_sub_value = multiplier_10 * dig_value; + + if (*end < czero || *end >= czero + 10 + + || (dig_value && new_sub_value / dig_value != multiplier_10) + || static_cast((std::numeric_limits::max)()-new_sub_value) < value + || (multiplier_overflowed && dig_value) + ) + return false; + + value += new_sub_value; + multiplier *= 10; + --end; + } + } + return true; + } + } + + namespace detail + { + + template + inline bool parse_inf_nan_impl(const CharT* begin, const CharT* end, T& value + , const CharT* lc_NAN, const CharT* lc_nan + , const CharT* lc_INFINITY, const CharT* lc_infinity + , const CharT opening_brace, const CharT closing_brace) + { + using namespace std; + if (begin == end) return false; + const CharT minus = lcast_char_constants::minus; + const CharT plus = lcast_char_constants::plus; + const int inifinity_size = 8; + + bool has_minus = false; + + if( *begin == minus) + { + ++ begin; + has_minus = true; + } + else if( *begin == plus ) ++begin; + + if( end-begin < 3 ) return false; + if( !memcmp(begin, lc_nan, 3*sizeof(CharT)) || !memcmp(begin, lc_NAN, 3*sizeof(CharT)) ) + { + begin += 3; + if (end != begin) + { + if(end-begin<2) return false; + -- end; + if( *begin != opening_brace || *end != closing_brace) return false; + } + + if( !has_minus ) value = std::numeric_limits::quiet_NaN(); + else value = (boost::math::changesign) (std::numeric_limits::quiet_NaN()); + return true; + } else + if (( + end-begin==3 + && + (!memcmp(begin, lc_infinity, 3*sizeof(CharT)) || !memcmp(begin, lc_INFINITY, 3*sizeof(CharT))) + ) + || + ( + end-begin==inifinity_size + && + (!memcmp(begin, lc_infinity, inifinity_size)|| !memcmp(begin, lc_INFINITY, inifinity_size)) + ) + ) + { + if( !has_minus ) value = std::numeric_limits::infinity(); + else value = (boost::math::changesign) (std::numeric_limits::infinity()); + return true; + } + + return false; + } + + + template + bool parse_inf_nan(const wchar_t* begin, const wchar_t* end, T& value) + { + return parse_inf_nan_impl(begin, end, value + , L"NAN", L"nan" + , L"INFINITY", L"infinity" + , L'(', L')'); + } +# 824 "../boost/lexical_cast.hpp" + template + bool parse_inf_nan(const CharT* begin, const CharT* end, T& value) + { + return parse_inf_nan_impl(begin, end, value + , "NAN", "nan" + , "INFINITY", "infinity" + , '(', ')'); + } + + template + bool put_inf_nan(wchar_t* begin, wchar_t*& end, const T& value) + { + using namespace std; + if ( (boost::math::isnan)(value) ) + { + if ( (boost::math::signbit)(value) ) + { + memcpy(begin,L"-nan", sizeof(L"-nan")); + end = begin + 4; + } else + { + memcpy(begin,L"nan", sizeof(L"nan")); + end = begin + 3; + } + return true; + } else if ( (boost::math::isinf)(value) ) + { + if ( (boost::math::signbit)(value) ) + { + memcpy(begin,L"-inf", sizeof(L"-inf")); + end = begin + 4; + } else + { + memcpy(begin,L"inf", sizeof(L"inf")); + end = begin + 3; + } + return true; + } + + return false; + } + + template + bool put_inf_nan(CharT* begin, CharT*& end, const T& value) + { + using namespace std; + if ( (boost::math::isnan)(value) ) + { + if ( (boost::math::signbit)(value) ) + { + memcpy(begin,"-nan", sizeof("-nan")); + end = begin + 4; + } else + { + memcpy(begin,"nan", sizeof("nan")); + end = begin + 3; + } + return true; + } else if ( (boost::math::isinf)(value) ) + { + if ( (boost::math::signbit)(value) ) + { + memcpy(begin,"-inf", sizeof("-inf")); + end = begin + 4; + } else + { + memcpy(begin,"inf", sizeof("inf")); + end = begin + 3; + } + return true; + } + + return false; + } + + } + + + namespace detail + { + template + struct mantissa_holder_type + { + + }; + + template <> + struct mantissa_holder_type + { + typedef unsigned int type; + }; + + template <> + struct mantissa_holder_type + { + + typedef boost::ulong_long_type type; + + + + }; + + template + inline bool lcast_ret_float(T& value, const CharT* begin, const CharT* end) + { + + + std::locale loc; + typedef std::numpunct numpunct; + numpunct const& np = std::use_facet< numpunct >(loc); + std::string const grouping( + (loc == std::locale::classic()) + ? std::string() + : np.grouping() + ); + std::string::size_type const grouping_size = grouping.size(); + CharT const thousands_sep = grouping_size ? np.thousands_sep() : 0; + CharT const decimal_point = np.decimal_point(); + bool found_grouping = false; + std::string::size_type last_grouping_pos = grouping_size - 1; + + + + + CharT const czero = lcast_char_constants::zero; + CharT const minus = lcast_char_constants::minus; + CharT const plus = lcast_char_constants::plus; + CharT const capital_e = lcast_char_constants::capital_e; + CharT const lowercase_e = lcast_char_constants::lowercase_e; + + value = 0.0; + + if (parse_inf_nan(begin, end, value)) return true; + + typedef typename Traits::int_type int_type; + typedef typename mantissa_holder_type::type mantissa_type; + int_type const zero = Traits::to_int_type(czero); + if (begin == end) return false; + + + bool has_minus = false; + if ( *begin == minus ) { + ++ begin; + has_minus = true; + if (begin == end) return false; + } else if ( *begin == plus ) { + ++begin; + if (begin == end) return false; + } + + bool found_decimal = false; + bool found_number_before_exp = false; + int pow_of_10 = 0; + mantissa_type mantissa=0; + bool is_mantissa_full = false; + + char length_since_last_delim = 0; + + while ( begin != end ) + { + if (found_decimal) { + + + mantissa_type tmp_mantissa = mantissa * 10u; + if ( *begin == lowercase_e || *begin == capital_e ) break; + if ( *begin < czero || *begin >= czero + 10 ) return false; + if ( is_mantissa_full + || tmp_mantissa / 10u != mantissa + || (std::numeric_limits::max)()-(*begin - zero) < tmp_mantissa + ) { + is_mantissa_full = true; + ++ begin; + continue; + } + + -- pow_of_10; + mantissa = tmp_mantissa; + mantissa += *begin - zero; + + found_number_before_exp = true; + } else { + + if (*begin >= czero && *begin < czero + 10) { + + + + + mantissa_type tmp_mantissa = mantissa * 10u; + if( !is_mantissa_full + && tmp_mantissa / 10u == mantissa + && (std::numeric_limits::max)()-(*begin - zero) >= tmp_mantissa + ) + { + mantissa = tmp_mantissa; + mantissa += *begin - zero; + } else + { + is_mantissa_full = true; + ++ pow_of_10; + } + + found_number_before_exp = true; + ++ length_since_last_delim; + } else if ( *begin == decimal_point || *begin == lowercase_e || *begin == capital_e) { +# 1036 "../boost/lexical_cast.hpp" + if( grouping_size && found_grouping + && ( + length_since_last_delim != grouping[0] + || last_grouping_pos>1 + || (last_grouping_pos==0 && grouping_size>1) + ) + ) return false; + + + if(*begin == decimal_point){ + ++ begin; + found_decimal = true; + continue; + }else { + if (!found_number_before_exp) return false; + break; + } + } + + else if (grouping_size && *begin == thousands_sep){ + if(found_grouping) + { + + + + + if (length_since_last_delim != grouping[last_grouping_pos] ) + { + if (!last_grouping_pos) return false; + else + { + -- last_grouping_pos; + if (length_since_last_delim != grouping[last_grouping_pos]) return false; + } + } else + + if (grouping_size>1u && last_grouping_pos+1 grouping[last_grouping_pos] ) return false; + } + + length_since_last_delim = 0; + ++ begin; + + + if (begin == end) return false; + continue; + } + + else return false; + } + + ++begin; + } + + + if ( begin != end && ( *begin == lowercase_e || *begin == capital_e ) ) { + ++ begin; + if ( begin == end ) return false; + + bool exp_has_minus = false; + if( *begin == minus ) { + exp_has_minus = true; + ++ begin; + if ( begin == end ) return false; + } else if (*begin == plus ) { + ++ begin; + if ( begin == end ) return false; + } + + int exp_pow_of_10 = 0; + while ( begin != end ) + { + if ( *begin < czero + || *begin >= czero + 10 + || exp_pow_of_10 * 10 < exp_pow_of_10) + return false; + + exp_pow_of_10 *= 10; + exp_pow_of_10 += *begin - zero; + ++ begin; + }; + + if ( exp_pow_of_10 ) { + + if ( exp_has_minus ) { + pow_of_10 -= exp_pow_of_10; + } else { + pow_of_10 += exp_pow_of_10; + } + } + } + + + + + long double result = std::pow(10.0L, pow_of_10) * mantissa; + value = static_cast( has_minus ? (boost::math::changesign)(result) : result); + + if ( (boost::math::isinf)(value) || (boost::math::isnan)(value) ) return false; + + return true; + } + } + + namespace detail + { + template< class BufferType, class CharT > + class stl_buf_unlocker: public BufferType{ + public: + typedef BufferType base_class; + + using base_class::pptr; + using base_class::pbase; + using base_class::setg; + using base_class::setp; + + + + + + + }; + } + + namespace detail + { + struct do_not_construct_stringbuffer_t{}; + } + + namespace detail + { + + template< class CharT + , class Traits + , bool RequiresStringbuffer + > + class lexical_stream_limited_src + { + typedef stl_buf_unlocker, CharT > local_streambuffer_t; + + + + + + + typedef stl_buf_unlocker, CharT > local_stringbuffer_t; + + typedef typename ::boost::mpl::if_c< + RequiresStringbuffer, + local_stringbuffer_t, + do_not_construct_stringbuffer_t + >::type deduced_stringbuffer_t; + + + CharT* start; + CharT* finish; + deduced_stringbuffer_t stringbuffer; + + public: + lexical_stream_limited_src(CharT* sta, CharT* fin) + : start(sta) + , finish(fin) + {} + + private: + + lexical_stream_limited_src(lexical_stream_limited_src const&); + void operator=(lexical_stream_limited_src const&); + + + bool shl_char(CharT ch) + { + Traits::assign(*start, ch); + finish = start + 1; + return true; + } + + + template + bool shl_char(T ch) + { + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( sizeof(T) <= sizeof(CharT))) == 0 ? false : true) >)> + + boost_static_assert_typedef_1225; + + std::locale loc; + wchar_t w = std::use_facet< std::ctype >(loc).widen(ch); + + + + Traits::assign(*start, w); + finish = start + 1; + return true; + } + + + bool shl_char_array(CharT const* str) + { + start = const_cast(str); + finish = start + Traits::length(str); + return true; + } + + + template + bool shl_char_array(T const* str) + { + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( sizeof(T) <= sizeof(CharT))) == 0 ? false : true) >)> + + boost_static_assert_typedef_1251; + return shl_input_streamable(str); + } + + + template + bool shl_input_streamable(InputStreamable& input) + { + std::basic_ostream stream(&stringbuffer); + bool const result = !(stream << input).fail(); + start = stringbuffer.pbase(); + finish = stringbuffer.pptr(); + return result; + } + + template + inline bool shl_signed(T n) + { + start = lcast_put_unsigned(lcast_to_unsigned(n), finish); + if(n < 0) + { + --start; + CharT const minus = lcast_char_constants::minus; + Traits::assign(*start, minus); + } + return true; + } + + + + + + + + template + bool shl_float(float val,T* out) + { using namespace std; + if (put_inf_nan(start,finish,val)) return true; + finish = start + sprintf(out,"%.*g", static_cast(boost::detail::lcast_get_precision()), val ); + return finish > start; + } + + template + bool shl_double(double val,T* out) + { using namespace std; + if (put_inf_nan(start,finish,val)) return true; + finish = start + sprintf(out,"%.*lg", static_cast(boost::detail::lcast_get_precision()), val ); + return finish > start; + } + + template + bool shl_long_double(long double val,T* out) + { using namespace std; + if (put_inf_nan(start,finish,val)) return true; + finish = start + sprintf(out,"%.*Lg", static_cast(boost::detail::lcast_get_precision()), val ); + return finish > start; + } +# 1316 "../boost/lexical_cast.hpp" + bool shl_float(float val,wchar_t* out) + { using namespace std; + if (put_inf_nan(start,finish,val)) return true; + finish = start + swprintf(out, + + finish-start, + + L"%.*g", static_cast(boost::detail::lcast_get_precision()), val ); + + return finish > start; + } + + + bool shl_double(double val,wchar_t* out) + { using namespace std; + if (put_inf_nan(start,finish,val)) return true; +# 1340 "../boost/lexical_cast.hpp" + finish = start + swprintf(out, + + finish-start, + + L"%.*lg", static_cast(boost::detail::lcast_get_precision()), val ); + return finish > start; + } + + + bool shl_long_double(long double val,wchar_t* out) + { using namespace std; + if (put_inf_nan(start,finish,val)) return true; + finish = start + swprintf(out, + + finish-start, + + L"%.*Lg", static_cast(boost::detail::lcast_get_precision()), val ); + return finish > start; + } + + + + + + public: + template + bool operator<<(std::basic_string const& str) + { + start = const_cast(str.data()); + finish = start + str.length(); + return true; + } + + + template + bool operator<<(::boost::container::basic_string const& str) + { + start = const_cast(str.data()); + finish = start + str.length(); + return true; + } + + bool operator<<(bool value) + { + CharT const czero = lcast_char_constants::zero; + Traits::assign(*start, Traits::to_char_type(czero + value)); + finish = start + 1; + return true; + } + + bool operator<<(char ch) { return shl_char(ch); } + bool operator<<(unsigned char ch) { return ((*this) << static_cast(ch)); } + bool operator<<(signed char ch) { return ((*this) << static_cast(ch)); } + + bool operator<<(wchar_t const* str) { return shl_char_array(str); } + bool operator<<(wchar_t * str) { return shl_char_array(str); } + + bool operator<<(wchar_t ch) { return shl_char(ch); } + + + bool operator<<(unsigned char const* ch) { return ((*this) << reinterpret_cast(ch)); } + bool operator<<(unsigned char * ch) { return ((*this) << reinterpret_cast(ch)); } + bool operator<<(signed char const* ch) { return ((*this) << reinterpret_cast(ch)); } + bool operator<<(signed char * ch) { return ((*this) << reinterpret_cast(ch)); } + bool operator<<(char const* str) { return shl_char_array(str); } + bool operator<<(char* str) { return shl_char_array(str); } + bool operator<<(short n) { return shl_signed(n); } + bool operator<<(int n) { return shl_signed(n); } + bool operator<<(long n) { return shl_signed(n); } + bool operator<<(unsigned short n) { start = lcast_put_unsigned(n, finish); return true; } + bool operator<<(unsigned int n) { start = lcast_put_unsigned(n, finish); return true; } + bool operator<<(unsigned long n) { start = lcast_put_unsigned(n, finish); return true; } + + + bool operator<<(boost::ulong_long_type n) { start = lcast_put_unsigned(n, finish); return true; } + bool operator<<(boost::long_long_type n) { return shl_signed(n); } + + + + + bool operator<<(float val) { return shl_float(val,start); } + bool operator<<(double val) { return shl_double(val,start); } + bool operator<<(long double val) { + + return shl_long_double(val,start); + + + + } + + template + bool operator<<(const InStreamable& input) { return shl_input_streamable(input); } + + + private: + + template + bool shr_unsigned(Type& output) + { + if (start == finish) return false; + CharT const minus = lcast_char_constants::minus; + CharT const plus = lcast_char_constants::plus; + bool has_minus = false; + + + if ( Traits::eq(minus,*start) ) + { + ++start; + has_minus = true; + } else if ( Traits::eq( plus, *start ) ) + { + ++start; + } + + bool const succeed = lcast_ret_unsigned(output, start, finish); + + + + + + + + if (has_minus) output = static_cast(-output); + + + + + + return succeed; + } + + template + bool shr_signed(Type& output) + { + if (start == finish) return false; + CharT const minus = lcast_char_constants::minus; + CharT const plus = lcast_char_constants::plus; + typedef typename make_unsigned::type utype; + utype out_tmp =0; + bool has_minus = false; + + + if ( Traits::eq(minus,*start) ) + { + ++start; + has_minus = true; + } else if ( Traits::eq(plus, *start) ) + { + ++start; + } + + bool succeed = lcast_ret_unsigned(out_tmp, start, finish); + if (has_minus) { + + + + + + + + utype const comp_val = static_cast(-(std::numeric_limits::min)()); + succeed = succeed && out_tmp<=comp_val; + output = -out_tmp; + + + + + + } else { + utype const comp_val = static_cast((std::numeric_limits::max)()); + succeed = succeed && out_tmp<=comp_val; + output = out_tmp; + } + return succeed; + } + + template + bool shr_using_base_class(InputStreamable& output) + { + + + + + + if(is_pointer::value) + return false; + + local_streambuffer_t bb; + bb.setg(start, start, finish); + std::basic_istream stream(&bb); + stream.unsetf(std::ios::skipws); + lcast_set_precision(stream, static_cast(0)); + + + + return stream >> output && + stream.get() == + + + + + + + + Traits::eof(); + + } + + template + inline bool shr_xchar(T& output) + { + typedef ::boost::static_assert_test< sizeof(::boost::STATIC_ASSERTION_FAILURE< ((( sizeof(CharT) == sizeof(T) )) == 0 ? false : true) >)> + + boost_static_assert_typedef_1553; + bool const ok = (finish - start == 1); + if(ok) { + CharT out; + Traits::assign(out, *start); + output = static_cast(out); + } + return ok; + } + + + public: + bool operator>>(unsigned short& output) { return shr_unsigned(output); } + bool operator>>(unsigned int& output) { return shr_unsigned(output); } + bool operator>>(unsigned long int& output) { return shr_unsigned(output); } + bool operator>>(short& output) { return shr_signed(output); } + bool operator>>(int& output) { return shr_signed(output); } + bool operator>>(long int& output) { return shr_signed(output); } + + bool operator>>(boost::ulong_long_type& output) { return shr_unsigned(output); } + bool operator>>(boost::long_long_type& output) { return shr_signed(output); } + + + + + bool operator>>(char& output) { return shr_xchar(output); } + bool operator>>(unsigned char& output) { return shr_xchar(output); } + bool operator>>(signed char& output) { return shr_xchar(output); } + + bool operator>>(wchar_t& output) { return shr_xchar(output); } +# 1596 "../boost/lexical_cast.hpp" + template + bool operator>>(std::basic_string& str) { str.assign(start, finish); return true; } + + template + bool operator>>(::boost::container::basic_string& str) { str.assign(start, finish); return true; } + + + + + + + + bool operator>>(bool& output) + { + CharT const zero = lcast_char_constants::zero; + CharT const plus = lcast_char_constants::plus; + CharT const minus = lcast_char_constants::minus; + + switch(finish-start) + { + case 1: + output = Traits::eq(start[0], zero+1); + return output || Traits::eq(start[0], zero ); + case 2: + if ( Traits::eq( plus, *start) ) + { + ++start; + output = Traits::eq(start[0], zero +1); + return output || Traits::eq(start[0], zero ); + } else + { + output = false; + return Traits::eq( minus, *start) + && Traits::eq( zero, start[1]); + } + default: + output = false; + return false; + } + } + + bool operator>>(float& output) { return lcast_ret_float(output,start,finish); } + + private: + + template + bool float_types_converter_internal(T& output, int ) { + if (parse_inf_nan(start, finish, output)) return true; + bool return_value = shr_using_base_class(output); + + + + + + + + CharT const minus = lcast_char_constants::minus; + CharT const plus = lcast_char_constants::plus; + CharT const capital_e = lcast_char_constants::capital_e; + CharT const lowercase_e = lcast_char_constants::lowercase_e; + if ( return_value && + ( + *(finish-1) == lowercase_e + || *(finish-1) == capital_e + || *(finish-1) == minus + || *(finish-1) == plus + ) + ) return false; + + return return_value; + } + + + bool float_types_converter_internal(double& output,char ) { + return lcast_ret_float(output,start,finish); + } + public: + + bool operator>>(double& output) + { + + + + + + + boost::mpl::if_c< + + ::boost::type_traits::ice_eq< sizeof(double), sizeof(long double) >::value, + + + + int, + char + >::type tag = 0; + + return float_types_converter_internal(output, tag); + } + + bool operator>>(long double& output) + { + int tag = 0; + return float_types_converter_internal(output, tag); + } + + + + template + bool operator>>(InputStreamable& output) { return shr_using_base_class(output); } + }; + } + + + + + + namespace detail + { + template + struct array_to_pointer_decay + { + typedef T type; + }; + + template + struct array_to_pointer_decay + { + typedef const T * type; + }; + + template + struct is_stdstring + { + static const bool value = false; + }; + + template + struct is_stdstring< std::basic_string > + { + static const bool value = true; + }; + + template + struct is_stdstring< ::boost::container::basic_string > + { + static const bool value = true; + }; + + template + struct is_char_or_wchar + { + private: + + typedef wchar_t wchar_t_if_supported; + + + + + + + + typedef char char16_t_if_supported; + + + + + + typedef char char32_t_if_supported; + + public: + + static const bool value = ( ::boost::type_traits::ice_or< is_same< T, char >::value, is_same< T, wchar_t_if_supported >::value, is_same< T, char16_t_if_supported >::value, is_same< T, char32_t_if_supported >::value, is_same< T, unsigned char >::value, is_same< T, signed char >::value >::value ) +# 1778 "../boost/lexical_cast.hpp" + ; + }; + + template + struct is_arithmetic_and_not_xchars + { + static const bool value = ( ::boost::type_traits::ice_and< is_arithmetic::value, is_arithmetic::value, ::boost::type_traits::ice_not< detail::is_char_or_wchar::value >::value, ::boost::type_traits::ice_not< detail::is_char_or_wchar::value >::value >::value ) +# 1797 "../boost/lexical_cast.hpp" + ; + }; + + + + + + + template + struct is_xchar_to_xchar + { + static const bool value = ( ::boost::type_traits::ice_or< ::boost::type_traits::ice_and< is_same::value, is_char_or_wchar::value >::value, ::boost::type_traits::ice_and< ::boost::type_traits::ice_eq< sizeof(char),sizeof(Target)>::value, ::boost::type_traits::ice_eq< sizeof(char),sizeof(Source)>::value, is_char_or_wchar::value, is_char_or_wchar::value >::value >::value ) +# 1823 "../boost/lexical_cast.hpp" + ; + }; + + template + struct is_char_array_to_stdstring + { + static const bool value = false; + }; + + template + struct is_char_array_to_stdstring< std::basic_string, CharT* > + { + static const bool value = true; + }; + + template + struct is_char_array_to_stdstring< std::basic_string, const CharT* > + { + static const bool value = true; + }; + + template + struct is_char_array_to_stdstring< ::boost::container::basic_string, CharT* > + { + static const bool value = true; + }; + + template + struct is_char_array_to_stdstring< ::boost::container::basic_string, const CharT* > + { + static const bool value = true; + }; +# 1863 "../boost/lexical_cast.hpp" + template + struct lexical_cast_do_cast + { + static inline Target lexical_cast_impl(const Source& arg) + { + typedef typename detail::array_to_pointer_decay::type src; + + typedef typename detail::widest_char< + typename detail::stream_char::type + , typename detail::stream_char::type + >::type char_type; + + typedef detail::lcast_src_length lcast_src_length; + std::size_t const src_len = lcast_src_length::value; + char_type buf[src_len + 1]; + lcast_src_length::check_coverage(); + + typedef typename + deduce_char_traits::type traits; + + typedef typename remove_pointer::type removed_ptr_t; + + + + + + const bool is_char_types_match = + (::boost::type_traits::ice_or< + ::boost::type_traits::ice_and< + ::boost::type_traits::ice_eq::value, + ::boost::type_traits::ice_or< + ::boost::is_same::value, + ::boost::is_same::value, + ::boost::is_same::value + >::value + >::value, + is_same::value + >::value); + + const bool requires_stringbuf = + !( + ::boost::type_traits::ice_or< + is_stdstring::value, + is_arithmetic::value, + ::boost::type_traits::ice_and< + is_pointer::value, + is_char_or_wchar::value, + is_char_types_match + >::value + >::value + ); + + detail::lexical_stream_limited_src + interpreter(buf, buf + src_len); + + Target result; + + if(!(interpreter.operator <<(arg) && interpreter.operator >>(result))) + throw_exception(bad_lexical_cast(typeid(Source), typeid(Target))); + return result; + } + }; + + + + + template + struct lexical_cast_copy + { + static inline Source lexical_cast_impl(const Source &arg) + { + return arg; + } + }; + + class precision_loss_error : public boost::numeric::bad_numeric_cast + { + public: + virtual const char * what() const throw() + { return "bad numeric conversion: precision loss error"; } + }; + + template + struct throw_on_precision_loss + { + typedef boost::numeric::Trunc Rounder; + typedef S source_type ; + + typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; + + static source_type nearbyint ( argument_type s ) + { + source_type orig_div_round = s / Rounder::nearbyint(s); + + if ( (orig_div_round > 1 ? orig_div_round - 1 : 1 - orig_div_round) > std::numeric_limits::epsilon() ) + ::boost::exception_detail::throw_exception_(precision_loss_error(),__PRETTY_FUNCTION__,"../boost/lexical_cast.hpp",1958); + return s ; + } + + typedef typename Rounder::round_style round_style; + } ; + + template + struct lexical_cast_dynamic_num_not_ignoring_minus + { + static inline Target lexical_cast_impl(const Source &arg) + { + try{ + typedef boost::numeric::converter< + Target, + Source, + boost::numeric::conversion_traits, + boost::numeric::def_overflow_handler, + throw_on_precision_loss + > Converter ; + + return Converter::convert(arg); + } catch( ::boost::numeric::bad_numeric_cast const& ) { + throw_exception(bad_lexical_cast(typeid(Source), typeid(Target))); + } + ; + } + }; + + template + struct lexical_cast_dynamic_num_ignoring_minus + { + static inline Target lexical_cast_impl(const Source &arg) + { + try{ + typedef boost::numeric::converter< + Target, + Source, + boost::numeric::conversion_traits, + boost::numeric::def_overflow_handler, + throw_on_precision_loss + > Converter ; + + bool has_minus = ( arg < 0); + if ( has_minus ) { + return static_cast(-Converter::convert(-arg)); + } else { + return Converter::convert(arg); + } + } catch( ::boost::numeric::bad_numeric_cast const& ) { + throw_exception(bad_lexical_cast(typeid(Source), typeid(Target))); + } + ; + } + }; +# 2032 "../boost/lexical_cast.hpp" + template + struct lexical_cast_dynamic_num + { + static inline Target lexical_cast_impl(const Source &arg) + { + typedef typename ::boost::mpl::if_c< + ::boost::type_traits::ice_and< + ::boost::type_traits::ice_or< + ::boost::is_signed::value, + ::boost::is_float::value + >::value, + ::boost::type_traits::ice_not< + is_same::value + >::value, + ::boost::type_traits::ice_not< + is_same::value + >::value, + ::boost::is_unsigned::value + >::value, + lexical_cast_dynamic_num_ignoring_minus, + lexical_cast_dynamic_num_not_ignoring_minus + >::type caster_type; + + return caster_type::lexical_cast_impl(arg); + } + }; + } + + template + inline Target lexical_cast(const Source &arg) + { + typedef typename detail::array_to_pointer_decay::type src; + + typedef typename ::boost::type_traits::ice_or< + detail::is_xchar_to_xchar::value, + detail::is_char_array_to_stdstring::value, + ::boost::type_traits::ice_and< + is_same::value, + detail::is_stdstring::value + >::value + > do_copy_type; + + typedef typename + detail::is_arithmetic_and_not_xchars do_copy_with_dynamic_check_type; + + typedef typename ::boost::mpl::if_c< + do_copy_type::value, + detail::lexical_cast_copy, + typename ::boost::mpl::if_c< + do_copy_with_dynamic_check_type::value, + detail::lexical_cast_dynamic_num, + detail::lexical_cast_do_cast + >::type + >::type caster_type; + + return caster_type::lexical_cast_impl(arg); + } +# 2184 "../boost/lexical_cast.hpp" +} +# 16 "quickbook/src/id_manager.cpp" 2 +# 1 "../boost/range/algorithm.hpp" 1 +# 32 "../boost/range/algorithm.hpp" +# 1 "../boost/range/detail/range_return.hpp" 1 +# 16 "../boost/range/detail/range_return.hpp" +namespace boost +{ + enum range_return_value + { + + return_found, + return_next, + return_prior, + return_begin_found, + return_begin_next, + return_begin_prior, + return_found_end, + return_next_end, + return_prior_end, + return_begin_end + }; + + template< class SinglePassRange, range_return_value > + struct range_return + { + typedef boost::iterator_range< + typename range_iterator::type > type; + + static type pack(typename range_iterator::type found, + SinglePassRange& rng) + { + return type(found, boost::end(rng)); + } + }; + + template< class SinglePassRange > + struct range_return< SinglePassRange, return_found > + { + typedef typename range_iterator::type type; + + static type pack(type found, SinglePassRange&) + { + return found; + } + }; + + template< class SinglePassRange > + struct range_return< SinglePassRange, return_next > + { + typedef typename range_iterator::type type; + + static type pack(type found, SinglePassRange& rng) + { + return found == boost::end(rng) + ? found + : boost::next(found); + } + }; + + template< class BidirectionalRange > + struct range_return< BidirectionalRange, return_prior > + { + typedef typename range_iterator::type type; + + static type pack(type found, BidirectionalRange& rng) + { + return found == boost::begin(rng) + ? found + : boost::prior(found); + } + }; + + template< class SinglePassRange > + struct range_return< SinglePassRange, return_begin_found > + { + typedef boost::iterator_range< + typename range_iterator::type > type; + + static type pack(typename range_iterator::type found, + SinglePassRange& rng) + { + return type(boost::begin(rng), found); + } + }; + + template< class SinglePassRange > + struct range_return< SinglePassRange, return_begin_next > + { + typedef boost::iterator_range< + typename range_iterator::type > type; + + static type pack(typename range_iterator::type found, + SinglePassRange& rng) + { + return type( boost::begin(rng), + found == boost::end(rng) ? found : boost::next(found) ); + } + }; + + template< class BidirectionalRange > + struct range_return< BidirectionalRange, return_begin_prior > + { + typedef boost::iterator_range< + typename range_iterator::type > type; + + static type pack(typename range_iterator::type found, + BidirectionalRange& rng) + { + return type( boost::begin(rng), + found == boost::begin(rng) ? found : boost::prior(found) ); + } + }; + + template< class SinglePassRange > + struct range_return< SinglePassRange, return_found_end > + { + typedef boost::iterator_range< + typename range_iterator::type > type; + + static type pack(typename range_iterator::type found, + SinglePassRange& rng) + { + return type(found, boost::end(rng)); + } + }; + + template< class SinglePassRange > + struct range_return< SinglePassRange, return_next_end > + { + typedef boost::iterator_range< + typename range_iterator::type > type; + + static type pack(typename range_iterator::type found, + SinglePassRange& rng) + { + return type( found == boost::end(rng) ? found : boost::next(found), + boost::end(rng) ); + } + }; + + template< class BidirectionalRange > + struct range_return< BidirectionalRange, return_prior_end > + { + typedef boost::iterator_range< + typename range_iterator::type > type; + + static type pack(typename range_iterator::type found, + BidirectionalRange& rng) + { + return type( found == boost::begin(rng) ? found : boost::prior(found), + boost::end(rng) ); + } + }; + + template< class SinglePassRange > + struct range_return< SinglePassRange, return_begin_end > + { + typedef boost::iterator_range< + typename range_iterator::type > type; + + static type pack(typename range_iterator::type found, + SinglePassRange& rng) + { + return type(boost::begin(rng), boost::end(rng)); + } + }; + +} +# 33 "../boost/range/algorithm.hpp" 2 + + + + + +# 1 "../boost/range/algorithm/adjacent_find.hpp" 1 +# 20 "../boost/range/algorithm/adjacent_find.hpp" +namespace boost +{ + namespace range + { + + + + + + + +template< typename ForwardRange > +inline typename range_iterator::type +adjacent_find(ForwardRange & rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check35; + return std::adjacent_find(boost::begin(rng),boost::end(rng)); +} + + +template< typename ForwardRange > +inline typename range_iterator::type +adjacent_find(const ForwardRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check44; + return std::adjacent_find(boost::begin(rng),boost::end(rng)); +} + + +template< typename ForwardRange, typename BinaryPredicate > +inline typename range_iterator::type +adjacent_find(ForwardRange & rng, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check53; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_::type, typename range_value::type>)>::failed> + + boost_concept_check56; + return std::adjacent_find(boost::begin(rng),boost::end(rng),pred); +} + + +template< typename ForwardRange, typename BinaryPredicate > +inline typename range_iterator::type +adjacent_find(const ForwardRange& rng, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check65; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_::type, typename range_value::type>)>::failed> + + boost_concept_check68; + return std::adjacent_find(boost::begin(rng),boost::end(rng),pred); +} + + + + +template< range_return_value re, typename ForwardRange > +inline typename range_return::type +adjacent_find(ForwardRange & rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check79; + return range_return:: + pack(std::adjacent_find(boost::begin(rng),boost::end(rng)), + rng); +} + + +template< range_return_value re, typename ForwardRange > +inline typename range_return::type +adjacent_find(const ForwardRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check90; + return range_return:: + pack(std::adjacent_find(boost::begin(rng),boost::end(rng)), + rng); +} + + +template< range_return_value re, typename ForwardRange, typename BinaryPredicate > +inline typename range_return::type +adjacent_find(ForwardRange& rng, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check101; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_::type, typename range_value::type>)>::failed> + + boost_concept_check104; + return range_return:: + pack(std::adjacent_find(boost::begin(rng),boost::end(rng),pred), + rng); +} + + +template< range_return_value re, typename ForwardRange, typename BinaryPredicate > +inline typename range_return::type +adjacent_find(const ForwardRange& rng, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check115; + return range_return:: + pack(std::adjacent_find(boost::begin(rng),boost::end(rng),pred), + rng); +} + + } + using range::adjacent_find; +} +# 39 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/count.hpp" 1 +# 19 "../boost/range/algorithm/count.hpp" +namespace boost +{ + namespace range + { + + + + + + +template< class SinglePassRange, class Value > +inline typename range_difference::type +count(SinglePassRange& rng, const Value& val) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check33; + return std::count(boost::begin(rng), boost::end(rng), val); +} + + +template< class SinglePassRange, class Value > +inline typename range_difference::type +count(const SinglePassRange& rng, const Value& val) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check42; + return std::count(boost::begin(rng), boost::end(rng), val); +} + + } + using range::count; +} +# 40 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/count_if.hpp" 1 +# 19 "../boost/range/algorithm/count_if.hpp" +namespace boost +{ + namespace range + { + + + + + + + +template< class SinglePassRange, class UnaryPredicate > +inline typename boost::range_difference::type +count_if(SinglePassRange& rng, UnaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check34; + return std::count_if(boost::begin(rng), boost::end(rng), pred); +} + + +template< class SinglePassRange, class UnaryPredicate > +inline typename boost::range_difference::type +count_if(const SinglePassRange& rng, UnaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check43; + return std::count_if(boost::begin(rng), boost::end(rng), pred); +} + + } + using range::count_if; +} +# 41 "../boost/range/algorithm.hpp" 2 + +# 1 "../boost/range/algorithm/for_each.hpp" 1 +# 24 "../boost/range/algorithm/for_each.hpp" +namespace boost +{ + namespace range + { +# 69 "../boost/range/algorithm/for_each.hpp" +template< class SinglePassRange, class UnaryFunction > +inline UnaryFunction for_each(SinglePassRange & rng, UnaryFunction fun) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check72; + + + + + + + + return std::for_each< + typename range_iterator::type, + UnaryFunction + >(boost::begin(rng),boost::end(rng),fun); + +} + + +template< class SinglePassRange, class UnaryFunction > +inline UnaryFunction for_each(const SinglePassRange& rng, UnaryFunction fun) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check91; + + + + + + + + return std::for_each< + typename range_iterator::type, + UnaryFunction + >(boost::begin(rng), boost::end(rng), fun); + +} + + } + using range::for_each; +} +# 43 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/find.hpp" 1 +# 19 "../boost/range/algorithm/find.hpp" +namespace boost +{ + namespace range + { + + + + + + +template< class SinglePassRange, class Value > +inline typename disable_if< + is_const, + typename range_iterator::type +>::type +find( SinglePassRange& rng, const Value& val ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check36; + return std::find(boost::begin(rng), boost::end(rng), val); +} + + +template< class SinglePassRange, class Value > +inline typename range_iterator::type +find( const SinglePassRange& rng, const Value& val ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check45; + return std::find(boost::begin(rng), boost::end(rng), val); +} + + + + +template< range_return_value re, class SinglePassRange, class Value > +inline typename disable_if< + is_const, + typename range_return::type +>::type +find( SinglePassRange& rng, const Value& val ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check59; + return range_return:: + pack(std::find(boost::begin(rng), boost::end(rng), val), + rng); +} + + +template< range_return_value re, class SinglePassRange, class Value > +inline typename range_return::type +find( const SinglePassRange& rng, const Value& val ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check70; + return range_return:: + pack(std::find(boost::begin(rng), boost::end(rng), val), + rng); +} + + } + using range::find; +} +# 44 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/find_end.hpp" 1 +# 19 "../boost/range/algorithm/find_end.hpp" +namespace boost +{ + namespace range + { +# 31 "../boost/range/algorithm/find_end.hpp" +template< class ForwardRange1, class ForwardRange2 > +inline typename disable_if< + is_const, + typename range_iterator< ForwardRange1 >::type +>::type +find_end(ForwardRange1 & rng1, const ForwardRange2& rng2) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check38; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check39; + + return std::find_end(boost::begin(rng1),boost::end(rng1), + boost::begin(rng2),boost::end(rng2)); +} + + +template< class ForwardRange1, class ForwardRange2 > +inline typename range_iterator< const ForwardRange1 >::type +find_end(const ForwardRange1 & rng1, const ForwardRange2& rng2) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check50; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check51; + + return std::find_end(boost::begin(rng1),boost::end(rng1), + boost::begin(rng2),boost::end(rng2)); +} + + +template< class ForwardRange1, class ForwardRange2, class BinaryPredicate > +inline typename disable_if< + is_const, + typename range_iterator::type +>::type +find_end(ForwardRange1 & rng1, const ForwardRange2& rng2, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check65; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check66; + + return std::find_end(boost::begin(rng1),boost::end(rng1), + boost::begin(rng2),boost::end(rng2),pred); +} + + +template< class ForwardRange1, class ForwardRange2, class BinaryPredicate > +inline typename range_iterator::type +find_end(const ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check77; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check78; + + return std::find_end(boost::begin(rng1),boost::end(rng1), + boost::begin(rng2),boost::end(rng2),pred); +} + + +template< range_return_value re, class ForwardRange1, class ForwardRange2 > +inline typename disable_if< + is_const, + typename range_return::type +>::type +find_end(ForwardRange1& rng1, const ForwardRange2& rng2) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check92; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check93; + + return range_return:: + pack(std::find_end(boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2)), + rng1); +} + + +template< range_return_value re, class ForwardRange1, class ForwardRange2 > +inline typename range_return::type +find_end(const ForwardRange1& rng1, const ForwardRange2& rng2) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check106; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check107; + + return range_return:: + pack(std::find_end(boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2)), + rng1); +} + + +template< range_return_value re, class ForwardRange1, class ForwardRange2, + class BinaryPredicate > +inline typename disable_if< + is_const, + typename range_return::type +>::type +find_end(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check124; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check125; + + return range_return:: + pack(std::find_end(boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2), pred), + rng1); +} + + +template< range_return_value re, class ForwardRange1, class ForwardRange2, + class BinaryPredicate > +inline typename range_return::type +find_end(const ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check139; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check140; + + return range_return:: + pack(std::find_end(boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2), pred), + rng1); +} + + } + using range::find_end; +} +# 45 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/find_first_of.hpp" 1 +# 19 "../boost/range/algorithm/find_first_of.hpp" +namespace boost +{ + namespace range + { +# 31 "../boost/range/algorithm/find_first_of.hpp" +template< class SinglePassRange1, class ForwardRange2 > +inline typename disable_if< + is_const, + typename range_iterator::type +>::type +find_first_of(SinglePassRange1 & rng1, ForwardRange2 const & rng2) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check38; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check39; + + return std::find_first_of(boost::begin(rng1),boost::end(rng1), + boost::begin(rng2),boost::end(rng2)); +} + + +template< class SinglePassRange1, class ForwardRange2 > +inline typename range_iterator::type +find_first_of(const SinglePassRange1& rng1, const ForwardRange2& rng2) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check50; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check51; + + return std::find_first_of(boost::begin(rng1),boost::end(rng1), + boost::begin(rng2),boost::end(rng2)); +} + + +template< class SinglePassRange1, class ForwardRange2, class BinaryPredicate > +inline typename disable_if< + is_const, + typename range_iterator::type +>::type +find_first_of(SinglePassRange1 & rng1, ForwardRange2 const & rng2, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check65; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check66; + + return std::find_first_of(boost::begin(rng1),boost::end(rng1), + boost::begin(rng2),boost::end(rng2),pred); +} + + +template< class SinglePassRange1, class ForwardRange2, class BinaryPredicate > +inline typename range_iterator::type +find_first_of(const SinglePassRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check77; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check78; + + return std::find_first_of(boost::begin(rng1),boost::end(rng1), + boost::begin(rng2),boost::end(rng2),pred); +} + + + +template< range_return_value re, class SinglePassRange1, class ForwardRange2 > +inline typename disable_if< + is_const, + typename range_return::type +>::type +find_first_of(SinglePassRange1& rng1, const ForwardRange2& rng2) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check93; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check94; + + return range_return:: + pack(std::find_first_of(boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2)), + rng1); +} + + +template< range_return_value re, class SinglePassRange1, class ForwardRange2 > +inline typename range_return::type +find_first_of(const SinglePassRange1& rng1, const ForwardRange2& rng2) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check107; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check108; + + return range_return:: + pack(std::find_first_of(boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2)), + rng1); +} + + +template< range_return_value re, class SinglePassRange1, class ForwardRange2, + class BinaryPredicate > +inline typename disable_if< + is_const, + typename range_return::type +>::type +find_first_of(SinglePassRange1 & rng1, const ForwardRange2& rng2, + BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check126; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check127; + + return range_return:: + pack(std::find_first_of(boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2), pred), + rng1); +} + + +template< range_return_value re, class SinglePassRange1, class ForwardRange2, + class BinaryPredicate > +inline typename range_return::type +find_first_of(const SinglePassRange1 & rng1, const ForwardRange2& rng2, + BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check142; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check143; + + return range_return:: + pack(std::find_first_of(boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2), pred), + rng1); +} + + } + using range::find_first_of; +} +# 46 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/find_if.hpp" 1 +# 19 "../boost/range/algorithm/find_if.hpp" +namespace boost +{ + namespace range + { + + + + + + + +template< class SinglePassRange, class UnaryPredicate > +inline typename disable_if< + is_const, + typename range_iterator::type +>::type +find_if( SinglePassRange& rng, UnaryPredicate pred ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check37; + return std::find_if(boost::begin(rng), boost::end(rng), pred); +} + + +template< class SinglePassRange, class UnaryPredicate > +inline typename range_iterator::type +find_if( const SinglePassRange& rng, UnaryPredicate pred ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check46; + return std::find_if(boost::begin(rng), boost::end(rng), pred); +} + + + + +template< range_return_value re, class SinglePassRange, class UnaryPredicate > +inline typename disable_if< + is_const, + typename range_return::type +>::type +find_if( SinglePassRange& rng, UnaryPredicate pred ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check60; + return range_return:: + pack(std::find_if(boost::begin(rng), boost::end(rng), pred), + rng); +} + + +template< range_return_value re, class SinglePassRange, class UnaryPredicate > +inline typename range_return::type +find_if( const SinglePassRange& rng, UnaryPredicate pred ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check71; + return range_return:: + pack(std::find_if(boost::begin(rng), boost::end(rng), pred), + rng); +} + + } + using range::find_if; +} +# 47 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/lexicographical_compare.hpp" 1 +# 18 "../boost/range/algorithm/lexicographical_compare.hpp" +namespace boost +{ + namespace range + { + + + + + + + +template +inline bool lexicographical_compare(const SinglePassRange1& rng1, + const SinglePassRange2& rng2) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check33; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check34; + return std::lexicographical_compare( + boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2)); +} + + +template +inline bool lexicographical_compare(const SinglePassRange1& rng1, + const SinglePassRange2& rng2, + BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check47; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check48; + return std::lexicographical_compare( + boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2), pred); +} + + } + using range::lexicographical_compare; +} +# 48 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/mismatch.hpp" 1 +# 19 "../boost/range/algorithm/mismatch.hpp" +namespace boost +{ + namespace range_detail + { + template< class SinglePassTraversalReadableIterator1, + class SinglePassTraversalReadableIterator2 > + inline std::pair + mismatch_impl(SinglePassTraversalReadableIterator1 first1, + SinglePassTraversalReadableIterator1 last1, + SinglePassTraversalReadableIterator2 first2, + SinglePassTraversalReadableIterator2 last2) + { + while (first1 != last1 && first2 != last2 && *first1 == *first2) + { + ++first1; + ++first2; + } + return std::pair(first1, first2); + } + + template< class SinglePassTraversalReadableIterator1, + class SinglePassTraversalReadableIterator2, + class BinaryPredicate > + inline std::pair + mismatch_impl(SinglePassTraversalReadableIterator1 first1, + SinglePassTraversalReadableIterator1 last1, + SinglePassTraversalReadableIterator2 first2, + SinglePassTraversalReadableIterator2 last2, + BinaryPredicate pred) + { + while (first1 != last1 && first2 != last2 && pred(*first1, *first2)) + { + ++first1; + ++first2; + } + return std::pair(first1, first2); + } + } + + namespace range + { + + + + + + + +template< class SinglePassRange1, class SinglePassRange2 > +inline std::pair< + typename range_iterator::type, + typename range_iterator::type > +mismatch(SinglePassRange1& rng1, const SinglePassRange2 & rng2) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check77; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check78; + + return ::boost::range_detail::mismatch_impl( + ::boost::begin(rng1), ::boost::end(rng1), + ::boost::begin(rng2), ::boost::end(rng2)); +} + + +template< class SinglePassRange1, class SinglePassRange2 > +inline std::pair< + typename range_iterator::type, + typename range_iterator::type > +mismatch(const SinglePassRange1& rng1, const SinglePassRange2& rng2) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check92; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check93; + + return ::boost::range_detail::mismatch_impl( + ::boost::begin(rng1), ::boost::end(rng1), + ::boost::begin(rng2), ::boost::end(rng2)); +} + + +template< class SinglePassRange1, class SinglePassRange2 > +inline std::pair< + typename range_iterator::type, + typename range_iterator::type > +mismatch(SinglePassRange1& rng1, SinglePassRange2 & rng2) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check107; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check108; + + return ::boost::range_detail::mismatch_impl( + ::boost::begin(rng1), ::boost::end(rng1), + ::boost::begin(rng2), ::boost::end(rng2)); +} + + +template< class SinglePassRange1, class SinglePassRange2 > +inline std::pair< + typename range_iterator::type, + typename range_iterator::type > +mismatch(const SinglePassRange1& rng1, SinglePassRange2& rng2) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check122; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check123; + + return ::boost::range_detail::mismatch_impl( + ::boost::begin(rng1), ::boost::end(rng1), + ::boost::begin(rng2), ::boost::end(rng2)); +} + + + +template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate > +inline std::pair< + typename range_iterator::type, + typename range_iterator::type > +mismatch(SinglePassRange1& rng1, const SinglePassRange2& rng2, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check138; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check139; + + return ::boost::range_detail::mismatch_impl( + ::boost::begin(rng1), ::boost::end(rng1), + ::boost::begin(rng2), ::boost::end(rng2), pred); +} + + +template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate > +inline std::pair< + typename range_iterator::type, + typename range_iterator::type > +mismatch(const SinglePassRange1& rng1, const SinglePassRange2& rng2, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check153; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check154; + + return ::boost::range_detail::mismatch_impl( + ::boost::begin(rng1), ::boost::end(rng1), + ::boost::begin(rng2), ::boost::end(rng2), pred); +} + + +template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate > +inline std::pair< + typename range_iterator::type, + typename range_iterator::type > +mismatch(SinglePassRange1& rng1, SinglePassRange2& rng2, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check168; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check169; + + return ::boost::range_detail::mismatch_impl( + ::boost::begin(rng1), ::boost::end(rng1), + ::boost::begin(rng2), ::boost::end(rng2), pred); +} + + +template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate > +inline std::pair< + typename range_iterator::type, + typename range_iterator::type > +mismatch(const SinglePassRange1& rng1, SinglePassRange2& rng2, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check183; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check184; + + return ::boost::range_detail::mismatch_impl( + ::boost::begin(rng1), ::boost::end(rng1), + ::boost::begin(rng2), ::boost::end(rng2), pred); +} + + } + using range::mismatch; +} +# 49 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/search.hpp" 1 +# 19 "../boost/range/algorithm/search.hpp" +namespace boost +{ + namespace range + { +# 31 "../boost/range/algorithm/search.hpp" +template< class ForwardRange1, class ForwardRange2 > +inline typename range_iterator::type +search(ForwardRange1& rng1, const ForwardRange2& rng2) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check35; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check36; + return std::search(boost::begin(rng1),boost::end(rng1), + boost::begin(rng2),boost::end(rng2)); +} + + +template< class ForwardRange1, class ForwardRange2 > +inline typename range_iterator::type +search(const ForwardRange1& rng1, const ForwardRange2& rng2) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check46; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check47; + return std::search(boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2)); +} + + +template< class ForwardRange1, class ForwardRange2, class BinaryPredicate > +inline typename range_iterator::type +search(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check57; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check58; + return std::search(boost::begin(rng1),boost::end(rng1), + boost::begin(rng2),boost::end(rng2),pred); +} + + +template< class ForwardRange1, class ForwardRange2, class BinaryPredicate > +inline typename range_iterator::type +search(const ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check68; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check69; + return std::search(boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2), pred); +} + + + + +template< range_return_value re, class ForwardRange1, class ForwardRange2 > +inline typename range_return::type +search(ForwardRange1& rng1, const ForwardRange2& rng2) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check81; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check82; + return range_return:: + pack(std::search(boost::begin(rng1),boost::end(rng1), + boost::begin(rng2),boost::end(rng2)), + rng1); +} + + +template< range_return_value re, class ForwardRange1, class ForwardRange2 > +inline typename range_return::type +search(const ForwardRange1& rng1, const ForwardRange2& rng2) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check94; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check95; + return range_return:: + pack(std::search(boost::begin(rng1),boost::end(rng1), + boost::begin(rng2),boost::end(rng2)), + rng1); +} + + +template< range_return_value re, class ForwardRange1, class ForwardRange2, + class BinaryPredicate > +inline typename range_return::type +search(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check108; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check109; + return range_return:: + pack(std::search(boost::begin(rng1),boost::end(rng1), + boost::begin(rng2),boost::end(rng2),pred), + rng1); +} + + +template< range_return_value re, class ForwardRange1, class ForwardRange2, + class BinaryPredicate > +inline typename range_return::type +search(const ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check122; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check123; + return range_return:: + pack(std::search(boost::begin(rng1),boost::end(rng1), + boost::begin(rng2),boost::end(rng2),pred), + rng1); +} + + } + using range::search; +} +# 50 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/search_n.hpp" 1 +# 21 "../boost/range/algorithm/search_n.hpp" +namespace boost +{ + namespace range + { + +namespace range_detail +{ + + + + + + template + inline ForwardIterator + search_n_impl(ForwardIterator first, ForwardIterator last, Integer count, + const Value& value, std::forward_iterator_tag) + { + first = std::find(first, last, value); + while (first != last) + { + typename std::iterator_traits::difference_type n = count; + ForwardIterator i = first; + ++i; + while (i != last && n != 1 && *i==value) + { + ++i; + --n; + } + if (n == 1) + return first; + if (i == last) + return last; + first = std::find(++i, last, value); + } + return last; + } + + + template + inline RandomAccessIterator + search_n_impl(RandomAccessIterator first, RandomAccessIterator last, + Integer count, const Value& value, + std::random_access_iterator_tag) + { + typedef typename std::iterator_traits::difference_type difference_t; + + difference_t tail_size = last - first; + const difference_t pattern_size = count; + + if (tail_size < pattern_size) + return last; + + const difference_t skip_offset = pattern_size - 1; + RandomAccessIterator look_ahead = first + skip_offset; + tail_size -= pattern_size; + + while (1) + { + + + while (!(*look_ahead == value)) + { + if (tail_size < pattern_size) + return last; + look_ahead += pattern_size; + tail_size -= pattern_size; + } + difference_t remainder = skip_offset; + for (RandomAccessIterator back_track = look_ahead - 1; + *back_track == value; --back_track) + { + if (--remainder == 0) + { + return look_ahead - skip_offset; + } + } + if (remainder > tail_size) + return last; + look_ahead += remainder; + tail_size -= remainder; + } + + return last; + } + + + + template + inline ForwardIterator + search_n_pred_impl(ForwardIterator first, ForwardIterator last, + Integer count, const Value& value, + BinaryPredicate pred, std::forward_iterator_tag) + { + typedef typename std::iterator_traits::difference_type difference_t; + + while (first != last && !static_cast(pred(*first, value))) + ++first; + + while (first != last) + { + difference_t n = count; + ForwardIterator i = first; + ++i; + while (i != last && n != 1 && static_cast(pred(*i, value))) + { + ++i; + --n; + } + if (n == 1) + return first; + if (i == last) + return last; + first = ++i; + while (first != last && !static_cast(pred(*first, value))) + ++first; + } + return last; + } + + + + template + inline RandomAccessIterator + search_n_pred_impl(RandomAccessIterator first, RandomAccessIterator last, + Integer count, const Value& value, + BinaryPredicate pred, std::random_access_iterator_tag) + { + typedef typename std::iterator_traits::difference_type difference_t; + + difference_t tail_size = last - first; + const difference_t pattern_size = count; + + if (tail_size < pattern_size) + return last; + + const difference_t skip_offset = pattern_size - 1; + RandomAccessIterator look_ahead = first + skip_offset; + tail_size -= pattern_size; + + while (1) + { + + + while (!static_cast(pred(*look_ahead, value))) + { + if (tail_size < pattern_size) + return last; + look_ahead += pattern_size; + tail_size -= pattern_size; + } + difference_t remainder = skip_offset; + for (RandomAccessIterator back_track = look_ahead - 1; + pred(*back_track, value); --back_track) + { + if (--remainder == 0) + return look_ahead -= skip_offset; + } + if (remainder > tail_size) + { + return last; + } + look_ahead += remainder; + tail_size -= remainder; + } + } + + template + inline ForwardIterator + search_n_impl(ForwardIterator first, ForwardIterator last, + Integer count, const Value& value) + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check194; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check195; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_::value_type>)>::failed> boost_concept_check196; + + + typedef typename std::iterator_traits::iterator_category cat_t; + + if (count <= 0) + return first; + if (count == 1) + return std::find(first, last, value); + return range_detail::search_n_impl(first, last, count, value, cat_t()); + } + + template + inline ForwardIterator + search_n_pred_impl(ForwardIterator first, ForwardIterator last, + Integer count, const Value& value, + BinaryPredicate pred) + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check215; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_::value_type, Value> )>::failed> + + + + + boost_concept_check221; + + typedef typename std::iterator_traits::iterator_category cat_t; + + if (count <= 0) + return first; + if (count == 1) + { + while (first != last && !static_cast(pred(*first, value))) + ++first; + return first; + } + return range_detail::search_n_pred_impl(first, last, count, + value, pred, cat_t()); + } +} +# 247 "../boost/range/algorithm/search_n.hpp" +template< class ForwardRange, class Integer, class Value > +inline typename range_iterator::type +search_n(ForwardRange& rng, Integer count, const Value& value) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check251; + return range_detail::search_n_impl(boost::begin(rng),boost::end(rng), count, value); +} + + +template< class ForwardRange, class Integer, class Value > +inline typename range_iterator::type +search_n(const ForwardRange& rng, Integer count, const Value& value) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check260; + return range_detail::search_n_impl(boost::begin(rng), boost::end(rng), count, value); +} + + +template< class ForwardRange, class Integer, class Value, + class BinaryPredicate > +inline typename range_iterator::type +search_n(ForwardRange& rng, Integer count, const Value& value, + BinaryPredicate binary_pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check271; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_::type, const Value&>)>::failed> + boost_concept_check273; + return range_detail::search_n_pred_impl(boost::begin(rng), boost::end(rng), + count, value, binary_pred); +} + + +template< class ForwardRange, class Integer, class Value, + class BinaryPredicate > +inline typename range_iterator::type +search_n(const ForwardRange& rng, Integer count, const Value& value, + BinaryPredicate binary_pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check285; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_::type, const Value&>)>::failed> + boost_concept_check287; + return range_detail::search_n_pred_impl(boost::begin(rng), boost::end(rng), + count, value, binary_pred); +} + + + + +template< range_return_value re, class ForwardRange, class Integer, + class Value > +inline typename range_return::type +search_n(ForwardRange& rng, Integer count, const Value& value) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check300; + return range_return:: + pack(range_detail::search_n_impl(boost::begin(rng),boost::end(rng), + count, value), + rng); +} + + +template< range_return_value re, class ForwardRange, class Integer, + class Value > +inline typename range_return::type +search_n(const ForwardRange& rng, Integer count, const Value& value) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check313; + return range_return:: + pack(range_detail::search_n_impl(boost::begin(rng), boost::end(rng), + count, value), + rng); +} + + +template< range_return_value re, class ForwardRange, class Integer, + class Value, class BinaryPredicate > +inline typename range_return::type +search_n(ForwardRange& rng, Integer count, const Value& value, + BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check327; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_::type, const Value&>)>::failed> + + boost_concept_check330; + return range_return:: + pack(range_detail::search_n_pred_impl(boost::begin(rng), + boost::end(rng), + count, value, pred), + rng); +} + + +template< range_return_value re, class ForwardRange, class Integer, + class Value, class BinaryPredicate > +inline typename range_return::type +search_n(const ForwardRange& rng, Integer count, const Value& value, + BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check345; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_::type, const Value&>)>::failed> + + boost_concept_check348; + return range_return:: + pack(range_detail::search_n_pred_impl(boost::begin(rng), + boost::end(rng), + count, value, pred), + rng); +} + + } + using range::search_n; +} +# 51 "../boost/range/algorithm.hpp" 2 + + +# 1 "../boost/range/algorithm/copy.hpp" 1 +# 19 "../boost/range/algorithm/copy.hpp" +namespace boost +{ + namespace range + { + + + + + + + +template< class SinglePassRange, class OutputIterator > +inline OutputIterator copy(const SinglePassRange& rng, OutputIterator out) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check33; + return std::copy(boost::begin(rng),boost::end(rng),out); +} + + } + using range::copy; +} +# 54 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/copy_backward.hpp" 1 +# 18 "../boost/range/algorithm/copy_backward.hpp" +namespace boost +{ + namespace range + { +# 30 "../boost/range/algorithm/copy_backward.hpp" +template< class BidirectionalRange, class BidirectionalTraversalWriteableIterator > +inline BidirectionalTraversalWriteableIterator +copy_backward(const BidirectionalRange& rng, + BidirectionalTraversalWriteableIterator out) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check35; + return std::copy_backward(boost::begin(rng), boost::end(rng), out); +} + + } + using range::copy_backward; +} +# 55 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/fill.hpp" 1 +# 18 "../boost/range/algorithm/fill.hpp" +namespace boost +{ + namespace range + { + + + + + + +template< class ForwardRange, class Value > +inline ForwardRange& fill(ForwardRange& rng, const Value& val) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check31; + std::fill(boost::begin(rng), boost::end(rng), val); + return rng; +} + + +template< class ForwardRange, class Value > +inline const ForwardRange& fill(const ForwardRange& rng, const Value& val) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check40; + std::fill(boost::begin(rng), boost::end(rng), val); + return rng; +} + + } + using range::fill; +} +# 56 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/fill_n.hpp" 1 +# 12 "../boost/range/algorithm/fill_n.hpp" +# 1 "../boost/assert.hpp" 1 +# 50 "../boost/assert.hpp" +# 1 "/usr/include/assert.h" 1 3 4 +# 51 "../boost/assert.hpp" 2 +# 13 "../boost/range/algorithm/fill_n.hpp" 2 + + + + + + +namespace boost +{ + namespace range + { + + + + + + + +template< class ForwardRange, class Size, class Value > +inline ForwardRange& fill_n(ForwardRange& rng, Size n, const Value& val) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check33; + (static_cast (0)); + std::fill_n(boost::begin(rng), n, val); + return rng; +} + + +template< class ForwardRange, class Size, class Value > +inline const ForwardRange& fill_n(const ForwardRange& rng, Size n, const Value& val) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check43; + (static_cast (0)); + std::fill_n(boost::begin(rng), n, val); + return rng; +} + + } + using range::fill_n; +} +# 57 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/generate.hpp" 1 +# 18 "../boost/range/algorithm/generate.hpp" +namespace boost +{ + namespace range + { + + + + + + +template< class ForwardRange, class Generator > +inline ForwardRange& generate( ForwardRange& rng, Generator gen ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check31; + std::generate(boost::begin(rng), boost::end(rng), gen); + return rng; +} + + +template< class ForwardRange, class Generator > +inline const ForwardRange& generate( const ForwardRange& rng, Generator gen ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check40; + std::generate(boost::begin(rng), boost::end(rng), gen); + return rng; +} + + } + using range::generate; +} +# 58 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/inplace_merge.hpp" 1 +# 18 "../boost/range/algorithm/inplace_merge.hpp" +namespace boost +{ + namespace range + { + + + + + + + +template +inline BidirectionalRange& inplace_merge(BidirectionalRange& rng, + typename range_iterator::type middle) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check33; + std::inplace_merge(boost::begin(rng), middle, boost::end(rng)); + return rng; +} + + +template +inline const BidirectionalRange& inplace_merge(const BidirectionalRange& rng, + typename boost::range_iterator::type middle) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check43; + std::inplace_merge(boost::begin(rng), middle, boost::end(rng)); + return rng; +} + + +template +inline BidirectionalRange& inplace_merge(BidirectionalRange& rng, + typename boost::range_iterator::type middle, + BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check54; + std::inplace_merge(boost::begin(rng), middle, boost::end(rng), pred); + return rng; +} + + +template +inline const BidirectionalRange& inplace_merge(const BidirectionalRange& rng, + typename boost::range_iterator::type middle, + BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check65; + std::inplace_merge(boost::begin(rng), middle, boost::end(rng), pred); + return rng; +} + + } + using range::inplace_merge; +} +# 59 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/merge.hpp" 1 +# 18 "../boost/range/algorithm/merge.hpp" +namespace boost +{ + namespace range + { +# 31 "../boost/range/algorithm/merge.hpp" +template +inline OutputIterator merge(const SinglePassRange1& rng1, + const SinglePassRange2& rng2, + OutputIterator out) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check37; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check38; + return std::merge(boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2), out); +} + + +template +inline OutputIterator merge(const SinglePassRange1& rng1, + const SinglePassRange2& rng2, + OutputIterator out, + BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check51; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check52; + return std::merge(boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2), out, pred); +} + + } + using range::merge; +} +# 60 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/nth_element.hpp" 1 +# 18 "../boost/range/algorithm/nth_element.hpp" +namespace boost +{ + namespace range + { + + + + + + + +template +inline RandomAccessRange& nth_element(RandomAccessRange& rng, + typename range_iterator::type nth) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check33; + std::nth_element(boost::begin(rng), nth, boost::end(rng)); + return rng; +} + + +template +inline const RandomAccessRange& nth_element(const RandomAccessRange& rng, + typename range_iterator::type nth) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check43; + std::nth_element(boost::begin(rng), nth, boost::end(rng)); + return rng; +} + + +template +inline RandomAccessRange& nth_element(RandomAccessRange& rng, + typename range_iterator::type nth, + BinaryPredicate sort_pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check54; + std::nth_element(boost::begin(rng), nth, boost::end(rng), sort_pred); + return rng; +} + + +template +inline const RandomAccessRange& nth_element(const RandomAccessRange& rng, + typename range_iterator::type nth, + BinaryPredicate sort_pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check65; + std::nth_element(boost::begin(rng), nth, boost::end(rng), sort_pred); + return rng; +} + + } + using range::nth_element; +} +# 61 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/partial_sort.hpp" 1 +# 18 "../boost/range/algorithm/partial_sort.hpp" +namespace boost +{ + namespace range + { + + + + + + + +template +inline RandomAccessRange& partial_sort(RandomAccessRange& rng, + typename range_iterator::type middle) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check33; + std::partial_sort(boost::begin(rng), middle, boost::end(rng)); + return rng; +} + + +template +inline const RandomAccessRange& partial_sort(const RandomAccessRange& rng, + typename range_iterator::type middle) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check43; + std::partial_sort(boost::begin(rng), middle, boost::end(rng)); + return rng; +} + + +template +inline RandomAccessRange& partial_sort(RandomAccessRange& rng, + typename range_iterator::type middle, + BinaryPredicate sort_pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check54; + std::partial_sort(boost::begin(rng), middle, boost::end(rng), + sort_pred); + return rng; +} + + +template +inline const RandomAccessRange& partial_sort(const RandomAccessRange& rng, + typename range_iterator::type middle, + BinaryPredicate sort_pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check66; + std::partial_sort(boost::begin(rng), middle, boost::end(rng), + sort_pred); + return rng; +} + + } + using range::partial_sort; +} +# 62 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/partial_sort_copy.hpp" 1 +# 19 "../boost/range/algorithm/partial_sort_copy.hpp" +namespace boost +{ + namespace range + { +# 31 "../boost/range/algorithm/partial_sort_copy.hpp" +template +inline typename range_iterator::type +partial_sort_copy(const SinglePassRange& rng1, RandomAccessRange& rng2) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check35; + + return std::partial_sort_copy(boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2)); +} + + +template +inline typename range_iterator::type +partial_sort_copy(const SinglePassRange& rng1, const RandomAccessRange& rng2) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check46; + + return std::partial_sort_copy(boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2)); +} + + +template +inline typename range_iterator::type +partial_sort_copy(const SinglePassRange& rng1, RandomAccessRange& rng2, + BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check59; + + return std::partial_sort_copy(boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2), pred); +} + + +template +inline typename range_iterator::type +partial_sort_copy(const SinglePassRange& rng1, const RandomAccessRange& rng2, + BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_)>::failed> boost_concept_check72; + + return std::partial_sort_copy(boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2), pred); +} + + } + using range::partial_sort_copy; +} +# 63 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/partition.hpp" 1 +# 19 "../boost/range/algorithm/partition.hpp" +namespace boost +{ + namespace range + { + + + + + + +template +inline typename range_iterator::type +partition(ForwardRange& rng, UnaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check33; + return std::partition(boost::begin(rng),boost::end(rng),pred); +} + + +template +inline typename range_iterator::type +partition(const ForwardRange& rng, UnaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check42; + return std::partition(boost::begin(rng),boost::end(rng),pred); +} + + + + +template< range_return_value re, class ForwardRange, + class UnaryPredicate > +inline typename range_return::type +partition(ForwardRange& rng, UnaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check54; + return boost::range_return:: + pack(std::partition(boost::begin(rng), boost::end(rng), pred), rng); +} + + +template< range_return_value re, class ForwardRange, + class UnaryPredicate > +inline typename range_return::type +partition(const ForwardRange& rng, UnaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check65; + return boost::range_return:: + pack(std::partition(boost::begin(rng), boost::end(rng), pred), rng); +} + + } + using range::partition; +} +# 64 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/random_shuffle.hpp" 1 +# 18 "../boost/range/algorithm/random_shuffle.hpp" +namespace boost +{ + namespace range + { + + + + + + + +template +inline RandomAccessRange& random_shuffle(RandomAccessRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check32; + std::random_shuffle(boost::begin(rng), boost::end(rng)); + return rng; +} + + +template +inline const RandomAccessRange& random_shuffle(const RandomAccessRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check41; + std::random_shuffle(boost::begin(rng), boost::end(rng)); + return rng; +} + + +template +inline RandomAccessRange& random_shuffle(RandomAccessRange& rng, Generator& gen) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check50; + std::random_shuffle(boost::begin(rng), boost::end(rng), gen); + return rng; +} + + +template +inline const RandomAccessRange& random_shuffle(const RandomAccessRange& rng, Generator& gen) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check59; + std::random_shuffle(boost::begin(rng), boost::end(rng), gen); + return rng; +} + + } + using range::random_shuffle; +} +# 65 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/remove.hpp" 1 +# 19 "../boost/range/algorithm/remove.hpp" +namespace boost +{ + namespace range + { + + + + + + +template< class ForwardRange, class Value > +inline typename range_iterator::type +remove(ForwardRange& rng, const Value& val) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check33; + return std::remove(boost::begin(rng),boost::end(rng),val); +} + + +template< class ForwardRange, class Value > +inline typename range_iterator::type +remove(const ForwardRange& rng, const Value& val) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check42; + return std::remove(boost::begin(rng),boost::end(rng),val); +} + + + + +template< range_return_value re, class ForwardRange, class Value > +inline typename range_return::type +remove(ForwardRange& rng, const Value& val) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check53; + return range_return::pack( + std::remove(boost::begin(rng), boost::end(rng), val), + rng); +} + + +template< range_return_value re, class ForwardRange, class Value > +inline typename range_return::type +remove(const ForwardRange& rng, const Value& val) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check64; + return range_return::pack( + std::remove(boost::begin(rng), boost::end(rng), val), + rng); +} + + } + using range::remove; +} +# 66 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/remove_copy.hpp" 1 +# 18 "../boost/range/algorithm/remove_copy.hpp" +namespace boost +{ + namespace range + { +# 32 "../boost/range/algorithm/remove_copy.hpp" +template< class SinglePassRange, class OutputIterator, class Value > +inline OutputIterator +remove_copy(const SinglePassRange& rng, OutputIterator out_it, const Value& val) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check36; + return std::remove_copy(boost::begin(rng), boost::end(rng), out_it, val); +} + + } + using range::remove_copy; +} +# 67 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/remove_copy_if.hpp" 1 +# 18 "../boost/range/algorithm/remove_copy_if.hpp" +namespace boost +{ +# 29 "../boost/range/algorithm/remove_copy_if.hpp" + template< class SinglePassRange, class OutputIterator, class Predicate > + inline OutputIterator + remove_copy_if(const SinglePassRange& rng, OutputIterator out_it, Predicate pred) + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check33; + return std::remove_copy_if(boost::begin(rng), boost::end(rng), out_it, pred); + } +} +# 68 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/remove_if.hpp" 1 +# 19 "../boost/range/algorithm/remove_if.hpp" +namespace boost +{ + namespace range + { + + + + + + + +template< class ForwardRange, class UnaryPredicate > +inline typename boost::range_iterator::type +remove_if(ForwardRange& rng, UnaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check34; + return std::remove_if(boost::begin(rng), boost::end(rng), pred); +} + + +template< class ForwardRange, class UnaryPredicate > +inline typename boost::range_iterator::type +remove_if(const ForwardRange& rng, UnaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check43; + return std::remove_if(boost::begin(rng), boost::end(rng), pred); +} + + + + +template< range_return_value re, class ForwardRange, class UnaryPredicate > +inline typename range_return::type +remove_if(ForwardRange& rng, UnaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check54; + return range_return::pack( + std::remove_if(boost::begin(rng), boost::end(rng), pred), + rng); +} + + +template< range_return_value re, class ForwardRange, class UnaryPredicate > +inline typename range_return::type +remove_if(const ForwardRange& rng, UnaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check65; + return range_return::pack( + std::remove_if(boost::begin(rng), boost::end(rng), pred), + rng); +} + + } + using range::remove_if; +} +# 69 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/replace.hpp" 1 +# 18 "../boost/range/algorithm/replace.hpp" +namespace boost +{ + namespace range + { + + + + + + +template< class ForwardRange, class Value > +inline ForwardRange& +replace(ForwardRange& rng, const Value& what, + const Value& with_what) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check33; + std::replace(boost::begin(rng), boost::end(rng), what, with_what); + return rng; +} + + +template< class ForwardRange, class Value > +inline const ForwardRange& +replace(const ForwardRange& rng, const Value& what, + const Value& with_what) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check44; + std::replace(boost::begin(rng), boost::end(rng), what, with_what); + return rng; +} + + } + using range::replace; +} +# 70 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/replace_copy.hpp" 1 +# 18 "../boost/range/algorithm/replace_copy.hpp" +namespace boost +{ + namespace range + { + + + + + + +template< class ForwardRange, class OutputIterator, class Value > +inline OutputIterator +replace_copy(const ForwardRange& rng, OutputIterator out_it, const Value& what, + const Value& with_what) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check33; + return std::replace_copy(boost::begin(rng), boost::end(rng), out_it, + what, with_what); +} + + } + using range::replace_copy; +} +# 71 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/replace_copy_if.hpp" 1 +# 18 "../boost/range/algorithm/replace_copy_if.hpp" +namespace boost +{ + namespace range + { +# 32 "../boost/range/algorithm/replace_copy_if.hpp" +template< class ForwardRange, class OutputIterator, class Predicate, class Value > +inline OutputIterator +replace_copy_if(const ForwardRange& rng, OutputIterator out_it, Predicate pred, + const Value& with_what) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check37; + return std::replace_copy_if(boost::begin(rng), boost::end(rng), out_it, + pred, with_what); +} + + } + using range::replace_copy_if; +} +# 72 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/replace_if.hpp" 1 +# 18 "../boost/range/algorithm/replace_if.hpp" +namespace boost +{ + namespace range + { + + + + + + + +template< class ForwardRange, class UnaryPredicate, class Value > +inline ForwardRange& + replace_if(ForwardRange& rng, UnaryPredicate pred, + const Value& val) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check34; + std::replace_if(boost::begin(rng), boost::end(rng), pred, val); + return rng; +} + + +template< class ForwardRange, class UnaryPredicate, class Value > +inline const ForwardRange& + replace_if(const ForwardRange& rng, UnaryPredicate pred, + const Value& val) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check45; + std::replace_if(boost::begin(rng), boost::end(rng), pred, val); + return rng; +} + + } + using range::replace_if; +} +# 73 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/reverse.hpp" 1 +# 19 "../boost/range/algorithm/reverse.hpp" +namespace boost +{ + namespace range + { + + + + + + +template +inline BidirectionalRange& reverse(BidirectionalRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check32; + std::reverse(boost::begin(rng), boost::end(rng)); + return rng; +} + + +template +inline const BidirectionalRange& reverse(const BidirectionalRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check41; + std::reverse(boost::begin(rng), boost::end(rng)); + return rng; +} + + } + using range::reverse; +} +# 74 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/reverse_copy.hpp" 1 +# 19 "../boost/range/algorithm/reverse_copy.hpp" +namespace boost +{ + namespace range + { + + + + + + +template +inline OutputIterator reverse_copy(const BidirectionalRange& rng, OutputIterator out) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check32; + return std::reverse_copy(boost::begin(rng), boost::end(rng), out); +} + + } + using range::reverse_copy; +} +# 75 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/rotate.hpp" 1 +# 18 "../boost/range/algorithm/rotate.hpp" +namespace boost +{ + namespace range + { + + + + + + +template +inline ForwardRange& rotate(ForwardRange& rng, + typename range_iterator::type middle) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check32; + std::rotate(boost::begin(rng), middle, boost::end(rng)); + return rng; +} + + +template +inline const ForwardRange& rotate(const ForwardRange& rng, + typename range_iterator::type middle) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check42; + std::rotate(boost::begin(rng), middle, boost::end(rng)); + return rng; +} + + } + using range::rotate; +} +# 76 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/rotate_copy.hpp" 1 +# 19 "../boost/range/algorithm/rotate_copy.hpp" +namespace boost +{ + namespace range + { + + + + + + + template + inline OutputIterator rotate_copy( + const ForwardRange& rng, + typename range_iterator::type middle, + OutputIterator target + ) + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check36; + return std::rotate_copy(boost::begin(rng), middle, boost::end(rng), target); + } + + } + using range::rotate_copy; +} +# 77 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/sort.hpp" 1 +# 18 "../boost/range/algorithm/sort.hpp" +namespace boost +{ + namespace range + { + + + + + + + +template +inline RandomAccessRange& sort(RandomAccessRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check32; + std::sort(boost::begin(rng), boost::end(rng)); + return rng; +} + + +template +inline const RandomAccessRange& sort(const RandomAccessRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check41; + std::sort(boost::begin(rng), boost::end(rng)); + return rng; +} + + +template +inline RandomAccessRange& sort(RandomAccessRange& rng, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check50; + std::sort(boost::begin(rng), boost::end(rng), pred); + return rng; +} + + +template +inline const RandomAccessRange& sort(const RandomAccessRange& rng, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check59; + std::sort(boost::begin(rng), boost::end(rng), pred); + return rng; +} + + } + using range::sort; +} +# 78 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/stable_partition.hpp" 1 +# 19 "../boost/range/algorithm/stable_partition.hpp" +namespace boost +{ + namespace range + { + + + + + + + +template +inline typename range_iterator::type +stable_partition(BidirectionalRange& rng, UnaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check34; + return std::stable_partition(boost::begin(rng), boost::end(rng), pred); +} + + +template +inline typename range_iterator::type +stable_partition(const BidirectionalRange& rng, UnaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check43; + return std::stable_partition(boost::begin(rng),boost::end(rng),pred); +} + + +template +inline typename range_return::type +stable_partition(BidirectionalRange& rng, UnaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check52; + return range_return::pack( + std::stable_partition(boost::begin(rng), boost::end(rng), pred), + rng); +} + + +template +inline typename range_return::type +stable_partition(const BidirectionalRange& rng, UnaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check63; + return range_return::pack( + std::stable_partition(boost::begin(rng),boost::end(rng),pred), + rng); +} + + } + using range::stable_partition; +} +# 79 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/stable_sort.hpp" 1 +# 18 "../boost/range/algorithm/stable_sort.hpp" +namespace boost +{ + namespace range + { + + + + + + + +template +inline RandomAccessRange& stable_sort(RandomAccessRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check32; + std::stable_sort(boost::begin(rng), boost::end(rng)); + return rng; +} + + +template +inline const RandomAccessRange& stable_sort(const RandomAccessRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check41; + std::stable_sort(boost::begin(rng), boost::end(rng)); + return rng; +} + + +template +inline RandomAccessRange& stable_sort(RandomAccessRange& rng, BinaryPredicate sort_pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check50; + std::stable_sort(boost::begin(rng), boost::end(rng), sort_pred); + return rng; +} + + +template +inline const RandomAccessRange& stable_sort(const RandomAccessRange& rng, BinaryPredicate sort_pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check59; + std::stable_sort(boost::begin(rng), boost::end(rng), sort_pred); + return rng; +} + + } + using range::stable_sort; +} +# 80 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/transform.hpp" 1 +# 12 "../boost/range/algorithm/transform.hpp" +# 1 "../boost/assert.hpp" 1 +# 50 "../boost/assert.hpp" +# 1 "/usr/include/assert.h" 1 3 4 +# 51 "../boost/assert.hpp" 2 +# 13 "../boost/range/algorithm/transform.hpp" 2 + + + + + + +namespace boost +{ + namespace range + { +# 33 "../boost/range/algorithm/transform.hpp" + template< class SinglePassRange1, + class OutputIterator, + class UnaryOperation > + inline OutputIterator + transform(const SinglePassRange1& rng, + OutputIterator out, + UnaryOperation fun) + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check41; + return std::transform(boost::begin(rng),boost::end(rng),out,fun); + } + + } + + namespace range_detail + { + template< class SinglePassTraversalReadableIterator1, + class SinglePassTraversalReadableIterator2, + class OutputIterator, + class BinaryFunction > + inline OutputIterator + transform_impl(SinglePassTraversalReadableIterator1 first1, + SinglePassTraversalReadableIterator1 last1, + SinglePassTraversalReadableIterator2 first2, + SinglePassTraversalReadableIterator2 last2, + OutputIterator out, + BinaryFunction fn) + { + for (; first1 != last1; ++first1, ++first2) + { + (static_cast (0)); + *out = fn(*first1, *first2); + ++out; + } + return out; + } + } + + namespace range + { + + + template< class SinglePassRange1, + class SinglePassRange2, + class OutputIterator, + class BinaryOperation > + inline OutputIterator + transform(const SinglePassRange1& rng1, + const SinglePassRange2& rng2, + OutputIterator out, + BinaryOperation fun) + { + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check85; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check86; + return boost::range_detail::transform_impl( + boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2), + out, fun); + } + + } + using range::transform; +} +# 81 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/unique.hpp" 1 +# 19 "../boost/range/algorithm/unique.hpp" +namespace boost +{ + namespace range + { + + + + + + +template< range_return_value re, class ForwardRange > +inline typename range_return::type +unique( ForwardRange& rng ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check33; + return range_return:: + pack( std::unique( boost::begin(rng), + boost::end(rng)), rng ); +} + + +template< range_return_value re, class ForwardRange > +inline typename range_return::type +unique( const ForwardRange& rng ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check44; + return range_return:: + pack( std::unique( boost::begin(rng), + boost::end(rng)), rng ); +} + +template< range_return_value re, class ForwardRange, class BinaryPredicate > +inline typename range_return::type +unique( ForwardRange& rng, BinaryPredicate pred ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check54; + return range_return:: + pack(std::unique(boost::begin(rng), boost::end(rng), pred), + rng); +} + +template< range_return_value re, class ForwardRange, class BinaryPredicate > +inline typename range_return::type +unique( const ForwardRange& rng, BinaryPredicate pred ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check64; + return range_return:: + pack(std::unique(boost::begin(rng), boost::end(rng), pred), + rng); +} + + +template< class ForwardRange > +inline typename range_return::type +unique( ForwardRange& rng ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check75; + return ::boost::range::unique(rng); +} + +template< class ForwardRange > +inline typename range_return::type +unique( const ForwardRange& rng ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check83; + return ::boost::range::unique(rng); +} + +template< class ForwardRange, class BinaryPredicate > +inline typename range_return::type +unique( ForwardRange& rng, BinaryPredicate pred ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check91; + return ::boost::range::unique(rng); +} + +template< class ForwardRange, class BinaryPredicate > +inline typename range_iterator::type +unique( const ForwardRange& rng, BinaryPredicate pred ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check99; + return ::boost::range::unique(rng, pred); +} + + } + using range::unique; +} +# 82 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/unique_copy.hpp" 1 +# 18 "../boost/range/algorithm/unique_copy.hpp" +namespace boost +{ + namespace range + { +# 30 "../boost/range/algorithm/unique_copy.hpp" +template< class SinglePassRange, class OutputIterator > +inline OutputIterator +unique_copy( const SinglePassRange& rng, OutputIterator out_it ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check34; + return std::unique_copy(boost::begin(rng), boost::end(rng), out_it); +} + +template< class SinglePassRange, class OutputIterator, class BinaryPredicate > +inline OutputIterator +unique_copy( const SinglePassRange& rng, OutputIterator out_it, + BinaryPredicate pred ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check43; + return std::unique_copy(boost::begin(rng), boost::end(rng), out_it, pred); +} + + } + using range::unique_copy; +} +# 83 "../boost/range/algorithm.hpp" 2 + + +# 1 "../boost/range/algorithm/binary_search.hpp" 1 +# 18 "../boost/range/algorithm/binary_search.hpp" +namespace boost +{ + namespace range + { + + + + + + + +template +inline bool binary_search(const ForwardRange& rng, const Value& val) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check32; + return std::binary_search(boost::begin(rng), boost::end(rng), val); +} + + +template +inline bool binary_search(const ForwardRange& rng, const Value& val, + BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check41; + return std::binary_search(boost::begin(rng), boost::end(rng), val, pred); +} + + } + using range::binary_search; +} +# 86 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/equal_range.hpp" 1 +# 18 "../boost/range/algorithm/equal_range.hpp" +namespace boost +{ + namespace range + { + + + + + + + +template +inline std::pair< + typename boost::range_iterator::type, + typename boost::range_iterator::type + > +equal_range(ForwardRange& rng, const Value& val) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check36; + return std::equal_range(boost::begin(rng), boost::end(rng), val); +} + + +template +inline std::pair< + typename boost::range_iterator::type, + typename boost::range_iterator::type + > +equal_range(const ForwardRange& rng, const Value& val) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check48; + return std::equal_range(boost::begin(rng), boost::end(rng), val); +} + + +template +inline std::pair< + typename boost::range_iterator::type, + typename boost::range_iterator::type + > +equal_range(ForwardRange& rng, const Value& val, SortPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check60; + return std::equal_range(boost::begin(rng), boost::end(rng), val, pred); +} + + +template +inline std::pair< + typename boost::range_iterator::type, + typename boost::range_iterator::type + > +equal_range(const ForwardRange& rng, const Value& val, SortPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check72; + return std::equal_range(boost::begin(rng), boost::end(rng), val, pred); +} + + } + using range::equal_range; +} +# 87 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/lower_bound.hpp" 1 +# 19 "../boost/range/algorithm/lower_bound.hpp" +namespace boost +{ + namespace range + { + + + + + + +template< class ForwardRange, class Value > +inline typename disable_if< + is_const, + typename range_iterator::type +>::type +lower_bound( ForwardRange& rng, Value val ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check36; + return std::lower_bound(boost::begin(rng), boost::end(rng), val); +} + + +template< class ForwardRange, class Value > +inline typename range_iterator::type +lower_bound( const ForwardRange& rng, Value val ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check45; + return std::lower_bound(boost::begin(rng), boost::end(rng), val); +} + + +template< class ForwardRange, class Value, class SortPredicate > +inline typename disable_if< + is_const, + typename range_iterator::type +>::type +lower_bound( ForwardRange& rng, Value val, SortPredicate pred ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check57; + return std::lower_bound(boost::begin(rng), boost::end(rng), val, pred); +} + + +template< class ForwardRange, class Value, class SortPredicate > +inline typename range_iterator::type +lower_bound( const ForwardRange& rng, Value val, SortPredicate pred ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check66; + return std::lower_bound(boost::begin(rng), boost::end(rng), val, pred); +} + + +template< range_return_value re, class ForwardRange, class Value > +inline typename disable_if< + is_const, + typename range_return::type +>::type +lower_bound( ForwardRange& rng, Value val ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check78; + return range_return:: + pack(std::lower_bound(boost::begin(rng), boost::end(rng), val), + rng); +} + + +template< range_return_value re, class ForwardRange, class Value > +inline typename range_return::type +lower_bound( const ForwardRange& rng, Value val ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check89; + return range_return:: + pack(std::lower_bound(boost::begin(rng), boost::end(rng), val), + rng); +} + + +template< range_return_value re, class ForwardRange, class Value, class SortPredicate > +inline typename disable_if< + is_const, + typename range_return::type +>::type +lower_bound( ForwardRange& rng, Value val, SortPredicate pred ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check103; + return range_return:: + pack(std::lower_bound(boost::begin(rng), boost::end(rng), val, pred), + rng); +} + + +template< range_return_value re, class ForwardRange, class Value, class SortPredicate > +inline typename range_return::type +lower_bound( const ForwardRange& rng, Value val, SortPredicate pred ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check114; + return range_return:: + pack(std::lower_bound(boost::begin(rng), boost::end(rng), val, pred), + rng); +} + + } + using range::lower_bound; +} +# 88 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/upper_bound.hpp" 1 +# 19 "../boost/range/algorithm/upper_bound.hpp" +namespace boost +{ + namespace range + { + + + + + + +template< class ForwardRange, class Value > +inline +typename disable_if< + is_const, + typename range_iterator::type +>::type +upper_bound( ForwardRange& rng, Value val ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check37; + return std::upper_bound(boost::begin(rng), boost::end(rng), val); +} + + +template< class ForwardRange, class Value > +typename range_iterator::type +upper_bound( const ForwardRange& rng, Value val ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check46; + return std::upper_bound(boost::begin(rng), boost::end(rng), val); +} + + +template< class ForwardRange, class Value, class SortPredicate > +inline typename disable_if< + is_const, + typename range_iterator::type +>::type +upper_bound( ForwardRange& rng, Value val, SortPredicate pred ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check58; + return std::upper_bound(boost::begin(rng), boost::end(rng), val, pred); +} + + +template< class ForwardRange, class Value, class SortPredicate > +inline typename range_iterator::type +upper_bound( const ForwardRange& rng, Value val, SortPredicate pred ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check67; + return std::upper_bound(boost::begin(rng), boost::end(rng), val, pred); +} + + +template< range_return_value re, class ForwardRange, class Value > +inline typename disable_if< + is_const, + typename range_return::type +>::type +upper_bound( ForwardRange& rng, Value val ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check79; + return range_return:: + pack(std::upper_bound(boost::begin(rng), boost::end(rng), val), + rng); +} + + +template< range_return_value re, class ForwardRange, class Value > +inline typename range_return::type +upper_bound( const ForwardRange& rng, Value val ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check90; + return range_return:: + pack(std::upper_bound(boost::begin(rng), boost::end(rng), val), + rng); +} + + +template< range_return_value re, class ForwardRange, class Value, + class SortPredicate > +inline typename disable_if< + is_const, + typename range_return::type +>::type +upper_bound( ForwardRange& rng, Value val, SortPredicate pred ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check105; + return range_return:: + pack(std::upper_bound(boost::begin(rng), boost::end(rng), val, pred), + rng); +} + + +template< range_return_value re, class ForwardRange, class Value, + class SortPredicate > +inline typename range_return::type +upper_bound( const ForwardRange& rng, Value val, SortPredicate pred ) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check117; + return range_return:: + pack(std::upper_bound(boost::begin(rng), boost::end(rng), val, pred), + rng); +} + + } + using range::upper_bound; +} +# 89 "../boost/range/algorithm.hpp" 2 + + +# 1 "../boost/range/algorithm/set_algorithm.hpp" 1 +# 18 "../boost/range/algorithm/set_algorithm.hpp" +namespace boost +{ + namespace range + { +# 30 "../boost/range/algorithm/set_algorithm.hpp" +template +inline bool includes(const SinglePassRange1& rng1, + const SinglePassRange2& rng2) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check34; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check35; + return std::includes(boost::begin(rng1),boost::end(rng1), + boost::begin(rng2),boost::end(rng2)); +} + + +template +inline bool includes(const SinglePassRange1& rng1, + const SinglePassRange2& rng2, + BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check47; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check48; + return std::includes(boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2), pred); +} +# 60 "../boost/range/algorithm/set_algorithm.hpp" +template +inline OutputIterator set_union(const SinglePassRange1& rng1, + const SinglePassRange2& rng2, + OutputIterator out) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check66; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check67; + return std::set_union(boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2), out); +} + + +template +inline OutputIterator set_union(const SinglePassRange1& rng1, + const SinglePassRange2& rng2, + OutputIterator out, + BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check80; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check81; + return std::set_union(boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2), out, pred); +} +# 93 "../boost/range/algorithm/set_algorithm.hpp" +template +inline OutputIterator set_intersection(const SinglePassRange1& rng1, + const SinglePassRange2& rng2, + OutputIterator out) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check99; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check100; + return std::set_intersection(boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2), out); +} + + +template +inline OutputIterator set_intersection(const SinglePassRange1& rng1, + const SinglePassRange2& rng2, + OutputIterator out, + BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check113; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check114; + return std::set_intersection(boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2), + out, pred); +} +# 127 "../boost/range/algorithm/set_algorithm.hpp" +template +inline OutputIterator set_difference(const SinglePassRange1& rng1, + const SinglePassRange2& rng2, + OutputIterator out) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check133; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check134; + return std::set_difference(boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2), out); +} + + +template +inline OutputIterator set_difference(const SinglePassRange1& rng1, + const SinglePassRange2& rng2, + OutputIterator out, + BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check147; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check148; + return std::set_difference( + boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2), out, pred); +} +# 161 "../boost/range/algorithm/set_algorithm.hpp" +template +inline OutputIterator +set_symmetric_difference(const SinglePassRange1& rng1, + const SinglePassRange2& rng2, + OutputIterator out) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check168; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check169; + return std::set_symmetric_difference(boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2), out); +} + + +template +inline OutputIterator +set_symmetric_difference(const SinglePassRange1& rng1, + const SinglePassRange2& rng2, + OutputIterator out, + BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check183; + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check184; + return std::set_symmetric_difference( + boost::begin(rng1), boost::end(rng1), + boost::begin(rng2), boost::end(rng2), out, pred); +} + + } + using range::includes; + using range::set_union; + using range::set_intersection; + using range::set_difference; + using range::set_symmetric_difference; +} +# 92 "../boost/range/algorithm.hpp" 2 + + +# 1 "../boost/range/algorithm/heap_algorithm.hpp" 1 +# 18 "../boost/range/algorithm/heap_algorithm.hpp" +namespace boost +{ + namespace range + { + + + + + + + +template +inline RandomAccessRange& push_heap(RandomAccessRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check32; + std::push_heap(boost::begin(rng), boost::end(rng)); + return rng; +} + + +template +inline const RandomAccessRange& push_heap(const RandomAccessRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check41; + std::push_heap(boost::begin(rng), boost::end(rng)); + return rng; +} + + +template +inline RandomAccessRange& push_heap(RandomAccessRange& rng, Compare comp_pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check50; + std::push_heap(boost::begin(rng), boost::end(rng), comp_pred); + return rng; +} + + +template +inline const RandomAccessRange& push_heap(const RandomAccessRange& rng, Compare comp_pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check59; + std::push_heap(boost::begin(rng), boost::end(rng), comp_pred); + return rng; +} + + + + + + + +template +inline RandomAccessRange& pop_heap(RandomAccessRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check73; + std::pop_heap(boost::begin(rng), boost::end(rng)); + return rng; +} + + +template +inline const RandomAccessRange& pop_heap(const RandomAccessRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check82; + std::pop_heap(boost::begin(rng), boost::end(rng)); + return rng; +} + + +template +inline RandomAccessRange& pop_heap(RandomAccessRange& rng, Compare comp_pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check91; + std::pop_heap(boost::begin(rng), boost::end(rng), comp_pred); + return rng; +} + + +template +inline const RandomAccessRange& pop_heap(const RandomAccessRange& rng, Compare comp_pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check100; + std::pop_heap(boost::begin(rng), boost::end(rng), comp_pred); + return rng; +} + + + + + + + +template +inline RandomAccessRange& make_heap(RandomAccessRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check114; + std::make_heap(boost::begin(rng), boost::end(rng)); + return rng; +} + + +template +inline const RandomAccessRange& make_heap(const RandomAccessRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check123; + std::make_heap(boost::begin(rng), boost::end(rng)); + return rng; +} + + +template +inline RandomAccessRange& make_heap(RandomAccessRange& rng, Compare comp_pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check132; + std::make_heap(boost::begin(rng), boost::end(rng), comp_pred); + return rng; +} + + +template +inline const RandomAccessRange& make_heap(const RandomAccessRange& rng, Compare comp_pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check141; + std::make_heap(boost::begin(rng), boost::end(rng), comp_pred); + return rng; +} + + + + + + + +template +inline RandomAccessRange& sort_heap(RandomAccessRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check155; + std::sort_heap(boost::begin(rng), boost::end(rng)); + return rng; +} + + +template +inline const RandomAccessRange& sort_heap(const RandomAccessRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check164; + std::sort_heap(boost::begin(rng), boost::end(rng)); + return rng; +} + + +template +inline RandomAccessRange& sort_heap(RandomAccessRange& rng, Compare comp_pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check173; + std::sort_heap(boost::begin(rng), boost::end(rng), comp_pred); + return rng; +} + + +template +inline const RandomAccessRange& sort_heap(const RandomAccessRange& rng, Compare comp_pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check182; + std::sort_heap(boost::begin(rng), boost::end(rng), comp_pred); + return rng; +} + + } + using range::push_heap; + using range::pop_heap; + using range::make_heap; + using range::sort_heap; +} +# 95 "../boost/range/algorithm.hpp" 2 + + +# 1 "../boost/range/algorithm/max_element.hpp" 1 +# 19 "../boost/range/algorithm/max_element.hpp" +namespace boost +{ + namespace range + { + + + + + + + +template +inline typename range_iterator::type +max_element(ForwardRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check34; + return std::max_element(boost::begin(rng), boost::end(rng)); +} + + +template +inline typename range_iterator::type +max_element(const ForwardRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check43; + return std::max_element(boost::begin(rng), boost::end(rng)); +} + + +template +inline typename range_iterator::type +max_element(ForwardRange& rng, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check52; + return std::max_element(boost::begin(rng), boost::end(rng), pred); +} + + +template +inline typename range_iterator::type +max_element(const ForwardRange& rng, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check61; + return std::max_element(boost::begin(rng), boost::end(rng), pred); +} + + + + +template +inline typename range_return::type +max_element(ForwardRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check72; + return range_return::pack( + std::max_element(boost::begin(rng), boost::end(rng)), + rng); +} + + +template +inline typename range_return::type +max_element(const ForwardRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check83; + return range_return::pack( + std::max_element(boost::begin(rng), boost::end(rng)), + rng); +} + + +template +inline typename range_return::type +max_element(ForwardRange& rng, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check94; + return range_return::pack( + std::max_element(boost::begin(rng), boost::end(rng), pred), + rng); +} + + +template +inline typename range_return::type +max_element(const ForwardRange& rng, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check105; + return range_return::pack( + std::max_element(boost::begin(rng), boost::end(rng), pred), + rng); +} + + } + using range::max_element; +} +# 98 "../boost/range/algorithm.hpp" 2 +# 1 "../boost/range/algorithm/min_element.hpp" 1 +# 19 "../boost/range/algorithm/min_element.hpp" +namespace boost +{ + namespace range + { + + + + + + + +template +inline typename range_iterator::type +min_element(ForwardRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check34; + return std::min_element(boost::begin(rng), boost::end(rng)); +} + + +template +inline typename range_iterator::type +min_element(const ForwardRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check43; + return std::min_element(boost::begin(rng), boost::end(rng)); +} + + +template +inline typename range_iterator::type +min_element(ForwardRange& rng, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check52; + return std::min_element(boost::begin(rng), boost::end(rng), pred); +} + + +template +inline typename range_iterator::type +min_element(const ForwardRange& rng, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check61; + return std::min_element(boost::begin(rng), boost::end(rng), pred); +} + + + + +template +inline typename range_return::type +min_element(ForwardRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check72; + return range_return::pack( + std::min_element(boost::begin(rng), boost::end(rng)), + rng); +} + + +template +inline typename range_return::type +min_element(const ForwardRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check83; + return range_return::pack( + std::min_element(boost::begin(rng), boost::end(rng)), + rng); +} + + +template +inline typename range_return::type +min_element(ForwardRange& rng, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check94; + return range_return::pack( + std::min_element(boost::begin(rng), boost::end(rng), pred), + rng); +} + + +template +inline typename range_return::type +min_element(const ForwardRange& rng, BinaryPredicate pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check105; + return range_return::pack( + std::min_element(boost::begin(rng), boost::end(rng), pred), + rng); +} + + } + using range::min_element; +} +# 99 "../boost/range/algorithm.hpp" 2 + + +# 1 "../boost/range/algorithm/permutation.hpp" 1 +# 18 "../boost/range/algorithm/permutation.hpp" +namespace boost +{ + namespace range + { + + + + + + + +template +inline bool next_permutation(BidirectionalRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check32; + return std::next_permutation(boost::begin(rng), boost::end(rng)); +} + + +template +inline bool next_permutation(const BidirectionalRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check40; + return std::next_permutation(boost::begin(rng), boost::end(rng)); +} + + +template +inline bool next_permutation(BidirectionalRange& rng, Compare comp_pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check48; + return std::next_permutation(boost::begin(rng), boost::end(rng), + comp_pred); +} + + +template +inline bool next_permutation(const BidirectionalRange& rng, + Compare comp_pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check58; + return std::next_permutation(boost::begin(rng), boost::end(rng), + comp_pred); +} + + + + + + + +template +inline bool prev_permutation(BidirectionalRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check72; + return std::prev_permutation(boost::begin(rng), boost::end(rng)); +} + + +template +inline bool prev_permutation(const BidirectionalRange& rng) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check80; + return std::prev_permutation(boost::begin(rng), boost::end(rng)); +} + + +template +inline bool prev_permutation(BidirectionalRange& rng, Compare comp_pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check88; + return std::prev_permutation(boost::begin(rng), boost::end(rng), + comp_pred); +} + + +template +inline bool prev_permutation(const BidirectionalRange& rng, + Compare comp_pred) +{ + typedef ::boost::concepts::detail::instantiate< &::boost::concepts::requirement_ )>::failed> boost_concept_check98; + return std::prev_permutation(boost::begin(rng), boost::end(rng), + comp_pred); +} + + } + using range::next_permutation; + using range::prev_permutation; +} +# 102 "../boost/range/algorithm.hpp" 2 +# 17 "quickbook/src/id_manager.cpp" 2 +# 1 "../boost/foreach.hpp" 1 +# 27 "../boost/foreach.hpp" +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 3 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/stddef.h" 1 3 4 +# 44 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cstddef" 2 3 +# 28 "../boost/foreach.hpp" 2 +# 85 "../boost/foreach.hpp" +# 1 "../boost/type_traits/is_base_and_derived.hpp" 1 +# 24 "../boost/type_traits/is_base_and_derived.hpp" +# 1 "../boost/type_traits/detail/bool_trait_def.hpp" 1 +# 14 "../boost/type_traits/detail/bool_trait_def.hpp" +# 1 "../boost/type_traits/detail/template_arity_spec.hpp" 1 +# 15 "../boost/type_traits/detail/bool_trait_def.hpp" 2 +# 25 "../boost/type_traits/is_base_and_derived.hpp" 2 + +namespace boost { + +namespace detail { +# 222 "../boost/type_traits/is_base_and_derived.hpp" +template +struct is_base_and_derived_impl +{ + typedef typename remove_cv::type ncvB; + typedef typename remove_cv::type ncvD; + + static const bool value = ((__is_base_of(B,D) && !is_same::value) && ! ::boost::is_same::value); +}; + +} + +template< typename Base, typename Derived > struct is_base_and_derived : public ::boost::integral_constant::value)> { public: }; + + + + + + + +template< typename Base, typename Derived > struct is_base_and_derived< Base&,Derived > : public ::boost::integral_constant { public: }; +template< typename Base, typename Derived > struct is_base_and_derived< Base,Derived& > : public ::boost::integral_constant { public: }; +template< typename Base, typename Derived > struct is_base_and_derived< Base&,Derived& > : public ::boost::integral_constant { public: }; + + + + + + +} + +# 1 "../boost/type_traits/detail/bool_trait_undef.hpp" 1 +# 253 "../boost/type_traits/is_base_and_derived.hpp" 2 +# 86 "../boost/foreach.hpp" 2 + + + +# 1 "../boost/foreach_fwd.hpp" 1 +# 20 "../boost/foreach_fwd.hpp" +enum boost_foreach_argument_dependent_lookup_hack +{ + boost_foreach_argument_dependent_lookup_hack_value +}; + +namespace boost +{ + +namespace foreach +{ + template + std::pair in_range(T begin, T end); + + + + + typedef boost_foreach_argument_dependent_lookup_hack tag; + + + + + + template + struct is_lightweight_proxy; + + + + + + template + struct is_noncopyable; + +} + + +namespace BOOST_FOREACH +{ + using foreach::in_range; + using foreach::tag; + + template + struct is_lightweight_proxy + : foreach::is_lightweight_proxy + {}; + + template + struct is_noncopyable + : foreach::is_noncopyable + {}; + +} + +} +# 90 "../boost/foreach.hpp" 2 +# 98 "../boost/foreach.hpp" +namespace boost +{ + + +template +class iterator_range; + + +template +class sub_range; + +namespace foreach +{ + + + + template + inline std::pair in_range(T begin, T end) + { + return std::make_pair(begin, end); + } + + + + + + template + struct is_lightweight_proxy + : boost::mpl::false_ + { + }; + + + + + + template + struct is_noncopyable + + : boost::mpl::or_< + boost::is_abstract + , boost::is_base_and_derived + > + + + + + + + + { + }; + +} + +} +# 167 "../boost/foreach.hpp" +template +inline boost::BOOST_FOREACH::is_lightweight_proxy * +boost_foreach_is_lightweight_proxy(T *&, boost::foreach::tag) { return 0; } + +template +inline boost::mpl::true_ * +boost_foreach_is_lightweight_proxy(std::pair *&, boost::foreach::tag) { return 0; } + +template +inline boost::mpl::true_ * +boost_foreach_is_lightweight_proxy(boost::iterator_range *&, boost::foreach::tag) { return 0; } + +template +inline boost::mpl::true_ * +boost_foreach_is_lightweight_proxy(boost::sub_range *&, boost::foreach::tag) { return 0; } + +template +inline boost::mpl::true_ * +boost_foreach_is_lightweight_proxy(T **&, boost::foreach::tag) { return 0; } + + + + + + +template +inline boost::BOOST_FOREACH::is_noncopyable * +boost_foreach_is_noncopyable(T *&, boost::foreach::tag) { return 0; } + +namespace boost +{ + +namespace foreach_detail_ +{ + + + + +template +inline boost::mpl::and_ *and_(Bool1 *, Bool2 *) { return 0; } + +template +inline boost::mpl::and_ *and_(Bool1 *, Bool2 *, Bool3 *) { return 0; } + +template +inline boost::mpl::or_ *or_(Bool1 *, Bool2 *) { return 0; } + +template +inline boost::mpl::or_ *or_(Bool1 *, Bool2 *, Bool3 *) { return 0; } + +template +inline boost::mpl::not_ *not_(Bool1 *) { return 0; } + +template +inline boost::is_array *is_array_(T const &) { return 0; } + +template +inline boost::is_const *is_const_(T &) { return 0; } + + +template +inline boost::mpl::true_ *is_const_(T const &) { return 0; } + + + +template +inline boost::mpl::false_ *is_rvalue_(T &, int) { return 0; } + +template +inline boost::mpl::true_ *is_rvalue_(T const &, ...) { return 0; } +# 245 "../boost/foreach.hpp" +struct auto_any_base +{ + + + operator bool() const + { + return false; + } +}; + +template +struct auto_any : auto_any_base +{ + explicit auto_any(T const &t) + : item(t) + { + } + + + + + mutable T item; +}; + +typedef auto_any_base const &auto_any_t; + +template +inline typename boost::mpl::if_::type &auto_any_cast(auto_any_t a) +{ + return static_cast const &>(a).item; +} + +typedef boost::mpl::true_ const_; + + + + +template +struct type2type + : boost::mpl::if_ +{ +}; + +template +struct wrap_cstr +{ + typedef T type; +}; + +template<> +struct wrap_cstr +{ + typedef wrap_cstr type; + typedef char *iterator; + typedef char *const_iterator; +}; + +template<> +struct wrap_cstr +{ + typedef wrap_cstr type; + typedef char const *iterator; + typedef char const *const_iterator; +}; + +template<> +struct wrap_cstr +{ + typedef wrap_cstr type; + typedef wchar_t *iterator; + typedef wchar_t *const_iterator; +}; + +template<> +struct wrap_cstr +{ + typedef wrap_cstr type; + typedef wchar_t const *iterator; + typedef wchar_t const *const_iterator; +}; + +template +struct is_char_array + : mpl::and_< + is_array + , mpl::or_< + is_convertible + , is_convertible + > + > +{}; + +template +struct foreach_iterator +{ +# 353 "../boost/foreach.hpp" + struct IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING; typedef struct IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING353 : boost::mpl::assert_ { static boost::mpl::failed ************ (IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING::************ assert_arg()) (T&) { return 0; } } mpl_assert_arg353; enum { mpl_assertion_in_line_353 = sizeof( boost::mpl::assertion_failed<((!is_char_array::value))>( mpl_assert_arg353::assert_arg() ) ) }; + + + + + typedef typename wrap_cstr::type container; + + typedef typename boost::mpl::eval_if< + C + , range_const_iterator + , range_mutable_iterator + >::type type; +}; + + +template +struct foreach_reverse_iterator +{ +# 384 "../boost/foreach.hpp" + struct IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING; typedef struct IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING384 : boost::mpl::assert_ { static boost::mpl::failed ************ (IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING::************ assert_arg()) (T&) { return 0; } } mpl_assert_arg384; enum { mpl_assertion_in_line_384 = sizeof( boost::mpl::assertion_failed<((!is_char_array::value))>( mpl_assert_arg384::assert_arg() ) ) }; + + + + + typedef typename wrap_cstr::type container; + + typedef typename boost::mpl::eval_if< + C + , range_reverse_iterator + , range_reverse_iterator + >::type type; +}; + +template +struct foreach_reference + : iterator_reference::type> +{ +}; + + + + +template +inline type2type *encode_type(T &, boost::mpl::false_ *) { return 0; } + +template +inline type2type *encode_type(T const &, boost::mpl::true_ *) { return 0; } + + + + +inline bool set_false(bool &b) +{ + b = false; + return false; +} + + + + +template +inline T *&to_ptr(T const &) +{ + static T *t = 0; + return t; +} +# 445 "../boost/foreach.hpp" +template +inline T &derefof(T *t) +{ + + + return reinterpret_cast( + *const_cast( + reinterpret_cast(t) + ) + ); +} +# 513 "../boost/foreach.hpp" +template +struct rvalue_probe +{ + rvalue_probe(T &t, bool &b) + : value(t) + , is_rvalue(b) + { + } + + struct private_type_ {}; + + + + + + + typedef typename boost::mpl::if_< + boost::mpl::or_, boost::is_array >, private_type_, T + >::type value_type; + + + operator value_type() + { + this->is_rvalue = true; + return this->value; + } + + operator T &() const + { + return this->value; + } + +private: + T &value; + bool &is_rvalue; +}; + +template +rvalue_probe make_probe(T &t, bool &b) { return rvalue_probe(t, b); } + +template +rvalue_probe make_probe(T const &t, bool &b) { return rvalue_probe(t, b); } + + + + +template +struct simple_variant +{ + simple_variant(T const *t) + : is_rvalue(false) + { + *static_cast(this->data.address()) = t; + } + + simple_variant(T const &t) + : is_rvalue(true) + { + ::new(this->data.address()) T(t); + } + + simple_variant(simple_variant const &that) + : is_rvalue(that.is_rvalue) + { + if(this->is_rvalue) + ::new(this->data.address()) T(*that.get()); + else + *static_cast(this->data.address()) = that.get(); + } + + ~simple_variant() + { + if(this->is_rvalue) + this->get()->~T(); + } + + T const *get() const + { + if(this->is_rvalue) + return static_cast(this->data.address()); + else + return *static_cast(this->data.address()); + } + +private: + enum size_type { size = sizeof(T) > sizeof(T*) ? sizeof(T) : sizeof(T*) }; + simple_variant &operator =(simple_variant const &); + bool const is_rvalue; + aligned_storage data; +}; + + + + +template +inline typename boost::enable_if, IsProxy>::type * +should_copy_impl(LValue *, IsProxy *, bool *) +{ + return 0; +} + + +inline bool * +should_copy_impl(boost::mpl::false_ *, boost::mpl::false_ *, bool *is_rvalue) +{ + return is_rvalue; +} + + + + + + +template +inline auto_any contain(T const &t, boost::mpl::true_ *) +{ + return auto_any(t); +} + +template +inline auto_any contain(T &t, boost::mpl::false_ *) +{ + + + + + return auto_any(boost::addressof(t)); + +} + + +template +inline auto_any > +contain(T const &t, bool *rvalue) +{ + return auto_any >(*rvalue ? simple_variant(t) : simple_variant(&t)); +} + + + + + +template +inline auto_any::type> +begin(auto_any_t col, type2type *, boost::mpl::true_ *) +{ + return auto_any::type>( + boost::begin(auto_any_cast(col))); +} + +template +inline auto_any::type> +begin(auto_any_t col, type2type *, boost::mpl::false_ *) +{ + typedef typename type2type::type type; + typedef typename foreach_iterator::type iterator; + return auto_any::type>( + iterator(boost::begin(derefof(auto_any_cast(col))))); +} + + +template +inline auto_any::type> +begin(auto_any_t col, type2type *, bool *) +{ + return auto_any::type>( + boost::begin(*auto_any_cast, boost::mpl::false_>(col).get())); +} + + + +template +inline auto_any +begin(auto_any_t col, type2type *, boost::mpl::true_ *) +{ + return auto_any(auto_any_cast(col)); +} + + + + + +template +inline auto_any::type> +end(auto_any_t col, type2type *, boost::mpl::true_ *) +{ + return auto_any::type>( + boost::end(auto_any_cast(col))); +} + +template +inline auto_any::type> +end(auto_any_t col, type2type *, boost::mpl::false_ *) +{ + typedef typename type2type::type type; + typedef typename foreach_iterator::type iterator; + return auto_any::type>( + iterator(boost::end(derefof(auto_any_cast(col))))); +} + + +template +inline auto_any::type> +end(auto_any_t col, type2type *, bool *) +{ + return auto_any::type>( + boost::end(*auto_any_cast, boost::mpl::false_>(col).get())); +} + + + +template +inline auto_any +end(auto_any_t, type2type *, boost::mpl::true_ *) +{ + return auto_any(0); +} + + + + + +template +inline bool done(auto_any_t cur, auto_any_t end, type2type *) +{ + typedef typename foreach_iterator::type iter_t; + return auto_any_cast(cur) == auto_any_cast(end); +} + + +template +inline bool done(auto_any_t cur, auto_any_t, type2type *) +{ + return ! *auto_any_cast(cur); +} + + + + + +template +inline void next(auto_any_t cur, type2type *) +{ + typedef typename foreach_iterator::type iter_t; + ++auto_any_cast(cur); +} + + + + +template +inline typename foreach_reference::type +deref(auto_any_t cur, type2type *) +{ + typedef typename foreach_iterator::type iter_t; + return *auto_any_cast(cur); +} + + + + +template +inline auto_any::type> +rbegin(auto_any_t col, type2type *, boost::mpl::true_ *) +{ + return auto_any::type>( + boost::rbegin(auto_any_cast(col))); +} + +template +inline auto_any::type> +rbegin(auto_any_t col, type2type *, boost::mpl::false_ *) +{ + typedef typename type2type::type type; + typedef typename foreach_reverse_iterator::type iterator; + return auto_any::type>( + iterator(boost::rbegin(derefof(auto_any_cast(col))))); +} + + +template +inline auto_any::type> +rbegin(auto_any_t col, type2type *, bool *) +{ + return auto_any::type>( + boost::rbegin(*auto_any_cast, boost::mpl::false_>(col).get())); +} + + + +template +inline auto_any > +rbegin(auto_any_t col, type2type *, boost::mpl::true_ *) +{ + T *p = auto_any_cast(col); + while(0 != *p) + ++p; + return auto_any >(reverse_iterator(p)); +} + + + + + +template +inline auto_any::type> +rend(auto_any_t col, type2type *, boost::mpl::true_ *) +{ + return auto_any::type>( + boost::rend(auto_any_cast(col))); +} + +template +inline auto_any::type> +rend(auto_any_t col, type2type *, boost::mpl::false_ *) +{ + typedef typename type2type::type type; + typedef typename foreach_reverse_iterator::type iterator; + return auto_any::type>( + iterator(boost::rend(derefof(auto_any_cast(col))))); +} + + +template +inline auto_any::type> +rend(auto_any_t col, type2type *, bool *) +{ + return auto_any::type>( + boost::rend(*auto_any_cast, boost::mpl::false_>(col).get())); +} + + + +template +inline auto_any > +rend(auto_any_t col, type2type *, boost::mpl::true_ *) +{ + return auto_any >( + reverse_iterator(auto_any_cast(col))); +} + + + + + +template +inline bool rdone(auto_any_t cur, auto_any_t end, type2type *) +{ + typedef typename foreach_reverse_iterator::type iter_t; + return auto_any_cast(cur) == auto_any_cast(end); +} + + + + +template +inline void rnext(auto_any_t cur, type2type *) +{ + typedef typename foreach_reverse_iterator::type iter_t; + ++auto_any_cast(cur); +} + + + + +template +inline typename foreach_reference::type +rderef(auto_any_t cur, type2type *) +{ + typedef typename foreach_reverse_iterator::type iter_t; + return *auto_any_cast(cur); +} + +} +} +# 18 "quickbook/src/id_manager.cpp" 2 + + +# 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cctype" 1 3 +# 41 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cctype" 3 + +# 42 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/cctype" 3 +# 21 "quickbook/src/id_manager.cpp" 2 + +namespace quickbook +{ + + + + + + + + struct id_placeholder; + struct id_data; + std::string replace_ids(id_state& state, std::string const& xml, + bool use_resolved_ids = true); + std::string process_ids(id_state&, std::string const&); + + static const std::size_t max_size = 32; + + + + + + struct id_placeholder + { + enum state_enum { child, unresolved, resolved, generated }; + + unsigned index; + state_enum generation_state; + + + std::string unresolved_id; + + + std::string id; + id_placeholder* parent; + + id_category category; + unsigned num_dots; + + unsigned order; + + + + + + id_data* data; + + + + id_placeholder( + unsigned index, + std::string const& id, + id_category category, + id_placeholder* parent_ = 0) + : index(index), + generation_state(parent_ ? child : unresolved), + unresolved_id(parent_ ? parent_->unresolved_id + '.' + id : id), + id(id), + parent(parent_), + category(category), + num_dots(boost::range::count(id, '.') + + (parent_ ? parent_->num_dots + 1 : 0)), + order(0), + data(0) + { + } + + std::string to_string() + { + return '$' + boost::lexical_cast(index); + } + + bool check_state() const + { + return ( + (generation_state == child) == (bool) parent && + (generation_state == resolved) == (bool) data); + } + + bool check_state(state_enum s) const + { + return s == generation_state && check_state(); + } + }; + + + + + + struct file_info; + struct doc_info; + struct section_info; + + struct id_state + { + boost::intrusive_ptr current_file; + std::deque placeholders; + + + + id_placeholder* add_placeholder( + std::string const&, id_category, id_placeholder* parent = 0); + + id_placeholder* get_placeholder(string_ref); + + + + id_placeholder* start_file( + unsigned compatibility_version, + bool document_root, + std::string const& include_doc_id, + std::string const& id, + value const& title); + + void end_file(); + + id_placeholder* add_id( + std::string const& id, + id_category category); + id_placeholder* old_style_id( + std::string const& id, + id_category category); + id_placeholder* begin_section( + std::string const& id, + id_category category); + void end_section(); + +private: + id_placeholder* add_id_to_section( + std::string const& id, + id_category category, + boost::intrusive_ptr const& section); + id_placeholder* create_new_section( + std::string const& id, + id_category category); + + void switch_section(id_placeholder*); + void reswitch_sections(boost::intrusive_ptr const&, + boost::intrusive_ptr const&); + void restore_section(); + }; + + struct file_info : intrusive_base + { + boost::intrusive_ptr parent; + boost::intrusive_ptr document; + + bool document_root; + unsigned compatibility_version; + boost::intrusive_ptr switched_section; + id_placeholder* original_placeholder; + + + + + std::string doc_id_1_1; + + file_info(boost::intrusive_ptr const& parent, + unsigned compatibility_version) : + parent(parent), document(parent->document), document_root(false), + compatibility_version(compatibility_version), + switched_section(), original_placeholder() + {} + + file_info(boost::intrusive_ptr const& parent, + boost::intrusive_ptr const& document, + unsigned compatibility_version) : + parent(parent), document(document), document_root(true), + compatibility_version(compatibility_version), + switched_section(), original_placeholder() + {} + }; + + struct doc_info : intrusive_base + { + boost::intrusive_ptr current_section; + std::string last_title_1_1; + std::string section_id_1_1; + + doc_info() : + current_section(), last_title_1_1(), section_id_1_1() + {} + }; + + struct section_info : intrusive_base + { + boost::intrusive_ptr parent; + unsigned compatibility_version; + unsigned level; + std::string id_1_1; + id_placeholder* placeholder_1_6; + + section_info(boost::intrusive_ptr const& parent, + unsigned compatibility_version, std::string const& id) : + parent(parent), compatibility_version(compatibility_version), + level(parent ? parent->level + 1 : 1), + id_1_1(), placeholder_1_6(0) + { + if (parent && compatibility_version < 106u) { + id_1_1 = parent->id_1_1; + if (!id_1_1.empty() && !id.empty()) + id_1_1 += "."; + id_1_1 += id; + } + } + }; + + + + + + id_manager::id_manager() + : state(new id_state) + { + } + + id_manager::~id_manager() {} + + void id_manager::start_file( + unsigned compatibility_version, + std::string const& include_doc_id, + std::string const& id, + value const& title) + { + state->start_file(compatibility_version, false, include_doc_id, id, title); + } + + std::string id_manager::start_file_with_docinfo( + unsigned compatibility_version, + std::string const& include_doc_id, + std::string const& id, + value const& title) + { + return state->start_file(compatibility_version, true, include_doc_id, + id, title)->to_string(); + } + + void id_manager::end_file() + { + state->end_file(); + } + + std::string id_manager::begin_section(std::string const& id, + id_category category) + { + return state->begin_section(id, category)->to_string(); + } + + void id_manager::end_section() + { + return state->end_section(); + } + + int id_manager::section_level() const + { + return state->current_file->document->current_section->level; + } + + std::string id_manager::old_style_id(std::string const& id, id_category category) + { + return state->old_style_id(id, category)->to_string(); + } + + std::string id_manager::add_id(std::string const& id, id_category category) + { + return state->add_id(id, category)->to_string(); + } + + std::string id_manager::add_anchor(std::string const& id, id_category category) + { + return state->add_placeholder(id, category)->to_string(); + } + + std::string id_manager::replace_placeholders_with_unresolved_ids( + std::string const& xml) const + { + return replace_ids(*state, xml, false); + } + + std::string id_manager::replace_placeholders(std::string const& xml) const + { + (static_cast (0)); + return process_ids(*state, xml); + } + + unsigned id_manager::compatibility_version() const + { + return state->current_file->compatibility_version; + } + + + + + + + + namespace + { + std::string normalize_id( + std::string src_id, + std::size_t prefix = 0, + std::size_t size = max_size) + { + std::string id; + id.swap(src_id); + + std::size_t src = prefix; + std::size_t dst = prefix; + size += prefix; + + if (src >= id.length()) { + return id; + } + + while (src < id.length() && id[src] == '_') { + ++src; + } + + if (src >= id.length()) { + id += '_'; + return id; + } + + while (src < id.length() && dst < size) { + if (id[src] == '_') { + do { + ++src; + } while(src < id.length() && id[src] == '_'); + + if (src < id.length()) id[dst++] = '_'; + } + else { + id[dst++] = id[src++]; + } + } + + id.erase(dst); + + return id; + } + } + + + + + + id_placeholder* id_state::add_placeholder( + std::string const& id, id_category category, + id_placeholder* parent) + { + placeholders.push_back(id_placeholder( + placeholders.size(), id, category, parent)); + return &placeholders.back(); + } + + id_placeholder* id_state::get_placeholder(string_ref value) + { + + if (value.size() <= 1 || *value.begin() != '$') + return 0; + + unsigned index = boost::lexical_cast(std::string( + value.begin() + 1, value.end())); + + return &placeholders.at(index); + } + + void id_state::switch_section(id_placeholder* p) + { + (static_cast (0)); + current_file->switched_section = current_file->document->current_section; + current_file->original_placeholder = current_file->switched_section->placeholder_1_6; + current_file->switched_section->placeholder_1_6 = p; + } + + void id_state::reswitch_sections( + boost::intrusive_ptr const& popped_section, + boost::intrusive_ptr const& parent_section) + { + boost::intrusive_ptr file = current_file; + boost::intrusive_ptr first_switched_file; + + for (;;) { + if (file->switched_section == popped_section) + { + first_switched_file = file; + file->switched_section = parent_section; + } + + if (file->document_root) break; + file = file->parent; + } + + if (first_switched_file) { + first_switched_file->original_placeholder = + parent_section->placeholder_1_6; + parent_section->placeholder_1_6 = + popped_section->placeholder_1_6; + } + } + + void id_state::restore_section() + { + if (current_file->original_placeholder) { + current_file->switched_section->placeholder_1_6 = + current_file->original_placeholder; + } + } + + id_placeholder* id_state::start_file( + unsigned compatibility_version, + bool document_root, + std::string const& include_doc_id, + std::string const& id, + value const& title) + { + + + boost::intrusive_ptr parent = current_file; + + if (document_root) { + current_file = new file_info(parent, new doc_info(), + compatibility_version); + } + else { + current_file = + new file_info(parent, compatibility_version); + } + + + + + + std::string initial_doc_id; + + if (document_root || + compatibility_version >= 106u || + (parent && parent->compatibility_version >= 106u)) { + initial_doc_id = !include_doc_id.empty() ? include_doc_id : id; + } + else { + initial_doc_id = !id.empty() ? id : include_doc_id; + } + + + + + if (document_root || compatibility_version < 106u) { + + + + if (title.check()) + current_file->document->last_title_1_1 = + title.get_quickbook(); + + current_file->doc_id_1_1 = !initial_doc_id.empty() ? initial_doc_id : + detail::make_identifier(current_file->document->last_title_1_1); + } + else if (parent) { + current_file->doc_id_1_1 = parent->doc_id_1_1; + } + + if (document_root) { + if (!initial_doc_id.empty()) { + return create_new_section(id, id_category::explicit_section_id); + } + else if (!title.empty()) { + return create_new_section( + detail::make_identifier(title.get_quickbook()), + id_category::generated_doc); + } + else if (compatibility_version >= 106u) { + return create_new_section("doc", id_category::numbered); + } + else { + return create_new_section("", id_category::generated_doc); + } + } + else { + + + + + + if (compatibility_version >= 106u && !initial_doc_id.empty()) { + switch_section(add_id_to_section(initial_doc_id, + id_category::explicit_section_id, + boost::intrusive_ptr())); + } + + return 0; + } + } + + void id_state::end_file() + { + restore_section(); + current_file = current_file->parent; + } + + id_placeholder* id_state::add_id( + std::string const& id, + id_category category) + { + return add_id_to_section(id, category, + current_file->document->current_section); + } + + id_placeholder* id_state::add_id_to_section( + std::string const& id, + id_category category, + boost::intrusive_ptr const& section) + { + std::string id_part = id; + + + + + if (current_file->compatibility_version >= 106u && + category.c < id_category::explicit_id) { + id_part = normalize_id(id); + } + + if(!section || section->compatibility_version >= 106u) { + return add_placeholder(id_part, category, + section ? section->placeholder_1_6 : 0); + } + else { + std::string const& qualified_id = section->id_1_1; + + std::string new_id; + if (!section->placeholder_1_6) + new_id = current_file->doc_id_1_1; + if (!new_id.empty() && !qualified_id.empty()) new_id += '.'; + new_id += qualified_id; + if (!new_id.empty() && !id_part.empty()) new_id += '.'; + new_id += id_part; + + return add_placeholder(new_id, category, + section->placeholder_1_6); + } + } + + id_placeholder* id_state::old_style_id( + std::string const& id, + id_category category) + { + return current_file->compatibility_version < 103u ? + add_placeholder( + current_file->document->section_id_1_1 + "." + id, category) : + add_id(id, category); + } + + id_placeholder* id_state::begin_section( + std::string const& id, + id_category category) + { + current_file->document->section_id_1_1 = id; + return create_new_section(id, category); + } + + id_placeholder* id_state::create_new_section( + std::string const& id, + id_category category) + { + boost::intrusive_ptr parent = + current_file->document->current_section; + + boost::intrusive_ptr new_section = + new section_info(parent, current_file->compatibility_version, id); + + id_placeholder* p; + + if (new_section->compatibility_version >= 106u) { + p = add_id_to_section(id, category, parent); + new_section->placeholder_1_6 = p; + } + else if (new_section->compatibility_version >= 103u) { + if (parent) + new_section->placeholder_1_6 = parent->placeholder_1_6; + + std::string new_id; + if (!new_section->placeholder_1_6) { + new_id = current_file->doc_id_1_1; + if (!new_section->id_1_1.empty()) new_id += '.'; + } + new_id += new_section->id_1_1; + + p = add_placeholder(new_id, category, + new_section->placeholder_1_6); + } + else { + if (parent) + new_section->placeholder_1_6 = parent->placeholder_1_6; + + std::string new_id; + if (parent && !new_section->placeholder_1_6) + new_id = current_file->doc_id_1_1 + '.'; + + new_id += id; + + p = add_placeholder(new_id, category, + new_section->placeholder_1_6); + } + + current_file->document->current_section = new_section; + + return p; + } + + void id_state::end_section() + { + boost::intrusive_ptr popped_section = + current_file->document->current_section; + current_file->document->current_section = popped_section->parent; + + reswitch_sections(popped_section, popped_section->parent); + } +# 649 "quickbook/src/id_manager.cpp" + struct xml_processor + { + xml_processor(); + + std::vector id_attributes; + + struct callback { + virtual void start(string_ref) {} + virtual void id_value(string_ref) {} + virtual void finish(string_ref) {} + virtual ~callback() {} + }; + + void parse(std::string const&, callback&); + }; + + namespace + { + char const* id_attributes_[] = + { + "id", + "linkend", + "linkends", + "arearefs" + }; + } + + xml_processor::xml_processor() + { + static int const n_id_attributes = sizeof(id_attributes_)/sizeof(char const*); + for (int i = 0; i != n_id_attributes; ++i) + { + id_attributes.push_back(id_attributes_[i]); + } + + boost::sort(id_attributes); + } + + template + bool read(Iterator& it, Iterator end, char const* text) + { + for(Iterator it2 = it;; ++it2, ++text) { + if (!*text) { + it = it2; + return true; + } + + if (it2 == end || *it2 != *text) + return false; + } + } + + template + void read_past(Iterator& it, Iterator end, char const* text) + { + while (it != end && !read(it, end, text)) ++it; + } + + bool find_char(char const* text, char c) + { + for(;*text; ++text) + if (c == *text) return true; + return false; + } + + template + void read_some_of(Iterator& it, Iterator end, char const* text) + { + while(it != end && find_char(text, *it)) ++it; + } + + template + void read_to_one_of(Iterator& it, Iterator end, char const* text) + { + while(it != end && !find_char(text, *it)) ++it; + } + + void xml_processor::parse(std::string const& source, callback& c) + { + typedef std::string::const_iterator iterator; + + string_ref source_ref(source.begin(), source.end()); + c.start(source_ref); + + iterator it = source_ref.begin(), end = source_ref.end(); + + for(;;) + { + read_past(it, end, "<"); + if (it == end) break; + + if (read(it, end, "!--quickbook-escape-prefix-->")) + { + read_past(it, end, ""); + continue; + } + + switch(*it) + { + case '?': + ++it; + read_past(it, end, "?>"); + break; + + case '!': + if (read(it, end, "!--")) + read_past(it, end, "-->"); + else + read_past(it, end, ">"); + break; + + default: + if ((*it >= 'a' && *it <= 'z') || + (*it >= 'A' && *it <= 'Z') || + *it == '_' || *it == ':') + { + read_to_one_of(it, end, " \t\n\r>"); + + for (;;) { + read_some_of(it, end, " \t\n\r"); + iterator name_start = it; + read_to_one_of(it, end, "= \t\n\r>"); + if (it == end || *it == '>') break; + string_ref name(name_start, it); + ++it; + + read_some_of(it, end, "= \t\n\r"); + if (it == end || (*it != '"' && *it != '\'')) break; + + char delim = *it; + ++it; + + iterator value_start = it; + + it = std::find(it, end, delim); + if (it == end) break; + string_ref value(value_start, it); + ++it; + + if (boost::find(id_attributes, name) + != id_attributes.end()) + { + c.id_value(value); + } + } + } + else + { + read_past(it, end, ">"); + } + } + } + + c.finish(source_ref); + } +# 813 "quickbook/src/id_manager.cpp" + struct id_generation_data : intrusive_base + { + id_generation_data(std::string const& src_id) + : child_start(src_id.rfind('.') + 1), + id(normalize_id(src_id, child_start, max_size - 1)), + + + count(0) + { + if (std::isdigit(id[id.length() - 1])) + { + if (child_length() < max_size - 1) + id += '_'; + else + reduce_id(); + } + } + + void reduce_id() + { + (static_cast (0)); + std::size_t length = id.length() - 1; + while(length > child_start && std::isdigit(id[length - 1])) --length; + id.erase(length); + count = 0; + } + + std::size_t child_length() const + { + return id.length() - child_start; + } + + std::size_t child_start; + std::string id; + int count; + }; + + + + struct id_data + { + id_data() + : category(id_category::numbered), + used(false), + generation_data() + {} + + void update_category(id_category c) + { + if (c.c > category.c) category = c; + } + + id_category category; + + bool used; + boost::intrusive_ptr generation_data; + + + + + + + }; + + typedef boost::unordered_map allocated_ids; + typedef std::vector placeholder_index; + + placeholder_index index_placeholders(id_state&, std::string const& xml); + void resolve_id(id_placeholder&, allocated_ids&); + void generate_id(id_placeholder&, allocated_ids&); + + std::string process_ids(id_state& state, std::string const& xml) + { + placeholder_index placeholders = index_placeholders(state, xml); + + typedef std::vector::iterator iterator; + + iterator it = placeholders.begin(), + end = placeholders.end(); + + + + while (it != end) { + unsigned num_dots = (*it)->num_dots; + + + + + allocated_ids ids; + + iterator it2 = it; + do { + resolve_id(**it2++, ids); + } while(it2 != end && (*it2)->num_dots == num_dots); + + do { + generate_id(**it++, ids); + } while(it != it2); + } + + return replace_ids(state, xml); + } +# 923 "quickbook/src/id_manager.cpp" + struct placeholder_compare + { + bool operator()(id_placeholder* x, id_placeholder* y) const + { + bool x_explicit = x->category.c >= id_category::explicit_id; + bool y_explicit = y->category.c >= id_category::explicit_id; + + return + x->num_dots < y->num_dots ? true : + x->num_dots > y->num_dots ? false : + x_explicit > y_explicit ? true : + x_explicit < y_explicit ? false : + x->order < y->order; + } + }; + + struct number_placeholders_callback : xml_processor::callback + { + id_state& state; + unsigned count; + + number_placeholders_callback(id_state& state) + : state(state), + count(0) + {} + + void id_value(string_ref value) + { + id_placeholder* p = state.get_placeholder(value); + number(p); + } + + void number(id_placeholder* p) + { + if (p && !p->order) { + number(p->parent); + p->order = ++count; + } + } + }; + + placeholder_index index_placeholders( + id_state& state, + std::string const& xml) + { + xml_processor processor; + number_placeholders_callback callback(state); + processor.parse(xml, callback); + + placeholder_index sorted_placeholders; + sorted_placeholders.reserve(state.placeholders.size()); + if (bool _foreach_is_rvalue974 = false) {} else if (boost::foreach_detail_::auto_any_t _foreach_col974 = boost::foreach_detail_::contain( (true ? boost::foreach_detail_::make_probe((state.placeholders), _foreach_is_rvalue974) : (state.placeholders)) , (boost::foreach_detail_::should_copy_impl( true ? 0 : boost::foreach_detail_::or_( boost::foreach_detail_::is_array_(state.placeholders) , boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(state.placeholders) , boost_foreach_argument_dependent_lookup_hack_value) , boost::foreach_detail_::not_(boost::foreach_detail_::is_const_(state.placeholders))) , true ? 0 : boost::foreach_detail_::and_( boost::foreach_detail_::not_(boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(state.placeholders) , boost_foreach_argument_dependent_lookup_hack_value)) , boost_foreach_is_lightweight_proxy( boost::foreach_detail_::to_ptr(state.placeholders) , boost_foreach_argument_dependent_lookup_hack_value)) , &_foreach_is_rvalue974)))) {} else if (boost::foreach_detail_::auto_any_t _foreach_cur974 = boost::foreach_detail_::begin( _foreach_col974 , (true ? 0 : boost::foreach_detail_::encode_type(state.placeholders, boost::foreach_detail_::is_const_(state.placeholders))) , (boost::foreach_detail_::should_copy_impl( true ? 0 : boost::foreach_detail_::or_( boost::foreach_detail_::is_array_(state.placeholders) , boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(state.placeholders) , boost_foreach_argument_dependent_lookup_hack_value) , boost::foreach_detail_::not_(boost::foreach_detail_::is_const_(state.placeholders))) , true ? 0 : boost::foreach_detail_::and_( boost::foreach_detail_::not_(boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(state.placeholders) , boost_foreach_argument_dependent_lookup_hack_value)) , boost_foreach_is_lightweight_proxy( boost::foreach_detail_::to_ptr(state.placeholders) , boost_foreach_argument_dependent_lookup_hack_value)) , &_foreach_is_rvalue974)))) {} else if (boost::foreach_detail_::auto_any_t _foreach_end974 = boost::foreach_detail_::end( _foreach_col974 , (true ? 0 : boost::foreach_detail_::encode_type(state.placeholders, boost::foreach_detail_::is_const_(state.placeholders))) , (boost::foreach_detail_::should_copy_impl( true ? 0 : boost::foreach_detail_::or_( boost::foreach_detail_::is_array_(state.placeholders) , boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(state.placeholders) , boost_foreach_argument_dependent_lookup_hack_value) , boost::foreach_detail_::not_(boost::foreach_detail_::is_const_(state.placeholders))) , true ? 0 : boost::foreach_detail_::and_( boost::foreach_detail_::not_(boost_foreach_is_noncopyable( boost::foreach_detail_::to_ptr(state.placeholders) , boost_foreach_argument_dependent_lookup_hack_value)) , boost_foreach_is_lightweight_proxy( boost::foreach_detail_::to_ptr(state.placeholders) , boost_foreach_argument_dependent_lookup_hack_value)) , &_foreach_is_rvalue974)))) {} else for (bool _foreach_continue974 = true; _foreach_continue974 && !boost::foreach_detail_::done( _foreach_cur974 , _foreach_end974 , (true ? 0 : boost::foreach_detail_::encode_type(state.placeholders, boost::foreach_detail_::is_const_(state.placeholders)))); _foreach_continue974 ? boost::foreach_detail_::next( _foreach_cur974 , (true ? 0 : boost::foreach_detail_::encode_type(state.placeholders, boost::foreach_detail_::is_const_(state.placeholders)))) : (void)0) if (boost::foreach_detail_::set_false(_foreach_continue974)) {} else for (id_placeholder& p = boost::foreach_detail_::deref( _foreach_cur974 , (true ? 0 : boost::foreach_detail_::encode_type(state.placeholders, boost::foreach_detail_::is_const_(state.placeholders)))); !_foreach_continue974; _foreach_continue974 = true) + if (p.order) sorted_placeholders.push_back(&p); + boost::sort(sorted_placeholders, placeholder_compare()); + + return sorted_placeholders; + } +# 992 "quickbook/src/id_manager.cpp" + void resolve_id(id_placeholder& p, allocated_ids& ids) + { + if (p.generation_state == id_placeholder::child) + { + (static_cast (0)); + + (static_cast (0)); + + p.id = p.parent->id + "." + p.id; + p.generation_state = id_placeholder::unresolved; + p.parent = 0; + } + + (static_cast (0)); + + id_data& data = ids.emplace(p.id, id_data()).first->second; + data.update_category(p.category); + + p.data = &data; + p.generation_state = id_placeholder::resolved; + } + + + + + + + + void register_generation_data(id_placeholder&, allocated_ids&); + + void generate_id(id_placeholder& p, allocated_ids& ids) + { + (static_cast (0)); + + + + if (p.category == p.data->category && !p.data->used && + p.category.c != id_category::numbered) + { + p.data->used = true; + p.generation_state = id_placeholder::generated; + p.data = 0; + return; + } + + if (!p.data->generation_data) + { + p.data->generation_data.reset(new id_generation_data(p.id)); + register_generation_data(p, ids); + } + + + for(;;) + { + id_generation_data& generation_data = *p.data->generation_data; + + std::string postfix = + boost::lexical_cast(generation_data.count++); + + if (generation_data.child_length() + postfix.length() > max_size) { + + generation_data.reduce_id(); + register_generation_data(p, ids); + } + else { + std::string id = generation_data.id + postfix; + + if (ids.find(id) == ids.end()) { + p.id.swap(id); + p.generation_state = id_placeholder::generated; + p.data = 0; + return; + } + } + } + } + + + + void register_generation_data(id_placeholder& p, allocated_ids& ids) + { + std::string const& id = p.data->generation_data->id; + + id_data& new_data = ids.emplace(id, id_data()).first->second; + + + + if (new_data.generation_data) + p.data->generation_data = new_data.generation_data; + else + new_data.generation_data = p.data->generation_data; + } +# 1092 "quickbook/src/id_manager.cpp" + struct replace_ids_callback : xml_processor::callback + { + id_state& state; + bool use_resolved_ids; + std::string::const_iterator source_pos; + std::string result; + + replace_ids_callback(id_state& state, bool resolved) + : state(state), + use_resolved_ids(resolved), + source_pos(), + result() + {} + + void start(string_ref xml) + { + source_pos = xml.begin(); + } + + void id_value(string_ref value) + { + if (id_placeholder* p = state.get_placeholder(value)) + { + (static_cast (0)) + ; + std::string const& id = use_resolved_ids ? + p->id : p->unresolved_id; + + result.append(source_pos, value.begin()); + result.append(id.begin(), id.end()); + source_pos = value.end(); + } + } + + void finish(string_ref xml) + { + result.append(source_pos, xml.end()); + source_pos = xml.end(); + } + }; + + std::string replace_ids(id_state& state, std::string const& xml, + bool use_unresolved_ids) + { + xml_processor processor; + replace_ids_callback callback(state, use_unresolved_ids); + processor.parse(xml, callback); + return callback.result; + } +} diff --git a/411691/id_manager.i.1 b/411691/id_manager.i.1 new file mode 100644 index 0000000..3a104a7 --- /dev/null +++ b/411691/id_manager.i.1 @@ -0,0 +1,333 @@ + namespace std { + typedef long unsigned int size_t; + } + typedef long unsigned int size_t; + namespace std __attribute__ ((__visibility__ ("default"))) { + template inline _Tp* __addressof(_Tp& __r) { + } + template struct __traitor { + }; + template struct __is_integer { + }; + template struct __is_floating { + }; + template struct __is_pointer { + }; + template struct __is_normal_iterator { + }; + template struct __is_arithmetic : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > { + }; + template struct __is_scalar : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > { + }; + } + namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + template struct __enable_if { + }; + } + namespace std __attribute__ ((__visibility__ ("default"))) { + template struct _Iter_base { + }; + } + namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + template class __normal_iterator { + protected: _Iterator _M_current; + public: typedef _Iterator iterator_type; + __normal_iterator() : _M_current(_Iterator()) { + } + }; + } + namespace std __attribute__ ((__visibility__ ("default"))) { + template struct _Niter_base : _Iter_base<_Iterator, __is_normal_iterator<_Iterator>::__value> { + }; + template inline typename _Niter_base<_Iterator>::iterator_type __niter_base(_Iterator __it) { + } + template struct char_traits; + } + extern "C++" { + namespace std { + class exception { + public: exception() throw() { + } + virtual ~exception() throw(); + }; + } + } + namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + template class new_allocator { + public: typedef size_t size_type; + typedef const _Tp* const_pointer; + typedef _Tp& reference; + }; + } + namespace std __attribute__ ((__visibility__ ("default"))) { + template class allocator: public __gnu_cxx::new_allocator<_Tp> { + public: typedef size_t size_type; + template struct rebind { + typedef allocator<_Tp1> other; + }; + }; + template _ForwardIterator __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, _Allocator& __alloc) { + try { + } + catch(...) { + } + } + } + namespace boost { + template class scoped_ptr { + private: T * px; + public: typedef T element_type; + explicit scoped_ptr( T * p = 0 ): px( p ) { + } + }; + } + namespace std __attribute__ ((__visibility__ ("default"))) { + template, typename _Alloc = allocator<_CharT> > class basic_string; + typedef basic_string string; + template<> struct char_traits { + typedef char char_type; + static void assign(char_type& __c1, const char_type& __c2) { + } + } + __pthread_unwind_buf_t __attribute__ ((__aligned__)); + } + typedef int _Atomic_word; + namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { + static inline _Atomic_word __attribute__ ((__unused__)) __exchange_and_add_dispatch(_Atomic_word* __mem, int __val) { + } + } + namespace std __attribute__ ((__visibility__ ("default"))) { + template class basic_string { + typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type; + public: typedef _Traits traits_type; + typedef _Alloc allocator_type; + typedef typename _CharT_alloc_type::size_type size_type; + typedef typename _CharT_alloc_type::reference reference; + typedef typename _CharT_alloc_type::const_pointer const_pointer; + typedef __gnu_cxx::__normal_iterator const_iterator; + private: struct _Rep_base { + _Atomic_word _M_refcount; + }; + struct _Rep : _Rep_base { + void _M_set_length_and_sharable(size_type __n) { + } + _CharT* _M_refdata() throw() { + return reinterpret_cast<_CharT*>(this + 1); + } + void _M_dispose(const _Alloc& __a) { + if (__builtin_expect(this != &_S_empty_rep(), false)) { + if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount, -1) <= 0) { + _M_destroy(__a); + } + } + } + void _M_destroy(const _Alloc&) throw(); + }; + struct _Alloc_hider : _Alloc { + _Alloc_hider(_CharT* __dat, const _Alloc& __a) : _Alloc(__a), _M_p(__dat) { + } + _CharT* _M_p; + }; + public: static const size_type npos = static_cast(-1); + private: mutable _Alloc_hider _M_dataplus; + _Rep* _M_rep() const { + } + size_type _M_limit(size_type __pos, size_type __off) const { + } + static _Rep& _S_empty_rep() { + } + public: basic_string() : _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) { + } + ~basic_string() { + _M_rep()->_M_dispose(this->get_allocator()); + } + size_type length() const { + } + reference operator[](size_type __pos) { + } + basic_string& erase(size_type __pos = 0, size_type __n = npos) { + } + allocator_type get_allocator() const { + } + }; + } + namespace boost { + namespace detail { + template class empty_base { + }; + } + template > struct less_than_comparable2 : B { + }; + template > struct equality_comparable2 : B { + }; + namespace detail { + struct false_t { + }; + } + template struct is_chained_base { + typedef ::boost::detail::false_t value; + }; + template ,class O = typename is_chained_base::value > struct less_than_comparable : less_than_comparable2 { + }; + template ,class O = typename is_chained_base::value > struct equality_comparable : equality_comparable2 { + }; + namespace type_traits { + } + template class intrusive_ptr { + private: typedef intrusive_ptr this_type; + public: typedef T element_type; + intrusive_ptr(): px( 0 ) { + } + intrusive_ptr( T * p, bool add_ref = true ): px( p ) { + } + ~intrusive_ptr() { + if( px != 0 ) intrusive_ptr_release( px ); + } + T * operator->() const { + return px; + } + typedef T * this_type::*unspecified_bool_type; + operator unspecified_bool_type() const { + } + private: T * px; + }; + } + namespace quickbook { + struct section_info; + struct string_ref : boost::less_than_comparable > > > { + public: typedef std::string::const_iterator iterator; + private: iterator begin_, end_; + public: string_ref() : begin_(), end_() { + } + }; + namespace exception_detail { + } + } + extern "C++" { + namespace std { + class bad_cast : public exception { + }; + } + } + namespace quickbook { + template struct intrusive_base { + intrusive_base() : ref_count_(0) { + } + ~intrusive_base() { + } + friend void intrusive_ptr_release(T* ptr) { + if(--ptr->ref_count_ == 0) delete ptr; + } + private: unsigned ref_count_; + }; + struct id_category { + enum categories { + default_category = 0, numbered, generated, generated_heading, generated_section, generated_doc, explicit_id, explicit_section_id, explicit_anchor_id }; + categories c; + }; + struct id_state; + struct id_manager { + id_manager(); + private: boost::scoped_ptr state; + }; + } + namespace boost{ + namespace detail { + } + } + namespace std __attribute__ ((__visibility__ ("default"))) { + template struct _Deque_iterator { + }; + template class _Deque_base { + public: typedef _Alloc allocator_type; + typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator; + _Deque_base() : _M_impl() { + _M_initialize_map(0); + } + typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; + struct _Deque_impl : public _Tp_alloc_type { + _Tp** _M_map; + size_t _M_map_size; + iterator _M_start; + iterator _M_finish; + _Deque_impl() : _Tp_alloc_type(), _M_map(0), _M_map_size(0), _M_start(), _M_finish() { + } + }; + protected: void _M_initialize_map(size_t); + _Deque_impl _M_impl; + }; + template > class deque : protected _Deque_base<_Tp, _Alloc> { + }; + namespace numeric { + enum range_check_result { + cInRange = 0 , cNegOverflow = 1 , cPosOverflow = 2 } + ; + class bad_numeric_cast : public std::bad_cast { + }; + class negative_overflow : public bad_numeric_cast { + void operator() ( range_check_result r ) { + if ( r == cNegOverflow ) throw negative_overflow() ; + } + } + ; + } + } + namespace quickbook { + static const std::size_t max_size = 32; + struct id_placeholder { + }; + struct file_info; + struct doc_info; + struct id_state { + boost::intrusive_ptr current_file; + std::deque placeholders; + private: id_placeholder* add_id_to_section( std::string const& id, id_category category, boost::intrusive_ptr const& section); + }; + struct file_info : intrusive_base { + boost::intrusive_ptr parent; + boost::intrusive_ptr document; + bool document_root; + unsigned compatibility_version; + boost::intrusive_ptr switched_section; + id_placeholder* original_placeholder; + std::string doc_id_1_1; + file_info(boost::intrusive_ptr const& parent, unsigned compatibility_version) : parent(parent), document(parent->document), document_root(false), compatibility_version(compatibility_version), switched_section(), original_placeholder() { + } + }; + struct doc_info : intrusive_base { + boost::intrusive_ptr current_section; + std::string last_title_1_1; + std::string section_id_1_1; + }; + struct section_info : intrusive_base { + boost::intrusive_ptr parent; + unsigned compatibility_version; + unsigned level; + std::string id_1_1; + id_placeholder* placeholder_1_6; + section_info(boost::intrusive_ptr const& parent, unsigned compatibility_version, std::string const& id) : parent(parent), compatibility_version(compatibility_version), level(parent ? parent->level + 1 : 1), id_1_1(), placeholder_1_6(0) { + } + }; + id_manager::id_manager() : state(new id_state) { + } + namespace { + std::string normalize_id( std::string src_id, std::size_t prefix = 0, std::size_t size = max_size) { + std::string id; + std::size_t src = prefix; + std::size_t dst = prefix; + if (src >= id.length()) { + if (id[src] == '_') { + } + } + id.erase(dst); + } + } + id_placeholder* id_state::add_id_to_section( std::string const& id, id_category category, boost::intrusive_ptr const& section) { + std::string id_part = id; + if (current_file->compatibility_version >= 106u && category.c < id_category::explicit_id) { + id_part = normalize_id(id); + } + boost::intrusive_ptr parent = current_file->document->current_section; + boost::intrusive_ptr new_section = new section_info(parent, current_file->compatibility_version, id); + }; + } diff --git a/411691/id_manager.i.2 b/411691/id_manager.i.2 new file mode 100644 index 0000000..f1389b2 --- /dev/null +++ b/411691/id_manager.i.2 @@ -0,0 +1,314 @@ +typedef long unsigned int size_t; + namespace std { + template _Tp* __addressof(_Tp& __r) { + } + template struct __traitor { + }; + template struct __is_integer { + }; + template struct __is_floating { + }; + template struct __is_pointer { + }; + template struct __is_normal_iterator { + }; + template struct __is_arithmetic : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > { + }; + template struct __is_scalar : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > { + }; + template struct _Iter_base { }; + + template struct _Niter_base : _Iter_base<_Iterator, __is_normal_iterator<_Iterator>::__value> { }; + template typename _Niter_base<_Iterator>::iterator_type __niter_base(_Iterator __it) { } + template struct char_traits; + class exception { + public: exception() throw() { } + virtual ~exception() throw(); + }; + + + } + namespace __gnu_cxx { + template struct __enable_if { }; + template class __normal_iterator { + protected: _Iterator _M_current; + public: typedef _Iterator iterator_type; + __normal_iterator() : _M_current(_Iterator()) { + } + }; + template class new_allocator { + public: + typedef const _Tp* const_pointer; + typedef _Tp& reference; + }; + } + namespace std { + + template class allocator: public __gnu_cxx::new_allocator<_Tp> { + public: + template struct rebind { + typedef allocator<_Tp1> other; + }; + }; + template _ForwardIterator __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, _ForwardIterator __result, _Allocator& __alloc) { + try { + } + catch(...) { + } + } + + } + namespace boost { + template class scoped_ptr { + private: T * px; + public: typedef T element_type; + explicit scoped_ptr( T * p = 0 ): px( p ) { + } + }; + } + namespace std { + template, typename _Alloc = allocator<_CharT> > class basic_string; + typedef basic_string string; + template<> struct char_traits { + typedef char char_type; + static void assign(char_type& __c1, const char_type& __c2) { + } + } + __pthread_unwind_buf_t ; + } + typedef int _Atomic_word; + namespace __gnu_cxx { + static _Atomic_word __exchange_and_add_dispatch(_Atomic_word* __mem, int __val) { + } + } + namespace std { + template class basic_string { + typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type; + public: typedef _Traits traits_type; + typedef _Alloc allocator_type; + typedef typename _CharT_alloc_type::reference reference; + typedef typename _CharT_alloc_type::const_pointer const_pointer; + typedef __gnu_cxx::__normal_iterator const_iterator; + private: struct _Rep_base { + _Atomic_word _M_refcount; + }; + struct _Rep : _Rep_base { + void _M_set_length_and_sharable(size_t __n) { + } + _CharT* _M_refdata() throw() { + return reinterpret_cast<_CharT*>(this + 1); + } + void _M_dispose(const _Alloc& __a) { + if (__builtin_expect(this != &_S_empty_rep(), false)) { + if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount, -1) <= 0) { + _M_destroy(__a); + } + } + } + void _M_destroy(const _Alloc&) throw(); + }; + struct _Alloc_hider : _Alloc { + _Alloc_hider(_CharT* __dat, const _Alloc& __a) : _Alloc(__a), _M_p(__dat) { + } + _CharT* _M_p; + }; + public: static const size_t npos = static_cast(-1); + private: mutable _Alloc_hider _M_dataplus; + _Rep* _M_rep() const { + } + size_t _M_limit(size_t __pos, size_t __off) const { + } + static _Rep& _S_empty_rep() { + } + public: basic_string() : _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) { + } + ~basic_string() { + _M_rep()->_M_dispose(this->get_allocator()); + } + size_t length() const { + } + reference operator[](size_t __pos) { + } + basic_string& erase(size_t __pos = 0, size_t __n = npos) { + } + allocator_type get_allocator() const { + } + }; + } + namespace boost { + namespace detail { + template class empty_base { + }; + } + template > struct less_than_comparable2 : B { + }; + template > struct equality_comparable2 : B { + }; + namespace detail { + struct false_t { + }; + } + template struct is_chained_base { + typedef ::boost::detail::false_t value; + }; + template ,class O = typename is_chained_base::value > struct less_than_comparable : less_than_comparable2 { + }; + template ,class O = typename is_chained_base::value > struct equality_comparable : equality_comparable2 { + }; + namespace type_traits { + } + template class intrusive_ptr { + private: typedef intrusive_ptr this_type; + public: typedef T element_type; + intrusive_ptr(): px( 0 ) { + } + intrusive_ptr( T * p, bool add_ref = true ): px( p ) { + } + ~intrusive_ptr() { + if( px != 0 ) intrusive_ptr_release( px ); + } + T * operator->() const { + return px; + } + typedef T * this_type::*unspecified_bool_type; + operator unspecified_bool_type() const { + } + private: T * px; + }; + } + namespace quickbook { + struct section_info; + struct string_ref : boost::less_than_comparable > > > { + public: typedef std::string::const_iterator iterator; + private: iterator begin_, end_; + public: string_ref() : begin_(), end_() { + } + }; + namespace exception_detail { + } + } + namespace std { + class bad_cast : public exception { }; + } + namespace quickbook { + template struct intrusive_base { + intrusive_base() : ref_count_(0) { + } + ~intrusive_base() { + } + friend void intrusive_ptr_release(T* ptr) { + if(--ptr->ref_count_ == 0) delete ptr; + } + private: unsigned ref_count_; + }; + struct id_category { + enum categories { + default_category = 0, numbered, generated, generated_heading, generated_section, generated_doc, explicit_id, explicit_section_id, explicit_anchor_id }; + categories c; + }; + struct id_state; + struct id_manager { + id_manager(); + private: boost::scoped_ptr state; + }; + } + namespace boost{ + namespace detail { + } + } + namespace std { + template struct _Deque_iterator { + }; + template class _Deque_base { + public: typedef _Alloc allocator_type; + typedef _Deque_iterator<_Tp, _Tp&, _Tp*> iterator; + _Deque_base() : _M_impl() { + _M_initialize_map(0); + } + typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; + struct _Deque_impl : public _Tp_alloc_type { + _Tp** _M_map; + size_t _M_map_size; + iterator _M_start; + iterator _M_finish; + _Deque_impl() : _Tp_alloc_type(), _M_map(0), _M_map_size(0), _M_start(), _M_finish() { + } + }; + protected: void _M_initialize_map(size_t); + _Deque_impl _M_impl; + }; + template > class deque : protected _Deque_base<_Tp, _Alloc> { + }; + namespace numeric { + enum range_check_result { + cInRange = 0 , cNegOverflow = 1 , cPosOverflow = 2 } + ; + class bad_numeric_cast : public std::bad_cast { + }; + class negative_overflow : public bad_numeric_cast { + void operator() ( range_check_result r ) { + if ( r == cNegOverflow ) throw negative_overflow() ; + } + } + ; + } + } + namespace quickbook { + static const size_t max_size = 32; + struct id_placeholder { + }; + struct file_info; + struct doc_info; + struct id_state { + boost::intrusive_ptr current_file; + std::deque placeholders; + private: id_placeholder* add_id_to_section( std::string const& id, id_category category, boost::intrusive_ptr const& section); + }; + struct file_info : intrusive_base { + boost::intrusive_ptr parent; + boost::intrusive_ptr document; + bool document_root; + unsigned compatibility_version; + boost::intrusive_ptr switched_section; + id_placeholder* original_placeholder; + std::string doc_id_1_1; + file_info(boost::intrusive_ptr const& parent, unsigned compatibility_version) : parent(parent), document(parent->document), document_root(false), compatibility_version(compatibility_version), switched_section(), original_placeholder() { + } + }; + struct doc_info : intrusive_base { + boost::intrusive_ptr current_section; + std::string last_title_1_1; + std::string section_id_1_1; + }; + struct section_info : intrusive_base { + boost::intrusive_ptr parent; + unsigned compatibility_version; + unsigned level; + std::string id_1_1; + id_placeholder* placeholder_1_6; + section_info(boost::intrusive_ptr const& parent, unsigned compatibility_version, std::string const& id) : parent(parent), compatibility_version(compatibility_version), level(parent ? parent->level + 1 : 1), id_1_1(), placeholder_1_6(0) { + } + }; + id_manager::id_manager() : state(new id_state) { + } + namespace { + std::string normalize_id( std::string src_id, size_t prefix = 0, size_t size = max_size) { + std::string id; + size_t src = prefix; + size_t dst = prefix; + if (src >= id.length()) { + if (id[src] == '_') { + } + } + id.erase(dst); + } + } + id_placeholder* id_state::add_id_to_section( std::string const& id, id_category category, boost::intrusive_ptr const& section) { + std::string id_part = id; + if (current_file->compatibility_version >= 106u && category.c < id_category::explicit_id) { + id_part = normalize_id(id); + } + boost::intrusive_ptr parent = current_file->document->current_section; + boost::intrusive_ptr new_section = new section_info(parent, current_file->compatibility_version, id); + }; + } diff --git a/411691/id_manager.i.3 b/411691/id_manager.i.3 new file mode 100644 index 0000000..f8b9c5b --- /dev/null +++ b/411691/id_manager.i.3 @@ -0,0 +1,247 @@ +typedef int _Atomic_word; +typedef long unsigned int size_t; + + +namespace __gnu_cxx { + template < typename _Tp > class new_allocator { + public:typedef const _Tp *const_pointer; + typedef _Tp & reference; + }; + static _Atomic_word __exchange_and_add_dispatch(_Atomic_word * __mem, + int __val) {} +} + +namespace std { + template < typename _CharT > struct char_traits; + class exception { + public:exception() throw() { + } virtual ~ exception() throw(); + }; + class bad_cast:public exception { }; + template < typename _Tp > + class allocator:public __gnu_cxx::new_allocator < _Tp > { + public:template < typename _Tp1 > struct rebind { + typedef allocator < _Tp1 > other; + }; + }; + template < typename _CharT, typename _Traits = + char_traits < _CharT >, typename _Alloc = + allocator < _CharT > >class basic_string; + typedef basic_string < char >string; + template <> struct char_traits { + } __pthread_unwind_buf_t; + + template < typename _CharT, typename _Traits, + typename _Alloc > class basic_string { + typedef typename _Alloc::template rebind < + _CharT >::other _CharT_alloc_type; + typedef _Alloc allocator_type; + typedef typename _CharT_alloc_type::reference reference; + private:struct _Rep_base { + _Atomic_word _M_refcount; + }; + struct _Rep:_Rep_base { + _CharT *_M_refdata() throw() { + return reinterpret_cast < _CharT * >(this + 1); + } void _M_dispose(const _Alloc & __a) { + if (__builtin_expect + (this != &_S_empty_rep(), false)) { + if (__gnu_cxx:: + __exchange_and_add_dispatch(&this-> + _M_refcount, + -1) <= + 0) { + _M_destroy(__a); + } + } + } void _M_destroy(const _Alloc &) throw(); + }; + struct _Alloc_hider:_Alloc { + _Alloc_hider(_CharT * __dat, + const _Alloc & __a):_Alloc(__a), + _M_p(__dat) { + } _CharT *_M_p; + }; + public:static const size_t npos = + static_cast < size_t > (-1); + private:mutable _Alloc_hider _M_dataplus; + _Rep *_M_rep() const { + } static _Rep & _S_empty_rep() { + } + public: basic_string():_M_dataplus(_S_empty_rep()._M_refdata(), + _Alloc()) { + } + ~basic_string() { + _M_rep()->_M_dispose(this->get_allocator()); + } + size_t length() const { + } reference operator[] (size_t __pos) { + } + basic_string & erase(size_t __pos = 0, size_t __n = npos) { + } + allocator_type get_allocator() const { + }}; + template < typename _Tp, typename _Ref, typename _Ptr > struct _Deque_iterator { + }; + template < typename _Tp, typename _Alloc > class _Deque_base { + public:typedef _Alloc allocator_type; + typedef _Deque_iterator < _Tp, _Tp &, _Tp * >iterator; + _Deque_base():_M_impl() { + _M_initialize_map(0); + } typedef typename _Alloc::template rebind < + _Tp >::other _Tp_alloc_type; + struct _Deque_impl:public _Tp_alloc_type { + _Tp **_M_map; + size_t _M_map_size; + iterator _M_start; + iterator _M_finish; + _Deque_impl():_Tp_alloc_type(), _M_map(0), + _M_map_size(0), _M_start(), _M_finish() { + }}; + protected:void _M_initialize_map(size_t); + _Deque_impl _M_impl; + }; + template < typename _Tp, typename _Alloc = std::allocator < _Tp > >class deque:protected _Deque_base < _Tp, + _Alloc > + { + }; + namespace numeric { + enum range_check_result { + cInRange = 0, cNegOverflow = 1, cPosOverflow = 2 + }; + class bad_numeric_cast:public std::bad_cast { + }; + class negative_overflow:public bad_numeric_cast { + void operator() (range_check_result r) { + if (r == cNegOverflow) + throw negative_overflow(); + }}; + } +} + +namespace boost { + template < class T > class scoped_ptr { + private:T * px; + public:typedef T element_type; + explicit scoped_ptr(T * p = 0):px(p) { + }}; + template < class T > class intrusive_ptr { + private:typedef intrusive_ptr this_type; + public:typedef T element_type; + intrusive_ptr():px(0) { + } intrusive_ptr(T * p, bool add_ref = true):px(p) { + } + ~intrusive_ptr() { + if (px != 0) + intrusive_ptr_release(px); + } + T *operator->() const { + return px; + } typedef T *this_type::*unspecified_bool_type; + operator unspecified_bool_type() const { + } private: T * px; + }; +} + +namespace quickbook { + struct section_info; + template < typename T > struct intrusive_base { + intrusive_base():ref_count_(0) { + } ~intrusive_base() { + } friend void intrusive_ptr_release(T * ptr) { + if (--ptr->ref_count_ == 0) + delete ptr; + } + private:unsigned ref_count_; + }; + struct id_category { + enum categories { + default_category = + 0, numbered, generated, generated_heading, + generated_section, generated_doc, explicit_id, + explicit_section_id, explicit_anchor_id + }; + categories c; + }; + struct id_state; + struct id_manager { + id_manager(); + private:boost::scoped_ptr < id_state > state; + }; + static const size_t max_size = 32; + struct id_placeholder; + struct file_info; + struct doc_info; + struct id_state { + boost::intrusive_ptr < file_info > current_file; + std::deque < id_placeholder > placeholders; + private:id_placeholder * add_id_to_section(std::string const &id, + id_category category, + boost::intrusive_ptr < + section_info > + const §ion); + }; + struct file_info:intrusive_base < file_info > { + boost::intrusive_ptr < file_info > parent; + boost::intrusive_ptr < doc_info > document; + bool document_root; + unsigned compatibility_version; + boost::intrusive_ptr < section_info > switched_section; + id_placeholder *original_placeholder; + std::string doc_id_1_1; + file_info(boost::intrusive_ptr < file_info > const &parent, + unsigned compatibility_version):parent(parent), + document(parent->document), document_root(false), + compatibility_version(compatibility_version), + switched_section(), original_placeholder() { + }}; + struct doc_info:intrusive_base < doc_info > { + boost::intrusive_ptr < section_info > current_section; + std::string last_title_1_1; + std::string section_id_1_1; + }; + struct section_info:intrusive_base < section_info > { + boost::intrusive_ptr < section_info > parent; + unsigned compatibility_version; + unsigned level; + std::string id_1_1; + id_placeholder *placeholder_1_6; + section_info(boost::intrusive_ptr < section_info > + const &parent, unsigned compatibility_version, + std::string const &id):parent(parent), + compatibility_version(compatibility_version), + level(parent ? parent->level + 1 : 1), id_1_1(), + placeholder_1_6(0) { + }}; + id_manager::id_manager():state(new id_state) { + } + namespace { + std::string normalize_id(std::string src_id) { + size_t prefix; prefix = 0; size_t size; size = max_size; + std::string id; + size_t src; src = prefix; + size_t dst; dst = prefix; + if (src >= id.length()) { + if (id[src] == '_') { + } + } + id.erase(dst); + } + } + id_placeholder *id_state::add_id_to_section(std::string const &id, + id_category category, + boost::intrusive_ptr < + section_info > + const §ion) { + std::string id_part = id; + if (current_file->compatibility_version >= 106u + && category.c < id_category::explicit_id) { + id_part = normalize_id(id); + } + boost::intrusive_ptr < section_info > parent = + current_file->document->current_section; + boost::intrusive_ptr < section_info > new_section = + new section_info(parent, + current_file->compatibility_version, id); + }; +} diff --git a/411691/id_manager.i.4 b/411691/id_manager.i.4 new file mode 100644 index 0000000..e1278d9 --- /dev/null +++ b/411691/id_manager.i.4 @@ -0,0 +1,243 @@ +typedef int _Atomic_word; +typedef long unsigned int size_t; +namespace __gnu_cxx { + template < typename _Tp > class new_allocator { + public:typedef const _Tp *const_pointer; + typedef _Tp & reference; + }; + static _Atomic_word __exchange_and_add_dispatch(_Atomic_word * __mem, + int __val) { + } +} + +namespace std { + template < typename _CharT > struct char_traits; + class exception { + public:exception() throw() { + } virtual ~ exception() throw(); + }; + class bad_cast:public exception { + }; + template < typename _Tp > class allocator:public __gnu_cxx::new_allocator < _Tp > + { + public:template < typename _Tp1 > struct rebind { + typedef allocator < _Tp1 > other; + }; + }; + template < typename _CharT, typename _Traits = + char_traits < _CharT >, typename _Alloc = + allocator < _CharT > >class basic_string; + typedef basic_string < char >string; + template < typename _CharT, typename _Traits, + typename _Alloc > class basic_string { + typedef typename _Alloc::template rebind < + _CharT >::other _CharT_alloc_type; + typedef _Alloc allocator_type; + typedef typename _CharT_alloc_type::reference reference; + private:struct _Rep_base { + _Atomic_word _M_refcount; + }; + struct _Rep:_Rep_base { + _CharT *_M_refdata() throw() { + return reinterpret_cast < _CharT * >(this + 1); + } void _M_dispose(const _Alloc & __a) { + if (__builtin_expect + (this != &_S_empty_rep(), false)) { + if (__gnu_cxx:: + __exchange_and_add_dispatch(&this-> + _M_refcount, + -1) <= + 0) { + _M_destroy(__a); + } + } + } + void _M_destroy(const _Alloc &) throw(); + }; + struct _Alloc_hider:_Alloc { + _Alloc_hider(_CharT * __dat, + const _Alloc & __a):_Alloc(__a), + _M_p(__dat) { + } _CharT *_M_p; + }; + public:static const size_t npos = + static_cast < size_t > (-1); + private:mutable _Alloc_hider _M_dataplus; + _Rep *_M_rep() const { + } static _Rep & _S_empty_rep() { + } + public: basic_string():_M_dataplus(_S_empty_rep()._M_refdata(), + _Alloc()) { + } + ~basic_string() { + _M_rep()->_M_dispose(this->get_allocator()); + } + size_t length() const { + } reference operator[] (size_t __pos) { + } + basic_string & erase(size_t __pos = 0, size_t __n = npos) { + } + allocator_type get_allocator() const { + }}; + template < typename _Tp, typename _Ref, typename _Ptr > struct _Deque_iterator { + }; + template < typename _Tp, typename _Alloc > class _Deque_base { + public:typedef _Alloc allocator_type; + typedef _Deque_iterator < _Tp, _Tp &, _Tp * >iterator; + _Deque_base():_M_impl() { + _M_initialize_map(0); + } + typedef typename _Alloc::template rebind < + _Tp >::other _Tp_alloc_type; + struct _Deque_impl:public _Tp_alloc_type { + _Tp **_M_map; + size_t _M_map_size; + iterator _M_start; + iterator _M_finish; + _Deque_impl():_Tp_alloc_type(), _M_map(0), + _M_map_size(0), _M_start(), _M_finish() { + }}; + protected:void _M_initialize_map(size_t); + _Deque_impl _M_impl; + }; + template < typename _Tp, typename _Alloc = std::allocator < _Tp > >class deque:protected _Deque_base < _Tp, + _Alloc > + { + }; + namespace numeric { + enum range_check_result { + cInRange = 0, cNegOverflow = 1, cPosOverflow = 2 + }; + class bad_numeric_cast:public std::bad_cast { + }; + class negative_overflow:public bad_numeric_cast { + void operator() (range_check_result r) { + if (r == cNegOverflow) + throw negative_overflow(); + }}; + } +} + +namespace boost { + template < class T > class scoped_ptr { + private:T * px; + public:typedef T element_type; + explicit scoped_ptr(T * p = 0):px(p) { + }}; + template < class T > class intrusive_ptr { + private:typedef intrusive_ptr this_type; + public:typedef T element_type; + intrusive_ptr():px(0) { + } + intrusive_ptr(T * p, bool add_ref = true):px(p) { + } + ~intrusive_ptr() { + if (px != 0) + intrusive_ptr_release(px); + } + T *operator->() const { + return px; + } typedef T *this_type::*unspecified_bool_type; + operator unspecified_bool_type() const { + } private: T * px; + }; + struct section_info; + template < typename T > struct intrusive_base { + intrusive_base():ref_count_(0) { + } ~intrusive_base() { + } + friend void intrusive_ptr_release(T * ptr) { + if (--ptr->ref_count_ == 0) + delete ptr; + } + private:unsigned ref_count_; + }; + struct id_category { + enum categories { + default_category = + 0, numbered, generated, generated_heading, + generated_section, generated_doc, explicit_id, + explicit_section_id, explicit_anchor_id + }; + categories c; + }; + struct id_state; + struct id_manager { + id_manager(); + private:boost::scoped_ptr < id_state > state; + }; + struct id_placeholder; + struct file_info; + struct doc_info; + struct id_state { + boost::intrusive_ptr < file_info > current_file; + std::deque < id_placeholder > placeholders; + private:id_placeholder * add_id_to_section(std::string const &id, + id_category category, + boost::intrusive_ptr < + section_info > + const §ion); + }; + struct file_info:intrusive_base < file_info > { + boost::intrusive_ptr < file_info > parent; + boost::intrusive_ptr < doc_info > document; + bool document_root; + unsigned compatibility_version; + boost::intrusive_ptr < section_info > switched_section; + id_placeholder *original_placeholder; + std::string doc_id_1_1; + file_info(boost::intrusive_ptr < file_info > const &parent, + unsigned compatibility_version):parent(parent), + document(parent->document), document_root(false), + compatibility_version(compatibility_version), + switched_section(), original_placeholder() { + }}; + struct doc_info:intrusive_base < doc_info > { + boost::intrusive_ptr < section_info > current_section; + std::string last_title_1_1; + std::string section_id_1_1; + }; + struct section_info:intrusive_base < section_info > { + boost::intrusive_ptr < section_info > parent; + unsigned compatibility_version; + unsigned level; + std::string id_1_1; + id_placeholder *placeholder_1_6; + section_info(boost::intrusive_ptr < section_info > + const &parent, unsigned compatibility_version, + std::string const &id):parent(parent), + compatibility_version(compatibility_version), + level(parent ? parent->level + 1 : 1), id_1_1(), + placeholder_1_6(0) { + }}; + id_manager::id_manager():state(new id_state) { + } + namespace { + std::string normalize_id(std::string src_id) { + std::string id; + size_t src; + size_t dst; + if (src >= id.length()) { + if (id[src] == '_') { + } + } + id.erase(dst); + } + } + id_placeholder *id_state::add_id_to_section(std::string const &id, + id_category category, + boost::intrusive_ptr < + section_info > + const §ion) { + std::string id_part = id; + if (current_file->compatibility_version >= 106u + && category.c < id_category::explicit_id) { + id_part = normalize_id(id); + } + boost::intrusive_ptr < section_info > parent = + current_file->document->current_section; + boost::intrusive_ptr < section_info > new_section = + new section_info(parent, + current_file->compatibility_version, id); + }; +} diff --git a/411691/id_manager.i.5 b/411691/id_manager.i.5 new file mode 100644 index 0000000..1cef647 --- /dev/null +++ b/411691/id_manager.i.5 @@ -0,0 +1,209 @@ + int __exchange_and_add_dispatch(int * __mem); + + template < typename _Tp > class new_allocator { + public: + typedef _Tp & reference; + }; + +namespace std { + template < typename _CharT > struct char_traits; + class exception {}; + class bad_cast: + public +exception {} +; + template < typename _Tp > class allocator:public new_allocator < _Tp > + { + public:template < typename _Tp1 > struct rebind { + typedef allocator < _Tp1 > other; + }; + }; + template < typename _CharT, typename _Traits = + char_traits < _CharT >, typename _Alloc = + allocator < _CharT > >class basic_string; + typedef basic_string < char >string; + template < typename _CharT, typename _Traits, + typename _Alloc > class basic_string { + typedef typename _Alloc::template rebind < + _CharT >::other _CharT_alloc_type; + typedef _Alloc allocator_type; + typedef typename _CharT_alloc_type::reference reference; + private:struct _Rep_base { + int _M_refcount; + }; + struct _Rep:_Rep_base { + _CharT *_M_refdata() throw() { + return 0; + } +void _M_dispose(const _Alloc & __a) { + if (this != &_S_empty_rep()) +{ + if ( __exchange_and_add_dispatch(&this-> _M_refcount)) +{ + _M_destroy(__a); + } + } + } + void _M_destroy(const _Alloc &) throw(); + }; + struct _Alloc_hider:_Alloc { + _Alloc_hider(_CharT * __dat, + const _Alloc & __a):_Alloc(__a), + _M_p(__dat) { + } _CharT *_M_p; + }; + public: + private:mutable _Alloc_hider _M_dataplus; + _Rep *_M_rep() const { + } static _Rep & _S_empty_rep() { + } + public: basic_string(): +_M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) { } + ~basic_string() { + _M_rep()->_M_dispose(this->get_allocator()); + } + basic_string & erase() {} + allocator_type get_allocator() const { + }}; + template < typename _Tp, typename _Ref, typename _Ptr > struct _Deque_iterator { + }; + template < typename _Tp, typename _Alloc > class _Deque_base { + public:typedef _Alloc allocator_type; + typedef _Deque_iterator < _Tp, _Tp &, _Tp * >iterator; + _Deque_base():_M_impl() { + _M_initialize_map(0); + } + typedef typename _Alloc::template rebind < + _Tp >::other _Tp_alloc_type; + struct _Deque_impl:public _Tp_alloc_type { + _Tp **_M_map; + long unsigned int _M_map_size; + iterator _M_start; + iterator _M_finish; + _Deque_impl():_Tp_alloc_type(), _M_map(0), + _M_map_size(0), _M_start(), _M_finish() { + }}; + protected:void _M_initialize_map(long unsigned int); + _Deque_impl _M_impl; + }; + template < typename _Tp, typename _Alloc = std::allocator < _Tp > >class deque:protected _Deque_base < _Tp, + _Alloc > + { + }; + namespace numeric { + class bad_numeric_cast: + public std::bad_cast { }; + class negative_overflow: + public bad_numeric_cast { + void operator() (int) { throw negative_overflow(); } + }; + } +} + +namespace boost { + template < class T > class scoped_ptr { + private:T * px; + public:typedef T element_type; + explicit scoped_ptr(T * p = 0):px(p) { + }}; + template < class T > class intrusive_ptr { + private:typedef intrusive_ptr this_type; + public:typedef T element_type; + intrusive_ptr():px(0) { + } + intrusive_ptr(T * p, bool add_ref = true):px(p) { + } + ~intrusive_ptr() { + intrusive_ptr_release(px); + } + T *operator->() const { + return px; + } typedef T *this_type::*unspecified_bool_type; + operator unspecified_bool_type() const { + } private: T * px; + }; + struct section_info; + template < typename T > struct intrusive_base { + intrusive_base():ref_count_(0) { + } ~intrusive_base() { + } + friend void intrusive_ptr_release(T * ptr) { + delete ptr; + } + private: +unsigned ref_count_; + }; + struct id_category { + enum categories { + default_category = + 0, numbered, generated, generated_heading, + generated_section, generated_doc, explicit_id, + explicit_section_id, explicit_anchor_id + }; + categories c; + }; + struct id_placeholder; + struct file_info; + struct doc_info; + struct id_state { + boost::intrusive_ptr < file_info > current_file; + std::deque < id_placeholder > placeholders; + private:id_placeholder * add_id_to_section(std::string const &id, + id_category category, + boost::intrusive_ptr < + section_info > + const §ion); + }; + struct id_manager { + id_manager(); + private:boost::scoped_ptr < id_state > state; + }; + struct file_info:intrusive_base < file_info > { + boost::intrusive_ptr < file_info > parent; + boost::intrusive_ptr < doc_info > document; + bool document_root; + unsigned compatibility_version; + boost::intrusive_ptr < section_info > switched_section; + id_placeholder *original_placeholder; + file_info(boost::intrusive_ptr < file_info > const &parent, + unsigned compatibility_version):parent(parent), + document(parent->document), document_root(false), + compatibility_version(compatibility_version), + switched_section(), original_placeholder() { + }}; + struct doc_info:intrusive_base < doc_info > { + boost::intrusive_ptr < section_info > current_section; + }; + struct section_info:intrusive_base < section_info > { + boost::intrusive_ptr < section_info > parent; + unsigned compatibility_version; + unsigned level; + std::string id_1_1; + id_placeholder *placeholder_1_6; + section_info(boost::intrusive_ptr < section_info > + const &parent, unsigned compatibility_version, + std::string const &id):parent(parent), + compatibility_version(compatibility_version), + level(1) +, id_1_1(), + placeholder_1_6(0) {} +}; + id_manager::id_manager():state() { } + namespace { + std::string normalize_id( +std::string +) { + std::string id; + id.erase(); + } + } + id_placeholder *id_state::add_id_to_section(std::string const &id, + id_category category, + boost::intrusive_ptr < + section_info > + const §ion) { + std::string id_part = id; +normalize_id(id); + boost::intrusive_ptr < section_info > parent; + }; +} diff --git a/411691/id_manager.i.6 b/411691/id_manager.i.6 new file mode 100644 index 0000000..dd19db1 --- /dev/null +++ b/411691/id_manager.i.6 @@ -0,0 +1,70 @@ +int __exchange_and_add_dispatch(int *__mem); +template < typename _Tp > class new_allocator { +}; + +namespace std { + template < typename _CharT > struct char_traits; + template < typename _Tp > class allocator:public new_allocator < _Tp > { + }; + template < typename _CharT, typename _Traits = + char_traits < _CharT >, typename _Alloc = + allocator < _CharT > >class basic_string; + typedef basic_string < char >string; + template < typename _CharT, typename _Traits, + typename _Alloc > class basic_string { + typedef _Alloc allocator_type; + private:struct _Rep_base { + int _M_refcount; + }; + struct _Rep:_Rep_base { + void _M_dispose(const _Alloc & __a) { + if (this != &_S_empty_rep()) { + if (__exchange_and_add_dispatch + (&this->_M_refcount)) { + } + } + }}; + struct _Alloc_hider:_Alloc { + }; + public: private:mutable _Alloc_hider _M_dataplus; + _Rep *_M_rep() const { + } static _Rep & _S_empty_rep() { + } + public: basic_string():_M_dataplus(_S_empty_rep()._M_refdata(), + _Alloc()) { + } + ~basic_string() { + _M_rep()->_M_dispose(this->get_allocator()); + } + allocator_type get_allocator() const { + }}; +} + +namespace boost { + template < class T > class intrusive_ptr { + public:typedef T element_type; + ~intrusive_ptr() { + intrusive_ptr_release(px); + } private: T * px; + }; + struct section_info; + template < typename T > struct intrusive_base { + friend void intrusive_ptr_release(T * ptr) { + delete ptr; + }}; + struct id_category; + struct id_placeholder; + struct section_info:intrusive_base < section_info > { + boost::intrusive_ptr < section_info > parent; + std::string id_1_1; + }; + namespace { + std::string normalize_id(std::string) { + } + } + void add_id_to_section(std::string const &id) { + std::string id_part = id; + normalize_id(id); + boost::intrusive_ptr < section_info > parent; + }; +} diff --git a/411691/id_manager.i.7 b/411691/id_manager.i.7 new file mode 100644 index 0000000..c5a4c01 --- /dev/null +++ b/411691/id_manager.i.7 @@ -0,0 +1,67 @@ +int __exchange_and_add_dispatch(int *__mem); +template < typename _Tp > class new_allocator { +}; + +namespace std { + template < typename _CharT > struct char_traits; + template < typename _Tp > class allocator:public new_allocator < _Tp > { + }; + template < typename _CharT, typename _Traits = + char_traits < _CharT >, typename _Alloc = + allocator < _CharT > >class basic_string; + typedef basic_string < char >string; + template < typename _CharT, typename _Traits, + typename _Alloc > class basic_string { + typedef _Alloc allocator_type; + private:struct _Rep_base { + int _M_refcount; + }; + struct _Rep:_Rep_base { + void _M_dispose(const _Alloc & __a) { + if (this != &_S_empty_rep()) { + if (__exchange_and_add_dispatch + (&this->_M_refcount)) { + } + } + }}; + struct _Alloc_hider:_Alloc { + }; + public: private:mutable _Alloc_hider _M_dataplus; + _Rep *_M_rep() const { + } static _Rep & _S_empty_rep() { + } + public: basic_string():_M_dataplus(_S_empty_rep()._M_refdata(), + _Alloc()) { + } + ~basic_string() { + _M_rep()->_M_dispose(this->get_allocator()); + } + allocator_type get_allocator() const { + }}; +} + +namespace boost { + template < class T > class intrusive_ptr { + public:typedef T element_type; + ~intrusive_ptr() { + intrusive_ptr_release(px); + } private: T * px; + }; + template < typename T > struct intrusive_base { + friend void intrusive_ptr_release(T * ptr) { + delete ptr; + }}; + struct section_info:intrusive_base < section_info > { + boost::intrusive_ptr < section_info > parent; + std::string id_1_1; + }; + namespace { + std::string normalize_id(std::string) { + } + } + void add_id_to_section(std::string const &id) { + std::string id_part = id; + normalize_id(id); + boost::intrusive_ptr < section_info > parent; + }; +} diff --git a/411691/id_manager.i.8 b/411691/id_manager.i.8 new file mode 100644 index 0000000..f0b2d38 --- /dev/null +++ b/411691/id_manager.i.8 @@ -0,0 +1,64 @@ +int foo(int *__mem); +template < typename _Tp > class new_allocator { +}; + +template < typename _CharT > struct char_traits; +template < typename _Tp > class allocator:public new_allocator < _Tp > { +}; + +template < typename _CharT, typename _Traits = + char_traits < _CharT >, typename _Alloc = + allocator < _CharT > >class basic_string; +typedef basic_string < char >string; +template < typename _CharT, typename _Traits, + typename _Alloc > class basic_string { + typedef _Alloc allocator_type; + private:struct _Rep_base { + int _M_refcount; + }; + struct _Rep:_Rep_base { + void _M_dispose(const _Alloc & __a) { + if (this != &_S_empty_rep()) { + if (foo(&this->_M_refcount)) ; + } + }}; + struct _Alloc_hider:_Alloc { + }; + public: private:mutable _Alloc_hider _M_dataplus; + _Rep *_M_rep() const { + } static _Rep & _S_empty_rep() { + } + public: basic_string():_M_dataplus(_S_empty_rep()._M_refdata(), + _Alloc()) { + } + ~basic_string() { + _M_rep()->_M_dispose(this->get_allocator()); + } + allocator_type get_allocator() const { +}}; +template < class T > class intrusive_ptr { + public:typedef T element_type; + ~intrusive_ptr() { + intrusive_ptr_release(px); + } + private:T * px; +}; + +template < typename T > struct intrusive_base { + friend void intrusive_ptr_release(T * ptr) { + delete ptr; +}}; +struct si:intrusive_base < si > { + intrusive_ptr < si > parent; + string id_1_1; +}; +string normalize_id(string) +{ +} + +void add_id_to_section(string & id) +{ + string id_part = id; + normalize_id(id); + intrusive_ptr < si > parent; +}; diff --git a/411691/id_manager.i.9 b/411691/id_manager.i.9 new file mode 100644 index 0000000..352e012 --- /dev/null +++ b/411691/id_manager.i.9 @@ -0,0 +1,61 @@ +int foo(int *__mem); +template < typename _Tp > class new_allocator { +}; + +template < typename _CharT > struct char_traits; +template < typename _Tp > class allocator:public new_allocator < _Tp > { +}; + +template < typename _CharT, typename _Traits = + char_traits < _CharT >, typename _Alloc = + allocator < _CharT > >class basic_string; +typedef basic_string < char >string; +template < typename _CharT, typename _Traits, + typename _Alloc > class basic_string { + private: + struct _Rep { + int _M_refcount; + void _M_dispose() { + if (this != &_S_empty_rep()) + if (foo(&this->_M_refcount)) ; + } +}; + public: private:mutable _Alloc _M_dataplus; + _Rep *_M_rep() const { + } +static _Rep & _S_empty_rep() { + } + public: basic_string():_M_dataplus(_S_empty_rep()._M_refdata(), + _Alloc()) { + } + ~basic_string() { + _M_rep()->_M_dispose(); + } + _Alloc get_allocator() const { +}}; +template < class T > class intrusive_ptr { + public: + ~intrusive_ptr() { +T *px; + intrusive_ptr_release(px); + } +}; + +template < typename T > struct intrusive_base { + friend void intrusive_ptr_release(T * ptr) { + delete ptr; +}}; +struct si:intrusive_base < si > { + intrusive_ptr < si > parent; + string id_1_1; +}; +string normalize_id(string) +{ +} + +void add_id_to_section(string & id) +{ + string id_part = id; + normalize_id(id); + intrusive_ptr < si > parent; +}; diff --git a/411691/reduce-ice b/411691/reduce-ice new file mode 100755 index 0000000..5a01274 --- /dev/null +++ b/411691/reduce-ice @@ -0,0 +1,13 @@ +#!/bin/bash +# +# Run like: +# multidelta -level=# ./reduce-ice $FILE +# levels: 0 0 1 1 2 2 10 10 +# + +FILE=id_manager.i +CC=g++-4.6.2 +CFLAGS="-O2" +STRING="internal compiler error: Segmentation fault" + +$CC -pipe -c $CFLAGS -o /dev/null $FILE 2>&1 | grep "$STRING" diff --git a/434452/ObjectImpl.ii b/434452/ObjectImpl.ii new file mode 100644 index 0000000..d95c290 --- /dev/null +++ b/434452/ObjectImpl.ii @@ -0,0 +1,63541 @@ +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/obj-armv7l-unknown-linux-gnueabi/js/src//" +# 1 "" +#define __STDC__ 1 +#define __cplusplus 1 +#define __STDC_HOSTED__ 1 +#define __GNUC__ 4 +#define __GNUC_MINOR__ 5 +#define __GNUC_PATCHLEVEL__ 4 +#define __GNUG__ 4 +#define __SIZE_TYPE__ unsigned int +#define __PTRDIFF_TYPE__ int +#define __WCHAR_TYPE__ unsigned int +#define __WINT_TYPE__ unsigned int +#define __INTMAX_TYPE__ long long int +#define __UINTMAX_TYPE__ long long unsigned int +#define __CHAR16_TYPE__ short unsigned int +#define __CHAR32_TYPE__ unsigned int +#define __SIG_ATOMIC_TYPE__ int +#define __INT8_TYPE__ signed char +#define __INT16_TYPE__ short int +#define __INT32_TYPE__ int +#define __INT64_TYPE__ long long int +#define __UINT8_TYPE__ unsigned char +#define __UINT16_TYPE__ short unsigned int +#define __UINT32_TYPE__ unsigned int +#define __UINT64_TYPE__ long long unsigned int +#define __INT_LEAST8_TYPE__ signed char +#define __INT_LEAST16_TYPE__ short int +#define __INT_LEAST32_TYPE__ int +#define __INT_LEAST64_TYPE__ long long int +#define __UINT_LEAST8_TYPE__ unsigned char +#define __UINT_LEAST16_TYPE__ short unsigned int +#define __UINT_LEAST32_TYPE__ unsigned int +#define __UINT_LEAST64_TYPE__ long long unsigned int +#define __INT_FAST8_TYPE__ signed char +#define __INT_FAST16_TYPE__ int +#define __INT_FAST32_TYPE__ int +#define __INT_FAST64_TYPE__ long long int +#define __UINT_FAST8_TYPE__ unsigned char +#define __UINT_FAST16_TYPE__ unsigned int +#define __UINT_FAST32_TYPE__ unsigned int +#define __UINT_FAST64_TYPE__ long long unsigned int +#define __INTPTR_TYPE__ int +#define __UINTPTR_TYPE__ unsigned int +#define __GXX_WEAK__ 1 +#define __DEPRECATED 1 +#define __EXCEPTIONS 1 +#define __GXX_ABI_VERSION 1002 +#define __SCHAR_MAX__ 127 +#define __SHRT_MAX__ 32767 +#define __INT_MAX__ 2147483647 +#define __LONG_MAX__ 2147483647L +#define __LONG_LONG_MAX__ 9223372036854775807LL +#define __WCHAR_MAX__ 4294967295U +#define __WCHAR_MIN__ 0U +#define __WINT_MAX__ 4294967295U +#define __WINT_MIN__ 0U +#define __PTRDIFF_MAX__ 2147483647 +#define __SIZE_MAX__ 4294967295U +#define __CHAR_BIT__ 8 +#define __INTMAX_MAX__ 9223372036854775807LL +#define __INTMAX_C(c) c ## LL +#define __UINTMAX_MAX__ 18446744073709551615ULL +#define __UINTMAX_C(c) c ## ULL +#define __SIG_ATOMIC_MAX__ 2147483647 +#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) +#define __INT8_MAX__ 127 +#define __INT16_MAX__ 32767 +#define __INT32_MAX__ 2147483647 +#define __INT64_MAX__ 9223372036854775807LL +#define __UINT8_MAX__ 255 +#define __UINT16_MAX__ 65535 +#define __UINT32_MAX__ 4294967295U +#define __UINT64_MAX__ 18446744073709551615ULL +#define __INT_LEAST8_MAX__ 127 +#define __INT8_C(c) c +#define __INT_LEAST16_MAX__ 32767 +#define __INT16_C(c) c +#define __INT_LEAST32_MAX__ 2147483647 +#define __INT32_C(c) c +#define __INT_LEAST64_MAX__ 9223372036854775807LL +#define __INT64_C(c) c ## LL +#define __UINT_LEAST8_MAX__ 255 +#define __UINT8_C(c) c +#define __UINT_LEAST16_MAX__ 65535 +#define __UINT16_C(c) c +#define __UINT_LEAST32_MAX__ 4294967295U +#define __UINT32_C(c) c ## U +#define __UINT_LEAST64_MAX__ 18446744073709551615ULL +#define __UINT64_C(c) c ## ULL +#define __INT_FAST8_MAX__ 127 +#define __INT_FAST16_MAX__ 2147483647 +#define __INT_FAST32_MAX__ 2147483647 +#define __INT_FAST64_MAX__ 9223372036854775807LL +#define __UINT_FAST8_MAX__ 255 +#define __UINT_FAST16_MAX__ 4294967295U +#define __UINT_FAST32_MAX__ 4294967295U +#define __UINT_FAST64_MAX__ 18446744073709551615ULL +#define __INTPTR_MAX__ 2147483647 +#define __UINTPTR_MAX__ 4294967295U +#define __FLT_EVAL_METHOD__ 0 +#define __DEC_EVAL_METHOD__ 2 +#define __FLT_RADIX__ 2 +#define __FLT_MANT_DIG__ 24 +#define __FLT_DIG__ 6 +#define __FLT_MIN_EXP__ (-125) +#define __FLT_MIN_10_EXP__ (-37) +#define __FLT_MAX_EXP__ 128 +#define __FLT_MAX_10_EXP__ 38 +#define __FLT_MAX__ 3.4028234663852886e+38F +#define __FLT_MIN__ 1.1754943508222875e-38F +#define __FLT_EPSILON__ 1.1920928955078125e-7F +#define __FLT_DENORM_MIN__ 1.4012984643248171e-45F +#define __FLT_HAS_DENORM__ 1 +#define __FLT_HAS_INFINITY__ 1 +#define __FLT_HAS_QUIET_NAN__ 1 +#define __DBL_MANT_DIG__ 53 +#define __DBL_DIG__ 15 +#define __DBL_MIN_EXP__ (-1021) +#define __DBL_MIN_10_EXP__ (-307) +#define __DBL_MAX_EXP__ 1024 +#define __DBL_MAX_10_EXP__ 308 +#define __DBL_MAX__ ((double)1.7976931348623157e+308L) +#define __DBL_MIN__ ((double)2.2250738585072014e-308L) +#define __DBL_EPSILON__ ((double)2.2204460492503131e-16L) +#define __DBL_DENORM_MIN__ ((double)4.9406564584124654e-324L) +#define __DBL_HAS_DENORM__ 1 +#define __DBL_HAS_INFINITY__ 1 +#define __DBL_HAS_QUIET_NAN__ 1 +#define __LDBL_MANT_DIG__ 53 +#define __LDBL_DIG__ 15 +#define __LDBL_MIN_EXP__ (-1021) +#define __LDBL_MIN_10_EXP__ (-307) +#define __LDBL_MAX_EXP__ 1024 +#define __LDBL_MAX_10_EXP__ 308 +#define __DECIMAL_DIG__ 17 +#define __LDBL_MAX__ 1.7976931348623157e+308L +#define __LDBL_MIN__ 2.2250738585072014e-308L +#define __LDBL_EPSILON__ 2.2204460492503131e-16L +#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L +#define __LDBL_HAS_DENORM__ 1 +#define __LDBL_HAS_INFINITY__ 1 +#define __LDBL_HAS_QUIET_NAN__ 1 +#define __DEC32_MANT_DIG__ 7 +#define __DEC32_MIN_EXP__ (-94) +#define __DEC32_MAX_EXP__ 97 +#define __DEC32_MIN__ 1E-95DF +#define __DEC32_MAX__ 9.999999E96DF +#define __DEC32_EPSILON__ 1E-6DF +#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF +#define __DEC64_MANT_DIG__ 16 +#define __DEC64_MIN_EXP__ (-382) +#define __DEC64_MAX_EXP__ 385 +#define __DEC64_MIN__ 1E-383DD +#define __DEC64_MAX__ 9.999999999999999E384DD +#define __DEC64_EPSILON__ 1E-15DD +#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD +#define __DEC128_MANT_DIG__ 34 +#define __DEC128_MIN_EXP__ (-6142) +#define __DEC128_MAX_EXP__ 6145 +#define __DEC128_MIN__ 1E-6143DL +#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL +#define __DEC128_EPSILON__ 1E-33DL +#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL +#define __REGISTER_PREFIX__ +#define __USER_LABEL_PREFIX__ +#define __VERSION__ "4.5.4" +#define __GNUC_GNU_INLINE__ 1 +#define __OPTIMIZE__ 1 +#define __FINITE_MATH_ONLY__ 0 +#define __pic__ 2 +#define __PIC__ 2 +#define __CHAR_UNSIGNED__ 1 +#define __WCHAR_UNSIGNED__ 1 +#define __GCC_HAVE_DWARF2_CFI_ASM 1 +#define __PRAGMA_REDEFINE_EXTNAME 1 +#define __SIZEOF_INT__ 4 +#define __SIZEOF_LONG__ 4 +#define __SIZEOF_LONG_LONG__ 8 +#define __SIZEOF_SHORT__ 2 +#define __SIZEOF_FLOAT__ 4 +#define __SIZEOF_DOUBLE__ 8 +#define __SIZEOF_LONG_DOUBLE__ 8 +#define __SIZEOF_SIZE_T__ 4 +#define __SIZEOF_WCHAR_T__ 4 +#define __SIZEOF_WINT_T__ 4 +#define __SIZEOF_PTRDIFF_T__ 4 +#define __SIZEOF_POINTER__ 4 +#define __arm__ 1 +#define __APCS_32__ 1 +#define __ARMEL__ 1 +#define __VFP_FP__ 1 +#define __THUMB_INTERWORK__ 1 +#define __ARM_ARCH_7A__ 1 +#define __ARM_PCS_VFP 1 +#define __ARM_EABI__ 1 +#define __GXX_TYPEINFO_EQUALITY_INLINE 0 +#define __gnu_linux__ 1 +#define __linux 1 +#define __linux__ 1 +#define linux 1 +#define __unix 1 +#define __unix__ 1 +#define unix 1 +#define __ELF__ 1 +#define __BIGGEST_ALIGNMENT__ 8 +# 1 "" +#define _GNU_SOURCE 1 +#define _REENTRANT 1 +#define MOZ_GLUE_IN_PROGRAM 1 +#define EXPORT_JS_API 1 +#define JS_HAS_CTYPES 1 +#define DLL_PREFIX "lib" +#define DLL_SUFFIX ".so" +#define NO_NSPR_10_SUPPORT 1 +#define NDEBUG 1 +#define TRIMMED 1 +#define USE_SYSTEM_MALLOC 1 +#define ENABLE_ASSEMBLER 1 +#define ENABLE_JIT 1 +#define MOZILLA_CLIENT 1 +#define _FORTIFY_SOURCE 2 +# 1 "././js-confdefs.h" 1 + + + + + + +#define _JS_CONFDEFS_H_ + +#define CPP_THROW_NEW throw() +#define CROSS_COMPILE 1 +#define D_INO d_ino +#define EDITLINE 1 +#define HAVE_ARM_NEON 1 +#define HAVE_ARM_SIMD 1 +#define HAVE_CPP_AMBIGUITY_RESOLVING_USING 1 +#define HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR 1 +#define HAVE_CPP_PARTIAL_SPECIALIZATION 1 +#define HAVE_DIRENT_H 1 +#define HAVE_DLADDR 1 +#define HAVE_DLOPEN 1 +#define HAVE_ENDIAN_H 1 +#define HAVE_FCHMOD 1 +#define HAVE_FLOCKFILE 1 +#define HAVE_GETC_UNLOCKED 1 +#define HAVE_GETOPT_H 1 +#define HAVE_GETPAGESIZE 1 +#define HAVE_GNU_GET_LIBC_VERSION 1 +#define HAVE_GNU_LIBC_VERSION_H 1 +#define HAVE_I18N_LC_MESSAGES 1 +#define HAVE_ICONV 1 +#define HAVE_LCHOWN 1 +#define HAVE_LINUX_QUOTA_H 1 +#define HAVE_LOCALECONV 1 +#define HAVE_LOCALECONV 1 +#define HAVE_LOCALTIME_R 1 +#define HAVE_LSTAT64 1 +#define HAVE_MALLOC_H 1 +#define HAVE_MBRTOWC 1 +#define HAVE_MEMALIGN 1 +#define HAVE_MEMMOVE 1 +#define HAVE_MEMORY_H 1 +#define HAVE_MMINTRIN_H 1 +#define HAVE_NL_TYPES_H 1 +#define HAVE_POSIX_FALLOCATE 1 +#define HAVE_POSIX_MEMALIGN 1 +#define HAVE_RANDOM 1 +#define HAVE_RES_NINIT 1 +#define HAVE_SBRK 1 +#define HAVE_SETLOCALE 1 +#define HAVE_SIGINFO_T 1 +#define HAVE_SNPRINTF 1 +#define HAVE_SSIZE_T 1 +#define HAVE_STAT64 1 +#define HAVE_STATVFS 1 +#define HAVE_STATVFS64 1 +#define HAVE_STRERROR 1 +#define HAVE_STRNDUP 1 +#define HAVE_STRTOK_R 1 +#define HAVE_ST_BLKSIZE 1 +#define HAVE_SYS_BITYPES_H 1 +#define HAVE_SYS_CDEFS_H 1 +#define HAVE_SYS_MOUNT_H 1 +#define HAVE_SYS_QUOTA_H 1 +#define HAVE_SYS_STATFS_H 1 +#define HAVE_SYS_STATVFS_H 1 +#define HAVE_SYS_VFS_H 1 +#define HAVE_THREAD_TLS_KEYWORD 1 +#define HAVE_TM_ZONE_TM_GMTOFF 1 +#define HAVE_TRUNCATE64 1 +#define HAVE_UINT 1 +#define HAVE_UNAME_DOMAINNAME_FIELD 1 +#define HAVE_UNISTD_H 1 +#define HAVE_VALLOC 1 +#define HAVE_VA_COPY 1 +#define HAVE_VISIBILITY_ATTRIBUTE 1 +#define HAVE_VISIBILITY_HIDDEN_ATTRIBUTE 1 +#define HAVE_WCRTOMB 1 +#define HAVE_X11_XKBLIB_H 1 +#define HAVE__UNWIND_BACKTRACE 1 +#define HAVE___CXA_DEMANGLE 1 +#define JSGC_INCREMENTAL 1 +#define JS_ALIGN_OF_POINTER 4 +#define JS_BITS_PER_WORD_LOG2 5 +#define JS_BYTES_PER_DOUBLE 8 +#define JS_BYTES_PER_WORD 4 +#define JS_CPU_ARM 1 +#define JS_DEFAULT_JITREPORT_GRANULARITY 3 +#define JS_HAS_CTYPES 1 +#define JS_HAS_XML_SUPPORT 1 +#define JS_HAVE_ENDIAN_H 1 +#define JS_METHODJIT 1 +#define JS_MONOIC 1 +#define JS_NUNBOX32 1 +#define JS_POLYIC 1 +#define JS_THREADSAFE 1 +#define MALLOC_H +#define MOZ_DEBUG_SYMBOLS 1 +#define MOZ_DLL_SUFFIX ".so" +#define MOZ_MEMORY 1 +#define MOZ_MEMORY_LINUX 1 +#define MOZ_MEMORY_SIZEOF_PTR_2POW 2 +#define NEED_CPP_UNUSED_IMPLEMENTATIONS 1 +#define NEW_H +#define NS_ALWAYS_INLINE __attribute__((always_inline)) +#define NS_ATTR_MALLOC __attribute__((malloc)) +#define NS_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#define SIZEOF_INT_P 4 +#define STATIC_EXPORTABLE_JS_API 1 +#define STDC_HEADERS 1 +#define UNIX_ASYNC_DNS 1 +#define VA_COPY va_copy +#define XP_UNIX 1 +#define _REENTRANT 1 + + + + +#define __STDC_LIMIT_MACROS +# 1 "" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" + + + + + + + +# 1 "./../../dist/include/mozilla/Assertions.h" 1 +# 11 "./../../dist/include/mozilla/Assertions.h" +#define mozilla_Assertions_h_ + +# 1 "./../../dist/include/mozilla/Attributes.h" 1 +# 11 "./../../dist/include/mozilla/Attributes.h" +#define mozilla_Attributes_h_ +# 25 "./../../dist/include/mozilla/Attributes.h" +#define MOZ_INLINE inline +# 46 "./../../dist/include/mozilla/Attributes.h" +#define MOZ_ALWAYS_INLINE __attribute__((always_inline)) MOZ_INLINE +# 106 "./../../dist/include/mozilla/Attributes.h" +#define MOZ_HAVE_NEVER_INLINE __attribute__((noinline)) +#define MOZ_HAVE_NORETURN __attribute__((noreturn)) +# 125 "./../../dist/include/mozilla/Attributes.h" +#define MOZ_NEVER_INLINE MOZ_HAVE_NEVER_INLINE +# 145 "./../../dist/include/mozilla/Attributes.h" +#define MOZ_NORETURN MOZ_HAVE_NORETURN +# 159 "./../../dist/include/mozilla/Attributes.h" +#define MOZ_ASAN_BLACKLIST +# 190 "./../../dist/include/mozilla/Attributes.h" +#define MOZ_DELETE +# 231 "./../../dist/include/mozilla/Attributes.h" +#define MOZ_OVERRIDE +# 300 "./../../dist/include/mozilla/Attributes.h" +#define MOZ_FINAL +# 317 "./../../dist/include/mozilla/Attributes.h" +#define MOZ_WARN_UNUSED_RESULT __attribute__ ((warn_unused_result)) +# 14 "./../../dist/include/mozilla/Assertions.h" 2 +# 1 "./../../dist/include/mozilla/Types.h" 1 +# 11 "./../../dist/include/mozilla/Types.h" +#define mozilla_Types_h_ +# 24 "./../../dist/include/mozilla/Types.h" +# 1 "./../../dist/include/mozilla/StandardInteger.h" 1 +# 11 "./../../dist/include/mozilla/StandardInteger.h" +#define mozilla_StandardInteger_h_ +# 42 "./../../dist/include/mozilla/StandardInteger.h" +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stdint.h" 1 3 4 + + +# 1 "/usr/include/stdint.h" 1 3 4 +# 24 "/usr/include/stdint.h" 3 4 +#define _STDINT_H 1 + +# 1 "/usr/include/features.h" 1 3 4 +# 21 "/usr/include/features.h" 3 4 +#define _FEATURES_H 1 +# 98 "/usr/include/features.h" 3 4 +#undef __USE_ISOC99 +#undef __USE_ISOC95 +#undef __USE_POSIX +#undef __USE_POSIX2 +#undef __USE_POSIX199309 +#undef __USE_POSIX199506 +#undef __USE_XOPEN +#undef __USE_XOPEN_EXTENDED +#undef __USE_UNIX98 +#undef __USE_XOPEN2K +#undef __USE_XOPEN2KXSI +#undef __USE_XOPEN2K8 +#undef __USE_XOPEN2K8XSI +#undef __USE_LARGEFILE +#undef __USE_LARGEFILE64 +#undef __USE_FILE_OFFSET64 +#undef __USE_BSD +#undef __USE_SVID +#undef __USE_MISC +#undef __USE_ATFILE +#undef __USE_GNU +#undef __USE_REENTRANT +#undef __USE_FORTIFY_LEVEL +#undef __FAVOR_BSD +#undef __KERNEL_STRICT_NAMES + + + + +#define __KERNEL_STRICT_NAMES + + + +#define __USE_ANSI 1 +# 141 "/usr/include/features.h" 3 4 +#define __GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) +# 157 "/usr/include/features.h" 3 4 +#undef _ISOC95_SOURCE +#define _ISOC95_SOURCE 1 +#undef _ISOC99_SOURCE +#define _ISOC99_SOURCE 1 +#undef _POSIX_SOURCE +#define _POSIX_SOURCE 1 +#undef _POSIX_C_SOURCE +#define _POSIX_C_SOURCE 200809L +#undef _XOPEN_SOURCE +#define _XOPEN_SOURCE 700 +#undef _XOPEN_SOURCE_EXTENDED +#define _XOPEN_SOURCE_EXTENDED 1 +#undef _LARGEFILE64_SOURCE +#define _LARGEFILE64_SOURCE 1 +#undef _BSD_SOURCE +#define _BSD_SOURCE 1 +#undef _SVID_SOURCE +#define _SVID_SOURCE 1 +#undef _ATFILE_SOURCE +#define _ATFILE_SOURCE 1 +# 194 "/usr/include/features.h" 3 4 +#define __USE_ISOC99 1 + + + + + +#define __USE_ISOC95 1 +# 221 "/usr/include/features.h" 3 4 +#define __USE_POSIX 1 + + + +#define __USE_POSIX2 1 + + + +#define __USE_POSIX199309 1 + + + +#define __USE_POSIX199506 1 + + + +#define __USE_XOPEN2K 1 +#undef __USE_ISOC95 +#define __USE_ISOC95 1 +#undef __USE_ISOC99 +#define __USE_ISOC99 1 + + + +#define __USE_XOPEN2K8 1 +#undef _ATFILE_SOURCE +#define _ATFILE_SOURCE 1 + + + +#define __USE_XOPEN 1 + +#define __USE_XOPEN_EXTENDED 1 +#define __USE_UNIX98 1 +#undef _LARGEFILE_SOURCE +#define _LARGEFILE_SOURCE 1 + + +#define __USE_XOPEN2K8 1 +#define __USE_XOPEN2K8XSI 1 + +#define __USE_XOPEN2K 1 +#define __USE_XOPEN2KXSI 1 +#undef __USE_ISOC95 +#define __USE_ISOC95 1 +#undef __USE_ISOC99 +#define __USE_ISOC99 1 +# 277 "/usr/include/features.h" 3 4 +#define __USE_LARGEFILE 1 + + + +#define __USE_LARGEFILE64 1 + + + + + + + +#define __USE_MISC 1 + + + +#define __USE_BSD 1 + + + +#define __USE_SVID 1 + + + +#define __USE_ATFILE 1 + + + +#define __USE_GNU 1 + + + +#define __USE_REENTRANT 1 + + + + + +#define __USE_FORTIFY_LEVEL 2 +# 324 "/usr/include/features.h" 3 4 +#define __STDC_IEC_559__ 1 +#define __STDC_IEC_559_COMPLEX__ 1 + + +#define __STDC_ISO_10646__ 200009L + + + + + + + +#undef __GNU_LIBRARY__ +#define __GNU_LIBRARY__ 6 + + + +#define __GLIBC__ 2 +#define __GLIBC_MINOR__ 15 + +#define __GLIBC_PREREQ(maj,min) ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) + + + + + + + +#define __GLIBC_HAVE_LONG_LONG 1 + + + + + +# 1 "/usr/include/sys/cdefs.h" 1 3 4 +# 21 "/usr/include/sys/cdefs.h" 3 4 +#define _SYS_CDEFS_H 1 +# 36 "/usr/include/sys/cdefs.h" 3 4 +#undef __P +#undef __PMT +# 47 "/usr/include/sys/cdefs.h" 3 4 +#define __LEAF +#define __LEAF_ATTR +# 62 "/usr/include/sys/cdefs.h" 3 4 +#define __THROW throw () +#define __THROWNL throw () +#define __NTH(fct) __LEAF_ATTR fct throw () +# 88 "/usr/include/sys/cdefs.h" 3 4 +#define __P(args) args +#define __PMT(args) args + + + + +#define __CONCAT(x,y) x ## y +#define __STRING(x) #x + + +#define __ptr_t void * +#define __long_double_t long double + + + + +#define __BEGIN_DECLS extern "C" { +#define __END_DECLS } +# 128 "/usr/include/sys/cdefs.h" 3 4 +#define __BEGIN_NAMESPACE_STD +#define __END_NAMESPACE_STD +#define __USING_NAMESPACE_STD(name) +#define __BEGIN_NAMESPACE_C99 +#define __END_NAMESPACE_C99 +#define __USING_NAMESPACE_C99(name) + + + + + +#define __bounded +#define __unbounded +#define __ptrvalue + + + + +#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) +#define __bos0(ptr) __builtin_object_size (ptr, 0) + + +#define __warndecl(name,msg) extern void name (void) __attribute__((__warning__ (msg))) + +#define __warnattr(msg) __attribute__((__warning__ (msg))) +#define __errordecl(name,msg) extern void name (void) __attribute__((__error__ (msg))) +# 164 "/usr/include/sys/cdefs.h" 3 4 +#define __flexarr [] +# 191 "/usr/include/sys/cdefs.h" 3 4 +#define __REDIRECT(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) + +#define __REDIRECT_NTH(name,proto,alias) name proto __THROW __asm__ (__ASMNAME (#alias)) + +#define __REDIRECT_NTHNL(name,proto,alias) name proto __THROWNL __asm__ (__ASMNAME (#alias)) + + + + + + + +#define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname) +#define __ASMNAME2(prefix,cname) __STRING (prefix) cname +# 225 "/usr/include/sys/cdefs.h" 3 4 +#define __attribute_malloc__ __attribute__ ((__malloc__)) +# 234 "/usr/include/sys/cdefs.h" 3 4 +#define __attribute_pure__ __attribute__ ((__pure__)) + + + + + + +#define __attribute_const__ __attribute__ ((__const__)) +# 250 "/usr/include/sys/cdefs.h" 3 4 +#define __attribute_used__ __attribute__ ((__used__)) +#define __attribute_noinline__ __attribute__ ((__noinline__)) + + + + + + + +#define __attribute_deprecated__ __attribute__ ((__deprecated__)) +# 271 "/usr/include/sys/cdefs.h" 3 4 +#define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x))) +# 281 "/usr/include/sys/cdefs.h" 3 4 +#define __attribute_format_strfmon__(a,b) __attribute__ ((__format__ (__strfmon__, a, b))) +# 290 "/usr/include/sys/cdefs.h" 3 4 +#define __nonnull(params) __attribute__ ((__nonnull__ params)) + + + + + + + +#define __attribute_warn_unused_result__ __attribute__ ((__warn_unused_result__)) + + +#define __wur __attribute_warn_unused_result__ +# 312 "/usr/include/sys/cdefs.h" 3 4 +#define __always_inline __inline __attribute__ ((__always_inline__)) +# 321 "/usr/include/sys/cdefs.h" 3 4 +#define __extern_inline extern __inline __attribute__ ((__gnu_inline__)) + +#define __extern_always_inline extern __always_inline __attribute__ ((__gnu_inline__, __artificial__)) +# 343 "/usr/include/sys/cdefs.h" 3 4 +#define __va_arg_pack() __builtin_va_arg_pack () +#define __va_arg_pack_len() __builtin_va_arg_pack_len () +# 367 "/usr/include/sys/cdefs.h" 3 4 +#define __restrict_arr +# 378 "/usr/include/sys/cdefs.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 19 "/usr/include/bits/wordsize.h" 3 4 +#define __WORDSIZE 32 +# 379 "/usr/include/sys/cdefs.h" 2 3 4 +# 400 "/usr/include/sys/cdefs.h" 3 4 +#define __LDBL_REDIR1(name,proto,alias) name proto +#define __LDBL_REDIR(name,proto) name proto +#define __LDBL_REDIR1_NTH(name,proto,alias) name proto __THROW +#define __LDBL_REDIR_NTH(name,proto) name proto __THROW +#define __LDBL_REDIR_DECL(name) + +#define __REDIRECT_LDBL(name,proto,alias) __REDIRECT (name, proto, alias) +#define __REDIRECT_NTH_LDBL(name,proto,alias) __REDIRECT_NTH (name, proto, alias) +# 359 "/usr/include/features.h" 2 3 4 +# 374 "/usr/include/features.h" 3 4 +#define __USE_EXTERN_INLINES 1 + + + + + + + +# 1 "/usr/include/gnu/stubs.h" 1 3 4 +# 10 "/usr/include/gnu/stubs.h" 3 4 +#define __stub_chflags +#define __stub_create_module +#define __stub_fattach +#define __stub_fchflags +#define __stub_fdetach +#define __stub_get_kernel_syms +#define __stub_getcontext +#define __stub_getmsg +#define __stub_getpmsg +#define __stub_gtty +#define __stub_lchmod +#define __stub_makecontext +#define __stub_putmsg +#define __stub_putpmsg +#define __stub_query_module +#define __stub_revoke +#define __stub_setcontext +#define __stub_setlogin +#define __stub_sigreturn +#define __stub_sstk +#define __stub_stty +#define __stub_swapcontext +# 383 "/usr/include/features.h" 2 3 4 +# 27 "/usr/include/stdint.h" 2 3 4 +# 1 "/usr/include/bits/wchar.h" 1 3 4 +# 21 "/usr/include/bits/wchar.h" 3 4 +#define _BITS_WCHAR_H 1 + +#define __WCHAR_MIN (-2147483647 - 1) +#define __WCHAR_MAX (2147483647) +# 28 "/usr/include/stdint.h" 2 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 19 "/usr/include/bits/wordsize.h" 3 4 +#define __WORDSIZE 32 +# 29 "/usr/include/stdint.h" 2 3 4 + + + + + + + +#define __int8_t_defined +typedef signed char int8_t; +typedef short int int16_t; +typedef int int32_t; + + + +__extension__ +typedef long long int int64_t; + + + + +typedef unsigned char uint8_t; +typedef unsigned short int uint16_t; + +typedef unsigned int uint32_t; +#define __uint32_t_defined + + + + +__extension__ +typedef unsigned long long int uint64_t; + + + + + + +typedef signed char int_least8_t; +typedef short int int_least16_t; +typedef int int_least32_t; + + + +__extension__ +typedef long long int int_least64_t; + + + +typedef unsigned char uint_least8_t; +typedef unsigned short int uint_least16_t; +typedef unsigned int uint_least32_t; + + + +__extension__ +typedef unsigned long long int uint_least64_t; + + + + + + +typedef signed char int_fast8_t; + + + + + +typedef int int_fast16_t; +typedef int int_fast32_t; +__extension__ +typedef long long int int_fast64_t; + + + +typedef unsigned char uint_fast8_t; + + + + + +typedef unsigned int uint_fast16_t; +typedef unsigned int uint_fast32_t; +__extension__ +typedef unsigned long long int uint_fast64_t; +# 126 "/usr/include/stdint.h" 3 4 +typedef int intptr_t; +#define __intptr_t_defined + +typedef unsigned int uintptr_t; +# 138 "/usr/include/stdint.h" 3 4 +__extension__ +typedef long long int intmax_t; +__extension__ +typedef unsigned long long int uintmax_t; +# 153 "/usr/include/stdint.h" 3 4 +#define __INT64_C(c) c ## LL +#define __UINT64_C(c) c ## ULL + + + + + +#define INT8_MIN (-128) +#define INT16_MIN (-32767-1) +#define INT32_MIN (-2147483647-1) +#define INT64_MIN (-__INT64_C(9223372036854775807)-1) + +#define INT8_MAX (127) +#define INT16_MAX (32767) +#define INT32_MAX (2147483647) +#define INT64_MAX (__INT64_C(9223372036854775807)) + + +#define UINT8_MAX (255) +#define UINT16_MAX (65535) +#define UINT32_MAX (4294967295U) +#define UINT64_MAX (__UINT64_C(18446744073709551615)) + + + +#define INT_LEAST8_MIN (-128) +#define INT_LEAST16_MIN (-32767-1) +#define INT_LEAST32_MIN (-2147483647-1) +#define INT_LEAST64_MIN (-__INT64_C(9223372036854775807)-1) + +#define INT_LEAST8_MAX (127) +#define INT_LEAST16_MAX (32767) +#define INT_LEAST32_MAX (2147483647) +#define INT_LEAST64_MAX (__INT64_C(9223372036854775807)) + + +#define UINT_LEAST8_MAX (255) +#define UINT_LEAST16_MAX (65535) +#define UINT_LEAST32_MAX (4294967295U) +#define UINT_LEAST64_MAX (__UINT64_C(18446744073709551615)) + + + +#define INT_FAST8_MIN (-128) + + + + +#define INT_FAST16_MIN (-2147483647-1) +#define INT_FAST32_MIN (-2147483647-1) + +#define INT_FAST64_MIN (-__INT64_C(9223372036854775807)-1) + +#define INT_FAST8_MAX (127) + + + + +#define INT_FAST16_MAX (2147483647) +#define INT_FAST32_MAX (2147483647) + +#define INT_FAST64_MAX (__INT64_C(9223372036854775807)) + + +#define UINT_FAST8_MAX (255) + + + + +#define UINT_FAST16_MAX (4294967295U) +#define UINT_FAST32_MAX (4294967295U) + +#define UINT_FAST64_MAX (__UINT64_C(18446744073709551615)) +# 234 "/usr/include/stdint.h" 3 4 +#define INTPTR_MIN (-2147483647-1) +#define INTPTR_MAX (2147483647) +#define UINTPTR_MAX (4294967295U) + + + + +#define INTMAX_MIN (-__INT64_C(9223372036854775807)-1) + +#define INTMAX_MAX (__INT64_C(9223372036854775807)) + + +#define UINTMAX_MAX (__UINT64_C(18446744073709551615)) +# 256 "/usr/include/stdint.h" 3 4 +#define PTRDIFF_MIN (-2147483647-1) +#define PTRDIFF_MAX (2147483647) + + + +#define SIG_ATOMIC_MIN (-2147483647-1) +#define SIG_ATOMIC_MAX (2147483647) + + + + + +#define SIZE_MAX (4294967295U) + + + + + +#define WCHAR_MIN __WCHAR_MIN +#define WCHAR_MAX __WCHAR_MAX + + + +#define WINT_MIN (0u) +#define WINT_MAX (4294967295u) +# 4 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stdint.h" 2 3 4 + + + +#define _GCC_WRAP_STDINT_H +# 43 "./../../dist/include/mozilla/StandardInteger.h" 2 +# 25 "./../../dist/include/mozilla/Types.h" 2 + + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 40 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#define _STDDEF_H +#define _STDDEF_H_ + +#define _ANSI_STDDEF_H + +#define __STDDEF_H__ +# 138 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#define _PTRDIFF_T +#define _T_PTRDIFF_ +#define _T_PTRDIFF +#define __PTRDIFF_T +#define _PTRDIFF_T_ +#define _BSD_PTRDIFF_T_ +#define ___int_ptrdiff_t_h +#define _GCC_PTRDIFF_T + + + +typedef int ptrdiff_t; +# 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 186 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#define __size_t__ +#define __SIZE_T__ +#define _SIZE_T +#define _SYS_SIZE_T_H +#define _T_SIZE_ +#define _T_SIZE +#define __SIZE_T +#define _SIZE_T_ +#define _BSD_SIZE_T_ +#define _SIZE_T_DEFINED_ +#define _SIZE_T_DEFINED +#define _BSD_SIZE_T_DEFINED_ +#define _SIZE_T_DECLARED +#define ___int_size_t_h +#define _GCC_SIZE_T +#define _SIZET_ + + + +#define __size_t + + + + + +typedef unsigned int size_t; +# 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_size_t +# 262 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#define __wchar_t__ +#define __WCHAR_T__ +#define _WCHAR_T +#define _T_WCHAR_ +#define _T_WCHAR +#define __WCHAR_T +#define _WCHAR_T_ +#define _BSD_WCHAR_T_ +#define _WCHAR_T_DEFINED_ +#define _WCHAR_T_DEFINED +#define _WCHAR_T_H +#define ___int_wchar_t_h +#define __INT_WCHAR_T_H +#define _GCC_WCHAR_T +#define _WCHAR_T_DECLARED +# 289 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef _BSD_WCHAR_T_ +# 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 28 "./../../dist/include/mozilla/Types.h" 2 +# 54 "./../../dist/include/mozilla/Types.h" +#define MOZ_EXTERNAL_VIS __attribute__((visibility("default"))) + + + + + +#define MOZ_EXPORT_API(type) MOZ_EXTERNAL_VIS type +#define MOZ_EXPORT_DATA(type) MOZ_EXTERNAL_VIS type +# 80 "./../../dist/include/mozilla/Types.h" +#define MOZ_IMPORT_API(x) MOZ_EXPORT_API(x) + + + + + + + +#define MOZ_IMPORT_DATA(x) MOZ_EXPORT_DATA(x) +# 105 "./../../dist/include/mozilla/Types.h" +#define MFBT_API(type) __attribute__((weak)) MOZ_IMPORT_API(type) +#define MFBT_DATA(type) __attribute__((weak)) MOZ_IMPORT_DATA(type) +# 131 "./../../dist/include/mozilla/Types.h" +#define MOZ_BEGIN_EXTERN_C extern "C" { +#define MOZ_END_EXTERN_C } +# 15 "./../../dist/include/mozilla/Assertions.h" 2 + +# 1 "/usr/include/stdio.h" 1 3 4 +# 27 "/usr/include/stdio.h" 3 4 +#define _STDIO_H 1 + + +extern "C" { + +#define __need_size_t +#define __need_NULL +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 35 "/usr/include/stdio.h" 2 3 4 + +# 1 "/usr/include/bits/types.h" 1 3 4 +# 25 "/usr/include/bits/types.h" 3 4 +#define _BITS_TYPES_H 1 + + +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 19 "/usr/include/bits/wordsize.h" 3 4 +#define __WORDSIZE 32 +# 29 "/usr/include/bits/types.h" 2 3 4 + + +typedef unsigned char __u_char; +typedef unsigned short int __u_short; +typedef unsigned int __u_int; +typedef unsigned long int __u_long; + + +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; + + + + +__extension__ typedef signed long long int __int64_t; +__extension__ typedef unsigned long long int __uint64_t; + + + + + + + +__extension__ typedef long long int __quad_t; +__extension__ typedef unsigned long long int __u_quad_t; +# 99 "/usr/include/bits/types.h" 3 4 +#define __S16_TYPE short int +#define __U16_TYPE unsigned short int +#define __S32_TYPE int +#define __U32_TYPE unsigned int +#define __SLONGWORD_TYPE long int +#define __ULONGWORD_TYPE unsigned long int + +#define __SQUAD_TYPE __quad_t +#define __UQUAD_TYPE __u_quad_t +#define __SWORD_TYPE int +#define __UWORD_TYPE unsigned int +#define __SLONG32_TYPE long int +#define __ULONG32_TYPE unsigned long int +#define __S64_TYPE __quad_t +#define __U64_TYPE __u_quad_t + + +#define __STD_TYPE __extension__ typedef +# 131 "/usr/include/bits/types.h" 3 4 +# 1 "/usr/include/bits/typesizes.h" 1 3 4 +# 25 "/usr/include/bits/typesizes.h" 3 4 +#define _BITS_TYPESIZES_H 1 + + + + +#define __DEV_T_TYPE __UQUAD_TYPE +#define __UID_T_TYPE __U32_TYPE +#define __GID_T_TYPE __U32_TYPE +#define __INO_T_TYPE __ULONGWORD_TYPE +#define __INO64_T_TYPE __UQUAD_TYPE +#define __MODE_T_TYPE __U32_TYPE +#define __NLINK_T_TYPE __UWORD_TYPE +#define __OFF_T_TYPE __SLONGWORD_TYPE +#define __OFF64_T_TYPE __SQUAD_TYPE +#define __PID_T_TYPE __S32_TYPE +#define __RLIM_T_TYPE __ULONGWORD_TYPE +#define __RLIM64_T_TYPE __UQUAD_TYPE +#define __BLKCNT_T_TYPE __SLONGWORD_TYPE +#define __BLKCNT64_T_TYPE __SQUAD_TYPE +#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE +#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE +#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE +#define __FSFILCNT64_T_TYPE __UQUAD_TYPE +#define __ID_T_TYPE __U32_TYPE +#define __CLOCK_T_TYPE __SLONGWORD_TYPE +#define __TIME_T_TYPE __SLONGWORD_TYPE +#define __USECONDS_T_TYPE __U32_TYPE +#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE +#define __DADDR_T_TYPE __S32_TYPE +#define __SWBLK_T_TYPE __SLONGWORD_TYPE +#define __KEY_T_TYPE __S32_TYPE +#define __CLOCKID_T_TYPE __S32_TYPE +#define __TIMER_T_TYPE void * +#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE +#define __FSID_T_TYPE struct { int __val[2]; } +#define __SSIZE_T_TYPE __SWORD_TYPE + + +#define __FD_SETSIZE 1024 +# 132 "/usr/include/bits/types.h" 2 3 4 + + +__extension__ typedef __u_quad_t __dev_t; +__extension__ typedef unsigned int __uid_t; +__extension__ typedef unsigned int __gid_t; +__extension__ typedef unsigned long int __ino_t; +__extension__ typedef __u_quad_t __ino64_t; +__extension__ typedef unsigned int __mode_t; +__extension__ typedef unsigned int __nlink_t; +__extension__ typedef long int __off_t; +__extension__ typedef __quad_t __off64_t; +__extension__ typedef int __pid_t; +__extension__ typedef struct { int __val[2]; } __fsid_t; +__extension__ typedef long int __clock_t; +__extension__ typedef unsigned long int __rlim_t; +__extension__ typedef __u_quad_t __rlim64_t; +__extension__ typedef unsigned int __id_t; +__extension__ typedef long int __time_t; +__extension__ typedef unsigned int __useconds_t; +__extension__ typedef long int __suseconds_t; + +__extension__ typedef int __daddr_t; +__extension__ typedef long int __swblk_t; +__extension__ typedef int __key_t; + + +__extension__ typedef int __clockid_t; + + +__extension__ typedef void * __timer_t; + + +__extension__ typedef long int __blksize_t; + + + + +__extension__ typedef long int __blkcnt_t; +__extension__ typedef __quad_t __blkcnt64_t; + + +__extension__ typedef unsigned long int __fsblkcnt_t; +__extension__ typedef __u_quad_t __fsblkcnt64_t; + + +__extension__ typedef unsigned long int __fsfilcnt_t; +__extension__ typedef __u_quad_t __fsfilcnt64_t; + +__extension__ typedef int __ssize_t; + + + +typedef __off64_t __loff_t; +typedef __quad_t *__qaddr_t; +typedef char *__caddr_t; + + +__extension__ typedef int __intptr_t; + + +__extension__ typedef unsigned int __socklen_t; + + +#undef __STD_TYPE +# 37 "/usr/include/stdio.h" 2 3 4 +#define __need_FILE +#define __need___FILE + + + + + + +struct _IO_FILE; + + + +typedef struct _IO_FILE FILE; + + + + + + + +#define __FILE_defined 1 + +#undef __need_FILE + + + + + +typedef struct _IO_FILE __FILE; + +#define ____FILE_defined 1 + +#undef __need___FILE + + + +#define _STDIO_USES_IOSTREAM + +# 1 "/usr/include/libio.h" 1 3 4 +# 30 "/usr/include/libio.h" 3 4 +#define _IO_STDIO_H + +# 1 "/usr/include/_G_config.h" 1 3 4 + + + + +#define _G_config_h 1 + + + + +#define __need_size_t + + + +#define __need_NULL +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 16 "/usr/include/_G_config.h" 2 3 4 +#define __need_mbstate_t + + + +# 1 "/usr/include/wchar.h" 1 3 4 +# 81 "/usr/include/wchar.h" 3 4 +#define __mbstate_t_defined 1 + +typedef struct +{ + int __count; + union + { + + unsigned int __wch; + + + + char __wchb[4]; + } __value; +} __mbstate_t; + +#undef __need_mbstate_t +# 896 "/usr/include/wchar.h" 3 4 +#undef __need_mbstate_t +#undef __need_wint_t +# 21 "/usr/include/_G_config.h" 2 3 4 +#define _G_size_t size_t +typedef struct +{ + __off_t __pos; + __mbstate_t __state; +} _G_fpos_t; +typedef struct +{ + __off64_t __pos; + __mbstate_t __state; +} _G_fpos64_t; +#define _G_ssize_t __ssize_t +#define _G_off_t __off_t +#define _G_off64_t __off64_t +#define _G_pid_t __pid_t +#define _G_uid_t __uid_t +#define _G_wchar_t wchar_t +#define _G_wint_t wint_t +#define _G_stat64 stat64 +# 53 "/usr/include/_G_config.h" 3 4 +typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); +typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); + +#define _G_HAVE_BOOL 1 + + + +#define _G_HAVE_ATEXIT 1 +#define _G_HAVE_SYS_CDEFS 1 +#define _G_HAVE_SYS_WAIT 1 +#define _G_NEED_STDARG_H 1 +#define _G_va_list __gnuc_va_list + +#define _G_HAVE_PRINTF_FP 1 +#define _G_HAVE_MMAP 1 +#define _G_HAVE_MREMAP 1 +#define _G_HAVE_LONG_DOUBLE_IO 1 +#define _G_HAVE_IO_FILE_OPEN 1 +#define _G_HAVE_IO_GETLINE_INFO 1 + +#define _G_IO_IO_FILE_VERSION 0x20001 + +#define _G_OPEN64 __open64 +#define _G_LSEEK64 __lseek64 +#define _G_MMAP64 __mmap64 +#define _G_FSTAT64(fd,buf) __fxstat64 (_STAT_VER, fd, buf) + + +#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE) + +#define _G_BUFSIZ 8192 + + +#define _G_NAMES_HAVE_UNDERSCORE 0 +#define _G_VTABLE_LABEL_HAS_LENGTH 1 +#define _G_USING_THUNKS 1 +#define _G_VTABLE_LABEL_PREFIX "__vt_" +#define _G_VTABLE_LABEL_PREFIX_ID __vt_ + + + +#define _G_ARGS(ARGLIST) ARGLIST +# 33 "/usr/include/libio.h" 2 3 4 + +#define _IO_pos_t _G_fpos_t +#define _IO_fpos_t _G_fpos_t +#define _IO_fpos64_t _G_fpos64_t +#define _IO_size_t _G_size_t +#define _IO_ssize_t _G_ssize_t +#define _IO_off_t _G_off_t +#define _IO_off64_t _G_off64_t +#define _IO_pid_t _G_pid_t +#define _IO_uid_t _G_uid_t +#define _IO_iconv_t _G_iconv_t +#define _IO_HAVE_SYS_WAIT _G_HAVE_SYS_WAIT +#define _IO_HAVE_ST_BLKSIZE _G_HAVE_ST_BLKSIZE +#define _IO_BUFSIZ _G_BUFSIZ +#define _IO_va_list _G_va_list +#define _IO_wint_t _G_wint_t + + + +#define __need___va_list +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stdarg.h" 1 3 4 +# 34 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stdarg.h" 3 4 +#undef __need___va_list + + + + +#define __GNUC_VA_LIST +typedef __builtin_va_list __gnuc_va_list; +# 54 "/usr/include/libio.h" 2 3 4 + +#undef _IO_va_list +#define _IO_va_list __gnuc_va_list +# 76 "/usr/include/libio.h" 3 4 +#define _PARAMS(protos) __P(protos) + + + + + + + +#define _IO_UNIFIED_JUMPTABLES 1 + + + + + +#define EOF (-1) +# 105 "/usr/include/libio.h" 3 4 +#define _IOS_INPUT 1 +#define _IOS_OUTPUT 2 +#define _IOS_ATEND 4 +#define _IOS_APPEND 8 +#define _IOS_TRUNC 16 +#define _IOS_NOCREATE 32 +#define _IOS_NOREPLACE 64 +#define _IOS_BIN 128 + + + + + + + +#define _IO_MAGIC 0xFBAD0000 +#define _OLD_STDIO_MAGIC 0xFABC0000 +#define _IO_MAGIC_MASK 0xFFFF0000 +#define _IO_USER_BUF 1 +#define _IO_UNBUFFERED 2 +#define _IO_NO_READS 4 +#define _IO_NO_WRITES 8 +#define _IO_EOF_SEEN 0x10 +#define _IO_ERR_SEEN 0x20 +#define _IO_DELETE_DONT_CLOSE 0x40 +#define _IO_LINKED 0x80 +#define _IO_IN_BACKUP 0x100 +#define _IO_LINE_BUF 0x200 +#define _IO_TIED_PUT_GET 0x400 +#define _IO_CURRENTLY_PUTTING 0x800 +#define _IO_IS_APPENDING 0x1000 +#define _IO_IS_FILEBUF 0x2000 +#define _IO_BAD_SEEN 0x4000 +#define _IO_USER_LOCK 0x8000 + +#define _IO_FLAGS2_MMAP 1 +#define _IO_FLAGS2_NOTCANCEL 2 + + + +#define _IO_FLAGS2_USER_WBUF 8 + + + + + + + +#define _IO_SKIPWS 01 +#define _IO_LEFT 02 +#define _IO_RIGHT 04 +#define _IO_INTERNAL 010 +#define _IO_DEC 020 +#define _IO_OCT 040 +#define _IO_HEX 0100 +#define _IO_SHOWBASE 0200 +#define _IO_SHOWPOINT 0400 +#define _IO_UPPERCASE 01000 +#define _IO_SHOWPOS 02000 +#define _IO_SCIENTIFIC 04000 +#define _IO_FIXED 010000 +#define _IO_UNITBUF 020000 +#define _IO_STDIO 040000 +#define _IO_DONT_CLOSE 0100000 +#define _IO_BOOLALPHA 0200000 + + +struct _IO_jump_t; struct _IO_FILE; +# 182 "/usr/include/libio.h" 3 4 +typedef void _IO_lock_t; + + + + + +struct _IO_marker { + struct _IO_marker *_next; + struct _IO_FILE *_sbuf; + + + + int _pos; +# 205 "/usr/include/libio.h" 3 4 +}; + + +enum __codecvt_result +{ + __codecvt_ok, + __codecvt_partial, + __codecvt_error, + __codecvt_noconv +}; +# 273 "/usr/include/libio.h" 3 4 +struct _IO_FILE { + int _flags; +#define _IO_file_flags _flags + + + + char* _IO_read_ptr; + char* _IO_read_end; + char* _IO_read_base; + char* _IO_write_base; + char* _IO_write_ptr; + char* _IO_write_end; + char* _IO_buf_base; + char* _IO_buf_end; + + char *_IO_save_base; + char *_IO_backup_base; + char *_IO_save_end; + + struct _IO_marker *_markers; + + struct _IO_FILE *_chain; + + int _fileno; + + + + int _flags2; + + __off_t _old_offset; + +#define __HAVE_COLUMN + + unsigned short _cur_column; + signed char _vtable_offset; + char _shortbuf[1]; + + + + _IO_lock_t *_lock; +# 321 "/usr/include/libio.h" 3 4 + __off64_t _offset; +# 330 "/usr/include/libio.h" 3 4 + void *__pad1; + void *__pad2; + void *__pad3; + void *__pad4; + size_t __pad5; + + int _mode; + + char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; + +}; + + + + + +struct _IO_FILE_plus; + +extern struct _IO_FILE_plus _IO_2_1_stdin_; +extern struct _IO_FILE_plus _IO_2_1_stdout_; +extern struct _IO_FILE_plus _IO_2_1_stderr_; + +#define _IO_stdin ((_IO_FILE*)(&_IO_2_1_stdin_)) +#define _IO_stdout ((_IO_FILE*)(&_IO_2_1_stdout_)) +#define _IO_stderr ((_IO_FILE*)(&_IO_2_1_stderr_)) +# 366 "/usr/include/libio.h" 3 4 +typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); + + + + + + + +typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, + size_t __n); + + + + + + + +typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); + + +typedef int __io_close_fn (void *__cookie); + + + + +typedef __io_read_fn cookie_read_function_t; +typedef __io_write_fn cookie_write_function_t; +typedef __io_seek_fn cookie_seek_function_t; +typedef __io_close_fn cookie_close_function_t; + + +typedef struct +{ + __io_read_fn *read; + __io_write_fn *write; + __io_seek_fn *seek; + __io_close_fn *close; +} _IO_cookie_io_functions_t; +typedef _IO_cookie_io_functions_t cookie_io_functions_t; + +struct _IO_cookie_file; + + +extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, + void *__cookie, _IO_cookie_io_functions_t __fns); + + + + +extern "C" { + + +extern int __underflow (_IO_FILE *); +extern int __uflow (_IO_FILE *); +extern int __overflow (_IO_FILE *, int); + + + + + + + +#define _IO_BE(expr,res) __builtin_expect ((expr), res) + + + + +#define _IO_getc_unlocked(_fp) (_IO_BE ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end, 0) ? __uflow (_fp) : *(unsigned char *) (_fp)->_IO_read_ptr++) + + +#define _IO_peekc_unlocked(_fp) (_IO_BE ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end, 0) && __underflow (_fp) == EOF ? EOF : *(unsigned char *) (_fp)->_IO_read_ptr) + + + +#define _IO_putc_unlocked(_ch,_fp) (_IO_BE ((_fp)->_IO_write_ptr >= (_fp)->_IO_write_end, 0) ? __overflow (_fp, (unsigned char) (_ch)) : (unsigned char) (*(_fp)->_IO_write_ptr++ = (_ch))) +# 459 "/usr/include/libio.h" 3 4 +#define _IO_feof_unlocked(__fp) (((__fp)->_flags & _IO_EOF_SEEN) != 0) +#define _IO_ferror_unlocked(__fp) (((__fp)->_flags & _IO_ERR_SEEN) != 0) + +extern int _IO_getc (_IO_FILE *__fp); +extern int _IO_putc (int __c, _IO_FILE *__fp); +extern int _IO_feof (_IO_FILE *__fp) throw (); +extern int _IO_ferror (_IO_FILE *__fp) throw (); + +extern int _IO_peekc_locked (_IO_FILE *__fp); + + +#define _IO_PENDING_OUTPUT_COUNT(_fp) ((_fp)->_IO_write_ptr - (_fp)->_IO_write_base) + + +extern void _IO_flockfile (_IO_FILE *) throw (); +extern void _IO_funlockfile (_IO_FILE *) throw (); +extern int _IO_ftrylockfile (_IO_FILE *) throw (); +# 484 "/usr/include/libio.h" 3 4 +#define _IO_peekc(_fp) _IO_peekc_unlocked (_fp) +#define _IO_flockfile(_fp) +#define _IO_funlockfile(_fp) +#define _IO_ftrylockfile(_fp) +#define _IO_cleanup_region_start(_fct,_fp) +#define _IO_cleanup_region_end(_Doit) + + +extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, + __gnuc_va_list, int *__restrict); +extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, + __gnuc_va_list); +extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); +extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); + +extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); +extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); + +extern void _IO_free_backup_area (_IO_FILE *) throw (); +# 554 "/usr/include/libio.h" 3 4 +} +# 76 "/usr/include/stdio.h" 2 3 4 + + + + +typedef __gnuc_va_list va_list; +#define _VA_LIST_DEFINED +# 91 "/usr/include/stdio.h" 3 4 +typedef __off_t off_t; + + + +#define __off_t_defined + + +typedef __off64_t off64_t; +#define __off64_t_defined + + + +typedef __ssize_t ssize_t; +#define __ssize_t_defined + + + + + + +typedef _G_fpos_t fpos_t; + + + + + +typedef _G_fpos64_t fpos64_t; + + + +#define _IOFBF 0 +#define _IOLBF 1 +#define _IONBF 2 + + + + +#define BUFSIZ _IO_BUFSIZ +# 141 "/usr/include/stdio.h" 3 4 +#define SEEK_SET 0 +#define SEEK_CUR 1 +#define SEEK_END 2 + +#define SEEK_DATA 3 +#define SEEK_HOLE 4 + + + + + +#define P_tmpdir "/tmp" +# 165 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/bits/stdio_lim.h" 1 3 4 +# 24 "/usr/include/bits/stdio_lim.h" 3 4 +#define L_tmpnam 20 +#define TMP_MAX 238328 +#define FILENAME_MAX 4096 + + +#define L_ctermid 9 + +#define L_cuserid 9 + + + + + +#undef FOPEN_MAX +#define FOPEN_MAX 16 +# 166 "/usr/include/stdio.h" 2 3 4 + + + +extern struct _IO_FILE *stdin; +extern struct _IO_FILE *stdout; +extern struct _IO_FILE *stderr; + +#define stdin stdin +#define stdout stdout +#define stderr stderr + + + +extern int remove (__const char *__filename) throw (); + +extern int rename (__const char *__old, __const char *__new) throw (); + + + + +extern int renameat (int __oldfd, __const char *__old, int __newfd, + __const char *__new) throw (); + + + + + + + + +extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__)); +# 206 "/usr/include/stdio.h" 3 4 +extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__)); + + + +extern char *tmpnam (char *__s) throw () __attribute__ ((__warn_unused_result__)); + + + + + +extern char *tmpnam_r (char *__s) throw () __attribute__ ((__warn_unused_result__)); +# 228 "/usr/include/stdio.h" 3 4 +extern char *tempnam (__const char *__dir, __const char *__pfx) + throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fclose (FILE *__stream); + + + + +extern int fflush (FILE *__stream); + +# 253 "/usr/include/stdio.h" 3 4 +extern int fflush_unlocked (FILE *__stream); +# 263 "/usr/include/stdio.h" 3 4 +extern int fcloseall (void); + + + + + + + + + +extern FILE *fopen (__const char *__restrict __filename, + __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *freopen (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +# 296 "/usr/include/stdio.h" 3 4 + + +extern FILE *fopen64 (__const char *__restrict __filename, + __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); +extern FILE *freopen64 (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *fdopen (int __fd, __const char *__modes) throw () __attribute__ ((__warn_unused_result__)); + + + + + +extern FILE *fopencookie (void *__restrict __magic_cookie, + __const char *__restrict __modes, + _IO_cookie_io_functions_t __io_funcs) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) + throw () __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () __attribute__ ((__warn_unused_result__)); + + + + + + +extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); + + + +extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, + int __modes, size_t __n) throw (); + + + + + +extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, + size_t __size) throw (); + + +extern void setlinebuf (FILE *__stream) throw (); + + + + + + + + +extern int fprintf (FILE *__restrict __stream, + __const char *__restrict __format, ...); + + + + +extern int printf (__const char *__restrict __format, ...); + +extern int sprintf (char *__restrict __s, + __const char *__restrict __format, ...) throw (); + + + + + +extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg); + + + + +extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); + +extern int vsprintf (char *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) throw (); + + + + + +extern int snprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, ...) + throw () __attribute__ ((__format__ (__printf__, 3, 4))); + +extern int vsnprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__printf__, 3, 0))); + + + + + + +extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, + __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__)); +extern int __asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + throw () __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +extern int asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + throw () __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +# 418 "/usr/include/stdio.h" 3 4 +extern int vdprintf (int __fd, __const char *__restrict __fmt, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 2, 0))); +extern int dprintf (int __fd, __const char *__restrict __fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); + + + + + + + + +extern int fscanf (FILE *__restrict __stream, + __const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); + + + + +extern int scanf (__const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); + +extern int sscanf (__const char *__restrict __s, + __const char *__restrict __format, ...) throw (); +# 469 "/usr/include/stdio.h" 3 4 + + + + + + + + +extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); + + +extern int vsscanf (__const char *__restrict __s, + __const char *__restrict __format, __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__scanf__, 2, 0))); +# 528 "/usr/include/stdio.h" 3 4 + + + + + + + + + +extern int fgetc (FILE *__stream); +extern int getc (FILE *__stream); + + + + + +extern int getchar (void); + + + + +#define getc(_fp) _IO_getc (_fp) + + + + + + +extern int getc_unlocked (FILE *__stream); +extern int getchar_unlocked (void); +# 567 "/usr/include/stdio.h" 3 4 +extern int fgetc_unlocked (FILE *__stream); + + + + + + + + + + + +extern int fputc (int __c, FILE *__stream); +extern int putc (int __c, FILE *__stream); + + + + + +extern int putchar (int __c); + + + + +#define putc(_ch,_fp) _IO_putc (_ch, _fp) +# 600 "/usr/include/stdio.h" 3 4 +extern int fputc_unlocked (int __c, FILE *__stream); + + + + + + + +extern int putc_unlocked (int __c, FILE *__stream); +extern int putchar_unlocked (int __c); + + + + + + +extern int getw (FILE *__stream); + + +extern int putw (int __w, FILE *__stream); + + + + + + + + +extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) + __attribute__ ((__warn_unused_result__)); + + + + + + +extern char *gets (char *__s) __attribute__ ((__warn_unused_result__)); + +# 646 "/usr/include/stdio.h" 3 4 +extern char *fgets_unlocked (char *__restrict __s, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +# 662 "/usr/include/stdio.h" 3 4 +extern __ssize_t __getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern __ssize_t getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern __ssize_t getline (char **__restrict __lineptr, + size_t *__restrict __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); + + + + + +extern int puts (__const char *__s); + + + + + + +extern int ungetc (int __c, FILE *__stream); + + + + + + +extern size_t fread (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + +extern size_t fwrite (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __s) __attribute__ ((__warn_unused_result__)); + +# 723 "/usr/include/stdio.h" 3 4 +extern int fputs_unlocked (__const char *__restrict __s, + FILE *__restrict __stream); +# 734 "/usr/include/stdio.h" 3 4 +extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fseek (FILE *__stream, long int __off, int __whence); + + + + +extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)); + + + + +extern void rewind (FILE *__stream); + +# 770 "/usr/include/stdio.h" 3 4 +extern int fseeko (FILE *__stream, __off_t __off, int __whence); + + + + +extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__)); +# 789 "/usr/include/stdio.h" 3 4 + + + + + + +extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); + + + + +extern int fsetpos (FILE *__stream, __const fpos_t *__pos); +# 812 "/usr/include/stdio.h" 3 4 + + + +extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); +extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__)); +extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); +extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); + + + + +extern void clearerr (FILE *__stream) throw (); + +extern int feof (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + +extern int ferror (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern void clearerr_unlocked (FILE *__stream) throw (); +extern int feof_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); +extern int ferror_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern void perror (__const char *__s); + + + + + + +# 1 "/usr/include/bits/sys_errlist.h" 1 3 4 +# 27 "/usr/include/bits/sys_errlist.h" 3 4 +extern int sys_nerr; +extern __const char *__const sys_errlist[]; + + +extern int _sys_nerr; +extern __const char *__const _sys_errlist[]; +# 851 "/usr/include/stdio.h" 2 3 4 + + + + +extern int fileno (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern int fileno_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); +# 870 "/usr/include/stdio.h" 3 4 +extern FILE *popen (__const char *__command, __const char *__modes) __attribute__ ((__warn_unused_result__)); + + + + + +extern int pclose (FILE *__stream); + + + + + +extern char *ctermid (char *__s) throw (); + + + + + +extern char *cuserid (char *__s); + + + + +struct obstack; + + +extern int obstack_printf (struct obstack *__restrict __obstack, + __const char *__restrict __format, ...) + throw () __attribute__ ((__format__ (__printf__, 2, 3))); +extern int obstack_vprintf (struct obstack *__restrict __obstack, + __const char *__restrict __format, + __gnuc_va_list __args) + throw () __attribute__ ((__format__ (__printf__, 2, 0))); + + + + + + + +extern void flockfile (FILE *__stream) throw (); + + + +extern int ftrylockfile (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + + +extern void funlockfile (FILE *__stream) throw (); +# 931 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/bits/stdio.h" 1 3 4 +# 27 "/usr/include/bits/stdio.h" 3 4 +#define __STDIO_INLINE __extern_inline +# 44 "/usr/include/bits/stdio.h" 3 4 +extern __inline __attribute__ ((__gnu_inline__)) int +getchar (void) +{ + return _IO_getc (stdin); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +fgetc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +getc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +getchar_unlocked (void) +{ + return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +putchar (int __c) +{ + return _IO_putc (__c, stdout); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +fputc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +putc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +putchar_unlocked (int __c) +{ + return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) __ssize_t +getline (char **__lineptr, size_t *__n, FILE *__stream) +{ + return __getdelim (__lineptr, __n, '\n', __stream); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int + feof_unlocked (FILE *__stream) throw () +{ + return (((__stream)->_flags & 0x10) != 0); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int + ferror_unlocked (FILE *__stream) throw () +{ + return (((__stream)->_flags & 0x20) != 0); +} +# 191 "/usr/include/bits/stdio.h" 3 4 +#undef __STDIO_INLINE +# 932 "/usr/include/stdio.h" 2 3 4 + + +# 1 "/usr/include/bits/stdio2.h" 1 3 4 +# 24 "/usr/include/bits/stdio2.h" 3 4 +extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, + __const char *__restrict __format, ...) throw (); +extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, + __const char *__restrict __format, + __gnuc_va_list __ap) throw (); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int + sprintf (char *__restrict __s, __const char *__restrict __fmt, ...) throw () +{ + return __builtin___sprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int + vsprintf (char *__restrict __s, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () + +{ + return __builtin___vsprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} + + + +extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, __const char *__restrict __format, + ...) throw (); +extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, __const char *__restrict __format, + __gnuc_va_list __ap) throw (); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int + snprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, ...) throw () + +{ + return __builtin___snprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int + vsnprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () + +{ + return __builtin___vsnprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} + + + + + +extern int __fprintf_chk (FILE *__restrict __stream, int __flag, + __const char *__restrict __format, ...); +extern int __printf_chk (int __flag, __const char *__restrict __format, ...); +extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, + __const char *__restrict __format, __gnuc_va_list __ap); +extern int __vprintf_chk (int __flag, __const char *__restrict __format, + __gnuc_va_list __ap); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +fprintf (FILE *__restrict __stream, __const char *__restrict __fmt, ...) +{ + return __fprintf_chk (__stream, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +printf (__const char *__restrict __fmt, ...) +{ + return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); +} + + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vprintf (__const char *__restrict __fmt, __gnuc_va_list __ap) +{ + + return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap); + + + +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vfprintf (FILE *__restrict __stream, + __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap); +} + + + +extern int __asprintf_chk (char **__restrict __ptr, int __flag, + __const char *__restrict __fmt, ...) + throw () __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__)); +extern int __vasprintf_chk (char **__restrict __ptr, int __flag, + __const char *__restrict __fmt, __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__)); +extern int __dprintf_chk (int __fd, int __flag, __const char *__restrict __fmt, + ...) __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __vdprintf_chk (int __fd, int __flag, + __const char *__restrict __fmt, __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 3, 0))); +extern int __obstack_printf_chk (struct obstack *__restrict __obstack, + int __flag, __const char *__restrict __format, + ...) + throw () __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack, + int __flag, + __const char *__restrict __format, + __gnuc_va_list __args) + throw () __attribute__ ((__format__ (__printf__, 3, 0))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int + asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int + __asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () + +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +dprintf (int __fd, __const char *__restrict __fmt, ...) +{ + return __dprintf_chk (__fd, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int + obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, ...) throw () + +{ + return __obstack_printf_chk (__obstack, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +# 195 "/usr/include/bits/stdio2.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int + vasprintf (char **__restrict __ptr, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () + +{ + return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int + obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () + +{ + return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt, + __ap); +} + + + + + +extern char *__gets_chk (char *__str, size_t) __attribute__ ((__warn_unused_result__)); +extern char *__gets_warn (char *__str) __asm__ ("" "gets") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use fgets or getline instead, gets can't " "specify buffer size"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +gets (char *__str) +{ + if (__builtin_object_size (__str, 2 > 1) != (size_t) -1) + return __gets_chk (__str, __builtin_object_size (__str, 2 > 1)); + return __gets_warn (__str); +} + +extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") + + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_alias (__s, __n, __stream); +} + +extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") + + + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk") + + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + } + return __fread_alias (__ptr, __size, __n, __stream); +} + + +extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size, + int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked") + + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_unlocked_alias (__s, __n, __stream); +} + + + +#undef fread_unlocked +extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") + + + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk") + + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + } + + + if (__builtin_constant_p (__size) + && __builtin_constant_p (__n) + && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) + && __size * __n <= 8) + { + size_t __cnt = __size * __n; + char *__cptr = (char *) __ptr; + if (__cnt == 0) + return 0; + + for (; __cnt > 0; --__cnt) + { + int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++); + if (__c == (-1)) + break; + *__cptr++ = __c; + } + return (__cptr - (char *) __ptr) / __size; + } + + return __fread_unlocked_alias (__ptr, __size, __n, __stream); +} +# 935 "/usr/include/stdio.h" 2 3 4 + + + + + +} +# 17 "./../../dist/include/mozilla/Assertions.h" 2 +# 1 "/usr/include/stdlib.h" 1 3 4 +# 28 "/usr/include/stdlib.h" 3 4 +#define __need_size_t + +#define __need_wchar_t +#define __need_NULL + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 34 "/usr/include/stdlib.h" 2 3 4 + +extern "C" { + + +#define _STDLIB_H 1 + + + +# 1 "/usr/include/bits/waitflags.h" 1 3 4 +# 26 "/usr/include/bits/waitflags.h" 3 4 +#define WNOHANG 1 +#define WUNTRACED 2 + + +#define WSTOPPED 2 +#define WEXITED 4 +#define WCONTINUED 8 +#define WNOWAIT 0x01000000 + +#define __WNOTHREAD 0x20000000 + +#define __WALL 0x40000000 +#define __WCLONE 0x80000000 +# 43 "/usr/include/stdlib.h" 2 3 4 +# 1 "/usr/include/bits/waitstatus.h" 1 3 4 +# 29 "/usr/include/bits/waitstatus.h" 3 4 +#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8) + + +#define __WTERMSIG(status) ((status) & 0x7f) + + +#define __WSTOPSIG(status) __WEXITSTATUS(status) + + +#define __WIFEXITED(status) (__WTERMSIG(status) == 0) + + +#define __WIFSIGNALED(status) (((signed char) (((status) & 0x7f) + 1) >> 1) > 0) + + + +#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f) + + + + +#define __WIFCONTINUED(status) ((status) == __W_CONTINUED) + + + +#define __WCOREDUMP(status) ((status) & __WCOREFLAG) + + +#define __W_EXITCODE(ret,sig) ((ret) << 8 | (sig)) +#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f) +#define __W_CONTINUED 0xffff +#define __WCOREFLAG 0x80 + + + + +# 1 "/usr/include/endian.h" 1 3 4 +# 20 "/usr/include/endian.h" 3 4 +#define _ENDIAN_H 1 +# 32 "/usr/include/endian.h" 3 4 +#define __LITTLE_ENDIAN 1234 +#define __BIG_ENDIAN 4321 +#define __PDP_ENDIAN 3412 + + +# 1 "/usr/include/bits/endian.h" 1 3 4 +# 9 "/usr/include/bits/endian.h" 3 4 +#define __BYTE_ORDER __LITTLE_ENDIAN + + + + + + +#define __FLOAT_WORD_ORDER __BYTE_ORDER +# 38 "/usr/include/endian.h" 2 3 4 +# 46 "/usr/include/endian.h" 3 4 +#define LITTLE_ENDIAN __LITTLE_ENDIAN +#define BIG_ENDIAN __BIG_ENDIAN +#define PDP_ENDIAN __PDP_ENDIAN +#define BYTE_ORDER __BYTE_ORDER + + + +#define __LONG_LONG_PAIR(HI,LO) LO, HI + + + + + + + +# 1 "/usr/include/bits/byteswap.h" 1 3 4 +# 26 "/usr/include/bits/byteswap.h" 3 4 +#define _BITS_BYTESWAP_H 1 + + +#define __bswap_constant_16(x) ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8)) + + + +#define __bswap_16(x) (__extension__ ({ unsigned short int __bsx = (x); __bswap_constant_16 (__bsx); })) +# 45 "/usr/include/bits/byteswap.h" 3 4 +#define __bswap_constant_32(x) ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24)) + + + + +#define __bswap_32(x) (__extension__ ({ register unsigned int __bsx = (x); __bswap_constant_32 (__bsx); })) +# 63 "/usr/include/bits/byteswap.h" 3 4 +#define __bswap_constant_64(x) (__extension__ ((((x) & 0xff00000000000000ull) >> 56) | (((x) & 0x00ff000000000000ull) >> 40) | (((x) & 0x0000ff0000000000ull) >> 24) | (((x) & 0x000000ff00000000ull) >> 8) | (((x) & 0x00000000ff000000ull) << 8) | (((x) & 0x0000000000ff0000ull) << 24) | (((x) & 0x000000000000ff00ull) << 40) | (((x) & 0x00000000000000ffull) << 56))) +# 73 "/usr/include/bits/byteswap.h" 3 4 +#define __bswap_64(x) (__extension__ ({ union { __extension__ unsigned long long int __ll; unsigned int __l[2]; } __w, __r; if (__builtin_constant_p (x)) __r.__ll = __bswap_constant_64 (x); else { __w.__ll = (x); __r.__l[0] = __bswap_32 (__w.__l[1]); __r.__l[1] = __bswap_32 (__w.__l[0]); } __r.__ll; })) +# 62 "/usr/include/endian.h" 2 3 4 + + +#define htobe16(x) __bswap_16 (x) +#define htole16(x) (x) +#define be16toh(x) __bswap_16 (x) +#define le16toh(x) (x) + +#define htobe32(x) __bswap_32 (x) +#define htole32(x) (x) +#define be32toh(x) __bswap_32 (x) +#define le32toh(x) (x) + +#define htobe64(x) __bswap_64 (x) +#define htole64(x) (x) +#define be64toh(x) __bswap_64 (x) +#define le64toh(x) (x) +# 66 "/usr/include/bits/waitstatus.h" 2 3 4 + +union wait + { + int w_status; + struct + { + + unsigned int __w_termsig:7; + unsigned int __w_coredump:1; + unsigned int __w_retcode:8; + unsigned int:16; + + + + + + + + } __wait_terminated; + struct + { + + unsigned int __w_stopval:8; + unsigned int __w_stopsig:8; + unsigned int:16; + + + + + + + } __wait_stopped; + }; + +#define w_termsig __wait_terminated.__w_termsig +#define w_coredump __wait_terminated.__w_coredump +#define w_retcode __wait_terminated.__w_retcode +#define w_stopsig __wait_stopped.__w_stopsig +#define w_stopval __wait_stopped.__w_stopval +# 44 "/usr/include/stdlib.h" 2 3 4 +# 55 "/usr/include/stdlib.h" 3 4 +#define __WAIT_INT(status) (*(int *) &(status)) +# 64 "/usr/include/stdlib.h" 3 4 +#define __WAIT_STATUS void * +#define __WAIT_STATUS_DEFN void * +# 85 "/usr/include/stdlib.h" 3 4 +#define WEXITSTATUS(status) __WEXITSTATUS (__WAIT_INT (status)) +#define WTERMSIG(status) __WTERMSIG (__WAIT_INT (status)) +#define WSTOPSIG(status) __WSTOPSIG (__WAIT_INT (status)) +#define WIFEXITED(status) __WIFEXITED (__WAIT_INT (status)) +#define WIFSIGNALED(status) __WIFSIGNALED (__WAIT_INT (status)) +#define WIFSTOPPED(status) __WIFSTOPPED (__WAIT_INT (status)) + +#define WIFCONTINUED(status) __WIFCONTINUED (__WAIT_INT (status)) + + + + + +typedef struct + { + int quot; + int rem; + } div_t; + + + +typedef struct + { + long int quot; + long int rem; + } ldiv_t; +#define __ldiv_t_defined 1 + + + + + + +__extension__ typedef struct + { + long long int quot; + long long int rem; + } lldiv_t; +#define __lldiv_t_defined 1 + + + + + +#define RAND_MAX 2147483647 + + + + +#define EXIT_FAILURE 1 +#define EXIT_SUCCESS 0 + + + +#define MB_CUR_MAX (__ctype_get_mb_cur_max ()) +extern size_t __ctype_get_mb_cur_max (void) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern double atof (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern int atoi (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern long int atol (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +__extension__ extern long long int atoll (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern double strtod (__const char *__restrict __nptr, + char **__restrict __endptr) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern float strtof (__const char *__restrict __nptr, + char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern long double strtold (__const char *__restrict __nptr, + char **__restrict __endptr) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern long int strtol (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern unsigned long int strtoul (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +__extension__ +extern long long int strtoq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtouq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +__extension__ +extern long long int strtoll (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtoull (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +# 236 "/usr/include/stdlib.h" 3 4 +# 1 "/usr/include/xlocale.h" 1 3 4 +# 22 "/usr/include/xlocale.h" 3 4 +#define _XLOCALE_H 1 + + + + + +typedef struct __locale_struct +{ + + struct __locale_data *__locales[13]; + + + const unsigned short int *__ctype_b; + const int *__ctype_tolower; + const int *__ctype_toupper; + + + const char *__names[13]; +} *__locale_t; + + +typedef __locale_t locale_t; +# 237 "/usr/include/stdlib.h" 2 3 4 + + + +extern long int strtol_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +extern unsigned long int strtoul_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern long long int strtoll_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtoull_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +extern double strtod_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + +extern float strtof_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + +extern long double strtold_l (__const char *__restrict __nptr, + char **__restrict __endptr, + __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + + + + + +extern __inline __attribute__ ((__gnu_inline__)) double + atof (__const char *__nptr) throw () +{ + return strtod (__nptr, (char **) __null); +} +extern __inline __attribute__ ((__gnu_inline__)) int + atoi (__const char *__nptr) throw () +{ + return (int) strtol (__nptr, (char **) __null, 10); +} +extern __inline __attribute__ ((__gnu_inline__)) long int + atol (__const char *__nptr) throw () +{ + return strtol (__nptr, (char **) __null, 10); +} + + + + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int + atoll (__const char *__nptr) throw () +{ + return strtoll (__nptr, (char **) __null, 10); +} + +# 311 "/usr/include/stdlib.h" 3 4 +extern char *l64a (long int __n) throw () __attribute__ ((__warn_unused_result__)); + + +extern long int a64l (__const char *__s) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +# 1 "/usr/include/sys/types.h" 1 3 4 +# 24 "/usr/include/sys/types.h" 3 4 +#define _SYS_TYPES_H 1 + + + +extern "C" { + + + + + +typedef __u_char u_char; +typedef __u_short u_short; +typedef __u_int u_int; +typedef __u_long u_long; +typedef __quad_t quad_t; +typedef __u_quad_t u_quad_t; +typedef __fsid_t fsid_t; +#define __u_char_defined + + + +typedef __loff_t loff_t; + + + +typedef __ino_t ino_t; + + + +#define __ino_t_defined + + +typedef __ino64_t ino64_t; +#define __ino64_t_defined + + + +typedef __dev_t dev_t; +#define __dev_t_defined + + + +typedef __gid_t gid_t; +#define __gid_t_defined + + + +typedef __mode_t mode_t; +#define __mode_t_defined + + + +typedef __nlink_t nlink_t; +#define __nlink_t_defined + + + +typedef __uid_t uid_t; +#define __uid_t_defined +# 99 "/usr/include/sys/types.h" 3 4 +typedef __pid_t pid_t; +#define __pid_t_defined + + + + +typedef __id_t id_t; +#define __id_t_defined +# 116 "/usr/include/sys/types.h" 3 4 +typedef __daddr_t daddr_t; +typedef __caddr_t caddr_t; +#define __daddr_t_defined + + + + +typedef __key_t key_t; +#define __key_t_defined + + + +#define __need_clock_t + +#define __need_time_t +#define __need_timer_t +#define __need_clockid_t +# 1 "/usr/include/time.h" 1 3 4 +# 54 "/usr/include/time.h" 3 4 +#define __clock_t_defined 1 + + + + + +typedef __clock_t clock_t; + + + + + + +#undef __need_clock_t + + +#define __time_t_defined 1 + + + + + +typedef __time_t time_t; + + + + + + +#undef __need_time_t + + + +#define __clockid_t_defined 1 + + + + +typedef __clockid_t clockid_t; + + +#undef __clockid_time_t + + + +#define __timer_t_defined 1 + + + + +typedef __timer_t timer_t; + + +#undef __need_timer_t +# 127 "/usr/include/time.h" 3 4 +#undef __need_timespec +# 134 "/usr/include/sys/types.h" 2 3 4 + + + +typedef __useconds_t useconds_t; +#define __useconds_t_defined + + +typedef __suseconds_t suseconds_t; +#define __suseconds_t_defined + + + +#define __need_size_t +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 148 "/usr/include/sys/types.h" 2 3 4 + + + +typedef unsigned long int ulong; +typedef unsigned short int ushort; +typedef unsigned int uint; +# 188 "/usr/include/sys/types.h" 3 4 +#define __intN_t(N,MODE) typedef int int ##N ##_t __attribute__ ((__mode__ (MODE))) + +#define __u_intN_t(N,MODE) typedef unsigned int u_int ##N ##_t __attribute__ ((__mode__ (MODE))) +# 201 "/usr/include/sys/types.h" 3 4 +typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); +typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); + +typedef int register_t __attribute__ ((__mode__ (__word__))); + + + + + +#define __BIT_TYPES_DEFINED__ 1 + + + + + + + +# 1 "/usr/include/sys/select.h" 1 3 4 +# 23 "/usr/include/sys/select.h" 3 4 +#define _SYS_SELECT_H 1 + + + + + + + +# 1 "/usr/include/bits/select.h" 1 3 4 +# 26 "/usr/include/bits/select.h" 3 4 +#define __FD_ZERO(s) do { unsigned int __i; fd_set *__arr = (s); for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) __FDS_BITS (__arr)[__i] = 0; } while (0) + + + + + + +#define __FD_SET(d,s) ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d))) + +#define __FD_CLR(d,s) ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d))) + +#define __FD_ISSET(d,s) ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0) +# 32 "/usr/include/sys/select.h" 2 3 4 + + +# 1 "/usr/include/bits/sigset.h" 1 3 4 +# 22 "/usr/include/bits/sigset.h" 3 4 +#define _SIGSET_H_types 1 + +typedef int __sig_atomic_t; + + + +#define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) +typedef struct + { + unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; + } __sigset_t; +# 35 "/usr/include/sys/select.h" 2 3 4 + + +#define __sigset_t_defined +typedef __sigset_t sigset_t; + + + +#define __need_time_t +#define __need_timespec +# 1 "/usr/include/time.h" 1 3 4 +# 67 "/usr/include/time.h" 3 4 +#undef __need_clock_t +# 83 "/usr/include/time.h" 3 4 +#undef __need_time_t +# 95 "/usr/include/time.h" 3 4 +#undef __clockid_time_t +# 107 "/usr/include/time.h" 3 4 +#undef __need_timer_t + + + + + + +#define __timespec_defined 1 + + + + + +struct timespec + { + __time_t tv_sec; + long int tv_nsec; + }; + + +#undef __need_timespec +# 45 "/usr/include/sys/select.h" 2 3 4 +#define __need_timeval +# 1 "/usr/include/bits/time.h" 1 3 4 +# 26 "/usr/include/bits/time.h" 3 4 +#define _STRUCT_TIMEVAL 1 + + + + +struct timeval + { + __time_t tv_sec; + __suseconds_t tv_usec; + }; +# 99 "/usr/include/bits/time.h" 3 4 +#undef __need_timeval +# 47 "/usr/include/sys/select.h" 2 3 4 +# 55 "/usr/include/sys/select.h" 3 4 +typedef long int __fd_mask; + + +#undef __NFDBITS + +#define __NFDBITS (8 * (int) sizeof (__fd_mask)) +#define __FD_ELT(d) ((d) / __NFDBITS) +#define __FD_MASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS)) + + +typedef struct + { + + + + __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; +#define __FDS_BITS(set) ((set)->fds_bits) + + + + + } fd_set; + + +#define FD_SETSIZE __FD_SETSIZE + + + +typedef __fd_mask fd_mask; + + +#define NFDBITS __NFDBITS + + + + +#define FD_SET(fd,fdsetp) __FD_SET (fd, fdsetp) +#define FD_CLR(fd,fdsetp) __FD_CLR (fd, fdsetp) +#define FD_ISSET(fd,fdsetp) __FD_ISSET (fd, fdsetp) +#define FD_ZERO(fdsetp) __FD_ZERO (fdsetp) + + +extern "C" { +# 107 "/usr/include/sys/select.h" 3 4 +extern int select (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + struct timeval *__restrict __timeout); +# 119 "/usr/include/sys/select.h" 3 4 +extern int pselect (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + const struct timespec *__restrict __timeout, + const __sigset_t *__restrict __sigmask); + + + + + +# 1 "/usr/include/bits/select2.h" 1 3 4 +# 25 "/usr/include/bits/select2.h" 3 4 +extern long int __fdelt_chk (long int __d); +extern long int __fdelt_warn (long int __d) + __attribute__((__warning__ ("bit outside of fd_set selected"))); +#undef __FD_ELT +#define __FD_ELT(d) __extension__ ({ long int __d = (d); (__builtin_constant_p (__d) ? (0 <= __d && __d < __FD_SETSIZE ? (__d / __NFDBITS) : __fdelt_warn (__d)) : __fdelt_chk (__d)); }) +# 130 "/usr/include/sys/select.h" 2 3 4 + + +} +# 221 "/usr/include/sys/types.h" 2 3 4 + + +# 1 "/usr/include/sys/sysmacros.h" 1 3 4 +# 22 "/usr/include/sys/sysmacros.h" 3 4 +#define _SYS_SYSMACROS_H 1 + + + + + + + +extern "C" { + +__extension__ +extern unsigned int gnu_dev_major (unsigned long long int __dev) + throw () __attribute__ ((__const__)); +__extension__ +extern unsigned int gnu_dev_minor (unsigned long long int __dev) + throw () __attribute__ ((__const__)); +__extension__ +extern unsigned long long int gnu_dev_makedev (unsigned int __major, + unsigned int __minor) + throw () __attribute__ ((__const__)); + + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) unsigned int + gnu_dev_major (unsigned long long int __dev) throw () +{ + return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); +} + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) unsigned int + gnu_dev_minor (unsigned long long int __dev) throw () +{ + return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); +} + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) unsigned long long int + gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw () +{ + return ((__minor & 0xff) | ((__major & 0xfff) << 8) + | (((unsigned long long int) (__minor & ~0xff)) << 12) + | (((unsigned long long int) (__major & ~0xfff)) << 32)); +} + +} + + +#define major(dev) gnu_dev_major (dev) +#define minor(dev) gnu_dev_minor (dev) +#define makedev(maj,min) gnu_dev_makedev (maj, min) +# 224 "/usr/include/sys/types.h" 2 3 4 + + + + + +typedef __blksize_t blksize_t; +#define __blksize_t_defined + + + + + +typedef __blkcnt_t blkcnt_t; +#define __blkcnt_t_defined + + +typedef __fsblkcnt_t fsblkcnt_t; +#define __fsblkcnt_t_defined + + +typedef __fsfilcnt_t fsfilcnt_t; +#define __fsfilcnt_t_defined +# 263 "/usr/include/sys/types.h" 3 4 +typedef __blkcnt64_t blkcnt64_t; +typedef __fsblkcnt64_t fsblkcnt64_t; +typedef __fsfilcnt64_t fsfilcnt64_t; + + + + + +# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 +# 20 "/usr/include/bits/pthreadtypes.h" 3 4 +#define _BITS_PTHREADTYPES_H 1 + + + +#define __SIZEOF_PTHREAD_ATTR_T 36 +#define __SIZEOF_PTHREAD_MUTEX_T 24 +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_COND_COMPAT_T 12 +#define __SIZEOF_PTHREAD_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_RWLOCK_T 32 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIER_T 20 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 + + + + +typedef unsigned long int pthread_t; + + +typedef union +{ + char __size[36]; + long int __align; +} pthread_attr_t; + + +typedef struct __pthread_internal_slist +{ + struct __pthread_internal_slist *__next; +} __pthread_slist_t; + + + + +typedef union +{ + struct __pthread_mutex_s + { + int __lock; + unsigned int __count; + int __owner; + + + int __kind; + unsigned int __nusers; + __extension__ union + { + int __spins; + __pthread_slist_t __list; + }; + } __data; + char __size[24]; + long int __align; +} pthread_mutex_t; + +typedef union +{ + char __size[4]; + long int __align; +} pthread_mutexattr_t; + + + + +typedef union +{ + struct + { + int __lock; + unsigned int __futex; + __extension__ unsigned long long int __total_seq; + __extension__ unsigned long long int __wakeup_seq; + __extension__ unsigned long long int __woken_seq; + void *__mutex; + unsigned int __nwaiters; + unsigned int __broadcast_seq; + } __data; + char __size[48]; + __extension__ long long int __align; +} pthread_cond_t; + +typedef union +{ + char __size[4]; + long int __align; +} pthread_condattr_t; + + + +typedef unsigned int pthread_key_t; + + + +typedef int pthread_once_t; + + + + + +typedef union +{ + struct + { + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; +# 141 "/usr/include/bits/pthreadtypes.h" 3 4 + unsigned char __flags; + unsigned char __shared; + unsigned char __pad1; + unsigned char __pad2; + + int __writer; + } __data; + char __size[32]; + long int __align; +} pthread_rwlock_t; + +typedef union +{ + char __size[8]; + long int __align; +} pthread_rwlockattr_t; + + + + + +typedef volatile int pthread_spinlock_t; + + + + +typedef union +{ + char __size[20]; + long int __align; +} pthread_barrier_t; + +typedef union +{ + char __size[4]; + int __align; +} pthread_barrierattr_t; +# 272 "/usr/include/sys/types.h" 2 3 4 + + +} +# 321 "/usr/include/stdlib.h" 2 3 4 + + + + + + +extern long int random (void) throw (); + + +extern void srandom (unsigned int __seed) throw (); + + + + + +extern char *initstate (unsigned int __seed, char *__statebuf, + size_t __statelen) throw () __attribute__ ((__nonnull__ (2))); + + + +extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1))); + + + + + + + +struct random_data + { + int32_t *fptr; + int32_t *rptr; + int32_t *state; + int rand_type; + int rand_deg; + int rand_sep; + int32_t *end_ptr; + }; + +extern int random_r (struct random_data *__restrict __buf, + int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); + +extern int srandom_r (unsigned int __seed, struct random_data *__buf) + throw () __attribute__ ((__nonnull__ (2))); + +extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, + size_t __statelen, + struct random_data *__restrict __buf) + throw () __attribute__ ((__nonnull__ (2, 4))); + +extern int setstate_r (char *__restrict __statebuf, + struct random_data *__restrict __buf) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern int rand (void) throw (); + +extern void srand (unsigned int __seed) throw (); + + + + +extern int rand_r (unsigned int *__seed) throw (); + + + + + + + +extern double drand48 (void) throw (); +extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); + + +extern long int lrand48 (void) throw (); +extern long int nrand48 (unsigned short int __xsubi[3]) + throw () __attribute__ ((__nonnull__ (1))); + + +extern long int mrand48 (void) throw (); +extern long int jrand48 (unsigned short int __xsubi[3]) + throw () __attribute__ ((__nonnull__ (1))); + + +extern void srand48 (long int __seedval) throw (); +extern unsigned short int *seed48 (unsigned short int __seed16v[3]) + throw () __attribute__ ((__nonnull__ (1))); +extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1))); + + + + + +struct drand48_data + { + unsigned short int __x[3]; + unsigned short int __old_x[3]; + unsigned short int __c; + unsigned short int __init; + unsigned long long int __a; + }; + + +extern int drand48_r (struct drand48_data *__restrict __buffer, + double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int erand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int lrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int nrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int mrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int jrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int srand48_r (long int __seedval, struct drand48_data *__buffer) + throw () __attribute__ ((__nonnull__ (2))); + +extern int seed48_r (unsigned short int __seed16v[3], + struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); + +extern int lcong48_r (unsigned short int __param[7], + struct drand48_data *__buffer) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + + +#define __malloc_and_calloc_defined + + +extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + +extern void *calloc (size_t __nmemb, size_t __size) + throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + + + + + + + +extern void *realloc (void *__ptr, size_t __size) + throw () __attribute__ ((__warn_unused_result__)); + +extern void free (void *__ptr) throw (); + + + + +extern void cfree (void *__ptr) throw (); + + + +# 1 "/usr/include/alloca.h" 1 3 4 +# 20 "/usr/include/alloca.h" 3 4 +#define _ALLOCA_H 1 + + + +#define __need_size_t +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 26 "/usr/include/alloca.h" 2 3 4 + +extern "C" { + + +#undef alloca + + +extern void *alloca (size_t __size) throw (); + + +#define alloca(size) __builtin_alloca (size) + + +} +# 498 "/usr/include/stdlib.h" 2 3 4 + + + + + +extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + +extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +extern void abort (void) throw () __attribute__ ((__noreturn__)); + + + +extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern "C++" int at_quick_exit (void (*__func) (void)) + throw () __asm ("at_quick_exit") __attribute__ ((__nonnull__ (1))); + + + + + + + + + +extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) + throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern void exit (int __status) throw () __attribute__ ((__noreturn__)); + + + + + + + +extern void quick_exit (int __status) throw () __attribute__ ((__noreturn__)); + + + + + + + +extern void _Exit (int __status) throw () __attribute__ ((__noreturn__)); + + + + + + +extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *__secure_getenv (__const char *__name) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1))); + + + + + +extern int setenv (__const char *__name, __const char *__value, int __replace) + throw () __attribute__ ((__nonnull__ (2))); + + +extern int unsetenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern int clearenv (void) throw (); +# 606 "/usr/include/stdlib.h" 3 4 +extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 620 "/usr/include/stdlib.h" 3 4 +extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 630 "/usr/include/stdlib.h" 3 4 +extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 642 "/usr/include/stdlib.h" 3 4 +extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 652 "/usr/include/stdlib.h" 3 4 +extern int mkstemps64 (char *__template, int __suffixlen) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 663 "/usr/include/stdlib.h" 3 4 +extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 674 "/usr/include/stdlib.h" 3 4 +extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 684 "/usr/include/stdlib.h" 3 4 +extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 694 "/usr/include/stdlib.h" 3 4 +extern int mkostemps (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 706 "/usr/include/stdlib.h" 3 4 +extern int mkostemps64 (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + + + + + +extern int system (__const char *__command) __attribute__ ((__warn_unused_result__)); + + + + + + +extern char *canonicalize_file_name (__const char *__name) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 734 "/usr/include/stdlib.h" 3 4 +extern char *realpath (__const char *__restrict __name, + char *__restrict __resolved) throw () __attribute__ ((__warn_unused_result__)); + + + + + +#define __COMPAR_FN_T +typedef int (*__compar_fn_t) (__const void *, __const void *); + + +typedef __compar_fn_t comparison_fn_t; + + + +typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *); + + + + + +extern void *bsearch (__const void *__key, __const void *__base, + size_t __nmemb, size_t __size, __compar_fn_t __compar) + __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__)); + + + +extern void qsort (void *__base, size_t __nmemb, size_t __size, + __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); + +extern void qsort_r (void *__base, size_t __nmemb, size_t __size, + __compar_d_fn_t __compar, void *__arg) + __attribute__ ((__nonnull__ (1, 4))); + + + + +extern int abs (int __x) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern long int labs (long int __x) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + +__extension__ extern long long int llabs (long long int __x) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern div_t div (int __numer, int __denom) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern ldiv_t ldiv (long int __numer, long int __denom) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + + +__extension__ extern lldiv_t lldiv (long long int __numer, + long long int __denom) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + +# 808 "/usr/include/stdlib.h" 3 4 +extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *gcvt (double __value, int __ndigit, char *__buf) + throw () __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *qecvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qfcvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qgcvt (long double __value, int __ndigit, char *__buf) + throw () __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); + + + + +extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); +extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); + +extern int qecvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (3, 4, 5))); +extern int qfcvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (3, 4, 5))); + + + + + + + +extern int mblen (__const char *__s, size_t __n) throw () __attribute__ ((__warn_unused_result__)); + + +extern int mbtowc (wchar_t *__restrict __pwc, + __const char *__restrict __s, size_t __n) throw () __attribute__ ((__warn_unused_result__)); + + +extern int wctomb (char *__s, wchar_t __wchar) throw () __attribute__ ((__warn_unused_result__)); + + + +extern size_t mbstowcs (wchar_t *__restrict __pwcs, + __const char *__restrict __s, size_t __n) throw (); + +extern size_t wcstombs (char *__restrict __s, + __const wchar_t *__restrict __pwcs, size_t __n) + throw (); + + + + + + + + +extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 896 "/usr/include/stdlib.h" 3 4 +extern int getsubopt (char **__restrict __optionp, + char *__const *__restrict __tokens, + char **__restrict __valuep) + throw () __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__)); + + + + + +extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern int grantpt (int __fd) throw (); + + + +extern int unlockpt (int __fd) throw (); + + + + +extern char *ptsname (int __fd) throw () __attribute__ ((__warn_unused_result__)); + + + + + + +extern int ptsname_r (int __fd, char *__buf, size_t __buflen) + throw () __attribute__ ((__nonnull__ (2))); + + +extern int getpt (void); + + + + + + +extern int getloadavg (double __loadavg[], int __nelem) + throw () __attribute__ ((__nonnull__ (1))); + + + + + +# 1 "/usr/include/bits/stdlib.h" 1 3 4 +# 24 "/usr/include/bits/stdlib.h" 3 4 +extern char *__realpath_chk (__const char *__restrict __name, + char *__restrict __resolved, + size_t __resolvedlen) throw () __attribute__ ((__warn_unused_result__)); +extern char *__realpath_alias (__const char *__restrict __name, char *__restrict __resolved) throw () __asm__ ("" "realpath") + + __attribute__ ((__warn_unused_result__)); +extern char *__realpath_chk_warn (__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) throw () __asm__ ("" "__realpath_chk") + + + __attribute__ ((__warn_unused_result__)) + __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * + realpath (__const char *__restrict __name, char *__restrict __resolved) throw () +{ + if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1) + { + + + + + return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); + } + + return __realpath_alias (__name, __resolved); +} + + +extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, + size_t __nreal) throw () __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) throw () __asm__ ("" "ptsname_r") + + __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__ptsname_r_chk") + + + __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int + ptsname_r (int __fd, char *__buf, size_t __buflen) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __ptsname_r_alias (__fd, __buf, __buflen); +} + + +extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) + throw () __attribute__ ((__warn_unused_result__)); +extern int __wctomb_alias (char *__s, wchar_t __wchar) throw () __asm__ ("" "wctomb") + __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) int + wctomb (char *__s, wchar_t __wchar) throw () +{ + + + +#define __STDLIB_MB_LEN_MAX 16 + + + + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) + return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1)); + return __wctomb_alias (__s, __wchar); +} + + +extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, + __const char *__restrict __src, + size_t __len, size_t __dstlen) throw (); +extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) throw () __asm__ ("" "mbstowcs") + + + ; +extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) throw () __asm__ ("" "__mbstowcs_chk") + + + + __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t + mbstowcs (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) throw () + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __mbstowcs_chk (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + + if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) + return __mbstowcs_chk_warn (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + } + return __mbstowcs_alias (__dst, __src, __len); +} + + +extern size_t __wcstombs_chk (char *__restrict __dst, + __const wchar_t *__restrict __src, + size_t __len, size_t __dstlen) throw (); +extern size_t __wcstombs_alias (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) throw () __asm__ ("" "wcstombs") + + + ; +extern size_t __wcstombs_chk_warn (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) throw () __asm__ ("" "__wcstombs_chk") + + + + __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len"))); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t + wcstombs (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) throw () + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + if (__len > __builtin_object_size (__dst, 2 > 1)) + return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + } + return __wcstombs_alias (__dst, __src, __len); +} +# 956 "/usr/include/stdlib.h" 2 3 4 + + + + + + +#undef __need_malloc_and_calloc + +} +# 18 "./../../dist/include/mozilla/Assertions.h" 2 + +# 1 "/usr/include/signal.h" 1 3 4 +# 26 "/usr/include/signal.h" 3 4 +#define _SIGNAL_H + + + + +extern "C" { + +# 1 "/usr/include/bits/sigset.h" 1 3 4 +# 44 "/usr/include/bits/sigset.h" 3 4 +#define _SIGSET_H_fns 1 + + +#define _EXTERN_INLINE __extern_inline + + + +#define __sigmask(sig) (((unsigned long int) 1) << (((sig) - 1) % (8 * sizeof (unsigned long int)))) + + + +#define __sigword(sig) (((sig) - 1) / (8 * sizeof (unsigned long int))) + + +#define __sigemptyset(set) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__set = (set); while (--__cnt >= 0) __set->__val[__cnt] = 0; 0; })) + + + + +#define __sigfillset(set) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__set = (set); while (--__cnt >= 0) __set->__val[__cnt] = ~0UL; 0; })) +# 73 "/usr/include/bits/sigset.h" 3 4 +#define __sigisemptyset(set) (__extension__ ({ int __cnt = _SIGSET_NWORDS; const sigset_t *__set = (set); int __ret = __set->__val[--__cnt]; while (!__ret && --__cnt >= 0) __ret = __set->__val[__cnt]; __ret == 0; })) + + + + + + +#define __sigandset(dest,left,right) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__dest = (dest); const sigset_t *__left = (left); const sigset_t *__right = (right); while (--__cnt >= 0) __dest->__val[__cnt] = (__left->__val[__cnt] & __right->__val[__cnt]); 0; })) +# 89 "/usr/include/bits/sigset.h" 3 4 +#define __sigorset(dest,left,right) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__dest = (dest); const sigset_t *__left = (left); const sigset_t *__right = (right); while (--__cnt >= 0) __dest->__val[__cnt] = (__left->__val[__cnt] | __right->__val[__cnt]); 0; })) +# 104 "/usr/include/bits/sigset.h" 3 4 +extern int __sigismember (__const __sigset_t *, int); +extern int __sigaddset (__sigset_t *, int); +extern int __sigdelset (__sigset_t *, int); + + +#define __SIGSETFN(NAME,BODY,CONST) _EXTERN_INLINE int NAME (CONST __sigset_t *__set, int __sig) { unsigned long int __mask = __sigmask (__sig); unsigned long int __word = __sigword (__sig); return BODY; } +# 118 "/usr/include/bits/sigset.h" 3 4 +extern __inline __attribute__ ((__gnu_inline__)) int __sigismember (__const __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return (__set->__val[__word] & __mask) ? 1 : 0; } +extern __inline __attribute__ ((__gnu_inline__)) int __sigaddset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] |= __mask), 0); } +extern __inline __attribute__ ((__gnu_inline__)) int __sigdelset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] &= ~__mask), 0); } + +#undef __SIGSETFN +# 34 "/usr/include/signal.h" 2 3 4 + + + + + +#define __sig_atomic_t_defined + +typedef __sig_atomic_t sig_atomic_t; + + +#undef __need_sig_atomic_t + + + + + + + +#undef __need_sigset_t + + + + + +# 1 "/usr/include/bits/signum.h" 1 3 4 +# 23 "/usr/include/bits/signum.h" 3 4 +#define SIG_ERR ((__sighandler_t) -1) +#define SIG_DFL ((__sighandler_t) 0) +#define SIG_IGN ((__sighandler_t) 1) + + +#define SIG_HOLD ((__sighandler_t) 2) + + + + +#define SIGHUP 1 +#define SIGINT 2 +#define SIGQUIT 3 +#define SIGILL 4 +#define SIGTRAP 5 +#define SIGABRT 6 +#define SIGIOT 6 +#define SIGBUS 7 +#define SIGFPE 8 +#define SIGKILL 9 +#define SIGUSR1 10 +#define SIGSEGV 11 +#define SIGUSR2 12 +#define SIGPIPE 13 +#define SIGALRM 14 +#define SIGTERM 15 +#define SIGSTKFLT 16 +#define SIGCLD SIGCHLD +#define SIGCHLD 17 +#define SIGCONT 18 +#define SIGSTOP 19 +#define SIGTSTP 20 +#define SIGTTIN 21 +#define SIGTTOU 22 +#define SIGURG 23 +#define SIGXCPU 24 +#define SIGXFSZ 25 +#define SIGVTALRM 26 +#define SIGPROF 27 +#define SIGWINCH 28 +#define SIGPOLL SIGIO +#define SIGIO 29 +#define SIGPWR 30 +#define SIGSYS 31 +#define SIGUNUSED 31 + +#define _NSIG 65 + + +#define SIGRTMIN (__libc_current_sigrtmin ()) +#define SIGRTMAX (__libc_current_sigrtmax ()) + + + +#define __SIGRTMIN 32 +#define __SIGRTMAX (_NSIG - 1) +# 59 "/usr/include/signal.h" 2 3 4 +# 75 "/usr/include/signal.h" 3 4 +#define __need_timespec +# 1 "/usr/include/time.h" 1 3 4 +# 67 "/usr/include/time.h" 3 4 +#undef __need_clock_t +# 83 "/usr/include/time.h" 3 4 +#undef __need_time_t +# 95 "/usr/include/time.h" 3 4 +#undef __clockid_time_t +# 107 "/usr/include/time.h" 3 4 +#undef __need_timer_t +# 127 "/usr/include/time.h" 3 4 +#undef __need_timespec +# 77 "/usr/include/signal.h" 2 3 4 + + +# 1 "/usr/include/bits/siginfo.h" 1 3 4 +# 25 "/usr/include/bits/siginfo.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 19 "/usr/include/bits/wordsize.h" 3 4 +#define __WORDSIZE 32 +# 26 "/usr/include/bits/siginfo.h" 2 3 4 + + + + +#define __have_sigval_t 1 + + +typedef union sigval + { + int sival_int; + void *sival_ptr; + } sigval_t; + + + + +#define __have_siginfo_t 1 + +#define __SI_MAX_SIZE 128 + + + +#define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) + + +typedef struct siginfo + { + int si_signo; + int si_errno; + + int si_code; + + union + { + int _pad[((128 / sizeof (int)) - 3)]; + + + struct + { + __pid_t si_pid; + __uid_t si_uid; + } _kill; + + + struct + { + int si_tid; + int si_overrun; + sigval_t si_sigval; + } _timer; + + + struct + { + __pid_t si_pid; + __uid_t si_uid; + sigval_t si_sigval; + } _rt; + + + struct + { + __pid_t si_pid; + __uid_t si_uid; + int si_status; + __clock_t si_utime; + __clock_t si_stime; + } _sigchld; + + + struct + { + void *si_addr; + } _sigfault; + + + struct + { + long int si_band; + int si_fd; + } _sigpoll; + } _sifields; + } siginfo_t; + + + +#define si_pid _sifields._kill.si_pid +#define si_uid _sifields._kill.si_uid +#define si_timerid _sifields._timer.si_tid +#define si_overrun _sifields._timer.si_overrun +#define si_status _sifields._sigchld.si_status +#define si_utime _sifields._sigchld.si_utime +#define si_stime _sifields._sigchld.si_stime +#define si_value _sifields._rt.si_sigval +#define si_int _sifields._rt.si_sigval.sival_int +#define si_ptr _sifields._rt.si_sigval.sival_ptr +#define si_addr _sifields._sigfault.si_addr +#define si_band _sifields._sigpoll.si_band +#define si_fd _sifields._sigpoll.si_fd + + + + +enum +{ + SI_ASYNCNL = -60, +#define SI_ASYNCNL SI_ASYNCNL + SI_TKILL = -6, +#define SI_TKILL SI_TKILL + SI_SIGIO, +#define SI_SIGIO SI_SIGIO + SI_ASYNCIO, +#define SI_ASYNCIO SI_ASYNCIO + SI_MESGQ, +#define SI_MESGQ SI_MESGQ + SI_TIMER, +#define SI_TIMER SI_TIMER + SI_QUEUE, +#define SI_QUEUE SI_QUEUE + SI_USER, +#define SI_USER SI_USER + SI_KERNEL = 0x80 +#define SI_KERNEL SI_KERNEL +}; + + + +enum +{ + ILL_ILLOPC = 1, +#define ILL_ILLOPC ILL_ILLOPC + ILL_ILLOPN, +#define ILL_ILLOPN ILL_ILLOPN + ILL_ILLADR, +#define ILL_ILLADR ILL_ILLADR + ILL_ILLTRP, +#define ILL_ILLTRP ILL_ILLTRP + ILL_PRVOPC, +#define ILL_PRVOPC ILL_PRVOPC + ILL_PRVREG, +#define ILL_PRVREG ILL_PRVREG + ILL_COPROC, +#define ILL_COPROC ILL_COPROC + ILL_BADSTK +#define ILL_BADSTK ILL_BADSTK +}; + + +enum +{ + FPE_INTDIV = 1, +#define FPE_INTDIV FPE_INTDIV + FPE_INTOVF, +#define FPE_INTOVF FPE_INTOVF + FPE_FLTDIV, +#define FPE_FLTDIV FPE_FLTDIV + FPE_FLTOVF, +#define FPE_FLTOVF FPE_FLTOVF + FPE_FLTUND, +#define FPE_FLTUND FPE_FLTUND + FPE_FLTRES, +#define FPE_FLTRES FPE_FLTRES + FPE_FLTINV, +#define FPE_FLTINV FPE_FLTINV + FPE_FLTSUB +#define FPE_FLTSUB FPE_FLTSUB +}; + + +enum +{ + SEGV_MAPERR = 1, +#define SEGV_MAPERR SEGV_MAPERR + SEGV_ACCERR +#define SEGV_ACCERR SEGV_ACCERR +}; + + +enum +{ + BUS_ADRALN = 1, +#define BUS_ADRALN BUS_ADRALN + BUS_ADRERR, +#define BUS_ADRERR BUS_ADRERR + BUS_OBJERR +#define BUS_OBJERR BUS_OBJERR +}; + + +enum +{ + TRAP_BRKPT = 1, +#define TRAP_BRKPT TRAP_BRKPT + TRAP_TRACE +#define TRAP_TRACE TRAP_TRACE +}; + + +enum +{ + CLD_EXITED = 1, +#define CLD_EXITED CLD_EXITED + CLD_KILLED, +#define CLD_KILLED CLD_KILLED + CLD_DUMPED, +#define CLD_DUMPED CLD_DUMPED + CLD_TRAPPED, +#define CLD_TRAPPED CLD_TRAPPED + CLD_STOPPED, +#define CLD_STOPPED CLD_STOPPED + CLD_CONTINUED +#define CLD_CONTINUED CLD_CONTINUED +}; + + +enum +{ + POLL_IN = 1, +#define POLL_IN POLL_IN + POLL_OUT, +#define POLL_OUT POLL_OUT + POLL_MSG, +#define POLL_MSG POLL_MSG + POLL_ERR, +#define POLL_ERR POLL_ERR + POLL_PRI, +#define POLL_PRI POLL_PRI + POLL_HUP +#define POLL_HUP POLL_HUP +}; + +#undef __need_siginfo_t + + + + + +#define __have_sigevent_t 1 + + +#define __SIGEV_MAX_SIZE 64 + + + +#define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) + + +typedef struct sigevent + { + sigval_t sigev_value; + int sigev_signo; + int sigev_notify; + + union + { + int _pad[((64 / sizeof (int)) - 3)]; + + + + __pid_t _tid; + + struct + { + void (*_function) (sigval_t); + void *_attribute; + } _sigev_thread; + } _sigev_un; + } sigevent_t; + + +#define sigev_notify_function _sigev_un._sigev_thread._function +#define sigev_notify_attributes _sigev_un._sigev_thread._attribute + + +enum +{ + SIGEV_SIGNAL = 0, +#define SIGEV_SIGNAL SIGEV_SIGNAL + SIGEV_NONE, +#define SIGEV_NONE SIGEV_NONE + SIGEV_THREAD, +#define SIGEV_THREAD SIGEV_THREAD + + SIGEV_THREAD_ID = 4 +#define SIGEV_THREAD_ID SIGEV_THREAD_ID +}; +# 80 "/usr/include/signal.h" 2 3 4 + + + + +typedef void (*__sighandler_t) (int); + + + + +extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) + throw (); + +extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler) + throw (); + + + + + + + +extern __sighandler_t signal (int __sig, __sighandler_t __handler) + throw (); +# 113 "/usr/include/signal.h" 3 4 + + + + + +extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler) + throw (); + + + + + + +extern int kill (__pid_t __pid, int __sig) throw (); + + + + + + +extern int killpg (__pid_t __pgrp, int __sig) throw (); + + + + +extern int raise (int __sig) throw (); + + + + +extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) + throw (); +extern int gsignal (int __sig) throw (); + + + + +extern void psignal (int __sig, __const char *__s); + + + + +extern void psiginfo (__const siginfo_t *__pinfo, __const char *__s); +# 168 "/usr/include/signal.h" 3 4 +extern int __sigpause (int __sig_or_mask, int __is_sig); +# 177 "/usr/include/signal.h" 3 4 +extern int sigpause (int __sig) __asm__ ("__xpg_sigpause"); +# 193 "/usr/include/signal.h" 3 4 +#define sigmask(sig) __sigmask(sig) + + +extern int sigblock (int __mask) throw () __attribute__ ((__deprecated__)); + + +extern int sigsetmask (int __mask) throw () __attribute__ ((__deprecated__)); + + +extern int siggetmask (void) throw () __attribute__ ((__deprecated__)); + + + + +#define NSIG _NSIG + + + +typedef __sighandler_t sighandler_t; + + + + +typedef __sighandler_t sig_t; + + + + + +extern int sigemptyset (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); + + +extern int sigfillset (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); + + +extern int sigaddset (sigset_t *__set, int __signo) throw () __attribute__ ((__nonnull__ (1))); + + +extern int sigdelset (sigset_t *__set, int __signo) throw () __attribute__ ((__nonnull__ (1))); + + +extern int sigismember (__const sigset_t *__set, int __signo) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int sigisemptyset (__const sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); + + +extern int sigandset (sigset_t *__set, __const sigset_t *__left, + __const sigset_t *__right) throw () __attribute__ ((__nonnull__ (1, 2, 3))); + + +extern int sigorset (sigset_t *__set, __const sigset_t *__left, + __const sigset_t *__right) throw () __attribute__ ((__nonnull__ (1, 2, 3))); + + + + +# 1 "/usr/include/bits/sigaction.h" 1 3 4 +# 25 "/usr/include/bits/sigaction.h" 3 4 +struct sigaction + { + + + union + { + + __sighandler_t sa_handler; + + void (*sa_sigaction) (int, siginfo_t *, void *); + } + __sigaction_handler; +#define sa_handler __sigaction_handler.sa_handler +#define sa_sigaction __sigaction_handler.sa_sigaction + + + + + + __sigset_t sa_mask; + + + int sa_flags; + + + void (*sa_restorer) (void); + }; + + +#define SA_NOCLDSTOP 1 +#define SA_NOCLDWAIT 2 +#define SA_SIGINFO 4 + + +#define SA_ONSTACK 0x08000000 + + +#define SA_RESTART 0x10000000 +#define SA_NODEFER 0x40000000 + +#define SA_RESETHAND 0x80000000 + + +#define SA_INTERRUPT 0x20000000 + + +#define SA_NOMASK SA_NODEFER +#define SA_ONESHOT SA_RESETHAND +#define SA_STACK SA_ONSTACK + + + +#define SIG_BLOCK 0 +#define SIG_UNBLOCK 1 +#define SIG_SETMASK 2 +# 253 "/usr/include/signal.h" 2 3 4 + + +extern int sigprocmask (int __how, __const sigset_t *__restrict __set, + sigset_t *__restrict __oset) throw (); + + + + + + +extern int sigsuspend (__const sigset_t *__set) __attribute__ ((__nonnull__ (1))); + + +extern int sigaction (int __sig, __const struct sigaction *__restrict __act, + struct sigaction *__restrict __oact) throw (); + + +extern int sigpending (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig) + __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern int sigwaitinfo (__const sigset_t *__restrict __set, + siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int sigtimedwait (__const sigset_t *__restrict __set, + siginfo_t *__restrict __info, + __const struct timespec *__restrict __timeout) + __attribute__ ((__nonnull__ (1))); + + + +extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val) + throw (); +# 310 "/usr/include/signal.h" 3 4 +extern __const char *__const _sys_siglist[65]; +extern __const char *__const sys_siglist[65]; + + +struct sigvec + { + __sighandler_t sv_handler; + int sv_mask; + + int sv_flags; +#define sv_onstack sv_flags + }; + + +#define SV_ONSTACK (1 << 0) +#define SV_INTERRUPT (1 << 1) +#define SV_RESETHAND (1 << 2) + + + + + + + +extern int sigvec (int __sig, __const struct sigvec *__vec, + struct sigvec *__ovec) throw (); + + + +# 1 "/usr/include/bits/sigcontext.h" 1 3 4 +# 26 "/usr/include/bits/sigcontext.h" 3 4 +#define sigcontext_struct sigcontext + +# 1 "/usr/include/asm/sigcontext.h" 1 3 4 + +#define _ASMARM_SIGCONTEXT_H + + + + + + +struct sigcontext { + unsigned long trap_no; + unsigned long error_code; + unsigned long oldmask; + unsigned long arm_r0; + unsigned long arm_r1; + unsigned long arm_r2; + unsigned long arm_r3; + unsigned long arm_r4; + unsigned long arm_r5; + unsigned long arm_r6; + unsigned long arm_r7; + unsigned long arm_r8; + unsigned long arm_r9; + unsigned long arm_r10; + unsigned long arm_fp; + unsigned long arm_ip; + unsigned long arm_sp; + unsigned long arm_lr; + unsigned long arm_pc; + unsigned long arm_cpsr; + unsigned long fault_address; +}; +# 29 "/usr/include/bits/sigcontext.h" 2 3 4 + + +#define __need_NULL +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 33 "/usr/include/bits/sigcontext.h" 2 3 4 +# 340 "/usr/include/signal.h" 2 3 4 + + +extern int sigreturn (struct sigcontext *__scp) throw (); + + + + + +#define __need_size_t +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 350 "/usr/include/signal.h" 2 3 4 + + + + +extern int siginterrupt (int __sig, int __interrupt) throw (); + +# 1 "/usr/include/bits/sigstack.h" 1 3 4 +# 26 "/usr/include/bits/sigstack.h" 3 4 +struct sigstack + { + void *ss_sp; + int ss_onstack; + }; + + + +enum +{ + SS_ONSTACK = 1, +#define SS_ONSTACK SS_ONSTACK + SS_DISABLE +#define SS_DISABLE SS_DISABLE +}; + + +#define MINSIGSTKSZ 2048 + + +#define SIGSTKSZ 8192 + + + +typedef struct sigaltstack + { + void *ss_sp; + int ss_flags; + size_t ss_size; + } stack_t; +# 357 "/usr/include/signal.h" 2 3 4 + + +# 1 "/usr/include/sys/ucontext.h" 1 3 4 +# 22 "/usr/include/sys/ucontext.h" 3 4 +#define _SYS_UCONTEXT_H 1 + + +# 1 "/usr/include/signal.h" 1 3 4 +# 26 "/usr/include/sys/ucontext.h" 2 3 4 + + + +# 1 "/usr/include/bits/sigcontext.h" 1 3 4 +# 30 "/usr/include/sys/ucontext.h" 2 3 4 + +typedef int greg_t; + + +#define NGREG 18 + + +typedef greg_t gregset_t[18]; + + +enum +{ + REG_R0 = 0, +#define REG_R0 REG_R0 + REG_R1 = 1, +#define REG_R1 REG_R1 + REG_R2 = 2, +#define REG_R2 REG_R2 + REG_R3 = 3, +#define REG_R3 REG_R3 + REG_R4 = 4, +#define REG_R4 REG_R4 + REG_R5 = 5, +#define REG_R5 REG_R5 + REG_R6 = 6, +#define REG_R6 REG_R6 + REG_R7 = 7, +#define REG_R7 REG_R7 + REG_R8 = 8, +#define REG_R8 REG_R8 + REG_R9 = 9, +#define REG_R9 REG_R9 + REG_R10 = 10, +#define REG_R10 REG_R10 + REG_R11 = 11, +#define REG_R11 REG_R11 + REG_R12 = 12, +#define REG_R12 REG_R12 + REG_R13 = 13, +#define REG_R13 REG_R13 + REG_R14 = 14, +#define REG_R14 REG_R14 + REG_R15 = 15 +#define REG_R15 REG_R15 +}; + +struct _libc_fpstate +{ + struct + { + unsigned int sign1:1; + unsigned int unused:15; + unsigned int sign2:1; + unsigned int exponent:14; + unsigned int j:1; + unsigned int mantissa1:31; + unsigned int mantissa0:32; + } fpregs[8]; + unsigned int fpsr:32; + unsigned int fpcr:32; + unsigned char ftype[8]; + unsigned int init_flag; +}; + +typedef struct _libc_fpstate fpregset_t; + + + + + +typedef struct sigcontext mcontext_t; + + +typedef struct ucontext + { + unsigned long uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + __sigset_t uc_sigmask; + unsigned long uc_regspace[128] __attribute__((__aligned__(8))); + } ucontext_t; +# 360 "/usr/include/signal.h" 2 3 4 + + + + + +extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) + throw () __attribute__ ((__deprecated__)); + + + +extern int sigaltstack (__const struct sigaltstack *__restrict __ss, + struct sigaltstack *__restrict __oss) throw (); + + + + + + + +extern int sighold (int __sig) throw (); + + +extern int sigrelse (int __sig) throw (); + + +extern int sigignore (int __sig) throw (); + + +extern __sighandler_t sigset (int __sig, __sighandler_t __disp) throw (); + + + + + + +# 1 "/usr/include/bits/sigthread.h" 1 3 4 +# 21 "/usr/include/bits/sigthread.h" 3 4 +#define _BITS_SIGTHREAD_H 1 +# 31 "/usr/include/bits/sigthread.h" 3 4 +extern int pthread_sigmask (int __how, + __const __sigset_t *__restrict __newmask, + __sigset_t *__restrict __oldmask)throw (); + + +extern int pthread_kill (pthread_t __threadid, int __signo) throw (); + + + +extern int pthread_sigqueue (pthread_t __threadid, int __signo, + const union sigval __value) throw (); +# 396 "/usr/include/signal.h" 2 3 4 + + + + + + +extern int __libc_current_sigrtmin (void) throw (); + +extern int __libc_current_sigrtmax (void) throw (); + + + +} +# 20 "./../../dist/include/mozilla/Assertions.h" 2 +# 65 "./../../dist/include/mozilla/Assertions.h" +#define MOZ_STATIC_ASSERT_GLUE1(x,y) x ##y +#define MOZ_STATIC_ASSERT_GLUE(x,y) MOZ_STATIC_ASSERT_GLUE1(x, y) +# 96 "./../../dist/include/mozilla/Assertions.h" +#define MOZ_STATIC_ASSERT(cond,reason) typedef int MOZ_STATIC_ASSERT_GLUE(moz_static_assert, __COUNTER__)[(cond) ? 1 : -1] + + + + + + + +#define MOZ_STATIC_ASSERT_IF(cond,expr,reason) MOZ_STATIC_ASSERT(!(cond) || (expr), reason) + + +extern "C" { +# 150 "./../../dist/include/mozilla/Assertions.h" +#define MOZ_CRASH() do { raise(SIGABRT); } while (0) + + + + + + +extern __attribute__((weak)) __attribute__((visibility("default"))) void +MOZ_Assert(const char* s, const char* file, int ln); + +static __attribute__((always_inline)) inline void +MOZ_OutputAssertMessage(const char* s, const char *file, int ln) +{ + + + + + fprintf(stderr, "Assertion failure: %s, at %s:%d\n", s, file, ln); + fflush(stderr); + +} + + +} +# 250 "./../../dist/include/mozilla/Assertions.h" +#define MOZ_ASSERT(...) do { } while(0) +# 269 "./../../dist/include/mozilla/Assertions.h" +#define MOZ_ASSERT_IF(cond,expr) do { } while (0) +# 281 "./../../dist/include/mozilla/Assertions.h" +#define MOZ_NOT_REACHED_MARKER() __builtin_unreachable() +# 311 "./../../dist/include/mozilla/Assertions.h" +#define MOZ_NOT_REACHED(reason) MOZ_NOT_REACHED_MARKER() +# 349 "./../../dist/include/mozilla/Assertions.h" +#define MOZ_ALWAYS_TRUE(expr) ((void)(expr)) +#define MOZ_ALWAYS_FALSE(expr) ((void)(expr)) +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" +#define jsscope_h___ + + + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/new" 1 3 +# 37 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/new" 3 +#define _NEW + + +# 40 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/new" 3 + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/cstddef" 3 + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 1 3 +# 32 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_CXX_CONFIG_H 1 + + +#define __GLIBCXX__ 20120702 + + + + +#define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY 1 + + +#define _GLIBCXX_VISIBILITY_ATTR(V) __attribute__ ((__visibility__ (#V))) +# 54 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_DEPRECATED 1 + + + + + +#define _GLIBCXX_DEPRECATED_ATTR +# 95 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION 0 +# 117 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_STD_D _GLIBCXX_STD +#define _GLIBCXX_STD_P _GLIBCXX_STD +#define _GLIBCXX_STD_PR _GLIBCXX_STD +#define _GLIBCXX_STD std +#define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X,Y) _GLIBCXX_BEGIN_NAMESPACE(X) +#define _GLIBCXX_END_NESTED_NAMESPACE _GLIBCXX_END_NAMESPACE +#define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { +#define _GLIBCXX_END_NAMESPACE } +# 240 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#undef _GLIBCXX_LONG_DOUBLE_COMPAT +# 252 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_LDBL_NAMESPACE +#define _GLIBCXX_BEGIN_LDBL_NAMESPACE +#define _GLIBCXX_END_LDBL_NAMESPACE + + + + + +#define _GLIBCXX_BEGIN_EXTERN_C extern "C" { +#define _GLIBCXX_END_EXTERN_C } +# 275 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/os_defines.h" 1 3 +# 31 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/os_defines.h" 3 +#define _GLIBCXX_OS_DEFINES 1 + + + + + +#define __NO_CTYPE 1 +# 276 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 2 3 + + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/cpu_defines.h" 1 3 +# 31 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/cpu_defines.h" 3 +#define _GLIBCXX_CPU_DEFINES 1 +# 279 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 2 3 + + + + +#define _GLIBCXX_PSEUDO_VISIBILITY(V) +# 301 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_EXTERN_TEMPLATE 1 + + + + + + +#define _GLIBCXX_WEAK_DEFINITION + + + + + + +#define __glibcxx_assert(_Condition) +# 346 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_FAST_MATH 0 + + + + + + +#define __N(msgid) (msgid) + + +#undef min +#undef max + + +#define _GLIBCXX_PURE __attribute__ ((__pure__)) + + + +#define _GLIBCXX_CONST __attribute__ ((__const__)) + + + +#define _GLIBCXX_NORETURN __attribute__ ((__noreturn__)) + + + + +#define _GLIBCXX_NOTHROW throw() +# 384 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_HAVE_ACOSF 1 + + +#define _GLIBCXX_HAVE_ACOSL 1 + + +#define _GLIBCXX_HAVE_ASINF 1 + + +#define _GLIBCXX_HAVE_ASINL 1 + + +#define _GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE 1 + + +#define _GLIBCXX_HAVE_ATAN2F 1 + + +#define _GLIBCXX_HAVE_ATAN2L 1 + + +#define _GLIBCXX_HAVE_ATANF 1 + + +#define _GLIBCXX_HAVE_ATANL 1 + + + + + +#define _GLIBCXX_HAVE_CEILF 1 + + +#define _GLIBCXX_HAVE_CEILL 1 + + +#define _GLIBCXX_HAVE_COMPLEX_H 1 + + +#define _GLIBCXX_HAVE_COSF 1 + + +#define _GLIBCXX_HAVE_COSHF 1 + + +#define _GLIBCXX_HAVE_COSHL 1 + + +#define _GLIBCXX_HAVE_COSL 1 + + +#define _GLIBCXX_HAVE_DLFCN_H 1 + + +#define _GLIBCXX_HAVE_EBADMSG 1 + + +#define _GLIBCXX_HAVE_ECANCELED 1 + + +#define _GLIBCXX_HAVE_EIDRM 1 + + +#define _GLIBCXX_HAVE_ENDIAN_H 1 + + +#define _GLIBCXX_HAVE_ENODATA 1 + + +#define _GLIBCXX_HAVE_ENOLINK 1 + + +#define _GLIBCXX_HAVE_ENOSR 1 + + +#define _GLIBCXX_HAVE_ENOSTR 1 + + +#define _GLIBCXX_HAVE_ENOTRECOVERABLE 1 + + +#define _GLIBCXX_HAVE_ENOTSUP 1 + + +#define _GLIBCXX_HAVE_EOVERFLOW 1 + + +#define _GLIBCXX_HAVE_EOWNERDEAD 1 + + +#define _GLIBCXX_HAVE_EPROTO 1 + + +#define _GLIBCXX_HAVE_ETIME 1 + + +#define _GLIBCXX_HAVE_ETXTBSY 1 + + +#define _GLIBCXX_HAVE_EXECINFO_H 1 + + +#define _GLIBCXX_HAVE_EXPF 1 + + +#define _GLIBCXX_HAVE_EXPL 1 + + +#define _GLIBCXX_HAVE_FABSF 1 + + +#define _GLIBCXX_HAVE_FABSL 1 + + +#define _GLIBCXX_HAVE_FENV_H 1 + + +#define _GLIBCXX_HAVE_FINITE 1 + + +#define _GLIBCXX_HAVE_FINITEF 1 + + +#define _GLIBCXX_HAVE_FINITEL 1 + + +#define _GLIBCXX_HAVE_FLOAT_H 1 + + +#define _GLIBCXX_HAVE_FLOORF 1 + + +#define _GLIBCXX_HAVE_FLOORL 1 + + +#define _GLIBCXX_HAVE_FMODF 1 + + +#define _GLIBCXX_HAVE_FMODL 1 +# 531 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_HAVE_FREXPF 1 + + +#define _GLIBCXX_HAVE_FREXPL 1 + + +#define _GLIBCXX_HAVE_GETIPINFO 1 + + + +#define _GLIBCXX_HAVE_GTHR_DEFAULT 1 + + +#define _GLIBCXX_HAVE_HYPOT 1 + + +#define _GLIBCXX_HAVE_HYPOTF 1 + + +#define _GLIBCXX_HAVE_HYPOTL 1 + + +#define _GLIBCXX_HAVE_ICONV 1 + + + + + +#define _GLIBCXX_HAVE_INT64_T 1 + + + + + +#define _GLIBCXX_HAVE_INT64_T_LONG_LONG 1 + + +#define _GLIBCXX_HAVE_INTTYPES_H 1 + + +#define _GLIBCXX_HAVE_ISINF 1 + + +#define _GLIBCXX_HAVE_ISINFF 1 + + +#define _GLIBCXX_HAVE_ISINFL 1 + + +#define _GLIBCXX_HAVE_ISNAN 1 + + +#define _GLIBCXX_HAVE_ISNANF 1 + + +#define _GLIBCXX_HAVE_ISNANL 1 + + +#define _GLIBCXX_HAVE_ISWBLANK 1 + + +#define _GLIBCXX_HAVE_LC_MESSAGES 1 + + +#define _GLIBCXX_HAVE_LDEXPF 1 + + +#define _GLIBCXX_HAVE_LDEXPL 1 + + +#define _GLIBCXX_HAVE_LIBINTL_H 1 + + +#define _GLIBCXX_HAVE_LIMIT_AS 1 + + +#define _GLIBCXX_HAVE_LIMIT_DATA 1 + + +#define _GLIBCXX_HAVE_LIMIT_FSIZE 1 + + +#define _GLIBCXX_HAVE_LIMIT_RSS 1 + + +#define _GLIBCXX_HAVE_LIMIT_VMEM 0 + + +#define _GLIBCXX_HAVE_LINUX_FUTEX 1 + + +#define _GLIBCXX_HAVE_LOCALE_H 1 + + +#define _GLIBCXX_HAVE_LOG10F 1 + + +#define _GLIBCXX_HAVE_LOG10L 1 + + +#define _GLIBCXX_HAVE_LOGF 1 + + +#define _GLIBCXX_HAVE_LOGL 1 +# 643 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_HAVE_MBSTATE_T 1 + + +#define _GLIBCXX_HAVE_MEMORY_H 1 + + +#define _GLIBCXX_HAVE_MODF 1 + + +#define _GLIBCXX_HAVE_MODFF 1 + + +#define _GLIBCXX_HAVE_MODFL 1 + + + + + +#define _GLIBCXX_HAVE_POLL 1 + + +#define _GLIBCXX_HAVE_POWF 1 + + +#define _GLIBCXX_HAVE_POWL 1 + + + + + +#define _GLIBCXX_HAVE_SETENV 1 + + +#define _GLIBCXX_HAVE_SINCOS 1 + + +#define _GLIBCXX_HAVE_SINCOSF 1 + + +#define _GLIBCXX_HAVE_SINCOSL 1 + + +#define _GLIBCXX_HAVE_SINF 1 + + +#define _GLIBCXX_HAVE_SINHF 1 + + +#define _GLIBCXX_HAVE_SINHL 1 + + +#define _GLIBCXX_HAVE_SINL 1 + + +#define _GLIBCXX_HAVE_SQRTF 1 + + +#define _GLIBCXX_HAVE_SQRTL 1 + + +#define _GLIBCXX_HAVE_STDBOOL_H 1 + + +#define _GLIBCXX_HAVE_STDINT_H 1 + + +#define _GLIBCXX_HAVE_STDLIB_H 1 + + +#define _GLIBCXX_HAVE_STRERROR_L 1 + + +#define _GLIBCXX_HAVE_STRERROR_R 1 + + +#define _GLIBCXX_HAVE_STRINGS_H 1 + + +#define _GLIBCXX_HAVE_STRING_H 1 + + +#define _GLIBCXX_HAVE_STRTOF 1 + + +#define _GLIBCXX_HAVE_STRTOLD 1 + + +#define _GLIBCXX_HAVE_STRXFRM_L 1 + + + + + +#define _GLIBCXX_HAVE_SYS_IOCTL_H 1 + + +#define _GLIBCXX_HAVE_SYS_IPC_H 1 +# 748 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_HAVE_SYS_PARAM_H 1 + + +#define _GLIBCXX_HAVE_SYS_RESOURCE_H 1 + + +#define _GLIBCXX_HAVE_SYS_SEM_H 1 + + +#define _GLIBCXX_HAVE_SYS_STAT_H 1 + + +#define _GLIBCXX_HAVE_SYS_TIME_H 1 + + +#define _GLIBCXX_HAVE_SYS_TYPES_H 1 + + +#define _GLIBCXX_HAVE_SYS_UIO_H 1 + + + + + +#define _GLIBCXX_HAVE_S_ISREG 1 + + +#define _GLIBCXX_HAVE_TANF 1 + + +#define _GLIBCXX_HAVE_TANHF 1 + + +#define _GLIBCXX_HAVE_TANHL 1 + + +#define _GLIBCXX_HAVE_TANL 1 + + +#define _GLIBCXX_HAVE_TGMATH_H 1 + + +#define _GLIBCXX_HAVE_TLS 1 + + +#define _GLIBCXX_HAVE_UNISTD_H 1 + + +#define _GLIBCXX_HAVE_VFWSCANF 1 + + +#define _GLIBCXX_HAVE_VSWSCANF 1 + + +#define _GLIBCXX_HAVE_VWSCANF 1 + + +#define _GLIBCXX_HAVE_WCHAR_H 1 + + +#define _GLIBCXX_HAVE_WCSTOF 1 + + +#define _GLIBCXX_HAVE_WCTYPE_H 1 + + +#define _GLIBCXX_HAVE_WRITEV 1 +# 1003 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_ICONV_CONST + + + +#define LT_OBJDIR ".libs/" + + + + + +#define _GLIBCXX_PACKAGE_BUGREPORT "" + + +#define _GLIBCXX_PACKAGE_NAME "package-unused" + + +#define _GLIBCXX_PACKAGE_STRING "package-unused version-unused" + + +#define _GLIBCXX_PACKAGE_TARNAME "libstdc++" + + +#define _GLIBCXX_PACKAGE_URL "" + + +#define _GLIBCXX_PACKAGE__GLIBCXX_VERSION "version-unused" +# 1046 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define STDC_HEADERS 1 + + + + + +#define _GLIBCXX_ATOMIC_BUILTINS_1 1 + + + +#define _GLIBCXX_ATOMIC_BUILTINS_2 1 + + +#define _GLIBCXX_ATOMIC_BUILTINS_4 1 +# 1072 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_HAS_GTHREADS 1 + + +#define _GLIBCXX_HOSTED 1 + + + + +#define _GLIBCXX_PTRDIFF_T_IS_INT 1 + + +#define _GLIBCXX_RES_LIMITS 1 + + +#define _GLIBCXX_SIZE_T_IS_UINT 1 + + + + + +#define _GLIBCXX_STDIO_MACROS 1 + + +#define _GLIBCXX_SYMVER 1 + + + + + +#define _GLIBCXX_SYMVER_GNU 1 + + + + + + +#define _GLIBCXX_USE_C99 1 + + + + +#define _GLIBCXX_USE_C99_COMPLEX 1 + + + + +#define _GLIBCXX_USE_C99_COMPLEX_TR1 1 + + + +#define _GLIBCXX_USE_C99_CTYPE_TR1 1 + + + +#define _GLIBCXX_USE_C99_FENV_TR1 1 + + + +#define _GLIBCXX_USE_C99_INTTYPES_TR1 1 + + + +#define _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 1 + + + +#define _GLIBCXX_USE_C99_MATH 1 + + + +#define _GLIBCXX_USE_C99_MATH_TR1 1 + + + +#define _GLIBCXX_USE_C99_STDINT_TR1 1 +# 1159 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_USE_GETTIMEOFDAY 1 + + +#define _GLIBCXX_USE_LFS 1 + + +#define _GLIBCXX_USE_LONG_LONG 1 + + + + + +#define _GLIBCXX_USE_NLS 1 + + + +#define _GLIBCXX_USE_RANDOM_TR1 1 + + + + + +#define _GLIBCXX_USE_WCHAR_T 1 +# 44 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/cstddef" 2 3 +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/cstddef" 2 3 + + +#define _GLIBCXX_CSTDDEF 1 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + using ::ptrdiff_t; + using ::size_t; + +} +# 42 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/new" 2 3 +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/exception" 1 3 +# 33 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/exception" 3 +#define __EXCEPTION__ + + +# 36 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/exception" 3 + +#pragma GCC visibility push(default) + + + +extern "C++" { + +namespace std +{ +# 61 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/exception" 3 + class exception + { + public: + exception() throw() { } + virtual ~exception() throw(); + + + + virtual const char* what() const throw(); + }; + + + + class bad_exception : public exception + { + public: + bad_exception() throw() { } + + + + virtual ~bad_exception() throw(); + + + virtual const char* what() const throw(); + }; + + + typedef void (*terminate_handler) (); + + + typedef void (*unexpected_handler) (); + + + terminate_handler set_terminate(terminate_handler) throw(); + + + + void terminate() throw() __attribute__ ((__noreturn__)); + + + unexpected_handler set_unexpected(unexpected_handler) throw(); + + + + void unexpected() __attribute__ ((__noreturn__)); +# 118 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/exception" 3 + bool uncaught_exception() throw() __attribute__ ((__pure__)); + + +} + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { +# 141 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/exception" 3 + void __verbose_terminate_handler(); + +} + +} + +#pragma GCC visibility pop +# 43 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/new" 2 3 + +#pragma GCC visibility push(default) + +extern "C++" { + +namespace std +{ + + + + + + + class bad_alloc : public exception + { + public: + bad_alloc() throw() { } + + + + virtual ~bad_alloc() throw(); + + + virtual const char* what() const throw(); + }; + + struct nothrow_t { }; + + extern const nothrow_t nothrow; + + + + typedef void (*new_handler)(); + + + + new_handler set_new_handler(new_handler) throw(); +} +# 93 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/new" 3 +void* operator new(std::size_t) throw (std::bad_alloc); +void* operator new[](std::size_t) throw (std::bad_alloc); +void operator delete(void*) throw(); +void operator delete[](void*) throw(); +void* operator new(std::size_t, const std::nothrow_t&) throw(); +void* operator new[](std::size_t, const std::nothrow_t&) throw(); +void operator delete(void*, const std::nothrow_t&) throw(); +void operator delete[](void*, const std::nothrow_t&) throw(); + + +inline void* operator new(std::size_t, void* __p) throw() { return __p; } +inline void* operator new[](std::size_t, void* __p) throw() { return __p; } + + +inline void operator delete (void*, void*) throw() { } +inline void operator delete[](void*, void*) throw() { } + +} + +#pragma GCC visibility pop +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" 2 + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" +#define jsobj_h___ +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define jsapi_h___ + + + + + +# 1 "./../../dist/include/mozilla/FloatingPoint.h" 1 +# 9 "./../../dist/include/mozilla/FloatingPoint.h" +#define mozilla_FloatingPoint_h_ +# 40 "./../../dist/include/mozilla/FloatingPoint.h" +typedef int moz_static_assert0[(sizeof(double) == sizeof(uint64_t)) ? 1 : -1]; + + + + + +#define MOZ_DOUBLE_SIGN_BIT 0x8000000000000000ULL +#define MOZ_DOUBLE_EXPONENT_BITS 0x7ff0000000000000ULL +#define MOZ_DOUBLE_SIGNIFICAND_BITS 0x000fffffffffffffULL + +#define MOZ_DOUBLE_EXPONENT_BIAS 1023 +#define MOZ_DOUBLE_EXPONENT_SHIFT 52 + +typedef int + moz_static_assert1 +# 53 "./../../dist/include/mozilla/FloatingPoint.h" + [((0x8000000000000000ULL & 0x7ff0000000000000ULL) == 0) ? 1 : -1] + ; +typedef int + moz_static_assert2 +# 55 "./../../dist/include/mozilla/FloatingPoint.h" + [((0x8000000000000000ULL & 0x000fffffffffffffULL) == 0) ? 1 : -1] + ; +typedef int + moz_static_assert3 +# 57 "./../../dist/include/mozilla/FloatingPoint.h" + [((0x7ff0000000000000ULL & 0x000fffffffffffffULL) == 0) ? 1 : -1] + ; + +typedef int + + moz_static_assert4 +# 60 "./../../dist/include/mozilla/FloatingPoint.h" + [((0x8000000000000000ULL | 0x7ff0000000000000ULL | 0x000fffffffffffffULL) == ~(uint64_t)0) ? 1 : -1] + + ; + + +extern "C" { + + + + + + +union MozDoublePun { + + + + + + + uint64_t u; + double d; +}; + + +static __attribute__((always_inline)) inline int +MOZ_DOUBLE_IS_NaN(double d) +{ + union MozDoublePun pun; + pun.d = d; + + + + + + return (pun.u & 0x7ff0000000000000ULL) == 0x7ff0000000000000ULL && + (pun.u & 0x000fffffffffffffULL) != 0; +} + + +static __attribute__((always_inline)) inline int +MOZ_DOUBLE_IS_INFINITE(double d) +{ + union MozDoublePun pun; + pun.d = d; + + + return (pun.u & ~0x8000000000000000ULL) == 0x7ff0000000000000ULL; +} + + +static __attribute__((always_inline)) inline int +MOZ_DOUBLE_IS_FINITE(double d) +{ + union MozDoublePun pun; + pun.d = d; + + + + + + return (pun.u & 0x7ff0000000000000ULL) != 0x7ff0000000000000ULL; +} + + + + + +static __attribute__((always_inline)) inline int +MOZ_DOUBLE_IS_NEGATIVE(double d) +{ + union MozDoublePun pun; + pun.d = d; + + do { } while(0); + + + return (pun.u & 0x8000000000000000ULL) != 0; +} + + +static __attribute__((always_inline)) inline int +MOZ_DOUBLE_IS_NEGATIVE_ZERO(double d) +{ + union MozDoublePun pun; + pun.d = d; + + + return pun.u == 0x8000000000000000ULL; +} + + +static __attribute__((always_inline)) inline int_fast16_t +MOZ_DOUBLE_EXPONENT(double d) +{ + union MozDoublePun pun; + pun.d = d; + + + + + + return (int_fast16_t)((pun.u & 0x7ff0000000000000ULL) >> 52) - + 1023; +} + + +static __attribute__((always_inline)) inline double +MOZ_DOUBLE_POSITIVE_INFINITY() +{ + union MozDoublePun pun; + + + + + + pun.u = 0x7ff0000000000000ULL; + return pun.d; +} + + +static __attribute__((always_inline)) inline double +MOZ_DOUBLE_NEGATIVE_INFINITY() +{ + union MozDoublePun pun; + + + + + + pun.u = 0x8000000000000000ULL | 0x7ff0000000000000ULL; + return pun.d; +} + + +static __attribute__((always_inline)) inline double +MOZ_DOUBLE_SPECIFIC_NaN(int signbit, uint64_t significand) +{ + union MozDoublePun pun; + + do { } while(0); + do { } while(0); + do { } while(0); + + pun.u = (signbit ? 0x8000000000000000ULL : 0) | + 0x7ff0000000000000ULL | + significand; + do { } while(0); + return pun.d; +} + + + + + +static __attribute__((always_inline)) inline double +MOZ_DOUBLE_NaN() +{ + return MOZ_DOUBLE_SPECIFIC_NaN(0, 0xfffffffffffffULL); +} + + +static __attribute__((always_inline)) inline double +MOZ_DOUBLE_MIN_VALUE() +{ + union MozDoublePun pun; + pun.u = 1; + return pun.d; +} + + +static __attribute__((always_inline)) inline uint32_t +MOZ_HASH_DOUBLE(double d) +{ + union MozDoublePun pun; + pun.d = d; + + return ((uint32_t)(pun.u >> 32)) ^ ((uint32_t)(pun.u)); +} + +static __attribute__((always_inline)) inline int +MOZ_DOUBLE_IS_INT32(double d, int32_t* i) +{ + + + + + + return !MOZ_DOUBLE_IS_NEGATIVE_ZERO(d) && d == (*i = (int32_t)d); +} + + +} +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 + + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 + +# 1 "./js-config.h" 1 +# 10 "./js-config.h" +#define js_config_h___ + + + + + + +#define JS_THREADSAFE 1 + + +#define JS_HAS_CTYPES 1 + + + + + + + +#define JS_HAVE_ENDIAN_H 1 +# 60 "./js-config.h" +#define JS_BYTES_PER_WORD 4 + + + +#define JS_METHODJIT 1 + + +#define JS_HAS_XML_SUPPORT 1 +# 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspubtd.h" 1 + + + + + + + +#define jspubtd_h___ + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" 1 +# 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" +#define jstypes_h___ + + +# 1 "./../../dist/include/mozilla/Util.h" 1 +# 14 "./../../dist/include/mozilla/Util.h" +#define mozilla_Util_h_ + + + + + + + +namespace mozilla { +# 41 "./../../dist/include/mozilla/Util.h" +template +struct DebugOnly +{ +# 69 "./../../dist/include/mozilla/Util.h" + DebugOnly() {} + DebugOnly(const T&) {} + DebugOnly(const DebugOnly&) {} + DebugOnly& operator=(const T&) { return *this; } + void operator++(int) {} + void operator--(int) {} + + + + + + + + ~DebugOnly() {} +}; + + + + + +template +struct AlignmentFinder +{ +private: + struct Aligner + { + char c; + T t; + }; + +public: + static const int alignment = sizeof(Aligner) - sizeof(T); +}; + +#define MOZ_ALIGNOF(T) mozilla::AlignmentFinder::alignment +# 116 "./../../dist/include/mozilla/Util.h" +#define MOZ_ALIGNED_DECL(_type,_align) _type __attribute__((aligned(_align))) +# 131 "./../../dist/include/mozilla/Util.h" +template +struct AlignedElem; + + + + + + +template<> +struct AlignedElem<1> +{ + uint8_t elem __attribute__((aligned(1))); +}; + +template<> +struct AlignedElem<2> +{ + uint8_t elem __attribute__((aligned(2))); +}; + +template<> +struct AlignedElem<4> +{ + uint8_t elem __attribute__((aligned(4))); +}; + +template<> +struct AlignedElem<8> +{ + uint8_t elem __attribute__((aligned(8))); +}; + +template<> +struct AlignedElem<16> +{ + uint8_t elem __attribute__((aligned(16))); +}; +# 179 "./../../dist/include/mozilla/Util.h" +template +struct AlignedStorage +{ + union U { + char bytes[nbytes]; + uint64_t _; + } u; + + const void *addr() const { return u.bytes; } + void *addr() { return u.bytes; } +}; + +template +struct AlignedStorage2 +{ + union U { + char bytes[sizeof(T)]; + uint64_t _; + } u; + + const T *addr() const { return (const T *)u.bytes; } + T *addr() { return (T *)(void *)u.bytes; } +}; +# 214 "./../../dist/include/mozilla/Util.h" +template +class Maybe +{ + AlignedStorage2 storage; + bool constructed; + + T &asT() { return *storage.addr(); } + + explicit Maybe(const Maybe &other); + const Maybe &operator=(const Maybe &other); + + public: + Maybe() { constructed = false; } + ~Maybe() { if (constructed) asT().~T(); } + + bool empty() const { return !constructed; } + + void construct() { + do { } while(0); + new(storage.addr()) T(); + constructed = true; + } + + template + void construct(const T1 &t1) { + do { } while(0); + new(storage.addr()) T(t1); + constructed = true; + } + + template + void construct(const T1 &t1, const T2 &t2) { + do { } while(0); + new(storage.addr()) T(t1, t2); + constructed = true; + } + + template + void construct(const T1 &t1, const T2 &t2, const T3 &t3) { + do { } while(0); + new(storage.addr()) T(t1, t2, t3); + constructed = true; + } + + template + void construct(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4) { + do { } while(0); + new(storage.addr()) T(t1, t2, t3, t4); + constructed = true; + } + + T *addr() { + do { } while(0); + return &asT(); + } + + T &ref() { + do { } while(0); + return asT(); + } + + const T &ref() const { + do { } while(0); + return const_cast(this)->asT(); + } + + void destroy() { + ref().~T(); + constructed = false; + } + + void destroyIfConstructed() { + if (!empty()) + destroy(); + } +}; + + + + + + + +template +__attribute__((always_inline)) inline size_t +PointerRangeSize(T* begin, T* end) +{ + do { } while(0); + return (size_t(end) - size_t(begin)) / sizeof(T); +} + + + + + + + +template +size_t +ArrayLength(T (&arr)[N]) +{ + return N; +} + + + + + + +template +T* +ArrayEnd(T (&arr)[N]) +{ + return arr + ArrayLength(arr); +} + +} +# 25 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" 2 +# 49 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" +#define JS_EXTERN_API(type) extern MOZ_EXPORT_API(type) +#define JS_EXPORT_API(type) MOZ_EXPORT_API(type) +#define JS_EXPORT_DATA(type) MOZ_EXPORT_DATA(type) +#define JS_IMPORT_API(type) MOZ_IMPORT_API(type) +#define JS_IMPORT_DATA(type) MOZ_IMPORT_DATA(type) +# 65 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" +#define JS_PUBLIC_API(t) MOZ_EXPORT_API(t) +#define JS_PUBLIC_DATA(t) MOZ_EXPORT_DATA(t) + + + + + +#define JS_FRIEND_API(t) JS_PUBLIC_API(t) +#define JS_FRIEND_DATA(t) JS_PUBLIC_DATA(t) + + + + + + + +#define JS_FASTCALL +#define JS_NO_FASTCALL + + + +#define JS_INLINE MOZ_INLINE + + + +#define JS_ALWAYS_INLINE MOZ_ALWAYS_INLINE + + + +#define JS_NEVER_INLINE MOZ_NEVER_INLINE + + + + +#define JS_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +# 112 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" +#define JS_BEGIN_MACRO do { + + + + + + +#define JS_END_MACRO } while (0) +# 128 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" +#define JS_BEGIN_EXTERN_C MOZ_BEGIN_EXTERN_C +#define JS_END_EXTERN_C MOZ_END_EXTERN_C + + + + + + + +#define JS_BIT(n) ((uint32_t)1 << (n)) +#define JS_BITMASK(n) (JS_BIT(n) - 1) +# 148 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" +#define JS_HOWMANY(x,y) (((x)+(y)-1)/(y)) +#define JS_ROUNDUP(x,y) (JS_HOWMANY(x,y)*(y)) +#define JS_MIN(x,y) ((x)<(y)?(x):(y)) +#define JS_MAX(x,y) ((x)>(y)?(x):(y)) + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscpucfg.h" 1 + + + + + + + +#define js_cpucfg___ + +#define JS_HAVE_LONG_LONG +# 65 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscpucfg.h" +#define IS_LITTLE_ENDIAN 1 +#undef IS_BIG_ENDIAN +# 130 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscpucfg.h" +#define JS_STACK_GROWTH_DIRECTION (-1) +# 154 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" 2 +# 186 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" +extern "C" { +# 196 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" +typedef int JSBool; +#define JS_TRUE (int)1 +#define JS_FALSE (int)0 +# 218 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" +#define JS_LIKELY(x) (__builtin_expect((x), 1)) +#define JS_UNLIKELY(x) (__builtin_expect((x), 0)) +# 245 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" +#define JS_ARRAY_LENGTH(array) (sizeof (array) / sizeof (array)[0]) +#define JS_ARRAY_END(array) ((array) + JS_ARRAY_LENGTH(array)) + +#define JS_BITS_PER_BYTE 8 +#define JS_BITS_PER_BYTE_LOG2 3 + +#define JS_BITS_PER_WORD (JS_BITS_PER_BYTE * JS_BYTES_PER_WORD) +#define JS_BITS_PER_DOUBLE (JS_BITS_PER_BYTE * JS_BYTES_PER_DOUBLE) +# 271 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" +#define JS_FUNC_TO_DATA_PTR(type,fun) (__extension__ (type) (size_t) (fun)) +#define JS_DATA_TO_FUNC_PTR(type,ptr) (__extension__ (type) (size_t) (ptr)) + + + + + + + +#define JS_EXTENSION __extension__ +#define JS_EXTENSION_(s) __extension__ ({ s; }) + + + + + +} +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspubtd.h" 2 + + + + + + +namespace JS { class Value; } +# 53 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspubtd.h" +typedef ptrdiff_t jsid; +#define JSID_BITS(id) (id) + + + + + + +extern "C" { + + + + +typedef uint16_t jschar; + + + + + + + +typedef enum JSVersion { + JSVERSION_1_0 = 100, + JSVERSION_1_1 = 110, + JSVERSION_1_2 = 120, + JSVERSION_1_3 = 130, + JSVERSION_1_4 = 140, + JSVERSION_ECMA_3 = 148, + JSVERSION_1_5 = 150, + JSVERSION_1_6 = 160, + JSVERSION_1_7 = 170, + JSVERSION_1_8 = 180, + JSVERSION_ECMA_5 = 185, + JSVERSION_DEFAULT = 0, + JSVERSION_UNKNOWN = -1, + JSVERSION_LATEST = JSVERSION_ECMA_5 +} JSVersion; + +#define JSVERSION_IS_ECMA(version) ((version) == JSVERSION_DEFAULT || (version) >= JSVERSION_1_3) + + + +typedef enum JSType { + JSTYPE_VOID, + JSTYPE_OBJECT, + JSTYPE_FUNCTION, + JSTYPE_STRING, + JSTYPE_NUMBER, + JSTYPE_BOOLEAN, + JSTYPE_NULL, + JSTYPE_XML, + JSTYPE_LIMIT +} JSType; + + +typedef enum JSProtoKey { +#define JS_PROTO(name,code,init) JSProto_ ##name = code, +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsproto.tbl" 1 + + + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" 1 +# 11 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_VERSION 185 +# 42 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_VERSION_ECMA_3 148 +#define JS_VERSION_ECMA_3_TEST 149 +# 124 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_HAS_STR_HTML_HELPERS 1 +#define JS_HAS_OBJ_PROTO_PROP 1 +#define JS_HAS_OBJ_WATCHPOINT 1 +#define JS_HAS_TOSOURCE 1 +#define JS_HAS_CATCH_GUARD 1 +#define JS_HAS_UNEVAL 1 +#define JS_HAS_CONST 1 +#define JS_HAS_FUN_EXPR_STMT 1 +#define JS_HAS_NO_SUCH_METHOD 1 +#define JS_HAS_GENERATORS 1 +#define JS_HAS_BLOCK_SCOPE 1 +#define JS_HAS_DESTRUCTURING 2 +#define JS_HAS_GENERATOR_EXPRS 1 +#define JS_HAS_EXPR_CLOSURES 1 +# 146 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_HAS_NEW_GLOBAL_OBJECT 1 + + +#define JS_HAS_MAKE_SYSTEM_OBJECT 1 + + +#define JS_HAS_DESTRUCTURING_SHORTHAND (JS_HAS_DESTRUCTURING == 2) + + + + + +#define OLD_GETTER_SETTER_METHODS 1 + + +#define USE_NEW_OBJECT_REPRESENTATION 0 + + + + +#define NEW_OBJECT_REPRESENTATION_ONLY() MOZ_NOT_REACHED("don't call this! to be used in the new object representation") +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsproto.tbl" 2 + + +#define XML_INIT js_InitXMLClass +#define NAMESPACE_INIT js_InitNamespaceClass +#define QNAME_INIT js_InitQNameClass +#define XMLFILTER_INIT js_InitXMLFilterClass +# 27 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsproto.tbl" +JSProto_Null = 0, +JSProto_Object = 1, +JSProto_Function = 2, +JSProto_Array = 3, +JSProto_Boolean = 4, +JSProto_JSON = 5, +JSProto_Date = 6, +JSProto_Math = 7, +JSProto_Number = 8, +JSProto_String = 9, +JSProto_RegExp = 10, +JSProto_XML = 11, +JSProto_Namespace = 12, +JSProto_QName = 13, +JSProto_Error = 14, +JSProto_InternalError = 15, +JSProto_EvalError = 16, +JSProto_RangeError = 17, +JSProto_ReferenceError = 18, +JSProto_SyntaxError = 19, +JSProto_TypeError = 20, +JSProto_URIError = 21, +JSProto_Iterator = 22, +JSProto_StopIteration = 23, +JSProto_ArrayBuffer = 24, +JSProto_Int8Array = 25, +JSProto_Uint8Array = 26, +JSProto_Int16Array = 27, +JSProto_Uint16Array = 28, +JSProto_Int32Array = 29, +JSProto_Uint32Array = 30, +JSProto_Float32Array = 31, +JSProto_Float64Array = 32, +JSProto_Uint8ClampedArray = 33, +JSProto_Proxy = 34, +JSProto_AnyName = 35, +JSProto_WeakMap = 36, +JSProto_Map = 37, +JSProto_Set = 38, +JSProto_DataView = 39, + +#undef XML_INIT +#undef NAMESPACE_INIT +#undef QNAME_INIT +# 111 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspubtd.h" 2 +#undef JS_PROTO + JSProto_LIMIT +} JSProtoKey; + + +typedef enum JSAccessMode { + JSACC_PROTO = 0, + JSACC_PARENT = 1, + + + + + + + JSACC_WATCH = 3, + JSACC_READ = 4, + JSACC_WRITE = 8, + JSACC_LIMIT +} JSAccessMode; + +#define JSACC_TYPEMASK (JSACC_WRITE - 1) + + + + + +typedef enum JSIterateOp { + + JSENUMERATE_INIT, + + + JSENUMERATE_INIT_ALL, + + + JSENUMERATE_NEXT, + + + JSENUMERATE_DESTROY +} JSIterateOp; + + +typedef enum { + JSTRACE_OBJECT, + JSTRACE_STRING, + JSTRACE_SCRIPT, + + + + + + + JSTRACE_XML, + + JSTRACE_SHAPE, + JSTRACE_BASE_SHAPE, + JSTRACE_TYPE_OBJECT, + JSTRACE_LAST = JSTRACE_TYPE_OBJECT +} JSGCTraceKind; + + +typedef struct JSClass JSClass; +typedef struct JSCompartment JSCompartment; +typedef struct JSConstDoubleSpec JSConstDoubleSpec; +typedef struct JSContext JSContext; +typedef struct JSCrossCompartmentCall JSCrossCompartmentCall; +typedef struct JSErrorReport JSErrorReport; +typedef struct JSExceptionState JSExceptionState; +typedef struct JSFunction JSFunction; +typedef struct JSFunctionSpec JSFunctionSpec; +typedef struct JSIdArray JSIdArray; +typedef struct JSLocaleCallbacks JSLocaleCallbacks; +typedef struct JSObject JSObject; +typedef struct JSObjectMap JSObjectMap; +typedef struct JSPrincipals JSPrincipals; +typedef struct JSPropertyDescriptor JSPropertyDescriptor; +typedef struct JSPropertyName JSPropertyName; +typedef struct JSPropertySpec JSPropertySpec; +typedef struct JSRuntime JSRuntime; +typedef struct JSSecurityCallbacks JSSecurityCallbacks; +typedef struct JSStackFrame JSStackFrame; +typedef struct JSScript JSScript; +typedef struct JSStructuredCloneCallbacks JSStructuredCloneCallbacks; +typedef struct JSStructuredCloneReader JSStructuredCloneReader; +typedef struct JSStructuredCloneWriter JSStructuredCloneWriter; +typedef struct JSTracer JSTracer; + + +class JSFlatString; +class JSString; + + + + + + +typedef struct PRCallOnceType JSCallOnceType; + + + +typedef JSBool (*JSInitCallback)(void); + +} + + + +namespace JS { + +template +class Rooted; + +class SkipRoot; + +enum ThingRootKind +{ + THING_ROOT_OBJECT, + THING_ROOT_SHAPE, + THING_ROOT_BASE_SHAPE, + THING_ROOT_TYPE_OBJECT, + THING_ROOT_STRING, + THING_ROOT_SCRIPT, + THING_ROOT_XML, + THING_ROOT_ID, + THING_ROOT_VALUE, + THING_ROOT_LIMIT +}; + +struct ContextFriendFields { + JSRuntime *const runtime; + + ContextFriendFields(JSRuntime *rt) + : runtime(rt) { } + + static const ContextFriendFields *get(const JSContext *cx) { + return reinterpret_cast(cx); + } + + static ContextFriendFields *get(JSContext *cx) { + return reinterpret_cast(cx); + } +# 272 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspubtd.h" +}; + +} +# 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" 1 +# 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" +#define jsutil_h___ + + + +# 1 "./../../dist/include/js/Utility.h" 1 +# 9 "./../../dist/include/js/Utility.h" +#define js_utility_h__ + + + + +# 1 "/usr/include/string.h" 1 3 4 +# 25 "/usr/include/string.h" 3 4 +#define _STRING_H 1 + + + +extern "C" { + + +#define __need_size_t +#define __need_NULL +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 35 "/usr/include/string.h" 2 3 4 + + + +#define __CORRECT_ISO_CPP_STRING_H_PROTO + + + + + +extern void *memcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern void *memmove (void *__dest, __const void *__src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, + int __c, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1))); + + +extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern "C++" +{ +extern void *memchr (void *__s, int __c, size_t __n) + throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const void *memchr (__const void *__s, int __c, size_t __n) + throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +memchr (void *__s, int __c, size_t __n) throw () +{ + return __builtin_memchr (__s, __c, __n); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const void * +memchr (__const void *__s, int __c, size_t __n) throw () +{ + return __builtin_memchr (__s, __c, __n); +} + +} + + + + + + + + + + +extern "C++" void *rawmemchr (void *__s, int __c) + throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" __const void *rawmemchr (__const void *__s, int __c) + throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + + + +extern "C++" void *memrchr (void *__s, int __c, size_t __n) + throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" __const void *memrchr (__const void *__s, int __c, size_t __n) + throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + + + + + +extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); + +extern char *strncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern char *strcat (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); + +extern char *strncat (char *__restrict __dest, __const char *__restrict __src, + size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int strcmp (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strcoll (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern size_t strxfrm (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (2))); + +# 165 "/usr/include/string.h" 3 4 +extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); + +extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, + __locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4))); + + + + + +extern char *strdup (__const char *__s) + throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern char *strndup (__const char *__string, size_t __n) + throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); + + + + +#define strdupa(s) (__extension__ ({ __const char *__old = (s); size_t __len = strlen (__old) + 1; char *__new = (char *) __builtin_alloca (__len); (char *) memcpy (__new, __old, __len); })) +# 199 "/usr/include/string.h" 3 4 +#define strndupa(s,n) (__extension__ ({ __const char *__old = (s); size_t __len = strnlen (__old, (n)); char *__new = (char *) __builtin_alloca (__len + 1); __new[__len] = '\0'; (char *) memcpy (__new, __old, __len); })) +# 210 "/usr/include/string.h" 3 4 + + + +extern "C++" +{ +extern char *strchr (char *__s, int __c) + throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *strchr (__const char *__s, int __c) + throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strchr (char *__s, int __c) throw () +{ + return __builtin_strchr (__s, __c); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +strchr (__const char *__s, int __c) throw () +{ + return __builtin_strchr (__s, __c); +} + +} + + + + + + +extern "C++" +{ +extern char *strrchr (char *__s, int __c) + throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *strrchr (__const char *__s, int __c) + throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strrchr (char *__s, int __c) throw () +{ + return __builtin_strrchr (__s, __c); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +strrchr (__const char *__s, int __c) throw () +{ + return __builtin_strrchr (__s, __c); +} + +} + + + + + + + + + + +extern "C++" char *strchrnul (char *__s, int __c) + throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" __const char *strchrnul (__const char *__s, int __c) + throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + + + + + +extern size_t strcspn (__const char *__s, __const char *__reject) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern size_t strspn (__const char *__s, __const char *__accept) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern "C++" +{ +extern char *strpbrk (char *__s, __const char *__accept) + throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern __const char *strpbrk (__const char *__s, __const char *__accept) + throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strpbrk (char *__s, __const char *__accept) throw () +{ + return __builtin_strpbrk (__s, __accept); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +strpbrk (__const char *__s, __const char *__accept) throw () +{ + return __builtin_strpbrk (__s, __accept); +} + +} + + + + + + +extern "C++" +{ +extern char *strstr (char *__haystack, __const char *__needle) + throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern __const char *strstr (__const char *__haystack, + __const char *__needle) + throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strstr (char *__haystack, __const char *__needle) throw () +{ + return __builtin_strstr (__haystack, __needle); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +strstr (__const char *__haystack, __const char *__needle) throw () +{ + return __builtin_strstr (__haystack, __needle); +} + +} + + + + + + + +extern char *strtok (char *__restrict __s, __const char *__restrict __delim) + throw () __attribute__ ((__nonnull__ (2))); + + + + +extern char *__strtok_r (char *__restrict __s, + __const char *__restrict __delim, + char **__restrict __save_ptr) + throw () __attribute__ ((__nonnull__ (2, 3))); + +extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, + char **__restrict __save_ptr) + throw () __attribute__ ((__nonnull__ (2, 3))); + + + + + +extern "C++" char *strcasestr (char *__haystack, __const char *__needle) + throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern "C++" __const char *strcasestr (__const char *__haystack, + __const char *__needle) + throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 382 "/usr/include/string.h" 3 4 +extern void *memmem (__const void *__haystack, size_t __haystacklen, + __const void *__needle, size_t __needlelen) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); + + + +extern void *__mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void *mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern size_t strlen (__const char *__s) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern size_t strnlen (__const char *__string, size_t __maxlen) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern char *strerror (int __errnum) throw (); + +# 438 "/usr/include/string.h" 3 4 +extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) + throw () __attribute__ ((__nonnull__ (2))); + + + + + +extern char *strerror_l (int __errnum, __locale_t __l) throw (); + + + + + +extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); + + + +extern void bcopy (__const void *__src, void *__dest, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); + + +extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern "C++" +{ +extern char *index (char *__s, int __c) + throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *index (__const char *__s, int __c) + throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +index (char *__s, int __c) throw () +{ + return __builtin_index (__s, __c); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +index (__const char *__s, int __c) throw () +{ + return __builtin_index (__s, __c); +} + +} + + + + + + + +extern "C++" +{ +extern char *rindex (char *__s, int __c) + throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *rindex (__const char *__s, int __c) + throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +rindex (char *__s, int __c) throw () +{ + return __builtin_rindex (__s, __c); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +rindex (__const char *__s, int __c) throw () +{ + return __builtin_rindex (__s, __c); +} + +} + + + + + + + +extern int ffs (int __i) throw () __attribute__ ((__const__)); + + + + +extern int ffsl (long int __l) throw () __attribute__ ((__const__)); + +__extension__ extern int ffsll (long long int __ll) + throw () __attribute__ ((__const__)); + + + + +extern int strcasecmp (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern int strcasecmp_l (__const char *__s1, __const char *__s2, + __locale_t __loc) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); + +extern int strncasecmp_l (__const char *__s1, __const char *__s2, + size_t __n, __locale_t __loc) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); + + + + + +extern char *strsep (char **__restrict __stringp, + __const char *__restrict __delim) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + +extern char *strsignal (int __sig) throw (); + + +extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern char *__stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int strverscmp (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1))); + + +extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); + + + + + + + +extern "C++" char *basename (char *__filename) + throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); +extern "C++" __const char *basename (__const char *__filename) + throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); +# 642 "/usr/include/string.h" 3 4 +# 1 "/usr/include/bits/string3.h" 1 3 4 +# 23 "/usr/include/bits/string3.h" 3 4 +extern void __warn_memset_zero_len (void) __attribute__((__warning__ ("memset used with constant zero length parameter; this could be due to transposed parameters"))) + ; +# 48 "/usr/include/bits/string3.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * + memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) throw () + +{ + return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * + memmove (void *__dest, __const void *__src, size_t __len) throw () +{ + return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * + mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) throw () + +{ + return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} +# 76 "/usr/include/bits/string3.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * + memset (void *__dest, int __ch, size_t __len) throw () +{ + if (__builtin_constant_p (__len) && __len == 0 + && (!__builtin_constant_p (__ch) || __ch != 0)) + { + __warn_memset_zero_len (); + return __dest; + } + return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void + bcopy (__const void *__src, void *__dest, size_t __len) throw () +{ + (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void + bzero (void *__dest, size_t __len) throw () +{ + (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * + strcpy (char *__restrict __dest, __const char *__restrict __src) throw () +{ + return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * + stpcpy (char *__restrict __dest, __const char *__restrict __src) throw () +{ + return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * + strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __len) throw () + +{ + return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); +} + + +extern char *__stpncpy_chk (char *__dest, __const char *__src, size_t __n, + size_t __destlen) throw (); +extern char *__stpncpy_alias (char *__dest, __const char *__src, size_t __n) throw () __asm__ ("" "stpncpy") + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * + stpncpy (char *__dest, __const char *__src, size_t __n) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1 + && (!__builtin_constant_p (__n) || __n <= __builtin_object_size (__dest, 2 > 1))) + return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1)); + return __stpncpy_alias (__dest, __src, __n); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * + strcat (char *__restrict __dest, __const char *__restrict __src) throw () +{ + return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * + strncat (char *__restrict __dest, __const char *__restrict __src, size_t __len) throw () + +{ + return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); +} +# 643 "/usr/include/string.h" 2 3 4 + + + +} +# 15 "./../../dist/include/js/Utility.h" 2 + + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" 1 +# 22 "./../../dist/include/js/Utility.h" 2 + + + + +namespace JS {} + + +namespace mozilla {} + + +namespace js { + + +using namespace JS; +using namespace mozilla; + +} + + +extern "C" { + + + + + +#define JS_FREE_PATTERN 0xDA + +#define JS_ASSERT(expr) MOZ_ASSERT(expr) +#define JS_ASSERT_IF(cond,expr) MOZ_ASSERT_IF(cond, expr) +#define JS_NOT_REACHED(reason) MOZ_NOT_REACHED(reason) +#define JS_ALWAYS_TRUE(expr) MOZ_ALWAYS_TRUE(expr) +#define JS_ALWAYS_FALSE(expr) MOZ_ALWAYS_FALSE(expr) +# 62 "./../../dist/include/js/Utility.h" +#define JS_THREADSAFE_ASSERT(expr) ((void) 0) + + +#define JS_STATIC_ASSERT(cond) MOZ_STATIC_ASSERT(cond, "JS_STATIC_ASSERT") +#define JS_STATIC_ASSERT_IF(cond,expr) MOZ_STATIC_ASSERT_IF(cond, expr, "JS_STATIC_ASSERT_IF") + + + + + + +extern __attribute__((visibility("default"))) void JS_Abort(void); +# 140 "./../../dist/include/js/Utility.h" +#define JS_OOM_POSSIBLY_FAIL() do {} while(0) +#define JS_OOM_POSSIBLY_FAIL_REPORT(cx) do {} while(0) + + + + + + + +static inline void* js_malloc(size_t bytes) +{ + do {} while(0); + return malloc(bytes); +} + +static inline void* js_calloc(size_t bytes) +{ + do {} while(0); + return calloc(bytes, 1); +} + +static inline void* js_realloc(void* p, size_t bytes) +{ + do {} while(0); + return realloc(p, bytes); +} + +static inline void js_free(void* p) +{ + free(p); +} +# 234 "./../../dist/include/js/Utility.h" +#define js_bitscan_ctz32(val) __builtin_ctz(val) +#define js_bitscan_clz32(val) __builtin_clz(val) +#define JS_HAS_BUILTIN_BITSCAN32 +# 255 "./../../dist/include/js/Utility.h" +#define JS_CEILING_LOG2(_log2,_n) JS_BEGIN_MACRO unsigned int j_ = (unsigned int)(_n); (_log2) = (j_ <= 1 ? 0 : 32 - js_bitscan_clz32(j_ - 1)); JS_END_MACRO +# 292 "./../../dist/include/js/Utility.h" +#define JS_FLOOR_LOG2(_log2,_n) JS_BEGIN_MACRO (_log2) = 31 - js_bitscan_clz32(((unsigned int)(_n)) | 1); JS_END_MACRO +# 316 "./../../dist/include/js/Utility.h" +#define js_FloorLog2wImpl(n) ((size_t)(JS_BITS_PER_WORD - 1 - js_bitscan_clz32(n))) +# 338 "./../../dist/include/js/Utility.h" +#define JS_CEILING_LOG2W(n) ((n) <= 1 ? 0 : 1 + JS_FLOOR_LOG2W((n) - 1)) + + + + + + + +static __attribute__((always_inline)) inline size_t +JS_FLOOR_LOG2W(size_t n) +{ + do { } while(0); + return ((size_t)((8 * 4) - 1 - __builtin_clz(n))); +} + +} +# 437 "./../../dist/include/js/Utility.h" +#define JS_NEW_BODY(allocator,t,parms) void *memory = allocator(sizeof(t)); return memory ? new(memory) t parms : NULL; +# 450 "./../../dist/include/js/Utility.h" +#define JS_DECLARE_NEW_METHODS(ALLOCATOR,QUALIFIERS) template QUALIFIERS T *new_() { JS_NEW_BODY(ALLOCATOR, T, ()) } template QUALIFIERS T *new_(P1 p1) { JS_NEW_BODY(ALLOCATOR, T, (p1)) } template QUALIFIERS T *new_(P1 p1, P2 p2) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4, p5)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4, p5, p6)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4, p5, p6, p7)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4, p5, p6, p7, p8)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4, p5, p6, p7, p8, p9)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)) } static const int JSMinAlignment = 8; template QUALIFIERS T *array_new(size_t n) { uint64_t numBytes64 = uint64_t(JSMinAlignment) + uint64_t(sizeof(T)) * uint64_t(n); size_t numBytes = size_t(numBytes64); if (numBytes64 != numBytes) { JS_ASSERT(0); return NULL; } void *memory = ALLOCATOR(numBytes); if (!memory) return NULL; *(size_t *)memory = n; memory = (void*)(uintptr_t(memory) + JSMinAlignment); return new(memory) T[n]; } +# 534 "./../../dist/include/js/Utility.h" +#define JS_DECLARE_DELETE_METHODS(DEALLOCATOR,QUALIFIERS) template QUALIFIERS void delete_(T *p) { if (p) { p->~T(); DEALLOCATOR(p); } } template QUALIFIERS void array_delete(T *p) { if (p) { void* p0 = (void *)(uintptr_t(p) - js::OffTheBooks::JSMinAlignment); size_t n = *(size_t *)p0; for (size_t i = 0; i < n; i++) (p + i)->~T(); DEALLOCATOR(p0); } } +# 561 "./../../dist/include/js/Utility.h" +namespace js { + +class OffTheBooks { +public: + template __attribute__((always_inline)) inline static T *new_() { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T () : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) : __null; } static const int JSMinAlignment = 8; template __attribute__((always_inline)) inline static T *array_new(size_t n) { uint64_t numBytes64 = uint64_t(JSMinAlignment) + uint64_t(sizeof(T)) * uint64_t(n); size_t numBytes = size_t(numBytes64); if (numBytes64 != numBytes) { do { } while(0); return __null; } void *memory = ::js_malloc(numBytes); if (!memory) return __null; *(size_t *)memory = n; memory = (void*)(uintptr_t(memory) + JSMinAlignment); return new(memory) T[n]; } + + static inline void* malloc_(size_t bytes) { + return ::js_malloc(bytes); + } + + static inline void* calloc_(size_t bytes) { + return ::js_calloc(bytes); + } + + static inline void* realloc_(void* p, size_t bytes) { + return ::js_realloc(p, bytes); + } +}; + + + + + +class Foreground { +public: + + static __attribute__((always_inline)) inline void free_(void* p) { + ::js_free(p); + } + + template __attribute__((always_inline)) inline static void delete_(T *p) { if (p) { p->~T(); ::js_free(p); } } template __attribute__((always_inline)) inline static void array_delete(T *p) { if (p) { void* p0 = (void *)(uintptr_t(p) - js::OffTheBooks::JSMinAlignment); size_t n = *(size_t *)p0; for (size_t i = 0; i < n; i++) (p + i)->~T(); ::js_free(p0); } } +}; + +class UnwantedForeground : public Foreground { +}; + +} + + + + + +#define JS_DECLARE_ALLOCATION_FRIENDS_FOR_PRIVATE_CONSTRUCTOR friend class js::OffTheBooks; friend class js::Foreground; friend class js::UnwantedForeground; friend struct ::JSContext; friend struct ::JSRuntime +# 701 "./../../dist/include/js/Utility.h" +#define JS_DECL_USE_GUARD_OBJECT_NOTIFIER +#define JS_GUARD_OBJECT_NOTIFIER_PARAM +#define JS_GUARD_OBJECT_NOTIFIER_PARAM_NO_INIT +#define JS_GUARD_OBJECT_NOTIFIER_PARAM0 +#define JS_GUARD_OBJECT_NOTIFIER_INIT JS_BEGIN_MACRO JS_END_MACRO + + + +namespace js { +# 811 "./../../dist/include/js/Utility.h" +template +class MoveRef { + public: + typedef T Referent; + explicit MoveRef(T &t) : pointer(&t) { } + T &operator*() const { return *pointer; } + T *operator->() const { return pointer; } +# 830 "./../../dist/include/js/Utility.h" + operator T& () const { return *pointer; } + + private: + T *pointer; +}; + +template +MoveRef Move(T &t) { return MoveRef(t); } + +template +MoveRef Move(const T &t) { return MoveRef(const_cast(t)); } + + +class ReentrancyGuard +{ + + ReentrancyGuard(const ReentrancyGuard &); + void operator=(const ReentrancyGuard &); + + + + + public: + template + + + + + ReentrancyGuard(T & ) + + { + + + + + } + ~ReentrancyGuard() + { + + + + } +}; + + + + + +__attribute__((always_inline)) inline size_t +RoundUpPow2(size_t x) +{ + return size_t(1) << ((x) <= 1 ? 0 : 1 + JS_FLOOR_LOG2W((x) - 1)); +} + +} + +namespace JS { +# 899 "./../../dist/include/js/Utility.h" +inline void PoisonPtr(uintptr_t *v) +{ + + + + +} + +template +inline bool IsPoisonedPtr(T *v) +{ + + + + + return false; + +} + +} + + + + + + +typedef size_t(*JSMallocSizeOfFun)(const void *p); + + + +#define HAVE_STATIC_ANNOTATIONS +# 955 "./../../dist/include/js/Utility.h" +#define STATIC_PRECONDITION(COND) +#define STATIC_PRECONDITION_ASSUME(COND) +#define STATIC_POSTCONDITION(COND) +#define STATIC_POSTCONDITION_ASSUME(COND) +#define STATIC_INVARIANT(COND) +#define STATIC_INVARIANT_ASSUME(COND) +#define STATIC_ASSERT(COND) JS_BEGIN_MACRO JS_END_MACRO +#define STATIC_ASSUME(COND) JS_BEGIN_MACRO JS_END_MACRO +#define STATIC_ASSERT_RUNTIME(COND) JS_BEGIN_MACRO JS_END_MACRO + +#define STATIC_SKIP_INFERENCE STATIC_INVARIANT(skip_inference()) +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" 2 + + +struct JSContext; + +static __attribute__((always_inline)) inline void * +js_memcpy(void *dst_, const void *src_, size_t len) +{ + char *dst = (char *) dst_; + const char *src = (const char *) src_; + do { } while (0); + do { } while (0); + + return memcpy(dst, src, len); +} + + +namespace js { + +template +struct AlignmentTestStruct +{ + char c; + T t; +}; + + +#define JS_ALIGNMENT_OF(t_) (sizeof(js::AlignmentTestStruct) - sizeof(t_)) + + +template +class AlignedPtrAndFlag +{ + uintptr_t bits; + + public: + AlignedPtrAndFlag(T *t, bool flag) { + do { } while(0); + bits = uintptr_t(t) | uintptr_t(flag); + } + + T *ptr() const { + return (T *)(bits & ~uintptr_t(1)); + } + + bool flag() const { + return (bits & 1) != 0; + } + + void setPtr(T *t) { + do { } while(0); + bits = uintptr_t(t) | uintptr_t(flag()); + } + + void setFlag() { + bits |= 1; + } + + void unsetFlag() { + bits &= ~uintptr_t(1); + } + + void set(T *t, bool flag) { + do { } while(0); + bits = uintptr_t(t) | flag; + } +}; + +template +static inline void +Reverse(T *beg, T *end) +{ + while (beg != end) { + if (--end == beg) + return; + T tmp = *beg; + *beg = *end; + *end = tmp; + ++beg; + } +} + +template +static inline T * +Find(T *beg, T *end, const T &v) +{ + for (T *p = beg; p != end; ++p) { + if (*p == v) + return p; + } + return end; +} + +template +static inline typename Container::ElementType * +Find(Container &c, const typename Container::ElementType &v) +{ + return Find(c.begin(), c.end(), v); +} + +template +void +ForEach(InputIterT begin, InputIterT end, CallableT f) +{ + for (; begin != end; ++begin) + f(*begin); +} + +template +static inline T +Min(T t1, T t2) +{ + return t1 < t2 ? t1 : t2; +} + +template +static inline T +Max(T t1, T t2) +{ + return t1 > t2 ? t1 : t2; +} + + +template +static T& +InitConst(const T &t) +{ + return const_cast(t); +} + +template +__attribute__((always_inline)) inline T & +ImplicitCast(U &u) +{ + T &t = u; + return t; +} + +template +class AutoScopedAssign +{ + private: + + T *addr; + T old; + + public: + AutoScopedAssign(T *addr, const T &value ) + : addr(addr), old(*addr) + { + do { } while (0); + *addr = value; + } + + ~AutoScopedAssign() { *addr = old; } +}; + +template +__attribute__((always_inline)) inline static void +PodZero(T *t) +{ + memset(t, 0, sizeof(T)); +} + +template +__attribute__((always_inline)) inline static void +PodZero(T *t, size_t nelem) +{ + + + + + + + for (T *end = t + nelem; t != end; ++t) + memset(t, 0, sizeof(T)); +} +# 201 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" +template static void PodZero(T (&)[N]); +template static void PodZero(T (&)[N], size_t); + +template +__attribute__((always_inline)) inline static void +PodArrayZero(T (&t)[N]) +{ + memset(t, 0, N * sizeof(T)); +} + +template +__attribute__((always_inline)) inline static void +PodAssign(T *dst, const T *src) +{ + js_memcpy((char *) dst, (const char *) src, sizeof(T)); +} + +template +__attribute__((always_inline)) inline static void +PodCopy(T *dst, const T *src, size_t nelem) +{ + + do { } while (0); + do { } while (0); + + if (nelem < 128) { + + + + + for (const T *srcend = src + nelem; src != srcend; ++src, ++dst) + PodAssign(dst, src); + } else { + memcpy(dst, src, nelem * sizeof(T)); + } +} + +template +__attribute__((always_inline)) inline static bool +PodEqual(T *one, T *two, size_t len) +{ + if (len < 128) { + T *p1end = one + len; + for (T *p1 = one, *p2 = two; p1 != p1end; ++p1, ++p2) { + if (*p1 != *p2) + return false; + } + return true; + } + + return !memcmp(one, two, len * sizeof(T)); +} + +template +__attribute__((always_inline)) inline static void +Swap(T &t, T &u) +{ + T tmp(Move(t)); + t = Move(u); + u = Move(tmp); +} + +__attribute__((always_inline)) inline static size_t +UnsignedPtrDiff(const void *bigger, const void *smaller) +{ + return size_t(bigger) - size_t(smaller); +} +# 276 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" +enum MaybeReportError { REPORT_ERROR = true, DONT_REPORT_ERROR = false }; + + + + + +static inline unsigned +NumWordsForBitArrayOfLength(size_t length) +{ + return (length + ((8 * 4) - 1)) / (8 * 4); +} + +static inline unsigned +BitArrayIndexToWordIndex(size_t length, size_t bitIndex) +{ + unsigned wordIndex = bitIndex / (8 * 4); + do { } while(0); + return wordIndex; +} + +static inline size_t +BitArrayIndexToWordMask(size_t i) +{ + return size_t(1) << (i % (8 * 4)); +} + +static inline bool +IsBitArrayElementSet(size_t *array, size_t length, size_t i) +{ + return array[BitArrayIndexToWordIndex(length, i)] & BitArrayIndexToWordMask(i); +} + +static inline bool +IsAnyBitArrayElementSet(size_t *array, size_t length) +{ + unsigned numWords = NumWordsForBitArrayOfLength(length); + for (unsigned i = 0; i < numWords; ++i) { + if (array[i]) + return true; + } + return false; +} + +static inline void +SetBitArrayElement(size_t *array, size_t length, size_t i) +{ + array[BitArrayIndexToWordIndex(length, i)] |= BitArrayIndexToWordMask(i); +} + +static inline void +ClearBitArrayElement(size_t *array, size_t length, size_t i) +{ + array[BitArrayIndexToWordIndex(length, i)] &= ~BitArrayIndexToWordMask(i); +} + +static inline void +ClearAllBitArrayElements(size_t *array, size_t length) +{ + for (unsigned i = 0; i < length; ++i) + array[i] = 0; +} + +} +# 358 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" +#define JS_ROTATE_LEFT32(a,bits) (((a) << (bits)) | ((a) >> (32 - (bits)))) +# 370 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" +#define MUST_FLOW_THROUGH(label) ((void) 0) +#define MUST_FLOW_LABEL(label) +# 385 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" +#define JS_POISON(p,val,size) ((void) 0) +#define JS_OPT_ASSERT(expr) ((void) 0) +#define JS_OPT_ASSERT_IF(cond,expr) ((void) 0) +# 419 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" +#define JS_BASIC_STATS_ACCUM(bs,val) + + + +typedef size_t jsbitmap; +#define JS_TEST_BIT(_map,_bit) ((_map)[(_bit)>>JS_BITS_PER_WORD_LOG2] & ((jsbitmap)1<<((_bit)&(JS_BITS_PER_WORD-1)))) + +#define JS_SET_BIT(_map,_bit) ((_map)[(_bit)>>JS_BITS_PER_WORD_LOG2] |= ((jsbitmap)1<<((_bit)&(JS_BITS_PER_WORD-1)))) + +#define JS_CLEAR_BIT(_map,_bit) ((_map)[(_bit)>>JS_BITS_PER_WORD_LOG2] &= ~((jsbitmap)1<<((_bit)&(JS_BITS_PER_WORD-1)))) +# 449 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" +#define JS_SILENCE_UNUSED_VALUE_IN_EXPR(expr) JS_BEGIN_MACRO expr; JS_END_MACRO +# 23 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" +#define jsvalimpl_h__ +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" +extern "C" { + + + + + + +#define JSVAL_ALIGNMENT __attribute__((aligned (8))) +# 54 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" +#define JS_ENUM_HEADER(id,type) enum id +#define JS_ENUM_FOOTER(id) __attribute__((packed)) + + + +enum JSValueType +{ + JSVAL_TYPE_DOUBLE = 0x00, + JSVAL_TYPE_INT32 = 0x01, + JSVAL_TYPE_UNDEFINED = 0x02, + JSVAL_TYPE_BOOLEAN = 0x03, + JSVAL_TYPE_MAGIC = 0x04, + JSVAL_TYPE_STRING = 0x05, + JSVAL_TYPE_NULL = 0x06, + JSVAL_TYPE_OBJECT = 0x07, + + + JSVAL_TYPE_UNKNOWN = 0x20, + JSVAL_TYPE_MISSING = 0x21 +} __attribute__((packed)); + +typedef int moz_static_assert5[(sizeof(JSValueType) == 1) ? 1 : -1]; + + + + +enum JSValueTag +{ + JSVAL_TAG_CLEAR = 0xFFFFFF80, + JSVAL_TAG_INT32 = JSVAL_TAG_CLEAR | JSVAL_TYPE_INT32, + JSVAL_TAG_UNDEFINED = JSVAL_TAG_CLEAR | JSVAL_TYPE_UNDEFINED, + JSVAL_TAG_STRING = JSVAL_TAG_CLEAR | JSVAL_TYPE_STRING, + JSVAL_TAG_BOOLEAN = JSVAL_TAG_CLEAR | JSVAL_TYPE_BOOLEAN, + JSVAL_TAG_MAGIC = JSVAL_TAG_CLEAR | JSVAL_TYPE_MAGIC, + JSVAL_TAG_NULL = JSVAL_TAG_CLEAR | JSVAL_TYPE_NULL, + JSVAL_TAG_OBJECT = JSVAL_TAG_CLEAR | JSVAL_TYPE_OBJECT +} __attribute__((packed)); + +typedef int moz_static_assert6[(sizeof(JSValueTag) == 4) ? 1 : -1]; +# 177 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" +#define JSVAL_LOWER_INCL_TYPE_OF_OBJ_OR_NULL_SET JSVAL_TYPE_NULL +#define JSVAL_UPPER_EXCL_TYPE_OF_PRIMITIVE_SET JSVAL_TYPE_OBJECT +#define JSVAL_UPPER_INCL_TYPE_OF_NUMBER_SET JSVAL_TYPE_INT32 +#define JSVAL_LOWER_INCL_TYPE_OF_PTR_PAYLOAD_SET JSVAL_TYPE_MAGIC + + + +#define JSVAL_TYPE_TO_TAG(type) ((JSValueTag)(JSVAL_TAG_CLEAR | (type))) + +#define JSVAL_LOWER_INCL_TAG_OF_OBJ_OR_NULL_SET JSVAL_TAG_NULL +#define JSVAL_UPPER_EXCL_TAG_OF_PRIMITIVE_SET JSVAL_TAG_OBJECT +#define JSVAL_UPPER_INCL_TAG_OF_NUMBER_SET JSVAL_TAG_INT32 +#define JSVAL_LOWER_INCL_TAG_OF_GCTHING_SET JSVAL_TAG_STRING +# 205 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" +typedef enum JSWhyMagic +{ + JS_ARRAY_HOLE, + JS_NATIVE_ENUMERATE, + + + JS_NO_ITER_VALUE, + JS_GENERATOR_CLOSING, + JS_NO_CONSTANT, + JS_THIS_POISON, + JS_ARG_POISON, + JS_SERIALIZE_NO_NODE, + JS_LAZY_ARGUMENTS, + JS_UNASSIGNED_ARGUMENTS, + JS_OPTIMIZED_ARGUMENTS, + JS_IS_CONSTRUCTING, + JS_OVERWRITTEN_CALLEE, + JS_GENERIC_MAGIC +} JSWhyMagic; + + + +typedef union jsval_layout +{ + uint64_t asBits; + struct { + union { + int32_t i32; + uint32_t u32; + JSBool boo; + JSString *str; + JSObject *obj; + void *ptr; + JSWhyMagic why; + size_t word; + uintptr_t uintptr; + } payload; + JSValueTag tag; + } s; + double asDouble; + void *asPtr; +} __attribute__((aligned (8))) jsval_layout; +# 317 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" +typedef int moz_static_assert7[(sizeof(jsval_layout) == 8) ? 1 : -1]; +# 327 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" +static __attribute__((always_inline)) inline jsval_layout +BUILD_JSVAL(JSValueTag tag, uint32_t payload) +{ + jsval_layout l; + l.asBits = (((uint64_t)(uint32_t)tag) << 32) | payload; + return l; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_DOUBLE_IMPL(jsval_layout l) +{ + return (uint32_t)l.s.tag <= (uint32_t)JSVAL_TAG_CLEAR; +} + +static __attribute__((always_inline)) inline jsval_layout +DOUBLE_TO_JSVAL_IMPL(double d) +{ + jsval_layout l; + l.asDouble = d; + do { } while(0); + return l; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_INT32_IMPL(jsval_layout l) +{ + return l.s.tag == JSVAL_TAG_INT32; +} + +static __attribute__((always_inline)) inline int32_t +JSVAL_TO_INT32_IMPL(jsval_layout l) +{ + return l.s.payload.i32; +} + +static __attribute__((always_inline)) inline jsval_layout +INT32_TO_JSVAL_IMPL(int32_t i) +{ + jsval_layout l; + l.s.tag = JSVAL_TAG_INT32; + l.s.payload.i32 = i; + return l; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_NUMBER_IMPL(jsval_layout l) +{ + JSValueTag tag = l.s.tag; + do { } while(0); + return (uint32_t)tag <= (uint32_t)JSVAL_TAG_INT32; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_UNDEFINED_IMPL(jsval_layout l) +{ + return l.s.tag == JSVAL_TAG_UNDEFINED; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_STRING_IMPL(jsval_layout l) +{ + return l.s.tag == JSVAL_TAG_STRING; +} + +static __attribute__((always_inline)) inline jsval_layout +STRING_TO_JSVAL_IMPL(JSString *str) +{ + jsval_layout l; + do { } while(0); + l.s.tag = JSVAL_TAG_STRING; + l.s.payload.str = str; + return l; +} + +static __attribute__((always_inline)) inline JSString * +JSVAL_TO_STRING_IMPL(jsval_layout l) +{ + return l.s.payload.str; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_BOOLEAN_IMPL(jsval_layout l) +{ + return l.s.tag == JSVAL_TAG_BOOLEAN; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_TO_BOOLEAN_IMPL(jsval_layout l) +{ + return l.s.payload.boo; +} + +static __attribute__((always_inline)) inline jsval_layout +BOOLEAN_TO_JSVAL_IMPL(JSBool b) +{ + jsval_layout l; + do { } while(0); + l.s.tag = JSVAL_TAG_BOOLEAN; + l.s.payload.boo = b; + return l; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_MAGIC_IMPL(jsval_layout l) +{ + return l.s.tag == JSVAL_TAG_MAGIC; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_OBJECT_IMPL(jsval_layout l) +{ + return l.s.tag == JSVAL_TAG_OBJECT; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_PRIMITIVE_IMPL(jsval_layout l) +{ + return (uint32_t)l.s.tag < (uint32_t)JSVAL_TAG_OBJECT; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_OBJECT_OR_NULL_IMPL(jsval_layout l) +{ + do { } while(0); + return (uint32_t)l.s.tag >= (uint32_t)JSVAL_TAG_NULL; +} + +static __attribute__((always_inline)) inline JSObject * +JSVAL_TO_OBJECT_IMPL(jsval_layout l) +{ + return l.s.payload.obj; +} + +static __attribute__((always_inline)) inline jsval_layout +OBJECT_TO_JSVAL_IMPL(JSObject *obj) +{ + jsval_layout l; + do { } while(0); + l.s.tag = JSVAL_TAG_OBJECT; + l.s.payload.obj = obj; + return l; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_NULL_IMPL(jsval_layout l) +{ + return l.s.tag == JSVAL_TAG_NULL; +} + +static __attribute__((always_inline)) inline jsval_layout +PRIVATE_PTR_TO_JSVAL_IMPL(void *ptr) +{ + jsval_layout l; + do { } while(0); + l.s.tag = (JSValueTag)0; + l.s.payload.ptr = ptr; + do { } while(0); + return l; +} + +static __attribute__((always_inline)) inline void * +JSVAL_TO_PRIVATE_PTR_IMPL(jsval_layout l) +{ + return l.s.payload.ptr; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_GCTHING_IMPL(jsval_layout l) +{ + + return (uint32_t)l.s.tag >= (uint32_t)JSVAL_TAG_STRING; +} + +static __attribute__((always_inline)) inline void * +JSVAL_TO_GCTHING_IMPL(jsval_layout l) +{ + return l.s.payload.ptr; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_TRACEABLE_IMPL(jsval_layout l) +{ + return l.s.tag == JSVAL_TAG_STRING || l.s.tag == JSVAL_TAG_OBJECT; +} + +static __attribute__((always_inline)) inline uint32_t +JSVAL_TRACE_KIND_IMPL(jsval_layout l) +{ + return (uint32_t)(JSBool)JSVAL_IS_STRING_IMPL(l); +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_SPECIFIC_INT32_IMPL(jsval_layout l, int32_t i32) +{ + return l.s.tag == JSVAL_TAG_INT32 && l.s.payload.i32 == i32; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_SPECIFIC_BOOLEAN(jsval_layout l, JSBool b) +{ + return (l.s.tag == JSVAL_TAG_BOOLEAN) && (l.s.payload.boo == b); +} + +static __attribute__((always_inline)) inline jsval_layout +MAGIC_TO_JSVAL_IMPL(JSWhyMagic why) +{ + jsval_layout l; + l.s.tag = JSVAL_TAG_MAGIC; + l.s.payload.why = why; + return l; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_SAME_TYPE_IMPL(jsval_layout lhs, jsval_layout rhs) +{ + JSValueTag ltag = lhs.s.tag, rtag = rhs.s.tag; + return ltag == rtag || (ltag < JSVAL_TAG_CLEAR && rtag < JSVAL_TAG_CLEAR); +} + +static __attribute__((always_inline)) inline jsval_layout +PRIVATE_UINT32_TO_JSVAL_IMPL(uint32_t ui) +{ + jsval_layout l; + l.s.tag = (JSValueTag)0; + l.s.payload.u32 = ui; + do { } while(0); + return l; +} + +static __attribute__((always_inline)) inline uint32_t +JSVAL_TO_PRIVATE_UINT32_IMPL(jsval_layout l) +{ + return l.s.payload.u32; +} + +static __attribute__((always_inline)) inline JSValueType +JSVAL_EXTRACT_NON_DOUBLE_TYPE_IMPL(jsval_layout l) +{ + uint32_t type = l.s.tag & 0xF; + do { } while(0); + return (JSValueType)type; +} +# 820 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" +static __attribute__((always_inline)) inline double +JS_CANONICALIZE_NAN(double d) +{ + if ((__builtin_expect((d != d), 0))) { + jsval_layout l; + l.asBits = 0x7FF8000000000000LL; + return l.asDouble; + } + return d; +} + +} + + +static jsval_layout JSVAL_TO_IMPL(JS::Value); +static JS::Value IMPL_TO_JSVAL(jsval_layout); +# 24 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" +#define jsgc_root_h__ + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspubtd.h" 1 +# 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" 2 + + + + + +namespace JS { +# 62 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" +template class Rooted; + +template +struct RootMethods { }; + + + + + + +template +class Handle +{ + public: + + template Handle(Handle handle) { + testAssign(); + ptr = reinterpret_cast(handle.address()); + } +# 89 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" + static Handle fromMarkedLocation(const T *p) { + Handle h; + h.ptr = p; + return h; + } + + + + + + template inline Handle(const Rooted &root); + + const T *address() const { return ptr; } + T value() const { return *ptr; } + + operator T () const { return value(); } + T operator ->() const { return value(); } + + private: + Handle() {} + + const T *ptr; + + template + void testAssign() { + + + + + + + } +}; + +typedef Handle HandleObject; +typedef Handle HandleFunction; +typedef Handle HandleString; +typedef Handle HandleId; +typedef Handle HandleValue; + +template +struct RootMethods +{ + static T *initial() { return __null; } + static ThingRootKind kind() { return T::rootKind(); } + static bool poisoned(T *v) { return IsPoisonedPtr(v); } +}; + + + + + + +template +class Rooted +{ + void init(JSContext *cx_, T initial) + { +# 158 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" + ptr = initial; + } + + public: + Rooted(JSContext *cx) { init(cx, RootMethods::initial()); } + Rooted(JSContext *cx, T initial) { init(cx, initial); } +# 172 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" + operator Handle () const { return Handle(*this); } + + ~Rooted() + { + + + + + } + + + + + + operator T () const { return ptr; } + T operator ->() const { return ptr; } + T * address() { return &ptr; } + const T * address() const { return &ptr; } + T & reference() { return ptr; } + T raw() const { return ptr; } + + T & operator =(T value) + { + do { } while(0); + ptr = value; + return ptr; + } + + T & operator =(const Rooted &value) + { + ptr = value; + return ptr; + } + + private: + + + + + T ptr; + + Rooted() ; + Rooted(const Rooted &) ; +}; + +template template +inline +Handle::Handle(const Rooted &root) +{ + testAssign(); + ptr = reinterpret_cast(root.address()); +} + +typedef Rooted RootedObject; +typedef Rooted RootedFunction; +typedef Rooted RootedString; +typedef Rooted RootedId; +typedef Rooted RootedValue; + + + + + + + +class SkipRoot +{ +# 286 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" + public: + template + SkipRoot(JSContext *cx, const T *ptr + ) + { + do { } while (0); + } + + template + SkipRoot(JSContext *cx, const T *ptr, size_t count + ) + { + do { } while (0); + } + + + + +}; +# 314 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" +inline void MaybeCheckStackRoots(JSContext *cx) {} + + +} +# 27 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 + + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 1 3 +# 39 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 3 +#define _GLIBCXX_NUMERIC_LIMITS 1 + + +# 42 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 3 +# 81 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 3 +#define __glibcxx_integral_traps true +# 90 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 3 +#define __glibcxx_float_has_denorm_loss false + + +#define __glibcxx_float_traps false + + +#define __glibcxx_float_tinyness_before false + + + + + + + +#define __glibcxx_double_has_denorm_loss false + + +#define __glibcxx_double_traps false + + +#define __glibcxx_double_tinyness_before false + + + + + + + +#define __glibcxx_long_double_has_denorm_loss false + + +#define __glibcxx_long_double_traps false + + +#define __glibcxx_long_double_tinyness_before false + + + + +#define __glibcxx_signed(T) ((T)(-1) < 0) + +#define __glibcxx_min(T) (__glibcxx_signed (T) ? (T)1 << __glibcxx_digits (T) : (T)0) + + +#define __glibcxx_max(T) (__glibcxx_signed (T) ? (((((T)1 << (__glibcxx_digits (T) - 1)) - 1) << 1) + 1) : ~(T)0) + + + +#define __glibcxx_digits(T) (sizeof(T) * __CHAR_BIT__ - __glibcxx_signed (T)) + + + +#define __glibcxx_digits10(T) (__glibcxx_digits (T) * 643 / 2136) + + +#define __glibcxx_max_digits10(T) (2 + (T) * 643 / 2136) + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + + + + + enum float_round_style + { + round_indeterminate = -1, + round_toward_zero = 0, + round_to_nearest = 1, + round_toward_infinity = 2, + round_toward_neg_infinity = 3 + }; + + + + + + + + enum float_denorm_style + { + + denorm_indeterminate = -1, + + denorm_absent = 0, + + denorm_present = 1 + }; +# 190 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 3 + struct __numeric_limits_base + { + + + static const bool is_specialized = false; + + + + + static const int digits = 0; + + static const int digits10 = 0; + + + + + + + static const bool is_signed = false; + + + static const bool is_integer = false; + + + + + static const bool is_exact = false; + + + static const int radix = 0; + + + + static const int min_exponent = 0; + + + static const int min_exponent10 = 0; + + + + static const int max_exponent = 0; + + + static const int max_exponent10 = 0; + + + static const bool has_infinity = false; + + + static const bool has_quiet_NaN = false; + + + static const bool has_signaling_NaN = false; + + static const float_denorm_style has_denorm = denorm_absent; + + + static const bool has_denorm_loss = false; + + + + static const bool is_iec559 = false; + + + + static const bool is_bounded = false; + + + + + static const bool is_modulo = false; + + + static const bool traps = false; + + static const bool tinyness_before = false; + + + + static const float_round_style round_style = round_toward_zero; + }; +# 283 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 3 + template + struct numeric_limits : public __numeric_limits_base + { + + + static _Tp min() throw() { return static_cast<_Tp>(0); } + + static _Tp max() throw() { return static_cast<_Tp>(0); } + + + + + + + + static _Tp epsilon() throw() { return static_cast<_Tp>(0); } + + static _Tp round_error() throw() { return static_cast<_Tp>(0); } + + static _Tp infinity() throw() { return static_cast<_Tp>(0); } + + + + static _Tp quiet_NaN() throw() { return static_cast<_Tp>(0); } + + + static _Tp signaling_NaN() throw() { return static_cast<_Tp>(0); } + + + + static _Tp denorm_min() throw() { return static_cast<_Tp>(0); } + }; +# 334 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 3 + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static bool min() throw() + { return false; } + static bool max() throw() + { return true; } + + + + + static const int digits = 1; + static const int digits10 = 0; + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static bool epsilon() throw() + { return false; } + static bool round_error() throw() + { return false; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static bool infinity() throw() + { return false; } + static bool quiet_NaN() throw() + { return false; } + static bool signaling_NaN() throw() + { return false; } + static bool denorm_min() throw() + { return false; } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = false; + + + + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static char min() throw() + { return (((char)(-1) < 0) ? (char)1 << (sizeof(char) * 8 - ((char)(-1) < 0)) : (char)0); } + static char max() throw() + { return (((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0); } + + + + + + static const int digits = (sizeof(char) * 8 - ((char)(-1) < 0)); + static const int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = ((char)(-1) < 0); + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static char epsilon() throw() + { return 0; } + static char round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static char infinity() throw() + { return char(); } + static char quiet_NaN() throw() + { return char(); } + static char signaling_NaN() throw() + { return char(); } + static char denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static signed char min() throw() + { return -127 - 1; } + static signed char max() throw() + { return 127; } + + + + + + static const int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0)); + static const int digits10 = ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static signed char epsilon() throw() + { return 0; } + static signed char round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static signed char infinity() throw() + { return static_cast(0); } + static signed char quiet_NaN() throw() + { return static_cast(0); } + static signed char signaling_NaN() throw() + { return static_cast(0); } + static signed char denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned char min() throw() + { return 0; } + static unsigned char max() throw() + { return 127 * 2U + 1; } + + + + + + static const int digits = (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned char epsilon() throw() + { return 0; } + static unsigned char round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned char infinity() throw() + { return static_cast(0); } + static unsigned char quiet_NaN() throw() + { return static_cast(0); } + static unsigned char signaling_NaN() throw() + { return static_cast(0); } + static unsigned char denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static wchar_t min() throw() + { return (((wchar_t)(-1) < 0) ? (wchar_t)1 << (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) : (wchar_t)0); } + static wchar_t max() throw() + { return (((wchar_t)(-1) < 0) ? (((((wchar_t)1 << ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(wchar_t)0); } + + + + + + static const int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)); + static const int digits10 = ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = ((wchar_t)(-1) < 0); + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static wchar_t epsilon() throw() + { return 0; } + static wchar_t round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static wchar_t infinity() throw() + { return wchar_t(); } + static wchar_t quiet_NaN() throw() + { return wchar_t(); } + static wchar_t signaling_NaN() throw() + { return wchar_t(); } + static wchar_t denorm_min() throw() + { return wchar_t(); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; +# 744 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 3 + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static short min() throw() + { return -32767 - 1; } + static short max() throw() + { return 32767; } + + + + + + static const int digits = (sizeof(short) * 8 - ((short)(-1) < 0)); + static const int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static short epsilon() throw() + { return 0; } + static short round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static short infinity() throw() + { return short(); } + static short quiet_NaN() throw() + { return short(); } + static short signaling_NaN() throw() + { return short(); } + static short denorm_min() throw() + { return short(); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned short min() throw() + { return 0; } + static unsigned short max() throw() + { return 32767 * 2U + 1; } + + + + + + static const int digits = (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned short epsilon() throw() + { return 0; } + static unsigned short round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned short infinity() throw() + { return static_cast(0); } + static unsigned short quiet_NaN() throw() + { return static_cast(0); } + static unsigned short signaling_NaN() throw() + { return static_cast(0); } + static unsigned short denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static int min() throw() + { return -2147483647 - 1; } + static int max() throw() + { return 2147483647; } + + + + + + static const int digits = (sizeof(int) * 8 - ((int)(-1) < 0)); + static const int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static int epsilon() throw() + { return 0; } + static int round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static int infinity() throw() + { return static_cast(0); } + static int quiet_NaN() throw() + { return static_cast(0); } + static int signaling_NaN() throw() + { return static_cast(0); } + static int denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned int min() throw() + { return 0; } + static unsigned int max() throw() + { return 2147483647 * 2U + 1; } + + + + + + static const int digits = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned int epsilon() throw() + { return 0; } + static unsigned int round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned int infinity() throw() + { return static_cast(0); } + static unsigned int quiet_NaN() throw() + { return static_cast(0); } + static unsigned int signaling_NaN() throw() + { return static_cast(0); } + static unsigned int denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static long min() throw() + { return -2147483647L - 1; } + static long max() throw() + { return 2147483647L; } + + + + + + static const int digits = (sizeof(long) * 8 - ((long)(-1) < 0)); + static const int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static long epsilon() throw() + { return 0; } + static long round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static long infinity() throw() + { return static_cast(0); } + static long quiet_NaN() throw() + { return static_cast(0); } + static long signaling_NaN() throw() + { return static_cast(0); } + static long denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned long min() throw() + { return 0; } + static unsigned long max() throw() + { return 2147483647L * 2UL + 1; } + + + + + + static const int digits = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned long epsilon() throw() + { return 0; } + static unsigned long round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned long infinity() throw() + { return static_cast(0); } + static unsigned long quiet_NaN() throw() + { return static_cast(0); } + static unsigned long signaling_NaN() throw() + { return static_cast(0); } + static unsigned long denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static long long min() throw() + { return -9223372036854775807LL - 1; } + static long long max() throw() + { return 9223372036854775807LL; } + + + + + + static const int digits = (sizeof(long long) * 8 - ((long long)(-1) < 0)); + static const int digits10 = ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static long long epsilon() throw() + { return 0; } + static long long round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static long long infinity() throw() + { return static_cast(0); } + static long long quiet_NaN() throw() + { return static_cast(0); } + static long long signaling_NaN() throw() + { return static_cast(0); } + static long long denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned long long min() throw() + { return 0; } + static unsigned long long max() throw() + { return 9223372036854775807LL * 2ULL + 1; } + + + + + + static const int digits = (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned long long epsilon() throw() + { return 0; } + static unsigned long long round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned long long infinity() throw() + { return static_cast(0); } + static unsigned long long quiet_NaN() throw() + { return static_cast(0); } + static unsigned long long signaling_NaN() throw() + { return static_cast(0); } + static unsigned long long denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static float min() throw() + { return 1.1754943508222875e-38F; } + static float max() throw() + { return 3.4028234663852886e+38F; } + + + + + + static const int digits = 24; + static const int digits10 = 6; + + + + + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 2; + static float epsilon() throw() + { return 1.1920928955078125e-7F; } + static float round_error() throw() + { return 0.5F; } + + static const int min_exponent = (-125); + static const int min_exponent10 = (-37); + static const int max_exponent = 128; + static const int max_exponent10 = 38; + + static const bool has_infinity = 1; + static const bool has_quiet_NaN = 1; + static const bool has_signaling_NaN = has_quiet_NaN; + static const float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static const bool has_denorm_loss = false; + + static float infinity() throw() + { return __builtin_huge_valf (); } + static float quiet_NaN() throw() + { return __builtin_nanf (""); } + static float signaling_NaN() throw() + { return __builtin_nansf (""); } + static float denorm_min() throw() + { return 1.4012984643248171e-45F; } + + static const bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_to_nearest; + }; + +#undef __glibcxx_float_has_denorm_loss +#undef __glibcxx_float_traps +#undef __glibcxx_float_tinyness_before + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static double min() throw() + { return ((double)2.2250738585072014e-308L); } + static double max() throw() + { return ((double)1.7976931348623157e+308L); } + + + + + + static const int digits = 53; + static const int digits10 = 15; + + + + + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 2; + static double epsilon() throw() + { return ((double)2.2204460492503131e-16L); } + static double round_error() throw() + { return 0.5; } + + static const int min_exponent = (-1021); + static const int min_exponent10 = (-307); + static const int max_exponent = 1024; + static const int max_exponent10 = 308; + + static const bool has_infinity = 1; + static const bool has_quiet_NaN = 1; + static const bool has_signaling_NaN = has_quiet_NaN; + static const float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static const bool has_denorm_loss = false; + + static double infinity() throw() + { return __builtin_huge_val(); } + static double quiet_NaN() throw() + { return __builtin_nan (""); } + static double signaling_NaN() throw() + { return __builtin_nans (""); } + static double denorm_min() throw() + { return ((double)4.9406564584124654e-324L); } + + static const bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_to_nearest; + }; + +#undef __glibcxx_double_has_denorm_loss +#undef __glibcxx_double_traps +#undef __glibcxx_double_tinyness_before + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static long double min() throw() + { return 2.2250738585072014e-308L; } + static long double max() throw() + { return 1.7976931348623157e+308L; } + + + + + + static const int digits = 53; + static const int digits10 = 15; + + + + + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 2; + static long double epsilon() throw() + { return 2.2204460492503131e-16L; } + static long double round_error() throw() + { return 0.5L; } + + static const int min_exponent = (-1021); + static const int min_exponent10 = (-307); + static const int max_exponent = 1024; + static const int max_exponent10 = 308; + + static const bool has_infinity = 1; + static const bool has_quiet_NaN = 1; + static const bool has_signaling_NaN = has_quiet_NaN; + static const float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static const bool has_denorm_loss + = false; + + static long double infinity() throw() + { return __builtin_huge_vall (); } + static long double quiet_NaN() throw() + { return __builtin_nanl (""); } + static long double signaling_NaN() throw() + { return __builtin_nansl (""); } + static long double denorm_min() throw() + { return 4.9406564584124654e-324L; } + + static const bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_to_nearest; + }; + +#undef __glibcxx_long_double_has_denorm_loss +#undef __glibcxx_long_double_traps +#undef __glibcxx_long_double_tinyness_before + +} + +#undef __glibcxx_signed +#undef __glibcxx_min +#undef __glibcxx_max +#undef __glibcxx_digits +#undef __glibcxx_digits10 +#undef __glibcxx_max_digits10 +# 30 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsalloc.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsalloc.h" +#define jsalloc_h_ + + + + +namespace js { +# 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsalloc.h" +class SystemAllocPolicy +{ + public: + void *malloc_(size_t bytes) { return js_malloc(bytes); } + void *realloc_(void *p, size_t oldBytes, size_t bytes) { return js_realloc(p, bytes); } + void free_(void *p) { js_free(p); } + void reportAllocOverflow() const {} +}; +# 50 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsalloc.h" +class TempAllocPolicy +{ + JSContext *const cx; + + + + + + __attribute__((visibility("default"))) void * onOutOfMemory(void *p, size_t nbytes); + + public: + TempAllocPolicy(JSContext *cx) : cx(cx) {} + + JSContext *context() const { + return cx; + } + + void *malloc_(size_t bytes) { + void *p = js_malloc(bytes); + if ((__builtin_expect((!p), 0))) + p = onOutOfMemory(__null, bytes); + return p; + } + + void *realloc_(void *p, size_t oldBytes, size_t bytes) { + void *p2 = js_realloc(p, bytes); + if ((__builtin_expect((!p2), 0))) + p2 = onOutOfMemory(p2, bytes); + return p2; + } + + void free_(void *p) { + js_free(p); + } + + __attribute__((visibility("default"))) void reportAllocOverflow() const; +}; + +} +# 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 +# 1 "./../../dist/include/js/Vector.h" 1 +# 9 "./../../dist/include/js/Vector.h" +#define jsvector_h_ + + + +# 1 "./../../dist/include/js/TemplateLib.h" 1 +# 9 "./../../dist/include/js/TemplateLib.h" +#define js_template_lib_h__ +# 20 "./../../dist/include/js/TemplateLib.h" +namespace js { +namespace tl { + + +template struct Min { + static const size_t result = i < j ? i : j; +}; +template struct Max { + static const size_t result = i > j ? i : j; +}; +template struct Clamp { + static const size_t result = i < min ? min : (i > max ? max : i); +}; + + +template struct Pow { + static const size_t result = x * Pow::result; +}; +template struct Pow { + static const size_t result = 1; +}; + + +template struct FloorLog2 { + static const size_t result = 1 + FloorLog2::result; +}; +template <> struct FloorLog2<0> { }; +template <> struct FloorLog2<1> { static const size_t result = 0; }; + + +template struct CeilingLog2 { + static const size_t result = FloorLog2<2 * i - 1>::result; +}; + + +template struct RoundUpPow2 { + static const size_t result = size_t(1) << CeilingLog2::result; +}; +template <> struct RoundUpPow2<0> { + static const size_t result = 1; +}; + + +template struct BitSize { + static const size_t result = sizeof(T) * 8; +}; + + +template struct StaticAssert {}; +template <> struct StaticAssert { typedef int result; }; + + +template struct IsSameType { + static const bool result = false; +}; +template struct IsSameType { + static const bool result = true; +}; + + + + + +template struct NBitMask { + typedef typename StaticAssert::result>::result _; + static const size_t result = (size_t(1) << N) - 1; +}; +template <> struct NBitMask::result> { + static const size_t result = size_t(-1); +}; + + + + + +template struct MulOverflowMask { + static const size_t result = + ~NBitMask::result - CeilingLog2::result>::result; +}; +template <> struct MulOverflowMask<0> { }; +template <> struct MulOverflowMask<1> { static const size_t result = 0; }; + + + + + + +template struct UnsafeRangeSizeMask { + + + + + static const size_t result = MulOverflowMask<2 * sizeof(T)>::result; +}; + + +template struct StripConst { typedef T result; }; +template struct StripConst { typedef T result; }; + + + + + +template struct IsPodType { static const bool result = false; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template struct IsPodType { static const bool result = true; }; + +template struct If { static const T result = v1; }; +template struct If { static const T result = v2; }; + + + + +template struct IsRelocatableHeapType { static const bool result = true; }; + +} +} +# 14 "./../../dist/include/js/Vector.h" 2 +# 1 "./../../dist/include/js/Utility.h" 1 +# 15 "./../../dist/include/js/Vector.h" 2 + + + + + + + +namespace js { + +class TempAllocPolicy; + +template +class Vector; + + + + + +template +struct VectorImpl +{ + + static inline void destroy(T *begin, T *end) { + for (T *p = begin; p != end; ++p) + p->~T(); + } + + + static inline void initialize(T *begin, T *end) { + for (T *p = begin; p != end; ++p) + new(p) T(); + } + + + + + + template + static inline void copyConstruct(T *dst, const U *srcbeg, const U *srcend) { + for (const U *p = srcbeg; p != srcend; ++p, ++dst) + new(dst) T(*p); + } + + + + + + template + static inline void moveConstruct(T *dst, const U *srcbeg, const U *srcend) { + for (const U *p = srcbeg; p != srcend; ++p, ++dst) + new(dst) T(Move(*p)); + } + + + + + + template + static inline void copyConstructN(T *dst, size_t n, const U &u) { + for (T *end = dst + n; dst != end; ++dst) + new(dst) T(u); + } + + + + + + + + static inline bool growTo(Vector &v, size_t newcap) { + do { } while(0); + T *newbuf = reinterpret_cast(v.malloc_(newcap * sizeof(T))); + if (!newbuf) + return false; + for (T *dst = newbuf, *src = v.beginNoCheck(); src != v.endNoCheck(); ++dst, ++src) + new(dst) T(Move(*src)); + VectorImpl::destroy(v.beginNoCheck(), v.endNoCheck()); + v.free_(v.mBegin); + v.mBegin = newbuf; + + v.mCapacity = newcap; + return true; + } +}; + + + + + + +template +struct VectorImpl +{ + static inline void destroy(T *, T *) {} + + static inline void initialize(T *begin, T *end) { +# 121 "./../../dist/include/js/Vector.h" + for (T *p = begin; p != end; ++p) + new(p) T(); + } + + template + static inline void copyConstruct(T *dst, const U *srcbeg, const U *srcend) { + + + + + + + + for (const U *p = srcbeg; p != srcend; ++p, ++dst) + *dst = *p; + } + + template + static inline void moveConstruct(T *dst, const U *srcbeg, const U *srcend) { + copyConstruct(dst, srcbeg, srcend); + } + + static inline void copyConstructN(T *dst, size_t n, const T &t) { + for (T *p = dst, *end = dst + n; p != end; ++p) + *p = t; + } + + static inline bool growTo(Vector &v, size_t newcap) { + do { } while(0); + size_t bytes = sizeof(T) * newcap; + size_t oldBytes = sizeof(T) * v.mCapacity; + T *newbuf = reinterpret_cast(v.realloc_(v.mBegin, oldBytes, bytes)); + if (!newbuf) + return false; + v.mBegin = newbuf; + + v.mCapacity = newcap; + return true; + } +}; +# 180 "./../../dist/include/js/Vector.h" +template +class Vector : private AllocPolicy +{ + typedef typename tl::StaticAssert::result>::result _; + + + + static const bool sElemIsPod = tl::IsPodType::result; + typedef VectorImpl Impl; + friend struct VectorImpl; + + bool calculateNewCapacity(size_t curLength, size_t lengthInc, size_t &newCap); + bool growStorageBy(size_t lengthInc); + bool growHeapStorageBy(size_t lengthInc); + bool convertToHeapStorage(size_t lengthInc); + + template inline bool growByImpl(size_t inc); + + + + static const int sMaxInlineBytes = 1024; +# 213 "./../../dist/include/js/Vector.h" + template + struct ElemSize { + static const size_t result = sizeof(T); + }; + template + struct ElemSize<0, Dummy> { + static const size_t result = 1; + }; + + static const size_t sInlineCapacity = + tl::Min::result>::result; + + + static const size_t sInlineBytes = + tl::Max<1, sInlineCapacity * ElemSize::result>::result; +# 238 "./../../dist/include/js/Vector.h" + T *mBegin; + size_t mLength; + size_t mCapacity; + + + + + AlignedStorage storage; + + + + + + + Vector(const Vector &) ; + Vector &operator=(const Vector &) ; + + + + bool usingInlineStorage() const { + return mBegin == (T *)storage.addr(); + } + + T *beginNoCheck() const { + return mBegin; + } + + T *endNoCheck() { + return mBegin + mLength; + } + + const T *endNoCheck() const { + return mBegin + mLength; + } +# 282 "./../../dist/include/js/Vector.h" + template void internalAppend(U t); + void internalAppendN(const T &t, size_t n); + template void internalAppend(const U *begin, size_t length); + template void internalAppend(const Vector &other); + + public: + static const size_t sMaxInlineStorage = N; + + typedef T ElementType; + + Vector(AllocPolicy = AllocPolicy()); + Vector(MoveRef); + Vector &operator=(MoveRef); + ~Vector(); + + + + const AllocPolicy &allocPolicy() const { + return *this; + } + + AllocPolicy &allocPolicy() { + return *this; + } + + enum { InlineLength = N }; + + size_t length() const { + return mLength; + } + + bool empty() const { + return mLength == 0; + } + + size_t capacity() const { + return mCapacity; + } + + T *begin() { + do { } while(0); + return mBegin; + } + + const T *begin() const { + do { } while(0); + return mBegin; + } + + T *end() { + do { } while(0); + return mBegin + mLength; + } + + const T *end() const { + do { } while(0); + return mBegin + mLength; + } + + T &operator[](size_t i) { + do { } while(0); + return begin()[i]; + } + + const T &operator[](size_t i) const { + do { } while(0); + return begin()[i]; + } + + T &back() { + do { } while(0); + return *(end() - 1); + } + + const T &back() const { + do { } while(0); + return *(end() - 1); + } + + class Range { + friend class Vector; + T *cur, *end; + Range(T *cur, T *end) : cur(cur), end(end) {} + public: + Range() {} + bool empty() const { return cur == end; } + size_t remain() const { return end - cur; } + T &front() const { return *cur; } + void popFront() { do { } while(0); ++cur; } + T popCopyFront() { do { } while(0); return *cur++; } + }; + + Range all() { + return Range(begin(), end()); + } + + + + + bool reserve(size_t capacity); + + + + + + void shrinkBy(size_t incr); + + + bool growBy(size_t incr); + + + bool resize(size_t newLength); + + + bool growByUninitialized(size_t incr); + bool resizeUninitialized(size_t newLength); + + + void clear(); + + + void clearAndFree(); +# 413 "./../../dist/include/js/Vector.h" + template bool append(U t); + bool appendN(const T &t, size_t n); + template bool append(const U *begin, const U *end); + template bool append(const U *begin, size_t length); + template bool append(const Vector &other); + + + + + + void infallibleAppend(const T &t) { + internalAppend(t); + } + void infallibleAppendN(const T &t, size_t n) { + internalAppendN(t, n); + } + template void infallibleAppend(const U *begin, const U *end) { + internalAppend(begin, PointerRangeSize(begin, end)); + } + template void infallibleAppend(const U *begin, size_t length) { + internalAppend(begin, length); + } + template void infallibleAppend(const Vector &other) { + internalAppend(other); + } + + void popBack(); + + T popCopy(); +# 451 "./../../dist/include/js/Vector.h" + T *extractRawBuffer(); + + + + + + + void replaceRawBuffer(T *p, size_t length); + + + + + + bool insert(T *p, const T &val); + + + + + + void erase(T *t); + + + + + size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const; + + + + + + size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const; +}; + + +#define REENTRANCY_GUARD_ET_AL ReentrancyGuard g(*this); JS_ASSERT_IF(usingInlineStorage(), mCapacity == sInlineCapacity); JS_ASSERT(reserved() <= mCapacity); JS_ASSERT(mLength <= reserved()); JS_ASSERT(mLength <= mCapacity) +# 494 "./../../dist/include/js/Vector.h" +template +__attribute__((always_inline)) inline +Vector::Vector(AllocPolicy ap) + : AllocPolicy(ap), mBegin((T *)storage.addr()), mLength(0), + mCapacity(sInlineCapacity) + + + +{} + + +template +__attribute__((always_inline)) inline +Vector::Vector(MoveRef rhs) + : AllocPolicy(rhs) +{ + mLength = rhs->mLength; + mCapacity = rhs->mCapacity; + + + + + if (rhs->usingInlineStorage()) { + + mBegin = (T *)storage.addr(); + Impl::moveConstruct(mBegin, rhs->beginNoCheck(), rhs->endNoCheck()); + + + + + } else { + + + + + mBegin = rhs->mBegin; + rhs->mBegin = (T *) rhs->storage.addr(); + rhs->mCapacity = sInlineCapacity; + rhs->mLength = 0; + + + + } +} + + +template +__attribute__((always_inline)) inline +Vector & +Vector::operator=(MoveRef rhs) +{ + this->~Vector(); + new(this) Vector(rhs); + return *this; +} + +template +__attribute__((always_inline)) inline +Vector::~Vector() +{ + ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); + Impl::destroy(beginNoCheck(), endNoCheck()); + if (!usingInlineStorage()) + this->free_(beginNoCheck()); +} + + + + + +template + +inline bool +Vector::calculateNewCapacity(size_t curLength, size_t lengthInc, + size_t &newCap) +{ + size_t newMinCap = curLength + lengthInc; + + + + + + if (newMinCap < curLength || + newMinCap & tl::MulOverflowMask<2 * sizeof(T)>::result) { + this->reportAllocOverflow(); + return false; + } + + + newCap = RoundUpPow2(newMinCap); + + + + + + if (newCap & tl::UnsafeRangeSizeMask::result) { + this->reportAllocOverflow(); + return false; + } + return true; +} + + + + + +template +__attribute__((always_inline)) inline bool +Vector::growHeapStorageBy(size_t lengthInc) +{ + do { } while(0); + size_t newCap; + return calculateNewCapacity(mLength, lengthInc, newCap) && + Impl::growTo(*this, newCap); +} + + + + + + +template +inline bool +Vector::convertToHeapStorage(size_t lengthInc) +{ + do { } while(0); + size_t newCap; + if (!calculateNewCapacity(mLength, lengthInc, newCap)) + return false; + + + T *newBuf = reinterpret_cast(this->malloc_(newCap * sizeof(T))); + if (!newBuf) + return false; + + + Impl::moveConstruct(newBuf, beginNoCheck(), endNoCheck()); + Impl::destroy(beginNoCheck(), endNoCheck()); + + + mBegin = newBuf; + + mCapacity = newCap; + return true; +} + +template +__attribute__((noinline)) bool +Vector::growStorageBy(size_t incr) +{ + do { } while(0); + return usingInlineStorage() + ? convertToHeapStorage(incr) + : growHeapStorageBy(incr); +} + +template +inline bool +Vector::reserve(size_t request) +{ + ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); + if (request > mCapacity && !growStorageBy(request - mLength)) + return false; + + + + + + + + return true; +} + +template +inline void +Vector::shrinkBy(size_t incr) +{ + ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); + do { } while(0); + Impl::destroy(endNoCheck() - incr, endNoCheck()); + mLength -= incr; +} + +template +template +__attribute__((always_inline)) inline bool +Vector::growByImpl(size_t incr) +{ + ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); + if (incr > mCapacity - mLength && !growStorageBy(incr)) + return false; + + do { } while(0); + T *newend = endNoCheck() + incr; + if (InitNewElems) + Impl::initialize(endNoCheck(), newend); + mLength += incr; + + + + + return true; +} + +template +__attribute__((always_inline)) inline bool +Vector::growBy(size_t incr) +{ + return growByImpl(incr); +} + +template +__attribute__((always_inline)) inline bool +Vector::growByUninitialized(size_t incr) +{ + return growByImpl(incr); +} + +template + +inline bool +Vector::resize(size_t newLength) +{ + size_t curLength = mLength; + if (newLength > curLength) + return growBy(newLength - curLength); + shrinkBy(curLength - newLength); + return true; +} + +template +__attribute__((always_inline)) inline bool +Vector::resizeUninitialized(size_t newLength) +{ + size_t curLength = mLength; + if (newLength > curLength) + return growByUninitialized(newLength - curLength); + shrinkBy(curLength - newLength); + return true; +} + +template +inline void +Vector::clear() +{ + ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); + Impl::destroy(beginNoCheck(), endNoCheck()); + mLength = 0; +} + +template +inline void +Vector::clearAndFree() +{ + clear(); + + if (usingInlineStorage()) + return; + + this->free_(beginNoCheck()); + mBegin = (T *)storage.addr(); + mCapacity = sInlineCapacity; + + + +} + +template +template +__attribute__((always_inline)) inline bool +Vector::append(U t) +{ + ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); + if (mLength == mCapacity && !growStorageBy(1)) + return false; + + + + + + internalAppend(t); + return true; +} + +template +template +__attribute__((always_inline)) inline void +Vector::internalAppend(U t) +{ + do { } while(0); + do { } while(0); + new(endNoCheck()) T(t); + ++mLength; +} + +template +__attribute__((always_inline)) inline bool +Vector::appendN(const T &t, size_t needed) +{ + ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); + if (mLength + needed > mCapacity && !growStorageBy(needed)) + return false; + + + + + + internalAppendN(t, needed); + return true; +} + +template +__attribute__((always_inline)) inline void +Vector::internalAppendN(const T &t, size_t needed) +{ + do { } while(0); + do { } while(0); + Impl::copyConstructN(endNoCheck(), needed, t); + mLength += needed; +} + +template +inline bool +Vector::insert(T *p, const T &val) +{ + do { } while(0); + size_t pos = p - begin(); + do { } while(0); + size_t oldLength = mLength; + if (pos == oldLength) + return append(val); + { + T oldBack = back(); + if (!append(oldBack)) + return false; + } + for (size_t i = oldLength; i > pos; --i) + (*this)[i] = (*this)[i - 1]; + (*this)[pos] = val; + return true; +} + +template +inline void +Vector::erase(T *it) +{ + do { } while(0); + while (it + 1 != end()) { + *it = *(it + 1); + ++it; + } + popBack(); +} + +template +template +__attribute__((always_inline)) inline bool +Vector::append(const U *insBegin, const U *insEnd) +{ + ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); + size_t needed = PointerRangeSize(insBegin, insEnd); + if (mLength + needed > mCapacity && !growStorageBy(needed)) + return false; + + + + + + internalAppend(insBegin, needed); + return true; +} + +template +template +__attribute__((always_inline)) inline void +Vector::internalAppend(const U *insBegin, size_t length) +{ + do { } while(0); + do { } while(0); + Impl::copyConstruct(endNoCheck(), insBegin, insBegin + length); + mLength += length; +} + +template +template +inline bool +Vector::append(const Vector &other) +{ + return append(other.begin(), other.end()); +} + +template +template +inline void +Vector::internalAppend(const Vector &other) +{ + internalAppend(other.begin(), other.length()); +} + +template +template +__attribute__((always_inline)) inline bool +Vector::append(const U *insBegin, size_t length) +{ + return this->append(insBegin, insBegin + length); +} + +template +__attribute__((always_inline)) inline void +Vector::popBack() +{ + ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); + do { } while(0); + --mLength; + endNoCheck()->~T(); +} + +template +__attribute__((always_inline)) inline T +Vector::popCopy() +{ + T ret = back(); + popBack(); + return ret; +} + +template +inline T * +Vector::extractRawBuffer() +{ + T *ret; + if (usingInlineStorage()) { + ret = reinterpret_cast(this->malloc_(mLength * sizeof(T))); + if (!ret) + return __null; + Impl::copyConstruct(ret, beginNoCheck(), endNoCheck()); + Impl::destroy(beginNoCheck(), endNoCheck()); + + mLength = 0; + } else { + ret = mBegin; + mBegin = (T *)storage.addr(); + mLength = 0; + mCapacity = sInlineCapacity; + + + + } + return ret; +} + +template +inline void +Vector::replaceRawBuffer(T *p, size_t length) +{ + ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); + + + Impl::destroy(beginNoCheck(), endNoCheck()); + if (!usingInlineStorage()) + this->free_(beginNoCheck()); + + + if (length <= sInlineCapacity) { + + + + + + mBegin = (T *)storage.addr(); + mLength = length; + mCapacity = sInlineCapacity; + Impl::moveConstruct(mBegin, p, p + length); + Impl::destroy(p, p + length); + this->free_(p); + } else { + mBegin = p; + mLength = length; + mCapacity = length; + } + + + +} + +template +inline size_t +Vector::sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const +{ + return usingInlineStorage() ? 0 : mallocSizeOf(beginNoCheck()); +} + +template +inline size_t +Vector::sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const +{ + return mallocSizeOf(this) + sizeOfExcludingThis(mallocSizeOf); +} + +} +# 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 + + + + + +#define JSVAL_INT_BITS 32 +#define JSVAL_INT_MIN ((int32_t)0x80000000) +#define JSVAL_INT_MAX ((int32_t)0x7fffffff) + + + +#define JS_Assert MOZ_Assert + + +namespace JS { +# 109 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +template class AnchorPermitted; +template<> class AnchorPermitted { }; +template<> class AnchorPermitted { }; +template<> class AnchorPermitted { }; +template<> class AnchorPermitted { }; +template<> class AnchorPermitted { }; +template<> class AnchorPermitted { }; +template<> class AnchorPermitted { }; +template<> class AnchorPermitted { }; +template<> class AnchorPermitted { }; + +template +class Anchor: AnchorPermitted +{ + public: + Anchor() { } + explicit Anchor(T t) { hold = t; } + inline ~Anchor(); + T &get() { return hold; } + const T &get() const { return hold; } + void set(const T &t) { hold = t; } + void operator=(const T &t) { hold = t; } + void clear() { hold = 0; } + private: + T hold; + Anchor(const Anchor &) ; + const Anchor &operator=(const Anchor &) ; +}; + + +template +inline Anchor::~Anchor() +{ +# 153 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" + asm volatile("":: "g" (hold) : "memory"); +} +# 222 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +class Value +{ + public: + + + + + + + + __attribute__((always_inline)) inline + void setNull() { + data.asBits = BUILD_JSVAL(JSVAL_TAG_NULL, 0).asBits; + } + + __attribute__((always_inline)) inline + void setUndefined() { + data.asBits = BUILD_JSVAL(JSVAL_TAG_UNDEFINED, 0).asBits; + } + + __attribute__((always_inline)) inline + void setInt32(int32_t i) { + data = INT32_TO_JSVAL_IMPL(i); + } + + __attribute__((always_inline)) inline + int32_t &getInt32Ref() { + do { } while(0); + return data.s.payload.i32; + } + + __attribute__((always_inline)) inline + void setDouble(double d) { + data = DOUBLE_TO_JSVAL_IMPL(d); + } + + __attribute__((always_inline)) inline + double &getDoubleRef() { + do { } while(0); + return data.asDouble; + } + + __attribute__((always_inline)) inline + void setString(JSString *str) { + do { } while(0); + data = STRING_TO_JSVAL_IMPL(str); + } + + __attribute__((always_inline)) inline + void setString(const JS::Anchor &str) { + setString(str.get()); + } + + __attribute__((always_inline)) inline + void setObject(JSObject &obj) { + do { } while(0); + data = OBJECT_TO_JSVAL_IMPL(&obj); + } + + __attribute__((always_inline)) inline + void setBoolean(bool b) { + data = BOOLEAN_TO_JSVAL_IMPL(b); + } + + __attribute__((always_inline)) inline + void setMagic(JSWhyMagic why) { + data = MAGIC_TO_JSVAL_IMPL(why); + } + + __attribute__((always_inline)) inline + bool setNumber(uint32_t ui) { + if (ui > ((int32_t)0x7fffffff)) { + setDouble((double)ui); + return false; + } else { + setInt32((int32_t)ui); + return true; + } + } + + __attribute__((always_inline)) inline + bool setNumber(double d) { + int32_t i; + if (MOZ_DOUBLE_IS_INT32(d, &i)) { + setInt32(i); + return true; + } else { + setDouble(d); + return false; + } + } + + __attribute__((always_inline)) inline + void setObjectOrNull(JSObject *arg) { + if (arg) + setObject(*arg); + else + setNull(); + } + + __attribute__((always_inline)) inline + void swap(Value &rhs) { + uint64_t tmp = rhs.data.asBits; + rhs.data.asBits = data.asBits; + data.asBits = tmp; + } + + + + __attribute__((always_inline)) inline + bool isUndefined() const { + return JSVAL_IS_UNDEFINED_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isNull() const { + return JSVAL_IS_NULL_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isNullOrUndefined() const { + return isNull() || isUndefined(); + } + + __attribute__((always_inline)) inline + bool isInt32() const { + return JSVAL_IS_INT32_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isInt32(int32_t i32) const { + return JSVAL_IS_SPECIFIC_INT32_IMPL(data, i32); + } + + __attribute__((always_inline)) inline + bool isDouble() const { + return JSVAL_IS_DOUBLE_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isNumber() const { + return JSVAL_IS_NUMBER_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isString() const { + return JSVAL_IS_STRING_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isObject() const { + return JSVAL_IS_OBJECT_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isPrimitive() const { + return JSVAL_IS_PRIMITIVE_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isObjectOrNull() const { + return JSVAL_IS_OBJECT_OR_NULL_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isGCThing() const { + return JSVAL_IS_GCTHING_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isBoolean() const { + return JSVAL_IS_BOOLEAN_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isTrue() const { + return JSVAL_IS_SPECIFIC_BOOLEAN(data, true); + } + + __attribute__((always_inline)) inline + bool isFalse() const { + return JSVAL_IS_SPECIFIC_BOOLEAN(data, false); + } + + __attribute__((always_inline)) inline + bool isMagic() const { + return JSVAL_IS_MAGIC_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isMagic(JSWhyMagic why) const { + do { } while (0); + return JSVAL_IS_MAGIC_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isMarkable() const { + return JSVAL_IS_TRACEABLE_IMPL(data); + } + + __attribute__((always_inline)) inline + JSGCTraceKind gcKind() const { + do { } while(0); + return JSGCTraceKind(JSVAL_TRACE_KIND_IMPL(data)); + } + + __attribute__((always_inline)) inline + JSWhyMagic whyMagic() const { + do { } while(0); + return data.s.payload.why; + } + + + + __attribute__((always_inline)) inline + bool operator==(const Value &rhs) const { + return data.asBits == rhs.data.asBits; + } + + __attribute__((always_inline)) inline + bool operator!=(const Value &rhs) const { + return data.asBits != rhs.data.asBits; + } + + friend inline bool SameType(const Value &lhs, const Value &rhs); + + + + __attribute__((always_inline)) inline + int32_t toInt32() const { + do { } while(0); + return JSVAL_TO_INT32_IMPL(data); + } + + __attribute__((always_inline)) inline + double toDouble() const { + do { } while(0); + return data.asDouble; + } + + __attribute__((always_inline)) inline + double toNumber() const { + do { } while(0); + return isDouble() ? toDouble() : double(toInt32()); + } + + __attribute__((always_inline)) inline + JSString *toString() const { + do { } while(0); + return JSVAL_TO_STRING_IMPL(data); + } + + __attribute__((always_inline)) inline + JSObject &toObject() const { + do { } while(0); + return *JSVAL_TO_OBJECT_IMPL(data); + } + + __attribute__((always_inline)) inline + JSObject *toObjectOrNull() const { + do { } while(0); + return JSVAL_TO_OBJECT_IMPL(data); + } + + __attribute__((always_inline)) inline + void *toGCThing() const { + do { } while(0); + return JSVAL_TO_GCTHING_IMPL(data); + } + + __attribute__((always_inline)) inline + bool toBoolean() const { + do { } while(0); + return JSVAL_TO_BOOLEAN_IMPL(data); + } + + __attribute__((always_inline)) inline + uint32_t payloadAsRawUint32() const { + do { } while(0); + return data.s.payload.u32; + } + + __attribute__((always_inline)) inline + uint64_t asRawBits() const { + return data.asBits; + } + + __attribute__((always_inline)) inline + JSValueType extractNonDoubleType() const { + return JSVAL_EXTRACT_NON_DOUBLE_TYPE_IMPL(data); + } +# 523 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" + __attribute__((always_inline)) inline + void setPrivate(void *ptr) { + data = PRIVATE_PTR_TO_JSVAL_IMPL(ptr); + } + + __attribute__((always_inline)) inline + void *toPrivate() const { + do { } while(0); + return JSVAL_TO_PRIVATE_PTR_IMPL(data); + } + + __attribute__((always_inline)) inline + void setPrivateUint32(uint32_t ui) { + data = PRIVATE_UINT32_TO_JSVAL_IMPL(ui); + } + + __attribute__((always_inline)) inline + uint32_t toPrivateUint32() const { + do { } while(0); + return JSVAL_TO_PRIVATE_UINT32_IMPL(data); + } + + __attribute__((always_inline)) inline + uint32_t &getPrivateUint32Ref() { + do { } while(0); + return data.s.payload.u32; + } + + + + + + + + __attribute__((always_inline)) inline + void setUnmarkedPtr(void *ptr) { + data.asPtr = ptr; + } + + __attribute__((always_inline)) inline + void *toUnmarkedPtr() const { + return data.asPtr; + } + + const size_t *payloadWord() const { + + return &data.s.payload.word; + + + + } + + const uintptr_t *payloadUIntPtr() const { + + return &data.s.payload.uintptr; + + + + } + + + + + + + + private: + + + jsval_layout data; + + private: + void staticAssertions() { + typedef int moz_static_assert8[(sizeof(JSValueType) == 1) ? 1 : -1]; + typedef int moz_static_assert9[(sizeof(JSValueTag) == 4) ? 1 : -1]; + typedef int moz_static_assert10[(sizeof(JSBool) == 4) ? 1 : -1]; + typedef int moz_static_assert11[(sizeof(JSWhyMagic) <= 4) ? 1 : -1]; + typedef int moz_static_assert12[(sizeof(Value) == 8) ? 1 : -1]; + } + + friend jsval_layout (::JSVAL_TO_IMPL)(Value); + friend Value (::IMPL_TO_JSVAL)(jsval_layout l); +}; + +inline bool +IsPoisonedValue(const Value &v) +{ + if (v.isString()) + return IsPoisonedPtr(v.toString()); + if (v.isObject()) + return IsPoisonedPtr(&v.toObject()); + return false; +} + + + +static __attribute__((always_inline)) inline Value +NullValue() +{ + Value v; + v.setNull(); + return v; +} + +static __attribute__((always_inline)) inline Value +UndefinedValue() +{ + Value v; + v.setUndefined(); + return v; +} + +static __attribute__((always_inline)) inline Value +Int32Value(int32_t i32) +{ + Value v; + v.setInt32(i32); + return v; +} + +static __attribute__((always_inline)) inline Value +DoubleValue(double dbl) +{ + Value v; + v.setDouble(dbl); + return v; +} + +static __attribute__((always_inline)) inline Value +StringValue(JSString *str) +{ + Value v; + v.setString(str); + return v; +} + +static __attribute__((always_inline)) inline Value +BooleanValue(bool boo) +{ + Value v; + v.setBoolean(boo); + return v; +} + +static __attribute__((always_inline)) inline Value +ObjectValue(JSObject &obj) +{ + Value v; + v.setObject(obj); + return v; +} + +static __attribute__((always_inline)) inline Value +MagicValue(JSWhyMagic why) +{ + Value v; + v.setMagic(why); + return v; +} + +static __attribute__((always_inline)) inline Value +NumberValue(float f) +{ + Value v; + v.setNumber(f); + return v; +} + +static __attribute__((always_inline)) inline Value +NumberValue(double dbl) +{ + Value v; + v.setNumber(dbl); + return v; +} + +static __attribute__((always_inline)) inline Value +NumberValue(int8_t i) +{ + return Int32Value(i); +} + +static __attribute__((always_inline)) inline Value +NumberValue(uint8_t i) +{ + return Int32Value(i); +} + +static __attribute__((always_inline)) inline Value +NumberValue(int16_t i) +{ + return Int32Value(i); +} + +static __attribute__((always_inline)) inline Value +NumberValue(uint16_t i) +{ + return Int32Value(i); +} + +static __attribute__((always_inline)) inline Value +NumberValue(int32_t i) +{ + return Int32Value(i); +} + +static __attribute__((always_inline)) inline Value +NumberValue(uint32_t i) +{ + Value v; + v.setNumber(i); + return v; +} + +namespace detail { + +template +class MakeNumberValue +{ + public: + template + static inline Value create(const T t) + { + Value v; + if (((int32_t)0x80000000) <= t && t <= ((int32_t)0x7fffffff)) + v.setInt32(int32_t(t)); + else + v.setDouble(double(t)); + return v; + } +}; + +template <> +class MakeNumberValue +{ + public: + template + static inline Value create(const T t) + { + Value v; + if (t <= ((int32_t)0x7fffffff)) + v.setInt32(int32_t(t)); + else + v.setDouble(double(t)); + return v; + } +}; + +} + +template +static __attribute__((always_inline)) inline Value +NumberValue(const T t) +{ + do { } while(0); + return detail::MakeNumberValue::is_signed>::create(t); +} + +static __attribute__((always_inline)) inline Value +ObjectOrNullValue(JSObject *obj) +{ + Value v; + v.setObjectOrNull(obj); + return v; +} + +static __attribute__((always_inline)) inline Value +PrivateValue(void *ptr) +{ + Value v; + v.setPrivate(ptr); + return v; +} + +static __attribute__((always_inline)) inline Value +PrivateUint32Value(uint32_t ui) +{ + Value v; + v.setPrivateUint32(ui); + return v; +} + +__attribute__((always_inline)) inline bool +SameType(const Value &lhs, const Value &rhs) +{ + return JSVAL_SAME_TYPE_IMPL(lhs.data, rhs.data); +} + +template <> struct RootMethods +{ + static Value initial() { return UndefinedValue(); } + static ThingRootKind kind() { return THING_ROOT_VALUE; } + static bool poisoned(const Value &v) { return IsPoisonedValue(v); } +}; + +template <> struct RootMethods +{ + static Value initial() { return UndefinedValue(); } + static ThingRootKind kind() { return THING_ROOT_VALUE; } + static bool poisoned(const Value &v) { return IsPoisonedValue(v); } +}; +# 864 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define CHECK_REQUEST(cx) ((void) 0) +# 875 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +inline void AssertArgumentsAreSane(JSContext *cx, const Value &v) { + +} + + +class __attribute__((visibility("default"))) AutoGCRooter { + public: + AutoGCRooter(JSContext *cx, ptrdiff_t tag); + + ~AutoGCRooter() { + do { } while(0); + *stackTop = down; + } + + + inline void trace(JSTracer *trc); + static void traceAll(JSTracer *trc); + + protected: + AutoGCRooter * const down; +# 903 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" + ptrdiff_t tag; + + enum { + JSVAL = -1, + VALARRAY = -2, + PARSER = -3, + SHAPEVECTOR = -4, + ENUMERATOR = -5, + IDARRAY = -6, + DESCRIPTORS = -7, + NAMESPACES = -8, + XML = -9, + OBJECT = -10, + ID = -11, + VALVECTOR = -12, + DESCRIPTOR = -13, + STRING = -14, + IDVECTOR = -15, + OBJVECTOR = -16, + SCRIPTVECTOR =-17, + PROPDESC = -18, + SHAPERANGE = -19, + STACKSHAPE = -20, + STACKBASESHAPE=-21, + BINDINGS = -22, + GETTERSETTER =-23, + REGEXPSTATICS=-24, + HASHABLEVALUE=-25 + }; + + private: + AutoGCRooter ** const stackTop; + + + AutoGCRooter(AutoGCRooter &ida) ; + void operator=(AutoGCRooter &ida) ; +}; + +class AutoValueRooter : private AutoGCRooter +{ + public: + explicit AutoValueRooter(JSContext *cx + ) + : AutoGCRooter(cx, JSVAL), val(NullValue()) + { + do { } while (0); + } + + AutoValueRooter(JSContext *cx, const Value &v + ) + : AutoGCRooter(cx, JSVAL), val(v) + { + do { } while (0); + } + + + + + + + + void set(Value v) { + do { } while(0); + val = v; + } + + const Value &value() const { + do { } while(0); + return val; + } + + Value *addr() { + do { } while(0); + return &val; + } + + const Value &jsval_value() const { + do { } while(0); + return val; + } + + Value *jsval_addr() { + do { } while(0); + return &val; + } + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + Value val; + +}; + +class AutoObjectRooter : private AutoGCRooter { + public: + AutoObjectRooter(JSContext *cx, JSObject *obj = __null + ) + : AutoGCRooter(cx, OBJECT), obj(obj) + { + do { } while (0); + } + + void setObject(JSObject *obj) { + this->obj = obj; + } + + JSObject * object() const { + return obj; + } + + JSObject ** addr() { + return &obj; + } + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + JSObject *obj; + +}; + +class AutoStringRooter : private AutoGCRooter { + public: + AutoStringRooter(JSContext *cx, JSString *str = __null + ) + : AutoGCRooter(cx, STRING), str(str) + { + do { } while (0); + } + + void setString(JSString *str) { + this->str = str; + } + + JSString * string() const { + return str; + } + + JSString ** addr() { + return &str; + } + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + JSString *str; + +}; + +class AutoArrayRooter : private AutoGCRooter { + public: + AutoArrayRooter(JSContext *cx, size_t len, Value *vec + ) + : AutoGCRooter(cx, len), array(vec), skip(cx, array, len) + { + do { } while (0); + do { } while(0); + } + + void changeLength(size_t newLength) { + tag = ptrdiff_t(newLength); + do { } while(0); + } + + void changeArray(Value *newArray, size_t newLength) { + changeLength(newLength); + array = newArray; + } + + Value *array; + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + + + SkipRoot skip; +}; + + +class AutoEnumStateRooter : private AutoGCRooter +{ + public: + AutoEnumStateRooter(JSContext *cx, JSObject *obj + ) + : AutoGCRooter(cx, ENUMERATOR), obj(obj), stateValue(), context(cx) + { + do { } while (0); + do { } while(0); + } + + ~AutoEnumStateRooter(); + + friend void AutoGCRooter::trace(JSTracer *trc); + + const Value &state() const { return stateValue; } + Value *addr() { return &stateValue; } + + protected: + void trace(JSTracer *trc); + + JSObject *obj; + + private: + Value stateValue; + JSContext *context; + +}; + +template +class AutoVectorRooter : protected AutoGCRooter +{ + public: + explicit AutoVectorRooter(JSContext *cx, ptrdiff_t tag + ) + : AutoGCRooter(cx, tag), vector(cx), vectorRoot(cx, &vector) + { + do { } while (0); + } + + size_t length() const { return vector.length(); } + + bool append(const T &v) { return vector.append(v); } + + + void infallibleAppend(const T &v) { vector.infallibleAppend(v); } + + void popBack() { vector.popBack(); } + T popCopy() { return vector.popCopy(); } + + bool growBy(size_t inc) { + size_t oldLength = vector.length(); + if (!vector.growByUninitialized(inc)) + return false; + makeRangeGCSafe(oldLength); + return true; + } + + bool resize(size_t newLength) { + size_t oldLength = vector.length(); + if (newLength <= oldLength) { + vector.shrinkBy(oldLength - newLength); + return true; + } + if (!vector.growByUninitialized(newLength - oldLength)) + return false; + makeRangeGCSafe(oldLength); + return true; + } + + void clear() { vector.clear(); } + + bool reserve(size_t newLength) { + return vector.reserve(newLength); + } + + T &operator[](size_t i) { return vector[i]; } + const T &operator[](size_t i) const { return vector[i]; } + + const T *begin() const { return vector.begin(); } + T *begin() { return vector.begin(); } + + const T *end() const { return vector.end(); } + T *end() { return vector.end(); } + + const T &back() const { return vector.back(); } + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + void makeRangeGCSafe(size_t oldLength) { + T *t = vector.begin() + oldLength; + for (size_t i = oldLength; i < vector.length(); ++i, ++t) + memset(t, 0, sizeof(T)); + } + + typedef js::Vector VectorImpl; + VectorImpl vector; + + + SkipRoot vectorRoot; + + +}; + +class AutoValueVector : public AutoVectorRooter +{ + public: + explicit AutoValueVector(JSContext *cx + ) + : AutoVectorRooter(cx, VALVECTOR) + { + do { } while (0); + } + + +}; + +class AutoIdVector : public AutoVectorRooter +{ + public: + explicit AutoIdVector(JSContext *cx + ) + : AutoVectorRooter(cx, IDVECTOR) + { + do { } while (0); + } + + +}; + +class AutoScriptVector : public AutoVectorRooter +{ + public: + explicit AutoScriptVector(JSContext *cx + ) + : AutoVectorRooter(cx, SCRIPTVECTOR) + { + do { } while (0); + } + + +}; + +} +# 1236 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef JS::Value jsval; + +static __attribute__((always_inline)) inline jsval_layout +JSVAL_TO_IMPL(jsval v) +{ + return v.data; +} + +static __attribute__((always_inline)) inline jsval +IMPL_TO_JSVAL(jsval_layout l) +{ + JS::Value v; + v.data = l; + return v; +} +# 1286 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef int moz_static_assert13[(sizeof(jsval_layout) == sizeof(jsval)) ? 1 : -1]; + + + + + +typedef JS::Handle JSHandleObject; +typedef JS::Handle JSHandleId; +# 1322 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef JSBool +(* JSPropertyOp)(JSContext *cx, JSHandleObject obj, JSHandleId id, jsval *vp); +# 1332 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef JSBool +(* JSStrictPropertyOp)(JSContext *cx, JSHandleObject obj, JSHandleId id, JSBool strict, jsval *vp); +# 1367 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef JSBool +(* JSNewEnumerateOp)(JSContext *cx, JSHandleObject obj, JSIterateOp enum_op, + jsval *statep, jsid *idp); + + + + + +typedef JSBool +(* JSEnumerateOp)(JSContext *cx, JSHandleObject obj); +# 1390 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef JSBool +(* JSResolveOp)(JSContext *cx, JSHandleObject obj, JSHandleId id); +# 1421 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef JSBool +(* JSNewResolveOp)(JSContext *cx, JSHandleObject obj, JSHandleId id, unsigned flags, + JSObject **objp); + + + + + +typedef JSBool +(* JSConvertOp)(JSContext *cx, JSHandleObject obj, JSType type, jsval *vp); + + + + +typedef JSType +(* JSTypeOfOp)(JSContext *cx, JSObject *obj); + +typedef struct JSFreeOp JSFreeOp; + +struct JSFreeOp { + + + + private: + JSRuntime *runtime_; + + protected: + JSFreeOp(JSRuntime *rt) + : runtime_(rt) { } + + public: + JSRuntime *runtime() const { + return runtime_; + } + +}; + + + + + + +typedef void +(* JSFinalizeOp)(JSFreeOp *fop, JSObject *obj); + + + + +typedef struct JSStringFinalizer JSStringFinalizer; + +struct JSStringFinalizer { + void (*finalize)(const JSStringFinalizer *fin, jschar *chars); +}; + + + + + + + +typedef JSBool +(* JSCheckAccessOp)(JSContext *cx, JSHandleObject obj, JSHandleId id, JSAccessMode mode, + jsval *vp); + + + + + + +typedef JSBool +(* JSHasInstanceOp)(JSContext *cx, JSHandleObject obj, const jsval *v, JSBool *bp); +# 1510 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef void +(* JSTraceOp)(JSTracer *trc, JSObject *obj); + + + + + +typedef void +(* JSTraceNamePrinter)(JSTracer *trc, char *buf, size_t bufsize); + +typedef JSBool +(* JSEqualityOp)(JSContext *cx, JSHandleObject obj, const jsval *v, JSBool *bp); + + + + + + + +typedef JSBool +(* JSNative)(JSContext *cx, unsigned argc, jsval *vp); + + + +typedef enum JSContextOp { + JSCONTEXT_NEW, + JSCONTEXT_DESTROY +} JSContextOp; +# 1552 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef JSBool +(* JSContextCallback)(JSContext *cx, unsigned contextOp); + +typedef enum JSGCStatus { + JSGC_BEGIN, + JSGC_END +} JSGCStatus; + +typedef void +(* JSGCCallback)(JSRuntime *rt, JSGCStatus status); + +typedef enum JSFinalizeStatus { + JSFINALIZE_START, + JSFINALIZE_END +} JSFinalizeStatus; + +typedef void +(* JSFinalizeCallback)(JSFreeOp *fop, JSFinalizeStatus status, JSBool isCompartment); + + + + + +typedef void +(* JSTraceDataOp)(JSTracer *trc, void *data); + +typedef JSBool +(* JSOperationCallback)(JSContext *cx); + +typedef void +(* JSErrorReporter)(JSContext *cx, const char *message, JSErrorReport *report); +# 1597 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef enum JSExnType { + JSEXN_NONE = -1, + JSEXN_ERR, + JSEXN_INTERNALERR, + JSEXN_EVALERR, + JSEXN_RANGEERR, + JSEXN_REFERENCEERR, + JSEXN_SYNTAXERR, + JSEXN_TYPEERR, + JSEXN_URIERR, + JSEXN_LIMIT +} JSExnType; + +typedef struct JSErrorFormatString { + + const char *format; + + + uint16_t argCount; + + + int16_t exnType; +} JSErrorFormatString; + +typedef const JSErrorFormatString * +(* JSErrorCallback)(void *userRef, const char *locale, + const unsigned errorNumber); +# 1633 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef JSBool +(* JSLocaleToUpperCase)(JSContext *cx, JSString *src, jsval *rval); + +typedef JSBool +(* JSLocaleToLowerCase)(JSContext *cx, JSString *src, jsval *rval); + +typedef JSBool +(* JSLocaleCompare)(JSContext *cx, JSString *src1, JSString *src2, + jsval *rval); + +typedef JSBool +(* JSLocaleToUnicode)(JSContext *cx, const char *src, jsval *rval); + + + + + +typedef void +(* JSDestroyPrincipalsOp)(JSPrincipals *principals); + +typedef JSBool +(* JSSubsumePrincipalsOp)(JSPrincipals *principals1, JSPrincipals *principals2); +# 1664 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef JSPrincipals * +(* JSObjectPrincipalsFinder)(JSObject *obj); + + + + + +typedef JSBool +(* JSCSPEvalChecker)(JSContext *cx); + + + + + +typedef JSBool +(* JSPushContextPrincipalOp)(JSContext *cx, JSPrincipals *principals); + +typedef JSBool +(* JSPopContextPrincipalOp)(JSContext *cx); + + + + + + +typedef JSObject * +(* JSWrapObjectCallback)(JSContext *cx, JSObject *obj, JSObject *proto, JSObject *parent, + unsigned flags); + + + + + + +typedef JSObject * +(* JSPreWrapCallback)(JSContext *cx, JSObject *scope, JSObject *obj, unsigned flags); +# 1711 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef JSObject * +(* JSSameCompartmentWrapObjectCallback)(JSContext *cx, JSObject *obj); + +typedef void +(* JSDestroyCompartmentCallback)(JSFreeOp *fop, JSCompartment *compartment); +# 1726 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef JSObject *(*ReadStructuredCloneOp)(JSContext *cx, JSStructuredCloneReader *r, + uint32_t tag, uint32_t data, void *closure); +# 1740 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef JSBool (*WriteStructuredCloneOp)(JSContext *cx, JSStructuredCloneWriter *w, + JSObject *obj, void *closure); + + + + + + +typedef void (*StructuredCloneErrorOp)(JSContext *cx, uint32_t errorid); + + + +extern "C" { +# 1769 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) const jsval JSVAL_NULL; +extern __attribute__((visibility("default"))) const jsval JSVAL_ZERO; +extern __attribute__((visibility("default"))) const jsval JSVAL_ONE; +extern __attribute__((visibility("default"))) const jsval JSVAL_FALSE; +extern __attribute__((visibility("default"))) const jsval JSVAL_TRUE; +extern __attribute__((visibility("default"))) const jsval JSVAL_VOID; + + + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_NULL(jsval v) +{ + return JSVAL_IS_NULL_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_VOID(jsval v) +{ + return JSVAL_IS_UNDEFINED_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_INT(jsval v) +{ + return JSVAL_IS_INT32_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline int32_t +JSVAL_TO_INT(jsval v) +{ + do { } while(0); + return JSVAL_TO_INT32_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline jsval +INT_TO_JSVAL(int32_t i) +{ + return IMPL_TO_JSVAL(INT32_TO_JSVAL_IMPL(i)); +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_DOUBLE(jsval v) +{ + return JSVAL_IS_DOUBLE_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline double +JSVAL_TO_DOUBLE(jsval v) +{ + jsval_layout l; + do { } while(0); + l = JSVAL_TO_IMPL(v); + return l.asDouble; +} + +static __attribute__((always_inline)) inline jsval +DOUBLE_TO_JSVAL(double d) +{ + + + + + jsval_layout l; + if ((__builtin_expect((d != d), 0))) { + l.asBits = 0x7FF8000000000000LL; + } else { + l.asDouble = d; + } + return IMPL_TO_JSVAL(l); +} + +static __attribute__((always_inline)) inline jsval +UINT_TO_JSVAL(uint32_t i) +{ + if (i <= ((int32_t)0x7fffffff)) + return INT_TO_JSVAL((int32_t)i); + return DOUBLE_TO_JSVAL((double)i); +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_NUMBER(jsval v) +{ + return JSVAL_IS_NUMBER_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_STRING(jsval v) +{ + return JSVAL_IS_STRING_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline JSString * +JSVAL_TO_STRING(jsval v) +{ + do { } while(0); + return JSVAL_TO_STRING_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline jsval +STRING_TO_JSVAL(JSString *str) +{ + return IMPL_TO_JSVAL(STRING_TO_JSVAL_IMPL(str)); +} + +static __attribute__((always_inline)) inline JSObject * +JSVAL_TO_OBJECT(jsval v) +{ + do { } while(0); + return JSVAL_TO_OBJECT_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline jsval +OBJECT_TO_JSVAL(JSObject *obj) +{ + if (obj) + return IMPL_TO_JSVAL(OBJECT_TO_JSVAL_IMPL(obj)); + return JSVAL_NULL; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_BOOLEAN(jsval v) +{ + return JSVAL_IS_BOOLEAN_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_TO_BOOLEAN(jsval v) +{ + do { } while(0); + return JSVAL_TO_BOOLEAN_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline jsval +BOOLEAN_TO_JSVAL(JSBool b) +{ + return IMPL_TO_JSVAL(BOOLEAN_TO_JSVAL_IMPL(b)); +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_PRIMITIVE(jsval v) +{ + return JSVAL_IS_PRIMITIVE_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_GCTHING(jsval v) +{ + return JSVAL_IS_GCTHING_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline void * +JSVAL_TO_GCTHING(jsval v) +{ + do { } while(0); + return JSVAL_TO_GCTHING_IMPL(JSVAL_TO_IMPL(v)); +} + + + +static __attribute__((always_inline)) inline jsval +PRIVATE_TO_JSVAL(void *ptr) +{ + return IMPL_TO_JSVAL(PRIVATE_PTR_TO_JSVAL_IMPL(ptr)); +} + +static __attribute__((always_inline)) inline void * +JSVAL_TO_PRIVATE(jsval v) +{ + do { } while(0); + return JSVAL_TO_PRIVATE_PTR_IMPL(JSVAL_TO_IMPL(v)); +} +# 1955 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JSID_TYPE_STRING 0x0 +#define JSID_TYPE_INT 0x1 +#define JSID_TYPE_VOID 0x2 +#define JSID_TYPE_OBJECT 0x4 +#define JSID_TYPE_DEFAULT_XML_NAMESPACE 0x6 +#define JSID_TYPE_MASK 0x7 + + + + + +#define id iden + +static __attribute__((always_inline)) inline JSBool +JSID_IS_STRING(jsid iden) +{ + return ((iden) & 0x7) == 0; +} + +static __attribute__((always_inline)) inline JSString * +JSID_TO_STRING(jsid iden) +{ + do { } while(0); + return (JSString *)(iden); +} + +static __attribute__((always_inline)) inline JSBool +JSID_IS_ZERO(jsid iden) +{ + return (iden) == 0; +} + +__attribute__((visibility("default"))) JSBool +JS_StringHasBeenInterned(JSContext *cx, JSString *str); +# 1997 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +__attribute__((visibility("default"))) jsid +INTERNED_STRING_TO_JSID(JSContext *cx, JSString *str); + +static __attribute__((always_inline)) inline JSBool +JSID_IS_INT(jsid iden) +{ + return !!((iden) & 0x1); +} + +static __attribute__((always_inline)) inline int32_t +JSID_TO_INT(jsid iden) +{ + do { } while(0); + return ((uint32_t)(iden)) >> 1; +} + +#define JSID_INT_MIN 0 +#define JSID_INT_MAX INT32_MAX + +static __attribute__((always_inline)) inline JSBool +INT_FITS_IN_JSID(int32_t i) +{ + return i >= 0; +} + +static __attribute__((always_inline)) inline jsid +INT_TO_JSID(int32_t i) +{ + jsid iden; + do { } while(0); + (iden) = ((i << 1) | 0x1); + return iden; +} + +static __attribute__((always_inline)) inline JSBool +JSID_IS_OBJECT(jsid iden) +{ + return ((iden) & 0x7) == 0x4 && + (size_t)(iden) != 0x4; +} + +static __attribute__((always_inline)) inline JSObject * +JSID_TO_OBJECT(jsid iden) +{ + do { } while(0); + return (JSObject *)((iden) & ~(size_t)0x7); +} + +static __attribute__((always_inline)) inline jsid +OBJECT_TO_JSID(JSObject *obj) +{ + jsid iden; + do { } while(0); + do { } while(0); + (iden) = ((size_t)obj | 0x4); + return iden; +} + +static __attribute__((always_inline)) inline JSBool +JSID_IS_GCTHING(jsid iden) +{ + return JSID_IS_STRING(iden) || JSID_IS_OBJECT(iden); +} + +static __attribute__((always_inline)) inline void * +JSID_TO_GCTHING(jsid iden) +{ + return (void *)((iden) & ~(size_t)0x7); +} + + + + + + +static __attribute__((always_inline)) inline JSBool +JSID_IS_DEFAULT_XML_NAMESPACE(jsid iden) +{ + do { } while (0) + ; + return ((size_t)(iden) == 0x6); +} + + + + +#define JS_DEFAULT_XML_NAMESPACE_ID ((jsid)JSID_TYPE_DEFAULT_XML_NAMESPACE) +# 2093 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +static __attribute__((always_inline)) inline JSBool +JSID_IS_VOID(jsid iden) +{ + do { } while (0) + ; + return ((size_t)(iden) == 0x2); +} + +static __attribute__((always_inline)) inline JSBool +JSID_IS_EMPTY(jsid iden) +{ + return ((size_t)(iden) == 0x4); +} + +#undef id + + + + + +#define JSID_VOID ((jsid)JSID_TYPE_VOID) +#define JSID_EMPTY ((jsid)JSID_TYPE_OBJECT) + + + + + + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_UNIVERSAL(jsval v) +{ + return !JSVAL_IS_GCTHING(v); +} + + + +namespace JS { + +class AutoIdRooter : private AutoGCRooter +{ + public: + explicit AutoIdRooter(JSContext *cx, jsid id = INT_TO_JSID(0) + ) + : AutoGCRooter(cx, ID), id_(id) + { + do { } while (0); + } + + jsid id() { + return id_; + } + + jsid * addr() { + return &id_; + } + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + jsid id_; + +}; + +} + + + + + + +#define JSVAL_LOCK(cx,v) (JSVAL_IS_GCTHING(v) ? JS_LockGCThing(cx, JSVAL_TO_GCTHING(v)) : JS_TRUE) + + +#define JSVAL_UNLOCK(cx,v) (JSVAL_IS_GCTHING(v) ? JS_UnlockGCThing(cx, JSVAL_TO_GCTHING(v)) : JS_TRUE) + + + + +#define JSPROP_ENUMERATE 0x01 +#define JSPROP_READONLY 0x02 + + + +#define JSPROP_PERMANENT 0x04 +#define JSPROP_GETTER 0x10 +#define JSPROP_SETTER 0x20 +#define JSPROP_SHARED 0x40 + + + + +#define JSPROP_INDEX 0x80 +#define JSPROP_SHORTID 0x100 + +#define JSPROP_NATIVE_ACCESSORS 0x08 + + + +#define JSFUN_LAMBDA 0x08 +#define JSFUN_HEAVYWEIGHT 0x80 + +#define JSFUN_HEAVYWEIGHT_TEST(f) ((f) & JSFUN_HEAVYWEIGHT) + +#define JSFUN_HAS_REST 0x0100 +#define JSFUN_CONSTRUCTOR 0x0200 + +#define JSFUN_HAS_DEFAULTS 0x0400 + + +#define JSFUN_FLAGS_MASK 0x07f8 + + + +#define JSFUN_STUB_GSOPS 0x1000 +# 2221 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JSFUN_GENERIC_NATIVE JSFUN_LAMBDA +# 2231 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_CallOnce(JSCallOnceType *once, JSInitCallback func); + + +extern __attribute__((visibility("default"))) int64_t +JS_Now(void); + + +extern __attribute__((visibility("default"))) jsval +JS_GetNaNValue(JSContext *cx); + +extern __attribute__((visibility("default"))) jsval +JS_GetNegativeInfinityValue(JSContext *cx); + +extern __attribute__((visibility("default"))) jsval +JS_GetPositiveInfinityValue(JSContext *cx); + +extern __attribute__((visibility("default"))) jsval +JS_GetEmptyStringValue(JSContext *cx); + +extern __attribute__((visibility("default"))) JSString * +JS_GetEmptyString(JSRuntime *rt); +# 2286 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_ConvertArguments(JSContext *cx, unsigned argc, jsval *argv, const char *format, + ...); +# 2346 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_ConvertValue(JSContext *cx, jsval v, JSType type, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_ValueToObject(JSContext *cx, jsval v, JSObject **objp); + +extern __attribute__((visibility("default"))) JSFunction * +JS_ValueToFunction(JSContext *cx, jsval v); + +extern __attribute__((visibility("default"))) JSFunction * +JS_ValueToConstructor(JSContext *cx, jsval v); + +extern __attribute__((visibility("default"))) JSString * +JS_ValueToString(JSContext *cx, jsval v); + +extern __attribute__((visibility("default"))) JSString * +JS_ValueToSource(JSContext *cx, jsval v); + +extern __attribute__((visibility("default"))) JSBool +JS_ValueToNumber(JSContext *cx, jsval v, double *dp); + + +namespace js { + + + +extern __attribute__((visibility("default"))) bool +ToNumberSlow(JSContext *cx, JS::Value v, double *dp); +} + +namespace JS { + + +__attribute__((always_inline)) inline bool +ToNumber(JSContext *cx, const Value &v, double *out) +{ + AssertArgumentsAreSane(cx, v); + + if (v.isNumber()) { + *out = v.toNumber(); + MaybeCheckStackRoots(cx); + return true; + } + return js::ToNumberSlow(cx, v, out); +} + +} + + +extern __attribute__((visibility("default"))) JSBool +JS_DoubleIsInt32(double d, int32_t *ip); + +extern __attribute__((visibility("default"))) int32_t +JS_DoubleToInt32(double d); + +extern __attribute__((visibility("default"))) uint32_t +JS_DoubleToUint32(double d); + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_ValueToECMAInt32(JSContext *cx, jsval v, int32_t *ip); + + +namespace js { + + + +extern __attribute__((visibility("default"))) bool +ToInt32Slow(JSContext *cx, const JS::Value &v, int32_t *out); +} + +namespace JS { + +__attribute__((always_inline)) inline bool +ToInt32(JSContext *cx, const js::Value &v, int32_t *out) +{ + AssertArgumentsAreSane(cx, v); + if (v.isInt32()) { + *out = v.toInt32(); + return true; + } + return js::ToInt32Slow(cx, v, out); +} + +} + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_ValueToECMAUint32(JSContext *cx, jsval v, uint32_t *ip); + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_ValueToInt32(JSContext *cx, jsval v, int32_t *ip); + + + + +extern __attribute__((visibility("default"))) JSBool +JS_ValueToUint16(JSContext *cx, jsval v, uint16_t *ip); + +extern __attribute__((visibility("default"))) JSBool +JS_ValueToBoolean(JSContext *cx, jsval v, JSBool *bp); + +extern __attribute__((visibility("default"))) JSType +JS_TypeOfValue(JSContext *cx, jsval v); + +extern __attribute__((visibility("default"))) const char * +JS_GetTypeName(JSContext *cx, JSType type); + +extern __attribute__((visibility("default"))) JSBool +JS_StrictlyEqual(JSContext *cx, jsval v1, jsval v2, JSBool *equal); + +extern __attribute__((visibility("default"))) JSBool +JS_LooselyEqual(JSContext *cx, jsval v1, jsval v2, JSBool *equal); + +extern __attribute__((visibility("default"))) JSBool +JS_SameValue(JSContext *cx, jsval v1, jsval v2, JSBool *same); + + +extern __attribute__((visibility("default"))) JSBool +JS_IsBuiltinEvalFunction(JSFunction *fun); + + +extern __attribute__((visibility("default"))) JSBool +JS_IsBuiltinFunctionConstructor(JSFunction *fun); +# 2492 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JS_NewRuntime JS_Init +#define JS_DestroyRuntime JS_Finish +#define JS_LockRuntime JS_Lock +#define JS_UnlockRuntime JS_Unlock + +extern __attribute__((visibility("default"))) JSRuntime * +JS_Init(uint32_t maxbytes); + + +#define JS_CommenceRuntimeShutDown(rt) ((void) 0) + +extern __attribute__((visibility("default"))) void +JS_Finish(JSRuntime *rt); + +extern __attribute__((visibility("default"))) void +JS_ShutDown(void); + +__attribute__((visibility("default"))) void * +JS_GetRuntimePrivate(JSRuntime *rt); + +extern __attribute__((visibility("default"))) JSRuntime * +JS_GetRuntime(JSContext *cx); + +__attribute__((visibility("default"))) void +JS_SetRuntimePrivate(JSRuntime *rt, void *data); + +extern __attribute__((visibility("default"))) void +JS_BeginRequest(JSContext *cx); + +extern __attribute__((visibility("default"))) void +JS_EndRequest(JSContext *cx); + + +extern __attribute__((visibility("default"))) void +JS_YieldRequest(JSContext *cx); + +extern __attribute__((visibility("default"))) unsigned +JS_SuspendRequest(JSContext *cx); + +extern __attribute__((visibility("default"))) void +JS_ResumeRequest(JSContext *cx, unsigned saveDepth); + +extern __attribute__((visibility("default"))) JSBool +JS_IsInRequest(JSRuntime *rt); + +extern __attribute__((visibility("default"))) JSBool +JS_IsInSuspendedRequest(JSRuntime *rt); + + +} + +namespace JS { + +inline bool +IsPoisonedId(jsid iden) +{ + if (JSID_IS_STRING(iden)) + return JS::IsPoisonedPtr(JSID_TO_STRING(iden)); + if (JSID_IS_OBJECT(iden)) + return JS::IsPoisonedPtr(JSID_TO_OBJECT(iden)); + return false; +} + +template <> struct RootMethods +{ + static jsid initial() { return ((jsid)0x2); } + static ThingRootKind kind() { return THING_ROOT_ID; } + static bool poisoned(jsid id) { return IsPoisonedId(id); } +}; + +template <> struct RootMethods +{ + static jsid initial() { return ((jsid)0x2); } + static ThingRootKind kind() { return THING_ROOT_ID; } + static bool poisoned(jsid id) { return IsPoisonedId(id); } +}; + +} + +class JSAutoRequest { + public: + JSAutoRequest(JSContext *cx ) + : mContext(cx), mSaveDepth(0) { + do { } while (0); + JS_BeginRequest(mContext); + } + ~JSAutoRequest() { + JS_EndRequest(mContext); + } + + void suspend() { + mSaveDepth = JS_SuspendRequest(mContext); + } + void resume() { + JS_ResumeRequest(mContext, mSaveDepth); + } + + protected: + JSContext *mContext; + unsigned mSaveDepth; + + + + + + + +}; + +class JSAutoSuspendRequest { + public: + JSAutoSuspendRequest(JSContext *cx ) + : mContext(cx), mSaveDepth(0) { + do { } while (0); + if (mContext) { + mSaveDepth = JS_SuspendRequest(mContext); + } + } + ~JSAutoSuspendRequest() { + resume(); + } + + void resume() { + if (mContext) { + JS_ResumeRequest(mContext, mSaveDepth); + mContext = 0; + } + } + + protected: + JSContext *mContext; + unsigned mSaveDepth; + + + + + + + +}; + +class JSAutoCheckRequest { + public: + JSAutoCheckRequest(JSContext *cx ) { + + + + + do { } while (0); + } + + ~JSAutoCheckRequest() { + + + + } + + + private: + + + + +}; + +extern "C" { + + +extern __attribute__((visibility("default"))) JSContextCallback +JS_SetContextCallback(JSRuntime *rt, JSContextCallback cxCallback); + +extern __attribute__((visibility("default"))) JSContext * +JS_NewContext(JSRuntime *rt, size_t stackChunkSize); + +extern __attribute__((visibility("default"))) void +JS_DestroyContext(JSContext *cx); + +extern __attribute__((visibility("default"))) void +JS_DestroyContextNoGC(JSContext *cx); + +extern __attribute__((visibility("default"))) void * +JS_GetContextPrivate(JSContext *cx); + +extern __attribute__((visibility("default"))) void +JS_SetContextPrivate(JSContext *cx, void *data); + +extern __attribute__((visibility("default"))) void * +JS_GetSecondContextPrivate(JSContext *cx); + +extern __attribute__((visibility("default"))) void +JS_SetSecondContextPrivate(JSContext *cx, void *data); + +extern __attribute__((visibility("default"))) JSRuntime * +JS_GetRuntime(JSContext *cx); + +extern __attribute__((visibility("default"))) JSContext * +JS_ContextIterator(JSRuntime *rt, JSContext **iterp); + +extern __attribute__((visibility("default"))) JSVersion +JS_GetVersion(JSContext *cx); + +extern __attribute__((visibility("default"))) JSVersion +JS_SetVersion(JSContext *cx, JSVersion version); + +extern __attribute__((visibility("default"))) const char * +JS_VersionToString(JSVersion version); + +extern __attribute__((visibility("default"))) JSVersion +JS_StringToVersion(const char *string); +# 2709 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JSOPTION_STRICT JS_BIT(0) +#define JSOPTION_WERROR JS_BIT(1) +#define JSOPTION_VAROBJFIX JS_BIT(2) + + + +#define JSOPTION_PRIVATE_IS_NSISUPPORTS JS_BIT(3) + + +#define JSOPTION_COMPILE_N_GO JS_BIT(4) + + + + +#define JSOPTION_ATLINE JS_BIT(5) + + + +#define JSOPTION_ALLOW_XML JS_BIT(6) + + + +#define JSOPTION_MOAR_XML JS_BIT(7) + + + + + +#define JSOPTION_DONT_REPORT_UNCAUGHT JS_BIT(8) + + + + + + +#define JSOPTION_RELIMIT JS_BIT(9) +# 2753 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JSOPTION_NO_SCRIPT_RVAL JS_BIT(12) + + + +#define JSOPTION_UNROOTED_GLOBAL JS_BIT(13) + + + + + +#define JSOPTION_METHODJIT JS_BIT(14) + + + +#define JSOPTION_METHODJIT_ALWAYS JS_BIT(16) + + +#define JSOPTION_PCCOUNT JS_BIT(17) + +#define JSOPTION_TYPE_INFERENCE JS_BIT(18) +#define JSOPTION_STRICT_MODE JS_BIT(19) + + + + + +#define JSCOMPILEOPTION_MASK (JSOPTION_ALLOW_XML | JSOPTION_MOAR_XML) + +#define JSRUNOPTION_MASK (JS_BITMASK(20) & ~JSCOMPILEOPTION_MASK) +#define JSALLOPTION_MASK (JSCOMPILEOPTION_MASK | JSRUNOPTION_MASK) + +extern __attribute__((visibility("default"))) uint32_t +JS_GetOptions(JSContext *cx); + +extern __attribute__((visibility("default"))) uint32_t +JS_SetOptions(JSContext *cx, uint32_t options); + +extern __attribute__((visibility("default"))) uint32_t +JS_ToggleOptions(JSContext *cx, uint32_t options); + +extern __attribute__((visibility("default"))) void +JS_SetJitHardening(JSRuntime *rt, JSBool enabled); + +extern __attribute__((visibility("default"))) const char * +JS_GetImplementationVersion(void); + +extern __attribute__((visibility("default"))) void +JS_SetDestroyCompartmentCallback(JSRuntime *rt, JSDestroyCompartmentCallback callback); + +extern __attribute__((visibility("default"))) JSWrapObjectCallback +JS_SetWrapObjectCallbacks(JSRuntime *rt, + JSWrapObjectCallback callback, + JSSameCompartmentWrapObjectCallback sccallback, + JSPreWrapCallback precallback); + +extern __attribute__((visibility("default"))) JSCrossCompartmentCall * +JS_EnterCrossCompartmentCall(JSContext *cx, JSObject *target); + +extern __attribute__((visibility("default"))) void +JS_LeaveCrossCompartmentCall(JSCrossCompartmentCall *call); + +extern __attribute__((visibility("default"))) void +JS_SetCompartmentPrivate(JSCompartment *compartment, void *data); + +extern __attribute__((visibility("default"))) void * +JS_GetCompartmentPrivate(JSCompartment *compartment); + +extern __attribute__((visibility("default"))) JSBool +JS_WrapObject(JSContext *cx, JSObject **objp); + +extern __attribute__((visibility("default"))) JSBool +JS_WrapValue(JSContext *cx, jsval *vp); + +extern __attribute__((visibility("default"))) JSObject * +JS_TransplantObject(JSContext *cx, JSObject *origobj, JSObject *target); + +extern __attribute__((visibility("default"))) JSObject * +js_TransplantObjectWithWrapper(JSContext *cx, + JSObject *origobj, + JSObject *origwrapper, + JSObject *targetobj, + JSObject *targetwrapper); + +extern __attribute__((visibility("default"))) JSBool +JS_RefreshCrossCompartmentWrappers(JSContext *cx, JSObject *ob); + + +} + +namespace js { +class AutoCompartment; +} + +class __attribute__((visibility("default"))) JSAutoEnterCompartment +{ +# 2856 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" + void* bytes[sizeof(void*) == 4 && mozilla::AlignmentFinder::alignment == 8 ? 16 : 13]; + + protected: + js::AutoCompartment *getAutoCompartment() { + do { } while(0); + return reinterpret_cast(bytes); + } +# 2872 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" + enum State { + STATE_UNENTERED, + STATE_SAME_COMPARTMENT, + STATE_OTHER_COMPARTMENT + } state; + + public: + JSAutoEnterCompartment() : state(STATE_UNENTERED) {} + + bool enter(JSContext *cx, JSObject *target); + + void enterAndIgnoreErrors(JSContext *cx, JSObject *target); + + bool entered() const { return state != STATE_UNENTERED; } + + ~JSAutoEnterCompartment(); +}; + +extern "C" { + + +typedef void (*JSIterateCompartmentCallback)(JSRuntime *rt, void *data, JSCompartment *compartment); + + + + + + +extern __attribute__((visibility("default"))) void +JS_IterateCompartments(JSRuntime *rt, void *data, + JSIterateCompartmentCallback compartmentCallback); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetGlobalObject(JSContext *cx); + +extern __attribute__((visibility("default"))) void +JS_SetGlobalObject(JSContext *cx, JSObject *obj); +# 2917 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_InitStandardClasses(JSContext *cx, JSObject *obj); +# 2933 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_ResolveStandardClass(JSContext *cx, JSObject *obj, jsid id, + JSBool *resolved); + +extern __attribute__((visibility("default"))) JSBool +JS_EnumerateStandardClasses(JSContext *cx, JSObject *obj); + + + + + + +extern __attribute__((visibility("default"))) JSIdArray * +JS_EnumerateResolvedStandardClasses(JSContext *cx, JSObject *obj, + JSIdArray *ida); + +extern __attribute__((visibility("default"))) JSBool +JS_GetClassObject(JSContext *cx, JSObject *obj, JSProtoKey key, + JSObject **objp); + +extern __attribute__((visibility("default"))) JSBool +JS_GetClassPrototype(JSContext *cx, JSProtoKey key, JSObject **objp); + +extern __attribute__((visibility("default"))) JSProtoKey +JS_IdentifyClassPrototype(JSContext *cx, JSObject *obj); + + + + + +extern __attribute__((visibility("default"))) JSObject * +JS_GetFunctionPrototype(JSContext *cx, JSObject *forObj); + + + + + +extern __attribute__((visibility("default"))) JSObject * +JS_GetObjectPrototype(JSContext *cx, JSObject *forObj); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetGlobalForObject(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetGlobalForScopeChain(JSContext *cx); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetScriptedGlobal(JSContext *cx); + + + + +extern __attribute__((visibility("default"))) JSObject * +JS_InitReflect(JSContext *cx, JSObject *global); + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_InitCTypesClass(JSContext *cx, JSObject *global); + + + + + + +typedef char * +(* JSCTypesUnicodeToNativeFun)(JSContext *cx, const jschar *source, size_t slen); + + + + + + +struct JSCTypesCallbacks { + JSCTypesUnicodeToNativeFun unicodeToNative; +}; + +typedef struct JSCTypesCallbacks JSCTypesCallbacks; + + + + + + + +extern __attribute__((visibility("default"))) void +JS_SetCTypesCallbacks(JSObject *ctypesObj, JSCTypesCallbacks *callbacks); + + +typedef JSBool +(* JSEnumerateDiagnosticMemoryCallback)(void *ptr, size_t length); + + + + + +extern __attribute__((visibility("default"))) void +JS_EnumerateDiagnosticMemoryRegions(JSEnumerateDiagnosticMemoryCallback callback); +# 3063 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JS_CALLEE(cx,vp) ((vp)[0]) +#define JS_THIS(cx,vp) JS_ComputeThis(cx, vp) +#define JS_THIS_OBJECT(cx,vp) (JSVAL_TO_OBJECT(JS_THIS(cx,vp))) +#define JS_ARGV(cx,vp) ((vp) + 2) +#define JS_RVAL(cx,vp) (*(vp)) +#define JS_SET_RVAL(cx,vp,v) (*(vp) = (v)) + +extern __attribute__((visibility("default"))) jsval +JS_ComputeThis(JSContext *cx, jsval *vp); + + +#undef JS_THIS +static inline jsval +JS_THIS(JSContext *cx, jsval *vp) +{ + return JSVAL_IS_PRIMITIVE(vp[1]) ? JS_ComputeThis(cx, vp) : vp[1]; +} +# 3094 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JS_THIS_VALUE(cx,vp) ((vp)[1]) + +extern __attribute__((visibility("default"))) void +JS_MallocInCompartment(JSCompartment *comp, size_t nbytes); + +extern __attribute__((visibility("default"))) void +JS_FreeInCompartment(JSCompartment *comp, size_t nbytes); + +extern __attribute__((visibility("default"))) void * +JS_malloc(JSContext *cx, size_t nbytes); + +extern __attribute__((visibility("default"))) void * +JS_realloc(JSContext *cx, void *p, size_t nbytes); + + + + + +extern __attribute__((visibility("default"))) void +JS_free(JSContext *cx, void *p); + + + + + +extern __attribute__((visibility("default"))) void +JS_freeop(JSFreeOp *fop, void *p); + +extern __attribute__((visibility("default"))) JSFreeOp * +JS_GetDefaultFreeOp(JSRuntime *rt); + +extern __attribute__((visibility("default"))) void +JS_updateMallocCounter(JSContext *cx, size_t nbytes); + +extern __attribute__((visibility("default"))) char * +JS_strdup(JSContext *cx, const char *s); + +extern __attribute__((visibility("default"))) JSBool +JS_NewNumberValue(JSContext *cx, double d, jsval *rval); +# 3159 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_AddValueRoot(JSContext *cx, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_AddStringRoot(JSContext *cx, JSString **rp); + +extern __attribute__((visibility("default"))) JSBool +JS_AddObjectRoot(JSContext *cx, JSObject **rp); + +extern __attribute__((visibility("default"))) JSBool +JS_AddGCThingRoot(JSContext *cx, void **rp); +# 3180 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_AddNamedValueRoot(JSContext *cx, jsval *vp, const char *name); + +extern __attribute__((visibility("default"))) JSBool +JS_AddNamedStringRoot(JSContext *cx, JSString **rp, const char *name); + +extern __attribute__((visibility("default"))) JSBool +JS_AddNamedObjectRoot(JSContext *cx, JSObject **rp, const char *name); + +extern __attribute__((visibility("default"))) JSBool +JS_AddNamedScriptRoot(JSContext *cx, JSScript **rp, const char *name); + +extern __attribute__((visibility("default"))) JSBool +JS_AddNamedGCThingRoot(JSContext *cx, void **rp, const char *name); + +extern __attribute__((visibility("default"))) void +JS_RemoveValueRoot(JSContext *cx, jsval *vp); + +extern __attribute__((visibility("default"))) void +JS_RemoveStringRoot(JSContext *cx, JSString **rp); + +extern __attribute__((visibility("default"))) void +JS_RemoveObjectRoot(JSContext *cx, JSObject **rp); + +extern __attribute__((visibility("default"))) void +JS_RemoveScriptRoot(JSContext *cx, JSScript **rp); + +extern __attribute__((visibility("default"))) void +JS_RemoveGCThingRoot(JSContext *cx, void **rp); + +extern __attribute__((visibility("default"))) void +JS_RemoveValueRootRT(JSRuntime *rt, jsval *vp); + +extern __attribute__((visibility("default"))) void +JS_RemoveStringRootRT(JSRuntime *rt, JSString **rp); + +extern __attribute__((visibility("default"))) void +JS_RemoveObjectRootRT(JSRuntime *rt, JSObject **rp); + +extern __attribute__((visibility("default"))) void +JS_RemoveScriptRootRT(JSRuntime *rt, JSScript **rp); + + + +extern __attribute__((visibility("default"))) JSBool +js_AddRootRT(JSRuntime *rt, jsval *vp, const char *name); + +extern __attribute__((visibility("default"))) JSBool +js_AddGCThingRootRT(JSRuntime *rt, void **rp, const char *name); + +extern __attribute__((visibility("default"))) void +js_RemoveRoot(JSRuntime *rt, void *rp); + + + + + +extern __attribute__((noinline)) __attribute__((visibility("default"))) void +JS_AnchorPtr(void *p); + + + + + +#define JS_TYPED_ROOTING_API + + +#define JS_EnterLocalRootScope(cx) (JS_TRUE) +#define JS_LeaveLocalRootScope(cx) ((void) 0) +#define JS_LeaveLocalRootScopeWithResult(cx,rval) ((void) 0) +#define JS_ForgetLocalRoot(cx,thing) ((void) 0) + +typedef enum JSGCRootType { + JS_GC_ROOT_VALUE_PTR, + JS_GC_ROOT_GCTHING_PTR +} JSGCRootType; +# 3280 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JS_MAP_GCROOT_NEXT 0 +#define JS_MAP_GCROOT_STOP 1 +#define JS_MAP_GCROOT_REMOVE 2 + +typedef int +(* JSGCRootMapFun)(void *rp, JSGCRootType type, const char *name, void *data); + +extern __attribute__((visibility("default"))) uint32_t +JS_MapGCRoots(JSRuntime *rt, JSGCRootMapFun map, void *data); + +extern __attribute__((visibility("default"))) JSBool +JS_LockGCThing(JSContext *cx, void *thing); + +extern __attribute__((visibility("default"))) JSBool +JS_LockGCThingRT(JSRuntime *rt, void *thing); + +extern __attribute__((visibility("default"))) JSBool +JS_UnlockGCThing(JSContext *cx, void *thing); + +extern __attribute__((visibility("default"))) JSBool +JS_UnlockGCThingRT(JSRuntime *rt, void *thing); +# 3309 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) void +JS_SetExtraGCRootsTracer(JSRuntime *rt, JSTraceDataOp traceOp, void *data); +# 3325 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_TRACEABLE(jsval v) +{ + return JSVAL_IS_TRACEABLE_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline void * +JSVAL_TO_TRACEABLE(jsval v) +{ + return JSVAL_TO_GCTHING(v); +} + +static __attribute__((always_inline)) inline JSGCTraceKind +JSVAL_TRACE_KIND(jsval v) +{ + do { } while(0); + return (JSGCTraceKind) JSVAL_TRACE_KIND_IMPL(JSVAL_TO_IMPL(v)); +} +# 3360 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef void +(* JSTraceCallback)(JSTracer *trc, void **thingp, JSGCTraceKind kind); + +struct JSTracer { + JSRuntime *runtime; + JSTraceCallback callback; + JSTraceNamePrinter debugPrinter; + const void *debugPrintArg; + size_t debugPrintIndex; + JSBool eagerlyTraceWeakMaps; + + + +}; + + + + + + + +extern __attribute__((visibility("default"))) void +JS_CallTracer(JSTracer *trc, void *thing, JSGCTraceKind kind); +# 3400 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JS_SET_TRACING_DETAILS(trc,printer,arg,index) JS_BEGIN_MACRO (trc)->debugPrinter = (printer); (trc)->debugPrintArg = (arg); (trc)->debugPrintIndex = (index); JS_END_MACRO +# 3417 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JS_SET_TRACING_LOCATION(trc,location) JS_BEGIN_MACRO JS_END_MACRO +# 3427 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JS_SET_TRACING_INDEX(trc,name,index) JS_SET_TRACING_DETAILS(trc, NULL, name, index) + + + + + +#define JS_SET_TRACING_NAME(trc,name) JS_SET_TRACING_DETAILS(trc, NULL, name, (size_t)-1) + + + + + + +#define JS_CALL_TRACER(trc,thing,kind,name) JS_BEGIN_MACRO JS_SET_TRACING_NAME(trc, name); JS_CallTracer((trc), (thing), (kind)); JS_END_MACRO +# 3450 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JS_CALL_VALUE_TRACER(trc,val,name) JS_BEGIN_MACRO if (JSVAL_IS_TRACEABLE(val)) { JS_CALL_TRACER((trc), JSVAL_TO_GCTHING(val), JSVAL_TRACE_KIND(val), name); } JS_END_MACRO + + + + + + + +#define JS_CALL_OBJECT_TRACER(trc,object,name) JS_BEGIN_MACRO JSObject *obj_ = (object); JS_ASSERT(obj_); JS_CALL_TRACER((trc), obj_, JSTRACE_OBJECT, name); JS_END_MACRO + + + + + + +#define JS_CALL_STRING_TRACER(trc,string,name) JS_BEGIN_MACRO JSString *str_ = (string); JS_ASSERT(str_); JS_CALL_TRACER((trc), str_, JSTRACE_STRING, name); JS_END_MACRO +# 3475 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) void +JS_TracerInit(JSTracer *trc, JSRuntime *rt, JSTraceCallback callback); + +extern __attribute__((visibility("default"))) void +JS_TraceChildren(JSTracer *trc, void *thing, JSGCTraceKind kind); + +extern __attribute__((visibility("default"))) void +JS_TraceRuntime(JSTracer *trc); +# 3517 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) void +JS_GC(JSRuntime *rt); + +extern __attribute__((visibility("default"))) void +JS_MaybeGC(JSContext *cx); + +extern __attribute__((visibility("default"))) void +JS_SetGCCallback(JSRuntime *rt, JSGCCallback cb); + +extern __attribute__((visibility("default"))) void +JS_SetFinalizeCallback(JSRuntime *rt, JSFinalizeCallback cb); + +extern __attribute__((visibility("default"))) JSBool +JS_IsGCMarkingTracer(JSTracer *trc); + +extern __attribute__((visibility("default"))) JSBool +JS_IsAboutToBeFinalized(void *thing); + +typedef enum JSGCParamKey { + + JSGC_MAX_BYTES = 0, + + + JSGC_MAX_MALLOC_BYTES = 1, + + + JSGC_BYTES = 3, + + + JSGC_NUMBER = 4, + + + JSGC_MAX_CODE_CACHE_BYTES = 5, + + + JSGC_MODE = 6, + + + JSGC_UNUSED_CHUNKS = 7, + + + JSGC_TOTAL_CHUNKS = 8, + + + JSGC_SLICE_TIME_BUDGET = 9, + + + JSGC_MARK_STACK_LIMIT = 10 +} JSGCParamKey; + +typedef enum JSGCMode { + + JSGC_MODE_GLOBAL = 0, + + + JSGC_MODE_COMPARTMENT = 1, + + + + + + JSGC_MODE_INCREMENTAL = 2 +} JSGCMode; + +extern __attribute__((visibility("default"))) void +JS_SetGCParameter(JSRuntime *rt, JSGCParamKey key, uint32_t value); + +extern __attribute__((visibility("default"))) uint32_t +JS_GetGCParameter(JSRuntime *rt, JSGCParamKey key); + +extern __attribute__((visibility("default"))) void +JS_SetGCParameterForThread(JSContext *cx, JSGCParamKey key, uint32_t value); + +extern __attribute__((visibility("default"))) uint32_t +JS_GetGCParameterForThread(JSContext *cx, JSGCParamKey key); + + + + + +extern __attribute__((visibility("default"))) JSString * +JS_NewExternalString(JSContext *cx, const jschar *chars, size_t length, + const JSStringFinalizer *fin); + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_IsExternalString(JSString *str); + + + + + +extern __attribute__((visibility("default"))) const JSStringFinalizer * +JS_GetExternalStringFinalizer(JSString *str); + + + + + +extern __attribute__((visibility("default"))) void +JS_SetNativeStackQuota(JSRuntime *cx, size_t stackSize); + + + + + + +typedef void (*JSClassInternal)(); + +struct JSClass { + const char *name; + uint32_t flags; + + + JSPropertyOp addProperty; + JSPropertyOp delProperty; + JSPropertyOp getProperty; + JSStrictPropertyOp setProperty; + JSEnumerateOp enumerate; + JSResolveOp resolve; + JSConvertOp convert; + JSFinalizeOp finalize; + + + JSCheckAccessOp checkAccess; + JSNative call; + JSHasInstanceOp hasInstance; + JSNative construct; + JSTraceOp trace; + + void *reserved[40]; +}; + +#define JSCLASS_HAS_PRIVATE (1<<0) +#define JSCLASS_NEW_ENUMERATE (1<<1) +#define JSCLASS_NEW_RESOLVE (1<<2) +#define JSCLASS_PRIVATE_IS_NSISUPPORTS (1<<3) +#define JSCLASS_NEW_RESOLVE_GETS_START (1<<4) + + + +#define JSCLASS_IMPLEMENTS_BARRIERS (1<<5) + +#define JSCLASS_DOCUMENT_OBSERVER (1<<6) +#define JSCLASS_USERBIT1 (1<<7) + + + + + + +#define JSCLASS_RESERVED_SLOTS_SHIFT 8 +#define JSCLASS_RESERVED_SLOTS_WIDTH 8 +#define JSCLASS_RESERVED_SLOTS_MASK JS_BITMASK(JSCLASS_RESERVED_SLOTS_WIDTH) +#define JSCLASS_HAS_RESERVED_SLOTS(n) (((n) & JSCLASS_RESERVED_SLOTS_MASK) << JSCLASS_RESERVED_SLOTS_SHIFT) + +#define JSCLASS_RESERVED_SLOTS(clasp) (((clasp)->flags >> JSCLASS_RESERVED_SLOTS_SHIFT) & JSCLASS_RESERVED_SLOTS_MASK) + + + +#define JSCLASS_HIGH_FLAGS_SHIFT (JSCLASS_RESERVED_SLOTS_SHIFT + JSCLASS_RESERVED_SLOTS_WIDTH) + + + + + + +#define JSCLASS_FOR_OF_ITERATION (1<<(JSCLASS_HIGH_FLAGS_SHIFT+0)) + +#define JSCLASS_IS_ANONYMOUS (1<<(JSCLASS_HIGH_FLAGS_SHIFT+1)) +#define JSCLASS_IS_GLOBAL (1<<(JSCLASS_HIGH_FLAGS_SHIFT+2)) +#define JSCLASS_INTERNAL_FLAG2 (1<<(JSCLASS_HIGH_FLAGS_SHIFT+3)) +#define JSCLASS_INTERNAL_FLAG3 (1<<(JSCLASS_HIGH_FLAGS_SHIFT+4)) + + +#define JSCLASS_FREEZE_PROTO (1<<(JSCLASS_HIGH_FLAGS_SHIFT+5)) +#define JSCLASS_FREEZE_CTOR (1<<(JSCLASS_HIGH_FLAGS_SHIFT+6)) + +#define JSCLASS_XPCONNECT_GLOBAL (1<<(JSCLASS_HIGH_FLAGS_SHIFT+7)) + + +#define JSCLASS_USERBIT2 (1<<(JSCLASS_HIGH_FLAGS_SHIFT+8)) +#define JSCLASS_USERBIT3 (1<<(JSCLASS_HIGH_FLAGS_SHIFT+9)) + + + + + + + +#define JSGLOBAL_FLAGS_CLEARED 0x1 +# 3723 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JSCLASS_GLOBAL_SLOT_COUNT (JSProto_LIMIT * 3 + 8) +#define JSCLASS_GLOBAL_FLAGS_WITH_SLOTS(n) (JSCLASS_IS_GLOBAL | JSCLASS_HAS_RESERVED_SLOTS(JSCLASS_GLOBAL_SLOT_COUNT + (n))) + +#define JSCLASS_GLOBAL_FLAGS JSCLASS_GLOBAL_FLAGS_WITH_SLOTS(0) + +#define JSCLASS_HAS_GLOBAL_FLAG_AND_SLOTS(clasp) (((clasp)->flags & JSCLASS_IS_GLOBAL) && JSCLASS_RESERVED_SLOTS(clasp) >= JSCLASS_GLOBAL_SLOT_COUNT) + + + + +#define JSCLASS_CACHED_PROTO_SHIFT (JSCLASS_HIGH_FLAGS_SHIFT + 10) +#define JSCLASS_CACHED_PROTO_WIDTH 6 +#define JSCLASS_CACHED_PROTO_MASK JS_BITMASK(JSCLASS_CACHED_PROTO_WIDTH) +#define JSCLASS_HAS_CACHED_PROTO(key) (uint32_t(key) << JSCLASS_CACHED_PROTO_SHIFT) +#define JSCLASS_CACHED_PROTO_KEY(clasp) ((JSProtoKey) (((clasp)->flags >> JSCLASS_CACHED_PROTO_SHIFT) & JSCLASS_CACHED_PROTO_MASK)) + + + + + +#define JSCLASS_NO_INTERNAL_MEMBERS {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} +#define JSCLASS_NO_OPTIONAL_MEMBERS 0,0,0,0,0,JSCLASS_NO_INTERNAL_MEMBERS + +extern __attribute__((visibility("default"))) int +JS_IdArrayLength(JSContext *cx, JSIdArray *ida); + +extern __attribute__((visibility("default"))) jsid +JS_IdArrayGet(JSContext *cx, JSIdArray *ida, int index); + +extern __attribute__((visibility("default"))) void +JS_DestroyIdArray(JSContext *cx, JSIdArray *ida); + + + +namespace JS { + +class AutoIdArray : private AutoGCRooter { + public: + AutoIdArray(JSContext *cx, JSIdArray *ida ) + : AutoGCRooter(cx, IDARRAY), context(cx), idArray(ida) + { + do { } while (0); + } + ~AutoIdArray() { + if (idArray) + JS_DestroyIdArray(context, idArray); + } + bool operator!() { + return !idArray; + } + jsid operator[](size_t i) const { + do { } while(0); + do { } while(0); + return JS_IdArrayGet(context, idArray, i); + } + size_t length() const { + return JS_IdArrayLength(context, idArray); + } + + friend void AutoGCRooter::trace(JSTracer *trc); + + JSIdArray *steal() { + JSIdArray *copy = idArray; + idArray = __null; + return copy; + } + + protected: + inline void trace(JSTracer *trc); + + private: + JSContext *context; + JSIdArray *idArray; + + + + AutoIdArray(AutoIdArray &ida) ; + void operator=(AutoIdArray &ida) ; +}; + +} + + + +extern __attribute__((visibility("default"))) JSBool +JS_ValueToId(JSContext *cx, jsval v, jsid *idp); + +extern __attribute__((visibility("default"))) JSBool +JS_IdToValue(JSContext *cx, jsid id, jsval *vp); + + + + +#define JSRESOLVE_QUALIFIED 0x01 +#define JSRESOLVE_ASSIGNING 0x02 +#define JSRESOLVE_DETECTING 0x04 +#define JSRESOLVE_DECLARING 0x08 +#define JSRESOLVE_WITH 0x10 + + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_DefaultValue(JSContext *cx, JSObject *obj, JSType hint, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_PropertyStub(JSContext *cx, JSHandleObject obj, JSHandleId id, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_StrictPropertyStub(JSContext *cx, JSHandleObject obj, JSHandleId id, JSBool strict, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_EnumerateStub(JSContext *cx, JSHandleObject obj); + +extern __attribute__((visibility("default"))) JSBool +JS_ResolveStub(JSContext *cx, JSHandleObject obj, JSHandleId id); + +extern __attribute__((visibility("default"))) JSBool +JS_ConvertStub(JSContext *cx, JSHandleObject obj, JSType type, jsval *vp); + +struct JSConstDoubleSpec { + double dval; + const char *name; + uint8_t flags; + uint8_t spare[3]; +}; + + + + + + +struct JSPropertySpec { + const char *name; + int8_t tinyid; + uint8_t flags; + JSPropertyOp getter; + JSStrictPropertyOp setter; +}; + +struct JSFunctionSpec { + const char *name; + JSNative call; + uint16_t nargs; + uint16_t flags; +}; + + + + + +#define JS_FS_END JS_FS(NULL,NULL,0,0) + + + + + + +#define JS_FS(name,call,nargs,flags) {name, call, nargs, flags} + +#define JS_FN(name,call,nargs,flags) {name, call, nargs, (flags) | JSFUN_STUB_GSOPS} + + +extern __attribute__((visibility("default"))) JSObject * +JS_InitClass(JSContext *cx, JSObject *obj, JSObject *parent_proto, + JSClass *clasp, JSNative constructor, unsigned nargs, + JSPropertySpec *ps, JSFunctionSpec *fs, + JSPropertySpec *static_ps, JSFunctionSpec *static_fs); + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_LinkConstructorAndPrototype(JSContext *cx, JSObject *ctor, JSObject *proto); + +extern __attribute__((visibility("default"))) JSClass * +JS_GetClass(JSObject *obj); + +extern __attribute__((visibility("default"))) JSBool +JS_InstanceOf(JSContext *cx, JSObject *obj, JSClass *clasp, jsval *argv); + +extern __attribute__((visibility("default"))) JSBool +JS_HasInstance(JSContext *cx, JSObject *obj, jsval v, JSBool *bp); + +extern __attribute__((visibility("default"))) void * +JS_GetPrivate(JSObject *obj); + +extern __attribute__((visibility("default"))) void +JS_SetPrivate(JSObject *obj, void *data); + +extern __attribute__((visibility("default"))) void * +JS_GetInstancePrivate(JSContext *cx, JSObject *obj, JSClass *clasp, + jsval *argv); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetPrototype(JSObject *obj); + +extern __attribute__((visibility("default"))) JSBool +JS_SetPrototype(JSContext *cx, JSObject *obj, JSObject *proto); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetParent(JSObject *obj); + +extern __attribute__((visibility("default"))) JSBool +JS_SetParent(JSContext *cx, JSObject *obj, JSObject *parent); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetConstructor(JSContext *cx, JSObject *proto); + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_GetObjectId(JSContext *cx, JSObject *obj, jsid *idp); + +extern __attribute__((visibility("default"))) JSObject * +JS_NewGlobalObject(JSContext *cx, JSClass *clasp); + +extern __attribute__((visibility("default"))) JSObject * +JS_NewCompartmentAndGlobalObject(JSContext *cx, JSClass *clasp, JSPrincipals *principals); + +extern __attribute__((visibility("default"))) JSObject * +JS_NewObject(JSContext *cx, JSClass *clasp, JSObject *proto, JSObject *parent); + + +extern __attribute__((visibility("default"))) JSBool +JS_IsExtensible(JSObject *obj); + +extern __attribute__((visibility("default"))) JSBool +JS_IsNative(JSObject *obj); + +extern __attribute__((visibility("default"))) JSRuntime * +JS_GetObjectRuntime(JSObject *obj); + + + + + +extern __attribute__((visibility("default"))) JSObject * +JS_NewObjectWithGivenProto(JSContext *cx, JSClass *clasp, JSObject *proto, + JSObject *parent); + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_DeepFreezeObject(JSContext *cx, JSObject *obj); + + + + +extern __attribute__((visibility("default"))) JSBool +JS_FreezeObject(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) JSObject * +JS_ConstructObject(JSContext *cx, JSClass *clasp, JSObject *parent); + +extern __attribute__((visibility("default"))) JSObject * +JS_ConstructObjectWithArguments(JSContext *cx, JSClass *clasp, JSObject *parent, + unsigned argc, jsval *argv); + +extern __attribute__((visibility("default"))) JSObject * +JS_New(JSContext *cx, JSObject *ctor, unsigned argc, jsval *argv); + +extern __attribute__((visibility("default"))) JSObject * +JS_DefineObject(JSContext *cx, JSObject *obj, const char *name, JSClass *clasp, + JSObject *proto, unsigned attrs); + +extern __attribute__((visibility("default"))) JSBool +JS_DefineConstDoubles(JSContext *cx, JSObject *obj, JSConstDoubleSpec *cds); + +extern __attribute__((visibility("default"))) JSBool +JS_DefineProperties(JSContext *cx, JSObject *obj, JSPropertySpec *ps); + +extern __attribute__((visibility("default"))) JSBool +JS_DefineProperty(JSContext *cx, JSObject *obj, const char *name, jsval value, + JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs); + +extern __attribute__((visibility("default"))) JSBool +JS_DefinePropertyById(JSContext *cx, JSObject *obj, jsid id, jsval value, + JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs); + +extern __attribute__((visibility("default"))) JSBool +JS_DefineOwnProperty(JSContext *cx, JSObject *obj, jsid id, jsval descriptor, JSBool *bp); + + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_GetPropertyAttributes(JSContext *cx, JSObject *obj, const char *name, + unsigned *attrsp, JSBool *foundp); + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_GetPropertyAttrsGetterAndSetter(JSContext *cx, JSObject *obj, + const char *name, + unsigned *attrsp, JSBool *foundp, + JSPropertyOp *getterp, + JSStrictPropertyOp *setterp); + +extern __attribute__((visibility("default"))) JSBool +JS_GetPropertyAttrsGetterAndSetterById(JSContext *cx, JSObject *obj, + jsid id, + unsigned *attrsp, JSBool *foundp, + JSPropertyOp *getterp, + JSStrictPropertyOp *setterp); + + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_SetPropertyAttributes(JSContext *cx, JSObject *obj, const char *name, + unsigned attrs, JSBool *foundp); + +extern __attribute__((visibility("default"))) JSBool +JS_DefinePropertyWithTinyId(JSContext *cx, JSObject *obj, const char *name, + int8_t tinyid, jsval value, + JSPropertyOp getter, JSStrictPropertyOp setter, + unsigned attrs); + +extern __attribute__((visibility("default"))) JSBool +JS_AlreadyHasOwnProperty(JSContext *cx, JSObject *obj, const char *name, + JSBool *foundp); + +extern __attribute__((visibility("default"))) JSBool +JS_AlreadyHasOwnPropertyById(JSContext *cx, JSObject *obj, jsid id, + JSBool *foundp); + +extern __attribute__((visibility("default"))) JSBool +JS_HasProperty(JSContext *cx, JSObject *obj, const char *name, JSBool *foundp); + +extern __attribute__((visibility("default"))) JSBool +JS_HasPropertyById(JSContext *cx, JSObject *obj, jsid id, JSBool *foundp); + +extern __attribute__((visibility("default"))) JSBool +JS_LookupProperty(JSContext *cx, JSObject *obj, const char *name, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_LookupPropertyById(JSContext *cx, JSObject *obj, jsid id, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_LookupPropertyWithFlags(JSContext *cx, JSObject *obj, const char *name, + unsigned flags, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_LookupPropertyWithFlagsById(JSContext *cx, JSObject *obj, jsid id, + unsigned flags, JSObject **objp, jsval *vp); + +struct JSPropertyDescriptor { + JSObject *obj; + unsigned attrs; + unsigned shortid; + JSPropertyOp getter; + JSStrictPropertyOp setter; + jsval value; +}; + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_GetPropertyDescriptorById(JSContext *cx, JSObject *obj, jsid id, unsigned flags, + JSPropertyDescriptor *desc); + +extern __attribute__((visibility("default"))) JSBool +JS_GetOwnPropertyDescriptor(JSContext *cx, JSObject *obj, jsid id, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_GetProperty(JSContext *cx, JSObject *obj, const char *name, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_GetPropertyDefault(JSContext *cx, JSObject *obj, const char *name, jsval def, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_GetPropertyById(JSContext *cx, JSObject *obj, jsid id, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_GetPropertyByIdDefault(JSContext *cx, JSObject *obj, jsid id, jsval def, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_ForwardGetPropertyTo(JSContext *cx, JSObject *obj, jsid id, JSObject *onBehalfOf, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_GetMethodById(JSContext *cx, JSObject *obj, jsid id, JSObject **objp, + jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_GetMethod(JSContext *cx, JSObject *obj, const char *name, JSObject **objp, + jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_SetProperty(JSContext *cx, JSObject *obj, const char *name, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_SetPropertyById(JSContext *cx, JSObject *obj, jsid id, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_DeleteProperty(JSContext *cx, JSObject *obj, const char *name); + +extern __attribute__((visibility("default"))) JSBool +JS_DeleteProperty2(JSContext *cx, JSObject *obj, const char *name, + jsval *rval); + +extern __attribute__((visibility("default"))) JSBool +JS_DeletePropertyById(JSContext *cx, JSObject *obj, jsid id); + +extern __attribute__((visibility("default"))) JSBool +JS_DeletePropertyById2(JSContext *cx, JSObject *obj, jsid id, jsval *rval); + +extern __attribute__((visibility("default"))) JSBool +JS_DefineUCProperty(JSContext *cx, JSObject *obj, + const jschar *name, size_t namelen, jsval value, + JSPropertyOp getter, JSStrictPropertyOp setter, + unsigned attrs); + + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_GetUCPropertyAttributes(JSContext *cx, JSObject *obj, + const jschar *name, size_t namelen, + unsigned *attrsp, JSBool *foundp); + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_GetUCPropertyAttrsGetterAndSetter(JSContext *cx, JSObject *obj, + const jschar *name, size_t namelen, + unsigned *attrsp, JSBool *foundp, + JSPropertyOp *getterp, + JSStrictPropertyOp *setterp); + + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_SetUCPropertyAttributes(JSContext *cx, JSObject *obj, + const jschar *name, size_t namelen, + unsigned attrs, JSBool *foundp); + + +extern __attribute__((visibility("default"))) JSBool +JS_DefineUCPropertyWithTinyId(JSContext *cx, JSObject *obj, + const jschar *name, size_t namelen, + int8_t tinyid, jsval value, + JSPropertyOp getter, JSStrictPropertyOp setter, + unsigned attrs); + +extern __attribute__((visibility("default"))) JSBool +JS_AlreadyHasOwnUCProperty(JSContext *cx, JSObject *obj, const jschar *name, + size_t namelen, JSBool *foundp); + +extern __attribute__((visibility("default"))) JSBool +JS_HasUCProperty(JSContext *cx, JSObject *obj, + const jschar *name, size_t namelen, + JSBool *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_LookupUCProperty(JSContext *cx, JSObject *obj, + const jschar *name, size_t namelen, + jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_GetUCProperty(JSContext *cx, JSObject *obj, + const jschar *name, size_t namelen, + jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_SetUCProperty(JSContext *cx, JSObject *obj, + const jschar *name, size_t namelen, + jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_DeleteUCProperty2(JSContext *cx, JSObject *obj, + const jschar *name, size_t namelen, + jsval *rval); + +extern __attribute__((visibility("default"))) JSObject * +JS_NewArrayObject(JSContext *cx, int length, jsval *vector); + +extern __attribute__((visibility("default"))) JSBool +JS_IsArrayObject(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) JSBool +JS_GetArrayLength(JSContext *cx, JSObject *obj, uint32_t *lengthp); + +extern __attribute__((visibility("default"))) JSBool +JS_SetArrayLength(JSContext *cx, JSObject *obj, uint32_t length); + +extern __attribute__((visibility("default"))) JSBool +JS_DefineElement(JSContext *cx, JSObject *obj, uint32_t index, jsval value, + JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs); + +extern __attribute__((visibility("default"))) JSBool +JS_AlreadyHasOwnElement(JSContext *cx, JSObject *obj, uint32_t index, JSBool *foundp); + +extern __attribute__((visibility("default"))) JSBool +JS_HasElement(JSContext *cx, JSObject *obj, uint32_t index, JSBool *foundp); + +extern __attribute__((visibility("default"))) JSBool +JS_LookupElement(JSContext *cx, JSObject *obj, uint32_t index, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_GetElement(JSContext *cx, JSObject *obj, uint32_t index, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_ForwardGetElementTo(JSContext *cx, JSObject *obj, uint32_t index, JSObject *onBehalfOf, + jsval *vp); + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_GetElementIfPresent(JSContext *cx, JSObject *obj, uint32_t index, JSObject *onBehalfOf, + jsval *vp, JSBool* present); + +extern __attribute__((visibility("default"))) JSBool +JS_SetElement(JSContext *cx, JSObject *obj, uint32_t index, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_DeleteElement(JSContext *cx, JSObject *obj, uint32_t index); + +extern __attribute__((visibility("default"))) JSBool +JS_DeleteElement2(JSContext *cx, JSObject *obj, uint32_t index, jsval *rval); + +extern __attribute__((visibility("default"))) void +JS_ClearScope(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) JSIdArray * +JS_Enumerate(JSContext *cx, JSObject *obj); + + + + + + +extern __attribute__((visibility("default"))) JSObject * +JS_NewPropertyIterator(JSContext *cx, JSObject *obj); + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_NextProperty(JSContext *cx, JSObject *iterobj, jsid *idp); + + + + + +extern __attribute__((visibility("default"))) JSObject * +JS_NewElementIterator(JSContext *cx, JSObject *obj); + + + + + + +extern __attribute__((visibility("default"))) JSObject * +JS_ElementIteratorStub(JSContext *cx, JSHandleObject obj, JSBool keysonly); + +extern __attribute__((visibility("default"))) JSBool +JS_CheckAccess(JSContext *cx, JSObject *obj, jsid id, JSAccessMode mode, + jsval *vp, unsigned *attrsp); + +extern __attribute__((visibility("default"))) jsval +JS_GetReservedSlot(JSObject *obj, uint32_t index); + +extern __attribute__((visibility("default"))) void +JS_SetReservedSlot(JSObject *obj, uint32_t index, jsval v); + + + + + + +struct JSPrincipals { + + int refcount; + + + + + + + + void setDebugToken(uint32_t token) { + + + + } + + + + + + __attribute__((visibility("default"))) void dump(); + +}; + +extern __attribute__((visibility("default"))) void +JS_HoldPrincipals(JSPrincipals *principals); + +extern __attribute__((visibility("default"))) void +JS_DropPrincipals(JSRuntime *rt, JSPrincipals *principals); + +struct JSSecurityCallbacks { + JSCheckAccessOp checkObjectAccess; + JSSubsumePrincipalsOp subsumePrincipals; + JSObjectPrincipalsFinder findObjectPrincipals; + JSCSPEvalChecker contentSecurityPolicyAllows; + JSPushContextPrincipalOp pushContextPrincipal; + JSPopContextPrincipalOp popContextPrincipal; +}; + +extern __attribute__((visibility("default"))) void +JS_SetSecurityCallbacks(JSRuntime *rt, const JSSecurityCallbacks *callbacks); + +extern __attribute__((visibility("default"))) const JSSecurityCallbacks * +JS_GetSecurityCallbacks(JSRuntime *rt); +# 4388 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) void +JS_SetTrustedPrincipals(JSRuntime *rt, JSPrincipals *prin); + + + + + + +extern __attribute__((visibility("default"))) void +JS_InitDestroyPrincipalsCallback(JSRuntime *rt, JSDestroyPrincipalsOp destroyPrincipals); + + + + + + +extern __attribute__((visibility("default"))) JSFunction * +JS_NewFunction(JSContext *cx, JSNative call, unsigned nargs, unsigned flags, + JSObject *parent, const char *name); + + + + + +extern __attribute__((visibility("default"))) JSFunction * +JS_NewFunctionById(JSContext *cx, JSNative call, unsigned nargs, unsigned flags, + JSObject *parent, jsid id); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetFunctionObject(JSFunction *fun); + + + + + + + +extern __attribute__((visibility("default"))) JSString * +JS_GetFunctionId(JSFunction *fun); + + + + +extern __attribute__((visibility("default"))) unsigned +JS_GetFunctionFlags(JSFunction *fun); + + + + +extern __attribute__((visibility("default"))) uint16_t +JS_GetFunctionArity(JSFunction *fun); + + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_ObjectIsFunction(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) JSBool +JS_ObjectIsCallable(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) JSBool +JS_IsNativeFunction(JSObject *funobj, JSNative call); + + + + + + +extern __attribute__((visibility("default"))) JSObject* +JS_BindCallable(JSContext *cx, JSObject *callable, JSObject *newThis); + +extern __attribute__((visibility("default"))) JSBool +JS_DefineFunctions(JSContext *cx, JSObject *obj, JSFunctionSpec *fs); + +extern __attribute__((visibility("default"))) JSFunction * +JS_DefineFunction(JSContext *cx, JSObject *obj, const char *name, JSNative call, + unsigned nargs, unsigned attrs); + +extern __attribute__((visibility("default"))) JSFunction * +JS_DefineUCFunction(JSContext *cx, JSObject *obj, + const jschar *name, size_t namelen, JSNative call, + unsigned nargs, unsigned attrs); + +extern __attribute__((visibility("default"))) JSFunction * +JS_DefineFunctionById(JSContext *cx, JSObject *obj, jsid id, JSNative call, + unsigned nargs, unsigned attrs); + +extern __attribute__((visibility("default"))) JSObject * +JS_CloneFunctionObject(JSContext *cx, JSObject *funobj, JSObject *parent); +# 4489 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_BufferIsCompilableUnit(JSContext *cx, JSBool bytes_are_utf8, + JSObject *obj, const char *bytes, size_t length); + +extern __attribute__((visibility("default"))) JSScript * +JS_CompileScript(JSContext *cx, JSObject *obj, + const char *bytes, size_t length, + const char *filename, unsigned lineno); + +extern __attribute__((visibility("default"))) JSScript * +JS_CompileScriptForPrincipals(JSContext *cx, JSObject *obj, + JSPrincipals *principals, + const char *bytes, size_t length, + const char *filename, unsigned lineno); + +extern __attribute__((visibility("default"))) JSScript * +JS_CompileScriptForPrincipalsVersion(JSContext *cx, JSObject *obj, + JSPrincipals *principals, + const char *bytes, size_t length, + const char *filename, unsigned lineno, + JSVersion version); + +extern __attribute__((visibility("default"))) JSScript * +JS_CompileUCScript(JSContext *cx, JSObject *obj, + const jschar *chars, size_t length, + const char *filename, unsigned lineno); + +extern __attribute__((visibility("default"))) JSScript * +JS_CompileUCScriptForPrincipals(JSContext *cx, JSObject *obj, + JSPrincipals *principals, + const jschar *chars, size_t length, + const char *filename, unsigned lineno); + +extern __attribute__((visibility("default"))) JSScript * +JS_CompileUCScriptForPrincipalsVersion(JSContext *cx, JSObject *obj, + JSPrincipals *principals, + const jschar *chars, size_t length, + const char *filename, unsigned lineno, + JSVersion version); + + + + +extern __attribute__((visibility("default"))) JSScript * +JS_CompileUCScriptForPrincipalsVersionOrigin(JSContext *cx, JSObject *obj, + JSPrincipals *principals, + JSPrincipals *originPrincipals, + const jschar *chars, size_t length, + const char *filename, unsigned lineno, + JSVersion version); + +extern __attribute__((visibility("default"))) JSScript * +JS_CompileUTF8File(JSContext *cx, JSObject *obj, const char *filename); + +extern __attribute__((visibility("default"))) JSScript * +JS_CompileUTF8FileHandle(JSContext *cx, JSObject *obj, const char *filename, + FILE *fh); + +extern __attribute__((visibility("default"))) JSScript * +JS_CompileUTF8FileHandleForPrincipals(JSContext *cx, JSObject *obj, + const char *filename, FILE *fh, + JSPrincipals *principals); + +extern __attribute__((visibility("default"))) JSScript * +JS_CompileUTF8FileHandleForPrincipalsVersion(JSContext *cx, JSObject *obj, + const char *filename, FILE *fh, + JSPrincipals *principals, + JSVersion version); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetGlobalFromScript(JSScript *script); + +extern __attribute__((visibility("default"))) JSFunction * +JS_CompileFunction(JSContext *cx, JSObject *obj, const char *name, + unsigned nargs, const char **argnames, + const char *bytes, size_t length, + const char *filename, unsigned lineno); + +extern __attribute__((visibility("default"))) JSFunction * +JS_CompileFunctionForPrincipals(JSContext *cx, JSObject *obj, + JSPrincipals *principals, const char *name, + unsigned nargs, const char **argnames, + const char *bytes, size_t length, + const char *filename, unsigned lineno); + +extern __attribute__((visibility("default"))) JSFunction * +JS_CompileUCFunction(JSContext *cx, JSObject *obj, const char *name, + unsigned nargs, const char **argnames, + const jschar *chars, size_t length, + const char *filename, unsigned lineno); + +extern __attribute__((visibility("default"))) JSFunction * +JS_CompileUCFunctionForPrincipals(JSContext *cx, JSObject *obj, + JSPrincipals *principals, const char *name, + unsigned nargs, const char **argnames, + const jschar *chars, size_t length, + const char *filename, unsigned lineno); + +extern __attribute__((visibility("default"))) JSFunction * +JS_CompileUCFunctionForPrincipalsVersion(JSContext *cx, JSObject *obj, + JSPrincipals *principals, const char *name, + unsigned nargs, const char **argnames, + const jschar *chars, size_t length, + const char *filename, unsigned lineno, + JSVersion version); + +extern __attribute__((visibility("default"))) JSString * +JS_DecompileScript(JSContext *cx, JSScript *script, const char *name, unsigned indent); + + + + + +#define JS_DONT_PRETTY_PRINT ((unsigned)0x8000) + +extern __attribute__((visibility("default"))) JSString * +JS_DecompileFunction(JSContext *cx, JSFunction *fun, unsigned indent); + +extern __attribute__((visibility("default"))) JSString * +JS_DecompileFunctionBody(JSContext *cx, JSFunction *fun, unsigned indent); +# 4645 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_ExecuteScript(JSContext *cx, JSObject *obj, JSScript *script, jsval *rval); + +extern __attribute__((visibility("default"))) JSBool +JS_ExecuteScriptVersion(JSContext *cx, JSObject *obj, JSScript *script, jsval *rval, + JSVersion version); + + + + + +typedef enum JSExecPart { JSEXEC_PROLOG, JSEXEC_MAIN } JSExecPart; + +extern __attribute__((visibility("default"))) JSBool +JS_EvaluateScript(JSContext *cx, JSObject *obj, + const char *bytes, unsigned length, + const char *filename, unsigned lineno, + jsval *rval); + +extern __attribute__((visibility("default"))) JSBool +JS_EvaluateScriptForPrincipals(JSContext *cx, JSObject *obj, + JSPrincipals *principals, + const char *bytes, unsigned length, + const char *filename, unsigned lineno, + jsval *rval); + +extern __attribute__((visibility("default"))) JSBool +JS_EvaluateScriptForPrincipalsVersion(JSContext *cx, JSObject *obj, + JSPrincipals *principals, + const char *bytes, unsigned length, + const char *filename, unsigned lineno, + jsval *rval, JSVersion version); + +extern __attribute__((visibility("default"))) JSBool +JS_EvaluateUCScript(JSContext *cx, JSObject *obj, + const jschar *chars, unsigned length, + const char *filename, unsigned lineno, + jsval *rval); + +extern __attribute__((visibility("default"))) JSBool +JS_EvaluateUCScriptForPrincipals(JSContext *cx, JSObject *obj, + JSPrincipals *principals, + const jschar *chars, unsigned length, + const char *filename, unsigned lineno, + jsval *rval); + +extern __attribute__((visibility("default"))) JSBool +JS_EvaluateUCScriptForPrincipalsVersion(JSContext *cx, JSObject *obj, + JSPrincipals *principals, + const jschar *chars, unsigned length, + const char *filename, unsigned lineno, + jsval *rval, JSVersion version); +# 4706 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_EvaluateUCScriptForPrincipalsVersionOrigin(JSContext *cx, JSObject *obj, + JSPrincipals *principals, + JSPrincipals *originPrincipals, + const jschar *chars, unsigned length, + const char *filename, unsigned lineno, + jsval *rval, JSVersion version); + +extern __attribute__((visibility("default"))) JSBool +JS_CallFunction(JSContext *cx, JSObject *obj, JSFunction *fun, unsigned argc, + jsval *argv, jsval *rval); + +extern __attribute__((visibility("default"))) JSBool +JS_CallFunctionName(JSContext *cx, JSObject *obj, const char *name, unsigned argc, + jsval *argv, jsval *rval); + +extern __attribute__((visibility("default"))) JSBool +JS_CallFunctionValue(JSContext *cx, JSObject *obj, jsval fval, unsigned argc, + jsval *argv, jsval *rval); + + +} + +namespace JS { + +static inline bool +Call(JSContext *cx, JSObject *thisObj, JSFunction *fun, unsigned argc, jsval *argv, jsval *rval) { + return !!JS_CallFunction(cx, thisObj, fun, argc, argv, rval); +} + +static inline bool +Call(JSContext *cx, JSObject *thisObj, const char *name, unsigned argc, jsval *argv, jsval *rval) { + return !!JS_CallFunctionName(cx, thisObj, name, argc, argv, rval); +} + +static inline bool +Call(JSContext *cx, JSObject *thisObj, jsval fun, unsigned argc, jsval *argv, jsval *rval) { + return !!JS_CallFunctionValue(cx, thisObj, fun, argc, argv, rval); +} + +extern __attribute__((visibility("default"))) bool +Call(JSContext *cx, jsval thisv, jsval fun, unsigned argc, jsval *argv, jsval *rval); + +static inline bool +Call(JSContext *cx, jsval thisv, JSObject *funObj, unsigned argc, jsval *argv, jsval *rval) { + return Call(cx, thisv, OBJECT_TO_JSVAL(funObj), argc, argv, rval); +} + +} + +extern "C" { +# 4772 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSOperationCallback +JS_SetOperationCallback(JSContext *cx, JSOperationCallback callback); + +extern __attribute__((visibility("default"))) JSOperationCallback +JS_GetOperationCallback(JSContext *cx); + +extern __attribute__((visibility("default"))) void +JS_TriggerOperationCallback(JSRuntime *rt); + +extern __attribute__((visibility("default"))) JSBool +JS_IsRunning(JSContext *cx); +# 4795 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_SaveFrameChain(JSContext *cx); + +extern __attribute__((visibility("default"))) void +JS_RestoreFrameChain(JSContext *cx); +# 4829 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSString * +JS_NewStringCopyN(JSContext *cx, const char *s, size_t n); + +extern __attribute__((visibility("default"))) JSString * +JS_NewStringCopyZ(JSContext *cx, const char *s); + +extern __attribute__((visibility("default"))) JSString * +JS_InternJSString(JSContext *cx, JSString *str); + +extern __attribute__((visibility("default"))) JSString * +JS_InternString(JSContext *cx, const char *s); + +extern __attribute__((visibility("default"))) JSString * +JS_NewUCString(JSContext *cx, jschar *chars, size_t length); + +extern __attribute__((visibility("default"))) JSString * +JS_NewUCStringCopyN(JSContext *cx, const jschar *s, size_t n); + +extern __attribute__((visibility("default"))) JSString * +JS_NewUCStringCopyZ(JSContext *cx, const jschar *s); + +extern __attribute__((visibility("default"))) JSString * +JS_InternUCStringN(JSContext *cx, const jschar *s, size_t length); + +extern __attribute__((visibility("default"))) JSString * +JS_InternUCString(JSContext *cx, const jschar *s); + +extern __attribute__((visibility("default"))) JSBool +JS_CompareStrings(JSContext *cx, JSString *str1, JSString *str2, int32_t *result); + +extern __attribute__((visibility("default"))) JSBool +JS_StringEqualsAscii(JSContext *cx, JSString *str, const char *asciiBytes, JSBool *match); + +extern __attribute__((visibility("default"))) size_t +JS_PutEscapedString(JSContext *cx, char *buffer, size_t size, JSString *str, char quote); + +extern __attribute__((visibility("default"))) JSBool +JS_FileEscapedString(FILE *fp, JSString *str, char quote); +# 4903 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) size_t +JS_GetStringLength(JSString *str); + +extern __attribute__((visibility("default"))) const jschar * +JS_GetStringCharsAndLength(JSContext *cx, JSString *str, size_t *length); + +extern __attribute__((visibility("default"))) const jschar * +JS_GetInternedStringChars(JSString *str); + +extern __attribute__((visibility("default"))) const jschar * +JS_GetInternedStringCharsAndLength(JSString *str, size_t *length); + +extern __attribute__((visibility("default"))) const jschar * +JS_GetStringCharsZ(JSContext *cx, JSString *str); + +extern __attribute__((visibility("default"))) const jschar * +JS_GetStringCharsZAndLength(JSContext *cx, JSString *str, size_t *length); + +extern __attribute__((visibility("default"))) JSFlatString * +JS_FlattenString(JSContext *cx, JSString *str); + +extern __attribute__((visibility("default"))) const jschar * +JS_GetFlatStringChars(JSFlatString *str); + +static __attribute__((always_inline)) inline JSFlatString * +JSID_TO_FLAT_STRING(jsid id) +{ + do { } while(0); + return (JSFlatString *)((id)); +} + +static __attribute__((always_inline)) inline JSFlatString * +JS_ASSERT_STRING_IS_FLAT(JSString *str) +{ + do { } while(0); + return (JSFlatString *)str; +} + +static __attribute__((always_inline)) inline JSString * +JS_FORGET_STRING_FLATNESS(JSFlatString *fstr) +{ + return (JSString *)fstr; +} + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_FlatStringEqualsAscii(JSFlatString *str, const char *asciiBytes); + +extern __attribute__((visibility("default"))) size_t +JS_PutEscapedFlatString(char *buffer, size_t size, JSFlatString *str, char quote); + + + + + +extern __attribute__((visibility("default"))) JSString * +JS_NewGrowableString(JSContext *cx, jschar *chars, size_t length); +# 4990 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSString * +JS_NewDependentString(JSContext *cx, JSString *str, size_t start, + size_t length); + + + + + +extern __attribute__((visibility("default"))) JSString * +JS_ConcatStrings(JSContext *cx, JSString *left, JSString *right); + + + + + +extern __attribute__((visibility("default"))) const jschar * +JS_UndependString(JSContext *cx, JSString *str); + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_MakeStringImmutable(JSContext *cx, JSString *str); + + + + + +__attribute__((visibility("default"))) JSBool +JS_CStringsAreUTF8(void); + + + + + + +__attribute__((visibility("default"))) void +JS_SetCStringsAreUTF8(void); +# 5053 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +__attribute__((visibility("default"))) JSBool +JS_EncodeCharacters(JSContext *cx, const jschar *src, size_t srclen, char *dst, + size_t *dstlenp); + +__attribute__((visibility("default"))) JSBool +JS_DecodeBytes(JSContext *cx, const char *src, size_t srclen, jschar *dst, + size_t *dstlenp); + +__attribute__((visibility("default"))) JSBool +JS_DecodeUTF8(JSContext *cx, const char *src, size_t srclen, jschar *dst, + size_t *dstlenp); + + + + + +__attribute__((visibility("default"))) char * +JS_EncodeString(JSContext *cx, JSString *str); + + + + + + +__attribute__((visibility("default"))) size_t +JS_GetStringEncodingLength(JSContext *cx, JSString *str); +# 5093 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +__attribute__((visibility("default"))) size_t +JS_EncodeStringToBuffer(JSString *str, char *buffer, size_t length); + + + +class JSAutoByteString { + public: + JSAutoByteString(JSContext *cx, JSString *str ) + : mBytes(JS_EncodeString(cx, str)) { + do { } while(0); + do { } while (0); + } + + JSAutoByteString() + : mBytes(__null) { + do { } while (0); + } + + ~JSAutoByteString() { + js::UnwantedForeground::free_(mBytes); + } + + + void initBytes(char *bytes) { + do { } while(0); + mBytes = bytes; + } + + char *encode(JSContext *cx, JSString *str) { + do { } while(0); + do { } while(0); + mBytes = JS_EncodeString(cx, str); + return mBytes; + } + + void clear() { + js::UnwantedForeground::free_(mBytes); + mBytes = __null; + } + + char *ptr() const { + return mBytes; + } + + bool operator!() const { + return !mBytes; + } + + private: + char *mBytes; + + + + JSAutoByteString(const JSAutoByteString &another); + JSAutoByteString &operator=(const JSAutoByteString &another); +}; + + + + + + + +typedef JSBool (* JSONWriteCallback)(const jschar *buf, uint32_t len, void *data); + + + + +__attribute__((visibility("default"))) JSBool +JS_Stringify(JSContext *cx, jsval *vp, JSObject *replacer, jsval space, + JSONWriteCallback callback, void *data); + + + + +__attribute__((visibility("default"))) JSBool +JS_ParseJSON(JSContext *cx, const jschar *chars, uint32_t len, jsval *vp); + +__attribute__((visibility("default"))) JSBool +JS_ParseJSONWithReviver(JSContext *cx, const jschar *chars, uint32_t len, jsval reviver, + jsval *vp); + + + + + + +#define JS_STRUCTURED_CLONE_VERSION 1 + +struct JSStructuredCloneCallbacks { + ReadStructuredCloneOp read; + WriteStructuredCloneOp write; + StructuredCloneErrorOp reportError; +}; + +__attribute__((visibility("default"))) JSBool +JS_ReadStructuredClone(JSContext *cx, const uint64_t *data, size_t nbytes, + uint32_t version, jsval *vp, + const JSStructuredCloneCallbacks *optionalCallbacks, + void *closure); + + +__attribute__((visibility("default"))) JSBool +JS_WriteStructuredClone(JSContext *cx, jsval v, uint64_t **datap, size_t *nbytesp, + const JSStructuredCloneCallbacks *optionalCallbacks, + void *closure); + +__attribute__((visibility("default"))) JSBool +JS_StructuredClone(JSContext *cx, jsval v, jsval *vp, + const JSStructuredCloneCallbacks *optionalCallbacks, + void *closure); + + +} + + +class __attribute__((visibility("default"))) JSAutoStructuredCloneBuffer { + uint64_t *data_; + size_t nbytes_; + uint32_t version_; + + public: + JSAutoStructuredCloneBuffer() + : data_(__null), nbytes_(0), version_(1) {} + + ~JSAutoStructuredCloneBuffer() { clear(); } + + uint64_t *data() const { return data_; } + size_t nbytes() const { return nbytes_; } + + void clear(); + + + bool copy(const uint64_t *data, size_t nbytes, uint32_t version=1); + + + + + + + void adopt(uint64_t *data, size_t nbytes, uint32_t version=1); + + + + + + + void steal(uint64_t **datap, size_t *nbytesp, uint32_t *versionp=__null); + + bool read(JSContext *cx, jsval *vp, + const JSStructuredCloneCallbacks *optionalCallbacks=__null, + void *closure=__null) const; + + bool write(JSContext *cx, jsval v, + const JSStructuredCloneCallbacks *optionalCallbacks=__null, + void *closure=__null); + + + + + void swap(JSAutoStructuredCloneBuffer &other); + + private: + + JSAutoStructuredCloneBuffer(const JSAutoStructuredCloneBuffer &other); + JSAutoStructuredCloneBuffer &operator=(const JSAutoStructuredCloneBuffer &other); +}; + +extern "C" { + + + + + +#define JS_SCTAG_USER_MIN ((uint32_t) 0xFFFF8000) +#define JS_SCTAG_USER_MAX ((uint32_t) 0xFFFFFFFF) + +#define JS_SCERR_RECURSION 0 + +__attribute__((visibility("default"))) void +JS_SetStructuredCloneCallbacks(JSRuntime *rt, const JSStructuredCloneCallbacks *callbacks); + +__attribute__((visibility("default"))) JSBool +JS_ReadUint32Pair(JSStructuredCloneReader *r, uint32_t *p1, uint32_t *p2); + +__attribute__((visibility("default"))) JSBool +JS_ReadBytes(JSStructuredCloneReader *r, void *p, size_t len); + +__attribute__((visibility("default"))) JSBool +JS_ReadTypedArray(JSStructuredCloneReader *r, jsval *vp); + +__attribute__((visibility("default"))) JSBool +JS_WriteUint32Pair(JSStructuredCloneWriter *w, uint32_t tag, uint32_t data); + +__attribute__((visibility("default"))) JSBool +JS_WriteBytes(JSStructuredCloneWriter *w, const void *p, size_t len); + +__attribute__((visibility("default"))) JSBool +JS_WriteTypedArray(JSStructuredCloneWriter *w, jsval v); + + + + + + +struct JSLocaleCallbacks { + JSLocaleToUpperCase localeToUpperCase; + JSLocaleToLowerCase localeToLowerCase; + JSLocaleCompare localeCompare; + JSLocaleToUnicode localeToUnicode; + JSErrorCallback localeGetErrorMessage; +}; + + + + + +extern __attribute__((visibility("default"))) void +JS_SetLocaleCallbacks(JSContext *cx, JSLocaleCallbacks *callbacks); + + + + + +extern __attribute__((visibility("default"))) JSLocaleCallbacks * +JS_GetLocaleCallbacks(JSContext *cx); +# 5331 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) void +JS_ReportError(JSContext *cx, const char *format, ...); + + + + +extern __attribute__((visibility("default"))) void +JS_ReportErrorNumber(JSContext *cx, JSErrorCallback errorCallback, + void *userRef, const unsigned errorNumber, ...); + + + + +extern __attribute__((visibility("default"))) void +JS_ReportErrorNumberUC(JSContext *cx, JSErrorCallback errorCallback, + void *userRef, const unsigned errorNumber, ...); + + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_ReportWarning(JSContext *cx, const char *format, ...); + +extern __attribute__((visibility("default"))) JSBool +JS_ReportErrorFlagsAndNumber(JSContext *cx, unsigned flags, + JSErrorCallback errorCallback, void *userRef, + const unsigned errorNumber, ...); + +extern __attribute__((visibility("default"))) JSBool +JS_ReportErrorFlagsAndNumberUC(JSContext *cx, unsigned flags, + JSErrorCallback errorCallback, void *userRef, + const unsigned errorNumber, ...); + + + + +extern __attribute__((visibility("default"))) void +JS_ReportOutOfMemory(JSContext *cx); + + + + +extern __attribute__((visibility("default"))) void +JS_ReportAllocationOverflow(JSContext *cx); + +struct JSErrorReport { + const char *filename; + JSPrincipals *originPrincipals; + unsigned lineno; + const char *linebuf; + const char *tokenptr; + const jschar *uclinebuf; + const jschar *uctokenptr; + unsigned flags; + unsigned errorNumber; + const jschar *ucmessage; + const jschar **messageArgs; +}; + + + + +#define JSREPORT_ERROR 0x0 +#define JSREPORT_WARNING 0x1 +#define JSREPORT_EXCEPTION 0x2 +#define JSREPORT_STRICT 0x4 +# 5408 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JSREPORT_STRICT_MODE_ERROR 0x8 +# 5417 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JSREPORT_IS_WARNING(flags) (((flags) & JSREPORT_WARNING) != 0) +#define JSREPORT_IS_EXCEPTION(flags) (((flags) & JSREPORT_EXCEPTION) != 0) +#define JSREPORT_IS_STRICT(flags) (((flags) & JSREPORT_STRICT) != 0) +#define JSREPORT_IS_STRICT_MODE_ERROR(flags) (((flags) & JSREPORT_STRICT_MODE_ERROR) != 0) + +extern __attribute__((visibility("default"))) JSErrorReporter +JS_GetErrorReporter(JSContext *cx); + +extern __attribute__((visibility("default"))) JSErrorReporter +JS_SetErrorReporter(JSContext *cx, JSErrorReporter er); + + + + + + + +extern __attribute__((visibility("default"))) JSObject * +JS_NewDateObject(JSContext *cx, int year, int mon, int mday, int hour, int min, int sec); + +extern __attribute__((visibility("default"))) JSObject * +JS_NewDateObjectMsec(JSContext *cx, double msec); + + + + +extern __attribute__((visibility("default"))) JSBool +JS_ObjectIsDate(JSContext *cx, JSObject *obj); + + + + + + +#define JSREG_FOLD 0x01 +#define JSREG_GLOB 0x02 +#define JSREG_MULTILINE 0x04 +#define JSREG_STICKY 0x08 + +extern __attribute__((visibility("default"))) JSObject * +JS_NewRegExpObject(JSContext *cx, JSObject *obj, char *bytes, size_t length, unsigned flags); + +extern __attribute__((visibility("default"))) JSObject * +JS_NewUCRegExpObject(JSContext *cx, JSObject *obj, jschar *chars, size_t length, unsigned flags); + +extern __attribute__((visibility("default"))) void +JS_SetRegExpInput(JSContext *cx, JSObject *obj, JSString *input, JSBool multiline); + +extern __attribute__((visibility("default"))) void +JS_ClearRegExpStatics(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) JSBool +JS_ExecuteRegExp(JSContext *cx, JSObject *obj, JSObject *reobj, jschar *chars, size_t length, + size_t *indexp, JSBool test, jsval *rval); + + + +extern __attribute__((visibility("default"))) JSObject * +JS_NewRegExpObjectNoStatics(JSContext *cx, char *bytes, size_t length, unsigned flags); + +extern __attribute__((visibility("default"))) JSObject * +JS_NewUCRegExpObjectNoStatics(JSContext *cx, jschar *chars, size_t length, unsigned flags); + +extern __attribute__((visibility("default"))) JSBool +JS_ExecuteRegExpNoStatics(JSContext *cx, JSObject *reobj, jschar *chars, size_t length, + size_t *indexp, JSBool test, jsval *rval); + +extern __attribute__((visibility("default"))) JSBool +JS_ObjectIsRegExp(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) unsigned +JS_GetRegExpFlags(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) JSString * +JS_GetRegExpSource(JSContext *cx, JSObject *obj); + + + +extern __attribute__((visibility("default"))) JSBool +JS_IsExceptionPending(JSContext *cx); + +extern __attribute__((visibility("default"))) JSBool +JS_GetPendingException(JSContext *cx, jsval *vp); + +extern __attribute__((visibility("default"))) void +JS_SetPendingException(JSContext *cx, jsval v); + +extern __attribute__((visibility("default"))) void +JS_ClearPendingException(JSContext *cx); + +extern __attribute__((visibility("default"))) JSBool +JS_ReportPendingException(JSContext *cx); +# 5521 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSExceptionState * +JS_SaveExceptionState(JSContext *cx); + +extern __attribute__((visibility("default"))) void +JS_RestoreExceptionState(JSContext *cx, JSExceptionState *state); + +extern __attribute__((visibility("default"))) void +JS_DropExceptionState(JSContext *cx, JSExceptionState *state); +# 5537 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSErrorReport * +JS_ErrorFromException(JSContext *cx, jsval v); + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_ThrowReportedError(JSContext *cx, const char *message, + JSErrorReport *reportp); + + + + +extern __attribute__((visibility("default"))) JSBool +JS_ThrowStopIteration(JSContext *cx); + +extern __attribute__((visibility("default"))) intptr_t +JS_GetCurrentThread(); +# 5573 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) void +JS_AbortIfWrongThread(JSRuntime *rt); + +extern __attribute__((visibility("default"))) void +JS_ClearRuntimeThread(JSRuntime *rt); + +extern __attribute__((visibility("default"))) void +JS_SetRuntimeThread(JSRuntime *rt); + + +} + +class JSAutoSetRuntimeThread +{ + JSRuntime *runtime; + + public: + JSAutoSetRuntimeThread(JSRuntime *runtime) : runtime(runtime) { + JS_SetRuntimeThread(runtime); + } + + ~JSAutoSetRuntimeThread() { + JS_ClearRuntimeThread(runtime); + } +}; + +extern "C" { +# 5611 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +static __attribute__((always_inline)) inline JSBool +JS_IsConstructing(JSContext *cx, const jsval *vp) +{ +# 5623 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" + (void)cx; + + + return JSVAL_IS_MAGIC_IMPL(JSVAL_TO_IMPL(vp[1])); +} + + + + + + +extern __attribute__((visibility("default"))) JSObject * +JS_NewObjectForConstructor(JSContext *cx, JSClass *clasp, const jsval *vp); +# 5656 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_IndexToId(JSContext *cx, uint32_t index, jsid *id); + + + + +extern __attribute__((visibility("default"))) JSBool +JS_IsIdentifier(JSContext *cx, JSString *str, JSBool *isIdentifier); + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_DescribeScriptedCaller(JSContext *cx, JSScript **script, unsigned *lineno); + + + + + + +extern __attribute__((visibility("default"))) void * +JS_EncodeScript(JSContext *cx, JSScript *script, uint32_t *lengthp); + +extern __attribute__((visibility("default"))) void * +JS_EncodeInterpretedFunction(JSContext *cx, JSObject *funobj, uint32_t *lengthp); + +extern __attribute__((visibility("default"))) JSScript * +JS_DecodeScript(JSContext *cx, const void *data, uint32_t length, + JSPrincipals *principals, JSPrincipals *originPrincipals); + +extern __attribute__((visibility("default"))) JSObject * +JS_DecodeInterpretedFunction(JSContext *cx, const void *data, uint32_t length, + JSPrincipals *principals, JSPrincipals *originPrincipals); + +} +# 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 1 + + + + + + + +#define jsatom_h___ + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 11 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" 1 +# 42 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_VERSION_ECMA_3 148 +#define JS_VERSION_ECMA_3_TEST 149 +# 124 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_HAS_STR_HTML_HELPERS 1 +#define JS_HAS_OBJ_PROTO_PROP 1 +#define JS_HAS_OBJ_WATCHPOINT 1 +#define JS_HAS_TOSOURCE 1 +#define JS_HAS_CATCH_GUARD 1 +#define JS_HAS_UNEVAL 1 +#define JS_HAS_CONST 1 +#define JS_HAS_FUN_EXPR_STMT 1 +#define JS_HAS_NO_SUCH_METHOD 1 +#define JS_HAS_GENERATORS 1 +#define JS_HAS_BLOCK_SCOPE 1 +#define JS_HAS_DESTRUCTURING 2 +#define JS_HAS_GENERATOR_EXPRS 1 +#define JS_HAS_EXPR_CLOSURES 1 +# 146 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_HAS_NEW_GLOBAL_OBJECT 1 + + +#define JS_HAS_MAKE_SYSTEM_OBJECT 1 + + +#define JS_HAS_DESTRUCTURING_SHORTHAND (JS_HAS_DESTRUCTURING == 2) + + + + + +#define OLD_GETTER_SETTER_METHODS 1 + + +#define USE_NEW_OBJECT_REPRESENTATION 0 + + + + +#define NEW_OBJECT_REPRESENTATION_ONLY() MOZ_NOT_REACHED("don't call this! to be used in the new object representation") +# 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprvtd.h" 1 + + + + + + + +#define jsprvtd_h___ +# 28 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprvtd.h" +# 1 "./../../dist/include/js/HashTable.h" 1 +# 9 "./../../dist/include/js/HashTable.h" +#define jshashtable_h_ + + + + +namespace js { + +class TempAllocPolicy; + + +typedef uint32_t HashNumber; + + + +namespace detail { + +template +class HashTable; + +template +class HashTableEntry { + HashNumber keyHash; + + typedef typename tl::StripConst::result NonConstT; + + static const HashNumber sFreeKey = 0; + static const HashNumber sRemovedKey = 1; + static const HashNumber sCollisionBit = 1; + + template friend class HashTable; + + static bool isLiveHash(HashNumber hash) + { + return hash > sRemovedKey; + } + + public: + HashTableEntry() : keyHash(0), t() {} + HashTableEntry(MoveRef rhs) : keyHash(rhs->keyHash), t(Move(rhs->t)) { } + void operator=(const HashTableEntry &rhs) { keyHash = rhs.keyHash; t = rhs.t; } + void operator=(MoveRef rhs) { keyHash = rhs->keyHash; t = Move(rhs->t); } + + NonConstT t; + + bool isFree() const { return keyHash == sFreeKey; } + void setFree() { keyHash = sFreeKey; t = T(); } + bool isRemoved() const { return keyHash == sRemovedKey; } + void setRemoved() { keyHash = sRemovedKey; t = T(); } + bool isLive() const { return isLiveHash(keyHash); } + void setLive(HashNumber hn) { do { } while(0); keyHash = hn; } + + void setCollision() { do { } while(0); keyHash |= sCollisionBit; } + void setCollision(HashNumber collisionBit) { + do { } while(0); keyHash |= collisionBit; + } + void unsetCollision() { keyHash &= ~sCollisionBit; } + bool hasCollision() const { do { } while(0); return keyHash & sCollisionBit; } + bool matchHash(HashNumber hn) { return (keyHash & ~sCollisionBit) == hn; } + HashNumber getKeyHash() const { do { } while(0); return keyHash; } +}; +# 77 "./../../dist/include/js/HashTable.h" +template +class HashTable : private AllocPolicy +{ + typedef typename tl::StripConst::result NonConstT; + typedef typename HashPolicy::KeyType Key; + typedef typename HashPolicy::Lookup Lookup; + + public: + typedef HashTableEntry Entry; + + + + + + + + class Ptr + { + friend class HashTable; + typedef void (Ptr::* ConvertibleToBool)(); + void nonNull() {} + + Entry *entry; + + protected: + Ptr(Entry &entry) : entry(&entry) {} + + public: + + Ptr() { + + + + } + + bool found() const { return entry->isLive(); } + operator ConvertibleToBool() const { return found() ? &Ptr::nonNull : 0; } + bool operator==(const Ptr &rhs) const { do { } while(0); return entry == rhs.entry; } + bool operator!=(const Ptr &rhs) const { return !(*this == rhs); } + + T &operator*() const { return entry->t; } + T *operator->() const { return &entry->t; } + }; + + + class AddPtr : public Ptr + { + friend class HashTable; + HashNumber keyHash; + DebugOnly mutationCount; + + AddPtr(Entry &entry, HashNumber hn) : Ptr(entry), keyHash(hn) {} + public: + + AddPtr() {} + }; + + + + + + + + class Range + { + protected: + friend class HashTable; + + Range(Entry *c, Entry *e) : cur(c), end(e), validEntry(true) { + while (cur < end && !cur->isLive()) + ++cur; + } + + Entry *cur, *end; + DebugOnly validEntry; + + public: + Range() : cur(__null), end(__null), validEntry(false) {} + + bool empty() const { + return cur == end; + } + + T &front() const { + do { } while(0); + do { } while(0); + return cur->t; + } + + void popFront() { + do { } while(0); + while (++cur < end && !cur->isLive()) + continue; + validEntry = true; + } + }; +# 183 "./../../dist/include/js/HashTable.h" + class Enum : public Range + { + friend class HashTable; + + HashTable &table; + bool added; + bool removed; + + + Enum(const Enum &); + void operator=(const Enum &); + + public: + template explicit + Enum(Map &map) : Range(map.all()), table(map.impl), added(false), removed(false) {} +# 208 "./../../dist/include/js/HashTable.h" + void removeFront() { + table.remove(*this->cur); + removed = true; + this->validEntry = false; + } + + + + + + + void rekeyFront(const Lookup &l, const Key &k) { + do { } while(0); + if (match(*this->cur, l)) + return; + Entry e = *this->cur; + HashPolicy::setKey(e.t, const_cast(k)); + table.remove(*this->cur); + table.add(l, e); + added = true; + this->validEntry = false; + } + + void rekeyFront(const Key &k) { + rekeyFront(k, k); + } + + + ~Enum() { + if (added) + table.checkOverloaded(); + if (removed) + table.checkUnderloaded(); + } + + + void endEnumeration() { + if (added) { + table.checkOverloaded(); + added = false; + } + if (removed) { + table.checkUnderloaded(); + removed = false; + } + } + }; + + private: + uint32_t hashShift; + uint32_t entryCount; + uint32_t gen; + uint32_t removedCount; + Entry *table; + + void setTableSizeLog2(unsigned sizeLog2) { + hashShift = sHashBits - sizeLog2; + } +# 282 "./../../dist/include/js/HashTable.h" +#define METER(x) + + + friend class js::ReentrancyGuard; + mutable DebugOnly entered; + DebugOnly mutationCount; + + + static const unsigned sMinSizeLog2 = 2; + static const unsigned sMinSize = 1 << sMinSizeLog2; + static const unsigned sDefaultInitSizeLog2 = 4; + public: + static const unsigned sDefaultInitSize = 1 << sDefaultInitSizeLog2; + private: + static const unsigned sMaxInit = ((uint32_t)1 << (23)); + static const unsigned sMaxCapacity = ((uint32_t)1 << (24)); + static const unsigned sHashBits = tl::BitSize::result; + static const uint8_t sMinAlphaFrac = 64; + static const uint8_t sMaxAlphaFrac = 192; + static const uint8_t sInvMaxAlpha = 171; + static const HashNumber sGoldenRatio = 0x9E3779B9U; + static const HashNumber sFreeKey = Entry::sFreeKey; + static const HashNumber sRemovedKey = Entry::sRemovedKey; + static const HashNumber sCollisionBit = Entry::sCollisionBit; + + static void staticAsserts() + { + + typedef int moz_static_assert14[(((sMaxInit * sInvMaxAlpha) >> 7) < sMaxCapacity) ? 1 : -1]; + typedef int moz_static_assert15[((sMaxCapacity * sInvMaxAlpha) <= (4294967295U)) ? 1 : -1]; + typedef int moz_static_assert16[((sMaxCapacity * sizeof(Entry)) <= (4294967295U)) ? 1 : -1]; + } + + static bool isLiveHash(HashNumber hash) + { + return Entry::isLiveHash(hash); + } + + static HashNumber prepareHash(const Lookup& l) + { + HashNumber keyHash = HashPolicy::hash(l); + + + keyHash *= sGoldenRatio; + + + if (!isLiveHash(keyHash)) + keyHash -= (sRemovedKey + 1); + return keyHash & ~sCollisionBit; + } + + static Entry *createTable(AllocPolicy &alloc, uint32_t capacity) + { + Entry *newTable = (Entry *)alloc.malloc_(capacity * sizeof(Entry)); + if (!newTable) + return __null; + for (Entry *e = newTable, *end = e + capacity; e < end; ++e) + new(e) Entry(); + return newTable; + } + + static void destroyTable(AllocPolicy &alloc, Entry *oldTable, uint32_t capacity) + { + for (Entry *e = oldTable, *end = e + capacity; e < end; ++e) + e->~Entry(); + alloc.free_(oldTable); + } + + public: + HashTable(AllocPolicy ap) + : AllocPolicy(ap), + hashShift(sHashBits), + entryCount(0), + gen(0), + removedCount(0), + table(__null), + entered(false), + mutationCount(0) + {} + + __attribute__ ((warn_unused_result)) bool init(uint32_t length) + { + + do { } while(0); + + + + + + if (length > sMaxInit) { + this->reportAllocOverflow(); + return false; + } + uint32_t capacity = (length * sInvMaxAlpha) >> 7; + + if (capacity < sMinSize) + capacity = sMinSize; + + + uint32_t roundUp = sMinSize, roundUpLog2 = sMinSizeLog2; + while (roundUp < capacity) { + roundUp <<= 1; + ++roundUpLog2; + } + + capacity = roundUp; + do { } while(0); + + table = createTable(*this, capacity); + if (!table) + return false; + + setTableSizeLog2(roundUpLog2); + ; + return true; + } + + bool initialized() const + { + return !!table; + } + + ~HashTable() + { + if (table) + destroyTable(*this, table, capacity()); + } + + private: + static HashNumber hash1(HashNumber hash0, uint32_t shift) { + return hash0 >> shift; + } + + struct DoubleHash { + HashNumber h2; + HashNumber sizeMask; + }; + + DoubleHash hash2(HashNumber curKeyHash, uint32_t hashShift) const { + unsigned sizeLog2 = sHashBits - hashShift; + DoubleHash dh = { + ((curKeyHash << sizeLog2) >> hashShift) | 1, + (HashNumber(1) << sizeLog2) - 1 + }; + return dh; + } + + static HashNumber applyDoubleHash(HashNumber h1, const DoubleHash &dh) { + return (h1 - dh.h2) & dh.sizeMask; + } + + bool overloaded() { + return entryCount + removedCount >= ((sMaxAlphaFrac * capacity()) >> 8); + } + + bool underloaded() { + uint32_t tableCapacity = capacity(); + return tableCapacity > sMinSize && + entryCount <= ((sMinAlphaFrac * tableCapacity) >> 8); + } + + static bool match(Entry &e, const Lookup &l) { + return HashPolicy::match(HashPolicy::getKey(e.t), l); + } + + Entry &lookup(const Lookup &l, HashNumber keyHash, unsigned collisionBit) const + { + do { } while(0); + do { } while(0); + do { } while(0); + do { } while(0); + ; + + + HashNumber h1 = hash1(keyHash, hashShift); + Entry *entry = &table[h1]; + + + if (entry->isFree()) { + ; + return *entry; + } + + + if (entry->matchHash(keyHash) && match(*entry, l)) { + ; + return *entry; + } + + + DoubleHash dh = hash2(keyHash, hashShift); + + + Entry *firstRemoved = __null; + + while(true) { + if ((__builtin_expect((entry->isRemoved()), 0))) { + if (!firstRemoved) + firstRemoved = entry; + } else { + entry->setCollision(collisionBit); + } + + ; + h1 = applyDoubleHash(h1, dh); + + entry = &table[h1]; + if (entry->isFree()) { + ; + return firstRemoved ? *firstRemoved : *entry; + } + + if (entry->matchHash(keyHash) && match(*entry, l)) { + ; + return *entry; + } + } + } +# 509 "./../../dist/include/js/HashTable.h" + Entry &findFreeEntry(HashNumber keyHash) + { + ; + do { } while(0); + + + + + HashNumber h1 = hash1(keyHash, hashShift); + Entry *entry = &table[h1]; + + + if (entry->isFree()) { + ; + return *entry; + } + + + DoubleHash dh = hash2(keyHash, hashShift); + + while(true) { + do { } while(0); + entry->setCollision(); + + ; + h1 = applyDoubleHash(h1, dh); + + entry = &table[h1]; + if (entry->isFree()) { + ; + return *entry; + } + } + } + + bool changeTableSize(int deltaLog2) + { + + Entry *oldTable = table; + uint32_t oldCap = capacity(); + uint32_t newLog2 = sHashBits - hashShift + deltaLog2; + uint32_t newCapacity = ((uint32_t)1 << (newLog2)); + if (newCapacity > sMaxCapacity) { + this->reportAllocOverflow(); + return false; + } + + Entry *newTable = createTable(*this, newCapacity); + if (!newTable) + return false; + + + setTableSizeLog2(newLog2); + removedCount = 0; + gen++; + table = newTable; + + + for (Entry *src = oldTable, *end = src + oldCap; src < end; ++src) { + if (src->isLive()) { + src->unsetCollision(); + findFreeEntry(src->getKeyHash()) = Move(*src); + } + } + + destroyTable(*this, oldTable, oldCap); + return true; + } + + void add(const Lookup &l, const Entry &e) + { + HashNumber keyHash = prepareHash(l); + Entry &entry = lookup(l, keyHash, sCollisionBit); + + if (entry.isRemoved()) { + ; + removedCount--; + keyHash |= sCollisionBit; + } + + entry.t = e.t; + entry.setLive(keyHash); + entryCount++; + mutationCount++; + } + + bool checkOverloaded() + { + if (!overloaded()) + return false; + + + int deltaLog2; + if (removedCount >= (capacity() >> 2)) { + ; + deltaLog2 = 0; + } else { + ; + deltaLog2 = 1; + } + + return changeTableSize(deltaLog2); + } + + void remove(Entry &e) + { + ; + if (e.hasCollision()) { + e.setRemoved(); + removedCount++; + } else { + ; + e.setFree(); + } + entryCount--; + mutationCount++; + } + + void checkUnderloaded() + { + if (underloaded()) { + ; + (void) changeTableSize(-1); + } + } + + public: + void clear() + { + if (tl::IsPodType::result) { + memset(table, 0, sizeof(*table) * capacity()); + } else { + uint32_t tableCapacity = capacity(); + for (Entry *e = table, *end = table + tableCapacity; e < end; ++e) + *e = Move(Entry()); + } + removedCount = 0; + entryCount = 0; + mutationCount++; + } + + void finish() + { + do { } while(0); + + if (!table) + return; + + destroyTable(*this, table, capacity()); + table = __null; + gen++; + entryCount = 0; + removedCount = 0; + mutationCount++; + } + + Range all() const { + return Range(table, table + capacity()); + } + + bool empty() const { + return !entryCount; + } + + uint32_t count() const { + return entryCount; + } + + uint32_t capacity() const { + return ((uint32_t)1 << (sHashBits - hashShift)); + } + + uint32_t generation() const { + return gen; + } + + size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const { + return mallocSizeOf(table); + } + + size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const { + return mallocSizeOf(this) + sizeOfExcludingThis(mallocSizeOf); + } + + Ptr lookup(const Lookup &l) const { + ReentrancyGuard g(*this); + HashNumber keyHash = prepareHash(l); + return Ptr(lookup(l, keyHash, 0)); + } + + AddPtr lookupForAdd(const Lookup &l) const { + ReentrancyGuard g(*this); + HashNumber keyHash = prepareHash(l); + Entry &entry = lookup(l, keyHash, sCollisionBit); + AddPtr p(entry, keyHash); + p.mutationCount = mutationCount; + return p; + } + + bool add(AddPtr &p) + { + ReentrancyGuard g(*this); + do { } while(0); + do { } while(0); + do { } while(0); + do { } while(0); + + + + + + if (p.entry->isRemoved()) { + ; + removedCount--; + p.keyHash |= sCollisionBit; + } else { + if (checkOverloaded()) + + p.entry = &findFreeEntry(p.keyHash); + } + + p.entry->setLive(p.keyHash); + entryCount++; + mutationCount++; + return true; + } + + + + + + + bool add(AddPtr &p, T** pentry) + { + if (!add(p)) + return false; + *pentry = &p.entry->t; + return true; + } + + bool add(AddPtr &p, const T &t) + { + if (!add(p)) + return false; + p.entry->t = t; + return true; + } + + bool relookupOrAdd(AddPtr& p, const Lookup &l, const T& t) + { + p.mutationCount = mutationCount; + { + ReentrancyGuard g(*this); + p.entry = &lookup(l, p.keyHash, sCollisionBit); + } + return p.found() || add(p, t); + } + + void remove(Ptr p) + { + ReentrancyGuard g(*this); + do { } while(0); + remove(*p.entry); + checkUnderloaded(); + } + +#undef METER +}; + +} +# 810 "./../../dist/include/js/HashTable.h" +template +struct DefaultHasher +{ + typedef Key Lookup; + static HashNumber hash(const Lookup &l) { + + return l; + } + static bool match(const Key &k, const Lookup &l) { + + return k == l; + } +}; + + + + + +template +struct PointerHasher +{ + typedef Key Lookup; + static HashNumber hash(const Lookup &l) { + size_t word = reinterpret_cast(l) >> zeroBits; + typedef int moz_static_assert17[(sizeof(HashNumber) == 4) ? 1 : -1]; + + return HashNumber(word); + + + + + } + static bool match(const Key &k, const Lookup &l) { + return k == l; + } +}; + +template +struct TaggedPointerHasher +{ + typedef Key Lookup; + + static HashNumber hash(const Lookup &l) { + return PointerHasher::hash(l); + } + + static const uintptr_t COMPARE_MASK = uintptr_t(-1) - 1; + + static bool match(const Key &k, const Lookup &l) { + return (uintptr_t(k) & COMPARE_MASK) == uintptr_t(l); + } +}; + + + + + +template +struct DefaultHasher: PointerHasher::result> { }; + + + +template +class HashMapEntry +{ + template friend class detail::HashTable; + template friend class detail::HashTableEntry; + void operator=(const HashMapEntry &rhs) { + const_cast(key) = rhs.key; + value = rhs.value; + } + + public: + HashMapEntry() : key(), value() {} + + template + HashMapEntry(const KeyInput &k, const ValueInput &v) : key(k), value(v) {} + + HashMapEntry(MoveRef rhs) + : key(Move(rhs->key)), value(Move(rhs->value)) { } + void operator=(MoveRef rhs) { + const_cast(key) = Move(rhs->key); + value = Move(rhs->value); + } + + const Key key; + Value value; +}; + +namespace tl { + +template +struct IsPodType > { + static const bool result = IsPodType::result; +}; + +template +struct IsPodType > +{ + static const bool result = IsPodType::result && IsPodType::result; +}; + +} +# 930 "./../../dist/include/js/HashTable.h" +template , + class AllocPolicy = TempAllocPolicy> +class HashMap +{ + public: + typedef typename HashPolicy::Lookup Lookup; + + typedef HashMapEntry Entry; + + private: + + struct MapHashPolicy : HashPolicy + { + typedef Key KeyType; + static const Key &getKey(Entry &e) { return e.key; } + static void setKey(Entry &e, Key &k) { const_cast(e.key) = k; } + }; + typedef detail::HashTable Impl; + + friend class Impl::Enum; + + + HashMap(const HashMap &); + HashMap &operator=(const HashMap &); + + Impl impl; + + public: + const static unsigned sDefaultInitSize = Impl::sDefaultInitSize; + + + + + + HashMap(AllocPolicy a = AllocPolicy()) : impl(a) {} + bool init(uint32_t len = sDefaultInitSize) { return impl.init(len); } + bool initialized() const { return impl.initialized(); } +# 983 "./../../dist/include/js/HashTable.h" + typedef typename Impl::Ptr Ptr; + Ptr lookup(const Lookup &l) const { return impl.lookup(l); } + + + void remove(Ptr p) { impl.remove(p); } +# 1024 "./../../dist/include/js/HashTable.h" + typedef typename Impl::AddPtr AddPtr; + AddPtr lookupForAdd(const Lookup &l) const { + return impl.lookupForAdd(l); + } + + template + bool add(AddPtr &p, const KeyInput &k, const ValueInput &v) { + Entry *pentry; + if (!impl.add(p, &pentry)) + return false; + const_cast(pentry->key) = k; + pentry->value = v; + return true; + } + + bool add(AddPtr &p, const Key &k, MoveRef v) { + Entry *pentry; + if (!impl.add(p, &pentry)) + return false; + const_cast(pentry->key) = k; + pentry->value = v; + return true; + } + + bool add(AddPtr &p, const Key &k) { + Entry *pentry; + if (!impl.add(p, &pentry)) + return false; + const_cast(pentry->key) = k; + return true; + } + + template + bool relookupOrAdd(AddPtr &p, const KeyInput &k, const ValueInput &v) { + return impl.relookupOrAdd(p, k, Entry(k, v)); + } +# 1071 "./../../dist/include/js/HashTable.h" + typedef typename Impl::Range Range; + Range all() const { return impl.all(); } + uint32_t count() const { return impl.count(); } + size_t capacity() const { return impl.capacity(); } + size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const { + return impl.sizeOfExcludingThis(mallocSizeOf); + } + size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const { + + + + + return mallocSizeOf(this) + impl.sizeOfExcludingThis(mallocSizeOf); + } +# 1099 "./../../dist/include/js/HashTable.h" + typedef typename Impl::Enum Enum; + + + + + + void clear() { impl.clear(); } + + + + + + void finish() { impl.finish(); } + + + bool empty() const { return impl.empty(); } + + + + + + unsigned generation() const { return impl.generation(); } + + + + bool has(const Lookup &l) const { + return impl.lookup(l) != __null; + } + + + template + bool put(const KeyInput &k, const ValueInput &v) { + AddPtr p = lookupForAdd(k); + if (p) { + p->value = v; + return true; + } + return add(p, k, v); + } + + + bool putNew(const Key &k, const Value &v) { + AddPtr p = lookupForAdd(k); + do { } while(0); + return add(p, k, v); + } + + + Ptr lookupWithDefault(const Key &k, const Value &defaultValue) { + AddPtr p = lookupForAdd(k); + if (p) + return p; + (void)add(p, k, defaultValue); + return p; + } + + + void remove(const Lookup &l) { + if (Ptr p = lookup(l)) + remove(p); + } +}; +# 1178 "./../../dist/include/js/HashTable.h" +template , class AllocPolicy = TempAllocPolicy> +class HashSet +{ + typedef typename HashPolicy::Lookup Lookup; + + + struct SetOps : HashPolicy { + typedef T KeyType; + static const KeyType &getKey(const T &t) { return t; } + static void setKey(T &t, KeyType &k) { t = k; } + }; + typedef detail::HashTable Impl; + + friend class Impl::Enum; + + + HashSet(const HashSet &); + HashSet &operator=(const HashSet &); + + Impl impl; + + public: + const static unsigned sDefaultInitSize = Impl::sDefaultInitSize; + + + + + + HashSet(AllocPolicy a = AllocPolicy()) : impl(a) {} + bool init(uint32_t len = sDefaultInitSize) { return impl.init(len); } + bool initialized() const { return impl.initialized(); } +# 1221 "./../../dist/include/js/HashTable.h" + typedef typename Impl::Ptr Ptr; + Ptr lookup(const Lookup &l) const { return impl.lookup(l); } + + + void remove(Ptr p) { impl.remove(p); } +# 1261 "./../../dist/include/js/HashTable.h" + typedef typename Impl::AddPtr AddPtr; + AddPtr lookupForAdd(const Lookup &l) const { + return impl.lookupForAdd(l); + } + + bool add(AddPtr &p, const T &t) { + return impl.add(p, t); + } + + bool relookupOrAdd(AddPtr &p, const Lookup &l, const T &t) { + return impl.relookupOrAdd(p, l, t); + } +# 1284 "./../../dist/include/js/HashTable.h" + typedef typename Impl::Range Range; + Range all() const { return impl.all(); } + uint32_t count() const { return impl.count(); } + size_t capacity() const { return impl.capacity(); } + size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const { + return impl.sizeOfExcludingThis(mallocSizeOf); + } + size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const { + + + + + return mallocSizeOf(this) + impl.sizeOfExcludingThis(mallocSizeOf); + } +# 1312 "./../../dist/include/js/HashTable.h" + typedef typename Impl::Enum Enum; + + + + + + void clear() { impl.clear(); } + + + + + + void finish() { impl.finish(); } + + + bool empty() const { return impl.empty(); } + + + + + + unsigned generation() const { return impl.generation(); } + + + + bool has(const Lookup &l) const { + return impl.lookup(l) != __null; + } + + + bool put(const T &t) { + AddPtr p = lookupForAdd(t); + return p ? true : add(p, t); + } + + + bool putNew(const T &t) { + AddPtr p = lookupForAdd(t); + do { } while(0); + return add(p, t); + } + + bool putNew(const Lookup &l, const T &t) { + AddPtr p = lookupForAdd(l); + do { } while(0); + return add(p, t); + } + + void remove(const Lookup &l) { + if (Ptr p = lookup(l)) + remove(p); + } +}; + +} +# 29 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprvtd.h" 2 + + + +extern "C" { + + + + +#define JS_BITS_PER_UINT32_LOG2 5 +#define JS_BITS_PER_UINT32 32 + + +static const unsigned JS_GCTHING_ALIGN = 8; +static const unsigned JS_GCTHING_ZEROBITS = 3; + + +typedef uint8_t jsbytecode; +typedef uint8_t jssrcnote; +typedef uintptr_t jsatomid; + + +typedef struct JSArgumentFormatMap JSArgumentFormatMap; +typedef struct JSGCThing JSGCThing; +typedef struct JSGenerator JSGenerator; +typedef struct JSNativeEnumerator JSNativeEnumerator; +typedef struct JSProperty JSProperty; +typedef struct JSSharpObjectMap JSSharpObjectMap; +typedef struct JSTryNote JSTryNote; + + +typedef struct JSAtomState JSAtomState; +typedef struct JSCodeSpec JSCodeSpec; +typedef struct JSPrinter JSPrinter; +typedef struct JSStackHeader JSStackHeader; +typedef struct JSSubString JSSubString; +typedef struct JSSpecializedNative JSSpecializedNative; + + +typedef struct JSXML JSXML; +# 79 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprvtd.h" +extern "C++" { + +class JSDependentString; +class JSExtensibleString; +class JSExternalString; +class JSLinearString; +class JSFixedString; +class JSStaticAtom; +class JSRope; +class JSAtom; +class JSWrapper; + +namespace js { + +struct ArgumentsData; +struct Class; + +class RegExpGuard; +class RegExpObject; +class RegExpObjectBuilder; +class RegExpShared; +class RegExpStatics; +class MatchPairs; +class PropertyName; + +namespace detail { class RegExpCode; } + +enum RegExpFlag +{ + IgnoreCaseFlag = 0x01, + GlobalFlag = 0x02, + MultilineFlag = 0x04, + StickyFlag = 0x08, + + NoFlags = 0x00, + AllFlags = 0x0f +}; + +enum RegExpExecType +{ + RegExpExec, + RegExpTest +}; + +class ExecuteArgsGuard; +class InvokeFrameGuard; +class InvokeArgsGuard; +class StringBuffer; + +class FrameRegs; +class StackFrame; +class StackSegment; +class StackSpace; +class ContextStack; +class ScriptFrameIter; +class CallReceiver; +class CallArgs; + +struct BytecodeEmitter; +struct Definition; +struct FunctionBox; +struct ObjectBox; +struct ParseNode; +struct Parser; +struct SharedContext; +class TokenStream; +struct Token; +struct TokenPos; +struct TokenPtr; +struct TreeContext; +class UpvarCookie; + +class Proxy; +class BaseProxyHandler; +class DirectWrapper; +class CrossCompartmentWrapper; + +class TempAllocPolicy; +class RuntimeAllocPolicy; + +class GlobalObject; + +template +class InlineMap; + +class LifoAlloc; + +class BaseShape; +class UnownedBaseShape; +struct Shape; +struct EmptyShape; +class ShapeKindArray; +class Bindings; + +struct StackBaseShape; +struct StackShape; + +class MultiDeclRange; +class ParseMapPool; +class DefnOrHeader; +typedef InlineMap AtomDefnMap; +typedef InlineMap AtomIndexMap; +typedef InlineMap AtomDOHMap; +typedef Vector UpvarCookies; + +class Breakpoint; +class BreakpointSite; +class Debugger; +class WatchpointMap; + + + + + + + +typedef JSObject Env; + +typedef JSNative Native; +typedef JSPropertyOp PropertyOp; +typedef JSStrictPropertyOp StrictPropertyOp; +typedef JSPropertyDescriptor PropertyDescriptor; + +namespace analyze { + +struct LifetimeVariable; +class LoopAnalysis; +class ScriptAnalysis; +class SlotValue; +class SSAValue; +class SSAUseChain; + +} + +namespace types { + +class TypeSet; +struct TypeCallsite; +struct TypeObject; +struct TypeCompartment; + +} + +typedef JS::Handle HandleShape; +typedef JS::Handle HandleBaseShape; +typedef JS::Handle HandleTypeObject; +typedef JS::Handle HandleAtom; +typedef JS::Handle HandlePropertyName; + +typedef JS::Rooted RootedShape; +typedef JS::Rooted RootedBaseShape; +typedef JS::Rooted RootedTypeObject; +typedef JS::Rooted RootedAtom; +typedef JS::Rooted RootedPropertyName; + +enum XDRMode { + XDR_ENCODE, + XDR_DECODE +}; + +template +class XDRState; + +class FreeOp; + +} + +namespace JSC { + +class ExecutableAllocator; + +} + +namespace WTF { + +class BumpPointerAllocator; + +} + +} +# 269 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprvtd.h" +typedef enum JSTrapStatus { + JSTRAP_ERROR, + JSTRAP_CONTINUE, + JSTRAP_RETURN, + JSTRAP_THROW, + JSTRAP_LIMIT +} JSTrapStatus; + +typedef JSTrapStatus +(* JSTrapHandler)(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval, + jsval closure); + +typedef JSTrapStatus +(* JSInterruptHook)(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval, + void *closure); + +typedef JSTrapStatus +(* JSDebuggerHandler)(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval, + void *closure); + +typedef JSTrapStatus +(* JSThrowHook)(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval, + void *closure); + +typedef JSBool +(* JSWatchPointHandler)(JSContext *cx, JSObject *obj, jsid id, jsval old, + jsval *newp, void *closure); + + +typedef void +(* JSNewScriptHook)(JSContext *cx, + const char *filename, + unsigned lineno, + JSScript *script, + JSFunction *fun, + void *callerdata); + + +typedef void +(* JSDestroyScriptHook)(JSFreeOp *fop, + JSScript *script, + void *callerdata); + +typedef void +(* JSSourceHandler)(const char *filename, unsigned lineno, const jschar *str, + size_t length, void **listenerTSData, void *closure); +# 341 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprvtd.h" +typedef void * +(* JSInterpreterHook)(JSContext *cx, JSStackFrame *fp, JSBool before, + JSBool *ok, void *closure); + +typedef JSBool +(* JSDebugErrorHook)(JSContext *cx, const char *message, JSErrorReport *report, + void *closure); + +typedef struct JSDebugHooks { + JSInterruptHook interruptHook; + void *interruptHookData; + JSNewScriptHook newScriptHook; + void *newScriptHookData; + JSDestroyScriptHook destroyScriptHook; + void *destroyScriptHookData; + JSDebuggerHandler debuggerHandler; + void *debuggerHandlerData; + JSSourceHandler sourceHandler; + void *sourceHandlerData; + JSInterpreterHook executeHook; + void *executeHookData; + JSInterpreterHook callHook; + void *callHookData; + JSThrowHook throwHook; + void *throwHookData; + JSDebugErrorHook debugErrorHook; + void *debugErrorHookData; +} JSDebugHooks; + + + + + + + +typedef JSObject * +(* JSObjectOp)(JSContext *cx, JSHandleObject obj); + + +typedef JSObject * +(* JSClassInitializerOp)(JSContext *cx, JSObject *obj); + + + + + +typedef JSObject * +(* JSIteratorOp)(JSContext *cx, JSHandleObject obj, JSBool keysonly); +# 397 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprvtd.h" +extern JSBool js_CStringsAreUTF8; + + +} +# 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jshash.h" 1 + + + + + + + +#define jshash_h___ + + + + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jshash.h" 2 + + + +extern "C" { + +typedef uint32_t JSHashNumber; +typedef struct JSHashEntry JSHashEntry; +typedef struct JSHashTable JSHashTable; + +#define JS_HASH_BITS 32 +#define JS_GOLDEN_RATIO 0x9E3779B9U + +typedef JSHashNumber (* JSHashFunction)(const void *key); +typedef int (* JSHashComparator)(const void *v1, const void *v2); +typedef int (* JSHashEnumerator)(JSHashEntry *he, int i, void *arg); + + +#define HT_ENUMERATE_NEXT 0 +#define HT_ENUMERATE_STOP 1 +#define HT_ENUMERATE_REMOVE 2 + +typedef struct JSHashAllocOps { + void * (*allocTable)(void *pool, size_t size); + void (*freeTable)(void *pool, void *item, size_t size); + JSHashEntry * (*allocEntry)(void *pool, const void *key); + void (*freeEntry)(void *pool, JSHashEntry *he, unsigned flag); +} JSHashAllocOps; + +#define HT_FREE_VALUE 0 +#define HT_FREE_ENTRY 1 + +struct JSHashEntry { + JSHashEntry *next; + JSHashNumber keyHash; + const void *key; + void *value; +}; + +struct JSHashTable { + JSHashEntry **buckets; + uint32_t nentries; + uint32_t shift; + JSHashFunction keyHash; + JSHashComparator keyCompare; + JSHashComparator valueCompare; + JSHashAllocOps *allocOps; + void *allocPriv; + + + + + + +}; + + + + + +extern __attribute__((visibility("default"))) JSHashTable * +JS_NewHashTable(uint32_t n, JSHashFunction keyHash, + JSHashComparator keyCompare, JSHashComparator valueCompare, + JSHashAllocOps *allocOps, void *allocPriv); + +extern __attribute__((visibility("default"))) void +JS_HashTableDestroy(JSHashTable *ht); + + +extern __attribute__((visibility("default"))) JSHashEntry ** +JS_HashTableRawLookup(JSHashTable *ht, JSHashNumber keyHash, const void *key); + + +extern __attribute__((visibility("default"))) JSHashEntry * +JS_HashTableRawAdd(JSHashTable *ht, JSHashEntry **&hep, JSHashNumber keyHash, + const void *key, void *value); + + +extern __attribute__((visibility("default"))) void +JS_HashTableRawRemove(JSHashTable *ht, JSHashEntry **hep, JSHashEntry *he); + + +extern __attribute__((visibility("default"))) JSHashEntry * +JS_HashTableAdd(JSHashTable *ht, const void *key, void *value); + +extern __attribute__((visibility("default"))) JSBool +JS_HashTableRemove(JSHashTable *ht, const void *key); + +extern __attribute__((visibility("default"))) int +JS_HashTableEnumerateEntries(JSHashTable *ht, JSHashEnumerator f, void *arg); + +extern __attribute__((visibility("default"))) void * +JS_HashTableLookup(JSHashTable *ht, const void *key); + +extern __attribute__((visibility("default"))) int +JS_HashTableDump(JSHashTable *ht, JSHashEnumerator dump, FILE *fp); + + +extern __attribute__((visibility("default"))) JSHashNumber +JS_HashString(const void *key); + + +extern __attribute__((visibility("default"))) int +JS_CompareValues(const void *v1, const void *v2); + +} +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jslock.h" 1 + + + + + + +#define jslock_h__ + + + + + +# 1 "/usr/include/nspr/pratom.h" 1 +# 12 "/usr/include/nspr/pratom.h" +#define pratom_h___ + +# 1 "/usr/include/nspr/prtypes.h" 1 +# 21 "/usr/include/nspr/prtypes.h" +#define prtypes_h___ + + + + +# 1 "/usr/include/nspr/prcpucfg.h" 1 +# 12 "/usr/include/nspr/prcpucfg.h" +#define nspr_cpucfg___ + + + + + + +#define LINUX + + + + + + + +#define PR_AF_INET6 10 +# 547 "/usr/include/nspr/prcpucfg.h" +#define IS_LITTLE_ENDIAN 1 +#undef IS_BIG_ENDIAN + + + + +#define PR_BYTES_PER_BYTE 1 +#define PR_BYTES_PER_SHORT 2 +#define PR_BYTES_PER_INT 4 +#define PR_BYTES_PER_INT64 8 +#define PR_BYTES_PER_LONG 4 +#define PR_BYTES_PER_FLOAT 4 +#define PR_BYTES_PER_DOUBLE 8 +#define PR_BYTES_PER_WORD 4 +#define PR_BYTES_PER_DWORD 8 + +#define PR_BITS_PER_BYTE 8 +#define PR_BITS_PER_SHORT 16 +#define PR_BITS_PER_INT 32 +#define PR_BITS_PER_INT64 64 +#define PR_BITS_PER_LONG 32 +#define PR_BITS_PER_FLOAT 32 +#define PR_BITS_PER_DOUBLE 64 +#define PR_BITS_PER_WORD 32 + +#define PR_BITS_PER_BYTE_LOG2 3 +#define PR_BITS_PER_SHORT_LOG2 4 +#define PR_BITS_PER_INT_LOG2 5 +#define PR_BITS_PER_INT64_LOG2 6 +#define PR_BITS_PER_LONG_LOG2 5 +#define PR_BITS_PER_FLOAT_LOG2 5 +#define PR_BITS_PER_DOUBLE_LOG2 6 +#define PR_BITS_PER_WORD_LOG2 5 + +#define PR_ALIGN_OF_SHORT 2 +#define PR_ALIGN_OF_INT 4 +#define PR_ALIGN_OF_LONG 4 +#define PR_ALIGN_OF_INT64 4 +#define PR_ALIGN_OF_FLOAT 4 +#define PR_ALIGN_OF_DOUBLE 4 +#define PR_ALIGN_OF_POINTER 4 +#define PR_ALIGN_OF_WORD 4 + +#define PR_BYTES_PER_WORD_LOG2 2 +#define PR_BYTES_PER_DWORD_LOG2 3 +# 871 "/usr/include/nspr/prcpucfg.h" +#define HAVE_LONG_LONG +# 27 "/usr/include/nspr/prtypes.h" 2 + + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 30 "/usr/include/nspr/prtypes.h" 2 +# 125 "/usr/include/nspr/prtypes.h" +#define PR_VISIBILITY_DEFAULT __attribute__((visibility("default"))) + + + + +#define PR_EXPORT(__type) extern PR_VISIBILITY_DEFAULT __type +#define PR_EXPORT_DATA(__type) extern PR_VISIBILITY_DEFAULT __type +#define PR_IMPORT(__type) extern PR_VISIBILITY_DEFAULT __type +#define PR_IMPORT_DATA(__type) extern PR_VISIBILITY_DEFAULT __type + +#define PR_EXTERN(__type) extern PR_VISIBILITY_DEFAULT __type +#define PR_IMPLEMENT(__type) PR_VISIBILITY_DEFAULT __type +#define PR_EXTERN_DATA(__type) extern PR_VISIBILITY_DEFAULT __type +#define PR_IMPLEMENT_DATA(__type) PR_VISIBILITY_DEFAULT __type +#define PR_CALLBACK +#define PR_CALLBACK_DECL +#define PR_STATIC_CALLBACK(__x) static __x + + + + + + + +#define NSPR_API(__type) PR_IMPORT(__type) +#define NSPR_DATA_API(__type) PR_IMPORT_DATA(__type) +# 160 "/usr/include/nspr/prtypes.h" +#define PR_BEGIN_MACRO do { +#define PR_END_MACRO } while (0) +# 170 "/usr/include/nspr/prtypes.h" +#define PR_BEGIN_EXTERN_C extern "C" { +#define PR_END_EXTERN_C } +# 183 "/usr/include/nspr/prtypes.h" +#define PR_BIT(n) ((PRUint32)1 << (n)) +#define PR_BITMASK(n) (PR_BIT(n) - 1) +# 194 "/usr/include/nspr/prtypes.h" +#define PR_ROUNDUP(x,y) ((((x)+((y)-1))/(y))*(y)) +#define PR_MIN(x,y) ((x)<(y)?(x):(y)) +#define PR_MAX(x,y) ((x)>(y)?(x):(y)) +#define PR_ABS(x) ((x)<0?-(x):(x)) + + + + + + +#define PR_ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0])) + +extern "C" { +# 216 "/usr/include/nspr/prtypes.h" +typedef unsigned char PRUint8; +# 230 "/usr/include/nspr/prtypes.h" +typedef signed char PRInt8; +# 244 "/usr/include/nspr/prtypes.h" +#define PR_INT8_MAX 127 +#define PR_INT8_MIN (-128) +#define PR_UINT8_MAX 255U +# 255 "/usr/include/nspr/prtypes.h" +typedef unsigned short PRUint16; +typedef short PRInt16; +# 269 "/usr/include/nspr/prtypes.h" +#define PR_INT16_MAX 32767 +#define PR_INT16_MIN (-32768) +#define PR_UINT16_MAX 65535U +# 280 "/usr/include/nspr/prtypes.h" +typedef unsigned int PRUint32; +typedef int PRInt32; +#define PR_INT32(x) x +#define PR_UINT32(x) x ## U +# 301 "/usr/include/nspr/prtypes.h" +#define PR_INT32_MAX PR_INT32(2147483647) +#define PR_INT32_MIN (-PR_INT32_MAX - 1) +#define PR_UINT32_MAX PR_UINT32(4294967295) +# 350 "/usr/include/nspr/prtypes.h" +typedef long long PRInt64; +typedef unsigned long long PRUint64; +#define PR_INT64(x) x ## LL +#define PR_UINT64(x) x ## ULL + + +#define PR_INT64_MAX PR_INT64(0x7fffffffffffffff) +#define PR_INT64_MIN (-PR_INT64_MAX - 1) +#define PR_UINT64_MAX PR_UINT64(-1) +# 385 "/usr/include/nspr/prtypes.h" +typedef int PRIntn; +typedef unsigned int PRUintn; +# 396 "/usr/include/nspr/prtypes.h" +typedef double PRFloat64; + + + + + + +typedef size_t PRSize; + + + + + + + +typedef PRInt32 PROffset32; +typedef PRInt64 PROffset64; + + + + + + + +typedef ptrdiff_t PRPtrdiff; +# 431 "/usr/include/nspr/prtypes.h" +typedef unsigned long PRUptrdiff; +# 442 "/usr/include/nspr/prtypes.h" +typedef PRIntn PRBool; +#define PR_TRUE 1 +#define PR_FALSE 0 + + + + + + + +typedef PRUint8 PRPackedBool; + + + + + +typedef enum { PR_FAILURE = -1, PR_SUCCESS = 0 } PRStatus; + + +#define __PRUNICHAR__ + + + +typedef PRUint16 PRUnichar; +# 484 "/usr/include/nspr/prtypes.h" +typedef long PRWord; +typedef unsigned long PRUword; +# 534 "/usr/include/nspr/prtypes.h" +#define PR_STATIC_ASSERT(condition) extern void pr_static_assert(int arg[(condition) ? 1 : -1]) + + +} +# 15 "/usr/include/nspr/pratom.h" 2 +# 1 "/usr/include/nspr/prlock.h" 1 +# 17 "/usr/include/nspr/prlock.h" +#define prlock_h___ + + + +extern "C" { +# 34 "/usr/include/nspr/prlock.h" +typedef struct PRLock PRLock; +# 51 "/usr/include/nspr/prlock.h" +extern __attribute__((visibility("default"))) PRLock* PR_NewLock(void); +# 62 "/usr/include/nspr/prlock.h" +extern __attribute__((visibility("default"))) void PR_DestroyLock(PRLock *lock); +# 73 "/usr/include/nspr/prlock.h" +extern __attribute__((visibility("default"))) void PR_Lock(PRLock *lock); +# 85 "/usr/include/nspr/prlock.h" +extern __attribute__((visibility("default"))) PRStatus PR_Unlock(PRLock *lock); +# 101 "/usr/include/nspr/prlock.h" +#define PR_ASSERT_CURRENT_THREAD_OWNS_LOCK(lock) + + + +extern __attribute__((visibility("default"))) void PR_AssertCurrentThreadOwnsLock(PRLock *lock); + +} +# 16 "/usr/include/nspr/pratom.h" 2 + +extern "C" { +# 28 "/usr/include/nspr/pratom.h" +extern __attribute__((visibility("default"))) PRInt32 PR_AtomicIncrement(PRInt32 *val); +# 39 "/usr/include/nspr/pratom.h" +extern __attribute__((visibility("default"))) PRInt32 PR_AtomicDecrement(PRInt32 *val); +# 51 "/usr/include/nspr/pratom.h" +extern __attribute__((visibility("default"))) PRInt32 PR_AtomicSet(PRInt32 *val, PRInt32 newval); +# 63 "/usr/include/nspr/pratom.h" +extern __attribute__((visibility("default"))) PRInt32 PR_AtomicAdd(PRInt32 *ptr, PRInt32 val); +# 128 "/usr/include/nspr/pratom.h" +#define PR_ATOMIC_INCREMENT(val) PR_AtomicIncrement(val) +#define PR_ATOMIC_DECREMENT(val) PR_AtomicDecrement(val) +#define PR_ATOMIC_SET(val,newval) PR_AtomicSet(val, newval) +#define PR_ATOMIC_ADD(ptr,val) PR_AtomicAdd(ptr, val) + + + + + + +typedef struct PRStackElemStr PRStackElem; + +struct PRStackElemStr { + PRStackElem *prstk_elem_next; + +}; + +typedef struct PRStackStr PRStack; +# 156 "/usr/include/nspr/pratom.h" +extern __attribute__((visibility("default"))) PRStack * PR_CreateStack(const char *stack_name); +# 168 "/usr/include/nspr/pratom.h" +extern __attribute__((visibility("default"))) void PR_StackPush(PRStack *stack, PRStackElem *stack_elem); +# 181 "/usr/include/nspr/pratom.h" +extern __attribute__((visibility("default"))) PRStackElem * PR_StackPop(PRStack *stack); +# 195 "/usr/include/nspr/pratom.h" +extern __attribute__((visibility("default"))) PRStatus PR_DestroyStack(PRStack *stack); + +} +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jslock.h" 2 +# 1 "/usr/include/nspr/prlock.h" 1 +# 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jslock.h" 2 +# 1 "/usr/include/nspr/prcvar.h" 1 + + + + + + +#define prcvar_h___ + + +# 1 "/usr/include/nspr/prinrval.h" 1 +# 19 "/usr/include/nspr/prinrval.h" +#define prinrval_h + + + +extern "C" { + + + + + +typedef PRUint32 PRIntervalTime; +# 39 "/usr/include/nspr/prinrval.h" +#define PR_INTERVAL_MIN 1000UL +#define PR_INTERVAL_MAX 100000UL +# 53 "/usr/include/nspr/prinrval.h" +#define PR_INTERVAL_NO_WAIT 0UL +#define PR_INTERVAL_NO_TIMEOUT 0xffffffffUL +# 79 "/usr/include/nspr/prinrval.h" +extern __attribute__((visibility("default"))) PRIntervalTime PR_IntervalNow(void); +# 97 "/usr/include/nspr/prinrval.h" +extern __attribute__((visibility("default"))) PRUint32 PR_TicksPerSecond(void); +# 116 "/usr/include/nspr/prinrval.h" +extern __attribute__((visibility("default"))) PRIntervalTime PR_SecondsToInterval(PRUint32 seconds); +extern __attribute__((visibility("default"))) PRIntervalTime PR_MillisecondsToInterval(PRUint32 milli); +extern __attribute__((visibility("default"))) PRIntervalTime PR_MicrosecondsToInterval(PRUint32 micro); +# 137 "/usr/include/nspr/prinrval.h" +extern __attribute__((visibility("default"))) PRUint32 PR_IntervalToSeconds(PRIntervalTime ticks); +extern __attribute__((visibility("default"))) PRUint32 PR_IntervalToMilliseconds(PRIntervalTime ticks); +extern __attribute__((visibility("default"))) PRUint32 PR_IntervalToMicroseconds(PRIntervalTime ticks); + +} +# 11 "/usr/include/nspr/prcvar.h" 2 + +extern "C" { + +typedef struct PRCondVar PRCondVar; +# 27 "/usr/include/nspr/prcvar.h" +extern __attribute__((visibility("default"))) PRCondVar* PR_NewCondVar(PRLock *lock); + + + + + + + +extern __attribute__((visibility("default"))) void PR_DestroyCondVar(PRCondVar *cvar); +# 65 "/usr/include/nspr/prcvar.h" +extern __attribute__((visibility("default"))) PRStatus PR_WaitCondVar(PRCondVar *cvar, PRIntervalTime timeout); +# 80 "/usr/include/nspr/prcvar.h" +extern __attribute__((visibility("default"))) PRStatus PR_NotifyCondVar(PRCondVar *cvar); +# 90 "/usr/include/nspr/prcvar.h" +extern __attribute__((visibility("default"))) PRStatus PR_NotifyAllCondVar(PRCondVar *cvar); + +} +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jslock.h" 2 +# 1 "/usr/include/nspr/prthread.h" 1 + + + + + + +#define prthread_h___ +# 49 "/usr/include/nspr/prthread.h" +extern "C" { + +typedef struct PRThread PRThread; +typedef struct PRThreadStack PRThreadStack; + +typedef enum PRThreadType { + PR_USER_THREAD, + PR_SYSTEM_THREAD +} PRThreadType; + +typedef enum PRThreadScope { + PR_LOCAL_THREAD, + PR_GLOBAL_THREAD, + PR_GLOBAL_BOUND_THREAD +} PRThreadScope; + +typedef enum PRThreadState { + PR_JOINABLE_THREAD, + PR_UNJOINABLE_THREAD +} PRThreadState; + +typedef enum PRThreadPriority +{ + PR_PRIORITY_FIRST = 0, + PR_PRIORITY_LOW = 0, + PR_PRIORITY_NORMAL = 1, + PR_PRIORITY_HIGH = 2, + PR_PRIORITY_URGENT = 3, + PR_PRIORITY_LAST = 3 +} PRThreadPriority; +# 105 "/usr/include/nspr/prthread.h" +extern __attribute__((visibility("default"))) PRThread* PR_CreateThread(PRThreadType type, + void ( *start)(void *arg), + void *arg, + PRThreadPriority priority, + PRThreadScope scope, + PRThreadState state, + PRUint32 stackSize); +# 126 "/usr/include/nspr/prthread.h" +extern __attribute__((visibility("default"))) PRStatus PR_JoinThread(PRThread *thread); + + + + + +extern __attribute__((visibility("default"))) PRThread* PR_GetCurrentThread(void); + + + + + + + +extern __attribute__((visibility("default"))) PRThreadPriority PR_GetThreadPriority(const PRThread *thread); + + + + +extern __attribute__((visibility("default"))) void PR_SetThreadPriority(PRThread *thread, PRThreadPriority priority); + + + + + +extern __attribute__((visibility("default"))) PRStatus PR_SetCurrentThreadName(const char *name); + + + + +extern __attribute__((visibility("default"))) const char * PR_GetThreadName(const PRThread *thread); +# 182 "/usr/include/nspr/prthread.h" +typedef void ( *PRThreadPrivateDTOR)(void *priv); + +extern __attribute__((visibility("default"))) PRStatus PR_NewThreadPrivateIndex( + PRUintn *newIndex, PRThreadPrivateDTOR destructor); +# 198 "/usr/include/nspr/prthread.h" +extern __attribute__((visibility("default"))) PRStatus PR_SetThreadPrivate(PRUintn tpdIndex, void *priv); +# 209 "/usr/include/nspr/prthread.h" +extern __attribute__((visibility("default"))) void* PR_GetThreadPrivate(PRUintn tpdIndex); +# 221 "/usr/include/nspr/prthread.h" +extern __attribute__((visibility("default"))) PRStatus PR_Interrupt(PRThread *thread); + + + + + +extern __attribute__((visibility("default"))) void PR_ClearInterrupt(void); + + + + +extern __attribute__((visibility("default"))) void PR_BlockInterrupt(void); + + + + +extern __attribute__((visibility("default"))) void PR_UnblockInterrupt(void); +# 246 "/usr/include/nspr/prthread.h" +extern __attribute__((visibility("default"))) PRStatus PR_Sleep(PRIntervalTime ticks); + + + + +extern __attribute__((visibility("default"))) PRThreadScope PR_GetThreadScope(const PRThread *thread); + + + + +extern __attribute__((visibility("default"))) PRThreadType PR_GetThreadType(const PRThread *thread); + + + + +extern __attribute__((visibility("default"))) PRThreadState PR_GetThreadState(const PRThread *thread); + +} +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jslock.h" 2 +# 1 "/usr/include/nspr/prinit.h" 1 + + + + + + +#define prinit_h___ + +# 1 "/usr/include/nspr/prthread.h" 1 +# 10 "/usr/include/nspr/prinit.h" 2 + +# 1 "/usr/include/nspr/prwin16.h" 1 + + + + + + +#define prwin16_h___ +# 153 "/usr/include/nspr/prwin16.h" +#define PR_STDIO_INIT() +# 12 "/usr/include/nspr/prinit.h" 2 + + +extern "C" { +# 24 "/usr/include/nspr/prinit.h" +#define PR_NAME "NSPR" +# 34 "/usr/include/nspr/prinit.h" +#define PR_VERSION "4.9.2" +#define PR_VMAJOR 4 +#define PR_VMINOR 9 +#define PR_VPATCH 2 +#define PR_BETA PR_FALSE +# 56 "/usr/include/nspr/prinit.h" +typedef PRBool (*PRVersionCheck)(const char*); +# 66 "/usr/include/nspr/prinit.h" +extern __attribute__((visibility("default"))) PRBool PR_VersionCheck(const char *importedVersion); + + + + +extern __attribute__((visibility("default"))) const char* PR_GetVersion(void); +# 84 "/usr/include/nspr/prinit.h" +extern __attribute__((visibility("default"))) void PR_Init( + PRThreadType type, PRThreadPriority priority, PRUintn maxPTDs); +# 105 "/usr/include/nspr/prinit.h" +typedef PRIntn ( *PRPrimordialFn)(PRIntn argc, char **argv); + +extern __attribute__((visibility("default"))) PRIntn PR_Initialize( + PRPrimordialFn prmain, PRIntn argc, char **argv, PRUintn maxPTDs); + + + + +extern __attribute__((visibility("default"))) PRBool PR_Initialized(void); +# 131 "/usr/include/nspr/prinit.h" +extern __attribute__((visibility("default"))) PRStatus PR_Cleanup(void); + + + + + +extern __attribute__((visibility("default"))) void PR_DisableClockInterrupts(void); + + + + + +extern __attribute__((visibility("default"))) void PR_EnableClockInterrupts(void); + + + + + +extern __attribute__((visibility("default"))) void PR_BlockClockInterrupts(void); + + + + + +extern __attribute__((visibility("default"))) void PR_UnblockClockInterrupts(void); + + + + +extern __attribute__((visibility("default"))) void PR_SetConcurrency(PRUintn numCPUs); + + + + + + +extern __attribute__((visibility("default"))) PRStatus PR_SetFDCacheSize(PRIntn low, PRIntn high); + + + + + + +extern __attribute__((visibility("default"))) void PR_ProcessExit(PRIntn status); + + + + + + +extern __attribute__((visibility("default"))) void PR_Abort(void); +# 191 "/usr/include/nspr/prinit.h" +typedef struct PRCallOnceType { + PRIntn initialized; + PRInt32 inProgress; + PRStatus status; +} PRCallOnceType; + +typedef PRStatus ( *PRCallOnceFN)(void); + +typedef PRStatus ( *PRCallOnceWithArgFN)(void *arg); + +extern __attribute__((visibility("default"))) PRStatus PR_CallOnce( + PRCallOnceType *once, + PRCallOnceFN func +); + +extern __attribute__((visibility("default"))) PRStatus PR_CallOnceWithArg( + PRCallOnceType *once, + PRCallOnceWithArgFN func, + void *arg +); + + +} +# 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jslock.h" 2 + +#define JS_ATOMIC_INCREMENT(p) PR_ATOMIC_INCREMENT((PRInt32 *)(p)) +#define JS_ATOMIC_DECREMENT(p) PR_ATOMIC_DECREMENT((PRInt32 *)(p)) +#define JS_ATOMIC_ADD(p,v) PR_ATOMIC_ADD((PRInt32 *)(p), (PRInt32)(v)) +#define JS_ATOMIC_SET(p,v) PR_ATOMIC_SET((PRInt32 *)(p), (PRInt32)(v)) +# 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jslock.h" +namespace js { + +class AutoAtomicIncrement +{ + int32_t *p; + + + public: + AutoAtomicIncrement(int32_t *p ) + : p(p) { + do { } while (0); + PR_AtomicIncrement((PRInt32 *)(p)); + } + + ~AutoAtomicIncrement() { + PR_AtomicDecrement((PRInt32 *)(p)); + } +}; + +} +# 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier.h" +#define jsgc_barrier_h___ + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 1 +# 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" 1 + + + + + + + +#define gc_heap_h___ + + + + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" 1 +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/BitArray.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/BitArray.h" +#define BitArray_h__ + + + +# 1 "./../../dist/include/js/TemplateLib.h" 1 +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/BitArray.h" 2 + +namespace js { + +template +class BitArray { + private: + uintptr_t map[nbits / (8 * 4) + (nbits % (8 * 4) == 0 ? 0 : 1)]; + + public: + void clear(bool value) { + if (value) + memset(map, 0xFF, sizeof(map)); + else + memset(map, 0, sizeof(map)); + } + + inline bool get(size_t offset) const { + uintptr_t index, mask; + getMarkWordAndMask(offset, &index, &mask); + return map[index] & mask; + } + + inline void set(size_t offset) { + uintptr_t index, mask; + getMarkWordAndMask(offset, &index, &mask); + map[index] |= mask; + } + + inline void unset(size_t offset) { + uintptr_t index, mask; + getMarkWordAndMask(offset, &index, &mask); + map[index] &= ~mask; + } + + private: + inline void getMarkWordAndMask(size_t offset, + uintptr_t *indexp, uintptr_t *maskp) const { + *indexp = offset >> tl::FloorLog2<(8 * 4)>::result; + *maskp = uintptr_t(1) << (offset & ((8 * 4) - 1)); + } +}; + +} +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" 2 + +struct JSCompartment; + +extern "C" { +struct JSRuntime; +} + +namespace js { + +class FreeOp; + +namespace gc { + +struct Arena; +struct ArenaHeader; +struct Chunk; + + + + + + +static const uint32_t BLACK = 0; +static const uint32_t GRAY = 1; + + +enum AllocKind { + FINALIZE_OBJECT0, + FINALIZE_OBJECT0_BACKGROUND, + FINALIZE_OBJECT2, + FINALIZE_OBJECT2_BACKGROUND, + FINALIZE_OBJECT4, + FINALIZE_OBJECT4_BACKGROUND, + FINALIZE_OBJECT8, + FINALIZE_OBJECT8_BACKGROUND, + FINALIZE_OBJECT12, + FINALIZE_OBJECT12_BACKGROUND, + FINALIZE_OBJECT16, + FINALIZE_OBJECT16_BACKGROUND, + FINALIZE_OBJECT_LAST = FINALIZE_OBJECT16_BACKGROUND, + FINALIZE_SCRIPT, + FINALIZE_SHAPE, + FINALIZE_BASE_SHAPE, + FINALIZE_TYPE_OBJECT, + + FINALIZE_XML, + + FINALIZE_SHORT_STRING, + FINALIZE_STRING, + FINALIZE_EXTERNAL_STRING, + FINALIZE_LAST = FINALIZE_EXTERNAL_STRING +}; + +static const unsigned FINALIZE_LIMIT = FINALIZE_LAST + 1; +static const unsigned FINALIZE_OBJECT_LIMIT = FINALIZE_OBJECT_LAST + 1; + + + + + +static const size_t MAX_BACKGROUND_FINALIZE_KINDS = FINALIZE_LIMIT - FINALIZE_OBJECT_LIMIT / 2; + + + + +struct Cell +{ + static const size_t CellShift = 3; + static const size_t CellSize = size_t(1) << CellShift; + static const size_t CellMask = CellSize - 1; + + inline uintptr_t address() const; + inline ArenaHeader *arenaHeader() const; + inline Chunk *chunk() const; + inline AllocKind getAllocKind() const; + __attribute__((always_inline)) inline bool isMarked(uint32_t color = BLACK) const; + __attribute__((always_inline)) inline bool markIfUnmarked(uint32_t color = BLACK) const; + __attribute__((always_inline)) inline void unmark(uint32_t color) const; + + inline JSCompartment *compartment() const; + + + + +}; +# 114 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" +const size_t PageShift = 12; + +const size_t PageSize = size_t(1) << PageShift; + +const size_t ChunkShift = 20; +const size_t ChunkSize = size_t(1) << ChunkShift; +const size_t ChunkMask = ChunkSize - 1; + +const size_t ArenaShift = PageShift; +const size_t ArenaSize = PageSize; +const size_t ArenaMask = ArenaSize - 1; + + + + + +const static uint32_t FreeCommittedArenasThreshold = (32 << 20) / ArenaSize; + + + + + + + +const size_t ArenaCellCount = size_t(1) << (ArenaShift - Cell::CellShift); +const size_t ArenaBitmapBits = ArenaCellCount; +const size_t ArenaBitmapBytes = ArenaBitmapBits / 8; +const size_t ArenaBitmapWords = ArenaBitmapBits / (8 * 4); +# 169 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" +struct FreeSpan +{ + uintptr_t first; + uintptr_t last; + + public: + FreeSpan() {} + + FreeSpan(uintptr_t first, uintptr_t last) + : first(first), last(last) { + checkSpan(); + } + + + + + + static size_t encodeOffsets(size_t firstOffset, size_t lastOffset) { + + typedef int moz_static_assert18[(ArenaShift < 16) ? 1 : -1]; + do { } while(0); + do { } while(0); + do { } while(0); + return firstOffset | (lastOffset << 16); + } + + + + + + static const size_t FullArenaOffsets = ArenaSize | ((ArenaSize - 1) << 16); + + static FreeSpan decodeOffsets(uintptr_t arenaAddr, size_t offsets) { + do { } while(0); + + size_t firstOffset = offsets & 0xFFFF; + size_t lastOffset = offsets >> 16; + do { } while(0); + do { } while(0); + + + + + + return FreeSpan(arenaAddr + firstOffset, arenaAddr | lastOffset); + } + + void initAsEmpty(uintptr_t arenaAddr = 0) { + do { } while(0); + first = arenaAddr + ArenaSize; + last = arenaAddr | (ArenaSize - 1); + do { } while(0); + } + + bool isEmpty() const { + checkSpan(); + return first > last; + } + + bool hasNext() const { + checkSpan(); + return !(last & uintptr_t(1)); + } + + const FreeSpan *nextSpan() const { + do { } while(0); + return reinterpret_cast(last); + } + + FreeSpan *nextSpanUnchecked(size_t thingSize) const { + + + + + + return reinterpret_cast(last); + } + + uintptr_t arenaAddressUnchecked() const { + return last & ~ArenaMask; + } + + uintptr_t arenaAddress() const { + checkSpan(); + return arenaAddressUnchecked(); + } + + ArenaHeader *arenaHeader() const { + return reinterpret_cast(arenaAddress()); + } + + bool isSameNonEmptySpan(const FreeSpan *another) const { + do { } while(0); + do { } while(0); + return first == another->first && last == another->last; + } + + bool isWithinArena(uintptr_t arenaAddr) const { + do { } while(0); + + + return arenaAddress() == arenaAddr; + } + + size_t encodeAsOffsets() const { + + + + + uintptr_t arenaAddr = arenaAddress(); + return encodeOffsets(first - arenaAddr, last & ArenaMask); + } + + + __attribute__((always_inline)) inline void *allocate(size_t thingSize) { + do { } while(0); + checkSpan(); + uintptr_t thing = first; + if (thing < last) { + + first = thing + thingSize; + } else if ((__builtin_expect((thing == last), 1))) { + + + + + *this = *reinterpret_cast(thing); + } else { + return __null; + } + checkSpan(); + return reinterpret_cast(thing); + } + + + __attribute__((always_inline)) inline void *infallibleAllocate(size_t thingSize) { + do { } while(0); + checkSpan(); + uintptr_t thing = first; + if (thing < last) { + first = thing + thingSize; + } else { + do { } while(0); + *this = *reinterpret_cast(thing); + } + checkSpan(); + return reinterpret_cast(thing); + } + + + + + + + + __attribute__((always_inline)) inline void *allocateFromNewArena(uintptr_t arenaAddr, size_t firstThingOffset, + size_t thingSize) { + do { } while(0); + uintptr_t thing = arenaAddr | firstThingOffset; + first = thing + thingSize; + last = arenaAddr | ArenaMask; + checkSpan(); + return reinterpret_cast(thing); + } + + void checkSpan() const { +# 394 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" + } + +}; + + +struct ArenaHeader +{ + friend struct FreeLists; + + JSCompartment *compartment; + + + + + + + ArenaHeader *next; + + private: + + + + + + size_t firstFreeSpanOffsets; +# 427 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" + size_t allocKind : 8; +# 446 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" + public: + size_t hasDelayedMarking : 1; + size_t allocatedDuringIncremental : 1; + size_t markOverflow : 1; + size_t nextDelayedMarking : (8 * 4) - 8 - 1 - 1 - 1; + + static void staticAsserts() { + + typedef int moz_static_assert19[(FINALIZE_LIMIT <= 255) ? 1 : -1]; + + + + + + typedef int moz_static_assert20[(ArenaShift >= 8 + 1 + 1 + 1) ? 1 : -1]; + } + + inline uintptr_t address() const; + inline Chunk *chunk() const; + + bool allocated() const { + do { } while(0); + return allocKind < size_t(FINALIZE_LIMIT); + } + + void init(JSCompartment *comp, AllocKind kind) { + do { } while(0); + do { } while(0); + do { } while(0); + do { } while(0); + compartment = comp; + + typedef int moz_static_assert21[(FINALIZE_LIMIT <= 255) ? 1 : -1]; + allocKind = size_t(kind); + + + firstFreeSpanOffsets = FreeSpan::FullArenaOffsets; + } + + void setAsNotAllocated() { + allocKind = size_t(FINALIZE_LIMIT); + markOverflow = 0; + allocatedDuringIncremental = 0; + hasDelayedMarking = 0; + nextDelayedMarking = 0; + } + + inline uintptr_t arenaAddress() const; + inline Arena *getArena(); + + AllocKind getAllocKind() const { + do { } while(0); + return AllocKind(allocKind); + } + + inline size_t getThingSize() const; + + bool hasFreeThings() const { + return firstFreeSpanOffsets != FreeSpan::FullArenaOffsets; + } + + inline bool isEmpty() const; + + void setAsFullyUsed() { + firstFreeSpanOffsets = FreeSpan::FullArenaOffsets; + } + + inline FreeSpan getFirstFreeSpan() const; + inline void setFirstFreeSpan(const FreeSpan *span); + + + + + + inline ArenaHeader *getNextDelayedMarking() const; + inline void setNextDelayedMarking(ArenaHeader *aheader); +}; + +struct Arena +{ +# 540 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" + ArenaHeader aheader; + uint8_t data[ArenaSize - sizeof(ArenaHeader)]; + + private: + static __attribute__((visibility("default"))) const uint32_t ThingSizes[]; + static __attribute__((visibility("default"))) const uint32_t FirstThingOffsets[]; + + public: + static void staticAsserts(); + + static size_t thingSize(AllocKind kind) { + return ThingSizes[kind]; + } + + static size_t firstThingOffset(AllocKind kind) { + return FirstThingOffsets[kind]; + } + + static size_t thingsPerArena(size_t thingSize) { + do { } while(0); + + + do { } while(0); + + return (ArenaSize - sizeof(ArenaHeader)) / thingSize; + } + + static size_t thingsSpan(size_t thingSize) { + return thingsPerArena(thingSize) * thingSize; + } + + static bool isAligned(uintptr_t thing, size_t thingSize) { + + uintptr_t tailOffset = (ArenaSize - thing) & ArenaMask; + return tailOffset % thingSize == 0; + } + + uintptr_t address() const { + return aheader.address(); + } + + uintptr_t thingsStart(AllocKind thingKind) { + return address() | firstThingOffset(thingKind); + } + + uintptr_t thingsEnd() { + return address() + ArenaSize; + } + + template + bool finalize(FreeOp *fop, AllocKind thingKind, size_t thingSize); +}; + +inline size_t +ArenaHeader::getThingSize() const +{ + do { } while(0); + return Arena::thingSize(getAllocKind()); +} + + +struct ChunkInfo +{ + Chunk *next; + Chunk **prevp; + + + ArenaHeader *freeArenasHead; + + + + + + + uint32_t lastDecommittedArenaOffset; + + + uint32_t numArenasFree; + + + uint32_t numArenasFreeCommitted; + + + uint32_t age; +}; +# 655 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" +const size_t BytesPerArenaWithHeader = ArenaSize + ArenaBitmapBytes; +const size_t ChunkDecommitBitmapBytes = ChunkSize / ArenaSize / 8; +const size_t ChunkBytesAvailable = ChunkSize - sizeof(ChunkInfo) - ChunkDecommitBitmapBytes; +const size_t ArenasPerChunk = ChunkBytesAvailable / BytesPerArenaWithHeader; + + +struct ChunkBitmap +{ + uintptr_t bitmap[ArenaBitmapWords * ArenasPerChunk]; + + __attribute__((always_inline)) inline void getMarkWordAndMask(const Cell *cell, uint32_t color, + uintptr_t **wordp, uintptr_t *maskp); + + __attribute__((always_inline)) inline bool isMarked(const Cell *cell, uint32_t color) { + uintptr_t *word, mask; + getMarkWordAndMask(cell, color, &word, &mask); + return *word & mask; + } + + __attribute__((always_inline)) inline bool markIfUnmarked(const Cell *cell, uint32_t color) { + uintptr_t *word, mask; + getMarkWordAndMask(cell, BLACK, &word, &mask); + if (*word & mask) + return false; + *word |= mask; + if (color != BLACK) { + + + + + getMarkWordAndMask(cell, color, &word, &mask); + if (*word & mask) + return false; + *word |= mask; + } + return true; + } + + __attribute__((always_inline)) inline void unmark(const Cell *cell, uint32_t color) { + uintptr_t *word, mask; + getMarkWordAndMask(cell, color, &word, &mask); + *word &= ~mask; + } + + void clear() { + PodArrayZero(bitmap); + } +# 721 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" +}; + +typedef int moz_static_assert22[(ArenaBitmapBytes * ArenasPerChunk == sizeof(ChunkBitmap)) ? 1 : -1]; + +typedef BitArray PerArenaBitmap; + +const size_t ChunkPadSize = ChunkSize + - (sizeof(Arena) * ArenasPerChunk) + - sizeof(ChunkBitmap) + - sizeof(PerArenaBitmap) + - sizeof(ChunkInfo); +typedef int moz_static_assert23[(ChunkPadSize < BytesPerArenaWithHeader) ? 1 : -1]; + + + + + +struct Chunk +{ + Arena arenas[ArenasPerChunk]; + + + uint8_t padding[ChunkPadSize]; + + ChunkBitmap bitmap; + PerArenaBitmap decommittedArenas; + ChunkInfo info; + + static Chunk *fromAddress(uintptr_t addr) { + addr &= ~ChunkMask; + return reinterpret_cast(addr); + } + + static bool withinArenasRange(uintptr_t addr) { + uintptr_t offset = addr & ChunkMask; + return offset < ArenasPerChunk * ArenaSize; + } + + static size_t arenaIndex(uintptr_t addr) { + do { } while(0); + return (addr & ChunkMask) >> ArenaShift; + } + + uintptr_t address() const { + uintptr_t addr = reinterpret_cast(this); + do { } while(0); + return addr; + } + + bool unused() const { + return info.numArenasFree == ArenasPerChunk; + } + + bool hasAvailableArenas() const { + return info.numArenasFree != 0; + } + + inline void addToAvailableList(JSCompartment *compartment); + inline void insertToAvailableList(Chunk **insertPoint); + inline void removeFromAvailableList(); + + ArenaHeader *allocateArena(JSCompartment *comp, AllocKind kind); + + void releaseArena(ArenaHeader *aheader); + + static Chunk *allocate(JSRuntime *rt); + + + static inline void release(JSRuntime *rt, Chunk *chunk); + static inline void releaseList(JSRuntime *rt, Chunk *chunkListHead); + + + inline void prepareToBeFreed(JSRuntime *rt); + + + + + + Chunk *getPrevious() { + do { } while(0); + return fromPointerToNext(info.prevp); + } + + + static Chunk *fromPointerToNext(Chunk **nextFieldPtr) { + uintptr_t addr = reinterpret_cast(nextFieldPtr); + do { } while(0); + return reinterpret_cast(addr - __builtin_offsetof (Chunk, info.next)); + } + + private: + inline void init(); + + + unsigned findDecommittedArenaOffset(); + ArenaHeader* fetchNextDecommittedArena(); + + public: + + inline ArenaHeader* fetchNextFreeArena(JSRuntime *rt); + + inline void addArenaToFreeList(JSRuntime *rt, ArenaHeader *aheader); +}; + +typedef int moz_static_assert24[(sizeof(Chunk) == ChunkSize) ? 1 : -1]; + +inline uintptr_t +Cell::address() const +{ + uintptr_t addr = uintptr_t(this); + do { } while(0); + do { } while(0); + return addr; +} + +inline uintptr_t +ArenaHeader::address() const +{ + uintptr_t addr = reinterpret_cast(this); + do { } while(0); + do { } while(0); + return addr; +} + +inline Chunk * +ArenaHeader::chunk() const +{ + return Chunk::fromAddress(address()); +} + +inline uintptr_t +ArenaHeader::arenaAddress() const +{ + return address(); +} + +inline Arena * +ArenaHeader::getArena() +{ + return reinterpret_cast(arenaAddress()); +} + +inline bool +ArenaHeader::isEmpty() const +{ + + do { } while(0); + size_t firstThingOffset = Arena::firstThingOffset(getAllocKind()); + return firstFreeSpanOffsets == FreeSpan::encodeOffsets(firstThingOffset, ArenaMask); +} + +FreeSpan +ArenaHeader::getFirstFreeSpan() const +{ + + + + return FreeSpan::decodeOffsets(arenaAddress(), firstFreeSpanOffsets); +} + +void +ArenaHeader::setFirstFreeSpan(const FreeSpan *span) +{ + do { } while(0); + firstFreeSpanOffsets = span->encodeAsOffsets(); +} + +inline ArenaHeader * +ArenaHeader::getNextDelayedMarking() const +{ + return &reinterpret_cast(nextDelayedMarking << ArenaShift)->aheader; +} + +inline void +ArenaHeader::setNextDelayedMarking(ArenaHeader *aheader) +{ + do { } while(0); + hasDelayedMarking = 1; + nextDelayedMarking = aheader->arenaAddress() >> ArenaShift; +} + +__attribute__((always_inline)) inline void +ChunkBitmap::getMarkWordAndMask(const Cell *cell, uint32_t color, + uintptr_t **wordp, uintptr_t *maskp) +{ + size_t bit = (cell->address() & ChunkMask) / Cell::CellSize + color; + do { } while(0); + *maskp = uintptr_t(1) << (bit % (8 * 4)); + *wordp = &bitmap[bit / (8 * 4)]; +} + +static void +AssertValidColor(const void *thing, uint32_t color) +{ + + + + +} + +inline ArenaHeader * +Cell::arenaHeader() const +{ + uintptr_t addr = address(); + addr &= ~ArenaMask; + return reinterpret_cast(addr); +} + +Chunk * +Cell::chunk() const +{ + uintptr_t addr = uintptr_t(this); + do { } while(0); + addr &= ~(ChunkSize - 1); + return reinterpret_cast(addr); +} + +AllocKind +Cell::getAllocKind() const +{ + return arenaHeader()->getAllocKind(); +} + +bool +Cell::isMarked(uint32_t color ) const +{ + AssertValidColor(this, color); + return chunk()->bitmap.isMarked(this, color); +} + +bool +Cell::markIfUnmarked(uint32_t color ) const +{ + AssertValidColor(this, color); + return chunk()->bitmap.markIfUnmarked(this, color); +} + +void +Cell::unmark(uint32_t color) const +{ + do { } while(0); + AssertValidColor(this, color); + chunk()->bitmap.unmark(this, color); +} + +JSCompartment * +Cell::compartment() const +{ + return arenaHeader()->compartment; +} +# 980 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" +} + +} +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier.h" 2 +# 117 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier.h" +struct JSXML; + +namespace js { + +template +class EncapsulatedPtr +{ + protected: + union { + T *value; + Unioned other; + }; + + public: + EncapsulatedPtr() : value(__null) {} + explicit EncapsulatedPtr(T *v) : value(v) {} + explicit EncapsulatedPtr(const EncapsulatedPtr &v) : value(v.value) {} + + ~EncapsulatedPtr() { pre(); } + + + void clear() { + pre(); + value = __null; + } + + EncapsulatedPtr &operator=(T *v) { + pre(); + do { } while(0); + value = v; + return *this; + } + + EncapsulatedPtr &operator=(const EncapsulatedPtr &v) { + pre(); + do { } while(0); + value = v.value; + return *this; + } + + + T *get() const { return value; } + + + + + + T **unsafeGet() { return &value; } + void unsafeSet(T *v) { value = v; } + + Unioned *unsafeGetUnioned() { return &other; } + + T &operator*() const { return *value; } + T *operator->() const { return value; } + + operator T*() const { return value; } + + protected: + void pre() { T::writeBarrierPre(value); } +}; + +template +class HeapPtr : public EncapsulatedPtr +{ + public: + HeapPtr() : EncapsulatedPtr(__null) {} + explicit HeapPtr(T *v) : EncapsulatedPtr(v) { post(); } + explicit HeapPtr(const HeapPtr &v) + : EncapsulatedPtr(v) { post(); } + + void init(T *v) { + do { } while(0); + this->value = v; + post(); + } + + HeapPtr &operator=(T *v) { + this->pre(); + do { } while(0); + this->value = v; + post(); + return *this; + } + + HeapPtr &operator=(const HeapPtr &v) { + this->pre(); + do { } while(0); + this->value = v.value; + post(); + return *this; + } + + protected: + void post() { T::writeBarrierPost(this->value, (void *)&this->value); } + + + template + friend inline void + BarrieredSetPair(JSCompartment *comp, + HeapPtr &v1, T1 *val1, + HeapPtr &v2, T2 *val2); +}; + +template +class RelocatablePtr : public EncapsulatedPtr +{ + public: + RelocatablePtr() : EncapsulatedPtr(__null) {} + explicit RelocatablePtr(T *v) : EncapsulatedPtr(v) { post(); } + explicit RelocatablePtr(const RelocatablePtr &v) + : EncapsulatedPtr(v) { post(); } + + ~RelocatablePtr() { + this->pre(); + relocate(); + } + + RelocatablePtr &operator=(T *v) { + this->pre(); + do { } while(0); + this->value = v; + post(); + return *this; + } + + RelocatablePtr &operator=(const RelocatablePtr &v) { + this->pre(); + do { } while(0); + this->value = v.value; + post(); + return *this; + } + + protected: + void post() { T::writeBarrierRelocPost(this->value, (void *)&this->value); } + void relocate() { T::writeBarrierRelocated(this->value, (void *)&this->value); } +}; + + + + + +template +static inline void +BarrieredSetPair(JSCompartment *comp, + HeapPtr &v1, T1 *val1, + HeapPtr &v2, T2 *val2) +{ + if (T1::needWriteBarrierPre(comp)) { + v1.pre(); + v2.pre(); + } + v1.unsafeSet(val1); + v2.unsafeSet(val2); + v1.post(); + v2.post(); +} + +struct Shape; +class BaseShape; +namespace types { struct TypeObject; } + +typedef RelocatablePtr RelocatablePtrObject; +typedef RelocatablePtr RelocatablePtrScript; + +typedef HeapPtr HeapPtrObject; +typedef HeapPtr HeapPtrFunction; +typedef HeapPtr HeapPtrString; +typedef HeapPtr HeapPtrScript; +typedef HeapPtr HeapPtrShape; +typedef HeapPtr HeapPtrBaseShape; +typedef HeapPtr HeapPtrTypeObject; +typedef HeapPtr HeapPtrXML; + + +template +struct HeapPtrHasher +{ + typedef HeapPtr Key; + typedef T *Lookup; + + static HashNumber hash(Lookup obj) { return DefaultHasher::hash(obj); } + static bool match(const Key &k, Lookup l) { return k.get() == l; } +}; + + +template +struct DefaultHasher< HeapPtr > : HeapPtrHasher { }; + +class EncapsulatedValue +{ + protected: + Value value; + + + + + + EncapsulatedValue() ; + EncapsulatedValue(const EncapsulatedValue &v) ; + EncapsulatedValue &operator=(const Value &v) ; + EncapsulatedValue &operator=(const EncapsulatedValue &v) ; + + EncapsulatedValue(const Value &v) : value(v) {} + ~EncapsulatedValue() {} + + public: + inline bool operator==(const EncapsulatedValue &v) const { return value == v.value; } + inline bool operator!=(const EncapsulatedValue &v) const { return value != v.value; } + + const Value &get() const { return value; } + Value *unsafeGet() { return &value; } + operator const Value &() const { return value; } + + bool isUndefined() const { return value.isUndefined(); } + bool isNull() const { return value.isNull(); } + bool isBoolean() const { return value.isBoolean(); } + bool isTrue() const { return value.isTrue(); } + bool isFalse() const { return value.isFalse(); } + bool isNumber() const { return value.isNumber(); } + bool isInt32() const { return value.isInt32(); } + bool isDouble() const { return value.isDouble(); } + bool isString() const { return value.isString(); } + bool isObject() const { return value.isObject(); } + bool isMagic(JSWhyMagic why) const { return value.isMagic(why); } + bool isGCThing() const { return value.isGCThing(); } + bool isMarkable() const { return value.isMarkable(); } + + bool toBoolean() const { return value.toBoolean(); } + double toNumber() const { return value.toNumber(); } + int32_t toInt32() const { return value.toInt32(); } + double toDouble() const { return value.toDouble(); } + JSString *toString() const { return value.toString(); } + JSObject &toObject() const { return value.toObject(); } + JSObject *toObjectOrNull() const { return value.toObjectOrNull(); } + void *toGCThing() const { return value.toGCThing(); } + + JSGCTraceKind gcKind() const { return value.gcKind(); } + + uint64_t asRawBits() const { return value.asRawBits(); } + + + + + + static inline void writeBarrierPre(const Value &v); + static inline void writeBarrierPre(JSCompartment *comp, const Value &v); + + protected: + inline void pre(); + inline void pre(JSCompartment *comp); +}; + +class HeapValue : public EncapsulatedValue +{ + public: + explicit inline HeapValue(); + explicit inline HeapValue(const Value &v); + explicit inline HeapValue(const HeapValue &v); + inline ~HeapValue(); + + inline void init(const Value &v); + inline void init(JSCompartment *comp, const Value &v); + + inline HeapValue &operator=(const Value &v); + inline HeapValue &operator=(const HeapValue &v); + + + + + + + + inline void set(JSCompartment *comp, const Value &v); + + static inline void writeBarrierPost(const Value &v, Value *addr); + static inline void writeBarrierPost(JSCompartment *comp, const Value &v, Value *addr); + + private: + inline void post(); + inline void post(JSCompartment *comp); +}; + +class RelocatableValue : public EncapsulatedValue +{ + public: + explicit inline RelocatableValue(); + explicit inline RelocatableValue(const Value &v); + explicit inline RelocatableValue(const RelocatableValue &v); + inline ~RelocatableValue(); + + inline RelocatableValue &operator=(const Value &v); + inline RelocatableValue &operator=(const RelocatableValue &v); + + private: + inline void post(); + inline void post(JSCompartment *comp); + inline void relocate(); +}; + +class HeapSlot : public EncapsulatedValue +{ + + + + + inline HeapSlot &operator=(const Value &v) ; + inline HeapSlot &operator=(const HeapValue &v) ; + inline HeapSlot &operator=(const HeapSlot &v) ; + + public: + explicit inline HeapSlot() ; + explicit inline HeapSlot(JSObject *obj, uint32_t slot, const Value &v); + explicit inline HeapSlot(JSObject *obj, uint32_t slot, const HeapSlot &v); + inline ~HeapSlot(); + + inline void init(JSObject *owner, uint32_t slot, const Value &v); + inline void init(JSCompartment *comp, JSObject *owner, uint32_t slot, const Value &v); + + inline void set(JSObject *owner, uint32_t slot, const Value &v); + inline void set(JSCompartment *comp, JSObject *owner, uint32_t slot, const Value &v); + + static inline void writeBarrierPost(JSObject *obj, uint32_t slot); + static inline void writeBarrierPost(JSCompartment *comp, JSObject *obj, uint32_t slotno); + + private: + inline void post(JSObject *owner, uint32_t slot); + inline void post(JSCompartment *comp, JSObject *owner, uint32_t slot); +}; + + + + + + + +inline void +SlotRangeWriteBarrierPost(JSCompartment *comp, JSObject *obj, uint32_t start, uint32_t count) +{ +} + +static inline const Value * +Valueify(const EncapsulatedValue *array) +{ + typedef int moz_static_assert25[(sizeof(HeapValue) == sizeof(Value)) ? 1 : -1]; + typedef int moz_static_assert26[(sizeof(HeapSlot) == sizeof(Value)) ? 1 : -1]; + return (const Value *)array; +} + +class HeapSlotArray +{ + HeapSlot *array; + + public: + HeapSlotArray(HeapSlot *array) : array(array) {} + + operator const Value *() const { return Valueify(array); } + operator HeapSlot *() const { return array; } + + HeapSlotArray operator +(int offset) const { return HeapSlotArray(array + offset); } + HeapSlotArray operator +(uint32_t offset) const { return HeapSlotArray(array + offset); } +}; + +class EncapsulatedId +{ + protected: + jsid value; + + explicit EncapsulatedId() : value(((jsid)0x2)) {} + explicit inline EncapsulatedId(jsid id) : value(id) {} + ~EncapsulatedId() {} + + private: + EncapsulatedId(const EncapsulatedId &v) ; + EncapsulatedId &operator=(const EncapsulatedId &v) ; + + public: + bool operator==(jsid id) const { return value == id; } + bool operator!=(jsid id) const { return value != id; } + + jsid get() const { return value; } + jsid *unsafeGet() { return &value; } + operator jsid() const { return value; } + + protected: + inline void pre(); +}; + +class RelocatableId : public EncapsulatedId +{ + public: + explicit RelocatableId() : EncapsulatedId() {} + explicit inline RelocatableId(jsid id) : EncapsulatedId(id) {} + inline ~RelocatableId(); + + inline RelocatableId &operator=(jsid id); + inline RelocatableId &operator=(const RelocatableId &v); +}; + +class HeapId : public EncapsulatedId +{ + public: + explicit HeapId() : EncapsulatedId() {} + explicit inline HeapId(jsid id); + inline ~HeapId(); + + inline void init(jsid id); + + inline HeapId &operator=(jsid id); + inline HeapId &operator=(const HeapId &v); + + private: + inline void post(); + + HeapId(const HeapId &v) ; +}; +# 544 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier.h" +template +class ReadBarriered +{ + T *value; + + public: + ReadBarriered() : value(__null) {} + ReadBarriered(T *value) : value(value) {} + + T *get() const { + if (!value) + return __null; + T::readBarrier(value); + return value; + } + + operator T*() const { return get(); } + + T &operator*() const { return *get(); } + T *operator->() const { return get(); } + + T **unsafeGet() { return &value; } + + void set(T *v) { value = v; } + + operator bool() { return !!value; } +}; + +class ReadBarrieredValue +{ + Value value; + + public: + ReadBarrieredValue() : value(UndefinedValue()) {} + ReadBarrieredValue(const Value &value) : value(value) {} + + inline const Value &get() const; + Value *unsafeGet() { return &value; } + inline operator const Value &() const; + + inline JSObject &toObject() const; +}; + +namespace tl { + +template struct IsRelocatableHeapType > + { static const bool result = false; }; +template <> struct IsRelocatableHeapType { static const bool result = false; }; +template <> struct IsRelocatableHeapType { static const bool result = false; }; +template <> struct IsRelocatableHeapType { static const bool result = false; }; + +} +} +# 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 + + +struct JSIdArray { + int length; + js::HeapId vector[1]; +}; + + + +static __attribute__((always_inline)) inline jsid +JSID_FROM_BITS(size_t bits) +{ + jsid id; + (id) = bits; + return id; +} +# 58 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" +static __attribute__((always_inline)) inline jsid +NON_INTEGER_ATOM_TO_JSID(JSAtom *atom) +{ + do { } while(0); + jsid id = JSID_FROM_BITS((size_t)atom); + do { } while(0); + return id; +} + + +static __attribute__((always_inline)) inline JSBool +JSID_IS_ATOM(jsid id) +{ + return JSID_IS_STRING(id); +} + +static __attribute__((always_inline)) inline JSBool +JSID_IS_ATOM(jsid id, JSAtom *atom) +{ + return id == JSID_FROM_BITS((size_t)atom); +} + +static __attribute__((always_inline)) inline JSAtom * +JSID_TO_ATOM(jsid id) +{ + return (JSAtom *)JSID_TO_STRING(id); +} + +typedef int moz_static_assert27[(sizeof(JSHashNumber) == 4) ? 1 : -1]; +typedef int moz_static_assert28[(sizeof(jsid) == 4) ? 1 : -1]; + +namespace js { + +static __attribute__((always_inline)) inline JSHashNumber +HashId(jsid id) +{ + JSHashNumber n = + + JSHashNumber((id)); + + + + + + return n * 0x9E3779B9U; +} + +static __attribute__((always_inline)) inline Value +IdToValue(jsid id) +{ + if (JSID_IS_STRING(id)) + return StringValue(JSID_TO_STRING(id)); + if ((__builtin_expect((JSID_IS_INT(id)), 1))) + return Int32Value(JSID_TO_INT(id)); + if ((__builtin_expect((JSID_IS_OBJECT(id)), 1))) + return ObjectValue(*JSID_TO_OBJECT(id)); + do { } while(0); + return UndefinedValue(); +} + +static __attribute__((always_inline)) inline jsval +IdToJsval(jsid id) +{ + return IdToValue(id); +} + +template<> +struct DefaultHasher +{ + typedef jsid Lookup; + static HashNumber hash(const Lookup &l) { + return HashNumber((l)); + } + static bool match(const jsid &id, const Lookup &l) { + return id == l; + } +}; + +} + + +#define ATOM_HASH(atom) ((JSHashNumber)(atom) >> 2) +# 151 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" +extern const char * +js_AtomToPrintableString(JSContext *cx, JSAtom *atom, JSAutoByteString *bytes); + +namespace js { + + +inline uint32_t +HashChars(const jschar *chars, size_t length) +{ + uint32_t h = 0; + for (; length; chars++, length--) + h = (((h) << (4)) | ((h) >> (32 - (4)))) ^ *chars; + return h; +} + +class AtomStateEntry +{ + uintptr_t bits; + + static const uintptr_t NO_TAG_MASK = uintptr_t(-1) - 1; + + public: + AtomStateEntry() : bits(0) {} + AtomStateEntry(const AtomStateEntry &other) : bits(other.bits) {} + AtomStateEntry(JSAtom *ptr, bool tagged) + : bits(uintptr_t(ptr) | uintptr_t(tagged)) + { + do { } while(0); + } + + bool isTagged() const { + return bits & 0x1; + } + + + + + + void setTagged(bool enabled) const { + const_cast(this)->bits |= uintptr_t(enabled); + } + + JSAtom *asPtr() const; +}; + +struct AtomHasher +{ + struct Lookup + { + const jschar *chars; + size_t length; + const JSAtom *atom; + + Lookup(const jschar *chars, size_t length) : chars(chars), length(length), atom(__null) {} + inline Lookup(const JSAtom *atom); + }; + + static HashNumber hash(const Lookup &l) { return HashChars(l.chars, l.length); } + static inline bool match(const AtomStateEntry &entry, const Lookup &lookup); +}; + +typedef HashSet AtomSet; +# 231 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" +enum FlationCoding +{ + NormalEncoding, + CESU8Encoding +}; + +class PropertyName; + +} + +struct JSAtomState +{ + js::AtomSet atoms; +# 256 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" + js::PropertyName *emptyAtom; + + + + + + js::PropertyName *booleanAtoms[2]; + js::PropertyName *typeAtoms[JSTYPE_LIMIT]; + js::PropertyName *nullAtom; + + + js::PropertyName *classAtoms[JSProto_LIMIT]; + + +#define DEFINE_ATOM(id,text) js::PropertyName *id ##Atom; +#define DEFINE_PROTOTYPE_ATOM(id) js::PropertyName *id ##Atom; +#define DEFINE_KEYWORD_ATOM(id) js::PropertyName *id ##Atom; +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.tbl" 1 +# 37 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.tbl" +js::PropertyName *anonymousAtom; +js::PropertyName *applyAtom; +js::PropertyName *argumentsAtom; +js::PropertyName *arityAtom; +js::PropertyName *BYTES_PER_ELEMENTAtom; +js::PropertyName *callAtom; +js::PropertyName *calleeAtom; +js::PropertyName *callerAtom; +js::PropertyName *classPrototypeAtom; +js::PropertyName *constructorAtom; +js::PropertyName *eachAtom; +js::PropertyName *evalAtom; +js::PropertyName *fileNameAtom; +js::PropertyName *getAtom; +js::PropertyName *globalAtom; +js::PropertyName *ignoreCaseAtom; +js::PropertyName *indexAtom; +js::PropertyName *inputAtom; +js::PropertyName *toISOStringAtom; +js::PropertyName *iteratorAtom; +js::PropertyName *joinAtom; +js::PropertyName *lastIndexAtom; +js::PropertyName *lengthAtom; +js::PropertyName *lineNumberAtom; +js::PropertyName *messageAtom; +js::PropertyName *multilineAtom; +js::PropertyName *nameAtom; +js::PropertyName *nextAtom; +js::PropertyName *noSuchMethodAtom; +js::PropertyName *objectNullAtom; +js::PropertyName *objectUndefinedAtom; +js::PropertyName *ofAtom; +js::PropertyName *protoAtom; +js::PropertyName *setAtom; +js::PropertyName *sourceAtom; +js::PropertyName *stackAtom; +js::PropertyName *stickyAtom; +js::PropertyName *toGMTStringAtom; +js::PropertyName *toLocaleStringAtom; +js::PropertyName *toSourceAtom; +js::PropertyName *toStringAtom; +js::PropertyName *toUTCStringAtom; +js::PropertyName *valueOfAtom; +js::PropertyName *toJSONAtom; +js::PropertyName *void0Atom; +js::PropertyName *enumerableAtom; +js::PropertyName *configurableAtom; +js::PropertyName *writableAtom; +js::PropertyName *valueAtom; +js::PropertyName *testAtom; +js::PropertyName *useStrictAtom; +js::PropertyName *locAtom; +js::PropertyName *lineAtom; +js::PropertyName *InfinityAtom; +js::PropertyName *NaNAtom; +js::PropertyName *builderAtom; + + +js::PropertyName *etagoAtom; +js::PropertyName *namespaceAtom; +js::PropertyName *ptagcAtom; +js::PropertyName *qualifierAtom; +js::PropertyName *spaceAtom; +js::PropertyName *stagoAtom; +js::PropertyName *starAtom; +js::PropertyName *starQualifierAtom; +js::PropertyName *tagcAtom; +js::PropertyName *xmlAtom; +js::PropertyName *functionNamespaceURIAtom; + + +js::PropertyName *ProxyAtom; +js::PropertyName *getOwnPropertyDescriptorAtom; +js::PropertyName *getPropertyDescriptorAtom; +js::PropertyName *definePropertyAtom; +js::PropertyName *deleteAtom; +js::PropertyName *getOwnPropertyNamesAtom; +js::PropertyName *enumerateAtom; +js::PropertyName *fixAtom; +js::PropertyName *hasAtom; +js::PropertyName *hasOwnAtom; +js::PropertyName *keysAtom; +js::PropertyName *iterateAtom; +js::PropertyName *WeakMapAtom; +js::PropertyName *byteLengthAtom; +js::PropertyName *returnAtom; +js::PropertyName *throwAtom; +js::PropertyName *urlAtom; +js::PropertyName *innermostAtom; + +js::PropertyName *XMLListAtom; +js::PropertyName *decodeURIAtom; +js::PropertyName *decodeURIComponentAtom; +js::PropertyName *defineGetterAtom; +js::PropertyName *defineSetterAtom; +js::PropertyName *encodeURIAtom; +js::PropertyName *encodeURIComponentAtom; +js::PropertyName *escapeAtom; +js::PropertyName *hasOwnPropertyAtom; +js::PropertyName *isFiniteAtom; +js::PropertyName *isNaNAtom; +js::PropertyName *isPrototypeOfAtom; +js::PropertyName *isXMLNameAtom; +js::PropertyName *lookupGetterAtom; +js::PropertyName *lookupSetterAtom; +js::PropertyName *parseFloatAtom; +js::PropertyName *parseIntAtom; +js::PropertyName *propertyIsEnumerableAtom; +js::PropertyName *unescapeAtom; +js::PropertyName *unevalAtom; +js::PropertyName *unwatchAtom; +js::PropertyName *watchAtom; +# 274 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 +#undef DEFINE_ATOM +#undef DEFINE_PROTOTYPE_ATOM +#undef DEFINE_KEYWORD_ATOM + + static const size_t commonAtomsOffset; + + void junkAtoms() { + + + + } + + JSAtom **commonAtomsStart() { + return reinterpret_cast(&emptyAtom); + } + + void checkStaticInvariants(); +}; + +extern bool +AtomIsInterned(JSContext *cx, JSAtom *atom); + +#define ATOM(name) cx->runtime->atomState.name ##Atom + +#define COMMON_ATOM_INDEX(name) ((offsetof(JSAtomState, name ##Atom) - JSAtomState::commonAtomsOffset) / sizeof(JSAtom*)) + + +#define COMMON_TYPE_ATOM_INDEX(type) ((offsetof(JSAtomState, typeAtoms[type]) - JSAtomState::commonAtomsOffset) / sizeof(JSAtom*)) + + + +#define NAME_OFFSET(name) offsetof(JSAtomState, name ##Atom) +#define OFFSET_TO_NAME(rt,off) (*(js::PropertyName **)((char*)&(rt)->atomState + (off))) +#define CLASS_NAME_OFFSET(name) offsetof(JSAtomState, classAtoms[JSProto_ ##name]) +#define CLASS_NAME(cx,name) ((cx)->runtime->atomState.classAtoms[JSProto_ ##name]) + +extern const char *const js_common_atom_names[]; +extern const size_t js_common_atom_count; + + + + +#define JS_BOOLEAN_STR(type) (js_common_atom_names[1 + (type)]) +#define JS_TYPE_STR(type) (js_common_atom_names[1 + 2 + (type)]) + + +extern const char js_object_str[]; +extern const char js_undefined_str[]; + + +#define JS_PROTO(name,code,init) extern const char js_ ##name ##_str[]; +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsproto.tbl" 1 + + + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" 1 +# 42 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_VERSION_ECMA_3 148 +#define JS_VERSION_ECMA_3_TEST 149 +# 124 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_HAS_STR_HTML_HELPERS 1 +#define JS_HAS_OBJ_PROTO_PROP 1 +#define JS_HAS_OBJ_WATCHPOINT 1 +#define JS_HAS_TOSOURCE 1 +#define JS_HAS_CATCH_GUARD 1 +#define JS_HAS_UNEVAL 1 +#define JS_HAS_CONST 1 +#define JS_HAS_FUN_EXPR_STMT 1 +#define JS_HAS_NO_SUCH_METHOD 1 +#define JS_HAS_GENERATORS 1 +#define JS_HAS_BLOCK_SCOPE 1 +#define JS_HAS_DESTRUCTURING 2 +#define JS_HAS_GENERATOR_EXPRS 1 +#define JS_HAS_EXPR_CLOSURES 1 +# 146 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_HAS_NEW_GLOBAL_OBJECT 1 + + +#define JS_HAS_MAKE_SYSTEM_OBJECT 1 + + +#define JS_HAS_DESTRUCTURING_SHORTHAND (JS_HAS_DESTRUCTURING == 2) + + + + + +#define OLD_GETTER_SETTER_METHODS 1 + + +#define USE_NEW_OBJECT_REPRESENTATION 0 + + + + +#define NEW_OBJECT_REPRESENTATION_ONLY() MOZ_NOT_REACHED("don't call this! to be used in the new object representation") +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsproto.tbl" 2 + + +#define XML_INIT js_InitXMLClass +#define NAMESPACE_INIT js_InitNamespaceClass +#define QNAME_INIT js_InitQNameClass +#define XMLFILTER_INIT js_InitXMLFilterClass +# 27 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsproto.tbl" +extern const char js_Null_str[]; +extern const char js_Object_str[]; +extern const char js_Function_str[]; +extern const char js_Array_str[]; +extern const char js_Boolean_str[]; +extern const char js_JSON_str[]; +extern const char js_Date_str[]; +extern const char js_Math_str[]; +extern const char js_Number_str[]; +extern const char js_String_str[]; +extern const char js_RegExp_str[]; +extern const char js_XML_str[]; +extern const char js_Namespace_str[]; +extern const char js_QName_str[]; +extern const char js_Error_str[]; +extern const char js_InternalError_str[]; +extern const char js_EvalError_str[]; +extern const char js_RangeError_str[]; +extern const char js_ReferenceError_str[]; +extern const char js_SyntaxError_str[]; +extern const char js_TypeError_str[]; +extern const char js_URIError_str[]; +extern const char js_Iterator_str[]; +extern const char js_StopIteration_str[]; +extern const char js_ArrayBuffer_str[]; +extern const char js_Int8Array_str[]; +extern const char js_Uint8Array_str[]; +extern const char js_Int16Array_str[]; +extern const char js_Uint16Array_str[]; +extern const char js_Int32Array_str[]; +extern const char js_Uint32Array_str[]; +extern const char js_Float32Array_str[]; +extern const char js_Float64Array_str[]; +extern const char js_Uint8ClampedArray_str[]; +extern const char js_Proxy_str[]; +extern const char js_AnyName_str[]; +extern const char js_WeakMap_str[]; +extern const char js_Map_str[]; +extern const char js_Set_str[]; +extern const char js_DataView_str[]; + +#undef XML_INIT +#undef NAMESPACE_INIT +#undef QNAME_INIT +# 326 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 +#undef JS_PROTO + +#define DEFINE_ATOM(id,text) extern const char js_ ##id ##_str[]; +#define DEFINE_PROTOTYPE_ATOM(id) +#define DEFINE_KEYWORD_ATOM(id) +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.tbl" 1 +# 37 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.tbl" +extern const char js_anonymous_str[]; +extern const char js_apply_str[]; +extern const char js_arguments_str[]; +extern const char js_arity_str[]; +extern const char js_BYTES_PER_ELEMENT_str[]; +extern const char js_call_str[]; +extern const char js_callee_str[]; +extern const char js_caller_str[]; +extern const char js_classPrototype_str[]; +extern const char js_constructor_str[]; +extern const char js_each_str[]; +extern const char js_eval_str[]; +extern const char js_fileName_str[]; +extern const char js_get_str[]; +extern const char js_global_str[]; +extern const char js_ignoreCase_str[]; +extern const char js_index_str[]; +extern const char js_input_str[]; +extern const char js_toISOString_str[]; +extern const char js_iterator_str[]; +extern const char js_join_str[]; +extern const char js_lastIndex_str[]; +extern const char js_length_str[]; +extern const char js_lineNumber_str[]; +extern const char js_message_str[]; +extern const char js_multiline_str[]; +extern const char js_name_str[]; +extern const char js_next_str[]; +extern const char js_noSuchMethod_str[]; +extern const char js_objectNull_str[]; +extern const char js_objectUndefined_str[]; +extern const char js_of_str[]; +extern const char js_proto_str[]; +extern const char js_set_str[]; +extern const char js_source_str[]; +extern const char js_stack_str[]; +extern const char js_sticky_str[]; +extern const char js_toGMTString_str[]; +extern const char js_toLocaleString_str[]; +extern const char js_toSource_str[]; +extern const char js_toString_str[]; +extern const char js_toUTCString_str[]; +extern const char js_valueOf_str[]; +extern const char js_toJSON_str[]; +extern const char js_void0_str[]; +extern const char js_enumerable_str[]; +extern const char js_configurable_str[]; +extern const char js_writable_str[]; +extern const char js_value_str[]; +extern const char js_test_str[]; +extern const char js_useStrict_str[]; +extern const char js_loc_str[]; +extern const char js_line_str[]; +extern const char js_Infinity_str[]; +extern const char js_NaN_str[]; +extern const char js_builder_str[]; + + +extern const char js_etago_str[]; +extern const char js_namespace_str[]; +extern const char js_ptagc_str[]; +extern const char js_qualifier_str[]; +extern const char js_space_str[]; +extern const char js_stago_str[]; +extern const char js_star_str[]; +extern const char js_starQualifier_str[]; +extern const char js_tagc_str[]; +extern const char js_xml_str[]; +extern const char js_functionNamespaceURI_str[]; + + + +extern const char js_getOwnPropertyDescriptor_str[]; +extern const char js_getPropertyDescriptor_str[]; +extern const char js_defineProperty_str[]; + +extern const char js_getOwnPropertyNames_str[]; +extern const char js_enumerate_str[]; +extern const char js_fix_str[]; +extern const char js_has_str[]; +extern const char js_hasOwn_str[]; +extern const char js_keys_str[]; +extern const char js_iterate_str[]; + +extern const char js_byteLength_str[]; + + +extern const char js_url_str[]; +extern const char js_innermost_str[]; + +extern const char js_XMLList_str[]; +extern const char js_decodeURI_str[]; +extern const char js_decodeURIComponent_str[]; +extern const char js_defineGetter_str[]; +extern const char js_defineSetter_str[]; +extern const char js_encodeURI_str[]; +extern const char js_encodeURIComponent_str[]; +extern const char js_escape_str[]; +extern const char js_hasOwnProperty_str[]; +extern const char js_isFinite_str[]; +extern const char js_isNaN_str[]; +extern const char js_isPrototypeOf_str[]; +extern const char js_isXMLName_str[]; +extern const char js_lookupGetter_str[]; +extern const char js_lookupSetter_str[]; +extern const char js_parseFloat_str[]; +extern const char js_parseInt_str[]; +extern const char js_propertyIsEnumerable_str[]; +extern const char js_unescape_str[]; +extern const char js_uneval_str[]; +extern const char js_unwatch_str[]; +extern const char js_watch_str[]; +# 332 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 +#undef DEFINE_ATOM +#undef DEFINE_PROTOTYPE_ATOM +#undef DEFINE_KEYWORD_ATOM + + +extern const char js_close_str[]; +extern const char js_send_str[]; + + + +extern const char js_getter_str[]; +extern const char js_setter_str[]; + + + + + + +extern JSBool +js_InitAtomState(JSRuntime *rt); + + + + + +extern void +js_FinishAtomState(JSRuntime *rt); + + + + + +namespace js { + +extern void +MarkAtomState(JSTracer *trc, bool markAll); + +extern void +SweepAtomState(JSRuntime *rt); + +extern bool +InitCommonAtoms(JSContext *cx); + +extern void +FinishCommonAtoms(JSRuntime *rt); + + +enum InternBehavior +{ + DoNotInternAtom = false, + InternAtom = true +}; + +} + +extern JSAtom * +js_Atomize(JSContext *cx, const char *bytes, size_t length, + js::InternBehavior ib = js::DoNotInternAtom, + js::FlationCoding fc = js::NormalEncoding); + +extern JSAtom * +js_AtomizeChars(JSContext *cx, const jschar *chars, size_t length, + js::InternBehavior ib = js::DoNotInternAtom); + +extern JSAtom * +js_AtomizeString(JSContext *cx, JSString *str, js::InternBehavior ib = js::DoNotInternAtom); + + + + + +extern JSAtom * +js_GetExistingStringAtom(JSContext *cx, const jschar *chars, size_t length); +# 413 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" +inline bool +js_ValueToAtom(JSContext *cx, const js::Value &v, JSAtom **atomp); + +namespace js { + +bool +InternNonIntElementId(JSContext *cx, JSObject *obj, const Value &idval, + jsid *idp, Value *vp); + +inline bool +InternNonIntElementId(JSContext *cx, JSObject *obj, const Value &idval, jsid *idp) +{ + Value dummy; + return InternNonIntElementId(cx, obj, idval, idp, &dummy); +} + + + + + + +extern void +InitAtomMap(JSContext *cx, AtomIndexMap *indices, HeapPtr *atoms); + +template +bool +XDRAtom(XDRState *xdr, JSAtom **atomp); + +} +# 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclass.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclass.h" +#define jsclass_h__ +# 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclass.h" +namespace js { + +class PropertyName; +class SpecialId; + +static __attribute__((always_inline)) inline jsid +SPECIALID_TO_JSID(const SpecialId &sid); +# 41 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclass.h" +class SpecialId { + uintptr_t bits; + + + friend __attribute__((always_inline)) inline jsid SPECIALID_TO_JSID(const SpecialId &sid); + + static const uintptr_t TYPE_VOID = 0x2; + static const uintptr_t TYPE_OBJECT = 0x4; + static const uintptr_t TYPE_DEFAULT_XML_NAMESPACE = 0x6; + static const uintptr_t TYPE_MASK = 0x7; + + SpecialId(uintptr_t bits) : bits(bits) { } + + public: + SpecialId() : bits(TYPE_VOID) { } + + + + SpecialId(JSObject &obj) + : bits(uintptr_t(&obj) | TYPE_OBJECT) + { + do { } while(0); + do { } while(0); + } + + bool isObject() const { + return (bits & TYPE_MASK) == TYPE_OBJECT && bits != TYPE_OBJECT; + } + + JSObject *toObject() const { + do { } while(0); + return reinterpret_cast(bits & ~TYPE_MASK); + } + + + + static SpecialId empty() { + SpecialId sid(TYPE_OBJECT); + do { } while(0); + return sid; + } + + bool isEmpty() const { + return bits == TYPE_OBJECT; + } + + + + static SpecialId voidId() { + SpecialId sid(TYPE_VOID); + do { } while(0); + return sid; + } + + bool isVoid() const { + return bits == TYPE_VOID; + } + + + + static SpecialId defaultXMLNamespace() { + SpecialId sid(TYPE_DEFAULT_XML_NAMESPACE); + do { } while(0); + return sid; + } + + bool isDefaultXMLNamespace() const { + return bits == TYPE_DEFAULT_XML_NAMESPACE; + } +}; + +static __attribute__((always_inline)) inline jsid +SPECIALID_TO_JSID(const SpecialId &sid) +{ + jsid id; + (id) = sid.bits; + do { } while (0); + do { } while (0); + do { } while (0); + do { } while (0); + return id; +} + +static __attribute__((always_inline)) inline bool +JSID_IS_SPECIAL(jsid id) +{ + return JSID_IS_OBJECT(id) || JSID_IS_EMPTY(id) || JSID_IS_VOID(id) || + JSID_IS_DEFAULT_XML_NAMESPACE(id); +} + +static __attribute__((always_inline)) inline SpecialId +JSID_TO_SPECIALID(jsid id) +{ + do { } while(0); + if (JSID_IS_OBJECT(id)) + return SpecialId(*JSID_TO_OBJECT(id)); + if (JSID_IS_EMPTY(id)) + return SpecialId::empty(); + if (JSID_IS_VOID(id)) + return SpecialId::voidId(); + do { } while(0); + return SpecialId::defaultXMLNamespace(); +} + +typedef JS::Handle HandleSpecialId; + + + +typedef JSBool +(* LookupGenericOp)(JSContext *cx, HandleObject obj, HandleId id, JSObject **objp, + JSProperty **propp); +typedef JSBool +(* LookupPropOp)(JSContext *cx, HandleObject obj, HandlePropertyName name, JSObject **objp, + JSProperty **propp); +typedef JSBool +(* LookupElementOp)(JSContext *cx, HandleObject obj, uint32_t index, JSObject **objp, + JSProperty **propp); +typedef JSBool +(* LookupSpecialOp)(JSContext *cx, HandleObject obj, HandleSpecialId sid, JSObject **objp, + JSProperty **propp); +typedef JSBool +(* DefineGenericOp)(JSContext *cx, HandleObject obj, HandleId id, const Value *value, + PropertyOp getter, StrictPropertyOp setter, unsigned attrs); +typedef JSBool +(* DefinePropOp)(JSContext *cx, HandleObject obj, HandlePropertyName name, const Value *value, + PropertyOp getter, StrictPropertyOp setter, unsigned attrs); +typedef JSBool +(* DefineElementOp)(JSContext *cx, HandleObject obj, uint32_t index, const Value *value, + PropertyOp getter, StrictPropertyOp setter, unsigned attrs); +typedef JSBool +(* DefineSpecialOp)(JSContext *cx, HandleObject obj, HandleSpecialId sid, const Value *value, + PropertyOp getter, StrictPropertyOp setter, unsigned attrs); +typedef JSBool +(* GenericIdOp)(JSContext *cx, HandleObject obj, HandleObject receiver, HandleId id, Value *vp); +typedef JSBool +(* PropertyIdOp)(JSContext *cx, HandleObject obj, HandleObject receiver, HandlePropertyName name, Value *vp); +typedef JSBool +(* ElementIdOp)(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index, Value *vp); +typedef JSBool +(* ElementIfPresentOp)(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index, Value *vp, bool* present); +typedef JSBool +(* SpecialIdOp)(JSContext *cx, HandleObject obj, HandleObject receiver, HandleSpecialId sid, Value *vp); +typedef JSBool +(* StrictGenericIdOp)(JSContext *cx, HandleObject obj, HandleId id, Value *vp, JSBool strict); +typedef JSBool +(* StrictPropertyIdOp)(JSContext *cx, HandleObject obj, HandlePropertyName name, Value *vp, JSBool strict); +typedef JSBool +(* StrictElementIdOp)(JSContext *cx, HandleObject obj, uint32_t index, Value *vp, JSBool strict); +typedef JSBool +(* StrictSpecialIdOp)(JSContext *cx, HandleObject obj, HandleSpecialId sid, Value *vp, JSBool strict); +typedef JSBool +(* GenericAttributesOp)(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp); +typedef JSBool +(* PropertyAttributesOp)(JSContext *cx, HandleObject obj, HandlePropertyName name, unsigned *attrsp); +typedef JSBool +(* ElementAttributesOp)(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp); +typedef JSBool +(* SpecialAttributesOp)(JSContext *cx, HandleObject obj, HandleSpecialId sid, unsigned *attrsp); +typedef JSBool +(* DeletePropertyOp)(JSContext *cx, HandleObject obj, HandlePropertyName name, Value *vp, JSBool strict); +typedef JSBool +(* DeleteElementOp)(JSContext *cx, HandleObject obj, uint32_t index, Value *vp, JSBool strict); +typedef JSBool +(* DeleteSpecialOp)(JSContext *cx, HandleObject obj, HandleSpecialId sid, Value *vp, JSBool strict); +typedef JSType +(* TypeOfOp)(JSContext *cx, HandleObject obj); + +typedef JSObject * +(* ObjectOp)(JSContext *cx, HandleObject obj); +typedef void +(* ClearOp)(JSContext *cx, HandleObject obj); +typedef void +(* FinalizeOp)(FreeOp *fop, JSObject *obj); + +#define JS_CLASS_MEMBERS const char *name; uint32_t flags; JSPropertyOp addProperty; JSPropertyOp delProperty; JSPropertyOp getProperty; JSStrictPropertyOp setProperty; JSEnumerateOp enumerate; JSResolveOp resolve; JSConvertOp convert; FinalizeOp finalize; JSCheckAccessOp checkAccess; JSNative call; JSHasInstanceOp hasInstance; JSNative construct; JSTraceOp trace +# 240 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclass.h" +struct ClassSizeMeasurement +{ + const char *name; uint32_t flags; JSPropertyOp addProperty; JSPropertyOp delProperty; JSPropertyOp getProperty; JSStrictPropertyOp setProperty; JSEnumerateOp enumerate; JSResolveOp resolve; JSConvertOp convert; FinalizeOp finalize; JSCheckAccessOp checkAccess; JSNative call; JSHasInstanceOp hasInstance; JSNative construct; JSTraceOp trace; +}; + +struct ClassExtension +{ + JSEqualityOp equality; + JSObjectOp outerObject; + JSObjectOp innerObject; + JSIteratorOp iteratorObject; + void *unused; + + + + + + bool isWrappedNative; +}; + +#define JS_NULL_CLASS_EXT {NULL,NULL,NULL,NULL,NULL,false} + +struct ObjectOps +{ + LookupGenericOp lookupGeneric; + LookupPropOp lookupProperty; + LookupElementOp lookupElement; + LookupSpecialOp lookupSpecial; + DefineGenericOp defineGeneric; + DefinePropOp defineProperty; + DefineElementOp defineElement; + DefineSpecialOp defineSpecial; + GenericIdOp getGeneric; + PropertyIdOp getProperty; + ElementIdOp getElement; + ElementIfPresentOp getElementIfPresent; + SpecialIdOp getSpecial; + StrictGenericIdOp setGeneric; + StrictPropertyIdOp setProperty; + StrictElementIdOp setElement; + StrictSpecialIdOp setSpecial; + GenericAttributesOp getGenericAttributes; + PropertyAttributesOp getPropertyAttributes; + ElementAttributesOp getElementAttributes; + SpecialAttributesOp getSpecialAttributes; + GenericAttributesOp setGenericAttributes; + PropertyAttributesOp setPropertyAttributes; + ElementAttributesOp setElementAttributes; + SpecialAttributesOp setSpecialAttributes; + DeletePropertyOp deleteProperty; + DeleteElementOp deleteElement; + DeleteSpecialOp deleteSpecial; + + JSNewEnumerateOp enumerate; + TypeOfOp typeOf; + ObjectOp thisObject; + ClearOp clear; +}; + +#define JS_NULL_OBJECT_OPS {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL} + + + + +struct Class +{ + const char *name; uint32_t flags; JSPropertyOp addProperty; JSPropertyOp delProperty; JSPropertyOp getProperty; JSStrictPropertyOp setProperty; JSEnumerateOp enumerate; JSResolveOp resolve; JSConvertOp convert; FinalizeOp finalize; JSCheckAccessOp checkAccess; JSNative call; JSHasInstanceOp hasInstance; JSNative construct; JSTraceOp trace; + ClassExtension ext; + ObjectOps ops; + uint8_t pad[sizeof(JSClass) - sizeof(ClassSizeMeasurement) - + sizeof(ClassExtension) - sizeof(ObjectOps)]; + + + static const uint32_t NON_NATIVE = (1<<((8 + 8)+3)); + + bool isNative() const { + return !(flags & NON_NATIVE); + } + + bool hasPrivate() const { + return !!(flags & (1<<0)); + } +}; + +typedef int moz_static_assert29[(__builtin_offsetof (JSClass, name) == __builtin_offsetof (Class, name)) ? 1 : -1]; +typedef int moz_static_assert30[(__builtin_offsetof (JSClass, flags) == __builtin_offsetof (Class, flags)) ? 1 : -1]; +typedef int moz_static_assert31[(__builtin_offsetof (JSClass, addProperty) == __builtin_offsetof (Class, addProperty)) ? 1 : -1]; +typedef int moz_static_assert32[(__builtin_offsetof (JSClass, delProperty) == __builtin_offsetof (Class, delProperty)) ? 1 : -1]; +typedef int moz_static_assert33[(__builtin_offsetof (JSClass, getProperty) == __builtin_offsetof (Class, getProperty)) ? 1 : -1]; +typedef int moz_static_assert34[(__builtin_offsetof (JSClass, setProperty) == __builtin_offsetof (Class, setProperty)) ? 1 : -1]; +typedef int moz_static_assert35[(__builtin_offsetof (JSClass, enumerate) == __builtin_offsetof (Class, enumerate)) ? 1 : -1]; +typedef int moz_static_assert36[(__builtin_offsetof (JSClass, resolve) == __builtin_offsetof (Class, resolve)) ? 1 : -1]; +typedef int moz_static_assert37[(__builtin_offsetof (JSClass, convert) == __builtin_offsetof (Class, convert)) ? 1 : -1]; +typedef int moz_static_assert38[(__builtin_offsetof (JSClass, finalize) == __builtin_offsetof (Class, finalize)) ? 1 : -1]; +typedef int moz_static_assert39[(__builtin_offsetof (JSClass, checkAccess) == __builtin_offsetof (Class, checkAccess)) ? 1 : -1]; +typedef int moz_static_assert40[(__builtin_offsetof (JSClass, call) == __builtin_offsetof (Class, call)) ? 1 : -1]; +typedef int moz_static_assert41[(__builtin_offsetof (JSClass, construct) == __builtin_offsetof (Class, construct)) ? 1 : -1]; +typedef int moz_static_assert42[(__builtin_offsetof (JSClass, hasInstance) == __builtin_offsetof (Class, hasInstance)) ? 1 : -1]; +typedef int moz_static_assert43[(__builtin_offsetof (JSClass, trace) == __builtin_offsetof (Class, trace)) ? 1 : -1]; +typedef int moz_static_assert44[(sizeof(JSClass) == sizeof(Class)) ? 1 : -1]; + +static __attribute__((always_inline)) inline JSClass * +Jsvalify(Class *c) +{ + return (JSClass *)c; +} +static __attribute__((always_inline)) inline const JSClass * +Jsvalify(const Class *c) +{ + return (const JSClass *)c; +} + +static __attribute__((always_inline)) inline Class * +Valueify(JSClass *c) +{ + return (Class *)c; +} +static __attribute__((always_inline)) inline const Class * +Valueify(const JSClass *c) +{ + return (const Class *)c; +} + + + + + +enum ESClassValue { + ESClass_Array, ESClass_Number, ESClass_String, ESClass_Boolean, + ESClass_RegExp, ESClass_ArrayBuffer +}; + + + + + + + +inline bool +ObjectClassIs(JSObject &obj, ESClassValue classValue, JSContext *cx); + + +inline bool +IsObjectWithClass(const Value &v, ESClassValue classValue, JSContext *cx); + +} + +namespace JS { + +inline bool +IsPoisonedSpecialId(js::SpecialId iden) +{ + if (iden.isObject()) + return IsPoisonedPtr(iden.toObject()); + return false; +} + +template <> struct RootMethods +{ + static js::SpecialId initial() { return js::SpecialId(); } + static ThingRootKind kind() { return THING_ROOT_ID; } + static bool poisoned(js::SpecialId id) { return IsPoisonedSpecialId(id); } +}; + +} +# 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" 1 + + + + + + + +#define jsfriendapi_h___ + + + + + +# 1 "./../../dist/include/mozilla/GuardObjects.h" 1 +# 10 "./../../dist/include/mozilla/GuardObjects.h" +#define mozilla_GuardObjects_h +# 137 "./../../dist/include/mozilla/GuardObjects.h" +#define MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER +#define MOZ_GUARD_OBJECT_NOTIFIER_PARAM +#define MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM +#define MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL +#define MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT +#define MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT +#define MOZ_GUARD_OBJECT_NOTIFIER_INIT do { } while (0) +# 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" 2 + +extern "C" { + +extern __attribute__((visibility("default"))) void +JS_SetGrayGCRootsTracer(JSRuntime *rt, JSTraceDataOp traceOp, void *data); + +extern __attribute__((visibility("default"))) JSString * +JS_GetAnonymousString(JSRuntime *rt); + +extern __attribute__((visibility("default"))) JSObject * +JS_FindCompilationScope(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) JSFunction * +JS_GetObjectFunction(JSObject *obj); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetGlobalForFrame(JSStackFrame *fp); + +extern __attribute__((visibility("default"))) JSBool +JS_SplicePrototype(JSContext *cx, JSObject *obj, JSObject *proto); + +extern __attribute__((visibility("default"))) JSObject * +JS_NewObjectWithUniqueType(JSContext *cx, JSClass *clasp, JSObject *proto, JSObject *parent); + +extern __attribute__((visibility("default"))) uint32_t +JS_ObjectCountDynamicSlots(JSObject *obj); + +extern __attribute__((visibility("default"))) void +JS_ShrinkGCBuffers(JSRuntime *rt); + +extern __attribute__((visibility("default"))) size_t +JS_GetE4XObjectsCreated(JSContext *cx); + +extern __attribute__((visibility("default"))) size_t +JS_SetProtoCalled(JSContext *cx); + +extern __attribute__((visibility("default"))) size_t +JS_GetCustomIteratorCount(JSContext *cx); + +extern __attribute__((visibility("default"))) JSBool +JS_NondeterministicGetWeakMapKeys(JSContext *cx, JSObject *obj, JSObject **ret); + + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_IsDeadWrapper(JSObject *obj); + + + + + + +extern __attribute__((visibility("default"))) void +JS_TraceShapeCycleCollectorChildren(JSTracer *trc, void *shape); + +enum { + JS_TELEMETRY_GC_REASON, + JS_TELEMETRY_GC_IS_COMPARTMENTAL, + JS_TELEMETRY_GC_MS, + JS_TELEMETRY_GC_MARK_MS, + JS_TELEMETRY_GC_SWEEP_MS, + JS_TELEMETRY_GC_SLICE_MS, + JS_TELEMETRY_GC_MMU_50, + JS_TELEMETRY_GC_RESET, + JS_TELEMETRY_GC_INCREMENTAL_DISABLED, + JS_TELEMETRY_GC_NON_INCREMENTAL +}; + +typedef void +(* JSAccumulateTelemetryDataCallback)(int id, uint32_t sample); + +extern __attribute__((visibility("default"))) void +JS_SetAccumulateTelemetryCallback(JSRuntime *rt, JSAccumulateTelemetryDataCallback callback); + +extern __attribute__((visibility("default"))) JSPrincipals * +JS_GetCompartmentPrincipals(JSCompartment *compartment); + +extern __attribute__((visibility("default"))) void +JS_SetCompartmentPrincipals(JSCompartment *compartment, JSPrincipals *principals); + + +extern __attribute__((visibility("default"))) JSObject * +JS_ObjectToInnerObject(JSContext *cx, JSObject *obj); + + +extern __attribute__((visibility("default"))) JSObject * +JS_ObjectToOuterObject(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) JSObject * +JS_CloneObject(JSContext *cx, JSObject *obj, JSObject *proto, JSObject *parent); + +extern __attribute__((visibility("default"))) JSBool +js_GetterOnlyPropertyStub(JSContext *cx, JSHandleObject obj, JSHandleId id, JSBool strict, jsval *vp); + +__attribute__((visibility("default"))) void +js_ReportOverRecursed(JSContext *maybecx); +# 139 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) bool +JS_CopyPropertiesFrom(JSContext *cx, JSObject *target, JSObject *obj); + +extern __attribute__((visibility("default"))) JSBool +JS_WrapPropertyDescriptor(JSContext *cx, js::PropertyDescriptor *desc); + +extern __attribute__((visibility("default"))) JSBool +JS_WrapAutoIdVector(JSContext *cx, JS::AutoIdVector &props); + +extern __attribute__((visibility("default"))) JSBool +JS_EnumerateState(JSContext *cx, JSHandleObject obj, JSIterateOp enum_op, js::Value *statep, jsid *idp); + +struct JSFunctionSpecWithHelp { + const char *name; + JSNative call; + uint16_t nargs; + uint16_t flags; + const char *usage; + const char *help; +}; + +#define JS_FN_HELP(name,call,nargs,flags,usage,help) {name, call, nargs, (flags) | JSPROP_ENUMERATE | JSFUN_STUB_GSOPS, usage, help} + + +extern __attribute__((visibility("default"))) bool +JS_DefineFunctionsWithHelp(JSContext *cx, JSObject *obj, const JSFunctionSpecWithHelp *fs); + + + +} + + + +namespace js { + +struct RuntimeFriendFields { + + + + + volatile int32_t interrupt; + + + uintptr_t nativeStackLimit; + + RuntimeFriendFields() + : interrupt(0), + nativeStackLimit(0) { } + + static const RuntimeFriendFields *get(const JSRuntime *rt) { + return reinterpret_cast(rt); + } +}; + +inline JSRuntime * +GetRuntime(const JSContext *cx) +{ + return ContextFriendFields::get(cx)->runtime; +} + +typedef bool +(* PreserveWrapperCallback)(JSContext *cx, JSObject *obj); +# 212 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +class __attribute__((visibility("default"))) AutoSwitchCompartment { + private: + JSContext *cx; + JSCompartment *oldCompartment; + public: + AutoSwitchCompartment(JSContext *cx, JSCompartment *newCompartment + ); + AutoSwitchCompartment(JSContext *cx, JSObject *target ); + ~AutoSwitchCompartment(); + +}; + + +__attribute__((visibility("default"))) JSBool obj_defineGetter(JSContext *cx, unsigned argc, js::Value *vp); +__attribute__((visibility("default"))) JSBool obj_defineSetter(JSContext *cx, unsigned argc, js::Value *vp); + + +extern __attribute__((visibility("default"))) bool +IsSystemCompartment(const JSCompartment *compartment); + +extern __attribute__((visibility("default"))) bool +IsAtomsCompartment(const JSCompartment *c); + + + + + + + +extern __attribute__((visibility("default"))) bool +CheckUndeclaredVarAssignment(JSContext *cx, JSString *propname); + +struct WeakMapTracer; + + + + + + + +typedef void +(* WeakMapTraceCallback)(WeakMapTracer *trc, JSObject *m, + void *k, JSGCTraceKind kkind, + void *v, JSGCTraceKind vkind); + +struct WeakMapTracer { + JSRuntime *runtime; + WeakMapTraceCallback callback; + + WeakMapTracer(JSRuntime *rt, WeakMapTraceCallback cb) + : runtime(rt), callback(cb) {} +}; + +extern __attribute__((visibility("default"))) void +TraceWeakMaps(WeakMapTracer *trc); + +extern __attribute__((visibility("default"))) bool +GCThingIsMarkedGray(void *thing); + + + + + + + +namespace shadow { + +struct TypeObject { + JSObject *proto; +}; + +struct BaseShape { + js::Class *clasp; + JSObject *parent; +}; + +struct Shape { + BaseShape *base; + jsid _1; + uint32_t slotInfo; + + static const uint32_t FIXED_SLOTS_SHIFT = 27; +}; + +struct Object { + Shape *shape; + TypeObject *type; + js::Value *slots; + js::Value *_1; + + size_t numFixedSlots() const { return shape->slotInfo >> Shape::FIXED_SLOTS_SHIFT; } + Value *fixedSlots() const { + return (Value *)(uintptr_t(this) + sizeof(shadow::Object)); + } + + js::Value &slotRef(size_t slot) const { + size_t nfixed = numFixedSlots(); + if (slot < nfixed) + return fixedSlots()[slot]; + return slots[slot - nfixed]; + } +}; + +struct Atom { + size_t _; + const jschar *chars; +}; + +} + +extern __attribute__((visibility("default"))) js::Class AnyNameClass; +extern __attribute__((visibility("default"))) js::Class AttributeNameClass; +extern __attribute__((visibility("default"))) js::Class CallClass; +extern __attribute__((visibility("default"))) js::Class DeclEnvClass; +extern __attribute__((visibility("default"))) js::Class FunctionClass; +extern __attribute__((visibility("default"))) js::Class FunctionProxyClass; +extern __attribute__((visibility("default"))) js::Class NamespaceClass; +extern __attribute__((visibility("default"))) js::Class OuterWindowProxyClass; +extern __attribute__((visibility("default"))) js::Class ObjectProxyClass; +extern __attribute__((visibility("default"))) js::Class QNameClass; +extern __attribute__((visibility("default"))) js::Class XMLClass; +extern __attribute__((visibility("default"))) js::Class ObjectClass; + +inline js::Class * +GetObjectClass(const JSObject *obj) +{ + return reinterpret_cast(obj)->shape->base->clasp; +} + +inline JSClass * +GetObjectJSClass(const JSObject *obj) +{ + return js::Jsvalify(GetObjectClass(obj)); +} + +__attribute__((visibility("default"))) bool +IsScopeObject(JSObject *obj); + +inline JSObject * +GetObjectParent(JSObject *obj) +{ + do { } while(0); + return reinterpret_cast(obj)->shape->base->parent; +} + +__attribute__((visibility("default"))) JSObject * +GetObjectParentMaybeScope(JSObject *obj); + +__attribute__((visibility("default"))) JSObject * +GetGlobalForObjectCrossCompartment(JSObject *obj); + +__attribute__((visibility("default"))) void +NotifyAnimationActivity(JSObject *obj); + +__attribute__((visibility("default"))) bool +IsOriginalScriptFunction(JSFunction *fun); + +__attribute__((visibility("default"))) JSFunction * +DefineFunctionWithReserved(JSContext *cx, JSObject *obj, const char *name, JSNative call, + unsigned nargs, unsigned attrs); + +__attribute__((visibility("default"))) JSFunction * +NewFunctionWithReserved(JSContext *cx, JSNative call, unsigned nargs, unsigned flags, + JSObject *parent, const char *name); + +__attribute__((visibility("default"))) JSFunction * +NewFunctionByIdWithReserved(JSContext *cx, JSNative native, unsigned nargs, unsigned flags, + JSObject *parent, jsid id); + +__attribute__((visibility("default"))) JSObject * +InitClassWithReserved(JSContext *cx, JSObject *obj, JSObject *parent_proto, + JSClass *clasp, JSNative constructor, unsigned nargs, + JSPropertySpec *ps, JSFunctionSpec *fs, + JSPropertySpec *static_ps, JSFunctionSpec *static_fs); + +__attribute__((visibility("default"))) const Value & +GetFunctionNativeReserved(JSObject *fun, size_t which); + +__attribute__((visibility("default"))) void +SetFunctionNativeReserved(JSObject *fun, size_t which, const Value &val); + +inline JSObject * +GetObjectProto(JSObject *obj) +{ + return reinterpret_cast(obj)->type->proto; +} + +inline void * +GetObjectPrivate(JSObject *obj) +{ + const shadow::Object *nobj = reinterpret_cast(obj); + void **addr = reinterpret_cast(&nobj->fixedSlots()[nobj->numFixedSlots()]); + return *addr; +} + + + + + +inline const Value & +GetReservedSlot(const JSObject *obj, size_t slot) +{ + do { } while(0); + return reinterpret_cast(obj)->slotRef(slot); +} + +__attribute__((visibility("default"))) void +SetReservedSlotWithBarrier(JSObject *obj, size_t slot, const Value &value); + +inline void +SetReservedSlot(JSObject *obj, size_t slot, const Value &value) +{ + do { } while(0); + shadow::Object *sobj = reinterpret_cast(obj); + if (sobj->slotRef(slot).isMarkable()) + SetReservedSlotWithBarrier(obj, slot, value); + else + sobj->slotRef(slot) = value; +} + +__attribute__((visibility("default"))) uint32_t +GetObjectSlotSpan(JSObject *obj); + +inline const Value & +GetObjectSlot(JSObject *obj, size_t slot) +{ + do { } while(0); + return reinterpret_cast(obj)->slotRef(slot); +} + +inline Shape * +GetObjectShape(JSObject *obj) +{ + shadow::Shape *shape = reinterpret_cast(obj)->shape; + return reinterpret_cast(shape); +} + +inline const jschar * +GetAtomChars(JSAtom *atom) +{ + return reinterpret_cast(atom)->chars; +} + +inline JSLinearString * +AtomToLinearString(JSAtom *atom) +{ + return reinterpret_cast(atom); +} + +static inline js::PropertyOp +CastAsJSPropertyOp(JSObject *object) +{ + return (__extension__ (js::PropertyOp) (size_t) (object)); +} + +static inline js::StrictPropertyOp +CastAsJSStrictPropertyOp(JSObject *object) +{ + return (__extension__ (js::StrictPropertyOp) (size_t) (object)); +} + +__attribute__((visibility("default"))) bool +GetPropertyNames(JSContext *cx, JSObject *obj, unsigned flags, js::AutoIdVector *props); + +__attribute__((visibility("default"))) bool +GetGeneric(JSContext *cx, JSObject *obj, JSObject *receiver, jsid id, Value *vp); + +__attribute__((visibility("default"))) bool +StringIsArrayIndex(JSLinearString *str, uint32_t *indexp); + +__attribute__((visibility("default"))) void +SetPreserveWrapperCallback(JSRuntime *rt, PreserveWrapperCallback callback); + +__attribute__((visibility("default"))) bool +IsObjectInContextCompartment(const JSObject *obj, const JSContext *cx); + + + + + + +#define JSITER_ENUMERATE 0x1 +#define JSITER_FOREACH 0x2 +#define JSITER_KEYVALUE 0x4 +#define JSITER_OWNONLY 0x8 +#define JSITER_HIDDEN 0x10 +#define JSITER_FOR_OF 0x20 + +inline uintptr_t +GetNativeStackLimit(const JSRuntime *rt) +{ + return RuntimeFriendFields::get(rt)->nativeStackLimit; +} + +#define JS_CHECK_RECURSION(cx,onerror) JS_BEGIN_MACRO int stackDummy_; if (!JS_CHECK_STACK_SIZE(js::GetNativeStackLimit(js::GetRuntime(cx)), &stackDummy_)) { js_ReportOverRecursed(cx); onerror; } JS_END_MACRO +# 515 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +__attribute__((visibility("default"))) void +StartPCCountProfiling(JSContext *cx); + +__attribute__((visibility("default"))) void +StopPCCountProfiling(JSContext *cx); + +__attribute__((visibility("default"))) void +PurgePCCounts(JSContext *cx); + +__attribute__((visibility("default"))) size_t +GetPCCountScriptCount(JSContext *cx); + +__attribute__((visibility("default"))) JSString * +GetPCCountScriptSummary(JSContext *cx, size_t script); + +__attribute__((visibility("default"))) JSString * +GetPCCountScriptContents(JSContext *cx, size_t script); + + +__attribute__((visibility("default"))) void * +GetOwnerThread(const JSContext *cx); + +__attribute__((visibility("default"))) unsigned +GetContextOutstandingRequests(const JSContext *cx); + + +__attribute__((visibility("default"))) JSCompartment * +GetContextCompartment(const JSContext *cx); + +__attribute__((visibility("default"))) bool +HasUnrootedGlobal(const JSContext *cx); + +typedef void +(* ActivityCallback)(void *arg, JSBool active); + + + + + + +__attribute__((visibility("default"))) void +SetActivityCallback(JSRuntime *rt, ActivityCallback cb, void *arg); + +extern __attribute__((visibility("default"))) const JSStructuredCloneCallbacks * +GetContextStructuredCloneCallbacks(JSContext *cx); + +extern __attribute__((visibility("default"))) JSVersion +VersionSetMoarXML(JSVersion version, bool enable); + +extern __attribute__((visibility("default"))) bool +CanCallContextDebugHandler(JSContext *cx); + +extern __attribute__((visibility("default"))) JSTrapStatus +CallContextDebugHandler(JSContext *cx, JSScript *script, jsbytecode *bc, Value *rval); + +extern __attribute__((visibility("default"))) bool +IsContextRunningJS(JSContext *cx); + +class SystemAllocPolicy; +typedef Vector CompartmentVector; +extern __attribute__((visibility("default"))) const CompartmentVector& +GetRuntimeCompartments(JSRuntime *rt); + +extern __attribute__((visibility("default"))) size_t +SizeOfJSContext(); + +#define GCREASONS(D) D(API) D(MAYBEGC) D(LAST_CONTEXT) D(DESTROY_CONTEXT) D(LAST_DITCH) D(TOO_MUCH_MALLOC) D(ALLOC_TRIGGER) D(DEBUG_GC) D(DEBUG_MODE_GC) D(UNUSED3) D(DOM_WINDOW_UTILS) D(COMPONENT_UTILS) D(MEM_PRESSURE) D(CC_WAITING) D(CC_FORCED) D(LOAD_END) D(POST_COMPARTMENT) D(PAGE_HIDE) D(NSJSCONTEXT_DESTROY) D(SET_NEW_DOCUMENT) D(SET_DOC_SHELL) D(DOM_UTILS) D(DOM_IPC) D(DOM_WORKER) D(INTER_SLICE_GC) D(REFRESH_FRAME) D(FULL_GC_TIMER) +# 613 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +namespace gcreason { + + +enum Reason { +#define MAKE_REASON(name) name, + API, MAYBEGC, LAST_CONTEXT, DESTROY_CONTEXT, LAST_DITCH, TOO_MUCH_MALLOC, ALLOC_TRIGGER, DEBUG_GC, DEBUG_MODE_GC, UNUSED3, DOM_WINDOW_UTILS, COMPONENT_UTILS, MEM_PRESSURE, CC_WAITING, CC_FORCED, LOAD_END, POST_COMPARTMENT, PAGE_HIDE, NSJSCONTEXT_DESTROY, SET_NEW_DOCUMENT, SET_DOC_SHELL, DOM_UTILS, DOM_IPC, DOM_WORKER, INTER_SLICE_GC, REFRESH_FRAME, FULL_GC_TIMER, +#undef MAKE_REASON + NO_REASON, + NUM_REASONS +}; + +} + +extern __attribute__((visibility("default"))) void +PrepareCompartmentForGC(JSCompartment *comp); + +extern __attribute__((visibility("default"))) void +PrepareForFullGC(JSRuntime *rt); + +extern __attribute__((visibility("default"))) bool +IsGCScheduled(JSRuntime *rt); + +extern __attribute__((visibility("default"))) void +SkipCompartmentForGC(JSCompartment *comp); +# 645 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) void +GCForReason(JSRuntime *rt, gcreason::Reason reason); + +extern __attribute__((visibility("default"))) void +ShrinkingGC(JSRuntime *rt, gcreason::Reason reason); + +extern __attribute__((visibility("default"))) void +IncrementalGC(JSRuntime *rt, gcreason::Reason reason); + +extern __attribute__((visibility("default"))) void +SetGCSliceTimeBudget(JSContext *cx, int64_t millis); + +enum GCProgress { +# 668 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" + GC_CYCLE_BEGIN, + GC_SLICE_BEGIN, + GC_SLICE_END, + GC_CYCLE_END +}; + +struct __attribute__((visibility("default"))) GCDescription { + bool isCompartment; + + GCDescription(bool isCompartment) + : isCompartment(isCompartment) {} + + jschar *formatMessage(JSRuntime *rt) const; + jschar *formatJSON(JSRuntime *rt, uint64_t timestamp) const; +}; + +typedef void +(* GCSliceCallback)(JSRuntime *rt, GCProgress progress, const GCDescription &desc); + +extern __attribute__((visibility("default"))) GCSliceCallback +SetGCSliceCallback(JSRuntime *rt, GCSliceCallback callback); + + + + + +extern __attribute__((visibility("default"))) void +NotifyDidPaint(JSRuntime *rt); + +extern __attribute__((visibility("default"))) bool +IsIncrementalGCEnabled(JSRuntime *rt); + +extern __attribute__((visibility("default"))) void +DisableIncrementalGC(JSRuntime *rt); + +extern __attribute__((visibility("default"))) bool +IsIncrementalBarrierNeeded(JSRuntime *rt); + +extern __attribute__((visibility("default"))) bool +IsIncrementalBarrierNeeded(JSContext *cx); + +extern __attribute__((visibility("default"))) bool +IsIncrementalBarrierNeededOnObject(JSObject *obj); + +extern __attribute__((visibility("default"))) bool +IsIncrementalBarrierNeededOnScript(JSScript *obj); + +extern __attribute__((visibility("default"))) void +IncrementalReferenceBarrier(void *ptr); + +extern __attribute__((visibility("default"))) void +IncrementalValueBarrier(const Value &v); + +extern __attribute__((visibility("default"))) void +PokeGC(JSRuntime *rt); + +class ObjectPtr +{ + JSObject *value; + + public: + ObjectPtr() : value(__null) {} + + ObjectPtr(JSObject *obj) : value(obj) {} + + + ~ObjectPtr() { do { } while(0); } + + void finalize(JSRuntime *rt) { + if (IsIncrementalBarrierNeeded(rt)) + IncrementalReferenceBarrier(value); + value = __null; + } + + void init(JSObject *obj) { value = obj; } + + JSObject *get() const { return value; } + + void writeBarrierPre(JSRuntime *rt) { + IncrementalReferenceBarrier(value); + } + + ObjectPtr &operator=(JSObject *obj) { + IncrementalReferenceBarrier(value); + value = obj; + return *this; + } + + JSObject &operator*() const { return *value; } + JSObject *operator->() const { return value; } + operator JSObject *() const { return value; } +}; + +extern __attribute__((visibility("default"))) JSObject * +GetTestingFunctions(JSContext *cx); + + + + + + +inline JSFreeOp * +CastToJSFreeOp(FreeOp *fop) +{ + return reinterpret_cast(fop); +} + + + + + + + +extern __attribute__((visibility("default"))) const jschar* +GetErrorTypeNameFromNumber(JSContext* cx, const unsigned errorNumber); + + +typedef enum NukedGlobalHandling { + NukeForGlobalObject, + DontNukeForGlobalObject +} NukedGlobalHandling; + +extern __attribute__((visibility("default"))) JSBool +NukeChromeCrossCompartmentWrappersForGlobal(JSContext *cx, JSObject *obj, + NukedGlobalHandling nukeGlobal); + +} +# 804 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) JSBool +js_DateIsValid(JSContext *cx, JSObject* obj); + +extern __attribute__((visibility("default"))) double +js_DateGetMsecSinceEpoch(JSContext *cx, JSObject *obj); + + + + + + + +typedef enum JSErrNum { +#define MSG_DEF(name,number,count,exception,format) name = number, + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/js.msg" 1 +# 53 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/js.msg" +JSMSG_NOT_AN_ERROR = 0, +JSMSG_NOT_DEFINED = 1, +JSMSG_INACTIVE = 2, +JSMSG_MORE_ARGS_NEEDED = 3, +JSMSG_BAD_CHAR = 4, +JSMSG_BAD_TYPE = 5, +JSMSG_ALLOC_OVERFLOW = 6, +JSMSG_MISSING_HEXDIGITS = 7, +JSMSG_INCOMPATIBLE_PROTO = 8, +JSMSG_NO_CONSTRUCTOR = 9, +JSMSG_CANT_ALIAS = 10, +JSMSG_NOT_SCRIPTED_FUNCTION = 11, +JSMSG_BAD_SORT_ARG = 12, +JSMSG_BAD_ATOMIC_NUMBER = 13, +JSMSG_TOO_MANY_LITERALS = 14, +JSMSG_CANT_WATCH = 15, +JSMSG_STACK_UNDERFLOW = 16, +JSMSG_NEED_DIET = 17, +JSMSG_TOO_MANY_LOCAL_ROOTS = 18, +JSMSG_READ_ONLY = 19, +JSMSG_BAD_FORMAL = 20, +JSMSG_CANT_DELETE = 21, +JSMSG_NOT_FUNCTION = 22, +JSMSG_NOT_CONSTRUCTOR = 23, +JSMSG_INVALID_DATE = 24, +JSMSG_TOO_DEEP = 25, +JSMSG_OVER_RECURSED = 26, +JSMSG_IN_NOT_OBJECT = 27, +JSMSG_BAD_NEW_RESULT = 28, +JSMSG_BAD_SHARP_DEF = 29, +JSMSG_BAD_SHARP_USE = 30, +JSMSG_BAD_INSTANCEOF_RHS = 31, +JSMSG_BAD_BYTECODE = 32, +JSMSG_BAD_RADIX = 33, +JSMSG_PAREN_BEFORE_LET = 34, +JSMSG_CANT_CONVERT = 35, +JSMSG_CYCLIC_VALUE = 36, +JSMSG_COMPILE_EXECED_SCRIPT = 37, +JSMSG_CANT_CONVERT_TO = 38, +JSMSG_NO_PROPERTIES = 39, +JSMSG_CANT_FIND_CLASS = 40, +JSMSG_DEAD_OBJECT = 41, +JSMSG_BYTECODE_TOO_BIG = 42, +JSMSG_UNKNOWN_FORMAT = 43, +JSMSG_TOO_MANY_CON_ARGS = 44, +JSMSG_TOO_MANY_FUN_ARGS = 45, +JSMSG_BAD_QUANTIFIER = 46, +JSMSG_MIN_TOO_BIG = 47, +JSMSG_MAX_TOO_BIG = 48, +JSMSG_OUT_OF_ORDER = 49, +JSMSG_BAD_DESTRUCT_DECL = 50, +JSMSG_BAD_DESTRUCT_ASS = 51, +JSMSG_PAREN_AFTER_LET = 52, +JSMSG_CURLY_AFTER_LET = 53, +JSMSG_MISSING_PAREN = 54, +JSMSG_UNTERM_CLASS = 55, +JSMSG_TRAILING_SLASH = 56, +JSMSG_BAD_CLASS_RANGE = 57, +JSMSG_BAD_REGEXP_FLAG = 58, +JSMSG_NO_INPUT = 59, +JSMSG_CANT_OPEN = 60, +JSMSG_TOO_MANY_FUN_APPLY_ARGS = 61, +JSMSG_UNMATCHED_RIGHT_PAREN = 62, +JSMSG_TOO_BIG_TO_ENCODE = 63, +JSMSG_ARG_INDEX_OUT_OF_RANGE = 64, +JSMSG_UNUSED65 = 65, +JSMSG_UNUSED66 = 66, +JSMSG_UNUSED67 = 67, +JSMSG_BAD_SCRIPT_MAGIC = 68, +JSMSG_PAREN_BEFORE_FORMAL = 69, +JSMSG_MISSING_FORMAL = 70, +JSMSG_PAREN_AFTER_FORMAL = 71, +JSMSG_CURLY_BEFORE_BODY = 72, +JSMSG_CURLY_AFTER_BODY = 73, +JSMSG_PAREN_BEFORE_COND = 74, +JSMSG_PAREN_AFTER_COND = 75, +JSMSG_DESTRUCT_DUP_ARG = 76, +JSMSG_NAME_AFTER_DOT = 77, +JSMSG_BRACKET_IN_INDEX = 78, +JSMSG_XML_WHOLE_PROGRAM = 79, +JSMSG_PAREN_BEFORE_SWITCH = 80, +JSMSG_PAREN_AFTER_SWITCH = 81, +JSMSG_CURLY_BEFORE_SWITCH = 82, +JSMSG_COLON_AFTER_CASE = 83, +JSMSG_WHILE_AFTER_DO = 84, +JSMSG_PAREN_AFTER_FOR = 85, +JSMSG_SEMI_AFTER_FOR_INIT = 86, +JSMSG_SEMI_AFTER_FOR_COND = 87, +JSMSG_PAREN_AFTER_FOR_CTRL = 88, +JSMSG_CURLY_BEFORE_TRY = 89, +JSMSG_CURLY_AFTER_TRY = 90, +JSMSG_PAREN_BEFORE_CATCH = 91, +JSMSG_CATCH_IDENTIFIER = 92, +JSMSG_PAREN_AFTER_CATCH = 93, +JSMSG_CURLY_BEFORE_CATCH = 94, +JSMSG_CURLY_AFTER_CATCH = 95, +JSMSG_CURLY_BEFORE_FINALLY = 96, +JSMSG_CURLY_AFTER_FINALLY = 97, +JSMSG_CATCH_OR_FINALLY = 98, +JSMSG_PAREN_BEFORE_WITH = 99, +JSMSG_PAREN_AFTER_WITH = 100, +JSMSG_CURLY_IN_COMPOUND = 101, +JSMSG_NO_VARIABLE_NAME = 102, +JSMSG_COLON_IN_COND = 103, +JSMSG_PAREN_AFTER_ARGS = 104, +JSMSG_BRACKET_AFTER_LIST = 105, +JSMSG_COLON_AFTER_ID = 106, +JSMSG_CURLY_AFTER_LIST = 107, +JSMSG_PAREN_IN_PAREN = 108, +JSMSG_SEMI_BEFORE_STMNT = 109, +JSMSG_NO_RETURN_VALUE = 110, +JSMSG_DUPLICATE_FORMAL = 111, +JSMSG_EQUAL_AS_ASSIGN = 112, +JSMSG_OPTIMIZED_CLOSURE_LEAK = 113, +JSMSG_TOO_MANY_DEFAULTS = 114, +JSMSG_TOO_MANY_CASES = 115, +JSMSG_BAD_SWITCH = 116, +JSMSG_BAD_FOR_LEFTSIDE = 117, +JSMSG_CATCH_AFTER_GENERAL = 118, +JSMSG_CATCH_WITHOUT_TRY = 119, +JSMSG_FINALLY_WITHOUT_TRY = 120, +JSMSG_LABEL_NOT_FOUND = 121, +JSMSG_TOUGH_BREAK = 122, +JSMSG_BAD_CONTINUE = 123, +JSMSG_BAD_RETURN_OR_YIELD = 124, +JSMSG_BAD_LABEL = 125, +JSMSG_DUPLICATE_LABEL = 126, +JSMSG_VAR_HIDES_ARG = 127, +JSMSG_BAD_VAR_INIT = 128, +JSMSG_BAD_LEFTSIDE_OF_ASS = 129, +JSMSG_BAD_OPERAND = 130, +JSMSG_BAD_PROP_ID = 131, +JSMSG_RESERVED_ID = 132, +JSMSG_SYNTAX_ERROR = 133, +JSMSG_BAD_SHARP_VAR_DEF = 134, +JSMSG_BAD_PROTOTYPE = 135, +JSMSG_MISSING_EXPONENT = 136, +JSMSG_OUT_OF_MEMORY = 137, +JSMSG_UNTERMINATED_STRING = 138, +JSMSG_TOO_MANY_PARENS = 139, +JSMSG_UNTERMINATED_COMMENT = 140, +JSMSG_UNTERMINATED_REGEXP = 141, +JSMSG_BAD_CLONE_FUNOBJ_SCOPE = 142, +JSMSG_SHARPVAR_TOO_BIG = 143, +JSMSG_ILLEGAL_CHARACTER = 144, +JSMSG_BAD_OCTAL = 145, +JSMSG_BAD_INDIRECT_CALL = 146, +JSMSG_UNCAUGHT_EXCEPTION = 147, +JSMSG_INVALID_BACKREF = 148, +JSMSG_BAD_BACKREF = 149, +JSMSG_PRECISION_RANGE = 150, +JSMSG_BAD_GETTER_OR_SETTER = 151, +JSMSG_BAD_ARRAY_LENGTH = 152, +JSMSG_CANT_DESCRIBE_PROPS = 153, +JSMSG_BAD_APPLY_ARGS = 154, +JSMSG_REDECLARED_VAR = 155, +JSMSG_UNDECLARED_VAR = 156, +JSMSG_ANON_NO_RETURN_VALUE = 157, +JSMSG_DEPRECATED_USAGE = 158, +JSMSG_BAD_URI = 159, +JSMSG_GETTER_ONLY = 160, +JSMSG_IDSTART_AFTER_NUMBER = 161, +JSMSG_UNDEFINED_PROP = 162, +JSMSG_USELESS_EXPR = 163, +JSMSG_REDECLARED_PARAM = 164, +JSMSG_NEWREGEXP_FLAGGED = 165, +JSMSG_RESERVED_SLOT_RANGE = 166, +JSMSG_CANT_DECODE_PRINCIPALS = 167, +JSMSG_CANT_SEAL_OBJECT = 168, +JSMSG_TOO_MANY_CATCH_VARS = 169, +JSMSG_BAD_XML_MARKUP = 170, +JSMSG_BAD_XML_CHARACTER = 171, +JSMSG_BAD_DEFAULT_XML_NAMESPACE = 172, +JSMSG_BAD_XML_NAME_SYNTAX = 173, +JSMSG_BRACKET_AFTER_ATTR_EXPR = 174, +JSMSG_NESTING_GENERATOR = 175, +JSMSG_CURLY_IN_XML_EXPR = 176, +JSMSG_BAD_XML_NAMESPACE = 177, +JSMSG_BAD_XML_ATTR_NAME = 178, +JSMSG_BAD_XML_NAME = 179, +JSMSG_BAD_XML_CONVERSION = 180, +JSMSG_BAD_XMLLIST_CONVERSION = 181, +JSMSG_BAD_GENERATOR_SEND = 182, +JSMSG_NO_ASSIGN_IN_XML_ATTR = 183, +JSMSG_BAD_XML_ATTR_VALUE = 184, +JSMSG_XML_TAG_NAME_MISMATCH = 185, +JSMSG_BAD_XML_TAG_SYNTAX = 186, +JSMSG_BAD_XML_LIST_SYNTAX = 187, +JSMSG_INCOMPATIBLE_METHOD = 188, +JSMSG_CANT_SET_XML_ATTRS = 189, +JSMSG_END_OF_XML_SOURCE = 190, +JSMSG_END_OF_XML_ENTITY = 191, +JSMSG_BAD_XML_QNAME = 192, +JSMSG_BAD_FOR_EACH_LOOP = 193, +JSMSG_BAD_XMLLIST_PUT = 194, +JSMSG_UNKNOWN_XML_ENTITY = 195, +JSMSG_BAD_XML_NCR = 196, +JSMSG_UNDEFINED_XML_NAME = 197, +JSMSG_DUPLICATE_XML_ATTR = 198, +JSMSG_TOO_MANY_LOCALS = 199, +JSMSG_ARRAY_INIT_TOO_BIG = 200, +JSMSG_REGEXP_TOO_COMPLEX = 201, +JSMSG_BUFFER_TOO_SMALL = 202, +JSMSG_BAD_SURROGATE_CHAR = 203, +JSMSG_UTF8_CHAR_TOO_LARGE = 204, +JSMSG_MALFORMED_UTF8_CHAR = 205, +JSMSG_USER_DEFINED_ERROR = 206, +JSMSG_WRONG_CONSTRUCTOR = 207, +JSMSG_BAD_GENERATOR_RETURN = 208, +JSMSG_BAD_ANON_GENERATOR_RETURN = 209, +JSMSG_NAME_AFTER_FOR_PAREN = 210, +JSMSG_IN_AFTER_FOR_NAME = 211, +JSMSG_BAD_TRAP_RETURN_VALUE = 212, +JSMSG_KEYWORD_NOT_NS = 213, +JSMSG_BAD_GENERATOR_YIELD = 214, +JSMSG_BAD_GENERATOR_SYNTAX = 215, +JSMSG_ARRAY_COMP_LEFTSIDE = 216, +JSMSG_NON_XML_FILTER = 217, +JSMSG_EMPTY_ARRAY_REDUCE = 218, +JSMSG_NON_LIST_XML_METHOD = 219, +JSMSG_BAD_DELETE_OPERAND = 220, +JSMSG_BAD_INCOP_OPERAND = 221, +JSMSG_UNEXPECTED_TYPE = 222, +JSMSG_LET_DECL_NOT_IN_BLOCK = 223, +JSMSG_BAD_OBJECT_INIT = 224, +JSMSG_CANT_SET_ARRAY_ATTRS = 225, +JSMSG_EVAL_ARITY = 226, +JSMSG_MISSING_FUN_ARG = 227, +JSMSG_JSON_BAD_PARSE = 228, +JSMSG_JSON_BAD_STRINGIFY = 229, +JSMSG_NOT_CALLABLE_OR_UNDEFINED = 230, +JSMSG_NOT_NONNULL_OBJECT = 231, +JSMSG_DEPRECATED_OCTAL = 232, +JSMSG_STRICT_CODE_WITH = 233, +JSMSG_DUPLICATE_PROPERTY = 234, +JSMSG_DEPRECATED_DELETE_OPERAND = 235, +JSMSG_DEPRECATED_ASSIGN = 236, +JSMSG_BAD_BINDING = 237, +JSMSG_INVALID_DESCRIPTOR = 238, +JSMSG_OBJECT_NOT_EXTENSIBLE = 239, +JSMSG_CANT_REDEFINE_PROP = 240, +JSMSG_CANT_APPEND_TO_ARRAY = 241, +JSMSG_CANT_DEFINE_ARRAY_LENGTH = 242, +JSMSG_CANT_DEFINE_ARRAY_INDEX = 243, +JSMSG_TYPED_ARRAY_BAD_INDEX = 244, +JSMSG_TYPED_ARRAY_NEGATIVE_ARG = 245, +JSMSG_TYPED_ARRAY_BAD_ARGS = 246, +JSMSG_CSP_BLOCKED_FUNCTION = 247, +JSMSG_BAD_GET_SET_FIELD = 248, +JSMSG_BAD_PROXY_FIX = 249, +JSMSG_INVALID_EVAL_SCOPE_ARG = 250, +JSMSG_ACCESSOR_WRONG_ARGS = 251, +JSMSG_THROW_TYPE_ERROR = 252, +JSMSG_BAD_TOISOSTRING_PROP = 253, +JSMSG_BAD_PARSE_NODE = 254, +JSMSG_NOT_EXPECTED_TYPE = 255, +JSMSG_CALLER_IS_STRICT = 256, +JSMSG_NEED_DEBUG_MODE = 257, +JSMSG_STRICT_CODE_LET_EXPR_STMT = 258, +JSMSG_CANT_CHANGE_EXTENSIBILITY = 259, +JSMSG_SC_BAD_SERIALIZED_DATA = 260, +JSMSG_SC_UNSUPPORTED_TYPE = 261, +JSMSG_SC_RECURSION = 262, +JSMSG_CANT_WRAP_XML_OBJECT = 263, +JSMSG_BAD_CLONE_VERSION = 264, +JSMSG_CANT_CLONE_OBJECT = 265, +JSMSG_NON_NATIVE_SCOPE = 266, +JSMSG_STRICT_FUNCTION_STATEMENT = 267, +JSMSG_INVALID_FOR_IN_INIT = 268, +JSMSG_CLEARED_SCOPE = 269, +JSMSG_MALFORMED_ESCAPE = 270, +JSMSG_BAD_GENEXP_BODY = 271, +JSMSG_XML_PROTO_FORBIDDEN = 272, +JSMSG_UNNAMED_FUNCTION_STMT = 273, +JSMSG_CCW_REQUIRED = 274, +JSMSG_DEBUG_BAD_RESUMPTION = 275, +JSMSG_ASSIGN_FUNCTION_OR_NULL = 276, +JSMSG_DEBUG_NOT_LIVE = 277, +JSMSG_DEBUG_OBJECT_WRONG_OWNER = 278, +JSMSG_DEBUG_OBJECT_PROTO = 279, +JSMSG_DEBUG_LOOP = 280, +JSMSG_DEBUG_NOT_IDLE = 281, +JSMSG_DEBUG_BAD_OFFSET = 282, +JSMSG_DEBUG_BAD_LINE = 283, +JSMSG_DEBUG_NOT_DEBUGGING = 284, +JSMSG_DEBUG_COMPARTMENT_MISMATCH = 285, +JSMSG_DEBUG_NOT_SCRIPT_FRAME = 286, +JSMSG_CANT_WATCH_PROP = 287, +JSMSG_CSP_BLOCKED_EVAL = 288, +JSMSG_DEBUG_NO_SCOPE_OBJECT = 289, +JSMSG_EMPTY_CONSEQUENT = 290, +JSMSG_NOT_ITERABLE = 291, +JSMSG_QUERY_LINE_WITHOUT_URL = 292, +JSMSG_QUERY_INNERMOST_WITHOUT_LINE_URL = 293, +JSMSG_DEBUG_VARIABLE_NOT_FOUND = 294, +JSMSG_PARAMETER_AFTER_REST = 295, +JSMSG_NO_REST_NAME = 296, +JSMSG_ARGUMENTS_AND_REST = 297, +JSMSG_FUNCTION_ARGUMENTS_AND_REST = 298, +JSMSG_REST_WITH_DEFAULT = 299, +JSMSG_NONDEFAULT_FORMAL_AFTER_DEFAULT = 300, +JSMSG_YIELD_IN_DEFAULT = 301, +# 820 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" 2 +#undef MSG_DEF + JSErr_Limit +} JSErrNum; + +extern __attribute__((visibility("default"))) const JSErrorFormatString * +js_GetErrorMessage(void *userRef, const char *locale, const unsigned errorNumber); + + + +extern __attribute__((visibility("default"))) uint64_t +js_GetSCOffset(JSStructuredCloneWriter* writer); + + + + + +namespace js { +namespace ArrayBufferView { + +enum ViewType { + TYPE_INT8 = 0, + TYPE_UINT8, + TYPE_INT16, + TYPE_UINT16, + TYPE_INT32, + TYPE_UINT32, + TYPE_FLOAT32, + TYPE_FLOAT64, + + + + + + TYPE_UINT8_CLAMPED, + + TYPE_MAX +}; + +} +} + +typedef js::ArrayBufferView::ViewType JSArrayBufferViewType; +# 870 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) JSObject * +JS_NewInt8Array(JSContext *cx, uint32_t nelements); +extern __attribute__((visibility("default"))) JSObject * +JS_NewUint8Array(JSContext *cx, uint32_t nelements); +extern __attribute__((visibility("default"))) JSObject * +JS_NewUint8ClampedArray(JSContext *cx, uint32_t nelements); + +extern __attribute__((visibility("default"))) JSObject * +JS_NewInt16Array(JSContext *cx, uint32_t nelements); +extern __attribute__((visibility("default"))) JSObject * +JS_NewUint16Array(JSContext *cx, uint32_t nelements); +extern __attribute__((visibility("default"))) JSObject * +JS_NewInt32Array(JSContext *cx, uint32_t nelements); +extern __attribute__((visibility("default"))) JSObject * +JS_NewUint32Array(JSContext *cx, uint32_t nelements); +extern __attribute__((visibility("default"))) JSObject * +JS_NewFloat32Array(JSContext *cx, uint32_t nelements); +extern __attribute__((visibility("default"))) JSObject * +JS_NewFloat64Array(JSContext *cx, uint32_t nelements); +# 898 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) JSObject * +JS_NewInt8ArrayFromArray(JSContext *cx, JSObject *array); +extern __attribute__((visibility("default"))) JSObject * +JS_NewUint8ArrayFromArray(JSContext *cx, JSObject *array); +extern __attribute__((visibility("default"))) JSObject * +JS_NewUint8ClampedArrayFromArray(JSContext *cx, JSObject *array); +extern __attribute__((visibility("default"))) JSObject * +JS_NewInt16ArrayFromArray(JSContext *cx, JSObject *array); +extern __attribute__((visibility("default"))) JSObject * +JS_NewUint16ArrayFromArray(JSContext *cx, JSObject *array); +extern __attribute__((visibility("default"))) JSObject * +JS_NewInt32ArrayFromArray(JSContext *cx, JSObject *array); +extern __attribute__((visibility("default"))) JSObject * +JS_NewUint32ArrayFromArray(JSContext *cx, JSObject *array); +extern __attribute__((visibility("default"))) JSObject * +JS_NewFloat32ArrayFromArray(JSContext *cx, JSObject *array); +extern __attribute__((visibility("default"))) JSObject * +JS_NewFloat64ArrayFromArray(JSContext *cx, JSObject *array); +# 924 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) JSObject * +JS_NewInt8ArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, + uint32_t byteOffset, int32_t length); +extern __attribute__((visibility("default"))) JSObject * +JS_NewUint8ArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, + uint32_t byteOffset, int32_t length); +extern __attribute__((visibility("default"))) JSObject * +JS_NewUint8ClampedArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, + uint32_t byteOffset, int32_t length); +extern __attribute__((visibility("default"))) JSObject * +JS_NewInt16ArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, + uint32_t byteOffset, int32_t length); +extern __attribute__((visibility("default"))) JSObject * +JS_NewUint16ArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, + uint32_t byteOffset, int32_t length); +extern __attribute__((visibility("default"))) JSObject * +JS_NewInt32ArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, + uint32_t byteOffset, int32_t length); +extern __attribute__((visibility("default"))) JSObject * +JS_NewUint32ArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, + uint32_t byteOffset, int32_t length); +extern __attribute__((visibility("default"))) JSObject * +JS_NewFloat32ArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, + uint32_t byteOffset, int32_t length); +extern __attribute__((visibility("default"))) JSObject * +JS_NewFloat64ArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, + uint32_t byteOffset, int32_t length); + + + + +extern __attribute__((visibility("default"))) JSObject * +JS_NewArrayBuffer(JSContext *cx, uint32_t nbytes); + + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_IsTypedArrayObject(JSObject *obj, JSContext *cx); +# 974 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_IsArrayBufferViewObject(JSObject *obj, JSContext *cx); + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_IsInt8Array(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) JSBool +JS_IsUint8Array(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) JSBool +JS_IsUint8ClampedArray(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) JSBool +JS_IsInt16Array(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) JSBool +JS_IsUint16Array(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) JSBool +JS_IsInt32Array(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) JSBool +JS_IsUint32Array(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) JSBool +JS_IsFloat32Array(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) JSBool +JS_IsFloat64Array(JSObject *obj, JSContext *cx); +# 1008 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) JSArrayBufferViewType +JS_GetTypedArrayType(JSObject *obj, JSContext *cx); + + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_IsArrayBufferObject(JSObject *obj, JSContext *cx); +# 1028 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) uint32_t +JS_GetArrayBufferByteLength(JSObject *obj, JSContext *cx); +# 1040 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) uint8_t * +JS_GetArrayBufferData(JSObject *obj, JSContext *cx); +# 1051 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) uint32_t +JS_GetTypedArrayLength(JSObject *obj, JSContext *cx); +# 1063 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) uint32_t +JS_GetTypedArrayByteOffset(JSObject *obj, JSContext *cx); +# 1074 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) uint32_t +JS_GetTypedArrayByteLength(JSObject *obj, JSContext *cx); + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_IsArrayBufferViewObject(JSObject *obj, JSContext *cx); + + + + +extern __attribute__((visibility("default"))) uint32_t +JS_GetArrayBufferViewByteLength(JSObject *obj, JSContext *cx); +# 1102 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) int8_t * +JS_GetInt8ArrayData(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) uint8_t * +JS_GetUint8ArrayData(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) uint8_t * +JS_GetUint8ClampedArrayData(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) int16_t * +JS_GetInt16ArrayData(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) uint16_t * +JS_GetUint16ArrayData(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) int32_t * +JS_GetInt32ArrayData(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) uint32_t * +JS_GetUint32ArrayData(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) float * +JS_GetFloat32ArrayData(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) double * +JS_GetFloat64ArrayData(JSObject *obj, JSContext *cx); + + + + + +extern __attribute__((visibility("default"))) void * +JS_GetArrayBufferViewData(JSObject *obj, JSContext *cx); + + + + + + +__attribute__((visibility("default"))) JSBool +JS_IsDataViewObject(JSContext *cx, JSObject *obj, JSBool *isDataView); +# 1145 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +__attribute__((visibility("default"))) uint32_t +JS_GetDataViewByteOffset(JSObject *obj, JSContext *cx); +# 1156 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +__attribute__((visibility("default"))) uint32_t +JS_GetDataViewByteLength(JSObject *obj, JSContext *cx); +# 1167 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +__attribute__((visibility("default"))) void * +JS_GetDataViewData(JSObject *obj, JSContext *cx); +# 23 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" 1 +# 10 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" +#define jsinfer_h___ + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/LifoAlloc.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/LifoAlloc.h" +#define LifoAlloc_h__ +# 24 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/LifoAlloc.h" +namespace js { + +namespace detail { + +static const size_t LIFO_ALLOC_ALIGN = 8; + +__attribute__((always_inline)) inline +char * +AlignPtr(void *orig) +{ + typedef tl::StaticAssert< + tl::FloorLog2::result == tl::CeilingLog2::result + >::result _; + + char *result = (char *) ((uintptr_t(orig) + (LIFO_ALLOC_ALIGN - 1)) & (~LIFO_ALLOC_ALIGN + 1)); + do { } while(0); + return result; +} + + +class BumpChunk +{ + char *bump; + char *limit; + BumpChunk *next_; + size_t bumpSpaceSize; + + char *headerBase() { return reinterpret_cast(this); } + char *bumpBase() const { return limit - bumpSpaceSize; } + + BumpChunk *thisDuringConstruction() { return this; } + + explicit BumpChunk(size_t bumpSpaceSize) + : bump(reinterpret_cast(thisDuringConstruction()) + sizeof(BumpChunk)), + limit(bump + bumpSpaceSize), + next_(__null), bumpSpaceSize(bumpSpaceSize) + { + do { } while(0); + } + + void setBump(void *ptr) { + do { } while(0); + do { } while(0); + DebugOnly prevBump = bump; + bump = static_cast(ptr); + + + + + + + + } + + public: + BumpChunk *next() const { return next_; } + void setNext(BumpChunk *succ) { next_ = succ; } + + size_t used() const { return bump - bumpBase(); } + size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) { + return mallocSizeOf(this); + } + + void resetBump() { + setBump(headerBase() + sizeof(BumpChunk)); + } + + void *mark() const { return bump; } + + void release(void *mark) { + do { } while(0); + do { } while(0); + setBump(mark); + } + + bool contains(void *mark) const { + return bumpBase() <= mark && mark <= limit; + } + + bool canAlloc(size_t n); + + + __attribute__((always_inline)) inline + void *tryAlloc(size_t n) { + char *aligned = AlignPtr(bump); + char *newBump = aligned + n; + + if (newBump > limit) + return __null; + + + if ((__builtin_expect((newBump < bump), 0))) + return __null; + + do { } while(0); + setBump(newBump); + return aligned; + } + + void *allocInfallible(size_t n) { + void *result = tryAlloc(n); + do { } while(0); + return result; + } + + static BumpChunk *new_(size_t chunkSize); + static void delete_(BumpChunk *chunk); +}; + +} + + + + + + + +class LifoAlloc +{ + typedef detail::BumpChunk BumpChunk; + + BumpChunk *first; + BumpChunk *latest; + size_t markCount; + size_t defaultChunkSize_; + + void operator=(const LifoAlloc &) ; + LifoAlloc(const LifoAlloc &) ; +# 160 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/LifoAlloc.h" + BumpChunk *getOrCreateChunk(size_t n); + + void reset(size_t defaultChunkSize) { + do { } while(0); + first = latest = __null; + defaultChunkSize_ = defaultChunkSize; + markCount = 0; + } + + public: + explicit LifoAlloc(size_t defaultChunkSize) { reset(defaultChunkSize); } + + + void steal(LifoAlloc *other) { + do { } while(0); + PodCopy((char *) this, (char *) other, sizeof(*this)); + other->reset(defaultChunkSize_); + } + + ~LifoAlloc() { freeAll(); } + + size_t defaultChunkSize() const { return defaultChunkSize_; } + + + void freeAll(); + + + void freeUnused(); + + __attribute__((always_inline)) inline + void *alloc(size_t n) { + do {} while(0); + + void *result; + if (latest && (result = latest->tryAlloc(n))) + return result; + + if (!getOrCreateChunk(n)) + return __null; + + return latest->allocInfallible(n); + } + + template + T *newArray(size_t count) { + void *mem = alloc(sizeof(T) * count); + if (!mem) + return __null; + typedef int moz_static_assert45[(tl::IsPodType::result) ? 1 : -1]; + return (T *) mem; + } + + + + + + template + T *newArrayUninitialized(size_t count) { + return static_cast(alloc(sizeof(T) * count)); + } + + void *mark() { + markCount++; + + return latest ? latest->mark() : __null; + } + + void release(void *mark) { + markCount--; + + if (!mark) { + latest = first; + if (latest) + latest->resetBump(); + return; + } + + + + + + + BumpChunk *container = first; + while (true) { + if (container->contains(mark)) + break; + do { } while(0); + container = container->next(); + } + latest = container; + latest->release(mark); + } + + + size_t used() const { + size_t accum = 0; + BumpChunk *it = first; + while (it) { + accum += it->used(); + it = it->next(); + } + return accum; + } + + + size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const { + size_t accum = 0; + BumpChunk *it = first; + while (it) { + accum += it->sizeOfIncludingThis(mallocSizeOf); + it = it->next(); + } + return accum; + } + + + size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const { + return mallocSizeOf(this) + sizeOfExcludingThis(mallocSizeOf); + } + + + template + __attribute__((always_inline)) inline + T *newPod() { + return static_cast(alloc(sizeof(T))); + } + + template __attribute__((always_inline)) inline T *new_() { void *memory = alloc(sizeof(T)); return memory ? new(memory) T () : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) : __null; } static const int JSMinAlignment = 8; template __attribute__((always_inline)) inline T *array_new(size_t n) { uint64_t numBytes64 = uint64_t(JSMinAlignment) + uint64_t(sizeof(T)) * uint64_t(n); size_t numBytes = size_t(numBytes64); if (numBytes64 != numBytes) { do { } while(0); return __null; } void *memory = alloc(numBytes); if (!memory) return __null; *(size_t *)memory = n; memory = (void*)(uintptr_t(memory) + JSMinAlignment); return new(memory) T[n]; } +}; + +class LifoAllocScope +{ + LifoAlloc *lifoAlloc; + void *mark; + bool shouldRelease; + + + public: + explicit LifoAllocScope(LifoAlloc *lifoAlloc + ) + : lifoAlloc(lifoAlloc), shouldRelease(true) { + do { } while (0); + mark = lifoAlloc->mark(); + } + + ~LifoAllocScope() { + if (shouldRelease) + lifoAlloc->release(mark); + } + + LifoAlloc &alloc() { + return *lifoAlloc; + } + + void releaseEarly() { + do { } while(0); + lifoAlloc->release(mark); + shouldRelease = false; + } +}; + +} +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" 1 +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" 2 + + +namespace JS { +struct TypeInferenceSizes; +} + +namespace js { +namespace types { + + +struct TypeObjectKey { + static intptr_t keyBits(TypeObjectKey *obj) { return (intptr_t) obj; } + static TypeObjectKey *getKey(TypeObjectKey *obj) { return obj; } +}; + + + + + + +class Type +{ + uintptr_t data; + Type(uintptr_t data) : data(data) {} + + public: + + uintptr_t raw() const { return data; } + + bool isPrimitive() const { + return data < JSVAL_TYPE_OBJECT; + } + + bool isPrimitive(JSValueType type) const { + do { } while(0); + return (uintptr_t) type == data; + } + + JSValueType primitive() const { + do { } while(0); + return (JSValueType) data; + } + + bool isAnyObject() const { + return data == JSVAL_TYPE_OBJECT; + } + + bool isUnknown() const { + return data == JSVAL_TYPE_UNKNOWN; + } + + + + bool isObject() const { + do { } while(0); + return data > JSVAL_TYPE_UNKNOWN; + } + + inline TypeObjectKey *objectKey() const; + + + + bool isSingleObject() const { + return isObject() && !!(data & 1); + } + + inline JSObject *singleObject() const; + + + + bool isTypeObject() const { + return isObject() && !(data & 1); + } + + inline TypeObject *typeObject() const; + + bool operator == (Type o) const { return data == o.data; } + bool operator != (Type o) const { return data != o.data; } + + static inline Type UndefinedType() { return Type(JSVAL_TYPE_UNDEFINED); } + static inline Type NullType() { return Type(JSVAL_TYPE_NULL); } + static inline Type BooleanType() { return Type(JSVAL_TYPE_BOOLEAN); } + static inline Type Int32Type() { return Type(JSVAL_TYPE_INT32); } + static inline Type DoubleType() { return Type(JSVAL_TYPE_DOUBLE); } + static inline Type StringType() { return Type(JSVAL_TYPE_STRING); } + static inline Type MagicArgType() { return Type(JSVAL_TYPE_MAGIC); } + static inline Type AnyObjectType() { return Type(JSVAL_TYPE_OBJECT); } + static inline Type UnknownType() { return Type(JSVAL_TYPE_UNKNOWN); } + + static inline Type PrimitiveType(JSValueType type) { + do { } while(0); + return Type(type); + } + + static inline Type ObjectType(JSObject *obj); + static inline Type ObjectType(TypeObject *obj); + static inline Type ObjectType(TypeObjectKey *obj); +}; + + +inline Type GetValueType(JSContext *cx, const Value &val); +# 144 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" +class TypeConstraint +{ +public: + + + + + const char *kind() const { return __null; } + + + + TypeConstraint *next; + + TypeConstraint(const char *kind) + : next(__null) + { + + + + } + + + virtual void newType(JSContext *cx, TypeSet *source, Type type) = 0; + + + + + + virtual void newPropertyState(JSContext *cx, TypeSet *source) {} + + + + + + + virtual void newObjectState(JSContext *cx, TypeObject *object, bool force) {} +}; + + +enum { + TYPE_FLAG_UNDEFINED = 0x1, + TYPE_FLAG_NULL = 0x2, + TYPE_FLAG_BOOLEAN = 0x4, + TYPE_FLAG_INT32 = 0x8, + TYPE_FLAG_DOUBLE = 0x10, + TYPE_FLAG_STRING = 0x20, + TYPE_FLAG_LAZYARGS = 0x40, + TYPE_FLAG_ANYOBJECT = 0x80, + + + TYPE_FLAG_OBJECT_COUNT_MASK = 0xff00, + TYPE_FLAG_OBJECT_COUNT_SHIFT = 8, + TYPE_FLAG_OBJECT_COUNT_LIMIT = + TYPE_FLAG_OBJECT_COUNT_MASK >> TYPE_FLAG_OBJECT_COUNT_SHIFT, + + + TYPE_FLAG_UNKNOWN = 0x00010000, + + + TYPE_FLAG_BASE_MASK = 0x000100ff, + + + + + + + + TYPE_FLAG_PROPAGATED_PROPERTY = 0x00020000, + + + TYPE_FLAG_OWN_PROPERTY = 0x00040000, + + + + + + + TYPE_FLAG_CONFIGURED_PROPERTY = 0x00080000, + + + + + + + TYPE_FLAG_DEFINITE_PROPERTY = 0x00100000, + + + TYPE_FLAG_DEFINITE_MASK = 0x0f000000, + TYPE_FLAG_DEFINITE_SHIFT = 24 +}; +typedef uint32_t TypeFlags; + + +enum { + + OBJECT_FLAG_FUNCTION = 0x1, + + + OBJECT_FLAG_NEW_SCRIPT_CLEARED = 0x2, + + + + + + + OBJECT_FLAG_NEW_SCRIPT_REGENERATE = 0x4, + + + + + + OBJECT_FLAG_SETS_MARKED_UNKNOWN = 0x8, + + + OBJECT_FLAG_PROPERTY_COUNT_MASK = 0xfff0, + OBJECT_FLAG_PROPERTY_COUNT_SHIFT = 4, + OBJECT_FLAG_PROPERTY_COUNT_LIMIT = + OBJECT_FLAG_PROPERTY_COUNT_MASK >> OBJECT_FLAG_PROPERTY_COUNT_SHIFT, + + + + + + OBJECT_FLAG_NON_DENSE_ARRAY = 0x00010000, + + + OBJECT_FLAG_NON_PACKED_ARRAY = 0x00020000, + + + OBJECT_FLAG_NON_TYPED_ARRAY = 0x00040000, + + + OBJECT_FLAG_UNINLINEABLE = 0x00080000, + + + OBJECT_FLAG_SPECIAL_EQUALITY = 0x00100000, + + + OBJECT_FLAG_ITERATED = 0x00200000, + + + OBJECT_FLAG_REENTRANT_FUNCTION = 0x00400000, + + + OBJECT_FLAG_REGEXP_FLAGS_SET = 0x00800000, + + + OBJECT_FLAG_DYNAMIC_MASK = 0x00ff0000, + + + + + + OBJECT_FLAG_UNKNOWN_PROPERTIES = 0x80000000, + + + OBJECT_FLAG_UNKNOWN_MASK = + OBJECT_FLAG_DYNAMIC_MASK + | OBJECT_FLAG_UNKNOWN_PROPERTIES + | OBJECT_FLAG_SETS_MARKED_UNKNOWN +}; +typedef uint32_t TypeObjectFlags; + + +class TypeSet +{ + + TypeFlags flags; + + + TypeObjectKey **objectSet; + + public: + + + TypeConstraint *constraintList; + + TypeSet() + : flags(0), objectSet(__null), constraintList(__null) + {} + + void print(JSContext *cx); + + inline void sweep(JSCompartment *compartment); + inline size_t computedSizeOfExcludingThis(); + + + inline bool hasType(Type type); + + TypeFlags baseFlags() const { return flags & TYPE_FLAG_BASE_MASK; } + bool unknown() const { return !!(flags & TYPE_FLAG_UNKNOWN); } + bool unknownObject() const { return !!(flags & (TYPE_FLAG_UNKNOWN | TYPE_FLAG_ANYOBJECT)); } + + bool empty() const { return !baseFlags() && !baseObjectCount(); } + + bool hasAnyFlag(TypeFlags flags) const { + do { } while(0); + return !!(baseFlags() & flags); + } + + bool isOwnProperty(bool configurable) const { + return flags & (configurable ? TYPE_FLAG_CONFIGURED_PROPERTY : TYPE_FLAG_OWN_PROPERTY); + } + bool isDefiniteProperty() const { return flags & TYPE_FLAG_DEFINITE_PROPERTY; } + unsigned definiteSlot() const { + do { } while(0); + return flags >> TYPE_FLAG_DEFINITE_SHIFT; + } + + + + + + inline void addType(JSContext *cx, Type type); + + + inline void setOwnProperty(JSContext *cx, bool configured); + + + + + + + inline unsigned getObjectCount(); + inline TypeObjectKey *getObject(unsigned i); + inline JSObject *getSingleObject(unsigned i); + inline TypeObject *getTypeObject(unsigned i); + + void setOwnProperty(bool configurable) { + flags |= TYPE_FLAG_OWN_PROPERTY; + if (configurable) + flags |= TYPE_FLAG_CONFIGURED_PROPERTY; + } + void setDefinite(unsigned slot) { + do { } while(0); + flags |= TYPE_FLAG_DEFINITE_PROPERTY | (slot << TYPE_FLAG_DEFINITE_SHIFT); + } + + bool hasPropagatedProperty() { return !!(flags & TYPE_FLAG_PROPAGATED_PROPERTY); } + void setPropagatedProperty() { flags |= TYPE_FLAG_PROPAGATED_PROPERTY; } + + enum FilterKind { + FILTER_ALL_PRIMITIVES, + FILTER_NULL_VOID, + FILTER_VOID + }; + + + inline void add(JSContext *cx, TypeConstraint *constraint, bool callExisting = true); + void addSubset(JSContext *cx, TypeSet *target); + void addGetProperty(JSContext *cx, JSScript *script, jsbytecode *pc, + TypeSet *target, jsid id); + void addSetProperty(JSContext *cx, JSScript *script, jsbytecode *pc, + TypeSet *target, jsid id); + void addCallProperty(JSContext *cx, JSScript *script, jsbytecode *pc, jsid id); + void addSetElement(JSContext *cx, JSScript *script, jsbytecode *pc, + TypeSet *objectTypes, TypeSet *valueTypes); + void addCall(JSContext *cx, TypeCallsite *site); + void addArith(JSContext *cx, JSScript *script, jsbytecode *pc, + TypeSet *target, TypeSet *other = __null); + void addTransformThis(JSContext *cx, JSScript *script, TypeSet *target); + void addPropagateThis(JSContext *cx, JSScript *script, jsbytecode *pc, + Type type, TypeSet *types = __null); + void addFilterPrimitives(JSContext *cx, TypeSet *target, FilterKind filter); + void addSubsetBarrier(JSContext *cx, JSScript *script, jsbytecode *pc, TypeSet *target); + + + + + + static TypeSet *make(JSContext *cx, const char *name); +# 424 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" + void addFreeze(JSContext *cx); + + + JSValueType getKnownTypeTag(JSContext *cx); + + bool isMagicArguments(JSContext *cx) { return getKnownTypeTag(cx) == JSVAL_TYPE_MAGIC; } + + + bool hasObjectFlags(JSContext *cx, TypeObjectFlags flags); + static bool HasObjectFlags(JSContext *cx, TypeObject *object, TypeObjectFlags flags); + + + + + + + static void WatchObjectStateChange(JSContext *cx, TypeObject *object); +# 449 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" + bool isOwnProperty(JSContext *cx, TypeObject *object, bool configurable); + + + bool knownNonEmpty(JSContext *cx); + + + bool knownSubset(JSContext *cx, TypeSet *other); + + + + + + int getTypedArrayType(JSContext *cx); + + + JSObject *getSingleton(JSContext *cx, bool freeze = true); + + + bool hasGlobalObject(JSContext *cx, JSObject *global); + + inline void clearObjects(); + + + + + + bool needsBarrier(JSContext *cx); + + + bool propertyNeedsBarrier(JSContext *cx, jsid id); + + private: + uint32_t baseObjectCount() const { + return (flags & TYPE_FLAG_OBJECT_COUNT_MASK) >> TYPE_FLAG_OBJECT_COUNT_SHIFT; + } + inline void setBaseObjectCount(uint32_t count); +}; + + + + + + + +struct TypeResult +{ + uint32_t offset; + Type type; + TypeResult *next; + + TypeResult(uint32_t offset, Type type) + : offset(offset), type(type), next(__null) + {} +}; +# 562 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" +struct TypeBarrier +{ + + TypeBarrier *next; + + + TypeSet *target; + + + + + + Type type; + + + + + + JSObject *singleton; + jsid singletonId; + + TypeBarrier(TypeSet *target, Type type, JSObject *singleton, jsid singletonId) + : next(__null), target(target), type(type), + singleton(singleton), singletonId(singletonId) + {} +}; + + +struct Property +{ + + HeapId id; + + + TypeSet types; + + inline Property(jsid id); + inline Property(const Property &o); + + static uint32_t keyBits(jsid id) { return uint32_t((id)); } + static jsid getKey(Property *p) { return p->id; } +}; +# 615 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" +struct TypeNewScript +{ + HeapPtrFunction fun; + + + gc::AllocKind allocKind; + + + + + + HeapPtrShape shape; +# 636 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" + struct Initializer { + enum Kind { + SETPROP, + FRAME_PUSH, + FRAME_POP, + DONE + } kind; + uint32_t offset; + Initializer(Kind kind, uint32_t offset) + : kind(kind), offset(offset) + {} + }; + Initializer *initializerList; + + static inline void writeBarrierPre(TypeNewScript *newScript); + static inline void writeBarrierPost(TypeNewScript *newScript, void *addr); +}; +# 681 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" +struct TypeObject : gc::Cell +{ + + HeapPtrObject proto; + + + + + + + HeapPtrObject singleton; + + + + + + static const size_t LAZY_SINGLETON = 1; + bool lazy() const { return singleton == (JSObject *) LAZY_SINGLETON; } + + + TypeObjectFlags flags; +# 714 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" + uint32_t contribution; + static const uint32_t CONTRIBUTION_LIMIT = 2000; + + + + + + + HeapPtr newScript; +# 754 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" + Property **propertySet; + + + HeapPtrFunction interpretedFunction; + + + void *padding; + + + inline TypeObject(JSObject *proto, bool isFunction, bool unknown); + + bool isFunction() { return !!(flags & OBJECT_FLAG_FUNCTION); } + + bool hasAnyFlags(TypeObjectFlags flags) { + do { } while(0); + return !!(this->flags & flags); + } + bool hasAllFlags(TypeObjectFlags flags) { + do { } while(0); + return (this->flags & flags) == flags; + } + + bool unknownProperties() { + do { } while (0) + ; + return !!(flags & OBJECT_FLAG_UNKNOWN_PROPERTIES); + } + + + + + + + + inline TypeSet *getProperty(JSContext *cx, jsid id, bool assign); + + + inline TypeSet *maybeGetProperty(JSContext *cx, jsid id); + + inline unsigned getPropertyCount(); + inline Property *getProperty(unsigned i); + + + inline void setFlagsFromKey(JSContext *cx, JSProtoKey kind); + + + + + + inline JSObject *getGlobal(); + + + + bool addProperty(JSContext *cx, jsid id, Property **pprop); + bool addDefiniteProperties(JSContext *cx, JSObject *obj); + bool matchDefiniteProperties(JSObject *obj); + void addPrototype(JSContext *cx, TypeObject *proto); + void addPropertyType(JSContext *cx, jsid id, Type type); + void addPropertyType(JSContext *cx, jsid id, const Value &value); + void addPropertyType(JSContext *cx, const char *name, Type type); + void addPropertyType(JSContext *cx, const char *name, const Value &value); + void markPropertyConfigured(JSContext *cx, jsid id); + void markStateChange(JSContext *cx); + void setFlags(JSContext *cx, TypeObjectFlags flags); + void markUnknown(JSContext *cx); + void clearNewScript(JSContext *cx); + void getFromPrototypes(JSContext *cx, jsid id, TypeSet *types, bool force = false); + + void print(JSContext *cx); + + inline void clearProperties(); + inline void sweep(FreeOp *fop); + + inline size_t computedSizeOfExcludingThis(); + + void sizeOfExcludingThis(TypeInferenceSizes *sizes, JSMallocSizeOfFun mallocSizeOf); + + + + + + + void finalize(FreeOp *fop) {} + + static inline void writeBarrierPre(TypeObject *type); + static inline void writeBarrierPost(TypeObject *type, void *addr); + static inline void readBarrier(TypeObject *type); + + static inline ThingRootKind rootKind() { return THING_ROOT_TYPE_OBJECT; } + + private: + inline uint32_t basePropertyCount() const; + inline void setBasePropertyCount(uint32_t count); + + static void staticAsserts() { + typedef int moz_static_assert46[(__builtin_offsetof (TypeObject, proto) == __builtin_offsetof (js::shadow::TypeObject, proto)) ? 1 : -1]; + } +}; + + + + + +struct TypeObjectEntry +{ + typedef JSObject *Lookup; + + static inline HashNumber hash(JSObject *base); + static inline bool match(TypeObject *key, JSObject *lookup); +}; +typedef HashSet, TypeObjectEntry, SystemAllocPolicy> TypeObjectSet; + + +bool +UseNewType(JSContext *cx, JSScript *script, jsbytecode *pc); + + +bool +UseNewTypeForInitializer(JSContext *cx, JSScript *script, jsbytecode *pc); + + + + + +bool +ArrayPrototypeHasIndexedProperty(JSContext *cx, JSScript *script); + + + + + + +struct TypeCallsite +{ + JSScript *script; + jsbytecode *pc; + + + bool isNew; + + + unsigned argumentCount; + TypeSet **argumentTypes; + + + TypeSet *thisTypes; + + + TypeSet *returnTypes; + + inline TypeCallsite(JSContext *cx, JSScript *script, jsbytecode *pc, + bool isNew, unsigned argumentCount); +}; +# 945 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" +struct TypeScriptNesting +{ +# 955 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" + JSScript *parent; + + + JSScript *children; + + + JSScript *next; + + + JSObject *activeCall; +# 974 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" + const Value *argArray; + const Value *varArray; + + + uint32_t activeFrames; + + TypeScriptNesting() { PodZero(this); } + ~TypeScriptNesting(); +}; + + +bool CheckScriptNesting(JSContext *cx, JSScript *script); + + +void NestingPrologue(JSContext *cx, StackFrame *fp); +void NestingEpilogue(StackFrame *fp); + + +class TypeScript +{ + friend struct ::JSScript; + + + analyze::ScriptAnalysis *analysis; + + + + + + + static const size_t GLOBAL_MISSING_SCOPE = 0x1; + + + HeapPtr global; + + public: + + + TypeScriptNesting *nesting; + + + TypeResult *dynamicList; + + inline TypeScript(); + + bool hasScope() { return size_t(global.get()) != GLOBAL_MISSING_SCOPE; } + + + TypeSet *typeArray() { return (TypeSet *) (uintptr_t(this) + sizeof(TypeScript)); } + + static inline unsigned NumTypeSets(JSScript *script); + + static bool SetScope(JSContext *cx, JSScript *script, JSObject *scope); + + static inline TypeSet *ReturnTypes(JSScript *script); + static inline TypeSet *ThisTypes(JSScript *script); + static inline TypeSet *ArgTypes(JSScript *script, unsigned i); + static inline TypeSet *LocalTypes(JSScript *script, unsigned i); + + + static inline TypeSet *SlotTypes(JSScript *script, unsigned slot); + + + + + + + + static inline TypeObject *StandardType(JSContext *cx, JSScript *script, JSProtoKey kind); + + + static inline TypeObject *InitObject(JSContext *cx, JSScript *script, jsbytecode *pc, JSProtoKey kind); + + + + + + static inline void MonitorOverflow(JSContext *cx, JSScript *script, jsbytecode *pc); + static inline void MonitorString(JSContext *cx, JSScript *script, jsbytecode *pc); + static inline void MonitorUnknown(JSContext *cx, JSScript *script, jsbytecode *pc); + + static inline void GetPcScript(JSContext *cx, JSScript **script, jsbytecode **pc); + static inline void MonitorOverflow(JSContext *cx); + static inline void MonitorString(JSContext *cx); + static inline void MonitorUnknown(JSContext *cx); +# 1067 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" + static inline void Monitor(JSContext *cx, JSScript *script, jsbytecode *pc, + const js::Value &val); + static inline void Monitor(JSContext *cx, const js::Value &rval); + + + static inline void MonitorAssign(JSContext *cx, JSObject *obj, jsid id); + + + static inline void SetThis(JSContext *cx, JSScript *script, Type type); + static inline void SetThis(JSContext *cx, JSScript *script, const js::Value &value); + static inline void SetLocal(JSContext *cx, JSScript *script, unsigned local, Type type); + static inline void SetLocal(JSContext *cx, JSScript *script, unsigned local, const js::Value &value); + static inline void SetArgument(JSContext *cx, JSScript *script, unsigned arg, Type type); + static inline void SetArgument(JSContext *cx, JSScript *script, unsigned arg, const js::Value &value); + + static void Sweep(FreeOp *fop, JSScript *script); + inline void trace(JSTracer *trc); + void destroy(); +}; + +struct ArrayTableKey; +typedef HashMap,ArrayTableKey,SystemAllocPolicy> ArrayTypeTable; + +struct ObjectTableKey; +struct ObjectTableEntry; +typedef HashMap ObjectTypeTable; + +struct AllocationSiteKey; +typedef HashMap,AllocationSiteKey,SystemAllocPolicy> AllocationSiteTable; + +struct RecompileInfo +{ + JSScript *script; + bool constructing : 1; + bool barriers : 1; + uint32_t chunkIndex:30; + + bool operator == (const RecompileInfo &o) const { + return script == o.script + && constructing == o.constructing + && barriers == o.barriers + && chunkIndex == o.chunkIndex; + } +}; + + +struct TypeCompartment +{ + + + + + + + struct PendingWork + { + TypeConstraint *constraint; + TypeSet *source; + Type type; + }; + PendingWork *pendingArray; + unsigned pendingCount; + unsigned pendingCapacity; + + + bool resolving; + + + bool inferenceEnabled; + + + + + + bool pendingNukeTypes; + + + unsigned scriptCount; + + + Vector *pendingRecompiles; + + + + + + + unsigned recompilations; + unsigned frameExpansions; + + + + + + + RecompileInfo compiledInfo; + + + AllocationSiteTable *allocationSiteTable; + + + + ArrayTypeTable *arrayTypeTable; + ObjectTypeTable *objectTypeTable; + + void fixArrayType(JSContext *cx, JSObject *obj); + void fixObjectType(JSContext *cx, JSObject *obj); + + + + + static const unsigned TYPE_COUNT_LIMIT = 4; + unsigned typeCounts[TYPE_COUNT_LIMIT]; + unsigned typeCountOver; + + void init(JSContext *cx); + ~TypeCompartment(); + + inline JSCompartment *compartment(); + + + inline void addPending(JSContext *cx, TypeConstraint *constraint, TypeSet *source, Type type); + bool growPendingArray(JSContext *cx); + + + inline void resolvePending(JSContext *cx); + + + void print(JSContext *cx, bool force); + + + + + + + + TypeObject *newTypeObject(JSContext *cx, JSScript *script, + JSProtoKey kind, JSObject *proto, bool unknown = false); + + + TypeObject *newAllocationSiteTypeObject(JSContext *cx, const AllocationSiteKey &key); + + void nukeTypes(FreeOp *fop); + void processPendingRecompiles(FreeOp *fop); + + + void setPendingNukeTypes(JSContext *cx); + void setPendingNukeTypesNoReport(); + + + void addPendingRecompile(JSContext *cx, const RecompileInfo &info); + void addPendingRecompile(JSContext *cx, JSScript *script, jsbytecode *pc); + + + void monitorBytecode(JSContext *cx, JSScript *script, uint32_t offset, + bool returnOnly = false); + + + void markSetsUnknown(JSContext *cx, TypeObject *obj); + + void sweep(FreeOp *fop); + void finalizeObjects(); +}; + +enum SpewChannel { + ISpewOps, + ISpewResult, + SPEW_COUNT +}; +# 1252 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" +inline const char * InferSpewColorReset() { return __null; } +inline const char * InferSpewColor(TypeConstraint *constraint) { return __null; } +inline const char * InferSpewColor(TypeSet *types) { return __null; } +inline void InferSpew(SpewChannel which, const char *fmt, ...) {} +inline const char * TypeString(Type type) { return __null; } +inline const char * TypeObjectString(TypeObject *type) { return __null; } + + + + +void TypeFailure(JSContext *cx, const char *fmt, ...); + +} +} + +namespace JS { + template<> class AnchorPermitted { }; +} +# 24 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 2 +# 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" +#define ObjectImpl_h___ + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" 1 +# 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" 1 +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" 1 +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier.h" 1 +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumericConversions.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumericConversions.h" +#define NumericConversions_h___ + + + +# 1 "/usr/include/math.h" 1 3 4 +# 26 "/usr/include/math.h" 3 4 +#define _MATH_H 1 + + + +extern "C" { + + + +# 1 "/usr/include/bits/huge_val.h" 1 3 4 +# 29 "/usr/include/bits/huge_val.h" 3 4 +#define HUGE_VAL (__builtin_huge_val()) +# 35 "/usr/include/math.h" 2 3 4 + +# 1 "/usr/include/bits/huge_valf.h" 1 3 4 +# 29 "/usr/include/bits/huge_valf.h" 3 4 +#define HUGE_VALF (__builtin_huge_valf()) +# 37 "/usr/include/math.h" 2 3 4 +# 1 "/usr/include/bits/huge_vall.h" 1 3 4 +# 26 "/usr/include/bits/huge_vall.h" 3 4 +#define HUGE_VALL (__builtin_huge_vall()) +# 38 "/usr/include/math.h" 2 3 4 + + +# 1 "/usr/include/bits/inf.h" 1 3 4 +# 27 "/usr/include/bits/inf.h" 3 4 +#define INFINITY (__builtin_inff()) +# 41 "/usr/include/math.h" 2 3 4 + + +# 1 "/usr/include/bits/nan.h" 1 3 4 +# 29 "/usr/include/bits/nan.h" 3 4 +#define NAN (__builtin_nanf ("")) +# 44 "/usr/include/math.h" 2 3 4 + + + +# 1 "/usr/include/bits/mathdef.h" 1 3 4 +# 25 "/usr/include/bits/mathdef.h" 3 4 +#define _MATH_H_MATHDEF 1 + + +typedef float float_t; + +typedef double double_t; + + + +#define FP_ILOGB0 (-2147483647) +#define FP_ILOGBNAN (2147483647) +# 56 "/usr/include/bits/mathdef.h" 3 4 +#define __NO_LONG_DOUBLE_MATH 1 +# 48 "/usr/include/math.h" 2 3 4 + + + + + + +#define __MATHCALL(function,suffix,args) __MATHDECL (_Mdouble_,function,suffix, args) + +#define __MATHDECL(type,function,suffix,args) __MATHDECL_1(type, function,suffix, args); __MATHDECL_1(type, __CONCAT(__,function),suffix, args) + + +#define __MATHCALLX(function,suffix,args,attrib) __MATHDECLX (_Mdouble_,function,suffix, args, attrib) + +#define __MATHDECLX(type,function,suffix,args,attrib) __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib) + + +#define __MATHDECL_1(type,function,suffix,args) extern type __MATH_PRECNAME(function,suffix) args __THROW + + +#define _Mdouble_ double +#define __MATH_PRECNAME(name,r) __CONCAT(name,r) +#define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_STD +#define _Mdouble_END_NAMESPACE __END_NAMESPACE_STD +# 1 "/usr/include/bits/mathcalls.h" 1 3 4 +# 53 "/usr/include/bits/mathcalls.h" 3 4 + + +extern double acos (double __x) throw (); extern double __acos (double __x) throw (); + +extern double asin (double __x) throw (); extern double __asin (double __x) throw (); + +extern double atan (double __x) throw (); extern double __atan (double __x) throw (); + +extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw (); + + +extern double cos (double __x) throw (); extern double __cos (double __x) throw (); + +extern double sin (double __x) throw (); extern double __sin (double __x) throw (); + +extern double tan (double __x) throw (); extern double __tan (double __x) throw (); + + + + +extern double cosh (double __x) throw (); extern double __cosh (double __x) throw (); + +extern double sinh (double __x) throw (); extern double __sinh (double __x) throw (); + +extern double tanh (double __x) throw (); extern double __tanh (double __x) throw (); + + + + +extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw () + ; + + + + + +extern double acosh (double __x) throw (); extern double __acosh (double __x) throw (); + +extern double asinh (double __x) throw (); extern double __asinh (double __x) throw (); + +extern double atanh (double __x) throw (); extern double __atanh (double __x) throw (); + + + + + + + +extern double exp (double __x) throw (); extern double __exp (double __x) throw (); + + +extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw (); + + +extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw (); + + +extern double log (double __x) throw (); extern double __log (double __x) throw (); + + +extern double log10 (double __x) throw (); extern double __log10 (double __x) throw (); + + +extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw () + __attribute__ ((__nonnull__ (2))); + + + + +extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw (); + +extern double pow10 (double __x) throw (); extern double __pow10 (double __x) throw (); + + + + + +extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw (); + + +extern double log1p (double __x) throw (); extern double __log1p (double __x) throw (); + + +extern double logb (double __x) throw (); extern double __logb (double __x) throw (); + + + + + + +extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw (); + + +extern double log2 (double __x) throw (); extern double __log2 (double __x) throw (); + + + + + + + + +extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw (); + + +extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw (); + + + + + +extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw (); + + + + + + +extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw (); + + + + + + + + +extern double ceil (double __x) throw () __attribute__ ((__const__)); extern double __ceil (double __x) throw () __attribute__ ((__const__)); + + +extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__)); + + +extern double floor (double __x) throw () __attribute__ ((__const__)); extern double __floor (double __x) throw () __attribute__ ((__const__)); + + +extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw (); + + + + +extern int __isinf (double __value) throw () __attribute__ ((__const__)); + + +extern int __finite (double __value) throw () __attribute__ ((__const__)); + + + + + +extern int isinf (double __value) throw () __attribute__ ((__const__)); + + +extern int finite (double __value) throw () __attribute__ ((__const__)); + + +extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw (); + + + +extern double significand (double __x) throw (); extern double __significand (double __x) throw (); + + + + + +extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__)); + + + + + + +extern double nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern double __nan (__const char *__tagb) throw () __attribute__ ((__const__)); + + + + + +extern int __isnan (double __value) throw () __attribute__ ((__const__)); + + + +extern int isnan (double __value) throw () __attribute__ ((__const__)); + + +extern double j0 (double) throw (); extern double __j0 (double) throw (); +extern double j1 (double) throw (); extern double __j1 (double) throw (); +extern double jn (int, double) throw (); extern double __jn (int, double) throw (); +extern double y0 (double) throw (); extern double __y0 (double) throw (); +extern double y1 (double) throw (); extern double __y1 (double) throw (); +extern double yn (int, double) throw (); extern double __yn (int, double) throw (); + + + + + + +extern double erf (double) throw (); extern double __erf (double) throw (); +extern double erfc (double) throw (); extern double __erfc (double) throw (); +extern double lgamma (double) throw (); extern double __lgamma (double) throw (); + + + + + + +extern double tgamma (double) throw (); extern double __tgamma (double) throw (); + + + + + +extern double gamma (double) throw (); extern double __gamma (double) throw (); + + + + + + +extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw (); + + + + + + + +extern double rint (double __x) throw (); extern double __rint (double __x) throw (); + + +extern double nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) throw () __attribute__ ((__const__)); + +extern double nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); + + + +extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw (); + + + +extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw (); + + + +extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw (); + + + + +extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw (); + + + +extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw (); + + + +extern double round (double __x) throw () __attribute__ ((__const__)); extern double __round (double __x) throw () __attribute__ ((__const__)); + + + +extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__)); + + + + +extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw (); + + + + + + +extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw (); +extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw (); + + + +extern long int lround (double __x) throw (); extern long int __lround (double __x) throw (); +extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw (); + + + +extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw (); + + +extern double fmax (double __x, double __y) throw (); extern double __fmax (double __x, double __y) throw (); + + +extern double fmin (double __x, double __y) throw (); extern double __fmin (double __x, double __y) throw (); + + + +extern int __fpclassify (double __value) throw () + __attribute__ ((__const__)); + + +extern int __signbit (double __value) throw () + __attribute__ ((__const__)); + + + +extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw (); + + + + + + + + +extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw (); +# 72 "/usr/include/math.h" 2 3 4 +#undef _Mdouble_ +#undef _Mdouble_BEGIN_NAMESPACE +#undef _Mdouble_END_NAMESPACE +#undef __MATH_PRECNAME +# 84 "/usr/include/math.h" 3 4 +#define _Mfloat_ float + +#define _Mdouble_ _Mfloat_ + +#define __MATH_PRECNAME(name,r) name ##f ##r + + + +#define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_C99 +#define _Mdouble_END_NAMESPACE __END_NAMESPACE_C99 +# 1 "/usr/include/bits/mathcalls.h" 1 3 4 +# 53 "/usr/include/bits/mathcalls.h" 3 4 + + +extern float acosf (float __x) throw (); extern float __acosf (float __x) throw (); + +extern float asinf (float __x) throw (); extern float __asinf (float __x) throw (); + +extern float atanf (float __x) throw (); extern float __atanf (float __x) throw (); + +extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw (); + + +extern float cosf (float __x) throw (); extern float __cosf (float __x) throw (); + +extern float sinf (float __x) throw (); extern float __sinf (float __x) throw (); + +extern float tanf (float __x) throw (); extern float __tanf (float __x) throw (); + + + + +extern float coshf (float __x) throw (); extern float __coshf (float __x) throw (); + +extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw (); + +extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw (); + + + + +extern void + sincosf +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (float __x, float *__sinx, float *__cosx) throw (); extern void + __sincosf +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (float __x, float *__sinx, float *__cosx) throw () + ; + + + + + +extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw (); + +extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw (); + +extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw (); + + + + + + + +extern float expf (float __x) throw (); extern float __expf (float __x) throw (); + + +extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw (); + + +extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw (); + + +extern float logf (float __x) throw (); extern float __logf (float __x) throw (); + + +extern float log10f (float __x) throw (); extern float __log10f (float __x) throw (); + + +extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw () + __attribute__ ((__nonnull__ (2))); + + + + +extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw (); + +extern float pow10f (float __x) throw (); extern float __pow10f (float __x) throw (); + + + + + +extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw (); + + +extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw (); + + +extern float logbf (float __x) throw (); extern float __logbf (float __x) throw (); + + + + + + +extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw (); + + +extern float log2f (float __x) throw (); extern float __log2f (float __x) throw (); + + + + + + + + +extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw (); + + +extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw (); + + + + + +extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw (); + + + + + + +extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw (); + + + + + + + + +extern float ceilf (float __x) throw () __attribute__ ((__const__)); extern float __ceilf (float __x) throw () __attribute__ ((__const__)); + + +extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__)); + + +extern float floorf (float __x) throw () __attribute__ ((__const__)); extern float __floorf (float __x) throw () __attribute__ ((__const__)); + + +extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw (); + + + + +extern int __isinff (float __value) throw () __attribute__ ((__const__)); + + +extern int __finitef (float __value) throw () __attribute__ ((__const__)); + + + + + +extern int isinff (float __value) throw () __attribute__ ((__const__)); + + +extern int finitef (float __value) throw () __attribute__ ((__const__)); + + +extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw (); + + + +extern float significandf (float __x) throw (); extern float __significandf (float __x) throw (); + + + + + +extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__)); + + + + + + +extern float nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) throw () __attribute__ ((__const__)); + + + + + +extern int __isnanf (float __value) throw () __attribute__ ((__const__)); + + + +extern int isnanf (float __value) throw () __attribute__ ((__const__)); + + +extern float j0f (float) throw (); extern float __j0f (float) throw (); +extern float j1f (float) throw (); extern float __j1f (float) throw (); +extern float jnf (int, float) throw (); extern float __jnf (int, float) throw (); +extern float y0f (float) throw (); extern float __y0f (float) throw (); +extern float y1f (float) throw (); extern float __y1f (float) throw (); +extern float ynf (int, float) throw (); extern float __ynf (int, float) throw (); + + + + + + +extern float erff (float) throw (); extern float __erff (float) throw (); +extern float erfcf (float) throw (); extern float __erfcf (float) throw (); +extern float lgammaf (float) throw (); extern float __lgammaf (float) throw (); + + + + + + +extern float tgammaf (float) throw (); extern float __tgammaf (float) throw (); + + + + + +extern float gammaf (float) throw (); extern float __gammaf (float) throw (); + + + + + + +extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw (); + + + + + + + +extern float rintf (float __x) throw (); extern float __rintf (float __x) throw (); + + +extern float nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); + +extern float nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); + + + +extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw (); + + + +extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw (); + + + +extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw (); + + + + +extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw (); + + + +extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw (); + + + +extern float roundf (float __x) throw () __attribute__ ((__const__)); extern float __roundf (float __x) throw () __attribute__ ((__const__)); + + + +extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__)); + + + + +extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw (); + + + + + + +extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw (); +extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw (); + + + +extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw (); +extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw (); + + + +extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw (); + + +extern float fmaxf (float __x, float __y) throw (); extern float __fmaxf (float __x, float __y) throw (); + + +extern float fminf (float __x, float __y) throw (); extern float __fminf (float __x, float __y) throw (); + + + +extern int __fpclassifyf (float __value) throw () + __attribute__ ((__const__)); + + +extern int __signbitf (float __value) throw () + __attribute__ ((__const__)); + + + +extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw (); + + + + + + + + +extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw (); +# 95 "/usr/include/math.h" 2 3 4 +#undef _Mdouble_ +#undef _Mdouble_BEGIN_NAMESPACE +#undef _Mdouble_END_NAMESPACE +#undef __MATH_PRECNAME +# 132 "/usr/include/math.h" 3 4 +#define _Mlong_double_ long double + +#define _Mdouble_ _Mlong_double_ + +#define __MATH_PRECNAME(name,r) name ##l ##r + + + +#define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_C99 +#define _Mdouble_END_NAMESPACE __END_NAMESPACE_C99 +#define __MATH_DECLARE_LDOUBLE 1 +# 1 "/usr/include/bits/mathcalls.h" 1 3 4 +# 53 "/usr/include/bits/mathcalls.h" 3 4 + + +extern long double acosl (long double __x) throw (); extern long double __acosl (long double __x) throw (); + +extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw (); + +extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw (); + +extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw (); + + +extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw (); + +extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw (); + +extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw (); + + + + +extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw (); + +extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw (); + +extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw (); + + + + +extern void + sincosl +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (long double __x, long double *__sinx, long double *__cosx) throw (); extern void + __sincosl +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (long double __x, long double *__sinx, long double *__cosx) throw () + ; + + + + + +extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw (); + +extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw (); + +extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw (); + + + + + + + +extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw (); + + +extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw (); + + +extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw (); + + +extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw (); + + +extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw (); + + +extern long double modfl (long double __x, long double *__iptr) throw (); extern long double __modfl (long double __x, long double *__iptr) throw () + __attribute__ ((__nonnull__ (2))); + + + + +extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw (); + +extern long double pow10l (long double __x) throw (); extern long double __pow10l (long double __x) throw (); + + + + + +extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw (); + + +extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw (); + + +extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw (); + + + + + + +extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw (); + + +extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw (); + + + + + + + + +extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw (); + + +extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw (); + + + + + +extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw (); + + + + + + +extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw (); + + + + + + + + +extern long double ceill (long double __x) throw () __attribute__ ((__const__)); extern long double __ceill (long double __x) throw () __attribute__ ((__const__)); + + +extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__)); + + +extern long double floorl (long double __x) throw () __attribute__ ((__const__)); extern long double __floorl (long double __x) throw () __attribute__ ((__const__)); + + +extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw (); + + + + +extern int __isinfl (long double __value) throw () __attribute__ ((__const__)); + + +extern int __finitel (long double __value) throw () __attribute__ ((__const__)); + + + + + +extern int isinfl (long double __value) throw () __attribute__ ((__const__)); + + +extern int finitel (long double __value) throw () __attribute__ ((__const__)); + + +extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw (); + + + +extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw (); + + + + + +extern long double copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); + + + + + + +extern long double nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) throw () __attribute__ ((__const__)); + + + + + +extern int __isnanl (long double __value) throw () __attribute__ ((__const__)); + + + +extern int isnanl (long double __value) throw () __attribute__ ((__const__)); + + +extern long double j0l (long double) throw (); extern long double __j0l (long double) throw (); +extern long double j1l (long double) throw (); extern long double __j1l (long double) throw (); +extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw (); +extern long double y0l (long double) throw (); extern long double __y0l (long double) throw (); +extern long double y1l (long double) throw (); extern long double __y1l (long double) throw (); +extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw (); + + + + + + +extern long double erfl (long double) throw (); extern long double __erfl (long double) throw (); +extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw (); +extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw (); + + + + + + +extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw (); + + + + + +extern long double gammal (long double) throw (); extern long double __gammal (long double) throw (); + + + + + + +extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw (); + + + + + + + +extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw (); + + +extern long double nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); + +extern long double nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); + + + +extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw (); + + + +extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw (); + + + +extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw (); + + + + +extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw (); + + + +extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw (); + + + +extern long double roundl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundl (long double __x) throw () __attribute__ ((__const__)); + + + +extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__)); + + + + +extern long double remquol (long double __x, long double __y, int *__quo) throw (); extern long double __remquol (long double __x, long double __y, int *__quo) throw (); + + + + + + +extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw (); +extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw (); + + + +extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw (); +extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw (); + + + +extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw (); + + +extern long double fmaxl (long double __x, long double __y) throw (); extern long double __fmaxl (long double __x, long double __y) throw (); + + +extern long double fminl (long double __x, long double __y) throw (); extern long double __fminl (long double __x, long double __y) throw (); + + + +extern int __fpclassifyl (long double __value) throw () + __attribute__ ((__const__)); + + +extern int __signbitl (long double __value) throw () + __attribute__ ((__const__)); + + + +extern long double fmal (long double __x, long double __y, long double __z) throw (); extern long double __fmal (long double __x, long double __y, long double __z) throw (); + + + + + + + + +extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw (); +# 144 "/usr/include/math.h" 2 3 4 +#undef _Mdouble_ +#undef _Mdouble_BEGIN_NAMESPACE +#undef _Mdouble_END_NAMESPACE +#undef __MATH_PRECNAME + + + + +#undef __MATHDECL_1 +#undef __MATHDECL +#undef __MATHCALL + + + + +extern int signgam; +# 200 "/usr/include/math.h" 3 4 +enum + { + FP_NAN, +#define FP_NAN FP_NAN + FP_INFINITE, +#define FP_INFINITE FP_INFINITE + FP_ZERO, +#define FP_ZERO FP_ZERO + FP_SUBNORMAL, +#define FP_SUBNORMAL FP_SUBNORMAL + FP_NORMAL +#define FP_NORMAL FP_NORMAL + }; + + + +#define fpclassify(x) (sizeof (x) == sizeof (float) ? __fpclassifyf (x) : __fpclassify (x)) +# 228 "/usr/include/math.h" 3 4 +#define signbit(x) (sizeof (x) == sizeof (float) ? __signbitf (x) : __signbit (x)) +# 240 "/usr/include/math.h" 3 4 +#define isfinite(x) (sizeof (x) == sizeof (float) ? __finitef (x) : __finite (x)) +# 251 "/usr/include/math.h" 3 4 +#define isnormal(x) (fpclassify (x) == FP_NORMAL) + + + + +#define isnan(x) (sizeof (x) == sizeof (float) ? __isnanf (x) : __isnan (x)) +# 268 "/usr/include/math.h" 3 4 +#define isinf(x) (sizeof (x) == sizeof (float) ? __isinff (x) : __isinf (x)) +# 279 "/usr/include/math.h" 3 4 +#define MATH_ERRNO 1 +#define MATH_ERREXCEPT 2 + + + + + +#define math_errhandling (MATH_ERRNO | MATH_ERREXCEPT) + + + + + + +typedef enum +{ + _IEEE_ = -1, + _SVID_, + _XOPEN_, + _POSIX_, + _ISOC_ +} _LIB_VERSION_TYPE; + + + + +extern _LIB_VERSION_TYPE _LIB_VERSION; +# 316 "/usr/include/math.h" 3 4 +struct __exception + + + + { + int type; + char *name; + double arg1; + double arg2; + double retval; + }; + + +extern int matherr (struct __exception *__exc) throw (); + + + + +#define X_TLOSS 1.41484755040568800000e+16 + + +#define DOMAIN 1 +#define SING 2 +#define OVERFLOW 3 +#define UNDERFLOW 4 +#define TLOSS 5 +#define PLOSS 6 + + +#define HUGE 3.40282347e+38F +# 359 "/usr/include/math.h" 3 4 +#define M_E 2.7182818284590452354 +#define M_LOG2E 1.4426950408889634074 +#define M_LOG10E 0.43429448190325182765 +#define M_LN2 0.69314718055994530942 +#define M_LN10 2.30258509299404568402 +#define M_PI 3.14159265358979323846 +#define M_PI_2 1.57079632679489661923 +#define M_PI_4 0.78539816339744830962 +#define M_1_PI 0.31830988618379067154 +#define M_2_PI 0.63661977236758134308 +#define M_2_SQRTPI 1.12837916709551257390 +#define M_SQRT2 1.41421356237309504880 +#define M_SQRT1_2 0.70710678118654752440 + + + + + + +#define M_El 2.7182818284590452353602874713526625L +#define M_LOG2El 1.4426950408889634073599246810018921L +#define M_LOG10El 0.4342944819032518276511289189166051L +#define M_LN2l 0.6931471805599453094172321214581766L +#define M_LN10l 2.3025850929940456840179914546843642L +#define M_PIl 3.1415926535897932384626433832795029L +#define M_PI_2l 1.5707963267948966192313216916397514L +#define M_PI_4l 0.7853981633974483096156608458198757L +#define M_1_PIl 0.3183098861837906715377675267450287L +#define M_2_PIl 0.6366197723675813430755350534900574L +#define M_2_SQRTPIl 1.1283791670955125738961589031215452L +#define M_SQRT2l 1.4142135623730950488016887242096981L +#define M_SQRT1_2l 0.7071067811865475244008443621048490L +# 408 "/usr/include/math.h" 3 4 +#define isgreater(x,y) __builtin_isgreater(x, y) +#define isgreaterequal(x,y) __builtin_isgreaterequal(x, y) +#define isless(x,y) __builtin_isless(x, y) +#define islessequal(x,y) __builtin_islessequal(x, y) +#define islessgreater(x,y) __builtin_islessgreater(x, y) +#define isunordered(u,v) __builtin_isunordered(u, v) + + + + +# 1 "/usr/include/bits/mathinline.h" 1 3 4 +# 419 "/usr/include/math.h" 2 3 4 +# 480 "/usr/include/math.h" 3 4 +} +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumericConversions.h" 2 + + +extern double js_NaN; + +namespace js { + +namespace detail { + +union DoublePun { + struct { + + uint32_t lo, hi; + + + + } s; + uint64_t u64; + double d; +}; + +} + + +inline int32_t +ToInt32(double d) +{ +# 114 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumericConversions.h" + int32_t i; + uint32_t tmp0; + uint32_t tmp1; + uint32_t tmp2; + asm ( +# 131 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumericConversions.h" +" mov %1, %R4, LSR #20\n" +" bic %1, %1, #(1 << 11)\n" + + + +" orr %R4, %R4, #(1 << 20)\n" +# 153 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumericConversions.h" +" sub %1, %1, #0xff\n" +" subs %1, %1, #0x300\n" +" bmi 8f\n" + + + + + +" subs %3, %1, #52\n" +" bmi 1f\n" + + + + + + + +" bic %2, %3, #0xff\n" +" orr %3, %3, %2, LSR #3\n" + + +" mov %Q4, %Q4, LSL %3\n" +" b 2f\n" +"1:\n" + + +" rsb %3, %1, #52\n" +" mov %Q4, %Q4, LSR %3\n" + + + + + +"2:\n" + + + + + + + +" subs %3, %1, #31\n" +" mov %1, %R4, LSL #11\n" +" bmi 3f\n" + + + +" bic %2, %3, #0xff\n" +" orr %3, %3, %2, LSR #3\n" + +" mov %2, %1, LSL %3\n" +" b 4f\n" +"3:\n" + + +" rsb %3, %3, #0\n" +" mov %2, %1, LSR %3\n" + + + + + +"4:\n" + +" orr %Q4, %Q4, %2\n" + + + +" eor %Q4, %Q4, %R4, ASR #31\n" +" add %0, %Q4, %R4, LSR #31\n" +" b 9f\n" +"8:\n" + + +" mov %0, #0\n" +"9:\n" + : "=r" (i), "=&r" (tmp0), "=&r" (tmp1), "=&r" (tmp2), "=&r" (d) + : "4" (d) + : "cc" + ); + return i; +# 252 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumericConversions.h" +} + + +inline uint32_t +ToUint32(double d) +{ + return uint32_t(ToInt32(d)); +} + + +inline double +ToInteger(double d) +{ + if (d == 0) + return d; + + if (!MOZ_DOUBLE_IS_FINITE(d)) { + if (MOZ_DOUBLE_IS_NaN(d)) + return 0; + return d; + } + + bool neg = (d < 0); + d = floor(neg ? -d : d); + return neg ? -d : d; +} + +} +# 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" 2 + +namespace js { + +class Debugger; +class ObjectImpl; + +class AutoPropDescArrayRooter; + +static inline PropertyOp +CastAsPropertyOp(JSObject *object) +{ + return (__extension__ (PropertyOp) (size_t) (object)); +} + +static inline StrictPropertyOp +CastAsStrictPropertyOp(JSObject *object) +{ + return (__extension__ (StrictPropertyOp) (size_t) (object)); +} + + + + + +struct PropDesc { + private: + + + + + Value pd_; + + Value value_, get_, set_; + + + uint8_t attrs; + + + bool hasGet_ : 1; + bool hasSet_ : 1; + bool hasValue_ : 1; + bool hasWritable_ : 1; + bool hasEnumerable_ : 1; + bool hasConfigurable_ : 1; + + + bool isUndefined_ : 1; + + PropDesc(const Value &v) + : pd_(UndefinedValue()), + value_(v), + get_(UndefinedValue()), set_(UndefinedValue()), + attrs(0), + hasGet_(false), hasSet_(false), + hasValue_(true), hasWritable_(false), hasEnumerable_(false), hasConfigurable_(false), + isUndefined_(false) + { + } + + public: + friend class AutoPropDescArrayRooter; + friend void JS::AutoGCRooter::trace(JSTracer *trc); + + enum Enumerability { Enumerable = true, NonEnumerable = false }; + enum Configurability { Configurable = true, NonConfigurable = false }; + enum Writability { Writable = true, NonWritable = false }; + + PropDesc(); + + static PropDesc undefined() { return PropDesc(); } + static PropDesc valueOnly(const Value &v) { return PropDesc(v); } + + PropDesc(const Value &v, Writability writable, + Enumerability enumerable, Configurability configurable) + : pd_(UndefinedValue()), + value_(v), + get_(UndefinedValue()), set_(UndefinedValue()), + attrs((writable ? 0 : 0x02) | + (enumerable ? 0x01 : 0) | + (configurable ? 0 : 0x04)), + hasGet_(false), hasSet_(false), + hasValue_(true), hasWritable_(true), hasEnumerable_(true), hasConfigurable_(true), + isUndefined_(false) + {} +# 115 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + bool initialize(JSContext* cx, const Value &v, bool checkAccessors = true); +# 126 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + void initFromPropertyDescriptor(const PropertyDescriptor &desc); + bool makeObject(JSContext *cx); + + void setUndefined() { isUndefined_ = true; } + + bool isUndefined() const { return isUndefined_; } + + bool hasGet() const { do { } while(0); return hasGet_; } + bool hasSet() const { do { } while(0); return hasSet_; } + bool hasValue() const { do { } while(0); return hasValue_; } + bool hasWritable() const { do { } while(0); return hasWritable_; } + bool hasEnumerable() const { do { } while(0); return hasEnumerable_; } + bool hasConfigurable() const { do { } while(0); return hasConfigurable_; } + + Value pd() const { do { } while(0); return pd_; } + void clearPd() { pd_ = UndefinedValue(); } + + uint8_t attributes() const { do { } while(0); return attrs; } + + + bool isAccessorDescriptor() const { + return !isUndefined() && (hasGet() || hasSet()); + } + + + bool isDataDescriptor() const { + return !isUndefined() && (hasValue() || hasWritable()); + } + + + bool isGenericDescriptor() const { + return !isUndefined() && !isAccessorDescriptor() && !isDataDescriptor(); + } + + bool configurable() const { + do { } while(0); + do { } while(0); + return (attrs & 0x04) == 0; + } + + bool enumerable() const { + do { } while(0); + do { } while(0); + return (attrs & 0x01) != 0; + } + + bool writable() const { + do { } while(0); + do { } while(0); + return (attrs & 0x02) == 0; + } + + const Value & value() const { + do { } while(0); + return value_; + } + + JSObject * getterObject() const { + do { } while(0); + do { } while(0); + return get_.isUndefined() ? __null : &get_.toObject(); + } + JSObject * setterObject() const { + do { } while(0); + do { } while(0); + return set_.isUndefined() ? __null : &set_.toObject(); + } + + const Value & getterValue() const { + do { } while(0); + do { } while(0); + return get_; + } + const Value & setterValue() const { + do { } while(0); + do { } while(0); + return set_; + } + + + + + + PropertyOp getter() const { + return CastAsPropertyOp(get_.isUndefined() ? __null : &get_.toObject()); + } + StrictPropertyOp setter() const { + return CastAsStrictPropertyOp(set_.isUndefined() ? __null : &set_.toObject()); + } + + + + + + + bool checkGetter(JSContext *cx); + bool checkSetter(JSContext *cx); + + bool unwrapDebuggerObjectsInto(JSContext *cx, Debugger *dbg, JSObject *obj, + PropDesc *unwrapped) const; + + bool wrapInto(JSContext *cx, JSObject *obj, const jsid &id, jsid *wrappedId, + PropDesc *wrappedDesc) const; + + class AutoRooter : private AutoGCRooter + { + public: + explicit AutoRooter(JSContext *cx, PropDesc *pd_ + ) + : AutoGCRooter(cx, PROPDESC), pd(pd_), skip(cx, pd_) + { + do { } while (0); + } + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + PropDesc *pd; + SkipRoot skip; + + }; +}; + +class DenseElementsHeader; +class SparseElementsHeader; +class Uint8ElementsHeader; +class Int8ElementsHeader; +class Uint16ElementsHeader; +class Int16ElementsHeader; +class Uint32ElementsHeader; +class Int32ElementsHeader; +class Uint8ClampedElementsHeader; +class Float32ElementsHeader; +class Float64ElementsHeader; +class Uint8ClampedElementsHeader; +class ArrayBufferElementsHeader; + +enum ElementsKind { + DenseElements, + SparseElements, + + ArrayBufferElements, + + + Uint8Elements, + Int8Elements, + Uint16Elements, + Int16Elements, + Uint32Elements, + Int32Elements, + Uint8ClampedElements, + Float32Elements, + Float64Elements +}; + +class ElementsHeader +{ + protected: + uint32_t type; + uint32_t length; + + union { + class { + friend class DenseElementsHeader; + uint32_t initializedLength; + uint32_t capacity; + } dense; + class { + friend class SparseElementsHeader; + Shape * shape; + } sparse; + }; + + void staticAsserts() { + typedef int + moz_static_assert47 +# 300 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + [(sizeof(ElementsHeader) == ValuesPerHeader * sizeof(Value)) ? 1 : -1] + ; + } + + public: + ElementsKind kind() const { + do { } while(0); + return ElementsKind(type); + } + + inline bool isDenseElements() const { return kind() == DenseElements; } + inline bool isSparseElements() const { return kind() == SparseElements; } + inline bool isArrayBufferElements() const { return kind() == ArrayBufferElements; } + inline bool isUint8Elements() const { return kind() == Uint8Elements; } + inline bool isInt8Elements() const { return kind() == Int8Elements; } + inline bool isUint16Elements() const { return kind() == Uint16Elements; } + inline bool isInt16Elements() const { return kind() == Int16Elements; } + inline bool isUint32Elements() const { return kind() == Uint32Elements; } + inline bool isInt32Elements() const { return kind() == Int32Elements; } + inline bool isUint8ClampedElements() const { return kind() == Uint8ClampedElements; } + inline bool isFloat32Elements() const { return kind() == Float32Elements; } + inline bool isFloat64Elements() const { return kind() == Float64Elements; } + + inline DenseElementsHeader & asDenseElements(); + inline SparseElementsHeader & asSparseElements(); + inline ArrayBufferElementsHeader & asArrayBufferElements(); + inline Uint8ElementsHeader & asUint8Elements(); + inline Int8ElementsHeader & asInt8Elements(); + inline Uint16ElementsHeader & asUint16Elements(); + inline Int16ElementsHeader & asInt16Elements(); + inline Uint32ElementsHeader & asUint32Elements(); + inline Int32ElementsHeader & asInt32Elements(); + inline Uint8ClampedElementsHeader & asUint8ClampedElements(); + inline Float32ElementsHeader & asFloat32Elements(); + inline Float64ElementsHeader & asFloat64Elements(); + + static ElementsHeader * fromElements(HeapSlot *elems) { + return reinterpret_cast(uintptr_t(elems) - sizeof(ElementsHeader)); + } + + static const size_t ValuesPerHeader = 2; +}; + +class DenseElementsHeader : public ElementsHeader +{ + public: + uint32_t capacity() const { + do { } while(0); + return dense.capacity; + } + + uint32_t initializedLength() const { + do { } while(0); + return dense.initializedLength; + } + + uint32_t length() const { + do { } while(0); + return ElementsHeader::length; + } + + bool getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc); + + bool defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc, + bool shouldThrow, bool *succeeded); + + bool setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, + const Value &v, bool *succeeded); + + private: + inline bool isDenseElements() const ; + inline DenseElementsHeader & asDenseElements() ; + + DenseElementsHeader(const DenseElementsHeader &other) ; + void operator=(const DenseElementsHeader &other) ; +}; + +class SparseElementsHeader : public ElementsHeader +{ + public: + Shape * shape() { + do { } while(0); + return sparse.shape; + } + + uint32_t length() const { + do { } while(0); + return ElementsHeader::length; + } + + bool getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc); + + bool defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc, + bool shouldThrow, bool *succeeded); + + bool setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, + const Value &v, bool *succeeded); + + private: + inline bool isSparseElements() const ; + inline SparseElementsHeader & asSparseElements() ; + + SparseElementsHeader(const SparseElementsHeader &other) ; + void operator=(const SparseElementsHeader &other) ; +}; + +extern uint32_t +ClampDoubleToUint8(const double x); + +struct uint8_clamped { + uint8_t val; + + uint8_clamped() { } + uint8_clamped(const uint8_clamped& other) : val(other.val) { } + + + uint8_clamped(uint8_t x) { *this = x; } + uint8_clamped(uint16_t x) { *this = x; } + uint8_clamped(uint32_t x) { *this = x; } + uint8_clamped(int8_t x) { *this = x; } + uint8_clamped(int16_t x) { *this = x; } + uint8_clamped(int32_t x) { *this = x; } + uint8_clamped(double x) { *this = x; } + + uint8_clamped& operator=(const uint8_clamped& x) { + val = x.val; + return *this; + } + + uint8_clamped& operator=(uint8_t x) { + val = x; + return *this; + } + + uint8_clamped& operator=(uint16_t x) { + val = (x > 255) ? 255 : uint8_t(x); + return *this; + } + + uint8_clamped& operator=(uint32_t x) { + val = (x > 255) ? 255 : uint8_t(x); + return *this; + } + + uint8_clamped& operator=(int8_t x) { + val = (x >= 0) ? uint8_t(x) : 0; + return *this; + } + + uint8_clamped& operator=(int16_t x) { + val = (x >= 0) + ? ((x < 255) + ? uint8_t(x) + : 255) + : 0; + return *this; + } + + uint8_clamped& operator=(int32_t x) { + val = (x >= 0) + ? ((x < 255) + ? uint8_t(x) + : 255) + : 0; + return *this; + } + + uint8_clamped& operator=(const double x) { + val = uint8_t(ClampDoubleToUint8(x)); + return *this; + } + + operator uint8_t() const { + return val; + } + + void staticAsserts() { + typedef int + moz_static_assert48 +# 477 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + [(sizeof(uint8_clamped) == 1) ? 1 : -1] + ; + } +}; + + +template static inline const bool TypeIsFloatingPoint() { return false; } +template<> inline const bool TypeIsFloatingPoint() { return true; } +template<> inline const bool TypeIsFloatingPoint() { return true; } + +template static inline const bool TypeIsUnsigned() { return false; } +template<> inline const bool TypeIsUnsigned() { return true; } +template<> inline const bool TypeIsUnsigned() { return true; } +template<> inline const bool TypeIsUnsigned() { return true; } + +template +class TypedElementsHeader : public ElementsHeader +{ + T getElement(uint32_t index) { + do { } while(0); + return reinterpret_cast(this + 1)[index]; + } + + inline void assign(uint32_t index, double d); + + void setElement(uint32_t index, T value) { + do { } while(0); + reinterpret_cast(this + 1)[index] = value; + } + + public: + uint32_t length() const { + do { } while(0); + do { } while(0); + return ElementsHeader::length; + } + + bool getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc); + + bool defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc, + bool shouldThrow, bool *succeeded); + + bool setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, + const Value &v, bool *succeeded); + + private: + TypedElementsHeader(const TypedElementsHeader &other) ; + void operator=(const TypedElementsHeader &other) ; +}; + +template inline void +TypedElementsHeader::assign(uint32_t index, double d) +{ + __builtin_unreachable(); +} + +template<> inline void +TypedElementsHeader::assign(uint32_t index, double d) +{ + double i = ToInteger(d); + uint8_t u = (i <= 0) + ? 0 + : (i >= 255) + ? 255 + : uint8_t(i); + setElement(index, uint8_clamped(u)); +} + +template<> inline void +TypedElementsHeader::assign(uint32_t index, double d) +{ + setElement(index, uint8_t(ToUint32(d))); +} + +template<> inline void +TypedElementsHeader::assign(uint32_t index, double d) +{ + + setElement(index, int8_t(ToInt32(d))); +} + +template<> inline void +TypedElementsHeader::assign(uint32_t index, double d) +{ + setElement(index, uint16_t(ToUint32(d))); +} + +template<> inline void +TypedElementsHeader::assign(uint32_t index, double d) +{ + + setElement(index, int16_t(ToInt32(d))); +} + +template<> inline void +TypedElementsHeader::assign(uint32_t index, double d) +{ + setElement(index, ToUint32(d)); +} + +template<> inline void +TypedElementsHeader::assign(uint32_t index, double d) +{ + + setElement(index, int32_t(ToInt32(d))); +} + +template<> inline void +TypedElementsHeader::assign(uint32_t index, double d) +{ + setElement(index, float(d)); +} + +template<> inline void +TypedElementsHeader::assign(uint32_t index, double d) +{ + setElement(index, d); +} + +class Uint8ElementsHeader : public TypedElementsHeader +{ + private: + inline bool isUint8Elements() const ; + inline Uint8ElementsHeader & asUint8Elements() ; + Uint8ElementsHeader(const Uint8ElementsHeader &other) ; + void operator=(const Uint8ElementsHeader &other) ; +}; +class Int8ElementsHeader : public TypedElementsHeader +{ + private: + bool isInt8Elements() const ; + Int8ElementsHeader & asInt8Elements() ; + Int8ElementsHeader(const Int8ElementsHeader &other) ; + void operator=(const Int8ElementsHeader &other) ; +}; +class Uint16ElementsHeader : public TypedElementsHeader +{ + private: + bool isUint16Elements() const ; + Uint16ElementsHeader & asUint16Elements() ; + Uint16ElementsHeader(const Uint16ElementsHeader &other) ; + void operator=(const Uint16ElementsHeader &other) ; +}; +class Int16ElementsHeader : public TypedElementsHeader +{ + private: + bool isInt16Elements() const ; + Int16ElementsHeader & asInt16Elements() ; + Int16ElementsHeader(const Int16ElementsHeader &other) ; + void operator=(const Int16ElementsHeader &other) ; +}; +class Uint32ElementsHeader : public TypedElementsHeader +{ + private: + bool isUint32Elements() const ; + Uint32ElementsHeader & asUint32Elements() ; + Uint32ElementsHeader(const Uint32ElementsHeader &other) ; + void operator=(const Uint32ElementsHeader &other) ; +}; +class Int32ElementsHeader : public TypedElementsHeader +{ + private: + bool isInt32Elements() const ; + Int32ElementsHeader & asInt32Elements() ; + Int32ElementsHeader(const Int32ElementsHeader &other) ; + void operator=(const Int32ElementsHeader &other) ; +}; +class Float32ElementsHeader : public TypedElementsHeader +{ + private: + bool isFloat32Elements() const ; + Float32ElementsHeader & asFloat32Elements() ; + Float32ElementsHeader(const Float32ElementsHeader &other) ; + void operator=(const Float32ElementsHeader &other) ; +}; +class Float64ElementsHeader : public TypedElementsHeader +{ + private: + bool isFloat64Elements() const ; + Float64ElementsHeader & asFloat64Elements() ; + Float64ElementsHeader(const Float64ElementsHeader &other) ; + void operator=(const Float64ElementsHeader &other) ; +}; + +class Uint8ClampedElementsHeader : public TypedElementsHeader +{ + private: + inline bool isUint8Clamped() const ; + inline Uint8ClampedElementsHeader & asUint8ClampedElements() ; + Uint8ClampedElementsHeader(const Uint8ClampedElementsHeader &other) ; + void operator=(const Uint8ClampedElementsHeader &other) ; +}; + +class ArrayBufferElementsHeader : public ElementsHeader +{ + public: + bool getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc); + + bool defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc, + bool shouldThrow, bool *succeeded); + + bool setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, + const Value &v, bool *succeeded); + + private: + inline bool isArrayBufferElements() const ; + inline ArrayBufferElementsHeader & asArrayBufferElements() ; + + ArrayBufferElementsHeader(const ArrayBufferElementsHeader &other) ; + void operator=(const ArrayBufferElementsHeader &other) ; +}; + +inline DenseElementsHeader & +ElementsHeader::asDenseElements() +{ + do { } while(0); + return *static_cast(this); +} + +inline SparseElementsHeader & +ElementsHeader::asSparseElements() +{ + do { } while(0); + return *static_cast(this); +} + +inline Uint8ElementsHeader & +ElementsHeader::asUint8Elements() +{ + do { } while(0); + return *static_cast(this); +} + +inline Int8ElementsHeader & +ElementsHeader::asInt8Elements() +{ + do { } while(0); + return *static_cast(this); +} + +inline Uint16ElementsHeader & +ElementsHeader::asUint16Elements() +{ + do { } while(0); + return *static_cast(this); +} + +inline Int16ElementsHeader & +ElementsHeader::asInt16Elements() +{ + do { } while(0); + return *static_cast(this); +} + +inline Uint32ElementsHeader & +ElementsHeader::asUint32Elements() +{ + do { } while(0); + return *static_cast(this); +} + +inline Int32ElementsHeader & +ElementsHeader::asInt32Elements() +{ + do { } while(0); + return *static_cast(this); +} + +inline Uint8ClampedElementsHeader & +ElementsHeader::asUint8ClampedElements() +{ + do { } while(0); + return *static_cast(this); +} + +inline Float32ElementsHeader & +ElementsHeader::asFloat32Elements() +{ + do { } while(0); + return *static_cast(this); +} + +inline Float64ElementsHeader & +ElementsHeader::asFloat64Elements() +{ + do { } while(0); + return *static_cast(this); +} + +inline ArrayBufferElementsHeader & +ElementsHeader::asArrayBufferElements() +{ + do { } while(0); + return *static_cast(this); +} + + + + + + + +class ArrayBufferObject; +class ObjectElements +{ + friend struct ::JSObject; + friend class ObjectImpl; + friend class ArrayBufferObject; + + + uint32_t capacity; + + + + + + + + uint32_t initializedLength; + + + uint32_t length; + + + uint32_t unused; + + void staticAsserts() { + typedef int + moz_static_assert49 +# 804 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + [(sizeof(ObjectElements) == VALUES_PER_HEADER * sizeof(Value)) ? 1 : -1] + ; + } + + public: + + ObjectElements(uint32_t capacity, uint32_t length) + : capacity(capacity), initializedLength(0), length(length) + {} + + HeapSlot *elements() { return (HeapSlot *)(uintptr_t(this) + sizeof(ObjectElements)); } + static ObjectElements * fromElements(HeapSlot *elems) { + return (ObjectElements *)(uintptr_t(elems) - sizeof(ObjectElements)); + } + + static int offsetOfCapacity() { + return (int)__builtin_offsetof (ObjectElements, capacity) - (int)sizeof(ObjectElements); + } + static int offsetOfInitializedLength() { + return (int)__builtin_offsetof (ObjectElements, initializedLength) - (int)sizeof(ObjectElements); + } + static int offsetOfLength() { + return (int)__builtin_offsetof (ObjectElements, length) - (int)sizeof(ObjectElements); + } + + static const size_t VALUES_PER_HEADER = 2; +}; + + +extern HeapSlot *emptyObjectElements; + +struct Class; +struct GCMarker; +struct ObjectOps; +struct Shape; + +class NewObjectCache; + +inline Value +ObjectValue(ObjectImpl &obj); +# 893 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" +class ObjectImpl : public gc::Cell +{ + protected: + + + + + HeapPtrShape shape_; + + + + + + + HeapPtrTypeObject type_; + + HeapSlot *slots; + HeapSlot *elements; + + private: + static void staticAsserts() { + typedef int + moz_static_assert50 +# 914 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + [(sizeof(ObjectImpl) == sizeof(shadow::Object)) ? 1 : -1] + ; + typedef int + moz_static_assert51 +# 916 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + [(sizeof(ObjectImpl) % sizeof(Value) == 0) ? 1 : -1] + ; + + typedef int + moz_static_assert52 +# 919 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + [(__builtin_offsetof (ObjectImpl, shape_) == __builtin_offsetof (shadow::Object, shape)) ? 1 : -1] + ; + typedef int + moz_static_assert53 +# 921 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + [(__builtin_offsetof (ObjectImpl, type_) == __builtin_offsetof (shadow::Object, type)) ? 1 : -1] + ; + typedef int + moz_static_assert54 +# 923 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + [(__builtin_offsetof (ObjectImpl, slots) == __builtin_offsetof (shadow::Object, slots)) ? 1 : -1] + ; + typedef int + moz_static_assert55 +# 925 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + [(__builtin_offsetof (ObjectImpl, elements) == __builtin_offsetof (shadow::Object, _1)) ? 1 : -1] + ; + } + + JSObject * asObjectPtr() { return reinterpret_cast(this); } + + friend inline Value ObjectValue(ObjectImpl &obj); + + + + public: + JSObject * getProto() const { + return type_->proto; + } + + inline bool isExtensible() const; + + + + + + inline bool isDenseArray() const; + inline bool isSlowArray() const; + inline bool isArray() const; + + inline HeapSlotArray getDenseArrayElements(); + inline const Value & getDenseArrayElement(uint32_t idx); + inline uint32_t getDenseArrayInitializedLength(); + + bool makeElementsSparse(JSContext *cx) { + __builtin_unreachable(); + + __builtin_unreachable(); + return false; + } + + protected: + + + + void checkShapeConsistency() { } + + + private: + + + + + inline void getSlotRangeUnchecked(uint32_t start, uint32_t length, + HeapSlot **fixedStart, HeapSlot **fixedEnd, + HeapSlot **slotsStart, HeapSlot **slotsEnd); + inline void getSlotRange(uint32_t start, uint32_t length, + HeapSlot **fixedStart, HeapSlot **fixedEnd, + HeapSlot **slotsStart, HeapSlot **slotsEnd); + + protected: + friend struct GCMarker; + friend struct Shape; + friend class NewObjectCache; + + inline bool hasContiguousSlots(uint32_t start, uint32_t count) const; + + inline void invalidateSlotRange(uint32_t start, uint32_t count); + inline void initializeSlotRange(uint32_t start, uint32_t count); + + + + + + void initSlotRange(uint32_t start, const Value *vector, uint32_t length); + + + + + + void copySlotRange(uint32_t start, const Value *vector, uint32_t length); +# 1016 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + static const uint32_t SLOT_CAPACITY_MIN = 8; + + HeapSlot *fixedSlots() const { + return reinterpret_cast(uintptr_t(this) + sizeof(ObjectImpl)); + } + + friend class ElementsHeader; + friend class DenseElementsHeader; + friend class SparseElementsHeader; + + enum DenseElementsResult { + Failure, + ConvertToSparse, + Succeeded + }; + + DenseElementsResult ensureDenseElementsInitialized(JSContext *cx, uint32_t index, + uint32_t extra) + { + __builtin_unreachable(); + + __builtin_unreachable(); + return Failure; + } + + + + + + + public: + Shape * lastProperty() const { + do { } while(0); + return shape_; + } + + inline bool isNative() const; + + types::TypeObject *type() const { + do { } while(0); + return type_; + } + + uint32_t numFixedSlots() const { + return reinterpret_cast(this)->numFixedSlots(); + } + + + + + + bool hasSingletonType() const { return !!type_->singleton; } + + + + + + bool hasLazyType() const { return type_->lazy(); } + + inline uint32_t slotSpan() const; + + + inline uint32_t numDynamicSlots() const; + + const Shape * nativeLookup(JSContext *cx, jsid id); + + + + + + inline Class *getClass() const; + inline JSClass *getJSClass() const; + inline bool hasClass(const Class *c) const; + inline const ObjectOps *getOps() const; +# 1100 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + inline bool isDelegate() const; + + + + + + + inline bool inDictionaryMode() const; + + const Value &getSlot(uint32_t slot) const { + do { } while(0); + uint32_t fixed = numFixedSlots(); + if (slot < fixed) + return fixedSlots()[slot]; + return slots[slot - fixed]; + } + + HeapSlot *getSlotAddressUnchecked(uint32_t slot) { + uint32_t fixed = numFixedSlots(); + if (slot < fixed) + return fixedSlots() + slot; + return slots + (slot - fixed); + } + + HeapSlot *getSlotAddress(uint32_t slot) { + + + + + + do { } while(0); + return getSlotAddressUnchecked(slot); + } + + HeapSlot &getSlotRef(uint32_t slot) { + do { } while(0); + return *getSlotAddress(slot); + } + + inline HeapSlot &nativeGetSlotRef(uint32_t slot); + inline const Value &nativeGetSlot(uint32_t slot) const; + + inline void setSlot(uint32_t slot, const Value &value); + inline void initSlot(uint32_t slot, const Value &value); + inline void initSlotUnchecked(uint32_t slot, const Value &value); + + + + HeapSlot &getFixedSlotRef(uint32_t slot) { + do { } while(0); + return fixedSlots()[slot]; + } + + const Value &getFixedSlot(uint32_t slot) const { + do { } while(0); + return fixedSlots()[slot]; + } + + inline void setFixedSlot(uint32_t slot, const Value &value); + inline void initFixedSlot(uint32_t slot, const Value &value); + + + + + + + + static inline uint32_t dynamicSlotsCount(uint32_t nfixed, uint32_t span); + + + inline size_t sizeOfThis() const; + + + + ObjectElements * getElementsHeader() const { + return ObjectElements::fromElements(elements); + } + + ElementsHeader & elementsHeader() const { + __builtin_unreachable(); + return *ElementsHeader::fromElements(elements); + } + + inline HeapSlot *fixedElements() const { + typedef int + + moz_static_assert56 +# 1184 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + [(2 * sizeof(Value) == sizeof(ObjectElements)) ? 1 : -1] + + ; + return &fixedSlots()[2]; + } + + void setFixedElements() { this->elements = fixedElements(); } + + inline bool hasDynamicElements() const { + + + + + + + + return elements != emptyObjectElements && elements != fixedElements(); + } + + + static inline void readBarrier(ObjectImpl *obj); + static inline void writeBarrierPre(ObjectImpl *obj); + static inline void writeBarrierPost(ObjectImpl *obj, void *addr); + inline void privateWriteBarrierPre(void **oldval); + inline void privateWriteBarrierPost(void **oldval); + void markChildren(JSTracer *trc); + + + + inline void *&privateRef(uint32_t nfixed) const; + + inline bool hasPrivate() const; + inline void *getPrivate() const; + inline void setPrivate(void *data); + inline void setPrivateUnbarriered(void *data); + inline void initPrivate(void *data); + + + inline void *getPrivate(uint32_t nfixed) const; + + + static size_t offsetOfShape() { return __builtin_offsetof (ObjectImpl, shape_); } + HeapPtrShape *addressOfShape() { return &shape_; } + + static size_t offsetOfType() { return __builtin_offsetof (ObjectImpl, type_); } + HeapPtrTypeObject *addressOfType() { return &type_; } + + static size_t offsetOfElements() { return __builtin_offsetof (ObjectImpl, elements); } + static size_t offsetOfFixedElements() { + return sizeof(ObjectImpl) + sizeof(ObjectElements); + } + + static size_t getFixedSlotOffset(size_t slot) { + return sizeof(ObjectImpl) + slot * sizeof(Value); + } + static size_t getPrivateDataOffset(size_t nfixed) { return getFixedSlotOffset(nfixed); } + static size_t offsetOfSlots() { return __builtin_offsetof (ObjectImpl, slots); } +}; + +inline Value +ObjectValue(ObjectImpl &obj) +{ + Value v; + v.setObject(*obj.asObjectPtr()); + return v; +} + +bool +GetOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc); + + +extern bool +GetElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, Value *vp); + +extern bool +DefineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc, + bool shouldThrow, bool *succeeded); + + +extern bool +SetElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, const Value &v, + bool *succeeded); + +extern bool +HasElement(JSContext *cx, ObjectImpl *obj, uint32_t index, bool *found); + +} +# 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" +#define String_h_ + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 1 +# 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsstr.h" 1 + + + + + + + +#define jsstr_h___ + +# 1 "/usr/include/ctype.h" 1 3 4 +# 25 "/usr/include/ctype.h" 3 4 +#define _CTYPE_H 1 + + + + +extern "C" { +# 45 "/usr/include/ctype.h" 3 4 +#define _ISbit(bit) ((bit) < 8 ? ((1 << (bit)) << 8) : ((1 << (bit)) >> 8)) + + +enum +{ + _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), + _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), + _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), + _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), + _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), + _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), + _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), + _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), + _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), + _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), + _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), + _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) +}; +# 81 "/usr/include/ctype.h" 3 4 +extern __const unsigned short int **__ctype_b_loc (void) + throw () __attribute__ ((__const)); +extern __const __int32_t **__ctype_tolower_loc (void) + throw () __attribute__ ((__const)); +extern __const __int32_t **__ctype_toupper_loc (void) + throw () __attribute__ ((__const)); + + + + + + +#define __isctype_f(type) __extern_inline int is ##type (int __c) __THROW { return (*__ctype_b_loc ())[(int) (__c)] & (unsigned short int) _IS ##type; } + + + + + + + +#define __isascii(c) (((c) & ~0x7f) == 0) +#define __toascii(c) ((c) & 0x7f) + +#define __exctype(name) extern int name (int) __THROW + + + + + + + +extern int isalnum (int) throw (); +extern int isalpha (int) throw (); +extern int iscntrl (int) throw (); +extern int isdigit (int) throw (); +extern int islower (int) throw (); +extern int isgraph (int) throw (); +extern int isprint (int) throw (); +extern int ispunct (int) throw (); +extern int isspace (int) throw (); +extern int isupper (int) throw (); +extern int isxdigit (int) throw (); + + + +extern int tolower (int __c) throw (); + + +extern int toupper (int __c) throw (); + + + + + + + + +extern int isblank (int) throw (); + + + + + + +extern int isctype (int __c, int __mask) throw (); + + + + + + +extern int isascii (int __c) throw (); + + + +extern int toascii (int __c) throw (); + + + +extern int _toupper (int) throw (); +extern int _tolower (int) throw (); + + + +#define __tobody(c,f,a,args) (__extension__ ({ int __res; if (sizeof (c) > 1) { if (__builtin_constant_p (c)) { int __c = (c); __res = __c < -128 || __c > 255 ? __c : (a)[__c]; } else __res = f args; } else __res = (a)[(int) (c)]; __res; })) +# 263 "/usr/include/ctype.h" 3 4 +#define __isctype_l(c,type,locale) ((locale)->__ctype_b[(int) (c)] & (unsigned short int) type) + + +#define __exctype_l(name) extern int name (int, __locale_t) __THROW + + + + + + +extern int isalnum_l (int, __locale_t) throw (); +extern int isalpha_l (int, __locale_t) throw (); +extern int iscntrl_l (int, __locale_t) throw (); +extern int isdigit_l (int, __locale_t) throw (); +extern int islower_l (int, __locale_t) throw (); +extern int isgraph_l (int, __locale_t) throw (); +extern int isprint_l (int, __locale_t) throw (); +extern int ispunct_l (int, __locale_t) throw (); +extern int isspace_l (int, __locale_t) throw (); +extern int isupper_l (int, __locale_t) throw (); +extern int isxdigit_l (int, __locale_t) throw (); + +extern int isblank_l (int, __locale_t) throw (); + + + +extern int __tolower_l (int __c, __locale_t __l) throw (); +extern int tolower_l (int __c, __locale_t __l) throw (); + + +extern int __toupper_l (int __c, __locale_t __l) throw (); +extern int toupper_l (int __c, __locale_t __l) throw (); +# 349 "/usr/include/ctype.h" 3 4 +} +# 11 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsstr.h" 2 + + + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Unicode.h" 1 + + + + + +#define Unicode_h__ +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Unicode.h" +extern const bool js_isidstart[]; +extern const bool js_isident[]; +extern const bool js_isspace[]; + +namespace js { +namespace unicode { +# 68 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Unicode.h" +struct CharFlag { + enum temp { + SPACE = 1 << 0, + LETTER = 1 << 1, + IDENTIFIER_PART = 1 << 2, + NO_DELTA = 1 << 3, + ENCLOSING_MARK = 1 << 4, + COMBINING_SPACING_MARK = 1 << 5 + }; +}; + +const jschar BYTE_ORDER_MARK2 = 0xFFFE; +const jschar NO_BREAK_SPACE = 0x00A0; + +class CharacterInfo { +# 103 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Unicode.h" + public: + uint16_t upperCase; + uint16_t lowerCase; + uint8_t flags; + + inline bool isSpace() const { + return flags & CharFlag::SPACE; + } + + inline bool isLetter() const { + return flags & CharFlag::LETTER; + } + + inline bool isIdentifierPart() const { + return flags & (CharFlag::IDENTIFIER_PART | CharFlag::LETTER); + } + + inline bool isEnclosingMark() const { + return flags & CharFlag::ENCLOSING_MARK; + } + + inline bool isCombiningSpacingMark() const { + return flags & CharFlag::COMBINING_SPACING_MARK; + } +}; + +extern const uint8_t index1[]; +extern const uint8_t index2[]; +extern const CharacterInfo js_charinfo[]; + +inline const CharacterInfo& +CharInfo(jschar code) +{ + size_t index = index1[code >> 6]; + index = index2[(index << 6) + (code & 0x3f)]; + + return js_charinfo[index]; +} + +inline bool +IsIdentifierStart(jschar ch) +{ +# 154 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Unicode.h" + if (ch < 128) + return js_isidstart[ch]; + + return CharInfo(ch).isLetter(); +} + +inline bool +IsIdentifierPart(jschar ch) +{ + + + if (ch < 128) + return js_isident[ch]; + + return CharInfo(ch).isIdentifierPart(); +} + +inline bool +IsLetter(jschar ch) +{ + return CharInfo(ch).isLetter(); +} + +inline bool +IsSpace(jschar ch) +{ +# 192 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Unicode.h" + if (ch < 128) + return js_isspace[ch]; + + if (ch == NO_BREAK_SPACE) + return true; + + return CharInfo(ch).isSpace(); +} + +inline bool +IsSpaceOrBOM2(jschar ch) +{ + if (ch < 128) + return js_isspace[ch]; + + + if (ch == NO_BREAK_SPACE || ch == BYTE_ORDER_MARK2) + return true; + + return CharInfo(ch).isSpace(); +} + +inline jschar +ToUpperCase(jschar ch) +{ + const CharacterInfo &info = CharInfo(ch); + + + + + + if (info.flags & CharFlag::NO_DELTA) + return info.upperCase; + + return uint16_t(ch) + info.upperCase; +} + +inline jschar +ToLowerCase(jschar ch) +{ + const CharacterInfo &info = CharInfo(ch); + + if (info.flags & CharFlag::NO_DELTA) + return info.lowerCase; + + return uint16_t(ch) + info.lowerCase; +} + + + +inline bool +IsXMLSpace(jschar ch) +{ + return ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n'; +} + +inline bool +IsXMLNamespaceStart(jschar ch) +{ + if (ch == '_') + return true; + + return CharInfo(ch).isCombiningSpacingMark() || IsIdentifierStart(ch); +} + +inline bool +IsXMLNamespacePart(jschar ch) +{ + if (ch == '.' || ch == '-' || ch == '_') + return true; + + return CharInfo(ch).isEnclosingMark() || IsIdentifierPart(ch); +} + +inline bool +IsXMLNameStart(jschar ch) +{ + if (ch == '_' || ch == ':') + return true; + + return CharInfo(ch).isCombiningSpacingMark() || IsIdentifierStart(ch); +} + +inline bool +IsXMLNamePart(jschar ch) +{ + if (ch == '.' || ch == '-' || ch == '_' || ch == ':') + return true; + + return CharInfo(ch).isEnclosingMark() || IsIdentifierPart(ch); +} + + +} +} +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsstr.h" 2 + +namespace js { + + +class StringBuffer; +# 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsstr.h" +class StringSegmentRange; +class MutatingRopeSegmentRange; + + + + +class RopeBuilder; + +} + +extern JSString * +js_ConcatStrings(JSContext *cx, js::HandleString s1, js::HandleString s2); + +extern JSString * +js_toLowerCase(JSContext *cx, JSString *str); + +extern JSString * +js_toUpperCase(JSContext *cx, JSString *str); + +struct JSSubString { + size_t length; + const jschar *chars; +}; + +extern jschar js_empty_ucstr[]; +extern JSSubString js_EmptySubString; + + + + + +#define JS7_ISDEC(c) ((((unsigned)(c)) - '0') <= 9) +#define JS7_UNDEC(c) ((c) - '0') +#define JS7_ISHEX(c) ((c) < 128 && isxdigit(c)) +#define JS7_UNHEX(c) (unsigned)(JS7_ISDEC(c) ? (c) - '0' : 10 + tolower(c) - 'a') +#define JS7_ISLET(c) ((c) < 128 && isalpha(c)) + + +extern JSObject * +js_InitStringClass(JSContext *cx, JSObject *obj); + +extern const char js_escape_str[]; +extern const char js_unescape_str[]; +extern const char js_uneval_str[]; +extern const char js_decodeURI_str[]; +extern const char js_encodeURI_str[]; +extern const char js_decodeURIComponent_str[]; +extern const char js_encodeURIComponent_str[]; + + +extern JSFixedString * +js_NewString(JSContext *cx, jschar *chars, size_t length); + +extern JSLinearString * +js_NewDependentString(JSContext *cx, JSString *base, size_t start, size_t length); + + +extern JSFixedString * +js_NewStringCopyN(JSContext *cx, const jschar *s, size_t n); + +extern JSFixedString * +js_NewStringCopyN(JSContext *cx, const char *s, size_t n); + + +extern JSFixedString * +js_NewStringCopyZ(JSContext *cx, const jschar *s); + +extern JSFixedString * +js_NewStringCopyZ(JSContext *cx, const char *s); + + + + +extern const char * +js_ValueToPrintable(JSContext *cx, const js::Value &, + JSAutoByteString *bytes, bool asSource = false); + +namespace js { + + + + + +extern JSString * +ToStringSlow(JSContext *cx, const Value &v); + + + + + + +static __attribute__((always_inline)) inline JSString * +ToString(JSContext *cx, const js::Value &v) +{ + if (v.isString()) + return v.toString(); + return ToStringSlow(cx, v); +} + + + + + + +inline bool +ValueToStringBuffer(JSContext *cx, const Value &v, StringBuffer &sb); + +} + + + + + +extern __attribute__((visibility("default"))) JSString * +js_ValueToSource(JSContext *cx, const js::Value &v); + +namespace js { + + + + + +extern bool +EqualStrings(JSContext *cx, JSString *str1, JSString *str2, bool *result); + + +extern bool +EqualStrings(JSContext *cx, JSLinearString *str1, JSLinearString *str2, bool *result) ; + + +extern bool +EqualStrings(JSLinearString *str1, JSLinearString *str2); + + + + + +extern bool +CompareStrings(JSContext *cx, JSString *str1, JSString *str2, int32_t *result); + + + + +extern bool +StringEqualsAscii(JSLinearString *str, const char *asciiBytes); + +} + +extern size_t +js_strlen(const jschar *s); + +extern jschar * +js_strchr(const jschar *s, jschar c); + +extern jschar * +js_strchr_limit(const jschar *s, jschar c, const jschar *limit); + +static __attribute__((always_inline)) inline void +js_strncpy(jschar *dst, const jschar *src, size_t nelem) +{ + return js::PodCopy(dst, src, nelem); +} + +namespace js { + + + + + + +extern jschar * +InflateString(JSContext *cx, const char *bytes, size_t *length, + FlationCoding fc = NormalEncoding); + +extern char * +DeflateString(JSContext *cx, const jschar *chars, size_t length); +# 216 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsstr.h" +extern bool +InflateStringToBuffer(JSContext *cx, const char *bytes, size_t length, + jschar *chars, size_t *charsLength); + +extern bool +InflateUTF8StringToBuffer(JSContext *cx, const char *bytes, size_t length, + jschar *chars, size_t *charsLength, + FlationCoding fc = NormalEncoding); + + +extern size_t +GetDeflatedStringLength(JSContext *cx, const jschar *chars, size_t charsLength); + + +extern size_t +GetDeflatedUTF8StringLength(JSContext *cx, const jschar *chars, + size_t charsLength, + FlationCoding fc = NormalEncoding); + + + + + + + +extern bool +DeflateStringToBuffer(JSContext *cx, const jschar *chars, + size_t charsLength, char *bytes, size_t *length); + + + + +extern bool +DeflateStringToUTF8Buffer(JSContext *cx, const jschar *chars, + size_t charsLength, char *bytes, size_t *length, + FlationCoding fc = NormalEncoding); + + + + + +extern JSBool +str_replace(JSContext *cx, unsigned argc, js::Value *vp); + +extern JSBool +str_fromCharCode(JSContext *cx, unsigned argc, Value *vp); + +} + +extern JSBool +js_str_toString(JSContext *cx, unsigned argc, js::Value *vp); + +extern JSBool +js_str_charAt(JSContext *cx, unsigned argc, js::Value *vp); + +extern JSBool +js_str_charCodeAt(JSContext *cx, unsigned argc, js::Value *vp); + + + + + +extern int +js_OneUcs4ToUtf8Char(uint8_t *utf8Buffer, uint32_t ucs4Char); + +namespace js { + +extern size_t +PutEscapedStringImpl(char *buffer, size_t size, FILE *fp, JSLinearString *str, uint32_t quote); +# 295 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsstr.h" +inline size_t +PutEscapedString(char *buffer, size_t size, JSLinearString *str, uint32_t quote) +{ + size_t n = PutEscapedStringImpl(buffer, size, __null, str, quote); + + + do { } while(0); + return n; +} + + + + + + +inline bool +FileEscapedString(FILE *fp, JSLinearString *str, uint32_t quote) +{ + return PutEscapedStringImpl(__null, 0, fp, str, quote) != size_t(-1); +} + +JSBool +str_match(JSContext *cx, unsigned argc, Value *vp); + +JSBool +str_search(JSContext *cx, unsigned argc, Value *vp); + +JSBool +str_split(JSContext *cx, unsigned argc, Value *vp); + +} + +extern JSBool +js_String(JSContext *cx, unsigned argc, js::Value *vp); +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" 2 + + + + +class JSString; +class JSDependentString; +class JSUndependedString; +class JSExtensibleString; +class JSExternalString; +class JSLinearString; +class JSFixedString; +class JSRope; +class JSAtom; + +namespace js { + +class StaticStrings; +class PropertyName; + + +static const size_t UINT32_CHAR_BUFFER_LENGTH = sizeof("4294967295") - 1; + +} +# 131 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" +class JSString : public js::gc::Cell +{ + protected: + static const size_t NUM_INLINE_CHARS = 2 * sizeof(void *) / sizeof(jschar); + + + struct Data + { + size_t lengthAndFlags; + union { + const jschar *chars; + JSString *left; + } u1; + union { + jschar inlineStorage[NUM_INLINE_CHARS]; + struct { + union { + JSLinearString *base; + JSString *right; + size_t capacity; + const JSStringFinalizer *externalFinalizer; + } u2; + union { + JSString *parent; + size_t reserved; + } u3; + } s; + }; + } d; + + public: +# 200 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" + static const size_t LENGTH_SHIFT = 4; + static const size_t FLAGS_MASK = (((uint32_t)1 << (LENGTH_SHIFT)) - 1); + + static const size_t ROPE_BIT = ((uint32_t)1 << (0)); + + static const size_t DEPENDENT_FLAGS = ((uint32_t)1 << (1)); + static const size_t EXTENSIBLE_FLAGS = ((uint32_t)1 << (2)); + static const size_t FIXED_FLAGS = ((uint32_t)1 << (1)) | ((uint32_t)1 << (2)); + static const size_t UNDEPENDED_FLAGS = ((uint32_t)1 << (1)) | ((uint32_t)1 << (3)); + + static const size_t ATOM_MASK = (((uint32_t)1 << (3)) - 1); + static const size_t NON_STATIC_ATOM_FLAGS = ((uint32_t)1 << (3)); + + static const size_t MAX_LENGTH = ((uint32_t)1 << (32 - LENGTH_SHIFT)) - 1; + + size_t buildLengthAndFlags(size_t length, size_t flags) { + do { } while(0); + do { } while(0); + return (length << LENGTH_SHIFT) | flags; + } + + + + + + + static inline bool validateLength(JSContext *cx, size_t length); + + static void staticAsserts() { + typedef int moz_static_assert57[((8 * 4) >= 32) ? 1 : -1]; + typedef int + moz_static_assert58 +# 230 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" + [(((JSString::MAX_LENGTH << JSString::LENGTH_SHIFT) >> JSString::LENGTH_SHIFT) == JSString::MAX_LENGTH) ? 1 : -1] + ; + typedef int + moz_static_assert59 +# 232 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" + [(sizeof(JSString) == __builtin_offsetof (JSString, d.inlineStorage) + NUM_INLINE_CHARS * sizeof(jschar)) ? 1 : -1] + ; + typedef int + moz_static_assert60 +# 234 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" + [(__builtin_offsetof (JSString, d.u1.chars) == __builtin_offsetof (js::shadow::Atom, chars)) ? 1 : -1] + ; + } + + + friend class JSRope; + + public: + + + __attribute__((always_inline)) inline + size_t length() const { + return d.lengthAndFlags >> LENGTH_SHIFT; + } + + __attribute__((always_inline)) inline + bool empty() const { + return d.lengthAndFlags <= FLAGS_MASK; + } + + + + + + + inline const jschar *getChars(JSContext *cx); + inline const jschar *getCharsZ(JSContext *cx); + + + + inline JSLinearString *ensureLinear(JSContext *cx); + inline JSFlatString *ensureFlat(JSContext *cx); + inline JSFixedString *ensureFixed(JSContext *cx); + + + + __attribute__((always_inline)) inline + bool isRope() const { + bool rope = d.lengthAndFlags & ROPE_BIT; + do { } while (0); + return rope; + } + + __attribute__((always_inline)) inline + JSRope &asRope() const { + do { } while(0); + return *(JSRope *)this; + } + + __attribute__((always_inline)) inline + bool isLinear() const { + return !(d.lengthAndFlags & ROPE_BIT); + } + + __attribute__((always_inline)) inline + JSLinearString &asLinear() const { + do { } while(0); + return *(JSLinearString *)this; + } + + __attribute__((always_inline)) inline + bool isDependent() const { + return (d.lengthAndFlags & FLAGS_MASK) == DEPENDENT_FLAGS; + } + + __attribute__((always_inline)) inline + JSDependentString &asDependent() const { + do { } while(0); + return *(JSDependentString *)this; + } + + __attribute__((always_inline)) inline + bool isFlat() const { + return isLinear() && !isDependent(); + } + + __attribute__((always_inline)) inline + JSFlatString &asFlat() const { + do { } while(0); + return *(JSFlatString *)this; + } + + __attribute__((always_inline)) inline + bool isExtensible() const { + return (d.lengthAndFlags & FLAGS_MASK) == EXTENSIBLE_FLAGS; + } + + __attribute__((always_inline)) inline + JSExtensibleString &asExtensible() const { + do { } while(0); + return *(JSExtensibleString *)this; + } + + + bool isShort() const; + bool isFixed() const; + bool isInline() const; + + __attribute__((always_inline)) inline + JSFixedString &asFixed() const { + do { } while(0); + return *(JSFixedString *)this; + } + + bool isExternal() const; + + __attribute__((always_inline)) inline + JSExternalString &asExternal() const { + do { } while(0); + return *(JSExternalString *)this; + } + + __attribute__((always_inline)) inline + bool isUndepended() const { + return (d.lengthAndFlags & FLAGS_MASK) == UNDEPENDED_FLAGS; + } + + __attribute__((always_inline)) inline + bool isAtom() const { + return !(d.lengthAndFlags & ATOM_MASK); + } + + __attribute__((always_inline)) inline + JSAtom &asAtom() const { + do { } while(0); + return *(JSAtom *)this; + } + + + + inline bool hasBase() const { + typedef int moz_static_assert61[((DEPENDENT_FLAGS | ((uint32_t)1 << (3))) == UNDEPENDED_FLAGS) ? 1 : -1]; + return (d.lengthAndFlags & (((uint32_t)1 << (3)) - 1)) == DEPENDENT_FLAGS; + } + + inline JSLinearString *base() const { + do { } while(0); + return d.s.u2.base; + } + + inline void markBase(JSTracer *trc); + + + + inline void finalize(js::FreeOp *fop); + + + + size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf); + + + + static size_t offsetOfLengthAndFlags() { + return __builtin_offsetof (JSString, d.lengthAndFlags); + } + + static size_t offsetOfChars() { + return __builtin_offsetof (JSString, d.u1.chars); + } + + static inline void writeBarrierPre(JSString *str); + static inline void writeBarrierPost(JSString *str, void *addr); + static inline bool needWriteBarrierPre(JSCompartment *comp); + static inline void readBarrier(JSString *str); + + static inline js::ThingRootKind rootKind() { return js::THING_ROOT_STRING; } + + + + + + + private: + JSString() ; + JSString(const JSString &other) ; + void operator=(const JSString &other) ; +}; + +class JSRope : public JSString +{ + enum UsingBarrier { WithIncrementalBarrier, NoBarrier }; + template + JSFlatString *flattenInternal(JSContext *cx); + + friend class JSString; + JSFlatString *flatten(JSContext *cx); + + void init(JSString *left, JSString *right, size_t length); + + public: + static inline JSRope *new_(JSContext *cx, js::HandleString left, + js::HandleString right, size_t length); + + inline JSString *leftChild() const { + do { } while(0); + return d.u1.left; + } + + inline JSString *rightChild() const { + do { } while(0); + return d.s.u2.right; + } + + inline void markChildren(JSTracer *trc); +}; + +typedef int moz_static_assert62[(sizeof(JSRope) == sizeof(JSString)) ? 1 : -1]; + +class JSLinearString : public JSString +{ + friend class JSString; + + + JSLinearString *ensureLinear(JSContext *cx) ; + bool isLinear() const ; + JSLinearString &asLinear() const ; + + public: + __attribute__((always_inline)) inline + const jschar *chars() const { + do { } while(0); + return d.u1.chars; + } +}; + +typedef int moz_static_assert63[(sizeof(JSLinearString) == sizeof(JSString)) ? 1 : -1]; + +class JSDependentString : public JSLinearString +{ + friend class JSString; + JSFixedString *undepend(JSContext *cx); + + void init(JSLinearString *base, const jschar *chars, size_t length); + + + bool isDependent() const ; + JSDependentString &asDependent() const ; + + public: + static inline JSDependentString *new_(JSContext *cx, JSLinearString *base, + const jschar *chars, size_t length); +}; + +typedef int moz_static_assert64[(sizeof(JSDependentString) == sizeof(JSString)) ? 1 : -1]; + +class JSFlatString : public JSLinearString +{ + + JSFlatString *ensureFlat(JSContext *cx) ; + bool isFlat() const ; + JSFlatString &asFlat() const ; + + bool isIndexSlow(uint32_t *indexp) const; + + public: + __attribute__((always_inline)) inline + const jschar *charsZ() const { + do { } while(0); + return chars(); + } + + + + + + + + inline bool isIndex(uint32_t *indexp) const { + const jschar *s = chars(); + return ((((unsigned)(*s)) - '0') <= 9) && isIndexSlow(indexp); + } + + + + + + + inline js::PropertyName *toPropertyName(JSContext *cx); + + inline void finalize(js::FreeOp *fop); +}; + +typedef int moz_static_assert65[(sizeof(JSFlatString) == sizeof(JSString)) ? 1 : -1]; + +class JSExtensibleString : public JSFlatString +{ + + bool isExtensible() const ; + JSExtensibleString &asExtensible() const ; + + public: + __attribute__((always_inline)) inline + size_t capacity() const { + do { } while(0); + return d.s.u2.capacity; + } +}; + +typedef int moz_static_assert66[(sizeof(JSExtensibleString) == sizeof(JSString)) ? 1 : -1]; + +class JSFixedString : public JSFlatString +{ + void init(const jschar *chars, size_t length); + + + JSFlatString *ensureFixed(JSContext *cx) ; + bool isFixed() const ; + JSFixedString &asFixed() const ; + + public: + static inline JSFixedString *new_(JSContext *cx, const jschar *chars, size_t length); + + + + + + + inline JSAtom *morphAtomizedStringIntoAtom(); +}; + +typedef int moz_static_assert67[(sizeof(JSFixedString) == sizeof(JSString)) ? 1 : -1]; + +class JSInlineString : public JSFixedString +{ + static const size_t MAX_INLINE_LENGTH = NUM_INLINE_CHARS - 1; + + public: + static inline JSInlineString *new_(JSContext *cx); + + inline jschar *init(size_t length); + + inline void resetLength(size_t length); + + static bool lengthFits(size_t length) { + return length <= MAX_INLINE_LENGTH; + } + +}; + +typedef int moz_static_assert68[(sizeof(JSInlineString) == sizeof(JSString)) ? 1 : -1]; + +class JSShortString : public JSInlineString +{ + + static const size_t INLINE_EXTENSION_CHARS = sizeof(JSString::Data) / sizeof(jschar); + + static void staticAsserts() { + typedef int moz_static_assert69[(INLINE_EXTENSION_CHARS % js::gc::Cell::CellSize == 0) ? 1 : -1]; + typedef int + + moz_static_assert70 +# 582 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" + [(MAX_SHORT_LENGTH + 1 == (sizeof(JSShortString) - __builtin_offsetof (JSShortString, d.inlineStorage)) / sizeof(jschar)) ? 1 : -1] + + ; + } + + jschar inlineStorageExtension[INLINE_EXTENSION_CHARS]; + + public: + static inline JSShortString *new_(JSContext *cx); + + jschar *inlineStorageBeforeInit() { + return d.inlineStorage; + } + + inline void initAtOffsetInBuffer(const jschar *chars, size_t length); + + static const size_t MAX_SHORT_LENGTH = JSString::NUM_INLINE_CHARS + + INLINE_EXTENSION_CHARS + -1 ; + + static bool lengthFits(size_t length) { + return length <= MAX_SHORT_LENGTH; + } + + + + __attribute__((always_inline)) inline void finalize(js::FreeOp *fop); +}; + +typedef int moz_static_assert71[(sizeof(JSShortString) == 2 * sizeof(JSString)) ? 1 : -1]; + +class JSExternalString : public JSFixedString +{ + void init(const jschar *chars, size_t length, const JSStringFinalizer *fin); + + + bool isExternal() const ; + JSExternalString &asExternal() const ; + + public: + static inline JSExternalString *new_(JSContext *cx, const jschar *chars, size_t length, + const JSStringFinalizer *fin); + + const JSStringFinalizer *externalFinalizer() const { + do { } while(0); + return d.s.u2.externalFinalizer; + } + + + + inline void finalize(js::FreeOp *fop); +}; + +typedef int moz_static_assert72[(sizeof(JSExternalString) == sizeof(JSString)) ? 1 : -1]; + +class JSUndependedString : public JSFixedString +{ + + + + + +}; + +typedef int moz_static_assert73[(sizeof(JSUndependedString) == sizeof(JSString)) ? 1 : -1]; + +class JSAtom : public JSFixedString +{ + + bool isAtom() const ; + JSAtom &asAtom() const ; + + public: + + inline js::PropertyName *asPropertyName(); + + inline void finalize(js::FreeOp *fop); + + + + +}; + +typedef int moz_static_assert74[(sizeof(JSAtom) == sizeof(JSString)) ? 1 : -1]; + +class JSInlineAtom : public JSInlineString +{ + + + + +}; + +typedef int moz_static_assert75[(sizeof(JSInlineAtom) == sizeof(JSInlineString)) ? 1 : -1]; + +class JSShortAtom : public JSShortString +{ + + + + +}; + +typedef int moz_static_assert76[(sizeof(JSShortAtom) == sizeof(JSShortString)) ? 1 : -1]; + +namespace js { + +class StaticStrings +{ + private: + + static const size_t SMALL_CHAR_LIMIT = 128U; + static const size_t NUM_SMALL_CHARS = 64U; + + static const size_t INT_STATIC_LIMIT = 256U; + + JSAtom *length2StaticTable[NUM_SMALL_CHARS * NUM_SMALL_CHARS]; + JSAtom *intStaticTable[INT_STATIC_LIMIT]; + + public: + + static const size_t UNIT_STATIC_LIMIT = 256U; + JSAtom *unitStaticTable[UNIT_STATIC_LIMIT]; + + StaticStrings() { + PodArrayZero(unitStaticTable); + PodArrayZero(length2StaticTable); + PodArrayZero(intStaticTable); + } + + bool init(JSContext *cx); + void trace(JSTracer *trc); + + static inline bool hasUint(uint32_t u); + inline JSAtom *getUint(uint32_t u); + + static inline bool hasInt(int32_t i); + inline JSAtom *getInt(int32_t i); + + static inline bool hasUnit(jschar c); + JSAtom *getUnit(jschar c); + + + inline JSLinearString *getUnitStringForElement(JSContext *cx, JSString *str, size_t index); + + static bool isStatic(JSAtom *atom); + + + inline JSAtom *lookup(const jschar *chars, size_t length); + + private: + typedef uint8_t SmallChar; + static const SmallChar INVALID_SMALL_CHAR = -1; + + static inline bool fitsInSmallChar(jschar c); + + static const SmallChar toSmallChar[]; + + JSAtom *getLength2(jschar c1, jschar c2); + JSAtom *getLength2(uint32_t u); +}; +# 759 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" +class PropertyName : public JSAtom +{}; + +typedef int moz_static_assert77[(sizeof(PropertyName) == sizeof(JSString)) ? 1 : -1]; + +static __attribute__((always_inline)) inline jsid +NameToId(PropertyName *name) +{ + return NON_INTEGER_ATOM_TO_JSID(name); +} + +typedef HeapPtr HeapPtrAtom; + +} + + + +__attribute__((always_inline)) inline const jschar * +JSString::getChars(JSContext *cx) +{ + if (JSLinearString *str = ensureLinear(cx)) + return str->chars(); + return __null; +} + +__attribute__((always_inline)) inline const jschar * +JSString::getCharsZ(JSContext *cx) +{ + if (JSFlatString *str = ensureFlat(cx)) + return str->chars(); + return __null; +} + +__attribute__((always_inline)) inline JSLinearString * +JSString::ensureLinear(JSContext *cx) +{ + return isLinear() + ? &asLinear() + : asRope().flatten(cx); +} + +__attribute__((always_inline)) inline JSFlatString * +JSString::ensureFlat(JSContext *cx) +{ + return isFlat() + ? &asFlat() + : isDependent() + ? asDependent().undepend(cx) + : asRope().flatten(cx); +} + +__attribute__((always_inline)) inline JSFixedString * +JSString::ensureFixed(JSContext *cx) +{ + if (!ensureFlat(cx)) + return __null; + if (isExtensible()) + d.lengthAndFlags = buildLengthAndFlags(length(), FIXED_FLAGS); + return &asFixed(); +} + +inline js::PropertyName * +JSAtom::asPropertyName() +{ + + + + + return static_cast(this); +} +# 34 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 2 + +namespace js { + +class AutoPropDescArrayRooter; +class BaseProxyHandler; +class CallObject; +struct GCMarker; +struct NativeIterator; + +namespace mjit { class Compiler; } + +inline JSObject * +CastAsObject(PropertyOp op) +{ + return (__extension__ (JSObject *) (size_t) (op)); +} + +inline JSObject * +CastAsObject(StrictPropertyOp op) +{ + return (__extension__ (JSObject *) (size_t) (op)); +} + +inline Value +CastAsObjectJsval(PropertyOp op) +{ + return ObjectOrNullValue(CastAsObject(op)); +} + +inline Value +CastAsObjectJsval(StrictPropertyOp op) +{ + return ObjectOrNullValue(CastAsObject(op)); +} + + + + + + + +#define JS_PSG(name,getter,flags) {name, 0, (flags) | JSPROP_SHARED | JSPROP_NATIVE_ACCESSORS, (JSPropertyOp)getter, NULL} + + +#define JS_PSGS(name,getter,setter,flags) {name, 0, (flags) | JSPROP_SHARED | JSPROP_NATIVE_ACCESSORS, (JSPropertyOp)getter, (JSStrictPropertyOp)setter} + + +#define JS_PS_END {0, 0, 0, 0, 0} + + + +typedef Vector PropDescArray; + + + + + + + +namespace baseops { + + + + + + +extern __attribute__((visibility("default"))) JSBool +LookupProperty(JSContext *cx, HandleObject obj, HandleId id, JSObject **objp, + JSProperty **propp); + +inline bool +LookupProperty(JSContext *cx, HandleObject obj, PropertyName *name, + JSObject **objp, JSProperty **propp) +{ + return LookupProperty(cx, obj, RootedId(cx, NameToId(name)), objp, propp); +} + +extern __attribute__((visibility("default"))) JSBool +LookupElement(JSContext *cx, HandleObject obj, uint32_t index, + JSObject **objp, JSProperty **propp); + +extern JSBool +DefineProperty(JSContext *cx, HandleObject obj, HandleId id, const js::Value *value, + JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs); + +extern JSBool +DefineElement(JSContext *cx, HandleObject obj, uint32_t index, const js::Value *value, + JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs); + +extern JSBool +GetProperty(JSContext *cx, HandleObject obj, HandleObject receiver, HandleId id, js::Value *vp); + +extern JSBool +GetElement(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index, js::Value *vp); + +inline JSBool +GetProperty(JSContext *cx, HandleObject obj, HandleId id, js::Value *vp) +{ + return GetProperty(cx, obj, obj, id, vp); +} + +inline JSBool +GetElement(JSContext *cx, HandleObject obj, uint32_t index, js::Value *vp) +{ + return GetElement(cx, obj, obj, index, vp); +} + +extern JSBool +GetPropertyDefault(JSContext *cx, HandleObject obj, HandleId id, const Value &def, Value *vp); + +extern JSBool +SetPropertyHelper(JSContext *cx, HandleObject obj, HandleId id, unsigned defineHow, + Value *vp, JSBool strict); + +inline bool +SetPropertyHelper(JSContext *cx, HandleObject obj, PropertyName *name, unsigned defineHow, + Value *vp, JSBool strict) +{ + return SetPropertyHelper(cx, obj, RootedId(cx, NameToId(name)), defineHow, vp, strict); +} + +extern JSBool +SetElementHelper(JSContext *cx, HandleObject obj, uint32_t index, unsigned defineHow, + Value *vp, JSBool strict); + +extern JSType +TypeOf(JSContext *cx, HandleObject obj); + +extern JSBool +GetAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp); + +extern JSBool +SetAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp); + +extern JSBool +GetElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp); + +extern JSBool +SetElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp); + +extern JSBool +DeleteProperty(JSContext *cx, HandleObject obj, HandlePropertyName name, Value *rval, JSBool strict); + +extern JSBool +DeleteElement(JSContext *cx, HandleObject obj, uint32_t index, Value *rval, JSBool strict); + +extern JSBool +DeleteSpecial(JSContext *cx, HandleObject obj, HandleSpecialId sid, Value *rval, JSBool strict); + +extern JSBool +DeleteGeneric(JSContext *cx, HandleObject obj, HandleId id, Value *rval, JSBool strict); + +} + + +extern JSBool +DefaultValue(JSContext *cx, HandleObject obj, JSType hint, Value *vp); + +extern Class ArrayClass; +extern Class ArrayBufferClass; +extern Class BlockClass; +extern Class BooleanClass; +extern Class CallableObjectClass; +extern Class DataViewClass; +extern Class DateClass; +extern Class ErrorClass; +extern Class ElementIteratorClass; +extern Class GeneratorClass; +extern Class IteratorClass; +extern Class JSONClass; +extern Class MathClass; +extern Class NumberClass; +extern Class NormalArgumentsObjectClass; +extern Class ObjectClass; +extern Class ProxyClass; +extern Class RegExpClass; +extern Class RegExpStaticsClass; +extern Class SlowArrayClass; +extern Class StopIterationClass; +extern Class StringClass; +extern Class StrictArgumentsObjectClass; +extern Class WeakMapClass; +extern Class WithClass; +extern Class XMLFilterClass; + +class ArgumentsObject; +class ArrayBufferObject; +class BlockObject; +class BooleanObject; +class ClonedBlockObject; +class DataViewObject; +class DebugScopeObject; +class DeclEnvObject; +class ElementIteratorObject; +class GlobalObject; +class NestedScopeObject; +class NewObjectCache; +class NormalArgumentsObject; +class NumberObject; +class ScopeObject; +class StaticBlockObject; +class StrictArgumentsObject; +class StringObject; +class RegExpObject; +class WithObject; + +} +# 252 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" +struct JSObject : public js::ObjectImpl +{ + private: + friend struct js::Shape; + friend struct js::GCMarker; + friend class js::NewObjectCache; + + + void makeLazyType(JSContext *cx); + + public: + + + + + bool setLastProperty(JSContext *cx, const js::Shape *shape); + + + inline void setLastPropertyInfallible(const js::Shape *shape); + + + static inline JSObject *create(JSContext *cx, + js::gc::AllocKind kind, + js::HandleShape shape, + js::HandleTypeObject type, + js::HeapSlot *slots); + + + static inline JSObject *createDenseArray(JSContext *cx, + js::gc::AllocKind kind, + js::HandleShape shape, + js::HandleTypeObject type, + uint32_t length); + + + + + + + inline void removeLastProperty(JSContext *cx); + inline bool canRemoveLastProperty(); + + + + + + bool setSlotSpan(JSContext *cx, uint32_t span); + + inline bool nativeContains(JSContext *cx, jsid id); + inline bool nativeContains(JSContext *cx, const js::Shape &shape); + + + static const uint32_t NELEMENTS_LIMIT = ((uint32_t)1 << (28)); + + public: + inline bool setDelegate(JSContext *cx); + + inline bool isBoundFunction() const; + + + + + + + inline bool isSystem() const; + inline bool setSystem(JSContext *cx); + + inline bool hasSpecialEquality() const; + + inline bool watched() const; + inline bool setWatched(JSContext *cx); + + + inline bool isVarObj(); + inline bool setVarObj(JSContext *cx); + + + + + + + + inline bool hasUncacheableProto() const; + inline bool setUncacheableProto(JSContext *cx); + + bool generateOwnShape(JSContext *cx, js::Shape *newShape = __null) { + return replaceWithNewEquivalentShape(cx, lastProperty(), newShape); + } + + private: + js::Shape *replaceWithNewEquivalentShape(JSContext *cx, js::Shape *existingShape, + js::Shape *newShape = __null); + + enum GenerateShape { + GENERATE_NONE, + GENERATE_SHAPE + }; + + bool setFlag(JSContext *cx, uint32_t flag, + GenerateShape generateShape = GENERATE_NONE); + + public: + inline bool nativeEmpty() const; + + bool shadowingShapeChange(JSContext *cx, const js::Shape &shape); + + + inline bool isIndexed() const; + + inline uint32_t propertyCount() const; + + inline bool hasShapeTable() const; + + inline size_t computedSizeOfThisSlotsElements() const; + + inline void sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf, + size_t *slotsSize, size_t *elementsSize, + size_t *miscSize) const; + + static const uint32_t MAX_FIXED_SLOTS = 16; + + public: + + + + + inline bool isFixedSlot(size_t slot); + + + inline size_t dynamicSlotIndex(size_t slot); + + + inline const js::HeapSlot *getRawSlots(); + + + + + + + bool growSlots(JSContext *cx, uint32_t oldCount, uint32_t newCount); + void shrinkSlots(JSContext *cx, uint32_t oldCount, uint32_t newCount); + + bool hasDynamicSlots() const { return slots != __null; } + + protected: + inline bool updateSlotsForSpan(JSContext *cx, size_t oldSpan, size_t newSpan); + + public: + + + + + inline void prepareSlotRangeForOverwrite(size_t start, size_t end); + inline void prepareElementRangeForOverwrite(size_t start, size_t end); + + void rollbackProperties(JSContext *cx, uint32_t slotSpan); + + inline void nativeSetSlot(unsigned slot, const js::Value &value); + inline void nativeSetSlotWithType(JSContext *cx, const js::Shape *shape, const js::Value &value); + + inline const js::Value &getReservedSlot(unsigned index) const; + inline js::HeapSlot &getReservedSlotRef(unsigned index); + inline void initReservedSlot(unsigned index, const js::Value &v); + inline void setReservedSlot(unsigned index, const js::Value &v); + + + + + + inline bool setSingletonType(JSContext *cx); + + inline js::types::TypeObject *getType(JSContext *cx); + + const js::HeapPtr &typeFromGC() const { + + return type_; + } + + inline void setType(js::types::TypeObject *newType); + + js::types::TypeObject *getNewType(JSContext *cx, JSFunction *fun = __null); +# 443 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" + inline bool setIteratedSingleton(JSContext *cx); + + + + + + bool setNewTypeUnknown(JSContext *cx); + + + bool splicePrototype(JSContext *cx, JSObject *proto); + + + + + + bool shouldSplicePrototype(JSContext *cx); +# 487 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" + inline JSObject *getParent() const; + static bool setParent(JSContext *cx, js::HandleObject obj, js::HandleObject newParent); + + + + + + + inline JSObject *enclosingScope(); + + inline js::GlobalObject &global() const; + + + inline JSPrincipals *principals(JSContext *cx); + + + inline bool clearType(JSContext *cx); + bool clearParent(JSContext *cx); + + + + + + private: + enum ImmutabilityType { SEAL, FREEZE }; + + + + + + + + bool sealOrFreeze(JSContext *cx, ImmutabilityType it); + + bool isSealedOrFrozen(JSContext *cx, ImmutabilityType it, bool *resultp); + + static inline unsigned getSealedOrFrozenAttributes(unsigned attrs, ImmutabilityType it); + + public: + bool preventExtensions(JSContext *cx); + + + inline bool seal(JSContext *cx) { return sealOrFreeze(cx, SEAL); } + + bool freeze(JSContext *cx) { return sealOrFreeze(cx, FREEZE); } + + bool isSealed(JSContext *cx, bool *resultp) { return isSealedOrFrozen(cx, SEAL, resultp); } + bool isFrozen(JSContext *cx, bool *resultp) { return isSealedOrFrozen(cx, FREEZE, resultp); } + + + + inline bool ensureElements(JSContext *cx, unsigned cap); + bool growElements(JSContext *cx, unsigned cap); + void shrinkElements(JSContext *cx, unsigned cap); + + inline js::ElementIteratorObject *asElementIterator(); + + + + + + bool allocateSlowArrayElements(JSContext *cx); + + inline uint32_t getArrayLength() const; + inline void setArrayLength(JSContext *cx, uint32_t length); + + inline uint32_t getDenseArrayCapacity(); + inline void setDenseArrayLength(uint32_t length); + inline void setDenseArrayInitializedLength(uint32_t length); + inline void ensureDenseArrayInitializedLength(JSContext *cx, unsigned index, unsigned extra); + inline void setDenseArrayElement(unsigned idx, const js::Value &val); + inline void initDenseArrayElement(unsigned idx, const js::Value &val); + inline void setDenseArrayElementWithType(JSContext *cx, unsigned idx, const js::Value &val); + inline void initDenseArrayElementWithType(JSContext *cx, unsigned idx, const js::Value &val); + inline void copyDenseArrayElements(unsigned dstStart, const js::Value *src, unsigned count); + inline void initDenseArrayElements(unsigned dstStart, const js::Value *src, unsigned count); + inline void moveDenseArrayElements(unsigned dstStart, unsigned srcStart, unsigned count); + inline void moveDenseArrayElementsUnbarriered(unsigned dstStart, unsigned srcStart, unsigned count); + inline bool denseArrayHasInlineSlots() const; + + + inline void markDenseArrayNotPacked(JSContext *cx); +# 577 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" + enum EnsureDenseResult { ED_OK, ED_FAILED, ED_SPARSE }; + inline EnsureDenseResult ensureDenseArrayElements(JSContext *cx, unsigned index, unsigned extra); + + + + + + bool willBeSparseDenseArray(unsigned requiredCapacity, unsigned newElementsHint); + + static bool makeDenseArraySlow(JSContext *cx, js::HandleObject obj); + + + + + + + bool arrayGetOwnDataElement(JSContext *cx, size_t i, js::Value *vp); + + public: + + + + + static const uint32_t JSSLOT_DATE_UTC_TIME = 0; + + + + + + + static const uint32_t JSSLOT_DATE_COMPONENTS_START = 1; + + static const uint32_t JSSLOT_DATE_LOCAL_TIME = 1; + static const uint32_t JSSLOT_DATE_LOCAL_YEAR = 2; + static const uint32_t JSSLOT_DATE_LOCAL_MONTH = 3; + static const uint32_t JSSLOT_DATE_LOCAL_DATE = 4; + static const uint32_t JSSLOT_DATE_LOCAL_DAY = 5; + static const uint32_t JSSLOT_DATE_LOCAL_HOURS = 6; + static const uint32_t JSSLOT_DATE_LOCAL_MINUTES = 7; + static const uint32_t JSSLOT_DATE_LOCAL_SECONDS = 8; + + static const uint32_t DATE_CLASS_RESERVED_SLOTS = 9; + + inline const js::Value &getDateUTCTime() const; + inline void setDateUTCTime(const js::Value &pthis); + + + + + + friend struct JSFunction; + + inline JSFunction *toFunction(); + inline const JSFunction *toFunction() const; + + public: + + + + + static const uint32_t ITER_CLASS_NFIXED_SLOTS = 1; + + inline js::NativeIterator *getNativeIterator() const; + inline void setNativeIterator(js::NativeIterator *); +# 653 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" + private: + static const uint32_t JSSLOT_NAME_PREFIX = 0; + static const uint32_t JSSLOT_NAME_URI = 1; + + static const uint32_t JSSLOT_NAMESPACE_DECLARED = 2; + + static const uint32_t JSSLOT_QNAME_LOCAL_NAME = 2; + + public: + static const uint32_t NAMESPACE_CLASS_RESERVED_SLOTS = 3; + static const uint32_t QNAME_CLASS_RESERVED_SLOTS = 3; + + inline JSLinearString *getNamePrefix() const; + inline jsval getNamePrefixVal() const; + inline void setNamePrefix(JSLinearString *prefix); + inline void clearNamePrefix(); + + inline JSLinearString *getNameURI() const; + inline jsval getNameURIVal() const; + inline void setNameURI(JSLinearString *uri); + + inline jsval getNamespaceDeclared() const; + inline void setNamespaceDeclared(jsval decl); + + inline JSAtom *getQNameLocalName() const; + inline jsval getQNameLocalNameVal() const; + inline void setQNameLocalName(JSAtom *name); + + + + + inline bool isCallable(); + + inline void finish(js::FreeOp *fop); + __attribute__((always_inline)) inline void finalize(js::FreeOp *fop); + + inline bool hasProperty(JSContext *cx, js::HandleId id, bool *foundp, unsigned flags = 0); +# 698 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" + bool allocSlot(JSContext *cx, uint32_t *slotp); + void freeSlot(JSContext *cx, uint32_t slot); + + public: + static bool reportReadOnly(JSContext *cx, jsid id, unsigned report = 0x0); + bool reportNotConfigurable(JSContext* cx, jsid id, unsigned report = 0x0); + bool reportNotExtensible(JSContext *cx, unsigned report = 0x0); + + + + + + + + bool callMethod(JSContext *cx, js::HandleId id, unsigned argc, js::Value *argv, js::Value *vp); + + private: + js::Shape *getChildProperty(JSContext *cx, js::Shape *parent, js::StackShape &child); + + protected: + + + + + + + + js::Shape *addPropertyInternal(JSContext *cx, jsid id, + JSPropertyOp getter, JSStrictPropertyOp setter, + uint32_t slot, unsigned attrs, + unsigned flags, int shortid, js::Shape **spp, + bool allowDictionary); + + private: + bool toDictionaryMode(JSContext *cx); + + struct TradeGutsReserved; + static bool ReserveForTradeGuts(JSContext *cx, JSObject *a, JSObject *b, + TradeGutsReserved &reserved); + + static void TradeGuts(JSContext *cx, JSObject *a, JSObject *b, + TradeGutsReserved &reserved); + + public: + + js::Shape *addProperty(JSContext *cx, jsid id, + JSPropertyOp getter, JSStrictPropertyOp setter, + uint32_t slot, unsigned attrs, + unsigned flags, int shortid, bool allowDictionary = true); + + + js::Shape *addDataProperty(JSContext *cx, jsid id, uint32_t slot, unsigned attrs) { + do { } while(0); + return addProperty(cx, id, __null, __null, slot, attrs, 0, 0); + } + + + js::Shape *putProperty(JSContext *cx, jsid id, + JSPropertyOp getter, JSStrictPropertyOp setter, + uint32_t slot, unsigned attrs, + unsigned flags, int shortid); + inline js::Shape * + putProperty(JSContext *cx, js::PropertyName *name, + JSPropertyOp getter, JSStrictPropertyOp setter, + uint32_t slot, unsigned attrs, unsigned flags, int shortid) { + return putProperty(cx, js::NameToId(name), getter, setter, slot, attrs, flags, shortid); + } + + + js::Shape *changeProperty(JSContext *cx, js::Shape *shape, unsigned attrs, unsigned mask, + JSPropertyOp getter, JSStrictPropertyOp setter); + + inline bool changePropertyAttributes(JSContext *cx, js::Shape *shape, unsigned attrs); + + + bool removeProperty(JSContext *cx, jsid id); + + + void clear(JSContext *cx); + + inline JSBool lookupGeneric(JSContext *cx, js::HandleId id, JSObject **objp, JSProperty **propp); + inline JSBool lookupProperty(JSContext *cx, js::PropertyName *name, JSObject **objp, JSProperty **propp); + inline JSBool lookupElement(JSContext *cx, uint32_t index, + JSObject **objp, JSProperty **propp); + inline JSBool lookupSpecial(JSContext *cx, js::SpecialId sid, + JSObject **objp, JSProperty **propp); + + inline JSBool defineGeneric(JSContext *cx, js::HandleId id, const js::Value &value, + JSPropertyOp getter = JS_PropertyStub, + JSStrictPropertyOp setter = JS_StrictPropertyStub, + unsigned attrs = 0x01); + inline JSBool defineProperty(JSContext *cx, js::PropertyName *name, const js::Value &value, + JSPropertyOp getter = JS_PropertyStub, + JSStrictPropertyOp setter = JS_StrictPropertyStub, + unsigned attrs = 0x01); + + inline JSBool defineElement(JSContext *cx, uint32_t index, const js::Value &value, + JSPropertyOp getter = JS_PropertyStub, + JSStrictPropertyOp setter = JS_StrictPropertyStub, + unsigned attrs = 0x01); + inline JSBool defineSpecial(JSContext *cx, js::SpecialId sid, const js::Value &value, + JSPropertyOp getter = JS_PropertyStub, + JSStrictPropertyOp setter = JS_StrictPropertyStub, + unsigned attrs = 0x01); + + inline JSBool getGeneric(JSContext *cx, js::HandleObject receiver, js::HandleId id, js::Value *vp); + inline JSBool getProperty(JSContext *cx, js::HandleObject receiver, js::PropertyName *name, + js::Value *vp); + inline JSBool getElement(JSContext *cx, js::HandleObject receiver, uint32_t index, js::Value *vp); + + + inline JSBool getElementIfPresent(JSContext *cx, js::HandleObject receiver, uint32_t index, + js::Value *vp, bool *present); + inline JSBool getSpecial(JSContext *cx, js::HandleObject receiver, js::SpecialId sid, js::Value *vp); + + inline JSBool getGeneric(JSContext *cx, js::HandleId id, js::Value *vp); + inline JSBool getProperty(JSContext *cx, js::PropertyName *name, js::Value *vp); + inline JSBool getElement(JSContext *cx, uint32_t index, js::Value *vp); + inline JSBool getSpecial(JSContext *cx, js::SpecialId sid, js::Value *vp); + + inline JSBool setGeneric(JSContext *cx, js::HandleId id, js::Value *vp, JSBool strict); + inline JSBool setProperty(JSContext *cx, js::PropertyName *name, js::Value *vp, JSBool strict); + inline JSBool setElement(JSContext *cx, uint32_t index, js::Value *vp, JSBool strict); + inline JSBool setSpecial(JSContext *cx, js::SpecialId sid, js::Value *vp, JSBool strict); + + JSBool nonNativeSetProperty(JSContext *cx, js::HandleId id, js::Value *vp, JSBool strict); + JSBool nonNativeSetElement(JSContext *cx, uint32_t index, js::Value *vp, JSBool strict); + + inline JSBool getGenericAttributes(JSContext *cx, js::HandleId id, unsigned *attrsp); + inline JSBool getPropertyAttributes(JSContext *cx, js::PropertyName *name, unsigned *attrsp); + inline JSBool getElementAttributes(JSContext *cx, uint32_t index, unsigned *attrsp); + inline JSBool getSpecialAttributes(JSContext *cx, js::SpecialId sid, unsigned *attrsp); + + inline JSBool setGenericAttributes(JSContext *cx, js::HandleId id, unsigned *attrsp); + inline JSBool setPropertyAttributes(JSContext *cx, js::PropertyName *name, unsigned *attrsp); + inline JSBool setElementAttributes(JSContext *cx, uint32_t index, unsigned *attrsp); + inline JSBool setSpecialAttributes(JSContext *cx, js::SpecialId sid, unsigned *attrsp); + + inline bool deleteProperty(JSContext *cx, js::HandlePropertyName name, js::Value *rval, bool strict); + inline bool deleteElement(JSContext *cx, uint32_t index, js::Value *rval, bool strict); + inline bool deleteSpecial(JSContext *cx, js::HandleSpecialId sid, js::Value *rval, bool strict); + bool deleteByValue(JSContext *cx, const js::Value &property, js::Value *rval, bool strict); + + inline bool enumerate(JSContext *cx, JSIterateOp iterop, js::Value *statep, jsid *idp); + inline bool defaultValue(JSContext *cx, JSType hint, js::Value *vp); + inline JSType typeOf(JSContext *cx); + inline JSObject *thisObject(JSContext *cx); + + static bool thisObject(JSContext *cx, const js::Value &v, js::Value *vp); + + bool swap(JSContext *cx, JSObject *other); + + inline void initArrayClass(); +# 881 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" + inline bool isArguments() const; + inline bool isArrayBuffer() const; + inline bool isDataView() const; + inline bool isDate() const; + inline bool isElementIterator() const; + inline bool isError() const; + inline bool isFunction() const; + inline bool isGenerator() const; + inline bool isGlobal() const; + inline bool isIterator() const; + inline bool isObject() const; + inline bool isPrimitive() const; + inline bool isProxy() const; + inline bool isRegExp() const; + inline bool isRegExpStatics() const; + inline bool isScope() const; + inline bool isScript() const; + inline bool isStopIteration() const; + inline bool isTypedArray() const; + inline bool isWeakMap() const; + + inline bool isNamespace() const; + inline bool isQName() const; + inline bool isXML() const; + inline bool isXMLId() const; + + + + inline bool isBlock() const; + inline bool isCall() const; + inline bool isDeclEnv() const; + inline bool isNestedScope() const; + inline bool isWith() const; + inline bool isClonedBlock() const; + inline bool isStaticBlock() const; + + + inline bool isBoolean() const; + inline bool isNumber() const; + inline bool isString() const; + + + inline bool isNormalArguments() const; + inline bool isStrictArguments() const; + + + inline bool isDebugScope() const; + inline bool isWrapper() const; + inline bool isFunctionProxy() const; + inline bool isCrossCompartmentWrapper() const; + + inline js::ArgumentsObject &asArguments(); + inline js::ArrayBufferObject &asArrayBuffer(); + inline const js::ArgumentsObject &asArguments() const; + inline js::BlockObject &asBlock(); + inline js::BooleanObject &asBoolean(); + inline js::CallObject &asCall(); + inline js::ClonedBlockObject &asClonedBlock(); + inline js::DataViewObject &asDataView(); + inline js::DeclEnvObject &asDeclEnv(); + inline js::DebugScopeObject &asDebugScope(); + inline js::GlobalObject &asGlobal(); + inline js::NestedScopeObject &asNestedScope(); + inline js::NormalArgumentsObject &asNormalArguments(); + inline js::NumberObject &asNumber(); + inline js::RegExpObject &asRegExp(); + inline js::ScopeObject &asScope(); + inline js::StrictArgumentsObject &asStrictArguments(); + inline js::StaticBlockObject &asStaticBlock(); + inline js::StringObject &asString(); + inline js::WithObject &asWith(); + + static inline js::ThingRootKind rootKind() { return js::THING_ROOT_OBJECT; } + + + + + + private: + static void staticAsserts() { + typedef int + moz_static_assert78 +# 961 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" + [(sizeof(JSObject) == sizeof(js::shadow::Object)) ? 1 : -1] + ; + typedef int + moz_static_assert79 +# 963 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" + [(sizeof(JSObject) == sizeof(js::ObjectImpl)) ? 1 : -1] + ; + typedef int + moz_static_assert80 +# 965 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" + [(sizeof(JSObject) % sizeof(js::Value) == 0) ? 1 : -1] + ; + } + + JSObject() ; + JSObject(const JSObject &other) ; + void operator=(const JSObject &other) ; +}; + + + + + + +static __attribute__((always_inline)) inline bool +operator==(const JSObject &lhs, const JSObject &rhs) +{ + return &lhs == &rhs; +} + +static __attribute__((always_inline)) inline bool +operator!=(const JSObject &lhs, const JSObject &rhs) +{ + return &lhs != &rhs; +} + +struct JSObject_Slots2 : JSObject { js::Value fslots[2]; }; +struct JSObject_Slots4 : JSObject { js::Value fslots[4]; }; +struct JSObject_Slots8 : JSObject { js::Value fslots[8]; }; +struct JSObject_Slots12 : JSObject { js::Value fslots[12]; }; +struct JSObject_Slots16 : JSObject { js::Value fslots[16]; }; + +#define JSSLOT_FREE(clasp) JSCLASS_RESERVED_SLOTS(clasp) + +class JSValueArray { + public: + jsval *array; + size_t length; + + JSValueArray(jsval *v, size_t c) : array(v), length(c) {} +}; + +class ValueArray { + public: + js::Value *array; + size_t length; + + ValueArray(js::Value *v, size_t c) : array(v), length(c) {} +}; + + +extern bool +js_EnterSharpObject(JSContext *cx, js::HandleObject obj, JSIdArray **idap, bool *alreadySeen, bool *isSharp); + +extern void +js_LeaveSharpObject(JSContext *cx, JSIdArray **idap); + + + + + +extern void +js_TraceSharpMap(JSTracer *trc, JSSharpObjectMap *map); + +extern JSBool +js_HasOwnPropertyHelper(JSContext *cx, js::LookupGenericOp lookup, unsigned argc, + js::Value *vp); + +extern JSBool +js_HasOwnProperty(JSContext *cx, js::LookupGenericOp lookup, js::HandleObject obj, js::HandleId id, + JSObject **objp, JSProperty **propp); + +extern JSBool +js_PropertyIsEnumerable(JSContext *cx, js::HandleObject obj, js::HandleId id, js::Value *vp); + + +extern JSPropertySpec object_props[]; + + + + +extern JSFunctionSpec object_methods[]; +extern JSFunctionSpec object_static_methods[]; + +namespace js { + +bool +IsStandardClassResolved(JSObject *obj, js::Class *clasp); + +void +MarkStandardClassInitializedNoProto(JSObject *obj, js::Class *clasp); + +} + + + + +extern const char js_watch_str[]; +extern const char js_unwatch_str[]; +extern const char js_hasOwnProperty_str[]; +extern const char js_isPrototypeOf_str[]; +extern const char js_propertyIsEnumerable_str[]; + + +extern const char js_defineGetter_str[]; +extern const char js_defineSetter_str[]; +extern const char js_lookupGetter_str[]; +extern const char js_lookupSetter_str[]; + + +extern JSBool +js_PopulateObject(JSContext *cx, js::HandleObject newborn, JSObject *props); + + + + +extern JSBool +js_GetClassObject(JSContext *cx, JSObject *obj, JSProtoKey key, + JSObject **objp); + + + + + +extern JSProtoKey +js_IdentifyClassPrototype(JSObject *obj); + + + + + +extern JSBool +js_FindClassObject(JSContext *cx, JSObject *start, JSProtoKey key, + js::Value *vp, js::Class *clasp = __null); + + + +extern JSObject * +js_CreateThisForFunctionWithProto(JSContext *cx, js::HandleObject callee, JSObject *proto); + + +extern JSObject * +js_CreateThisForFunction(JSContext *cx, js::HandleObject callee, bool newType); + + +extern JSObject * +js_CreateThis(JSContext *cx, js::Class *clasp, JSObject *callee); + + + + + +extern js::Shape * +js_AddNativeProperty(JSContext *cx, js::HandleObject obj, jsid id, + JSPropertyOp getter, JSStrictPropertyOp setter, uint32_t slot, + unsigned attrs, unsigned flags, int shortid); + +extern JSBool +js_DefineOwnProperty(JSContext *cx, js::HandleObject obj, js::HandleId id, + const js::Value &descriptor, JSBool *bp); + +namespace js { + + + + +const unsigned DNP_CACHE_RESULT = 1; +const unsigned DNP_DONT_PURGE = 2; +const unsigned DNP_UNQUALIFIED = 4; + + +const unsigned DNP_SKIP_TYPE = 8; + + + + +extern const Shape * +DefineNativeProperty(JSContext *cx, HandleObject obj, HandleId id, const Value &value, + PropertyOp getter, StrictPropertyOp setter, unsigned attrs, + unsigned flags, int shortid, unsigned defineHow = 0); + +inline const Shape * +DefineNativeProperty(JSContext *cx, HandleObject obj, PropertyName *name, const Value &value, + PropertyOp getter, StrictPropertyOp setter, unsigned attrs, + unsigned flags, int shortid, unsigned defineHow = 0) +{ + return DefineNativeProperty(cx, obj, RootedId(cx, NameToId(name)), + value, getter, setter, attrs, flags, + shortid, defineHow); +} + + + + +extern bool +LookupPropertyWithFlags(JSContext *cx, HandleObject obj, HandleId id, unsigned flags, + JSObject **objp, JSProperty **propp); + +inline bool +LookupPropertyWithFlags(JSContext *cx, HandleObject obj, PropertyName *name, unsigned flags, + JSObject **objp, JSProperty **propp) +{ + return LookupPropertyWithFlags(cx, obj, RootedId(cx, NameToId(name)), flags, objp, propp); +} +# 1178 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" +extern bool +DefineProperty(JSContext *cx, js::HandleObject obj, + js::HandleId id, const PropDesc &desc, bool throwError, + bool *rval); + + + + + +extern bool +ReadPropertyDescriptors(JSContext *cx, JSObject *props, bool checkAccessors, + AutoIdVector *ids, AutoPropDescArrayRooter *descs); + + + + + +static const unsigned RESOLVE_INFER = 0xffff; + + + + +extern bool +FindPropertyHelper(JSContext *cx, HandlePropertyName name, + bool cacheResult, HandleObject scopeChain, + JSObject **objp, JSObject **pobjp, JSProperty **propp); + + + + + +extern bool +FindProperty(JSContext *cx, HandlePropertyName name, HandleObject scopeChain, + JSObject **objp, JSObject **pobjp, JSProperty **propp); + +extern JSObject * +FindIdentifierBase(JSContext *cx, HandleObject scopeChain, HandlePropertyName name); + +} + +extern JSObject * +js_FindVariableScope(JSContext *cx, JSFunction **funp); + + +const unsigned JSGET_CACHE_RESULT = 1; + + + + + + + +extern JSBool +js_NativeGet(JSContext *cx, JSObject *obj, JSObject *pobj, const js::Shape *shape, unsigned getHow, + js::Value *vp); + +extern JSBool +js_NativeSet(JSContext *cx, JSObject *obj, const js::Shape *shape, bool added, + bool strict, js::Value *vp); + +namespace js { + +bool +GetPropertyHelper(JSContext *cx, HandleObject obj, jsid id, uint32_t getHow, Value *vp); + +inline bool +GetPropertyHelper(JSContext *cx, HandleObject obj, PropertyName *name, uint32_t getHow, Value *vp) +{ + return GetPropertyHelper(cx, obj, NameToId(name), getHow, vp); +} + +bool +GetOwnPropertyDescriptor(JSContext *cx, HandleObject obj, HandleId id, PropertyDescriptor *desc); + +bool +GetOwnPropertyDescriptor(JSContext *cx, HandleObject obj, HandleId id, Value *vp); + +bool +NewPropertyDescriptorObject(JSContext *cx, const PropertyDescriptor *desc, Value *vp); + +extern JSBool +GetMethod(JSContext *cx, HandleObject obj, HandleId id, unsigned getHow, Value *vp); + +inline bool +GetMethod(JSContext *cx, HandleObject obj, PropertyName *name, unsigned getHow, Value *vp) +{ + return GetMethod(cx, obj, RootedId(cx, NameToId(name)), getHow, vp); +} + + + + + +extern bool +HasDataProperty(JSContext *cx, HandleObject obj, jsid id, Value *vp); + +inline bool +HasDataProperty(JSContext *cx, HandleObject obj, PropertyName *name, Value *vp) +{ + return HasDataProperty(cx, obj, NameToId(name), vp); +} + +extern JSBool +CheckAccess(JSContext *cx, JSObject *obj, HandleId id, JSAccessMode mode, + js::Value *vp, unsigned *attrsp); + +} + +extern bool +js_IsDelegate(JSContext *cx, JSObject *obj, const js::Value &v); + + + + + +extern JSBool +js_PrimitiveToObject(JSContext *cx, js::Value *vp); + +extern JSBool +js_ValueToObjectOrNull(JSContext *cx, const js::Value &v, JSObject **objp); + + +extern JSObject * +js_ValueToNonNullObject(JSContext *cx, const js::Value &v); + +namespace js { + + + + + +extern JSObject * +ToObjectSlow(JSContext *cx, Value *vp); + +__attribute__((always_inline)) inline JSObject * +ToObject(JSContext *cx, Value *vp) +{ + if (vp->isObject()) + return &vp->toObject(); + return ToObjectSlow(cx, vp); +} + + +inline JSObject * +ValueToObject(JSContext *cx, const Value &v) +{ + if (v.isObject()) + return &v.toObject(); + return js_ValueToNonNullObject(cx, v); +} + +} + +extern void +js_GetObjectSlotName(JSTracer *trc, char *buf, size_t bufsize); + +extern bool +js_ClearNative(JSContext *cx, JSObject *obj); + +extern JSBool +js_ReportGetterOnlyAssignment(JSContext *cx); + +extern unsigned +js_InferFlags(JSContext *cx, unsigned defaultFlags); + + +JSBool +js_Object(JSContext *cx, unsigned argc, js::Value *vp); +# 1354 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" +extern __attribute__((visibility("default"))) JSBool +js_GetClassPrototype(JSContext *cx, JSObject *scope, JSProtoKey protoKey, + JSObject **protop, js::Class *clasp = __null); + +namespace js { + +extern bool +SetProto(JSContext *cx, HandleObject obj, HandleObject proto, bool checkForCycles); + +extern JSString * +obj_toStringHelper(JSContext *cx, JSObject *obj); + +extern JSBool +eval(JSContext *cx, unsigned argc, Value *vp); + + + + + + +extern bool +DirectEval(JSContext *cx, const CallArgs &args); + + + + + +extern bool +IsBuiltinEvalForScope(JSObject *scopeChain, const js::Value &v); + + +extern bool +IsAnyBuiltinEval(JSFunction *fun); + + +extern JSPrincipals * +PrincipalsForCompiledCode(const CallReceiver &call, JSContext *cx); + +extern JSObject * +NonNullObject(JSContext *cx, const Value &v); + +extern const char * +InformalValueTypeName(const Value &v); + +inline void +DestroyIdArray(FreeOp *fop, JSIdArray *ida); + +extern bool +GetFirstArgumentAsObject(JSContext *cx, unsigned argc, Value *vp, const char *method, JSObject **objp); + + +extern bool +Throw(JSContext *cx, jsid id, unsigned errorNumber); + +extern bool +Throw(JSContext *cx, JSObject *obj, unsigned errorNumber); +# 1424 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" +extern bool +CheckDefineProperty(JSContext *cx, HandleObject obj, HandleId id, HandleValue value, + PropertyOp getter, StrictPropertyOp setter, unsigned attrs); + +} +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspropertytree.h" 1 + + + + + + + +#define jspropertytree_h___ + + + + + +namespace js { + +struct ShapeHasher { + typedef js::Shape *Key; + typedef js::StackShape Lookup; + + static inline HashNumber hash(const Lookup &l); + static inline bool match(Key k, const Lookup &l); +}; + +typedef HashSet KidsHash; + +class KidsPointer { + private: + enum { + SHAPE = 0, + HASH = 1, + TAG = 1 + }; + + uintptr_t w; + + public: + bool isNull() const { return !w; } + void setNull() { w = 0; } + + bool isShape() const { return (w & TAG) == SHAPE && !isNull(); } + js::Shape *toShape() const { + do { } while(0); + return reinterpret_cast(w & ~uintptr_t(TAG)); + } + void setShape(js::Shape *shape) { + do { } while(0); + do { } while(0); + w = reinterpret_cast(shape) | SHAPE; + } + + bool isHash() const { return (w & TAG) == HASH; } + KidsHash *toHash() const { + do { } while(0); + return reinterpret_cast(w & ~uintptr_t(TAG)); + } + void setHash(KidsHash *hash) { + do { } while(0); + do { } while(0); + w = reinterpret_cast(hash) | HASH; + } + + + + +}; + +class PropertyTree +{ + friend struct ::JSFunction; + + JSCompartment *compartment; + + bool insertChild(JSContext *cx, js::Shape *parent, js::Shape *child); + + PropertyTree(); + + public: + enum { MAX_HEIGHT = 128 }; + + PropertyTree(JSCompartment *comp) + : compartment(comp) + { + } + + js::Shape *newShape(JSContext *cx); + js::Shape *getChild(JSContext *cx, Shape *parent, uint32_t nfixed, const StackShape &child); + + + + + +}; + +} +# 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" 2 +# 98 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" +namespace js { + + +static const uint32_t SHAPE_INVALID_SLOT = ((uint32_t)1 << (24)) - 1; +static const uint32_t SHAPE_MAXIMUM_SLOT = ((uint32_t)1 << (24)) - 2; + + + + + +struct ShapeTable { + static const uint32_t HASH_BITS = tl::BitSize::result; + static const uint32_t MIN_ENTRIES = 7; + static const uint32_t MIN_SIZE_LOG2 = 4; + static const uint32_t MIN_SIZE = ((uint32_t)1 << (MIN_SIZE_LOG2)); + + int hashShift; + + uint32_t entryCount; + uint32_t removedCount; + uint32_t freelist; + + + js::Shape **entries; + + ShapeTable(uint32_t nentries) + : hashShift(HASH_BITS - MIN_SIZE_LOG2), + entryCount(nentries), + removedCount(0), + freelist(SHAPE_INVALID_SLOT) + { + + } + + ~ShapeTable() { + js::UnwantedForeground::free_(entries); + } + + + uint32_t capacity() const { return ((uint32_t)1 << (HASH_BITS - hashShift)); } + + + static size_t sizeOfEntries(size_t cap) { return cap * sizeof(Shape *); } + + + + + + size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const { + return mallocSizeOf(this) + mallocSizeOf(entries); + } + + + bool needsToGrow() const { + uint32_t size = capacity(); + return entryCount + removedCount >= size - (size >> 2); + } + + + + + + + bool grow(JSContext *cx); + + + + + + + bool init(JSRuntime *rt, js::Shape *lastProp); + bool change(int log2Delta, JSContext *cx); + js::Shape **search(jsid id, bool adding); +}; + +} + +struct JSObject; + +namespace js { + +class PropertyTree; + + + + +#define JSPROP_SHADOWABLE JSPROP_INDEX +# 234 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" +class UnownedBaseShape; + +class BaseShape : public js::gc::Cell +{ + public: + friend struct Shape; + friend struct StackBaseShape; + friend struct StackShape; + + enum Flag { + + OWNED_SHAPE = 0x1, + + + HAS_GETTER_OBJECT = 0x2, + HAS_SETTER_OBJECT = 0x4, + + + + + + + + EXTENSIBLE_PARENTS = 0x8, + DELEGATE = 0x10, + SYSTEM = 0x20, + NOT_EXTENSIBLE = 0x40, + INDEXED = 0x80, + BOUND_FUNCTION = 0x100, + VAROBJ = 0x200, + WATCHED = 0x400, + ITERATED_SINGLETON = 0x800, + NEW_TYPE_UNKNOWN = 0x1000, + UNCACHEABLE_PROTO = 0x2000, + + OBJECT_FLAG_MASK = 0x3ff8 + }; + + private: + Class *clasp; + HeapPtrObject parent; + uint32_t flags; + uint32_t slotSpan_; + + + union { + js::PropertyOp rawGetter; + JSObject *getterObj; + + }; + + union { + js::StrictPropertyOp rawSetter; + JSObject *setterObj; + + }; + + + HeapPtr unowned_; + + + ShapeTable *table_; + + BaseShape(const BaseShape &base) ; + + public: + void finalize(FreeOp *fop); + + inline BaseShape(Class *clasp, JSObject *parent, uint32_t objectFlags); + inline BaseShape(Class *clasp, JSObject *parent, uint32_t objectFlags, + uint8_t attrs, PropertyOp rawGetter, StrictPropertyOp rawSetter); + inline BaseShape(const StackBaseShape &base); + + + ~BaseShape(); + + inline BaseShape &operator=(const BaseShape &other); + + bool isOwned() const { return !!(flags & OWNED_SHAPE); } + + inline bool matchesGetterSetter(PropertyOp rawGetter, + StrictPropertyOp rawSetter) const; + + inline void adoptUnowned(UnownedBaseShape *other); + inline void setOwned(UnownedBaseShape *unowned); + + JSObject *getObjectParent() const { return parent; } + uint32_t getObjectFlags() const { return flags & OBJECT_FLAG_MASK; } + + bool hasGetterObject() const { return !!(flags & HAS_GETTER_OBJECT); } + JSObject *getterObject() const { do { } while(0); return getterObj; } + + bool hasSetterObject() const { return !!(flags & HAS_SETTER_OBJECT); } + JSObject *setterObject() const { do { } while(0); return setterObj; } + + bool hasTable() const { do { } while (0); return table_ != __null; } + ShapeTable &table() const { do { } while(0); return *table_; } + void setTable(ShapeTable *table) { do { } while(0); table_ = table; } + + uint32_t slotSpan() const { do { } while(0); return slotSpan_; } + void setSlotSpan(uint32_t slotSpan) { do { } while(0); slotSpan_ = slotSpan; } + + + static UnownedBaseShape *getUnowned(JSContext *cx, const StackBaseShape &base); + + + inline UnownedBaseShape *unowned(); + + + inline UnownedBaseShape *baseUnowned(); + + + inline UnownedBaseShape *toUnowned(); + + + inline void assertConsistency(); + + + static inline size_t offsetOfClass() { return __builtin_offsetof (BaseShape, clasp); } + static inline size_t offsetOfParent() { return __builtin_offsetof (BaseShape, parent); } + static inline size_t offsetOfFlags() { return __builtin_offsetof (BaseShape, flags); } + + static inline void writeBarrierPre(BaseShape *shape); + static inline void writeBarrierPost(BaseShape *shape, void *addr); + static inline void readBarrier(BaseShape *shape); + + static inline ThingRootKind rootKind() { return THING_ROOT_BASE_SHAPE; } + + inline void markChildren(JSTracer *trc); + + private: + static void staticAsserts() { + typedef int moz_static_assert81[(__builtin_offsetof (BaseShape, clasp) == __builtin_offsetof (js::shadow::BaseShape, clasp)) ? 1 : -1]; + } +}; + +class UnownedBaseShape : public BaseShape {}; + +UnownedBaseShape * +BaseShape::unowned() +{ + return isOwned() ? baseUnowned() : toUnowned(); +} + +UnownedBaseShape * +BaseShape::toUnowned() +{ + do { } while(0); return static_cast(this); +} + +UnownedBaseShape * +BaseShape::baseUnowned() +{ + do { } while(0); return unowned_; +} + + +struct StackBaseShape +{ + typedef const StackBaseShape *Lookup; + + uint32_t flags; + Class *clasp; + JSObject *parent; + PropertyOp rawGetter; + StrictPropertyOp rawSetter; + + StackBaseShape(BaseShape *base) + : flags(base->flags & BaseShape::OBJECT_FLAG_MASK), + clasp(base->clasp), + parent(base->parent), + rawGetter(__null), + rawSetter(__null) + {} + + StackBaseShape(Class *clasp, JSObject *parent, uint32_t objectFlags) + : flags(objectFlags), + clasp(clasp), + parent(parent), + rawGetter(__null), + rawSetter(__null) + {} + + inline StackBaseShape(Shape *shape); + + inline void updateGetterSetter(uint8_t attrs, + PropertyOp rawGetter, + StrictPropertyOp rawSetter); + + static inline HashNumber hash(const StackBaseShape *lookup); + static inline bool match(UnownedBaseShape *key, const StackBaseShape *lookup); + + class AutoRooter : private AutoGCRooter + { + public: + explicit AutoRooter(JSContext *cx, const StackBaseShape *base_ + ) + : AutoGCRooter(cx, STACKBASESHAPE), base(base_), skip(cx, base_) + { + do { } while (0); + } + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + const StackBaseShape *base; + SkipRoot skip; + + }; +}; + +typedef HashSet, + StackBaseShape, + SystemAllocPolicy> BaseShapeSet; + +struct Shape : public js::gc::Cell +{ + friend struct ::JSObject; + friend struct ::JSFunction; + friend class js::Bindings; + friend class js::ObjectImpl; + friend class js::PropertyTree; + friend class js::StaticBlockObject; + friend struct js::StackShape; + friend struct js::StackBaseShape; + + protected: + HeapPtrBaseShape base_; + HeapId propid_; + + enum SlotInfo + { + + FIXED_SLOTS_MAX = 0x1f, + FIXED_SLOTS_SHIFT = 27, + FIXED_SLOTS_MASK = uint32_t(FIXED_SLOTS_MAX << FIXED_SLOTS_SHIFT), + + + + + + + + LINEAR_SEARCHES_MAX = 0x7, + LINEAR_SEARCHES_SHIFT = 24, + LINEAR_SEARCHES_MASK = LINEAR_SEARCHES_MAX << LINEAR_SEARCHES_SHIFT, + + + + + + + + SLOT_MASK = ((uint32_t)1 << (24)) - 1 + } __attribute__((packed)); + + uint32_t slotInfo; + uint8_t attrs; + uint8_t flags; + int16_t shortid_; + + HeapPtrShape parent; + + union { + KidsPointer kids; + + HeapPtrShape *listp; + + + + }; + + static inline Shape *search(JSContext *cx, Shape *start, jsid id, + Shape ***pspp, bool adding = false); + + + + + + inline void removeFromDictionary(JSObject *obj); + inline void insertIntoDictionary(HeapPtrShape *dictp); + + inline void initDictionaryShape(const StackShape &child, uint32_t nfixed, + HeapPtrShape *dictp); + + Shape *getChildBinding(JSContext *cx, const StackShape &child); + + + static Shape *replaceLastProperty(JSContext *cx, const StackBaseShape &base, + JSObject *proto, Shape *shape); + + bool hashify(JSContext *cx); + void handoffTableTo(Shape *newShape); + + inline void setParent(js::Shape *p); + + bool ensureOwnBaseShape(JSContext *cx) { + if (base()->isOwned()) + return true; + return makeOwnBaseShape(cx); + } + + bool makeOwnBaseShape(JSContext *cx); + + public: + bool hasTable() const { return base()->hasTable(); } + js::ShapeTable &table() const { return base()->table(); } + + void sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf, + size_t *propTableSize, size_t *kidsSize) const { + *propTableSize = hasTable() ? table().sizeOfIncludingThis(mallocSizeOf) : 0; + *kidsSize = !inDictionary() && kids.isHash() + ? kids.toHash()->sizeOfIncludingThis(mallocSizeOf) + : 0; + } + + bool isNative() const { + do { } while(0); + return !(flags & NON_NATIVE); + } + + const HeapPtrShape &previous() const { + return parent; + } + + class Range { + protected: + friend struct Shape; + const Shape *cursor; + + public: + Range(const Shape *shape) : cursor(shape) { } + + bool empty() const { + return cursor->isEmptyShape(); + } + + const Shape &front() const { + do { } while(0); + return *cursor; + } + + void popFront() { + do { } while(0); + cursor = cursor->parent; + } + + class AutoRooter : private AutoGCRooter + { + public: + explicit AutoRooter(JSContext *cx, Range *r_ + ) + : AutoGCRooter(cx, SHAPERANGE), r(r_), skip(cx, r_) + { + do { } while (0); + } + + friend void AutoGCRooter::trace(JSTracer *trc); + void trace(JSTracer *trc); + + private: + Range *r; + SkipRoot skip; + + }; + }; + + Range all() const { + return Range(this); + } + + Class *getObjectClass() const { return base()->clasp; } + JSObject *getObjectParent() const { return base()->parent; } + + static Shape *setObjectParent(JSContext *cx, JSObject *obj, JSObject *proto, Shape *last); + static Shape *setObjectFlag(JSContext *cx, BaseShape::Flag flag, JSObject *proto, Shape *last); + + uint32_t getObjectFlags() const { return base()->getObjectFlags(); } + bool hasObjectFlag(BaseShape::Flag flag) const { + do { } while(0); + return !!(base()->flags & flag); + } + + protected: + + + + + + enum { + + NON_NATIVE = 0x01, + + + IN_DICTIONARY = 0x02, + + UNUSED_BITS = 0x3C + }; + + + Shape(const StackShape &other, uint32_t nfixed); + + + Shape(UnownedBaseShape *base, uint32_t nfixed); + + + Shape(const Shape &other) ; + + + + + + + + bool hasMissingSlot() const { return maybeSlot() == SHAPE_INVALID_SLOT; } + + public: + + enum { + HAS_SHORTID = 0x40, + PUBLIC_FLAGS = HAS_SHORTID + }; + + bool inDictionary() const { return (flags & IN_DICTIONARY) != 0; } + unsigned getFlags() const { return flags & PUBLIC_FLAGS; } + bool hasShortID() const { return (flags & HAS_SHORTID) != 0; } + + PropertyOp getter() const { return base()->rawGetter; } + bool hasDefaultGetter() const { return !base()->rawGetter; } + PropertyOp getterOp() const { do { } while(0); return base()->rawGetter; } + JSObject *getterObject() const { do { } while(0); return base()->getterObj; } + + + Value getterValue() const { + do { } while(0); + return base()->getterObj ? js::ObjectValue(*base()->getterObj) : js::UndefinedValue(); + } + + Value getterOrUndefined() const { + return (hasGetterValue() && base()->getterObj) + ? ObjectValue(*base()->getterObj) + : UndefinedValue(); + } + + StrictPropertyOp setter() const { return base()->rawSetter; } + bool hasDefaultSetter() const { return !base()->rawSetter; } + StrictPropertyOp setterOp() const { do { } while(0); return base()->rawSetter; } + JSObject *setterObject() const { do { } while(0); return base()->setterObj; } + + + Value setterValue() const { + do { } while(0); + return base()->setterObj ? js::ObjectValue(*base()->setterObj) : js::UndefinedValue(); + } + + Value setterOrUndefined() const { + return (hasSetterValue() && base()->setterObj) + ? ObjectValue(*base()->setterObj) + : UndefinedValue(); + } + + void update(js::PropertyOp getter, js::StrictPropertyOp setter, uint8_t attrs); + + inline bool matches(const Shape *other) const; + inline bool matches(const StackShape &other) const; + inline bool matchesParamsAfterId(BaseShape *base, + uint32_t aslot, unsigned aattrs, unsigned aflags, + int ashortid) const; + + bool get(JSContext* cx, HandleObject receiver, JSObject *obj, JSObject *pobj, js::Value* vp) const; + bool set(JSContext* cx, HandleObject obj, bool strict, js::Value* vp) const; + + BaseShape *base() const { return base_; } + + bool hasSlot() const { return (attrs & 0x40) == 0; } + uint32_t slot() const { do { } while(0); return maybeSlot(); } + uint32_t maybeSlot() const { return slotInfo & SLOT_MASK; } + + bool isEmptyShape() const { + do { } while (0); + return JSID_IS_EMPTY(propid_); + } + + uint32_t slotSpan() const { + do { } while(0); + uint32_t free = (((getObjectClass())->flags >> 8) & (((uint32_t)1 << (8)) - 1)); + return hasMissingSlot() ? free : Max(free, maybeSlot() + 1); + } + + void setSlot(uint32_t slot) { + do { } while(0); + slotInfo = slotInfo & ~Shape::SLOT_MASK; + slotInfo = slotInfo | slot; + } + + uint32_t numFixedSlots() const { + return (slotInfo >> FIXED_SLOTS_SHIFT); + } + + void setNumFixedSlots(uint32_t nfixed) { + do { } while(0); + slotInfo = slotInfo & ~FIXED_SLOTS_MASK; + slotInfo = slotInfo | (nfixed << FIXED_SLOTS_SHIFT); + } + + uint32_t numLinearSearches() const { + return (slotInfo & LINEAR_SEARCHES_MASK) >> LINEAR_SEARCHES_SHIFT; + } + + void incrementNumLinearSearches() { + uint32_t count = numLinearSearches(); + do { } while(0); + slotInfo = slotInfo & ~LINEAR_SEARCHES_MASK; + slotInfo = slotInfo | ((count + 1) << LINEAR_SEARCHES_SHIFT); + } + + const HeapId &propid() const { + do { } while(0); + do { } while(0); + return propid_; + } + HeapId &propidRef() { do { } while(0); return propid_; } + + int16_t shortid() const { do { } while(0); return maybeShortid(); } + int16_t maybeShortid() const { return shortid_; } + + + + + + inline bool getUserId(JSContext *cx, jsid *idp) const; + + uint8_t attributes() const { return attrs; } + bool configurable() const { return (attrs & 0x04) == 0; } + bool enumerable() const { return (attrs & 0x01) != 0; } + bool writable() const { + + return (attrs & 0x02) == 0; + } + bool hasGetterValue() const { return attrs & 0x10; } + bool hasSetterValue() const { return attrs & 0x20; } + + bool isDataDescriptor() const { + return (attrs & (0x20 | 0x10)) == 0; + } + bool isAccessorDescriptor() const { + return (attrs & (0x20 | 0x10)) != 0; + } + + + + + + + + bool shadowable() const { + do { } while (0); + return hasSlot() || (attrs & 0x80); + } +# 837 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" + static Shape *setExtensibleParents(JSContext *cx, Shape *shape); + bool extensibleParents() const { return !!(base()->flags & BaseShape::EXTENSIBLE_PARENTS); } + + uint32_t entryCount() const { + if (hasTable()) + return table().entryCount; + + const js::Shape *shape = this; + uint32_t count = 0; + for (js::Shape::Range r = shape->all(); !r.empty(); r.popFront()) + ++count; + return count; + } + + bool isBigEnoughForAShapeTable() const { + do { } while(0); + const js::Shape *shape = this; + uint32_t count = 0; + for (js::Shape::Range r = shape->all(); !r.empty(); r.popFront()) { + ++count; + if (count >= ShapeTable::MIN_ENTRIES) + return true; + } + return false; + } + + + + + + + void finalize(FreeOp *fop); + void removeChild(js::Shape *child); + + static inline void writeBarrierPre(const Shape *shape); + static inline void writeBarrierPost(const Shape *shape, void *addr); + + + + + + + static inline void readBarrier(const Shape *shape); + + static inline ThingRootKind rootKind() { return THING_ROOT_SHAPE; } + + inline void markChildren(JSTracer *trc); + + + static inline size_t offsetOfBase() { return __builtin_offsetof (Shape, base_); } + + private: + static void staticAsserts() { + typedef int moz_static_assert82[(__builtin_offsetof (Shape, base_) == __builtin_offsetof (js::shadow::Shape, base)) ? 1 : -1]; + typedef int moz_static_assert83[(__builtin_offsetof (Shape, slotInfo) == __builtin_offsetof (js::shadow::Shape, slotInfo)) ? 1 : -1]; + typedef int moz_static_assert84[(FIXED_SLOTS_SHIFT == js::shadow::Shape::FIXED_SLOTS_SHIFT) ? 1 : -1]; + } +}; + +class AutoRooterGetterSetter +{ + class Inner : private AutoGCRooter + { + public: + Inner(JSContext *cx, uint8_t attrs, + PropertyOp *pgetter_, StrictPropertyOp *psetter_) + : AutoGCRooter(cx, GETTERSETTER), attrs(attrs), + pgetter(pgetter_), psetter(psetter_), + getterRoot(cx, pgetter_), setterRoot(cx, psetter_) + {} + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + uint8_t attrs; + PropertyOp *pgetter; + StrictPropertyOp *psetter; + SkipRoot getterRoot, setterRoot; + }; + + public: + explicit AutoRooterGetterSetter(JSContext *cx, uint8_t attrs, + PropertyOp *pgetter, StrictPropertyOp *psetter + ) + { + if (attrs & (0x10 | 0x20)) + inner.construct(cx, attrs, pgetter, psetter); + do { } while (0); + } + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + Maybe inner; + +}; + +struct EmptyShape : public js::Shape +{ + EmptyShape(UnownedBaseShape *base, uint32_t nfixed); + + + + + + static Shape *getInitialShape(JSContext *cx, Class *clasp, JSObject *proto, + JSObject *parent, gc::AllocKind kind, uint32_t objectFlags = 0); + + + + + + + static void insertInitialShape(JSContext *cx, Shape *shape, JSObject *proto); +}; + + + + + +struct InitialShapeEntry +{ + + + + + + ReadBarriered shape; + + + + + + JSObject *proto; + + + struct Lookup { + Class *clasp; + JSObject *proto; + JSObject *parent; + uint32_t nfixed; + uint32_t baseFlags; + Lookup(Class *clasp, JSObject *proto, JSObject *parent, uint32_t nfixed, + uint32_t baseFlags) + : clasp(clasp), proto(proto), parent(parent), + nfixed(nfixed), baseFlags(baseFlags) + {} + }; + + inline InitialShapeEntry(); + inline InitialShapeEntry(const ReadBarriered &shape, JSObject *proto); + + inline Lookup getLookup(); + + static inline HashNumber hash(const Lookup &lookup); + static inline bool match(const InitialShapeEntry &key, const Lookup &lookup); +}; + +typedef HashSet InitialShapeSet; + +struct StackShape +{ + UnownedBaseShape *base; + jsid propid; + uint32_t slot_; + uint8_t attrs; + uint8_t flags; + int16_t shortid; + + StackShape(UnownedBaseShape *base, jsid propid, uint32_t slot, + uint32_t nfixed, unsigned attrs, unsigned flags, int shortid) + : base(base), + propid(propid), + slot_(slot), + attrs(uint8_t(attrs)), + flags(uint8_t(flags)), + shortid(int16_t(shortid)) + { + do { } while(0); + do { } while(0); + do { } while(0); + } + + StackShape(const Shape *shape) + : base(shape->base()->unowned()), + propid(const_cast(shape)->propidRef()), + slot_(shape->slotInfo & Shape::SLOT_MASK), + attrs(shape->attrs), + flags(shape->flags), + shortid(shape->shortid_) + {} + + bool hasSlot() const { return (attrs & 0x40) == 0; } + bool hasMissingSlot() const { return maybeSlot() == SHAPE_INVALID_SLOT; } + + uint32_t slot() const { do { } while(0); return slot_; } + uint32_t maybeSlot() const { return slot_; } + + uint32_t slotSpan() const { + uint32_t free = (((base->clasp)->flags >> 8) & (((uint32_t)1 << (8)) - 1)); + return hasMissingSlot() ? free : (maybeSlot() + 1); + } + + void setSlot(uint32_t slot) { + do { } while(0); + slot_ = slot; + } + + inline HashNumber hash() const; + + class AutoRooter : private AutoGCRooter + { + public: + explicit AutoRooter(JSContext *cx, const StackShape *shape_ + ) + : AutoGCRooter(cx, STACKSHAPE), shape(shape_), skip(cx, shape_) + { + do { } while (0); + } + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + const StackShape *shape; + SkipRoot skip; + + }; + }; + +} + + +#define SHAPE_COLLISION (uintptr_t(1)) +#define SHAPE_REMOVED ((js::Shape *) SHAPE_COLLISION) + + +#define SHAPE_IS_FREE(shape) ((shape) == NULL) +#define SHAPE_IS_REMOVED(shape) ((shape) == SHAPE_REMOVED) +#define SHAPE_IS_LIVE(shape) ((shape) > SHAPE_REMOVED) +#define SHAPE_FLAG_COLLISION(spp,shape) (*(spp) = (js::Shape *) (uintptr_t(shape) | SHAPE_COLLISION)) + +#define SHAPE_HAD_COLLISION(shape) (uintptr_t(shape) & SHAPE_COLLISION) +#define SHAPE_FETCH(spp) SHAPE_CLEAR_COLLISION(*(spp)) + +#define SHAPE_CLEAR_COLLISION(shape) ((js::Shape *) (uintptr_t(shape) & ~SHAPE_COLLISION)) + + +#define SHAPE_STORE_PRESERVING_COLLISION(spp,shape) (*(spp) = (js::Shape *) (uintptr_t(shape) | SHAPE_HAD_COLLISION(*(spp)))) + + +namespace js { + +inline Shape * +Shape::search(JSContext *cx, Shape *start, jsid id, Shape ***pspp, bool adding) +{ + if (start->inDictionary()) { + *pspp = start->table().search(id, adding); + return ((js::Shape *) (uintptr_t(*(*pspp)) & ~(uintptr_t(1)))); + } + + *pspp = __null; + + if (start->hasTable()) { + Shape **spp = start->table().search(id, adding); + return ((js::Shape *) (uintptr_t(*(spp)) & ~(uintptr_t(1)))); + } + + if (start->numLinearSearches() == LINEAR_SEARCHES_MAX) { + if (start->isBigEnoughForAShapeTable()) { + RootedShape startRoot(cx, start); + RootedId idRoot(cx, id); + if (start->hashify(cx)) { + Shape **spp = start->table().search(id, adding); + return ((js::Shape *) (uintptr_t(*(spp)) & ~(uintptr_t(1)))); + } + start = startRoot; + id = idRoot; + } + + + + + do { } while(0); + } else { + start->incrementNumLinearSearches(); + } + + for (Shape *shape = start; shape; shape = shape->parent) { + if (shape->propidRef() == id) + return shape; + } + + return __null; +} +# 1150 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" +} + + + + + + +namespace JS { + template<> class AnchorPermitted { }; + template<> class AnchorPermitted { }; +} +# 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" +#define jsobjinlines_h___ + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsarray.h" 1 + + + + + + + +#define jsarray_h___ + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" 1 +# 11 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" +#define jscntxt_h___ +# 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclist.h" 1 + + + + + + +#define jsclist_h___ + + + + + + +typedef struct JSCListStr { + struct JSCListStr *next; + struct JSCListStr *prev; +} JSCList; + + + + +#define JS_INSERT_BEFORE(_e,_l) JS_BEGIN_MACRO (_e)->next = (_l); (_e)->prev = (_l)->prev; (_l)->prev->next = (_e); (_l)->prev = (_e); JS_END_MACRO +# 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclist.h" +#define JS_INSERT_AFTER(_e,_l) JS_BEGIN_MACRO (_e)->next = (_l)->next; (_e)->prev = (_l); (_l)->next->prev = (_e); (_l)->next = (_e); JS_END_MACRO +# 44 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclist.h" +#define JS_NEXT_LINK(_e) ((_e)->next) + + + + +#define JS_PREV_LINK(_e) ((_e)->prev) + + + + + +#define JS_APPEND_LINK(_e,_l) JS_INSERT_BEFORE(_e,_l) + + + + +#define JS_INSERT_LINK(_e,_l) JS_INSERT_AFTER(_e,_l) + + +#define JS_LIST_HEAD(_l) (_l)->next +#define JS_LIST_TAIL(_l) (_l)->prev + + + + +#define JS_REMOVE_LINK(_e) JS_BEGIN_MACRO (_e)->prev->next = (_e)->next; (_e)->next->prev = (_e)->prev; JS_END_MACRO +# 79 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclist.h" +#define JS_REMOVE_AND_INIT_LINK(_e) JS_BEGIN_MACRO (_e)->prev->next = (_e)->next; (_e)->next->prev = (_e)->prev; (_e)->next = (_e); (_e)->prev = (_e); JS_END_MACRO +# 91 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclist.h" +#define JS_CLIST_IS_EMPTY(_l) ((_l)->next == (_l)) + + + + + +#define JS_INIT_CLIST(_l) JS_BEGIN_MACRO (_l)->next = (_l); (_l)->prev = (_l); JS_END_MACRO + + + + + +#define JS_INIT_STATIC_CLIST(_l) {(_l), (_l)} +# 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" 1 + + + + + + + +#define jsgc_h___ + + + + +# 1 "/usr/include/setjmp.h" 1 3 4 +# 24 "/usr/include/setjmp.h" 3 4 +#define _SETJMP_H 1 + + + +extern "C" { + +# 1 "/usr/include/bits/setjmp.h" 1 3 4 +# 22 "/usr/include/bits/setjmp.h" 3 4 +#define _BITS_SETJMP_H 1 +# 35 "/usr/include/bits/setjmp.h" 3 4 +typedef int __jmp_buf[64] __attribute__((__aligned__ (8))); +# 31 "/usr/include/setjmp.h" 2 3 4 +# 1 "/usr/include/bits/sigset.h" 1 3 4 +# 32 "/usr/include/setjmp.h" 2 3 4 + + + +struct __jmp_buf_tag + { + + + + + __jmp_buf __jmpbuf; + int __mask_was_saved; + __sigset_t __saved_mask; + }; + + + + +typedef struct __jmp_buf_tag jmp_buf[1]; + + + +extern int setjmp (jmp_buf __env) throw (); + + + + + + +extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) throw (); + + + + +extern int _setjmp (struct __jmp_buf_tag __env[1]) throw (); + + + +#define setjmp(env) _setjmp (env) +# 78 "/usr/include/setjmp.h" 3 4 + + + + +extern void longjmp (struct __jmp_buf_tag __env[1], int __val) + throw () __attribute__ ((__noreturn__)); + + + + + + + +extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) + throw () __attribute__ ((__noreturn__)); + + + + + + + +typedef struct __jmp_buf_tag sigjmp_buf[1]; + + + +#define sigsetjmp(env,savemask) __sigsetjmp (env, savemask) + + + + + +extern void siglongjmp (sigjmp_buf __env, int __val) + throw () __attribute__ ((__noreturn__)); + + + + + +# 1 "/usr/include/bits/setjmp2.h" 1 3 4 +# 26 "/usr/include/bits/setjmp2.h" 3 4 +extern void longjmp (struct __jmp_buf_tag __env[1], int __val) throw () __asm__ ("" "__longjmp_chk") + + __attribute__ ((__noreturn__)); +extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) throw () __asm__ ("" "__longjmp_chk") + + __attribute__ ((__noreturn__)); +extern void siglongjmp (struct __jmp_buf_tag __env[1], int __val) throw () __asm__ ("" "__longjmp_chk") + + __attribute__ ((__noreturn__)); +# 118 "/usr/include/setjmp.h" 2 3 4 + + +} +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" 2 +# 23 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" 1 +# 42 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_VERSION_ECMA_3 148 +#define JS_VERSION_ECMA_3_TEST 149 +# 124 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_HAS_STR_HTML_HELPERS 1 +#define JS_HAS_OBJ_PROTO_PROP 1 +#define JS_HAS_OBJ_WATCHPOINT 1 +#define JS_HAS_TOSOURCE 1 +#define JS_HAS_CATCH_GUARD 1 +#define JS_HAS_UNEVAL 1 +#define JS_HAS_CONST 1 +#define JS_HAS_FUN_EXPR_STMT 1 +#define JS_HAS_NO_SUCH_METHOD 1 +#define JS_HAS_GENERATORS 1 +#define JS_HAS_BLOCK_SCOPE 1 +#define JS_HAS_DESTRUCTURING 2 +#define JS_HAS_GENERATOR_EXPRS 1 +#define JS_HAS_EXPR_CLOSURES 1 +# 146 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_HAS_NEW_GLOBAL_OBJECT 1 + + +#define JS_HAS_MAKE_SYSTEM_OBJECT 1 + + +#define JS_HAS_DESTRUCTURING_SHORTHAND (JS_HAS_DESTRUCTURING == 2) + + + + + +#define OLD_GETTER_SETTER_METHODS 1 + + +#define USE_NEW_OBJECT_REPRESENTATION 0 + + + + +#define NEW_OBJECT_REPRESENTATION_ONLY() MOZ_NOT_REACHED("don't call this! to be used in the new object representation") +# 24 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/BitArray.h" 1 +# 26 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Statistics.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Statistics.h" +#define jsgc_statistics_h___ + + + + + + + +struct JSCompartment; + +namespace js { +namespace gcstats { + +enum Phase { + PHASE_GC_BEGIN, + PHASE_WAIT_BACKGROUND_THREAD, + PHASE_PURGE, + PHASE_MARK, + PHASE_MARK_DISCARD_CODE, + PHASE_MARK_ROOTS, + PHASE_MARK_TYPES, + PHASE_MARK_DELAYED, + PHASE_MARK_WEAK, + PHASE_MARK_GRAY, + PHASE_MARK_GRAY_WEAK, + PHASE_FINALIZE_START, + PHASE_SWEEP, + PHASE_SWEEP_ATOMS, + PHASE_SWEEP_COMPARTMENTS, + PHASE_SWEEP_TABLES, + PHASE_SWEEP_OBJECT, + PHASE_SWEEP_STRING, + PHASE_SWEEP_SCRIPT, + PHASE_SWEEP_SHAPE, + PHASE_SWEEP_DISCARD_CODE, + PHASE_DISCARD_ANALYSIS, + PHASE_DISCARD_TI, + PHASE_FREE_TI_ARENA, + PHASE_SWEEP_TYPES, + PHASE_CLEAR_SCRIPT_ANALYSIS, + PHASE_FINALIZE_END, + PHASE_DESTROY, + PHASE_GC_END, + + PHASE_LIMIT +}; + +enum Stat { + STAT_NEW_CHUNK, + STAT_DESTROY_CHUNK, + + STAT_LIMIT +}; + +class StatisticsSerializer; + +struct Statistics { + Statistics(JSRuntime *rt); + ~Statistics(); + + void beginPhase(Phase phase); + void endPhase(Phase phase); + + void beginSlice(int collectedCount, int compartmentCount, gcreason::Reason reason); + void endSlice(); + + void reset(const char *reason) { slices.back().resetReason = reason; } + void nonincremental(const char *reason) { nonincrementalReason = reason; } + + void count(Stat s) { + do { } while(0); + counts[s]++; + } + + jschar *formatMessage(); + jschar *formatJSON(uint64_t timestamp); + + private: + JSRuntime *runtime; + + int64_t startupTime; + + FILE *fp; + bool fullFormat; + + + + + + int gcDepth; + + int collectedCount; + int compartmentCount; + const char *nonincrementalReason; + + struct SliceData { + SliceData(gcreason::Reason reason, int64_t start, size_t startFaults) + : reason(reason), resetReason(__null), start(start), startFaults(startFaults) + { + PodArrayZero(phaseTimes); + } + + gcreason::Reason reason; + const char *resetReason; + int64_t start, end; + size_t startFaults, endFaults; + int64_t phaseTimes[PHASE_LIMIT]; + + int64_t duration() const { return end - start; } + }; + + Vector slices; + + + int64_t phaseStartTimes[PHASE_LIMIT]; + + + int64_t phaseTimes[PHASE_LIMIT]; + + + int64_t phaseTotals[PHASE_LIMIT]; + + + unsigned int counts[STAT_LIMIT]; + + + size_t preBytes; + + void beginGC(); + void endGC(); + + int64_t gcDuration(); + void printStats(); + bool formatData(StatisticsSerializer &ss, uint64_t timestamp); + + double computeMMU(int64_t resolution); +}; + +struct AutoGCSlice { + AutoGCSlice(Statistics &stats, int collectedCount, int compartmentCount, gcreason::Reason reason + ) + : stats(stats) + { + do { } while (0); + stats.beginSlice(collectedCount, compartmentCount, reason); + } + ~AutoGCSlice() { stats.endSlice(); } + + Statistics &stats; + +}; + +struct AutoPhase { + AutoPhase(Statistics &stats, Phase phase ) + : stats(stats), phase(phase) { do { } while (0); stats.beginPhase(phase); } + ~AutoPhase() { stats.endPhase(phase); } + + Statistics &stats; + Phase phase; + +}; + +} +} +# 28 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" 2 + + + + +struct JSCompartment; + + + + +#define JS_CHECK_STACK_SIZE(limit,lval) ((uintptr_t)(lval) > limit) + + +namespace js { + +class GCHelperThread; +struct Shape; + +namespace gc { + +enum State { + NO_INCREMENTAL, + MARK_ROOTS, + MARK, + INVALID +}; + +class ChunkPool { + Chunk *emptyChunkListHead; + size_t emptyCount; + + public: + ChunkPool() + : emptyChunkListHead(__null), + emptyCount(0) { } + + size_t getEmptyCount() const { + return emptyCount; + } + + inline bool wantBackgroundAllocation(JSRuntime *rt) const; + + + inline Chunk *get(JSRuntime *rt); + + + inline void put(Chunk *chunk); + + + + + + Chunk *expire(JSRuntime *rt, bool releaseAll); + + + void expireAndFree(JSRuntime *rt, bool releaseAll); + + + __attribute__((visibility("default"))) int64_t countCleanDecommittedArenas(JSRuntime *rt); +}; + +static inline JSGCTraceKind +MapAllocToTraceKind(AllocKind thingKind) +{ + static const JSGCTraceKind map[FINALIZE_LIMIT] = { + JSTRACE_OBJECT, + JSTRACE_OBJECT, + JSTRACE_OBJECT, + JSTRACE_OBJECT, + JSTRACE_OBJECT, + JSTRACE_OBJECT, + JSTRACE_OBJECT, + JSTRACE_OBJECT, + JSTRACE_OBJECT, + JSTRACE_OBJECT, + JSTRACE_OBJECT, + JSTRACE_OBJECT, + JSTRACE_SCRIPT, + JSTRACE_SHAPE, + JSTRACE_BASE_SHAPE, + JSTRACE_TYPE_OBJECT, + + JSTRACE_XML, + + JSTRACE_STRING, + JSTRACE_STRING, + JSTRACE_STRING, + }; + return map[thingKind]; +} + +inline JSGCTraceKind +GetGCThingTraceKind(const void *thing); + +struct ArenaLists { +# 134 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" + struct ArenaList { + ArenaHeader *head; + ArenaHeader **cursor; + + ArenaList() { + clear(); + } + + void clear() { + head = __null; + cursor = &head; + } + }; + + private: +# 158 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" + FreeSpan freeLists[FINALIZE_LIMIT]; + + ArenaList arenaLists[FINALIZE_LIMIT]; +# 179 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" + enum BackgroundFinalizeState { + BFS_DONE, + BFS_RUN, + BFS_JUST_FINISHED + }; + + volatile uintptr_t backgroundFinalizeState[FINALIZE_LIMIT]; + + + public: + ArenaLists() { + for (size_t i = 0; i != FINALIZE_LIMIT; ++i) + freeLists[i].initAsEmpty(); + + for (size_t i = 0; i != FINALIZE_LIMIT; ++i) + backgroundFinalizeState[i] = BFS_DONE; + + } + + ~ArenaLists() { + for (size_t i = 0; i != FINALIZE_LIMIT; ++i) { + + + + + + do { } while(0); + + ArenaHeader **headp = &arenaLists[i].head; + while (ArenaHeader *aheader = *headp) { + *headp = aheader->next; + aheader->chunk()->releaseArena(aheader); + } + } + } + + const FreeSpan *getFreeList(AllocKind thingKind) const { + return &freeLists[thingKind]; + } + + ArenaHeader *getFirstArena(AllocKind thingKind) const { + return arenaLists[thingKind].head; + } + + bool arenaListsAreEmpty() const { + for (size_t i = 0; i != FINALIZE_LIMIT; ++i) { + + + + + + if (backgroundFinalizeState[i] != BFS_DONE) + return false; + + if (arenaLists[i].head) + return false; + } + return true; + } +# 257 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" + bool doneBackgroundFinalize(AllocKind kind) const { + return backgroundFinalizeState[kind] == BFS_DONE; + } + + + + + + + void purge() { + for (size_t i = 0; i != FINALIZE_LIMIT; ++i) { + FreeSpan *headSpan = &freeLists[i]; + if (!headSpan->isEmpty()) { + ArenaHeader *aheader = headSpan->arenaHeader(); + aheader->setFirstFreeSpan(headSpan); + headSpan->initAsEmpty(); + } + } + } + + inline void prepareForIncrementalGC(JSRuntime *rt); + + + + + + + void copyFreeListsToArenas() { + for (size_t i = 0; i != FINALIZE_LIMIT; ++i) + copyFreeListToArena(AllocKind(i)); + } + + void copyFreeListToArena(AllocKind thingKind) { + FreeSpan *headSpan = &freeLists[thingKind]; + if (!headSpan->isEmpty()) { + ArenaHeader *aheader = headSpan->arenaHeader(); + do { } while(0); + aheader->setFirstFreeSpan(headSpan); + } + } + + + + + + void clearFreeListsInArenas() { + for (size_t i = 0; i != FINALIZE_LIMIT; ++i) + clearFreeListInArena(AllocKind(i)); + } + + + void clearFreeListInArena(AllocKind kind) { + FreeSpan *headSpan = &freeLists[kind]; + if (!headSpan->isEmpty()) { + ArenaHeader *aheader = headSpan->arenaHeader(); + do { } while(0); + aheader->setAsFullyUsed(); + } + } + + + + + + bool isSynchronizedFreeList(AllocKind kind) { + FreeSpan *headSpan = &freeLists[kind]; + if (headSpan->isEmpty()) + return true; + ArenaHeader *aheader = headSpan->arenaHeader(); + if (aheader->hasFreeThings()) { + + + + + do { } while(0); + return true; + } + return false; + } + + __attribute__((always_inline)) inline void *allocateFromFreeList(AllocKind thingKind, size_t thingSize) { + return freeLists[thingKind].allocate(thingSize); + } + + static void *refillFreeList(JSContext *cx, AllocKind thingKind); + + void checkEmptyFreeLists() { + + + + + } + + void checkEmptyFreeList(AllocKind kind) { + do { } while(0); + } + + void finalizeObjects(FreeOp *fop); + void finalizeStrings(FreeOp *fop); + void finalizeShapes(FreeOp *fop); + void finalizeScripts(FreeOp *fop); + + + static void backgroundFinalize(FreeOp *fop, ArenaHeader *listHead); + + + private: + inline void finalizeNow(FreeOp *fop, AllocKind thingKind); + inline void finalizeLater(FreeOp *fop, AllocKind thingKind); + + inline void *allocateFromArena(JSCompartment *comp, AllocKind thingKind); +}; + + + + + + +const size_t INITIAL_CHUNK_CAPACITY = 16 * 1024 * 1024 / ChunkSize; + + +const size_t MAX_EMPTY_CHUNK_AGE = 4; + +inline Cell * +AsCell(JSObject *obj) +{ + return reinterpret_cast(obj); +} + +} + +struct GCPtrHasher +{ + typedef void *Lookup; + + static HashNumber hash(void *key) { + return HashNumber(uintptr_t(key) >> JS_GCTHING_ZEROBITS); + } + + static bool match(void *l, void *k) { return l == k; } +}; + +typedef HashMap GCLocks; + +struct RootInfo { + RootInfo() {} + RootInfo(const char *name, JSGCRootType type) : name(name), type(type) {} + const char *name; + JSGCRootType type; +}; + +typedef js::HashMap, + js::SystemAllocPolicy> RootedValueMap; + +} + +extern __attribute__((visibility("default"))) JSGCTraceKind +js_GetGCThingTraceKind(void *thing); + +extern JSBool +js_InitGC(JSRuntime *rt, uint32_t maxbytes); + +extern void +js_FinishGC(JSRuntime *rt); + +extern JSBool +js_AddRoot(JSContext *cx, js::Value *vp, const char *name); + +extern JSBool +js_AddGCThingRoot(JSContext *cx, void **rp, const char *name); +# 437 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" +extern uint32_t +js_MapGCRoots(JSRuntime *rt, JSGCRootMapFun map, void *data); + + +typedef struct JSPtrTable { + size_t count; + void **array; +} JSPtrTable; + +extern JSBool +js_LockGCThingRT(JSRuntime *rt, void *thing); + +extern void +js_UnlockGCThingRT(JSRuntime *rt, void *thing); + +extern bool +js_IsAddressableGCThing(JSRuntime *rt, uintptr_t w, js::gc::AllocKind *thingKind, void **thing); + +namespace js { + +extern void +MarkCompartmentActive(js::StackFrame *fp); + +extern void +TraceRuntime(JSTracer *trc); + +extern __attribute__((visibility("default"))) void +MarkContext(JSTracer *trc, JSContext *acx); + + +extern void +TriggerGC(JSRuntime *rt, js::gcreason::Reason reason); + + +extern void +TriggerCompartmentGC(JSCompartment *comp, js::gcreason::Reason reason); + +extern void +MaybeGC(JSContext *cx); + +extern void +ShrinkGCBuffers(JSRuntime *rt); + +extern __attribute__((visibility("default"))) void +PrepareForFullGC(JSRuntime *rt); + + + + +typedef enum JSGCInvocationKind { + + GC_NORMAL = 0, + + + GC_SHRINK = 1 +} JSGCInvocationKind; + +extern void +GC(JSRuntime *rt, JSGCInvocationKind gckind, js::gcreason::Reason reason); + +extern void +GCSlice(JSRuntime *rt, JSGCInvocationKind gckind, js::gcreason::Reason reason); + +extern void +GCDebugSlice(JSRuntime *rt, bool limit, int64_t objCount); + +extern void +PrepareForDebugGC(JSRuntime *rt); + +} + +namespace js { + +void +InitTracer(JSTracer *trc, JSRuntime *rt, JSTraceCallback callback); + + + +class GCHelperThread { + enum State { + IDLE, + SWEEPING, + ALLOCATING, + CANCEL_ALLOCATION, + SHUTDOWN + }; +# 534 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" + static const size_t FREE_ARRAY_SIZE = size_t(1) << 16; + static const size_t FREE_ARRAY_LENGTH = FREE_ARRAY_SIZE / sizeof(void *); + + JSRuntime *const rt; + PRThread *thread; + PRCondVar *wakeup; + PRCondVar *done; + volatile State state; + + bool sweepFlag; + bool shrinkFlag; + + Vector freeVector; + void **freeCursor; + void **freeCursorEnd; + + Vector finalizeVector; + + bool backgroundAllocation; + + friend struct js::gc::ArenaLists; + + __attribute__((visibility("default"))) void + replenishAndFreeLater(void *ptr); + + static void freeElementsAndArray(void **array, void **end) { + do { } while(0); + for (void **p = array; p != end; ++p) + js::Foreground::free_(*p); + js::Foreground::free_(array); + } + + static void threadMain(void* arg); + void threadLoop(); + + + void doSweep(); + + public: + GCHelperThread(JSRuntime *rt) + : rt(rt), + thread(__null), + wakeup(__null), + done(__null), + state(IDLE), + sweepFlag(false), + shrinkFlag(false), + freeCursor(__null), + freeCursorEnd(__null), + backgroundAllocation(true) + { } + + bool init(); + void finish(); + + + void startBackgroundSweep(bool shouldShrink); + + + void startBackgroundShrink(); + + + void waitBackgroundSweepEnd(); + + + void waitBackgroundSweepOrAllocEnd(); + + + inline void startBackgroundAllocationIfIdle(); + + bool canBackgroundAllocate() const { + return backgroundAllocation; + } + + void disableBackgroundAllocation() { + backgroundAllocation = false; + } + + PRThread *getThread() const { + return thread; + } + + + + + + bool sweeping() const { + return state == SWEEPING; + } + + bool shouldShrink() const { + do { } while(0); + return shrinkFlag; + } + + void freeLater(void *ptr) { + do { } while(0); + if (freeCursor != freeCursorEnd) + *freeCursor++ = ptr; + else + replenishAndFreeLater(ptr); + } + + + bool prepareForBackgroundSweep(); +}; + + + +struct GCChunkHasher { + typedef gc::Chunk *Lookup; + + + + + + static HashNumber hash(gc::Chunk *chunk) { + do { } while(0); + return HashNumber(uintptr_t(chunk) >> gc::ChunkShift); + } + + static bool match(gc::Chunk *k, gc::Chunk *l) { + do { } while(0); + do { } while(0); + return k == l; + } +}; + +typedef HashSet GCChunkSet; + +template +struct MarkStack { + T *stack; + T *tos; + T *limit; + + T *ballast; + T *ballastLimit; + + size_t sizeLimit; + + MarkStack(size_t sizeLimit) + : stack(__null), + tos(__null), + limit(__null), + ballast(__null), + ballastLimit(__null), + sizeLimit(sizeLimit) { } + + ~MarkStack() { + if (stack != ballast) + js_free(stack); + js_free(ballast); + } + + bool init(size_t ballastcap) { + do { } while(0); + + if (ballastcap == 0) + return true; + + ballast = (T *)js_malloc(sizeof(T) * ballastcap); + if (!ballast) + return false; + ballastLimit = ballast + ballastcap; + initFromBallast(); + return true; + } + + void initFromBallast() { + stack = ballast; + limit = ballastLimit; + if (size_t(limit - stack) > sizeLimit) + limit = stack + sizeLimit; + tos = stack; + } + + void setSizeLimit(size_t size) { + do { } while(0); + + sizeLimit = size; + reset(); + } + + bool push(T item) { + if (tos == limit) { + if (!enlarge()) + return false; + } + do { } while(0); + *tos++ = item; + return true; + } + + bool push(T item1, T item2, T item3) { + T *nextTos = tos + 3; + if (nextTos > limit) { + if (!enlarge()) + return false; + nextTos = tos + 3; + } + do { } while(0); + tos[0] = item1; + tos[1] = item2; + tos[2] = item3; + tos = nextTos; + return true; + } + + bool isEmpty() const { + return tos == stack; + } + + T pop() { + do { } while(0); + return *--tos; + } + + ptrdiff_t position() const { + return tos - stack; + } + + void reset() { + if (stack != ballast) + js_free(stack); + initFromBallast(); + do { } while(0); + } + + bool enlarge() { + size_t tosIndex = tos - stack; + size_t cap = limit - stack; + if (cap == sizeLimit) + return false; + size_t newcap = cap * 2; + if (newcap == 0) + newcap = 32; + if (newcap > sizeLimit) + newcap = sizeLimit; + + T *newStack; + if (stack == ballast) { + newStack = (T *)js_malloc(sizeof(T) * newcap); + if (!newStack) + return false; + for (T *src = stack, *dst = newStack; src < tos; ) + *dst++ = *src++; + } else { + newStack = (T *)js_realloc(stack, sizeof(T) * newcap); + if (!newStack) + return false; + } + stack = newStack; + tos = stack + tosIndex; + limit = newStack + newcap; + return true; + } + + size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const { + size_t n = 0; + if (stack != ballast) + n += mallocSizeOf(stack); + n += mallocSizeOf(ballast); + return n; + } +}; + + + + + + + +struct SliceBudget { + int64_t deadline; + intptr_t counter; + + static const intptr_t CounterReset = 1000; + + static const int64_t Unlimited = 0; + static int64_t TimeBudget(int64_t millis); + static int64_t WorkBudget(int64_t work); + + + SliceBudget(); + + + SliceBudget(int64_t budget); + + void reset() { + deadline = (9223372036854775807LL); + counter = (2147483647); + } + + void step(intptr_t amt = 1) { + counter -= amt; + } + + bool checkOverBudget(); + + bool isOverBudget() { + if (counter >= 0) + return false; + return checkOverBudget(); + } +}; + +static const size_t MARK_STACK_LENGTH = 32768; + +struct GCMarker : public JSTracer { + private: + + + + + + enum StackTag { + ValueArrayTag, + ObjectTag, + TypeTag, + XmlTag, + ArenaTag, + SavedValueArrayTag, + LastTag = SavedValueArrayTag + }; + + static const uintptr_t StackTagMask = 7; + + static void staticAsserts() { + typedef int moz_static_assert85[(StackTagMask >= uintptr_t(LastTag)) ? 1 : -1]; + typedef int moz_static_assert86[(StackTagMask <= gc::Cell::CellMask) ? 1 : -1]; + } + + public: + explicit GCMarker(); + bool init(); + + void setSizeLimit(size_t size) { stack.setSizeLimit(size); } + size_t sizeLimit() const { return stack.sizeLimit; } + + void start(JSRuntime *rt); + void stop(); + void reset(); + + void pushObject(JSObject *obj) { + pushTaggedPtr(ObjectTag, obj); + } + + void pushArenaList(gc::ArenaHeader *firstArena) { + pushTaggedPtr(ArenaTag, firstArena); + } + + void pushType(types::TypeObject *type) { + pushTaggedPtr(TypeTag, type); + } + + + void pushXML(JSXML *xml) { + pushTaggedPtr(XmlTag, xml); + } + + + uint32_t getMarkColor() const { + return color; + } +# 908 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" + void setMarkColorGray() { + do { } while(0); + do { } while(0); + color = gc::GRAY; + } + + inline void delayMarkingArena(gc::ArenaHeader *aheader); + void delayMarkingChildren(const void *thing); + void markDelayedChildren(gc::ArenaHeader *aheader); + bool markDelayedChildren(SliceBudget &budget); + bool hasDelayedChildren() const { + return !!unmarkedArenaStackTop; + } + + bool isDrained() { + return isMarkStackEmpty() && !unmarkedArenaStackTop; + } + + bool drainMarkStack(SliceBudget &budget); +# 936 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" + bool hasBufferedGrayRoots() const; + void startBufferingGrayRoots(); + void endBufferingGrayRoots(); + void markBufferedGrayRoots(); + + static void GrayCallback(JSTracer *trc, void **thing, JSGCTraceKind kind); + + size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const; + + MarkStack stack; + + private: + + + + void checkCompartment(void *p) {} + + + void pushTaggedPtr(StackTag tag, void *ptr) { + checkCompartment(ptr); + uintptr_t addr = reinterpret_cast(ptr); + do { } while(0); + if (!stack.push(addr | uintptr_t(tag))) + delayMarkingChildren(ptr); + } + + void pushValueArray(JSObject *obj, void *start, void *end) { + checkCompartment(obj); + + do { } while(0); + uintptr_t tagged = reinterpret_cast(obj) | GCMarker::ValueArrayTag; + uintptr_t startAddr = reinterpret_cast(start); + uintptr_t endAddr = reinterpret_cast(end); + + + + + + if (!stack.push(endAddr, startAddr, tagged)) + delayMarkingChildren(obj); + } + + bool isMarkStackEmpty() { + return stack.isEmpty(); + } + + bool restoreValueArray(JSObject *obj, void **vpp, void **endp); + void saveValueRanges(); + inline void processMarkStackTop(SliceBudget &budget); + void processMarkStackOther(SliceBudget &budget, uintptr_t tag, uintptr_t addr); + + void appendGrayRoot(void *thing, JSGCTraceKind kind); + + + uint32_t color; + + DebugOnly started; + + + js::gc::ArenaHeader *unmarkedArenaStackTop; + + DebugOnly markLaterArenas; + + struct GrayRoot { + void *thing; + JSGCTraceKind kind; + + + + + + + GrayRoot(void *thing, JSGCTraceKind kind) + : thing(thing), kind(kind) {} + }; + + bool grayFailed; + Vector grayRoots; +}; + +void +SetMarkStackLimit(JSRuntime *rt, size_t limit); + +void +MarkStackRangeConservatively(JSTracer *trc, Value *begin, Value *end); + +typedef void (*IterateChunkCallback)(JSRuntime *rt, void *data, gc::Chunk *chunk); +typedef void (*IterateArenaCallback)(JSRuntime *rt, void *data, gc::Arena *arena, + JSGCTraceKind traceKind, size_t thingSize); +typedef void (*IterateCellCallback)(JSRuntime *rt, void *data, void *thing, + JSGCTraceKind traceKind, size_t thingSize); + + + + + + +extern __attribute__((visibility("default"))) void +IterateCompartmentsArenasCells(JSRuntime *rt, void *data, + JSIterateCompartmentCallback compartmentCallback, + IterateArenaCallback arenaCallback, + IterateCellCallback cellCallback); + + + + +extern __attribute__((visibility("default"))) void +IterateChunks(JSRuntime *rt, void *data, IterateChunkCallback chunkCallback); + + + + + +extern __attribute__((visibility("default"))) void +IterateCells(JSRuntime *rt, JSCompartment *compartment, gc::AllocKind thingKind, + void *data, IterateCellCallback cellCallback); + +} + +extern void +js_FinalizeStringRT(JSRuntime *rt, JSString *str); + + + + +#define IS_GC_MARKING_TRACER(trc) ((trc)->callback == NULL || (trc)->callback == GCMarker::GrayCallback) + + +namespace js { +namespace gc { + +JSCompartment * +NewCompartment(JSContext *cx, JSPrincipals *principals); + + +void +RunDebugGC(JSContext *cx); + +void +SetDeterministicGC(JSContext *cx, bool enabled); + +const int ZealPokeValue = 1; +const int ZealAllocValue = 2; +const int ZealFrameGCValue = 3; +const int ZealVerifierValue = 4; +const int ZealFrameVerifierValue = 5; +# 1094 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" +static inline void +VerifyBarriers(JSRuntime *rt) +{ +} + +static inline void +MaybeVerifyBarriers(JSContext *cx, bool always = false) +{ +} + + + +} + +static inline JSCompartment * +GetObjectCompartment(JSObject *obj) { return reinterpret_cast(obj)->compartment(); } + +} +# 23 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspropertycache.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspropertycache.h" +#define jspropertycache_h___ + + + + + + + +namespace js { + + + + + + +class PropertyCache; + +struct PropertyCacheEntry +{ + jsbytecode *kpc; + const Shape *kshape; + const Shape *pshape; + const Shape *prop; + + friend class PropertyCache; + + private: + + uint8_t scopeIndex; + + uint8_t protoIndex; + + public: + static const size_t MaxScopeIndex = 15; + static const size_t MaxProtoIndex = 15; +# 53 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspropertycache.h" + bool isOwnPropertyHit() const { return scopeIndex == 0 && protoIndex == 0; } +# 63 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspropertycache.h" + bool isPrototypePropertyHit() const { return scopeIndex == 0 && protoIndex == 1; } + + void assign(jsbytecode *kpc, const Shape *kshape, const Shape *pshape, + const Shape *prop, unsigned scopeIndex, unsigned protoIndex) { + do { } while(0); + do { } while(0); + + this->kpc = kpc; + this->kshape = kshape; + this->pshape = pshape; + this->prop = prop; + this->scopeIndex = uint8_t(scopeIndex); + this->protoIndex = uint8_t(protoIndex); + } +}; + + + + + +#define JS_NO_PROP_CACHE_FILL ((js::PropertyCacheEntry *) NULL + 1) + + + + + +class PropertyCache +{ + private: + enum { + SIZE_LOG2 = 12, + SIZE = ((uint32_t)1 << (SIZE_LOG2)), + MASK = (((uint32_t)1 << (SIZE_LOG2)) - 1) + }; + + PropertyCacheEntry table[SIZE]; + JSBool empty; + + public: +# 136 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspropertycache.h" +#define PCMETER(x) ((void)0) + + + PropertyCache() { + PodZero(this); + } + + private: + static inline uintptr_t + hash(jsbytecode *pc, const Shape *kshape) + { + return (((uintptr_t(pc) >> SIZE_LOG2) ^ uintptr_t(pc) ^ ((uintptr_t)kshape >> 3)) & MASK); + } + + static inline bool matchShape(JSContext *cx, JSObject *obj, uint32_t shape); + + PropertyName * + fullTest(JSContext *cx, jsbytecode *pc, JSObject **objp, + JSObject **pobjp, PropertyCacheEntry *entry); + + + + + inline void assertEmpty() {} + + + public: + __attribute__((always_inline)) inline void test(JSContext *cx, jsbytecode *pc, + JSObject *&obj, JSObject *&pobj, + PropertyCacheEntry *&entry, PropertyName *&name); +# 174 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspropertycache.h" + __attribute__((always_inline)) inline bool testForSet(JSContext *cx, jsbytecode *pc, JSObject *obj, + PropertyCacheEntry **entryp, JSObject **obj2p, + PropertyName **namep); +# 186 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspropertycache.h" + PropertyCacheEntry *fill(JSContext *cx, JSObject *obj, unsigned scopeIndex, + JSObject *pobj, const js::Shape *shape); + + void purge(JSRuntime *rt); + + + void restore(PropertyCacheEntry *entry); +}; + +} +# 24 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/prmjtime.h" 1 + + + + + + + +#define prmjtime_h___ + +# 1 "/usr/include/time.h" 1 3 4 +# 27 "/usr/include/time.h" 3 4 +#define _TIME_H 1 + + +extern "C" { + + + + + +#define __need_size_t +#define __need_NULL +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 39 "/usr/include/time.h" 2 3 4 + + + +# 1 "/usr/include/bits/time.h" 1 3 4 +# 41 "/usr/include/bits/time.h" 3 4 +#define _BITS_TIME_H 1 + + + + + + + +#define CLOCKS_PER_SEC 1000000l +# 61 "/usr/include/bits/time.h" 3 4 +#define CLOCK_REALTIME 0 + +#define CLOCK_MONOTONIC 1 + +#define CLOCK_PROCESS_CPUTIME_ID 2 + +#define CLOCK_THREAD_CPUTIME_ID 3 + +#define CLOCK_MONOTONIC_RAW 4 + +#define CLOCK_REALTIME_COARSE 5 + +#define CLOCK_MONOTONIC_COARSE 6 + +#define CLOCK_BOOTTIME 7 + +#define CLOCK_REALTIME_ALARM 8 + +#define CLOCK_BOOTTIME_ALARM 9 + + +#define TIMER_ABSTIME 1 + + + +# 1 "/usr/include/bits/timex.h" 1 3 4 +# 20 "/usr/include/bits/timex.h" 3 4 +#define _BITS_TIMEX_H 1 + + + +struct timex +{ + unsigned int modes; + long int offset; + long int freq; + long int maxerror; + long int esterror; + int status; + long int constant; + long int precision; + long int tolerance; + struct timeval time; + long int tick; + + long int ppsfreq; + long int jitter; + int shift; + long int stabil; + long int jitcnt; + long int calcnt; + long int errcnt; + long int stbcnt; + + int tai; + + + int :32; int :32; int :32; int :32; + int :32; int :32; int :32; int :32; + int :32; int :32; int :32; +}; + + +#define ADJ_OFFSET 0x0001 +#define ADJ_FREQUENCY 0x0002 +#define ADJ_MAXERROR 0x0004 +#define ADJ_ESTERROR 0x0008 +#define ADJ_STATUS 0x0010 +#define ADJ_TIMECONST 0x0020 +#define ADJ_TAI 0x0080 +#define ADJ_MICRO 0x1000 +#define ADJ_NANO 0x2000 +#define ADJ_TICK 0x4000 +#define ADJ_OFFSET_SINGLESHOT 0x8001 +#define ADJ_OFFSET_SS_READ 0xa001 + + +#define MOD_OFFSET ADJ_OFFSET +#define MOD_FREQUENCY ADJ_FREQUENCY +#define MOD_MAXERROR ADJ_MAXERROR +#define MOD_ESTERROR ADJ_ESTERROR +#define MOD_STATUS ADJ_STATUS +#define MOD_TIMECONST ADJ_TIMECONST +#define MOD_CLKB ADJ_TICK +#define MOD_CLKA ADJ_OFFSET_SINGLESHOT +#define MOD_TAI ADJ_TAI +#define MOD_MICRO ADJ_MICRO +#define MOD_NANO ADJ_NANO + + + +#define STA_PLL 0x0001 +#define STA_PPSFREQ 0x0002 +#define STA_PPSTIME 0x0004 +#define STA_FLL 0x0008 + +#define STA_INS 0x0010 +#define STA_DEL 0x0020 +#define STA_UNSYNC 0x0040 +#define STA_FREQHOLD 0x0080 + +#define STA_PPSSIGNAL 0x0100 +#define STA_PPSJITTER 0x0200 +#define STA_PPSWANDER 0x0400 +#define STA_PPSERROR 0x0800 + +#define STA_CLOCKERR 0x1000 +#define STA_NANO 0x2000 +#define STA_MODE 0x4000 +#define STA_CLK 0x8000 + + +#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK) +# 87 "/usr/include/bits/time.h" 2 3 4 + +extern "C" { + + +extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) throw (); + +} + + + + + +#undef __need_timeval +# 43 "/usr/include/time.h" 2 3 4 +# 67 "/usr/include/time.h" 3 4 +#undef __need_clock_t +# 83 "/usr/include/time.h" 3 4 +#undef __need_time_t +# 95 "/usr/include/time.h" 3 4 +#undef __clockid_time_t +# 107 "/usr/include/time.h" 3 4 +#undef __need_timer_t +# 127 "/usr/include/time.h" 3 4 +#undef __need_timespec + + + + + +struct tm +{ + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; + + + long int tm_gmtoff; + __const char *tm_zone; + + + + +}; + + + + + + + + +struct itimerspec + { + struct timespec it_interval; + struct timespec it_value; + }; + + +struct sigevent; +# 180 "/usr/include/time.h" 3 4 + + + +extern clock_t clock (void) throw (); + + +extern time_t time (time_t *__timer) throw (); + + +extern double difftime (time_t __time1, time_t __time0) + throw () __attribute__ ((__const__)); + + +extern time_t mktime (struct tm *__tp) throw (); + + + + + +extern size_t strftime (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp) throw (); + + + + + +extern char *strptime (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp) + throw (); + + + + + + + +extern size_t strftime_l (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp, + __locale_t __loc) throw (); + + + +extern char *strptime_l (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp, + __locale_t __loc) throw (); + + + + + + +extern struct tm *gmtime (__const time_t *__timer) throw (); + + + +extern struct tm *localtime (__const time_t *__timer) throw (); + + + + + +extern struct tm *gmtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) throw (); + + + +extern struct tm *localtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) throw (); + + + + + +extern char *asctime (__const struct tm *__tp) throw (); + + +extern char *ctime (__const time_t *__timer) throw (); + + + + + + + +extern char *asctime_r (__const struct tm *__restrict __tp, + char *__restrict __buf) throw (); + + +extern char *ctime_r (__const time_t *__restrict __timer, + char *__restrict __buf) throw (); + + + + +extern char *__tzname[2]; +extern int __daylight; +extern long int __timezone; + + + + +extern char *tzname[2]; + + + +extern void tzset (void) throw (); + + + +extern int daylight; +extern long int timezone; + + + + + +extern int stime (__const time_t *__when) throw (); + + + + + +#define __isleap(year) ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) +# 313 "/usr/include/time.h" 3 4 +extern time_t timegm (struct tm *__tp) throw (); + + +extern time_t timelocal (struct tm *__tp) throw (); + + +extern int dysize (int __year) throw () __attribute__ ((__const__)); +# 328 "/usr/include/time.h" 3 4 +extern int nanosleep (__const struct timespec *__requested_time, + struct timespec *__remaining); + + + +extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw (); + + +extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw (); + + +extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) + throw (); + + + + + + +extern int clock_nanosleep (clockid_t __clock_id, int __flags, + __const struct timespec *__req, + struct timespec *__rem); + + +extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw (); + + + + +extern int timer_create (clockid_t __clock_id, + struct sigevent *__restrict __evp, + timer_t *__restrict __timerid) throw (); + + +extern int timer_delete (timer_t __timerid) throw (); + + +extern int timer_settime (timer_t __timerid, int __flags, + __const struct itimerspec *__restrict __value, + struct itimerspec *__restrict __ovalue) throw (); + + +extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) + throw (); + + +extern int timer_getoverrun (timer_t __timerid) throw (); +# 390 "/usr/include/time.h" 3 4 +extern int getdate_err; +# 399 "/usr/include/time.h" 3 4 +extern struct tm *getdate (__const char *__string); +# 413 "/usr/include/time.h" 3 4 +extern int getdate_r (__const char *__restrict __string, + struct tm *__restrict __resbufp); + + +} +# 11 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/prmjtime.h" 2 + +struct JSContext; +# 58 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/prmjtime.h" +class DSTOffsetCache { + public: + inline DSTOffsetCache(); + int64_t getDSTOffsetMilliseconds(int64_t localTimeMilliseconds, JSContext *cx); + + inline void purge(); + + private: + int64_t computeDSTOffsetMilliseconds(int64_t localTimeSeconds); + + int64_t offsetMilliseconds; + int64_t rangeStartSeconds, rangeEndSeconds; + + int64_t oldOffsetMilliseconds; + int64_t oldRangeStartSeconds, oldRangeEndSeconds; + + static const int64_t MAX_UNIX_TIMET = 2145859200; + static const int64_t MILLISECONDS_PER_SECOND = 1000; + static const int64_t SECONDS_PER_MINUTE = 60; + static const int64_t SECONDS_PER_HOUR = 60 * SECONDS_PER_MINUTE; + static const int64_t SECONDS_PER_DAY = 24 * SECONDS_PER_HOUR; + + static const int64_t RANGE_EXPANSION_AMOUNT = 30 * SECONDS_PER_DAY; + + private: + void sanityCheck(); +}; + +extern "C" { + +typedef struct PRMJTime PRMJTime; + + + + +struct PRMJTime { + int32_t tm_usec; + int8_t tm_sec; + int8_t tm_min; + int8_t tm_hour; + int8_t tm_mday; + int8_t tm_mon; + int8_t tm_wday; + int32_t tm_year; + int16_t tm_yday; + int8_t tm_isdst; +}; + + +#define PRMJ_USEC_PER_SEC 1000000L +#define PRMJ_USEC_PER_MSEC 1000L + + +extern int64_t +PRMJ_Now(void); + + + + + + +#define PRMJ_NowShutdown() + + + +extern int32_t +PRMJ_LocalGMTDifference(void); + + +extern size_t +PRMJ_FormatTime(char *buf, int buflen, const char *fmt, PRMJTime *tm); + +} +# 27 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" 2 + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" +#define Stack_h__ + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfun.h" 1 + + + + + + + +#define jsfun_h___ + + + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" +#define jsscript_h___ + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsdbgapi.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsdbgapi.h" +#define jsdbgapi_h___ + + + + + + +extern "C" { + +extern __attribute__((visibility("default"))) JSCrossCompartmentCall * +JS_EnterCrossCompartmentCallScript(JSContext *cx, JSScript *target); + +extern __attribute__((visibility("default"))) JSCrossCompartmentCall * +JS_EnterCrossCompartmentCallStackFrame(JSContext *cx, JSStackFrame *target); + + +} + +namespace JS { + +class __attribute__((visibility("default"))) AutoEnterScriptCompartment +{ + protected: + JSCrossCompartmentCall *call; + + public: + AutoEnterScriptCompartment() : call(__null) {} + + bool enter(JSContext *cx, JSScript *target); + + bool entered() const { return call != __null; } + + ~AutoEnterScriptCompartment() { + if (call && call != reinterpret_cast(1)) + JS_LeaveCrossCompartmentCall(call); + } +}; + +class __attribute__((visibility("default"))) AutoEnterFrameCompartment : public AutoEnterScriptCompartment +{ + public: + bool enter(JSContext *cx, JSStackFrame *target); +}; + +} + + + + + + +__attribute__((visibility("default"))) void js_DumpBacktrace(JSContext *cx); + +extern "C" { + + +extern __attribute__((visibility("default"))) JSString * +JS_DecompileScript(JSContext *cx, JSScript *script, const char *name, unsigned indent); + + + + + +extern __attribute__((visibility("default"))) void +JS_SetRuntimeDebugMode(JSRuntime *rt, JSBool debug); +# 86 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsdbgapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_GetDebugMode(JSContext *cx); + + + + + +__attribute__((visibility("default"))) JSBool +JS_SetDebugModeForAllCompartments(JSContext *cx, JSBool debug); + + + + + + +__attribute__((visibility("default"))) JSBool +JS_SetDebugModeForCompartment(JSContext *cx, JSCompartment *comp, JSBool debug); + + + + +__attribute__((visibility("default"))) JSBool +JS_SetDebugMode(JSContext *cx, JSBool debug); + + +extern __attribute__((visibility("default"))) JSBool +JS_SetSingleStepMode(JSContext *cx, JSScript *script, JSBool singleStep); + + +extern __attribute__((visibility("default"))) JSBool +JS_SetTrap(JSContext *cx, JSScript *script, jsbytecode *pc, + JSTrapHandler handler, jsval closure); + +extern __attribute__((visibility("default"))) void +JS_ClearTrap(JSContext *cx, JSScript *script, jsbytecode *pc, + JSTrapHandler *handlerp, jsval *closurep); + +extern __attribute__((visibility("default"))) void +JS_ClearScriptTraps(JSContext *cx, JSScript *script); + +extern __attribute__((visibility("default"))) void +JS_ClearAllTrapsForCompartment(JSContext *cx); + +extern __attribute__((visibility("default"))) JSBool +JS_SetInterrupt(JSRuntime *rt, JSInterruptHook handler, void *closure); + +extern __attribute__((visibility("default"))) JSBool +JS_ClearInterrupt(JSRuntime *rt, JSInterruptHook *handlerp, void **closurep); + + + +extern __attribute__((visibility("default"))) JSBool +JS_SetWatchPoint(JSContext *cx, JSObject *obj, jsid id, + JSWatchPointHandler handler, JSObject *closure); + +extern __attribute__((visibility("default"))) JSBool +JS_ClearWatchPoint(JSContext *cx, JSObject *obj, jsid id, + JSWatchPointHandler *handlerp, JSObject **closurep); + +extern __attribute__((visibility("default"))) JSBool +JS_ClearWatchPointsForObject(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) JSBool +JS_ClearAllWatchPoints(JSContext *cx); + + + +extern __attribute__((visibility("default"))) unsigned +JS_PCToLineNumber(JSContext *cx, JSScript *script, jsbytecode *pc); + +extern __attribute__((visibility("default"))) jsbytecode * +JS_LineNumberToPC(JSContext *cx, JSScript *script, unsigned lineno); + +extern __attribute__((visibility("default"))) jsbytecode * +JS_EndPC(JSContext *cx, JSScript *script); + +extern __attribute__((visibility("default"))) JSBool +JS_GetLinePCs(JSContext *cx, JSScript *script, + unsigned startLine, unsigned maxLines, + unsigned* count, unsigned** lines, jsbytecode*** pcs); + +extern __attribute__((visibility("default"))) unsigned +JS_GetFunctionArgumentCount(JSContext *cx, JSFunction *fun); + +extern __attribute__((visibility("default"))) JSBool +JS_FunctionHasLocalNames(JSContext *cx, JSFunction *fun); + + + + + + +extern __attribute__((visibility("default"))) uintptr_t * +JS_GetFunctionLocalNameArray(JSContext *cx, JSFunction *fun, void **markp); + +extern __attribute__((visibility("default"))) JSAtom * +JS_LocalNameToAtom(uintptr_t w); + +extern __attribute__((visibility("default"))) JSString * +JS_AtomKey(JSAtom *atom); + +extern __attribute__((visibility("default"))) void +JS_ReleaseFunctionLocalNameArray(JSContext *cx, void *mark); + +extern __attribute__((visibility("default"))) JSScript * +JS_GetFunctionScript(JSContext *cx, JSFunction *fun); + +extern __attribute__((visibility("default"))) JSNative +JS_GetFunctionNative(JSContext *cx, JSFunction *fun); + +extern __attribute__((visibility("default"))) JSPrincipals * +JS_GetScriptPrincipals(JSScript *script); + +extern __attribute__((visibility("default"))) JSPrincipals * +JS_GetScriptOriginPrincipals(JSScript *script); +# 209 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsdbgapi.h" +extern __attribute__((visibility("default"))) JSStackFrame * +JS_FrameIterator(JSContext *cx, JSStackFrame **iteratorp); + +extern __attribute__((visibility("default"))) JSScript * +JS_GetFrameScript(JSContext *cx, JSStackFrame *fp); + +extern __attribute__((visibility("default"))) jsbytecode * +JS_GetFramePC(JSContext *cx, JSStackFrame *fp); + +extern __attribute__((visibility("default"))) void * +JS_GetFrameAnnotation(JSContext *cx, JSStackFrame *fp); + +extern __attribute__((visibility("default"))) void +JS_SetFrameAnnotation(JSContext *cx, JSStackFrame *fp, void *annotation); + +extern __attribute__((visibility("default"))) JSBool +JS_IsScriptFrame(JSContext *cx, JSStackFrame *fp); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetFrameScopeChain(JSContext *cx, JSStackFrame *fp); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetFrameCallObject(JSContext *cx, JSStackFrame *fp); + +extern __attribute__((visibility("default"))) JSBool +JS_GetFrameThis(JSContext *cx, JSStackFrame *fp, jsval *thisv); + +extern __attribute__((visibility("default"))) JSFunction * +JS_GetFrameFunction(JSContext *cx, JSStackFrame *fp); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetFrameFunctionObject(JSContext *cx, JSStackFrame *fp); + +__attribute__((visibility("default"))) JSFunction * +JS_GetScriptFunction(JSContext *cx, JSScript *script); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetParentOrScopeChain(JSContext *cx, JSObject *obj); + + +#define JS_IsContructorFrame JS_IsConstructorFrame +extern __attribute__((visibility("default"))) JSBool +JS_IsConstructorFrame(JSContext *cx, JSStackFrame *fp); + +extern __attribute__((visibility("default"))) JSBool +JS_IsDebuggerFrame(JSContext *cx, JSStackFrame *fp); + +extern __attribute__((visibility("default"))) JSBool +JS_IsGlobalFrame(JSContext *cx, JSStackFrame *fp); + +extern __attribute__((visibility("default"))) jsval +JS_GetFrameReturnValue(JSContext *cx, JSStackFrame *fp); + +extern __attribute__((visibility("default"))) void +JS_SetFrameReturnValue(JSContext *cx, JSStackFrame *fp, jsval rval); + + + + + + +extern __attribute__((visibility("default"))) JSObject * +JS_GetFrameCalleeObject(JSContext *cx, JSStackFrame *fp); +# 281 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsdbgapi.h" +extern __attribute__((visibility("default"))) const char * +JS_GetDebugClassName(JSObject *obj); + + + +extern __attribute__((visibility("default"))) const char * +JS_GetScriptFilename(JSContext *cx, JSScript *script); + +extern __attribute__((visibility("default"))) const jschar * +JS_GetScriptSourceMap(JSContext *cx, JSScript *script); + +extern __attribute__((visibility("default"))) unsigned +JS_GetScriptBaseLineNumber(JSContext *cx, JSScript *script); + +extern __attribute__((visibility("default"))) unsigned +JS_GetScriptLineExtent(JSContext *cx, JSScript *script); + +extern __attribute__((visibility("default"))) JSVersion +JS_GetScriptVersion(JSContext *cx, JSScript *script); +# 308 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsdbgapi.h" +#define JS_SetNewScriptHook JS_SetNewScriptHookProc +#define JS_SetDestroyScriptHook JS_SetDestroyScriptHookProc + +extern __attribute__((visibility("default"))) void +JS_SetNewScriptHookProc(JSRuntime *rt, JSNewScriptHook hook, void *callerdata); + +extern __attribute__((visibility("default"))) void +JS_SetDestroyScriptHookProc(JSRuntime *rt, JSDestroyScriptHook hook, + void *callerdata); + + + +extern __attribute__((visibility("default"))) JSBool +JS_EvaluateUCInStackFrame(JSContext *cx, JSStackFrame *fp, + const jschar *chars, unsigned length, + const char *filename, unsigned lineno, + jsval *rval); + +extern __attribute__((visibility("default"))) JSBool +JS_EvaluateInStackFrame(JSContext *cx, JSStackFrame *fp, + const char *bytes, unsigned length, + const char *filename, unsigned lineno, + jsval *rval); + + + +typedef struct JSPropertyDesc { + jsval id; + jsval value; + uint8_t flags; + uint8_t spare; + uint16_t slot; + jsval alias; +} JSPropertyDesc; + +#define JSPD_ENUMERATE 0x01 +#define JSPD_READONLY 0x02 +#define JSPD_PERMANENT 0x04 +#define JSPD_ALIAS 0x08 +#define JSPD_ARGUMENT 0x10 +#define JSPD_VARIABLE 0x20 +#define JSPD_EXCEPTION 0x40 + +#define JSPD_ERROR 0x80 + + +typedef struct JSPropertyDescArray { + uint32_t length; + JSPropertyDesc *array; +} JSPropertyDescArray; + +typedef struct JSScopeProperty JSScopeProperty; + +extern __attribute__((visibility("default"))) JSBool +JS_GetPropertyDescArray(JSContext *cx, JSObject *obj, JSPropertyDescArray *pda); + +extern __attribute__((visibility("default"))) void +JS_PutPropertyDescArray(JSContext *cx, JSPropertyDescArray *pda); + + + +extern __attribute__((visibility("default"))) JSBool +JS_SetDebuggerHandler(JSRuntime *rt, JSDebuggerHandler hook, void *closure); + +extern __attribute__((visibility("default"))) JSBool +JS_SetSourceHandler(JSRuntime *rt, JSSourceHandler handler, void *closure); + +extern __attribute__((visibility("default"))) JSBool +JS_SetExecuteHook(JSRuntime *rt, JSInterpreterHook hook, void *closure); + +extern __attribute__((visibility("default"))) JSBool +JS_SetCallHook(JSRuntime *rt, JSInterpreterHook hook, void *closure); + +extern __attribute__((visibility("default"))) JSBool +JS_SetThrowHook(JSRuntime *rt, JSThrowHook hook, void *closure); + +extern __attribute__((visibility("default"))) JSBool +JS_SetDebugErrorHook(JSRuntime *rt, JSDebugErrorHook hook, void *closure); + + + +extern __attribute__((visibility("default"))) size_t +JS_GetObjectTotalSize(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) size_t +JS_GetFunctionTotalSize(JSContext *cx, JSFunction *fun); + +extern __attribute__((visibility("default"))) size_t +JS_GetScriptTotalSize(JSContext *cx, JSScript *script); + + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_IsSystemObject(JSContext *cx, JSObject *obj); + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_MakeSystemObject(JSContext *cx, JSObject *obj); + + + +extern __attribute__((visibility("default"))) void +js_RevertVersion(JSContext *cx); + +extern __attribute__((visibility("default"))) const JSDebugHooks * +JS_GetGlobalDebugHooks(JSRuntime *rt); +# 434 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsdbgapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_StartProfiling(const char *profileName); + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_StopProfiling(const char *profileName); + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_DumpProfile(const char *outfile, const char *profileName); + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_PauseProfilers(const char *profileName); + + + + +extern __attribute__((visibility("default"))) JSBool +JS_ResumeProfilers(const char *profileName); + + + + +extern __attribute__((visibility("default"))) JSBool +JS_DefineProfilingFunctions(JSContext *cx, JSObject *obj); + + +extern __attribute__((visibility("default"))) JSBool +JS_DefineDebuggerObject(JSContext *cx, JSObject *obj); + + + + + + +__attribute__((visibility("default"))) const char * +JS_UnsafeGetLastProfilingError(); +# 514 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsdbgapi.h" +extern __attribute__((visibility("default"))) JSBool +js_StartPerf(); + +extern __attribute__((visibility("default"))) JSBool +js_StopPerf(); + + + +extern __attribute__((visibility("default"))) void +JS_DumpBytecode(JSContext *cx, JSScript *script); + +extern __attribute__((visibility("default"))) void +JS_DumpCompartmentBytecode(JSContext *cx); + +extern __attribute__((visibility("default"))) void +JS_DumpPCCounts(JSContext *cx, JSScript *script); + +extern __attribute__((visibility("default"))) void +JS_DumpCompartmentPCCounts(JSContext *cx); + +extern __attribute__((visibility("default"))) JSObject * +JS_UnwrapObject(JSObject *obj); + +extern __attribute__((visibility("default"))) JSObject * +JS_UnwrapObjectAndInnerize(JSObject *obj); + + +extern __attribute__((visibility("default"))) JSBool +js_CallContextDebugHandler(JSContext *cx); + +} +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.h" 1 + + + + + + + +#define jsopcode_h___ + + + + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.h" 2 + + + + +extern "C" { + + + + +typedef enum JSOp { +#define OPDEF(op,val,name,token,length,nuses,ndefs,prec,format) op = val, + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.tbl" 1 +# 80 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.tbl" +JSOP_NOP = 0, + + +JSOP_UNDEFINED = 1, +JSOP_POPV = 2, +JSOP_ENTERWITH = 3, +JSOP_LEAVEWITH = 4, +JSOP_RETURN = 5, +JSOP_GOTO = 6, +JSOP_IFEQ = 7, +JSOP_IFNE = 8, + + +JSOP_ARGUMENTS = 9, + +JSOP_SWAP = 10, +JSOP_POPN = 11, + + +JSOP_DUP = 12, +JSOP_DUP2 = 13, +JSOP_SETCONST = 14, +JSOP_BITOR = 15, +JSOP_BITXOR = 16, +JSOP_BITAND = 17, +JSOP_EQ = 18, +JSOP_NE = 19, +JSOP_LT = 20, +JSOP_LE = 21, +JSOP_GT = 22, +JSOP_GE = 23, +JSOP_LSH = 24, +JSOP_RSH = 25, +JSOP_URSH = 26, +JSOP_ADD = 27, +JSOP_SUB = 28, +JSOP_MUL = 29, +JSOP_DIV = 30, +JSOP_MOD = 31, +JSOP_NOT = 32, +JSOP_BITNOT = 33, +JSOP_NEG = 34, +JSOP_POS = 35, +JSOP_DELNAME = 36, +JSOP_DELPROP = 37, +JSOP_DELELEM = 38, +JSOP_TYPEOF = 39, +JSOP_VOID = 40, + +JSOP_INCNAME = 41, +JSOP_INCPROP = 42, +JSOP_INCELEM = 43, +JSOP_DECNAME = 44, +JSOP_DECPROP = 45, +JSOP_DECELEM = 46, +JSOP_NAMEINC = 47, +JSOP_PROPINC = 48, +JSOP_ELEMINC = 49, +JSOP_NAMEDEC = 50, +JSOP_PROPDEC = 51, +JSOP_ELEMDEC = 52, + +JSOP_GETPROP = 53, +JSOP_SETPROP = 54, +JSOP_GETELEM = 55, +JSOP_SETELEM = 56, +JSOP_CALLNAME = 57, +JSOP_CALL = 58, +JSOP_NAME = 59, +JSOP_DOUBLE = 60, +JSOP_STRING = 61, +JSOP_ZERO = 62, +JSOP_ONE = 63, +JSOP_NULL = 64, +JSOP_THIS = 65, +JSOP_FALSE = 66, +JSOP_TRUE = 67, +JSOP_OR = 68, +JSOP_AND = 69, + + +JSOP_TABLESWITCH = 70, +JSOP_LOOKUPSWITCH = 71, + + +JSOP_STRICTEQ = 72, +JSOP_STRICTNE = 73, + + + + + +JSOP_SETCALL = 74, +# 186 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.tbl" +JSOP_ITER = 75, +JSOP_MOREITER = 76, +JSOP_ITERNEXT = 77, +JSOP_ENDITER = 78, + +JSOP_FUNAPPLY = 79, + + +JSOP_OBJECT = 80, + + +JSOP_POP = 81, + + +JSOP_NEW = 82, + +JSOP_UNUSED0 = 83, + + +JSOP_GETARG = 84, +JSOP_SETARG = 85, +JSOP_GETLOCAL = 86, +JSOP_SETLOCAL = 87, + + +JSOP_UINT16 = 88, +# 221 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.tbl" +JSOP_NEWINIT = 89, +JSOP_NEWARRAY = 90, +JSOP_NEWOBJECT = 91, +JSOP_ENDINIT = 92, +JSOP_INITPROP = 93, +JSOP_INITELEM = 94, +JSOP_UNUSED14 = 95, +JSOP_UNUSED15 = 96, + + +JSOP_INCARG = 97, +JSOP_DECARG = 98, +JSOP_ARGINC = 99, +JSOP_ARGDEC = 100, + +JSOP_INCLOCAL = 101, +JSOP_DECLOCAL = 102, +JSOP_LOCALINC = 103, +JSOP_LOCALDEC = 104, + + +JSOP_LEAVEFORLETIN = 105, + + +JSOP_LABEL = 106, +JSOP_UNUSED3 = 107, + + +JSOP_FUNCALL = 108, + + +JSOP_LOOPHEAD = 109, + + +JSOP_BINDNAME = 110, +JSOP_SETNAME = 111, + + +JSOP_THROW = 112, + + +JSOP_IN = 113, +JSOP_INSTANCEOF = 114, + + +JSOP_DEBUGGER = 115, + + +JSOP_GOSUB = 116, +JSOP_RETSUB = 117, + + +JSOP_EXCEPTION = 118, + + +JSOP_LINENO = 119, + + + + + + +JSOP_CONDSWITCH = 120, +JSOP_CASE = 121, +JSOP_DEFAULT = 122, + + + + +JSOP_EVAL = 123, + + + + +JSOP_ENUMELEM = 124, + + + + + + +JSOP_GETTER = 125, +JSOP_SETTER = 126, + + + + +JSOP_DEFFUN = 127, +JSOP_DEFCONST = 128, +JSOP_DEFVAR = 129, + + +JSOP_LAMBDA = 130, + + +JSOP_CALLEE = 131, + +JSOP_UNUSED31 = 132, + + +JSOP_PICK = 133, + + + + + +JSOP_TRY = 134, +JSOP_FINALLY = 135, +# 337 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.tbl" +JSOP_GETALIASEDVAR = 136, +JSOP_CALLALIASEDVAR = 137, +JSOP_SETALIASEDVAR = 138, +JSOP_INCALIASEDVAR = 139, +JSOP_DECALIASEDVAR = 140, +JSOP_ALIASEDVARINC = 141, +JSOP_ALIASEDVARDEC = 142, + + +JSOP_UNUSED8 = 143, +JSOP_UNUSED9 = 144, +JSOP_UNUSED10 = 145, +JSOP_UNUSED11 = 146, +JSOP_UNUSED12 = 147, +JSOP_UNUSED13 = 148, + + +JSOP_BACKPATCH = 149, +JSOP_BACKPATCH_POP = 150, + + +JSOP_THROWING = 151, + + +JSOP_SETRVAL = 152, +JSOP_RETRVAL = 153, + + +JSOP_GETGNAME = 154, +JSOP_SETGNAME = 155, +JSOP_INCGNAME = 156, +JSOP_DECGNAME = 157, +JSOP_GNAMEINC = 158, +JSOP_GNAMEDEC = 159, + + +JSOP_REGEXP = 160, + + +JSOP_DEFXMLNS = 161, +JSOP_ANYNAME = 162, +JSOP_QNAMEPART = 163, +JSOP_QNAMECONST = 164, +JSOP_QNAME = 165, +JSOP_TOATTRNAME = 166, +JSOP_TOATTRVAL = 167, +JSOP_ADDATTRNAME = 168, +JSOP_ADDATTRVAL = 169, +JSOP_BINDXMLNAME = 170, +JSOP_SETXMLNAME = 171, +JSOP_XMLNAME = 172, +JSOP_DESCENDANTS = 173, +JSOP_FILTER = 174, +JSOP_ENDFILTER = 175, +JSOP_TOXML = 176, +JSOP_TOXMLLIST = 177, +JSOP_XMLTAGEXPR = 178, +JSOP_XMLELTEXPR = 179, +JSOP_XMLCDATA = 180, +JSOP_XMLCOMMENT = 181, +JSOP_XMLPI = 182, +JSOP_DELDESC = 183, + +JSOP_CALLPROP = 184, + + +JSOP_ENTERLET0 = 185, + + +JSOP_ENTERLET1 = 186, + + + + +JSOP_UINT24 = 187, + +JSOP_UNUSED18 = 188, +JSOP_UNUSED19 = 189, +JSOP_UNUSED20 = 190, + + + + +JSOP_STARTXML = 191, +JSOP_STARTXMLEXPR = 192, + +JSOP_CALLELEM = 193, + + + + + +JSOP_STOP = 194, + + + + + +JSOP_GETXPROP = 195, + +JSOP_CALLXMLNAME = 196, + + + + +JSOP_TYPEOFEXPR = 197, + + + + +JSOP_ENTERBLOCK = 198, +JSOP_LEAVEBLOCK = 199, + + +JSOP_UNUSED1 = 200, +JSOP_UNUSED2 = 201, + + + + +JSOP_GENERATOR = 202, +JSOP_YIELD = 203, +JSOP_ARRAYPUSH = 204, + + + + +JSOP_GETFUNNS = 205, + + + + +JSOP_ENUMCONSTELEM = 206, + + + + + +JSOP_LEAVEBLOCKEXPR = 207, + +JSOP_UNUSED21 = 208, +JSOP_UNUSED22 = 209, +JSOP_UNUSED23 = 210, + +JSOP_CALLGNAME = 211, +JSOP_CALLLOCAL = 212, +JSOP_CALLARG = 213, +JSOP_BINDGNAME = 214, + + + + +JSOP_INT8 = 215, +JSOP_INT32 = 216, + + + + +JSOP_LENGTH = 217, + + + + + + +JSOP_HOLE = 218, + +JSOP_UNUSED17 = 219, +JSOP_UNUSED24 = 220, +JSOP_UNUSED25 = 221, +JSOP_UNUSED29 = 222, +JSOP_UNUSED30 = 223, + +JSOP_REST = 224, + + +JSOP_TOID = 225, + + +JSOP_IMPLICITTHIS = 226, + + +JSOP_LOOPENTRY = 227, + +JSOP_ACTUALSFILLED = 228, +# 27 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.h" 2 +#undef OPDEF + JSOP_LIMIT, + + + + + + + JSOP_GETPROP2 = JSOP_LIMIT, + JSOP_GETELEM2 = JSOP_LIMIT + 1, + JSOP_FORLOCAL = JSOP_LIMIT + 2, + JSOP_FAKE_LIMIT = JSOP_FORLOCAL +} JSOp; + + + + +#define JOF_BYTE 0 +#define JOF_JUMP 1 +#define JOF_ATOM 2 +#define JOF_UINT16 3 +#define JOF_TABLESWITCH 4 +#define JOF_LOOKUPSWITCH 5 +#define JOF_QARG 6 +#define JOF_LOCAL 7 +#define JOF_DOUBLE 8 +#define JOF_UINT24 12 +#define JOF_UINT8 13 + +#define JOF_INT32 14 +#define JOF_OBJECT 15 +#define JOF_SLOTOBJECT 16 +#define JOF_REGEXP 17 +#define JOF_INT8 18 +#define JOF_ATOMOBJECT 19 +#define JOF_UINT16PAIR 20 +#define JOF_SCOPECOORD 21 +#define JOF_TYPEMASK 0x001f + +#define JOF_NAME (1U<<5) +#define JOF_PROP (2U<<5) +#define JOF_ELEM (3U<<5) +#define JOF_XMLNAME (4U<<5) +#define JOF_MODEMASK (7U<<5) +#define JOF_SET (1U<<8) +#define JOF_DEL (1U<<9) +#define JOF_DEC (1U<<10) +#define JOF_INC (2U<<10) +#define JOF_INCDEC (3U<<10) +#define JOF_POST (1U<<12) +#define JOF_ASSIGNING JOF_SET + +#define JOF_DETECTING (1U<<14) +#define JOF_BACKPATCH (1U<<15) +#define JOF_LEFTASSOC (1U<<16) +#define JOF_DECLARING (1U<<17) + +#define JOF_PARENHEAD (1U<<20) + +#define JOF_INVOKE (1U<<21) +#define JOF_TMPSLOT (1U<<22) + + +#define JOF_TMPSLOT2 (2U<<22) + +#define JOF_TMPSLOT3 (3U<<22) + +#define JOF_TMPSLOT_SHIFT 22 +#define JOF_TMPSLOT_MASK (JS_BITMASK(2) << JOF_TMPSLOT_SHIFT) + + +#define JOF_GNAME (1U<<25) +#define JOF_TYPESET (1U<<26) +#define JOF_DECOMPOSE (1U<<27) + +#define JOF_ARITH (1U<<28) + + +#define JOF_TYPE(fmt) ((fmt) & JOF_TYPEMASK) +#define JOF_OPTYPE(op) JOF_TYPE(js_CodeSpec[op].format) + + +#define JOF_MODE(fmt) ((fmt) & JOF_MODEMASK) +#define JOF_OPMODE(op) JOF_MODE(js_CodeSpec[op].format) + +#define JOF_TYPE_IS_EXTENDED_JUMP(t) ((unsigned)((t) - JOF_JUMP) <= (unsigned)(JOF_LOOKUPSWITCH - JOF_JUMP)) + + + + + + +static __attribute__((always_inline)) inline uint8_t +GET_UINT8(jsbytecode *pc) +{ + return (uint8_t) pc[1]; +} + +static __attribute__((always_inline)) inline void +SET_UINT8(jsbytecode *pc, uint8_t u) +{ + pc[1] = (jsbytecode) u; +} + + +#define UINT16_LEN 2 +#define UINT16_HI(i) ((jsbytecode)((i) >> 8)) +#define UINT16_LO(i) ((jsbytecode)(i)) +#define GET_UINT16(pc) ((unsigned)(((pc)[1] << 8) | (pc)[2])) +#define SET_UINT16(pc,i) ((pc)[1] = UINT16_HI(i), (pc)[2] = UINT16_LO(i)) +#define UINT16_LIMIT ((unsigned)1 << 16) + + +#define JUMP_OFFSET_LEN 4 +#define JUMP_OFFSET_MIN INT32_MIN +#define JUMP_OFFSET_MAX INT32_MAX + +static __attribute__((always_inline)) inline int32_t +GET_JUMP_OFFSET(jsbytecode *pc) +{ + return (pc[1] << 24) | (pc[2] << 16) | (pc[3] << 8) | pc[4]; +} + +static __attribute__((always_inline)) inline void +SET_JUMP_OFFSET(jsbytecode *pc, int32_t off) +{ + pc[1] = (jsbytecode)(off >> 24); + pc[2] = (jsbytecode)(off >> 16); + pc[3] = (jsbytecode)(off >> 8); + pc[4] = (jsbytecode)off; +} + +#define UINT32_INDEX_LEN 4 + +static __attribute__((always_inline)) inline uint32_t +GET_UINT32_INDEX(const jsbytecode *pc) +{ + return (pc[1] << 24) | (pc[2] << 16) | (pc[3] << 8) | pc[4]; +} + +static __attribute__((always_inline)) inline void +SET_UINT32_INDEX(jsbytecode *pc, uint32_t index) +{ + pc[1] = (jsbytecode)(index >> 24); + pc[2] = (jsbytecode)(index >> 16); + pc[3] = (jsbytecode)(index >> 8); + pc[4] = (jsbytecode)index; +} + +#define UINT24_HI(i) ((jsbytecode)((i) >> 16)) +#define UINT24_MID(i) ((jsbytecode)((i) >> 8)) +#define UINT24_LO(i) ((jsbytecode)(i)) +#define GET_UINT24(pc) ((jsatomid)(((pc)[1] << 16) | ((pc)[2] << 8) | (pc)[3])) + + +#define SET_UINT24(pc,i) ((pc)[1] = UINT24_HI(i), (pc)[2] = UINT24_MID(i), (pc)[3] = UINT24_LO(i)) + + + +#define GET_INT8(pc) (int8_t((pc)[1])) + +#define GET_INT32(pc) (((uint32_t((pc)[1]) << 24) | (uint32_t((pc)[2]) << 16) | (uint32_t((pc)[3]) << 8) | uint32_t((pc)[4]))) + + + +#define SET_INT32(pc,i) ((pc)[1] = (jsbytecode)(uint32_t(i) >> 24), (pc)[2] = (jsbytecode)(uint32_t(i) >> 16), (pc)[3] = (jsbytecode)(uint32_t(i) >> 8), (pc)[4] = (jsbytecode)uint32_t(i)) + + + + + +#define INDEX_LIMIT_LOG2 23 +#define INDEX_LIMIT (uint32_t(1) << INDEX_LIMIT_LOG2) + + +#define ARGC_HI(argc) UINT16_HI(argc) +#define ARGC_LO(argc) UINT16_LO(argc) +#define GET_ARGC(pc) GET_UINT16(pc) +#define ARGC_LIMIT UINT16_LIMIT + + +#define GET_ARGNO(pc) GET_UINT16(pc) +#define SET_ARGNO(pc,argno) SET_UINT16(pc,argno) +#define ARGNO_LEN 2 +#define ARGNO_LIMIT UINT16_LIMIT + +#define GET_SLOTNO(pc) GET_UINT16(pc) +#define SET_SLOTNO(pc,varno) SET_UINT16(pc,varno) +#define SLOTNO_LEN 2 +#define SLOTNO_LIMIT UINT16_LIMIT + +struct JSCodeSpec { + int8_t length; + int8_t nuses; + int8_t ndefs; + uint8_t prec; + uint32_t format; + + uint32_t type() const { return ((format) & 0x001f); } +}; + +extern const JSCodeSpec js_CodeSpec[]; +extern unsigned js_NumCodeSpecs; +extern const char *js_CodeName[]; +extern const char js_EscapeMap[]; +# 244 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.h" +extern JSString * +js_QuoteString(JSContext *cx, JSString *str, jschar quote); +# 258 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.h" +extern JSPrinter * +js_NewPrinter(JSContext *cx, const char *name, JSFunction *fun, + unsigned indent, JSBool pretty, JSBool grouped, JSBool strict); + +extern void +js_DestroyPrinter(JSPrinter *jp); + +extern JSString * +js_GetPrinterOutput(JSPrinter *jp); + +extern int +js_printf(JSPrinter *jp, const char *format, ...); + +extern JSBool +js_puts(JSPrinter *jp, const char *s); + +#define GET_ATOM_FROM_BYTECODE(script,pc,pcoff,atom) JS_BEGIN_MACRO JS_ASSERT(js_CodeSpec[*(pc)].format & JOF_ATOM); (atom) = (script)->getAtom(GET_UINT32_INDEX((pc) + (pcoff))); JS_END_MACRO + + + + + +#define GET_NAME_FROM_BYTECODE(script,pc,pcoff,name) JS_BEGIN_MACRO JSAtom *atom_; GET_ATOM_FROM_BYTECODE(script, pc, pcoff, atom_); JS_ASSERT(js_CodeSpec[*(pc)].format & (JOF_NAME | JOF_PROP)); (name) = atom_->asPropertyName(); JS_END_MACRO + + + + + + + +namespace js { + +extern unsigned +StackUses(JSScript *script, jsbytecode *pc); + +extern unsigned +StackDefs(JSScript *script, jsbytecode *pc); + +} + + + + +extern JSBool +js_DecompileScript(JSPrinter *jp, JSScript *script); + +extern JSBool +js_DecompileFunctionBody(JSPrinter *jp); + +extern JSBool +js_DecompileFunction(JSPrinter *jp); +# 317 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.h" +typedef JSBool (* JSDecompilerPtr)(JSPrinter *); + +extern JSString * +js_DecompileToString(JSContext *cx, const char *name, JSFunction *fun, + unsigned indent, JSBool pretty, JSBool grouped, JSBool strict, + JSDecompilerPtr decompiler); +# 336 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.h" +extern char * +js_DecompileValueGenerator(JSContext *cx, int spindex, jsval v, + JSString *fallback); + + + + + +extern unsigned +js_ReconstructStackDepth(JSContext *cx, JSScript *script, jsbytecode *pc); + + + + + +} + +#define JSDVG_IGNORE_STACK 0 +#define JSDVG_SEARCH_STACK 1 + + + + +extern size_t +js_GetVariableBytecodeLength(jsbytecode *pc); + +namespace js { + +static inline char * +DecompileValueGenerator(JSContext *cx, int spindex, const Value &v, + JSString *fallback) +{ + return js_DecompileValueGenerator(cx, spindex, v, fallback); +} + + + + +class Sprinter +{ + public: + struct InvariantChecker + { + const Sprinter *parent; + + explicit InvariantChecker(const Sprinter *p) : parent(p) { + parent->checkInvariants(); + } + + ~InvariantChecker() { + parent->checkInvariants(); + } + }; + + JSContext *context; + + private: + static const size_t DefaultSize; + + + + char *base; + size_t size; + ptrdiff_t offset; + + bool realloc_(size_t newSize); + + public: + explicit Sprinter(JSContext *cx); + ~Sprinter(); + + + bool init(); + + void checkInvariants() const; + + const char *string() const; + const char *stringEnd() const; + + char *stringAt(ptrdiff_t off) const; + + char &operator[](size_t off); + + bool empty() const; + + + + + + + char *reserve(size_t len); + + char *reserveAndClear(size_t len); + + + + + + ptrdiff_t put(const char *s, size_t len); + ptrdiff_t put(const char *s); + ptrdiff_t putString(JSString *str); + + + int printf(const char *fmt, ...); + + + void setOffset(const char *end); + void setOffset(ptrdiff_t off); + + + ptrdiff_t getOffset() const; + ptrdiff_t getOffsetOf(const char *string) const; +}; + +extern ptrdiff_t +Sprint(Sprinter *sp, const char *format, ...); + +extern bool +CallResultEscapes(jsbytecode *pc); + +static inline unsigned +GetDecomposeLength(jsbytecode *pc, size_t len) +{ + + + + + do { } while(0); + return (unsigned) pc[len - 1]; +} + +static inline unsigned +GetBytecodeLength(jsbytecode *pc) +{ + JSOp op = (JSOp)*pc; + do { } while(0); + + if (js_CodeSpec[op].length != -1) + return js_CodeSpec[op].length; + return js_GetVariableBytecodeLength(pc); +} + +extern bool +IsValidBytecodeOffset(JSContext *cx, JSScript *script, size_t offset); + +inline bool +FlowsIntoNext(JSOp op) +{ + + return op != JSOP_STOP && op != JSOP_RETURN && op != JSOP_RETRVAL && op != JSOP_THROW && + op != JSOP_GOTO && op != JSOP_RETSUB; +} + + + + + + +class PCCounts +{ + friend struct ::JSScript; + double *counts; + + + + + public: + + enum BaseCounts { + BASE_INTERP = 0, + BASE_METHODJIT, + + BASE_METHODJIT_STUBS, + BASE_METHODJIT_CODE, + BASE_METHODJIT_PICS, + + BASE_LIMIT + }; + + enum AccessCounts { + ACCESS_MONOMORPHIC = BASE_LIMIT, + ACCESS_DIMORPHIC, + ACCESS_POLYMORPHIC, + + ACCESS_BARRIER, + ACCESS_NOBARRIER, + + ACCESS_UNDEFINED, + ACCESS_NULL, + ACCESS_BOOLEAN, + ACCESS_INT32, + ACCESS_DOUBLE, + ACCESS_STRING, + ACCESS_OBJECT, + + ACCESS_LIMIT + }; + + static bool accessOp(JSOp op) { + + + + + if (op == JSOP_SETELEM || op == JSOP_SETPROP) + return true; + int format = js_CodeSpec[op].format; + return !!(format & ((1U<<5) | (1U<<25) | (3U<<5) | (2U<<5))) + && !(format & ((1U<<8) | (3U<<10))); + } + + enum ElementCounts { + ELEM_ID_INT = ACCESS_LIMIT, + ELEM_ID_DOUBLE, + ELEM_ID_OTHER, + ELEM_ID_UNKNOWN, + + ELEM_OBJECT_TYPED, + ELEM_OBJECT_PACKED, + ELEM_OBJECT_DENSE, + ELEM_OBJECT_OTHER, + + ELEM_LIMIT + }; + + static bool elementOp(JSOp op) { + return accessOp(op) && (((js_CodeSpec[op].format) & (7U<<5)) == (3U<<5)); + } + + enum PropertyCounts { + PROP_STATIC = ACCESS_LIMIT, + PROP_DEFINITE, + PROP_OTHER, + + PROP_LIMIT + }; + + static bool propertyOp(JSOp op) { + return accessOp(op) && (((js_CodeSpec[op].format) & (7U<<5)) == (2U<<5)); + } + + enum ArithCounts { + ARITH_INT = BASE_LIMIT, + ARITH_DOUBLE, + ARITH_OTHER, + ARITH_UNKNOWN, + + ARITH_LIMIT + }; + + static bool arithOp(JSOp op) { + return !!(js_CodeSpec[op].format & ((3U<<10) | (1U<<28))); + } + + static size_t numCounts(JSOp op) + { + if (accessOp(op)) { + if (elementOp(op)) + return ELEM_LIMIT; + if (propertyOp(op)) + return PROP_LIMIT; + return ACCESS_LIMIT; + } + if (arithOp(op)) + return ARITH_LIMIT; + return BASE_LIMIT; + } + + static const char *countName(JSOp op, size_t which); + + double *rawCounts() { return counts; } + + double& get(size_t which) { + do { } while(0); + return counts[which]; + } + + + operator void*() const { + return counts; + } +}; + +} +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" 1 +# 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" 2 + + + + + + + +typedef enum JSTryNoteKind { + JSTRY_CATCH, + JSTRY_FINALLY, + JSTRY_ITER +} JSTryNoteKind; + + + + +struct JSTryNote { + uint8_t kind; + uint8_t padding; + uint16_t stackDepth; + uint32_t start; + + uint32_t length; +}; + +namespace js { + +struct ConstArray { + js::HeapValue *vector; + uint32_t length; +}; + +struct ObjectArray { + js::HeapPtrObject *vector; + uint32_t length; +}; + +struct TryNoteArray { + JSTryNote *vector; + uint32_t length; +}; + +struct ClosedSlotArray { + uint32_t *vector; + uint32_t length; +}; + +struct Shape; + +enum BindingKind { NONE, ARGUMENT, VARIABLE, CONSTANT }; + +struct BindingName { + JSAtom *maybeAtom; + BindingKind kind; +}; + +typedef Vector BindingNames; + + + + + + + +class Bindings +{ + HeapPtr lastBinding; + uint16_t nargs; + uint16_t nvars; + bool hasDup_:1; + + inline Shape *initialShape(JSContext *cx) const; + public: + inline Bindings(JSContext *cx); + + + + + + + inline void transfer(JSContext *cx, Bindings *bindings); + + + + + + + inline void clone(JSContext *cx, Bindings *bindings); + + uint16_t numArgs() const { return nargs; } + uint16_t numVars() const { return nvars; } + unsigned count() const { return nargs + nvars; } + + + + + + bool bindingIsArg(uint16_t i) const { return i < nargs; } + bool bindingIsLocal(uint16_t i) const { return i >= nargs; } + uint16_t argToBinding(uint16_t i) { do { } while(0); return i; } + uint16_t localToBinding(uint16_t i) { return i + nargs; } + uint16_t bindingToArg(uint16_t i) { do { } while(0); return i; } + uint16_t bindingToLocal(uint16_t i) { do { } while(0); return i - nargs; } + + + inline bool ensureShape(JSContext *cx); + + + inline Shape *lastShape() const; + + + + + + Shape *callObjectShape(JSContext *cx) const; + + + inline bool extensibleParents(); + bool setExtensibleParents(JSContext *cx); + + bool setParent(JSContext *cx, JSObject *obj); + + enum { + + BINDING_COUNT_LIMIT = 0xFFFF + }; +# 162 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" + bool add(JSContext *cx, HandleAtom name, BindingKind kind); + + + bool addVariable(JSContext *cx, HandleAtom name) { + return add(cx, name, VARIABLE); + } + bool addConstant(JSContext *cx, HandleAtom name) { + return add(cx, name, CONSTANT); + } + bool addArgument(JSContext *cx, HandleAtom name, uint16_t *slotp) { + do { } while(0); + *slotp = nargs; + return add(cx, name, ARGUMENT); + } + bool addDestructuring(JSContext *cx, uint16_t *slotp) { + *slotp = nargs; + return add(cx, RootedAtom(cx), ARGUMENT); + } + + void noteDup() { hasDup_ = true; } + bool hasDup() const { return hasDup_; } + + + + + + + + BindingKind lookup(JSContext *cx, JSAtom *name, unsigned *indexp) const; + + + bool hasBinding(JSContext *cx, JSAtom *name) const { + return lookup(cx, name, __null) != NONE; + } +# 206 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" + bool getLocalNameArray(JSContext *cx, BindingNames *namesp); + + + + + + + void makeImmutable(); +# 224 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" + const js::Shape *lastArgument() const; + const js::Shape *lastVariable() const; + + void trace(JSTracer *trc); + + class AutoRooter : private AutoGCRooter + { + public: + explicit AutoRooter(JSContext *cx, Bindings *bindings_ + ) + : AutoGCRooter(cx, BINDINGS), bindings(bindings_), skip(cx, bindings_) + { + do { } while (0); + } + + friend void AutoGCRooter::trace(JSTracer *trc); + void trace(JSTracer *trc); + + private: + Bindings *bindings; + SkipRoot skip; + + }; +}; + +} + +#define JS_OBJECT_ARRAY_SIZE(length) (offsetof(ObjectArray, vector) + sizeof(JSObject *) * (length)) + + + +namespace JSC { + class ExecutablePool; +} + +namespace js { +namespace mjit { + struct JITScript; + class CallCompiler; +} +} + + + +namespace js { + +namespace analyze { class ScriptAnalysis; } + +class ScriptCounts +{ + friend struct ::JSScript; + friend struct ScriptAndCounts; + + + + + + PCCounts *pcCountsVector; + + public: + ScriptCounts() : pcCountsVector(__null) { } + + inline void destroy(FreeOp *fop); + + void set(js::ScriptCounts counts) { + pcCountsVector = counts.pcCountsVector; + } +}; + +typedef HashMap, + SystemAllocPolicy> ScriptCountsMap; + +typedef HashMap, + SystemAllocPolicy> SourceMapMap; + +class DebugScript +{ + friend struct ::JSScript; +# 314 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" + uint32_t stepMode; + + + uint32_t numSites; + + + + + + BreakpointSite *breakpoints[1]; +}; + +typedef HashMap, + SystemAllocPolicy> DebugScriptMap; + +} + +struct JSScript : public js::gc::Cell +{ + private: + static const uint32_t stepFlagMask = 0x80000000U; + static const uint32_t stepCountMask = 0x7fffffffU; + + public: + + + + + + class JITScriptHandle + { + + + friend class js::mjit::CallCompiler; +# 358 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" + static const js::mjit::JITScript *UNJITTABLE; + js::mjit::JITScript *value; + + public: + JITScriptHandle() { value = __null; } + + bool isEmpty() { return value == __null; } + bool isUnjittable() { return value == UNJITTABLE; } + bool isValid() { return value > UNJITTABLE; } + + js::mjit::JITScript *getValid() { + do { } while(0); + return value; + } + + void setEmpty() { value = __null; } + void setUnjittable() { value = const_cast(UNJITTABLE); } + void setValid(js::mjit::JITScript *jit) { + value = jit; + do { } while(0); + } + + static void staticAsserts(); + }; + + + struct JITScriptSet + { + JITScriptHandle jitHandleNormal; + JITScriptHandle jitHandleNormalBarriered; + JITScriptHandle jitHandleCtor; + JITScriptHandle jitHandleCtorBarriered; + + static size_t jitHandleOffset(bool constructing, bool barriers) { + return constructing + ? (barriers + ? __builtin_offsetof (JITScriptSet, jitHandleCtorBarriered) + : __builtin_offsetof (JITScriptSet, jitHandleCtor)) + : (barriers + ? __builtin_offsetof (JITScriptSet, jitHandleNormalBarriered) + : __builtin_offsetof (JITScriptSet, jitHandleNormal)); + } + }; +# 411 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" + public: + js::Bindings bindings; + + + + + public: + jsbytecode *code; + uint8_t *data; + + + const char *filename; + js::HeapPtrAtom *atoms; + + JSPrincipals *principals; + JSPrincipals *originPrincipals; +# 439 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" + js::HeapPtr globalObject; + + + js::types::TypeScript *types; + + private: + + JITScriptSet *jitInfo; + + + js::HeapPtrFunction function_; + + + + public: + uint32_t length; + + uint32_t lineno; + + uint32_t mainOffset; + + + uint32_t natoms; + + private: + uint32_t useCount; + + + + + uint32_t pad32; +# 482 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" + private: + uint16_t version; + + public: + uint16_t nfixed; + + + uint16_t nTypeSets; + + + uint16_t nslots; + uint16_t staticLevel; + + private: + uint16_t argsSlot_; + + + + public: + + enum ArrayKind { + CONSTS, + OBJECTS, + REGEXPS, + TRYNOTES, + CLOSED_ARGS, + CLOSED_VARS, + LIMIT + }; + + typedef uint8_t ArrayBitsT; + + private: + + + + ArrayBitsT hasArrayBits; + + + + public: + bool noScriptRval:1; + + bool savedCallerFun:1; + bool strictModeCode:1; + bool compileAndGo:1; + bool bindingsAccessedDynamically:1; + bool warnedAboutTwoArgumentEval:1; + + + bool warnedAboutUndefinedProp:1; + + + bool hasSingletons:1; + bool isOuterFunction:1; + bool isInnerFunction:1; + + bool isActiveEval:1; + bool isCachedEval:1; + bool uninlineable:1; + bool reentrantOuterFunction:1; + bool typesPurged:1; + + bool debugMode:1; + bool failedBoundsCheck:1; + + bool callDestroyHook:1; + bool isGenerator:1; + bool hasScriptCounts:1; + + bool hasSourceMap:1; + + bool hasDebugScript:1; + + + private: + + bool argsHasLocalBinding_:1; + bool needsArgsAnalysis_:1; + bool needsArgsObj_:1; +# 578 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" + public: + static JSScript *NewScript(JSContext *cx, uint32_t length, uint32_t nsrcnotes, uint32_t natoms, + uint32_t nobjects, uint32_t nregexps, + uint32_t ntrynotes, uint32_t nconsts, + uint16_t nClosedArgs, uint16_t nClosedVars, uint32_t nTypeSets, + JSVersion version); + static JSScript *NewScriptFromEmitter(JSContext *cx, js::BytecodeEmitter *bce); + + void setVersion(JSVersion v) { version = v; } + + + bool argumentsHasLocalBinding() const { return argsHasLocalBinding_; } + jsbytecode *argumentsBytecode() const { do { } while(0); return code; } + unsigned argumentsLocalSlot() const { do { } while(0); return argsSlot_; } + void setArgumentsHasLocalBinding(uint16_t slot); +# 604 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" + bool analyzedArgsUsage() const { return !needsArgsAnalysis_; } + bool needsArgsObj() const { do { } while(0); return needsArgsObj_; } + void setNeedsArgsObj(bool needsArgsObj); + static bool applySpeculationFailed(JSContext *cx, JSScript *script); +# 618 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" + bool argsObjAliasesFormals() const { + return needsArgsObj() && !strictModeCode; + } + + + JSScript *&evalHashLink() { return *globalObject.unsafeGetUnioned(); } + + + + + + JSFunction *function() const { return function_; } + void setFunction(JSFunction *fun); + + + + + unsigned id() { return 0; } + + + + inline bool ensureHasTypes(JSContext *cx); + + + + + + + + inline bool ensureRanAnalysis(JSContext *cx, JSObject *scope); + + + inline bool ensureRanInference(JSContext *cx); + + inline bool hasAnalysis(); + inline void clearAnalysis(); + inline js::analyze::ScriptAnalysis *analysis(); + + + + + + bool typeSetFunction(JSContext *cx, JSFunction *fun, bool singleton = false); + + inline bool hasGlobal() const; + inline bool hasClearedGlobal() const; + + inline js::GlobalObject *global() const; + inline js::types::TypeScriptNesting *nesting() const; + + inline void clearNesting(); + + + js::GlobalObject *getGlobalObjectOrNull() const { + return (isCachedEval || isActiveEval) ? __null : globalObject.get(); + } + + private: + bool makeTypes(JSContext *cx); + bool makeAnalysis(JSContext *cx); + + + private: + + + friend class js::mjit::CallCompiler; + + public: + bool hasJITInfo() { + return jitInfo != __null; + } + + static size_t offsetOfJITInfo() { return __builtin_offsetof (JSScript, jitInfo); } + + inline bool ensureHasJITInfo(JSContext *cx); + inline void destroyJITInfo(js::FreeOp *fop); + + JITScriptHandle *jitHandle(bool constructing, bool barriers) { + do { } while(0); + return constructing + ? (barriers ? &jitInfo->jitHandleCtorBarriered : &jitInfo->jitHandleCtor) + : (barriers ? &jitInfo->jitHandleNormalBarriered : &jitInfo->jitHandleNormal); + } + + js::mjit::JITScript *getJIT(bool constructing, bool barriers) { + if (!jitInfo) + return __null; + JITScriptHandle *jith = jitHandle(constructing, barriers); + return jith->isValid() ? jith->getValid() : __null; + } + + static void ReleaseCode(js::FreeOp *fop, JITScriptHandle *jith); + + + inline void **nativeMap(bool constructing); + inline void *nativeCodeForPC(bool constructing, jsbytecode *pc); + + uint32_t getUseCount() const { return useCount; } + uint32_t incUseCount() { return ++useCount; } + uint32_t *addressOfUseCount() { return &useCount; } + void resetUseCount() { useCount = 0; } + + + + + + + size_t sizeOfJitScripts(JSMallocSizeOfFun mallocSizeOf); + + + public: + bool initScriptCounts(JSContext *cx); + js::PCCounts getPCCounts(jsbytecode *pc); + js::ScriptCounts releaseScriptCounts(); + void destroyScriptCounts(js::FreeOp *fop); + + bool setSourceMap(JSContext *cx, jschar *sourceMap); + jschar *getSourceMap(); + jschar *releaseSourceMap(); + void destroySourceMap(js::FreeOp *fop); + + jsbytecode *main() { + return code + mainOffset; + } + + + + + + + size_t computedSizeOfData(); + size_t sizeOfData(JSMallocSizeOfFun mallocSizeOf); + + uint32_t numNotes(); + + + jssrcnote *notes() { return (jssrcnote *)(code + length); } + + bool hasArray(ArrayKind kind) { return (hasArrayBits & (1 << kind)); } + void setHasArray(ArrayKind kind) { hasArrayBits |= (1 << kind); } + void cloneHasArray(JSScript *script) { hasArrayBits = script->hasArrayBits; } + + bool hasConsts() { return hasArray(CONSTS); } + bool hasObjects() { return hasArray(OBJECTS); } + bool hasRegexps() { return hasArray(REGEXPS); } + bool hasTrynotes() { return hasArray(TRYNOTES); } + bool hasClosedArgs() { return hasArray(CLOSED_ARGS); } + bool hasClosedVars() { return hasArray(CLOSED_VARS); } + +#define OFF(fooOff,hasFoo,t) (fooOff() + (hasFoo() ? sizeof(t) : 0)) + + size_t constsOffset() { return 0; } + size_t objectsOffset() { return (constsOffset() + (hasConsts() ? sizeof(js::ConstArray) : 0)); } + size_t regexpsOffset() { return (objectsOffset() + (hasObjects() ? sizeof(js::ObjectArray) : 0)); } + size_t trynotesOffset() { return (regexpsOffset() + (hasRegexps() ? sizeof(js::ObjectArray) : 0)); } + size_t closedArgsOffset() { return (trynotesOffset() + (hasTrynotes() ? sizeof(js::TryNoteArray) : 0)); } + size_t closedVarsOffset() { return (closedArgsOffset() + (hasClosedArgs() ? sizeof(js::ClosedSlotArray) : 0)); } + + js::ConstArray *consts() { + do { } while(0); + return reinterpret_cast(data + constsOffset()); + } + + js::ObjectArray *objects() { + do { } while(0); + return reinterpret_cast(data + objectsOffset()); + } + + js::ObjectArray *regexps() { + do { } while(0); + return reinterpret_cast(data + regexpsOffset()); + } + + js::TryNoteArray *trynotes() { + do { } while(0); + return reinterpret_cast(data + trynotesOffset()); + } + + js::ClosedSlotArray *closedArgs() { + do { } while(0); + return reinterpret_cast(data + closedArgsOffset()); + } + + js::ClosedSlotArray *closedVars() { + do { } while(0); + return reinterpret_cast(data + closedVarsOffset()); + } + + uint32_t numClosedArgs() { + return hasClosedArgs() ? closedArgs()->length : 0; + } + + uint32_t numClosedVars() { + return hasClosedVars() ? closedVars()->length : 0; + } + + js::HeapPtrAtom &getAtom(size_t index) const { + do { } while(0); + return atoms[index]; + } + + js::PropertyName *getName(size_t index) { + return getAtom(index)->asPropertyName(); + } + + JSObject *getObject(size_t index) { + js::ObjectArray *arr = objects(); + do { } while(0); + return arr->vector[index]; + } + + JSVersion getVersion() const { + return JSVersion(version); + } + + inline JSFunction *getFunction(size_t index); + inline JSFunction *getCallerFunction(); + + inline JSObject *getRegExp(size_t index); + + const js::Value &getConst(size_t index) { + js::ConstArray *arr = consts(); + do { } while(0); + return arr->vector[index]; + } + + + + + + + inline bool isEmpty() const; + + uint32_t getClosedArg(uint32_t index) { + js::ClosedSlotArray *arr = closedArgs(); + do { } while(0); + return arr->vector[index]; + } + + uint32_t getClosedVar(uint32_t index) { + js::ClosedSlotArray *arr = closedVars(); + do { } while(0); + return arr->vector[index]; + } +# 870 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" + private: + + + + + void recompileForStepMode(js::FreeOp *fop); + + + bool tryNewStepMode(JSContext *cx, uint32_t newValue); + + bool ensureHasDebugScript(JSContext *cx); + js::DebugScript *debugScript(); + js::DebugScript *releaseDebugScript(); + void destroyDebugScript(js::FreeOp *fop); + + public: + bool hasBreakpointsAt(jsbytecode *pc) { return !!getBreakpointSite(pc); } + bool hasAnyBreakpointsOrStepMode() { return hasDebugScript; } + + js::BreakpointSite *getBreakpointSite(jsbytecode *pc) + { + do { } while(0); + return hasDebugScript ? debugScript()->breakpoints[pc - code] : __null; + } + + js::BreakpointSite *getOrCreateBreakpointSite(JSContext *cx, jsbytecode *pc, + js::GlobalObject *scriptGlobal); + + void destroyBreakpointSite(js::FreeOp *fop, jsbytecode *pc); + + void clearBreakpointsIn(js::FreeOp *fop, js::Debugger *dbg, JSObject *handler); + void clearTraps(js::FreeOp *fop); + + void markTrapClosures(JSTracer *trc); + + + + + + + + bool setStepModeFlag(JSContext *cx, bool step); + + + + + + + + bool changeStepModeCount(JSContext *cx, int delta); + + bool stepModeEnabled() { return hasDebugScript && !!debugScript()->stepMode; } + + + + + + void finalize(js::FreeOp *fop); + + static inline void writeBarrierPre(JSScript *script); + static inline void writeBarrierPost(JSScript *script, void *addr); + + static inline js::ThingRootKind rootKind() { return js::THING_ROOT_SCRIPT; } + + static JSPrincipals *normalizeOriginPrincipals(JSPrincipals *principals, + JSPrincipals *originPrincipals) { + return originPrincipals ? originPrincipals : principals; + } + + void markChildren(JSTracer *trc); +}; + +typedef int moz_static_assert87[(sizeof(JSScript::ArrayBitsT) * 8 >= JSScript::LIMIT) ? 1 : -1]; + + +typedef int moz_static_assert88[(sizeof(JSScript) % js::gc::Cell::CellSize == 0) ? 1 : -1]; + +static inline unsigned +StackDepth(JSScript *script) +{ + return script->nslots - script->nfixed; +} + + + + + + + +extern __attribute__((visibility("default"))) void +js_CallNewScriptHook(JSContext *cx, JSScript *script, JSFunction *fun); + +namespace js { + +extern void +CallDestroyScriptHook(FreeOp *fop, JSScript *script); + +extern const char * +SaveScriptFilename(JSContext *cx, const char *filename); + +struct ScriptFilenameEntry +{ + bool marked; + char filename[1]; + + static ScriptFilenameEntry *fromFilename(const char *filename) { + return (ScriptFilenameEntry *)(filename - __builtin_offsetof (ScriptFilenameEntry, filename)); + } +}; + +struct ScriptFilenameHasher +{ + typedef const char *Lookup; + static HashNumber hash(const char *l) { return JS_HashString(l); } + static bool match(const ScriptFilenameEntry *e, const char *l) { + return strcmp(e->filename, l) == 0; + } +}; + +typedef HashSet ScriptFilenameTable; + +inline void +MarkScriptFilename(JSRuntime *rt, const char *filename); + +extern void +SweepScriptFilenames(JSRuntime *rt); + +extern void +FreeScriptFilenames(JSRuntime *rt); + +struct ScriptAndCounts +{ + JSScript *script; + ScriptCounts scriptCounts; + + PCCounts &getPCCounts(jsbytecode *pc) const { + do { } while(0); + return scriptCounts.pcCountsVector[pc - script->code]; + } +}; + +} + + + + + + +#define js_GetSrcNote(script,pc) js_GetSrcNoteCached(cx, script, pc) + +extern jssrcnote * +js_GetSrcNoteCached(JSContext *cx, JSScript *script, jsbytecode *pc); + +extern jsbytecode * +js_LineNumberToPC(JSScript *script, unsigned lineno); + +extern __attribute__((visibility("default"))) unsigned +js_GetScriptLineExtent(JSScript *script); + +namespace js { + +extern unsigned +PCToLineNumber(JSScript *script, jsbytecode *pc); + +extern unsigned +PCToLineNumber(unsigned startLine, jssrcnote *notes, jsbytecode *code, jsbytecode *pc); + +extern unsigned +CurrentLine(JSContext *cx); +# 1051 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" +enum LineOption { + CALLED_FROM_JSOP_EVAL, + NOT_CALLED_FROM_JSOP_EVAL +}; + +inline void +CurrentScriptFileLineOrigin(JSContext *cx, unsigned *linenop, LineOption = NOT_CALLED_FROM_JSOP_EVAL); + +extern JSScript * +CloneScript(JSContext *cx, JSScript *script); + + + + + + +template +bool +XDRScript(XDRState *xdr, JSScript **scriptp, JSScript *parentScript); + +} +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfun.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsstr.h" 1 +# 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfun.h" 2 +# 37 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfun.h" +#define JSFUN_PROTOTYPE 0x0800 + + +#define JSFUN_EXPR_CLOSURE 0x1000 +#define JSFUN_EXTENDED 0x2000 +#define JSFUN_INTERPRETED 0x4000 +#define JSFUN_NULL_CLOSURE 0x8000 +#define JSFUN_KINDMASK 0xc000 + + +namespace js { class FunctionExtended; } + +struct JSFunction : public JSObject +{ + uint16_t nargs; + + uint16_t flags; + union U { + js::Native native; + struct Scripted { + JSScript *script_; + + JSObject *env_; + + } i; + void *nativeOrScript; + } u; + js::HeapPtrAtom atom; + + bool hasDefaults() const { return flags & 0x0400; } + bool hasRest() const { return flags & 0x0100; } + bool isInterpreted() const { return kind() >= 0x4000; } + bool isNative() const { return !isInterpreted(); } + bool isNativeConstructor() const { return flags & 0x0200; } + bool isHeavyweight() const { return ((flags) & 0x80); } + bool isNullClosure() const { return kind() == 0x8000; } + bool isFunctionPrototype() const { return flags & 0x0800; } + bool isInterpretedConstructor() const { return isInterpreted() && !isFunctionPrototype(); } + + uint16_t kind() const { return flags & 0xc000; } + void setKind(uint16_t k) { + do { } while(0); + flags = (flags & ~0xc000) | k; + } + + + inline bool inStrictMode() const; + + void setArgCount(uint16_t nargs) { + do { } while(0); + this->nargs = nargs; + } + + void setHasRest() { + do { } while(0); + this->flags |= 0x0100; + } + + void setHasDefaults() { + do { } while(0); + this->flags |= 0x0400; + } + + + enum { MAX_ARGS_AND_VARS = 2 * ((1U << 16) - 1) }; + + + + + + inline JSObject *environment() const; + inline void setEnvironment(JSObject *obj); + inline void initEnvironment(JSObject *obj); + + static inline size_t offsetOfEnvironment() { return __builtin_offsetof (JSFunction, u.i.env_); } + + JSScript *script() const { + do { } while(0); + return *(js::HeapPtrScript *)&u.i.script_; + } + + js::HeapPtrScript &mutableScript() { + do { } while(0); + return *(js::HeapPtrScript *)&u.i.script_; + } + + inline void setScript(JSScript *script_); + inline void initScript(JSScript *script_); + + JSScript *maybeScript() const { + return isInterpreted() ? script() : __null; + } + + JSNative native() const { + do { } while(0); + return u.native; + } + + JSNative maybeNative() const { + return isInterpreted() ? __null : native(); + } + + static unsigned offsetOfNativeOrScript() { + typedef int moz_static_assert89[(__builtin_offsetof (U, native) == __builtin_offsetof (U, i.script_)) ? 1 : -1]; + typedef int moz_static_assert90[(__builtin_offsetof (U, native) == __builtin_offsetof (U, nativeOrScript)) ? 1 : -1]; + return __builtin_offsetof (JSFunction, u.nativeOrScript); + } + + + + static const js::gc::AllocKind FinalizeKind = js::gc::FINALIZE_OBJECT2_BACKGROUND; + static const js::gc::AllocKind ExtendedFinalizeKind = js::gc::FINALIZE_OBJECT4_BACKGROUND; +# 163 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfun.h" + inline void trace(JSTracer *trc); + + + + inline bool initBoundFunction(JSContext *cx, js::HandleValue thisArg, + const js::Value *args, unsigned argslen); + + inline JSObject *getBoundFunctionTarget() const; + inline const js::Value &getBoundFunctionThis() const; + inline const js::Value &getBoundFunctionArgument(unsigned which) const; + inline size_t getBoundFunctionArgumentCount() const; + + private: + inline js::FunctionExtended *toExtended(); + inline const js::FunctionExtended *toExtended() const; + + inline bool isExtended() const { + typedef int moz_static_assert91[(FinalizeKind != ExtendedFinalizeKind) ? 1 : -1]; + do { } while(0); + return !!(flags & 0x2000); + } + + public: + + inline void initializeExtended(); + inline void setExtendedSlot(size_t which, const js::Value &val); + inline const js::Value &getExtendedSlot(size_t which) const; + + private: + + + + + inline JSFunction *toFunction() ; + inline const JSFunction *toFunction() const ; +}; + +inline JSFunction * +JSObject::toFunction() +{ + do { } while(0); + return static_cast(this); +} + +inline const JSFunction * +JSObject::toFunction() const +{ + do { } while(0); + return static_cast(this); +} + +extern JSString * +fun_toStringHelper(JSContext *cx, JSObject *obj, unsigned indent); + +extern JSFunction * +js_NewFunction(JSContext *cx, JSObject *funobj, JSNative native, unsigned nargs, + unsigned flags, js::HandleObject parent, JSAtom *atom, + js::gc::AllocKind kind = JSFunction::FinalizeKind); + +extern JSFunction * +js_CloneFunctionObject(JSContext *cx, js::HandleFunction fun, + js::HandleObject parent, js::HandleObject proto, + js::gc::AllocKind kind = JSFunction::FinalizeKind); + +extern JSFunction * +js_DefineFunction(JSContext *cx, js::HandleObject obj, js::HandleId id, JSNative native, + unsigned nargs, unsigned flags, + js::gc::AllocKind kind = JSFunction::FinalizeKind); + + + + +#define JSV2F_CONSTRUCT INITIAL_CONSTRUCT +#define JSV2F_SEARCH_STACK 0x10000 + +extern JSFunction * +js_ValueToFunction(JSContext *cx, const js::Value *vp, unsigned flags); + +extern JSObject * +js_ValueToCallableObject(JSContext *cx, js::Value *vp, unsigned flags); + +extern void +js_ReportIsNotFunction(JSContext *cx, const js::Value *vp, unsigned flags); + +extern void +js_PutCallObject(js::StackFrame *fp, js::CallObject &callobj); + +namespace js { + + + + + + +class FunctionExtended : public JSFunction +{ + friend struct JSFunction; + + + HeapValue extendedSlots[2]; +}; + +} + +inline js::FunctionExtended * +JSFunction::toExtended() +{ + do { } while(0); + return static_cast(this); +} + +inline const js::FunctionExtended * +JSFunction::toExtended() const +{ + do { } while(0); + return static_cast(this); +} + +extern void +js_PutArgsObject(js::StackFrame *fp); + +inline bool +js_IsNamedLambda(JSFunction *fun) { return (fun->flags & 0x08) && fun->atom; } + +namespace js { + +template +bool +XDRInterpretedFunction(XDRState *xdr, JSObject **objp, JSScript *parentScript); + +extern JSObject * +CloneInterpretedFunction(JSContext *cx, JSFunction *fun); + +} + +extern JSBool +js_fun_apply(JSContext *cx, unsigned argc, js::Value *vp); + +extern JSBool +js_fun_call(JSContext *cx, unsigned argc, js::Value *vp); + +extern JSObject* +js_fun_bind(JSContext *cx, js::HandleObject target, js::HandleValue thisArg, + js::Value *boundArgs, unsigned argslen); +# 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" 2 +# 1 "./jsautooplen.h" 1 + + + + + +#define JSOP_NOP_LENGTH 1 +#define JSOP_UNDEFINED_LENGTH 1 +#define JSOP_POPV_LENGTH 1 +#define JSOP_ENTERWITH_LENGTH 1 +#define JSOP_LEAVEWITH_LENGTH 1 +#define JSOP_RETURN_LENGTH 1 +#define JSOP_GOTO_LENGTH 5 +#define JSOP_IFEQ_LENGTH 5 +#define JSOP_IFNE_LENGTH 5 +#define JSOP_ARGUMENTS_LENGTH 1 +#define JSOP_SWAP_LENGTH 1 +#define JSOP_POPN_LENGTH 3 +#define JSOP_DUP_LENGTH 1 +#define JSOP_DUP2_LENGTH 1 +#define JSOP_SETCONST_LENGTH 5 +#define JSOP_BITOR_LENGTH 1 +#define JSOP_BITXOR_LENGTH 1 +#define JSOP_BITAND_LENGTH 1 +#define JSOP_EQ_LENGTH 1 +#define JSOP_NE_LENGTH 1 +#define JSOP_LT_LENGTH 1 +#define JSOP_LE_LENGTH 1 +#define JSOP_GT_LENGTH 1 +#define JSOP_GE_LENGTH 1 +#define JSOP_LSH_LENGTH 1 +#define JSOP_RSH_LENGTH 1 +#define JSOP_URSH_LENGTH 1 +#define JSOP_ADD_LENGTH 1 +#define JSOP_SUB_LENGTH 1 +#define JSOP_MUL_LENGTH 1 +#define JSOP_DIV_LENGTH 1 +#define JSOP_MOD_LENGTH 1 +#define JSOP_NOT_LENGTH 1 +#define JSOP_BITNOT_LENGTH 1 +#define JSOP_NEG_LENGTH 1 +#define JSOP_POS_LENGTH 1 +#define JSOP_DELNAME_LENGTH 5 +#define JSOP_DELPROP_LENGTH 5 +#define JSOP_DELELEM_LENGTH 1 +#define JSOP_TYPEOF_LENGTH 1 +#define JSOP_VOID_LENGTH 1 +#define JSOP_INCNAME_LENGTH 6 +#define JSOP_INCPROP_LENGTH 6 +#define JSOP_INCELEM_LENGTH 2 +#define JSOP_DECNAME_LENGTH 6 +#define JSOP_DECPROP_LENGTH 6 +#define JSOP_DECELEM_LENGTH 2 +#define JSOP_NAMEINC_LENGTH 6 +#define JSOP_PROPINC_LENGTH 6 +#define JSOP_ELEMINC_LENGTH 2 +#define JSOP_NAMEDEC_LENGTH 6 +#define JSOP_PROPDEC_LENGTH 6 +#define JSOP_ELEMDEC_LENGTH 2 +#define JSOP_GETPROP_LENGTH 5 +#define JSOP_SETPROP_LENGTH 5 +#define JSOP_GETELEM_LENGTH 1 +#define JSOP_SETELEM_LENGTH 1 +#define JSOP_CALLNAME_LENGTH 5 +#define JSOP_CALL_LENGTH 3 +#define JSOP_NAME_LENGTH 5 +#define JSOP_DOUBLE_LENGTH 5 +#define JSOP_STRING_LENGTH 5 +#define JSOP_ZERO_LENGTH 1 +#define JSOP_ONE_LENGTH 1 +#define JSOP_NULL_LENGTH 1 +#define JSOP_THIS_LENGTH 1 +#define JSOP_FALSE_LENGTH 1 +#define JSOP_TRUE_LENGTH 1 +#define JSOP_OR_LENGTH 5 +#define JSOP_AND_LENGTH 5 +#define JSOP_TABLESWITCH_LENGTH -1 +#define JSOP_LOOKUPSWITCH_LENGTH -1 +#define JSOP_STRICTEQ_LENGTH 1 +#define JSOP_STRICTNE_LENGTH 1 +#define JSOP_SETCALL_LENGTH 1 +#define JSOP_ITER_LENGTH 2 +#define JSOP_MOREITER_LENGTH 1 +#define JSOP_ITERNEXT_LENGTH 2 +#define JSOP_ENDITER_LENGTH 1 +#define JSOP_FUNAPPLY_LENGTH 3 +#define JSOP_OBJECT_LENGTH 5 +#define JSOP_POP_LENGTH 1 +#define JSOP_NEW_LENGTH 3 +#define JSOP_UNUSED0_LENGTH 1 +#define JSOP_GETARG_LENGTH 3 +#define JSOP_SETARG_LENGTH 3 +#define JSOP_GETLOCAL_LENGTH 3 +#define JSOP_SETLOCAL_LENGTH 3 +#define JSOP_UINT16_LENGTH 3 +#define JSOP_NEWINIT_LENGTH 5 +#define JSOP_NEWARRAY_LENGTH 4 +#define JSOP_NEWOBJECT_LENGTH 5 +#define JSOP_ENDINIT_LENGTH 1 +#define JSOP_INITPROP_LENGTH 5 +#define JSOP_INITELEM_LENGTH 1 +#define JSOP_UNUSED14_LENGTH 1 +#define JSOP_UNUSED15_LENGTH 1 +#define JSOP_INCARG_LENGTH 3 +#define JSOP_DECARG_LENGTH 3 +#define JSOP_ARGINC_LENGTH 3 +#define JSOP_ARGDEC_LENGTH 3 +#define JSOP_INCLOCAL_LENGTH 3 +#define JSOP_DECLOCAL_LENGTH 3 +#define JSOP_LOCALINC_LENGTH 3 +#define JSOP_LOCALDEC_LENGTH 3 +#define JSOP_LEAVEFORLETIN_LENGTH 1 +#define JSOP_LABEL_LENGTH 5 +#define JSOP_UNUSED3_LENGTH 1 +#define JSOP_FUNCALL_LENGTH 3 +#define JSOP_LOOPHEAD_LENGTH 1 +#define JSOP_BINDNAME_LENGTH 5 +#define JSOP_SETNAME_LENGTH 5 +#define JSOP_THROW_LENGTH 1 +#define JSOP_IN_LENGTH 1 +#define JSOP_INSTANCEOF_LENGTH 1 +#define JSOP_DEBUGGER_LENGTH 1 +#define JSOP_GOSUB_LENGTH 5 +#define JSOP_RETSUB_LENGTH 1 +#define JSOP_EXCEPTION_LENGTH 1 +#define JSOP_LINENO_LENGTH 3 +#define JSOP_CONDSWITCH_LENGTH 1 +#define JSOP_CASE_LENGTH 5 +#define JSOP_DEFAULT_LENGTH 5 +#define JSOP_EVAL_LENGTH 3 +#define JSOP_ENUMELEM_LENGTH 1 +#define JSOP_GETTER_LENGTH 1 +#define JSOP_SETTER_LENGTH 1 +#define JSOP_DEFFUN_LENGTH 5 +#define JSOP_DEFCONST_LENGTH 5 +#define JSOP_DEFVAR_LENGTH 5 +#define JSOP_LAMBDA_LENGTH 5 +#define JSOP_CALLEE_LENGTH 1 +#define JSOP_UNUSED31_LENGTH 1 +#define JSOP_PICK_LENGTH 2 +#define JSOP_TRY_LENGTH 1 +#define JSOP_FINALLY_LENGTH 1 +#define JSOP_GETALIASEDVAR_LENGTH 9 +#define JSOP_CALLALIASEDVAR_LENGTH 9 +#define JSOP_SETALIASEDVAR_LENGTH 9 +#define JSOP_INCALIASEDVAR_LENGTH 10 +#define JSOP_DECALIASEDVAR_LENGTH 10 +#define JSOP_ALIASEDVARINC_LENGTH 10 +#define JSOP_ALIASEDVARDEC_LENGTH 10 +#define JSOP_UNUSED8_LENGTH 1 +#define JSOP_UNUSED9_LENGTH 1 +#define JSOP_UNUSED10_LENGTH 1 +#define JSOP_UNUSED11_LENGTH 1 +#define JSOP_UNUSED12_LENGTH 1 +#define JSOP_UNUSED13_LENGTH 1 +#define JSOP_BACKPATCH_LENGTH 5 +#define JSOP_BACKPATCH_POP_LENGTH 5 +#define JSOP_THROWING_LENGTH 1 +#define JSOP_SETRVAL_LENGTH 1 +#define JSOP_RETRVAL_LENGTH 1 +#define JSOP_GETGNAME_LENGTH 5 +#define JSOP_SETGNAME_LENGTH 5 +#define JSOP_INCGNAME_LENGTH 6 +#define JSOP_DECGNAME_LENGTH 6 +#define JSOP_GNAMEINC_LENGTH 6 +#define JSOP_GNAMEDEC_LENGTH 6 +#define JSOP_REGEXP_LENGTH 5 +#define JSOP_DEFXMLNS_LENGTH 1 +#define JSOP_ANYNAME_LENGTH 1 +#define JSOP_QNAMEPART_LENGTH 5 +#define JSOP_QNAMECONST_LENGTH 5 +#define JSOP_QNAME_LENGTH 1 +#define JSOP_TOATTRNAME_LENGTH 1 +#define JSOP_TOATTRVAL_LENGTH 1 +#define JSOP_ADDATTRNAME_LENGTH 1 +#define JSOP_ADDATTRVAL_LENGTH 1 +#define JSOP_BINDXMLNAME_LENGTH 1 +#define JSOP_SETXMLNAME_LENGTH 1 +#define JSOP_XMLNAME_LENGTH 1 +#define JSOP_DESCENDANTS_LENGTH 1 +#define JSOP_FILTER_LENGTH 5 +#define JSOP_ENDFILTER_LENGTH 5 +#define JSOP_TOXML_LENGTH 1 +#define JSOP_TOXMLLIST_LENGTH 1 +#define JSOP_XMLTAGEXPR_LENGTH 1 +#define JSOP_XMLELTEXPR_LENGTH 1 +#define JSOP_XMLCDATA_LENGTH 5 +#define JSOP_XMLCOMMENT_LENGTH 5 +#define JSOP_XMLPI_LENGTH 5 +#define JSOP_DELDESC_LENGTH 1 +#define JSOP_CALLPROP_LENGTH 5 +#define JSOP_ENTERLET0_LENGTH 5 +#define JSOP_ENTERLET1_LENGTH 5 +#define JSOP_UINT24_LENGTH 4 +#define JSOP_UNUSED18_LENGTH 1 +#define JSOP_UNUSED19_LENGTH 1 +#define JSOP_UNUSED20_LENGTH 1 +#define JSOP_STARTXML_LENGTH 1 +#define JSOP_STARTXMLEXPR_LENGTH 1 +#define JSOP_CALLELEM_LENGTH 1 +#define JSOP_STOP_LENGTH 1 +#define JSOP_GETXPROP_LENGTH 5 +#define JSOP_CALLXMLNAME_LENGTH 1 +#define JSOP_TYPEOFEXPR_LENGTH 1 +#define JSOP_ENTERBLOCK_LENGTH 5 +#define JSOP_LEAVEBLOCK_LENGTH 3 +#define JSOP_UNUSED1_LENGTH 1 +#define JSOP_UNUSED2_LENGTH 1 +#define JSOP_GENERATOR_LENGTH 1 +#define JSOP_YIELD_LENGTH 1 +#define JSOP_ARRAYPUSH_LENGTH 3 +#define JSOP_GETFUNNS_LENGTH 1 +#define JSOP_ENUMCONSTELEM_LENGTH 1 +#define JSOP_LEAVEBLOCKEXPR_LENGTH 3 +#define JSOP_UNUSED21_LENGTH 1 +#define JSOP_UNUSED22_LENGTH 1 +#define JSOP_UNUSED23_LENGTH 1 +#define JSOP_CALLGNAME_LENGTH 5 +#define JSOP_CALLLOCAL_LENGTH 3 +#define JSOP_CALLARG_LENGTH 3 +#define JSOP_BINDGNAME_LENGTH 5 +#define JSOP_INT8_LENGTH 2 +#define JSOP_INT32_LENGTH 5 +#define JSOP_LENGTH_LENGTH 5 +#define JSOP_HOLE_LENGTH 1 +#define JSOP_UNUSED17_LENGTH 1 +#define JSOP_UNUSED24_LENGTH 1 +#define JSOP_UNUSED25_LENGTH 1 +#define JSOP_UNUSED29_LENGTH 1 +#define JSOP_UNUSED30_LENGTH 1 +#define JSOP_REST_LENGTH 1 +#define JSOP_TOID_LENGTH 1 +#define JSOP_IMPLICITTHIS_LENGTH 5 +#define JSOP_LOOPENTRY_LENGTH 1 +#define JSOP_ACTUALSFILLED_LENGTH 3 +# 13 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" 2 + +struct JSContext; +struct JSCompartment; + + +namespace js { namespace mjit { struct CallSite; }} +typedef js::mjit::CallSite JSInlinedSite; + + + + +typedef size_t JSRejoinState; + +namespace js { + +class StackFrame; +class FrameRegs; +class StackSegment; +class StackSpace; +class ContextStack; + +class InvokeArgsGuard; +class InvokeFrameGuard; +class FrameGuard; +class ExecuteFrameGuard; +class DummyFrameGuard; +class GeneratorFrameGuard; + +class CallIter; +class ScriptFrameIter; +class AllFramesIter; + +class ArgumentsObject; +class StaticBlockObject; + + +namespace mjit { + struct JITScript; + jsbytecode *NativeToPC(JITScript *jit, void *ncode, CallSite **pinline); +} + + +namespace detail { + struct OOMCheck; +} +# 161 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" +class CallReceiver +{ + protected: + + + + + + void setUsedRval() const {} + void clearUsedRval() const {} + + Value *argv_; + public: + friend CallReceiver CallReceiverFromVp(Value *); + friend CallReceiver CallReceiverFromArgv(Value *); + Value *base() const { return argv_ - 2; } + JSObject &callee() const { do { } while(0); return argv_[-2].toObject(); } + Value &calleev() const { do { } while(0); return argv_[-2]; } + Value &thisv() const { return argv_[-1]; } + + Value &rval() const { + setUsedRval(); + return argv_[-2]; + } + + Value *spAfterCall() const { + setUsedRval(); + return argv_ - 1; + } + + void setCallee(Value calleev) { + clearUsedRval(); + this->calleev() = calleev; + } +}; + +__attribute__((always_inline)) inline CallReceiver +CallReceiverFromArgv(Value *argv) +{ + CallReceiver receiver; + receiver.clearUsedRval(); + receiver.argv_ = argv; + return receiver; +} + +__attribute__((always_inline)) inline CallReceiver +CallReceiverFromVp(Value *vp) +{ + return CallReceiverFromArgv(vp + 2); +} + + + +class CallArgs : public CallReceiver +{ + protected: + unsigned argc_; + public: + friend CallArgs CallArgsFromVp(unsigned, Value *); + friend CallArgs CallArgsFromArgv(unsigned, Value *); + friend CallArgs CallArgsFromSp(unsigned, Value *); + Value &operator[](unsigned i) const { do { } while(0); return argv_[i]; } + Value *array() const { return argv_; } + unsigned length() const { return argc_; } + Value *end() const { return argv_ + argc_; } + bool hasDefined(unsigned i) const { return i < argc_ && !argv_[i].isUndefined(); } +}; + +__attribute__((always_inline)) inline CallArgs +CallArgsFromArgv(unsigned argc, Value *argv) +{ + CallArgs args; + args.clearUsedRval(); + args.argv_ = argv; + args.argc_ = argc; + return args; +} + +__attribute__((always_inline)) inline CallArgs +CallArgsFromVp(unsigned argc, Value *vp) +{ + return CallArgsFromArgv(argc, vp + 2); +} + +__attribute__((always_inline)) inline CallArgs +CallArgsFromSp(unsigned argc, Value *sp) +{ + return CallArgsFromArgv(argc, sp - argc); +} +# 260 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" +class CallArgsList : public CallArgs +{ + friend class StackSegment; + CallArgsList *prev_; + bool active_; + public: + friend CallArgsList CallArgsListFromVp(unsigned, Value *, CallArgsList *); + friend CallArgsList CallArgsListFromArgv(unsigned, Value *, CallArgsList *); + CallArgsList *prev() const { return prev_; } + bool active() const { return active_; } + void setActive() { active_ = true; } + void setInactive() { active_ = false; } +}; + +__attribute__((always_inline)) inline CallArgsList +CallArgsListFromArgv(unsigned argc, Value *argv, CallArgsList *prev) +{ + CallArgsList args; + + + + args.argv_ = argv; + args.argc_ = argc; + args.prev_ = prev; + args.active_ = false; + return args; +} + +__attribute__((always_inline)) inline CallArgsList +CallArgsListFromVp(unsigned argc, Value *vp, CallArgsList *prev) +{ + return CallArgsListFromArgv(argc, vp + 2, prev); +} + + + + +enum InitialFrameFlags { + INITIAL_NONE = 0, + INITIAL_CONSTRUCT = 0x80, + INITIAL_LOWERED = 0x200000 +}; + +enum ExecuteType { + EXECUTE_GLOBAL = 0x1, + EXECUTE_DIRECT_EVAL = 0x8, + EXECUTE_INDIRECT_EVAL = 0x9, + EXECUTE_DEBUG = 0x18 +}; + + + +class StackFrame +{ + public: + enum Flags { + + GLOBAL = 0x1, + FUNCTION = 0x2, + DUMMY = 0x4, + + + EVAL = 0x8, + DEBUGGER = 0x10, + GENERATOR = 0x20, + FLOATING_GENERATOR = 0x40, + CONSTRUCTING = 0x80, + + + YIELDING = 0x100, + FINISHED_IN_INTERP = 0x200, + + + OVERFLOW_ARGS = 0x400, + UNDERFLOW_ARGS = 0x800, + + + HAS_CALL_OBJ = 0x1000, + HAS_ARGS_OBJ = 0x2000, + HAS_HOOK_DATA = 0x4000, + HAS_ANNOTATION = 0x8000, + HAS_RVAL = 0x10000, + HAS_SCOPECHAIN = 0x20000, + HAS_PREVPC = 0x40000, + HAS_BLOCKCHAIN = 0x80000, + + + DOWN_FRAMES_EXPANDED = 0x100000, + LOWERED_CALL_APPLY = 0x200000 + }; + + private: + mutable uint32_t flags_; + union { + JSScript *script; + JSFunction *fun; + } exec; + union { + unsigned nactual; + JSScript *evalScript; + } u; + mutable JSObject *scopeChain_; + StackFrame *prev_; + void *ncode_; + + + Value rval_; + StaticBlockObject *blockChain_; + ArgumentsObject *argsObj_; + jsbytecode *prevpc_; + JSInlinedSite *prevInline_; + void *hookData_; + void *annotation_; + JSRejoinState rejoin_; + + + static void staticAsserts() { + typedef int moz_static_assert92[(__builtin_offsetof (StackFrame, rval_) % sizeof(Value) == 0) ? 1 : -1]; + typedef int moz_static_assert93[(sizeof(StackFrame) % sizeof(Value) == 0) ? 1 : -1]; + } + + inline void initPrev(JSContext *cx); + jsbytecode *prevpcSlow(JSInlinedSite **pinlined); + + public: +# 394 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + void initCallFrame(JSContext *cx, JSFunction &callee, + JSScript *script, uint32_t nactual, StackFrame::Flags flags); + + + void initFixupFrame(StackFrame *prev, StackFrame::Flags flags, void *ncode, unsigned nactual); + + + void initExecuteFrame(JSScript *script, StackFrame *prev, FrameRegs *regs, + const Value &thisv, JSObject &scopeChain, ExecuteType type); + + + enum TriggerPostBarriers { + DoPostBarrier = true, + NoPostBarrier = false + }; + template + void stealFrameAndSlots(JSContext *cx, StackFrame *fp, T *vp, + StackFrame *otherfp, U *othervp, Value *othersp); + void writeBarrierPost(); + + + void initDummyFrame(JSContext *cx, JSObject &chain); +# 428 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + bool isFunctionFrame() const { + return !!(flags_ & FUNCTION); + } + + bool isGlobalFrame() const { + return !!(flags_ & GLOBAL); + } + + bool isDummyFrame() const { + return !!(flags_ & DUMMY); + } + + bool isScriptFrame() const { + bool retval = !!(flags_ & (FUNCTION | GLOBAL)); + do { } while(0); + return retval; + } +# 458 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + bool isEvalFrame() const { + do { } while (0); + return flags_ & EVAL; + } + + bool isEvalInFunction() const { + return (flags_ & (EVAL | FUNCTION)) == (EVAL | FUNCTION); + } + + bool isNonEvalFunctionFrame() const { + return (flags_ & (FUNCTION | EVAL)) == FUNCTION; + } + + inline bool isStrictEvalFrame() const { + return isEvalFrame() && script()->strictModeCode; + } + + bool isNonStrictEvalFrame() const { + return isEvalFrame() && !script()->strictModeCode; + } + + bool isDirectEvalFrame() const { + return isEvalFrame() && script()->staticLevel > 0; + } + + bool isNonStrictDirectEvalFrame() const { + return isNonStrictEvalFrame() && isDirectEvalFrame(); + } +# 500 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + StackFrame *prev() const { + return prev_; + } + + inline void resetGeneratorPrev(JSContext *cx); + inline void resetInlinePrev(StackFrame *prevfp, jsbytecode *prevpc); + + inline void initInlineFrame(JSFunction *fun, StackFrame *prevfp, jsbytecode *prevpc); + + inline JSObject *createRestParameter(JSContext *cx); +# 519 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + Value *slots() const { + return (Value *)(this + 1); + } + + Value *base() const { + return slots() + script()->nfixed; + } + + Value &varSlot(unsigned i) { + do { } while(0); + do { } while (0); + return slots()[i]; + } + + Value &localSlot(unsigned i) { + + do { } while(0); + return slots()[i]; + } +# 574 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + jsbytecode *pcQuadratic(const ContextStack &stack, StackFrame *next = __null, + JSInlinedSite **pinlined = __null); + + jsbytecode *prevpc(JSInlinedSite **pinlined) { + if (flags_ & HAS_PREVPC) { + if (pinlined) + *pinlined = prevInline_; + return prevpc_; + } + return prevpcSlow(pinlined); + } + + JSInlinedSite *prevInline() { + do { } while(0); + return prevInline_; + } + + JSScript *script() const { + do { } while(0); + return isFunctionFrame() + ? isEvalFrame() ? u.evalScript : fun()->script() + : exec.script; + } + + JSScript *functionScript() const { + do { } while(0); + return isEvalFrame() ? u.evalScript : fun()->script(); + } + + JSScript *globalScript() const { + do { } while(0); + return exec.script; + } + + JSScript *maybeScript() const { + return isScriptFrame() ? script() : __null; + } + + size_t numFixed() const { + return script()->nfixed; + } + + size_t numSlots() const { + return script()->nslots; + } + + size_t numGlobalVars() const { + do { } while(0); + return exec.script->nfixed; + } +# 634 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + JSFunction* fun() const { + do { } while(0); + return exec.fun; + } + + JSFunction* maybeFun() const { + return isFunctionFrame() ? fun() : __null; + } + + JSFunction* maybeScriptFunction() const { + if (!isFunctionFrame()) + return __null; + const StackFrame *fp = this; + while (fp->isEvalFrame()) + fp = fp->prev(); + return fp->script()->function(); + } +# 672 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + bool hasArgs() const { + return isNonEvalFunctionFrame(); + } + + unsigned numFormalArgs() const { + do { } while(0); + return fun()->nargs; + } + + Value &formalArg(unsigned i) const { + do { } while(0); + return formalArgs()[i]; + } + + Value *formalArgs() const { + do { } while(0); + return (Value *)this - numFormalArgs(); + } + + Value *formalArgsEnd() const { + do { } while(0); + return (Value *)this; + } + + Value *maybeFormalArgs() const { + return (flags_ & (FUNCTION | EVAL)) == FUNCTION + ? formalArgs() + : __null; + } + + inline unsigned numActualArgs() const; + inline Value *actualArgs() const; + inline Value *actualArgsEnd() const; + + inline Value &canonicalActualArg(unsigned i) const; + template + inline bool forEachCanonicalActualArg(Op op, unsigned start = 0, unsigned count = unsigned(-1)); + template inline bool forEachFormalArg(Op op); + + + + bool hasArgsObj() const { + + + + + + + + return !!(flags_ & HAS_ARGS_OBJ); + } + + ArgumentsObject &argsObj() const { + do { } while(0); + return *argsObj_; + } + + ArgumentsObject *maybeArgsObj() const { + return hasArgsObj() ? &argsObj() : __null; + } + + void initArgsObj(ArgumentsObject &argsObj) { + do { } while(0); + do { } while(0); + argsObj_ = &argsObj; + flags_ |= HAS_ARGS_OBJ; + } +# 754 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + Value &functionThis() const { + do { } while(0); + if (isEvalFrame()) + return ((Value *)this)[-1]; + return formalArgs()[-1]; + } + + JSObject &constructorThis() const { + do { } while(0); + return formalArgs()[-1].toObject(); + } + + Value &globalThis() const { + do { } while(0); + return ((Value *)this)[-1]; + } + + Value &thisValue() const { + if (flags_ & (EVAL | GLOBAL)) + return ((Value *)this)[-1]; + return formalArgs()[-1]; + } +# 786 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + JSFunction &callee() const { + do { } while(0); + return *calleev().toObject().toFunction(); + } + + const Value &calleev() const { + do { } while(0); + return mutableCalleev(); + } + + const Value &maybeCalleev() const { + do { } while(0); + Value &calleev = flags_ & (EVAL | GLOBAL) + ? ((Value *)this)[-2] + : formalArgs()[-2]; + do { } while(0); + return calleev; + } + + Value &mutableCalleev() const { + do { } while(0); + if (isEvalFrame()) + return ((Value *)this)[-2]; + return formalArgs()[-2]; + } + + CallReceiver callReceiver() const { + return CallReceiverFromArgv(formalArgs()); + } +# 846 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + inline HandleObject scopeChain() const; + inline GlobalObject &global() const; + + bool hasCallObj() const { + bool ret = !!(flags_ & HAS_CALL_OBJ); + do { } while (0); + return ret; + } + + inline CallObject &callObj() const; + inline void initScopeChain(CallObject &callobj); + inline void setScopeChain(JSObject &obj); +# 874 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + inline JSObject &varObj(); + + + + bool hasBlockChain() const { + return (flags_ & HAS_BLOCKCHAIN) && blockChain_; + } + + StaticBlockObject *maybeBlockChain() { + return (flags_ & HAS_BLOCKCHAIN) ? blockChain_ : __null; + } + + StaticBlockObject &blockChain() const { + do { } while(0); + return *blockChain_; + } + + + bool pushBlock(JSContext *cx, StaticBlockObject &block); + void popBlock(JSContext *cx); + + + void popWith(JSContext *cx); + + + + + + inline bool functionPrologue(JSContext *cx); + + + + + + + + inline void functionEpilogue(JSContext *cx); + + + + + + inline void updateEpilogueFlags(); + + inline bool maintainNestingState() const; +# 927 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + inline JSCompartment *compartment() const; + + + + void* annotation() const { + return (flags_ & HAS_ANNOTATION) ? annotation_ : __null; + } + + void setAnnotation(void *annot) { + flags_ |= HAS_ANNOTATION; + annotation_ = annot; + } + + + + JSRejoinState rejoin() const { + return rejoin_; + } + + void setRejoin(JSRejoinState state) { + rejoin_ = state; + } + + + + void setDownFramesExpanded() { + flags_ |= DOWN_FRAMES_EXPANDED; + } + + bool downFramesExpanded() { + return !!(flags_ & DOWN_FRAMES_EXPANDED); + } + + + + bool hasHookData() const { + return !!(flags_ & HAS_HOOK_DATA); + } + + void* hookData() const { + do { } while(0); + return hookData_; + } + + void* maybeHookData() const { + return hasHookData() ? hookData_ : __null; + } + + void setHookData(void *v) { + hookData_ = v; + flags_ |= HAS_HOOK_DATA; + } + + + + bool hasReturnValue() const { + return !!(flags_ & HAS_RVAL); + } + + Value &returnValue() { + if (!(flags_ & HAS_RVAL)) + rval_.setUndefined(); + return rval_; + } + + void markReturnValue() { + flags_ |= HAS_RVAL; + } + + void setReturnValue(const Value &v) { + rval_ = v; + markReturnValue(); + } + + void clearReturnValue() { + rval_.setUndefined(); + markReturnValue(); + } + + + + void *nativeReturnAddress() const { + return ncode_; + } + + void setNativeReturnAddress(void *addr) { + ncode_ = addr; + } + + void **addressOfNativeReturnAddress() { + return &ncode_; + } +# 1028 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + bool isGeneratorFrame() const { + return !!(flags_ & GENERATOR); + } + + bool isFloatingGenerator() const { + do { } while (0); + return !!(flags_ & FLOATING_GENERATOR); + } + + void initFloatingGenerator() { + do { } while(0); + flags_ |= (GENERATOR | FLOATING_GENERATOR); + } + + void unsetFloatingGenerator() { + flags_ &= ~FLOATING_GENERATOR; + } + + void setFloatingGenerator() { + flags_ |= FLOATING_GENERATOR; + } +# 1057 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + bool isFramePushedByExecute() const { + return !!(flags_ & (GLOBAL | EVAL)); + } + + + + + + InitialFrameFlags initialFlags() const { + typedef int moz_static_assert94[((int)INITIAL_NONE == 0) ? 1 : -1]; + typedef int moz_static_assert95[((int)INITIAL_CONSTRUCT == (int)CONSTRUCTING) ? 1 : -1]; + typedef int moz_static_assert96[((int)INITIAL_LOWERED == (int)LOWERED_CALL_APPLY) ? 1 : -1]; + uint32_t mask = CONSTRUCTING | LOWERED_CALL_APPLY; + do { } while(0); + return InitialFrameFlags(flags_ & mask); + } + + bool isConstructing() const { + return !!(flags_ & CONSTRUCTING); + } + + + + + + + + bool loweredCallOrApply() const { + return !!(flags_ & LOWERED_CALL_APPLY); + } + + bool isDebuggerFrame() const { + return !!(flags_ & DEBUGGER); + } + + bool hasOverflowArgs() const { + return !!(flags_ & OVERFLOW_ARGS); + } + + bool isYielding() { + return !!(flags_ & YIELDING); + } + + void setYielding() { + flags_ |= YIELDING; + } + + void clearYielding() { + flags_ &= ~YIELDING; + } + + void setFinishedInInterpreter() { + flags_ |= FINISHED_IN_INTERP; + } + + bool finishedInInterpreter() const { + return !!(flags_ & FINISHED_IN_INTERP); + } + + public: + + + static size_t offsetOfFlags() { + return __builtin_offsetof (StackFrame, flags_); + } + + static size_t offsetOfExec() { + return __builtin_offsetof (StackFrame, exec); + } + + static size_t offsetOfNumActual() { + return __builtin_offsetof (StackFrame, u.nactual); + } + + static size_t offsetOfScopeChain() { + return __builtin_offsetof (StackFrame, scopeChain_); + } + + static size_t offsetOfPrev() { + return __builtin_offsetof (StackFrame, prev_); + } + + static size_t offsetOfReturnValue() { + return __builtin_offsetof (StackFrame, rval_); + } + + static size_t offsetOfArgsObj() { + return __builtin_offsetof (StackFrame, argsObj_); + } + + static ptrdiff_t offsetOfNcode() { + return __builtin_offsetof (StackFrame, ncode_); + } + + static ptrdiff_t offsetOfCallee(JSFunction *fun) { + do { } while(0); + return -(fun->nargs + 2) * sizeof(Value); + } + + static ptrdiff_t offsetOfThis(JSFunction *fun) { + return fun == __null + ? -1 * ptrdiff_t(sizeof(Value)) + : -(fun->nargs + 1) * ptrdiff_t(sizeof(Value)); + } + + static ptrdiff_t offsetOfFormalArg(JSFunction *fun, unsigned i) { + do { } while(0); + return (-(int)fun->nargs + i) * sizeof(Value); + } + + static size_t offsetOfFixed(unsigned i) { + return sizeof(StackFrame) + i * sizeof(Value); + } + + + inline mjit::JITScript *jit(); + + + void methodjitStaticAsserts(); + + public: + void mark(JSTracer *trc); +}; + +static const size_t VALUES_PER_STACK_FRAME = sizeof(StackFrame) / sizeof(Value); + +static inline unsigned +ToReportFlags(InitialFrameFlags initial) +{ + return unsigned(initial & StackFrame::CONSTRUCTING); +} + +static inline StackFrame::Flags +ToFrameFlags(InitialFrameFlags initial) +{ + return StackFrame::Flags(initial); +} + +static inline InitialFrameFlags +InitialFrameFlagsFromConstructing(bool b) +{ + return b ? INITIAL_CONSTRUCT : INITIAL_NONE; +} + +static inline bool +InitialFrameFlagsAreConstructing(InitialFrameFlags initial) +{ + return !!(initial & INITIAL_CONSTRUCT); +} + +static inline bool +InitialFrameFlagsAreLowered(InitialFrameFlags initial) +{ + return !!(initial & INITIAL_LOWERED); +} + +inline StackFrame * Valueify(JSStackFrame *fp) { return (StackFrame *)fp; } +static inline JSStackFrame * Jsvalify(StackFrame *fp) { return (JSStackFrame *)fp; } + + + +class FrameRegs +{ + public: + Value *sp; + jsbytecode *pc; + private: + JSInlinedSite *inlined_; + StackFrame *fp_; + public: + StackFrame *fp() const { return fp_; } + JSInlinedSite *inlined() const { return inlined_; } + + + static const size_t offsetOfFp = 3 * sizeof(void *); + static const size_t offsetOfInlined = 2 * sizeof(void *); + static void staticAssert() { + typedef int moz_static_assert97[(offsetOfFp == __builtin_offsetof (FrameRegs, fp_)) ? 1 : -1]; + typedef int moz_static_assert98[(offsetOfInlined == __builtin_offsetof (FrameRegs, inlined_)) ? 1 : -1]; + } + void clearInlined() { inlined_ = __null; } + + + void rebaseFromTo(const FrameRegs &from, StackFrame &to) { + fp_ = &to; + sp = to.slots() + (from.sp - from.fp_->slots()); + pc = from.pc; + inlined_ = from.inlined_; + do { } while(0); + } + + + void popFrame(Value *newsp) { + pc = fp_->prevpc(&inlined_); + sp = newsp; + fp_ = fp_->prev(); + do { } while(0); + } + + + void popPartialFrame(Value *newsp) { + sp = newsp; + fp_ = fp_->prev(); + do { } while(0); + } + + + void restorePartialFrame(Value *newfp) { + fp_ = (StackFrame *) newfp; + } + + + void refreshFramePointer(StackFrame *fp) { + fp_ = fp; + } + + + void prepareToRun(StackFrame &fp, JSScript *script) { + pc = script->code; + sp = fp.slots() + script->nfixed; + fp_ = &fp; + inlined_ = __null; + } + + void setToEndOfScript() { + JSScript *script = fp()->script(); + sp = fp()->base(); + pc = script->code + script->length - 1; + do { } while(0); + } + + + void initDummyFrame(StackFrame &fp) { + pc = __null; + sp = fp.slots(); + fp_ = &fp; + inlined_ = __null; + } + + + void expandInline(StackFrame *innerfp, jsbytecode *innerpc) { + pc = innerpc; + fp_ = innerfp; + inlined_ = __null; + } + + + + void updateForNcode(mjit::JITScript *jit, void *ncode) { + pc = mjit::NativeToPC(jit, ncode, &inlined_); + } + +}; + + + +class StackSegment +{ + + StackSegment *const prevInContext_; + + + StackSegment *const prevInMemory_; + + + FrameRegs *regs_; + + + CallArgsList *calls_; + + public: + StackSegment(StackSegment *prevInContext, + StackSegment *prevInMemory, + FrameRegs *regs, + CallArgsList *calls) + : prevInContext_(prevInContext), + prevInMemory_(prevInMemory), + regs_(regs), + calls_(calls) + {} + + + + Value *slotsBegin() const { + return (Value *)(this + 1); + } + + + + FrameRegs ®s() const { + do { } while(0); + return *regs_; + } + + FrameRegs *maybeRegs() const { + return regs_; + } + + StackFrame *fp() const { + return regs_->fp(); + } + + StackFrame *maybefp() const { + return regs_ ? regs_->fp() : __null; + } + + jsbytecode *maybepc() const { + return regs_ ? regs_->pc : __null; + } + + CallArgsList &calls() const { + do { } while(0); + return *calls_; + } + + CallArgsList *maybeCalls() const { + return calls_; + } + + Value *callArgv() const { + return calls_->array(); + } + + Value *maybeCallArgv() const { + return calls_ ? calls_->array() : __null; + } + + StackSegment *prevInContext() const { + return prevInContext_; + } + + StackSegment *prevInMemory() const { + return prevInMemory_; + } + + void repointRegs(FrameRegs *regs) { + do { } while (0); + regs_ = regs; + } + + bool isEmpty() const { + return !calls_ && !regs_; + } + + bool contains(const StackFrame *fp) const; + bool contains(const FrameRegs *regs) const; + bool contains(const CallArgsList *call) const; + + StackFrame *computeNextFrame(const StackFrame *fp) const; + + Value *end() const; + + FrameRegs *pushRegs(FrameRegs ®s); + void popRegs(FrameRegs *regs); + void pushCall(CallArgsList &callList); + void pointAtCall(CallArgsList &callList); + void popCall(); + + + + static const size_t offsetOfRegs() { return __builtin_offsetof (StackSegment, regs_); } +}; + +static const size_t VALUES_PER_STACK_SEGMENT = sizeof(StackSegment) / sizeof(Value); +typedef int moz_static_assert99[(sizeof(StackSegment) % sizeof(Value) == 0) ? 1 : -1]; + + + +class StackSpace +{ + StackSegment *seg_; + Value *base_; + mutable Value *conservativeEnd_; + + + + Value *defaultEnd_; + Value *trustedEnd_; + + void assertInvariants() const { + do { } while(0); + + + + + do { } while(0); + do { } while(0); + } + + + static const size_t CAPACITY_VALS = 512 * 1024; + static const size_t CAPACITY_BYTES = CAPACITY_VALS * sizeof(Value); + + + static const size_t COMMIT_VALS = 16 * 1024; + static const size_t COMMIT_BYTES = COMMIT_VALS * sizeof(Value); + + + static const size_t BUFFER_VALS = 16 * 1024; + static const size_t BUFFER_BYTES = BUFFER_VALS * sizeof(Value); + + static void staticAsserts() { + typedef int moz_static_assert100[(CAPACITY_VALS % COMMIT_VALS == 0) ? 1 : -1]; + } + + friend class AllFramesIter; + friend class ContextStack; + friend class StackFrame; +# 1474 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + static const size_t CX_COMPARTMENT = 0xc; + + inline bool ensureSpace(JSContext *cx, MaybeReportError report, + Value *from, ptrdiff_t nvals, + JSCompartment *dest = (JSCompartment *)CX_COMPARTMENT) const; + __attribute__((visibility("default"))) bool ensureSpaceSlow(JSContext *cx, MaybeReportError report, + Value *from, ptrdiff_t nvals, + JSCompartment *dest) const; + + StackSegment &findContainingSegment(const StackFrame *target) const; + + public: + StackSpace(); + bool init(); + ~StackSpace(); +# 1501 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + static const unsigned ARGS_LENGTH_MAX = CAPACITY_VALS - (2 * BUFFER_VALS); + + + inline Value *firstUnused() const { return seg_ ? seg_->end() : base_; } + + StackSegment &containingSegment(const StackFrame *target) const; +# 1516 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + static const size_t STACK_JIT_EXTRA = ( 8 + 18) * 10; +# 1532 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + inline Value *getStackLimit(JSContext *cx, MaybeReportError report); + bool tryBumpLimit(JSContext *cx, Value *from, unsigned nvals, Value **limit); + + + void mark(JSTracer *trc); + void markFrameSlots(JSTracer *trc, StackFrame *fp, Value *slotsEnd, jsbytecode *pc); + + + void markActiveCompartments(); + + + __attribute__((visibility("default"))) size_t sizeOfCommitted(); + + + + +}; + + + +class ContextStack +{ + StackSegment *seg_; + StackSpace *const space_; + JSContext *cx_; +# 1566 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + bool onTop() const; + + + + + void assertSpaceInSync() const {} + + + + StackSegment *pushSegment(JSContext *cx); + enum MaybeExtend { CAN_EXTEND = true, CANT_EXTEND = false }; + Value *ensureOnTop(JSContext *cx, MaybeReportError report, unsigned nvars, + MaybeExtend extend, bool *pushedSeg, + JSCompartment *dest = (JSCompartment *)StackSpace::CX_COMPARTMENT); + + inline StackFrame * + getCallFrame(JSContext *cx, MaybeReportError report, const CallArgs &args, + JSFunction *fun, JSScript *script, StackFrame::Flags *pflags) const; + + + void popSegment(); + friend class InvokeArgsGuard; + void popInvokeArgs(const InvokeArgsGuard &iag); + friend class FrameGuard; + void popFrame(const FrameGuard &fg); + friend class GeneratorFrameGuard; + void popGeneratorFrame(const GeneratorFrameGuard &gfg); + + friend class StackIter; + + public: + ContextStack(JSContext *cx); + ~ContextStack(); + + + + + + + + bool empty() const { return !seg_; } + + + + + + + + inline bool hasfp() const { return seg_ && seg_->maybeRegs(); } + + + + + + inline FrameRegs *maybeRegs() const { return seg_ ? seg_->maybeRegs() : __null; } + inline StackFrame *maybefp() const { return seg_ ? seg_->maybefp() : __null; } + + + inline FrameRegs ®s() const { do { } while(0); return seg_->regs(); } + inline StackFrame *fp() const { do { } while(0); return seg_->fp(); } + + + StackSpace &space() const { return *space_; } + + + bool containsSlow(const StackFrame *target) const; +# 1641 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + bool pushInvokeArgs(JSContext *cx, unsigned argc, InvokeArgsGuard *ag); + + + bool pushInvokeFrame(JSContext *cx, const CallArgs &args, + InitialFrameFlags initial, InvokeFrameGuard *ifg); + + + bool pushExecuteFrame(JSContext *cx, JSScript *script, const Value &thisv, + JSObject &scopeChain, ExecuteType type, + StackFrame *evalInFrame, ExecuteFrameGuard *efg); + + + + + + + + bool pushGeneratorFrame(JSContext *cx, JSGenerator *gen, GeneratorFrameGuard *gfg); +# 1669 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + bool pushDummyFrame(JSContext *cx, JSCompartment *dest, JSObject &scopeChain, DummyFrameGuard *dfg); + + + + + + + bool pushInlineFrame(JSContext *cx, FrameRegs ®s, const CallArgs &args, + JSFunction &callee, JSScript *script, + InitialFrameFlags initial); + bool pushInlineFrame(JSContext *cx, FrameRegs ®s, const CallArgs &args, + JSFunction &callee, JSScript *script, + InitialFrameFlags initial, Value **stackLimit); + void popInlineFrame(FrameRegs ®s); + + + void popFrameAfterOverflow(); + + + inline JSScript *currentScript(jsbytecode **pc = __null) const; + inline JSScript *currentScriptWithDiagnostics(jsbytecode **pc = __null) const; + + + inline HandleObject currentScriptedScopeChain() const; + + + + + + + StackFrame *getFixupFrame(JSContext *cx, MaybeReportError report, + const CallArgs &args, JSFunction *fun, JSScript *script, + void *ncode, InitialFrameFlags initial, Value **stackLimit); + + bool saveFrameChain(); + void restoreFrameChain(); + + + + + + inline void repointRegs(FrameRegs *regs) { do { } while(0); seg_->repointRegs(regs); } +# 1719 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + void threadReset(); + + + + static size_t offsetOfSeg() { return __builtin_offsetof (ContextStack, seg_); } +}; + + + +class InvokeArgsGuard : public CallArgsList +{ + friend class ContextStack; + ContextStack *stack_; + bool pushedSeg_; + void setPushed(ContextStack &stack) { do { } while(0); stack_ = &stack; } + public: + InvokeArgsGuard() : CallArgsList(), stack_(__null), pushedSeg_(false) {} + ~InvokeArgsGuard() { if (pushed()) stack_->popInvokeArgs(*this); } + bool pushed() const { return !!stack_; } + void pop() { stack_->popInvokeArgs(*this); stack_ = __null; } +}; + +class FrameGuard +{ + protected: + friend class ContextStack; + ContextStack *stack_; + bool pushedSeg_; + FrameRegs regs_; + FrameRegs *prevRegs_; + void setPushed(ContextStack &stack) { stack_ = &stack; } + public: + FrameGuard() : stack_(__null), pushedSeg_(false) {} + ~FrameGuard() { if (pushed()) stack_->popFrame(*this); } + bool pushed() const { return !!stack_; } + void pop() { stack_->popFrame(*this); stack_ = __null; } + + StackFrame *fp() const { return regs_.fp(); } +}; + +class InvokeFrameGuard : public FrameGuard +{}; + +class ExecuteFrameGuard : public FrameGuard +{}; + +class DummyFrameGuard : public FrameGuard +{}; + +class GeneratorFrameGuard : public FrameGuard +{ + friend class ContextStack; + JSGenerator *gen_; + Value *stackvp_; + public: + ~GeneratorFrameGuard() { if (pushed()) stack_->popGeneratorFrame(*this); } +}; +# 1797 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" +class StackIter +{ + friend class ContextStack; + JSContext *maybecx_; + public: + enum SavedOption { STOP_AT_SAVED, GO_THROUGH_SAVED }; + private: + SavedOption savedOption_; + + enum State { DONE, SCRIPTED, NATIVE, IMPLICIT_NATIVE }; + State state_; + + StackFrame *fp_; + CallArgsList *calls_; + + StackSegment *seg_; + Value *sp_; + jsbytecode *pc_; + JSScript *script_; + CallArgs args_; + + void poisonRegs(); + void popFrame(); + void popCall(); + void settleOnNewSegment(); + void settleOnNewState(); + void startOnSegment(StackSegment *seg); + + public: + StackIter(JSContext *cx, SavedOption = STOP_AT_SAVED); + StackIter(JSRuntime *rt, StackSegment &seg); + + bool done() const { return state_ == DONE; } + StackIter &operator++(); + + bool operator==(const StackIter &rhs) const; + bool operator!=(const StackIter &rhs) const { return !(*this == rhs); } + + bool isScript() const { do { } while(0); return state_ == SCRIPTED; } + bool isImplicitNativeCall() const { + do { } while(0); + return state_ == IMPLICIT_NATIVE; + } + bool isNativeCall() const { + do { } while(0); + return state_ == NATIVE || state_ == IMPLICIT_NATIVE; + } + + bool isFunctionFrame() const; + bool isEvalFrame() const; + bool isNonEvalFunctionFrame() const; + bool isConstructing() const; + + StackFrame *fp() const { do { } while(0); return fp_; } + Value *sp() const { do { } while(0); return sp_; } + jsbytecode *pc() const { do { } while(0); return pc_; } + JSScript *script() const { do { } while(0); return script_; } + JSFunction *callee() const; + Value calleev() const; + Value thisv() const; + + CallArgs nativeArgs() const { do { } while(0); return args_; } +}; + + +class ScriptFrameIter : public StackIter +{ + void settle() { + while (!done() && !isScript()) + StackIter::operator++(); + } + + public: + ScriptFrameIter(JSContext *cx, StackIter::SavedOption opt = StackIter::STOP_AT_SAVED) + : StackIter(cx, opt) { settle(); } + + ScriptFrameIter &operator++() { StackIter::operator++(); settle(); return *this; } +}; + + + + + + + +class AllFramesIter +{ + public: + AllFramesIter(StackSpace &space); + + bool done() const { return fp_ == __null; } + AllFramesIter& operator++(); + + StackFrame *fp() const { return fp_; } + + private: + void settle(); + StackSegment *seg_; + StackFrame *fp_; +}; + +} +# 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" 2 +# 41 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" +extern "C" { +struct DtoaState; +} + +struct JSSharpInfo { + bool hasGen; + bool isSharp; + + JSSharpInfo() : hasGen(false), isSharp(false) {} +}; + +typedef js::HashMap JSSharpTable; + +struct JSSharpObjectMap { + unsigned depth; + uint32_t sharpgen; + JSSharpTable table; + + JSSharpObjectMap(JSContext *cx) : depth(0), sharpgen(0), table(js::TempAllocPolicy(cx)) { + table.init(); + } +}; + +namespace js { + +namespace mjit { +class JaegerRuntime; +} + +class MathCache; +class WeakMapBase; +class InterpreterFrames; +class DebugScopes; + + + + + + + +struct GSNCache { + typedef HashMap, + SystemAllocPolicy> Map; + + jsbytecode *code; + Map map; + + GSNCache() : code(__null) { } + + void purge(); +}; + +inline GSNCache * +GetGSNCache(JSContext *cx); + +struct PendingProxyOperation { + PendingProxyOperation *next; + RootedObject object; + PendingProxyOperation(JSContext *cx, JSObject *object) : next(__null), object(cx, object) {} +}; + +typedef Vector ScriptAndCountsVector; + +struct ConservativeGCData +{ + + + + + uintptr_t *nativeStackTop; +# 126 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" + union { + jmp_buf jmpbuf; + uintptr_t words[(((sizeof(jmp_buf))+(sizeof(uintptr_t))-1)/(sizeof(uintptr_t)))]; + } registerSnapshot; + + ConservativeGCData() { + PodZero(this); + } + + ~ConservativeGCData() { + + + + + + do { } while(0); + + } + + __attribute__((noinline)) void recordStackTop(); + + + void updateForRequestEnd(unsigned suspendCount) { + if (suspendCount) + recordStackTop(); + else + nativeStackTop = __null; + } + + + bool hasStackToScan() const { + return !!nativeStackTop; + } +}; + +class ToSourceCache +{ + typedef HashMap, + SystemAllocPolicy> Map; + Map *map_; + public: + ToSourceCache() : map_(__null) {} + JSString *lookup(JSFunction *fun); + void put(JSFunction *fun, JSString *); + void purge(); +}; + +class EvalCache +{ + static const unsigned SHIFT = 6; + static const unsigned LENGTH = 1 << SHIFT; + JSScript *table_[LENGTH]; + + public: + EvalCache() { PodArrayZero(table_); } + JSScript **bucket(JSLinearString *str); + void purge(); +}; + +class NativeIterCache +{ + static const size_t SIZE = size_t(1) << 8; + + + JSObject *data[SIZE]; + + static size_t getIndex(uint32_t key) { + return size_t(key) % SIZE; + } + + public: + + JSObject *last; + + NativeIterCache() + : last(__null) { + PodArrayZero(data); + } + + void purge() { + last = __null; + PodArrayZero(data); + } + + JSObject *get(uint32_t key) const { + return data[getIndex(key)]; + } + + void set(uint32_t key, JSObject *iterobj) { + data[getIndex(key)] = iterobj; + } +}; + + + + + + +class NewObjectCache +{ + + static const unsigned MAX_OBJ_SIZE = 4 * sizeof(void*) + 16 * sizeof(Value); + static inline void staticAsserts(); + + struct Entry + { + + Class *clasp; +# 250 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" + gc::Cell *key; + + + gc::AllocKind kind; + + + uint32_t nbytes; + + + + + + char templateObject[MAX_OBJ_SIZE]; + }; + + Entry entries[41]; + + public: + + typedef int EntryIndex; + + NewObjectCache() { PodZero(this); } + void purge() { PodZero(this); } + + + + + + inline bool lookupProto(Class *clasp, JSObject *proto, gc::AllocKind kind, EntryIndex *pentry); + inline bool lookupGlobal(Class *clasp, js::GlobalObject *global, gc::AllocKind kind, EntryIndex *pentry); + inline bool lookupType(Class *clasp, js::types::TypeObject *type, gc::AllocKind kind, EntryIndex *pentry); + + + inline JSObject *newObjectFromHit(JSContext *cx, EntryIndex entry); + + + inline void fillProto(EntryIndex entry, Class *clasp, JSObject *proto, gc::AllocKind kind, JSObject *obj); + inline void fillGlobal(EntryIndex entry, Class *clasp, js::GlobalObject *global, gc::AllocKind kind, JSObject *obj); + inline void fillType(EntryIndex entry, Class *clasp, js::types::TypeObject *type, gc::AllocKind kind, JSObject *obj); + + + void invalidateEntriesForShape(JSContext *cx, Shape *shape, JSObject *proto); + + private: + inline bool lookup(Class *clasp, gc::Cell *key, gc::AllocKind kind, EntryIndex *pentry); + inline void fill(EntryIndex entry, Class *clasp, gc::Cell *key, gc::AllocKind kind, JSObject *obj); + static inline void copyCachedToObject(JSObject *dst, JSObject *src); +}; +# 306 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" +class FreeOp : public JSFreeOp { + bool shouldFreeLater_; + bool onBackgroundThread_; + + public: + static FreeOp *get(JSFreeOp *fop) { + return static_cast(fop); + } + + FreeOp(JSRuntime *rt, bool shouldFreeLater, bool onBackgroundThread) + : JSFreeOp(rt), + shouldFreeLater_(shouldFreeLater), + onBackgroundThread_(onBackgroundThread) + { + } + + bool shouldFreeLater() const { + return shouldFreeLater_; + } + + bool onBackgroundThread() const { + return onBackgroundThread_; + } + + inline void free_(void* p); + + template inline void delete_(T *p) { if (p) { p->~T(); free_(p); } } template inline void array_delete(T *p) { if (p) { void* p0 = (void *)(uintptr_t(p) - js::OffTheBooks::JSMinAlignment); size_t n = *(size_t *)p0; for (size_t i = 0; i < n; i++) (p + i)->~T(); free_(p0); } } + + static void staticAsserts() { + + + + + + + typedef int moz_static_assert101[(__builtin_offsetof (FreeOp, shouldFreeLater_) == sizeof(JSFreeOp)) ? 1 : -1]; + } +}; + +} + +namespace JS { +struct RuntimeSizes; +} + +struct JSRuntime : js::RuntimeFriendFields +{ + + JSCompartment *atomsCompartment; + + + js::CompartmentVector compartments; + + + + public: + void *ownerThread() const { return ownerThread_; } + void clearOwnerThread(); + void setOwnerThread(); + __attribute__((visibility("default"))) bool onOwnerThread() const; + private: + void *ownerThread_; + public: + + + + + + + js::StackSpace stackSpace; + + + static const size_t TEMP_LIFO_ALLOC_PRIMARY_CHUNK_SIZE = 1 << 12; + js::LifoAlloc tempLifoAlloc; + + private: + + + + + JSC::ExecutableAllocator *execAlloc_; + WTF::BumpPointerAllocator *bumpAlloc_; + + js::mjit::JaegerRuntime *jaegerRuntime_; + + + JSC::ExecutableAllocator *createExecutableAllocator(JSContext *cx); + WTF::BumpPointerAllocator *createBumpPointerAllocator(JSContext *cx); + js::mjit::JaegerRuntime *createJaegerRuntime(JSContext *cx); + + public: + JSC::ExecutableAllocator *getExecAlloc(JSContext *cx) { + return execAlloc_ ? execAlloc_ : createExecutableAllocator(cx); + } + JSC::ExecutableAllocator &execAlloc() { + do { } while(0); + return *execAlloc_; + } + WTF::BumpPointerAllocator *getBumpPointerAllocator(JSContext *cx) { + return bumpAlloc_ ? bumpAlloc_ : createBumpPointerAllocator(cx); + } + + js::mjit::JaegerRuntime *getJaegerRuntime(JSContext *cx) { + return jaegerRuntime_ ? jaegerRuntime_ : createJaegerRuntime(cx); + } + bool hasJaegerRuntime() const { + return jaegerRuntime_; + } + js::mjit::JaegerRuntime &jaegerRuntime() { + do { } while(0); + return *jaegerRuntime_; + } + + + + uintptr_t nativeStackBase; + + + size_t nativeStackQuota; + + + + + + js::InterpreterFrames *interpreterFrames; + + + JSContextCallback cxCallback; + + + JSDestroyCompartmentCallback destroyCompartmentCallback; + + js::ActivityCallback activityCallback; + void *activityCallbackArg; + + + + unsigned suspendCount; + + + unsigned requestDepth; +# 460 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" + js::GCChunkSet gcChunkSet; +# 469 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" + js::gc::Chunk *gcSystemAvailableChunkListHead; + js::gc::Chunk *gcUserAvailableChunkListHead; + js::gc::ChunkPool gcChunkPool; + + js::RootedValueMap gcRootsHash; + js::GCLocks gcLocksHash; + unsigned gcKeepAtoms; + size_t gcBytes; + size_t gcMaxBytes; + size_t gcMaxMallocBytes; + + + + + + + volatile uint32_t gcNumArenasFreeCommitted; + js::GCMarker gcMarker; + void *gcVerifyData; + bool gcChunkAllocationSinceLastGC; + int64_t gcNextFullGCTime; + int64_t gcJitReleaseTime; + JSGCMode gcMode; + + + bool gcShouldCleanUpEverything; + + + + + + + volatile uintptr_t gcIsNeeded; + + js::WeakMapBase *gcWeakMapList; + js::gcstats::Statistics gcStats; + + + uint64_t gcNumber; + + + uint64_t gcStartNumber; + + + bool gcIsFull; + + + js::gcreason::Reason gcTriggerReason; + + + + + + bool gcStrictCompartmentChecking; + + + + + + js::gc::State gcIncrementalState; + + + bool gcLastMarkSlice; + + + + + + + volatile uintptr_t gcInterFrameGC; + + + int64_t gcSliceBudget; + + + + + + bool gcIncrementalEnabled; + + + + + + + bool gcExactScanningEnabled; +# 572 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" + bool gcPoke; + bool gcRunning; +# 614 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" + int gcZeal() { return 0; } + bool needZealousGC() { return false; } + + + JSGCCallback gcCallback; + js::GCSliceCallback gcSliceCallback; + JSFinalizeCallback gcFinalizeCallback; + + private: + + + + + volatile ptrdiff_t gcMallocBytes; + + public: + + + + + + + JSTraceDataOp gcBlackRootsTraceOp; + void *gcBlackRootsData; + JSTraceDataOp gcGrayRootsTraceOp; + void *gcGrayRootsData; + + + js::AutoGCRooter *autoGCRooters; + + + js::ScriptAndCountsVector *scriptAndCountsVector; + + + js::Value NaNValue; + js::Value negativeInfinityValue; + js::Value positiveInfinityValue; + + JSAtom *emptyString; + + + JSCList contextList; + + bool hasContexts() const { + return !((&contextList)->next == (&contextList)); + } + + + JSDebugHooks debugHooks; + + + bool debugMode; + + + bool profilingScripts; + + + bool alwaysPreserveCode; + + + JSBool hadOutOfMemory; + + + + + + JSCList debuggerList; + + + js::DebugScopes *debugScopes; + + + void *data; + + + + PRLock *gcLock; + + js::GCHelperThread gcHelperThread; + + + private: + js::FreeOp defaultFreeOp_; + + public: + js::FreeOp *defaultFreeOp() { + return &defaultFreeOp_; + } + + uint32_t debuggerMutations; + + const JSSecurityCallbacks *securityCallbacks; + JSDestroyPrincipalsOp destroyPrincipals; + + + const JSStructuredCloneCallbacks *structuredCloneCallbacks; + + + JSAccumulateTelemetryDataCallback telemetryCallback; + + + + + + + int32_t propertyRemovals; + + + const char *thousandsSeparator; + const char *decimalSeparator; + const char *numGrouping; + + + + + + bool waiveGCQuota; + + private: + js::MathCache *mathCache_; + js::MathCache *createMathCache(JSContext *cx); + public: + js::MathCache *getMathCache(JSContext *cx) { + return mathCache_ ? mathCache_ : createMathCache(cx); + } + + js::GSNCache gsnCache; + js::PropertyCache propertyCache; + js::NewObjectCache newObjectCache; + js::NativeIterCache nativeIterCache; + js::ToSourceCache toSourceCache; + js::EvalCache evalCache; + + + DtoaState *dtoaState; + + + js::PendingProxyOperation *pendingProxyOperation; + + js::ConservativeGCData conservativeGC; + + private: + JSPrincipals *trustedPrincipals_; + public: + void setTrustedPrincipals(JSPrincipals *p) { trustedPrincipals_ = p; } + JSPrincipals *trustedPrincipals() const { return trustedPrincipals_; } + + + JSAtomState atomState; + + + js::StaticStrings staticStrings; + + JSWrapObjectCallback wrapObjectCallback; + JSSameCompartmentWrapObjectCallback sameCompartmentWrapObjectCallback; + JSPreWrapCallback preWrapObjectCallback; + js::PreserveWrapperCallback preserveWrapperCallback; + + js::ScriptFilenameTable scriptFilenameTable; +# 783 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" + int32_t inOOMReport; + + bool jitHardening; + + JSRuntime(); + ~JSRuntime(); + + bool init(uint32_t maxbytes); + + JSRuntime *thisFromCtor() { return this; } + + + + + + void* malloc_(size_t bytes, JSContext *cx = __null) { + updateMallocCounter(cx, bytes); + void *p = ::js_malloc(bytes); + return (__builtin_expect((!!p), 1)) ? p : onOutOfMemory(__null, bytes, cx); + } + + + + + + void* calloc_(size_t bytes, JSContext *cx = __null) { + updateMallocCounter(cx, bytes); + void *p = ::js_calloc(bytes); + return (__builtin_expect((!!p), 1)) ? p : onOutOfMemory(reinterpret_cast(1), bytes, cx); + } + + void* realloc_(void* p, size_t oldBytes, size_t newBytes, JSContext *cx = __null) { + do { } while(0); + updateMallocCounter(cx, newBytes - oldBytes); + void *p2 = ::js_realloc(p, newBytes); + return (__builtin_expect((!!p2), 1)) ? p2 : onOutOfMemory(p, newBytes, cx); + } + + void* realloc_(void* p, size_t bytes, JSContext *cx = __null) { + + + + + if (!p) + updateMallocCounter(cx, bytes); + void *p2 = ::js_realloc(p, bytes); + return (__builtin_expect((!!p2), 1)) ? p2 : onOutOfMemory(p, bytes, cx); + } + + inline void free_(void* p) { + + js::Foreground::free_(p); + } + + template __attribute__((always_inline)) inline T *new_() { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T () : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) : __null; } static const int JSMinAlignment = 8; template __attribute__((always_inline)) inline T *array_new(size_t n) { uint64_t numBytes64 = uint64_t(JSMinAlignment) + uint64_t(sizeof(T)) * uint64_t(n); size_t numBytes = size_t(numBytes64); if (numBytes64 != numBytes) { do { } while(0); return __null; } void *memory = malloc_(numBytes); if (!memory) return __null; *(size_t *)memory = n; memory = (void*)(uintptr_t(memory) + JSMinAlignment); return new(memory) T[n]; } + template __attribute__((always_inline)) inline void delete_(T *p) { if (p) { p->~T(); free_(p); } } template __attribute__((always_inline)) inline void array_delete(T *p) { if (p) { void* p0 = (void *)(uintptr_t(p) - js::OffTheBooks::JSMinAlignment); size_t n = *(size_t *)p0; for (size_t i = 0; i < n; i++) (p + i)->~T(); free_(p0); } } + + void setGCMaxMallocBytes(size_t value); + + void resetGCMallocBytes() { gcMallocBytes = ptrdiff_t(gcMaxMallocBytes); } +# 852 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" + void updateMallocCounter(JSContext *cx, size_t nbytes); + + bool isTooMuchMalloc() const { + return gcMallocBytes <= 0; + } + + + + + __attribute__((visibility("default"))) void onTooMuchMalloc(); +# 871 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" + __attribute__((visibility("default"))) void * onOutOfMemory(void *p, size_t nbytes, JSContext *cx); + + void triggerOperationCallback(); + + void setJitHardening(bool enabled); + bool getJitHardening() const { + return jitHardening; + } + + void sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf, JS::RuntimeSizes *runtime); + size_t sizeOfExplicitNonHeap(); +}; + + +#define JS_PROPERTY_CACHE(cx) (cx->runtime->propertyCache) + +#define JS_KEEP_ATOMS(rt) (rt)->gcKeepAtoms++; +#define JS_UNKEEP_ATOMS(rt) (rt)->gcKeepAtoms--; +# 904 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" +namespace js { + +struct AutoResolving; + +static inline bool +OptionsHasAllowXML(uint32_t options) +{ + return !!(options & ((uint32_t)1 << (6))); +} + +static inline bool +OptionsHasMoarXML(uint32_t options) +{ + return !!(options & ((uint32_t)1 << (7))); +} + +static inline bool +OptionsSameVersionFlags(uint32_t self, uint32_t other) +{ + static const uint32_t mask = ((uint32_t)1 << (7)); + return !((self & mask) ^ (other & mask)); +} +# 935 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" +namespace VersionFlags { +static const unsigned MASK = 0x0FFF; +static const unsigned ALLOW_XML = 0x1000; +static const unsigned MOAR_XML = 0x2000; +static const unsigned FULL_MASK = 0x3FFF; +} + +static inline JSVersion +VersionNumber(JSVersion version) +{ + return JSVersion(uint32_t(version) & VersionFlags::MASK); +} + +static inline bool +VersionHasAllowXML(JSVersion version) +{ + return !!(version & VersionFlags::ALLOW_XML); +} + +static inline bool +VersionHasMoarXML(JSVersion version) +{ + return !!(version & VersionFlags::MOAR_XML); +} + + +static inline bool +VersionShouldParseXML(JSVersion version) +{ + return VersionHasMoarXML(version) || VersionNumber(version) >= JSVERSION_1_6; +} + +static inline JSVersion +VersionExtractFlags(JSVersion version) +{ + return JSVersion(uint32_t(version) & ~VersionFlags::MASK); +} + +static inline void +VersionCopyFlags(JSVersion *version, JSVersion from) +{ + *version = JSVersion(VersionNumber(*version) | VersionExtractFlags(from)); +} + +static inline bool +VersionHasFlags(JSVersion version) +{ + return !!VersionExtractFlags(version); +} + +static inline unsigned +VersionFlagsToOptions(JSVersion version) +{ + unsigned copts = (VersionHasAllowXML(version) ? ((uint32_t)1 << (6)) : 0) | + (VersionHasMoarXML(version) ? ((uint32_t)1 << (7)) : 0); + do { } while(0); + return copts; +} + +static inline JSVersion +OptionFlagsToVersion(unsigned options, JSVersion version) +{ + uint32_t v = version; + v &= ~(VersionFlags::ALLOW_XML | VersionFlags::MOAR_XML); + if (OptionsHasAllowXML(options)) + v |= VersionFlags::ALLOW_XML; + if (OptionsHasMoarXML(options)) + v |= VersionFlags::MOAR_XML; + return JSVersion(v); +} + +static inline bool +VersionIsKnown(JSVersion version) +{ + return VersionNumber(version) != JSVERSION_UNKNOWN; +} + +typedef HashSet, + SystemAllocPolicy> BusyArraysSet; + +inline void +FreeOp::free_(void* p) { + + if (shouldFreeLater()) { + runtime()->gcHelperThread.freeLater(p); + return; + } + + runtime()->free_(p); +} + +} + +struct JSContext : js::ContextFriendFields +{ + explicit JSContext(JSRuntime *rt); + JSContext *thisDuringConstruction() { return this; } + ~JSContext(); + + + JSCList link; + + private: + + JSVersion defaultVersion; + JSVersion versionOverride; + bool hasVersionOverride; + + + JSBool throwing; + js::Value exception; + + + unsigned runOptions; + + public: + int32_t reportGranularity; + + + JSLocaleCallbacks *localeCallbacks; + + js::AutoResolving *resolvingList; + + + bool generatingError; + + + JSCompartment *compartment; + + inline void setCompartment(JSCompartment *compartment); + + + js::ContextStack stack; + + + inline bool hasfp() const { return stack.hasfp(); } + inline js::StackFrame* fp() const { return stack.fp(); } + inline js::StackFrame* maybefp() const { return stack.maybefp(); } + inline js::FrameRegs& regs() const { return stack.regs(); } + inline js::FrameRegs* maybeRegs() const { return stack.maybeRegs(); } + + + void resetCompartment(); + + + void wrapPendingException(); + + private: + + js::ParseMapPool *parseMapPool_; + + public: + + JSObject *globalObject; + + + JSSharpObjectMap sharpObjectMap; + js::BusyArraysSet busyArrays; + + + JSArgumentFormatMap *argumentFormatMap; + + + char *lastMessage; + + + JSErrorReporter errorReporter; + + + JSOperationCallback operationCallback; + + + void *data; + void *data2; + + inline js::RegExpStatics *regExpStatics(); + + public: + js::ParseMapPool &parseMapPool() { + do { } while(0); + return *parseMapPool_; + } + + inline bool ensureParseMapPool(); + + + + + + inline bool canSetDefaultVersion() const; + + + inline void overrideVersion(JSVersion newVersion); + + + void setDefaultVersion(JSVersion version) { + defaultVersion = version; + } + + void clearVersionOverride() { hasVersionOverride = false; } + JSVersion getDefaultVersion() const { return defaultVersion; } + bool isVersionOverridden() const { return hasVersionOverride; } + + JSVersion getVersionOverride() const { + do { } while(0); + return versionOverride; + } + + + + + + inline bool maybeOverrideVersion(JSVersion newVersion); + + + + + + void maybeMigrateVersionOverride() { + do { } while(0); + if ((__builtin_expect((isVersionOverridden()), 0))) { + defaultVersion = versionOverride; + clearVersionOverride(); + } + } +# 1170 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" + inline JSVersion findVersion() const; + + void setRunOptions(unsigned ropts) { + do { } while(0); + runOptions = ropts; + } + + + inline void setCompileOptions(unsigned newcopts); + + unsigned getRunOptions() const { return runOptions; } + inline unsigned getCompileOptions() const; + inline unsigned allOptions() const; + + bool hasRunOption(unsigned ropt) const { + do { } while(0); + return !!(runOptions & ropt); + } + + bool hasStrictOption() const { return hasRunOption(((uint32_t)1 << (0))); } + bool hasWErrorOption() const { return hasRunOption(((uint32_t)1 << (1))); } + bool hasAtLineOption() const { return hasRunOption(((uint32_t)1 << (5))); } + + js::LifoAlloc &tempLifoAlloc() { return runtime->tempLifoAlloc; } + inline js::LifoAlloc &typeLifoAlloc(); + + inline js::PropertyTree &propertyTree(); + + + unsigned outstandingRequests; + + + + + + unsigned resolveFlags; + + + int64_t rngSeed; + + + js::Value iterValue; + + + bool methodJitEnabled; + + js::mjit::JaegerRuntime &jaegerRuntime() { return runtime->jaegerRuntime(); } + + + bool inferenceEnabled; + + bool typeInferenceEnabled() { return inferenceEnabled; } + + + void updateJITEnabled(); +# 1239 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" + DSTOffsetCache dstOffsetCache; + + + JSObject *enumerators; + + private: + + + + + + + js::Vector genStack; + + public: + + JSGenerator *generatorFor(js::StackFrame *fp) const; + + + inline bool ensureGeneratorStackSpace(); + + bool enterGenerator(JSGenerator *gen) { + return genStack.append(gen); + } + + void leaveGenerator(JSGenerator *gen) { + do { } while(0); + genStack.popBack(); + } + + inline void* malloc_(size_t bytes) { + return runtime->malloc_(bytes, this); + } + + inline void* mallocNoReport(size_t bytes) { + do { } while(0); + return runtime->malloc_(bytes, __null); + } + + inline void* calloc_(size_t bytes) { + return runtime->calloc_(bytes, this); + } + + inline void* realloc_(void* p, size_t bytes) { + return runtime->realloc_(p, bytes, this); + } + + inline void* realloc_(void* p, size_t oldBytes, size_t newBytes) { + return runtime->realloc_(p, oldBytes, newBytes, this); + } + + inline void free_(void* p) { + runtime->free_(p); + } + + template inline T *new_() { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T () : __null; } template inline T *new_(P1 p1) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1) : __null; } template inline T *new_(P1 p1, P2 p2) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) : __null; } static const int JSMinAlignment = 8; template inline T *array_new(size_t n) { uint64_t numBytes64 = uint64_t(JSMinAlignment) + uint64_t(sizeof(T)) * uint64_t(n); size_t numBytes = size_t(numBytes64); if (numBytes64 != numBytes) { do { } while(0); return __null; } void *memory = malloc_(numBytes); if (!memory) return __null; *(size_t *)memory = n; memory = (void*)(uintptr_t(memory) + JSMinAlignment); return new(memory) T[n]; } + template inline void delete_(T *p) { if (p) { p->~T(); free_(p); } } template inline void array_delete(T *p) { if (p) { void* p0 = (void *)(uintptr_t(p) - js::OffTheBooks::JSMinAlignment); size_t n = *(size_t *)p0; for (size_t i = 0; i < n; i++) (p + i)->~T(); free_(p0); } } + + void purge(); + + + inline void assertValidStackDepth(unsigned depth); + + bool isExceptionPending() { + return throwing; + } + + js::Value getPendingException() { + do { } while(0); + return exception; + } + + void setPendingException(js::Value v); + + void clearPendingException() { + this->throwing = false; + this->exception.setUndefined(); + } +# 1337 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" + unsigned activeCompilations; + + + + + + bool runningWithTrustedPrincipals() const; + + __attribute__((visibility("default"))) size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const; + + static inline JSContext *fromLinkField(JSCList *link) { + do { } while(0); + return reinterpret_cast(uintptr_t(link) - __builtin_offsetof (JSContext, link)); + } + + void mark(JSTracer *trc); + + private: + + + + + + + __attribute__((visibility("default"))) void checkMallocGCPressure(void *p); +}; + +namespace js { + +class AutoAllowUnaliasedVarAccess +{ + JSContext *cx; + public: + AutoAllowUnaliasedVarAccess(JSContext *cx) : cx(cx) { + + + + } + ~AutoAllowUnaliasedVarAccess() { + + + + + } +}; + +struct AutoResolving { + public: + enum Kind { + LOOKUP, + WATCH + }; + + AutoResolving(JSContext *cx, JSObject *obj, jsid id, Kind kind = LOOKUP + ) + : context(cx), object(obj), id(id), kind(kind), link(cx->resolvingList) + { + do { } while (0); + do { } while(0); + cx->resolvingList = this; + } + + ~AutoResolving() { + do { } while(0); + context->resolvingList = link; + } + + bool alreadyStarted() const { + return link && alreadyStartedSlow(); + } + + private: + bool alreadyStartedSlow() const; + + JSContext *const context; + JSObject *const object; + jsid const id; + Kind const kind; + AutoResolving *const link; + +}; + + +class AutoXMLRooter : private AutoGCRooter { + public: + AutoXMLRooter(JSContext *cx, JSXML *xml + ) + : AutoGCRooter(cx, XML), xml(xml) + { + do { } while (0); + do { } while(0); + } + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + JSXML * const xml; + +}; + + + +#define JS_LOCK_GC(rt) PR_Lock((rt)->gcLock) +#define JS_UNLOCK_GC(rt) PR_Unlock((rt)->gcLock) + + + + + +class AutoLockGC +{ + public: + explicit AutoLockGC(JSRuntime *rt = __null + ) + : runtime(rt) + { + do { } while (0); + + + if (rt) + PR_Lock((rt)->gcLock); + + } + + ~AutoLockGC() + { + + if (runtime) + PR_Unlock((runtime)->gcLock); + + } + + bool locked() const { + return !!runtime; + } + + void lock(JSRuntime *rt) { + do { } while(0); + do { } while(0); + runtime = rt; + PR_Lock((rt)->gcLock); + } + + private: + JSRuntime *runtime; + +}; + +class AutoUnlockGC { + private: + JSRuntime *rt; + + + public: + explicit AutoUnlockGC(JSRuntime *rt + ) + : rt(rt) + { + do { } while (0); + PR_Unlock((rt)->gcLock); + } + ~AutoUnlockGC() { PR_Lock((rt)->gcLock); } +}; + +class AutoKeepAtoms { + JSRuntime *rt; + + + public: + explicit AutoKeepAtoms(JSRuntime *rt + ) + : rt(rt) + { + do { } while (0); + (rt)->gcKeepAtoms++;; + } + ~AutoKeepAtoms() { (rt)->gcKeepAtoms--;; } +}; + +class AutoReleasePtr { + JSContext *cx; + void *ptr; + + + AutoReleasePtr(const AutoReleasePtr &other) ; + AutoReleasePtr operator=(const AutoReleasePtr &other) ; + + public: + explicit AutoReleasePtr(JSContext *cx, void *ptr + ) + : cx(cx), ptr(ptr) + { + do { } while (0); + } + ~AutoReleasePtr() { cx->free_(ptr); } +}; + + + + +class AutoReleaseNullablePtr { + JSContext *cx; + void *ptr; + + + AutoReleaseNullablePtr(const AutoReleaseNullablePtr &other) ; + AutoReleaseNullablePtr operator=(const AutoReleaseNullablePtr &other) ; + + public: + explicit AutoReleaseNullablePtr(JSContext *cx, void *ptr + ) + : cx(cx), ptr(ptr) + { + do { } while (0); + } + void reset(void *ptr2) { + if (ptr) + cx->free_(ptr); + ptr = ptr2; + } + ~AutoReleaseNullablePtr() { if (ptr) cx->free_(ptr); } +}; + +} + +class JSAutoResolveFlags +{ + public: + JSAutoResolveFlags(JSContext *cx, unsigned flags + ) + : mContext(cx), mSaved(cx->resolveFlags) + { + do { } while (0); + cx->resolveFlags = flags; + } + + ~JSAutoResolveFlags() { mContext->resolveFlags = mSaved; } + + private: + JSContext *mContext; + unsigned mSaved; + +}; + +namespace js { + + + + +class ContextIter { + JSCList *begin; + JSCList *end; + +public: + explicit ContextIter(JSRuntime *rt) { + end = &rt->contextList; + begin = end->next; + } + + bool done() const { + return begin == end; + } + + void next() { + do { } while(0); + begin = begin->next; + } + + JSContext *get() const { + do { } while(0); + return JSContext::fromLinkField(begin); + } + + operator JSContext *() const { + return get(); + } + + JSContext *operator ->() const { + return get(); + } +}; + + + + + +extern JSContext * +NewContext(JSRuntime *rt, size_t stackChunkSize); + +enum DestroyContextMode { + DCM_NO_GC, + DCM_FORCE_GC, + DCM_NEW_FAILED +}; + +extern void +DestroyContext(JSContext *cx, DestroyContextMode mode); + +} +# 1653 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" +namespace js { + + +extern void +ReportUsageError(JSContext *cx, JSObject *callee, const char *msg); + +} + +extern void +js_ReportOutOfMemory(JSContext *cx); + +extern __attribute__((visibility("default"))) void +js_ReportAllocationOverflow(JSContext *cx); + + + + + +extern __attribute__((visibility("default"))) void +js_ReportErrorAgain(JSContext *cx, const char *message, JSErrorReport *report); + +extern void +js_ReportIsNotDefined(JSContext *cx, const char *name); + + + + +extern JSBool +js_ReportIsNullOrUndefined(JSContext *cx, int spindex, const js::Value &v, + JSString *fallback); + +extern void +js_ReportMissingArg(JSContext *cx, const js::Value &v, unsigned arg); + + + + + + +extern JSBool +js_ReportValueErrorFlags(JSContext *cx, unsigned flags, const unsigned errorNumber, + int spindex, const js::Value &v, JSString *fallback, + const char *arg1, const char *arg2); + +#define js_ReportValueError(cx,errorNumber,spindex,v,fallback) ((void)js_ReportValueErrorFlags(cx, JSREPORT_ERROR, errorNumber, spindex, v, fallback, NULL, NULL)) + + + +#define js_ReportValueError2(cx,errorNumber,spindex,v,fallback,arg1) ((void)js_ReportValueErrorFlags(cx, JSREPORT_ERROR, errorNumber, spindex, v, fallback, arg1, NULL)) + + + +#define js_ReportValueError3(cx,errorNumber,spindex,v,fallback,arg1,arg2) ((void)js_ReportValueErrorFlags(cx, JSREPORT_ERROR, errorNumber, spindex, v, fallback, arg1, arg2)) + + + +extern JSErrorFormatString js_ErrorFormatString[JSErr_Limit]; + + +#define JS_ASSERT_REQUEST_DEPTH(cx) JS_ASSERT((cx)->runtime->requestDepth >= 1) +# 1721 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" +extern JSBool +js_InvokeOperationCallback(JSContext *cx); + +extern JSBool +js_HandleExecutionInterrupt(JSContext *cx); + +extern jsbytecode* +js_GetCurrentBytecodePC(JSContext* cx); + +extern JSScript * +js_GetCurrentScript(JSContext* cx); + + + + + + +static __attribute__((always_inline)) inline bool +JS_CHECK_OPERATION_LIMIT(JSContext *cx) +{ + do { } while(0); + return !cx->runtime->interrupt || js_InvokeOperationCallback(cx); +} + +namespace js { + + +namespace mjit { + void ExpandInlineFrames(JSCompartment *compartment); +} + + +} + + +enum FrameExpandKind { + FRAME_EXPAND_NONE = 0, + FRAME_EXPAND_ALL = 1 +}; + +namespace js { + + + +static __attribute__((always_inline)) inline void +MakeRangeGCSafe(Value *vec, size_t len) +{ + PodZero(vec, len); +} + +static __attribute__((always_inline)) inline void +MakeRangeGCSafe(Value *beg, Value *end) +{ + PodZero(beg, end - beg); +} + +static __attribute__((always_inline)) inline void +MakeRangeGCSafe(jsid *beg, jsid *end) +{ + for (jsid *id = beg; id != end; ++id) + *id = INT_TO_JSID(0); +} + +static __attribute__((always_inline)) inline void +MakeRangeGCSafe(jsid *vec, size_t len) +{ + MakeRangeGCSafe(vec, vec + len); +} + +static __attribute__((always_inline)) inline void +MakeRangeGCSafe(const Shape **beg, const Shape **end) +{ + PodZero(beg, end - beg); +} + +static __attribute__((always_inline)) inline void +MakeRangeGCSafe(const Shape **vec, size_t len) +{ + PodZero(vec, len); +} + +static __attribute__((always_inline)) inline void +SetValueRangeToUndefined(Value *beg, Value *end) +{ + for (Value *v = beg; v != end; ++v) + v->setUndefined(); +} + +static __attribute__((always_inline)) inline void +SetValueRangeToUndefined(Value *vec, size_t len) +{ + SetValueRangeToUndefined(vec, vec + len); +} + +static __attribute__((always_inline)) inline void +SetValueRangeToNull(Value *beg, Value *end) +{ + for (Value *v = beg; v != end; ++v) + v->setNull(); +} + +static __attribute__((always_inline)) inline void +SetValueRangeToNull(Value *vec, size_t len) +{ + SetValueRangeToNull(vec, vec + len); +} + +class AutoObjectVector : public AutoVectorRooter +{ + public: + explicit AutoObjectVector(JSContext *cx + ) + : AutoVectorRooter(cx, OBJVECTOR) + { + do { } while (0); + } + + +}; + +class AutoShapeVector : public AutoVectorRooter +{ + public: + explicit AutoShapeVector(JSContext *cx + ) + : AutoVectorRooter(cx, SHAPEVECTOR) + { + do { } while (0); + } + + +}; + +class AutoValueArray : public AutoGCRooter +{ + js::Value *start_; + unsigned length_; + SkipRoot skip; + + public: + AutoValueArray(JSContext *cx, js::Value *start, unsigned length + ) + : AutoGCRooter(cx, VALARRAY), start_(start), length_(length), skip(cx, start, length) + { + do { } while (0); + } + + Value *start() { return start_; } + unsigned length() const { return length_; } + + +}; +# 1885 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" +class RuntimeAllocPolicy +{ + JSRuntime *const runtime; + + public: + RuntimeAllocPolicy(JSRuntime *rt) : runtime(rt) {} + RuntimeAllocPolicy(JSContext *cx) : runtime(cx->runtime) {} + void *malloc_(size_t bytes) { return runtime->malloc_(bytes); } + void *realloc_(void *p, size_t bytes) { return runtime->realloc_(p, bytes); } + void free_(void *p) { runtime->free_(p); } + void reportAllocOverflow() const {} +}; + + + + +class ContextAllocPolicy +{ + JSContext *const cx; + + public: + ContextAllocPolicy(JSContext *cx) : cx(cx) {} + JSContext *context() const { return cx; } + void *malloc_(size_t bytes) { return cx->malloc_(bytes); } + void *realloc_(void *p, size_t oldBytes, size_t bytes) { return cx->realloc_(p, oldBytes, bytes); } + void free_(void *p) { cx->free_(p); } + void reportAllocOverflow() const { js_ReportAllocationOverflow(cx); } +}; + +} +# 13 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsarray.h" 2 + + + + + + +const unsigned MIN_SPARSE_INDEX = 256; + +namespace js { + +const uint32_t MAX_ARRAY_INDEX = 4294967294u; +} + +inline JSBool +js_IdIsIndex(jsid id, uint32_t *indexp) +{ + if (JSID_IS_INT(id)) { + int32_t i = JSID_TO_INT(id); + if (i < 0) + return (int)0; + *indexp = (uint32_t)i; + return (int)1; + } + + if ((__builtin_expect((!JSID_IS_STRING(id)), 0))) + return (int)0; + + return js::StringIsArrayIndex(JSID_TO_ATOM(id), indexp); +} + +extern JSObject * +js_InitArrayClass(JSContext *cx, JSObject *obj); + +extern bool +js_InitContextBusyArrayTable(JSContext *cx); + +namespace js { + + +extern JSObject * +NewDenseEmptyArray(JSContext *cx, JSObject *proto=__null); + + +extern JSObject * +NewDenseAllocatedArray(JSContext *cx, uint32_t length, JSObject *proto=__null); + + + + + + +extern JSObject * +NewDenseAllocatedEmptyArray(JSContext *cx, uint32_t length, JSObject *proto=__null); + + + + + +extern JSObject * +NewDenseUnallocatedArray(JSContext *cx, uint32_t length, JSObject *proto=__null); + + +extern JSObject * +NewDenseCopiedArray(JSContext *cx, uint32_t length, const Value *vp, JSObject *proto = __null); + + +extern JSObject * +NewSlowEmptyArray(JSContext *cx); + +} + +extern JSBool +js_GetLengthProperty(JSContext *cx, JSObject *obj, uint32_t *lengthp); + +extern JSBool +js_SetLengthProperty(JSContext *cx, JSObject *obj, double length); + +namespace js { + +extern JSBool +array_defineElement(JSContext *cx, HandleObject obj, uint32_t index, const Value *value, + PropertyOp getter, StrictPropertyOp setter, unsigned attrs); + +extern JSBool +array_deleteElement(JSContext *cx, HandleObject obj, uint32_t index, Value *rval, JSBool strict); + + + + + + + +extern bool +GetElements(JSContext *cx, HandleObject aobj, uint32_t length, js::Value *vp); + + + +extern JSBool +array_sort(JSContext *cx, unsigned argc, js::Value *vp); + +extern JSBool +array_push(JSContext *cx, unsigned argc, js::Value *vp); + +extern JSBool +array_pop(JSContext *cx, unsigned argc, js::Value *vp); + +extern JSBool +array_concat(JSContext *cx, unsigned argc, js::Value *vp); + +extern JSBool +array_shift(JSContext *cx, unsigned argc, js::Value *vp); + +} +# 139 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsarray.h" +extern JSBool +js_NewbornArrayPush(JSContext *cx, js::HandleObject obj, const js::Value &v); + +JSBool +js_PrototypeHasIndexedProperties(JSContext *cx, JSObject *obj); + + + + +JSBool +js_GetDenseArrayElementValue(JSContext *cx, JSObject *obj, jsid id, + js::Value *vp); + + +JSBool +js_Array(JSContext *cx, unsigned argc, js::Value *vp); +# 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsbool.h" 1 + + + + + + + +#define jsbool_h___ + + + + + + + +extern JSObject * +js_InitBooleanClass(JSContext *cx, JSObject *obj); + +extern JSString * +js_BooleanToString(JSContext *cx, JSBool b); + +namespace js { + +inline bool +BooleanGetPrimitiveValue(JSContext *cx, JSObject &obj, Value *vp); + +} + +extern JSBool +js_ValueToBoolean(const js::Value &v); +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfun.h" 1 +# 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsiter.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsiter.h" +#define jsiter_h___ + + + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" 1 +# 42 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_VERSION_ECMA_3 148 +#define JS_VERSION_ECMA_3_TEST 149 +# 124 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_HAS_STR_HTML_HELPERS 1 +#define JS_HAS_OBJ_PROTO_PROP 1 +#define JS_HAS_OBJ_WATCHPOINT 1 +#define JS_HAS_TOSOURCE 1 +#define JS_HAS_CATCH_GUARD 1 +#define JS_HAS_UNEVAL 1 +#define JS_HAS_CONST 1 +#define JS_HAS_FUN_EXPR_STMT 1 +#define JS_HAS_NO_SUCH_METHOD 1 +#define JS_HAS_GENERATORS 1 +#define JS_HAS_BLOCK_SCOPE 1 +#define JS_HAS_DESTRUCTURING 2 +#define JS_HAS_GENERATOR_EXPRS 1 +#define JS_HAS_EXPR_CLOSURES 1 +# 146 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_HAS_NEW_GLOBAL_OBJECT 1 + + +#define JS_HAS_MAKE_SYSTEM_OBJECT 1 + + +#define JS_HAS_DESTRUCTURING_SHORTHAND (JS_HAS_DESTRUCTURING == 2) + + + + + +#define OLD_GETTER_SETTER_METHODS 1 + + +#define USE_NEW_OBJECT_REPRESENTATION 0 + + + + +#define NEW_OBJECT_REPRESENTATION_ONLY() MOZ_NOT_REACHED("don't call this! to be used in the new object representation") +# 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsiter.h" 2 +# 26 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsiter.h" +#define JSITER_ACTIVE 0x1000 +#define JSITER_UNREUSABLE 0x2000 + +namespace js { + +struct NativeIterator { + HeapPtrObject obj; + HeapPtr *props_array; + HeapPtr *props_cursor; + HeapPtr *props_end; + const Shape **shapes_array; + uint32_t shapes_length; + uint32_t shapes_key; + uint32_t flags; + JSObject *next; + + bool isKeyIter() const { return (flags & 0x2) == 0; } + + inline HeapPtr *begin() const { + return props_array; + } + + inline HeapPtr *end() const { + return props_end; + } + + size_t numKeys() const { + return end() - begin(); + } + + HeapPtr *current() const { + do { } while(0); + return props_cursor; + } + + void incCursor() { + props_cursor = props_cursor + 1; + } + + static NativeIterator *allocateIterator(JSContext *cx, uint32_t slength, + const js::AutoIdVector &props); + void init(JSObject *obj, unsigned flags, uint32_t slength, uint32_t key); + + void mark(JSTracer *trc); +}; + +class ElementIteratorObject : public JSObject { + public: + enum { + TargetSlot, + IndexSlot, + NumSlots + }; + + static JSObject *create(JSContext *cx, HandleObject target); + + inline uint32_t getIndex() const; + inline void setIndex(uint32_t index); + inline JSObject *getTargetObject() const; +# 130 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsiter.h" + bool iteratorNext(JSContext *cx, Value *vp); +}; + +bool +VectorToIdArray(JSContext *cx, AutoIdVector &props, JSIdArray **idap); + +bool +GetIterator(JSContext *cx, HandleObject obj, unsigned flags, Value *vp); + +bool +VectorToKeyIterator(JSContext *cx, HandleObject obj, unsigned flags, AutoIdVector &props, Value *vp); + +bool +VectorToValueIterator(JSContext *cx, HandleObject obj, unsigned flags, AutoIdVector &props, Value *vp); + + + + + +bool +EnumeratedIdVectorToIterator(JSContext *cx, HandleObject obj, unsigned flags, AutoIdVector &props, Value *vp); + + + + + + + +extern JSBool +ValueToIterator(JSContext *cx, unsigned flags, Value *vp); + +extern bool +CloseIterator(JSContext *cx, JSObject *iterObj); + +extern bool +UnwindIteratorForException(JSContext *cx, JSObject *obj); + +extern void +UnwindIteratorForUncatchableException(JSContext *cx, JSObject *obj); + +} + +extern bool +js_SuppressDeletedProperty(JSContext *cx, js::HandleObject obj, jsid id); + +extern bool +js_SuppressDeletedElement(JSContext *cx, js::HandleObject obj, uint32_t index); + +extern bool +js_SuppressDeletedElements(JSContext *cx, js::HandleObject obj, uint32_t begin, uint32_t end); + + + + + + +extern JSBool +js_IteratorMore(JSContext *cx, js::HandleObject iterobj, js::Value *rval); + +extern JSBool +js_IteratorNext(JSContext *cx, JSObject *iterobj, js::Value *rval); + +extern JSBool +js_ThrowStopIteration(JSContext *cx); + +namespace js { + + + + + + + +inline bool +Next(JSContext *cx, HandleObject iter, Value *vp) +{ + if (!js_IteratorMore(cx, iter, vp)) + return false; + if (vp->toBoolean()) + return js_IteratorNext(cx, iter, vp); + vp->setMagic(JS_NO_ITER_VALUE); + return true; +} +# 226 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsiter.h" +template +bool +ForOf(JSContext *cx, const Value &iterable, Op op) +{ + Value iterv(iterable); + if (!ValueToIterator(cx, 0x20, &iterv)) + return false; + RootedObject iter(cx, &iterv.toObject()); + + bool ok = true; + while (ok) { + Value v; + ok = Next(cx, iter, &v); + if (ok) { + if (v.isMagic(JS_NO_ITER_VALUE)) + break; + ok = op(cx, v); + } + } + + bool throwing = !ok && cx->isExceptionPending(); + Value exc; + if (throwing) { + exc = cx->getPendingException(); + cx->clearPendingException(); + } + bool closedOK = CloseIterator(cx, iter); + if (throwing && closedOK) + cx->setPendingException(exc); + return ok && closedOK; +} + +} + + + + + + +typedef enum JSGeneratorState { + JSGEN_NEWBORN, + JSGEN_OPEN, + JSGEN_RUNNING, + JSGEN_CLOSING, + JSGEN_CLOSED +} JSGeneratorState; + +struct JSGenerator { + js::HeapPtrObject obj; + JSGeneratorState state; + js::FrameRegs regs; + JSObject *enumerators; + js::StackFrame *floating; + js::HeapValue floatingStack[1]; + + js::StackFrame *floatingFrame() { + return floating; + } + + js::StackFrame *liveFrame() { + do { } while(0) + ; + return regs.fp(); + } +}; + +extern JSObject * +js_NewGenerator(JSContext *cx); +# 306 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsiter.h" +inline js::StackFrame * +js_FloatingFrameIfGenerator(JSContext *cx, js::StackFrame *fp) +{ + if ((__builtin_expect((fp->isGeneratorFrame()), 0))) + return cx->generatorFor(fp)->floatingFrame(); + return fp; +} + + +extern JSGenerator * +js_FloatingFrameToGenerator(js::StackFrame *fp); + +inline js::StackFrame * +js_LiveFrameIfGenerator(js::StackFrame *fp) +{ + return fp->isGeneratorFrame() ? js_FloatingFrameToGenerator(fp)->liveFrame() : fp; +} + + + +extern JSObject * +js_InitIteratorClasses(JSContext *cx, JSObject *obj); +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsnum.h" 1 + + + + + + + +#define jsnum_h___ + + + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumericConversions.h" 1 +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsnum.h" 2 + +extern double js_NaN; +extern double js_PositiveInfinity; +extern double js_NegativeInfinity; + +namespace js { + +extern bool +InitRuntimeNumberState(JSRuntime *rt); + +extern void +FinishRuntimeNumberState(JSRuntime *rt); + +} + + +extern JSObject * +js_InitNumberClass(JSContext *cx, JSObject *obj); + + + + +extern const char js_isNaN_str[]; +extern const char js_isFinite_str[]; +extern const char js_parseFloat_str[]; +extern const char js_parseInt_str[]; + +class JSString; +class JSFixedString; + + + + + + +extern JSString * +js_NumberToString(JSContext *cx, double d); + +namespace js { + +extern JSFixedString * +Int32ToString(JSContext *cx, int32_t i); + + + + + +extern bool +NumberValueToStringBuffer(JSContext *cx, const Value &v, StringBuffer &sb); + + +extern JSFixedString * +NumberToString(JSContext *cx, double d); + +extern JSFixedString * +IndexToString(JSContext *cx, uint32_t index); + + + + + + +struct ToCStringBuf +{ + + + + + + static const size_t sbufSize = 34; + char sbuf[sbufSize]; + char *dbuf; + + ToCStringBuf(); + ~ToCStringBuf(); +}; + + + + + + + +extern char * +NumberToCString(JSContext *cx, ToCStringBuf *cbuf, double d, int base = 10); + + + + + +const double DOUBLE_INTEGRAL_PRECISION_LIMIT = uint64_t(1) << 53; +# 121 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsnum.h" +extern bool +GetPrefixInteger(JSContext *cx, const jschar *start, const jschar *end, int base, + const jschar **endp, double *dp); + + +__attribute__((always_inline)) inline bool +ToNumber(JSContext *cx, Value *vp) +{ + if (vp->isNumber()) + return true; + double d; + extern bool ToNumberSlow(JSContext *cx, js::Value v, double *dp); + if (!ToNumberSlow(cx, *vp, &d)) + return false; + vp->setNumber(d); + return true; +} + + + + + + + +__attribute__((always_inline)) inline bool +ToUint32(JSContext *cx, const js::Value &v, uint32_t *out) +{ + if (v.isInt32()) { + *out = (uint32_t)v.toInt32(); + return true; + } + extern bool ToUint32Slow(JSContext *cx, const js::Value &v, uint32_t *ip); + return ToUint32Slow(cx, v, out); +} + + + + + + +__attribute__((always_inline)) inline bool +ValueToUint16(JSContext *cx, const js::Value &v, uint16_t *out) +{ + if (v.isInt32()) { + *out = uint16_t(v.toInt32()); + return true; + } + extern bool ValueToUint16Slow(JSContext *cx, const js::Value &v, uint16_t *out); + return ValueToUint16Slow(cx, v, out); +} + +JSBool +num_parseInt(JSContext *cx, unsigned argc, Value *vp); + +} +# 187 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsnum.h" +extern JSBool +js_strtod(JSContext *cx, const jschar *s, const jschar *send, + const jschar **ep, double *dp); + +extern JSBool +js_num_valueOf(JSContext *cx, unsigned argc, js::Value *vp); + +namespace js { + +static __attribute__((always_inline)) inline bool +ValueFitsInInt32(const Value &v, int32_t *pi) +{ + if (v.isInt32()) { + *pi = v.toInt32(); + return true; + } + return v.isDouble() && MOZ_DOUBLE_IS_INT32(v.toDouble(), pi); +} +# 215 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsnum.h" +static __attribute__((always_inline)) inline bool +IsDefinitelyIndex(const Value &v, uint32_t *indexp) +{ + if (v.isInt32() && v.toInt32() >= 0) { + *indexp = v.toInt32(); + return true; + } + + int32_t i; + if (v.isDouble() && MOZ_DOUBLE_IS_INT32(v.toDouble(), &i) && i >= 0) { + *indexp = uint32_t(i); + return true; + } + + return false; +} + + +static inline bool +ToInteger(JSContext *cx, const js::Value &v, double *dp) +{ + if (v.isInt32()) { + *dp = v.toInt32(); + return true; + } + if (v.isDouble()) { + *dp = v.toDouble(); + } else { + extern bool ToNumberSlow(JSContext *cx, Value v, double *dp); + if (!ToNumberSlow(cx, v, dp)) + return false; + } + *dp = ToInteger(*dp); + return true; +} + +} +# 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" +#define _JSPROBES_H +# 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" +#define jsjaeger_h__ + + +#define JSGC_INCREMENTAL_MJ + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" 1 +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscompartment.h" 1 + + + + + + +#define jscompartment_h___ +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscompartment.h" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" +#define GlobalObject_h___ + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsarray.h" 1 +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsbool.h" 1 +# 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsexn.h" 1 +# 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsexn.h" +#define jsexn_h___ + + + + + + +extern JSObject * +js_InitExceptionClasses(JSContext *cx, JSObject *obj); +# 30 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsexn.h" +extern JSBool +js_ErrorToException(JSContext *cx, const char *message, JSErrorReport *reportp, + JSErrorCallback callback, void *userRef); +# 50 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsexn.h" +extern JSBool +js_ReportUncaughtException(JSContext *cx); + +extern JSErrorReport * +js_ErrorFromException(JSContext *cx, jsval exn); + +extern const JSErrorFormatString * +js_GetLocalizedErrorMessage(JSContext* cx, void *userRef, const char *locale, + const unsigned errorNumber); +# 68 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsexn.h" +extern JSObject * +js_CopyErrorObject(JSContext *cx, js::HandleObject errobj, js::HandleObject scope); + +static inline JSProtoKey +GetExceptionProtoKey(int exn) +{ + do { } while(0); + do { } while(0); + return JSProtoKey(JSProto_Error + exn); +} +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsiter.h" 1 +# 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsnum.h" 1 +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" 2 + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/builtin/RegExp.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/builtin/RegExp.h" +#define RegExp_h___ + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprvtd.h" 1 +# 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/builtin/RegExp.h" 2 + +JSObject * +js_InitRegExpClass(JSContext *cx, JSObject *obj); + + + + + + +namespace js { + + + + + + +bool +ExecuteRegExp(JSContext *cx, RegExpStatics *res, RegExpObject &reobj, + JSLinearString *input, const jschar *chars, size_t length, + size_t *lastIndex, RegExpExecType type, Value *rval); + +bool +ExecuteRegExp(JSContext *cx, RegExpStatics *res, RegExpShared &shared, + JSLinearString *input, const jschar *chars, size_t length, + size_t *lastIndex, RegExpExecType type, Value *rval); + +extern JSBool +regexp_exec(JSContext *cx, unsigned argc, Value *vp); + +extern JSBool +regexp_test(JSContext *cx, unsigned argc, Value *vp); + +} +# 23 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" 2 + +extern JSObject * +js_InitObjectClass(JSContext *cx, JSObject *obj); + +extern JSObject * +js_InitFunctionClass(JSContext *cx, JSObject *obj); + +extern JSObject * +js_InitTypedArrayClasses(JSContext *cx, JSObject *obj); + +namespace js { + +class Debugger; +# 64 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" +class GlobalObject : public JSObject +{ + + + + + static const unsigned STANDARD_CLASS_SLOTS = JSProto_LIMIT * 3; + + + static const unsigned THROWTYPEERROR = STANDARD_CLASS_SLOTS; + static const unsigned GENERATOR_PROTO = THROWTYPEERROR + 1; + static const unsigned REGEXP_STATICS = GENERATOR_PROTO + 1; + static const unsigned FUNCTION_NS = REGEXP_STATICS + 1; + static const unsigned RUNTIME_CODEGEN_ENABLED = FUNCTION_NS + 1; + static const unsigned EVAL = RUNTIME_CODEGEN_ENABLED + 1; + static const unsigned FLAGS = EVAL + 1; + static const unsigned DEBUGGERS = FLAGS + 1; + + + static const unsigned RESERVED_SLOTS = DEBUGGERS + 1; + + void staticAsserts() { + + + + + + typedef int moz_static_assert102[((JSProto_LIMIT * 3 + 8) == RESERVED_SLOTS) ? 1 : -1]; + } + + static const int32_t FLAGS_CLEARED = 0x1; + + inline void setFlags(int32_t flags); + inline void initFlags(int32_t flags); + + friend JSObject * + ::js_InitObjectClass(JSContext *cx, JSObject *obj); + friend JSObject * + ::js_InitFunctionClass(JSContext *cx, JSObject *obj); + + + JSObject * + initFunctionAndObjectClasses(JSContext *cx); + + inline void setDetailsForKey(JSProtoKey key, JSObject *ctor, JSObject *proto); + inline void setObjectClassDetails(JSFunction *ctor, JSObject *proto); + inline void setFunctionClassDetails(JSFunction *ctor, JSObject *proto); + + inline void setThrowTypeError(JSFunction *fun); + + inline void setOriginalEval(JSObject *evalobj); + + Value getConstructor(JSProtoKey key) const { + do { } while(0); + return getSlot(key); + } + + Value getPrototype(JSProtoKey key) const { + do { } while(0); + return getSlot(JSProto_LIMIT + key); + } + + bool classIsInitialized(JSProtoKey key) const { + bool inited = !getConstructor(key).isUndefined(); + do { } while(0); + return inited; + } + + bool functionObjectClassesInitialized() const { + bool inited = classIsInitialized(JSProto_Function); + do { } while(0); + return inited; + } + + bool arrayClassInitialized() const { + return classIsInitialized(JSProto_Array); + } + + bool booleanClassInitialized() const { + return classIsInitialized(JSProto_Boolean); + } + bool numberClassInitialized() const { + return classIsInitialized(JSProto_Number); + } + bool stringClassInitialized() const { + return classIsInitialized(JSProto_String); + } + bool regexpClassInitialized() const { + return classIsInitialized(JSProto_RegExp); + } + bool arrayBufferClassInitialized() const { + return classIsInitialized(JSProto_ArrayBuffer); + } + bool errorClassesInitialized() const { + return classIsInitialized(JSProto_Error); + } + + public: + static GlobalObject *create(JSContext *cx, Class *clasp); + + + + + + JSFunction * + createConstructor(JSContext *cx, JSNative ctor, JSAtom *name, unsigned length, + gc::AllocKind kind = JSFunction::FinalizeKind); +# 180 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" + JSObject *createBlankPrototype(JSContext *cx, js::Class *clasp); + + + + + + JSObject *createBlankPrototypeInheriting(JSContext *cx, js::Class *clasp, JSObject &proto); + + JSObject *getOrCreateObjectPrototype(JSContext *cx) { + if (functionObjectClassesInitialized()) + return &getPrototype(JSProto_Object).toObject(); + Rooted self(cx, this); + if (!initFunctionAndObjectClasses(cx)) + return __null; + return &self->getPrototype(JSProto_Object).toObject(); + } + + JSObject *getOrCreateFunctionPrototype(JSContext *cx) { + if (functionObjectClassesInitialized()) + return &getPrototype(JSProto_Function).toObject(); + Rooted self(cx, this); + if (!initFunctionAndObjectClasses(cx)) + return __null; + return &self->getPrototype(JSProto_Function).toObject(); + } + + JSObject *getOrCreateArrayPrototype(JSContext *cx) { + if (arrayClassInitialized()) + return &getPrototype(JSProto_Array).toObject(); + Rooted self(cx, this); + if (!js_InitArrayClass(cx, this)) + return __null; + return &self->getPrototype(JSProto_Array).toObject(); + } + + JSObject *getOrCreateBooleanPrototype(JSContext *cx) { + if (booleanClassInitialized()) + return &getPrototype(JSProto_Boolean).toObject(); + Rooted self(cx, this); + if (!js_InitBooleanClass(cx, this)) + return __null; + return &self->getPrototype(JSProto_Boolean).toObject(); + } + + JSObject *getOrCreateNumberPrototype(JSContext *cx) { + if (numberClassInitialized()) + return &getPrototype(JSProto_Number).toObject(); + Rooted self(cx, this); + if (!js_InitNumberClass(cx, this)) + return __null; + return &self->getPrototype(JSProto_Number).toObject(); + } + + JSObject *getOrCreateStringPrototype(JSContext *cx) { + if (stringClassInitialized()) + return &getPrototype(JSProto_String).toObject(); + Rooted self(cx, this); + if (!js_InitStringClass(cx, this)) + return __null; + return &self->getPrototype(JSProto_String).toObject(); + } + + JSObject *getOrCreateRegExpPrototype(JSContext *cx) { + if (regexpClassInitialized()) + return &getPrototype(JSProto_RegExp).toObject(); + Rooted self(cx, this); + if (!js_InitRegExpClass(cx, this)) + return __null; + return &self->getPrototype(JSProto_RegExp).toObject(); + } + + JSObject *getOrCreateArrayBufferPrototype(JSContext *cx) { + if (arrayBufferClassInitialized()) + return &getPrototype(JSProto_ArrayBuffer).toObject(); + Rooted self(cx, this); + if (!js_InitTypedArrayClasses(cx, this)) + return __null; + return &self->getPrototype(JSProto_ArrayBuffer).toObject(); + } + + JSObject *getOrCreateCustomErrorPrototype(JSContext *cx, int exnType) { + JSProtoKey key = GetExceptionProtoKey(exnType); + if (errorClassesInitialized()) + return &getPrototype(key).toObject(); + Rooted self(cx, this); + if (!js_InitExceptionClasses(cx, this)) + return __null; + return &self->getPrototype(key).toObject(); + } + + JSObject *getOrCreateGeneratorPrototype(JSContext *cx) { + Value v = getSlotRef(GENERATOR_PROTO); + if (v.isObject()) + return &v.toObject(); + Rooted self(cx, this); + if (!js_InitIteratorClasses(cx, this)) + return __null; + return &self->getSlot(GENERATOR_PROTO).toObject(); + } + + inline RegExpStatics *getRegExpStatics() const; + + JSObject *getThrowTypeError() const { + do { } while(0); + return &getSlot(THROWTYPEERROR).toObject(); + } + + void clear(JSContext *cx); + + bool isCleared() const { + return getSlot(FLAGS).toInt32() & FLAGS_CLEARED; + } + + bool isRuntimeCodeGenEnabled(JSContext *cx); + + const Value &getOriginalEval() const { + do { } while(0); + return getSlot(EVAL); + } + + bool getFunctionNamespace(JSContext *cx, Value *vp); + + static bool initGeneratorClass(JSContext *cx, Handle global); + static bool initStandardClasses(JSContext *cx, Handle global); + + typedef js::Vector DebuggerVector; + + + + + + DebuggerVector *getDebuggers(); + + + + + + static DebuggerVector *getOrCreateDebuggers(JSContext *cx, Handle global); + + static bool addDebugger(JSContext *cx, Handle global, Debugger *dbg); +}; + + + + + + +extern bool +LinkConstructorAndPrototype(JSContext *cx, JSObject *ctor, JSObject *proto); + + + + + +extern bool +DefinePropertiesAndBrand(JSContext *cx, JSObject *obj, JSPropertySpec *ps, JSFunctionSpec *fs); + +typedef HashSet, SystemAllocPolicy> GlobalObjectSet; + +} + +inline bool +JSObject::isGlobal() const +{ + return !!(js::GetObjectClass(this)->flags & (1<<((8 + 8)+2))); +} + +js::GlobalObject & +JSObject::asGlobal() +{ + do { } while(0); + return *static_cast(this); +} +# 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscompartment.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" +#define RegExpObject_h__ + + + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 1 +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" 2 + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/Yarr.h" 1 +# 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/Yarr.h" +#define Yarr_h + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 1 3 4 +# 30 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 3 4 +#define _GCC_LIMITS_H_ + + + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/syslimits.h" 1 3 4 + + + + + +#define _GCC_NEXT_LIMITS_H +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 1 3 4 +# 169 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 3 4 +# 1 "/usr/include/limits.h" 1 3 4 +# 25 "/usr/include/limits.h" 3 4 +#define _LIBC_LIMITS_H_ 1 + + + + + + + +#define MB_LEN_MAX 16 +# 133 "/usr/include/limits.h" 3 4 +#define LLONG_MIN (-LLONG_MAX-1) + + +#define LLONG_MAX __LONG_LONG_MAX__ + + +#define ULLONG_MAX (LLONG_MAX * 2ULL + 1) + + + + + +# 1 "/usr/include/bits/posix1_lim.h" 1 3 4 +# 26 "/usr/include/bits/posix1_lim.h" 3 4 +#define _BITS_POSIX1_LIM_H 1 + + + + + +#define _POSIX_AIO_LISTIO_MAX 2 + + +#define _POSIX_AIO_MAX 1 + + +#define _POSIX_ARG_MAX 4096 + + + +#define _POSIX_CHILD_MAX 25 + + + + + +#define _POSIX_DELAYTIMER_MAX 32 + + + +#define _POSIX_HOST_NAME_MAX 255 + + +#define _POSIX_LINK_MAX 8 + + +#define _POSIX_LOGIN_NAME_MAX 9 + + +#define _POSIX_MAX_CANON 255 + + + +#define _POSIX_MAX_INPUT 255 + + +#define _POSIX_MQ_OPEN_MAX 8 + + +#define _POSIX_MQ_PRIO_MAX 32 + + +#define _POSIX_NAME_MAX 14 + + + +#define _POSIX_NGROUPS_MAX 8 + + + + + + +#define _POSIX_OPEN_MAX 20 + + + + + + + +#define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX + + + +#define _POSIX_PATH_MAX 256 + + +#define _POSIX_PIPE_BUF 512 + + + +#define _POSIX_RE_DUP_MAX 255 + + +#define _POSIX_RTSIG_MAX 8 + + +#define _POSIX_SEM_NSEMS_MAX 256 + + +#define _POSIX_SEM_VALUE_MAX 32767 + + +#define _POSIX_SIGQUEUE_MAX 32 + + +#define _POSIX_SSIZE_MAX 32767 + + +#define _POSIX_STREAM_MAX 8 + + +#define _POSIX_SYMLINK_MAX 255 + + + +#define _POSIX_SYMLOOP_MAX 8 + + +#define _POSIX_TIMER_MAX 32 + + +#define _POSIX_TTY_NAME_MAX 9 + + +#define _POSIX_TZNAME_MAX 6 + + + +#define _POSIX_QLIMIT 1 + + + +#define _POSIX_HIWAT _POSIX_PIPE_BUF + + +#define _POSIX_UIO_MAXIOV 16 + + + +#define _POSIX_CLOCKRES_MIN 20000000 + + + +# 1 "/usr/include/bits/local_lim.h" 1 3 4 +# 26 "/usr/include/bits/local_lim.h" 3 4 +#define __undef_NR_OPEN + + +#define __undef_LINK_MAX + + +#define __undef_OPEN_MAX + + +#define __undef_ARG_MAX + + + +# 1 "/usr/include/linux/limits.h" 1 3 4 + +#define _LINUX_LIMITS_H + +#define NR_OPEN 1024 + +#define NGROUPS_MAX 65536 +#define ARG_MAX 131072 +#define LINK_MAX 127 +#define MAX_CANON 255 +#define MAX_INPUT 255 +#define NAME_MAX 255 +#define PATH_MAX 4096 +#define PIPE_BUF 4096 +#define XATTR_NAME_MAX 255 +#define XATTR_SIZE_MAX 65536 +#define XATTR_LIST_MAX 65536 + +#define RTSIG_MAX 32 +# 40 "/usr/include/bits/local_lim.h" 2 3 4 + + + +#undef NR_OPEN +#undef __undef_NR_OPEN + + + +#undef LINK_MAX +#undef __undef_LINK_MAX + + + +#undef OPEN_MAX +#undef __undef_OPEN_MAX + + + +#undef ARG_MAX +#undef __undef_ARG_MAX + + + +#define _POSIX_THREAD_KEYS_MAX 128 + +#define PTHREAD_KEYS_MAX 1024 + + +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 + +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS + + +#define _POSIX_THREAD_THREADS_MAX 64 + +#undef PTHREAD_THREADS_MAX + + + +#define AIO_PRIO_DELTA_MAX 20 + + +#define PTHREAD_STACK_MIN 16384 + + +#define DELAYTIMER_MAX 2147483647 + + +#define TTY_NAME_MAX 32 + + +#define LOGIN_NAME_MAX 256 + + +#define HOST_NAME_MAX 64 + + +#define MQ_PRIO_MAX 32768 + + +#define SEM_VALUE_MAX (2147483647) +# 158 "/usr/include/bits/posix1_lim.h" 2 3 4 + + + +#define SSIZE_MAX LONG_MAX +# 146 "/usr/include/limits.h" 2 3 4 + + + +# 1 "/usr/include/bits/posix2_lim.h" 1 3 4 +# 24 "/usr/include/bits/posix2_lim.h" 3 4 +#define _BITS_POSIX2_LIM_H 1 + + + +#define _POSIX2_BC_BASE_MAX 99 + + +#define _POSIX2_BC_DIM_MAX 2048 + + +#define _POSIX2_BC_SCALE_MAX 99 + + +#define _POSIX2_BC_STRING_MAX 1000 + + + +#define _POSIX2_COLL_WEIGHTS_MAX 2 + + + +#define _POSIX2_EXPR_NEST_MAX 32 + + +#define _POSIX2_LINE_MAX 2048 + + + +#define _POSIX2_RE_DUP_MAX 255 + + + +#define _POSIX2_CHARCLASS_NAME_MAX 14 + + + + + + + +#define BC_BASE_MAX _POSIX2_BC_BASE_MAX + + +#define BC_DIM_MAX _POSIX2_BC_DIM_MAX + + +#define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX + + +#define BC_STRING_MAX _POSIX2_BC_STRING_MAX + + +#define COLL_WEIGHTS_MAX 255 + + +#define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX + + +#define LINE_MAX _POSIX2_LINE_MAX + + +#define CHARCLASS_NAME_MAX 2048 + + + +#define RE_DUP_MAX (0x7fff) +# 150 "/usr/include/limits.h" 2 3 4 + + + +# 1 "/usr/include/bits/xopen_lim.h" 1 3 4 +# 31 "/usr/include/bits/xopen_lim.h" 3 4 +#define _XOPEN_LIM_H 1 + +#define __need_IOV_MAX +# 1 "/usr/include/bits/stdio_lim.h" 1 3 4 +# 24 "/usr/include/bits/stdio_lim.h" 3 4 +#define L_tmpnam 20 +#define TMP_MAX 238328 +#define FILENAME_MAX 4096 + + +#define L_ctermid 9 + +#define L_cuserid 9 + + + + + +#undef FOPEN_MAX +#define FOPEN_MAX 16 + + + +#define IOV_MAX 1024 +# 35 "/usr/include/bits/xopen_lim.h" 2 3 4 +# 66 "/usr/include/bits/xopen_lim.h" 3 4 +#define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV + + + + +#define NL_ARGMAX _POSIX_ARG_MAX + + +#define NL_LANGMAX _POSIX2_LINE_MAX + + +#define NL_MSGMAX INT_MAX + + + +#define NL_NMAX INT_MAX + + +#define NL_SETMAX INT_MAX + + +#define NL_TEXTMAX INT_MAX + + +#define NZERO 20 +# 110 "/usr/include/bits/xopen_lim.h" 3 4 +#define WORD_BIT 32 +# 130 "/usr/include/bits/xopen_lim.h" 3 4 +#define LONG_BIT 32 +# 154 "/usr/include/limits.h" 2 3 4 +# 170 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 2 3 4 +# 8 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/syslimits.h" 2 3 4 +#undef _GCC_NEXT_LIMITS_H +# 35 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 2 3 4 +# 61 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 3 4 +#define _LIMITS_H___ + + +#undef CHAR_BIT +#define CHAR_BIT __CHAR_BIT__ + + + + + + + +#undef SCHAR_MIN +#define SCHAR_MIN (-SCHAR_MAX - 1) +#undef SCHAR_MAX +#define SCHAR_MAX __SCHAR_MAX__ + + +#undef UCHAR_MAX + + + +#define UCHAR_MAX (SCHAR_MAX * 2 + 1) + + + + +#undef CHAR_MIN + + + +#define CHAR_MIN 0 + +#undef CHAR_MAX +#define CHAR_MAX UCHAR_MAX +# 104 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 3 4 +#undef SHRT_MIN +#define SHRT_MIN (-SHRT_MAX - 1) +#undef SHRT_MAX +#define SHRT_MAX __SHRT_MAX__ + + +#undef USHRT_MAX + + + +#define USHRT_MAX (SHRT_MAX * 2 + 1) + + + +#undef INT_MIN +#define INT_MIN (-INT_MAX - 1) +#undef INT_MAX +#define INT_MAX __INT_MAX__ + + +#undef UINT_MAX +#define UINT_MAX (INT_MAX * 2U + 1U) + + + +#undef LONG_MIN +#define LONG_MIN (-LONG_MAX - 1L) +#undef LONG_MAX +#define LONG_MAX __LONG_MAX__ + + +#undef ULONG_MAX +#define ULONG_MAX (LONG_MAX * 2UL + 1UL) +# 152 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 3 4 +#undef LONG_LONG_MIN +#define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL) +#undef LONG_LONG_MAX +#define LONG_LONG_MAX __LONG_LONG_MAX__ + + +#undef ULONG_LONG_MAX +#define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1ULL) +# 36 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/Yarr.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrInterpreter.h" 1 +# 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrInterpreter.h" +#define YarrInterpreter_h + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrPattern.h" 1 +# 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrPattern.h" +#define YarrPattern_h + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/wtfbridge.h" 1 + + + + + + + +#define jswtfbridge_h__ +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/wtfbridge.h" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" 1 +# 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/wtfbridge.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" 1 +# 29 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_Platform_h + + + + +#define PLATFORM(WTF_FEATURE) (defined WTF_PLATFORM_ ##WTF_FEATURE && WTF_PLATFORM_ ##WTF_FEATURE) + + + + + +#define COMPILER(WTF_FEATURE) (defined WTF_COMPILER_ ##WTF_FEATURE && WTF_COMPILER_ ##WTF_FEATURE) + +#define CPU(WTF_FEATURE) (defined WTF_CPU_ ##WTF_FEATURE && WTF_CPU_ ##WTF_FEATURE) + +#define HAVE(WTF_FEATURE) (defined HAVE_ ##WTF_FEATURE && HAVE_ ##WTF_FEATURE) + + +#define OS(WTF_FEATURE) (defined WTF_OS_ ##WTF_FEATURE && WTF_OS_ ##WTF_FEATURE) + + + + + +#define USE(WTF_FEATURE) (defined WTF_USE_ ##WTF_FEATURE && WTF_USE_ ##WTF_FEATURE) + +#define ENABLE(WTF_FEATURE) (defined ENABLE_ ##WTF_FEATURE && ENABLE_ ##WTF_FEATURE) +# 80 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define RVCT_VERSION_AT_LEAST(major,minor,patch,build) 0 + + + + + +#define WTF_COMPILER_GCC 1 +#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +#define GCC_VERSION_AT_LEAST(major,minor,patch) (GCC_VERSION >= (major * 10000 + minor * 100 + patch)) +# 233 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_CPU_ARM 1 +# 247 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_ARM_ARCH_AT_LEAST(N) (CPU(ARM) && WTF_ARM_ARCH_VERSION >= N) +# 279 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_ARM_ARCH_VERSION 7 +# 318 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_THUMB_ARCH_VERSION 4 +# 346 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_CPU_ARM_TRADITIONAL 1 +#define WTF_CPU_ARM_THUMB2 0 +# 362 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_CPU_NEEDS_ALIGNED_ACCESS 1 +# 425 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_OS_LINUX 1 +# 478 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_OS_UNIX 1 +# 532 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_PLATFORM_IOS_SIMULATOR 0 + + + +#define WTF_PLATFORM_IOS 0 +# 621 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_USE_ICU_UNICODE 1 +# 760 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define HAVE_SIGNAL_H 1 +# 772 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define HAVE_TM_GMTOFF 1 +#define HAVE_TM_ZONE 1 +#define HAVE_TIMEGM 1 +# 870 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define HAVE_ERRNO_H 1 + + +#define HAVE_LANGINFO_H 1 + +#define HAVE_MMAP 1 +#define HAVE_SBRK 1 +#define HAVE_STRINGS_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_TIME_H 1 +# 896 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define ENABLE_FAST_MALLOC_MATCH_VALIDATION 0 + + + +#define ENABLE_ICONDATABASE 1 + + + +#define ENABLE_DATABASE 1 + + + +#define ENABLE_JAVASCRIPT_DEBUGGER 1 + + + +#define ENABLE_FTPDIR 1 + + + +#define ENABLE_CONTEXT_MENUS 1 + + + +#define ENABLE_DRAG_SUPPORT 1 + + + +#define ENABLE_DATA_TRANSFER_ITEMS 0 + + + +#define ENABLE_DASHBOARD_SUPPORT 0 + + + +#define ENABLE_INSPECTOR 1 + + + +#define ENABLE_JAVA_BRIDGE 0 + + + +#define ENABLE_NETSCAPE_PLUGIN_API 1 + + + +#define ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE 0 + + + +#define ENABLE_PURGEABLE_MEMORY 0 + + + +#define WTF_USE_PLUGIN_HOST_PROCESS 0 + + + +#define ENABLE_ORIENTATION_EVENTS 0 + + + +#define ENABLE_OPCODE_STATS 0 + + + +#define ENABLE_GLOBAL_FASTMALLOC_NEW 1 + + +#define ENABLE_DEBUG_WITH_BREAKPOINT 0 +#define ENABLE_SAMPLING_COUNTERS 0 +#define ENABLE_SAMPLING_FLAGS 0 +#define ENABLE_OPCODE_SAMPLING 0 +#define ENABLE_CODEBLOCK_SAMPLING 0 +# 980 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define ENABLE_GEOLOCATION 0 + + + +#define ENABLE_GESTURE_RECOGNIZER 0 + + + +#define ENABLE_NOTIFICATIONS 0 + + + + + + + +#define ENABLE_TEXT_CARET 1 + + + +#define ENABLE_ON_FIRST_TEXTAREA_FOCUS_SELECT_ALL 0 + + + +#define ENABLE_FULLSCREEN_API 0 +# 1016 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_USE_JSVALUE32_64 1 + + + + +#define ENABLE_REPAINT_THROTTLING 0 +# 1064 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define ENABLE_JIT_USE_SOFT_MODULO 1 + + + + +#define ENABLE_JIT_OPTIMIZE_CALL 1 + + +#define ENABLE_JIT_OPTIMIZE_NATIVE_CALL 1 + + +#define ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS 1 + + +#define ENABLE_JIT_OPTIMIZE_METHOD_CALLS 1 +# 1087 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define JSC_HOST_CALL + + + + +#define HAVE_COMPUTED_GOTO 1 + + + + + + +#define ENABLE_REGEXP_TRACING 0 + + + + + + +#define ENABLE_YARR_JIT 1 + + +#define ENABLE_YARR_JIT_DEBUG 0 + + + +#define ENABLE_ASSEMBLER 1 +# 1128 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define ENABLE_EXECUTABLE_ALLOCATOR_DEMAND 1 +# 1137 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define ENABLE_SMOOTH_SCROLLING 0 + + + +#define ENABLE_WEB_ARCHIVE 0 +# 1176 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WARN_UNUSED_RETURN __attribute__ ((warn_unused_result)) +# 1186 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_PLATFORM_CFNETWORK Error USE_macro_should_be_used_with_CFNETWORK + +#define ENABLE_JSC_ZOMBIES 0 +# 1226 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_USE_EXPORT_MACROS 0 +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/wtfbridge.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" 1 +# 27 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" +#define ExecutableAllocator_h + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 30 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsalloc.h" 1 +# 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" 2 + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Assertions.h" 1 +# 27 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Assertions.h" +#define WTF_Assertions_h + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" 1 +# 30 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Assertions.h" 2 + + + + + + + +#define ASSERT_DISABLED 1 + + +#define ASSERT(assertion) MOZ_ASSERT(assertion) +#define ASSERT_UNUSED(variable,assertion) do { (void)variable; ASSERT(assertion); } while (0) + + + +#define ASSERT_NOT_REACHED() MOZ_NOT_REACHED("") +#define CRASH() MOZ_CRASH() +#define COMPILE_ASSERT(exp,name) MOZ_STATIC_ASSERT(exp, #name) +# 37 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" 2 +# 74 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" +#define INITIAL_PROTECTION_FLAGS (PROT_READ | PROT_WRITE | PROT_EXEC) + + + + + + +namespace JSC { + + class ExecutableAllocator; + + enum CodeKind { METHOD_CODE, REGEXP_CODE }; + + + class ExecutablePool { + + friend class js::OffTheBooks; friend class js::Foreground; friend class js::UnwantedForeground; friend struct ::JSContext; friend struct ::JSRuntime; + friend class ExecutableAllocator; +private: + struct Allocation { + char* pages; + size_t size; + + + + }; + + ExecutableAllocator* m_allocator; + char* m_freePtr; + char* m_end; + Allocation m_allocation; + + + unsigned m_refCount; + + + size_t m_mjitCodeMethod; + size_t m_mjitCodeRegexp; + +public: + + bool m_destroy; + + + + size_t m_gcNumber; + + void release(bool willDestroy = false) + { + do { } while(0); + + + if (--m_refCount == 0) { + js::UnwantedForeground::delete_(this); + } + } + +private: + + + + void addRef() + { + do { } while(0); + ++m_refCount; + } + + ExecutablePool(ExecutableAllocator* allocator, Allocation a) + : m_allocator(allocator), m_freePtr(a.pages), m_end(m_freePtr + a.size), m_allocation(a), + m_refCount(1), m_mjitCodeMethod(0), m_mjitCodeRegexp(0), m_destroy(false), m_gcNumber(0) + { } + + ~ExecutablePool(); + + void* alloc(size_t n, CodeKind kind) + { + do { } while(0); + void *result = m_freePtr; + m_freePtr += n; + + if ( kind == REGEXP_CODE ) + m_mjitCodeRegexp += n; + else + m_mjitCodeMethod += n; + + return result; + } + + size_t available() const { + do { } while(0); + return m_end - m_freePtr; + } +}; + +enum AllocationBehavior +{ + AllocationCanRandomize, + AllocationDeterministic +}; + +class ExecutableAllocator { + typedef void (*DestroyCallback)(void* addr, size_t size); + enum ProtectionSetting { Writable, Executable }; + DestroyCallback destroyCallback; + + void initSeed(); + +public: + explicit ExecutableAllocator(AllocationBehavior allocBehavior) + : destroyCallback(__null), + allocBehavior(allocBehavior) + { + if (!pageSize) { + pageSize = determinePageSize(); +# 196 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" + largeAllocSize = pageSize * 16; + } + + + + + + do { } while(0); + } + + ~ExecutableAllocator() + { + for (size_t i = 0; i < m_smallPools.length(); i++) + m_smallPools[i]->release( true); + + + } + + + + + void* alloc(size_t n, ExecutablePool** poolp, CodeKind type) + { + + + + n = roundUpAllocationSize(n, sizeof(void*)); + if (n == OVERSIZE_ALLOCATION) { + *poolp = __null; + return __null; + } + + *poolp = poolForSize(n); + if (!*poolp) + return __null; + + + + void *result = (*poolp)->alloc(n, type); + do { } while(0); + return result; + } + + void releasePoolPages(ExecutablePool *pool) { + do { } while(0); + if (destroyCallback) + destroyCallback(pool->m_allocation.pages, pool->m_allocation.size); + systemRelease(pool->m_allocation); + do { } while(0); + m_pools.remove(m_pools.lookup(pool)); + } + + void sizeOfCode(size_t *method, size_t *regexp, size_t *unused) const; + + void setDestroyCallback(DestroyCallback destroyCallback) { + this->destroyCallback = destroyCallback; + } + + void setRandomize(bool enabled) { + allocBehavior = enabled ? AllocationCanRandomize : AllocationDeterministic; + } + +private: + static size_t pageSize; + static size_t largeAllocSize; + + + + + static const size_t OVERSIZE_ALLOCATION = size_t(-1); + + static size_t roundUpAllocationSize(size_t request, size_t granularity) + { + + + + + + + if ((std::numeric_limits::max() - granularity) <= request) + return OVERSIZE_ALLOCATION; + + + size_t size = request + (granularity - 1); + size = size & ~(granularity - 1); + do { } while(0); + return size; + } + + + ExecutablePool::Allocation systemAlloc(size_t n); + static void systemRelease(const ExecutablePool::Allocation& alloc); + void *computeRandomAllocationAddress(); + + ExecutablePool* createPool(size_t n) + { + size_t allocSize = roundUpAllocationSize(n, pageSize); + if (allocSize == OVERSIZE_ALLOCATION) + return __null; + + if (!m_pools.initialized() && !m_pools.init()) + return __null; + + + + + ExecutablePool::Allocation a = systemAlloc(allocSize); + + if (!a.pages) + return __null; + + ExecutablePool *pool = js::OffTheBooks::new_(this, a); + if (!pool) { + systemRelease(a); + return __null; + } + m_pools.put(pool); + return pool; + } + +public: + ExecutablePool* poolForSize(size_t n) + { + + + + + + + ExecutablePool *minPool = __null; + for (size_t i = 0; i < m_smallPools.length(); i++) { + ExecutablePool *pool = m_smallPools[i]; + if (n <= pool->available() && (!minPool || pool->available() < minPool->available())) + minPool = pool; + } + if (minPool) { + minPool->addRef(); + return minPool; + } + + + + if (n > largeAllocSize) + return createPool(n); + + + ExecutablePool* pool = createPool(largeAllocSize); + if (!pool) + return __null; + + + if (m_smallPools.length() < maxSmallPools) { + + m_smallPools.append(pool); + pool->addRef(); + } else { + + int iMin = 0; + for (size_t i = 1; i < m_smallPools.length(); i++) + if (m_smallPools[i]->available() < + m_smallPools[iMin]->available()) + { + iMin = i; + } + + + + ExecutablePool *minPool = m_smallPools[iMin]; + if ((pool->available() - n) > minPool->available()) { + minPool->release(); + m_smallPools[iMin] = pool; + pool->addRef(); + } + } + + + return pool; + } +# 386 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" + static void makeWritable(void*, size_t) {} + static void makeExecutable(void*, size_t) {} +# 451 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" + static void cacheFlush(void* code, size_t size) + { + asm volatile ( + "push {r7}\n" + "mov r0, %0\n" + "mov r1, %1\n" + "mov r7, #0xf0000\n" + "add r7, r7, #0x2\n" + "mov r2, #0x0\n" + "svc 0x0\n" + "pop {r7}\n" + : + : "r" (code), "r" (reinterpret_cast(code) + size) + : "r0", "r1", "r2"); + } + + + + + + + +private: + + + + + + + static const size_t maxSmallPools = 4; + typedef js::Vector SmallExecPoolVector; + SmallExecPoolVector m_smallPools; + + + + + typedef js::HashSet, js::SystemAllocPolicy> + ExecPoolHashSet; + ExecPoolHashSet m_pools; + AllocationBehavior allocBehavior; + + static size_t determinePageSize(); +}; + +} +# 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/wtfbridge.h" 2 + +namespace JSC { namespace Yarr { + + + + + +typedef jschar UChar; +typedef JSLinearString UString; + +using namespace js::unicode; + +class Unicode { + public: + static UChar toUpper(UChar c) { return ToUpperCase(c); } + static UChar toLower(UChar c) { return ToLowerCase(c); } +}; + + + + + + +template +class RefCounted { +}; + +template +class RefPtr { + T *ptr; + public: + RefPtr(T *p) { ptr = p; } + operator bool() const { return ptr != __null; } + const T *operator ->() const { return ptr; } + T *get() { return ptr; } +}; + +template +class PassRefPtr { + T *ptr; + public: + PassRefPtr(T *p) { ptr = p; } + operator T*() { return ptr; } +}; + +template +class PassOwnPtr { + T *ptr; + public: + PassOwnPtr(T *p) { ptr = p; } + + T *get() { return ptr; } +}; + +template +class OwnPtr { + T *ptr; + public: + OwnPtr() : ptr(__null) { } + OwnPtr(PassOwnPtr p) : ptr(p.get()) { } + + ~OwnPtr() { + if (ptr) + js::Foreground::delete_(ptr); + } + + OwnPtr &operator=(PassOwnPtr p) { + ptr = p.get(); + return *this; + } + + T *operator ->() { return ptr; } + + T *get() { return ptr; } + + T *release() { + T *result = ptr; + ptr = __null; + return result; + } +}; + +template +PassRefPtr adoptRef(T *p) { return PassRefPtr(p); } + +template +PassOwnPtr adoptPtr(T *p) { return PassOwnPtr(p); } + +#define WTF_MAKE_FAST_ALLOCATED + +template +class Ref { + T &val; + public: + Ref(T &val) : val(val) { } + operator T&() const { return val; } +}; + + + + + +template +class Vector { + public: + js::Vector impl; + public: + Vector() {} + + Vector(const Vector &v) { + + (void) append(v); + } + + size_t size() const { + return impl.length(); + } + + T &operator[](size_t i) { + return impl[i]; + } + + const T &operator[](size_t i) const { + return impl[i]; + } + + T &at(size_t i) { + return impl[i]; + } + + const T *begin() const { + return impl.begin(); + } + + T &last() { + return impl.back(); + } + + bool isEmpty() const { + return impl.empty(); + } + + template + void append(const U &u) { + + (void) impl.append(static_cast(u)); + } + + template + void append(const Vector &v) { + + (void) impl.append(v.impl); + } + + void insert(size_t i, const T& t) { + + (void) impl.insert(&impl[i], t); + } + + void remove(size_t i) { + impl.erase(&impl[i]); + } + + void clear() { + return impl.clear(); + } + + void shrink(size_t newLength) { + + do { } while(0); + (void) impl.resize(newLength); + } + + void deleteAllValues() { + for (T *p = impl.begin(); p != impl.end(); ++p) + js::Foreground::delete_(*p); + } +}; + +template +class Vector > { + public: + js::Vector impl; + public: + Vector() {} + + size_t size() const { + return impl.length(); + } + + void append(T *t) { + + (void) impl.append(t); + } + + PassOwnPtr operator[](size_t i) { + return PassOwnPtr(impl[i]); + } + + void clear() { + for (T **p = impl.begin(); p != impl.end(); ++p) + js::Foreground::delete_(*p); + return impl.clear(); + } +}; + +template +inline void +deleteAllValues(Vector &v) { + v.deleteAllValues(); +} + + + + + + +class JSGlobalData { + public: + ExecutableAllocator *regexAllocator; + + JSGlobalData(ExecutableAllocator *regexAllocator) + : regexAllocator(regexAllocator) { } +}; + + + + + + +const size_t notFound = size_t(-1); + + + + + +#define UNUSED_PARAM(e) + +} + + + + + + +namespace std { +# 276 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/wtfbridge.h" +template +inline T +min(T t1, T t2) +{ + return ((t1)<(t2)?(t1):(t2)); +} + +template +inline T +max(T t1, T t2) +{ + return ((t1)>(t2)?(t1):(t2)); +} + +template +inline void +swap(T &t1, T &t2) +{ + T tmp = t1; + t1 = t2; + t2 = tmp; +} +} + +} +# 35 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrPattern.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/ASCIICType.h" 1 +# 34 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/ASCIICType.h" +#define WTF_ASCIICType_h + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Assertions.h" 1 +# 37 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/ASCIICType.h" 2 +# 48 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/ASCIICType.h" +namespace WTF { + + inline bool isASCII(char c) { return !(c & ~0x7F); } + inline bool isASCII(unsigned short c) { return !(c & ~0x7F); } + + inline bool isASCII(wchar_t c) { return !(c & ~0x7F); } + + inline bool isASCII(int c) { return !(c & ~0x7F); } + inline bool isASCII(unsigned c) { return !(c & ~0x7F); } + + inline bool isASCIIAlpha(char c) { return (c | 0x20) >= 'a' && (c | 0x20) <= 'z'; } + inline bool isASCIIAlpha(unsigned short c) { return (c | 0x20) >= 'a' && (c | 0x20) <= 'z'; } + + inline bool isASCIIAlpha(wchar_t c) { return (c | 0x20) >= 'a' && (c | 0x20) <= 'z'; } + + inline bool isASCIIAlpha(int c) { return (c | 0x20) >= 'a' && (c | 0x20) <= 'z'; } + inline bool isASCIIAlpha(unsigned c) { return (c | 0x20) >= 'a' && (c | 0x20) <= 'z'; } + + inline bool isASCIIAlphanumeric(char c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'z'); } + inline bool isASCIIAlphanumeric(unsigned short c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'z'); } + + inline bool isASCIIAlphanumeric(wchar_t c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'z'); } + + inline bool isASCIIAlphanumeric(int c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'z'); } + inline bool isASCIIAlphanumeric(unsigned c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'z'); } + + inline bool isASCIIDigit(char c) { return (c >= '0') & (c <= '9'); } + inline bool isASCIIDigit(unsigned short c) { return (c >= '0') & (c <= '9'); } + + inline bool isASCIIDigit(wchar_t c) { return (c >= '0') & (c <= '9'); } + + inline bool isASCIIDigit(int c) { return (c >= '0') & (c <= '9'); } + inline bool isASCIIDigit(unsigned c) { return (c >= '0') & (c <= '9'); } + + inline bool isASCIIHexDigit(char c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f'); } + inline bool isASCIIHexDigit(unsigned short c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f'); } + + inline bool isASCIIHexDigit(wchar_t c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f'); } + + inline bool isASCIIHexDigit(int c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f'); } + inline bool isASCIIHexDigit(unsigned c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f'); } + + inline bool isASCIIOctalDigit(char c) { return (c >= '0') & (c <= '7'); } + inline bool isASCIIOctalDigit(unsigned short c) { return (c >= '0') & (c <= '7'); } + + inline bool isASCIIOctalDigit(wchar_t c) { return (c >= '0') & (c <= '7'); } + + inline bool isASCIIOctalDigit(int c) { return (c >= '0') & (c <= '7'); } + inline bool isASCIIOctalDigit(unsigned c) { return (c >= '0') & (c <= '7'); } + + inline bool isASCIILower(char c) { return c >= 'a' && c <= 'z'; } + inline bool isASCIILower(unsigned short c) { return c >= 'a' && c <= 'z'; } + + inline bool isASCIILower(wchar_t c) { return c >= 'a' && c <= 'z'; } + + inline bool isASCIILower(int c) { return c >= 'a' && c <= 'z'; } + inline bool isASCIILower(unsigned c) { return c >= 'a' && c <= 'z'; } + + inline bool isASCIIUpper(char c) { return c >= 'A' && c <= 'Z'; } + inline bool isASCIIUpper(unsigned short c) { return c >= 'A' && c <= 'Z'; } + + inline bool isASCIIUpper(wchar_t c) { return c >= 'A' && c <= 'Z'; } + + inline bool isASCIIUpper(int c) { return c >= 'A' && c <= 'Z'; } + inline bool isASCIIUpper(unsigned c) { return c >= 'A' && c <= 'Z'; } +# 127 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/ASCIICType.h" + inline bool isASCIISpace(char c) { return c <= ' ' && (c == ' ' || (c <= 0xD && c >= 0x9)); } + inline bool isASCIISpace(unsigned short c) { return c <= ' ' && (c == ' ' || (c <= 0xD && c >= 0x9)); } + + inline bool isASCIISpace(wchar_t c) { return c <= ' ' && (c == ' ' || (c <= 0xD && c >= 0x9)); } + + inline bool isASCIISpace(int c) { return c <= ' ' && (c == ' ' || (c <= 0xD && c >= 0x9)); } + inline bool isASCIISpace(unsigned c) { return c <= ' ' && (c == ' ' || (c <= 0xD && c >= 0x9)); } + + inline char toASCIILower(char c) { return c | ((c >= 'A' && c <= 'Z') << 5); } + inline unsigned short toASCIILower(unsigned short c) { return c | ((c >= 'A' && c <= 'Z') << 5); } + + inline wchar_t toASCIILower(wchar_t c) { return c | ((c >= 'A' && c <= 'Z') << 5); } + + inline int toASCIILower(int c) { return c | ((c >= 'A' && c <= 'Z') << 5); } + inline unsigned toASCIILower(unsigned c) { return c | ((c >= 'A' && c <= 'Z') << 5); } + + + inline char toASCIIUpper(char c) { return static_cast(c & ~((c >= 'a' && c <= 'z') << 5)); } + inline unsigned short toASCIIUpper(unsigned short c) { return static_cast(c & ~((c >= 'a' && c <= 'z') << 5)); } + + inline wchar_t toASCIIUpper(wchar_t c) { return static_cast(c & ~((c >= 'a' && c <= 'z') << 5)); } + + inline int toASCIIUpper(int c) { return static_cast(c & ~((c >= 'a' && c <= 'z') << 5)); } + inline unsigned toASCIIUpper(unsigned c) { return static_cast(c & ~((c >= 'a' && c <= 'z') << 5)); } + + inline int toASCIIHexValue(char c) { do { } while(0); return c < 'A' ? c - '0' : (c - 'A' + 10) & 0xF; } + inline int toASCIIHexValue(unsigned short c) { do { } while(0); return c < 'A' ? c - '0' : (c - 'A' + 10) & 0xF; } + + inline int toASCIIHexValue(wchar_t c) { do { } while(0); return c < 'A' ? c - '0' : (c - 'A' + 10) & 0xF; } + + inline int toASCIIHexValue(int c) { do { } while(0); return c < 'A' ? c - '0' : (c - 'A' + 10) & 0xF; } + inline int toASCIIHexValue(unsigned c) { do { } while(0); return c < 'A' ? c - '0' : (c - 'A' + 10) & 0xF; } + + inline bool isASCIIPrintable(char c) { return c >= ' ' && c <= '~'; } + inline bool isASCIIPrintable(unsigned short c) { return c >= ' ' && c <= '~'; } + + inline bool isASCIIPrintable(wchar_t c) { return c >= ' ' && c <= '~'; } + + inline bool isASCIIPrintable(int c) { return c >= ' ' && c <= '~'; } + inline bool isASCIIPrintable(unsigned c) { return c >= ' ' && c <= '~'; } +} + +using WTF::isASCII; +using WTF::isASCIIAlpha; +using WTF::isASCIIAlphanumeric; +using WTF::isASCIIDigit; +using WTF::isASCIIHexDigit; +using WTF::isASCIILower; +using WTF::isASCIIOctalDigit; +using WTF::isASCIIPrintable; +using WTF::isASCIISpace; +using WTF::isASCIIUpper; +using WTF::toASCIIHexValue; +using WTF::toASCIILower; +using WTF::toASCIIUpper; +# 36 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrPattern.h" 2 + +namespace JSC { namespace Yarr { + +enum ErrorCode { + NoError, + PatternTooLarge, + QuantifierOutOfOrder, + QuantifierWithoutAtom, + MissingParentheses, + ParenthesesUnmatched, + ParenthesesTypeInvalid, + CharacterClassUnmatched, + CharacterClassInvalidRange, + CharacterClassOutOfOrder, + EscapeUnterminated, + QuantifierTooLarge, + NumberOfErrorCodes +}; + +struct PatternDisjunction; + +struct CharacterRange { + UChar begin; + UChar end; + + CharacterRange(UChar begin, UChar end) + : begin(begin) + , end(end) + { + } +}; + +struct CharacterClassTable : RefCounted { + friend class js::OffTheBooks; + const char* m_table; + bool m_inverted; + static PassRefPtr create(const char* table, bool inverted) + { + return adoptRef(js::OffTheBooks::new_(table, inverted)); + } + +private: + CharacterClassTable(const char* table, bool inverted) + : m_table(table) + , m_inverted(inverted) + { + } +}; + +struct CharacterClass { + +public: + + + + CharacterClass(PassRefPtr table) + : m_table(table) + { + } + ~CharacterClass() + { + js::Foreground::delete_(m_table.get()); + } + Vector m_matches; + Vector m_ranges; + Vector m_matchesUnicode; + Vector m_rangesUnicode; + RefPtr m_table; +}; + +enum QuantifierType { + QuantifierFixedCount, + QuantifierGreedy, + QuantifierNonGreedy +}; + +struct PatternTerm { + enum Type { + TypeAssertionBOL, + TypeAssertionEOL, + TypeAssertionWordBoundary, + TypePatternCharacter, + TypeCharacterClass, + TypeBackReference, + TypeForwardReference, + TypeParenthesesSubpattern, + TypeParentheticalAssertion + } type; + bool m_capture :1; + bool m_invert :1; + union { + UChar patternCharacter; + CharacterClass* characterClass; + unsigned backReferenceSubpatternId; + struct { + PatternDisjunction* disjunction; + unsigned subpatternId; + unsigned lastSubpatternId; + bool isCopy; + bool isTerminal; + } parentheses; + }; + QuantifierType quantityType; + unsigned quantityCount; + int inputPosition; + unsigned frameLocation; + + + PatternTerm() + : type(PatternTerm::TypePatternCharacter) + , m_capture(false) + , m_invert(false) + { + patternCharacter = 0; + quantityType = QuantifierFixedCount; + quantityCount = 1; + } + + PatternTerm(UChar ch) + : type(PatternTerm::TypePatternCharacter) + , m_capture(false) + , m_invert(false) + { + patternCharacter = ch; + quantityType = QuantifierFixedCount; + quantityCount = 1; + } + + PatternTerm(CharacterClass* charClass, bool invert) + : type(PatternTerm::TypeCharacterClass) + , m_capture(false) + , m_invert(invert) + { + characterClass = charClass; + quantityType = QuantifierFixedCount; + quantityCount = 1; + } + + PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) + : type(type) + , m_capture(capture) + , m_invert(invert) + { + parentheses.disjunction = disjunction; + parentheses.subpatternId = subpatternId; + parentheses.isCopy = false; + parentheses.isTerminal = false; + quantityType = QuantifierFixedCount; + quantityCount = 1; + } + + PatternTerm(Type type, bool invert = false) + : type(type) + , m_capture(false) + , m_invert(invert) + { + quantityType = QuantifierFixedCount; + quantityCount = 1; + } + + PatternTerm(unsigned spatternId) + : type(TypeBackReference) + , m_capture(false) + , m_invert(false) + { + backReferenceSubpatternId = spatternId; + quantityType = QuantifierFixedCount; + quantityCount = 1; + } + + static PatternTerm ForwardReference() + { + return PatternTerm(TypeForwardReference); + } + + static PatternTerm BOL() + { + return PatternTerm(TypeAssertionBOL); + } + + static PatternTerm EOL() + { + return PatternTerm(TypeAssertionEOL); + } + + static PatternTerm WordBoundary(bool invert) + { + return PatternTerm(TypeAssertionWordBoundary, invert); + } + + bool invert() + { + return m_invert; + } + + bool capture() + { + return m_capture; + } + + void quantify(unsigned count, QuantifierType type) + { + quantityCount = count; + quantityType = type; + } +}; + +struct PatternAlternative { + +public: + PatternAlternative(PatternDisjunction* disjunction) + : m_parent(disjunction) + , m_onceThrough(false) + , m_hasFixedSize(false) + , m_startsWithBOL(false) + , m_containsBOL(false) + { + } + + PatternTerm& lastTerm() + { + do { } while(0); + return m_terms[m_terms.size() - 1]; + } + + void removeLastTerm() + { + do { } while(0); + m_terms.shrink(m_terms.size() - 1); + } + + void setOnceThrough() + { + m_onceThrough = true; + } + + bool onceThrough() + { + return m_onceThrough; + } + + Vector m_terms; + PatternDisjunction* m_parent; + unsigned m_minimumSize; + bool m_onceThrough : 1; + bool m_hasFixedSize : 1; + bool m_startsWithBOL : 1; + bool m_containsBOL : 1; +}; + +struct PatternDisjunction { + +public: + PatternDisjunction(PatternAlternative* parent = 0) + : m_parent(parent) + , m_hasFixedSize(false) + { + } + + ~PatternDisjunction() + { + deleteAllValues(m_alternatives); + } + + PatternAlternative* addNewAlternative() + { + PatternAlternative* alternative = js::OffTheBooks::new_(this); + m_alternatives.append(alternative); + return alternative; + } + + Vector m_alternatives; + PatternAlternative* m_parent; + unsigned m_minimumSize; + unsigned m_callFrameSize; + bool m_hasFixedSize; +}; + + + + + +CharacterClass* newlineCreate(); +CharacterClass* digitsCreate(); +CharacterClass* spacesCreate(); +CharacterClass* wordcharCreate(); +CharacterClass* nondigitsCreate(); +CharacterClass* nonspacesCreate(); +CharacterClass* nonwordcharCreate(); + +struct TermChain { + TermChain(PatternTerm term) + : term(term) + {} + + PatternTerm term; + Vector hotTerms; +}; + +struct YarrPattern { + YarrPattern(const UString& pattern, bool ignoreCase, bool multiline, ErrorCode* error); + + ~YarrPattern() + { + deleteAllValues(m_disjunctions); + deleteAllValues(m_userCharacterClasses); + } + + void reset() + { + m_numSubpatterns = 0; + m_maxBackReference = 0; + + m_containsBackreferences = false; + m_containsBOL = false; + + newlineCached = 0; + digitsCached = 0; + spacesCached = 0; + wordcharCached = 0; + nondigitsCached = 0; + nonspacesCached = 0; + nonwordcharCached = 0; + + deleteAllValues(m_disjunctions); + m_disjunctions.clear(); + deleteAllValues(m_userCharacterClasses); + m_userCharacterClasses.clear(); + } + + bool containsIllegalBackReference() + { + return m_maxBackReference > m_numSubpatterns; + } + + CharacterClass* newlineCharacterClass() + { + if (!newlineCached) + m_userCharacterClasses.append(newlineCached = newlineCreate()); + return newlineCached; + } + CharacterClass* digitsCharacterClass() + { + if (!digitsCached) + m_userCharacterClasses.append(digitsCached = digitsCreate()); + return digitsCached; + } + CharacterClass* spacesCharacterClass() + { + if (!spacesCached) + m_userCharacterClasses.append(spacesCached = spacesCreate()); + return spacesCached; + } + CharacterClass* wordcharCharacterClass() + { + if (!wordcharCached) + m_userCharacterClasses.append(wordcharCached = wordcharCreate()); + return wordcharCached; + } + CharacterClass* nondigitsCharacterClass() + { + if (!nondigitsCached) + m_userCharacterClasses.append(nondigitsCached = nondigitsCreate()); + return nondigitsCached; + } + CharacterClass* nonspacesCharacterClass() + { + if (!nonspacesCached) + m_userCharacterClasses.append(nonspacesCached = nonspacesCreate()); + return nonspacesCached; + } + CharacterClass* nonwordcharCharacterClass() + { + if (!nonwordcharCached) + m_userCharacterClasses.append(nonwordcharCached = nonwordcharCreate()); + return nonwordcharCached; + } + + bool m_ignoreCase : 1; + bool m_multiline : 1; + bool m_containsBackreferences : 1; + bool m_containsBOL : 1; + unsigned m_numSubpatterns; + unsigned m_maxBackReference; + PatternDisjunction* m_body; + Vector m_disjunctions; + Vector m_userCharacterClasses; + +private: + ErrorCode compile(const UString& patternString); + + CharacterClass* newlineCached; + CharacterClass* digitsCached; + CharacterClass* spacesCached; + CharacterClass* wordcharCached; + CharacterClass* nondigitsCached; + CharacterClass* nonspacesCached; + CharacterClass* nonwordcharCached; +}; + +} } +# 34 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrInterpreter.h" 2 + +namespace WTF { +class BumpPointerAllocator; +} +using WTF::BumpPointerAllocator; + +namespace JSC { namespace Yarr { + +class ByteDisjunction; + +struct ByteTerm { + enum Type { + TypeBodyAlternativeBegin, + TypeBodyAlternativeDisjunction, + TypeBodyAlternativeEnd, + TypeAlternativeBegin, + TypeAlternativeDisjunction, + TypeAlternativeEnd, + TypeSubpatternBegin, + TypeSubpatternEnd, + TypeAssertionBOL, + TypeAssertionEOL, + TypeAssertionWordBoundary, + TypePatternCharacterOnce, + TypePatternCharacterFixed, + TypePatternCharacterGreedy, + TypePatternCharacterNonGreedy, + TypePatternCasedCharacterOnce, + TypePatternCasedCharacterFixed, + TypePatternCasedCharacterGreedy, + TypePatternCasedCharacterNonGreedy, + TypeCharacterClass, + TypeBackReference, + TypeParenthesesSubpattern, + TypeParenthesesSubpatternOnceBegin, + TypeParenthesesSubpatternOnceEnd, + TypeParenthesesSubpatternTerminalBegin, + TypeParenthesesSubpatternTerminalEnd, + TypeParentheticalAssertionBegin, + TypeParentheticalAssertionEnd, + TypeCheckInput, + TypeUncheckInput + } type; + union { + struct { + union { + UChar patternCharacter; + struct { + UChar lo; + UChar hi; + } casedCharacter; + CharacterClass* characterClass; + unsigned subpatternId; + }; + union { + ByteDisjunction* parenthesesDisjunction; + unsigned parenthesesWidth; + }; + QuantifierType quantityType; + unsigned quantityCount; + } atom; + struct { + int next; + int end; + bool onceThrough; + } alternative; + unsigned checkInputCount; + }; + unsigned frameLocation; + bool m_capture : 1; + bool m_invert : 1; + int inputPosition; + + + ByteTerm() + { + } + + ByteTerm(UChar ch, int inputPos, unsigned frameLocation, unsigned quantityCount, QuantifierType quantityType) + : frameLocation(frameLocation) + , m_capture(false) + , m_invert(false) + { + switch (quantityType) { + case QuantifierFixedCount: + type = (quantityCount == 1) ? ByteTerm::TypePatternCharacterOnce : ByteTerm::TypePatternCharacterFixed; + break; + case QuantifierGreedy: + type = ByteTerm::TypePatternCharacterGreedy; + break; + case QuantifierNonGreedy: + type = ByteTerm::TypePatternCharacterNonGreedy; + break; + } + + atom.patternCharacter = ch; + atom.quantityType = quantityType; + atom.quantityCount = quantityCount; + inputPosition = inputPos; + } + + ByteTerm(UChar lo, UChar hi, int inputPos, unsigned frameLocation, unsigned quantityCount, QuantifierType quantityType) + : frameLocation(frameLocation) + , m_capture(false) + , m_invert(false) + { + switch (quantityType) { + case QuantifierFixedCount: + type = (quantityCount == 1) ? ByteTerm::TypePatternCasedCharacterOnce : ByteTerm::TypePatternCasedCharacterFixed; + break; + case QuantifierGreedy: + type = ByteTerm::TypePatternCasedCharacterGreedy; + break; + case QuantifierNonGreedy: + type = ByteTerm::TypePatternCasedCharacterNonGreedy; + break; + } + + atom.casedCharacter.lo = lo; + atom.casedCharacter.hi = hi; + atom.quantityType = quantityType; + atom.quantityCount = quantityCount; + inputPosition = inputPos; + } + + ByteTerm(CharacterClass* characterClass, bool invert, int inputPos) + : type(ByteTerm::TypeCharacterClass) + , m_capture(false) + , m_invert(invert) + { + atom.characterClass = characterClass; + atom.quantityType = QuantifierFixedCount; + atom.quantityCount = 1; + inputPosition = inputPos; + } + + ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) + : type(type) + , m_capture(capture) + , m_invert(false) + { + atom.subpatternId = subpatternId; + atom.parenthesesDisjunction = parenthesesInfo; + atom.quantityType = QuantifierFixedCount; + atom.quantityCount = 1; + inputPosition = inputPos; + } + + ByteTerm(Type type, bool invert = false) + : type(type) + , m_capture(false) + , m_invert(invert) + { + atom.quantityType = QuantifierFixedCount; + atom.quantityCount = 1; + } + + ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) + : type(type) + , m_capture(capture) + , m_invert(invert) + { + atom.subpatternId = subpatternId; + atom.quantityType = QuantifierFixedCount; + atom.quantityCount = 1; + inputPosition = inputPos; + } + + static ByteTerm BOL(int inputPos) + { + ByteTerm term(TypeAssertionBOL); + term.inputPosition = inputPos; + return term; + } + + static ByteTerm CheckInput(unsigned count) + { + ByteTerm term(TypeCheckInput); + term.checkInputCount = count; + return term; + } + + static ByteTerm UncheckInput(unsigned count) + { + ByteTerm term(TypeUncheckInput); + term.checkInputCount = count; + return term; + } + + static ByteTerm EOL(int inputPos) + { + ByteTerm term(TypeAssertionEOL); + term.inputPosition = inputPos; + return term; + } + + static ByteTerm WordBoundary(bool invert, int inputPos) + { + ByteTerm term(TypeAssertionWordBoundary, invert); + term.inputPosition = inputPos; + return term; + } + + static ByteTerm BackReference(unsigned subpatternId, int inputPos) + { + return ByteTerm(TypeBackReference, subpatternId, false, false, inputPos); + } + + static ByteTerm BodyAlternativeBegin(bool onceThrough) + { + ByteTerm term(TypeBodyAlternativeBegin); + term.alternative.next = 0; + term.alternative.end = 0; + term.alternative.onceThrough = onceThrough; + return term; + } + + static ByteTerm BodyAlternativeDisjunction(bool onceThrough) + { + ByteTerm term(TypeBodyAlternativeDisjunction); + term.alternative.next = 0; + term.alternative.end = 0; + term.alternative.onceThrough = onceThrough; + return term; + } + + static ByteTerm BodyAlternativeEnd() + { + ByteTerm term(TypeBodyAlternativeEnd); + term.alternative.next = 0; + term.alternative.end = 0; + term.alternative.onceThrough = false; + return term; + } + + static ByteTerm AlternativeBegin() + { + ByteTerm term(TypeAlternativeBegin); + term.alternative.next = 0; + term.alternative.end = 0; + term.alternative.onceThrough = false; + return term; + } + + static ByteTerm AlternativeDisjunction() + { + ByteTerm term(TypeAlternativeDisjunction); + term.alternative.next = 0; + term.alternative.end = 0; + term.alternative.onceThrough = false; + return term; + } + + static ByteTerm AlternativeEnd() + { + ByteTerm term(TypeAlternativeEnd); + term.alternative.next = 0; + term.alternative.end = 0; + term.alternative.onceThrough = false; + return term; + } + + static ByteTerm SubpatternBegin() + { + return ByteTerm(TypeSubpatternBegin); + } + + static ByteTerm SubpatternEnd() + { + return ByteTerm(TypeSubpatternEnd); + } + + bool invert() + { + return m_invert; + } + + bool capture() + { + return m_capture; + } +}; + +class ByteDisjunction { + +public: + ByteDisjunction(unsigned numSubpatterns, unsigned frameSize) + : m_numSubpatterns(numSubpatterns) + , m_frameSize(frameSize) + { + } + + Vector terms; + unsigned m_numSubpatterns; + unsigned m_frameSize; +}; + +struct BytecodePattern { + +public: + BytecodePattern(PassOwnPtr body, const Vector &allParenthesesInfo, YarrPattern& pattern, BumpPointerAllocator* allocator) + : m_body(body) + , m_ignoreCase(pattern.m_ignoreCase) + , m_multiline(pattern.m_multiline) + , m_allocator(allocator) + { + newlineCharacterClass = pattern.newlineCharacterClass(); + wordcharCharacterClass = pattern.wordcharCharacterClass(); + + m_allParenthesesInfo.append(allParenthesesInfo); + m_userCharacterClasses.append(pattern.m_userCharacterClasses); + + + + pattern.m_userCharacterClasses.clear(); + } + + ~BytecodePattern() + { + deleteAllValues(m_allParenthesesInfo); + deleteAllValues(m_userCharacterClasses); + } + + OwnPtr m_body; + bool m_ignoreCase; + bool m_multiline; + + + BumpPointerAllocator* m_allocator; + + CharacterClass* newlineCharacterClass; + CharacterClass* wordcharCharacterClass; + +private: + Vector m_allParenthesesInfo; + Vector m_userCharacterClasses; +}; + +} } +# 38 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/Yarr.h" 2 + + +namespace JSC { namespace Yarr { + +#define YarrStackSpaceForBackTrackInfoPatternCharacter 1 +#define YarrStackSpaceForBackTrackInfoCharacterClass 1 +#define YarrStackSpaceForBackTrackInfoBackReference 2 +#define YarrStackSpaceForBackTrackInfoAlternative 1 +#define YarrStackSpaceForBackTrackInfoParentheticalAssertion 1 +#define YarrStackSpaceForBackTrackInfoParenthesesOnce 1 +#define YarrStackSpaceForBackTrackInfoParenthesesTerminal 1 +#define YarrStackSpaceForBackTrackInfoParentheses 2 + +static const unsigned quantifyInfinite = (2147483647 * 2U + 1U); + + + +static const unsigned matchLimit = 1000000; + +enum JSRegExpResult { + JSRegExpMatch = 1, + JSRegExpNoMatch = 0, + JSRegExpErrorNoMatch = -1, + JSRegExpErrorHitLimit = -2, + JSRegExpErrorNoMemory = -3, + JSRegExpErrorInternal = -4 +}; + +PassOwnPtr byteCompile(YarrPattern&, BumpPointerAllocator*); +int interpret(BytecodePattern*, const UChar* input, unsigned start, unsigned length, int* output); + +} } +# 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrJIT.h" 1 +# 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrJIT.h" +#define YarrJIT_h + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssembler.h" 1 +# 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssembler.h" +#define MacroAssembler_h +# 42 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssembler.h" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerARM.h" 1 +# 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerARM.h" +#define MacroAssemblerARM_h + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/ARMAssembler.h" 1 +# 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/ARMAssembler.h" +#define ARMAssembler_h +# 41 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/ARMAssembler.h" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBufferWithConstantPool.h" 1 +# 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBufferWithConstantPool.h" +#define AssemblerBufferWithConstantPool_h + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBuffer.h" 1 +# 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBuffer.h" +#define AssemblerBuffer_h + + + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Assertions.h" 1 +# 40 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBuffer.h" 2 + +namespace JSC { + + class AssemblerBuffer { + static const int inlineCapacity = 256; + public: + AssemblerBuffer() + : m_buffer(m_inlineBuffer) + , m_capacity(inlineCapacity) + , m_size(0) + , m_oom(false) + { + } + + ~AssemblerBuffer() + { + if (m_buffer != m_inlineBuffer) + free(m_buffer); + } + + void ensureSpace(int space) + { + if (m_size > m_capacity - space) + grow(); + } + + bool isAligned(int alignment) const + { + return !(m_size & (alignment - 1)); + } + + void putByteUnchecked(int value) + { + do { } while(0); + m_buffer[m_size] = char(value); + m_size++; + } + + void putByte(int value) + { + if (m_size > m_capacity - 4) + grow(); + putByteUnchecked(value); + } + + void putShortUnchecked(int value) + { + do { } while(0); + *reinterpret_cast(&m_buffer[m_size]) = short(value); + m_size += 2; + } + + void putShort(int value) + { + if (m_size > m_capacity - 4) + grow(); + putShortUnchecked(value); + } + + void putIntUnchecked(int value) + { + do { } while(0); + *reinterpret_cast(&m_buffer[m_size]) = value; + m_size += 4; + } + + void putInt64Unchecked(int64_t value) + { + do { } while(0); + *reinterpret_cast(&m_buffer[m_size]) = value; + m_size += 8; + } + + void putInt(int value) + { + if (m_size > m_capacity - 4) + grow(); + putIntUnchecked(value); + } + + void* data() const + { + return m_buffer; + } + + int size() const + { + return m_size; + } + + bool oom() const + { + return m_oom; + } + + + + + + void* executableAllocAndCopy(ExecutableAllocator* allocator, ExecutablePool** poolp, CodeKind kind) + { + if (m_oom || m_size == 0) { + *poolp = __null; + return 0; + } + + void* result = allocator->alloc(m_size, poolp, kind); + if (!result) { + *poolp = __null; + return 0; + } + do { } while(0); + + ExecutableAllocator::makeWritable(result, m_size); + + return memcpy(result, m_buffer, m_size); + } + + unsigned char *buffer() const { + do { } while(0); + return reinterpret_cast(m_buffer); + } + + protected: + void append(const char* data, int size) + { + if (m_size > m_capacity - size) + grow(size); + + + if (m_oom) + return; + memcpy(m_buffer + m_size, data, size); + m_size += size; + } +# 191 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBuffer.h" + void grow(int extraCapacity = 0) + { + + + + + int newCapacity = m_capacity + m_capacity + extraCapacity; + char* newBuffer; + + if (m_buffer == m_inlineBuffer) { + newBuffer = static_cast(malloc(newCapacity)); + if (!newBuffer) { + m_size = 0; + m_oom = true; + return; + } + memcpy(newBuffer, m_buffer, m_size); + } else { + newBuffer = static_cast(realloc(m_buffer, newCapacity)); + if (!newBuffer) { + m_size = 0; + m_oom = true; + return; + } + } + + m_buffer = newBuffer; + m_capacity = newCapacity; + } + + char m_inlineBuffer[inlineCapacity]; + char* m_buffer; + int m_capacity; + int m_size; + bool m_oom; + }; + +} +# 39 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBufferWithConstantPool.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/SegmentedVector.h" 1 +# 30 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/SegmentedVector.h" +#define SegmentedVector_h + + + + +namespace WTF { + + + template class SegmentedVector; + template class SegmentedVectorIterator { + private: + friend class SegmentedVector; + public: + typedef SegmentedVectorIterator Iterator; + + ~SegmentedVectorIterator() { } + + T& operator*() const { return (*m_vector.m_segments[m_segment])[m_index]; } + T* operator->() const { return &(*m_vector.m_segments[m_segment])[m_index]; } + + + Iterator& operator++() + { + do { } while(0); + ++m_index; + + if (m_index >= m_vector.m_segments[m_segment]->length()) { + + if (m_segment + 1 < m_vector.m_segments.length()) { + + do { } while(0); + ++m_segment; + m_index = 0; + } else { + + m_segment = 0; + m_index = SegmentSize; + } + } + return *this; + } + + bool operator==(const Iterator& other) const + { + return (m_index == other.m_index && m_segment = other.m_segment && &m_vector == &other.m_vector); + } + + bool operator!=(const Iterator& other) const + { + return (m_index != other.m_index || m_segment != other.m_segment || &m_vector != &other.m_vector); + } + + SegmentedVectorIterator& operator=(const SegmentedVectorIterator& other) + { + m_vector = other.m_vector; + m_segment = other.m_segment; + m_index = other.m_index; + return *this; + } + + private: + SegmentedVectorIterator(SegmentedVector& vector, size_t segment, size_t index) + : m_vector(vector) + , m_segment(segment) + , m_index(index) + { + } + + SegmentedVector& m_vector; + size_t m_segment; + size_t m_index; + }; + + + + + template class SegmentedVector { + friend class SegmentedVectorIterator; + public: + typedef SegmentedVectorIterator Iterator; + + SegmentedVector() + : m_size(0) + { + m_segments.append(&m_inlineSegment); + } + + ~SegmentedVector() + { + deleteAllSegments(); + } + + size_t size() const { return m_size; } + bool isEmpty() const { return !size(); } + + T& at(size_t index) + { + if (index < SegmentSize) + return m_inlineSegment[index]; + return segmentFor(index)->at(subscriptFor(index)); + } + + T& operator[](size_t index) + { + return at(index); + } + + T& last() + { + return at(size() - 1); + } + + template void append(const U& value) + { + ++m_size; + + if (m_size <= SegmentSize) { + + m_inlineSegment.append(value); + return; + } + + if (!segmentExistsFor(m_size - 1)) + m_segments.append(new Segment); + + segmentFor(m_size - 1)->append(value); + } + + T& alloc() + { + append(T()); + return last(); + } + + void removeLast() + { + if (m_size <= SegmentSize) + m_inlineSegment.removeLast(); + else + segmentFor(m_size - 1)->removeLast(); + --m_size; + } + + void grow(size_t size) + { + do { } while(0); + ensureSegmentsFor(size); + m_size = size; + } + + void clear() + { + deleteAllSegments(); + m_segments.resize(1); + m_inlineSegment.clear(); + m_size = 0; + } + + Iterator begin() + { + return Iterator(*this, 0, m_size ? 0 : SegmentSize); + } + + Iterator end() + { + return Iterator(*this, 0, SegmentSize); + } + + private: + typedef js::Vector Segment; + + void deleteAllSegments() + { + + + + for (size_t i = 1; i < m_segments.length(); i++) + delete m_segments[i]; + } + + bool segmentExistsFor(size_t index) + { + + return index / SegmentSize < m_segments.length(); + } + + Segment* segmentFor(size_t index) + { + return m_segments[index / SegmentSize]; + } + + size_t subscriptFor(size_t index) + { + return index % SegmentSize; + } + + void ensureSegmentsFor(size_t size) + { + size_t segmentCount = m_size / SegmentSize; + if (m_size % SegmentSize) + ++segmentCount; + + segmentCount = segmentCount > 1 ? segmentCount : 1; + + size_t neededSegmentCount = size / SegmentSize; + if (size % SegmentSize) + ++neededSegmentCount; + + + size_t end = neededSegmentCount - 1; + for (size_t i = segmentCount - 1; i < end; ++i) + ensureSegment(i, SegmentSize); + + + ensureSegment(end, subscriptFor(size - 1) + 1); + } + + void ensureSegment(size_t segmentIndex, size_t size) + { + do { } while(0); + if (segmentIndex == m_segments.size()) + m_segments.append(new Segment); + m_segments[segmentIndex]->grow(size); + } + + size_t m_size; + Segment m_inlineSegment; + js::Vector m_segments; + }; + +} + +using WTF::SegmentedVector; +# 40 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBufferWithConstantPool.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Assertions.h" 1 +# 41 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBufferWithConstantPool.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/Logging.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/Logging.h" +#define jsjaeger_logging_h__ + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/prmjtime.h" 1 +# 13 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/Logging.h" 2 + + + +namespace js { + +#define JSPEW_CHAN_MAP(_) _(Abort) _(Scripts) _(Prof) _(JSOps) _(Insns) _(VMFrame) _(PICs) _(SlowCalls) _(Analysis) _(Regalloc) _(Inlining) _(Recompile) +# 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/Logging.h" +enum JaegerSpewChannel { +#define _(name) JSpew_ ##name, + JSpew_Abort, JSpew_Scripts, JSpew_Prof, JSpew_JSOps, JSpew_Insns, JSpew_VMFrame, JSpew_PICs, JSpew_SlowCalls, JSpew_Analysis, JSpew_Regalloc, JSpew_Inlining, JSpew_Recompile, +#undef _ + JSpew_Terminator +}; +# 88 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/Logging.h" +static inline void JaegerSpew(JaegerSpewChannel channel, const char *fmt, ...) +{ +} + + + +} +# 43 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBufferWithConstantPool.h" 2 + +#define ASSEMBLER_HAS_CONSTANT_POOL 1 + +namespace JSC { +# 94 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBufferWithConstantPool.h" +template +class AssemblerBufferWithConstantPool: public AssemblerBuffer { + typedef SegmentedVector LoadOffsets; +public: + enum { + UniqueConst, + ReusableConst, + UnusedEntry + }; + + AssemblerBufferWithConstantPool() + : AssemblerBuffer() + , m_numConsts(0) + , m_maxDistance(maxPoolSize) + , m_lastConstDelta(0) + , m_flushCount(0) + { + m_pool = static_cast(malloc(maxPoolSize)); + m_mask = static_cast(malloc(maxPoolSize / sizeof(uint32_t))); + } + + ~AssemblerBufferWithConstantPool() + { + free(m_mask); + free(m_pool); + } + + void ensureSpace(int space) + { + flushIfNoSpaceFor(space); + AssemblerBuffer::ensureSpace(space); + } + + void ensureSpace(int insnSpace, int constSpace) + { + flushIfNoSpaceFor(insnSpace, constSpace); + AssemblerBuffer::ensureSpace(insnSpace); + } + + bool isAligned(int alignment) + { + flushIfNoSpaceFor(alignment); + return AssemblerBuffer::isAligned(alignment); + } + + void putByteUnchecked(int value) + { + AssemblerBuffer::putByteUnchecked(value); + correctDeltas(1); + } + + void putByte(int value) + { + flushIfNoSpaceFor(1); + AssemblerBuffer::putByte(value); + correctDeltas(1); + } + + void putShortUnchecked(int value) + { + AssemblerBuffer::putShortUnchecked(value); + correctDeltas(2); + } + + void putShort(int value) + { + flushIfNoSpaceFor(2); + AssemblerBuffer::putShort(value); + correctDeltas(2); + } + + void putIntUnchecked(int value) + { + AssemblerBuffer::putIntUnchecked(value); + correctDeltas(4); + } + + void putInt(int value) + { + flushIfNoSpaceFor(4); + AssemblerBuffer::putInt(value); + correctDeltas(4); + } + + void putInt64Unchecked(int64_t value) + { + AssemblerBuffer::putInt64Unchecked(value); + correctDeltas(8); + } + + int size() + { + flushIfNoSpaceFor(maxInstructionSize, sizeof(uint64_t)); + return AssemblerBuffer::size(); + } + + int uncheckedSize() + { + return AssemblerBuffer::size(); + } + + void* executableAllocAndCopy(ExecutableAllocator* allocator, ExecutablePool** poolp, CodeKind kind) + { + flushConstantPool(false); + return AssemblerBuffer::executableAllocAndCopy(allocator, poolp, kind); + } + + void putIntWithConstantInt(uint32_t insn, uint32_t constant, bool isReusable = false) + { + flushIfNoSpaceFor(4, 4); + + m_loadOffsets.append(AssemblerBuffer::size()); + if (isReusable) + for (int i = 0; i < m_numConsts; ++i) { + if (m_mask[i] == ReusableConst && m_pool[i] == constant) { + AssemblerBuffer::putInt(AssemblerType::patchConstantPoolLoad(insn, i)); + correctDeltas(4); + return; + } + } + + m_pool[m_numConsts] = constant; + m_mask[m_numConsts] = static_cast(isReusable ? ReusableConst : UniqueConst); + + AssemblerBuffer::putInt(AssemblerType::patchConstantPoolLoad(insn, m_numConsts)); + ++m_numConsts; + + correctDeltas(4, 4); + } + + + void flushWithoutBarrier(bool isForced = false) + { + + if (isForced || (5 * m_numConsts * sizeof(uint32_t)) > (3 * maxPoolSize)) + flushConstantPool(false); + } + + uint32_t* poolAddress() + { + return m_pool; + } + + int sizeOfConstantPool() + { + return m_numConsts; + } + + int flushCount() + { + return m_flushCount; + } + +private: + void correctDeltas(int insnSize) + { + m_maxDistance -= insnSize; + do { } while(0); + m_lastConstDelta -= insnSize; + if (m_lastConstDelta < 0) + m_lastConstDelta = 0; + } + + void correctDeltas(int insnSize, int constSize) + { + correctDeltas(insnSize); + + m_maxDistance -= m_lastConstDelta; + do { } while(0); + m_lastConstDelta = constSize; + } + + void flushConstantPool(bool useBarrier = true) + { + js::JaegerSpew(js::JSpew_Insns, " -- FLUSHING CONSTANT POOL WITH %d CONSTANTS --\n", + m_numConsts); + if (m_numConsts == 0) + return; + m_flushCount++; + int alignPool = (AssemblerBuffer::size() + (useBarrier ? barrierSize : 0)) & (sizeof(uint64_t) - 1); + + if (alignPool) + alignPool = sizeof(uint64_t) - alignPool; + + + if (useBarrier) + AssemblerBuffer::putInt(AssemblerType::placeConstantPoolBarrier(m_numConsts * sizeof(uint32_t) + alignPool)); + + if (alignPool) { + if (alignPool & 1) + AssemblerBuffer::putByte(AssemblerType::padForAlign8); + if (alignPool & 2) + AssemblerBuffer::putShort(AssemblerType::padForAlign16); + if (alignPool & 4) + AssemblerBuffer::putInt(AssemblerType::padForAlign32); + } + + int constPoolOffset = AssemblerBuffer::size(); + append(reinterpret_cast(m_pool), m_numConsts * sizeof(uint32_t)); + + + for (LoadOffsets::Iterator iter = m_loadOffsets.begin(); iter != m_loadOffsets.end(); ++iter) { + void* loadAddr = reinterpret_cast(m_buffer + *iter); + AssemblerType::patchConstantPoolLoad(loadAddr, reinterpret_cast(m_buffer + constPoolOffset)); + } + + m_loadOffsets.clear(); + m_numConsts = 0; + m_maxDistance = maxPoolSize; + do { } while(0); + + } + + void flushIfNoSpaceFor(int nextInsnSize) + { + if (m_numConsts == 0) { + m_maxDistance = maxPoolSize; + return; + } + int lastConstDelta = m_lastConstDelta > nextInsnSize ? m_lastConstDelta - nextInsnSize : 0; + if ((m_maxDistance < nextInsnSize + lastConstDelta + barrierSize + (int)sizeof(uint32_t))) + flushConstantPool(); + } + + void flushIfNoSpaceFor(int nextInsnSize, int nextConstSize) + { + if (m_numConsts == 0) { + m_maxDistance = maxPoolSize; + return; + } + if ((m_maxDistance < nextInsnSize + m_lastConstDelta + nextConstSize + barrierSize + (int)sizeof(uint32_t)) || + (m_numConsts * sizeof(uint32_t) + nextConstSize >= maxPoolSize)) + flushConstantPool(); + } + + uint32_t* m_pool; + char* m_mask; + LoadOffsets m_loadOffsets; + + int m_numConsts; + int m_maxDistance; + int m_lastConstDelta; + int m_flushCount; +}; + +} +# 42 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/ARMAssembler.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Assertions.h" 1 +# 43 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/ARMAssembler.h" 2 + + +#define IPFX " %s" +#define ISPFX " " +# 57 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/ARMAssembler.h" +#define MAYBE_PAD "" +#define FIXME_INSN_PRINTING ((void) 0) + + + + + +namespace JSC { + + typedef uint32_t ARMWord; + + namespace ARMRegisters { + typedef enum { + r0 = 0, + r1, + r2, + r3, + S0 = r3, + r4, + r5, + r6, + r7, + r8, + S1 = r8, + r9, + r10, + r11, + r12, + ip = r12, + r13, + sp = r13, + r14, + lr = r14, + r15, + pc = r15 + } RegisterID; + + typedef enum { + d0, + d1, + d2, + d3, + SD0 = d3, + d4, + d5, + d6, + d7, + d8, + d9, + d10, + d11, + d12, + d13, + d14, + d15, + d16, + d17, + d18, + d19, + d20, + d21, + d22, + d23, + d24, + d25, + d26, + d27, + d28, + d29, + d30, + d31 + } FPRegisterID; + + inline FPRegisterID floatShadow(FPRegisterID s) + { + return (FPRegisterID)(s*2); + } + inline FPRegisterID doubleShadow(FPRegisterID d) + { + return (FPRegisterID)(d / 2); + } + } + + class ARMAssembler { + public: + + + + + + + ARMAssembler() { } + + + typedef ARMRegisters::RegisterID RegisterID; + typedef ARMRegisters::FPRegisterID FPRegisterID; + typedef AssemblerBufferWithConstantPool<2048, 4, 4, ARMAssembler> ARMBuffer; + typedef SegmentedVector Jumps; + + unsigned char *buffer() const { return m_buffer.buffer(); } + bool oom() const { return m_buffer.oom(); } + + + typedef enum { + EQ = 0x00000000, + NE = 0x10000000, + CS = 0x20000000, + CC = 0x30000000, + MI = 0x40000000, + PL = 0x50000000, + VS = 0x60000000, + VC = 0x70000000, + HI = 0x80000000, + LS = 0x90000000, + GE = 0xa0000000, + LT = 0xb0000000, + GT = 0xc0000000, + LE = 0xd0000000, + AL = 0xe0000000 + } Condition; + + + enum { + AND = (0x0 << 21), + EOR = (0x1 << 21), + SUB = (0x2 << 21), + RSB = (0x3 << 21), + ADD = (0x4 << 21), + ADC = (0x5 << 21), + SBC = (0x6 << 21), + RSC = (0x7 << 21), + TST = (0x8 << 21), + TEQ = (0x9 << 21), + CMP = (0xa << 21), + CMN = (0xb << 21), + ORR = (0xc << 21), + MOV = (0xd << 21), + BIC = (0xe << 21), + MVN = (0xf << 21), + MUL = 0x00000090, + MULL = 0x00c00090, + FCPYD = 0x0eb00b40, + FADDD = 0x0e300b00, + FNEGD = 0x0eb10b40, + FABSD = 0x0eb00bc0, + FDIVD = 0x0e800b00, + FSUBD = 0x0e300b40, + FMULD = 0x0e200b00, + FCMPD = 0x0eb40b40, + FSQRTD = 0x0eb10bc0, + DTR = 0x05000000, + LDRH = 0x00100090, + STRH = 0x00000090, + DTRH = 0x00000090, + STMDB = 0x09200000, + LDMIA = 0x08b00000, + B = 0x0a000000, + BL = 0x0b000000 + + ,BX = 0x012fff10 + + + ,CLZ = 0x016f0f10, + BKPT = 0xe1200070, + BLX = 0x012fff30 + + + ,MOVW = 0x03000000, + MOVT = 0x03400000 + + }; + + enum { + OP2_IMM = (1 << 25), + OP2_IMMh = (1 << 22), + OP2_INV_IMM = (1 << 26), + SET_CC = (1 << 20), + OP2_OFSREG = (1 << 25), + DT_UP = (1 << 23), + DT_BYTE = (1 << 22), + DT_WB = (1 << 21), + + DT_PRE = (1 << 24), + + HDT_UH = (1 << 5), + + HDT_IMM = (1 << 22), + + HDT_S = (1 << 6), + DT_LOAD = (1 << 20) + }; + + + enum { + BRANCH_MASK = 0x00ffffff, + NONARM = 0xf0000000, + SDT_MASK = 0x0c000000, + SDT_OFFSET_MASK = 0xfff + }; + + enum { + BOFFSET_MIN = -0x00800000, + BOFFSET_MAX = 0x007fffff, + SDT = 0x04000000 + }; + + enum { + padForAlign8 = (int)0x00, + padForAlign16 = (int)0x0000, + padForAlign32 = (int)0xe12fff7f + }; + + typedef enum { + LSL = 0, + LSR = 1, + ASR = 2, + ROR = 3 + } Shift; + + static const ARMWord INVALID_IMM = 0xf0000000; + static const ARMWord InvalidBranchTarget = 0xffffffff; + static const int DefaultPrefetching = 2; + + class JmpSrc { + friend class ARMAssembler; + public: + JmpSrc() + : m_offset(-1) + { + } + + private: + JmpSrc(int offset) + : m_offset(offset) + { + } + + int m_offset; + }; + + class JmpDst { + friend class ARMAssembler; + public: + JmpDst() + : m_offset(-1) + , m_used(false) + { + } + + bool isUsed() const { return m_used; } + void used() { m_used = true; } + bool isValid() const { return m_offset != -1; } + private: + JmpDst(int offset) + : m_offset(offset) + , m_used(false) + { + do { } while(0); + } + + int m_offset : 31; + bool m_used : 1; + }; + + + + void emitInst(ARMWord op, int rd, int rn, ARMWord op2) + { + do { } while(0); + m_buffer.putInt(op | RN(rn) | RD(rd) | op2); + } + + + + + + + ARMWord getOp2RotLSL(int lsl) + { + do { } while(0); + do { } while(0); + + return (-(lsl/2) & 0xf) << 8; + } + + void and_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("and", cc, rd, rn, op2); + emitInst(static_cast(cc) | AND, rd, rn, op2); + } + + void ands_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("ands", cc, rd, rn, op2); + emitInst(static_cast(cc) | AND | SET_CC, rd, rn, op2); + } + + void eor_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("eor", cc, rd, rn, op2); + emitInst(static_cast(cc) | EOR, rd, rn, op2); + } + + void eors_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("eors", cc, rd, rn, op2); + emitInst(static_cast(cc) | EOR | SET_CC, rd, rn, op2); + } + + void sub_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("sub", cc, rd, rn, op2); + emitInst(static_cast(cc) | SUB, rd, rn, op2); + } + + void subs_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("subs", cc, rd, rn, op2); + emitInst(static_cast(cc) | SUB | SET_CC, rd, rn, op2); + } + + void rsb_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("rsb", cc, rd, rn, op2); + emitInst(static_cast(cc) | RSB, rd, rn, op2); + } + + void rsbs_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("rsbs", cc, rd, rn, op2); + emitInst(static_cast(cc) | RSB | SET_CC, rd, rn, op2); + } + + void add_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("add", cc, rd, rn, op2); + emitInst(static_cast(cc) | ADD, rd, rn, op2); + } + + void adds_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("adds", cc, rd, rn, op2); + emitInst(static_cast(cc) | ADD | SET_CC, rd, rn, op2); + } + + void adc_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("adc", cc, rd, rn, op2); + emitInst(static_cast(cc) | ADC, rd, rn, op2); + } + + void adcs_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("adcs", cc, rd, rn, op2); + emitInst(static_cast(cc) | ADC | SET_CC, rd, rn, op2); + } + + void sbc_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("sbc", cc, rd, rn, op2); + emitInst(static_cast(cc) | SBC, rd, rn, op2); + } + + void sbcs_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("sbcs", cc, rd, rn, op2); + emitInst(static_cast(cc) | SBC | SET_CC, rd, rn, op2); + } + + void rsc_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("rsc", cc, rd, rn, op2); + emitInst(static_cast(cc) | RSC, rd, rn, op2); + } + + void rscs_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("rscs", cc, rd, rn, op2); + emitInst(static_cast(cc) | RSC | SET_CC, rd, rn, op2); + } + + void tst_r(int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("tst", cc, rn, op2); + emitInst(static_cast(cc) | TST | SET_CC, 0, rn, op2); + } + + void teq_r(int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("teq", cc, rn, op2); + emitInst(static_cast(cc) | TEQ | SET_CC, 0, rn, op2); + } + + void cmp_r(int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("cmp", cc, rn, op2); + emitInst(static_cast(cc) | CMP | SET_CC, 0, rn, op2); + } + + void cmn_r(int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("cmn", cc, rn, op2); + emitInst(static_cast(cc) | CMN | SET_CC, 0, rn, op2); + } + + void orr_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("orr", cc, rd, rn, op2); + emitInst(static_cast(cc) | ORR, rd, rn, op2); + } + + void orrs_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("orrs", cc, rd, rn, op2); + emitInst(static_cast(cc) | ORR | SET_CC, rd, rn, op2); + } + + void mov_r(int rd, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("mov", cc, rd, op2); + emitInst(static_cast(cc) | MOV, rd, ARMRegisters::r0, op2); + } + + + void movw_r(int rd, ARMWord op2, Condition cc = AL) + { + do { } while(0); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, 0x%04x\n", "", "movw", nameGpReg(rd), (op2 & 0xfff) | ((op2 >> 4) & 0xf000)); + m_buffer.putInt(static_cast(cc) | MOVW | RD(rd) | op2); + } + + void movt_r(int rd, ARMWord op2, Condition cc = AL) + { + do { } while(0); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, 0x%04x\n", "", "movt", nameGpReg(rd), (op2 & 0xfff) | ((op2 >> 4) & 0xf000)); + m_buffer.putInt(static_cast(cc) | MOVT | RD(rd) | op2); + } + + + void movs_r(int rd, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("movs", cc, rd, op2); + emitInst(static_cast(cc) | MOV | SET_CC, rd, ARMRegisters::r0, op2); + } + + void bic_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("bic", cc, rd, rn, op2); + emitInst(static_cast(cc) | BIC, rd, rn, op2); + } + + void bics_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("bics", cc, rd, rn, op2); + emitInst(static_cast(cc) | BIC | SET_CC, rd, rn, op2); + } + + void mvn_r(int rd, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("mvn", cc, rd, op2); + emitInst(static_cast(cc) | MVN, rd, ARMRegisters::r0, op2); + } + + void mvns_r(int rd, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("mvns", cc, rd, op2); + emitInst(static_cast(cc) | MVN | SET_CC, rd, ARMRegisters::r0, op2); + } + + void mul_r(int rd, int rn, int rm, Condition cc = AL) + { + spewInsWithOp2("mul", cc, rd, rn, static_cast(rm)); + m_buffer.putInt(static_cast(cc) | MUL | RN(rd) | RS(rn) | RM(rm)); + } + + void muls_r(int rd, int rn, int rm, Condition cc = AL) + { + spewInsWithOp2("muls", cc, rd, rn, static_cast(rm)); + m_buffer.putInt(static_cast(cc) | MUL | SET_CC | RN(rd) | RS(rn) | RM(rm)); + } + + void mull_r(int rdhi, int rdlo, int rn, int rm, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s, %s, %s\n", "", "mull", nameGpReg(rdlo), nameGpReg(rdhi), nameGpReg(rn), nameGpReg(rm)); + m_buffer.putInt(static_cast(cc) | MULL | RN(rdhi) | RD(rdlo) | RS(rn) | RM(rm)); + } + + + void ldr_imm(int rd, ARMWord imm, Condition cc = AL) + { + char mnemonic[16]; + snprintf(mnemonic, 16, "ldr%s", nameCC(cc)); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, =0x%x @ (%d) (reusable pool entry)\n", "", mnemonic, nameGpReg(rd), imm, static_cast(imm)); + m_buffer.putIntWithConstantInt(static_cast(cc) | DTR | DT_LOAD | DT_UP | RN(ARMRegisters::pc) | RD(rd), imm, true); + } + + void ldr_un_imm(int rd, ARMWord imm, Condition cc = AL) + { + char mnemonic[16]; + snprintf(mnemonic, 16, "ldr%s", nameCC(cc)); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, =0x%x @ (%d)\n", "", mnemonic, nameGpReg(rd), imm, static_cast(imm)); + m_buffer.putIntWithConstantInt(static_cast(cc) | DTR | DT_LOAD | DT_UP | RN(ARMRegisters::pc) | RD(rd), imm); + } + + void mem_imm_off(bool isLoad, bool isSigned, int size, bool posOffset, + int rd, int rb, ARMWord offset, Condition cc = AL) + { + do { } while(0); + char const * mnemonic_act = (isLoad) ? ("ld") : ("st"); + char const * mnemonic_sign = (isSigned) ? ("s") : (""); + + char const * mnemonic_size = __null; + switch (size / 8) { + case 1: + mnemonic_size = "b"; + break; + case 2: + mnemonic_size = "h"; + break; + case 4: + mnemonic_size = ""; + break; + } + char const * off_sign = (posOffset) ? ("+") : ("-"); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%sr%s%s %s, [%s, #%s%u]\n", + "", mnemonic_act, mnemonic_sign, mnemonic_size, + nameGpReg(rd), nameGpReg(rb), off_sign, offset); + if (size == 32 || (size == 8 && !isSigned)) { + + emitInst(static_cast(cc) | DTR | + (isLoad ? DT_LOAD : 0) | + (size == 8 ? DT_BYTE : 0) | + (posOffset ? DT_UP : 0), rd, rb, offset); + } else { + + emitInst(static_cast(cc) | DTRH | HDT_IMM | DT_PRE | + (isLoad ? DT_LOAD : 0) | + (size == 16 ? HDT_UH : 0) | + (isSigned ? HDT_S : 0) | + (posOffset ? DT_UP : 0), rd, rb, offset); + } + } + + void mem_reg_off(bool isLoad, bool isSigned, int size, bool posOffset, int rd, int rb, int rm, Condition cc = AL) + { + char const * mnemonic_act = (isLoad) ? ("ld") : ("st"); + char const * mnemonic_sign = (isSigned) ? ("s") : (""); + + char const * mnemonic_size = __null; + switch (size / 8) { + case 1: + mnemonic_size = "b"; + break; + case 2: + mnemonic_size = "h"; + break; + case 4: + mnemonic_size = ""; + break; + } + char const * off_sign = (posOffset) ? ("+") : ("-"); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%sr%s%s %s, [%s, #%s%s]\n", "", mnemonic_act, mnemonic_sign, mnemonic_size, + nameGpReg(rd), nameGpReg(rb), off_sign, nameGpReg(rm)); + if (size == 32 || (size == 8 && !isSigned)) { + + emitInst(static_cast(cc) | DTR | + (isLoad ? DT_LOAD : 0) | + (size == 8 ? DT_BYTE : 0) | + (posOffset ? DT_UP : 0) | + OP2_OFSREG, rd, rb, rm); + } else { + + emitInst(static_cast(cc) | DTRH | DT_PRE | + (isLoad ? DT_LOAD : 0) | + (size == 16 ? HDT_UH : 0) | + (isSigned ? HDT_S : 0) | + (posOffset ? DT_UP : 0), rd, rb, rm); + } + } + + + + + void dtr_u(bool isLoad, int rd, int rb, ARMWord offset, Condition cc = AL) + { + char const * mnemonic = (isLoad) ? ("ldr") : ("str"); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, #+%u]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), offset); + emitInst(static_cast(cc) | DTR | (isLoad ? DT_LOAD : 0) | DT_UP, rd, rb, offset); + } + + + + + void dtr_ur(bool isLoad, int rd, int rb, int rm, Condition cc = AL) + { + char const * mnemonic = (isLoad) ? ("ldr") : ("str"); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, +%s]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), nameGpReg(rm)); + emitInst(static_cast(cc) | DTR | (isLoad ? DT_LOAD : 0) | DT_UP | OP2_OFSREG, rd, rb, rm); + } + + + + + void dtr_d(bool isLoad, int rd, int rb, ARMWord offset, Condition cc = AL) + { + char const * mnemonic = (isLoad) ? ("ldr") : ("str"); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, #-%u]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), offset); + emitInst(static_cast(cc) | DTR | (isLoad ? DT_LOAD : 0), rd, rb, offset); + } + + + + + void dtr_dr(bool isLoad, int rd, int rb, int rm, Condition cc = AL) + { + char const * mnemonic = (isLoad) ? ("ldr") : ("str"); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, -%s]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), nameGpReg(rm)); + emitInst(static_cast(cc) | DTR | (isLoad ? DT_LOAD : 0) | OP2_OFSREG, rd, rb, rm); + } + + + + + void dtrb_u(bool isLoad, int rd, int rb, ARMWord offset, Condition cc = AL) + { + char const * mnemonic = (isLoad) ? ("ldrb") : ("strb"); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, #+%u]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), offset); + emitInst(static_cast(cc) | DTR | DT_BYTE | (isLoad ? DT_LOAD : 0) | DT_UP, rd, rb, offset); + } + + + + + void dtrsb_u(bool isLoad, int rd, int rb, ARMWord offset, Condition cc = AL) + { + char const * mnemonic = (isLoad) ? ("ldrsb") : ("strb"); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, #+%u]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), offset); + emitInst(static_cast(cc) | DTRH | HDT_S | (isLoad ? DT_LOAD : 0) | DT_UP, rd, rb, offset); + } + + + + + void dtrb_ur(bool isLoad, int rd, int rb, int rm, Condition cc = AL) + { + char const * mnemonic = (isLoad) ? ("ldrb") : ("strb"); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, +%s]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), nameGpReg(rm)); + emitInst(static_cast(cc) | DTR | DT_BYTE | (isLoad ? DT_LOAD : 0) | DT_UP | OP2_OFSREG, rd, rb, rm); + } + + + + + void dtrb_d(bool isLoad, int rd, int rb, ARMWord offset, Condition cc = AL) + { + char const * mnemonic = (isLoad) ? ("ldrb") : ("strb"); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, #-%u]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), offset); + emitInst(static_cast(cc) | DTR | DT_BYTE | (isLoad ? DT_LOAD : 0), rd, rb, offset); + } + + + + + void dtrsb_d(bool isLoad, int rd, int rb, ARMWord offset, Condition cc = AL) + { + do { } while(0); + char const * mnemonic = (isLoad) ? ("ldrsb") : ("strb"); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, #-%u]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), offset); + emitInst(static_cast(cc) | DTRH | HDT_S | (isLoad ? DT_LOAD : 0), rd, rb, offset); + } + + + + + void dtrb_dr(bool isLoad, int rd, int rb, int rm, Condition cc = AL) + { + char const * mnemonic = (isLoad) ? ("ldrb") : ("strb"); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, -%s]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), nameGpReg(rm)); + emitInst(static_cast(cc) | DTR | DT_BYTE | (isLoad ? DT_LOAD : 0) | OP2_OFSREG, rd, rb, rm); + } + + void ldrh_r(int rd, int rb, int rm, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, +%s]\n", "", "ldrh", nameGpReg(rd), nameGpReg(rb), nameGpReg(rm)); + emitInst(static_cast(cc) | LDRH | HDT_UH | DT_UP | DT_PRE, rd, rb, rm); + } + + void ldrh_d(int rd, int rb, ARMWord offset, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, #-%u]\n", "", "ldrh", nameGpReg(rd), nameGpReg(rb), offset); + emitInst(static_cast(cc) | LDRH | HDT_UH | DT_PRE, rd, rb, offset); + } + + void ldrh_u(int rd, int rb, ARMWord offset, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, #+%u]\n", "", "ldrh", nameGpReg(rd), nameGpReg(rb), offset); + emitInst(static_cast(cc) | LDRH | HDT_UH | DT_UP | DT_PRE, rd, rb, offset); + } + + void ldrsh_d(int rd, int rb, ARMWord offset, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, #-%u]\n", "", "ldrsh", nameGpReg(rd), nameGpReg(rb), offset); + emitInst(static_cast(cc) | LDRH | HDT_UH | HDT_S | DT_PRE, rd, rb, offset); + } + + void ldrsh_u(int rd, int rb, ARMWord offset, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, #+%u]\n", "", "ldrsh", nameGpReg(rd), nameGpReg(rb), offset); + emitInst(static_cast(cc) | LDRH | HDT_UH | HDT_S | DT_UP | DT_PRE, rd, rb, offset); + } + + void strh_r(int rb, int rm, int rd, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, +%s]\n", "", "strh", nameGpReg(rd), nameGpReg(rb), nameGpReg(rm)); + emitInst(static_cast(cc) | STRH | HDT_UH | DT_UP | DT_PRE, rd, rb, rm); + } + + void push_r(int reg, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s {%s}\n", "", "push", nameGpReg(reg)); + do { } while(0); + m_buffer.putInt(cc | DTR | DT_WB | RN(ARMRegisters::sp) | RD(reg) | 0x4); + } + + void pop_r(int reg, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s {%s}\n", "", "pop", nameGpReg(reg)); + do { } while(0); + m_buffer.putInt(cc | (DTR ^ DT_PRE) | DT_LOAD | DT_UP | RN(ARMRegisters::sp) | RD(reg) | 0x4); + } + + inline void poke_r(int reg, Condition cc = AL) + { + dtr_d(false, ARMRegisters::sp, 0, reg, cc); + } + + inline void peek_r(int reg, Condition cc = AL) + { + dtr_u(true, reg, ARMRegisters::sp, 0, cc); + } + + + + + void clz_r(int rd, int rm, Condition cc = AL) + { + spewInsWithOp2("clz", cc, rd, static_cast(rm)); + m_buffer.putInt(static_cast(cc) | CLZ | RD(rd) | RM(rm)); + } + + + void bkpt(ARMWord value) + { + + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s #0x%04x\n", "", "bkpt", value); + m_buffer.putInt(BKPT | ((value & 0xfff0) << 4) | (value & 0xf)); + + + + + } + + void bx(int rm, Condition cc = AL) + { + + js::JaegerSpew( + js::JSpew_Insns, + " %s" "bx%-13s %s\n", "", nameCC(cc), nameGpReg(rm)); + emitInst(static_cast(cc) | BX, 0, 0, RM(rm)); + + + + } + + JmpSrc blx(int rm, Condition cc = AL) + { + + int s = m_buffer.uncheckedSize(); + js::JaegerSpew( + js::JSpew_Insns, + " %s" "blx%-12s %s\n", "", nameCC(cc), nameGpReg(rm)); + emitInst(static_cast(cc) | BLX, 0, 0, RM(rm)); + + + + + + + + return JmpSrc(s); + } + + static ARMWord lsl(int reg, ARMWord value) + { + do { } while(0); + do { } while(0); + return reg | (value << 7) | (LSL << 5); + } + + static ARMWord lsr(int reg, ARMWord value) + { + do { } while(0); + do { } while(0); + return reg | (value << 7) | (LSR << 5); + } + + static ARMWord asr(int reg, ARMWord value) + { + do { } while(0); + do { } while(0); + return reg | (value << 7) | (ASR << 5); + } + + static ARMWord lsl_r(int reg, int shiftReg) + { + do { } while(0); + do { } while(0); + return reg | (shiftReg << 8) | (LSL << 5) | 0x10; + } + + static ARMWord lsr_r(int reg, int shiftReg) + { + do { } while(0); + do { } while(0); + return reg | (shiftReg << 8) | (LSR << 5) | 0x10; + } + + static ARMWord asr_r(int reg, int shiftReg) + { + do { } while(0); + do { } while(0); + return reg | (shiftReg << 8) | (ASR << 5) | 0x10; + } + + + + void forceFlushConstantPool() + { + m_buffer.flushWithoutBarrier(true); + } + + int size() + { + return m_buffer.size(); + } + + void ensureSpace(int insnSpace, int constSpace) + { + m_buffer.ensureSpace(insnSpace, constSpace); + } + + void ensureSpace(int space) + { + m_buffer.ensureSpace(space); + } + + int sizeOfConstantPool() + { + return m_buffer.sizeOfConstantPool(); + } + + int flushCount() + { + return m_buffer.flushCount(); + } + + JmpDst label() + { + JmpDst label(m_buffer.size()); + js::JaegerSpew(js::JSpew_Insns, " %s" "#label ((%d))\n", "", label.m_offset); + return label; + } + + JmpDst align(int alignment) + { + while (!m_buffer.isAligned(alignment)) + mov_r(ARMRegisters::r0, ARMRegisters::r0); + + return label(); + } + + JmpSrc loadBranchTarget(int rd, Condition cc = AL, int useConstantPool = 0) + { + + + + + ensureSpace(sizeof(ARMWord), sizeof(ARMWord)); + int s = m_buffer.uncheckedSize(); + ldr_un_imm(rd, InvalidBranchTarget, cc); + m_jumps.append(s | (useConstantPool & 0x1)); + return JmpSrc(s); + } + + JmpSrc jmp(Condition cc = AL, int useConstantPool = 0) + { + return loadBranchTarget(ARMRegisters::pc, cc, useConstantPool); + } + + void* executableAllocAndCopy(ExecutableAllocator* allocator, ExecutablePool **poolp, CodeKind kind); + void executableCopy(void* buffer); + void fixUpOffsets(void* buffer); + + + + static ARMWord* getLdrImmAddress(ARMWord* insn) + { + + + if ((*insn & 0x0f7f0000) != 0x051f0000) { + + do { } while(0); + insn--; + } + + + do { } while(0); + + ARMWord addr = reinterpret_cast(insn) + DefaultPrefetching * sizeof(ARMWord); + if (*insn & DT_UP) + return reinterpret_cast(addr + (*insn & SDT_OFFSET_MASK)); + return reinterpret_cast(addr - (*insn & SDT_OFFSET_MASK)); + } + + static ARMWord* getLdrImmAddressOnPool(ARMWord* insn, uint32_t* constPool) + { + + do { } while(0); + + if (*insn & 0x1) + return reinterpret_cast(constPool + ((*insn & SDT_OFFSET_MASK) >> 1)); + return getLdrImmAddress(insn); + } + + static void patchPointerInternal(intptr_t from, void* to) + { + ARMWord* insn = reinterpret_cast(from); + ARMWord* addr = getLdrImmAddress(insn); + *addr = reinterpret_cast(to); + } + + static ARMWord patchConstantPoolLoad(ARMWord load, ARMWord value) + { + value = (value << 1) + 1; + do { } while(0); + return (load & ~0xfff) | value; + } + + static void patchConstantPoolLoad(void* loadAddr, void* constPoolAddr); + + + + static void linkPointer(void* code, JmpDst from, void* to) + { + js::JaegerSpew(js::JSpew_Insns, + " " "##linkPointer ((%p + %#x)) points to ((%p))\n", + code, from.m_offset, to); + + patchPointerInternal(reinterpret_cast(code) + from.m_offset, to); + } + + static void repatchInt32(void* from, int32_t to) + { + js::JaegerSpew(js::JSpew_Insns, + " " "##repatchInt32 ((%p)) holds ((%#x))\n", + from, to); + + patchPointerInternal(reinterpret_cast(from), reinterpret_cast(to)); + } + + static void repatchPointer(void* from, void* to) + { + js::JaegerSpew(js::JSpew_Insns, + " " "##repatchPointer ((%p)) points to ((%p))\n", + from, to); + + patchPointerInternal(reinterpret_cast(from), to); + } + + static void repatchLoadPtrToLEA(void* from) + { + + + ARMWord* insn = reinterpret_cast(from); + do { } while(0); + + *insn = (*insn & 0xf00ff0ff) | 0x02800000; + ExecutableAllocator::cacheFlush(insn, sizeof(ARMWord)); + } + + static void repatchLEAToLoadPtr(void* from) + { + + ARMWord* insn = reinterpret_cast(from); + if ((*insn & 0x0ff00f00) == 0x05900000) + return; + do { } while(0); + do { } while(0); + + *insn = (*insn & 0xf00ff0ff) | 0x05900000; + ExecutableAllocator::cacheFlush(insn, sizeof(ARMWord)); + } + + + + void linkJump(JmpSrc from, JmpDst to) + { + ARMWord code = reinterpret_cast(m_buffer.data()); + ARMWord* insn = reinterpret_cast(code + from.m_offset); + ARMWord* addr = getLdrImmAddressOnPool(insn, m_buffer.poolAddress()); + + js::JaegerSpew(js::JSpew_Insns, + " %s" "##linkJump ((%#x)) jumps to ((%#x))\n", "", + from.m_offset, to.m_offset); + + *addr = to.m_offset; + } + + static void linkJump(void* code, JmpSrc from, void* to) + { + js::JaegerSpew(js::JSpew_Insns, + " " "##linkJump ((%p + %#x)) jumps to ((%p))\n", + code, from.m_offset, to); + + patchPointerInternal(reinterpret_cast(code) + from.m_offset, to); + } + + static void relinkJump(void* from, void* to) + { + js::JaegerSpew(js::JSpew_Insns, + " " "##relinkJump ((%p)) jumps to ((%p))\n", + from, to); + + patchPointerInternal(reinterpret_cast(from), to); + } + + static bool canRelinkJump(void* from, void* to) + { + return true; + } + + static void linkCall(void* code, JmpSrc from, void* to) + { + js::JaegerSpew(js::JSpew_Insns, + " " "##linkCall ((%p + %#x)) jumps to ((%p))\n", + code, from.m_offset, to); + + patchPointerInternal(reinterpret_cast(code) + from.m_offset, to); + } + + static void relinkCall(void* from, void* to) + { + js::JaegerSpew(js::JSpew_Insns, + " " "##relinkCall ((%p)) jumps to ((%p))\n", + from, to); + + patchPointerInternal(reinterpret_cast(from), to); + } + + + + static void* getRelocatedAddress(void* code, JmpSrc jump) + { + return reinterpret_cast(reinterpret_cast(code) + jump.m_offset / sizeof(ARMWord)); + } + + static void* getRelocatedAddress(void* code, JmpDst label) + { + return reinterpret_cast(reinterpret_cast(code) + label.m_offset / sizeof(ARMWord)); + } + + + + static int getDifferenceBetweenLabels(JmpDst from, JmpSrc to) + { + return to.m_offset - from.m_offset; + } + + static int getDifferenceBetweenLabels(JmpDst from, JmpDst to) + { + return to.m_offset - from.m_offset; + } + + static unsigned getCallReturnOffset(JmpSrc call) + { + return call.m_offset + sizeof(ARMWord); + } + + + + static ARMWord getOp2Byte(ARMWord imm) + { + do { } while(0); + return OP2_IMMh | (imm & 0x0f) | ((imm & 0xf0) << 4) ; + } + + static ARMWord getOp2(ARMWord imm); + + + + static ARMWord getOp2RegScale(RegisterID reg, ARMWord scale); + + + static ARMWord getImm16Op2(ARMWord imm) + { + if (imm <= 0xffff) + return (imm & 0xf000) << 4 | (imm & 0xfff); + return INVALID_IMM; + } + + ARMWord getImm(ARMWord imm, int tmpReg, bool invert = false); + void moveImm(ARMWord imm, int dest); + ARMWord encodeComplexImm(ARMWord imm, int dest); + + ARMWord getOffsetForHalfwordDataTransfer(ARMWord imm, int tmpReg) + { + + if (imm <= 0xff) + return getOp2Byte(imm); + + return encodeComplexImm(imm, tmpReg); + } + + + void dataTransferN(bool isLoad, bool isSigned, int size, RegisterID srcDst, RegisterID base, int32_t offset); + + void dataTransfer32(bool isLoad, RegisterID srcDst, RegisterID base, int32_t offset); + void dataTransfer8(bool isLoad, RegisterID srcDst, RegisterID base, int32_t offset, bool isSigned); + void baseIndexTransferN(bool isLoad, bool isSigned, int size, RegisterID srcDst, RegisterID base, RegisterID index, int scale, int32_t offset); + void baseIndexTransfer32(bool isLoad, RegisterID srcDst, RegisterID base, RegisterID index, int scale, int32_t offset); + void doubleTransfer(bool isLoad, FPRegisterID srcDst, RegisterID base, int32_t offset); + void doubleTransfer(bool isLoad, FPRegisterID srcDst, RegisterID base, int32_t offset, RegisterID index, int32_t scale); + + void floatTransfer(bool isLoad, FPRegisterID srcDst, RegisterID base, int32_t offset); + + void baseIndexFloatTransfer(bool isLoad, bool isDouble, FPRegisterID srcDst, RegisterID base, RegisterID index, int scale, int32_t offset); + + + + static ARMWord placeConstantPoolBarrier(int offset) + { + offset = (offset - sizeof(ARMWord)) >> 2; + do { } while(0); + return AL | B | (offset & BRANCH_MASK); + } + + + static char const * nameGpReg(int reg) + { + do { } while(0); + do { } while(0); + static char const * names[] = { + "r0", "r1", "r2", "r3", + "r4", "r5", "r6", "r7", + "r8", "r9", "r10", "r11", + "ip", "sp", "lr", "pc" + }; + return names[reg]; + } + + static char const * nameFpRegD(int reg) + { + do { } while(0); + do { } while(0); + static char const * names[] = { + "d0", "d1", "d2", "d3", + "d4", "d5", "d6", "d7", + "d8", "d9", "d10", "d11", + "d12", "d13", "d14", "d15", + "d16", "d17", "d18", "d19", + "d20", "d21", "d22", "d23", + "d24", "d25", "d26", "d27", + "d28", "d29", "d30", "d31" + }; + return names[reg]; + } + static char const * nameFpRegS(int reg) + { + do { } while(0); + do { } while(0); + static char const * names[] = { + "s0", "s1", "s2", "s3", + "s4", "s5", "s6", "s7", + "s8", "s9", "s10", "s11", + "s12", "s13", "s14", "s15", + "s16", "s17", "s18", "s19", + "s20", "s21", "s22", "s23", + "s24", "s25", "s26", "s27", + "s28", "s29", "s30", "s31" + }; + return names[reg]; + } + + static char const * nameCC(Condition cc) + { + do { } while(0); + do { } while(0); + do { } while(0); + + uint32_t ccIndex = cc >> 28; + static char const * names[] = { + "eq", "ne", + "cs", "cc", + "mi", "pl", + "vs", "vc", + "hi", "ls", + "ge", "lt", + "gt", "le", + " " + }; + return names[ccIndex]; + } + + private: + + inline uint32_t decOp2Imm(uint32_t op2) + { + do { } while(0); + + uint32_t imm8 = op2 & 0xff; + uint32_t rot = ((op2 >> 7) & 0x1e); + + + + uint32_t imm = (imm8 >> rot); + if (rot > 0) { + imm |= (imm8 << (32-rot)); + } + + return imm; + } + + + + void fmtOp2(char * out, ARMWord op2) + { + static char const * const shifts[4] = {"LSL", "LSR", "ASR", "ROR"}; + + if ((op2 & OP2_IMM) || (op2 & OP2_IMMh)) { + + + uint32_t imm = decOp2Imm(op2 & ~(OP2_IMM | OP2_IMMh)); + sprintf(out, "#0x%x @ (%d)", imm, static_cast(imm)); + } else { + + + char const * rm = nameGpReg(op2 & 0xf); + Shift type = static_cast((op2 >> 5) & 0x3); + + + if (op2 & (1<<4)) { + + + char const * rs = nameGpReg((op2 >> 8) & 0xf); + sprintf(out, "%s, %s %s", rm, shifts[type], rs); + } else { + + + uint32_t imm = (op2 >> 7) & 0x1f; + + + if ((type == LSL) && (imm == 0)) { + + sprintf(out, "%s", rm); + return; + } + + if ((type == ROR) && (imm == 0)) { + + sprintf(out, "%s, RRX", rm); + return; + } + + if (((type == LSR) || (type == ASR)) && (imm == 0)) { + + + imm = 32; + } + + + + sprintf(out, "%s, %s #%u", rm, shifts[type], imm); + } + } + } + + void spewInsWithOp2(char const * ins, Condition cc, int rd, int rn, ARMWord op2) + { + char mnemonic[16]; + snprintf(mnemonic, 16, "%s%s", ins, nameCC(cc)); + + char op2_fmt[48]; + fmtOp2(op2_fmt, op2); + + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s, %s\n", "", mnemonic, nameGpReg(rd), nameGpReg(rn), op2_fmt); + } + + void spewInsWithOp2(char const * ins, Condition cc, int r, ARMWord op2) + { + char mnemonic[16]; + snprintf(mnemonic, 16, "%s%s", ins, nameCC(cc)); + + char op2_fmt[48]; + fmtOp2(op2_fmt, op2); + + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s\n", "", mnemonic, nameGpReg(r), op2_fmt); + } + + ARMWord RM(int reg) + { + do { } while(0); + return reg; + } + + ARMWord RS(int reg) + { + do { } while(0); + return reg << 8; + } + + ARMWord RD(int reg) + { + do { } while(0); + return reg << 12; + } + + ARMWord RN(int reg) + { + do { } while(0); + return reg << 16; + } + + ARMWord DD(int reg) + { + do { } while(0); + + return ((reg << 12) | (reg << 18)) & 0x0040f000; + } + + ARMWord DN(int reg) + { + do { } while(0); + + return ((reg << 16) | (reg << 3)) & 0x000f0080; + } + + ARMWord DM(int reg) + { + do { } while(0); + + return ((reg << 1) & 0x20) | (reg & 0xf); + } + + ARMWord SD(int reg) + { + do { } while(0); + + return ((reg << 11) | (reg << 22)) & 0x0040f000; + } + + ARMWord SM(int reg) + { + do { } while(0); + + return ((reg << 5) & 0x20) | ((reg >> 1) & 0xf); + } + ARMWord SN(int reg) + { + do { } while(0); + + return ((reg << 15) & 0xf0000) | ((reg & 1) << 7); + } + static ARMWord getConditionalField(ARMWord i) + { + return i & 0xf0000000; + } + + int genInt(int reg, ARMWord imm, bool positive); + + ARMBuffer m_buffer; + Jumps m_jumps; + public: + + enum { + VFP_DATA = 0x0E000A00, + VFP_EXT = 0x0C000A00, + VFP_XFER = 0x0E000A08, + VFP_DXFER = 0x0C400A00, + + VFP_DBL = (1<<8), + + + VFP_ICVT = 0x00B80040, + VFP_FPCVT = 0x00B700C0, + + VFP_DTR = 0x01000000, + VFP_MOV = 0x00000010, + + FMSR = 0x0e000a10, + FMRS = 0x0e100a10, + FSITOD = 0x0eb80bc0, + FUITOD = 0x0eb80b40, + FTOSID = 0x0ebd0b40, + FTOSIZD = 0x0ebd0bc0, + FMSTAT = 0x0ef1fa10, + FDTR = 0x0d000b00 + + }; + enum RegType { + SIntReg32, + UIntReg32, + FloatReg32, + FloatReg64 + }; + + const char * nameType(RegType t) + { + const char * const name[4] = + {"S32", "U32", "F32", "F64"}; + return name[t]; + } + + const char * nameTypedReg(RegType t, int reg) + { + switch(t) { + case SIntReg32: + case UIntReg32: + return nameGpReg(reg); + case FloatReg32: + return nameFpRegS(reg); + case FloatReg64: + return nameFpRegD(reg); + } + return ""; + } + + bool isFloatType(RegType rt) + { + if (rt == FloatReg32 || rt == FloatReg64) + return true; + return false; + } + + bool isIntType(RegType rt) + { + if (rt == FloatReg32 || rt == FloatReg64) + return false; + return true; + } + + + + + + void emitVFPInst(ARMWord op, ARMWord rd, ARMWord rn, ARMWord op2) + { + m_buffer.putInt(op | rn | rd | op2); + } + + + void fmem_imm_off(bool isLoad, bool isDouble, bool isUp, int dest, int rn, ARMWord offset, Condition cc = AL) + { + char const * ins = isLoad ? "vldr.f" : "vstr.f"; + js::JaegerSpew(js::JSpew_Insns, + " %s" "%s%d %s, [%s, #%s%u]\n", "", + ins, (isDouble ? 64 : 32), (isDouble ? nameFpRegD(dest) : nameFpRegS(dest)), + nameGpReg(rn), (isUp ? "+" : "-"), offset); + do { } while(0); + emitVFPInst(static_cast(cc) | + VFP_EXT | VFP_DTR | + (isDouble ? VFP_DBL : 0) | + (isUp ? DT_UP : 0) | + (isLoad ? DT_LOAD : 0), isDouble ? DD(dest) : SD(dest), RN(rn), offset); + + } + + + + void vcvt(RegType srcType, RegType dstType, int src, int dest, Condition cc = AL) + { + do { } while(0); + do { } while(0); + + js::JaegerSpew(js::JSpew_Insns, + " %s" "vcvt.%s.%-15s, %s,%s\n", "", + nameType(dstType), nameType(srcType), + nameTypedReg(dstType,dest), nameTypedReg(srcType,src)); + + if (isFloatType(srcType) && isFloatType (dstType)) { + + bool dblToFloat = srcType == FloatReg64; + emitVFPInst(static_cast(cc) | VFP_DATA | VFP_FPCVT | + (dblToFloat ? VFP_DBL : 0), + dblToFloat ? SD(dest) : DD(dest), + dblToFloat ? DM(src) : SM(src), 0); + } else { + __builtin_unreachable(); + } + } + + + void vmov64 (bool fromFP, bool isDbl, int r1, int r2, int rFP, Condition cc = AL) + { + if (fromFP) { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s, %s\n", "", "vmov", + nameGpReg(r1), nameGpReg(r2), nameFpRegD(rFP)); + } else { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s, %s\n", "", "vmov", + nameFpRegD(rFP), nameGpReg(r1), nameGpReg(r2)); + } + emitVFPInst(static_cast(cc) | VFP_DXFER | VFP_MOV | + (fromFP ? DT_LOAD : 0) | + (isDbl ? VFP_DBL : 0), RD(r1), RN(r2), isDbl ? DM(rFP) : SM(rFP)); + } + + void fcpyd_r(int dd, int dm, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s\n", "", "vmov.f64", + nameFpRegD(dd), nameFpRegD(dm)); + + + emitVFPInst(static_cast(cc) | FCPYD, DD(dd), DM(dm), 0); + } + + void faddd_r(int dd, int dn, int dm, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s, %s\n", "", "vadd.f64", nameFpRegD(dd), nameFpRegD(dn), nameFpRegD(dm)); + + + emitVFPInst(static_cast(cc) | FADDD, DD(dd), DN(dn), DM(dm)); + } + + void fnegd_r(int dd, int dm, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s\n", "", "fnegd", nameFpRegD(dd), nameFpRegD(dm)); + m_buffer.putInt(static_cast(cc) | FNEGD | DD(dd) | DM(dm)); + } + + void fdivd_r(int dd, int dn, int dm, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s, %s\n", "", "vdiv.f64", nameFpRegD(dd), nameFpRegD(dn), nameFpRegD(dm)); + + + emitVFPInst(static_cast(cc) | FDIVD, DD(dd), DN(dn), DM(dm)); + } + + void fsubd_r(int dd, int dn, int dm, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s, %s\n", "", "vsub.f64", nameFpRegD(dd), nameFpRegD(dn), nameFpRegD(dm)); + + + emitVFPInst(static_cast(cc) | FSUBD, DD(dd), DN(dn), DM(dm)); + } + + void fabsd_r(int dd, int dm, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s\n", "", "fabsd", nameFpRegD(dd), nameFpRegD(dm)); + m_buffer.putInt(static_cast(cc) | FABSD | DD(dd) | DM(dm)); + } + + void fmuld_r(int dd, int dn, int dm, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s, %s\n", "", "vmul.f64", nameFpRegD(dd), nameFpRegD(dn), nameFpRegD(dm)); + + + emitVFPInst(static_cast(cc) | FMULD, DD(dd), DN(dn), DM(dm)); + } + + void fcmpd_r(int dd, int dm, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s\n", "", "vcmp.f64", nameFpRegD(dd), nameFpRegD(dm)); + + + emitVFPInst(static_cast(cc) | FCMPD, DD(dd), 0, DM(dm)); + } + + void fsqrtd_r(int dd, int dm, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s\n", "", "vsqrt.f64", nameFpRegD(dd), nameFpRegD(dm)); + + + emitVFPInst(static_cast(cc) | FSQRTD, DD(dd), 0, DM(dm)); + } + + void fmsr_r(int dd, int rn, Condition cc = AL) + { + + + emitVFPInst(static_cast(cc) | FMSR, RD(rn), SN(dd), 0); + } + + void fmrs_r(int rd, int dn, Condition cc = AL) + { + + + emitVFPInst(static_cast(cc) | FMRS, RD(rd), SN(dn), 0); + } + + + + void fsitod_r(int dd, int dm, Condition cc = AL) + { + + + emitVFPInst(static_cast(cc) | FSITOD, DD(dd), 0, SM(dm)); + } + + void fuitod_r(int dd, int dm, Condition cc = AL) + { + + + emitVFPInst(static_cast(cc) | FUITOD, DD(dd), 0, SM(dm)); + } + + void ftosid_r(int fd, int dm, Condition cc = AL) + { + + emitVFPInst(static_cast(cc) | FTOSID, SD(fd), 0, DM(dm)); + } + + void ftosizd_r(int fd, int dm, Condition cc = AL) + { + + emitVFPInst(static_cast(cc) | FTOSIZD, SD(fd), 0, DM(dm)); + } + + void fmstat(Condition cc = AL) + { + + + m_buffer.putInt(static_cast(cc) | FMSTAT); + } + }; + +} +# 40 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerARM.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AbstractMacroAssembler.h" 1 +# 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AbstractMacroAssembler.h" +#define AbstractMacroAssembler_h + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerCodeRef.h" 1 +# 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerCodeRef.h" +#define MacroAssemblerCodeRef_h +# 52 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerCodeRef.h" +#define ASSERT_VALID_CODE_POINTER(ptr) ASSERT(ptr) + +#define ASSERT_VALID_CODE_OFFSET(offset) + + +namespace JSC { + + + + + +class FunctionPtr { +public: + FunctionPtr() + : m_value(0) + { + } + + template + explicit FunctionPtr(FunctionType* value) + + + + + + : m_value(reinterpret_cast(value)) + + { + do { } while(0); + } + + void* value() const { return m_value; } + void* executableAddress() const { return m_value; } + + +private: + void* m_value; +}; + + + + + + + +class ReturnAddressPtr { +public: + ReturnAddressPtr() + : m_value(0) + { + } + + explicit ReturnAddressPtr(void* value) + : m_value(value) + { + do { } while(0); + } + + explicit ReturnAddressPtr(FunctionPtr function) + : m_value(function.value()) + { + do { } while(0); + } + + void* value() const { return m_value; } + +private: + void* m_value; +}; + + + + +class MacroAssemblerCodePtr { +public: + MacroAssemblerCodePtr() + : m_value(0) + { + } + + explicit MacroAssemblerCodePtr(void* value) + + + + + : m_value(value) + + { + do { } while(0); + } + + explicit MacroAssemblerCodePtr(ReturnAddressPtr ra) + : m_value(ra.value()) + { + do { } while(0); + } + + void* executableAddress() const { + return m_value; + } + + + + + void* dataLocation() const { do { } while(0); return m_value; } + + + bool operator!() + { + return !m_value; + } + + ptrdiff_t operator -(const MacroAssemblerCodePtr &other) const + { + do { } while(0); + return reinterpret_cast(m_value) - + reinterpret_cast(other.m_value); + } + +private: + void* m_value; +}; + + + + + + +class MacroAssemblerCodeRef { +public: + MacroAssemblerCodeRef() + : m_executablePool(__null), + m_size(0) + { + } + + MacroAssemblerCodeRef(void* code, ExecutablePool* executablePool, size_t size) + : m_code(code) + , m_executablePool(executablePool) + , m_size(size) + { + } + + + void release() + { + if (!m_executablePool) + return; + + + + + + m_executablePool->release(); + m_executablePool = __null; + } + + MacroAssemblerCodePtr m_code; + ExecutablePool* m_executablePool; + size_t m_size; +}; + +} +# 35 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AbstractMacroAssembler.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/CodeLocation.h" 1 +# 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/CodeLocation.h" +#define CodeLocation_h + + + + + + +namespace JSC { + +class CodeLocationInstruction; +class CodeLocationLabel; +class CodeLocationJump; +class CodeLocationCall; +class CodeLocationNearCall; +class CodeLocationDataLabel32; +class CodeLocationDataLabelPtr; +# 59 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/CodeLocation.h" +class CodeLocationCommon : public MacroAssemblerCodePtr { +public: + CodeLocationInstruction instructionAtOffset(int offset); + CodeLocationLabel labelAtOffset(int offset); + CodeLocationJump jumpAtOffset(int offset); + CodeLocationCall callAtOffset(int offset); + CodeLocationNearCall nearCallAtOffset(int offset); + CodeLocationDataLabelPtr dataLabelPtrAtOffset(int offset); + CodeLocationDataLabel32 dataLabel32AtOffset(int offset); + +protected: + CodeLocationCommon() + { + } + + CodeLocationCommon(MacroAssemblerCodePtr location) + : MacroAssemblerCodePtr(location) + { + } +}; + +class CodeLocationInstruction : public CodeLocationCommon { +public: + CodeLocationInstruction() {} + explicit CodeLocationInstruction(MacroAssemblerCodePtr location) + : CodeLocationCommon(location) {} + explicit CodeLocationInstruction(void* location) + : CodeLocationCommon(MacroAssemblerCodePtr(location)) {} +}; + +class CodeLocationLabel : public CodeLocationCommon { +public: + CodeLocationLabel() {} + explicit CodeLocationLabel(MacroAssemblerCodePtr location) + : CodeLocationCommon(location) {} + explicit CodeLocationLabel(void* location) + : CodeLocationCommon(MacroAssemblerCodePtr(location)) {} +}; + +class CodeLocationJump : public CodeLocationCommon { +public: + CodeLocationJump() {} + explicit CodeLocationJump(MacroAssemblerCodePtr location) + : CodeLocationCommon(location) {} + explicit CodeLocationJump(void* location) + : CodeLocationCommon(MacroAssemblerCodePtr(location)) {} +}; + +class CodeLocationCall : public CodeLocationCommon { +public: + CodeLocationCall() {} + explicit CodeLocationCall(MacroAssemblerCodePtr location) + : CodeLocationCommon(location) {} + explicit CodeLocationCall(void* location) + : CodeLocationCommon(MacroAssemblerCodePtr(location)) {} +}; + +class CodeLocationNearCall : public CodeLocationCommon { +public: + CodeLocationNearCall() {} + explicit CodeLocationNearCall(MacroAssemblerCodePtr location) + : CodeLocationCommon(location) {} + explicit CodeLocationNearCall(void* location) + : CodeLocationCommon(MacroAssemblerCodePtr(location)) {} +}; + +class CodeLocationDataLabel32 : public CodeLocationCommon { +public: + CodeLocationDataLabel32() {} + explicit CodeLocationDataLabel32(MacroAssemblerCodePtr location) + : CodeLocationCommon(location) {} + explicit CodeLocationDataLabel32(void* location) + : CodeLocationCommon(MacroAssemblerCodePtr(location)) {} +}; + +class CodeLocationDataLabelPtr : public CodeLocationCommon { +public: + CodeLocationDataLabelPtr() {} + explicit CodeLocationDataLabelPtr(MacroAssemblerCodePtr location) + : CodeLocationCommon(location) {} + explicit CodeLocationDataLabelPtr(void* location) + : CodeLocationCommon(MacroAssemblerCodePtr(location)) {} +}; + +inline CodeLocationInstruction CodeLocationCommon::instructionAtOffset(int offset) +{ + ; + return CodeLocationInstruction(reinterpret_cast(dataLocation()) + offset); +} + +inline CodeLocationLabel CodeLocationCommon::labelAtOffset(int offset) +{ + ; + return CodeLocationLabel(reinterpret_cast(dataLocation()) + offset); +} + +inline CodeLocationJump CodeLocationCommon::jumpAtOffset(int offset) +{ + ; + return CodeLocationJump(reinterpret_cast(dataLocation()) + offset); +} + +inline CodeLocationCall CodeLocationCommon::callAtOffset(int offset) +{ + ; + return CodeLocationCall(reinterpret_cast(dataLocation()) + offset); +} + +inline CodeLocationNearCall CodeLocationCommon::nearCallAtOffset(int offset) +{ + ; + return CodeLocationNearCall(reinterpret_cast(dataLocation()) + offset); +} + +inline CodeLocationDataLabelPtr CodeLocationCommon::dataLabelPtrAtOffset(int offset) +{ + ; + return CodeLocationDataLabelPtr(reinterpret_cast(dataLocation()) + offset); +} + +inline CodeLocationDataLabel32 CodeLocationCommon::dataLabel32AtOffset(int offset) +{ + ; + return CodeLocationDataLabel32(reinterpret_cast(dataLocation()) + offset); +} + +} +# 36 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AbstractMacroAssembler.h" 2 + + + +namespace JSC { + +class LinkBuffer; +class RepatchBuffer; + +template +class AbstractMacroAssembler { +public: + typedef AssemblerType AssemblerType_T; + + typedef MacroAssemblerCodePtr CodePtr; + typedef MacroAssemblerCodeRef CodeRef; + + class Jump; + + typedef typename AssemblerType::RegisterID RegisterID; + typedef typename AssemblerType::FPRegisterID FPRegisterID; + typedef typename AssemblerType::JmpSrc JmpSrc; + typedef typename AssemblerType::JmpDst JmpDst; +# 72 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AbstractMacroAssembler.h" + enum Scale { + TimesOne, + TimesTwo, + TimesFour, + TimesEight + }; + + + + + struct Address { + explicit Address() {} + + explicit Address(RegisterID base, int32_t offset = 0) + : base(base) + , offset(offset) + { + } + + RegisterID base; + int32_t offset; + }; + + struct ExtendedAddress { + explicit ExtendedAddress(RegisterID base, intptr_t offset = 0) + : base(base) + , offset(offset) + { + } + + RegisterID base; + intptr_t offset; + }; +# 120 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AbstractMacroAssembler.h" + struct ImplicitAddress { + ImplicitAddress(RegisterID base) + : base(base) + , offset(0) + { + } + + ImplicitAddress(Address address) + : base(address.base) + , offset(address.offset) + { + } + + RegisterID base; + int32_t offset; + }; + + + + + struct BaseIndex { + BaseIndex(RegisterID base, RegisterID index, Scale scale, int32_t offset = 0) + : base(base) + , index(index) + , scale(scale) + , offset(offset) + { + } + + RegisterID base; + RegisterID index; + Scale scale; + int32_t offset; + }; + + + + + + struct AbsoluteAddress { + explicit AbsoluteAddress(void* ptr) + : m_ptr(ptr) + { + } + + void* m_ptr; + }; + + + + + + + struct TrustedImmPtr { + explicit TrustedImmPtr(const void* value) + : m_value(value) + { + } + + intptr_t asIntptr() + { + return reinterpret_cast(m_value); + } + + const void* m_value; + }; + + struct ImmPtr : public TrustedImmPtr { + explicit ImmPtr(const void* value) + : TrustedImmPtr(value) + { + } + }; + + + + + + + + struct TrustedImm32 { + explicit TrustedImm32(int32_t value) + : m_value(value) + + , m_isPointer(false) + + { + } + + + explicit TrustedImm32(TrustedImmPtr ptr) + : m_value(ptr.asIntptr()) + + , m_isPointer(true) + + { + } + + + int32_t m_value; +# 228 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AbstractMacroAssembler.h" + bool m_isPointer; + + }; + + + struct Imm32 : public TrustedImm32 { + explicit Imm32(int32_t value) + : TrustedImm32(value) + { + } + + explicit Imm32(TrustedImmPtr ptr) + : TrustedImm32(ptr) + { + } + + }; + + struct ImmDouble { + union { + struct { + + + + uint32_t lsb, msb; + + } s; + uint64_t u64; + double d; + } u; + + explicit ImmDouble(double d) { + u.d = d; + } + }; +# 276 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AbstractMacroAssembler.h" + class Label { + template + friend class AbstractMacroAssembler; + friend class Jump; + friend class MacroAssemblerCodeRef; + friend class LinkBuffer; + + public: + Label() + { + } + + Label(AbstractMacroAssembler* masm) + : m_label(masm->m_assembler.label()) + { + } + + bool isUsed() const { return m_label.isUsed(); } + void used() { m_label.used(); } + bool isSet() const { return m_label.isValid(); } + private: + JmpDst m_label; + }; + + + + + + class DataLabelPtr { + template + friend class AbstractMacroAssembler; + friend class LinkBuffer; + public: + DataLabelPtr() + { + } + + DataLabelPtr(AbstractMacroAssembler* masm) + : m_label(masm->m_assembler.label()) + { + } + + bool isSet() const { return m_label.isValid(); } + + private: + JmpDst m_label; + }; + + + + + + class DataLabel32 { + template + friend class AbstractMacroAssembler; + friend class LinkBuffer; + public: + DataLabel32() + { + } + + DataLabel32(AbstractMacroAssembler* masm) + : m_label(masm->m_assembler.label()) + { + } + + private: + JmpDst m_label; + }; + + + + + + + + class Call { + template + friend class AbstractMacroAssembler; + + public: + enum Flags { + None = 0x0, + Linkable = 0x1, + Near = 0x2, + LinkableNear = 0x3 + }; + + Call() + : m_flags(None) + { + } + + Call(JmpSrc jmp, Flags flags) + : m_jmp(jmp) + , m_flags(flags) + { + } + + bool isFlagSet(Flags flag) + { + return !!(m_flags & flag); + } + + static Call fromTailJump(Jump jump) + { + return Call(jump.m_jmp, Linkable); + } + + JmpSrc m_jmp; + private: + Flags m_flags; + }; + + + + + + + + class Jump { + template + friend class AbstractMacroAssembler; + friend class Call; + friend class LinkBuffer; + public: + Jump() + { + } + + Jump(JmpSrc jmp) + : m_jmp(jmp) + { + } + + void link(AbstractMacroAssembler* masm) + { + masm->m_assembler.linkJump(m_jmp, masm->m_assembler.label()); + } + + void linkTo(Label label, AbstractMacroAssembler* masm) + { + masm->m_assembler.linkJump(m_jmp, label.m_label); + } + + private: + JmpSrc m_jmp; + }; + + + + + + class JumpList { + friend class LinkBuffer; + + public: + typedef js::Vector JumpVector; + + JumpList() {} + + JumpList(const JumpList &other) + { + m_jumps.append(other.m_jumps); + } + + JumpList &operator=(const JumpList &other) + { + m_jumps.clear(); + m_jumps.append(other.m_jumps); + return *this; + } + + void link(AbstractMacroAssembler* masm) + { + size_t size = m_jumps.length(); + for (size_t i = 0; i < size; ++i) + m_jumps[i].link(masm); + m_jumps.clear(); + } + + void linkTo(Label label, AbstractMacroAssembler* masm) + { + size_t size = m_jumps.length(); + for (size_t i = 0; i < size; ++i) + m_jumps[i].linkTo(label, masm); + m_jumps.clear(); + } + + void append(Jump jump) + { + m_jumps.append(jump); + } + + void append(const JumpList& other) + { + m_jumps.append(other.m_jumps.begin(), other.m_jumps.length()); + } + + void clear() + { + m_jumps.clear(); + } + + bool empty() + { + return !m_jumps.length(); + } + + const JumpVector& jumps() const { return m_jumps; } + + private: + JumpVector m_jumps; + }; + + + + + static CodePtr trampolineAt(CodeRef ref, Label label) + { + return CodePtr(AssemblerType::getRelocatedAddress(ref.m_code.dataLocation(), label.m_label)); + } + + size_t size() + { + return m_assembler.size(); + } + + unsigned char *buffer() + { + return m_assembler.buffer(); + } + + bool oom() + { + return m_assembler.oom(); + } + + void executableCopy(void* buffer) + { + do { } while(0); + m_assembler.executableCopy(buffer); + } + + Label label() + { + return Label(this); + } + + DataLabel32 dataLabel32() + { + return DataLabel32(this); + } + + Label align() + { + m_assembler.align(16); + return Label(this); + } + + ptrdiff_t differenceBetween(Label from, Jump to) + { + return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_jmp); + } + + ptrdiff_t differenceBetween(Label from, Call to) + { + return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_jmp); + } + + ptrdiff_t differenceBetween(Label from, Label to) + { + return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_label); + } + + ptrdiff_t differenceBetween(Label from, DataLabelPtr to) + { + return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_label); + } + + ptrdiff_t differenceBetween(Label from, DataLabel32 to) + { + return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_label); + } + + ptrdiff_t differenceBetween(DataLabel32 from, Label to) + { + return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_label); + } + + ptrdiff_t differenceBetween(DataLabelPtr from, Label to) + { + return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_label); + } + + ptrdiff_t differenceBetween(DataLabelPtr from, Jump to) + { + return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_jmp); + } + + ptrdiff_t differenceBetween(DataLabelPtr from, DataLabelPtr to) + { + return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_label); + } + + ptrdiff_t differenceBetween(DataLabelPtr from, Call to) + { + return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_jmp); + } + +protected: + AssemblerType m_assembler; + + friend class LinkBuffer; + friend class RepatchBuffer; + + static void linkJump(void* code, Jump jump, CodeLocationLabel target) + { + AssemblerType::linkJump(code, jump.m_jmp, target.dataLocation()); + } + + static void linkPointer(void* code, typename AssemblerType::JmpDst label, void* value) + { + AssemblerType::linkPointer(code, label, value); + } + + static void* getLinkerAddress(void* code, typename AssemblerType::JmpSrc label) + { + return AssemblerType::getRelocatedAddress(code, label); + } + + static void* getLinkerAddress(void* code, typename AssemblerType::JmpDst label) + { + return AssemblerType::getRelocatedAddress(code, label); + } + + static unsigned getLinkerCallReturnOffset(Call call) + { + return AssemblerType::getCallReturnOffset(call.m_jmp); + } + + static void repatchJump(CodeLocationJump jump, CodeLocationLabel destination) + { + AssemblerType::relinkJump(jump.dataLocation(), destination.dataLocation()); + } + + static bool canRepatchJump(CodeLocationJump jump, CodeLocationLabel destination) + { + return AssemblerType::canRelinkJump(jump.dataLocation(), destination.dataLocation()); + } + + static void repatchNearCall(CodeLocationNearCall nearCall, CodeLocationLabel destination) + { + AssemblerType::relinkCall(nearCall.dataLocation(), destination.executableAddress()); + } + + static void repatchInt32(CodeLocationDataLabel32 dataLabel32, int32_t value) + { + AssemblerType::repatchInt32(dataLabel32.dataLocation(), value); + } + + static void repatchPointer(CodeLocationDataLabelPtr dataLabelPtr, void* value) + { + AssemblerType::repatchPointer(dataLabelPtr.dataLocation(), value); + } + + static void repatchLoadPtrToLEA(CodeLocationInstruction instruction) + { + AssemblerType::repatchLoadPtrToLEA(instruction.dataLocation()); + } + + static void repatchLEAToLoadPtr(CodeLocationInstruction instruction) + { + AssemblerType::repatchLEAToLoadPtr(instruction.dataLocation()); + } +}; + +} +# 41 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerARM.h" 2 + +namespace JSC { + +class MacroAssemblerARM : public AbstractMacroAssembler { + static const int DoubleConditionMask = 0x0f; + static const int DoubleConditionBitSpecial = 0x8; +public: + enum Condition { + Equal = ARMAssembler::EQ, + NotEqual = ARMAssembler::NE, + Above = ARMAssembler::HI, + AboveOrEqual = ARMAssembler::CS, + Below = ARMAssembler::CC, + BelowOrEqual = ARMAssembler::LS, + GreaterThan = ARMAssembler::GT, + GreaterThanOrEqual = ARMAssembler::GE, + LessThan = ARMAssembler::LT, + LessThanOrEqual = ARMAssembler::LE, + Overflow = ARMAssembler::VS, + Signed = ARMAssembler::MI, + Zero = ARMAssembler::EQ, + NonZero = ARMAssembler::NE + }; + + enum DoubleCondition { + + DoubleEqual = ARMAssembler::EQ, + DoubleNotEqual = ARMAssembler::NE | DoubleConditionBitSpecial, + DoubleGreaterThan = ARMAssembler::GT, + DoubleGreaterThanOrEqual = ARMAssembler::GE, + DoubleLessThan = ARMAssembler::CC, + DoubleLessThanOrEqual = ARMAssembler::LS, + + DoubleEqualOrUnordered = ARMAssembler::EQ | DoubleConditionBitSpecial, + DoubleNotEqualOrUnordered = ARMAssembler::NE, + DoubleGreaterThanOrUnordered = ARMAssembler::HI, + DoubleGreaterThanOrEqualOrUnordered = ARMAssembler::CS, + DoubleLessThanOrUnordered = ARMAssembler::LT, + DoubleLessThanOrEqualOrUnordered = ARMAssembler::LE + }; + + static const RegisterID stackPointerRegister = ARMRegisters::sp; + static const RegisterID linkRegister = ARMRegisters::lr; + + static const Scale ScalePtr = TimesFour; + static const unsigned int TotalRegisters = 16; + + void add32(RegisterID src, RegisterID dest) + { + m_assembler.adds_r(dest, dest, src); + } + + void add32(TrustedImm32 imm, Address address) + { + load32(address, ARMRegisters::S1); + add32(imm, ARMRegisters::S1); + store32(ARMRegisters::S1, address); + } + + void add32(TrustedImm32 imm, RegisterID dest) + { + m_assembler.adds_r(dest, dest, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); + } + + void add32(Address src, RegisterID dest) + { + load32(src, ARMRegisters::S1); + add32(ARMRegisters::S1, dest); + } + + void and32(Address src, RegisterID dest) + { + load32(src, ARMRegisters::S1); + and32(ARMRegisters::S1, dest); + } + + void and32(RegisterID src, RegisterID dest) + { + m_assembler.ands_r(dest, dest, src); + } + + void and32(Imm32 imm, RegisterID dest) + { + ARMWord w = m_assembler.getImm(imm.m_value, ARMRegisters::S0, true); + if (w & ARMAssembler::OP2_INV_IMM) + m_assembler.bics_r(dest, dest, w & ~ARMAssembler::OP2_INV_IMM); + else + m_assembler.ands_r(dest, dest, w); + } + + void lshift32(RegisterID shift_amount, RegisterID dest) + { + ARMWord w = ARMAssembler::getOp2(0x1f); + do { } while(0); + m_assembler.and_r(ARMRegisters::S0, shift_amount, w); + + m_assembler.movs_r(dest, m_assembler.lsl_r(dest, ARMRegisters::S0)); + } + + void lshift32(Imm32 imm, RegisterID dest) + { + m_assembler.movs_r(dest, m_assembler.lsl(dest, imm.m_value & 0x1f)); + } + + void mul32(RegisterID src, RegisterID dest) + { + if (src == dest) { + move(src, ARMRegisters::S0); + src = ARMRegisters::S0; + } + m_assembler.muls_r(dest, dest, src); + } + + void mul32(Imm32 imm, RegisterID src, RegisterID dest) + { + move(imm, ARMRegisters::S0); + m_assembler.muls_r(dest, src, ARMRegisters::S0); + } + + void neg32(RegisterID srcDest) + { + m_assembler.rsbs_r(srcDest, srcDest, ARMAssembler::getOp2(0)); + } + + void not32(RegisterID dest) + { + m_assembler.mvns_r(dest, dest); + } + + void or32(RegisterID src, RegisterID dest) + { + m_assembler.orrs_r(dest, dest, src); + } + + void or32(TrustedImm32 imm, RegisterID dest) + { + m_assembler.orrs_r(dest, dest, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); + } + + void rshift32(RegisterID shift_amount, RegisterID dest) + { + ARMWord w = ARMAssembler::getOp2(0x1f); + do { } while(0); + m_assembler.and_r(ARMRegisters::S0, shift_amount, w); + + m_assembler.movs_r(dest, m_assembler.asr_r(dest, ARMRegisters::S0)); + } + + void rshift32(Imm32 imm, RegisterID dest) + { + m_assembler.movs_r(dest, m_assembler.asr(dest, imm.m_value & 0x1f)); + } + + void urshift32(RegisterID shift_amount, RegisterID dest) + { + ARMWord w = ARMAssembler::getOp2(0x1f); + do { } while(0); + m_assembler.and_r(ARMRegisters::S0, shift_amount, w); + + m_assembler.movs_r(dest, m_assembler.lsr_r(dest, ARMRegisters::S0)); + } + + void urshift32(Imm32 imm, RegisterID dest) + { + m_assembler.movs_r(dest, m_assembler.lsr(dest, imm.m_value & 0x1f)); + } + + void sub32(RegisterID src, RegisterID dest) + { + m_assembler.subs_r(dest, dest, src); + } + + void sub32(TrustedImm32 imm, RegisterID dest) + { + m_assembler.subs_r(dest, dest, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); + } + + void sub32(TrustedImm32 imm, Address address) + { + load32(address, ARMRegisters::S1); + sub32(imm, ARMRegisters::S1); + store32(ARMRegisters::S1, address); + } + + void sub32(Address src, RegisterID dest) + { + load32(src, ARMRegisters::S1); + sub32(ARMRegisters::S1, dest); + } + + void or32(Address address, RegisterID dest) + { + load32(address, ARMRegisters::S1); + or32(ARMRegisters::S1, dest); + } + + void xor32(RegisterID src, RegisterID dest) + { + m_assembler.eors_r(dest, dest, src); + } + + void xor32(TrustedImm32 imm, RegisterID dest) + { + m_assembler.eors_r(dest, dest, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); + } + + void xor32(Address src, RegisterID dest) + { + load32(src, ARMRegisters::S1); + m_assembler.eors_r(dest, dest, ARMRegisters::S1); + } + + void load8SignExtend(ImplicitAddress address, RegisterID dest) + { + m_assembler.dataTransferN(true, true, 8, dest, address.base, address.offset); + } + + void load8ZeroExtend(ImplicitAddress address, RegisterID dest) + { + m_assembler.dataTransferN(true, false, 8, dest, address.base, address.offset); + } + + void load8SignExtend(BaseIndex address, RegisterID dest) + { + m_assembler.baseIndexTransferN(true, true, 8, dest, + address.base, address.index, address.scale, address.offset); + } + + void load8ZeroExtend(BaseIndex address, RegisterID dest) + { + m_assembler.baseIndexTransferN(true, false, 8, dest, + address.base, address.index, address.scale, address.offset); + } + + + void load8(ImplicitAddress address, RegisterID dest) + { + load8ZeroExtend(address, dest); + } + + void load16SignExtend(ImplicitAddress address, RegisterID dest) + { + m_assembler.dataTransferN(true, true, 16, dest, address.base, address.offset); + } + + void load16ZeroExtend(ImplicitAddress address, RegisterID dest) + { + m_assembler.dataTransferN(true, false, 16, dest, address.base, address.offset); + } + void load16SignExtend(BaseIndex address, RegisterID dest) + { + m_assembler.baseIndexTransferN(true, true, 16, dest, + address.base, address.index, address.scale, address.offset); + } + void load16ZeroExtend(BaseIndex address, RegisterID dest) + { + m_assembler.baseIndexTransferN(true, false, 16, dest, + address.base, address.index, address.scale, address.offset); + } + + void load32(ImplicitAddress address, RegisterID dest) + { + m_assembler.dataTransfer32(true, dest, address.base, address.offset); + } + + void load32(BaseIndex address, RegisterID dest) + { + m_assembler.baseIndexTransfer32(true, dest, address.base, address.index, static_cast(address.scale), address.offset); + } + + + + + void load32WithUnalignedHalfWords(BaseIndex address, RegisterID dest) + { + load32(address, dest); + } + + + DataLabel32 load32WithAddressOffsetPatch(Address address, RegisterID dest) + { + do { } while(0); + DataLabel32 dataLabel(this); + m_assembler.ldr_un_imm(ARMRegisters::S0, 0); + m_assembler.dtr_ur(true, dest, address.base, ARMRegisters::S0); + return dataLabel; + } + + DataLabel32 load64WithAddressOffsetPatch(Address address, RegisterID hi, RegisterID lo) + { + do { } while(0); + do { } while(0); + DataLabel32 dataLabel(this); + m_assembler.ldr_un_imm(ARMRegisters::S0, 0); + m_assembler.add_r(ARMRegisters::S0, ARMRegisters::S0, address.base); + m_assembler.dtr_u(true, lo, ARMRegisters::S0, 0); + m_assembler.dtr_u(true, hi, ARMRegisters::S0, 4); + return dataLabel; + } + + Label loadPtrWithPatchToLEA(Address address, RegisterID dest) + { + Label label(this); + load32(address, dest); + return label; + } + + void load16(BaseIndex address, RegisterID dest) + { + m_assembler.add_r(ARMRegisters::S1, address.base, m_assembler.lsl(address.index, address.scale)); + load16(Address(ARMRegisters::S1, address.offset), dest); + } + + void load16(ImplicitAddress address, RegisterID dest) + { + if (address.offset >= 0) + m_assembler.ldrh_u(dest, address.base, m_assembler.getOffsetForHalfwordDataTransfer(address.offset, ARMRegisters::S0)); + else + m_assembler.ldrh_d(dest, address.base, m_assembler.getOffsetForHalfwordDataTransfer(-address.offset, ARMRegisters::S0)); + } + + DataLabel32 store32WithAddressOffsetPatch(RegisterID src, Address address) + { + do { } while(0); + DataLabel32 dataLabel(this); + m_assembler.ldr_un_imm(ARMRegisters::S0, 0); + m_assembler.dtr_ur(false, src, address.base, ARMRegisters::S0); + return dataLabel; + } + + DataLabel32 store64WithAddressOffsetPatch(RegisterID hi, RegisterID lo, Address address) + { + do { } while(0); + do { } while(0); + do { } while(0); + DataLabel32 dataLabel(this); + m_assembler.ldr_un_imm(ARMRegisters::S0, address.offset); + m_assembler.add_r(ARMRegisters::S0, ARMRegisters::S0, address.base); + m_assembler.dtr_u(false, lo, ARMRegisters::S0, 0); + m_assembler.dtr_u(false, hi, ARMRegisters::S0, 4); + return dataLabel; + } + + DataLabel32 store64WithAddressOffsetPatch(Imm32 hi, RegisterID lo, Address address) + { + do { } while(0); + do { } while(0); + do { } while(0); + do { } while(0); + do { } while(0); + DataLabel32 dataLabel(this); + m_assembler.ldr_un_imm(ARMRegisters::S0, address.offset); + m_assembler.moveImm(hi.m_value, ARMRegisters::S1); + m_assembler.add_r(ARMRegisters::S0, ARMRegisters::S0, address.base); + m_assembler.dtr_u(false, lo, ARMRegisters::S0, 0); + m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 4); + return dataLabel; + } + + DataLabel32 store64WithAddressOffsetPatch(Imm32 hi, Imm32 lo, Address address) + { + do { } while(0); + do { } while(0); + DataLabel32 dataLabel(this); + m_assembler.ldr_un_imm(ARMRegisters::S0, address.offset); + m_assembler.add_r(ARMRegisters::S0, ARMRegisters::S0, address.base); + m_assembler.moveImm(lo.m_value, ARMRegisters::S1); + m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 0); + + m_assembler.moveImm(hi.m_value, ARMRegisters::S1); + m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 4); + return dataLabel; + } + + void store32(RegisterID src, ImplicitAddress address) + { + m_assembler.dataTransfer32(false, src, address.base, address.offset); + } + + void store32(RegisterID src, BaseIndex address) + { + m_assembler.baseIndexTransfer32(false, src, address.base, address.index, static_cast(address.scale), address.offset); + } + + void store32(TrustedImm32 imm, BaseIndex address) + { + if (imm.m_isPointer) + m_assembler.ldr_un_imm(ARMRegisters::S1, imm.m_value); + else + move(imm, ARMRegisters::S1); + store32(ARMRegisters::S1, address); + } + + void store32(TrustedImm32 imm, ImplicitAddress address) + { + if (imm.m_isPointer) + m_assembler.ldr_un_imm(ARMRegisters::S1, imm.m_value); + else + move(imm, ARMRegisters::S1); + store32(ARMRegisters::S1, address); + } + + void store32(RegisterID src, void* address) + { + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); + m_assembler.dtr_u(false, src, ARMRegisters::S0, 0); + } + + void store32(TrustedImm32 imm, void* address) + { + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); + if (imm.m_isPointer) + m_assembler.ldr_un_imm(ARMRegisters::S1, imm.m_value); + else + m_assembler.moveImm(imm.m_value, ARMRegisters::S1); + m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 0); + } + + void store16(RegisterID src, ImplicitAddress address) + { + m_assembler.dataTransferN(false, false, 16, src, address.base, address.offset); + } + void store16(RegisterID src, BaseIndex address) + { + m_assembler.baseIndexTransferN(false, false, 16, src, address.base, address.index, static_cast(address.scale), address.offset); + } + + void store16(TrustedImm32 imm, BaseIndex address) + { + if (imm.m_isPointer) + do { } while(0); + else + move(imm, ARMRegisters::S1); + store16(ARMRegisters::S1, address); + } + void store16(TrustedImm32 imm, ImplicitAddress address) + { + if (imm.m_isPointer) + do { } while(0); + else + move(imm, ARMRegisters::S1); + store16(ARMRegisters::S1, address); + } + + void store16(RegisterID src, void* address) + { + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); + m_assembler.mem_imm_off(false, false, 16, true, src, ARMRegisters::S0, 0); + } + + void store16(TrustedImm32 imm, void* address) + { + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); + if (imm.m_isPointer) + do { } while(0); + else + m_assembler.moveImm(imm.m_value, ARMRegisters::S1); + m_assembler.mem_imm_off(false, false, 16, true, ARMRegisters::S1, ARMRegisters::S0, 0); + } + + void store8(RegisterID src, ImplicitAddress address) + { + m_assembler.dataTransferN(false, false, 16, src, address.base, address.offset); + } + + void store8(RegisterID src, BaseIndex address) + { + m_assembler.baseIndexTransferN(false, false, 8, src, address.base, address.index, static_cast(address.scale), address.offset); + } + + void store8(TrustedImm32 imm, BaseIndex address) + { + if (imm.m_isPointer) + do { } while(0); + else + move(imm, ARMRegisters::S1); + store8(ARMRegisters::S1, address); + } + + void store8(TrustedImm32 imm, ImplicitAddress address) + { + if (imm.m_isPointer) + do { } while(0); + else + move(imm, ARMRegisters::S1); + store8(ARMRegisters::S1, address); + } + + void store8(RegisterID src, void* address) + { + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); + m_assembler.mem_imm_off(false, false, 8, true, src, ARMRegisters::S0, 0); + } + + void store8(TrustedImm32 imm, void* address) + { + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); + if (imm.m_isPointer) + do { } while(0); + else + m_assembler.moveImm(imm.m_value, ARMRegisters::S1); + m_assembler.mem_imm_off(false, false, 8, true, ARMRegisters::S1, ARMRegisters::S0, 0); + } + + void pop(RegisterID dest) + { + m_assembler.pop_r(dest); + } + + void push(RegisterID src) + { + m_assembler.push_r(src); + } + + void push(Address address) + { + load32(address, ARMRegisters::S1); + push(ARMRegisters::S1); + } + + void push(Imm32 imm) + { + move(imm, ARMRegisters::S0); + push(ARMRegisters::S0); + } + + void move(TrustedImm32 imm, RegisterID dest) + { + if (imm.m_isPointer) + m_assembler.ldr_un_imm(dest, imm.m_value); + else + m_assembler.moveImm(imm.m_value, dest); + } + + void move(RegisterID src, RegisterID dest) + { + m_assembler.mov_r(dest, src); + } + + void move(TrustedImmPtr imm, RegisterID dest) + { + move(Imm32(imm), dest); + } + + void swap(RegisterID reg1, RegisterID reg2) + { + m_assembler.mov_r(ARMRegisters::S0, reg1); + m_assembler.mov_r(reg1, reg2); + m_assembler.mov_r(reg2, ARMRegisters::S0); + } + + void signExtend32ToPtr(RegisterID src, RegisterID dest) + { + if (src != dest) + move(src, dest); + } + + void zeroExtend32ToPtr(RegisterID src, RegisterID dest) + { + if (src != dest) + move(src, dest); + } + + Jump branch8(Condition cond, Address left, Imm32 right) + { + load8(left, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); + } + + Jump branch32(Condition cond, RegisterID left, RegisterID right, int useConstantPool = 0) + { + m_assembler.cmp_r(left, right); + return Jump(m_assembler.jmp(ARMCondition(cond), useConstantPool)); + } + + Jump branch32(Condition cond, RegisterID left, TrustedImm32 right, int useConstantPool = 0) + { + do { } while(0); + if (right.m_isPointer) { + m_assembler.ldr_un_imm(ARMRegisters::S0, right.m_value); + m_assembler.cmp_r(left, ARMRegisters::S0); + } else { + + + + + + + ARMWord arg = m_assembler.getOp2(right.m_value); + if (arg != m_assembler.INVALID_IMM) { + m_assembler.cmp_r(left, arg); + } else { + + + arg = m_assembler.getOp2(-right.m_value); + if (arg != m_assembler.INVALID_IMM) { + m_assembler.cmn_r(left, arg); + } else { + + + + m_assembler.cmp_r(left, m_assembler.getImm(right.m_value, ARMRegisters::S0)); + } + } + } + return Jump(m_assembler.jmp(ARMCondition(cond), useConstantPool)); + } + + + + + + Jump branch32FixedLength(Condition cond, RegisterID left, TrustedImm32 right) + { + m_assembler.ldr_un_imm(ARMRegisters::S1, right.m_value); + return branch32(cond, left, ARMRegisters::S1, true); + } + + + Jump branch32WithPatch(Condition cond, RegisterID left, TrustedImm32 right, DataLabel32 &dataLabel) + { + do { } while(0); + dataLabel = moveWithPatch(right, ARMRegisters::S1); + return branch32(cond, left, ARMRegisters::S1, true); + } + + Jump branch32WithPatch(Condition cond, Address left, TrustedImm32 right, DataLabel32 &dataLabel) + { + do { } while(0); + load32(left, ARMRegisters::S1); + dataLabel = moveWithPatch(right, ARMRegisters::S0); + return branch32(cond, ARMRegisters::S1, ARMRegisters::S0, true); + } + + Jump branch32(Condition cond, RegisterID left, Address right) + { + + load32(right, ARMRegisters::S1); + return branch32(cond, left, ARMRegisters::S1); + } + + Jump branch32(Condition cond, Address left, RegisterID right) + { + load32(left, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); + } + + Jump branch32(Condition cond, Address left, TrustedImm32 right) + { + load32(left, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); + } + + Jump branch32(Condition cond, BaseIndex left, TrustedImm32 right) + { + load32(left, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); + } + + Jump branch32WithUnalignedHalfWords(Condition cond, BaseIndex left, TrustedImm32 right) + { + load32WithUnalignedHalfWords(left, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); + } + + Jump branch16(Condition cond, BaseIndex left, RegisterID right) + { + (void)(cond); + (void)(left); + (void)(right); + __builtin_unreachable(); + return jump(); + } + + Jump branch16(Condition cond, BaseIndex left, Imm32 right) + { + load16(left, ARMRegisters::S0); + move(right, ARMRegisters::S1); + m_assembler.cmp_r(ARMRegisters::S0, ARMRegisters::S1); + return m_assembler.jmp(ARMCondition(cond)); + } + + Jump branchTest8(Condition cond, Address address, Imm32 mask = Imm32(-1)) + { + load8(address, ARMRegisters::S1); + return branchTest32(cond, ARMRegisters::S1, mask); + } + + Jump branchTest32(Condition cond, RegisterID reg, RegisterID mask) + { + do { } while(0); + m_assembler.tst_r(reg, mask); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchTest32(Condition cond, RegisterID reg, Imm32 mask = Imm32(-1)) + { + do { } while(0); + ARMWord w = m_assembler.getImm(mask.m_value, ARMRegisters::S0, true); + if (w & ARMAssembler::OP2_INV_IMM) + m_assembler.bics_r(ARMRegisters::S0, reg, w & ~ARMAssembler::OP2_INV_IMM); + else + m_assembler.tst_r(reg, w); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchTest32(Condition cond, Address address, Imm32 mask = Imm32(-1)) + { + load32(address, ARMRegisters::S1); + return branchTest32(cond, ARMRegisters::S1, mask); + } + + Jump branchTest32(Condition cond, BaseIndex address, Imm32 mask = Imm32(-1)) + { + load32(address, ARMRegisters::S1); + return branchTest32(cond, ARMRegisters::S1, mask); + } + + Jump jump() + { + return Jump(m_assembler.jmp()); + } + + void jump(RegisterID target) + { + m_assembler.bx(target); + } + + void jump(Address address) + { + load32(address, ARMRegisters::pc); + } + + Jump branchAdd32(Condition cond, RegisterID src, RegisterID dest) + { + do { } while(0); + add32(src, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchAdd32(Condition cond, Imm32 imm, RegisterID dest) + { + do { } while(0); + add32(imm, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchAdd32(Condition cond, Address src, RegisterID dest) + { + do { } while(0); + add32(src, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + void mull32(RegisterID src1, RegisterID src2, RegisterID dest) + { + if (src1 == dest) { + move(src1, ARMRegisters::S0); + src1 = ARMRegisters::S0; + } + m_assembler.mull_r(ARMRegisters::S1, dest, src2, src1); + m_assembler.cmp_r(ARMRegisters::S1, m_assembler.asr(dest, 31)); + } + + Jump branchMul32(Condition cond, RegisterID src, RegisterID dest) + { + do { } while(0); + if (cond == Overflow) { + mull32(src, dest, dest); + cond = NonZero; + } + else + mul32(src, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchMul32(Condition cond, Imm32 imm, RegisterID src, RegisterID dest) + { + do { } while(0); + if (cond == Overflow) { + move(imm, ARMRegisters::S0); + mull32(ARMRegisters::S0, src, dest); + cond = NonZero; + } + else + mul32(imm, src, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchSub32(Condition cond, RegisterID src, RegisterID dest) + { + do { } while(0); + sub32(src, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchSub32(Condition cond, Imm32 imm, RegisterID dest) + { + do { } while(0); + sub32(imm, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchSub32(Condition cond, Address src, RegisterID dest) + { + do { } while(0); + sub32(src, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchSub32(Condition cond, Imm32 imm, Address dest) + { + do { } while(0); + sub32(imm, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchNeg32(Condition cond, RegisterID srcDest) + { + do { } while(0); + neg32(srcDest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchOr32(Condition cond, RegisterID src, RegisterID dest) + { + do { } while(0); + or32(src, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + + + void nop(int tag) + { + do { } while(0); + m_assembler.mov_r(tag, tag); + } + + void breakpoint() + { + m_assembler.bkpt(0); + } + + Call nearCall() + { + + Call call(m_assembler.loadBranchTarget(ARMRegisters::S1, ARMAssembler::AL, true), Call::LinkableNear); + m_assembler.blx(ARMRegisters::S1); + return call; + + + + + } + + Call call(RegisterID target) + { + m_assembler.blx(target); + JmpSrc jmpSrc; + return Call(jmpSrc, Call::None); + } + + void call(Address address) + { + call32(address.base, address.offset); + } + + void ret() + { + m_assembler.bx(linkRegister); + } + + void set32(Condition cond, Address left, RegisterID right, RegisterID dest) + { + load32(left, ARMRegisters::S1); + set32(cond, ARMRegisters::S1, right, dest); + } + + void set32(Condition cond, RegisterID left, Address right, RegisterID dest) + { + load32(right, ARMRegisters::S1); + set32(cond, left, ARMRegisters::S1, dest); + } + + void set32(Condition cond, RegisterID left, RegisterID right, RegisterID dest) + { + m_assembler.cmp_r(left, right); + m_assembler.mov_r(dest, ARMAssembler::getOp2(0)); + m_assembler.mov_r(dest, ARMAssembler::getOp2(1), ARMCondition(cond)); + } + + void set32(Condition cond, RegisterID left, Imm32 right, RegisterID dest) + { + m_assembler.cmp_r(left, m_assembler.getImm(right.m_value, ARMRegisters::S0)); + m_assembler.mov_r(dest, ARMAssembler::getOp2(0)); + m_assembler.mov_r(dest, ARMAssembler::getOp2(1), ARMCondition(cond)); + } + + void set32(Condition cond, Address left, Imm32 right, RegisterID dest) + { + load32(left, ARMRegisters::S1); + set32(cond, ARMRegisters::S1, right, dest); + } + + void set8(Condition cond, RegisterID left, RegisterID right, RegisterID dest) + { + + set32(cond, left, right, dest); + } + + void set8(Condition cond, Address left, RegisterID right, RegisterID dest) + { + + load32(left, ARMRegisters::S1); + set32(cond, ARMRegisters::S1, right, dest); + } + + void set8(Condition cond, RegisterID left, Imm32 right, RegisterID dest) + { + + set32(cond, left, right, dest); + } + + void setTest32(Condition cond, Address address, Imm32 mask, RegisterID dest) + { + load32(address, ARMRegisters::S1); + if (mask.m_value == -1) + m_assembler.cmp_r(0, ARMRegisters::S1); + else + m_assembler.tst_r(ARMRegisters::S1, m_assembler.getImm(mask.m_value, ARMRegisters::S0)); + m_assembler.mov_r(dest, ARMAssembler::getOp2(0)); + m_assembler.mov_r(dest, ARMAssembler::getOp2(1), ARMCondition(cond)); + } + + void setTest8(Condition cond, Address address, Imm32 mask, RegisterID dest) + { + + setTest32(cond, address, mask, dest); + } + + void add32(TrustedImm32 imm, RegisterID src, RegisterID dest) + { + m_assembler.add_r(dest, src, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); + } + + void lea(Address address, RegisterID dest) + { + m_assembler.add_r(dest, address.base, m_assembler.getImm(address.offset, ARMRegisters::S0)); + } + + void lea(BaseIndex address, RegisterID dest) + { + + move(address.index, ARMRegisters::S1); + if (address.scale != 0) + lshift32(Imm32(address.scale), ARMRegisters::S1); + if (address.offset) + add32(Imm32(address.offset), ARMRegisters::S1); + add32(address.base, ARMRegisters::S1); + move(ARMRegisters::S1, dest); + } + + void add32(TrustedImm32 imm, AbsoluteAddress address) + { + m_assembler.ldr_un_imm(ARMRegisters::S1, reinterpret_cast(address.m_ptr)); + m_assembler.dtr_u(true, ARMRegisters::S1, ARMRegisters::S1, 0); + add32(imm, ARMRegisters::S1); + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address.m_ptr)); + m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 0); + } + + void sub32(TrustedImm32 imm, AbsoluteAddress address) + { + m_assembler.ldr_un_imm(ARMRegisters::S1, reinterpret_cast(address.m_ptr)); + m_assembler.dtr_u(true, ARMRegisters::S1, ARMRegisters::S1, 0); + sub32(imm, ARMRegisters::S1); + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address.m_ptr)); + m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 0); + } + + void load32(void* address, RegisterID dest) + { + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); + m_assembler.dtr_u(true, dest, ARMRegisters::S0, 0); + } + + Jump branch32(Condition cond, AbsoluteAddress left, RegisterID right) + { + load32(left.m_ptr, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); + } + + Jump branch32(Condition cond, AbsoluteAddress left, TrustedImm32 right) + { + load32(left.m_ptr, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); + } + + Call call() + { + + Call call(m_assembler.loadBranchTarget(ARMRegisters::S1, ARMAssembler::AL, true), Call::Linkable); + m_assembler.blx(ARMRegisters::S1); + return call; + + + + + } + + Call tailRecursiveCall() + { + return Call::fromTailJump(jump()); + } + + Call makeTailRecursiveCall(Jump oldJump) + { + return Call::fromTailJump(oldJump); + } + + DataLabelPtr moveWithPatch(TrustedImmPtr initialValue, RegisterID dest) + { + DataLabelPtr dataLabel(this); + m_assembler.ldr_un_imm(dest, reinterpret_cast(initialValue.m_value)); + return dataLabel; + } + + DataLabel32 moveWithPatch(TrustedImm32 initialValue, RegisterID dest) + { + DataLabel32 dataLabel(this); + m_assembler.ldr_un_imm(dest, initialValue.m_value); + return dataLabel; + } + + Jump branchPtrWithPatch(Condition cond, RegisterID left, DataLabelPtr& dataLabel, ImmPtr initialRightValue = ImmPtr(0)) + { + dataLabel = moveWithPatch(initialRightValue, ARMRegisters::S1); + Jump jump = branch32(cond, left, ARMRegisters::S1, true); + return jump; + } + + Jump branchPtrWithPatch(Condition cond, Address left, DataLabelPtr& dataLabel, ImmPtr initialRightValue = ImmPtr(0)) + { + load32(left, ARMRegisters::S1); + dataLabel = moveWithPatch(initialRightValue, ARMRegisters::S0); + Jump jump = branch32(cond, ARMRegisters::S0, ARMRegisters::S1, true); + return jump; + } + + DataLabelPtr storePtrWithPatch(TrustedImmPtr initialValue, ImplicitAddress address) + { + DataLabelPtr dataLabel = moveWithPatch(initialValue, ARMRegisters::S1); + store32(ARMRegisters::S1, address); + return dataLabel; + } + + DataLabelPtr storePtrWithPatch(ImplicitAddress address) + { + return storePtrWithPatch(ImmPtr(0), address); + } + + + bool supportsFloatingPoint() const + { + return s_isVFPPresent; + } + + bool supportsFloatingPointTruncate() const + { + return true; + } + + bool supportsFloatingPointSqrt() const + { + return s_isVFPPresent; + } + + void moveDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.fcpyd_r(dest, src); + } + + void loadDouble(ImplicitAddress address, FPRegisterID dest) + { + + m_assembler.doubleTransfer(true, dest, address.base, address.offset); + } + + void loadDouble(BaseIndex address, FPRegisterID dest) + { + m_assembler.baseIndexFloatTransfer(true, true, dest, + address.base, address.index, + address.scale, address.offset); + } + + DataLabelPtr loadDouble(const void* address, FPRegisterID dest) + { + DataLabelPtr label = moveWithPatch(ImmPtr(address), ARMRegisters::S0); + m_assembler.doubleTransfer(true, dest, ARMRegisters::S0, 0); + return label; + } + + void fastLoadDouble(RegisterID lo, RegisterID hi, FPRegisterID fpReg) { + m_assembler.vmov64(false, true, lo, hi, fpReg); + } + + void loadFloat(ImplicitAddress address, FPRegisterID dest) + { + + dest = (FPRegisterID) (dest * 2); + do { } while(0); + m_assembler.floatTransfer(true, dest, address.base, address.offset); + m_assembler.vcvt(m_assembler.FloatReg32, m_assembler.FloatReg64, (FPRegisterID)(dest*2), dest); + } + void loadFloat(BaseIndex address, FPRegisterID dest) + { + m_assembler.baseIndexFloatTransfer(true, false, (FPRegisterID)(dest*2), + address.base, address.index, + address.scale, address.offset); + m_assembler.vcvt(m_assembler.FloatReg32, m_assembler.FloatReg64, (FPRegisterID)(dest*2), dest); + } + + DataLabelPtr loadFloat(const void* address, FPRegisterID dest) + { + DataLabelPtr label = moveWithPatch(ImmPtr(address), ARMRegisters::S0); + m_assembler.fmem_imm_off(true, false, true, (FPRegisterID)(dest*2), ARMRegisters::S0, 0); + m_assembler.vcvt(m_assembler.FloatReg32, m_assembler.FloatReg64, (FPRegisterID)(dest*2), dest); + return label; + } + + void storeDouble(FPRegisterID src, ImplicitAddress address) + { + + m_assembler.doubleTransfer(false, src, address.base, address.offset); + } + + void storeDouble(FPRegisterID src, BaseIndex address) + { + m_assembler.baseIndexFloatTransfer(false, true, src, + address.base, address.index, + address.scale, address.offset); + } + + void storeDouble(ImmDouble imm, Address address) + { + store32(Imm32(imm.u.s.lsb), address); + store32(Imm32(imm.u.s.msb), Address(address.base, address.offset + 4)); + } + + void storeDouble(ImmDouble imm, BaseIndex address) + { + store32(Imm32(imm.u.s.lsb), address); + store32(Imm32(imm.u.s.msb), + BaseIndex(address.base, address.index, address.scale, address.offset + 4)); + } + void fastStoreDouble(FPRegisterID fpReg, RegisterID lo, RegisterID hi) { + m_assembler.vmov64(true, true, lo, hi, fpReg); + } + + void storeFloat(FPRegisterID src, ImplicitAddress address) + { + m_assembler.floatTransfer(false, src, address.base, address.offset); + } + + void storeFloat(FPRegisterID src, BaseIndex address) + { + m_assembler.baseIndexFloatTransfer(false, false, src, + address.base, address.index, + address.scale, address.offset); + } + void storeFloat(ImmDouble imm, Address address) + { + union { + float f; + uint32_t u32; + } u; + u.f = imm.u.d; + store32(Imm32(u.u32), address); + } + + void storeFloat(ImmDouble imm, BaseIndex address) + { + union { + float f; + uint32_t u32; + } u; + u.f = imm.u.d; + store32(Imm32(u.u32), address); + } + + void addDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.faddd_r(dest, dest, src); + } + + void addDouble(Address src, FPRegisterID dest) + { + loadDouble(src, ARMRegisters::SD0); + addDouble(ARMRegisters::SD0, dest); + } + + void divDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.fdivd_r(dest, dest, src); + } + + void divDouble(Address src, FPRegisterID dest) + { + __builtin_unreachable(); + loadDouble(src, ARMRegisters::SD0); + divDouble(ARMRegisters::SD0, dest); + } + + void subDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.fsubd_r(dest, dest, src); + } + + void subDouble(Address src, FPRegisterID dest) + { + loadDouble(src, ARMRegisters::SD0); + subDouble(ARMRegisters::SD0, dest); + } + + void mulDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.fmuld_r(dest, dest, src); + } + + void mulDouble(Address src, FPRegisterID dest) + { + loadDouble(src, ARMRegisters::SD0); + mulDouble(ARMRegisters::SD0, dest); + } + + void negDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.fnegd_r(dest, src); + } + + void absDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.fabsd_r(dest, src); + } + + void sqrtDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.fsqrtd_r(dest, src); + } + + void convertInt32ToDouble(RegisterID src, FPRegisterID dest) + { + m_assembler.fmsr_r(floatShadow(dest), src); + m_assembler.fsitod_r(dest, floatShadow(dest)); + } + + void convertUInt32ToDouble(RegisterID src, FPRegisterID dest) + { + m_assembler.fmsr_r(floatShadow(dest), src); + m_assembler.fuitod_r(dest, floatShadow(dest)); + } + + void convertInt32ToDouble(Address src, FPRegisterID dest) + { + + load32(src, ARMRegisters::S1); + convertInt32ToDouble(ARMRegisters::S1, dest); + } + + void convertInt32ToDouble(AbsoluteAddress src, FPRegisterID dest) + { + __builtin_unreachable(); + + m_assembler.ldr_un_imm(ARMRegisters::S1, (ARMWord)src.m_ptr); + m_assembler.dtr_u(true, ARMRegisters::S1, ARMRegisters::S1, 0); + convertInt32ToDouble(ARMRegisters::S1, dest); + } + + void convertDoubleToFloat(FPRegisterID src, FPRegisterID dest) + { + m_assembler.vcvt(m_assembler.FloatReg64, m_assembler.FloatReg32, src, dest); + } + + Jump branchDouble(DoubleCondition cond, FPRegisterID left, FPRegisterID right) + { + m_assembler.fcmpd_r(left, right); + m_assembler.fmstat(); + if (cond & DoubleConditionBitSpecial) + m_assembler.cmp_r(ARMRegisters::S0, ARMRegisters::S0, ARMAssembler::VS); + return Jump(m_assembler.jmp(static_cast(cond & ~DoubleConditionMask))); + } + + + + + Jump branchTruncateDoubleToInt32(FPRegisterID src, RegisterID dest) + { + m_assembler.ftosizd_r(floatShadow(ARMRegisters::SD0), src); + + + + m_assembler.fmrs_r(dest, floatShadow(ARMRegisters::SD0)); + m_assembler.cmn_r(dest, ARMAssembler::getOp2(-0x7fffffff)); + m_assembler.cmp_r(dest, ARMAssembler::getOp2(0x80000000), ARMCondition(NonZero)); + return Jump(m_assembler.jmp(ARMCondition(Zero))); + } + + + + + + void branchConvertDoubleToInt32(FPRegisterID src, RegisterID dest, JumpList& failureCases, FPRegisterID fpTemp) + { + m_assembler.ftosid_r(floatShadow(ARMRegisters::SD0), src); + m_assembler.fmrs_r(dest, floatShadow(ARMRegisters::SD0)); + + + m_assembler.fsitod_r(ARMRegisters::SD0, floatShadow(ARMRegisters::SD0)); + failureCases.append(branchDouble(DoubleNotEqualOrUnordered, src, ARMRegisters::SD0)); + + + failureCases.append(branchTest32(Zero, dest)); + } + + void zeroDouble(FPRegisterID srcDest) + { + m_assembler.mov_r(ARMRegisters::S0, ARMAssembler::getOp2(0)); + convertInt32ToDouble(ARMRegisters::S0, srcDest); + } + + void ensureSpace(int space) + { + m_assembler.ensureSpace(space); + } + + void forceFlushConstantPool() + { + m_assembler.forceFlushConstantPool(); + } + + int flushCount() + { + return m_assembler.flushCount(); + } + +protected: + ARMAssembler::Condition ARMCondition(Condition cond) + { + return static_cast(cond); + } + + void ensureSpace(int insnSpace, int constSpace) + { + m_assembler.ensureSpace(insnSpace, constSpace); + } + + int sizeOfConstantPool() + { + return m_assembler.sizeOfConstantPool(); + } +# 1460 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerARM.h" + void call32(RegisterID base, int32_t offset) + { + + if (base == ARMRegisters::sp) + offset += 4; +# 1480 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerARM.h" + if (offset >= 0) { + if (offset <= 0xfff) { + m_assembler.dtr_u(true, ARMRegisters::S0, base, offset); + } else if (offset <= 0xfffff) { + m_assembler.add_r(ARMRegisters::S0, base, ARMAssembler::OP2_IMM | (offset >> 12) | (10 << 8)); + m_assembler.dtr_u(true, ARMRegisters::S0, ARMRegisters::S0, offset & 0xfff); + } else { + m_assembler.moveImm(offset, ARMRegisters::S0); + m_assembler.dtr_ur(true, ARMRegisters::S0, base, ARMRegisters::S0); + } + } else { + offset = -offset; + if (offset <= 0xfff) { + m_assembler.dtr_d(true, ARMRegisters::S0, base, offset); + } else if (offset <= 0xfffff) { + m_assembler.sub_r(ARMRegisters::S0, base, ARMAssembler::OP2_IMM | (offset >> 12) | (10 << 8)); + m_assembler.dtr_d(true, ARMRegisters::S0, ARMRegisters::S0, offset & 0xfff); + } else { + m_assembler.moveImm(offset, ARMRegisters::S0); + m_assembler.dtr_dr(true, ARMRegisters::S0, base, ARMRegisters::S0); + } + } + m_assembler.blx(ARMRegisters::S0); + } + + +private: + friend class LinkBuffer; + friend class RepatchBuffer; + + static void linkCall(void* code, Call call, FunctionPtr function) + { + ARMAssembler::linkCall(code, call.m_jmp, function.value()); + } + + static void repatchCall(CodeLocationCall call, CodeLocationLabel destination) + { + ARMAssembler::relinkCall(call.dataLocation(), destination.executableAddress()); + } + + static void repatchCall(CodeLocationCall call, FunctionPtr destination) + { + ARMAssembler::relinkCall(call.dataLocation(), destination.executableAddress()); + } + + static const bool s_isVFPPresent; +}; + +} +# 43 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssembler.h" 2 +namespace JSC { typedef MacroAssemblerARM MacroAssemblerBase; } +# 66 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssembler.h" +namespace JSC { + +class MacroAssembler : public MacroAssemblerBase { +public: + + using MacroAssemblerBase::pop; + using MacroAssemblerBase::jump; + using MacroAssemblerBase::branch32; + using MacroAssemblerBase::branch16; +# 83 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssembler.h" + void pop() + { + addPtr(Imm32(sizeof(void*)), stackPointerRegister); + } + + void peek(RegisterID dest, int index = 0) + { + loadPtr(Address(stackPointerRegister, (index * sizeof(void*))), dest); + } + + void poke(RegisterID src, int index = 0) + { + storePtr(src, Address(stackPointerRegister, (index * sizeof(void*)))); + } + + void poke(TrustedImm32 value, int index = 0) + { + store32(value, Address(stackPointerRegister, (index * sizeof(void*)))); + } + + void poke(TrustedImmPtr imm, int index = 0) + { + storePtr(imm, Address(stackPointerRegister, (index * sizeof(void*)))); + } + + + + void branchPtr(Condition cond, RegisterID op1, ImmPtr imm, Label target) + { + branchPtr(cond, op1, imm).linkTo(target, this); + } + + void branch32(Condition cond, RegisterID op1, RegisterID op2, Label target) + { + branch32(cond, op1, op2).linkTo(target, this); + } + + void branch32(Condition cond, RegisterID op1, TrustedImm32 imm, Label target) + { + branch32(cond, op1, imm).linkTo(target, this); + } + + void branch32(Condition cond, RegisterID left, Address right, Label target) + { + branch32(cond, left, right).linkTo(target, this); + } + + void branch16(Condition cond, BaseIndex left, RegisterID right, Label target) + { + branch16(cond, left, right).linkTo(target, this); + } + + void branchTestPtr(Condition cond, RegisterID reg, Label target) + { + branchTestPtr(cond, reg).linkTo(target, this); + } + + void jump(Label target) + { + jump().linkTo(target, this); + } + + + + + + + void addPtr(RegisterID src, RegisterID dest) + { + add32(src, dest); + } + + void addPtr(Imm32 imm32, Address address) + { + add32(imm32, address); + } + + void addPtr(Imm32 imm, RegisterID srcDest) + { + add32(imm, srcDest); + } + + void addPtr(ImmPtr imm, RegisterID dest) + { + add32(Imm32(imm), dest); + } + + void addPtr(Imm32 imm, RegisterID src, RegisterID dest) + { + add32(imm, src, dest); + } + + void andPtr(RegisterID src, RegisterID dest) + { + and32(src, dest); + } + + void andPtr(Imm32 imm, RegisterID srcDest) + { + and32(imm, srcDest); + } + + void andPtr(ImmPtr ptr, RegisterID srcDest) + { + and32(Imm32(ptr), srcDest); + } + + void negPtr(RegisterID srcDest) + { + neg32(srcDest); + } + + void notPtr(RegisterID srcDest) + { + not32(srcDest); + } + + void orPtr(RegisterID src, RegisterID dest) + { + or32(src, dest); + } + + void orPtr(ImmPtr imm, RegisterID dest) + { + or32(Imm32(imm), dest); + } + + void orPtr(Imm32 imm, RegisterID dest) + { + or32(imm, dest); + } + + void subPtr(RegisterID src, RegisterID dest) + { + sub32(src, dest); + } + + void subPtr(Imm32 imm, RegisterID dest) + { + sub32(imm, dest); + } + + void subPtr(ImmPtr imm, RegisterID dest) + { + sub32(Imm32(imm), dest); + } + + void subPtr(ImmPtr imm, Address address) + { + sub32(Imm32(imm), address); + } + + void xorPtr(RegisterID src, RegisterID dest) + { + xor32(src, dest); + } + + void xorPtr(Imm32 imm, RegisterID srcDest) + { + xor32(imm, srcDest); + } + + + void loadPtr(ImplicitAddress address, RegisterID dest) + { + load32(address, dest); + } + + void loadPtr(BaseIndex address, RegisterID dest) + { + load32(address, dest); + } + + void loadPtr(void* address, RegisterID dest) + { + load32(address, dest); + } + + DataLabel32 loadPtrWithAddressOffsetPatch(Address address, RegisterID dest) + { + return load32WithAddressOffsetPatch(address, dest); + } + + void setPtr(Condition cond, RegisterID left, Imm32 right, RegisterID dest) + { + set32(cond, left, right, dest); + } + + void storePtr(RegisterID src, ImplicitAddress address) + { + store32(src, address); + } + + void storePtr(RegisterID src, void* address) + { + store32(src, address); + } + + void storePtr(TrustedImmPtr imm, ImplicitAddress address) + { + store32(Imm32(imm), address); + } + + void storePtr(TrustedImmPtr imm, BaseIndex address) + { + store32(Imm32(imm), address); + } + + void storePtr(TrustedImmPtr imm, void* address) + { + store32(Imm32(imm), address); + } + + DataLabel32 storePtrWithAddressOffsetPatch(RegisterID src, Address address) + { + return store32WithAddressOffsetPatch(src, address); + } + + + Jump branchPtr(Condition cond, RegisterID left, RegisterID right) + { + return branch32(cond, left, right); + } + + Jump branchPtr(Condition cond, RegisterID left, ImmPtr right) + { + return branch32(cond, left, Imm32(right)); + } + + Jump branchPtr(Condition cond, RegisterID left, Imm32 right) + { + return branch32(cond, left, right); + } + + Jump branchPtr(Condition cond, RegisterID left, Address right) + { + return branch32(cond, left, right); + } + + Jump branchPtr(Condition cond, Address left, RegisterID right) + { + return branch32(cond, left, right); + } + + Jump branchPtr(Condition cond, AbsoluteAddress left, RegisterID right) + { + return branch32(cond, left, right); + } + + Jump branchPtr(Condition cond, Address left, ImmPtr right) + { + return branch32(cond, left, Imm32(right)); + } + + Jump branchPtr(Condition cond, AbsoluteAddress left, ImmPtr right, RegisterID scratch) + { + return branch32(cond, left, Imm32(right)); + } + + Jump branchTestPtr(Condition cond, RegisterID reg, RegisterID mask) + { + return branchTest32(cond, reg, mask); + } + + Jump branchTestPtr(Condition cond, RegisterID reg, Imm32 mask = Imm32(-1)) + { + return branchTest32(cond, reg, mask); + } + + Jump branchTestPtr(Condition cond, Address address, Imm32 mask = Imm32(-1)) + { + return branchTest32(cond, address, mask); + } + + Jump branchTestPtr(Condition cond, BaseIndex address, Imm32 mask = Imm32(-1)) + { + return branchTest32(cond, address, mask); + } + + + Jump branchAddPtr(Condition cond, RegisterID src, RegisterID dest) + { + return branchAdd32(cond, src, dest); + } + + Jump branchSubPtr(Condition cond, Imm32 imm, RegisterID dest) + { + return branchSub32(cond, imm, dest); + } + + using MacroAssemblerBase::branchTest8; + Jump branchTest8(Condition cond, ExtendedAddress address, Imm32 mask = Imm32(-1)) + { + return MacroAssemblerBase::branchTest8(cond, Address(address.base, address.offset), mask); + } + + void rshiftPtr(Imm32 imm, RegisterID dest) + { + rshift32(imm, dest); + } + + void lshiftPtr(Imm32 imm, RegisterID dest) + { + lshift32(imm, dest); + } + + +}; + +} +# 38 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrJIT.h" 2 + + + + + +#define YARR_CALL + + +namespace JSC { + +class JSGlobalData; +class ExecutablePool; + +namespace Yarr { + +class YarrCodeBlock { + typedef int (*YarrJITCode)(const UChar* input, unsigned start, unsigned length, int* output) ; + +public: + YarrCodeBlock() + : m_needFallBack(false) + { + } + + ~YarrCodeBlock() + { + } + + void setFallBack(bool fallback) { m_needFallBack = fallback; } + bool isFallBack() { return m_needFallBack; } + void set(MacroAssembler::CodeRef ref) { m_ref = ref; } + + int execute(const UChar* input, unsigned start, unsigned length, int* output) + { + return __extension__((reinterpret_cast(m_ref.m_code.executableAddress()))(input, start, length, output)); + } + + + + + + void release() { m_ref.release(); } + +private: + MacroAssembler::CodeRef m_ref; + bool m_needFallBack; +}; + +void jitCompile(YarrPattern&, JSGlobalData*, YarrCodeBlock& jitObject); +int execute(YarrCodeBlock& jitObject, const UChar* input, unsigned start, unsigned length, int* output); + +} } +# 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrSyntaxChecker.h" 1 +# 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrSyntaxChecker.h" +#define YarrSyntaxChecker_h + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" 1 +# 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" +#define YarrParser_h + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/Yarr.h" 1 +# 34 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" 2 + +namespace JSC { namespace Yarr { + +#define REGEXP_ERROR_PREFIX "Invalid regular expression: " + +enum BuiltInCharacterClassID { + DigitClassID, + SpaceClassID, + WordClassID, + NewlineClassID +}; + + +template +class Parser { +private: + template + friend ErrorCode parse(FriendDelegate& delegate, const UString& pattern, unsigned backReferenceLimit); +# 62 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" + class CharacterClassParserDelegate { + public: + CharacterClassParserDelegate(Delegate& delegate, ErrorCode& err) + : m_delegate(delegate) + , m_err(err) + , m_state(Empty) + , m_character(0) + { + } + + + + + + + void begin(bool invert) + { + m_delegate.atomCharacterClassBegin(invert); + } +# 91 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" + void atomPatternCharacter(UChar ch, bool hyphenIsRange = false) + { + switch (m_state) { + case AfterCharacterClass: + + + + + + + + if (hyphenIsRange && ch == '-') { + m_delegate.atomCharacterClassAtom('-'); + m_state = AfterCharacterClassHyphen; + return; + } + + + case Empty: + m_character = ch; + m_state = CachedCharacter; + return; + + case CachedCharacter: + if (hyphenIsRange && ch == '-') + m_state = CachedCharacterHyphen; + else { + m_delegate.atomCharacterClassAtom(m_character); + m_character = ch; + } + return; + + case CachedCharacterHyphen: + if (ch < m_character) { + m_err = CharacterClassOutOfOrder; + return; + } + m_delegate.atomCharacterClassRange(m_character, ch); + m_state = Empty; + return; + + case AfterCharacterClassHyphen: + m_delegate.atomCharacterClassAtom(ch); + m_state = Empty; + return; + } + } + + + + + + + void atomBuiltInCharacterClass(BuiltInCharacterClassID classID, bool invert) + { + switch (m_state) { + case CachedCharacter: + + m_delegate.atomCharacterClassAtom(m_character); + + case Empty: + case AfterCharacterClass: + m_state = AfterCharacterClass; + m_delegate.atomCharacterClassBuiltIn(classID, invert); + return; + + case CachedCharacterHyphen: + + + m_err = CharacterClassInvalidRange; + return; + + case AfterCharacterClassHyphen: + m_delegate.atomCharacterClassBuiltIn(classID, invert); + m_state = Empty; + return; + } + } + + + + + + + void end() + { + if (m_state == CachedCharacter) + m_delegate.atomCharacterClassAtom(m_character); + else if (m_state == CachedCharacterHyphen) { + m_delegate.atomCharacterClassAtom(m_character); + m_delegate.atomCharacterClassAtom('-'); + } + m_delegate.atomCharacterClassEnd(); + } + + + + void assertionWordBoundary(bool) { __builtin_unreachable(); } + void atomBackReference(unsigned) { __builtin_unreachable(); } + + private: + Delegate& m_delegate; + ErrorCode& m_err; + enum CharacterClassConstructionState { + Empty, + CachedCharacter, + CachedCharacterHyphen, + AfterCharacterClass, + AfterCharacterClassHyphen + } m_state; + UChar m_character; + }; + + Parser(Delegate& delegate, const UString& pattern, unsigned backReferenceLimit) + : m_delegate(delegate) + , m_backReferenceLimit(backReferenceLimit) + , m_err(NoError) + , m_data(pattern.chars()) + , m_size(pattern.length()) + , m_index(0) + , m_parenthesesNestingDepth(0) + { + } +# 235 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" + template + bool parseEscape(EscapeDelegate& delegate) + { + do { } while(0); + do { } while(0); + consume(); + + if (atEndOfPattern()) { + m_err = EscapeUnterminated; + return false; + } + + switch (peek()) { + + case 'b': + consume(); + if (inCharacterClass) + delegate.atomPatternCharacter('\b'); + else { + delegate.assertionWordBoundary(false); + return false; + } + break; + case 'B': + consume(); + if (inCharacterClass) + delegate.atomPatternCharacter('B'); + else { + delegate.assertionWordBoundary(true); + return false; + } + break; + + + case 'd': + consume(); + delegate.atomBuiltInCharacterClass(DigitClassID, false); + break; + case 's': + consume(); + delegate.atomBuiltInCharacterClass(SpaceClassID, false); + break; + case 'w': + consume(); + delegate.atomBuiltInCharacterClass(WordClassID, false); + break; + case 'D': + consume(); + delegate.atomBuiltInCharacterClass(DigitClassID, true); + break; + case 'S': + consume(); + delegate.atomBuiltInCharacterClass(SpaceClassID, true); + break; + case 'W': + consume(); + delegate.atomBuiltInCharacterClass(WordClassID, true); + break; + + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': { + + + if (!inCharacterClass) { + ParseState state = saveState(); + + unsigned backReference; + if (!consumeNumber(backReference)) + break; + if (backReference <= m_backReferenceLimit) { + delegate.atomBackReference(backReference); + break; + } + + restoreState(state); + } + + + if (peek() >= '8') { + delegate.atomPatternCharacter('\\'); + break; + } + + + } + + + case '0': + delegate.atomPatternCharacter(consumeOctal()); + break; + + + case 'f': + consume(); + delegate.atomPatternCharacter('\f'); + break; + case 'n': + consume(); + delegate.atomPatternCharacter('\n'); + break; + case 'r': + consume(); + delegate.atomPatternCharacter('\r'); + break; + case 't': + consume(); + delegate.atomPatternCharacter('\t'); + break; + case 'v': + consume(); + delegate.atomPatternCharacter('\v'); + break; + + + case 'c': { + ParseState state = saveState(); + consume(); + if (!atEndOfPattern()) { + int control = consume(); + + + if (inCharacterClass ? WTF::isASCIIAlphanumeric(control) || (control == '_') : WTF::isASCIIAlpha(control)) { + delegate.atomPatternCharacter(control & 0x1f); + break; + } + } + restoreState(state); + delegate.atomPatternCharacter('\\'); + break; + } + + + case 'x': { + consume(); + int x = tryConsumeHex(2); + if (x == -1) + delegate.atomPatternCharacter('x'); + else + delegate.atomPatternCharacter(x); + break; + } + + + case 'u': { + consume(); + int u = tryConsumeHex(4); + if (u == -1) + delegate.atomPatternCharacter('u'); + else + delegate.atomPatternCharacter(u); + break; + } + + + default: + delegate.atomPatternCharacter(consume()); + } + + return true; + } + + + + + + + bool parseAtomEscape() + { + return parseEscape(m_delegate); + } + void parseCharacterClassEscape(CharacterClassParserDelegate& delegate) + { + parseEscape(delegate); + } +# 425 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" + void parseCharacterClass() + { + do { } while(0); + do { } while(0); + consume(); + + CharacterClassParserDelegate characterClassConstructor(m_delegate, m_err); + + characterClassConstructor.begin(tryConsume('^')); + + while (!atEndOfPattern()) { + switch (peek()) { + case ']': + consume(); + characterClassConstructor.end(); + return; + + case '\\': + parseCharacterClassEscape(characterClassConstructor); + break; + + default: + characterClassConstructor.atomPatternCharacter(consume(), true); + } + + if (m_err) + return; + } + + m_err = CharacterClassUnmatched; + } + + + + + + + void parseParenthesesBegin() + { + do { } while(0); + do { } while(0); + consume(); + + if (tryConsume('?')) { + if (atEndOfPattern()) { + m_err = ParenthesesTypeInvalid; + return; + } + + switch (consume()) { + case ':': + m_delegate.atomParenthesesSubpatternBegin(false); + break; + + case '=': + m_delegate.atomParentheticalAssertionBegin(); + break; + + case '!': + m_delegate.atomParentheticalAssertionBegin(true); + break; + + default: + m_err = ParenthesesTypeInvalid; + } + } else + m_delegate.atomParenthesesSubpatternBegin(); + + ++m_parenthesesNestingDepth; + } + + + + + + + void parseParenthesesEnd() + { + do { } while(0); + do { } while(0); + consume(); + + if (m_parenthesesNestingDepth > 0) + m_delegate.atomParenthesesEnd(); + else + m_err = ParenthesesUnmatched; + + --m_parenthesesNestingDepth; + } + + + + + + + void parseQuantifier(bool lastTokenWasAnAtom, unsigned min, unsigned max) + { + do { } while(0); + do { } while(0); + + if (min == unsigned(-1)) { + m_err = QuantifierTooLarge; + return; + } + + if (lastTokenWasAnAtom) + m_delegate.quantifyAtom(min, max, !tryConsume('?')); + else + m_err = QuantifierWithoutAtom; + } +# 545 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" + void parseTokens() + { + bool lastTokenWasAnAtom = false; + + while (!atEndOfPattern()) { + switch (peek()) { + case '|': + consume(); + m_delegate.disjunction(); + lastTokenWasAnAtom = false; + break; + + case '(': + parseParenthesesBegin(); + lastTokenWasAnAtom = false; + break; + + case ')': + parseParenthesesEnd(); + lastTokenWasAnAtom = true; + break; + + case '^': + consume(); + m_delegate.assertionBOL(); + lastTokenWasAnAtom = false; + break; + + case '$': + consume(); + m_delegate.assertionEOL(); + lastTokenWasAnAtom = false; + break; + + case '.': + consume(); + m_delegate.atomBuiltInCharacterClass(NewlineClassID, true); + lastTokenWasAnAtom = true; + break; + + case '[': + parseCharacterClass(); + lastTokenWasAnAtom = true; + break; + + case '\\': + lastTokenWasAnAtom = parseAtomEscape(); + break; + + case '*': + consume(); + parseQuantifier(lastTokenWasAnAtom, 0, quantifyInfinite); + lastTokenWasAnAtom = false; + break; + + case '+': + consume(); + parseQuantifier(lastTokenWasAnAtom, 1, quantifyInfinite); + lastTokenWasAnAtom = false; + break; + + case '?': + consume(); + parseQuantifier(lastTokenWasAnAtom, 0, 1); + lastTokenWasAnAtom = false; + break; + + case '{': { + ParseState state = saveState(); + + consume(); + if (peekIsDigit()) { + unsigned min; + if (!consumeNumber(min)) + break; + unsigned max = min; + + if (tryConsume(',')) { + if (peekIsDigit()) { + if (!consumeNumber(max)) + break; + } else { + max = quantifyInfinite; + } + } + + if (tryConsume('}')) { + if (min <= max) + parseQuantifier(lastTokenWasAnAtom, min, max); + else + m_err = QuantifierOutOfOrder; + lastTokenWasAnAtom = false; + break; + } + } + + restoreState(state); + } + + default: + m_delegate.atomPatternCharacter(consume()); + lastTokenWasAnAtom = true; + } + + if (m_err) + return; + } + + if (m_parenthesesNestingDepth > 0) + m_err = MissingParentheses; + } + + + + + + + + ErrorCode parse() + { + if (m_size > MAX_PATTERN_SIZE) + m_err = PatternTooLarge; + else + parseTokens(); + do { } while(0); + + return m_err; + } + + + + + typedef unsigned ParseState; + + ParseState saveState() + { + return m_index; + } + + void restoreState(ParseState state) + { + m_index = state; + } + + bool atEndOfPattern() + { + do { } while(0); + return m_index == m_size; + } + + int peek() + { + do { } while(0); + return m_data[m_index]; + } + + bool peekIsDigit() + { + return !atEndOfPattern() && WTF::isASCIIDigit(peek()); + } + + unsigned peekDigit() + { + do { } while(0); + return peek() - '0'; + } + + int consume() + { + do { } while(0); + return m_data[m_index++]; + } + + unsigned consumeDigit() + { + do { } while(0); + return consume() - '0'; + } + + bool consumeNumber(unsigned &accum) + { + accum = consumeDigit(); + while (peekIsDigit()) { + unsigned newValue = accum * 10 + peekDigit(); + if (newValue < accum) { + m_err = QuantifierTooLarge; + return false; + } + accum = newValue; + consume(); + } + return true; + } + + unsigned consumeOctal() + { + do { } while(0); + + unsigned n = consumeDigit(); + while (n < 32 && !atEndOfPattern() && WTF::isASCIIOctalDigit(peek())) + n = n * 8 + consumeDigit(); + return n; + } + + bool tryConsume(UChar ch) + { + if (atEndOfPattern() || (m_data[m_index] != ch)) + return false; + ++m_index; + return true; + } + + int tryConsumeHex(int count) + { + ParseState state = saveState(); + + int n = 0; + while (count--) { + if (atEndOfPattern() || !WTF::isASCIIHexDigit(peek())) { + restoreState(state); + return -1; + } + n = (n << 4) | WTF::toASCIIHexValue(consume()); + } + return n; + } + + Delegate& m_delegate; + unsigned m_backReferenceLimit; + ErrorCode m_err; + const UChar* m_data; + unsigned m_size; + unsigned m_index; + unsigned m_parenthesesNestingDepth; + + + static const unsigned MAX_PATTERN_SIZE = 1024 * 1024; +}; +# 843 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" +template +ErrorCode parse(Delegate& delegate, const UString& pattern, unsigned backReferenceLimit = quantifyInfinite) +{ + return Parser(delegate, pattern, backReferenceLimit).parse(); +} + +} } +# 35 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrSyntaxChecker.h" 2 + +namespace JSC { namespace Yarr { + +ErrorCode checkSyntax(const UString& pattern); + +}} +# 24 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" 2 +# 45 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" +namespace js { + +enum RegExpRunStatus +{ + RegExpRunStatus_Error, + RegExpRunStatus_Success, + RegExpRunStatus_Success_NotFound +}; + +class RegExpObjectBuilder +{ + JSContext *cx; + Rooted reobj_; + + bool getOrCreate(); + bool getOrCreateClone(RegExpObject *proto); + + public: + RegExpObjectBuilder(JSContext *cx, RegExpObject *reobj = __null); + + RegExpObject *reobj() { return reobj_; } + + RegExpObject *build(HandleAtom source, RegExpFlag flags); + RegExpObject *build(HandleAtom source, RegExpShared &shared); + + + RegExpObject *clone(Handle other, Handle proto); +}; + +JSObject * +CloneRegExpObject(JSContext *cx, JSObject *obj, JSObject *proto); + +namespace detail { + +class RegExpCode +{ + typedef JSC::Yarr::BytecodePattern BytecodePattern; + typedef JSC::Yarr::ErrorCode ErrorCode; + typedef JSC::Yarr::YarrPattern YarrPattern; + + typedef JSC::Yarr::JSGlobalData JSGlobalData; + typedef JSC::Yarr::YarrCodeBlock YarrCodeBlock; + + + YarrCodeBlock codeBlock; + + BytecodePattern *byteCode; + + public: + RegExpCode() + : + + codeBlock(), + + byteCode(__null) + { } + + ~RegExpCode() { + + codeBlock.release(); + + if (byteCode) + Foreground::delete_(byteCode); + } + + static bool checkSyntax(JSContext *cx, TokenStream *tokenStream, JSLinearString *source) { + ErrorCode error = JSC::Yarr::checkSyntax(*source); + if (error == JSC::Yarr::NoError) + return true; + + reportYarrError(cx, tokenStream, error); + return false; + } + + + static inline bool isJITRuntimeEnabled(JSContext *cx); + + static void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error); + + static size_t getOutputSize(size_t pairCount) { + return pairCount * 2; + } + + bool compile(JSContext *cx, JSLinearString &pattern, unsigned *parenCount, RegExpFlag flags); + + + RegExpRunStatus + execute(JSContext *cx, const jschar *chars, size_t length, size_t start, + int *output, size_t outputCount); +}; + +} +# 161 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" +class RegExpShared +{ + friend class RegExpCompartment; + friend class RegExpGuard; + + detail::RegExpCode code; + unsigned parenCount; + RegExpFlag flags; + size_t activeUseCount; + uint64_t gcNumberWhenUsed; + + bool compile(JSContext *cx, JSAtom *source); + + RegExpShared(JSRuntime *rt, RegExpFlag flags); + friend class js::OffTheBooks; friend class js::Foreground; friend class js::UnwantedForeground; friend struct ::JSContext; friend struct ::JSRuntime; + + public: + + + inline void prepareForUse(JSContext *cx); + + + + RegExpRunStatus + execute(JSContext *cx, const jschar *chars, size_t length, size_t *lastIndex, + MatchPairs **output); + + + + size_t getParenCount() const { return parenCount; } + void incRef() { activeUseCount++; } + void decRef() { do { } while(0); activeUseCount--; } + + + size_t pairCount() const { return parenCount + 1; } + + RegExpFlag getFlags() const { return flags; } + bool ignoreCase() const { return flags & IgnoreCaseFlag; } + bool global() const { return flags & GlobalFlag; } + bool multiline() const { return flags & MultilineFlag; } + bool sticky() const { return flags & StickyFlag; } +}; + + + + + +class RegExpGuard +{ + RegExpShared *re_; + RegExpGuard(const RegExpGuard &) ; + void operator=(const RegExpGuard &) ; + public: + RegExpGuard() : re_(__null) {} + RegExpGuard(RegExpShared &re) : re_(&re) { + re_->incRef(); + } + void init(RegExpShared &re) { + do { } while(0); + re_ = &re; + re_->incRef(); + } + ~RegExpGuard() { + if (re_) + re_->decRef(); + } + bool initialized() const { return !!re_; } + RegExpShared *re() const { do { } while(0); return re_; } + RegExpShared *operator->() { return re(); } + RegExpShared &operator*() { return *re(); } +}; + +class RegExpCompartment +{ + enum Type { Normal = 0x0, Hack = 0x1 }; + + struct Key { + JSAtom *atom; + uint16_t flag; + uint16_t type; + Key() {} + Key(JSAtom *atom, RegExpFlag flag, Type type) + : atom(atom), flag(flag), type(type) {} + typedef Key Lookup; + static HashNumber hash(const Lookup &l) { + return DefaultHasher::hash(l.atom) ^ (l.flag << 1) ^ l.type; + } + static bool match(Key l, Key r) { + return l.atom == r.atom && l.flag == r.flag && l.type == r.type; + } + }; + + typedef HashMap Map; + Map map_; + + bool get(JSContext *cx, JSAtom *key, JSAtom *source, RegExpFlag flags, Type type, + RegExpGuard *g); + + public: + RegExpCompartment(JSRuntime *rt); + ~RegExpCompartment(); + + bool init(JSContext *cx); + void sweep(JSRuntime *rt); + + + bool get(JSContext *cx, JSAtom *source, RegExpFlag flags, RegExpGuard *g); + + + bool get(JSContext *cx, JSAtom *source, JSString *maybeOpt, RegExpGuard *g); +# 283 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" + bool getHack(JSContext *cx, JSAtom *source, JSAtom *hackedSource, RegExpFlag flags, + RegExpGuard *g); + + + + + + + bool lookupHack(JSAtom *source, RegExpFlag flags, JSContext *cx, RegExpGuard *g); +}; + +class RegExpObject : public JSObject +{ + typedef detail::RegExpCode RegExpCode; + + static const unsigned LAST_INDEX_SLOT = 0; + static const unsigned SOURCE_SLOT = 1; + static const unsigned GLOBAL_FLAG_SLOT = 2; + static const unsigned IGNORE_CASE_FLAG_SLOT = 3; + static const unsigned MULTILINE_FLAG_SLOT = 4; + static const unsigned STICKY_FLAG_SLOT = 5; + + public: + static const unsigned RESERVED_SLOTS = 6; + + + + + + + static RegExpObject * + create(JSContext *cx, RegExpStatics *res, const jschar *chars, size_t length, + RegExpFlag flags, TokenStream *ts); + + static RegExpObject * + createNoStatics(JSContext *cx, const jschar *chars, size_t length, RegExpFlag flags, + TokenStream *ts); + + static RegExpObject * + createNoStatics(JSContext *cx, HandleAtom atom, RegExpFlag flags, TokenStream *ts); +# 335 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" + RegExpRunStatus + execute(JSContext *cx, const jschar *chars, size_t length, size_t *lastIndex, + MatchPairs **output); + + + + const Value &getLastIndex() const { + return getSlot(LAST_INDEX_SLOT); + } + inline void setLastIndex(const Value &v); + inline void setLastIndex(double d); + inline void zeroLastIndex(); + + JSFlatString *toString(JSContext *cx) const; + + JSAtom *getSource() const { + return &getSlot(SOURCE_SLOT).toString()->asAtom(); + } + inline void setSource(JSAtom *source); + + RegExpFlag getFlags() const { + unsigned flags = 0; + flags |= global() ? GlobalFlag : 0; + flags |= ignoreCase() ? IgnoreCaseFlag : 0; + flags |= multiline() ? MultilineFlag : 0; + flags |= sticky() ? StickyFlag : 0; + return RegExpFlag(flags); + } + + + + inline void setIgnoreCase(bool enabled); + inline void setGlobal(bool enabled); + inline void setMultiline(bool enabled); + inline void setSticky(bool enabled); + bool ignoreCase() const { return getSlot(IGNORE_CASE_FLAG_SLOT).toBoolean(); } + bool global() const { return getSlot(GLOBAL_FLAG_SLOT).toBoolean(); } + bool multiline() const { return getSlot(MULTILINE_FLAG_SLOT).toBoolean(); } + bool sticky() const { return getSlot(STICKY_FLAG_SLOT).toBoolean(); } + + inline void shared(RegExpGuard *g) const; + inline bool getShared(JSContext *cx, RegExpGuard *g); + inline void setShared(JSContext *cx, RegExpShared &shared); + + private: + friend class RegExpObjectBuilder; + + + + + + + Shape *assignInitialShape(JSContext *cx); + + inline bool init(JSContext *cx, HandleAtom source, RegExpFlag flags); + + + + + + bool createShared(JSContext *cx, RegExpGuard *g); + RegExpShared *maybeShared() const; + + + void setPrivate(void *priv) ; +}; + + + + + + + +bool +ParseRegExpFlags(JSContext *cx, JSString *flagStr, RegExpFlag *flagsOut); +# 419 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" +inline bool +RegExpToShared(JSContext *cx, JSObject &obj, RegExpGuard *g); + +template +bool +XDRScriptRegExpObject(XDRState *xdr, HeapPtrObject *objp); + +extern JSObject * +CloneScriptRegExpObject(JSContext *cx, RegExpObject &re); + +} +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscompartment.h" 2 + +namespace js { + + +extern Class dummy_class; +# 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscompartment.h" +class DtoaCache { + double d; + int base; + JSFixedString *s; + public: + DtoaCache() : s(__null) {} + void purge() { s = __null; } + + JSFixedString *lookup(int base, double d) { + return this->s && base == this->base && d == this->d ? this->s : __null; + } + + void cache(int base, double d, JSFixedString *s) { + this->base = base; + this->d = d; + this->s = s; + } + +}; + + +typedef int moz_static_assert103[(sizeof(HashNumber) == 4) ? 1 : -1]; + +struct WrapperHasher +{ + typedef Value Lookup; + + static HashNumber hash(Value key) { + do { } while(0); + uint64_t bits = JSVAL_TO_IMPL(key).asBits; + return uint32_t(bits) ^ uint32_t(bits >> 32); + } + + static bool match(const Value &l, const Value &k) { return l == k; } +}; + +typedef HashMap WrapperMap; + +} + +namespace JS { +struct TypeInferenceSizes; +} + +namespace js { +class AutoDebugModeGC; +} + +struct JSCompartment +{ + JSRuntime *rt; + JSPrincipals *principals; + + js::gc::ArenaLists arenas; + + private: + bool needsBarrier_; + public: + + bool needsBarrier() const { + return needsBarrier_; + } + + void setNeedsBarrier(bool needs); + + js::GCMarker *barrierTracer() { + do { } while(0); + return &rt->gcMarker; + } + + private: + enum CompartmentGCState { + NoGCScheduled, + GCScheduled, + GCRunning + }; + + CompartmentGCState gcState; + bool gcPreserveCode; + + public: + bool isCollecting() const { + + if (rt->gcRunning) { + return gcState == GCRunning; + } else { + do { } while(0); + return needsBarrier(); + } + } + + bool isPreservingCode() const { + return gcPreserveCode; + } + + + + + + bool requireGCTracer() const { + return gcState == GCRunning; + } + + void setCollecting(bool collecting) { + do { } while(0); + if (collecting) + gcState = GCRunning; + else + gcState = NoGCScheduled; + } + + void scheduleGC() { + do { } while(0); + do { } while(0); + gcState = GCScheduled; + } + + void unscheduleGC() { + do { } while(0); + do { } while(0); + gcState = NoGCScheduled; + } + + bool isGCScheduled() const { + return gcState == GCScheduled; + } + + void setPreservingCode(bool preserving) { + gcPreserveCode = preserving; + } + + size_t gcBytes; + size_t gcTriggerBytes; + size_t gcMaxMallocBytes; + + bool hold; + bool isSystemCompartment; + + int64_t lastCodeRelease; + + + + + + + static const size_t TYPE_LIFO_ALLOC_PRIMARY_CHUNK_SIZE = 128 * 1024; + js::LifoAlloc typeLifoAlloc; + bool activeAnalysis; + bool activeInference; + + + js::types::TypeCompartment types; + + void *data; + bool active; + js::WrapperMap crossCompartmentWrappers; + + + int64_t lastAnimationTime; + + js::RegExpCompartment regExps; + + size_t sizeOfShapeTable(JSMallocSizeOfFun mallocSizeOf); + void sizeOfTypeInferenceData(JS::TypeInferenceSizes *stats, JSMallocSizeOfFun mallocSizeOf); + + + + + js::PropertyTree propertyTree; + + + js::BaseShapeSet baseShapes; + void sweepBaseShapeTable(); + + + js::InitialShapeSet initialShapes; + void sweepInitialShapeTable(); + + + js::types::TypeObjectSet newTypeObjects; + js::types::TypeObjectSet lazyTypeObjects; + void sweepNewTypeObjectTable(js::types::TypeObjectSet &table); + + js::ReadBarriered emptyTypeObject; + + + inline js::types::TypeObject *getEmptyType(JSContext *cx); + + js::types::TypeObject *getLazyType(JSContext *cx, JSObject *proto); + + + + + + + + size_t gcMallocAndFreeBytes; + size_t gcTriggerMallocAndFreeBytes; + + private: + + + + + + ptrdiff_t gcMallocBytes; + + enum { DebugFromC = 1, DebugFromJS = 2 }; + + unsigned debugModeBits; + + public: + JSCompartment(JSRuntime *rt); + ~JSCompartment(); + + bool init(JSContext *cx); + + + void markCrossCompartmentWrappers(JSTracer *trc); + + bool wrap(JSContext *cx, js::Value *vp); + bool wrap(JSContext *cx, JSString **strp); + bool wrap(JSContext *cx, js::HeapPtrString *strp); + bool wrap(JSContext *cx, JSObject **objp); + bool wrapId(JSContext *cx, jsid *idp); + bool wrap(JSContext *cx, js::PropertyOp *op); + bool wrap(JSContext *cx, js::StrictPropertyOp *op); + bool wrap(JSContext *cx, js::PropertyDescriptor *desc); + bool wrap(JSContext *cx, js::AutoIdVector &props); + + void markTypes(JSTracer *trc); + void discardJitCode(js::FreeOp *fop); + void sweep(js::FreeOp *fop, bool releaseTypes); + void sweepCrossCompartmentWrappers(); + void purge(); + + void setGCLastBytes(size_t lastBytes, size_t lastMallocBytes, js::JSGCInvocationKind gckind); + void reduceGCTriggerBytes(size_t amount); + + void resetGCMallocBytes(); + void setGCMaxMallocBytes(size_t value); + void updateMallocCounter(size_t nbytes) { + ptrdiff_t oldCount = gcMallocBytes; + ptrdiff_t newCount = oldCount - ptrdiff_t(nbytes); + gcMallocBytes = newCount; + if ((__builtin_expect((newCount <= 0 && oldCount > 0), 0))) + onTooMuchMalloc(); + } + + bool isTooMuchMalloc() const { + return gcMallocBytes <= 0; + } + + void onTooMuchMalloc(); + + void mallocInCompartment(size_t nbytes) { + gcMallocAndFreeBytes += nbytes; + } + + void freeInCompartment(size_t nbytes) { + do { } while(0); + gcMallocAndFreeBytes -= nbytes; + } + + js::DtoaCache dtoaCache; + + private: + + + + + js::GlobalObjectSet debuggees; + + private: + JSCompartment *thisForCtor() { return this; } + + public: + + + + + + + + bool debugMode() const { return !!debugModeBits; } + + + bool hasScriptsOnStack(); + + private: + + void updateForDebugMode(js::FreeOp *fop, js::AutoDebugModeGC &dmgc); + + public: + js::GlobalObjectSet &getDebuggees() { return debuggees; } + bool addDebuggee(JSContext *cx, js::GlobalObject *global); + void removeDebuggee(js::FreeOp *fop, js::GlobalObject *global, + js::GlobalObjectSet::Enum *debuggeesEnum = __null); + bool setDebugModeFromC(JSContext *cx, bool b, js::AutoDebugModeGC &dmgc); + + void clearBreakpointsIn(js::FreeOp *fop, js::Debugger *dbg, JSObject *handler); + void clearTraps(js::FreeOp *fop); + + private: + void sweepBreakpoints(js::FreeOp *fop); + + public: + js::WatchpointMap *watchpointMap; + + js::ScriptCountsMap *scriptCountsMap; + + js::SourceMapMap *sourceMapMap; + + js::DebugScriptMap *debugScriptMap; +}; + + + + + +class js::AutoDebugModeGC +{ + JSRuntime *rt; + bool needGC; + public: + explicit AutoDebugModeGC(JSRuntime *rt) : rt(rt), needGC(false) {} + + ~AutoDebugModeGC() { + + + + + if (needGC) + GC(rt, GC_NORMAL, gcreason::DEBUG_MODE_GC); + } + + void scheduleGC(JSCompartment *compartment) { + do { } while(0); + PrepareCompartmentForGC(compartment); + needGC = true; + } +}; + +inline void +JSContext::setCompartment(JSCompartment *compartment) +{ + this->compartment = compartment; + this->inferenceEnabled = compartment ? compartment->types.inferenceEnabled : false; +} + +namespace js { + +class PreserveCompartment { + protected: + JSContext *cx; + private: + JSCompartment *oldCompartment; + bool oldInferenceEnabled; + + public: + PreserveCompartment(JSContext *cx ) : cx(cx) { + do { } while (0); + oldCompartment = cx->compartment; + oldInferenceEnabled = cx->inferenceEnabled; + } + + ~PreserveCompartment() { + + cx->compartment = oldCompartment; + cx->inferenceEnabled = oldInferenceEnabled; + } +}; + +class SwitchToCompartment : public PreserveCompartment { + public: + SwitchToCompartment(JSContext *cx, JSCompartment *newCompartment + ) + : PreserveCompartment(cx) + { + do { } while (0); + cx->setCompartment(newCompartment); + } + + SwitchToCompartment(JSContext *cx, JSObject *target ) + : PreserveCompartment(cx) + { + do { } while (0); + cx->setCompartment(target->compartment()); + } + + +}; + +class AssertCompartmentUnchanged { + protected: + JSContext * const cx; + JSCompartment * const oldCompartment; + + public: + AssertCompartmentUnchanged(JSContext *cx ) + : cx(cx), oldCompartment(cx->compartment) { + do { } while (0); + } + + ~AssertCompartmentUnchanged() { + do { } while(0); + } +}; + +class AutoCompartment +{ + public: + JSContext * const context; + JSCompartment * const origin; + JSObject * const target; + JSCompartment * const destination; + private: + Maybe frame; + bool entered; + + public: + AutoCompartment(JSContext *cx, JSObject *target); + ~AutoCompartment(); + + bool enter(); + void leave(); + + private: + AutoCompartment(const AutoCompartment &) ; + AutoCompartment & operator=(const AutoCompartment &) ; +}; + + + + + + +class ErrorCopier +{ + AutoCompartment ∾ + RootedObject scope; + + public: + ErrorCopier(AutoCompartment &ac, JSObject *scope) : ac(ac), scope(ac.context, scope) { + do { } while(0); + } + ~ErrorCopier(); +}; + +class CompartmentsIter { + private: + JSCompartment **it, **end; + + public: + CompartmentsIter(JSRuntime *rt) { + it = rt->compartments.begin(); + end = rt->compartments.end(); + } + + bool done() const { return it == end; } + + void next() { + do { } while(0); + it++; + } + + JSCompartment *get() const { + do { } while(0); + return *it; + } + + operator JSCompartment *() const { return get(); } + JSCompartment *operator->() const { return get(); } +}; + +} +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" 2 +# 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" +namespace js { + +namespace mjit { + struct JITChunk; + struct JITScript; +} + +struct VMFrame +{ +# 82 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" + union Arguments { + struct { + void *ptr; + void *ptr2; + } x; + struct { + uint32_t dynamicArgc; + } call; + } u; + + static size_t offsetOfDynamicArgc() { + return __builtin_offsetof (VMFrame, u.call.dynamicArgc); + } + + VMFrame *previous; + void *scratch; + FrameRegs regs; + + static size_t offsetOfRegsSp() { + return __builtin_offsetof (VMFrame, regs.sp); + } + + static size_t offsetOfRegsPc() { + return __builtin_offsetof (VMFrame, regs.pc); + } + + JSContext *cx; + Value *stackLimit; + StackFrame *entryfp; + FrameRegs *oldregs; + JSRejoinState stubRejoin; +# 162 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" + void *savedR4; + void *savedR5; + void *savedR6; + void *savedR7; + void *savedR8; + void *savedR9; + void *savedR10; + void *savedR11; + void *savedLR; + + inline void** returnAddressLocation() { + return reinterpret_cast(this) - 1; + } +# 202 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" + JSRuntime *runtime() { return cx->runtime; } + + + + + + + + StackFrame *fp() { return regs.fp(); } + mjit::JITScript *jit() { return fp()->jit(); } + + inline mjit::JITChunk *chunk(); + inline unsigned chunkIndex(); + + + inline JSScript *script(); + inline jsbytecode *pc(); +# 227 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" + static const size_t offsetOfFp = 4 * sizeof(void *) + FrameRegs::offsetOfFp; + static const size_t offsetOfInlined = 4 * sizeof(void *) + FrameRegs::offsetOfInlined; + + + static void staticAssert() { + typedef int moz_static_assert104[(offsetOfFp == __builtin_offsetof (VMFrame, regs) + FrameRegs::offsetOfFp) ? 1 : -1]; + typedef int moz_static_assert105[(offsetOfInlined == __builtin_offsetof (VMFrame, regs) + FrameRegs::offsetOfInlined) ? 1 : -1]; + } +}; + + + +extern "C" void JaegerStubVeneer(void); + + +namespace mjit { + + + + + + +enum RejoinState { +# 259 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" + REJOIN_SCRIPTED = 1, + + + REJOIN_NONE, + + + REJOIN_RESUME, + + + + + + REJOIN_TRAP, + + + REJOIN_FALLTHROUGH, + + + + + + + + REJOIN_NATIVE, + REJOIN_NATIVE_LOWERED, + REJOIN_NATIVE_GETTER, + + + + + + + REJOIN_NATIVE_PATCHED, + + + REJOIN_PUSH_BOOLEAN, + REJOIN_PUSH_OBJECT, + + + REJOIN_DEFLOCALFUN, + + + + + + REJOIN_THIS_PROTOTYPE, + + + + + + REJOIN_CHECK_ARGUMENTS, + + + + + + REJOIN_FUNCTION_PROLOGUE, + + + + + + REJOIN_CALL_PROLOGUE, + REJOIN_CALL_PROLOGUE_LOWERED_CALL, + REJOIN_CALL_PROLOGUE_LOWERED_APPLY, + + + REJOIN_CALL_SPLAT, + + + REJOIN_GETTER, + REJOIN_POS, + REJOIN_BINARY, + + + + + + REJOIN_BRANCH +}; + + +static inline JSRejoinState +ScriptedRejoin(uint32_t pcOffset) +{ + return REJOIN_SCRIPTED | (pcOffset << 1); +} + + +static inline JSRejoinState +StubRejoin(RejoinState rejoin) +{ + return rejoin << 1; +} + + +struct RecompilationMonitor +{ + JSContext *cx; + + + + + + + unsigned recompilations; + unsigned frameExpansions; + + + uint64_t gcNumber; + + RecompilationMonitor(JSContext *cx) + : cx(cx), + recompilations(cx->compartment->types.recompilations), + frameExpansions(cx->compartment->types.frameExpansions), + gcNumber(cx->runtime->gcNumber) + {} + + bool recompiled() { + return cx->compartment->types.recompilations != recompilations + || cx->compartment->types.frameExpansions != frameExpansions + || cx->runtime->gcNumber != gcNumber; + } +}; + + + + + +struct Trampolines { + typedef void (*TrampolinePtr)(); + + TrampolinePtr forceReturn; + JSC::ExecutablePool *forceReturnPool; + + + + + +}; + + +enum JaegerStatus +{ + + Jaeger_Throwing = 0, + + + Jaeger_Returned = 1, + + + + + + Jaeger_Unfinished = 2, + + + + + + + Jaeger_UnfinishedAtTrap = 3, + + + + + + Jaeger_ThrowBeforeEnter = 4 +}; + +static inline bool +JaegerStatusToSuccess(JaegerStatus status) +{ + do { } while(0); + do { } while(0); + return status == Jaeger_Returned; +} + + +class JaegerRuntime +{ + Trampolines trampolines; + VMFrame *activeFrame_; + JaegerStatus lastUnfinished_; + + + void finish(); + + public: + bool init(JSContext *cx); + + JaegerRuntime(); + ~JaegerRuntime() { finish(); } + + VMFrame *activeFrame() { + return activeFrame_; + } + + void pushActiveFrame(VMFrame *f) { + do { } while(0); + f->previous = activeFrame_; + f->scratch = __null; + activeFrame_ = f; + } + + void popActiveFrame() { + do { } while(0); + activeFrame_ = activeFrame_->previous; + } + + void setLastUnfinished(JaegerStatus status) { + do { } while(0); + lastUnfinished_ = status; + } + + JaegerStatus lastUnfinished() { + JaegerStatus result = lastUnfinished_; + lastUnfinished_ = (JaegerStatus) 0; + return result; + } + + + + + + + + void *forceReturnFromExternC() const { + return (__extension__ (void *) (size_t) (trampolines.forceReturn)); + } + + + + + + + void *forceReturnFromFastCall() const { + + + + return (__extension__ (void *) (size_t) (trampolines.forceReturn)); + + } + + + + + + + Vector orphanedNativeFrames; + Vector orphanedNativePools; +}; +# 520 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" +class CompilerAllocPolicy : public TempAllocPolicy +{ + bool *oomFlag; + + void *checkAlloc(void *p) { + if (!p) + *oomFlag = true; + return p; + } + + public: + CompilerAllocPolicy(JSContext *cx, bool *oomFlag) + : TempAllocPolicy(cx), oomFlag(oomFlag) {} + CompilerAllocPolicy(JSContext *cx, Compiler &compiler); + + void *malloc_(size_t bytes) { return checkAlloc(TempAllocPolicy::malloc_(bytes)); } + void *realloc_(void *p, size_t oldBytes, size_t bytes) { + return checkAlloc(TempAllocPolicy::realloc_(p, oldBytes, bytes)); + } +}; + +namespace ic { + + struct PICInfo; + struct GetElementIC; + struct SetElementIC; + + + struct GetGlobalNameIC; + struct SetGlobalNameIC; + struct EqualityICInfo; + struct CallICInfo; + +} +} + +typedef void ( *VoidStub)(VMFrame &); +typedef void ( *VoidVpStub)(VMFrame &, Value *); +typedef void ( *VoidStubUInt32)(VMFrame &, uint32_t); +typedef void ( *VoidStubInt32)(VMFrame &, int32_t); +typedef JSBool ( *BoolStub)(VMFrame &); +typedef void * ( *VoidPtrStub)(VMFrame &); +typedef void * ( *VoidPtrStubPC)(VMFrame &, jsbytecode *); +typedef void * ( *VoidPtrStubUInt32)(VMFrame &, uint32_t); +typedef JSObject * ( *JSObjStub)(VMFrame &); +typedef JSObject * ( *JSObjStubUInt32)(VMFrame &, uint32_t); +typedef JSObject * ( *JSObjStubFun)(VMFrame &, JSFunction *); +typedef void ( *VoidStubFun)(VMFrame &, JSFunction *); +typedef JSObject * ( *JSObjStubJSObj)(VMFrame &, JSObject *); +typedef void ( *VoidStubName)(VMFrame &, PropertyName *); +typedef JSString * ( *JSStrStub)(VMFrame &); +typedef JSString * ( *JSStrStubUInt32)(VMFrame &, uint32_t); +typedef void ( *VoidStubJSObj)(VMFrame &, JSObject *); +typedef void ( *VoidStubPC)(VMFrame &, jsbytecode *); +typedef JSBool ( *BoolStubUInt32)(VMFrame &f, uint32_t); + +typedef void ( *VoidStubCallIC)(VMFrame &, js::mjit::ic::CallICInfo *); +typedef void * ( *VoidPtrStubCallIC)(VMFrame &, js::mjit::ic::CallICInfo *); +typedef void ( *VoidStubGetGlobal)(VMFrame &, js::mjit::ic::GetGlobalNameIC *); +typedef void ( *VoidStubSetGlobal)(VMFrame &, js::mjit::ic::SetGlobalNameIC *); +typedef JSBool ( *BoolStubEqualityIC)(VMFrame &, js::mjit::ic::EqualityICInfo *); + + +typedef void ( *VoidStubPIC)(VMFrame &, js::mjit::ic::PICInfo *); +typedef void ( *VoidStubGetElemIC)(VMFrame &, js::mjit::ic::GetElementIC *); +typedef void ( *VoidStubSetElemIC)(VMFrame &f, js::mjit::ic::SetElementIC *); + + +namespace mjit { + +struct InlineFrame; +struct CallSite; + +struct NativeMapEntry { + size_t bcOff; + void *ncode; +}; + + +struct PCLengthEntry { + double codeLength; + double picsLength; +}; + + + + + + +struct NativeCallStub { + + jsbytecode *pc; + + + JSC::ExecutablePool *pool; +# 624 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" + JSC::CodeLocationJump jump; + +}; + +struct JITChunk +{ + typedef JSC::MacroAssemblerCodeRef CodeRef; + CodeRef code; + + PCLengthEntry *pcLengths; +# 643 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" + uint32_t nNmapPairs : 31; + + uint32_t nInlineFrames; + uint32_t nCallSites; + uint32_t nRootedTemplates; + uint32_t nRootedRegExps; + + uint32_t nGetGlobalNames; + uint32_t nSetGlobalNames; + uint32_t nCallICs; + uint32_t nEqualityICs; + + + uint32_t nGetElems; + uint32_t nSetElems; + uint32_t nPICs; + + + + + typedef Vector ExecPoolVector; + ExecPoolVector execPools; + + + + Vector nativeCallStubs; + + NativeMapEntry *nmap() const; + js::mjit::InlineFrame *inlineFrames() const; + js::mjit::CallSite *callSites() const; + JSObject **rootedTemplates() const; + RegExpShared **rootedRegExps() const; + + ic::GetGlobalNameIC *getGlobalNames() const; + ic::SetGlobalNameIC *setGlobalNames() const; + ic::CallICInfo *callICs() const; + ic::EqualityICInfo *equalityICs() const; + + + ic::GetElementIC *getElems() const; + ic::SetElementIC *setElems() const; + ic::PICInfo *pics() const; + + + bool isValidCode(void *ptr) { + char *jitcode = (char *)code.m_code.executableAddress(); + char *jcheck = (char *)ptr; + return jcheck >= jitcode && jcheck < jitcode + code.m_size; + } + + size_t computedSizeOfIncludingThis(); + size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf); + + ~JITChunk(); + + void trace(JSTracer *trc); + void purgeCaches(); + + private: + + char *commonSectionLimit() const; + char *monoICSectionsLimit() const; + char *polyICSectionsLimit() const; +}; + +void +SetChunkLimit(uint32_t limit); + + +struct ChunkDescriptor +{ + + uint32_t begin; + uint32_t end; + + + uint32_t counter; + + + JITChunk *chunk; + + ChunkDescriptor() { PodZero(this); } +}; + + +struct CrossChunkEdge +{ + + uint32_t source; + uint32_t target; + + + void *sourceJump1; + void *sourceJump2; +# 747 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" + typedef Vector JumpTableEntryVector; + JumpTableEntryVector *jumpTableEntries; + + + void *targetLabel; + + + + + + + void *shimLabel; + + CrossChunkEdge() { PodZero(this); } +}; + +struct JITScript +{ + JSScript *script; + + void *invokeEntry; + void *fastEntry; + void *arityCheckEntry; + void *argsCheckEntry; + + + JSCList callers; + + uint32_t nchunks; + uint32_t nedges; + + + + + + JSC::ExecutablePool *shimPool; + + + + JSC::CodeLocationLabel argsCheckStub; + JSC::CodeLocationLabel argsCheckFallthrough; + JSC::CodeLocationJump argsCheckJump; + JSC::ExecutablePool *argsCheckPool; + void resetArgsCheck(); + + + ChunkDescriptor &chunkDescriptor(unsigned i) { + do { } while(0); + ChunkDescriptor *descs = (ChunkDescriptor *) ((char *) this + sizeof(JITScript)); + return descs[i]; + } + + unsigned chunkIndex(jsbytecode *pc) { + unsigned offset = pc - script->code; + do { } while(0); + for (unsigned i = 0; i < nchunks; i++) { + const ChunkDescriptor &desc = chunkDescriptor(i); + do { } while(0); + if (offset < desc.end) + return i; + } + __builtin_unreachable(); + return 0; + } + + JITChunk *chunk(jsbytecode *pc) { + return chunkDescriptor(chunkIndex(pc)).chunk; + } + + JITChunk *findCodeChunk(void *addr); + + CrossChunkEdge *edges() { + return (CrossChunkEdge *) (&chunkDescriptor(0) + nchunks); + } + + + void patchEdge(const CrossChunkEdge &edge, void *label); + + jsbytecode *nativeToPC(void *returnAddress, CallSite **pinline); + + size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf); + + void destroy(FreeOp *fop); + void destroyChunk(FreeOp *fop, unsigned chunkIndex, bool resetUses = true); + + void trace(JSTracer *trc); + void purgeCaches(); +}; + + + + + +JaegerStatus EnterMethodJIT(JSContext *cx, StackFrame *fp, void *code, Value *stackLimit, + bool partial); + + +JaegerStatus JaegerShot(JSContext *cx, bool partial); + + +JaegerStatus JaegerShotAtSafePoint(JSContext *cx, void *safePoint, bool partial); + +enum CompileStatus +{ + Compile_Okay, + Compile_Abort, + Compile_InlineAbort, + Compile_Retry, + Compile_Error, + Compile_Skipped +}; + +void +ProfileStubCall(VMFrame &f); + +enum CompileRequest +{ + CompileRequest_Interpreter, + CompileRequest_JIT +}; + +CompileStatus +CanMethodJIT(JSContext *cx, JSScript *script, jsbytecode *pc, + bool construct, CompileRequest request); + +inline void +ReleaseScriptCode(FreeOp *fop, JSScript *script) +{ + if (!script->hasJITInfo()) + return; + + for (int constructing = 0; constructing <= 1; constructing++) { + for (int barriers = 0; barriers <= 1; barriers++) { + JSScript::JITScriptHandle *jith = script->jitHandle((bool) constructing, (bool) barriers); + if (jith && jith->isValid()) + JSScript::ReleaseCode(fop, jith); + } + } + + script->destroyJITInfo(fop); +} + + +void +ExpandInlineFrames(JSCompartment *compartment); + + + +void +ClearAllFrames(JSCompartment *compartment); + + +struct InlineFrame +{ + InlineFrame *parent; + jsbytecode *parentpc; + HeapPtrFunction fun; + + + + uint32_t depth; +}; + +struct CallSite +{ + uint32_t codeOffset; + uint32_t inlineIndex; + uint32_t pcOffset; + RejoinState rejoin; + + void initialize(uint32_t codeOffset, uint32_t inlineIndex, uint32_t pcOffset, + RejoinState rejoin) { + this->codeOffset = codeOffset; + this->inlineIndex = inlineIndex; + this->pcOffset = pcOffset; + this->rejoin = rejoin; + } + + bool isTrap() const { + return rejoin == REJOIN_TRAP; + } +}; + +void +DumpAllProfiles(JSContext *cx); + +inline void * bsearch_nmap(NativeMapEntry *nmap, size_t nPairs, size_t bcOff) +{ + size_t lo = 1, hi = nPairs; + while (1) { + + if (lo > hi) + return __null; + size_t mid = (lo + hi) / 2; + size_t bcOff_mid = nmap[mid-1].bcOff; + if (bcOff < bcOff_mid) { + hi = mid-1; + continue; + } + if (bcOff > bcOff_mid) { + lo = mid+1; + continue; + } + return nmap[mid-1].ncode; + } +} + +static inline bool +IsLowerableFunCallOrApply(jsbytecode *pc) +{ + + return (*pc == JSOP_FUNCALL && ((unsigned)(((pc)[1] << 8) | (pc)[2])) >= 1) || + (*pc == JSOP_FUNAPPLY && ((unsigned)(((pc)[1] << 8) | (pc)[2])) == 2); + + + +} + +} + +inline mjit::JITChunk * +VMFrame::chunk() +{ + return jit()->chunk(regs.pc); +} + +inline unsigned +VMFrame::chunkIndex() +{ + return jit()->chunkIndex(regs.pc); +} + +inline JSScript * +VMFrame::script() +{ + if (regs.inlined()) + return chunk()->inlineFrames()[regs.inlined()->inlineIndex].fun->script(); + return fp()->script(); +} + +inline jsbytecode * +VMFrame::pc() +{ + if (regs.inlined()) + return script()->code + regs.inlined()->pcOffset; + return regs.pc; +} + +} + +inline void * +JSScript::nativeCodeForPC(bool constructing, jsbytecode *pc) +{ + js::mjit::JITScript *jit = getJIT(constructing, compartment()->needsBarrier()); + if (!jit) + return __null; + js::mjit::JITChunk *chunk = jit->chunk(pc); + if (!chunk) + return __null; + return bsearch_nmap(chunk->nmap(), chunk->nNmapPairs, (size_t)(pc - code)); +} + +extern "C" void JaegerTrampolineReturn(); +extern "C" void JaegerInterpoline(); +extern "C" void JaegerInterpolineScripted(); + + + + +extern "C" void JaegerThrowpoline(); +# 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" +#define ObjectImpl_inl_h___ + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" 1 +# 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" +#define jsinterp_h___ +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" +namespace js { + + + + + + + +inline bool +ScriptPrologue(JSContext *cx, StackFrame *fp, JSScript *script); + +inline bool +ScriptEpilogue(JSContext *cx, StackFrame *fp, bool ok); +# 40 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" +inline bool +ScriptPrologueOrGeneratorResume(JSContext *cx, StackFrame *fp); + +inline bool +ScriptEpilogueOrGeneratorYield(JSContext *cx, StackFrame *fp, bool ok); +# 65 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" +extern JSTrapStatus +ScriptDebugPrologue(JSContext *cx, StackFrame *fp); +# 83 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" +extern bool +ScriptDebugEpilogue(JSContext *cx, StackFrame *fp, bool ok); + + + + + + + +extern bool +BoxNonStrictThis(JSContext *cx, const CallReceiver &call); + + + + + + + +inline bool +ComputeThis(JSContext *cx, StackFrame *fp); + +enum MaybeConstruct { + NO_CONSTRUCT = INITIAL_NONE, + CONSTRUCT = INITIAL_CONSTRUCT +}; + + + + + + +extern bool +InvokeKernel(JSContext *cx, CallArgs args, MaybeConstruct construct = NO_CONSTRUCT); + + + + + +inline bool +Invoke(JSContext *cx, InvokeArgsGuard &args, MaybeConstruct construct = NO_CONSTRUCT) +{ + args.setActive(); + bool ok = InvokeKernel(cx, args, construct); + args.setInactive(); + return ok; +} + + + + + + +extern bool +Invoke(JSContext *cx, const Value &thisv, const Value &fval, unsigned argc, Value *argv, + Value *rval); + + + + + +extern bool +InvokeGetterOrSetter(JSContext *cx, JSObject *obj, const Value &fval, unsigned argc, Value *argv, + Value *rval); + + + + + +extern bool +InvokeConstructorKernel(JSContext *cx, const CallArgs &args); + + +inline bool +InvokeConstructor(JSContext *cx, InvokeArgsGuard &args) +{ + args.setActive(); + bool ok = InvokeConstructorKernel(cx, ImplicitCast(args)); + args.setInactive(); + return ok; +} + + +extern bool +InvokeConstructor(JSContext *cx, const Value &fval, unsigned argc, Value *argv, Value *rval); + + + + + + + +extern bool +ExecuteKernel(JSContext *cx, JSScript *script, JSObject &scopeChain, const Value &thisv, + ExecuteType type, StackFrame *evalInFrame, Value *result); + + +extern bool +Execute(JSContext *cx, JSScript *script, JSObject &scopeChain, Value *rval); + + +enum InterpMode +{ + JSINTERP_NORMAL = 0, + JSINTERP_REJOIN = 1, + JSINTERP_SKIP_TRAP = 2 +}; + + + + + +extern __attribute__((noinline)) bool +Interpret(JSContext *cx, StackFrame *stopFp, InterpMode mode = JSINTERP_NORMAL); + +extern bool +RunScript(JSContext *cx, JSScript *script, StackFrame *fp); + +extern bool +StrictlyEqual(JSContext *cx, const Value &lval, const Value &rval, bool *equal); + +extern bool +LooselyEqual(JSContext *cx, const Value &lval, const Value &rval, bool *equal); + + +extern bool +SameValue(JSContext *cx, const Value &v1, const Value &v2, bool *same); + +extern JSType +TypeOfValue(JSContext *cx, const Value &v); + +extern JSBool +HasInstance(JSContext *cx, HandleObject obj, const js::Value *v, JSBool *bp); +# 239 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" +class InterpreterFrames { + public: + class InterruptEnablerBase { + public: + virtual void enableInterrupts() const = 0; + }; + + InterpreterFrames(JSContext *cx, FrameRegs *regs, const InterruptEnablerBase &enabler); + ~InterpreterFrames(); + + + inline void enableInterruptsIfRunning(JSScript *script); + + InterpreterFrames *older; + + private: + JSContext *context; + FrameRegs *regs; + const InterruptEnablerBase &enabler; +}; + + + + + +extern void +UnwindScope(JSContext *cx, uint32_t stackDepth); + + + + + +extern void +UnwindForUncatchableException(JSContext *cx, const FrameRegs ®s); + +extern bool +OnUnknownMethod(JSContext *cx, HandleObject obj, Value idval, Value *vp); + +inline void +AssertValidFunctionScopeChainAtExit(StackFrame *fp); + +class TryNoteIter +{ + const FrameRegs ®s; + JSScript *script; + uint32_t pcOffset; + JSTryNote *tn, *tnEnd; + void settle(); + public: + TryNoteIter(const FrameRegs ®s); + bool done() const; + void operator++(); + JSTryNote *operator*() const { return tn; } +}; +# 302 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" +static __attribute__((always_inline)) inline void +Debug_SetValueRangeToCrashOnTouch(Value *beg, Value *end) +{ + + + + +} + +static __attribute__((always_inline)) inline void +Debug_SetValueRangeToCrashOnTouch(Value *vec, size_t len) +{ + + + +} + +static __attribute__((always_inline)) inline void +Debug_SetValueRangeToCrashOnTouch(HeapValue *vec, size_t len) +{ + + + +} + +} +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Marking.h" 1 + + + + + + + +#define gc_marking_h___ + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jslock.h" 1 +# 13 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Marking.h" 2 + + + + +extern "C" { +struct JSContext; +struct JSFunction; +struct JSObject; +struct JSScript; +} + +class JSAtom; +class JSLinearString; + +namespace js { + +class ArgumentsObject; +class BaseShape; +class GlobalObject; +class UnownedBaseShape; +struct Shape; + +template class HeapPtr; + +namespace gc { +# 65 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Marking.h" +#define DeclMarker(base,type) void Mark ##base(JSTracer *trc, HeapPtr *thing, const char *name); void Mark ##base ##Root(JSTracer *trc, type **thingp, const char *name); void Mark ##base ##Unbarriered(JSTracer *trc, type **thingp, const char *name); void Mark ##base ##Range(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void Mark ##base ##RootRange(JSTracer *trc, size_t len, type **thing, const char *name); bool Is ##base ##Marked(type **thingp); bool Is ##base ##Marked(HeapPtr *thingp); +# 74 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Marking.h" +void MarkBaseShape(JSTracer *trc, HeapPtr *thing, const char *name); void MarkBaseShapeRoot(JSTracer *trc, BaseShape **thingp, const char *name); void MarkBaseShapeUnbarriered(JSTracer *trc, BaseShape **thingp, const char *name); void MarkBaseShapeRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkBaseShapeRootRange(JSTracer *trc, size_t len, BaseShape **thing, const char *name); bool IsBaseShapeMarked(BaseShape **thingp); bool IsBaseShapeMarked(HeapPtr *thingp); +void MarkBaseShape(JSTracer *trc, HeapPtr *thing, const char *name); void MarkBaseShapeRoot(JSTracer *trc, UnownedBaseShape **thingp, const char *name); void MarkBaseShapeUnbarriered(JSTracer *trc, UnownedBaseShape **thingp, const char *name); void MarkBaseShapeRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkBaseShapeRootRange(JSTracer *trc, size_t len, UnownedBaseShape **thing, const char *name); bool IsBaseShapeMarked(UnownedBaseShape **thingp); bool IsBaseShapeMarked(HeapPtr *thingp); +void MarkObject(JSTracer *trc, HeapPtr *thing, const char *name); void MarkObjectRoot(JSTracer *trc, ArgumentsObject **thingp, const char *name); void MarkObjectUnbarriered(JSTracer *trc, ArgumentsObject **thingp, const char *name); void MarkObjectRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkObjectRootRange(JSTracer *trc, size_t len, ArgumentsObject **thing, const char *name); bool IsObjectMarked(ArgumentsObject **thingp); bool IsObjectMarked(HeapPtr *thingp); +void MarkObject(JSTracer *trc, HeapPtr *thing, const char *name); void MarkObjectRoot(JSTracer *trc, DebugScopeObject **thingp, const char *name); void MarkObjectUnbarriered(JSTracer *trc, DebugScopeObject **thingp, const char *name); void MarkObjectRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkObjectRootRange(JSTracer *trc, size_t len, DebugScopeObject **thing, const char *name); bool IsObjectMarked(DebugScopeObject **thingp); bool IsObjectMarked(HeapPtr *thingp); +void MarkObject(JSTracer *trc, HeapPtr *thing, const char *name); void MarkObjectRoot(JSTracer *trc, GlobalObject **thingp, const char *name); void MarkObjectUnbarriered(JSTracer *trc, GlobalObject **thingp, const char *name); void MarkObjectRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkObjectRootRange(JSTracer *trc, size_t len, GlobalObject **thing, const char *name); bool IsObjectMarked(GlobalObject **thingp); bool IsObjectMarked(HeapPtr *thingp); +void MarkObject(JSTracer *trc, HeapPtr *thing, const char *name); void MarkObjectRoot(JSTracer *trc, JSObject **thingp, const char *name); void MarkObjectUnbarriered(JSTracer *trc, JSObject **thingp, const char *name); void MarkObjectRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkObjectRootRange(JSTracer *trc, size_t len, JSObject **thing, const char *name); bool IsObjectMarked(JSObject **thingp); bool IsObjectMarked(HeapPtr *thingp); +void MarkObject(JSTracer *trc, HeapPtr *thing, const char *name); void MarkObjectRoot(JSTracer *trc, JSFunction **thingp, const char *name); void MarkObjectUnbarriered(JSTracer *trc, JSFunction **thingp, const char *name); void MarkObjectRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkObjectRootRange(JSTracer *trc, size_t len, JSFunction **thing, const char *name); bool IsObjectMarked(JSFunction **thingp); bool IsObjectMarked(HeapPtr *thingp); +void MarkScript(JSTracer *trc, HeapPtr *thing, const char *name); void MarkScriptRoot(JSTracer *trc, JSScript **thingp, const char *name); void MarkScriptUnbarriered(JSTracer *trc, JSScript **thingp, const char *name); void MarkScriptRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkScriptRootRange(JSTracer *trc, size_t len, JSScript **thing, const char *name); bool IsScriptMarked(JSScript **thingp); bool IsScriptMarked(HeapPtr *thingp); +void MarkShape(JSTracer *trc, HeapPtr *thing, const char *name); void MarkShapeRoot(JSTracer *trc, Shape **thingp, const char *name); void MarkShapeUnbarriered(JSTracer *trc, Shape **thingp, const char *name); void MarkShapeRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkShapeRootRange(JSTracer *trc, size_t len, Shape **thing, const char *name); bool IsShapeMarked(Shape **thingp); bool IsShapeMarked(HeapPtr *thingp); +void MarkString(JSTracer *trc, HeapPtr *thing, const char *name); void MarkStringRoot(JSTracer *trc, JSAtom **thingp, const char *name); void MarkStringUnbarriered(JSTracer *trc, JSAtom **thingp, const char *name); void MarkStringRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkStringRootRange(JSTracer *trc, size_t len, JSAtom **thing, const char *name); bool IsStringMarked(JSAtom **thingp); bool IsStringMarked(HeapPtr *thingp); +void MarkString(JSTracer *trc, HeapPtr *thing, const char *name); void MarkStringRoot(JSTracer *trc, JSString **thingp, const char *name); void MarkStringUnbarriered(JSTracer *trc, JSString **thingp, const char *name); void MarkStringRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkStringRootRange(JSTracer *trc, size_t len, JSString **thing, const char *name); bool IsStringMarked(JSString **thingp); bool IsStringMarked(HeapPtr *thingp); +void MarkString(JSTracer *trc, HeapPtr *thing, const char *name); void MarkStringRoot(JSTracer *trc, JSFlatString **thingp, const char *name); void MarkStringUnbarriered(JSTracer *trc, JSFlatString **thingp, const char *name); void MarkStringRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkStringRootRange(JSTracer *trc, size_t len, JSFlatString **thing, const char *name); bool IsStringMarked(JSFlatString **thingp); bool IsStringMarked(HeapPtr *thingp); +void MarkString(JSTracer *trc, HeapPtr *thing, const char *name); void MarkStringRoot(JSTracer *trc, JSLinearString **thingp, const char *name); void MarkStringUnbarriered(JSTracer *trc, JSLinearString **thingp, const char *name); void MarkStringRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkStringRootRange(JSTracer *trc, size_t len, JSLinearString **thing, const char *name); bool IsStringMarked(JSLinearString **thingp); bool IsStringMarked(HeapPtr *thingp); +void MarkTypeObject(JSTracer *trc, HeapPtr *thing, const char *name); void MarkTypeObjectRoot(JSTracer *trc, types::TypeObject **thingp, const char *name); void MarkTypeObjectUnbarriered(JSTracer *trc, types::TypeObject **thingp, const char *name); void MarkTypeObjectRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkTypeObjectRootRange(JSTracer *trc, size_t len, types::TypeObject **thing, const char *name); bool IsTypeObjectMarked(types::TypeObject **thingp); bool IsTypeObjectMarked(HeapPtr *thingp); + +void MarkXML(JSTracer *trc, HeapPtr *thing, const char *name); void MarkXMLRoot(JSTracer *trc, JSXML **thingp, const char *name); void MarkXMLUnbarriered(JSTracer *trc, JSXML **thingp, const char *name); void MarkXMLRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkXMLRootRange(JSTracer *trc, size_t len, JSXML **thing, const char *name); bool IsXMLMarked(JSXML **thingp); bool IsXMLMarked(HeapPtr *thingp); + + +#undef DeclMarker +# 101 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Marking.h" +void +MarkKind(JSTracer *trc, void **thingp, JSGCTraceKind kind); + +void +MarkGCThingRoot(JSTracer *trc, void **thingp, const char *name); + + + +void +MarkId(JSTracer *trc, EncapsulatedId *id, const char *name); + +void +MarkIdRoot(JSTracer *trc, jsid *id, const char *name); + +void +MarkIdUnbarriered(JSTracer *trc, jsid *id, const char *name); + +void +MarkIdRange(JSTracer *trc, size_t len, HeapId *vec, const char *name); + +void +MarkIdRootRange(JSTracer *trc, size_t len, jsid *vec, const char *name); + + + +void +MarkValue(JSTracer *trc, EncapsulatedValue *v, const char *name); + +void +MarkValueRange(JSTracer *trc, size_t len, EncapsulatedValue *vec, const char *name); + +void +MarkValueRoot(JSTracer *trc, Value *v, const char *name); + +void +MarkValueRootRange(JSTracer *trc, size_t len, Value *vec, const char *name); + +inline void +MarkValueRootRange(JSTracer *trc, Value *begin, Value *end, const char *name) +{ + MarkValueRootRange(trc, end - begin, begin, name); +} + +bool +IsValueMarked(Value *v); + + + +void +MarkSlot(JSTracer *trc, HeapSlot *s, const char *name); + +void +MarkArraySlots(JSTracer *trc, size_t len, HeapSlot *vec, const char *name); + +void +MarkObjectSlots(JSTracer *trc, JSObject *obj, uint32_t start, uint32_t nslots); + +void +MarkCrossCompartmentObjectUnbarriered(JSTracer *trc, JSObject **obj, const char *name); + +void +MarkCrossCompartmentScriptUnbarriered(JSTracer *trc, JSScript **script, const char *name); + + + + + +void +MarkCrossCompartmentSlot(JSTracer *trc, HeapSlot *s, const char *name); +# 178 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Marking.h" +void +MarkObject(JSTracer *trc, HeapPtr *thingp, const char *name); + + +void +MarkValueUnbarriered(JSTracer *trc, Value *v, const char *name); + + + + + +void +MarkChildren(JSTracer *trc, JSObject *obj); + + + + + + +void +MarkCycleCollectorChildren(JSTracer *trc, Shape *shape); + +void +PushArena(GCMarker *gcmarker, ArenaHeader *aheader); +# 210 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Marking.h" +inline void +Mark(JSTracer *trc, HeapValue *v, const char *name) +{ + MarkValue(trc, v, name); +} + +inline void +Mark(JSTracer *trc, HeapPtr *o, const char *name) +{ + MarkObject(trc, o, name); +} + +inline void +Mark(JSTracer *trc, HeapPtr *o, const char *name) +{ + MarkScript(trc, o, name); +} + + +inline void +Mark(JSTracer *trc, HeapPtr *xml, const char *name) +{ + MarkXML(trc, xml, name); +} + + +bool +IsCellMarked(Cell **thingp); + +inline bool +IsMarked(EncapsulatedValue *v) +{ + if (!v->isMarkable()) + return true; + return IsValueMarked(v->unsafeGet()); +} + +inline bool +IsMarked(HeapPtrObject *objp) +{ + return IsObjectMarked(objp); +} + +inline bool +IsMarked(HeapPtrScript *scriptp) +{ + return IsScriptMarked(scriptp); +} + +inline Cell * +ToMarkable(const Value &v) +{ + if (v.isMarkable()) + return (Cell *)v.toGCThing(); + return __null; +} + +inline Cell * +ToMarkable(Cell *cell) +{ + return cell; +} + +inline JSGCTraceKind +TraceKind(const Value &v) +{ + do { } while(0); + if (v.isObject()) + return JSTRACE_OBJECT; + return JSTRACE_STRING; +} + +inline JSGCTraceKind +TraceKind(JSObject *obj) +{ + return JSTRACE_OBJECT; +} + +inline JSGCTraceKind +TraceKind(JSScript *script) +{ + return JSTRACE_SCRIPT; +} + +} + +void +TraceChildren(JSTracer *trc, void *thing, JSGCTraceKind kind); + +void +CallTracer(JSTracer *trc, void *thing, JSGCTraceKind kind); + +} +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" 1 +# 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" 2 + +namespace js { + +static __attribute__((always_inline)) inline void +Debug_SetSlotRangeToCrashOnTouch(HeapSlot *vec, uint32_t len) +{ + + + +} + +static __attribute__((always_inline)) inline void +Debug_SetSlotRangeToCrashOnTouch(HeapSlot *begin, HeapSlot *end) +{ + + + +} + +} + +inline bool +js::ObjectImpl::isExtensible() const +{ + return !lastProperty()->hasObjectFlag(BaseShape::NOT_EXTENSIBLE); +} + +inline bool +js::ObjectImpl::isDenseArray() const +{ + bool result = hasClass(&ArrayClass); + do { } while (0); + return result; +} + +inline bool +js::ObjectImpl::isSlowArray() const +{ + bool result = hasClass(&SlowArrayClass); + do { } while (0); + return result; +} + +inline bool +js::ObjectImpl::isArray() const +{ + return isSlowArray() || isDenseArray(); +} + +inline uint32_t +js::ObjectImpl::getDenseArrayInitializedLength() +{ + do { } while(0); + return getElementsHeader()->initializedLength; +} + +inline js::HeapSlotArray +js::ObjectImpl::getDenseArrayElements() +{ + do { } while(0); + return HeapSlotArray(elements); +} + +inline const js::Value & +js::ObjectImpl::getDenseArrayElement(uint32_t idx) +{ + do { } while(0); + return elements[idx]; +} + +inline void +js::ObjectImpl::getSlotRangeUnchecked(uint32_t start, uint32_t length, + HeapSlot **fixedStart, HeapSlot **fixedEnd, + HeapSlot **slotsStart, HeapSlot **slotsEnd) +{ + do { } while(0); + do { } while(0); + + uint32_t fixed = numFixedSlots(); + if (start < fixed) { + if (start + length < fixed) { + *fixedStart = &fixedSlots()[start]; + *fixedEnd = &fixedSlots()[start + length]; + *slotsStart = *slotsEnd = __null; + } else { + uint32_t localCopy = fixed - start; + *fixedStart = &fixedSlots()[start]; + *fixedEnd = &fixedSlots()[start + localCopy]; + *slotsStart = &slots[0]; + *slotsEnd = &slots[length - localCopy]; + } + } else { + *fixedStart = *fixedEnd = __null; + *slotsStart = &slots[start - fixed]; + *slotsEnd = &slots[start - fixed + length]; + } +} + +inline void +js::ObjectImpl::getSlotRange(uint32_t start, uint32_t length, + HeapSlot **fixedStart, HeapSlot **fixedEnd, + HeapSlot **slotsStart, HeapSlot **slotsEnd) +{ + do { } while(0); + getSlotRangeUnchecked(start, length, fixedStart, fixedEnd, slotsStart, slotsEnd); +} + +inline bool +js::ObjectImpl::hasContiguousSlots(uint32_t start, uint32_t count) const +{ + + + + + do { } while(0); + return start + count <= numFixedSlots() || start >= numFixedSlots(); +} + +inline void +js::ObjectImpl::invalidateSlotRange(uint32_t start, uint32_t length) +{ +# 151 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" +} + +inline void +js::ObjectImpl::initializeSlotRange(uint32_t start, uint32_t length) +{ + + + + + HeapSlot *fixedStart, *fixedEnd, *slotsStart, *slotsEnd; + getSlotRangeUnchecked(start, length, &fixedStart, &fixedEnd, &slotsStart, &slotsEnd); + + JSCompartment *comp = compartment(); + uint32_t offset = start; + for (HeapSlot *sp = fixedStart; sp < fixedEnd; sp++) + sp->init(comp, this->asObjectPtr(), offset++, UndefinedValue()); + for (HeapSlot *sp = slotsStart; sp < slotsEnd; sp++) + sp->init(comp, this->asObjectPtr(), offset++, UndefinedValue()); +} + +inline bool +js::ObjectImpl::isNative() const +{ + return lastProperty()->isNative(); +} + +inline js::HeapSlot & +js::ObjectImpl::nativeGetSlotRef(uint32_t slot) +{ + do { } while(0); + do { } while(0); + return getSlotRef(slot); +} + +inline const js::Value & +js::ObjectImpl::nativeGetSlot(uint32_t slot) const +{ + do { } while(0); + do { } while(0); + return getSlot(slot); +} + +inline void +js::ObjectImpl::setSlot(uint32_t slot, const js::Value &value) +{ + do { } while(0); + getSlotRef(slot).set(this->asObjectPtr(), slot, value); +} + +inline void +js::ObjectImpl::initSlot(uint32_t slot, const js::Value &value) +{ + do { } while(0); + do { } while(0); + initSlotUnchecked(slot, value); +} + +inline void +js::ObjectImpl::initSlotUnchecked(uint32_t slot, const js::Value &value) +{ + getSlotAddressUnchecked(slot)->init(this->asObjectPtr(), slot, value); +} + +inline void +js::ObjectImpl::setFixedSlot(uint32_t slot, const js::Value &value) +{ + do { } while(0); + fixedSlots()[slot].set(this->asObjectPtr(), slot, value); +} + +inline void +js::ObjectImpl::initFixedSlot(uint32_t slot, const js::Value &value) +{ + do { } while(0); + fixedSlots()[slot].init(this->asObjectPtr(), slot, value); +} + +inline uint32_t +js::ObjectImpl::slotSpan() const +{ + if (inDictionaryMode()) + return lastProperty()->base()->slotSpan(); + return lastProperty()->slotSpan(); +} + +inline uint32_t +js::ObjectImpl::numDynamicSlots() const +{ + return dynamicSlotsCount(numFixedSlots(), slotSpan()); +} + +inline js::Class * +js::ObjectImpl::getClass() const +{ + return lastProperty()->getObjectClass(); +} + +inline JSClass * +js::ObjectImpl::getJSClass() const +{ + return Jsvalify(getClass()); +} + +inline bool +js::ObjectImpl::hasClass(const Class *c) const +{ + return getClass() == c; +} + +inline const js::ObjectOps * +js::ObjectImpl::getOps() const +{ + return &getClass()->ops; +} + +inline bool +js::ObjectImpl::isDelegate() const +{ + return lastProperty()->hasObjectFlag(BaseShape::DELEGATE); +} + +inline bool +js::ObjectImpl::inDictionaryMode() const +{ + return lastProperty()->inDictionary(); +} + + inline uint32_t +js::ObjectImpl::dynamicSlotsCount(uint32_t nfixed, uint32_t span) +{ + if (span <= nfixed) + return 0; + span -= nfixed; + if (span <= SLOT_CAPACITY_MIN) + return SLOT_CAPACITY_MIN; + + uint32_t slots = RoundUpPow2(span); + do { } while(0); + return slots; +} + +inline size_t +js::ObjectImpl::sizeOfThis() const +{ + return arenaHeader()->getThingSize(); +} + + inline void +js::ObjectImpl::readBarrier(ObjectImpl *obj) +{ + + JSCompartment *comp = obj->compartment(); + if (comp->needsBarrier()) { + do { } while(0); + JSObject *tmp = obj->asObjectPtr(); + MarkObjectUnbarriered(comp->barrierTracer(), &tmp, "read barrier"); + do { } while(0); + } + +} + +inline void +js::ObjectImpl::privateWriteBarrierPre(void **old) +{ + + JSCompartment *comp = compartment(); + if (comp->needsBarrier()) { + if (*old && getClass()->trace) + getClass()->trace(comp->barrierTracer(), this->asObjectPtr()); + } + +} + +inline void +js::ObjectImpl::privateWriteBarrierPost(void **old) +{ +} + + inline void +js::ObjectImpl::writeBarrierPre(ObjectImpl *obj) +{ + + + + + + if (uintptr_t(obj) < 32) + return; + + JSCompartment *comp = obj->compartment(); + if (comp->needsBarrier()) { + do { } while(0); + JSObject *tmp = obj->asObjectPtr(); + MarkObjectUnbarriered(comp->barrierTracer(), &tmp, "write barrier"); + do { } while(0); + } + +} + + inline void +js::ObjectImpl::writeBarrierPost(ObjectImpl *obj, void *addr) +{ +} + +inline bool +js::ObjectImpl::hasPrivate() const +{ + return getClass()->hasPrivate(); +} + +inline void *& +js::ObjectImpl::privateRef(uint32_t nfixed) const +{ + + + + + + do { } while(0); + do { } while(0); + HeapSlot *end = &fixedSlots()[nfixed]; + return *reinterpret_cast(end); +} + +inline void * +js::ObjectImpl::getPrivate() const +{ + return privateRef(numFixedSlots()); +} + +inline void * +js::ObjectImpl::getPrivate(uint32_t nfixed) const +{ + return privateRef(nfixed); +} + +inline void +js::ObjectImpl::setPrivate(void *data) +{ + void **pprivate = &privateRef(numFixedSlots()); + + privateWriteBarrierPre(pprivate); + *pprivate = data; + privateWriteBarrierPost(pprivate); +} + +inline void +js::ObjectImpl::setPrivateUnbarriered(void *data) +{ + void **pprivate = &privateRef(numFixedSlots()); + *pprivate = data; +} + +inline void +js::ObjectImpl::initPrivate(void *data) +{ + privateRef(numFixedSlots()) = data; +} +# 24 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" 2 + +namespace js { + +namespace mjit { +struct NativeAddressInfo; +struct JSActiveFrame; +} + +namespace Probes { +# 64 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" +extern bool ProfilingActive; + +extern const char nullName[]; +extern const char anonymousName[]; + + +JSBool startEngine(); + + +bool createRuntime(JSRuntime *rt); + + +bool destroyRuntime(JSRuntime *rt); + + +bool shutdown(); + + + + + + +bool callTrackingActive(JSContext *); + + + + + +bool wantNativeAddressInfo(JSContext *); + + +bool enterJSFun(JSContext *, JSFunction *, JSScript *, int counter = 1); + + +bool exitJSFun(JSContext *, JSFunction *, JSScript *, int counter = 0); + + +bool startExecution(JSContext *cx, JSScript *script); + + +bool stopExecution(JSContext *cx, JSScript *script); + + +bool resizeHeap(JSCompartment *compartment, size_t oldSize, size_t newSize); + + + + +bool createObject(JSContext *cx, JSObject *obj); + + +bool objectResizeActive(); + + +bool resizeObject(JSContext *cx, JSObject *obj, size_t oldSize, size_t newSize); + + + + + +bool finalizeObject(JSObject *obj); +# 134 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" +bool createString(JSContext *cx, JSString *string, size_t length); + + + + + + +bool finalizeString(JSString *string); + + +bool compileScriptBegin(const char *filename, int lineno); + + +bool compileScriptEnd(const char *filename, int lineno); + + +bool calloutBegin(JSContext *cx, JSFunction *fun); + + +bool calloutEnd(JSContext *cx, JSFunction *fun); + + +bool acquireMemory(JSContext *cx, void *address, size_t nbytes); +bool releaseMemory(JSContext *cx, void *address, size_t nbytes); +# 170 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" +bool GCStart(); +bool GCEnd(); + +bool GCStartMarkPhase(); +bool GCEndMarkPhase(); + +bool GCStartSweepPhase(); +bool GCEndSweepPhase(); +# 187 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" +bool CustomMark(JSString *string); +bool CustomMark(const char *string); +bool CustomMark(int marker); + + + +enum JITReportGranularity { + JITREPORT_GRANULARITY_NONE = 0, + JITREPORT_GRANULARITY_FUNCTION = 1, + JITREPORT_GRANULARITY_LINE = 2, + JITREPORT_GRANULARITY_OP = 3 +}; + + + + + + +class JITWatcher { +public: + struct NativeRegion { + mjit::JSActiveFrame *frame; + JSScript *script; + size_t inlinedOffset; + jsbytecode *pc; + jsbytecode *endpc; + uintptr_t mainOffset; + uintptr_t stubOffset; + bool enter; + }; + + typedef Vector RegionVector; + + virtual JITReportGranularity granularityRequested() = 0; + + + static bool CollectNativeRegions(RegionVector ®ions, + JSRuntime *rt, + mjit::JITChunk *jit, + mjit::JSActiveFrame *outerFrame, + mjit::JSActiveFrame **inlineFrames); + + virtual void registerMJITCode(JSContext *cx, js::mjit::JITChunk *chunk, + mjit::JSActiveFrame *outerFrame, + mjit::JSActiveFrame **inlineFrames, + void *mainCodeAddress, size_t mainCodeSize, + void *stubCodeAddress, size_t stubCodeSize) = 0; + + virtual void discardMJITCode(FreeOp *fop, mjit::JITScript *jscr, mjit::JITChunk *chunk, + void* address) = 0; + + virtual void registerICCode(JSContext *cx, + js::mjit::JITChunk *chunk, JSScript *script, jsbytecode* pc, + void *start, size_t size) = 0; + + + virtual void discardExecutableRegion(void *start, size_t size) = 0; +}; + + + + + +bool +addJITWatcher(JITWatcher *watcher); + + + + + +bool +removeJITWatcher(JSRuntime *rt, JITWatcher *watcher); + + + + +void +removeAllJITWatchers(JSRuntime *rt); + + + + +JITReportGranularity +JITGranularityRequested(); + + + + + +void +registerMJITCode(JSContext *cx, js::mjit::JITChunk *chunk, + mjit::JSActiveFrame *outerFrame, + mjit::JSActiveFrame **inlineFrames, + void *mainCodeAddress, size_t mainCodeSize, + void *stubCodeAddress, size_t stubCodeSize); + + + + +void +discardMJITCode(FreeOp *fop, mjit::JITScript *jscr, mjit::JITChunk *chunk, void* address); + + + + +void +registerICCode(JSContext *cx, + mjit::JITChunk *chunk, JSScript *script, jsbytecode* pc, + void *start, size_t size); + + + + + + +void +discardExecutableRegion(void *start, size_t size); + + + + + + + +void DTraceEnterJSFun(JSContext *cx, JSFunction *fun, JSScript *script); +void DTraceExitJSFun(JSContext *cx, JSFunction *fun, JSScript *script); +# 350 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" +} + + + + + + +inline bool +Probes::callTrackingActive(JSContext *cx) +{ +# 372 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" + return false; +} + +inline bool +Probes::wantNativeAddressInfo(JSContext *cx) +{ + return (cx->reportGranularity >= JITREPORT_GRANULARITY_FUNCTION && + JITGranularityRequested() >= JITREPORT_GRANULARITY_FUNCTION); +} + +inline bool +Probes::enterJSFun(JSContext *cx, JSFunction *fun, JSScript *script, int counter) +{ + bool ok = true; +# 398 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" + return ok; +} + +inline bool +Probes::exitJSFun(JSContext *cx, JSFunction *fun, JSScript *script, int counter) +{ + bool ok = true; +# 420 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" + return ok; +} + +inline bool +Probes::resizeHeap(JSCompartment *compartment, size_t oldSize, size_t newSize) +{ + bool ok = true; + + + + + + + return ok; +} +# 450 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" +inline bool +Probes::createObject(JSContext *cx, JSObject *obj) +{ + bool ok = true; +# 464 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" + return ok; +} + +inline bool +Probes::finalizeObject(JSObject *obj) +{ + bool ok = true; +# 485 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" + return ok; +} + +inline bool +Probes::objectResizeActive() +{ + + + + + + return false; +} + +inline bool +Probes::resizeObject(JSContext *cx, JSObject *obj, size_t oldSize, size_t newSize) +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::createString(JSContext *cx, JSString *string, size_t length) +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::finalizeString(JSString *string) +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::compileScriptBegin(const char *filename, int lineno) +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::compileScriptEnd(const char *filename, int lineno) +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::calloutBegin(JSContext *cx, JSFunction *fun) +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::calloutEnd(JSContext *cx, JSFunction *fun) +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::acquireMemory(JSContext *cx, void *address, size_t nbytes) +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::releaseMemory(JSContext *cx, void *address, size_t nbytes) +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::GCStart() +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::GCEnd() +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::GCStartMarkPhase() +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::GCEndMarkPhase() +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::GCStartSweepPhase() +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::GCEndSweepPhase() +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::CustomMark(JSString *string) +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::CustomMark(const char *string) +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::CustomMark(int marker) +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::startExecution(JSContext *cx, JSScript *script) +{ + bool ok = true; +# 748 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" + return ok; +} + +inline bool +Probes::stopExecution(JSContext *cx, JSScript *script) +{ + bool ok = true; +# 766 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" + return ok; +} + +struct AutoFunctionCallProbe { + JSContext * const cx; + JSFunction *fun; + JSScript *script; + + + AutoFunctionCallProbe(JSContext *cx, JSFunction *fun, JSScript *script + ) + : cx(cx), fun(fun), script(script) + { + do { } while (0); + Probes::enterJSFun(cx, fun, script); + } + + ~AutoFunctionCallProbe() { + Probes::exitJSFun(cx, fun, script); + } +}; + +} +# 23 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsproxy.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsproxy.h" +#define jsproxy_h___ + + + + +namespace js { + + +class __attribute__((visibility("default"))) BaseProxyHandler { + void *mFamily; + public: + explicit BaseProxyHandler(void *family); + virtual ~BaseProxyHandler(); + + + virtual bool getPropertyDescriptor(JSContext *cx, JSObject *proxy, jsid id, bool set, + PropertyDescriptor *desc) = 0; + virtual bool getOwnPropertyDescriptor(JSContext *cx, JSObject *proxy, jsid id, bool set, + PropertyDescriptor *desc) = 0; + virtual bool defineProperty(JSContext *cx, JSObject *proxy, jsid id, + PropertyDescriptor *desc) = 0; + virtual bool getOwnPropertyNames(JSContext *cx, JSObject *proxy, AutoIdVector &props) = 0; + virtual bool delete_(JSContext *cx, JSObject *proxy, jsid id, bool *bp) = 0; + virtual bool enumerate(JSContext *cx, JSObject *proxy, AutoIdVector &props) = 0; + + + virtual bool has(JSContext *cx, JSObject *proxy, jsid id, bool *bp); + virtual bool hasOwn(JSContext *cx, JSObject *proxy, jsid id, bool *bp); + virtual bool get(JSContext *cx, JSObject *proxy, JSObject *receiver, jsid id, Value *vp); + virtual bool set(JSContext *cx, JSObject *proxy, JSObject *receiver, jsid id, bool strict, + Value *vp); + virtual bool keys(JSContext *cx, JSObject *proxy, AutoIdVector &props); + virtual bool iterate(JSContext *cx, JSObject *proxy, unsigned flags, Value *vp); + + + virtual bool call(JSContext *cx, JSObject *proxy, unsigned argc, Value *vp); + virtual bool construct(JSContext *cx, JSObject *proxy, unsigned argc, Value *argv, Value *rval); + virtual bool nativeCall(JSContext *cx, JSObject *proxy, Class *clasp, Native native, CallArgs args); + virtual bool hasInstance(JSContext *cx, JSObject *proxy, const Value *vp, bool *bp); + virtual JSType typeOf(JSContext *cx, JSObject *proxy); + virtual bool objectClassIs(JSObject *obj, ESClassValue classValue, JSContext *cx); + virtual JSString *obj_toString(JSContext *cx, JSObject *proxy); + virtual JSString *fun_toString(JSContext *cx, JSObject *proxy, unsigned indent); + virtual bool regexp_toShared(JSContext *cx, JSObject *proxy, RegExpGuard *g); + virtual bool defaultValue(JSContext *cx, JSObject *obj, JSType hint, Value *vp); + virtual bool iteratorNext(JSContext *cx, JSObject *proxy, Value *vp); + virtual void finalize(JSFreeOp *fop, JSObject *proxy); + virtual bool getElementIfPresent(JSContext *cx, JSObject *obj, JSObject *receiver, + uint32_t index, Value *vp, bool *present); + + virtual bool isOuterWindow() { + return false; + } + + inline void *family() { + return mFamily; + } +}; + +class __attribute__((visibility("default"))) IndirectProxyHandler : public BaseProxyHandler { + public: + explicit IndirectProxyHandler(void *family); + + + virtual bool getPropertyDescriptor(JSContext *cx, JSObject *proxy, jsid id, + bool set, + PropertyDescriptor *desc) ; + virtual bool getOwnPropertyDescriptor(JSContext *cx, JSObject *proxy, + jsid id, bool set, + PropertyDescriptor *desc) ; + virtual bool defineProperty(JSContext *cx, JSObject *proxy, jsid id, + PropertyDescriptor *desc) ; + virtual bool getOwnPropertyNames(JSContext *cx, JSObject *proxy, + AutoIdVector &props) ; + virtual bool delete_(JSContext *cx, JSObject *proxy, jsid id, + bool *bp) ; + virtual bool enumerate(JSContext *cx, JSObject *proxy, + AutoIdVector &props) ; + + + + + virtual bool call(JSContext *cx, JSObject *proxy, unsigned argc, + Value *vp) ; + virtual bool construct(JSContext *cx, JSObject *proxy, unsigned argc, + Value *argv, Value *rval) ; + virtual bool nativeCall(JSContext *cx, JSObject *proxy, Class *clasp, + Native native, CallArgs args) ; + virtual bool hasInstance(JSContext *cx, JSObject *proxy, const Value *vp, + bool *bp) ; + virtual JSType typeOf(JSContext *cx, JSObject *proxy) ; + virtual bool objectClassIs(JSObject *obj, ESClassValue classValue, + JSContext *cx) ; + virtual JSString *obj_toString(JSContext *cx, JSObject *proxy) ; + virtual JSString *fun_toString(JSContext *cx, JSObject *proxy, + unsigned indent) ; + virtual bool regexp_toShared(JSContext *cx, JSObject *proxy, + RegExpGuard *g) ; + virtual bool defaultValue(JSContext *cx, JSObject *obj, JSType hint, + Value *vp) ; + virtual bool iteratorNext(JSContext *cx, JSObject *proxy, + Value *vp) ; +}; + +class __attribute__((visibility("default"))) DirectProxyHandler : public IndirectProxyHandler { +public: + explicit DirectProxyHandler(void *family); + + + virtual bool has(JSContext *cx, JSObject *proxy, jsid id, + bool *bp) ; + virtual bool hasOwn(JSContext *cx, JSObject *proxy, jsid id, + bool *bp) ; + virtual bool get(JSContext *cx, JSObject *proxy, JSObject *receiver, + jsid id, Value *vp) ; + virtual bool set(JSContext *cx, JSObject *proxy, JSObject *receiver, + jsid id, bool strict, Value *vp) ; + virtual bool keys(JSContext *cx, JSObject *proxy, + AutoIdVector &props) ; + virtual bool iterate(JSContext *cx, JSObject *proxy, unsigned flags, + Value *vp) ; +}; + + +class Proxy { + public: + + static bool getPropertyDescriptor(JSContext *cx, JSObject *proxy, jsid id, bool set, + PropertyDescriptor *desc); + static bool getPropertyDescriptor(JSContext *cx, JSObject *proxy, jsid id, bool set, Value *vp); + static bool getOwnPropertyDescriptor(JSContext *cx, JSObject *proxy, jsid id, bool set, + PropertyDescriptor *desc); + static bool getOwnPropertyDescriptor(JSContext *cx, JSObject *proxy, jsid id, bool set, + Value *vp); + static bool defineProperty(JSContext *cx, JSObject *proxy, jsid id, PropertyDescriptor *desc); + static bool defineProperty(JSContext *cx, JSObject *proxy, jsid id, const Value &v); + static bool getOwnPropertyNames(JSContext *cx, JSObject *proxy, AutoIdVector &props); + static bool delete_(JSContext *cx, JSObject *proxy, jsid id, bool *bp); + static bool enumerate(JSContext *cx, JSObject *proxy, AutoIdVector &props); + + + static bool has(JSContext *cx, JSObject *proxy, jsid id, bool *bp); + static bool hasOwn(JSContext *cx, JSObject *proxy, jsid id, bool *bp); + static bool get(JSContext *cx, JSObject *proxy, JSObject *receiver, jsid id, Value *vp); + static bool getElementIfPresent(JSContext *cx, JSObject *proxy, JSObject *receiver, + uint32_t index, Value *vp, bool *present); + static bool set(JSContext *cx, JSObject *proxy, JSObject *receiver, jsid id, bool strict, + Value *vp); + static bool keys(JSContext *cx, JSObject *proxy, AutoIdVector &props); + static bool iterate(JSContext *cx, JSObject *proxy, unsigned flags, Value *vp); + + + static bool call(JSContext *cx, JSObject *proxy, unsigned argc, Value *vp); + static bool construct(JSContext *cx, JSObject *proxy, unsigned argc, Value *argv, Value *rval); + static bool nativeCall(JSContext *cx, JSObject *proxy, Class *clasp, Native native, CallArgs args); + static bool hasInstance(JSContext *cx, JSObject *proxy, const Value *vp, bool *bp); + static JSType typeOf(JSContext *cx, JSObject *proxy); + static bool objectClassIs(JSObject *obj, ESClassValue classValue, JSContext *cx); + static JSString *obj_toString(JSContext *cx, JSObject *proxy); + static JSString *fun_toString(JSContext *cx, JSObject *proxy, unsigned indent); + static bool regexp_toShared(JSContext *cx, JSObject *proxy, RegExpGuard *g); + static bool defaultValue(JSContext *cx, JSObject *obj, JSType hint, Value *vp); + static bool iteratorNext(JSContext *cx, JSObject *proxy, Value *vp); +}; + +inline bool IsObjectProxyClass(const Class *clasp) +{ + return clasp == &js::ObjectProxyClass || clasp == &js::OuterWindowProxyClass; +} + +inline bool IsFunctionProxyClass(const Class *clasp) +{ + return clasp == &js::FunctionProxyClass; +} + +inline bool IsObjectProxy(const JSObject *obj) +{ + return IsObjectProxyClass(GetObjectClass(obj)); +} + +inline bool IsFunctionProxy(const JSObject *obj) +{ + return IsFunctionProxyClass(GetObjectClass(obj)); +} + +inline bool IsProxy(const JSObject *obj) +{ + Class *clasp = GetObjectClass(obj); + return IsObjectProxyClass(clasp) || IsFunctionProxyClass(clasp); +} + + +const uint32_t JSSLOT_PROXY_HANDLER = 0; +const uint32_t JSSLOT_PROXY_PRIVATE = 1; +const uint32_t JSSLOT_PROXY_EXTRA = 2; + +const uint32_t JSSLOT_PROXY_CALL = 4; +const uint32_t JSSLOT_PROXY_CONSTRUCT = 5; + +inline BaseProxyHandler * +GetProxyHandler(const JSObject *obj) +{ + do { } while(0); + return (BaseProxyHandler *) GetReservedSlot(obj, JSSLOT_PROXY_HANDLER).toPrivate(); +} + +inline const Value & +GetProxyPrivate(const JSObject *obj) +{ + do { } while(0); + return GetReservedSlot(obj, JSSLOT_PROXY_PRIVATE); +} + +inline JSObject * +GetProxyTargetObject(const JSObject *obj) +{ + do { } while(0); + return GetProxyPrivate(obj).toObjectOrNull(); +} + +inline const Value & +GetProxyCall(const JSObject *obj) +{ + do { } while(0); + return GetReservedSlot(obj, JSSLOT_PROXY_CALL); +} + +inline const Value & +GetProxyExtra(const JSObject *obj, size_t n) +{ + do { } while(0); + return GetReservedSlot(obj, JSSLOT_PROXY_EXTRA + n); +} + +inline void +SetProxyHandler(JSObject *obj, BaseProxyHandler *handler) +{ + do { } while(0); + SetReservedSlot(obj, JSSLOT_PROXY_HANDLER, PrivateValue(handler)); +} + +inline void +SetProxyPrivate(JSObject *obj, const Value &value) +{ + do { } while(0); + SetReservedSlot(obj, JSSLOT_PROXY_PRIVATE, value); +} + +inline void +SetProxyExtra(JSObject *obj, size_t n, const Value &extra) +{ + do { } while(0); + do { } while(0); + SetReservedSlot(obj, JSSLOT_PROXY_EXTRA + n, extra); +} + +__attribute__((visibility("default"))) JSObject * +NewProxyObject(JSContext *cx, BaseProxyHandler *handler, const Value &priv, + JSObject *proto, JSObject *parent, + JSObject *call = __null, JSObject *construct = __null); + +} + +extern "C" { + +extern __attribute__((visibility("default"))) JSObject * +js_InitProxyClass(JSContext *cx, JSObject *obj); + +} +# 25 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypedarray.h" 1 + + + + + + + +#define jstypedarray_h + + + + + + + +typedef struct JSProperty JSProperty; + +namespace js { +# 28 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypedarray.h" +class ArrayBufferObject : public JSObject +{ + public: + static Class protoClass; + static JSPropertySpec jsprops[]; + static JSFunctionSpec jsfuncs[]; + + static JSBool prop_getByteLength(JSContext *cx, HandleObject obj, HandleId id, Value *vp); + + static JSBool fun_slice(JSContext *cx, unsigned argc, Value *vp); + + static JSBool class_constructor(JSContext *cx, unsigned argc, Value *vp); + + static JSObject *create(JSContext *cx, uint32_t nbytes, uint8_t *contents = __null); + + static JSObject *createSlice(JSContext *cx, ArrayBufferObject &arrayBuffer, + uint32_t begin, uint32_t end); + + static void + obj_trace(JSTracer *trc, JSObject *obj); + + static JSBool + obj_lookupGeneric(JSContext *cx, HandleObject obj, HandleId id, + JSObject **objp, JSProperty **propp); + static JSBool + obj_lookupProperty(JSContext *cx, HandleObject obj, HandlePropertyName name, + JSObject **objp, JSProperty **propp); + static JSBool + obj_lookupElement(JSContext *cx, HandleObject obj, uint32_t index, + JSObject **objp, JSProperty **propp); + static JSBool + obj_lookupSpecial(JSContext *cx, HandleObject obj, HandleSpecialId sid, JSObject **objp, + JSProperty **propp); + + static JSBool + obj_defineGeneric(JSContext *cx, HandleObject obj, HandleId id, const Value *v, + PropertyOp getter, StrictPropertyOp setter, unsigned attrs); + static JSBool + obj_defineProperty(JSContext *cx, HandleObject obj, HandlePropertyName name, const Value *v, + PropertyOp getter, StrictPropertyOp setter, unsigned attrs); + static JSBool + obj_defineElement(JSContext *cx, HandleObject obj, uint32_t index, const Value *v, + PropertyOp getter, StrictPropertyOp setter, unsigned attrs); + static JSBool + obj_defineSpecial(JSContext *cx, HandleObject obj, HandleSpecialId sid, const Value *v, + PropertyOp getter, StrictPropertyOp setter, unsigned attrs); + + static JSBool + obj_getGeneric(JSContext *cx, HandleObject obj, HandleObject receiver, HandleId id, Value *vp); + + static JSBool + obj_getProperty(JSContext *cx, HandleObject obj, HandleObject receiver, HandlePropertyName name, + Value *vp); + + static JSBool + obj_getElement(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index, Value *vp); + static JSBool + obj_getElementIfPresent(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index, + Value *vp, bool *present); + + static JSBool + obj_getSpecial(JSContext *cx, HandleObject obj, HandleObject receiver, HandleSpecialId sid, Value *vp); + + static JSBool + obj_setGeneric(JSContext *cx, HandleObject obj, HandleId id, Value *vp, JSBool strict); + static JSBool + obj_setProperty(JSContext *cx, HandleObject obj, HandlePropertyName name, Value *vp, JSBool strict); + static JSBool + obj_setElement(JSContext *cx, HandleObject obj, uint32_t index, Value *vp, JSBool strict); + static JSBool + obj_setSpecial(JSContext *cx, HandleObject obj, HandleSpecialId sid, Value *vp, JSBool strict); + + static JSBool + obj_getGenericAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp); + static JSBool + obj_getPropertyAttributes(JSContext *cx, HandleObject obj, HandlePropertyName name, unsigned *attrsp); + static JSBool + obj_getElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp); + static JSBool + obj_getSpecialAttributes(JSContext *cx, HandleObject obj, HandleSpecialId sid, unsigned *attrsp); + + static JSBool + obj_setGenericAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp); + static JSBool + obj_setPropertyAttributes(JSContext *cx, HandleObject obj, HandlePropertyName name, unsigned *attrsp); + static JSBool + obj_setElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp); + static JSBool + obj_setSpecialAttributes(JSContext *cx, HandleObject obj, HandleSpecialId sid, unsigned *attrsp); + + static JSBool + obj_deleteProperty(JSContext *cx, HandleObject obj, HandlePropertyName name, Value *rval, JSBool strict); + static JSBool + obj_deleteElement(JSContext *cx, HandleObject obj, uint32_t index, Value *rval, JSBool strict); + static JSBool + obj_deleteSpecial(JSContext *cx, HandleObject obj, HandleSpecialId sid, Value *rval, JSBool strict); + + static JSBool + obj_enumerate(JSContext *cx, HandleObject obj, JSIterateOp enum_op, + Value *statep, jsid *idp); + + static JSType + obj_typeOf(JSContext *cx, HandleObject obj); + + bool + allocateSlots(JSContext *cx, uint32_t size, uint8_t *contents = __null); + + inline uint32_t byteLength() const; + + inline uint8_t * dataPointer() const; + + + + + + inline bool hasData() const; +}; +# 154 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypedarray.h" +struct TypedArray { + enum { + TYPE_INT8 = 0, + TYPE_UINT8, + TYPE_INT16, + TYPE_UINT16, + TYPE_INT32, + TYPE_UINT32, + TYPE_FLOAT32, + TYPE_FLOAT64, + + + + + + TYPE_UINT8_CLAMPED, + + TYPE_MAX + }; + + enum { + + FIELD_LENGTH = 0, + FIELD_BYTEOFFSET, + FIELD_BYTELENGTH, + FIELD_TYPE, + FIELD_BUFFER, + FIELD_MAX, + NUM_FIXED_SLOTS = 7 + }; + + + static Class classes[TYPE_MAX]; + + + + static Class protoClasses[TYPE_MAX]; + + static JSPropertySpec jsprops[]; + + static JSBool prop_getBuffer(JSContext *cx, HandleObject obj, HandleId id, Value *vp); + static JSBool prop_getByteOffset(JSContext *cx, HandleObject obj, HandleId id, Value *vp); + static JSBool prop_getByteLength(JSContext *cx, HandleObject obj, HandleId id, Value *vp); + static JSBool prop_getLength(JSContext *cx, HandleObject obj, HandleId id, Value *vp); + + static JSBool obj_lookupGeneric(JSContext *cx, HandleObject obj, HandleId id, + JSObject **objp, JSProperty **propp); + static JSBool obj_lookupProperty(JSContext *cx, HandleObject obj, HandlePropertyName name, + JSObject **objp, JSProperty **propp); + static JSBool obj_lookupElement(JSContext *cx, HandleObject obj, uint32_t index, + JSObject **objp, JSProperty **propp); + static JSBool obj_lookupSpecial(JSContext *cx, HandleObject obj, HandleSpecialId sid, + JSObject **objp, JSProperty **propp); + + static JSBool obj_getGenericAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp); + static JSBool obj_getPropertyAttributes(JSContext *cx, HandleObject obj, HandlePropertyName name, unsigned *attrsp); + static JSBool obj_getElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp); + static JSBool obj_getSpecialAttributes(JSContext *cx, HandleObject obj, HandleSpecialId sid, unsigned *attrsp); + + static JSBool obj_setGenericAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp); + static JSBool obj_setPropertyAttributes(JSContext *cx, HandleObject obj, HandlePropertyName name, unsigned *attrsp); + static JSBool obj_setElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp); + static JSBool obj_setSpecialAttributes(JSContext *cx, HandleObject obj, HandleSpecialId sid, unsigned *attrsp); + + static uint32_t getLength(JSObject *obj); + static uint32_t getByteOffset(JSObject *obj); + static uint32_t getByteLength(JSObject *obj); + static uint32_t getType(JSObject *obj); + static ArrayBufferObject * getBuffer(JSObject *obj); + static void * getDataOffset(JSObject *obj); + + public: + static bool + isArrayIndex(JSContext *cx, JSObject *obj, jsid id, uint32_t *ip = __null); + + static inline uint32_t slotWidth(int atype) { + switch (atype) { + case js::TypedArray::TYPE_INT8: + case js::TypedArray::TYPE_UINT8: + case js::TypedArray::TYPE_UINT8_CLAMPED: + return 1; + case js::TypedArray::TYPE_INT16: + case js::TypedArray::TYPE_UINT16: + return 2; + case js::TypedArray::TYPE_INT32: + case js::TypedArray::TYPE_UINT32: + case js::TypedArray::TYPE_FLOAT32: + return 4; + case js::TypedArray::TYPE_FLOAT64: + return 8; + default: + __builtin_unreachable(); + return 0; + } + } + + static inline int slotWidth(JSObject *obj) { + return slotWidth(getType(obj)); + } + + static int lengthOffset(); + static int dataOffset(); +}; + +inline bool +IsTypedArrayClass(const Class *clasp) +{ + return &TypedArray::classes[0] <= clasp && + clasp < &TypedArray::classes[TypedArray::TYPE_MAX]; +} + +inline bool +IsTypedArrayProtoClass(const Class *clasp) +{ + return &TypedArray::protoClasses[0] <= clasp && + clasp < &TypedArray::protoClasses[TypedArray::TYPE_MAX]; +} + +inline bool +IsTypedArray(JSObject *obj) +{ + return IsTypedArrayClass(obj->getClass()); +} + +inline bool +IsTypedArrayProto(JSObject *obj) +{ + return IsTypedArrayProtoClass(obj->getClass()); +} + +class DataViewObject : public JSObject +{ + static Class protoClass; + + static const size_t BYTEOFFSET_SLOT = 0; + static const size_t BYTELENGTH_SLOT = 1; + static const size_t BUFFER_SLOT = 2; + + public: + static const size_t RESERVED_SLOTS = 3; + + static JSBool prop_getBuffer(JSContext *cx, HandleObject obj, HandleId id, Value *vp); + static JSBool prop_getByteOffset(JSContext *cx, HandleObject obj, HandleId id, Value *vp); + static JSBool prop_getByteLength(JSContext *cx, HandleObject obj, HandleId id, Value *vp); + + static JSBool class_constructor(JSContext *cx, unsigned argc, Value *vp); + static JSBool constructWithProto(JSContext *cx, unsigned argc, Value *vp); + static JSBool construct(JSContext *cx, JSObject *bufobj, const CallArgs &args, JSObject *proto); + + static inline DataViewObject * + create(JSContext *cx, uint32_t byteOffset, uint32_t byteLength, + Handle arrayBuffer, JSObject *proto); + + static JSBool fun_getInt8(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_getUint8(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_getInt16(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_getUint16(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_getInt32(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_getUint32(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_getFloat32(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_getFloat64(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_setInt8(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_setUint8(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_setInt16(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_setUint16(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_setInt32(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_setUint32(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_setFloat32(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_setFloat64(JSContext *cx, unsigned argc, Value *vp); + inline uint32_t byteLength(); + inline uint32_t byteOffset(); + inline JSObject & arrayBuffer(); + inline void *dataPointer(); + inline bool hasBuffer() const; + static JSObject *initClass(JSContext *cx, GlobalObject *global); + bool getDataPointer(JSContext *cx, CallArgs args, size_t typeSize, uint8_t **data); + template + bool read(JSContext *cx, CallArgs &args, NativeType *val, const char *method); + template + bool write(JSContext *cx, CallArgs &args, const char *method); + private: + static JSPropertySpec jsprops[]; + static JSFunctionSpec jsfuncs[]; +}; + +bool +IsDataView(JSObject *obj); + +} +# 28 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsxml.h" 1 + + + + + + + +#define jsxml_h___ +# 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsxml.h" +extern const char js_AnyName_str[]; +extern const char js_AttributeName_str[]; +extern const char js_isXMLName_str[]; +extern const char js_XMLList_str[]; + +extern const char js_amp_entity_str[]; +extern const char js_gt_entity_str[]; +extern const char js_lt_entity_str[]; +extern const char js_quot_entity_str[]; + +template +struct JSXMLArrayCursor; + +template +struct JSXMLArray +{ + uint32_t length; + uint32_t capacity; + js::HeapPtr *vector; + JSXMLArrayCursor *cursors; + + void init() { + length = capacity = 0; + vector = __null; + cursors = __null; + } + + void finish(js::FreeOp *fop); + + bool setCapacity(JSContext *cx, uint32_t capacity); + void trim(); +}; + +template +struct JSXMLArrayCursor +{ + typedef js::HeapPtr HeapPtrT; + + JSXMLArray *array; + uint32_t index; + JSXMLArrayCursor *next; + JSXMLArrayCursor **prevp; + HeapPtrT root; + + JSXMLArrayCursor(JSXMLArray *array) + : array(array), index(0), next(array->cursors), prevp(&array->cursors), + root(__null) + { + if (next) + next->prevp = &next; + array->cursors = this; + } + + ~JSXMLArrayCursor() { disconnect(); } + + void disconnect() { + if (!array) + return; + if (next) + next->prevp = prevp; + *prevp = next; + array = __null; + root.~HeapPtrT(); + } + + T *getNext() { + if (!array || index >= array->length) + return __null; + return root = array->vector[index++]; + } + + T *getCurrent() { + if (!array || index >= array->length) + return __null; + return root = array->vector[index]; + } +}; + +void js_XMLArrayCursorTrace(JSTracer *trc, JSXMLArrayCursor *cursor); +void js_XMLArrayCursorTrace(JSTracer *trc, JSXMLArrayCursor *cursor); + +#define JSXML_PRESET_CAPACITY JS_BIT(31) +#define JSXML_CAPACITY_MASK JS_BITMASK(31) +#define JSXML_CAPACITY(array) ((array)->capacity & JSXML_CAPACITY_MASK) + + + + + +typedef enum JSXMLClass { + JSXML_CLASS_LIST, + JSXML_CLASS_ELEMENT, + JSXML_CLASS_ATTRIBUTE, + JSXML_CLASS_PROCESSING_INSTRUCTION, + JSXML_CLASS_TEXT, + JSXML_CLASS_COMMENT, + JSXML_CLASS_LIMIT +} JSXMLClass; + +#define JSXML_CLASS_HAS_KIDS(class_) ((class_) < JSXML_CLASS_ATTRIBUTE) +#define JSXML_CLASS_HAS_VALUE(class_) ((class_) >= JSXML_CLASS_ATTRIBUTE) +#define JSXML_CLASS_HAS_NAME(class_) ((unsigned)((class_) - JSXML_CLASS_ELEMENT) <= (unsigned)(JSXML_CLASS_PROCESSING_INSTRUCTION - JSXML_CLASS_ELEMENT)) + + + + + + + +typedef struct JSXMLListVar { + JSXMLArray kids; + js::HeapPtrXML target; + js::HeapPtrObject targetprop; +} JSXMLListVar; + +typedef struct JSXMLElemVar { + JSXMLArray kids; + JSXMLArray namespaces; + JSXMLArray attrs; +} JSXMLElemVar; + + +#define xml_kids list.kids +#define xml_target list.target +#define xml_targetprop list.targetprop +#define xml_namespaces elem.namespaces +#define xml_attrs elem.attrs +#define xml_value value + + +#define JSXML_HAS_KIDS(xml) JSXML_CLASS_HAS_KIDS((xml)->xml_class) +#define JSXML_HAS_VALUE(xml) JSXML_CLASS_HAS_VALUE((xml)->xml_class) +#define JSXML_HAS_NAME(xml) JSXML_CLASS_HAS_NAME((xml)->xml_class) +#define JSXML_LENGTH(xml) (JSXML_CLASS_HAS_KIDS((xml)->xml_class) ? (xml)->xml_kids.length : 0) + + + +struct JSXML : js::gc::Cell { + + + + + js::HeapPtrObject object; + void *domnode; + js::HeapPtrXML parent; + js::HeapPtrObject name; + uint32_t xml_class; + uint32_t xml_flags; + + JSXMLListVar list; + JSXMLElemVar elem; + js::HeapPtrString value; + + + + void *pad; + + + void finalize(js::FreeOp *fop); + + static void writeBarrierPre(JSXML *xml); + static void writeBarrierPost(JSXML *xml, void *addr); +}; + + +#define XMLF_WHITESPACE_TEXT 0x1 + +extern JSXML * +js_NewXML(JSContext *cx, JSXMLClass xml_class); + +extern void +js_TraceXML(JSTracer *trc, JSXML *xml); + +extern JSObject * +js_NewXMLObject(JSContext *cx, JSXMLClass xml_class); + +extern JSObject * +js_GetXMLObject(JSContext *cx, JSXML *xml); + +extern JSObject * +js_InitNamespaceClass(JSContext *cx, JSObject *obj); + +extern JSObject * +js_InitQNameClass(JSContext *cx, JSObject *obj); + +extern JSObject * +js_InitXMLClass(JSContext *cx, JSObject *obj); + +extern JSObject * +js_InitXMLClasses(JSContext *cx, JSObject *obj); + + + + + +extern bool +js_GetLocalNameFromFunctionQName(JSObject *obj, jsid *funidp, JSContext *cx); + +extern JSBool +js_GetDefaultXMLNamespace(JSContext *cx, jsval *vp); + +extern JSBool +js_SetDefaultXMLNamespace(JSContext *cx, const js::Value &v); + + + + + + +extern JSBool +js_IsXMLName(JSContext *cx, jsval v); + +extern JSBool +js_ToAttributeName(JSContext *cx, js::Value *vp); + +extern JSFlatString * +js_EscapeAttributeValue(JSContext *cx, JSString *str, JSBool quote); + +extern JSString * +js_AddAttributePart(JSContext *cx, JSBool isName, JSString *str, + JSString *str2); + +extern JSFlatString * +js_EscapeElementValue(JSContext *cx, JSString *str); + +extern JSString * +js_ValueToXMLString(JSContext *cx, const js::Value &v); + +extern JSObject * +js_ConstructXMLQNameObject(JSContext *cx, const js::Value & nsval, + const js::Value & lnval); + +extern JSBool +js_GetAnyName(JSContext *cx, jsid *idp); + + + + +extern JSBool +js_FindXMLProperty(JSContext *cx, const js::Value &nameval, JSObject **objp, jsid *idp); + +extern JSBool +js_GetXMLMethod(JSContext *cx, js::HandleObject obj, jsid id, js::Value *vp); + +extern JSBool +js_GetXMLDescendants(JSContext *cx, JSObject *obj, jsval id, jsval *vp); + +extern JSBool +js_DeleteXMLListElements(JSContext *cx, JSObject *listobj); + +extern JSBool +js_StepXMLListFilter(JSContext *cx, JSBool initialized); + +extern JSObject * +js_ValueToXMLObject(JSContext *cx, const js::Value &v); + +extern JSObject * +js_ValueToXMLListObject(JSContext *cx, const js::Value &v); + +extern JSObject * +js_NewXMLSpecialObject(JSContext *cx, JSXMLClass xml_class, JSString *name, + JSString *value); + +extern JSString * +js_MakeXMLCDATAString(JSContext *cx, JSString *str); + +extern JSString * +js_MakeXMLCommentString(JSContext *cx, JSString *str); + +extern JSString * +js_MakeXMLPIString(JSContext *cx, JSString *name, JSString *str); + + +extern JSBool +js_TestXMLEquality(JSContext *cx, const js::Value &v1, const js::Value &v2, + JSBool *bp); + +extern JSBool +js_ConcatenateXML(JSContext *cx, JSObject *obj1, JSObject *obj2, js::Value *vp); + +namespace js { + +extern bool +GetLocalNameFromFunctionQName(JSObject *qn, JSAtom **namep, JSContext *cx); + +} +# 29 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jswrapper.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jswrapper.h" +#define jswrapper_h___ + + + + + + +namespace js { + +class DummyFrameGuard; + + + + + + +class __attribute__((visibility("default"))) AbstractWrapper : public IndirectProxyHandler +{ + unsigned mFlags; + public: + unsigned flags() const { return mFlags; } + + explicit AbstractWrapper(unsigned flags); + + + virtual bool getPropertyDescriptor(JSContext *cx, JSObject *wrapper, jsid id, bool set, + PropertyDescriptor *desc) ; + virtual bool getOwnPropertyDescriptor(JSContext *cx, JSObject *wrapper, jsid id, bool set, + PropertyDescriptor *desc) ; + virtual bool defineProperty(JSContext *cx, JSObject *wrapper, jsid id, + PropertyDescriptor *desc) ; + virtual bool getOwnPropertyNames(JSContext *cx, JSObject *wrapper, AutoIdVector &props) ; + virtual bool delete_(JSContext *cx, JSObject *wrapper, jsid id, bool *bp) ; + virtual bool enumerate(JSContext *cx, JSObject *wrapper, AutoIdVector &props) ; +# 72 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jswrapper.h" + enum Action { GET, SET, CALL, PUNCTURE }; + virtual bool enter(JSContext *cx, JSObject *wrapper, jsid id, Action act, bool *bp); + virtual void leave(JSContext *cx, JSObject *wrapper); + + static JSObject *wrappedObject(const JSObject *wrapper); + static AbstractWrapper *wrapperHandler(const JSObject *wrapper); +}; + + +class __attribute__((visibility("default"))) DirectWrapper : public AbstractWrapper +{ + public: + explicit DirectWrapper(unsigned flags); + + typedef enum { PermitObjectAccess, PermitPropertyAccess, DenyAccess } Permission; + + virtual ~DirectWrapper(); + + + virtual bool has(JSContext *cx, JSObject *wrapper, jsid id, bool *bp) ; + virtual bool hasOwn(JSContext *cx, JSObject *wrapper, jsid id, bool *bp) ; + virtual bool get(JSContext *cx, JSObject *wrapper, JSObject *receiver, jsid id, Value *vp) ; + virtual bool set(JSContext *cx, JSObject *wrapper, JSObject *receiver, jsid id, bool strict, + Value *vp) ; + virtual bool keys(JSContext *cx, JSObject *wrapper, AutoIdVector &props) ; + virtual bool iterate(JSContext *cx, JSObject *wrapper, unsigned flags, Value *vp) ; + + + virtual bool call(JSContext *cx, JSObject *wrapper, unsigned argc, Value *vp) ; + virtual bool construct(JSContext *cx, JSObject *wrapper, unsigned argc, Value *argv, Value *rval) ; + virtual bool nativeCall(JSContext *cx, JSObject *wrapper, Class *clasp, Native native, CallArgs args) ; + virtual bool hasInstance(JSContext *cx, JSObject *wrapper, const Value *vp, bool *bp) ; + virtual JSString *obj_toString(JSContext *cx, JSObject *wrapper) ; + virtual JSString *fun_toString(JSContext *cx, JSObject *wrapper, unsigned indent) ; + + using AbstractWrapper::Action; + + static DirectWrapper singleton; + + static JSObject *New(JSContext *cx, JSObject *obj, JSObject *proto, JSObject *parent, + DirectWrapper *handler); + + using AbstractWrapper::wrappedObject; + using AbstractWrapper::wrapperHandler; + + enum { + CROSS_COMPARTMENT = 1 << 0, + LAST_USED_FLAG = CROSS_COMPARTMENT + }; + + static void *getWrapperFamily(); +}; + + + + + +typedef DirectWrapper Wrapper; + + +class __attribute__((visibility("default"))) CrossCompartmentWrapper : public DirectWrapper +{ + public: + CrossCompartmentWrapper(unsigned flags); + + virtual ~CrossCompartmentWrapper(); + + + virtual bool getPropertyDescriptor(JSContext *cx, JSObject *wrapper, jsid id, bool set, + PropertyDescriptor *desc) ; + virtual bool getOwnPropertyDescriptor(JSContext *cx, JSObject *wrapper, jsid id, bool set, + PropertyDescriptor *desc) ; + virtual bool defineProperty(JSContext *cx, JSObject *wrapper, jsid id, + PropertyDescriptor *desc) ; + virtual bool getOwnPropertyNames(JSContext *cx, JSObject *wrapper, AutoIdVector &props) ; + virtual bool delete_(JSContext *cx, JSObject *wrapper, jsid id, bool *bp) ; + virtual bool enumerate(JSContext *cx, JSObject *wrapper, AutoIdVector &props) ; + + + virtual bool has(JSContext *cx, JSObject *wrapper, jsid id, bool *bp) ; + virtual bool hasOwn(JSContext *cx, JSObject *wrapper, jsid id, bool *bp) ; + virtual bool get(JSContext *cx, JSObject *wrapper, JSObject *receiver, jsid id, Value *vp) ; + virtual bool set(JSContext *cx, JSObject *wrapper, JSObject *receiver, jsid id, bool strict, + Value *vp) ; + virtual bool keys(JSContext *cx, JSObject *wrapper, AutoIdVector &props) ; + virtual bool iterate(JSContext *cx, JSObject *wrapper, unsigned flags, Value *vp) ; + + + virtual bool call(JSContext *cx, JSObject *wrapper, unsigned argc, Value *vp) ; + virtual bool construct(JSContext *cx, JSObject *wrapper, unsigned argc, Value *argv, Value *rval) ; + virtual bool nativeCall(JSContext *cx, JSObject *wrapper, Class *clasp, Native native, CallArgs args) ; + virtual bool hasInstance(JSContext *cx, JSObject *wrapper, const Value *vp, bool *bp) ; + virtual JSString *obj_toString(JSContext *cx, JSObject *wrapper) ; + virtual JSString *fun_toString(JSContext *cx, JSObject *wrapper, unsigned indent) ; + virtual bool regexp_toShared(JSContext *cx, JSObject *proxy, RegExpGuard *g) ; + virtual bool defaultValue(JSContext *cx, JSObject *wrapper, JSType hint, Value *vp) ; + virtual bool iteratorNext(JSContext *cx, JSObject *wrapper, Value *vp); + + static CrossCompartmentWrapper singleton; +}; +# 182 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jswrapper.h" +template +class __attribute__((visibility("default"))) SecurityWrapper : public Base +{ + public: + SecurityWrapper(unsigned flags); + + virtual bool nativeCall(JSContext *cx, JSObject *wrapper, Class *clasp, Native native, CallArgs args) ; + virtual bool objectClassIs(JSObject *obj, ESClassValue classValue, JSContext *cx) ; + virtual bool regexp_toShared(JSContext *cx, JSObject *proxy, RegExpGuard *g) ; +}; + +typedef SecurityWrapper SameCompartmentSecurityWrapper; +typedef SecurityWrapper CrossCompartmentSecurityWrapper; + + + + + +class __attribute__((visibility("default"))) ForceFrame +{ + public: + JSContext * const context; + JSObject * const target; + private: + DummyFrameGuard *frame; + + public: + ForceFrame(JSContext *cx, JSObject *target); + ~ForceFrame(); + bool enter(); +}; + + +class __attribute__((visibility("default"))) DeadObjectProxy : public BaseProxyHandler +{ + public: + static int sDeadObjectFamily; + + explicit DeadObjectProxy(); + + + virtual bool getPropertyDescriptor(JSContext *cx, JSObject *wrapper, jsid id, bool set, + PropertyDescriptor *desc) ; + virtual bool getOwnPropertyDescriptor(JSContext *cx, JSObject *wrapper, jsid id, bool set, + PropertyDescriptor *desc) ; + virtual bool defineProperty(JSContext *cx, JSObject *wrapper, jsid id, + PropertyDescriptor *desc) ; + virtual bool getOwnPropertyNames(JSContext *cx, JSObject *wrapper, AutoIdVector &props) ; + virtual bool delete_(JSContext *cx, JSObject *wrapper, jsid id, bool *bp) ; + virtual bool enumerate(JSContext *cx, JSObject *wrapper, AutoIdVector &props) ; + + + virtual bool call(JSContext *cx, JSObject *proxy, unsigned argc, Value *vp); + virtual bool construct(JSContext *cx, JSObject *proxy, unsigned argc, Value *argv, Value *rval); + virtual bool nativeCall(JSContext *cx, JSObject *proxy, Class *clasp, Native native, CallArgs args); + virtual bool hasInstance(JSContext *cx, JSObject *proxy, const Value *vp, bool *bp); + virtual bool objectClassIs(JSObject *obj, ESClassValue classValue, JSContext *cx); + virtual JSString *obj_toString(JSContext *cx, JSObject *proxy); + virtual JSString *fun_toString(JSContext *cx, JSObject *proxy, unsigned indent); + virtual bool regexp_toShared(JSContext *cx, JSObject *proxy, RegExpGuard *g); + virtual bool defaultValue(JSContext *cx, JSObject *obj, JSType hint, Value *vp); + virtual bool iteratorNext(JSContext *cx, JSObject *proxy, Value *vp); + virtual bool getElementIfPresent(JSContext *cx, JSObject *obj, JSObject *receiver, + uint32_t index, Value *vp, bool *present); + + + static DeadObjectProxy singleton; +}; + +extern JSObject * +TransparentObjectWrapper(JSContext *cx, JSObject *obj, JSObject *wrappedProto, JSObject *parent, + unsigned flags); + + + +extern __attribute__((visibility("default"))) int sWrapperFamily; + +inline bool +IsWrapper(const JSObject *obj) +{ + return IsProxy(obj) && GetProxyHandler(obj)->family() == &sWrapperFamily; +} + + + + + +__attribute__((visibility("default"))) JSObject * +UnwrapObject(JSObject *obj, bool stopAtOuter = true, unsigned *flagsp = __null); + + + + + +__attribute__((visibility("default"))) JSObject * +UnwrapObjectChecked(JSContext *cx, JSObject *obj); + +__attribute__((visibility("default"))) bool +IsCrossCompartmentWrapper(const JSObject *obj); + +JSObject * +NewDeadProxyObject(JSContext *cx, JSObject *parent); + +void +NukeCrossCompartmentWrapper(JSObject *wrapper); + +} +# 30 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Marking.h" 1 +# 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/BooleanObject.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/BooleanObject.h" +#define BooleanObject_h___ + + + +namespace js { + +class BooleanObject : public JSObject +{ + + static const unsigned PRIMITIVE_VALUE_SLOT = 0; + + public: + static const unsigned RESERVED_SLOTS = 1; + + + + + + static inline BooleanObject *create(JSContext *cx, bool b); + + + + + + static inline BooleanObject *createWithProto(JSContext *cx, bool b, JSObject &proto); + + bool unbox() const { + return getFixedSlot(PRIMITIVE_VALUE_SLOT).toBoolean(); + } + + private: + inline void setPrimitiveValue(bool b) { + setFixedSlot(PRIMITIVE_VALUE_SLOT, BooleanValue(b)); + } + + + friend JSObject * + ::js_InitBooleanClass(JSContext *cx, JSObject *global); +}; + +} +# 35 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumberObject.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumberObject.h" +#define NumberObject_h___ + + + +namespace js { + +class NumberObject : public JSObject +{ + + static const unsigned PRIMITIVE_VALUE_SLOT = 0; + + public: + static const unsigned RESERVED_SLOTS = 1; + + + + + + static inline NumberObject *create(JSContext *cx, double d); + + + + + + static inline NumberObject *createWithProto(JSContext *cx, double d, JSObject &proto); + + double unbox() const { + return getFixedSlot(PRIMITIVE_VALUE_SLOT).toNumber(); + } + + private: + inline void setPrimitiveValue(double d) { + setFixedSlot(PRIMITIVE_VALUE_SLOT, NumberValue(d)); + } + + + friend JSObject * + ::js_InitNumberClass(JSContext *cx, JSObject *global); +}; + +} +# 37 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics.h" +#define RegExpStatics_h__ + + + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/MatchPairs.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/MatchPairs.h" +#define MatchPairs_h__ +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/MatchPairs.h" +namespace js { + +struct MatchPair +{ + int start; + int limit; + + MatchPair(int start, int limit) : start(start), limit(limit) {} + + size_t length() const { + do { } while(0); + return limit - start; + } + + bool isUndefined() const { + return start == -1; + } + + void check() const { + do { } while(0); + do { } while (0); + } +}; + +class MatchPairs +{ + size_t pairCount_; + int buffer_[1]; + + explicit MatchPairs(size_t pairCount) : pairCount_(pairCount) { + initPairValues(); + } + + void initPairValues() { + for (int *it = buffer_; it < buffer_ + 2 * pairCount_; ++it) + *it = -1; + } + + static size_t calculateSize(size_t backingPairCount) { + return sizeof(MatchPairs) - sizeof(int) + sizeof(int) * backingPairCount; + } + + int *buffer() { return buffer_; } + + friend class RegExpShared; + + public: + + + + + static MatchPairs *create(LifoAlloc &alloc, size_t pairCount, size_t backingPairCount); + + size_t pairCount() const { return pairCount_; } + + MatchPair pair(size_t i) { + do { } while(0); + return MatchPair(buffer_[2 * i], buffer_[2 * i + 1]); + } + + void displace(size_t amount) { + if (!amount) + return; + + for (int *it = buffer_; it < buffer_ + 2 * pairCount_; ++it) + *it = (*it < 0) ? -1 : *it + amount; + } + + inline void checkAgainst(size_t length); +}; + +} +# 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics.h" 2 + +namespace js { + +class RegExpStatics +{ + typedef Vector Pairs; + Pairs matchPairs; + + HeapPtr matchPairsInput; + + HeapPtr pendingInput; + RegExpFlag flags; + RegExpStatics *bufferLink; + bool copied; + + bool createDependent(JSContext *cx, size_t start, size_t end, Value *out) const; + + inline void copyTo(RegExpStatics &dst); + + inline void aboutToWrite(); + + bool save(JSContext *cx, RegExpStatics *buffer) { + do { } while(0); + buffer->bufferLink = bufferLink; + bufferLink = buffer; + if (!buffer->matchPairs.reserve(matchPairs.length())) { + js_ReportOutOfMemory(cx); + return false; + } + return true; + } + + inline void restore(); + + void checkInvariants() { +# 76 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics.h" + } + + + + + + void checkParenNum(size_t pairNum) const { + do { } while(0); + do { } while(0); + } + + + size_t getParenLength(size_t pairNum) const { + checkParenNum(pairNum); + do { } while(0); + return get(pairNum, 1) - get(pairNum, 0); + } + + int get(size_t pairNum, bool which) const { + do { } while(0); + return matchPairs[2 * pairNum + which]; + } + + + + + + + bool makeMatch(JSContext *cx, size_t checkValidIndex, size_t pairNum, Value *out) const; + + void markFlagsSet(JSContext *cx); + + struct InitBuffer {}; + explicit RegExpStatics(InitBuffer) : bufferLink(__null), copied(false) {} + + friend class PreserveRegExpStatics; + + public: + inline RegExpStatics(); + + static JSObject *create(JSContext *cx, GlobalObject *parent); + + + + inline bool updateFromMatchPairs(JSContext *cx, JSLinearString *input, MatchPairs *newPairs); + inline void setMultiline(JSContext *cx, bool enabled); + + inline void clear(); + + + inline void reset(JSContext *cx, JSString *newInput, bool newMultiline); + + inline void setPendingInput(JSString *newInput); +# 139 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics.h" + private: + size_t pairCount() const { + do { } while(0); + return matchPairs.length() / 2; + } + + public: + size_t parenCount() const { + size_t pc = pairCount(); + do { } while(0); + return pc - 1; + } + + JSString *getPendingInput() const { return pendingInput; } + RegExpFlag getFlags() const { return flags; } + bool multiline() const { return flags & MultilineFlag; } + + size_t matchStart() const { + int start = get(0, 0); + do { } while(0); + return size_t(start); + } + + size_t matchLimit() const { + int limit = get(0, 1); + do { } while(0); + return size_t(limit); + } + + + bool matched() const { + do { } while(0); + do { } while (0); + return get(0, 1) - get(0, 0) > 0; + } + + void mark(JSTracer *trc) { + if (pendingInput) + MarkString(trc, &pendingInput, "res->pendingInput"); + if (matchPairsInput) + MarkString(trc, &matchPairsInput, "res->matchPairsInput"); + } + + bool pairIsPresent(size_t pairNum) const { + return get(pairNum, 0) >= 0; + } + + + + bool createPendingInput(JSContext *cx, Value *out) const; + bool createLastMatch(JSContext *cx, Value *out) const { return makeMatch(cx, 0, 0, out); } + bool createLastParen(JSContext *cx, Value *out) const; + bool createLeftContext(JSContext *cx, Value *out) const; + bool createRightContext(JSContext *cx, Value *out) const; + + + bool createParen(JSContext *cx, size_t pairNum, Value *out) const { + do { } while(0); + if (pairNum >= pairCount()) { + out->setString(cx->runtime->emptyString); + return true; + } + return makeMatch(cx, pairNum * 2, pairNum, out); + } + + + + void getParen(size_t pairNum, JSSubString *out) const; + void getLastMatch(JSSubString *out) const; + void getLastParen(JSSubString *out) const; + void getLeftContext(JSSubString *out) const; + void getRightContext(JSSubString *out) const; + + class AutoRooter : private AutoGCRooter + { + public: + explicit AutoRooter(JSContext *cx, RegExpStatics *statics_ + ) + : AutoGCRooter(cx, REGEXPSTATICS), statics(statics_), skip(cx, statics_) + { + do { } while (0); + } + + friend void AutoGCRooter::trace(JSTracer *trc); + void trace(JSTracer *trc); + + private: + RegExpStatics *statics; + SkipRoot skip; + + }; +}; + +class PreserveRegExpStatics +{ + RegExpStatics * const original; + RegExpStatics buffer; + RegExpStatics::AutoRooter bufferRoot; + + public: + explicit PreserveRegExpStatics(JSContext *cx, RegExpStatics *original) + : original(original), + buffer(RegExpStatics::InitBuffer()), + bufferRoot(cx, &buffer) + {} + + bool init(JSContext *cx) { + return original->save(cx, &buffer); + } + + inline ~PreserveRegExpStatics(); +}; + +size_t SizeOfRegExpStaticsData(const JSObject *obj, JSMallocSizeOfFun mallocSizeOf); + +} +# 38 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/StringObject.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/StringObject.h" +#define StringObject_h___ + + + + +namespace js { + +class StringObject : public JSObject +{ + static const unsigned PRIMITIVE_VALUE_SLOT = 0; + static const unsigned LENGTH_SLOT = 1; + + public: + static const unsigned RESERVED_SLOTS = 2; + + + + + + static inline StringObject *create(JSContext *cx, HandleString str); + + + + + + static inline StringObject *createWithProto(JSContext *cx, HandleString str, JSObject &proto); + + JSString *unbox() const { + return getFixedSlot(PRIMITIVE_VALUE_SLOT).toString(); + } + + inline size_t length() const { + return size_t(getFixedSlot(LENGTH_SLOT).toInt32()); + } + + static size_t getPrimitiveValueOffset() { + return getFixedSlotOffset(PRIMITIVE_VALUE_SLOT); + } + + private: + inline bool init(JSContext *cx, HandleString str); + + void setStringThis(JSString *str) { + do { } while(0); + setFixedSlot(PRIMITIVE_VALUE_SLOT, StringValue(str)); + setFixedSlot(LENGTH_SLOT, Int32Value(int32_t(str->length()))); + } + + + friend JSObject * + ::js_InitStringClass(JSContext *cx, JSObject *global); + + + + + + + Shape *assignInitialShape(JSContext *cx); +}; + +} +# 39 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatominlines.h" 1 + + + + + + + +#define jsatominlines_h___ + + + + + + +# 1 "./../../dist/include/mozilla/RangedPtr.h" 1 +# 14 "./../../dist/include/mozilla/RangedPtr.h" +#define mozilla_RangedPtr_h_ + + + + + +namespace mozilla { +# 41 "./../../dist/include/mozilla/RangedPtr.h" +template +class RangedPtr +{ + T* ptr; + + + + + + + void checkSanity() { + do { } while(0); + do { } while(0); + } + + + RangedPtr create(T *ptr) const { + + + + return RangedPtr(ptr, __null, size_t(0)); + + } + + public: + RangedPtr(T* p, T* start, T* end) + : ptr(p) + + + + { + do { } while(0); + checkSanity(); + } + RangedPtr(T* p, T* start, size_t length) + : ptr(p) + + + + { + do { } while(0); + do { } while(0); + checkSanity(); + } + + + RangedPtr(T* p, size_t length) + : ptr(p) + + + + { + do { } while(0); + do { } while(0); + checkSanity(); + } + + + template + RangedPtr(T arr[N]) + : ptr(arr) + + + + { + checkSanity(); + } + + T* get() const { + return ptr; + } +# 123 "./../../dist/include/mozilla/RangedPtr.h" + RangedPtr& operator=(const RangedPtr& other) { + do { } while(0); + do { } while(0); + ptr = other.ptr; + checkSanity(); + return *this; + } + + RangedPtr operator+(size_t inc) { + do { } while(0); + do { } while(0); + return create(ptr + inc); + } + + RangedPtr operator-(size_t dec) { + do { } while(0); + do { } while(0); + return create(ptr - dec); + } + + + + + + template + RangedPtr& operator=(U* p) { + *this = create(p); + return *this; + } + + template + RangedPtr& operator=(const RangedPtr& p) { + do { } while(0); + do { } while(0); + ptr = p.ptr; + checkSanity(); + return *this; + } + + RangedPtr& operator++() { + return (*this += 1); + } + + RangedPtr operator++(int) { + RangedPtr rcp = *this; + ++*this; + return rcp; + } + + RangedPtr& operator--() { + return (*this -= 1); + } + + RangedPtr operator--(int) { + RangedPtr rcp = *this; + --*this; + return rcp; + } + + RangedPtr& operator+=(size_t inc) { + this->operator=(*this + inc); + return *this; + } + + RangedPtr& operator-=(size_t dec) { + this->operator=(*this - dec); + return *this; + } + + T& operator[](int index) const { + do { } while(0); + return *create(ptr + index); + } + + T& operator*() const { + return *ptr; + } + + template + bool operator==(const RangedPtr& other) const { + return ptr == other.ptr; + } + template + bool operator!=(const RangedPtr& other) const { + return !(*this == other); + } + + template + bool operator==(const U* u) const { + return ptr == u; + } + template + bool operator!=(const U* u) const { + return !(*this == u); + } + + template + bool operator<(const RangedPtr& other) const { + return ptr < other.ptr; + } + template + bool operator<=(const RangedPtr& other) const { + return ptr <= other.ptr; + } + + template + bool operator>(const RangedPtr& other) const { + return ptr > other.ptr; + } + template + bool operator>=(const RangedPtr& other) const { + return ptr >= other.ptr; + } + + size_t operator-(const RangedPtr& other) const { + do { } while(0); + return PointerRangeSize(other.ptr, ptr); + } + + private: + RangedPtr() ; + T* operator&() ; + operator T*() const ; +}; + +} +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatominlines.h" 2 + + +inline JSAtom * +js::AtomStateEntry::asPtr() const +{ + do { } while(0); + JSAtom *atom = reinterpret_cast(bits & NO_TAG_MASK); + JSString::readBarrier(atom); + return atom; +} + +inline bool +js_ValueToAtom(JSContext *cx, const js::Value &v, JSAtom **atomp) +{ + if (!v.isString()) { + JSString *str = js::ToStringSlow(cx, v); + if (!str) + return false; + JS::Anchor anchor(str); + *atomp = js_AtomizeString(cx, str); + return !!*atomp; + } + + JSString *str = v.toString(); + if (str->isAtom()) { + *atomp = &str->asAtom(); + return true; + } + + *atomp = js_AtomizeString(cx, str); + return !!*atomp; +} + +namespace js { + +inline bool +ValueToId(JSContext* cx, JSObject *obj, const Value &v, jsid *idp) +{ + int32_t i; + if (ValueFitsInInt32(v, &i) && INT_FITS_IN_JSID(i)) { + *idp = INT_TO_JSID(i); + return true; + } + + return InternNonIntElementId(cx, obj, v, idp); +} + +inline bool +ValueToId(JSContext* cx, const Value &v, jsid *idp) +{ + return ValueToId(cx, __null, v, idp); +} +# 76 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatominlines.h" +template +inline mozilla::RangedPtr +BackfillIndexInCharBuffer(uint32_t index, mozilla::RangedPtr end) +{ +# 89 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatominlines.h" + do { + uint32_t next = index / 10, digit = index % 10; + *--end = '0' + digit; + index = next; + } while (index > 0); + + return end; +} + +inline bool +IndexToId(JSContext *cx, uint32_t index, jsid *idp) +{ + MaybeCheckStackRoots(cx); + + if (index <= (2147483647)) { + *idp = INT_TO_JSID(index); + return true; + } + + extern bool IndexToIdSlow(JSContext *cx, uint32_t index, jsid *idp); + return IndexToIdSlow(cx, index, idp); +} + +inline jsid +AtomToId(JSAtom *atom) +{ + typedef int moz_static_assert106[(0 == 0) ? 1 : -1]; + + uint32_t index; + if (atom->isIndex(&index) && index <= (2147483647)) + return INT_TO_JSID((int32_t) index); + + return JSID_FROM_BITS((size_t)atom); +} + +static __attribute__((always_inline)) inline JSFlatString * +IdToString(JSContext *cx, jsid id) +{ + if (JSID_IS_STRING(id)) + return JSID_TO_ATOM(id); + + if ((__builtin_expect((JSID_IS_INT(id)), 1))) + return Int32ToString(cx, JSID_TO_INT(id)); + + JSString *str = ToStringSlow(cx, IdToValue(id)); + if (!str) + return __null; + + return str->ensureFlat(cx); +} + +inline +AtomHasher::Lookup::Lookup(const JSAtom *atom) + : chars(atom->chars()), length(atom->length()), atom(atom) +{} + +inline bool +AtomHasher::match(const AtomStateEntry &entry, const Lookup &lookup) +{ + JSAtom *key = entry.asPtr(); + if (lookup.atom) + return lookup.atom == key; + if (key->length() != lookup.length) + return false; + return PodEqual(key->chars(), lookup.chars, lookup.length); +} + +} +# 41 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfuninlines.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfuninlines.h" +#define jsfuninlines_h___ + + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject-inl.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject-inl.h" +#define ScopeObject_inl_h___ + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject.h" +#define ScopeObject_h___ + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsweakmap.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsweakmap.h" +#define jsweakmap_h___ +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsweakmap.h" +namespace js { +# 68 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsweakmap.h" +static WeakMapBase * const WeakMapNotInList = reinterpret_cast(1); + +typedef Vector WeakMapVector; + + + +class WeakMapBase { + public: + WeakMapBase(JSObject *memOf) : memberOf(memOf), next(WeakMapNotInList) { } + virtual ~WeakMapBase() { } + + void trace(JSTracer *tracer) { + if (((tracer)->callback == __null || (tracer)->callback == GCMarker::GrayCallback)) { + + + + + do { } while(0); + + + + if (next == WeakMapNotInList) { + JSRuntime *rt = tracer->runtime; + next = rt->gcWeakMapList; + rt->gcWeakMapList = this; + } + } else { + + + + + if (tracer->eagerlyTraceWeakMaps) + nonMarkingTrace(tracer); + } + } + + + + + + + + static bool markAllIteratively(JSTracer *tracer); + + + + static void sweepAll(JSTracer *tracer); + + + static void traceAllMappings(WeakMapTracer *tracer); + + void check() { do { } while(0); } + + + static void resetWeakMapList(JSRuntime *rt); + + + static bool saveWeakMapList(JSRuntime *rt, WeakMapVector &vector); + static void restoreWeakMapList(JSRuntime *rt, WeakMapVector &vector); + + protected: + + + virtual void nonMarkingTrace(JSTracer *tracer) = 0; + virtual bool markIteratively(JSTracer *tracer) = 0; + virtual void sweep(JSTracer *tracer) = 0; + virtual void traceMappings(WeakMapTracer *tracer) = 0; + + + JSObject *memberOf; + + private: + + + + + + WeakMapBase *next; +}; + +template > +class WeakMap : public HashMap, public WeakMapBase { + private: + typedef HashMap Base; + typedef typename Base::Enum Enum; + + public: + typedef typename Base::Range Range; + + explicit WeakMap(JSRuntime *rt, JSObject *memOf=__null) : Base(rt), WeakMapBase(memOf) { } + explicit WeakMap(JSContext *cx, JSObject *memOf=__null) : Base(cx), WeakMapBase(memOf) { } + + + Range nondeterministicAll() { + return Base::all(); + } + + private: + bool markValue(JSTracer *trc, Value *x) { + if (gc::IsMarked(x)) + return false; + gc::Mark(trc, x, "WeakMap entry"); + return true; + } + + void nonMarkingTrace(JSTracer *trc) { + for (Range r = Base::all(); !r.empty(); r.popFront()) + markValue(trc, &r.front().value); + } + + bool markIteratively(JSTracer *trc) { + bool markedAny = false; + for (Enum e(*this); !e.empty(); e.popFront()) { + + Key k(e.front().key); + bool keyIsMarked = gc::IsMarked(&k); + if (keyIsMarked) { + if (markValue(trc, &e.front().value)) + markedAny = true; + e.rekeyFront(k); + } + } + return markedAny; + } + + void sweep(JSTracer *trc) { + + for (Enum e(*this); !e.empty(); e.popFront()) { + Key k(e.front().key); + if (!gc::IsMarked(&k)) + e.removeFront(); + } +# 216 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsweakmap.h" + } + + + void traceMappings(WeakMapTracer *tracer) { + for (Range r = Base::all(); !r.empty(); r.popFront()) { + gc::Cell *key = gc::ToMarkable(r.front().key); + gc::Cell *value = gc::ToMarkable(r.front().value); + if (key && value) { + tracer->callback(tracer, memberOf, + key, gc::TraceKind(r.front().key), + value, gc::TraceKind(r.front().value)); + } + } + } +}; + +} + +extern JSObject * +js_InitWeakMapClass(JSContext *cx, JSObject *obj); +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject.h" 2 + +namespace js { +# 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject.h" +struct ScopeCoordinate +{ + uint16_t hops; + uint16_t binding; + inline ScopeCoordinate(jsbytecode *pc); +}; + +inline JSAtom * +ScopeCoordinateAtom(JSScript *script, jsbytecode *pc); +# 83 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject.h" +class ScopeObject : public JSObject +{ + + void *getPrivate() const; + + protected: + static const uint32_t SCOPE_CHAIN_SLOT = 0; + + public: + + + + + + inline JSObject &enclosingScope() const; + inline bool setEnclosingScope(JSContext *cx, HandleObject obj); + + + + + + + inline StackFrame *maybeStackFrame() const; + inline void setStackFrame(StackFrame *frame); + + + static inline size_t offsetOfEnclosingScope(); +}; + +class CallObject : public ScopeObject +{ + static const uint32_t CALLEE_SLOT = 1; + + static CallObject * + create(JSContext *cx, JSScript *script, HandleObject enclosing, HandleObject callee); + + public: + static const uint32_t RESERVED_SLOTS = 3; + + static CallObject *createForFunction(JSContext *cx, StackFrame *fp); + static CallObject *createForStrictEval(JSContext *cx, StackFrame *fp); + + + inline bool isForEval() const; + + + + + + inline JSObject *getCallee() const; + inline JSFunction *getCalleeFunction() const; + inline void setCallee(JSObject *callee); + + + inline const Value &arg(unsigned i) const; + inline void setArg(unsigned i, const Value &v); + inline void initArgUnchecked(unsigned i, const Value &v); + + + inline const Value &var(unsigned i) const; + inline void setVar(unsigned i, const Value &v); + inline void initVarUnchecked(unsigned i, const Value &v); + + + + + + + inline HeapSlotArray argArray(); + inline HeapSlotArray varArray(); + + inline void copyValues(unsigned nargs, Value *argv, unsigned nvars, Value *slots); + + static JSBool getArgOp(JSContext *cx, HandleObject obj, HandleId id, Value *vp); + static JSBool getVarOp(JSContext *cx, HandleObject obj, HandleId id, Value *vp); + static JSBool setArgOp(JSContext *cx, HandleObject obj, HandleId id, JSBool strict, Value *vp); + static JSBool setVarOp(JSContext *cx, HandleObject obj, HandleId id, JSBool strict, Value *vp); + + + bool containsVarOrArg(PropertyName *name, Value *vp, JSContext *cx); +}; + +class DeclEnvObject : public ScopeObject +{ + public: + static const uint32_t RESERVED_SLOTS = 1; + static const gc::AllocKind FINALIZE_KIND = gc::FINALIZE_OBJECT2; + + static DeclEnvObject *create(JSContext *cx, StackFrame *fp); + +}; + +class NestedScopeObject : public ScopeObject +{ + protected: + static const unsigned DEPTH_SLOT = 1; + + public: + + uint32_t stackDepth() const; +}; + +class WithObject : public NestedScopeObject +{ + + js::StackFrame *maybeStackFrame() const; + void setStackFrame(StackFrame *frame); + + static const unsigned THIS_SLOT = 2; + + + JSObject *getProto() const; + + public: + static const unsigned RESERVED_SLOTS = 3; + static const gc::AllocKind FINALIZE_KIND = gc::FINALIZE_OBJECT4; + + static WithObject * + create(JSContext *cx, HandleObject proto, HandleObject enclosing, uint32_t depth); + + + JSObject &withThis() const; + + + JSObject &object() const; +}; + +class BlockObject : public NestedScopeObject +{ + public: + static const unsigned RESERVED_SLOTS = 2; + static const gc::AllocKind FINALIZE_KIND = gc::FINALIZE_OBJECT4; + + + inline uint32_t slotCount() const; + + protected: + + inline HeapSlot &slotValue(unsigned i); +}; + +class StaticBlockObject : public BlockObject +{ + + StackFrame *maybeStackFrame() const; + void setStackFrame(StackFrame *frame); + + public: + static StaticBlockObject *create(JSContext *cx); + + inline StaticBlockObject *enclosingBlock() const; + inline void setEnclosingBlock(StaticBlockObject *blockObj); + + void setStackDepth(uint32_t depth); + bool containsVarAtDepth(uint32_t depth); + + + + + + void setDefinitionParseNode(unsigned i, Definition *def); + Definition *maybeDefinitionParseNode(unsigned i); + + + + + + void setAliased(unsigned i, bool aliased); + bool isAliased(unsigned i); + + + + + + bool needsClone() const; + + const Shape *addVar(JSContext *cx, jsid id, int index, bool *redeclared); +}; + +class ClonedBlockObject : public BlockObject +{ + public: + static ClonedBlockObject *create(JSContext *cx, Handle block, + StackFrame *fp); + + + StaticBlockObject &staticBlock() const; + + + + + + void put(StackFrame *fp); + + + const Value &closedSlot(unsigned i); + + + bool containsVar(PropertyName *name, Value *vp, JSContext *cx); +}; + +template +bool +XDRStaticBlockObject(XDRState *xdr, JSScript *script, StaticBlockObject **objp); + +extern JSObject * +CloneStaticBlockObject(JSContext *cx, StaticBlockObject &srcBlock, + const AutoObjectVector &objects, JSScript *src); +# 307 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject.h" +class ScopeIter +{ + public: + enum Type { Call, Block, With, StrictEvalScope }; + + private: + StackFrame *fp_; + JSObject *cur_; + StaticBlockObject *block_; + Type type_; + bool hasScopeObject_; + + void settle(); + + public: + + explicit ScopeIter(); + + + explicit ScopeIter(StackFrame *fp); + + + + + + explicit ScopeIter(JSObject &enclosingScope); + + + + + + ScopeIter(ScopeIter si, StackFrame *fp); + + + ScopeIter(StackFrame *fp, ScopeObject &scope); + + bool done() const { return !fp_; } + + + + JSObject &enclosingScope() const { do { } while(0); return *cur_; } + + + + ScopeIter enclosing() const; + + StackFrame *fp() const { do { } while(0); return fp_; } + Type type() const { do { } while(0); return type_; } + bool hasScopeObject() const { do { } while(0); return hasScopeObject_; } + ScopeObject &scope() const; + + StaticBlockObject &staticBlock() const { do { } while(0); return *block_; } + + + typedef ScopeIter Lookup; + static HashNumber hash(ScopeIter si); + static bool match(ScopeIter si1, ScopeIter si2); +}; +# 393 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject.h" +extern JSObject * +GetDebugScopeForFunction(JSContext *cx, JSFunction *fun); + +extern JSObject * +GetDebugScopeForFrame(JSContext *cx, StackFrame *fp); + + +class DebugScopeObject : public JSObject +{ + static const unsigned ENCLOSING_EXTRA = 0; + + public: + static DebugScopeObject *create(JSContext *cx, ScopeObject &scope, JSObject &enclosing); + + ScopeObject &scope() const; + JSObject &enclosingScope() const; + + + bool isForDeclarative() const; +}; + + +class DebugScopes +{ + + typedef WeakMap ObjectWeakMap; + ObjectWeakMap proxiedScopes; + + + + + + typedef HashMap MissingScopeMap; + MissingScopeMap missingScopes; + + public: + DebugScopes(JSRuntime *rt); + ~DebugScopes(); + bool init(); + + void mark(JSTracer *trc); + void sweep(); + + DebugScopeObject *hasDebugScope(JSContext *cx, ScopeObject &scope) const; + bool addDebugScope(JSContext *cx, ScopeObject &scope, DebugScopeObject &debugScope); + + DebugScopeObject *hasDebugScope(JSContext *cx, ScopeIter si) const; + bool addDebugScope(JSContext *cx, ScopeIter si, DebugScopeObject &debugScope); + + + + + + void onPopCall(StackFrame *fp); + void onPopBlock(JSContext *cx, StackFrame *fp); + void onGeneratorFrameChange(StackFrame *from, StackFrame *to); + void onCompartmentLeaveDebugMode(JSCompartment *c); +}; + +} +# 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject-inl.h" 2 + +namespace js { + +inline +ScopeCoordinate::ScopeCoordinate(jsbytecode *pc) + : hops(((unsigned)(((pc)[1] << 8) | (pc)[2]))), binding(((unsigned)(((pc + 2)[1] << 8) | (pc + 2)[2]))) +{ + do { } while(0); +} + +inline JSAtom * +ScopeCoordinateAtom(JSScript *script, jsbytecode *pc) +{ + do { } while(0); + return script->getAtom(GET_UINT32_INDEX(pc + 2 * sizeof(uint16_t))); +} + +inline JSObject & +ScopeObject::enclosingScope() const +{ + return getReservedSlot(SCOPE_CHAIN_SLOT).toObject(); +} + +inline bool +ScopeObject::setEnclosingScope(JSContext *cx, HandleObject obj) +{ + RootedObject self(cx, this); + if (!obj->setDelegate(cx)) + return false; + self->setFixedSlot(SCOPE_CHAIN_SLOT, ObjectValue(*obj)); + return true; +} + +inline StackFrame * +ScopeObject::maybeStackFrame() const +{ + do { } while(0); + return reinterpret_cast(JSObject::getPrivate()); +} + +inline void +ScopeObject::setStackFrame(StackFrame *frame) +{ + return setPrivate(frame); +} + + inline size_t +ScopeObject::offsetOfEnclosingScope() +{ + return getFixedSlotOffset(SCOPE_CHAIN_SLOT); +} + +inline bool +CallObject::isForEval() const +{ + do { } while(0); + do { } while (0) + ; + return getReservedSlot(CALLEE_SLOT).isNull(); +} + +inline void +CallObject::setCallee(JSObject *callee) +{ + do { } while (0); + setFixedSlot(CALLEE_SLOT, ObjectOrNullValue(callee)); +} + +inline JSObject * +CallObject::getCallee() const +{ + return getReservedSlot(CALLEE_SLOT).toObjectOrNull(); +} + +inline JSFunction * +CallObject::getCalleeFunction() const +{ + return getReservedSlot(CALLEE_SLOT).toObject().toFunction(); +} + +inline const Value & +CallObject::arg(unsigned i) const +{ + do { } while(0); + return getSlot(RESERVED_SLOTS + i); +} + +inline void +CallObject::setArg(unsigned i, const Value &v) +{ + do { } while(0); + setSlot(RESERVED_SLOTS + i, v); +} + +inline void +CallObject::initArgUnchecked(unsigned i, const Value &v) +{ + do { } while(0); + initSlotUnchecked(RESERVED_SLOTS + i, v); +} + +inline const Value & +CallObject::var(unsigned i) const +{ + JSFunction *fun = getCalleeFunction(); + do { } while(0); + do { } while(0); + return getSlot(RESERVED_SLOTS + fun->nargs + i); +} + +inline void +CallObject::setVar(unsigned i, const Value &v) +{ + JSFunction *fun = getCalleeFunction(); + do { } while(0); + do { } while(0); + setSlot(RESERVED_SLOTS + fun->nargs + i, v); +} + +inline void +CallObject::initVarUnchecked(unsigned i, const Value &v) +{ + JSFunction *fun = getCalleeFunction(); + do { } while(0); + do { } while(0); + initSlotUnchecked(RESERVED_SLOTS + fun->nargs + i, v); +} + +inline void +CallObject::copyValues(unsigned nargs, Value *argv, unsigned nvars, Value *slots) +{ + do { } while(0); + copySlotRange(RESERVED_SLOTS, argv, nargs); + copySlotRange(RESERVED_SLOTS + nargs, slots, nvars); +} + +inline HeapSlotArray +CallObject::argArray() +{ + DebugOnly fun = getCalleeFunction(); + do { } while(0); + return HeapSlotArray(getSlotAddress(RESERVED_SLOTS)); +} + +inline HeapSlotArray +CallObject::varArray() +{ + JSFunction *fun = getCalleeFunction(); + do { } while(0) + ; + return HeapSlotArray(getSlotAddress(RESERVED_SLOTS + fun->nargs)); +} + +inline uint32_t +NestedScopeObject::stackDepth() const +{ + return getReservedSlot(DEPTH_SLOT).toPrivateUint32(); +} + +inline JSObject & +WithObject::withThis() const +{ + return getReservedSlot(THIS_SLOT).toObject(); +} + +inline JSObject & +WithObject::object() const +{ + return *JSObject::getProto(); +} + +inline uint32_t +BlockObject::slotCount() const +{ + return propertyCount(); +} + +inline HeapSlot & +BlockObject::slotValue(unsigned i) +{ + do { } while(0); + return getSlotRef(RESERVED_SLOTS + i); +} + +inline StaticBlockObject * +StaticBlockObject::enclosingBlock() const +{ + JSObject *obj = getReservedSlot(SCOPE_CHAIN_SLOT).toObjectOrNull(); + return obj ? &obj->asStaticBlock() : __null; +} + +inline void +StaticBlockObject::setEnclosingBlock(StaticBlockObject *blockObj) +{ + setFixedSlot(SCOPE_CHAIN_SLOT, ObjectOrNullValue(blockObj)); +} + +inline void +StaticBlockObject::setStackDepth(uint32_t depth) +{ + do { } while(0); + initReservedSlot(DEPTH_SLOT, PrivateUint32Value(depth)); +} + +inline void +StaticBlockObject::setDefinitionParseNode(unsigned i, Definition *def) +{ + do { } while(0); + slotValue(i).init(this, i, PrivateValue(def)); +} + +inline Definition * +StaticBlockObject::maybeDefinitionParseNode(unsigned i) +{ + Value v = slotValue(i); + return v.isUndefined() ? __null : reinterpret_cast(v.toPrivate()); +} + +inline void +StaticBlockObject::setAliased(unsigned i, bool aliased) +{ + slotValue(i).init(this, i, BooleanValue(aliased)); + if (aliased) + JSObject::setPrivate(reinterpret_cast(1)); +} + +inline bool +StaticBlockObject::isAliased(unsigned i) +{ + return slotValue(i).isTrue(); +} + +inline bool +StaticBlockObject::needsClone() const +{ + return JSObject::getPrivate() != __null; +} + +inline bool +StaticBlockObject::containsVarAtDepth(uint32_t depth) +{ + return depth >= stackDepth() && depth < stackDepth() + slotCount(); +} + +inline StaticBlockObject & +ClonedBlockObject::staticBlock() const +{ + return getProto()->asStaticBlock(); +} + +inline const Value & +ClonedBlockObject::closedSlot(unsigned i) +{ + do { } while(0); + return slotValue(i); +} + +} + +inline js::ScopeObject & +JSObject::asScope() +{ + do { } while(0); + return *static_cast(this); +} + +inline js::CallObject & +JSObject::asCall() +{ + do { } while(0); + return *static_cast(this); +} + +inline js::DeclEnvObject & +JSObject::asDeclEnv() +{ + do { } while(0); + return *static_cast(this); +} + +inline js::NestedScopeObject & +JSObject::asNestedScope() +{ + do { } while(0); + return *static_cast(this); +} + +inline js::WithObject & +JSObject::asWith() +{ + do { } while(0); + return *static_cast(this); +} + +inline js::BlockObject & +JSObject::asBlock() +{ + do { } while(0); + return *static_cast(this); +} + +inline js::StaticBlockObject & +JSObject::asStaticBlock() +{ + do { } while(0); + return *static_cast(this); +} + +inline js::ClonedBlockObject & +JSObject::asClonedBlock() +{ + do { } while(0); + return *static_cast(this); +} + +inline js::DebugScopeObject & +JSObject::asDebugScope() +{ + do { } while(0); + return *static_cast(this); +} +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfuninlines.h" 2 + +inline bool +JSFunction::inStrictMode() const +{ + return script()->strictModeCode; +} + +inline JSObject * +JSFunction::environment() const +{ + do { } while(0); + return u.i.env_; +} + +inline void +JSFunction::setEnvironment(JSObject *obj) +{ + do { } while(0); + *(js::HeapPtrObject *)&u.i.env_ = obj; +} + +inline void +JSFunction::initEnvironment(JSObject *obj) +{ + do { } while(0); + ((js::HeapPtrObject *)&u.i.env_)->init(obj); +} + +inline void +JSFunction::initializeExtended() +{ + do { } while(0); + + do { } while(0); + toExtended()->extendedSlots[0].init(js::UndefinedValue()); + toExtended()->extendedSlots[1].init(js::UndefinedValue()); +} + +inline void +JSFunction::setExtendedSlot(size_t which, const js::Value &val) +{ + do { } while(0); + toExtended()->extendedSlots[which] = val; +} + +inline const js::Value & +JSFunction::getExtendedSlot(size_t which) const +{ + do { } while(0); + return toExtended()->extendedSlots[which]; +} + +namespace js { + +static __attribute__((always_inline)) inline bool +IsFunctionObject(const js::Value &v) +{ + return v.isObject() && v.toObject().isFunction(); +} + +static __attribute__((always_inline)) inline bool +IsFunctionObject(const js::Value &v, JSFunction **fun) +{ + if (v.isObject() && v.toObject().isFunction()) { + *fun = v.toObject().toFunction(); + return true; + } + return false; +} + +static __attribute__((always_inline)) inline bool +IsNativeFunction(const js::Value &v) +{ + JSFunction *fun; + return IsFunctionObject(v, &fun) && fun->isNative(); +} + +static __attribute__((always_inline)) inline bool +IsNativeFunction(const js::Value &v, JSFunction **fun) +{ + return IsFunctionObject(v, fun) && (*fun)->isNative(); +} + +static __attribute__((always_inline)) inline bool +IsNativeFunction(const js::Value &v, JSNative native) +{ + JSFunction *fun; + return IsFunctionObject(v, &fun) && fun->maybeNative() == native; +} +# 115 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfuninlines.h" +static __attribute__((always_inline)) inline bool +ClassMethodIsNative(JSContext *cx, HandleObject obj, Class *clasp, HandleId methodid, JSNative native) +{ + do { } while(0); + + Value v; + if (!HasDataProperty(cx, obj, methodid, &v)) { + RootedObject proto(cx, obj->getProto()); + if (!proto || proto->getClass() != clasp || !HasDataProperty(cx, proto, methodid, &v)) + return false; + } + + return js::IsNativeFunction(v, native); +} + +extern __attribute__((always_inline)) inline bool +SameTraceType(const Value &lhs, const Value &rhs) +{ + return SameType(lhs, rhs) && + (lhs.isPrimitive() || + lhs.toObject().isFunction() == rhs.toObject().isFunction()); +} + + +static __attribute__((always_inline)) inline bool +IsConstructing(const Value *vp) +{ +# 151 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfuninlines.h" + return vp[1].isMagic(); +} + +inline bool +IsConstructing(CallReceiver call) +{ + return IsConstructing(call.base()); +} + +inline const char * +GetFunctionNameBytes(JSContext *cx, JSFunction *fun, JSAutoByteString *bytes) +{ + if (fun->atom) + return bytes->encode(cx, fun->atom); + return js_anonymous_str; +} + +extern JSFunctionSpec function_methods[]; + +extern JSBool +Function(JSContext *cx, unsigned argc, Value *vp); + +extern bool +IsBuiltinFunctionConstructor(JSFunction *fun); + +static inline JSObject * +SkipScopeParent(JSObject *parent) +{ + if (!parent) + return __null; + while (parent->isScope()) + parent = &parent->asScope().enclosingScope(); + return parent; +} + +inline JSFunction * +CloneFunctionObject(JSContext *cx, HandleFunction fun, HandleObject parent, + gc::AllocKind kind = JSFunction::FinalizeKind) +{ + do { } while(0); + RootedObject proto(cx, parent->global().getOrCreateFunctionPrototype(cx)); + if (!proto) + return __null; + + return js_CloneFunctionObject(cx, fun, parent, proto, kind); +} + +inline JSFunction * +CloneFunctionObjectIfNotSingleton(JSContext *cx, HandleFunction fun, HandleObject parent) +{ + + + + + + + + if (fun->hasSingletonType()) { + if (!JSObject::setParent(cx, fun, RootedObject(cx, SkipScopeParent(parent)))) + return __null; + fun->setEnvironment(parent); + return fun; + } + + return CloneFunctionObject(cx, fun, parent); +} + +inline JSFunction * +CloneFunctionObject(JSContext *cx, HandleFunction fun) +{ + + + + + + + + do { } while(0); + + if (fun->hasSingletonType()) + return fun; + + return js_CloneFunctionObject(cx, fun, + RootedObject(cx, fun->environment()), + RootedObject(cx, fun->getProto()), + JSFunction::ExtendedFinalizeKind); +} + +} + +inline void +JSFunction::setScript(JSScript *script_) +{ + do { } while(0); + mutableScript() = script_; +} + +inline void +JSFunction::initScript(JSScript *script_) +{ + do { } while(0); + mutableScript().init(script_); +} +# 42 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgcinlines.h" 1 + + + + + + + +#define jsgcinlines_h___ + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscompartment.h" 1 +# 13 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgcinlines.h" 2 + + + + + + +namespace js { + +struct Shape; + +namespace gc { + +inline JSGCTraceKind +GetGCThingTraceKind(const void *thing) +{ + do { } while(0); + const Cell *cell = reinterpret_cast(thing); + return MapAllocToTraceKind(cell->getAllocKind()); +} + + +const size_t SLOTS_TO_THING_KIND_LIMIT = 17; + + +static inline AllocKind +GetGCObjectKind(size_t numSlots) +{ + extern AllocKind slotsToThingKind[]; + + if (numSlots >= SLOTS_TO_THING_KIND_LIMIT) + return FINALIZE_OBJECT16; + return slotsToThingKind[numSlots]; +} + +static inline AllocKind +GetGCObjectKind(Class *clasp) +{ + if (clasp == &FunctionClass) + return JSFunction::FinalizeKind; + uint32_t nslots = (((clasp)->flags >> 8) & (((uint32_t)1 << (8)) - 1)); + if (clasp->flags & (1<<0)) + nslots++; + return GetGCObjectKind(nslots); +} + + +static inline AllocKind +GetGCArrayKind(size_t numSlots) +{ + extern AllocKind slotsToThingKind[]; + + + + + + + + typedef int moz_static_assert107[(ObjectElements::VALUES_PER_HEADER == 2) ? 1 : -1]; + if (numSlots > JSObject::NELEMENTS_LIMIT || numSlots + 2 >= SLOTS_TO_THING_KIND_LIMIT) + return FINALIZE_OBJECT2; + return slotsToThingKind[numSlots + 2]; +} + +static inline AllocKind +GetGCObjectFixedSlotsKind(size_t numFixedSlots) +{ + extern AllocKind slotsToThingKind[]; + + do { } while(0); + return slotsToThingKind[numFixedSlots]; +} + +static inline bool +IsBackgroundAllocKind(AllocKind kind) +{ + do { } while(0); + return kind <= FINALIZE_OBJECT_LAST && kind % 2 == 1; +} + +static inline AllocKind +GetBackgroundAllocKind(AllocKind kind) +{ + do { } while(0); + return (AllocKind) (kind + 1); +} + + + + + +static inline bool +TryIncrementAllocKind(AllocKind *kindp) +{ + size_t next = size_t(*kindp) + 2; + if (next >= size_t(FINALIZE_OBJECT_LIMIT)) + return false; + *kindp = AllocKind(next); + return true; +} + + +static inline size_t +GetGCKindSlots(AllocKind thingKind) +{ + + switch (thingKind) { + case FINALIZE_OBJECT0: + case FINALIZE_OBJECT0_BACKGROUND: + return 0; + case FINALIZE_OBJECT2: + case FINALIZE_OBJECT2_BACKGROUND: + return 2; + case FINALIZE_OBJECT4: + case FINALIZE_OBJECT4_BACKGROUND: + return 4; + case FINALIZE_OBJECT8: + case FINALIZE_OBJECT8_BACKGROUND: + return 8; + case FINALIZE_OBJECT12: + case FINALIZE_OBJECT12_BACKGROUND: + return 12; + case FINALIZE_OBJECT16: + case FINALIZE_OBJECT16_BACKGROUND: + return 16; + default: + __builtin_unreachable(); + return 0; + } +} + +static inline size_t +GetGCKindSlots(AllocKind thingKind, Class *clasp) +{ + size_t nslots = GetGCKindSlots(thingKind); + + + if (clasp->flags & (1<<0)) { + do { } while(0); + nslots--; + } + + + + + + if (clasp == &FunctionClass) + nslots = 0; + + return nslots; +} + +static inline void +GCPoke(JSRuntime *rt, Value oldval) +{ + + + + + + + rt->gcPoke = true; +# 183 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgcinlines.h" +} + + + + + +template +void +ForEachArenaAndCell(JSCompartment *compartment, AllocKind thingKind, + ArenaOp arenaOp, CellOp cellOp) +{ + size_t thingSize = Arena::thingSize(thingKind); + ArenaHeader *aheader = compartment->arenas.getFirstArena(thingKind); + + for (; aheader; aheader = aheader->next) { + Arena *arena = aheader->getArena(); + arenaOp(arena); + FreeSpan firstSpan(aheader->getFirstFreeSpan()); + const FreeSpan *span = &firstSpan; + + for (uintptr_t thing = arena->thingsStart(thingKind); ; thing += thingSize) { + do { } while(0); + if (thing == span->first) { + if (!span->hasNext()) + break; + thing = span->last; + span = span->nextSpan(); + } else { + Cell *t = reinterpret_cast(thing); + cellOp(t); + } + } + } +} + +class CellIterImpl +{ + size_t firstThingOffset; + size_t thingSize; + ArenaHeader *aheader; + FreeSpan firstSpan; + const FreeSpan *span; + uintptr_t thing; + Cell *cell; + + protected: + CellIterImpl() { + } + + void initSpan(JSCompartment *comp, AllocKind kind) { + do { } while(0); + firstThingOffset = Arena::firstThingOffset(kind); + thingSize = Arena::thingSize(kind); + firstSpan.initAsEmpty(); + span = &firstSpan; + thing = span->first; + } + + void init(ArenaHeader *singleAheader) { + aheader = singleAheader; + initSpan(aheader->compartment, aheader->getAllocKind()); + next(); + aheader = __null; + } + + void init(JSCompartment *comp, AllocKind kind) { + initSpan(comp, kind); + aheader = comp->arenas.getFirstArena(kind); + next(); + } + + public: + bool done() const { + return !cell; + } + + template T *get() const { + do { } while(0); + return static_cast(cell); + } + + Cell *getCell() const { + do { } while(0); + return cell; + } + + void next() { + for (;;) { + if (thing != span->first) + break; + if ((__builtin_expect((span->hasNext()), 1))) { + thing = span->last + thingSize; + span = span->nextSpan(); + break; + } + if (!aheader) { + cell = __null; + return; + } + firstSpan = aheader->getFirstFreeSpan(); + span = &firstSpan; + thing = aheader->arenaAddress() | firstThingOffset; + aheader = aheader->next; + } + cell = reinterpret_cast(thing); + thing += thingSize; + } +}; + +class CellIterUnderGC : public CellIterImpl +{ + public: + CellIterUnderGC(JSCompartment *comp, AllocKind kind) { + do { } while(0); + init(comp, kind); + } + + CellIterUnderGC(ArenaHeader *aheader) { + do { } while(0); + init(aheader); + } +}; + + + + + + +class CellIter : public CellIterImpl +{ + ArenaLists *lists; + AllocKind kind; + + + + public: + CellIter(JSCompartment *comp, AllocKind kind) + : lists(&comp->arenas), + kind(kind) + { + + + + + + + do { } while(0); + if (lists->isSynchronizedFreeList(kind)) { + lists = __null; + } else { + do { } while(0); + lists->copyFreeListToArena(kind); + } + + + + + init(comp, kind); + } + + ~CellIter() { + + + + + if (lists) + lists->clearFreeListInArena(kind); + } +}; + + + +inline void EmptyArenaOp(Arena *arena) {} +inline void EmptyCellOp(Cell *t) {} + +class GCCompartmentsIter { + private: + JSCompartment **it, **end; + + public: + GCCompartmentsIter(JSRuntime *rt) { + do { } while(0); + it = rt->compartments.begin(); + end = rt->compartments.end(); + if (!(*it)->isCollecting()) + next(); + } + + bool done() const { return it == end; } + + void next() { + do { } while(0); + do { + it++; + } while (it != end && !(*it)->isCollecting()); + } + + JSCompartment *get() const { + do { } while(0); + return *it; + } + + operator JSCompartment *() const { return get(); } + JSCompartment *operator->() const { return get(); } +}; +# 396 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgcinlines.h" +template +inline T * +NewGCThing(JSContext *cx, js::gc::AllocKind kind, size_t thingSize) +{ + do { } while(0); + + do { } while (0) + ; + + do { } while(0); + do { } while(0); + + + do {} while(0); + + + + + + + MaybeCheckStackRoots(cx); + + JSCompartment *comp = cx->compartment; + void *t = comp->arenas.allocateFromFreeList(kind, thingSize); + if (!t) + t = js::gc::ArenaLists::refillFreeList(cx, kind); + + do { } while (0) + ; + return static_cast(t); +} + + +template +inline T * +TryNewGCThing(JSContext *cx, js::gc::AllocKind kind, size_t thingSize) +{ + do { } while(0); + + do { } while (0) + ; + + do { } while(0); + do { } while(0); + + + + + + + void *t = cx->compartment->arenas.allocateFromFreeList(kind, thingSize); + do { } while (0) + ; + return static_cast(t); +} + +} +} + +inline JSObject * +js_NewGCObject(JSContext *cx, js::gc::AllocKind kind) +{ + do { } while(0); + return js::gc::NewGCThing(cx, kind, js::gc::Arena::thingSize(kind)); +} + +inline JSObject * +js_TryNewGCObject(JSContext *cx, js::gc::AllocKind kind) +{ + do { } while(0); + return js::gc::TryNewGCThing(cx, kind, js::gc::Arena::thingSize(kind)); +} + +inline JSString * +js_NewGCString(JSContext *cx) +{ + return js::gc::NewGCThing(cx, js::gc::FINALIZE_STRING, sizeof(JSString)); +} + +inline JSShortString * +js_NewGCShortString(JSContext *cx) +{ + return js::gc::NewGCThing(cx, js::gc::FINALIZE_SHORT_STRING, sizeof(JSShortString)); +} + +inline JSExternalString * +js_NewGCExternalString(JSContext *cx) +{ + return js::gc::NewGCThing(cx, js::gc::FINALIZE_EXTERNAL_STRING, + sizeof(JSExternalString)); +} + +inline JSScript * +js_NewGCScript(JSContext *cx) +{ + return js::gc::NewGCThing(cx, js::gc::FINALIZE_SCRIPT, sizeof(JSScript)); +} + +inline js::Shape * +js_NewGCShape(JSContext *cx) +{ + return js::gc::NewGCThing(cx, js::gc::FINALIZE_SHAPE, sizeof(js::Shape)); +} + +inline js::BaseShape * +js_NewGCBaseShape(JSContext *cx) +{ + return js::gc::NewGCThing(cx, js::gc::FINALIZE_BASE_SHAPE, sizeof(js::BaseShape)); +} + + +extern JSXML * +js_NewGCXML(JSContext *cx); +# 43 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" 1 +# 10 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" 1 +# 10 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" +#define jsanalyze_h___ + +# 1 "./jsautooplen.h" 1 + + + + + +#define JSOP_NOP_LENGTH 1 +#define JSOP_UNDEFINED_LENGTH 1 +#define JSOP_POPV_LENGTH 1 +#define JSOP_ENTERWITH_LENGTH 1 +#define JSOP_LEAVEWITH_LENGTH 1 +#define JSOP_RETURN_LENGTH 1 +#define JSOP_GOTO_LENGTH 5 +#define JSOP_IFEQ_LENGTH 5 +#define JSOP_IFNE_LENGTH 5 +#define JSOP_ARGUMENTS_LENGTH 1 +#define JSOP_SWAP_LENGTH 1 +#define JSOP_POPN_LENGTH 3 +#define JSOP_DUP_LENGTH 1 +#define JSOP_DUP2_LENGTH 1 +#define JSOP_SETCONST_LENGTH 5 +#define JSOP_BITOR_LENGTH 1 +#define JSOP_BITXOR_LENGTH 1 +#define JSOP_BITAND_LENGTH 1 +#define JSOP_EQ_LENGTH 1 +#define JSOP_NE_LENGTH 1 +#define JSOP_LT_LENGTH 1 +#define JSOP_LE_LENGTH 1 +#define JSOP_GT_LENGTH 1 +#define JSOP_GE_LENGTH 1 +#define JSOP_LSH_LENGTH 1 +#define JSOP_RSH_LENGTH 1 +#define JSOP_URSH_LENGTH 1 +#define JSOP_ADD_LENGTH 1 +#define JSOP_SUB_LENGTH 1 +#define JSOP_MUL_LENGTH 1 +#define JSOP_DIV_LENGTH 1 +#define JSOP_MOD_LENGTH 1 +#define JSOP_NOT_LENGTH 1 +#define JSOP_BITNOT_LENGTH 1 +#define JSOP_NEG_LENGTH 1 +#define JSOP_POS_LENGTH 1 +#define JSOP_DELNAME_LENGTH 5 +#define JSOP_DELPROP_LENGTH 5 +#define JSOP_DELELEM_LENGTH 1 +#define JSOP_TYPEOF_LENGTH 1 +#define JSOP_VOID_LENGTH 1 +#define JSOP_INCNAME_LENGTH 6 +#define JSOP_INCPROP_LENGTH 6 +#define JSOP_INCELEM_LENGTH 2 +#define JSOP_DECNAME_LENGTH 6 +#define JSOP_DECPROP_LENGTH 6 +#define JSOP_DECELEM_LENGTH 2 +#define JSOP_NAMEINC_LENGTH 6 +#define JSOP_PROPINC_LENGTH 6 +#define JSOP_ELEMINC_LENGTH 2 +#define JSOP_NAMEDEC_LENGTH 6 +#define JSOP_PROPDEC_LENGTH 6 +#define JSOP_ELEMDEC_LENGTH 2 +#define JSOP_GETPROP_LENGTH 5 +#define JSOP_SETPROP_LENGTH 5 +#define JSOP_GETELEM_LENGTH 1 +#define JSOP_SETELEM_LENGTH 1 +#define JSOP_CALLNAME_LENGTH 5 +#define JSOP_CALL_LENGTH 3 +#define JSOP_NAME_LENGTH 5 +#define JSOP_DOUBLE_LENGTH 5 +#define JSOP_STRING_LENGTH 5 +#define JSOP_ZERO_LENGTH 1 +#define JSOP_ONE_LENGTH 1 +#define JSOP_NULL_LENGTH 1 +#define JSOP_THIS_LENGTH 1 +#define JSOP_FALSE_LENGTH 1 +#define JSOP_TRUE_LENGTH 1 +#define JSOP_OR_LENGTH 5 +#define JSOP_AND_LENGTH 5 +#define JSOP_TABLESWITCH_LENGTH -1 +#define JSOP_LOOKUPSWITCH_LENGTH -1 +#define JSOP_STRICTEQ_LENGTH 1 +#define JSOP_STRICTNE_LENGTH 1 +#define JSOP_SETCALL_LENGTH 1 +#define JSOP_ITER_LENGTH 2 +#define JSOP_MOREITER_LENGTH 1 +#define JSOP_ITERNEXT_LENGTH 2 +#define JSOP_ENDITER_LENGTH 1 +#define JSOP_FUNAPPLY_LENGTH 3 +#define JSOP_OBJECT_LENGTH 5 +#define JSOP_POP_LENGTH 1 +#define JSOP_NEW_LENGTH 3 +#define JSOP_UNUSED0_LENGTH 1 +#define JSOP_GETARG_LENGTH 3 +#define JSOP_SETARG_LENGTH 3 +#define JSOP_GETLOCAL_LENGTH 3 +#define JSOP_SETLOCAL_LENGTH 3 +#define JSOP_UINT16_LENGTH 3 +#define JSOP_NEWINIT_LENGTH 5 +#define JSOP_NEWARRAY_LENGTH 4 +#define JSOP_NEWOBJECT_LENGTH 5 +#define JSOP_ENDINIT_LENGTH 1 +#define JSOP_INITPROP_LENGTH 5 +#define JSOP_INITELEM_LENGTH 1 +#define JSOP_UNUSED14_LENGTH 1 +#define JSOP_UNUSED15_LENGTH 1 +#define JSOP_INCARG_LENGTH 3 +#define JSOP_DECARG_LENGTH 3 +#define JSOP_ARGINC_LENGTH 3 +#define JSOP_ARGDEC_LENGTH 3 +#define JSOP_INCLOCAL_LENGTH 3 +#define JSOP_DECLOCAL_LENGTH 3 +#define JSOP_LOCALINC_LENGTH 3 +#define JSOP_LOCALDEC_LENGTH 3 +#define JSOP_LEAVEFORLETIN_LENGTH 1 +#define JSOP_LABEL_LENGTH 5 +#define JSOP_UNUSED3_LENGTH 1 +#define JSOP_FUNCALL_LENGTH 3 +#define JSOP_LOOPHEAD_LENGTH 1 +#define JSOP_BINDNAME_LENGTH 5 +#define JSOP_SETNAME_LENGTH 5 +#define JSOP_THROW_LENGTH 1 +#define JSOP_IN_LENGTH 1 +#define JSOP_INSTANCEOF_LENGTH 1 +#define JSOP_DEBUGGER_LENGTH 1 +#define JSOP_GOSUB_LENGTH 5 +#define JSOP_RETSUB_LENGTH 1 +#define JSOP_EXCEPTION_LENGTH 1 +#define JSOP_LINENO_LENGTH 3 +#define JSOP_CONDSWITCH_LENGTH 1 +#define JSOP_CASE_LENGTH 5 +#define JSOP_DEFAULT_LENGTH 5 +#define JSOP_EVAL_LENGTH 3 +#define JSOP_ENUMELEM_LENGTH 1 +#define JSOP_GETTER_LENGTH 1 +#define JSOP_SETTER_LENGTH 1 +#define JSOP_DEFFUN_LENGTH 5 +#define JSOP_DEFCONST_LENGTH 5 +#define JSOP_DEFVAR_LENGTH 5 +#define JSOP_LAMBDA_LENGTH 5 +#define JSOP_CALLEE_LENGTH 1 +#define JSOP_UNUSED31_LENGTH 1 +#define JSOP_PICK_LENGTH 2 +#define JSOP_TRY_LENGTH 1 +#define JSOP_FINALLY_LENGTH 1 +#define JSOP_GETALIASEDVAR_LENGTH 9 +#define JSOP_CALLALIASEDVAR_LENGTH 9 +#define JSOP_SETALIASEDVAR_LENGTH 9 +#define JSOP_INCALIASEDVAR_LENGTH 10 +#define JSOP_DECALIASEDVAR_LENGTH 10 +#define JSOP_ALIASEDVARINC_LENGTH 10 +#define JSOP_ALIASEDVARDEC_LENGTH 10 +#define JSOP_UNUSED8_LENGTH 1 +#define JSOP_UNUSED9_LENGTH 1 +#define JSOP_UNUSED10_LENGTH 1 +#define JSOP_UNUSED11_LENGTH 1 +#define JSOP_UNUSED12_LENGTH 1 +#define JSOP_UNUSED13_LENGTH 1 +#define JSOP_BACKPATCH_LENGTH 5 +#define JSOP_BACKPATCH_POP_LENGTH 5 +#define JSOP_THROWING_LENGTH 1 +#define JSOP_SETRVAL_LENGTH 1 +#define JSOP_RETRVAL_LENGTH 1 +#define JSOP_GETGNAME_LENGTH 5 +#define JSOP_SETGNAME_LENGTH 5 +#define JSOP_INCGNAME_LENGTH 6 +#define JSOP_DECGNAME_LENGTH 6 +#define JSOP_GNAMEINC_LENGTH 6 +#define JSOP_GNAMEDEC_LENGTH 6 +#define JSOP_REGEXP_LENGTH 5 +#define JSOP_DEFXMLNS_LENGTH 1 +#define JSOP_ANYNAME_LENGTH 1 +#define JSOP_QNAMEPART_LENGTH 5 +#define JSOP_QNAMECONST_LENGTH 5 +#define JSOP_QNAME_LENGTH 1 +#define JSOP_TOATTRNAME_LENGTH 1 +#define JSOP_TOATTRVAL_LENGTH 1 +#define JSOP_ADDATTRNAME_LENGTH 1 +#define JSOP_ADDATTRVAL_LENGTH 1 +#define JSOP_BINDXMLNAME_LENGTH 1 +#define JSOP_SETXMLNAME_LENGTH 1 +#define JSOP_XMLNAME_LENGTH 1 +#define JSOP_DESCENDANTS_LENGTH 1 +#define JSOP_FILTER_LENGTH 5 +#define JSOP_ENDFILTER_LENGTH 5 +#define JSOP_TOXML_LENGTH 1 +#define JSOP_TOXMLLIST_LENGTH 1 +#define JSOP_XMLTAGEXPR_LENGTH 1 +#define JSOP_XMLELTEXPR_LENGTH 1 +#define JSOP_XMLCDATA_LENGTH 5 +#define JSOP_XMLCOMMENT_LENGTH 5 +#define JSOP_XMLPI_LENGTH 5 +#define JSOP_DELDESC_LENGTH 1 +#define JSOP_CALLPROP_LENGTH 5 +#define JSOP_ENTERLET0_LENGTH 5 +#define JSOP_ENTERLET1_LENGTH 5 +#define JSOP_UINT24_LENGTH 4 +#define JSOP_UNUSED18_LENGTH 1 +#define JSOP_UNUSED19_LENGTH 1 +#define JSOP_UNUSED20_LENGTH 1 +#define JSOP_STARTXML_LENGTH 1 +#define JSOP_STARTXMLEXPR_LENGTH 1 +#define JSOP_CALLELEM_LENGTH 1 +#define JSOP_STOP_LENGTH 1 +#define JSOP_GETXPROP_LENGTH 5 +#define JSOP_CALLXMLNAME_LENGTH 1 +#define JSOP_TYPEOFEXPR_LENGTH 1 +#define JSOP_ENTERBLOCK_LENGTH 5 +#define JSOP_LEAVEBLOCK_LENGTH 3 +#define JSOP_UNUSED1_LENGTH 1 +#define JSOP_UNUSED2_LENGTH 1 +#define JSOP_GENERATOR_LENGTH 1 +#define JSOP_YIELD_LENGTH 1 +#define JSOP_ARRAYPUSH_LENGTH 3 +#define JSOP_GETFUNNS_LENGTH 1 +#define JSOP_ENUMCONSTELEM_LENGTH 1 +#define JSOP_LEAVEBLOCKEXPR_LENGTH 3 +#define JSOP_UNUSED21_LENGTH 1 +#define JSOP_UNUSED22_LENGTH 1 +#define JSOP_UNUSED23_LENGTH 1 +#define JSOP_CALLGNAME_LENGTH 5 +#define JSOP_CALLLOCAL_LENGTH 3 +#define JSOP_CALLARG_LENGTH 3 +#define JSOP_BINDGNAME_LENGTH 5 +#define JSOP_INT8_LENGTH 2 +#define JSOP_INT32_LENGTH 5 +#define JSOP_LENGTH_LENGTH 5 +#define JSOP_HOLE_LENGTH 1 +#define JSOP_UNUSED17_LENGTH 1 +#define JSOP_UNUSED24_LENGTH 1 +#define JSOP_UNUSED25_LENGTH 1 +#define JSOP_UNUSED29_LENGTH 1 +#define JSOP_UNUSED30_LENGTH 1 +#define JSOP_REST_LENGTH 1 +#define JSOP_TOID_LENGTH 1 +#define JSOP_IMPLICITTHIS_LENGTH 5 +#define JSOP_LOOPENTRY_LENGTH 1 +#define JSOP_ACTUALSFILLED_LENGTH 3 +# 13 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" 2 + + + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject.h" 1 +# 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" 2 + +struct JSScript; + + +namespace js { namespace mjit { struct RegisterAllocation; } } + +namespace js { +namespace analyze { +# 59 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" +class Bytecode +{ + friend class ScriptAnalysis; + + public: + Bytecode() { PodZero(this); } + + + + + bool jumpTarget : 1; + + + bool fallthrough : 1; + + + bool jumpFallthrough : 1; + + + bool switchTarget : 1; + + + + + + bool unconditional : 1; + + + bool analyzed : 1; + + + bool exceptionEntry : 1; + + + bool inTryBlock : 1; + + + bool inLoop : 1; + + + bool safePoint : 1; + + + + + + bool monitoredTypes : 1; + + + bool monitoredTypesReturn : 1; + + + + + + bool arrayWriteHole: 1; + bool getStringElement:1; + bool accessGetter: 1; + + + uint32_t stackDepth; + + private: + + union { + + types::TypeSet *observedTypes; + + + LoopAnalysis *loop; + }; + + + + + mjit::RegisterAllocation *allocation; + + + + + SSAValue *poppedValues; + + + SSAUseChain **pushedUses; + + union { + + + + + + + SlotValue *newValues; +# 161 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" + Vector *pendingValues; + }; + + + + + types::TypeSet *pushedTypes; + + + types::TypeBarrier *typeBarriers; +}; + +static inline unsigned +GetDefCount(JSScript *script, unsigned offset) +{ + do { } while(0); + jsbytecode *pc = script->code + offset; + + + + + + switch (JSOp(*pc)) { + case JSOP_OR: + case JSOP_AND: + return 1; + case JSOP_FILTER: + return 2; + case JSOP_PICK: + + + + + + + return (pc[1] + 1); + default: + return StackDefs(script, pc); + } +} + +static inline unsigned +GetUseCount(JSScript *script, unsigned offset) +{ + do { } while(0); + jsbytecode *pc = script->code + offset; + + if (JSOp(*pc) == JSOP_PICK) + return (pc[1] + 1); + if (js_CodeSpec[*pc].nuses == -1) + return StackUses(script, pc); + return js_CodeSpec[*pc].nuses; +} + + + + + +static inline bool +ExtendedDef(jsbytecode *pc) +{ + switch ((JSOp)*pc) { + case JSOP_SETARG: + case JSOP_INCARG: + case JSOP_DECARG: + case JSOP_ARGINC: + case JSOP_ARGDEC: + case JSOP_SETLOCAL: + case JSOP_INCLOCAL: + case JSOP_DECLOCAL: + case JSOP_LOCALINC: + case JSOP_LOCALDEC: + return true; + default: + return false; + } +} + + +static inline bool +BytecodeNoFallThrough(JSOp op) +{ + switch (op) { + case JSOP_GOTO: + case JSOP_DEFAULT: + case JSOP_RETURN: + case JSOP_STOP: + case JSOP_RETRVAL: + case JSOP_THROW: + case JSOP_TABLESWITCH: + case JSOP_LOOKUPSWITCH: + case JSOP_FILTER: + return true; + case JSOP_GOSUB: + + return false; + default: + return false; + } +} + + + + + +static inline bool +ExtendedUse(jsbytecode *pc) +{ + if (ExtendedDef(pc)) + return true; + switch ((JSOp)*pc) { + case JSOP_GETARG: + case JSOP_CALLARG: + case JSOP_GETLOCAL: + case JSOP_CALLLOCAL: + return true; + default: + return false; + } +} + +static inline JSOp +ReverseCompareOp(JSOp op) +{ + switch (op) { + case JSOP_GT: + return JSOP_LT; + case JSOP_GE: + return JSOP_LE; + case JSOP_LT: + return JSOP_GT; + case JSOP_LE: + return JSOP_GE; + default: + __builtin_unreachable(); + return op; + } +} + +static inline unsigned +FollowBranch(JSContext *cx, JSScript *script, unsigned offset) +{ + + + + + + jsbytecode *pc = script->code + offset; + unsigned targetOffset = offset + GET_JUMP_OFFSET(pc); + if (targetOffset < offset) { + jsbytecode *target = script->code + targetOffset; + JSOp nop = JSOp(*target); + if (nop == JSOP_GOTO) + return targetOffset + GET_JUMP_OFFSET(target); + } + return targetOffset; +} + + +static inline uint32_t CalleeSlot() { + return 0; +} +static inline uint32_t ThisSlot() { + return 1; +} +static inline uint32_t ArgSlot(uint32_t arg) { + return 2 + arg; +} +static inline uint32_t LocalSlot(JSScript *script, uint32_t local) { + return 2 + (script->function() ? script->function()->nargs : 0) + local; +} +static inline uint32_t TotalSlots(JSScript *script) { + return LocalSlot(script, 0) + script->nfixed; +} + +static inline uint32_t StackSlot(JSScript *script, uint32_t index) { + return TotalSlots(script) + index; +} + +static inline uint32_t GetBytecodeSlot(JSScript *script, jsbytecode *pc) +{ + switch (JSOp(*pc)) { + + case JSOP_GETARG: + case JSOP_CALLARG: + case JSOP_SETARG: + case JSOP_INCARG: + case JSOP_DECARG: + case JSOP_ARGINC: + case JSOP_ARGDEC: + return ArgSlot(((unsigned)(((pc)[1] << 8) | (pc)[2]))); + + case JSOP_GETLOCAL: + case JSOP_CALLLOCAL: + case JSOP_SETLOCAL: + case JSOP_INCLOCAL: + case JSOP_DECLOCAL: + case JSOP_LOCALINC: + case JSOP_LOCALDEC: + return LocalSlot(script, ((unsigned)(((pc)[1] << 8) | (pc)[2]))); + + case JSOP_GETALIASEDVAR: + case JSOP_CALLALIASEDVAR: + case JSOP_SETALIASEDVAR: + { + ScopeCoordinate sc = ScopeCoordinate(pc); + return script->bindings.bindingIsArg(sc.binding) + ? ArgSlot(script->bindings.bindingToArg(sc.binding)) + : LocalSlot(script, script->bindings.bindingToLocal(sc.binding)); + } + + + case JSOP_THIS: + return ThisSlot(); + + default: + __builtin_unreachable(); + return 0; + } +} + + +static inline bool +BytecodeUpdatesSlot(JSOp op) +{ + switch (op) { + case JSOP_SETARG: + case JSOP_SETLOCAL: + case JSOP_INCARG: + case JSOP_DECARG: + case JSOP_ARGINC: + case JSOP_ARGDEC: + case JSOP_INCLOCAL: + case JSOP_DECLOCAL: + case JSOP_LOCALINC: + case JSOP_LOCALDEC: + return true; + default: + return false; + } +} + +static inline int32_t +GetBytecodeInteger(jsbytecode *pc) +{ + switch (JSOp(*pc)) { + case JSOP_ZERO: return 0; + case JSOP_ONE: return 1; + case JSOP_UINT16: return ((unsigned)(((pc)[1] << 8) | (pc)[2])); + case JSOP_UINT24: return ((jsatomid)(((pc)[1] << 16) | ((pc)[2] << 8) | (pc)[3])); + case JSOP_INT8: return (int8_t((pc)[1])); + case JSOP_INT32: return (((uint32_t((pc)[1]) << 24) | (uint32_t((pc)[2]) << 16) | (uint32_t((pc)[3]) << 8) | uint32_t((pc)[4]))); + default: + __builtin_unreachable(); + return 0; + } +} +# 426 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" +struct Lifetime +{ + + + + + uint32_t start; + uint32_t end; + + + + + + uint32_t savedEnd; + + + + + + + bool loopTail; + + + + + + bool write; + + + Lifetime *next; + + Lifetime(uint32_t offset, uint32_t savedEnd, Lifetime *next) + : start(offset), end(offset), savedEnd(savedEnd), + loopTail(false), write(false), next(next) + {} +}; + + +class LoopAnalysis +{ + public: + + LoopAnalysis *parent; + + + uint32_t head; + + + + + + uint32_t backedge; + + + uint32_t entry; + + + + + + + + uint32_t lastBlock; + + + + + + bool hasSafePoints; + + + bool hasCallsLoops; +}; + + +struct LifetimeVariable +{ + + Lifetime *lifetime; + + + Lifetime *saved; + + + uint32_t savedEnd : 31; + + + bool ensured : 1; + + + Lifetime * live(uint32_t offset) const { + if (lifetime && lifetime->end >= offset) + return lifetime; + Lifetime *segment = lifetime ? lifetime : saved; + while (segment && segment->start <= offset) { + if (segment->end >= offset) + return segment; + segment = segment->next; + } + return __null; + } + + + + + + uint32_t firstWrite(uint32_t start, uint32_t end) const { + Lifetime *segment = lifetime ? lifetime : saved; + while (segment && segment->start <= end) { + if (segment->start >= start && segment->write) + return segment->start; + segment = segment->next; + } + return (4294967295U); + } + uint32_t firstWrite(LoopAnalysis *loop) const { + return firstWrite(loop->head, loop->backedge); + } + + + bool nonDecreasing(JSScript *script, LoopAnalysis *loop) const { + Lifetime *segment = lifetime ? lifetime : saved; + while (segment && segment->start <= loop->backedge) { + if (segment->start >= loop->head && segment->write) { + switch (JSOp(script->code[segment->start])) { + case JSOP_INCLOCAL: + case JSOP_LOCALINC: + case JSOP_INCARG: + case JSOP_ARGINC: + break; + default: + return false; + } + } + segment = segment->next; + } + return true; + } + + + + + + uint32_t onlyWrite(LoopAnalysis *loop) const { + uint32_t offset = (4294967295U); + Lifetime *segment = lifetime ? lifetime : saved; + while (segment && segment->start <= loop->backedge) { + if (segment->start >= loop->head && segment->write) { + if (offset != (4294967295U)) + return (4294967295U); + offset = segment->start; + } + segment = segment->next; + } + return offset; + } + + + + +}; + +struct SSAPhiNode; + + + + + + + +class SSAValue +{ + friend class ScriptAnalysis; + + public: + enum Kind { + EMPTY = 0, + PUSHED = 1, + VAR = 2, + PHI = 3 + }; + + Kind kind() const { + do { } while(0); + + + return (Kind) (u.pushed.kind & 0x3); + } + + bool operator==(const SSAValue &o) const { + return !memcmp(this, &o, sizeof(SSAValue)); + } + + + + uint32_t pushedOffset() const { + do { } while(0); + return u.pushed.offset; + } + + uint32_t pushedIndex() const { + do { } while(0); + return u.pushed.index; + } + + + + bool varInitial() const { + do { } while(0); + return u.var.initial; + } + + uint32_t varSlot() const { + do { } while(0); + return u.var.slot; + } + + uint32_t varOffset() const { + do { } while(0); + return u.var.offset; + } + + + + uint32_t phiSlot() const; + uint32_t phiLength() const; + const SSAValue &phiValue(uint32_t i) const; + types::TypeSet *phiTypes() const; + + + uint32_t phiOffset() const { + do { } while(0); + return u.phi.offset; + } + + SSAPhiNode *phiNode() const { + do { } while(0); + return u.phi.node; + } + + + + + + + + void clear() { + PodZero(this); + do { } while(0); + } + + void initPushed(uint32_t offset, uint32_t index) { + clear(); + u.pushed.kind = PUSHED; + u.pushed.offset = offset; + u.pushed.index = index; + } + + static SSAValue PushedValue(uint32_t offset, uint32_t index) { + SSAValue v; + v.initPushed(offset, index); + return v; + } + + void initInitial(uint32_t slot) { + clear(); + u.var.kind = VAR; + u.var.initial = true; + u.var.slot = slot; + } + + void initWritten(uint32_t slot, uint32_t offset) { + clear(); + u.var.kind = VAR; + u.var.initial = false; + u.var.slot = slot; + u.var.offset = offset; + } + + static SSAValue WrittenVar(uint32_t slot, uint32_t offset) { + SSAValue v; + v.initWritten(slot, offset); + return v; + } + + void initPhi(uint32_t offset, SSAPhiNode *node) { + clear(); + u.phi.kind = PHI; + u.phi.offset = offset; + u.phi.node = node; + } + + static SSAValue PhiValue(uint32_t offset, SSAPhiNode *node) { + SSAValue v; + v.initPhi(offset, node); + return v; + } + + private: + union { + struct { + Kind kind : 2; + uint32_t offset : 30; + uint32_t index; + } pushed; + struct { + Kind kind : 2; + bool initial : 1; + uint32_t slot : 29; + uint32_t offset; + } var; + struct { + Kind kind : 2; + uint32_t offset : 30; + SSAPhiNode *node; + } phi; + } u; +}; + + + + + + + +struct SSAPhiNode +{ + types::TypeSet types; + uint32_t slot; + uint32_t length; + SSAValue *options; + SSAUseChain *uses; + SSAPhiNode() { PodZero(this); } +}; + +inline uint32_t +SSAValue::phiSlot() const +{ + return u.phi.node->slot; +} + +inline uint32_t +SSAValue::phiLength() const +{ + do { } while(0); + return u.phi.node->length; +} + +inline const SSAValue & +SSAValue::phiValue(uint32_t i) const +{ + do { } while(0); + return u.phi.node->options[i]; +} + +inline types::TypeSet * +SSAValue::phiTypes() const +{ + do { } while(0); + return &u.phi.node->types; +} + +class SSAUseChain +{ + public: + bool popped : 1; + uint32_t offset : 31; + + union { + uint32_t which; + SSAPhiNode *phi; + } u; + SSAUseChain *next; + + SSAUseChain() { PodZero(this); } +}; + +class SlotValue +{ + public: + uint32_t slot; + SSAValue value; + SlotValue(uint32_t slot, const SSAValue &value) : slot(slot), value(value) {} +}; + +struct NeedsArgsObjState; + + +class ScriptAnalysis +{ + friend class Bytecode; + + JSScript *script; + + Bytecode **codeArray; + + uint32_t numSlots; + + bool outOfMemory; + bool hadFailure; + + bool *escapedSlots; + + + bool ranBytecode_; + bool ranSSA_; + bool ranLifetimes_; + bool ranInference_; +# 842 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" + bool usesReturnValue_:1; + bool usesScopeChain_:1; + bool usesThisValue_:1; + bool hasFunctionCalls_:1; + bool modifiesArguments_:1; + bool extendsScope_:1; + bool addsScopeObjects_:1; + bool localsAliasStack_:1; + bool isInlineable:1; + bool isJaegerCompileable:1; + bool canTrackVars:1; + + uint32_t numReturnSites_; + + + + LifetimeVariable *lifetimes; + + public: + + ScriptAnalysis(JSScript *script) { + PodZero(this); + this->script = script; + + + + } + + bool ranBytecode() { return ranBytecode_; } + bool ranSSA() { return ranSSA_; } + bool ranLifetimes() { return ranLifetimes_; } + bool ranInference() { return ranInference_; } + + void analyzeBytecode(JSContext *cx); + void analyzeSSA(JSContext *cx); + void analyzeLifetimes(JSContext *cx); + void analyzeTypes(JSContext *cx); + + + void analyzeTypesNew(JSContext *cx); + + bool OOM() { return outOfMemory; } + bool failed() { return hadFailure; } + bool inlineable(uint32_t argc) { return isInlineable && argc == script->function()->nargs; } + bool jaegerCompileable() { return isJaegerCompileable; } + + + bool usesReturnValue() const { return usesReturnValue_; } + + + bool usesScopeChain() const { return usesScopeChain_; } + + bool usesThisValue() const { return usesThisValue_; } + bool hasFunctionCalls() const { return hasFunctionCalls_; } + uint32_t numReturnSites() const { return numReturnSites_; } + + + + + + bool modifiesArguments() { return modifiesArguments_; } + + + + + + bool extendsScope() { return extendsScope_; } + + + bool addsScopeObjects() { return addsScopeObjects_; } + + + + + + bool localsAliasStack() { return localsAliasStack_; } + + + + Bytecode& getCode(uint32_t offset) { + do { } while(0); + do { } while(0); + return *codeArray[offset]; + } + Bytecode& getCode(const jsbytecode *pc) { return getCode(pc - script->code); } + + Bytecode* maybeCode(uint32_t offset) { + do { } while(0); + return codeArray[offset]; + } + Bytecode* maybeCode(const jsbytecode *pc) { return maybeCode(pc - script->code); } + + bool jumpTarget(uint32_t offset) { + do { } while(0); + return codeArray[offset] && codeArray[offset]->jumpTarget; + } + bool jumpTarget(const jsbytecode *pc) { return jumpTarget(pc - script->code); } + + bool popGuaranteed(jsbytecode *pc) { + jsbytecode *next = pc + GetBytecodeLength(pc); + return JSOp(*next) == JSOP_POP && !jumpTarget(next); + } + + bool incrementInitialValueObserved(jsbytecode *pc) { + const JSCodeSpec *cs = &js_CodeSpec[*pc]; + return (cs->format & (1U<<12)) && !popGuaranteed(pc); + } + + types::TypeSet *bytecodeTypes(const jsbytecode *pc) { + do { } while(0); + return getCode(pc).observedTypes; + } + + const SSAValue &poppedValue(uint32_t offset, uint32_t which) { + do { } while(0); + do { } while(0) + ; + return getCode(offset).poppedValues[which]; + } + const SSAValue &poppedValue(const jsbytecode *pc, uint32_t which) { + return poppedValue(pc - script->code, which); + } + + const SlotValue *newValues(uint32_t offset) { + do { } while(0); + return getCode(offset).newValues; + } + const SlotValue *newValues(const jsbytecode *pc) { return newValues(pc - script->code); } + + types::TypeSet *pushedTypes(uint32_t offset, uint32_t which = 0) { + do { } while(0); + do { } while(0) + ; + types::TypeSet *array = getCode(offset).pushedTypes; + do { } while(0); + return array + which; + } + types::TypeSet *pushedTypes(const jsbytecode *pc, uint32_t which) { + return pushedTypes(pc - script->code, which); + } + + bool hasPushedTypes(const jsbytecode *pc) { return getCode(pc).pushedTypes != __null; } + + types::TypeBarrier *typeBarriers(JSContext *cx, uint32_t offset) { + if (getCode(offset).typeBarriers) + pruneTypeBarriers(cx, offset); + return getCode(offset).typeBarriers; + } + types::TypeBarrier *typeBarriers(JSContext *cx, const jsbytecode *pc) { + return typeBarriers(cx, pc - script->code); + } + void addTypeBarrier(JSContext *cx, const jsbytecode *pc, + types::TypeSet *target, types::Type type); + void addSingletonTypeBarrier(JSContext *cx, const jsbytecode *pc, + types::TypeSet *target, JSObject *singleton, jsid singletonId); + + + void pruneTypeBarriers(JSContext *cx, uint32_t offset); + + + + + + + void breakTypeBarriers(JSContext *cx, uint32_t offset, bool all); + + + void breakTypeBarriersSSA(JSContext *cx, const SSAValue &v); + + inline void addPushedType(JSContext *cx, uint32_t offset, uint32_t which, types::Type type); + + types::TypeSet *getValueTypes(const SSAValue &v) { + switch (v.kind()) { + case SSAValue::PUSHED: + return pushedTypes(v.pushedOffset(), v.pushedIndex()); + case SSAValue::VAR: + do { } while(0); + if (v.varInitial()) { + return types::TypeScript::SlotTypes(script, v.varSlot()); + } else { + + + + + + + return pushedTypes(v.varOffset(), 0); + } + case SSAValue::PHI: + return &v.phiNode()->types; + default: + + __builtin_unreachable(); + return __null; + } + } + + types::TypeSet *poppedTypes(uint32_t offset, uint32_t which) { + return getValueTypes(poppedValue(offset, which)); + } + types::TypeSet *poppedTypes(const jsbytecode *pc, uint32_t which) { + return getValueTypes(poppedValue(pc, which)); + } + + + bool integerOperation(JSContext *cx, jsbytecode *pc); + + bool trackUseChain(const SSAValue &v) { + do { } while (0); + return v.kind() != SSAValue::EMPTY && + (v.kind() != SSAValue::VAR || !v.varInitial()); + } + + + + + + SSAUseChain *& useChain(const SSAValue &v) { + do { } while(0); + if (v.kind() == SSAValue::PUSHED) + return getCode(v.pushedOffset()).pushedUses[v.pushedIndex()]; + if (v.kind() == SSAValue::VAR) + return getCode(v.varOffset()).pushedUses[GetDefCount(script, v.varOffset())]; + return v.phiNode()->uses; + } + + mjit::RegisterAllocation *&getAllocation(uint32_t offset) { + do { } while(0); + return getCode(offset).allocation; + } + mjit::RegisterAllocation *&getAllocation(const jsbytecode *pc) { + return getAllocation(pc - script->code); + } + + LoopAnalysis *getLoop(uint32_t offset) { + do { } while(0); + return getCode(offset).loop; + } + LoopAnalysis *getLoop(const jsbytecode *pc) { return getLoop(pc - script->code); } + + + jsbytecode *getCallPC(jsbytecode *pc) + { + SSAUseChain *uses = useChain(SSAValue::PushedValue(pc - script->code, 0)); + do { } while(0); + do { } while(0); + return script->code + uses->offset; + } +# 1100 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" + bool slotEscapes(uint32_t slot) { + do { } while(0); + if (slot >= numSlots) + return true; + return escapedSlots[slot]; + } + + + + + + + + bool trackSlot(uint32_t slot) { return !slotEscapes(slot) && canTrackVars && slot < 1000; } + + const LifetimeVariable & liveness(uint32_t slot) { + do { } while(0); + do { } while(0); + return lifetimes[slot]; + } + + + + + + struct NameAccess { + JSScript *script; + types::TypeScriptNesting *nesting; + uint32_t slot; + + + bool arg; + uint32_t index; + + const Value **basePointer() const { + return arg ? &nesting->argArray : &nesting->varArray; + } + }; + NameAccess resolveNameAccess(JSContext *cx, jsid id, bool addDependency = false); + + void printSSA(JSContext *cx); + void printTypes(JSContext *cx); + + void clearAllocations(); + + private: + void setOOM(JSContext *cx) { + if (!outOfMemory) + js_ReportOutOfMemory(cx); + outOfMemory = true; + hadFailure = true; + } + + + inline bool addJump(JSContext *cx, unsigned offset, + unsigned *currentOffset, unsigned *forwardJump, unsigned *forwardLoop, + unsigned stackDepth); + + + inline void addVariable(JSContext *cx, LifetimeVariable &var, unsigned offset, + LifetimeVariable **&saved, unsigned &savedCount); + inline void killVariable(JSContext *cx, LifetimeVariable &var, unsigned offset, + LifetimeVariable **&saved, unsigned &savedCount); + inline void extendVariable(JSContext *cx, LifetimeVariable &var, unsigned start, unsigned end); + inline void ensureVariable(LifetimeVariable &var, unsigned until); + + + struct SSAValueInfo + { + SSAValue v; + + + + + + + int32_t branchSize; + }; + + + bool makePhi(JSContext *cx, uint32_t slot, uint32_t offset, SSAValue *pv); + void insertPhi(JSContext *cx, SSAValue &phi, const SSAValue &v); + void mergeValue(JSContext *cx, uint32_t offset, const SSAValue &v, SlotValue *pv); + void checkPendingValue(JSContext *cx, const SSAValue &v, uint32_t slot, + Vector *pending); + void checkBranchTarget(JSContext *cx, uint32_t targetOffset, Vector &branchTargets, + SSAValueInfo *values, uint32_t stackDepth); + void checkExceptionTarget(JSContext *cx, uint32_t catchOffset, + Vector &exceptionTargets); + void mergeBranchTarget(JSContext *cx, SSAValueInfo &value, uint32_t slot, + const Vector &branchTargets, uint32_t currentOffset); + void mergeExceptionTarget(JSContext *cx, const SSAValue &value, uint32_t slot, + const Vector &exceptionTargets); + void mergeAllExceptionTargets(JSContext *cx, SSAValueInfo *values, + const Vector &exceptionTargets); + void freezeNewValues(JSContext *cx, uint32_t offset); + + struct TypeInferenceState { + Vector phiNodes; + bool hasGetSet; + bool hasHole; + types::TypeSet *forTypes; + TypeInferenceState(JSContext *cx) + : phiNodes(cx), hasGetSet(false), hasHole(false), forTypes(__null) + {} + }; + + + bool analyzeTypesBytecode(JSContext *cx, unsigned offset, TypeInferenceState &state); + bool needsArgsObj(NeedsArgsObjState &state, const SSAValue &v); + bool needsArgsObj(NeedsArgsObjState &state, SSAUseChain *use); + bool needsArgsObj(JSContext *cx); + + public: + + + + void assertMatchingDebugMode() { } + +}; + + +class AutoEnterAnalysis +{ + JSCompartment *compartment; + bool oldActiveAnalysis; + bool left; + + void construct(JSCompartment *compartment) + { + this->compartment = compartment; + oldActiveAnalysis = compartment->activeAnalysis; + compartment->activeAnalysis = true; + left = false; + } + + public: + AutoEnterAnalysis(JSContext *cx) { construct(cx->compartment); } + AutoEnterAnalysis(JSCompartment *compartment) { construct(compartment); } + + void leave() + { + if (!left) { + left = true; + compartment->activeAnalysis = oldActiveAnalysis; + } + } + + ~AutoEnterAnalysis() + { + leave(); + } +}; + + +struct CrossSSAValue +{ + unsigned frame; + SSAValue v; + CrossSSAValue(unsigned frame, const SSAValue &v) : frame(frame), v(v) {} +}; + + + + + + +class CrossScriptSSA +{ + public: + + static const uint32_t OUTER_FRAME = (4294967295U); + static const unsigned INVALID_FRAME = uint32_t(-2); + + struct Frame { + uint32_t index; + JSScript *script; + uint32_t depth; + uint32_t parent; + jsbytecode *parentpc; + + Frame(uint32_t index, JSScript *script, uint32_t depth, uint32_t parent, jsbytecode *parentpc) + : index(index), script(script), depth(depth), parent(parent), parentpc(parentpc) + {} + }; + + const Frame &getFrame(uint32_t index) { + if (index == OUTER_FRAME) + return outerFrame; + return inlineFrames[index]; + } + + unsigned numFrames() { return 1 + inlineFrames.length(); } + const Frame &iterFrame(unsigned i) { + if (i == 0) + return outerFrame; + return inlineFrames[i - 1]; + } + + JSScript *outerScript() { return outerFrame.script; } + + + size_t frameLength(uint32_t index) { + if (index == OUTER_FRAME) + return 0; + size_t res = outerFrame.script->length; + for (unsigned i = 0; i < index; i++) + res += inlineFrames[i].script->length; + return res; + } + + types::TypeSet *getValueTypes(const CrossSSAValue &cv) { + return getFrame(cv.frame).script->analysis()->getValueTypes(cv.v); + } + + bool addInlineFrame(JSScript *script, uint32_t depth, uint32_t parent, jsbytecode *parentpc) + { + uint32_t index = inlineFrames.length(); + return inlineFrames.append(Frame(index, script, depth, parent, parentpc)); + } + + CrossScriptSSA(JSContext *cx, JSScript *outer) + : cx(cx), outerFrame(OUTER_FRAME, outer, 0, INVALID_FRAME, __null), inlineFrames(cx) + {} + + CrossSSAValue foldValue(const CrossSSAValue &cv); + + private: + JSContext *cx; + + Frame outerFrame; + Vector inlineFrames; +}; + + + + + +} +} + +namespace js { +namespace tl { + +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; + +} +} +# 11 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprf.h" 1 + + + + + + +#define jsprf_h___ +# 29 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprf.h" +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stdarg.h" 1 3 4 +# 31 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stdarg.h" 3 4 +#define _STDARG_H +#define _ANSI_STDARG_H_ + +#undef __need___va_list +# 47 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stdarg.h" 3 4 +#define va_start(v,l) __builtin_va_start(v,l) +#define va_end(v) __builtin_va_end(v) +#define va_arg(v,l) __builtin_va_arg(v,l) + +#define va_copy(d,s) __builtin_va_copy(d,s) + +#define __va_copy(d,s) __builtin_va_copy(d,s) +# 108 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stdarg.h" 3 4 +#define _VA_LIST_ + + +#define _VA_LIST + + + + + +#define _VA_LIST_T_H + + +#define __va_list__ +# 30 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprf.h" 2 + +extern "C" { + + + + + + +extern __attribute__((visibility("default"))) uint32_t JS_snprintf(char *out, uint32_t outlen, const char *fmt, ...); + + + + + + +extern __attribute__((visibility("default"))) char* JS_smprintf(const char *fmt, ...); + + + + +extern __attribute__((visibility("default"))) void JS_smprintf_free(char *mem); +# 59 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprf.h" +extern __attribute__((visibility("default"))) char* JS_sprintf_append(char *last, const char *fmt, ...); +# 68 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprf.h" +typedef int (*JSStuffFunc)(void *arg, const char *s, uint32_t slen); + +extern __attribute__((visibility("default"))) uint32_t JS_sxprintf(JSStuffFunc f, void *arg, const char *fmt, ...); + + + + +extern __attribute__((visibility("default"))) uint32_t JS_vsnprintf(char *out, uint32_t outlen, const char *fmt, va_list ap); +extern __attribute__((visibility("default"))) char* JS_vsmprintf(const char *fmt, va_list ap); +extern __attribute__((visibility("default"))) char* JS_vsprintf_append(char *last, const char *fmt, va_list ap); +extern __attribute__((visibility("default"))) uint32_t JS_vsxprintf(JSStuffFunc f, void *arg, const char *fmt, va_list ap); + +} +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" 2 + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" +#define Stack_inl_h__ + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" 1 +# 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" 1 +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscriptinlines.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscriptinlines.h" +#define jsscriptinlines_h___ + +# 1 "./jsautooplen.h" 1 + + + + + +#define JSOP_NOP_LENGTH 1 +#define JSOP_UNDEFINED_LENGTH 1 +#define JSOP_POPV_LENGTH 1 +#define JSOP_ENTERWITH_LENGTH 1 +#define JSOP_LEAVEWITH_LENGTH 1 +#define JSOP_RETURN_LENGTH 1 +#define JSOP_GOTO_LENGTH 5 +#define JSOP_IFEQ_LENGTH 5 +#define JSOP_IFNE_LENGTH 5 +#define JSOP_ARGUMENTS_LENGTH 1 +#define JSOP_SWAP_LENGTH 1 +#define JSOP_POPN_LENGTH 3 +#define JSOP_DUP_LENGTH 1 +#define JSOP_DUP2_LENGTH 1 +#define JSOP_SETCONST_LENGTH 5 +#define JSOP_BITOR_LENGTH 1 +#define JSOP_BITXOR_LENGTH 1 +#define JSOP_BITAND_LENGTH 1 +#define JSOP_EQ_LENGTH 1 +#define JSOP_NE_LENGTH 1 +#define JSOP_LT_LENGTH 1 +#define JSOP_LE_LENGTH 1 +#define JSOP_GT_LENGTH 1 +#define JSOP_GE_LENGTH 1 +#define JSOP_LSH_LENGTH 1 +#define JSOP_RSH_LENGTH 1 +#define JSOP_URSH_LENGTH 1 +#define JSOP_ADD_LENGTH 1 +#define JSOP_SUB_LENGTH 1 +#define JSOP_MUL_LENGTH 1 +#define JSOP_DIV_LENGTH 1 +#define JSOP_MOD_LENGTH 1 +#define JSOP_NOT_LENGTH 1 +#define JSOP_BITNOT_LENGTH 1 +#define JSOP_NEG_LENGTH 1 +#define JSOP_POS_LENGTH 1 +#define JSOP_DELNAME_LENGTH 5 +#define JSOP_DELPROP_LENGTH 5 +#define JSOP_DELELEM_LENGTH 1 +#define JSOP_TYPEOF_LENGTH 1 +#define JSOP_VOID_LENGTH 1 +#define JSOP_INCNAME_LENGTH 6 +#define JSOP_INCPROP_LENGTH 6 +#define JSOP_INCELEM_LENGTH 2 +#define JSOP_DECNAME_LENGTH 6 +#define JSOP_DECPROP_LENGTH 6 +#define JSOP_DECELEM_LENGTH 2 +#define JSOP_NAMEINC_LENGTH 6 +#define JSOP_PROPINC_LENGTH 6 +#define JSOP_ELEMINC_LENGTH 2 +#define JSOP_NAMEDEC_LENGTH 6 +#define JSOP_PROPDEC_LENGTH 6 +#define JSOP_ELEMDEC_LENGTH 2 +#define JSOP_GETPROP_LENGTH 5 +#define JSOP_SETPROP_LENGTH 5 +#define JSOP_GETELEM_LENGTH 1 +#define JSOP_SETELEM_LENGTH 1 +#define JSOP_CALLNAME_LENGTH 5 +#define JSOP_CALL_LENGTH 3 +#define JSOP_NAME_LENGTH 5 +#define JSOP_DOUBLE_LENGTH 5 +#define JSOP_STRING_LENGTH 5 +#define JSOP_ZERO_LENGTH 1 +#define JSOP_ONE_LENGTH 1 +#define JSOP_NULL_LENGTH 1 +#define JSOP_THIS_LENGTH 1 +#define JSOP_FALSE_LENGTH 1 +#define JSOP_TRUE_LENGTH 1 +#define JSOP_OR_LENGTH 5 +#define JSOP_AND_LENGTH 5 +#define JSOP_TABLESWITCH_LENGTH -1 +#define JSOP_LOOKUPSWITCH_LENGTH -1 +#define JSOP_STRICTEQ_LENGTH 1 +#define JSOP_STRICTNE_LENGTH 1 +#define JSOP_SETCALL_LENGTH 1 +#define JSOP_ITER_LENGTH 2 +#define JSOP_MOREITER_LENGTH 1 +#define JSOP_ITERNEXT_LENGTH 2 +#define JSOP_ENDITER_LENGTH 1 +#define JSOP_FUNAPPLY_LENGTH 3 +#define JSOP_OBJECT_LENGTH 5 +#define JSOP_POP_LENGTH 1 +#define JSOP_NEW_LENGTH 3 +#define JSOP_UNUSED0_LENGTH 1 +#define JSOP_GETARG_LENGTH 3 +#define JSOP_SETARG_LENGTH 3 +#define JSOP_GETLOCAL_LENGTH 3 +#define JSOP_SETLOCAL_LENGTH 3 +#define JSOP_UINT16_LENGTH 3 +#define JSOP_NEWINIT_LENGTH 5 +#define JSOP_NEWARRAY_LENGTH 4 +#define JSOP_NEWOBJECT_LENGTH 5 +#define JSOP_ENDINIT_LENGTH 1 +#define JSOP_INITPROP_LENGTH 5 +#define JSOP_INITELEM_LENGTH 1 +#define JSOP_UNUSED14_LENGTH 1 +#define JSOP_UNUSED15_LENGTH 1 +#define JSOP_INCARG_LENGTH 3 +#define JSOP_DECARG_LENGTH 3 +#define JSOP_ARGINC_LENGTH 3 +#define JSOP_ARGDEC_LENGTH 3 +#define JSOP_INCLOCAL_LENGTH 3 +#define JSOP_DECLOCAL_LENGTH 3 +#define JSOP_LOCALINC_LENGTH 3 +#define JSOP_LOCALDEC_LENGTH 3 +#define JSOP_LEAVEFORLETIN_LENGTH 1 +#define JSOP_LABEL_LENGTH 5 +#define JSOP_UNUSED3_LENGTH 1 +#define JSOP_FUNCALL_LENGTH 3 +#define JSOP_LOOPHEAD_LENGTH 1 +#define JSOP_BINDNAME_LENGTH 5 +#define JSOP_SETNAME_LENGTH 5 +#define JSOP_THROW_LENGTH 1 +#define JSOP_IN_LENGTH 1 +#define JSOP_INSTANCEOF_LENGTH 1 +#define JSOP_DEBUGGER_LENGTH 1 +#define JSOP_GOSUB_LENGTH 5 +#define JSOP_RETSUB_LENGTH 1 +#define JSOP_EXCEPTION_LENGTH 1 +#define JSOP_LINENO_LENGTH 3 +#define JSOP_CONDSWITCH_LENGTH 1 +#define JSOP_CASE_LENGTH 5 +#define JSOP_DEFAULT_LENGTH 5 +#define JSOP_EVAL_LENGTH 3 +#define JSOP_ENUMELEM_LENGTH 1 +#define JSOP_GETTER_LENGTH 1 +#define JSOP_SETTER_LENGTH 1 +#define JSOP_DEFFUN_LENGTH 5 +#define JSOP_DEFCONST_LENGTH 5 +#define JSOP_DEFVAR_LENGTH 5 +#define JSOP_LAMBDA_LENGTH 5 +#define JSOP_CALLEE_LENGTH 1 +#define JSOP_UNUSED31_LENGTH 1 +#define JSOP_PICK_LENGTH 2 +#define JSOP_TRY_LENGTH 1 +#define JSOP_FINALLY_LENGTH 1 +#define JSOP_GETALIASEDVAR_LENGTH 9 +#define JSOP_CALLALIASEDVAR_LENGTH 9 +#define JSOP_SETALIASEDVAR_LENGTH 9 +#define JSOP_INCALIASEDVAR_LENGTH 10 +#define JSOP_DECALIASEDVAR_LENGTH 10 +#define JSOP_ALIASEDVARINC_LENGTH 10 +#define JSOP_ALIASEDVARDEC_LENGTH 10 +#define JSOP_UNUSED8_LENGTH 1 +#define JSOP_UNUSED9_LENGTH 1 +#define JSOP_UNUSED10_LENGTH 1 +#define JSOP_UNUSED11_LENGTH 1 +#define JSOP_UNUSED12_LENGTH 1 +#define JSOP_UNUSED13_LENGTH 1 +#define JSOP_BACKPATCH_LENGTH 5 +#define JSOP_BACKPATCH_POP_LENGTH 5 +#define JSOP_THROWING_LENGTH 1 +#define JSOP_SETRVAL_LENGTH 1 +#define JSOP_RETRVAL_LENGTH 1 +#define JSOP_GETGNAME_LENGTH 5 +#define JSOP_SETGNAME_LENGTH 5 +#define JSOP_INCGNAME_LENGTH 6 +#define JSOP_DECGNAME_LENGTH 6 +#define JSOP_GNAMEINC_LENGTH 6 +#define JSOP_GNAMEDEC_LENGTH 6 +#define JSOP_REGEXP_LENGTH 5 +#define JSOP_DEFXMLNS_LENGTH 1 +#define JSOP_ANYNAME_LENGTH 1 +#define JSOP_QNAMEPART_LENGTH 5 +#define JSOP_QNAMECONST_LENGTH 5 +#define JSOP_QNAME_LENGTH 1 +#define JSOP_TOATTRNAME_LENGTH 1 +#define JSOP_TOATTRVAL_LENGTH 1 +#define JSOP_ADDATTRNAME_LENGTH 1 +#define JSOP_ADDATTRVAL_LENGTH 1 +#define JSOP_BINDXMLNAME_LENGTH 1 +#define JSOP_SETXMLNAME_LENGTH 1 +#define JSOP_XMLNAME_LENGTH 1 +#define JSOP_DESCENDANTS_LENGTH 1 +#define JSOP_FILTER_LENGTH 5 +#define JSOP_ENDFILTER_LENGTH 5 +#define JSOP_TOXML_LENGTH 1 +#define JSOP_TOXMLLIST_LENGTH 1 +#define JSOP_XMLTAGEXPR_LENGTH 1 +#define JSOP_XMLELTEXPR_LENGTH 1 +#define JSOP_XMLCDATA_LENGTH 5 +#define JSOP_XMLCOMMENT_LENGTH 5 +#define JSOP_XMLPI_LENGTH 5 +#define JSOP_DELDESC_LENGTH 1 +#define JSOP_CALLPROP_LENGTH 5 +#define JSOP_ENTERLET0_LENGTH 5 +#define JSOP_ENTERLET1_LENGTH 5 +#define JSOP_UINT24_LENGTH 4 +#define JSOP_UNUSED18_LENGTH 1 +#define JSOP_UNUSED19_LENGTH 1 +#define JSOP_UNUSED20_LENGTH 1 +#define JSOP_STARTXML_LENGTH 1 +#define JSOP_STARTXMLEXPR_LENGTH 1 +#define JSOP_CALLELEM_LENGTH 1 +#define JSOP_STOP_LENGTH 1 +#define JSOP_GETXPROP_LENGTH 5 +#define JSOP_CALLXMLNAME_LENGTH 1 +#define JSOP_TYPEOFEXPR_LENGTH 1 +#define JSOP_ENTERBLOCK_LENGTH 5 +#define JSOP_LEAVEBLOCK_LENGTH 3 +#define JSOP_UNUSED1_LENGTH 1 +#define JSOP_UNUSED2_LENGTH 1 +#define JSOP_GENERATOR_LENGTH 1 +#define JSOP_YIELD_LENGTH 1 +#define JSOP_ARRAYPUSH_LENGTH 3 +#define JSOP_GETFUNNS_LENGTH 1 +#define JSOP_ENUMCONSTELEM_LENGTH 1 +#define JSOP_LEAVEBLOCKEXPR_LENGTH 3 +#define JSOP_UNUSED21_LENGTH 1 +#define JSOP_UNUSED22_LENGTH 1 +#define JSOP_UNUSED23_LENGTH 1 +#define JSOP_CALLGNAME_LENGTH 5 +#define JSOP_CALLLOCAL_LENGTH 3 +#define JSOP_CALLARG_LENGTH 3 +#define JSOP_BINDGNAME_LENGTH 5 +#define JSOP_INT8_LENGTH 2 +#define JSOP_INT32_LENGTH 5 +#define JSOP_LENGTH_LENGTH 5 +#define JSOP_HOLE_LENGTH 1 +#define JSOP_UNUSED17_LENGTH 1 +#define JSOP_UNUSED24_LENGTH 1 +#define JSOP_UNUSED25_LENGTH 1 +#define JSOP_UNUSED29_LENGTH 1 +#define JSOP_UNUSED30_LENGTH 1 +#define JSOP_REST_LENGTH 1 +#define JSOP_TOID_LENGTH 1 +#define JSOP_IMPLICITTHIS_LENGTH 5 +#define JSOP_LOOPENTRY_LENGTH 1 +#define JSOP_ACTUALSFILLED_LENGTH 3 +# 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscriptinlines.h" 2 +# 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscriptinlines.h" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscopeinlines.h" 1 + + + + + + + +#define jsscopeinlines_h___ +# 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscopeinlines.h" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject.h" +#define ArgumentsObject_h___ + + + +namespace js { +# 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject.h" +struct ArgumentsData +{ + + + + + HeapValue callee; + + + + + + size_t *deletedBits; + + + + + + HeapValue slots[1]; +}; +# 95 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject.h" +class ArgumentsObject : public JSObject +{ + static const uint32_t INITIAL_LENGTH_SLOT = 0; + static const uint32_t DATA_SLOT = 1; + static const uint32_t STACK_FRAME_SLOT = 2; + + + static const uint32_t LENGTH_OVERRIDDEN_BIT = 0x1; + static const uint32_t PACKED_BITS_COUNT = 1; + + void initInitialLength(uint32_t length); + void initData(ArgumentsData *data); + static ArgumentsObject *create(JSContext *cx, uint32_t argc, HandleObject callee); + + public: + static const uint32_t RESERVED_SLOTS = 3; + static const gc::AllocKind FINALIZE_KIND = gc::FINALIZE_OBJECT4; + + + static ArgumentsObject *create(JSContext *cx, StackFrame *fp); + + + + + + + + static ArgumentsObject *createUnexpected(JSContext *cx, StackFrame *fp); + + + + + + inline uint32_t initialLength() const; + + + inline bool hasOverriddenLength() const; + inline void markLengthOverridden(); +# 142 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject.h" + inline bool getElement(uint32_t i, js::Value *vp); +# 153 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject.h" + inline bool getElements(uint32_t start, uint32_t count, js::Value *vp); + + inline js::ArgumentsData *data() const; +# 171 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject.h" + inline bool isElementDeleted(uint32_t i) const; + inline bool isAnyElementDeleted() const; + inline void markElementDeleted(uint32_t i); + + inline const js::Value &element(uint32_t i) const; + inline void setElement(uint32_t i, const js::Value &v); + + + inline js::StackFrame *maybeStackFrame() const; + inline void setStackFrame(js::StackFrame *frame); + + + + + + inline size_t sizeOfMisc(JSMallocSizeOfFun mallocSizeOf) const; +}; + +class NormalArgumentsObject : public ArgumentsObject +{ + public: + + + + + inline const js::Value &callee() const; + + + inline void clearCallee(); + + + + + + + static bool optimizedGetElem(JSContext *cx, StackFrame *fp, const Value &elem, Value *vp); +}; + +class StrictArgumentsObject : public ArgumentsObject +{}; + +} + +js::NormalArgumentsObject & +JSObject::asNormalArguments() +{ + do { } while(0); + return *static_cast(this); +} + +js::StrictArgumentsObject & +JSObject::asStrictArguments() +{ + do { } while(0); + return *static_cast(this); +} + +js::ArgumentsObject & +JSObject::asArguments() +{ + do { } while(0); + return *static_cast(this); +} + +const js::ArgumentsObject & +JSObject::asArguments() const +{ + do { } while(0); + return *static_cast(this); +} +# 23 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscopeinlines.h" 2 + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxtinlines.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxtinlines.h" +#define jscntxtinlines_h___ + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" 1 +# 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxtinlines.h" 2 + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/frontend/ParseMaps.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/frontend/ParseMaps.h" +#define ParseMaps_h__ + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/InlineMap.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/InlineMap.h" +#define InlineMap_h__ + + + +namespace js { + + + + + +template struct ZeroIsReserved { static const bool result = false; }; +template struct ZeroIsReserved { static const bool result = true; }; + +template +class InlineMap +{ + public: + typedef HashMap, TempAllocPolicy> WordMap; + + struct InlineElem + { + K key; + V value; + }; + + private: + typedef typename WordMap::Ptr WordMapPtr; + typedef typename WordMap::AddPtr WordMapAddPtr; + typedef typename WordMap::Range WordMapRange; + + size_t inlNext; + size_t inlCount; + InlineElem inl[InlineElems]; + WordMap map; + + void checkStaticInvariants() { + typedef int moz_static_assert108[(ZeroIsReserved::result) ? 1 : -1]; + } + + bool usingMap() const { + return inlNext > InlineElems; + } + + bool switchToMap() { + do { } while(0); + + if (map.initialized()) { + map.clear(); + } else { + if (!map.init(count())) + return false; + do { } while(0); + } + + for (InlineElem *it = inl, *end = inl + inlNext; it != end; ++it) { + if (it->key && !map.putNew(it->key, it->value)) + return false; + } + + inlNext = InlineElems + 1; + do { } while(0); + do { } while(0); + return true; + } + + __attribute__((noinline)) + bool switchAndAdd(const K &key, const V &value) { + if (!switchToMap()) + return false; + + return map.putNew(key, value); + } + + public: + explicit InlineMap(JSContext *cx) + : inlNext(0), inlCount(0), map(cx) { + checkStaticInvariants(); + } + + class Entry + { + friend class InlineMap; + const K &key_; + const V &value_; + + Entry(const K &key, const V &value) : key_(key), value_(value) {} + + public: + const K &key() { return key_; } + const V &value() { return value_; } + }; + + class Ptr + { + friend class InlineMap; + + WordMapPtr mapPtr; + InlineElem *inlPtr; + bool isInlinePtr; + + typedef Ptr ******* ConvertibleToBool; + + explicit Ptr(WordMapPtr p) : mapPtr(p), isInlinePtr(false) {} + explicit Ptr(InlineElem *ie) : inlPtr(ie), isInlinePtr(true) {} + void operator==(const Ptr &other); + + public: + + Ptr() { + + + + + } + + + + bool found() const { + return isInlinePtr ? bool(inlPtr) : mapPtr.found(); + } + + operator ConvertibleToBool() const { + return ConvertibleToBool(found()); + } + + K &key() { + do { } while(0); + return isInlinePtr ? inlPtr->key : mapPtr->key; + } + + V &value() { + do { } while(0); + return isInlinePtr ? inlPtr->value : mapPtr->value; + } + }; + + class AddPtr + { + friend class InlineMap; + + WordMapAddPtr mapAddPtr; + InlineElem *inlAddPtr; + bool isInlinePtr; + + bool inlPtrFound; + + AddPtr(InlineElem *ptr, bool found) + : inlAddPtr(ptr), isInlinePtr(true), inlPtrFound(found) + {} + + AddPtr(const WordMapAddPtr &p) : mapAddPtr(p), isInlinePtr(false) {} + + void operator==(const AddPtr &other); + + typedef AddPtr ******* ConvertibleToBool; + + public: + AddPtr() {} + + bool found() const { + return isInlinePtr ? inlPtrFound : mapAddPtr.found(); + } + + operator ConvertibleToBool() const { + return found() ? ConvertibleToBool(1) : ConvertibleToBool(0); + } + + V &value() { + do { } while(0); + if (isInlinePtr) + return inlAddPtr->value; + return mapAddPtr->value; + } + }; + + size_t count() { + return usingMap() ? map.count() : inlCount; + } + + bool empty() const { + return usingMap() ? map.empty() : !inlCount; + } + + void clear() { + inlNext = 0; + inlCount = 0; + } + + bool isMap() const { + return usingMap(); + } + + const WordMap &asMap() const { + do { } while(0); + return map; + } + + const InlineElem *asInline() const { + do { } while(0); + return inl; + } + + const InlineElem *inlineEnd() const { + do { } while(0); + return inl + inlNext; + } + + __attribute__((always_inline)) inline + Ptr lookup(const K &key) { + if (usingMap()) + return Ptr(map.lookup(key)); + + for (InlineElem *it = inl, *end = inl + inlNext; it != end; ++it) { + if (it->key == key) + return Ptr(it); + } + + return Ptr(__null); + } + + __attribute__((always_inline)) inline + AddPtr lookupForAdd(const K &key) { + if (usingMap()) + return AddPtr(map.lookupForAdd(key)); + + for (InlineElem *it = inl, *end = inl + inlNext; it != end; ++it) { + if (it->key == key) + return AddPtr(it, true); + } + + + + + + + return AddPtr(inl + inlNext, false); + } + + __attribute__((always_inline)) inline + bool add(AddPtr &p, const K &key, const V &value) { + do { } while(0); + + if (p.isInlinePtr) { + InlineElem *addPtr = p.inlAddPtr; + do { } while(0); + + + if (addPtr == inl + InlineElems) + return switchAndAdd(key, value); + + do { } while(0); + do { } while(0); + p.inlAddPtr->key = key; + p.inlAddPtr->value = value; + ++inlCount; + ++inlNext; + return true; + } + + return map.add(p.mapAddPtr, key, value); + } + + __attribute__((always_inline)) inline + bool put(const K &key, const V &value) { + AddPtr p = lookupForAdd(key); + if (p) { + p.value() = value; + return true; + } + return add(p, key, value); + } + + void remove(Ptr p) { + do { } while(0); + if (p.isInlinePtr) { + do { } while(0); + do { } while(0); + p.inlPtr->key = __null; + --inlCount; + return; + } + do { } while(0); + map.remove(p.mapPtr); + } + + void remove(const K &key) { + if (Ptr p = lookup(key)) + remove(p); + } + + class Range + { + friend class InlineMap; + + WordMapRange mapRange; + InlineElem *cur; + InlineElem *end; + bool isInline; + + explicit Range(WordMapRange r) + : cur(__null), end(__null), + isInline(false) { + mapRange = r; + do { } while(0); + } + + Range(const InlineElem *begin, const InlineElem *end_) + : cur(const_cast(begin)), + end(const_cast(end_)), + isInline(true) { + advancePastNulls(cur); + do { } while(0); + } + + bool checkInlineRangeInvariants() const { + do { } while(0); + do { } while (0); + return true; + } + + bool isInlineRange() const { + do { } while (0); + return isInline; + } + + void advancePastNulls(InlineElem *begin) { + InlineElem *newCur = begin; + while (newCur < end && __null == newCur->key) + ++newCur; + do { } while(0); + cur = newCur; + } + + void bumpCurPtr() { + do { } while(0); + advancePastNulls(cur + 1); + } + + void operator==(const Range &other); + + public: + bool empty() const { + return isInlineRange() ? cur == end : mapRange.empty(); + } + + Entry front() { + do { } while(0); + if (isInlineRange()) + return Entry(cur->key, cur->value); + return Entry(mapRange.front().key, mapRange.front().value); + } + + void popFront() { + do { } while(0); + if (isInlineRange()) + bumpCurPtr(); + else + mapRange.popFront(); + } + }; + + Range all() const { + return usingMap() ? Range(map.all()) : Range(inl, inl + inlNext); + } +}; + +} +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/frontend/ParseMaps.h" 2 + + + +namespace js { + +struct Definition; +# 28 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/frontend/ParseMaps.h" +class ParseMapPool +{ + typedef Vector RecyclableMaps; + + RecyclableMaps all; + RecyclableMaps recyclable; + JSContext *cx; + + void checkInvariants(); + + void recycle(void *map) { + do { } while(0); +# 53 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/frontend/ParseMaps.h" + do { } while(0); + recyclable.infallibleAppend(map); + } + + void *allocateFresh(); + void *allocate(); + + + typedef AtomIndexMap AtomMapT; + + static AtomMapT *asAtomMap(void *ptr) { + return reinterpret_cast(ptr); + } + + public: + explicit ParseMapPool(JSContext *cx) : cx(cx) {} + + ~ParseMapPool() { + purgeAll(); + } + + void purgeAll(); + + bool empty() const { + return all.empty(); + } + + + template + T *acquire(); + + + + void release(AtomIndexMap *map) { + recycle((void *) map); + } + + void release(AtomDefnMap *map) { + recycle((void *) map); + } + + void release(AtomDOHMap *map) { + recycle((void *) map); + } +}; + + + + + +template +struct AtomThingMapPtr +{ + Map *map_; + + void init() { clearMap(); } + + bool ensureMap(JSContext *cx); + void releaseMap(JSContext *cx); + + bool hasMap() const { return map_; } + Map *getMap() { return map_; } + void setMap(Map *newMap) { do { } while(0); map_ = newMap; } + void clearMap() { map_ = __null; } + + Map *operator->() { return map_; } + const Map *operator->() const { return map_; } + Map &operator*() const { return *map_; } +}; + +struct AtomDefnMapPtr : public AtomThingMapPtr +{ + __attribute__((always_inline)) inline + Definition *lookupDefn(JSAtom *atom) { + AtomDefnMap::Ptr p = map_->lookup(atom); + return p ? p.value() : __null; + } +}; + +typedef AtomThingMapPtr AtomIndexMapPtr; + + + + + +template +class OwnedAtomThingMapPtr : public AtomThingMapPtrT +{ + JSContext *cx; + + public: + explicit OwnedAtomThingMapPtr(JSContext *cx) : cx(cx) { + AtomThingMapPtrT::init(); + } + + ~OwnedAtomThingMapPtr() { + AtomThingMapPtrT::releaseMap(cx); + } +}; + +typedef OwnedAtomThingMapPtr OwnedAtomDefnMapPtr; +typedef OwnedAtomThingMapPtr OwnedAtomIndexMapPtr; + + +struct AtomDeclNode +{ + Definition *defn; + AtomDeclNode *next; + + explicit AtomDeclNode(Definition *defn) + : defn(defn), next(__null) + {} +}; + + + + + +class DefnOrHeader +{ + union { + Definition *defn; + AtomDeclNode *head; + uintptr_t bits; + } u; + + public: + DefnOrHeader() { + u.bits = 0; + } + + explicit DefnOrHeader(Definition *defn) { + u.defn = defn; + do { } while(0); + } + + explicit DefnOrHeader(AtomDeclNode *node) { + u.head = node; + u.bits |= 0x1; + do { } while(0); + } + + bool isHeader() const { + return u.bits & 0x1; + } + + Definition *defn() const { + do { } while(0); + return u.defn; + } + + AtomDeclNode *header() const { + do { } while(0); + return (AtomDeclNode *) (u.bits & ~0x1); + } + + + + +}; + +namespace tl { + +template <> struct IsPodType { + static const bool result = true; +}; + +} +# 231 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/frontend/ParseMaps.h" +class AtomDecls +{ + + friend class AtomDeclsIter; + + JSContext *cx; + AtomDOHMap *map; + + AtomDecls(const AtomDecls &other) ; + void operator=(const AtomDecls &other) ; + + AtomDeclNode *allocNode(Definition *defn); + + + + + + AtomDeclNode *lastAsNode(DefnOrHeader *doh); + + public: + explicit AtomDecls(JSContext *cx) + : cx(cx), map(__null) + {} + + ~AtomDecls(); + + bool init(); + + void clear() { + map->clear(); + } + + + inline Definition *lookupFirst(JSAtom *atom); + + + inline MultiDeclRange lookupMulti(JSAtom *atom); + + + inline bool addUnique(JSAtom *atom, Definition *defn); + bool addShadow(JSAtom *atom, Definition *defn); + bool addHoist(JSAtom *atom, Definition *defn); + + + void updateFirst(JSAtom *atom, Definition *defn) { + do { } while(0); + AtomDOHMap::Ptr p = map->lookup(atom); + do { } while(0); + if (p.value().isHeader()) + p.value().header()->defn = defn; + else + p.value() = DefnOrHeader(defn); + } + + + void remove(JSAtom *atom) { + do { } while(0); + AtomDOHMap::Ptr p = map->lookup(atom); + if (!p) + return; + + DefnOrHeader &doh = p.value(); + if (!doh.isHeader()) { + map->remove(p); + return; + } + + AtomDeclNode *node = doh.header(); + AtomDeclNode *newHead = node->next; + if (newHead) + p.value() = DefnOrHeader(newHead); + else + map->remove(p); + } + + AtomDOHMap::Range all() { + do { } while(0); + return map->all(); + } + + + + +}; + + + + + + +class MultiDeclRange +{ + friend class AtomDecls; + + AtomDeclNode *node; + Definition *defn; + + explicit MultiDeclRange(Definition *defn) : node(__null), defn(defn) {} + explicit MultiDeclRange(AtomDeclNode *node) : node(node), defn(node->defn) {} + + public: + void popFront() { + do { } while(0); + if (!node) { + defn = __null; + return; + } + node = node->next; + defn = node ? node->defn : __null; + } + + Definition *front() { + do { } while(0); + return defn; + } + + bool empty() const { + do { } while (0); + return !defn; + } +}; + + +class AtomDeclsIter +{ + AtomDOHMap::Range r; + AtomDeclNode *link; + + public: + explicit AtomDeclsIter(AtomDecls *decls) : r(decls->all()), link(__null) {} + + Definition *next() { + if (link) { + do { } while(0); + Definition *result = link->defn; + link = link->next; + do { } while(0); + return result; + } + + if (r.empty()) + return __null; + + const DefnOrHeader &doh = r.front().value(); + r.popFront(); + + if (!doh.isHeader()) + return doh.defn(); + + do { } while(0); + AtomDeclNode *node = doh.header(); + link = node->next; + return node->defn; + } +}; + +typedef AtomDefnMap::Range AtomDefnRange; +typedef AtomDefnMap::AddPtr AtomDefnAddPtr; +typedef AtomDefnMap::Ptr AtomDefnPtr; +typedef AtomIndexMap::AddPtr AtomIndexAddPtr; +typedef AtomIndexMap::Ptr AtomIndexPtr; +typedef AtomDOHMap::Ptr AtomDOHPtr; +typedef AtomDOHMap::AddPtr AtomDOHAddPtr; +typedef AtomDOHMap::Range AtomDOHRange; + +} +# 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxtinlines.h" 2 + + + + +namespace js { + +inline void +NewObjectCache::staticAsserts() +{ + typedef int moz_static_assert109[(NewObjectCache::MAX_OBJ_SIZE == sizeof(JSObject_Slots16)) ? 1 : -1]; + typedef int moz_static_assert110[(gc::FINALIZE_OBJECT_LAST == gc::FINALIZE_OBJECT16_BACKGROUND) ? 1 : -1]; +} + +inline bool +NewObjectCache::lookup(Class *clasp, gc::Cell *key, gc::AllocKind kind, EntryIndex *pentry) +{ + uintptr_t hash = (uintptr_t(clasp) ^ uintptr_t(key)) + kind; + *pentry = hash % js::ArrayLength(entries); + + Entry *entry = &entries[*pentry]; + + + return (entry->clasp == clasp && entry->key == key); +} + +inline bool +NewObjectCache::lookupProto(Class *clasp, JSObject *proto, gc::AllocKind kind, EntryIndex *pentry) +{ + do { } while(0); + return lookup(clasp, proto, kind, pentry); +} + +inline bool +NewObjectCache::lookupGlobal(Class *clasp, js::GlobalObject *global, gc::AllocKind kind, EntryIndex *pentry) +{ + return lookup(clasp, global, kind, pentry); +} + +inline bool +NewObjectCache::lookupType(Class *clasp, js::types::TypeObject *type, gc::AllocKind kind, EntryIndex *pentry) +{ + return lookup(clasp, type, kind, pentry); +} + +inline void +NewObjectCache::fill(EntryIndex entry_, Class *clasp, gc::Cell *key, gc::AllocKind kind, JSObject *obj) +{ + do { } while(0); + Entry *entry = &entries[entry_]; + + do { } while(0); + + entry->clasp = clasp; + entry->key = key; + entry->kind = kind; + + entry->nbytes = obj->sizeOfThis(); + js_memcpy(&entry->templateObject, obj, entry->nbytes); +} + +inline void +NewObjectCache::fillProto(EntryIndex entry, Class *clasp, JSObject *proto, gc::AllocKind kind, JSObject *obj) +{ + do { } while(0); + do { } while(0); + return fill(entry, clasp, proto, kind, obj); +} + +inline void +NewObjectCache::fillGlobal(EntryIndex entry, Class *clasp, js::GlobalObject *global, gc::AllocKind kind, JSObject *obj) +{ + + return fill(entry, clasp, global, kind, obj); +} + +inline void +NewObjectCache::fillType(EntryIndex entry, Class *clasp, js::types::TypeObject *type, gc::AllocKind kind, JSObject *obj) +{ + do { } while(0); + return fill(entry, clasp, type, kind, obj); +} + +inline JSObject * +NewObjectCache::newObjectFromHit(JSContext *cx, EntryIndex entry_) +{ + do { } while(0); + Entry *entry = &entries[entry_]; + + JSObject *obj = js_TryNewGCObject(cx, entry->kind); + if (obj) { + copyCachedToObject(obj, reinterpret_cast(&entry->templateObject)); + Probes::createObject(cx, obj); + return obj; + } + + + size_t nbytes = entry->nbytes; + char stackObject[sizeof(JSObject_Slots16)]; + do { } while(0); + js_memcpy(&stackObject, &entry->templateObject, nbytes); + + JSObject *baseobj = (JSObject *) stackObject; + + obj = js_NewGCObject(cx, entry->kind); + if (obj) { + copyCachedToObject(obj, baseobj); + Probes::createObject(cx, obj); + return obj; + } + + return __null; +} + +struct PreserveRegsGuard +{ + PreserveRegsGuard(JSContext *cx, FrameRegs ®s) + : prevContextRegs(cx->maybeRegs()), cx(cx), regs_(regs) { + cx->stack.repointRegs(®s_); + } + ~PreserveRegsGuard() { + do { } while(0); + *prevContextRegs = regs_; + cx->stack.repointRegs(prevContextRegs); + } + + FrameRegs *prevContextRegs; + + private: + JSContext *cx; + FrameRegs ®s_; +}; + +static inline GlobalObject * +GetGlobalForScopeChain(JSContext *cx) +{ + if (cx->hasfp()) + return &cx->fp()->global(); + + JSObject *scope = JS_ObjectToInnerObject(cx, cx->globalObject); + if (!scope) + return __null; + return &scope->asGlobal(); +} + +inline GSNCache * +GetGSNCache(JSContext *cx) +{ + return &cx->runtime->gsnCache; +} + + + +class AutoNamespaceArray : protected AutoGCRooter { + public: + AutoNamespaceArray(JSContext *cx) + : AutoGCRooter(cx, NAMESPACES), context(cx) { + array.init(); + } + + ~AutoNamespaceArray() { + array.finish(context->runtime->defaultFreeOp()); + } + + uint32_t length() const { return array.length; } + + private: + JSContext *context; + friend void AutoGCRooter::trace(JSTracer *trc); + + public: + JSXMLArray array; +}; + + + +template +class AutoPtr +{ + JSContext *cx; + T *value; + + AutoPtr(const AutoPtr &other) ; + + public: + explicit AutoPtr(JSContext *cx) : cx(cx), value(__null) {} + ~AutoPtr() { + cx->delete_(value); + } + + void operator=(T *ptr) { value = ptr; } + + typedef void ***** ConvertibleToBool; + operator ConvertibleToBool() const { return (ConvertibleToBool) value; } + + const T *operator->() const { return value; } + T *operator->() { return value; } + + T *get() { return value; } +}; +# 325 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxtinlines.h" +#define START_ASSERT_SAME_COMPARTMENT() if (cx->runtime->gcRunning) return; CompartmentChecker c(cx) + + + + +template inline void +assertSameCompartment(JSContext *cx, const T1 &t1) +{ + + + + +} + +template inline void +assertSameCompartment(JSContext *cx, const T1 &t1, const T2 &t2) +{ + + + + + +} + +template inline void +assertSameCompartment(JSContext *cx, const T1 &t1, const T2 &t2, const T3 &t3) +{ + + + + + + +} + +template inline void +assertSameCompartment(JSContext *cx, const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4) +{ + + + + + + + +} + +template inline void +assertSameCompartment(JSContext *cx, const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5) +{ +# 383 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxtinlines.h" +} + +#undef START_ASSERT_SAME_COMPARTMENT + + +__attribute__((always_inline)) inline bool +CallJSNative(JSContext *cx, Native native, const CallArgs &args) +{ + + + + assertSameCompartment(cx, args); + bool ok = native(cx, args.length(), args.base()); + if (ok) { + assertSameCompartment(cx, args.rval()); + do { } while (0); + } + return ok; +} + +extern JSBool CallOrConstructBoundFunction(JSContext *, unsigned, js::Value *); + + +__attribute__((always_inline)) inline bool +CallJSNativeConstructor(JSContext *cx, Native native, const CallArgs &args) +{ + + + + + do { } while(0); + if (!CallJSNative(cx, native, args)) + return false; +# 432 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxtinlines.h" + do { } while (0) + + + ; + + return true; +} + +__attribute__((always_inline)) inline bool +CallJSPropertyOp(JSContext *cx, PropertyOp op, HandleObject receiver, HandleId id, Value *vp) +{ + assertSameCompartment(cx, receiver, id, *vp); + JSBool ok = op(cx, receiver, id, vp); + if (ok) + assertSameCompartment(cx, *vp); + return ok; +} + +__attribute__((always_inline)) inline bool +CallJSPropertyOpSetter(JSContext *cx, StrictPropertyOp op, HandleObject obj, HandleId id, + JSBool strict, Value *vp) +{ + assertSameCompartment(cx, obj, id, *vp); + return op(cx, obj, id, strict, vp); +} + +inline bool +CallSetter(JSContext *cx, HandleObject obj, HandleId id, StrictPropertyOp op, unsigned attrs, + unsigned shortid, JSBool strict, Value *vp) +{ + if (attrs & 0x20) + return InvokeGetterOrSetter(cx, obj, CastAsObjectJsval(op), 1, vp, vp); + + if (attrs & 0x10) + return js_ReportGetterOnlyAssignment(cx); + + if (!(attrs & 0x100)) + return CallJSPropertyOpSetter(cx, op, obj, id, strict, vp); + + RootedId nid(cx, INT_TO_JSID(shortid)); + + return CallJSPropertyOpSetter(cx, op, obj, nid, strict, vp); +} + +static inline HeapPtrAtom * +FrameAtomBase(JSContext *cx, js::StackFrame *fp) +{ + return fp->script()->atoms; +} + +} + +inline JSVersion +JSContext::findVersion() const +{ + if (hasVersionOverride) + return versionOverride; + + if (stack.hasfp()) { + + js::StackFrame *f = fp(); + while (f && !f->isScriptFrame()) + f = f->prev(); + if (f) + return f->script()->getVersion(); + } + + return defaultVersion; +} + +inline bool +JSContext::canSetDefaultVersion() const +{ + return !stack.hasfp() && !hasVersionOverride; +} + +inline void +JSContext::overrideVersion(JSVersion newVersion) +{ + do { } while(0); + versionOverride = newVersion; + hasVersionOverride = true; +} + +inline bool +JSContext::maybeOverrideVersion(JSVersion newVersion) +{ + if (canSetDefaultVersion()) { + setDefaultVersion(newVersion); + return false; + } + overrideVersion(newVersion); + return true; +} + +inline unsigned +JSContext::getCompileOptions() const { return js::VersionFlagsToOptions(findVersion()); } + +inline unsigned +JSContext::allOptions() const { return getRunOptions() | getCompileOptions(); } + +inline void +JSContext::setCompileOptions(unsigned newcopts) +{ + do { } while(0); + if ((__builtin_expect((getCompileOptions() == newcopts), 1))) + return; + JSVersion version = findVersion(); + JSVersion newVersion = js::OptionFlagsToVersion(newcopts, version); + maybeOverrideVersion(newVersion); +} + +inline void +JSContext::assertValidStackDepth(unsigned depth) +{ + + + + +} + +inline js::LifoAlloc & +JSContext::typeLifoAlloc() +{ + return compartment->typeLifoAlloc; +} + +inline bool +JSContext::ensureGeneratorStackSpace() +{ + bool ok = genStack.reserve(genStack.length() + 1); + if (!ok) + js_ReportOutOfMemory(this); + return ok; +} + +inline void +JSContext::setPendingException(js::Value v) { + do { } while(0); + this->throwing = true; + this->exception = v; + js::assertSameCompartment(this, v); +} + +inline bool +JSContext::ensureParseMapPool() +{ + if (parseMapPool_) + return true; + parseMapPool_ = js::OffTheBooks::new_(this); + return parseMapPool_; +} + +inline js::PropertyTree& +JSContext::propertyTree() +{ + return compartment->propertyTree; +} + + +static inline js::StackFrame * +js_GetTopStackFrame(JSContext *cx, FrameExpandKind expand) +{ + + if (expand) + js::mjit::ExpandInlineFrames(cx->compartment); + + + return cx->maybefp(); +} +# 27 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscopeinlines.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 1 +# 29 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscopeinlines.h" 2 + + + +namespace js { + +inline +BaseShape::BaseShape(Class *clasp, JSObject *parent, uint32_t objectFlags) +{ + do { } while(0); + PodZero(this); + this->clasp = clasp; + this->parent = parent; + this->flags = objectFlags; +} + +inline +BaseShape::BaseShape(Class *clasp, JSObject *parent, uint32_t objectFlags, + uint8_t attrs, js::PropertyOp rawGetter, js::StrictPropertyOp rawSetter) +{ + do { } while(0); + PodZero(this); + this->clasp = clasp; + this->parent = parent; + this->flags = objectFlags; + this->rawGetter = rawGetter; + this->rawSetter = rawSetter; + if ((attrs & 0x10) && rawGetter) { + this->flags |= HAS_GETTER_OBJECT; + JSObject::writeBarrierPost(this->getterObj, &this->getterObj); + } + if ((attrs & 0x20) && rawSetter) { + this->flags |= HAS_SETTER_OBJECT; + JSObject::writeBarrierPost(this->setterObj, &this->setterObj); + } +} + +inline +BaseShape::BaseShape(const StackBaseShape &base) +{ + PodZero(this); + this->clasp = base.clasp; + this->parent = base.parent; + this->flags = base.flags; + this->rawGetter = base.rawGetter; + this->rawSetter = base.rawSetter; + if ((base.flags & HAS_GETTER_OBJECT) && base.rawGetter) { + JSObject::writeBarrierPost(this->getterObj, &this->getterObj); + } + if ((base.flags & HAS_SETTER_OBJECT) && base.rawSetter) { + JSObject::writeBarrierPost(this->setterObj, &this->setterObj); + } +} + +inline BaseShape & +BaseShape::operator=(const BaseShape &other) +{ + clasp = other.clasp; + parent = other.parent; + flags = other.flags; + slotSpan_ = other.slotSpan_; + if (flags & HAS_GETTER_OBJECT) { + getterObj = other.getterObj; + JSObject::writeBarrierPost(getterObj, &getterObj); + } else { + rawGetter = other.rawGetter; + } + if (flags & HAS_SETTER_OBJECT) { + setterObj = other.setterObj; + JSObject::writeBarrierPost(setterObj, &setterObj); + } else { + rawSetter = other.rawSetter; + } + return *this; +} + +inline bool +BaseShape::matchesGetterSetter(PropertyOp rawGetter, StrictPropertyOp rawSetter) const +{ + return rawGetter == this->rawGetter && rawSetter == this->rawSetter; +} + +inline +StackBaseShape::StackBaseShape(Shape *shape) + : flags(shape->getObjectFlags()), + clasp(shape->getObjectClass()), + parent(shape->getObjectParent()) +{ + updateGetterSetter(shape->attrs, shape->getter(), shape->setter()); +} + +inline void +StackBaseShape::updateGetterSetter(uint8_t attrs, + PropertyOp rawGetter, + StrictPropertyOp rawSetter) +{ + flags &= ~(BaseShape::HAS_GETTER_OBJECT | BaseShape::HAS_SETTER_OBJECT); + if ((attrs & 0x10) && rawGetter) + flags |= BaseShape::HAS_GETTER_OBJECT; + if ((attrs & 0x20) && rawSetter) + flags |= BaseShape::HAS_SETTER_OBJECT; + + this->rawGetter = rawGetter; + this->rawSetter = rawSetter; +} + +inline void +BaseShape::adoptUnowned(UnownedBaseShape *other) +{ + + + + + do { } while(0); + DebugOnly flags = getObjectFlags(); + do { } while(0); + + uint32_t span = slotSpan(); + ShapeTable *table = &this->table(); + + *this = *other; + setOwned(other); + setTable(table); + setSlotSpan(span); + + assertConsistency(); +} + +inline void +BaseShape::setOwned(UnownedBaseShape *unowned) +{ + flags |= OWNED_SHAPE; + this->unowned_ = unowned; +} + +inline void +BaseShape::assertConsistency() +{ +# 177 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscopeinlines.h" +} + +inline +Shape::Shape(const StackShape &other, uint32_t nfixed) + : base_(other.base), + propid_(other.propid), + slotInfo(other.maybeSlot() | (nfixed << FIXED_SLOTS_SHIFT)), + attrs(other.attrs), + flags(other.flags), + shortid_(other.shortid), + parent(__null) +{ + kids.setNull(); +} + +inline +Shape::Shape(UnownedBaseShape *base, uint32_t nfixed) + : base_(base), + propid_(((jsid)0x4)), + slotInfo(SHAPE_INVALID_SLOT | (nfixed << FIXED_SLOTS_SHIFT)), + attrs(0x40), + flags(0), + shortid_(0), + parent(__null) +{ + do { } while(0); + kids.setNull(); +} + +inline HashNumber +StackShape::hash() const +{ + HashNumber hash = uintptr_t(base); + + + hash = (((hash) << (4)) | ((hash) >> (32 - (4)))) ^ (flags & Shape::PUBLIC_FLAGS); + hash = (((hash) << (4)) | ((hash) >> (32 - (4)))) ^ attrs; + hash = (((hash) << (4)) | ((hash) >> (32 - (4)))) ^ shortid; + hash = (((hash) << (4)) | ((hash) >> (32 - (4)))) ^ slot_; + hash = (((hash) << (4)) | ((hash) >> (32 - (4)))) ^ (propid); + return hash; +} + +inline bool +Shape::matches(const js::Shape *other) const +{ + return propid_.get() == other->propid_.get() && + matchesParamsAfterId(other->base(), other->maybeSlot(), other->attrs, + other->flags, other->shortid_); +} + +inline bool +Shape::matches(const StackShape &other) const +{ + return propid_.get() == other.propid && + matchesParamsAfterId(other.base, other.slot_, other.attrs, other.flags, other.shortid); +} + +inline bool +Shape::matchesParamsAfterId(BaseShape *base, uint32_t aslot, + unsigned aattrs, unsigned aflags, int ashortid) const +{ + return base->unowned() == this->base()->unowned() && + maybeSlot() == aslot && + attrs == aattrs && + ((flags ^ aflags) & PUBLIC_FLAGS) == 0 && + shortid_ == ashortid; +} + +inline bool +Shape::getUserId(JSContext *cx, jsid *idp) const +{ + const Shape *self = this; + + + + + + + if (self->hasShortID()) { + int16_t id = self->shortid(); + if (id < 0) + return ValueToId(cx, Int32Value(id), idp); + *idp = INT_TO_JSID(id); + } else { + *idp = propid(); + } + return true; +} + +inline bool +Shape::get(JSContext* cx, HandleObject receiver, JSObject* obj, JSObject *pobj, Value* vp) const +{ + do { } while(0); + + if (hasGetterValue()) { + Value fval = getterValue(); + return InvokeGetterOrSetter(cx, receiver, fval, 0, 0, vp); + } + + RootedId id(cx); + if (!getUserId(cx, id.address())) + return false; + + return CallJSPropertyOp(cx, getterOp(), receiver, id, vp); +} + +inline bool +Shape::set(JSContext* cx, HandleObject obj, bool strict, Value* vp) const +{ + do { } while (0); + + if (attrs & 0x20) { + Value fval = setterValue(); + return InvokeGetterOrSetter(cx, obj, fval, 1, vp, vp); + } + + if (attrs & 0x10) + return js_ReportGetterOnlyAssignment(cx); + + RootedId id(cx); + if (!getUserId(cx, id.address())) + return false; + + + + + + if (obj->isWith()) { + RootedObject nobj(cx, &obj->asWith().object()); + return CallJSPropertyOpSetter(cx, setterOp(), nobj, id, strict, vp); + } + + return CallJSPropertyOpSetter(cx, setterOp(), obj, id, strict, vp); +} + +inline void +Shape::setParent(js::Shape *p) +{ + do { } while (0) + ; + do { } while (0) + ; + parent = p; +} + +inline void +Shape::removeFromDictionary(JSObject *obj) +{ + do { } while(0); + do { } while(0); + do { } while(0); + + do { } while(0); + do { } while(0); + + if (parent) + parent->listp = listp; + *listp = parent; + listp = __null; +} + +inline void +Shape::insertIntoDictionary(HeapPtrShape *dictp) +{ + + + + + do { } while(0); + do { } while(0); + + do { } while (0); + do { } while (0); + do { } while (0); + + setParent(*dictp); + if (parent) + parent->listp = &parent; + listp = (HeapPtrShape *) dictp; + *dictp = this; +} + +void +Shape::initDictionaryShape(const StackShape &child, uint32_t nfixed, HeapPtrShape *dictp) +{ + new (this) Shape(child, nfixed); + this->flags |= IN_DICTIONARY; + + this->listp = __null; + insertIntoDictionary(dictp); +} + +inline +EmptyShape::EmptyShape(UnownedBaseShape *base, uint32_t nfixed) + : js::Shape(base, nfixed) +{ + + if (!getObjectClass()->isNative()) + flags |= NON_NATIVE; +} + +inline void +Shape::writeBarrierPre(const js::Shape *shape) +{ + + if (!shape) + return; + + JSCompartment *comp = shape->compartment(); + if (comp->needsBarrier()) { + Shape *tmp = const_cast(shape); + MarkShapeUnbarriered(comp->barrierTracer(), &tmp, "write barrier"); + do { } while(0); + } + +} + +inline void +Shape::writeBarrierPost(const js::Shape *shape, void *addr) +{ +} + +inline void +Shape::readBarrier(const Shape *shape) +{ + + JSCompartment *comp = shape->compartment(); + if (comp->needsBarrier()) { + Shape *tmp = const_cast(shape); + MarkShapeUnbarriered(comp->barrierTracer(), &tmp, "read barrier"); + do { } while(0); + } + +} + +inline void +Shape::markChildren(JSTracer *trc) +{ + MarkBaseShape(trc, &base_, "base"); + gc::MarkId(trc, &propidRef(), "propid"); + if (parent) + MarkShape(trc, &parent, "parent"); +} + +inline void +BaseShape::writeBarrierPre(BaseShape *base) +{ + + if (!base) + return; + + JSCompartment *comp = base->compartment(); + if (comp->needsBarrier()) { + BaseShape *tmp = base; + MarkBaseShapeUnbarriered(comp->barrierTracer(), &tmp, "write barrier"); + do { } while(0); + } + +} + +inline void +BaseShape::writeBarrierPost(BaseShape *shape, void *addr) +{ +} + +inline void +BaseShape::readBarrier(BaseShape *base) +{ + + JSCompartment *comp = base->compartment(); + if (comp->needsBarrier()) { + BaseShape *tmp = base; + MarkBaseShapeUnbarriered(comp->barrierTracer(), &tmp, "read barrier"); + do { } while(0); + } + +} + +inline void +BaseShape::markChildren(JSTracer *trc) +{ + if (hasGetterObject()) + MarkObjectUnbarriered(trc, &getterObj, "getter"); + + if (hasSetterObject()) + MarkObjectUnbarriered(trc, &setterObj, "setter"); + + if (isOwned()) + MarkBaseShape(trc, &unowned_, "base"); + + if (parent) + MarkObject(trc, &parent, "parent"); +} + +} +# 23 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscriptinlines.h" 2 + +namespace js { + +inline +Bindings::Bindings(JSContext *cx) + : lastBinding(__null), nargs(0), nvars(0), hasDup_(false) +{} + +inline void +Bindings::transfer(JSContext *cx, Bindings *bindings) +{ + do { } while(0); + do { } while(0); + + *this = *bindings; + + + +} + +inline void +Bindings::clone(JSContext *cx, Bindings *bindings) +{ + do { } while(0); + do { } while(0); + + *this = *bindings; +} + +Shape * +Bindings::lastShape() const +{ + do { } while(0); + do { } while(0); + return lastBinding; +} + +Shape * +Bindings::initialShape(JSContext *cx) const +{ + + gc::AllocKind kind = gc::FINALIZE_OBJECT4; + do { } while(0); + + return EmptyShape::getInitialShape(cx, &CallClass, __null, __null, kind, + BaseShape::VAROBJ); +} + +bool +Bindings::ensureShape(JSContext *cx) +{ + if (!lastBinding) { + lastBinding = initialShape(cx); + if (!lastBinding) + return false; + } + return true; +} + +bool +Bindings::extensibleParents() +{ + return lastBinding && lastBinding->extensibleParents(); +} + +extern void +CurrentScriptFileLineOriginSlow(JSContext *cx, const char **file, unsigned *linenop, JSPrincipals **origin); + +inline void +CurrentScriptFileLineOrigin(JSContext *cx, const char **file, unsigned *linenop, JSPrincipals **origin, + LineOption opt = NOT_CALLED_FROM_JSOP_EVAL) +{ + if (opt == CALLED_FROM_JSOP_EVAL) { + do { } while(0); + do { } while(0); + JSScript *script = cx->fp()->script(); + *file = script->filename; + *linenop = ((unsigned)(((cx->regs().pc + 3)[1] << 8) | (cx->regs().pc + 3)[2])); + *origin = script->originPrincipals; + return; + } + + CurrentScriptFileLineOriginSlow(cx, file, linenop, origin); +} + +inline void +ScriptCounts::destroy(FreeOp *fop) +{ + fop->free_(pcCountsVector); +} + +inline void +MarkScriptFilename(JSRuntime *rt, const char *filename) +{ + + + + + + if (rt->gcIsFull) + ScriptFilenameEntry::fromFilename(filename)->marked = true; +} + +} + +inline void +JSScript::setFunction(JSFunction *fun) +{ + function_ = fun; +} + +inline JSFunction * +JSScript::getFunction(size_t index) +{ + JSObject *funobj = getObject(index); + do { } while(0); + return funobj->toFunction(); +} + +inline JSFunction * +JSScript::getCallerFunction() +{ + do { } while(0); + return getFunction(0); +} + +inline JSObject * +JSScript::getRegExp(size_t index) +{ + js::ObjectArray *arr = regexps(); + do { } while(0); + JSObject *obj = arr->vector[index]; + do { } while(0); + return obj; +} + +inline bool +JSScript::isEmpty() const +{ + if (length > 3) + return false; + + jsbytecode *pc = code; + if (noScriptRval && JSOp(*pc) == JSOP_FALSE) + ++pc; + return JSOp(*pc) == JSOP_STOP; +} + +inline bool +JSScript::hasGlobal() const +{ + + + + + + do { } while(0); + js::GlobalObject *obj = types->global; + return obj && !obj->isCleared(); +} + +inline js::GlobalObject * +JSScript::global() const +{ + do { } while(0); + return types->global; +} + +inline bool +JSScript::hasClearedGlobal() const +{ + do { } while(0); + js::GlobalObject *obj = types->global; + return obj && obj->isCleared(); +} + +inline js::types::TypeScriptNesting * +JSScript::nesting() const +{ + do { } while(0); + return types->nesting; +} + +inline void +JSScript::clearNesting() +{ + js::types::TypeScriptNesting *nesting = this->nesting(); + if (nesting) { + js::Foreground::delete_(nesting); + types->nesting = __null; + } +} + + +inline bool +JSScript::ensureHasJITInfo(JSContext *cx) +{ + if (jitInfo) + return true; + jitInfo = cx->new_(); + return jitInfo != __null; +} + +inline void +JSScript::destroyJITInfo(js::FreeOp *fop) +{ + fop->delete_(jitInfo); + jitInfo = __null; +} + + +inline void +JSScript::writeBarrierPre(JSScript *script) +{ + + if (!script) + return; + + JSCompartment *comp = script->compartment(); + if (comp->needsBarrier()) { + do { } while(0); + JSScript *tmp = script; + MarkScriptUnbarriered(comp->barrierTracer(), &tmp, "write barrier"); + do { } while(0); + } + +} + +inline void +JSScript::writeBarrierPost(JSScript *script, void *addr) +{ +} +# 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject-inl.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject-inl.h" +#define ArgumentsObject_inl_h___ + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject.h" 1 +# 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject-inl.h" 2 + +namespace js { + +inline void +ArgumentsObject::initInitialLength(uint32_t length) +{ + do { } while(0); + initFixedSlot(INITIAL_LENGTH_SLOT, Int32Value(length << PACKED_BITS_COUNT)); + do { } while(0); + do { } while(0); +} + +inline uint32_t +ArgumentsObject::initialLength() const +{ + uint32_t argc = uint32_t(getFixedSlot(INITIAL_LENGTH_SLOT).toInt32()) >> PACKED_BITS_COUNT; + do { } while(0); + return argc; +} + +inline void +ArgumentsObject::markLengthOverridden() +{ + uint32_t v = getFixedSlot(INITIAL_LENGTH_SLOT).toInt32() | LENGTH_OVERRIDDEN_BIT; + setFixedSlot(INITIAL_LENGTH_SLOT, Int32Value(v)); +} + +inline bool +ArgumentsObject::hasOverriddenLength() const +{ + const js::Value &v = getFixedSlot(INITIAL_LENGTH_SLOT); + return v.toInt32() & LENGTH_OVERRIDDEN_BIT; +} + +inline void +ArgumentsObject::initData(ArgumentsData *data) +{ + do { } while(0); + initFixedSlot(DATA_SLOT, PrivateValue(data)); +} + +inline ArgumentsData * +ArgumentsObject::data() const +{ + return reinterpret_cast(getFixedSlot(DATA_SLOT).toPrivate()); +} + +inline bool +ArgumentsObject::isElementDeleted(uint32_t i) const +{ + return IsBitArrayElementSet(data()->deletedBits, initialLength(), i); +} + +inline bool +ArgumentsObject::isAnyElementDeleted() const +{ + return IsAnyBitArrayElementSet(data()->deletedBits, initialLength()); +} + +inline void +ArgumentsObject::markElementDeleted(uint32_t i) +{ + SetBitArrayElement(data()->deletedBits, initialLength(), i); +} + +inline const js::Value & +ArgumentsObject::element(uint32_t i) const +{ + do { } while(0); + return data()->slots[i]; +} + +inline void +ArgumentsObject::setElement(uint32_t i, const js::Value &v) +{ + do { } while(0); + data()->slots[i] = v; +} + +inline bool +ArgumentsObject::getElement(uint32_t i, Value *vp) +{ + if (i >= initialLength() || isElementDeleted(i)) + return false; + + + + + + + StackFrame *fp = maybeStackFrame(); + do { } while (0); + if (fp) + *vp = fp->canonicalActualArg(i); + else + *vp = element(i); + return true; +} + +namespace detail { + +struct CopyNonHoleArgsTo +{ + CopyNonHoleArgsTo(ArgumentsObject *argsobj, Value *dst) : argsobj(*argsobj), dst(dst) {} + ArgumentsObject &argsobj; + Value *dst; + bool operator()(uint32_t argi, Value *src) { + *dst++ = *src; + return true; + } +}; + +} + +inline bool +ArgumentsObject::getElements(uint32_t start, uint32_t count, Value *vp) +{ + do { } while(0); + + uint32_t length = initialLength(); + if (start > length || start + count > length || isAnyElementDeleted()) + return false; + + StackFrame *fp = maybeStackFrame(); + + + if (!fp) { + const Value *srcbeg = Valueify(data()->slots) + start; + const Value *srcend = srcbeg + count; + const Value *src = srcbeg; + for (Value *dst = vp; src < srcend; ++dst, ++src) + *dst = *src; + return true; + } + + + do { } while(0); + return fp->forEachCanonicalActualArg(detail::CopyNonHoleArgsTo(this, vp), start, count); +} + +inline js::StackFrame * +ArgumentsObject::maybeStackFrame() const +{ + return reinterpret_cast(getFixedSlot(STACK_FRAME_SLOT).toPrivate()); +} + +inline void +ArgumentsObject::setStackFrame(StackFrame *frame) +{ + setFixedSlot(STACK_FRAME_SLOT, PrivateValue(frame)); +} + +inline size_t +ArgumentsObject::sizeOfMisc(JSMallocSizeOfFun mallocSizeOf) const +{ + return mallocSizeOf(data()); +} + +inline const js::Value & +NormalArgumentsObject::callee() const +{ + return data()->callee; +} + +inline void +NormalArgumentsObject::clearCallee() +{ + data()->callee.set(compartment(), MagicValue(JS_OVERWRITTEN_CALLEE)); +} + +} +# 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject-inl.h" 1 +# 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" 2 + + +namespace js { + + + + + + +static inline bool +IsCacheableNonGlobalScope(JSObject *obj) +{ + bool cacheable = (obj->isCall() || obj->isBlock() || obj->isDeclEnv()); + + do { } while (0); + return cacheable; +} + +inline HandleObject +StackFrame::scopeChain() const +{ + do { } while (0); + if (!(flags_ & HAS_SCOPECHAIN)) { + scopeChain_ = callee().environment(); + flags_ |= HAS_SCOPECHAIN; + } + return HandleObject::fromMarkedLocation(&scopeChain_); +} + +inline GlobalObject & +StackFrame::global() const +{ + return scopeChain()->global(); +} + +inline JSObject & +StackFrame::varObj() +{ + JSObject *obj = scopeChain(); + while (!obj->isVarObj()) + obj = obj->enclosingScope(); + return *obj; +} + +inline JSCompartment * +StackFrame::compartment() const +{ + do { } while (0); + return scopeChain()->compartment(); +} + + +inline mjit::JITScript * +StackFrame::jit() +{ + JSScript *script_ = script(); + return script_->getJIT(isConstructing(), script_->compartment()->needsBarrier()); +} + + +inline void +StackFrame::initPrev(JSContext *cx) +{ + do { } while(0); + if (FrameRegs *regs = cx->maybeRegs()) { + prev_ = regs->fp(); + prevpc_ = regs->pc; + prevInline_ = regs->inlined(); + do { } while (0) + ; + } else { + prev_ = __null; + + + + + } +} + +inline void +StackFrame::resetGeneratorPrev(JSContext *cx) +{ + flags_ |= HAS_PREVPC; + initPrev(cx); +} + +inline void +StackFrame::initInlineFrame(JSFunction *fun, StackFrame *prevfp, jsbytecode *prevpc) +{ + + + + + flags_ = StackFrame::FUNCTION; + exec.fun = fun; + resetInlinePrev(prevfp, prevpc); +} + +inline void +StackFrame::resetInlinePrev(StackFrame *prevfp, jsbytecode *prevpc) +{ + do { } while (0); + flags_ |= StackFrame::HAS_PREVPC; + prev_ = prevfp; + prevpc_ = prevpc; + prevInline_ = __null; +} + +inline void +StackFrame::initCallFrame(JSContext *cx, JSFunction &callee, + JSScript *script, uint32_t nactual, StackFrame::Flags flagsArg) +{ + do { } while(0) + + + ; + do { } while(0); + + + flags_ = FUNCTION | HAS_PREVPC | HAS_SCOPECHAIN | HAS_BLOCKCHAIN | flagsArg; + exec.fun = &callee; + u.nactual = nactual; + scopeChain_ = callee.environment(); + ncode_ = __null; + initPrev(cx); + blockChain_= __null; + do { } while(0); + do { } while(0); + do { } while(0); + do { } while(0); + + SetValueRangeToUndefined(slots(), script->nfixed); +} + + + + + +inline void +StackFrame::initFixupFrame(StackFrame *prev, StackFrame::Flags flags, void *ncode, unsigned nactual) +{ + do { } while(0) + + + + ; + + flags_ = FUNCTION | flags; + prev_ = prev; + ncode_ = ncode; + u.nactual = nactual; +} + +inline JSObject * +StackFrame::createRestParameter(JSContext *cx) +{ + do { } while(0); + unsigned nformal = fun()->nargs - 1, nactual = numActualArgs(); + unsigned nrest = (nactual > nformal) ? nactual - nformal : 0; + return NewDenseCopiedArray(cx, nrest, actualArgs() + nformal); +} + +inline Value & +StackFrame::canonicalActualArg(unsigned i) const +{ + if (i < numFormalArgs()) + return formalArg(i); + do { } while(0); + return actualArgs()[i]; +} + +template +inline bool +StackFrame::forEachCanonicalActualArg(Op op, unsigned start , unsigned count ) +{ + unsigned nformal = fun()->nargs; + do { } while(0); + + Value *formals = formalArgsEnd() - nformal; + unsigned nactual = numActualArgs(); + if (count == unsigned(-1)) + count = nactual - start; + + unsigned end = start + count; + do { } while(0); + do { } while(0); + + if (end <= nformal) { + Value *p = formals + start; + for (; start < end; ++p, ++start) { + if (!op(start, p)) + return false; + } + } else { + for (Value *p = formals + start; start < nformal; ++p, ++start) { + if (!op(start, p)) + return false; + } + do { } while(0); + Value *actuals = formals - (nactual + 2) + start; + for (Value *p = actuals; start < end; ++p, ++start) { + if (!op(start, p)) + return false; + } + } + return true; +} + +template +inline bool +StackFrame::forEachFormalArg(Op op) +{ + Value *formals = formalArgsEnd() - fun()->nargs; + Value *formalsEnd = formalArgsEnd(); + unsigned i = 0; + for (Value *p = formals; p != formalsEnd; ++p, ++i) { + if (!op(i, p)) + return false; + } + return true; +} + +struct CopyTo +{ + Value *dst; + CopyTo(Value *dst) : dst(dst) {} + bool operator()(unsigned, Value *src) { + *dst++ = *src; + return true; + } +}; + +inline unsigned +StackFrame::numActualArgs() const +{ +# 264 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" + do { } while(0); + if ((__builtin_expect((flags_ & (OVERFLOW_ARGS | UNDERFLOW_ARGS)), 0))) + return u.nactual; + return numFormalArgs(); +} + +inline Value * +StackFrame::actualArgs() const +{ + do { } while(0); + Value *argv = formalArgs(); + if ((__builtin_expect((flags_ & OVERFLOW_ARGS), 0))) + return argv - (2 + u.nactual); + return argv; +} + +inline Value * +StackFrame::actualArgsEnd() const +{ + do { } while(0); + if ((__builtin_expect((flags_ & OVERFLOW_ARGS), 0))) + return formalArgs() - 2; + return formalArgs() + numActualArgs(); +} + +inline void +StackFrame::setScopeChain(JSObject &obj) +{ +# 304 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" + scopeChain_ = &obj; + flags_ |= HAS_SCOPECHAIN; +} + +inline void +StackFrame::initScopeChain(CallObject &obj) +{ + do { } while(0); + do { } while(0); + scopeChain_ = &obj; + flags_ |= HAS_SCOPECHAIN | HAS_CALL_OBJ; +} + +inline CallObject & +StackFrame::callObj() const +{ + do { } while (0); + + JSObject *pobj = scopeChain(); + while ((__builtin_expect((!pobj->isCall()), 0))) + pobj = pobj->enclosingScope(); + return pobj->asCall(); +} + +inline bool +StackFrame::maintainNestingState() const +{ + + + + + return isNonEvalFunctionFrame() && !isGeneratorFrame() && script()->nesting(); +} + +inline bool +StackFrame::functionPrologue(JSContext *cx) +{ + do { } while(0); + do { } while(0); + + if (fun()->isHeavyweight()) { + CallObject *callobj = CallObject::createForFunction(cx, this); + if (!callobj) + return false; + initScopeChain(*callobj); + } else { + + scopeChain(); + } + + if (script()->nesting()) { + do { } while(0); + types::NestingPrologue(cx, this); + } + + return true; +} + +inline void +StackFrame::functionEpilogue(JSContext *cx) +{ + do { } while(0); + + if (cx->compartment->debugMode()) + cx->runtime->debugScopes->onPopCall(this); + + if (flags_ & (HAS_ARGS_OBJ | HAS_CALL_OBJ)) { + if (hasCallObj()) + js_PutCallObject(this, scopeChain_->asCall()); + if (hasArgsObj()) + js_PutArgsObject(this); + } + + if (maintainNestingState()) + types::NestingEpilogue(this); +} + +inline void +StackFrame::updateEpilogueFlags() +{ + if (flags_ & (HAS_ARGS_OBJ | HAS_CALL_OBJ)) { + if (hasArgsObj() && !argsObj().maybeStackFrame()) + flags_ &= ~HAS_ARGS_OBJ; + if (hasCallObj() && !callObj().maybeStackFrame()) { + + + + + + + + scopeChain_ = isFunctionFrame() + ? callee().environment() + : &scopeChain_->asScope().enclosingScope(); + flags_ &= ~HAS_CALL_OBJ; + } + } + + + + + + + if (maintainNestingState()) + script()->nesting()->activeFrames++; +} + + + + +__attribute__((always_inline)) inline bool +StackSpace::ensureSpace(JSContext *cx, MaybeReportError report, Value *from, ptrdiff_t nvals, + JSCompartment *dest) const +{ + assertInvariants(); + do { } while(0); + + + + if ((__builtin_expect((conservativeEnd_ - from < nvals), 0))) + return ensureSpaceSlow(cx, report, from, nvals, dest); + return true; +} + +inline Value * +StackSpace::getStackLimit(JSContext *cx, MaybeReportError report) +{ + FrameRegs ®s = cx->regs(); + unsigned nvals = regs.fp()->numSlots() + STACK_JIT_EXTRA; + return ensureSpace(cx, report, regs.sp, nvals) + ? conservativeEnd_ + : __null; +} + + + +__attribute__((always_inline)) inline StackFrame * +ContextStack::getCallFrame(JSContext *cx, MaybeReportError report, const CallArgs &args, + JSFunction *fun, JSScript *script, StackFrame::Flags *flags) const +{ + do { } while(0); + unsigned nformal = fun->nargs; + + Value *firstUnused = args.end(); + do { } while(0); + + + unsigned nvals = VALUES_PER_STACK_FRAME + script->nslots + StackSpace::STACK_JIT_EXTRA; + + + + if (args.length() == nformal) { + if (!space().ensureSpace(cx, report, firstUnused, nvals)) + return __null; + return reinterpret_cast(firstUnused); + } + + if (args.length() < nformal) { + *flags = StackFrame::Flags(*flags | StackFrame::UNDERFLOW_ARGS); + unsigned nmissing = nformal - args.length(); + if (!space().ensureSpace(cx, report, firstUnused, nmissing + nvals)) + return __null; + SetValueRangeToUndefined(firstUnused, nmissing); + return reinterpret_cast(firstUnused + nmissing); + } + + *flags = StackFrame::Flags(*flags | StackFrame::OVERFLOW_ARGS); + unsigned ncopy = 2 + nformal; + if (!space().ensureSpace(cx, report, firstUnused, ncopy + nvals)) + return __null; + Value *dst = firstUnused; + Value *src = args.base(); + PodCopy(dst, src, ncopy); + return reinterpret_cast(firstUnused + ncopy); +} + +__attribute__((always_inline)) inline bool +ContextStack::pushInlineFrame(JSContext *cx, FrameRegs ®s, const CallArgs &args, + JSFunction &callee, JSScript *script, + InitialFrameFlags initial) +{ + do { } while(0); + do { } while(0); + + do { } while(0); + + StackFrame::Flags flags = ToFrameFlags(initial); + StackFrame *fp = getCallFrame(cx, REPORT_ERROR, args, &callee, script, &flags); + if (!fp) + return false; + + + fp->initCallFrame(cx, callee, script, args.length(), flags); + + + + + + regs.prepareToRun(*fp, script); + return true; +} + +__attribute__((always_inline)) inline bool +ContextStack::pushInlineFrame(JSContext *cx, FrameRegs ®s, const CallArgs &args, + JSFunction &callee, JSScript *script, + InitialFrameFlags initial, Value **stackLimit) +{ + if (!pushInlineFrame(cx, regs, args, callee, script, initial)) + return false; + *stackLimit = space().conservativeEnd_; + return true; +} + +__attribute__((always_inline)) inline StackFrame * +ContextStack::getFixupFrame(JSContext *cx, MaybeReportError report, + const CallArgs &args, JSFunction *fun, JSScript *script, + void *ncode, InitialFrameFlags initial, Value **stackLimit) +{ + do { } while(0); + do { } while(0); + do { } while(0); + + StackFrame::Flags flags = ToFrameFlags(initial); + StackFrame *fp = getCallFrame(cx, report, args, fun, script, &flags); + if (!fp) + return __null; + + + fp->initFixupFrame(cx->fp(), flags, ncode, args.length()); + + *stackLimit = space().conservativeEnd_; + return fp; +} + +__attribute__((always_inline)) inline void +ContextStack::popInlineFrame(FrameRegs ®s) +{ + do { } while(0); + do { } while(0); + + StackFrame *fp = regs.fp(); + fp->functionEpilogue(cx_); + + Value *newsp = fp->actualArgs() - 1; + do { } while(0); + + newsp[-1] = fp->returnValue(); + regs.popFrame(newsp); +} + +inline void +ContextStack::popFrameAfterOverflow() +{ + + FrameRegs ®s = seg_->regs(); + StackFrame *fp = regs.fp(); + regs.popFrame(fp->actualArgsEnd()); +} + +inline JSScript * +ContextStack::currentScript(jsbytecode **ppc) const +{ + if (ppc) + *ppc = __null; + + FrameRegs *regs = maybeRegs(); + StackFrame *fp = regs ? regs->fp() : __null; + while (fp && fp->isDummyFrame()) + fp = fp->prev(); + if (!fp) + return __null; + + + mjit::CallSite *inlined = regs->inlined(); + if (inlined) { + mjit::JITChunk *chunk = fp->jit()->chunk(regs->pc); + do { } while(0); + mjit::InlineFrame *frame = &chunk->inlineFrames()[inlined->inlineIndex]; + JSScript *script = frame->fun->script(); + if (script->compartment() != cx_->compartment) + return __null; + if (ppc) + *ppc = script->code + inlined->pcOffset; + return script; + } + + + JSScript *script = fp->script(); + if (script->compartment() != cx_->compartment) + return __null; + + if (ppc) + *ppc = fp->pcQuadratic(*this); + return script; +} + +inline JSScript * +ContextStack::currentScriptWithDiagnostics(jsbytecode **ppc) const +{ + if (ppc) + *ppc = __null; + + FrameRegs *regs = maybeRegs(); + StackFrame *fp = regs ? regs->fp() : __null; + while (fp && fp->isDummyFrame()) + fp = fp->prev(); + if (!fp) + *(int *) 0x10 = 0; + + + mjit::CallSite *inlined = regs->inlined(); + if (inlined) { + mjit::JITChunk *chunk = fp->jit()->chunk(regs->pc); + do { } while(0); + mjit::InlineFrame *frame = &chunk->inlineFrames()[inlined->inlineIndex]; + JSScript *script = frame->fun->script(); + if (script->compartment() != cx_->compartment) + *(int *) 0x20 = 0; + if (ppc) + *ppc = script->code + inlined->pcOffset; + return script; + } + + + JSScript *script = fp->script(); + if (script->compartment() != cx_->compartment) + *(int *) 0x30 = 0; + + if (ppc) + *ppc = fp->pcQuadratic(*this); + if (!script) + *(int *) 0x40 = 0; + return script; +} + +inline HandleObject +ContextStack::currentScriptedScopeChain() const +{ + return fp()->scopeChain(); +} + +} +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" 2 + + +#define jsinferinlines_h___ + + + + + +namespace js { +namespace types { + + inline Type +Type::ObjectType(JSObject *obj) +{ + if (obj->hasSingletonType()) + return Type(uintptr_t(obj) | 1); + return Type(uintptr_t(obj->type())); +} + + inline Type +Type::ObjectType(TypeObject *obj) +{ + if (obj->singleton) + return Type(uintptr_t(obj->singleton.get()) | 1); + return Type(uintptr_t(obj)); +} + + inline Type +Type::ObjectType(TypeObjectKey *obj) +{ + return Type(uintptr_t(obj)); +} + +inline Type +GetValueType(JSContext *cx, const Value &val) +{ + do { } while(0); + if (val.isDouble()) + return Type::DoubleType(); + if (val.isObject()) + return Type::ObjectType(&val.toObject()); + return Type::PrimitiveType(val.extractNonDoubleType()); +} + +inline TypeFlags +PrimitiveTypeFlag(JSValueType type) +{ + switch (type) { + case JSVAL_TYPE_UNDEFINED: + return TYPE_FLAG_UNDEFINED; + case JSVAL_TYPE_NULL: + return TYPE_FLAG_NULL; + case JSVAL_TYPE_BOOLEAN: + return TYPE_FLAG_BOOLEAN; + case JSVAL_TYPE_INT32: + return TYPE_FLAG_INT32; + case JSVAL_TYPE_DOUBLE: + return TYPE_FLAG_DOUBLE; + case JSVAL_TYPE_STRING: + return TYPE_FLAG_STRING; + case JSVAL_TYPE_MAGIC: + return TYPE_FLAG_LAZYARGS; + default: + __builtin_unreachable(); + return 0; + } +} + +inline JSValueType +TypeFlagPrimitive(TypeFlags flags) +{ + switch (flags) { + case TYPE_FLAG_UNDEFINED: + return JSVAL_TYPE_UNDEFINED; + case TYPE_FLAG_NULL: + return JSVAL_TYPE_NULL; + case TYPE_FLAG_BOOLEAN: + return JSVAL_TYPE_BOOLEAN; + case TYPE_FLAG_INT32: + return JSVAL_TYPE_INT32; + case TYPE_FLAG_DOUBLE: + return JSVAL_TYPE_DOUBLE; + case TYPE_FLAG_STRING: + return JSVAL_TYPE_STRING; + case TYPE_FLAG_LAZYARGS: + return JSVAL_TYPE_MAGIC; + default: + __builtin_unreachable(); + return (JSValueType) 0; + } +} + + + + + + +inline jsid +MakeTypeId(JSContext *cx, jsid id) +{ + do { } while(0); + + + + + + if (JSID_IS_INT(id)) + return ((jsid)0x2); + + + + + + if (JSID_IS_STRING(id)) { + JSFlatString *str = JSID_TO_FLAT_STRING(id); + const jschar *cp = str->getCharsZ(cx); + if (((((unsigned)(*cp)) - '0') <= 9) || *cp == '-') { + cp++; + while (((((unsigned)(*cp)) - '0') <= 9)) + cp++; + if (*cp == 0) + return ((jsid)0x2); + } + return id; + } + + return ((jsid)0x2); +} + +const char * TypeIdStringImpl(jsid id); + + +static inline const char * +TypeIdString(jsid id) +{ + + + + return "(missing)"; + +} +# 171 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" +struct AutoEnterTypeInference +{ + FreeOp *freeOp; + JSCompartment *compartment; + bool oldActiveAnalysis; + bool oldActiveInference; + + AutoEnterTypeInference(JSContext *cx, bool compiling = false) + { + do { } while (0); + init(cx->runtime->defaultFreeOp(), cx->compartment); + } + + AutoEnterTypeInference(FreeOp *fop, JSCompartment *comp) + { + init(fop, comp); + } + + ~AutoEnterTypeInference() + { + compartment->activeAnalysis = oldActiveAnalysis; + compartment->activeInference = oldActiveInference; + + + + + + + + if (!compartment->activeInference) { + TypeCompartment *types = &compartment->types; + if (types->pendingNukeTypes) + types->nukeTypes(freeOp); + else if (types->pendingRecompiles) + types->processPendingRecompiles(freeOp); + } + } + + private: + void init(FreeOp *fop, JSCompartment *comp) { + freeOp = fop; + compartment = comp; + oldActiveAnalysis = compartment->activeAnalysis; + oldActiveInference = compartment->activeInference; + compartment->activeAnalysis = true; + compartment->activeInference = true; + } +}; + + + + + +struct AutoEnterCompilation +{ + RecompileInfo &info; + + AutoEnterCompilation(JSContext *cx, JSScript *script, bool constructing, unsigned chunkIndex) + : info(cx->compartment->types.compiledInfo) + { + do { } while(0); + info.script = script; + info.constructing = constructing; + info.barriers = cx->compartment->needsBarrier(); + info.chunkIndex = chunkIndex; + } + + ~AutoEnterCompilation() + { + do { } while(0); + info.script = __null; + info.constructing = false; + info.barriers = false; + info.chunkIndex = 0; + } +}; +# 263 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" +inline TypeObject * +GetTypeNewObject(JSContext *cx, JSProtoKey key) +{ + JSObject *proto; + if (!js_GetClassPrototype(cx, __null, key, &proto, __null)) + return __null; + return proto->getNewType(cx); +} + + +inline TypeObject * +GetTypeCallerInitObject(JSContext *cx, JSProtoKey key) +{ + if (cx->typeInferenceEnabled()) { + jsbytecode *pc; + JSScript *script = cx->stack.currentScript(&pc); + if (script) + return TypeScript::InitObject(cx, script, pc, key); + } + return GetTypeNewObject(cx, key); +} + + + + + +inline void +MarkIteratorUnknown(JSContext *cx) +{ + extern void MarkIteratorUnknownSlow(JSContext *cx); + + if (cx->typeInferenceEnabled()) + MarkIteratorUnknownSlow(cx); +} + + + + + +inline bool +TypeMonitorCall(JSContext *cx, const js::CallArgs &args, bool constructing) +{ + extern void TypeMonitorCallSlow(JSContext *cx, JSObject *callee, + const CallArgs &args, bool constructing); + + JSObject *callee = &args.callee(); + if (callee->isFunction()) { + JSFunction *fun = callee->toFunction(); + if (fun->isInterpreted()) { + JSScript *script = fun->script(); + if (!script->ensureRanAnalysis(cx, fun->environment())) + return false; + if (cx->typeInferenceEnabled()) + TypeMonitorCallSlow(cx, callee, args, constructing); + } + } + + return true; +} + +inline bool +TrackPropertyTypes(JSContext *cx, JSObject *obj, jsid id) +{ + if (!cx->typeInferenceEnabled() || obj->hasLazyType() || obj->type()->unknownProperties()) + return false; + + if (obj->hasSingletonType() && !obj->type()->maybeGetProperty(cx, id)) + return false; + + return true; +} + + +inline void +AddTypePropertyId(JSContext *cx, JSObject *obj, jsid id, Type type) +{ + if (cx->typeInferenceEnabled()) + id = MakeTypeId(cx, id); + if (TrackPropertyTypes(cx, obj, id)) + obj->type()->addPropertyType(cx, id, type); +} + +inline void +AddTypePropertyId(JSContext *cx, JSObject *obj, jsid id, const Value &value) +{ + if (cx->typeInferenceEnabled()) + id = MakeTypeId(cx, id); + if (TrackPropertyTypes(cx, obj, id)) + obj->type()->addPropertyType(cx, id, value); +} + +inline void +AddTypeProperty(JSContext *cx, TypeObject *obj, const char *name, Type type) +{ + if (cx->typeInferenceEnabled() && !obj->unknownProperties()) + obj->addPropertyType(cx, name, type); +} + +inline void +AddTypeProperty(JSContext *cx, TypeObject *obj, const char *name, const Value &value) +{ + if (cx->typeInferenceEnabled() && !obj->unknownProperties()) + obj->addPropertyType(cx, name, value); +} + + +inline void +MarkTypeObjectFlags(JSContext *cx, JSObject *obj, TypeObjectFlags flags) +{ + if (cx->typeInferenceEnabled() && !obj->hasLazyType() && !obj->type()->hasAllFlags(flags)) + obj->type()->setFlags(cx, flags); +} + + + + + + + +inline void +MarkTypeObjectUnknownProperties(JSContext *cx, TypeObject *obj, + bool markSetsUnknown = false) +{ + if (cx->typeInferenceEnabled()) { + if (!obj->unknownProperties()) + obj->markUnknown(cx); + if (markSetsUnknown && !(obj->flags & OBJECT_FLAG_SETS_MARKED_UNKNOWN)) + cx->compartment->types.markSetsUnknown(cx, obj); + } +} + + + + + +inline void +MarkTypePropertyConfigured(JSContext *cx, JSObject *obj, jsid id) +{ + if (cx->typeInferenceEnabled()) + id = MakeTypeId(cx, id); + if (TrackPropertyTypes(cx, obj, id)) + obj->type()->markPropertyConfigured(cx, id); +} + + +inline void +MarkObjectStateChange(JSContext *cx, JSObject *obj) +{ + if (cx->typeInferenceEnabled() && !obj->hasLazyType() && !obj->type()->unknownProperties()) + obj->type()->markStateChange(cx); +} + + + + + + +inline void +FixArrayType(JSContext *cx, JSObject *obj) +{ + if (cx->typeInferenceEnabled()) + cx->compartment->types.fixArrayType(cx, obj); +} + +inline void +FixObjectType(JSContext *cx, JSObject *obj) +{ + if (cx->typeInferenceEnabled()) + cx->compartment->types.fixObjectType(cx, obj); +} + + +extern void TypeMonitorResult(JSContext *cx, JSScript *script, jsbytecode *pc, const js::Value &rval); +extern void TypeDynamicResult(JSContext *cx, JSScript *script, jsbytecode *pc, js::types::Type type); + +inline bool +UseNewTypeAtEntry(JSContext *cx, StackFrame *fp) +{ + return fp->isConstructing() && cx->typeInferenceEnabled() && + fp->prev() && fp->prev()->isScriptFrame() && + UseNewType(cx, fp->prev()->script(), fp->prev()->pcQuadratic(cx->stack, fp)); +} + + + + + +inline +TypeScript::TypeScript() +{ + this->global = (js::GlobalObject *) GLOBAL_MISSING_SCOPE; +} + + inline unsigned +TypeScript::NumTypeSets(JSScript *script) +{ + return script->nTypeSets + analyze::TotalSlots(script); +} + + inline TypeSet * +TypeScript::ReturnTypes(JSScript *script) +{ + return script->types->typeArray() + script->nTypeSets + js::analyze::CalleeSlot(); +} + + inline TypeSet * +TypeScript::ThisTypes(JSScript *script) +{ + return script->types->typeArray() + script->nTypeSets + js::analyze::ThisSlot(); +} + + + + + + + + inline TypeSet * +TypeScript::ArgTypes(JSScript *script, unsigned i) +{ + do { } while(0); + return script->types->typeArray() + script->nTypeSets + js::analyze::ArgSlot(i); +} + + inline TypeSet * +TypeScript::LocalTypes(JSScript *script, unsigned i) +{ + do { } while(0); + return script->types->typeArray() + script->nTypeSets + js::analyze::LocalSlot(script, i); +} + + inline TypeSet * +TypeScript::SlotTypes(JSScript *script, unsigned slot) +{ + do { } while(0); + return script->types->typeArray() + script->nTypeSets + slot; +} + + inline TypeObject * +TypeScript::StandardType(JSContext *cx, JSScript *script, JSProtoKey key) +{ + JSObject *proto; + if (!js_GetClassPrototype(cx, script->global(), key, &proto, __null)) + return __null; + return proto->getNewType(cx); +} + +struct AllocationSiteKey { + JSScript *script; + + uint32_t offset : 24; + JSProtoKey kind : 8; + + static const uint32_t OFFSET_LIMIT = (1 << 23); + + AllocationSiteKey() { PodZero(this); } + + typedef AllocationSiteKey Lookup; + + static inline uint32_t hash(AllocationSiteKey key) { + return uint32_t(size_t(key.script->code + key.offset)) ^ key.kind; + } + + static inline bool match(const AllocationSiteKey &a, const AllocationSiteKey &b) { + return a.script == b.script && a.offset == b.offset && a.kind == b.kind; + } +}; + + inline TypeObject * +TypeScript::InitObject(JSContext *cx, JSScript *script, jsbytecode *pc, JSProtoKey kind) +{ + do { } while(0); + + + uint32_t offset = pc - script->code; + + if (!cx->typeInferenceEnabled() || !script->hasGlobal() || offset >= AllocationSiteKey::OFFSET_LIMIT) + return GetTypeNewObject(cx, kind); + + AllocationSiteKey key; + key.script = script; + key.offset = offset; + key.kind = kind; + + if (!cx->compartment->types.allocationSiteTable) + return cx->compartment->types.newAllocationSiteTypeObject(cx, key); + + AllocationSiteTable::Ptr p = cx->compartment->types.allocationSiteTable->lookup(key); + + if (p) + return p->value; + return cx->compartment->types.newAllocationSiteTypeObject(cx, key); +} + + +static inline bool +SetInitializerObjectType(JSContext *cx, JSScript *script, jsbytecode *pc, JSObject *obj) +{ + if (!cx->typeInferenceEnabled()) + return true; + + if (UseNewTypeForInitializer(cx, script, pc)) { + if (!obj->setSingletonType(cx)) + return false; + + + + + + + TypeScript::Monitor(cx, script, pc, ObjectValue(*obj)); + } else { + JSProtoKey key = obj->isDenseArray() ? JSProto_Array : JSProto_Object; + types::TypeObject *type = TypeScript::InitObject(cx, script, pc, key); + if (!type) + return false; + obj->setType(type); + } + + return true; +} + + inline void +TypeScript::Monitor(JSContext *cx, JSScript *script, jsbytecode *pc, const js::Value &rval) +{ + if (cx->typeInferenceEnabled()) + TypeMonitorResult(cx, script, pc, rval); +} + + inline void +TypeScript::MonitorOverflow(JSContext *cx, JSScript *script, jsbytecode *pc) +{ + if (cx->typeInferenceEnabled()) + TypeDynamicResult(cx, script, pc, Type::DoubleType()); +} + + inline void +TypeScript::MonitorString(JSContext *cx, JSScript *script, jsbytecode *pc) +{ + if (cx->typeInferenceEnabled()) + TypeDynamicResult(cx, script, pc, Type::StringType()); +} + + inline void +TypeScript::MonitorUnknown(JSContext *cx, JSScript *script, jsbytecode *pc) +{ + if (cx->typeInferenceEnabled()) + TypeDynamicResult(cx, script, pc, Type::UnknownType()); +} + + inline void +TypeScript::GetPcScript(JSContext *cx, JSScript **script, jsbytecode **pc) +{ + *script = cx->fp()->script(); + *pc = cx->regs().pc; +} + + inline void +TypeScript::MonitorOverflow(JSContext *cx) +{ + JSScript *script; + jsbytecode *pc; + GetPcScript(cx, &script, &pc); + MonitorOverflow(cx, script, pc); +} + + inline void +TypeScript::MonitorString(JSContext *cx) +{ + JSScript *script; + jsbytecode *pc; + GetPcScript(cx, &script, &pc); + MonitorString(cx, script, pc); +} + + inline void +TypeScript::MonitorUnknown(JSContext *cx) +{ + JSScript *script; + jsbytecode *pc; + GetPcScript(cx, &script, &pc); + MonitorUnknown(cx, script, pc); +} + + inline void +TypeScript::Monitor(JSContext *cx, const js::Value &rval) +{ + JSScript *script; + jsbytecode *pc; + GetPcScript(cx, &script, &pc); + Monitor(cx, script, pc, rval); +} + + inline void +TypeScript::MonitorAssign(JSContext *cx, JSObject *obj, jsid id) +{ + if (cx->typeInferenceEnabled() && !obj->hasSingletonType()) { +# 668 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" + uint32_t i; + if (js_IdIsIndex(id, &i)) + return; + MarkTypeObjectUnknownProperties(cx, obj->type()); + } +} + + inline void +TypeScript::SetThis(JSContext *cx, JSScript *script, Type type) +{ + if (!cx->typeInferenceEnabled()) + return; + do { } while(0); + + + bool analyze = cx->hasRunOption(((uint32_t)1 << (16))); + + if (!ThisTypes(script)->hasType(type) || analyze) { + AutoEnterTypeInference enter(cx); + + InferSpew(ISpewOps, "externalType: setThis #%u: %s", + script->id(), TypeString(type)); + ThisTypes(script)->addType(cx, type); + + if (analyze && script->types->hasScope()) + script->ensureRanInference(cx); + } +} + + inline void +TypeScript::SetThis(JSContext *cx, JSScript *script, const js::Value &value) +{ + if (cx->typeInferenceEnabled()) + SetThis(cx, script, GetValueType(cx, value)); +} + + inline void +TypeScript::SetLocal(JSContext *cx, JSScript *script, unsigned local, Type type) +{ + if (!cx->typeInferenceEnabled()) + return; + do { } while(0); + + if (!LocalTypes(script, local)->hasType(type)) { + AutoEnterTypeInference enter(cx); + + InferSpew(ISpewOps, "externalType: setLocal #%u %u: %s", + script->id(), local, TypeString(type)); + LocalTypes(script, local)->addType(cx, type); + } +} + + inline void +TypeScript::SetLocal(JSContext *cx, JSScript *script, unsigned local, const js::Value &value) +{ + if (cx->typeInferenceEnabled()) { + Type type = GetValueType(cx, value); + SetLocal(cx, script, local, type); + } +} + + inline void +TypeScript::SetArgument(JSContext *cx, JSScript *script, unsigned arg, Type type) +{ + if (!cx->typeInferenceEnabled()) + return; + do { } while(0); + + if (!ArgTypes(script, arg)->hasType(type)) { + AutoEnterTypeInference enter(cx); + + InferSpew(ISpewOps, "externalType: setArg #%u %u: %s", + script->id(), arg, TypeString(type)); + ArgTypes(script, arg)->addType(cx, type); + } +} + + inline void +TypeScript::SetArgument(JSContext *cx, JSScript *script, unsigned arg, const js::Value &value) +{ + if (cx->typeInferenceEnabled()) { + Type type = GetValueType(cx, value); + SetArgument(cx, script, arg, type); + } +} + +void +TypeScript::trace(JSTracer *trc) +{ + if (hasScope() && global) + gc::MarkObject(trc, &global, "script_global"); + + +} + + + + + +inline JSCompartment * +TypeCompartment::compartment() +{ + return (JSCompartment *)((char *)this - __builtin_offsetof (JSCompartment, types)); +} + +inline void +TypeCompartment::addPending(JSContext *cx, TypeConstraint *constraint, TypeSet *source, Type type) +{ + do { } while(0); + do { } while(0); + + InferSpew(ISpewOps, "pending: %sC%p%s %s", + InferSpewColor(constraint), constraint, InferSpewColorReset(), + TypeString(type)); + + if ((pendingCount == pendingCapacity) && !growPendingArray(cx)) + return; + + PendingWork &pending = pendingArray[pendingCount++]; + pending.constraint = constraint; + pending.source = source; + pending.type = type; +} + +inline void +TypeCompartment::resolvePending(JSContext *cx) +{ + do { } while(0); + + if (resolving) { + + return; + } + + resolving = true; + + + while (pendingCount) { + const PendingWork &pending = pendingArray[--pendingCount]; + InferSpew(ISpewOps, "resolve: %sC%p%s %s", + InferSpewColor(pending.constraint), pending.constraint, + InferSpewColorReset(), TypeString(pending.type)); + pending.constraint->newType(cx, pending.source, pending.type); + } + + resolving = false; +} +# 828 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" +const unsigned SET_ARRAY_SIZE = 8; + + +static inline unsigned +HashSetCapacity(unsigned count) +{ + do { } while(0); + + if (count <= SET_ARRAY_SIZE) + return SET_ARRAY_SIZE; + + unsigned log2; + do { (log2) = 31 - __builtin_clz(((unsigned int)(count)) | 1); } while (0); + return 1 << (log2 + 2); +} + + +template +static inline uint32_t +HashKey(T v) +{ + uint32_t nv = KEY::keyBits(v); + + uint32_t hash = 84696351 ^ (nv & 0xff); + hash = (hash * 16777619) ^ ((nv >> 8) & 0xff); + hash = (hash * 16777619) ^ ((nv >> 16) & 0xff); + return (hash * 16777619) ^ ((nv >> 24) & 0xff); +} + + + + + +template +static U ** +HashSetInsertTry(JSCompartment *compartment, U **&values, unsigned &count, T key) +{ + unsigned capacity = HashSetCapacity(count); + unsigned insertpos = HashKey(key) & (capacity - 1); + + + bool converting = (count == SET_ARRAY_SIZE); + + if (!converting) { + while (values[insertpos] != __null) { + if (KEY::getKey(values[insertpos]) == key) + return &values[insertpos]; + insertpos = (insertpos + 1) & (capacity - 1); + } + } + + count++; + unsigned newCapacity = HashSetCapacity(count); + + if (newCapacity == capacity) { + do { } while(0); + return &values[insertpos]; + } + + U **newValues = compartment->typeLifoAlloc.newArray(newCapacity); + if (!newValues) + return __null; + PodZero(newValues, newCapacity); + + for (unsigned i = 0; i < capacity; i++) { + if (values[i]) { + unsigned pos = HashKey(KEY::getKey(values[i])) & (newCapacity - 1); + while (newValues[pos] != __null) + pos = (pos + 1) & (newCapacity - 1); + newValues[pos] = values[i]; + } + } + + values = newValues; + + insertpos = HashKey(key) & (newCapacity - 1); + while (values[insertpos] != __null) + insertpos = (insertpos + 1) & (newCapacity - 1); + return &values[insertpos]; +} + + + + + +template +static inline U ** +HashSetInsert(JSCompartment *compartment, U **&values, unsigned &count, T key) +{ + if (count == 0) { + do { } while(0); + count++; + return (U **) &values; + } + + if (count == 1) { + U *oldData = (U*) values; + if (KEY::getKey(oldData) == key) + return (U **) &values; + + values = compartment->typeLifoAlloc.newArray(SET_ARRAY_SIZE); + if (!values) { + values = (U **) oldData; + return __null; + } + PodZero(values, SET_ARRAY_SIZE); + count++; + + values[0] = oldData; + return &values[1]; + } + + if (count <= SET_ARRAY_SIZE) { + for (unsigned i = 0; i < count; i++) { + if (KEY::getKey(values[i]) == key) + return &values[i]; + } + + if (count < SET_ARRAY_SIZE) { + count++; + return &values[count - 1]; + } + } + + return HashSetInsertTry(compartment, values, count, key); +} + + +template +static inline U * +HashSetLookup(U **values, unsigned count, T key) +{ + if (count == 0) + return __null; + + if (count == 1) + return (KEY::getKey((U *) values) == key) ? (U *) values : __null; + + if (count <= SET_ARRAY_SIZE) { + for (unsigned i = 0; i < count; i++) { + if (KEY::getKey(values[i]) == key) + return values[i]; + } + return __null; + } + + unsigned capacity = HashSetCapacity(count); + unsigned pos = HashKey(key) & (capacity - 1); + + while (values[pos] != __null) { + if (KEY::getKey(values[pos]) == key) + return values[pos]; + pos = (pos + 1) & (capacity - 1); + } + + return __null; +} + +inline TypeObjectKey * +Type::objectKey() const +{ + do { } while(0); + if (isTypeObject()) + TypeObject::readBarrier((TypeObject *) data); + else + JSObject::readBarrier((JSObject *) (data ^ 1)); + return (TypeObjectKey *) data; +} + +inline JSObject * +Type::singleObject() const +{ + do { } while(0); + JSObject::readBarrier((JSObject *) (data ^ 1)); + return (JSObject *) (data ^ 1); +} + +inline TypeObject * +Type::typeObject() const +{ + do { } while(0); + TypeObject::readBarrier((TypeObject *) data); + return (TypeObject *) data; +} + +inline bool +TypeSet::hasType(Type type) +{ + if (unknown()) + return true; + + if (type.isUnknown()) { + return false; + } else if (type.isPrimitive()) { + return !!(flags & PrimitiveTypeFlag(type.primitive())); + } else if (type.isAnyObject()) { + return !!(flags & TYPE_FLAG_ANYOBJECT); + } else { + return !!(flags & TYPE_FLAG_ANYOBJECT) || + HashSetLookup + (objectSet, baseObjectCount(), type.objectKey()) != __null; + } +} + +inline void +TypeSet::setBaseObjectCount(uint32_t count) +{ + do { } while(0); + flags = (flags & ~TYPE_FLAG_OBJECT_COUNT_MASK) + | (count << TYPE_FLAG_OBJECT_COUNT_SHIFT); +} + +inline void +TypeSet::clearObjects() +{ + setBaseObjectCount(0); + objectSet = __null; +} + +inline void +TypeSet::addType(JSContext *cx, Type type) +{ + do { } while(0); + + if (unknown()) + return; + + if (type.isUnknown()) { + flags |= TYPE_FLAG_BASE_MASK; + clearObjects(); + do { } while(0); + } else if (type.isPrimitive()) { + TypeFlags flag = PrimitiveTypeFlag(type.primitive()); + if (flags & flag) + return; + + + if (flag == TYPE_FLAG_DOUBLE) + flag |= TYPE_FLAG_INT32; + + flags |= flag; + } else { + if (flags & TYPE_FLAG_ANYOBJECT) + return; + if (type.isAnyObject()) + goto unknownObject; + uint32_t objectCount = baseObjectCount(); + TypeObjectKey *object = type.objectKey(); + TypeObjectKey **pentry = HashSetInsert + (cx->compartment, objectSet, objectCount, object); + if (!pentry) { + cx->compartment->types.setPendingNukeTypes(cx); + return; + } + if (*pentry) + return; + *pentry = object; + + setBaseObjectCount(objectCount); + + if (objectCount == TYPE_FLAG_OBJECT_COUNT_LIMIT) + goto unknownObject; + + if (type.isTypeObject()) { + TypeObject *nobject = type.typeObject(); + do { } while(0); + if (nobject->unknownProperties()) + goto unknownObject; + if (objectCount > 1) { + nobject->contribution += (objectCount - 1) * (objectCount - 1); + if (nobject->contribution >= TypeObject::CONTRIBUTION_LIMIT) { + InferSpew(ISpewOps, "limitUnknown: %sT%p%s", + InferSpewColor(this), this, InferSpewColorReset()); + goto unknownObject; + } + } + } + } + + if (false) { + unknownObject: + type = Type::AnyObjectType(); + flags |= TYPE_FLAG_ANYOBJECT; + clearObjects(); + } + + InferSpew(ISpewOps, "addType: %sT%p%s %s", + InferSpewColor(this), this, InferSpewColorReset(), + TypeString(type)); + + + TypeConstraint *constraint = constraintList; + while (constraint) { + cx->compartment->types.addPending(cx, constraint, this, type); + constraint = constraint->next; + } + + cx->compartment->types.resolvePending(cx); +} + +inline void +TypeSet::setOwnProperty(JSContext *cx, bool configured) +{ + TypeFlags nflags = TYPE_FLAG_OWN_PROPERTY | (configured ? TYPE_FLAG_CONFIGURED_PROPERTY : 0); + + if ((flags & nflags) == nflags) + return; + + flags |= nflags; + + + TypeConstraint *constraint = constraintList; + while (constraint) { + constraint->newPropertyState(cx, this); + constraint = constraint->next; + } +} + +inline unsigned +TypeSet::getObjectCount() +{ + do { } while(0); + uint32_t count = baseObjectCount(); + if (count > SET_ARRAY_SIZE) + return HashSetCapacity(count); + return count; +} + +inline TypeObjectKey * +TypeSet::getObject(unsigned i) +{ + do { } while(0); + if (baseObjectCount() == 1) { + do { } while(0); + return (TypeObjectKey *) objectSet; + } + return objectSet[i]; +} + +inline JSObject * +TypeSet::getSingleObject(unsigned i) +{ + TypeObjectKey *key = getObject(i); + return (uintptr_t(key) & 1) ? (JSObject *)(uintptr_t(key) ^ 1) : __null; +} + +inline TypeObject * +TypeSet::getTypeObject(unsigned i) +{ + TypeObjectKey *key = getObject(i); + return (key && !(uintptr_t(key) & 1)) ? (TypeObject *) key : __null; +} + + + + + +inline +TypeCallsite::TypeCallsite(JSContext *cx, JSScript *script, jsbytecode *pc, + bool isNew, unsigned argumentCount) + : script(script), pc(pc), isNew(isNew), argumentCount(argumentCount), + thisTypes(__null), returnTypes(__null) +{ + + argumentTypes = cx->typeLifoAlloc().newArray(argumentCount); +} + + + + + +inline TypeObject::TypeObject(JSObject *proto, bool function, bool unknown) +{ + PodZero(this); + + + do { } while (0); + + this->proto = proto; + + if (function) + flags |= OBJECT_FLAG_FUNCTION; + if (unknown) + flags |= OBJECT_FLAG_UNKNOWN_MASK; + + InferSpew(ISpewOps, "newObject: %s", TypeObjectString(this)); +} + +inline uint32_t +TypeObject::basePropertyCount() const +{ + return (flags & OBJECT_FLAG_PROPERTY_COUNT_MASK) >> OBJECT_FLAG_PROPERTY_COUNT_SHIFT; +} + +inline void +TypeObject::setBasePropertyCount(uint32_t count) +{ + do { } while(0); + flags = (flags & ~OBJECT_FLAG_PROPERTY_COUNT_MASK) + | (count << OBJECT_FLAG_PROPERTY_COUNT_SHIFT); +} + +inline TypeSet * +TypeObject::getProperty(JSContext *cx, jsid id, bool assign) +{ + do { } while(0); + do { } while(0); + do { } while (0); + do { } while(0); + + uint32_t propertyCount = basePropertyCount(); + Property **pprop = HashSetInsert + (cx->compartment, propertySet, propertyCount, id); + if (!pprop) { + cx->compartment->types.setPendingNukeTypes(cx); + return __null; + } + + if (!*pprop) { + setBasePropertyCount(propertyCount); + if (!addProperty(cx, id, pprop)) { + setBasePropertyCount(0); + propertySet = __null; + return __null; + } + if (propertyCount == OBJECT_FLAG_PROPERTY_COUNT_LIMIT) { + markUnknown(cx); + TypeSet *types = TypeSet::make(cx, "propertyOverflow"); + types->addType(cx, Type::UnknownType()); + return types; + } + } + + TypeSet *types = &(*pprop)->types; + + if (assign) + types->setOwnProperty(cx, false); + + return types; +} + +inline TypeSet * +TypeObject::maybeGetProperty(JSContext *cx, jsid id) +{ + do { } while(0); + do { } while (0); + do { } while(0); + + Property *prop = HashSetLookup + (propertySet, basePropertyCount(), id); + + return prop ? &prop->types : __null; +} + +inline unsigned +TypeObject::getPropertyCount() +{ + uint32_t count = basePropertyCount(); + if (count > SET_ARRAY_SIZE) + return HashSetCapacity(count); + return count; +} + +inline Property * +TypeObject::getProperty(unsigned i) +{ + do { } while(0); + if (basePropertyCount() == 1) { + do { } while(0); + return (Property *) propertySet; + } + return propertySet[i]; +} + +inline void +TypeObject::setFlagsFromKey(JSContext *cx, JSProtoKey key) +{ + TypeObjectFlags flags = 0; + + switch (key) { + case JSProto_Function: + do { } while(0); + + + case JSProto_Object: + flags = OBJECT_FLAG_NON_DENSE_ARRAY + | OBJECT_FLAG_NON_PACKED_ARRAY + | OBJECT_FLAG_NON_TYPED_ARRAY; + break; + + case JSProto_Array: + flags = OBJECT_FLAG_NON_TYPED_ARRAY; + break; + + default: + + do { } while(0) +# 1333 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" + ; + flags = OBJECT_FLAG_NON_DENSE_ARRAY + | OBJECT_FLAG_NON_PACKED_ARRAY; + break; + } + + if (!hasAllFlags(flags)) + setFlags(cx, flags); +} + +inline JSObject * +TypeObject::getGlobal() +{ + if (singleton) + return &singleton->global(); + if (interpretedFunction && interpretedFunction->script()->compileAndGo) + return &interpretedFunction->global(); + return __null; +} + +inline void +TypeObject::writeBarrierPre(TypeObject *type) +{ + + if (!type) + return; + + JSCompartment *comp = type->compartment(); + if (comp->needsBarrier()) { + TypeObject *tmp = type; + MarkTypeObjectUnbarriered(comp->barrierTracer(), &tmp, "write barrier"); + do { } while(0); + } + +} + +inline void +TypeObject::writeBarrierPost(TypeObject *type, void *addr) +{ +} + +inline void +TypeObject::readBarrier(TypeObject *type) +{ + + JSCompartment *comp = type->compartment(); + if (comp->needsBarrier()) { + TypeObject *tmp = type; + MarkTypeObjectUnbarriered(comp->barrierTracer(), &tmp, "read barrier"); + do { } while(0); + } + +} + +inline void +TypeNewScript::writeBarrierPre(TypeNewScript *newScript) +{ + + if (!newScript) + return; + + JSCompartment *comp = newScript->fun->compartment(); + if (comp->needsBarrier()) { + MarkObject(comp->barrierTracer(), &newScript->fun, "write barrier"); + MarkShape(comp->barrierTracer(), &newScript->shape, "write barrier"); + } + +} + +inline void +TypeNewScript::writeBarrierPost(TypeNewScript *newScript, void *addr) +{ +} + +inline +Property::Property(jsid id) + : id(id) +{ +} + +inline +Property::Property(const Property &o) + : id(o.id.get()), types(o.types) +{ +} + +} } + +inline bool +JSScript::ensureHasTypes(JSContext *cx) +{ + return types || makeTypes(cx); +} + +inline bool +JSScript::ensureRanAnalysis(JSContext *cx, JSObject *scope) +{ + JSScript *self = this; + JS::SkipRoot root(cx, &self); + + if (!self->ensureHasTypes(cx)) + return false; + if (!self->types->hasScope()) { + js::RootedObject scopeRoot(cx, scope); + if (!js::types::TypeScript::SetScope(cx, self, scope)) + return false; + scope = scopeRoot; + } + if (!self->hasAnalysis() && !self->makeAnalysis(cx)) + return false; + do { } while(0); + return true; +} + +inline bool +JSScript::ensureRanInference(JSContext *cx) +{ + if (!ensureRanAnalysis(cx, __null)) + return false; + if (!analysis()->ranInference()) { + js::types::AutoEnterTypeInference enter(cx); + analysis()->analyzeTypes(cx); + } + return !analysis()->OOM() && + !cx->compartment->types.pendingNukeTypes; +} + +inline bool +JSScript::hasAnalysis() +{ + return types && types->analysis; +} + +inline js::analyze::ScriptAnalysis * +JSScript::analysis() +{ + do { } while(0); + return types->analysis; +} + +inline void +JSScript::clearAnalysis() +{ + if (types) + types->analysis = __null; +} + +inline void +js::analyze::ScriptAnalysis::addPushedType(JSContext *cx, uint32_t offset, uint32_t which, + js::types::Type type) +{ + js::types::TypeSet *pushed = pushedTypes(offset, which); + pushed->addType(cx, type); +} + +inline js::types::TypeObject * +JSCompartment::getEmptyType(JSContext *cx) +{ + if (!emptyTypeObject) + emptyTypeObject = types.newTypeObject(cx, __null, JSProto_Object, __null, true); + return emptyTypeObject; +} +# 44 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscriptinlines.h" 1 +# 46 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier-inl.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier-inl.h" +#define jsgc_barrier_inl_h___ + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" 1 +# 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier-inl.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String-inl.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String-inl.h" +#define String_inl_h__ + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" 1 +# 13 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String-inl.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" 1 +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String-inl.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgcinlines.h" 1 +# 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String-inl.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 1 +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String-inl.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier-inl.h" 1 +# 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String-inl.h" 2 + +inline void +JSString::writeBarrierPre(JSString *str) +{ + + if (!str) + return; + + JSCompartment *comp = str->compartment(); + if (comp->needsBarrier()) { + JSString *tmp = str; + MarkStringUnbarriered(comp->barrierTracer(), &tmp, "write barrier"); + do { } while(0); + } + +} + +inline void +JSString::writeBarrierPost(JSString *str, void *addr) +{ +} + +inline bool +JSString::needWriteBarrierPre(JSCompartment *comp) +{ + + return comp->needsBarrier(); + + + +} + +inline void +JSString::readBarrier(JSString *str) +{ + + JSCompartment *comp = str->compartment(); + if (comp->needsBarrier()) { + JSString *tmp = str; + MarkStringUnbarriered(comp->barrierTracer(), &tmp, "read barrier"); + do { } while(0); + } + +} + +__attribute__((always_inline)) inline bool +JSString::validateLength(JSContext *cx, size_t length) +{ + if ((__builtin_expect((length > JSString::MAX_LENGTH), 0))) { + js_ReportAllocationOverflow(cx); + return false; + } + + return true; +} + +__attribute__((always_inline)) inline void +JSRope::init(JSString *left, JSString *right, size_t length) +{ + d.lengthAndFlags = buildLengthAndFlags(length, ROPE_BIT); + d.u1.left = left; + d.s.u2.right = right; + JSString::writeBarrierPost(d.u1.left, &d.u1.left); + JSString::writeBarrierPost(d.s.u2.right, &d.s.u2.right); +} + +__attribute__((always_inline)) inline JSRope * +JSRope::new_(JSContext *cx, js::HandleString left, js::HandleString right, size_t length) +{ + if (!validateLength(cx, length)) + return __null; + JSRope *str = (JSRope *)js_NewGCString(cx); + if (!str) + return __null; + str->init(left, right, length); + return str; +} + +inline void +JSRope::markChildren(JSTracer *trc) +{ + js::gc::MarkStringUnbarriered(trc, &d.u1.left, "left child"); + js::gc::MarkStringUnbarriered(trc, &d.s.u2.right, "right child"); +} + +__attribute__((always_inline)) inline void +JSDependentString::init(JSLinearString *base, const jschar *chars, size_t length) +{ + do { } while(0); + d.lengthAndFlags = buildLengthAndFlags(length, DEPENDENT_FLAGS); + d.u1.chars = chars; + d.s.u2.base = base; + JSString::writeBarrierPost(d.s.u2.base, &d.s.u2.base); +} + +__attribute__((always_inline)) inline JSDependentString * +JSDependentString::new_(JSContext *cx, JSLinearString *base_, const jschar *chars, size_t length) +{ + JS::Rooted base(cx, base_); + + + while (base->isDependent()) + base = base->asDependent().base(); + + do { } while(0); + do { } while(0); + do { } while(0); + + + + + + + JS::SkipRoot charsRoot(cx, &chars); + + JSDependentString *str = (JSDependentString *)js_NewGCString(cx); + if (!str) + return __null; + str->init(base, chars, length); + return str; +} + +inline void +JSString::markBase(JSTracer *trc) +{ + do { } while(0); + js::gc::MarkStringUnbarriered(trc, &d.s.u2.base, "base"); +} + +inline js::PropertyName * +JSFlatString::toPropertyName(JSContext *cx) +{ + + + + + if (isAtom()) + return asAtom().asPropertyName(); + JSAtom *atom = js_AtomizeString(cx, this); + if (!atom) + return __null; + return atom->asPropertyName(); +} + +__attribute__((always_inline)) inline void +JSFixedString::init(const jschar *chars, size_t length) +{ + d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS); + d.u1.chars = chars; +} + +__attribute__((always_inline)) inline JSFixedString * +JSFixedString::new_(JSContext *cx, const jschar *chars, size_t length) +{ + do { } while(0); + + if (!validateLength(cx, length)) + return __null; + JSFixedString *str = (JSFixedString *)js_NewGCString(cx); + if (!str) + return __null; + str->init(chars, length); + return str; +} + +__attribute__((always_inline)) inline JSAtom * +JSFixedString::morphAtomizedStringIntoAtom() +{ + d.lengthAndFlags = buildLengthAndFlags(length(), NON_STATIC_ATOM_FLAGS); + return &asAtom(); +} + +__attribute__((always_inline)) inline JSInlineString * +JSInlineString::new_(JSContext *cx) +{ + return (JSInlineString *)js_NewGCString(cx); +} + +__attribute__((always_inline)) inline jschar * +JSInlineString::init(size_t length) +{ + d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS); + d.u1.chars = d.inlineStorage; + do { } while(0); + return d.inlineStorage; +} + +__attribute__((always_inline)) inline void +JSInlineString::resetLength(size_t length) +{ + d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS); + do { } while(0); +} + +__attribute__((always_inline)) inline JSShortString * +JSShortString::new_(JSContext *cx) +{ + return js_NewGCShortString(cx); +} + +__attribute__((always_inline)) inline void +JSShortString::initAtOffsetInBuffer(const jschar *chars, size_t length) +{ + do { } while(0); + do { } while(0); + d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS); + d.u1.chars = chars; +} + +__attribute__((always_inline)) inline void +JSExternalString::init(const jschar *chars, size_t length, const JSStringFinalizer *fin) +{ + do { } while(0); + do { } while(0); + d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS); + d.u1.chars = chars; + d.s.u2.externalFinalizer = fin; +} + +__attribute__((always_inline)) inline JSExternalString * +JSExternalString::new_(JSContext *cx, const jschar *chars, size_t length, + const JSStringFinalizer *fin) +{ + do { } while(0); + + if (!validateLength(cx, length)) + return __null; + JSExternalString *str = js_NewGCExternalString(cx); + if (!str) + return __null; + str->init(chars, length, fin); + cx->runtime->updateMallocCounter(cx, (length + 1) * sizeof(jschar)); + return str; +} + +inline bool +js::StaticStrings::fitsInSmallChar(jschar c) +{ + return c < SMALL_CHAR_LIMIT && toSmallChar[c] != INVALID_SMALL_CHAR; +} + +inline bool +js::StaticStrings::hasUnit(jschar c) +{ + return c < UNIT_STATIC_LIMIT; +} + +inline JSAtom * +js::StaticStrings::getUnit(jschar c) +{ + do { } while(0); + return unitStaticTable[c]; +} + +inline bool +js::StaticStrings::hasUint(uint32_t u) +{ + return u < INT_STATIC_LIMIT; +} + +inline JSAtom * +js::StaticStrings::getUint(uint32_t u) +{ + do { } while(0); + return intStaticTable[u]; +} + +inline bool +js::StaticStrings::hasInt(int32_t i) +{ + return uint32_t(i) < INT_STATIC_LIMIT; +} + +inline JSAtom * +js::StaticStrings::getInt(int32_t i) +{ + do { } while(0); + return getUint(uint32_t(i)); +} + +inline JSLinearString * +js::StaticStrings::getUnitStringForElement(JSContext *cx, JSString *str, size_t index) +{ + do { } while(0); + const jschar *chars = str->getChars(cx); + if (!chars) + return __null; + jschar c = chars[index]; + if (c < UNIT_STATIC_LIMIT) + return getUnit(c); + return js_NewDependentString(cx, str, index, 1); +} + +inline JSAtom * +js::StaticStrings::getLength2(jschar c1, jschar c2) +{ + do { } while(0); + do { } while(0); + size_t index = (((size_t)toSmallChar[c1]) << 6) + toSmallChar[c2]; + return length2StaticTable[index]; +} + +inline JSAtom * +js::StaticStrings::getLength2(uint32_t i) +{ + do { } while(0); + return getLength2('0' + i / 10, '0' + i % 10); +} + + +inline JSAtom * +js::StaticStrings::lookup(const jschar *chars, size_t length) +{ + switch (length) { + case 1: + if (chars[0] < UNIT_STATIC_LIMIT) + return getUnit(chars[0]); + return __null; + case 2: + if (fitsInSmallChar(chars[0]) && fitsInSmallChar(chars[1])) + return getLength2(chars[0], chars[1]); + return __null; + case 3: + + + + + + + typedef int moz_static_assert111[(INT_STATIC_LIMIT <= 999) ? 1 : -1]; + if ('1' <= chars[0] && chars[0] <= '9' && + '0' <= chars[1] && chars[1] <= '9' && + '0' <= chars[2] && chars[2] <= '9') { + int i = (chars[0] - '0') * 100 + + (chars[1] - '0') * 10 + + (chars[2] - '0'); + + if (unsigned(i) < INT_STATIC_LIMIT) + return getInt(i); + } + return __null; + } + + return __null; +} + +__attribute__((always_inline)) inline void +JSString::finalize(js::FreeOp *fop) +{ + + do { } while(0); + + if (isFlat()) + asFlat().finalize(fop); + else + do { } while(0); +} + +inline void +JSFlatString::finalize(js::FreeOp *fop) +{ + do { } while(0); + + + + + + if (chars() != d.inlineStorage) + fop->free_(const_cast(chars())); +} + +inline void +JSShortString::finalize(js::FreeOp *fop) +{ + do { } while(0); +} + +inline void +JSAtom::finalize(js::FreeOp *fop) +{ + do { } while(0); + if (getAllocKind() == js::gc::FINALIZE_STRING) + JSFlatString::finalize(fop); + else + do { } while(0); +} + +inline void +JSExternalString::finalize(js::FreeOp *fop) +{ + const JSStringFinalizer *fin = externalFinalizer(); + fin->finalize(fin, const_cast(chars())); +} + +namespace js { + +static __attribute__((always_inline)) inline JSFixedString * +NewShortString(JSContext *cx, const jschar *chars, size_t length) +{ + SkipRoot skip(cx, &chars); + + + + + + do { } while(0); + JSInlineString *str = JSInlineString::lengthFits(length) + ? JSInlineString::new_(cx) + : JSShortString::new_(cx); + if (!str) + return __null; + + jschar *storage = str->init(length); + PodCopy(storage, chars, length); + storage[length] = 0; + Probes::createString(cx, str, length); + return str; +} + +} +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier-inl.h" 2 + +namespace js { + +inline void +EncapsulatedValue::writeBarrierPre(const Value &value) +{ + + if (value.isMarkable()) { + js::gc::Cell *cell = (js::gc::Cell *)value.toGCThing(); + writeBarrierPre(cell->compartment(), value); + } + +} + +inline void +EncapsulatedValue::writeBarrierPre(JSCompartment *comp, const Value &value) +{ + + if (comp->needsBarrier()) { + Value tmp(value); + js::gc::MarkValueUnbarriered(comp->barrierTracer(), &tmp, "write barrier"); + do { } while(0); + } + +} + +inline void +EncapsulatedValue::pre() +{ + writeBarrierPre(value); +} + +inline void +EncapsulatedValue::pre(JSCompartment *comp) +{ + writeBarrierPre(comp, value); +} + +inline +HeapValue::HeapValue() + : EncapsulatedValue(UndefinedValue()) +{ + post(); +} + +inline +HeapValue::HeapValue(const Value &v) + : EncapsulatedValue(v) +{ + do { } while(0); + post(); +} + +inline +HeapValue::HeapValue(const HeapValue &v) + : EncapsulatedValue(v.value) +{ + do { } while(0); + post(); +} + +inline +HeapValue::~HeapValue() +{ + pre(); +} + +inline void +HeapValue::init(const Value &v) +{ + do { } while(0); + value = v; + post(); +} + +inline void +HeapValue::init(JSCompartment *comp, const Value &v) +{ + do { } while(0); + value = v; + post(comp); +} + +inline HeapValue & +HeapValue::operator=(const Value &v) +{ + pre(); + do { } while(0); + value = v; + post(); + return *this; +} + +inline HeapValue & +HeapValue::operator=(const HeapValue &v) +{ + pre(); + do { } while(0); + value = v.value; + post(); + return *this; +} + +inline void +HeapValue::set(JSCompartment *comp, const Value &v) +{ +# 130 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier-inl.h" + pre(comp); + do { } while(0); + value = v; + post(comp); +} + +inline void +HeapValue::writeBarrierPost(const Value &value, Value *addr) +{ + + +} + +inline void +HeapValue::writeBarrierPost(JSCompartment *comp, const Value &value, Value *addr) +{ + + +} + +inline void +HeapValue::post() +{ + writeBarrierPost(value, &value); +} + +inline void +HeapValue::post(JSCompartment *comp) +{ + writeBarrierPost(comp, value, &value); +} + +inline +RelocatableValue::RelocatableValue() + : EncapsulatedValue(UndefinedValue()) +{ +} + +inline +RelocatableValue::RelocatableValue(const Value &v) + : EncapsulatedValue(v) +{ + do { } while(0); + post(); +} + +inline +RelocatableValue::RelocatableValue(const RelocatableValue &v) + : EncapsulatedValue(v.value) +{ + do { } while(0); + post(); +} + +inline +RelocatableValue::~RelocatableValue() +{ + pre(); + relocate(); +} + +inline RelocatableValue & +RelocatableValue::operator=(const Value &v) +{ + pre(); + do { } while(0); + value = v; + post(); + return *this; +} + +inline RelocatableValue & +RelocatableValue::operator=(const RelocatableValue &v) +{ + pre(); + do { } while(0); + value = v.value; + post(); + return *this; +} + +inline void +RelocatableValue::post() +{ + + +} + +inline void +RelocatableValue::post(JSCompartment *comp) +{ + + +} + +inline void +RelocatableValue::relocate() +{ + + +} + +inline +HeapSlot::HeapSlot(JSObject *obj, uint32_t slot, const Value &v) + : EncapsulatedValue(v) +{ + do { } while(0); + post(obj, slot); +} + +inline +HeapSlot::HeapSlot(JSObject *obj, uint32_t slot, const HeapSlot &s) + : EncapsulatedValue(s.value) +{ + do { } while(0); + post(obj, slot); +} + +inline +HeapSlot::~HeapSlot() +{ + pre(); +} + +inline void +HeapSlot::init(JSObject *obj, uint32_t slot, const Value &v) +{ + value = v; + post(obj, slot); +} + +inline void +HeapSlot::init(JSCompartment *comp, JSObject *obj, uint32_t slot, const Value &v) +{ + value = v; + post(comp, obj, slot); +} + +inline void +HeapSlot::set(JSObject *obj, uint32_t slot, const Value &v) +{ + do { } while (0); + do { } while (0); + + pre(); + do { } while(0); + value = v; + post(obj, slot); +} + +inline void +HeapSlot::set(JSCompartment *comp, JSObject *obj, uint32_t slot, const Value &v) +{ + do { } while (0); + do { } while (0); + do { } while(0); + + pre(comp); + do { } while(0); + value = v; + post(comp, obj, slot); +} + +inline void +HeapSlot::writeBarrierPost(JSObject *obj, uint32_t slot) +{ +} + +inline void +HeapSlot::writeBarrierPost(JSCompartment *comp, JSObject *obj, uint32_t slotno) +{ +} + +inline void +HeapSlot::post(JSObject *owner, uint32_t slot) +{ + HeapSlot::writeBarrierPost(owner, slot); +} + +inline void +HeapSlot::post(JSCompartment *comp, JSObject *owner, uint32_t slot) +{ + HeapSlot::writeBarrierPost(comp, owner, slot); +} + +inline void +EncapsulatedId::pre() +{ + + if (JSID_IS_OBJECT(value)) { + JSObject *obj = JSID_TO_OBJECT(value); + JSCompartment *comp = obj->compartment(); + if (comp->needsBarrier()) { + js::gc::MarkObjectUnbarriered(comp->barrierTracer(), &obj, "write barrier"); + do { } while(0); + } + } else if (JSID_IS_STRING(value)) { + JSString *str = JSID_TO_STRING(value); + JSCompartment *comp = str->compartment(); + if (comp->needsBarrier()) { + js::gc::MarkStringUnbarriered(comp->barrierTracer(), &str, "write barrier"); + do { } while(0); + } + } + +} + +inline +RelocatableId::~RelocatableId() +{ + pre(); +} + +inline RelocatableId & +RelocatableId::operator=(jsid id) +{ + if (id != value) + pre(); + do { } while(0); + value = id; + return *this; +} + +inline RelocatableId & +RelocatableId::operator=(const RelocatableId &v) +{ + if (v.value != value) + pre(); + do { } while(0); + value = v.value; + return *this; +} + +inline +HeapId::HeapId(jsid id) + : EncapsulatedId(id) +{ + do { } while(0); + post(); +} + +inline +HeapId::~HeapId() +{ + pre(); +} + +inline void +HeapId::init(jsid id) +{ + do { } while(0); + value = id; + post(); +} + +inline void +HeapId::post() +{ +} + +inline HeapId & +HeapId::operator=(jsid id) +{ + if (id != value) + pre(); + do { } while(0); + value = id; + post(); + return *this; +} + +inline HeapId & +HeapId::operator=(const HeapId &v) +{ + if (v.value != value) + pre(); + do { } while(0); + value = v.value; + post(); + return *this; +} + +inline const Value & +ReadBarrieredValue::get() const +{ + if (value.isObject()) + JSObject::readBarrier(&value.toObject()); + else if (value.isString()) + JSString::readBarrier(value.toString()); + else + do { } while(0); + + return value; +} + +inline +ReadBarrieredValue::operator const Value &() const +{ + return get(); +} + +inline JSObject & +ReadBarrieredValue::toObject() const +{ + return get().toObject(); +} + +} +# 48 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics-inl.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics-inl.h" +#define RegExpStatics_inl_h__ + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics.h" 1 +# 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics-inl.h" 2 + + + +namespace js { + +inline js::RegExpStatics * +js::GlobalObject::getRegExpStatics() const +{ + JSObject &resObj = getSlot(REGEXP_STATICS).toObject(); + return static_cast(resObj.getPrivate()); +} + +inline size_t +SizeOfRegExpStaticsData(const JSObject *obj, JSMallocSizeOfFun mallocSizeOf) +{ + return mallocSizeOf(obj->getPrivate()); +} + +inline +RegExpStatics::RegExpStatics() + : bufferLink(__null), + copied(false) +{ + clear(); +} + +inline bool +RegExpStatics::createDependent(JSContext *cx, size_t start, size_t end, Value *out) const +{ + do { } while(0); + do { } while(0); + JSString *str = js_NewDependentString(cx, matchPairsInput, start, end - start); + if (!str) + return false; + *out = StringValue(str); + return true; +} + +inline bool +RegExpStatics::createPendingInput(JSContext *cx, Value *out) const +{ + out->setString(pendingInput ? pendingInput.get() : cx->runtime->emptyString); + return true; +} + +inline bool +RegExpStatics::makeMatch(JSContext *cx, size_t checkValidIndex, size_t pairNum, Value *out) const +{ + if (checkValidIndex / 2 >= pairCount() || matchPairs[checkValidIndex] < 0) { + out->setString(cx->runtime->emptyString); + return true; + } + return createDependent(cx, get(pairNum, 0), get(pairNum, 1), out); +} + +inline bool +RegExpStatics::createLastParen(JSContext *cx, Value *out) const +{ + if (pairCount() <= 1) { + out->setString(cx->runtime->emptyString); + return true; + } + size_t num = pairCount() - 1; + int start = get(num, 0); + int end = get(num, 1); + if (start == -1) { + out->setString(cx->runtime->emptyString); + return true; + } + do { } while(0); + do { } while(0); + return createDependent(cx, start, end, out); +} + +inline bool +RegExpStatics::createLeftContext(JSContext *cx, Value *out) const +{ + if (!pairCount()) { + out->setString(cx->runtime->emptyString); + return true; + } + if (matchPairs[0] < 0) { + *out = UndefinedValue(); + return true; + } + return createDependent(cx, 0, matchPairs[0], out); +} + +inline bool +RegExpStatics::createRightContext(JSContext *cx, Value *out) const +{ + if (!pairCount()) { + out->setString(cx->runtime->emptyString); + return true; + } + if (matchPairs[1] < 0) { + *out = UndefinedValue(); + return true; + } + return createDependent(cx, matchPairs[1], matchPairsInput->length(), out); +} + +inline void +RegExpStatics::getParen(size_t pairNum, JSSubString *out) const +{ + checkParenNum(pairNum); + if (!pairIsPresent(pairNum)) { + *out = js_EmptySubString; + return; + } + out->chars = matchPairsInput->chars() + get(pairNum, 0); + out->length = getParenLength(pairNum); +} + +inline void +RegExpStatics::getLastMatch(JSSubString *out) const +{ + if (!pairCount()) { + *out = js_EmptySubString; + return; + } + do { } while(0); + out->chars = matchPairsInput->chars() + get(0, 0); + do { } while(0); + out->length = get(0, 1) - get(0, 0); +} + +inline void +RegExpStatics::getLastParen(JSSubString *out) const +{ + size_t pc = pairCount(); + + if (pc <= 1) { + *out = js_EmptySubString; + return; + } + getParen(pc - 1, out); +} + +inline void +RegExpStatics::getLeftContext(JSSubString *out) const +{ + if (!pairCount()) { + *out = js_EmptySubString; + return; + } + out->chars = matchPairsInput->chars(); + out->length = get(0, 0); +} + +inline void +RegExpStatics::getRightContext(JSSubString *out) const +{ + if (!pairCount()) { + *out = js_EmptySubString; + return; + } + out->chars = matchPairsInput->chars() + get(0, 1); + do { } while(0); + out->length = matchPairsInput->length() - get(0, 1); +} + +inline void +RegExpStatics::copyTo(RegExpStatics &dst) +{ + dst.matchPairs.clear(); + + dst.matchPairs.infallibleAppend(matchPairs); + dst.matchPairsInput = matchPairsInput; + dst.pendingInput = pendingInput; + dst.flags = flags; +} + +inline void +RegExpStatics::aboutToWrite() +{ + if (bufferLink && !bufferLink->copied) { + copyTo(*bufferLink); + bufferLink->copied = true; + } +} + +inline void +RegExpStatics::restore() +{ + if (bufferLink->copied) + bufferLink->copyTo(*this); + bufferLink = bufferLink->bufferLink; +} + +inline bool +RegExpStatics::updateFromMatchPairs(JSContext *cx, JSLinearString *input, MatchPairs *newPairs) +{ + do { } while(0); + aboutToWrite(); + BarrieredSetPair(cx->compartment, + pendingInput, input, + matchPairsInput, input); + + if (!matchPairs.resizeUninitialized(2 * newPairs->pairCount())) { + js_ReportOutOfMemory(cx); + return false; + } + + for (size_t i = 0; i < newPairs->pairCount(); ++i) { + matchPairs[2 * i] = newPairs->pair(i).start; + matchPairs[2 * i + 1] = newPairs->pair(i).limit; + } + + return true; +} + +inline void +RegExpStatics::clear() +{ + aboutToWrite(); + flags = RegExpFlag(0); + pendingInput = __null; + matchPairsInput = __null; + matchPairs.clear(); +} + +inline void +RegExpStatics::setPendingInput(JSString *newInput) +{ + aboutToWrite(); + pendingInput = newInput; +} + +PreserveRegExpStatics::~PreserveRegExpStatics() +{ + original->restore(); +} + +inline void +RegExpStatics::setMultiline(JSContext *cx, bool enabled) +{ + aboutToWrite(); + if (enabled) { + flags = RegExpFlag(flags | MultilineFlag); + markFlagsSet(cx); + } else { + flags = RegExpFlag(flags & ~MultilineFlag); + } +} + +inline void +RegExpStatics::markFlagsSet(JSContext *cx) +{ +# 269 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics-inl.h" + GlobalObject *global = GetGlobalForScopeChain(cx); + do { } while(0); + + types::MarkTypeObjectFlags(cx, global, types::OBJECT_FLAG_REGEXP_FLAGS_SET); +} + +inline void +RegExpStatics::reset(JSContext *cx, JSString *newInput, bool newMultiline) +{ + aboutToWrite(); + clear(); + pendingInput = newInput; + setMultiline(cx, newMultiline); + checkInvariants(); +} + +} + +inline js::RegExpStatics * +JSContext::regExpStatics() +{ + return js::GetGlobalForScopeChain(this)->getRegExpStatics(); +} +# 51 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String-inl.h" 1 +# 52 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + +inline bool +JSObject::enumerate(JSContext *cx, JSIterateOp iterop, js::Value *statep, jsid *idp) +{ + JSNewEnumerateOp op = getOps()->enumerate; + return (op ? op : JS_EnumerateState)(cx, js::RootedObject(cx, this), iterop, statep, idp); +} + +inline bool +JSObject::defaultValue(JSContext *cx, JSType hint, js::Value *vp) +{ + js::RootedObject self(cx, this); + + JSConvertOp op = getClass()->convert; + bool ok; + if (op == JS_ConvertStub) + ok = js::DefaultValue(cx, self, hint, vp); + else + ok = op(cx, self, hint, vp); + do { } while (0); + return ok; +} + +inline JSType +JSObject::typeOf(JSContext *cx) +{ + js::TypeOfOp op = getOps()->typeOf; + return (op ? op : js::baseops::TypeOf)(cx, js::RootedObject(cx, this)); +} + +inline JSObject * +JSObject::thisObject(JSContext *cx) +{ + JSObjectOp op = getOps()->thisObject; + return op ? op(cx, js::RootedObject(cx, this)) : this; +} + +inline JSBool +JSObject::setGeneric(JSContext *cx, js::HandleId id, js::Value *vp, JSBool strict) +{ + if (getOps()->setGeneric) + return nonNativeSetProperty(cx, id, vp, strict); + return js::baseops::SetPropertyHelper(cx, + js::RootedObject(cx, this), + id, 0, vp, strict); +} + +inline JSBool +JSObject::setProperty(JSContext *cx, js::PropertyName *name, js::Value *vp, JSBool strict) +{ + return setGeneric(cx, js::RootedId(cx, js::NameToId(name)), vp, strict); +} + +inline JSBool +JSObject::setElement(JSContext *cx, uint32_t index, js::Value *vp, JSBool strict) +{ + if (getOps()->setElement) + return nonNativeSetElement(cx, index, vp, strict); + return js::baseops::SetElementHelper(cx, js::RootedObject(cx, this), index, 0, vp, strict); +} + +inline JSBool +JSObject::setSpecial(JSContext *cx, js::SpecialId sid, js::Value *vp, JSBool strict) +{ + return setGeneric(cx, js::RootedId(cx, SPECIALID_TO_JSID(sid)), vp, strict); +} + +inline JSBool +JSObject::setGenericAttributes(JSContext *cx, js::HandleId id, unsigned *attrsp) +{ + js::types::MarkTypePropertyConfigured(cx, this, id); + js::GenericAttributesOp op = getOps()->setGenericAttributes; + return (op ? op : js::baseops::SetAttributes)(cx, js::RootedObject(cx, this), id, attrsp); +} + +inline JSBool +JSObject::setPropertyAttributes(JSContext *cx, js::PropertyName *name, unsigned *attrsp) +{ + return setGenericAttributes(cx, js::RootedId(cx, js::NameToId(name)), attrsp); +} + +inline JSBool +JSObject::setElementAttributes(JSContext *cx, uint32_t index, unsigned *attrsp) +{ + js::ElementAttributesOp op = getOps()->setElementAttributes; + return (op ? op : js::baseops::SetElementAttributes)(cx, js::RootedObject(cx, this), index, attrsp); +} + +inline JSBool +JSObject::setSpecialAttributes(JSContext *cx, js::SpecialId sid, unsigned *attrsp) +{ + return setGenericAttributes(cx, js::RootedId(cx, SPECIALID_TO_JSID(sid)), attrsp); +} + +inline bool +JSObject::changePropertyAttributes(JSContext *cx, js::Shape *shape, unsigned attrs) +{ + return !!changeProperty(cx, shape, attrs, 0, shape->getter(), shape->setter()); +} + +inline JSBool +JSObject::getGeneric(JSContext *cx, js::HandleObject receiver, js::HandleId id, js::Value *vp) +{ + js::RootedObject self(cx, this); + + js::GenericIdOp op = getOps()->getGeneric; + if (op) { + if (!op(cx, self, receiver, id, vp)) + return false; + } else { + if (!js::baseops::GetProperty(cx, self, receiver, id, vp)) + return false; + } + return true; +} + +inline JSBool +JSObject::getProperty(JSContext *cx, js::HandleObject receiver, js::PropertyName *name, js::Value *vp) +{ + return getGeneric(cx, receiver, js::RootedId(cx, js::NameToId(name)), vp); +} + +inline JSBool +JSObject::getGeneric(JSContext *cx, js::HandleId id, js::Value *vp) +{ + return getGeneric(cx, js::RootedObject(cx, this), id, vp); +} + +inline JSBool +JSObject::getProperty(JSContext *cx, js::PropertyName *name, js::Value *vp) +{ + return getGeneric(cx, js::RootedId(cx, js::NameToId(name)), vp); +} + +inline bool +JSObject::deleteProperty(JSContext *cx, js::HandlePropertyName name, js::Value *rval, bool strict) +{ + jsid id = js::NameToId(name); + js::types::AddTypePropertyId(cx, this, id, js::types::Type::UndefinedType()); + js::types::MarkTypePropertyConfigured(cx, this, id); + js::DeletePropertyOp op = getOps()->deleteProperty; + return (op ? op : js::baseops::DeleteProperty)(cx, js::RootedObject(cx, this), name, rval, strict); +} + +inline bool +JSObject::deleteElement(JSContext *cx, uint32_t index, js::Value *rval, bool strict) +{ + js::RootedObject self(cx, this); + + jsid id; + if (!js::IndexToId(cx, index, &id)) + return false; + js::types::AddTypePropertyId(cx, self, id, js::types::Type::UndefinedType()); + js::types::MarkTypePropertyConfigured(cx, self, id); + js::DeleteElementOp op = self->getOps()->deleteElement; + return (op ? op : js::baseops::DeleteElement)(cx, self, index, rval, strict); +} + +inline bool +JSObject::deleteSpecial(JSContext *cx, js::HandleSpecialId sid, js::Value *rval, bool strict) +{ + jsid id = SPECIALID_TO_JSID(sid); + js::types::AddTypePropertyId(cx, this, id, js::types::Type::UndefinedType()); + js::types::MarkTypePropertyConfigured(cx, this, id); + js::DeleteSpecialOp op = getOps()->deleteSpecial; + return (op ? op : js::baseops::DeleteSpecial)(cx, js::RootedObject(cx, this), sid, rval, strict); +} + +inline void +JSObject::finalize(js::FreeOp *fop) +{ + js::Probes::finalizeObject(this); + + if (!fop->onBackgroundThread()) { + + + + + + js::Class *clasp = getClass(); + if (clasp->finalize) + clasp->finalize(fop, this); + } + + finish(fop); +} + +inline JSObject * +JSObject::getParent() const +{ + return lastProperty()->getObjectParent(); +} + +inline JSObject * +JSObject::enclosingScope() +{ + return isScope() + ? &asScope().enclosingScope() + : isDebugScope() + ? &asDebugScope().enclosingScope() + : getParent(); +} + +inline bool +JSObject::isFixedSlot(size_t slot) +{ + do { } while(0); + return slot < numFixedSlots(); +} + +inline size_t +JSObject::dynamicSlotIndex(size_t slot) +{ + do { } while(0); + return slot - numFixedSlots(); +} + +inline void +JSObject::setLastPropertyInfallible(const js::Shape *shape) +{ + do { } while(0); + do { } while(0); + do { } while(0); + do { } while(0); + do { } while(0); + + shape_ = const_cast(shape); +} + +inline void +JSObject::removeLastProperty(JSContext *cx) +{ + do { } while(0); + ((void)(setLastProperty(cx, lastProperty()->previous()))); +} + +inline bool +JSObject::canRemoveLastProperty() +{ + + + + + + + + do { } while(0); + const js::Shape *previous = lastProperty()->previous(); + return previous->getObjectParent() == lastProperty()->getObjectParent() + && previous->getObjectFlags() == lastProperty()->getObjectFlags(); +} + +inline const js::HeapSlot * +JSObject::getRawSlots() +{ + do { } while(0); + return slots; +} + +inline const js::Value & +JSObject::getReservedSlot(unsigned index) const +{ + do { } while(0); + return getSlot(index); +} + +inline js::HeapSlot & +JSObject::getReservedSlotRef(unsigned index) +{ + do { } while(0); + return getSlotRef(index); +} + +inline void +JSObject::setReservedSlot(unsigned index, const js::Value &v) +{ + do { } while(0); + setSlot(index, v); +} + +inline void +JSObject::initReservedSlot(unsigned index, const js::Value &v) +{ + do { } while(0); + initSlot(index, v); +} + +inline void +JSObject::prepareSlotRangeForOverwrite(size_t start, size_t end) +{ + for (size_t i = start; i < end; i++) + getSlotAddressUnchecked(i)->js::HeapSlot::~HeapSlot(); +} + +inline void +JSObject::prepareElementRangeForOverwrite(size_t start, size_t end) +{ + do { } while(0); + do { } while(0); + for (size_t i = start; i < end; i++) + elements[i].js::HeapSlot::~HeapSlot(); +} + +inline uint32_t +JSObject::getArrayLength() const +{ + do { } while(0); + return getElementsHeader()->length; +} + +inline void +JSObject::setArrayLength(JSContext *cx, uint32_t length) +{ + do { } while(0); + + if (length > (2147483647)) { + + + + + js::types::MarkTypeObjectFlags(cx, this, + js::types::OBJECT_FLAG_NON_PACKED_ARRAY | + js::types::OBJECT_FLAG_NON_DENSE_ARRAY); + jsid lengthId = js::NameToId(cx->runtime->atomState.lengthAtom); + js::types::AddTypePropertyId(cx, this, lengthId, + js::types::Type::DoubleType()); + } + + getElementsHeader()->length = length; +} + +inline void +JSObject::setDenseArrayLength(uint32_t length) +{ + + do { } while(0); + do { } while(0); + getElementsHeader()->length = length; +} + +inline void +JSObject::setDenseArrayInitializedLength(uint32_t length) +{ + do { } while(0); + do { } while(0); + prepareElementRangeForOverwrite(length, getElementsHeader()->initializedLength); + getElementsHeader()->initializedLength = length; +} + +inline uint32_t +JSObject::getDenseArrayCapacity() +{ + do { } while(0); + return getElementsHeader()->capacity; +} + +inline bool +JSObject::ensureElements(JSContext *cx, uint32_t capacity) +{ + if (capacity > getDenseArrayCapacity()) + return growElements(cx, capacity); + return true; +} + +inline void +JSObject::setDenseArrayElement(unsigned idx, const js::Value &val) +{ + do { } while(0); + elements[idx].set(this, idx, val); +} + +inline void +JSObject::initDenseArrayElement(unsigned idx, const js::Value &val) +{ + do { } while(0); + elements[idx].init(this, idx, val); +} + +inline void +JSObject::setDenseArrayElementWithType(JSContext *cx, unsigned idx, const js::Value &val) +{ + js::types::AddTypePropertyId(cx, this, ((jsid)0x2), val); + setDenseArrayElement(idx, val); +} + +inline void +JSObject::initDenseArrayElementWithType(JSContext *cx, unsigned idx, const js::Value &val) +{ + js::types::AddTypePropertyId(cx, this, ((jsid)0x2), val); + initDenseArrayElement(idx, val); +} + +inline void +JSObject::copyDenseArrayElements(unsigned dstStart, const js::Value *src, unsigned count) +{ + do { } while(0); + JSCompartment *comp = compartment(); + for (unsigned i = 0; i < count; ++i) + elements[dstStart + i].set(comp, this, dstStart + i, src[i]); +} + +inline void +JSObject::initDenseArrayElements(unsigned dstStart, const js::Value *src, unsigned count) +{ + do { } while(0); + JSCompartment *comp = compartment(); + for (unsigned i = 0; i < count; ++i) + elements[dstStart + i].init(comp, this, dstStart + i, src[i]); +} + +inline void +JSObject::moveDenseArrayElements(unsigned dstStart, unsigned srcStart, unsigned count) +{ + do { } while(0); + do { } while(0); +# 480 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" + JSCompartment *comp = compartment(); + if (comp->needsBarrier()) { + if (dstStart < srcStart) { + js::HeapSlot *dst = elements + dstStart; + js::HeapSlot *src = elements + srcStart; + for (unsigned i = 0; i < count; i++, dst++, src++) + dst->set(comp, this, dst - elements, *src); + } else { + js::HeapSlot *dst = elements + dstStart + count - 1; + js::HeapSlot *src = elements + srcStart + count - 1; + for (unsigned i = 0; i < count; i++, dst--, src--) + dst->set(comp, this, dst - elements, *src); + } + } else { + memmove(elements + dstStart, elements + srcStart, count * sizeof(js::HeapSlot)); + SlotRangeWriteBarrierPost(comp, this, dstStart, count); + } +} + +inline void +JSObject::moveDenseArrayElementsUnbarriered(unsigned dstStart, unsigned srcStart, unsigned count) +{ + do { } while(0); + + do { } while(0); + do { } while(0); + + memmove(elements + dstStart, elements + srcStart, count * sizeof(js::Value)); +} + +inline bool +JSObject::denseArrayHasInlineSlots() const +{ + do { } while(0); + return elements == fixedElements(); +} + +namespace js { + + + + + +static inline JSAtom * +CallObjectLambdaName(JSFunction *fun) +{ + return (fun->flags & 0x08) ? fun->atom.get() : __null; +} + +} + +inline const js::Value & +JSObject::getDateUTCTime() const +{ + do { } while(0); + return getFixedSlot(JSSLOT_DATE_UTC_TIME); +} + +inline void +JSObject::setDateUTCTime(const js::Value &time) +{ + do { } while(0); + setFixedSlot(JSSLOT_DATE_UTC_TIME, time); +} + +inline js::NativeIterator * +JSObject::getNativeIterator() const +{ + return (js::NativeIterator *) getPrivate(); +} + +inline void +JSObject::setNativeIterator(js::NativeIterator *ni) +{ + setPrivate(ni); +} + + + +inline JSLinearString * +JSObject::getNamePrefix() const +{ + do { } while(0); + const js::Value &v = getSlot(JSSLOT_NAME_PREFIX); + return !v.isUndefined() ? &v.toString()->asLinear() : __null; +} + +inline jsval +JSObject::getNamePrefixVal() const +{ + do { } while(0); + return getSlot(JSSLOT_NAME_PREFIX); +} + +inline void +JSObject::setNamePrefix(JSLinearString *prefix) +{ + do { } while(0); + setSlot(JSSLOT_NAME_PREFIX, prefix ? js::StringValue(prefix) : js::UndefinedValue()); +} + +inline void +JSObject::clearNamePrefix() +{ + do { } while(0); + setSlot(JSSLOT_NAME_PREFIX, js::UndefinedValue()); +} + +inline JSLinearString * +JSObject::getNameURI() const +{ + do { } while(0); + const js::Value &v = getSlot(JSSLOT_NAME_URI); + return !v.isUndefined() ? &v.toString()->asLinear() : __null; +} + +inline jsval +JSObject::getNameURIVal() const +{ + do { } while(0); + return getSlot(JSSLOT_NAME_URI); +} + +inline void +JSObject::setNameURI(JSLinearString *uri) +{ + do { } while(0); + setSlot(JSSLOT_NAME_URI, uri ? js::StringValue(uri) : js::UndefinedValue()); +} + +inline jsval +JSObject::getNamespaceDeclared() const +{ + do { } while(0); + return getSlot(JSSLOT_NAMESPACE_DECLARED); +} + +inline void +JSObject::setNamespaceDeclared(jsval decl) +{ + do { } while(0); + setSlot(JSSLOT_NAMESPACE_DECLARED, decl); +} + +inline JSAtom * +JSObject::getQNameLocalName() const +{ + do { } while(0); + const js::Value &v = getSlot(JSSLOT_QNAME_LOCAL_NAME); + return !v.isUndefined() ? &v.toString()->asAtom() : __null; +} + +inline jsval +JSObject::getQNameLocalNameVal() const +{ + do { } while(0); + return getSlot(JSSLOT_QNAME_LOCAL_NAME); +} + +inline void +JSObject::setQNameLocalName(JSAtom *name) +{ + do { } while(0); + setSlot(JSSLOT_QNAME_LOCAL_NAME, name ? js::StringValue(name) : js::UndefinedValue()); +} + + + +inline bool +JSObject::setSingletonType(JSContext *cx) +{ + if (!cx->typeInferenceEnabled()) + return true; + + do { } while(0); + do { } while (0); + + js::types::TypeObject *type = cx->compartment->getLazyType(cx, getProto()); + if (!type) + return false; + + type_ = type; + return true; +} + +inline js::types::TypeObject * +JSObject::getType(JSContext *cx) +{ + if (hasLazyType()) + makeLazyType(cx); + return type_; +} + +inline bool +JSObject::clearType(JSContext *cx) +{ + do { } while(0); + + js::types::TypeObject *type = cx->compartment->getEmptyType(cx); + if (!type) + return false; + + type_ = type; + return true; +} + +inline void +JSObject::setType(js::types::TypeObject *newType) +{ + + + + + + do { } while (0) + ; + do { } while(0); + type_ = newType; +} + +inline bool JSObject::setIteratedSingleton(JSContext *cx) +{ + return setFlag(cx, js::BaseShape::ITERATED_SINGLETON); +} + +inline bool JSObject::isSystem() const +{ + return lastProperty()->hasObjectFlag(js::BaseShape::SYSTEM); +} + +inline bool JSObject::setSystem(JSContext *cx) +{ + return setFlag(cx, js::BaseShape::SYSTEM); +} + +inline bool JSObject::setDelegate(JSContext *cx) +{ + return setFlag(cx, js::BaseShape::DELEGATE, GENERATE_SHAPE); +} + +inline bool JSObject::isVarObj() +{ + if (isDebugScope()) + return asDebugScope().scope().isVarObj(); + return lastProperty()->hasObjectFlag(js::BaseShape::VAROBJ); +} + +inline bool JSObject::setVarObj(JSContext *cx) +{ + return setFlag(cx, js::BaseShape::VAROBJ); +} + +inline bool JSObject::setWatched(JSContext *cx) +{ + return setFlag(cx, js::BaseShape::WATCHED, GENERATE_SHAPE); +} + +inline bool JSObject::hasUncacheableProto() const +{ + return lastProperty()->hasObjectFlag(js::BaseShape::UNCACHEABLE_PROTO); +} + +inline bool JSObject::setUncacheableProto(JSContext *cx) +{ + return setFlag(cx, js::BaseShape::UNCACHEABLE_PROTO, GENERATE_SHAPE); +} + +inline bool JSObject::isBoundFunction() const +{ + return lastProperty()->hasObjectFlag(js::BaseShape::BOUND_FUNCTION); +} + +inline bool JSObject::isIndexed() const +{ + return lastProperty()->hasObjectFlag(js::BaseShape::INDEXED); +} + +inline bool JSObject::watched() const +{ + return lastProperty()->hasObjectFlag(js::BaseShape::WATCHED); +} + +inline bool JSObject::hasSpecialEquality() const +{ + return !!getClass()->ext.equality; +} + +inline bool JSObject::isArguments() const { return isNormalArguments() || isStrictArguments(); } +inline bool JSObject::isArrayBuffer() const { return hasClass(&js::ArrayBufferClass); } +inline bool JSObject::isBlock() const { return hasClass(&js::BlockClass); } +inline bool JSObject::isBoolean() const { return hasClass(&js::BooleanClass); } +inline bool JSObject::isCall() const { return hasClass(&js::CallClass); } +inline bool JSObject::isClonedBlock() const { return isBlock() && !!getProto(); } +inline bool JSObject::isDataView() const { return hasClass(&js::DataViewClass); } +inline bool JSObject::isDate() const { return hasClass(&js::DateClass); } +inline bool JSObject::isDeclEnv() const { return hasClass(&js::DeclEnvClass); } +inline bool JSObject::isElementIterator() const { return hasClass(&js::ElementIteratorClass); } +inline bool JSObject::isError() const { return hasClass(&js::ErrorClass); } +inline bool JSObject::isFunction() const { return hasClass(&js::FunctionClass); } +inline bool JSObject::isFunctionProxy() const { return hasClass(&js::FunctionProxyClass); } +inline bool JSObject::isGenerator() const { return hasClass(&js::GeneratorClass); } +inline bool JSObject::isIterator() const { return hasClass(&js::IteratorClass); } +inline bool JSObject::isNestedScope() const { return isBlock() || isWith(); } +inline bool JSObject::isNormalArguments() const { return hasClass(&js::NormalArgumentsObjectClass); } +inline bool JSObject::isNumber() const { return hasClass(&js::NumberClass); } +inline bool JSObject::isObject() const { return hasClass(&js::ObjectClass); } +inline bool JSObject::isPrimitive() const { return isNumber() || isString() || isBoolean(); } +inline bool JSObject::isRegExp() const { return hasClass(&js::RegExpClass); } +inline bool JSObject::isRegExpStatics() const { return hasClass(&js::RegExpStaticsClass); } +inline bool JSObject::isScope() const { return isCall() || isDeclEnv() || isNestedScope(); } +inline bool JSObject::isStaticBlock() const { return isBlock() && !getProto(); } +inline bool JSObject::isStopIteration() const { return hasClass(&js::StopIterationClass); } +inline bool JSObject::isStrictArguments() const { return hasClass(&js::StrictArgumentsObjectClass); } +inline bool JSObject::isString() const { return hasClass(&js::StringClass); } +inline bool JSObject::isTypedArray() const { return IsTypedArrayClass(getClass()); } +inline bool JSObject::isWeakMap() const { return hasClass(&js::WeakMapClass); } +inline bool JSObject::isWith() const { return hasClass(&js::WithClass); } + +inline bool +JSObject::isDebugScope() const +{ + extern bool js_IsDebugScopeSlow(const JSObject *obj); + return getClass() == &js::ObjectProxyClass && js_IsDebugScopeSlow(this); +} + + +inline bool JSObject::isNamespace() const { return hasClass(&js::NamespaceClass); } +inline bool JSObject::isXML() const { return hasClass(&js::XMLClass); } + +inline bool +JSObject::isXMLId() const +{ + return hasClass(&js::QNameClass) + || hasClass(&js::AttributeNameClass) + || hasClass(&js::AnyNameClass); +} + +inline bool +JSObject::isQName() const +{ + return hasClass(&js::QNameClass) + || hasClass(&js::AttributeNameClass) + || hasClass(&js::AnyNameClass); +} + + + inline JSObject * +JSObject::create(JSContext *cx, js::gc::AllocKind kind, + js::HandleShape shape, js::HandleTypeObject type, js::HeapSlot *slots) +{ + + + + + + do { } while(0); + do { } while(0); + do { } while(0); + + JSObject *obj = js_NewGCObject(cx, kind); + if (!obj) + return __null; + + obj->shape_.init(shape); + obj->type_.init(type); + obj->slots = slots; + obj->elements = js::emptyObjectElements; + + const js::Class *clasp = shape->getObjectClass(); + if (clasp->hasPrivate()) + obj->privateRef(shape->numFixedSlots()) = __null; + + size_t span = shape->slotSpan(); + if (span && clasp != &js::ArrayBufferClass) + obj->initializeSlotRange(0, span); + + return obj; +} + + inline JSObject * +JSObject::createDenseArray(JSContext *cx, js::gc::AllocKind kind, + js::HandleShape shape, js::HandleTypeObject type, + uint32_t length) +{ + do { } while(0); + do { } while(0); + + + + + + do { } while(0); + + + + + + do { } while(0); + + uint32_t capacity = js::gc::GetGCKindSlots(kind) - js::ObjectElements::VALUES_PER_HEADER; + + JSObject *obj = js_NewGCObject(cx, kind); + if (!obj) { + js_ReportOutOfMemory(cx); + return __null; + } + + obj->shape_.init(shape); + obj->type_.init(type); + obj->slots = __null; + obj->setFixedElements(); + new (obj->getElementsHeader()) js::ObjectElements(capacity, length); + + return obj; +} + +inline void +JSObject::finish(js::FreeOp *fop) +{ + if (hasDynamicSlots()) + fop->free_(slots); + if (hasDynamicElements()) + fop->free_(getElementsHeader()); +} + +inline bool +JSObject::hasProperty(JSContext *cx, js::HandleId id, bool *foundp, unsigned flags) +{ + JSObject *pobj; + JSProperty *prop; + JSAutoResolveFlags rf(cx, flags); + if (!lookupGeneric(cx, id, &pobj, &prop)) + return false; + *foundp = !!prop; + return true; +} + +inline bool +JSObject::isCallable() +{ + return isFunction() || getClass()->call; +} + +inline JSPrincipals * +JSObject::principals(JSContext *cx) +{ + if (JSObjectPrincipalsFinder find = cx->runtime->securityCallbacks->findObjectPrincipals) + return find(this); + return cx->compartment ? cx->compartment->principals : __null; +} + +inline void +JSObject::nativeSetSlot(unsigned slot, const js::Value &value) +{ + do { } while(0); + do { } while(0); + return setSlot(slot, value); +} + +inline void +JSObject::nativeSetSlotWithType(JSContext *cx, const js::Shape *shape, const js::Value &value) +{ + nativeSetSlot(shape->slot(), value); + js::types::AddTypePropertyId(cx, this, shape->propid(), value); +} + +inline bool +JSObject::nativeContains(JSContext *cx, jsid id) +{ + return nativeLookup(cx, id) != __null; +} + +inline bool +JSObject::nativeContains(JSContext *cx, const js::Shape &shape) +{ + return nativeLookup(cx, shape.propid()) == &shape; +} + +inline bool +JSObject::nativeEmpty() const +{ + return lastProperty()->isEmptyShape(); +} + +inline uint32_t +JSObject::propertyCount() const +{ + return lastProperty()->entryCount(); +} + +inline bool +JSObject::hasShapeTable() const +{ + return lastProperty()->hasTable(); +} + +inline size_t +JSObject::computedSizeOfThisSlotsElements() const +{ + size_t n = sizeOfThis(); + + if (hasDynamicSlots()) + n += numDynamicSlots() * sizeof(js::Value); + + if (hasDynamicElements()) + n += (js::ObjectElements::VALUES_PER_HEADER + getElementsHeader()->capacity) * + sizeof(js::Value); + + return n; +} + +inline void +JSObject::sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf, + size_t *slotsSize, size_t *elementsSize, + size_t *miscSize) const +{ + *slotsSize = 0; + if (hasDynamicSlots()) { + *slotsSize += mallocSizeOf(slots); + } + + *elementsSize = 0; + if (hasDynamicElements()) { + *elementsSize += mallocSizeOf(getElementsHeader()); + } + + + *miscSize = 0; + if (isArguments()) { + *miscSize += asArguments().sizeOfMisc(mallocSizeOf); + } else if (isRegExpStatics()) { + *miscSize += js::SizeOfRegExpStaticsData(this, mallocSizeOf); + } +} + +inline JSBool +JSObject::lookupGeneric(JSContext *cx, js::HandleId id, JSObject **objp, JSProperty **propp) +{ + js::RootedObject self(cx, this); + + js::LookupGenericOp op = getOps()->lookupGeneric; + if (op) + return op(cx, self, id, objp, propp); + return js::baseops::LookupProperty(cx, self, id, objp, propp); +} + +inline JSBool +JSObject::lookupProperty(JSContext *cx, js::PropertyName *name, JSObject **objp, JSProperty **propp) +{ + return lookupGeneric(cx, js::RootedId(cx, js::NameToId(name)), objp, propp); +} + +inline JSBool +JSObject::defineGeneric(JSContext *cx, js::HandleId id, const js::Value &value, + JSPropertyOp getter , + JSStrictPropertyOp setter , + unsigned attrs ) +{ + js::RootedObject self(cx, this); + + do { } while(0); + js::DefineGenericOp op = getOps()->defineGeneric; + return (op ? op : js::baseops::DefineProperty)(cx, self, id, &value, getter, setter, attrs); +} + +inline JSBool +JSObject::defineProperty(JSContext *cx, js::PropertyName *name, const js::Value &value, + JSPropertyOp getter , + JSStrictPropertyOp setter , + unsigned attrs ) +{ + return defineGeneric(cx, js::RootedId(cx, js::NameToId(name)), value, getter, setter, attrs); +} + +inline JSBool +JSObject::defineElement(JSContext *cx, uint32_t index, const js::Value &value, + JSPropertyOp getter , + JSStrictPropertyOp setter , + unsigned attrs ) +{ + js::RootedObject self(cx, this); + + js::DefineElementOp op = getOps()->defineElement; + return (op ? op : js::baseops::DefineElement)(cx, self, index, &value, getter, setter, attrs); +} + +inline JSBool +JSObject::defineSpecial(JSContext *cx, js::SpecialId sid, const js::Value &value, + JSPropertyOp getter , + JSStrictPropertyOp setter , + unsigned attrs ) +{ + return defineGeneric(cx, js::RootedId(cx, SPECIALID_TO_JSID(sid)), value, getter, setter, attrs); +} + +inline JSBool +JSObject::lookupElement(JSContext *cx, uint32_t index, JSObject **objp, JSProperty **propp) +{ + js::RootedObject self(cx, this); + + js::LookupElementOp op = getOps()->lookupElement; + return (op ? op : js::baseops::LookupElement)(cx, self, index, objp, propp); +} + +inline JSBool +JSObject::lookupSpecial(JSContext *cx, js::SpecialId sid, JSObject **objp, JSProperty **propp) +{ + return lookupGeneric(cx, js::RootedId(cx, SPECIALID_TO_JSID(sid)), objp, propp); +} + +inline JSBool +JSObject::getElement(JSContext *cx, js::HandleObject receiver, uint32_t index, js::Value *vp) +{ + js::RootedObject self(cx, this); + + js::ElementIdOp op = getOps()->getElement; + if (op) + return op(cx, self, receiver, index, vp); + + js::RootedId id(cx); + if (!js::IndexToId(cx, index, id.address())) + return false; + return self->getGeneric(cx, receiver, id, vp); +} + +inline JSBool +JSObject::getElement(JSContext *cx, uint32_t index, js::Value *vp) +{ + return getElement(cx, js::RootedObject(cx, this), index, vp); +} + +inline JSBool +JSObject::getElementIfPresent(JSContext *cx, js::HandleObject receiver, uint32_t index, js::Value *vp, + bool *present) +{ + js::RootedObject self(cx, this); + + js::ElementIfPresentOp op = getOps()->getElementIfPresent; + if (op) + return op(cx, self, receiver, index, vp, present); + + + + + + + js::RootedId id(cx); + if (!js::IndexToId(cx, index, id.address())) + return false; + + JSObject *obj2; + JSProperty *prop; + if (!self->lookupGeneric(cx, id, &obj2, &prop)) + return false; + + if (!prop) { + *present = false; + js::Debug_SetValueRangeToCrashOnTouch(vp, 1); + return true; + } + + *present = true; + return self->getGeneric(cx, receiver, id, vp); +} + +inline JSBool +JSObject::getSpecial(JSContext *cx, js::HandleObject receiver, js::SpecialId sid, js::Value *vp) +{ + return getGeneric(cx, receiver, js::RootedId(cx, SPECIALID_TO_JSID(sid)), vp); +} + +inline JSBool +JSObject::getGenericAttributes(JSContext *cx, js::HandleId id, unsigned *attrsp) +{ + js::GenericAttributesOp op = getOps()->getGenericAttributes; + return (op ? op : js::baseops::GetAttributes)(cx, js::RootedObject(cx, this), id, attrsp); +} + +inline JSBool +JSObject::getPropertyAttributes(JSContext *cx, js::PropertyName *name, unsigned *attrsp) +{ + return getGenericAttributes(cx, js::RootedId(cx, js::NameToId(name)), attrsp); +} + +inline JSBool +JSObject::getElementAttributes(JSContext *cx, uint32_t index, unsigned *attrsp) +{ + js::RootedId id(cx); + if (!js::IndexToId(cx, index, id.address())) + return false; + return getGenericAttributes(cx, id, attrsp); +} + +inline JSBool +JSObject::getSpecialAttributes(JSContext *cx, js::SpecialId sid, unsigned *attrsp) +{ + return getGenericAttributes(cx, js::RootedId(cx, SPECIALID_TO_JSID(sid)), attrsp); +} + +inline bool +JSObject::isProxy() const +{ + return js::IsProxy(this); +} + +inline bool +JSObject::isCrossCompartmentWrapper() const +{ + return js::IsCrossCompartmentWrapper(this); +} + +inline bool +JSObject::isWrapper() const +{ + return js::IsWrapper(this); +} + +inline js::GlobalObject & +JSObject::global() const +{ + JSObject *obj = const_cast(this); + while (JSObject *parent = obj->getParent()) + obj = parent; + return obj->asGlobal(); +} + +static inline bool +js_IsCallable(const js::Value &v) +{ + return v.isObject() && v.toObject().isCallable(); +} + +namespace js { + +inline JSObject * +GetInnerObject(JSContext *cx, HandleObject obj) +{ + if (JSObjectOp op = obj->getClass()->ext.innerObject) + return op(cx, obj); + return obj; +} + +inline JSObject * +GetOuterObject(JSContext *cx, HandleObject obj) +{ + if (JSObjectOp op = obj->getClass()->ext.outerObject) + return op(cx, obj); + return obj; +} + + + + + + +#define VALUE_IS_XML(v) ((v).isObject() && (v).toObject().isXML()) + +static inline bool +IsXML(const js::Value &v) +{ + return v.isObject() && v.toObject().isXML(); +} + + + + + + + +static inline bool +IsStopIteration(const js::Value &v) +{ + return v.isObject() && v.toObject().isStopIteration(); +} + + +static __attribute__((always_inline)) inline bool +ToPrimitive(JSContext *cx, Value *vp) +{ + if (vp->isPrimitive()) + return true; + return vp->toObject().defaultValue(cx, JSTYPE_VOID, vp); +} + + +static __attribute__((always_inline)) inline bool +ToPrimitive(JSContext *cx, JSType preferredType, Value *vp) +{ + do { } while(0); + if (vp->isPrimitive()) + return true; + return vp->toObject().defaultValue(cx, preferredType, vp); +} + + + + + + +inline bool +IsInternalFunctionObject(JSObject *funobj) +{ + JSFunction *fun = funobj->toFunction(); + return (fun->flags & 0x08) && !funobj->getParent(); +} + +class AutoPropDescArrayRooter : private AutoGCRooter +{ + public: + AutoPropDescArrayRooter(JSContext *cx) + : AutoGCRooter(cx, DESCRIPTORS), descriptors(cx), skip(cx, &descriptors) + { } + + PropDesc *append() { + if (!descriptors.append(PropDesc())) + return __null; + return &descriptors.back(); + } + + bool reserve(size_t n) { + return descriptors.reserve(n); + } + + PropDesc& operator[](size_t i) { + do { } while(0); + return descriptors[i]; + } + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + PropDescArray descriptors; + SkipRoot skip; +}; + +class AutoPropertyDescriptorRooter : private AutoGCRooter, public PropertyDescriptor +{ + SkipRoot skip; + + AutoPropertyDescriptorRooter *thisDuringConstruction() { return this; } + + public: + AutoPropertyDescriptorRooter(JSContext *cx) + : AutoGCRooter(cx, DESCRIPTOR), skip(cx, thisDuringConstruction()) + { + obj = __null; + attrs = 0; + getter = (PropertyOp) __null; + setter = (StrictPropertyOp) __null; + value.setUndefined(); + } + + AutoPropertyDescriptorRooter(JSContext *cx, PropertyDescriptor *desc) + : AutoGCRooter(cx, DESCRIPTOR), skip(cx, thisDuringConstruction()) + { + obj = desc->obj; + attrs = desc->attrs; + getter = desc->getter; + setter = desc->setter; + value = desc->value; + } + + friend void AutoGCRooter::trace(JSTracer *trc); +}; + +inline void +NewObjectCache::copyCachedToObject(JSObject *dst, JSObject *src) +{ + js_memcpy(dst, src, dst->sizeOfThis()); + + + + +} + +static inline bool +CanBeFinalizedInBackground(gc::AllocKind kind, Class *clasp) +{ + + do { } while(0); + + + + + + + + if (!gc::IsBackgroundAllocKind(kind) && !clasp->finalize) + return true; + + return false; +} + + + + + +JSObject * +NewObjectWithGivenProto(JSContext *cx, js::Class *clasp, JSObject *proto, JSObject *parent, + gc::AllocKind kind); + +inline JSObject * +NewObjectWithGivenProto(JSContext *cx, js::Class *clasp, JSObject *proto, JSObject *parent) +{ + gc::AllocKind kind = gc::GetGCObjectKind(clasp); + return NewObjectWithGivenProto(cx, clasp, proto, parent, kind); +} + +inline JSProtoKey +GetClassProtoKey(js::Class *clasp) +{ + JSProtoKey key = ((JSProtoKey) (((clasp)->flags >> ((8 + 8) + 10)) & (((uint32_t)1 << (6)) - 1))); + if (key != JSProto_Null) + return key; + if (clasp->flags & (1<<((8 + 8)+1))) + return JSProto_Object; + return JSProto_Null; +} + +inline bool +FindProto(JSContext *cx, js::Class *clasp, HandleObject parent, JSObject **proto) +{ + JSProtoKey protoKey = GetClassProtoKey(clasp); + if (!js_GetClassPrototype(cx, parent, protoKey, proto, clasp)) + return false; + if (!(*proto) && !js_GetClassPrototype(cx, parent, JSProto_Object, proto)) + return false; + return true; +} +# 1427 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" +JSObject * +NewObjectWithClassProto(JSContext *cx, js::Class *clasp, JSObject *proto, JSObject *parent, + gc::AllocKind kind); + +inline JSObject * +NewObjectWithClassProto(JSContext *cx, js::Class *clasp, JSObject *proto, JSObject *parent) +{ + gc::AllocKind kind = gc::GetGCObjectKind(clasp); + return NewObjectWithClassProto(cx, clasp, proto, parent, kind); +} + + + + + +inline JSObject * +NewBuiltinClassInstance(JSContext *cx, Class *clasp, gc::AllocKind kind) +{ + return NewObjectWithClassProto(cx, clasp, __null, __null, kind); +} + +inline JSObject * +NewBuiltinClassInstance(JSContext *cx, Class *clasp) +{ + gc::AllocKind kind = gc::GetGCObjectKind(clasp); + return NewBuiltinClassInstance(cx, clasp, kind); +} + +inline GlobalObject * +GetCurrentGlobal(JSContext *cx) +{ + JSObject *scopeChain = (cx->hasfp()) ? cx->fp()->scopeChain() : cx->globalObject; + return scopeChain ? &scopeChain->global() : __null; +} + +bool +FindClassPrototype(JSContext *cx, JSObject *scope, JSProtoKey protoKey, JSObject **protop, + Class *clasp); + + + + + +JSObject * +NewObjectWithType(JSContext *cx, HandleTypeObject type, JSObject *parent, gc::AllocKind kind); + + +static inline JSObject * +CopyInitializerObject(JSContext *cx, HandleObject baseobj) +{ + do { } while(0); + do { } while(0); + + gc::AllocKind kind = gc::GetGCObjectFixedSlotsKind(baseobj->numFixedSlots()); + + kind = gc::GetBackgroundAllocKind(kind); + + do { } while(0); + JSObject *obj = NewBuiltinClassInstance(cx, &ObjectClass, kind); + + if (!obj) + return __null; + + if (!obj->setLastProperty(cx, baseobj->lastProperty())) + return __null; + + return obj; +} + +JSObject * +NewReshapedObject(JSContext *cx, HandleTypeObject type, JSObject *parent, + gc::AllocKind kind, const Shape *shape); + + + + + + +static inline gc::AllocKind +GuessObjectGCKind(size_t numSlots) +{ + if (numSlots) + return gc::GetGCObjectKind(numSlots); + return gc::FINALIZE_OBJECT4; +} + +static inline gc::AllocKind +GuessArrayGCKind(size_t numSlots) +{ + if (numSlots) + return gc::GetGCArrayKind(numSlots); + return gc::FINALIZE_OBJECT8; +} + + + + + +static inline gc::AllocKind +NewObjectGCKind(JSContext *cx, js::Class *clasp) +{ + if (clasp == &ArrayClass || clasp == &SlowArrayClass) + return gc::FINALIZE_OBJECT8; + if (clasp == &FunctionClass) + return gc::FINALIZE_OBJECT2; + return gc::FINALIZE_OBJECT4; +} + + + + + +inline bool +PreallocateObjectDynamicSlots(JSContext *cx, Shape *shape, HeapSlot **slots) +{ + if (size_t count = JSObject::dynamicSlotsCount(shape->numFixedSlots(), shape->slotSpan())) { + *slots = (HeapSlot *) cx->malloc_(count * sizeof(HeapSlot)); + if (!*slots) + return false; + Debug_SetSlotRangeToCrashOnTouch(*slots, count); + return true; + } + *slots = __null; + return true; +} + +inline bool +DefineConstructorAndPrototype(JSContext *cx, GlobalObject *global, + JSProtoKey key, JSObject *ctor, JSObject *proto) +{ + do { } while(0); + do { } while(0); + do { } while(0); + + jsid id = NameToId(cx->runtime->atomState.classAtoms[key]); + do { } while(0); + + + global->setSlot(key, ObjectValue(*ctor)); + global->setSlot(key + JSProto_LIMIT, ObjectValue(*proto)); + global->setSlot(key + JSProto_LIMIT * 2, ObjectValue(*ctor)); + + types::AddTypePropertyId(cx, global, id, ObjectValue(*ctor)); + if (!global->addDataProperty(cx, id, key + JSProto_LIMIT * 2, 0)) { + global->setSlot(key, UndefinedValue()); + global->setSlot(key + JSProto_LIMIT, UndefinedValue()); + global->setSlot(key + JSProto_LIMIT * 2, UndefinedValue()); + return false; + } + + return true; +} + +inline bool +ObjectClassIs(JSObject &obj, ESClassValue classValue, JSContext *cx) +{ + if ((__builtin_expect((obj.isProxy()), 0))) + return Proxy::objectClassIs(&obj, classValue, cx); + + switch (classValue) { + case ESClass_Array: return obj.isArray(); + case ESClass_Number: return obj.isNumber(); + case ESClass_String: return obj.isString(); + case ESClass_Boolean: return obj.isBoolean(); + case ESClass_RegExp: return obj.isRegExp(); + case ESClass_ArrayBuffer: return obj.isArrayBuffer(); + } + __builtin_unreachable(); + return false; +} + +inline bool +IsObjectWithClass(const Value &v, ESClassValue classValue, JSContext *cx) +{ + if (!v.isObject()) + return false; + return ObjectClassIs(v.toObject(), classValue, cx); +} + +static __attribute__((always_inline)) inline bool +ValueIsSpecial(JSObject *obj, Value *propval, SpecialId *sidp, JSContext *cx) +{ + + if (!propval->isObject()) + return false; + + if (obj->isXML()) { + *sidp = SpecialId(propval->toObject()); + return true; + } + + JSObject &propobj = propval->toObject(); + JSAtom *name; + if (propobj.isQName() && GetLocalNameFromFunctionQName(&propobj, &name, cx)) { + propval->setString(name); + return false; + } + + + return false; +} + +JSObject * +DefineConstructorAndPrototype(JSContext *cx, HandleObject obj, JSProtoKey key, HandleAtom atom, + JSObject *protoProto, Class *clasp, + Native constructor, unsigned nargs, + JSPropertySpec *ps, JSFunctionSpec *fs, + JSPropertySpec *static_ps, JSFunctionSpec *static_fs, + JSObject **ctorp = __null, + gc::AllocKind ctorKind = JSFunction::FinalizeKind); + +} + +extern JSObject * +js_InitClass(JSContext *cx, js::HandleObject obj, JSObject *parent_proto, + js::Class *clasp, JSNative constructor, unsigned nargs, + JSPropertySpec *ps, JSFunctionSpec *fs, + JSPropertySpec *static_ps, JSFunctionSpec *static_fs, + JSObject **ctorp = __null, + js::gc::AllocKind ctorKind = JSFunction::FinalizeKind); + + + + + + + +extern bool +js_PurgeScopeChainHelper(JSContext *cx, JSObject *obj, jsid id); + +inline bool +js_PurgeScopeChain(JSContext *cx, JSObject *obj, jsid id) +{ + if (obj->isDelegate()) + return js_PurgeScopeChainHelper(cx, obj, id); + return true; +} + +inline void +js::DestroyIdArray(FreeOp *fop, JSIdArray *ida) +{ + fop->free_(ida); +} +# 13 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" 2 + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" +#define Debugger_h__ + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclist.h" 1 +# 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" 2 + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jswrapper.h" 1 +# 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" 2 + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" 1 +# 24 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" 2 + +namespace js { + +class Debugger { + friend class Breakpoint; + friend JSBool (::JS_DefineDebuggerObject)(JSContext *cx, JSObject *obj); + + public: + enum Hook { + OnDebuggerStatement, + OnExceptionUnwind, + OnNewScript, + OnEnterFrame, + HookCount + }; + + enum { + JSSLOT_DEBUG_PROTO_START, + JSSLOT_DEBUG_FRAME_PROTO = JSSLOT_DEBUG_PROTO_START, + JSSLOT_DEBUG_ENV_PROTO, + JSSLOT_DEBUG_OBJECT_PROTO, + JSSLOT_DEBUG_SCRIPT_PROTO, + JSSLOT_DEBUG_PROTO_STOP, + JSSLOT_DEBUG_HOOK_START = JSSLOT_DEBUG_PROTO_STOP, + JSSLOT_DEBUG_HOOK_STOP = JSSLOT_DEBUG_HOOK_START + HookCount, + JSSLOT_DEBUG_COUNT = JSSLOT_DEBUG_HOOK_STOP + }; + + private: + JSCList link; + HeapPtrObject object; + GlobalObjectSet debuggees; + js::HeapPtrObject uncaughtExceptionHook; + bool enabled; + JSCList breakpoints; +# 73 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" + typedef HashMap, RuntimeAllocPolicy> + FrameMap; + FrameMap frames; + + + typedef WeakMap ScriptWeakMap; + ScriptWeakMap scripts; + + + typedef WeakMap ObjectWeakMap; + ObjectWeakMap objects; + + + ObjectWeakMap environments; + + class FrameRange; + class ScriptQuery; + + bool addDebuggeeGlobal(JSContext *cx, Handle obj); + void removeDebuggeeGlobal(FreeOp *fop, GlobalObject *global, + GlobalObjectSet::Enum *compartmentEnum, + GlobalObjectSet::Enum *debugEnum); +# 110 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" + JSTrapStatus handleUncaughtException(AutoCompartment &ac, Value *vp, bool callHook); +# 137 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" + JSTrapStatus parseResumptionValue(AutoCompartment &ac, bool ok, const Value &rv, Value *vp, + bool callHook = true); + + JSObject *unwrapDebuggeeArgument(JSContext *cx, const Value &v); + + static void traceObject(JSTracer *trc, JSObject *obj); + void trace(JSTracer *trc); + static void finalize(FreeOp *fop, JSObject *obj); + void markKeysInCompartment(JSTracer *tracer); + + static Class jsclass; + + static Debugger *fromThisValue(JSContext *cx, const CallArgs &ca, const char *fnname); + static JSBool getEnabled(JSContext *cx, unsigned argc, Value *vp); + static JSBool setEnabled(JSContext *cx, unsigned argc, Value *vp); + static JSBool getHookImpl(JSContext *cx, unsigned argc, Value *vp, Hook which); + static JSBool setHookImpl(JSContext *cx, unsigned argc, Value *vp, Hook which); + static JSBool getOnDebuggerStatement(JSContext *cx, unsigned argc, Value *vp); + static JSBool setOnDebuggerStatement(JSContext *cx, unsigned argc, Value *vp); + static JSBool getOnExceptionUnwind(JSContext *cx, unsigned argc, Value *vp); + static JSBool setOnExceptionUnwind(JSContext *cx, unsigned argc, Value *vp); + static JSBool getOnNewScript(JSContext *cx, unsigned argc, Value *vp); + static JSBool setOnNewScript(JSContext *cx, unsigned argc, Value *vp); + static JSBool getOnEnterFrame(JSContext *cx, unsigned argc, Value *vp); + static JSBool setOnEnterFrame(JSContext *cx, unsigned argc, Value *vp); + static JSBool getUncaughtExceptionHook(JSContext *cx, unsigned argc, Value *vp); + static JSBool setUncaughtExceptionHook(JSContext *cx, unsigned argc, Value *vp); + static JSBool addDebuggee(JSContext *cx, unsigned argc, Value *vp); + static JSBool removeDebuggee(JSContext *cx, unsigned argc, Value *vp); + static JSBool hasDebuggee(JSContext *cx, unsigned argc, Value *vp); + static JSBool getDebuggees(JSContext *cx, unsigned argc, Value *vp); + static JSBool getNewestFrame(JSContext *cx, unsigned argc, Value *vp); + static JSBool clearAllBreakpoints(JSContext *cx, unsigned argc, Value *vp); + static JSBool findScripts(JSContext *cx, unsigned argc, Value *vp); + static JSBool wrap(JSContext *cx, unsigned argc, Value *vp); + static JSBool construct(JSContext *cx, unsigned argc, Value *vp); + static JSPropertySpec properties[]; + static JSFunctionSpec methods[]; + + JSObject *getHook(Hook hook) const; + bool hasAnyLiveHooks() const; + + static JSTrapStatus slowPathOnEnterFrame(JSContext *cx, Value *vp); + static bool slowPathOnLeaveFrame(JSContext *cx, bool ok); + static void slowPathOnNewScript(JSContext *cx, JSScript *script, + GlobalObject *compileAndGoGlobal); + static JSTrapStatus dispatchHook(JSContext *cx, Value *vp, Hook which); + + JSTrapStatus fireDebuggerStatement(JSContext *cx, Value *vp); + JSTrapStatus fireExceptionUnwind(JSContext *cx, Value *vp); + JSTrapStatus fireEnterFrame(JSContext *cx, Value *vp); + + + + + + JSObject *newDebuggerScript(JSContext *cx, Handle script); + + + + + + void fireNewScript(JSContext *cx, Handle script); + + static inline Debugger *fromLinks(JSCList *links); + inline Breakpoint *firstBreakpoint() const; + + public: + Debugger(JSContext *cx, JSObject *dbg); + ~Debugger(); + + bool init(JSContext *cx); + inline const js::HeapPtrObject &toJSObject() const; + inline js::HeapPtrObject &toJSObjectRef(); + static inline Debugger *fromJSObject(JSObject *obj); + static Debugger *fromChildJSObject(JSObject *obj); +# 231 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" + static void markCrossCompartmentDebuggerObjectReferents(JSTracer *tracer); + static bool markAllIteratively(GCMarker *trc); + static void sweepAll(FreeOp *fop); + static void detachAllDebuggersFromGlobal(FreeOp *fop, GlobalObject *global, + GlobalObjectSet::Enum *compartmentEnum); + + static inline JSTrapStatus onEnterFrame(JSContext *cx, Value *vp); + static inline bool onLeaveFrame(JSContext *cx, bool ok); + static inline JSTrapStatus onDebuggerStatement(JSContext *cx, Value *vp); + static inline JSTrapStatus onExceptionUnwind(JSContext *cx, Value *vp); + static inline void onNewScript(JSContext *cx, JSScript *script, + GlobalObject *compileAndGoGlobal); + static JSTrapStatus onTrap(JSContext *cx, Value *vp); + static JSTrapStatus onSingleStep(JSContext *cx, Value *vp); + + + + inline bool observesEnterFrame() const; + inline bool observesNewScript() const; + inline bool observesGlobal(GlobalObject *global) const; + inline bool observesFrame(StackFrame *fp) const; + bool observesScript(JSScript *script) const; + + + + + + + bool wrapEnvironment(JSContext *cx, Handle env, Value *vp); +# 270 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" + bool wrapDebuggeeValue(JSContext *cx, Value *vp); +# 299 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" + bool unwrapDebuggeeValue(JSContext *cx, Value *vp); + + + bool getScriptFrame(JSContext *cx, StackFrame *fp, Value *vp); +# 311 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" + static void resultToCompletion(JSContext *cx, bool ok, const Value &rv, + JSTrapStatus *status, Value *value); + + + + + + + bool newCompletionValue(JSContext *cx, JSTrapStatus status, Value value, Value *result); +# 333 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" + bool receiveCompletionValue(AutoCompartment &ac, bool ok, Value val, Value *vp); + + + + + + + JSObject *wrapScript(JSContext *cx, Handle script); + + private: + Debugger(const Debugger &) ; + Debugger & operator=(const Debugger &) ; +}; + +class BreakpointSite { + friend class Breakpoint; + friend struct ::JSCompartment; + friend struct ::JSScript; + friend class Debugger; + + public: + JSScript *script; + jsbytecode * const pc; + + private: + + + + + + GlobalObject *scriptGlobal; + + JSCList breakpoints; + size_t enabledCount; + JSTrapHandler trapHandler; + HeapValue trapClosure; + + void recompile(FreeOp *fop); + + public: + BreakpointSite(JSScript *script, jsbytecode *pc); + Breakpoint *firstBreakpoint() const; + bool hasBreakpoint(Breakpoint *bp); + bool hasTrap() const { return !!trapHandler; } + GlobalObject *getScriptGlobal() const { return scriptGlobal; } + + void inc(FreeOp *fop); + void dec(FreeOp *fop); + void setTrap(FreeOp *fop, JSTrapHandler handler, const Value &closure); + void clearTrap(FreeOp *fop, JSTrapHandler *handlerp = __null, Value *closurep = __null); + void destroyIfEmpty(FreeOp *fop); +}; +# 404 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" +class Breakpoint { + friend struct ::JSCompartment; + friend class Debugger; + + public: + Debugger * const debugger; + BreakpointSite * const site; + private: + js::HeapPtrObject handler; + JSCList debuggerLinks; + JSCList siteLinks; + + public: + static Breakpoint *fromDebuggerLinks(JSCList *links); + static Breakpoint *fromSiteLinks(JSCList *links); + Breakpoint(Debugger *debugger, BreakpointSite *site, JSObject *handler); + void destroy(FreeOp *fop); + Breakpoint *nextInDebugger(); + Breakpoint *nextInSite(); + const HeapPtrObject &getHandler() const { return handler; } + HeapPtrObject &getHandlerRef() { return handler; } +}; + +Debugger * +Debugger::fromLinks(JSCList *links) +{ + unsigned char *p = reinterpret_cast(links); + return reinterpret_cast(p - __builtin_offsetof (Debugger, link)); +} + +Breakpoint * +Debugger::firstBreakpoint() const +{ + if (((&breakpoints)->next == (&breakpoints))) + return __null; + return Breakpoint::fromDebuggerLinks(((&breakpoints)->next)); +} + +const js::HeapPtrObject & +Debugger::toJSObject() const +{ + do { } while(0); + return object; +} + +js::HeapPtrObject & +Debugger::toJSObjectRef() +{ + do { } while(0); + return object; +} + +Debugger * +Debugger::fromJSObject(JSObject *obj) +{ + do { } while(0); + return (Debugger *) obj->getPrivate(); +} + +bool +Debugger::observesEnterFrame() const +{ + return enabled && getHook(OnEnterFrame); +} + +bool +Debugger::observesNewScript() const +{ + return enabled && getHook(OnNewScript); +} + +bool +Debugger::observesGlobal(GlobalObject *global) const +{ + return debuggees.has(global); +} + +bool +Debugger::observesFrame(StackFrame *fp) const +{ + return !fp->isDummyFrame() && observesGlobal(&fp->global()); +} + +JSTrapStatus +Debugger::onEnterFrame(JSContext *cx, Value *vp) +{ + if (cx->compartment->getDebuggees().empty()) + return JSTRAP_CONTINUE; + return slowPathOnEnterFrame(cx, vp); +} + +bool +Debugger::onLeaveFrame(JSContext *cx, bool ok) +{ + + bool evalTraps = cx->fp()->isEvalFrame() && + cx->fp()->script()->hasAnyBreakpointsOrStepMode(); + if (!cx->compartment->getDebuggees().empty() || evalTraps) + ok = slowPathOnLeaveFrame(cx, ok); + return ok; +} + +JSTrapStatus +Debugger::onDebuggerStatement(JSContext *cx, Value *vp) +{ + return cx->compartment->getDebuggees().empty() + ? JSTRAP_CONTINUE + : dispatchHook(cx, vp, OnDebuggerStatement); +} + +JSTrapStatus +Debugger::onExceptionUnwind(JSContext *cx, Value *vp) +{ + return cx->compartment->getDebuggees().empty() + ? JSTRAP_CONTINUE + : dispatchHook(cx, vp, OnExceptionUnwind); +} + +void +Debugger::onNewScript(JSContext *cx, JSScript *script, GlobalObject *compileAndGoGlobal) +{ + do { } while (0); + do { } while (0); + if (!script->compartment()->getDebuggees().empty()) + slowPathOnNewScript(cx, script, compileAndGoGlobal); +} + +extern JSBool +EvaluateInEnv(JSContext *cx, Handle env, StackFrame *fp, const jschar *chars, + unsigned length, const char *filename, unsigned lineno, Value *rval); + +} +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" 2 + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" 1 +# 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" 2 + +using namespace js; + +PropDesc::PropDesc() + : pd_(UndefinedValue()), + value_(UndefinedValue()), + get_(UndefinedValue()), + set_(UndefinedValue()), + attrs(0), + hasGet_(false), + hasSet_(false), + hasValue_(false), + hasWritable_(false), + hasEnumerable_(false), + hasConfigurable_(false), + isUndefined_(true) +{ +} + +bool +PropDesc::checkGetter(JSContext *cx) +{ + if (hasGet_) { + if (!js_IsCallable(get_) && !get_.isUndefined()) { + JS_ReportErrorNumber(cx, js_GetErrorMessage, __null, JSMSG_BAD_GET_SET_FIELD, + js_getter_str); + return false; + } + } + return true; +} + +bool +PropDesc::checkSetter(JSContext *cx) +{ + if (hasSet_) { + if (!js_IsCallable(set_) && !set_.isUndefined()) { + JS_ReportErrorNumber(cx, js_GetErrorMessage, __null, JSMSG_BAD_GET_SET_FIELD, + js_setter_str); + return false; + } + } + return true; +} + +static bool +CheckArgCompartment(JSContext *cx, JSObject *obj, const Value &v, + const char *methodname, const char *propname) +{ + if (v.isObject() && v.toObject().compartment() != obj->compartment()) { + JS_ReportErrorNumber(cx, js_GetErrorMessage, __null, JSMSG_DEBUG_COMPARTMENT_MISMATCH, + methodname, propname); + return false; + } + return true; +} + + + + + +bool +PropDesc::unwrapDebuggerObjectsInto(JSContext *cx, Debugger *dbg, JSObject *obj, + PropDesc *unwrapped) const +{ + do { } while(0); + + *unwrapped = *this; + + if (unwrapped->hasValue()) { + if (!dbg->unwrapDebuggeeValue(cx, &unwrapped->value_) || + !CheckArgCompartment(cx, obj, unwrapped->value_, "defineProperty", "value")) + { + return false; + } + } + + if (unwrapped->hasGet()) { + if (!dbg->unwrapDebuggeeValue(cx, &unwrapped->get_) || + !CheckArgCompartment(cx, obj, unwrapped->get_, "defineProperty", "get")) + { + return false; + } + } + + if (unwrapped->hasSet()) { + if (!dbg->unwrapDebuggeeValue(cx, &unwrapped->set_) || + !CheckArgCompartment(cx, obj, unwrapped->set_, "defineProperty", "set")) + { + return false; + } + } + + return true; +} + + + + + + +bool +PropDesc::wrapInto(JSContext *cx, JSObject *obj, const jsid &id, jsid *wrappedId, + PropDesc *desc) const +{ + do { } while(0); + + JSCompartment *comp = cx->compartment; + + *wrappedId = id; + if (!comp->wrapId(cx, wrappedId)) + return false; + + *desc = *this; + if (!comp->wrap(cx, &desc->value_)) + return false; + if (!comp->wrap(cx, &desc->get_)) + return false; + if (!comp->wrap(cx, &desc->set_)) + return false; + return !obj->isProxy() || desc->makeObject(cx); +} + +static ObjectElements emptyElementsHeader(0, 0); + + +HeapSlot *js::emptyObjectElements = + reinterpret_cast(uintptr_t(&emptyElementsHeader) + sizeof(ObjectElements)); +# 217 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" +void +js::ObjectImpl::initSlotRange(uint32_t start, const Value *vector, uint32_t length) +{ + JSCompartment *comp = compartment(); + HeapSlot *fixedStart, *fixedEnd, *slotsStart, *slotsEnd; + getSlotRange(start, length, &fixedStart, &fixedEnd, &slotsStart, &slotsEnd); + for (HeapSlot *sp = fixedStart; sp < fixedEnd; sp++) + sp->init(comp, this->asObjectPtr(), start++, *vector++); + for (HeapSlot *sp = slotsStart; sp < slotsEnd; sp++) + sp->init(comp, this->asObjectPtr(), start++, *vector++); +} + +void +js::ObjectImpl::copySlotRange(uint32_t start, const Value *vector, uint32_t length) +{ + JSCompartment *comp = compartment(); + HeapSlot *fixedStart, *fixedEnd, *slotsStart, *slotsEnd; + getSlotRange(start, length, &fixedStart, &fixedEnd, &slotsStart, &slotsEnd); + for (HeapSlot *sp = fixedStart; sp < fixedEnd; sp++) + sp->set(comp, this->asObjectPtr(), start++, *vector++); + for (HeapSlot *sp = slotsStart; sp < slotsEnd; sp++) + sp->set(comp, this->asObjectPtr(), start++, *vector++); +} +# 260 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" +const Shape * +js::ObjectImpl::nativeLookup(JSContext *cx, jsid id) +{ + do { } while(0); + Shape **spp; + return Shape::search(cx, lastProperty(), id, &spp); +} +# 277 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" +void +js::ObjectImpl::markChildren(JSTracer *trc) +{ + MarkTypeObject(trc, &type_, "type"); + + MarkShape(trc, &shape_, "shape"); + + Class *clasp = shape_->getObjectClass(); + JSObject *obj = asObjectPtr(); + if (clasp->trace) + clasp->trace(trc, obj); + + if (shape_->isNative()) + MarkObjectSlots(trc, obj, 0, obj->slotSpan()); +} + +bool +DenseElementsHeader::getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc) +{ + do { } while(0); + + uint32_t len = initializedLength(); + if (index >= len) { + *desc = PropDesc::undefined(); + return true; + } + + HeapSlot &slot = obj->elements[index]; + if (slot.isMagic(JS_ARRAY_HOLE)) { + *desc = PropDesc::undefined(); + return true; + } + + *desc = PropDesc(slot, PropDesc::Writable, PropDesc::Enumerable, PropDesc::Configurable); + return true; +} + +bool +SparseElementsHeader::getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc) +{ + do { } while(0); + + __builtin_unreachable(); + return false; +} + +template +static Value +ElementToValue(const T &t) +{ + return NumberValue(t); +} + +template<> + Value +ElementToValue(const uint8_clamped &u) +{ + return NumberValue(uint8_t(u)); +} + +template +bool +TypedElementsHeader::getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, + PropDesc *desc) +{ + do { } while(0); + + if (index >= length()) { + *desc = PropDesc::undefined(); + return true; + } + + *desc = PropDesc(ElementToValue(getElement(index)), PropDesc::Writable, + PropDesc::Enumerable, PropDesc::Configurable); + return false; +} + +bool +ArrayBufferElementsHeader::getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, + PropDesc *desc) +{ + do { } while(0); + + __builtin_unreachable(); + return false; +} + +bool +SparseElementsHeader::defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, + const PropDesc &desc, bool shouldThrow, bool *succeeded) +{ + do { } while(0); + + __builtin_unreachable(); + return false; +} + +bool +DenseElementsHeader::defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, + const PropDesc &desc, bool shouldThrow, bool *succeeded) +{ + do { } while(0); + + do { } while (0); + do { } while (0); + + + + + + if (desc.hasGet() || desc.hasSet() || + (desc.hasEnumerable() && !desc.enumerable()) || + (desc.hasConfigurable() && !desc.configurable()) || + (desc.hasWritable() && !desc.writable())) + { + if (!obj->makeElementsSparse(cx)) + return false; + SparseElementsHeader &elts = obj->elementsHeader().asSparseElements(); + return elts.defineElement(cx, obj, index, desc, shouldThrow, succeeded); + } + + + uint32_t initLen = initializedLength(); + if (index < initLen) { + HeapSlot &slot = obj->elements[index]; + if (!slot.isMagic(JS_ARRAY_HOLE)) { + + + + + + } + } + + + + + + if (!obj->isExtensible()) { + *succeeded = false; + if (!shouldThrow) + return true; + ((void)(js_ReportValueErrorFlags(cx, 0x0, JSMSG_OBJECT_NOT_EXTENSIBLE, 0, ObjectValue(*obj), __null, __null, __null))) + + + ; + return false; + } + + + ObjectImpl::DenseElementsResult res = obj->ensureDenseElementsInitialized(cx, index, 0); + + + if (res == ObjectImpl::Failure) + return false; + + + if (res == ObjectImpl::ConvertToSparse) { + if (!obj->makeElementsSparse(cx)) + return false; + SparseElementsHeader &elts = obj->elementsHeader().asSparseElements(); + return elts.defineElement(cx, obj, index, desc, shouldThrow, succeeded); + } + + + do { } while(0); + obj->elements[index].set(obj->asObjectPtr(), index, desc.value()); + *succeeded = true; + return true; +} + +static JSObject * +ArrayBufferDelegate(JSContext *cx, ObjectImpl *obj) +{ + do { } while(0); + if (obj->getPrivate()) + return static_cast(obj->getPrivate()); + JSObject *delegate = NewObjectWithGivenProto(cx, &ObjectClass, obj->getProto(), __null); + obj->setPrivate(delegate); + return delegate; +} + +template +bool +TypedElementsHeader::defineElement(JSContext *cx, ObjectImpl *obj, + uint32_t index, const PropDesc &desc, bool shouldThrow, + bool *succeeded) +{ + + *succeeded = false; + js_ReportValueErrorFlags(cx, 0x0, JSMSG_OBJECT_NOT_EXTENSIBLE, + 0, + ObjectValue(*obj), + __null, __null, __null); + return false; +} + +bool +ArrayBufferElementsHeader::defineElement(JSContext *cx, ObjectImpl *obj, + uint32_t index, const PropDesc &desc, bool shouldThrow, + bool *succeeded) +{ + do { } while(0); + + JSObject *delegate = ArrayBufferDelegate(cx, obj); + if (!delegate) + return false; + return DefineElement(cx, delegate, index, desc, shouldThrow, succeeded); +} + +bool +js::GetOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc) +{ + ElementsHeader &header = obj->elementsHeader(); + switch (header.kind()) { + case DenseElements: + return header.asDenseElements().getOwnElement(cx, obj, index, desc); + case SparseElements: + return header.asSparseElements().getOwnElement(cx, obj, index, desc); + case Uint8Elements: + return header.asUint8Elements().getOwnElement(cx, obj, index, desc); + case Int8Elements: + return header.asInt8Elements().getOwnElement(cx, obj, index, desc); + case Uint16Elements: + return header.asUint16Elements().getOwnElement(cx, obj, index, desc); + case Int16Elements: + return header.asInt16Elements().getOwnElement(cx, obj, index, desc); + case Uint32Elements: + return header.asUint32Elements().getOwnElement(cx, obj, index, desc); + case Int32Elements: + return header.asInt32Elements().getOwnElement(cx, obj, index, desc); + case Uint8ClampedElements: + return header.asUint8ClampedElements().getOwnElement(cx, obj, index, desc); + case Float32Elements: + return header.asFloat32Elements().getOwnElement(cx, obj, index, desc); + case Float64Elements: + return header.asFloat64Elements().getOwnElement(cx, obj, index, desc); + case ArrayBufferElements: + return header.asArrayBufferElements().getOwnElement(cx, obj, index, desc); + } + + __builtin_unreachable(); + return false; +} + +bool +js::GetElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, + Value *vp) +{ + __builtin_unreachable(); + + do { + do { } while(0); + + if (static_cast(obj)->isProxy()) { + __builtin_unreachable(); + return false; + } + + PropDesc desc; + if (!GetOwnElement(cx, obj, index, &desc)) + return false; + + + if (desc.isUndefined()) { + obj = obj->getProto(); + if (obj) + continue; + + vp->setUndefined(); + return true; + } + + + if (desc.isDataDescriptor()) { + *vp = desc.value(); + return true; + } + + + if (desc.isAccessorDescriptor()) { + Value get = desc.getterValue(); + if (get.isUndefined()) { + vp->setUndefined(); + return true; + } + + InvokeArgsGuard args; + if (!cx->stack.pushInvokeArgs(cx, 0, &args)) + return false; + + + args.calleev() = get; + args.thisv() = ObjectValue(*receiver); + + bool ok = Invoke(cx, args); + *vp = args.rval(); + return ok; + } + + + __builtin_unreachable(); + return false; + } while (false); +} + +bool +js::HasElement(JSContext *cx, ObjectImpl *obj, uint32_t index, bool *found) +{ + __builtin_unreachable(); + + do { + do { } while(0); + + if (static_cast(obj)->isProxy()) { + __builtin_unreachable(); + return false; + } + + PropDesc prop; + if (!GetOwnElement(cx, obj, index, &prop)) + return false; + + if (!prop.isUndefined()) { + *found = true; + return true; + } + + obj = obj->getProto(); + if (obj) + continue; + + *found = false; + return true; + } while (false); +} + +bool +js::DefineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc, + bool shouldThrow, bool *succeeded) +{ + __builtin_unreachable(); + + ElementsHeader &header = obj->elementsHeader(); + + switch (header.kind()) { + case DenseElements: + return header.asDenseElements().defineElement(cx, obj, index, desc, shouldThrow, + succeeded); + case SparseElements: + return header.asSparseElements().defineElement(cx, obj, index, desc, shouldThrow, + succeeded); + case Uint8Elements: + return header.asUint8Elements().defineElement(cx, obj, index, desc, shouldThrow, + succeeded); + case Int8Elements: + return header.asInt8Elements().defineElement(cx, obj, index, desc, shouldThrow, + succeeded); + case Uint16Elements: + return header.asUint16Elements().defineElement(cx, obj, index, desc, shouldThrow, + succeeded); + case Int16Elements: + return header.asInt16Elements().defineElement(cx, obj, index, desc, shouldThrow, + succeeded); + case Uint32Elements: + return header.asUint32Elements().defineElement(cx, obj, index, desc, shouldThrow, + succeeded); + case Int32Elements: + return header.asInt32Elements().defineElement(cx, obj, index, desc, shouldThrow, + succeeded); + case Uint8ClampedElements: + return header.asUint8ClampedElements().defineElement(cx, obj, index, desc, shouldThrow, + succeeded); + case Float32Elements: + return header.asFloat32Elements().defineElement(cx, obj, index, desc, shouldThrow, + succeeded); + case Float64Elements: + return header.asFloat64Elements().defineElement(cx, obj, index, desc, shouldThrow, + succeeded); + case ArrayBufferElements: + return header.asArrayBufferElements().defineElement(cx, obj, index, desc, shouldThrow, + succeeded); + } + + __builtin_unreachable(); + return false; +} + +bool +SparseElementsHeader::setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, + uint32_t index, const Value &v, bool *succeeded) +{ + do { } while(0); + + __builtin_unreachable(); + return false; +} + +bool +DenseElementsHeader::setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, + uint32_t index, const Value &v, bool *succeeded) +{ + do { } while(0); + + __builtin_unreachable(); + return false; +} + +template +bool +TypedElementsHeader::setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, + uint32_t index, const Value &v, bool *succeeded) +{ + do { } while(0); + + uint32_t len = length(); + if (index >= len) { + + + + + *succeeded = true; + return true; + } + + + double d; + if (v.isNumber()) { + d = v.toNumber(); + } else if (v.isNull()) { + d = 0.0; + } else if (v.isPrimitive()) { + if (v.isString()) { + if (!ToNumber(cx, v, &d)) + return false; + } else if (v.isUndefined()) { + d = js_NaN; + } else { + d = double(v.toBoolean()); + } + } else { + + d = js_NaN; + } + + assign(index, d); + *succeeded = true; + return true; +} + +bool +ArrayBufferElementsHeader::setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, + uint32_t index, const Value &v, bool *succeeded) +{ + do { } while(0); + + JSObject *delegate = ArrayBufferDelegate(cx, obj); + if (!delegate) + return false; + return SetElement(cx, obj, receiver, index, v, succeeded); +} + +bool +js::SetElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, + const Value &v, bool *succeeded) +{ + __builtin_unreachable(); + + do { + do { } while(0); + + if (static_cast(obj)->isProxy()) { + __builtin_unreachable(); + return false; + } + + PropDesc ownDesc; + if (!GetOwnElement(cx, obj, index, &ownDesc)) + return false; + + if (!ownDesc.isUndefined()) { + if (ownDesc.isDataDescriptor()) { + if (!ownDesc.writable()) { + *succeeded = false; + return true; + } + + if (receiver == obj) { + PropDesc updateDesc = PropDesc::valueOnly(v); + return DefineElement(cx, receiver, index, updateDesc, false, succeeded); + } + + PropDesc newDesc; + return DefineElement(cx, receiver, index, newDesc, false, succeeded); + } + + if (ownDesc.isAccessorDescriptor()) { + Value setter = ownDesc.setterValue(); + if (setter.isUndefined()) { + *succeeded = false; + return true; + } + + InvokeArgsGuard args; + if (!cx->stack.pushInvokeArgs(cx, 1, &args)) + return false; + + + args.calleev() = setter; + args.thisv() = ObjectValue(*receiver); + args[0] = v; + + *succeeded = true; + return Invoke(cx, args); + } + + __builtin_unreachable(); + return false; + } + + obj = obj->getProto(); + if (obj) + continue; + + PropDesc newDesc(v, PropDesc::Writable, PropDesc::Enumerable, PropDesc::Configurable); + return DefineElement(cx, receiver, index, newDesc, false, succeeded); + } while (false); +} diff --git a/434452/ObjectImpl.ii.0 b/434452/ObjectImpl.ii.0 new file mode 100644 index 0000000..d95c290 --- /dev/null +++ b/434452/ObjectImpl.ii.0 @@ -0,0 +1,63541 @@ +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/obj-armv7l-unknown-linux-gnueabi/js/src//" +# 1 "" +#define __STDC__ 1 +#define __cplusplus 1 +#define __STDC_HOSTED__ 1 +#define __GNUC__ 4 +#define __GNUC_MINOR__ 5 +#define __GNUC_PATCHLEVEL__ 4 +#define __GNUG__ 4 +#define __SIZE_TYPE__ unsigned int +#define __PTRDIFF_TYPE__ int +#define __WCHAR_TYPE__ unsigned int +#define __WINT_TYPE__ unsigned int +#define __INTMAX_TYPE__ long long int +#define __UINTMAX_TYPE__ long long unsigned int +#define __CHAR16_TYPE__ short unsigned int +#define __CHAR32_TYPE__ unsigned int +#define __SIG_ATOMIC_TYPE__ int +#define __INT8_TYPE__ signed char +#define __INT16_TYPE__ short int +#define __INT32_TYPE__ int +#define __INT64_TYPE__ long long int +#define __UINT8_TYPE__ unsigned char +#define __UINT16_TYPE__ short unsigned int +#define __UINT32_TYPE__ unsigned int +#define __UINT64_TYPE__ long long unsigned int +#define __INT_LEAST8_TYPE__ signed char +#define __INT_LEAST16_TYPE__ short int +#define __INT_LEAST32_TYPE__ int +#define __INT_LEAST64_TYPE__ long long int +#define __UINT_LEAST8_TYPE__ unsigned char +#define __UINT_LEAST16_TYPE__ short unsigned int +#define __UINT_LEAST32_TYPE__ unsigned int +#define __UINT_LEAST64_TYPE__ long long unsigned int +#define __INT_FAST8_TYPE__ signed char +#define __INT_FAST16_TYPE__ int +#define __INT_FAST32_TYPE__ int +#define __INT_FAST64_TYPE__ long long int +#define __UINT_FAST8_TYPE__ unsigned char +#define __UINT_FAST16_TYPE__ unsigned int +#define __UINT_FAST32_TYPE__ unsigned int +#define __UINT_FAST64_TYPE__ long long unsigned int +#define __INTPTR_TYPE__ int +#define __UINTPTR_TYPE__ unsigned int +#define __GXX_WEAK__ 1 +#define __DEPRECATED 1 +#define __EXCEPTIONS 1 +#define __GXX_ABI_VERSION 1002 +#define __SCHAR_MAX__ 127 +#define __SHRT_MAX__ 32767 +#define __INT_MAX__ 2147483647 +#define __LONG_MAX__ 2147483647L +#define __LONG_LONG_MAX__ 9223372036854775807LL +#define __WCHAR_MAX__ 4294967295U +#define __WCHAR_MIN__ 0U +#define __WINT_MAX__ 4294967295U +#define __WINT_MIN__ 0U +#define __PTRDIFF_MAX__ 2147483647 +#define __SIZE_MAX__ 4294967295U +#define __CHAR_BIT__ 8 +#define __INTMAX_MAX__ 9223372036854775807LL +#define __INTMAX_C(c) c ## LL +#define __UINTMAX_MAX__ 18446744073709551615ULL +#define __UINTMAX_C(c) c ## ULL +#define __SIG_ATOMIC_MAX__ 2147483647 +#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) +#define __INT8_MAX__ 127 +#define __INT16_MAX__ 32767 +#define __INT32_MAX__ 2147483647 +#define __INT64_MAX__ 9223372036854775807LL +#define __UINT8_MAX__ 255 +#define __UINT16_MAX__ 65535 +#define __UINT32_MAX__ 4294967295U +#define __UINT64_MAX__ 18446744073709551615ULL +#define __INT_LEAST8_MAX__ 127 +#define __INT8_C(c) c +#define __INT_LEAST16_MAX__ 32767 +#define __INT16_C(c) c +#define __INT_LEAST32_MAX__ 2147483647 +#define __INT32_C(c) c +#define __INT_LEAST64_MAX__ 9223372036854775807LL +#define __INT64_C(c) c ## LL +#define __UINT_LEAST8_MAX__ 255 +#define __UINT8_C(c) c +#define __UINT_LEAST16_MAX__ 65535 +#define __UINT16_C(c) c +#define __UINT_LEAST32_MAX__ 4294967295U +#define __UINT32_C(c) c ## U +#define __UINT_LEAST64_MAX__ 18446744073709551615ULL +#define __UINT64_C(c) c ## ULL +#define __INT_FAST8_MAX__ 127 +#define __INT_FAST16_MAX__ 2147483647 +#define __INT_FAST32_MAX__ 2147483647 +#define __INT_FAST64_MAX__ 9223372036854775807LL +#define __UINT_FAST8_MAX__ 255 +#define __UINT_FAST16_MAX__ 4294967295U +#define __UINT_FAST32_MAX__ 4294967295U +#define __UINT_FAST64_MAX__ 18446744073709551615ULL +#define __INTPTR_MAX__ 2147483647 +#define __UINTPTR_MAX__ 4294967295U +#define __FLT_EVAL_METHOD__ 0 +#define __DEC_EVAL_METHOD__ 2 +#define __FLT_RADIX__ 2 +#define __FLT_MANT_DIG__ 24 +#define __FLT_DIG__ 6 +#define __FLT_MIN_EXP__ (-125) +#define __FLT_MIN_10_EXP__ (-37) +#define __FLT_MAX_EXP__ 128 +#define __FLT_MAX_10_EXP__ 38 +#define __FLT_MAX__ 3.4028234663852886e+38F +#define __FLT_MIN__ 1.1754943508222875e-38F +#define __FLT_EPSILON__ 1.1920928955078125e-7F +#define __FLT_DENORM_MIN__ 1.4012984643248171e-45F +#define __FLT_HAS_DENORM__ 1 +#define __FLT_HAS_INFINITY__ 1 +#define __FLT_HAS_QUIET_NAN__ 1 +#define __DBL_MANT_DIG__ 53 +#define __DBL_DIG__ 15 +#define __DBL_MIN_EXP__ (-1021) +#define __DBL_MIN_10_EXP__ (-307) +#define __DBL_MAX_EXP__ 1024 +#define __DBL_MAX_10_EXP__ 308 +#define __DBL_MAX__ ((double)1.7976931348623157e+308L) +#define __DBL_MIN__ ((double)2.2250738585072014e-308L) +#define __DBL_EPSILON__ ((double)2.2204460492503131e-16L) +#define __DBL_DENORM_MIN__ ((double)4.9406564584124654e-324L) +#define __DBL_HAS_DENORM__ 1 +#define __DBL_HAS_INFINITY__ 1 +#define __DBL_HAS_QUIET_NAN__ 1 +#define __LDBL_MANT_DIG__ 53 +#define __LDBL_DIG__ 15 +#define __LDBL_MIN_EXP__ (-1021) +#define __LDBL_MIN_10_EXP__ (-307) +#define __LDBL_MAX_EXP__ 1024 +#define __LDBL_MAX_10_EXP__ 308 +#define __DECIMAL_DIG__ 17 +#define __LDBL_MAX__ 1.7976931348623157e+308L +#define __LDBL_MIN__ 2.2250738585072014e-308L +#define __LDBL_EPSILON__ 2.2204460492503131e-16L +#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L +#define __LDBL_HAS_DENORM__ 1 +#define __LDBL_HAS_INFINITY__ 1 +#define __LDBL_HAS_QUIET_NAN__ 1 +#define __DEC32_MANT_DIG__ 7 +#define __DEC32_MIN_EXP__ (-94) +#define __DEC32_MAX_EXP__ 97 +#define __DEC32_MIN__ 1E-95DF +#define __DEC32_MAX__ 9.999999E96DF +#define __DEC32_EPSILON__ 1E-6DF +#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF +#define __DEC64_MANT_DIG__ 16 +#define __DEC64_MIN_EXP__ (-382) +#define __DEC64_MAX_EXP__ 385 +#define __DEC64_MIN__ 1E-383DD +#define __DEC64_MAX__ 9.999999999999999E384DD +#define __DEC64_EPSILON__ 1E-15DD +#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD +#define __DEC128_MANT_DIG__ 34 +#define __DEC128_MIN_EXP__ (-6142) +#define __DEC128_MAX_EXP__ 6145 +#define __DEC128_MIN__ 1E-6143DL +#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL +#define __DEC128_EPSILON__ 1E-33DL +#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL +#define __REGISTER_PREFIX__ +#define __USER_LABEL_PREFIX__ +#define __VERSION__ "4.5.4" +#define __GNUC_GNU_INLINE__ 1 +#define __OPTIMIZE__ 1 +#define __FINITE_MATH_ONLY__ 0 +#define __pic__ 2 +#define __PIC__ 2 +#define __CHAR_UNSIGNED__ 1 +#define __WCHAR_UNSIGNED__ 1 +#define __GCC_HAVE_DWARF2_CFI_ASM 1 +#define __PRAGMA_REDEFINE_EXTNAME 1 +#define __SIZEOF_INT__ 4 +#define __SIZEOF_LONG__ 4 +#define __SIZEOF_LONG_LONG__ 8 +#define __SIZEOF_SHORT__ 2 +#define __SIZEOF_FLOAT__ 4 +#define __SIZEOF_DOUBLE__ 8 +#define __SIZEOF_LONG_DOUBLE__ 8 +#define __SIZEOF_SIZE_T__ 4 +#define __SIZEOF_WCHAR_T__ 4 +#define __SIZEOF_WINT_T__ 4 +#define __SIZEOF_PTRDIFF_T__ 4 +#define __SIZEOF_POINTER__ 4 +#define __arm__ 1 +#define __APCS_32__ 1 +#define __ARMEL__ 1 +#define __VFP_FP__ 1 +#define __THUMB_INTERWORK__ 1 +#define __ARM_ARCH_7A__ 1 +#define __ARM_PCS_VFP 1 +#define __ARM_EABI__ 1 +#define __GXX_TYPEINFO_EQUALITY_INLINE 0 +#define __gnu_linux__ 1 +#define __linux 1 +#define __linux__ 1 +#define linux 1 +#define __unix 1 +#define __unix__ 1 +#define unix 1 +#define __ELF__ 1 +#define __BIGGEST_ALIGNMENT__ 8 +# 1 "" +#define _GNU_SOURCE 1 +#define _REENTRANT 1 +#define MOZ_GLUE_IN_PROGRAM 1 +#define EXPORT_JS_API 1 +#define JS_HAS_CTYPES 1 +#define DLL_PREFIX "lib" +#define DLL_SUFFIX ".so" +#define NO_NSPR_10_SUPPORT 1 +#define NDEBUG 1 +#define TRIMMED 1 +#define USE_SYSTEM_MALLOC 1 +#define ENABLE_ASSEMBLER 1 +#define ENABLE_JIT 1 +#define MOZILLA_CLIENT 1 +#define _FORTIFY_SOURCE 2 +# 1 "././js-confdefs.h" 1 + + + + + + +#define _JS_CONFDEFS_H_ + +#define CPP_THROW_NEW throw() +#define CROSS_COMPILE 1 +#define D_INO d_ino +#define EDITLINE 1 +#define HAVE_ARM_NEON 1 +#define HAVE_ARM_SIMD 1 +#define HAVE_CPP_AMBIGUITY_RESOLVING_USING 1 +#define HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR 1 +#define HAVE_CPP_PARTIAL_SPECIALIZATION 1 +#define HAVE_DIRENT_H 1 +#define HAVE_DLADDR 1 +#define HAVE_DLOPEN 1 +#define HAVE_ENDIAN_H 1 +#define HAVE_FCHMOD 1 +#define HAVE_FLOCKFILE 1 +#define HAVE_GETC_UNLOCKED 1 +#define HAVE_GETOPT_H 1 +#define HAVE_GETPAGESIZE 1 +#define HAVE_GNU_GET_LIBC_VERSION 1 +#define HAVE_GNU_LIBC_VERSION_H 1 +#define HAVE_I18N_LC_MESSAGES 1 +#define HAVE_ICONV 1 +#define HAVE_LCHOWN 1 +#define HAVE_LINUX_QUOTA_H 1 +#define HAVE_LOCALECONV 1 +#define HAVE_LOCALECONV 1 +#define HAVE_LOCALTIME_R 1 +#define HAVE_LSTAT64 1 +#define HAVE_MALLOC_H 1 +#define HAVE_MBRTOWC 1 +#define HAVE_MEMALIGN 1 +#define HAVE_MEMMOVE 1 +#define HAVE_MEMORY_H 1 +#define HAVE_MMINTRIN_H 1 +#define HAVE_NL_TYPES_H 1 +#define HAVE_POSIX_FALLOCATE 1 +#define HAVE_POSIX_MEMALIGN 1 +#define HAVE_RANDOM 1 +#define HAVE_RES_NINIT 1 +#define HAVE_SBRK 1 +#define HAVE_SETLOCALE 1 +#define HAVE_SIGINFO_T 1 +#define HAVE_SNPRINTF 1 +#define HAVE_SSIZE_T 1 +#define HAVE_STAT64 1 +#define HAVE_STATVFS 1 +#define HAVE_STATVFS64 1 +#define HAVE_STRERROR 1 +#define HAVE_STRNDUP 1 +#define HAVE_STRTOK_R 1 +#define HAVE_ST_BLKSIZE 1 +#define HAVE_SYS_BITYPES_H 1 +#define HAVE_SYS_CDEFS_H 1 +#define HAVE_SYS_MOUNT_H 1 +#define HAVE_SYS_QUOTA_H 1 +#define HAVE_SYS_STATFS_H 1 +#define HAVE_SYS_STATVFS_H 1 +#define HAVE_SYS_VFS_H 1 +#define HAVE_THREAD_TLS_KEYWORD 1 +#define HAVE_TM_ZONE_TM_GMTOFF 1 +#define HAVE_TRUNCATE64 1 +#define HAVE_UINT 1 +#define HAVE_UNAME_DOMAINNAME_FIELD 1 +#define HAVE_UNISTD_H 1 +#define HAVE_VALLOC 1 +#define HAVE_VA_COPY 1 +#define HAVE_VISIBILITY_ATTRIBUTE 1 +#define HAVE_VISIBILITY_HIDDEN_ATTRIBUTE 1 +#define HAVE_WCRTOMB 1 +#define HAVE_X11_XKBLIB_H 1 +#define HAVE__UNWIND_BACKTRACE 1 +#define HAVE___CXA_DEMANGLE 1 +#define JSGC_INCREMENTAL 1 +#define JS_ALIGN_OF_POINTER 4 +#define JS_BITS_PER_WORD_LOG2 5 +#define JS_BYTES_PER_DOUBLE 8 +#define JS_BYTES_PER_WORD 4 +#define JS_CPU_ARM 1 +#define JS_DEFAULT_JITREPORT_GRANULARITY 3 +#define JS_HAS_CTYPES 1 +#define JS_HAS_XML_SUPPORT 1 +#define JS_HAVE_ENDIAN_H 1 +#define JS_METHODJIT 1 +#define JS_MONOIC 1 +#define JS_NUNBOX32 1 +#define JS_POLYIC 1 +#define JS_THREADSAFE 1 +#define MALLOC_H +#define MOZ_DEBUG_SYMBOLS 1 +#define MOZ_DLL_SUFFIX ".so" +#define MOZ_MEMORY 1 +#define MOZ_MEMORY_LINUX 1 +#define MOZ_MEMORY_SIZEOF_PTR_2POW 2 +#define NEED_CPP_UNUSED_IMPLEMENTATIONS 1 +#define NEW_H +#define NS_ALWAYS_INLINE __attribute__((always_inline)) +#define NS_ATTR_MALLOC __attribute__((malloc)) +#define NS_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#define SIZEOF_INT_P 4 +#define STATIC_EXPORTABLE_JS_API 1 +#define STDC_HEADERS 1 +#define UNIX_ASYNC_DNS 1 +#define VA_COPY va_copy +#define XP_UNIX 1 +#define _REENTRANT 1 + + + + +#define __STDC_LIMIT_MACROS +# 1 "" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" + + + + + + + +# 1 "./../../dist/include/mozilla/Assertions.h" 1 +# 11 "./../../dist/include/mozilla/Assertions.h" +#define mozilla_Assertions_h_ + +# 1 "./../../dist/include/mozilla/Attributes.h" 1 +# 11 "./../../dist/include/mozilla/Attributes.h" +#define mozilla_Attributes_h_ +# 25 "./../../dist/include/mozilla/Attributes.h" +#define MOZ_INLINE inline +# 46 "./../../dist/include/mozilla/Attributes.h" +#define MOZ_ALWAYS_INLINE __attribute__((always_inline)) MOZ_INLINE +# 106 "./../../dist/include/mozilla/Attributes.h" +#define MOZ_HAVE_NEVER_INLINE __attribute__((noinline)) +#define MOZ_HAVE_NORETURN __attribute__((noreturn)) +# 125 "./../../dist/include/mozilla/Attributes.h" +#define MOZ_NEVER_INLINE MOZ_HAVE_NEVER_INLINE +# 145 "./../../dist/include/mozilla/Attributes.h" +#define MOZ_NORETURN MOZ_HAVE_NORETURN +# 159 "./../../dist/include/mozilla/Attributes.h" +#define MOZ_ASAN_BLACKLIST +# 190 "./../../dist/include/mozilla/Attributes.h" +#define MOZ_DELETE +# 231 "./../../dist/include/mozilla/Attributes.h" +#define MOZ_OVERRIDE +# 300 "./../../dist/include/mozilla/Attributes.h" +#define MOZ_FINAL +# 317 "./../../dist/include/mozilla/Attributes.h" +#define MOZ_WARN_UNUSED_RESULT __attribute__ ((warn_unused_result)) +# 14 "./../../dist/include/mozilla/Assertions.h" 2 +# 1 "./../../dist/include/mozilla/Types.h" 1 +# 11 "./../../dist/include/mozilla/Types.h" +#define mozilla_Types_h_ +# 24 "./../../dist/include/mozilla/Types.h" +# 1 "./../../dist/include/mozilla/StandardInteger.h" 1 +# 11 "./../../dist/include/mozilla/StandardInteger.h" +#define mozilla_StandardInteger_h_ +# 42 "./../../dist/include/mozilla/StandardInteger.h" +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stdint.h" 1 3 4 + + +# 1 "/usr/include/stdint.h" 1 3 4 +# 24 "/usr/include/stdint.h" 3 4 +#define _STDINT_H 1 + +# 1 "/usr/include/features.h" 1 3 4 +# 21 "/usr/include/features.h" 3 4 +#define _FEATURES_H 1 +# 98 "/usr/include/features.h" 3 4 +#undef __USE_ISOC99 +#undef __USE_ISOC95 +#undef __USE_POSIX +#undef __USE_POSIX2 +#undef __USE_POSIX199309 +#undef __USE_POSIX199506 +#undef __USE_XOPEN +#undef __USE_XOPEN_EXTENDED +#undef __USE_UNIX98 +#undef __USE_XOPEN2K +#undef __USE_XOPEN2KXSI +#undef __USE_XOPEN2K8 +#undef __USE_XOPEN2K8XSI +#undef __USE_LARGEFILE +#undef __USE_LARGEFILE64 +#undef __USE_FILE_OFFSET64 +#undef __USE_BSD +#undef __USE_SVID +#undef __USE_MISC +#undef __USE_ATFILE +#undef __USE_GNU +#undef __USE_REENTRANT +#undef __USE_FORTIFY_LEVEL +#undef __FAVOR_BSD +#undef __KERNEL_STRICT_NAMES + + + + +#define __KERNEL_STRICT_NAMES + + + +#define __USE_ANSI 1 +# 141 "/usr/include/features.h" 3 4 +#define __GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) +# 157 "/usr/include/features.h" 3 4 +#undef _ISOC95_SOURCE +#define _ISOC95_SOURCE 1 +#undef _ISOC99_SOURCE +#define _ISOC99_SOURCE 1 +#undef _POSIX_SOURCE +#define _POSIX_SOURCE 1 +#undef _POSIX_C_SOURCE +#define _POSIX_C_SOURCE 200809L +#undef _XOPEN_SOURCE +#define _XOPEN_SOURCE 700 +#undef _XOPEN_SOURCE_EXTENDED +#define _XOPEN_SOURCE_EXTENDED 1 +#undef _LARGEFILE64_SOURCE +#define _LARGEFILE64_SOURCE 1 +#undef _BSD_SOURCE +#define _BSD_SOURCE 1 +#undef _SVID_SOURCE +#define _SVID_SOURCE 1 +#undef _ATFILE_SOURCE +#define _ATFILE_SOURCE 1 +# 194 "/usr/include/features.h" 3 4 +#define __USE_ISOC99 1 + + + + + +#define __USE_ISOC95 1 +# 221 "/usr/include/features.h" 3 4 +#define __USE_POSIX 1 + + + +#define __USE_POSIX2 1 + + + +#define __USE_POSIX199309 1 + + + +#define __USE_POSIX199506 1 + + + +#define __USE_XOPEN2K 1 +#undef __USE_ISOC95 +#define __USE_ISOC95 1 +#undef __USE_ISOC99 +#define __USE_ISOC99 1 + + + +#define __USE_XOPEN2K8 1 +#undef _ATFILE_SOURCE +#define _ATFILE_SOURCE 1 + + + +#define __USE_XOPEN 1 + +#define __USE_XOPEN_EXTENDED 1 +#define __USE_UNIX98 1 +#undef _LARGEFILE_SOURCE +#define _LARGEFILE_SOURCE 1 + + +#define __USE_XOPEN2K8 1 +#define __USE_XOPEN2K8XSI 1 + +#define __USE_XOPEN2K 1 +#define __USE_XOPEN2KXSI 1 +#undef __USE_ISOC95 +#define __USE_ISOC95 1 +#undef __USE_ISOC99 +#define __USE_ISOC99 1 +# 277 "/usr/include/features.h" 3 4 +#define __USE_LARGEFILE 1 + + + +#define __USE_LARGEFILE64 1 + + + + + + + +#define __USE_MISC 1 + + + +#define __USE_BSD 1 + + + +#define __USE_SVID 1 + + + +#define __USE_ATFILE 1 + + + +#define __USE_GNU 1 + + + +#define __USE_REENTRANT 1 + + + + + +#define __USE_FORTIFY_LEVEL 2 +# 324 "/usr/include/features.h" 3 4 +#define __STDC_IEC_559__ 1 +#define __STDC_IEC_559_COMPLEX__ 1 + + +#define __STDC_ISO_10646__ 200009L + + + + + + + +#undef __GNU_LIBRARY__ +#define __GNU_LIBRARY__ 6 + + + +#define __GLIBC__ 2 +#define __GLIBC_MINOR__ 15 + +#define __GLIBC_PREREQ(maj,min) ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) + + + + + + + +#define __GLIBC_HAVE_LONG_LONG 1 + + + + + +# 1 "/usr/include/sys/cdefs.h" 1 3 4 +# 21 "/usr/include/sys/cdefs.h" 3 4 +#define _SYS_CDEFS_H 1 +# 36 "/usr/include/sys/cdefs.h" 3 4 +#undef __P +#undef __PMT +# 47 "/usr/include/sys/cdefs.h" 3 4 +#define __LEAF +#define __LEAF_ATTR +# 62 "/usr/include/sys/cdefs.h" 3 4 +#define __THROW throw () +#define __THROWNL throw () +#define __NTH(fct) __LEAF_ATTR fct throw () +# 88 "/usr/include/sys/cdefs.h" 3 4 +#define __P(args) args +#define __PMT(args) args + + + + +#define __CONCAT(x,y) x ## y +#define __STRING(x) #x + + +#define __ptr_t void * +#define __long_double_t long double + + + + +#define __BEGIN_DECLS extern "C" { +#define __END_DECLS } +# 128 "/usr/include/sys/cdefs.h" 3 4 +#define __BEGIN_NAMESPACE_STD +#define __END_NAMESPACE_STD +#define __USING_NAMESPACE_STD(name) +#define __BEGIN_NAMESPACE_C99 +#define __END_NAMESPACE_C99 +#define __USING_NAMESPACE_C99(name) + + + + + +#define __bounded +#define __unbounded +#define __ptrvalue + + + + +#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) +#define __bos0(ptr) __builtin_object_size (ptr, 0) + + +#define __warndecl(name,msg) extern void name (void) __attribute__((__warning__ (msg))) + +#define __warnattr(msg) __attribute__((__warning__ (msg))) +#define __errordecl(name,msg) extern void name (void) __attribute__((__error__ (msg))) +# 164 "/usr/include/sys/cdefs.h" 3 4 +#define __flexarr [] +# 191 "/usr/include/sys/cdefs.h" 3 4 +#define __REDIRECT(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) + +#define __REDIRECT_NTH(name,proto,alias) name proto __THROW __asm__ (__ASMNAME (#alias)) + +#define __REDIRECT_NTHNL(name,proto,alias) name proto __THROWNL __asm__ (__ASMNAME (#alias)) + + + + + + + +#define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname) +#define __ASMNAME2(prefix,cname) __STRING (prefix) cname +# 225 "/usr/include/sys/cdefs.h" 3 4 +#define __attribute_malloc__ __attribute__ ((__malloc__)) +# 234 "/usr/include/sys/cdefs.h" 3 4 +#define __attribute_pure__ __attribute__ ((__pure__)) + + + + + + +#define __attribute_const__ __attribute__ ((__const__)) +# 250 "/usr/include/sys/cdefs.h" 3 4 +#define __attribute_used__ __attribute__ ((__used__)) +#define __attribute_noinline__ __attribute__ ((__noinline__)) + + + + + + + +#define __attribute_deprecated__ __attribute__ ((__deprecated__)) +# 271 "/usr/include/sys/cdefs.h" 3 4 +#define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x))) +# 281 "/usr/include/sys/cdefs.h" 3 4 +#define __attribute_format_strfmon__(a,b) __attribute__ ((__format__ (__strfmon__, a, b))) +# 290 "/usr/include/sys/cdefs.h" 3 4 +#define __nonnull(params) __attribute__ ((__nonnull__ params)) + + + + + + + +#define __attribute_warn_unused_result__ __attribute__ ((__warn_unused_result__)) + + +#define __wur __attribute_warn_unused_result__ +# 312 "/usr/include/sys/cdefs.h" 3 4 +#define __always_inline __inline __attribute__ ((__always_inline__)) +# 321 "/usr/include/sys/cdefs.h" 3 4 +#define __extern_inline extern __inline __attribute__ ((__gnu_inline__)) + +#define __extern_always_inline extern __always_inline __attribute__ ((__gnu_inline__, __artificial__)) +# 343 "/usr/include/sys/cdefs.h" 3 4 +#define __va_arg_pack() __builtin_va_arg_pack () +#define __va_arg_pack_len() __builtin_va_arg_pack_len () +# 367 "/usr/include/sys/cdefs.h" 3 4 +#define __restrict_arr +# 378 "/usr/include/sys/cdefs.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 19 "/usr/include/bits/wordsize.h" 3 4 +#define __WORDSIZE 32 +# 379 "/usr/include/sys/cdefs.h" 2 3 4 +# 400 "/usr/include/sys/cdefs.h" 3 4 +#define __LDBL_REDIR1(name,proto,alias) name proto +#define __LDBL_REDIR(name,proto) name proto +#define __LDBL_REDIR1_NTH(name,proto,alias) name proto __THROW +#define __LDBL_REDIR_NTH(name,proto) name proto __THROW +#define __LDBL_REDIR_DECL(name) + +#define __REDIRECT_LDBL(name,proto,alias) __REDIRECT (name, proto, alias) +#define __REDIRECT_NTH_LDBL(name,proto,alias) __REDIRECT_NTH (name, proto, alias) +# 359 "/usr/include/features.h" 2 3 4 +# 374 "/usr/include/features.h" 3 4 +#define __USE_EXTERN_INLINES 1 + + + + + + + +# 1 "/usr/include/gnu/stubs.h" 1 3 4 +# 10 "/usr/include/gnu/stubs.h" 3 4 +#define __stub_chflags +#define __stub_create_module +#define __stub_fattach +#define __stub_fchflags +#define __stub_fdetach +#define __stub_get_kernel_syms +#define __stub_getcontext +#define __stub_getmsg +#define __stub_getpmsg +#define __stub_gtty +#define __stub_lchmod +#define __stub_makecontext +#define __stub_putmsg +#define __stub_putpmsg +#define __stub_query_module +#define __stub_revoke +#define __stub_setcontext +#define __stub_setlogin +#define __stub_sigreturn +#define __stub_sstk +#define __stub_stty +#define __stub_swapcontext +# 383 "/usr/include/features.h" 2 3 4 +# 27 "/usr/include/stdint.h" 2 3 4 +# 1 "/usr/include/bits/wchar.h" 1 3 4 +# 21 "/usr/include/bits/wchar.h" 3 4 +#define _BITS_WCHAR_H 1 + +#define __WCHAR_MIN (-2147483647 - 1) +#define __WCHAR_MAX (2147483647) +# 28 "/usr/include/stdint.h" 2 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 19 "/usr/include/bits/wordsize.h" 3 4 +#define __WORDSIZE 32 +# 29 "/usr/include/stdint.h" 2 3 4 + + + + + + + +#define __int8_t_defined +typedef signed char int8_t; +typedef short int int16_t; +typedef int int32_t; + + + +__extension__ +typedef long long int int64_t; + + + + +typedef unsigned char uint8_t; +typedef unsigned short int uint16_t; + +typedef unsigned int uint32_t; +#define __uint32_t_defined + + + + +__extension__ +typedef unsigned long long int uint64_t; + + + + + + +typedef signed char int_least8_t; +typedef short int int_least16_t; +typedef int int_least32_t; + + + +__extension__ +typedef long long int int_least64_t; + + + +typedef unsigned char uint_least8_t; +typedef unsigned short int uint_least16_t; +typedef unsigned int uint_least32_t; + + + +__extension__ +typedef unsigned long long int uint_least64_t; + + + + + + +typedef signed char int_fast8_t; + + + + + +typedef int int_fast16_t; +typedef int int_fast32_t; +__extension__ +typedef long long int int_fast64_t; + + + +typedef unsigned char uint_fast8_t; + + + + + +typedef unsigned int uint_fast16_t; +typedef unsigned int uint_fast32_t; +__extension__ +typedef unsigned long long int uint_fast64_t; +# 126 "/usr/include/stdint.h" 3 4 +typedef int intptr_t; +#define __intptr_t_defined + +typedef unsigned int uintptr_t; +# 138 "/usr/include/stdint.h" 3 4 +__extension__ +typedef long long int intmax_t; +__extension__ +typedef unsigned long long int uintmax_t; +# 153 "/usr/include/stdint.h" 3 4 +#define __INT64_C(c) c ## LL +#define __UINT64_C(c) c ## ULL + + + + + +#define INT8_MIN (-128) +#define INT16_MIN (-32767-1) +#define INT32_MIN (-2147483647-1) +#define INT64_MIN (-__INT64_C(9223372036854775807)-1) + +#define INT8_MAX (127) +#define INT16_MAX (32767) +#define INT32_MAX (2147483647) +#define INT64_MAX (__INT64_C(9223372036854775807)) + + +#define UINT8_MAX (255) +#define UINT16_MAX (65535) +#define UINT32_MAX (4294967295U) +#define UINT64_MAX (__UINT64_C(18446744073709551615)) + + + +#define INT_LEAST8_MIN (-128) +#define INT_LEAST16_MIN (-32767-1) +#define INT_LEAST32_MIN (-2147483647-1) +#define INT_LEAST64_MIN (-__INT64_C(9223372036854775807)-1) + +#define INT_LEAST8_MAX (127) +#define INT_LEAST16_MAX (32767) +#define INT_LEAST32_MAX (2147483647) +#define INT_LEAST64_MAX (__INT64_C(9223372036854775807)) + + +#define UINT_LEAST8_MAX (255) +#define UINT_LEAST16_MAX (65535) +#define UINT_LEAST32_MAX (4294967295U) +#define UINT_LEAST64_MAX (__UINT64_C(18446744073709551615)) + + + +#define INT_FAST8_MIN (-128) + + + + +#define INT_FAST16_MIN (-2147483647-1) +#define INT_FAST32_MIN (-2147483647-1) + +#define INT_FAST64_MIN (-__INT64_C(9223372036854775807)-1) + +#define INT_FAST8_MAX (127) + + + + +#define INT_FAST16_MAX (2147483647) +#define INT_FAST32_MAX (2147483647) + +#define INT_FAST64_MAX (__INT64_C(9223372036854775807)) + + +#define UINT_FAST8_MAX (255) + + + + +#define UINT_FAST16_MAX (4294967295U) +#define UINT_FAST32_MAX (4294967295U) + +#define UINT_FAST64_MAX (__UINT64_C(18446744073709551615)) +# 234 "/usr/include/stdint.h" 3 4 +#define INTPTR_MIN (-2147483647-1) +#define INTPTR_MAX (2147483647) +#define UINTPTR_MAX (4294967295U) + + + + +#define INTMAX_MIN (-__INT64_C(9223372036854775807)-1) + +#define INTMAX_MAX (__INT64_C(9223372036854775807)) + + +#define UINTMAX_MAX (__UINT64_C(18446744073709551615)) +# 256 "/usr/include/stdint.h" 3 4 +#define PTRDIFF_MIN (-2147483647-1) +#define PTRDIFF_MAX (2147483647) + + + +#define SIG_ATOMIC_MIN (-2147483647-1) +#define SIG_ATOMIC_MAX (2147483647) + + + + + +#define SIZE_MAX (4294967295U) + + + + + +#define WCHAR_MIN __WCHAR_MIN +#define WCHAR_MAX __WCHAR_MAX + + + +#define WINT_MIN (0u) +#define WINT_MAX (4294967295u) +# 4 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stdint.h" 2 3 4 + + + +#define _GCC_WRAP_STDINT_H +# 43 "./../../dist/include/mozilla/StandardInteger.h" 2 +# 25 "./../../dist/include/mozilla/Types.h" 2 + + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 40 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#define _STDDEF_H +#define _STDDEF_H_ + +#define _ANSI_STDDEF_H + +#define __STDDEF_H__ +# 138 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#define _PTRDIFF_T +#define _T_PTRDIFF_ +#define _T_PTRDIFF +#define __PTRDIFF_T +#define _PTRDIFF_T_ +#define _BSD_PTRDIFF_T_ +#define ___int_ptrdiff_t_h +#define _GCC_PTRDIFF_T + + + +typedef int ptrdiff_t; +# 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 186 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#define __size_t__ +#define __SIZE_T__ +#define _SIZE_T +#define _SYS_SIZE_T_H +#define _T_SIZE_ +#define _T_SIZE +#define __SIZE_T +#define _SIZE_T_ +#define _BSD_SIZE_T_ +#define _SIZE_T_DEFINED_ +#define _SIZE_T_DEFINED +#define _BSD_SIZE_T_DEFINED_ +#define _SIZE_T_DECLARED +#define ___int_size_t_h +#define _GCC_SIZE_T +#define _SIZET_ + + + +#define __size_t + + + + + +typedef unsigned int size_t; +# 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_size_t +# 262 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#define __wchar_t__ +#define __WCHAR_T__ +#define _WCHAR_T +#define _T_WCHAR_ +#define _T_WCHAR +#define __WCHAR_T +#define _WCHAR_T_ +#define _BSD_WCHAR_T_ +#define _WCHAR_T_DEFINED_ +#define _WCHAR_T_DEFINED +#define _WCHAR_T_H +#define ___int_wchar_t_h +#define __INT_WCHAR_T_H +#define _GCC_WCHAR_T +#define _WCHAR_T_DECLARED +# 289 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef _BSD_WCHAR_T_ +# 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 28 "./../../dist/include/mozilla/Types.h" 2 +# 54 "./../../dist/include/mozilla/Types.h" +#define MOZ_EXTERNAL_VIS __attribute__((visibility("default"))) + + + + + +#define MOZ_EXPORT_API(type) MOZ_EXTERNAL_VIS type +#define MOZ_EXPORT_DATA(type) MOZ_EXTERNAL_VIS type +# 80 "./../../dist/include/mozilla/Types.h" +#define MOZ_IMPORT_API(x) MOZ_EXPORT_API(x) + + + + + + + +#define MOZ_IMPORT_DATA(x) MOZ_EXPORT_DATA(x) +# 105 "./../../dist/include/mozilla/Types.h" +#define MFBT_API(type) __attribute__((weak)) MOZ_IMPORT_API(type) +#define MFBT_DATA(type) __attribute__((weak)) MOZ_IMPORT_DATA(type) +# 131 "./../../dist/include/mozilla/Types.h" +#define MOZ_BEGIN_EXTERN_C extern "C" { +#define MOZ_END_EXTERN_C } +# 15 "./../../dist/include/mozilla/Assertions.h" 2 + +# 1 "/usr/include/stdio.h" 1 3 4 +# 27 "/usr/include/stdio.h" 3 4 +#define _STDIO_H 1 + + +extern "C" { + +#define __need_size_t +#define __need_NULL +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 35 "/usr/include/stdio.h" 2 3 4 + +# 1 "/usr/include/bits/types.h" 1 3 4 +# 25 "/usr/include/bits/types.h" 3 4 +#define _BITS_TYPES_H 1 + + +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 19 "/usr/include/bits/wordsize.h" 3 4 +#define __WORDSIZE 32 +# 29 "/usr/include/bits/types.h" 2 3 4 + + +typedef unsigned char __u_char; +typedef unsigned short int __u_short; +typedef unsigned int __u_int; +typedef unsigned long int __u_long; + + +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; + + + + +__extension__ typedef signed long long int __int64_t; +__extension__ typedef unsigned long long int __uint64_t; + + + + + + + +__extension__ typedef long long int __quad_t; +__extension__ typedef unsigned long long int __u_quad_t; +# 99 "/usr/include/bits/types.h" 3 4 +#define __S16_TYPE short int +#define __U16_TYPE unsigned short int +#define __S32_TYPE int +#define __U32_TYPE unsigned int +#define __SLONGWORD_TYPE long int +#define __ULONGWORD_TYPE unsigned long int + +#define __SQUAD_TYPE __quad_t +#define __UQUAD_TYPE __u_quad_t +#define __SWORD_TYPE int +#define __UWORD_TYPE unsigned int +#define __SLONG32_TYPE long int +#define __ULONG32_TYPE unsigned long int +#define __S64_TYPE __quad_t +#define __U64_TYPE __u_quad_t + + +#define __STD_TYPE __extension__ typedef +# 131 "/usr/include/bits/types.h" 3 4 +# 1 "/usr/include/bits/typesizes.h" 1 3 4 +# 25 "/usr/include/bits/typesizes.h" 3 4 +#define _BITS_TYPESIZES_H 1 + + + + +#define __DEV_T_TYPE __UQUAD_TYPE +#define __UID_T_TYPE __U32_TYPE +#define __GID_T_TYPE __U32_TYPE +#define __INO_T_TYPE __ULONGWORD_TYPE +#define __INO64_T_TYPE __UQUAD_TYPE +#define __MODE_T_TYPE __U32_TYPE +#define __NLINK_T_TYPE __UWORD_TYPE +#define __OFF_T_TYPE __SLONGWORD_TYPE +#define __OFF64_T_TYPE __SQUAD_TYPE +#define __PID_T_TYPE __S32_TYPE +#define __RLIM_T_TYPE __ULONGWORD_TYPE +#define __RLIM64_T_TYPE __UQUAD_TYPE +#define __BLKCNT_T_TYPE __SLONGWORD_TYPE +#define __BLKCNT64_T_TYPE __SQUAD_TYPE +#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE +#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE +#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE +#define __FSFILCNT64_T_TYPE __UQUAD_TYPE +#define __ID_T_TYPE __U32_TYPE +#define __CLOCK_T_TYPE __SLONGWORD_TYPE +#define __TIME_T_TYPE __SLONGWORD_TYPE +#define __USECONDS_T_TYPE __U32_TYPE +#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE +#define __DADDR_T_TYPE __S32_TYPE +#define __SWBLK_T_TYPE __SLONGWORD_TYPE +#define __KEY_T_TYPE __S32_TYPE +#define __CLOCKID_T_TYPE __S32_TYPE +#define __TIMER_T_TYPE void * +#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE +#define __FSID_T_TYPE struct { int __val[2]; } +#define __SSIZE_T_TYPE __SWORD_TYPE + + +#define __FD_SETSIZE 1024 +# 132 "/usr/include/bits/types.h" 2 3 4 + + +__extension__ typedef __u_quad_t __dev_t; +__extension__ typedef unsigned int __uid_t; +__extension__ typedef unsigned int __gid_t; +__extension__ typedef unsigned long int __ino_t; +__extension__ typedef __u_quad_t __ino64_t; +__extension__ typedef unsigned int __mode_t; +__extension__ typedef unsigned int __nlink_t; +__extension__ typedef long int __off_t; +__extension__ typedef __quad_t __off64_t; +__extension__ typedef int __pid_t; +__extension__ typedef struct { int __val[2]; } __fsid_t; +__extension__ typedef long int __clock_t; +__extension__ typedef unsigned long int __rlim_t; +__extension__ typedef __u_quad_t __rlim64_t; +__extension__ typedef unsigned int __id_t; +__extension__ typedef long int __time_t; +__extension__ typedef unsigned int __useconds_t; +__extension__ typedef long int __suseconds_t; + +__extension__ typedef int __daddr_t; +__extension__ typedef long int __swblk_t; +__extension__ typedef int __key_t; + + +__extension__ typedef int __clockid_t; + + +__extension__ typedef void * __timer_t; + + +__extension__ typedef long int __blksize_t; + + + + +__extension__ typedef long int __blkcnt_t; +__extension__ typedef __quad_t __blkcnt64_t; + + +__extension__ typedef unsigned long int __fsblkcnt_t; +__extension__ typedef __u_quad_t __fsblkcnt64_t; + + +__extension__ typedef unsigned long int __fsfilcnt_t; +__extension__ typedef __u_quad_t __fsfilcnt64_t; + +__extension__ typedef int __ssize_t; + + + +typedef __off64_t __loff_t; +typedef __quad_t *__qaddr_t; +typedef char *__caddr_t; + + +__extension__ typedef int __intptr_t; + + +__extension__ typedef unsigned int __socklen_t; + + +#undef __STD_TYPE +# 37 "/usr/include/stdio.h" 2 3 4 +#define __need_FILE +#define __need___FILE + + + + + + +struct _IO_FILE; + + + +typedef struct _IO_FILE FILE; + + + + + + + +#define __FILE_defined 1 + +#undef __need_FILE + + + + + +typedef struct _IO_FILE __FILE; + +#define ____FILE_defined 1 + +#undef __need___FILE + + + +#define _STDIO_USES_IOSTREAM + +# 1 "/usr/include/libio.h" 1 3 4 +# 30 "/usr/include/libio.h" 3 4 +#define _IO_STDIO_H + +# 1 "/usr/include/_G_config.h" 1 3 4 + + + + +#define _G_config_h 1 + + + + +#define __need_size_t + + + +#define __need_NULL +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 16 "/usr/include/_G_config.h" 2 3 4 +#define __need_mbstate_t + + + +# 1 "/usr/include/wchar.h" 1 3 4 +# 81 "/usr/include/wchar.h" 3 4 +#define __mbstate_t_defined 1 + +typedef struct +{ + int __count; + union + { + + unsigned int __wch; + + + + char __wchb[4]; + } __value; +} __mbstate_t; + +#undef __need_mbstate_t +# 896 "/usr/include/wchar.h" 3 4 +#undef __need_mbstate_t +#undef __need_wint_t +# 21 "/usr/include/_G_config.h" 2 3 4 +#define _G_size_t size_t +typedef struct +{ + __off_t __pos; + __mbstate_t __state; +} _G_fpos_t; +typedef struct +{ + __off64_t __pos; + __mbstate_t __state; +} _G_fpos64_t; +#define _G_ssize_t __ssize_t +#define _G_off_t __off_t +#define _G_off64_t __off64_t +#define _G_pid_t __pid_t +#define _G_uid_t __uid_t +#define _G_wchar_t wchar_t +#define _G_wint_t wint_t +#define _G_stat64 stat64 +# 53 "/usr/include/_G_config.h" 3 4 +typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); +typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); + +#define _G_HAVE_BOOL 1 + + + +#define _G_HAVE_ATEXIT 1 +#define _G_HAVE_SYS_CDEFS 1 +#define _G_HAVE_SYS_WAIT 1 +#define _G_NEED_STDARG_H 1 +#define _G_va_list __gnuc_va_list + +#define _G_HAVE_PRINTF_FP 1 +#define _G_HAVE_MMAP 1 +#define _G_HAVE_MREMAP 1 +#define _G_HAVE_LONG_DOUBLE_IO 1 +#define _G_HAVE_IO_FILE_OPEN 1 +#define _G_HAVE_IO_GETLINE_INFO 1 + +#define _G_IO_IO_FILE_VERSION 0x20001 + +#define _G_OPEN64 __open64 +#define _G_LSEEK64 __lseek64 +#define _G_MMAP64 __mmap64 +#define _G_FSTAT64(fd,buf) __fxstat64 (_STAT_VER, fd, buf) + + +#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE) + +#define _G_BUFSIZ 8192 + + +#define _G_NAMES_HAVE_UNDERSCORE 0 +#define _G_VTABLE_LABEL_HAS_LENGTH 1 +#define _G_USING_THUNKS 1 +#define _G_VTABLE_LABEL_PREFIX "__vt_" +#define _G_VTABLE_LABEL_PREFIX_ID __vt_ + + + +#define _G_ARGS(ARGLIST) ARGLIST +# 33 "/usr/include/libio.h" 2 3 4 + +#define _IO_pos_t _G_fpos_t +#define _IO_fpos_t _G_fpos_t +#define _IO_fpos64_t _G_fpos64_t +#define _IO_size_t _G_size_t +#define _IO_ssize_t _G_ssize_t +#define _IO_off_t _G_off_t +#define _IO_off64_t _G_off64_t +#define _IO_pid_t _G_pid_t +#define _IO_uid_t _G_uid_t +#define _IO_iconv_t _G_iconv_t +#define _IO_HAVE_SYS_WAIT _G_HAVE_SYS_WAIT +#define _IO_HAVE_ST_BLKSIZE _G_HAVE_ST_BLKSIZE +#define _IO_BUFSIZ _G_BUFSIZ +#define _IO_va_list _G_va_list +#define _IO_wint_t _G_wint_t + + + +#define __need___va_list +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stdarg.h" 1 3 4 +# 34 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stdarg.h" 3 4 +#undef __need___va_list + + + + +#define __GNUC_VA_LIST +typedef __builtin_va_list __gnuc_va_list; +# 54 "/usr/include/libio.h" 2 3 4 + +#undef _IO_va_list +#define _IO_va_list __gnuc_va_list +# 76 "/usr/include/libio.h" 3 4 +#define _PARAMS(protos) __P(protos) + + + + + + + +#define _IO_UNIFIED_JUMPTABLES 1 + + + + + +#define EOF (-1) +# 105 "/usr/include/libio.h" 3 4 +#define _IOS_INPUT 1 +#define _IOS_OUTPUT 2 +#define _IOS_ATEND 4 +#define _IOS_APPEND 8 +#define _IOS_TRUNC 16 +#define _IOS_NOCREATE 32 +#define _IOS_NOREPLACE 64 +#define _IOS_BIN 128 + + + + + + + +#define _IO_MAGIC 0xFBAD0000 +#define _OLD_STDIO_MAGIC 0xFABC0000 +#define _IO_MAGIC_MASK 0xFFFF0000 +#define _IO_USER_BUF 1 +#define _IO_UNBUFFERED 2 +#define _IO_NO_READS 4 +#define _IO_NO_WRITES 8 +#define _IO_EOF_SEEN 0x10 +#define _IO_ERR_SEEN 0x20 +#define _IO_DELETE_DONT_CLOSE 0x40 +#define _IO_LINKED 0x80 +#define _IO_IN_BACKUP 0x100 +#define _IO_LINE_BUF 0x200 +#define _IO_TIED_PUT_GET 0x400 +#define _IO_CURRENTLY_PUTTING 0x800 +#define _IO_IS_APPENDING 0x1000 +#define _IO_IS_FILEBUF 0x2000 +#define _IO_BAD_SEEN 0x4000 +#define _IO_USER_LOCK 0x8000 + +#define _IO_FLAGS2_MMAP 1 +#define _IO_FLAGS2_NOTCANCEL 2 + + + +#define _IO_FLAGS2_USER_WBUF 8 + + + + + + + +#define _IO_SKIPWS 01 +#define _IO_LEFT 02 +#define _IO_RIGHT 04 +#define _IO_INTERNAL 010 +#define _IO_DEC 020 +#define _IO_OCT 040 +#define _IO_HEX 0100 +#define _IO_SHOWBASE 0200 +#define _IO_SHOWPOINT 0400 +#define _IO_UPPERCASE 01000 +#define _IO_SHOWPOS 02000 +#define _IO_SCIENTIFIC 04000 +#define _IO_FIXED 010000 +#define _IO_UNITBUF 020000 +#define _IO_STDIO 040000 +#define _IO_DONT_CLOSE 0100000 +#define _IO_BOOLALPHA 0200000 + + +struct _IO_jump_t; struct _IO_FILE; +# 182 "/usr/include/libio.h" 3 4 +typedef void _IO_lock_t; + + + + + +struct _IO_marker { + struct _IO_marker *_next; + struct _IO_FILE *_sbuf; + + + + int _pos; +# 205 "/usr/include/libio.h" 3 4 +}; + + +enum __codecvt_result +{ + __codecvt_ok, + __codecvt_partial, + __codecvt_error, + __codecvt_noconv +}; +# 273 "/usr/include/libio.h" 3 4 +struct _IO_FILE { + int _flags; +#define _IO_file_flags _flags + + + + char* _IO_read_ptr; + char* _IO_read_end; + char* _IO_read_base; + char* _IO_write_base; + char* _IO_write_ptr; + char* _IO_write_end; + char* _IO_buf_base; + char* _IO_buf_end; + + char *_IO_save_base; + char *_IO_backup_base; + char *_IO_save_end; + + struct _IO_marker *_markers; + + struct _IO_FILE *_chain; + + int _fileno; + + + + int _flags2; + + __off_t _old_offset; + +#define __HAVE_COLUMN + + unsigned short _cur_column; + signed char _vtable_offset; + char _shortbuf[1]; + + + + _IO_lock_t *_lock; +# 321 "/usr/include/libio.h" 3 4 + __off64_t _offset; +# 330 "/usr/include/libio.h" 3 4 + void *__pad1; + void *__pad2; + void *__pad3; + void *__pad4; + size_t __pad5; + + int _mode; + + char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; + +}; + + + + + +struct _IO_FILE_plus; + +extern struct _IO_FILE_plus _IO_2_1_stdin_; +extern struct _IO_FILE_plus _IO_2_1_stdout_; +extern struct _IO_FILE_plus _IO_2_1_stderr_; + +#define _IO_stdin ((_IO_FILE*)(&_IO_2_1_stdin_)) +#define _IO_stdout ((_IO_FILE*)(&_IO_2_1_stdout_)) +#define _IO_stderr ((_IO_FILE*)(&_IO_2_1_stderr_)) +# 366 "/usr/include/libio.h" 3 4 +typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); + + + + + + + +typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, + size_t __n); + + + + + + + +typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); + + +typedef int __io_close_fn (void *__cookie); + + + + +typedef __io_read_fn cookie_read_function_t; +typedef __io_write_fn cookie_write_function_t; +typedef __io_seek_fn cookie_seek_function_t; +typedef __io_close_fn cookie_close_function_t; + + +typedef struct +{ + __io_read_fn *read; + __io_write_fn *write; + __io_seek_fn *seek; + __io_close_fn *close; +} _IO_cookie_io_functions_t; +typedef _IO_cookie_io_functions_t cookie_io_functions_t; + +struct _IO_cookie_file; + + +extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, + void *__cookie, _IO_cookie_io_functions_t __fns); + + + + +extern "C" { + + +extern int __underflow (_IO_FILE *); +extern int __uflow (_IO_FILE *); +extern int __overflow (_IO_FILE *, int); + + + + + + + +#define _IO_BE(expr,res) __builtin_expect ((expr), res) + + + + +#define _IO_getc_unlocked(_fp) (_IO_BE ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end, 0) ? __uflow (_fp) : *(unsigned char *) (_fp)->_IO_read_ptr++) + + +#define _IO_peekc_unlocked(_fp) (_IO_BE ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end, 0) && __underflow (_fp) == EOF ? EOF : *(unsigned char *) (_fp)->_IO_read_ptr) + + + +#define _IO_putc_unlocked(_ch,_fp) (_IO_BE ((_fp)->_IO_write_ptr >= (_fp)->_IO_write_end, 0) ? __overflow (_fp, (unsigned char) (_ch)) : (unsigned char) (*(_fp)->_IO_write_ptr++ = (_ch))) +# 459 "/usr/include/libio.h" 3 4 +#define _IO_feof_unlocked(__fp) (((__fp)->_flags & _IO_EOF_SEEN) != 0) +#define _IO_ferror_unlocked(__fp) (((__fp)->_flags & _IO_ERR_SEEN) != 0) + +extern int _IO_getc (_IO_FILE *__fp); +extern int _IO_putc (int __c, _IO_FILE *__fp); +extern int _IO_feof (_IO_FILE *__fp) throw (); +extern int _IO_ferror (_IO_FILE *__fp) throw (); + +extern int _IO_peekc_locked (_IO_FILE *__fp); + + +#define _IO_PENDING_OUTPUT_COUNT(_fp) ((_fp)->_IO_write_ptr - (_fp)->_IO_write_base) + + +extern void _IO_flockfile (_IO_FILE *) throw (); +extern void _IO_funlockfile (_IO_FILE *) throw (); +extern int _IO_ftrylockfile (_IO_FILE *) throw (); +# 484 "/usr/include/libio.h" 3 4 +#define _IO_peekc(_fp) _IO_peekc_unlocked (_fp) +#define _IO_flockfile(_fp) +#define _IO_funlockfile(_fp) +#define _IO_ftrylockfile(_fp) +#define _IO_cleanup_region_start(_fct,_fp) +#define _IO_cleanup_region_end(_Doit) + + +extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, + __gnuc_va_list, int *__restrict); +extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, + __gnuc_va_list); +extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); +extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); + +extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); +extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); + +extern void _IO_free_backup_area (_IO_FILE *) throw (); +# 554 "/usr/include/libio.h" 3 4 +} +# 76 "/usr/include/stdio.h" 2 3 4 + + + + +typedef __gnuc_va_list va_list; +#define _VA_LIST_DEFINED +# 91 "/usr/include/stdio.h" 3 4 +typedef __off_t off_t; + + + +#define __off_t_defined + + +typedef __off64_t off64_t; +#define __off64_t_defined + + + +typedef __ssize_t ssize_t; +#define __ssize_t_defined + + + + + + +typedef _G_fpos_t fpos_t; + + + + + +typedef _G_fpos64_t fpos64_t; + + + +#define _IOFBF 0 +#define _IOLBF 1 +#define _IONBF 2 + + + + +#define BUFSIZ _IO_BUFSIZ +# 141 "/usr/include/stdio.h" 3 4 +#define SEEK_SET 0 +#define SEEK_CUR 1 +#define SEEK_END 2 + +#define SEEK_DATA 3 +#define SEEK_HOLE 4 + + + + + +#define P_tmpdir "/tmp" +# 165 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/bits/stdio_lim.h" 1 3 4 +# 24 "/usr/include/bits/stdio_lim.h" 3 4 +#define L_tmpnam 20 +#define TMP_MAX 238328 +#define FILENAME_MAX 4096 + + +#define L_ctermid 9 + +#define L_cuserid 9 + + + + + +#undef FOPEN_MAX +#define FOPEN_MAX 16 +# 166 "/usr/include/stdio.h" 2 3 4 + + + +extern struct _IO_FILE *stdin; +extern struct _IO_FILE *stdout; +extern struct _IO_FILE *stderr; + +#define stdin stdin +#define stdout stdout +#define stderr stderr + + + +extern int remove (__const char *__filename) throw (); + +extern int rename (__const char *__old, __const char *__new) throw (); + + + + +extern int renameat (int __oldfd, __const char *__old, int __newfd, + __const char *__new) throw (); + + + + + + + + +extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__)); +# 206 "/usr/include/stdio.h" 3 4 +extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__)); + + + +extern char *tmpnam (char *__s) throw () __attribute__ ((__warn_unused_result__)); + + + + + +extern char *tmpnam_r (char *__s) throw () __attribute__ ((__warn_unused_result__)); +# 228 "/usr/include/stdio.h" 3 4 +extern char *tempnam (__const char *__dir, __const char *__pfx) + throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fclose (FILE *__stream); + + + + +extern int fflush (FILE *__stream); + +# 253 "/usr/include/stdio.h" 3 4 +extern int fflush_unlocked (FILE *__stream); +# 263 "/usr/include/stdio.h" 3 4 +extern int fcloseall (void); + + + + + + + + + +extern FILE *fopen (__const char *__restrict __filename, + __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *freopen (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +# 296 "/usr/include/stdio.h" 3 4 + + +extern FILE *fopen64 (__const char *__restrict __filename, + __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); +extern FILE *freopen64 (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *fdopen (int __fd, __const char *__modes) throw () __attribute__ ((__warn_unused_result__)); + + + + + +extern FILE *fopencookie (void *__restrict __magic_cookie, + __const char *__restrict __modes, + _IO_cookie_io_functions_t __io_funcs) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) + throw () __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () __attribute__ ((__warn_unused_result__)); + + + + + + +extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); + + + +extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, + int __modes, size_t __n) throw (); + + + + + +extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, + size_t __size) throw (); + + +extern void setlinebuf (FILE *__stream) throw (); + + + + + + + + +extern int fprintf (FILE *__restrict __stream, + __const char *__restrict __format, ...); + + + + +extern int printf (__const char *__restrict __format, ...); + +extern int sprintf (char *__restrict __s, + __const char *__restrict __format, ...) throw (); + + + + + +extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg); + + + + +extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); + +extern int vsprintf (char *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) throw (); + + + + + +extern int snprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, ...) + throw () __attribute__ ((__format__ (__printf__, 3, 4))); + +extern int vsnprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__printf__, 3, 0))); + + + + + + +extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, + __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__)); +extern int __asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + throw () __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +extern int asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + throw () __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +# 418 "/usr/include/stdio.h" 3 4 +extern int vdprintf (int __fd, __const char *__restrict __fmt, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 2, 0))); +extern int dprintf (int __fd, __const char *__restrict __fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); + + + + + + + + +extern int fscanf (FILE *__restrict __stream, + __const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); + + + + +extern int scanf (__const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); + +extern int sscanf (__const char *__restrict __s, + __const char *__restrict __format, ...) throw (); +# 469 "/usr/include/stdio.h" 3 4 + + + + + + + + +extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); + + +extern int vsscanf (__const char *__restrict __s, + __const char *__restrict __format, __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__scanf__, 2, 0))); +# 528 "/usr/include/stdio.h" 3 4 + + + + + + + + + +extern int fgetc (FILE *__stream); +extern int getc (FILE *__stream); + + + + + +extern int getchar (void); + + + + +#define getc(_fp) _IO_getc (_fp) + + + + + + +extern int getc_unlocked (FILE *__stream); +extern int getchar_unlocked (void); +# 567 "/usr/include/stdio.h" 3 4 +extern int fgetc_unlocked (FILE *__stream); + + + + + + + + + + + +extern int fputc (int __c, FILE *__stream); +extern int putc (int __c, FILE *__stream); + + + + + +extern int putchar (int __c); + + + + +#define putc(_ch,_fp) _IO_putc (_ch, _fp) +# 600 "/usr/include/stdio.h" 3 4 +extern int fputc_unlocked (int __c, FILE *__stream); + + + + + + + +extern int putc_unlocked (int __c, FILE *__stream); +extern int putchar_unlocked (int __c); + + + + + + +extern int getw (FILE *__stream); + + +extern int putw (int __w, FILE *__stream); + + + + + + + + +extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) + __attribute__ ((__warn_unused_result__)); + + + + + + +extern char *gets (char *__s) __attribute__ ((__warn_unused_result__)); + +# 646 "/usr/include/stdio.h" 3 4 +extern char *fgets_unlocked (char *__restrict __s, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +# 662 "/usr/include/stdio.h" 3 4 +extern __ssize_t __getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern __ssize_t getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern __ssize_t getline (char **__restrict __lineptr, + size_t *__restrict __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); + + + + + +extern int puts (__const char *__s); + + + + + + +extern int ungetc (int __c, FILE *__stream); + + + + + + +extern size_t fread (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + +extern size_t fwrite (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __s) __attribute__ ((__warn_unused_result__)); + +# 723 "/usr/include/stdio.h" 3 4 +extern int fputs_unlocked (__const char *__restrict __s, + FILE *__restrict __stream); +# 734 "/usr/include/stdio.h" 3 4 +extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fseek (FILE *__stream, long int __off, int __whence); + + + + +extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)); + + + + +extern void rewind (FILE *__stream); + +# 770 "/usr/include/stdio.h" 3 4 +extern int fseeko (FILE *__stream, __off_t __off, int __whence); + + + + +extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__)); +# 789 "/usr/include/stdio.h" 3 4 + + + + + + +extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); + + + + +extern int fsetpos (FILE *__stream, __const fpos_t *__pos); +# 812 "/usr/include/stdio.h" 3 4 + + + +extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); +extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__)); +extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); +extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); + + + + +extern void clearerr (FILE *__stream) throw (); + +extern int feof (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + +extern int ferror (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern void clearerr_unlocked (FILE *__stream) throw (); +extern int feof_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); +extern int ferror_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern void perror (__const char *__s); + + + + + + +# 1 "/usr/include/bits/sys_errlist.h" 1 3 4 +# 27 "/usr/include/bits/sys_errlist.h" 3 4 +extern int sys_nerr; +extern __const char *__const sys_errlist[]; + + +extern int _sys_nerr; +extern __const char *__const _sys_errlist[]; +# 851 "/usr/include/stdio.h" 2 3 4 + + + + +extern int fileno (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern int fileno_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); +# 870 "/usr/include/stdio.h" 3 4 +extern FILE *popen (__const char *__command, __const char *__modes) __attribute__ ((__warn_unused_result__)); + + + + + +extern int pclose (FILE *__stream); + + + + + +extern char *ctermid (char *__s) throw (); + + + + + +extern char *cuserid (char *__s); + + + + +struct obstack; + + +extern int obstack_printf (struct obstack *__restrict __obstack, + __const char *__restrict __format, ...) + throw () __attribute__ ((__format__ (__printf__, 2, 3))); +extern int obstack_vprintf (struct obstack *__restrict __obstack, + __const char *__restrict __format, + __gnuc_va_list __args) + throw () __attribute__ ((__format__ (__printf__, 2, 0))); + + + + + + + +extern void flockfile (FILE *__stream) throw (); + + + +extern int ftrylockfile (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); + + +extern void funlockfile (FILE *__stream) throw (); +# 931 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/bits/stdio.h" 1 3 4 +# 27 "/usr/include/bits/stdio.h" 3 4 +#define __STDIO_INLINE __extern_inline +# 44 "/usr/include/bits/stdio.h" 3 4 +extern __inline __attribute__ ((__gnu_inline__)) int +getchar (void) +{ + return _IO_getc (stdin); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +fgetc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +getc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +getchar_unlocked (void) +{ + return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +putchar (int __c) +{ + return _IO_putc (__c, stdout); +} + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +fputc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int +putc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int +putchar_unlocked (int __c) +{ + return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) __ssize_t +getline (char **__lineptr, size_t *__n, FILE *__stream) +{ + return __getdelim (__lineptr, __n, '\n', __stream); +} + + + + + +extern __inline __attribute__ ((__gnu_inline__)) int + feof_unlocked (FILE *__stream) throw () +{ + return (((__stream)->_flags & 0x10) != 0); +} + + +extern __inline __attribute__ ((__gnu_inline__)) int + ferror_unlocked (FILE *__stream) throw () +{ + return (((__stream)->_flags & 0x20) != 0); +} +# 191 "/usr/include/bits/stdio.h" 3 4 +#undef __STDIO_INLINE +# 932 "/usr/include/stdio.h" 2 3 4 + + +# 1 "/usr/include/bits/stdio2.h" 1 3 4 +# 24 "/usr/include/bits/stdio2.h" 3 4 +extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, + __const char *__restrict __format, ...) throw (); +extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, + __const char *__restrict __format, + __gnuc_va_list __ap) throw (); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int + sprintf (char *__restrict __s, __const char *__restrict __fmt, ...) throw () +{ + return __builtin___sprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int + vsprintf (char *__restrict __s, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () + +{ + return __builtin___vsprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} + + + +extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, __const char *__restrict __format, + ...) throw (); +extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, __const char *__restrict __format, + __gnuc_va_list __ap) throw (); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int + snprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, ...) throw () + +{ + return __builtin___snprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int + vsnprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () + +{ + return __builtin___vsnprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} + + + + + +extern int __fprintf_chk (FILE *__restrict __stream, int __flag, + __const char *__restrict __format, ...); +extern int __printf_chk (int __flag, __const char *__restrict __format, ...); +extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, + __const char *__restrict __format, __gnuc_va_list __ap); +extern int __vprintf_chk (int __flag, __const char *__restrict __format, + __gnuc_va_list __ap); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +fprintf (FILE *__restrict __stream, __const char *__restrict __fmt, ...) +{ + return __fprintf_chk (__stream, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +printf (__const char *__restrict __fmt, ...) +{ + return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); +} + + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vprintf (__const char *__restrict __fmt, __gnuc_va_list __ap) +{ + + return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap); + + + +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vfprintf (FILE *__restrict __stream, + __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap); +} + + + +extern int __asprintf_chk (char **__restrict __ptr, int __flag, + __const char *__restrict __fmt, ...) + throw () __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__)); +extern int __vasprintf_chk (char **__restrict __ptr, int __flag, + __const char *__restrict __fmt, __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__)); +extern int __dprintf_chk (int __fd, int __flag, __const char *__restrict __fmt, + ...) __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __vdprintf_chk (int __fd, int __flag, + __const char *__restrict __fmt, __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 3, 0))); +extern int __obstack_printf_chk (struct obstack *__restrict __obstack, + int __flag, __const char *__restrict __format, + ...) + throw () __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack, + int __flag, + __const char *__restrict __format, + __gnuc_va_list __args) + throw () __attribute__ ((__format__ (__printf__, 3, 0))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int + asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int + __asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () + +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +dprintf (int __fd, __const char *__restrict __fmt, ...) +{ + return __dprintf_chk (__fd, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int + obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, ...) throw () + +{ + return __obstack_printf_chk (__obstack, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +# 195 "/usr/include/bits/stdio2.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int + vasprintf (char **__restrict __ptr, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () + +{ + return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int + obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () + +{ + return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt, + __ap); +} + + + + + +extern char *__gets_chk (char *__str, size_t) __attribute__ ((__warn_unused_result__)); +extern char *__gets_warn (char *__str) __asm__ ("" "gets") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use fgets or getline instead, gets can't " "specify buffer size"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +gets (char *__str) +{ + if (__builtin_object_size (__str, 2 > 1) != (size_t) -1) + return __gets_chk (__str, __builtin_object_size (__str, 2 > 1)); + return __gets_warn (__str); +} + +extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") + + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_alias (__s, __n, __stream); +} + +extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") + + + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk") + + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + } + return __fread_alias (__ptr, __size, __n, __stream); +} + + +extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size, + int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked") + + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_unlocked_alias (__s, __n, __stream); +} + + + +#undef fread_unlocked +extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") + + + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk") + + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + } + + + if (__builtin_constant_p (__size) + && __builtin_constant_p (__n) + && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) + && __size * __n <= 8) + { + size_t __cnt = __size * __n; + char *__cptr = (char *) __ptr; + if (__cnt == 0) + return 0; + + for (; __cnt > 0; --__cnt) + { + int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++); + if (__c == (-1)) + break; + *__cptr++ = __c; + } + return (__cptr - (char *) __ptr) / __size; + } + + return __fread_unlocked_alias (__ptr, __size, __n, __stream); +} +# 935 "/usr/include/stdio.h" 2 3 4 + + + + + +} +# 17 "./../../dist/include/mozilla/Assertions.h" 2 +# 1 "/usr/include/stdlib.h" 1 3 4 +# 28 "/usr/include/stdlib.h" 3 4 +#define __need_size_t + +#define __need_wchar_t +#define __need_NULL + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 34 "/usr/include/stdlib.h" 2 3 4 + +extern "C" { + + +#define _STDLIB_H 1 + + + +# 1 "/usr/include/bits/waitflags.h" 1 3 4 +# 26 "/usr/include/bits/waitflags.h" 3 4 +#define WNOHANG 1 +#define WUNTRACED 2 + + +#define WSTOPPED 2 +#define WEXITED 4 +#define WCONTINUED 8 +#define WNOWAIT 0x01000000 + +#define __WNOTHREAD 0x20000000 + +#define __WALL 0x40000000 +#define __WCLONE 0x80000000 +# 43 "/usr/include/stdlib.h" 2 3 4 +# 1 "/usr/include/bits/waitstatus.h" 1 3 4 +# 29 "/usr/include/bits/waitstatus.h" 3 4 +#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8) + + +#define __WTERMSIG(status) ((status) & 0x7f) + + +#define __WSTOPSIG(status) __WEXITSTATUS(status) + + +#define __WIFEXITED(status) (__WTERMSIG(status) == 0) + + +#define __WIFSIGNALED(status) (((signed char) (((status) & 0x7f) + 1) >> 1) > 0) + + + +#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f) + + + + +#define __WIFCONTINUED(status) ((status) == __W_CONTINUED) + + + +#define __WCOREDUMP(status) ((status) & __WCOREFLAG) + + +#define __W_EXITCODE(ret,sig) ((ret) << 8 | (sig)) +#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f) +#define __W_CONTINUED 0xffff +#define __WCOREFLAG 0x80 + + + + +# 1 "/usr/include/endian.h" 1 3 4 +# 20 "/usr/include/endian.h" 3 4 +#define _ENDIAN_H 1 +# 32 "/usr/include/endian.h" 3 4 +#define __LITTLE_ENDIAN 1234 +#define __BIG_ENDIAN 4321 +#define __PDP_ENDIAN 3412 + + +# 1 "/usr/include/bits/endian.h" 1 3 4 +# 9 "/usr/include/bits/endian.h" 3 4 +#define __BYTE_ORDER __LITTLE_ENDIAN + + + + + + +#define __FLOAT_WORD_ORDER __BYTE_ORDER +# 38 "/usr/include/endian.h" 2 3 4 +# 46 "/usr/include/endian.h" 3 4 +#define LITTLE_ENDIAN __LITTLE_ENDIAN +#define BIG_ENDIAN __BIG_ENDIAN +#define PDP_ENDIAN __PDP_ENDIAN +#define BYTE_ORDER __BYTE_ORDER + + + +#define __LONG_LONG_PAIR(HI,LO) LO, HI + + + + + + + +# 1 "/usr/include/bits/byteswap.h" 1 3 4 +# 26 "/usr/include/bits/byteswap.h" 3 4 +#define _BITS_BYTESWAP_H 1 + + +#define __bswap_constant_16(x) ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8)) + + + +#define __bswap_16(x) (__extension__ ({ unsigned short int __bsx = (x); __bswap_constant_16 (__bsx); })) +# 45 "/usr/include/bits/byteswap.h" 3 4 +#define __bswap_constant_32(x) ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24)) + + + + +#define __bswap_32(x) (__extension__ ({ register unsigned int __bsx = (x); __bswap_constant_32 (__bsx); })) +# 63 "/usr/include/bits/byteswap.h" 3 4 +#define __bswap_constant_64(x) (__extension__ ((((x) & 0xff00000000000000ull) >> 56) | (((x) & 0x00ff000000000000ull) >> 40) | (((x) & 0x0000ff0000000000ull) >> 24) | (((x) & 0x000000ff00000000ull) >> 8) | (((x) & 0x00000000ff000000ull) << 8) | (((x) & 0x0000000000ff0000ull) << 24) | (((x) & 0x000000000000ff00ull) << 40) | (((x) & 0x00000000000000ffull) << 56))) +# 73 "/usr/include/bits/byteswap.h" 3 4 +#define __bswap_64(x) (__extension__ ({ union { __extension__ unsigned long long int __ll; unsigned int __l[2]; } __w, __r; if (__builtin_constant_p (x)) __r.__ll = __bswap_constant_64 (x); else { __w.__ll = (x); __r.__l[0] = __bswap_32 (__w.__l[1]); __r.__l[1] = __bswap_32 (__w.__l[0]); } __r.__ll; })) +# 62 "/usr/include/endian.h" 2 3 4 + + +#define htobe16(x) __bswap_16 (x) +#define htole16(x) (x) +#define be16toh(x) __bswap_16 (x) +#define le16toh(x) (x) + +#define htobe32(x) __bswap_32 (x) +#define htole32(x) (x) +#define be32toh(x) __bswap_32 (x) +#define le32toh(x) (x) + +#define htobe64(x) __bswap_64 (x) +#define htole64(x) (x) +#define be64toh(x) __bswap_64 (x) +#define le64toh(x) (x) +# 66 "/usr/include/bits/waitstatus.h" 2 3 4 + +union wait + { + int w_status; + struct + { + + unsigned int __w_termsig:7; + unsigned int __w_coredump:1; + unsigned int __w_retcode:8; + unsigned int:16; + + + + + + + + } __wait_terminated; + struct + { + + unsigned int __w_stopval:8; + unsigned int __w_stopsig:8; + unsigned int:16; + + + + + + + } __wait_stopped; + }; + +#define w_termsig __wait_terminated.__w_termsig +#define w_coredump __wait_terminated.__w_coredump +#define w_retcode __wait_terminated.__w_retcode +#define w_stopsig __wait_stopped.__w_stopsig +#define w_stopval __wait_stopped.__w_stopval +# 44 "/usr/include/stdlib.h" 2 3 4 +# 55 "/usr/include/stdlib.h" 3 4 +#define __WAIT_INT(status) (*(int *) &(status)) +# 64 "/usr/include/stdlib.h" 3 4 +#define __WAIT_STATUS void * +#define __WAIT_STATUS_DEFN void * +# 85 "/usr/include/stdlib.h" 3 4 +#define WEXITSTATUS(status) __WEXITSTATUS (__WAIT_INT (status)) +#define WTERMSIG(status) __WTERMSIG (__WAIT_INT (status)) +#define WSTOPSIG(status) __WSTOPSIG (__WAIT_INT (status)) +#define WIFEXITED(status) __WIFEXITED (__WAIT_INT (status)) +#define WIFSIGNALED(status) __WIFSIGNALED (__WAIT_INT (status)) +#define WIFSTOPPED(status) __WIFSTOPPED (__WAIT_INT (status)) + +#define WIFCONTINUED(status) __WIFCONTINUED (__WAIT_INT (status)) + + + + + +typedef struct + { + int quot; + int rem; + } div_t; + + + +typedef struct + { + long int quot; + long int rem; + } ldiv_t; +#define __ldiv_t_defined 1 + + + + + + +__extension__ typedef struct + { + long long int quot; + long long int rem; + } lldiv_t; +#define __lldiv_t_defined 1 + + + + + +#define RAND_MAX 2147483647 + + + + +#define EXIT_FAILURE 1 +#define EXIT_SUCCESS 0 + + + +#define MB_CUR_MAX (__ctype_get_mb_cur_max ()) +extern size_t __ctype_get_mb_cur_max (void) throw () __attribute__ ((__warn_unused_result__)); + + + + +extern double atof (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern int atoi (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern long int atol (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +__extension__ extern long long int atoll (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern double strtod (__const char *__restrict __nptr, + char **__restrict __endptr) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern float strtof (__const char *__restrict __nptr, + char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern long double strtold (__const char *__restrict __nptr, + char **__restrict __endptr) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern long int strtol (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern unsigned long int strtoul (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +__extension__ +extern long long int strtoq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtouq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +__extension__ +extern long long int strtoll (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtoull (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +# 236 "/usr/include/stdlib.h" 3 4 +# 1 "/usr/include/xlocale.h" 1 3 4 +# 22 "/usr/include/xlocale.h" 3 4 +#define _XLOCALE_H 1 + + + + + +typedef struct __locale_struct +{ + + struct __locale_data *__locales[13]; + + + const unsigned short int *__ctype_b; + const int *__ctype_tolower; + const int *__ctype_toupper; + + + const char *__names[13]; +} *__locale_t; + + +typedef __locale_t locale_t; +# 237 "/usr/include/stdlib.h" 2 3 4 + + + +extern long int strtol_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +extern unsigned long int strtoul_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern long long int strtoll_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtoull_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +extern double strtod_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + +extern float strtof_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + +extern long double strtold_l (__const char *__restrict __nptr, + char **__restrict __endptr, + __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + + + + + +extern __inline __attribute__ ((__gnu_inline__)) double + atof (__const char *__nptr) throw () +{ + return strtod (__nptr, (char **) __null); +} +extern __inline __attribute__ ((__gnu_inline__)) int + atoi (__const char *__nptr) throw () +{ + return (int) strtol (__nptr, (char **) __null, 10); +} +extern __inline __attribute__ ((__gnu_inline__)) long int + atol (__const char *__nptr) throw () +{ + return strtol (__nptr, (char **) __null, 10); +} + + + + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int + atoll (__const char *__nptr) throw () +{ + return strtoll (__nptr, (char **) __null, 10); +} + +# 311 "/usr/include/stdlib.h" 3 4 +extern char *l64a (long int __n) throw () __attribute__ ((__warn_unused_result__)); + + +extern long int a64l (__const char *__s) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +# 1 "/usr/include/sys/types.h" 1 3 4 +# 24 "/usr/include/sys/types.h" 3 4 +#define _SYS_TYPES_H 1 + + + +extern "C" { + + + + + +typedef __u_char u_char; +typedef __u_short u_short; +typedef __u_int u_int; +typedef __u_long u_long; +typedef __quad_t quad_t; +typedef __u_quad_t u_quad_t; +typedef __fsid_t fsid_t; +#define __u_char_defined + + + +typedef __loff_t loff_t; + + + +typedef __ino_t ino_t; + + + +#define __ino_t_defined + + +typedef __ino64_t ino64_t; +#define __ino64_t_defined + + + +typedef __dev_t dev_t; +#define __dev_t_defined + + + +typedef __gid_t gid_t; +#define __gid_t_defined + + + +typedef __mode_t mode_t; +#define __mode_t_defined + + + +typedef __nlink_t nlink_t; +#define __nlink_t_defined + + + +typedef __uid_t uid_t; +#define __uid_t_defined +# 99 "/usr/include/sys/types.h" 3 4 +typedef __pid_t pid_t; +#define __pid_t_defined + + + + +typedef __id_t id_t; +#define __id_t_defined +# 116 "/usr/include/sys/types.h" 3 4 +typedef __daddr_t daddr_t; +typedef __caddr_t caddr_t; +#define __daddr_t_defined + + + + +typedef __key_t key_t; +#define __key_t_defined + + + +#define __need_clock_t + +#define __need_time_t +#define __need_timer_t +#define __need_clockid_t +# 1 "/usr/include/time.h" 1 3 4 +# 54 "/usr/include/time.h" 3 4 +#define __clock_t_defined 1 + + + + + +typedef __clock_t clock_t; + + + + + + +#undef __need_clock_t + + +#define __time_t_defined 1 + + + + + +typedef __time_t time_t; + + + + + + +#undef __need_time_t + + + +#define __clockid_t_defined 1 + + + + +typedef __clockid_t clockid_t; + + +#undef __clockid_time_t + + + +#define __timer_t_defined 1 + + + + +typedef __timer_t timer_t; + + +#undef __need_timer_t +# 127 "/usr/include/time.h" 3 4 +#undef __need_timespec +# 134 "/usr/include/sys/types.h" 2 3 4 + + + +typedef __useconds_t useconds_t; +#define __useconds_t_defined + + +typedef __suseconds_t suseconds_t; +#define __suseconds_t_defined + + + +#define __need_size_t +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 148 "/usr/include/sys/types.h" 2 3 4 + + + +typedef unsigned long int ulong; +typedef unsigned short int ushort; +typedef unsigned int uint; +# 188 "/usr/include/sys/types.h" 3 4 +#define __intN_t(N,MODE) typedef int int ##N ##_t __attribute__ ((__mode__ (MODE))) + +#define __u_intN_t(N,MODE) typedef unsigned int u_int ##N ##_t __attribute__ ((__mode__ (MODE))) +# 201 "/usr/include/sys/types.h" 3 4 +typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); +typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); + +typedef int register_t __attribute__ ((__mode__ (__word__))); + + + + + +#define __BIT_TYPES_DEFINED__ 1 + + + + + + + +# 1 "/usr/include/sys/select.h" 1 3 4 +# 23 "/usr/include/sys/select.h" 3 4 +#define _SYS_SELECT_H 1 + + + + + + + +# 1 "/usr/include/bits/select.h" 1 3 4 +# 26 "/usr/include/bits/select.h" 3 4 +#define __FD_ZERO(s) do { unsigned int __i; fd_set *__arr = (s); for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) __FDS_BITS (__arr)[__i] = 0; } while (0) + + + + + + +#define __FD_SET(d,s) ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d))) + +#define __FD_CLR(d,s) ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d))) + +#define __FD_ISSET(d,s) ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0) +# 32 "/usr/include/sys/select.h" 2 3 4 + + +# 1 "/usr/include/bits/sigset.h" 1 3 4 +# 22 "/usr/include/bits/sigset.h" 3 4 +#define _SIGSET_H_types 1 + +typedef int __sig_atomic_t; + + + +#define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) +typedef struct + { + unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; + } __sigset_t; +# 35 "/usr/include/sys/select.h" 2 3 4 + + +#define __sigset_t_defined +typedef __sigset_t sigset_t; + + + +#define __need_time_t +#define __need_timespec +# 1 "/usr/include/time.h" 1 3 4 +# 67 "/usr/include/time.h" 3 4 +#undef __need_clock_t +# 83 "/usr/include/time.h" 3 4 +#undef __need_time_t +# 95 "/usr/include/time.h" 3 4 +#undef __clockid_time_t +# 107 "/usr/include/time.h" 3 4 +#undef __need_timer_t + + + + + + +#define __timespec_defined 1 + + + + + +struct timespec + { + __time_t tv_sec; + long int tv_nsec; + }; + + +#undef __need_timespec +# 45 "/usr/include/sys/select.h" 2 3 4 +#define __need_timeval +# 1 "/usr/include/bits/time.h" 1 3 4 +# 26 "/usr/include/bits/time.h" 3 4 +#define _STRUCT_TIMEVAL 1 + + + + +struct timeval + { + __time_t tv_sec; + __suseconds_t tv_usec; + }; +# 99 "/usr/include/bits/time.h" 3 4 +#undef __need_timeval +# 47 "/usr/include/sys/select.h" 2 3 4 +# 55 "/usr/include/sys/select.h" 3 4 +typedef long int __fd_mask; + + +#undef __NFDBITS + +#define __NFDBITS (8 * (int) sizeof (__fd_mask)) +#define __FD_ELT(d) ((d) / __NFDBITS) +#define __FD_MASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS)) + + +typedef struct + { + + + + __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; +#define __FDS_BITS(set) ((set)->fds_bits) + + + + + } fd_set; + + +#define FD_SETSIZE __FD_SETSIZE + + + +typedef __fd_mask fd_mask; + + +#define NFDBITS __NFDBITS + + + + +#define FD_SET(fd,fdsetp) __FD_SET (fd, fdsetp) +#define FD_CLR(fd,fdsetp) __FD_CLR (fd, fdsetp) +#define FD_ISSET(fd,fdsetp) __FD_ISSET (fd, fdsetp) +#define FD_ZERO(fdsetp) __FD_ZERO (fdsetp) + + +extern "C" { +# 107 "/usr/include/sys/select.h" 3 4 +extern int select (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + struct timeval *__restrict __timeout); +# 119 "/usr/include/sys/select.h" 3 4 +extern int pselect (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + const struct timespec *__restrict __timeout, + const __sigset_t *__restrict __sigmask); + + + + + +# 1 "/usr/include/bits/select2.h" 1 3 4 +# 25 "/usr/include/bits/select2.h" 3 4 +extern long int __fdelt_chk (long int __d); +extern long int __fdelt_warn (long int __d) + __attribute__((__warning__ ("bit outside of fd_set selected"))); +#undef __FD_ELT +#define __FD_ELT(d) __extension__ ({ long int __d = (d); (__builtin_constant_p (__d) ? (0 <= __d && __d < __FD_SETSIZE ? (__d / __NFDBITS) : __fdelt_warn (__d)) : __fdelt_chk (__d)); }) +# 130 "/usr/include/sys/select.h" 2 3 4 + + +} +# 221 "/usr/include/sys/types.h" 2 3 4 + + +# 1 "/usr/include/sys/sysmacros.h" 1 3 4 +# 22 "/usr/include/sys/sysmacros.h" 3 4 +#define _SYS_SYSMACROS_H 1 + + + + + + + +extern "C" { + +__extension__ +extern unsigned int gnu_dev_major (unsigned long long int __dev) + throw () __attribute__ ((__const__)); +__extension__ +extern unsigned int gnu_dev_minor (unsigned long long int __dev) + throw () __attribute__ ((__const__)); +__extension__ +extern unsigned long long int gnu_dev_makedev (unsigned int __major, + unsigned int __minor) + throw () __attribute__ ((__const__)); + + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) unsigned int + gnu_dev_major (unsigned long long int __dev) throw () +{ + return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); +} + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) unsigned int + gnu_dev_minor (unsigned long long int __dev) throw () +{ + return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); +} + +__extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) unsigned long long int + gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw () +{ + return ((__minor & 0xff) | ((__major & 0xfff) << 8) + | (((unsigned long long int) (__minor & ~0xff)) << 12) + | (((unsigned long long int) (__major & ~0xfff)) << 32)); +} + +} + + +#define major(dev) gnu_dev_major (dev) +#define minor(dev) gnu_dev_minor (dev) +#define makedev(maj,min) gnu_dev_makedev (maj, min) +# 224 "/usr/include/sys/types.h" 2 3 4 + + + + + +typedef __blksize_t blksize_t; +#define __blksize_t_defined + + + + + +typedef __blkcnt_t blkcnt_t; +#define __blkcnt_t_defined + + +typedef __fsblkcnt_t fsblkcnt_t; +#define __fsblkcnt_t_defined + + +typedef __fsfilcnt_t fsfilcnt_t; +#define __fsfilcnt_t_defined +# 263 "/usr/include/sys/types.h" 3 4 +typedef __blkcnt64_t blkcnt64_t; +typedef __fsblkcnt64_t fsblkcnt64_t; +typedef __fsfilcnt64_t fsfilcnt64_t; + + + + + +# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 +# 20 "/usr/include/bits/pthreadtypes.h" 3 4 +#define _BITS_PTHREADTYPES_H 1 + + + +#define __SIZEOF_PTHREAD_ATTR_T 36 +#define __SIZEOF_PTHREAD_MUTEX_T 24 +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_COND_COMPAT_T 12 +#define __SIZEOF_PTHREAD_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_RWLOCK_T 32 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIER_T 20 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 + + + + +typedef unsigned long int pthread_t; + + +typedef union +{ + char __size[36]; + long int __align; +} pthread_attr_t; + + +typedef struct __pthread_internal_slist +{ + struct __pthread_internal_slist *__next; +} __pthread_slist_t; + + + + +typedef union +{ + struct __pthread_mutex_s + { + int __lock; + unsigned int __count; + int __owner; + + + int __kind; + unsigned int __nusers; + __extension__ union + { + int __spins; + __pthread_slist_t __list; + }; + } __data; + char __size[24]; + long int __align; +} pthread_mutex_t; + +typedef union +{ + char __size[4]; + long int __align; +} pthread_mutexattr_t; + + + + +typedef union +{ + struct + { + int __lock; + unsigned int __futex; + __extension__ unsigned long long int __total_seq; + __extension__ unsigned long long int __wakeup_seq; + __extension__ unsigned long long int __woken_seq; + void *__mutex; + unsigned int __nwaiters; + unsigned int __broadcast_seq; + } __data; + char __size[48]; + __extension__ long long int __align; +} pthread_cond_t; + +typedef union +{ + char __size[4]; + long int __align; +} pthread_condattr_t; + + + +typedef unsigned int pthread_key_t; + + + +typedef int pthread_once_t; + + + + + +typedef union +{ + struct + { + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; +# 141 "/usr/include/bits/pthreadtypes.h" 3 4 + unsigned char __flags; + unsigned char __shared; + unsigned char __pad1; + unsigned char __pad2; + + int __writer; + } __data; + char __size[32]; + long int __align; +} pthread_rwlock_t; + +typedef union +{ + char __size[8]; + long int __align; +} pthread_rwlockattr_t; + + + + + +typedef volatile int pthread_spinlock_t; + + + + +typedef union +{ + char __size[20]; + long int __align; +} pthread_barrier_t; + +typedef union +{ + char __size[4]; + int __align; +} pthread_barrierattr_t; +# 272 "/usr/include/sys/types.h" 2 3 4 + + +} +# 321 "/usr/include/stdlib.h" 2 3 4 + + + + + + +extern long int random (void) throw (); + + +extern void srandom (unsigned int __seed) throw (); + + + + + +extern char *initstate (unsigned int __seed, char *__statebuf, + size_t __statelen) throw () __attribute__ ((__nonnull__ (2))); + + + +extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1))); + + + + + + + +struct random_data + { + int32_t *fptr; + int32_t *rptr; + int32_t *state; + int rand_type; + int rand_deg; + int rand_sep; + int32_t *end_ptr; + }; + +extern int random_r (struct random_data *__restrict __buf, + int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); + +extern int srandom_r (unsigned int __seed, struct random_data *__buf) + throw () __attribute__ ((__nonnull__ (2))); + +extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, + size_t __statelen, + struct random_data *__restrict __buf) + throw () __attribute__ ((__nonnull__ (2, 4))); + +extern int setstate_r (char *__restrict __statebuf, + struct random_data *__restrict __buf) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern int rand (void) throw (); + +extern void srand (unsigned int __seed) throw (); + + + + +extern int rand_r (unsigned int *__seed) throw (); + + + + + + + +extern double drand48 (void) throw (); +extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); + + +extern long int lrand48 (void) throw (); +extern long int nrand48 (unsigned short int __xsubi[3]) + throw () __attribute__ ((__nonnull__ (1))); + + +extern long int mrand48 (void) throw (); +extern long int jrand48 (unsigned short int __xsubi[3]) + throw () __attribute__ ((__nonnull__ (1))); + + +extern void srand48 (long int __seedval) throw (); +extern unsigned short int *seed48 (unsigned short int __seed16v[3]) + throw () __attribute__ ((__nonnull__ (1))); +extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1))); + + + + + +struct drand48_data + { + unsigned short int __x[3]; + unsigned short int __old_x[3]; + unsigned short int __c; + unsigned short int __init; + unsigned long long int __a; + }; + + +extern int drand48_r (struct drand48_data *__restrict __buffer, + double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int erand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int lrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int nrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int mrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int jrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int srand48_r (long int __seedval, struct drand48_data *__buffer) + throw () __attribute__ ((__nonnull__ (2))); + +extern int seed48_r (unsigned short int __seed16v[3], + struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); + +extern int lcong48_r (unsigned short int __param[7], + struct drand48_data *__buffer) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + + +#define __malloc_and_calloc_defined + + +extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + +extern void *calloc (size_t __nmemb, size_t __size) + throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + + + + + + + +extern void *realloc (void *__ptr, size_t __size) + throw () __attribute__ ((__warn_unused_result__)); + +extern void free (void *__ptr) throw (); + + + + +extern void cfree (void *__ptr) throw (); + + + +# 1 "/usr/include/alloca.h" 1 3 4 +# 20 "/usr/include/alloca.h" 3 4 +#define _ALLOCA_H 1 + + + +#define __need_size_t +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 26 "/usr/include/alloca.h" 2 3 4 + +extern "C" { + + +#undef alloca + + +extern void *alloca (size_t __size) throw (); + + +#define alloca(size) __builtin_alloca (size) + + +} +# 498 "/usr/include/stdlib.h" 2 3 4 + + + + + +extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + +extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +extern void abort (void) throw () __attribute__ ((__noreturn__)); + + + +extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern "C++" int at_quick_exit (void (*__func) (void)) + throw () __asm ("at_quick_exit") __attribute__ ((__nonnull__ (1))); + + + + + + + + + +extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) + throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern void exit (int __status) throw () __attribute__ ((__noreturn__)); + + + + + + + +extern void quick_exit (int __status) throw () __attribute__ ((__noreturn__)); + + + + + + + +extern void _Exit (int __status) throw () __attribute__ ((__noreturn__)); + + + + + + +extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *__secure_getenv (__const char *__name) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1))); + + + + + +extern int setenv (__const char *__name, __const char *__value, int __replace) + throw () __attribute__ ((__nonnull__ (2))); + + +extern int unsetenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern int clearenv (void) throw (); +# 606 "/usr/include/stdlib.h" 3 4 +extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 620 "/usr/include/stdlib.h" 3 4 +extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 630 "/usr/include/stdlib.h" 3 4 +extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 642 "/usr/include/stdlib.h" 3 4 +extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 652 "/usr/include/stdlib.h" 3 4 +extern int mkstemps64 (char *__template, int __suffixlen) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 663 "/usr/include/stdlib.h" 3 4 +extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 674 "/usr/include/stdlib.h" 3 4 +extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 684 "/usr/include/stdlib.h" 3 4 +extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 694 "/usr/include/stdlib.h" 3 4 +extern int mkostemps (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 706 "/usr/include/stdlib.h" 3 4 +extern int mkostemps64 (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + + + + + +extern int system (__const char *__command) __attribute__ ((__warn_unused_result__)); + + + + + + +extern char *canonicalize_file_name (__const char *__name) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 734 "/usr/include/stdlib.h" 3 4 +extern char *realpath (__const char *__restrict __name, + char *__restrict __resolved) throw () __attribute__ ((__warn_unused_result__)); + + + + + +#define __COMPAR_FN_T +typedef int (*__compar_fn_t) (__const void *, __const void *); + + +typedef __compar_fn_t comparison_fn_t; + + + +typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *); + + + + + +extern void *bsearch (__const void *__key, __const void *__base, + size_t __nmemb, size_t __size, __compar_fn_t __compar) + __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__)); + + + +extern void qsort (void *__base, size_t __nmemb, size_t __size, + __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); + +extern void qsort_r (void *__base, size_t __nmemb, size_t __size, + __compar_d_fn_t __compar, void *__arg) + __attribute__ ((__nonnull__ (1, 4))); + + + + +extern int abs (int __x) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern long int labs (long int __x) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + +__extension__ extern long long int llabs (long long int __x) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern div_t div (int __numer, int __denom) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern ldiv_t ldiv (long int __numer, long int __denom) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + + +__extension__ extern lldiv_t lldiv (long long int __numer, + long long int __denom) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + +# 808 "/usr/include/stdlib.h" 3 4 +extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *gcvt (double __value, int __ndigit, char *__buf) + throw () __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *qecvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qfcvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qgcvt (long double __value, int __ndigit, char *__buf) + throw () __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); + + + + +extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); +extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); + +extern int qecvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (3, 4, 5))); +extern int qfcvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (3, 4, 5))); + + + + + + + +extern int mblen (__const char *__s, size_t __n) throw () __attribute__ ((__warn_unused_result__)); + + +extern int mbtowc (wchar_t *__restrict __pwc, + __const char *__restrict __s, size_t __n) throw () __attribute__ ((__warn_unused_result__)); + + +extern int wctomb (char *__s, wchar_t __wchar) throw () __attribute__ ((__warn_unused_result__)); + + + +extern size_t mbstowcs (wchar_t *__restrict __pwcs, + __const char *__restrict __s, size_t __n) throw (); + +extern size_t wcstombs (char *__restrict __s, + __const wchar_t *__restrict __pwcs, size_t __n) + throw (); + + + + + + + + +extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 896 "/usr/include/stdlib.h" 3 4 +extern int getsubopt (char **__restrict __optionp, + char *__const *__restrict __tokens, + char **__restrict __valuep) + throw () __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__)); + + + + + +extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern int grantpt (int __fd) throw (); + + + +extern int unlockpt (int __fd) throw (); + + + + +extern char *ptsname (int __fd) throw () __attribute__ ((__warn_unused_result__)); + + + + + + +extern int ptsname_r (int __fd, char *__buf, size_t __buflen) + throw () __attribute__ ((__nonnull__ (2))); + + +extern int getpt (void); + + + + + + +extern int getloadavg (double __loadavg[], int __nelem) + throw () __attribute__ ((__nonnull__ (1))); + + + + + +# 1 "/usr/include/bits/stdlib.h" 1 3 4 +# 24 "/usr/include/bits/stdlib.h" 3 4 +extern char *__realpath_chk (__const char *__restrict __name, + char *__restrict __resolved, + size_t __resolvedlen) throw () __attribute__ ((__warn_unused_result__)); +extern char *__realpath_alias (__const char *__restrict __name, char *__restrict __resolved) throw () __asm__ ("" "realpath") + + __attribute__ ((__warn_unused_result__)); +extern char *__realpath_chk_warn (__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) throw () __asm__ ("" "__realpath_chk") + + + __attribute__ ((__warn_unused_result__)) + __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * + realpath (__const char *__restrict __name, char *__restrict __resolved) throw () +{ + if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1) + { + + + + + return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); + } + + return __realpath_alias (__name, __resolved); +} + + +extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, + size_t __nreal) throw () __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) throw () __asm__ ("" "ptsname_r") + + __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__ptsname_r_chk") + + + __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int + ptsname_r (int __fd, char *__buf, size_t __buflen) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __ptsname_r_alias (__fd, __buf, __buflen); +} + + +extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) + throw () __attribute__ ((__warn_unused_result__)); +extern int __wctomb_alias (char *__s, wchar_t __wchar) throw () __asm__ ("" "wctomb") + __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) int + wctomb (char *__s, wchar_t __wchar) throw () +{ + + + +#define __STDLIB_MB_LEN_MAX 16 + + + + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) + return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1)); + return __wctomb_alias (__s, __wchar); +} + + +extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, + __const char *__restrict __src, + size_t __len, size_t __dstlen) throw (); +extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) throw () __asm__ ("" "mbstowcs") + + + ; +extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) throw () __asm__ ("" "__mbstowcs_chk") + + + + __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t + mbstowcs (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) throw () + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __mbstowcs_chk (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + + if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) + return __mbstowcs_chk_warn (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + } + return __mbstowcs_alias (__dst, __src, __len); +} + + +extern size_t __wcstombs_chk (char *__restrict __dst, + __const wchar_t *__restrict __src, + size_t __len, size_t __dstlen) throw (); +extern size_t __wcstombs_alias (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) throw () __asm__ ("" "wcstombs") + + + ; +extern size_t __wcstombs_chk_warn (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) throw () __asm__ ("" "__wcstombs_chk") + + + + __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len"))); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t + wcstombs (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) throw () + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + if (__len > __builtin_object_size (__dst, 2 > 1)) + return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + } + return __wcstombs_alias (__dst, __src, __len); +} +# 956 "/usr/include/stdlib.h" 2 3 4 + + + + + + +#undef __need_malloc_and_calloc + +} +# 18 "./../../dist/include/mozilla/Assertions.h" 2 + +# 1 "/usr/include/signal.h" 1 3 4 +# 26 "/usr/include/signal.h" 3 4 +#define _SIGNAL_H + + + + +extern "C" { + +# 1 "/usr/include/bits/sigset.h" 1 3 4 +# 44 "/usr/include/bits/sigset.h" 3 4 +#define _SIGSET_H_fns 1 + + +#define _EXTERN_INLINE __extern_inline + + + +#define __sigmask(sig) (((unsigned long int) 1) << (((sig) - 1) % (8 * sizeof (unsigned long int)))) + + + +#define __sigword(sig) (((sig) - 1) / (8 * sizeof (unsigned long int))) + + +#define __sigemptyset(set) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__set = (set); while (--__cnt >= 0) __set->__val[__cnt] = 0; 0; })) + + + + +#define __sigfillset(set) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__set = (set); while (--__cnt >= 0) __set->__val[__cnt] = ~0UL; 0; })) +# 73 "/usr/include/bits/sigset.h" 3 4 +#define __sigisemptyset(set) (__extension__ ({ int __cnt = _SIGSET_NWORDS; const sigset_t *__set = (set); int __ret = __set->__val[--__cnt]; while (!__ret && --__cnt >= 0) __ret = __set->__val[__cnt]; __ret == 0; })) + + + + + + +#define __sigandset(dest,left,right) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__dest = (dest); const sigset_t *__left = (left); const sigset_t *__right = (right); while (--__cnt >= 0) __dest->__val[__cnt] = (__left->__val[__cnt] & __right->__val[__cnt]); 0; })) +# 89 "/usr/include/bits/sigset.h" 3 4 +#define __sigorset(dest,left,right) (__extension__ ({ int __cnt = _SIGSET_NWORDS; sigset_t *__dest = (dest); const sigset_t *__left = (left); const sigset_t *__right = (right); while (--__cnt >= 0) __dest->__val[__cnt] = (__left->__val[__cnt] | __right->__val[__cnt]); 0; })) +# 104 "/usr/include/bits/sigset.h" 3 4 +extern int __sigismember (__const __sigset_t *, int); +extern int __sigaddset (__sigset_t *, int); +extern int __sigdelset (__sigset_t *, int); + + +#define __SIGSETFN(NAME,BODY,CONST) _EXTERN_INLINE int NAME (CONST __sigset_t *__set, int __sig) { unsigned long int __mask = __sigmask (__sig); unsigned long int __word = __sigword (__sig); return BODY; } +# 118 "/usr/include/bits/sigset.h" 3 4 +extern __inline __attribute__ ((__gnu_inline__)) int __sigismember (__const __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return (__set->__val[__word] & __mask) ? 1 : 0; } +extern __inline __attribute__ ((__gnu_inline__)) int __sigaddset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] |= __mask), 0); } +extern __inline __attribute__ ((__gnu_inline__)) int __sigdelset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] &= ~__mask), 0); } + +#undef __SIGSETFN +# 34 "/usr/include/signal.h" 2 3 4 + + + + + +#define __sig_atomic_t_defined + +typedef __sig_atomic_t sig_atomic_t; + + +#undef __need_sig_atomic_t + + + + + + + +#undef __need_sigset_t + + + + + +# 1 "/usr/include/bits/signum.h" 1 3 4 +# 23 "/usr/include/bits/signum.h" 3 4 +#define SIG_ERR ((__sighandler_t) -1) +#define SIG_DFL ((__sighandler_t) 0) +#define SIG_IGN ((__sighandler_t) 1) + + +#define SIG_HOLD ((__sighandler_t) 2) + + + + +#define SIGHUP 1 +#define SIGINT 2 +#define SIGQUIT 3 +#define SIGILL 4 +#define SIGTRAP 5 +#define SIGABRT 6 +#define SIGIOT 6 +#define SIGBUS 7 +#define SIGFPE 8 +#define SIGKILL 9 +#define SIGUSR1 10 +#define SIGSEGV 11 +#define SIGUSR2 12 +#define SIGPIPE 13 +#define SIGALRM 14 +#define SIGTERM 15 +#define SIGSTKFLT 16 +#define SIGCLD SIGCHLD +#define SIGCHLD 17 +#define SIGCONT 18 +#define SIGSTOP 19 +#define SIGTSTP 20 +#define SIGTTIN 21 +#define SIGTTOU 22 +#define SIGURG 23 +#define SIGXCPU 24 +#define SIGXFSZ 25 +#define SIGVTALRM 26 +#define SIGPROF 27 +#define SIGWINCH 28 +#define SIGPOLL SIGIO +#define SIGIO 29 +#define SIGPWR 30 +#define SIGSYS 31 +#define SIGUNUSED 31 + +#define _NSIG 65 + + +#define SIGRTMIN (__libc_current_sigrtmin ()) +#define SIGRTMAX (__libc_current_sigrtmax ()) + + + +#define __SIGRTMIN 32 +#define __SIGRTMAX (_NSIG - 1) +# 59 "/usr/include/signal.h" 2 3 4 +# 75 "/usr/include/signal.h" 3 4 +#define __need_timespec +# 1 "/usr/include/time.h" 1 3 4 +# 67 "/usr/include/time.h" 3 4 +#undef __need_clock_t +# 83 "/usr/include/time.h" 3 4 +#undef __need_time_t +# 95 "/usr/include/time.h" 3 4 +#undef __clockid_time_t +# 107 "/usr/include/time.h" 3 4 +#undef __need_timer_t +# 127 "/usr/include/time.h" 3 4 +#undef __need_timespec +# 77 "/usr/include/signal.h" 2 3 4 + + +# 1 "/usr/include/bits/siginfo.h" 1 3 4 +# 25 "/usr/include/bits/siginfo.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 19 "/usr/include/bits/wordsize.h" 3 4 +#define __WORDSIZE 32 +# 26 "/usr/include/bits/siginfo.h" 2 3 4 + + + + +#define __have_sigval_t 1 + + +typedef union sigval + { + int sival_int; + void *sival_ptr; + } sigval_t; + + + + +#define __have_siginfo_t 1 + +#define __SI_MAX_SIZE 128 + + + +#define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) + + +typedef struct siginfo + { + int si_signo; + int si_errno; + + int si_code; + + union + { + int _pad[((128 / sizeof (int)) - 3)]; + + + struct + { + __pid_t si_pid; + __uid_t si_uid; + } _kill; + + + struct + { + int si_tid; + int si_overrun; + sigval_t si_sigval; + } _timer; + + + struct + { + __pid_t si_pid; + __uid_t si_uid; + sigval_t si_sigval; + } _rt; + + + struct + { + __pid_t si_pid; + __uid_t si_uid; + int si_status; + __clock_t si_utime; + __clock_t si_stime; + } _sigchld; + + + struct + { + void *si_addr; + } _sigfault; + + + struct + { + long int si_band; + int si_fd; + } _sigpoll; + } _sifields; + } siginfo_t; + + + +#define si_pid _sifields._kill.si_pid +#define si_uid _sifields._kill.si_uid +#define si_timerid _sifields._timer.si_tid +#define si_overrun _sifields._timer.si_overrun +#define si_status _sifields._sigchld.si_status +#define si_utime _sifields._sigchld.si_utime +#define si_stime _sifields._sigchld.si_stime +#define si_value _sifields._rt.si_sigval +#define si_int _sifields._rt.si_sigval.sival_int +#define si_ptr _sifields._rt.si_sigval.sival_ptr +#define si_addr _sifields._sigfault.si_addr +#define si_band _sifields._sigpoll.si_band +#define si_fd _sifields._sigpoll.si_fd + + + + +enum +{ + SI_ASYNCNL = -60, +#define SI_ASYNCNL SI_ASYNCNL + SI_TKILL = -6, +#define SI_TKILL SI_TKILL + SI_SIGIO, +#define SI_SIGIO SI_SIGIO + SI_ASYNCIO, +#define SI_ASYNCIO SI_ASYNCIO + SI_MESGQ, +#define SI_MESGQ SI_MESGQ + SI_TIMER, +#define SI_TIMER SI_TIMER + SI_QUEUE, +#define SI_QUEUE SI_QUEUE + SI_USER, +#define SI_USER SI_USER + SI_KERNEL = 0x80 +#define SI_KERNEL SI_KERNEL +}; + + + +enum +{ + ILL_ILLOPC = 1, +#define ILL_ILLOPC ILL_ILLOPC + ILL_ILLOPN, +#define ILL_ILLOPN ILL_ILLOPN + ILL_ILLADR, +#define ILL_ILLADR ILL_ILLADR + ILL_ILLTRP, +#define ILL_ILLTRP ILL_ILLTRP + ILL_PRVOPC, +#define ILL_PRVOPC ILL_PRVOPC + ILL_PRVREG, +#define ILL_PRVREG ILL_PRVREG + ILL_COPROC, +#define ILL_COPROC ILL_COPROC + ILL_BADSTK +#define ILL_BADSTK ILL_BADSTK +}; + + +enum +{ + FPE_INTDIV = 1, +#define FPE_INTDIV FPE_INTDIV + FPE_INTOVF, +#define FPE_INTOVF FPE_INTOVF + FPE_FLTDIV, +#define FPE_FLTDIV FPE_FLTDIV + FPE_FLTOVF, +#define FPE_FLTOVF FPE_FLTOVF + FPE_FLTUND, +#define FPE_FLTUND FPE_FLTUND + FPE_FLTRES, +#define FPE_FLTRES FPE_FLTRES + FPE_FLTINV, +#define FPE_FLTINV FPE_FLTINV + FPE_FLTSUB +#define FPE_FLTSUB FPE_FLTSUB +}; + + +enum +{ + SEGV_MAPERR = 1, +#define SEGV_MAPERR SEGV_MAPERR + SEGV_ACCERR +#define SEGV_ACCERR SEGV_ACCERR +}; + + +enum +{ + BUS_ADRALN = 1, +#define BUS_ADRALN BUS_ADRALN + BUS_ADRERR, +#define BUS_ADRERR BUS_ADRERR + BUS_OBJERR +#define BUS_OBJERR BUS_OBJERR +}; + + +enum +{ + TRAP_BRKPT = 1, +#define TRAP_BRKPT TRAP_BRKPT + TRAP_TRACE +#define TRAP_TRACE TRAP_TRACE +}; + + +enum +{ + CLD_EXITED = 1, +#define CLD_EXITED CLD_EXITED + CLD_KILLED, +#define CLD_KILLED CLD_KILLED + CLD_DUMPED, +#define CLD_DUMPED CLD_DUMPED + CLD_TRAPPED, +#define CLD_TRAPPED CLD_TRAPPED + CLD_STOPPED, +#define CLD_STOPPED CLD_STOPPED + CLD_CONTINUED +#define CLD_CONTINUED CLD_CONTINUED +}; + + +enum +{ + POLL_IN = 1, +#define POLL_IN POLL_IN + POLL_OUT, +#define POLL_OUT POLL_OUT + POLL_MSG, +#define POLL_MSG POLL_MSG + POLL_ERR, +#define POLL_ERR POLL_ERR + POLL_PRI, +#define POLL_PRI POLL_PRI + POLL_HUP +#define POLL_HUP POLL_HUP +}; + +#undef __need_siginfo_t + + + + + +#define __have_sigevent_t 1 + + +#define __SIGEV_MAX_SIZE 64 + + + +#define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) + + +typedef struct sigevent + { + sigval_t sigev_value; + int sigev_signo; + int sigev_notify; + + union + { + int _pad[((64 / sizeof (int)) - 3)]; + + + + __pid_t _tid; + + struct + { + void (*_function) (sigval_t); + void *_attribute; + } _sigev_thread; + } _sigev_un; + } sigevent_t; + + +#define sigev_notify_function _sigev_un._sigev_thread._function +#define sigev_notify_attributes _sigev_un._sigev_thread._attribute + + +enum +{ + SIGEV_SIGNAL = 0, +#define SIGEV_SIGNAL SIGEV_SIGNAL + SIGEV_NONE, +#define SIGEV_NONE SIGEV_NONE + SIGEV_THREAD, +#define SIGEV_THREAD SIGEV_THREAD + + SIGEV_THREAD_ID = 4 +#define SIGEV_THREAD_ID SIGEV_THREAD_ID +}; +# 80 "/usr/include/signal.h" 2 3 4 + + + + +typedef void (*__sighandler_t) (int); + + + + +extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) + throw (); + +extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler) + throw (); + + + + + + + +extern __sighandler_t signal (int __sig, __sighandler_t __handler) + throw (); +# 113 "/usr/include/signal.h" 3 4 + + + + + +extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler) + throw (); + + + + + + +extern int kill (__pid_t __pid, int __sig) throw (); + + + + + + +extern int killpg (__pid_t __pgrp, int __sig) throw (); + + + + +extern int raise (int __sig) throw (); + + + + +extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) + throw (); +extern int gsignal (int __sig) throw (); + + + + +extern void psignal (int __sig, __const char *__s); + + + + +extern void psiginfo (__const siginfo_t *__pinfo, __const char *__s); +# 168 "/usr/include/signal.h" 3 4 +extern int __sigpause (int __sig_or_mask, int __is_sig); +# 177 "/usr/include/signal.h" 3 4 +extern int sigpause (int __sig) __asm__ ("__xpg_sigpause"); +# 193 "/usr/include/signal.h" 3 4 +#define sigmask(sig) __sigmask(sig) + + +extern int sigblock (int __mask) throw () __attribute__ ((__deprecated__)); + + +extern int sigsetmask (int __mask) throw () __attribute__ ((__deprecated__)); + + +extern int siggetmask (void) throw () __attribute__ ((__deprecated__)); + + + + +#define NSIG _NSIG + + + +typedef __sighandler_t sighandler_t; + + + + +typedef __sighandler_t sig_t; + + + + + +extern int sigemptyset (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); + + +extern int sigfillset (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); + + +extern int sigaddset (sigset_t *__set, int __signo) throw () __attribute__ ((__nonnull__ (1))); + + +extern int sigdelset (sigset_t *__set, int __signo) throw () __attribute__ ((__nonnull__ (1))); + + +extern int sigismember (__const sigset_t *__set, int __signo) + throw () __attribute__ ((__nonnull__ (1))); + + + +extern int sigisemptyset (__const sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); + + +extern int sigandset (sigset_t *__set, __const sigset_t *__left, + __const sigset_t *__right) throw () __attribute__ ((__nonnull__ (1, 2, 3))); + + +extern int sigorset (sigset_t *__set, __const sigset_t *__left, + __const sigset_t *__right) throw () __attribute__ ((__nonnull__ (1, 2, 3))); + + + + +# 1 "/usr/include/bits/sigaction.h" 1 3 4 +# 25 "/usr/include/bits/sigaction.h" 3 4 +struct sigaction + { + + + union + { + + __sighandler_t sa_handler; + + void (*sa_sigaction) (int, siginfo_t *, void *); + } + __sigaction_handler; +#define sa_handler __sigaction_handler.sa_handler +#define sa_sigaction __sigaction_handler.sa_sigaction + + + + + + __sigset_t sa_mask; + + + int sa_flags; + + + void (*sa_restorer) (void); + }; + + +#define SA_NOCLDSTOP 1 +#define SA_NOCLDWAIT 2 +#define SA_SIGINFO 4 + + +#define SA_ONSTACK 0x08000000 + + +#define SA_RESTART 0x10000000 +#define SA_NODEFER 0x40000000 + +#define SA_RESETHAND 0x80000000 + + +#define SA_INTERRUPT 0x20000000 + + +#define SA_NOMASK SA_NODEFER +#define SA_ONESHOT SA_RESETHAND +#define SA_STACK SA_ONSTACK + + + +#define SIG_BLOCK 0 +#define SIG_UNBLOCK 1 +#define SIG_SETMASK 2 +# 253 "/usr/include/signal.h" 2 3 4 + + +extern int sigprocmask (int __how, __const sigset_t *__restrict __set, + sigset_t *__restrict __oset) throw (); + + + + + + +extern int sigsuspend (__const sigset_t *__set) __attribute__ ((__nonnull__ (1))); + + +extern int sigaction (int __sig, __const struct sigaction *__restrict __act, + struct sigaction *__restrict __oact) throw (); + + +extern int sigpending (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1))); + + + + + + +extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig) + __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern int sigwaitinfo (__const sigset_t *__restrict __set, + siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int sigtimedwait (__const sigset_t *__restrict __set, + siginfo_t *__restrict __info, + __const struct timespec *__restrict __timeout) + __attribute__ ((__nonnull__ (1))); + + + +extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val) + throw (); +# 310 "/usr/include/signal.h" 3 4 +extern __const char *__const _sys_siglist[65]; +extern __const char *__const sys_siglist[65]; + + +struct sigvec + { + __sighandler_t sv_handler; + int sv_mask; + + int sv_flags; +#define sv_onstack sv_flags + }; + + +#define SV_ONSTACK (1 << 0) +#define SV_INTERRUPT (1 << 1) +#define SV_RESETHAND (1 << 2) + + + + + + + +extern int sigvec (int __sig, __const struct sigvec *__vec, + struct sigvec *__ovec) throw (); + + + +# 1 "/usr/include/bits/sigcontext.h" 1 3 4 +# 26 "/usr/include/bits/sigcontext.h" 3 4 +#define sigcontext_struct sigcontext + +# 1 "/usr/include/asm/sigcontext.h" 1 3 4 + +#define _ASMARM_SIGCONTEXT_H + + + + + + +struct sigcontext { + unsigned long trap_no; + unsigned long error_code; + unsigned long oldmask; + unsigned long arm_r0; + unsigned long arm_r1; + unsigned long arm_r2; + unsigned long arm_r3; + unsigned long arm_r4; + unsigned long arm_r5; + unsigned long arm_r6; + unsigned long arm_r7; + unsigned long arm_r8; + unsigned long arm_r9; + unsigned long arm_r10; + unsigned long arm_fp; + unsigned long arm_ip; + unsigned long arm_sp; + unsigned long arm_lr; + unsigned long arm_pc; + unsigned long arm_cpsr; + unsigned long fault_address; +}; +# 29 "/usr/include/bits/sigcontext.h" 2 3 4 + + +#define __need_NULL +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 33 "/usr/include/bits/sigcontext.h" 2 3 4 +# 340 "/usr/include/signal.h" 2 3 4 + + +extern int sigreturn (struct sigcontext *__scp) throw (); + + + + + +#define __need_size_t +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 350 "/usr/include/signal.h" 2 3 4 + + + + +extern int siginterrupt (int __sig, int __interrupt) throw (); + +# 1 "/usr/include/bits/sigstack.h" 1 3 4 +# 26 "/usr/include/bits/sigstack.h" 3 4 +struct sigstack + { + void *ss_sp; + int ss_onstack; + }; + + + +enum +{ + SS_ONSTACK = 1, +#define SS_ONSTACK SS_ONSTACK + SS_DISABLE +#define SS_DISABLE SS_DISABLE +}; + + +#define MINSIGSTKSZ 2048 + + +#define SIGSTKSZ 8192 + + + +typedef struct sigaltstack + { + void *ss_sp; + int ss_flags; + size_t ss_size; + } stack_t; +# 357 "/usr/include/signal.h" 2 3 4 + + +# 1 "/usr/include/sys/ucontext.h" 1 3 4 +# 22 "/usr/include/sys/ucontext.h" 3 4 +#define _SYS_UCONTEXT_H 1 + + +# 1 "/usr/include/signal.h" 1 3 4 +# 26 "/usr/include/sys/ucontext.h" 2 3 4 + + + +# 1 "/usr/include/bits/sigcontext.h" 1 3 4 +# 30 "/usr/include/sys/ucontext.h" 2 3 4 + +typedef int greg_t; + + +#define NGREG 18 + + +typedef greg_t gregset_t[18]; + + +enum +{ + REG_R0 = 0, +#define REG_R0 REG_R0 + REG_R1 = 1, +#define REG_R1 REG_R1 + REG_R2 = 2, +#define REG_R2 REG_R2 + REG_R3 = 3, +#define REG_R3 REG_R3 + REG_R4 = 4, +#define REG_R4 REG_R4 + REG_R5 = 5, +#define REG_R5 REG_R5 + REG_R6 = 6, +#define REG_R6 REG_R6 + REG_R7 = 7, +#define REG_R7 REG_R7 + REG_R8 = 8, +#define REG_R8 REG_R8 + REG_R9 = 9, +#define REG_R9 REG_R9 + REG_R10 = 10, +#define REG_R10 REG_R10 + REG_R11 = 11, +#define REG_R11 REG_R11 + REG_R12 = 12, +#define REG_R12 REG_R12 + REG_R13 = 13, +#define REG_R13 REG_R13 + REG_R14 = 14, +#define REG_R14 REG_R14 + REG_R15 = 15 +#define REG_R15 REG_R15 +}; + +struct _libc_fpstate +{ + struct + { + unsigned int sign1:1; + unsigned int unused:15; + unsigned int sign2:1; + unsigned int exponent:14; + unsigned int j:1; + unsigned int mantissa1:31; + unsigned int mantissa0:32; + } fpregs[8]; + unsigned int fpsr:32; + unsigned int fpcr:32; + unsigned char ftype[8]; + unsigned int init_flag; +}; + +typedef struct _libc_fpstate fpregset_t; + + + + + +typedef struct sigcontext mcontext_t; + + +typedef struct ucontext + { + unsigned long uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + __sigset_t uc_sigmask; + unsigned long uc_regspace[128] __attribute__((__aligned__(8))); + } ucontext_t; +# 360 "/usr/include/signal.h" 2 3 4 + + + + + +extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) + throw () __attribute__ ((__deprecated__)); + + + +extern int sigaltstack (__const struct sigaltstack *__restrict __ss, + struct sigaltstack *__restrict __oss) throw (); + + + + + + + +extern int sighold (int __sig) throw (); + + +extern int sigrelse (int __sig) throw (); + + +extern int sigignore (int __sig) throw (); + + +extern __sighandler_t sigset (int __sig, __sighandler_t __disp) throw (); + + + + + + +# 1 "/usr/include/bits/sigthread.h" 1 3 4 +# 21 "/usr/include/bits/sigthread.h" 3 4 +#define _BITS_SIGTHREAD_H 1 +# 31 "/usr/include/bits/sigthread.h" 3 4 +extern int pthread_sigmask (int __how, + __const __sigset_t *__restrict __newmask, + __sigset_t *__restrict __oldmask)throw (); + + +extern int pthread_kill (pthread_t __threadid, int __signo) throw (); + + + +extern int pthread_sigqueue (pthread_t __threadid, int __signo, + const union sigval __value) throw (); +# 396 "/usr/include/signal.h" 2 3 4 + + + + + + +extern int __libc_current_sigrtmin (void) throw (); + +extern int __libc_current_sigrtmax (void) throw (); + + + +} +# 20 "./../../dist/include/mozilla/Assertions.h" 2 +# 65 "./../../dist/include/mozilla/Assertions.h" +#define MOZ_STATIC_ASSERT_GLUE1(x,y) x ##y +#define MOZ_STATIC_ASSERT_GLUE(x,y) MOZ_STATIC_ASSERT_GLUE1(x, y) +# 96 "./../../dist/include/mozilla/Assertions.h" +#define MOZ_STATIC_ASSERT(cond,reason) typedef int MOZ_STATIC_ASSERT_GLUE(moz_static_assert, __COUNTER__)[(cond) ? 1 : -1] + + + + + + + +#define MOZ_STATIC_ASSERT_IF(cond,expr,reason) MOZ_STATIC_ASSERT(!(cond) || (expr), reason) + + +extern "C" { +# 150 "./../../dist/include/mozilla/Assertions.h" +#define MOZ_CRASH() do { raise(SIGABRT); } while (0) + + + + + + +extern __attribute__((weak)) __attribute__((visibility("default"))) void +MOZ_Assert(const char* s, const char* file, int ln); + +static __attribute__((always_inline)) inline void +MOZ_OutputAssertMessage(const char* s, const char *file, int ln) +{ + + + + + fprintf(stderr, "Assertion failure: %s, at %s:%d\n", s, file, ln); + fflush(stderr); + +} + + +} +# 250 "./../../dist/include/mozilla/Assertions.h" +#define MOZ_ASSERT(...) do { } while(0) +# 269 "./../../dist/include/mozilla/Assertions.h" +#define MOZ_ASSERT_IF(cond,expr) do { } while (0) +# 281 "./../../dist/include/mozilla/Assertions.h" +#define MOZ_NOT_REACHED_MARKER() __builtin_unreachable() +# 311 "./../../dist/include/mozilla/Assertions.h" +#define MOZ_NOT_REACHED(reason) MOZ_NOT_REACHED_MARKER() +# 349 "./../../dist/include/mozilla/Assertions.h" +#define MOZ_ALWAYS_TRUE(expr) ((void)(expr)) +#define MOZ_ALWAYS_FALSE(expr) ((void)(expr)) +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" +#define jsscope_h___ + + + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/new" 1 3 +# 37 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/new" 3 +#define _NEW + + +# 40 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/new" 3 + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/cstddef" 1 3 +# 41 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/cstddef" 3 + +# 42 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/cstddef" 3 + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 1 3 +# 32 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_CXX_CONFIG_H 1 + + +#define __GLIBCXX__ 20120702 + + + + +#define _GLIBCXX_HAVE_ATTRIBUTE_VISIBILITY 1 + + +#define _GLIBCXX_VISIBILITY_ATTR(V) __attribute__ ((__visibility__ (#V))) +# 54 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_DEPRECATED 1 + + + + + +#define _GLIBCXX_DEPRECATED_ATTR +# 95 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION 0 +# 117 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_STD_D _GLIBCXX_STD +#define _GLIBCXX_STD_P _GLIBCXX_STD +#define _GLIBCXX_STD_PR _GLIBCXX_STD +#define _GLIBCXX_STD std +#define _GLIBCXX_BEGIN_NESTED_NAMESPACE(X,Y) _GLIBCXX_BEGIN_NAMESPACE(X) +#define _GLIBCXX_END_NESTED_NAMESPACE _GLIBCXX_END_NAMESPACE +#define _GLIBCXX_BEGIN_NAMESPACE(X) namespace X _GLIBCXX_VISIBILITY_ATTR(default) { +#define _GLIBCXX_END_NAMESPACE } +# 240 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#undef _GLIBCXX_LONG_DOUBLE_COMPAT +# 252 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_LDBL_NAMESPACE +#define _GLIBCXX_BEGIN_LDBL_NAMESPACE +#define _GLIBCXX_END_LDBL_NAMESPACE + + + + + +#define _GLIBCXX_BEGIN_EXTERN_C extern "C" { +#define _GLIBCXX_END_EXTERN_C } +# 275 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/os_defines.h" 1 3 +# 31 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/os_defines.h" 3 +#define _GLIBCXX_OS_DEFINES 1 + + + + + +#define __NO_CTYPE 1 +# 276 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 2 3 + + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/cpu_defines.h" 1 3 +# 31 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/cpu_defines.h" 3 +#define _GLIBCXX_CPU_DEFINES 1 +# 279 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 2 3 + + + + +#define _GLIBCXX_PSEUDO_VISIBILITY(V) +# 301 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_EXTERN_TEMPLATE 1 + + + + + + +#define _GLIBCXX_WEAK_DEFINITION + + + + + + +#define __glibcxx_assert(_Condition) +# 346 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_FAST_MATH 0 + + + + + + +#define __N(msgid) (msgid) + + +#undef min +#undef max + + +#define _GLIBCXX_PURE __attribute__ ((__pure__)) + + + +#define _GLIBCXX_CONST __attribute__ ((__const__)) + + + +#define _GLIBCXX_NORETURN __attribute__ ((__noreturn__)) + + + + +#define _GLIBCXX_NOTHROW throw() +# 384 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_HAVE_ACOSF 1 + + +#define _GLIBCXX_HAVE_ACOSL 1 + + +#define _GLIBCXX_HAVE_ASINF 1 + + +#define _GLIBCXX_HAVE_ASINL 1 + + +#define _GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE 1 + + +#define _GLIBCXX_HAVE_ATAN2F 1 + + +#define _GLIBCXX_HAVE_ATAN2L 1 + + +#define _GLIBCXX_HAVE_ATANF 1 + + +#define _GLIBCXX_HAVE_ATANL 1 + + + + + +#define _GLIBCXX_HAVE_CEILF 1 + + +#define _GLIBCXX_HAVE_CEILL 1 + + +#define _GLIBCXX_HAVE_COMPLEX_H 1 + + +#define _GLIBCXX_HAVE_COSF 1 + + +#define _GLIBCXX_HAVE_COSHF 1 + + +#define _GLIBCXX_HAVE_COSHL 1 + + +#define _GLIBCXX_HAVE_COSL 1 + + +#define _GLIBCXX_HAVE_DLFCN_H 1 + + +#define _GLIBCXX_HAVE_EBADMSG 1 + + +#define _GLIBCXX_HAVE_ECANCELED 1 + + +#define _GLIBCXX_HAVE_EIDRM 1 + + +#define _GLIBCXX_HAVE_ENDIAN_H 1 + + +#define _GLIBCXX_HAVE_ENODATA 1 + + +#define _GLIBCXX_HAVE_ENOLINK 1 + + +#define _GLIBCXX_HAVE_ENOSR 1 + + +#define _GLIBCXX_HAVE_ENOSTR 1 + + +#define _GLIBCXX_HAVE_ENOTRECOVERABLE 1 + + +#define _GLIBCXX_HAVE_ENOTSUP 1 + + +#define _GLIBCXX_HAVE_EOVERFLOW 1 + + +#define _GLIBCXX_HAVE_EOWNERDEAD 1 + + +#define _GLIBCXX_HAVE_EPROTO 1 + + +#define _GLIBCXX_HAVE_ETIME 1 + + +#define _GLIBCXX_HAVE_ETXTBSY 1 + + +#define _GLIBCXX_HAVE_EXECINFO_H 1 + + +#define _GLIBCXX_HAVE_EXPF 1 + + +#define _GLIBCXX_HAVE_EXPL 1 + + +#define _GLIBCXX_HAVE_FABSF 1 + + +#define _GLIBCXX_HAVE_FABSL 1 + + +#define _GLIBCXX_HAVE_FENV_H 1 + + +#define _GLIBCXX_HAVE_FINITE 1 + + +#define _GLIBCXX_HAVE_FINITEF 1 + + +#define _GLIBCXX_HAVE_FINITEL 1 + + +#define _GLIBCXX_HAVE_FLOAT_H 1 + + +#define _GLIBCXX_HAVE_FLOORF 1 + + +#define _GLIBCXX_HAVE_FLOORL 1 + + +#define _GLIBCXX_HAVE_FMODF 1 + + +#define _GLIBCXX_HAVE_FMODL 1 +# 531 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_HAVE_FREXPF 1 + + +#define _GLIBCXX_HAVE_FREXPL 1 + + +#define _GLIBCXX_HAVE_GETIPINFO 1 + + + +#define _GLIBCXX_HAVE_GTHR_DEFAULT 1 + + +#define _GLIBCXX_HAVE_HYPOT 1 + + +#define _GLIBCXX_HAVE_HYPOTF 1 + + +#define _GLIBCXX_HAVE_HYPOTL 1 + + +#define _GLIBCXX_HAVE_ICONV 1 + + + + + +#define _GLIBCXX_HAVE_INT64_T 1 + + + + + +#define _GLIBCXX_HAVE_INT64_T_LONG_LONG 1 + + +#define _GLIBCXX_HAVE_INTTYPES_H 1 + + +#define _GLIBCXX_HAVE_ISINF 1 + + +#define _GLIBCXX_HAVE_ISINFF 1 + + +#define _GLIBCXX_HAVE_ISINFL 1 + + +#define _GLIBCXX_HAVE_ISNAN 1 + + +#define _GLIBCXX_HAVE_ISNANF 1 + + +#define _GLIBCXX_HAVE_ISNANL 1 + + +#define _GLIBCXX_HAVE_ISWBLANK 1 + + +#define _GLIBCXX_HAVE_LC_MESSAGES 1 + + +#define _GLIBCXX_HAVE_LDEXPF 1 + + +#define _GLIBCXX_HAVE_LDEXPL 1 + + +#define _GLIBCXX_HAVE_LIBINTL_H 1 + + +#define _GLIBCXX_HAVE_LIMIT_AS 1 + + +#define _GLIBCXX_HAVE_LIMIT_DATA 1 + + +#define _GLIBCXX_HAVE_LIMIT_FSIZE 1 + + +#define _GLIBCXX_HAVE_LIMIT_RSS 1 + + +#define _GLIBCXX_HAVE_LIMIT_VMEM 0 + + +#define _GLIBCXX_HAVE_LINUX_FUTEX 1 + + +#define _GLIBCXX_HAVE_LOCALE_H 1 + + +#define _GLIBCXX_HAVE_LOG10F 1 + + +#define _GLIBCXX_HAVE_LOG10L 1 + + +#define _GLIBCXX_HAVE_LOGF 1 + + +#define _GLIBCXX_HAVE_LOGL 1 +# 643 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_HAVE_MBSTATE_T 1 + + +#define _GLIBCXX_HAVE_MEMORY_H 1 + + +#define _GLIBCXX_HAVE_MODF 1 + + +#define _GLIBCXX_HAVE_MODFF 1 + + +#define _GLIBCXX_HAVE_MODFL 1 + + + + + +#define _GLIBCXX_HAVE_POLL 1 + + +#define _GLIBCXX_HAVE_POWF 1 + + +#define _GLIBCXX_HAVE_POWL 1 + + + + + +#define _GLIBCXX_HAVE_SETENV 1 + + +#define _GLIBCXX_HAVE_SINCOS 1 + + +#define _GLIBCXX_HAVE_SINCOSF 1 + + +#define _GLIBCXX_HAVE_SINCOSL 1 + + +#define _GLIBCXX_HAVE_SINF 1 + + +#define _GLIBCXX_HAVE_SINHF 1 + + +#define _GLIBCXX_HAVE_SINHL 1 + + +#define _GLIBCXX_HAVE_SINL 1 + + +#define _GLIBCXX_HAVE_SQRTF 1 + + +#define _GLIBCXX_HAVE_SQRTL 1 + + +#define _GLIBCXX_HAVE_STDBOOL_H 1 + + +#define _GLIBCXX_HAVE_STDINT_H 1 + + +#define _GLIBCXX_HAVE_STDLIB_H 1 + + +#define _GLIBCXX_HAVE_STRERROR_L 1 + + +#define _GLIBCXX_HAVE_STRERROR_R 1 + + +#define _GLIBCXX_HAVE_STRINGS_H 1 + + +#define _GLIBCXX_HAVE_STRING_H 1 + + +#define _GLIBCXX_HAVE_STRTOF 1 + + +#define _GLIBCXX_HAVE_STRTOLD 1 + + +#define _GLIBCXX_HAVE_STRXFRM_L 1 + + + + + +#define _GLIBCXX_HAVE_SYS_IOCTL_H 1 + + +#define _GLIBCXX_HAVE_SYS_IPC_H 1 +# 748 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_HAVE_SYS_PARAM_H 1 + + +#define _GLIBCXX_HAVE_SYS_RESOURCE_H 1 + + +#define _GLIBCXX_HAVE_SYS_SEM_H 1 + + +#define _GLIBCXX_HAVE_SYS_STAT_H 1 + + +#define _GLIBCXX_HAVE_SYS_TIME_H 1 + + +#define _GLIBCXX_HAVE_SYS_TYPES_H 1 + + +#define _GLIBCXX_HAVE_SYS_UIO_H 1 + + + + + +#define _GLIBCXX_HAVE_S_ISREG 1 + + +#define _GLIBCXX_HAVE_TANF 1 + + +#define _GLIBCXX_HAVE_TANHF 1 + + +#define _GLIBCXX_HAVE_TANHL 1 + + +#define _GLIBCXX_HAVE_TANL 1 + + +#define _GLIBCXX_HAVE_TGMATH_H 1 + + +#define _GLIBCXX_HAVE_TLS 1 + + +#define _GLIBCXX_HAVE_UNISTD_H 1 + + +#define _GLIBCXX_HAVE_VFWSCANF 1 + + +#define _GLIBCXX_HAVE_VSWSCANF 1 + + +#define _GLIBCXX_HAVE_VWSCANF 1 + + +#define _GLIBCXX_HAVE_WCHAR_H 1 + + +#define _GLIBCXX_HAVE_WCSTOF 1 + + +#define _GLIBCXX_HAVE_WCTYPE_H 1 + + +#define _GLIBCXX_HAVE_WRITEV 1 +# 1003 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_ICONV_CONST + + + +#define LT_OBJDIR ".libs/" + + + + + +#define _GLIBCXX_PACKAGE_BUGREPORT "" + + +#define _GLIBCXX_PACKAGE_NAME "package-unused" + + +#define _GLIBCXX_PACKAGE_STRING "package-unused version-unused" + + +#define _GLIBCXX_PACKAGE_TARNAME "libstdc++" + + +#define _GLIBCXX_PACKAGE_URL "" + + +#define _GLIBCXX_PACKAGE__GLIBCXX_VERSION "version-unused" +# 1046 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define STDC_HEADERS 1 + + + + + +#define _GLIBCXX_ATOMIC_BUILTINS_1 1 + + + +#define _GLIBCXX_ATOMIC_BUILTINS_2 1 + + +#define _GLIBCXX_ATOMIC_BUILTINS_4 1 +# 1072 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_HAS_GTHREADS 1 + + +#define _GLIBCXX_HOSTED 1 + + + + +#define _GLIBCXX_PTRDIFF_T_IS_INT 1 + + +#define _GLIBCXX_RES_LIMITS 1 + + +#define _GLIBCXX_SIZE_T_IS_UINT 1 + + + + + +#define _GLIBCXX_STDIO_MACROS 1 + + +#define _GLIBCXX_SYMVER 1 + + + + + +#define _GLIBCXX_SYMVER_GNU 1 + + + + + + +#define _GLIBCXX_USE_C99 1 + + + + +#define _GLIBCXX_USE_C99_COMPLEX 1 + + + + +#define _GLIBCXX_USE_C99_COMPLEX_TR1 1 + + + +#define _GLIBCXX_USE_C99_CTYPE_TR1 1 + + + +#define _GLIBCXX_USE_C99_FENV_TR1 1 + + + +#define _GLIBCXX_USE_C99_INTTYPES_TR1 1 + + + +#define _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 1 + + + +#define _GLIBCXX_USE_C99_MATH 1 + + + +#define _GLIBCXX_USE_C99_MATH_TR1 1 + + + +#define _GLIBCXX_USE_C99_STDINT_TR1 1 +# 1159 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/armv7a-hardfloat-linux-gnueabi/bits/c++config.h" 3 +#define _GLIBCXX_USE_GETTIMEOFDAY 1 + + +#define _GLIBCXX_USE_LFS 1 + + +#define _GLIBCXX_USE_LONG_LONG 1 + + + + + +#define _GLIBCXX_USE_NLS 1 + + + +#define _GLIBCXX_USE_RANDOM_TR1 1 + + + + + +#define _GLIBCXX_USE_WCHAR_T 1 +# 44 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/cstddef" 2 3 +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 45 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/cstddef" 2 3 + + +#define _GLIBCXX_CSTDDEF 1 + +namespace std __attribute__ ((__visibility__ ("default"))) { + + using ::ptrdiff_t; + using ::size_t; + +} +# 42 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/new" 2 3 +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/exception" 1 3 +# 33 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/exception" 3 +#define __EXCEPTION__ + + +# 36 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/exception" 3 + +#pragma GCC visibility push(default) + + + +extern "C++" { + +namespace std +{ +# 61 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/exception" 3 + class exception + { + public: + exception() throw() { } + virtual ~exception() throw(); + + + + virtual const char* what() const throw(); + }; + + + + class bad_exception : public exception + { + public: + bad_exception() throw() { } + + + + virtual ~bad_exception() throw(); + + + virtual const char* what() const throw(); + }; + + + typedef void (*terminate_handler) (); + + + typedef void (*unexpected_handler) (); + + + terminate_handler set_terminate(terminate_handler) throw(); + + + + void terminate() throw() __attribute__ ((__noreturn__)); + + + unexpected_handler set_unexpected(unexpected_handler) throw(); + + + + void unexpected() __attribute__ ((__noreturn__)); +# 118 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/exception" 3 + bool uncaught_exception() throw() __attribute__ ((__pure__)); + + +} + +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { +# 141 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/exception" 3 + void __verbose_terminate_handler(); + +} + +} + +#pragma GCC visibility pop +# 43 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/new" 2 3 + +#pragma GCC visibility push(default) + +extern "C++" { + +namespace std +{ + + + + + + + class bad_alloc : public exception + { + public: + bad_alloc() throw() { } + + + + virtual ~bad_alloc() throw(); + + + virtual const char* what() const throw(); + }; + + struct nothrow_t { }; + + extern const nothrow_t nothrow; + + + + typedef void (*new_handler)(); + + + + new_handler set_new_handler(new_handler) throw(); +} +# 93 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/new" 3 +void* operator new(std::size_t) throw (std::bad_alloc); +void* operator new[](std::size_t) throw (std::bad_alloc); +void operator delete(void*) throw(); +void operator delete[](void*) throw(); +void* operator new(std::size_t, const std::nothrow_t&) throw(); +void* operator new[](std::size_t, const std::nothrow_t&) throw(); +void operator delete(void*, const std::nothrow_t&) throw(); +void operator delete[](void*, const std::nothrow_t&) throw(); + + +inline void* operator new(std::size_t, void* __p) throw() { return __p; } +inline void* operator new[](std::size_t, void* __p) throw() { return __p; } + + +inline void operator delete (void*, void*) throw() { } +inline void operator delete[](void*, void*) throw() { } + +} + +#pragma GCC visibility pop +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" 2 + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" +#define jsobj_h___ +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define jsapi_h___ + + + + + +# 1 "./../../dist/include/mozilla/FloatingPoint.h" 1 +# 9 "./../../dist/include/mozilla/FloatingPoint.h" +#define mozilla_FloatingPoint_h_ +# 40 "./../../dist/include/mozilla/FloatingPoint.h" +typedef int moz_static_assert0[(sizeof(double) == sizeof(uint64_t)) ? 1 : -1]; + + + + + +#define MOZ_DOUBLE_SIGN_BIT 0x8000000000000000ULL +#define MOZ_DOUBLE_EXPONENT_BITS 0x7ff0000000000000ULL +#define MOZ_DOUBLE_SIGNIFICAND_BITS 0x000fffffffffffffULL + +#define MOZ_DOUBLE_EXPONENT_BIAS 1023 +#define MOZ_DOUBLE_EXPONENT_SHIFT 52 + +typedef int + moz_static_assert1 +# 53 "./../../dist/include/mozilla/FloatingPoint.h" + [((0x8000000000000000ULL & 0x7ff0000000000000ULL) == 0) ? 1 : -1] + ; +typedef int + moz_static_assert2 +# 55 "./../../dist/include/mozilla/FloatingPoint.h" + [((0x8000000000000000ULL & 0x000fffffffffffffULL) == 0) ? 1 : -1] + ; +typedef int + moz_static_assert3 +# 57 "./../../dist/include/mozilla/FloatingPoint.h" + [((0x7ff0000000000000ULL & 0x000fffffffffffffULL) == 0) ? 1 : -1] + ; + +typedef int + + moz_static_assert4 +# 60 "./../../dist/include/mozilla/FloatingPoint.h" + [((0x8000000000000000ULL | 0x7ff0000000000000ULL | 0x000fffffffffffffULL) == ~(uint64_t)0) ? 1 : -1] + + ; + + +extern "C" { + + + + + + +union MozDoublePun { + + + + + + + uint64_t u; + double d; +}; + + +static __attribute__((always_inline)) inline int +MOZ_DOUBLE_IS_NaN(double d) +{ + union MozDoublePun pun; + pun.d = d; + + + + + + return (pun.u & 0x7ff0000000000000ULL) == 0x7ff0000000000000ULL && + (pun.u & 0x000fffffffffffffULL) != 0; +} + + +static __attribute__((always_inline)) inline int +MOZ_DOUBLE_IS_INFINITE(double d) +{ + union MozDoublePun pun; + pun.d = d; + + + return (pun.u & ~0x8000000000000000ULL) == 0x7ff0000000000000ULL; +} + + +static __attribute__((always_inline)) inline int +MOZ_DOUBLE_IS_FINITE(double d) +{ + union MozDoublePun pun; + pun.d = d; + + + + + + return (pun.u & 0x7ff0000000000000ULL) != 0x7ff0000000000000ULL; +} + + + + + +static __attribute__((always_inline)) inline int +MOZ_DOUBLE_IS_NEGATIVE(double d) +{ + union MozDoublePun pun; + pun.d = d; + + do { } while(0); + + + return (pun.u & 0x8000000000000000ULL) != 0; +} + + +static __attribute__((always_inline)) inline int +MOZ_DOUBLE_IS_NEGATIVE_ZERO(double d) +{ + union MozDoublePun pun; + pun.d = d; + + + return pun.u == 0x8000000000000000ULL; +} + + +static __attribute__((always_inline)) inline int_fast16_t +MOZ_DOUBLE_EXPONENT(double d) +{ + union MozDoublePun pun; + pun.d = d; + + + + + + return (int_fast16_t)((pun.u & 0x7ff0000000000000ULL) >> 52) - + 1023; +} + + +static __attribute__((always_inline)) inline double +MOZ_DOUBLE_POSITIVE_INFINITY() +{ + union MozDoublePun pun; + + + + + + pun.u = 0x7ff0000000000000ULL; + return pun.d; +} + + +static __attribute__((always_inline)) inline double +MOZ_DOUBLE_NEGATIVE_INFINITY() +{ + union MozDoublePun pun; + + + + + + pun.u = 0x8000000000000000ULL | 0x7ff0000000000000ULL; + return pun.d; +} + + +static __attribute__((always_inline)) inline double +MOZ_DOUBLE_SPECIFIC_NaN(int signbit, uint64_t significand) +{ + union MozDoublePun pun; + + do { } while(0); + do { } while(0); + do { } while(0); + + pun.u = (signbit ? 0x8000000000000000ULL : 0) | + 0x7ff0000000000000ULL | + significand; + do { } while(0); + return pun.d; +} + + + + + +static __attribute__((always_inline)) inline double +MOZ_DOUBLE_NaN() +{ + return MOZ_DOUBLE_SPECIFIC_NaN(0, 0xfffffffffffffULL); +} + + +static __attribute__((always_inline)) inline double +MOZ_DOUBLE_MIN_VALUE() +{ + union MozDoublePun pun; + pun.u = 1; + return pun.d; +} + + +static __attribute__((always_inline)) inline uint32_t +MOZ_HASH_DOUBLE(double d) +{ + union MozDoublePun pun; + pun.d = d; + + return ((uint32_t)(pun.u >> 32)) ^ ((uint32_t)(pun.u)); +} + +static __attribute__((always_inline)) inline int +MOZ_DOUBLE_IS_INT32(double d, int32_t* i) +{ + + + + + + return !MOZ_DOUBLE_IS_NEGATIVE_ZERO(d) && d == (*i = (int32_t)d); +} + + +} +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 + + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 + +# 1 "./js-config.h" 1 +# 10 "./js-config.h" +#define js_config_h___ + + + + + + +#define JS_THREADSAFE 1 + + +#define JS_HAS_CTYPES 1 + + + + + + + +#define JS_HAVE_ENDIAN_H 1 +# 60 "./js-config.h" +#define JS_BYTES_PER_WORD 4 + + + +#define JS_METHODJIT 1 + + +#define JS_HAS_XML_SUPPORT 1 +# 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspubtd.h" 1 + + + + + + + +#define jspubtd_h___ + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" 1 +# 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" +#define jstypes_h___ + + +# 1 "./../../dist/include/mozilla/Util.h" 1 +# 14 "./../../dist/include/mozilla/Util.h" +#define mozilla_Util_h_ + + + + + + + +namespace mozilla { +# 41 "./../../dist/include/mozilla/Util.h" +template +struct DebugOnly +{ +# 69 "./../../dist/include/mozilla/Util.h" + DebugOnly() {} + DebugOnly(const T&) {} + DebugOnly(const DebugOnly&) {} + DebugOnly& operator=(const T&) { return *this; } + void operator++(int) {} + void operator--(int) {} + + + + + + + + ~DebugOnly() {} +}; + + + + + +template +struct AlignmentFinder +{ +private: + struct Aligner + { + char c; + T t; + }; + +public: + static const int alignment = sizeof(Aligner) - sizeof(T); +}; + +#define MOZ_ALIGNOF(T) mozilla::AlignmentFinder::alignment +# 116 "./../../dist/include/mozilla/Util.h" +#define MOZ_ALIGNED_DECL(_type,_align) _type __attribute__((aligned(_align))) +# 131 "./../../dist/include/mozilla/Util.h" +template +struct AlignedElem; + + + + + + +template<> +struct AlignedElem<1> +{ + uint8_t elem __attribute__((aligned(1))); +}; + +template<> +struct AlignedElem<2> +{ + uint8_t elem __attribute__((aligned(2))); +}; + +template<> +struct AlignedElem<4> +{ + uint8_t elem __attribute__((aligned(4))); +}; + +template<> +struct AlignedElem<8> +{ + uint8_t elem __attribute__((aligned(8))); +}; + +template<> +struct AlignedElem<16> +{ + uint8_t elem __attribute__((aligned(16))); +}; +# 179 "./../../dist/include/mozilla/Util.h" +template +struct AlignedStorage +{ + union U { + char bytes[nbytes]; + uint64_t _; + } u; + + const void *addr() const { return u.bytes; } + void *addr() { return u.bytes; } +}; + +template +struct AlignedStorage2 +{ + union U { + char bytes[sizeof(T)]; + uint64_t _; + } u; + + const T *addr() const { return (const T *)u.bytes; } + T *addr() { return (T *)(void *)u.bytes; } +}; +# 214 "./../../dist/include/mozilla/Util.h" +template +class Maybe +{ + AlignedStorage2 storage; + bool constructed; + + T &asT() { return *storage.addr(); } + + explicit Maybe(const Maybe &other); + const Maybe &operator=(const Maybe &other); + + public: + Maybe() { constructed = false; } + ~Maybe() { if (constructed) asT().~T(); } + + bool empty() const { return !constructed; } + + void construct() { + do { } while(0); + new(storage.addr()) T(); + constructed = true; + } + + template + void construct(const T1 &t1) { + do { } while(0); + new(storage.addr()) T(t1); + constructed = true; + } + + template + void construct(const T1 &t1, const T2 &t2) { + do { } while(0); + new(storage.addr()) T(t1, t2); + constructed = true; + } + + template + void construct(const T1 &t1, const T2 &t2, const T3 &t3) { + do { } while(0); + new(storage.addr()) T(t1, t2, t3); + constructed = true; + } + + template + void construct(const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4) { + do { } while(0); + new(storage.addr()) T(t1, t2, t3, t4); + constructed = true; + } + + T *addr() { + do { } while(0); + return &asT(); + } + + T &ref() { + do { } while(0); + return asT(); + } + + const T &ref() const { + do { } while(0); + return const_cast(this)->asT(); + } + + void destroy() { + ref().~T(); + constructed = false; + } + + void destroyIfConstructed() { + if (!empty()) + destroy(); + } +}; + + + + + + + +template +__attribute__((always_inline)) inline size_t +PointerRangeSize(T* begin, T* end) +{ + do { } while(0); + return (size_t(end) - size_t(begin)) / sizeof(T); +} + + + + + + + +template +size_t +ArrayLength(T (&arr)[N]) +{ + return N; +} + + + + + + +template +T* +ArrayEnd(T (&arr)[N]) +{ + return arr + ArrayLength(arr); +} + +} +# 25 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" 2 +# 49 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" +#define JS_EXTERN_API(type) extern MOZ_EXPORT_API(type) +#define JS_EXPORT_API(type) MOZ_EXPORT_API(type) +#define JS_EXPORT_DATA(type) MOZ_EXPORT_DATA(type) +#define JS_IMPORT_API(type) MOZ_IMPORT_API(type) +#define JS_IMPORT_DATA(type) MOZ_IMPORT_DATA(type) +# 65 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" +#define JS_PUBLIC_API(t) MOZ_EXPORT_API(t) +#define JS_PUBLIC_DATA(t) MOZ_EXPORT_DATA(t) + + + + + +#define JS_FRIEND_API(t) JS_PUBLIC_API(t) +#define JS_FRIEND_DATA(t) JS_PUBLIC_DATA(t) + + + + + + + +#define JS_FASTCALL +#define JS_NO_FASTCALL + + + +#define JS_INLINE MOZ_INLINE + + + +#define JS_ALWAYS_INLINE MOZ_ALWAYS_INLINE + + + +#define JS_NEVER_INLINE MOZ_NEVER_INLINE + + + + +#define JS_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +# 112 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" +#define JS_BEGIN_MACRO do { + + + + + + +#define JS_END_MACRO } while (0) +# 128 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" +#define JS_BEGIN_EXTERN_C MOZ_BEGIN_EXTERN_C +#define JS_END_EXTERN_C MOZ_END_EXTERN_C + + + + + + + +#define JS_BIT(n) ((uint32_t)1 << (n)) +#define JS_BITMASK(n) (JS_BIT(n) - 1) +# 148 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" +#define JS_HOWMANY(x,y) (((x)+(y)-1)/(y)) +#define JS_ROUNDUP(x,y) (JS_HOWMANY(x,y)*(y)) +#define JS_MIN(x,y) ((x)<(y)?(x):(y)) +#define JS_MAX(x,y) ((x)>(y)?(x):(y)) + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscpucfg.h" 1 + + + + + + + +#define js_cpucfg___ + +#define JS_HAVE_LONG_LONG +# 65 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscpucfg.h" +#define IS_LITTLE_ENDIAN 1 +#undef IS_BIG_ENDIAN +# 130 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscpucfg.h" +#define JS_STACK_GROWTH_DIRECTION (-1) +# 154 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" 2 +# 186 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" +extern "C" { +# 196 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" +typedef int JSBool; +#define JS_TRUE (int)1 +#define JS_FALSE (int)0 +# 218 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" +#define JS_LIKELY(x) (__builtin_expect((x), 1)) +#define JS_UNLIKELY(x) (__builtin_expect((x), 0)) +# 245 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" +#define JS_ARRAY_LENGTH(array) (sizeof (array) / sizeof (array)[0]) +#define JS_ARRAY_END(array) ((array) + JS_ARRAY_LENGTH(array)) + +#define JS_BITS_PER_BYTE 8 +#define JS_BITS_PER_BYTE_LOG2 3 + +#define JS_BITS_PER_WORD (JS_BITS_PER_BYTE * JS_BYTES_PER_WORD) +#define JS_BITS_PER_DOUBLE (JS_BITS_PER_BYTE * JS_BYTES_PER_DOUBLE) +# 271 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" +#define JS_FUNC_TO_DATA_PTR(type,fun) (__extension__ (type) (size_t) (fun)) +#define JS_DATA_TO_FUNC_PTR(type,ptr) (__extension__ (type) (size_t) (ptr)) + + + + + + + +#define JS_EXTENSION __extension__ +#define JS_EXTENSION_(s) __extension__ ({ s; }) + + + + + +} +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspubtd.h" 2 + + + + + + +namespace JS { class Value; } +# 53 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspubtd.h" +typedef ptrdiff_t jsid; +#define JSID_BITS(id) (id) + + + + + + +extern "C" { + + + + +typedef uint16_t jschar; + + + + + + + +typedef enum JSVersion { + JSVERSION_1_0 = 100, + JSVERSION_1_1 = 110, + JSVERSION_1_2 = 120, + JSVERSION_1_3 = 130, + JSVERSION_1_4 = 140, + JSVERSION_ECMA_3 = 148, + JSVERSION_1_5 = 150, + JSVERSION_1_6 = 160, + JSVERSION_1_7 = 170, + JSVERSION_1_8 = 180, + JSVERSION_ECMA_5 = 185, + JSVERSION_DEFAULT = 0, + JSVERSION_UNKNOWN = -1, + JSVERSION_LATEST = JSVERSION_ECMA_5 +} JSVersion; + +#define JSVERSION_IS_ECMA(version) ((version) == JSVERSION_DEFAULT || (version) >= JSVERSION_1_3) + + + +typedef enum JSType { + JSTYPE_VOID, + JSTYPE_OBJECT, + JSTYPE_FUNCTION, + JSTYPE_STRING, + JSTYPE_NUMBER, + JSTYPE_BOOLEAN, + JSTYPE_NULL, + JSTYPE_XML, + JSTYPE_LIMIT +} JSType; + + +typedef enum JSProtoKey { +#define JS_PROTO(name,code,init) JSProto_ ##name = code, +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsproto.tbl" 1 + + + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" 1 +# 11 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_VERSION 185 +# 42 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_VERSION_ECMA_3 148 +#define JS_VERSION_ECMA_3_TEST 149 +# 124 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_HAS_STR_HTML_HELPERS 1 +#define JS_HAS_OBJ_PROTO_PROP 1 +#define JS_HAS_OBJ_WATCHPOINT 1 +#define JS_HAS_TOSOURCE 1 +#define JS_HAS_CATCH_GUARD 1 +#define JS_HAS_UNEVAL 1 +#define JS_HAS_CONST 1 +#define JS_HAS_FUN_EXPR_STMT 1 +#define JS_HAS_NO_SUCH_METHOD 1 +#define JS_HAS_GENERATORS 1 +#define JS_HAS_BLOCK_SCOPE 1 +#define JS_HAS_DESTRUCTURING 2 +#define JS_HAS_GENERATOR_EXPRS 1 +#define JS_HAS_EXPR_CLOSURES 1 +# 146 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_HAS_NEW_GLOBAL_OBJECT 1 + + +#define JS_HAS_MAKE_SYSTEM_OBJECT 1 + + +#define JS_HAS_DESTRUCTURING_SHORTHAND (JS_HAS_DESTRUCTURING == 2) + + + + + +#define OLD_GETTER_SETTER_METHODS 1 + + +#define USE_NEW_OBJECT_REPRESENTATION 0 + + + + +#define NEW_OBJECT_REPRESENTATION_ONLY() MOZ_NOT_REACHED("don't call this! to be used in the new object representation") +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsproto.tbl" 2 + + +#define XML_INIT js_InitXMLClass +#define NAMESPACE_INIT js_InitNamespaceClass +#define QNAME_INIT js_InitQNameClass +#define XMLFILTER_INIT js_InitXMLFilterClass +# 27 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsproto.tbl" +JSProto_Null = 0, +JSProto_Object = 1, +JSProto_Function = 2, +JSProto_Array = 3, +JSProto_Boolean = 4, +JSProto_JSON = 5, +JSProto_Date = 6, +JSProto_Math = 7, +JSProto_Number = 8, +JSProto_String = 9, +JSProto_RegExp = 10, +JSProto_XML = 11, +JSProto_Namespace = 12, +JSProto_QName = 13, +JSProto_Error = 14, +JSProto_InternalError = 15, +JSProto_EvalError = 16, +JSProto_RangeError = 17, +JSProto_ReferenceError = 18, +JSProto_SyntaxError = 19, +JSProto_TypeError = 20, +JSProto_URIError = 21, +JSProto_Iterator = 22, +JSProto_StopIteration = 23, +JSProto_ArrayBuffer = 24, +JSProto_Int8Array = 25, +JSProto_Uint8Array = 26, +JSProto_Int16Array = 27, +JSProto_Uint16Array = 28, +JSProto_Int32Array = 29, +JSProto_Uint32Array = 30, +JSProto_Float32Array = 31, +JSProto_Float64Array = 32, +JSProto_Uint8ClampedArray = 33, +JSProto_Proxy = 34, +JSProto_AnyName = 35, +JSProto_WeakMap = 36, +JSProto_Map = 37, +JSProto_Set = 38, +JSProto_DataView = 39, + +#undef XML_INIT +#undef NAMESPACE_INIT +#undef QNAME_INIT +# 111 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspubtd.h" 2 +#undef JS_PROTO + JSProto_LIMIT +} JSProtoKey; + + +typedef enum JSAccessMode { + JSACC_PROTO = 0, + JSACC_PARENT = 1, + + + + + + + JSACC_WATCH = 3, + JSACC_READ = 4, + JSACC_WRITE = 8, + JSACC_LIMIT +} JSAccessMode; + +#define JSACC_TYPEMASK (JSACC_WRITE - 1) + + + + + +typedef enum JSIterateOp { + + JSENUMERATE_INIT, + + + JSENUMERATE_INIT_ALL, + + + JSENUMERATE_NEXT, + + + JSENUMERATE_DESTROY +} JSIterateOp; + + +typedef enum { + JSTRACE_OBJECT, + JSTRACE_STRING, + JSTRACE_SCRIPT, + + + + + + + JSTRACE_XML, + + JSTRACE_SHAPE, + JSTRACE_BASE_SHAPE, + JSTRACE_TYPE_OBJECT, + JSTRACE_LAST = JSTRACE_TYPE_OBJECT +} JSGCTraceKind; + + +typedef struct JSClass JSClass; +typedef struct JSCompartment JSCompartment; +typedef struct JSConstDoubleSpec JSConstDoubleSpec; +typedef struct JSContext JSContext; +typedef struct JSCrossCompartmentCall JSCrossCompartmentCall; +typedef struct JSErrorReport JSErrorReport; +typedef struct JSExceptionState JSExceptionState; +typedef struct JSFunction JSFunction; +typedef struct JSFunctionSpec JSFunctionSpec; +typedef struct JSIdArray JSIdArray; +typedef struct JSLocaleCallbacks JSLocaleCallbacks; +typedef struct JSObject JSObject; +typedef struct JSObjectMap JSObjectMap; +typedef struct JSPrincipals JSPrincipals; +typedef struct JSPropertyDescriptor JSPropertyDescriptor; +typedef struct JSPropertyName JSPropertyName; +typedef struct JSPropertySpec JSPropertySpec; +typedef struct JSRuntime JSRuntime; +typedef struct JSSecurityCallbacks JSSecurityCallbacks; +typedef struct JSStackFrame JSStackFrame; +typedef struct JSScript JSScript; +typedef struct JSStructuredCloneCallbacks JSStructuredCloneCallbacks; +typedef struct JSStructuredCloneReader JSStructuredCloneReader; +typedef struct JSStructuredCloneWriter JSStructuredCloneWriter; +typedef struct JSTracer JSTracer; + + +class JSFlatString; +class JSString; + + + + + + +typedef struct PRCallOnceType JSCallOnceType; + + + +typedef JSBool (*JSInitCallback)(void); + +} + + + +namespace JS { + +template +class Rooted; + +class SkipRoot; + +enum ThingRootKind +{ + THING_ROOT_OBJECT, + THING_ROOT_SHAPE, + THING_ROOT_BASE_SHAPE, + THING_ROOT_TYPE_OBJECT, + THING_ROOT_STRING, + THING_ROOT_SCRIPT, + THING_ROOT_XML, + THING_ROOT_ID, + THING_ROOT_VALUE, + THING_ROOT_LIMIT +}; + +struct ContextFriendFields { + JSRuntime *const runtime; + + ContextFriendFields(JSRuntime *rt) + : runtime(rt) { } + + static const ContextFriendFields *get(const JSContext *cx) { + return reinterpret_cast(cx); + } + + static ContextFriendFields *get(JSContext *cx) { + return reinterpret_cast(cx); + } +# 272 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspubtd.h" +}; + +} +# 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" 1 +# 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" +#define jsutil_h___ + + + +# 1 "./../../dist/include/js/Utility.h" 1 +# 9 "./../../dist/include/js/Utility.h" +#define js_utility_h__ + + + + +# 1 "/usr/include/string.h" 1 3 4 +# 25 "/usr/include/string.h" 3 4 +#define _STRING_H 1 + + + +extern "C" { + + +#define __need_size_t +#define __need_NULL +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 35 "/usr/include/string.h" 2 3 4 + + + +#define __CORRECT_ISO_CPP_STRING_H_PROTO + + + + + +extern void *memcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern void *memmove (void *__dest, __const void *__src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, + int __c, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1))); + + +extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern "C++" +{ +extern void *memchr (void *__s, int __c, size_t __n) + throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const void *memchr (__const void *__s, int __c, size_t __n) + throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +memchr (void *__s, int __c, size_t __n) throw () +{ + return __builtin_memchr (__s, __c, __n); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const void * +memchr (__const void *__s, int __c, size_t __n) throw () +{ + return __builtin_memchr (__s, __c, __n); +} + +} + + + + + + + + + + +extern "C++" void *rawmemchr (void *__s, int __c) + throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" __const void *rawmemchr (__const void *__s, int __c) + throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + + + +extern "C++" void *memrchr (void *__s, int __c, size_t __n) + throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" __const void *memrchr (__const void *__s, int __c, size_t __n) + throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + + + + + +extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); + +extern char *strncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern char *strcat (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); + +extern char *strncat (char *__restrict __dest, __const char *__restrict __src, + size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern int strcmp (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strcoll (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern size_t strxfrm (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (2))); + +# 165 "/usr/include/string.h" 3 4 +extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); + +extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, + __locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4))); + + + + + +extern char *strdup (__const char *__s) + throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern char *strndup (__const char *__string, size_t __n) + throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); + + + + +#define strdupa(s) (__extension__ ({ __const char *__old = (s); size_t __len = strlen (__old) + 1; char *__new = (char *) __builtin_alloca (__len); (char *) memcpy (__new, __old, __len); })) +# 199 "/usr/include/string.h" 3 4 +#define strndupa(s,n) (__extension__ ({ __const char *__old = (s); size_t __len = strnlen (__old, (n)); char *__new = (char *) __builtin_alloca (__len + 1); __new[__len] = '\0'; (char *) memcpy (__new, __old, __len); })) +# 210 "/usr/include/string.h" 3 4 + + + +extern "C++" +{ +extern char *strchr (char *__s, int __c) + throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *strchr (__const char *__s, int __c) + throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strchr (char *__s, int __c) throw () +{ + return __builtin_strchr (__s, __c); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +strchr (__const char *__s, int __c) throw () +{ + return __builtin_strchr (__s, __c); +} + +} + + + + + + +extern "C++" +{ +extern char *strrchr (char *__s, int __c) + throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *strrchr (__const char *__s, int __c) + throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strrchr (char *__s, int __c) throw () +{ + return __builtin_strrchr (__s, __c); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +strrchr (__const char *__s, int __c) throw () +{ + return __builtin_strrchr (__s, __c); +} + +} + + + + + + + + + + +extern "C++" char *strchrnul (char *__s, int __c) + throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" __const char *strchrnul (__const char *__s, int __c) + throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + + + + + +extern size_t strcspn (__const char *__s, __const char *__reject) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern size_t strspn (__const char *__s, __const char *__accept) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern "C++" +{ +extern char *strpbrk (char *__s, __const char *__accept) + throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern __const char *strpbrk (__const char *__s, __const char *__accept) + throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strpbrk (char *__s, __const char *__accept) throw () +{ + return __builtin_strpbrk (__s, __accept); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +strpbrk (__const char *__s, __const char *__accept) throw () +{ + return __builtin_strpbrk (__s, __accept); +} + +} + + + + + + +extern "C++" +{ +extern char *strstr (char *__haystack, __const char *__needle) + throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern __const char *strstr (__const char *__haystack, + __const char *__needle) + throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strstr (char *__haystack, __const char *__needle) throw () +{ + return __builtin_strstr (__haystack, __needle); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +strstr (__const char *__haystack, __const char *__needle) throw () +{ + return __builtin_strstr (__haystack, __needle); +} + +} + + + + + + + +extern char *strtok (char *__restrict __s, __const char *__restrict __delim) + throw () __attribute__ ((__nonnull__ (2))); + + + + +extern char *__strtok_r (char *__restrict __s, + __const char *__restrict __delim, + char **__restrict __save_ptr) + throw () __attribute__ ((__nonnull__ (2, 3))); + +extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, + char **__restrict __save_ptr) + throw () __attribute__ ((__nonnull__ (2, 3))); + + + + + +extern "C++" char *strcasestr (char *__haystack, __const char *__needle) + throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern "C++" __const char *strcasestr (__const char *__haystack, + __const char *__needle) + throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 382 "/usr/include/string.h" 3 4 +extern void *memmem (__const void *__haystack, size_t __haystacklen, + __const void *__needle, size_t __needlelen) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); + + + +extern void *__mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void *mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern size_t strlen (__const char *__s) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern size_t strnlen (__const char *__string, size_t __maxlen) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern char *strerror (int __errnum) throw (); + +# 438 "/usr/include/string.h" 3 4 +extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) + throw () __attribute__ ((__nonnull__ (2))); + + + + + +extern char *strerror_l (int __errnum, __locale_t __l) throw (); + + + + + +extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); + + + +extern void bcopy (__const void *__src, void *__dest, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + +extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); + + +extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern "C++" +{ +extern char *index (char *__s, int __c) + throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *index (__const char *__s, int __c) + throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +index (char *__s, int __c) throw () +{ + return __builtin_index (__s, __c); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +index (__const char *__s, int __c) throw () +{ + return __builtin_index (__s, __c); +} + +} + + + + + + + +extern "C++" +{ +extern char *rindex (char *__s, int __c) + throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *rindex (__const char *__s, int __c) + throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +rindex (char *__s, int __c) throw () +{ + return __builtin_rindex (__s, __c); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +rindex (__const char *__s, int __c) throw () +{ + return __builtin_rindex (__s, __c); +} + +} + + + + + + + +extern int ffs (int __i) throw () __attribute__ ((__const__)); + + + + +extern int ffsl (long int __l) throw () __attribute__ ((__const__)); + +__extension__ extern int ffsll (long long int __ll) + throw () __attribute__ ((__const__)); + + + + +extern int strcasecmp (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern int strcasecmp_l (__const char *__s1, __const char *__s2, + __locale_t __loc) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); + +extern int strncasecmp_l (__const char *__s1, __const char *__s2, + size_t __n, __locale_t __loc) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); + + + + + +extern char *strsep (char **__restrict __stringp, + __const char *__restrict __delim) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + +extern char *strsignal (int __sig) throw (); + + +extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + +extern char *__stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int strverscmp (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1))); + + +extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); + + + + + + + +extern "C++" char *basename (char *__filename) + throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); +extern "C++" __const char *basename (__const char *__filename) + throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); +# 642 "/usr/include/string.h" 3 4 +# 1 "/usr/include/bits/string3.h" 1 3 4 +# 23 "/usr/include/bits/string3.h" 3 4 +extern void __warn_memset_zero_len (void) __attribute__((__warning__ ("memset used with constant zero length parameter; this could be due to transposed parameters"))) + ; +# 48 "/usr/include/bits/string3.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * + memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) throw () + +{ + return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * + memmove (void *__dest, __const void *__src, size_t __len) throw () +{ + return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * + mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) throw () + +{ + return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} +# 76 "/usr/include/bits/string3.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * + memset (void *__dest, int __ch, size_t __len) throw () +{ + if (__builtin_constant_p (__len) && __len == 0 + && (!__builtin_constant_p (__ch) || __ch != 0)) + { + __warn_memset_zero_len (); + return __dest; + } + return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void + bcopy (__const void *__src, void *__dest, size_t __len) throw () +{ + (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void + bzero (void *__dest, size_t __len) throw () +{ + (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * + strcpy (char *__restrict __dest, __const char *__restrict __src) throw () +{ + return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * + stpcpy (char *__restrict __dest, __const char *__restrict __src) throw () +{ + return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * + strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __len) throw () + +{ + return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); +} + + +extern char *__stpncpy_chk (char *__dest, __const char *__src, size_t __n, + size_t __destlen) throw (); +extern char *__stpncpy_alias (char *__dest, __const char *__src, size_t __n) throw () __asm__ ("" "stpncpy") + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * + stpncpy (char *__dest, __const char *__src, size_t __n) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1 + && (!__builtin_constant_p (__n) || __n <= __builtin_object_size (__dest, 2 > 1))) + return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1)); + return __stpncpy_alias (__dest, __src, __n); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * + strcat (char *__restrict __dest, __const char *__restrict __src) throw () +{ + return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * + strncat (char *__restrict __dest, __const char *__restrict __src, size_t __len) throw () + +{ + return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); +} +# 643 "/usr/include/string.h" 2 3 4 + + + +} +# 15 "./../../dist/include/js/Utility.h" 2 + + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypes.h" 1 +# 22 "./../../dist/include/js/Utility.h" 2 + + + + +namespace JS {} + + +namespace mozilla {} + + +namespace js { + + +using namespace JS; +using namespace mozilla; + +} + + +extern "C" { + + + + + +#define JS_FREE_PATTERN 0xDA + +#define JS_ASSERT(expr) MOZ_ASSERT(expr) +#define JS_ASSERT_IF(cond,expr) MOZ_ASSERT_IF(cond, expr) +#define JS_NOT_REACHED(reason) MOZ_NOT_REACHED(reason) +#define JS_ALWAYS_TRUE(expr) MOZ_ALWAYS_TRUE(expr) +#define JS_ALWAYS_FALSE(expr) MOZ_ALWAYS_FALSE(expr) +# 62 "./../../dist/include/js/Utility.h" +#define JS_THREADSAFE_ASSERT(expr) ((void) 0) + + +#define JS_STATIC_ASSERT(cond) MOZ_STATIC_ASSERT(cond, "JS_STATIC_ASSERT") +#define JS_STATIC_ASSERT_IF(cond,expr) MOZ_STATIC_ASSERT_IF(cond, expr, "JS_STATIC_ASSERT_IF") + + + + + + +extern __attribute__((visibility("default"))) void JS_Abort(void); +# 140 "./../../dist/include/js/Utility.h" +#define JS_OOM_POSSIBLY_FAIL() do {} while(0) +#define JS_OOM_POSSIBLY_FAIL_REPORT(cx) do {} while(0) + + + + + + + +static inline void* js_malloc(size_t bytes) +{ + do {} while(0); + return malloc(bytes); +} + +static inline void* js_calloc(size_t bytes) +{ + do {} while(0); + return calloc(bytes, 1); +} + +static inline void* js_realloc(void* p, size_t bytes) +{ + do {} while(0); + return realloc(p, bytes); +} + +static inline void js_free(void* p) +{ + free(p); +} +# 234 "./../../dist/include/js/Utility.h" +#define js_bitscan_ctz32(val) __builtin_ctz(val) +#define js_bitscan_clz32(val) __builtin_clz(val) +#define JS_HAS_BUILTIN_BITSCAN32 +# 255 "./../../dist/include/js/Utility.h" +#define JS_CEILING_LOG2(_log2,_n) JS_BEGIN_MACRO unsigned int j_ = (unsigned int)(_n); (_log2) = (j_ <= 1 ? 0 : 32 - js_bitscan_clz32(j_ - 1)); JS_END_MACRO +# 292 "./../../dist/include/js/Utility.h" +#define JS_FLOOR_LOG2(_log2,_n) JS_BEGIN_MACRO (_log2) = 31 - js_bitscan_clz32(((unsigned int)(_n)) | 1); JS_END_MACRO +# 316 "./../../dist/include/js/Utility.h" +#define js_FloorLog2wImpl(n) ((size_t)(JS_BITS_PER_WORD - 1 - js_bitscan_clz32(n))) +# 338 "./../../dist/include/js/Utility.h" +#define JS_CEILING_LOG2W(n) ((n) <= 1 ? 0 : 1 + JS_FLOOR_LOG2W((n) - 1)) + + + + + + + +static __attribute__((always_inline)) inline size_t +JS_FLOOR_LOG2W(size_t n) +{ + do { } while(0); + return ((size_t)((8 * 4) - 1 - __builtin_clz(n))); +} + +} +# 437 "./../../dist/include/js/Utility.h" +#define JS_NEW_BODY(allocator,t,parms) void *memory = allocator(sizeof(t)); return memory ? new(memory) t parms : NULL; +# 450 "./../../dist/include/js/Utility.h" +#define JS_DECLARE_NEW_METHODS(ALLOCATOR,QUALIFIERS) template QUALIFIERS T *new_() { JS_NEW_BODY(ALLOCATOR, T, ()) } template QUALIFIERS T *new_(P1 p1) { JS_NEW_BODY(ALLOCATOR, T, (p1)) } template QUALIFIERS T *new_(P1 p1, P2 p2) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4, p5)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4, p5, p6)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4, p5, p6, p7)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4, p5, p6, p7, p8)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4, p5, p6, p7, p8, p9)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)) } template QUALIFIERS T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12) { JS_NEW_BODY(ALLOCATOR, T, (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)) } static const int JSMinAlignment = 8; template QUALIFIERS T *array_new(size_t n) { uint64_t numBytes64 = uint64_t(JSMinAlignment) + uint64_t(sizeof(T)) * uint64_t(n); size_t numBytes = size_t(numBytes64); if (numBytes64 != numBytes) { JS_ASSERT(0); return NULL; } void *memory = ALLOCATOR(numBytes); if (!memory) return NULL; *(size_t *)memory = n; memory = (void*)(uintptr_t(memory) + JSMinAlignment); return new(memory) T[n]; } +# 534 "./../../dist/include/js/Utility.h" +#define JS_DECLARE_DELETE_METHODS(DEALLOCATOR,QUALIFIERS) template QUALIFIERS void delete_(T *p) { if (p) { p->~T(); DEALLOCATOR(p); } } template QUALIFIERS void array_delete(T *p) { if (p) { void* p0 = (void *)(uintptr_t(p) - js::OffTheBooks::JSMinAlignment); size_t n = *(size_t *)p0; for (size_t i = 0; i < n; i++) (p + i)->~T(); DEALLOCATOR(p0); } } +# 561 "./../../dist/include/js/Utility.h" +namespace js { + +class OffTheBooks { +public: + template __attribute__((always_inline)) inline static T *new_() { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T () : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) : __null; } template __attribute__((always_inline)) inline static T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12) { void *memory = ::js_malloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) : __null; } static const int JSMinAlignment = 8; template __attribute__((always_inline)) inline static T *array_new(size_t n) { uint64_t numBytes64 = uint64_t(JSMinAlignment) + uint64_t(sizeof(T)) * uint64_t(n); size_t numBytes = size_t(numBytes64); if (numBytes64 != numBytes) { do { } while(0); return __null; } void *memory = ::js_malloc(numBytes); if (!memory) return __null; *(size_t *)memory = n; memory = (void*)(uintptr_t(memory) + JSMinAlignment); return new(memory) T[n]; } + + static inline void* malloc_(size_t bytes) { + return ::js_malloc(bytes); + } + + static inline void* calloc_(size_t bytes) { + return ::js_calloc(bytes); + } + + static inline void* realloc_(void* p, size_t bytes) { + return ::js_realloc(p, bytes); + } +}; + + + + + +class Foreground { +public: + + static __attribute__((always_inline)) inline void free_(void* p) { + ::js_free(p); + } + + template __attribute__((always_inline)) inline static void delete_(T *p) { if (p) { p->~T(); ::js_free(p); } } template __attribute__((always_inline)) inline static void array_delete(T *p) { if (p) { void* p0 = (void *)(uintptr_t(p) - js::OffTheBooks::JSMinAlignment); size_t n = *(size_t *)p0; for (size_t i = 0; i < n; i++) (p + i)->~T(); ::js_free(p0); } } +}; + +class UnwantedForeground : public Foreground { +}; + +} + + + + + +#define JS_DECLARE_ALLOCATION_FRIENDS_FOR_PRIVATE_CONSTRUCTOR friend class js::OffTheBooks; friend class js::Foreground; friend class js::UnwantedForeground; friend struct ::JSContext; friend struct ::JSRuntime +# 701 "./../../dist/include/js/Utility.h" +#define JS_DECL_USE_GUARD_OBJECT_NOTIFIER +#define JS_GUARD_OBJECT_NOTIFIER_PARAM +#define JS_GUARD_OBJECT_NOTIFIER_PARAM_NO_INIT +#define JS_GUARD_OBJECT_NOTIFIER_PARAM0 +#define JS_GUARD_OBJECT_NOTIFIER_INIT JS_BEGIN_MACRO JS_END_MACRO + + + +namespace js { +# 811 "./../../dist/include/js/Utility.h" +template +class MoveRef { + public: + typedef T Referent; + explicit MoveRef(T &t) : pointer(&t) { } + T &operator*() const { return *pointer; } + T *operator->() const { return pointer; } +# 830 "./../../dist/include/js/Utility.h" + operator T& () const { return *pointer; } + + private: + T *pointer; +}; + +template +MoveRef Move(T &t) { return MoveRef(t); } + +template +MoveRef Move(const T &t) { return MoveRef(const_cast(t)); } + + +class ReentrancyGuard +{ + + ReentrancyGuard(const ReentrancyGuard &); + void operator=(const ReentrancyGuard &); + + + + + public: + template + + + + + ReentrancyGuard(T & ) + + { + + + + + } + ~ReentrancyGuard() + { + + + + } +}; + + + + + +__attribute__((always_inline)) inline size_t +RoundUpPow2(size_t x) +{ + return size_t(1) << ((x) <= 1 ? 0 : 1 + JS_FLOOR_LOG2W((x) - 1)); +} + +} + +namespace JS { +# 899 "./../../dist/include/js/Utility.h" +inline void PoisonPtr(uintptr_t *v) +{ + + + + +} + +template +inline bool IsPoisonedPtr(T *v) +{ + + + + + return false; + +} + +} + + + + + + +typedef size_t(*JSMallocSizeOfFun)(const void *p); + + + +#define HAVE_STATIC_ANNOTATIONS +# 955 "./../../dist/include/js/Utility.h" +#define STATIC_PRECONDITION(COND) +#define STATIC_PRECONDITION_ASSUME(COND) +#define STATIC_POSTCONDITION(COND) +#define STATIC_POSTCONDITION_ASSUME(COND) +#define STATIC_INVARIANT(COND) +#define STATIC_INVARIANT_ASSUME(COND) +#define STATIC_ASSERT(COND) JS_BEGIN_MACRO JS_END_MACRO +#define STATIC_ASSUME(COND) JS_BEGIN_MACRO JS_END_MACRO +#define STATIC_ASSERT_RUNTIME(COND) JS_BEGIN_MACRO JS_END_MACRO + +#define STATIC_SKIP_INFERENCE STATIC_INVARIANT(skip_inference()) +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" 2 + + +struct JSContext; + +static __attribute__((always_inline)) inline void * +js_memcpy(void *dst_, const void *src_, size_t len) +{ + char *dst = (char *) dst_; + const char *src = (const char *) src_; + do { } while (0); + do { } while (0); + + return memcpy(dst, src, len); +} + + +namespace js { + +template +struct AlignmentTestStruct +{ + char c; + T t; +}; + + +#define JS_ALIGNMENT_OF(t_) (sizeof(js::AlignmentTestStruct) - sizeof(t_)) + + +template +class AlignedPtrAndFlag +{ + uintptr_t bits; + + public: + AlignedPtrAndFlag(T *t, bool flag) { + do { } while(0); + bits = uintptr_t(t) | uintptr_t(flag); + } + + T *ptr() const { + return (T *)(bits & ~uintptr_t(1)); + } + + bool flag() const { + return (bits & 1) != 0; + } + + void setPtr(T *t) { + do { } while(0); + bits = uintptr_t(t) | uintptr_t(flag()); + } + + void setFlag() { + bits |= 1; + } + + void unsetFlag() { + bits &= ~uintptr_t(1); + } + + void set(T *t, bool flag) { + do { } while(0); + bits = uintptr_t(t) | flag; + } +}; + +template +static inline void +Reverse(T *beg, T *end) +{ + while (beg != end) { + if (--end == beg) + return; + T tmp = *beg; + *beg = *end; + *end = tmp; + ++beg; + } +} + +template +static inline T * +Find(T *beg, T *end, const T &v) +{ + for (T *p = beg; p != end; ++p) { + if (*p == v) + return p; + } + return end; +} + +template +static inline typename Container::ElementType * +Find(Container &c, const typename Container::ElementType &v) +{ + return Find(c.begin(), c.end(), v); +} + +template +void +ForEach(InputIterT begin, InputIterT end, CallableT f) +{ + for (; begin != end; ++begin) + f(*begin); +} + +template +static inline T +Min(T t1, T t2) +{ + return t1 < t2 ? t1 : t2; +} + +template +static inline T +Max(T t1, T t2) +{ + return t1 > t2 ? t1 : t2; +} + + +template +static T& +InitConst(const T &t) +{ + return const_cast(t); +} + +template +__attribute__((always_inline)) inline T & +ImplicitCast(U &u) +{ + T &t = u; + return t; +} + +template +class AutoScopedAssign +{ + private: + + T *addr; + T old; + + public: + AutoScopedAssign(T *addr, const T &value ) + : addr(addr), old(*addr) + { + do { } while (0); + *addr = value; + } + + ~AutoScopedAssign() { *addr = old; } +}; + +template +__attribute__((always_inline)) inline static void +PodZero(T *t) +{ + memset(t, 0, sizeof(T)); +} + +template +__attribute__((always_inline)) inline static void +PodZero(T *t, size_t nelem) +{ + + + + + + + for (T *end = t + nelem; t != end; ++t) + memset(t, 0, sizeof(T)); +} +# 201 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" +template static void PodZero(T (&)[N]); +template static void PodZero(T (&)[N], size_t); + +template +__attribute__((always_inline)) inline static void +PodArrayZero(T (&t)[N]) +{ + memset(t, 0, N * sizeof(T)); +} + +template +__attribute__((always_inline)) inline static void +PodAssign(T *dst, const T *src) +{ + js_memcpy((char *) dst, (const char *) src, sizeof(T)); +} + +template +__attribute__((always_inline)) inline static void +PodCopy(T *dst, const T *src, size_t nelem) +{ + + do { } while (0); + do { } while (0); + + if (nelem < 128) { + + + + + for (const T *srcend = src + nelem; src != srcend; ++src, ++dst) + PodAssign(dst, src); + } else { + memcpy(dst, src, nelem * sizeof(T)); + } +} + +template +__attribute__((always_inline)) inline static bool +PodEqual(T *one, T *two, size_t len) +{ + if (len < 128) { + T *p1end = one + len; + for (T *p1 = one, *p2 = two; p1 != p1end; ++p1, ++p2) { + if (*p1 != *p2) + return false; + } + return true; + } + + return !memcmp(one, two, len * sizeof(T)); +} + +template +__attribute__((always_inline)) inline static void +Swap(T &t, T &u) +{ + T tmp(Move(t)); + t = Move(u); + u = Move(tmp); +} + +__attribute__((always_inline)) inline static size_t +UnsignedPtrDiff(const void *bigger, const void *smaller) +{ + return size_t(bigger) - size_t(smaller); +} +# 276 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" +enum MaybeReportError { REPORT_ERROR = true, DONT_REPORT_ERROR = false }; + + + + + +static inline unsigned +NumWordsForBitArrayOfLength(size_t length) +{ + return (length + ((8 * 4) - 1)) / (8 * 4); +} + +static inline unsigned +BitArrayIndexToWordIndex(size_t length, size_t bitIndex) +{ + unsigned wordIndex = bitIndex / (8 * 4); + do { } while(0); + return wordIndex; +} + +static inline size_t +BitArrayIndexToWordMask(size_t i) +{ + return size_t(1) << (i % (8 * 4)); +} + +static inline bool +IsBitArrayElementSet(size_t *array, size_t length, size_t i) +{ + return array[BitArrayIndexToWordIndex(length, i)] & BitArrayIndexToWordMask(i); +} + +static inline bool +IsAnyBitArrayElementSet(size_t *array, size_t length) +{ + unsigned numWords = NumWordsForBitArrayOfLength(length); + for (unsigned i = 0; i < numWords; ++i) { + if (array[i]) + return true; + } + return false; +} + +static inline void +SetBitArrayElement(size_t *array, size_t length, size_t i) +{ + array[BitArrayIndexToWordIndex(length, i)] |= BitArrayIndexToWordMask(i); +} + +static inline void +ClearBitArrayElement(size_t *array, size_t length, size_t i) +{ + array[BitArrayIndexToWordIndex(length, i)] &= ~BitArrayIndexToWordMask(i); +} + +static inline void +ClearAllBitArrayElements(size_t *array, size_t length) +{ + for (unsigned i = 0; i < length; ++i) + array[i] = 0; +} + +} +# 358 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" +#define JS_ROTATE_LEFT32(a,bits) (((a) << (bits)) | ((a) >> (32 - (bits)))) +# 370 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" +#define MUST_FLOW_THROUGH(label) ((void) 0) +#define MUST_FLOW_LABEL(label) +# 385 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" +#define JS_POISON(p,val,size) ((void) 0) +#define JS_OPT_ASSERT(expr) ((void) 0) +#define JS_OPT_ASSERT_IF(cond,expr) ((void) 0) +# 419 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" +#define JS_BASIC_STATS_ACCUM(bs,val) + + + +typedef size_t jsbitmap; +#define JS_TEST_BIT(_map,_bit) ((_map)[(_bit)>>JS_BITS_PER_WORD_LOG2] & ((jsbitmap)1<<((_bit)&(JS_BITS_PER_WORD-1)))) + +#define JS_SET_BIT(_map,_bit) ((_map)[(_bit)>>JS_BITS_PER_WORD_LOG2] |= ((jsbitmap)1<<((_bit)&(JS_BITS_PER_WORD-1)))) + +#define JS_CLEAR_BIT(_map,_bit) ((_map)[(_bit)>>JS_BITS_PER_WORD_LOG2] &= ~((jsbitmap)1<<((_bit)&(JS_BITS_PER_WORD-1)))) +# 449 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" +#define JS_SILENCE_UNUSED_VALUE_IN_EXPR(expr) JS_BEGIN_MACRO expr; JS_END_MACRO +# 23 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" +#define jsvalimpl_h__ +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" +extern "C" { + + + + + + +#define JSVAL_ALIGNMENT __attribute__((aligned (8))) +# 54 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" +#define JS_ENUM_HEADER(id,type) enum id +#define JS_ENUM_FOOTER(id) __attribute__((packed)) + + + +enum JSValueType +{ + JSVAL_TYPE_DOUBLE = 0x00, + JSVAL_TYPE_INT32 = 0x01, + JSVAL_TYPE_UNDEFINED = 0x02, + JSVAL_TYPE_BOOLEAN = 0x03, + JSVAL_TYPE_MAGIC = 0x04, + JSVAL_TYPE_STRING = 0x05, + JSVAL_TYPE_NULL = 0x06, + JSVAL_TYPE_OBJECT = 0x07, + + + JSVAL_TYPE_UNKNOWN = 0x20, + JSVAL_TYPE_MISSING = 0x21 +} __attribute__((packed)); + +typedef int moz_static_assert5[(sizeof(JSValueType) == 1) ? 1 : -1]; + + + + +enum JSValueTag +{ + JSVAL_TAG_CLEAR = 0xFFFFFF80, + JSVAL_TAG_INT32 = JSVAL_TAG_CLEAR | JSVAL_TYPE_INT32, + JSVAL_TAG_UNDEFINED = JSVAL_TAG_CLEAR | JSVAL_TYPE_UNDEFINED, + JSVAL_TAG_STRING = JSVAL_TAG_CLEAR | JSVAL_TYPE_STRING, + JSVAL_TAG_BOOLEAN = JSVAL_TAG_CLEAR | JSVAL_TYPE_BOOLEAN, + JSVAL_TAG_MAGIC = JSVAL_TAG_CLEAR | JSVAL_TYPE_MAGIC, + JSVAL_TAG_NULL = JSVAL_TAG_CLEAR | JSVAL_TYPE_NULL, + JSVAL_TAG_OBJECT = JSVAL_TAG_CLEAR | JSVAL_TYPE_OBJECT +} __attribute__((packed)); + +typedef int moz_static_assert6[(sizeof(JSValueTag) == 4) ? 1 : -1]; +# 177 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" +#define JSVAL_LOWER_INCL_TYPE_OF_OBJ_OR_NULL_SET JSVAL_TYPE_NULL +#define JSVAL_UPPER_EXCL_TYPE_OF_PRIMITIVE_SET JSVAL_TYPE_OBJECT +#define JSVAL_UPPER_INCL_TYPE_OF_NUMBER_SET JSVAL_TYPE_INT32 +#define JSVAL_LOWER_INCL_TYPE_OF_PTR_PAYLOAD_SET JSVAL_TYPE_MAGIC + + + +#define JSVAL_TYPE_TO_TAG(type) ((JSValueTag)(JSVAL_TAG_CLEAR | (type))) + +#define JSVAL_LOWER_INCL_TAG_OF_OBJ_OR_NULL_SET JSVAL_TAG_NULL +#define JSVAL_UPPER_EXCL_TAG_OF_PRIMITIVE_SET JSVAL_TAG_OBJECT +#define JSVAL_UPPER_INCL_TAG_OF_NUMBER_SET JSVAL_TAG_INT32 +#define JSVAL_LOWER_INCL_TAG_OF_GCTHING_SET JSVAL_TAG_STRING +# 205 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" +typedef enum JSWhyMagic +{ + JS_ARRAY_HOLE, + JS_NATIVE_ENUMERATE, + + + JS_NO_ITER_VALUE, + JS_GENERATOR_CLOSING, + JS_NO_CONSTANT, + JS_THIS_POISON, + JS_ARG_POISON, + JS_SERIALIZE_NO_NODE, + JS_LAZY_ARGUMENTS, + JS_UNASSIGNED_ARGUMENTS, + JS_OPTIMIZED_ARGUMENTS, + JS_IS_CONSTRUCTING, + JS_OVERWRITTEN_CALLEE, + JS_GENERIC_MAGIC +} JSWhyMagic; + + + +typedef union jsval_layout +{ + uint64_t asBits; + struct { + union { + int32_t i32; + uint32_t u32; + JSBool boo; + JSString *str; + JSObject *obj; + void *ptr; + JSWhyMagic why; + size_t word; + uintptr_t uintptr; + } payload; + JSValueTag tag; + } s; + double asDouble; + void *asPtr; +} __attribute__((aligned (8))) jsval_layout; +# 317 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" +typedef int moz_static_assert7[(sizeof(jsval_layout) == 8) ? 1 : -1]; +# 327 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" +static __attribute__((always_inline)) inline jsval_layout +BUILD_JSVAL(JSValueTag tag, uint32_t payload) +{ + jsval_layout l; + l.asBits = (((uint64_t)(uint32_t)tag) << 32) | payload; + return l; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_DOUBLE_IMPL(jsval_layout l) +{ + return (uint32_t)l.s.tag <= (uint32_t)JSVAL_TAG_CLEAR; +} + +static __attribute__((always_inline)) inline jsval_layout +DOUBLE_TO_JSVAL_IMPL(double d) +{ + jsval_layout l; + l.asDouble = d; + do { } while(0); + return l; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_INT32_IMPL(jsval_layout l) +{ + return l.s.tag == JSVAL_TAG_INT32; +} + +static __attribute__((always_inline)) inline int32_t +JSVAL_TO_INT32_IMPL(jsval_layout l) +{ + return l.s.payload.i32; +} + +static __attribute__((always_inline)) inline jsval_layout +INT32_TO_JSVAL_IMPL(int32_t i) +{ + jsval_layout l; + l.s.tag = JSVAL_TAG_INT32; + l.s.payload.i32 = i; + return l; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_NUMBER_IMPL(jsval_layout l) +{ + JSValueTag tag = l.s.tag; + do { } while(0); + return (uint32_t)tag <= (uint32_t)JSVAL_TAG_INT32; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_UNDEFINED_IMPL(jsval_layout l) +{ + return l.s.tag == JSVAL_TAG_UNDEFINED; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_STRING_IMPL(jsval_layout l) +{ + return l.s.tag == JSVAL_TAG_STRING; +} + +static __attribute__((always_inline)) inline jsval_layout +STRING_TO_JSVAL_IMPL(JSString *str) +{ + jsval_layout l; + do { } while(0); + l.s.tag = JSVAL_TAG_STRING; + l.s.payload.str = str; + return l; +} + +static __attribute__((always_inline)) inline JSString * +JSVAL_TO_STRING_IMPL(jsval_layout l) +{ + return l.s.payload.str; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_BOOLEAN_IMPL(jsval_layout l) +{ + return l.s.tag == JSVAL_TAG_BOOLEAN; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_TO_BOOLEAN_IMPL(jsval_layout l) +{ + return l.s.payload.boo; +} + +static __attribute__((always_inline)) inline jsval_layout +BOOLEAN_TO_JSVAL_IMPL(JSBool b) +{ + jsval_layout l; + do { } while(0); + l.s.tag = JSVAL_TAG_BOOLEAN; + l.s.payload.boo = b; + return l; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_MAGIC_IMPL(jsval_layout l) +{ + return l.s.tag == JSVAL_TAG_MAGIC; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_OBJECT_IMPL(jsval_layout l) +{ + return l.s.tag == JSVAL_TAG_OBJECT; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_PRIMITIVE_IMPL(jsval_layout l) +{ + return (uint32_t)l.s.tag < (uint32_t)JSVAL_TAG_OBJECT; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_OBJECT_OR_NULL_IMPL(jsval_layout l) +{ + do { } while(0); + return (uint32_t)l.s.tag >= (uint32_t)JSVAL_TAG_NULL; +} + +static __attribute__((always_inline)) inline JSObject * +JSVAL_TO_OBJECT_IMPL(jsval_layout l) +{ + return l.s.payload.obj; +} + +static __attribute__((always_inline)) inline jsval_layout +OBJECT_TO_JSVAL_IMPL(JSObject *obj) +{ + jsval_layout l; + do { } while(0); + l.s.tag = JSVAL_TAG_OBJECT; + l.s.payload.obj = obj; + return l; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_NULL_IMPL(jsval_layout l) +{ + return l.s.tag == JSVAL_TAG_NULL; +} + +static __attribute__((always_inline)) inline jsval_layout +PRIVATE_PTR_TO_JSVAL_IMPL(void *ptr) +{ + jsval_layout l; + do { } while(0); + l.s.tag = (JSValueTag)0; + l.s.payload.ptr = ptr; + do { } while(0); + return l; +} + +static __attribute__((always_inline)) inline void * +JSVAL_TO_PRIVATE_PTR_IMPL(jsval_layout l) +{ + return l.s.payload.ptr; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_GCTHING_IMPL(jsval_layout l) +{ + + return (uint32_t)l.s.tag >= (uint32_t)JSVAL_TAG_STRING; +} + +static __attribute__((always_inline)) inline void * +JSVAL_TO_GCTHING_IMPL(jsval_layout l) +{ + return l.s.payload.ptr; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_TRACEABLE_IMPL(jsval_layout l) +{ + return l.s.tag == JSVAL_TAG_STRING || l.s.tag == JSVAL_TAG_OBJECT; +} + +static __attribute__((always_inline)) inline uint32_t +JSVAL_TRACE_KIND_IMPL(jsval_layout l) +{ + return (uint32_t)(JSBool)JSVAL_IS_STRING_IMPL(l); +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_SPECIFIC_INT32_IMPL(jsval_layout l, int32_t i32) +{ + return l.s.tag == JSVAL_TAG_INT32 && l.s.payload.i32 == i32; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_SPECIFIC_BOOLEAN(jsval_layout l, JSBool b) +{ + return (l.s.tag == JSVAL_TAG_BOOLEAN) && (l.s.payload.boo == b); +} + +static __attribute__((always_inline)) inline jsval_layout +MAGIC_TO_JSVAL_IMPL(JSWhyMagic why) +{ + jsval_layout l; + l.s.tag = JSVAL_TAG_MAGIC; + l.s.payload.why = why; + return l; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_SAME_TYPE_IMPL(jsval_layout lhs, jsval_layout rhs) +{ + JSValueTag ltag = lhs.s.tag, rtag = rhs.s.tag; + return ltag == rtag || (ltag < JSVAL_TAG_CLEAR && rtag < JSVAL_TAG_CLEAR); +} + +static __attribute__((always_inline)) inline jsval_layout +PRIVATE_UINT32_TO_JSVAL_IMPL(uint32_t ui) +{ + jsval_layout l; + l.s.tag = (JSValueTag)0; + l.s.payload.u32 = ui; + do { } while(0); + return l; +} + +static __attribute__((always_inline)) inline uint32_t +JSVAL_TO_PRIVATE_UINT32_IMPL(jsval_layout l) +{ + return l.s.payload.u32; +} + +static __attribute__((always_inline)) inline JSValueType +JSVAL_EXTRACT_NON_DOUBLE_TYPE_IMPL(jsval_layout l) +{ + uint32_t type = l.s.tag & 0xF; + do { } while(0); + return (JSValueType)type; +} +# 820 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" +static __attribute__((always_inline)) inline double +JS_CANONICALIZE_NAN(double d) +{ + if ((__builtin_expect((d != d), 0))) { + jsval_layout l; + l.asBits = 0x7FF8000000000000LL; + return l.asDouble; + } + return d; +} + +} + + +static jsval_layout JSVAL_TO_IMPL(JS::Value); +static JS::Value IMPL_TO_JSVAL(jsval_layout); +# 24 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" +#define jsgc_root_h__ + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspubtd.h" 1 +# 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" 2 + + + + + +namespace JS { +# 62 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" +template class Rooted; + +template +struct RootMethods { }; + + + + + + +template +class Handle +{ + public: + + template Handle(Handle handle) { + testAssign(); + ptr = reinterpret_cast(handle.address()); + } +# 89 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" + static Handle fromMarkedLocation(const T *p) { + Handle h; + h.ptr = p; + return h; + } + + + + + + template inline Handle(const Rooted &root); + + const T *address() const { return ptr; } + T value() const { return *ptr; } + + operator T () const { return value(); } + T operator ->() const { return value(); } + + private: + Handle() {} + + const T *ptr; + + template + void testAssign() { + + + + + + + } +}; + +typedef Handle HandleObject; +typedef Handle HandleFunction; +typedef Handle HandleString; +typedef Handle HandleId; +typedef Handle HandleValue; + +template +struct RootMethods +{ + static T *initial() { return __null; } + static ThingRootKind kind() { return T::rootKind(); } + static bool poisoned(T *v) { return IsPoisonedPtr(v); } +}; + + + + + + +template +class Rooted +{ + void init(JSContext *cx_, T initial) + { +# 158 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" + ptr = initial; + } + + public: + Rooted(JSContext *cx) { init(cx, RootMethods::initial()); } + Rooted(JSContext *cx, T initial) { init(cx, initial); } +# 172 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" + operator Handle () const { return Handle(*this); } + + ~Rooted() + { + + + + + } + + + + + + operator T () const { return ptr; } + T operator ->() const { return ptr; } + T * address() { return &ptr; } + const T * address() const { return &ptr; } + T & reference() { return ptr; } + T raw() const { return ptr; } + + T & operator =(T value) + { + do { } while(0); + ptr = value; + return ptr; + } + + T & operator =(const Rooted &value) + { + ptr = value; + return ptr; + } + + private: + + + + + T ptr; + + Rooted() ; + Rooted(const Rooted &) ; +}; + +template template +inline +Handle::Handle(const Rooted &root) +{ + testAssign(); + ptr = reinterpret_cast(root.address()); +} + +typedef Rooted RootedObject; +typedef Rooted RootedFunction; +typedef Rooted RootedString; +typedef Rooted RootedId; +typedef Rooted RootedValue; + + + + + + + +class SkipRoot +{ +# 286 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" + public: + template + SkipRoot(JSContext *cx, const T *ptr + ) + { + do { } while (0); + } + + template + SkipRoot(JSContext *cx, const T *ptr, size_t count + ) + { + do { } while (0); + } + + + + +}; +# 314 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Root.h" +inline void MaybeCheckStackRoots(JSContext *cx) {} + + +} +# 27 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 + + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 1 3 +# 39 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 3 +#define _GLIBCXX_NUMERIC_LIMITS 1 + + +# 42 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 3 +# 81 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 3 +#define __glibcxx_integral_traps true +# 90 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 3 +#define __glibcxx_float_has_denorm_loss false + + +#define __glibcxx_float_traps false + + +#define __glibcxx_float_tinyness_before false + + + + + + + +#define __glibcxx_double_has_denorm_loss false + + +#define __glibcxx_double_traps false + + +#define __glibcxx_double_tinyness_before false + + + + + + + +#define __glibcxx_long_double_has_denorm_loss false + + +#define __glibcxx_long_double_traps false + + +#define __glibcxx_long_double_tinyness_before false + + + + +#define __glibcxx_signed(T) ((T)(-1) < 0) + +#define __glibcxx_min(T) (__glibcxx_signed (T) ? (T)1 << __glibcxx_digits (T) : (T)0) + + +#define __glibcxx_max(T) (__glibcxx_signed (T) ? (((((T)1 << (__glibcxx_digits (T) - 1)) - 1) << 1) + 1) : ~(T)0) + + + +#define __glibcxx_digits(T) (sizeof(T) * __CHAR_BIT__ - __glibcxx_signed (T)) + + + +#define __glibcxx_digits10(T) (__glibcxx_digits (T) * 643 / 2136) + + +#define __glibcxx_max_digits10(T) (2 + (T) * 643 / 2136) + + +namespace std __attribute__ ((__visibility__ ("default"))) { + + + + + + + enum float_round_style + { + round_indeterminate = -1, + round_toward_zero = 0, + round_to_nearest = 1, + round_toward_infinity = 2, + round_toward_neg_infinity = 3 + }; + + + + + + + + enum float_denorm_style + { + + denorm_indeterminate = -1, + + denorm_absent = 0, + + denorm_present = 1 + }; +# 190 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 3 + struct __numeric_limits_base + { + + + static const bool is_specialized = false; + + + + + static const int digits = 0; + + static const int digits10 = 0; + + + + + + + static const bool is_signed = false; + + + static const bool is_integer = false; + + + + + static const bool is_exact = false; + + + static const int radix = 0; + + + + static const int min_exponent = 0; + + + static const int min_exponent10 = 0; + + + + static const int max_exponent = 0; + + + static const int max_exponent10 = 0; + + + static const bool has_infinity = false; + + + static const bool has_quiet_NaN = false; + + + static const bool has_signaling_NaN = false; + + static const float_denorm_style has_denorm = denorm_absent; + + + static const bool has_denorm_loss = false; + + + + static const bool is_iec559 = false; + + + + static const bool is_bounded = false; + + + + + static const bool is_modulo = false; + + + static const bool traps = false; + + static const bool tinyness_before = false; + + + + static const float_round_style round_style = round_toward_zero; + }; +# 283 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 3 + template + struct numeric_limits : public __numeric_limits_base + { + + + static _Tp min() throw() { return static_cast<_Tp>(0); } + + static _Tp max() throw() { return static_cast<_Tp>(0); } + + + + + + + + static _Tp epsilon() throw() { return static_cast<_Tp>(0); } + + static _Tp round_error() throw() { return static_cast<_Tp>(0); } + + static _Tp infinity() throw() { return static_cast<_Tp>(0); } + + + + static _Tp quiet_NaN() throw() { return static_cast<_Tp>(0); } + + + static _Tp signaling_NaN() throw() { return static_cast<_Tp>(0); } + + + + static _Tp denorm_min() throw() { return static_cast<_Tp>(0); } + }; +# 334 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 3 + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static bool min() throw() + { return false; } + static bool max() throw() + { return true; } + + + + + static const int digits = 1; + static const int digits10 = 0; + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static bool epsilon() throw() + { return false; } + static bool round_error() throw() + { return false; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static bool infinity() throw() + { return false; } + static bool quiet_NaN() throw() + { return false; } + static bool signaling_NaN() throw() + { return false; } + static bool denorm_min() throw() + { return false; } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = false; + + + + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static char min() throw() + { return (((char)(-1) < 0) ? (char)1 << (sizeof(char) * 8 - ((char)(-1) < 0)) : (char)0); } + static char max() throw() + { return (((char)(-1) < 0) ? (((((char)1 << ((sizeof(char) * 8 - ((char)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(char)0); } + + + + + + static const int digits = (sizeof(char) * 8 - ((char)(-1) < 0)); + static const int digits10 = ((sizeof(char) * 8 - ((char)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = ((char)(-1) < 0); + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static char epsilon() throw() + { return 0; } + static char round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static char infinity() throw() + { return char(); } + static char quiet_NaN() throw() + { return char(); } + static char signaling_NaN() throw() + { return char(); } + static char denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static signed char min() throw() + { return -127 - 1; } + static signed char max() throw() + { return 127; } + + + + + + static const int digits = (sizeof(signed char) * 8 - ((signed char)(-1) < 0)); + static const int digits10 = ((sizeof(signed char) * 8 - ((signed char)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static signed char epsilon() throw() + { return 0; } + static signed char round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static signed char infinity() throw() + { return static_cast(0); } + static signed char quiet_NaN() throw() + { return static_cast(0); } + static signed char signaling_NaN() throw() + { return static_cast(0); } + static signed char denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned char min() throw() + { return 0; } + static unsigned char max() throw() + { return 127 * 2U + 1; } + + + + + + static const int digits = (sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned char) * 8 - ((unsigned char)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned char epsilon() throw() + { return 0; } + static unsigned char round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned char infinity() throw() + { return static_cast(0); } + static unsigned char quiet_NaN() throw() + { return static_cast(0); } + static unsigned char signaling_NaN() throw() + { return static_cast(0); } + static unsigned char denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static wchar_t min() throw() + { return (((wchar_t)(-1) < 0) ? (wchar_t)1 << (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) : (wchar_t)0); } + static wchar_t max() throw() + { return (((wchar_t)(-1) < 0) ? (((((wchar_t)1 << ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(wchar_t)0); } + + + + + + static const int digits = (sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)); + static const int digits10 = ((sizeof(wchar_t) * 8 - ((wchar_t)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = ((wchar_t)(-1) < 0); + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static wchar_t epsilon() throw() + { return 0; } + static wchar_t round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static wchar_t infinity() throw() + { return wchar_t(); } + static wchar_t quiet_NaN() throw() + { return wchar_t(); } + static wchar_t signaling_NaN() throw() + { return wchar_t(); } + static wchar_t denorm_min() throw() + { return wchar_t(); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; +# 744 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/g++-v4/limits" 3 + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static short min() throw() + { return -32767 - 1; } + static short max() throw() + { return 32767; } + + + + + + static const int digits = (sizeof(short) * 8 - ((short)(-1) < 0)); + static const int digits10 = ((sizeof(short) * 8 - ((short)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static short epsilon() throw() + { return 0; } + static short round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static short infinity() throw() + { return short(); } + static short quiet_NaN() throw() + { return short(); } + static short signaling_NaN() throw() + { return short(); } + static short denorm_min() throw() + { return short(); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned short min() throw() + { return 0; } + static unsigned short max() throw() + { return 32767 * 2U + 1; } + + + + + + static const int digits = (sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned short) * 8 - ((unsigned short)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned short epsilon() throw() + { return 0; } + static unsigned short round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned short infinity() throw() + { return static_cast(0); } + static unsigned short quiet_NaN() throw() + { return static_cast(0); } + static unsigned short signaling_NaN() throw() + { return static_cast(0); } + static unsigned short denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static int min() throw() + { return -2147483647 - 1; } + static int max() throw() + { return 2147483647; } + + + + + + static const int digits = (sizeof(int) * 8 - ((int)(-1) < 0)); + static const int digits10 = ((sizeof(int) * 8 - ((int)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static int epsilon() throw() + { return 0; } + static int round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static int infinity() throw() + { return static_cast(0); } + static int quiet_NaN() throw() + { return static_cast(0); } + static int signaling_NaN() throw() + { return static_cast(0); } + static int denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned int min() throw() + { return 0; } + static unsigned int max() throw() + { return 2147483647 * 2U + 1; } + + + + + + static const int digits = (sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned int) * 8 - ((unsigned int)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned int epsilon() throw() + { return 0; } + static unsigned int round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned int infinity() throw() + { return static_cast(0); } + static unsigned int quiet_NaN() throw() + { return static_cast(0); } + static unsigned int signaling_NaN() throw() + { return static_cast(0); } + static unsigned int denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static long min() throw() + { return -2147483647L - 1; } + static long max() throw() + { return 2147483647L; } + + + + + + static const int digits = (sizeof(long) * 8 - ((long)(-1) < 0)); + static const int digits10 = ((sizeof(long) * 8 - ((long)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static long epsilon() throw() + { return 0; } + static long round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static long infinity() throw() + { return static_cast(0); } + static long quiet_NaN() throw() + { return static_cast(0); } + static long signaling_NaN() throw() + { return static_cast(0); } + static long denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned long min() throw() + { return 0; } + static unsigned long max() throw() + { return 2147483647L * 2UL + 1; } + + + + + + static const int digits = (sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned long) * 8 - ((unsigned long)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned long epsilon() throw() + { return 0; } + static unsigned long round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned long infinity() throw() + { return static_cast(0); } + static unsigned long quiet_NaN() throw() + { return static_cast(0); } + static unsigned long signaling_NaN() throw() + { return static_cast(0); } + static unsigned long denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static long long min() throw() + { return -9223372036854775807LL - 1; } + static long long max() throw() + { return 9223372036854775807LL; } + + + + + + static const int digits = (sizeof(long long) * 8 - ((long long)(-1) < 0)); + static const int digits10 = ((sizeof(long long) * 8 - ((long long)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = true; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static long long epsilon() throw() + { return 0; } + static long long round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static long long infinity() throw() + { return static_cast(0); } + static long long quiet_NaN() throw() + { return static_cast(0); } + static long long signaling_NaN() throw() + { return static_cast(0); } + static long long denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static unsigned long long min() throw() + { return 0; } + static unsigned long long max() throw() + { return 9223372036854775807LL * 2ULL + 1; } + + + + + + static const int digits = (sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)); + static const int digits10 = ((sizeof(unsigned long long) * 8 - ((unsigned long long)(-1) < 0)) * 643 / 2136); + + + + static const bool is_signed = false; + static const bool is_integer = true; + static const bool is_exact = true; + static const int radix = 2; + static unsigned long long epsilon() throw() + { return 0; } + static unsigned long long round_error() throw() + { return 0; } + + static const int min_exponent = 0; + static const int min_exponent10 = 0; + static const int max_exponent = 0; + static const int max_exponent10 = 0; + + static const bool has_infinity = false; + static const bool has_quiet_NaN = false; + static const bool has_signaling_NaN = false; + static const float_denorm_style has_denorm = denorm_absent; + static const bool has_denorm_loss = false; + + static unsigned long long infinity() throw() + { return static_cast(0); } + static unsigned long long quiet_NaN() throw() + { return static_cast(0); } + static unsigned long long signaling_NaN() throw() + { return static_cast(0); } + static unsigned long long denorm_min() throw() + { return static_cast(0); } + + static const bool is_iec559 = false; + static const bool is_bounded = true; + static const bool is_modulo = true; + + static const bool traps = true; + static const bool tinyness_before = false; + static const float_round_style round_style = round_toward_zero; + }; + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static float min() throw() + { return 1.1754943508222875e-38F; } + static float max() throw() + { return 3.4028234663852886e+38F; } + + + + + + static const int digits = 24; + static const int digits10 = 6; + + + + + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 2; + static float epsilon() throw() + { return 1.1920928955078125e-7F; } + static float round_error() throw() + { return 0.5F; } + + static const int min_exponent = (-125); + static const int min_exponent10 = (-37); + static const int max_exponent = 128; + static const int max_exponent10 = 38; + + static const bool has_infinity = 1; + static const bool has_quiet_NaN = 1; + static const bool has_signaling_NaN = has_quiet_NaN; + static const float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static const bool has_denorm_loss = false; + + static float infinity() throw() + { return __builtin_huge_valf (); } + static float quiet_NaN() throw() + { return __builtin_nanf (""); } + static float signaling_NaN() throw() + { return __builtin_nansf (""); } + static float denorm_min() throw() + { return 1.4012984643248171e-45F; } + + static const bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_to_nearest; + }; + +#undef __glibcxx_float_has_denorm_loss +#undef __glibcxx_float_traps +#undef __glibcxx_float_tinyness_before + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static double min() throw() + { return ((double)2.2250738585072014e-308L); } + static double max() throw() + { return ((double)1.7976931348623157e+308L); } + + + + + + static const int digits = 53; + static const int digits10 = 15; + + + + + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 2; + static double epsilon() throw() + { return ((double)2.2204460492503131e-16L); } + static double round_error() throw() + { return 0.5; } + + static const int min_exponent = (-1021); + static const int min_exponent10 = (-307); + static const int max_exponent = 1024; + static const int max_exponent10 = 308; + + static const bool has_infinity = 1; + static const bool has_quiet_NaN = 1; + static const bool has_signaling_NaN = has_quiet_NaN; + static const float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static const bool has_denorm_loss = false; + + static double infinity() throw() + { return __builtin_huge_val(); } + static double quiet_NaN() throw() + { return __builtin_nan (""); } + static double signaling_NaN() throw() + { return __builtin_nans (""); } + static double denorm_min() throw() + { return ((double)4.9406564584124654e-324L); } + + static const bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_to_nearest; + }; + +#undef __glibcxx_double_has_denorm_loss +#undef __glibcxx_double_traps +#undef __glibcxx_double_tinyness_before + + + template<> + struct numeric_limits + { + static const bool is_specialized = true; + + static long double min() throw() + { return 2.2250738585072014e-308L; } + static long double max() throw() + { return 1.7976931348623157e+308L; } + + + + + + static const int digits = 53; + static const int digits10 = 15; + + + + + static const bool is_signed = true; + static const bool is_integer = false; + static const bool is_exact = false; + static const int radix = 2; + static long double epsilon() throw() + { return 2.2204460492503131e-16L; } + static long double round_error() throw() + { return 0.5L; } + + static const int min_exponent = (-1021); + static const int min_exponent10 = (-307); + static const int max_exponent = 1024; + static const int max_exponent10 = 308; + + static const bool has_infinity = 1; + static const bool has_quiet_NaN = 1; + static const bool has_signaling_NaN = has_quiet_NaN; + static const float_denorm_style has_denorm + = bool(1) ? denorm_present : denorm_absent; + static const bool has_denorm_loss + = false; + + static long double infinity() throw() + { return __builtin_huge_vall (); } + static long double quiet_NaN() throw() + { return __builtin_nanl (""); } + static long double signaling_NaN() throw() + { return __builtin_nansl (""); } + static long double denorm_min() throw() + { return 4.9406564584124654e-324L; } + + static const bool is_iec559 + = has_infinity && has_quiet_NaN && has_denorm == denorm_present; + static const bool is_bounded = true; + static const bool is_modulo = false; + + static const bool traps = false; + static const bool tinyness_before = false; + static const float_round_style round_style = round_to_nearest; + }; + +#undef __glibcxx_long_double_has_denorm_loss +#undef __glibcxx_long_double_traps +#undef __glibcxx_long_double_tinyness_before + +} + +#undef __glibcxx_signed +#undef __glibcxx_min +#undef __glibcxx_max +#undef __glibcxx_digits +#undef __glibcxx_digits10 +#undef __glibcxx_max_digits10 +# 30 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsalloc.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsalloc.h" +#define jsalloc_h_ + + + + +namespace js { +# 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsalloc.h" +class SystemAllocPolicy +{ + public: + void *malloc_(size_t bytes) { return js_malloc(bytes); } + void *realloc_(void *p, size_t oldBytes, size_t bytes) { return js_realloc(p, bytes); } + void free_(void *p) { js_free(p); } + void reportAllocOverflow() const {} +}; +# 50 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsalloc.h" +class TempAllocPolicy +{ + JSContext *const cx; + + + + + + __attribute__((visibility("default"))) void * onOutOfMemory(void *p, size_t nbytes); + + public: + TempAllocPolicy(JSContext *cx) : cx(cx) {} + + JSContext *context() const { + return cx; + } + + void *malloc_(size_t bytes) { + void *p = js_malloc(bytes); + if ((__builtin_expect((!p), 0))) + p = onOutOfMemory(__null, bytes); + return p; + } + + void *realloc_(void *p, size_t oldBytes, size_t bytes) { + void *p2 = js_realloc(p, bytes); + if ((__builtin_expect((!p2), 0))) + p2 = onOutOfMemory(p2, bytes); + return p2; + } + + void free_(void *p) { + js_free(p); + } + + __attribute__((visibility("default"))) void reportAllocOverflow() const; +}; + +} +# 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 +# 1 "./../../dist/include/js/Vector.h" 1 +# 9 "./../../dist/include/js/Vector.h" +#define jsvector_h_ + + + +# 1 "./../../dist/include/js/TemplateLib.h" 1 +# 9 "./../../dist/include/js/TemplateLib.h" +#define js_template_lib_h__ +# 20 "./../../dist/include/js/TemplateLib.h" +namespace js { +namespace tl { + + +template struct Min { + static const size_t result = i < j ? i : j; +}; +template struct Max { + static const size_t result = i > j ? i : j; +}; +template struct Clamp { + static const size_t result = i < min ? min : (i > max ? max : i); +}; + + +template struct Pow { + static const size_t result = x * Pow::result; +}; +template struct Pow { + static const size_t result = 1; +}; + + +template struct FloorLog2 { + static const size_t result = 1 + FloorLog2::result; +}; +template <> struct FloorLog2<0> { }; +template <> struct FloorLog2<1> { static const size_t result = 0; }; + + +template struct CeilingLog2 { + static const size_t result = FloorLog2<2 * i - 1>::result; +}; + + +template struct RoundUpPow2 { + static const size_t result = size_t(1) << CeilingLog2::result; +}; +template <> struct RoundUpPow2<0> { + static const size_t result = 1; +}; + + +template struct BitSize { + static const size_t result = sizeof(T) * 8; +}; + + +template struct StaticAssert {}; +template <> struct StaticAssert { typedef int result; }; + + +template struct IsSameType { + static const bool result = false; +}; +template struct IsSameType { + static const bool result = true; +}; + + + + + +template struct NBitMask { + typedef typename StaticAssert::result>::result _; + static const size_t result = (size_t(1) << N) - 1; +}; +template <> struct NBitMask::result> { + static const size_t result = size_t(-1); +}; + + + + + +template struct MulOverflowMask { + static const size_t result = + ~NBitMask::result - CeilingLog2::result>::result; +}; +template <> struct MulOverflowMask<0> { }; +template <> struct MulOverflowMask<1> { static const size_t result = 0; }; + + + + + + +template struct UnsafeRangeSizeMask { + + + + + static const size_t result = MulOverflowMask<2 * sizeof(T)>::result; +}; + + +template struct StripConst { typedef T result; }; +template struct StripConst { typedef T result; }; + + + + + +template struct IsPodType { static const bool result = false; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template struct IsPodType { static const bool result = true; }; + +template struct If { static const T result = v1; }; +template struct If { static const T result = v2; }; + + + + +template struct IsRelocatableHeapType { static const bool result = true; }; + +} +} +# 14 "./../../dist/include/js/Vector.h" 2 +# 1 "./../../dist/include/js/Utility.h" 1 +# 15 "./../../dist/include/js/Vector.h" 2 + + + + + + + +namespace js { + +class TempAllocPolicy; + +template +class Vector; + + + + + +template +struct VectorImpl +{ + + static inline void destroy(T *begin, T *end) { + for (T *p = begin; p != end; ++p) + p->~T(); + } + + + static inline void initialize(T *begin, T *end) { + for (T *p = begin; p != end; ++p) + new(p) T(); + } + + + + + + template + static inline void copyConstruct(T *dst, const U *srcbeg, const U *srcend) { + for (const U *p = srcbeg; p != srcend; ++p, ++dst) + new(dst) T(*p); + } + + + + + + template + static inline void moveConstruct(T *dst, const U *srcbeg, const U *srcend) { + for (const U *p = srcbeg; p != srcend; ++p, ++dst) + new(dst) T(Move(*p)); + } + + + + + + template + static inline void copyConstructN(T *dst, size_t n, const U &u) { + for (T *end = dst + n; dst != end; ++dst) + new(dst) T(u); + } + + + + + + + + static inline bool growTo(Vector &v, size_t newcap) { + do { } while(0); + T *newbuf = reinterpret_cast(v.malloc_(newcap * sizeof(T))); + if (!newbuf) + return false; + for (T *dst = newbuf, *src = v.beginNoCheck(); src != v.endNoCheck(); ++dst, ++src) + new(dst) T(Move(*src)); + VectorImpl::destroy(v.beginNoCheck(), v.endNoCheck()); + v.free_(v.mBegin); + v.mBegin = newbuf; + + v.mCapacity = newcap; + return true; + } +}; + + + + + + +template +struct VectorImpl +{ + static inline void destroy(T *, T *) {} + + static inline void initialize(T *begin, T *end) { +# 121 "./../../dist/include/js/Vector.h" + for (T *p = begin; p != end; ++p) + new(p) T(); + } + + template + static inline void copyConstruct(T *dst, const U *srcbeg, const U *srcend) { + + + + + + + + for (const U *p = srcbeg; p != srcend; ++p, ++dst) + *dst = *p; + } + + template + static inline void moveConstruct(T *dst, const U *srcbeg, const U *srcend) { + copyConstruct(dst, srcbeg, srcend); + } + + static inline void copyConstructN(T *dst, size_t n, const T &t) { + for (T *p = dst, *end = dst + n; p != end; ++p) + *p = t; + } + + static inline bool growTo(Vector &v, size_t newcap) { + do { } while(0); + size_t bytes = sizeof(T) * newcap; + size_t oldBytes = sizeof(T) * v.mCapacity; + T *newbuf = reinterpret_cast(v.realloc_(v.mBegin, oldBytes, bytes)); + if (!newbuf) + return false; + v.mBegin = newbuf; + + v.mCapacity = newcap; + return true; + } +}; +# 180 "./../../dist/include/js/Vector.h" +template +class Vector : private AllocPolicy +{ + typedef typename tl::StaticAssert::result>::result _; + + + + static const bool sElemIsPod = tl::IsPodType::result; + typedef VectorImpl Impl; + friend struct VectorImpl; + + bool calculateNewCapacity(size_t curLength, size_t lengthInc, size_t &newCap); + bool growStorageBy(size_t lengthInc); + bool growHeapStorageBy(size_t lengthInc); + bool convertToHeapStorage(size_t lengthInc); + + template inline bool growByImpl(size_t inc); + + + + static const int sMaxInlineBytes = 1024; +# 213 "./../../dist/include/js/Vector.h" + template + struct ElemSize { + static const size_t result = sizeof(T); + }; + template + struct ElemSize<0, Dummy> { + static const size_t result = 1; + }; + + static const size_t sInlineCapacity = + tl::Min::result>::result; + + + static const size_t sInlineBytes = + tl::Max<1, sInlineCapacity * ElemSize::result>::result; +# 238 "./../../dist/include/js/Vector.h" + T *mBegin; + size_t mLength; + size_t mCapacity; + + + + + AlignedStorage storage; + + + + + + + Vector(const Vector &) ; + Vector &operator=(const Vector &) ; + + + + bool usingInlineStorage() const { + return mBegin == (T *)storage.addr(); + } + + T *beginNoCheck() const { + return mBegin; + } + + T *endNoCheck() { + return mBegin + mLength; + } + + const T *endNoCheck() const { + return mBegin + mLength; + } +# 282 "./../../dist/include/js/Vector.h" + template void internalAppend(U t); + void internalAppendN(const T &t, size_t n); + template void internalAppend(const U *begin, size_t length); + template void internalAppend(const Vector &other); + + public: + static const size_t sMaxInlineStorage = N; + + typedef T ElementType; + + Vector(AllocPolicy = AllocPolicy()); + Vector(MoveRef); + Vector &operator=(MoveRef); + ~Vector(); + + + + const AllocPolicy &allocPolicy() const { + return *this; + } + + AllocPolicy &allocPolicy() { + return *this; + } + + enum { InlineLength = N }; + + size_t length() const { + return mLength; + } + + bool empty() const { + return mLength == 0; + } + + size_t capacity() const { + return mCapacity; + } + + T *begin() { + do { } while(0); + return mBegin; + } + + const T *begin() const { + do { } while(0); + return mBegin; + } + + T *end() { + do { } while(0); + return mBegin + mLength; + } + + const T *end() const { + do { } while(0); + return mBegin + mLength; + } + + T &operator[](size_t i) { + do { } while(0); + return begin()[i]; + } + + const T &operator[](size_t i) const { + do { } while(0); + return begin()[i]; + } + + T &back() { + do { } while(0); + return *(end() - 1); + } + + const T &back() const { + do { } while(0); + return *(end() - 1); + } + + class Range { + friend class Vector; + T *cur, *end; + Range(T *cur, T *end) : cur(cur), end(end) {} + public: + Range() {} + bool empty() const { return cur == end; } + size_t remain() const { return end - cur; } + T &front() const { return *cur; } + void popFront() { do { } while(0); ++cur; } + T popCopyFront() { do { } while(0); return *cur++; } + }; + + Range all() { + return Range(begin(), end()); + } + + + + + bool reserve(size_t capacity); + + + + + + void shrinkBy(size_t incr); + + + bool growBy(size_t incr); + + + bool resize(size_t newLength); + + + bool growByUninitialized(size_t incr); + bool resizeUninitialized(size_t newLength); + + + void clear(); + + + void clearAndFree(); +# 413 "./../../dist/include/js/Vector.h" + template bool append(U t); + bool appendN(const T &t, size_t n); + template bool append(const U *begin, const U *end); + template bool append(const U *begin, size_t length); + template bool append(const Vector &other); + + + + + + void infallibleAppend(const T &t) { + internalAppend(t); + } + void infallibleAppendN(const T &t, size_t n) { + internalAppendN(t, n); + } + template void infallibleAppend(const U *begin, const U *end) { + internalAppend(begin, PointerRangeSize(begin, end)); + } + template void infallibleAppend(const U *begin, size_t length) { + internalAppend(begin, length); + } + template void infallibleAppend(const Vector &other) { + internalAppend(other); + } + + void popBack(); + + T popCopy(); +# 451 "./../../dist/include/js/Vector.h" + T *extractRawBuffer(); + + + + + + + void replaceRawBuffer(T *p, size_t length); + + + + + + bool insert(T *p, const T &val); + + + + + + void erase(T *t); + + + + + size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const; + + + + + + size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const; +}; + + +#define REENTRANCY_GUARD_ET_AL ReentrancyGuard g(*this); JS_ASSERT_IF(usingInlineStorage(), mCapacity == sInlineCapacity); JS_ASSERT(reserved() <= mCapacity); JS_ASSERT(mLength <= reserved()); JS_ASSERT(mLength <= mCapacity) +# 494 "./../../dist/include/js/Vector.h" +template +__attribute__((always_inline)) inline +Vector::Vector(AllocPolicy ap) + : AllocPolicy(ap), mBegin((T *)storage.addr()), mLength(0), + mCapacity(sInlineCapacity) + + + +{} + + +template +__attribute__((always_inline)) inline +Vector::Vector(MoveRef rhs) + : AllocPolicy(rhs) +{ + mLength = rhs->mLength; + mCapacity = rhs->mCapacity; + + + + + if (rhs->usingInlineStorage()) { + + mBegin = (T *)storage.addr(); + Impl::moveConstruct(mBegin, rhs->beginNoCheck(), rhs->endNoCheck()); + + + + + } else { + + + + + mBegin = rhs->mBegin; + rhs->mBegin = (T *) rhs->storage.addr(); + rhs->mCapacity = sInlineCapacity; + rhs->mLength = 0; + + + + } +} + + +template +__attribute__((always_inline)) inline +Vector & +Vector::operator=(MoveRef rhs) +{ + this->~Vector(); + new(this) Vector(rhs); + return *this; +} + +template +__attribute__((always_inline)) inline +Vector::~Vector() +{ + ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); + Impl::destroy(beginNoCheck(), endNoCheck()); + if (!usingInlineStorage()) + this->free_(beginNoCheck()); +} + + + + + +template + +inline bool +Vector::calculateNewCapacity(size_t curLength, size_t lengthInc, + size_t &newCap) +{ + size_t newMinCap = curLength + lengthInc; + + + + + + if (newMinCap < curLength || + newMinCap & tl::MulOverflowMask<2 * sizeof(T)>::result) { + this->reportAllocOverflow(); + return false; + } + + + newCap = RoundUpPow2(newMinCap); + + + + + + if (newCap & tl::UnsafeRangeSizeMask::result) { + this->reportAllocOverflow(); + return false; + } + return true; +} + + + + + +template +__attribute__((always_inline)) inline bool +Vector::growHeapStorageBy(size_t lengthInc) +{ + do { } while(0); + size_t newCap; + return calculateNewCapacity(mLength, lengthInc, newCap) && + Impl::growTo(*this, newCap); +} + + + + + + +template +inline bool +Vector::convertToHeapStorage(size_t lengthInc) +{ + do { } while(0); + size_t newCap; + if (!calculateNewCapacity(mLength, lengthInc, newCap)) + return false; + + + T *newBuf = reinterpret_cast(this->malloc_(newCap * sizeof(T))); + if (!newBuf) + return false; + + + Impl::moveConstruct(newBuf, beginNoCheck(), endNoCheck()); + Impl::destroy(beginNoCheck(), endNoCheck()); + + + mBegin = newBuf; + + mCapacity = newCap; + return true; +} + +template +__attribute__((noinline)) bool +Vector::growStorageBy(size_t incr) +{ + do { } while(0); + return usingInlineStorage() + ? convertToHeapStorage(incr) + : growHeapStorageBy(incr); +} + +template +inline bool +Vector::reserve(size_t request) +{ + ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); + if (request > mCapacity && !growStorageBy(request - mLength)) + return false; + + + + + + + + return true; +} + +template +inline void +Vector::shrinkBy(size_t incr) +{ + ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); + do { } while(0); + Impl::destroy(endNoCheck() - incr, endNoCheck()); + mLength -= incr; +} + +template +template +__attribute__((always_inline)) inline bool +Vector::growByImpl(size_t incr) +{ + ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); + if (incr > mCapacity - mLength && !growStorageBy(incr)) + return false; + + do { } while(0); + T *newend = endNoCheck() + incr; + if (InitNewElems) + Impl::initialize(endNoCheck(), newend); + mLength += incr; + + + + + return true; +} + +template +__attribute__((always_inline)) inline bool +Vector::growBy(size_t incr) +{ + return growByImpl(incr); +} + +template +__attribute__((always_inline)) inline bool +Vector::growByUninitialized(size_t incr) +{ + return growByImpl(incr); +} + +template + +inline bool +Vector::resize(size_t newLength) +{ + size_t curLength = mLength; + if (newLength > curLength) + return growBy(newLength - curLength); + shrinkBy(curLength - newLength); + return true; +} + +template +__attribute__((always_inline)) inline bool +Vector::resizeUninitialized(size_t newLength) +{ + size_t curLength = mLength; + if (newLength > curLength) + return growByUninitialized(newLength - curLength); + shrinkBy(curLength - newLength); + return true; +} + +template +inline void +Vector::clear() +{ + ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); + Impl::destroy(beginNoCheck(), endNoCheck()); + mLength = 0; +} + +template +inline void +Vector::clearAndFree() +{ + clear(); + + if (usingInlineStorage()) + return; + + this->free_(beginNoCheck()); + mBegin = (T *)storage.addr(); + mCapacity = sInlineCapacity; + + + +} + +template +template +__attribute__((always_inline)) inline bool +Vector::append(U t) +{ + ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); + if (mLength == mCapacity && !growStorageBy(1)) + return false; + + + + + + internalAppend(t); + return true; +} + +template +template +__attribute__((always_inline)) inline void +Vector::internalAppend(U t) +{ + do { } while(0); + do { } while(0); + new(endNoCheck()) T(t); + ++mLength; +} + +template +__attribute__((always_inline)) inline bool +Vector::appendN(const T &t, size_t needed) +{ + ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); + if (mLength + needed > mCapacity && !growStorageBy(needed)) + return false; + + + + + + internalAppendN(t, needed); + return true; +} + +template +__attribute__((always_inline)) inline void +Vector::internalAppendN(const T &t, size_t needed) +{ + do { } while(0); + do { } while(0); + Impl::copyConstructN(endNoCheck(), needed, t); + mLength += needed; +} + +template +inline bool +Vector::insert(T *p, const T &val) +{ + do { } while(0); + size_t pos = p - begin(); + do { } while(0); + size_t oldLength = mLength; + if (pos == oldLength) + return append(val); + { + T oldBack = back(); + if (!append(oldBack)) + return false; + } + for (size_t i = oldLength; i > pos; --i) + (*this)[i] = (*this)[i - 1]; + (*this)[pos] = val; + return true; +} + +template +inline void +Vector::erase(T *it) +{ + do { } while(0); + while (it + 1 != end()) { + *it = *(it + 1); + ++it; + } + popBack(); +} + +template +template +__attribute__((always_inline)) inline bool +Vector::append(const U *insBegin, const U *insEnd) +{ + ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); + size_t needed = PointerRangeSize(insBegin, insEnd); + if (mLength + needed > mCapacity && !growStorageBy(needed)) + return false; + + + + + + internalAppend(insBegin, needed); + return true; +} + +template +template +__attribute__((always_inline)) inline void +Vector::internalAppend(const U *insBegin, size_t length) +{ + do { } while(0); + do { } while(0); + Impl::copyConstruct(endNoCheck(), insBegin, insBegin + length); + mLength += length; +} + +template +template +inline bool +Vector::append(const Vector &other) +{ + return append(other.begin(), other.end()); +} + +template +template +inline void +Vector::internalAppend(const Vector &other) +{ + internalAppend(other.begin(), other.length()); +} + +template +template +__attribute__((always_inline)) inline bool +Vector::append(const U *insBegin, size_t length) +{ + return this->append(insBegin, insBegin + length); +} + +template +__attribute__((always_inline)) inline void +Vector::popBack() +{ + ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); + do { } while(0); + --mLength; + endNoCheck()->~T(); +} + +template +__attribute__((always_inline)) inline T +Vector::popCopy() +{ + T ret = back(); + popBack(); + return ret; +} + +template +inline T * +Vector::extractRawBuffer() +{ + T *ret; + if (usingInlineStorage()) { + ret = reinterpret_cast(this->malloc_(mLength * sizeof(T))); + if (!ret) + return __null; + Impl::copyConstruct(ret, beginNoCheck(), endNoCheck()); + Impl::destroy(beginNoCheck(), endNoCheck()); + + mLength = 0; + } else { + ret = mBegin; + mBegin = (T *)storage.addr(); + mLength = 0; + mCapacity = sInlineCapacity; + + + + } + return ret; +} + +template +inline void +Vector::replaceRawBuffer(T *p, size_t length) +{ + ReentrancyGuard g(*this); do { } while (0); do { } while(0); do { } while(0); do { } while(0); + + + Impl::destroy(beginNoCheck(), endNoCheck()); + if (!usingInlineStorage()) + this->free_(beginNoCheck()); + + + if (length <= sInlineCapacity) { + + + + + + mBegin = (T *)storage.addr(); + mLength = length; + mCapacity = sInlineCapacity; + Impl::moveConstruct(mBegin, p, p + length); + Impl::destroy(p, p + length); + this->free_(p); + } else { + mBegin = p; + mLength = length; + mCapacity = length; + } + + + +} + +template +inline size_t +Vector::sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const +{ + return usingInlineStorage() ? 0 : mallocSizeOf(beginNoCheck()); +} + +template +inline size_t +Vector::sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const +{ + return mallocSizeOf(this) + sizeOfExcludingThis(mallocSizeOf); +} + +} +# 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 2 + + + + + +#define JSVAL_INT_BITS 32 +#define JSVAL_INT_MIN ((int32_t)0x80000000) +#define JSVAL_INT_MAX ((int32_t)0x7fffffff) + + + +#define JS_Assert MOZ_Assert + + +namespace JS { +# 109 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +template class AnchorPermitted; +template<> class AnchorPermitted { }; +template<> class AnchorPermitted { }; +template<> class AnchorPermitted { }; +template<> class AnchorPermitted { }; +template<> class AnchorPermitted { }; +template<> class AnchorPermitted { }; +template<> class AnchorPermitted { }; +template<> class AnchorPermitted { }; +template<> class AnchorPermitted { }; + +template +class Anchor: AnchorPermitted +{ + public: + Anchor() { } + explicit Anchor(T t) { hold = t; } + inline ~Anchor(); + T &get() { return hold; } + const T &get() const { return hold; } + void set(const T &t) { hold = t; } + void operator=(const T &t) { hold = t; } + void clear() { hold = 0; } + private: + T hold; + Anchor(const Anchor &) ; + const Anchor &operator=(const Anchor &) ; +}; + + +template +inline Anchor::~Anchor() +{ +# 153 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" + asm volatile("":: "g" (hold) : "memory"); +} +# 222 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +class Value +{ + public: + + + + + + + + __attribute__((always_inline)) inline + void setNull() { + data.asBits = BUILD_JSVAL(JSVAL_TAG_NULL, 0).asBits; + } + + __attribute__((always_inline)) inline + void setUndefined() { + data.asBits = BUILD_JSVAL(JSVAL_TAG_UNDEFINED, 0).asBits; + } + + __attribute__((always_inline)) inline + void setInt32(int32_t i) { + data = INT32_TO_JSVAL_IMPL(i); + } + + __attribute__((always_inline)) inline + int32_t &getInt32Ref() { + do { } while(0); + return data.s.payload.i32; + } + + __attribute__((always_inline)) inline + void setDouble(double d) { + data = DOUBLE_TO_JSVAL_IMPL(d); + } + + __attribute__((always_inline)) inline + double &getDoubleRef() { + do { } while(0); + return data.asDouble; + } + + __attribute__((always_inline)) inline + void setString(JSString *str) { + do { } while(0); + data = STRING_TO_JSVAL_IMPL(str); + } + + __attribute__((always_inline)) inline + void setString(const JS::Anchor &str) { + setString(str.get()); + } + + __attribute__((always_inline)) inline + void setObject(JSObject &obj) { + do { } while(0); + data = OBJECT_TO_JSVAL_IMPL(&obj); + } + + __attribute__((always_inline)) inline + void setBoolean(bool b) { + data = BOOLEAN_TO_JSVAL_IMPL(b); + } + + __attribute__((always_inline)) inline + void setMagic(JSWhyMagic why) { + data = MAGIC_TO_JSVAL_IMPL(why); + } + + __attribute__((always_inline)) inline + bool setNumber(uint32_t ui) { + if (ui > ((int32_t)0x7fffffff)) { + setDouble((double)ui); + return false; + } else { + setInt32((int32_t)ui); + return true; + } + } + + __attribute__((always_inline)) inline + bool setNumber(double d) { + int32_t i; + if (MOZ_DOUBLE_IS_INT32(d, &i)) { + setInt32(i); + return true; + } else { + setDouble(d); + return false; + } + } + + __attribute__((always_inline)) inline + void setObjectOrNull(JSObject *arg) { + if (arg) + setObject(*arg); + else + setNull(); + } + + __attribute__((always_inline)) inline + void swap(Value &rhs) { + uint64_t tmp = rhs.data.asBits; + rhs.data.asBits = data.asBits; + data.asBits = tmp; + } + + + + __attribute__((always_inline)) inline + bool isUndefined() const { + return JSVAL_IS_UNDEFINED_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isNull() const { + return JSVAL_IS_NULL_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isNullOrUndefined() const { + return isNull() || isUndefined(); + } + + __attribute__((always_inline)) inline + bool isInt32() const { + return JSVAL_IS_INT32_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isInt32(int32_t i32) const { + return JSVAL_IS_SPECIFIC_INT32_IMPL(data, i32); + } + + __attribute__((always_inline)) inline + bool isDouble() const { + return JSVAL_IS_DOUBLE_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isNumber() const { + return JSVAL_IS_NUMBER_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isString() const { + return JSVAL_IS_STRING_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isObject() const { + return JSVAL_IS_OBJECT_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isPrimitive() const { + return JSVAL_IS_PRIMITIVE_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isObjectOrNull() const { + return JSVAL_IS_OBJECT_OR_NULL_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isGCThing() const { + return JSVAL_IS_GCTHING_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isBoolean() const { + return JSVAL_IS_BOOLEAN_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isTrue() const { + return JSVAL_IS_SPECIFIC_BOOLEAN(data, true); + } + + __attribute__((always_inline)) inline + bool isFalse() const { + return JSVAL_IS_SPECIFIC_BOOLEAN(data, false); + } + + __attribute__((always_inline)) inline + bool isMagic() const { + return JSVAL_IS_MAGIC_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isMagic(JSWhyMagic why) const { + do { } while (0); + return JSVAL_IS_MAGIC_IMPL(data); + } + + __attribute__((always_inline)) inline + bool isMarkable() const { + return JSVAL_IS_TRACEABLE_IMPL(data); + } + + __attribute__((always_inline)) inline + JSGCTraceKind gcKind() const { + do { } while(0); + return JSGCTraceKind(JSVAL_TRACE_KIND_IMPL(data)); + } + + __attribute__((always_inline)) inline + JSWhyMagic whyMagic() const { + do { } while(0); + return data.s.payload.why; + } + + + + __attribute__((always_inline)) inline + bool operator==(const Value &rhs) const { + return data.asBits == rhs.data.asBits; + } + + __attribute__((always_inline)) inline + bool operator!=(const Value &rhs) const { + return data.asBits != rhs.data.asBits; + } + + friend inline bool SameType(const Value &lhs, const Value &rhs); + + + + __attribute__((always_inline)) inline + int32_t toInt32() const { + do { } while(0); + return JSVAL_TO_INT32_IMPL(data); + } + + __attribute__((always_inline)) inline + double toDouble() const { + do { } while(0); + return data.asDouble; + } + + __attribute__((always_inline)) inline + double toNumber() const { + do { } while(0); + return isDouble() ? toDouble() : double(toInt32()); + } + + __attribute__((always_inline)) inline + JSString *toString() const { + do { } while(0); + return JSVAL_TO_STRING_IMPL(data); + } + + __attribute__((always_inline)) inline + JSObject &toObject() const { + do { } while(0); + return *JSVAL_TO_OBJECT_IMPL(data); + } + + __attribute__((always_inline)) inline + JSObject *toObjectOrNull() const { + do { } while(0); + return JSVAL_TO_OBJECT_IMPL(data); + } + + __attribute__((always_inline)) inline + void *toGCThing() const { + do { } while(0); + return JSVAL_TO_GCTHING_IMPL(data); + } + + __attribute__((always_inline)) inline + bool toBoolean() const { + do { } while(0); + return JSVAL_TO_BOOLEAN_IMPL(data); + } + + __attribute__((always_inline)) inline + uint32_t payloadAsRawUint32() const { + do { } while(0); + return data.s.payload.u32; + } + + __attribute__((always_inline)) inline + uint64_t asRawBits() const { + return data.asBits; + } + + __attribute__((always_inline)) inline + JSValueType extractNonDoubleType() const { + return JSVAL_EXTRACT_NON_DOUBLE_TYPE_IMPL(data); + } +# 523 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" + __attribute__((always_inline)) inline + void setPrivate(void *ptr) { + data = PRIVATE_PTR_TO_JSVAL_IMPL(ptr); + } + + __attribute__((always_inline)) inline + void *toPrivate() const { + do { } while(0); + return JSVAL_TO_PRIVATE_PTR_IMPL(data); + } + + __attribute__((always_inline)) inline + void setPrivateUint32(uint32_t ui) { + data = PRIVATE_UINT32_TO_JSVAL_IMPL(ui); + } + + __attribute__((always_inline)) inline + uint32_t toPrivateUint32() const { + do { } while(0); + return JSVAL_TO_PRIVATE_UINT32_IMPL(data); + } + + __attribute__((always_inline)) inline + uint32_t &getPrivateUint32Ref() { + do { } while(0); + return data.s.payload.u32; + } + + + + + + + + __attribute__((always_inline)) inline + void setUnmarkedPtr(void *ptr) { + data.asPtr = ptr; + } + + __attribute__((always_inline)) inline + void *toUnmarkedPtr() const { + return data.asPtr; + } + + const size_t *payloadWord() const { + + return &data.s.payload.word; + + + + } + + const uintptr_t *payloadUIntPtr() const { + + return &data.s.payload.uintptr; + + + + } + + + + + + + + private: + + + jsval_layout data; + + private: + void staticAssertions() { + typedef int moz_static_assert8[(sizeof(JSValueType) == 1) ? 1 : -1]; + typedef int moz_static_assert9[(sizeof(JSValueTag) == 4) ? 1 : -1]; + typedef int moz_static_assert10[(sizeof(JSBool) == 4) ? 1 : -1]; + typedef int moz_static_assert11[(sizeof(JSWhyMagic) <= 4) ? 1 : -1]; + typedef int moz_static_assert12[(sizeof(Value) == 8) ? 1 : -1]; + } + + friend jsval_layout (::JSVAL_TO_IMPL)(Value); + friend Value (::IMPL_TO_JSVAL)(jsval_layout l); +}; + +inline bool +IsPoisonedValue(const Value &v) +{ + if (v.isString()) + return IsPoisonedPtr(v.toString()); + if (v.isObject()) + return IsPoisonedPtr(&v.toObject()); + return false; +} + + + +static __attribute__((always_inline)) inline Value +NullValue() +{ + Value v; + v.setNull(); + return v; +} + +static __attribute__((always_inline)) inline Value +UndefinedValue() +{ + Value v; + v.setUndefined(); + return v; +} + +static __attribute__((always_inline)) inline Value +Int32Value(int32_t i32) +{ + Value v; + v.setInt32(i32); + return v; +} + +static __attribute__((always_inline)) inline Value +DoubleValue(double dbl) +{ + Value v; + v.setDouble(dbl); + return v; +} + +static __attribute__((always_inline)) inline Value +StringValue(JSString *str) +{ + Value v; + v.setString(str); + return v; +} + +static __attribute__((always_inline)) inline Value +BooleanValue(bool boo) +{ + Value v; + v.setBoolean(boo); + return v; +} + +static __attribute__((always_inline)) inline Value +ObjectValue(JSObject &obj) +{ + Value v; + v.setObject(obj); + return v; +} + +static __attribute__((always_inline)) inline Value +MagicValue(JSWhyMagic why) +{ + Value v; + v.setMagic(why); + return v; +} + +static __attribute__((always_inline)) inline Value +NumberValue(float f) +{ + Value v; + v.setNumber(f); + return v; +} + +static __attribute__((always_inline)) inline Value +NumberValue(double dbl) +{ + Value v; + v.setNumber(dbl); + return v; +} + +static __attribute__((always_inline)) inline Value +NumberValue(int8_t i) +{ + return Int32Value(i); +} + +static __attribute__((always_inline)) inline Value +NumberValue(uint8_t i) +{ + return Int32Value(i); +} + +static __attribute__((always_inline)) inline Value +NumberValue(int16_t i) +{ + return Int32Value(i); +} + +static __attribute__((always_inline)) inline Value +NumberValue(uint16_t i) +{ + return Int32Value(i); +} + +static __attribute__((always_inline)) inline Value +NumberValue(int32_t i) +{ + return Int32Value(i); +} + +static __attribute__((always_inline)) inline Value +NumberValue(uint32_t i) +{ + Value v; + v.setNumber(i); + return v; +} + +namespace detail { + +template +class MakeNumberValue +{ + public: + template + static inline Value create(const T t) + { + Value v; + if (((int32_t)0x80000000) <= t && t <= ((int32_t)0x7fffffff)) + v.setInt32(int32_t(t)); + else + v.setDouble(double(t)); + return v; + } +}; + +template <> +class MakeNumberValue +{ + public: + template + static inline Value create(const T t) + { + Value v; + if (t <= ((int32_t)0x7fffffff)) + v.setInt32(int32_t(t)); + else + v.setDouble(double(t)); + return v; + } +}; + +} + +template +static __attribute__((always_inline)) inline Value +NumberValue(const T t) +{ + do { } while(0); + return detail::MakeNumberValue::is_signed>::create(t); +} + +static __attribute__((always_inline)) inline Value +ObjectOrNullValue(JSObject *obj) +{ + Value v; + v.setObjectOrNull(obj); + return v; +} + +static __attribute__((always_inline)) inline Value +PrivateValue(void *ptr) +{ + Value v; + v.setPrivate(ptr); + return v; +} + +static __attribute__((always_inline)) inline Value +PrivateUint32Value(uint32_t ui) +{ + Value v; + v.setPrivateUint32(ui); + return v; +} + +__attribute__((always_inline)) inline bool +SameType(const Value &lhs, const Value &rhs) +{ + return JSVAL_SAME_TYPE_IMPL(lhs.data, rhs.data); +} + +template <> struct RootMethods +{ + static Value initial() { return UndefinedValue(); } + static ThingRootKind kind() { return THING_ROOT_VALUE; } + static bool poisoned(const Value &v) { return IsPoisonedValue(v); } +}; + +template <> struct RootMethods +{ + static Value initial() { return UndefinedValue(); } + static ThingRootKind kind() { return THING_ROOT_VALUE; } + static bool poisoned(const Value &v) { return IsPoisonedValue(v); } +}; +# 864 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define CHECK_REQUEST(cx) ((void) 0) +# 875 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +inline void AssertArgumentsAreSane(JSContext *cx, const Value &v) { + +} + + +class __attribute__((visibility("default"))) AutoGCRooter { + public: + AutoGCRooter(JSContext *cx, ptrdiff_t tag); + + ~AutoGCRooter() { + do { } while(0); + *stackTop = down; + } + + + inline void trace(JSTracer *trc); + static void traceAll(JSTracer *trc); + + protected: + AutoGCRooter * const down; +# 903 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" + ptrdiff_t tag; + + enum { + JSVAL = -1, + VALARRAY = -2, + PARSER = -3, + SHAPEVECTOR = -4, + ENUMERATOR = -5, + IDARRAY = -6, + DESCRIPTORS = -7, + NAMESPACES = -8, + XML = -9, + OBJECT = -10, + ID = -11, + VALVECTOR = -12, + DESCRIPTOR = -13, + STRING = -14, + IDVECTOR = -15, + OBJVECTOR = -16, + SCRIPTVECTOR =-17, + PROPDESC = -18, + SHAPERANGE = -19, + STACKSHAPE = -20, + STACKBASESHAPE=-21, + BINDINGS = -22, + GETTERSETTER =-23, + REGEXPSTATICS=-24, + HASHABLEVALUE=-25 + }; + + private: + AutoGCRooter ** const stackTop; + + + AutoGCRooter(AutoGCRooter &ida) ; + void operator=(AutoGCRooter &ida) ; +}; + +class AutoValueRooter : private AutoGCRooter +{ + public: + explicit AutoValueRooter(JSContext *cx + ) + : AutoGCRooter(cx, JSVAL), val(NullValue()) + { + do { } while (0); + } + + AutoValueRooter(JSContext *cx, const Value &v + ) + : AutoGCRooter(cx, JSVAL), val(v) + { + do { } while (0); + } + + + + + + + + void set(Value v) { + do { } while(0); + val = v; + } + + const Value &value() const { + do { } while(0); + return val; + } + + Value *addr() { + do { } while(0); + return &val; + } + + const Value &jsval_value() const { + do { } while(0); + return val; + } + + Value *jsval_addr() { + do { } while(0); + return &val; + } + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + Value val; + +}; + +class AutoObjectRooter : private AutoGCRooter { + public: + AutoObjectRooter(JSContext *cx, JSObject *obj = __null + ) + : AutoGCRooter(cx, OBJECT), obj(obj) + { + do { } while (0); + } + + void setObject(JSObject *obj) { + this->obj = obj; + } + + JSObject * object() const { + return obj; + } + + JSObject ** addr() { + return &obj; + } + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + JSObject *obj; + +}; + +class AutoStringRooter : private AutoGCRooter { + public: + AutoStringRooter(JSContext *cx, JSString *str = __null + ) + : AutoGCRooter(cx, STRING), str(str) + { + do { } while (0); + } + + void setString(JSString *str) { + this->str = str; + } + + JSString * string() const { + return str; + } + + JSString ** addr() { + return &str; + } + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + JSString *str; + +}; + +class AutoArrayRooter : private AutoGCRooter { + public: + AutoArrayRooter(JSContext *cx, size_t len, Value *vec + ) + : AutoGCRooter(cx, len), array(vec), skip(cx, array, len) + { + do { } while (0); + do { } while(0); + } + + void changeLength(size_t newLength) { + tag = ptrdiff_t(newLength); + do { } while(0); + } + + void changeArray(Value *newArray, size_t newLength) { + changeLength(newLength); + array = newArray; + } + + Value *array; + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + + + SkipRoot skip; +}; + + +class AutoEnumStateRooter : private AutoGCRooter +{ + public: + AutoEnumStateRooter(JSContext *cx, JSObject *obj + ) + : AutoGCRooter(cx, ENUMERATOR), obj(obj), stateValue(), context(cx) + { + do { } while (0); + do { } while(0); + } + + ~AutoEnumStateRooter(); + + friend void AutoGCRooter::trace(JSTracer *trc); + + const Value &state() const { return stateValue; } + Value *addr() { return &stateValue; } + + protected: + void trace(JSTracer *trc); + + JSObject *obj; + + private: + Value stateValue; + JSContext *context; + +}; + +template +class AutoVectorRooter : protected AutoGCRooter +{ + public: + explicit AutoVectorRooter(JSContext *cx, ptrdiff_t tag + ) + : AutoGCRooter(cx, tag), vector(cx), vectorRoot(cx, &vector) + { + do { } while (0); + } + + size_t length() const { return vector.length(); } + + bool append(const T &v) { return vector.append(v); } + + + void infallibleAppend(const T &v) { vector.infallibleAppend(v); } + + void popBack() { vector.popBack(); } + T popCopy() { return vector.popCopy(); } + + bool growBy(size_t inc) { + size_t oldLength = vector.length(); + if (!vector.growByUninitialized(inc)) + return false; + makeRangeGCSafe(oldLength); + return true; + } + + bool resize(size_t newLength) { + size_t oldLength = vector.length(); + if (newLength <= oldLength) { + vector.shrinkBy(oldLength - newLength); + return true; + } + if (!vector.growByUninitialized(newLength - oldLength)) + return false; + makeRangeGCSafe(oldLength); + return true; + } + + void clear() { vector.clear(); } + + bool reserve(size_t newLength) { + return vector.reserve(newLength); + } + + T &operator[](size_t i) { return vector[i]; } + const T &operator[](size_t i) const { return vector[i]; } + + const T *begin() const { return vector.begin(); } + T *begin() { return vector.begin(); } + + const T *end() const { return vector.end(); } + T *end() { return vector.end(); } + + const T &back() const { return vector.back(); } + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + void makeRangeGCSafe(size_t oldLength) { + T *t = vector.begin() + oldLength; + for (size_t i = oldLength; i < vector.length(); ++i, ++t) + memset(t, 0, sizeof(T)); + } + + typedef js::Vector VectorImpl; + VectorImpl vector; + + + SkipRoot vectorRoot; + + +}; + +class AutoValueVector : public AutoVectorRooter +{ + public: + explicit AutoValueVector(JSContext *cx + ) + : AutoVectorRooter(cx, VALVECTOR) + { + do { } while (0); + } + + +}; + +class AutoIdVector : public AutoVectorRooter +{ + public: + explicit AutoIdVector(JSContext *cx + ) + : AutoVectorRooter(cx, IDVECTOR) + { + do { } while (0); + } + + +}; + +class AutoScriptVector : public AutoVectorRooter +{ + public: + explicit AutoScriptVector(JSContext *cx + ) + : AutoVectorRooter(cx, SCRIPTVECTOR) + { + do { } while (0); + } + + +}; + +} +# 1236 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef JS::Value jsval; + +static __attribute__((always_inline)) inline jsval_layout +JSVAL_TO_IMPL(jsval v) +{ + return v.data; +} + +static __attribute__((always_inline)) inline jsval +IMPL_TO_JSVAL(jsval_layout l) +{ + JS::Value v; + v.data = l; + return v; +} +# 1286 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef int moz_static_assert13[(sizeof(jsval_layout) == sizeof(jsval)) ? 1 : -1]; + + + + + +typedef JS::Handle JSHandleObject; +typedef JS::Handle JSHandleId; +# 1322 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef JSBool +(* JSPropertyOp)(JSContext *cx, JSHandleObject obj, JSHandleId id, jsval *vp); +# 1332 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef JSBool +(* JSStrictPropertyOp)(JSContext *cx, JSHandleObject obj, JSHandleId id, JSBool strict, jsval *vp); +# 1367 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef JSBool +(* JSNewEnumerateOp)(JSContext *cx, JSHandleObject obj, JSIterateOp enum_op, + jsval *statep, jsid *idp); + + + + + +typedef JSBool +(* JSEnumerateOp)(JSContext *cx, JSHandleObject obj); +# 1390 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef JSBool +(* JSResolveOp)(JSContext *cx, JSHandleObject obj, JSHandleId id); +# 1421 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef JSBool +(* JSNewResolveOp)(JSContext *cx, JSHandleObject obj, JSHandleId id, unsigned flags, + JSObject **objp); + + + + + +typedef JSBool +(* JSConvertOp)(JSContext *cx, JSHandleObject obj, JSType type, jsval *vp); + + + + +typedef JSType +(* JSTypeOfOp)(JSContext *cx, JSObject *obj); + +typedef struct JSFreeOp JSFreeOp; + +struct JSFreeOp { + + + + private: + JSRuntime *runtime_; + + protected: + JSFreeOp(JSRuntime *rt) + : runtime_(rt) { } + + public: + JSRuntime *runtime() const { + return runtime_; + } + +}; + + + + + + +typedef void +(* JSFinalizeOp)(JSFreeOp *fop, JSObject *obj); + + + + +typedef struct JSStringFinalizer JSStringFinalizer; + +struct JSStringFinalizer { + void (*finalize)(const JSStringFinalizer *fin, jschar *chars); +}; + + + + + + + +typedef JSBool +(* JSCheckAccessOp)(JSContext *cx, JSHandleObject obj, JSHandleId id, JSAccessMode mode, + jsval *vp); + + + + + + +typedef JSBool +(* JSHasInstanceOp)(JSContext *cx, JSHandleObject obj, const jsval *v, JSBool *bp); +# 1510 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef void +(* JSTraceOp)(JSTracer *trc, JSObject *obj); + + + + + +typedef void +(* JSTraceNamePrinter)(JSTracer *trc, char *buf, size_t bufsize); + +typedef JSBool +(* JSEqualityOp)(JSContext *cx, JSHandleObject obj, const jsval *v, JSBool *bp); + + + + + + + +typedef JSBool +(* JSNative)(JSContext *cx, unsigned argc, jsval *vp); + + + +typedef enum JSContextOp { + JSCONTEXT_NEW, + JSCONTEXT_DESTROY +} JSContextOp; +# 1552 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef JSBool +(* JSContextCallback)(JSContext *cx, unsigned contextOp); + +typedef enum JSGCStatus { + JSGC_BEGIN, + JSGC_END +} JSGCStatus; + +typedef void +(* JSGCCallback)(JSRuntime *rt, JSGCStatus status); + +typedef enum JSFinalizeStatus { + JSFINALIZE_START, + JSFINALIZE_END +} JSFinalizeStatus; + +typedef void +(* JSFinalizeCallback)(JSFreeOp *fop, JSFinalizeStatus status, JSBool isCompartment); + + + + + +typedef void +(* JSTraceDataOp)(JSTracer *trc, void *data); + +typedef JSBool +(* JSOperationCallback)(JSContext *cx); + +typedef void +(* JSErrorReporter)(JSContext *cx, const char *message, JSErrorReport *report); +# 1597 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef enum JSExnType { + JSEXN_NONE = -1, + JSEXN_ERR, + JSEXN_INTERNALERR, + JSEXN_EVALERR, + JSEXN_RANGEERR, + JSEXN_REFERENCEERR, + JSEXN_SYNTAXERR, + JSEXN_TYPEERR, + JSEXN_URIERR, + JSEXN_LIMIT +} JSExnType; + +typedef struct JSErrorFormatString { + + const char *format; + + + uint16_t argCount; + + + int16_t exnType; +} JSErrorFormatString; + +typedef const JSErrorFormatString * +(* JSErrorCallback)(void *userRef, const char *locale, + const unsigned errorNumber); +# 1633 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef JSBool +(* JSLocaleToUpperCase)(JSContext *cx, JSString *src, jsval *rval); + +typedef JSBool +(* JSLocaleToLowerCase)(JSContext *cx, JSString *src, jsval *rval); + +typedef JSBool +(* JSLocaleCompare)(JSContext *cx, JSString *src1, JSString *src2, + jsval *rval); + +typedef JSBool +(* JSLocaleToUnicode)(JSContext *cx, const char *src, jsval *rval); + + + + + +typedef void +(* JSDestroyPrincipalsOp)(JSPrincipals *principals); + +typedef JSBool +(* JSSubsumePrincipalsOp)(JSPrincipals *principals1, JSPrincipals *principals2); +# 1664 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef JSPrincipals * +(* JSObjectPrincipalsFinder)(JSObject *obj); + + + + + +typedef JSBool +(* JSCSPEvalChecker)(JSContext *cx); + + + + + +typedef JSBool +(* JSPushContextPrincipalOp)(JSContext *cx, JSPrincipals *principals); + +typedef JSBool +(* JSPopContextPrincipalOp)(JSContext *cx); + + + + + + +typedef JSObject * +(* JSWrapObjectCallback)(JSContext *cx, JSObject *obj, JSObject *proto, JSObject *parent, + unsigned flags); + + + + + + +typedef JSObject * +(* JSPreWrapCallback)(JSContext *cx, JSObject *scope, JSObject *obj, unsigned flags); +# 1711 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef JSObject * +(* JSSameCompartmentWrapObjectCallback)(JSContext *cx, JSObject *obj); + +typedef void +(* JSDestroyCompartmentCallback)(JSFreeOp *fop, JSCompartment *compartment); +# 1726 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef JSObject *(*ReadStructuredCloneOp)(JSContext *cx, JSStructuredCloneReader *r, + uint32_t tag, uint32_t data, void *closure); +# 1740 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef JSBool (*WriteStructuredCloneOp)(JSContext *cx, JSStructuredCloneWriter *w, + JSObject *obj, void *closure); + + + + + + +typedef void (*StructuredCloneErrorOp)(JSContext *cx, uint32_t errorid); + + + +extern "C" { +# 1769 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) const jsval JSVAL_NULL; +extern __attribute__((visibility("default"))) const jsval JSVAL_ZERO; +extern __attribute__((visibility("default"))) const jsval JSVAL_ONE; +extern __attribute__((visibility("default"))) const jsval JSVAL_FALSE; +extern __attribute__((visibility("default"))) const jsval JSVAL_TRUE; +extern __attribute__((visibility("default"))) const jsval JSVAL_VOID; + + + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_NULL(jsval v) +{ + return JSVAL_IS_NULL_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_VOID(jsval v) +{ + return JSVAL_IS_UNDEFINED_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_INT(jsval v) +{ + return JSVAL_IS_INT32_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline int32_t +JSVAL_TO_INT(jsval v) +{ + do { } while(0); + return JSVAL_TO_INT32_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline jsval +INT_TO_JSVAL(int32_t i) +{ + return IMPL_TO_JSVAL(INT32_TO_JSVAL_IMPL(i)); +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_DOUBLE(jsval v) +{ + return JSVAL_IS_DOUBLE_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline double +JSVAL_TO_DOUBLE(jsval v) +{ + jsval_layout l; + do { } while(0); + l = JSVAL_TO_IMPL(v); + return l.asDouble; +} + +static __attribute__((always_inline)) inline jsval +DOUBLE_TO_JSVAL(double d) +{ + + + + + jsval_layout l; + if ((__builtin_expect((d != d), 0))) { + l.asBits = 0x7FF8000000000000LL; + } else { + l.asDouble = d; + } + return IMPL_TO_JSVAL(l); +} + +static __attribute__((always_inline)) inline jsval +UINT_TO_JSVAL(uint32_t i) +{ + if (i <= ((int32_t)0x7fffffff)) + return INT_TO_JSVAL((int32_t)i); + return DOUBLE_TO_JSVAL((double)i); +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_NUMBER(jsval v) +{ + return JSVAL_IS_NUMBER_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_STRING(jsval v) +{ + return JSVAL_IS_STRING_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline JSString * +JSVAL_TO_STRING(jsval v) +{ + do { } while(0); + return JSVAL_TO_STRING_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline jsval +STRING_TO_JSVAL(JSString *str) +{ + return IMPL_TO_JSVAL(STRING_TO_JSVAL_IMPL(str)); +} + +static __attribute__((always_inline)) inline JSObject * +JSVAL_TO_OBJECT(jsval v) +{ + do { } while(0); + return JSVAL_TO_OBJECT_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline jsval +OBJECT_TO_JSVAL(JSObject *obj) +{ + if (obj) + return IMPL_TO_JSVAL(OBJECT_TO_JSVAL_IMPL(obj)); + return JSVAL_NULL; +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_BOOLEAN(jsval v) +{ + return JSVAL_IS_BOOLEAN_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_TO_BOOLEAN(jsval v) +{ + do { } while(0); + return JSVAL_TO_BOOLEAN_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline jsval +BOOLEAN_TO_JSVAL(JSBool b) +{ + return IMPL_TO_JSVAL(BOOLEAN_TO_JSVAL_IMPL(b)); +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_PRIMITIVE(jsval v) +{ + return JSVAL_IS_PRIMITIVE_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_GCTHING(jsval v) +{ + return JSVAL_IS_GCTHING_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline void * +JSVAL_TO_GCTHING(jsval v) +{ + do { } while(0); + return JSVAL_TO_GCTHING_IMPL(JSVAL_TO_IMPL(v)); +} + + + +static __attribute__((always_inline)) inline jsval +PRIVATE_TO_JSVAL(void *ptr) +{ + return IMPL_TO_JSVAL(PRIVATE_PTR_TO_JSVAL_IMPL(ptr)); +} + +static __attribute__((always_inline)) inline void * +JSVAL_TO_PRIVATE(jsval v) +{ + do { } while(0); + return JSVAL_TO_PRIVATE_PTR_IMPL(JSVAL_TO_IMPL(v)); +} +# 1955 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JSID_TYPE_STRING 0x0 +#define JSID_TYPE_INT 0x1 +#define JSID_TYPE_VOID 0x2 +#define JSID_TYPE_OBJECT 0x4 +#define JSID_TYPE_DEFAULT_XML_NAMESPACE 0x6 +#define JSID_TYPE_MASK 0x7 + + + + + +#define id iden + +static __attribute__((always_inline)) inline JSBool +JSID_IS_STRING(jsid iden) +{ + return ((iden) & 0x7) == 0; +} + +static __attribute__((always_inline)) inline JSString * +JSID_TO_STRING(jsid iden) +{ + do { } while(0); + return (JSString *)(iden); +} + +static __attribute__((always_inline)) inline JSBool +JSID_IS_ZERO(jsid iden) +{ + return (iden) == 0; +} + +__attribute__((visibility("default"))) JSBool +JS_StringHasBeenInterned(JSContext *cx, JSString *str); +# 1997 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +__attribute__((visibility("default"))) jsid +INTERNED_STRING_TO_JSID(JSContext *cx, JSString *str); + +static __attribute__((always_inline)) inline JSBool +JSID_IS_INT(jsid iden) +{ + return !!((iden) & 0x1); +} + +static __attribute__((always_inline)) inline int32_t +JSID_TO_INT(jsid iden) +{ + do { } while(0); + return ((uint32_t)(iden)) >> 1; +} + +#define JSID_INT_MIN 0 +#define JSID_INT_MAX INT32_MAX + +static __attribute__((always_inline)) inline JSBool +INT_FITS_IN_JSID(int32_t i) +{ + return i >= 0; +} + +static __attribute__((always_inline)) inline jsid +INT_TO_JSID(int32_t i) +{ + jsid iden; + do { } while(0); + (iden) = ((i << 1) | 0x1); + return iden; +} + +static __attribute__((always_inline)) inline JSBool +JSID_IS_OBJECT(jsid iden) +{ + return ((iden) & 0x7) == 0x4 && + (size_t)(iden) != 0x4; +} + +static __attribute__((always_inline)) inline JSObject * +JSID_TO_OBJECT(jsid iden) +{ + do { } while(0); + return (JSObject *)((iden) & ~(size_t)0x7); +} + +static __attribute__((always_inline)) inline jsid +OBJECT_TO_JSID(JSObject *obj) +{ + jsid iden; + do { } while(0); + do { } while(0); + (iden) = ((size_t)obj | 0x4); + return iden; +} + +static __attribute__((always_inline)) inline JSBool +JSID_IS_GCTHING(jsid iden) +{ + return JSID_IS_STRING(iden) || JSID_IS_OBJECT(iden); +} + +static __attribute__((always_inline)) inline void * +JSID_TO_GCTHING(jsid iden) +{ + return (void *)((iden) & ~(size_t)0x7); +} + + + + + + +static __attribute__((always_inline)) inline JSBool +JSID_IS_DEFAULT_XML_NAMESPACE(jsid iden) +{ + do { } while (0) + ; + return ((size_t)(iden) == 0x6); +} + + + + +#define JS_DEFAULT_XML_NAMESPACE_ID ((jsid)JSID_TYPE_DEFAULT_XML_NAMESPACE) +# 2093 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +static __attribute__((always_inline)) inline JSBool +JSID_IS_VOID(jsid iden) +{ + do { } while (0) + ; + return ((size_t)(iden) == 0x2); +} + +static __attribute__((always_inline)) inline JSBool +JSID_IS_EMPTY(jsid iden) +{ + return ((size_t)(iden) == 0x4); +} + +#undef id + + + + + +#define JSID_VOID ((jsid)JSID_TYPE_VOID) +#define JSID_EMPTY ((jsid)JSID_TYPE_OBJECT) + + + + + + +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_UNIVERSAL(jsval v) +{ + return !JSVAL_IS_GCTHING(v); +} + + + +namespace JS { + +class AutoIdRooter : private AutoGCRooter +{ + public: + explicit AutoIdRooter(JSContext *cx, jsid id = INT_TO_JSID(0) + ) + : AutoGCRooter(cx, ID), id_(id) + { + do { } while (0); + } + + jsid id() { + return id_; + } + + jsid * addr() { + return &id_; + } + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + jsid id_; + +}; + +} + + + + + + +#define JSVAL_LOCK(cx,v) (JSVAL_IS_GCTHING(v) ? JS_LockGCThing(cx, JSVAL_TO_GCTHING(v)) : JS_TRUE) + + +#define JSVAL_UNLOCK(cx,v) (JSVAL_IS_GCTHING(v) ? JS_UnlockGCThing(cx, JSVAL_TO_GCTHING(v)) : JS_TRUE) + + + + +#define JSPROP_ENUMERATE 0x01 +#define JSPROP_READONLY 0x02 + + + +#define JSPROP_PERMANENT 0x04 +#define JSPROP_GETTER 0x10 +#define JSPROP_SETTER 0x20 +#define JSPROP_SHARED 0x40 + + + + +#define JSPROP_INDEX 0x80 +#define JSPROP_SHORTID 0x100 + +#define JSPROP_NATIVE_ACCESSORS 0x08 + + + +#define JSFUN_LAMBDA 0x08 +#define JSFUN_HEAVYWEIGHT 0x80 + +#define JSFUN_HEAVYWEIGHT_TEST(f) ((f) & JSFUN_HEAVYWEIGHT) + +#define JSFUN_HAS_REST 0x0100 +#define JSFUN_CONSTRUCTOR 0x0200 + +#define JSFUN_HAS_DEFAULTS 0x0400 + + +#define JSFUN_FLAGS_MASK 0x07f8 + + + +#define JSFUN_STUB_GSOPS 0x1000 +# 2221 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JSFUN_GENERIC_NATIVE JSFUN_LAMBDA +# 2231 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_CallOnce(JSCallOnceType *once, JSInitCallback func); + + +extern __attribute__((visibility("default"))) int64_t +JS_Now(void); + + +extern __attribute__((visibility("default"))) jsval +JS_GetNaNValue(JSContext *cx); + +extern __attribute__((visibility("default"))) jsval +JS_GetNegativeInfinityValue(JSContext *cx); + +extern __attribute__((visibility("default"))) jsval +JS_GetPositiveInfinityValue(JSContext *cx); + +extern __attribute__((visibility("default"))) jsval +JS_GetEmptyStringValue(JSContext *cx); + +extern __attribute__((visibility("default"))) JSString * +JS_GetEmptyString(JSRuntime *rt); +# 2286 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_ConvertArguments(JSContext *cx, unsigned argc, jsval *argv, const char *format, + ...); +# 2346 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_ConvertValue(JSContext *cx, jsval v, JSType type, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_ValueToObject(JSContext *cx, jsval v, JSObject **objp); + +extern __attribute__((visibility("default"))) JSFunction * +JS_ValueToFunction(JSContext *cx, jsval v); + +extern __attribute__((visibility("default"))) JSFunction * +JS_ValueToConstructor(JSContext *cx, jsval v); + +extern __attribute__((visibility("default"))) JSString * +JS_ValueToString(JSContext *cx, jsval v); + +extern __attribute__((visibility("default"))) JSString * +JS_ValueToSource(JSContext *cx, jsval v); + +extern __attribute__((visibility("default"))) JSBool +JS_ValueToNumber(JSContext *cx, jsval v, double *dp); + + +namespace js { + + + +extern __attribute__((visibility("default"))) bool +ToNumberSlow(JSContext *cx, JS::Value v, double *dp); +} + +namespace JS { + + +__attribute__((always_inline)) inline bool +ToNumber(JSContext *cx, const Value &v, double *out) +{ + AssertArgumentsAreSane(cx, v); + + if (v.isNumber()) { + *out = v.toNumber(); + MaybeCheckStackRoots(cx); + return true; + } + return js::ToNumberSlow(cx, v, out); +} + +} + + +extern __attribute__((visibility("default"))) JSBool +JS_DoubleIsInt32(double d, int32_t *ip); + +extern __attribute__((visibility("default"))) int32_t +JS_DoubleToInt32(double d); + +extern __attribute__((visibility("default"))) uint32_t +JS_DoubleToUint32(double d); + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_ValueToECMAInt32(JSContext *cx, jsval v, int32_t *ip); + + +namespace js { + + + +extern __attribute__((visibility("default"))) bool +ToInt32Slow(JSContext *cx, const JS::Value &v, int32_t *out); +} + +namespace JS { + +__attribute__((always_inline)) inline bool +ToInt32(JSContext *cx, const js::Value &v, int32_t *out) +{ + AssertArgumentsAreSane(cx, v); + if (v.isInt32()) { + *out = v.toInt32(); + return true; + } + return js::ToInt32Slow(cx, v, out); +} + +} + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_ValueToECMAUint32(JSContext *cx, jsval v, uint32_t *ip); + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_ValueToInt32(JSContext *cx, jsval v, int32_t *ip); + + + + +extern __attribute__((visibility("default"))) JSBool +JS_ValueToUint16(JSContext *cx, jsval v, uint16_t *ip); + +extern __attribute__((visibility("default"))) JSBool +JS_ValueToBoolean(JSContext *cx, jsval v, JSBool *bp); + +extern __attribute__((visibility("default"))) JSType +JS_TypeOfValue(JSContext *cx, jsval v); + +extern __attribute__((visibility("default"))) const char * +JS_GetTypeName(JSContext *cx, JSType type); + +extern __attribute__((visibility("default"))) JSBool +JS_StrictlyEqual(JSContext *cx, jsval v1, jsval v2, JSBool *equal); + +extern __attribute__((visibility("default"))) JSBool +JS_LooselyEqual(JSContext *cx, jsval v1, jsval v2, JSBool *equal); + +extern __attribute__((visibility("default"))) JSBool +JS_SameValue(JSContext *cx, jsval v1, jsval v2, JSBool *same); + + +extern __attribute__((visibility("default"))) JSBool +JS_IsBuiltinEvalFunction(JSFunction *fun); + + +extern __attribute__((visibility("default"))) JSBool +JS_IsBuiltinFunctionConstructor(JSFunction *fun); +# 2492 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JS_NewRuntime JS_Init +#define JS_DestroyRuntime JS_Finish +#define JS_LockRuntime JS_Lock +#define JS_UnlockRuntime JS_Unlock + +extern __attribute__((visibility("default"))) JSRuntime * +JS_Init(uint32_t maxbytes); + + +#define JS_CommenceRuntimeShutDown(rt) ((void) 0) + +extern __attribute__((visibility("default"))) void +JS_Finish(JSRuntime *rt); + +extern __attribute__((visibility("default"))) void +JS_ShutDown(void); + +__attribute__((visibility("default"))) void * +JS_GetRuntimePrivate(JSRuntime *rt); + +extern __attribute__((visibility("default"))) JSRuntime * +JS_GetRuntime(JSContext *cx); + +__attribute__((visibility("default"))) void +JS_SetRuntimePrivate(JSRuntime *rt, void *data); + +extern __attribute__((visibility("default"))) void +JS_BeginRequest(JSContext *cx); + +extern __attribute__((visibility("default"))) void +JS_EndRequest(JSContext *cx); + + +extern __attribute__((visibility("default"))) void +JS_YieldRequest(JSContext *cx); + +extern __attribute__((visibility("default"))) unsigned +JS_SuspendRequest(JSContext *cx); + +extern __attribute__((visibility("default"))) void +JS_ResumeRequest(JSContext *cx, unsigned saveDepth); + +extern __attribute__((visibility("default"))) JSBool +JS_IsInRequest(JSRuntime *rt); + +extern __attribute__((visibility("default"))) JSBool +JS_IsInSuspendedRequest(JSRuntime *rt); + + +} + +namespace JS { + +inline bool +IsPoisonedId(jsid iden) +{ + if (JSID_IS_STRING(iden)) + return JS::IsPoisonedPtr(JSID_TO_STRING(iden)); + if (JSID_IS_OBJECT(iden)) + return JS::IsPoisonedPtr(JSID_TO_OBJECT(iden)); + return false; +} + +template <> struct RootMethods +{ + static jsid initial() { return ((jsid)0x2); } + static ThingRootKind kind() { return THING_ROOT_ID; } + static bool poisoned(jsid id) { return IsPoisonedId(id); } +}; + +template <> struct RootMethods +{ + static jsid initial() { return ((jsid)0x2); } + static ThingRootKind kind() { return THING_ROOT_ID; } + static bool poisoned(jsid id) { return IsPoisonedId(id); } +}; + +} + +class JSAutoRequest { + public: + JSAutoRequest(JSContext *cx ) + : mContext(cx), mSaveDepth(0) { + do { } while (0); + JS_BeginRequest(mContext); + } + ~JSAutoRequest() { + JS_EndRequest(mContext); + } + + void suspend() { + mSaveDepth = JS_SuspendRequest(mContext); + } + void resume() { + JS_ResumeRequest(mContext, mSaveDepth); + } + + protected: + JSContext *mContext; + unsigned mSaveDepth; + + + + + + + +}; + +class JSAutoSuspendRequest { + public: + JSAutoSuspendRequest(JSContext *cx ) + : mContext(cx), mSaveDepth(0) { + do { } while (0); + if (mContext) { + mSaveDepth = JS_SuspendRequest(mContext); + } + } + ~JSAutoSuspendRequest() { + resume(); + } + + void resume() { + if (mContext) { + JS_ResumeRequest(mContext, mSaveDepth); + mContext = 0; + } + } + + protected: + JSContext *mContext; + unsigned mSaveDepth; + + + + + + + +}; + +class JSAutoCheckRequest { + public: + JSAutoCheckRequest(JSContext *cx ) { + + + + + do { } while (0); + } + + ~JSAutoCheckRequest() { + + + + } + + + private: + + + + +}; + +extern "C" { + + +extern __attribute__((visibility("default"))) JSContextCallback +JS_SetContextCallback(JSRuntime *rt, JSContextCallback cxCallback); + +extern __attribute__((visibility("default"))) JSContext * +JS_NewContext(JSRuntime *rt, size_t stackChunkSize); + +extern __attribute__((visibility("default"))) void +JS_DestroyContext(JSContext *cx); + +extern __attribute__((visibility("default"))) void +JS_DestroyContextNoGC(JSContext *cx); + +extern __attribute__((visibility("default"))) void * +JS_GetContextPrivate(JSContext *cx); + +extern __attribute__((visibility("default"))) void +JS_SetContextPrivate(JSContext *cx, void *data); + +extern __attribute__((visibility("default"))) void * +JS_GetSecondContextPrivate(JSContext *cx); + +extern __attribute__((visibility("default"))) void +JS_SetSecondContextPrivate(JSContext *cx, void *data); + +extern __attribute__((visibility("default"))) JSRuntime * +JS_GetRuntime(JSContext *cx); + +extern __attribute__((visibility("default"))) JSContext * +JS_ContextIterator(JSRuntime *rt, JSContext **iterp); + +extern __attribute__((visibility("default"))) JSVersion +JS_GetVersion(JSContext *cx); + +extern __attribute__((visibility("default"))) JSVersion +JS_SetVersion(JSContext *cx, JSVersion version); + +extern __attribute__((visibility("default"))) const char * +JS_VersionToString(JSVersion version); + +extern __attribute__((visibility("default"))) JSVersion +JS_StringToVersion(const char *string); +# 2709 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JSOPTION_STRICT JS_BIT(0) +#define JSOPTION_WERROR JS_BIT(1) +#define JSOPTION_VAROBJFIX JS_BIT(2) + + + +#define JSOPTION_PRIVATE_IS_NSISUPPORTS JS_BIT(3) + + +#define JSOPTION_COMPILE_N_GO JS_BIT(4) + + + + +#define JSOPTION_ATLINE JS_BIT(5) + + + +#define JSOPTION_ALLOW_XML JS_BIT(6) + + + +#define JSOPTION_MOAR_XML JS_BIT(7) + + + + + +#define JSOPTION_DONT_REPORT_UNCAUGHT JS_BIT(8) + + + + + + +#define JSOPTION_RELIMIT JS_BIT(9) +# 2753 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JSOPTION_NO_SCRIPT_RVAL JS_BIT(12) + + + +#define JSOPTION_UNROOTED_GLOBAL JS_BIT(13) + + + + + +#define JSOPTION_METHODJIT JS_BIT(14) + + + +#define JSOPTION_METHODJIT_ALWAYS JS_BIT(16) + + +#define JSOPTION_PCCOUNT JS_BIT(17) + +#define JSOPTION_TYPE_INFERENCE JS_BIT(18) +#define JSOPTION_STRICT_MODE JS_BIT(19) + + + + + +#define JSCOMPILEOPTION_MASK (JSOPTION_ALLOW_XML | JSOPTION_MOAR_XML) + +#define JSRUNOPTION_MASK (JS_BITMASK(20) & ~JSCOMPILEOPTION_MASK) +#define JSALLOPTION_MASK (JSCOMPILEOPTION_MASK | JSRUNOPTION_MASK) + +extern __attribute__((visibility("default"))) uint32_t +JS_GetOptions(JSContext *cx); + +extern __attribute__((visibility("default"))) uint32_t +JS_SetOptions(JSContext *cx, uint32_t options); + +extern __attribute__((visibility("default"))) uint32_t +JS_ToggleOptions(JSContext *cx, uint32_t options); + +extern __attribute__((visibility("default"))) void +JS_SetJitHardening(JSRuntime *rt, JSBool enabled); + +extern __attribute__((visibility("default"))) const char * +JS_GetImplementationVersion(void); + +extern __attribute__((visibility("default"))) void +JS_SetDestroyCompartmentCallback(JSRuntime *rt, JSDestroyCompartmentCallback callback); + +extern __attribute__((visibility("default"))) JSWrapObjectCallback +JS_SetWrapObjectCallbacks(JSRuntime *rt, + JSWrapObjectCallback callback, + JSSameCompartmentWrapObjectCallback sccallback, + JSPreWrapCallback precallback); + +extern __attribute__((visibility("default"))) JSCrossCompartmentCall * +JS_EnterCrossCompartmentCall(JSContext *cx, JSObject *target); + +extern __attribute__((visibility("default"))) void +JS_LeaveCrossCompartmentCall(JSCrossCompartmentCall *call); + +extern __attribute__((visibility("default"))) void +JS_SetCompartmentPrivate(JSCompartment *compartment, void *data); + +extern __attribute__((visibility("default"))) void * +JS_GetCompartmentPrivate(JSCompartment *compartment); + +extern __attribute__((visibility("default"))) JSBool +JS_WrapObject(JSContext *cx, JSObject **objp); + +extern __attribute__((visibility("default"))) JSBool +JS_WrapValue(JSContext *cx, jsval *vp); + +extern __attribute__((visibility("default"))) JSObject * +JS_TransplantObject(JSContext *cx, JSObject *origobj, JSObject *target); + +extern __attribute__((visibility("default"))) JSObject * +js_TransplantObjectWithWrapper(JSContext *cx, + JSObject *origobj, + JSObject *origwrapper, + JSObject *targetobj, + JSObject *targetwrapper); + +extern __attribute__((visibility("default"))) JSBool +JS_RefreshCrossCompartmentWrappers(JSContext *cx, JSObject *ob); + + +} + +namespace js { +class AutoCompartment; +} + +class __attribute__((visibility("default"))) JSAutoEnterCompartment +{ +# 2856 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" + void* bytes[sizeof(void*) == 4 && mozilla::AlignmentFinder::alignment == 8 ? 16 : 13]; + + protected: + js::AutoCompartment *getAutoCompartment() { + do { } while(0); + return reinterpret_cast(bytes); + } +# 2872 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" + enum State { + STATE_UNENTERED, + STATE_SAME_COMPARTMENT, + STATE_OTHER_COMPARTMENT + } state; + + public: + JSAutoEnterCompartment() : state(STATE_UNENTERED) {} + + bool enter(JSContext *cx, JSObject *target); + + void enterAndIgnoreErrors(JSContext *cx, JSObject *target); + + bool entered() const { return state != STATE_UNENTERED; } + + ~JSAutoEnterCompartment(); +}; + +extern "C" { + + +typedef void (*JSIterateCompartmentCallback)(JSRuntime *rt, void *data, JSCompartment *compartment); + + + + + + +extern __attribute__((visibility("default"))) void +JS_IterateCompartments(JSRuntime *rt, void *data, + JSIterateCompartmentCallback compartmentCallback); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetGlobalObject(JSContext *cx); + +extern __attribute__((visibility("default"))) void +JS_SetGlobalObject(JSContext *cx, JSObject *obj); +# 2917 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_InitStandardClasses(JSContext *cx, JSObject *obj); +# 2933 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_ResolveStandardClass(JSContext *cx, JSObject *obj, jsid id, + JSBool *resolved); + +extern __attribute__((visibility("default"))) JSBool +JS_EnumerateStandardClasses(JSContext *cx, JSObject *obj); + + + + + + +extern __attribute__((visibility("default"))) JSIdArray * +JS_EnumerateResolvedStandardClasses(JSContext *cx, JSObject *obj, + JSIdArray *ida); + +extern __attribute__((visibility("default"))) JSBool +JS_GetClassObject(JSContext *cx, JSObject *obj, JSProtoKey key, + JSObject **objp); + +extern __attribute__((visibility("default"))) JSBool +JS_GetClassPrototype(JSContext *cx, JSProtoKey key, JSObject **objp); + +extern __attribute__((visibility("default"))) JSProtoKey +JS_IdentifyClassPrototype(JSContext *cx, JSObject *obj); + + + + + +extern __attribute__((visibility("default"))) JSObject * +JS_GetFunctionPrototype(JSContext *cx, JSObject *forObj); + + + + + +extern __attribute__((visibility("default"))) JSObject * +JS_GetObjectPrototype(JSContext *cx, JSObject *forObj); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetGlobalForObject(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetGlobalForScopeChain(JSContext *cx); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetScriptedGlobal(JSContext *cx); + + + + +extern __attribute__((visibility("default"))) JSObject * +JS_InitReflect(JSContext *cx, JSObject *global); + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_InitCTypesClass(JSContext *cx, JSObject *global); + + + + + + +typedef char * +(* JSCTypesUnicodeToNativeFun)(JSContext *cx, const jschar *source, size_t slen); + + + + + + +struct JSCTypesCallbacks { + JSCTypesUnicodeToNativeFun unicodeToNative; +}; + +typedef struct JSCTypesCallbacks JSCTypesCallbacks; + + + + + + + +extern __attribute__((visibility("default"))) void +JS_SetCTypesCallbacks(JSObject *ctypesObj, JSCTypesCallbacks *callbacks); + + +typedef JSBool +(* JSEnumerateDiagnosticMemoryCallback)(void *ptr, size_t length); + + + + + +extern __attribute__((visibility("default"))) void +JS_EnumerateDiagnosticMemoryRegions(JSEnumerateDiagnosticMemoryCallback callback); +# 3063 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JS_CALLEE(cx,vp) ((vp)[0]) +#define JS_THIS(cx,vp) JS_ComputeThis(cx, vp) +#define JS_THIS_OBJECT(cx,vp) (JSVAL_TO_OBJECT(JS_THIS(cx,vp))) +#define JS_ARGV(cx,vp) ((vp) + 2) +#define JS_RVAL(cx,vp) (*(vp)) +#define JS_SET_RVAL(cx,vp,v) (*(vp) = (v)) + +extern __attribute__((visibility("default"))) jsval +JS_ComputeThis(JSContext *cx, jsval *vp); + + +#undef JS_THIS +static inline jsval +JS_THIS(JSContext *cx, jsval *vp) +{ + return JSVAL_IS_PRIMITIVE(vp[1]) ? JS_ComputeThis(cx, vp) : vp[1]; +} +# 3094 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JS_THIS_VALUE(cx,vp) ((vp)[1]) + +extern __attribute__((visibility("default"))) void +JS_MallocInCompartment(JSCompartment *comp, size_t nbytes); + +extern __attribute__((visibility("default"))) void +JS_FreeInCompartment(JSCompartment *comp, size_t nbytes); + +extern __attribute__((visibility("default"))) void * +JS_malloc(JSContext *cx, size_t nbytes); + +extern __attribute__((visibility("default"))) void * +JS_realloc(JSContext *cx, void *p, size_t nbytes); + + + + + +extern __attribute__((visibility("default"))) void +JS_free(JSContext *cx, void *p); + + + + + +extern __attribute__((visibility("default"))) void +JS_freeop(JSFreeOp *fop, void *p); + +extern __attribute__((visibility("default"))) JSFreeOp * +JS_GetDefaultFreeOp(JSRuntime *rt); + +extern __attribute__((visibility("default"))) void +JS_updateMallocCounter(JSContext *cx, size_t nbytes); + +extern __attribute__((visibility("default"))) char * +JS_strdup(JSContext *cx, const char *s); + +extern __attribute__((visibility("default"))) JSBool +JS_NewNumberValue(JSContext *cx, double d, jsval *rval); +# 3159 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_AddValueRoot(JSContext *cx, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_AddStringRoot(JSContext *cx, JSString **rp); + +extern __attribute__((visibility("default"))) JSBool +JS_AddObjectRoot(JSContext *cx, JSObject **rp); + +extern __attribute__((visibility("default"))) JSBool +JS_AddGCThingRoot(JSContext *cx, void **rp); +# 3180 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_AddNamedValueRoot(JSContext *cx, jsval *vp, const char *name); + +extern __attribute__((visibility("default"))) JSBool +JS_AddNamedStringRoot(JSContext *cx, JSString **rp, const char *name); + +extern __attribute__((visibility("default"))) JSBool +JS_AddNamedObjectRoot(JSContext *cx, JSObject **rp, const char *name); + +extern __attribute__((visibility("default"))) JSBool +JS_AddNamedScriptRoot(JSContext *cx, JSScript **rp, const char *name); + +extern __attribute__((visibility("default"))) JSBool +JS_AddNamedGCThingRoot(JSContext *cx, void **rp, const char *name); + +extern __attribute__((visibility("default"))) void +JS_RemoveValueRoot(JSContext *cx, jsval *vp); + +extern __attribute__((visibility("default"))) void +JS_RemoveStringRoot(JSContext *cx, JSString **rp); + +extern __attribute__((visibility("default"))) void +JS_RemoveObjectRoot(JSContext *cx, JSObject **rp); + +extern __attribute__((visibility("default"))) void +JS_RemoveScriptRoot(JSContext *cx, JSScript **rp); + +extern __attribute__((visibility("default"))) void +JS_RemoveGCThingRoot(JSContext *cx, void **rp); + +extern __attribute__((visibility("default"))) void +JS_RemoveValueRootRT(JSRuntime *rt, jsval *vp); + +extern __attribute__((visibility("default"))) void +JS_RemoveStringRootRT(JSRuntime *rt, JSString **rp); + +extern __attribute__((visibility("default"))) void +JS_RemoveObjectRootRT(JSRuntime *rt, JSObject **rp); + +extern __attribute__((visibility("default"))) void +JS_RemoveScriptRootRT(JSRuntime *rt, JSScript **rp); + + + +extern __attribute__((visibility("default"))) JSBool +js_AddRootRT(JSRuntime *rt, jsval *vp, const char *name); + +extern __attribute__((visibility("default"))) JSBool +js_AddGCThingRootRT(JSRuntime *rt, void **rp, const char *name); + +extern __attribute__((visibility("default"))) void +js_RemoveRoot(JSRuntime *rt, void *rp); + + + + + +extern __attribute__((noinline)) __attribute__((visibility("default"))) void +JS_AnchorPtr(void *p); + + + + + +#define JS_TYPED_ROOTING_API + + +#define JS_EnterLocalRootScope(cx) (JS_TRUE) +#define JS_LeaveLocalRootScope(cx) ((void) 0) +#define JS_LeaveLocalRootScopeWithResult(cx,rval) ((void) 0) +#define JS_ForgetLocalRoot(cx,thing) ((void) 0) + +typedef enum JSGCRootType { + JS_GC_ROOT_VALUE_PTR, + JS_GC_ROOT_GCTHING_PTR +} JSGCRootType; +# 3280 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JS_MAP_GCROOT_NEXT 0 +#define JS_MAP_GCROOT_STOP 1 +#define JS_MAP_GCROOT_REMOVE 2 + +typedef int +(* JSGCRootMapFun)(void *rp, JSGCRootType type, const char *name, void *data); + +extern __attribute__((visibility("default"))) uint32_t +JS_MapGCRoots(JSRuntime *rt, JSGCRootMapFun map, void *data); + +extern __attribute__((visibility("default"))) JSBool +JS_LockGCThing(JSContext *cx, void *thing); + +extern __attribute__((visibility("default"))) JSBool +JS_LockGCThingRT(JSRuntime *rt, void *thing); + +extern __attribute__((visibility("default"))) JSBool +JS_UnlockGCThing(JSContext *cx, void *thing); + +extern __attribute__((visibility("default"))) JSBool +JS_UnlockGCThingRT(JSRuntime *rt, void *thing); +# 3309 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) void +JS_SetExtraGCRootsTracer(JSRuntime *rt, JSTraceDataOp traceOp, void *data); +# 3325 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +static __attribute__((always_inline)) inline JSBool +JSVAL_IS_TRACEABLE(jsval v) +{ + return JSVAL_IS_TRACEABLE_IMPL(JSVAL_TO_IMPL(v)); +} + +static __attribute__((always_inline)) inline void * +JSVAL_TO_TRACEABLE(jsval v) +{ + return JSVAL_TO_GCTHING(v); +} + +static __attribute__((always_inline)) inline JSGCTraceKind +JSVAL_TRACE_KIND(jsval v) +{ + do { } while(0); + return (JSGCTraceKind) JSVAL_TRACE_KIND_IMPL(JSVAL_TO_IMPL(v)); +} +# 3360 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +typedef void +(* JSTraceCallback)(JSTracer *trc, void **thingp, JSGCTraceKind kind); + +struct JSTracer { + JSRuntime *runtime; + JSTraceCallback callback; + JSTraceNamePrinter debugPrinter; + const void *debugPrintArg; + size_t debugPrintIndex; + JSBool eagerlyTraceWeakMaps; + + + +}; + + + + + + + +extern __attribute__((visibility("default"))) void +JS_CallTracer(JSTracer *trc, void *thing, JSGCTraceKind kind); +# 3400 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JS_SET_TRACING_DETAILS(trc,printer,arg,index) JS_BEGIN_MACRO (trc)->debugPrinter = (printer); (trc)->debugPrintArg = (arg); (trc)->debugPrintIndex = (index); JS_END_MACRO +# 3417 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JS_SET_TRACING_LOCATION(trc,location) JS_BEGIN_MACRO JS_END_MACRO +# 3427 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JS_SET_TRACING_INDEX(trc,name,index) JS_SET_TRACING_DETAILS(trc, NULL, name, index) + + + + + +#define JS_SET_TRACING_NAME(trc,name) JS_SET_TRACING_DETAILS(trc, NULL, name, (size_t)-1) + + + + + + +#define JS_CALL_TRACER(trc,thing,kind,name) JS_BEGIN_MACRO JS_SET_TRACING_NAME(trc, name); JS_CallTracer((trc), (thing), (kind)); JS_END_MACRO +# 3450 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JS_CALL_VALUE_TRACER(trc,val,name) JS_BEGIN_MACRO if (JSVAL_IS_TRACEABLE(val)) { JS_CALL_TRACER((trc), JSVAL_TO_GCTHING(val), JSVAL_TRACE_KIND(val), name); } JS_END_MACRO + + + + + + + +#define JS_CALL_OBJECT_TRACER(trc,object,name) JS_BEGIN_MACRO JSObject *obj_ = (object); JS_ASSERT(obj_); JS_CALL_TRACER((trc), obj_, JSTRACE_OBJECT, name); JS_END_MACRO + + + + + + +#define JS_CALL_STRING_TRACER(trc,string,name) JS_BEGIN_MACRO JSString *str_ = (string); JS_ASSERT(str_); JS_CALL_TRACER((trc), str_, JSTRACE_STRING, name); JS_END_MACRO +# 3475 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) void +JS_TracerInit(JSTracer *trc, JSRuntime *rt, JSTraceCallback callback); + +extern __attribute__((visibility("default"))) void +JS_TraceChildren(JSTracer *trc, void *thing, JSGCTraceKind kind); + +extern __attribute__((visibility("default"))) void +JS_TraceRuntime(JSTracer *trc); +# 3517 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) void +JS_GC(JSRuntime *rt); + +extern __attribute__((visibility("default"))) void +JS_MaybeGC(JSContext *cx); + +extern __attribute__((visibility("default"))) void +JS_SetGCCallback(JSRuntime *rt, JSGCCallback cb); + +extern __attribute__((visibility("default"))) void +JS_SetFinalizeCallback(JSRuntime *rt, JSFinalizeCallback cb); + +extern __attribute__((visibility("default"))) JSBool +JS_IsGCMarkingTracer(JSTracer *trc); + +extern __attribute__((visibility("default"))) JSBool +JS_IsAboutToBeFinalized(void *thing); + +typedef enum JSGCParamKey { + + JSGC_MAX_BYTES = 0, + + + JSGC_MAX_MALLOC_BYTES = 1, + + + JSGC_BYTES = 3, + + + JSGC_NUMBER = 4, + + + JSGC_MAX_CODE_CACHE_BYTES = 5, + + + JSGC_MODE = 6, + + + JSGC_UNUSED_CHUNKS = 7, + + + JSGC_TOTAL_CHUNKS = 8, + + + JSGC_SLICE_TIME_BUDGET = 9, + + + JSGC_MARK_STACK_LIMIT = 10 +} JSGCParamKey; + +typedef enum JSGCMode { + + JSGC_MODE_GLOBAL = 0, + + + JSGC_MODE_COMPARTMENT = 1, + + + + + + JSGC_MODE_INCREMENTAL = 2 +} JSGCMode; + +extern __attribute__((visibility("default"))) void +JS_SetGCParameter(JSRuntime *rt, JSGCParamKey key, uint32_t value); + +extern __attribute__((visibility("default"))) uint32_t +JS_GetGCParameter(JSRuntime *rt, JSGCParamKey key); + +extern __attribute__((visibility("default"))) void +JS_SetGCParameterForThread(JSContext *cx, JSGCParamKey key, uint32_t value); + +extern __attribute__((visibility("default"))) uint32_t +JS_GetGCParameterForThread(JSContext *cx, JSGCParamKey key); + + + + + +extern __attribute__((visibility("default"))) JSString * +JS_NewExternalString(JSContext *cx, const jschar *chars, size_t length, + const JSStringFinalizer *fin); + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_IsExternalString(JSString *str); + + + + + +extern __attribute__((visibility("default"))) const JSStringFinalizer * +JS_GetExternalStringFinalizer(JSString *str); + + + + + +extern __attribute__((visibility("default"))) void +JS_SetNativeStackQuota(JSRuntime *cx, size_t stackSize); + + + + + + +typedef void (*JSClassInternal)(); + +struct JSClass { + const char *name; + uint32_t flags; + + + JSPropertyOp addProperty; + JSPropertyOp delProperty; + JSPropertyOp getProperty; + JSStrictPropertyOp setProperty; + JSEnumerateOp enumerate; + JSResolveOp resolve; + JSConvertOp convert; + JSFinalizeOp finalize; + + + JSCheckAccessOp checkAccess; + JSNative call; + JSHasInstanceOp hasInstance; + JSNative construct; + JSTraceOp trace; + + void *reserved[40]; +}; + +#define JSCLASS_HAS_PRIVATE (1<<0) +#define JSCLASS_NEW_ENUMERATE (1<<1) +#define JSCLASS_NEW_RESOLVE (1<<2) +#define JSCLASS_PRIVATE_IS_NSISUPPORTS (1<<3) +#define JSCLASS_NEW_RESOLVE_GETS_START (1<<4) + + + +#define JSCLASS_IMPLEMENTS_BARRIERS (1<<5) + +#define JSCLASS_DOCUMENT_OBSERVER (1<<6) +#define JSCLASS_USERBIT1 (1<<7) + + + + + + +#define JSCLASS_RESERVED_SLOTS_SHIFT 8 +#define JSCLASS_RESERVED_SLOTS_WIDTH 8 +#define JSCLASS_RESERVED_SLOTS_MASK JS_BITMASK(JSCLASS_RESERVED_SLOTS_WIDTH) +#define JSCLASS_HAS_RESERVED_SLOTS(n) (((n) & JSCLASS_RESERVED_SLOTS_MASK) << JSCLASS_RESERVED_SLOTS_SHIFT) + +#define JSCLASS_RESERVED_SLOTS(clasp) (((clasp)->flags >> JSCLASS_RESERVED_SLOTS_SHIFT) & JSCLASS_RESERVED_SLOTS_MASK) + + + +#define JSCLASS_HIGH_FLAGS_SHIFT (JSCLASS_RESERVED_SLOTS_SHIFT + JSCLASS_RESERVED_SLOTS_WIDTH) + + + + + + +#define JSCLASS_FOR_OF_ITERATION (1<<(JSCLASS_HIGH_FLAGS_SHIFT+0)) + +#define JSCLASS_IS_ANONYMOUS (1<<(JSCLASS_HIGH_FLAGS_SHIFT+1)) +#define JSCLASS_IS_GLOBAL (1<<(JSCLASS_HIGH_FLAGS_SHIFT+2)) +#define JSCLASS_INTERNAL_FLAG2 (1<<(JSCLASS_HIGH_FLAGS_SHIFT+3)) +#define JSCLASS_INTERNAL_FLAG3 (1<<(JSCLASS_HIGH_FLAGS_SHIFT+4)) + + +#define JSCLASS_FREEZE_PROTO (1<<(JSCLASS_HIGH_FLAGS_SHIFT+5)) +#define JSCLASS_FREEZE_CTOR (1<<(JSCLASS_HIGH_FLAGS_SHIFT+6)) + +#define JSCLASS_XPCONNECT_GLOBAL (1<<(JSCLASS_HIGH_FLAGS_SHIFT+7)) + + +#define JSCLASS_USERBIT2 (1<<(JSCLASS_HIGH_FLAGS_SHIFT+8)) +#define JSCLASS_USERBIT3 (1<<(JSCLASS_HIGH_FLAGS_SHIFT+9)) + + + + + + + +#define JSGLOBAL_FLAGS_CLEARED 0x1 +# 3723 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JSCLASS_GLOBAL_SLOT_COUNT (JSProto_LIMIT * 3 + 8) +#define JSCLASS_GLOBAL_FLAGS_WITH_SLOTS(n) (JSCLASS_IS_GLOBAL | JSCLASS_HAS_RESERVED_SLOTS(JSCLASS_GLOBAL_SLOT_COUNT + (n))) + +#define JSCLASS_GLOBAL_FLAGS JSCLASS_GLOBAL_FLAGS_WITH_SLOTS(0) + +#define JSCLASS_HAS_GLOBAL_FLAG_AND_SLOTS(clasp) (((clasp)->flags & JSCLASS_IS_GLOBAL) && JSCLASS_RESERVED_SLOTS(clasp) >= JSCLASS_GLOBAL_SLOT_COUNT) + + + + +#define JSCLASS_CACHED_PROTO_SHIFT (JSCLASS_HIGH_FLAGS_SHIFT + 10) +#define JSCLASS_CACHED_PROTO_WIDTH 6 +#define JSCLASS_CACHED_PROTO_MASK JS_BITMASK(JSCLASS_CACHED_PROTO_WIDTH) +#define JSCLASS_HAS_CACHED_PROTO(key) (uint32_t(key) << JSCLASS_CACHED_PROTO_SHIFT) +#define JSCLASS_CACHED_PROTO_KEY(clasp) ((JSProtoKey) (((clasp)->flags >> JSCLASS_CACHED_PROTO_SHIFT) & JSCLASS_CACHED_PROTO_MASK)) + + + + + +#define JSCLASS_NO_INTERNAL_MEMBERS {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} +#define JSCLASS_NO_OPTIONAL_MEMBERS 0,0,0,0,0,JSCLASS_NO_INTERNAL_MEMBERS + +extern __attribute__((visibility("default"))) int +JS_IdArrayLength(JSContext *cx, JSIdArray *ida); + +extern __attribute__((visibility("default"))) jsid +JS_IdArrayGet(JSContext *cx, JSIdArray *ida, int index); + +extern __attribute__((visibility("default"))) void +JS_DestroyIdArray(JSContext *cx, JSIdArray *ida); + + + +namespace JS { + +class AutoIdArray : private AutoGCRooter { + public: + AutoIdArray(JSContext *cx, JSIdArray *ida ) + : AutoGCRooter(cx, IDARRAY), context(cx), idArray(ida) + { + do { } while (0); + } + ~AutoIdArray() { + if (idArray) + JS_DestroyIdArray(context, idArray); + } + bool operator!() { + return !idArray; + } + jsid operator[](size_t i) const { + do { } while(0); + do { } while(0); + return JS_IdArrayGet(context, idArray, i); + } + size_t length() const { + return JS_IdArrayLength(context, idArray); + } + + friend void AutoGCRooter::trace(JSTracer *trc); + + JSIdArray *steal() { + JSIdArray *copy = idArray; + idArray = __null; + return copy; + } + + protected: + inline void trace(JSTracer *trc); + + private: + JSContext *context; + JSIdArray *idArray; + + + + AutoIdArray(AutoIdArray &ida) ; + void operator=(AutoIdArray &ida) ; +}; + +} + + + +extern __attribute__((visibility("default"))) JSBool +JS_ValueToId(JSContext *cx, jsval v, jsid *idp); + +extern __attribute__((visibility("default"))) JSBool +JS_IdToValue(JSContext *cx, jsid id, jsval *vp); + + + + +#define JSRESOLVE_QUALIFIED 0x01 +#define JSRESOLVE_ASSIGNING 0x02 +#define JSRESOLVE_DETECTING 0x04 +#define JSRESOLVE_DECLARING 0x08 +#define JSRESOLVE_WITH 0x10 + + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_DefaultValue(JSContext *cx, JSObject *obj, JSType hint, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_PropertyStub(JSContext *cx, JSHandleObject obj, JSHandleId id, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_StrictPropertyStub(JSContext *cx, JSHandleObject obj, JSHandleId id, JSBool strict, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_EnumerateStub(JSContext *cx, JSHandleObject obj); + +extern __attribute__((visibility("default"))) JSBool +JS_ResolveStub(JSContext *cx, JSHandleObject obj, JSHandleId id); + +extern __attribute__((visibility("default"))) JSBool +JS_ConvertStub(JSContext *cx, JSHandleObject obj, JSType type, jsval *vp); + +struct JSConstDoubleSpec { + double dval; + const char *name; + uint8_t flags; + uint8_t spare[3]; +}; + + + + + + +struct JSPropertySpec { + const char *name; + int8_t tinyid; + uint8_t flags; + JSPropertyOp getter; + JSStrictPropertyOp setter; +}; + +struct JSFunctionSpec { + const char *name; + JSNative call; + uint16_t nargs; + uint16_t flags; +}; + + + + + +#define JS_FS_END JS_FS(NULL,NULL,0,0) + + + + + + +#define JS_FS(name,call,nargs,flags) {name, call, nargs, flags} + +#define JS_FN(name,call,nargs,flags) {name, call, nargs, (flags) | JSFUN_STUB_GSOPS} + + +extern __attribute__((visibility("default"))) JSObject * +JS_InitClass(JSContext *cx, JSObject *obj, JSObject *parent_proto, + JSClass *clasp, JSNative constructor, unsigned nargs, + JSPropertySpec *ps, JSFunctionSpec *fs, + JSPropertySpec *static_ps, JSFunctionSpec *static_fs); + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_LinkConstructorAndPrototype(JSContext *cx, JSObject *ctor, JSObject *proto); + +extern __attribute__((visibility("default"))) JSClass * +JS_GetClass(JSObject *obj); + +extern __attribute__((visibility("default"))) JSBool +JS_InstanceOf(JSContext *cx, JSObject *obj, JSClass *clasp, jsval *argv); + +extern __attribute__((visibility("default"))) JSBool +JS_HasInstance(JSContext *cx, JSObject *obj, jsval v, JSBool *bp); + +extern __attribute__((visibility("default"))) void * +JS_GetPrivate(JSObject *obj); + +extern __attribute__((visibility("default"))) void +JS_SetPrivate(JSObject *obj, void *data); + +extern __attribute__((visibility("default"))) void * +JS_GetInstancePrivate(JSContext *cx, JSObject *obj, JSClass *clasp, + jsval *argv); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetPrototype(JSObject *obj); + +extern __attribute__((visibility("default"))) JSBool +JS_SetPrototype(JSContext *cx, JSObject *obj, JSObject *proto); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetParent(JSObject *obj); + +extern __attribute__((visibility("default"))) JSBool +JS_SetParent(JSContext *cx, JSObject *obj, JSObject *parent); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetConstructor(JSContext *cx, JSObject *proto); + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_GetObjectId(JSContext *cx, JSObject *obj, jsid *idp); + +extern __attribute__((visibility("default"))) JSObject * +JS_NewGlobalObject(JSContext *cx, JSClass *clasp); + +extern __attribute__((visibility("default"))) JSObject * +JS_NewCompartmentAndGlobalObject(JSContext *cx, JSClass *clasp, JSPrincipals *principals); + +extern __attribute__((visibility("default"))) JSObject * +JS_NewObject(JSContext *cx, JSClass *clasp, JSObject *proto, JSObject *parent); + + +extern __attribute__((visibility("default"))) JSBool +JS_IsExtensible(JSObject *obj); + +extern __attribute__((visibility("default"))) JSBool +JS_IsNative(JSObject *obj); + +extern __attribute__((visibility("default"))) JSRuntime * +JS_GetObjectRuntime(JSObject *obj); + + + + + +extern __attribute__((visibility("default"))) JSObject * +JS_NewObjectWithGivenProto(JSContext *cx, JSClass *clasp, JSObject *proto, + JSObject *parent); + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_DeepFreezeObject(JSContext *cx, JSObject *obj); + + + + +extern __attribute__((visibility("default"))) JSBool +JS_FreezeObject(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) JSObject * +JS_ConstructObject(JSContext *cx, JSClass *clasp, JSObject *parent); + +extern __attribute__((visibility("default"))) JSObject * +JS_ConstructObjectWithArguments(JSContext *cx, JSClass *clasp, JSObject *parent, + unsigned argc, jsval *argv); + +extern __attribute__((visibility("default"))) JSObject * +JS_New(JSContext *cx, JSObject *ctor, unsigned argc, jsval *argv); + +extern __attribute__((visibility("default"))) JSObject * +JS_DefineObject(JSContext *cx, JSObject *obj, const char *name, JSClass *clasp, + JSObject *proto, unsigned attrs); + +extern __attribute__((visibility("default"))) JSBool +JS_DefineConstDoubles(JSContext *cx, JSObject *obj, JSConstDoubleSpec *cds); + +extern __attribute__((visibility("default"))) JSBool +JS_DefineProperties(JSContext *cx, JSObject *obj, JSPropertySpec *ps); + +extern __attribute__((visibility("default"))) JSBool +JS_DefineProperty(JSContext *cx, JSObject *obj, const char *name, jsval value, + JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs); + +extern __attribute__((visibility("default"))) JSBool +JS_DefinePropertyById(JSContext *cx, JSObject *obj, jsid id, jsval value, + JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs); + +extern __attribute__((visibility("default"))) JSBool +JS_DefineOwnProperty(JSContext *cx, JSObject *obj, jsid id, jsval descriptor, JSBool *bp); + + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_GetPropertyAttributes(JSContext *cx, JSObject *obj, const char *name, + unsigned *attrsp, JSBool *foundp); + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_GetPropertyAttrsGetterAndSetter(JSContext *cx, JSObject *obj, + const char *name, + unsigned *attrsp, JSBool *foundp, + JSPropertyOp *getterp, + JSStrictPropertyOp *setterp); + +extern __attribute__((visibility("default"))) JSBool +JS_GetPropertyAttrsGetterAndSetterById(JSContext *cx, JSObject *obj, + jsid id, + unsigned *attrsp, JSBool *foundp, + JSPropertyOp *getterp, + JSStrictPropertyOp *setterp); + + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_SetPropertyAttributes(JSContext *cx, JSObject *obj, const char *name, + unsigned attrs, JSBool *foundp); + +extern __attribute__((visibility("default"))) JSBool +JS_DefinePropertyWithTinyId(JSContext *cx, JSObject *obj, const char *name, + int8_t tinyid, jsval value, + JSPropertyOp getter, JSStrictPropertyOp setter, + unsigned attrs); + +extern __attribute__((visibility("default"))) JSBool +JS_AlreadyHasOwnProperty(JSContext *cx, JSObject *obj, const char *name, + JSBool *foundp); + +extern __attribute__((visibility("default"))) JSBool +JS_AlreadyHasOwnPropertyById(JSContext *cx, JSObject *obj, jsid id, + JSBool *foundp); + +extern __attribute__((visibility("default"))) JSBool +JS_HasProperty(JSContext *cx, JSObject *obj, const char *name, JSBool *foundp); + +extern __attribute__((visibility("default"))) JSBool +JS_HasPropertyById(JSContext *cx, JSObject *obj, jsid id, JSBool *foundp); + +extern __attribute__((visibility("default"))) JSBool +JS_LookupProperty(JSContext *cx, JSObject *obj, const char *name, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_LookupPropertyById(JSContext *cx, JSObject *obj, jsid id, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_LookupPropertyWithFlags(JSContext *cx, JSObject *obj, const char *name, + unsigned flags, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_LookupPropertyWithFlagsById(JSContext *cx, JSObject *obj, jsid id, + unsigned flags, JSObject **objp, jsval *vp); + +struct JSPropertyDescriptor { + JSObject *obj; + unsigned attrs; + unsigned shortid; + JSPropertyOp getter; + JSStrictPropertyOp setter; + jsval value; +}; + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_GetPropertyDescriptorById(JSContext *cx, JSObject *obj, jsid id, unsigned flags, + JSPropertyDescriptor *desc); + +extern __attribute__((visibility("default"))) JSBool +JS_GetOwnPropertyDescriptor(JSContext *cx, JSObject *obj, jsid id, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_GetProperty(JSContext *cx, JSObject *obj, const char *name, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_GetPropertyDefault(JSContext *cx, JSObject *obj, const char *name, jsval def, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_GetPropertyById(JSContext *cx, JSObject *obj, jsid id, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_GetPropertyByIdDefault(JSContext *cx, JSObject *obj, jsid id, jsval def, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_ForwardGetPropertyTo(JSContext *cx, JSObject *obj, jsid id, JSObject *onBehalfOf, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_GetMethodById(JSContext *cx, JSObject *obj, jsid id, JSObject **objp, + jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_GetMethod(JSContext *cx, JSObject *obj, const char *name, JSObject **objp, + jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_SetProperty(JSContext *cx, JSObject *obj, const char *name, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_SetPropertyById(JSContext *cx, JSObject *obj, jsid id, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_DeleteProperty(JSContext *cx, JSObject *obj, const char *name); + +extern __attribute__((visibility("default"))) JSBool +JS_DeleteProperty2(JSContext *cx, JSObject *obj, const char *name, + jsval *rval); + +extern __attribute__((visibility("default"))) JSBool +JS_DeletePropertyById(JSContext *cx, JSObject *obj, jsid id); + +extern __attribute__((visibility("default"))) JSBool +JS_DeletePropertyById2(JSContext *cx, JSObject *obj, jsid id, jsval *rval); + +extern __attribute__((visibility("default"))) JSBool +JS_DefineUCProperty(JSContext *cx, JSObject *obj, + const jschar *name, size_t namelen, jsval value, + JSPropertyOp getter, JSStrictPropertyOp setter, + unsigned attrs); + + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_GetUCPropertyAttributes(JSContext *cx, JSObject *obj, + const jschar *name, size_t namelen, + unsigned *attrsp, JSBool *foundp); + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_GetUCPropertyAttrsGetterAndSetter(JSContext *cx, JSObject *obj, + const jschar *name, size_t namelen, + unsigned *attrsp, JSBool *foundp, + JSPropertyOp *getterp, + JSStrictPropertyOp *setterp); + + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_SetUCPropertyAttributes(JSContext *cx, JSObject *obj, + const jschar *name, size_t namelen, + unsigned attrs, JSBool *foundp); + + +extern __attribute__((visibility("default"))) JSBool +JS_DefineUCPropertyWithTinyId(JSContext *cx, JSObject *obj, + const jschar *name, size_t namelen, + int8_t tinyid, jsval value, + JSPropertyOp getter, JSStrictPropertyOp setter, + unsigned attrs); + +extern __attribute__((visibility("default"))) JSBool +JS_AlreadyHasOwnUCProperty(JSContext *cx, JSObject *obj, const jschar *name, + size_t namelen, JSBool *foundp); + +extern __attribute__((visibility("default"))) JSBool +JS_HasUCProperty(JSContext *cx, JSObject *obj, + const jschar *name, size_t namelen, + JSBool *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_LookupUCProperty(JSContext *cx, JSObject *obj, + const jschar *name, size_t namelen, + jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_GetUCProperty(JSContext *cx, JSObject *obj, + const jschar *name, size_t namelen, + jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_SetUCProperty(JSContext *cx, JSObject *obj, + const jschar *name, size_t namelen, + jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_DeleteUCProperty2(JSContext *cx, JSObject *obj, + const jschar *name, size_t namelen, + jsval *rval); + +extern __attribute__((visibility("default"))) JSObject * +JS_NewArrayObject(JSContext *cx, int length, jsval *vector); + +extern __attribute__((visibility("default"))) JSBool +JS_IsArrayObject(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) JSBool +JS_GetArrayLength(JSContext *cx, JSObject *obj, uint32_t *lengthp); + +extern __attribute__((visibility("default"))) JSBool +JS_SetArrayLength(JSContext *cx, JSObject *obj, uint32_t length); + +extern __attribute__((visibility("default"))) JSBool +JS_DefineElement(JSContext *cx, JSObject *obj, uint32_t index, jsval value, + JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs); + +extern __attribute__((visibility("default"))) JSBool +JS_AlreadyHasOwnElement(JSContext *cx, JSObject *obj, uint32_t index, JSBool *foundp); + +extern __attribute__((visibility("default"))) JSBool +JS_HasElement(JSContext *cx, JSObject *obj, uint32_t index, JSBool *foundp); + +extern __attribute__((visibility("default"))) JSBool +JS_LookupElement(JSContext *cx, JSObject *obj, uint32_t index, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_GetElement(JSContext *cx, JSObject *obj, uint32_t index, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_ForwardGetElementTo(JSContext *cx, JSObject *obj, uint32_t index, JSObject *onBehalfOf, + jsval *vp); + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_GetElementIfPresent(JSContext *cx, JSObject *obj, uint32_t index, JSObject *onBehalfOf, + jsval *vp, JSBool* present); + +extern __attribute__((visibility("default"))) JSBool +JS_SetElement(JSContext *cx, JSObject *obj, uint32_t index, jsval *vp); + +extern __attribute__((visibility("default"))) JSBool +JS_DeleteElement(JSContext *cx, JSObject *obj, uint32_t index); + +extern __attribute__((visibility("default"))) JSBool +JS_DeleteElement2(JSContext *cx, JSObject *obj, uint32_t index, jsval *rval); + +extern __attribute__((visibility("default"))) void +JS_ClearScope(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) JSIdArray * +JS_Enumerate(JSContext *cx, JSObject *obj); + + + + + + +extern __attribute__((visibility("default"))) JSObject * +JS_NewPropertyIterator(JSContext *cx, JSObject *obj); + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_NextProperty(JSContext *cx, JSObject *iterobj, jsid *idp); + + + + + +extern __attribute__((visibility("default"))) JSObject * +JS_NewElementIterator(JSContext *cx, JSObject *obj); + + + + + + +extern __attribute__((visibility("default"))) JSObject * +JS_ElementIteratorStub(JSContext *cx, JSHandleObject obj, JSBool keysonly); + +extern __attribute__((visibility("default"))) JSBool +JS_CheckAccess(JSContext *cx, JSObject *obj, jsid id, JSAccessMode mode, + jsval *vp, unsigned *attrsp); + +extern __attribute__((visibility("default"))) jsval +JS_GetReservedSlot(JSObject *obj, uint32_t index); + +extern __attribute__((visibility("default"))) void +JS_SetReservedSlot(JSObject *obj, uint32_t index, jsval v); + + + + + + +struct JSPrincipals { + + int refcount; + + + + + + + + void setDebugToken(uint32_t token) { + + + + } + + + + + + __attribute__((visibility("default"))) void dump(); + +}; + +extern __attribute__((visibility("default"))) void +JS_HoldPrincipals(JSPrincipals *principals); + +extern __attribute__((visibility("default"))) void +JS_DropPrincipals(JSRuntime *rt, JSPrincipals *principals); + +struct JSSecurityCallbacks { + JSCheckAccessOp checkObjectAccess; + JSSubsumePrincipalsOp subsumePrincipals; + JSObjectPrincipalsFinder findObjectPrincipals; + JSCSPEvalChecker contentSecurityPolicyAllows; + JSPushContextPrincipalOp pushContextPrincipal; + JSPopContextPrincipalOp popContextPrincipal; +}; + +extern __attribute__((visibility("default"))) void +JS_SetSecurityCallbacks(JSRuntime *rt, const JSSecurityCallbacks *callbacks); + +extern __attribute__((visibility("default"))) const JSSecurityCallbacks * +JS_GetSecurityCallbacks(JSRuntime *rt); +# 4388 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) void +JS_SetTrustedPrincipals(JSRuntime *rt, JSPrincipals *prin); + + + + + + +extern __attribute__((visibility("default"))) void +JS_InitDestroyPrincipalsCallback(JSRuntime *rt, JSDestroyPrincipalsOp destroyPrincipals); + + + + + + +extern __attribute__((visibility("default"))) JSFunction * +JS_NewFunction(JSContext *cx, JSNative call, unsigned nargs, unsigned flags, + JSObject *parent, const char *name); + + + + + +extern __attribute__((visibility("default"))) JSFunction * +JS_NewFunctionById(JSContext *cx, JSNative call, unsigned nargs, unsigned flags, + JSObject *parent, jsid id); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetFunctionObject(JSFunction *fun); + + + + + + + +extern __attribute__((visibility("default"))) JSString * +JS_GetFunctionId(JSFunction *fun); + + + + +extern __attribute__((visibility("default"))) unsigned +JS_GetFunctionFlags(JSFunction *fun); + + + + +extern __attribute__((visibility("default"))) uint16_t +JS_GetFunctionArity(JSFunction *fun); + + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_ObjectIsFunction(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) JSBool +JS_ObjectIsCallable(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) JSBool +JS_IsNativeFunction(JSObject *funobj, JSNative call); + + + + + + +extern __attribute__((visibility("default"))) JSObject* +JS_BindCallable(JSContext *cx, JSObject *callable, JSObject *newThis); + +extern __attribute__((visibility("default"))) JSBool +JS_DefineFunctions(JSContext *cx, JSObject *obj, JSFunctionSpec *fs); + +extern __attribute__((visibility("default"))) JSFunction * +JS_DefineFunction(JSContext *cx, JSObject *obj, const char *name, JSNative call, + unsigned nargs, unsigned attrs); + +extern __attribute__((visibility("default"))) JSFunction * +JS_DefineUCFunction(JSContext *cx, JSObject *obj, + const jschar *name, size_t namelen, JSNative call, + unsigned nargs, unsigned attrs); + +extern __attribute__((visibility("default"))) JSFunction * +JS_DefineFunctionById(JSContext *cx, JSObject *obj, jsid id, JSNative call, + unsigned nargs, unsigned attrs); + +extern __attribute__((visibility("default"))) JSObject * +JS_CloneFunctionObject(JSContext *cx, JSObject *funobj, JSObject *parent); +# 4489 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_BufferIsCompilableUnit(JSContext *cx, JSBool bytes_are_utf8, + JSObject *obj, const char *bytes, size_t length); + +extern __attribute__((visibility("default"))) JSScript * +JS_CompileScript(JSContext *cx, JSObject *obj, + const char *bytes, size_t length, + const char *filename, unsigned lineno); + +extern __attribute__((visibility("default"))) JSScript * +JS_CompileScriptForPrincipals(JSContext *cx, JSObject *obj, + JSPrincipals *principals, + const char *bytes, size_t length, + const char *filename, unsigned lineno); + +extern __attribute__((visibility("default"))) JSScript * +JS_CompileScriptForPrincipalsVersion(JSContext *cx, JSObject *obj, + JSPrincipals *principals, + const char *bytes, size_t length, + const char *filename, unsigned lineno, + JSVersion version); + +extern __attribute__((visibility("default"))) JSScript * +JS_CompileUCScript(JSContext *cx, JSObject *obj, + const jschar *chars, size_t length, + const char *filename, unsigned lineno); + +extern __attribute__((visibility("default"))) JSScript * +JS_CompileUCScriptForPrincipals(JSContext *cx, JSObject *obj, + JSPrincipals *principals, + const jschar *chars, size_t length, + const char *filename, unsigned lineno); + +extern __attribute__((visibility("default"))) JSScript * +JS_CompileUCScriptForPrincipalsVersion(JSContext *cx, JSObject *obj, + JSPrincipals *principals, + const jschar *chars, size_t length, + const char *filename, unsigned lineno, + JSVersion version); + + + + +extern __attribute__((visibility("default"))) JSScript * +JS_CompileUCScriptForPrincipalsVersionOrigin(JSContext *cx, JSObject *obj, + JSPrincipals *principals, + JSPrincipals *originPrincipals, + const jschar *chars, size_t length, + const char *filename, unsigned lineno, + JSVersion version); + +extern __attribute__((visibility("default"))) JSScript * +JS_CompileUTF8File(JSContext *cx, JSObject *obj, const char *filename); + +extern __attribute__((visibility("default"))) JSScript * +JS_CompileUTF8FileHandle(JSContext *cx, JSObject *obj, const char *filename, + FILE *fh); + +extern __attribute__((visibility("default"))) JSScript * +JS_CompileUTF8FileHandleForPrincipals(JSContext *cx, JSObject *obj, + const char *filename, FILE *fh, + JSPrincipals *principals); + +extern __attribute__((visibility("default"))) JSScript * +JS_CompileUTF8FileHandleForPrincipalsVersion(JSContext *cx, JSObject *obj, + const char *filename, FILE *fh, + JSPrincipals *principals, + JSVersion version); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetGlobalFromScript(JSScript *script); + +extern __attribute__((visibility("default"))) JSFunction * +JS_CompileFunction(JSContext *cx, JSObject *obj, const char *name, + unsigned nargs, const char **argnames, + const char *bytes, size_t length, + const char *filename, unsigned lineno); + +extern __attribute__((visibility("default"))) JSFunction * +JS_CompileFunctionForPrincipals(JSContext *cx, JSObject *obj, + JSPrincipals *principals, const char *name, + unsigned nargs, const char **argnames, + const char *bytes, size_t length, + const char *filename, unsigned lineno); + +extern __attribute__((visibility("default"))) JSFunction * +JS_CompileUCFunction(JSContext *cx, JSObject *obj, const char *name, + unsigned nargs, const char **argnames, + const jschar *chars, size_t length, + const char *filename, unsigned lineno); + +extern __attribute__((visibility("default"))) JSFunction * +JS_CompileUCFunctionForPrincipals(JSContext *cx, JSObject *obj, + JSPrincipals *principals, const char *name, + unsigned nargs, const char **argnames, + const jschar *chars, size_t length, + const char *filename, unsigned lineno); + +extern __attribute__((visibility("default"))) JSFunction * +JS_CompileUCFunctionForPrincipalsVersion(JSContext *cx, JSObject *obj, + JSPrincipals *principals, const char *name, + unsigned nargs, const char **argnames, + const jschar *chars, size_t length, + const char *filename, unsigned lineno, + JSVersion version); + +extern __attribute__((visibility("default"))) JSString * +JS_DecompileScript(JSContext *cx, JSScript *script, const char *name, unsigned indent); + + + + + +#define JS_DONT_PRETTY_PRINT ((unsigned)0x8000) + +extern __attribute__((visibility("default"))) JSString * +JS_DecompileFunction(JSContext *cx, JSFunction *fun, unsigned indent); + +extern __attribute__((visibility("default"))) JSString * +JS_DecompileFunctionBody(JSContext *cx, JSFunction *fun, unsigned indent); +# 4645 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_ExecuteScript(JSContext *cx, JSObject *obj, JSScript *script, jsval *rval); + +extern __attribute__((visibility("default"))) JSBool +JS_ExecuteScriptVersion(JSContext *cx, JSObject *obj, JSScript *script, jsval *rval, + JSVersion version); + + + + + +typedef enum JSExecPart { JSEXEC_PROLOG, JSEXEC_MAIN } JSExecPart; + +extern __attribute__((visibility("default"))) JSBool +JS_EvaluateScript(JSContext *cx, JSObject *obj, + const char *bytes, unsigned length, + const char *filename, unsigned lineno, + jsval *rval); + +extern __attribute__((visibility("default"))) JSBool +JS_EvaluateScriptForPrincipals(JSContext *cx, JSObject *obj, + JSPrincipals *principals, + const char *bytes, unsigned length, + const char *filename, unsigned lineno, + jsval *rval); + +extern __attribute__((visibility("default"))) JSBool +JS_EvaluateScriptForPrincipalsVersion(JSContext *cx, JSObject *obj, + JSPrincipals *principals, + const char *bytes, unsigned length, + const char *filename, unsigned lineno, + jsval *rval, JSVersion version); + +extern __attribute__((visibility("default"))) JSBool +JS_EvaluateUCScript(JSContext *cx, JSObject *obj, + const jschar *chars, unsigned length, + const char *filename, unsigned lineno, + jsval *rval); + +extern __attribute__((visibility("default"))) JSBool +JS_EvaluateUCScriptForPrincipals(JSContext *cx, JSObject *obj, + JSPrincipals *principals, + const jschar *chars, unsigned length, + const char *filename, unsigned lineno, + jsval *rval); + +extern __attribute__((visibility("default"))) JSBool +JS_EvaluateUCScriptForPrincipalsVersion(JSContext *cx, JSObject *obj, + JSPrincipals *principals, + const jschar *chars, unsigned length, + const char *filename, unsigned lineno, + jsval *rval, JSVersion version); +# 4706 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_EvaluateUCScriptForPrincipalsVersionOrigin(JSContext *cx, JSObject *obj, + JSPrincipals *principals, + JSPrincipals *originPrincipals, + const jschar *chars, unsigned length, + const char *filename, unsigned lineno, + jsval *rval, JSVersion version); + +extern __attribute__((visibility("default"))) JSBool +JS_CallFunction(JSContext *cx, JSObject *obj, JSFunction *fun, unsigned argc, + jsval *argv, jsval *rval); + +extern __attribute__((visibility("default"))) JSBool +JS_CallFunctionName(JSContext *cx, JSObject *obj, const char *name, unsigned argc, + jsval *argv, jsval *rval); + +extern __attribute__((visibility("default"))) JSBool +JS_CallFunctionValue(JSContext *cx, JSObject *obj, jsval fval, unsigned argc, + jsval *argv, jsval *rval); + + +} + +namespace JS { + +static inline bool +Call(JSContext *cx, JSObject *thisObj, JSFunction *fun, unsigned argc, jsval *argv, jsval *rval) { + return !!JS_CallFunction(cx, thisObj, fun, argc, argv, rval); +} + +static inline bool +Call(JSContext *cx, JSObject *thisObj, const char *name, unsigned argc, jsval *argv, jsval *rval) { + return !!JS_CallFunctionName(cx, thisObj, name, argc, argv, rval); +} + +static inline bool +Call(JSContext *cx, JSObject *thisObj, jsval fun, unsigned argc, jsval *argv, jsval *rval) { + return !!JS_CallFunctionValue(cx, thisObj, fun, argc, argv, rval); +} + +extern __attribute__((visibility("default"))) bool +Call(JSContext *cx, jsval thisv, jsval fun, unsigned argc, jsval *argv, jsval *rval); + +static inline bool +Call(JSContext *cx, jsval thisv, JSObject *funObj, unsigned argc, jsval *argv, jsval *rval) { + return Call(cx, thisv, OBJECT_TO_JSVAL(funObj), argc, argv, rval); +} + +} + +extern "C" { +# 4772 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSOperationCallback +JS_SetOperationCallback(JSContext *cx, JSOperationCallback callback); + +extern __attribute__((visibility("default"))) JSOperationCallback +JS_GetOperationCallback(JSContext *cx); + +extern __attribute__((visibility("default"))) void +JS_TriggerOperationCallback(JSRuntime *rt); + +extern __attribute__((visibility("default"))) JSBool +JS_IsRunning(JSContext *cx); +# 4795 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_SaveFrameChain(JSContext *cx); + +extern __attribute__((visibility("default"))) void +JS_RestoreFrameChain(JSContext *cx); +# 4829 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSString * +JS_NewStringCopyN(JSContext *cx, const char *s, size_t n); + +extern __attribute__((visibility("default"))) JSString * +JS_NewStringCopyZ(JSContext *cx, const char *s); + +extern __attribute__((visibility("default"))) JSString * +JS_InternJSString(JSContext *cx, JSString *str); + +extern __attribute__((visibility("default"))) JSString * +JS_InternString(JSContext *cx, const char *s); + +extern __attribute__((visibility("default"))) JSString * +JS_NewUCString(JSContext *cx, jschar *chars, size_t length); + +extern __attribute__((visibility("default"))) JSString * +JS_NewUCStringCopyN(JSContext *cx, const jschar *s, size_t n); + +extern __attribute__((visibility("default"))) JSString * +JS_NewUCStringCopyZ(JSContext *cx, const jschar *s); + +extern __attribute__((visibility("default"))) JSString * +JS_InternUCStringN(JSContext *cx, const jschar *s, size_t length); + +extern __attribute__((visibility("default"))) JSString * +JS_InternUCString(JSContext *cx, const jschar *s); + +extern __attribute__((visibility("default"))) JSBool +JS_CompareStrings(JSContext *cx, JSString *str1, JSString *str2, int32_t *result); + +extern __attribute__((visibility("default"))) JSBool +JS_StringEqualsAscii(JSContext *cx, JSString *str, const char *asciiBytes, JSBool *match); + +extern __attribute__((visibility("default"))) size_t +JS_PutEscapedString(JSContext *cx, char *buffer, size_t size, JSString *str, char quote); + +extern __attribute__((visibility("default"))) JSBool +JS_FileEscapedString(FILE *fp, JSString *str, char quote); +# 4903 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) size_t +JS_GetStringLength(JSString *str); + +extern __attribute__((visibility("default"))) const jschar * +JS_GetStringCharsAndLength(JSContext *cx, JSString *str, size_t *length); + +extern __attribute__((visibility("default"))) const jschar * +JS_GetInternedStringChars(JSString *str); + +extern __attribute__((visibility("default"))) const jschar * +JS_GetInternedStringCharsAndLength(JSString *str, size_t *length); + +extern __attribute__((visibility("default"))) const jschar * +JS_GetStringCharsZ(JSContext *cx, JSString *str); + +extern __attribute__((visibility("default"))) const jschar * +JS_GetStringCharsZAndLength(JSContext *cx, JSString *str, size_t *length); + +extern __attribute__((visibility("default"))) JSFlatString * +JS_FlattenString(JSContext *cx, JSString *str); + +extern __attribute__((visibility("default"))) const jschar * +JS_GetFlatStringChars(JSFlatString *str); + +static __attribute__((always_inline)) inline JSFlatString * +JSID_TO_FLAT_STRING(jsid id) +{ + do { } while(0); + return (JSFlatString *)((id)); +} + +static __attribute__((always_inline)) inline JSFlatString * +JS_ASSERT_STRING_IS_FLAT(JSString *str) +{ + do { } while(0); + return (JSFlatString *)str; +} + +static __attribute__((always_inline)) inline JSString * +JS_FORGET_STRING_FLATNESS(JSFlatString *fstr) +{ + return (JSString *)fstr; +} + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_FlatStringEqualsAscii(JSFlatString *str, const char *asciiBytes); + +extern __attribute__((visibility("default"))) size_t +JS_PutEscapedFlatString(char *buffer, size_t size, JSFlatString *str, char quote); + + + + + +extern __attribute__((visibility("default"))) JSString * +JS_NewGrowableString(JSContext *cx, jschar *chars, size_t length); +# 4990 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSString * +JS_NewDependentString(JSContext *cx, JSString *str, size_t start, + size_t length); + + + + + +extern __attribute__((visibility("default"))) JSString * +JS_ConcatStrings(JSContext *cx, JSString *left, JSString *right); + + + + + +extern __attribute__((visibility("default"))) const jschar * +JS_UndependString(JSContext *cx, JSString *str); + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_MakeStringImmutable(JSContext *cx, JSString *str); + + + + + +__attribute__((visibility("default"))) JSBool +JS_CStringsAreUTF8(void); + + + + + + +__attribute__((visibility("default"))) void +JS_SetCStringsAreUTF8(void); +# 5053 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +__attribute__((visibility("default"))) JSBool +JS_EncodeCharacters(JSContext *cx, const jschar *src, size_t srclen, char *dst, + size_t *dstlenp); + +__attribute__((visibility("default"))) JSBool +JS_DecodeBytes(JSContext *cx, const char *src, size_t srclen, jschar *dst, + size_t *dstlenp); + +__attribute__((visibility("default"))) JSBool +JS_DecodeUTF8(JSContext *cx, const char *src, size_t srclen, jschar *dst, + size_t *dstlenp); + + + + + +__attribute__((visibility("default"))) char * +JS_EncodeString(JSContext *cx, JSString *str); + + + + + + +__attribute__((visibility("default"))) size_t +JS_GetStringEncodingLength(JSContext *cx, JSString *str); +# 5093 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +__attribute__((visibility("default"))) size_t +JS_EncodeStringToBuffer(JSString *str, char *buffer, size_t length); + + + +class JSAutoByteString { + public: + JSAutoByteString(JSContext *cx, JSString *str ) + : mBytes(JS_EncodeString(cx, str)) { + do { } while(0); + do { } while (0); + } + + JSAutoByteString() + : mBytes(__null) { + do { } while (0); + } + + ~JSAutoByteString() { + js::UnwantedForeground::free_(mBytes); + } + + + void initBytes(char *bytes) { + do { } while(0); + mBytes = bytes; + } + + char *encode(JSContext *cx, JSString *str) { + do { } while(0); + do { } while(0); + mBytes = JS_EncodeString(cx, str); + return mBytes; + } + + void clear() { + js::UnwantedForeground::free_(mBytes); + mBytes = __null; + } + + char *ptr() const { + return mBytes; + } + + bool operator!() const { + return !mBytes; + } + + private: + char *mBytes; + + + + JSAutoByteString(const JSAutoByteString &another); + JSAutoByteString &operator=(const JSAutoByteString &another); +}; + + + + + + + +typedef JSBool (* JSONWriteCallback)(const jschar *buf, uint32_t len, void *data); + + + + +__attribute__((visibility("default"))) JSBool +JS_Stringify(JSContext *cx, jsval *vp, JSObject *replacer, jsval space, + JSONWriteCallback callback, void *data); + + + + +__attribute__((visibility("default"))) JSBool +JS_ParseJSON(JSContext *cx, const jschar *chars, uint32_t len, jsval *vp); + +__attribute__((visibility("default"))) JSBool +JS_ParseJSONWithReviver(JSContext *cx, const jschar *chars, uint32_t len, jsval reviver, + jsval *vp); + + + + + + +#define JS_STRUCTURED_CLONE_VERSION 1 + +struct JSStructuredCloneCallbacks { + ReadStructuredCloneOp read; + WriteStructuredCloneOp write; + StructuredCloneErrorOp reportError; +}; + +__attribute__((visibility("default"))) JSBool +JS_ReadStructuredClone(JSContext *cx, const uint64_t *data, size_t nbytes, + uint32_t version, jsval *vp, + const JSStructuredCloneCallbacks *optionalCallbacks, + void *closure); + + +__attribute__((visibility("default"))) JSBool +JS_WriteStructuredClone(JSContext *cx, jsval v, uint64_t **datap, size_t *nbytesp, + const JSStructuredCloneCallbacks *optionalCallbacks, + void *closure); + +__attribute__((visibility("default"))) JSBool +JS_StructuredClone(JSContext *cx, jsval v, jsval *vp, + const JSStructuredCloneCallbacks *optionalCallbacks, + void *closure); + + +} + + +class __attribute__((visibility("default"))) JSAutoStructuredCloneBuffer { + uint64_t *data_; + size_t nbytes_; + uint32_t version_; + + public: + JSAutoStructuredCloneBuffer() + : data_(__null), nbytes_(0), version_(1) {} + + ~JSAutoStructuredCloneBuffer() { clear(); } + + uint64_t *data() const { return data_; } + size_t nbytes() const { return nbytes_; } + + void clear(); + + + bool copy(const uint64_t *data, size_t nbytes, uint32_t version=1); + + + + + + + void adopt(uint64_t *data, size_t nbytes, uint32_t version=1); + + + + + + + void steal(uint64_t **datap, size_t *nbytesp, uint32_t *versionp=__null); + + bool read(JSContext *cx, jsval *vp, + const JSStructuredCloneCallbacks *optionalCallbacks=__null, + void *closure=__null) const; + + bool write(JSContext *cx, jsval v, + const JSStructuredCloneCallbacks *optionalCallbacks=__null, + void *closure=__null); + + + + + void swap(JSAutoStructuredCloneBuffer &other); + + private: + + JSAutoStructuredCloneBuffer(const JSAutoStructuredCloneBuffer &other); + JSAutoStructuredCloneBuffer &operator=(const JSAutoStructuredCloneBuffer &other); +}; + +extern "C" { + + + + + +#define JS_SCTAG_USER_MIN ((uint32_t) 0xFFFF8000) +#define JS_SCTAG_USER_MAX ((uint32_t) 0xFFFFFFFF) + +#define JS_SCERR_RECURSION 0 + +__attribute__((visibility("default"))) void +JS_SetStructuredCloneCallbacks(JSRuntime *rt, const JSStructuredCloneCallbacks *callbacks); + +__attribute__((visibility("default"))) JSBool +JS_ReadUint32Pair(JSStructuredCloneReader *r, uint32_t *p1, uint32_t *p2); + +__attribute__((visibility("default"))) JSBool +JS_ReadBytes(JSStructuredCloneReader *r, void *p, size_t len); + +__attribute__((visibility("default"))) JSBool +JS_ReadTypedArray(JSStructuredCloneReader *r, jsval *vp); + +__attribute__((visibility("default"))) JSBool +JS_WriteUint32Pair(JSStructuredCloneWriter *w, uint32_t tag, uint32_t data); + +__attribute__((visibility("default"))) JSBool +JS_WriteBytes(JSStructuredCloneWriter *w, const void *p, size_t len); + +__attribute__((visibility("default"))) JSBool +JS_WriteTypedArray(JSStructuredCloneWriter *w, jsval v); + + + + + + +struct JSLocaleCallbacks { + JSLocaleToUpperCase localeToUpperCase; + JSLocaleToLowerCase localeToLowerCase; + JSLocaleCompare localeCompare; + JSLocaleToUnicode localeToUnicode; + JSErrorCallback localeGetErrorMessage; +}; + + + + + +extern __attribute__((visibility("default"))) void +JS_SetLocaleCallbacks(JSContext *cx, JSLocaleCallbacks *callbacks); + + + + + +extern __attribute__((visibility("default"))) JSLocaleCallbacks * +JS_GetLocaleCallbacks(JSContext *cx); +# 5331 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) void +JS_ReportError(JSContext *cx, const char *format, ...); + + + + +extern __attribute__((visibility("default"))) void +JS_ReportErrorNumber(JSContext *cx, JSErrorCallback errorCallback, + void *userRef, const unsigned errorNumber, ...); + + + + +extern __attribute__((visibility("default"))) void +JS_ReportErrorNumberUC(JSContext *cx, JSErrorCallback errorCallback, + void *userRef, const unsigned errorNumber, ...); + + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_ReportWarning(JSContext *cx, const char *format, ...); + +extern __attribute__((visibility("default"))) JSBool +JS_ReportErrorFlagsAndNumber(JSContext *cx, unsigned flags, + JSErrorCallback errorCallback, void *userRef, + const unsigned errorNumber, ...); + +extern __attribute__((visibility("default"))) JSBool +JS_ReportErrorFlagsAndNumberUC(JSContext *cx, unsigned flags, + JSErrorCallback errorCallback, void *userRef, + const unsigned errorNumber, ...); + + + + +extern __attribute__((visibility("default"))) void +JS_ReportOutOfMemory(JSContext *cx); + + + + +extern __attribute__((visibility("default"))) void +JS_ReportAllocationOverflow(JSContext *cx); + +struct JSErrorReport { + const char *filename; + JSPrincipals *originPrincipals; + unsigned lineno; + const char *linebuf; + const char *tokenptr; + const jschar *uclinebuf; + const jschar *uctokenptr; + unsigned flags; + unsigned errorNumber; + const jschar *ucmessage; + const jschar **messageArgs; +}; + + + + +#define JSREPORT_ERROR 0x0 +#define JSREPORT_WARNING 0x1 +#define JSREPORT_EXCEPTION 0x2 +#define JSREPORT_STRICT 0x4 +# 5408 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JSREPORT_STRICT_MODE_ERROR 0x8 +# 5417 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +#define JSREPORT_IS_WARNING(flags) (((flags) & JSREPORT_WARNING) != 0) +#define JSREPORT_IS_EXCEPTION(flags) (((flags) & JSREPORT_EXCEPTION) != 0) +#define JSREPORT_IS_STRICT(flags) (((flags) & JSREPORT_STRICT) != 0) +#define JSREPORT_IS_STRICT_MODE_ERROR(flags) (((flags) & JSREPORT_STRICT_MODE_ERROR) != 0) + +extern __attribute__((visibility("default"))) JSErrorReporter +JS_GetErrorReporter(JSContext *cx); + +extern __attribute__((visibility("default"))) JSErrorReporter +JS_SetErrorReporter(JSContext *cx, JSErrorReporter er); + + + + + + + +extern __attribute__((visibility("default"))) JSObject * +JS_NewDateObject(JSContext *cx, int year, int mon, int mday, int hour, int min, int sec); + +extern __attribute__((visibility("default"))) JSObject * +JS_NewDateObjectMsec(JSContext *cx, double msec); + + + + +extern __attribute__((visibility("default"))) JSBool +JS_ObjectIsDate(JSContext *cx, JSObject *obj); + + + + + + +#define JSREG_FOLD 0x01 +#define JSREG_GLOB 0x02 +#define JSREG_MULTILINE 0x04 +#define JSREG_STICKY 0x08 + +extern __attribute__((visibility("default"))) JSObject * +JS_NewRegExpObject(JSContext *cx, JSObject *obj, char *bytes, size_t length, unsigned flags); + +extern __attribute__((visibility("default"))) JSObject * +JS_NewUCRegExpObject(JSContext *cx, JSObject *obj, jschar *chars, size_t length, unsigned flags); + +extern __attribute__((visibility("default"))) void +JS_SetRegExpInput(JSContext *cx, JSObject *obj, JSString *input, JSBool multiline); + +extern __attribute__((visibility("default"))) void +JS_ClearRegExpStatics(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) JSBool +JS_ExecuteRegExp(JSContext *cx, JSObject *obj, JSObject *reobj, jschar *chars, size_t length, + size_t *indexp, JSBool test, jsval *rval); + + + +extern __attribute__((visibility("default"))) JSObject * +JS_NewRegExpObjectNoStatics(JSContext *cx, char *bytes, size_t length, unsigned flags); + +extern __attribute__((visibility("default"))) JSObject * +JS_NewUCRegExpObjectNoStatics(JSContext *cx, jschar *chars, size_t length, unsigned flags); + +extern __attribute__((visibility("default"))) JSBool +JS_ExecuteRegExpNoStatics(JSContext *cx, JSObject *reobj, jschar *chars, size_t length, + size_t *indexp, JSBool test, jsval *rval); + +extern __attribute__((visibility("default"))) JSBool +JS_ObjectIsRegExp(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) unsigned +JS_GetRegExpFlags(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) JSString * +JS_GetRegExpSource(JSContext *cx, JSObject *obj); + + + +extern __attribute__((visibility("default"))) JSBool +JS_IsExceptionPending(JSContext *cx); + +extern __attribute__((visibility("default"))) JSBool +JS_GetPendingException(JSContext *cx, jsval *vp); + +extern __attribute__((visibility("default"))) void +JS_SetPendingException(JSContext *cx, jsval v); + +extern __attribute__((visibility("default"))) void +JS_ClearPendingException(JSContext *cx); + +extern __attribute__((visibility("default"))) JSBool +JS_ReportPendingException(JSContext *cx); +# 5521 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSExceptionState * +JS_SaveExceptionState(JSContext *cx); + +extern __attribute__((visibility("default"))) void +JS_RestoreExceptionState(JSContext *cx, JSExceptionState *state); + +extern __attribute__((visibility("default"))) void +JS_DropExceptionState(JSContext *cx, JSExceptionState *state); +# 5537 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSErrorReport * +JS_ErrorFromException(JSContext *cx, jsval v); + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_ThrowReportedError(JSContext *cx, const char *message, + JSErrorReport *reportp); + + + + +extern __attribute__((visibility("default"))) JSBool +JS_ThrowStopIteration(JSContext *cx); + +extern __attribute__((visibility("default"))) intptr_t +JS_GetCurrentThread(); +# 5573 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) void +JS_AbortIfWrongThread(JSRuntime *rt); + +extern __attribute__((visibility("default"))) void +JS_ClearRuntimeThread(JSRuntime *rt); + +extern __attribute__((visibility("default"))) void +JS_SetRuntimeThread(JSRuntime *rt); + + +} + +class JSAutoSetRuntimeThread +{ + JSRuntime *runtime; + + public: + JSAutoSetRuntimeThread(JSRuntime *runtime) : runtime(runtime) { + JS_SetRuntimeThread(runtime); + } + + ~JSAutoSetRuntimeThread() { + JS_ClearRuntimeThread(runtime); + } +}; + +extern "C" { +# 5611 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +static __attribute__((always_inline)) inline JSBool +JS_IsConstructing(JSContext *cx, const jsval *vp) +{ +# 5623 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" + (void)cx; + + + return JSVAL_IS_MAGIC_IMPL(JSVAL_TO_IMPL(vp[1])); +} + + + + + + +extern __attribute__((visibility("default"))) JSObject * +JS_NewObjectForConstructor(JSContext *cx, JSClass *clasp, const jsval *vp); +# 5656 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_IndexToId(JSContext *cx, uint32_t index, jsid *id); + + + + +extern __attribute__((visibility("default"))) JSBool +JS_IsIdentifier(JSContext *cx, JSString *str, JSBool *isIdentifier); + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_DescribeScriptedCaller(JSContext *cx, JSScript **script, unsigned *lineno); + + + + + + +extern __attribute__((visibility("default"))) void * +JS_EncodeScript(JSContext *cx, JSScript *script, uint32_t *lengthp); + +extern __attribute__((visibility("default"))) void * +JS_EncodeInterpretedFunction(JSContext *cx, JSObject *funobj, uint32_t *lengthp); + +extern __attribute__((visibility("default"))) JSScript * +JS_DecodeScript(JSContext *cx, const void *data, uint32_t length, + JSPrincipals *principals, JSPrincipals *originPrincipals); + +extern __attribute__((visibility("default"))) JSObject * +JS_DecodeInterpretedFunction(JSContext *cx, const void *data, uint32_t length, + JSPrincipals *principals, JSPrincipals *originPrincipals); + +} +# 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 1 + + + + + + + +#define jsatom_h___ + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 11 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" 1 +# 42 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_VERSION_ECMA_3 148 +#define JS_VERSION_ECMA_3_TEST 149 +# 124 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_HAS_STR_HTML_HELPERS 1 +#define JS_HAS_OBJ_PROTO_PROP 1 +#define JS_HAS_OBJ_WATCHPOINT 1 +#define JS_HAS_TOSOURCE 1 +#define JS_HAS_CATCH_GUARD 1 +#define JS_HAS_UNEVAL 1 +#define JS_HAS_CONST 1 +#define JS_HAS_FUN_EXPR_STMT 1 +#define JS_HAS_NO_SUCH_METHOD 1 +#define JS_HAS_GENERATORS 1 +#define JS_HAS_BLOCK_SCOPE 1 +#define JS_HAS_DESTRUCTURING 2 +#define JS_HAS_GENERATOR_EXPRS 1 +#define JS_HAS_EXPR_CLOSURES 1 +# 146 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_HAS_NEW_GLOBAL_OBJECT 1 + + +#define JS_HAS_MAKE_SYSTEM_OBJECT 1 + + +#define JS_HAS_DESTRUCTURING_SHORTHAND (JS_HAS_DESTRUCTURING == 2) + + + + + +#define OLD_GETTER_SETTER_METHODS 1 + + +#define USE_NEW_OBJECT_REPRESENTATION 0 + + + + +#define NEW_OBJECT_REPRESENTATION_ONLY() MOZ_NOT_REACHED("don't call this! to be used in the new object representation") +# 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprvtd.h" 1 + + + + + + + +#define jsprvtd_h___ +# 28 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprvtd.h" +# 1 "./../../dist/include/js/HashTable.h" 1 +# 9 "./../../dist/include/js/HashTable.h" +#define jshashtable_h_ + + + + +namespace js { + +class TempAllocPolicy; + + +typedef uint32_t HashNumber; + + + +namespace detail { + +template +class HashTable; + +template +class HashTableEntry { + HashNumber keyHash; + + typedef typename tl::StripConst::result NonConstT; + + static const HashNumber sFreeKey = 0; + static const HashNumber sRemovedKey = 1; + static const HashNumber sCollisionBit = 1; + + template friend class HashTable; + + static bool isLiveHash(HashNumber hash) + { + return hash > sRemovedKey; + } + + public: + HashTableEntry() : keyHash(0), t() {} + HashTableEntry(MoveRef rhs) : keyHash(rhs->keyHash), t(Move(rhs->t)) { } + void operator=(const HashTableEntry &rhs) { keyHash = rhs.keyHash; t = rhs.t; } + void operator=(MoveRef rhs) { keyHash = rhs->keyHash; t = Move(rhs->t); } + + NonConstT t; + + bool isFree() const { return keyHash == sFreeKey; } + void setFree() { keyHash = sFreeKey; t = T(); } + bool isRemoved() const { return keyHash == sRemovedKey; } + void setRemoved() { keyHash = sRemovedKey; t = T(); } + bool isLive() const { return isLiveHash(keyHash); } + void setLive(HashNumber hn) { do { } while(0); keyHash = hn; } + + void setCollision() { do { } while(0); keyHash |= sCollisionBit; } + void setCollision(HashNumber collisionBit) { + do { } while(0); keyHash |= collisionBit; + } + void unsetCollision() { keyHash &= ~sCollisionBit; } + bool hasCollision() const { do { } while(0); return keyHash & sCollisionBit; } + bool matchHash(HashNumber hn) { return (keyHash & ~sCollisionBit) == hn; } + HashNumber getKeyHash() const { do { } while(0); return keyHash; } +}; +# 77 "./../../dist/include/js/HashTable.h" +template +class HashTable : private AllocPolicy +{ + typedef typename tl::StripConst::result NonConstT; + typedef typename HashPolicy::KeyType Key; + typedef typename HashPolicy::Lookup Lookup; + + public: + typedef HashTableEntry Entry; + + + + + + + + class Ptr + { + friend class HashTable; + typedef void (Ptr::* ConvertibleToBool)(); + void nonNull() {} + + Entry *entry; + + protected: + Ptr(Entry &entry) : entry(&entry) {} + + public: + + Ptr() { + + + + } + + bool found() const { return entry->isLive(); } + operator ConvertibleToBool() const { return found() ? &Ptr::nonNull : 0; } + bool operator==(const Ptr &rhs) const { do { } while(0); return entry == rhs.entry; } + bool operator!=(const Ptr &rhs) const { return !(*this == rhs); } + + T &operator*() const { return entry->t; } + T *operator->() const { return &entry->t; } + }; + + + class AddPtr : public Ptr + { + friend class HashTable; + HashNumber keyHash; + DebugOnly mutationCount; + + AddPtr(Entry &entry, HashNumber hn) : Ptr(entry), keyHash(hn) {} + public: + + AddPtr() {} + }; + + + + + + + + class Range + { + protected: + friend class HashTable; + + Range(Entry *c, Entry *e) : cur(c), end(e), validEntry(true) { + while (cur < end && !cur->isLive()) + ++cur; + } + + Entry *cur, *end; + DebugOnly validEntry; + + public: + Range() : cur(__null), end(__null), validEntry(false) {} + + bool empty() const { + return cur == end; + } + + T &front() const { + do { } while(0); + do { } while(0); + return cur->t; + } + + void popFront() { + do { } while(0); + while (++cur < end && !cur->isLive()) + continue; + validEntry = true; + } + }; +# 183 "./../../dist/include/js/HashTable.h" + class Enum : public Range + { + friend class HashTable; + + HashTable &table; + bool added; + bool removed; + + + Enum(const Enum &); + void operator=(const Enum &); + + public: + template explicit + Enum(Map &map) : Range(map.all()), table(map.impl), added(false), removed(false) {} +# 208 "./../../dist/include/js/HashTable.h" + void removeFront() { + table.remove(*this->cur); + removed = true; + this->validEntry = false; + } + + + + + + + void rekeyFront(const Lookup &l, const Key &k) { + do { } while(0); + if (match(*this->cur, l)) + return; + Entry e = *this->cur; + HashPolicy::setKey(e.t, const_cast(k)); + table.remove(*this->cur); + table.add(l, e); + added = true; + this->validEntry = false; + } + + void rekeyFront(const Key &k) { + rekeyFront(k, k); + } + + + ~Enum() { + if (added) + table.checkOverloaded(); + if (removed) + table.checkUnderloaded(); + } + + + void endEnumeration() { + if (added) { + table.checkOverloaded(); + added = false; + } + if (removed) { + table.checkUnderloaded(); + removed = false; + } + } + }; + + private: + uint32_t hashShift; + uint32_t entryCount; + uint32_t gen; + uint32_t removedCount; + Entry *table; + + void setTableSizeLog2(unsigned sizeLog2) { + hashShift = sHashBits - sizeLog2; + } +# 282 "./../../dist/include/js/HashTable.h" +#define METER(x) + + + friend class js::ReentrancyGuard; + mutable DebugOnly entered; + DebugOnly mutationCount; + + + static const unsigned sMinSizeLog2 = 2; + static const unsigned sMinSize = 1 << sMinSizeLog2; + static const unsigned sDefaultInitSizeLog2 = 4; + public: + static const unsigned sDefaultInitSize = 1 << sDefaultInitSizeLog2; + private: + static const unsigned sMaxInit = ((uint32_t)1 << (23)); + static const unsigned sMaxCapacity = ((uint32_t)1 << (24)); + static const unsigned sHashBits = tl::BitSize::result; + static const uint8_t sMinAlphaFrac = 64; + static const uint8_t sMaxAlphaFrac = 192; + static const uint8_t sInvMaxAlpha = 171; + static const HashNumber sGoldenRatio = 0x9E3779B9U; + static const HashNumber sFreeKey = Entry::sFreeKey; + static const HashNumber sRemovedKey = Entry::sRemovedKey; + static const HashNumber sCollisionBit = Entry::sCollisionBit; + + static void staticAsserts() + { + + typedef int moz_static_assert14[(((sMaxInit * sInvMaxAlpha) >> 7) < sMaxCapacity) ? 1 : -1]; + typedef int moz_static_assert15[((sMaxCapacity * sInvMaxAlpha) <= (4294967295U)) ? 1 : -1]; + typedef int moz_static_assert16[((sMaxCapacity * sizeof(Entry)) <= (4294967295U)) ? 1 : -1]; + } + + static bool isLiveHash(HashNumber hash) + { + return Entry::isLiveHash(hash); + } + + static HashNumber prepareHash(const Lookup& l) + { + HashNumber keyHash = HashPolicy::hash(l); + + + keyHash *= sGoldenRatio; + + + if (!isLiveHash(keyHash)) + keyHash -= (sRemovedKey + 1); + return keyHash & ~sCollisionBit; + } + + static Entry *createTable(AllocPolicy &alloc, uint32_t capacity) + { + Entry *newTable = (Entry *)alloc.malloc_(capacity * sizeof(Entry)); + if (!newTable) + return __null; + for (Entry *e = newTable, *end = e + capacity; e < end; ++e) + new(e) Entry(); + return newTable; + } + + static void destroyTable(AllocPolicy &alloc, Entry *oldTable, uint32_t capacity) + { + for (Entry *e = oldTable, *end = e + capacity; e < end; ++e) + e->~Entry(); + alloc.free_(oldTable); + } + + public: + HashTable(AllocPolicy ap) + : AllocPolicy(ap), + hashShift(sHashBits), + entryCount(0), + gen(0), + removedCount(0), + table(__null), + entered(false), + mutationCount(0) + {} + + __attribute__ ((warn_unused_result)) bool init(uint32_t length) + { + + do { } while(0); + + + + + + if (length > sMaxInit) { + this->reportAllocOverflow(); + return false; + } + uint32_t capacity = (length * sInvMaxAlpha) >> 7; + + if (capacity < sMinSize) + capacity = sMinSize; + + + uint32_t roundUp = sMinSize, roundUpLog2 = sMinSizeLog2; + while (roundUp < capacity) { + roundUp <<= 1; + ++roundUpLog2; + } + + capacity = roundUp; + do { } while(0); + + table = createTable(*this, capacity); + if (!table) + return false; + + setTableSizeLog2(roundUpLog2); + ; + return true; + } + + bool initialized() const + { + return !!table; + } + + ~HashTable() + { + if (table) + destroyTable(*this, table, capacity()); + } + + private: + static HashNumber hash1(HashNumber hash0, uint32_t shift) { + return hash0 >> shift; + } + + struct DoubleHash { + HashNumber h2; + HashNumber sizeMask; + }; + + DoubleHash hash2(HashNumber curKeyHash, uint32_t hashShift) const { + unsigned sizeLog2 = sHashBits - hashShift; + DoubleHash dh = { + ((curKeyHash << sizeLog2) >> hashShift) | 1, + (HashNumber(1) << sizeLog2) - 1 + }; + return dh; + } + + static HashNumber applyDoubleHash(HashNumber h1, const DoubleHash &dh) { + return (h1 - dh.h2) & dh.sizeMask; + } + + bool overloaded() { + return entryCount + removedCount >= ((sMaxAlphaFrac * capacity()) >> 8); + } + + bool underloaded() { + uint32_t tableCapacity = capacity(); + return tableCapacity > sMinSize && + entryCount <= ((sMinAlphaFrac * tableCapacity) >> 8); + } + + static bool match(Entry &e, const Lookup &l) { + return HashPolicy::match(HashPolicy::getKey(e.t), l); + } + + Entry &lookup(const Lookup &l, HashNumber keyHash, unsigned collisionBit) const + { + do { } while(0); + do { } while(0); + do { } while(0); + do { } while(0); + ; + + + HashNumber h1 = hash1(keyHash, hashShift); + Entry *entry = &table[h1]; + + + if (entry->isFree()) { + ; + return *entry; + } + + + if (entry->matchHash(keyHash) && match(*entry, l)) { + ; + return *entry; + } + + + DoubleHash dh = hash2(keyHash, hashShift); + + + Entry *firstRemoved = __null; + + while(true) { + if ((__builtin_expect((entry->isRemoved()), 0))) { + if (!firstRemoved) + firstRemoved = entry; + } else { + entry->setCollision(collisionBit); + } + + ; + h1 = applyDoubleHash(h1, dh); + + entry = &table[h1]; + if (entry->isFree()) { + ; + return firstRemoved ? *firstRemoved : *entry; + } + + if (entry->matchHash(keyHash) && match(*entry, l)) { + ; + return *entry; + } + } + } +# 509 "./../../dist/include/js/HashTable.h" + Entry &findFreeEntry(HashNumber keyHash) + { + ; + do { } while(0); + + + + + HashNumber h1 = hash1(keyHash, hashShift); + Entry *entry = &table[h1]; + + + if (entry->isFree()) { + ; + return *entry; + } + + + DoubleHash dh = hash2(keyHash, hashShift); + + while(true) { + do { } while(0); + entry->setCollision(); + + ; + h1 = applyDoubleHash(h1, dh); + + entry = &table[h1]; + if (entry->isFree()) { + ; + return *entry; + } + } + } + + bool changeTableSize(int deltaLog2) + { + + Entry *oldTable = table; + uint32_t oldCap = capacity(); + uint32_t newLog2 = sHashBits - hashShift + deltaLog2; + uint32_t newCapacity = ((uint32_t)1 << (newLog2)); + if (newCapacity > sMaxCapacity) { + this->reportAllocOverflow(); + return false; + } + + Entry *newTable = createTable(*this, newCapacity); + if (!newTable) + return false; + + + setTableSizeLog2(newLog2); + removedCount = 0; + gen++; + table = newTable; + + + for (Entry *src = oldTable, *end = src + oldCap; src < end; ++src) { + if (src->isLive()) { + src->unsetCollision(); + findFreeEntry(src->getKeyHash()) = Move(*src); + } + } + + destroyTable(*this, oldTable, oldCap); + return true; + } + + void add(const Lookup &l, const Entry &e) + { + HashNumber keyHash = prepareHash(l); + Entry &entry = lookup(l, keyHash, sCollisionBit); + + if (entry.isRemoved()) { + ; + removedCount--; + keyHash |= sCollisionBit; + } + + entry.t = e.t; + entry.setLive(keyHash); + entryCount++; + mutationCount++; + } + + bool checkOverloaded() + { + if (!overloaded()) + return false; + + + int deltaLog2; + if (removedCount >= (capacity() >> 2)) { + ; + deltaLog2 = 0; + } else { + ; + deltaLog2 = 1; + } + + return changeTableSize(deltaLog2); + } + + void remove(Entry &e) + { + ; + if (e.hasCollision()) { + e.setRemoved(); + removedCount++; + } else { + ; + e.setFree(); + } + entryCount--; + mutationCount++; + } + + void checkUnderloaded() + { + if (underloaded()) { + ; + (void) changeTableSize(-1); + } + } + + public: + void clear() + { + if (tl::IsPodType::result) { + memset(table, 0, sizeof(*table) * capacity()); + } else { + uint32_t tableCapacity = capacity(); + for (Entry *e = table, *end = table + tableCapacity; e < end; ++e) + *e = Move(Entry()); + } + removedCount = 0; + entryCount = 0; + mutationCount++; + } + + void finish() + { + do { } while(0); + + if (!table) + return; + + destroyTable(*this, table, capacity()); + table = __null; + gen++; + entryCount = 0; + removedCount = 0; + mutationCount++; + } + + Range all() const { + return Range(table, table + capacity()); + } + + bool empty() const { + return !entryCount; + } + + uint32_t count() const { + return entryCount; + } + + uint32_t capacity() const { + return ((uint32_t)1 << (sHashBits - hashShift)); + } + + uint32_t generation() const { + return gen; + } + + size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const { + return mallocSizeOf(table); + } + + size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const { + return mallocSizeOf(this) + sizeOfExcludingThis(mallocSizeOf); + } + + Ptr lookup(const Lookup &l) const { + ReentrancyGuard g(*this); + HashNumber keyHash = prepareHash(l); + return Ptr(lookup(l, keyHash, 0)); + } + + AddPtr lookupForAdd(const Lookup &l) const { + ReentrancyGuard g(*this); + HashNumber keyHash = prepareHash(l); + Entry &entry = lookup(l, keyHash, sCollisionBit); + AddPtr p(entry, keyHash); + p.mutationCount = mutationCount; + return p; + } + + bool add(AddPtr &p) + { + ReentrancyGuard g(*this); + do { } while(0); + do { } while(0); + do { } while(0); + do { } while(0); + + + + + + if (p.entry->isRemoved()) { + ; + removedCount--; + p.keyHash |= sCollisionBit; + } else { + if (checkOverloaded()) + + p.entry = &findFreeEntry(p.keyHash); + } + + p.entry->setLive(p.keyHash); + entryCount++; + mutationCount++; + return true; + } + + + + + + + bool add(AddPtr &p, T** pentry) + { + if (!add(p)) + return false; + *pentry = &p.entry->t; + return true; + } + + bool add(AddPtr &p, const T &t) + { + if (!add(p)) + return false; + p.entry->t = t; + return true; + } + + bool relookupOrAdd(AddPtr& p, const Lookup &l, const T& t) + { + p.mutationCount = mutationCount; + { + ReentrancyGuard g(*this); + p.entry = &lookup(l, p.keyHash, sCollisionBit); + } + return p.found() || add(p, t); + } + + void remove(Ptr p) + { + ReentrancyGuard g(*this); + do { } while(0); + remove(*p.entry); + checkUnderloaded(); + } + +#undef METER +}; + +} +# 810 "./../../dist/include/js/HashTable.h" +template +struct DefaultHasher +{ + typedef Key Lookup; + static HashNumber hash(const Lookup &l) { + + return l; + } + static bool match(const Key &k, const Lookup &l) { + + return k == l; + } +}; + + + + + +template +struct PointerHasher +{ + typedef Key Lookup; + static HashNumber hash(const Lookup &l) { + size_t word = reinterpret_cast(l) >> zeroBits; + typedef int moz_static_assert17[(sizeof(HashNumber) == 4) ? 1 : -1]; + + return HashNumber(word); + + + + + } + static bool match(const Key &k, const Lookup &l) { + return k == l; + } +}; + +template +struct TaggedPointerHasher +{ + typedef Key Lookup; + + static HashNumber hash(const Lookup &l) { + return PointerHasher::hash(l); + } + + static const uintptr_t COMPARE_MASK = uintptr_t(-1) - 1; + + static bool match(const Key &k, const Lookup &l) { + return (uintptr_t(k) & COMPARE_MASK) == uintptr_t(l); + } +}; + + + + + +template +struct DefaultHasher: PointerHasher::result> { }; + + + +template +class HashMapEntry +{ + template friend class detail::HashTable; + template friend class detail::HashTableEntry; + void operator=(const HashMapEntry &rhs) { + const_cast(key) = rhs.key; + value = rhs.value; + } + + public: + HashMapEntry() : key(), value() {} + + template + HashMapEntry(const KeyInput &k, const ValueInput &v) : key(k), value(v) {} + + HashMapEntry(MoveRef rhs) + : key(Move(rhs->key)), value(Move(rhs->value)) { } + void operator=(MoveRef rhs) { + const_cast(key) = Move(rhs->key); + value = Move(rhs->value); + } + + const Key key; + Value value; +}; + +namespace tl { + +template +struct IsPodType > { + static const bool result = IsPodType::result; +}; + +template +struct IsPodType > +{ + static const bool result = IsPodType::result && IsPodType::result; +}; + +} +# 930 "./../../dist/include/js/HashTable.h" +template , + class AllocPolicy = TempAllocPolicy> +class HashMap +{ + public: + typedef typename HashPolicy::Lookup Lookup; + + typedef HashMapEntry Entry; + + private: + + struct MapHashPolicy : HashPolicy + { + typedef Key KeyType; + static const Key &getKey(Entry &e) { return e.key; } + static void setKey(Entry &e, Key &k) { const_cast(e.key) = k; } + }; + typedef detail::HashTable Impl; + + friend class Impl::Enum; + + + HashMap(const HashMap &); + HashMap &operator=(const HashMap &); + + Impl impl; + + public: + const static unsigned sDefaultInitSize = Impl::sDefaultInitSize; + + + + + + HashMap(AllocPolicy a = AllocPolicy()) : impl(a) {} + bool init(uint32_t len = sDefaultInitSize) { return impl.init(len); } + bool initialized() const { return impl.initialized(); } +# 983 "./../../dist/include/js/HashTable.h" + typedef typename Impl::Ptr Ptr; + Ptr lookup(const Lookup &l) const { return impl.lookup(l); } + + + void remove(Ptr p) { impl.remove(p); } +# 1024 "./../../dist/include/js/HashTable.h" + typedef typename Impl::AddPtr AddPtr; + AddPtr lookupForAdd(const Lookup &l) const { + return impl.lookupForAdd(l); + } + + template + bool add(AddPtr &p, const KeyInput &k, const ValueInput &v) { + Entry *pentry; + if (!impl.add(p, &pentry)) + return false; + const_cast(pentry->key) = k; + pentry->value = v; + return true; + } + + bool add(AddPtr &p, const Key &k, MoveRef v) { + Entry *pentry; + if (!impl.add(p, &pentry)) + return false; + const_cast(pentry->key) = k; + pentry->value = v; + return true; + } + + bool add(AddPtr &p, const Key &k) { + Entry *pentry; + if (!impl.add(p, &pentry)) + return false; + const_cast(pentry->key) = k; + return true; + } + + template + bool relookupOrAdd(AddPtr &p, const KeyInput &k, const ValueInput &v) { + return impl.relookupOrAdd(p, k, Entry(k, v)); + } +# 1071 "./../../dist/include/js/HashTable.h" + typedef typename Impl::Range Range; + Range all() const { return impl.all(); } + uint32_t count() const { return impl.count(); } + size_t capacity() const { return impl.capacity(); } + size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const { + return impl.sizeOfExcludingThis(mallocSizeOf); + } + size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const { + + + + + return mallocSizeOf(this) + impl.sizeOfExcludingThis(mallocSizeOf); + } +# 1099 "./../../dist/include/js/HashTable.h" + typedef typename Impl::Enum Enum; + + + + + + void clear() { impl.clear(); } + + + + + + void finish() { impl.finish(); } + + + bool empty() const { return impl.empty(); } + + + + + + unsigned generation() const { return impl.generation(); } + + + + bool has(const Lookup &l) const { + return impl.lookup(l) != __null; + } + + + template + bool put(const KeyInput &k, const ValueInput &v) { + AddPtr p = lookupForAdd(k); + if (p) { + p->value = v; + return true; + } + return add(p, k, v); + } + + + bool putNew(const Key &k, const Value &v) { + AddPtr p = lookupForAdd(k); + do { } while(0); + return add(p, k, v); + } + + + Ptr lookupWithDefault(const Key &k, const Value &defaultValue) { + AddPtr p = lookupForAdd(k); + if (p) + return p; + (void)add(p, k, defaultValue); + return p; + } + + + void remove(const Lookup &l) { + if (Ptr p = lookup(l)) + remove(p); + } +}; +# 1178 "./../../dist/include/js/HashTable.h" +template , class AllocPolicy = TempAllocPolicy> +class HashSet +{ + typedef typename HashPolicy::Lookup Lookup; + + + struct SetOps : HashPolicy { + typedef T KeyType; + static const KeyType &getKey(const T &t) { return t; } + static void setKey(T &t, KeyType &k) { t = k; } + }; + typedef detail::HashTable Impl; + + friend class Impl::Enum; + + + HashSet(const HashSet &); + HashSet &operator=(const HashSet &); + + Impl impl; + + public: + const static unsigned sDefaultInitSize = Impl::sDefaultInitSize; + + + + + + HashSet(AllocPolicy a = AllocPolicy()) : impl(a) {} + bool init(uint32_t len = sDefaultInitSize) { return impl.init(len); } + bool initialized() const { return impl.initialized(); } +# 1221 "./../../dist/include/js/HashTable.h" + typedef typename Impl::Ptr Ptr; + Ptr lookup(const Lookup &l) const { return impl.lookup(l); } + + + void remove(Ptr p) { impl.remove(p); } +# 1261 "./../../dist/include/js/HashTable.h" + typedef typename Impl::AddPtr AddPtr; + AddPtr lookupForAdd(const Lookup &l) const { + return impl.lookupForAdd(l); + } + + bool add(AddPtr &p, const T &t) { + return impl.add(p, t); + } + + bool relookupOrAdd(AddPtr &p, const Lookup &l, const T &t) { + return impl.relookupOrAdd(p, l, t); + } +# 1284 "./../../dist/include/js/HashTable.h" + typedef typename Impl::Range Range; + Range all() const { return impl.all(); } + uint32_t count() const { return impl.count(); } + size_t capacity() const { return impl.capacity(); } + size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const { + return impl.sizeOfExcludingThis(mallocSizeOf); + } + size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const { + + + + + return mallocSizeOf(this) + impl.sizeOfExcludingThis(mallocSizeOf); + } +# 1312 "./../../dist/include/js/HashTable.h" + typedef typename Impl::Enum Enum; + + + + + + void clear() { impl.clear(); } + + + + + + void finish() { impl.finish(); } + + + bool empty() const { return impl.empty(); } + + + + + + unsigned generation() const { return impl.generation(); } + + + + bool has(const Lookup &l) const { + return impl.lookup(l) != __null; + } + + + bool put(const T &t) { + AddPtr p = lookupForAdd(t); + return p ? true : add(p, t); + } + + + bool putNew(const T &t) { + AddPtr p = lookupForAdd(t); + do { } while(0); + return add(p, t); + } + + bool putNew(const Lookup &l, const T &t) { + AddPtr p = lookupForAdd(l); + do { } while(0); + return add(p, t); + } + + void remove(const Lookup &l) { + if (Ptr p = lookup(l)) + remove(p); + } +}; + +} +# 29 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprvtd.h" 2 + + + +extern "C" { + + + + +#define JS_BITS_PER_UINT32_LOG2 5 +#define JS_BITS_PER_UINT32 32 + + +static const unsigned JS_GCTHING_ALIGN = 8; +static const unsigned JS_GCTHING_ZEROBITS = 3; + + +typedef uint8_t jsbytecode; +typedef uint8_t jssrcnote; +typedef uintptr_t jsatomid; + + +typedef struct JSArgumentFormatMap JSArgumentFormatMap; +typedef struct JSGCThing JSGCThing; +typedef struct JSGenerator JSGenerator; +typedef struct JSNativeEnumerator JSNativeEnumerator; +typedef struct JSProperty JSProperty; +typedef struct JSSharpObjectMap JSSharpObjectMap; +typedef struct JSTryNote JSTryNote; + + +typedef struct JSAtomState JSAtomState; +typedef struct JSCodeSpec JSCodeSpec; +typedef struct JSPrinter JSPrinter; +typedef struct JSStackHeader JSStackHeader; +typedef struct JSSubString JSSubString; +typedef struct JSSpecializedNative JSSpecializedNative; + + +typedef struct JSXML JSXML; +# 79 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprvtd.h" +extern "C++" { + +class JSDependentString; +class JSExtensibleString; +class JSExternalString; +class JSLinearString; +class JSFixedString; +class JSStaticAtom; +class JSRope; +class JSAtom; +class JSWrapper; + +namespace js { + +struct ArgumentsData; +struct Class; + +class RegExpGuard; +class RegExpObject; +class RegExpObjectBuilder; +class RegExpShared; +class RegExpStatics; +class MatchPairs; +class PropertyName; + +namespace detail { class RegExpCode; } + +enum RegExpFlag +{ + IgnoreCaseFlag = 0x01, + GlobalFlag = 0x02, + MultilineFlag = 0x04, + StickyFlag = 0x08, + + NoFlags = 0x00, + AllFlags = 0x0f +}; + +enum RegExpExecType +{ + RegExpExec, + RegExpTest +}; + +class ExecuteArgsGuard; +class InvokeFrameGuard; +class InvokeArgsGuard; +class StringBuffer; + +class FrameRegs; +class StackFrame; +class StackSegment; +class StackSpace; +class ContextStack; +class ScriptFrameIter; +class CallReceiver; +class CallArgs; + +struct BytecodeEmitter; +struct Definition; +struct FunctionBox; +struct ObjectBox; +struct ParseNode; +struct Parser; +struct SharedContext; +class TokenStream; +struct Token; +struct TokenPos; +struct TokenPtr; +struct TreeContext; +class UpvarCookie; + +class Proxy; +class BaseProxyHandler; +class DirectWrapper; +class CrossCompartmentWrapper; + +class TempAllocPolicy; +class RuntimeAllocPolicy; + +class GlobalObject; + +template +class InlineMap; + +class LifoAlloc; + +class BaseShape; +class UnownedBaseShape; +struct Shape; +struct EmptyShape; +class ShapeKindArray; +class Bindings; + +struct StackBaseShape; +struct StackShape; + +class MultiDeclRange; +class ParseMapPool; +class DefnOrHeader; +typedef InlineMap AtomDefnMap; +typedef InlineMap AtomIndexMap; +typedef InlineMap AtomDOHMap; +typedef Vector UpvarCookies; + +class Breakpoint; +class BreakpointSite; +class Debugger; +class WatchpointMap; + + + + + + + +typedef JSObject Env; + +typedef JSNative Native; +typedef JSPropertyOp PropertyOp; +typedef JSStrictPropertyOp StrictPropertyOp; +typedef JSPropertyDescriptor PropertyDescriptor; + +namespace analyze { + +struct LifetimeVariable; +class LoopAnalysis; +class ScriptAnalysis; +class SlotValue; +class SSAValue; +class SSAUseChain; + +} + +namespace types { + +class TypeSet; +struct TypeCallsite; +struct TypeObject; +struct TypeCompartment; + +} + +typedef JS::Handle HandleShape; +typedef JS::Handle HandleBaseShape; +typedef JS::Handle HandleTypeObject; +typedef JS::Handle HandleAtom; +typedef JS::Handle HandlePropertyName; + +typedef JS::Rooted RootedShape; +typedef JS::Rooted RootedBaseShape; +typedef JS::Rooted RootedTypeObject; +typedef JS::Rooted RootedAtom; +typedef JS::Rooted RootedPropertyName; + +enum XDRMode { + XDR_ENCODE, + XDR_DECODE +}; + +template +class XDRState; + +class FreeOp; + +} + +namespace JSC { + +class ExecutableAllocator; + +} + +namespace WTF { + +class BumpPointerAllocator; + +} + +} +# 269 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprvtd.h" +typedef enum JSTrapStatus { + JSTRAP_ERROR, + JSTRAP_CONTINUE, + JSTRAP_RETURN, + JSTRAP_THROW, + JSTRAP_LIMIT +} JSTrapStatus; + +typedef JSTrapStatus +(* JSTrapHandler)(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval, + jsval closure); + +typedef JSTrapStatus +(* JSInterruptHook)(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval, + void *closure); + +typedef JSTrapStatus +(* JSDebuggerHandler)(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval, + void *closure); + +typedef JSTrapStatus +(* JSThrowHook)(JSContext *cx, JSScript *script, jsbytecode *pc, jsval *rval, + void *closure); + +typedef JSBool +(* JSWatchPointHandler)(JSContext *cx, JSObject *obj, jsid id, jsval old, + jsval *newp, void *closure); + + +typedef void +(* JSNewScriptHook)(JSContext *cx, + const char *filename, + unsigned lineno, + JSScript *script, + JSFunction *fun, + void *callerdata); + + +typedef void +(* JSDestroyScriptHook)(JSFreeOp *fop, + JSScript *script, + void *callerdata); + +typedef void +(* JSSourceHandler)(const char *filename, unsigned lineno, const jschar *str, + size_t length, void **listenerTSData, void *closure); +# 341 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprvtd.h" +typedef void * +(* JSInterpreterHook)(JSContext *cx, JSStackFrame *fp, JSBool before, + JSBool *ok, void *closure); + +typedef JSBool +(* JSDebugErrorHook)(JSContext *cx, const char *message, JSErrorReport *report, + void *closure); + +typedef struct JSDebugHooks { + JSInterruptHook interruptHook; + void *interruptHookData; + JSNewScriptHook newScriptHook; + void *newScriptHookData; + JSDestroyScriptHook destroyScriptHook; + void *destroyScriptHookData; + JSDebuggerHandler debuggerHandler; + void *debuggerHandlerData; + JSSourceHandler sourceHandler; + void *sourceHandlerData; + JSInterpreterHook executeHook; + void *executeHookData; + JSInterpreterHook callHook; + void *callHookData; + JSThrowHook throwHook; + void *throwHookData; + JSDebugErrorHook debugErrorHook; + void *debugErrorHookData; +} JSDebugHooks; + + + + + + + +typedef JSObject * +(* JSObjectOp)(JSContext *cx, JSHandleObject obj); + + +typedef JSObject * +(* JSClassInitializerOp)(JSContext *cx, JSObject *obj); + + + + + +typedef JSObject * +(* JSIteratorOp)(JSContext *cx, JSHandleObject obj, JSBool keysonly); +# 397 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprvtd.h" +extern JSBool js_CStringsAreUTF8; + + +} +# 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jshash.h" 1 + + + + + + + +#define jshash_h___ + + + + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jshash.h" 2 + + + +extern "C" { + +typedef uint32_t JSHashNumber; +typedef struct JSHashEntry JSHashEntry; +typedef struct JSHashTable JSHashTable; + +#define JS_HASH_BITS 32 +#define JS_GOLDEN_RATIO 0x9E3779B9U + +typedef JSHashNumber (* JSHashFunction)(const void *key); +typedef int (* JSHashComparator)(const void *v1, const void *v2); +typedef int (* JSHashEnumerator)(JSHashEntry *he, int i, void *arg); + + +#define HT_ENUMERATE_NEXT 0 +#define HT_ENUMERATE_STOP 1 +#define HT_ENUMERATE_REMOVE 2 + +typedef struct JSHashAllocOps { + void * (*allocTable)(void *pool, size_t size); + void (*freeTable)(void *pool, void *item, size_t size); + JSHashEntry * (*allocEntry)(void *pool, const void *key); + void (*freeEntry)(void *pool, JSHashEntry *he, unsigned flag); +} JSHashAllocOps; + +#define HT_FREE_VALUE 0 +#define HT_FREE_ENTRY 1 + +struct JSHashEntry { + JSHashEntry *next; + JSHashNumber keyHash; + const void *key; + void *value; +}; + +struct JSHashTable { + JSHashEntry **buckets; + uint32_t nentries; + uint32_t shift; + JSHashFunction keyHash; + JSHashComparator keyCompare; + JSHashComparator valueCompare; + JSHashAllocOps *allocOps; + void *allocPriv; + + + + + + +}; + + + + + +extern __attribute__((visibility("default"))) JSHashTable * +JS_NewHashTable(uint32_t n, JSHashFunction keyHash, + JSHashComparator keyCompare, JSHashComparator valueCompare, + JSHashAllocOps *allocOps, void *allocPriv); + +extern __attribute__((visibility("default"))) void +JS_HashTableDestroy(JSHashTable *ht); + + +extern __attribute__((visibility("default"))) JSHashEntry ** +JS_HashTableRawLookup(JSHashTable *ht, JSHashNumber keyHash, const void *key); + + +extern __attribute__((visibility("default"))) JSHashEntry * +JS_HashTableRawAdd(JSHashTable *ht, JSHashEntry **&hep, JSHashNumber keyHash, + const void *key, void *value); + + +extern __attribute__((visibility("default"))) void +JS_HashTableRawRemove(JSHashTable *ht, JSHashEntry **hep, JSHashEntry *he); + + +extern __attribute__((visibility("default"))) JSHashEntry * +JS_HashTableAdd(JSHashTable *ht, const void *key, void *value); + +extern __attribute__((visibility("default"))) JSBool +JS_HashTableRemove(JSHashTable *ht, const void *key); + +extern __attribute__((visibility("default"))) int +JS_HashTableEnumerateEntries(JSHashTable *ht, JSHashEnumerator f, void *arg); + +extern __attribute__((visibility("default"))) void * +JS_HashTableLookup(JSHashTable *ht, const void *key); + +extern __attribute__((visibility("default"))) int +JS_HashTableDump(JSHashTable *ht, JSHashEnumerator dump, FILE *fp); + + +extern __attribute__((visibility("default"))) JSHashNumber +JS_HashString(const void *key); + + +extern __attribute__((visibility("default"))) int +JS_CompareValues(const void *v1, const void *v2); + +} +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jslock.h" 1 + + + + + + +#define jslock_h__ + + + + + +# 1 "/usr/include/nspr/pratom.h" 1 +# 12 "/usr/include/nspr/pratom.h" +#define pratom_h___ + +# 1 "/usr/include/nspr/prtypes.h" 1 +# 21 "/usr/include/nspr/prtypes.h" +#define prtypes_h___ + + + + +# 1 "/usr/include/nspr/prcpucfg.h" 1 +# 12 "/usr/include/nspr/prcpucfg.h" +#define nspr_cpucfg___ + + + + + + +#define LINUX + + + + + + + +#define PR_AF_INET6 10 +# 547 "/usr/include/nspr/prcpucfg.h" +#define IS_LITTLE_ENDIAN 1 +#undef IS_BIG_ENDIAN + + + + +#define PR_BYTES_PER_BYTE 1 +#define PR_BYTES_PER_SHORT 2 +#define PR_BYTES_PER_INT 4 +#define PR_BYTES_PER_INT64 8 +#define PR_BYTES_PER_LONG 4 +#define PR_BYTES_PER_FLOAT 4 +#define PR_BYTES_PER_DOUBLE 8 +#define PR_BYTES_PER_WORD 4 +#define PR_BYTES_PER_DWORD 8 + +#define PR_BITS_PER_BYTE 8 +#define PR_BITS_PER_SHORT 16 +#define PR_BITS_PER_INT 32 +#define PR_BITS_PER_INT64 64 +#define PR_BITS_PER_LONG 32 +#define PR_BITS_PER_FLOAT 32 +#define PR_BITS_PER_DOUBLE 64 +#define PR_BITS_PER_WORD 32 + +#define PR_BITS_PER_BYTE_LOG2 3 +#define PR_BITS_PER_SHORT_LOG2 4 +#define PR_BITS_PER_INT_LOG2 5 +#define PR_BITS_PER_INT64_LOG2 6 +#define PR_BITS_PER_LONG_LOG2 5 +#define PR_BITS_PER_FLOAT_LOG2 5 +#define PR_BITS_PER_DOUBLE_LOG2 6 +#define PR_BITS_PER_WORD_LOG2 5 + +#define PR_ALIGN_OF_SHORT 2 +#define PR_ALIGN_OF_INT 4 +#define PR_ALIGN_OF_LONG 4 +#define PR_ALIGN_OF_INT64 4 +#define PR_ALIGN_OF_FLOAT 4 +#define PR_ALIGN_OF_DOUBLE 4 +#define PR_ALIGN_OF_POINTER 4 +#define PR_ALIGN_OF_WORD 4 + +#define PR_BYTES_PER_WORD_LOG2 2 +#define PR_BYTES_PER_DWORD_LOG2 3 +# 871 "/usr/include/nspr/prcpucfg.h" +#define HAVE_LONG_LONG +# 27 "/usr/include/nspr/prtypes.h" 2 + + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 30 "/usr/include/nspr/prtypes.h" 2 +# 125 "/usr/include/nspr/prtypes.h" +#define PR_VISIBILITY_DEFAULT __attribute__((visibility("default"))) + + + + +#define PR_EXPORT(__type) extern PR_VISIBILITY_DEFAULT __type +#define PR_EXPORT_DATA(__type) extern PR_VISIBILITY_DEFAULT __type +#define PR_IMPORT(__type) extern PR_VISIBILITY_DEFAULT __type +#define PR_IMPORT_DATA(__type) extern PR_VISIBILITY_DEFAULT __type + +#define PR_EXTERN(__type) extern PR_VISIBILITY_DEFAULT __type +#define PR_IMPLEMENT(__type) PR_VISIBILITY_DEFAULT __type +#define PR_EXTERN_DATA(__type) extern PR_VISIBILITY_DEFAULT __type +#define PR_IMPLEMENT_DATA(__type) PR_VISIBILITY_DEFAULT __type +#define PR_CALLBACK +#define PR_CALLBACK_DECL +#define PR_STATIC_CALLBACK(__x) static __x + + + + + + + +#define NSPR_API(__type) PR_IMPORT(__type) +#define NSPR_DATA_API(__type) PR_IMPORT_DATA(__type) +# 160 "/usr/include/nspr/prtypes.h" +#define PR_BEGIN_MACRO do { +#define PR_END_MACRO } while (0) +# 170 "/usr/include/nspr/prtypes.h" +#define PR_BEGIN_EXTERN_C extern "C" { +#define PR_END_EXTERN_C } +# 183 "/usr/include/nspr/prtypes.h" +#define PR_BIT(n) ((PRUint32)1 << (n)) +#define PR_BITMASK(n) (PR_BIT(n) - 1) +# 194 "/usr/include/nspr/prtypes.h" +#define PR_ROUNDUP(x,y) ((((x)+((y)-1))/(y))*(y)) +#define PR_MIN(x,y) ((x)<(y)?(x):(y)) +#define PR_MAX(x,y) ((x)>(y)?(x):(y)) +#define PR_ABS(x) ((x)<0?-(x):(x)) + + + + + + +#define PR_ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0])) + +extern "C" { +# 216 "/usr/include/nspr/prtypes.h" +typedef unsigned char PRUint8; +# 230 "/usr/include/nspr/prtypes.h" +typedef signed char PRInt8; +# 244 "/usr/include/nspr/prtypes.h" +#define PR_INT8_MAX 127 +#define PR_INT8_MIN (-128) +#define PR_UINT8_MAX 255U +# 255 "/usr/include/nspr/prtypes.h" +typedef unsigned short PRUint16; +typedef short PRInt16; +# 269 "/usr/include/nspr/prtypes.h" +#define PR_INT16_MAX 32767 +#define PR_INT16_MIN (-32768) +#define PR_UINT16_MAX 65535U +# 280 "/usr/include/nspr/prtypes.h" +typedef unsigned int PRUint32; +typedef int PRInt32; +#define PR_INT32(x) x +#define PR_UINT32(x) x ## U +# 301 "/usr/include/nspr/prtypes.h" +#define PR_INT32_MAX PR_INT32(2147483647) +#define PR_INT32_MIN (-PR_INT32_MAX - 1) +#define PR_UINT32_MAX PR_UINT32(4294967295) +# 350 "/usr/include/nspr/prtypes.h" +typedef long long PRInt64; +typedef unsigned long long PRUint64; +#define PR_INT64(x) x ## LL +#define PR_UINT64(x) x ## ULL + + +#define PR_INT64_MAX PR_INT64(0x7fffffffffffffff) +#define PR_INT64_MIN (-PR_INT64_MAX - 1) +#define PR_UINT64_MAX PR_UINT64(-1) +# 385 "/usr/include/nspr/prtypes.h" +typedef int PRIntn; +typedef unsigned int PRUintn; +# 396 "/usr/include/nspr/prtypes.h" +typedef double PRFloat64; + + + + + + +typedef size_t PRSize; + + + + + + + +typedef PRInt32 PROffset32; +typedef PRInt64 PROffset64; + + + + + + + +typedef ptrdiff_t PRPtrdiff; +# 431 "/usr/include/nspr/prtypes.h" +typedef unsigned long PRUptrdiff; +# 442 "/usr/include/nspr/prtypes.h" +typedef PRIntn PRBool; +#define PR_TRUE 1 +#define PR_FALSE 0 + + + + + + + +typedef PRUint8 PRPackedBool; + + + + + +typedef enum { PR_FAILURE = -1, PR_SUCCESS = 0 } PRStatus; + + +#define __PRUNICHAR__ + + + +typedef PRUint16 PRUnichar; +# 484 "/usr/include/nspr/prtypes.h" +typedef long PRWord; +typedef unsigned long PRUword; +# 534 "/usr/include/nspr/prtypes.h" +#define PR_STATIC_ASSERT(condition) extern void pr_static_assert(int arg[(condition) ? 1 : -1]) + + +} +# 15 "/usr/include/nspr/pratom.h" 2 +# 1 "/usr/include/nspr/prlock.h" 1 +# 17 "/usr/include/nspr/prlock.h" +#define prlock_h___ + + + +extern "C" { +# 34 "/usr/include/nspr/prlock.h" +typedef struct PRLock PRLock; +# 51 "/usr/include/nspr/prlock.h" +extern __attribute__((visibility("default"))) PRLock* PR_NewLock(void); +# 62 "/usr/include/nspr/prlock.h" +extern __attribute__((visibility("default"))) void PR_DestroyLock(PRLock *lock); +# 73 "/usr/include/nspr/prlock.h" +extern __attribute__((visibility("default"))) void PR_Lock(PRLock *lock); +# 85 "/usr/include/nspr/prlock.h" +extern __attribute__((visibility("default"))) PRStatus PR_Unlock(PRLock *lock); +# 101 "/usr/include/nspr/prlock.h" +#define PR_ASSERT_CURRENT_THREAD_OWNS_LOCK(lock) + + + +extern __attribute__((visibility("default"))) void PR_AssertCurrentThreadOwnsLock(PRLock *lock); + +} +# 16 "/usr/include/nspr/pratom.h" 2 + +extern "C" { +# 28 "/usr/include/nspr/pratom.h" +extern __attribute__((visibility("default"))) PRInt32 PR_AtomicIncrement(PRInt32 *val); +# 39 "/usr/include/nspr/pratom.h" +extern __attribute__((visibility("default"))) PRInt32 PR_AtomicDecrement(PRInt32 *val); +# 51 "/usr/include/nspr/pratom.h" +extern __attribute__((visibility("default"))) PRInt32 PR_AtomicSet(PRInt32 *val, PRInt32 newval); +# 63 "/usr/include/nspr/pratom.h" +extern __attribute__((visibility("default"))) PRInt32 PR_AtomicAdd(PRInt32 *ptr, PRInt32 val); +# 128 "/usr/include/nspr/pratom.h" +#define PR_ATOMIC_INCREMENT(val) PR_AtomicIncrement(val) +#define PR_ATOMIC_DECREMENT(val) PR_AtomicDecrement(val) +#define PR_ATOMIC_SET(val,newval) PR_AtomicSet(val, newval) +#define PR_ATOMIC_ADD(ptr,val) PR_AtomicAdd(ptr, val) + + + + + + +typedef struct PRStackElemStr PRStackElem; + +struct PRStackElemStr { + PRStackElem *prstk_elem_next; + +}; + +typedef struct PRStackStr PRStack; +# 156 "/usr/include/nspr/pratom.h" +extern __attribute__((visibility("default"))) PRStack * PR_CreateStack(const char *stack_name); +# 168 "/usr/include/nspr/pratom.h" +extern __attribute__((visibility("default"))) void PR_StackPush(PRStack *stack, PRStackElem *stack_elem); +# 181 "/usr/include/nspr/pratom.h" +extern __attribute__((visibility("default"))) PRStackElem * PR_StackPop(PRStack *stack); +# 195 "/usr/include/nspr/pratom.h" +extern __attribute__((visibility("default"))) PRStatus PR_DestroyStack(PRStack *stack); + +} +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jslock.h" 2 +# 1 "/usr/include/nspr/prlock.h" 1 +# 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jslock.h" 2 +# 1 "/usr/include/nspr/prcvar.h" 1 + + + + + + +#define prcvar_h___ + + +# 1 "/usr/include/nspr/prinrval.h" 1 +# 19 "/usr/include/nspr/prinrval.h" +#define prinrval_h + + + +extern "C" { + + + + + +typedef PRUint32 PRIntervalTime; +# 39 "/usr/include/nspr/prinrval.h" +#define PR_INTERVAL_MIN 1000UL +#define PR_INTERVAL_MAX 100000UL +# 53 "/usr/include/nspr/prinrval.h" +#define PR_INTERVAL_NO_WAIT 0UL +#define PR_INTERVAL_NO_TIMEOUT 0xffffffffUL +# 79 "/usr/include/nspr/prinrval.h" +extern __attribute__((visibility("default"))) PRIntervalTime PR_IntervalNow(void); +# 97 "/usr/include/nspr/prinrval.h" +extern __attribute__((visibility("default"))) PRUint32 PR_TicksPerSecond(void); +# 116 "/usr/include/nspr/prinrval.h" +extern __attribute__((visibility("default"))) PRIntervalTime PR_SecondsToInterval(PRUint32 seconds); +extern __attribute__((visibility("default"))) PRIntervalTime PR_MillisecondsToInterval(PRUint32 milli); +extern __attribute__((visibility("default"))) PRIntervalTime PR_MicrosecondsToInterval(PRUint32 micro); +# 137 "/usr/include/nspr/prinrval.h" +extern __attribute__((visibility("default"))) PRUint32 PR_IntervalToSeconds(PRIntervalTime ticks); +extern __attribute__((visibility("default"))) PRUint32 PR_IntervalToMilliseconds(PRIntervalTime ticks); +extern __attribute__((visibility("default"))) PRUint32 PR_IntervalToMicroseconds(PRIntervalTime ticks); + +} +# 11 "/usr/include/nspr/prcvar.h" 2 + +extern "C" { + +typedef struct PRCondVar PRCondVar; +# 27 "/usr/include/nspr/prcvar.h" +extern __attribute__((visibility("default"))) PRCondVar* PR_NewCondVar(PRLock *lock); + + + + + + + +extern __attribute__((visibility("default"))) void PR_DestroyCondVar(PRCondVar *cvar); +# 65 "/usr/include/nspr/prcvar.h" +extern __attribute__((visibility("default"))) PRStatus PR_WaitCondVar(PRCondVar *cvar, PRIntervalTime timeout); +# 80 "/usr/include/nspr/prcvar.h" +extern __attribute__((visibility("default"))) PRStatus PR_NotifyCondVar(PRCondVar *cvar); +# 90 "/usr/include/nspr/prcvar.h" +extern __attribute__((visibility("default"))) PRStatus PR_NotifyAllCondVar(PRCondVar *cvar); + +} +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jslock.h" 2 +# 1 "/usr/include/nspr/prthread.h" 1 + + + + + + +#define prthread_h___ +# 49 "/usr/include/nspr/prthread.h" +extern "C" { + +typedef struct PRThread PRThread; +typedef struct PRThreadStack PRThreadStack; + +typedef enum PRThreadType { + PR_USER_THREAD, + PR_SYSTEM_THREAD +} PRThreadType; + +typedef enum PRThreadScope { + PR_LOCAL_THREAD, + PR_GLOBAL_THREAD, + PR_GLOBAL_BOUND_THREAD +} PRThreadScope; + +typedef enum PRThreadState { + PR_JOINABLE_THREAD, + PR_UNJOINABLE_THREAD +} PRThreadState; + +typedef enum PRThreadPriority +{ + PR_PRIORITY_FIRST = 0, + PR_PRIORITY_LOW = 0, + PR_PRIORITY_NORMAL = 1, + PR_PRIORITY_HIGH = 2, + PR_PRIORITY_URGENT = 3, + PR_PRIORITY_LAST = 3 +} PRThreadPriority; +# 105 "/usr/include/nspr/prthread.h" +extern __attribute__((visibility("default"))) PRThread* PR_CreateThread(PRThreadType type, + void ( *start)(void *arg), + void *arg, + PRThreadPriority priority, + PRThreadScope scope, + PRThreadState state, + PRUint32 stackSize); +# 126 "/usr/include/nspr/prthread.h" +extern __attribute__((visibility("default"))) PRStatus PR_JoinThread(PRThread *thread); + + + + + +extern __attribute__((visibility("default"))) PRThread* PR_GetCurrentThread(void); + + + + + + + +extern __attribute__((visibility("default"))) PRThreadPriority PR_GetThreadPriority(const PRThread *thread); + + + + +extern __attribute__((visibility("default"))) void PR_SetThreadPriority(PRThread *thread, PRThreadPriority priority); + + + + + +extern __attribute__((visibility("default"))) PRStatus PR_SetCurrentThreadName(const char *name); + + + + +extern __attribute__((visibility("default"))) const char * PR_GetThreadName(const PRThread *thread); +# 182 "/usr/include/nspr/prthread.h" +typedef void ( *PRThreadPrivateDTOR)(void *priv); + +extern __attribute__((visibility("default"))) PRStatus PR_NewThreadPrivateIndex( + PRUintn *newIndex, PRThreadPrivateDTOR destructor); +# 198 "/usr/include/nspr/prthread.h" +extern __attribute__((visibility("default"))) PRStatus PR_SetThreadPrivate(PRUintn tpdIndex, void *priv); +# 209 "/usr/include/nspr/prthread.h" +extern __attribute__((visibility("default"))) void* PR_GetThreadPrivate(PRUintn tpdIndex); +# 221 "/usr/include/nspr/prthread.h" +extern __attribute__((visibility("default"))) PRStatus PR_Interrupt(PRThread *thread); + + + + + +extern __attribute__((visibility("default"))) void PR_ClearInterrupt(void); + + + + +extern __attribute__((visibility("default"))) void PR_BlockInterrupt(void); + + + + +extern __attribute__((visibility("default"))) void PR_UnblockInterrupt(void); +# 246 "/usr/include/nspr/prthread.h" +extern __attribute__((visibility("default"))) PRStatus PR_Sleep(PRIntervalTime ticks); + + + + +extern __attribute__((visibility("default"))) PRThreadScope PR_GetThreadScope(const PRThread *thread); + + + + +extern __attribute__((visibility("default"))) PRThreadType PR_GetThreadType(const PRThread *thread); + + + + +extern __attribute__((visibility("default"))) PRThreadState PR_GetThreadState(const PRThread *thread); + +} +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jslock.h" 2 +# 1 "/usr/include/nspr/prinit.h" 1 + + + + + + +#define prinit_h___ + +# 1 "/usr/include/nspr/prthread.h" 1 +# 10 "/usr/include/nspr/prinit.h" 2 + +# 1 "/usr/include/nspr/prwin16.h" 1 + + + + + + +#define prwin16_h___ +# 153 "/usr/include/nspr/prwin16.h" +#define PR_STDIO_INIT() +# 12 "/usr/include/nspr/prinit.h" 2 + + +extern "C" { +# 24 "/usr/include/nspr/prinit.h" +#define PR_NAME "NSPR" +# 34 "/usr/include/nspr/prinit.h" +#define PR_VERSION "4.9.2" +#define PR_VMAJOR 4 +#define PR_VMINOR 9 +#define PR_VPATCH 2 +#define PR_BETA PR_FALSE +# 56 "/usr/include/nspr/prinit.h" +typedef PRBool (*PRVersionCheck)(const char*); +# 66 "/usr/include/nspr/prinit.h" +extern __attribute__((visibility("default"))) PRBool PR_VersionCheck(const char *importedVersion); + + + + +extern __attribute__((visibility("default"))) const char* PR_GetVersion(void); +# 84 "/usr/include/nspr/prinit.h" +extern __attribute__((visibility("default"))) void PR_Init( + PRThreadType type, PRThreadPriority priority, PRUintn maxPTDs); +# 105 "/usr/include/nspr/prinit.h" +typedef PRIntn ( *PRPrimordialFn)(PRIntn argc, char **argv); + +extern __attribute__((visibility("default"))) PRIntn PR_Initialize( + PRPrimordialFn prmain, PRIntn argc, char **argv, PRUintn maxPTDs); + + + + +extern __attribute__((visibility("default"))) PRBool PR_Initialized(void); +# 131 "/usr/include/nspr/prinit.h" +extern __attribute__((visibility("default"))) PRStatus PR_Cleanup(void); + + + + + +extern __attribute__((visibility("default"))) void PR_DisableClockInterrupts(void); + + + + + +extern __attribute__((visibility("default"))) void PR_EnableClockInterrupts(void); + + + + + +extern __attribute__((visibility("default"))) void PR_BlockClockInterrupts(void); + + + + + +extern __attribute__((visibility("default"))) void PR_UnblockClockInterrupts(void); + + + + +extern __attribute__((visibility("default"))) void PR_SetConcurrency(PRUintn numCPUs); + + + + + + +extern __attribute__((visibility("default"))) PRStatus PR_SetFDCacheSize(PRIntn low, PRIntn high); + + + + + + +extern __attribute__((visibility("default"))) void PR_ProcessExit(PRIntn status); + + + + + + +extern __attribute__((visibility("default"))) void PR_Abort(void); +# 191 "/usr/include/nspr/prinit.h" +typedef struct PRCallOnceType { + PRIntn initialized; + PRInt32 inProgress; + PRStatus status; +} PRCallOnceType; + +typedef PRStatus ( *PRCallOnceFN)(void); + +typedef PRStatus ( *PRCallOnceWithArgFN)(void *arg); + +extern __attribute__((visibility("default"))) PRStatus PR_CallOnce( + PRCallOnceType *once, + PRCallOnceFN func +); + +extern __attribute__((visibility("default"))) PRStatus PR_CallOnceWithArg( + PRCallOnceType *once, + PRCallOnceWithArgFN func, + void *arg +); + + +} +# 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jslock.h" 2 + +#define JS_ATOMIC_INCREMENT(p) PR_ATOMIC_INCREMENT((PRInt32 *)(p)) +#define JS_ATOMIC_DECREMENT(p) PR_ATOMIC_DECREMENT((PRInt32 *)(p)) +#define JS_ATOMIC_ADD(p,v) PR_ATOMIC_ADD((PRInt32 *)(p), (PRInt32)(v)) +#define JS_ATOMIC_SET(p,v) PR_ATOMIC_SET((PRInt32 *)(p), (PRInt32)(v)) +# 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jslock.h" +namespace js { + +class AutoAtomicIncrement +{ + int32_t *p; + + + public: + AutoAtomicIncrement(int32_t *p ) + : p(p) { + do { } while (0); + PR_AtomicIncrement((PRInt32 *)(p)); + } + + ~AutoAtomicIncrement() { + PR_AtomicDecrement((PRInt32 *)(p)); + } +}; + +} +# 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier.h" +#define jsgc_barrier_h___ + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsapi.h" 1 +# 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" 1 + + + + + + + +#define gc_heap_h___ + + + + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsutil.h" 1 +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/BitArray.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/BitArray.h" +#define BitArray_h__ + + + +# 1 "./../../dist/include/js/TemplateLib.h" 1 +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/BitArray.h" 2 + +namespace js { + +template +class BitArray { + private: + uintptr_t map[nbits / (8 * 4) + (nbits % (8 * 4) == 0 ? 0 : 1)]; + + public: + void clear(bool value) { + if (value) + memset(map, 0xFF, sizeof(map)); + else + memset(map, 0, sizeof(map)); + } + + inline bool get(size_t offset) const { + uintptr_t index, mask; + getMarkWordAndMask(offset, &index, &mask); + return map[index] & mask; + } + + inline void set(size_t offset) { + uintptr_t index, mask; + getMarkWordAndMask(offset, &index, &mask); + map[index] |= mask; + } + + inline void unset(size_t offset) { + uintptr_t index, mask; + getMarkWordAndMask(offset, &index, &mask); + map[index] &= ~mask; + } + + private: + inline void getMarkWordAndMask(size_t offset, + uintptr_t *indexp, uintptr_t *maskp) const { + *indexp = offset >> tl::FloorLog2<(8 * 4)>::result; + *maskp = uintptr_t(1) << (offset & ((8 * 4) - 1)); + } +}; + +} +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" 2 + +struct JSCompartment; + +extern "C" { +struct JSRuntime; +} + +namespace js { + +class FreeOp; + +namespace gc { + +struct Arena; +struct ArenaHeader; +struct Chunk; + + + + + + +static const uint32_t BLACK = 0; +static const uint32_t GRAY = 1; + + +enum AllocKind { + FINALIZE_OBJECT0, + FINALIZE_OBJECT0_BACKGROUND, + FINALIZE_OBJECT2, + FINALIZE_OBJECT2_BACKGROUND, + FINALIZE_OBJECT4, + FINALIZE_OBJECT4_BACKGROUND, + FINALIZE_OBJECT8, + FINALIZE_OBJECT8_BACKGROUND, + FINALIZE_OBJECT12, + FINALIZE_OBJECT12_BACKGROUND, + FINALIZE_OBJECT16, + FINALIZE_OBJECT16_BACKGROUND, + FINALIZE_OBJECT_LAST = FINALIZE_OBJECT16_BACKGROUND, + FINALIZE_SCRIPT, + FINALIZE_SHAPE, + FINALIZE_BASE_SHAPE, + FINALIZE_TYPE_OBJECT, + + FINALIZE_XML, + + FINALIZE_SHORT_STRING, + FINALIZE_STRING, + FINALIZE_EXTERNAL_STRING, + FINALIZE_LAST = FINALIZE_EXTERNAL_STRING +}; + +static const unsigned FINALIZE_LIMIT = FINALIZE_LAST + 1; +static const unsigned FINALIZE_OBJECT_LIMIT = FINALIZE_OBJECT_LAST + 1; + + + + + +static const size_t MAX_BACKGROUND_FINALIZE_KINDS = FINALIZE_LIMIT - FINALIZE_OBJECT_LIMIT / 2; + + + + +struct Cell +{ + static const size_t CellShift = 3; + static const size_t CellSize = size_t(1) << CellShift; + static const size_t CellMask = CellSize - 1; + + inline uintptr_t address() const; + inline ArenaHeader *arenaHeader() const; + inline Chunk *chunk() const; + inline AllocKind getAllocKind() const; + __attribute__((always_inline)) inline bool isMarked(uint32_t color = BLACK) const; + __attribute__((always_inline)) inline bool markIfUnmarked(uint32_t color = BLACK) const; + __attribute__((always_inline)) inline void unmark(uint32_t color) const; + + inline JSCompartment *compartment() const; + + + + +}; +# 114 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" +const size_t PageShift = 12; + +const size_t PageSize = size_t(1) << PageShift; + +const size_t ChunkShift = 20; +const size_t ChunkSize = size_t(1) << ChunkShift; +const size_t ChunkMask = ChunkSize - 1; + +const size_t ArenaShift = PageShift; +const size_t ArenaSize = PageSize; +const size_t ArenaMask = ArenaSize - 1; + + + + + +const static uint32_t FreeCommittedArenasThreshold = (32 << 20) / ArenaSize; + + + + + + + +const size_t ArenaCellCount = size_t(1) << (ArenaShift - Cell::CellShift); +const size_t ArenaBitmapBits = ArenaCellCount; +const size_t ArenaBitmapBytes = ArenaBitmapBits / 8; +const size_t ArenaBitmapWords = ArenaBitmapBits / (8 * 4); +# 169 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" +struct FreeSpan +{ + uintptr_t first; + uintptr_t last; + + public: + FreeSpan() {} + + FreeSpan(uintptr_t first, uintptr_t last) + : first(first), last(last) { + checkSpan(); + } + + + + + + static size_t encodeOffsets(size_t firstOffset, size_t lastOffset) { + + typedef int moz_static_assert18[(ArenaShift < 16) ? 1 : -1]; + do { } while(0); + do { } while(0); + do { } while(0); + return firstOffset | (lastOffset << 16); + } + + + + + + static const size_t FullArenaOffsets = ArenaSize | ((ArenaSize - 1) << 16); + + static FreeSpan decodeOffsets(uintptr_t arenaAddr, size_t offsets) { + do { } while(0); + + size_t firstOffset = offsets & 0xFFFF; + size_t lastOffset = offsets >> 16; + do { } while(0); + do { } while(0); + + + + + + return FreeSpan(arenaAddr + firstOffset, arenaAddr | lastOffset); + } + + void initAsEmpty(uintptr_t arenaAddr = 0) { + do { } while(0); + first = arenaAddr + ArenaSize; + last = arenaAddr | (ArenaSize - 1); + do { } while(0); + } + + bool isEmpty() const { + checkSpan(); + return first > last; + } + + bool hasNext() const { + checkSpan(); + return !(last & uintptr_t(1)); + } + + const FreeSpan *nextSpan() const { + do { } while(0); + return reinterpret_cast(last); + } + + FreeSpan *nextSpanUnchecked(size_t thingSize) const { + + + + + + return reinterpret_cast(last); + } + + uintptr_t arenaAddressUnchecked() const { + return last & ~ArenaMask; + } + + uintptr_t arenaAddress() const { + checkSpan(); + return arenaAddressUnchecked(); + } + + ArenaHeader *arenaHeader() const { + return reinterpret_cast(arenaAddress()); + } + + bool isSameNonEmptySpan(const FreeSpan *another) const { + do { } while(0); + do { } while(0); + return first == another->first && last == another->last; + } + + bool isWithinArena(uintptr_t arenaAddr) const { + do { } while(0); + + + return arenaAddress() == arenaAddr; + } + + size_t encodeAsOffsets() const { + + + + + uintptr_t arenaAddr = arenaAddress(); + return encodeOffsets(first - arenaAddr, last & ArenaMask); + } + + + __attribute__((always_inline)) inline void *allocate(size_t thingSize) { + do { } while(0); + checkSpan(); + uintptr_t thing = first; + if (thing < last) { + + first = thing + thingSize; + } else if ((__builtin_expect((thing == last), 1))) { + + + + + *this = *reinterpret_cast(thing); + } else { + return __null; + } + checkSpan(); + return reinterpret_cast(thing); + } + + + __attribute__((always_inline)) inline void *infallibleAllocate(size_t thingSize) { + do { } while(0); + checkSpan(); + uintptr_t thing = first; + if (thing < last) { + first = thing + thingSize; + } else { + do { } while(0); + *this = *reinterpret_cast(thing); + } + checkSpan(); + return reinterpret_cast(thing); + } + + + + + + + + __attribute__((always_inline)) inline void *allocateFromNewArena(uintptr_t arenaAddr, size_t firstThingOffset, + size_t thingSize) { + do { } while(0); + uintptr_t thing = arenaAddr | firstThingOffset; + first = thing + thingSize; + last = arenaAddr | ArenaMask; + checkSpan(); + return reinterpret_cast(thing); + } + + void checkSpan() const { +# 394 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" + } + +}; + + +struct ArenaHeader +{ + friend struct FreeLists; + + JSCompartment *compartment; + + + + + + + ArenaHeader *next; + + private: + + + + + + size_t firstFreeSpanOffsets; +# 427 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" + size_t allocKind : 8; +# 446 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" + public: + size_t hasDelayedMarking : 1; + size_t allocatedDuringIncremental : 1; + size_t markOverflow : 1; + size_t nextDelayedMarking : (8 * 4) - 8 - 1 - 1 - 1; + + static void staticAsserts() { + + typedef int moz_static_assert19[(FINALIZE_LIMIT <= 255) ? 1 : -1]; + + + + + + typedef int moz_static_assert20[(ArenaShift >= 8 + 1 + 1 + 1) ? 1 : -1]; + } + + inline uintptr_t address() const; + inline Chunk *chunk() const; + + bool allocated() const { + do { } while(0); + return allocKind < size_t(FINALIZE_LIMIT); + } + + void init(JSCompartment *comp, AllocKind kind) { + do { } while(0); + do { } while(0); + do { } while(0); + do { } while(0); + compartment = comp; + + typedef int moz_static_assert21[(FINALIZE_LIMIT <= 255) ? 1 : -1]; + allocKind = size_t(kind); + + + firstFreeSpanOffsets = FreeSpan::FullArenaOffsets; + } + + void setAsNotAllocated() { + allocKind = size_t(FINALIZE_LIMIT); + markOverflow = 0; + allocatedDuringIncremental = 0; + hasDelayedMarking = 0; + nextDelayedMarking = 0; + } + + inline uintptr_t arenaAddress() const; + inline Arena *getArena(); + + AllocKind getAllocKind() const { + do { } while(0); + return AllocKind(allocKind); + } + + inline size_t getThingSize() const; + + bool hasFreeThings() const { + return firstFreeSpanOffsets != FreeSpan::FullArenaOffsets; + } + + inline bool isEmpty() const; + + void setAsFullyUsed() { + firstFreeSpanOffsets = FreeSpan::FullArenaOffsets; + } + + inline FreeSpan getFirstFreeSpan() const; + inline void setFirstFreeSpan(const FreeSpan *span); + + + + + + inline ArenaHeader *getNextDelayedMarking() const; + inline void setNextDelayedMarking(ArenaHeader *aheader); +}; + +struct Arena +{ +# 540 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" + ArenaHeader aheader; + uint8_t data[ArenaSize - sizeof(ArenaHeader)]; + + private: + static __attribute__((visibility("default"))) const uint32_t ThingSizes[]; + static __attribute__((visibility("default"))) const uint32_t FirstThingOffsets[]; + + public: + static void staticAsserts(); + + static size_t thingSize(AllocKind kind) { + return ThingSizes[kind]; + } + + static size_t firstThingOffset(AllocKind kind) { + return FirstThingOffsets[kind]; + } + + static size_t thingsPerArena(size_t thingSize) { + do { } while(0); + + + do { } while(0); + + return (ArenaSize - sizeof(ArenaHeader)) / thingSize; + } + + static size_t thingsSpan(size_t thingSize) { + return thingsPerArena(thingSize) * thingSize; + } + + static bool isAligned(uintptr_t thing, size_t thingSize) { + + uintptr_t tailOffset = (ArenaSize - thing) & ArenaMask; + return tailOffset % thingSize == 0; + } + + uintptr_t address() const { + return aheader.address(); + } + + uintptr_t thingsStart(AllocKind thingKind) { + return address() | firstThingOffset(thingKind); + } + + uintptr_t thingsEnd() { + return address() + ArenaSize; + } + + template + bool finalize(FreeOp *fop, AllocKind thingKind, size_t thingSize); +}; + +inline size_t +ArenaHeader::getThingSize() const +{ + do { } while(0); + return Arena::thingSize(getAllocKind()); +} + + +struct ChunkInfo +{ + Chunk *next; + Chunk **prevp; + + + ArenaHeader *freeArenasHead; + + + + + + + uint32_t lastDecommittedArenaOffset; + + + uint32_t numArenasFree; + + + uint32_t numArenasFreeCommitted; + + + uint32_t age; +}; +# 655 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" +const size_t BytesPerArenaWithHeader = ArenaSize + ArenaBitmapBytes; +const size_t ChunkDecommitBitmapBytes = ChunkSize / ArenaSize / 8; +const size_t ChunkBytesAvailable = ChunkSize - sizeof(ChunkInfo) - ChunkDecommitBitmapBytes; +const size_t ArenasPerChunk = ChunkBytesAvailable / BytesPerArenaWithHeader; + + +struct ChunkBitmap +{ + uintptr_t bitmap[ArenaBitmapWords * ArenasPerChunk]; + + __attribute__((always_inline)) inline void getMarkWordAndMask(const Cell *cell, uint32_t color, + uintptr_t **wordp, uintptr_t *maskp); + + __attribute__((always_inline)) inline bool isMarked(const Cell *cell, uint32_t color) { + uintptr_t *word, mask; + getMarkWordAndMask(cell, color, &word, &mask); + return *word & mask; + } + + __attribute__((always_inline)) inline bool markIfUnmarked(const Cell *cell, uint32_t color) { + uintptr_t *word, mask; + getMarkWordAndMask(cell, BLACK, &word, &mask); + if (*word & mask) + return false; + *word |= mask; + if (color != BLACK) { + + + + + getMarkWordAndMask(cell, color, &word, &mask); + if (*word & mask) + return false; + *word |= mask; + } + return true; + } + + __attribute__((always_inline)) inline void unmark(const Cell *cell, uint32_t color) { + uintptr_t *word, mask; + getMarkWordAndMask(cell, color, &word, &mask); + *word &= ~mask; + } + + void clear() { + PodArrayZero(bitmap); + } +# 721 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" +}; + +typedef int moz_static_assert22[(ArenaBitmapBytes * ArenasPerChunk == sizeof(ChunkBitmap)) ? 1 : -1]; + +typedef BitArray PerArenaBitmap; + +const size_t ChunkPadSize = ChunkSize + - (sizeof(Arena) * ArenasPerChunk) + - sizeof(ChunkBitmap) + - sizeof(PerArenaBitmap) + - sizeof(ChunkInfo); +typedef int moz_static_assert23[(ChunkPadSize < BytesPerArenaWithHeader) ? 1 : -1]; + + + + + +struct Chunk +{ + Arena arenas[ArenasPerChunk]; + + + uint8_t padding[ChunkPadSize]; + + ChunkBitmap bitmap; + PerArenaBitmap decommittedArenas; + ChunkInfo info; + + static Chunk *fromAddress(uintptr_t addr) { + addr &= ~ChunkMask; + return reinterpret_cast(addr); + } + + static bool withinArenasRange(uintptr_t addr) { + uintptr_t offset = addr & ChunkMask; + return offset < ArenasPerChunk * ArenaSize; + } + + static size_t arenaIndex(uintptr_t addr) { + do { } while(0); + return (addr & ChunkMask) >> ArenaShift; + } + + uintptr_t address() const { + uintptr_t addr = reinterpret_cast(this); + do { } while(0); + return addr; + } + + bool unused() const { + return info.numArenasFree == ArenasPerChunk; + } + + bool hasAvailableArenas() const { + return info.numArenasFree != 0; + } + + inline void addToAvailableList(JSCompartment *compartment); + inline void insertToAvailableList(Chunk **insertPoint); + inline void removeFromAvailableList(); + + ArenaHeader *allocateArena(JSCompartment *comp, AllocKind kind); + + void releaseArena(ArenaHeader *aheader); + + static Chunk *allocate(JSRuntime *rt); + + + static inline void release(JSRuntime *rt, Chunk *chunk); + static inline void releaseList(JSRuntime *rt, Chunk *chunkListHead); + + + inline void prepareToBeFreed(JSRuntime *rt); + + + + + + Chunk *getPrevious() { + do { } while(0); + return fromPointerToNext(info.prevp); + } + + + static Chunk *fromPointerToNext(Chunk **nextFieldPtr) { + uintptr_t addr = reinterpret_cast(nextFieldPtr); + do { } while(0); + return reinterpret_cast(addr - __builtin_offsetof (Chunk, info.next)); + } + + private: + inline void init(); + + + unsigned findDecommittedArenaOffset(); + ArenaHeader* fetchNextDecommittedArena(); + + public: + + inline ArenaHeader* fetchNextFreeArena(JSRuntime *rt); + + inline void addArenaToFreeList(JSRuntime *rt, ArenaHeader *aheader); +}; + +typedef int moz_static_assert24[(sizeof(Chunk) == ChunkSize) ? 1 : -1]; + +inline uintptr_t +Cell::address() const +{ + uintptr_t addr = uintptr_t(this); + do { } while(0); + do { } while(0); + return addr; +} + +inline uintptr_t +ArenaHeader::address() const +{ + uintptr_t addr = reinterpret_cast(this); + do { } while(0); + do { } while(0); + return addr; +} + +inline Chunk * +ArenaHeader::chunk() const +{ + return Chunk::fromAddress(address()); +} + +inline uintptr_t +ArenaHeader::arenaAddress() const +{ + return address(); +} + +inline Arena * +ArenaHeader::getArena() +{ + return reinterpret_cast(arenaAddress()); +} + +inline bool +ArenaHeader::isEmpty() const +{ + + do { } while(0); + size_t firstThingOffset = Arena::firstThingOffset(getAllocKind()); + return firstFreeSpanOffsets == FreeSpan::encodeOffsets(firstThingOffset, ArenaMask); +} + +FreeSpan +ArenaHeader::getFirstFreeSpan() const +{ + + + + return FreeSpan::decodeOffsets(arenaAddress(), firstFreeSpanOffsets); +} + +void +ArenaHeader::setFirstFreeSpan(const FreeSpan *span) +{ + do { } while(0); + firstFreeSpanOffsets = span->encodeAsOffsets(); +} + +inline ArenaHeader * +ArenaHeader::getNextDelayedMarking() const +{ + return &reinterpret_cast(nextDelayedMarking << ArenaShift)->aheader; +} + +inline void +ArenaHeader::setNextDelayedMarking(ArenaHeader *aheader) +{ + do { } while(0); + hasDelayedMarking = 1; + nextDelayedMarking = aheader->arenaAddress() >> ArenaShift; +} + +__attribute__((always_inline)) inline void +ChunkBitmap::getMarkWordAndMask(const Cell *cell, uint32_t color, + uintptr_t **wordp, uintptr_t *maskp) +{ + size_t bit = (cell->address() & ChunkMask) / Cell::CellSize + color; + do { } while(0); + *maskp = uintptr_t(1) << (bit % (8 * 4)); + *wordp = &bitmap[bit / (8 * 4)]; +} + +static void +AssertValidColor(const void *thing, uint32_t color) +{ + + + + +} + +inline ArenaHeader * +Cell::arenaHeader() const +{ + uintptr_t addr = address(); + addr &= ~ArenaMask; + return reinterpret_cast(addr); +} + +Chunk * +Cell::chunk() const +{ + uintptr_t addr = uintptr_t(this); + do { } while(0); + addr &= ~(ChunkSize - 1); + return reinterpret_cast(addr); +} + +AllocKind +Cell::getAllocKind() const +{ + return arenaHeader()->getAllocKind(); +} + +bool +Cell::isMarked(uint32_t color ) const +{ + AssertValidColor(this, color); + return chunk()->bitmap.isMarked(this, color); +} + +bool +Cell::markIfUnmarked(uint32_t color ) const +{ + AssertValidColor(this, color); + return chunk()->bitmap.markIfUnmarked(this, color); +} + +void +Cell::unmark(uint32_t color) const +{ + do { } while(0); + AssertValidColor(this, color); + chunk()->bitmap.unmark(this, color); +} + +JSCompartment * +Cell::compartment() const +{ + return arenaHeader()->compartment; +} +# 980 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" +} + +} +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier.h" 2 +# 117 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier.h" +struct JSXML; + +namespace js { + +template +class EncapsulatedPtr +{ + protected: + union { + T *value; + Unioned other; + }; + + public: + EncapsulatedPtr() : value(__null) {} + explicit EncapsulatedPtr(T *v) : value(v) {} + explicit EncapsulatedPtr(const EncapsulatedPtr &v) : value(v.value) {} + + ~EncapsulatedPtr() { pre(); } + + + void clear() { + pre(); + value = __null; + } + + EncapsulatedPtr &operator=(T *v) { + pre(); + do { } while(0); + value = v; + return *this; + } + + EncapsulatedPtr &operator=(const EncapsulatedPtr &v) { + pre(); + do { } while(0); + value = v.value; + return *this; + } + + + T *get() const { return value; } + + + + + + T **unsafeGet() { return &value; } + void unsafeSet(T *v) { value = v; } + + Unioned *unsafeGetUnioned() { return &other; } + + T &operator*() const { return *value; } + T *operator->() const { return value; } + + operator T*() const { return value; } + + protected: + void pre() { T::writeBarrierPre(value); } +}; + +template +class HeapPtr : public EncapsulatedPtr +{ + public: + HeapPtr() : EncapsulatedPtr(__null) {} + explicit HeapPtr(T *v) : EncapsulatedPtr(v) { post(); } + explicit HeapPtr(const HeapPtr &v) + : EncapsulatedPtr(v) { post(); } + + void init(T *v) { + do { } while(0); + this->value = v; + post(); + } + + HeapPtr &operator=(T *v) { + this->pre(); + do { } while(0); + this->value = v; + post(); + return *this; + } + + HeapPtr &operator=(const HeapPtr &v) { + this->pre(); + do { } while(0); + this->value = v.value; + post(); + return *this; + } + + protected: + void post() { T::writeBarrierPost(this->value, (void *)&this->value); } + + + template + friend inline void + BarrieredSetPair(JSCompartment *comp, + HeapPtr &v1, T1 *val1, + HeapPtr &v2, T2 *val2); +}; + +template +class RelocatablePtr : public EncapsulatedPtr +{ + public: + RelocatablePtr() : EncapsulatedPtr(__null) {} + explicit RelocatablePtr(T *v) : EncapsulatedPtr(v) { post(); } + explicit RelocatablePtr(const RelocatablePtr &v) + : EncapsulatedPtr(v) { post(); } + + ~RelocatablePtr() { + this->pre(); + relocate(); + } + + RelocatablePtr &operator=(T *v) { + this->pre(); + do { } while(0); + this->value = v; + post(); + return *this; + } + + RelocatablePtr &operator=(const RelocatablePtr &v) { + this->pre(); + do { } while(0); + this->value = v.value; + post(); + return *this; + } + + protected: + void post() { T::writeBarrierRelocPost(this->value, (void *)&this->value); } + void relocate() { T::writeBarrierRelocated(this->value, (void *)&this->value); } +}; + + + + + +template +static inline void +BarrieredSetPair(JSCompartment *comp, + HeapPtr &v1, T1 *val1, + HeapPtr &v2, T2 *val2) +{ + if (T1::needWriteBarrierPre(comp)) { + v1.pre(); + v2.pre(); + } + v1.unsafeSet(val1); + v2.unsafeSet(val2); + v1.post(); + v2.post(); +} + +struct Shape; +class BaseShape; +namespace types { struct TypeObject; } + +typedef RelocatablePtr RelocatablePtrObject; +typedef RelocatablePtr RelocatablePtrScript; + +typedef HeapPtr HeapPtrObject; +typedef HeapPtr HeapPtrFunction; +typedef HeapPtr HeapPtrString; +typedef HeapPtr HeapPtrScript; +typedef HeapPtr HeapPtrShape; +typedef HeapPtr HeapPtrBaseShape; +typedef HeapPtr HeapPtrTypeObject; +typedef HeapPtr HeapPtrXML; + + +template +struct HeapPtrHasher +{ + typedef HeapPtr Key; + typedef T *Lookup; + + static HashNumber hash(Lookup obj) { return DefaultHasher::hash(obj); } + static bool match(const Key &k, Lookup l) { return k.get() == l; } +}; + + +template +struct DefaultHasher< HeapPtr > : HeapPtrHasher { }; + +class EncapsulatedValue +{ + protected: + Value value; + + + + + + EncapsulatedValue() ; + EncapsulatedValue(const EncapsulatedValue &v) ; + EncapsulatedValue &operator=(const Value &v) ; + EncapsulatedValue &operator=(const EncapsulatedValue &v) ; + + EncapsulatedValue(const Value &v) : value(v) {} + ~EncapsulatedValue() {} + + public: + inline bool operator==(const EncapsulatedValue &v) const { return value == v.value; } + inline bool operator!=(const EncapsulatedValue &v) const { return value != v.value; } + + const Value &get() const { return value; } + Value *unsafeGet() { return &value; } + operator const Value &() const { return value; } + + bool isUndefined() const { return value.isUndefined(); } + bool isNull() const { return value.isNull(); } + bool isBoolean() const { return value.isBoolean(); } + bool isTrue() const { return value.isTrue(); } + bool isFalse() const { return value.isFalse(); } + bool isNumber() const { return value.isNumber(); } + bool isInt32() const { return value.isInt32(); } + bool isDouble() const { return value.isDouble(); } + bool isString() const { return value.isString(); } + bool isObject() const { return value.isObject(); } + bool isMagic(JSWhyMagic why) const { return value.isMagic(why); } + bool isGCThing() const { return value.isGCThing(); } + bool isMarkable() const { return value.isMarkable(); } + + bool toBoolean() const { return value.toBoolean(); } + double toNumber() const { return value.toNumber(); } + int32_t toInt32() const { return value.toInt32(); } + double toDouble() const { return value.toDouble(); } + JSString *toString() const { return value.toString(); } + JSObject &toObject() const { return value.toObject(); } + JSObject *toObjectOrNull() const { return value.toObjectOrNull(); } + void *toGCThing() const { return value.toGCThing(); } + + JSGCTraceKind gcKind() const { return value.gcKind(); } + + uint64_t asRawBits() const { return value.asRawBits(); } + + + + + + static inline void writeBarrierPre(const Value &v); + static inline void writeBarrierPre(JSCompartment *comp, const Value &v); + + protected: + inline void pre(); + inline void pre(JSCompartment *comp); +}; + +class HeapValue : public EncapsulatedValue +{ + public: + explicit inline HeapValue(); + explicit inline HeapValue(const Value &v); + explicit inline HeapValue(const HeapValue &v); + inline ~HeapValue(); + + inline void init(const Value &v); + inline void init(JSCompartment *comp, const Value &v); + + inline HeapValue &operator=(const Value &v); + inline HeapValue &operator=(const HeapValue &v); + + + + + + + + inline void set(JSCompartment *comp, const Value &v); + + static inline void writeBarrierPost(const Value &v, Value *addr); + static inline void writeBarrierPost(JSCompartment *comp, const Value &v, Value *addr); + + private: + inline void post(); + inline void post(JSCompartment *comp); +}; + +class RelocatableValue : public EncapsulatedValue +{ + public: + explicit inline RelocatableValue(); + explicit inline RelocatableValue(const Value &v); + explicit inline RelocatableValue(const RelocatableValue &v); + inline ~RelocatableValue(); + + inline RelocatableValue &operator=(const Value &v); + inline RelocatableValue &operator=(const RelocatableValue &v); + + private: + inline void post(); + inline void post(JSCompartment *comp); + inline void relocate(); +}; + +class HeapSlot : public EncapsulatedValue +{ + + + + + inline HeapSlot &operator=(const Value &v) ; + inline HeapSlot &operator=(const HeapValue &v) ; + inline HeapSlot &operator=(const HeapSlot &v) ; + + public: + explicit inline HeapSlot() ; + explicit inline HeapSlot(JSObject *obj, uint32_t slot, const Value &v); + explicit inline HeapSlot(JSObject *obj, uint32_t slot, const HeapSlot &v); + inline ~HeapSlot(); + + inline void init(JSObject *owner, uint32_t slot, const Value &v); + inline void init(JSCompartment *comp, JSObject *owner, uint32_t slot, const Value &v); + + inline void set(JSObject *owner, uint32_t slot, const Value &v); + inline void set(JSCompartment *comp, JSObject *owner, uint32_t slot, const Value &v); + + static inline void writeBarrierPost(JSObject *obj, uint32_t slot); + static inline void writeBarrierPost(JSCompartment *comp, JSObject *obj, uint32_t slotno); + + private: + inline void post(JSObject *owner, uint32_t slot); + inline void post(JSCompartment *comp, JSObject *owner, uint32_t slot); +}; + + + + + + + +inline void +SlotRangeWriteBarrierPost(JSCompartment *comp, JSObject *obj, uint32_t start, uint32_t count) +{ +} + +static inline const Value * +Valueify(const EncapsulatedValue *array) +{ + typedef int moz_static_assert25[(sizeof(HeapValue) == sizeof(Value)) ? 1 : -1]; + typedef int moz_static_assert26[(sizeof(HeapSlot) == sizeof(Value)) ? 1 : -1]; + return (const Value *)array; +} + +class HeapSlotArray +{ + HeapSlot *array; + + public: + HeapSlotArray(HeapSlot *array) : array(array) {} + + operator const Value *() const { return Valueify(array); } + operator HeapSlot *() const { return array; } + + HeapSlotArray operator +(int offset) const { return HeapSlotArray(array + offset); } + HeapSlotArray operator +(uint32_t offset) const { return HeapSlotArray(array + offset); } +}; + +class EncapsulatedId +{ + protected: + jsid value; + + explicit EncapsulatedId() : value(((jsid)0x2)) {} + explicit inline EncapsulatedId(jsid id) : value(id) {} + ~EncapsulatedId() {} + + private: + EncapsulatedId(const EncapsulatedId &v) ; + EncapsulatedId &operator=(const EncapsulatedId &v) ; + + public: + bool operator==(jsid id) const { return value == id; } + bool operator!=(jsid id) const { return value != id; } + + jsid get() const { return value; } + jsid *unsafeGet() { return &value; } + operator jsid() const { return value; } + + protected: + inline void pre(); +}; + +class RelocatableId : public EncapsulatedId +{ + public: + explicit RelocatableId() : EncapsulatedId() {} + explicit inline RelocatableId(jsid id) : EncapsulatedId(id) {} + inline ~RelocatableId(); + + inline RelocatableId &operator=(jsid id); + inline RelocatableId &operator=(const RelocatableId &v); +}; + +class HeapId : public EncapsulatedId +{ + public: + explicit HeapId() : EncapsulatedId() {} + explicit inline HeapId(jsid id); + inline ~HeapId(); + + inline void init(jsid id); + + inline HeapId &operator=(jsid id); + inline HeapId &operator=(const HeapId &v); + + private: + inline void post(); + + HeapId(const HeapId &v) ; +}; +# 544 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier.h" +template +class ReadBarriered +{ + T *value; + + public: + ReadBarriered() : value(__null) {} + ReadBarriered(T *value) : value(value) {} + + T *get() const { + if (!value) + return __null; + T::readBarrier(value); + return value; + } + + operator T*() const { return get(); } + + T &operator*() const { return *get(); } + T *operator->() const { return get(); } + + T **unsafeGet() { return &value; } + + void set(T *v) { value = v; } + + operator bool() { return !!value; } +}; + +class ReadBarrieredValue +{ + Value value; + + public: + ReadBarrieredValue() : value(UndefinedValue()) {} + ReadBarrieredValue(const Value &value) : value(value) {} + + inline const Value &get() const; + Value *unsafeGet() { return &value; } + inline operator const Value &() const; + + inline JSObject &toObject() const; +}; + +namespace tl { + +template struct IsRelocatableHeapType > + { static const bool result = false; }; +template <> struct IsRelocatableHeapType { static const bool result = false; }; +template <> struct IsRelocatableHeapType { static const bool result = false; }; +template <> struct IsRelocatableHeapType { static const bool result = false; }; + +} +} +# 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 + + +struct JSIdArray { + int length; + js::HeapId vector[1]; +}; + + + +static __attribute__((always_inline)) inline jsid +JSID_FROM_BITS(size_t bits) +{ + jsid id; + (id) = bits; + return id; +} +# 58 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" +static __attribute__((always_inline)) inline jsid +NON_INTEGER_ATOM_TO_JSID(JSAtom *atom) +{ + do { } while(0); + jsid id = JSID_FROM_BITS((size_t)atom); + do { } while(0); + return id; +} + + +static __attribute__((always_inline)) inline JSBool +JSID_IS_ATOM(jsid id) +{ + return JSID_IS_STRING(id); +} + +static __attribute__((always_inline)) inline JSBool +JSID_IS_ATOM(jsid id, JSAtom *atom) +{ + return id == JSID_FROM_BITS((size_t)atom); +} + +static __attribute__((always_inline)) inline JSAtom * +JSID_TO_ATOM(jsid id) +{ + return (JSAtom *)JSID_TO_STRING(id); +} + +typedef int moz_static_assert27[(sizeof(JSHashNumber) == 4) ? 1 : -1]; +typedef int moz_static_assert28[(sizeof(jsid) == 4) ? 1 : -1]; + +namespace js { + +static __attribute__((always_inline)) inline JSHashNumber +HashId(jsid id) +{ + JSHashNumber n = + + JSHashNumber((id)); + + + + + + return n * 0x9E3779B9U; +} + +static __attribute__((always_inline)) inline Value +IdToValue(jsid id) +{ + if (JSID_IS_STRING(id)) + return StringValue(JSID_TO_STRING(id)); + if ((__builtin_expect((JSID_IS_INT(id)), 1))) + return Int32Value(JSID_TO_INT(id)); + if ((__builtin_expect((JSID_IS_OBJECT(id)), 1))) + return ObjectValue(*JSID_TO_OBJECT(id)); + do { } while(0); + return UndefinedValue(); +} + +static __attribute__((always_inline)) inline jsval +IdToJsval(jsid id) +{ + return IdToValue(id); +} + +template<> +struct DefaultHasher +{ + typedef jsid Lookup; + static HashNumber hash(const Lookup &l) { + return HashNumber((l)); + } + static bool match(const jsid &id, const Lookup &l) { + return id == l; + } +}; + +} + + +#define ATOM_HASH(atom) ((JSHashNumber)(atom) >> 2) +# 151 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" +extern const char * +js_AtomToPrintableString(JSContext *cx, JSAtom *atom, JSAutoByteString *bytes); + +namespace js { + + +inline uint32_t +HashChars(const jschar *chars, size_t length) +{ + uint32_t h = 0; + for (; length; chars++, length--) + h = (((h) << (4)) | ((h) >> (32 - (4)))) ^ *chars; + return h; +} + +class AtomStateEntry +{ + uintptr_t bits; + + static const uintptr_t NO_TAG_MASK = uintptr_t(-1) - 1; + + public: + AtomStateEntry() : bits(0) {} + AtomStateEntry(const AtomStateEntry &other) : bits(other.bits) {} + AtomStateEntry(JSAtom *ptr, bool tagged) + : bits(uintptr_t(ptr) | uintptr_t(tagged)) + { + do { } while(0); + } + + bool isTagged() const { + return bits & 0x1; + } + + + + + + void setTagged(bool enabled) const { + const_cast(this)->bits |= uintptr_t(enabled); + } + + JSAtom *asPtr() const; +}; + +struct AtomHasher +{ + struct Lookup + { + const jschar *chars; + size_t length; + const JSAtom *atom; + + Lookup(const jschar *chars, size_t length) : chars(chars), length(length), atom(__null) {} + inline Lookup(const JSAtom *atom); + }; + + static HashNumber hash(const Lookup &l) { return HashChars(l.chars, l.length); } + static inline bool match(const AtomStateEntry &entry, const Lookup &lookup); +}; + +typedef HashSet AtomSet; +# 231 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" +enum FlationCoding +{ + NormalEncoding, + CESU8Encoding +}; + +class PropertyName; + +} + +struct JSAtomState +{ + js::AtomSet atoms; +# 256 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" + js::PropertyName *emptyAtom; + + + + + + js::PropertyName *booleanAtoms[2]; + js::PropertyName *typeAtoms[JSTYPE_LIMIT]; + js::PropertyName *nullAtom; + + + js::PropertyName *classAtoms[JSProto_LIMIT]; + + +#define DEFINE_ATOM(id,text) js::PropertyName *id ##Atom; +#define DEFINE_PROTOTYPE_ATOM(id) js::PropertyName *id ##Atom; +#define DEFINE_KEYWORD_ATOM(id) js::PropertyName *id ##Atom; +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.tbl" 1 +# 37 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.tbl" +js::PropertyName *anonymousAtom; +js::PropertyName *applyAtom; +js::PropertyName *argumentsAtom; +js::PropertyName *arityAtom; +js::PropertyName *BYTES_PER_ELEMENTAtom; +js::PropertyName *callAtom; +js::PropertyName *calleeAtom; +js::PropertyName *callerAtom; +js::PropertyName *classPrototypeAtom; +js::PropertyName *constructorAtom; +js::PropertyName *eachAtom; +js::PropertyName *evalAtom; +js::PropertyName *fileNameAtom; +js::PropertyName *getAtom; +js::PropertyName *globalAtom; +js::PropertyName *ignoreCaseAtom; +js::PropertyName *indexAtom; +js::PropertyName *inputAtom; +js::PropertyName *toISOStringAtom; +js::PropertyName *iteratorAtom; +js::PropertyName *joinAtom; +js::PropertyName *lastIndexAtom; +js::PropertyName *lengthAtom; +js::PropertyName *lineNumberAtom; +js::PropertyName *messageAtom; +js::PropertyName *multilineAtom; +js::PropertyName *nameAtom; +js::PropertyName *nextAtom; +js::PropertyName *noSuchMethodAtom; +js::PropertyName *objectNullAtom; +js::PropertyName *objectUndefinedAtom; +js::PropertyName *ofAtom; +js::PropertyName *protoAtom; +js::PropertyName *setAtom; +js::PropertyName *sourceAtom; +js::PropertyName *stackAtom; +js::PropertyName *stickyAtom; +js::PropertyName *toGMTStringAtom; +js::PropertyName *toLocaleStringAtom; +js::PropertyName *toSourceAtom; +js::PropertyName *toStringAtom; +js::PropertyName *toUTCStringAtom; +js::PropertyName *valueOfAtom; +js::PropertyName *toJSONAtom; +js::PropertyName *void0Atom; +js::PropertyName *enumerableAtom; +js::PropertyName *configurableAtom; +js::PropertyName *writableAtom; +js::PropertyName *valueAtom; +js::PropertyName *testAtom; +js::PropertyName *useStrictAtom; +js::PropertyName *locAtom; +js::PropertyName *lineAtom; +js::PropertyName *InfinityAtom; +js::PropertyName *NaNAtom; +js::PropertyName *builderAtom; + + +js::PropertyName *etagoAtom; +js::PropertyName *namespaceAtom; +js::PropertyName *ptagcAtom; +js::PropertyName *qualifierAtom; +js::PropertyName *spaceAtom; +js::PropertyName *stagoAtom; +js::PropertyName *starAtom; +js::PropertyName *starQualifierAtom; +js::PropertyName *tagcAtom; +js::PropertyName *xmlAtom; +js::PropertyName *functionNamespaceURIAtom; + + +js::PropertyName *ProxyAtom; +js::PropertyName *getOwnPropertyDescriptorAtom; +js::PropertyName *getPropertyDescriptorAtom; +js::PropertyName *definePropertyAtom; +js::PropertyName *deleteAtom; +js::PropertyName *getOwnPropertyNamesAtom; +js::PropertyName *enumerateAtom; +js::PropertyName *fixAtom; +js::PropertyName *hasAtom; +js::PropertyName *hasOwnAtom; +js::PropertyName *keysAtom; +js::PropertyName *iterateAtom; +js::PropertyName *WeakMapAtom; +js::PropertyName *byteLengthAtom; +js::PropertyName *returnAtom; +js::PropertyName *throwAtom; +js::PropertyName *urlAtom; +js::PropertyName *innermostAtom; + +js::PropertyName *XMLListAtom; +js::PropertyName *decodeURIAtom; +js::PropertyName *decodeURIComponentAtom; +js::PropertyName *defineGetterAtom; +js::PropertyName *defineSetterAtom; +js::PropertyName *encodeURIAtom; +js::PropertyName *encodeURIComponentAtom; +js::PropertyName *escapeAtom; +js::PropertyName *hasOwnPropertyAtom; +js::PropertyName *isFiniteAtom; +js::PropertyName *isNaNAtom; +js::PropertyName *isPrototypeOfAtom; +js::PropertyName *isXMLNameAtom; +js::PropertyName *lookupGetterAtom; +js::PropertyName *lookupSetterAtom; +js::PropertyName *parseFloatAtom; +js::PropertyName *parseIntAtom; +js::PropertyName *propertyIsEnumerableAtom; +js::PropertyName *unescapeAtom; +js::PropertyName *unevalAtom; +js::PropertyName *unwatchAtom; +js::PropertyName *watchAtom; +# 274 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 +#undef DEFINE_ATOM +#undef DEFINE_PROTOTYPE_ATOM +#undef DEFINE_KEYWORD_ATOM + + static const size_t commonAtomsOffset; + + void junkAtoms() { + + + + } + + JSAtom **commonAtomsStart() { + return reinterpret_cast(&emptyAtom); + } + + void checkStaticInvariants(); +}; + +extern bool +AtomIsInterned(JSContext *cx, JSAtom *atom); + +#define ATOM(name) cx->runtime->atomState.name ##Atom + +#define COMMON_ATOM_INDEX(name) ((offsetof(JSAtomState, name ##Atom) - JSAtomState::commonAtomsOffset) / sizeof(JSAtom*)) + + +#define COMMON_TYPE_ATOM_INDEX(type) ((offsetof(JSAtomState, typeAtoms[type]) - JSAtomState::commonAtomsOffset) / sizeof(JSAtom*)) + + + +#define NAME_OFFSET(name) offsetof(JSAtomState, name ##Atom) +#define OFFSET_TO_NAME(rt,off) (*(js::PropertyName **)((char*)&(rt)->atomState + (off))) +#define CLASS_NAME_OFFSET(name) offsetof(JSAtomState, classAtoms[JSProto_ ##name]) +#define CLASS_NAME(cx,name) ((cx)->runtime->atomState.classAtoms[JSProto_ ##name]) + +extern const char *const js_common_atom_names[]; +extern const size_t js_common_atom_count; + + + + +#define JS_BOOLEAN_STR(type) (js_common_atom_names[1 + (type)]) +#define JS_TYPE_STR(type) (js_common_atom_names[1 + 2 + (type)]) + + +extern const char js_object_str[]; +extern const char js_undefined_str[]; + + +#define JS_PROTO(name,code,init) extern const char js_ ##name ##_str[]; +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsproto.tbl" 1 + + + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" 1 +# 42 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_VERSION_ECMA_3 148 +#define JS_VERSION_ECMA_3_TEST 149 +# 124 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_HAS_STR_HTML_HELPERS 1 +#define JS_HAS_OBJ_PROTO_PROP 1 +#define JS_HAS_OBJ_WATCHPOINT 1 +#define JS_HAS_TOSOURCE 1 +#define JS_HAS_CATCH_GUARD 1 +#define JS_HAS_UNEVAL 1 +#define JS_HAS_CONST 1 +#define JS_HAS_FUN_EXPR_STMT 1 +#define JS_HAS_NO_SUCH_METHOD 1 +#define JS_HAS_GENERATORS 1 +#define JS_HAS_BLOCK_SCOPE 1 +#define JS_HAS_DESTRUCTURING 2 +#define JS_HAS_GENERATOR_EXPRS 1 +#define JS_HAS_EXPR_CLOSURES 1 +# 146 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_HAS_NEW_GLOBAL_OBJECT 1 + + +#define JS_HAS_MAKE_SYSTEM_OBJECT 1 + + +#define JS_HAS_DESTRUCTURING_SHORTHAND (JS_HAS_DESTRUCTURING == 2) + + + + + +#define OLD_GETTER_SETTER_METHODS 1 + + +#define USE_NEW_OBJECT_REPRESENTATION 0 + + + + +#define NEW_OBJECT_REPRESENTATION_ONLY() MOZ_NOT_REACHED("don't call this! to be used in the new object representation") +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsproto.tbl" 2 + + +#define XML_INIT js_InitXMLClass +#define NAMESPACE_INIT js_InitNamespaceClass +#define QNAME_INIT js_InitQNameClass +#define XMLFILTER_INIT js_InitXMLFilterClass +# 27 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsproto.tbl" +extern const char js_Null_str[]; +extern const char js_Object_str[]; +extern const char js_Function_str[]; +extern const char js_Array_str[]; +extern const char js_Boolean_str[]; +extern const char js_JSON_str[]; +extern const char js_Date_str[]; +extern const char js_Math_str[]; +extern const char js_Number_str[]; +extern const char js_String_str[]; +extern const char js_RegExp_str[]; +extern const char js_XML_str[]; +extern const char js_Namespace_str[]; +extern const char js_QName_str[]; +extern const char js_Error_str[]; +extern const char js_InternalError_str[]; +extern const char js_EvalError_str[]; +extern const char js_RangeError_str[]; +extern const char js_ReferenceError_str[]; +extern const char js_SyntaxError_str[]; +extern const char js_TypeError_str[]; +extern const char js_URIError_str[]; +extern const char js_Iterator_str[]; +extern const char js_StopIteration_str[]; +extern const char js_ArrayBuffer_str[]; +extern const char js_Int8Array_str[]; +extern const char js_Uint8Array_str[]; +extern const char js_Int16Array_str[]; +extern const char js_Uint16Array_str[]; +extern const char js_Int32Array_str[]; +extern const char js_Uint32Array_str[]; +extern const char js_Float32Array_str[]; +extern const char js_Float64Array_str[]; +extern const char js_Uint8ClampedArray_str[]; +extern const char js_Proxy_str[]; +extern const char js_AnyName_str[]; +extern const char js_WeakMap_str[]; +extern const char js_Map_str[]; +extern const char js_Set_str[]; +extern const char js_DataView_str[]; + +#undef XML_INIT +#undef NAMESPACE_INIT +#undef QNAME_INIT +# 326 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 +#undef JS_PROTO + +#define DEFINE_ATOM(id,text) extern const char js_ ##id ##_str[]; +#define DEFINE_PROTOTYPE_ATOM(id) +#define DEFINE_KEYWORD_ATOM(id) +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.tbl" 1 +# 37 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.tbl" +extern const char js_anonymous_str[]; +extern const char js_apply_str[]; +extern const char js_arguments_str[]; +extern const char js_arity_str[]; +extern const char js_BYTES_PER_ELEMENT_str[]; +extern const char js_call_str[]; +extern const char js_callee_str[]; +extern const char js_caller_str[]; +extern const char js_classPrototype_str[]; +extern const char js_constructor_str[]; +extern const char js_each_str[]; +extern const char js_eval_str[]; +extern const char js_fileName_str[]; +extern const char js_get_str[]; +extern const char js_global_str[]; +extern const char js_ignoreCase_str[]; +extern const char js_index_str[]; +extern const char js_input_str[]; +extern const char js_toISOString_str[]; +extern const char js_iterator_str[]; +extern const char js_join_str[]; +extern const char js_lastIndex_str[]; +extern const char js_length_str[]; +extern const char js_lineNumber_str[]; +extern const char js_message_str[]; +extern const char js_multiline_str[]; +extern const char js_name_str[]; +extern const char js_next_str[]; +extern const char js_noSuchMethod_str[]; +extern const char js_objectNull_str[]; +extern const char js_objectUndefined_str[]; +extern const char js_of_str[]; +extern const char js_proto_str[]; +extern const char js_set_str[]; +extern const char js_source_str[]; +extern const char js_stack_str[]; +extern const char js_sticky_str[]; +extern const char js_toGMTString_str[]; +extern const char js_toLocaleString_str[]; +extern const char js_toSource_str[]; +extern const char js_toString_str[]; +extern const char js_toUTCString_str[]; +extern const char js_valueOf_str[]; +extern const char js_toJSON_str[]; +extern const char js_void0_str[]; +extern const char js_enumerable_str[]; +extern const char js_configurable_str[]; +extern const char js_writable_str[]; +extern const char js_value_str[]; +extern const char js_test_str[]; +extern const char js_useStrict_str[]; +extern const char js_loc_str[]; +extern const char js_line_str[]; +extern const char js_Infinity_str[]; +extern const char js_NaN_str[]; +extern const char js_builder_str[]; + + +extern const char js_etago_str[]; +extern const char js_namespace_str[]; +extern const char js_ptagc_str[]; +extern const char js_qualifier_str[]; +extern const char js_space_str[]; +extern const char js_stago_str[]; +extern const char js_star_str[]; +extern const char js_starQualifier_str[]; +extern const char js_tagc_str[]; +extern const char js_xml_str[]; +extern const char js_functionNamespaceURI_str[]; + + + +extern const char js_getOwnPropertyDescriptor_str[]; +extern const char js_getPropertyDescriptor_str[]; +extern const char js_defineProperty_str[]; + +extern const char js_getOwnPropertyNames_str[]; +extern const char js_enumerate_str[]; +extern const char js_fix_str[]; +extern const char js_has_str[]; +extern const char js_hasOwn_str[]; +extern const char js_keys_str[]; +extern const char js_iterate_str[]; + +extern const char js_byteLength_str[]; + + +extern const char js_url_str[]; +extern const char js_innermost_str[]; + +extern const char js_XMLList_str[]; +extern const char js_decodeURI_str[]; +extern const char js_decodeURIComponent_str[]; +extern const char js_defineGetter_str[]; +extern const char js_defineSetter_str[]; +extern const char js_encodeURI_str[]; +extern const char js_encodeURIComponent_str[]; +extern const char js_escape_str[]; +extern const char js_hasOwnProperty_str[]; +extern const char js_isFinite_str[]; +extern const char js_isNaN_str[]; +extern const char js_isPrototypeOf_str[]; +extern const char js_isXMLName_str[]; +extern const char js_lookupGetter_str[]; +extern const char js_lookupSetter_str[]; +extern const char js_parseFloat_str[]; +extern const char js_parseInt_str[]; +extern const char js_propertyIsEnumerable_str[]; +extern const char js_unescape_str[]; +extern const char js_uneval_str[]; +extern const char js_unwatch_str[]; +extern const char js_watch_str[]; +# 332 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 2 +#undef DEFINE_ATOM +#undef DEFINE_PROTOTYPE_ATOM +#undef DEFINE_KEYWORD_ATOM + + +extern const char js_close_str[]; +extern const char js_send_str[]; + + + +extern const char js_getter_str[]; +extern const char js_setter_str[]; + + + + + + +extern JSBool +js_InitAtomState(JSRuntime *rt); + + + + + +extern void +js_FinishAtomState(JSRuntime *rt); + + + + + +namespace js { + +extern void +MarkAtomState(JSTracer *trc, bool markAll); + +extern void +SweepAtomState(JSRuntime *rt); + +extern bool +InitCommonAtoms(JSContext *cx); + +extern void +FinishCommonAtoms(JSRuntime *rt); + + +enum InternBehavior +{ + DoNotInternAtom = false, + InternAtom = true +}; + +} + +extern JSAtom * +js_Atomize(JSContext *cx, const char *bytes, size_t length, + js::InternBehavior ib = js::DoNotInternAtom, + js::FlationCoding fc = js::NormalEncoding); + +extern JSAtom * +js_AtomizeChars(JSContext *cx, const jschar *chars, size_t length, + js::InternBehavior ib = js::DoNotInternAtom); + +extern JSAtom * +js_AtomizeString(JSContext *cx, JSString *str, js::InternBehavior ib = js::DoNotInternAtom); + + + + + +extern JSAtom * +js_GetExistingStringAtom(JSContext *cx, const jschar *chars, size_t length); +# 413 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" +inline bool +js_ValueToAtom(JSContext *cx, const js::Value &v, JSAtom **atomp); + +namespace js { + +bool +InternNonIntElementId(JSContext *cx, JSObject *obj, const Value &idval, + jsid *idp, Value *vp); + +inline bool +InternNonIntElementId(JSContext *cx, JSObject *obj, const Value &idval, jsid *idp) +{ + Value dummy; + return InternNonIntElementId(cx, obj, idval, idp, &dummy); +} + + + + + + +extern void +InitAtomMap(JSContext *cx, AtomIndexMap *indices, HeapPtr *atoms); + +template +bool +XDRAtom(XDRState *xdr, JSAtom **atomp); + +} +# 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclass.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclass.h" +#define jsclass_h__ +# 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclass.h" +namespace js { + +class PropertyName; +class SpecialId; + +static __attribute__((always_inline)) inline jsid +SPECIALID_TO_JSID(const SpecialId &sid); +# 41 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclass.h" +class SpecialId { + uintptr_t bits; + + + friend __attribute__((always_inline)) inline jsid SPECIALID_TO_JSID(const SpecialId &sid); + + static const uintptr_t TYPE_VOID = 0x2; + static const uintptr_t TYPE_OBJECT = 0x4; + static const uintptr_t TYPE_DEFAULT_XML_NAMESPACE = 0x6; + static const uintptr_t TYPE_MASK = 0x7; + + SpecialId(uintptr_t bits) : bits(bits) { } + + public: + SpecialId() : bits(TYPE_VOID) { } + + + + SpecialId(JSObject &obj) + : bits(uintptr_t(&obj) | TYPE_OBJECT) + { + do { } while(0); + do { } while(0); + } + + bool isObject() const { + return (bits & TYPE_MASK) == TYPE_OBJECT && bits != TYPE_OBJECT; + } + + JSObject *toObject() const { + do { } while(0); + return reinterpret_cast(bits & ~TYPE_MASK); + } + + + + static SpecialId empty() { + SpecialId sid(TYPE_OBJECT); + do { } while(0); + return sid; + } + + bool isEmpty() const { + return bits == TYPE_OBJECT; + } + + + + static SpecialId voidId() { + SpecialId sid(TYPE_VOID); + do { } while(0); + return sid; + } + + bool isVoid() const { + return bits == TYPE_VOID; + } + + + + static SpecialId defaultXMLNamespace() { + SpecialId sid(TYPE_DEFAULT_XML_NAMESPACE); + do { } while(0); + return sid; + } + + bool isDefaultXMLNamespace() const { + return bits == TYPE_DEFAULT_XML_NAMESPACE; + } +}; + +static __attribute__((always_inline)) inline jsid +SPECIALID_TO_JSID(const SpecialId &sid) +{ + jsid id; + (id) = sid.bits; + do { } while (0); + do { } while (0); + do { } while (0); + do { } while (0); + return id; +} + +static __attribute__((always_inline)) inline bool +JSID_IS_SPECIAL(jsid id) +{ + return JSID_IS_OBJECT(id) || JSID_IS_EMPTY(id) || JSID_IS_VOID(id) || + JSID_IS_DEFAULT_XML_NAMESPACE(id); +} + +static __attribute__((always_inline)) inline SpecialId +JSID_TO_SPECIALID(jsid id) +{ + do { } while(0); + if (JSID_IS_OBJECT(id)) + return SpecialId(*JSID_TO_OBJECT(id)); + if (JSID_IS_EMPTY(id)) + return SpecialId::empty(); + if (JSID_IS_VOID(id)) + return SpecialId::voidId(); + do { } while(0); + return SpecialId::defaultXMLNamespace(); +} + +typedef JS::Handle HandleSpecialId; + + + +typedef JSBool +(* LookupGenericOp)(JSContext *cx, HandleObject obj, HandleId id, JSObject **objp, + JSProperty **propp); +typedef JSBool +(* LookupPropOp)(JSContext *cx, HandleObject obj, HandlePropertyName name, JSObject **objp, + JSProperty **propp); +typedef JSBool +(* LookupElementOp)(JSContext *cx, HandleObject obj, uint32_t index, JSObject **objp, + JSProperty **propp); +typedef JSBool +(* LookupSpecialOp)(JSContext *cx, HandleObject obj, HandleSpecialId sid, JSObject **objp, + JSProperty **propp); +typedef JSBool +(* DefineGenericOp)(JSContext *cx, HandleObject obj, HandleId id, const Value *value, + PropertyOp getter, StrictPropertyOp setter, unsigned attrs); +typedef JSBool +(* DefinePropOp)(JSContext *cx, HandleObject obj, HandlePropertyName name, const Value *value, + PropertyOp getter, StrictPropertyOp setter, unsigned attrs); +typedef JSBool +(* DefineElementOp)(JSContext *cx, HandleObject obj, uint32_t index, const Value *value, + PropertyOp getter, StrictPropertyOp setter, unsigned attrs); +typedef JSBool +(* DefineSpecialOp)(JSContext *cx, HandleObject obj, HandleSpecialId sid, const Value *value, + PropertyOp getter, StrictPropertyOp setter, unsigned attrs); +typedef JSBool +(* GenericIdOp)(JSContext *cx, HandleObject obj, HandleObject receiver, HandleId id, Value *vp); +typedef JSBool +(* PropertyIdOp)(JSContext *cx, HandleObject obj, HandleObject receiver, HandlePropertyName name, Value *vp); +typedef JSBool +(* ElementIdOp)(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index, Value *vp); +typedef JSBool +(* ElementIfPresentOp)(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index, Value *vp, bool* present); +typedef JSBool +(* SpecialIdOp)(JSContext *cx, HandleObject obj, HandleObject receiver, HandleSpecialId sid, Value *vp); +typedef JSBool +(* StrictGenericIdOp)(JSContext *cx, HandleObject obj, HandleId id, Value *vp, JSBool strict); +typedef JSBool +(* StrictPropertyIdOp)(JSContext *cx, HandleObject obj, HandlePropertyName name, Value *vp, JSBool strict); +typedef JSBool +(* StrictElementIdOp)(JSContext *cx, HandleObject obj, uint32_t index, Value *vp, JSBool strict); +typedef JSBool +(* StrictSpecialIdOp)(JSContext *cx, HandleObject obj, HandleSpecialId sid, Value *vp, JSBool strict); +typedef JSBool +(* GenericAttributesOp)(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp); +typedef JSBool +(* PropertyAttributesOp)(JSContext *cx, HandleObject obj, HandlePropertyName name, unsigned *attrsp); +typedef JSBool +(* ElementAttributesOp)(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp); +typedef JSBool +(* SpecialAttributesOp)(JSContext *cx, HandleObject obj, HandleSpecialId sid, unsigned *attrsp); +typedef JSBool +(* DeletePropertyOp)(JSContext *cx, HandleObject obj, HandlePropertyName name, Value *vp, JSBool strict); +typedef JSBool +(* DeleteElementOp)(JSContext *cx, HandleObject obj, uint32_t index, Value *vp, JSBool strict); +typedef JSBool +(* DeleteSpecialOp)(JSContext *cx, HandleObject obj, HandleSpecialId sid, Value *vp, JSBool strict); +typedef JSType +(* TypeOfOp)(JSContext *cx, HandleObject obj); + +typedef JSObject * +(* ObjectOp)(JSContext *cx, HandleObject obj); +typedef void +(* ClearOp)(JSContext *cx, HandleObject obj); +typedef void +(* FinalizeOp)(FreeOp *fop, JSObject *obj); + +#define JS_CLASS_MEMBERS const char *name; uint32_t flags; JSPropertyOp addProperty; JSPropertyOp delProperty; JSPropertyOp getProperty; JSStrictPropertyOp setProperty; JSEnumerateOp enumerate; JSResolveOp resolve; JSConvertOp convert; FinalizeOp finalize; JSCheckAccessOp checkAccess; JSNative call; JSHasInstanceOp hasInstance; JSNative construct; JSTraceOp trace +# 240 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclass.h" +struct ClassSizeMeasurement +{ + const char *name; uint32_t flags; JSPropertyOp addProperty; JSPropertyOp delProperty; JSPropertyOp getProperty; JSStrictPropertyOp setProperty; JSEnumerateOp enumerate; JSResolveOp resolve; JSConvertOp convert; FinalizeOp finalize; JSCheckAccessOp checkAccess; JSNative call; JSHasInstanceOp hasInstance; JSNative construct; JSTraceOp trace; +}; + +struct ClassExtension +{ + JSEqualityOp equality; + JSObjectOp outerObject; + JSObjectOp innerObject; + JSIteratorOp iteratorObject; + void *unused; + + + + + + bool isWrappedNative; +}; + +#define JS_NULL_CLASS_EXT {NULL,NULL,NULL,NULL,NULL,false} + +struct ObjectOps +{ + LookupGenericOp lookupGeneric; + LookupPropOp lookupProperty; + LookupElementOp lookupElement; + LookupSpecialOp lookupSpecial; + DefineGenericOp defineGeneric; + DefinePropOp defineProperty; + DefineElementOp defineElement; + DefineSpecialOp defineSpecial; + GenericIdOp getGeneric; + PropertyIdOp getProperty; + ElementIdOp getElement; + ElementIfPresentOp getElementIfPresent; + SpecialIdOp getSpecial; + StrictGenericIdOp setGeneric; + StrictPropertyIdOp setProperty; + StrictElementIdOp setElement; + StrictSpecialIdOp setSpecial; + GenericAttributesOp getGenericAttributes; + PropertyAttributesOp getPropertyAttributes; + ElementAttributesOp getElementAttributes; + SpecialAttributesOp getSpecialAttributes; + GenericAttributesOp setGenericAttributes; + PropertyAttributesOp setPropertyAttributes; + ElementAttributesOp setElementAttributes; + SpecialAttributesOp setSpecialAttributes; + DeletePropertyOp deleteProperty; + DeleteElementOp deleteElement; + DeleteSpecialOp deleteSpecial; + + JSNewEnumerateOp enumerate; + TypeOfOp typeOf; + ObjectOp thisObject; + ClearOp clear; +}; + +#define JS_NULL_OBJECT_OPS {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,NULL,NULL} + + + + +struct Class +{ + const char *name; uint32_t flags; JSPropertyOp addProperty; JSPropertyOp delProperty; JSPropertyOp getProperty; JSStrictPropertyOp setProperty; JSEnumerateOp enumerate; JSResolveOp resolve; JSConvertOp convert; FinalizeOp finalize; JSCheckAccessOp checkAccess; JSNative call; JSHasInstanceOp hasInstance; JSNative construct; JSTraceOp trace; + ClassExtension ext; + ObjectOps ops; + uint8_t pad[sizeof(JSClass) - sizeof(ClassSizeMeasurement) - + sizeof(ClassExtension) - sizeof(ObjectOps)]; + + + static const uint32_t NON_NATIVE = (1<<((8 + 8)+3)); + + bool isNative() const { + return !(flags & NON_NATIVE); + } + + bool hasPrivate() const { + return !!(flags & (1<<0)); + } +}; + +typedef int moz_static_assert29[(__builtin_offsetof (JSClass, name) == __builtin_offsetof (Class, name)) ? 1 : -1]; +typedef int moz_static_assert30[(__builtin_offsetof (JSClass, flags) == __builtin_offsetof (Class, flags)) ? 1 : -1]; +typedef int moz_static_assert31[(__builtin_offsetof (JSClass, addProperty) == __builtin_offsetof (Class, addProperty)) ? 1 : -1]; +typedef int moz_static_assert32[(__builtin_offsetof (JSClass, delProperty) == __builtin_offsetof (Class, delProperty)) ? 1 : -1]; +typedef int moz_static_assert33[(__builtin_offsetof (JSClass, getProperty) == __builtin_offsetof (Class, getProperty)) ? 1 : -1]; +typedef int moz_static_assert34[(__builtin_offsetof (JSClass, setProperty) == __builtin_offsetof (Class, setProperty)) ? 1 : -1]; +typedef int moz_static_assert35[(__builtin_offsetof (JSClass, enumerate) == __builtin_offsetof (Class, enumerate)) ? 1 : -1]; +typedef int moz_static_assert36[(__builtin_offsetof (JSClass, resolve) == __builtin_offsetof (Class, resolve)) ? 1 : -1]; +typedef int moz_static_assert37[(__builtin_offsetof (JSClass, convert) == __builtin_offsetof (Class, convert)) ? 1 : -1]; +typedef int moz_static_assert38[(__builtin_offsetof (JSClass, finalize) == __builtin_offsetof (Class, finalize)) ? 1 : -1]; +typedef int moz_static_assert39[(__builtin_offsetof (JSClass, checkAccess) == __builtin_offsetof (Class, checkAccess)) ? 1 : -1]; +typedef int moz_static_assert40[(__builtin_offsetof (JSClass, call) == __builtin_offsetof (Class, call)) ? 1 : -1]; +typedef int moz_static_assert41[(__builtin_offsetof (JSClass, construct) == __builtin_offsetof (Class, construct)) ? 1 : -1]; +typedef int moz_static_assert42[(__builtin_offsetof (JSClass, hasInstance) == __builtin_offsetof (Class, hasInstance)) ? 1 : -1]; +typedef int moz_static_assert43[(__builtin_offsetof (JSClass, trace) == __builtin_offsetof (Class, trace)) ? 1 : -1]; +typedef int moz_static_assert44[(sizeof(JSClass) == sizeof(Class)) ? 1 : -1]; + +static __attribute__((always_inline)) inline JSClass * +Jsvalify(Class *c) +{ + return (JSClass *)c; +} +static __attribute__((always_inline)) inline const JSClass * +Jsvalify(const Class *c) +{ + return (const JSClass *)c; +} + +static __attribute__((always_inline)) inline Class * +Valueify(JSClass *c) +{ + return (Class *)c; +} +static __attribute__((always_inline)) inline const Class * +Valueify(const JSClass *c) +{ + return (const Class *)c; +} + + + + + +enum ESClassValue { + ESClass_Array, ESClass_Number, ESClass_String, ESClass_Boolean, + ESClass_RegExp, ESClass_ArrayBuffer +}; + + + + + + + +inline bool +ObjectClassIs(JSObject &obj, ESClassValue classValue, JSContext *cx); + + +inline bool +IsObjectWithClass(const Value &v, ESClassValue classValue, JSContext *cx); + +} + +namespace JS { + +inline bool +IsPoisonedSpecialId(js::SpecialId iden) +{ + if (iden.isObject()) + return IsPoisonedPtr(iden.toObject()); + return false; +} + +template <> struct RootMethods +{ + static js::SpecialId initial() { return js::SpecialId(); } + static ThingRootKind kind() { return THING_ROOT_ID; } + static bool poisoned(js::SpecialId id) { return IsPoisonedSpecialId(id); } +}; + +} +# 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" 1 + + + + + + + +#define jsfriendapi_h___ + + + + + +# 1 "./../../dist/include/mozilla/GuardObjects.h" 1 +# 10 "./../../dist/include/mozilla/GuardObjects.h" +#define mozilla_GuardObjects_h +# 137 "./../../dist/include/mozilla/GuardObjects.h" +#define MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER +#define MOZ_GUARD_OBJECT_NOTIFIER_PARAM +#define MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM +#define MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL +#define MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT +#define MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT +#define MOZ_GUARD_OBJECT_NOTIFIER_INIT do { } while (0) +# 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" 2 + +extern "C" { + +extern __attribute__((visibility("default"))) void +JS_SetGrayGCRootsTracer(JSRuntime *rt, JSTraceDataOp traceOp, void *data); + +extern __attribute__((visibility("default"))) JSString * +JS_GetAnonymousString(JSRuntime *rt); + +extern __attribute__((visibility("default"))) JSObject * +JS_FindCompilationScope(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) JSFunction * +JS_GetObjectFunction(JSObject *obj); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetGlobalForFrame(JSStackFrame *fp); + +extern __attribute__((visibility("default"))) JSBool +JS_SplicePrototype(JSContext *cx, JSObject *obj, JSObject *proto); + +extern __attribute__((visibility("default"))) JSObject * +JS_NewObjectWithUniqueType(JSContext *cx, JSClass *clasp, JSObject *proto, JSObject *parent); + +extern __attribute__((visibility("default"))) uint32_t +JS_ObjectCountDynamicSlots(JSObject *obj); + +extern __attribute__((visibility("default"))) void +JS_ShrinkGCBuffers(JSRuntime *rt); + +extern __attribute__((visibility("default"))) size_t +JS_GetE4XObjectsCreated(JSContext *cx); + +extern __attribute__((visibility("default"))) size_t +JS_SetProtoCalled(JSContext *cx); + +extern __attribute__((visibility("default"))) size_t +JS_GetCustomIteratorCount(JSContext *cx); + +extern __attribute__((visibility("default"))) JSBool +JS_NondeterministicGetWeakMapKeys(JSContext *cx, JSObject *obj, JSObject **ret); + + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_IsDeadWrapper(JSObject *obj); + + + + + + +extern __attribute__((visibility("default"))) void +JS_TraceShapeCycleCollectorChildren(JSTracer *trc, void *shape); + +enum { + JS_TELEMETRY_GC_REASON, + JS_TELEMETRY_GC_IS_COMPARTMENTAL, + JS_TELEMETRY_GC_MS, + JS_TELEMETRY_GC_MARK_MS, + JS_TELEMETRY_GC_SWEEP_MS, + JS_TELEMETRY_GC_SLICE_MS, + JS_TELEMETRY_GC_MMU_50, + JS_TELEMETRY_GC_RESET, + JS_TELEMETRY_GC_INCREMENTAL_DISABLED, + JS_TELEMETRY_GC_NON_INCREMENTAL +}; + +typedef void +(* JSAccumulateTelemetryDataCallback)(int id, uint32_t sample); + +extern __attribute__((visibility("default"))) void +JS_SetAccumulateTelemetryCallback(JSRuntime *rt, JSAccumulateTelemetryDataCallback callback); + +extern __attribute__((visibility("default"))) JSPrincipals * +JS_GetCompartmentPrincipals(JSCompartment *compartment); + +extern __attribute__((visibility("default"))) void +JS_SetCompartmentPrincipals(JSCompartment *compartment, JSPrincipals *principals); + + +extern __attribute__((visibility("default"))) JSObject * +JS_ObjectToInnerObject(JSContext *cx, JSObject *obj); + + +extern __attribute__((visibility("default"))) JSObject * +JS_ObjectToOuterObject(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) JSObject * +JS_CloneObject(JSContext *cx, JSObject *obj, JSObject *proto, JSObject *parent); + +extern __attribute__((visibility("default"))) JSBool +js_GetterOnlyPropertyStub(JSContext *cx, JSHandleObject obj, JSHandleId id, JSBool strict, jsval *vp); + +__attribute__((visibility("default"))) void +js_ReportOverRecursed(JSContext *maybecx); +# 139 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) bool +JS_CopyPropertiesFrom(JSContext *cx, JSObject *target, JSObject *obj); + +extern __attribute__((visibility("default"))) JSBool +JS_WrapPropertyDescriptor(JSContext *cx, js::PropertyDescriptor *desc); + +extern __attribute__((visibility("default"))) JSBool +JS_WrapAutoIdVector(JSContext *cx, JS::AutoIdVector &props); + +extern __attribute__((visibility("default"))) JSBool +JS_EnumerateState(JSContext *cx, JSHandleObject obj, JSIterateOp enum_op, js::Value *statep, jsid *idp); + +struct JSFunctionSpecWithHelp { + const char *name; + JSNative call; + uint16_t nargs; + uint16_t flags; + const char *usage; + const char *help; +}; + +#define JS_FN_HELP(name,call,nargs,flags,usage,help) {name, call, nargs, (flags) | JSPROP_ENUMERATE | JSFUN_STUB_GSOPS, usage, help} + + +extern __attribute__((visibility("default"))) bool +JS_DefineFunctionsWithHelp(JSContext *cx, JSObject *obj, const JSFunctionSpecWithHelp *fs); + + + +} + + + +namespace js { + +struct RuntimeFriendFields { + + + + + volatile int32_t interrupt; + + + uintptr_t nativeStackLimit; + + RuntimeFriendFields() + : interrupt(0), + nativeStackLimit(0) { } + + static const RuntimeFriendFields *get(const JSRuntime *rt) { + return reinterpret_cast(rt); + } +}; + +inline JSRuntime * +GetRuntime(const JSContext *cx) +{ + return ContextFriendFields::get(cx)->runtime; +} + +typedef bool +(* PreserveWrapperCallback)(JSContext *cx, JSObject *obj); +# 212 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +class __attribute__((visibility("default"))) AutoSwitchCompartment { + private: + JSContext *cx; + JSCompartment *oldCompartment; + public: + AutoSwitchCompartment(JSContext *cx, JSCompartment *newCompartment + ); + AutoSwitchCompartment(JSContext *cx, JSObject *target ); + ~AutoSwitchCompartment(); + +}; + + +__attribute__((visibility("default"))) JSBool obj_defineGetter(JSContext *cx, unsigned argc, js::Value *vp); +__attribute__((visibility("default"))) JSBool obj_defineSetter(JSContext *cx, unsigned argc, js::Value *vp); + + +extern __attribute__((visibility("default"))) bool +IsSystemCompartment(const JSCompartment *compartment); + +extern __attribute__((visibility("default"))) bool +IsAtomsCompartment(const JSCompartment *c); + + + + + + + +extern __attribute__((visibility("default"))) bool +CheckUndeclaredVarAssignment(JSContext *cx, JSString *propname); + +struct WeakMapTracer; + + + + + + + +typedef void +(* WeakMapTraceCallback)(WeakMapTracer *trc, JSObject *m, + void *k, JSGCTraceKind kkind, + void *v, JSGCTraceKind vkind); + +struct WeakMapTracer { + JSRuntime *runtime; + WeakMapTraceCallback callback; + + WeakMapTracer(JSRuntime *rt, WeakMapTraceCallback cb) + : runtime(rt), callback(cb) {} +}; + +extern __attribute__((visibility("default"))) void +TraceWeakMaps(WeakMapTracer *trc); + +extern __attribute__((visibility("default"))) bool +GCThingIsMarkedGray(void *thing); + + + + + + + +namespace shadow { + +struct TypeObject { + JSObject *proto; +}; + +struct BaseShape { + js::Class *clasp; + JSObject *parent; +}; + +struct Shape { + BaseShape *base; + jsid _1; + uint32_t slotInfo; + + static const uint32_t FIXED_SLOTS_SHIFT = 27; +}; + +struct Object { + Shape *shape; + TypeObject *type; + js::Value *slots; + js::Value *_1; + + size_t numFixedSlots() const { return shape->slotInfo >> Shape::FIXED_SLOTS_SHIFT; } + Value *fixedSlots() const { + return (Value *)(uintptr_t(this) + sizeof(shadow::Object)); + } + + js::Value &slotRef(size_t slot) const { + size_t nfixed = numFixedSlots(); + if (slot < nfixed) + return fixedSlots()[slot]; + return slots[slot - nfixed]; + } +}; + +struct Atom { + size_t _; + const jschar *chars; +}; + +} + +extern __attribute__((visibility("default"))) js::Class AnyNameClass; +extern __attribute__((visibility("default"))) js::Class AttributeNameClass; +extern __attribute__((visibility("default"))) js::Class CallClass; +extern __attribute__((visibility("default"))) js::Class DeclEnvClass; +extern __attribute__((visibility("default"))) js::Class FunctionClass; +extern __attribute__((visibility("default"))) js::Class FunctionProxyClass; +extern __attribute__((visibility("default"))) js::Class NamespaceClass; +extern __attribute__((visibility("default"))) js::Class OuterWindowProxyClass; +extern __attribute__((visibility("default"))) js::Class ObjectProxyClass; +extern __attribute__((visibility("default"))) js::Class QNameClass; +extern __attribute__((visibility("default"))) js::Class XMLClass; +extern __attribute__((visibility("default"))) js::Class ObjectClass; + +inline js::Class * +GetObjectClass(const JSObject *obj) +{ + return reinterpret_cast(obj)->shape->base->clasp; +} + +inline JSClass * +GetObjectJSClass(const JSObject *obj) +{ + return js::Jsvalify(GetObjectClass(obj)); +} + +__attribute__((visibility("default"))) bool +IsScopeObject(JSObject *obj); + +inline JSObject * +GetObjectParent(JSObject *obj) +{ + do { } while(0); + return reinterpret_cast(obj)->shape->base->parent; +} + +__attribute__((visibility("default"))) JSObject * +GetObjectParentMaybeScope(JSObject *obj); + +__attribute__((visibility("default"))) JSObject * +GetGlobalForObjectCrossCompartment(JSObject *obj); + +__attribute__((visibility("default"))) void +NotifyAnimationActivity(JSObject *obj); + +__attribute__((visibility("default"))) bool +IsOriginalScriptFunction(JSFunction *fun); + +__attribute__((visibility("default"))) JSFunction * +DefineFunctionWithReserved(JSContext *cx, JSObject *obj, const char *name, JSNative call, + unsigned nargs, unsigned attrs); + +__attribute__((visibility("default"))) JSFunction * +NewFunctionWithReserved(JSContext *cx, JSNative call, unsigned nargs, unsigned flags, + JSObject *parent, const char *name); + +__attribute__((visibility("default"))) JSFunction * +NewFunctionByIdWithReserved(JSContext *cx, JSNative native, unsigned nargs, unsigned flags, + JSObject *parent, jsid id); + +__attribute__((visibility("default"))) JSObject * +InitClassWithReserved(JSContext *cx, JSObject *obj, JSObject *parent_proto, + JSClass *clasp, JSNative constructor, unsigned nargs, + JSPropertySpec *ps, JSFunctionSpec *fs, + JSPropertySpec *static_ps, JSFunctionSpec *static_fs); + +__attribute__((visibility("default"))) const Value & +GetFunctionNativeReserved(JSObject *fun, size_t which); + +__attribute__((visibility("default"))) void +SetFunctionNativeReserved(JSObject *fun, size_t which, const Value &val); + +inline JSObject * +GetObjectProto(JSObject *obj) +{ + return reinterpret_cast(obj)->type->proto; +} + +inline void * +GetObjectPrivate(JSObject *obj) +{ + const shadow::Object *nobj = reinterpret_cast(obj); + void **addr = reinterpret_cast(&nobj->fixedSlots()[nobj->numFixedSlots()]); + return *addr; +} + + + + + +inline const Value & +GetReservedSlot(const JSObject *obj, size_t slot) +{ + do { } while(0); + return reinterpret_cast(obj)->slotRef(slot); +} + +__attribute__((visibility("default"))) void +SetReservedSlotWithBarrier(JSObject *obj, size_t slot, const Value &value); + +inline void +SetReservedSlot(JSObject *obj, size_t slot, const Value &value) +{ + do { } while(0); + shadow::Object *sobj = reinterpret_cast(obj); + if (sobj->slotRef(slot).isMarkable()) + SetReservedSlotWithBarrier(obj, slot, value); + else + sobj->slotRef(slot) = value; +} + +__attribute__((visibility("default"))) uint32_t +GetObjectSlotSpan(JSObject *obj); + +inline const Value & +GetObjectSlot(JSObject *obj, size_t slot) +{ + do { } while(0); + return reinterpret_cast(obj)->slotRef(slot); +} + +inline Shape * +GetObjectShape(JSObject *obj) +{ + shadow::Shape *shape = reinterpret_cast(obj)->shape; + return reinterpret_cast(shape); +} + +inline const jschar * +GetAtomChars(JSAtom *atom) +{ + return reinterpret_cast(atom)->chars; +} + +inline JSLinearString * +AtomToLinearString(JSAtom *atom) +{ + return reinterpret_cast(atom); +} + +static inline js::PropertyOp +CastAsJSPropertyOp(JSObject *object) +{ + return (__extension__ (js::PropertyOp) (size_t) (object)); +} + +static inline js::StrictPropertyOp +CastAsJSStrictPropertyOp(JSObject *object) +{ + return (__extension__ (js::StrictPropertyOp) (size_t) (object)); +} + +__attribute__((visibility("default"))) bool +GetPropertyNames(JSContext *cx, JSObject *obj, unsigned flags, js::AutoIdVector *props); + +__attribute__((visibility("default"))) bool +GetGeneric(JSContext *cx, JSObject *obj, JSObject *receiver, jsid id, Value *vp); + +__attribute__((visibility("default"))) bool +StringIsArrayIndex(JSLinearString *str, uint32_t *indexp); + +__attribute__((visibility("default"))) void +SetPreserveWrapperCallback(JSRuntime *rt, PreserveWrapperCallback callback); + +__attribute__((visibility("default"))) bool +IsObjectInContextCompartment(const JSObject *obj, const JSContext *cx); + + + + + + +#define JSITER_ENUMERATE 0x1 +#define JSITER_FOREACH 0x2 +#define JSITER_KEYVALUE 0x4 +#define JSITER_OWNONLY 0x8 +#define JSITER_HIDDEN 0x10 +#define JSITER_FOR_OF 0x20 + +inline uintptr_t +GetNativeStackLimit(const JSRuntime *rt) +{ + return RuntimeFriendFields::get(rt)->nativeStackLimit; +} + +#define JS_CHECK_RECURSION(cx,onerror) JS_BEGIN_MACRO int stackDummy_; if (!JS_CHECK_STACK_SIZE(js::GetNativeStackLimit(js::GetRuntime(cx)), &stackDummy_)) { js_ReportOverRecursed(cx); onerror; } JS_END_MACRO +# 515 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +__attribute__((visibility("default"))) void +StartPCCountProfiling(JSContext *cx); + +__attribute__((visibility("default"))) void +StopPCCountProfiling(JSContext *cx); + +__attribute__((visibility("default"))) void +PurgePCCounts(JSContext *cx); + +__attribute__((visibility("default"))) size_t +GetPCCountScriptCount(JSContext *cx); + +__attribute__((visibility("default"))) JSString * +GetPCCountScriptSummary(JSContext *cx, size_t script); + +__attribute__((visibility("default"))) JSString * +GetPCCountScriptContents(JSContext *cx, size_t script); + + +__attribute__((visibility("default"))) void * +GetOwnerThread(const JSContext *cx); + +__attribute__((visibility("default"))) unsigned +GetContextOutstandingRequests(const JSContext *cx); + + +__attribute__((visibility("default"))) JSCompartment * +GetContextCompartment(const JSContext *cx); + +__attribute__((visibility("default"))) bool +HasUnrootedGlobal(const JSContext *cx); + +typedef void +(* ActivityCallback)(void *arg, JSBool active); + + + + + + +__attribute__((visibility("default"))) void +SetActivityCallback(JSRuntime *rt, ActivityCallback cb, void *arg); + +extern __attribute__((visibility("default"))) const JSStructuredCloneCallbacks * +GetContextStructuredCloneCallbacks(JSContext *cx); + +extern __attribute__((visibility("default"))) JSVersion +VersionSetMoarXML(JSVersion version, bool enable); + +extern __attribute__((visibility("default"))) bool +CanCallContextDebugHandler(JSContext *cx); + +extern __attribute__((visibility("default"))) JSTrapStatus +CallContextDebugHandler(JSContext *cx, JSScript *script, jsbytecode *bc, Value *rval); + +extern __attribute__((visibility("default"))) bool +IsContextRunningJS(JSContext *cx); + +class SystemAllocPolicy; +typedef Vector CompartmentVector; +extern __attribute__((visibility("default"))) const CompartmentVector& +GetRuntimeCompartments(JSRuntime *rt); + +extern __attribute__((visibility("default"))) size_t +SizeOfJSContext(); + +#define GCREASONS(D) D(API) D(MAYBEGC) D(LAST_CONTEXT) D(DESTROY_CONTEXT) D(LAST_DITCH) D(TOO_MUCH_MALLOC) D(ALLOC_TRIGGER) D(DEBUG_GC) D(DEBUG_MODE_GC) D(UNUSED3) D(DOM_WINDOW_UTILS) D(COMPONENT_UTILS) D(MEM_PRESSURE) D(CC_WAITING) D(CC_FORCED) D(LOAD_END) D(POST_COMPARTMENT) D(PAGE_HIDE) D(NSJSCONTEXT_DESTROY) D(SET_NEW_DOCUMENT) D(SET_DOC_SHELL) D(DOM_UTILS) D(DOM_IPC) D(DOM_WORKER) D(INTER_SLICE_GC) D(REFRESH_FRAME) D(FULL_GC_TIMER) +# 613 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +namespace gcreason { + + +enum Reason { +#define MAKE_REASON(name) name, + API, MAYBEGC, LAST_CONTEXT, DESTROY_CONTEXT, LAST_DITCH, TOO_MUCH_MALLOC, ALLOC_TRIGGER, DEBUG_GC, DEBUG_MODE_GC, UNUSED3, DOM_WINDOW_UTILS, COMPONENT_UTILS, MEM_PRESSURE, CC_WAITING, CC_FORCED, LOAD_END, POST_COMPARTMENT, PAGE_HIDE, NSJSCONTEXT_DESTROY, SET_NEW_DOCUMENT, SET_DOC_SHELL, DOM_UTILS, DOM_IPC, DOM_WORKER, INTER_SLICE_GC, REFRESH_FRAME, FULL_GC_TIMER, +#undef MAKE_REASON + NO_REASON, + NUM_REASONS +}; + +} + +extern __attribute__((visibility("default"))) void +PrepareCompartmentForGC(JSCompartment *comp); + +extern __attribute__((visibility("default"))) void +PrepareForFullGC(JSRuntime *rt); + +extern __attribute__((visibility("default"))) bool +IsGCScheduled(JSRuntime *rt); + +extern __attribute__((visibility("default"))) void +SkipCompartmentForGC(JSCompartment *comp); +# 645 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) void +GCForReason(JSRuntime *rt, gcreason::Reason reason); + +extern __attribute__((visibility("default"))) void +ShrinkingGC(JSRuntime *rt, gcreason::Reason reason); + +extern __attribute__((visibility("default"))) void +IncrementalGC(JSRuntime *rt, gcreason::Reason reason); + +extern __attribute__((visibility("default"))) void +SetGCSliceTimeBudget(JSContext *cx, int64_t millis); + +enum GCProgress { +# 668 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" + GC_CYCLE_BEGIN, + GC_SLICE_BEGIN, + GC_SLICE_END, + GC_CYCLE_END +}; + +struct __attribute__((visibility("default"))) GCDescription { + bool isCompartment; + + GCDescription(bool isCompartment) + : isCompartment(isCompartment) {} + + jschar *formatMessage(JSRuntime *rt) const; + jschar *formatJSON(JSRuntime *rt, uint64_t timestamp) const; +}; + +typedef void +(* GCSliceCallback)(JSRuntime *rt, GCProgress progress, const GCDescription &desc); + +extern __attribute__((visibility("default"))) GCSliceCallback +SetGCSliceCallback(JSRuntime *rt, GCSliceCallback callback); + + + + + +extern __attribute__((visibility("default"))) void +NotifyDidPaint(JSRuntime *rt); + +extern __attribute__((visibility("default"))) bool +IsIncrementalGCEnabled(JSRuntime *rt); + +extern __attribute__((visibility("default"))) void +DisableIncrementalGC(JSRuntime *rt); + +extern __attribute__((visibility("default"))) bool +IsIncrementalBarrierNeeded(JSRuntime *rt); + +extern __attribute__((visibility("default"))) bool +IsIncrementalBarrierNeeded(JSContext *cx); + +extern __attribute__((visibility("default"))) bool +IsIncrementalBarrierNeededOnObject(JSObject *obj); + +extern __attribute__((visibility("default"))) bool +IsIncrementalBarrierNeededOnScript(JSScript *obj); + +extern __attribute__((visibility("default"))) void +IncrementalReferenceBarrier(void *ptr); + +extern __attribute__((visibility("default"))) void +IncrementalValueBarrier(const Value &v); + +extern __attribute__((visibility("default"))) void +PokeGC(JSRuntime *rt); + +class ObjectPtr +{ + JSObject *value; + + public: + ObjectPtr() : value(__null) {} + + ObjectPtr(JSObject *obj) : value(obj) {} + + + ~ObjectPtr() { do { } while(0); } + + void finalize(JSRuntime *rt) { + if (IsIncrementalBarrierNeeded(rt)) + IncrementalReferenceBarrier(value); + value = __null; + } + + void init(JSObject *obj) { value = obj; } + + JSObject *get() const { return value; } + + void writeBarrierPre(JSRuntime *rt) { + IncrementalReferenceBarrier(value); + } + + ObjectPtr &operator=(JSObject *obj) { + IncrementalReferenceBarrier(value); + value = obj; + return *this; + } + + JSObject &operator*() const { return *value; } + JSObject *operator->() const { return value; } + operator JSObject *() const { return value; } +}; + +extern __attribute__((visibility("default"))) JSObject * +GetTestingFunctions(JSContext *cx); + + + + + + +inline JSFreeOp * +CastToJSFreeOp(FreeOp *fop) +{ + return reinterpret_cast(fop); +} + + + + + + + +extern __attribute__((visibility("default"))) const jschar* +GetErrorTypeNameFromNumber(JSContext* cx, const unsigned errorNumber); + + +typedef enum NukedGlobalHandling { + NukeForGlobalObject, + DontNukeForGlobalObject +} NukedGlobalHandling; + +extern __attribute__((visibility("default"))) JSBool +NukeChromeCrossCompartmentWrappersForGlobal(JSContext *cx, JSObject *obj, + NukedGlobalHandling nukeGlobal); + +} +# 804 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) JSBool +js_DateIsValid(JSContext *cx, JSObject* obj); + +extern __attribute__((visibility("default"))) double +js_DateGetMsecSinceEpoch(JSContext *cx, JSObject *obj); + + + + + + + +typedef enum JSErrNum { +#define MSG_DEF(name,number,count,exception,format) name = number, + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/js.msg" 1 +# 53 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/js.msg" +JSMSG_NOT_AN_ERROR = 0, +JSMSG_NOT_DEFINED = 1, +JSMSG_INACTIVE = 2, +JSMSG_MORE_ARGS_NEEDED = 3, +JSMSG_BAD_CHAR = 4, +JSMSG_BAD_TYPE = 5, +JSMSG_ALLOC_OVERFLOW = 6, +JSMSG_MISSING_HEXDIGITS = 7, +JSMSG_INCOMPATIBLE_PROTO = 8, +JSMSG_NO_CONSTRUCTOR = 9, +JSMSG_CANT_ALIAS = 10, +JSMSG_NOT_SCRIPTED_FUNCTION = 11, +JSMSG_BAD_SORT_ARG = 12, +JSMSG_BAD_ATOMIC_NUMBER = 13, +JSMSG_TOO_MANY_LITERALS = 14, +JSMSG_CANT_WATCH = 15, +JSMSG_STACK_UNDERFLOW = 16, +JSMSG_NEED_DIET = 17, +JSMSG_TOO_MANY_LOCAL_ROOTS = 18, +JSMSG_READ_ONLY = 19, +JSMSG_BAD_FORMAL = 20, +JSMSG_CANT_DELETE = 21, +JSMSG_NOT_FUNCTION = 22, +JSMSG_NOT_CONSTRUCTOR = 23, +JSMSG_INVALID_DATE = 24, +JSMSG_TOO_DEEP = 25, +JSMSG_OVER_RECURSED = 26, +JSMSG_IN_NOT_OBJECT = 27, +JSMSG_BAD_NEW_RESULT = 28, +JSMSG_BAD_SHARP_DEF = 29, +JSMSG_BAD_SHARP_USE = 30, +JSMSG_BAD_INSTANCEOF_RHS = 31, +JSMSG_BAD_BYTECODE = 32, +JSMSG_BAD_RADIX = 33, +JSMSG_PAREN_BEFORE_LET = 34, +JSMSG_CANT_CONVERT = 35, +JSMSG_CYCLIC_VALUE = 36, +JSMSG_COMPILE_EXECED_SCRIPT = 37, +JSMSG_CANT_CONVERT_TO = 38, +JSMSG_NO_PROPERTIES = 39, +JSMSG_CANT_FIND_CLASS = 40, +JSMSG_DEAD_OBJECT = 41, +JSMSG_BYTECODE_TOO_BIG = 42, +JSMSG_UNKNOWN_FORMAT = 43, +JSMSG_TOO_MANY_CON_ARGS = 44, +JSMSG_TOO_MANY_FUN_ARGS = 45, +JSMSG_BAD_QUANTIFIER = 46, +JSMSG_MIN_TOO_BIG = 47, +JSMSG_MAX_TOO_BIG = 48, +JSMSG_OUT_OF_ORDER = 49, +JSMSG_BAD_DESTRUCT_DECL = 50, +JSMSG_BAD_DESTRUCT_ASS = 51, +JSMSG_PAREN_AFTER_LET = 52, +JSMSG_CURLY_AFTER_LET = 53, +JSMSG_MISSING_PAREN = 54, +JSMSG_UNTERM_CLASS = 55, +JSMSG_TRAILING_SLASH = 56, +JSMSG_BAD_CLASS_RANGE = 57, +JSMSG_BAD_REGEXP_FLAG = 58, +JSMSG_NO_INPUT = 59, +JSMSG_CANT_OPEN = 60, +JSMSG_TOO_MANY_FUN_APPLY_ARGS = 61, +JSMSG_UNMATCHED_RIGHT_PAREN = 62, +JSMSG_TOO_BIG_TO_ENCODE = 63, +JSMSG_ARG_INDEX_OUT_OF_RANGE = 64, +JSMSG_UNUSED65 = 65, +JSMSG_UNUSED66 = 66, +JSMSG_UNUSED67 = 67, +JSMSG_BAD_SCRIPT_MAGIC = 68, +JSMSG_PAREN_BEFORE_FORMAL = 69, +JSMSG_MISSING_FORMAL = 70, +JSMSG_PAREN_AFTER_FORMAL = 71, +JSMSG_CURLY_BEFORE_BODY = 72, +JSMSG_CURLY_AFTER_BODY = 73, +JSMSG_PAREN_BEFORE_COND = 74, +JSMSG_PAREN_AFTER_COND = 75, +JSMSG_DESTRUCT_DUP_ARG = 76, +JSMSG_NAME_AFTER_DOT = 77, +JSMSG_BRACKET_IN_INDEX = 78, +JSMSG_XML_WHOLE_PROGRAM = 79, +JSMSG_PAREN_BEFORE_SWITCH = 80, +JSMSG_PAREN_AFTER_SWITCH = 81, +JSMSG_CURLY_BEFORE_SWITCH = 82, +JSMSG_COLON_AFTER_CASE = 83, +JSMSG_WHILE_AFTER_DO = 84, +JSMSG_PAREN_AFTER_FOR = 85, +JSMSG_SEMI_AFTER_FOR_INIT = 86, +JSMSG_SEMI_AFTER_FOR_COND = 87, +JSMSG_PAREN_AFTER_FOR_CTRL = 88, +JSMSG_CURLY_BEFORE_TRY = 89, +JSMSG_CURLY_AFTER_TRY = 90, +JSMSG_PAREN_BEFORE_CATCH = 91, +JSMSG_CATCH_IDENTIFIER = 92, +JSMSG_PAREN_AFTER_CATCH = 93, +JSMSG_CURLY_BEFORE_CATCH = 94, +JSMSG_CURLY_AFTER_CATCH = 95, +JSMSG_CURLY_BEFORE_FINALLY = 96, +JSMSG_CURLY_AFTER_FINALLY = 97, +JSMSG_CATCH_OR_FINALLY = 98, +JSMSG_PAREN_BEFORE_WITH = 99, +JSMSG_PAREN_AFTER_WITH = 100, +JSMSG_CURLY_IN_COMPOUND = 101, +JSMSG_NO_VARIABLE_NAME = 102, +JSMSG_COLON_IN_COND = 103, +JSMSG_PAREN_AFTER_ARGS = 104, +JSMSG_BRACKET_AFTER_LIST = 105, +JSMSG_COLON_AFTER_ID = 106, +JSMSG_CURLY_AFTER_LIST = 107, +JSMSG_PAREN_IN_PAREN = 108, +JSMSG_SEMI_BEFORE_STMNT = 109, +JSMSG_NO_RETURN_VALUE = 110, +JSMSG_DUPLICATE_FORMAL = 111, +JSMSG_EQUAL_AS_ASSIGN = 112, +JSMSG_OPTIMIZED_CLOSURE_LEAK = 113, +JSMSG_TOO_MANY_DEFAULTS = 114, +JSMSG_TOO_MANY_CASES = 115, +JSMSG_BAD_SWITCH = 116, +JSMSG_BAD_FOR_LEFTSIDE = 117, +JSMSG_CATCH_AFTER_GENERAL = 118, +JSMSG_CATCH_WITHOUT_TRY = 119, +JSMSG_FINALLY_WITHOUT_TRY = 120, +JSMSG_LABEL_NOT_FOUND = 121, +JSMSG_TOUGH_BREAK = 122, +JSMSG_BAD_CONTINUE = 123, +JSMSG_BAD_RETURN_OR_YIELD = 124, +JSMSG_BAD_LABEL = 125, +JSMSG_DUPLICATE_LABEL = 126, +JSMSG_VAR_HIDES_ARG = 127, +JSMSG_BAD_VAR_INIT = 128, +JSMSG_BAD_LEFTSIDE_OF_ASS = 129, +JSMSG_BAD_OPERAND = 130, +JSMSG_BAD_PROP_ID = 131, +JSMSG_RESERVED_ID = 132, +JSMSG_SYNTAX_ERROR = 133, +JSMSG_BAD_SHARP_VAR_DEF = 134, +JSMSG_BAD_PROTOTYPE = 135, +JSMSG_MISSING_EXPONENT = 136, +JSMSG_OUT_OF_MEMORY = 137, +JSMSG_UNTERMINATED_STRING = 138, +JSMSG_TOO_MANY_PARENS = 139, +JSMSG_UNTERMINATED_COMMENT = 140, +JSMSG_UNTERMINATED_REGEXP = 141, +JSMSG_BAD_CLONE_FUNOBJ_SCOPE = 142, +JSMSG_SHARPVAR_TOO_BIG = 143, +JSMSG_ILLEGAL_CHARACTER = 144, +JSMSG_BAD_OCTAL = 145, +JSMSG_BAD_INDIRECT_CALL = 146, +JSMSG_UNCAUGHT_EXCEPTION = 147, +JSMSG_INVALID_BACKREF = 148, +JSMSG_BAD_BACKREF = 149, +JSMSG_PRECISION_RANGE = 150, +JSMSG_BAD_GETTER_OR_SETTER = 151, +JSMSG_BAD_ARRAY_LENGTH = 152, +JSMSG_CANT_DESCRIBE_PROPS = 153, +JSMSG_BAD_APPLY_ARGS = 154, +JSMSG_REDECLARED_VAR = 155, +JSMSG_UNDECLARED_VAR = 156, +JSMSG_ANON_NO_RETURN_VALUE = 157, +JSMSG_DEPRECATED_USAGE = 158, +JSMSG_BAD_URI = 159, +JSMSG_GETTER_ONLY = 160, +JSMSG_IDSTART_AFTER_NUMBER = 161, +JSMSG_UNDEFINED_PROP = 162, +JSMSG_USELESS_EXPR = 163, +JSMSG_REDECLARED_PARAM = 164, +JSMSG_NEWREGEXP_FLAGGED = 165, +JSMSG_RESERVED_SLOT_RANGE = 166, +JSMSG_CANT_DECODE_PRINCIPALS = 167, +JSMSG_CANT_SEAL_OBJECT = 168, +JSMSG_TOO_MANY_CATCH_VARS = 169, +JSMSG_BAD_XML_MARKUP = 170, +JSMSG_BAD_XML_CHARACTER = 171, +JSMSG_BAD_DEFAULT_XML_NAMESPACE = 172, +JSMSG_BAD_XML_NAME_SYNTAX = 173, +JSMSG_BRACKET_AFTER_ATTR_EXPR = 174, +JSMSG_NESTING_GENERATOR = 175, +JSMSG_CURLY_IN_XML_EXPR = 176, +JSMSG_BAD_XML_NAMESPACE = 177, +JSMSG_BAD_XML_ATTR_NAME = 178, +JSMSG_BAD_XML_NAME = 179, +JSMSG_BAD_XML_CONVERSION = 180, +JSMSG_BAD_XMLLIST_CONVERSION = 181, +JSMSG_BAD_GENERATOR_SEND = 182, +JSMSG_NO_ASSIGN_IN_XML_ATTR = 183, +JSMSG_BAD_XML_ATTR_VALUE = 184, +JSMSG_XML_TAG_NAME_MISMATCH = 185, +JSMSG_BAD_XML_TAG_SYNTAX = 186, +JSMSG_BAD_XML_LIST_SYNTAX = 187, +JSMSG_INCOMPATIBLE_METHOD = 188, +JSMSG_CANT_SET_XML_ATTRS = 189, +JSMSG_END_OF_XML_SOURCE = 190, +JSMSG_END_OF_XML_ENTITY = 191, +JSMSG_BAD_XML_QNAME = 192, +JSMSG_BAD_FOR_EACH_LOOP = 193, +JSMSG_BAD_XMLLIST_PUT = 194, +JSMSG_UNKNOWN_XML_ENTITY = 195, +JSMSG_BAD_XML_NCR = 196, +JSMSG_UNDEFINED_XML_NAME = 197, +JSMSG_DUPLICATE_XML_ATTR = 198, +JSMSG_TOO_MANY_LOCALS = 199, +JSMSG_ARRAY_INIT_TOO_BIG = 200, +JSMSG_REGEXP_TOO_COMPLEX = 201, +JSMSG_BUFFER_TOO_SMALL = 202, +JSMSG_BAD_SURROGATE_CHAR = 203, +JSMSG_UTF8_CHAR_TOO_LARGE = 204, +JSMSG_MALFORMED_UTF8_CHAR = 205, +JSMSG_USER_DEFINED_ERROR = 206, +JSMSG_WRONG_CONSTRUCTOR = 207, +JSMSG_BAD_GENERATOR_RETURN = 208, +JSMSG_BAD_ANON_GENERATOR_RETURN = 209, +JSMSG_NAME_AFTER_FOR_PAREN = 210, +JSMSG_IN_AFTER_FOR_NAME = 211, +JSMSG_BAD_TRAP_RETURN_VALUE = 212, +JSMSG_KEYWORD_NOT_NS = 213, +JSMSG_BAD_GENERATOR_YIELD = 214, +JSMSG_BAD_GENERATOR_SYNTAX = 215, +JSMSG_ARRAY_COMP_LEFTSIDE = 216, +JSMSG_NON_XML_FILTER = 217, +JSMSG_EMPTY_ARRAY_REDUCE = 218, +JSMSG_NON_LIST_XML_METHOD = 219, +JSMSG_BAD_DELETE_OPERAND = 220, +JSMSG_BAD_INCOP_OPERAND = 221, +JSMSG_UNEXPECTED_TYPE = 222, +JSMSG_LET_DECL_NOT_IN_BLOCK = 223, +JSMSG_BAD_OBJECT_INIT = 224, +JSMSG_CANT_SET_ARRAY_ATTRS = 225, +JSMSG_EVAL_ARITY = 226, +JSMSG_MISSING_FUN_ARG = 227, +JSMSG_JSON_BAD_PARSE = 228, +JSMSG_JSON_BAD_STRINGIFY = 229, +JSMSG_NOT_CALLABLE_OR_UNDEFINED = 230, +JSMSG_NOT_NONNULL_OBJECT = 231, +JSMSG_DEPRECATED_OCTAL = 232, +JSMSG_STRICT_CODE_WITH = 233, +JSMSG_DUPLICATE_PROPERTY = 234, +JSMSG_DEPRECATED_DELETE_OPERAND = 235, +JSMSG_DEPRECATED_ASSIGN = 236, +JSMSG_BAD_BINDING = 237, +JSMSG_INVALID_DESCRIPTOR = 238, +JSMSG_OBJECT_NOT_EXTENSIBLE = 239, +JSMSG_CANT_REDEFINE_PROP = 240, +JSMSG_CANT_APPEND_TO_ARRAY = 241, +JSMSG_CANT_DEFINE_ARRAY_LENGTH = 242, +JSMSG_CANT_DEFINE_ARRAY_INDEX = 243, +JSMSG_TYPED_ARRAY_BAD_INDEX = 244, +JSMSG_TYPED_ARRAY_NEGATIVE_ARG = 245, +JSMSG_TYPED_ARRAY_BAD_ARGS = 246, +JSMSG_CSP_BLOCKED_FUNCTION = 247, +JSMSG_BAD_GET_SET_FIELD = 248, +JSMSG_BAD_PROXY_FIX = 249, +JSMSG_INVALID_EVAL_SCOPE_ARG = 250, +JSMSG_ACCESSOR_WRONG_ARGS = 251, +JSMSG_THROW_TYPE_ERROR = 252, +JSMSG_BAD_TOISOSTRING_PROP = 253, +JSMSG_BAD_PARSE_NODE = 254, +JSMSG_NOT_EXPECTED_TYPE = 255, +JSMSG_CALLER_IS_STRICT = 256, +JSMSG_NEED_DEBUG_MODE = 257, +JSMSG_STRICT_CODE_LET_EXPR_STMT = 258, +JSMSG_CANT_CHANGE_EXTENSIBILITY = 259, +JSMSG_SC_BAD_SERIALIZED_DATA = 260, +JSMSG_SC_UNSUPPORTED_TYPE = 261, +JSMSG_SC_RECURSION = 262, +JSMSG_CANT_WRAP_XML_OBJECT = 263, +JSMSG_BAD_CLONE_VERSION = 264, +JSMSG_CANT_CLONE_OBJECT = 265, +JSMSG_NON_NATIVE_SCOPE = 266, +JSMSG_STRICT_FUNCTION_STATEMENT = 267, +JSMSG_INVALID_FOR_IN_INIT = 268, +JSMSG_CLEARED_SCOPE = 269, +JSMSG_MALFORMED_ESCAPE = 270, +JSMSG_BAD_GENEXP_BODY = 271, +JSMSG_XML_PROTO_FORBIDDEN = 272, +JSMSG_UNNAMED_FUNCTION_STMT = 273, +JSMSG_CCW_REQUIRED = 274, +JSMSG_DEBUG_BAD_RESUMPTION = 275, +JSMSG_ASSIGN_FUNCTION_OR_NULL = 276, +JSMSG_DEBUG_NOT_LIVE = 277, +JSMSG_DEBUG_OBJECT_WRONG_OWNER = 278, +JSMSG_DEBUG_OBJECT_PROTO = 279, +JSMSG_DEBUG_LOOP = 280, +JSMSG_DEBUG_NOT_IDLE = 281, +JSMSG_DEBUG_BAD_OFFSET = 282, +JSMSG_DEBUG_BAD_LINE = 283, +JSMSG_DEBUG_NOT_DEBUGGING = 284, +JSMSG_DEBUG_COMPARTMENT_MISMATCH = 285, +JSMSG_DEBUG_NOT_SCRIPT_FRAME = 286, +JSMSG_CANT_WATCH_PROP = 287, +JSMSG_CSP_BLOCKED_EVAL = 288, +JSMSG_DEBUG_NO_SCOPE_OBJECT = 289, +JSMSG_EMPTY_CONSEQUENT = 290, +JSMSG_NOT_ITERABLE = 291, +JSMSG_QUERY_LINE_WITHOUT_URL = 292, +JSMSG_QUERY_INNERMOST_WITHOUT_LINE_URL = 293, +JSMSG_DEBUG_VARIABLE_NOT_FOUND = 294, +JSMSG_PARAMETER_AFTER_REST = 295, +JSMSG_NO_REST_NAME = 296, +JSMSG_ARGUMENTS_AND_REST = 297, +JSMSG_FUNCTION_ARGUMENTS_AND_REST = 298, +JSMSG_REST_WITH_DEFAULT = 299, +JSMSG_NONDEFAULT_FORMAL_AFTER_DEFAULT = 300, +JSMSG_YIELD_IN_DEFAULT = 301, +# 820 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" 2 +#undef MSG_DEF + JSErr_Limit +} JSErrNum; + +extern __attribute__((visibility("default"))) const JSErrorFormatString * +js_GetErrorMessage(void *userRef, const char *locale, const unsigned errorNumber); + + + +extern __attribute__((visibility("default"))) uint64_t +js_GetSCOffset(JSStructuredCloneWriter* writer); + + + + + +namespace js { +namespace ArrayBufferView { + +enum ViewType { + TYPE_INT8 = 0, + TYPE_UINT8, + TYPE_INT16, + TYPE_UINT16, + TYPE_INT32, + TYPE_UINT32, + TYPE_FLOAT32, + TYPE_FLOAT64, + + + + + + TYPE_UINT8_CLAMPED, + + TYPE_MAX +}; + +} +} + +typedef js::ArrayBufferView::ViewType JSArrayBufferViewType; +# 870 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) JSObject * +JS_NewInt8Array(JSContext *cx, uint32_t nelements); +extern __attribute__((visibility("default"))) JSObject * +JS_NewUint8Array(JSContext *cx, uint32_t nelements); +extern __attribute__((visibility("default"))) JSObject * +JS_NewUint8ClampedArray(JSContext *cx, uint32_t nelements); + +extern __attribute__((visibility("default"))) JSObject * +JS_NewInt16Array(JSContext *cx, uint32_t nelements); +extern __attribute__((visibility("default"))) JSObject * +JS_NewUint16Array(JSContext *cx, uint32_t nelements); +extern __attribute__((visibility("default"))) JSObject * +JS_NewInt32Array(JSContext *cx, uint32_t nelements); +extern __attribute__((visibility("default"))) JSObject * +JS_NewUint32Array(JSContext *cx, uint32_t nelements); +extern __attribute__((visibility("default"))) JSObject * +JS_NewFloat32Array(JSContext *cx, uint32_t nelements); +extern __attribute__((visibility("default"))) JSObject * +JS_NewFloat64Array(JSContext *cx, uint32_t nelements); +# 898 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) JSObject * +JS_NewInt8ArrayFromArray(JSContext *cx, JSObject *array); +extern __attribute__((visibility("default"))) JSObject * +JS_NewUint8ArrayFromArray(JSContext *cx, JSObject *array); +extern __attribute__((visibility("default"))) JSObject * +JS_NewUint8ClampedArrayFromArray(JSContext *cx, JSObject *array); +extern __attribute__((visibility("default"))) JSObject * +JS_NewInt16ArrayFromArray(JSContext *cx, JSObject *array); +extern __attribute__((visibility("default"))) JSObject * +JS_NewUint16ArrayFromArray(JSContext *cx, JSObject *array); +extern __attribute__((visibility("default"))) JSObject * +JS_NewInt32ArrayFromArray(JSContext *cx, JSObject *array); +extern __attribute__((visibility("default"))) JSObject * +JS_NewUint32ArrayFromArray(JSContext *cx, JSObject *array); +extern __attribute__((visibility("default"))) JSObject * +JS_NewFloat32ArrayFromArray(JSContext *cx, JSObject *array); +extern __attribute__((visibility("default"))) JSObject * +JS_NewFloat64ArrayFromArray(JSContext *cx, JSObject *array); +# 924 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) JSObject * +JS_NewInt8ArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, + uint32_t byteOffset, int32_t length); +extern __attribute__((visibility("default"))) JSObject * +JS_NewUint8ArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, + uint32_t byteOffset, int32_t length); +extern __attribute__((visibility("default"))) JSObject * +JS_NewUint8ClampedArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, + uint32_t byteOffset, int32_t length); +extern __attribute__((visibility("default"))) JSObject * +JS_NewInt16ArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, + uint32_t byteOffset, int32_t length); +extern __attribute__((visibility("default"))) JSObject * +JS_NewUint16ArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, + uint32_t byteOffset, int32_t length); +extern __attribute__((visibility("default"))) JSObject * +JS_NewInt32ArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, + uint32_t byteOffset, int32_t length); +extern __attribute__((visibility("default"))) JSObject * +JS_NewUint32ArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, + uint32_t byteOffset, int32_t length); +extern __attribute__((visibility("default"))) JSObject * +JS_NewFloat32ArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, + uint32_t byteOffset, int32_t length); +extern __attribute__((visibility("default"))) JSObject * +JS_NewFloat64ArrayWithBuffer(JSContext *cx, JSObject *arrayBuffer, + uint32_t byteOffset, int32_t length); + + + + +extern __attribute__((visibility("default"))) JSObject * +JS_NewArrayBuffer(JSContext *cx, uint32_t nbytes); + + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_IsTypedArrayObject(JSObject *obj, JSContext *cx); +# 974 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_IsArrayBufferViewObject(JSObject *obj, JSContext *cx); + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_IsInt8Array(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) JSBool +JS_IsUint8Array(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) JSBool +JS_IsUint8ClampedArray(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) JSBool +JS_IsInt16Array(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) JSBool +JS_IsUint16Array(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) JSBool +JS_IsInt32Array(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) JSBool +JS_IsUint32Array(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) JSBool +JS_IsFloat32Array(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) JSBool +JS_IsFloat64Array(JSObject *obj, JSContext *cx); +# 1008 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) JSArrayBufferViewType +JS_GetTypedArrayType(JSObject *obj, JSContext *cx); + + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_IsArrayBufferObject(JSObject *obj, JSContext *cx); +# 1028 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) uint32_t +JS_GetArrayBufferByteLength(JSObject *obj, JSContext *cx); +# 1040 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) uint8_t * +JS_GetArrayBufferData(JSObject *obj, JSContext *cx); +# 1051 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) uint32_t +JS_GetTypedArrayLength(JSObject *obj, JSContext *cx); +# 1063 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) uint32_t +JS_GetTypedArrayByteOffset(JSObject *obj, JSContext *cx); +# 1074 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) uint32_t +JS_GetTypedArrayByteLength(JSObject *obj, JSContext *cx); + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_IsArrayBufferViewObject(JSObject *obj, JSContext *cx); + + + + +extern __attribute__((visibility("default"))) uint32_t +JS_GetArrayBufferViewByteLength(JSObject *obj, JSContext *cx); +# 1102 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +extern __attribute__((visibility("default"))) int8_t * +JS_GetInt8ArrayData(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) uint8_t * +JS_GetUint8ArrayData(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) uint8_t * +JS_GetUint8ClampedArrayData(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) int16_t * +JS_GetInt16ArrayData(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) uint16_t * +JS_GetUint16ArrayData(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) int32_t * +JS_GetInt32ArrayData(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) uint32_t * +JS_GetUint32ArrayData(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) float * +JS_GetFloat32ArrayData(JSObject *obj, JSContext *cx); +extern __attribute__((visibility("default"))) double * +JS_GetFloat64ArrayData(JSObject *obj, JSContext *cx); + + + + + +extern __attribute__((visibility("default"))) void * +JS_GetArrayBufferViewData(JSObject *obj, JSContext *cx); + + + + + + +__attribute__((visibility("default"))) JSBool +JS_IsDataViewObject(JSContext *cx, JSObject *obj, JSBool *isDataView); +# 1145 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +__attribute__((visibility("default"))) uint32_t +JS_GetDataViewByteOffset(JSObject *obj, JSContext *cx); +# 1156 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +__attribute__((visibility("default"))) uint32_t +JS_GetDataViewByteLength(JSObject *obj, JSContext *cx); +# 1167 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" +__attribute__((visibility("default"))) void * +JS_GetDataViewData(JSObject *obj, JSContext *cx); +# 23 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" 1 +# 10 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" +#define jsinfer_h___ + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/LifoAlloc.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/LifoAlloc.h" +#define LifoAlloc_h__ +# 24 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/LifoAlloc.h" +namespace js { + +namespace detail { + +static const size_t LIFO_ALLOC_ALIGN = 8; + +__attribute__((always_inline)) inline +char * +AlignPtr(void *orig) +{ + typedef tl::StaticAssert< + tl::FloorLog2::result == tl::CeilingLog2::result + >::result _; + + char *result = (char *) ((uintptr_t(orig) + (LIFO_ALLOC_ALIGN - 1)) & (~LIFO_ALLOC_ALIGN + 1)); + do { } while(0); + return result; +} + + +class BumpChunk +{ + char *bump; + char *limit; + BumpChunk *next_; + size_t bumpSpaceSize; + + char *headerBase() { return reinterpret_cast(this); } + char *bumpBase() const { return limit - bumpSpaceSize; } + + BumpChunk *thisDuringConstruction() { return this; } + + explicit BumpChunk(size_t bumpSpaceSize) + : bump(reinterpret_cast(thisDuringConstruction()) + sizeof(BumpChunk)), + limit(bump + bumpSpaceSize), + next_(__null), bumpSpaceSize(bumpSpaceSize) + { + do { } while(0); + } + + void setBump(void *ptr) { + do { } while(0); + do { } while(0); + DebugOnly prevBump = bump; + bump = static_cast(ptr); + + + + + + + + } + + public: + BumpChunk *next() const { return next_; } + void setNext(BumpChunk *succ) { next_ = succ; } + + size_t used() const { return bump - bumpBase(); } + size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) { + return mallocSizeOf(this); + } + + void resetBump() { + setBump(headerBase() + sizeof(BumpChunk)); + } + + void *mark() const { return bump; } + + void release(void *mark) { + do { } while(0); + do { } while(0); + setBump(mark); + } + + bool contains(void *mark) const { + return bumpBase() <= mark && mark <= limit; + } + + bool canAlloc(size_t n); + + + __attribute__((always_inline)) inline + void *tryAlloc(size_t n) { + char *aligned = AlignPtr(bump); + char *newBump = aligned + n; + + if (newBump > limit) + return __null; + + + if ((__builtin_expect((newBump < bump), 0))) + return __null; + + do { } while(0); + setBump(newBump); + return aligned; + } + + void *allocInfallible(size_t n) { + void *result = tryAlloc(n); + do { } while(0); + return result; + } + + static BumpChunk *new_(size_t chunkSize); + static void delete_(BumpChunk *chunk); +}; + +} + + + + + + + +class LifoAlloc +{ + typedef detail::BumpChunk BumpChunk; + + BumpChunk *first; + BumpChunk *latest; + size_t markCount; + size_t defaultChunkSize_; + + void operator=(const LifoAlloc &) ; + LifoAlloc(const LifoAlloc &) ; +# 160 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/LifoAlloc.h" + BumpChunk *getOrCreateChunk(size_t n); + + void reset(size_t defaultChunkSize) { + do { } while(0); + first = latest = __null; + defaultChunkSize_ = defaultChunkSize; + markCount = 0; + } + + public: + explicit LifoAlloc(size_t defaultChunkSize) { reset(defaultChunkSize); } + + + void steal(LifoAlloc *other) { + do { } while(0); + PodCopy((char *) this, (char *) other, sizeof(*this)); + other->reset(defaultChunkSize_); + } + + ~LifoAlloc() { freeAll(); } + + size_t defaultChunkSize() const { return defaultChunkSize_; } + + + void freeAll(); + + + void freeUnused(); + + __attribute__((always_inline)) inline + void *alloc(size_t n) { + do {} while(0); + + void *result; + if (latest && (result = latest->tryAlloc(n))) + return result; + + if (!getOrCreateChunk(n)) + return __null; + + return latest->allocInfallible(n); + } + + template + T *newArray(size_t count) { + void *mem = alloc(sizeof(T) * count); + if (!mem) + return __null; + typedef int moz_static_assert45[(tl::IsPodType::result) ? 1 : -1]; + return (T *) mem; + } + + + + + + template + T *newArrayUninitialized(size_t count) { + return static_cast(alloc(sizeof(T) * count)); + } + + void *mark() { + markCount++; + + return latest ? latest->mark() : __null; + } + + void release(void *mark) { + markCount--; + + if (!mark) { + latest = first; + if (latest) + latest->resetBump(); + return; + } + + + + + + + BumpChunk *container = first; + while (true) { + if (container->contains(mark)) + break; + do { } while(0); + container = container->next(); + } + latest = container; + latest->release(mark); + } + + + size_t used() const { + size_t accum = 0; + BumpChunk *it = first; + while (it) { + accum += it->used(); + it = it->next(); + } + return accum; + } + + + size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const { + size_t accum = 0; + BumpChunk *it = first; + while (it) { + accum += it->sizeOfIncludingThis(mallocSizeOf); + it = it->next(); + } + return accum; + } + + + size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const { + return mallocSizeOf(this) + sizeOfExcludingThis(mallocSizeOf); + } + + + template + __attribute__((always_inline)) inline + T *newPod() { + return static_cast(alloc(sizeof(T))); + } + + template __attribute__((always_inline)) inline T *new_() { void *memory = alloc(sizeof(T)); return memory ? new(memory) T () : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12) { void *memory = alloc(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) : __null; } static const int JSMinAlignment = 8; template __attribute__((always_inline)) inline T *array_new(size_t n) { uint64_t numBytes64 = uint64_t(JSMinAlignment) + uint64_t(sizeof(T)) * uint64_t(n); size_t numBytes = size_t(numBytes64); if (numBytes64 != numBytes) { do { } while(0); return __null; } void *memory = alloc(numBytes); if (!memory) return __null; *(size_t *)memory = n; memory = (void*)(uintptr_t(memory) + JSMinAlignment); return new(memory) T[n]; } +}; + +class LifoAllocScope +{ + LifoAlloc *lifoAlloc; + void *mark; + bool shouldRelease; + + + public: + explicit LifoAllocScope(LifoAlloc *lifoAlloc + ) + : lifoAlloc(lifoAlloc), shouldRelease(true) { + do { } while (0); + mark = lifoAlloc->mark(); + } + + ~LifoAllocScope() { + if (shouldRelease) + lifoAlloc->release(mark); + } + + LifoAlloc &alloc() { + return *lifoAlloc; + } + + void releaseEarly() { + do { } while(0); + lifoAlloc->release(mark); + shouldRelease = false; + } +}; + +} +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Heap.h" 1 +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" 2 + + +namespace JS { +struct TypeInferenceSizes; +} + +namespace js { +namespace types { + + +struct TypeObjectKey { + static intptr_t keyBits(TypeObjectKey *obj) { return (intptr_t) obj; } + static TypeObjectKey *getKey(TypeObjectKey *obj) { return obj; } +}; + + + + + + +class Type +{ + uintptr_t data; + Type(uintptr_t data) : data(data) {} + + public: + + uintptr_t raw() const { return data; } + + bool isPrimitive() const { + return data < JSVAL_TYPE_OBJECT; + } + + bool isPrimitive(JSValueType type) const { + do { } while(0); + return (uintptr_t) type == data; + } + + JSValueType primitive() const { + do { } while(0); + return (JSValueType) data; + } + + bool isAnyObject() const { + return data == JSVAL_TYPE_OBJECT; + } + + bool isUnknown() const { + return data == JSVAL_TYPE_UNKNOWN; + } + + + + bool isObject() const { + do { } while(0); + return data > JSVAL_TYPE_UNKNOWN; + } + + inline TypeObjectKey *objectKey() const; + + + + bool isSingleObject() const { + return isObject() && !!(data & 1); + } + + inline JSObject *singleObject() const; + + + + bool isTypeObject() const { + return isObject() && !(data & 1); + } + + inline TypeObject *typeObject() const; + + bool operator == (Type o) const { return data == o.data; } + bool operator != (Type o) const { return data != o.data; } + + static inline Type UndefinedType() { return Type(JSVAL_TYPE_UNDEFINED); } + static inline Type NullType() { return Type(JSVAL_TYPE_NULL); } + static inline Type BooleanType() { return Type(JSVAL_TYPE_BOOLEAN); } + static inline Type Int32Type() { return Type(JSVAL_TYPE_INT32); } + static inline Type DoubleType() { return Type(JSVAL_TYPE_DOUBLE); } + static inline Type StringType() { return Type(JSVAL_TYPE_STRING); } + static inline Type MagicArgType() { return Type(JSVAL_TYPE_MAGIC); } + static inline Type AnyObjectType() { return Type(JSVAL_TYPE_OBJECT); } + static inline Type UnknownType() { return Type(JSVAL_TYPE_UNKNOWN); } + + static inline Type PrimitiveType(JSValueType type) { + do { } while(0); + return Type(type); + } + + static inline Type ObjectType(JSObject *obj); + static inline Type ObjectType(TypeObject *obj); + static inline Type ObjectType(TypeObjectKey *obj); +}; + + +inline Type GetValueType(JSContext *cx, const Value &val); +# 144 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" +class TypeConstraint +{ +public: + + + + + const char *kind() const { return __null; } + + + + TypeConstraint *next; + + TypeConstraint(const char *kind) + : next(__null) + { + + + + } + + + virtual void newType(JSContext *cx, TypeSet *source, Type type) = 0; + + + + + + virtual void newPropertyState(JSContext *cx, TypeSet *source) {} + + + + + + + virtual void newObjectState(JSContext *cx, TypeObject *object, bool force) {} +}; + + +enum { + TYPE_FLAG_UNDEFINED = 0x1, + TYPE_FLAG_NULL = 0x2, + TYPE_FLAG_BOOLEAN = 0x4, + TYPE_FLAG_INT32 = 0x8, + TYPE_FLAG_DOUBLE = 0x10, + TYPE_FLAG_STRING = 0x20, + TYPE_FLAG_LAZYARGS = 0x40, + TYPE_FLAG_ANYOBJECT = 0x80, + + + TYPE_FLAG_OBJECT_COUNT_MASK = 0xff00, + TYPE_FLAG_OBJECT_COUNT_SHIFT = 8, + TYPE_FLAG_OBJECT_COUNT_LIMIT = + TYPE_FLAG_OBJECT_COUNT_MASK >> TYPE_FLAG_OBJECT_COUNT_SHIFT, + + + TYPE_FLAG_UNKNOWN = 0x00010000, + + + TYPE_FLAG_BASE_MASK = 0x000100ff, + + + + + + + + TYPE_FLAG_PROPAGATED_PROPERTY = 0x00020000, + + + TYPE_FLAG_OWN_PROPERTY = 0x00040000, + + + + + + + TYPE_FLAG_CONFIGURED_PROPERTY = 0x00080000, + + + + + + + TYPE_FLAG_DEFINITE_PROPERTY = 0x00100000, + + + TYPE_FLAG_DEFINITE_MASK = 0x0f000000, + TYPE_FLAG_DEFINITE_SHIFT = 24 +}; +typedef uint32_t TypeFlags; + + +enum { + + OBJECT_FLAG_FUNCTION = 0x1, + + + OBJECT_FLAG_NEW_SCRIPT_CLEARED = 0x2, + + + + + + + OBJECT_FLAG_NEW_SCRIPT_REGENERATE = 0x4, + + + + + + OBJECT_FLAG_SETS_MARKED_UNKNOWN = 0x8, + + + OBJECT_FLAG_PROPERTY_COUNT_MASK = 0xfff0, + OBJECT_FLAG_PROPERTY_COUNT_SHIFT = 4, + OBJECT_FLAG_PROPERTY_COUNT_LIMIT = + OBJECT_FLAG_PROPERTY_COUNT_MASK >> OBJECT_FLAG_PROPERTY_COUNT_SHIFT, + + + + + + OBJECT_FLAG_NON_DENSE_ARRAY = 0x00010000, + + + OBJECT_FLAG_NON_PACKED_ARRAY = 0x00020000, + + + OBJECT_FLAG_NON_TYPED_ARRAY = 0x00040000, + + + OBJECT_FLAG_UNINLINEABLE = 0x00080000, + + + OBJECT_FLAG_SPECIAL_EQUALITY = 0x00100000, + + + OBJECT_FLAG_ITERATED = 0x00200000, + + + OBJECT_FLAG_REENTRANT_FUNCTION = 0x00400000, + + + OBJECT_FLAG_REGEXP_FLAGS_SET = 0x00800000, + + + OBJECT_FLAG_DYNAMIC_MASK = 0x00ff0000, + + + + + + OBJECT_FLAG_UNKNOWN_PROPERTIES = 0x80000000, + + + OBJECT_FLAG_UNKNOWN_MASK = + OBJECT_FLAG_DYNAMIC_MASK + | OBJECT_FLAG_UNKNOWN_PROPERTIES + | OBJECT_FLAG_SETS_MARKED_UNKNOWN +}; +typedef uint32_t TypeObjectFlags; + + +class TypeSet +{ + + TypeFlags flags; + + + TypeObjectKey **objectSet; + + public: + + + TypeConstraint *constraintList; + + TypeSet() + : flags(0), objectSet(__null), constraintList(__null) + {} + + void print(JSContext *cx); + + inline void sweep(JSCompartment *compartment); + inline size_t computedSizeOfExcludingThis(); + + + inline bool hasType(Type type); + + TypeFlags baseFlags() const { return flags & TYPE_FLAG_BASE_MASK; } + bool unknown() const { return !!(flags & TYPE_FLAG_UNKNOWN); } + bool unknownObject() const { return !!(flags & (TYPE_FLAG_UNKNOWN | TYPE_FLAG_ANYOBJECT)); } + + bool empty() const { return !baseFlags() && !baseObjectCount(); } + + bool hasAnyFlag(TypeFlags flags) const { + do { } while(0); + return !!(baseFlags() & flags); + } + + bool isOwnProperty(bool configurable) const { + return flags & (configurable ? TYPE_FLAG_CONFIGURED_PROPERTY : TYPE_FLAG_OWN_PROPERTY); + } + bool isDefiniteProperty() const { return flags & TYPE_FLAG_DEFINITE_PROPERTY; } + unsigned definiteSlot() const { + do { } while(0); + return flags >> TYPE_FLAG_DEFINITE_SHIFT; + } + + + + + + inline void addType(JSContext *cx, Type type); + + + inline void setOwnProperty(JSContext *cx, bool configured); + + + + + + + inline unsigned getObjectCount(); + inline TypeObjectKey *getObject(unsigned i); + inline JSObject *getSingleObject(unsigned i); + inline TypeObject *getTypeObject(unsigned i); + + void setOwnProperty(bool configurable) { + flags |= TYPE_FLAG_OWN_PROPERTY; + if (configurable) + flags |= TYPE_FLAG_CONFIGURED_PROPERTY; + } + void setDefinite(unsigned slot) { + do { } while(0); + flags |= TYPE_FLAG_DEFINITE_PROPERTY | (slot << TYPE_FLAG_DEFINITE_SHIFT); + } + + bool hasPropagatedProperty() { return !!(flags & TYPE_FLAG_PROPAGATED_PROPERTY); } + void setPropagatedProperty() { flags |= TYPE_FLAG_PROPAGATED_PROPERTY; } + + enum FilterKind { + FILTER_ALL_PRIMITIVES, + FILTER_NULL_VOID, + FILTER_VOID + }; + + + inline void add(JSContext *cx, TypeConstraint *constraint, bool callExisting = true); + void addSubset(JSContext *cx, TypeSet *target); + void addGetProperty(JSContext *cx, JSScript *script, jsbytecode *pc, + TypeSet *target, jsid id); + void addSetProperty(JSContext *cx, JSScript *script, jsbytecode *pc, + TypeSet *target, jsid id); + void addCallProperty(JSContext *cx, JSScript *script, jsbytecode *pc, jsid id); + void addSetElement(JSContext *cx, JSScript *script, jsbytecode *pc, + TypeSet *objectTypes, TypeSet *valueTypes); + void addCall(JSContext *cx, TypeCallsite *site); + void addArith(JSContext *cx, JSScript *script, jsbytecode *pc, + TypeSet *target, TypeSet *other = __null); + void addTransformThis(JSContext *cx, JSScript *script, TypeSet *target); + void addPropagateThis(JSContext *cx, JSScript *script, jsbytecode *pc, + Type type, TypeSet *types = __null); + void addFilterPrimitives(JSContext *cx, TypeSet *target, FilterKind filter); + void addSubsetBarrier(JSContext *cx, JSScript *script, jsbytecode *pc, TypeSet *target); + + + + + + static TypeSet *make(JSContext *cx, const char *name); +# 424 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" + void addFreeze(JSContext *cx); + + + JSValueType getKnownTypeTag(JSContext *cx); + + bool isMagicArguments(JSContext *cx) { return getKnownTypeTag(cx) == JSVAL_TYPE_MAGIC; } + + + bool hasObjectFlags(JSContext *cx, TypeObjectFlags flags); + static bool HasObjectFlags(JSContext *cx, TypeObject *object, TypeObjectFlags flags); + + + + + + + static void WatchObjectStateChange(JSContext *cx, TypeObject *object); +# 449 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" + bool isOwnProperty(JSContext *cx, TypeObject *object, bool configurable); + + + bool knownNonEmpty(JSContext *cx); + + + bool knownSubset(JSContext *cx, TypeSet *other); + + + + + + int getTypedArrayType(JSContext *cx); + + + JSObject *getSingleton(JSContext *cx, bool freeze = true); + + + bool hasGlobalObject(JSContext *cx, JSObject *global); + + inline void clearObjects(); + + + + + + bool needsBarrier(JSContext *cx); + + + bool propertyNeedsBarrier(JSContext *cx, jsid id); + + private: + uint32_t baseObjectCount() const { + return (flags & TYPE_FLAG_OBJECT_COUNT_MASK) >> TYPE_FLAG_OBJECT_COUNT_SHIFT; + } + inline void setBaseObjectCount(uint32_t count); +}; + + + + + + + +struct TypeResult +{ + uint32_t offset; + Type type; + TypeResult *next; + + TypeResult(uint32_t offset, Type type) + : offset(offset), type(type), next(__null) + {} +}; +# 562 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" +struct TypeBarrier +{ + + TypeBarrier *next; + + + TypeSet *target; + + + + + + Type type; + + + + + + JSObject *singleton; + jsid singletonId; + + TypeBarrier(TypeSet *target, Type type, JSObject *singleton, jsid singletonId) + : next(__null), target(target), type(type), + singleton(singleton), singletonId(singletonId) + {} +}; + + +struct Property +{ + + HeapId id; + + + TypeSet types; + + inline Property(jsid id); + inline Property(const Property &o); + + static uint32_t keyBits(jsid id) { return uint32_t((id)); } + static jsid getKey(Property *p) { return p->id; } +}; +# 615 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" +struct TypeNewScript +{ + HeapPtrFunction fun; + + + gc::AllocKind allocKind; + + + + + + HeapPtrShape shape; +# 636 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" + struct Initializer { + enum Kind { + SETPROP, + FRAME_PUSH, + FRAME_POP, + DONE + } kind; + uint32_t offset; + Initializer(Kind kind, uint32_t offset) + : kind(kind), offset(offset) + {} + }; + Initializer *initializerList; + + static inline void writeBarrierPre(TypeNewScript *newScript); + static inline void writeBarrierPost(TypeNewScript *newScript, void *addr); +}; +# 681 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" +struct TypeObject : gc::Cell +{ + + HeapPtrObject proto; + + + + + + + HeapPtrObject singleton; + + + + + + static const size_t LAZY_SINGLETON = 1; + bool lazy() const { return singleton == (JSObject *) LAZY_SINGLETON; } + + + TypeObjectFlags flags; +# 714 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" + uint32_t contribution; + static const uint32_t CONTRIBUTION_LIMIT = 2000; + + + + + + + HeapPtr newScript; +# 754 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" + Property **propertySet; + + + HeapPtrFunction interpretedFunction; + + + void *padding; + + + inline TypeObject(JSObject *proto, bool isFunction, bool unknown); + + bool isFunction() { return !!(flags & OBJECT_FLAG_FUNCTION); } + + bool hasAnyFlags(TypeObjectFlags flags) { + do { } while(0); + return !!(this->flags & flags); + } + bool hasAllFlags(TypeObjectFlags flags) { + do { } while(0); + return (this->flags & flags) == flags; + } + + bool unknownProperties() { + do { } while (0) + ; + return !!(flags & OBJECT_FLAG_UNKNOWN_PROPERTIES); + } + + + + + + + + inline TypeSet *getProperty(JSContext *cx, jsid id, bool assign); + + + inline TypeSet *maybeGetProperty(JSContext *cx, jsid id); + + inline unsigned getPropertyCount(); + inline Property *getProperty(unsigned i); + + + inline void setFlagsFromKey(JSContext *cx, JSProtoKey kind); + + + + + + inline JSObject *getGlobal(); + + + + bool addProperty(JSContext *cx, jsid id, Property **pprop); + bool addDefiniteProperties(JSContext *cx, JSObject *obj); + bool matchDefiniteProperties(JSObject *obj); + void addPrototype(JSContext *cx, TypeObject *proto); + void addPropertyType(JSContext *cx, jsid id, Type type); + void addPropertyType(JSContext *cx, jsid id, const Value &value); + void addPropertyType(JSContext *cx, const char *name, Type type); + void addPropertyType(JSContext *cx, const char *name, const Value &value); + void markPropertyConfigured(JSContext *cx, jsid id); + void markStateChange(JSContext *cx); + void setFlags(JSContext *cx, TypeObjectFlags flags); + void markUnknown(JSContext *cx); + void clearNewScript(JSContext *cx); + void getFromPrototypes(JSContext *cx, jsid id, TypeSet *types, bool force = false); + + void print(JSContext *cx); + + inline void clearProperties(); + inline void sweep(FreeOp *fop); + + inline size_t computedSizeOfExcludingThis(); + + void sizeOfExcludingThis(TypeInferenceSizes *sizes, JSMallocSizeOfFun mallocSizeOf); + + + + + + + void finalize(FreeOp *fop) {} + + static inline void writeBarrierPre(TypeObject *type); + static inline void writeBarrierPost(TypeObject *type, void *addr); + static inline void readBarrier(TypeObject *type); + + static inline ThingRootKind rootKind() { return THING_ROOT_TYPE_OBJECT; } + + private: + inline uint32_t basePropertyCount() const; + inline void setBasePropertyCount(uint32_t count); + + static void staticAsserts() { + typedef int moz_static_assert46[(__builtin_offsetof (TypeObject, proto) == __builtin_offsetof (js::shadow::TypeObject, proto)) ? 1 : -1]; + } +}; + + + + + +struct TypeObjectEntry +{ + typedef JSObject *Lookup; + + static inline HashNumber hash(JSObject *base); + static inline bool match(TypeObject *key, JSObject *lookup); +}; +typedef HashSet, TypeObjectEntry, SystemAllocPolicy> TypeObjectSet; + + +bool +UseNewType(JSContext *cx, JSScript *script, jsbytecode *pc); + + +bool +UseNewTypeForInitializer(JSContext *cx, JSScript *script, jsbytecode *pc); + + + + + +bool +ArrayPrototypeHasIndexedProperty(JSContext *cx, JSScript *script); + + + + + + +struct TypeCallsite +{ + JSScript *script; + jsbytecode *pc; + + + bool isNew; + + + unsigned argumentCount; + TypeSet **argumentTypes; + + + TypeSet *thisTypes; + + + TypeSet *returnTypes; + + inline TypeCallsite(JSContext *cx, JSScript *script, jsbytecode *pc, + bool isNew, unsigned argumentCount); +}; +# 945 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" +struct TypeScriptNesting +{ +# 955 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" + JSScript *parent; + + + JSScript *children; + + + JSScript *next; + + + JSObject *activeCall; +# 974 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" + const Value *argArray; + const Value *varArray; + + + uint32_t activeFrames; + + TypeScriptNesting() { PodZero(this); } + ~TypeScriptNesting(); +}; + + +bool CheckScriptNesting(JSContext *cx, JSScript *script); + + +void NestingPrologue(JSContext *cx, StackFrame *fp); +void NestingEpilogue(StackFrame *fp); + + +class TypeScript +{ + friend struct ::JSScript; + + + analyze::ScriptAnalysis *analysis; + + + + + + + static const size_t GLOBAL_MISSING_SCOPE = 0x1; + + + HeapPtr global; + + public: + + + TypeScriptNesting *nesting; + + + TypeResult *dynamicList; + + inline TypeScript(); + + bool hasScope() { return size_t(global.get()) != GLOBAL_MISSING_SCOPE; } + + + TypeSet *typeArray() { return (TypeSet *) (uintptr_t(this) + sizeof(TypeScript)); } + + static inline unsigned NumTypeSets(JSScript *script); + + static bool SetScope(JSContext *cx, JSScript *script, JSObject *scope); + + static inline TypeSet *ReturnTypes(JSScript *script); + static inline TypeSet *ThisTypes(JSScript *script); + static inline TypeSet *ArgTypes(JSScript *script, unsigned i); + static inline TypeSet *LocalTypes(JSScript *script, unsigned i); + + + static inline TypeSet *SlotTypes(JSScript *script, unsigned slot); + + + + + + + + static inline TypeObject *StandardType(JSContext *cx, JSScript *script, JSProtoKey kind); + + + static inline TypeObject *InitObject(JSContext *cx, JSScript *script, jsbytecode *pc, JSProtoKey kind); + + + + + + static inline void MonitorOverflow(JSContext *cx, JSScript *script, jsbytecode *pc); + static inline void MonitorString(JSContext *cx, JSScript *script, jsbytecode *pc); + static inline void MonitorUnknown(JSContext *cx, JSScript *script, jsbytecode *pc); + + static inline void GetPcScript(JSContext *cx, JSScript **script, jsbytecode **pc); + static inline void MonitorOverflow(JSContext *cx); + static inline void MonitorString(JSContext *cx); + static inline void MonitorUnknown(JSContext *cx); +# 1067 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" + static inline void Monitor(JSContext *cx, JSScript *script, jsbytecode *pc, + const js::Value &val); + static inline void Monitor(JSContext *cx, const js::Value &rval); + + + static inline void MonitorAssign(JSContext *cx, JSObject *obj, jsid id); + + + static inline void SetThis(JSContext *cx, JSScript *script, Type type); + static inline void SetThis(JSContext *cx, JSScript *script, const js::Value &value); + static inline void SetLocal(JSContext *cx, JSScript *script, unsigned local, Type type); + static inline void SetLocal(JSContext *cx, JSScript *script, unsigned local, const js::Value &value); + static inline void SetArgument(JSContext *cx, JSScript *script, unsigned arg, Type type); + static inline void SetArgument(JSContext *cx, JSScript *script, unsigned arg, const js::Value &value); + + static void Sweep(FreeOp *fop, JSScript *script); + inline void trace(JSTracer *trc); + void destroy(); +}; + +struct ArrayTableKey; +typedef HashMap,ArrayTableKey,SystemAllocPolicy> ArrayTypeTable; + +struct ObjectTableKey; +struct ObjectTableEntry; +typedef HashMap ObjectTypeTable; + +struct AllocationSiteKey; +typedef HashMap,AllocationSiteKey,SystemAllocPolicy> AllocationSiteTable; + +struct RecompileInfo +{ + JSScript *script; + bool constructing : 1; + bool barriers : 1; + uint32_t chunkIndex:30; + + bool operator == (const RecompileInfo &o) const { + return script == o.script + && constructing == o.constructing + && barriers == o.barriers + && chunkIndex == o.chunkIndex; + } +}; + + +struct TypeCompartment +{ + + + + + + + struct PendingWork + { + TypeConstraint *constraint; + TypeSet *source; + Type type; + }; + PendingWork *pendingArray; + unsigned pendingCount; + unsigned pendingCapacity; + + + bool resolving; + + + bool inferenceEnabled; + + + + + + bool pendingNukeTypes; + + + unsigned scriptCount; + + + Vector *pendingRecompiles; + + + + + + + unsigned recompilations; + unsigned frameExpansions; + + + + + + + RecompileInfo compiledInfo; + + + AllocationSiteTable *allocationSiteTable; + + + + ArrayTypeTable *arrayTypeTable; + ObjectTypeTable *objectTypeTable; + + void fixArrayType(JSContext *cx, JSObject *obj); + void fixObjectType(JSContext *cx, JSObject *obj); + + + + + static const unsigned TYPE_COUNT_LIMIT = 4; + unsigned typeCounts[TYPE_COUNT_LIMIT]; + unsigned typeCountOver; + + void init(JSContext *cx); + ~TypeCompartment(); + + inline JSCompartment *compartment(); + + + inline void addPending(JSContext *cx, TypeConstraint *constraint, TypeSet *source, Type type); + bool growPendingArray(JSContext *cx); + + + inline void resolvePending(JSContext *cx); + + + void print(JSContext *cx, bool force); + + + + + + + + TypeObject *newTypeObject(JSContext *cx, JSScript *script, + JSProtoKey kind, JSObject *proto, bool unknown = false); + + + TypeObject *newAllocationSiteTypeObject(JSContext *cx, const AllocationSiteKey &key); + + void nukeTypes(FreeOp *fop); + void processPendingRecompiles(FreeOp *fop); + + + void setPendingNukeTypes(JSContext *cx); + void setPendingNukeTypesNoReport(); + + + void addPendingRecompile(JSContext *cx, const RecompileInfo &info); + void addPendingRecompile(JSContext *cx, JSScript *script, jsbytecode *pc); + + + void monitorBytecode(JSContext *cx, JSScript *script, uint32_t offset, + bool returnOnly = false); + + + void markSetsUnknown(JSContext *cx, TypeObject *obj); + + void sweep(FreeOp *fop); + void finalizeObjects(); +}; + +enum SpewChannel { + ISpewOps, + ISpewResult, + SPEW_COUNT +}; +# 1252 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" +inline const char * InferSpewColorReset() { return __null; } +inline const char * InferSpewColor(TypeConstraint *constraint) { return __null; } +inline const char * InferSpewColor(TypeSet *types) { return __null; } +inline void InferSpew(SpewChannel which, const char *fmt, ...) {} +inline const char * TypeString(Type type) { return __null; } +inline const char * TypeObjectString(TypeObject *type) { return __null; } + + + + +void TypeFailure(JSContext *cx, const char *fmt, ...); + +} +} + +namespace JS { + template<> class AnchorPermitted { }; +} +# 24 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 2 +# 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" +#define ObjectImpl_h___ + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfriendapi.h" 1 +# 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinfer.h" 1 +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsval.h" 1 +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier.h" 1 +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumericConversions.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumericConversions.h" +#define NumericConversions_h___ + + + +# 1 "/usr/include/math.h" 1 3 4 +# 26 "/usr/include/math.h" 3 4 +#define _MATH_H 1 + + + +extern "C" { + + + +# 1 "/usr/include/bits/huge_val.h" 1 3 4 +# 29 "/usr/include/bits/huge_val.h" 3 4 +#define HUGE_VAL (__builtin_huge_val()) +# 35 "/usr/include/math.h" 2 3 4 + +# 1 "/usr/include/bits/huge_valf.h" 1 3 4 +# 29 "/usr/include/bits/huge_valf.h" 3 4 +#define HUGE_VALF (__builtin_huge_valf()) +# 37 "/usr/include/math.h" 2 3 4 +# 1 "/usr/include/bits/huge_vall.h" 1 3 4 +# 26 "/usr/include/bits/huge_vall.h" 3 4 +#define HUGE_VALL (__builtin_huge_vall()) +# 38 "/usr/include/math.h" 2 3 4 + + +# 1 "/usr/include/bits/inf.h" 1 3 4 +# 27 "/usr/include/bits/inf.h" 3 4 +#define INFINITY (__builtin_inff()) +# 41 "/usr/include/math.h" 2 3 4 + + +# 1 "/usr/include/bits/nan.h" 1 3 4 +# 29 "/usr/include/bits/nan.h" 3 4 +#define NAN (__builtin_nanf ("")) +# 44 "/usr/include/math.h" 2 3 4 + + + +# 1 "/usr/include/bits/mathdef.h" 1 3 4 +# 25 "/usr/include/bits/mathdef.h" 3 4 +#define _MATH_H_MATHDEF 1 + + +typedef float float_t; + +typedef double double_t; + + + +#define FP_ILOGB0 (-2147483647) +#define FP_ILOGBNAN (2147483647) +# 56 "/usr/include/bits/mathdef.h" 3 4 +#define __NO_LONG_DOUBLE_MATH 1 +# 48 "/usr/include/math.h" 2 3 4 + + + + + + +#define __MATHCALL(function,suffix,args) __MATHDECL (_Mdouble_,function,suffix, args) + +#define __MATHDECL(type,function,suffix,args) __MATHDECL_1(type, function,suffix, args); __MATHDECL_1(type, __CONCAT(__,function),suffix, args) + + +#define __MATHCALLX(function,suffix,args,attrib) __MATHDECLX (_Mdouble_,function,suffix, args, attrib) + +#define __MATHDECLX(type,function,suffix,args,attrib) __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib) + + +#define __MATHDECL_1(type,function,suffix,args) extern type __MATH_PRECNAME(function,suffix) args __THROW + + +#define _Mdouble_ double +#define __MATH_PRECNAME(name,r) __CONCAT(name,r) +#define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_STD +#define _Mdouble_END_NAMESPACE __END_NAMESPACE_STD +# 1 "/usr/include/bits/mathcalls.h" 1 3 4 +# 53 "/usr/include/bits/mathcalls.h" 3 4 + + +extern double acos (double __x) throw (); extern double __acos (double __x) throw (); + +extern double asin (double __x) throw (); extern double __asin (double __x) throw (); + +extern double atan (double __x) throw (); extern double __atan (double __x) throw (); + +extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw (); + + +extern double cos (double __x) throw (); extern double __cos (double __x) throw (); + +extern double sin (double __x) throw (); extern double __sin (double __x) throw (); + +extern double tan (double __x) throw (); extern double __tan (double __x) throw (); + + + + +extern double cosh (double __x) throw (); extern double __cosh (double __x) throw (); + +extern double sinh (double __x) throw (); extern double __sinh (double __x) throw (); + +extern double tanh (double __x) throw (); extern double __tanh (double __x) throw (); + + + + +extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw () + ; + + + + + +extern double acosh (double __x) throw (); extern double __acosh (double __x) throw (); + +extern double asinh (double __x) throw (); extern double __asinh (double __x) throw (); + +extern double atanh (double __x) throw (); extern double __atanh (double __x) throw (); + + + + + + + +extern double exp (double __x) throw (); extern double __exp (double __x) throw (); + + +extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw (); + + +extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw (); + + +extern double log (double __x) throw (); extern double __log (double __x) throw (); + + +extern double log10 (double __x) throw (); extern double __log10 (double __x) throw (); + + +extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw () + __attribute__ ((__nonnull__ (2))); + + + + +extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw (); + +extern double pow10 (double __x) throw (); extern double __pow10 (double __x) throw (); + + + + + +extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw (); + + +extern double log1p (double __x) throw (); extern double __log1p (double __x) throw (); + + +extern double logb (double __x) throw (); extern double __logb (double __x) throw (); + + + + + + +extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw (); + + +extern double log2 (double __x) throw (); extern double __log2 (double __x) throw (); + + + + + + + + +extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw (); + + +extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw (); + + + + + +extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw (); + + + + + + +extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw (); + + + + + + + + +extern double ceil (double __x) throw () __attribute__ ((__const__)); extern double __ceil (double __x) throw () __attribute__ ((__const__)); + + +extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__)); + + +extern double floor (double __x) throw () __attribute__ ((__const__)); extern double __floor (double __x) throw () __attribute__ ((__const__)); + + +extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw (); + + + + +extern int __isinf (double __value) throw () __attribute__ ((__const__)); + + +extern int __finite (double __value) throw () __attribute__ ((__const__)); + + + + + +extern int isinf (double __value) throw () __attribute__ ((__const__)); + + +extern int finite (double __value) throw () __attribute__ ((__const__)); + + +extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw (); + + + +extern double significand (double __x) throw (); extern double __significand (double __x) throw (); + + + + + +extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__)); + + + + + + +extern double nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern double __nan (__const char *__tagb) throw () __attribute__ ((__const__)); + + + + + +extern int __isnan (double __value) throw () __attribute__ ((__const__)); + + + +extern int isnan (double __value) throw () __attribute__ ((__const__)); + + +extern double j0 (double) throw (); extern double __j0 (double) throw (); +extern double j1 (double) throw (); extern double __j1 (double) throw (); +extern double jn (int, double) throw (); extern double __jn (int, double) throw (); +extern double y0 (double) throw (); extern double __y0 (double) throw (); +extern double y1 (double) throw (); extern double __y1 (double) throw (); +extern double yn (int, double) throw (); extern double __yn (int, double) throw (); + + + + + + +extern double erf (double) throw (); extern double __erf (double) throw (); +extern double erfc (double) throw (); extern double __erfc (double) throw (); +extern double lgamma (double) throw (); extern double __lgamma (double) throw (); + + + + + + +extern double tgamma (double) throw (); extern double __tgamma (double) throw (); + + + + + +extern double gamma (double) throw (); extern double __gamma (double) throw (); + + + + + + +extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw (); + + + + + + + +extern double rint (double __x) throw (); extern double __rint (double __x) throw (); + + +extern double nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) throw () __attribute__ ((__const__)); + +extern double nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); + + + +extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw (); + + + +extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw (); + + + +extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw (); + + + + +extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw (); + + + +extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw (); + + + +extern double round (double __x) throw () __attribute__ ((__const__)); extern double __round (double __x) throw () __attribute__ ((__const__)); + + + +extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__)); + + + + +extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw (); + + + + + + +extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw (); +extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw (); + + + +extern long int lround (double __x) throw (); extern long int __lround (double __x) throw (); +extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw (); + + + +extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw (); + + +extern double fmax (double __x, double __y) throw (); extern double __fmax (double __x, double __y) throw (); + + +extern double fmin (double __x, double __y) throw (); extern double __fmin (double __x, double __y) throw (); + + + +extern int __fpclassify (double __value) throw () + __attribute__ ((__const__)); + + +extern int __signbit (double __value) throw () + __attribute__ ((__const__)); + + + +extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw (); + + + + + + + + +extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw (); +# 72 "/usr/include/math.h" 2 3 4 +#undef _Mdouble_ +#undef _Mdouble_BEGIN_NAMESPACE +#undef _Mdouble_END_NAMESPACE +#undef __MATH_PRECNAME +# 84 "/usr/include/math.h" 3 4 +#define _Mfloat_ float + +#define _Mdouble_ _Mfloat_ + +#define __MATH_PRECNAME(name,r) name ##f ##r + + + +#define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_C99 +#define _Mdouble_END_NAMESPACE __END_NAMESPACE_C99 +# 1 "/usr/include/bits/mathcalls.h" 1 3 4 +# 53 "/usr/include/bits/mathcalls.h" 3 4 + + +extern float acosf (float __x) throw (); extern float __acosf (float __x) throw (); + +extern float asinf (float __x) throw (); extern float __asinf (float __x) throw (); + +extern float atanf (float __x) throw (); extern float __atanf (float __x) throw (); + +extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw (); + + +extern float cosf (float __x) throw (); extern float __cosf (float __x) throw (); + +extern float sinf (float __x) throw (); extern float __sinf (float __x) throw (); + +extern float tanf (float __x) throw (); extern float __tanf (float __x) throw (); + + + + +extern float coshf (float __x) throw (); extern float __coshf (float __x) throw (); + +extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw (); + +extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw (); + + + + +extern void + sincosf +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (float __x, float *__sinx, float *__cosx) throw (); extern void + __sincosf +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (float __x, float *__sinx, float *__cosx) throw () + ; + + + + + +extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw (); + +extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw (); + +extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw (); + + + + + + + +extern float expf (float __x) throw (); extern float __expf (float __x) throw (); + + +extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw (); + + +extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw (); + + +extern float logf (float __x) throw (); extern float __logf (float __x) throw (); + + +extern float log10f (float __x) throw (); extern float __log10f (float __x) throw (); + + +extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw () + __attribute__ ((__nonnull__ (2))); + + + + +extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw (); + +extern float pow10f (float __x) throw (); extern float __pow10f (float __x) throw (); + + + + + +extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw (); + + +extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw (); + + +extern float logbf (float __x) throw (); extern float __logbf (float __x) throw (); + + + + + + +extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw (); + + +extern float log2f (float __x) throw (); extern float __log2f (float __x) throw (); + + + + + + + + +extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw (); + + +extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw (); + + + + + +extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw (); + + + + + + +extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw (); + + + + + + + + +extern float ceilf (float __x) throw () __attribute__ ((__const__)); extern float __ceilf (float __x) throw () __attribute__ ((__const__)); + + +extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__)); + + +extern float floorf (float __x) throw () __attribute__ ((__const__)); extern float __floorf (float __x) throw () __attribute__ ((__const__)); + + +extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw (); + + + + +extern int __isinff (float __value) throw () __attribute__ ((__const__)); + + +extern int __finitef (float __value) throw () __attribute__ ((__const__)); + + + + + +extern int isinff (float __value) throw () __attribute__ ((__const__)); + + +extern int finitef (float __value) throw () __attribute__ ((__const__)); + + +extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw (); + + + +extern float significandf (float __x) throw (); extern float __significandf (float __x) throw (); + + + + + +extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__)); + + + + + + +extern float nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) throw () __attribute__ ((__const__)); + + + + + +extern int __isnanf (float __value) throw () __attribute__ ((__const__)); + + + +extern int isnanf (float __value) throw () __attribute__ ((__const__)); + + +extern float j0f (float) throw (); extern float __j0f (float) throw (); +extern float j1f (float) throw (); extern float __j1f (float) throw (); +extern float jnf (int, float) throw (); extern float __jnf (int, float) throw (); +extern float y0f (float) throw (); extern float __y0f (float) throw (); +extern float y1f (float) throw (); extern float __y1f (float) throw (); +extern float ynf (int, float) throw (); extern float __ynf (int, float) throw (); + + + + + + +extern float erff (float) throw (); extern float __erff (float) throw (); +extern float erfcf (float) throw (); extern float __erfcf (float) throw (); +extern float lgammaf (float) throw (); extern float __lgammaf (float) throw (); + + + + + + +extern float tgammaf (float) throw (); extern float __tgammaf (float) throw (); + + + + + +extern float gammaf (float) throw (); extern float __gammaf (float) throw (); + + + + + + +extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw (); + + + + + + + +extern float rintf (float __x) throw (); extern float __rintf (float __x) throw (); + + +extern float nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); + +extern float nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); + + + +extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw (); + + + +extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw (); + + + +extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw (); + + + + +extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw (); + + + +extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw (); + + + +extern float roundf (float __x) throw () __attribute__ ((__const__)); extern float __roundf (float __x) throw () __attribute__ ((__const__)); + + + +extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__)); + + + + +extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw (); + + + + + + +extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw (); +extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw (); + + + +extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw (); +extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw (); + + + +extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw (); + + +extern float fmaxf (float __x, float __y) throw (); extern float __fmaxf (float __x, float __y) throw (); + + +extern float fminf (float __x, float __y) throw (); extern float __fminf (float __x, float __y) throw (); + + + +extern int __fpclassifyf (float __value) throw () + __attribute__ ((__const__)); + + +extern int __signbitf (float __value) throw () + __attribute__ ((__const__)); + + + +extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw (); + + + + + + + + +extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw (); +# 95 "/usr/include/math.h" 2 3 4 +#undef _Mdouble_ +#undef _Mdouble_BEGIN_NAMESPACE +#undef _Mdouble_END_NAMESPACE +#undef __MATH_PRECNAME +# 132 "/usr/include/math.h" 3 4 +#define _Mlong_double_ long double + +#define _Mdouble_ _Mlong_double_ + +#define __MATH_PRECNAME(name,r) name ##l ##r + + + +#define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_C99 +#define _Mdouble_END_NAMESPACE __END_NAMESPACE_C99 +#define __MATH_DECLARE_LDOUBLE 1 +# 1 "/usr/include/bits/mathcalls.h" 1 3 4 +# 53 "/usr/include/bits/mathcalls.h" 3 4 + + +extern long double acosl (long double __x) throw (); extern long double __acosl (long double __x) throw (); + +extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw (); + +extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw (); + +extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw (); + + +extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw (); + +extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw (); + +extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw (); + + + + +extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw (); + +extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw (); + +extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw (); + + + + +extern void + sincosl +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (long double __x, long double *__sinx, long double *__cosx) throw (); extern void + __sincosl +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (long double __x, long double *__sinx, long double *__cosx) throw () + ; + + + + + +extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw (); + +extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw (); + +extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw (); + + + + + + + +extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw (); + + +extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw (); + + +extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw (); + + +extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw (); + + +extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw (); + + +extern long double modfl (long double __x, long double *__iptr) throw (); extern long double __modfl (long double __x, long double *__iptr) throw () + __attribute__ ((__nonnull__ (2))); + + + + +extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw (); + +extern long double pow10l (long double __x) throw (); extern long double __pow10l (long double __x) throw (); + + + + + +extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw (); + + +extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw (); + + +extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw (); + + + + + + +extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw (); + + +extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw (); + + + + + + + + +extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw (); + + +extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw (); + + + + + +extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw (); + + + + + + +extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw (); + + + + + + + + +extern long double ceill (long double __x) throw () __attribute__ ((__const__)); extern long double __ceill (long double __x) throw () __attribute__ ((__const__)); + + +extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__)); + + +extern long double floorl (long double __x) throw () __attribute__ ((__const__)); extern long double __floorl (long double __x) throw () __attribute__ ((__const__)); + + +extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw (); + + + + +extern int __isinfl (long double __value) throw () __attribute__ ((__const__)); + + +extern int __finitel (long double __value) throw () __attribute__ ((__const__)); + + + + + +extern int isinfl (long double __value) throw () __attribute__ ((__const__)); + + +extern int finitel (long double __value) throw () __attribute__ ((__const__)); + + +extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw (); + + + +extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw (); + + + + + +extern long double copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); + + + + + + +extern long double nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) throw () __attribute__ ((__const__)); + + + + + +extern int __isnanl (long double __value) throw () __attribute__ ((__const__)); + + + +extern int isnanl (long double __value) throw () __attribute__ ((__const__)); + + +extern long double j0l (long double) throw (); extern long double __j0l (long double) throw (); +extern long double j1l (long double) throw (); extern long double __j1l (long double) throw (); +extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw (); +extern long double y0l (long double) throw (); extern long double __y0l (long double) throw (); +extern long double y1l (long double) throw (); extern long double __y1l (long double) throw (); +extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw (); + + + + + + +extern long double erfl (long double) throw (); extern long double __erfl (long double) throw (); +extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw (); +extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw (); + + + + + + +extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw (); + + + + + +extern long double gammal (long double) throw (); extern long double __gammal (long double) throw (); + + + + + + +extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw (); + + + + + + + +extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw (); + + +extern long double nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); + +extern long double nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); + + + +extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw (); + + + +extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw (); + + + +extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw (); + + + + +extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw (); + + + +extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw (); + + + +extern long double roundl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundl (long double __x) throw () __attribute__ ((__const__)); + + + +extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__)); + + + + +extern long double remquol (long double __x, long double __y, int *__quo) throw (); extern long double __remquol (long double __x, long double __y, int *__quo) throw (); + + + + + + +extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw (); +extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw (); + + + +extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw (); +extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw (); + + + +extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw (); + + +extern long double fmaxl (long double __x, long double __y) throw (); extern long double __fmaxl (long double __x, long double __y) throw (); + + +extern long double fminl (long double __x, long double __y) throw (); extern long double __fminl (long double __x, long double __y) throw (); + + + +extern int __fpclassifyl (long double __value) throw () + __attribute__ ((__const__)); + + +extern int __signbitl (long double __value) throw () + __attribute__ ((__const__)); + + + +extern long double fmal (long double __x, long double __y, long double __z) throw (); extern long double __fmal (long double __x, long double __y, long double __z) throw (); + + + + + + + + +extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw (); +# 144 "/usr/include/math.h" 2 3 4 +#undef _Mdouble_ +#undef _Mdouble_BEGIN_NAMESPACE +#undef _Mdouble_END_NAMESPACE +#undef __MATH_PRECNAME + + + + +#undef __MATHDECL_1 +#undef __MATHDECL +#undef __MATHCALL + + + + +extern int signgam; +# 200 "/usr/include/math.h" 3 4 +enum + { + FP_NAN, +#define FP_NAN FP_NAN + FP_INFINITE, +#define FP_INFINITE FP_INFINITE + FP_ZERO, +#define FP_ZERO FP_ZERO + FP_SUBNORMAL, +#define FP_SUBNORMAL FP_SUBNORMAL + FP_NORMAL +#define FP_NORMAL FP_NORMAL + }; + + + +#define fpclassify(x) (sizeof (x) == sizeof (float) ? __fpclassifyf (x) : __fpclassify (x)) +# 228 "/usr/include/math.h" 3 4 +#define signbit(x) (sizeof (x) == sizeof (float) ? __signbitf (x) : __signbit (x)) +# 240 "/usr/include/math.h" 3 4 +#define isfinite(x) (sizeof (x) == sizeof (float) ? __finitef (x) : __finite (x)) +# 251 "/usr/include/math.h" 3 4 +#define isnormal(x) (fpclassify (x) == FP_NORMAL) + + + + +#define isnan(x) (sizeof (x) == sizeof (float) ? __isnanf (x) : __isnan (x)) +# 268 "/usr/include/math.h" 3 4 +#define isinf(x) (sizeof (x) == sizeof (float) ? __isinff (x) : __isinf (x)) +# 279 "/usr/include/math.h" 3 4 +#define MATH_ERRNO 1 +#define MATH_ERREXCEPT 2 + + + + + +#define math_errhandling (MATH_ERRNO | MATH_ERREXCEPT) + + + + + + +typedef enum +{ + _IEEE_ = -1, + _SVID_, + _XOPEN_, + _POSIX_, + _ISOC_ +} _LIB_VERSION_TYPE; + + + + +extern _LIB_VERSION_TYPE _LIB_VERSION; +# 316 "/usr/include/math.h" 3 4 +struct __exception + + + + { + int type; + char *name; + double arg1; + double arg2; + double retval; + }; + + +extern int matherr (struct __exception *__exc) throw (); + + + + +#define X_TLOSS 1.41484755040568800000e+16 + + +#define DOMAIN 1 +#define SING 2 +#define OVERFLOW 3 +#define UNDERFLOW 4 +#define TLOSS 5 +#define PLOSS 6 + + +#define HUGE 3.40282347e+38F +# 359 "/usr/include/math.h" 3 4 +#define M_E 2.7182818284590452354 +#define M_LOG2E 1.4426950408889634074 +#define M_LOG10E 0.43429448190325182765 +#define M_LN2 0.69314718055994530942 +#define M_LN10 2.30258509299404568402 +#define M_PI 3.14159265358979323846 +#define M_PI_2 1.57079632679489661923 +#define M_PI_4 0.78539816339744830962 +#define M_1_PI 0.31830988618379067154 +#define M_2_PI 0.63661977236758134308 +#define M_2_SQRTPI 1.12837916709551257390 +#define M_SQRT2 1.41421356237309504880 +#define M_SQRT1_2 0.70710678118654752440 + + + + + + +#define M_El 2.7182818284590452353602874713526625L +#define M_LOG2El 1.4426950408889634073599246810018921L +#define M_LOG10El 0.4342944819032518276511289189166051L +#define M_LN2l 0.6931471805599453094172321214581766L +#define M_LN10l 2.3025850929940456840179914546843642L +#define M_PIl 3.1415926535897932384626433832795029L +#define M_PI_2l 1.5707963267948966192313216916397514L +#define M_PI_4l 0.7853981633974483096156608458198757L +#define M_1_PIl 0.3183098861837906715377675267450287L +#define M_2_PIl 0.6366197723675813430755350534900574L +#define M_2_SQRTPIl 1.1283791670955125738961589031215452L +#define M_SQRT2l 1.4142135623730950488016887242096981L +#define M_SQRT1_2l 0.7071067811865475244008443621048490L +# 408 "/usr/include/math.h" 3 4 +#define isgreater(x,y) __builtin_isgreater(x, y) +#define isgreaterequal(x,y) __builtin_isgreaterequal(x, y) +#define isless(x,y) __builtin_isless(x, y) +#define islessequal(x,y) __builtin_islessequal(x, y) +#define islessgreater(x,y) __builtin_islessgreater(x, y) +#define isunordered(u,v) __builtin_isunordered(u, v) + + + + +# 1 "/usr/include/bits/mathinline.h" 1 3 4 +# 419 "/usr/include/math.h" 2 3 4 +# 480 "/usr/include/math.h" 3 4 +} +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumericConversions.h" 2 + + +extern double js_NaN; + +namespace js { + +namespace detail { + +union DoublePun { + struct { + + uint32_t lo, hi; + + + + } s; + uint64_t u64; + double d; +}; + +} + + +inline int32_t +ToInt32(double d) +{ +# 114 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumericConversions.h" + int32_t i; + uint32_t tmp0; + uint32_t tmp1; + uint32_t tmp2; + asm ( +# 131 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumericConversions.h" +" mov %1, %R4, LSR #20\n" +" bic %1, %1, #(1 << 11)\n" + + + +" orr %R4, %R4, #(1 << 20)\n" +# 153 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumericConversions.h" +" sub %1, %1, #0xff\n" +" subs %1, %1, #0x300\n" +" bmi 8f\n" + + + + + +" subs %3, %1, #52\n" +" bmi 1f\n" + + + + + + + +" bic %2, %3, #0xff\n" +" orr %3, %3, %2, LSR #3\n" + + +" mov %Q4, %Q4, LSL %3\n" +" b 2f\n" +"1:\n" + + +" rsb %3, %1, #52\n" +" mov %Q4, %Q4, LSR %3\n" + + + + + +"2:\n" + + + + + + + +" subs %3, %1, #31\n" +" mov %1, %R4, LSL #11\n" +" bmi 3f\n" + + + +" bic %2, %3, #0xff\n" +" orr %3, %3, %2, LSR #3\n" + +" mov %2, %1, LSL %3\n" +" b 4f\n" +"3:\n" + + +" rsb %3, %3, #0\n" +" mov %2, %1, LSR %3\n" + + + + + +"4:\n" + +" orr %Q4, %Q4, %2\n" + + + +" eor %Q4, %Q4, %R4, ASR #31\n" +" add %0, %Q4, %R4, LSR #31\n" +" b 9f\n" +"8:\n" + + +" mov %0, #0\n" +"9:\n" + : "=r" (i), "=&r" (tmp0), "=&r" (tmp1), "=&r" (tmp2), "=&r" (d) + : "4" (d) + : "cc" + ); + return i; +# 252 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumericConversions.h" +} + + +inline uint32_t +ToUint32(double d) +{ + return uint32_t(ToInt32(d)); +} + + +inline double +ToInteger(double d) +{ + if (d == 0) + return d; + + if (!MOZ_DOUBLE_IS_FINITE(d)) { + if (MOZ_DOUBLE_IS_NaN(d)) + return 0; + return d; + } + + bool neg = (d < 0); + d = floor(neg ? -d : d); + return neg ? -d : d; +} + +} +# 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" 2 + +namespace js { + +class Debugger; +class ObjectImpl; + +class AutoPropDescArrayRooter; + +static inline PropertyOp +CastAsPropertyOp(JSObject *object) +{ + return (__extension__ (PropertyOp) (size_t) (object)); +} + +static inline StrictPropertyOp +CastAsStrictPropertyOp(JSObject *object) +{ + return (__extension__ (StrictPropertyOp) (size_t) (object)); +} + + + + + +struct PropDesc { + private: + + + + + Value pd_; + + Value value_, get_, set_; + + + uint8_t attrs; + + + bool hasGet_ : 1; + bool hasSet_ : 1; + bool hasValue_ : 1; + bool hasWritable_ : 1; + bool hasEnumerable_ : 1; + bool hasConfigurable_ : 1; + + + bool isUndefined_ : 1; + + PropDesc(const Value &v) + : pd_(UndefinedValue()), + value_(v), + get_(UndefinedValue()), set_(UndefinedValue()), + attrs(0), + hasGet_(false), hasSet_(false), + hasValue_(true), hasWritable_(false), hasEnumerable_(false), hasConfigurable_(false), + isUndefined_(false) + { + } + + public: + friend class AutoPropDescArrayRooter; + friend void JS::AutoGCRooter::trace(JSTracer *trc); + + enum Enumerability { Enumerable = true, NonEnumerable = false }; + enum Configurability { Configurable = true, NonConfigurable = false }; + enum Writability { Writable = true, NonWritable = false }; + + PropDesc(); + + static PropDesc undefined() { return PropDesc(); } + static PropDesc valueOnly(const Value &v) { return PropDesc(v); } + + PropDesc(const Value &v, Writability writable, + Enumerability enumerable, Configurability configurable) + : pd_(UndefinedValue()), + value_(v), + get_(UndefinedValue()), set_(UndefinedValue()), + attrs((writable ? 0 : 0x02) | + (enumerable ? 0x01 : 0) | + (configurable ? 0 : 0x04)), + hasGet_(false), hasSet_(false), + hasValue_(true), hasWritable_(true), hasEnumerable_(true), hasConfigurable_(true), + isUndefined_(false) + {} +# 115 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + bool initialize(JSContext* cx, const Value &v, bool checkAccessors = true); +# 126 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + void initFromPropertyDescriptor(const PropertyDescriptor &desc); + bool makeObject(JSContext *cx); + + void setUndefined() { isUndefined_ = true; } + + bool isUndefined() const { return isUndefined_; } + + bool hasGet() const { do { } while(0); return hasGet_; } + bool hasSet() const { do { } while(0); return hasSet_; } + bool hasValue() const { do { } while(0); return hasValue_; } + bool hasWritable() const { do { } while(0); return hasWritable_; } + bool hasEnumerable() const { do { } while(0); return hasEnumerable_; } + bool hasConfigurable() const { do { } while(0); return hasConfigurable_; } + + Value pd() const { do { } while(0); return pd_; } + void clearPd() { pd_ = UndefinedValue(); } + + uint8_t attributes() const { do { } while(0); return attrs; } + + + bool isAccessorDescriptor() const { + return !isUndefined() && (hasGet() || hasSet()); + } + + + bool isDataDescriptor() const { + return !isUndefined() && (hasValue() || hasWritable()); + } + + + bool isGenericDescriptor() const { + return !isUndefined() && !isAccessorDescriptor() && !isDataDescriptor(); + } + + bool configurable() const { + do { } while(0); + do { } while(0); + return (attrs & 0x04) == 0; + } + + bool enumerable() const { + do { } while(0); + do { } while(0); + return (attrs & 0x01) != 0; + } + + bool writable() const { + do { } while(0); + do { } while(0); + return (attrs & 0x02) == 0; + } + + const Value & value() const { + do { } while(0); + return value_; + } + + JSObject * getterObject() const { + do { } while(0); + do { } while(0); + return get_.isUndefined() ? __null : &get_.toObject(); + } + JSObject * setterObject() const { + do { } while(0); + do { } while(0); + return set_.isUndefined() ? __null : &set_.toObject(); + } + + const Value & getterValue() const { + do { } while(0); + do { } while(0); + return get_; + } + const Value & setterValue() const { + do { } while(0); + do { } while(0); + return set_; + } + + + + + + PropertyOp getter() const { + return CastAsPropertyOp(get_.isUndefined() ? __null : &get_.toObject()); + } + StrictPropertyOp setter() const { + return CastAsStrictPropertyOp(set_.isUndefined() ? __null : &set_.toObject()); + } + + + + + + + bool checkGetter(JSContext *cx); + bool checkSetter(JSContext *cx); + + bool unwrapDebuggerObjectsInto(JSContext *cx, Debugger *dbg, JSObject *obj, + PropDesc *unwrapped) const; + + bool wrapInto(JSContext *cx, JSObject *obj, const jsid &id, jsid *wrappedId, + PropDesc *wrappedDesc) const; + + class AutoRooter : private AutoGCRooter + { + public: + explicit AutoRooter(JSContext *cx, PropDesc *pd_ + ) + : AutoGCRooter(cx, PROPDESC), pd(pd_), skip(cx, pd_) + { + do { } while (0); + } + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + PropDesc *pd; + SkipRoot skip; + + }; +}; + +class DenseElementsHeader; +class SparseElementsHeader; +class Uint8ElementsHeader; +class Int8ElementsHeader; +class Uint16ElementsHeader; +class Int16ElementsHeader; +class Uint32ElementsHeader; +class Int32ElementsHeader; +class Uint8ClampedElementsHeader; +class Float32ElementsHeader; +class Float64ElementsHeader; +class Uint8ClampedElementsHeader; +class ArrayBufferElementsHeader; + +enum ElementsKind { + DenseElements, + SparseElements, + + ArrayBufferElements, + + + Uint8Elements, + Int8Elements, + Uint16Elements, + Int16Elements, + Uint32Elements, + Int32Elements, + Uint8ClampedElements, + Float32Elements, + Float64Elements +}; + +class ElementsHeader +{ + protected: + uint32_t type; + uint32_t length; + + union { + class { + friend class DenseElementsHeader; + uint32_t initializedLength; + uint32_t capacity; + } dense; + class { + friend class SparseElementsHeader; + Shape * shape; + } sparse; + }; + + void staticAsserts() { + typedef int + moz_static_assert47 +# 300 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + [(sizeof(ElementsHeader) == ValuesPerHeader * sizeof(Value)) ? 1 : -1] + ; + } + + public: + ElementsKind kind() const { + do { } while(0); + return ElementsKind(type); + } + + inline bool isDenseElements() const { return kind() == DenseElements; } + inline bool isSparseElements() const { return kind() == SparseElements; } + inline bool isArrayBufferElements() const { return kind() == ArrayBufferElements; } + inline bool isUint8Elements() const { return kind() == Uint8Elements; } + inline bool isInt8Elements() const { return kind() == Int8Elements; } + inline bool isUint16Elements() const { return kind() == Uint16Elements; } + inline bool isInt16Elements() const { return kind() == Int16Elements; } + inline bool isUint32Elements() const { return kind() == Uint32Elements; } + inline bool isInt32Elements() const { return kind() == Int32Elements; } + inline bool isUint8ClampedElements() const { return kind() == Uint8ClampedElements; } + inline bool isFloat32Elements() const { return kind() == Float32Elements; } + inline bool isFloat64Elements() const { return kind() == Float64Elements; } + + inline DenseElementsHeader & asDenseElements(); + inline SparseElementsHeader & asSparseElements(); + inline ArrayBufferElementsHeader & asArrayBufferElements(); + inline Uint8ElementsHeader & asUint8Elements(); + inline Int8ElementsHeader & asInt8Elements(); + inline Uint16ElementsHeader & asUint16Elements(); + inline Int16ElementsHeader & asInt16Elements(); + inline Uint32ElementsHeader & asUint32Elements(); + inline Int32ElementsHeader & asInt32Elements(); + inline Uint8ClampedElementsHeader & asUint8ClampedElements(); + inline Float32ElementsHeader & asFloat32Elements(); + inline Float64ElementsHeader & asFloat64Elements(); + + static ElementsHeader * fromElements(HeapSlot *elems) { + return reinterpret_cast(uintptr_t(elems) - sizeof(ElementsHeader)); + } + + static const size_t ValuesPerHeader = 2; +}; + +class DenseElementsHeader : public ElementsHeader +{ + public: + uint32_t capacity() const { + do { } while(0); + return dense.capacity; + } + + uint32_t initializedLength() const { + do { } while(0); + return dense.initializedLength; + } + + uint32_t length() const { + do { } while(0); + return ElementsHeader::length; + } + + bool getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc); + + bool defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc, + bool shouldThrow, bool *succeeded); + + bool setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, + const Value &v, bool *succeeded); + + private: + inline bool isDenseElements() const ; + inline DenseElementsHeader & asDenseElements() ; + + DenseElementsHeader(const DenseElementsHeader &other) ; + void operator=(const DenseElementsHeader &other) ; +}; + +class SparseElementsHeader : public ElementsHeader +{ + public: + Shape * shape() { + do { } while(0); + return sparse.shape; + } + + uint32_t length() const { + do { } while(0); + return ElementsHeader::length; + } + + bool getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc); + + bool defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc, + bool shouldThrow, bool *succeeded); + + bool setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, + const Value &v, bool *succeeded); + + private: + inline bool isSparseElements() const ; + inline SparseElementsHeader & asSparseElements() ; + + SparseElementsHeader(const SparseElementsHeader &other) ; + void operator=(const SparseElementsHeader &other) ; +}; + +extern uint32_t +ClampDoubleToUint8(const double x); + +struct uint8_clamped { + uint8_t val; + + uint8_clamped() { } + uint8_clamped(const uint8_clamped& other) : val(other.val) { } + + + uint8_clamped(uint8_t x) { *this = x; } + uint8_clamped(uint16_t x) { *this = x; } + uint8_clamped(uint32_t x) { *this = x; } + uint8_clamped(int8_t x) { *this = x; } + uint8_clamped(int16_t x) { *this = x; } + uint8_clamped(int32_t x) { *this = x; } + uint8_clamped(double x) { *this = x; } + + uint8_clamped& operator=(const uint8_clamped& x) { + val = x.val; + return *this; + } + + uint8_clamped& operator=(uint8_t x) { + val = x; + return *this; + } + + uint8_clamped& operator=(uint16_t x) { + val = (x > 255) ? 255 : uint8_t(x); + return *this; + } + + uint8_clamped& operator=(uint32_t x) { + val = (x > 255) ? 255 : uint8_t(x); + return *this; + } + + uint8_clamped& operator=(int8_t x) { + val = (x >= 0) ? uint8_t(x) : 0; + return *this; + } + + uint8_clamped& operator=(int16_t x) { + val = (x >= 0) + ? ((x < 255) + ? uint8_t(x) + : 255) + : 0; + return *this; + } + + uint8_clamped& operator=(int32_t x) { + val = (x >= 0) + ? ((x < 255) + ? uint8_t(x) + : 255) + : 0; + return *this; + } + + uint8_clamped& operator=(const double x) { + val = uint8_t(ClampDoubleToUint8(x)); + return *this; + } + + operator uint8_t() const { + return val; + } + + void staticAsserts() { + typedef int + moz_static_assert48 +# 477 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + [(sizeof(uint8_clamped) == 1) ? 1 : -1] + ; + } +}; + + +template static inline const bool TypeIsFloatingPoint() { return false; } +template<> inline const bool TypeIsFloatingPoint() { return true; } +template<> inline const bool TypeIsFloatingPoint() { return true; } + +template static inline const bool TypeIsUnsigned() { return false; } +template<> inline const bool TypeIsUnsigned() { return true; } +template<> inline const bool TypeIsUnsigned() { return true; } +template<> inline const bool TypeIsUnsigned() { return true; } + +template +class TypedElementsHeader : public ElementsHeader +{ + T getElement(uint32_t index) { + do { } while(0); + return reinterpret_cast(this + 1)[index]; + } + + inline void assign(uint32_t index, double d); + + void setElement(uint32_t index, T value) { + do { } while(0); + reinterpret_cast(this + 1)[index] = value; + } + + public: + uint32_t length() const { + do { } while(0); + do { } while(0); + return ElementsHeader::length; + } + + bool getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc); + + bool defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc, + bool shouldThrow, bool *succeeded); + + bool setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, + const Value &v, bool *succeeded); + + private: + TypedElementsHeader(const TypedElementsHeader &other) ; + void operator=(const TypedElementsHeader &other) ; +}; + +template inline void +TypedElementsHeader::assign(uint32_t index, double d) +{ + __builtin_unreachable(); +} + +template<> inline void +TypedElementsHeader::assign(uint32_t index, double d) +{ + double i = ToInteger(d); + uint8_t u = (i <= 0) + ? 0 + : (i >= 255) + ? 255 + : uint8_t(i); + setElement(index, uint8_clamped(u)); +} + +template<> inline void +TypedElementsHeader::assign(uint32_t index, double d) +{ + setElement(index, uint8_t(ToUint32(d))); +} + +template<> inline void +TypedElementsHeader::assign(uint32_t index, double d) +{ + + setElement(index, int8_t(ToInt32(d))); +} + +template<> inline void +TypedElementsHeader::assign(uint32_t index, double d) +{ + setElement(index, uint16_t(ToUint32(d))); +} + +template<> inline void +TypedElementsHeader::assign(uint32_t index, double d) +{ + + setElement(index, int16_t(ToInt32(d))); +} + +template<> inline void +TypedElementsHeader::assign(uint32_t index, double d) +{ + setElement(index, ToUint32(d)); +} + +template<> inline void +TypedElementsHeader::assign(uint32_t index, double d) +{ + + setElement(index, int32_t(ToInt32(d))); +} + +template<> inline void +TypedElementsHeader::assign(uint32_t index, double d) +{ + setElement(index, float(d)); +} + +template<> inline void +TypedElementsHeader::assign(uint32_t index, double d) +{ + setElement(index, d); +} + +class Uint8ElementsHeader : public TypedElementsHeader +{ + private: + inline bool isUint8Elements() const ; + inline Uint8ElementsHeader & asUint8Elements() ; + Uint8ElementsHeader(const Uint8ElementsHeader &other) ; + void operator=(const Uint8ElementsHeader &other) ; +}; +class Int8ElementsHeader : public TypedElementsHeader +{ + private: + bool isInt8Elements() const ; + Int8ElementsHeader & asInt8Elements() ; + Int8ElementsHeader(const Int8ElementsHeader &other) ; + void operator=(const Int8ElementsHeader &other) ; +}; +class Uint16ElementsHeader : public TypedElementsHeader +{ + private: + bool isUint16Elements() const ; + Uint16ElementsHeader & asUint16Elements() ; + Uint16ElementsHeader(const Uint16ElementsHeader &other) ; + void operator=(const Uint16ElementsHeader &other) ; +}; +class Int16ElementsHeader : public TypedElementsHeader +{ + private: + bool isInt16Elements() const ; + Int16ElementsHeader & asInt16Elements() ; + Int16ElementsHeader(const Int16ElementsHeader &other) ; + void operator=(const Int16ElementsHeader &other) ; +}; +class Uint32ElementsHeader : public TypedElementsHeader +{ + private: + bool isUint32Elements() const ; + Uint32ElementsHeader & asUint32Elements() ; + Uint32ElementsHeader(const Uint32ElementsHeader &other) ; + void operator=(const Uint32ElementsHeader &other) ; +}; +class Int32ElementsHeader : public TypedElementsHeader +{ + private: + bool isInt32Elements() const ; + Int32ElementsHeader & asInt32Elements() ; + Int32ElementsHeader(const Int32ElementsHeader &other) ; + void operator=(const Int32ElementsHeader &other) ; +}; +class Float32ElementsHeader : public TypedElementsHeader +{ + private: + bool isFloat32Elements() const ; + Float32ElementsHeader & asFloat32Elements() ; + Float32ElementsHeader(const Float32ElementsHeader &other) ; + void operator=(const Float32ElementsHeader &other) ; +}; +class Float64ElementsHeader : public TypedElementsHeader +{ + private: + bool isFloat64Elements() const ; + Float64ElementsHeader & asFloat64Elements() ; + Float64ElementsHeader(const Float64ElementsHeader &other) ; + void operator=(const Float64ElementsHeader &other) ; +}; + +class Uint8ClampedElementsHeader : public TypedElementsHeader +{ + private: + inline bool isUint8Clamped() const ; + inline Uint8ClampedElementsHeader & asUint8ClampedElements() ; + Uint8ClampedElementsHeader(const Uint8ClampedElementsHeader &other) ; + void operator=(const Uint8ClampedElementsHeader &other) ; +}; + +class ArrayBufferElementsHeader : public ElementsHeader +{ + public: + bool getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc); + + bool defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc, + bool shouldThrow, bool *succeeded); + + bool setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, + const Value &v, bool *succeeded); + + private: + inline bool isArrayBufferElements() const ; + inline ArrayBufferElementsHeader & asArrayBufferElements() ; + + ArrayBufferElementsHeader(const ArrayBufferElementsHeader &other) ; + void operator=(const ArrayBufferElementsHeader &other) ; +}; + +inline DenseElementsHeader & +ElementsHeader::asDenseElements() +{ + do { } while(0); + return *static_cast(this); +} + +inline SparseElementsHeader & +ElementsHeader::asSparseElements() +{ + do { } while(0); + return *static_cast(this); +} + +inline Uint8ElementsHeader & +ElementsHeader::asUint8Elements() +{ + do { } while(0); + return *static_cast(this); +} + +inline Int8ElementsHeader & +ElementsHeader::asInt8Elements() +{ + do { } while(0); + return *static_cast(this); +} + +inline Uint16ElementsHeader & +ElementsHeader::asUint16Elements() +{ + do { } while(0); + return *static_cast(this); +} + +inline Int16ElementsHeader & +ElementsHeader::asInt16Elements() +{ + do { } while(0); + return *static_cast(this); +} + +inline Uint32ElementsHeader & +ElementsHeader::asUint32Elements() +{ + do { } while(0); + return *static_cast(this); +} + +inline Int32ElementsHeader & +ElementsHeader::asInt32Elements() +{ + do { } while(0); + return *static_cast(this); +} + +inline Uint8ClampedElementsHeader & +ElementsHeader::asUint8ClampedElements() +{ + do { } while(0); + return *static_cast(this); +} + +inline Float32ElementsHeader & +ElementsHeader::asFloat32Elements() +{ + do { } while(0); + return *static_cast(this); +} + +inline Float64ElementsHeader & +ElementsHeader::asFloat64Elements() +{ + do { } while(0); + return *static_cast(this); +} + +inline ArrayBufferElementsHeader & +ElementsHeader::asArrayBufferElements() +{ + do { } while(0); + return *static_cast(this); +} + + + + + + + +class ArrayBufferObject; +class ObjectElements +{ + friend struct ::JSObject; + friend class ObjectImpl; + friend class ArrayBufferObject; + + + uint32_t capacity; + + + + + + + + uint32_t initializedLength; + + + uint32_t length; + + + uint32_t unused; + + void staticAsserts() { + typedef int + moz_static_assert49 +# 804 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + [(sizeof(ObjectElements) == VALUES_PER_HEADER * sizeof(Value)) ? 1 : -1] + ; + } + + public: + + ObjectElements(uint32_t capacity, uint32_t length) + : capacity(capacity), initializedLength(0), length(length) + {} + + HeapSlot *elements() { return (HeapSlot *)(uintptr_t(this) + sizeof(ObjectElements)); } + static ObjectElements * fromElements(HeapSlot *elems) { + return (ObjectElements *)(uintptr_t(elems) - sizeof(ObjectElements)); + } + + static int offsetOfCapacity() { + return (int)__builtin_offsetof (ObjectElements, capacity) - (int)sizeof(ObjectElements); + } + static int offsetOfInitializedLength() { + return (int)__builtin_offsetof (ObjectElements, initializedLength) - (int)sizeof(ObjectElements); + } + static int offsetOfLength() { + return (int)__builtin_offsetof (ObjectElements, length) - (int)sizeof(ObjectElements); + } + + static const size_t VALUES_PER_HEADER = 2; +}; + + +extern HeapSlot *emptyObjectElements; + +struct Class; +struct GCMarker; +struct ObjectOps; +struct Shape; + +class NewObjectCache; + +inline Value +ObjectValue(ObjectImpl &obj); +# 893 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" +class ObjectImpl : public gc::Cell +{ + protected: + + + + + HeapPtrShape shape_; + + + + + + + HeapPtrTypeObject type_; + + HeapSlot *slots; + HeapSlot *elements; + + private: + static void staticAsserts() { + typedef int + moz_static_assert50 +# 914 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + [(sizeof(ObjectImpl) == sizeof(shadow::Object)) ? 1 : -1] + ; + typedef int + moz_static_assert51 +# 916 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + [(sizeof(ObjectImpl) % sizeof(Value) == 0) ? 1 : -1] + ; + + typedef int + moz_static_assert52 +# 919 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + [(__builtin_offsetof (ObjectImpl, shape_) == __builtin_offsetof (shadow::Object, shape)) ? 1 : -1] + ; + typedef int + moz_static_assert53 +# 921 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + [(__builtin_offsetof (ObjectImpl, type_) == __builtin_offsetof (shadow::Object, type)) ? 1 : -1] + ; + typedef int + moz_static_assert54 +# 923 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + [(__builtin_offsetof (ObjectImpl, slots) == __builtin_offsetof (shadow::Object, slots)) ? 1 : -1] + ; + typedef int + moz_static_assert55 +# 925 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + [(__builtin_offsetof (ObjectImpl, elements) == __builtin_offsetof (shadow::Object, _1)) ? 1 : -1] + ; + } + + JSObject * asObjectPtr() { return reinterpret_cast(this); } + + friend inline Value ObjectValue(ObjectImpl &obj); + + + + public: + JSObject * getProto() const { + return type_->proto; + } + + inline bool isExtensible() const; + + + + + + inline bool isDenseArray() const; + inline bool isSlowArray() const; + inline bool isArray() const; + + inline HeapSlotArray getDenseArrayElements(); + inline const Value & getDenseArrayElement(uint32_t idx); + inline uint32_t getDenseArrayInitializedLength(); + + bool makeElementsSparse(JSContext *cx) { + __builtin_unreachable(); + + __builtin_unreachable(); + return false; + } + + protected: + + + + void checkShapeConsistency() { } + + + private: + + + + + inline void getSlotRangeUnchecked(uint32_t start, uint32_t length, + HeapSlot **fixedStart, HeapSlot **fixedEnd, + HeapSlot **slotsStart, HeapSlot **slotsEnd); + inline void getSlotRange(uint32_t start, uint32_t length, + HeapSlot **fixedStart, HeapSlot **fixedEnd, + HeapSlot **slotsStart, HeapSlot **slotsEnd); + + protected: + friend struct GCMarker; + friend struct Shape; + friend class NewObjectCache; + + inline bool hasContiguousSlots(uint32_t start, uint32_t count) const; + + inline void invalidateSlotRange(uint32_t start, uint32_t count); + inline void initializeSlotRange(uint32_t start, uint32_t count); + + + + + + void initSlotRange(uint32_t start, const Value *vector, uint32_t length); + + + + + + void copySlotRange(uint32_t start, const Value *vector, uint32_t length); +# 1016 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + static const uint32_t SLOT_CAPACITY_MIN = 8; + + HeapSlot *fixedSlots() const { + return reinterpret_cast(uintptr_t(this) + sizeof(ObjectImpl)); + } + + friend class ElementsHeader; + friend class DenseElementsHeader; + friend class SparseElementsHeader; + + enum DenseElementsResult { + Failure, + ConvertToSparse, + Succeeded + }; + + DenseElementsResult ensureDenseElementsInitialized(JSContext *cx, uint32_t index, + uint32_t extra) + { + __builtin_unreachable(); + + __builtin_unreachable(); + return Failure; + } + + + + + + + public: + Shape * lastProperty() const { + do { } while(0); + return shape_; + } + + inline bool isNative() const; + + types::TypeObject *type() const { + do { } while(0); + return type_; + } + + uint32_t numFixedSlots() const { + return reinterpret_cast(this)->numFixedSlots(); + } + + + + + + bool hasSingletonType() const { return !!type_->singleton; } + + + + + + bool hasLazyType() const { return type_->lazy(); } + + inline uint32_t slotSpan() const; + + + inline uint32_t numDynamicSlots() const; + + const Shape * nativeLookup(JSContext *cx, jsid id); + + + + + + inline Class *getClass() const; + inline JSClass *getJSClass() const; + inline bool hasClass(const Class *c) const; + inline const ObjectOps *getOps() const; +# 1100 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + inline bool isDelegate() const; + + + + + + + inline bool inDictionaryMode() const; + + const Value &getSlot(uint32_t slot) const { + do { } while(0); + uint32_t fixed = numFixedSlots(); + if (slot < fixed) + return fixedSlots()[slot]; + return slots[slot - fixed]; + } + + HeapSlot *getSlotAddressUnchecked(uint32_t slot) { + uint32_t fixed = numFixedSlots(); + if (slot < fixed) + return fixedSlots() + slot; + return slots + (slot - fixed); + } + + HeapSlot *getSlotAddress(uint32_t slot) { + + + + + + do { } while(0); + return getSlotAddressUnchecked(slot); + } + + HeapSlot &getSlotRef(uint32_t slot) { + do { } while(0); + return *getSlotAddress(slot); + } + + inline HeapSlot &nativeGetSlotRef(uint32_t slot); + inline const Value &nativeGetSlot(uint32_t slot) const; + + inline void setSlot(uint32_t slot, const Value &value); + inline void initSlot(uint32_t slot, const Value &value); + inline void initSlotUnchecked(uint32_t slot, const Value &value); + + + + HeapSlot &getFixedSlotRef(uint32_t slot) { + do { } while(0); + return fixedSlots()[slot]; + } + + const Value &getFixedSlot(uint32_t slot) const { + do { } while(0); + return fixedSlots()[slot]; + } + + inline void setFixedSlot(uint32_t slot, const Value &value); + inline void initFixedSlot(uint32_t slot, const Value &value); + + + + + + + + static inline uint32_t dynamicSlotsCount(uint32_t nfixed, uint32_t span); + + + inline size_t sizeOfThis() const; + + + + ObjectElements * getElementsHeader() const { + return ObjectElements::fromElements(elements); + } + + ElementsHeader & elementsHeader() const { + __builtin_unreachable(); + return *ElementsHeader::fromElements(elements); + } + + inline HeapSlot *fixedElements() const { + typedef int + + moz_static_assert56 +# 1184 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" + [(2 * sizeof(Value) == sizeof(ObjectElements)) ? 1 : -1] + + ; + return &fixedSlots()[2]; + } + + void setFixedElements() { this->elements = fixedElements(); } + + inline bool hasDynamicElements() const { + + + + + + + + return elements != emptyObjectElements && elements != fixedElements(); + } + + + static inline void readBarrier(ObjectImpl *obj); + static inline void writeBarrierPre(ObjectImpl *obj); + static inline void writeBarrierPost(ObjectImpl *obj, void *addr); + inline void privateWriteBarrierPre(void **oldval); + inline void privateWriteBarrierPost(void **oldval); + void markChildren(JSTracer *trc); + + + + inline void *&privateRef(uint32_t nfixed) const; + + inline bool hasPrivate() const; + inline void *getPrivate() const; + inline void setPrivate(void *data); + inline void setPrivateUnbarriered(void *data); + inline void initPrivate(void *data); + + + inline void *getPrivate(uint32_t nfixed) const; + + + static size_t offsetOfShape() { return __builtin_offsetof (ObjectImpl, shape_); } + HeapPtrShape *addressOfShape() { return &shape_; } + + static size_t offsetOfType() { return __builtin_offsetof (ObjectImpl, type_); } + HeapPtrTypeObject *addressOfType() { return &type_; } + + static size_t offsetOfElements() { return __builtin_offsetof (ObjectImpl, elements); } + static size_t offsetOfFixedElements() { + return sizeof(ObjectImpl) + sizeof(ObjectElements); + } + + static size_t getFixedSlotOffset(size_t slot) { + return sizeof(ObjectImpl) + slot * sizeof(Value); + } + static size_t getPrivateDataOffset(size_t nfixed) { return getFixedSlotOffset(nfixed); } + static size_t offsetOfSlots() { return __builtin_offsetof (ObjectImpl, slots); } +}; + +inline Value +ObjectValue(ObjectImpl &obj) +{ + Value v; + v.setObject(*obj.asObjectPtr()); + return v; +} + +bool +GetOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc); + + +extern bool +GetElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, Value *vp); + +extern bool +DefineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc, + bool shouldThrow, bool *succeeded); + + +extern bool +SetElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, const Value &v, + bool *succeeded); + +extern bool +HasElement(JSContext *cx, ObjectImpl *obj, uint32_t index, bool *found); + +} +# 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" +#define String_h_ + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatom.h" 1 +# 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsstr.h" 1 + + + + + + + +#define jsstr_h___ + +# 1 "/usr/include/ctype.h" 1 3 4 +# 25 "/usr/include/ctype.h" 3 4 +#define _CTYPE_H 1 + + + + +extern "C" { +# 45 "/usr/include/ctype.h" 3 4 +#define _ISbit(bit) ((bit) < 8 ? ((1 << (bit)) << 8) : ((1 << (bit)) >> 8)) + + +enum +{ + _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), + _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), + _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), + _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), + _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), + _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), + _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), + _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), + _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), + _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), + _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), + _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) +}; +# 81 "/usr/include/ctype.h" 3 4 +extern __const unsigned short int **__ctype_b_loc (void) + throw () __attribute__ ((__const)); +extern __const __int32_t **__ctype_tolower_loc (void) + throw () __attribute__ ((__const)); +extern __const __int32_t **__ctype_toupper_loc (void) + throw () __attribute__ ((__const)); + + + + + + +#define __isctype_f(type) __extern_inline int is ##type (int __c) __THROW { return (*__ctype_b_loc ())[(int) (__c)] & (unsigned short int) _IS ##type; } + + + + + + + +#define __isascii(c) (((c) & ~0x7f) == 0) +#define __toascii(c) ((c) & 0x7f) + +#define __exctype(name) extern int name (int) __THROW + + + + + + + +extern int isalnum (int) throw (); +extern int isalpha (int) throw (); +extern int iscntrl (int) throw (); +extern int isdigit (int) throw (); +extern int islower (int) throw (); +extern int isgraph (int) throw (); +extern int isprint (int) throw (); +extern int ispunct (int) throw (); +extern int isspace (int) throw (); +extern int isupper (int) throw (); +extern int isxdigit (int) throw (); + + + +extern int tolower (int __c) throw (); + + +extern int toupper (int __c) throw (); + + + + + + + + +extern int isblank (int) throw (); + + + + + + +extern int isctype (int __c, int __mask) throw (); + + + + + + +extern int isascii (int __c) throw (); + + + +extern int toascii (int __c) throw (); + + + +extern int _toupper (int) throw (); +extern int _tolower (int) throw (); + + + +#define __tobody(c,f,a,args) (__extension__ ({ int __res; if (sizeof (c) > 1) { if (__builtin_constant_p (c)) { int __c = (c); __res = __c < -128 || __c > 255 ? __c : (a)[__c]; } else __res = f args; } else __res = (a)[(int) (c)]; __res; })) +# 263 "/usr/include/ctype.h" 3 4 +#define __isctype_l(c,type,locale) ((locale)->__ctype_b[(int) (c)] & (unsigned short int) type) + + +#define __exctype_l(name) extern int name (int, __locale_t) __THROW + + + + + + +extern int isalnum_l (int, __locale_t) throw (); +extern int isalpha_l (int, __locale_t) throw (); +extern int iscntrl_l (int, __locale_t) throw (); +extern int isdigit_l (int, __locale_t) throw (); +extern int islower_l (int, __locale_t) throw (); +extern int isgraph_l (int, __locale_t) throw (); +extern int isprint_l (int, __locale_t) throw (); +extern int ispunct_l (int, __locale_t) throw (); +extern int isspace_l (int, __locale_t) throw (); +extern int isupper_l (int, __locale_t) throw (); +extern int isxdigit_l (int, __locale_t) throw (); + +extern int isblank_l (int, __locale_t) throw (); + + + +extern int __tolower_l (int __c, __locale_t __l) throw (); +extern int tolower_l (int __c, __locale_t __l) throw (); + + +extern int __toupper_l (int __c, __locale_t __l) throw (); +extern int toupper_l (int __c, __locale_t __l) throw (); +# 349 "/usr/include/ctype.h" 3 4 +} +# 11 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsstr.h" 2 + + + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Unicode.h" 1 + + + + + +#define Unicode_h__ +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Unicode.h" +extern const bool js_isidstart[]; +extern const bool js_isident[]; +extern const bool js_isspace[]; + +namespace js { +namespace unicode { +# 68 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Unicode.h" +struct CharFlag { + enum temp { + SPACE = 1 << 0, + LETTER = 1 << 1, + IDENTIFIER_PART = 1 << 2, + NO_DELTA = 1 << 3, + ENCLOSING_MARK = 1 << 4, + COMBINING_SPACING_MARK = 1 << 5 + }; +}; + +const jschar BYTE_ORDER_MARK2 = 0xFFFE; +const jschar NO_BREAK_SPACE = 0x00A0; + +class CharacterInfo { +# 103 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Unicode.h" + public: + uint16_t upperCase; + uint16_t lowerCase; + uint8_t flags; + + inline bool isSpace() const { + return flags & CharFlag::SPACE; + } + + inline bool isLetter() const { + return flags & CharFlag::LETTER; + } + + inline bool isIdentifierPart() const { + return flags & (CharFlag::IDENTIFIER_PART | CharFlag::LETTER); + } + + inline bool isEnclosingMark() const { + return flags & CharFlag::ENCLOSING_MARK; + } + + inline bool isCombiningSpacingMark() const { + return flags & CharFlag::COMBINING_SPACING_MARK; + } +}; + +extern const uint8_t index1[]; +extern const uint8_t index2[]; +extern const CharacterInfo js_charinfo[]; + +inline const CharacterInfo& +CharInfo(jschar code) +{ + size_t index = index1[code >> 6]; + index = index2[(index << 6) + (code & 0x3f)]; + + return js_charinfo[index]; +} + +inline bool +IsIdentifierStart(jschar ch) +{ +# 154 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Unicode.h" + if (ch < 128) + return js_isidstart[ch]; + + return CharInfo(ch).isLetter(); +} + +inline bool +IsIdentifierPart(jschar ch) +{ + + + if (ch < 128) + return js_isident[ch]; + + return CharInfo(ch).isIdentifierPart(); +} + +inline bool +IsLetter(jschar ch) +{ + return CharInfo(ch).isLetter(); +} + +inline bool +IsSpace(jschar ch) +{ +# 192 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Unicode.h" + if (ch < 128) + return js_isspace[ch]; + + if (ch == NO_BREAK_SPACE) + return true; + + return CharInfo(ch).isSpace(); +} + +inline bool +IsSpaceOrBOM2(jschar ch) +{ + if (ch < 128) + return js_isspace[ch]; + + + if (ch == NO_BREAK_SPACE || ch == BYTE_ORDER_MARK2) + return true; + + return CharInfo(ch).isSpace(); +} + +inline jschar +ToUpperCase(jschar ch) +{ + const CharacterInfo &info = CharInfo(ch); + + + + + + if (info.flags & CharFlag::NO_DELTA) + return info.upperCase; + + return uint16_t(ch) + info.upperCase; +} + +inline jschar +ToLowerCase(jschar ch) +{ + const CharacterInfo &info = CharInfo(ch); + + if (info.flags & CharFlag::NO_DELTA) + return info.lowerCase; + + return uint16_t(ch) + info.lowerCase; +} + + + +inline bool +IsXMLSpace(jschar ch) +{ + return ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n'; +} + +inline bool +IsXMLNamespaceStart(jschar ch) +{ + if (ch == '_') + return true; + + return CharInfo(ch).isCombiningSpacingMark() || IsIdentifierStart(ch); +} + +inline bool +IsXMLNamespacePart(jschar ch) +{ + if (ch == '.' || ch == '-' || ch == '_') + return true; + + return CharInfo(ch).isEnclosingMark() || IsIdentifierPart(ch); +} + +inline bool +IsXMLNameStart(jschar ch) +{ + if (ch == '_' || ch == ':') + return true; + + return CharInfo(ch).isCombiningSpacingMark() || IsIdentifierStart(ch); +} + +inline bool +IsXMLNamePart(jschar ch) +{ + if (ch == '.' || ch == '-' || ch == '_' || ch == ':') + return true; + + return CharInfo(ch).isEnclosingMark() || IsIdentifierPart(ch); +} + + +} +} +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsstr.h" 2 + +namespace js { + + +class StringBuffer; +# 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsstr.h" +class StringSegmentRange; +class MutatingRopeSegmentRange; + + + + +class RopeBuilder; + +} + +extern JSString * +js_ConcatStrings(JSContext *cx, js::HandleString s1, js::HandleString s2); + +extern JSString * +js_toLowerCase(JSContext *cx, JSString *str); + +extern JSString * +js_toUpperCase(JSContext *cx, JSString *str); + +struct JSSubString { + size_t length; + const jschar *chars; +}; + +extern jschar js_empty_ucstr[]; +extern JSSubString js_EmptySubString; + + + + + +#define JS7_ISDEC(c) ((((unsigned)(c)) - '0') <= 9) +#define JS7_UNDEC(c) ((c) - '0') +#define JS7_ISHEX(c) ((c) < 128 && isxdigit(c)) +#define JS7_UNHEX(c) (unsigned)(JS7_ISDEC(c) ? (c) - '0' : 10 + tolower(c) - 'a') +#define JS7_ISLET(c) ((c) < 128 && isalpha(c)) + + +extern JSObject * +js_InitStringClass(JSContext *cx, JSObject *obj); + +extern const char js_escape_str[]; +extern const char js_unescape_str[]; +extern const char js_uneval_str[]; +extern const char js_decodeURI_str[]; +extern const char js_encodeURI_str[]; +extern const char js_decodeURIComponent_str[]; +extern const char js_encodeURIComponent_str[]; + + +extern JSFixedString * +js_NewString(JSContext *cx, jschar *chars, size_t length); + +extern JSLinearString * +js_NewDependentString(JSContext *cx, JSString *base, size_t start, size_t length); + + +extern JSFixedString * +js_NewStringCopyN(JSContext *cx, const jschar *s, size_t n); + +extern JSFixedString * +js_NewStringCopyN(JSContext *cx, const char *s, size_t n); + + +extern JSFixedString * +js_NewStringCopyZ(JSContext *cx, const jschar *s); + +extern JSFixedString * +js_NewStringCopyZ(JSContext *cx, const char *s); + + + + +extern const char * +js_ValueToPrintable(JSContext *cx, const js::Value &, + JSAutoByteString *bytes, bool asSource = false); + +namespace js { + + + + + +extern JSString * +ToStringSlow(JSContext *cx, const Value &v); + + + + + + +static __attribute__((always_inline)) inline JSString * +ToString(JSContext *cx, const js::Value &v) +{ + if (v.isString()) + return v.toString(); + return ToStringSlow(cx, v); +} + + + + + + +inline bool +ValueToStringBuffer(JSContext *cx, const Value &v, StringBuffer &sb); + +} + + + + + +extern __attribute__((visibility("default"))) JSString * +js_ValueToSource(JSContext *cx, const js::Value &v); + +namespace js { + + + + + +extern bool +EqualStrings(JSContext *cx, JSString *str1, JSString *str2, bool *result); + + +extern bool +EqualStrings(JSContext *cx, JSLinearString *str1, JSLinearString *str2, bool *result) ; + + +extern bool +EqualStrings(JSLinearString *str1, JSLinearString *str2); + + + + + +extern bool +CompareStrings(JSContext *cx, JSString *str1, JSString *str2, int32_t *result); + + + + +extern bool +StringEqualsAscii(JSLinearString *str, const char *asciiBytes); + +} + +extern size_t +js_strlen(const jschar *s); + +extern jschar * +js_strchr(const jschar *s, jschar c); + +extern jschar * +js_strchr_limit(const jschar *s, jschar c, const jschar *limit); + +static __attribute__((always_inline)) inline void +js_strncpy(jschar *dst, const jschar *src, size_t nelem) +{ + return js::PodCopy(dst, src, nelem); +} + +namespace js { + + + + + + +extern jschar * +InflateString(JSContext *cx, const char *bytes, size_t *length, + FlationCoding fc = NormalEncoding); + +extern char * +DeflateString(JSContext *cx, const jschar *chars, size_t length); +# 216 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsstr.h" +extern bool +InflateStringToBuffer(JSContext *cx, const char *bytes, size_t length, + jschar *chars, size_t *charsLength); + +extern bool +InflateUTF8StringToBuffer(JSContext *cx, const char *bytes, size_t length, + jschar *chars, size_t *charsLength, + FlationCoding fc = NormalEncoding); + + +extern size_t +GetDeflatedStringLength(JSContext *cx, const jschar *chars, size_t charsLength); + + +extern size_t +GetDeflatedUTF8StringLength(JSContext *cx, const jschar *chars, + size_t charsLength, + FlationCoding fc = NormalEncoding); + + + + + + + +extern bool +DeflateStringToBuffer(JSContext *cx, const jschar *chars, + size_t charsLength, char *bytes, size_t *length); + + + + +extern bool +DeflateStringToUTF8Buffer(JSContext *cx, const jschar *chars, + size_t charsLength, char *bytes, size_t *length, + FlationCoding fc = NormalEncoding); + + + + + +extern JSBool +str_replace(JSContext *cx, unsigned argc, js::Value *vp); + +extern JSBool +str_fromCharCode(JSContext *cx, unsigned argc, Value *vp); + +} + +extern JSBool +js_str_toString(JSContext *cx, unsigned argc, js::Value *vp); + +extern JSBool +js_str_charAt(JSContext *cx, unsigned argc, js::Value *vp); + +extern JSBool +js_str_charCodeAt(JSContext *cx, unsigned argc, js::Value *vp); + + + + + +extern int +js_OneUcs4ToUtf8Char(uint8_t *utf8Buffer, uint32_t ucs4Char); + +namespace js { + +extern size_t +PutEscapedStringImpl(char *buffer, size_t size, FILE *fp, JSLinearString *str, uint32_t quote); +# 295 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsstr.h" +inline size_t +PutEscapedString(char *buffer, size_t size, JSLinearString *str, uint32_t quote) +{ + size_t n = PutEscapedStringImpl(buffer, size, __null, str, quote); + + + do { } while(0); + return n; +} + + + + + + +inline bool +FileEscapedString(FILE *fp, JSLinearString *str, uint32_t quote) +{ + return PutEscapedStringImpl(__null, 0, fp, str, quote) != size_t(-1); +} + +JSBool +str_match(JSContext *cx, unsigned argc, Value *vp); + +JSBool +str_search(JSContext *cx, unsigned argc, Value *vp); + +JSBool +str_split(JSContext *cx, unsigned argc, Value *vp); + +} + +extern JSBool +js_String(JSContext *cx, unsigned argc, js::Value *vp); +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" 2 + + + + +class JSString; +class JSDependentString; +class JSUndependedString; +class JSExtensibleString; +class JSExternalString; +class JSLinearString; +class JSFixedString; +class JSRope; +class JSAtom; + +namespace js { + +class StaticStrings; +class PropertyName; + + +static const size_t UINT32_CHAR_BUFFER_LENGTH = sizeof("4294967295") - 1; + +} +# 131 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" +class JSString : public js::gc::Cell +{ + protected: + static const size_t NUM_INLINE_CHARS = 2 * sizeof(void *) / sizeof(jschar); + + + struct Data + { + size_t lengthAndFlags; + union { + const jschar *chars; + JSString *left; + } u1; + union { + jschar inlineStorage[NUM_INLINE_CHARS]; + struct { + union { + JSLinearString *base; + JSString *right; + size_t capacity; + const JSStringFinalizer *externalFinalizer; + } u2; + union { + JSString *parent; + size_t reserved; + } u3; + } s; + }; + } d; + + public: +# 200 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" + static const size_t LENGTH_SHIFT = 4; + static const size_t FLAGS_MASK = (((uint32_t)1 << (LENGTH_SHIFT)) - 1); + + static const size_t ROPE_BIT = ((uint32_t)1 << (0)); + + static const size_t DEPENDENT_FLAGS = ((uint32_t)1 << (1)); + static const size_t EXTENSIBLE_FLAGS = ((uint32_t)1 << (2)); + static const size_t FIXED_FLAGS = ((uint32_t)1 << (1)) | ((uint32_t)1 << (2)); + static const size_t UNDEPENDED_FLAGS = ((uint32_t)1 << (1)) | ((uint32_t)1 << (3)); + + static const size_t ATOM_MASK = (((uint32_t)1 << (3)) - 1); + static const size_t NON_STATIC_ATOM_FLAGS = ((uint32_t)1 << (3)); + + static const size_t MAX_LENGTH = ((uint32_t)1 << (32 - LENGTH_SHIFT)) - 1; + + size_t buildLengthAndFlags(size_t length, size_t flags) { + do { } while(0); + do { } while(0); + return (length << LENGTH_SHIFT) | flags; + } + + + + + + + static inline bool validateLength(JSContext *cx, size_t length); + + static void staticAsserts() { + typedef int moz_static_assert57[((8 * 4) >= 32) ? 1 : -1]; + typedef int + moz_static_assert58 +# 230 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" + [(((JSString::MAX_LENGTH << JSString::LENGTH_SHIFT) >> JSString::LENGTH_SHIFT) == JSString::MAX_LENGTH) ? 1 : -1] + ; + typedef int + moz_static_assert59 +# 232 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" + [(sizeof(JSString) == __builtin_offsetof (JSString, d.inlineStorage) + NUM_INLINE_CHARS * sizeof(jschar)) ? 1 : -1] + ; + typedef int + moz_static_assert60 +# 234 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" + [(__builtin_offsetof (JSString, d.u1.chars) == __builtin_offsetof (js::shadow::Atom, chars)) ? 1 : -1] + ; + } + + + friend class JSRope; + + public: + + + __attribute__((always_inline)) inline + size_t length() const { + return d.lengthAndFlags >> LENGTH_SHIFT; + } + + __attribute__((always_inline)) inline + bool empty() const { + return d.lengthAndFlags <= FLAGS_MASK; + } + + + + + + + inline const jschar *getChars(JSContext *cx); + inline const jschar *getCharsZ(JSContext *cx); + + + + inline JSLinearString *ensureLinear(JSContext *cx); + inline JSFlatString *ensureFlat(JSContext *cx); + inline JSFixedString *ensureFixed(JSContext *cx); + + + + __attribute__((always_inline)) inline + bool isRope() const { + bool rope = d.lengthAndFlags & ROPE_BIT; + do { } while (0); + return rope; + } + + __attribute__((always_inline)) inline + JSRope &asRope() const { + do { } while(0); + return *(JSRope *)this; + } + + __attribute__((always_inline)) inline + bool isLinear() const { + return !(d.lengthAndFlags & ROPE_BIT); + } + + __attribute__((always_inline)) inline + JSLinearString &asLinear() const { + do { } while(0); + return *(JSLinearString *)this; + } + + __attribute__((always_inline)) inline + bool isDependent() const { + return (d.lengthAndFlags & FLAGS_MASK) == DEPENDENT_FLAGS; + } + + __attribute__((always_inline)) inline + JSDependentString &asDependent() const { + do { } while(0); + return *(JSDependentString *)this; + } + + __attribute__((always_inline)) inline + bool isFlat() const { + return isLinear() && !isDependent(); + } + + __attribute__((always_inline)) inline + JSFlatString &asFlat() const { + do { } while(0); + return *(JSFlatString *)this; + } + + __attribute__((always_inline)) inline + bool isExtensible() const { + return (d.lengthAndFlags & FLAGS_MASK) == EXTENSIBLE_FLAGS; + } + + __attribute__((always_inline)) inline + JSExtensibleString &asExtensible() const { + do { } while(0); + return *(JSExtensibleString *)this; + } + + + bool isShort() const; + bool isFixed() const; + bool isInline() const; + + __attribute__((always_inline)) inline + JSFixedString &asFixed() const { + do { } while(0); + return *(JSFixedString *)this; + } + + bool isExternal() const; + + __attribute__((always_inline)) inline + JSExternalString &asExternal() const { + do { } while(0); + return *(JSExternalString *)this; + } + + __attribute__((always_inline)) inline + bool isUndepended() const { + return (d.lengthAndFlags & FLAGS_MASK) == UNDEPENDED_FLAGS; + } + + __attribute__((always_inline)) inline + bool isAtom() const { + return !(d.lengthAndFlags & ATOM_MASK); + } + + __attribute__((always_inline)) inline + JSAtom &asAtom() const { + do { } while(0); + return *(JSAtom *)this; + } + + + + inline bool hasBase() const { + typedef int moz_static_assert61[((DEPENDENT_FLAGS | ((uint32_t)1 << (3))) == UNDEPENDED_FLAGS) ? 1 : -1]; + return (d.lengthAndFlags & (((uint32_t)1 << (3)) - 1)) == DEPENDENT_FLAGS; + } + + inline JSLinearString *base() const { + do { } while(0); + return d.s.u2.base; + } + + inline void markBase(JSTracer *trc); + + + + inline void finalize(js::FreeOp *fop); + + + + size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf); + + + + static size_t offsetOfLengthAndFlags() { + return __builtin_offsetof (JSString, d.lengthAndFlags); + } + + static size_t offsetOfChars() { + return __builtin_offsetof (JSString, d.u1.chars); + } + + static inline void writeBarrierPre(JSString *str); + static inline void writeBarrierPost(JSString *str, void *addr); + static inline bool needWriteBarrierPre(JSCompartment *comp); + static inline void readBarrier(JSString *str); + + static inline js::ThingRootKind rootKind() { return js::THING_ROOT_STRING; } + + + + + + + private: + JSString() ; + JSString(const JSString &other) ; + void operator=(const JSString &other) ; +}; + +class JSRope : public JSString +{ + enum UsingBarrier { WithIncrementalBarrier, NoBarrier }; + template + JSFlatString *flattenInternal(JSContext *cx); + + friend class JSString; + JSFlatString *flatten(JSContext *cx); + + void init(JSString *left, JSString *right, size_t length); + + public: + static inline JSRope *new_(JSContext *cx, js::HandleString left, + js::HandleString right, size_t length); + + inline JSString *leftChild() const { + do { } while(0); + return d.u1.left; + } + + inline JSString *rightChild() const { + do { } while(0); + return d.s.u2.right; + } + + inline void markChildren(JSTracer *trc); +}; + +typedef int moz_static_assert62[(sizeof(JSRope) == sizeof(JSString)) ? 1 : -1]; + +class JSLinearString : public JSString +{ + friend class JSString; + + + JSLinearString *ensureLinear(JSContext *cx) ; + bool isLinear() const ; + JSLinearString &asLinear() const ; + + public: + __attribute__((always_inline)) inline + const jschar *chars() const { + do { } while(0); + return d.u1.chars; + } +}; + +typedef int moz_static_assert63[(sizeof(JSLinearString) == sizeof(JSString)) ? 1 : -1]; + +class JSDependentString : public JSLinearString +{ + friend class JSString; + JSFixedString *undepend(JSContext *cx); + + void init(JSLinearString *base, const jschar *chars, size_t length); + + + bool isDependent() const ; + JSDependentString &asDependent() const ; + + public: + static inline JSDependentString *new_(JSContext *cx, JSLinearString *base, + const jschar *chars, size_t length); +}; + +typedef int moz_static_assert64[(sizeof(JSDependentString) == sizeof(JSString)) ? 1 : -1]; + +class JSFlatString : public JSLinearString +{ + + JSFlatString *ensureFlat(JSContext *cx) ; + bool isFlat() const ; + JSFlatString &asFlat() const ; + + bool isIndexSlow(uint32_t *indexp) const; + + public: + __attribute__((always_inline)) inline + const jschar *charsZ() const { + do { } while(0); + return chars(); + } + + + + + + + + inline bool isIndex(uint32_t *indexp) const { + const jschar *s = chars(); + return ((((unsigned)(*s)) - '0') <= 9) && isIndexSlow(indexp); + } + + + + + + + inline js::PropertyName *toPropertyName(JSContext *cx); + + inline void finalize(js::FreeOp *fop); +}; + +typedef int moz_static_assert65[(sizeof(JSFlatString) == sizeof(JSString)) ? 1 : -1]; + +class JSExtensibleString : public JSFlatString +{ + + bool isExtensible() const ; + JSExtensibleString &asExtensible() const ; + + public: + __attribute__((always_inline)) inline + size_t capacity() const { + do { } while(0); + return d.s.u2.capacity; + } +}; + +typedef int moz_static_assert66[(sizeof(JSExtensibleString) == sizeof(JSString)) ? 1 : -1]; + +class JSFixedString : public JSFlatString +{ + void init(const jschar *chars, size_t length); + + + JSFlatString *ensureFixed(JSContext *cx) ; + bool isFixed() const ; + JSFixedString &asFixed() const ; + + public: + static inline JSFixedString *new_(JSContext *cx, const jschar *chars, size_t length); + + + + + + + inline JSAtom *morphAtomizedStringIntoAtom(); +}; + +typedef int moz_static_assert67[(sizeof(JSFixedString) == sizeof(JSString)) ? 1 : -1]; + +class JSInlineString : public JSFixedString +{ + static const size_t MAX_INLINE_LENGTH = NUM_INLINE_CHARS - 1; + + public: + static inline JSInlineString *new_(JSContext *cx); + + inline jschar *init(size_t length); + + inline void resetLength(size_t length); + + static bool lengthFits(size_t length) { + return length <= MAX_INLINE_LENGTH; + } + +}; + +typedef int moz_static_assert68[(sizeof(JSInlineString) == sizeof(JSString)) ? 1 : -1]; + +class JSShortString : public JSInlineString +{ + + static const size_t INLINE_EXTENSION_CHARS = sizeof(JSString::Data) / sizeof(jschar); + + static void staticAsserts() { + typedef int moz_static_assert69[(INLINE_EXTENSION_CHARS % js::gc::Cell::CellSize == 0) ? 1 : -1]; + typedef int + + moz_static_assert70 +# 582 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" + [(MAX_SHORT_LENGTH + 1 == (sizeof(JSShortString) - __builtin_offsetof (JSShortString, d.inlineStorage)) / sizeof(jschar)) ? 1 : -1] + + ; + } + + jschar inlineStorageExtension[INLINE_EXTENSION_CHARS]; + + public: + static inline JSShortString *new_(JSContext *cx); + + jschar *inlineStorageBeforeInit() { + return d.inlineStorage; + } + + inline void initAtOffsetInBuffer(const jschar *chars, size_t length); + + static const size_t MAX_SHORT_LENGTH = JSString::NUM_INLINE_CHARS + + INLINE_EXTENSION_CHARS + -1 ; + + static bool lengthFits(size_t length) { + return length <= MAX_SHORT_LENGTH; + } + + + + __attribute__((always_inline)) inline void finalize(js::FreeOp *fop); +}; + +typedef int moz_static_assert71[(sizeof(JSShortString) == 2 * sizeof(JSString)) ? 1 : -1]; + +class JSExternalString : public JSFixedString +{ + void init(const jschar *chars, size_t length, const JSStringFinalizer *fin); + + + bool isExternal() const ; + JSExternalString &asExternal() const ; + + public: + static inline JSExternalString *new_(JSContext *cx, const jschar *chars, size_t length, + const JSStringFinalizer *fin); + + const JSStringFinalizer *externalFinalizer() const { + do { } while(0); + return d.s.u2.externalFinalizer; + } + + + + inline void finalize(js::FreeOp *fop); +}; + +typedef int moz_static_assert72[(sizeof(JSExternalString) == sizeof(JSString)) ? 1 : -1]; + +class JSUndependedString : public JSFixedString +{ + + + + + +}; + +typedef int moz_static_assert73[(sizeof(JSUndependedString) == sizeof(JSString)) ? 1 : -1]; + +class JSAtom : public JSFixedString +{ + + bool isAtom() const ; + JSAtom &asAtom() const ; + + public: + + inline js::PropertyName *asPropertyName(); + + inline void finalize(js::FreeOp *fop); + + + + +}; + +typedef int moz_static_assert74[(sizeof(JSAtom) == sizeof(JSString)) ? 1 : -1]; + +class JSInlineAtom : public JSInlineString +{ + + + + +}; + +typedef int moz_static_assert75[(sizeof(JSInlineAtom) == sizeof(JSInlineString)) ? 1 : -1]; + +class JSShortAtom : public JSShortString +{ + + + + +}; + +typedef int moz_static_assert76[(sizeof(JSShortAtom) == sizeof(JSShortString)) ? 1 : -1]; + +namespace js { + +class StaticStrings +{ + private: + + static const size_t SMALL_CHAR_LIMIT = 128U; + static const size_t NUM_SMALL_CHARS = 64U; + + static const size_t INT_STATIC_LIMIT = 256U; + + JSAtom *length2StaticTable[NUM_SMALL_CHARS * NUM_SMALL_CHARS]; + JSAtom *intStaticTable[INT_STATIC_LIMIT]; + + public: + + static const size_t UNIT_STATIC_LIMIT = 256U; + JSAtom *unitStaticTable[UNIT_STATIC_LIMIT]; + + StaticStrings() { + PodArrayZero(unitStaticTable); + PodArrayZero(length2StaticTable); + PodArrayZero(intStaticTable); + } + + bool init(JSContext *cx); + void trace(JSTracer *trc); + + static inline bool hasUint(uint32_t u); + inline JSAtom *getUint(uint32_t u); + + static inline bool hasInt(int32_t i); + inline JSAtom *getInt(int32_t i); + + static inline bool hasUnit(jschar c); + JSAtom *getUnit(jschar c); + + + inline JSLinearString *getUnitStringForElement(JSContext *cx, JSString *str, size_t index); + + static bool isStatic(JSAtom *atom); + + + inline JSAtom *lookup(const jschar *chars, size_t length); + + private: + typedef uint8_t SmallChar; + static const SmallChar INVALID_SMALL_CHAR = -1; + + static inline bool fitsInSmallChar(jschar c); + + static const SmallChar toSmallChar[]; + + JSAtom *getLength2(jschar c1, jschar c2); + JSAtom *getLength2(uint32_t u); +}; +# 759 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" +class PropertyName : public JSAtom +{}; + +typedef int moz_static_assert77[(sizeof(PropertyName) == sizeof(JSString)) ? 1 : -1]; + +static __attribute__((always_inline)) inline jsid +NameToId(PropertyName *name) +{ + return NON_INTEGER_ATOM_TO_JSID(name); +} + +typedef HeapPtr HeapPtrAtom; + +} + + + +__attribute__((always_inline)) inline const jschar * +JSString::getChars(JSContext *cx) +{ + if (JSLinearString *str = ensureLinear(cx)) + return str->chars(); + return __null; +} + +__attribute__((always_inline)) inline const jschar * +JSString::getCharsZ(JSContext *cx) +{ + if (JSFlatString *str = ensureFlat(cx)) + return str->chars(); + return __null; +} + +__attribute__((always_inline)) inline JSLinearString * +JSString::ensureLinear(JSContext *cx) +{ + return isLinear() + ? &asLinear() + : asRope().flatten(cx); +} + +__attribute__((always_inline)) inline JSFlatString * +JSString::ensureFlat(JSContext *cx) +{ + return isFlat() + ? &asFlat() + : isDependent() + ? asDependent().undepend(cx) + : asRope().flatten(cx); +} + +__attribute__((always_inline)) inline JSFixedString * +JSString::ensureFixed(JSContext *cx) +{ + if (!ensureFlat(cx)) + return __null; + if (isExtensible()) + d.lengthAndFlags = buildLengthAndFlags(length(), FIXED_FLAGS); + return &asFixed(); +} + +inline js::PropertyName * +JSAtom::asPropertyName() +{ + + + + + return static_cast(this); +} +# 34 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 2 + +namespace js { + +class AutoPropDescArrayRooter; +class BaseProxyHandler; +class CallObject; +struct GCMarker; +struct NativeIterator; + +namespace mjit { class Compiler; } + +inline JSObject * +CastAsObject(PropertyOp op) +{ + return (__extension__ (JSObject *) (size_t) (op)); +} + +inline JSObject * +CastAsObject(StrictPropertyOp op) +{ + return (__extension__ (JSObject *) (size_t) (op)); +} + +inline Value +CastAsObjectJsval(PropertyOp op) +{ + return ObjectOrNullValue(CastAsObject(op)); +} + +inline Value +CastAsObjectJsval(StrictPropertyOp op) +{ + return ObjectOrNullValue(CastAsObject(op)); +} + + + + + + + +#define JS_PSG(name,getter,flags) {name, 0, (flags) | JSPROP_SHARED | JSPROP_NATIVE_ACCESSORS, (JSPropertyOp)getter, NULL} + + +#define JS_PSGS(name,getter,setter,flags) {name, 0, (flags) | JSPROP_SHARED | JSPROP_NATIVE_ACCESSORS, (JSPropertyOp)getter, (JSStrictPropertyOp)setter} + + +#define JS_PS_END {0, 0, 0, 0, 0} + + + +typedef Vector PropDescArray; + + + + + + + +namespace baseops { + + + + + + +extern __attribute__((visibility("default"))) JSBool +LookupProperty(JSContext *cx, HandleObject obj, HandleId id, JSObject **objp, + JSProperty **propp); + +inline bool +LookupProperty(JSContext *cx, HandleObject obj, PropertyName *name, + JSObject **objp, JSProperty **propp) +{ + return LookupProperty(cx, obj, RootedId(cx, NameToId(name)), objp, propp); +} + +extern __attribute__((visibility("default"))) JSBool +LookupElement(JSContext *cx, HandleObject obj, uint32_t index, + JSObject **objp, JSProperty **propp); + +extern JSBool +DefineProperty(JSContext *cx, HandleObject obj, HandleId id, const js::Value *value, + JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs); + +extern JSBool +DefineElement(JSContext *cx, HandleObject obj, uint32_t index, const js::Value *value, + JSPropertyOp getter, JSStrictPropertyOp setter, unsigned attrs); + +extern JSBool +GetProperty(JSContext *cx, HandleObject obj, HandleObject receiver, HandleId id, js::Value *vp); + +extern JSBool +GetElement(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index, js::Value *vp); + +inline JSBool +GetProperty(JSContext *cx, HandleObject obj, HandleId id, js::Value *vp) +{ + return GetProperty(cx, obj, obj, id, vp); +} + +inline JSBool +GetElement(JSContext *cx, HandleObject obj, uint32_t index, js::Value *vp) +{ + return GetElement(cx, obj, obj, index, vp); +} + +extern JSBool +GetPropertyDefault(JSContext *cx, HandleObject obj, HandleId id, const Value &def, Value *vp); + +extern JSBool +SetPropertyHelper(JSContext *cx, HandleObject obj, HandleId id, unsigned defineHow, + Value *vp, JSBool strict); + +inline bool +SetPropertyHelper(JSContext *cx, HandleObject obj, PropertyName *name, unsigned defineHow, + Value *vp, JSBool strict) +{ + return SetPropertyHelper(cx, obj, RootedId(cx, NameToId(name)), defineHow, vp, strict); +} + +extern JSBool +SetElementHelper(JSContext *cx, HandleObject obj, uint32_t index, unsigned defineHow, + Value *vp, JSBool strict); + +extern JSType +TypeOf(JSContext *cx, HandleObject obj); + +extern JSBool +GetAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp); + +extern JSBool +SetAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp); + +extern JSBool +GetElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp); + +extern JSBool +SetElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp); + +extern JSBool +DeleteProperty(JSContext *cx, HandleObject obj, HandlePropertyName name, Value *rval, JSBool strict); + +extern JSBool +DeleteElement(JSContext *cx, HandleObject obj, uint32_t index, Value *rval, JSBool strict); + +extern JSBool +DeleteSpecial(JSContext *cx, HandleObject obj, HandleSpecialId sid, Value *rval, JSBool strict); + +extern JSBool +DeleteGeneric(JSContext *cx, HandleObject obj, HandleId id, Value *rval, JSBool strict); + +} + + +extern JSBool +DefaultValue(JSContext *cx, HandleObject obj, JSType hint, Value *vp); + +extern Class ArrayClass; +extern Class ArrayBufferClass; +extern Class BlockClass; +extern Class BooleanClass; +extern Class CallableObjectClass; +extern Class DataViewClass; +extern Class DateClass; +extern Class ErrorClass; +extern Class ElementIteratorClass; +extern Class GeneratorClass; +extern Class IteratorClass; +extern Class JSONClass; +extern Class MathClass; +extern Class NumberClass; +extern Class NormalArgumentsObjectClass; +extern Class ObjectClass; +extern Class ProxyClass; +extern Class RegExpClass; +extern Class RegExpStaticsClass; +extern Class SlowArrayClass; +extern Class StopIterationClass; +extern Class StringClass; +extern Class StrictArgumentsObjectClass; +extern Class WeakMapClass; +extern Class WithClass; +extern Class XMLFilterClass; + +class ArgumentsObject; +class ArrayBufferObject; +class BlockObject; +class BooleanObject; +class ClonedBlockObject; +class DataViewObject; +class DebugScopeObject; +class DeclEnvObject; +class ElementIteratorObject; +class GlobalObject; +class NestedScopeObject; +class NewObjectCache; +class NormalArgumentsObject; +class NumberObject; +class ScopeObject; +class StaticBlockObject; +class StrictArgumentsObject; +class StringObject; +class RegExpObject; +class WithObject; + +} +# 252 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" +struct JSObject : public js::ObjectImpl +{ + private: + friend struct js::Shape; + friend struct js::GCMarker; + friend class js::NewObjectCache; + + + void makeLazyType(JSContext *cx); + + public: + + + + + bool setLastProperty(JSContext *cx, const js::Shape *shape); + + + inline void setLastPropertyInfallible(const js::Shape *shape); + + + static inline JSObject *create(JSContext *cx, + js::gc::AllocKind kind, + js::HandleShape shape, + js::HandleTypeObject type, + js::HeapSlot *slots); + + + static inline JSObject *createDenseArray(JSContext *cx, + js::gc::AllocKind kind, + js::HandleShape shape, + js::HandleTypeObject type, + uint32_t length); + + + + + + + inline void removeLastProperty(JSContext *cx); + inline bool canRemoveLastProperty(); + + + + + + bool setSlotSpan(JSContext *cx, uint32_t span); + + inline bool nativeContains(JSContext *cx, jsid id); + inline bool nativeContains(JSContext *cx, const js::Shape &shape); + + + static const uint32_t NELEMENTS_LIMIT = ((uint32_t)1 << (28)); + + public: + inline bool setDelegate(JSContext *cx); + + inline bool isBoundFunction() const; + + + + + + + inline bool isSystem() const; + inline bool setSystem(JSContext *cx); + + inline bool hasSpecialEquality() const; + + inline bool watched() const; + inline bool setWatched(JSContext *cx); + + + inline bool isVarObj(); + inline bool setVarObj(JSContext *cx); + + + + + + + + inline bool hasUncacheableProto() const; + inline bool setUncacheableProto(JSContext *cx); + + bool generateOwnShape(JSContext *cx, js::Shape *newShape = __null) { + return replaceWithNewEquivalentShape(cx, lastProperty(), newShape); + } + + private: + js::Shape *replaceWithNewEquivalentShape(JSContext *cx, js::Shape *existingShape, + js::Shape *newShape = __null); + + enum GenerateShape { + GENERATE_NONE, + GENERATE_SHAPE + }; + + bool setFlag(JSContext *cx, uint32_t flag, + GenerateShape generateShape = GENERATE_NONE); + + public: + inline bool nativeEmpty() const; + + bool shadowingShapeChange(JSContext *cx, const js::Shape &shape); + + + inline bool isIndexed() const; + + inline uint32_t propertyCount() const; + + inline bool hasShapeTable() const; + + inline size_t computedSizeOfThisSlotsElements() const; + + inline void sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf, + size_t *slotsSize, size_t *elementsSize, + size_t *miscSize) const; + + static const uint32_t MAX_FIXED_SLOTS = 16; + + public: + + + + + inline bool isFixedSlot(size_t slot); + + + inline size_t dynamicSlotIndex(size_t slot); + + + inline const js::HeapSlot *getRawSlots(); + + + + + + + bool growSlots(JSContext *cx, uint32_t oldCount, uint32_t newCount); + void shrinkSlots(JSContext *cx, uint32_t oldCount, uint32_t newCount); + + bool hasDynamicSlots() const { return slots != __null; } + + protected: + inline bool updateSlotsForSpan(JSContext *cx, size_t oldSpan, size_t newSpan); + + public: + + + + + inline void prepareSlotRangeForOverwrite(size_t start, size_t end); + inline void prepareElementRangeForOverwrite(size_t start, size_t end); + + void rollbackProperties(JSContext *cx, uint32_t slotSpan); + + inline void nativeSetSlot(unsigned slot, const js::Value &value); + inline void nativeSetSlotWithType(JSContext *cx, const js::Shape *shape, const js::Value &value); + + inline const js::Value &getReservedSlot(unsigned index) const; + inline js::HeapSlot &getReservedSlotRef(unsigned index); + inline void initReservedSlot(unsigned index, const js::Value &v); + inline void setReservedSlot(unsigned index, const js::Value &v); + + + + + + inline bool setSingletonType(JSContext *cx); + + inline js::types::TypeObject *getType(JSContext *cx); + + const js::HeapPtr &typeFromGC() const { + + return type_; + } + + inline void setType(js::types::TypeObject *newType); + + js::types::TypeObject *getNewType(JSContext *cx, JSFunction *fun = __null); +# 443 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" + inline bool setIteratedSingleton(JSContext *cx); + + + + + + bool setNewTypeUnknown(JSContext *cx); + + + bool splicePrototype(JSContext *cx, JSObject *proto); + + + + + + bool shouldSplicePrototype(JSContext *cx); +# 487 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" + inline JSObject *getParent() const; + static bool setParent(JSContext *cx, js::HandleObject obj, js::HandleObject newParent); + + + + + + + inline JSObject *enclosingScope(); + + inline js::GlobalObject &global() const; + + + inline JSPrincipals *principals(JSContext *cx); + + + inline bool clearType(JSContext *cx); + bool clearParent(JSContext *cx); + + + + + + private: + enum ImmutabilityType { SEAL, FREEZE }; + + + + + + + + bool sealOrFreeze(JSContext *cx, ImmutabilityType it); + + bool isSealedOrFrozen(JSContext *cx, ImmutabilityType it, bool *resultp); + + static inline unsigned getSealedOrFrozenAttributes(unsigned attrs, ImmutabilityType it); + + public: + bool preventExtensions(JSContext *cx); + + + inline bool seal(JSContext *cx) { return sealOrFreeze(cx, SEAL); } + + bool freeze(JSContext *cx) { return sealOrFreeze(cx, FREEZE); } + + bool isSealed(JSContext *cx, bool *resultp) { return isSealedOrFrozen(cx, SEAL, resultp); } + bool isFrozen(JSContext *cx, bool *resultp) { return isSealedOrFrozen(cx, FREEZE, resultp); } + + + + inline bool ensureElements(JSContext *cx, unsigned cap); + bool growElements(JSContext *cx, unsigned cap); + void shrinkElements(JSContext *cx, unsigned cap); + + inline js::ElementIteratorObject *asElementIterator(); + + + + + + bool allocateSlowArrayElements(JSContext *cx); + + inline uint32_t getArrayLength() const; + inline void setArrayLength(JSContext *cx, uint32_t length); + + inline uint32_t getDenseArrayCapacity(); + inline void setDenseArrayLength(uint32_t length); + inline void setDenseArrayInitializedLength(uint32_t length); + inline void ensureDenseArrayInitializedLength(JSContext *cx, unsigned index, unsigned extra); + inline void setDenseArrayElement(unsigned idx, const js::Value &val); + inline void initDenseArrayElement(unsigned idx, const js::Value &val); + inline void setDenseArrayElementWithType(JSContext *cx, unsigned idx, const js::Value &val); + inline void initDenseArrayElementWithType(JSContext *cx, unsigned idx, const js::Value &val); + inline void copyDenseArrayElements(unsigned dstStart, const js::Value *src, unsigned count); + inline void initDenseArrayElements(unsigned dstStart, const js::Value *src, unsigned count); + inline void moveDenseArrayElements(unsigned dstStart, unsigned srcStart, unsigned count); + inline void moveDenseArrayElementsUnbarriered(unsigned dstStart, unsigned srcStart, unsigned count); + inline bool denseArrayHasInlineSlots() const; + + + inline void markDenseArrayNotPacked(JSContext *cx); +# 577 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" + enum EnsureDenseResult { ED_OK, ED_FAILED, ED_SPARSE }; + inline EnsureDenseResult ensureDenseArrayElements(JSContext *cx, unsigned index, unsigned extra); + + + + + + bool willBeSparseDenseArray(unsigned requiredCapacity, unsigned newElementsHint); + + static bool makeDenseArraySlow(JSContext *cx, js::HandleObject obj); + + + + + + + bool arrayGetOwnDataElement(JSContext *cx, size_t i, js::Value *vp); + + public: + + + + + static const uint32_t JSSLOT_DATE_UTC_TIME = 0; + + + + + + + static const uint32_t JSSLOT_DATE_COMPONENTS_START = 1; + + static const uint32_t JSSLOT_DATE_LOCAL_TIME = 1; + static const uint32_t JSSLOT_DATE_LOCAL_YEAR = 2; + static const uint32_t JSSLOT_DATE_LOCAL_MONTH = 3; + static const uint32_t JSSLOT_DATE_LOCAL_DATE = 4; + static const uint32_t JSSLOT_DATE_LOCAL_DAY = 5; + static const uint32_t JSSLOT_DATE_LOCAL_HOURS = 6; + static const uint32_t JSSLOT_DATE_LOCAL_MINUTES = 7; + static const uint32_t JSSLOT_DATE_LOCAL_SECONDS = 8; + + static const uint32_t DATE_CLASS_RESERVED_SLOTS = 9; + + inline const js::Value &getDateUTCTime() const; + inline void setDateUTCTime(const js::Value &pthis); + + + + + + friend struct JSFunction; + + inline JSFunction *toFunction(); + inline const JSFunction *toFunction() const; + + public: + + + + + static const uint32_t ITER_CLASS_NFIXED_SLOTS = 1; + + inline js::NativeIterator *getNativeIterator() const; + inline void setNativeIterator(js::NativeIterator *); +# 653 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" + private: + static const uint32_t JSSLOT_NAME_PREFIX = 0; + static const uint32_t JSSLOT_NAME_URI = 1; + + static const uint32_t JSSLOT_NAMESPACE_DECLARED = 2; + + static const uint32_t JSSLOT_QNAME_LOCAL_NAME = 2; + + public: + static const uint32_t NAMESPACE_CLASS_RESERVED_SLOTS = 3; + static const uint32_t QNAME_CLASS_RESERVED_SLOTS = 3; + + inline JSLinearString *getNamePrefix() const; + inline jsval getNamePrefixVal() const; + inline void setNamePrefix(JSLinearString *prefix); + inline void clearNamePrefix(); + + inline JSLinearString *getNameURI() const; + inline jsval getNameURIVal() const; + inline void setNameURI(JSLinearString *uri); + + inline jsval getNamespaceDeclared() const; + inline void setNamespaceDeclared(jsval decl); + + inline JSAtom *getQNameLocalName() const; + inline jsval getQNameLocalNameVal() const; + inline void setQNameLocalName(JSAtom *name); + + + + + inline bool isCallable(); + + inline void finish(js::FreeOp *fop); + __attribute__((always_inline)) inline void finalize(js::FreeOp *fop); + + inline bool hasProperty(JSContext *cx, js::HandleId id, bool *foundp, unsigned flags = 0); +# 698 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" + bool allocSlot(JSContext *cx, uint32_t *slotp); + void freeSlot(JSContext *cx, uint32_t slot); + + public: + static bool reportReadOnly(JSContext *cx, jsid id, unsigned report = 0x0); + bool reportNotConfigurable(JSContext* cx, jsid id, unsigned report = 0x0); + bool reportNotExtensible(JSContext *cx, unsigned report = 0x0); + + + + + + + + bool callMethod(JSContext *cx, js::HandleId id, unsigned argc, js::Value *argv, js::Value *vp); + + private: + js::Shape *getChildProperty(JSContext *cx, js::Shape *parent, js::StackShape &child); + + protected: + + + + + + + + js::Shape *addPropertyInternal(JSContext *cx, jsid id, + JSPropertyOp getter, JSStrictPropertyOp setter, + uint32_t slot, unsigned attrs, + unsigned flags, int shortid, js::Shape **spp, + bool allowDictionary); + + private: + bool toDictionaryMode(JSContext *cx); + + struct TradeGutsReserved; + static bool ReserveForTradeGuts(JSContext *cx, JSObject *a, JSObject *b, + TradeGutsReserved &reserved); + + static void TradeGuts(JSContext *cx, JSObject *a, JSObject *b, + TradeGutsReserved &reserved); + + public: + + js::Shape *addProperty(JSContext *cx, jsid id, + JSPropertyOp getter, JSStrictPropertyOp setter, + uint32_t slot, unsigned attrs, + unsigned flags, int shortid, bool allowDictionary = true); + + + js::Shape *addDataProperty(JSContext *cx, jsid id, uint32_t slot, unsigned attrs) { + do { } while(0); + return addProperty(cx, id, __null, __null, slot, attrs, 0, 0); + } + + + js::Shape *putProperty(JSContext *cx, jsid id, + JSPropertyOp getter, JSStrictPropertyOp setter, + uint32_t slot, unsigned attrs, + unsigned flags, int shortid); + inline js::Shape * + putProperty(JSContext *cx, js::PropertyName *name, + JSPropertyOp getter, JSStrictPropertyOp setter, + uint32_t slot, unsigned attrs, unsigned flags, int shortid) { + return putProperty(cx, js::NameToId(name), getter, setter, slot, attrs, flags, shortid); + } + + + js::Shape *changeProperty(JSContext *cx, js::Shape *shape, unsigned attrs, unsigned mask, + JSPropertyOp getter, JSStrictPropertyOp setter); + + inline bool changePropertyAttributes(JSContext *cx, js::Shape *shape, unsigned attrs); + + + bool removeProperty(JSContext *cx, jsid id); + + + void clear(JSContext *cx); + + inline JSBool lookupGeneric(JSContext *cx, js::HandleId id, JSObject **objp, JSProperty **propp); + inline JSBool lookupProperty(JSContext *cx, js::PropertyName *name, JSObject **objp, JSProperty **propp); + inline JSBool lookupElement(JSContext *cx, uint32_t index, + JSObject **objp, JSProperty **propp); + inline JSBool lookupSpecial(JSContext *cx, js::SpecialId sid, + JSObject **objp, JSProperty **propp); + + inline JSBool defineGeneric(JSContext *cx, js::HandleId id, const js::Value &value, + JSPropertyOp getter = JS_PropertyStub, + JSStrictPropertyOp setter = JS_StrictPropertyStub, + unsigned attrs = 0x01); + inline JSBool defineProperty(JSContext *cx, js::PropertyName *name, const js::Value &value, + JSPropertyOp getter = JS_PropertyStub, + JSStrictPropertyOp setter = JS_StrictPropertyStub, + unsigned attrs = 0x01); + + inline JSBool defineElement(JSContext *cx, uint32_t index, const js::Value &value, + JSPropertyOp getter = JS_PropertyStub, + JSStrictPropertyOp setter = JS_StrictPropertyStub, + unsigned attrs = 0x01); + inline JSBool defineSpecial(JSContext *cx, js::SpecialId sid, const js::Value &value, + JSPropertyOp getter = JS_PropertyStub, + JSStrictPropertyOp setter = JS_StrictPropertyStub, + unsigned attrs = 0x01); + + inline JSBool getGeneric(JSContext *cx, js::HandleObject receiver, js::HandleId id, js::Value *vp); + inline JSBool getProperty(JSContext *cx, js::HandleObject receiver, js::PropertyName *name, + js::Value *vp); + inline JSBool getElement(JSContext *cx, js::HandleObject receiver, uint32_t index, js::Value *vp); + + + inline JSBool getElementIfPresent(JSContext *cx, js::HandleObject receiver, uint32_t index, + js::Value *vp, bool *present); + inline JSBool getSpecial(JSContext *cx, js::HandleObject receiver, js::SpecialId sid, js::Value *vp); + + inline JSBool getGeneric(JSContext *cx, js::HandleId id, js::Value *vp); + inline JSBool getProperty(JSContext *cx, js::PropertyName *name, js::Value *vp); + inline JSBool getElement(JSContext *cx, uint32_t index, js::Value *vp); + inline JSBool getSpecial(JSContext *cx, js::SpecialId sid, js::Value *vp); + + inline JSBool setGeneric(JSContext *cx, js::HandleId id, js::Value *vp, JSBool strict); + inline JSBool setProperty(JSContext *cx, js::PropertyName *name, js::Value *vp, JSBool strict); + inline JSBool setElement(JSContext *cx, uint32_t index, js::Value *vp, JSBool strict); + inline JSBool setSpecial(JSContext *cx, js::SpecialId sid, js::Value *vp, JSBool strict); + + JSBool nonNativeSetProperty(JSContext *cx, js::HandleId id, js::Value *vp, JSBool strict); + JSBool nonNativeSetElement(JSContext *cx, uint32_t index, js::Value *vp, JSBool strict); + + inline JSBool getGenericAttributes(JSContext *cx, js::HandleId id, unsigned *attrsp); + inline JSBool getPropertyAttributes(JSContext *cx, js::PropertyName *name, unsigned *attrsp); + inline JSBool getElementAttributes(JSContext *cx, uint32_t index, unsigned *attrsp); + inline JSBool getSpecialAttributes(JSContext *cx, js::SpecialId sid, unsigned *attrsp); + + inline JSBool setGenericAttributes(JSContext *cx, js::HandleId id, unsigned *attrsp); + inline JSBool setPropertyAttributes(JSContext *cx, js::PropertyName *name, unsigned *attrsp); + inline JSBool setElementAttributes(JSContext *cx, uint32_t index, unsigned *attrsp); + inline JSBool setSpecialAttributes(JSContext *cx, js::SpecialId sid, unsigned *attrsp); + + inline bool deleteProperty(JSContext *cx, js::HandlePropertyName name, js::Value *rval, bool strict); + inline bool deleteElement(JSContext *cx, uint32_t index, js::Value *rval, bool strict); + inline bool deleteSpecial(JSContext *cx, js::HandleSpecialId sid, js::Value *rval, bool strict); + bool deleteByValue(JSContext *cx, const js::Value &property, js::Value *rval, bool strict); + + inline bool enumerate(JSContext *cx, JSIterateOp iterop, js::Value *statep, jsid *idp); + inline bool defaultValue(JSContext *cx, JSType hint, js::Value *vp); + inline JSType typeOf(JSContext *cx); + inline JSObject *thisObject(JSContext *cx); + + static bool thisObject(JSContext *cx, const js::Value &v, js::Value *vp); + + bool swap(JSContext *cx, JSObject *other); + + inline void initArrayClass(); +# 881 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" + inline bool isArguments() const; + inline bool isArrayBuffer() const; + inline bool isDataView() const; + inline bool isDate() const; + inline bool isElementIterator() const; + inline bool isError() const; + inline bool isFunction() const; + inline bool isGenerator() const; + inline bool isGlobal() const; + inline bool isIterator() const; + inline bool isObject() const; + inline bool isPrimitive() const; + inline bool isProxy() const; + inline bool isRegExp() const; + inline bool isRegExpStatics() const; + inline bool isScope() const; + inline bool isScript() const; + inline bool isStopIteration() const; + inline bool isTypedArray() const; + inline bool isWeakMap() const; + + inline bool isNamespace() const; + inline bool isQName() const; + inline bool isXML() const; + inline bool isXMLId() const; + + + + inline bool isBlock() const; + inline bool isCall() const; + inline bool isDeclEnv() const; + inline bool isNestedScope() const; + inline bool isWith() const; + inline bool isClonedBlock() const; + inline bool isStaticBlock() const; + + + inline bool isBoolean() const; + inline bool isNumber() const; + inline bool isString() const; + + + inline bool isNormalArguments() const; + inline bool isStrictArguments() const; + + + inline bool isDebugScope() const; + inline bool isWrapper() const; + inline bool isFunctionProxy() const; + inline bool isCrossCompartmentWrapper() const; + + inline js::ArgumentsObject &asArguments(); + inline js::ArrayBufferObject &asArrayBuffer(); + inline const js::ArgumentsObject &asArguments() const; + inline js::BlockObject &asBlock(); + inline js::BooleanObject &asBoolean(); + inline js::CallObject &asCall(); + inline js::ClonedBlockObject &asClonedBlock(); + inline js::DataViewObject &asDataView(); + inline js::DeclEnvObject &asDeclEnv(); + inline js::DebugScopeObject &asDebugScope(); + inline js::GlobalObject &asGlobal(); + inline js::NestedScopeObject &asNestedScope(); + inline js::NormalArgumentsObject &asNormalArguments(); + inline js::NumberObject &asNumber(); + inline js::RegExpObject &asRegExp(); + inline js::ScopeObject &asScope(); + inline js::StrictArgumentsObject &asStrictArguments(); + inline js::StaticBlockObject &asStaticBlock(); + inline js::StringObject &asString(); + inline js::WithObject &asWith(); + + static inline js::ThingRootKind rootKind() { return js::THING_ROOT_OBJECT; } + + + + + + private: + static void staticAsserts() { + typedef int + moz_static_assert78 +# 961 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" + [(sizeof(JSObject) == sizeof(js::shadow::Object)) ? 1 : -1] + ; + typedef int + moz_static_assert79 +# 963 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" + [(sizeof(JSObject) == sizeof(js::ObjectImpl)) ? 1 : -1] + ; + typedef int + moz_static_assert80 +# 965 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" + [(sizeof(JSObject) % sizeof(js::Value) == 0) ? 1 : -1] + ; + } + + JSObject() ; + JSObject(const JSObject &other) ; + void operator=(const JSObject &other) ; +}; + + + + + + +static __attribute__((always_inline)) inline bool +operator==(const JSObject &lhs, const JSObject &rhs) +{ + return &lhs == &rhs; +} + +static __attribute__((always_inline)) inline bool +operator!=(const JSObject &lhs, const JSObject &rhs) +{ + return &lhs != &rhs; +} + +struct JSObject_Slots2 : JSObject { js::Value fslots[2]; }; +struct JSObject_Slots4 : JSObject { js::Value fslots[4]; }; +struct JSObject_Slots8 : JSObject { js::Value fslots[8]; }; +struct JSObject_Slots12 : JSObject { js::Value fslots[12]; }; +struct JSObject_Slots16 : JSObject { js::Value fslots[16]; }; + +#define JSSLOT_FREE(clasp) JSCLASS_RESERVED_SLOTS(clasp) + +class JSValueArray { + public: + jsval *array; + size_t length; + + JSValueArray(jsval *v, size_t c) : array(v), length(c) {} +}; + +class ValueArray { + public: + js::Value *array; + size_t length; + + ValueArray(js::Value *v, size_t c) : array(v), length(c) {} +}; + + +extern bool +js_EnterSharpObject(JSContext *cx, js::HandleObject obj, JSIdArray **idap, bool *alreadySeen, bool *isSharp); + +extern void +js_LeaveSharpObject(JSContext *cx, JSIdArray **idap); + + + + + +extern void +js_TraceSharpMap(JSTracer *trc, JSSharpObjectMap *map); + +extern JSBool +js_HasOwnPropertyHelper(JSContext *cx, js::LookupGenericOp lookup, unsigned argc, + js::Value *vp); + +extern JSBool +js_HasOwnProperty(JSContext *cx, js::LookupGenericOp lookup, js::HandleObject obj, js::HandleId id, + JSObject **objp, JSProperty **propp); + +extern JSBool +js_PropertyIsEnumerable(JSContext *cx, js::HandleObject obj, js::HandleId id, js::Value *vp); + + +extern JSPropertySpec object_props[]; + + + + +extern JSFunctionSpec object_methods[]; +extern JSFunctionSpec object_static_methods[]; + +namespace js { + +bool +IsStandardClassResolved(JSObject *obj, js::Class *clasp); + +void +MarkStandardClassInitializedNoProto(JSObject *obj, js::Class *clasp); + +} + + + + +extern const char js_watch_str[]; +extern const char js_unwatch_str[]; +extern const char js_hasOwnProperty_str[]; +extern const char js_isPrototypeOf_str[]; +extern const char js_propertyIsEnumerable_str[]; + + +extern const char js_defineGetter_str[]; +extern const char js_defineSetter_str[]; +extern const char js_lookupGetter_str[]; +extern const char js_lookupSetter_str[]; + + +extern JSBool +js_PopulateObject(JSContext *cx, js::HandleObject newborn, JSObject *props); + + + + +extern JSBool +js_GetClassObject(JSContext *cx, JSObject *obj, JSProtoKey key, + JSObject **objp); + + + + + +extern JSProtoKey +js_IdentifyClassPrototype(JSObject *obj); + + + + + +extern JSBool +js_FindClassObject(JSContext *cx, JSObject *start, JSProtoKey key, + js::Value *vp, js::Class *clasp = __null); + + + +extern JSObject * +js_CreateThisForFunctionWithProto(JSContext *cx, js::HandleObject callee, JSObject *proto); + + +extern JSObject * +js_CreateThisForFunction(JSContext *cx, js::HandleObject callee, bool newType); + + +extern JSObject * +js_CreateThis(JSContext *cx, js::Class *clasp, JSObject *callee); + + + + + +extern js::Shape * +js_AddNativeProperty(JSContext *cx, js::HandleObject obj, jsid id, + JSPropertyOp getter, JSStrictPropertyOp setter, uint32_t slot, + unsigned attrs, unsigned flags, int shortid); + +extern JSBool +js_DefineOwnProperty(JSContext *cx, js::HandleObject obj, js::HandleId id, + const js::Value &descriptor, JSBool *bp); + +namespace js { + + + + +const unsigned DNP_CACHE_RESULT = 1; +const unsigned DNP_DONT_PURGE = 2; +const unsigned DNP_UNQUALIFIED = 4; + + +const unsigned DNP_SKIP_TYPE = 8; + + + + +extern const Shape * +DefineNativeProperty(JSContext *cx, HandleObject obj, HandleId id, const Value &value, + PropertyOp getter, StrictPropertyOp setter, unsigned attrs, + unsigned flags, int shortid, unsigned defineHow = 0); + +inline const Shape * +DefineNativeProperty(JSContext *cx, HandleObject obj, PropertyName *name, const Value &value, + PropertyOp getter, StrictPropertyOp setter, unsigned attrs, + unsigned flags, int shortid, unsigned defineHow = 0) +{ + return DefineNativeProperty(cx, obj, RootedId(cx, NameToId(name)), + value, getter, setter, attrs, flags, + shortid, defineHow); +} + + + + +extern bool +LookupPropertyWithFlags(JSContext *cx, HandleObject obj, HandleId id, unsigned flags, + JSObject **objp, JSProperty **propp); + +inline bool +LookupPropertyWithFlags(JSContext *cx, HandleObject obj, PropertyName *name, unsigned flags, + JSObject **objp, JSProperty **propp) +{ + return LookupPropertyWithFlags(cx, obj, RootedId(cx, NameToId(name)), flags, objp, propp); +} +# 1178 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" +extern bool +DefineProperty(JSContext *cx, js::HandleObject obj, + js::HandleId id, const PropDesc &desc, bool throwError, + bool *rval); + + + + + +extern bool +ReadPropertyDescriptors(JSContext *cx, JSObject *props, bool checkAccessors, + AutoIdVector *ids, AutoPropDescArrayRooter *descs); + + + + + +static const unsigned RESOLVE_INFER = 0xffff; + + + + +extern bool +FindPropertyHelper(JSContext *cx, HandlePropertyName name, + bool cacheResult, HandleObject scopeChain, + JSObject **objp, JSObject **pobjp, JSProperty **propp); + + + + + +extern bool +FindProperty(JSContext *cx, HandlePropertyName name, HandleObject scopeChain, + JSObject **objp, JSObject **pobjp, JSProperty **propp); + +extern JSObject * +FindIdentifierBase(JSContext *cx, HandleObject scopeChain, HandlePropertyName name); + +} + +extern JSObject * +js_FindVariableScope(JSContext *cx, JSFunction **funp); + + +const unsigned JSGET_CACHE_RESULT = 1; + + + + + + + +extern JSBool +js_NativeGet(JSContext *cx, JSObject *obj, JSObject *pobj, const js::Shape *shape, unsigned getHow, + js::Value *vp); + +extern JSBool +js_NativeSet(JSContext *cx, JSObject *obj, const js::Shape *shape, bool added, + bool strict, js::Value *vp); + +namespace js { + +bool +GetPropertyHelper(JSContext *cx, HandleObject obj, jsid id, uint32_t getHow, Value *vp); + +inline bool +GetPropertyHelper(JSContext *cx, HandleObject obj, PropertyName *name, uint32_t getHow, Value *vp) +{ + return GetPropertyHelper(cx, obj, NameToId(name), getHow, vp); +} + +bool +GetOwnPropertyDescriptor(JSContext *cx, HandleObject obj, HandleId id, PropertyDescriptor *desc); + +bool +GetOwnPropertyDescriptor(JSContext *cx, HandleObject obj, HandleId id, Value *vp); + +bool +NewPropertyDescriptorObject(JSContext *cx, const PropertyDescriptor *desc, Value *vp); + +extern JSBool +GetMethod(JSContext *cx, HandleObject obj, HandleId id, unsigned getHow, Value *vp); + +inline bool +GetMethod(JSContext *cx, HandleObject obj, PropertyName *name, unsigned getHow, Value *vp) +{ + return GetMethod(cx, obj, RootedId(cx, NameToId(name)), getHow, vp); +} + + + + + +extern bool +HasDataProperty(JSContext *cx, HandleObject obj, jsid id, Value *vp); + +inline bool +HasDataProperty(JSContext *cx, HandleObject obj, PropertyName *name, Value *vp) +{ + return HasDataProperty(cx, obj, NameToId(name), vp); +} + +extern JSBool +CheckAccess(JSContext *cx, JSObject *obj, HandleId id, JSAccessMode mode, + js::Value *vp, unsigned *attrsp); + +} + +extern bool +js_IsDelegate(JSContext *cx, JSObject *obj, const js::Value &v); + + + + + +extern JSBool +js_PrimitiveToObject(JSContext *cx, js::Value *vp); + +extern JSBool +js_ValueToObjectOrNull(JSContext *cx, const js::Value &v, JSObject **objp); + + +extern JSObject * +js_ValueToNonNullObject(JSContext *cx, const js::Value &v); + +namespace js { + + + + + +extern JSObject * +ToObjectSlow(JSContext *cx, Value *vp); + +__attribute__((always_inline)) inline JSObject * +ToObject(JSContext *cx, Value *vp) +{ + if (vp->isObject()) + return &vp->toObject(); + return ToObjectSlow(cx, vp); +} + + +inline JSObject * +ValueToObject(JSContext *cx, const Value &v) +{ + if (v.isObject()) + return &v.toObject(); + return js_ValueToNonNullObject(cx, v); +} + +} + +extern void +js_GetObjectSlotName(JSTracer *trc, char *buf, size_t bufsize); + +extern bool +js_ClearNative(JSContext *cx, JSObject *obj); + +extern JSBool +js_ReportGetterOnlyAssignment(JSContext *cx); + +extern unsigned +js_InferFlags(JSContext *cx, unsigned defaultFlags); + + +JSBool +js_Object(JSContext *cx, unsigned argc, js::Value *vp); +# 1354 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" +extern __attribute__((visibility("default"))) JSBool +js_GetClassPrototype(JSContext *cx, JSObject *scope, JSProtoKey protoKey, + JSObject **protop, js::Class *clasp = __null); + +namespace js { + +extern bool +SetProto(JSContext *cx, HandleObject obj, HandleObject proto, bool checkForCycles); + +extern JSString * +obj_toStringHelper(JSContext *cx, JSObject *obj); + +extern JSBool +eval(JSContext *cx, unsigned argc, Value *vp); + + + + + + +extern bool +DirectEval(JSContext *cx, const CallArgs &args); + + + + + +extern bool +IsBuiltinEvalForScope(JSObject *scopeChain, const js::Value &v); + + +extern bool +IsAnyBuiltinEval(JSFunction *fun); + + +extern JSPrincipals * +PrincipalsForCompiledCode(const CallReceiver &call, JSContext *cx); + +extern JSObject * +NonNullObject(JSContext *cx, const Value &v); + +extern const char * +InformalValueTypeName(const Value &v); + +inline void +DestroyIdArray(FreeOp *fop, JSIdArray *ida); + +extern bool +GetFirstArgumentAsObject(JSContext *cx, unsigned argc, Value *vp, const char *method, JSObject **objp); + + +extern bool +Throw(JSContext *cx, jsid id, unsigned errorNumber); + +extern bool +Throw(JSContext *cx, JSObject *obj, unsigned errorNumber); +# 1424 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" +extern bool +CheckDefineProperty(JSContext *cx, HandleObject obj, HandleId id, HandleValue value, + PropertyOp getter, StrictPropertyOp setter, unsigned attrs); + +} +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspropertytree.h" 1 + + + + + + + +#define jspropertytree_h___ + + + + + +namespace js { + +struct ShapeHasher { + typedef js::Shape *Key; + typedef js::StackShape Lookup; + + static inline HashNumber hash(const Lookup &l); + static inline bool match(Key k, const Lookup &l); +}; + +typedef HashSet KidsHash; + +class KidsPointer { + private: + enum { + SHAPE = 0, + HASH = 1, + TAG = 1 + }; + + uintptr_t w; + + public: + bool isNull() const { return !w; } + void setNull() { w = 0; } + + bool isShape() const { return (w & TAG) == SHAPE && !isNull(); } + js::Shape *toShape() const { + do { } while(0); + return reinterpret_cast(w & ~uintptr_t(TAG)); + } + void setShape(js::Shape *shape) { + do { } while(0); + do { } while(0); + w = reinterpret_cast(shape) | SHAPE; + } + + bool isHash() const { return (w & TAG) == HASH; } + KidsHash *toHash() const { + do { } while(0); + return reinterpret_cast(w & ~uintptr_t(TAG)); + } + void setHash(KidsHash *hash) { + do { } while(0); + do { } while(0); + w = reinterpret_cast(hash) | HASH; + } + + + + +}; + +class PropertyTree +{ + friend struct ::JSFunction; + + JSCompartment *compartment; + + bool insertChild(JSContext *cx, js::Shape *parent, js::Shape *child); + + PropertyTree(); + + public: + enum { MAX_HEIGHT = 128 }; + + PropertyTree(JSCompartment *comp) + : compartment(comp) + { + } + + js::Shape *newShape(JSContext *cx); + js::Shape *getChild(JSContext *cx, Shape *parent, uint32_t nfixed, const StackShape &child); + + + + + +}; + +} +# 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" 2 +# 98 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" +namespace js { + + +static const uint32_t SHAPE_INVALID_SLOT = ((uint32_t)1 << (24)) - 1; +static const uint32_t SHAPE_MAXIMUM_SLOT = ((uint32_t)1 << (24)) - 2; + + + + + +struct ShapeTable { + static const uint32_t HASH_BITS = tl::BitSize::result; + static const uint32_t MIN_ENTRIES = 7; + static const uint32_t MIN_SIZE_LOG2 = 4; + static const uint32_t MIN_SIZE = ((uint32_t)1 << (MIN_SIZE_LOG2)); + + int hashShift; + + uint32_t entryCount; + uint32_t removedCount; + uint32_t freelist; + + + js::Shape **entries; + + ShapeTable(uint32_t nentries) + : hashShift(HASH_BITS - MIN_SIZE_LOG2), + entryCount(nentries), + removedCount(0), + freelist(SHAPE_INVALID_SLOT) + { + + } + + ~ShapeTable() { + js::UnwantedForeground::free_(entries); + } + + + uint32_t capacity() const { return ((uint32_t)1 << (HASH_BITS - hashShift)); } + + + static size_t sizeOfEntries(size_t cap) { return cap * sizeof(Shape *); } + + + + + + size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const { + return mallocSizeOf(this) + mallocSizeOf(entries); + } + + + bool needsToGrow() const { + uint32_t size = capacity(); + return entryCount + removedCount >= size - (size >> 2); + } + + + + + + + bool grow(JSContext *cx); + + + + + + + bool init(JSRuntime *rt, js::Shape *lastProp); + bool change(int log2Delta, JSContext *cx); + js::Shape **search(jsid id, bool adding); +}; + +} + +struct JSObject; + +namespace js { + +class PropertyTree; + + + + +#define JSPROP_SHADOWABLE JSPROP_INDEX +# 234 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" +class UnownedBaseShape; + +class BaseShape : public js::gc::Cell +{ + public: + friend struct Shape; + friend struct StackBaseShape; + friend struct StackShape; + + enum Flag { + + OWNED_SHAPE = 0x1, + + + HAS_GETTER_OBJECT = 0x2, + HAS_SETTER_OBJECT = 0x4, + + + + + + + + EXTENSIBLE_PARENTS = 0x8, + DELEGATE = 0x10, + SYSTEM = 0x20, + NOT_EXTENSIBLE = 0x40, + INDEXED = 0x80, + BOUND_FUNCTION = 0x100, + VAROBJ = 0x200, + WATCHED = 0x400, + ITERATED_SINGLETON = 0x800, + NEW_TYPE_UNKNOWN = 0x1000, + UNCACHEABLE_PROTO = 0x2000, + + OBJECT_FLAG_MASK = 0x3ff8 + }; + + private: + Class *clasp; + HeapPtrObject parent; + uint32_t flags; + uint32_t slotSpan_; + + + union { + js::PropertyOp rawGetter; + JSObject *getterObj; + + }; + + union { + js::StrictPropertyOp rawSetter; + JSObject *setterObj; + + }; + + + HeapPtr unowned_; + + + ShapeTable *table_; + + BaseShape(const BaseShape &base) ; + + public: + void finalize(FreeOp *fop); + + inline BaseShape(Class *clasp, JSObject *parent, uint32_t objectFlags); + inline BaseShape(Class *clasp, JSObject *parent, uint32_t objectFlags, + uint8_t attrs, PropertyOp rawGetter, StrictPropertyOp rawSetter); + inline BaseShape(const StackBaseShape &base); + + + ~BaseShape(); + + inline BaseShape &operator=(const BaseShape &other); + + bool isOwned() const { return !!(flags & OWNED_SHAPE); } + + inline bool matchesGetterSetter(PropertyOp rawGetter, + StrictPropertyOp rawSetter) const; + + inline void adoptUnowned(UnownedBaseShape *other); + inline void setOwned(UnownedBaseShape *unowned); + + JSObject *getObjectParent() const { return parent; } + uint32_t getObjectFlags() const { return flags & OBJECT_FLAG_MASK; } + + bool hasGetterObject() const { return !!(flags & HAS_GETTER_OBJECT); } + JSObject *getterObject() const { do { } while(0); return getterObj; } + + bool hasSetterObject() const { return !!(flags & HAS_SETTER_OBJECT); } + JSObject *setterObject() const { do { } while(0); return setterObj; } + + bool hasTable() const { do { } while (0); return table_ != __null; } + ShapeTable &table() const { do { } while(0); return *table_; } + void setTable(ShapeTable *table) { do { } while(0); table_ = table; } + + uint32_t slotSpan() const { do { } while(0); return slotSpan_; } + void setSlotSpan(uint32_t slotSpan) { do { } while(0); slotSpan_ = slotSpan; } + + + static UnownedBaseShape *getUnowned(JSContext *cx, const StackBaseShape &base); + + + inline UnownedBaseShape *unowned(); + + + inline UnownedBaseShape *baseUnowned(); + + + inline UnownedBaseShape *toUnowned(); + + + inline void assertConsistency(); + + + static inline size_t offsetOfClass() { return __builtin_offsetof (BaseShape, clasp); } + static inline size_t offsetOfParent() { return __builtin_offsetof (BaseShape, parent); } + static inline size_t offsetOfFlags() { return __builtin_offsetof (BaseShape, flags); } + + static inline void writeBarrierPre(BaseShape *shape); + static inline void writeBarrierPost(BaseShape *shape, void *addr); + static inline void readBarrier(BaseShape *shape); + + static inline ThingRootKind rootKind() { return THING_ROOT_BASE_SHAPE; } + + inline void markChildren(JSTracer *trc); + + private: + static void staticAsserts() { + typedef int moz_static_assert81[(__builtin_offsetof (BaseShape, clasp) == __builtin_offsetof (js::shadow::BaseShape, clasp)) ? 1 : -1]; + } +}; + +class UnownedBaseShape : public BaseShape {}; + +UnownedBaseShape * +BaseShape::unowned() +{ + return isOwned() ? baseUnowned() : toUnowned(); +} + +UnownedBaseShape * +BaseShape::toUnowned() +{ + do { } while(0); return static_cast(this); +} + +UnownedBaseShape * +BaseShape::baseUnowned() +{ + do { } while(0); return unowned_; +} + + +struct StackBaseShape +{ + typedef const StackBaseShape *Lookup; + + uint32_t flags; + Class *clasp; + JSObject *parent; + PropertyOp rawGetter; + StrictPropertyOp rawSetter; + + StackBaseShape(BaseShape *base) + : flags(base->flags & BaseShape::OBJECT_FLAG_MASK), + clasp(base->clasp), + parent(base->parent), + rawGetter(__null), + rawSetter(__null) + {} + + StackBaseShape(Class *clasp, JSObject *parent, uint32_t objectFlags) + : flags(objectFlags), + clasp(clasp), + parent(parent), + rawGetter(__null), + rawSetter(__null) + {} + + inline StackBaseShape(Shape *shape); + + inline void updateGetterSetter(uint8_t attrs, + PropertyOp rawGetter, + StrictPropertyOp rawSetter); + + static inline HashNumber hash(const StackBaseShape *lookup); + static inline bool match(UnownedBaseShape *key, const StackBaseShape *lookup); + + class AutoRooter : private AutoGCRooter + { + public: + explicit AutoRooter(JSContext *cx, const StackBaseShape *base_ + ) + : AutoGCRooter(cx, STACKBASESHAPE), base(base_), skip(cx, base_) + { + do { } while (0); + } + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + const StackBaseShape *base; + SkipRoot skip; + + }; +}; + +typedef HashSet, + StackBaseShape, + SystemAllocPolicy> BaseShapeSet; + +struct Shape : public js::gc::Cell +{ + friend struct ::JSObject; + friend struct ::JSFunction; + friend class js::Bindings; + friend class js::ObjectImpl; + friend class js::PropertyTree; + friend class js::StaticBlockObject; + friend struct js::StackShape; + friend struct js::StackBaseShape; + + protected: + HeapPtrBaseShape base_; + HeapId propid_; + + enum SlotInfo + { + + FIXED_SLOTS_MAX = 0x1f, + FIXED_SLOTS_SHIFT = 27, + FIXED_SLOTS_MASK = uint32_t(FIXED_SLOTS_MAX << FIXED_SLOTS_SHIFT), + + + + + + + + LINEAR_SEARCHES_MAX = 0x7, + LINEAR_SEARCHES_SHIFT = 24, + LINEAR_SEARCHES_MASK = LINEAR_SEARCHES_MAX << LINEAR_SEARCHES_SHIFT, + + + + + + + + SLOT_MASK = ((uint32_t)1 << (24)) - 1 + } __attribute__((packed)); + + uint32_t slotInfo; + uint8_t attrs; + uint8_t flags; + int16_t shortid_; + + HeapPtrShape parent; + + union { + KidsPointer kids; + + HeapPtrShape *listp; + + + + }; + + static inline Shape *search(JSContext *cx, Shape *start, jsid id, + Shape ***pspp, bool adding = false); + + + + + + inline void removeFromDictionary(JSObject *obj); + inline void insertIntoDictionary(HeapPtrShape *dictp); + + inline void initDictionaryShape(const StackShape &child, uint32_t nfixed, + HeapPtrShape *dictp); + + Shape *getChildBinding(JSContext *cx, const StackShape &child); + + + static Shape *replaceLastProperty(JSContext *cx, const StackBaseShape &base, + JSObject *proto, Shape *shape); + + bool hashify(JSContext *cx); + void handoffTableTo(Shape *newShape); + + inline void setParent(js::Shape *p); + + bool ensureOwnBaseShape(JSContext *cx) { + if (base()->isOwned()) + return true; + return makeOwnBaseShape(cx); + } + + bool makeOwnBaseShape(JSContext *cx); + + public: + bool hasTable() const { return base()->hasTable(); } + js::ShapeTable &table() const { return base()->table(); } + + void sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf, + size_t *propTableSize, size_t *kidsSize) const { + *propTableSize = hasTable() ? table().sizeOfIncludingThis(mallocSizeOf) : 0; + *kidsSize = !inDictionary() && kids.isHash() + ? kids.toHash()->sizeOfIncludingThis(mallocSizeOf) + : 0; + } + + bool isNative() const { + do { } while(0); + return !(flags & NON_NATIVE); + } + + const HeapPtrShape &previous() const { + return parent; + } + + class Range { + protected: + friend struct Shape; + const Shape *cursor; + + public: + Range(const Shape *shape) : cursor(shape) { } + + bool empty() const { + return cursor->isEmptyShape(); + } + + const Shape &front() const { + do { } while(0); + return *cursor; + } + + void popFront() { + do { } while(0); + cursor = cursor->parent; + } + + class AutoRooter : private AutoGCRooter + { + public: + explicit AutoRooter(JSContext *cx, Range *r_ + ) + : AutoGCRooter(cx, SHAPERANGE), r(r_), skip(cx, r_) + { + do { } while (0); + } + + friend void AutoGCRooter::trace(JSTracer *trc); + void trace(JSTracer *trc); + + private: + Range *r; + SkipRoot skip; + + }; + }; + + Range all() const { + return Range(this); + } + + Class *getObjectClass() const { return base()->clasp; } + JSObject *getObjectParent() const { return base()->parent; } + + static Shape *setObjectParent(JSContext *cx, JSObject *obj, JSObject *proto, Shape *last); + static Shape *setObjectFlag(JSContext *cx, BaseShape::Flag flag, JSObject *proto, Shape *last); + + uint32_t getObjectFlags() const { return base()->getObjectFlags(); } + bool hasObjectFlag(BaseShape::Flag flag) const { + do { } while(0); + return !!(base()->flags & flag); + } + + protected: + + + + + + enum { + + NON_NATIVE = 0x01, + + + IN_DICTIONARY = 0x02, + + UNUSED_BITS = 0x3C + }; + + + Shape(const StackShape &other, uint32_t nfixed); + + + Shape(UnownedBaseShape *base, uint32_t nfixed); + + + Shape(const Shape &other) ; + + + + + + + + bool hasMissingSlot() const { return maybeSlot() == SHAPE_INVALID_SLOT; } + + public: + + enum { + HAS_SHORTID = 0x40, + PUBLIC_FLAGS = HAS_SHORTID + }; + + bool inDictionary() const { return (flags & IN_DICTIONARY) != 0; } + unsigned getFlags() const { return flags & PUBLIC_FLAGS; } + bool hasShortID() const { return (flags & HAS_SHORTID) != 0; } + + PropertyOp getter() const { return base()->rawGetter; } + bool hasDefaultGetter() const { return !base()->rawGetter; } + PropertyOp getterOp() const { do { } while(0); return base()->rawGetter; } + JSObject *getterObject() const { do { } while(0); return base()->getterObj; } + + + Value getterValue() const { + do { } while(0); + return base()->getterObj ? js::ObjectValue(*base()->getterObj) : js::UndefinedValue(); + } + + Value getterOrUndefined() const { + return (hasGetterValue() && base()->getterObj) + ? ObjectValue(*base()->getterObj) + : UndefinedValue(); + } + + StrictPropertyOp setter() const { return base()->rawSetter; } + bool hasDefaultSetter() const { return !base()->rawSetter; } + StrictPropertyOp setterOp() const { do { } while(0); return base()->rawSetter; } + JSObject *setterObject() const { do { } while(0); return base()->setterObj; } + + + Value setterValue() const { + do { } while(0); + return base()->setterObj ? js::ObjectValue(*base()->setterObj) : js::UndefinedValue(); + } + + Value setterOrUndefined() const { + return (hasSetterValue() && base()->setterObj) + ? ObjectValue(*base()->setterObj) + : UndefinedValue(); + } + + void update(js::PropertyOp getter, js::StrictPropertyOp setter, uint8_t attrs); + + inline bool matches(const Shape *other) const; + inline bool matches(const StackShape &other) const; + inline bool matchesParamsAfterId(BaseShape *base, + uint32_t aslot, unsigned aattrs, unsigned aflags, + int ashortid) const; + + bool get(JSContext* cx, HandleObject receiver, JSObject *obj, JSObject *pobj, js::Value* vp) const; + bool set(JSContext* cx, HandleObject obj, bool strict, js::Value* vp) const; + + BaseShape *base() const { return base_; } + + bool hasSlot() const { return (attrs & 0x40) == 0; } + uint32_t slot() const { do { } while(0); return maybeSlot(); } + uint32_t maybeSlot() const { return slotInfo & SLOT_MASK; } + + bool isEmptyShape() const { + do { } while (0); + return JSID_IS_EMPTY(propid_); + } + + uint32_t slotSpan() const { + do { } while(0); + uint32_t free = (((getObjectClass())->flags >> 8) & (((uint32_t)1 << (8)) - 1)); + return hasMissingSlot() ? free : Max(free, maybeSlot() + 1); + } + + void setSlot(uint32_t slot) { + do { } while(0); + slotInfo = slotInfo & ~Shape::SLOT_MASK; + slotInfo = slotInfo | slot; + } + + uint32_t numFixedSlots() const { + return (slotInfo >> FIXED_SLOTS_SHIFT); + } + + void setNumFixedSlots(uint32_t nfixed) { + do { } while(0); + slotInfo = slotInfo & ~FIXED_SLOTS_MASK; + slotInfo = slotInfo | (nfixed << FIXED_SLOTS_SHIFT); + } + + uint32_t numLinearSearches() const { + return (slotInfo & LINEAR_SEARCHES_MASK) >> LINEAR_SEARCHES_SHIFT; + } + + void incrementNumLinearSearches() { + uint32_t count = numLinearSearches(); + do { } while(0); + slotInfo = slotInfo & ~LINEAR_SEARCHES_MASK; + slotInfo = slotInfo | ((count + 1) << LINEAR_SEARCHES_SHIFT); + } + + const HeapId &propid() const { + do { } while(0); + do { } while(0); + return propid_; + } + HeapId &propidRef() { do { } while(0); return propid_; } + + int16_t shortid() const { do { } while(0); return maybeShortid(); } + int16_t maybeShortid() const { return shortid_; } + + + + + + inline bool getUserId(JSContext *cx, jsid *idp) const; + + uint8_t attributes() const { return attrs; } + bool configurable() const { return (attrs & 0x04) == 0; } + bool enumerable() const { return (attrs & 0x01) != 0; } + bool writable() const { + + return (attrs & 0x02) == 0; + } + bool hasGetterValue() const { return attrs & 0x10; } + bool hasSetterValue() const { return attrs & 0x20; } + + bool isDataDescriptor() const { + return (attrs & (0x20 | 0x10)) == 0; + } + bool isAccessorDescriptor() const { + return (attrs & (0x20 | 0x10)) != 0; + } + + + + + + + + bool shadowable() const { + do { } while (0); + return hasSlot() || (attrs & 0x80); + } +# 837 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" + static Shape *setExtensibleParents(JSContext *cx, Shape *shape); + bool extensibleParents() const { return !!(base()->flags & BaseShape::EXTENSIBLE_PARENTS); } + + uint32_t entryCount() const { + if (hasTable()) + return table().entryCount; + + const js::Shape *shape = this; + uint32_t count = 0; + for (js::Shape::Range r = shape->all(); !r.empty(); r.popFront()) + ++count; + return count; + } + + bool isBigEnoughForAShapeTable() const { + do { } while(0); + const js::Shape *shape = this; + uint32_t count = 0; + for (js::Shape::Range r = shape->all(); !r.empty(); r.popFront()) { + ++count; + if (count >= ShapeTable::MIN_ENTRIES) + return true; + } + return false; + } + + + + + + + void finalize(FreeOp *fop); + void removeChild(js::Shape *child); + + static inline void writeBarrierPre(const Shape *shape); + static inline void writeBarrierPost(const Shape *shape, void *addr); + + + + + + + static inline void readBarrier(const Shape *shape); + + static inline ThingRootKind rootKind() { return THING_ROOT_SHAPE; } + + inline void markChildren(JSTracer *trc); + + + static inline size_t offsetOfBase() { return __builtin_offsetof (Shape, base_); } + + private: + static void staticAsserts() { + typedef int moz_static_assert82[(__builtin_offsetof (Shape, base_) == __builtin_offsetof (js::shadow::Shape, base)) ? 1 : -1]; + typedef int moz_static_assert83[(__builtin_offsetof (Shape, slotInfo) == __builtin_offsetof (js::shadow::Shape, slotInfo)) ? 1 : -1]; + typedef int moz_static_assert84[(FIXED_SLOTS_SHIFT == js::shadow::Shape::FIXED_SLOTS_SHIFT) ? 1 : -1]; + } +}; + +class AutoRooterGetterSetter +{ + class Inner : private AutoGCRooter + { + public: + Inner(JSContext *cx, uint8_t attrs, + PropertyOp *pgetter_, StrictPropertyOp *psetter_) + : AutoGCRooter(cx, GETTERSETTER), attrs(attrs), + pgetter(pgetter_), psetter(psetter_), + getterRoot(cx, pgetter_), setterRoot(cx, psetter_) + {} + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + uint8_t attrs; + PropertyOp *pgetter; + StrictPropertyOp *psetter; + SkipRoot getterRoot, setterRoot; + }; + + public: + explicit AutoRooterGetterSetter(JSContext *cx, uint8_t attrs, + PropertyOp *pgetter, StrictPropertyOp *psetter + ) + { + if (attrs & (0x10 | 0x20)) + inner.construct(cx, attrs, pgetter, psetter); + do { } while (0); + } + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + Maybe inner; + +}; + +struct EmptyShape : public js::Shape +{ + EmptyShape(UnownedBaseShape *base, uint32_t nfixed); + + + + + + static Shape *getInitialShape(JSContext *cx, Class *clasp, JSObject *proto, + JSObject *parent, gc::AllocKind kind, uint32_t objectFlags = 0); + + + + + + + static void insertInitialShape(JSContext *cx, Shape *shape, JSObject *proto); +}; + + + + + +struct InitialShapeEntry +{ + + + + + + ReadBarriered shape; + + + + + + JSObject *proto; + + + struct Lookup { + Class *clasp; + JSObject *proto; + JSObject *parent; + uint32_t nfixed; + uint32_t baseFlags; + Lookup(Class *clasp, JSObject *proto, JSObject *parent, uint32_t nfixed, + uint32_t baseFlags) + : clasp(clasp), proto(proto), parent(parent), + nfixed(nfixed), baseFlags(baseFlags) + {} + }; + + inline InitialShapeEntry(); + inline InitialShapeEntry(const ReadBarriered &shape, JSObject *proto); + + inline Lookup getLookup(); + + static inline HashNumber hash(const Lookup &lookup); + static inline bool match(const InitialShapeEntry &key, const Lookup &lookup); +}; + +typedef HashSet InitialShapeSet; + +struct StackShape +{ + UnownedBaseShape *base; + jsid propid; + uint32_t slot_; + uint8_t attrs; + uint8_t flags; + int16_t shortid; + + StackShape(UnownedBaseShape *base, jsid propid, uint32_t slot, + uint32_t nfixed, unsigned attrs, unsigned flags, int shortid) + : base(base), + propid(propid), + slot_(slot), + attrs(uint8_t(attrs)), + flags(uint8_t(flags)), + shortid(int16_t(shortid)) + { + do { } while(0); + do { } while(0); + do { } while(0); + } + + StackShape(const Shape *shape) + : base(shape->base()->unowned()), + propid(const_cast(shape)->propidRef()), + slot_(shape->slotInfo & Shape::SLOT_MASK), + attrs(shape->attrs), + flags(shape->flags), + shortid(shape->shortid_) + {} + + bool hasSlot() const { return (attrs & 0x40) == 0; } + bool hasMissingSlot() const { return maybeSlot() == SHAPE_INVALID_SLOT; } + + uint32_t slot() const { do { } while(0); return slot_; } + uint32_t maybeSlot() const { return slot_; } + + uint32_t slotSpan() const { + uint32_t free = (((base->clasp)->flags >> 8) & (((uint32_t)1 << (8)) - 1)); + return hasMissingSlot() ? free : (maybeSlot() + 1); + } + + void setSlot(uint32_t slot) { + do { } while(0); + slot_ = slot; + } + + inline HashNumber hash() const; + + class AutoRooter : private AutoGCRooter + { + public: + explicit AutoRooter(JSContext *cx, const StackShape *shape_ + ) + : AutoGCRooter(cx, STACKSHAPE), shape(shape_), skip(cx, shape_) + { + do { } while (0); + } + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + const StackShape *shape; + SkipRoot skip; + + }; + }; + +} + + +#define SHAPE_COLLISION (uintptr_t(1)) +#define SHAPE_REMOVED ((js::Shape *) SHAPE_COLLISION) + + +#define SHAPE_IS_FREE(shape) ((shape) == NULL) +#define SHAPE_IS_REMOVED(shape) ((shape) == SHAPE_REMOVED) +#define SHAPE_IS_LIVE(shape) ((shape) > SHAPE_REMOVED) +#define SHAPE_FLAG_COLLISION(spp,shape) (*(spp) = (js::Shape *) (uintptr_t(shape) | SHAPE_COLLISION)) + +#define SHAPE_HAD_COLLISION(shape) (uintptr_t(shape) & SHAPE_COLLISION) +#define SHAPE_FETCH(spp) SHAPE_CLEAR_COLLISION(*(spp)) + +#define SHAPE_CLEAR_COLLISION(shape) ((js::Shape *) (uintptr_t(shape) & ~SHAPE_COLLISION)) + + +#define SHAPE_STORE_PRESERVING_COLLISION(spp,shape) (*(spp) = (js::Shape *) (uintptr_t(shape) | SHAPE_HAD_COLLISION(*(spp)))) + + +namespace js { + +inline Shape * +Shape::search(JSContext *cx, Shape *start, jsid id, Shape ***pspp, bool adding) +{ + if (start->inDictionary()) { + *pspp = start->table().search(id, adding); + return ((js::Shape *) (uintptr_t(*(*pspp)) & ~(uintptr_t(1)))); + } + + *pspp = __null; + + if (start->hasTable()) { + Shape **spp = start->table().search(id, adding); + return ((js::Shape *) (uintptr_t(*(spp)) & ~(uintptr_t(1)))); + } + + if (start->numLinearSearches() == LINEAR_SEARCHES_MAX) { + if (start->isBigEnoughForAShapeTable()) { + RootedShape startRoot(cx, start); + RootedId idRoot(cx, id); + if (start->hashify(cx)) { + Shape **spp = start->table().search(id, adding); + return ((js::Shape *) (uintptr_t(*(spp)) & ~(uintptr_t(1)))); + } + start = startRoot; + id = idRoot; + } + + + + + do { } while(0); + } else { + start->incrementNumLinearSearches(); + } + + for (Shape *shape = start; shape; shape = shape->parent) { + if (shape->propidRef() == id) + return shape; + } + + return __null; +} +# 1150 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" +} + + + + + + +namespace JS { + template<> class AnchorPermitted { }; + template<> class AnchorPermitted { }; +} +# 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" +#define jsobjinlines_h___ + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsarray.h" 1 + + + + + + + +#define jsarray_h___ + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" 1 +# 11 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" +#define jscntxt_h___ +# 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclist.h" 1 + + + + + + +#define jsclist_h___ + + + + + + +typedef struct JSCListStr { + struct JSCListStr *next; + struct JSCListStr *prev; +} JSCList; + + + + +#define JS_INSERT_BEFORE(_e,_l) JS_BEGIN_MACRO (_e)->next = (_l); (_e)->prev = (_l)->prev; (_l)->prev->next = (_e); (_l)->prev = (_e); JS_END_MACRO +# 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclist.h" +#define JS_INSERT_AFTER(_e,_l) JS_BEGIN_MACRO (_e)->next = (_l)->next; (_e)->prev = (_l); (_l)->next->prev = (_e); (_l)->next = (_e); JS_END_MACRO +# 44 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclist.h" +#define JS_NEXT_LINK(_e) ((_e)->next) + + + + +#define JS_PREV_LINK(_e) ((_e)->prev) + + + + + +#define JS_APPEND_LINK(_e,_l) JS_INSERT_BEFORE(_e,_l) + + + + +#define JS_INSERT_LINK(_e,_l) JS_INSERT_AFTER(_e,_l) + + +#define JS_LIST_HEAD(_l) (_l)->next +#define JS_LIST_TAIL(_l) (_l)->prev + + + + +#define JS_REMOVE_LINK(_e) JS_BEGIN_MACRO (_e)->prev->next = (_e)->next; (_e)->next->prev = (_e)->prev; JS_END_MACRO +# 79 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclist.h" +#define JS_REMOVE_AND_INIT_LINK(_e) JS_BEGIN_MACRO (_e)->prev->next = (_e)->next; (_e)->next->prev = (_e)->prev; (_e)->next = (_e); (_e)->prev = (_e); JS_END_MACRO +# 91 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclist.h" +#define JS_CLIST_IS_EMPTY(_l) ((_l)->next == (_l)) + + + + + +#define JS_INIT_CLIST(_l) JS_BEGIN_MACRO (_l)->next = (_l); (_l)->prev = (_l); JS_END_MACRO + + + + + +#define JS_INIT_STATIC_CLIST(_l) {(_l), (_l)} +# 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" 1 + + + + + + + +#define jsgc_h___ + + + + +# 1 "/usr/include/setjmp.h" 1 3 4 +# 24 "/usr/include/setjmp.h" 3 4 +#define _SETJMP_H 1 + + + +extern "C" { + +# 1 "/usr/include/bits/setjmp.h" 1 3 4 +# 22 "/usr/include/bits/setjmp.h" 3 4 +#define _BITS_SETJMP_H 1 +# 35 "/usr/include/bits/setjmp.h" 3 4 +typedef int __jmp_buf[64] __attribute__((__aligned__ (8))); +# 31 "/usr/include/setjmp.h" 2 3 4 +# 1 "/usr/include/bits/sigset.h" 1 3 4 +# 32 "/usr/include/setjmp.h" 2 3 4 + + + +struct __jmp_buf_tag + { + + + + + __jmp_buf __jmpbuf; + int __mask_was_saved; + __sigset_t __saved_mask; + }; + + + + +typedef struct __jmp_buf_tag jmp_buf[1]; + + + +extern int setjmp (jmp_buf __env) throw (); + + + + + + +extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) throw (); + + + + +extern int _setjmp (struct __jmp_buf_tag __env[1]) throw (); + + + +#define setjmp(env) _setjmp (env) +# 78 "/usr/include/setjmp.h" 3 4 + + + + +extern void longjmp (struct __jmp_buf_tag __env[1], int __val) + throw () __attribute__ ((__noreturn__)); + + + + + + + +extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) + throw () __attribute__ ((__noreturn__)); + + + + + + + +typedef struct __jmp_buf_tag sigjmp_buf[1]; + + + +#define sigsetjmp(env,savemask) __sigsetjmp (env, savemask) + + + + + +extern void siglongjmp (sigjmp_buf __env, int __val) + throw () __attribute__ ((__noreturn__)); + + + + + +# 1 "/usr/include/bits/setjmp2.h" 1 3 4 +# 26 "/usr/include/bits/setjmp2.h" 3 4 +extern void longjmp (struct __jmp_buf_tag __env[1], int __val) throw () __asm__ ("" "__longjmp_chk") + + __attribute__ ((__noreturn__)); +extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) throw () __asm__ ("" "__longjmp_chk") + + __attribute__ ((__noreturn__)); +extern void siglongjmp (struct __jmp_buf_tag __env[1], int __val) throw () __asm__ ("" "__longjmp_chk") + + __attribute__ ((__noreturn__)); +# 118 "/usr/include/setjmp.h" 2 3 4 + + +} +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" 2 +# 23 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" 1 +# 42 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_VERSION_ECMA_3 148 +#define JS_VERSION_ECMA_3_TEST 149 +# 124 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_HAS_STR_HTML_HELPERS 1 +#define JS_HAS_OBJ_PROTO_PROP 1 +#define JS_HAS_OBJ_WATCHPOINT 1 +#define JS_HAS_TOSOURCE 1 +#define JS_HAS_CATCH_GUARD 1 +#define JS_HAS_UNEVAL 1 +#define JS_HAS_CONST 1 +#define JS_HAS_FUN_EXPR_STMT 1 +#define JS_HAS_NO_SUCH_METHOD 1 +#define JS_HAS_GENERATORS 1 +#define JS_HAS_BLOCK_SCOPE 1 +#define JS_HAS_DESTRUCTURING 2 +#define JS_HAS_GENERATOR_EXPRS 1 +#define JS_HAS_EXPR_CLOSURES 1 +# 146 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_HAS_NEW_GLOBAL_OBJECT 1 + + +#define JS_HAS_MAKE_SYSTEM_OBJECT 1 + + +#define JS_HAS_DESTRUCTURING_SHORTHAND (JS_HAS_DESTRUCTURING == 2) + + + + + +#define OLD_GETTER_SETTER_METHODS 1 + + +#define USE_NEW_OBJECT_REPRESENTATION 0 + + + + +#define NEW_OBJECT_REPRESENTATION_ONLY() MOZ_NOT_REACHED("don't call this! to be used in the new object representation") +# 24 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/BitArray.h" 1 +# 26 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Statistics.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Statistics.h" +#define jsgc_statistics_h___ + + + + + + + +struct JSCompartment; + +namespace js { +namespace gcstats { + +enum Phase { + PHASE_GC_BEGIN, + PHASE_WAIT_BACKGROUND_THREAD, + PHASE_PURGE, + PHASE_MARK, + PHASE_MARK_DISCARD_CODE, + PHASE_MARK_ROOTS, + PHASE_MARK_TYPES, + PHASE_MARK_DELAYED, + PHASE_MARK_WEAK, + PHASE_MARK_GRAY, + PHASE_MARK_GRAY_WEAK, + PHASE_FINALIZE_START, + PHASE_SWEEP, + PHASE_SWEEP_ATOMS, + PHASE_SWEEP_COMPARTMENTS, + PHASE_SWEEP_TABLES, + PHASE_SWEEP_OBJECT, + PHASE_SWEEP_STRING, + PHASE_SWEEP_SCRIPT, + PHASE_SWEEP_SHAPE, + PHASE_SWEEP_DISCARD_CODE, + PHASE_DISCARD_ANALYSIS, + PHASE_DISCARD_TI, + PHASE_FREE_TI_ARENA, + PHASE_SWEEP_TYPES, + PHASE_CLEAR_SCRIPT_ANALYSIS, + PHASE_FINALIZE_END, + PHASE_DESTROY, + PHASE_GC_END, + + PHASE_LIMIT +}; + +enum Stat { + STAT_NEW_CHUNK, + STAT_DESTROY_CHUNK, + + STAT_LIMIT +}; + +class StatisticsSerializer; + +struct Statistics { + Statistics(JSRuntime *rt); + ~Statistics(); + + void beginPhase(Phase phase); + void endPhase(Phase phase); + + void beginSlice(int collectedCount, int compartmentCount, gcreason::Reason reason); + void endSlice(); + + void reset(const char *reason) { slices.back().resetReason = reason; } + void nonincremental(const char *reason) { nonincrementalReason = reason; } + + void count(Stat s) { + do { } while(0); + counts[s]++; + } + + jschar *formatMessage(); + jschar *formatJSON(uint64_t timestamp); + + private: + JSRuntime *runtime; + + int64_t startupTime; + + FILE *fp; + bool fullFormat; + + + + + + int gcDepth; + + int collectedCount; + int compartmentCount; + const char *nonincrementalReason; + + struct SliceData { + SliceData(gcreason::Reason reason, int64_t start, size_t startFaults) + : reason(reason), resetReason(__null), start(start), startFaults(startFaults) + { + PodArrayZero(phaseTimes); + } + + gcreason::Reason reason; + const char *resetReason; + int64_t start, end; + size_t startFaults, endFaults; + int64_t phaseTimes[PHASE_LIMIT]; + + int64_t duration() const { return end - start; } + }; + + Vector slices; + + + int64_t phaseStartTimes[PHASE_LIMIT]; + + + int64_t phaseTimes[PHASE_LIMIT]; + + + int64_t phaseTotals[PHASE_LIMIT]; + + + unsigned int counts[STAT_LIMIT]; + + + size_t preBytes; + + void beginGC(); + void endGC(); + + int64_t gcDuration(); + void printStats(); + bool formatData(StatisticsSerializer &ss, uint64_t timestamp); + + double computeMMU(int64_t resolution); +}; + +struct AutoGCSlice { + AutoGCSlice(Statistics &stats, int collectedCount, int compartmentCount, gcreason::Reason reason + ) + : stats(stats) + { + do { } while (0); + stats.beginSlice(collectedCount, compartmentCount, reason); + } + ~AutoGCSlice() { stats.endSlice(); } + + Statistics &stats; + +}; + +struct AutoPhase { + AutoPhase(Statistics &stats, Phase phase ) + : stats(stats), phase(phase) { do { } while (0); stats.beginPhase(phase); } + ~AutoPhase() { stats.endPhase(phase); } + + Statistics &stats; + Phase phase; + +}; + +} +} +# 28 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" 2 + + + + +struct JSCompartment; + + + + +#define JS_CHECK_STACK_SIZE(limit,lval) ((uintptr_t)(lval) > limit) + + +namespace js { + +class GCHelperThread; +struct Shape; + +namespace gc { + +enum State { + NO_INCREMENTAL, + MARK_ROOTS, + MARK, + INVALID +}; + +class ChunkPool { + Chunk *emptyChunkListHead; + size_t emptyCount; + + public: + ChunkPool() + : emptyChunkListHead(__null), + emptyCount(0) { } + + size_t getEmptyCount() const { + return emptyCount; + } + + inline bool wantBackgroundAllocation(JSRuntime *rt) const; + + + inline Chunk *get(JSRuntime *rt); + + + inline void put(Chunk *chunk); + + + + + + Chunk *expire(JSRuntime *rt, bool releaseAll); + + + void expireAndFree(JSRuntime *rt, bool releaseAll); + + + __attribute__((visibility("default"))) int64_t countCleanDecommittedArenas(JSRuntime *rt); +}; + +static inline JSGCTraceKind +MapAllocToTraceKind(AllocKind thingKind) +{ + static const JSGCTraceKind map[FINALIZE_LIMIT] = { + JSTRACE_OBJECT, + JSTRACE_OBJECT, + JSTRACE_OBJECT, + JSTRACE_OBJECT, + JSTRACE_OBJECT, + JSTRACE_OBJECT, + JSTRACE_OBJECT, + JSTRACE_OBJECT, + JSTRACE_OBJECT, + JSTRACE_OBJECT, + JSTRACE_OBJECT, + JSTRACE_OBJECT, + JSTRACE_SCRIPT, + JSTRACE_SHAPE, + JSTRACE_BASE_SHAPE, + JSTRACE_TYPE_OBJECT, + + JSTRACE_XML, + + JSTRACE_STRING, + JSTRACE_STRING, + JSTRACE_STRING, + }; + return map[thingKind]; +} + +inline JSGCTraceKind +GetGCThingTraceKind(const void *thing); + +struct ArenaLists { +# 134 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" + struct ArenaList { + ArenaHeader *head; + ArenaHeader **cursor; + + ArenaList() { + clear(); + } + + void clear() { + head = __null; + cursor = &head; + } + }; + + private: +# 158 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" + FreeSpan freeLists[FINALIZE_LIMIT]; + + ArenaList arenaLists[FINALIZE_LIMIT]; +# 179 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" + enum BackgroundFinalizeState { + BFS_DONE, + BFS_RUN, + BFS_JUST_FINISHED + }; + + volatile uintptr_t backgroundFinalizeState[FINALIZE_LIMIT]; + + + public: + ArenaLists() { + for (size_t i = 0; i != FINALIZE_LIMIT; ++i) + freeLists[i].initAsEmpty(); + + for (size_t i = 0; i != FINALIZE_LIMIT; ++i) + backgroundFinalizeState[i] = BFS_DONE; + + } + + ~ArenaLists() { + for (size_t i = 0; i != FINALIZE_LIMIT; ++i) { + + + + + + do { } while(0); + + ArenaHeader **headp = &arenaLists[i].head; + while (ArenaHeader *aheader = *headp) { + *headp = aheader->next; + aheader->chunk()->releaseArena(aheader); + } + } + } + + const FreeSpan *getFreeList(AllocKind thingKind) const { + return &freeLists[thingKind]; + } + + ArenaHeader *getFirstArena(AllocKind thingKind) const { + return arenaLists[thingKind].head; + } + + bool arenaListsAreEmpty() const { + for (size_t i = 0; i != FINALIZE_LIMIT; ++i) { + + + + + + if (backgroundFinalizeState[i] != BFS_DONE) + return false; + + if (arenaLists[i].head) + return false; + } + return true; + } +# 257 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" + bool doneBackgroundFinalize(AllocKind kind) const { + return backgroundFinalizeState[kind] == BFS_DONE; + } + + + + + + + void purge() { + for (size_t i = 0; i != FINALIZE_LIMIT; ++i) { + FreeSpan *headSpan = &freeLists[i]; + if (!headSpan->isEmpty()) { + ArenaHeader *aheader = headSpan->arenaHeader(); + aheader->setFirstFreeSpan(headSpan); + headSpan->initAsEmpty(); + } + } + } + + inline void prepareForIncrementalGC(JSRuntime *rt); + + + + + + + void copyFreeListsToArenas() { + for (size_t i = 0; i != FINALIZE_LIMIT; ++i) + copyFreeListToArena(AllocKind(i)); + } + + void copyFreeListToArena(AllocKind thingKind) { + FreeSpan *headSpan = &freeLists[thingKind]; + if (!headSpan->isEmpty()) { + ArenaHeader *aheader = headSpan->arenaHeader(); + do { } while(0); + aheader->setFirstFreeSpan(headSpan); + } + } + + + + + + void clearFreeListsInArenas() { + for (size_t i = 0; i != FINALIZE_LIMIT; ++i) + clearFreeListInArena(AllocKind(i)); + } + + + void clearFreeListInArena(AllocKind kind) { + FreeSpan *headSpan = &freeLists[kind]; + if (!headSpan->isEmpty()) { + ArenaHeader *aheader = headSpan->arenaHeader(); + do { } while(0); + aheader->setAsFullyUsed(); + } + } + + + + + + bool isSynchronizedFreeList(AllocKind kind) { + FreeSpan *headSpan = &freeLists[kind]; + if (headSpan->isEmpty()) + return true; + ArenaHeader *aheader = headSpan->arenaHeader(); + if (aheader->hasFreeThings()) { + + + + + do { } while(0); + return true; + } + return false; + } + + __attribute__((always_inline)) inline void *allocateFromFreeList(AllocKind thingKind, size_t thingSize) { + return freeLists[thingKind].allocate(thingSize); + } + + static void *refillFreeList(JSContext *cx, AllocKind thingKind); + + void checkEmptyFreeLists() { + + + + + } + + void checkEmptyFreeList(AllocKind kind) { + do { } while(0); + } + + void finalizeObjects(FreeOp *fop); + void finalizeStrings(FreeOp *fop); + void finalizeShapes(FreeOp *fop); + void finalizeScripts(FreeOp *fop); + + + static void backgroundFinalize(FreeOp *fop, ArenaHeader *listHead); + + + private: + inline void finalizeNow(FreeOp *fop, AllocKind thingKind); + inline void finalizeLater(FreeOp *fop, AllocKind thingKind); + + inline void *allocateFromArena(JSCompartment *comp, AllocKind thingKind); +}; + + + + + + +const size_t INITIAL_CHUNK_CAPACITY = 16 * 1024 * 1024 / ChunkSize; + + +const size_t MAX_EMPTY_CHUNK_AGE = 4; + +inline Cell * +AsCell(JSObject *obj) +{ + return reinterpret_cast(obj); +} + +} + +struct GCPtrHasher +{ + typedef void *Lookup; + + static HashNumber hash(void *key) { + return HashNumber(uintptr_t(key) >> JS_GCTHING_ZEROBITS); + } + + static bool match(void *l, void *k) { return l == k; } +}; + +typedef HashMap GCLocks; + +struct RootInfo { + RootInfo() {} + RootInfo(const char *name, JSGCRootType type) : name(name), type(type) {} + const char *name; + JSGCRootType type; +}; + +typedef js::HashMap, + js::SystemAllocPolicy> RootedValueMap; + +} + +extern __attribute__((visibility("default"))) JSGCTraceKind +js_GetGCThingTraceKind(void *thing); + +extern JSBool +js_InitGC(JSRuntime *rt, uint32_t maxbytes); + +extern void +js_FinishGC(JSRuntime *rt); + +extern JSBool +js_AddRoot(JSContext *cx, js::Value *vp, const char *name); + +extern JSBool +js_AddGCThingRoot(JSContext *cx, void **rp, const char *name); +# 437 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" +extern uint32_t +js_MapGCRoots(JSRuntime *rt, JSGCRootMapFun map, void *data); + + +typedef struct JSPtrTable { + size_t count; + void **array; +} JSPtrTable; + +extern JSBool +js_LockGCThingRT(JSRuntime *rt, void *thing); + +extern void +js_UnlockGCThingRT(JSRuntime *rt, void *thing); + +extern bool +js_IsAddressableGCThing(JSRuntime *rt, uintptr_t w, js::gc::AllocKind *thingKind, void **thing); + +namespace js { + +extern void +MarkCompartmentActive(js::StackFrame *fp); + +extern void +TraceRuntime(JSTracer *trc); + +extern __attribute__((visibility("default"))) void +MarkContext(JSTracer *trc, JSContext *acx); + + +extern void +TriggerGC(JSRuntime *rt, js::gcreason::Reason reason); + + +extern void +TriggerCompartmentGC(JSCompartment *comp, js::gcreason::Reason reason); + +extern void +MaybeGC(JSContext *cx); + +extern void +ShrinkGCBuffers(JSRuntime *rt); + +extern __attribute__((visibility("default"))) void +PrepareForFullGC(JSRuntime *rt); + + + + +typedef enum JSGCInvocationKind { + + GC_NORMAL = 0, + + + GC_SHRINK = 1 +} JSGCInvocationKind; + +extern void +GC(JSRuntime *rt, JSGCInvocationKind gckind, js::gcreason::Reason reason); + +extern void +GCSlice(JSRuntime *rt, JSGCInvocationKind gckind, js::gcreason::Reason reason); + +extern void +GCDebugSlice(JSRuntime *rt, bool limit, int64_t objCount); + +extern void +PrepareForDebugGC(JSRuntime *rt); + +} + +namespace js { + +void +InitTracer(JSTracer *trc, JSRuntime *rt, JSTraceCallback callback); + + + +class GCHelperThread { + enum State { + IDLE, + SWEEPING, + ALLOCATING, + CANCEL_ALLOCATION, + SHUTDOWN + }; +# 534 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" + static const size_t FREE_ARRAY_SIZE = size_t(1) << 16; + static const size_t FREE_ARRAY_LENGTH = FREE_ARRAY_SIZE / sizeof(void *); + + JSRuntime *const rt; + PRThread *thread; + PRCondVar *wakeup; + PRCondVar *done; + volatile State state; + + bool sweepFlag; + bool shrinkFlag; + + Vector freeVector; + void **freeCursor; + void **freeCursorEnd; + + Vector finalizeVector; + + bool backgroundAllocation; + + friend struct js::gc::ArenaLists; + + __attribute__((visibility("default"))) void + replenishAndFreeLater(void *ptr); + + static void freeElementsAndArray(void **array, void **end) { + do { } while(0); + for (void **p = array; p != end; ++p) + js::Foreground::free_(*p); + js::Foreground::free_(array); + } + + static void threadMain(void* arg); + void threadLoop(); + + + void doSweep(); + + public: + GCHelperThread(JSRuntime *rt) + : rt(rt), + thread(__null), + wakeup(__null), + done(__null), + state(IDLE), + sweepFlag(false), + shrinkFlag(false), + freeCursor(__null), + freeCursorEnd(__null), + backgroundAllocation(true) + { } + + bool init(); + void finish(); + + + void startBackgroundSweep(bool shouldShrink); + + + void startBackgroundShrink(); + + + void waitBackgroundSweepEnd(); + + + void waitBackgroundSweepOrAllocEnd(); + + + inline void startBackgroundAllocationIfIdle(); + + bool canBackgroundAllocate() const { + return backgroundAllocation; + } + + void disableBackgroundAllocation() { + backgroundAllocation = false; + } + + PRThread *getThread() const { + return thread; + } + + + + + + bool sweeping() const { + return state == SWEEPING; + } + + bool shouldShrink() const { + do { } while(0); + return shrinkFlag; + } + + void freeLater(void *ptr) { + do { } while(0); + if (freeCursor != freeCursorEnd) + *freeCursor++ = ptr; + else + replenishAndFreeLater(ptr); + } + + + bool prepareForBackgroundSweep(); +}; + + + +struct GCChunkHasher { + typedef gc::Chunk *Lookup; + + + + + + static HashNumber hash(gc::Chunk *chunk) { + do { } while(0); + return HashNumber(uintptr_t(chunk) >> gc::ChunkShift); + } + + static bool match(gc::Chunk *k, gc::Chunk *l) { + do { } while(0); + do { } while(0); + return k == l; + } +}; + +typedef HashSet GCChunkSet; + +template +struct MarkStack { + T *stack; + T *tos; + T *limit; + + T *ballast; + T *ballastLimit; + + size_t sizeLimit; + + MarkStack(size_t sizeLimit) + : stack(__null), + tos(__null), + limit(__null), + ballast(__null), + ballastLimit(__null), + sizeLimit(sizeLimit) { } + + ~MarkStack() { + if (stack != ballast) + js_free(stack); + js_free(ballast); + } + + bool init(size_t ballastcap) { + do { } while(0); + + if (ballastcap == 0) + return true; + + ballast = (T *)js_malloc(sizeof(T) * ballastcap); + if (!ballast) + return false; + ballastLimit = ballast + ballastcap; + initFromBallast(); + return true; + } + + void initFromBallast() { + stack = ballast; + limit = ballastLimit; + if (size_t(limit - stack) > sizeLimit) + limit = stack + sizeLimit; + tos = stack; + } + + void setSizeLimit(size_t size) { + do { } while(0); + + sizeLimit = size; + reset(); + } + + bool push(T item) { + if (tos == limit) { + if (!enlarge()) + return false; + } + do { } while(0); + *tos++ = item; + return true; + } + + bool push(T item1, T item2, T item3) { + T *nextTos = tos + 3; + if (nextTos > limit) { + if (!enlarge()) + return false; + nextTos = tos + 3; + } + do { } while(0); + tos[0] = item1; + tos[1] = item2; + tos[2] = item3; + tos = nextTos; + return true; + } + + bool isEmpty() const { + return tos == stack; + } + + T pop() { + do { } while(0); + return *--tos; + } + + ptrdiff_t position() const { + return tos - stack; + } + + void reset() { + if (stack != ballast) + js_free(stack); + initFromBallast(); + do { } while(0); + } + + bool enlarge() { + size_t tosIndex = tos - stack; + size_t cap = limit - stack; + if (cap == sizeLimit) + return false; + size_t newcap = cap * 2; + if (newcap == 0) + newcap = 32; + if (newcap > sizeLimit) + newcap = sizeLimit; + + T *newStack; + if (stack == ballast) { + newStack = (T *)js_malloc(sizeof(T) * newcap); + if (!newStack) + return false; + for (T *src = stack, *dst = newStack; src < tos; ) + *dst++ = *src++; + } else { + newStack = (T *)js_realloc(stack, sizeof(T) * newcap); + if (!newStack) + return false; + } + stack = newStack; + tos = stack + tosIndex; + limit = newStack + newcap; + return true; + } + + size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const { + size_t n = 0; + if (stack != ballast) + n += mallocSizeOf(stack); + n += mallocSizeOf(ballast); + return n; + } +}; + + + + + + + +struct SliceBudget { + int64_t deadline; + intptr_t counter; + + static const intptr_t CounterReset = 1000; + + static const int64_t Unlimited = 0; + static int64_t TimeBudget(int64_t millis); + static int64_t WorkBudget(int64_t work); + + + SliceBudget(); + + + SliceBudget(int64_t budget); + + void reset() { + deadline = (9223372036854775807LL); + counter = (2147483647); + } + + void step(intptr_t amt = 1) { + counter -= amt; + } + + bool checkOverBudget(); + + bool isOverBudget() { + if (counter >= 0) + return false; + return checkOverBudget(); + } +}; + +static const size_t MARK_STACK_LENGTH = 32768; + +struct GCMarker : public JSTracer { + private: + + + + + + enum StackTag { + ValueArrayTag, + ObjectTag, + TypeTag, + XmlTag, + ArenaTag, + SavedValueArrayTag, + LastTag = SavedValueArrayTag + }; + + static const uintptr_t StackTagMask = 7; + + static void staticAsserts() { + typedef int moz_static_assert85[(StackTagMask >= uintptr_t(LastTag)) ? 1 : -1]; + typedef int moz_static_assert86[(StackTagMask <= gc::Cell::CellMask) ? 1 : -1]; + } + + public: + explicit GCMarker(); + bool init(); + + void setSizeLimit(size_t size) { stack.setSizeLimit(size); } + size_t sizeLimit() const { return stack.sizeLimit; } + + void start(JSRuntime *rt); + void stop(); + void reset(); + + void pushObject(JSObject *obj) { + pushTaggedPtr(ObjectTag, obj); + } + + void pushArenaList(gc::ArenaHeader *firstArena) { + pushTaggedPtr(ArenaTag, firstArena); + } + + void pushType(types::TypeObject *type) { + pushTaggedPtr(TypeTag, type); + } + + + void pushXML(JSXML *xml) { + pushTaggedPtr(XmlTag, xml); + } + + + uint32_t getMarkColor() const { + return color; + } +# 908 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" + void setMarkColorGray() { + do { } while(0); + do { } while(0); + color = gc::GRAY; + } + + inline void delayMarkingArena(gc::ArenaHeader *aheader); + void delayMarkingChildren(const void *thing); + void markDelayedChildren(gc::ArenaHeader *aheader); + bool markDelayedChildren(SliceBudget &budget); + bool hasDelayedChildren() const { + return !!unmarkedArenaStackTop; + } + + bool isDrained() { + return isMarkStackEmpty() && !unmarkedArenaStackTop; + } + + bool drainMarkStack(SliceBudget &budget); +# 936 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" + bool hasBufferedGrayRoots() const; + void startBufferingGrayRoots(); + void endBufferingGrayRoots(); + void markBufferedGrayRoots(); + + static void GrayCallback(JSTracer *trc, void **thing, JSGCTraceKind kind); + + size_t sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf) const; + + MarkStack stack; + + private: + + + + void checkCompartment(void *p) {} + + + void pushTaggedPtr(StackTag tag, void *ptr) { + checkCompartment(ptr); + uintptr_t addr = reinterpret_cast(ptr); + do { } while(0); + if (!stack.push(addr | uintptr_t(tag))) + delayMarkingChildren(ptr); + } + + void pushValueArray(JSObject *obj, void *start, void *end) { + checkCompartment(obj); + + do { } while(0); + uintptr_t tagged = reinterpret_cast(obj) | GCMarker::ValueArrayTag; + uintptr_t startAddr = reinterpret_cast(start); + uintptr_t endAddr = reinterpret_cast(end); + + + + + + if (!stack.push(endAddr, startAddr, tagged)) + delayMarkingChildren(obj); + } + + bool isMarkStackEmpty() { + return stack.isEmpty(); + } + + bool restoreValueArray(JSObject *obj, void **vpp, void **endp); + void saveValueRanges(); + inline void processMarkStackTop(SliceBudget &budget); + void processMarkStackOther(SliceBudget &budget, uintptr_t tag, uintptr_t addr); + + void appendGrayRoot(void *thing, JSGCTraceKind kind); + + + uint32_t color; + + DebugOnly started; + + + js::gc::ArenaHeader *unmarkedArenaStackTop; + + DebugOnly markLaterArenas; + + struct GrayRoot { + void *thing; + JSGCTraceKind kind; + + + + + + + GrayRoot(void *thing, JSGCTraceKind kind) + : thing(thing), kind(kind) {} + }; + + bool grayFailed; + Vector grayRoots; +}; + +void +SetMarkStackLimit(JSRuntime *rt, size_t limit); + +void +MarkStackRangeConservatively(JSTracer *trc, Value *begin, Value *end); + +typedef void (*IterateChunkCallback)(JSRuntime *rt, void *data, gc::Chunk *chunk); +typedef void (*IterateArenaCallback)(JSRuntime *rt, void *data, gc::Arena *arena, + JSGCTraceKind traceKind, size_t thingSize); +typedef void (*IterateCellCallback)(JSRuntime *rt, void *data, void *thing, + JSGCTraceKind traceKind, size_t thingSize); + + + + + + +extern __attribute__((visibility("default"))) void +IterateCompartmentsArenasCells(JSRuntime *rt, void *data, + JSIterateCompartmentCallback compartmentCallback, + IterateArenaCallback arenaCallback, + IterateCellCallback cellCallback); + + + + +extern __attribute__((visibility("default"))) void +IterateChunks(JSRuntime *rt, void *data, IterateChunkCallback chunkCallback); + + + + + +extern __attribute__((visibility("default"))) void +IterateCells(JSRuntime *rt, JSCompartment *compartment, gc::AllocKind thingKind, + void *data, IterateCellCallback cellCallback); + +} + +extern void +js_FinalizeStringRT(JSRuntime *rt, JSString *str); + + + + +#define IS_GC_MARKING_TRACER(trc) ((trc)->callback == NULL || (trc)->callback == GCMarker::GrayCallback) + + +namespace js { +namespace gc { + +JSCompartment * +NewCompartment(JSContext *cx, JSPrincipals *principals); + + +void +RunDebugGC(JSContext *cx); + +void +SetDeterministicGC(JSContext *cx, bool enabled); + +const int ZealPokeValue = 1; +const int ZealAllocValue = 2; +const int ZealFrameGCValue = 3; +const int ZealVerifierValue = 4; +const int ZealFrameVerifierValue = 5; +# 1094 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" +static inline void +VerifyBarriers(JSRuntime *rt) +{ +} + +static inline void +MaybeVerifyBarriers(JSContext *cx, bool always = false) +{ +} + + + +} + +static inline JSCompartment * +GetObjectCompartment(JSObject *obj) { return reinterpret_cast(obj)->compartment(); } + +} +# 23 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspropertycache.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspropertycache.h" +#define jspropertycache_h___ + + + + + + + +namespace js { + + + + + + +class PropertyCache; + +struct PropertyCacheEntry +{ + jsbytecode *kpc; + const Shape *kshape; + const Shape *pshape; + const Shape *prop; + + friend class PropertyCache; + + private: + + uint8_t scopeIndex; + + uint8_t protoIndex; + + public: + static const size_t MaxScopeIndex = 15; + static const size_t MaxProtoIndex = 15; +# 53 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspropertycache.h" + bool isOwnPropertyHit() const { return scopeIndex == 0 && protoIndex == 0; } +# 63 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspropertycache.h" + bool isPrototypePropertyHit() const { return scopeIndex == 0 && protoIndex == 1; } + + void assign(jsbytecode *kpc, const Shape *kshape, const Shape *pshape, + const Shape *prop, unsigned scopeIndex, unsigned protoIndex) { + do { } while(0); + do { } while(0); + + this->kpc = kpc; + this->kshape = kshape; + this->pshape = pshape; + this->prop = prop; + this->scopeIndex = uint8_t(scopeIndex); + this->protoIndex = uint8_t(protoIndex); + } +}; + + + + + +#define JS_NO_PROP_CACHE_FILL ((js::PropertyCacheEntry *) NULL + 1) + + + + + +class PropertyCache +{ + private: + enum { + SIZE_LOG2 = 12, + SIZE = ((uint32_t)1 << (SIZE_LOG2)), + MASK = (((uint32_t)1 << (SIZE_LOG2)) - 1) + }; + + PropertyCacheEntry table[SIZE]; + JSBool empty; + + public: +# 136 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspropertycache.h" +#define PCMETER(x) ((void)0) + + + PropertyCache() { + PodZero(this); + } + + private: + static inline uintptr_t + hash(jsbytecode *pc, const Shape *kshape) + { + return (((uintptr_t(pc) >> SIZE_LOG2) ^ uintptr_t(pc) ^ ((uintptr_t)kshape >> 3)) & MASK); + } + + static inline bool matchShape(JSContext *cx, JSObject *obj, uint32_t shape); + + PropertyName * + fullTest(JSContext *cx, jsbytecode *pc, JSObject **objp, + JSObject **pobjp, PropertyCacheEntry *entry); + + + + + inline void assertEmpty() {} + + + public: + __attribute__((always_inline)) inline void test(JSContext *cx, jsbytecode *pc, + JSObject *&obj, JSObject *&pobj, + PropertyCacheEntry *&entry, PropertyName *&name); +# 174 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspropertycache.h" + __attribute__((always_inline)) inline bool testForSet(JSContext *cx, jsbytecode *pc, JSObject *obj, + PropertyCacheEntry **entryp, JSObject **obj2p, + PropertyName **namep); +# 186 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jspropertycache.h" + PropertyCacheEntry *fill(JSContext *cx, JSObject *obj, unsigned scopeIndex, + JSObject *pobj, const js::Shape *shape); + + void purge(JSRuntime *rt); + + + void restore(PropertyCacheEntry *entry); +}; + +} +# 24 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/prmjtime.h" 1 + + + + + + + +#define prmjtime_h___ + +# 1 "/usr/include/time.h" 1 3 4 +# 27 "/usr/include/time.h" 3 4 +#define _TIME_H 1 + + +extern "C" { + + + + + +#define __need_size_t +#define __need_NULL +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 160 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_ptrdiff_t +# 233 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_size_t +# 342 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_wchar_t +# 395 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef NULL + +#define NULL __null +# 406 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 3 4 +#undef __need_NULL + + + + +#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER) +# 39 "/usr/include/time.h" 2 3 4 + + + +# 1 "/usr/include/bits/time.h" 1 3 4 +# 41 "/usr/include/bits/time.h" 3 4 +#define _BITS_TIME_H 1 + + + + + + + +#define CLOCKS_PER_SEC 1000000l +# 61 "/usr/include/bits/time.h" 3 4 +#define CLOCK_REALTIME 0 + +#define CLOCK_MONOTONIC 1 + +#define CLOCK_PROCESS_CPUTIME_ID 2 + +#define CLOCK_THREAD_CPUTIME_ID 3 + +#define CLOCK_MONOTONIC_RAW 4 + +#define CLOCK_REALTIME_COARSE 5 + +#define CLOCK_MONOTONIC_COARSE 6 + +#define CLOCK_BOOTTIME 7 + +#define CLOCK_REALTIME_ALARM 8 + +#define CLOCK_BOOTTIME_ALARM 9 + + +#define TIMER_ABSTIME 1 + + + +# 1 "/usr/include/bits/timex.h" 1 3 4 +# 20 "/usr/include/bits/timex.h" 3 4 +#define _BITS_TIMEX_H 1 + + + +struct timex +{ + unsigned int modes; + long int offset; + long int freq; + long int maxerror; + long int esterror; + int status; + long int constant; + long int precision; + long int tolerance; + struct timeval time; + long int tick; + + long int ppsfreq; + long int jitter; + int shift; + long int stabil; + long int jitcnt; + long int calcnt; + long int errcnt; + long int stbcnt; + + int tai; + + + int :32; int :32; int :32; int :32; + int :32; int :32; int :32; int :32; + int :32; int :32; int :32; +}; + + +#define ADJ_OFFSET 0x0001 +#define ADJ_FREQUENCY 0x0002 +#define ADJ_MAXERROR 0x0004 +#define ADJ_ESTERROR 0x0008 +#define ADJ_STATUS 0x0010 +#define ADJ_TIMECONST 0x0020 +#define ADJ_TAI 0x0080 +#define ADJ_MICRO 0x1000 +#define ADJ_NANO 0x2000 +#define ADJ_TICK 0x4000 +#define ADJ_OFFSET_SINGLESHOT 0x8001 +#define ADJ_OFFSET_SS_READ 0xa001 + + +#define MOD_OFFSET ADJ_OFFSET +#define MOD_FREQUENCY ADJ_FREQUENCY +#define MOD_MAXERROR ADJ_MAXERROR +#define MOD_ESTERROR ADJ_ESTERROR +#define MOD_STATUS ADJ_STATUS +#define MOD_TIMECONST ADJ_TIMECONST +#define MOD_CLKB ADJ_TICK +#define MOD_CLKA ADJ_OFFSET_SINGLESHOT +#define MOD_TAI ADJ_TAI +#define MOD_MICRO ADJ_MICRO +#define MOD_NANO ADJ_NANO + + + +#define STA_PLL 0x0001 +#define STA_PPSFREQ 0x0002 +#define STA_PPSTIME 0x0004 +#define STA_FLL 0x0008 + +#define STA_INS 0x0010 +#define STA_DEL 0x0020 +#define STA_UNSYNC 0x0040 +#define STA_FREQHOLD 0x0080 + +#define STA_PPSSIGNAL 0x0100 +#define STA_PPSJITTER 0x0200 +#define STA_PPSWANDER 0x0400 +#define STA_PPSERROR 0x0800 + +#define STA_CLOCKERR 0x1000 +#define STA_NANO 0x2000 +#define STA_MODE 0x4000 +#define STA_CLK 0x8000 + + +#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK) +# 87 "/usr/include/bits/time.h" 2 3 4 + +extern "C" { + + +extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) throw (); + +} + + + + + +#undef __need_timeval +# 43 "/usr/include/time.h" 2 3 4 +# 67 "/usr/include/time.h" 3 4 +#undef __need_clock_t +# 83 "/usr/include/time.h" 3 4 +#undef __need_time_t +# 95 "/usr/include/time.h" 3 4 +#undef __clockid_time_t +# 107 "/usr/include/time.h" 3 4 +#undef __need_timer_t +# 127 "/usr/include/time.h" 3 4 +#undef __need_timespec + + + + + +struct tm +{ + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; + + + long int tm_gmtoff; + __const char *tm_zone; + + + + +}; + + + + + + + + +struct itimerspec + { + struct timespec it_interval; + struct timespec it_value; + }; + + +struct sigevent; +# 180 "/usr/include/time.h" 3 4 + + + +extern clock_t clock (void) throw (); + + +extern time_t time (time_t *__timer) throw (); + + +extern double difftime (time_t __time1, time_t __time0) + throw () __attribute__ ((__const__)); + + +extern time_t mktime (struct tm *__tp) throw (); + + + + + +extern size_t strftime (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp) throw (); + + + + + +extern char *strptime (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp) + throw (); + + + + + + + +extern size_t strftime_l (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp, + __locale_t __loc) throw (); + + + +extern char *strptime_l (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp, + __locale_t __loc) throw (); + + + + + + +extern struct tm *gmtime (__const time_t *__timer) throw (); + + + +extern struct tm *localtime (__const time_t *__timer) throw (); + + + + + +extern struct tm *gmtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) throw (); + + + +extern struct tm *localtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) throw (); + + + + + +extern char *asctime (__const struct tm *__tp) throw (); + + +extern char *ctime (__const time_t *__timer) throw (); + + + + + + + +extern char *asctime_r (__const struct tm *__restrict __tp, + char *__restrict __buf) throw (); + + +extern char *ctime_r (__const time_t *__restrict __timer, + char *__restrict __buf) throw (); + + + + +extern char *__tzname[2]; +extern int __daylight; +extern long int __timezone; + + + + +extern char *tzname[2]; + + + +extern void tzset (void) throw (); + + + +extern int daylight; +extern long int timezone; + + + + + +extern int stime (__const time_t *__when) throw (); + + + + + +#define __isleap(year) ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) +# 313 "/usr/include/time.h" 3 4 +extern time_t timegm (struct tm *__tp) throw (); + + +extern time_t timelocal (struct tm *__tp) throw (); + + +extern int dysize (int __year) throw () __attribute__ ((__const__)); +# 328 "/usr/include/time.h" 3 4 +extern int nanosleep (__const struct timespec *__requested_time, + struct timespec *__remaining); + + + +extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw (); + + +extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw (); + + +extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) + throw (); + + + + + + +extern int clock_nanosleep (clockid_t __clock_id, int __flags, + __const struct timespec *__req, + struct timespec *__rem); + + +extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw (); + + + + +extern int timer_create (clockid_t __clock_id, + struct sigevent *__restrict __evp, + timer_t *__restrict __timerid) throw (); + + +extern int timer_delete (timer_t __timerid) throw (); + + +extern int timer_settime (timer_t __timerid, int __flags, + __const struct itimerspec *__restrict __value, + struct itimerspec *__restrict __ovalue) throw (); + + +extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) + throw (); + + +extern int timer_getoverrun (timer_t __timerid) throw (); +# 390 "/usr/include/time.h" 3 4 +extern int getdate_err; +# 399 "/usr/include/time.h" 3 4 +extern struct tm *getdate (__const char *__string); +# 413 "/usr/include/time.h" 3 4 +extern int getdate_r (__const char *__restrict __string, + struct tm *__restrict __resbufp); + + +} +# 11 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/prmjtime.h" 2 + +struct JSContext; +# 58 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/prmjtime.h" +class DSTOffsetCache { + public: + inline DSTOffsetCache(); + int64_t getDSTOffsetMilliseconds(int64_t localTimeMilliseconds, JSContext *cx); + + inline void purge(); + + private: + int64_t computeDSTOffsetMilliseconds(int64_t localTimeSeconds); + + int64_t offsetMilliseconds; + int64_t rangeStartSeconds, rangeEndSeconds; + + int64_t oldOffsetMilliseconds; + int64_t oldRangeStartSeconds, oldRangeEndSeconds; + + static const int64_t MAX_UNIX_TIMET = 2145859200; + static const int64_t MILLISECONDS_PER_SECOND = 1000; + static const int64_t SECONDS_PER_MINUTE = 60; + static const int64_t SECONDS_PER_HOUR = 60 * SECONDS_PER_MINUTE; + static const int64_t SECONDS_PER_DAY = 24 * SECONDS_PER_HOUR; + + static const int64_t RANGE_EXPANSION_AMOUNT = 30 * SECONDS_PER_DAY; + + private: + void sanityCheck(); +}; + +extern "C" { + +typedef struct PRMJTime PRMJTime; + + + + +struct PRMJTime { + int32_t tm_usec; + int8_t tm_sec; + int8_t tm_min; + int8_t tm_hour; + int8_t tm_mday; + int8_t tm_mon; + int8_t tm_wday; + int32_t tm_year; + int16_t tm_yday; + int8_t tm_isdst; +}; + + +#define PRMJ_USEC_PER_SEC 1000000L +#define PRMJ_USEC_PER_MSEC 1000L + + +extern int64_t +PRMJ_Now(void); + + + + + + +#define PRMJ_NowShutdown() + + + +extern int32_t +PRMJ_LocalGMTDifference(void); + + +extern size_t +PRMJ_FormatTime(char *buf, int buflen, const char *fmt, PRMJTime *tm); + +} +# 27 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" 2 + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" +#define Stack_h__ + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfun.h" 1 + + + + + + + +#define jsfun_h___ + + + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" +#define jsscript_h___ + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsdbgapi.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsdbgapi.h" +#define jsdbgapi_h___ + + + + + + +extern "C" { + +extern __attribute__((visibility("default"))) JSCrossCompartmentCall * +JS_EnterCrossCompartmentCallScript(JSContext *cx, JSScript *target); + +extern __attribute__((visibility("default"))) JSCrossCompartmentCall * +JS_EnterCrossCompartmentCallStackFrame(JSContext *cx, JSStackFrame *target); + + +} + +namespace JS { + +class __attribute__((visibility("default"))) AutoEnterScriptCompartment +{ + protected: + JSCrossCompartmentCall *call; + + public: + AutoEnterScriptCompartment() : call(__null) {} + + bool enter(JSContext *cx, JSScript *target); + + bool entered() const { return call != __null; } + + ~AutoEnterScriptCompartment() { + if (call && call != reinterpret_cast(1)) + JS_LeaveCrossCompartmentCall(call); + } +}; + +class __attribute__((visibility("default"))) AutoEnterFrameCompartment : public AutoEnterScriptCompartment +{ + public: + bool enter(JSContext *cx, JSStackFrame *target); +}; + +} + + + + + + +__attribute__((visibility("default"))) void js_DumpBacktrace(JSContext *cx); + +extern "C" { + + +extern __attribute__((visibility("default"))) JSString * +JS_DecompileScript(JSContext *cx, JSScript *script, const char *name, unsigned indent); + + + + + +extern __attribute__((visibility("default"))) void +JS_SetRuntimeDebugMode(JSRuntime *rt, JSBool debug); +# 86 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsdbgapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_GetDebugMode(JSContext *cx); + + + + + +__attribute__((visibility("default"))) JSBool +JS_SetDebugModeForAllCompartments(JSContext *cx, JSBool debug); + + + + + + +__attribute__((visibility("default"))) JSBool +JS_SetDebugModeForCompartment(JSContext *cx, JSCompartment *comp, JSBool debug); + + + + +__attribute__((visibility("default"))) JSBool +JS_SetDebugMode(JSContext *cx, JSBool debug); + + +extern __attribute__((visibility("default"))) JSBool +JS_SetSingleStepMode(JSContext *cx, JSScript *script, JSBool singleStep); + + +extern __attribute__((visibility("default"))) JSBool +JS_SetTrap(JSContext *cx, JSScript *script, jsbytecode *pc, + JSTrapHandler handler, jsval closure); + +extern __attribute__((visibility("default"))) void +JS_ClearTrap(JSContext *cx, JSScript *script, jsbytecode *pc, + JSTrapHandler *handlerp, jsval *closurep); + +extern __attribute__((visibility("default"))) void +JS_ClearScriptTraps(JSContext *cx, JSScript *script); + +extern __attribute__((visibility("default"))) void +JS_ClearAllTrapsForCompartment(JSContext *cx); + +extern __attribute__((visibility("default"))) JSBool +JS_SetInterrupt(JSRuntime *rt, JSInterruptHook handler, void *closure); + +extern __attribute__((visibility("default"))) JSBool +JS_ClearInterrupt(JSRuntime *rt, JSInterruptHook *handlerp, void **closurep); + + + +extern __attribute__((visibility("default"))) JSBool +JS_SetWatchPoint(JSContext *cx, JSObject *obj, jsid id, + JSWatchPointHandler handler, JSObject *closure); + +extern __attribute__((visibility("default"))) JSBool +JS_ClearWatchPoint(JSContext *cx, JSObject *obj, jsid id, + JSWatchPointHandler *handlerp, JSObject **closurep); + +extern __attribute__((visibility("default"))) JSBool +JS_ClearWatchPointsForObject(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) JSBool +JS_ClearAllWatchPoints(JSContext *cx); + + + +extern __attribute__((visibility("default"))) unsigned +JS_PCToLineNumber(JSContext *cx, JSScript *script, jsbytecode *pc); + +extern __attribute__((visibility("default"))) jsbytecode * +JS_LineNumberToPC(JSContext *cx, JSScript *script, unsigned lineno); + +extern __attribute__((visibility("default"))) jsbytecode * +JS_EndPC(JSContext *cx, JSScript *script); + +extern __attribute__((visibility("default"))) JSBool +JS_GetLinePCs(JSContext *cx, JSScript *script, + unsigned startLine, unsigned maxLines, + unsigned* count, unsigned** lines, jsbytecode*** pcs); + +extern __attribute__((visibility("default"))) unsigned +JS_GetFunctionArgumentCount(JSContext *cx, JSFunction *fun); + +extern __attribute__((visibility("default"))) JSBool +JS_FunctionHasLocalNames(JSContext *cx, JSFunction *fun); + + + + + + +extern __attribute__((visibility("default"))) uintptr_t * +JS_GetFunctionLocalNameArray(JSContext *cx, JSFunction *fun, void **markp); + +extern __attribute__((visibility("default"))) JSAtom * +JS_LocalNameToAtom(uintptr_t w); + +extern __attribute__((visibility("default"))) JSString * +JS_AtomKey(JSAtom *atom); + +extern __attribute__((visibility("default"))) void +JS_ReleaseFunctionLocalNameArray(JSContext *cx, void *mark); + +extern __attribute__((visibility("default"))) JSScript * +JS_GetFunctionScript(JSContext *cx, JSFunction *fun); + +extern __attribute__((visibility("default"))) JSNative +JS_GetFunctionNative(JSContext *cx, JSFunction *fun); + +extern __attribute__((visibility("default"))) JSPrincipals * +JS_GetScriptPrincipals(JSScript *script); + +extern __attribute__((visibility("default"))) JSPrincipals * +JS_GetScriptOriginPrincipals(JSScript *script); +# 209 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsdbgapi.h" +extern __attribute__((visibility("default"))) JSStackFrame * +JS_FrameIterator(JSContext *cx, JSStackFrame **iteratorp); + +extern __attribute__((visibility("default"))) JSScript * +JS_GetFrameScript(JSContext *cx, JSStackFrame *fp); + +extern __attribute__((visibility("default"))) jsbytecode * +JS_GetFramePC(JSContext *cx, JSStackFrame *fp); + +extern __attribute__((visibility("default"))) void * +JS_GetFrameAnnotation(JSContext *cx, JSStackFrame *fp); + +extern __attribute__((visibility("default"))) void +JS_SetFrameAnnotation(JSContext *cx, JSStackFrame *fp, void *annotation); + +extern __attribute__((visibility("default"))) JSBool +JS_IsScriptFrame(JSContext *cx, JSStackFrame *fp); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetFrameScopeChain(JSContext *cx, JSStackFrame *fp); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetFrameCallObject(JSContext *cx, JSStackFrame *fp); + +extern __attribute__((visibility("default"))) JSBool +JS_GetFrameThis(JSContext *cx, JSStackFrame *fp, jsval *thisv); + +extern __attribute__((visibility("default"))) JSFunction * +JS_GetFrameFunction(JSContext *cx, JSStackFrame *fp); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetFrameFunctionObject(JSContext *cx, JSStackFrame *fp); + +__attribute__((visibility("default"))) JSFunction * +JS_GetScriptFunction(JSContext *cx, JSScript *script); + +extern __attribute__((visibility("default"))) JSObject * +JS_GetParentOrScopeChain(JSContext *cx, JSObject *obj); + + +#define JS_IsContructorFrame JS_IsConstructorFrame +extern __attribute__((visibility("default"))) JSBool +JS_IsConstructorFrame(JSContext *cx, JSStackFrame *fp); + +extern __attribute__((visibility("default"))) JSBool +JS_IsDebuggerFrame(JSContext *cx, JSStackFrame *fp); + +extern __attribute__((visibility("default"))) JSBool +JS_IsGlobalFrame(JSContext *cx, JSStackFrame *fp); + +extern __attribute__((visibility("default"))) jsval +JS_GetFrameReturnValue(JSContext *cx, JSStackFrame *fp); + +extern __attribute__((visibility("default"))) void +JS_SetFrameReturnValue(JSContext *cx, JSStackFrame *fp, jsval rval); + + + + + + +extern __attribute__((visibility("default"))) JSObject * +JS_GetFrameCalleeObject(JSContext *cx, JSStackFrame *fp); +# 281 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsdbgapi.h" +extern __attribute__((visibility("default"))) const char * +JS_GetDebugClassName(JSObject *obj); + + + +extern __attribute__((visibility("default"))) const char * +JS_GetScriptFilename(JSContext *cx, JSScript *script); + +extern __attribute__((visibility("default"))) const jschar * +JS_GetScriptSourceMap(JSContext *cx, JSScript *script); + +extern __attribute__((visibility("default"))) unsigned +JS_GetScriptBaseLineNumber(JSContext *cx, JSScript *script); + +extern __attribute__((visibility("default"))) unsigned +JS_GetScriptLineExtent(JSContext *cx, JSScript *script); + +extern __attribute__((visibility("default"))) JSVersion +JS_GetScriptVersion(JSContext *cx, JSScript *script); +# 308 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsdbgapi.h" +#define JS_SetNewScriptHook JS_SetNewScriptHookProc +#define JS_SetDestroyScriptHook JS_SetDestroyScriptHookProc + +extern __attribute__((visibility("default"))) void +JS_SetNewScriptHookProc(JSRuntime *rt, JSNewScriptHook hook, void *callerdata); + +extern __attribute__((visibility("default"))) void +JS_SetDestroyScriptHookProc(JSRuntime *rt, JSDestroyScriptHook hook, + void *callerdata); + + + +extern __attribute__((visibility("default"))) JSBool +JS_EvaluateUCInStackFrame(JSContext *cx, JSStackFrame *fp, + const jschar *chars, unsigned length, + const char *filename, unsigned lineno, + jsval *rval); + +extern __attribute__((visibility("default"))) JSBool +JS_EvaluateInStackFrame(JSContext *cx, JSStackFrame *fp, + const char *bytes, unsigned length, + const char *filename, unsigned lineno, + jsval *rval); + + + +typedef struct JSPropertyDesc { + jsval id; + jsval value; + uint8_t flags; + uint8_t spare; + uint16_t slot; + jsval alias; +} JSPropertyDesc; + +#define JSPD_ENUMERATE 0x01 +#define JSPD_READONLY 0x02 +#define JSPD_PERMANENT 0x04 +#define JSPD_ALIAS 0x08 +#define JSPD_ARGUMENT 0x10 +#define JSPD_VARIABLE 0x20 +#define JSPD_EXCEPTION 0x40 + +#define JSPD_ERROR 0x80 + + +typedef struct JSPropertyDescArray { + uint32_t length; + JSPropertyDesc *array; +} JSPropertyDescArray; + +typedef struct JSScopeProperty JSScopeProperty; + +extern __attribute__((visibility("default"))) JSBool +JS_GetPropertyDescArray(JSContext *cx, JSObject *obj, JSPropertyDescArray *pda); + +extern __attribute__((visibility("default"))) void +JS_PutPropertyDescArray(JSContext *cx, JSPropertyDescArray *pda); + + + +extern __attribute__((visibility("default"))) JSBool +JS_SetDebuggerHandler(JSRuntime *rt, JSDebuggerHandler hook, void *closure); + +extern __attribute__((visibility("default"))) JSBool +JS_SetSourceHandler(JSRuntime *rt, JSSourceHandler handler, void *closure); + +extern __attribute__((visibility("default"))) JSBool +JS_SetExecuteHook(JSRuntime *rt, JSInterpreterHook hook, void *closure); + +extern __attribute__((visibility("default"))) JSBool +JS_SetCallHook(JSRuntime *rt, JSInterpreterHook hook, void *closure); + +extern __attribute__((visibility("default"))) JSBool +JS_SetThrowHook(JSRuntime *rt, JSThrowHook hook, void *closure); + +extern __attribute__((visibility("default"))) JSBool +JS_SetDebugErrorHook(JSRuntime *rt, JSDebugErrorHook hook, void *closure); + + + +extern __attribute__((visibility("default"))) size_t +JS_GetObjectTotalSize(JSContext *cx, JSObject *obj); + +extern __attribute__((visibility("default"))) size_t +JS_GetFunctionTotalSize(JSContext *cx, JSFunction *fun); + +extern __attribute__((visibility("default"))) size_t +JS_GetScriptTotalSize(JSContext *cx, JSScript *script); + + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_IsSystemObject(JSContext *cx, JSObject *obj); + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_MakeSystemObject(JSContext *cx, JSObject *obj); + + + +extern __attribute__((visibility("default"))) void +js_RevertVersion(JSContext *cx); + +extern __attribute__((visibility("default"))) const JSDebugHooks * +JS_GetGlobalDebugHooks(JSRuntime *rt); +# 434 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsdbgapi.h" +extern __attribute__((visibility("default"))) JSBool +JS_StartProfiling(const char *profileName); + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_StopProfiling(const char *profileName); + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_DumpProfile(const char *outfile, const char *profileName); + + + + + + +extern __attribute__((visibility("default"))) JSBool +JS_PauseProfilers(const char *profileName); + + + + +extern __attribute__((visibility("default"))) JSBool +JS_ResumeProfilers(const char *profileName); + + + + +extern __attribute__((visibility("default"))) JSBool +JS_DefineProfilingFunctions(JSContext *cx, JSObject *obj); + + +extern __attribute__((visibility("default"))) JSBool +JS_DefineDebuggerObject(JSContext *cx, JSObject *obj); + + + + + + +__attribute__((visibility("default"))) const char * +JS_UnsafeGetLastProfilingError(); +# 514 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsdbgapi.h" +extern __attribute__((visibility("default"))) JSBool +js_StartPerf(); + +extern __attribute__((visibility("default"))) JSBool +js_StopPerf(); + + + +extern __attribute__((visibility("default"))) void +JS_DumpBytecode(JSContext *cx, JSScript *script); + +extern __attribute__((visibility("default"))) void +JS_DumpCompartmentBytecode(JSContext *cx); + +extern __attribute__((visibility("default"))) void +JS_DumpPCCounts(JSContext *cx, JSScript *script); + +extern __attribute__((visibility("default"))) void +JS_DumpCompartmentPCCounts(JSContext *cx); + +extern __attribute__((visibility("default"))) JSObject * +JS_UnwrapObject(JSObject *obj); + +extern __attribute__((visibility("default"))) JSObject * +JS_UnwrapObjectAndInnerize(JSObject *obj); + + +extern __attribute__((visibility("default"))) JSBool +js_CallContextDebugHandler(JSContext *cx); + +} +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.h" 1 + + + + + + + +#define jsopcode_h___ + + + + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.h" 2 + + + + +extern "C" { + + + + +typedef enum JSOp { +#define OPDEF(op,val,name,token,length,nuses,ndefs,prec,format) op = val, + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.tbl" 1 +# 80 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.tbl" +JSOP_NOP = 0, + + +JSOP_UNDEFINED = 1, +JSOP_POPV = 2, +JSOP_ENTERWITH = 3, +JSOP_LEAVEWITH = 4, +JSOP_RETURN = 5, +JSOP_GOTO = 6, +JSOP_IFEQ = 7, +JSOP_IFNE = 8, + + +JSOP_ARGUMENTS = 9, + +JSOP_SWAP = 10, +JSOP_POPN = 11, + + +JSOP_DUP = 12, +JSOP_DUP2 = 13, +JSOP_SETCONST = 14, +JSOP_BITOR = 15, +JSOP_BITXOR = 16, +JSOP_BITAND = 17, +JSOP_EQ = 18, +JSOP_NE = 19, +JSOP_LT = 20, +JSOP_LE = 21, +JSOP_GT = 22, +JSOP_GE = 23, +JSOP_LSH = 24, +JSOP_RSH = 25, +JSOP_URSH = 26, +JSOP_ADD = 27, +JSOP_SUB = 28, +JSOP_MUL = 29, +JSOP_DIV = 30, +JSOP_MOD = 31, +JSOP_NOT = 32, +JSOP_BITNOT = 33, +JSOP_NEG = 34, +JSOP_POS = 35, +JSOP_DELNAME = 36, +JSOP_DELPROP = 37, +JSOP_DELELEM = 38, +JSOP_TYPEOF = 39, +JSOP_VOID = 40, + +JSOP_INCNAME = 41, +JSOP_INCPROP = 42, +JSOP_INCELEM = 43, +JSOP_DECNAME = 44, +JSOP_DECPROP = 45, +JSOP_DECELEM = 46, +JSOP_NAMEINC = 47, +JSOP_PROPINC = 48, +JSOP_ELEMINC = 49, +JSOP_NAMEDEC = 50, +JSOP_PROPDEC = 51, +JSOP_ELEMDEC = 52, + +JSOP_GETPROP = 53, +JSOP_SETPROP = 54, +JSOP_GETELEM = 55, +JSOP_SETELEM = 56, +JSOP_CALLNAME = 57, +JSOP_CALL = 58, +JSOP_NAME = 59, +JSOP_DOUBLE = 60, +JSOP_STRING = 61, +JSOP_ZERO = 62, +JSOP_ONE = 63, +JSOP_NULL = 64, +JSOP_THIS = 65, +JSOP_FALSE = 66, +JSOP_TRUE = 67, +JSOP_OR = 68, +JSOP_AND = 69, + + +JSOP_TABLESWITCH = 70, +JSOP_LOOKUPSWITCH = 71, + + +JSOP_STRICTEQ = 72, +JSOP_STRICTNE = 73, + + + + + +JSOP_SETCALL = 74, +# 186 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.tbl" +JSOP_ITER = 75, +JSOP_MOREITER = 76, +JSOP_ITERNEXT = 77, +JSOP_ENDITER = 78, + +JSOP_FUNAPPLY = 79, + + +JSOP_OBJECT = 80, + + +JSOP_POP = 81, + + +JSOP_NEW = 82, + +JSOP_UNUSED0 = 83, + + +JSOP_GETARG = 84, +JSOP_SETARG = 85, +JSOP_GETLOCAL = 86, +JSOP_SETLOCAL = 87, + + +JSOP_UINT16 = 88, +# 221 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.tbl" +JSOP_NEWINIT = 89, +JSOP_NEWARRAY = 90, +JSOP_NEWOBJECT = 91, +JSOP_ENDINIT = 92, +JSOP_INITPROP = 93, +JSOP_INITELEM = 94, +JSOP_UNUSED14 = 95, +JSOP_UNUSED15 = 96, + + +JSOP_INCARG = 97, +JSOP_DECARG = 98, +JSOP_ARGINC = 99, +JSOP_ARGDEC = 100, + +JSOP_INCLOCAL = 101, +JSOP_DECLOCAL = 102, +JSOP_LOCALINC = 103, +JSOP_LOCALDEC = 104, + + +JSOP_LEAVEFORLETIN = 105, + + +JSOP_LABEL = 106, +JSOP_UNUSED3 = 107, + + +JSOP_FUNCALL = 108, + + +JSOP_LOOPHEAD = 109, + + +JSOP_BINDNAME = 110, +JSOP_SETNAME = 111, + + +JSOP_THROW = 112, + + +JSOP_IN = 113, +JSOP_INSTANCEOF = 114, + + +JSOP_DEBUGGER = 115, + + +JSOP_GOSUB = 116, +JSOP_RETSUB = 117, + + +JSOP_EXCEPTION = 118, + + +JSOP_LINENO = 119, + + + + + + +JSOP_CONDSWITCH = 120, +JSOP_CASE = 121, +JSOP_DEFAULT = 122, + + + + +JSOP_EVAL = 123, + + + + +JSOP_ENUMELEM = 124, + + + + + + +JSOP_GETTER = 125, +JSOP_SETTER = 126, + + + + +JSOP_DEFFUN = 127, +JSOP_DEFCONST = 128, +JSOP_DEFVAR = 129, + + +JSOP_LAMBDA = 130, + + +JSOP_CALLEE = 131, + +JSOP_UNUSED31 = 132, + + +JSOP_PICK = 133, + + + + + +JSOP_TRY = 134, +JSOP_FINALLY = 135, +# 337 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.tbl" +JSOP_GETALIASEDVAR = 136, +JSOP_CALLALIASEDVAR = 137, +JSOP_SETALIASEDVAR = 138, +JSOP_INCALIASEDVAR = 139, +JSOP_DECALIASEDVAR = 140, +JSOP_ALIASEDVARINC = 141, +JSOP_ALIASEDVARDEC = 142, + + +JSOP_UNUSED8 = 143, +JSOP_UNUSED9 = 144, +JSOP_UNUSED10 = 145, +JSOP_UNUSED11 = 146, +JSOP_UNUSED12 = 147, +JSOP_UNUSED13 = 148, + + +JSOP_BACKPATCH = 149, +JSOP_BACKPATCH_POP = 150, + + +JSOP_THROWING = 151, + + +JSOP_SETRVAL = 152, +JSOP_RETRVAL = 153, + + +JSOP_GETGNAME = 154, +JSOP_SETGNAME = 155, +JSOP_INCGNAME = 156, +JSOP_DECGNAME = 157, +JSOP_GNAMEINC = 158, +JSOP_GNAMEDEC = 159, + + +JSOP_REGEXP = 160, + + +JSOP_DEFXMLNS = 161, +JSOP_ANYNAME = 162, +JSOP_QNAMEPART = 163, +JSOP_QNAMECONST = 164, +JSOP_QNAME = 165, +JSOP_TOATTRNAME = 166, +JSOP_TOATTRVAL = 167, +JSOP_ADDATTRNAME = 168, +JSOP_ADDATTRVAL = 169, +JSOP_BINDXMLNAME = 170, +JSOP_SETXMLNAME = 171, +JSOP_XMLNAME = 172, +JSOP_DESCENDANTS = 173, +JSOP_FILTER = 174, +JSOP_ENDFILTER = 175, +JSOP_TOXML = 176, +JSOP_TOXMLLIST = 177, +JSOP_XMLTAGEXPR = 178, +JSOP_XMLELTEXPR = 179, +JSOP_XMLCDATA = 180, +JSOP_XMLCOMMENT = 181, +JSOP_XMLPI = 182, +JSOP_DELDESC = 183, + +JSOP_CALLPROP = 184, + + +JSOP_ENTERLET0 = 185, + + +JSOP_ENTERLET1 = 186, + + + + +JSOP_UINT24 = 187, + +JSOP_UNUSED18 = 188, +JSOP_UNUSED19 = 189, +JSOP_UNUSED20 = 190, + + + + +JSOP_STARTXML = 191, +JSOP_STARTXMLEXPR = 192, + +JSOP_CALLELEM = 193, + + + + + +JSOP_STOP = 194, + + + + + +JSOP_GETXPROP = 195, + +JSOP_CALLXMLNAME = 196, + + + + +JSOP_TYPEOFEXPR = 197, + + + + +JSOP_ENTERBLOCK = 198, +JSOP_LEAVEBLOCK = 199, + + +JSOP_UNUSED1 = 200, +JSOP_UNUSED2 = 201, + + + + +JSOP_GENERATOR = 202, +JSOP_YIELD = 203, +JSOP_ARRAYPUSH = 204, + + + + +JSOP_GETFUNNS = 205, + + + + +JSOP_ENUMCONSTELEM = 206, + + + + + +JSOP_LEAVEBLOCKEXPR = 207, + +JSOP_UNUSED21 = 208, +JSOP_UNUSED22 = 209, +JSOP_UNUSED23 = 210, + +JSOP_CALLGNAME = 211, +JSOP_CALLLOCAL = 212, +JSOP_CALLARG = 213, +JSOP_BINDGNAME = 214, + + + + +JSOP_INT8 = 215, +JSOP_INT32 = 216, + + + + +JSOP_LENGTH = 217, + + + + + + +JSOP_HOLE = 218, + +JSOP_UNUSED17 = 219, +JSOP_UNUSED24 = 220, +JSOP_UNUSED25 = 221, +JSOP_UNUSED29 = 222, +JSOP_UNUSED30 = 223, + +JSOP_REST = 224, + + +JSOP_TOID = 225, + + +JSOP_IMPLICITTHIS = 226, + + +JSOP_LOOPENTRY = 227, + +JSOP_ACTUALSFILLED = 228, +# 27 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.h" 2 +#undef OPDEF + JSOP_LIMIT, + + + + + + + JSOP_GETPROP2 = JSOP_LIMIT, + JSOP_GETELEM2 = JSOP_LIMIT + 1, + JSOP_FORLOCAL = JSOP_LIMIT + 2, + JSOP_FAKE_LIMIT = JSOP_FORLOCAL +} JSOp; + + + + +#define JOF_BYTE 0 +#define JOF_JUMP 1 +#define JOF_ATOM 2 +#define JOF_UINT16 3 +#define JOF_TABLESWITCH 4 +#define JOF_LOOKUPSWITCH 5 +#define JOF_QARG 6 +#define JOF_LOCAL 7 +#define JOF_DOUBLE 8 +#define JOF_UINT24 12 +#define JOF_UINT8 13 + +#define JOF_INT32 14 +#define JOF_OBJECT 15 +#define JOF_SLOTOBJECT 16 +#define JOF_REGEXP 17 +#define JOF_INT8 18 +#define JOF_ATOMOBJECT 19 +#define JOF_UINT16PAIR 20 +#define JOF_SCOPECOORD 21 +#define JOF_TYPEMASK 0x001f + +#define JOF_NAME (1U<<5) +#define JOF_PROP (2U<<5) +#define JOF_ELEM (3U<<5) +#define JOF_XMLNAME (4U<<5) +#define JOF_MODEMASK (7U<<5) +#define JOF_SET (1U<<8) +#define JOF_DEL (1U<<9) +#define JOF_DEC (1U<<10) +#define JOF_INC (2U<<10) +#define JOF_INCDEC (3U<<10) +#define JOF_POST (1U<<12) +#define JOF_ASSIGNING JOF_SET + +#define JOF_DETECTING (1U<<14) +#define JOF_BACKPATCH (1U<<15) +#define JOF_LEFTASSOC (1U<<16) +#define JOF_DECLARING (1U<<17) + +#define JOF_PARENHEAD (1U<<20) + +#define JOF_INVOKE (1U<<21) +#define JOF_TMPSLOT (1U<<22) + + +#define JOF_TMPSLOT2 (2U<<22) + +#define JOF_TMPSLOT3 (3U<<22) + +#define JOF_TMPSLOT_SHIFT 22 +#define JOF_TMPSLOT_MASK (JS_BITMASK(2) << JOF_TMPSLOT_SHIFT) + + +#define JOF_GNAME (1U<<25) +#define JOF_TYPESET (1U<<26) +#define JOF_DECOMPOSE (1U<<27) + +#define JOF_ARITH (1U<<28) + + +#define JOF_TYPE(fmt) ((fmt) & JOF_TYPEMASK) +#define JOF_OPTYPE(op) JOF_TYPE(js_CodeSpec[op].format) + + +#define JOF_MODE(fmt) ((fmt) & JOF_MODEMASK) +#define JOF_OPMODE(op) JOF_MODE(js_CodeSpec[op].format) + +#define JOF_TYPE_IS_EXTENDED_JUMP(t) ((unsigned)((t) - JOF_JUMP) <= (unsigned)(JOF_LOOKUPSWITCH - JOF_JUMP)) + + + + + + +static __attribute__((always_inline)) inline uint8_t +GET_UINT8(jsbytecode *pc) +{ + return (uint8_t) pc[1]; +} + +static __attribute__((always_inline)) inline void +SET_UINT8(jsbytecode *pc, uint8_t u) +{ + pc[1] = (jsbytecode) u; +} + + +#define UINT16_LEN 2 +#define UINT16_HI(i) ((jsbytecode)((i) >> 8)) +#define UINT16_LO(i) ((jsbytecode)(i)) +#define GET_UINT16(pc) ((unsigned)(((pc)[1] << 8) | (pc)[2])) +#define SET_UINT16(pc,i) ((pc)[1] = UINT16_HI(i), (pc)[2] = UINT16_LO(i)) +#define UINT16_LIMIT ((unsigned)1 << 16) + + +#define JUMP_OFFSET_LEN 4 +#define JUMP_OFFSET_MIN INT32_MIN +#define JUMP_OFFSET_MAX INT32_MAX + +static __attribute__((always_inline)) inline int32_t +GET_JUMP_OFFSET(jsbytecode *pc) +{ + return (pc[1] << 24) | (pc[2] << 16) | (pc[3] << 8) | pc[4]; +} + +static __attribute__((always_inline)) inline void +SET_JUMP_OFFSET(jsbytecode *pc, int32_t off) +{ + pc[1] = (jsbytecode)(off >> 24); + pc[2] = (jsbytecode)(off >> 16); + pc[3] = (jsbytecode)(off >> 8); + pc[4] = (jsbytecode)off; +} + +#define UINT32_INDEX_LEN 4 + +static __attribute__((always_inline)) inline uint32_t +GET_UINT32_INDEX(const jsbytecode *pc) +{ + return (pc[1] << 24) | (pc[2] << 16) | (pc[3] << 8) | pc[4]; +} + +static __attribute__((always_inline)) inline void +SET_UINT32_INDEX(jsbytecode *pc, uint32_t index) +{ + pc[1] = (jsbytecode)(index >> 24); + pc[2] = (jsbytecode)(index >> 16); + pc[3] = (jsbytecode)(index >> 8); + pc[4] = (jsbytecode)index; +} + +#define UINT24_HI(i) ((jsbytecode)((i) >> 16)) +#define UINT24_MID(i) ((jsbytecode)((i) >> 8)) +#define UINT24_LO(i) ((jsbytecode)(i)) +#define GET_UINT24(pc) ((jsatomid)(((pc)[1] << 16) | ((pc)[2] << 8) | (pc)[3])) + + +#define SET_UINT24(pc,i) ((pc)[1] = UINT24_HI(i), (pc)[2] = UINT24_MID(i), (pc)[3] = UINT24_LO(i)) + + + +#define GET_INT8(pc) (int8_t((pc)[1])) + +#define GET_INT32(pc) (((uint32_t((pc)[1]) << 24) | (uint32_t((pc)[2]) << 16) | (uint32_t((pc)[3]) << 8) | uint32_t((pc)[4]))) + + + +#define SET_INT32(pc,i) ((pc)[1] = (jsbytecode)(uint32_t(i) >> 24), (pc)[2] = (jsbytecode)(uint32_t(i) >> 16), (pc)[3] = (jsbytecode)(uint32_t(i) >> 8), (pc)[4] = (jsbytecode)uint32_t(i)) + + + + + +#define INDEX_LIMIT_LOG2 23 +#define INDEX_LIMIT (uint32_t(1) << INDEX_LIMIT_LOG2) + + +#define ARGC_HI(argc) UINT16_HI(argc) +#define ARGC_LO(argc) UINT16_LO(argc) +#define GET_ARGC(pc) GET_UINT16(pc) +#define ARGC_LIMIT UINT16_LIMIT + + +#define GET_ARGNO(pc) GET_UINT16(pc) +#define SET_ARGNO(pc,argno) SET_UINT16(pc,argno) +#define ARGNO_LEN 2 +#define ARGNO_LIMIT UINT16_LIMIT + +#define GET_SLOTNO(pc) GET_UINT16(pc) +#define SET_SLOTNO(pc,varno) SET_UINT16(pc,varno) +#define SLOTNO_LEN 2 +#define SLOTNO_LIMIT UINT16_LIMIT + +struct JSCodeSpec { + int8_t length; + int8_t nuses; + int8_t ndefs; + uint8_t prec; + uint32_t format; + + uint32_t type() const { return ((format) & 0x001f); } +}; + +extern const JSCodeSpec js_CodeSpec[]; +extern unsigned js_NumCodeSpecs; +extern const char *js_CodeName[]; +extern const char js_EscapeMap[]; +# 244 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.h" +extern JSString * +js_QuoteString(JSContext *cx, JSString *str, jschar quote); +# 258 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.h" +extern JSPrinter * +js_NewPrinter(JSContext *cx, const char *name, JSFunction *fun, + unsigned indent, JSBool pretty, JSBool grouped, JSBool strict); + +extern void +js_DestroyPrinter(JSPrinter *jp); + +extern JSString * +js_GetPrinterOutput(JSPrinter *jp); + +extern int +js_printf(JSPrinter *jp, const char *format, ...); + +extern JSBool +js_puts(JSPrinter *jp, const char *s); + +#define GET_ATOM_FROM_BYTECODE(script,pc,pcoff,atom) JS_BEGIN_MACRO JS_ASSERT(js_CodeSpec[*(pc)].format & JOF_ATOM); (atom) = (script)->getAtom(GET_UINT32_INDEX((pc) + (pcoff))); JS_END_MACRO + + + + + +#define GET_NAME_FROM_BYTECODE(script,pc,pcoff,name) JS_BEGIN_MACRO JSAtom *atom_; GET_ATOM_FROM_BYTECODE(script, pc, pcoff, atom_); JS_ASSERT(js_CodeSpec[*(pc)].format & (JOF_NAME | JOF_PROP)); (name) = atom_->asPropertyName(); JS_END_MACRO + + + + + + + +namespace js { + +extern unsigned +StackUses(JSScript *script, jsbytecode *pc); + +extern unsigned +StackDefs(JSScript *script, jsbytecode *pc); + +} + + + + +extern JSBool +js_DecompileScript(JSPrinter *jp, JSScript *script); + +extern JSBool +js_DecompileFunctionBody(JSPrinter *jp); + +extern JSBool +js_DecompileFunction(JSPrinter *jp); +# 317 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.h" +typedef JSBool (* JSDecompilerPtr)(JSPrinter *); + +extern JSString * +js_DecompileToString(JSContext *cx, const char *name, JSFunction *fun, + unsigned indent, JSBool pretty, JSBool grouped, JSBool strict, + JSDecompilerPtr decompiler); +# 336 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsopcode.h" +extern char * +js_DecompileValueGenerator(JSContext *cx, int spindex, jsval v, + JSString *fallback); + + + + + +extern unsigned +js_ReconstructStackDepth(JSContext *cx, JSScript *script, jsbytecode *pc); + + + + + +} + +#define JSDVG_IGNORE_STACK 0 +#define JSDVG_SEARCH_STACK 1 + + + + +extern size_t +js_GetVariableBytecodeLength(jsbytecode *pc); + +namespace js { + +static inline char * +DecompileValueGenerator(JSContext *cx, int spindex, const Value &v, + JSString *fallback) +{ + return js_DecompileValueGenerator(cx, spindex, v, fallback); +} + + + + +class Sprinter +{ + public: + struct InvariantChecker + { + const Sprinter *parent; + + explicit InvariantChecker(const Sprinter *p) : parent(p) { + parent->checkInvariants(); + } + + ~InvariantChecker() { + parent->checkInvariants(); + } + }; + + JSContext *context; + + private: + static const size_t DefaultSize; + + + + char *base; + size_t size; + ptrdiff_t offset; + + bool realloc_(size_t newSize); + + public: + explicit Sprinter(JSContext *cx); + ~Sprinter(); + + + bool init(); + + void checkInvariants() const; + + const char *string() const; + const char *stringEnd() const; + + char *stringAt(ptrdiff_t off) const; + + char &operator[](size_t off); + + bool empty() const; + + + + + + + char *reserve(size_t len); + + char *reserveAndClear(size_t len); + + + + + + ptrdiff_t put(const char *s, size_t len); + ptrdiff_t put(const char *s); + ptrdiff_t putString(JSString *str); + + + int printf(const char *fmt, ...); + + + void setOffset(const char *end); + void setOffset(ptrdiff_t off); + + + ptrdiff_t getOffset() const; + ptrdiff_t getOffsetOf(const char *string) const; +}; + +extern ptrdiff_t +Sprint(Sprinter *sp, const char *format, ...); + +extern bool +CallResultEscapes(jsbytecode *pc); + +static inline unsigned +GetDecomposeLength(jsbytecode *pc, size_t len) +{ + + + + + do { } while(0); + return (unsigned) pc[len - 1]; +} + +static inline unsigned +GetBytecodeLength(jsbytecode *pc) +{ + JSOp op = (JSOp)*pc; + do { } while(0); + + if (js_CodeSpec[op].length != -1) + return js_CodeSpec[op].length; + return js_GetVariableBytecodeLength(pc); +} + +extern bool +IsValidBytecodeOffset(JSContext *cx, JSScript *script, size_t offset); + +inline bool +FlowsIntoNext(JSOp op) +{ + + return op != JSOP_STOP && op != JSOP_RETURN && op != JSOP_RETRVAL && op != JSOP_THROW && + op != JSOP_GOTO && op != JSOP_RETSUB; +} + + + + + + +class PCCounts +{ + friend struct ::JSScript; + double *counts; + + + + + public: + + enum BaseCounts { + BASE_INTERP = 0, + BASE_METHODJIT, + + BASE_METHODJIT_STUBS, + BASE_METHODJIT_CODE, + BASE_METHODJIT_PICS, + + BASE_LIMIT + }; + + enum AccessCounts { + ACCESS_MONOMORPHIC = BASE_LIMIT, + ACCESS_DIMORPHIC, + ACCESS_POLYMORPHIC, + + ACCESS_BARRIER, + ACCESS_NOBARRIER, + + ACCESS_UNDEFINED, + ACCESS_NULL, + ACCESS_BOOLEAN, + ACCESS_INT32, + ACCESS_DOUBLE, + ACCESS_STRING, + ACCESS_OBJECT, + + ACCESS_LIMIT + }; + + static bool accessOp(JSOp op) { + + + + + if (op == JSOP_SETELEM || op == JSOP_SETPROP) + return true; + int format = js_CodeSpec[op].format; + return !!(format & ((1U<<5) | (1U<<25) | (3U<<5) | (2U<<5))) + && !(format & ((1U<<8) | (3U<<10))); + } + + enum ElementCounts { + ELEM_ID_INT = ACCESS_LIMIT, + ELEM_ID_DOUBLE, + ELEM_ID_OTHER, + ELEM_ID_UNKNOWN, + + ELEM_OBJECT_TYPED, + ELEM_OBJECT_PACKED, + ELEM_OBJECT_DENSE, + ELEM_OBJECT_OTHER, + + ELEM_LIMIT + }; + + static bool elementOp(JSOp op) { + return accessOp(op) && (((js_CodeSpec[op].format) & (7U<<5)) == (3U<<5)); + } + + enum PropertyCounts { + PROP_STATIC = ACCESS_LIMIT, + PROP_DEFINITE, + PROP_OTHER, + + PROP_LIMIT + }; + + static bool propertyOp(JSOp op) { + return accessOp(op) && (((js_CodeSpec[op].format) & (7U<<5)) == (2U<<5)); + } + + enum ArithCounts { + ARITH_INT = BASE_LIMIT, + ARITH_DOUBLE, + ARITH_OTHER, + ARITH_UNKNOWN, + + ARITH_LIMIT + }; + + static bool arithOp(JSOp op) { + return !!(js_CodeSpec[op].format & ((3U<<10) | (1U<<28))); + } + + static size_t numCounts(JSOp op) + { + if (accessOp(op)) { + if (elementOp(op)) + return ELEM_LIMIT; + if (propertyOp(op)) + return PROP_LIMIT; + return ACCESS_LIMIT; + } + if (arithOp(op)) + return ARITH_LIMIT; + return BASE_LIMIT; + } + + static const char *countName(JSOp op, size_t which); + + double *rawCounts() { return counts; } + + double& get(size_t which) { + do { } while(0); + return counts[which]; + } + + + operator void*() const { + return counts; + } +}; + +} +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscope.h" 1 +# 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" 2 + + + + + + + +typedef enum JSTryNoteKind { + JSTRY_CATCH, + JSTRY_FINALLY, + JSTRY_ITER +} JSTryNoteKind; + + + + +struct JSTryNote { + uint8_t kind; + uint8_t padding; + uint16_t stackDepth; + uint32_t start; + + uint32_t length; +}; + +namespace js { + +struct ConstArray { + js::HeapValue *vector; + uint32_t length; +}; + +struct ObjectArray { + js::HeapPtrObject *vector; + uint32_t length; +}; + +struct TryNoteArray { + JSTryNote *vector; + uint32_t length; +}; + +struct ClosedSlotArray { + uint32_t *vector; + uint32_t length; +}; + +struct Shape; + +enum BindingKind { NONE, ARGUMENT, VARIABLE, CONSTANT }; + +struct BindingName { + JSAtom *maybeAtom; + BindingKind kind; +}; + +typedef Vector BindingNames; + + + + + + + +class Bindings +{ + HeapPtr lastBinding; + uint16_t nargs; + uint16_t nvars; + bool hasDup_:1; + + inline Shape *initialShape(JSContext *cx) const; + public: + inline Bindings(JSContext *cx); + + + + + + + inline void transfer(JSContext *cx, Bindings *bindings); + + + + + + + inline void clone(JSContext *cx, Bindings *bindings); + + uint16_t numArgs() const { return nargs; } + uint16_t numVars() const { return nvars; } + unsigned count() const { return nargs + nvars; } + + + + + + bool bindingIsArg(uint16_t i) const { return i < nargs; } + bool bindingIsLocal(uint16_t i) const { return i >= nargs; } + uint16_t argToBinding(uint16_t i) { do { } while(0); return i; } + uint16_t localToBinding(uint16_t i) { return i + nargs; } + uint16_t bindingToArg(uint16_t i) { do { } while(0); return i; } + uint16_t bindingToLocal(uint16_t i) { do { } while(0); return i - nargs; } + + + inline bool ensureShape(JSContext *cx); + + + inline Shape *lastShape() const; + + + + + + Shape *callObjectShape(JSContext *cx) const; + + + inline bool extensibleParents(); + bool setExtensibleParents(JSContext *cx); + + bool setParent(JSContext *cx, JSObject *obj); + + enum { + + BINDING_COUNT_LIMIT = 0xFFFF + }; +# 162 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" + bool add(JSContext *cx, HandleAtom name, BindingKind kind); + + + bool addVariable(JSContext *cx, HandleAtom name) { + return add(cx, name, VARIABLE); + } + bool addConstant(JSContext *cx, HandleAtom name) { + return add(cx, name, CONSTANT); + } + bool addArgument(JSContext *cx, HandleAtom name, uint16_t *slotp) { + do { } while(0); + *slotp = nargs; + return add(cx, name, ARGUMENT); + } + bool addDestructuring(JSContext *cx, uint16_t *slotp) { + *slotp = nargs; + return add(cx, RootedAtom(cx), ARGUMENT); + } + + void noteDup() { hasDup_ = true; } + bool hasDup() const { return hasDup_; } + + + + + + + + BindingKind lookup(JSContext *cx, JSAtom *name, unsigned *indexp) const; + + + bool hasBinding(JSContext *cx, JSAtom *name) const { + return lookup(cx, name, __null) != NONE; + } +# 206 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" + bool getLocalNameArray(JSContext *cx, BindingNames *namesp); + + + + + + + void makeImmutable(); +# 224 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" + const js::Shape *lastArgument() const; + const js::Shape *lastVariable() const; + + void trace(JSTracer *trc); + + class AutoRooter : private AutoGCRooter + { + public: + explicit AutoRooter(JSContext *cx, Bindings *bindings_ + ) + : AutoGCRooter(cx, BINDINGS), bindings(bindings_), skip(cx, bindings_) + { + do { } while (0); + } + + friend void AutoGCRooter::trace(JSTracer *trc); + void trace(JSTracer *trc); + + private: + Bindings *bindings; + SkipRoot skip; + + }; +}; + +} + +#define JS_OBJECT_ARRAY_SIZE(length) (offsetof(ObjectArray, vector) + sizeof(JSObject *) * (length)) + + + +namespace JSC { + class ExecutablePool; +} + +namespace js { +namespace mjit { + struct JITScript; + class CallCompiler; +} +} + + + +namespace js { + +namespace analyze { class ScriptAnalysis; } + +class ScriptCounts +{ + friend struct ::JSScript; + friend struct ScriptAndCounts; + + + + + + PCCounts *pcCountsVector; + + public: + ScriptCounts() : pcCountsVector(__null) { } + + inline void destroy(FreeOp *fop); + + void set(js::ScriptCounts counts) { + pcCountsVector = counts.pcCountsVector; + } +}; + +typedef HashMap, + SystemAllocPolicy> ScriptCountsMap; + +typedef HashMap, + SystemAllocPolicy> SourceMapMap; + +class DebugScript +{ + friend struct ::JSScript; +# 314 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" + uint32_t stepMode; + + + uint32_t numSites; + + + + + + BreakpointSite *breakpoints[1]; +}; + +typedef HashMap, + SystemAllocPolicy> DebugScriptMap; + +} + +struct JSScript : public js::gc::Cell +{ + private: + static const uint32_t stepFlagMask = 0x80000000U; + static const uint32_t stepCountMask = 0x7fffffffU; + + public: + + + + + + class JITScriptHandle + { + + + friend class js::mjit::CallCompiler; +# 358 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" + static const js::mjit::JITScript *UNJITTABLE; + js::mjit::JITScript *value; + + public: + JITScriptHandle() { value = __null; } + + bool isEmpty() { return value == __null; } + bool isUnjittable() { return value == UNJITTABLE; } + bool isValid() { return value > UNJITTABLE; } + + js::mjit::JITScript *getValid() { + do { } while(0); + return value; + } + + void setEmpty() { value = __null; } + void setUnjittable() { value = const_cast(UNJITTABLE); } + void setValid(js::mjit::JITScript *jit) { + value = jit; + do { } while(0); + } + + static void staticAsserts(); + }; + + + struct JITScriptSet + { + JITScriptHandle jitHandleNormal; + JITScriptHandle jitHandleNormalBarriered; + JITScriptHandle jitHandleCtor; + JITScriptHandle jitHandleCtorBarriered; + + static size_t jitHandleOffset(bool constructing, bool barriers) { + return constructing + ? (barriers + ? __builtin_offsetof (JITScriptSet, jitHandleCtorBarriered) + : __builtin_offsetof (JITScriptSet, jitHandleCtor)) + : (barriers + ? __builtin_offsetof (JITScriptSet, jitHandleNormalBarriered) + : __builtin_offsetof (JITScriptSet, jitHandleNormal)); + } + }; +# 411 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" + public: + js::Bindings bindings; + + + + + public: + jsbytecode *code; + uint8_t *data; + + + const char *filename; + js::HeapPtrAtom *atoms; + + JSPrincipals *principals; + JSPrincipals *originPrincipals; +# 439 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" + js::HeapPtr globalObject; + + + js::types::TypeScript *types; + + private: + + JITScriptSet *jitInfo; + + + js::HeapPtrFunction function_; + + + + public: + uint32_t length; + + uint32_t lineno; + + uint32_t mainOffset; + + + uint32_t natoms; + + private: + uint32_t useCount; + + + + + uint32_t pad32; +# 482 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" + private: + uint16_t version; + + public: + uint16_t nfixed; + + + uint16_t nTypeSets; + + + uint16_t nslots; + uint16_t staticLevel; + + private: + uint16_t argsSlot_; + + + + public: + + enum ArrayKind { + CONSTS, + OBJECTS, + REGEXPS, + TRYNOTES, + CLOSED_ARGS, + CLOSED_VARS, + LIMIT + }; + + typedef uint8_t ArrayBitsT; + + private: + + + + ArrayBitsT hasArrayBits; + + + + public: + bool noScriptRval:1; + + bool savedCallerFun:1; + bool strictModeCode:1; + bool compileAndGo:1; + bool bindingsAccessedDynamically:1; + bool warnedAboutTwoArgumentEval:1; + + + bool warnedAboutUndefinedProp:1; + + + bool hasSingletons:1; + bool isOuterFunction:1; + bool isInnerFunction:1; + + bool isActiveEval:1; + bool isCachedEval:1; + bool uninlineable:1; + bool reentrantOuterFunction:1; + bool typesPurged:1; + + bool debugMode:1; + bool failedBoundsCheck:1; + + bool callDestroyHook:1; + bool isGenerator:1; + bool hasScriptCounts:1; + + bool hasSourceMap:1; + + bool hasDebugScript:1; + + + private: + + bool argsHasLocalBinding_:1; + bool needsArgsAnalysis_:1; + bool needsArgsObj_:1; +# 578 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" + public: + static JSScript *NewScript(JSContext *cx, uint32_t length, uint32_t nsrcnotes, uint32_t natoms, + uint32_t nobjects, uint32_t nregexps, + uint32_t ntrynotes, uint32_t nconsts, + uint16_t nClosedArgs, uint16_t nClosedVars, uint32_t nTypeSets, + JSVersion version); + static JSScript *NewScriptFromEmitter(JSContext *cx, js::BytecodeEmitter *bce); + + void setVersion(JSVersion v) { version = v; } + + + bool argumentsHasLocalBinding() const { return argsHasLocalBinding_; } + jsbytecode *argumentsBytecode() const { do { } while(0); return code; } + unsigned argumentsLocalSlot() const { do { } while(0); return argsSlot_; } + void setArgumentsHasLocalBinding(uint16_t slot); +# 604 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" + bool analyzedArgsUsage() const { return !needsArgsAnalysis_; } + bool needsArgsObj() const { do { } while(0); return needsArgsObj_; } + void setNeedsArgsObj(bool needsArgsObj); + static bool applySpeculationFailed(JSContext *cx, JSScript *script); +# 618 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" + bool argsObjAliasesFormals() const { + return needsArgsObj() && !strictModeCode; + } + + + JSScript *&evalHashLink() { return *globalObject.unsafeGetUnioned(); } + + + + + + JSFunction *function() const { return function_; } + void setFunction(JSFunction *fun); + + + + + unsigned id() { return 0; } + + + + inline bool ensureHasTypes(JSContext *cx); + + + + + + + + inline bool ensureRanAnalysis(JSContext *cx, JSObject *scope); + + + inline bool ensureRanInference(JSContext *cx); + + inline bool hasAnalysis(); + inline void clearAnalysis(); + inline js::analyze::ScriptAnalysis *analysis(); + + + + + + bool typeSetFunction(JSContext *cx, JSFunction *fun, bool singleton = false); + + inline bool hasGlobal() const; + inline bool hasClearedGlobal() const; + + inline js::GlobalObject *global() const; + inline js::types::TypeScriptNesting *nesting() const; + + inline void clearNesting(); + + + js::GlobalObject *getGlobalObjectOrNull() const { + return (isCachedEval || isActiveEval) ? __null : globalObject.get(); + } + + private: + bool makeTypes(JSContext *cx); + bool makeAnalysis(JSContext *cx); + + + private: + + + friend class js::mjit::CallCompiler; + + public: + bool hasJITInfo() { + return jitInfo != __null; + } + + static size_t offsetOfJITInfo() { return __builtin_offsetof (JSScript, jitInfo); } + + inline bool ensureHasJITInfo(JSContext *cx); + inline void destroyJITInfo(js::FreeOp *fop); + + JITScriptHandle *jitHandle(bool constructing, bool barriers) { + do { } while(0); + return constructing + ? (barriers ? &jitInfo->jitHandleCtorBarriered : &jitInfo->jitHandleCtor) + : (barriers ? &jitInfo->jitHandleNormalBarriered : &jitInfo->jitHandleNormal); + } + + js::mjit::JITScript *getJIT(bool constructing, bool barriers) { + if (!jitInfo) + return __null; + JITScriptHandle *jith = jitHandle(constructing, barriers); + return jith->isValid() ? jith->getValid() : __null; + } + + static void ReleaseCode(js::FreeOp *fop, JITScriptHandle *jith); + + + inline void **nativeMap(bool constructing); + inline void *nativeCodeForPC(bool constructing, jsbytecode *pc); + + uint32_t getUseCount() const { return useCount; } + uint32_t incUseCount() { return ++useCount; } + uint32_t *addressOfUseCount() { return &useCount; } + void resetUseCount() { useCount = 0; } + + + + + + + size_t sizeOfJitScripts(JSMallocSizeOfFun mallocSizeOf); + + + public: + bool initScriptCounts(JSContext *cx); + js::PCCounts getPCCounts(jsbytecode *pc); + js::ScriptCounts releaseScriptCounts(); + void destroyScriptCounts(js::FreeOp *fop); + + bool setSourceMap(JSContext *cx, jschar *sourceMap); + jschar *getSourceMap(); + jschar *releaseSourceMap(); + void destroySourceMap(js::FreeOp *fop); + + jsbytecode *main() { + return code + mainOffset; + } + + + + + + + size_t computedSizeOfData(); + size_t sizeOfData(JSMallocSizeOfFun mallocSizeOf); + + uint32_t numNotes(); + + + jssrcnote *notes() { return (jssrcnote *)(code + length); } + + bool hasArray(ArrayKind kind) { return (hasArrayBits & (1 << kind)); } + void setHasArray(ArrayKind kind) { hasArrayBits |= (1 << kind); } + void cloneHasArray(JSScript *script) { hasArrayBits = script->hasArrayBits; } + + bool hasConsts() { return hasArray(CONSTS); } + bool hasObjects() { return hasArray(OBJECTS); } + bool hasRegexps() { return hasArray(REGEXPS); } + bool hasTrynotes() { return hasArray(TRYNOTES); } + bool hasClosedArgs() { return hasArray(CLOSED_ARGS); } + bool hasClosedVars() { return hasArray(CLOSED_VARS); } + +#define OFF(fooOff,hasFoo,t) (fooOff() + (hasFoo() ? sizeof(t) : 0)) + + size_t constsOffset() { return 0; } + size_t objectsOffset() { return (constsOffset() + (hasConsts() ? sizeof(js::ConstArray) : 0)); } + size_t regexpsOffset() { return (objectsOffset() + (hasObjects() ? sizeof(js::ObjectArray) : 0)); } + size_t trynotesOffset() { return (regexpsOffset() + (hasRegexps() ? sizeof(js::ObjectArray) : 0)); } + size_t closedArgsOffset() { return (trynotesOffset() + (hasTrynotes() ? sizeof(js::TryNoteArray) : 0)); } + size_t closedVarsOffset() { return (closedArgsOffset() + (hasClosedArgs() ? sizeof(js::ClosedSlotArray) : 0)); } + + js::ConstArray *consts() { + do { } while(0); + return reinterpret_cast(data + constsOffset()); + } + + js::ObjectArray *objects() { + do { } while(0); + return reinterpret_cast(data + objectsOffset()); + } + + js::ObjectArray *regexps() { + do { } while(0); + return reinterpret_cast(data + regexpsOffset()); + } + + js::TryNoteArray *trynotes() { + do { } while(0); + return reinterpret_cast(data + trynotesOffset()); + } + + js::ClosedSlotArray *closedArgs() { + do { } while(0); + return reinterpret_cast(data + closedArgsOffset()); + } + + js::ClosedSlotArray *closedVars() { + do { } while(0); + return reinterpret_cast(data + closedVarsOffset()); + } + + uint32_t numClosedArgs() { + return hasClosedArgs() ? closedArgs()->length : 0; + } + + uint32_t numClosedVars() { + return hasClosedVars() ? closedVars()->length : 0; + } + + js::HeapPtrAtom &getAtom(size_t index) const { + do { } while(0); + return atoms[index]; + } + + js::PropertyName *getName(size_t index) { + return getAtom(index)->asPropertyName(); + } + + JSObject *getObject(size_t index) { + js::ObjectArray *arr = objects(); + do { } while(0); + return arr->vector[index]; + } + + JSVersion getVersion() const { + return JSVersion(version); + } + + inline JSFunction *getFunction(size_t index); + inline JSFunction *getCallerFunction(); + + inline JSObject *getRegExp(size_t index); + + const js::Value &getConst(size_t index) { + js::ConstArray *arr = consts(); + do { } while(0); + return arr->vector[index]; + } + + + + + + + inline bool isEmpty() const; + + uint32_t getClosedArg(uint32_t index) { + js::ClosedSlotArray *arr = closedArgs(); + do { } while(0); + return arr->vector[index]; + } + + uint32_t getClosedVar(uint32_t index) { + js::ClosedSlotArray *arr = closedVars(); + do { } while(0); + return arr->vector[index]; + } +# 870 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" + private: + + + + + void recompileForStepMode(js::FreeOp *fop); + + + bool tryNewStepMode(JSContext *cx, uint32_t newValue); + + bool ensureHasDebugScript(JSContext *cx); + js::DebugScript *debugScript(); + js::DebugScript *releaseDebugScript(); + void destroyDebugScript(js::FreeOp *fop); + + public: + bool hasBreakpointsAt(jsbytecode *pc) { return !!getBreakpointSite(pc); } + bool hasAnyBreakpointsOrStepMode() { return hasDebugScript; } + + js::BreakpointSite *getBreakpointSite(jsbytecode *pc) + { + do { } while(0); + return hasDebugScript ? debugScript()->breakpoints[pc - code] : __null; + } + + js::BreakpointSite *getOrCreateBreakpointSite(JSContext *cx, jsbytecode *pc, + js::GlobalObject *scriptGlobal); + + void destroyBreakpointSite(js::FreeOp *fop, jsbytecode *pc); + + void clearBreakpointsIn(js::FreeOp *fop, js::Debugger *dbg, JSObject *handler); + void clearTraps(js::FreeOp *fop); + + void markTrapClosures(JSTracer *trc); + + + + + + + + bool setStepModeFlag(JSContext *cx, bool step); + + + + + + + + bool changeStepModeCount(JSContext *cx, int delta); + + bool stepModeEnabled() { return hasDebugScript && !!debugScript()->stepMode; } + + + + + + void finalize(js::FreeOp *fop); + + static inline void writeBarrierPre(JSScript *script); + static inline void writeBarrierPost(JSScript *script, void *addr); + + static inline js::ThingRootKind rootKind() { return js::THING_ROOT_SCRIPT; } + + static JSPrincipals *normalizeOriginPrincipals(JSPrincipals *principals, + JSPrincipals *originPrincipals) { + return originPrincipals ? originPrincipals : principals; + } + + void markChildren(JSTracer *trc); +}; + +typedef int moz_static_assert87[(sizeof(JSScript::ArrayBitsT) * 8 >= JSScript::LIMIT) ? 1 : -1]; + + +typedef int moz_static_assert88[(sizeof(JSScript) % js::gc::Cell::CellSize == 0) ? 1 : -1]; + +static inline unsigned +StackDepth(JSScript *script) +{ + return script->nslots - script->nfixed; +} + + + + + + + +extern __attribute__((visibility("default"))) void +js_CallNewScriptHook(JSContext *cx, JSScript *script, JSFunction *fun); + +namespace js { + +extern void +CallDestroyScriptHook(FreeOp *fop, JSScript *script); + +extern const char * +SaveScriptFilename(JSContext *cx, const char *filename); + +struct ScriptFilenameEntry +{ + bool marked; + char filename[1]; + + static ScriptFilenameEntry *fromFilename(const char *filename) { + return (ScriptFilenameEntry *)(filename - __builtin_offsetof (ScriptFilenameEntry, filename)); + } +}; + +struct ScriptFilenameHasher +{ + typedef const char *Lookup; + static HashNumber hash(const char *l) { return JS_HashString(l); } + static bool match(const ScriptFilenameEntry *e, const char *l) { + return strcmp(e->filename, l) == 0; + } +}; + +typedef HashSet ScriptFilenameTable; + +inline void +MarkScriptFilename(JSRuntime *rt, const char *filename); + +extern void +SweepScriptFilenames(JSRuntime *rt); + +extern void +FreeScriptFilenames(JSRuntime *rt); + +struct ScriptAndCounts +{ + JSScript *script; + ScriptCounts scriptCounts; + + PCCounts &getPCCounts(jsbytecode *pc) const { + do { } while(0); + return scriptCounts.pcCountsVector[pc - script->code]; + } +}; + +} + + + + + + +#define js_GetSrcNote(script,pc) js_GetSrcNoteCached(cx, script, pc) + +extern jssrcnote * +js_GetSrcNoteCached(JSContext *cx, JSScript *script, jsbytecode *pc); + +extern jsbytecode * +js_LineNumberToPC(JSScript *script, unsigned lineno); + +extern __attribute__((visibility("default"))) unsigned +js_GetScriptLineExtent(JSScript *script); + +namespace js { + +extern unsigned +PCToLineNumber(JSScript *script, jsbytecode *pc); + +extern unsigned +PCToLineNumber(unsigned startLine, jssrcnote *notes, jsbytecode *code, jsbytecode *pc); + +extern unsigned +CurrentLine(JSContext *cx); +# 1051 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscript.h" +enum LineOption { + CALLED_FROM_JSOP_EVAL, + NOT_CALLED_FROM_JSOP_EVAL +}; + +inline void +CurrentScriptFileLineOrigin(JSContext *cx, unsigned *linenop, LineOption = NOT_CALLED_FROM_JSOP_EVAL); + +extern JSScript * +CloneScript(JSContext *cx, JSScript *script); + + + + + + +template +bool +XDRScript(XDRState *xdr, JSScript **scriptp, JSScript *parentScript); + +} +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfun.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsstr.h" 1 +# 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfun.h" 2 +# 37 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfun.h" +#define JSFUN_PROTOTYPE 0x0800 + + +#define JSFUN_EXPR_CLOSURE 0x1000 +#define JSFUN_EXTENDED 0x2000 +#define JSFUN_INTERPRETED 0x4000 +#define JSFUN_NULL_CLOSURE 0x8000 +#define JSFUN_KINDMASK 0xc000 + + +namespace js { class FunctionExtended; } + +struct JSFunction : public JSObject +{ + uint16_t nargs; + + uint16_t flags; + union U { + js::Native native; + struct Scripted { + JSScript *script_; + + JSObject *env_; + + } i; + void *nativeOrScript; + } u; + js::HeapPtrAtom atom; + + bool hasDefaults() const { return flags & 0x0400; } + bool hasRest() const { return flags & 0x0100; } + bool isInterpreted() const { return kind() >= 0x4000; } + bool isNative() const { return !isInterpreted(); } + bool isNativeConstructor() const { return flags & 0x0200; } + bool isHeavyweight() const { return ((flags) & 0x80); } + bool isNullClosure() const { return kind() == 0x8000; } + bool isFunctionPrototype() const { return flags & 0x0800; } + bool isInterpretedConstructor() const { return isInterpreted() && !isFunctionPrototype(); } + + uint16_t kind() const { return flags & 0xc000; } + void setKind(uint16_t k) { + do { } while(0); + flags = (flags & ~0xc000) | k; + } + + + inline bool inStrictMode() const; + + void setArgCount(uint16_t nargs) { + do { } while(0); + this->nargs = nargs; + } + + void setHasRest() { + do { } while(0); + this->flags |= 0x0100; + } + + void setHasDefaults() { + do { } while(0); + this->flags |= 0x0400; + } + + + enum { MAX_ARGS_AND_VARS = 2 * ((1U << 16) - 1) }; + + + + + + inline JSObject *environment() const; + inline void setEnvironment(JSObject *obj); + inline void initEnvironment(JSObject *obj); + + static inline size_t offsetOfEnvironment() { return __builtin_offsetof (JSFunction, u.i.env_); } + + JSScript *script() const { + do { } while(0); + return *(js::HeapPtrScript *)&u.i.script_; + } + + js::HeapPtrScript &mutableScript() { + do { } while(0); + return *(js::HeapPtrScript *)&u.i.script_; + } + + inline void setScript(JSScript *script_); + inline void initScript(JSScript *script_); + + JSScript *maybeScript() const { + return isInterpreted() ? script() : __null; + } + + JSNative native() const { + do { } while(0); + return u.native; + } + + JSNative maybeNative() const { + return isInterpreted() ? __null : native(); + } + + static unsigned offsetOfNativeOrScript() { + typedef int moz_static_assert89[(__builtin_offsetof (U, native) == __builtin_offsetof (U, i.script_)) ? 1 : -1]; + typedef int moz_static_assert90[(__builtin_offsetof (U, native) == __builtin_offsetof (U, nativeOrScript)) ? 1 : -1]; + return __builtin_offsetof (JSFunction, u.nativeOrScript); + } + + + + static const js::gc::AllocKind FinalizeKind = js::gc::FINALIZE_OBJECT2_BACKGROUND; + static const js::gc::AllocKind ExtendedFinalizeKind = js::gc::FINALIZE_OBJECT4_BACKGROUND; +# 163 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfun.h" + inline void trace(JSTracer *trc); + + + + inline bool initBoundFunction(JSContext *cx, js::HandleValue thisArg, + const js::Value *args, unsigned argslen); + + inline JSObject *getBoundFunctionTarget() const; + inline const js::Value &getBoundFunctionThis() const; + inline const js::Value &getBoundFunctionArgument(unsigned which) const; + inline size_t getBoundFunctionArgumentCount() const; + + private: + inline js::FunctionExtended *toExtended(); + inline const js::FunctionExtended *toExtended() const; + + inline bool isExtended() const { + typedef int moz_static_assert91[(FinalizeKind != ExtendedFinalizeKind) ? 1 : -1]; + do { } while(0); + return !!(flags & 0x2000); + } + + public: + + inline void initializeExtended(); + inline void setExtendedSlot(size_t which, const js::Value &val); + inline const js::Value &getExtendedSlot(size_t which) const; + + private: + + + + + inline JSFunction *toFunction() ; + inline const JSFunction *toFunction() const ; +}; + +inline JSFunction * +JSObject::toFunction() +{ + do { } while(0); + return static_cast(this); +} + +inline const JSFunction * +JSObject::toFunction() const +{ + do { } while(0); + return static_cast(this); +} + +extern JSString * +fun_toStringHelper(JSContext *cx, JSObject *obj, unsigned indent); + +extern JSFunction * +js_NewFunction(JSContext *cx, JSObject *funobj, JSNative native, unsigned nargs, + unsigned flags, js::HandleObject parent, JSAtom *atom, + js::gc::AllocKind kind = JSFunction::FinalizeKind); + +extern JSFunction * +js_CloneFunctionObject(JSContext *cx, js::HandleFunction fun, + js::HandleObject parent, js::HandleObject proto, + js::gc::AllocKind kind = JSFunction::FinalizeKind); + +extern JSFunction * +js_DefineFunction(JSContext *cx, js::HandleObject obj, js::HandleId id, JSNative native, + unsigned nargs, unsigned flags, + js::gc::AllocKind kind = JSFunction::FinalizeKind); + + + + +#define JSV2F_CONSTRUCT INITIAL_CONSTRUCT +#define JSV2F_SEARCH_STACK 0x10000 + +extern JSFunction * +js_ValueToFunction(JSContext *cx, const js::Value *vp, unsigned flags); + +extern JSObject * +js_ValueToCallableObject(JSContext *cx, js::Value *vp, unsigned flags); + +extern void +js_ReportIsNotFunction(JSContext *cx, const js::Value *vp, unsigned flags); + +extern void +js_PutCallObject(js::StackFrame *fp, js::CallObject &callobj); + +namespace js { + + + + + + +class FunctionExtended : public JSFunction +{ + friend struct JSFunction; + + + HeapValue extendedSlots[2]; +}; + +} + +inline js::FunctionExtended * +JSFunction::toExtended() +{ + do { } while(0); + return static_cast(this); +} + +inline const js::FunctionExtended * +JSFunction::toExtended() const +{ + do { } while(0); + return static_cast(this); +} + +extern void +js_PutArgsObject(js::StackFrame *fp); + +inline bool +js_IsNamedLambda(JSFunction *fun) { return (fun->flags & 0x08) && fun->atom; } + +namespace js { + +template +bool +XDRInterpretedFunction(XDRState *xdr, JSObject **objp, JSScript *parentScript); + +extern JSObject * +CloneInterpretedFunction(JSContext *cx, JSFunction *fun); + +} + +extern JSBool +js_fun_apply(JSContext *cx, unsigned argc, js::Value *vp); + +extern JSBool +js_fun_call(JSContext *cx, unsigned argc, js::Value *vp); + +extern JSObject* +js_fun_bind(JSContext *cx, js::HandleObject target, js::HandleValue thisArg, + js::Value *boundArgs, unsigned argslen); +# 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" 2 +# 1 "./jsautooplen.h" 1 + + + + + +#define JSOP_NOP_LENGTH 1 +#define JSOP_UNDEFINED_LENGTH 1 +#define JSOP_POPV_LENGTH 1 +#define JSOP_ENTERWITH_LENGTH 1 +#define JSOP_LEAVEWITH_LENGTH 1 +#define JSOP_RETURN_LENGTH 1 +#define JSOP_GOTO_LENGTH 5 +#define JSOP_IFEQ_LENGTH 5 +#define JSOP_IFNE_LENGTH 5 +#define JSOP_ARGUMENTS_LENGTH 1 +#define JSOP_SWAP_LENGTH 1 +#define JSOP_POPN_LENGTH 3 +#define JSOP_DUP_LENGTH 1 +#define JSOP_DUP2_LENGTH 1 +#define JSOP_SETCONST_LENGTH 5 +#define JSOP_BITOR_LENGTH 1 +#define JSOP_BITXOR_LENGTH 1 +#define JSOP_BITAND_LENGTH 1 +#define JSOP_EQ_LENGTH 1 +#define JSOP_NE_LENGTH 1 +#define JSOP_LT_LENGTH 1 +#define JSOP_LE_LENGTH 1 +#define JSOP_GT_LENGTH 1 +#define JSOP_GE_LENGTH 1 +#define JSOP_LSH_LENGTH 1 +#define JSOP_RSH_LENGTH 1 +#define JSOP_URSH_LENGTH 1 +#define JSOP_ADD_LENGTH 1 +#define JSOP_SUB_LENGTH 1 +#define JSOP_MUL_LENGTH 1 +#define JSOP_DIV_LENGTH 1 +#define JSOP_MOD_LENGTH 1 +#define JSOP_NOT_LENGTH 1 +#define JSOP_BITNOT_LENGTH 1 +#define JSOP_NEG_LENGTH 1 +#define JSOP_POS_LENGTH 1 +#define JSOP_DELNAME_LENGTH 5 +#define JSOP_DELPROP_LENGTH 5 +#define JSOP_DELELEM_LENGTH 1 +#define JSOP_TYPEOF_LENGTH 1 +#define JSOP_VOID_LENGTH 1 +#define JSOP_INCNAME_LENGTH 6 +#define JSOP_INCPROP_LENGTH 6 +#define JSOP_INCELEM_LENGTH 2 +#define JSOP_DECNAME_LENGTH 6 +#define JSOP_DECPROP_LENGTH 6 +#define JSOP_DECELEM_LENGTH 2 +#define JSOP_NAMEINC_LENGTH 6 +#define JSOP_PROPINC_LENGTH 6 +#define JSOP_ELEMINC_LENGTH 2 +#define JSOP_NAMEDEC_LENGTH 6 +#define JSOP_PROPDEC_LENGTH 6 +#define JSOP_ELEMDEC_LENGTH 2 +#define JSOP_GETPROP_LENGTH 5 +#define JSOP_SETPROP_LENGTH 5 +#define JSOP_GETELEM_LENGTH 1 +#define JSOP_SETELEM_LENGTH 1 +#define JSOP_CALLNAME_LENGTH 5 +#define JSOP_CALL_LENGTH 3 +#define JSOP_NAME_LENGTH 5 +#define JSOP_DOUBLE_LENGTH 5 +#define JSOP_STRING_LENGTH 5 +#define JSOP_ZERO_LENGTH 1 +#define JSOP_ONE_LENGTH 1 +#define JSOP_NULL_LENGTH 1 +#define JSOP_THIS_LENGTH 1 +#define JSOP_FALSE_LENGTH 1 +#define JSOP_TRUE_LENGTH 1 +#define JSOP_OR_LENGTH 5 +#define JSOP_AND_LENGTH 5 +#define JSOP_TABLESWITCH_LENGTH -1 +#define JSOP_LOOKUPSWITCH_LENGTH -1 +#define JSOP_STRICTEQ_LENGTH 1 +#define JSOP_STRICTNE_LENGTH 1 +#define JSOP_SETCALL_LENGTH 1 +#define JSOP_ITER_LENGTH 2 +#define JSOP_MOREITER_LENGTH 1 +#define JSOP_ITERNEXT_LENGTH 2 +#define JSOP_ENDITER_LENGTH 1 +#define JSOP_FUNAPPLY_LENGTH 3 +#define JSOP_OBJECT_LENGTH 5 +#define JSOP_POP_LENGTH 1 +#define JSOP_NEW_LENGTH 3 +#define JSOP_UNUSED0_LENGTH 1 +#define JSOP_GETARG_LENGTH 3 +#define JSOP_SETARG_LENGTH 3 +#define JSOP_GETLOCAL_LENGTH 3 +#define JSOP_SETLOCAL_LENGTH 3 +#define JSOP_UINT16_LENGTH 3 +#define JSOP_NEWINIT_LENGTH 5 +#define JSOP_NEWARRAY_LENGTH 4 +#define JSOP_NEWOBJECT_LENGTH 5 +#define JSOP_ENDINIT_LENGTH 1 +#define JSOP_INITPROP_LENGTH 5 +#define JSOP_INITELEM_LENGTH 1 +#define JSOP_UNUSED14_LENGTH 1 +#define JSOP_UNUSED15_LENGTH 1 +#define JSOP_INCARG_LENGTH 3 +#define JSOP_DECARG_LENGTH 3 +#define JSOP_ARGINC_LENGTH 3 +#define JSOP_ARGDEC_LENGTH 3 +#define JSOP_INCLOCAL_LENGTH 3 +#define JSOP_DECLOCAL_LENGTH 3 +#define JSOP_LOCALINC_LENGTH 3 +#define JSOP_LOCALDEC_LENGTH 3 +#define JSOP_LEAVEFORLETIN_LENGTH 1 +#define JSOP_LABEL_LENGTH 5 +#define JSOP_UNUSED3_LENGTH 1 +#define JSOP_FUNCALL_LENGTH 3 +#define JSOP_LOOPHEAD_LENGTH 1 +#define JSOP_BINDNAME_LENGTH 5 +#define JSOP_SETNAME_LENGTH 5 +#define JSOP_THROW_LENGTH 1 +#define JSOP_IN_LENGTH 1 +#define JSOP_INSTANCEOF_LENGTH 1 +#define JSOP_DEBUGGER_LENGTH 1 +#define JSOP_GOSUB_LENGTH 5 +#define JSOP_RETSUB_LENGTH 1 +#define JSOP_EXCEPTION_LENGTH 1 +#define JSOP_LINENO_LENGTH 3 +#define JSOP_CONDSWITCH_LENGTH 1 +#define JSOP_CASE_LENGTH 5 +#define JSOP_DEFAULT_LENGTH 5 +#define JSOP_EVAL_LENGTH 3 +#define JSOP_ENUMELEM_LENGTH 1 +#define JSOP_GETTER_LENGTH 1 +#define JSOP_SETTER_LENGTH 1 +#define JSOP_DEFFUN_LENGTH 5 +#define JSOP_DEFCONST_LENGTH 5 +#define JSOP_DEFVAR_LENGTH 5 +#define JSOP_LAMBDA_LENGTH 5 +#define JSOP_CALLEE_LENGTH 1 +#define JSOP_UNUSED31_LENGTH 1 +#define JSOP_PICK_LENGTH 2 +#define JSOP_TRY_LENGTH 1 +#define JSOP_FINALLY_LENGTH 1 +#define JSOP_GETALIASEDVAR_LENGTH 9 +#define JSOP_CALLALIASEDVAR_LENGTH 9 +#define JSOP_SETALIASEDVAR_LENGTH 9 +#define JSOP_INCALIASEDVAR_LENGTH 10 +#define JSOP_DECALIASEDVAR_LENGTH 10 +#define JSOP_ALIASEDVARINC_LENGTH 10 +#define JSOP_ALIASEDVARDEC_LENGTH 10 +#define JSOP_UNUSED8_LENGTH 1 +#define JSOP_UNUSED9_LENGTH 1 +#define JSOP_UNUSED10_LENGTH 1 +#define JSOP_UNUSED11_LENGTH 1 +#define JSOP_UNUSED12_LENGTH 1 +#define JSOP_UNUSED13_LENGTH 1 +#define JSOP_BACKPATCH_LENGTH 5 +#define JSOP_BACKPATCH_POP_LENGTH 5 +#define JSOP_THROWING_LENGTH 1 +#define JSOP_SETRVAL_LENGTH 1 +#define JSOP_RETRVAL_LENGTH 1 +#define JSOP_GETGNAME_LENGTH 5 +#define JSOP_SETGNAME_LENGTH 5 +#define JSOP_INCGNAME_LENGTH 6 +#define JSOP_DECGNAME_LENGTH 6 +#define JSOP_GNAMEINC_LENGTH 6 +#define JSOP_GNAMEDEC_LENGTH 6 +#define JSOP_REGEXP_LENGTH 5 +#define JSOP_DEFXMLNS_LENGTH 1 +#define JSOP_ANYNAME_LENGTH 1 +#define JSOP_QNAMEPART_LENGTH 5 +#define JSOP_QNAMECONST_LENGTH 5 +#define JSOP_QNAME_LENGTH 1 +#define JSOP_TOATTRNAME_LENGTH 1 +#define JSOP_TOATTRVAL_LENGTH 1 +#define JSOP_ADDATTRNAME_LENGTH 1 +#define JSOP_ADDATTRVAL_LENGTH 1 +#define JSOP_BINDXMLNAME_LENGTH 1 +#define JSOP_SETXMLNAME_LENGTH 1 +#define JSOP_XMLNAME_LENGTH 1 +#define JSOP_DESCENDANTS_LENGTH 1 +#define JSOP_FILTER_LENGTH 5 +#define JSOP_ENDFILTER_LENGTH 5 +#define JSOP_TOXML_LENGTH 1 +#define JSOP_TOXMLLIST_LENGTH 1 +#define JSOP_XMLTAGEXPR_LENGTH 1 +#define JSOP_XMLELTEXPR_LENGTH 1 +#define JSOP_XMLCDATA_LENGTH 5 +#define JSOP_XMLCOMMENT_LENGTH 5 +#define JSOP_XMLPI_LENGTH 5 +#define JSOP_DELDESC_LENGTH 1 +#define JSOP_CALLPROP_LENGTH 5 +#define JSOP_ENTERLET0_LENGTH 5 +#define JSOP_ENTERLET1_LENGTH 5 +#define JSOP_UINT24_LENGTH 4 +#define JSOP_UNUSED18_LENGTH 1 +#define JSOP_UNUSED19_LENGTH 1 +#define JSOP_UNUSED20_LENGTH 1 +#define JSOP_STARTXML_LENGTH 1 +#define JSOP_STARTXMLEXPR_LENGTH 1 +#define JSOP_CALLELEM_LENGTH 1 +#define JSOP_STOP_LENGTH 1 +#define JSOP_GETXPROP_LENGTH 5 +#define JSOP_CALLXMLNAME_LENGTH 1 +#define JSOP_TYPEOFEXPR_LENGTH 1 +#define JSOP_ENTERBLOCK_LENGTH 5 +#define JSOP_LEAVEBLOCK_LENGTH 3 +#define JSOP_UNUSED1_LENGTH 1 +#define JSOP_UNUSED2_LENGTH 1 +#define JSOP_GENERATOR_LENGTH 1 +#define JSOP_YIELD_LENGTH 1 +#define JSOP_ARRAYPUSH_LENGTH 3 +#define JSOP_GETFUNNS_LENGTH 1 +#define JSOP_ENUMCONSTELEM_LENGTH 1 +#define JSOP_LEAVEBLOCKEXPR_LENGTH 3 +#define JSOP_UNUSED21_LENGTH 1 +#define JSOP_UNUSED22_LENGTH 1 +#define JSOP_UNUSED23_LENGTH 1 +#define JSOP_CALLGNAME_LENGTH 5 +#define JSOP_CALLLOCAL_LENGTH 3 +#define JSOP_CALLARG_LENGTH 3 +#define JSOP_BINDGNAME_LENGTH 5 +#define JSOP_INT8_LENGTH 2 +#define JSOP_INT32_LENGTH 5 +#define JSOP_LENGTH_LENGTH 5 +#define JSOP_HOLE_LENGTH 1 +#define JSOP_UNUSED17_LENGTH 1 +#define JSOP_UNUSED24_LENGTH 1 +#define JSOP_UNUSED25_LENGTH 1 +#define JSOP_UNUSED29_LENGTH 1 +#define JSOP_UNUSED30_LENGTH 1 +#define JSOP_REST_LENGTH 1 +#define JSOP_TOID_LENGTH 1 +#define JSOP_IMPLICITTHIS_LENGTH 5 +#define JSOP_LOOPENTRY_LENGTH 1 +#define JSOP_ACTUALSFILLED_LENGTH 3 +# 13 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" 2 + +struct JSContext; +struct JSCompartment; + + +namespace js { namespace mjit { struct CallSite; }} +typedef js::mjit::CallSite JSInlinedSite; + + + + +typedef size_t JSRejoinState; + +namespace js { + +class StackFrame; +class FrameRegs; +class StackSegment; +class StackSpace; +class ContextStack; + +class InvokeArgsGuard; +class InvokeFrameGuard; +class FrameGuard; +class ExecuteFrameGuard; +class DummyFrameGuard; +class GeneratorFrameGuard; + +class CallIter; +class ScriptFrameIter; +class AllFramesIter; + +class ArgumentsObject; +class StaticBlockObject; + + +namespace mjit { + struct JITScript; + jsbytecode *NativeToPC(JITScript *jit, void *ncode, CallSite **pinline); +} + + +namespace detail { + struct OOMCheck; +} +# 161 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" +class CallReceiver +{ + protected: + + + + + + void setUsedRval() const {} + void clearUsedRval() const {} + + Value *argv_; + public: + friend CallReceiver CallReceiverFromVp(Value *); + friend CallReceiver CallReceiverFromArgv(Value *); + Value *base() const { return argv_ - 2; } + JSObject &callee() const { do { } while(0); return argv_[-2].toObject(); } + Value &calleev() const { do { } while(0); return argv_[-2]; } + Value &thisv() const { return argv_[-1]; } + + Value &rval() const { + setUsedRval(); + return argv_[-2]; + } + + Value *spAfterCall() const { + setUsedRval(); + return argv_ - 1; + } + + void setCallee(Value calleev) { + clearUsedRval(); + this->calleev() = calleev; + } +}; + +__attribute__((always_inline)) inline CallReceiver +CallReceiverFromArgv(Value *argv) +{ + CallReceiver receiver; + receiver.clearUsedRval(); + receiver.argv_ = argv; + return receiver; +} + +__attribute__((always_inline)) inline CallReceiver +CallReceiverFromVp(Value *vp) +{ + return CallReceiverFromArgv(vp + 2); +} + + + +class CallArgs : public CallReceiver +{ + protected: + unsigned argc_; + public: + friend CallArgs CallArgsFromVp(unsigned, Value *); + friend CallArgs CallArgsFromArgv(unsigned, Value *); + friend CallArgs CallArgsFromSp(unsigned, Value *); + Value &operator[](unsigned i) const { do { } while(0); return argv_[i]; } + Value *array() const { return argv_; } + unsigned length() const { return argc_; } + Value *end() const { return argv_ + argc_; } + bool hasDefined(unsigned i) const { return i < argc_ && !argv_[i].isUndefined(); } +}; + +__attribute__((always_inline)) inline CallArgs +CallArgsFromArgv(unsigned argc, Value *argv) +{ + CallArgs args; + args.clearUsedRval(); + args.argv_ = argv; + args.argc_ = argc; + return args; +} + +__attribute__((always_inline)) inline CallArgs +CallArgsFromVp(unsigned argc, Value *vp) +{ + return CallArgsFromArgv(argc, vp + 2); +} + +__attribute__((always_inline)) inline CallArgs +CallArgsFromSp(unsigned argc, Value *sp) +{ + return CallArgsFromArgv(argc, sp - argc); +} +# 260 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" +class CallArgsList : public CallArgs +{ + friend class StackSegment; + CallArgsList *prev_; + bool active_; + public: + friend CallArgsList CallArgsListFromVp(unsigned, Value *, CallArgsList *); + friend CallArgsList CallArgsListFromArgv(unsigned, Value *, CallArgsList *); + CallArgsList *prev() const { return prev_; } + bool active() const { return active_; } + void setActive() { active_ = true; } + void setInactive() { active_ = false; } +}; + +__attribute__((always_inline)) inline CallArgsList +CallArgsListFromArgv(unsigned argc, Value *argv, CallArgsList *prev) +{ + CallArgsList args; + + + + args.argv_ = argv; + args.argc_ = argc; + args.prev_ = prev; + args.active_ = false; + return args; +} + +__attribute__((always_inline)) inline CallArgsList +CallArgsListFromVp(unsigned argc, Value *vp, CallArgsList *prev) +{ + return CallArgsListFromArgv(argc, vp + 2, prev); +} + + + + +enum InitialFrameFlags { + INITIAL_NONE = 0, + INITIAL_CONSTRUCT = 0x80, + INITIAL_LOWERED = 0x200000 +}; + +enum ExecuteType { + EXECUTE_GLOBAL = 0x1, + EXECUTE_DIRECT_EVAL = 0x8, + EXECUTE_INDIRECT_EVAL = 0x9, + EXECUTE_DEBUG = 0x18 +}; + + + +class StackFrame +{ + public: + enum Flags { + + GLOBAL = 0x1, + FUNCTION = 0x2, + DUMMY = 0x4, + + + EVAL = 0x8, + DEBUGGER = 0x10, + GENERATOR = 0x20, + FLOATING_GENERATOR = 0x40, + CONSTRUCTING = 0x80, + + + YIELDING = 0x100, + FINISHED_IN_INTERP = 0x200, + + + OVERFLOW_ARGS = 0x400, + UNDERFLOW_ARGS = 0x800, + + + HAS_CALL_OBJ = 0x1000, + HAS_ARGS_OBJ = 0x2000, + HAS_HOOK_DATA = 0x4000, + HAS_ANNOTATION = 0x8000, + HAS_RVAL = 0x10000, + HAS_SCOPECHAIN = 0x20000, + HAS_PREVPC = 0x40000, + HAS_BLOCKCHAIN = 0x80000, + + + DOWN_FRAMES_EXPANDED = 0x100000, + LOWERED_CALL_APPLY = 0x200000 + }; + + private: + mutable uint32_t flags_; + union { + JSScript *script; + JSFunction *fun; + } exec; + union { + unsigned nactual; + JSScript *evalScript; + } u; + mutable JSObject *scopeChain_; + StackFrame *prev_; + void *ncode_; + + + Value rval_; + StaticBlockObject *blockChain_; + ArgumentsObject *argsObj_; + jsbytecode *prevpc_; + JSInlinedSite *prevInline_; + void *hookData_; + void *annotation_; + JSRejoinState rejoin_; + + + static void staticAsserts() { + typedef int moz_static_assert92[(__builtin_offsetof (StackFrame, rval_) % sizeof(Value) == 0) ? 1 : -1]; + typedef int moz_static_assert93[(sizeof(StackFrame) % sizeof(Value) == 0) ? 1 : -1]; + } + + inline void initPrev(JSContext *cx); + jsbytecode *prevpcSlow(JSInlinedSite **pinlined); + + public: +# 394 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + void initCallFrame(JSContext *cx, JSFunction &callee, + JSScript *script, uint32_t nactual, StackFrame::Flags flags); + + + void initFixupFrame(StackFrame *prev, StackFrame::Flags flags, void *ncode, unsigned nactual); + + + void initExecuteFrame(JSScript *script, StackFrame *prev, FrameRegs *regs, + const Value &thisv, JSObject &scopeChain, ExecuteType type); + + + enum TriggerPostBarriers { + DoPostBarrier = true, + NoPostBarrier = false + }; + template + void stealFrameAndSlots(JSContext *cx, StackFrame *fp, T *vp, + StackFrame *otherfp, U *othervp, Value *othersp); + void writeBarrierPost(); + + + void initDummyFrame(JSContext *cx, JSObject &chain); +# 428 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + bool isFunctionFrame() const { + return !!(flags_ & FUNCTION); + } + + bool isGlobalFrame() const { + return !!(flags_ & GLOBAL); + } + + bool isDummyFrame() const { + return !!(flags_ & DUMMY); + } + + bool isScriptFrame() const { + bool retval = !!(flags_ & (FUNCTION | GLOBAL)); + do { } while(0); + return retval; + } +# 458 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + bool isEvalFrame() const { + do { } while (0); + return flags_ & EVAL; + } + + bool isEvalInFunction() const { + return (flags_ & (EVAL | FUNCTION)) == (EVAL | FUNCTION); + } + + bool isNonEvalFunctionFrame() const { + return (flags_ & (FUNCTION | EVAL)) == FUNCTION; + } + + inline bool isStrictEvalFrame() const { + return isEvalFrame() && script()->strictModeCode; + } + + bool isNonStrictEvalFrame() const { + return isEvalFrame() && !script()->strictModeCode; + } + + bool isDirectEvalFrame() const { + return isEvalFrame() && script()->staticLevel > 0; + } + + bool isNonStrictDirectEvalFrame() const { + return isNonStrictEvalFrame() && isDirectEvalFrame(); + } +# 500 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + StackFrame *prev() const { + return prev_; + } + + inline void resetGeneratorPrev(JSContext *cx); + inline void resetInlinePrev(StackFrame *prevfp, jsbytecode *prevpc); + + inline void initInlineFrame(JSFunction *fun, StackFrame *prevfp, jsbytecode *prevpc); + + inline JSObject *createRestParameter(JSContext *cx); +# 519 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + Value *slots() const { + return (Value *)(this + 1); + } + + Value *base() const { + return slots() + script()->nfixed; + } + + Value &varSlot(unsigned i) { + do { } while(0); + do { } while (0); + return slots()[i]; + } + + Value &localSlot(unsigned i) { + + do { } while(0); + return slots()[i]; + } +# 574 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + jsbytecode *pcQuadratic(const ContextStack &stack, StackFrame *next = __null, + JSInlinedSite **pinlined = __null); + + jsbytecode *prevpc(JSInlinedSite **pinlined) { + if (flags_ & HAS_PREVPC) { + if (pinlined) + *pinlined = prevInline_; + return prevpc_; + } + return prevpcSlow(pinlined); + } + + JSInlinedSite *prevInline() { + do { } while(0); + return prevInline_; + } + + JSScript *script() const { + do { } while(0); + return isFunctionFrame() + ? isEvalFrame() ? u.evalScript : fun()->script() + : exec.script; + } + + JSScript *functionScript() const { + do { } while(0); + return isEvalFrame() ? u.evalScript : fun()->script(); + } + + JSScript *globalScript() const { + do { } while(0); + return exec.script; + } + + JSScript *maybeScript() const { + return isScriptFrame() ? script() : __null; + } + + size_t numFixed() const { + return script()->nfixed; + } + + size_t numSlots() const { + return script()->nslots; + } + + size_t numGlobalVars() const { + do { } while(0); + return exec.script->nfixed; + } +# 634 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + JSFunction* fun() const { + do { } while(0); + return exec.fun; + } + + JSFunction* maybeFun() const { + return isFunctionFrame() ? fun() : __null; + } + + JSFunction* maybeScriptFunction() const { + if (!isFunctionFrame()) + return __null; + const StackFrame *fp = this; + while (fp->isEvalFrame()) + fp = fp->prev(); + return fp->script()->function(); + } +# 672 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + bool hasArgs() const { + return isNonEvalFunctionFrame(); + } + + unsigned numFormalArgs() const { + do { } while(0); + return fun()->nargs; + } + + Value &formalArg(unsigned i) const { + do { } while(0); + return formalArgs()[i]; + } + + Value *formalArgs() const { + do { } while(0); + return (Value *)this - numFormalArgs(); + } + + Value *formalArgsEnd() const { + do { } while(0); + return (Value *)this; + } + + Value *maybeFormalArgs() const { + return (flags_ & (FUNCTION | EVAL)) == FUNCTION + ? formalArgs() + : __null; + } + + inline unsigned numActualArgs() const; + inline Value *actualArgs() const; + inline Value *actualArgsEnd() const; + + inline Value &canonicalActualArg(unsigned i) const; + template + inline bool forEachCanonicalActualArg(Op op, unsigned start = 0, unsigned count = unsigned(-1)); + template inline bool forEachFormalArg(Op op); + + + + bool hasArgsObj() const { + + + + + + + + return !!(flags_ & HAS_ARGS_OBJ); + } + + ArgumentsObject &argsObj() const { + do { } while(0); + return *argsObj_; + } + + ArgumentsObject *maybeArgsObj() const { + return hasArgsObj() ? &argsObj() : __null; + } + + void initArgsObj(ArgumentsObject &argsObj) { + do { } while(0); + do { } while(0); + argsObj_ = &argsObj; + flags_ |= HAS_ARGS_OBJ; + } +# 754 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + Value &functionThis() const { + do { } while(0); + if (isEvalFrame()) + return ((Value *)this)[-1]; + return formalArgs()[-1]; + } + + JSObject &constructorThis() const { + do { } while(0); + return formalArgs()[-1].toObject(); + } + + Value &globalThis() const { + do { } while(0); + return ((Value *)this)[-1]; + } + + Value &thisValue() const { + if (flags_ & (EVAL | GLOBAL)) + return ((Value *)this)[-1]; + return formalArgs()[-1]; + } +# 786 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + JSFunction &callee() const { + do { } while(0); + return *calleev().toObject().toFunction(); + } + + const Value &calleev() const { + do { } while(0); + return mutableCalleev(); + } + + const Value &maybeCalleev() const { + do { } while(0); + Value &calleev = flags_ & (EVAL | GLOBAL) + ? ((Value *)this)[-2] + : formalArgs()[-2]; + do { } while(0); + return calleev; + } + + Value &mutableCalleev() const { + do { } while(0); + if (isEvalFrame()) + return ((Value *)this)[-2]; + return formalArgs()[-2]; + } + + CallReceiver callReceiver() const { + return CallReceiverFromArgv(formalArgs()); + } +# 846 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + inline HandleObject scopeChain() const; + inline GlobalObject &global() const; + + bool hasCallObj() const { + bool ret = !!(flags_ & HAS_CALL_OBJ); + do { } while (0); + return ret; + } + + inline CallObject &callObj() const; + inline void initScopeChain(CallObject &callobj); + inline void setScopeChain(JSObject &obj); +# 874 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + inline JSObject &varObj(); + + + + bool hasBlockChain() const { + return (flags_ & HAS_BLOCKCHAIN) && blockChain_; + } + + StaticBlockObject *maybeBlockChain() { + return (flags_ & HAS_BLOCKCHAIN) ? blockChain_ : __null; + } + + StaticBlockObject &blockChain() const { + do { } while(0); + return *blockChain_; + } + + + bool pushBlock(JSContext *cx, StaticBlockObject &block); + void popBlock(JSContext *cx); + + + void popWith(JSContext *cx); + + + + + + inline bool functionPrologue(JSContext *cx); + + + + + + + + inline void functionEpilogue(JSContext *cx); + + + + + + inline void updateEpilogueFlags(); + + inline bool maintainNestingState() const; +# 927 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + inline JSCompartment *compartment() const; + + + + void* annotation() const { + return (flags_ & HAS_ANNOTATION) ? annotation_ : __null; + } + + void setAnnotation(void *annot) { + flags_ |= HAS_ANNOTATION; + annotation_ = annot; + } + + + + JSRejoinState rejoin() const { + return rejoin_; + } + + void setRejoin(JSRejoinState state) { + rejoin_ = state; + } + + + + void setDownFramesExpanded() { + flags_ |= DOWN_FRAMES_EXPANDED; + } + + bool downFramesExpanded() { + return !!(flags_ & DOWN_FRAMES_EXPANDED); + } + + + + bool hasHookData() const { + return !!(flags_ & HAS_HOOK_DATA); + } + + void* hookData() const { + do { } while(0); + return hookData_; + } + + void* maybeHookData() const { + return hasHookData() ? hookData_ : __null; + } + + void setHookData(void *v) { + hookData_ = v; + flags_ |= HAS_HOOK_DATA; + } + + + + bool hasReturnValue() const { + return !!(flags_ & HAS_RVAL); + } + + Value &returnValue() { + if (!(flags_ & HAS_RVAL)) + rval_.setUndefined(); + return rval_; + } + + void markReturnValue() { + flags_ |= HAS_RVAL; + } + + void setReturnValue(const Value &v) { + rval_ = v; + markReturnValue(); + } + + void clearReturnValue() { + rval_.setUndefined(); + markReturnValue(); + } + + + + void *nativeReturnAddress() const { + return ncode_; + } + + void setNativeReturnAddress(void *addr) { + ncode_ = addr; + } + + void **addressOfNativeReturnAddress() { + return &ncode_; + } +# 1028 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + bool isGeneratorFrame() const { + return !!(flags_ & GENERATOR); + } + + bool isFloatingGenerator() const { + do { } while (0); + return !!(flags_ & FLOATING_GENERATOR); + } + + void initFloatingGenerator() { + do { } while(0); + flags_ |= (GENERATOR | FLOATING_GENERATOR); + } + + void unsetFloatingGenerator() { + flags_ &= ~FLOATING_GENERATOR; + } + + void setFloatingGenerator() { + flags_ |= FLOATING_GENERATOR; + } +# 1057 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + bool isFramePushedByExecute() const { + return !!(flags_ & (GLOBAL | EVAL)); + } + + + + + + InitialFrameFlags initialFlags() const { + typedef int moz_static_assert94[((int)INITIAL_NONE == 0) ? 1 : -1]; + typedef int moz_static_assert95[((int)INITIAL_CONSTRUCT == (int)CONSTRUCTING) ? 1 : -1]; + typedef int moz_static_assert96[((int)INITIAL_LOWERED == (int)LOWERED_CALL_APPLY) ? 1 : -1]; + uint32_t mask = CONSTRUCTING | LOWERED_CALL_APPLY; + do { } while(0); + return InitialFrameFlags(flags_ & mask); + } + + bool isConstructing() const { + return !!(flags_ & CONSTRUCTING); + } + + + + + + + + bool loweredCallOrApply() const { + return !!(flags_ & LOWERED_CALL_APPLY); + } + + bool isDebuggerFrame() const { + return !!(flags_ & DEBUGGER); + } + + bool hasOverflowArgs() const { + return !!(flags_ & OVERFLOW_ARGS); + } + + bool isYielding() { + return !!(flags_ & YIELDING); + } + + void setYielding() { + flags_ |= YIELDING; + } + + void clearYielding() { + flags_ &= ~YIELDING; + } + + void setFinishedInInterpreter() { + flags_ |= FINISHED_IN_INTERP; + } + + bool finishedInInterpreter() const { + return !!(flags_ & FINISHED_IN_INTERP); + } + + public: + + + static size_t offsetOfFlags() { + return __builtin_offsetof (StackFrame, flags_); + } + + static size_t offsetOfExec() { + return __builtin_offsetof (StackFrame, exec); + } + + static size_t offsetOfNumActual() { + return __builtin_offsetof (StackFrame, u.nactual); + } + + static size_t offsetOfScopeChain() { + return __builtin_offsetof (StackFrame, scopeChain_); + } + + static size_t offsetOfPrev() { + return __builtin_offsetof (StackFrame, prev_); + } + + static size_t offsetOfReturnValue() { + return __builtin_offsetof (StackFrame, rval_); + } + + static size_t offsetOfArgsObj() { + return __builtin_offsetof (StackFrame, argsObj_); + } + + static ptrdiff_t offsetOfNcode() { + return __builtin_offsetof (StackFrame, ncode_); + } + + static ptrdiff_t offsetOfCallee(JSFunction *fun) { + do { } while(0); + return -(fun->nargs + 2) * sizeof(Value); + } + + static ptrdiff_t offsetOfThis(JSFunction *fun) { + return fun == __null + ? -1 * ptrdiff_t(sizeof(Value)) + : -(fun->nargs + 1) * ptrdiff_t(sizeof(Value)); + } + + static ptrdiff_t offsetOfFormalArg(JSFunction *fun, unsigned i) { + do { } while(0); + return (-(int)fun->nargs + i) * sizeof(Value); + } + + static size_t offsetOfFixed(unsigned i) { + return sizeof(StackFrame) + i * sizeof(Value); + } + + + inline mjit::JITScript *jit(); + + + void methodjitStaticAsserts(); + + public: + void mark(JSTracer *trc); +}; + +static const size_t VALUES_PER_STACK_FRAME = sizeof(StackFrame) / sizeof(Value); + +static inline unsigned +ToReportFlags(InitialFrameFlags initial) +{ + return unsigned(initial & StackFrame::CONSTRUCTING); +} + +static inline StackFrame::Flags +ToFrameFlags(InitialFrameFlags initial) +{ + return StackFrame::Flags(initial); +} + +static inline InitialFrameFlags +InitialFrameFlagsFromConstructing(bool b) +{ + return b ? INITIAL_CONSTRUCT : INITIAL_NONE; +} + +static inline bool +InitialFrameFlagsAreConstructing(InitialFrameFlags initial) +{ + return !!(initial & INITIAL_CONSTRUCT); +} + +static inline bool +InitialFrameFlagsAreLowered(InitialFrameFlags initial) +{ + return !!(initial & INITIAL_LOWERED); +} + +inline StackFrame * Valueify(JSStackFrame *fp) { return (StackFrame *)fp; } +static inline JSStackFrame * Jsvalify(StackFrame *fp) { return (JSStackFrame *)fp; } + + + +class FrameRegs +{ + public: + Value *sp; + jsbytecode *pc; + private: + JSInlinedSite *inlined_; + StackFrame *fp_; + public: + StackFrame *fp() const { return fp_; } + JSInlinedSite *inlined() const { return inlined_; } + + + static const size_t offsetOfFp = 3 * sizeof(void *); + static const size_t offsetOfInlined = 2 * sizeof(void *); + static void staticAssert() { + typedef int moz_static_assert97[(offsetOfFp == __builtin_offsetof (FrameRegs, fp_)) ? 1 : -1]; + typedef int moz_static_assert98[(offsetOfInlined == __builtin_offsetof (FrameRegs, inlined_)) ? 1 : -1]; + } + void clearInlined() { inlined_ = __null; } + + + void rebaseFromTo(const FrameRegs &from, StackFrame &to) { + fp_ = &to; + sp = to.slots() + (from.sp - from.fp_->slots()); + pc = from.pc; + inlined_ = from.inlined_; + do { } while(0); + } + + + void popFrame(Value *newsp) { + pc = fp_->prevpc(&inlined_); + sp = newsp; + fp_ = fp_->prev(); + do { } while(0); + } + + + void popPartialFrame(Value *newsp) { + sp = newsp; + fp_ = fp_->prev(); + do { } while(0); + } + + + void restorePartialFrame(Value *newfp) { + fp_ = (StackFrame *) newfp; + } + + + void refreshFramePointer(StackFrame *fp) { + fp_ = fp; + } + + + void prepareToRun(StackFrame &fp, JSScript *script) { + pc = script->code; + sp = fp.slots() + script->nfixed; + fp_ = &fp; + inlined_ = __null; + } + + void setToEndOfScript() { + JSScript *script = fp()->script(); + sp = fp()->base(); + pc = script->code + script->length - 1; + do { } while(0); + } + + + void initDummyFrame(StackFrame &fp) { + pc = __null; + sp = fp.slots(); + fp_ = &fp; + inlined_ = __null; + } + + + void expandInline(StackFrame *innerfp, jsbytecode *innerpc) { + pc = innerpc; + fp_ = innerfp; + inlined_ = __null; + } + + + + void updateForNcode(mjit::JITScript *jit, void *ncode) { + pc = mjit::NativeToPC(jit, ncode, &inlined_); + } + +}; + + + +class StackSegment +{ + + StackSegment *const prevInContext_; + + + StackSegment *const prevInMemory_; + + + FrameRegs *regs_; + + + CallArgsList *calls_; + + public: + StackSegment(StackSegment *prevInContext, + StackSegment *prevInMemory, + FrameRegs *regs, + CallArgsList *calls) + : prevInContext_(prevInContext), + prevInMemory_(prevInMemory), + regs_(regs), + calls_(calls) + {} + + + + Value *slotsBegin() const { + return (Value *)(this + 1); + } + + + + FrameRegs ®s() const { + do { } while(0); + return *regs_; + } + + FrameRegs *maybeRegs() const { + return regs_; + } + + StackFrame *fp() const { + return regs_->fp(); + } + + StackFrame *maybefp() const { + return regs_ ? regs_->fp() : __null; + } + + jsbytecode *maybepc() const { + return regs_ ? regs_->pc : __null; + } + + CallArgsList &calls() const { + do { } while(0); + return *calls_; + } + + CallArgsList *maybeCalls() const { + return calls_; + } + + Value *callArgv() const { + return calls_->array(); + } + + Value *maybeCallArgv() const { + return calls_ ? calls_->array() : __null; + } + + StackSegment *prevInContext() const { + return prevInContext_; + } + + StackSegment *prevInMemory() const { + return prevInMemory_; + } + + void repointRegs(FrameRegs *regs) { + do { } while (0); + regs_ = regs; + } + + bool isEmpty() const { + return !calls_ && !regs_; + } + + bool contains(const StackFrame *fp) const; + bool contains(const FrameRegs *regs) const; + bool contains(const CallArgsList *call) const; + + StackFrame *computeNextFrame(const StackFrame *fp) const; + + Value *end() const; + + FrameRegs *pushRegs(FrameRegs ®s); + void popRegs(FrameRegs *regs); + void pushCall(CallArgsList &callList); + void pointAtCall(CallArgsList &callList); + void popCall(); + + + + static const size_t offsetOfRegs() { return __builtin_offsetof (StackSegment, regs_); } +}; + +static const size_t VALUES_PER_STACK_SEGMENT = sizeof(StackSegment) / sizeof(Value); +typedef int moz_static_assert99[(sizeof(StackSegment) % sizeof(Value) == 0) ? 1 : -1]; + + + +class StackSpace +{ + StackSegment *seg_; + Value *base_; + mutable Value *conservativeEnd_; + + + + Value *defaultEnd_; + Value *trustedEnd_; + + void assertInvariants() const { + do { } while(0); + + + + + do { } while(0); + do { } while(0); + } + + + static const size_t CAPACITY_VALS = 512 * 1024; + static const size_t CAPACITY_BYTES = CAPACITY_VALS * sizeof(Value); + + + static const size_t COMMIT_VALS = 16 * 1024; + static const size_t COMMIT_BYTES = COMMIT_VALS * sizeof(Value); + + + static const size_t BUFFER_VALS = 16 * 1024; + static const size_t BUFFER_BYTES = BUFFER_VALS * sizeof(Value); + + static void staticAsserts() { + typedef int moz_static_assert100[(CAPACITY_VALS % COMMIT_VALS == 0) ? 1 : -1]; + } + + friend class AllFramesIter; + friend class ContextStack; + friend class StackFrame; +# 1474 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + static const size_t CX_COMPARTMENT = 0xc; + + inline bool ensureSpace(JSContext *cx, MaybeReportError report, + Value *from, ptrdiff_t nvals, + JSCompartment *dest = (JSCompartment *)CX_COMPARTMENT) const; + __attribute__((visibility("default"))) bool ensureSpaceSlow(JSContext *cx, MaybeReportError report, + Value *from, ptrdiff_t nvals, + JSCompartment *dest) const; + + StackSegment &findContainingSegment(const StackFrame *target) const; + + public: + StackSpace(); + bool init(); + ~StackSpace(); +# 1501 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + static const unsigned ARGS_LENGTH_MAX = CAPACITY_VALS - (2 * BUFFER_VALS); + + + inline Value *firstUnused() const { return seg_ ? seg_->end() : base_; } + + StackSegment &containingSegment(const StackFrame *target) const; +# 1516 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + static const size_t STACK_JIT_EXTRA = ( 8 + 18) * 10; +# 1532 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + inline Value *getStackLimit(JSContext *cx, MaybeReportError report); + bool tryBumpLimit(JSContext *cx, Value *from, unsigned nvals, Value **limit); + + + void mark(JSTracer *trc); + void markFrameSlots(JSTracer *trc, StackFrame *fp, Value *slotsEnd, jsbytecode *pc); + + + void markActiveCompartments(); + + + __attribute__((visibility("default"))) size_t sizeOfCommitted(); + + + + +}; + + + +class ContextStack +{ + StackSegment *seg_; + StackSpace *const space_; + JSContext *cx_; +# 1566 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + bool onTop() const; + + + + + void assertSpaceInSync() const {} + + + + StackSegment *pushSegment(JSContext *cx); + enum MaybeExtend { CAN_EXTEND = true, CANT_EXTEND = false }; + Value *ensureOnTop(JSContext *cx, MaybeReportError report, unsigned nvars, + MaybeExtend extend, bool *pushedSeg, + JSCompartment *dest = (JSCompartment *)StackSpace::CX_COMPARTMENT); + + inline StackFrame * + getCallFrame(JSContext *cx, MaybeReportError report, const CallArgs &args, + JSFunction *fun, JSScript *script, StackFrame::Flags *pflags) const; + + + void popSegment(); + friend class InvokeArgsGuard; + void popInvokeArgs(const InvokeArgsGuard &iag); + friend class FrameGuard; + void popFrame(const FrameGuard &fg); + friend class GeneratorFrameGuard; + void popGeneratorFrame(const GeneratorFrameGuard &gfg); + + friend class StackIter; + + public: + ContextStack(JSContext *cx); + ~ContextStack(); + + + + + + + + bool empty() const { return !seg_; } + + + + + + + + inline bool hasfp() const { return seg_ && seg_->maybeRegs(); } + + + + + + inline FrameRegs *maybeRegs() const { return seg_ ? seg_->maybeRegs() : __null; } + inline StackFrame *maybefp() const { return seg_ ? seg_->maybefp() : __null; } + + + inline FrameRegs ®s() const { do { } while(0); return seg_->regs(); } + inline StackFrame *fp() const { do { } while(0); return seg_->fp(); } + + + StackSpace &space() const { return *space_; } + + + bool containsSlow(const StackFrame *target) const; +# 1641 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + bool pushInvokeArgs(JSContext *cx, unsigned argc, InvokeArgsGuard *ag); + + + bool pushInvokeFrame(JSContext *cx, const CallArgs &args, + InitialFrameFlags initial, InvokeFrameGuard *ifg); + + + bool pushExecuteFrame(JSContext *cx, JSScript *script, const Value &thisv, + JSObject &scopeChain, ExecuteType type, + StackFrame *evalInFrame, ExecuteFrameGuard *efg); + + + + + + + + bool pushGeneratorFrame(JSContext *cx, JSGenerator *gen, GeneratorFrameGuard *gfg); +# 1669 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + bool pushDummyFrame(JSContext *cx, JSCompartment *dest, JSObject &scopeChain, DummyFrameGuard *dfg); + + + + + + + bool pushInlineFrame(JSContext *cx, FrameRegs ®s, const CallArgs &args, + JSFunction &callee, JSScript *script, + InitialFrameFlags initial); + bool pushInlineFrame(JSContext *cx, FrameRegs ®s, const CallArgs &args, + JSFunction &callee, JSScript *script, + InitialFrameFlags initial, Value **stackLimit); + void popInlineFrame(FrameRegs ®s); + + + void popFrameAfterOverflow(); + + + inline JSScript *currentScript(jsbytecode **pc = __null) const; + inline JSScript *currentScriptWithDiagnostics(jsbytecode **pc = __null) const; + + + inline HandleObject currentScriptedScopeChain() const; + + + + + + + StackFrame *getFixupFrame(JSContext *cx, MaybeReportError report, + const CallArgs &args, JSFunction *fun, JSScript *script, + void *ncode, InitialFrameFlags initial, Value **stackLimit); + + bool saveFrameChain(); + void restoreFrameChain(); + + + + + + inline void repointRegs(FrameRegs *regs) { do { } while(0); seg_->repointRegs(regs); } +# 1719 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" + void threadReset(); + + + + static size_t offsetOfSeg() { return __builtin_offsetof (ContextStack, seg_); } +}; + + + +class InvokeArgsGuard : public CallArgsList +{ + friend class ContextStack; + ContextStack *stack_; + bool pushedSeg_; + void setPushed(ContextStack &stack) { do { } while(0); stack_ = &stack; } + public: + InvokeArgsGuard() : CallArgsList(), stack_(__null), pushedSeg_(false) {} + ~InvokeArgsGuard() { if (pushed()) stack_->popInvokeArgs(*this); } + bool pushed() const { return !!stack_; } + void pop() { stack_->popInvokeArgs(*this); stack_ = __null; } +}; + +class FrameGuard +{ + protected: + friend class ContextStack; + ContextStack *stack_; + bool pushedSeg_; + FrameRegs regs_; + FrameRegs *prevRegs_; + void setPushed(ContextStack &stack) { stack_ = &stack; } + public: + FrameGuard() : stack_(__null), pushedSeg_(false) {} + ~FrameGuard() { if (pushed()) stack_->popFrame(*this); } + bool pushed() const { return !!stack_; } + void pop() { stack_->popFrame(*this); stack_ = __null; } + + StackFrame *fp() const { return regs_.fp(); } +}; + +class InvokeFrameGuard : public FrameGuard +{}; + +class ExecuteFrameGuard : public FrameGuard +{}; + +class DummyFrameGuard : public FrameGuard +{}; + +class GeneratorFrameGuard : public FrameGuard +{ + friend class ContextStack; + JSGenerator *gen_; + Value *stackvp_; + public: + ~GeneratorFrameGuard() { if (pushed()) stack_->popGeneratorFrame(*this); } +}; +# 1797 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" +class StackIter +{ + friend class ContextStack; + JSContext *maybecx_; + public: + enum SavedOption { STOP_AT_SAVED, GO_THROUGH_SAVED }; + private: + SavedOption savedOption_; + + enum State { DONE, SCRIPTED, NATIVE, IMPLICIT_NATIVE }; + State state_; + + StackFrame *fp_; + CallArgsList *calls_; + + StackSegment *seg_; + Value *sp_; + jsbytecode *pc_; + JSScript *script_; + CallArgs args_; + + void poisonRegs(); + void popFrame(); + void popCall(); + void settleOnNewSegment(); + void settleOnNewState(); + void startOnSegment(StackSegment *seg); + + public: + StackIter(JSContext *cx, SavedOption = STOP_AT_SAVED); + StackIter(JSRuntime *rt, StackSegment &seg); + + bool done() const { return state_ == DONE; } + StackIter &operator++(); + + bool operator==(const StackIter &rhs) const; + bool operator!=(const StackIter &rhs) const { return !(*this == rhs); } + + bool isScript() const { do { } while(0); return state_ == SCRIPTED; } + bool isImplicitNativeCall() const { + do { } while(0); + return state_ == IMPLICIT_NATIVE; + } + bool isNativeCall() const { + do { } while(0); + return state_ == NATIVE || state_ == IMPLICIT_NATIVE; + } + + bool isFunctionFrame() const; + bool isEvalFrame() const; + bool isNonEvalFunctionFrame() const; + bool isConstructing() const; + + StackFrame *fp() const { do { } while(0); return fp_; } + Value *sp() const { do { } while(0); return sp_; } + jsbytecode *pc() const { do { } while(0); return pc_; } + JSScript *script() const { do { } while(0); return script_; } + JSFunction *callee() const; + Value calleev() const; + Value thisv() const; + + CallArgs nativeArgs() const { do { } while(0); return args_; } +}; + + +class ScriptFrameIter : public StackIter +{ + void settle() { + while (!done() && !isScript()) + StackIter::operator++(); + } + + public: + ScriptFrameIter(JSContext *cx, StackIter::SavedOption opt = StackIter::STOP_AT_SAVED) + : StackIter(cx, opt) { settle(); } + + ScriptFrameIter &operator++() { StackIter::operator++(); settle(); return *this; } +}; + + + + + + + +class AllFramesIter +{ + public: + AllFramesIter(StackSpace &space); + + bool done() const { return fp_ == __null; } + AllFramesIter& operator++(); + + StackFrame *fp() const { return fp_; } + + private: + void settle(); + StackSegment *seg_; + StackFrame *fp_; +}; + +} +# 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" 2 +# 41 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" +extern "C" { +struct DtoaState; +} + +struct JSSharpInfo { + bool hasGen; + bool isSharp; + + JSSharpInfo() : hasGen(false), isSharp(false) {} +}; + +typedef js::HashMap JSSharpTable; + +struct JSSharpObjectMap { + unsigned depth; + uint32_t sharpgen; + JSSharpTable table; + + JSSharpObjectMap(JSContext *cx) : depth(0), sharpgen(0), table(js::TempAllocPolicy(cx)) { + table.init(); + } +}; + +namespace js { + +namespace mjit { +class JaegerRuntime; +} + +class MathCache; +class WeakMapBase; +class InterpreterFrames; +class DebugScopes; + + + + + + + +struct GSNCache { + typedef HashMap, + SystemAllocPolicy> Map; + + jsbytecode *code; + Map map; + + GSNCache() : code(__null) { } + + void purge(); +}; + +inline GSNCache * +GetGSNCache(JSContext *cx); + +struct PendingProxyOperation { + PendingProxyOperation *next; + RootedObject object; + PendingProxyOperation(JSContext *cx, JSObject *object) : next(__null), object(cx, object) {} +}; + +typedef Vector ScriptAndCountsVector; + +struct ConservativeGCData +{ + + + + + uintptr_t *nativeStackTop; +# 126 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" + union { + jmp_buf jmpbuf; + uintptr_t words[(((sizeof(jmp_buf))+(sizeof(uintptr_t))-1)/(sizeof(uintptr_t)))]; + } registerSnapshot; + + ConservativeGCData() { + PodZero(this); + } + + ~ConservativeGCData() { + + + + + + do { } while(0); + + } + + __attribute__((noinline)) void recordStackTop(); + + + void updateForRequestEnd(unsigned suspendCount) { + if (suspendCount) + recordStackTop(); + else + nativeStackTop = __null; + } + + + bool hasStackToScan() const { + return !!nativeStackTop; + } +}; + +class ToSourceCache +{ + typedef HashMap, + SystemAllocPolicy> Map; + Map *map_; + public: + ToSourceCache() : map_(__null) {} + JSString *lookup(JSFunction *fun); + void put(JSFunction *fun, JSString *); + void purge(); +}; + +class EvalCache +{ + static const unsigned SHIFT = 6; + static const unsigned LENGTH = 1 << SHIFT; + JSScript *table_[LENGTH]; + + public: + EvalCache() { PodArrayZero(table_); } + JSScript **bucket(JSLinearString *str); + void purge(); +}; + +class NativeIterCache +{ + static const size_t SIZE = size_t(1) << 8; + + + JSObject *data[SIZE]; + + static size_t getIndex(uint32_t key) { + return size_t(key) % SIZE; + } + + public: + + JSObject *last; + + NativeIterCache() + : last(__null) { + PodArrayZero(data); + } + + void purge() { + last = __null; + PodArrayZero(data); + } + + JSObject *get(uint32_t key) const { + return data[getIndex(key)]; + } + + void set(uint32_t key, JSObject *iterobj) { + data[getIndex(key)] = iterobj; + } +}; + + + + + + +class NewObjectCache +{ + + static const unsigned MAX_OBJ_SIZE = 4 * sizeof(void*) + 16 * sizeof(Value); + static inline void staticAsserts(); + + struct Entry + { + + Class *clasp; +# 250 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" + gc::Cell *key; + + + gc::AllocKind kind; + + + uint32_t nbytes; + + + + + + char templateObject[MAX_OBJ_SIZE]; + }; + + Entry entries[41]; + + public: + + typedef int EntryIndex; + + NewObjectCache() { PodZero(this); } + void purge() { PodZero(this); } + + + + + + inline bool lookupProto(Class *clasp, JSObject *proto, gc::AllocKind kind, EntryIndex *pentry); + inline bool lookupGlobal(Class *clasp, js::GlobalObject *global, gc::AllocKind kind, EntryIndex *pentry); + inline bool lookupType(Class *clasp, js::types::TypeObject *type, gc::AllocKind kind, EntryIndex *pentry); + + + inline JSObject *newObjectFromHit(JSContext *cx, EntryIndex entry); + + + inline void fillProto(EntryIndex entry, Class *clasp, JSObject *proto, gc::AllocKind kind, JSObject *obj); + inline void fillGlobal(EntryIndex entry, Class *clasp, js::GlobalObject *global, gc::AllocKind kind, JSObject *obj); + inline void fillType(EntryIndex entry, Class *clasp, js::types::TypeObject *type, gc::AllocKind kind, JSObject *obj); + + + void invalidateEntriesForShape(JSContext *cx, Shape *shape, JSObject *proto); + + private: + inline bool lookup(Class *clasp, gc::Cell *key, gc::AllocKind kind, EntryIndex *pentry); + inline void fill(EntryIndex entry, Class *clasp, gc::Cell *key, gc::AllocKind kind, JSObject *obj); + static inline void copyCachedToObject(JSObject *dst, JSObject *src); +}; +# 306 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" +class FreeOp : public JSFreeOp { + bool shouldFreeLater_; + bool onBackgroundThread_; + + public: + static FreeOp *get(JSFreeOp *fop) { + return static_cast(fop); + } + + FreeOp(JSRuntime *rt, bool shouldFreeLater, bool onBackgroundThread) + : JSFreeOp(rt), + shouldFreeLater_(shouldFreeLater), + onBackgroundThread_(onBackgroundThread) + { + } + + bool shouldFreeLater() const { + return shouldFreeLater_; + } + + bool onBackgroundThread() const { + return onBackgroundThread_; + } + + inline void free_(void* p); + + template inline void delete_(T *p) { if (p) { p->~T(); free_(p); } } template inline void array_delete(T *p) { if (p) { void* p0 = (void *)(uintptr_t(p) - js::OffTheBooks::JSMinAlignment); size_t n = *(size_t *)p0; for (size_t i = 0; i < n; i++) (p + i)->~T(); free_(p0); } } + + static void staticAsserts() { + + + + + + + typedef int moz_static_assert101[(__builtin_offsetof (FreeOp, shouldFreeLater_) == sizeof(JSFreeOp)) ? 1 : -1]; + } +}; + +} + +namespace JS { +struct RuntimeSizes; +} + +struct JSRuntime : js::RuntimeFriendFields +{ + + JSCompartment *atomsCompartment; + + + js::CompartmentVector compartments; + + + + public: + void *ownerThread() const { return ownerThread_; } + void clearOwnerThread(); + void setOwnerThread(); + __attribute__((visibility("default"))) bool onOwnerThread() const; + private: + void *ownerThread_; + public: + + + + + + + js::StackSpace stackSpace; + + + static const size_t TEMP_LIFO_ALLOC_PRIMARY_CHUNK_SIZE = 1 << 12; + js::LifoAlloc tempLifoAlloc; + + private: + + + + + JSC::ExecutableAllocator *execAlloc_; + WTF::BumpPointerAllocator *bumpAlloc_; + + js::mjit::JaegerRuntime *jaegerRuntime_; + + + JSC::ExecutableAllocator *createExecutableAllocator(JSContext *cx); + WTF::BumpPointerAllocator *createBumpPointerAllocator(JSContext *cx); + js::mjit::JaegerRuntime *createJaegerRuntime(JSContext *cx); + + public: + JSC::ExecutableAllocator *getExecAlloc(JSContext *cx) { + return execAlloc_ ? execAlloc_ : createExecutableAllocator(cx); + } + JSC::ExecutableAllocator &execAlloc() { + do { } while(0); + return *execAlloc_; + } + WTF::BumpPointerAllocator *getBumpPointerAllocator(JSContext *cx) { + return bumpAlloc_ ? bumpAlloc_ : createBumpPointerAllocator(cx); + } + + js::mjit::JaegerRuntime *getJaegerRuntime(JSContext *cx) { + return jaegerRuntime_ ? jaegerRuntime_ : createJaegerRuntime(cx); + } + bool hasJaegerRuntime() const { + return jaegerRuntime_; + } + js::mjit::JaegerRuntime &jaegerRuntime() { + do { } while(0); + return *jaegerRuntime_; + } + + + + uintptr_t nativeStackBase; + + + size_t nativeStackQuota; + + + + + + js::InterpreterFrames *interpreterFrames; + + + JSContextCallback cxCallback; + + + JSDestroyCompartmentCallback destroyCompartmentCallback; + + js::ActivityCallback activityCallback; + void *activityCallbackArg; + + + + unsigned suspendCount; + + + unsigned requestDepth; +# 460 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" + js::GCChunkSet gcChunkSet; +# 469 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" + js::gc::Chunk *gcSystemAvailableChunkListHead; + js::gc::Chunk *gcUserAvailableChunkListHead; + js::gc::ChunkPool gcChunkPool; + + js::RootedValueMap gcRootsHash; + js::GCLocks gcLocksHash; + unsigned gcKeepAtoms; + size_t gcBytes; + size_t gcMaxBytes; + size_t gcMaxMallocBytes; + + + + + + + volatile uint32_t gcNumArenasFreeCommitted; + js::GCMarker gcMarker; + void *gcVerifyData; + bool gcChunkAllocationSinceLastGC; + int64_t gcNextFullGCTime; + int64_t gcJitReleaseTime; + JSGCMode gcMode; + + + bool gcShouldCleanUpEverything; + + + + + + + volatile uintptr_t gcIsNeeded; + + js::WeakMapBase *gcWeakMapList; + js::gcstats::Statistics gcStats; + + + uint64_t gcNumber; + + + uint64_t gcStartNumber; + + + bool gcIsFull; + + + js::gcreason::Reason gcTriggerReason; + + + + + + bool gcStrictCompartmentChecking; + + + + + + js::gc::State gcIncrementalState; + + + bool gcLastMarkSlice; + + + + + + + volatile uintptr_t gcInterFrameGC; + + + int64_t gcSliceBudget; + + + + + + bool gcIncrementalEnabled; + + + + + + + bool gcExactScanningEnabled; +# 572 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" + bool gcPoke; + bool gcRunning; +# 614 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" + int gcZeal() { return 0; } + bool needZealousGC() { return false; } + + + JSGCCallback gcCallback; + js::GCSliceCallback gcSliceCallback; + JSFinalizeCallback gcFinalizeCallback; + + private: + + + + + volatile ptrdiff_t gcMallocBytes; + + public: + + + + + + + JSTraceDataOp gcBlackRootsTraceOp; + void *gcBlackRootsData; + JSTraceDataOp gcGrayRootsTraceOp; + void *gcGrayRootsData; + + + js::AutoGCRooter *autoGCRooters; + + + js::ScriptAndCountsVector *scriptAndCountsVector; + + + js::Value NaNValue; + js::Value negativeInfinityValue; + js::Value positiveInfinityValue; + + JSAtom *emptyString; + + + JSCList contextList; + + bool hasContexts() const { + return !((&contextList)->next == (&contextList)); + } + + + JSDebugHooks debugHooks; + + + bool debugMode; + + + bool profilingScripts; + + + bool alwaysPreserveCode; + + + JSBool hadOutOfMemory; + + + + + + JSCList debuggerList; + + + js::DebugScopes *debugScopes; + + + void *data; + + + + PRLock *gcLock; + + js::GCHelperThread gcHelperThread; + + + private: + js::FreeOp defaultFreeOp_; + + public: + js::FreeOp *defaultFreeOp() { + return &defaultFreeOp_; + } + + uint32_t debuggerMutations; + + const JSSecurityCallbacks *securityCallbacks; + JSDestroyPrincipalsOp destroyPrincipals; + + + const JSStructuredCloneCallbacks *structuredCloneCallbacks; + + + JSAccumulateTelemetryDataCallback telemetryCallback; + + + + + + + int32_t propertyRemovals; + + + const char *thousandsSeparator; + const char *decimalSeparator; + const char *numGrouping; + + + + + + bool waiveGCQuota; + + private: + js::MathCache *mathCache_; + js::MathCache *createMathCache(JSContext *cx); + public: + js::MathCache *getMathCache(JSContext *cx) { + return mathCache_ ? mathCache_ : createMathCache(cx); + } + + js::GSNCache gsnCache; + js::PropertyCache propertyCache; + js::NewObjectCache newObjectCache; + js::NativeIterCache nativeIterCache; + js::ToSourceCache toSourceCache; + js::EvalCache evalCache; + + + DtoaState *dtoaState; + + + js::PendingProxyOperation *pendingProxyOperation; + + js::ConservativeGCData conservativeGC; + + private: + JSPrincipals *trustedPrincipals_; + public: + void setTrustedPrincipals(JSPrincipals *p) { trustedPrincipals_ = p; } + JSPrincipals *trustedPrincipals() const { return trustedPrincipals_; } + + + JSAtomState atomState; + + + js::StaticStrings staticStrings; + + JSWrapObjectCallback wrapObjectCallback; + JSSameCompartmentWrapObjectCallback sameCompartmentWrapObjectCallback; + JSPreWrapCallback preWrapObjectCallback; + js::PreserveWrapperCallback preserveWrapperCallback; + + js::ScriptFilenameTable scriptFilenameTable; +# 783 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" + int32_t inOOMReport; + + bool jitHardening; + + JSRuntime(); + ~JSRuntime(); + + bool init(uint32_t maxbytes); + + JSRuntime *thisFromCtor() { return this; } + + + + + + void* malloc_(size_t bytes, JSContext *cx = __null) { + updateMallocCounter(cx, bytes); + void *p = ::js_malloc(bytes); + return (__builtin_expect((!!p), 1)) ? p : onOutOfMemory(__null, bytes, cx); + } + + + + + + void* calloc_(size_t bytes, JSContext *cx = __null) { + updateMallocCounter(cx, bytes); + void *p = ::js_calloc(bytes); + return (__builtin_expect((!!p), 1)) ? p : onOutOfMemory(reinterpret_cast(1), bytes, cx); + } + + void* realloc_(void* p, size_t oldBytes, size_t newBytes, JSContext *cx = __null) { + do { } while(0); + updateMallocCounter(cx, newBytes - oldBytes); + void *p2 = ::js_realloc(p, newBytes); + return (__builtin_expect((!!p2), 1)) ? p2 : onOutOfMemory(p, newBytes, cx); + } + + void* realloc_(void* p, size_t bytes, JSContext *cx = __null) { + + + + + if (!p) + updateMallocCounter(cx, bytes); + void *p2 = ::js_realloc(p, bytes); + return (__builtin_expect((!!p2), 1)) ? p2 : onOutOfMemory(p, bytes, cx); + } + + inline void free_(void* p) { + + js::Foreground::free_(p); + } + + template __attribute__((always_inline)) inline T *new_() { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T () : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) : __null; } template __attribute__((always_inline)) inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) : __null; } static const int JSMinAlignment = 8; template __attribute__((always_inline)) inline T *array_new(size_t n) { uint64_t numBytes64 = uint64_t(JSMinAlignment) + uint64_t(sizeof(T)) * uint64_t(n); size_t numBytes = size_t(numBytes64); if (numBytes64 != numBytes) { do { } while(0); return __null; } void *memory = malloc_(numBytes); if (!memory) return __null; *(size_t *)memory = n; memory = (void*)(uintptr_t(memory) + JSMinAlignment); return new(memory) T[n]; } + template __attribute__((always_inline)) inline void delete_(T *p) { if (p) { p->~T(); free_(p); } } template __attribute__((always_inline)) inline void array_delete(T *p) { if (p) { void* p0 = (void *)(uintptr_t(p) - js::OffTheBooks::JSMinAlignment); size_t n = *(size_t *)p0; for (size_t i = 0; i < n; i++) (p + i)->~T(); free_(p0); } } + + void setGCMaxMallocBytes(size_t value); + + void resetGCMallocBytes() { gcMallocBytes = ptrdiff_t(gcMaxMallocBytes); } +# 852 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" + void updateMallocCounter(JSContext *cx, size_t nbytes); + + bool isTooMuchMalloc() const { + return gcMallocBytes <= 0; + } + + + + + __attribute__((visibility("default"))) void onTooMuchMalloc(); +# 871 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" + __attribute__((visibility("default"))) void * onOutOfMemory(void *p, size_t nbytes, JSContext *cx); + + void triggerOperationCallback(); + + void setJitHardening(bool enabled); + bool getJitHardening() const { + return jitHardening; + } + + void sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf, JS::RuntimeSizes *runtime); + size_t sizeOfExplicitNonHeap(); +}; + + +#define JS_PROPERTY_CACHE(cx) (cx->runtime->propertyCache) + +#define JS_KEEP_ATOMS(rt) (rt)->gcKeepAtoms++; +#define JS_UNKEEP_ATOMS(rt) (rt)->gcKeepAtoms--; +# 904 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" +namespace js { + +struct AutoResolving; + +static inline bool +OptionsHasAllowXML(uint32_t options) +{ + return !!(options & ((uint32_t)1 << (6))); +} + +static inline bool +OptionsHasMoarXML(uint32_t options) +{ + return !!(options & ((uint32_t)1 << (7))); +} + +static inline bool +OptionsSameVersionFlags(uint32_t self, uint32_t other) +{ + static const uint32_t mask = ((uint32_t)1 << (7)); + return !((self & mask) ^ (other & mask)); +} +# 935 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" +namespace VersionFlags { +static const unsigned MASK = 0x0FFF; +static const unsigned ALLOW_XML = 0x1000; +static const unsigned MOAR_XML = 0x2000; +static const unsigned FULL_MASK = 0x3FFF; +} + +static inline JSVersion +VersionNumber(JSVersion version) +{ + return JSVersion(uint32_t(version) & VersionFlags::MASK); +} + +static inline bool +VersionHasAllowXML(JSVersion version) +{ + return !!(version & VersionFlags::ALLOW_XML); +} + +static inline bool +VersionHasMoarXML(JSVersion version) +{ + return !!(version & VersionFlags::MOAR_XML); +} + + +static inline bool +VersionShouldParseXML(JSVersion version) +{ + return VersionHasMoarXML(version) || VersionNumber(version) >= JSVERSION_1_6; +} + +static inline JSVersion +VersionExtractFlags(JSVersion version) +{ + return JSVersion(uint32_t(version) & ~VersionFlags::MASK); +} + +static inline void +VersionCopyFlags(JSVersion *version, JSVersion from) +{ + *version = JSVersion(VersionNumber(*version) | VersionExtractFlags(from)); +} + +static inline bool +VersionHasFlags(JSVersion version) +{ + return !!VersionExtractFlags(version); +} + +static inline unsigned +VersionFlagsToOptions(JSVersion version) +{ + unsigned copts = (VersionHasAllowXML(version) ? ((uint32_t)1 << (6)) : 0) | + (VersionHasMoarXML(version) ? ((uint32_t)1 << (7)) : 0); + do { } while(0); + return copts; +} + +static inline JSVersion +OptionFlagsToVersion(unsigned options, JSVersion version) +{ + uint32_t v = version; + v &= ~(VersionFlags::ALLOW_XML | VersionFlags::MOAR_XML); + if (OptionsHasAllowXML(options)) + v |= VersionFlags::ALLOW_XML; + if (OptionsHasMoarXML(options)) + v |= VersionFlags::MOAR_XML; + return JSVersion(v); +} + +static inline bool +VersionIsKnown(JSVersion version) +{ + return VersionNumber(version) != JSVERSION_UNKNOWN; +} + +typedef HashSet, + SystemAllocPolicy> BusyArraysSet; + +inline void +FreeOp::free_(void* p) { + + if (shouldFreeLater()) { + runtime()->gcHelperThread.freeLater(p); + return; + } + + runtime()->free_(p); +} + +} + +struct JSContext : js::ContextFriendFields +{ + explicit JSContext(JSRuntime *rt); + JSContext *thisDuringConstruction() { return this; } + ~JSContext(); + + + JSCList link; + + private: + + JSVersion defaultVersion; + JSVersion versionOverride; + bool hasVersionOverride; + + + JSBool throwing; + js::Value exception; + + + unsigned runOptions; + + public: + int32_t reportGranularity; + + + JSLocaleCallbacks *localeCallbacks; + + js::AutoResolving *resolvingList; + + + bool generatingError; + + + JSCompartment *compartment; + + inline void setCompartment(JSCompartment *compartment); + + + js::ContextStack stack; + + + inline bool hasfp() const { return stack.hasfp(); } + inline js::StackFrame* fp() const { return stack.fp(); } + inline js::StackFrame* maybefp() const { return stack.maybefp(); } + inline js::FrameRegs& regs() const { return stack.regs(); } + inline js::FrameRegs* maybeRegs() const { return stack.maybeRegs(); } + + + void resetCompartment(); + + + void wrapPendingException(); + + private: + + js::ParseMapPool *parseMapPool_; + + public: + + JSObject *globalObject; + + + JSSharpObjectMap sharpObjectMap; + js::BusyArraysSet busyArrays; + + + JSArgumentFormatMap *argumentFormatMap; + + + char *lastMessage; + + + JSErrorReporter errorReporter; + + + JSOperationCallback operationCallback; + + + void *data; + void *data2; + + inline js::RegExpStatics *regExpStatics(); + + public: + js::ParseMapPool &parseMapPool() { + do { } while(0); + return *parseMapPool_; + } + + inline bool ensureParseMapPool(); + + + + + + inline bool canSetDefaultVersion() const; + + + inline void overrideVersion(JSVersion newVersion); + + + void setDefaultVersion(JSVersion version) { + defaultVersion = version; + } + + void clearVersionOverride() { hasVersionOverride = false; } + JSVersion getDefaultVersion() const { return defaultVersion; } + bool isVersionOverridden() const { return hasVersionOverride; } + + JSVersion getVersionOverride() const { + do { } while(0); + return versionOverride; + } + + + + + + inline bool maybeOverrideVersion(JSVersion newVersion); + + + + + + void maybeMigrateVersionOverride() { + do { } while(0); + if ((__builtin_expect((isVersionOverridden()), 0))) { + defaultVersion = versionOverride; + clearVersionOverride(); + } + } +# 1170 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" + inline JSVersion findVersion() const; + + void setRunOptions(unsigned ropts) { + do { } while(0); + runOptions = ropts; + } + + + inline void setCompileOptions(unsigned newcopts); + + unsigned getRunOptions() const { return runOptions; } + inline unsigned getCompileOptions() const; + inline unsigned allOptions() const; + + bool hasRunOption(unsigned ropt) const { + do { } while(0); + return !!(runOptions & ropt); + } + + bool hasStrictOption() const { return hasRunOption(((uint32_t)1 << (0))); } + bool hasWErrorOption() const { return hasRunOption(((uint32_t)1 << (1))); } + bool hasAtLineOption() const { return hasRunOption(((uint32_t)1 << (5))); } + + js::LifoAlloc &tempLifoAlloc() { return runtime->tempLifoAlloc; } + inline js::LifoAlloc &typeLifoAlloc(); + + inline js::PropertyTree &propertyTree(); + + + unsigned outstandingRequests; + + + + + + unsigned resolveFlags; + + + int64_t rngSeed; + + + js::Value iterValue; + + + bool methodJitEnabled; + + js::mjit::JaegerRuntime &jaegerRuntime() { return runtime->jaegerRuntime(); } + + + bool inferenceEnabled; + + bool typeInferenceEnabled() { return inferenceEnabled; } + + + void updateJITEnabled(); +# 1239 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" + DSTOffsetCache dstOffsetCache; + + + JSObject *enumerators; + + private: + + + + + + + js::Vector genStack; + + public: + + JSGenerator *generatorFor(js::StackFrame *fp) const; + + + inline bool ensureGeneratorStackSpace(); + + bool enterGenerator(JSGenerator *gen) { + return genStack.append(gen); + } + + void leaveGenerator(JSGenerator *gen) { + do { } while(0); + genStack.popBack(); + } + + inline void* malloc_(size_t bytes) { + return runtime->malloc_(bytes, this); + } + + inline void* mallocNoReport(size_t bytes) { + do { } while(0); + return runtime->malloc_(bytes, __null); + } + + inline void* calloc_(size_t bytes) { + return runtime->calloc_(bytes, this); + } + + inline void* realloc_(void* p, size_t bytes) { + return runtime->realloc_(p, bytes, this); + } + + inline void* realloc_(void* p, size_t oldBytes, size_t newBytes) { + return runtime->realloc_(p, oldBytes, newBytes, this); + } + + inline void free_(void* p) { + runtime->free_(p); + } + + template inline T *new_() { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T () : __null; } template inline T *new_(P1 p1) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1) : __null; } template inline T *new_(P1 p1, P2 p2) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) : __null; } template inline T *new_(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8, P9 p9, P10 p10, P11 p11, P12 p12) { void *memory = malloc_(sizeof(T)); return memory ? new(memory) T (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12) : __null; } static const int JSMinAlignment = 8; template inline T *array_new(size_t n) { uint64_t numBytes64 = uint64_t(JSMinAlignment) + uint64_t(sizeof(T)) * uint64_t(n); size_t numBytes = size_t(numBytes64); if (numBytes64 != numBytes) { do { } while(0); return __null; } void *memory = malloc_(numBytes); if (!memory) return __null; *(size_t *)memory = n; memory = (void*)(uintptr_t(memory) + JSMinAlignment); return new(memory) T[n]; } + template inline void delete_(T *p) { if (p) { p->~T(); free_(p); } } template inline void array_delete(T *p) { if (p) { void* p0 = (void *)(uintptr_t(p) - js::OffTheBooks::JSMinAlignment); size_t n = *(size_t *)p0; for (size_t i = 0; i < n; i++) (p + i)->~T(); free_(p0); } } + + void purge(); + + + inline void assertValidStackDepth(unsigned depth); + + bool isExceptionPending() { + return throwing; + } + + js::Value getPendingException() { + do { } while(0); + return exception; + } + + void setPendingException(js::Value v); + + void clearPendingException() { + this->throwing = false; + this->exception.setUndefined(); + } +# 1337 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" + unsigned activeCompilations; + + + + + + bool runningWithTrustedPrincipals() const; + + __attribute__((visibility("default"))) size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf) const; + + static inline JSContext *fromLinkField(JSCList *link) { + do { } while(0); + return reinterpret_cast(uintptr_t(link) - __builtin_offsetof (JSContext, link)); + } + + void mark(JSTracer *trc); + + private: + + + + + + + __attribute__((visibility("default"))) void checkMallocGCPressure(void *p); +}; + +namespace js { + +class AutoAllowUnaliasedVarAccess +{ + JSContext *cx; + public: + AutoAllowUnaliasedVarAccess(JSContext *cx) : cx(cx) { + + + + } + ~AutoAllowUnaliasedVarAccess() { + + + + + } +}; + +struct AutoResolving { + public: + enum Kind { + LOOKUP, + WATCH + }; + + AutoResolving(JSContext *cx, JSObject *obj, jsid id, Kind kind = LOOKUP + ) + : context(cx), object(obj), id(id), kind(kind), link(cx->resolvingList) + { + do { } while (0); + do { } while(0); + cx->resolvingList = this; + } + + ~AutoResolving() { + do { } while(0); + context->resolvingList = link; + } + + bool alreadyStarted() const { + return link && alreadyStartedSlow(); + } + + private: + bool alreadyStartedSlow() const; + + JSContext *const context; + JSObject *const object; + jsid const id; + Kind const kind; + AutoResolving *const link; + +}; + + +class AutoXMLRooter : private AutoGCRooter { + public: + AutoXMLRooter(JSContext *cx, JSXML *xml + ) + : AutoGCRooter(cx, XML), xml(xml) + { + do { } while (0); + do { } while(0); + } + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + JSXML * const xml; + +}; + + + +#define JS_LOCK_GC(rt) PR_Lock((rt)->gcLock) +#define JS_UNLOCK_GC(rt) PR_Unlock((rt)->gcLock) + + + + + +class AutoLockGC +{ + public: + explicit AutoLockGC(JSRuntime *rt = __null + ) + : runtime(rt) + { + do { } while (0); + + + if (rt) + PR_Lock((rt)->gcLock); + + } + + ~AutoLockGC() + { + + if (runtime) + PR_Unlock((runtime)->gcLock); + + } + + bool locked() const { + return !!runtime; + } + + void lock(JSRuntime *rt) { + do { } while(0); + do { } while(0); + runtime = rt; + PR_Lock((rt)->gcLock); + } + + private: + JSRuntime *runtime; + +}; + +class AutoUnlockGC { + private: + JSRuntime *rt; + + + public: + explicit AutoUnlockGC(JSRuntime *rt + ) + : rt(rt) + { + do { } while (0); + PR_Unlock((rt)->gcLock); + } + ~AutoUnlockGC() { PR_Lock((rt)->gcLock); } +}; + +class AutoKeepAtoms { + JSRuntime *rt; + + + public: + explicit AutoKeepAtoms(JSRuntime *rt + ) + : rt(rt) + { + do { } while (0); + (rt)->gcKeepAtoms++;; + } + ~AutoKeepAtoms() { (rt)->gcKeepAtoms--;; } +}; + +class AutoReleasePtr { + JSContext *cx; + void *ptr; + + + AutoReleasePtr(const AutoReleasePtr &other) ; + AutoReleasePtr operator=(const AutoReleasePtr &other) ; + + public: + explicit AutoReleasePtr(JSContext *cx, void *ptr + ) + : cx(cx), ptr(ptr) + { + do { } while (0); + } + ~AutoReleasePtr() { cx->free_(ptr); } +}; + + + + +class AutoReleaseNullablePtr { + JSContext *cx; + void *ptr; + + + AutoReleaseNullablePtr(const AutoReleaseNullablePtr &other) ; + AutoReleaseNullablePtr operator=(const AutoReleaseNullablePtr &other) ; + + public: + explicit AutoReleaseNullablePtr(JSContext *cx, void *ptr + ) + : cx(cx), ptr(ptr) + { + do { } while (0); + } + void reset(void *ptr2) { + if (ptr) + cx->free_(ptr); + ptr = ptr2; + } + ~AutoReleaseNullablePtr() { if (ptr) cx->free_(ptr); } +}; + +} + +class JSAutoResolveFlags +{ + public: + JSAutoResolveFlags(JSContext *cx, unsigned flags + ) + : mContext(cx), mSaved(cx->resolveFlags) + { + do { } while (0); + cx->resolveFlags = flags; + } + + ~JSAutoResolveFlags() { mContext->resolveFlags = mSaved; } + + private: + JSContext *mContext; + unsigned mSaved; + +}; + +namespace js { + + + + +class ContextIter { + JSCList *begin; + JSCList *end; + +public: + explicit ContextIter(JSRuntime *rt) { + end = &rt->contextList; + begin = end->next; + } + + bool done() const { + return begin == end; + } + + void next() { + do { } while(0); + begin = begin->next; + } + + JSContext *get() const { + do { } while(0); + return JSContext::fromLinkField(begin); + } + + operator JSContext *() const { + return get(); + } + + JSContext *operator ->() const { + return get(); + } +}; + + + + + +extern JSContext * +NewContext(JSRuntime *rt, size_t stackChunkSize); + +enum DestroyContextMode { + DCM_NO_GC, + DCM_FORCE_GC, + DCM_NEW_FAILED +}; + +extern void +DestroyContext(JSContext *cx, DestroyContextMode mode); + +} +# 1653 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" +namespace js { + + +extern void +ReportUsageError(JSContext *cx, JSObject *callee, const char *msg); + +} + +extern void +js_ReportOutOfMemory(JSContext *cx); + +extern __attribute__((visibility("default"))) void +js_ReportAllocationOverflow(JSContext *cx); + + + + + +extern __attribute__((visibility("default"))) void +js_ReportErrorAgain(JSContext *cx, const char *message, JSErrorReport *report); + +extern void +js_ReportIsNotDefined(JSContext *cx, const char *name); + + + + +extern JSBool +js_ReportIsNullOrUndefined(JSContext *cx, int spindex, const js::Value &v, + JSString *fallback); + +extern void +js_ReportMissingArg(JSContext *cx, const js::Value &v, unsigned arg); + + + + + + +extern JSBool +js_ReportValueErrorFlags(JSContext *cx, unsigned flags, const unsigned errorNumber, + int spindex, const js::Value &v, JSString *fallback, + const char *arg1, const char *arg2); + +#define js_ReportValueError(cx,errorNumber,spindex,v,fallback) ((void)js_ReportValueErrorFlags(cx, JSREPORT_ERROR, errorNumber, spindex, v, fallback, NULL, NULL)) + + + +#define js_ReportValueError2(cx,errorNumber,spindex,v,fallback,arg1) ((void)js_ReportValueErrorFlags(cx, JSREPORT_ERROR, errorNumber, spindex, v, fallback, arg1, NULL)) + + + +#define js_ReportValueError3(cx,errorNumber,spindex,v,fallback,arg1,arg2) ((void)js_ReportValueErrorFlags(cx, JSREPORT_ERROR, errorNumber, spindex, v, fallback, arg1, arg2)) + + + +extern JSErrorFormatString js_ErrorFormatString[JSErr_Limit]; + + +#define JS_ASSERT_REQUEST_DEPTH(cx) JS_ASSERT((cx)->runtime->requestDepth >= 1) +# 1721 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" +extern JSBool +js_InvokeOperationCallback(JSContext *cx); + +extern JSBool +js_HandleExecutionInterrupt(JSContext *cx); + +extern jsbytecode* +js_GetCurrentBytecodePC(JSContext* cx); + +extern JSScript * +js_GetCurrentScript(JSContext* cx); + + + + + + +static __attribute__((always_inline)) inline bool +JS_CHECK_OPERATION_LIMIT(JSContext *cx) +{ + do { } while(0); + return !cx->runtime->interrupt || js_InvokeOperationCallback(cx); +} + +namespace js { + + +namespace mjit { + void ExpandInlineFrames(JSCompartment *compartment); +} + + +} + + +enum FrameExpandKind { + FRAME_EXPAND_NONE = 0, + FRAME_EXPAND_ALL = 1 +}; + +namespace js { + + + +static __attribute__((always_inline)) inline void +MakeRangeGCSafe(Value *vec, size_t len) +{ + PodZero(vec, len); +} + +static __attribute__((always_inline)) inline void +MakeRangeGCSafe(Value *beg, Value *end) +{ + PodZero(beg, end - beg); +} + +static __attribute__((always_inline)) inline void +MakeRangeGCSafe(jsid *beg, jsid *end) +{ + for (jsid *id = beg; id != end; ++id) + *id = INT_TO_JSID(0); +} + +static __attribute__((always_inline)) inline void +MakeRangeGCSafe(jsid *vec, size_t len) +{ + MakeRangeGCSafe(vec, vec + len); +} + +static __attribute__((always_inline)) inline void +MakeRangeGCSafe(const Shape **beg, const Shape **end) +{ + PodZero(beg, end - beg); +} + +static __attribute__((always_inline)) inline void +MakeRangeGCSafe(const Shape **vec, size_t len) +{ + PodZero(vec, len); +} + +static __attribute__((always_inline)) inline void +SetValueRangeToUndefined(Value *beg, Value *end) +{ + for (Value *v = beg; v != end; ++v) + v->setUndefined(); +} + +static __attribute__((always_inline)) inline void +SetValueRangeToUndefined(Value *vec, size_t len) +{ + SetValueRangeToUndefined(vec, vec + len); +} + +static __attribute__((always_inline)) inline void +SetValueRangeToNull(Value *beg, Value *end) +{ + for (Value *v = beg; v != end; ++v) + v->setNull(); +} + +static __attribute__((always_inline)) inline void +SetValueRangeToNull(Value *vec, size_t len) +{ + SetValueRangeToNull(vec, vec + len); +} + +class AutoObjectVector : public AutoVectorRooter +{ + public: + explicit AutoObjectVector(JSContext *cx + ) + : AutoVectorRooter(cx, OBJVECTOR) + { + do { } while (0); + } + + +}; + +class AutoShapeVector : public AutoVectorRooter +{ + public: + explicit AutoShapeVector(JSContext *cx + ) + : AutoVectorRooter(cx, SHAPEVECTOR) + { + do { } while (0); + } + + +}; + +class AutoValueArray : public AutoGCRooter +{ + js::Value *start_; + unsigned length_; + SkipRoot skip; + + public: + AutoValueArray(JSContext *cx, js::Value *start, unsigned length + ) + : AutoGCRooter(cx, VALARRAY), start_(start), length_(length), skip(cx, start, length) + { + do { } while (0); + } + + Value *start() { return start_; } + unsigned length() const { return length_; } + + +}; +# 1885 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" +class RuntimeAllocPolicy +{ + JSRuntime *const runtime; + + public: + RuntimeAllocPolicy(JSRuntime *rt) : runtime(rt) {} + RuntimeAllocPolicy(JSContext *cx) : runtime(cx->runtime) {} + void *malloc_(size_t bytes) { return runtime->malloc_(bytes); } + void *realloc_(void *p, size_t bytes) { return runtime->realloc_(p, bytes); } + void free_(void *p) { runtime->free_(p); } + void reportAllocOverflow() const {} +}; + + + + +class ContextAllocPolicy +{ + JSContext *const cx; + + public: + ContextAllocPolicy(JSContext *cx) : cx(cx) {} + JSContext *context() const { return cx; } + void *malloc_(size_t bytes) { return cx->malloc_(bytes); } + void *realloc_(void *p, size_t oldBytes, size_t bytes) { return cx->realloc_(p, oldBytes, bytes); } + void free_(void *p) { cx->free_(p); } + void reportAllocOverflow() const { js_ReportAllocationOverflow(cx); } +}; + +} +# 13 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsarray.h" 2 + + + + + + +const unsigned MIN_SPARSE_INDEX = 256; + +namespace js { + +const uint32_t MAX_ARRAY_INDEX = 4294967294u; +} + +inline JSBool +js_IdIsIndex(jsid id, uint32_t *indexp) +{ + if (JSID_IS_INT(id)) { + int32_t i = JSID_TO_INT(id); + if (i < 0) + return (int)0; + *indexp = (uint32_t)i; + return (int)1; + } + + if ((__builtin_expect((!JSID_IS_STRING(id)), 0))) + return (int)0; + + return js::StringIsArrayIndex(JSID_TO_ATOM(id), indexp); +} + +extern JSObject * +js_InitArrayClass(JSContext *cx, JSObject *obj); + +extern bool +js_InitContextBusyArrayTable(JSContext *cx); + +namespace js { + + +extern JSObject * +NewDenseEmptyArray(JSContext *cx, JSObject *proto=__null); + + +extern JSObject * +NewDenseAllocatedArray(JSContext *cx, uint32_t length, JSObject *proto=__null); + + + + + + +extern JSObject * +NewDenseAllocatedEmptyArray(JSContext *cx, uint32_t length, JSObject *proto=__null); + + + + + +extern JSObject * +NewDenseUnallocatedArray(JSContext *cx, uint32_t length, JSObject *proto=__null); + + +extern JSObject * +NewDenseCopiedArray(JSContext *cx, uint32_t length, const Value *vp, JSObject *proto = __null); + + +extern JSObject * +NewSlowEmptyArray(JSContext *cx); + +} + +extern JSBool +js_GetLengthProperty(JSContext *cx, JSObject *obj, uint32_t *lengthp); + +extern JSBool +js_SetLengthProperty(JSContext *cx, JSObject *obj, double length); + +namespace js { + +extern JSBool +array_defineElement(JSContext *cx, HandleObject obj, uint32_t index, const Value *value, + PropertyOp getter, StrictPropertyOp setter, unsigned attrs); + +extern JSBool +array_deleteElement(JSContext *cx, HandleObject obj, uint32_t index, Value *rval, JSBool strict); + + + + + + + +extern bool +GetElements(JSContext *cx, HandleObject aobj, uint32_t length, js::Value *vp); + + + +extern JSBool +array_sort(JSContext *cx, unsigned argc, js::Value *vp); + +extern JSBool +array_push(JSContext *cx, unsigned argc, js::Value *vp); + +extern JSBool +array_pop(JSContext *cx, unsigned argc, js::Value *vp); + +extern JSBool +array_concat(JSContext *cx, unsigned argc, js::Value *vp); + +extern JSBool +array_shift(JSContext *cx, unsigned argc, js::Value *vp); + +} +# 139 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsarray.h" +extern JSBool +js_NewbornArrayPush(JSContext *cx, js::HandleObject obj, const js::Value &v); + +JSBool +js_PrototypeHasIndexedProperties(JSContext *cx, JSObject *obj); + + + + +JSBool +js_GetDenseArrayElementValue(JSContext *cx, JSObject *obj, jsid id, + js::Value *vp); + + +JSBool +js_Array(JSContext *cx, unsigned argc, js::Value *vp); +# 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsbool.h" 1 + + + + + + + +#define jsbool_h___ + + + + + + + +extern JSObject * +js_InitBooleanClass(JSContext *cx, JSObject *obj); + +extern JSString * +js_BooleanToString(JSContext *cx, JSBool b); + +namespace js { + +inline bool +BooleanGetPrimitiveValue(JSContext *cx, JSObject &obj, Value *vp); + +} + +extern JSBool +js_ValueToBoolean(const js::Value &v); +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfun.h" 1 +# 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsiter.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsiter.h" +#define jsiter_h___ + + + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" 1 +# 42 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_VERSION_ECMA_3 148 +#define JS_VERSION_ECMA_3_TEST 149 +# 124 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_HAS_STR_HTML_HELPERS 1 +#define JS_HAS_OBJ_PROTO_PROP 1 +#define JS_HAS_OBJ_WATCHPOINT 1 +#define JS_HAS_TOSOURCE 1 +#define JS_HAS_CATCH_GUARD 1 +#define JS_HAS_UNEVAL 1 +#define JS_HAS_CONST 1 +#define JS_HAS_FUN_EXPR_STMT 1 +#define JS_HAS_NO_SUCH_METHOD 1 +#define JS_HAS_GENERATORS 1 +#define JS_HAS_BLOCK_SCOPE 1 +#define JS_HAS_DESTRUCTURING 2 +#define JS_HAS_GENERATOR_EXPRS 1 +#define JS_HAS_EXPR_CLOSURES 1 +# 146 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsversion.h" +#define JS_HAS_NEW_GLOBAL_OBJECT 1 + + +#define JS_HAS_MAKE_SYSTEM_OBJECT 1 + + +#define JS_HAS_DESTRUCTURING_SHORTHAND (JS_HAS_DESTRUCTURING == 2) + + + + + +#define OLD_GETTER_SETTER_METHODS 1 + + +#define USE_NEW_OBJECT_REPRESENTATION 0 + + + + +#define NEW_OBJECT_REPRESENTATION_ONLY() MOZ_NOT_REACHED("don't call this! to be used in the new object representation") +# 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsiter.h" 2 +# 26 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsiter.h" +#define JSITER_ACTIVE 0x1000 +#define JSITER_UNREUSABLE 0x2000 + +namespace js { + +struct NativeIterator { + HeapPtrObject obj; + HeapPtr *props_array; + HeapPtr *props_cursor; + HeapPtr *props_end; + const Shape **shapes_array; + uint32_t shapes_length; + uint32_t shapes_key; + uint32_t flags; + JSObject *next; + + bool isKeyIter() const { return (flags & 0x2) == 0; } + + inline HeapPtr *begin() const { + return props_array; + } + + inline HeapPtr *end() const { + return props_end; + } + + size_t numKeys() const { + return end() - begin(); + } + + HeapPtr *current() const { + do { } while(0); + return props_cursor; + } + + void incCursor() { + props_cursor = props_cursor + 1; + } + + static NativeIterator *allocateIterator(JSContext *cx, uint32_t slength, + const js::AutoIdVector &props); + void init(JSObject *obj, unsigned flags, uint32_t slength, uint32_t key); + + void mark(JSTracer *trc); +}; + +class ElementIteratorObject : public JSObject { + public: + enum { + TargetSlot, + IndexSlot, + NumSlots + }; + + static JSObject *create(JSContext *cx, HandleObject target); + + inline uint32_t getIndex() const; + inline void setIndex(uint32_t index); + inline JSObject *getTargetObject() const; +# 130 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsiter.h" + bool iteratorNext(JSContext *cx, Value *vp); +}; + +bool +VectorToIdArray(JSContext *cx, AutoIdVector &props, JSIdArray **idap); + +bool +GetIterator(JSContext *cx, HandleObject obj, unsigned flags, Value *vp); + +bool +VectorToKeyIterator(JSContext *cx, HandleObject obj, unsigned flags, AutoIdVector &props, Value *vp); + +bool +VectorToValueIterator(JSContext *cx, HandleObject obj, unsigned flags, AutoIdVector &props, Value *vp); + + + + + +bool +EnumeratedIdVectorToIterator(JSContext *cx, HandleObject obj, unsigned flags, AutoIdVector &props, Value *vp); + + + + + + + +extern JSBool +ValueToIterator(JSContext *cx, unsigned flags, Value *vp); + +extern bool +CloseIterator(JSContext *cx, JSObject *iterObj); + +extern bool +UnwindIteratorForException(JSContext *cx, JSObject *obj); + +extern void +UnwindIteratorForUncatchableException(JSContext *cx, JSObject *obj); + +} + +extern bool +js_SuppressDeletedProperty(JSContext *cx, js::HandleObject obj, jsid id); + +extern bool +js_SuppressDeletedElement(JSContext *cx, js::HandleObject obj, uint32_t index); + +extern bool +js_SuppressDeletedElements(JSContext *cx, js::HandleObject obj, uint32_t begin, uint32_t end); + + + + + + +extern JSBool +js_IteratorMore(JSContext *cx, js::HandleObject iterobj, js::Value *rval); + +extern JSBool +js_IteratorNext(JSContext *cx, JSObject *iterobj, js::Value *rval); + +extern JSBool +js_ThrowStopIteration(JSContext *cx); + +namespace js { + + + + + + + +inline bool +Next(JSContext *cx, HandleObject iter, Value *vp) +{ + if (!js_IteratorMore(cx, iter, vp)) + return false; + if (vp->toBoolean()) + return js_IteratorNext(cx, iter, vp); + vp->setMagic(JS_NO_ITER_VALUE); + return true; +} +# 226 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsiter.h" +template +bool +ForOf(JSContext *cx, const Value &iterable, Op op) +{ + Value iterv(iterable); + if (!ValueToIterator(cx, 0x20, &iterv)) + return false; + RootedObject iter(cx, &iterv.toObject()); + + bool ok = true; + while (ok) { + Value v; + ok = Next(cx, iter, &v); + if (ok) { + if (v.isMagic(JS_NO_ITER_VALUE)) + break; + ok = op(cx, v); + } + } + + bool throwing = !ok && cx->isExceptionPending(); + Value exc; + if (throwing) { + exc = cx->getPendingException(); + cx->clearPendingException(); + } + bool closedOK = CloseIterator(cx, iter); + if (throwing && closedOK) + cx->setPendingException(exc); + return ok && closedOK; +} + +} + + + + + + +typedef enum JSGeneratorState { + JSGEN_NEWBORN, + JSGEN_OPEN, + JSGEN_RUNNING, + JSGEN_CLOSING, + JSGEN_CLOSED +} JSGeneratorState; + +struct JSGenerator { + js::HeapPtrObject obj; + JSGeneratorState state; + js::FrameRegs regs; + JSObject *enumerators; + js::StackFrame *floating; + js::HeapValue floatingStack[1]; + + js::StackFrame *floatingFrame() { + return floating; + } + + js::StackFrame *liveFrame() { + do { } while(0) + ; + return regs.fp(); + } +}; + +extern JSObject * +js_NewGenerator(JSContext *cx); +# 306 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsiter.h" +inline js::StackFrame * +js_FloatingFrameIfGenerator(JSContext *cx, js::StackFrame *fp) +{ + if ((__builtin_expect((fp->isGeneratorFrame()), 0))) + return cx->generatorFor(fp)->floatingFrame(); + return fp; +} + + +extern JSGenerator * +js_FloatingFrameToGenerator(js::StackFrame *fp); + +inline js::StackFrame * +js_LiveFrameIfGenerator(js::StackFrame *fp) +{ + return fp->isGeneratorFrame() ? js_FloatingFrameToGenerator(fp)->liveFrame() : fp; +} + + + +extern JSObject * +js_InitIteratorClasses(JSContext *cx, JSObject *obj); +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsnum.h" 1 + + + + + + + +#define jsnum_h___ + + + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumericConversions.h" 1 +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsnum.h" 2 + +extern double js_NaN; +extern double js_PositiveInfinity; +extern double js_NegativeInfinity; + +namespace js { + +extern bool +InitRuntimeNumberState(JSRuntime *rt); + +extern void +FinishRuntimeNumberState(JSRuntime *rt); + +} + + +extern JSObject * +js_InitNumberClass(JSContext *cx, JSObject *obj); + + + + +extern const char js_isNaN_str[]; +extern const char js_isFinite_str[]; +extern const char js_parseFloat_str[]; +extern const char js_parseInt_str[]; + +class JSString; +class JSFixedString; + + + + + + +extern JSString * +js_NumberToString(JSContext *cx, double d); + +namespace js { + +extern JSFixedString * +Int32ToString(JSContext *cx, int32_t i); + + + + + +extern bool +NumberValueToStringBuffer(JSContext *cx, const Value &v, StringBuffer &sb); + + +extern JSFixedString * +NumberToString(JSContext *cx, double d); + +extern JSFixedString * +IndexToString(JSContext *cx, uint32_t index); + + + + + + +struct ToCStringBuf +{ + + + + + + static const size_t sbufSize = 34; + char sbuf[sbufSize]; + char *dbuf; + + ToCStringBuf(); + ~ToCStringBuf(); +}; + + + + + + + +extern char * +NumberToCString(JSContext *cx, ToCStringBuf *cbuf, double d, int base = 10); + + + + + +const double DOUBLE_INTEGRAL_PRECISION_LIMIT = uint64_t(1) << 53; +# 121 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsnum.h" +extern bool +GetPrefixInteger(JSContext *cx, const jschar *start, const jschar *end, int base, + const jschar **endp, double *dp); + + +__attribute__((always_inline)) inline bool +ToNumber(JSContext *cx, Value *vp) +{ + if (vp->isNumber()) + return true; + double d; + extern bool ToNumberSlow(JSContext *cx, js::Value v, double *dp); + if (!ToNumberSlow(cx, *vp, &d)) + return false; + vp->setNumber(d); + return true; +} + + + + + + + +__attribute__((always_inline)) inline bool +ToUint32(JSContext *cx, const js::Value &v, uint32_t *out) +{ + if (v.isInt32()) { + *out = (uint32_t)v.toInt32(); + return true; + } + extern bool ToUint32Slow(JSContext *cx, const js::Value &v, uint32_t *ip); + return ToUint32Slow(cx, v, out); +} + + + + + + +__attribute__((always_inline)) inline bool +ValueToUint16(JSContext *cx, const js::Value &v, uint16_t *out) +{ + if (v.isInt32()) { + *out = uint16_t(v.toInt32()); + return true; + } + extern bool ValueToUint16Slow(JSContext *cx, const js::Value &v, uint16_t *out); + return ValueToUint16Slow(cx, v, out); +} + +JSBool +num_parseInt(JSContext *cx, unsigned argc, Value *vp); + +} +# 187 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsnum.h" +extern JSBool +js_strtod(JSContext *cx, const jschar *s, const jschar *send, + const jschar **ep, double *dp); + +extern JSBool +js_num_valueOf(JSContext *cx, unsigned argc, js::Value *vp); + +namespace js { + +static __attribute__((always_inline)) inline bool +ValueFitsInInt32(const Value &v, int32_t *pi) +{ + if (v.isInt32()) { + *pi = v.toInt32(); + return true; + } + return v.isDouble() && MOZ_DOUBLE_IS_INT32(v.toDouble(), pi); +} +# 215 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsnum.h" +static __attribute__((always_inline)) inline bool +IsDefinitelyIndex(const Value &v, uint32_t *indexp) +{ + if (v.isInt32() && v.toInt32() >= 0) { + *indexp = v.toInt32(); + return true; + } + + int32_t i; + if (v.isDouble() && MOZ_DOUBLE_IS_INT32(v.toDouble(), &i) && i >= 0) { + *indexp = uint32_t(i); + return true; + } + + return false; +} + + +static inline bool +ToInteger(JSContext *cx, const js::Value &v, double *dp) +{ + if (v.isInt32()) { + *dp = v.toInt32(); + return true; + } + if (v.isDouble()) { + *dp = v.toDouble(); + } else { + extern bool ToNumberSlow(JSContext *cx, Value v, double *dp); + if (!ToNumberSlow(cx, v, dp)) + return false; + } + *dp = ToInteger(*dp); + return true; +} + +} +# 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" +#define _JSPROBES_H +# 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" +#define jsjaeger_h__ + + +#define JSGC_INCREMENTAL_MJ + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxt.h" 1 +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscompartment.h" 1 + + + + + + +#define jscompartment_h___ +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscompartment.h" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" +#define GlobalObject_h___ + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsarray.h" 1 +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsbool.h" 1 +# 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsexn.h" 1 +# 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsexn.h" +#define jsexn_h___ + + + + + + +extern JSObject * +js_InitExceptionClasses(JSContext *cx, JSObject *obj); +# 30 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsexn.h" +extern JSBool +js_ErrorToException(JSContext *cx, const char *message, JSErrorReport *reportp, + JSErrorCallback callback, void *userRef); +# 50 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsexn.h" +extern JSBool +js_ReportUncaughtException(JSContext *cx); + +extern JSErrorReport * +js_ErrorFromException(JSContext *cx, jsval exn); + +extern const JSErrorFormatString * +js_GetLocalizedErrorMessage(JSContext* cx, void *userRef, const char *locale, + const unsigned errorNumber); +# 68 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsexn.h" +extern JSObject * +js_CopyErrorObject(JSContext *cx, js::HandleObject errobj, js::HandleObject scope); + +static inline JSProtoKey +GetExceptionProtoKey(int exn) +{ + do { } while(0); + do { } while(0); + return JSProtoKey(JSProto_Error + exn); +} +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsiter.h" 1 +# 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsnum.h" 1 +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" 2 + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/builtin/RegExp.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/builtin/RegExp.h" +#define RegExp_h___ + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprvtd.h" 1 +# 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/builtin/RegExp.h" 2 + +JSObject * +js_InitRegExpClass(JSContext *cx, JSObject *obj); + + + + + + +namespace js { + + + + + + +bool +ExecuteRegExp(JSContext *cx, RegExpStatics *res, RegExpObject &reobj, + JSLinearString *input, const jschar *chars, size_t length, + size_t *lastIndex, RegExpExecType type, Value *rval); + +bool +ExecuteRegExp(JSContext *cx, RegExpStatics *res, RegExpShared &shared, + JSLinearString *input, const jschar *chars, size_t length, + size_t *lastIndex, RegExpExecType type, Value *rval); + +extern JSBool +regexp_exec(JSContext *cx, unsigned argc, Value *vp); + +extern JSBool +regexp_test(JSContext *cx, unsigned argc, Value *vp); + +} +# 23 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" 2 + +extern JSObject * +js_InitObjectClass(JSContext *cx, JSObject *obj); + +extern JSObject * +js_InitFunctionClass(JSContext *cx, JSObject *obj); + +extern JSObject * +js_InitTypedArrayClasses(JSContext *cx, JSObject *obj); + +namespace js { + +class Debugger; +# 64 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" +class GlobalObject : public JSObject +{ + + + + + static const unsigned STANDARD_CLASS_SLOTS = JSProto_LIMIT * 3; + + + static const unsigned THROWTYPEERROR = STANDARD_CLASS_SLOTS; + static const unsigned GENERATOR_PROTO = THROWTYPEERROR + 1; + static const unsigned REGEXP_STATICS = GENERATOR_PROTO + 1; + static const unsigned FUNCTION_NS = REGEXP_STATICS + 1; + static const unsigned RUNTIME_CODEGEN_ENABLED = FUNCTION_NS + 1; + static const unsigned EVAL = RUNTIME_CODEGEN_ENABLED + 1; + static const unsigned FLAGS = EVAL + 1; + static const unsigned DEBUGGERS = FLAGS + 1; + + + static const unsigned RESERVED_SLOTS = DEBUGGERS + 1; + + void staticAsserts() { + + + + + + typedef int moz_static_assert102[((JSProto_LIMIT * 3 + 8) == RESERVED_SLOTS) ? 1 : -1]; + } + + static const int32_t FLAGS_CLEARED = 0x1; + + inline void setFlags(int32_t flags); + inline void initFlags(int32_t flags); + + friend JSObject * + ::js_InitObjectClass(JSContext *cx, JSObject *obj); + friend JSObject * + ::js_InitFunctionClass(JSContext *cx, JSObject *obj); + + + JSObject * + initFunctionAndObjectClasses(JSContext *cx); + + inline void setDetailsForKey(JSProtoKey key, JSObject *ctor, JSObject *proto); + inline void setObjectClassDetails(JSFunction *ctor, JSObject *proto); + inline void setFunctionClassDetails(JSFunction *ctor, JSObject *proto); + + inline void setThrowTypeError(JSFunction *fun); + + inline void setOriginalEval(JSObject *evalobj); + + Value getConstructor(JSProtoKey key) const { + do { } while(0); + return getSlot(key); + } + + Value getPrototype(JSProtoKey key) const { + do { } while(0); + return getSlot(JSProto_LIMIT + key); + } + + bool classIsInitialized(JSProtoKey key) const { + bool inited = !getConstructor(key).isUndefined(); + do { } while(0); + return inited; + } + + bool functionObjectClassesInitialized() const { + bool inited = classIsInitialized(JSProto_Function); + do { } while(0); + return inited; + } + + bool arrayClassInitialized() const { + return classIsInitialized(JSProto_Array); + } + + bool booleanClassInitialized() const { + return classIsInitialized(JSProto_Boolean); + } + bool numberClassInitialized() const { + return classIsInitialized(JSProto_Number); + } + bool stringClassInitialized() const { + return classIsInitialized(JSProto_String); + } + bool regexpClassInitialized() const { + return classIsInitialized(JSProto_RegExp); + } + bool arrayBufferClassInitialized() const { + return classIsInitialized(JSProto_ArrayBuffer); + } + bool errorClassesInitialized() const { + return classIsInitialized(JSProto_Error); + } + + public: + static GlobalObject *create(JSContext *cx, Class *clasp); + + + + + + JSFunction * + createConstructor(JSContext *cx, JSNative ctor, JSAtom *name, unsigned length, + gc::AllocKind kind = JSFunction::FinalizeKind); +# 180 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" + JSObject *createBlankPrototype(JSContext *cx, js::Class *clasp); + + + + + + JSObject *createBlankPrototypeInheriting(JSContext *cx, js::Class *clasp, JSObject &proto); + + JSObject *getOrCreateObjectPrototype(JSContext *cx) { + if (functionObjectClassesInitialized()) + return &getPrototype(JSProto_Object).toObject(); + Rooted self(cx, this); + if (!initFunctionAndObjectClasses(cx)) + return __null; + return &self->getPrototype(JSProto_Object).toObject(); + } + + JSObject *getOrCreateFunctionPrototype(JSContext *cx) { + if (functionObjectClassesInitialized()) + return &getPrototype(JSProto_Function).toObject(); + Rooted self(cx, this); + if (!initFunctionAndObjectClasses(cx)) + return __null; + return &self->getPrototype(JSProto_Function).toObject(); + } + + JSObject *getOrCreateArrayPrototype(JSContext *cx) { + if (arrayClassInitialized()) + return &getPrototype(JSProto_Array).toObject(); + Rooted self(cx, this); + if (!js_InitArrayClass(cx, this)) + return __null; + return &self->getPrototype(JSProto_Array).toObject(); + } + + JSObject *getOrCreateBooleanPrototype(JSContext *cx) { + if (booleanClassInitialized()) + return &getPrototype(JSProto_Boolean).toObject(); + Rooted self(cx, this); + if (!js_InitBooleanClass(cx, this)) + return __null; + return &self->getPrototype(JSProto_Boolean).toObject(); + } + + JSObject *getOrCreateNumberPrototype(JSContext *cx) { + if (numberClassInitialized()) + return &getPrototype(JSProto_Number).toObject(); + Rooted self(cx, this); + if (!js_InitNumberClass(cx, this)) + return __null; + return &self->getPrototype(JSProto_Number).toObject(); + } + + JSObject *getOrCreateStringPrototype(JSContext *cx) { + if (stringClassInitialized()) + return &getPrototype(JSProto_String).toObject(); + Rooted self(cx, this); + if (!js_InitStringClass(cx, this)) + return __null; + return &self->getPrototype(JSProto_String).toObject(); + } + + JSObject *getOrCreateRegExpPrototype(JSContext *cx) { + if (regexpClassInitialized()) + return &getPrototype(JSProto_RegExp).toObject(); + Rooted self(cx, this); + if (!js_InitRegExpClass(cx, this)) + return __null; + return &self->getPrototype(JSProto_RegExp).toObject(); + } + + JSObject *getOrCreateArrayBufferPrototype(JSContext *cx) { + if (arrayBufferClassInitialized()) + return &getPrototype(JSProto_ArrayBuffer).toObject(); + Rooted self(cx, this); + if (!js_InitTypedArrayClasses(cx, this)) + return __null; + return &self->getPrototype(JSProto_ArrayBuffer).toObject(); + } + + JSObject *getOrCreateCustomErrorPrototype(JSContext *cx, int exnType) { + JSProtoKey key = GetExceptionProtoKey(exnType); + if (errorClassesInitialized()) + return &getPrototype(key).toObject(); + Rooted self(cx, this); + if (!js_InitExceptionClasses(cx, this)) + return __null; + return &self->getPrototype(key).toObject(); + } + + JSObject *getOrCreateGeneratorPrototype(JSContext *cx) { + Value v = getSlotRef(GENERATOR_PROTO); + if (v.isObject()) + return &v.toObject(); + Rooted self(cx, this); + if (!js_InitIteratorClasses(cx, this)) + return __null; + return &self->getSlot(GENERATOR_PROTO).toObject(); + } + + inline RegExpStatics *getRegExpStatics() const; + + JSObject *getThrowTypeError() const { + do { } while(0); + return &getSlot(THROWTYPEERROR).toObject(); + } + + void clear(JSContext *cx); + + bool isCleared() const { + return getSlot(FLAGS).toInt32() & FLAGS_CLEARED; + } + + bool isRuntimeCodeGenEnabled(JSContext *cx); + + const Value &getOriginalEval() const { + do { } while(0); + return getSlot(EVAL); + } + + bool getFunctionNamespace(JSContext *cx, Value *vp); + + static bool initGeneratorClass(JSContext *cx, Handle global); + static bool initStandardClasses(JSContext *cx, Handle global); + + typedef js::Vector DebuggerVector; + + + + + + DebuggerVector *getDebuggers(); + + + + + + static DebuggerVector *getOrCreateDebuggers(JSContext *cx, Handle global); + + static bool addDebugger(JSContext *cx, Handle global, Debugger *dbg); +}; + + + + + + +extern bool +LinkConstructorAndPrototype(JSContext *cx, JSObject *ctor, JSObject *proto); + + + + + +extern bool +DefinePropertiesAndBrand(JSContext *cx, JSObject *obj, JSPropertySpec *ps, JSFunctionSpec *fs); + +typedef HashSet, SystemAllocPolicy> GlobalObjectSet; + +} + +inline bool +JSObject::isGlobal() const +{ + return !!(js::GetObjectClass(this)->flags & (1<<((8 + 8)+2))); +} + +js::GlobalObject & +JSObject::asGlobal() +{ + do { } while(0); + return *static_cast(this); +} +# 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscompartment.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" +#define RegExpObject_h__ + + + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobj.h" 1 +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" 2 + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/Yarr.h" 1 +# 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/Yarr.h" +#define Yarr_h + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 1 3 4 +# 30 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 3 4 +#define _GCC_LIMITS_H_ + + + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/syslimits.h" 1 3 4 + + + + + +#define _GCC_NEXT_LIMITS_H +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 1 3 4 +# 169 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 3 4 +# 1 "/usr/include/limits.h" 1 3 4 +# 25 "/usr/include/limits.h" 3 4 +#define _LIBC_LIMITS_H_ 1 + + + + + + + +#define MB_LEN_MAX 16 +# 133 "/usr/include/limits.h" 3 4 +#define LLONG_MIN (-LLONG_MAX-1) + + +#define LLONG_MAX __LONG_LONG_MAX__ + + +#define ULLONG_MAX (LLONG_MAX * 2ULL + 1) + + + + + +# 1 "/usr/include/bits/posix1_lim.h" 1 3 4 +# 26 "/usr/include/bits/posix1_lim.h" 3 4 +#define _BITS_POSIX1_LIM_H 1 + + + + + +#define _POSIX_AIO_LISTIO_MAX 2 + + +#define _POSIX_AIO_MAX 1 + + +#define _POSIX_ARG_MAX 4096 + + + +#define _POSIX_CHILD_MAX 25 + + + + + +#define _POSIX_DELAYTIMER_MAX 32 + + + +#define _POSIX_HOST_NAME_MAX 255 + + +#define _POSIX_LINK_MAX 8 + + +#define _POSIX_LOGIN_NAME_MAX 9 + + +#define _POSIX_MAX_CANON 255 + + + +#define _POSIX_MAX_INPUT 255 + + +#define _POSIX_MQ_OPEN_MAX 8 + + +#define _POSIX_MQ_PRIO_MAX 32 + + +#define _POSIX_NAME_MAX 14 + + + +#define _POSIX_NGROUPS_MAX 8 + + + + + + +#define _POSIX_OPEN_MAX 20 + + + + + + + +#define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX + + + +#define _POSIX_PATH_MAX 256 + + +#define _POSIX_PIPE_BUF 512 + + + +#define _POSIX_RE_DUP_MAX 255 + + +#define _POSIX_RTSIG_MAX 8 + + +#define _POSIX_SEM_NSEMS_MAX 256 + + +#define _POSIX_SEM_VALUE_MAX 32767 + + +#define _POSIX_SIGQUEUE_MAX 32 + + +#define _POSIX_SSIZE_MAX 32767 + + +#define _POSIX_STREAM_MAX 8 + + +#define _POSIX_SYMLINK_MAX 255 + + + +#define _POSIX_SYMLOOP_MAX 8 + + +#define _POSIX_TIMER_MAX 32 + + +#define _POSIX_TTY_NAME_MAX 9 + + +#define _POSIX_TZNAME_MAX 6 + + + +#define _POSIX_QLIMIT 1 + + + +#define _POSIX_HIWAT _POSIX_PIPE_BUF + + +#define _POSIX_UIO_MAXIOV 16 + + + +#define _POSIX_CLOCKRES_MIN 20000000 + + + +# 1 "/usr/include/bits/local_lim.h" 1 3 4 +# 26 "/usr/include/bits/local_lim.h" 3 4 +#define __undef_NR_OPEN + + +#define __undef_LINK_MAX + + +#define __undef_OPEN_MAX + + +#define __undef_ARG_MAX + + + +# 1 "/usr/include/linux/limits.h" 1 3 4 + +#define _LINUX_LIMITS_H + +#define NR_OPEN 1024 + +#define NGROUPS_MAX 65536 +#define ARG_MAX 131072 +#define LINK_MAX 127 +#define MAX_CANON 255 +#define MAX_INPUT 255 +#define NAME_MAX 255 +#define PATH_MAX 4096 +#define PIPE_BUF 4096 +#define XATTR_NAME_MAX 255 +#define XATTR_SIZE_MAX 65536 +#define XATTR_LIST_MAX 65536 + +#define RTSIG_MAX 32 +# 40 "/usr/include/bits/local_lim.h" 2 3 4 + + + +#undef NR_OPEN +#undef __undef_NR_OPEN + + + +#undef LINK_MAX +#undef __undef_LINK_MAX + + + +#undef OPEN_MAX +#undef __undef_OPEN_MAX + + + +#undef ARG_MAX +#undef __undef_ARG_MAX + + + +#define _POSIX_THREAD_KEYS_MAX 128 + +#define PTHREAD_KEYS_MAX 1024 + + +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 + +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS + + +#define _POSIX_THREAD_THREADS_MAX 64 + +#undef PTHREAD_THREADS_MAX + + + +#define AIO_PRIO_DELTA_MAX 20 + + +#define PTHREAD_STACK_MIN 16384 + + +#define DELAYTIMER_MAX 2147483647 + + +#define TTY_NAME_MAX 32 + + +#define LOGIN_NAME_MAX 256 + + +#define HOST_NAME_MAX 64 + + +#define MQ_PRIO_MAX 32768 + + +#define SEM_VALUE_MAX (2147483647) +# 158 "/usr/include/bits/posix1_lim.h" 2 3 4 + + + +#define SSIZE_MAX LONG_MAX +# 146 "/usr/include/limits.h" 2 3 4 + + + +# 1 "/usr/include/bits/posix2_lim.h" 1 3 4 +# 24 "/usr/include/bits/posix2_lim.h" 3 4 +#define _BITS_POSIX2_LIM_H 1 + + + +#define _POSIX2_BC_BASE_MAX 99 + + +#define _POSIX2_BC_DIM_MAX 2048 + + +#define _POSIX2_BC_SCALE_MAX 99 + + +#define _POSIX2_BC_STRING_MAX 1000 + + + +#define _POSIX2_COLL_WEIGHTS_MAX 2 + + + +#define _POSIX2_EXPR_NEST_MAX 32 + + +#define _POSIX2_LINE_MAX 2048 + + + +#define _POSIX2_RE_DUP_MAX 255 + + + +#define _POSIX2_CHARCLASS_NAME_MAX 14 + + + + + + + +#define BC_BASE_MAX _POSIX2_BC_BASE_MAX + + +#define BC_DIM_MAX _POSIX2_BC_DIM_MAX + + +#define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX + + +#define BC_STRING_MAX _POSIX2_BC_STRING_MAX + + +#define COLL_WEIGHTS_MAX 255 + + +#define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX + + +#define LINE_MAX _POSIX2_LINE_MAX + + +#define CHARCLASS_NAME_MAX 2048 + + + +#define RE_DUP_MAX (0x7fff) +# 150 "/usr/include/limits.h" 2 3 4 + + + +# 1 "/usr/include/bits/xopen_lim.h" 1 3 4 +# 31 "/usr/include/bits/xopen_lim.h" 3 4 +#define _XOPEN_LIM_H 1 + +#define __need_IOV_MAX +# 1 "/usr/include/bits/stdio_lim.h" 1 3 4 +# 24 "/usr/include/bits/stdio_lim.h" 3 4 +#define L_tmpnam 20 +#define TMP_MAX 238328 +#define FILENAME_MAX 4096 + + +#define L_ctermid 9 + +#define L_cuserid 9 + + + + + +#undef FOPEN_MAX +#define FOPEN_MAX 16 + + + +#define IOV_MAX 1024 +# 35 "/usr/include/bits/xopen_lim.h" 2 3 4 +# 66 "/usr/include/bits/xopen_lim.h" 3 4 +#define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV + + + + +#define NL_ARGMAX _POSIX_ARG_MAX + + +#define NL_LANGMAX _POSIX2_LINE_MAX + + +#define NL_MSGMAX INT_MAX + + + +#define NL_NMAX INT_MAX + + +#define NL_SETMAX INT_MAX + + +#define NL_TEXTMAX INT_MAX + + +#define NZERO 20 +# 110 "/usr/include/bits/xopen_lim.h" 3 4 +#define WORD_BIT 32 +# 130 "/usr/include/bits/xopen_lim.h" 3 4 +#define LONG_BIT 32 +# 154 "/usr/include/limits.h" 2 3 4 +# 170 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 2 3 4 +# 8 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/syslimits.h" 2 3 4 +#undef _GCC_NEXT_LIMITS_H +# 35 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 2 3 4 +# 61 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 3 4 +#define _LIMITS_H___ + + +#undef CHAR_BIT +#define CHAR_BIT __CHAR_BIT__ + + + + + + + +#undef SCHAR_MIN +#define SCHAR_MIN (-SCHAR_MAX - 1) +#undef SCHAR_MAX +#define SCHAR_MAX __SCHAR_MAX__ + + +#undef UCHAR_MAX + + + +#define UCHAR_MAX (SCHAR_MAX * 2 + 1) + + + + +#undef CHAR_MIN + + + +#define CHAR_MIN 0 + +#undef CHAR_MAX +#define CHAR_MAX UCHAR_MAX +# 104 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 3 4 +#undef SHRT_MIN +#define SHRT_MIN (-SHRT_MAX - 1) +#undef SHRT_MAX +#define SHRT_MAX __SHRT_MAX__ + + +#undef USHRT_MAX + + + +#define USHRT_MAX (SHRT_MAX * 2 + 1) + + + +#undef INT_MIN +#define INT_MIN (-INT_MAX - 1) +#undef INT_MAX +#define INT_MAX __INT_MAX__ + + +#undef UINT_MAX +#define UINT_MAX (INT_MAX * 2U + 1U) + + + +#undef LONG_MIN +#define LONG_MIN (-LONG_MAX - 1L) +#undef LONG_MAX +#define LONG_MAX __LONG_MAX__ + + +#undef ULONG_MAX +#define ULONG_MAX (LONG_MAX * 2UL + 1UL) +# 152 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include-fixed/limits.h" 3 4 +#undef LONG_LONG_MIN +#define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL) +#undef LONG_LONG_MAX +#define LONG_LONG_MAX __LONG_LONG_MAX__ + + +#undef ULONG_LONG_MAX +#define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1ULL) +# 36 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/Yarr.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrInterpreter.h" 1 +# 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrInterpreter.h" +#define YarrInterpreter_h + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrPattern.h" 1 +# 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrPattern.h" +#define YarrPattern_h + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/wtfbridge.h" 1 + + + + + + + +#define jswtfbridge_h__ +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/wtfbridge.h" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" 1 +# 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/wtfbridge.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" 1 +# 29 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_Platform_h + + + + +#define PLATFORM(WTF_FEATURE) (defined WTF_PLATFORM_ ##WTF_FEATURE && WTF_PLATFORM_ ##WTF_FEATURE) + + + + + +#define COMPILER(WTF_FEATURE) (defined WTF_COMPILER_ ##WTF_FEATURE && WTF_COMPILER_ ##WTF_FEATURE) + +#define CPU(WTF_FEATURE) (defined WTF_CPU_ ##WTF_FEATURE && WTF_CPU_ ##WTF_FEATURE) + +#define HAVE(WTF_FEATURE) (defined HAVE_ ##WTF_FEATURE && HAVE_ ##WTF_FEATURE) + + +#define OS(WTF_FEATURE) (defined WTF_OS_ ##WTF_FEATURE && WTF_OS_ ##WTF_FEATURE) + + + + + +#define USE(WTF_FEATURE) (defined WTF_USE_ ##WTF_FEATURE && WTF_USE_ ##WTF_FEATURE) + +#define ENABLE(WTF_FEATURE) (defined ENABLE_ ##WTF_FEATURE && ENABLE_ ##WTF_FEATURE) +# 80 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define RVCT_VERSION_AT_LEAST(major,minor,patch,build) 0 + + + + + +#define WTF_COMPILER_GCC 1 +#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +#define GCC_VERSION_AT_LEAST(major,minor,patch) (GCC_VERSION >= (major * 10000 + minor * 100 + patch)) +# 233 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_CPU_ARM 1 +# 247 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_ARM_ARCH_AT_LEAST(N) (CPU(ARM) && WTF_ARM_ARCH_VERSION >= N) +# 279 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_ARM_ARCH_VERSION 7 +# 318 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_THUMB_ARCH_VERSION 4 +# 346 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_CPU_ARM_TRADITIONAL 1 +#define WTF_CPU_ARM_THUMB2 0 +# 362 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_CPU_NEEDS_ALIGNED_ACCESS 1 +# 425 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_OS_LINUX 1 +# 478 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_OS_UNIX 1 +# 532 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_PLATFORM_IOS_SIMULATOR 0 + + + +#define WTF_PLATFORM_IOS 0 +# 621 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_USE_ICU_UNICODE 1 +# 760 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define HAVE_SIGNAL_H 1 +# 772 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define HAVE_TM_GMTOFF 1 +#define HAVE_TM_ZONE 1 +#define HAVE_TIMEGM 1 +# 870 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define HAVE_ERRNO_H 1 + + +#define HAVE_LANGINFO_H 1 + +#define HAVE_MMAP 1 +#define HAVE_SBRK 1 +#define HAVE_STRINGS_H 1 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_TIME_H 1 +# 896 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define ENABLE_FAST_MALLOC_MATCH_VALIDATION 0 + + + +#define ENABLE_ICONDATABASE 1 + + + +#define ENABLE_DATABASE 1 + + + +#define ENABLE_JAVASCRIPT_DEBUGGER 1 + + + +#define ENABLE_FTPDIR 1 + + + +#define ENABLE_CONTEXT_MENUS 1 + + + +#define ENABLE_DRAG_SUPPORT 1 + + + +#define ENABLE_DATA_TRANSFER_ITEMS 0 + + + +#define ENABLE_DASHBOARD_SUPPORT 0 + + + +#define ENABLE_INSPECTOR 1 + + + +#define ENABLE_JAVA_BRIDGE 0 + + + +#define ENABLE_NETSCAPE_PLUGIN_API 1 + + + +#define ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE 0 + + + +#define ENABLE_PURGEABLE_MEMORY 0 + + + +#define WTF_USE_PLUGIN_HOST_PROCESS 0 + + + +#define ENABLE_ORIENTATION_EVENTS 0 + + + +#define ENABLE_OPCODE_STATS 0 + + + +#define ENABLE_GLOBAL_FASTMALLOC_NEW 1 + + +#define ENABLE_DEBUG_WITH_BREAKPOINT 0 +#define ENABLE_SAMPLING_COUNTERS 0 +#define ENABLE_SAMPLING_FLAGS 0 +#define ENABLE_OPCODE_SAMPLING 0 +#define ENABLE_CODEBLOCK_SAMPLING 0 +# 980 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define ENABLE_GEOLOCATION 0 + + + +#define ENABLE_GESTURE_RECOGNIZER 0 + + + +#define ENABLE_NOTIFICATIONS 0 + + + + + + + +#define ENABLE_TEXT_CARET 1 + + + +#define ENABLE_ON_FIRST_TEXTAREA_FOCUS_SELECT_ALL 0 + + + +#define ENABLE_FULLSCREEN_API 0 +# 1016 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_USE_JSVALUE32_64 1 + + + + +#define ENABLE_REPAINT_THROTTLING 0 +# 1064 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define ENABLE_JIT_USE_SOFT_MODULO 1 + + + + +#define ENABLE_JIT_OPTIMIZE_CALL 1 + + +#define ENABLE_JIT_OPTIMIZE_NATIVE_CALL 1 + + +#define ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS 1 + + +#define ENABLE_JIT_OPTIMIZE_METHOD_CALLS 1 +# 1087 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define JSC_HOST_CALL + + + + +#define HAVE_COMPUTED_GOTO 1 + + + + + + +#define ENABLE_REGEXP_TRACING 0 + + + + + + +#define ENABLE_YARR_JIT 1 + + +#define ENABLE_YARR_JIT_DEBUG 0 + + + +#define ENABLE_ASSEMBLER 1 +# 1128 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define ENABLE_EXECUTABLE_ALLOCATOR_DEMAND 1 +# 1137 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define ENABLE_SMOOTH_SCROLLING 0 + + + +#define ENABLE_WEB_ARCHIVE 0 +# 1176 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WARN_UNUSED_RETURN __attribute__ ((warn_unused_result)) +# 1186 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_PLATFORM_CFNETWORK Error USE_macro_should_be_used_with_CFNETWORK + +#define ENABLE_JSC_ZOMBIES 0 +# 1226 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" +#define WTF_USE_EXPORT_MACROS 0 +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/wtfbridge.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" 1 +# 27 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" +#define ExecutableAllocator_h + +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stddef.h" 1 3 4 +# 30 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsalloc.h" 1 +# 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" 2 + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Assertions.h" 1 +# 27 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Assertions.h" +#define WTF_Assertions_h + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Platform.h" 1 +# 30 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Assertions.h" 2 + + + + + + + +#define ASSERT_DISABLED 1 + + +#define ASSERT(assertion) MOZ_ASSERT(assertion) +#define ASSERT_UNUSED(variable,assertion) do { (void)variable; ASSERT(assertion); } while (0) + + + +#define ASSERT_NOT_REACHED() MOZ_NOT_REACHED("") +#define CRASH() MOZ_CRASH() +#define COMPILE_ASSERT(exp,name) MOZ_STATIC_ASSERT(exp, #name) +# 37 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" 2 +# 74 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" +#define INITIAL_PROTECTION_FLAGS (PROT_READ | PROT_WRITE | PROT_EXEC) + + + + + + +namespace JSC { + + class ExecutableAllocator; + + enum CodeKind { METHOD_CODE, REGEXP_CODE }; + + + class ExecutablePool { + + friend class js::OffTheBooks; friend class js::Foreground; friend class js::UnwantedForeground; friend struct ::JSContext; friend struct ::JSRuntime; + friend class ExecutableAllocator; +private: + struct Allocation { + char* pages; + size_t size; + + + + }; + + ExecutableAllocator* m_allocator; + char* m_freePtr; + char* m_end; + Allocation m_allocation; + + + unsigned m_refCount; + + + size_t m_mjitCodeMethod; + size_t m_mjitCodeRegexp; + +public: + + bool m_destroy; + + + + size_t m_gcNumber; + + void release(bool willDestroy = false) + { + do { } while(0); + + + if (--m_refCount == 0) { + js::UnwantedForeground::delete_(this); + } + } + +private: + + + + void addRef() + { + do { } while(0); + ++m_refCount; + } + + ExecutablePool(ExecutableAllocator* allocator, Allocation a) + : m_allocator(allocator), m_freePtr(a.pages), m_end(m_freePtr + a.size), m_allocation(a), + m_refCount(1), m_mjitCodeMethod(0), m_mjitCodeRegexp(0), m_destroy(false), m_gcNumber(0) + { } + + ~ExecutablePool(); + + void* alloc(size_t n, CodeKind kind) + { + do { } while(0); + void *result = m_freePtr; + m_freePtr += n; + + if ( kind == REGEXP_CODE ) + m_mjitCodeRegexp += n; + else + m_mjitCodeMethod += n; + + return result; + } + + size_t available() const { + do { } while(0); + return m_end - m_freePtr; + } +}; + +enum AllocationBehavior +{ + AllocationCanRandomize, + AllocationDeterministic +}; + +class ExecutableAllocator { + typedef void (*DestroyCallback)(void* addr, size_t size); + enum ProtectionSetting { Writable, Executable }; + DestroyCallback destroyCallback; + + void initSeed(); + +public: + explicit ExecutableAllocator(AllocationBehavior allocBehavior) + : destroyCallback(__null), + allocBehavior(allocBehavior) + { + if (!pageSize) { + pageSize = determinePageSize(); +# 196 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" + largeAllocSize = pageSize * 16; + } + + + + + + do { } while(0); + } + + ~ExecutableAllocator() + { + for (size_t i = 0; i < m_smallPools.length(); i++) + m_smallPools[i]->release( true); + + + } + + + + + void* alloc(size_t n, ExecutablePool** poolp, CodeKind type) + { + + + + n = roundUpAllocationSize(n, sizeof(void*)); + if (n == OVERSIZE_ALLOCATION) { + *poolp = __null; + return __null; + } + + *poolp = poolForSize(n); + if (!*poolp) + return __null; + + + + void *result = (*poolp)->alloc(n, type); + do { } while(0); + return result; + } + + void releasePoolPages(ExecutablePool *pool) { + do { } while(0); + if (destroyCallback) + destroyCallback(pool->m_allocation.pages, pool->m_allocation.size); + systemRelease(pool->m_allocation); + do { } while(0); + m_pools.remove(m_pools.lookup(pool)); + } + + void sizeOfCode(size_t *method, size_t *regexp, size_t *unused) const; + + void setDestroyCallback(DestroyCallback destroyCallback) { + this->destroyCallback = destroyCallback; + } + + void setRandomize(bool enabled) { + allocBehavior = enabled ? AllocationCanRandomize : AllocationDeterministic; + } + +private: + static size_t pageSize; + static size_t largeAllocSize; + + + + + static const size_t OVERSIZE_ALLOCATION = size_t(-1); + + static size_t roundUpAllocationSize(size_t request, size_t granularity) + { + + + + + + + if ((std::numeric_limits::max() - granularity) <= request) + return OVERSIZE_ALLOCATION; + + + size_t size = request + (granularity - 1); + size = size & ~(granularity - 1); + do { } while(0); + return size; + } + + + ExecutablePool::Allocation systemAlloc(size_t n); + static void systemRelease(const ExecutablePool::Allocation& alloc); + void *computeRandomAllocationAddress(); + + ExecutablePool* createPool(size_t n) + { + size_t allocSize = roundUpAllocationSize(n, pageSize); + if (allocSize == OVERSIZE_ALLOCATION) + return __null; + + if (!m_pools.initialized() && !m_pools.init()) + return __null; + + + + + ExecutablePool::Allocation a = systemAlloc(allocSize); + + if (!a.pages) + return __null; + + ExecutablePool *pool = js::OffTheBooks::new_(this, a); + if (!pool) { + systemRelease(a); + return __null; + } + m_pools.put(pool); + return pool; + } + +public: + ExecutablePool* poolForSize(size_t n) + { + + + + + + + ExecutablePool *minPool = __null; + for (size_t i = 0; i < m_smallPools.length(); i++) { + ExecutablePool *pool = m_smallPools[i]; + if (n <= pool->available() && (!minPool || pool->available() < minPool->available())) + minPool = pool; + } + if (minPool) { + minPool->addRef(); + return minPool; + } + + + + if (n > largeAllocSize) + return createPool(n); + + + ExecutablePool* pool = createPool(largeAllocSize); + if (!pool) + return __null; + + + if (m_smallPools.length() < maxSmallPools) { + + m_smallPools.append(pool); + pool->addRef(); + } else { + + int iMin = 0; + for (size_t i = 1; i < m_smallPools.length(); i++) + if (m_smallPools[i]->available() < + m_smallPools[iMin]->available()) + { + iMin = i; + } + + + + ExecutablePool *minPool = m_smallPools[iMin]; + if ((pool->available() - n) > minPool->available()) { + minPool->release(); + m_smallPools[iMin] = pool; + pool->addRef(); + } + } + + + return pool; + } +# 386 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" + static void makeWritable(void*, size_t) {} + static void makeExecutable(void*, size_t) {} +# 451 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/jit/ExecutableAllocator.h" + static void cacheFlush(void* code, size_t size) + { + asm volatile ( + "push {r7}\n" + "mov r0, %0\n" + "mov r1, %1\n" + "mov r7, #0xf0000\n" + "add r7, r7, #0x2\n" + "mov r2, #0x0\n" + "svc 0x0\n" + "pop {r7}\n" + : + : "r" (code), "r" (reinterpret_cast(code) + size) + : "r0", "r1", "r2"); + } + + + + + + + +private: + + + + + + + static const size_t maxSmallPools = 4; + typedef js::Vector SmallExecPoolVector; + SmallExecPoolVector m_smallPools; + + + + + typedef js::HashSet, js::SystemAllocPolicy> + ExecPoolHashSet; + ExecPoolHashSet m_pools; + AllocationBehavior allocBehavior; + + static size_t determinePageSize(); +}; + +} +# 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/wtfbridge.h" 2 + +namespace JSC { namespace Yarr { + + + + + +typedef jschar UChar; +typedef JSLinearString UString; + +using namespace js::unicode; + +class Unicode { + public: + static UChar toUpper(UChar c) { return ToUpperCase(c); } + static UChar toLower(UChar c) { return ToLowerCase(c); } +}; + + + + + + +template +class RefCounted { +}; + +template +class RefPtr { + T *ptr; + public: + RefPtr(T *p) { ptr = p; } + operator bool() const { return ptr != __null; } + const T *operator ->() const { return ptr; } + T *get() { return ptr; } +}; + +template +class PassRefPtr { + T *ptr; + public: + PassRefPtr(T *p) { ptr = p; } + operator T*() { return ptr; } +}; + +template +class PassOwnPtr { + T *ptr; + public: + PassOwnPtr(T *p) { ptr = p; } + + T *get() { return ptr; } +}; + +template +class OwnPtr { + T *ptr; + public: + OwnPtr() : ptr(__null) { } + OwnPtr(PassOwnPtr p) : ptr(p.get()) { } + + ~OwnPtr() { + if (ptr) + js::Foreground::delete_(ptr); + } + + OwnPtr &operator=(PassOwnPtr p) { + ptr = p.get(); + return *this; + } + + T *operator ->() { return ptr; } + + T *get() { return ptr; } + + T *release() { + T *result = ptr; + ptr = __null; + return result; + } +}; + +template +PassRefPtr adoptRef(T *p) { return PassRefPtr(p); } + +template +PassOwnPtr adoptPtr(T *p) { return PassOwnPtr(p); } + +#define WTF_MAKE_FAST_ALLOCATED + +template +class Ref { + T &val; + public: + Ref(T &val) : val(val) { } + operator T&() const { return val; } +}; + + + + + +template +class Vector { + public: + js::Vector impl; + public: + Vector() {} + + Vector(const Vector &v) { + + (void) append(v); + } + + size_t size() const { + return impl.length(); + } + + T &operator[](size_t i) { + return impl[i]; + } + + const T &operator[](size_t i) const { + return impl[i]; + } + + T &at(size_t i) { + return impl[i]; + } + + const T *begin() const { + return impl.begin(); + } + + T &last() { + return impl.back(); + } + + bool isEmpty() const { + return impl.empty(); + } + + template + void append(const U &u) { + + (void) impl.append(static_cast(u)); + } + + template + void append(const Vector &v) { + + (void) impl.append(v.impl); + } + + void insert(size_t i, const T& t) { + + (void) impl.insert(&impl[i], t); + } + + void remove(size_t i) { + impl.erase(&impl[i]); + } + + void clear() { + return impl.clear(); + } + + void shrink(size_t newLength) { + + do { } while(0); + (void) impl.resize(newLength); + } + + void deleteAllValues() { + for (T *p = impl.begin(); p != impl.end(); ++p) + js::Foreground::delete_(*p); + } +}; + +template +class Vector > { + public: + js::Vector impl; + public: + Vector() {} + + size_t size() const { + return impl.length(); + } + + void append(T *t) { + + (void) impl.append(t); + } + + PassOwnPtr operator[](size_t i) { + return PassOwnPtr(impl[i]); + } + + void clear() { + for (T **p = impl.begin(); p != impl.end(); ++p) + js::Foreground::delete_(*p); + return impl.clear(); + } +}; + +template +inline void +deleteAllValues(Vector &v) { + v.deleteAllValues(); +} + + + + + + +class JSGlobalData { + public: + ExecutableAllocator *regexAllocator; + + JSGlobalData(ExecutableAllocator *regexAllocator) + : regexAllocator(regexAllocator) { } +}; + + + + + + +const size_t notFound = size_t(-1); + + + + + +#define UNUSED_PARAM(e) + +} + + + + + + +namespace std { +# 276 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/wtfbridge.h" +template +inline T +min(T t1, T t2) +{ + return ((t1)<(t2)?(t1):(t2)); +} + +template +inline T +max(T t1, T t2) +{ + return ((t1)>(t2)?(t1):(t2)); +} + +template +inline void +swap(T &t1, T &t2) +{ + T tmp = t1; + t1 = t2; + t2 = tmp; +} +} + +} +# 35 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrPattern.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/ASCIICType.h" 1 +# 34 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/ASCIICType.h" +#define WTF_ASCIICType_h + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Assertions.h" 1 +# 37 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/ASCIICType.h" 2 +# 48 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/ASCIICType.h" +namespace WTF { + + inline bool isASCII(char c) { return !(c & ~0x7F); } + inline bool isASCII(unsigned short c) { return !(c & ~0x7F); } + + inline bool isASCII(wchar_t c) { return !(c & ~0x7F); } + + inline bool isASCII(int c) { return !(c & ~0x7F); } + inline bool isASCII(unsigned c) { return !(c & ~0x7F); } + + inline bool isASCIIAlpha(char c) { return (c | 0x20) >= 'a' && (c | 0x20) <= 'z'; } + inline bool isASCIIAlpha(unsigned short c) { return (c | 0x20) >= 'a' && (c | 0x20) <= 'z'; } + + inline bool isASCIIAlpha(wchar_t c) { return (c | 0x20) >= 'a' && (c | 0x20) <= 'z'; } + + inline bool isASCIIAlpha(int c) { return (c | 0x20) >= 'a' && (c | 0x20) <= 'z'; } + inline bool isASCIIAlpha(unsigned c) { return (c | 0x20) >= 'a' && (c | 0x20) <= 'z'; } + + inline bool isASCIIAlphanumeric(char c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'z'); } + inline bool isASCIIAlphanumeric(unsigned short c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'z'); } + + inline bool isASCIIAlphanumeric(wchar_t c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'z'); } + + inline bool isASCIIAlphanumeric(int c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'z'); } + inline bool isASCIIAlphanumeric(unsigned c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'z'); } + + inline bool isASCIIDigit(char c) { return (c >= '0') & (c <= '9'); } + inline bool isASCIIDigit(unsigned short c) { return (c >= '0') & (c <= '9'); } + + inline bool isASCIIDigit(wchar_t c) { return (c >= '0') & (c <= '9'); } + + inline bool isASCIIDigit(int c) { return (c >= '0') & (c <= '9'); } + inline bool isASCIIDigit(unsigned c) { return (c >= '0') & (c <= '9'); } + + inline bool isASCIIHexDigit(char c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f'); } + inline bool isASCIIHexDigit(unsigned short c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f'); } + + inline bool isASCIIHexDigit(wchar_t c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f'); } + + inline bool isASCIIHexDigit(int c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f'); } + inline bool isASCIIHexDigit(unsigned c) { return (c >= '0' && c <= '9') || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f'); } + + inline bool isASCIIOctalDigit(char c) { return (c >= '0') & (c <= '7'); } + inline bool isASCIIOctalDigit(unsigned short c) { return (c >= '0') & (c <= '7'); } + + inline bool isASCIIOctalDigit(wchar_t c) { return (c >= '0') & (c <= '7'); } + + inline bool isASCIIOctalDigit(int c) { return (c >= '0') & (c <= '7'); } + inline bool isASCIIOctalDigit(unsigned c) { return (c >= '0') & (c <= '7'); } + + inline bool isASCIILower(char c) { return c >= 'a' && c <= 'z'; } + inline bool isASCIILower(unsigned short c) { return c >= 'a' && c <= 'z'; } + + inline bool isASCIILower(wchar_t c) { return c >= 'a' && c <= 'z'; } + + inline bool isASCIILower(int c) { return c >= 'a' && c <= 'z'; } + inline bool isASCIILower(unsigned c) { return c >= 'a' && c <= 'z'; } + + inline bool isASCIIUpper(char c) { return c >= 'A' && c <= 'Z'; } + inline bool isASCIIUpper(unsigned short c) { return c >= 'A' && c <= 'Z'; } + + inline bool isASCIIUpper(wchar_t c) { return c >= 'A' && c <= 'Z'; } + + inline bool isASCIIUpper(int c) { return c >= 'A' && c <= 'Z'; } + inline bool isASCIIUpper(unsigned c) { return c >= 'A' && c <= 'Z'; } +# 127 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/ASCIICType.h" + inline bool isASCIISpace(char c) { return c <= ' ' && (c == ' ' || (c <= 0xD && c >= 0x9)); } + inline bool isASCIISpace(unsigned short c) { return c <= ' ' && (c == ' ' || (c <= 0xD && c >= 0x9)); } + + inline bool isASCIISpace(wchar_t c) { return c <= ' ' && (c == ' ' || (c <= 0xD && c >= 0x9)); } + + inline bool isASCIISpace(int c) { return c <= ' ' && (c == ' ' || (c <= 0xD && c >= 0x9)); } + inline bool isASCIISpace(unsigned c) { return c <= ' ' && (c == ' ' || (c <= 0xD && c >= 0x9)); } + + inline char toASCIILower(char c) { return c | ((c >= 'A' && c <= 'Z') << 5); } + inline unsigned short toASCIILower(unsigned short c) { return c | ((c >= 'A' && c <= 'Z') << 5); } + + inline wchar_t toASCIILower(wchar_t c) { return c | ((c >= 'A' && c <= 'Z') << 5); } + + inline int toASCIILower(int c) { return c | ((c >= 'A' && c <= 'Z') << 5); } + inline unsigned toASCIILower(unsigned c) { return c | ((c >= 'A' && c <= 'Z') << 5); } + + + inline char toASCIIUpper(char c) { return static_cast(c & ~((c >= 'a' && c <= 'z') << 5)); } + inline unsigned short toASCIIUpper(unsigned short c) { return static_cast(c & ~((c >= 'a' && c <= 'z') << 5)); } + + inline wchar_t toASCIIUpper(wchar_t c) { return static_cast(c & ~((c >= 'a' && c <= 'z') << 5)); } + + inline int toASCIIUpper(int c) { return static_cast(c & ~((c >= 'a' && c <= 'z') << 5)); } + inline unsigned toASCIIUpper(unsigned c) { return static_cast(c & ~((c >= 'a' && c <= 'z') << 5)); } + + inline int toASCIIHexValue(char c) { do { } while(0); return c < 'A' ? c - '0' : (c - 'A' + 10) & 0xF; } + inline int toASCIIHexValue(unsigned short c) { do { } while(0); return c < 'A' ? c - '0' : (c - 'A' + 10) & 0xF; } + + inline int toASCIIHexValue(wchar_t c) { do { } while(0); return c < 'A' ? c - '0' : (c - 'A' + 10) & 0xF; } + + inline int toASCIIHexValue(int c) { do { } while(0); return c < 'A' ? c - '0' : (c - 'A' + 10) & 0xF; } + inline int toASCIIHexValue(unsigned c) { do { } while(0); return c < 'A' ? c - '0' : (c - 'A' + 10) & 0xF; } + + inline bool isASCIIPrintable(char c) { return c >= ' ' && c <= '~'; } + inline bool isASCIIPrintable(unsigned short c) { return c >= ' ' && c <= '~'; } + + inline bool isASCIIPrintable(wchar_t c) { return c >= ' ' && c <= '~'; } + + inline bool isASCIIPrintable(int c) { return c >= ' ' && c <= '~'; } + inline bool isASCIIPrintable(unsigned c) { return c >= ' ' && c <= '~'; } +} + +using WTF::isASCII; +using WTF::isASCIIAlpha; +using WTF::isASCIIAlphanumeric; +using WTF::isASCIIDigit; +using WTF::isASCIIHexDigit; +using WTF::isASCIILower; +using WTF::isASCIIOctalDigit; +using WTF::isASCIIPrintable; +using WTF::isASCIISpace; +using WTF::isASCIIUpper; +using WTF::toASCIIHexValue; +using WTF::toASCIILower; +using WTF::toASCIIUpper; +# 36 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrPattern.h" 2 + +namespace JSC { namespace Yarr { + +enum ErrorCode { + NoError, + PatternTooLarge, + QuantifierOutOfOrder, + QuantifierWithoutAtom, + MissingParentheses, + ParenthesesUnmatched, + ParenthesesTypeInvalid, + CharacterClassUnmatched, + CharacterClassInvalidRange, + CharacterClassOutOfOrder, + EscapeUnterminated, + QuantifierTooLarge, + NumberOfErrorCodes +}; + +struct PatternDisjunction; + +struct CharacterRange { + UChar begin; + UChar end; + + CharacterRange(UChar begin, UChar end) + : begin(begin) + , end(end) + { + } +}; + +struct CharacterClassTable : RefCounted { + friend class js::OffTheBooks; + const char* m_table; + bool m_inverted; + static PassRefPtr create(const char* table, bool inverted) + { + return adoptRef(js::OffTheBooks::new_(table, inverted)); + } + +private: + CharacterClassTable(const char* table, bool inverted) + : m_table(table) + , m_inverted(inverted) + { + } +}; + +struct CharacterClass { + +public: + + + + CharacterClass(PassRefPtr table) + : m_table(table) + { + } + ~CharacterClass() + { + js::Foreground::delete_(m_table.get()); + } + Vector m_matches; + Vector m_ranges; + Vector m_matchesUnicode; + Vector m_rangesUnicode; + RefPtr m_table; +}; + +enum QuantifierType { + QuantifierFixedCount, + QuantifierGreedy, + QuantifierNonGreedy +}; + +struct PatternTerm { + enum Type { + TypeAssertionBOL, + TypeAssertionEOL, + TypeAssertionWordBoundary, + TypePatternCharacter, + TypeCharacterClass, + TypeBackReference, + TypeForwardReference, + TypeParenthesesSubpattern, + TypeParentheticalAssertion + } type; + bool m_capture :1; + bool m_invert :1; + union { + UChar patternCharacter; + CharacterClass* characterClass; + unsigned backReferenceSubpatternId; + struct { + PatternDisjunction* disjunction; + unsigned subpatternId; + unsigned lastSubpatternId; + bool isCopy; + bool isTerminal; + } parentheses; + }; + QuantifierType quantityType; + unsigned quantityCount; + int inputPosition; + unsigned frameLocation; + + + PatternTerm() + : type(PatternTerm::TypePatternCharacter) + , m_capture(false) + , m_invert(false) + { + patternCharacter = 0; + quantityType = QuantifierFixedCount; + quantityCount = 1; + } + + PatternTerm(UChar ch) + : type(PatternTerm::TypePatternCharacter) + , m_capture(false) + , m_invert(false) + { + patternCharacter = ch; + quantityType = QuantifierFixedCount; + quantityCount = 1; + } + + PatternTerm(CharacterClass* charClass, bool invert) + : type(PatternTerm::TypeCharacterClass) + , m_capture(false) + , m_invert(invert) + { + characterClass = charClass; + quantityType = QuantifierFixedCount; + quantityCount = 1; + } + + PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) + : type(type) + , m_capture(capture) + , m_invert(invert) + { + parentheses.disjunction = disjunction; + parentheses.subpatternId = subpatternId; + parentheses.isCopy = false; + parentheses.isTerminal = false; + quantityType = QuantifierFixedCount; + quantityCount = 1; + } + + PatternTerm(Type type, bool invert = false) + : type(type) + , m_capture(false) + , m_invert(invert) + { + quantityType = QuantifierFixedCount; + quantityCount = 1; + } + + PatternTerm(unsigned spatternId) + : type(TypeBackReference) + , m_capture(false) + , m_invert(false) + { + backReferenceSubpatternId = spatternId; + quantityType = QuantifierFixedCount; + quantityCount = 1; + } + + static PatternTerm ForwardReference() + { + return PatternTerm(TypeForwardReference); + } + + static PatternTerm BOL() + { + return PatternTerm(TypeAssertionBOL); + } + + static PatternTerm EOL() + { + return PatternTerm(TypeAssertionEOL); + } + + static PatternTerm WordBoundary(bool invert) + { + return PatternTerm(TypeAssertionWordBoundary, invert); + } + + bool invert() + { + return m_invert; + } + + bool capture() + { + return m_capture; + } + + void quantify(unsigned count, QuantifierType type) + { + quantityCount = count; + quantityType = type; + } +}; + +struct PatternAlternative { + +public: + PatternAlternative(PatternDisjunction* disjunction) + : m_parent(disjunction) + , m_onceThrough(false) + , m_hasFixedSize(false) + , m_startsWithBOL(false) + , m_containsBOL(false) + { + } + + PatternTerm& lastTerm() + { + do { } while(0); + return m_terms[m_terms.size() - 1]; + } + + void removeLastTerm() + { + do { } while(0); + m_terms.shrink(m_terms.size() - 1); + } + + void setOnceThrough() + { + m_onceThrough = true; + } + + bool onceThrough() + { + return m_onceThrough; + } + + Vector m_terms; + PatternDisjunction* m_parent; + unsigned m_minimumSize; + bool m_onceThrough : 1; + bool m_hasFixedSize : 1; + bool m_startsWithBOL : 1; + bool m_containsBOL : 1; +}; + +struct PatternDisjunction { + +public: + PatternDisjunction(PatternAlternative* parent = 0) + : m_parent(parent) + , m_hasFixedSize(false) + { + } + + ~PatternDisjunction() + { + deleteAllValues(m_alternatives); + } + + PatternAlternative* addNewAlternative() + { + PatternAlternative* alternative = js::OffTheBooks::new_(this); + m_alternatives.append(alternative); + return alternative; + } + + Vector m_alternatives; + PatternAlternative* m_parent; + unsigned m_minimumSize; + unsigned m_callFrameSize; + bool m_hasFixedSize; +}; + + + + + +CharacterClass* newlineCreate(); +CharacterClass* digitsCreate(); +CharacterClass* spacesCreate(); +CharacterClass* wordcharCreate(); +CharacterClass* nondigitsCreate(); +CharacterClass* nonspacesCreate(); +CharacterClass* nonwordcharCreate(); + +struct TermChain { + TermChain(PatternTerm term) + : term(term) + {} + + PatternTerm term; + Vector hotTerms; +}; + +struct YarrPattern { + YarrPattern(const UString& pattern, bool ignoreCase, bool multiline, ErrorCode* error); + + ~YarrPattern() + { + deleteAllValues(m_disjunctions); + deleteAllValues(m_userCharacterClasses); + } + + void reset() + { + m_numSubpatterns = 0; + m_maxBackReference = 0; + + m_containsBackreferences = false; + m_containsBOL = false; + + newlineCached = 0; + digitsCached = 0; + spacesCached = 0; + wordcharCached = 0; + nondigitsCached = 0; + nonspacesCached = 0; + nonwordcharCached = 0; + + deleteAllValues(m_disjunctions); + m_disjunctions.clear(); + deleteAllValues(m_userCharacterClasses); + m_userCharacterClasses.clear(); + } + + bool containsIllegalBackReference() + { + return m_maxBackReference > m_numSubpatterns; + } + + CharacterClass* newlineCharacterClass() + { + if (!newlineCached) + m_userCharacterClasses.append(newlineCached = newlineCreate()); + return newlineCached; + } + CharacterClass* digitsCharacterClass() + { + if (!digitsCached) + m_userCharacterClasses.append(digitsCached = digitsCreate()); + return digitsCached; + } + CharacterClass* spacesCharacterClass() + { + if (!spacesCached) + m_userCharacterClasses.append(spacesCached = spacesCreate()); + return spacesCached; + } + CharacterClass* wordcharCharacterClass() + { + if (!wordcharCached) + m_userCharacterClasses.append(wordcharCached = wordcharCreate()); + return wordcharCached; + } + CharacterClass* nondigitsCharacterClass() + { + if (!nondigitsCached) + m_userCharacterClasses.append(nondigitsCached = nondigitsCreate()); + return nondigitsCached; + } + CharacterClass* nonspacesCharacterClass() + { + if (!nonspacesCached) + m_userCharacterClasses.append(nonspacesCached = nonspacesCreate()); + return nonspacesCached; + } + CharacterClass* nonwordcharCharacterClass() + { + if (!nonwordcharCached) + m_userCharacterClasses.append(nonwordcharCached = nonwordcharCreate()); + return nonwordcharCached; + } + + bool m_ignoreCase : 1; + bool m_multiline : 1; + bool m_containsBackreferences : 1; + bool m_containsBOL : 1; + unsigned m_numSubpatterns; + unsigned m_maxBackReference; + PatternDisjunction* m_body; + Vector m_disjunctions; + Vector m_userCharacterClasses; + +private: + ErrorCode compile(const UString& patternString); + + CharacterClass* newlineCached; + CharacterClass* digitsCached; + CharacterClass* spacesCached; + CharacterClass* wordcharCached; + CharacterClass* nondigitsCached; + CharacterClass* nonspacesCached; + CharacterClass* nonwordcharCached; +}; + +} } +# 34 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrInterpreter.h" 2 + +namespace WTF { +class BumpPointerAllocator; +} +using WTF::BumpPointerAllocator; + +namespace JSC { namespace Yarr { + +class ByteDisjunction; + +struct ByteTerm { + enum Type { + TypeBodyAlternativeBegin, + TypeBodyAlternativeDisjunction, + TypeBodyAlternativeEnd, + TypeAlternativeBegin, + TypeAlternativeDisjunction, + TypeAlternativeEnd, + TypeSubpatternBegin, + TypeSubpatternEnd, + TypeAssertionBOL, + TypeAssertionEOL, + TypeAssertionWordBoundary, + TypePatternCharacterOnce, + TypePatternCharacterFixed, + TypePatternCharacterGreedy, + TypePatternCharacterNonGreedy, + TypePatternCasedCharacterOnce, + TypePatternCasedCharacterFixed, + TypePatternCasedCharacterGreedy, + TypePatternCasedCharacterNonGreedy, + TypeCharacterClass, + TypeBackReference, + TypeParenthesesSubpattern, + TypeParenthesesSubpatternOnceBegin, + TypeParenthesesSubpatternOnceEnd, + TypeParenthesesSubpatternTerminalBegin, + TypeParenthesesSubpatternTerminalEnd, + TypeParentheticalAssertionBegin, + TypeParentheticalAssertionEnd, + TypeCheckInput, + TypeUncheckInput + } type; + union { + struct { + union { + UChar patternCharacter; + struct { + UChar lo; + UChar hi; + } casedCharacter; + CharacterClass* characterClass; + unsigned subpatternId; + }; + union { + ByteDisjunction* parenthesesDisjunction; + unsigned parenthesesWidth; + }; + QuantifierType quantityType; + unsigned quantityCount; + } atom; + struct { + int next; + int end; + bool onceThrough; + } alternative; + unsigned checkInputCount; + }; + unsigned frameLocation; + bool m_capture : 1; + bool m_invert : 1; + int inputPosition; + + + ByteTerm() + { + } + + ByteTerm(UChar ch, int inputPos, unsigned frameLocation, unsigned quantityCount, QuantifierType quantityType) + : frameLocation(frameLocation) + , m_capture(false) + , m_invert(false) + { + switch (quantityType) { + case QuantifierFixedCount: + type = (quantityCount == 1) ? ByteTerm::TypePatternCharacterOnce : ByteTerm::TypePatternCharacterFixed; + break; + case QuantifierGreedy: + type = ByteTerm::TypePatternCharacterGreedy; + break; + case QuantifierNonGreedy: + type = ByteTerm::TypePatternCharacterNonGreedy; + break; + } + + atom.patternCharacter = ch; + atom.quantityType = quantityType; + atom.quantityCount = quantityCount; + inputPosition = inputPos; + } + + ByteTerm(UChar lo, UChar hi, int inputPos, unsigned frameLocation, unsigned quantityCount, QuantifierType quantityType) + : frameLocation(frameLocation) + , m_capture(false) + , m_invert(false) + { + switch (quantityType) { + case QuantifierFixedCount: + type = (quantityCount == 1) ? ByteTerm::TypePatternCasedCharacterOnce : ByteTerm::TypePatternCasedCharacterFixed; + break; + case QuantifierGreedy: + type = ByteTerm::TypePatternCasedCharacterGreedy; + break; + case QuantifierNonGreedy: + type = ByteTerm::TypePatternCasedCharacterNonGreedy; + break; + } + + atom.casedCharacter.lo = lo; + atom.casedCharacter.hi = hi; + atom.quantityType = quantityType; + atom.quantityCount = quantityCount; + inputPosition = inputPos; + } + + ByteTerm(CharacterClass* characterClass, bool invert, int inputPos) + : type(ByteTerm::TypeCharacterClass) + , m_capture(false) + , m_invert(invert) + { + atom.characterClass = characterClass; + atom.quantityType = QuantifierFixedCount; + atom.quantityCount = 1; + inputPosition = inputPos; + } + + ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) + : type(type) + , m_capture(capture) + , m_invert(false) + { + atom.subpatternId = subpatternId; + atom.parenthesesDisjunction = parenthesesInfo; + atom.quantityType = QuantifierFixedCount; + atom.quantityCount = 1; + inputPosition = inputPos; + } + + ByteTerm(Type type, bool invert = false) + : type(type) + , m_capture(false) + , m_invert(invert) + { + atom.quantityType = QuantifierFixedCount; + atom.quantityCount = 1; + } + + ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) + : type(type) + , m_capture(capture) + , m_invert(invert) + { + atom.subpatternId = subpatternId; + atom.quantityType = QuantifierFixedCount; + atom.quantityCount = 1; + inputPosition = inputPos; + } + + static ByteTerm BOL(int inputPos) + { + ByteTerm term(TypeAssertionBOL); + term.inputPosition = inputPos; + return term; + } + + static ByteTerm CheckInput(unsigned count) + { + ByteTerm term(TypeCheckInput); + term.checkInputCount = count; + return term; + } + + static ByteTerm UncheckInput(unsigned count) + { + ByteTerm term(TypeUncheckInput); + term.checkInputCount = count; + return term; + } + + static ByteTerm EOL(int inputPos) + { + ByteTerm term(TypeAssertionEOL); + term.inputPosition = inputPos; + return term; + } + + static ByteTerm WordBoundary(bool invert, int inputPos) + { + ByteTerm term(TypeAssertionWordBoundary, invert); + term.inputPosition = inputPos; + return term; + } + + static ByteTerm BackReference(unsigned subpatternId, int inputPos) + { + return ByteTerm(TypeBackReference, subpatternId, false, false, inputPos); + } + + static ByteTerm BodyAlternativeBegin(bool onceThrough) + { + ByteTerm term(TypeBodyAlternativeBegin); + term.alternative.next = 0; + term.alternative.end = 0; + term.alternative.onceThrough = onceThrough; + return term; + } + + static ByteTerm BodyAlternativeDisjunction(bool onceThrough) + { + ByteTerm term(TypeBodyAlternativeDisjunction); + term.alternative.next = 0; + term.alternative.end = 0; + term.alternative.onceThrough = onceThrough; + return term; + } + + static ByteTerm BodyAlternativeEnd() + { + ByteTerm term(TypeBodyAlternativeEnd); + term.alternative.next = 0; + term.alternative.end = 0; + term.alternative.onceThrough = false; + return term; + } + + static ByteTerm AlternativeBegin() + { + ByteTerm term(TypeAlternativeBegin); + term.alternative.next = 0; + term.alternative.end = 0; + term.alternative.onceThrough = false; + return term; + } + + static ByteTerm AlternativeDisjunction() + { + ByteTerm term(TypeAlternativeDisjunction); + term.alternative.next = 0; + term.alternative.end = 0; + term.alternative.onceThrough = false; + return term; + } + + static ByteTerm AlternativeEnd() + { + ByteTerm term(TypeAlternativeEnd); + term.alternative.next = 0; + term.alternative.end = 0; + term.alternative.onceThrough = false; + return term; + } + + static ByteTerm SubpatternBegin() + { + return ByteTerm(TypeSubpatternBegin); + } + + static ByteTerm SubpatternEnd() + { + return ByteTerm(TypeSubpatternEnd); + } + + bool invert() + { + return m_invert; + } + + bool capture() + { + return m_capture; + } +}; + +class ByteDisjunction { + +public: + ByteDisjunction(unsigned numSubpatterns, unsigned frameSize) + : m_numSubpatterns(numSubpatterns) + , m_frameSize(frameSize) + { + } + + Vector terms; + unsigned m_numSubpatterns; + unsigned m_frameSize; +}; + +struct BytecodePattern { + +public: + BytecodePattern(PassOwnPtr body, const Vector &allParenthesesInfo, YarrPattern& pattern, BumpPointerAllocator* allocator) + : m_body(body) + , m_ignoreCase(pattern.m_ignoreCase) + , m_multiline(pattern.m_multiline) + , m_allocator(allocator) + { + newlineCharacterClass = pattern.newlineCharacterClass(); + wordcharCharacterClass = pattern.wordcharCharacterClass(); + + m_allParenthesesInfo.append(allParenthesesInfo); + m_userCharacterClasses.append(pattern.m_userCharacterClasses); + + + + pattern.m_userCharacterClasses.clear(); + } + + ~BytecodePattern() + { + deleteAllValues(m_allParenthesesInfo); + deleteAllValues(m_userCharacterClasses); + } + + OwnPtr m_body; + bool m_ignoreCase; + bool m_multiline; + + + BumpPointerAllocator* m_allocator; + + CharacterClass* newlineCharacterClass; + CharacterClass* wordcharCharacterClass; + +private: + Vector m_allParenthesesInfo; + Vector m_userCharacterClasses; +}; + +} } +# 38 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/Yarr.h" 2 + + +namespace JSC { namespace Yarr { + +#define YarrStackSpaceForBackTrackInfoPatternCharacter 1 +#define YarrStackSpaceForBackTrackInfoCharacterClass 1 +#define YarrStackSpaceForBackTrackInfoBackReference 2 +#define YarrStackSpaceForBackTrackInfoAlternative 1 +#define YarrStackSpaceForBackTrackInfoParentheticalAssertion 1 +#define YarrStackSpaceForBackTrackInfoParenthesesOnce 1 +#define YarrStackSpaceForBackTrackInfoParenthesesTerminal 1 +#define YarrStackSpaceForBackTrackInfoParentheses 2 + +static const unsigned quantifyInfinite = (2147483647 * 2U + 1U); + + + +static const unsigned matchLimit = 1000000; + +enum JSRegExpResult { + JSRegExpMatch = 1, + JSRegExpNoMatch = 0, + JSRegExpErrorNoMatch = -1, + JSRegExpErrorHitLimit = -2, + JSRegExpErrorNoMemory = -3, + JSRegExpErrorInternal = -4 +}; + +PassOwnPtr byteCompile(YarrPattern&, BumpPointerAllocator*); +int interpret(BytecodePattern*, const UChar* input, unsigned start, unsigned length, int* output); + +} } +# 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrJIT.h" 1 +# 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrJIT.h" +#define YarrJIT_h + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssembler.h" 1 +# 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssembler.h" +#define MacroAssembler_h +# 42 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssembler.h" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerARM.h" 1 +# 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerARM.h" +#define MacroAssemblerARM_h + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/ARMAssembler.h" 1 +# 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/ARMAssembler.h" +#define ARMAssembler_h +# 41 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/ARMAssembler.h" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBufferWithConstantPool.h" 1 +# 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBufferWithConstantPool.h" +#define AssemblerBufferWithConstantPool_h + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBuffer.h" 1 +# 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBuffer.h" +#define AssemblerBuffer_h + + + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Assertions.h" 1 +# 40 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBuffer.h" 2 + +namespace JSC { + + class AssemblerBuffer { + static const int inlineCapacity = 256; + public: + AssemblerBuffer() + : m_buffer(m_inlineBuffer) + , m_capacity(inlineCapacity) + , m_size(0) + , m_oom(false) + { + } + + ~AssemblerBuffer() + { + if (m_buffer != m_inlineBuffer) + free(m_buffer); + } + + void ensureSpace(int space) + { + if (m_size > m_capacity - space) + grow(); + } + + bool isAligned(int alignment) const + { + return !(m_size & (alignment - 1)); + } + + void putByteUnchecked(int value) + { + do { } while(0); + m_buffer[m_size] = char(value); + m_size++; + } + + void putByte(int value) + { + if (m_size > m_capacity - 4) + grow(); + putByteUnchecked(value); + } + + void putShortUnchecked(int value) + { + do { } while(0); + *reinterpret_cast(&m_buffer[m_size]) = short(value); + m_size += 2; + } + + void putShort(int value) + { + if (m_size > m_capacity - 4) + grow(); + putShortUnchecked(value); + } + + void putIntUnchecked(int value) + { + do { } while(0); + *reinterpret_cast(&m_buffer[m_size]) = value; + m_size += 4; + } + + void putInt64Unchecked(int64_t value) + { + do { } while(0); + *reinterpret_cast(&m_buffer[m_size]) = value; + m_size += 8; + } + + void putInt(int value) + { + if (m_size > m_capacity - 4) + grow(); + putIntUnchecked(value); + } + + void* data() const + { + return m_buffer; + } + + int size() const + { + return m_size; + } + + bool oom() const + { + return m_oom; + } + + + + + + void* executableAllocAndCopy(ExecutableAllocator* allocator, ExecutablePool** poolp, CodeKind kind) + { + if (m_oom || m_size == 0) { + *poolp = __null; + return 0; + } + + void* result = allocator->alloc(m_size, poolp, kind); + if (!result) { + *poolp = __null; + return 0; + } + do { } while(0); + + ExecutableAllocator::makeWritable(result, m_size); + + return memcpy(result, m_buffer, m_size); + } + + unsigned char *buffer() const { + do { } while(0); + return reinterpret_cast(m_buffer); + } + + protected: + void append(const char* data, int size) + { + if (m_size > m_capacity - size) + grow(size); + + + if (m_oom) + return; + memcpy(m_buffer + m_size, data, size); + m_size += size; + } +# 191 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBuffer.h" + void grow(int extraCapacity = 0) + { + + + + + int newCapacity = m_capacity + m_capacity + extraCapacity; + char* newBuffer; + + if (m_buffer == m_inlineBuffer) { + newBuffer = static_cast(malloc(newCapacity)); + if (!newBuffer) { + m_size = 0; + m_oom = true; + return; + } + memcpy(newBuffer, m_buffer, m_size); + } else { + newBuffer = static_cast(realloc(m_buffer, newCapacity)); + if (!newBuffer) { + m_size = 0; + m_oom = true; + return; + } + } + + m_buffer = newBuffer; + m_capacity = newCapacity; + } + + char m_inlineBuffer[inlineCapacity]; + char* m_buffer; + int m_capacity; + int m_size; + bool m_oom; + }; + +} +# 39 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBufferWithConstantPool.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/SegmentedVector.h" 1 +# 30 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/SegmentedVector.h" +#define SegmentedVector_h + + + + +namespace WTF { + + + template class SegmentedVector; + template class SegmentedVectorIterator { + private: + friend class SegmentedVector; + public: + typedef SegmentedVectorIterator Iterator; + + ~SegmentedVectorIterator() { } + + T& operator*() const { return (*m_vector.m_segments[m_segment])[m_index]; } + T* operator->() const { return &(*m_vector.m_segments[m_segment])[m_index]; } + + + Iterator& operator++() + { + do { } while(0); + ++m_index; + + if (m_index >= m_vector.m_segments[m_segment]->length()) { + + if (m_segment + 1 < m_vector.m_segments.length()) { + + do { } while(0); + ++m_segment; + m_index = 0; + } else { + + m_segment = 0; + m_index = SegmentSize; + } + } + return *this; + } + + bool operator==(const Iterator& other) const + { + return (m_index == other.m_index && m_segment = other.m_segment && &m_vector == &other.m_vector); + } + + bool operator!=(const Iterator& other) const + { + return (m_index != other.m_index || m_segment != other.m_segment || &m_vector != &other.m_vector); + } + + SegmentedVectorIterator& operator=(const SegmentedVectorIterator& other) + { + m_vector = other.m_vector; + m_segment = other.m_segment; + m_index = other.m_index; + return *this; + } + + private: + SegmentedVectorIterator(SegmentedVector& vector, size_t segment, size_t index) + : m_vector(vector) + , m_segment(segment) + , m_index(index) + { + } + + SegmentedVector& m_vector; + size_t m_segment; + size_t m_index; + }; + + + + + template class SegmentedVector { + friend class SegmentedVectorIterator; + public: + typedef SegmentedVectorIterator Iterator; + + SegmentedVector() + : m_size(0) + { + m_segments.append(&m_inlineSegment); + } + + ~SegmentedVector() + { + deleteAllSegments(); + } + + size_t size() const { return m_size; } + bool isEmpty() const { return !size(); } + + T& at(size_t index) + { + if (index < SegmentSize) + return m_inlineSegment[index]; + return segmentFor(index)->at(subscriptFor(index)); + } + + T& operator[](size_t index) + { + return at(index); + } + + T& last() + { + return at(size() - 1); + } + + template void append(const U& value) + { + ++m_size; + + if (m_size <= SegmentSize) { + + m_inlineSegment.append(value); + return; + } + + if (!segmentExistsFor(m_size - 1)) + m_segments.append(new Segment); + + segmentFor(m_size - 1)->append(value); + } + + T& alloc() + { + append(T()); + return last(); + } + + void removeLast() + { + if (m_size <= SegmentSize) + m_inlineSegment.removeLast(); + else + segmentFor(m_size - 1)->removeLast(); + --m_size; + } + + void grow(size_t size) + { + do { } while(0); + ensureSegmentsFor(size); + m_size = size; + } + + void clear() + { + deleteAllSegments(); + m_segments.resize(1); + m_inlineSegment.clear(); + m_size = 0; + } + + Iterator begin() + { + return Iterator(*this, 0, m_size ? 0 : SegmentSize); + } + + Iterator end() + { + return Iterator(*this, 0, SegmentSize); + } + + private: + typedef js::Vector Segment; + + void deleteAllSegments() + { + + + + for (size_t i = 1; i < m_segments.length(); i++) + delete m_segments[i]; + } + + bool segmentExistsFor(size_t index) + { + + return index / SegmentSize < m_segments.length(); + } + + Segment* segmentFor(size_t index) + { + return m_segments[index / SegmentSize]; + } + + size_t subscriptFor(size_t index) + { + return index % SegmentSize; + } + + void ensureSegmentsFor(size_t size) + { + size_t segmentCount = m_size / SegmentSize; + if (m_size % SegmentSize) + ++segmentCount; + + segmentCount = segmentCount > 1 ? segmentCount : 1; + + size_t neededSegmentCount = size / SegmentSize; + if (size % SegmentSize) + ++neededSegmentCount; + + + size_t end = neededSegmentCount - 1; + for (size_t i = segmentCount - 1; i < end; ++i) + ensureSegment(i, SegmentSize); + + + ensureSegment(end, subscriptFor(size - 1) + 1); + } + + void ensureSegment(size_t segmentIndex, size_t size) + { + do { } while(0); + if (segmentIndex == m_segments.size()) + m_segments.append(new Segment); + m_segments[segmentIndex]->grow(size); + } + + size_t m_size; + Segment m_inlineSegment; + js::Vector m_segments; + }; + +} + +using WTF::SegmentedVector; +# 40 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBufferWithConstantPool.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Assertions.h" 1 +# 41 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBufferWithConstantPool.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/Logging.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/Logging.h" +#define jsjaeger_logging_h__ + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/prmjtime.h" 1 +# 13 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/Logging.h" 2 + + + +namespace js { + +#define JSPEW_CHAN_MAP(_) _(Abort) _(Scripts) _(Prof) _(JSOps) _(Insns) _(VMFrame) _(PICs) _(SlowCalls) _(Analysis) _(Regalloc) _(Inlining) _(Recompile) +# 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/Logging.h" +enum JaegerSpewChannel { +#define _(name) JSpew_ ##name, + JSpew_Abort, JSpew_Scripts, JSpew_Prof, JSpew_JSOps, JSpew_Insns, JSpew_VMFrame, JSpew_PICs, JSpew_SlowCalls, JSpew_Analysis, JSpew_Regalloc, JSpew_Inlining, JSpew_Recompile, +#undef _ + JSpew_Terminator +}; +# 88 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/Logging.h" +static inline void JaegerSpew(JaegerSpewChannel channel, const char *fmt, ...) +{ +} + + + +} +# 43 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBufferWithConstantPool.h" 2 + +#define ASSEMBLER_HAS_CONSTANT_POOL 1 + +namespace JSC { +# 94 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AssemblerBufferWithConstantPool.h" +template +class AssemblerBufferWithConstantPool: public AssemblerBuffer { + typedef SegmentedVector LoadOffsets; +public: + enum { + UniqueConst, + ReusableConst, + UnusedEntry + }; + + AssemblerBufferWithConstantPool() + : AssemblerBuffer() + , m_numConsts(0) + , m_maxDistance(maxPoolSize) + , m_lastConstDelta(0) + , m_flushCount(0) + { + m_pool = static_cast(malloc(maxPoolSize)); + m_mask = static_cast(malloc(maxPoolSize / sizeof(uint32_t))); + } + + ~AssemblerBufferWithConstantPool() + { + free(m_mask); + free(m_pool); + } + + void ensureSpace(int space) + { + flushIfNoSpaceFor(space); + AssemblerBuffer::ensureSpace(space); + } + + void ensureSpace(int insnSpace, int constSpace) + { + flushIfNoSpaceFor(insnSpace, constSpace); + AssemblerBuffer::ensureSpace(insnSpace); + } + + bool isAligned(int alignment) + { + flushIfNoSpaceFor(alignment); + return AssemblerBuffer::isAligned(alignment); + } + + void putByteUnchecked(int value) + { + AssemblerBuffer::putByteUnchecked(value); + correctDeltas(1); + } + + void putByte(int value) + { + flushIfNoSpaceFor(1); + AssemblerBuffer::putByte(value); + correctDeltas(1); + } + + void putShortUnchecked(int value) + { + AssemblerBuffer::putShortUnchecked(value); + correctDeltas(2); + } + + void putShort(int value) + { + flushIfNoSpaceFor(2); + AssemblerBuffer::putShort(value); + correctDeltas(2); + } + + void putIntUnchecked(int value) + { + AssemblerBuffer::putIntUnchecked(value); + correctDeltas(4); + } + + void putInt(int value) + { + flushIfNoSpaceFor(4); + AssemblerBuffer::putInt(value); + correctDeltas(4); + } + + void putInt64Unchecked(int64_t value) + { + AssemblerBuffer::putInt64Unchecked(value); + correctDeltas(8); + } + + int size() + { + flushIfNoSpaceFor(maxInstructionSize, sizeof(uint64_t)); + return AssemblerBuffer::size(); + } + + int uncheckedSize() + { + return AssemblerBuffer::size(); + } + + void* executableAllocAndCopy(ExecutableAllocator* allocator, ExecutablePool** poolp, CodeKind kind) + { + flushConstantPool(false); + return AssemblerBuffer::executableAllocAndCopy(allocator, poolp, kind); + } + + void putIntWithConstantInt(uint32_t insn, uint32_t constant, bool isReusable = false) + { + flushIfNoSpaceFor(4, 4); + + m_loadOffsets.append(AssemblerBuffer::size()); + if (isReusable) + for (int i = 0; i < m_numConsts; ++i) { + if (m_mask[i] == ReusableConst && m_pool[i] == constant) { + AssemblerBuffer::putInt(AssemblerType::patchConstantPoolLoad(insn, i)); + correctDeltas(4); + return; + } + } + + m_pool[m_numConsts] = constant; + m_mask[m_numConsts] = static_cast(isReusable ? ReusableConst : UniqueConst); + + AssemblerBuffer::putInt(AssemblerType::patchConstantPoolLoad(insn, m_numConsts)); + ++m_numConsts; + + correctDeltas(4, 4); + } + + + void flushWithoutBarrier(bool isForced = false) + { + + if (isForced || (5 * m_numConsts * sizeof(uint32_t)) > (3 * maxPoolSize)) + flushConstantPool(false); + } + + uint32_t* poolAddress() + { + return m_pool; + } + + int sizeOfConstantPool() + { + return m_numConsts; + } + + int flushCount() + { + return m_flushCount; + } + +private: + void correctDeltas(int insnSize) + { + m_maxDistance -= insnSize; + do { } while(0); + m_lastConstDelta -= insnSize; + if (m_lastConstDelta < 0) + m_lastConstDelta = 0; + } + + void correctDeltas(int insnSize, int constSize) + { + correctDeltas(insnSize); + + m_maxDistance -= m_lastConstDelta; + do { } while(0); + m_lastConstDelta = constSize; + } + + void flushConstantPool(bool useBarrier = true) + { + js::JaegerSpew(js::JSpew_Insns, " -- FLUSHING CONSTANT POOL WITH %d CONSTANTS --\n", + m_numConsts); + if (m_numConsts == 0) + return; + m_flushCount++; + int alignPool = (AssemblerBuffer::size() + (useBarrier ? barrierSize : 0)) & (sizeof(uint64_t) - 1); + + if (alignPool) + alignPool = sizeof(uint64_t) - alignPool; + + + if (useBarrier) + AssemblerBuffer::putInt(AssemblerType::placeConstantPoolBarrier(m_numConsts * sizeof(uint32_t) + alignPool)); + + if (alignPool) { + if (alignPool & 1) + AssemblerBuffer::putByte(AssemblerType::padForAlign8); + if (alignPool & 2) + AssemblerBuffer::putShort(AssemblerType::padForAlign16); + if (alignPool & 4) + AssemblerBuffer::putInt(AssemblerType::padForAlign32); + } + + int constPoolOffset = AssemblerBuffer::size(); + append(reinterpret_cast(m_pool), m_numConsts * sizeof(uint32_t)); + + + for (LoadOffsets::Iterator iter = m_loadOffsets.begin(); iter != m_loadOffsets.end(); ++iter) { + void* loadAddr = reinterpret_cast(m_buffer + *iter); + AssemblerType::patchConstantPoolLoad(loadAddr, reinterpret_cast(m_buffer + constPoolOffset)); + } + + m_loadOffsets.clear(); + m_numConsts = 0; + m_maxDistance = maxPoolSize; + do { } while(0); + + } + + void flushIfNoSpaceFor(int nextInsnSize) + { + if (m_numConsts == 0) { + m_maxDistance = maxPoolSize; + return; + } + int lastConstDelta = m_lastConstDelta > nextInsnSize ? m_lastConstDelta - nextInsnSize : 0; + if ((m_maxDistance < nextInsnSize + lastConstDelta + barrierSize + (int)sizeof(uint32_t))) + flushConstantPool(); + } + + void flushIfNoSpaceFor(int nextInsnSize, int nextConstSize) + { + if (m_numConsts == 0) { + m_maxDistance = maxPoolSize; + return; + } + if ((m_maxDistance < nextInsnSize + m_lastConstDelta + nextConstSize + barrierSize + (int)sizeof(uint32_t)) || + (m_numConsts * sizeof(uint32_t) + nextConstSize >= maxPoolSize)) + flushConstantPool(); + } + + uint32_t* m_pool; + char* m_mask; + LoadOffsets m_loadOffsets; + + int m_numConsts; + int m_maxDistance; + int m_lastConstDelta; + int m_flushCount; +}; + +} +# 42 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/ARMAssembler.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/wtf/Assertions.h" 1 +# 43 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/ARMAssembler.h" 2 + + +#define IPFX " %s" +#define ISPFX " " +# 57 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/ARMAssembler.h" +#define MAYBE_PAD "" +#define FIXME_INSN_PRINTING ((void) 0) + + + + + +namespace JSC { + + typedef uint32_t ARMWord; + + namespace ARMRegisters { + typedef enum { + r0 = 0, + r1, + r2, + r3, + S0 = r3, + r4, + r5, + r6, + r7, + r8, + S1 = r8, + r9, + r10, + r11, + r12, + ip = r12, + r13, + sp = r13, + r14, + lr = r14, + r15, + pc = r15 + } RegisterID; + + typedef enum { + d0, + d1, + d2, + d3, + SD0 = d3, + d4, + d5, + d6, + d7, + d8, + d9, + d10, + d11, + d12, + d13, + d14, + d15, + d16, + d17, + d18, + d19, + d20, + d21, + d22, + d23, + d24, + d25, + d26, + d27, + d28, + d29, + d30, + d31 + } FPRegisterID; + + inline FPRegisterID floatShadow(FPRegisterID s) + { + return (FPRegisterID)(s*2); + } + inline FPRegisterID doubleShadow(FPRegisterID d) + { + return (FPRegisterID)(d / 2); + } + } + + class ARMAssembler { + public: + + + + + + + ARMAssembler() { } + + + typedef ARMRegisters::RegisterID RegisterID; + typedef ARMRegisters::FPRegisterID FPRegisterID; + typedef AssemblerBufferWithConstantPool<2048, 4, 4, ARMAssembler> ARMBuffer; + typedef SegmentedVector Jumps; + + unsigned char *buffer() const { return m_buffer.buffer(); } + bool oom() const { return m_buffer.oom(); } + + + typedef enum { + EQ = 0x00000000, + NE = 0x10000000, + CS = 0x20000000, + CC = 0x30000000, + MI = 0x40000000, + PL = 0x50000000, + VS = 0x60000000, + VC = 0x70000000, + HI = 0x80000000, + LS = 0x90000000, + GE = 0xa0000000, + LT = 0xb0000000, + GT = 0xc0000000, + LE = 0xd0000000, + AL = 0xe0000000 + } Condition; + + + enum { + AND = (0x0 << 21), + EOR = (0x1 << 21), + SUB = (0x2 << 21), + RSB = (0x3 << 21), + ADD = (0x4 << 21), + ADC = (0x5 << 21), + SBC = (0x6 << 21), + RSC = (0x7 << 21), + TST = (0x8 << 21), + TEQ = (0x9 << 21), + CMP = (0xa << 21), + CMN = (0xb << 21), + ORR = (0xc << 21), + MOV = (0xd << 21), + BIC = (0xe << 21), + MVN = (0xf << 21), + MUL = 0x00000090, + MULL = 0x00c00090, + FCPYD = 0x0eb00b40, + FADDD = 0x0e300b00, + FNEGD = 0x0eb10b40, + FABSD = 0x0eb00bc0, + FDIVD = 0x0e800b00, + FSUBD = 0x0e300b40, + FMULD = 0x0e200b00, + FCMPD = 0x0eb40b40, + FSQRTD = 0x0eb10bc0, + DTR = 0x05000000, + LDRH = 0x00100090, + STRH = 0x00000090, + DTRH = 0x00000090, + STMDB = 0x09200000, + LDMIA = 0x08b00000, + B = 0x0a000000, + BL = 0x0b000000 + + ,BX = 0x012fff10 + + + ,CLZ = 0x016f0f10, + BKPT = 0xe1200070, + BLX = 0x012fff30 + + + ,MOVW = 0x03000000, + MOVT = 0x03400000 + + }; + + enum { + OP2_IMM = (1 << 25), + OP2_IMMh = (1 << 22), + OP2_INV_IMM = (1 << 26), + SET_CC = (1 << 20), + OP2_OFSREG = (1 << 25), + DT_UP = (1 << 23), + DT_BYTE = (1 << 22), + DT_WB = (1 << 21), + + DT_PRE = (1 << 24), + + HDT_UH = (1 << 5), + + HDT_IMM = (1 << 22), + + HDT_S = (1 << 6), + DT_LOAD = (1 << 20) + }; + + + enum { + BRANCH_MASK = 0x00ffffff, + NONARM = 0xf0000000, + SDT_MASK = 0x0c000000, + SDT_OFFSET_MASK = 0xfff + }; + + enum { + BOFFSET_MIN = -0x00800000, + BOFFSET_MAX = 0x007fffff, + SDT = 0x04000000 + }; + + enum { + padForAlign8 = (int)0x00, + padForAlign16 = (int)0x0000, + padForAlign32 = (int)0xe12fff7f + }; + + typedef enum { + LSL = 0, + LSR = 1, + ASR = 2, + ROR = 3 + } Shift; + + static const ARMWord INVALID_IMM = 0xf0000000; + static const ARMWord InvalidBranchTarget = 0xffffffff; + static const int DefaultPrefetching = 2; + + class JmpSrc { + friend class ARMAssembler; + public: + JmpSrc() + : m_offset(-1) + { + } + + private: + JmpSrc(int offset) + : m_offset(offset) + { + } + + int m_offset; + }; + + class JmpDst { + friend class ARMAssembler; + public: + JmpDst() + : m_offset(-1) + , m_used(false) + { + } + + bool isUsed() const { return m_used; } + void used() { m_used = true; } + bool isValid() const { return m_offset != -1; } + private: + JmpDst(int offset) + : m_offset(offset) + , m_used(false) + { + do { } while(0); + } + + int m_offset : 31; + bool m_used : 1; + }; + + + + void emitInst(ARMWord op, int rd, int rn, ARMWord op2) + { + do { } while(0); + m_buffer.putInt(op | RN(rn) | RD(rd) | op2); + } + + + + + + + ARMWord getOp2RotLSL(int lsl) + { + do { } while(0); + do { } while(0); + + return (-(lsl/2) & 0xf) << 8; + } + + void and_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("and", cc, rd, rn, op2); + emitInst(static_cast(cc) | AND, rd, rn, op2); + } + + void ands_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("ands", cc, rd, rn, op2); + emitInst(static_cast(cc) | AND | SET_CC, rd, rn, op2); + } + + void eor_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("eor", cc, rd, rn, op2); + emitInst(static_cast(cc) | EOR, rd, rn, op2); + } + + void eors_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("eors", cc, rd, rn, op2); + emitInst(static_cast(cc) | EOR | SET_CC, rd, rn, op2); + } + + void sub_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("sub", cc, rd, rn, op2); + emitInst(static_cast(cc) | SUB, rd, rn, op2); + } + + void subs_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("subs", cc, rd, rn, op2); + emitInst(static_cast(cc) | SUB | SET_CC, rd, rn, op2); + } + + void rsb_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("rsb", cc, rd, rn, op2); + emitInst(static_cast(cc) | RSB, rd, rn, op2); + } + + void rsbs_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("rsbs", cc, rd, rn, op2); + emitInst(static_cast(cc) | RSB | SET_CC, rd, rn, op2); + } + + void add_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("add", cc, rd, rn, op2); + emitInst(static_cast(cc) | ADD, rd, rn, op2); + } + + void adds_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("adds", cc, rd, rn, op2); + emitInst(static_cast(cc) | ADD | SET_CC, rd, rn, op2); + } + + void adc_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("adc", cc, rd, rn, op2); + emitInst(static_cast(cc) | ADC, rd, rn, op2); + } + + void adcs_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("adcs", cc, rd, rn, op2); + emitInst(static_cast(cc) | ADC | SET_CC, rd, rn, op2); + } + + void sbc_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("sbc", cc, rd, rn, op2); + emitInst(static_cast(cc) | SBC, rd, rn, op2); + } + + void sbcs_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("sbcs", cc, rd, rn, op2); + emitInst(static_cast(cc) | SBC | SET_CC, rd, rn, op2); + } + + void rsc_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("rsc", cc, rd, rn, op2); + emitInst(static_cast(cc) | RSC, rd, rn, op2); + } + + void rscs_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("rscs", cc, rd, rn, op2); + emitInst(static_cast(cc) | RSC | SET_CC, rd, rn, op2); + } + + void tst_r(int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("tst", cc, rn, op2); + emitInst(static_cast(cc) | TST | SET_CC, 0, rn, op2); + } + + void teq_r(int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("teq", cc, rn, op2); + emitInst(static_cast(cc) | TEQ | SET_CC, 0, rn, op2); + } + + void cmp_r(int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("cmp", cc, rn, op2); + emitInst(static_cast(cc) | CMP | SET_CC, 0, rn, op2); + } + + void cmn_r(int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("cmn", cc, rn, op2); + emitInst(static_cast(cc) | CMN | SET_CC, 0, rn, op2); + } + + void orr_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("orr", cc, rd, rn, op2); + emitInst(static_cast(cc) | ORR, rd, rn, op2); + } + + void orrs_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("orrs", cc, rd, rn, op2); + emitInst(static_cast(cc) | ORR | SET_CC, rd, rn, op2); + } + + void mov_r(int rd, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("mov", cc, rd, op2); + emitInst(static_cast(cc) | MOV, rd, ARMRegisters::r0, op2); + } + + + void movw_r(int rd, ARMWord op2, Condition cc = AL) + { + do { } while(0); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, 0x%04x\n", "", "movw", nameGpReg(rd), (op2 & 0xfff) | ((op2 >> 4) & 0xf000)); + m_buffer.putInt(static_cast(cc) | MOVW | RD(rd) | op2); + } + + void movt_r(int rd, ARMWord op2, Condition cc = AL) + { + do { } while(0); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, 0x%04x\n", "", "movt", nameGpReg(rd), (op2 & 0xfff) | ((op2 >> 4) & 0xf000)); + m_buffer.putInt(static_cast(cc) | MOVT | RD(rd) | op2); + } + + + void movs_r(int rd, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("movs", cc, rd, op2); + emitInst(static_cast(cc) | MOV | SET_CC, rd, ARMRegisters::r0, op2); + } + + void bic_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("bic", cc, rd, rn, op2); + emitInst(static_cast(cc) | BIC, rd, rn, op2); + } + + void bics_r(int rd, int rn, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("bics", cc, rd, rn, op2); + emitInst(static_cast(cc) | BIC | SET_CC, rd, rn, op2); + } + + void mvn_r(int rd, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("mvn", cc, rd, op2); + emitInst(static_cast(cc) | MVN, rd, ARMRegisters::r0, op2); + } + + void mvns_r(int rd, ARMWord op2, Condition cc = AL) + { + spewInsWithOp2("mvns", cc, rd, op2); + emitInst(static_cast(cc) | MVN | SET_CC, rd, ARMRegisters::r0, op2); + } + + void mul_r(int rd, int rn, int rm, Condition cc = AL) + { + spewInsWithOp2("mul", cc, rd, rn, static_cast(rm)); + m_buffer.putInt(static_cast(cc) | MUL | RN(rd) | RS(rn) | RM(rm)); + } + + void muls_r(int rd, int rn, int rm, Condition cc = AL) + { + spewInsWithOp2("muls", cc, rd, rn, static_cast(rm)); + m_buffer.putInt(static_cast(cc) | MUL | SET_CC | RN(rd) | RS(rn) | RM(rm)); + } + + void mull_r(int rdhi, int rdlo, int rn, int rm, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s, %s, %s\n", "", "mull", nameGpReg(rdlo), nameGpReg(rdhi), nameGpReg(rn), nameGpReg(rm)); + m_buffer.putInt(static_cast(cc) | MULL | RN(rdhi) | RD(rdlo) | RS(rn) | RM(rm)); + } + + + void ldr_imm(int rd, ARMWord imm, Condition cc = AL) + { + char mnemonic[16]; + snprintf(mnemonic, 16, "ldr%s", nameCC(cc)); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, =0x%x @ (%d) (reusable pool entry)\n", "", mnemonic, nameGpReg(rd), imm, static_cast(imm)); + m_buffer.putIntWithConstantInt(static_cast(cc) | DTR | DT_LOAD | DT_UP | RN(ARMRegisters::pc) | RD(rd), imm, true); + } + + void ldr_un_imm(int rd, ARMWord imm, Condition cc = AL) + { + char mnemonic[16]; + snprintf(mnemonic, 16, "ldr%s", nameCC(cc)); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, =0x%x @ (%d)\n", "", mnemonic, nameGpReg(rd), imm, static_cast(imm)); + m_buffer.putIntWithConstantInt(static_cast(cc) | DTR | DT_LOAD | DT_UP | RN(ARMRegisters::pc) | RD(rd), imm); + } + + void mem_imm_off(bool isLoad, bool isSigned, int size, bool posOffset, + int rd, int rb, ARMWord offset, Condition cc = AL) + { + do { } while(0); + char const * mnemonic_act = (isLoad) ? ("ld") : ("st"); + char const * mnemonic_sign = (isSigned) ? ("s") : (""); + + char const * mnemonic_size = __null; + switch (size / 8) { + case 1: + mnemonic_size = "b"; + break; + case 2: + mnemonic_size = "h"; + break; + case 4: + mnemonic_size = ""; + break; + } + char const * off_sign = (posOffset) ? ("+") : ("-"); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%sr%s%s %s, [%s, #%s%u]\n", + "", mnemonic_act, mnemonic_sign, mnemonic_size, + nameGpReg(rd), nameGpReg(rb), off_sign, offset); + if (size == 32 || (size == 8 && !isSigned)) { + + emitInst(static_cast(cc) | DTR | + (isLoad ? DT_LOAD : 0) | + (size == 8 ? DT_BYTE : 0) | + (posOffset ? DT_UP : 0), rd, rb, offset); + } else { + + emitInst(static_cast(cc) | DTRH | HDT_IMM | DT_PRE | + (isLoad ? DT_LOAD : 0) | + (size == 16 ? HDT_UH : 0) | + (isSigned ? HDT_S : 0) | + (posOffset ? DT_UP : 0), rd, rb, offset); + } + } + + void mem_reg_off(bool isLoad, bool isSigned, int size, bool posOffset, int rd, int rb, int rm, Condition cc = AL) + { + char const * mnemonic_act = (isLoad) ? ("ld") : ("st"); + char const * mnemonic_sign = (isSigned) ? ("s") : (""); + + char const * mnemonic_size = __null; + switch (size / 8) { + case 1: + mnemonic_size = "b"; + break; + case 2: + mnemonic_size = "h"; + break; + case 4: + mnemonic_size = ""; + break; + } + char const * off_sign = (posOffset) ? ("+") : ("-"); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%sr%s%s %s, [%s, #%s%s]\n", "", mnemonic_act, mnemonic_sign, mnemonic_size, + nameGpReg(rd), nameGpReg(rb), off_sign, nameGpReg(rm)); + if (size == 32 || (size == 8 && !isSigned)) { + + emitInst(static_cast(cc) | DTR | + (isLoad ? DT_LOAD : 0) | + (size == 8 ? DT_BYTE : 0) | + (posOffset ? DT_UP : 0) | + OP2_OFSREG, rd, rb, rm); + } else { + + emitInst(static_cast(cc) | DTRH | DT_PRE | + (isLoad ? DT_LOAD : 0) | + (size == 16 ? HDT_UH : 0) | + (isSigned ? HDT_S : 0) | + (posOffset ? DT_UP : 0), rd, rb, rm); + } + } + + + + + void dtr_u(bool isLoad, int rd, int rb, ARMWord offset, Condition cc = AL) + { + char const * mnemonic = (isLoad) ? ("ldr") : ("str"); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, #+%u]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), offset); + emitInst(static_cast(cc) | DTR | (isLoad ? DT_LOAD : 0) | DT_UP, rd, rb, offset); + } + + + + + void dtr_ur(bool isLoad, int rd, int rb, int rm, Condition cc = AL) + { + char const * mnemonic = (isLoad) ? ("ldr") : ("str"); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, +%s]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), nameGpReg(rm)); + emitInst(static_cast(cc) | DTR | (isLoad ? DT_LOAD : 0) | DT_UP | OP2_OFSREG, rd, rb, rm); + } + + + + + void dtr_d(bool isLoad, int rd, int rb, ARMWord offset, Condition cc = AL) + { + char const * mnemonic = (isLoad) ? ("ldr") : ("str"); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, #-%u]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), offset); + emitInst(static_cast(cc) | DTR | (isLoad ? DT_LOAD : 0), rd, rb, offset); + } + + + + + void dtr_dr(bool isLoad, int rd, int rb, int rm, Condition cc = AL) + { + char const * mnemonic = (isLoad) ? ("ldr") : ("str"); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, -%s]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), nameGpReg(rm)); + emitInst(static_cast(cc) | DTR | (isLoad ? DT_LOAD : 0) | OP2_OFSREG, rd, rb, rm); + } + + + + + void dtrb_u(bool isLoad, int rd, int rb, ARMWord offset, Condition cc = AL) + { + char const * mnemonic = (isLoad) ? ("ldrb") : ("strb"); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, #+%u]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), offset); + emitInst(static_cast(cc) | DTR | DT_BYTE | (isLoad ? DT_LOAD : 0) | DT_UP, rd, rb, offset); + } + + + + + void dtrsb_u(bool isLoad, int rd, int rb, ARMWord offset, Condition cc = AL) + { + char const * mnemonic = (isLoad) ? ("ldrsb") : ("strb"); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, #+%u]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), offset); + emitInst(static_cast(cc) | DTRH | HDT_S | (isLoad ? DT_LOAD : 0) | DT_UP, rd, rb, offset); + } + + + + + void dtrb_ur(bool isLoad, int rd, int rb, int rm, Condition cc = AL) + { + char const * mnemonic = (isLoad) ? ("ldrb") : ("strb"); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, +%s]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), nameGpReg(rm)); + emitInst(static_cast(cc) | DTR | DT_BYTE | (isLoad ? DT_LOAD : 0) | DT_UP | OP2_OFSREG, rd, rb, rm); + } + + + + + void dtrb_d(bool isLoad, int rd, int rb, ARMWord offset, Condition cc = AL) + { + char const * mnemonic = (isLoad) ? ("ldrb") : ("strb"); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, #-%u]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), offset); + emitInst(static_cast(cc) | DTR | DT_BYTE | (isLoad ? DT_LOAD : 0), rd, rb, offset); + } + + + + + void dtrsb_d(bool isLoad, int rd, int rb, ARMWord offset, Condition cc = AL) + { + do { } while(0); + char const * mnemonic = (isLoad) ? ("ldrsb") : ("strb"); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, #-%u]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), offset); + emitInst(static_cast(cc) | DTRH | HDT_S | (isLoad ? DT_LOAD : 0), rd, rb, offset); + } + + + + + void dtrb_dr(bool isLoad, int rd, int rb, int rm, Condition cc = AL) + { + char const * mnemonic = (isLoad) ? ("ldrb") : ("strb"); + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, -%s]\n", "", mnemonic, nameGpReg(rd), nameGpReg(rb), nameGpReg(rm)); + emitInst(static_cast(cc) | DTR | DT_BYTE | (isLoad ? DT_LOAD : 0) | OP2_OFSREG, rd, rb, rm); + } + + void ldrh_r(int rd, int rb, int rm, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, +%s]\n", "", "ldrh", nameGpReg(rd), nameGpReg(rb), nameGpReg(rm)); + emitInst(static_cast(cc) | LDRH | HDT_UH | DT_UP | DT_PRE, rd, rb, rm); + } + + void ldrh_d(int rd, int rb, ARMWord offset, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, #-%u]\n", "", "ldrh", nameGpReg(rd), nameGpReg(rb), offset); + emitInst(static_cast(cc) | LDRH | HDT_UH | DT_PRE, rd, rb, offset); + } + + void ldrh_u(int rd, int rb, ARMWord offset, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, #+%u]\n", "", "ldrh", nameGpReg(rd), nameGpReg(rb), offset); + emitInst(static_cast(cc) | LDRH | HDT_UH | DT_UP | DT_PRE, rd, rb, offset); + } + + void ldrsh_d(int rd, int rb, ARMWord offset, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, #-%u]\n", "", "ldrsh", nameGpReg(rd), nameGpReg(rb), offset); + emitInst(static_cast(cc) | LDRH | HDT_UH | HDT_S | DT_PRE, rd, rb, offset); + } + + void ldrsh_u(int rd, int rb, ARMWord offset, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, #+%u]\n", "", "ldrsh", nameGpReg(rd), nameGpReg(rb), offset); + emitInst(static_cast(cc) | LDRH | HDT_UH | HDT_S | DT_UP | DT_PRE, rd, rb, offset); + } + + void strh_r(int rb, int rm, int rd, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, [%s, +%s]\n", "", "strh", nameGpReg(rd), nameGpReg(rb), nameGpReg(rm)); + emitInst(static_cast(cc) | STRH | HDT_UH | DT_UP | DT_PRE, rd, rb, rm); + } + + void push_r(int reg, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s {%s}\n", "", "push", nameGpReg(reg)); + do { } while(0); + m_buffer.putInt(cc | DTR | DT_WB | RN(ARMRegisters::sp) | RD(reg) | 0x4); + } + + void pop_r(int reg, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s {%s}\n", "", "pop", nameGpReg(reg)); + do { } while(0); + m_buffer.putInt(cc | (DTR ^ DT_PRE) | DT_LOAD | DT_UP | RN(ARMRegisters::sp) | RD(reg) | 0x4); + } + + inline void poke_r(int reg, Condition cc = AL) + { + dtr_d(false, ARMRegisters::sp, 0, reg, cc); + } + + inline void peek_r(int reg, Condition cc = AL) + { + dtr_u(true, reg, ARMRegisters::sp, 0, cc); + } + + + + + void clz_r(int rd, int rm, Condition cc = AL) + { + spewInsWithOp2("clz", cc, rd, static_cast(rm)); + m_buffer.putInt(static_cast(cc) | CLZ | RD(rd) | RM(rm)); + } + + + void bkpt(ARMWord value) + { + + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s #0x%04x\n", "", "bkpt", value); + m_buffer.putInt(BKPT | ((value & 0xfff0) << 4) | (value & 0xf)); + + + + + } + + void bx(int rm, Condition cc = AL) + { + + js::JaegerSpew( + js::JSpew_Insns, + " %s" "bx%-13s %s\n", "", nameCC(cc), nameGpReg(rm)); + emitInst(static_cast(cc) | BX, 0, 0, RM(rm)); + + + + } + + JmpSrc blx(int rm, Condition cc = AL) + { + + int s = m_buffer.uncheckedSize(); + js::JaegerSpew( + js::JSpew_Insns, + " %s" "blx%-12s %s\n", "", nameCC(cc), nameGpReg(rm)); + emitInst(static_cast(cc) | BLX, 0, 0, RM(rm)); + + + + + + + + return JmpSrc(s); + } + + static ARMWord lsl(int reg, ARMWord value) + { + do { } while(0); + do { } while(0); + return reg | (value << 7) | (LSL << 5); + } + + static ARMWord lsr(int reg, ARMWord value) + { + do { } while(0); + do { } while(0); + return reg | (value << 7) | (LSR << 5); + } + + static ARMWord asr(int reg, ARMWord value) + { + do { } while(0); + do { } while(0); + return reg | (value << 7) | (ASR << 5); + } + + static ARMWord lsl_r(int reg, int shiftReg) + { + do { } while(0); + do { } while(0); + return reg | (shiftReg << 8) | (LSL << 5) | 0x10; + } + + static ARMWord lsr_r(int reg, int shiftReg) + { + do { } while(0); + do { } while(0); + return reg | (shiftReg << 8) | (LSR << 5) | 0x10; + } + + static ARMWord asr_r(int reg, int shiftReg) + { + do { } while(0); + do { } while(0); + return reg | (shiftReg << 8) | (ASR << 5) | 0x10; + } + + + + void forceFlushConstantPool() + { + m_buffer.flushWithoutBarrier(true); + } + + int size() + { + return m_buffer.size(); + } + + void ensureSpace(int insnSpace, int constSpace) + { + m_buffer.ensureSpace(insnSpace, constSpace); + } + + void ensureSpace(int space) + { + m_buffer.ensureSpace(space); + } + + int sizeOfConstantPool() + { + return m_buffer.sizeOfConstantPool(); + } + + int flushCount() + { + return m_buffer.flushCount(); + } + + JmpDst label() + { + JmpDst label(m_buffer.size()); + js::JaegerSpew(js::JSpew_Insns, " %s" "#label ((%d))\n", "", label.m_offset); + return label; + } + + JmpDst align(int alignment) + { + while (!m_buffer.isAligned(alignment)) + mov_r(ARMRegisters::r0, ARMRegisters::r0); + + return label(); + } + + JmpSrc loadBranchTarget(int rd, Condition cc = AL, int useConstantPool = 0) + { + + + + + ensureSpace(sizeof(ARMWord), sizeof(ARMWord)); + int s = m_buffer.uncheckedSize(); + ldr_un_imm(rd, InvalidBranchTarget, cc); + m_jumps.append(s | (useConstantPool & 0x1)); + return JmpSrc(s); + } + + JmpSrc jmp(Condition cc = AL, int useConstantPool = 0) + { + return loadBranchTarget(ARMRegisters::pc, cc, useConstantPool); + } + + void* executableAllocAndCopy(ExecutableAllocator* allocator, ExecutablePool **poolp, CodeKind kind); + void executableCopy(void* buffer); + void fixUpOffsets(void* buffer); + + + + static ARMWord* getLdrImmAddress(ARMWord* insn) + { + + + if ((*insn & 0x0f7f0000) != 0x051f0000) { + + do { } while(0); + insn--; + } + + + do { } while(0); + + ARMWord addr = reinterpret_cast(insn) + DefaultPrefetching * sizeof(ARMWord); + if (*insn & DT_UP) + return reinterpret_cast(addr + (*insn & SDT_OFFSET_MASK)); + return reinterpret_cast(addr - (*insn & SDT_OFFSET_MASK)); + } + + static ARMWord* getLdrImmAddressOnPool(ARMWord* insn, uint32_t* constPool) + { + + do { } while(0); + + if (*insn & 0x1) + return reinterpret_cast(constPool + ((*insn & SDT_OFFSET_MASK) >> 1)); + return getLdrImmAddress(insn); + } + + static void patchPointerInternal(intptr_t from, void* to) + { + ARMWord* insn = reinterpret_cast(from); + ARMWord* addr = getLdrImmAddress(insn); + *addr = reinterpret_cast(to); + } + + static ARMWord patchConstantPoolLoad(ARMWord load, ARMWord value) + { + value = (value << 1) + 1; + do { } while(0); + return (load & ~0xfff) | value; + } + + static void patchConstantPoolLoad(void* loadAddr, void* constPoolAddr); + + + + static void linkPointer(void* code, JmpDst from, void* to) + { + js::JaegerSpew(js::JSpew_Insns, + " " "##linkPointer ((%p + %#x)) points to ((%p))\n", + code, from.m_offset, to); + + patchPointerInternal(reinterpret_cast(code) + from.m_offset, to); + } + + static void repatchInt32(void* from, int32_t to) + { + js::JaegerSpew(js::JSpew_Insns, + " " "##repatchInt32 ((%p)) holds ((%#x))\n", + from, to); + + patchPointerInternal(reinterpret_cast(from), reinterpret_cast(to)); + } + + static void repatchPointer(void* from, void* to) + { + js::JaegerSpew(js::JSpew_Insns, + " " "##repatchPointer ((%p)) points to ((%p))\n", + from, to); + + patchPointerInternal(reinterpret_cast(from), to); + } + + static void repatchLoadPtrToLEA(void* from) + { + + + ARMWord* insn = reinterpret_cast(from); + do { } while(0); + + *insn = (*insn & 0xf00ff0ff) | 0x02800000; + ExecutableAllocator::cacheFlush(insn, sizeof(ARMWord)); + } + + static void repatchLEAToLoadPtr(void* from) + { + + ARMWord* insn = reinterpret_cast(from); + if ((*insn & 0x0ff00f00) == 0x05900000) + return; + do { } while(0); + do { } while(0); + + *insn = (*insn & 0xf00ff0ff) | 0x05900000; + ExecutableAllocator::cacheFlush(insn, sizeof(ARMWord)); + } + + + + void linkJump(JmpSrc from, JmpDst to) + { + ARMWord code = reinterpret_cast(m_buffer.data()); + ARMWord* insn = reinterpret_cast(code + from.m_offset); + ARMWord* addr = getLdrImmAddressOnPool(insn, m_buffer.poolAddress()); + + js::JaegerSpew(js::JSpew_Insns, + " %s" "##linkJump ((%#x)) jumps to ((%#x))\n", "", + from.m_offset, to.m_offset); + + *addr = to.m_offset; + } + + static void linkJump(void* code, JmpSrc from, void* to) + { + js::JaegerSpew(js::JSpew_Insns, + " " "##linkJump ((%p + %#x)) jumps to ((%p))\n", + code, from.m_offset, to); + + patchPointerInternal(reinterpret_cast(code) + from.m_offset, to); + } + + static void relinkJump(void* from, void* to) + { + js::JaegerSpew(js::JSpew_Insns, + " " "##relinkJump ((%p)) jumps to ((%p))\n", + from, to); + + patchPointerInternal(reinterpret_cast(from), to); + } + + static bool canRelinkJump(void* from, void* to) + { + return true; + } + + static void linkCall(void* code, JmpSrc from, void* to) + { + js::JaegerSpew(js::JSpew_Insns, + " " "##linkCall ((%p + %#x)) jumps to ((%p))\n", + code, from.m_offset, to); + + patchPointerInternal(reinterpret_cast(code) + from.m_offset, to); + } + + static void relinkCall(void* from, void* to) + { + js::JaegerSpew(js::JSpew_Insns, + " " "##relinkCall ((%p)) jumps to ((%p))\n", + from, to); + + patchPointerInternal(reinterpret_cast(from), to); + } + + + + static void* getRelocatedAddress(void* code, JmpSrc jump) + { + return reinterpret_cast(reinterpret_cast(code) + jump.m_offset / sizeof(ARMWord)); + } + + static void* getRelocatedAddress(void* code, JmpDst label) + { + return reinterpret_cast(reinterpret_cast(code) + label.m_offset / sizeof(ARMWord)); + } + + + + static int getDifferenceBetweenLabels(JmpDst from, JmpSrc to) + { + return to.m_offset - from.m_offset; + } + + static int getDifferenceBetweenLabels(JmpDst from, JmpDst to) + { + return to.m_offset - from.m_offset; + } + + static unsigned getCallReturnOffset(JmpSrc call) + { + return call.m_offset + sizeof(ARMWord); + } + + + + static ARMWord getOp2Byte(ARMWord imm) + { + do { } while(0); + return OP2_IMMh | (imm & 0x0f) | ((imm & 0xf0) << 4) ; + } + + static ARMWord getOp2(ARMWord imm); + + + + static ARMWord getOp2RegScale(RegisterID reg, ARMWord scale); + + + static ARMWord getImm16Op2(ARMWord imm) + { + if (imm <= 0xffff) + return (imm & 0xf000) << 4 | (imm & 0xfff); + return INVALID_IMM; + } + + ARMWord getImm(ARMWord imm, int tmpReg, bool invert = false); + void moveImm(ARMWord imm, int dest); + ARMWord encodeComplexImm(ARMWord imm, int dest); + + ARMWord getOffsetForHalfwordDataTransfer(ARMWord imm, int tmpReg) + { + + if (imm <= 0xff) + return getOp2Byte(imm); + + return encodeComplexImm(imm, tmpReg); + } + + + void dataTransferN(bool isLoad, bool isSigned, int size, RegisterID srcDst, RegisterID base, int32_t offset); + + void dataTransfer32(bool isLoad, RegisterID srcDst, RegisterID base, int32_t offset); + void dataTransfer8(bool isLoad, RegisterID srcDst, RegisterID base, int32_t offset, bool isSigned); + void baseIndexTransferN(bool isLoad, bool isSigned, int size, RegisterID srcDst, RegisterID base, RegisterID index, int scale, int32_t offset); + void baseIndexTransfer32(bool isLoad, RegisterID srcDst, RegisterID base, RegisterID index, int scale, int32_t offset); + void doubleTransfer(bool isLoad, FPRegisterID srcDst, RegisterID base, int32_t offset); + void doubleTransfer(bool isLoad, FPRegisterID srcDst, RegisterID base, int32_t offset, RegisterID index, int32_t scale); + + void floatTransfer(bool isLoad, FPRegisterID srcDst, RegisterID base, int32_t offset); + + void baseIndexFloatTransfer(bool isLoad, bool isDouble, FPRegisterID srcDst, RegisterID base, RegisterID index, int scale, int32_t offset); + + + + static ARMWord placeConstantPoolBarrier(int offset) + { + offset = (offset - sizeof(ARMWord)) >> 2; + do { } while(0); + return AL | B | (offset & BRANCH_MASK); + } + + + static char const * nameGpReg(int reg) + { + do { } while(0); + do { } while(0); + static char const * names[] = { + "r0", "r1", "r2", "r3", + "r4", "r5", "r6", "r7", + "r8", "r9", "r10", "r11", + "ip", "sp", "lr", "pc" + }; + return names[reg]; + } + + static char const * nameFpRegD(int reg) + { + do { } while(0); + do { } while(0); + static char const * names[] = { + "d0", "d1", "d2", "d3", + "d4", "d5", "d6", "d7", + "d8", "d9", "d10", "d11", + "d12", "d13", "d14", "d15", + "d16", "d17", "d18", "d19", + "d20", "d21", "d22", "d23", + "d24", "d25", "d26", "d27", + "d28", "d29", "d30", "d31" + }; + return names[reg]; + } + static char const * nameFpRegS(int reg) + { + do { } while(0); + do { } while(0); + static char const * names[] = { + "s0", "s1", "s2", "s3", + "s4", "s5", "s6", "s7", + "s8", "s9", "s10", "s11", + "s12", "s13", "s14", "s15", + "s16", "s17", "s18", "s19", + "s20", "s21", "s22", "s23", + "s24", "s25", "s26", "s27", + "s28", "s29", "s30", "s31" + }; + return names[reg]; + } + + static char const * nameCC(Condition cc) + { + do { } while(0); + do { } while(0); + do { } while(0); + + uint32_t ccIndex = cc >> 28; + static char const * names[] = { + "eq", "ne", + "cs", "cc", + "mi", "pl", + "vs", "vc", + "hi", "ls", + "ge", "lt", + "gt", "le", + " " + }; + return names[ccIndex]; + } + + private: + + inline uint32_t decOp2Imm(uint32_t op2) + { + do { } while(0); + + uint32_t imm8 = op2 & 0xff; + uint32_t rot = ((op2 >> 7) & 0x1e); + + + + uint32_t imm = (imm8 >> rot); + if (rot > 0) { + imm |= (imm8 << (32-rot)); + } + + return imm; + } + + + + void fmtOp2(char * out, ARMWord op2) + { + static char const * const shifts[4] = {"LSL", "LSR", "ASR", "ROR"}; + + if ((op2 & OP2_IMM) || (op2 & OP2_IMMh)) { + + + uint32_t imm = decOp2Imm(op2 & ~(OP2_IMM | OP2_IMMh)); + sprintf(out, "#0x%x @ (%d)", imm, static_cast(imm)); + } else { + + + char const * rm = nameGpReg(op2 & 0xf); + Shift type = static_cast((op2 >> 5) & 0x3); + + + if (op2 & (1<<4)) { + + + char const * rs = nameGpReg((op2 >> 8) & 0xf); + sprintf(out, "%s, %s %s", rm, shifts[type], rs); + } else { + + + uint32_t imm = (op2 >> 7) & 0x1f; + + + if ((type == LSL) && (imm == 0)) { + + sprintf(out, "%s", rm); + return; + } + + if ((type == ROR) && (imm == 0)) { + + sprintf(out, "%s, RRX", rm); + return; + } + + if (((type == LSR) || (type == ASR)) && (imm == 0)) { + + + imm = 32; + } + + + + sprintf(out, "%s, %s #%u", rm, shifts[type], imm); + } + } + } + + void spewInsWithOp2(char const * ins, Condition cc, int rd, int rn, ARMWord op2) + { + char mnemonic[16]; + snprintf(mnemonic, 16, "%s%s", ins, nameCC(cc)); + + char op2_fmt[48]; + fmtOp2(op2_fmt, op2); + + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s, %s\n", "", mnemonic, nameGpReg(rd), nameGpReg(rn), op2_fmt); + } + + void spewInsWithOp2(char const * ins, Condition cc, int r, ARMWord op2) + { + char mnemonic[16]; + snprintf(mnemonic, 16, "%s%s", ins, nameCC(cc)); + + char op2_fmt[48]; + fmtOp2(op2_fmt, op2); + + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s\n", "", mnemonic, nameGpReg(r), op2_fmt); + } + + ARMWord RM(int reg) + { + do { } while(0); + return reg; + } + + ARMWord RS(int reg) + { + do { } while(0); + return reg << 8; + } + + ARMWord RD(int reg) + { + do { } while(0); + return reg << 12; + } + + ARMWord RN(int reg) + { + do { } while(0); + return reg << 16; + } + + ARMWord DD(int reg) + { + do { } while(0); + + return ((reg << 12) | (reg << 18)) & 0x0040f000; + } + + ARMWord DN(int reg) + { + do { } while(0); + + return ((reg << 16) | (reg << 3)) & 0x000f0080; + } + + ARMWord DM(int reg) + { + do { } while(0); + + return ((reg << 1) & 0x20) | (reg & 0xf); + } + + ARMWord SD(int reg) + { + do { } while(0); + + return ((reg << 11) | (reg << 22)) & 0x0040f000; + } + + ARMWord SM(int reg) + { + do { } while(0); + + return ((reg << 5) & 0x20) | ((reg >> 1) & 0xf); + } + ARMWord SN(int reg) + { + do { } while(0); + + return ((reg << 15) & 0xf0000) | ((reg & 1) << 7); + } + static ARMWord getConditionalField(ARMWord i) + { + return i & 0xf0000000; + } + + int genInt(int reg, ARMWord imm, bool positive); + + ARMBuffer m_buffer; + Jumps m_jumps; + public: + + enum { + VFP_DATA = 0x0E000A00, + VFP_EXT = 0x0C000A00, + VFP_XFER = 0x0E000A08, + VFP_DXFER = 0x0C400A00, + + VFP_DBL = (1<<8), + + + VFP_ICVT = 0x00B80040, + VFP_FPCVT = 0x00B700C0, + + VFP_DTR = 0x01000000, + VFP_MOV = 0x00000010, + + FMSR = 0x0e000a10, + FMRS = 0x0e100a10, + FSITOD = 0x0eb80bc0, + FUITOD = 0x0eb80b40, + FTOSID = 0x0ebd0b40, + FTOSIZD = 0x0ebd0bc0, + FMSTAT = 0x0ef1fa10, + FDTR = 0x0d000b00 + + }; + enum RegType { + SIntReg32, + UIntReg32, + FloatReg32, + FloatReg64 + }; + + const char * nameType(RegType t) + { + const char * const name[4] = + {"S32", "U32", "F32", "F64"}; + return name[t]; + } + + const char * nameTypedReg(RegType t, int reg) + { + switch(t) { + case SIntReg32: + case UIntReg32: + return nameGpReg(reg); + case FloatReg32: + return nameFpRegS(reg); + case FloatReg64: + return nameFpRegD(reg); + } + return ""; + } + + bool isFloatType(RegType rt) + { + if (rt == FloatReg32 || rt == FloatReg64) + return true; + return false; + } + + bool isIntType(RegType rt) + { + if (rt == FloatReg32 || rt == FloatReg64) + return false; + return true; + } + + + + + + void emitVFPInst(ARMWord op, ARMWord rd, ARMWord rn, ARMWord op2) + { + m_buffer.putInt(op | rn | rd | op2); + } + + + void fmem_imm_off(bool isLoad, bool isDouble, bool isUp, int dest, int rn, ARMWord offset, Condition cc = AL) + { + char const * ins = isLoad ? "vldr.f" : "vstr.f"; + js::JaegerSpew(js::JSpew_Insns, + " %s" "%s%d %s, [%s, #%s%u]\n", "", + ins, (isDouble ? 64 : 32), (isDouble ? nameFpRegD(dest) : nameFpRegS(dest)), + nameGpReg(rn), (isUp ? "+" : "-"), offset); + do { } while(0); + emitVFPInst(static_cast(cc) | + VFP_EXT | VFP_DTR | + (isDouble ? VFP_DBL : 0) | + (isUp ? DT_UP : 0) | + (isLoad ? DT_LOAD : 0), isDouble ? DD(dest) : SD(dest), RN(rn), offset); + + } + + + + void vcvt(RegType srcType, RegType dstType, int src, int dest, Condition cc = AL) + { + do { } while(0); + do { } while(0); + + js::JaegerSpew(js::JSpew_Insns, + " %s" "vcvt.%s.%-15s, %s,%s\n", "", + nameType(dstType), nameType(srcType), + nameTypedReg(dstType,dest), nameTypedReg(srcType,src)); + + if (isFloatType(srcType) && isFloatType (dstType)) { + + bool dblToFloat = srcType == FloatReg64; + emitVFPInst(static_cast(cc) | VFP_DATA | VFP_FPCVT | + (dblToFloat ? VFP_DBL : 0), + dblToFloat ? SD(dest) : DD(dest), + dblToFloat ? DM(src) : SM(src), 0); + } else { + __builtin_unreachable(); + } + } + + + void vmov64 (bool fromFP, bool isDbl, int r1, int r2, int rFP, Condition cc = AL) + { + if (fromFP) { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s, %s\n", "", "vmov", + nameGpReg(r1), nameGpReg(r2), nameFpRegD(rFP)); + } else { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s, %s\n", "", "vmov", + nameFpRegD(rFP), nameGpReg(r1), nameGpReg(r2)); + } + emitVFPInst(static_cast(cc) | VFP_DXFER | VFP_MOV | + (fromFP ? DT_LOAD : 0) | + (isDbl ? VFP_DBL : 0), RD(r1), RN(r2), isDbl ? DM(rFP) : SM(rFP)); + } + + void fcpyd_r(int dd, int dm, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s\n", "", "vmov.f64", + nameFpRegD(dd), nameFpRegD(dm)); + + + emitVFPInst(static_cast(cc) | FCPYD, DD(dd), DM(dm), 0); + } + + void faddd_r(int dd, int dn, int dm, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s, %s\n", "", "vadd.f64", nameFpRegD(dd), nameFpRegD(dn), nameFpRegD(dm)); + + + emitVFPInst(static_cast(cc) | FADDD, DD(dd), DN(dn), DM(dm)); + } + + void fnegd_r(int dd, int dm, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s\n", "", "fnegd", nameFpRegD(dd), nameFpRegD(dm)); + m_buffer.putInt(static_cast(cc) | FNEGD | DD(dd) | DM(dm)); + } + + void fdivd_r(int dd, int dn, int dm, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s, %s\n", "", "vdiv.f64", nameFpRegD(dd), nameFpRegD(dn), nameFpRegD(dm)); + + + emitVFPInst(static_cast(cc) | FDIVD, DD(dd), DN(dn), DM(dm)); + } + + void fsubd_r(int dd, int dn, int dm, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s, %s\n", "", "vsub.f64", nameFpRegD(dd), nameFpRegD(dn), nameFpRegD(dm)); + + + emitVFPInst(static_cast(cc) | FSUBD, DD(dd), DN(dn), DM(dm)); + } + + void fabsd_r(int dd, int dm, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s\n", "", "fabsd", nameFpRegD(dd), nameFpRegD(dm)); + m_buffer.putInt(static_cast(cc) | FABSD | DD(dd) | DM(dm)); + } + + void fmuld_r(int dd, int dn, int dm, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s, %s\n", "", "vmul.f64", nameFpRegD(dd), nameFpRegD(dn), nameFpRegD(dm)); + + + emitVFPInst(static_cast(cc) | FMULD, DD(dd), DN(dn), DM(dm)); + } + + void fcmpd_r(int dd, int dm, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s\n", "", "vcmp.f64", nameFpRegD(dd), nameFpRegD(dm)); + + + emitVFPInst(static_cast(cc) | FCMPD, DD(dd), 0, DM(dm)); + } + + void fsqrtd_r(int dd, int dm, Condition cc = AL) + { + js::JaegerSpew(js::JSpew_Insns, + " %s" "%-15s %s, %s\n", "", "vsqrt.f64", nameFpRegD(dd), nameFpRegD(dm)); + + + emitVFPInst(static_cast(cc) | FSQRTD, DD(dd), 0, DM(dm)); + } + + void fmsr_r(int dd, int rn, Condition cc = AL) + { + + + emitVFPInst(static_cast(cc) | FMSR, RD(rn), SN(dd), 0); + } + + void fmrs_r(int rd, int dn, Condition cc = AL) + { + + + emitVFPInst(static_cast(cc) | FMRS, RD(rd), SN(dn), 0); + } + + + + void fsitod_r(int dd, int dm, Condition cc = AL) + { + + + emitVFPInst(static_cast(cc) | FSITOD, DD(dd), 0, SM(dm)); + } + + void fuitod_r(int dd, int dm, Condition cc = AL) + { + + + emitVFPInst(static_cast(cc) | FUITOD, DD(dd), 0, SM(dm)); + } + + void ftosid_r(int fd, int dm, Condition cc = AL) + { + + emitVFPInst(static_cast(cc) | FTOSID, SD(fd), 0, DM(dm)); + } + + void ftosizd_r(int fd, int dm, Condition cc = AL) + { + + emitVFPInst(static_cast(cc) | FTOSIZD, SD(fd), 0, DM(dm)); + } + + void fmstat(Condition cc = AL) + { + + + m_buffer.putInt(static_cast(cc) | FMSTAT); + } + }; + +} +# 40 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerARM.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AbstractMacroAssembler.h" 1 +# 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AbstractMacroAssembler.h" +#define AbstractMacroAssembler_h + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerCodeRef.h" 1 +# 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerCodeRef.h" +#define MacroAssemblerCodeRef_h +# 52 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerCodeRef.h" +#define ASSERT_VALID_CODE_POINTER(ptr) ASSERT(ptr) + +#define ASSERT_VALID_CODE_OFFSET(offset) + + +namespace JSC { + + + + + +class FunctionPtr { +public: + FunctionPtr() + : m_value(0) + { + } + + template + explicit FunctionPtr(FunctionType* value) + + + + + + : m_value(reinterpret_cast(value)) + + { + do { } while(0); + } + + void* value() const { return m_value; } + void* executableAddress() const { return m_value; } + + +private: + void* m_value; +}; + + + + + + + +class ReturnAddressPtr { +public: + ReturnAddressPtr() + : m_value(0) + { + } + + explicit ReturnAddressPtr(void* value) + : m_value(value) + { + do { } while(0); + } + + explicit ReturnAddressPtr(FunctionPtr function) + : m_value(function.value()) + { + do { } while(0); + } + + void* value() const { return m_value; } + +private: + void* m_value; +}; + + + + +class MacroAssemblerCodePtr { +public: + MacroAssemblerCodePtr() + : m_value(0) + { + } + + explicit MacroAssemblerCodePtr(void* value) + + + + + : m_value(value) + + { + do { } while(0); + } + + explicit MacroAssemblerCodePtr(ReturnAddressPtr ra) + : m_value(ra.value()) + { + do { } while(0); + } + + void* executableAddress() const { + return m_value; + } + + + + + void* dataLocation() const { do { } while(0); return m_value; } + + + bool operator!() + { + return !m_value; + } + + ptrdiff_t operator -(const MacroAssemblerCodePtr &other) const + { + do { } while(0); + return reinterpret_cast(m_value) - + reinterpret_cast(other.m_value); + } + +private: + void* m_value; +}; + + + + + + +class MacroAssemblerCodeRef { +public: + MacroAssemblerCodeRef() + : m_executablePool(__null), + m_size(0) + { + } + + MacroAssemblerCodeRef(void* code, ExecutablePool* executablePool, size_t size) + : m_code(code) + , m_executablePool(executablePool) + , m_size(size) + { + } + + + void release() + { + if (!m_executablePool) + return; + + + + + + m_executablePool->release(); + m_executablePool = __null; + } + + MacroAssemblerCodePtr m_code; + ExecutablePool* m_executablePool; + size_t m_size; +}; + +} +# 35 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AbstractMacroAssembler.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/CodeLocation.h" 1 +# 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/CodeLocation.h" +#define CodeLocation_h + + + + + + +namespace JSC { + +class CodeLocationInstruction; +class CodeLocationLabel; +class CodeLocationJump; +class CodeLocationCall; +class CodeLocationNearCall; +class CodeLocationDataLabel32; +class CodeLocationDataLabelPtr; +# 59 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/CodeLocation.h" +class CodeLocationCommon : public MacroAssemblerCodePtr { +public: + CodeLocationInstruction instructionAtOffset(int offset); + CodeLocationLabel labelAtOffset(int offset); + CodeLocationJump jumpAtOffset(int offset); + CodeLocationCall callAtOffset(int offset); + CodeLocationNearCall nearCallAtOffset(int offset); + CodeLocationDataLabelPtr dataLabelPtrAtOffset(int offset); + CodeLocationDataLabel32 dataLabel32AtOffset(int offset); + +protected: + CodeLocationCommon() + { + } + + CodeLocationCommon(MacroAssemblerCodePtr location) + : MacroAssemblerCodePtr(location) + { + } +}; + +class CodeLocationInstruction : public CodeLocationCommon { +public: + CodeLocationInstruction() {} + explicit CodeLocationInstruction(MacroAssemblerCodePtr location) + : CodeLocationCommon(location) {} + explicit CodeLocationInstruction(void* location) + : CodeLocationCommon(MacroAssemblerCodePtr(location)) {} +}; + +class CodeLocationLabel : public CodeLocationCommon { +public: + CodeLocationLabel() {} + explicit CodeLocationLabel(MacroAssemblerCodePtr location) + : CodeLocationCommon(location) {} + explicit CodeLocationLabel(void* location) + : CodeLocationCommon(MacroAssemblerCodePtr(location)) {} +}; + +class CodeLocationJump : public CodeLocationCommon { +public: + CodeLocationJump() {} + explicit CodeLocationJump(MacroAssemblerCodePtr location) + : CodeLocationCommon(location) {} + explicit CodeLocationJump(void* location) + : CodeLocationCommon(MacroAssemblerCodePtr(location)) {} +}; + +class CodeLocationCall : public CodeLocationCommon { +public: + CodeLocationCall() {} + explicit CodeLocationCall(MacroAssemblerCodePtr location) + : CodeLocationCommon(location) {} + explicit CodeLocationCall(void* location) + : CodeLocationCommon(MacroAssemblerCodePtr(location)) {} +}; + +class CodeLocationNearCall : public CodeLocationCommon { +public: + CodeLocationNearCall() {} + explicit CodeLocationNearCall(MacroAssemblerCodePtr location) + : CodeLocationCommon(location) {} + explicit CodeLocationNearCall(void* location) + : CodeLocationCommon(MacroAssemblerCodePtr(location)) {} +}; + +class CodeLocationDataLabel32 : public CodeLocationCommon { +public: + CodeLocationDataLabel32() {} + explicit CodeLocationDataLabel32(MacroAssemblerCodePtr location) + : CodeLocationCommon(location) {} + explicit CodeLocationDataLabel32(void* location) + : CodeLocationCommon(MacroAssemblerCodePtr(location)) {} +}; + +class CodeLocationDataLabelPtr : public CodeLocationCommon { +public: + CodeLocationDataLabelPtr() {} + explicit CodeLocationDataLabelPtr(MacroAssemblerCodePtr location) + : CodeLocationCommon(location) {} + explicit CodeLocationDataLabelPtr(void* location) + : CodeLocationCommon(MacroAssemblerCodePtr(location)) {} +}; + +inline CodeLocationInstruction CodeLocationCommon::instructionAtOffset(int offset) +{ + ; + return CodeLocationInstruction(reinterpret_cast(dataLocation()) + offset); +} + +inline CodeLocationLabel CodeLocationCommon::labelAtOffset(int offset) +{ + ; + return CodeLocationLabel(reinterpret_cast(dataLocation()) + offset); +} + +inline CodeLocationJump CodeLocationCommon::jumpAtOffset(int offset) +{ + ; + return CodeLocationJump(reinterpret_cast(dataLocation()) + offset); +} + +inline CodeLocationCall CodeLocationCommon::callAtOffset(int offset) +{ + ; + return CodeLocationCall(reinterpret_cast(dataLocation()) + offset); +} + +inline CodeLocationNearCall CodeLocationCommon::nearCallAtOffset(int offset) +{ + ; + return CodeLocationNearCall(reinterpret_cast(dataLocation()) + offset); +} + +inline CodeLocationDataLabelPtr CodeLocationCommon::dataLabelPtrAtOffset(int offset) +{ + ; + return CodeLocationDataLabelPtr(reinterpret_cast(dataLocation()) + offset); +} + +inline CodeLocationDataLabel32 CodeLocationCommon::dataLabel32AtOffset(int offset) +{ + ; + return CodeLocationDataLabel32(reinterpret_cast(dataLocation()) + offset); +} + +} +# 36 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AbstractMacroAssembler.h" 2 + + + +namespace JSC { + +class LinkBuffer; +class RepatchBuffer; + +template +class AbstractMacroAssembler { +public: + typedef AssemblerType AssemblerType_T; + + typedef MacroAssemblerCodePtr CodePtr; + typedef MacroAssemblerCodeRef CodeRef; + + class Jump; + + typedef typename AssemblerType::RegisterID RegisterID; + typedef typename AssemblerType::FPRegisterID FPRegisterID; + typedef typename AssemblerType::JmpSrc JmpSrc; + typedef typename AssemblerType::JmpDst JmpDst; +# 72 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AbstractMacroAssembler.h" + enum Scale { + TimesOne, + TimesTwo, + TimesFour, + TimesEight + }; + + + + + struct Address { + explicit Address() {} + + explicit Address(RegisterID base, int32_t offset = 0) + : base(base) + , offset(offset) + { + } + + RegisterID base; + int32_t offset; + }; + + struct ExtendedAddress { + explicit ExtendedAddress(RegisterID base, intptr_t offset = 0) + : base(base) + , offset(offset) + { + } + + RegisterID base; + intptr_t offset; + }; +# 120 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AbstractMacroAssembler.h" + struct ImplicitAddress { + ImplicitAddress(RegisterID base) + : base(base) + , offset(0) + { + } + + ImplicitAddress(Address address) + : base(address.base) + , offset(address.offset) + { + } + + RegisterID base; + int32_t offset; + }; + + + + + struct BaseIndex { + BaseIndex(RegisterID base, RegisterID index, Scale scale, int32_t offset = 0) + : base(base) + , index(index) + , scale(scale) + , offset(offset) + { + } + + RegisterID base; + RegisterID index; + Scale scale; + int32_t offset; + }; + + + + + + struct AbsoluteAddress { + explicit AbsoluteAddress(void* ptr) + : m_ptr(ptr) + { + } + + void* m_ptr; + }; + + + + + + + struct TrustedImmPtr { + explicit TrustedImmPtr(const void* value) + : m_value(value) + { + } + + intptr_t asIntptr() + { + return reinterpret_cast(m_value); + } + + const void* m_value; + }; + + struct ImmPtr : public TrustedImmPtr { + explicit ImmPtr(const void* value) + : TrustedImmPtr(value) + { + } + }; + + + + + + + + struct TrustedImm32 { + explicit TrustedImm32(int32_t value) + : m_value(value) + + , m_isPointer(false) + + { + } + + + explicit TrustedImm32(TrustedImmPtr ptr) + : m_value(ptr.asIntptr()) + + , m_isPointer(true) + + { + } + + + int32_t m_value; +# 228 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AbstractMacroAssembler.h" + bool m_isPointer; + + }; + + + struct Imm32 : public TrustedImm32 { + explicit Imm32(int32_t value) + : TrustedImm32(value) + { + } + + explicit Imm32(TrustedImmPtr ptr) + : TrustedImm32(ptr) + { + } + + }; + + struct ImmDouble { + union { + struct { + + + + uint32_t lsb, msb; + + } s; + uint64_t u64; + double d; + } u; + + explicit ImmDouble(double d) { + u.d = d; + } + }; +# 276 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/AbstractMacroAssembler.h" + class Label { + template + friend class AbstractMacroAssembler; + friend class Jump; + friend class MacroAssemblerCodeRef; + friend class LinkBuffer; + + public: + Label() + { + } + + Label(AbstractMacroAssembler* masm) + : m_label(masm->m_assembler.label()) + { + } + + bool isUsed() const { return m_label.isUsed(); } + void used() { m_label.used(); } + bool isSet() const { return m_label.isValid(); } + private: + JmpDst m_label; + }; + + + + + + class DataLabelPtr { + template + friend class AbstractMacroAssembler; + friend class LinkBuffer; + public: + DataLabelPtr() + { + } + + DataLabelPtr(AbstractMacroAssembler* masm) + : m_label(masm->m_assembler.label()) + { + } + + bool isSet() const { return m_label.isValid(); } + + private: + JmpDst m_label; + }; + + + + + + class DataLabel32 { + template + friend class AbstractMacroAssembler; + friend class LinkBuffer; + public: + DataLabel32() + { + } + + DataLabel32(AbstractMacroAssembler* masm) + : m_label(masm->m_assembler.label()) + { + } + + private: + JmpDst m_label; + }; + + + + + + + + class Call { + template + friend class AbstractMacroAssembler; + + public: + enum Flags { + None = 0x0, + Linkable = 0x1, + Near = 0x2, + LinkableNear = 0x3 + }; + + Call() + : m_flags(None) + { + } + + Call(JmpSrc jmp, Flags flags) + : m_jmp(jmp) + , m_flags(flags) + { + } + + bool isFlagSet(Flags flag) + { + return !!(m_flags & flag); + } + + static Call fromTailJump(Jump jump) + { + return Call(jump.m_jmp, Linkable); + } + + JmpSrc m_jmp; + private: + Flags m_flags; + }; + + + + + + + + class Jump { + template + friend class AbstractMacroAssembler; + friend class Call; + friend class LinkBuffer; + public: + Jump() + { + } + + Jump(JmpSrc jmp) + : m_jmp(jmp) + { + } + + void link(AbstractMacroAssembler* masm) + { + masm->m_assembler.linkJump(m_jmp, masm->m_assembler.label()); + } + + void linkTo(Label label, AbstractMacroAssembler* masm) + { + masm->m_assembler.linkJump(m_jmp, label.m_label); + } + + private: + JmpSrc m_jmp; + }; + + + + + + class JumpList { + friend class LinkBuffer; + + public: + typedef js::Vector JumpVector; + + JumpList() {} + + JumpList(const JumpList &other) + { + m_jumps.append(other.m_jumps); + } + + JumpList &operator=(const JumpList &other) + { + m_jumps.clear(); + m_jumps.append(other.m_jumps); + return *this; + } + + void link(AbstractMacroAssembler* masm) + { + size_t size = m_jumps.length(); + for (size_t i = 0; i < size; ++i) + m_jumps[i].link(masm); + m_jumps.clear(); + } + + void linkTo(Label label, AbstractMacroAssembler* masm) + { + size_t size = m_jumps.length(); + for (size_t i = 0; i < size; ++i) + m_jumps[i].linkTo(label, masm); + m_jumps.clear(); + } + + void append(Jump jump) + { + m_jumps.append(jump); + } + + void append(const JumpList& other) + { + m_jumps.append(other.m_jumps.begin(), other.m_jumps.length()); + } + + void clear() + { + m_jumps.clear(); + } + + bool empty() + { + return !m_jumps.length(); + } + + const JumpVector& jumps() const { return m_jumps; } + + private: + JumpVector m_jumps; + }; + + + + + static CodePtr trampolineAt(CodeRef ref, Label label) + { + return CodePtr(AssemblerType::getRelocatedAddress(ref.m_code.dataLocation(), label.m_label)); + } + + size_t size() + { + return m_assembler.size(); + } + + unsigned char *buffer() + { + return m_assembler.buffer(); + } + + bool oom() + { + return m_assembler.oom(); + } + + void executableCopy(void* buffer) + { + do { } while(0); + m_assembler.executableCopy(buffer); + } + + Label label() + { + return Label(this); + } + + DataLabel32 dataLabel32() + { + return DataLabel32(this); + } + + Label align() + { + m_assembler.align(16); + return Label(this); + } + + ptrdiff_t differenceBetween(Label from, Jump to) + { + return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_jmp); + } + + ptrdiff_t differenceBetween(Label from, Call to) + { + return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_jmp); + } + + ptrdiff_t differenceBetween(Label from, Label to) + { + return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_label); + } + + ptrdiff_t differenceBetween(Label from, DataLabelPtr to) + { + return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_label); + } + + ptrdiff_t differenceBetween(Label from, DataLabel32 to) + { + return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_label); + } + + ptrdiff_t differenceBetween(DataLabel32 from, Label to) + { + return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_label); + } + + ptrdiff_t differenceBetween(DataLabelPtr from, Label to) + { + return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_label); + } + + ptrdiff_t differenceBetween(DataLabelPtr from, Jump to) + { + return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_jmp); + } + + ptrdiff_t differenceBetween(DataLabelPtr from, DataLabelPtr to) + { + return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_label); + } + + ptrdiff_t differenceBetween(DataLabelPtr from, Call to) + { + return AssemblerType::getDifferenceBetweenLabels(from.m_label, to.m_jmp); + } + +protected: + AssemblerType m_assembler; + + friend class LinkBuffer; + friend class RepatchBuffer; + + static void linkJump(void* code, Jump jump, CodeLocationLabel target) + { + AssemblerType::linkJump(code, jump.m_jmp, target.dataLocation()); + } + + static void linkPointer(void* code, typename AssemblerType::JmpDst label, void* value) + { + AssemblerType::linkPointer(code, label, value); + } + + static void* getLinkerAddress(void* code, typename AssemblerType::JmpSrc label) + { + return AssemblerType::getRelocatedAddress(code, label); + } + + static void* getLinkerAddress(void* code, typename AssemblerType::JmpDst label) + { + return AssemblerType::getRelocatedAddress(code, label); + } + + static unsigned getLinkerCallReturnOffset(Call call) + { + return AssemblerType::getCallReturnOffset(call.m_jmp); + } + + static void repatchJump(CodeLocationJump jump, CodeLocationLabel destination) + { + AssemblerType::relinkJump(jump.dataLocation(), destination.dataLocation()); + } + + static bool canRepatchJump(CodeLocationJump jump, CodeLocationLabel destination) + { + return AssemblerType::canRelinkJump(jump.dataLocation(), destination.dataLocation()); + } + + static void repatchNearCall(CodeLocationNearCall nearCall, CodeLocationLabel destination) + { + AssemblerType::relinkCall(nearCall.dataLocation(), destination.executableAddress()); + } + + static void repatchInt32(CodeLocationDataLabel32 dataLabel32, int32_t value) + { + AssemblerType::repatchInt32(dataLabel32.dataLocation(), value); + } + + static void repatchPointer(CodeLocationDataLabelPtr dataLabelPtr, void* value) + { + AssemblerType::repatchPointer(dataLabelPtr.dataLocation(), value); + } + + static void repatchLoadPtrToLEA(CodeLocationInstruction instruction) + { + AssemblerType::repatchLoadPtrToLEA(instruction.dataLocation()); + } + + static void repatchLEAToLoadPtr(CodeLocationInstruction instruction) + { + AssemblerType::repatchLEAToLoadPtr(instruction.dataLocation()); + } +}; + +} +# 41 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerARM.h" 2 + +namespace JSC { + +class MacroAssemblerARM : public AbstractMacroAssembler { + static const int DoubleConditionMask = 0x0f; + static const int DoubleConditionBitSpecial = 0x8; +public: + enum Condition { + Equal = ARMAssembler::EQ, + NotEqual = ARMAssembler::NE, + Above = ARMAssembler::HI, + AboveOrEqual = ARMAssembler::CS, + Below = ARMAssembler::CC, + BelowOrEqual = ARMAssembler::LS, + GreaterThan = ARMAssembler::GT, + GreaterThanOrEqual = ARMAssembler::GE, + LessThan = ARMAssembler::LT, + LessThanOrEqual = ARMAssembler::LE, + Overflow = ARMAssembler::VS, + Signed = ARMAssembler::MI, + Zero = ARMAssembler::EQ, + NonZero = ARMAssembler::NE + }; + + enum DoubleCondition { + + DoubleEqual = ARMAssembler::EQ, + DoubleNotEqual = ARMAssembler::NE | DoubleConditionBitSpecial, + DoubleGreaterThan = ARMAssembler::GT, + DoubleGreaterThanOrEqual = ARMAssembler::GE, + DoubleLessThan = ARMAssembler::CC, + DoubleLessThanOrEqual = ARMAssembler::LS, + + DoubleEqualOrUnordered = ARMAssembler::EQ | DoubleConditionBitSpecial, + DoubleNotEqualOrUnordered = ARMAssembler::NE, + DoubleGreaterThanOrUnordered = ARMAssembler::HI, + DoubleGreaterThanOrEqualOrUnordered = ARMAssembler::CS, + DoubleLessThanOrUnordered = ARMAssembler::LT, + DoubleLessThanOrEqualOrUnordered = ARMAssembler::LE + }; + + static const RegisterID stackPointerRegister = ARMRegisters::sp; + static const RegisterID linkRegister = ARMRegisters::lr; + + static const Scale ScalePtr = TimesFour; + static const unsigned int TotalRegisters = 16; + + void add32(RegisterID src, RegisterID dest) + { + m_assembler.adds_r(dest, dest, src); + } + + void add32(TrustedImm32 imm, Address address) + { + load32(address, ARMRegisters::S1); + add32(imm, ARMRegisters::S1); + store32(ARMRegisters::S1, address); + } + + void add32(TrustedImm32 imm, RegisterID dest) + { + m_assembler.adds_r(dest, dest, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); + } + + void add32(Address src, RegisterID dest) + { + load32(src, ARMRegisters::S1); + add32(ARMRegisters::S1, dest); + } + + void and32(Address src, RegisterID dest) + { + load32(src, ARMRegisters::S1); + and32(ARMRegisters::S1, dest); + } + + void and32(RegisterID src, RegisterID dest) + { + m_assembler.ands_r(dest, dest, src); + } + + void and32(Imm32 imm, RegisterID dest) + { + ARMWord w = m_assembler.getImm(imm.m_value, ARMRegisters::S0, true); + if (w & ARMAssembler::OP2_INV_IMM) + m_assembler.bics_r(dest, dest, w & ~ARMAssembler::OP2_INV_IMM); + else + m_assembler.ands_r(dest, dest, w); + } + + void lshift32(RegisterID shift_amount, RegisterID dest) + { + ARMWord w = ARMAssembler::getOp2(0x1f); + do { } while(0); + m_assembler.and_r(ARMRegisters::S0, shift_amount, w); + + m_assembler.movs_r(dest, m_assembler.lsl_r(dest, ARMRegisters::S0)); + } + + void lshift32(Imm32 imm, RegisterID dest) + { + m_assembler.movs_r(dest, m_assembler.lsl(dest, imm.m_value & 0x1f)); + } + + void mul32(RegisterID src, RegisterID dest) + { + if (src == dest) { + move(src, ARMRegisters::S0); + src = ARMRegisters::S0; + } + m_assembler.muls_r(dest, dest, src); + } + + void mul32(Imm32 imm, RegisterID src, RegisterID dest) + { + move(imm, ARMRegisters::S0); + m_assembler.muls_r(dest, src, ARMRegisters::S0); + } + + void neg32(RegisterID srcDest) + { + m_assembler.rsbs_r(srcDest, srcDest, ARMAssembler::getOp2(0)); + } + + void not32(RegisterID dest) + { + m_assembler.mvns_r(dest, dest); + } + + void or32(RegisterID src, RegisterID dest) + { + m_assembler.orrs_r(dest, dest, src); + } + + void or32(TrustedImm32 imm, RegisterID dest) + { + m_assembler.orrs_r(dest, dest, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); + } + + void rshift32(RegisterID shift_amount, RegisterID dest) + { + ARMWord w = ARMAssembler::getOp2(0x1f); + do { } while(0); + m_assembler.and_r(ARMRegisters::S0, shift_amount, w); + + m_assembler.movs_r(dest, m_assembler.asr_r(dest, ARMRegisters::S0)); + } + + void rshift32(Imm32 imm, RegisterID dest) + { + m_assembler.movs_r(dest, m_assembler.asr(dest, imm.m_value & 0x1f)); + } + + void urshift32(RegisterID shift_amount, RegisterID dest) + { + ARMWord w = ARMAssembler::getOp2(0x1f); + do { } while(0); + m_assembler.and_r(ARMRegisters::S0, shift_amount, w); + + m_assembler.movs_r(dest, m_assembler.lsr_r(dest, ARMRegisters::S0)); + } + + void urshift32(Imm32 imm, RegisterID dest) + { + m_assembler.movs_r(dest, m_assembler.lsr(dest, imm.m_value & 0x1f)); + } + + void sub32(RegisterID src, RegisterID dest) + { + m_assembler.subs_r(dest, dest, src); + } + + void sub32(TrustedImm32 imm, RegisterID dest) + { + m_assembler.subs_r(dest, dest, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); + } + + void sub32(TrustedImm32 imm, Address address) + { + load32(address, ARMRegisters::S1); + sub32(imm, ARMRegisters::S1); + store32(ARMRegisters::S1, address); + } + + void sub32(Address src, RegisterID dest) + { + load32(src, ARMRegisters::S1); + sub32(ARMRegisters::S1, dest); + } + + void or32(Address address, RegisterID dest) + { + load32(address, ARMRegisters::S1); + or32(ARMRegisters::S1, dest); + } + + void xor32(RegisterID src, RegisterID dest) + { + m_assembler.eors_r(dest, dest, src); + } + + void xor32(TrustedImm32 imm, RegisterID dest) + { + m_assembler.eors_r(dest, dest, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); + } + + void xor32(Address src, RegisterID dest) + { + load32(src, ARMRegisters::S1); + m_assembler.eors_r(dest, dest, ARMRegisters::S1); + } + + void load8SignExtend(ImplicitAddress address, RegisterID dest) + { + m_assembler.dataTransferN(true, true, 8, dest, address.base, address.offset); + } + + void load8ZeroExtend(ImplicitAddress address, RegisterID dest) + { + m_assembler.dataTransferN(true, false, 8, dest, address.base, address.offset); + } + + void load8SignExtend(BaseIndex address, RegisterID dest) + { + m_assembler.baseIndexTransferN(true, true, 8, dest, + address.base, address.index, address.scale, address.offset); + } + + void load8ZeroExtend(BaseIndex address, RegisterID dest) + { + m_assembler.baseIndexTransferN(true, false, 8, dest, + address.base, address.index, address.scale, address.offset); + } + + + void load8(ImplicitAddress address, RegisterID dest) + { + load8ZeroExtend(address, dest); + } + + void load16SignExtend(ImplicitAddress address, RegisterID dest) + { + m_assembler.dataTransferN(true, true, 16, dest, address.base, address.offset); + } + + void load16ZeroExtend(ImplicitAddress address, RegisterID dest) + { + m_assembler.dataTransferN(true, false, 16, dest, address.base, address.offset); + } + void load16SignExtend(BaseIndex address, RegisterID dest) + { + m_assembler.baseIndexTransferN(true, true, 16, dest, + address.base, address.index, address.scale, address.offset); + } + void load16ZeroExtend(BaseIndex address, RegisterID dest) + { + m_assembler.baseIndexTransferN(true, false, 16, dest, + address.base, address.index, address.scale, address.offset); + } + + void load32(ImplicitAddress address, RegisterID dest) + { + m_assembler.dataTransfer32(true, dest, address.base, address.offset); + } + + void load32(BaseIndex address, RegisterID dest) + { + m_assembler.baseIndexTransfer32(true, dest, address.base, address.index, static_cast(address.scale), address.offset); + } + + + + + void load32WithUnalignedHalfWords(BaseIndex address, RegisterID dest) + { + load32(address, dest); + } + + + DataLabel32 load32WithAddressOffsetPatch(Address address, RegisterID dest) + { + do { } while(0); + DataLabel32 dataLabel(this); + m_assembler.ldr_un_imm(ARMRegisters::S0, 0); + m_assembler.dtr_ur(true, dest, address.base, ARMRegisters::S0); + return dataLabel; + } + + DataLabel32 load64WithAddressOffsetPatch(Address address, RegisterID hi, RegisterID lo) + { + do { } while(0); + do { } while(0); + DataLabel32 dataLabel(this); + m_assembler.ldr_un_imm(ARMRegisters::S0, 0); + m_assembler.add_r(ARMRegisters::S0, ARMRegisters::S0, address.base); + m_assembler.dtr_u(true, lo, ARMRegisters::S0, 0); + m_assembler.dtr_u(true, hi, ARMRegisters::S0, 4); + return dataLabel; + } + + Label loadPtrWithPatchToLEA(Address address, RegisterID dest) + { + Label label(this); + load32(address, dest); + return label; + } + + void load16(BaseIndex address, RegisterID dest) + { + m_assembler.add_r(ARMRegisters::S1, address.base, m_assembler.lsl(address.index, address.scale)); + load16(Address(ARMRegisters::S1, address.offset), dest); + } + + void load16(ImplicitAddress address, RegisterID dest) + { + if (address.offset >= 0) + m_assembler.ldrh_u(dest, address.base, m_assembler.getOffsetForHalfwordDataTransfer(address.offset, ARMRegisters::S0)); + else + m_assembler.ldrh_d(dest, address.base, m_assembler.getOffsetForHalfwordDataTransfer(-address.offset, ARMRegisters::S0)); + } + + DataLabel32 store32WithAddressOffsetPatch(RegisterID src, Address address) + { + do { } while(0); + DataLabel32 dataLabel(this); + m_assembler.ldr_un_imm(ARMRegisters::S0, 0); + m_assembler.dtr_ur(false, src, address.base, ARMRegisters::S0); + return dataLabel; + } + + DataLabel32 store64WithAddressOffsetPatch(RegisterID hi, RegisterID lo, Address address) + { + do { } while(0); + do { } while(0); + do { } while(0); + DataLabel32 dataLabel(this); + m_assembler.ldr_un_imm(ARMRegisters::S0, address.offset); + m_assembler.add_r(ARMRegisters::S0, ARMRegisters::S0, address.base); + m_assembler.dtr_u(false, lo, ARMRegisters::S0, 0); + m_assembler.dtr_u(false, hi, ARMRegisters::S0, 4); + return dataLabel; + } + + DataLabel32 store64WithAddressOffsetPatch(Imm32 hi, RegisterID lo, Address address) + { + do { } while(0); + do { } while(0); + do { } while(0); + do { } while(0); + do { } while(0); + DataLabel32 dataLabel(this); + m_assembler.ldr_un_imm(ARMRegisters::S0, address.offset); + m_assembler.moveImm(hi.m_value, ARMRegisters::S1); + m_assembler.add_r(ARMRegisters::S0, ARMRegisters::S0, address.base); + m_assembler.dtr_u(false, lo, ARMRegisters::S0, 0); + m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 4); + return dataLabel; + } + + DataLabel32 store64WithAddressOffsetPatch(Imm32 hi, Imm32 lo, Address address) + { + do { } while(0); + do { } while(0); + DataLabel32 dataLabel(this); + m_assembler.ldr_un_imm(ARMRegisters::S0, address.offset); + m_assembler.add_r(ARMRegisters::S0, ARMRegisters::S0, address.base); + m_assembler.moveImm(lo.m_value, ARMRegisters::S1); + m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 0); + + m_assembler.moveImm(hi.m_value, ARMRegisters::S1); + m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 4); + return dataLabel; + } + + void store32(RegisterID src, ImplicitAddress address) + { + m_assembler.dataTransfer32(false, src, address.base, address.offset); + } + + void store32(RegisterID src, BaseIndex address) + { + m_assembler.baseIndexTransfer32(false, src, address.base, address.index, static_cast(address.scale), address.offset); + } + + void store32(TrustedImm32 imm, BaseIndex address) + { + if (imm.m_isPointer) + m_assembler.ldr_un_imm(ARMRegisters::S1, imm.m_value); + else + move(imm, ARMRegisters::S1); + store32(ARMRegisters::S1, address); + } + + void store32(TrustedImm32 imm, ImplicitAddress address) + { + if (imm.m_isPointer) + m_assembler.ldr_un_imm(ARMRegisters::S1, imm.m_value); + else + move(imm, ARMRegisters::S1); + store32(ARMRegisters::S1, address); + } + + void store32(RegisterID src, void* address) + { + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); + m_assembler.dtr_u(false, src, ARMRegisters::S0, 0); + } + + void store32(TrustedImm32 imm, void* address) + { + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); + if (imm.m_isPointer) + m_assembler.ldr_un_imm(ARMRegisters::S1, imm.m_value); + else + m_assembler.moveImm(imm.m_value, ARMRegisters::S1); + m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 0); + } + + void store16(RegisterID src, ImplicitAddress address) + { + m_assembler.dataTransferN(false, false, 16, src, address.base, address.offset); + } + void store16(RegisterID src, BaseIndex address) + { + m_assembler.baseIndexTransferN(false, false, 16, src, address.base, address.index, static_cast(address.scale), address.offset); + } + + void store16(TrustedImm32 imm, BaseIndex address) + { + if (imm.m_isPointer) + do { } while(0); + else + move(imm, ARMRegisters::S1); + store16(ARMRegisters::S1, address); + } + void store16(TrustedImm32 imm, ImplicitAddress address) + { + if (imm.m_isPointer) + do { } while(0); + else + move(imm, ARMRegisters::S1); + store16(ARMRegisters::S1, address); + } + + void store16(RegisterID src, void* address) + { + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); + m_assembler.mem_imm_off(false, false, 16, true, src, ARMRegisters::S0, 0); + } + + void store16(TrustedImm32 imm, void* address) + { + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); + if (imm.m_isPointer) + do { } while(0); + else + m_assembler.moveImm(imm.m_value, ARMRegisters::S1); + m_assembler.mem_imm_off(false, false, 16, true, ARMRegisters::S1, ARMRegisters::S0, 0); + } + + void store8(RegisterID src, ImplicitAddress address) + { + m_assembler.dataTransferN(false, false, 16, src, address.base, address.offset); + } + + void store8(RegisterID src, BaseIndex address) + { + m_assembler.baseIndexTransferN(false, false, 8, src, address.base, address.index, static_cast(address.scale), address.offset); + } + + void store8(TrustedImm32 imm, BaseIndex address) + { + if (imm.m_isPointer) + do { } while(0); + else + move(imm, ARMRegisters::S1); + store8(ARMRegisters::S1, address); + } + + void store8(TrustedImm32 imm, ImplicitAddress address) + { + if (imm.m_isPointer) + do { } while(0); + else + move(imm, ARMRegisters::S1); + store8(ARMRegisters::S1, address); + } + + void store8(RegisterID src, void* address) + { + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); + m_assembler.mem_imm_off(false, false, 8, true, src, ARMRegisters::S0, 0); + } + + void store8(TrustedImm32 imm, void* address) + { + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); + if (imm.m_isPointer) + do { } while(0); + else + m_assembler.moveImm(imm.m_value, ARMRegisters::S1); + m_assembler.mem_imm_off(false, false, 8, true, ARMRegisters::S1, ARMRegisters::S0, 0); + } + + void pop(RegisterID dest) + { + m_assembler.pop_r(dest); + } + + void push(RegisterID src) + { + m_assembler.push_r(src); + } + + void push(Address address) + { + load32(address, ARMRegisters::S1); + push(ARMRegisters::S1); + } + + void push(Imm32 imm) + { + move(imm, ARMRegisters::S0); + push(ARMRegisters::S0); + } + + void move(TrustedImm32 imm, RegisterID dest) + { + if (imm.m_isPointer) + m_assembler.ldr_un_imm(dest, imm.m_value); + else + m_assembler.moveImm(imm.m_value, dest); + } + + void move(RegisterID src, RegisterID dest) + { + m_assembler.mov_r(dest, src); + } + + void move(TrustedImmPtr imm, RegisterID dest) + { + move(Imm32(imm), dest); + } + + void swap(RegisterID reg1, RegisterID reg2) + { + m_assembler.mov_r(ARMRegisters::S0, reg1); + m_assembler.mov_r(reg1, reg2); + m_assembler.mov_r(reg2, ARMRegisters::S0); + } + + void signExtend32ToPtr(RegisterID src, RegisterID dest) + { + if (src != dest) + move(src, dest); + } + + void zeroExtend32ToPtr(RegisterID src, RegisterID dest) + { + if (src != dest) + move(src, dest); + } + + Jump branch8(Condition cond, Address left, Imm32 right) + { + load8(left, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); + } + + Jump branch32(Condition cond, RegisterID left, RegisterID right, int useConstantPool = 0) + { + m_assembler.cmp_r(left, right); + return Jump(m_assembler.jmp(ARMCondition(cond), useConstantPool)); + } + + Jump branch32(Condition cond, RegisterID left, TrustedImm32 right, int useConstantPool = 0) + { + do { } while(0); + if (right.m_isPointer) { + m_assembler.ldr_un_imm(ARMRegisters::S0, right.m_value); + m_assembler.cmp_r(left, ARMRegisters::S0); + } else { + + + + + + + ARMWord arg = m_assembler.getOp2(right.m_value); + if (arg != m_assembler.INVALID_IMM) { + m_assembler.cmp_r(left, arg); + } else { + + + arg = m_assembler.getOp2(-right.m_value); + if (arg != m_assembler.INVALID_IMM) { + m_assembler.cmn_r(left, arg); + } else { + + + + m_assembler.cmp_r(left, m_assembler.getImm(right.m_value, ARMRegisters::S0)); + } + } + } + return Jump(m_assembler.jmp(ARMCondition(cond), useConstantPool)); + } + + + + + + Jump branch32FixedLength(Condition cond, RegisterID left, TrustedImm32 right) + { + m_assembler.ldr_un_imm(ARMRegisters::S1, right.m_value); + return branch32(cond, left, ARMRegisters::S1, true); + } + + + Jump branch32WithPatch(Condition cond, RegisterID left, TrustedImm32 right, DataLabel32 &dataLabel) + { + do { } while(0); + dataLabel = moveWithPatch(right, ARMRegisters::S1); + return branch32(cond, left, ARMRegisters::S1, true); + } + + Jump branch32WithPatch(Condition cond, Address left, TrustedImm32 right, DataLabel32 &dataLabel) + { + do { } while(0); + load32(left, ARMRegisters::S1); + dataLabel = moveWithPatch(right, ARMRegisters::S0); + return branch32(cond, ARMRegisters::S1, ARMRegisters::S0, true); + } + + Jump branch32(Condition cond, RegisterID left, Address right) + { + + load32(right, ARMRegisters::S1); + return branch32(cond, left, ARMRegisters::S1); + } + + Jump branch32(Condition cond, Address left, RegisterID right) + { + load32(left, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); + } + + Jump branch32(Condition cond, Address left, TrustedImm32 right) + { + load32(left, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); + } + + Jump branch32(Condition cond, BaseIndex left, TrustedImm32 right) + { + load32(left, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); + } + + Jump branch32WithUnalignedHalfWords(Condition cond, BaseIndex left, TrustedImm32 right) + { + load32WithUnalignedHalfWords(left, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); + } + + Jump branch16(Condition cond, BaseIndex left, RegisterID right) + { + (void)(cond); + (void)(left); + (void)(right); + __builtin_unreachable(); + return jump(); + } + + Jump branch16(Condition cond, BaseIndex left, Imm32 right) + { + load16(left, ARMRegisters::S0); + move(right, ARMRegisters::S1); + m_assembler.cmp_r(ARMRegisters::S0, ARMRegisters::S1); + return m_assembler.jmp(ARMCondition(cond)); + } + + Jump branchTest8(Condition cond, Address address, Imm32 mask = Imm32(-1)) + { + load8(address, ARMRegisters::S1); + return branchTest32(cond, ARMRegisters::S1, mask); + } + + Jump branchTest32(Condition cond, RegisterID reg, RegisterID mask) + { + do { } while(0); + m_assembler.tst_r(reg, mask); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchTest32(Condition cond, RegisterID reg, Imm32 mask = Imm32(-1)) + { + do { } while(0); + ARMWord w = m_assembler.getImm(mask.m_value, ARMRegisters::S0, true); + if (w & ARMAssembler::OP2_INV_IMM) + m_assembler.bics_r(ARMRegisters::S0, reg, w & ~ARMAssembler::OP2_INV_IMM); + else + m_assembler.tst_r(reg, w); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchTest32(Condition cond, Address address, Imm32 mask = Imm32(-1)) + { + load32(address, ARMRegisters::S1); + return branchTest32(cond, ARMRegisters::S1, mask); + } + + Jump branchTest32(Condition cond, BaseIndex address, Imm32 mask = Imm32(-1)) + { + load32(address, ARMRegisters::S1); + return branchTest32(cond, ARMRegisters::S1, mask); + } + + Jump jump() + { + return Jump(m_assembler.jmp()); + } + + void jump(RegisterID target) + { + m_assembler.bx(target); + } + + void jump(Address address) + { + load32(address, ARMRegisters::pc); + } + + Jump branchAdd32(Condition cond, RegisterID src, RegisterID dest) + { + do { } while(0); + add32(src, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchAdd32(Condition cond, Imm32 imm, RegisterID dest) + { + do { } while(0); + add32(imm, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchAdd32(Condition cond, Address src, RegisterID dest) + { + do { } while(0); + add32(src, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + void mull32(RegisterID src1, RegisterID src2, RegisterID dest) + { + if (src1 == dest) { + move(src1, ARMRegisters::S0); + src1 = ARMRegisters::S0; + } + m_assembler.mull_r(ARMRegisters::S1, dest, src2, src1); + m_assembler.cmp_r(ARMRegisters::S1, m_assembler.asr(dest, 31)); + } + + Jump branchMul32(Condition cond, RegisterID src, RegisterID dest) + { + do { } while(0); + if (cond == Overflow) { + mull32(src, dest, dest); + cond = NonZero; + } + else + mul32(src, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchMul32(Condition cond, Imm32 imm, RegisterID src, RegisterID dest) + { + do { } while(0); + if (cond == Overflow) { + move(imm, ARMRegisters::S0); + mull32(ARMRegisters::S0, src, dest); + cond = NonZero; + } + else + mul32(imm, src, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchSub32(Condition cond, RegisterID src, RegisterID dest) + { + do { } while(0); + sub32(src, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchSub32(Condition cond, Imm32 imm, RegisterID dest) + { + do { } while(0); + sub32(imm, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchSub32(Condition cond, Address src, RegisterID dest) + { + do { } while(0); + sub32(src, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchSub32(Condition cond, Imm32 imm, Address dest) + { + do { } while(0); + sub32(imm, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchNeg32(Condition cond, RegisterID srcDest) + { + do { } while(0); + neg32(srcDest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + Jump branchOr32(Condition cond, RegisterID src, RegisterID dest) + { + do { } while(0); + or32(src, dest); + return Jump(m_assembler.jmp(ARMCondition(cond))); + } + + + + void nop(int tag) + { + do { } while(0); + m_assembler.mov_r(tag, tag); + } + + void breakpoint() + { + m_assembler.bkpt(0); + } + + Call nearCall() + { + + Call call(m_assembler.loadBranchTarget(ARMRegisters::S1, ARMAssembler::AL, true), Call::LinkableNear); + m_assembler.blx(ARMRegisters::S1); + return call; + + + + + } + + Call call(RegisterID target) + { + m_assembler.blx(target); + JmpSrc jmpSrc; + return Call(jmpSrc, Call::None); + } + + void call(Address address) + { + call32(address.base, address.offset); + } + + void ret() + { + m_assembler.bx(linkRegister); + } + + void set32(Condition cond, Address left, RegisterID right, RegisterID dest) + { + load32(left, ARMRegisters::S1); + set32(cond, ARMRegisters::S1, right, dest); + } + + void set32(Condition cond, RegisterID left, Address right, RegisterID dest) + { + load32(right, ARMRegisters::S1); + set32(cond, left, ARMRegisters::S1, dest); + } + + void set32(Condition cond, RegisterID left, RegisterID right, RegisterID dest) + { + m_assembler.cmp_r(left, right); + m_assembler.mov_r(dest, ARMAssembler::getOp2(0)); + m_assembler.mov_r(dest, ARMAssembler::getOp2(1), ARMCondition(cond)); + } + + void set32(Condition cond, RegisterID left, Imm32 right, RegisterID dest) + { + m_assembler.cmp_r(left, m_assembler.getImm(right.m_value, ARMRegisters::S0)); + m_assembler.mov_r(dest, ARMAssembler::getOp2(0)); + m_assembler.mov_r(dest, ARMAssembler::getOp2(1), ARMCondition(cond)); + } + + void set32(Condition cond, Address left, Imm32 right, RegisterID dest) + { + load32(left, ARMRegisters::S1); + set32(cond, ARMRegisters::S1, right, dest); + } + + void set8(Condition cond, RegisterID left, RegisterID right, RegisterID dest) + { + + set32(cond, left, right, dest); + } + + void set8(Condition cond, Address left, RegisterID right, RegisterID dest) + { + + load32(left, ARMRegisters::S1); + set32(cond, ARMRegisters::S1, right, dest); + } + + void set8(Condition cond, RegisterID left, Imm32 right, RegisterID dest) + { + + set32(cond, left, right, dest); + } + + void setTest32(Condition cond, Address address, Imm32 mask, RegisterID dest) + { + load32(address, ARMRegisters::S1); + if (mask.m_value == -1) + m_assembler.cmp_r(0, ARMRegisters::S1); + else + m_assembler.tst_r(ARMRegisters::S1, m_assembler.getImm(mask.m_value, ARMRegisters::S0)); + m_assembler.mov_r(dest, ARMAssembler::getOp2(0)); + m_assembler.mov_r(dest, ARMAssembler::getOp2(1), ARMCondition(cond)); + } + + void setTest8(Condition cond, Address address, Imm32 mask, RegisterID dest) + { + + setTest32(cond, address, mask, dest); + } + + void add32(TrustedImm32 imm, RegisterID src, RegisterID dest) + { + m_assembler.add_r(dest, src, m_assembler.getImm(imm.m_value, ARMRegisters::S0)); + } + + void lea(Address address, RegisterID dest) + { + m_assembler.add_r(dest, address.base, m_assembler.getImm(address.offset, ARMRegisters::S0)); + } + + void lea(BaseIndex address, RegisterID dest) + { + + move(address.index, ARMRegisters::S1); + if (address.scale != 0) + lshift32(Imm32(address.scale), ARMRegisters::S1); + if (address.offset) + add32(Imm32(address.offset), ARMRegisters::S1); + add32(address.base, ARMRegisters::S1); + move(ARMRegisters::S1, dest); + } + + void add32(TrustedImm32 imm, AbsoluteAddress address) + { + m_assembler.ldr_un_imm(ARMRegisters::S1, reinterpret_cast(address.m_ptr)); + m_assembler.dtr_u(true, ARMRegisters::S1, ARMRegisters::S1, 0); + add32(imm, ARMRegisters::S1); + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address.m_ptr)); + m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 0); + } + + void sub32(TrustedImm32 imm, AbsoluteAddress address) + { + m_assembler.ldr_un_imm(ARMRegisters::S1, reinterpret_cast(address.m_ptr)); + m_assembler.dtr_u(true, ARMRegisters::S1, ARMRegisters::S1, 0); + sub32(imm, ARMRegisters::S1); + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address.m_ptr)); + m_assembler.dtr_u(false, ARMRegisters::S1, ARMRegisters::S0, 0); + } + + void load32(void* address, RegisterID dest) + { + m_assembler.ldr_un_imm(ARMRegisters::S0, reinterpret_cast(address)); + m_assembler.dtr_u(true, dest, ARMRegisters::S0, 0); + } + + Jump branch32(Condition cond, AbsoluteAddress left, RegisterID right) + { + load32(left.m_ptr, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); + } + + Jump branch32(Condition cond, AbsoluteAddress left, TrustedImm32 right) + { + load32(left.m_ptr, ARMRegisters::S1); + return branch32(cond, ARMRegisters::S1, right); + } + + Call call() + { + + Call call(m_assembler.loadBranchTarget(ARMRegisters::S1, ARMAssembler::AL, true), Call::Linkable); + m_assembler.blx(ARMRegisters::S1); + return call; + + + + + } + + Call tailRecursiveCall() + { + return Call::fromTailJump(jump()); + } + + Call makeTailRecursiveCall(Jump oldJump) + { + return Call::fromTailJump(oldJump); + } + + DataLabelPtr moveWithPatch(TrustedImmPtr initialValue, RegisterID dest) + { + DataLabelPtr dataLabel(this); + m_assembler.ldr_un_imm(dest, reinterpret_cast(initialValue.m_value)); + return dataLabel; + } + + DataLabel32 moveWithPatch(TrustedImm32 initialValue, RegisterID dest) + { + DataLabel32 dataLabel(this); + m_assembler.ldr_un_imm(dest, initialValue.m_value); + return dataLabel; + } + + Jump branchPtrWithPatch(Condition cond, RegisterID left, DataLabelPtr& dataLabel, ImmPtr initialRightValue = ImmPtr(0)) + { + dataLabel = moveWithPatch(initialRightValue, ARMRegisters::S1); + Jump jump = branch32(cond, left, ARMRegisters::S1, true); + return jump; + } + + Jump branchPtrWithPatch(Condition cond, Address left, DataLabelPtr& dataLabel, ImmPtr initialRightValue = ImmPtr(0)) + { + load32(left, ARMRegisters::S1); + dataLabel = moveWithPatch(initialRightValue, ARMRegisters::S0); + Jump jump = branch32(cond, ARMRegisters::S0, ARMRegisters::S1, true); + return jump; + } + + DataLabelPtr storePtrWithPatch(TrustedImmPtr initialValue, ImplicitAddress address) + { + DataLabelPtr dataLabel = moveWithPatch(initialValue, ARMRegisters::S1); + store32(ARMRegisters::S1, address); + return dataLabel; + } + + DataLabelPtr storePtrWithPatch(ImplicitAddress address) + { + return storePtrWithPatch(ImmPtr(0), address); + } + + + bool supportsFloatingPoint() const + { + return s_isVFPPresent; + } + + bool supportsFloatingPointTruncate() const + { + return true; + } + + bool supportsFloatingPointSqrt() const + { + return s_isVFPPresent; + } + + void moveDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.fcpyd_r(dest, src); + } + + void loadDouble(ImplicitAddress address, FPRegisterID dest) + { + + m_assembler.doubleTransfer(true, dest, address.base, address.offset); + } + + void loadDouble(BaseIndex address, FPRegisterID dest) + { + m_assembler.baseIndexFloatTransfer(true, true, dest, + address.base, address.index, + address.scale, address.offset); + } + + DataLabelPtr loadDouble(const void* address, FPRegisterID dest) + { + DataLabelPtr label = moveWithPatch(ImmPtr(address), ARMRegisters::S0); + m_assembler.doubleTransfer(true, dest, ARMRegisters::S0, 0); + return label; + } + + void fastLoadDouble(RegisterID lo, RegisterID hi, FPRegisterID fpReg) { + m_assembler.vmov64(false, true, lo, hi, fpReg); + } + + void loadFloat(ImplicitAddress address, FPRegisterID dest) + { + + dest = (FPRegisterID) (dest * 2); + do { } while(0); + m_assembler.floatTransfer(true, dest, address.base, address.offset); + m_assembler.vcvt(m_assembler.FloatReg32, m_assembler.FloatReg64, (FPRegisterID)(dest*2), dest); + } + void loadFloat(BaseIndex address, FPRegisterID dest) + { + m_assembler.baseIndexFloatTransfer(true, false, (FPRegisterID)(dest*2), + address.base, address.index, + address.scale, address.offset); + m_assembler.vcvt(m_assembler.FloatReg32, m_assembler.FloatReg64, (FPRegisterID)(dest*2), dest); + } + + DataLabelPtr loadFloat(const void* address, FPRegisterID dest) + { + DataLabelPtr label = moveWithPatch(ImmPtr(address), ARMRegisters::S0); + m_assembler.fmem_imm_off(true, false, true, (FPRegisterID)(dest*2), ARMRegisters::S0, 0); + m_assembler.vcvt(m_assembler.FloatReg32, m_assembler.FloatReg64, (FPRegisterID)(dest*2), dest); + return label; + } + + void storeDouble(FPRegisterID src, ImplicitAddress address) + { + + m_assembler.doubleTransfer(false, src, address.base, address.offset); + } + + void storeDouble(FPRegisterID src, BaseIndex address) + { + m_assembler.baseIndexFloatTransfer(false, true, src, + address.base, address.index, + address.scale, address.offset); + } + + void storeDouble(ImmDouble imm, Address address) + { + store32(Imm32(imm.u.s.lsb), address); + store32(Imm32(imm.u.s.msb), Address(address.base, address.offset + 4)); + } + + void storeDouble(ImmDouble imm, BaseIndex address) + { + store32(Imm32(imm.u.s.lsb), address); + store32(Imm32(imm.u.s.msb), + BaseIndex(address.base, address.index, address.scale, address.offset + 4)); + } + void fastStoreDouble(FPRegisterID fpReg, RegisterID lo, RegisterID hi) { + m_assembler.vmov64(true, true, lo, hi, fpReg); + } + + void storeFloat(FPRegisterID src, ImplicitAddress address) + { + m_assembler.floatTransfer(false, src, address.base, address.offset); + } + + void storeFloat(FPRegisterID src, BaseIndex address) + { + m_assembler.baseIndexFloatTransfer(false, false, src, + address.base, address.index, + address.scale, address.offset); + } + void storeFloat(ImmDouble imm, Address address) + { + union { + float f; + uint32_t u32; + } u; + u.f = imm.u.d; + store32(Imm32(u.u32), address); + } + + void storeFloat(ImmDouble imm, BaseIndex address) + { + union { + float f; + uint32_t u32; + } u; + u.f = imm.u.d; + store32(Imm32(u.u32), address); + } + + void addDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.faddd_r(dest, dest, src); + } + + void addDouble(Address src, FPRegisterID dest) + { + loadDouble(src, ARMRegisters::SD0); + addDouble(ARMRegisters::SD0, dest); + } + + void divDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.fdivd_r(dest, dest, src); + } + + void divDouble(Address src, FPRegisterID dest) + { + __builtin_unreachable(); + loadDouble(src, ARMRegisters::SD0); + divDouble(ARMRegisters::SD0, dest); + } + + void subDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.fsubd_r(dest, dest, src); + } + + void subDouble(Address src, FPRegisterID dest) + { + loadDouble(src, ARMRegisters::SD0); + subDouble(ARMRegisters::SD0, dest); + } + + void mulDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.fmuld_r(dest, dest, src); + } + + void mulDouble(Address src, FPRegisterID dest) + { + loadDouble(src, ARMRegisters::SD0); + mulDouble(ARMRegisters::SD0, dest); + } + + void negDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.fnegd_r(dest, src); + } + + void absDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.fabsd_r(dest, src); + } + + void sqrtDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.fsqrtd_r(dest, src); + } + + void convertInt32ToDouble(RegisterID src, FPRegisterID dest) + { + m_assembler.fmsr_r(floatShadow(dest), src); + m_assembler.fsitod_r(dest, floatShadow(dest)); + } + + void convertUInt32ToDouble(RegisterID src, FPRegisterID dest) + { + m_assembler.fmsr_r(floatShadow(dest), src); + m_assembler.fuitod_r(dest, floatShadow(dest)); + } + + void convertInt32ToDouble(Address src, FPRegisterID dest) + { + + load32(src, ARMRegisters::S1); + convertInt32ToDouble(ARMRegisters::S1, dest); + } + + void convertInt32ToDouble(AbsoluteAddress src, FPRegisterID dest) + { + __builtin_unreachable(); + + m_assembler.ldr_un_imm(ARMRegisters::S1, (ARMWord)src.m_ptr); + m_assembler.dtr_u(true, ARMRegisters::S1, ARMRegisters::S1, 0); + convertInt32ToDouble(ARMRegisters::S1, dest); + } + + void convertDoubleToFloat(FPRegisterID src, FPRegisterID dest) + { + m_assembler.vcvt(m_assembler.FloatReg64, m_assembler.FloatReg32, src, dest); + } + + Jump branchDouble(DoubleCondition cond, FPRegisterID left, FPRegisterID right) + { + m_assembler.fcmpd_r(left, right); + m_assembler.fmstat(); + if (cond & DoubleConditionBitSpecial) + m_assembler.cmp_r(ARMRegisters::S0, ARMRegisters::S0, ARMAssembler::VS); + return Jump(m_assembler.jmp(static_cast(cond & ~DoubleConditionMask))); + } + + + + + Jump branchTruncateDoubleToInt32(FPRegisterID src, RegisterID dest) + { + m_assembler.ftosizd_r(floatShadow(ARMRegisters::SD0), src); + + + + m_assembler.fmrs_r(dest, floatShadow(ARMRegisters::SD0)); + m_assembler.cmn_r(dest, ARMAssembler::getOp2(-0x7fffffff)); + m_assembler.cmp_r(dest, ARMAssembler::getOp2(0x80000000), ARMCondition(NonZero)); + return Jump(m_assembler.jmp(ARMCondition(Zero))); + } + + + + + + void branchConvertDoubleToInt32(FPRegisterID src, RegisterID dest, JumpList& failureCases, FPRegisterID fpTemp) + { + m_assembler.ftosid_r(floatShadow(ARMRegisters::SD0), src); + m_assembler.fmrs_r(dest, floatShadow(ARMRegisters::SD0)); + + + m_assembler.fsitod_r(ARMRegisters::SD0, floatShadow(ARMRegisters::SD0)); + failureCases.append(branchDouble(DoubleNotEqualOrUnordered, src, ARMRegisters::SD0)); + + + failureCases.append(branchTest32(Zero, dest)); + } + + void zeroDouble(FPRegisterID srcDest) + { + m_assembler.mov_r(ARMRegisters::S0, ARMAssembler::getOp2(0)); + convertInt32ToDouble(ARMRegisters::S0, srcDest); + } + + void ensureSpace(int space) + { + m_assembler.ensureSpace(space); + } + + void forceFlushConstantPool() + { + m_assembler.forceFlushConstantPool(); + } + + int flushCount() + { + return m_assembler.flushCount(); + } + +protected: + ARMAssembler::Condition ARMCondition(Condition cond) + { + return static_cast(cond); + } + + void ensureSpace(int insnSpace, int constSpace) + { + m_assembler.ensureSpace(insnSpace, constSpace); + } + + int sizeOfConstantPool() + { + return m_assembler.sizeOfConstantPool(); + } +# 1460 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerARM.h" + void call32(RegisterID base, int32_t offset) + { + + if (base == ARMRegisters::sp) + offset += 4; +# 1480 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssemblerARM.h" + if (offset >= 0) { + if (offset <= 0xfff) { + m_assembler.dtr_u(true, ARMRegisters::S0, base, offset); + } else if (offset <= 0xfffff) { + m_assembler.add_r(ARMRegisters::S0, base, ARMAssembler::OP2_IMM | (offset >> 12) | (10 << 8)); + m_assembler.dtr_u(true, ARMRegisters::S0, ARMRegisters::S0, offset & 0xfff); + } else { + m_assembler.moveImm(offset, ARMRegisters::S0); + m_assembler.dtr_ur(true, ARMRegisters::S0, base, ARMRegisters::S0); + } + } else { + offset = -offset; + if (offset <= 0xfff) { + m_assembler.dtr_d(true, ARMRegisters::S0, base, offset); + } else if (offset <= 0xfffff) { + m_assembler.sub_r(ARMRegisters::S0, base, ARMAssembler::OP2_IMM | (offset >> 12) | (10 << 8)); + m_assembler.dtr_d(true, ARMRegisters::S0, ARMRegisters::S0, offset & 0xfff); + } else { + m_assembler.moveImm(offset, ARMRegisters::S0); + m_assembler.dtr_dr(true, ARMRegisters::S0, base, ARMRegisters::S0); + } + } + m_assembler.blx(ARMRegisters::S0); + } + + +private: + friend class LinkBuffer; + friend class RepatchBuffer; + + static void linkCall(void* code, Call call, FunctionPtr function) + { + ARMAssembler::linkCall(code, call.m_jmp, function.value()); + } + + static void repatchCall(CodeLocationCall call, CodeLocationLabel destination) + { + ARMAssembler::relinkCall(call.dataLocation(), destination.executableAddress()); + } + + static void repatchCall(CodeLocationCall call, FunctionPtr destination) + { + ARMAssembler::relinkCall(call.dataLocation(), destination.executableAddress()); + } + + static const bool s_isVFPPresent; +}; + +} +# 43 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssembler.h" 2 +namespace JSC { typedef MacroAssemblerARM MacroAssemblerBase; } +# 66 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssembler.h" +namespace JSC { + +class MacroAssembler : public MacroAssemblerBase { +public: + + using MacroAssemblerBase::pop; + using MacroAssemblerBase::jump; + using MacroAssemblerBase::branch32; + using MacroAssemblerBase::branch16; +# 83 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/assembler/assembler/MacroAssembler.h" + void pop() + { + addPtr(Imm32(sizeof(void*)), stackPointerRegister); + } + + void peek(RegisterID dest, int index = 0) + { + loadPtr(Address(stackPointerRegister, (index * sizeof(void*))), dest); + } + + void poke(RegisterID src, int index = 0) + { + storePtr(src, Address(stackPointerRegister, (index * sizeof(void*)))); + } + + void poke(TrustedImm32 value, int index = 0) + { + store32(value, Address(stackPointerRegister, (index * sizeof(void*)))); + } + + void poke(TrustedImmPtr imm, int index = 0) + { + storePtr(imm, Address(stackPointerRegister, (index * sizeof(void*)))); + } + + + + void branchPtr(Condition cond, RegisterID op1, ImmPtr imm, Label target) + { + branchPtr(cond, op1, imm).linkTo(target, this); + } + + void branch32(Condition cond, RegisterID op1, RegisterID op2, Label target) + { + branch32(cond, op1, op2).linkTo(target, this); + } + + void branch32(Condition cond, RegisterID op1, TrustedImm32 imm, Label target) + { + branch32(cond, op1, imm).linkTo(target, this); + } + + void branch32(Condition cond, RegisterID left, Address right, Label target) + { + branch32(cond, left, right).linkTo(target, this); + } + + void branch16(Condition cond, BaseIndex left, RegisterID right, Label target) + { + branch16(cond, left, right).linkTo(target, this); + } + + void branchTestPtr(Condition cond, RegisterID reg, Label target) + { + branchTestPtr(cond, reg).linkTo(target, this); + } + + void jump(Label target) + { + jump().linkTo(target, this); + } + + + + + + + void addPtr(RegisterID src, RegisterID dest) + { + add32(src, dest); + } + + void addPtr(Imm32 imm32, Address address) + { + add32(imm32, address); + } + + void addPtr(Imm32 imm, RegisterID srcDest) + { + add32(imm, srcDest); + } + + void addPtr(ImmPtr imm, RegisterID dest) + { + add32(Imm32(imm), dest); + } + + void addPtr(Imm32 imm, RegisterID src, RegisterID dest) + { + add32(imm, src, dest); + } + + void andPtr(RegisterID src, RegisterID dest) + { + and32(src, dest); + } + + void andPtr(Imm32 imm, RegisterID srcDest) + { + and32(imm, srcDest); + } + + void andPtr(ImmPtr ptr, RegisterID srcDest) + { + and32(Imm32(ptr), srcDest); + } + + void negPtr(RegisterID srcDest) + { + neg32(srcDest); + } + + void notPtr(RegisterID srcDest) + { + not32(srcDest); + } + + void orPtr(RegisterID src, RegisterID dest) + { + or32(src, dest); + } + + void orPtr(ImmPtr imm, RegisterID dest) + { + or32(Imm32(imm), dest); + } + + void orPtr(Imm32 imm, RegisterID dest) + { + or32(imm, dest); + } + + void subPtr(RegisterID src, RegisterID dest) + { + sub32(src, dest); + } + + void subPtr(Imm32 imm, RegisterID dest) + { + sub32(imm, dest); + } + + void subPtr(ImmPtr imm, RegisterID dest) + { + sub32(Imm32(imm), dest); + } + + void subPtr(ImmPtr imm, Address address) + { + sub32(Imm32(imm), address); + } + + void xorPtr(RegisterID src, RegisterID dest) + { + xor32(src, dest); + } + + void xorPtr(Imm32 imm, RegisterID srcDest) + { + xor32(imm, srcDest); + } + + + void loadPtr(ImplicitAddress address, RegisterID dest) + { + load32(address, dest); + } + + void loadPtr(BaseIndex address, RegisterID dest) + { + load32(address, dest); + } + + void loadPtr(void* address, RegisterID dest) + { + load32(address, dest); + } + + DataLabel32 loadPtrWithAddressOffsetPatch(Address address, RegisterID dest) + { + return load32WithAddressOffsetPatch(address, dest); + } + + void setPtr(Condition cond, RegisterID left, Imm32 right, RegisterID dest) + { + set32(cond, left, right, dest); + } + + void storePtr(RegisterID src, ImplicitAddress address) + { + store32(src, address); + } + + void storePtr(RegisterID src, void* address) + { + store32(src, address); + } + + void storePtr(TrustedImmPtr imm, ImplicitAddress address) + { + store32(Imm32(imm), address); + } + + void storePtr(TrustedImmPtr imm, BaseIndex address) + { + store32(Imm32(imm), address); + } + + void storePtr(TrustedImmPtr imm, void* address) + { + store32(Imm32(imm), address); + } + + DataLabel32 storePtrWithAddressOffsetPatch(RegisterID src, Address address) + { + return store32WithAddressOffsetPatch(src, address); + } + + + Jump branchPtr(Condition cond, RegisterID left, RegisterID right) + { + return branch32(cond, left, right); + } + + Jump branchPtr(Condition cond, RegisterID left, ImmPtr right) + { + return branch32(cond, left, Imm32(right)); + } + + Jump branchPtr(Condition cond, RegisterID left, Imm32 right) + { + return branch32(cond, left, right); + } + + Jump branchPtr(Condition cond, RegisterID left, Address right) + { + return branch32(cond, left, right); + } + + Jump branchPtr(Condition cond, Address left, RegisterID right) + { + return branch32(cond, left, right); + } + + Jump branchPtr(Condition cond, AbsoluteAddress left, RegisterID right) + { + return branch32(cond, left, right); + } + + Jump branchPtr(Condition cond, Address left, ImmPtr right) + { + return branch32(cond, left, Imm32(right)); + } + + Jump branchPtr(Condition cond, AbsoluteAddress left, ImmPtr right, RegisterID scratch) + { + return branch32(cond, left, Imm32(right)); + } + + Jump branchTestPtr(Condition cond, RegisterID reg, RegisterID mask) + { + return branchTest32(cond, reg, mask); + } + + Jump branchTestPtr(Condition cond, RegisterID reg, Imm32 mask = Imm32(-1)) + { + return branchTest32(cond, reg, mask); + } + + Jump branchTestPtr(Condition cond, Address address, Imm32 mask = Imm32(-1)) + { + return branchTest32(cond, address, mask); + } + + Jump branchTestPtr(Condition cond, BaseIndex address, Imm32 mask = Imm32(-1)) + { + return branchTest32(cond, address, mask); + } + + + Jump branchAddPtr(Condition cond, RegisterID src, RegisterID dest) + { + return branchAdd32(cond, src, dest); + } + + Jump branchSubPtr(Condition cond, Imm32 imm, RegisterID dest) + { + return branchSub32(cond, imm, dest); + } + + using MacroAssemblerBase::branchTest8; + Jump branchTest8(Condition cond, ExtendedAddress address, Imm32 mask = Imm32(-1)) + { + return MacroAssemblerBase::branchTest8(cond, Address(address.base, address.offset), mask); + } + + void rshiftPtr(Imm32 imm, RegisterID dest) + { + rshift32(imm, dest); + } + + void lshiftPtr(Imm32 imm, RegisterID dest) + { + lshift32(imm, dest); + } + + +}; + +} +# 38 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrJIT.h" 2 + + + + + +#define YARR_CALL + + +namespace JSC { + +class JSGlobalData; +class ExecutablePool; + +namespace Yarr { + +class YarrCodeBlock { + typedef int (*YarrJITCode)(const UChar* input, unsigned start, unsigned length, int* output) ; + +public: + YarrCodeBlock() + : m_needFallBack(false) + { + } + + ~YarrCodeBlock() + { + } + + void setFallBack(bool fallback) { m_needFallBack = fallback; } + bool isFallBack() { return m_needFallBack; } + void set(MacroAssembler::CodeRef ref) { m_ref = ref; } + + int execute(const UChar* input, unsigned start, unsigned length, int* output) + { + return __extension__((reinterpret_cast(m_ref.m_code.executableAddress()))(input, start, length, output)); + } + + + + + + void release() { m_ref.release(); } + +private: + MacroAssembler::CodeRef m_ref; + bool m_needFallBack; +}; + +void jitCompile(YarrPattern&, JSGlobalData*, YarrCodeBlock& jitObject); +int execute(YarrCodeBlock& jitObject, const UChar* input, unsigned start, unsigned length, int* output); + +} } +# 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrSyntaxChecker.h" 1 +# 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrSyntaxChecker.h" +#define YarrSyntaxChecker_h + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" 1 +# 31 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" +#define YarrParser_h + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/Yarr.h" 1 +# 34 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" 2 + +namespace JSC { namespace Yarr { + +#define REGEXP_ERROR_PREFIX "Invalid regular expression: " + +enum BuiltInCharacterClassID { + DigitClassID, + SpaceClassID, + WordClassID, + NewlineClassID +}; + + +template +class Parser { +private: + template + friend ErrorCode parse(FriendDelegate& delegate, const UString& pattern, unsigned backReferenceLimit); +# 62 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" + class CharacterClassParserDelegate { + public: + CharacterClassParserDelegate(Delegate& delegate, ErrorCode& err) + : m_delegate(delegate) + , m_err(err) + , m_state(Empty) + , m_character(0) + { + } + + + + + + + void begin(bool invert) + { + m_delegate.atomCharacterClassBegin(invert); + } +# 91 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" + void atomPatternCharacter(UChar ch, bool hyphenIsRange = false) + { + switch (m_state) { + case AfterCharacterClass: + + + + + + + + if (hyphenIsRange && ch == '-') { + m_delegate.atomCharacterClassAtom('-'); + m_state = AfterCharacterClassHyphen; + return; + } + + + case Empty: + m_character = ch; + m_state = CachedCharacter; + return; + + case CachedCharacter: + if (hyphenIsRange && ch == '-') + m_state = CachedCharacterHyphen; + else { + m_delegate.atomCharacterClassAtom(m_character); + m_character = ch; + } + return; + + case CachedCharacterHyphen: + if (ch < m_character) { + m_err = CharacterClassOutOfOrder; + return; + } + m_delegate.atomCharacterClassRange(m_character, ch); + m_state = Empty; + return; + + case AfterCharacterClassHyphen: + m_delegate.atomCharacterClassAtom(ch); + m_state = Empty; + return; + } + } + + + + + + + void atomBuiltInCharacterClass(BuiltInCharacterClassID classID, bool invert) + { + switch (m_state) { + case CachedCharacter: + + m_delegate.atomCharacterClassAtom(m_character); + + case Empty: + case AfterCharacterClass: + m_state = AfterCharacterClass; + m_delegate.atomCharacterClassBuiltIn(classID, invert); + return; + + case CachedCharacterHyphen: + + + m_err = CharacterClassInvalidRange; + return; + + case AfterCharacterClassHyphen: + m_delegate.atomCharacterClassBuiltIn(classID, invert); + m_state = Empty; + return; + } + } + + + + + + + void end() + { + if (m_state == CachedCharacter) + m_delegate.atomCharacterClassAtom(m_character); + else if (m_state == CachedCharacterHyphen) { + m_delegate.atomCharacterClassAtom(m_character); + m_delegate.atomCharacterClassAtom('-'); + } + m_delegate.atomCharacterClassEnd(); + } + + + + void assertionWordBoundary(bool) { __builtin_unreachable(); } + void atomBackReference(unsigned) { __builtin_unreachable(); } + + private: + Delegate& m_delegate; + ErrorCode& m_err; + enum CharacterClassConstructionState { + Empty, + CachedCharacter, + CachedCharacterHyphen, + AfterCharacterClass, + AfterCharacterClassHyphen + } m_state; + UChar m_character; + }; + + Parser(Delegate& delegate, const UString& pattern, unsigned backReferenceLimit) + : m_delegate(delegate) + , m_backReferenceLimit(backReferenceLimit) + , m_err(NoError) + , m_data(pattern.chars()) + , m_size(pattern.length()) + , m_index(0) + , m_parenthesesNestingDepth(0) + { + } +# 235 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" + template + bool parseEscape(EscapeDelegate& delegate) + { + do { } while(0); + do { } while(0); + consume(); + + if (atEndOfPattern()) { + m_err = EscapeUnterminated; + return false; + } + + switch (peek()) { + + case 'b': + consume(); + if (inCharacterClass) + delegate.atomPatternCharacter('\b'); + else { + delegate.assertionWordBoundary(false); + return false; + } + break; + case 'B': + consume(); + if (inCharacterClass) + delegate.atomPatternCharacter('B'); + else { + delegate.assertionWordBoundary(true); + return false; + } + break; + + + case 'd': + consume(); + delegate.atomBuiltInCharacterClass(DigitClassID, false); + break; + case 's': + consume(); + delegate.atomBuiltInCharacterClass(SpaceClassID, false); + break; + case 'w': + consume(); + delegate.atomBuiltInCharacterClass(WordClassID, false); + break; + case 'D': + consume(); + delegate.atomBuiltInCharacterClass(DigitClassID, true); + break; + case 'S': + consume(); + delegate.atomBuiltInCharacterClass(SpaceClassID, true); + break; + case 'W': + consume(); + delegate.atomBuiltInCharacterClass(WordClassID, true); + break; + + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': { + + + if (!inCharacterClass) { + ParseState state = saveState(); + + unsigned backReference; + if (!consumeNumber(backReference)) + break; + if (backReference <= m_backReferenceLimit) { + delegate.atomBackReference(backReference); + break; + } + + restoreState(state); + } + + + if (peek() >= '8') { + delegate.atomPatternCharacter('\\'); + break; + } + + + } + + + case '0': + delegate.atomPatternCharacter(consumeOctal()); + break; + + + case 'f': + consume(); + delegate.atomPatternCharacter('\f'); + break; + case 'n': + consume(); + delegate.atomPatternCharacter('\n'); + break; + case 'r': + consume(); + delegate.atomPatternCharacter('\r'); + break; + case 't': + consume(); + delegate.atomPatternCharacter('\t'); + break; + case 'v': + consume(); + delegate.atomPatternCharacter('\v'); + break; + + + case 'c': { + ParseState state = saveState(); + consume(); + if (!atEndOfPattern()) { + int control = consume(); + + + if (inCharacterClass ? WTF::isASCIIAlphanumeric(control) || (control == '_') : WTF::isASCIIAlpha(control)) { + delegate.atomPatternCharacter(control & 0x1f); + break; + } + } + restoreState(state); + delegate.atomPatternCharacter('\\'); + break; + } + + + case 'x': { + consume(); + int x = tryConsumeHex(2); + if (x == -1) + delegate.atomPatternCharacter('x'); + else + delegate.atomPatternCharacter(x); + break; + } + + + case 'u': { + consume(); + int u = tryConsumeHex(4); + if (u == -1) + delegate.atomPatternCharacter('u'); + else + delegate.atomPatternCharacter(u); + break; + } + + + default: + delegate.atomPatternCharacter(consume()); + } + + return true; + } + + + + + + + bool parseAtomEscape() + { + return parseEscape(m_delegate); + } + void parseCharacterClassEscape(CharacterClassParserDelegate& delegate) + { + parseEscape(delegate); + } +# 425 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" + void parseCharacterClass() + { + do { } while(0); + do { } while(0); + consume(); + + CharacterClassParserDelegate characterClassConstructor(m_delegate, m_err); + + characterClassConstructor.begin(tryConsume('^')); + + while (!atEndOfPattern()) { + switch (peek()) { + case ']': + consume(); + characterClassConstructor.end(); + return; + + case '\\': + parseCharacterClassEscape(characterClassConstructor); + break; + + default: + characterClassConstructor.atomPatternCharacter(consume(), true); + } + + if (m_err) + return; + } + + m_err = CharacterClassUnmatched; + } + + + + + + + void parseParenthesesBegin() + { + do { } while(0); + do { } while(0); + consume(); + + if (tryConsume('?')) { + if (atEndOfPattern()) { + m_err = ParenthesesTypeInvalid; + return; + } + + switch (consume()) { + case ':': + m_delegate.atomParenthesesSubpatternBegin(false); + break; + + case '=': + m_delegate.atomParentheticalAssertionBegin(); + break; + + case '!': + m_delegate.atomParentheticalAssertionBegin(true); + break; + + default: + m_err = ParenthesesTypeInvalid; + } + } else + m_delegate.atomParenthesesSubpatternBegin(); + + ++m_parenthesesNestingDepth; + } + + + + + + + void parseParenthesesEnd() + { + do { } while(0); + do { } while(0); + consume(); + + if (m_parenthesesNestingDepth > 0) + m_delegate.atomParenthesesEnd(); + else + m_err = ParenthesesUnmatched; + + --m_parenthesesNestingDepth; + } + + + + + + + void parseQuantifier(bool lastTokenWasAnAtom, unsigned min, unsigned max) + { + do { } while(0); + do { } while(0); + + if (min == unsigned(-1)) { + m_err = QuantifierTooLarge; + return; + } + + if (lastTokenWasAnAtom) + m_delegate.quantifyAtom(min, max, !tryConsume('?')); + else + m_err = QuantifierWithoutAtom; + } +# 545 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" + void parseTokens() + { + bool lastTokenWasAnAtom = false; + + while (!atEndOfPattern()) { + switch (peek()) { + case '|': + consume(); + m_delegate.disjunction(); + lastTokenWasAnAtom = false; + break; + + case '(': + parseParenthesesBegin(); + lastTokenWasAnAtom = false; + break; + + case ')': + parseParenthesesEnd(); + lastTokenWasAnAtom = true; + break; + + case '^': + consume(); + m_delegate.assertionBOL(); + lastTokenWasAnAtom = false; + break; + + case '$': + consume(); + m_delegate.assertionEOL(); + lastTokenWasAnAtom = false; + break; + + case '.': + consume(); + m_delegate.atomBuiltInCharacterClass(NewlineClassID, true); + lastTokenWasAnAtom = true; + break; + + case '[': + parseCharacterClass(); + lastTokenWasAnAtom = true; + break; + + case '\\': + lastTokenWasAnAtom = parseAtomEscape(); + break; + + case '*': + consume(); + parseQuantifier(lastTokenWasAnAtom, 0, quantifyInfinite); + lastTokenWasAnAtom = false; + break; + + case '+': + consume(); + parseQuantifier(lastTokenWasAnAtom, 1, quantifyInfinite); + lastTokenWasAnAtom = false; + break; + + case '?': + consume(); + parseQuantifier(lastTokenWasAnAtom, 0, 1); + lastTokenWasAnAtom = false; + break; + + case '{': { + ParseState state = saveState(); + + consume(); + if (peekIsDigit()) { + unsigned min; + if (!consumeNumber(min)) + break; + unsigned max = min; + + if (tryConsume(',')) { + if (peekIsDigit()) { + if (!consumeNumber(max)) + break; + } else { + max = quantifyInfinite; + } + } + + if (tryConsume('}')) { + if (min <= max) + parseQuantifier(lastTokenWasAnAtom, min, max); + else + m_err = QuantifierOutOfOrder; + lastTokenWasAnAtom = false; + break; + } + } + + restoreState(state); + } + + default: + m_delegate.atomPatternCharacter(consume()); + lastTokenWasAnAtom = true; + } + + if (m_err) + return; + } + + if (m_parenthesesNestingDepth > 0) + m_err = MissingParentheses; + } + + + + + + + + ErrorCode parse() + { + if (m_size > MAX_PATTERN_SIZE) + m_err = PatternTooLarge; + else + parseTokens(); + do { } while(0); + + return m_err; + } + + + + + typedef unsigned ParseState; + + ParseState saveState() + { + return m_index; + } + + void restoreState(ParseState state) + { + m_index = state; + } + + bool atEndOfPattern() + { + do { } while(0); + return m_index == m_size; + } + + int peek() + { + do { } while(0); + return m_data[m_index]; + } + + bool peekIsDigit() + { + return !atEndOfPattern() && WTF::isASCIIDigit(peek()); + } + + unsigned peekDigit() + { + do { } while(0); + return peek() - '0'; + } + + int consume() + { + do { } while(0); + return m_data[m_index++]; + } + + unsigned consumeDigit() + { + do { } while(0); + return consume() - '0'; + } + + bool consumeNumber(unsigned &accum) + { + accum = consumeDigit(); + while (peekIsDigit()) { + unsigned newValue = accum * 10 + peekDigit(); + if (newValue < accum) { + m_err = QuantifierTooLarge; + return false; + } + accum = newValue; + consume(); + } + return true; + } + + unsigned consumeOctal() + { + do { } while(0); + + unsigned n = consumeDigit(); + while (n < 32 && !atEndOfPattern() && WTF::isASCIIOctalDigit(peek())) + n = n * 8 + consumeDigit(); + return n; + } + + bool tryConsume(UChar ch) + { + if (atEndOfPattern() || (m_data[m_index] != ch)) + return false; + ++m_index; + return true; + } + + int tryConsumeHex(int count) + { + ParseState state = saveState(); + + int n = 0; + while (count--) { + if (atEndOfPattern() || !WTF::isASCIIHexDigit(peek())) { + restoreState(state); + return -1; + } + n = (n << 4) | WTF::toASCIIHexValue(consume()); + } + return n; + } + + Delegate& m_delegate; + unsigned m_backReferenceLimit; + ErrorCode m_err; + const UChar* m_data; + unsigned m_size; + unsigned m_index; + unsigned m_parenthesesNestingDepth; + + + static const unsigned MAX_PATTERN_SIZE = 1024 * 1024; +}; +# 843 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrParser.h" +template +ErrorCode parse(Delegate& delegate, const UString& pattern, unsigned backReferenceLimit = quantifyInfinite) +{ + return Parser(delegate, pattern, backReferenceLimit).parse(); +} + +} } +# 35 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/yarr/YarrSyntaxChecker.h" 2 + +namespace JSC { namespace Yarr { + +ErrorCode checkSyntax(const UString& pattern); + +}} +# 24 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" 2 +# 45 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" +namespace js { + +enum RegExpRunStatus +{ + RegExpRunStatus_Error, + RegExpRunStatus_Success, + RegExpRunStatus_Success_NotFound +}; + +class RegExpObjectBuilder +{ + JSContext *cx; + Rooted reobj_; + + bool getOrCreate(); + bool getOrCreateClone(RegExpObject *proto); + + public: + RegExpObjectBuilder(JSContext *cx, RegExpObject *reobj = __null); + + RegExpObject *reobj() { return reobj_; } + + RegExpObject *build(HandleAtom source, RegExpFlag flags); + RegExpObject *build(HandleAtom source, RegExpShared &shared); + + + RegExpObject *clone(Handle other, Handle proto); +}; + +JSObject * +CloneRegExpObject(JSContext *cx, JSObject *obj, JSObject *proto); + +namespace detail { + +class RegExpCode +{ + typedef JSC::Yarr::BytecodePattern BytecodePattern; + typedef JSC::Yarr::ErrorCode ErrorCode; + typedef JSC::Yarr::YarrPattern YarrPattern; + + typedef JSC::Yarr::JSGlobalData JSGlobalData; + typedef JSC::Yarr::YarrCodeBlock YarrCodeBlock; + + + YarrCodeBlock codeBlock; + + BytecodePattern *byteCode; + + public: + RegExpCode() + : + + codeBlock(), + + byteCode(__null) + { } + + ~RegExpCode() { + + codeBlock.release(); + + if (byteCode) + Foreground::delete_(byteCode); + } + + static bool checkSyntax(JSContext *cx, TokenStream *tokenStream, JSLinearString *source) { + ErrorCode error = JSC::Yarr::checkSyntax(*source); + if (error == JSC::Yarr::NoError) + return true; + + reportYarrError(cx, tokenStream, error); + return false; + } + + + static inline bool isJITRuntimeEnabled(JSContext *cx); + + static void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error); + + static size_t getOutputSize(size_t pairCount) { + return pairCount * 2; + } + + bool compile(JSContext *cx, JSLinearString &pattern, unsigned *parenCount, RegExpFlag flags); + + + RegExpRunStatus + execute(JSContext *cx, const jschar *chars, size_t length, size_t start, + int *output, size_t outputCount); +}; + +} +# 161 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" +class RegExpShared +{ + friend class RegExpCompartment; + friend class RegExpGuard; + + detail::RegExpCode code; + unsigned parenCount; + RegExpFlag flags; + size_t activeUseCount; + uint64_t gcNumberWhenUsed; + + bool compile(JSContext *cx, JSAtom *source); + + RegExpShared(JSRuntime *rt, RegExpFlag flags); + friend class js::OffTheBooks; friend class js::Foreground; friend class js::UnwantedForeground; friend struct ::JSContext; friend struct ::JSRuntime; + + public: + + + inline void prepareForUse(JSContext *cx); + + + + RegExpRunStatus + execute(JSContext *cx, const jschar *chars, size_t length, size_t *lastIndex, + MatchPairs **output); + + + + size_t getParenCount() const { return parenCount; } + void incRef() { activeUseCount++; } + void decRef() { do { } while(0); activeUseCount--; } + + + size_t pairCount() const { return parenCount + 1; } + + RegExpFlag getFlags() const { return flags; } + bool ignoreCase() const { return flags & IgnoreCaseFlag; } + bool global() const { return flags & GlobalFlag; } + bool multiline() const { return flags & MultilineFlag; } + bool sticky() const { return flags & StickyFlag; } +}; + + + + + +class RegExpGuard +{ + RegExpShared *re_; + RegExpGuard(const RegExpGuard &) ; + void operator=(const RegExpGuard &) ; + public: + RegExpGuard() : re_(__null) {} + RegExpGuard(RegExpShared &re) : re_(&re) { + re_->incRef(); + } + void init(RegExpShared &re) { + do { } while(0); + re_ = &re; + re_->incRef(); + } + ~RegExpGuard() { + if (re_) + re_->decRef(); + } + bool initialized() const { return !!re_; } + RegExpShared *re() const { do { } while(0); return re_; } + RegExpShared *operator->() { return re(); } + RegExpShared &operator*() { return *re(); } +}; + +class RegExpCompartment +{ + enum Type { Normal = 0x0, Hack = 0x1 }; + + struct Key { + JSAtom *atom; + uint16_t flag; + uint16_t type; + Key() {} + Key(JSAtom *atom, RegExpFlag flag, Type type) + : atom(atom), flag(flag), type(type) {} + typedef Key Lookup; + static HashNumber hash(const Lookup &l) { + return DefaultHasher::hash(l.atom) ^ (l.flag << 1) ^ l.type; + } + static bool match(Key l, Key r) { + return l.atom == r.atom && l.flag == r.flag && l.type == r.type; + } + }; + + typedef HashMap Map; + Map map_; + + bool get(JSContext *cx, JSAtom *key, JSAtom *source, RegExpFlag flags, Type type, + RegExpGuard *g); + + public: + RegExpCompartment(JSRuntime *rt); + ~RegExpCompartment(); + + bool init(JSContext *cx); + void sweep(JSRuntime *rt); + + + bool get(JSContext *cx, JSAtom *source, RegExpFlag flags, RegExpGuard *g); + + + bool get(JSContext *cx, JSAtom *source, JSString *maybeOpt, RegExpGuard *g); +# 283 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" + bool getHack(JSContext *cx, JSAtom *source, JSAtom *hackedSource, RegExpFlag flags, + RegExpGuard *g); + + + + + + + bool lookupHack(JSAtom *source, RegExpFlag flags, JSContext *cx, RegExpGuard *g); +}; + +class RegExpObject : public JSObject +{ + typedef detail::RegExpCode RegExpCode; + + static const unsigned LAST_INDEX_SLOT = 0; + static const unsigned SOURCE_SLOT = 1; + static const unsigned GLOBAL_FLAG_SLOT = 2; + static const unsigned IGNORE_CASE_FLAG_SLOT = 3; + static const unsigned MULTILINE_FLAG_SLOT = 4; + static const unsigned STICKY_FLAG_SLOT = 5; + + public: + static const unsigned RESERVED_SLOTS = 6; + + + + + + + static RegExpObject * + create(JSContext *cx, RegExpStatics *res, const jschar *chars, size_t length, + RegExpFlag flags, TokenStream *ts); + + static RegExpObject * + createNoStatics(JSContext *cx, const jschar *chars, size_t length, RegExpFlag flags, + TokenStream *ts); + + static RegExpObject * + createNoStatics(JSContext *cx, HandleAtom atom, RegExpFlag flags, TokenStream *ts); +# 335 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" + RegExpRunStatus + execute(JSContext *cx, const jschar *chars, size_t length, size_t *lastIndex, + MatchPairs **output); + + + + const Value &getLastIndex() const { + return getSlot(LAST_INDEX_SLOT); + } + inline void setLastIndex(const Value &v); + inline void setLastIndex(double d); + inline void zeroLastIndex(); + + JSFlatString *toString(JSContext *cx) const; + + JSAtom *getSource() const { + return &getSlot(SOURCE_SLOT).toString()->asAtom(); + } + inline void setSource(JSAtom *source); + + RegExpFlag getFlags() const { + unsigned flags = 0; + flags |= global() ? GlobalFlag : 0; + flags |= ignoreCase() ? IgnoreCaseFlag : 0; + flags |= multiline() ? MultilineFlag : 0; + flags |= sticky() ? StickyFlag : 0; + return RegExpFlag(flags); + } + + + + inline void setIgnoreCase(bool enabled); + inline void setGlobal(bool enabled); + inline void setMultiline(bool enabled); + inline void setSticky(bool enabled); + bool ignoreCase() const { return getSlot(IGNORE_CASE_FLAG_SLOT).toBoolean(); } + bool global() const { return getSlot(GLOBAL_FLAG_SLOT).toBoolean(); } + bool multiline() const { return getSlot(MULTILINE_FLAG_SLOT).toBoolean(); } + bool sticky() const { return getSlot(STICKY_FLAG_SLOT).toBoolean(); } + + inline void shared(RegExpGuard *g) const; + inline bool getShared(JSContext *cx, RegExpGuard *g); + inline void setShared(JSContext *cx, RegExpShared &shared); + + private: + friend class RegExpObjectBuilder; + + + + + + + Shape *assignInitialShape(JSContext *cx); + + inline bool init(JSContext *cx, HandleAtom source, RegExpFlag flags); + + + + + + bool createShared(JSContext *cx, RegExpGuard *g); + RegExpShared *maybeShared() const; + + + void setPrivate(void *priv) ; +}; + + + + + + + +bool +ParseRegExpFlags(JSContext *cx, JSString *flagStr, RegExpFlag *flagsOut); +# 419 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpObject.h" +inline bool +RegExpToShared(JSContext *cx, JSObject &obj, RegExpGuard *g); + +template +bool +XDRScriptRegExpObject(XDRState *xdr, HeapPtrObject *objp); + +extern JSObject * +CloneScriptRegExpObject(JSContext *cx, RegExpObject &re); + +} +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscompartment.h" 2 + +namespace js { + + +extern Class dummy_class; +# 32 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscompartment.h" +class DtoaCache { + double d; + int base; + JSFixedString *s; + public: + DtoaCache() : s(__null) {} + void purge() { s = __null; } + + JSFixedString *lookup(int base, double d) { + return this->s && base == this->base && d == this->d ? this->s : __null; + } + + void cache(int base, double d, JSFixedString *s) { + this->base = base; + this->d = d; + this->s = s; + } + +}; + + +typedef int moz_static_assert103[(sizeof(HashNumber) == 4) ? 1 : -1]; + +struct WrapperHasher +{ + typedef Value Lookup; + + static HashNumber hash(Value key) { + do { } while(0); + uint64_t bits = JSVAL_TO_IMPL(key).asBits; + return uint32_t(bits) ^ uint32_t(bits >> 32); + } + + static bool match(const Value &l, const Value &k) { return l == k; } +}; + +typedef HashMap WrapperMap; + +} + +namespace JS { +struct TypeInferenceSizes; +} + +namespace js { +class AutoDebugModeGC; +} + +struct JSCompartment +{ + JSRuntime *rt; + JSPrincipals *principals; + + js::gc::ArenaLists arenas; + + private: + bool needsBarrier_; + public: + + bool needsBarrier() const { + return needsBarrier_; + } + + void setNeedsBarrier(bool needs); + + js::GCMarker *barrierTracer() { + do { } while(0); + return &rt->gcMarker; + } + + private: + enum CompartmentGCState { + NoGCScheduled, + GCScheduled, + GCRunning + }; + + CompartmentGCState gcState; + bool gcPreserveCode; + + public: + bool isCollecting() const { + + if (rt->gcRunning) { + return gcState == GCRunning; + } else { + do { } while(0); + return needsBarrier(); + } + } + + bool isPreservingCode() const { + return gcPreserveCode; + } + + + + + + bool requireGCTracer() const { + return gcState == GCRunning; + } + + void setCollecting(bool collecting) { + do { } while(0); + if (collecting) + gcState = GCRunning; + else + gcState = NoGCScheduled; + } + + void scheduleGC() { + do { } while(0); + do { } while(0); + gcState = GCScheduled; + } + + void unscheduleGC() { + do { } while(0); + do { } while(0); + gcState = NoGCScheduled; + } + + bool isGCScheduled() const { + return gcState == GCScheduled; + } + + void setPreservingCode(bool preserving) { + gcPreserveCode = preserving; + } + + size_t gcBytes; + size_t gcTriggerBytes; + size_t gcMaxMallocBytes; + + bool hold; + bool isSystemCompartment; + + int64_t lastCodeRelease; + + + + + + + static const size_t TYPE_LIFO_ALLOC_PRIMARY_CHUNK_SIZE = 128 * 1024; + js::LifoAlloc typeLifoAlloc; + bool activeAnalysis; + bool activeInference; + + + js::types::TypeCompartment types; + + void *data; + bool active; + js::WrapperMap crossCompartmentWrappers; + + + int64_t lastAnimationTime; + + js::RegExpCompartment regExps; + + size_t sizeOfShapeTable(JSMallocSizeOfFun mallocSizeOf); + void sizeOfTypeInferenceData(JS::TypeInferenceSizes *stats, JSMallocSizeOfFun mallocSizeOf); + + + + + js::PropertyTree propertyTree; + + + js::BaseShapeSet baseShapes; + void sweepBaseShapeTable(); + + + js::InitialShapeSet initialShapes; + void sweepInitialShapeTable(); + + + js::types::TypeObjectSet newTypeObjects; + js::types::TypeObjectSet lazyTypeObjects; + void sweepNewTypeObjectTable(js::types::TypeObjectSet &table); + + js::ReadBarriered emptyTypeObject; + + + inline js::types::TypeObject *getEmptyType(JSContext *cx); + + js::types::TypeObject *getLazyType(JSContext *cx, JSObject *proto); + + + + + + + + size_t gcMallocAndFreeBytes; + size_t gcTriggerMallocAndFreeBytes; + + private: + + + + + + ptrdiff_t gcMallocBytes; + + enum { DebugFromC = 1, DebugFromJS = 2 }; + + unsigned debugModeBits; + + public: + JSCompartment(JSRuntime *rt); + ~JSCompartment(); + + bool init(JSContext *cx); + + + void markCrossCompartmentWrappers(JSTracer *trc); + + bool wrap(JSContext *cx, js::Value *vp); + bool wrap(JSContext *cx, JSString **strp); + bool wrap(JSContext *cx, js::HeapPtrString *strp); + bool wrap(JSContext *cx, JSObject **objp); + bool wrapId(JSContext *cx, jsid *idp); + bool wrap(JSContext *cx, js::PropertyOp *op); + bool wrap(JSContext *cx, js::StrictPropertyOp *op); + bool wrap(JSContext *cx, js::PropertyDescriptor *desc); + bool wrap(JSContext *cx, js::AutoIdVector &props); + + void markTypes(JSTracer *trc); + void discardJitCode(js::FreeOp *fop); + void sweep(js::FreeOp *fop, bool releaseTypes); + void sweepCrossCompartmentWrappers(); + void purge(); + + void setGCLastBytes(size_t lastBytes, size_t lastMallocBytes, js::JSGCInvocationKind gckind); + void reduceGCTriggerBytes(size_t amount); + + void resetGCMallocBytes(); + void setGCMaxMallocBytes(size_t value); + void updateMallocCounter(size_t nbytes) { + ptrdiff_t oldCount = gcMallocBytes; + ptrdiff_t newCount = oldCount - ptrdiff_t(nbytes); + gcMallocBytes = newCount; + if ((__builtin_expect((newCount <= 0 && oldCount > 0), 0))) + onTooMuchMalloc(); + } + + bool isTooMuchMalloc() const { + return gcMallocBytes <= 0; + } + + void onTooMuchMalloc(); + + void mallocInCompartment(size_t nbytes) { + gcMallocAndFreeBytes += nbytes; + } + + void freeInCompartment(size_t nbytes) { + do { } while(0); + gcMallocAndFreeBytes -= nbytes; + } + + js::DtoaCache dtoaCache; + + private: + + + + + js::GlobalObjectSet debuggees; + + private: + JSCompartment *thisForCtor() { return this; } + + public: + + + + + + + + bool debugMode() const { return !!debugModeBits; } + + + bool hasScriptsOnStack(); + + private: + + void updateForDebugMode(js::FreeOp *fop, js::AutoDebugModeGC &dmgc); + + public: + js::GlobalObjectSet &getDebuggees() { return debuggees; } + bool addDebuggee(JSContext *cx, js::GlobalObject *global); + void removeDebuggee(js::FreeOp *fop, js::GlobalObject *global, + js::GlobalObjectSet::Enum *debuggeesEnum = __null); + bool setDebugModeFromC(JSContext *cx, bool b, js::AutoDebugModeGC &dmgc); + + void clearBreakpointsIn(js::FreeOp *fop, js::Debugger *dbg, JSObject *handler); + void clearTraps(js::FreeOp *fop); + + private: + void sweepBreakpoints(js::FreeOp *fop); + + public: + js::WatchpointMap *watchpointMap; + + js::ScriptCountsMap *scriptCountsMap; + + js::SourceMapMap *sourceMapMap; + + js::DebugScriptMap *debugScriptMap; +}; + + + + + +class js::AutoDebugModeGC +{ + JSRuntime *rt; + bool needGC; + public: + explicit AutoDebugModeGC(JSRuntime *rt) : rt(rt), needGC(false) {} + + ~AutoDebugModeGC() { + + + + + if (needGC) + GC(rt, GC_NORMAL, gcreason::DEBUG_MODE_GC); + } + + void scheduleGC(JSCompartment *compartment) { + do { } while(0); + PrepareCompartmentForGC(compartment); + needGC = true; + } +}; + +inline void +JSContext::setCompartment(JSCompartment *compartment) +{ + this->compartment = compartment; + this->inferenceEnabled = compartment ? compartment->types.inferenceEnabled : false; +} + +namespace js { + +class PreserveCompartment { + protected: + JSContext *cx; + private: + JSCompartment *oldCompartment; + bool oldInferenceEnabled; + + public: + PreserveCompartment(JSContext *cx ) : cx(cx) { + do { } while (0); + oldCompartment = cx->compartment; + oldInferenceEnabled = cx->inferenceEnabled; + } + + ~PreserveCompartment() { + + cx->compartment = oldCompartment; + cx->inferenceEnabled = oldInferenceEnabled; + } +}; + +class SwitchToCompartment : public PreserveCompartment { + public: + SwitchToCompartment(JSContext *cx, JSCompartment *newCompartment + ) + : PreserveCompartment(cx) + { + do { } while (0); + cx->setCompartment(newCompartment); + } + + SwitchToCompartment(JSContext *cx, JSObject *target ) + : PreserveCompartment(cx) + { + do { } while (0); + cx->setCompartment(target->compartment()); + } + + +}; + +class AssertCompartmentUnchanged { + protected: + JSContext * const cx; + JSCompartment * const oldCompartment; + + public: + AssertCompartmentUnchanged(JSContext *cx ) + : cx(cx), oldCompartment(cx->compartment) { + do { } while (0); + } + + ~AssertCompartmentUnchanged() { + do { } while(0); + } +}; + +class AutoCompartment +{ + public: + JSContext * const context; + JSCompartment * const origin; + JSObject * const target; + JSCompartment * const destination; + private: + Maybe frame; + bool entered; + + public: + AutoCompartment(JSContext *cx, JSObject *target); + ~AutoCompartment(); + + bool enter(); + void leave(); + + private: + AutoCompartment(const AutoCompartment &) ; + AutoCompartment & operator=(const AutoCompartment &) ; +}; + + + + + + +class ErrorCopier +{ + AutoCompartment ∾ + RootedObject scope; + + public: + ErrorCopier(AutoCompartment &ac, JSObject *scope) : ac(ac), scope(ac.context, scope) { + do { } while(0); + } + ~ErrorCopier(); +}; + +class CompartmentsIter { + private: + JSCompartment **it, **end; + + public: + CompartmentsIter(JSRuntime *rt) { + it = rt->compartments.begin(); + end = rt->compartments.end(); + } + + bool done() const { return it == end; } + + void next() { + do { } while(0); + it++; + } + + JSCompartment *get() const { + do { } while(0); + return *it; + } + + operator JSCompartment *() const { return get(); } + JSCompartment *operator->() const { return get(); } +}; + +} +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" 2 +# 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" +namespace js { + +namespace mjit { + struct JITChunk; + struct JITScript; +} + +struct VMFrame +{ +# 82 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" + union Arguments { + struct { + void *ptr; + void *ptr2; + } x; + struct { + uint32_t dynamicArgc; + } call; + } u; + + static size_t offsetOfDynamicArgc() { + return __builtin_offsetof (VMFrame, u.call.dynamicArgc); + } + + VMFrame *previous; + void *scratch; + FrameRegs regs; + + static size_t offsetOfRegsSp() { + return __builtin_offsetof (VMFrame, regs.sp); + } + + static size_t offsetOfRegsPc() { + return __builtin_offsetof (VMFrame, regs.pc); + } + + JSContext *cx; + Value *stackLimit; + StackFrame *entryfp; + FrameRegs *oldregs; + JSRejoinState stubRejoin; +# 162 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" + void *savedR4; + void *savedR5; + void *savedR6; + void *savedR7; + void *savedR8; + void *savedR9; + void *savedR10; + void *savedR11; + void *savedLR; + + inline void** returnAddressLocation() { + return reinterpret_cast(this) - 1; + } +# 202 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" + JSRuntime *runtime() { return cx->runtime; } + + + + + + + + StackFrame *fp() { return regs.fp(); } + mjit::JITScript *jit() { return fp()->jit(); } + + inline mjit::JITChunk *chunk(); + inline unsigned chunkIndex(); + + + inline JSScript *script(); + inline jsbytecode *pc(); +# 227 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" + static const size_t offsetOfFp = 4 * sizeof(void *) + FrameRegs::offsetOfFp; + static const size_t offsetOfInlined = 4 * sizeof(void *) + FrameRegs::offsetOfInlined; + + + static void staticAssert() { + typedef int moz_static_assert104[(offsetOfFp == __builtin_offsetof (VMFrame, regs) + FrameRegs::offsetOfFp) ? 1 : -1]; + typedef int moz_static_assert105[(offsetOfInlined == __builtin_offsetof (VMFrame, regs) + FrameRegs::offsetOfInlined) ? 1 : -1]; + } +}; + + + +extern "C" void JaegerStubVeneer(void); + + +namespace mjit { + + + + + + +enum RejoinState { +# 259 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" + REJOIN_SCRIPTED = 1, + + + REJOIN_NONE, + + + REJOIN_RESUME, + + + + + + REJOIN_TRAP, + + + REJOIN_FALLTHROUGH, + + + + + + + + REJOIN_NATIVE, + REJOIN_NATIVE_LOWERED, + REJOIN_NATIVE_GETTER, + + + + + + + REJOIN_NATIVE_PATCHED, + + + REJOIN_PUSH_BOOLEAN, + REJOIN_PUSH_OBJECT, + + + REJOIN_DEFLOCALFUN, + + + + + + REJOIN_THIS_PROTOTYPE, + + + + + + REJOIN_CHECK_ARGUMENTS, + + + + + + REJOIN_FUNCTION_PROLOGUE, + + + + + + REJOIN_CALL_PROLOGUE, + REJOIN_CALL_PROLOGUE_LOWERED_CALL, + REJOIN_CALL_PROLOGUE_LOWERED_APPLY, + + + REJOIN_CALL_SPLAT, + + + REJOIN_GETTER, + REJOIN_POS, + REJOIN_BINARY, + + + + + + REJOIN_BRANCH +}; + + +static inline JSRejoinState +ScriptedRejoin(uint32_t pcOffset) +{ + return REJOIN_SCRIPTED | (pcOffset << 1); +} + + +static inline JSRejoinState +StubRejoin(RejoinState rejoin) +{ + return rejoin << 1; +} + + +struct RecompilationMonitor +{ + JSContext *cx; + + + + + + + unsigned recompilations; + unsigned frameExpansions; + + + uint64_t gcNumber; + + RecompilationMonitor(JSContext *cx) + : cx(cx), + recompilations(cx->compartment->types.recompilations), + frameExpansions(cx->compartment->types.frameExpansions), + gcNumber(cx->runtime->gcNumber) + {} + + bool recompiled() { + return cx->compartment->types.recompilations != recompilations + || cx->compartment->types.frameExpansions != frameExpansions + || cx->runtime->gcNumber != gcNumber; + } +}; + + + + + +struct Trampolines { + typedef void (*TrampolinePtr)(); + + TrampolinePtr forceReturn; + JSC::ExecutablePool *forceReturnPool; + + + + + +}; + + +enum JaegerStatus +{ + + Jaeger_Throwing = 0, + + + Jaeger_Returned = 1, + + + + + + Jaeger_Unfinished = 2, + + + + + + + Jaeger_UnfinishedAtTrap = 3, + + + + + + Jaeger_ThrowBeforeEnter = 4 +}; + +static inline bool +JaegerStatusToSuccess(JaegerStatus status) +{ + do { } while(0); + do { } while(0); + return status == Jaeger_Returned; +} + + +class JaegerRuntime +{ + Trampolines trampolines; + VMFrame *activeFrame_; + JaegerStatus lastUnfinished_; + + + void finish(); + + public: + bool init(JSContext *cx); + + JaegerRuntime(); + ~JaegerRuntime() { finish(); } + + VMFrame *activeFrame() { + return activeFrame_; + } + + void pushActiveFrame(VMFrame *f) { + do { } while(0); + f->previous = activeFrame_; + f->scratch = __null; + activeFrame_ = f; + } + + void popActiveFrame() { + do { } while(0); + activeFrame_ = activeFrame_->previous; + } + + void setLastUnfinished(JaegerStatus status) { + do { } while(0); + lastUnfinished_ = status; + } + + JaegerStatus lastUnfinished() { + JaegerStatus result = lastUnfinished_; + lastUnfinished_ = (JaegerStatus) 0; + return result; + } + + + + + + + + void *forceReturnFromExternC() const { + return (__extension__ (void *) (size_t) (trampolines.forceReturn)); + } + + + + + + + void *forceReturnFromFastCall() const { + + + + return (__extension__ (void *) (size_t) (trampolines.forceReturn)); + + } + + + + + + + Vector orphanedNativeFrames; + Vector orphanedNativePools; +}; +# 520 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" +class CompilerAllocPolicy : public TempAllocPolicy +{ + bool *oomFlag; + + void *checkAlloc(void *p) { + if (!p) + *oomFlag = true; + return p; + } + + public: + CompilerAllocPolicy(JSContext *cx, bool *oomFlag) + : TempAllocPolicy(cx), oomFlag(oomFlag) {} + CompilerAllocPolicy(JSContext *cx, Compiler &compiler); + + void *malloc_(size_t bytes) { return checkAlloc(TempAllocPolicy::malloc_(bytes)); } + void *realloc_(void *p, size_t oldBytes, size_t bytes) { + return checkAlloc(TempAllocPolicy::realloc_(p, oldBytes, bytes)); + } +}; + +namespace ic { + + struct PICInfo; + struct GetElementIC; + struct SetElementIC; + + + struct GetGlobalNameIC; + struct SetGlobalNameIC; + struct EqualityICInfo; + struct CallICInfo; + +} +} + +typedef void ( *VoidStub)(VMFrame &); +typedef void ( *VoidVpStub)(VMFrame &, Value *); +typedef void ( *VoidStubUInt32)(VMFrame &, uint32_t); +typedef void ( *VoidStubInt32)(VMFrame &, int32_t); +typedef JSBool ( *BoolStub)(VMFrame &); +typedef void * ( *VoidPtrStub)(VMFrame &); +typedef void * ( *VoidPtrStubPC)(VMFrame &, jsbytecode *); +typedef void * ( *VoidPtrStubUInt32)(VMFrame &, uint32_t); +typedef JSObject * ( *JSObjStub)(VMFrame &); +typedef JSObject * ( *JSObjStubUInt32)(VMFrame &, uint32_t); +typedef JSObject * ( *JSObjStubFun)(VMFrame &, JSFunction *); +typedef void ( *VoidStubFun)(VMFrame &, JSFunction *); +typedef JSObject * ( *JSObjStubJSObj)(VMFrame &, JSObject *); +typedef void ( *VoidStubName)(VMFrame &, PropertyName *); +typedef JSString * ( *JSStrStub)(VMFrame &); +typedef JSString * ( *JSStrStubUInt32)(VMFrame &, uint32_t); +typedef void ( *VoidStubJSObj)(VMFrame &, JSObject *); +typedef void ( *VoidStubPC)(VMFrame &, jsbytecode *); +typedef JSBool ( *BoolStubUInt32)(VMFrame &f, uint32_t); + +typedef void ( *VoidStubCallIC)(VMFrame &, js::mjit::ic::CallICInfo *); +typedef void * ( *VoidPtrStubCallIC)(VMFrame &, js::mjit::ic::CallICInfo *); +typedef void ( *VoidStubGetGlobal)(VMFrame &, js::mjit::ic::GetGlobalNameIC *); +typedef void ( *VoidStubSetGlobal)(VMFrame &, js::mjit::ic::SetGlobalNameIC *); +typedef JSBool ( *BoolStubEqualityIC)(VMFrame &, js::mjit::ic::EqualityICInfo *); + + +typedef void ( *VoidStubPIC)(VMFrame &, js::mjit::ic::PICInfo *); +typedef void ( *VoidStubGetElemIC)(VMFrame &, js::mjit::ic::GetElementIC *); +typedef void ( *VoidStubSetElemIC)(VMFrame &f, js::mjit::ic::SetElementIC *); + + +namespace mjit { + +struct InlineFrame; +struct CallSite; + +struct NativeMapEntry { + size_t bcOff; + void *ncode; +}; + + +struct PCLengthEntry { + double codeLength; + double picsLength; +}; + + + + + + +struct NativeCallStub { + + jsbytecode *pc; + + + JSC::ExecutablePool *pool; +# 624 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" + JSC::CodeLocationJump jump; + +}; + +struct JITChunk +{ + typedef JSC::MacroAssemblerCodeRef CodeRef; + CodeRef code; + + PCLengthEntry *pcLengths; +# 643 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" + uint32_t nNmapPairs : 31; + + uint32_t nInlineFrames; + uint32_t nCallSites; + uint32_t nRootedTemplates; + uint32_t nRootedRegExps; + + uint32_t nGetGlobalNames; + uint32_t nSetGlobalNames; + uint32_t nCallICs; + uint32_t nEqualityICs; + + + uint32_t nGetElems; + uint32_t nSetElems; + uint32_t nPICs; + + + + + typedef Vector ExecPoolVector; + ExecPoolVector execPools; + + + + Vector nativeCallStubs; + + NativeMapEntry *nmap() const; + js::mjit::InlineFrame *inlineFrames() const; + js::mjit::CallSite *callSites() const; + JSObject **rootedTemplates() const; + RegExpShared **rootedRegExps() const; + + ic::GetGlobalNameIC *getGlobalNames() const; + ic::SetGlobalNameIC *setGlobalNames() const; + ic::CallICInfo *callICs() const; + ic::EqualityICInfo *equalityICs() const; + + + ic::GetElementIC *getElems() const; + ic::SetElementIC *setElems() const; + ic::PICInfo *pics() const; + + + bool isValidCode(void *ptr) { + char *jitcode = (char *)code.m_code.executableAddress(); + char *jcheck = (char *)ptr; + return jcheck >= jitcode && jcheck < jitcode + code.m_size; + } + + size_t computedSizeOfIncludingThis(); + size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf); + + ~JITChunk(); + + void trace(JSTracer *trc); + void purgeCaches(); + + private: + + char *commonSectionLimit() const; + char *monoICSectionsLimit() const; + char *polyICSectionsLimit() const; +}; + +void +SetChunkLimit(uint32_t limit); + + +struct ChunkDescriptor +{ + + uint32_t begin; + uint32_t end; + + + uint32_t counter; + + + JITChunk *chunk; + + ChunkDescriptor() { PodZero(this); } +}; + + +struct CrossChunkEdge +{ + + uint32_t source; + uint32_t target; + + + void *sourceJump1; + void *sourceJump2; +# 747 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" + typedef Vector JumpTableEntryVector; + JumpTableEntryVector *jumpTableEntries; + + + void *targetLabel; + + + + + + + void *shimLabel; + + CrossChunkEdge() { PodZero(this); } +}; + +struct JITScript +{ + JSScript *script; + + void *invokeEntry; + void *fastEntry; + void *arityCheckEntry; + void *argsCheckEntry; + + + JSCList callers; + + uint32_t nchunks; + uint32_t nedges; + + + + + + JSC::ExecutablePool *shimPool; + + + + JSC::CodeLocationLabel argsCheckStub; + JSC::CodeLocationLabel argsCheckFallthrough; + JSC::CodeLocationJump argsCheckJump; + JSC::ExecutablePool *argsCheckPool; + void resetArgsCheck(); + + + ChunkDescriptor &chunkDescriptor(unsigned i) { + do { } while(0); + ChunkDescriptor *descs = (ChunkDescriptor *) ((char *) this + sizeof(JITScript)); + return descs[i]; + } + + unsigned chunkIndex(jsbytecode *pc) { + unsigned offset = pc - script->code; + do { } while(0); + for (unsigned i = 0; i < nchunks; i++) { + const ChunkDescriptor &desc = chunkDescriptor(i); + do { } while(0); + if (offset < desc.end) + return i; + } + __builtin_unreachable(); + return 0; + } + + JITChunk *chunk(jsbytecode *pc) { + return chunkDescriptor(chunkIndex(pc)).chunk; + } + + JITChunk *findCodeChunk(void *addr); + + CrossChunkEdge *edges() { + return (CrossChunkEdge *) (&chunkDescriptor(0) + nchunks); + } + + + void patchEdge(const CrossChunkEdge &edge, void *label); + + jsbytecode *nativeToPC(void *returnAddress, CallSite **pinline); + + size_t sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf); + + void destroy(FreeOp *fop); + void destroyChunk(FreeOp *fop, unsigned chunkIndex, bool resetUses = true); + + void trace(JSTracer *trc); + void purgeCaches(); +}; + + + + + +JaegerStatus EnterMethodJIT(JSContext *cx, StackFrame *fp, void *code, Value *stackLimit, + bool partial); + + +JaegerStatus JaegerShot(JSContext *cx, bool partial); + + +JaegerStatus JaegerShotAtSafePoint(JSContext *cx, void *safePoint, bool partial); + +enum CompileStatus +{ + Compile_Okay, + Compile_Abort, + Compile_InlineAbort, + Compile_Retry, + Compile_Error, + Compile_Skipped +}; + +void +ProfileStubCall(VMFrame &f); + +enum CompileRequest +{ + CompileRequest_Interpreter, + CompileRequest_JIT +}; + +CompileStatus +CanMethodJIT(JSContext *cx, JSScript *script, jsbytecode *pc, + bool construct, CompileRequest request); + +inline void +ReleaseScriptCode(FreeOp *fop, JSScript *script) +{ + if (!script->hasJITInfo()) + return; + + for (int constructing = 0; constructing <= 1; constructing++) { + for (int barriers = 0; barriers <= 1; barriers++) { + JSScript::JITScriptHandle *jith = script->jitHandle((bool) constructing, (bool) barriers); + if (jith && jith->isValid()) + JSScript::ReleaseCode(fop, jith); + } + } + + script->destroyJITInfo(fop); +} + + +void +ExpandInlineFrames(JSCompartment *compartment); + + + +void +ClearAllFrames(JSCompartment *compartment); + + +struct InlineFrame +{ + InlineFrame *parent; + jsbytecode *parentpc; + HeapPtrFunction fun; + + + + uint32_t depth; +}; + +struct CallSite +{ + uint32_t codeOffset; + uint32_t inlineIndex; + uint32_t pcOffset; + RejoinState rejoin; + + void initialize(uint32_t codeOffset, uint32_t inlineIndex, uint32_t pcOffset, + RejoinState rejoin) { + this->codeOffset = codeOffset; + this->inlineIndex = inlineIndex; + this->pcOffset = pcOffset; + this->rejoin = rejoin; + } + + bool isTrap() const { + return rejoin == REJOIN_TRAP; + } +}; + +void +DumpAllProfiles(JSContext *cx); + +inline void * bsearch_nmap(NativeMapEntry *nmap, size_t nPairs, size_t bcOff) +{ + size_t lo = 1, hi = nPairs; + while (1) { + + if (lo > hi) + return __null; + size_t mid = (lo + hi) / 2; + size_t bcOff_mid = nmap[mid-1].bcOff; + if (bcOff < bcOff_mid) { + hi = mid-1; + continue; + } + if (bcOff > bcOff_mid) { + lo = mid+1; + continue; + } + return nmap[mid-1].ncode; + } +} + +static inline bool +IsLowerableFunCallOrApply(jsbytecode *pc) +{ + + return (*pc == JSOP_FUNCALL && ((unsigned)(((pc)[1] << 8) | (pc)[2])) >= 1) || + (*pc == JSOP_FUNAPPLY && ((unsigned)(((pc)[1] << 8) | (pc)[2])) == 2); + + + +} + +} + +inline mjit::JITChunk * +VMFrame::chunk() +{ + return jit()->chunk(regs.pc); +} + +inline unsigned +VMFrame::chunkIndex() +{ + return jit()->chunkIndex(regs.pc); +} + +inline JSScript * +VMFrame::script() +{ + if (regs.inlined()) + return chunk()->inlineFrames()[regs.inlined()->inlineIndex].fun->script(); + return fp()->script(); +} + +inline jsbytecode * +VMFrame::pc() +{ + if (regs.inlined()) + return script()->code + regs.inlined()->pcOffset; + return regs.pc; +} + +} + +inline void * +JSScript::nativeCodeForPC(bool constructing, jsbytecode *pc) +{ + js::mjit::JITScript *jit = getJIT(constructing, compartment()->needsBarrier()); + if (!jit) + return __null; + js::mjit::JITChunk *chunk = jit->chunk(pc); + if (!chunk) + return __null; + return bsearch_nmap(chunk->nmap(), chunk->nNmapPairs, (size_t)(pc - code)); +} + +extern "C" void JaegerTrampolineReturn(); +extern "C" void JaegerInterpoline(); +extern "C" void JaegerInterpolineScripted(); + + + + +extern "C" void JaegerThrowpoline(); +# 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" +#define ObjectImpl_inl_h___ + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgc.h" 1 +# 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" +#define jsinterp_h___ +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" +namespace js { + + + + + + + +inline bool +ScriptPrologue(JSContext *cx, StackFrame *fp, JSScript *script); + +inline bool +ScriptEpilogue(JSContext *cx, StackFrame *fp, bool ok); +# 40 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" +inline bool +ScriptPrologueOrGeneratorResume(JSContext *cx, StackFrame *fp); + +inline bool +ScriptEpilogueOrGeneratorYield(JSContext *cx, StackFrame *fp, bool ok); +# 65 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" +extern JSTrapStatus +ScriptDebugPrologue(JSContext *cx, StackFrame *fp); +# 83 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" +extern bool +ScriptDebugEpilogue(JSContext *cx, StackFrame *fp, bool ok); + + + + + + + +extern bool +BoxNonStrictThis(JSContext *cx, const CallReceiver &call); + + + + + + + +inline bool +ComputeThis(JSContext *cx, StackFrame *fp); + +enum MaybeConstruct { + NO_CONSTRUCT = INITIAL_NONE, + CONSTRUCT = INITIAL_CONSTRUCT +}; + + + + + + +extern bool +InvokeKernel(JSContext *cx, CallArgs args, MaybeConstruct construct = NO_CONSTRUCT); + + + + + +inline bool +Invoke(JSContext *cx, InvokeArgsGuard &args, MaybeConstruct construct = NO_CONSTRUCT) +{ + args.setActive(); + bool ok = InvokeKernel(cx, args, construct); + args.setInactive(); + return ok; +} + + + + + + +extern bool +Invoke(JSContext *cx, const Value &thisv, const Value &fval, unsigned argc, Value *argv, + Value *rval); + + + + + +extern bool +InvokeGetterOrSetter(JSContext *cx, JSObject *obj, const Value &fval, unsigned argc, Value *argv, + Value *rval); + + + + + +extern bool +InvokeConstructorKernel(JSContext *cx, const CallArgs &args); + + +inline bool +InvokeConstructor(JSContext *cx, InvokeArgsGuard &args) +{ + args.setActive(); + bool ok = InvokeConstructorKernel(cx, ImplicitCast(args)); + args.setInactive(); + return ok; +} + + +extern bool +InvokeConstructor(JSContext *cx, const Value &fval, unsigned argc, Value *argv, Value *rval); + + + + + + + +extern bool +ExecuteKernel(JSContext *cx, JSScript *script, JSObject &scopeChain, const Value &thisv, + ExecuteType type, StackFrame *evalInFrame, Value *result); + + +extern bool +Execute(JSContext *cx, JSScript *script, JSObject &scopeChain, Value *rval); + + +enum InterpMode +{ + JSINTERP_NORMAL = 0, + JSINTERP_REJOIN = 1, + JSINTERP_SKIP_TRAP = 2 +}; + + + + + +extern __attribute__((noinline)) bool +Interpret(JSContext *cx, StackFrame *stopFp, InterpMode mode = JSINTERP_NORMAL); + +extern bool +RunScript(JSContext *cx, JSScript *script, StackFrame *fp); + +extern bool +StrictlyEqual(JSContext *cx, const Value &lval, const Value &rval, bool *equal); + +extern bool +LooselyEqual(JSContext *cx, const Value &lval, const Value &rval, bool *equal); + + +extern bool +SameValue(JSContext *cx, const Value &v1, const Value &v2, bool *same); + +extern JSType +TypeOfValue(JSContext *cx, const Value &v); + +extern JSBool +HasInstance(JSContext *cx, HandleObject obj, const js::Value *v, JSBool *bp); +# 239 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" +class InterpreterFrames { + public: + class InterruptEnablerBase { + public: + virtual void enableInterrupts() const = 0; + }; + + InterpreterFrames(JSContext *cx, FrameRegs *regs, const InterruptEnablerBase &enabler); + ~InterpreterFrames(); + + + inline void enableInterruptsIfRunning(JSScript *script); + + InterpreterFrames *older; + + private: + JSContext *context; + FrameRegs *regs; + const InterruptEnablerBase &enabler; +}; + + + + + +extern void +UnwindScope(JSContext *cx, uint32_t stackDepth); + + + + + +extern void +UnwindForUncatchableException(JSContext *cx, const FrameRegs ®s); + +extern bool +OnUnknownMethod(JSContext *cx, HandleObject obj, Value idval, Value *vp); + +inline void +AssertValidFunctionScopeChainAtExit(StackFrame *fp); + +class TryNoteIter +{ + const FrameRegs ®s; + JSScript *script; + uint32_t pcOffset; + JSTryNote *tn, *tnEnd; + void settle(); + public: + TryNoteIter(const FrameRegs ®s); + bool done() const; + void operator++(); + JSTryNote *operator*() const { return tn; } +}; +# 302 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" +static __attribute__((always_inline)) inline void +Debug_SetValueRangeToCrashOnTouch(Value *beg, Value *end) +{ + + + + +} + +static __attribute__((always_inline)) inline void +Debug_SetValueRangeToCrashOnTouch(Value *vec, size_t len) +{ + + + +} + +static __attribute__((always_inline)) inline void +Debug_SetValueRangeToCrashOnTouch(HeapValue *vec, size_t len) +{ + + + +} + +} +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Marking.h" 1 + + + + + + + +#define gc_marking_h___ + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jslock.h" 1 +# 13 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Marking.h" 2 + + + + +extern "C" { +struct JSContext; +struct JSFunction; +struct JSObject; +struct JSScript; +} + +class JSAtom; +class JSLinearString; + +namespace js { + +class ArgumentsObject; +class BaseShape; +class GlobalObject; +class UnownedBaseShape; +struct Shape; + +template class HeapPtr; + +namespace gc { +# 65 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Marking.h" +#define DeclMarker(base,type) void Mark ##base(JSTracer *trc, HeapPtr *thing, const char *name); void Mark ##base ##Root(JSTracer *trc, type **thingp, const char *name); void Mark ##base ##Unbarriered(JSTracer *trc, type **thingp, const char *name); void Mark ##base ##Range(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void Mark ##base ##RootRange(JSTracer *trc, size_t len, type **thing, const char *name); bool Is ##base ##Marked(type **thingp); bool Is ##base ##Marked(HeapPtr *thingp); +# 74 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Marking.h" +void MarkBaseShape(JSTracer *trc, HeapPtr *thing, const char *name); void MarkBaseShapeRoot(JSTracer *trc, BaseShape **thingp, const char *name); void MarkBaseShapeUnbarriered(JSTracer *trc, BaseShape **thingp, const char *name); void MarkBaseShapeRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkBaseShapeRootRange(JSTracer *trc, size_t len, BaseShape **thing, const char *name); bool IsBaseShapeMarked(BaseShape **thingp); bool IsBaseShapeMarked(HeapPtr *thingp); +void MarkBaseShape(JSTracer *trc, HeapPtr *thing, const char *name); void MarkBaseShapeRoot(JSTracer *trc, UnownedBaseShape **thingp, const char *name); void MarkBaseShapeUnbarriered(JSTracer *trc, UnownedBaseShape **thingp, const char *name); void MarkBaseShapeRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkBaseShapeRootRange(JSTracer *trc, size_t len, UnownedBaseShape **thing, const char *name); bool IsBaseShapeMarked(UnownedBaseShape **thingp); bool IsBaseShapeMarked(HeapPtr *thingp); +void MarkObject(JSTracer *trc, HeapPtr *thing, const char *name); void MarkObjectRoot(JSTracer *trc, ArgumentsObject **thingp, const char *name); void MarkObjectUnbarriered(JSTracer *trc, ArgumentsObject **thingp, const char *name); void MarkObjectRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkObjectRootRange(JSTracer *trc, size_t len, ArgumentsObject **thing, const char *name); bool IsObjectMarked(ArgumentsObject **thingp); bool IsObjectMarked(HeapPtr *thingp); +void MarkObject(JSTracer *trc, HeapPtr *thing, const char *name); void MarkObjectRoot(JSTracer *trc, DebugScopeObject **thingp, const char *name); void MarkObjectUnbarriered(JSTracer *trc, DebugScopeObject **thingp, const char *name); void MarkObjectRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkObjectRootRange(JSTracer *trc, size_t len, DebugScopeObject **thing, const char *name); bool IsObjectMarked(DebugScopeObject **thingp); bool IsObjectMarked(HeapPtr *thingp); +void MarkObject(JSTracer *trc, HeapPtr *thing, const char *name); void MarkObjectRoot(JSTracer *trc, GlobalObject **thingp, const char *name); void MarkObjectUnbarriered(JSTracer *trc, GlobalObject **thingp, const char *name); void MarkObjectRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkObjectRootRange(JSTracer *trc, size_t len, GlobalObject **thing, const char *name); bool IsObjectMarked(GlobalObject **thingp); bool IsObjectMarked(HeapPtr *thingp); +void MarkObject(JSTracer *trc, HeapPtr *thing, const char *name); void MarkObjectRoot(JSTracer *trc, JSObject **thingp, const char *name); void MarkObjectUnbarriered(JSTracer *trc, JSObject **thingp, const char *name); void MarkObjectRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkObjectRootRange(JSTracer *trc, size_t len, JSObject **thing, const char *name); bool IsObjectMarked(JSObject **thingp); bool IsObjectMarked(HeapPtr *thingp); +void MarkObject(JSTracer *trc, HeapPtr *thing, const char *name); void MarkObjectRoot(JSTracer *trc, JSFunction **thingp, const char *name); void MarkObjectUnbarriered(JSTracer *trc, JSFunction **thingp, const char *name); void MarkObjectRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkObjectRootRange(JSTracer *trc, size_t len, JSFunction **thing, const char *name); bool IsObjectMarked(JSFunction **thingp); bool IsObjectMarked(HeapPtr *thingp); +void MarkScript(JSTracer *trc, HeapPtr *thing, const char *name); void MarkScriptRoot(JSTracer *trc, JSScript **thingp, const char *name); void MarkScriptUnbarriered(JSTracer *trc, JSScript **thingp, const char *name); void MarkScriptRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkScriptRootRange(JSTracer *trc, size_t len, JSScript **thing, const char *name); bool IsScriptMarked(JSScript **thingp); bool IsScriptMarked(HeapPtr *thingp); +void MarkShape(JSTracer *trc, HeapPtr *thing, const char *name); void MarkShapeRoot(JSTracer *trc, Shape **thingp, const char *name); void MarkShapeUnbarriered(JSTracer *trc, Shape **thingp, const char *name); void MarkShapeRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkShapeRootRange(JSTracer *trc, size_t len, Shape **thing, const char *name); bool IsShapeMarked(Shape **thingp); bool IsShapeMarked(HeapPtr *thingp); +void MarkString(JSTracer *trc, HeapPtr *thing, const char *name); void MarkStringRoot(JSTracer *trc, JSAtom **thingp, const char *name); void MarkStringUnbarriered(JSTracer *trc, JSAtom **thingp, const char *name); void MarkStringRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkStringRootRange(JSTracer *trc, size_t len, JSAtom **thing, const char *name); bool IsStringMarked(JSAtom **thingp); bool IsStringMarked(HeapPtr *thingp); +void MarkString(JSTracer *trc, HeapPtr *thing, const char *name); void MarkStringRoot(JSTracer *trc, JSString **thingp, const char *name); void MarkStringUnbarriered(JSTracer *trc, JSString **thingp, const char *name); void MarkStringRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkStringRootRange(JSTracer *trc, size_t len, JSString **thing, const char *name); bool IsStringMarked(JSString **thingp); bool IsStringMarked(HeapPtr *thingp); +void MarkString(JSTracer *trc, HeapPtr *thing, const char *name); void MarkStringRoot(JSTracer *trc, JSFlatString **thingp, const char *name); void MarkStringUnbarriered(JSTracer *trc, JSFlatString **thingp, const char *name); void MarkStringRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkStringRootRange(JSTracer *trc, size_t len, JSFlatString **thing, const char *name); bool IsStringMarked(JSFlatString **thingp); bool IsStringMarked(HeapPtr *thingp); +void MarkString(JSTracer *trc, HeapPtr *thing, const char *name); void MarkStringRoot(JSTracer *trc, JSLinearString **thingp, const char *name); void MarkStringUnbarriered(JSTracer *trc, JSLinearString **thingp, const char *name); void MarkStringRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkStringRootRange(JSTracer *trc, size_t len, JSLinearString **thing, const char *name); bool IsStringMarked(JSLinearString **thingp); bool IsStringMarked(HeapPtr *thingp); +void MarkTypeObject(JSTracer *trc, HeapPtr *thing, const char *name); void MarkTypeObjectRoot(JSTracer *trc, types::TypeObject **thingp, const char *name); void MarkTypeObjectUnbarriered(JSTracer *trc, types::TypeObject **thingp, const char *name); void MarkTypeObjectRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkTypeObjectRootRange(JSTracer *trc, size_t len, types::TypeObject **thing, const char *name); bool IsTypeObjectMarked(types::TypeObject **thingp); bool IsTypeObjectMarked(HeapPtr *thingp); + +void MarkXML(JSTracer *trc, HeapPtr *thing, const char *name); void MarkXMLRoot(JSTracer *trc, JSXML **thingp, const char *name); void MarkXMLUnbarriered(JSTracer *trc, JSXML **thingp, const char *name); void MarkXMLRange(JSTracer *trc, size_t len, HeapPtr *thing, const char *name); void MarkXMLRootRange(JSTracer *trc, size_t len, JSXML **thing, const char *name); bool IsXMLMarked(JSXML **thingp); bool IsXMLMarked(HeapPtr *thingp); + + +#undef DeclMarker +# 101 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Marking.h" +void +MarkKind(JSTracer *trc, void **thingp, JSGCTraceKind kind); + +void +MarkGCThingRoot(JSTracer *trc, void **thingp, const char *name); + + + +void +MarkId(JSTracer *trc, EncapsulatedId *id, const char *name); + +void +MarkIdRoot(JSTracer *trc, jsid *id, const char *name); + +void +MarkIdUnbarriered(JSTracer *trc, jsid *id, const char *name); + +void +MarkIdRange(JSTracer *trc, size_t len, HeapId *vec, const char *name); + +void +MarkIdRootRange(JSTracer *trc, size_t len, jsid *vec, const char *name); + + + +void +MarkValue(JSTracer *trc, EncapsulatedValue *v, const char *name); + +void +MarkValueRange(JSTracer *trc, size_t len, EncapsulatedValue *vec, const char *name); + +void +MarkValueRoot(JSTracer *trc, Value *v, const char *name); + +void +MarkValueRootRange(JSTracer *trc, size_t len, Value *vec, const char *name); + +inline void +MarkValueRootRange(JSTracer *trc, Value *begin, Value *end, const char *name) +{ + MarkValueRootRange(trc, end - begin, begin, name); +} + +bool +IsValueMarked(Value *v); + + + +void +MarkSlot(JSTracer *trc, HeapSlot *s, const char *name); + +void +MarkArraySlots(JSTracer *trc, size_t len, HeapSlot *vec, const char *name); + +void +MarkObjectSlots(JSTracer *trc, JSObject *obj, uint32_t start, uint32_t nslots); + +void +MarkCrossCompartmentObjectUnbarriered(JSTracer *trc, JSObject **obj, const char *name); + +void +MarkCrossCompartmentScriptUnbarriered(JSTracer *trc, JSScript **script, const char *name); + + + + + +void +MarkCrossCompartmentSlot(JSTracer *trc, HeapSlot *s, const char *name); +# 178 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Marking.h" +void +MarkObject(JSTracer *trc, HeapPtr *thingp, const char *name); + + +void +MarkValueUnbarriered(JSTracer *trc, Value *v, const char *name); + + + + + +void +MarkChildren(JSTracer *trc, JSObject *obj); + + + + + + +void +MarkCycleCollectorChildren(JSTracer *trc, Shape *shape); + +void +PushArena(GCMarker *gcmarker, ArenaHeader *aheader); +# 210 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Marking.h" +inline void +Mark(JSTracer *trc, HeapValue *v, const char *name) +{ + MarkValue(trc, v, name); +} + +inline void +Mark(JSTracer *trc, HeapPtr *o, const char *name) +{ + MarkObject(trc, o, name); +} + +inline void +Mark(JSTracer *trc, HeapPtr *o, const char *name) +{ + MarkScript(trc, o, name); +} + + +inline void +Mark(JSTracer *trc, HeapPtr *xml, const char *name) +{ + MarkXML(trc, xml, name); +} + + +bool +IsCellMarked(Cell **thingp); + +inline bool +IsMarked(EncapsulatedValue *v) +{ + if (!v->isMarkable()) + return true; + return IsValueMarked(v->unsafeGet()); +} + +inline bool +IsMarked(HeapPtrObject *objp) +{ + return IsObjectMarked(objp); +} + +inline bool +IsMarked(HeapPtrScript *scriptp) +{ + return IsScriptMarked(scriptp); +} + +inline Cell * +ToMarkable(const Value &v) +{ + if (v.isMarkable()) + return (Cell *)v.toGCThing(); + return __null; +} + +inline Cell * +ToMarkable(Cell *cell) +{ + return cell; +} + +inline JSGCTraceKind +TraceKind(const Value &v) +{ + do { } while(0); + if (v.isObject()) + return JSTRACE_OBJECT; + return JSTRACE_STRING; +} + +inline JSGCTraceKind +TraceKind(JSObject *obj) +{ + return JSTRACE_OBJECT; +} + +inline JSGCTraceKind +TraceKind(JSScript *script) +{ + return JSTRACE_SCRIPT; +} + +} + +void +TraceChildren(JSTracer *trc, void *thing, JSGCTraceKind kind); + +void +CallTracer(JSTracer *trc, void *thing, JSGCTraceKind kind); + +} +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.h" 1 +# 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" 2 + +namespace js { + +static __attribute__((always_inline)) inline void +Debug_SetSlotRangeToCrashOnTouch(HeapSlot *vec, uint32_t len) +{ + + + +} + +static __attribute__((always_inline)) inline void +Debug_SetSlotRangeToCrashOnTouch(HeapSlot *begin, HeapSlot *end) +{ + + + +} + +} + +inline bool +js::ObjectImpl::isExtensible() const +{ + return !lastProperty()->hasObjectFlag(BaseShape::NOT_EXTENSIBLE); +} + +inline bool +js::ObjectImpl::isDenseArray() const +{ + bool result = hasClass(&ArrayClass); + do { } while (0); + return result; +} + +inline bool +js::ObjectImpl::isSlowArray() const +{ + bool result = hasClass(&SlowArrayClass); + do { } while (0); + return result; +} + +inline bool +js::ObjectImpl::isArray() const +{ + return isSlowArray() || isDenseArray(); +} + +inline uint32_t +js::ObjectImpl::getDenseArrayInitializedLength() +{ + do { } while(0); + return getElementsHeader()->initializedLength; +} + +inline js::HeapSlotArray +js::ObjectImpl::getDenseArrayElements() +{ + do { } while(0); + return HeapSlotArray(elements); +} + +inline const js::Value & +js::ObjectImpl::getDenseArrayElement(uint32_t idx) +{ + do { } while(0); + return elements[idx]; +} + +inline void +js::ObjectImpl::getSlotRangeUnchecked(uint32_t start, uint32_t length, + HeapSlot **fixedStart, HeapSlot **fixedEnd, + HeapSlot **slotsStart, HeapSlot **slotsEnd) +{ + do { } while(0); + do { } while(0); + + uint32_t fixed = numFixedSlots(); + if (start < fixed) { + if (start + length < fixed) { + *fixedStart = &fixedSlots()[start]; + *fixedEnd = &fixedSlots()[start + length]; + *slotsStart = *slotsEnd = __null; + } else { + uint32_t localCopy = fixed - start; + *fixedStart = &fixedSlots()[start]; + *fixedEnd = &fixedSlots()[start + localCopy]; + *slotsStart = &slots[0]; + *slotsEnd = &slots[length - localCopy]; + } + } else { + *fixedStart = *fixedEnd = __null; + *slotsStart = &slots[start - fixed]; + *slotsEnd = &slots[start - fixed + length]; + } +} + +inline void +js::ObjectImpl::getSlotRange(uint32_t start, uint32_t length, + HeapSlot **fixedStart, HeapSlot **fixedEnd, + HeapSlot **slotsStart, HeapSlot **slotsEnd) +{ + do { } while(0); + getSlotRangeUnchecked(start, length, fixedStart, fixedEnd, slotsStart, slotsEnd); +} + +inline bool +js::ObjectImpl::hasContiguousSlots(uint32_t start, uint32_t count) const +{ + + + + + do { } while(0); + return start + count <= numFixedSlots() || start >= numFixedSlots(); +} + +inline void +js::ObjectImpl::invalidateSlotRange(uint32_t start, uint32_t length) +{ +# 151 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" +} + +inline void +js::ObjectImpl::initializeSlotRange(uint32_t start, uint32_t length) +{ + + + + + HeapSlot *fixedStart, *fixedEnd, *slotsStart, *slotsEnd; + getSlotRangeUnchecked(start, length, &fixedStart, &fixedEnd, &slotsStart, &slotsEnd); + + JSCompartment *comp = compartment(); + uint32_t offset = start; + for (HeapSlot *sp = fixedStart; sp < fixedEnd; sp++) + sp->init(comp, this->asObjectPtr(), offset++, UndefinedValue()); + for (HeapSlot *sp = slotsStart; sp < slotsEnd; sp++) + sp->init(comp, this->asObjectPtr(), offset++, UndefinedValue()); +} + +inline bool +js::ObjectImpl::isNative() const +{ + return lastProperty()->isNative(); +} + +inline js::HeapSlot & +js::ObjectImpl::nativeGetSlotRef(uint32_t slot) +{ + do { } while(0); + do { } while(0); + return getSlotRef(slot); +} + +inline const js::Value & +js::ObjectImpl::nativeGetSlot(uint32_t slot) const +{ + do { } while(0); + do { } while(0); + return getSlot(slot); +} + +inline void +js::ObjectImpl::setSlot(uint32_t slot, const js::Value &value) +{ + do { } while(0); + getSlotRef(slot).set(this->asObjectPtr(), slot, value); +} + +inline void +js::ObjectImpl::initSlot(uint32_t slot, const js::Value &value) +{ + do { } while(0); + do { } while(0); + initSlotUnchecked(slot, value); +} + +inline void +js::ObjectImpl::initSlotUnchecked(uint32_t slot, const js::Value &value) +{ + getSlotAddressUnchecked(slot)->init(this->asObjectPtr(), slot, value); +} + +inline void +js::ObjectImpl::setFixedSlot(uint32_t slot, const js::Value &value) +{ + do { } while(0); + fixedSlots()[slot].set(this->asObjectPtr(), slot, value); +} + +inline void +js::ObjectImpl::initFixedSlot(uint32_t slot, const js::Value &value) +{ + do { } while(0); + fixedSlots()[slot].init(this->asObjectPtr(), slot, value); +} + +inline uint32_t +js::ObjectImpl::slotSpan() const +{ + if (inDictionaryMode()) + return lastProperty()->base()->slotSpan(); + return lastProperty()->slotSpan(); +} + +inline uint32_t +js::ObjectImpl::numDynamicSlots() const +{ + return dynamicSlotsCount(numFixedSlots(), slotSpan()); +} + +inline js::Class * +js::ObjectImpl::getClass() const +{ + return lastProperty()->getObjectClass(); +} + +inline JSClass * +js::ObjectImpl::getJSClass() const +{ + return Jsvalify(getClass()); +} + +inline bool +js::ObjectImpl::hasClass(const Class *c) const +{ + return getClass() == c; +} + +inline const js::ObjectOps * +js::ObjectImpl::getOps() const +{ + return &getClass()->ops; +} + +inline bool +js::ObjectImpl::isDelegate() const +{ + return lastProperty()->hasObjectFlag(BaseShape::DELEGATE); +} + +inline bool +js::ObjectImpl::inDictionaryMode() const +{ + return lastProperty()->inDictionary(); +} + + inline uint32_t +js::ObjectImpl::dynamicSlotsCount(uint32_t nfixed, uint32_t span) +{ + if (span <= nfixed) + return 0; + span -= nfixed; + if (span <= SLOT_CAPACITY_MIN) + return SLOT_CAPACITY_MIN; + + uint32_t slots = RoundUpPow2(span); + do { } while(0); + return slots; +} + +inline size_t +js::ObjectImpl::sizeOfThis() const +{ + return arenaHeader()->getThingSize(); +} + + inline void +js::ObjectImpl::readBarrier(ObjectImpl *obj) +{ + + JSCompartment *comp = obj->compartment(); + if (comp->needsBarrier()) { + do { } while(0); + JSObject *tmp = obj->asObjectPtr(); + MarkObjectUnbarriered(comp->barrierTracer(), &tmp, "read barrier"); + do { } while(0); + } + +} + +inline void +js::ObjectImpl::privateWriteBarrierPre(void **old) +{ + + JSCompartment *comp = compartment(); + if (comp->needsBarrier()) { + if (*old && getClass()->trace) + getClass()->trace(comp->barrierTracer(), this->asObjectPtr()); + } + +} + +inline void +js::ObjectImpl::privateWriteBarrierPost(void **old) +{ +} + + inline void +js::ObjectImpl::writeBarrierPre(ObjectImpl *obj) +{ + + + + + + if (uintptr_t(obj) < 32) + return; + + JSCompartment *comp = obj->compartment(); + if (comp->needsBarrier()) { + do { } while(0); + JSObject *tmp = obj->asObjectPtr(); + MarkObjectUnbarriered(comp->barrierTracer(), &tmp, "write barrier"); + do { } while(0); + } + +} + + inline void +js::ObjectImpl::writeBarrierPost(ObjectImpl *obj, void *addr) +{ +} + +inline bool +js::ObjectImpl::hasPrivate() const +{ + return getClass()->hasPrivate(); +} + +inline void *& +js::ObjectImpl::privateRef(uint32_t nfixed) const +{ + + + + + + do { } while(0); + do { } while(0); + HeapSlot *end = &fixedSlots()[nfixed]; + return *reinterpret_cast(end); +} + +inline void * +js::ObjectImpl::getPrivate() const +{ + return privateRef(numFixedSlots()); +} + +inline void * +js::ObjectImpl::getPrivate(uint32_t nfixed) const +{ + return privateRef(nfixed); +} + +inline void +js::ObjectImpl::setPrivate(void *data) +{ + void **pprivate = &privateRef(numFixedSlots()); + + privateWriteBarrierPre(pprivate); + *pprivate = data; + privateWriteBarrierPost(pprivate); +} + +inline void +js::ObjectImpl::setPrivateUnbarriered(void *data) +{ + void **pprivate = &privateRef(numFixedSlots()); + *pprivate = data; +} + +inline void +js::ObjectImpl::initPrivate(void *data) +{ + privateRef(numFixedSlots()) = data; +} +# 24 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" 2 + +namespace js { + +namespace mjit { +struct NativeAddressInfo; +struct JSActiveFrame; +} + +namespace Probes { +# 64 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" +extern bool ProfilingActive; + +extern const char nullName[]; +extern const char anonymousName[]; + + +JSBool startEngine(); + + +bool createRuntime(JSRuntime *rt); + + +bool destroyRuntime(JSRuntime *rt); + + +bool shutdown(); + + + + + + +bool callTrackingActive(JSContext *); + + + + + +bool wantNativeAddressInfo(JSContext *); + + +bool enterJSFun(JSContext *, JSFunction *, JSScript *, int counter = 1); + + +bool exitJSFun(JSContext *, JSFunction *, JSScript *, int counter = 0); + + +bool startExecution(JSContext *cx, JSScript *script); + + +bool stopExecution(JSContext *cx, JSScript *script); + + +bool resizeHeap(JSCompartment *compartment, size_t oldSize, size_t newSize); + + + + +bool createObject(JSContext *cx, JSObject *obj); + + +bool objectResizeActive(); + + +bool resizeObject(JSContext *cx, JSObject *obj, size_t oldSize, size_t newSize); + + + + + +bool finalizeObject(JSObject *obj); +# 134 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" +bool createString(JSContext *cx, JSString *string, size_t length); + + + + + + +bool finalizeString(JSString *string); + + +bool compileScriptBegin(const char *filename, int lineno); + + +bool compileScriptEnd(const char *filename, int lineno); + + +bool calloutBegin(JSContext *cx, JSFunction *fun); + + +bool calloutEnd(JSContext *cx, JSFunction *fun); + + +bool acquireMemory(JSContext *cx, void *address, size_t nbytes); +bool releaseMemory(JSContext *cx, void *address, size_t nbytes); +# 170 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" +bool GCStart(); +bool GCEnd(); + +bool GCStartMarkPhase(); +bool GCEndMarkPhase(); + +bool GCStartSweepPhase(); +bool GCEndSweepPhase(); +# 187 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" +bool CustomMark(JSString *string); +bool CustomMark(const char *string); +bool CustomMark(int marker); + + + +enum JITReportGranularity { + JITREPORT_GRANULARITY_NONE = 0, + JITREPORT_GRANULARITY_FUNCTION = 1, + JITREPORT_GRANULARITY_LINE = 2, + JITREPORT_GRANULARITY_OP = 3 +}; + + + + + + +class JITWatcher { +public: + struct NativeRegion { + mjit::JSActiveFrame *frame; + JSScript *script; + size_t inlinedOffset; + jsbytecode *pc; + jsbytecode *endpc; + uintptr_t mainOffset; + uintptr_t stubOffset; + bool enter; + }; + + typedef Vector RegionVector; + + virtual JITReportGranularity granularityRequested() = 0; + + + static bool CollectNativeRegions(RegionVector ®ions, + JSRuntime *rt, + mjit::JITChunk *jit, + mjit::JSActiveFrame *outerFrame, + mjit::JSActiveFrame **inlineFrames); + + virtual void registerMJITCode(JSContext *cx, js::mjit::JITChunk *chunk, + mjit::JSActiveFrame *outerFrame, + mjit::JSActiveFrame **inlineFrames, + void *mainCodeAddress, size_t mainCodeSize, + void *stubCodeAddress, size_t stubCodeSize) = 0; + + virtual void discardMJITCode(FreeOp *fop, mjit::JITScript *jscr, mjit::JITChunk *chunk, + void* address) = 0; + + virtual void registerICCode(JSContext *cx, + js::mjit::JITChunk *chunk, JSScript *script, jsbytecode* pc, + void *start, size_t size) = 0; + + + virtual void discardExecutableRegion(void *start, size_t size) = 0; +}; + + + + + +bool +addJITWatcher(JITWatcher *watcher); + + + + + +bool +removeJITWatcher(JSRuntime *rt, JITWatcher *watcher); + + + + +void +removeAllJITWatchers(JSRuntime *rt); + + + + +JITReportGranularity +JITGranularityRequested(); + + + + + +void +registerMJITCode(JSContext *cx, js::mjit::JITChunk *chunk, + mjit::JSActiveFrame *outerFrame, + mjit::JSActiveFrame **inlineFrames, + void *mainCodeAddress, size_t mainCodeSize, + void *stubCodeAddress, size_t stubCodeSize); + + + + +void +discardMJITCode(FreeOp *fop, mjit::JITScript *jscr, mjit::JITChunk *chunk, void* address); + + + + +void +registerICCode(JSContext *cx, + mjit::JITChunk *chunk, JSScript *script, jsbytecode* pc, + void *start, size_t size); + + + + + + +void +discardExecutableRegion(void *start, size_t size); + + + + + + + +void DTraceEnterJSFun(JSContext *cx, JSFunction *fun, JSScript *script); +void DTraceExitJSFun(JSContext *cx, JSFunction *fun, JSScript *script); +# 350 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" +} + + + + + + +inline bool +Probes::callTrackingActive(JSContext *cx) +{ +# 372 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" + return false; +} + +inline bool +Probes::wantNativeAddressInfo(JSContext *cx) +{ + return (cx->reportGranularity >= JITREPORT_GRANULARITY_FUNCTION && + JITGranularityRequested() >= JITREPORT_GRANULARITY_FUNCTION); +} + +inline bool +Probes::enterJSFun(JSContext *cx, JSFunction *fun, JSScript *script, int counter) +{ + bool ok = true; +# 398 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" + return ok; +} + +inline bool +Probes::exitJSFun(JSContext *cx, JSFunction *fun, JSScript *script, int counter) +{ + bool ok = true; +# 420 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" + return ok; +} + +inline bool +Probes::resizeHeap(JSCompartment *compartment, size_t oldSize, size_t newSize) +{ + bool ok = true; + + + + + + + return ok; +} +# 450 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" +inline bool +Probes::createObject(JSContext *cx, JSObject *obj) +{ + bool ok = true; +# 464 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" + return ok; +} + +inline bool +Probes::finalizeObject(JSObject *obj) +{ + bool ok = true; +# 485 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" + return ok; +} + +inline bool +Probes::objectResizeActive() +{ + + + + + + return false; +} + +inline bool +Probes::resizeObject(JSContext *cx, JSObject *obj, size_t oldSize, size_t newSize) +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::createString(JSContext *cx, JSString *string, size_t length) +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::finalizeString(JSString *string) +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::compileScriptBegin(const char *filename, int lineno) +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::compileScriptEnd(const char *filename, int lineno) +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::calloutBegin(JSContext *cx, JSFunction *fun) +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::calloutEnd(JSContext *cx, JSFunction *fun) +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::acquireMemory(JSContext *cx, void *address, size_t nbytes) +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::releaseMemory(JSContext *cx, void *address, size_t nbytes) +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::GCStart() +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::GCEnd() +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::GCStartMarkPhase() +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::GCEndMarkPhase() +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::GCStartSweepPhase() +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::GCEndSweepPhase() +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::CustomMark(JSString *string) +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::CustomMark(const char *string) +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::CustomMark(int marker) +{ + bool ok = true; + + + + + + + return ok; +} + +inline bool +Probes::startExecution(JSContext *cx, JSScript *script) +{ + bool ok = true; +# 748 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" + return ok; +} + +inline bool +Probes::stopExecution(JSContext *cx, JSScript *script) +{ + bool ok = true; +# 766 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" + return ok; +} + +struct AutoFunctionCallProbe { + JSContext * const cx; + JSFunction *fun; + JSScript *script; + + + AutoFunctionCallProbe(JSContext *cx, JSFunction *fun, JSScript *script + ) + : cx(cx), fun(fun), script(script) + { + do { } while (0); + Probes::enterJSFun(cx, fun, script); + } + + ~AutoFunctionCallProbe() { + Probes::exitJSFun(cx, fun, script); + } +}; + +} +# 23 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsproxy.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsproxy.h" +#define jsproxy_h___ + + + + +namespace js { + + +class __attribute__((visibility("default"))) BaseProxyHandler { + void *mFamily; + public: + explicit BaseProxyHandler(void *family); + virtual ~BaseProxyHandler(); + + + virtual bool getPropertyDescriptor(JSContext *cx, JSObject *proxy, jsid id, bool set, + PropertyDescriptor *desc) = 0; + virtual bool getOwnPropertyDescriptor(JSContext *cx, JSObject *proxy, jsid id, bool set, + PropertyDescriptor *desc) = 0; + virtual bool defineProperty(JSContext *cx, JSObject *proxy, jsid id, + PropertyDescriptor *desc) = 0; + virtual bool getOwnPropertyNames(JSContext *cx, JSObject *proxy, AutoIdVector &props) = 0; + virtual bool delete_(JSContext *cx, JSObject *proxy, jsid id, bool *bp) = 0; + virtual bool enumerate(JSContext *cx, JSObject *proxy, AutoIdVector &props) = 0; + + + virtual bool has(JSContext *cx, JSObject *proxy, jsid id, bool *bp); + virtual bool hasOwn(JSContext *cx, JSObject *proxy, jsid id, bool *bp); + virtual bool get(JSContext *cx, JSObject *proxy, JSObject *receiver, jsid id, Value *vp); + virtual bool set(JSContext *cx, JSObject *proxy, JSObject *receiver, jsid id, bool strict, + Value *vp); + virtual bool keys(JSContext *cx, JSObject *proxy, AutoIdVector &props); + virtual bool iterate(JSContext *cx, JSObject *proxy, unsigned flags, Value *vp); + + + virtual bool call(JSContext *cx, JSObject *proxy, unsigned argc, Value *vp); + virtual bool construct(JSContext *cx, JSObject *proxy, unsigned argc, Value *argv, Value *rval); + virtual bool nativeCall(JSContext *cx, JSObject *proxy, Class *clasp, Native native, CallArgs args); + virtual bool hasInstance(JSContext *cx, JSObject *proxy, const Value *vp, bool *bp); + virtual JSType typeOf(JSContext *cx, JSObject *proxy); + virtual bool objectClassIs(JSObject *obj, ESClassValue classValue, JSContext *cx); + virtual JSString *obj_toString(JSContext *cx, JSObject *proxy); + virtual JSString *fun_toString(JSContext *cx, JSObject *proxy, unsigned indent); + virtual bool regexp_toShared(JSContext *cx, JSObject *proxy, RegExpGuard *g); + virtual bool defaultValue(JSContext *cx, JSObject *obj, JSType hint, Value *vp); + virtual bool iteratorNext(JSContext *cx, JSObject *proxy, Value *vp); + virtual void finalize(JSFreeOp *fop, JSObject *proxy); + virtual bool getElementIfPresent(JSContext *cx, JSObject *obj, JSObject *receiver, + uint32_t index, Value *vp, bool *present); + + virtual bool isOuterWindow() { + return false; + } + + inline void *family() { + return mFamily; + } +}; + +class __attribute__((visibility("default"))) IndirectProxyHandler : public BaseProxyHandler { + public: + explicit IndirectProxyHandler(void *family); + + + virtual bool getPropertyDescriptor(JSContext *cx, JSObject *proxy, jsid id, + bool set, + PropertyDescriptor *desc) ; + virtual bool getOwnPropertyDescriptor(JSContext *cx, JSObject *proxy, + jsid id, bool set, + PropertyDescriptor *desc) ; + virtual bool defineProperty(JSContext *cx, JSObject *proxy, jsid id, + PropertyDescriptor *desc) ; + virtual bool getOwnPropertyNames(JSContext *cx, JSObject *proxy, + AutoIdVector &props) ; + virtual bool delete_(JSContext *cx, JSObject *proxy, jsid id, + bool *bp) ; + virtual bool enumerate(JSContext *cx, JSObject *proxy, + AutoIdVector &props) ; + + + + + virtual bool call(JSContext *cx, JSObject *proxy, unsigned argc, + Value *vp) ; + virtual bool construct(JSContext *cx, JSObject *proxy, unsigned argc, + Value *argv, Value *rval) ; + virtual bool nativeCall(JSContext *cx, JSObject *proxy, Class *clasp, + Native native, CallArgs args) ; + virtual bool hasInstance(JSContext *cx, JSObject *proxy, const Value *vp, + bool *bp) ; + virtual JSType typeOf(JSContext *cx, JSObject *proxy) ; + virtual bool objectClassIs(JSObject *obj, ESClassValue classValue, + JSContext *cx) ; + virtual JSString *obj_toString(JSContext *cx, JSObject *proxy) ; + virtual JSString *fun_toString(JSContext *cx, JSObject *proxy, + unsigned indent) ; + virtual bool regexp_toShared(JSContext *cx, JSObject *proxy, + RegExpGuard *g) ; + virtual bool defaultValue(JSContext *cx, JSObject *obj, JSType hint, + Value *vp) ; + virtual bool iteratorNext(JSContext *cx, JSObject *proxy, + Value *vp) ; +}; + +class __attribute__((visibility("default"))) DirectProxyHandler : public IndirectProxyHandler { +public: + explicit DirectProxyHandler(void *family); + + + virtual bool has(JSContext *cx, JSObject *proxy, jsid id, + bool *bp) ; + virtual bool hasOwn(JSContext *cx, JSObject *proxy, jsid id, + bool *bp) ; + virtual bool get(JSContext *cx, JSObject *proxy, JSObject *receiver, + jsid id, Value *vp) ; + virtual bool set(JSContext *cx, JSObject *proxy, JSObject *receiver, + jsid id, bool strict, Value *vp) ; + virtual bool keys(JSContext *cx, JSObject *proxy, + AutoIdVector &props) ; + virtual bool iterate(JSContext *cx, JSObject *proxy, unsigned flags, + Value *vp) ; +}; + + +class Proxy { + public: + + static bool getPropertyDescriptor(JSContext *cx, JSObject *proxy, jsid id, bool set, + PropertyDescriptor *desc); + static bool getPropertyDescriptor(JSContext *cx, JSObject *proxy, jsid id, bool set, Value *vp); + static bool getOwnPropertyDescriptor(JSContext *cx, JSObject *proxy, jsid id, bool set, + PropertyDescriptor *desc); + static bool getOwnPropertyDescriptor(JSContext *cx, JSObject *proxy, jsid id, bool set, + Value *vp); + static bool defineProperty(JSContext *cx, JSObject *proxy, jsid id, PropertyDescriptor *desc); + static bool defineProperty(JSContext *cx, JSObject *proxy, jsid id, const Value &v); + static bool getOwnPropertyNames(JSContext *cx, JSObject *proxy, AutoIdVector &props); + static bool delete_(JSContext *cx, JSObject *proxy, jsid id, bool *bp); + static bool enumerate(JSContext *cx, JSObject *proxy, AutoIdVector &props); + + + static bool has(JSContext *cx, JSObject *proxy, jsid id, bool *bp); + static bool hasOwn(JSContext *cx, JSObject *proxy, jsid id, bool *bp); + static bool get(JSContext *cx, JSObject *proxy, JSObject *receiver, jsid id, Value *vp); + static bool getElementIfPresent(JSContext *cx, JSObject *proxy, JSObject *receiver, + uint32_t index, Value *vp, bool *present); + static bool set(JSContext *cx, JSObject *proxy, JSObject *receiver, jsid id, bool strict, + Value *vp); + static bool keys(JSContext *cx, JSObject *proxy, AutoIdVector &props); + static bool iterate(JSContext *cx, JSObject *proxy, unsigned flags, Value *vp); + + + static bool call(JSContext *cx, JSObject *proxy, unsigned argc, Value *vp); + static bool construct(JSContext *cx, JSObject *proxy, unsigned argc, Value *argv, Value *rval); + static bool nativeCall(JSContext *cx, JSObject *proxy, Class *clasp, Native native, CallArgs args); + static bool hasInstance(JSContext *cx, JSObject *proxy, const Value *vp, bool *bp); + static JSType typeOf(JSContext *cx, JSObject *proxy); + static bool objectClassIs(JSObject *obj, ESClassValue classValue, JSContext *cx); + static JSString *obj_toString(JSContext *cx, JSObject *proxy); + static JSString *fun_toString(JSContext *cx, JSObject *proxy, unsigned indent); + static bool regexp_toShared(JSContext *cx, JSObject *proxy, RegExpGuard *g); + static bool defaultValue(JSContext *cx, JSObject *obj, JSType hint, Value *vp); + static bool iteratorNext(JSContext *cx, JSObject *proxy, Value *vp); +}; + +inline bool IsObjectProxyClass(const Class *clasp) +{ + return clasp == &js::ObjectProxyClass || clasp == &js::OuterWindowProxyClass; +} + +inline bool IsFunctionProxyClass(const Class *clasp) +{ + return clasp == &js::FunctionProxyClass; +} + +inline bool IsObjectProxy(const JSObject *obj) +{ + return IsObjectProxyClass(GetObjectClass(obj)); +} + +inline bool IsFunctionProxy(const JSObject *obj) +{ + return IsFunctionProxyClass(GetObjectClass(obj)); +} + +inline bool IsProxy(const JSObject *obj) +{ + Class *clasp = GetObjectClass(obj); + return IsObjectProxyClass(clasp) || IsFunctionProxyClass(clasp); +} + + +const uint32_t JSSLOT_PROXY_HANDLER = 0; +const uint32_t JSSLOT_PROXY_PRIVATE = 1; +const uint32_t JSSLOT_PROXY_EXTRA = 2; + +const uint32_t JSSLOT_PROXY_CALL = 4; +const uint32_t JSSLOT_PROXY_CONSTRUCT = 5; + +inline BaseProxyHandler * +GetProxyHandler(const JSObject *obj) +{ + do { } while(0); + return (BaseProxyHandler *) GetReservedSlot(obj, JSSLOT_PROXY_HANDLER).toPrivate(); +} + +inline const Value & +GetProxyPrivate(const JSObject *obj) +{ + do { } while(0); + return GetReservedSlot(obj, JSSLOT_PROXY_PRIVATE); +} + +inline JSObject * +GetProxyTargetObject(const JSObject *obj) +{ + do { } while(0); + return GetProxyPrivate(obj).toObjectOrNull(); +} + +inline const Value & +GetProxyCall(const JSObject *obj) +{ + do { } while(0); + return GetReservedSlot(obj, JSSLOT_PROXY_CALL); +} + +inline const Value & +GetProxyExtra(const JSObject *obj, size_t n) +{ + do { } while(0); + return GetReservedSlot(obj, JSSLOT_PROXY_EXTRA + n); +} + +inline void +SetProxyHandler(JSObject *obj, BaseProxyHandler *handler) +{ + do { } while(0); + SetReservedSlot(obj, JSSLOT_PROXY_HANDLER, PrivateValue(handler)); +} + +inline void +SetProxyPrivate(JSObject *obj, const Value &value) +{ + do { } while(0); + SetReservedSlot(obj, JSSLOT_PROXY_PRIVATE, value); +} + +inline void +SetProxyExtra(JSObject *obj, size_t n, const Value &extra) +{ + do { } while(0); + do { } while(0); + SetReservedSlot(obj, JSSLOT_PROXY_EXTRA + n, extra); +} + +__attribute__((visibility("default"))) JSObject * +NewProxyObject(JSContext *cx, BaseProxyHandler *handler, const Value &priv, + JSObject *proto, JSObject *parent, + JSObject *call = __null, JSObject *construct = __null); + +} + +extern "C" { + +extern __attribute__((visibility("default"))) JSObject * +js_InitProxyClass(JSContext *cx, JSObject *obj); + +} +# 25 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypedarray.h" 1 + + + + + + + +#define jstypedarray_h + + + + + + + +typedef struct JSProperty JSProperty; + +namespace js { +# 28 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypedarray.h" +class ArrayBufferObject : public JSObject +{ + public: + static Class protoClass; + static JSPropertySpec jsprops[]; + static JSFunctionSpec jsfuncs[]; + + static JSBool prop_getByteLength(JSContext *cx, HandleObject obj, HandleId id, Value *vp); + + static JSBool fun_slice(JSContext *cx, unsigned argc, Value *vp); + + static JSBool class_constructor(JSContext *cx, unsigned argc, Value *vp); + + static JSObject *create(JSContext *cx, uint32_t nbytes, uint8_t *contents = __null); + + static JSObject *createSlice(JSContext *cx, ArrayBufferObject &arrayBuffer, + uint32_t begin, uint32_t end); + + static void + obj_trace(JSTracer *trc, JSObject *obj); + + static JSBool + obj_lookupGeneric(JSContext *cx, HandleObject obj, HandleId id, + JSObject **objp, JSProperty **propp); + static JSBool + obj_lookupProperty(JSContext *cx, HandleObject obj, HandlePropertyName name, + JSObject **objp, JSProperty **propp); + static JSBool + obj_lookupElement(JSContext *cx, HandleObject obj, uint32_t index, + JSObject **objp, JSProperty **propp); + static JSBool + obj_lookupSpecial(JSContext *cx, HandleObject obj, HandleSpecialId sid, JSObject **objp, + JSProperty **propp); + + static JSBool + obj_defineGeneric(JSContext *cx, HandleObject obj, HandleId id, const Value *v, + PropertyOp getter, StrictPropertyOp setter, unsigned attrs); + static JSBool + obj_defineProperty(JSContext *cx, HandleObject obj, HandlePropertyName name, const Value *v, + PropertyOp getter, StrictPropertyOp setter, unsigned attrs); + static JSBool + obj_defineElement(JSContext *cx, HandleObject obj, uint32_t index, const Value *v, + PropertyOp getter, StrictPropertyOp setter, unsigned attrs); + static JSBool + obj_defineSpecial(JSContext *cx, HandleObject obj, HandleSpecialId sid, const Value *v, + PropertyOp getter, StrictPropertyOp setter, unsigned attrs); + + static JSBool + obj_getGeneric(JSContext *cx, HandleObject obj, HandleObject receiver, HandleId id, Value *vp); + + static JSBool + obj_getProperty(JSContext *cx, HandleObject obj, HandleObject receiver, HandlePropertyName name, + Value *vp); + + static JSBool + obj_getElement(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index, Value *vp); + static JSBool + obj_getElementIfPresent(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index, + Value *vp, bool *present); + + static JSBool + obj_getSpecial(JSContext *cx, HandleObject obj, HandleObject receiver, HandleSpecialId sid, Value *vp); + + static JSBool + obj_setGeneric(JSContext *cx, HandleObject obj, HandleId id, Value *vp, JSBool strict); + static JSBool + obj_setProperty(JSContext *cx, HandleObject obj, HandlePropertyName name, Value *vp, JSBool strict); + static JSBool + obj_setElement(JSContext *cx, HandleObject obj, uint32_t index, Value *vp, JSBool strict); + static JSBool + obj_setSpecial(JSContext *cx, HandleObject obj, HandleSpecialId sid, Value *vp, JSBool strict); + + static JSBool + obj_getGenericAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp); + static JSBool + obj_getPropertyAttributes(JSContext *cx, HandleObject obj, HandlePropertyName name, unsigned *attrsp); + static JSBool + obj_getElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp); + static JSBool + obj_getSpecialAttributes(JSContext *cx, HandleObject obj, HandleSpecialId sid, unsigned *attrsp); + + static JSBool + obj_setGenericAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp); + static JSBool + obj_setPropertyAttributes(JSContext *cx, HandleObject obj, HandlePropertyName name, unsigned *attrsp); + static JSBool + obj_setElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp); + static JSBool + obj_setSpecialAttributes(JSContext *cx, HandleObject obj, HandleSpecialId sid, unsigned *attrsp); + + static JSBool + obj_deleteProperty(JSContext *cx, HandleObject obj, HandlePropertyName name, Value *rval, JSBool strict); + static JSBool + obj_deleteElement(JSContext *cx, HandleObject obj, uint32_t index, Value *rval, JSBool strict); + static JSBool + obj_deleteSpecial(JSContext *cx, HandleObject obj, HandleSpecialId sid, Value *rval, JSBool strict); + + static JSBool + obj_enumerate(JSContext *cx, HandleObject obj, JSIterateOp enum_op, + Value *statep, jsid *idp); + + static JSType + obj_typeOf(JSContext *cx, HandleObject obj); + + bool + allocateSlots(JSContext *cx, uint32_t size, uint8_t *contents = __null); + + inline uint32_t byteLength() const; + + inline uint8_t * dataPointer() const; + + + + + + inline bool hasData() const; +}; +# 154 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jstypedarray.h" +struct TypedArray { + enum { + TYPE_INT8 = 0, + TYPE_UINT8, + TYPE_INT16, + TYPE_UINT16, + TYPE_INT32, + TYPE_UINT32, + TYPE_FLOAT32, + TYPE_FLOAT64, + + + + + + TYPE_UINT8_CLAMPED, + + TYPE_MAX + }; + + enum { + + FIELD_LENGTH = 0, + FIELD_BYTEOFFSET, + FIELD_BYTELENGTH, + FIELD_TYPE, + FIELD_BUFFER, + FIELD_MAX, + NUM_FIXED_SLOTS = 7 + }; + + + static Class classes[TYPE_MAX]; + + + + static Class protoClasses[TYPE_MAX]; + + static JSPropertySpec jsprops[]; + + static JSBool prop_getBuffer(JSContext *cx, HandleObject obj, HandleId id, Value *vp); + static JSBool prop_getByteOffset(JSContext *cx, HandleObject obj, HandleId id, Value *vp); + static JSBool prop_getByteLength(JSContext *cx, HandleObject obj, HandleId id, Value *vp); + static JSBool prop_getLength(JSContext *cx, HandleObject obj, HandleId id, Value *vp); + + static JSBool obj_lookupGeneric(JSContext *cx, HandleObject obj, HandleId id, + JSObject **objp, JSProperty **propp); + static JSBool obj_lookupProperty(JSContext *cx, HandleObject obj, HandlePropertyName name, + JSObject **objp, JSProperty **propp); + static JSBool obj_lookupElement(JSContext *cx, HandleObject obj, uint32_t index, + JSObject **objp, JSProperty **propp); + static JSBool obj_lookupSpecial(JSContext *cx, HandleObject obj, HandleSpecialId sid, + JSObject **objp, JSProperty **propp); + + static JSBool obj_getGenericAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp); + static JSBool obj_getPropertyAttributes(JSContext *cx, HandleObject obj, HandlePropertyName name, unsigned *attrsp); + static JSBool obj_getElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp); + static JSBool obj_getSpecialAttributes(JSContext *cx, HandleObject obj, HandleSpecialId sid, unsigned *attrsp); + + static JSBool obj_setGenericAttributes(JSContext *cx, HandleObject obj, HandleId id, unsigned *attrsp); + static JSBool obj_setPropertyAttributes(JSContext *cx, HandleObject obj, HandlePropertyName name, unsigned *attrsp); + static JSBool obj_setElementAttributes(JSContext *cx, HandleObject obj, uint32_t index, unsigned *attrsp); + static JSBool obj_setSpecialAttributes(JSContext *cx, HandleObject obj, HandleSpecialId sid, unsigned *attrsp); + + static uint32_t getLength(JSObject *obj); + static uint32_t getByteOffset(JSObject *obj); + static uint32_t getByteLength(JSObject *obj); + static uint32_t getType(JSObject *obj); + static ArrayBufferObject * getBuffer(JSObject *obj); + static void * getDataOffset(JSObject *obj); + + public: + static bool + isArrayIndex(JSContext *cx, JSObject *obj, jsid id, uint32_t *ip = __null); + + static inline uint32_t slotWidth(int atype) { + switch (atype) { + case js::TypedArray::TYPE_INT8: + case js::TypedArray::TYPE_UINT8: + case js::TypedArray::TYPE_UINT8_CLAMPED: + return 1; + case js::TypedArray::TYPE_INT16: + case js::TypedArray::TYPE_UINT16: + return 2; + case js::TypedArray::TYPE_INT32: + case js::TypedArray::TYPE_UINT32: + case js::TypedArray::TYPE_FLOAT32: + return 4; + case js::TypedArray::TYPE_FLOAT64: + return 8; + default: + __builtin_unreachable(); + return 0; + } + } + + static inline int slotWidth(JSObject *obj) { + return slotWidth(getType(obj)); + } + + static int lengthOffset(); + static int dataOffset(); +}; + +inline bool +IsTypedArrayClass(const Class *clasp) +{ + return &TypedArray::classes[0] <= clasp && + clasp < &TypedArray::classes[TypedArray::TYPE_MAX]; +} + +inline bool +IsTypedArrayProtoClass(const Class *clasp) +{ + return &TypedArray::protoClasses[0] <= clasp && + clasp < &TypedArray::protoClasses[TypedArray::TYPE_MAX]; +} + +inline bool +IsTypedArray(JSObject *obj) +{ + return IsTypedArrayClass(obj->getClass()); +} + +inline bool +IsTypedArrayProto(JSObject *obj) +{ + return IsTypedArrayProtoClass(obj->getClass()); +} + +class DataViewObject : public JSObject +{ + static Class protoClass; + + static const size_t BYTEOFFSET_SLOT = 0; + static const size_t BYTELENGTH_SLOT = 1; + static const size_t BUFFER_SLOT = 2; + + public: + static const size_t RESERVED_SLOTS = 3; + + static JSBool prop_getBuffer(JSContext *cx, HandleObject obj, HandleId id, Value *vp); + static JSBool prop_getByteOffset(JSContext *cx, HandleObject obj, HandleId id, Value *vp); + static JSBool prop_getByteLength(JSContext *cx, HandleObject obj, HandleId id, Value *vp); + + static JSBool class_constructor(JSContext *cx, unsigned argc, Value *vp); + static JSBool constructWithProto(JSContext *cx, unsigned argc, Value *vp); + static JSBool construct(JSContext *cx, JSObject *bufobj, const CallArgs &args, JSObject *proto); + + static inline DataViewObject * + create(JSContext *cx, uint32_t byteOffset, uint32_t byteLength, + Handle arrayBuffer, JSObject *proto); + + static JSBool fun_getInt8(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_getUint8(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_getInt16(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_getUint16(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_getInt32(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_getUint32(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_getFloat32(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_getFloat64(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_setInt8(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_setUint8(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_setInt16(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_setUint16(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_setInt32(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_setUint32(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_setFloat32(JSContext *cx, unsigned argc, Value *vp); + static JSBool fun_setFloat64(JSContext *cx, unsigned argc, Value *vp); + inline uint32_t byteLength(); + inline uint32_t byteOffset(); + inline JSObject & arrayBuffer(); + inline void *dataPointer(); + inline bool hasBuffer() const; + static JSObject *initClass(JSContext *cx, GlobalObject *global); + bool getDataPointer(JSContext *cx, CallArgs args, size_t typeSize, uint8_t **data); + template + bool read(JSContext *cx, CallArgs &args, NativeType *val, const char *method); + template + bool write(JSContext *cx, CallArgs &args, const char *method); + private: + static JSPropertySpec jsprops[]; + static JSFunctionSpec jsfuncs[]; +}; + +bool +IsDataView(JSObject *obj); + +} +# 28 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsxml.h" 1 + + + + + + + +#define jsxml_h___ +# 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsxml.h" +extern const char js_AnyName_str[]; +extern const char js_AttributeName_str[]; +extern const char js_isXMLName_str[]; +extern const char js_XMLList_str[]; + +extern const char js_amp_entity_str[]; +extern const char js_gt_entity_str[]; +extern const char js_lt_entity_str[]; +extern const char js_quot_entity_str[]; + +template +struct JSXMLArrayCursor; + +template +struct JSXMLArray +{ + uint32_t length; + uint32_t capacity; + js::HeapPtr *vector; + JSXMLArrayCursor *cursors; + + void init() { + length = capacity = 0; + vector = __null; + cursors = __null; + } + + void finish(js::FreeOp *fop); + + bool setCapacity(JSContext *cx, uint32_t capacity); + void trim(); +}; + +template +struct JSXMLArrayCursor +{ + typedef js::HeapPtr HeapPtrT; + + JSXMLArray *array; + uint32_t index; + JSXMLArrayCursor *next; + JSXMLArrayCursor **prevp; + HeapPtrT root; + + JSXMLArrayCursor(JSXMLArray *array) + : array(array), index(0), next(array->cursors), prevp(&array->cursors), + root(__null) + { + if (next) + next->prevp = &next; + array->cursors = this; + } + + ~JSXMLArrayCursor() { disconnect(); } + + void disconnect() { + if (!array) + return; + if (next) + next->prevp = prevp; + *prevp = next; + array = __null; + root.~HeapPtrT(); + } + + T *getNext() { + if (!array || index >= array->length) + return __null; + return root = array->vector[index++]; + } + + T *getCurrent() { + if (!array || index >= array->length) + return __null; + return root = array->vector[index]; + } +}; + +void js_XMLArrayCursorTrace(JSTracer *trc, JSXMLArrayCursor *cursor); +void js_XMLArrayCursorTrace(JSTracer *trc, JSXMLArrayCursor *cursor); + +#define JSXML_PRESET_CAPACITY JS_BIT(31) +#define JSXML_CAPACITY_MASK JS_BITMASK(31) +#define JSXML_CAPACITY(array) ((array)->capacity & JSXML_CAPACITY_MASK) + + + + + +typedef enum JSXMLClass { + JSXML_CLASS_LIST, + JSXML_CLASS_ELEMENT, + JSXML_CLASS_ATTRIBUTE, + JSXML_CLASS_PROCESSING_INSTRUCTION, + JSXML_CLASS_TEXT, + JSXML_CLASS_COMMENT, + JSXML_CLASS_LIMIT +} JSXMLClass; + +#define JSXML_CLASS_HAS_KIDS(class_) ((class_) < JSXML_CLASS_ATTRIBUTE) +#define JSXML_CLASS_HAS_VALUE(class_) ((class_) >= JSXML_CLASS_ATTRIBUTE) +#define JSXML_CLASS_HAS_NAME(class_) ((unsigned)((class_) - JSXML_CLASS_ELEMENT) <= (unsigned)(JSXML_CLASS_PROCESSING_INSTRUCTION - JSXML_CLASS_ELEMENT)) + + + + + + + +typedef struct JSXMLListVar { + JSXMLArray kids; + js::HeapPtrXML target; + js::HeapPtrObject targetprop; +} JSXMLListVar; + +typedef struct JSXMLElemVar { + JSXMLArray kids; + JSXMLArray namespaces; + JSXMLArray attrs; +} JSXMLElemVar; + + +#define xml_kids list.kids +#define xml_target list.target +#define xml_targetprop list.targetprop +#define xml_namespaces elem.namespaces +#define xml_attrs elem.attrs +#define xml_value value + + +#define JSXML_HAS_KIDS(xml) JSXML_CLASS_HAS_KIDS((xml)->xml_class) +#define JSXML_HAS_VALUE(xml) JSXML_CLASS_HAS_VALUE((xml)->xml_class) +#define JSXML_HAS_NAME(xml) JSXML_CLASS_HAS_NAME((xml)->xml_class) +#define JSXML_LENGTH(xml) (JSXML_CLASS_HAS_KIDS((xml)->xml_class) ? (xml)->xml_kids.length : 0) + + + +struct JSXML : js::gc::Cell { + + + + + js::HeapPtrObject object; + void *domnode; + js::HeapPtrXML parent; + js::HeapPtrObject name; + uint32_t xml_class; + uint32_t xml_flags; + + JSXMLListVar list; + JSXMLElemVar elem; + js::HeapPtrString value; + + + + void *pad; + + + void finalize(js::FreeOp *fop); + + static void writeBarrierPre(JSXML *xml); + static void writeBarrierPost(JSXML *xml, void *addr); +}; + + +#define XMLF_WHITESPACE_TEXT 0x1 + +extern JSXML * +js_NewXML(JSContext *cx, JSXMLClass xml_class); + +extern void +js_TraceXML(JSTracer *trc, JSXML *xml); + +extern JSObject * +js_NewXMLObject(JSContext *cx, JSXMLClass xml_class); + +extern JSObject * +js_GetXMLObject(JSContext *cx, JSXML *xml); + +extern JSObject * +js_InitNamespaceClass(JSContext *cx, JSObject *obj); + +extern JSObject * +js_InitQNameClass(JSContext *cx, JSObject *obj); + +extern JSObject * +js_InitXMLClass(JSContext *cx, JSObject *obj); + +extern JSObject * +js_InitXMLClasses(JSContext *cx, JSObject *obj); + + + + + +extern bool +js_GetLocalNameFromFunctionQName(JSObject *obj, jsid *funidp, JSContext *cx); + +extern JSBool +js_GetDefaultXMLNamespace(JSContext *cx, jsval *vp); + +extern JSBool +js_SetDefaultXMLNamespace(JSContext *cx, const js::Value &v); + + + + + + +extern JSBool +js_IsXMLName(JSContext *cx, jsval v); + +extern JSBool +js_ToAttributeName(JSContext *cx, js::Value *vp); + +extern JSFlatString * +js_EscapeAttributeValue(JSContext *cx, JSString *str, JSBool quote); + +extern JSString * +js_AddAttributePart(JSContext *cx, JSBool isName, JSString *str, + JSString *str2); + +extern JSFlatString * +js_EscapeElementValue(JSContext *cx, JSString *str); + +extern JSString * +js_ValueToXMLString(JSContext *cx, const js::Value &v); + +extern JSObject * +js_ConstructXMLQNameObject(JSContext *cx, const js::Value & nsval, + const js::Value & lnval); + +extern JSBool +js_GetAnyName(JSContext *cx, jsid *idp); + + + + +extern JSBool +js_FindXMLProperty(JSContext *cx, const js::Value &nameval, JSObject **objp, jsid *idp); + +extern JSBool +js_GetXMLMethod(JSContext *cx, js::HandleObject obj, jsid id, js::Value *vp); + +extern JSBool +js_GetXMLDescendants(JSContext *cx, JSObject *obj, jsval id, jsval *vp); + +extern JSBool +js_DeleteXMLListElements(JSContext *cx, JSObject *listobj); + +extern JSBool +js_StepXMLListFilter(JSContext *cx, JSBool initialized); + +extern JSObject * +js_ValueToXMLObject(JSContext *cx, const js::Value &v); + +extern JSObject * +js_ValueToXMLListObject(JSContext *cx, const js::Value &v); + +extern JSObject * +js_NewXMLSpecialObject(JSContext *cx, JSXMLClass xml_class, JSString *name, + JSString *value); + +extern JSString * +js_MakeXMLCDATAString(JSContext *cx, JSString *str); + +extern JSString * +js_MakeXMLCommentString(JSContext *cx, JSString *str); + +extern JSString * +js_MakeXMLPIString(JSContext *cx, JSString *name, JSString *str); + + +extern JSBool +js_TestXMLEquality(JSContext *cx, const js::Value &v1, const js::Value &v2, + JSBool *bp); + +extern JSBool +js_ConcatenateXML(JSContext *cx, JSObject *obj1, JSObject *obj2, js::Value *vp); + +namespace js { + +extern bool +GetLocalNameFromFunctionQName(JSObject *qn, JSAtom **namep, JSContext *cx); + +} +# 29 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jswrapper.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jswrapper.h" +#define jswrapper_h___ + + + + + + +namespace js { + +class DummyFrameGuard; + + + + + + +class __attribute__((visibility("default"))) AbstractWrapper : public IndirectProxyHandler +{ + unsigned mFlags; + public: + unsigned flags() const { return mFlags; } + + explicit AbstractWrapper(unsigned flags); + + + virtual bool getPropertyDescriptor(JSContext *cx, JSObject *wrapper, jsid id, bool set, + PropertyDescriptor *desc) ; + virtual bool getOwnPropertyDescriptor(JSContext *cx, JSObject *wrapper, jsid id, bool set, + PropertyDescriptor *desc) ; + virtual bool defineProperty(JSContext *cx, JSObject *wrapper, jsid id, + PropertyDescriptor *desc) ; + virtual bool getOwnPropertyNames(JSContext *cx, JSObject *wrapper, AutoIdVector &props) ; + virtual bool delete_(JSContext *cx, JSObject *wrapper, jsid id, bool *bp) ; + virtual bool enumerate(JSContext *cx, JSObject *wrapper, AutoIdVector &props) ; +# 72 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jswrapper.h" + enum Action { GET, SET, CALL, PUNCTURE }; + virtual bool enter(JSContext *cx, JSObject *wrapper, jsid id, Action act, bool *bp); + virtual void leave(JSContext *cx, JSObject *wrapper); + + static JSObject *wrappedObject(const JSObject *wrapper); + static AbstractWrapper *wrapperHandler(const JSObject *wrapper); +}; + + +class __attribute__((visibility("default"))) DirectWrapper : public AbstractWrapper +{ + public: + explicit DirectWrapper(unsigned flags); + + typedef enum { PermitObjectAccess, PermitPropertyAccess, DenyAccess } Permission; + + virtual ~DirectWrapper(); + + + virtual bool has(JSContext *cx, JSObject *wrapper, jsid id, bool *bp) ; + virtual bool hasOwn(JSContext *cx, JSObject *wrapper, jsid id, bool *bp) ; + virtual bool get(JSContext *cx, JSObject *wrapper, JSObject *receiver, jsid id, Value *vp) ; + virtual bool set(JSContext *cx, JSObject *wrapper, JSObject *receiver, jsid id, bool strict, + Value *vp) ; + virtual bool keys(JSContext *cx, JSObject *wrapper, AutoIdVector &props) ; + virtual bool iterate(JSContext *cx, JSObject *wrapper, unsigned flags, Value *vp) ; + + + virtual bool call(JSContext *cx, JSObject *wrapper, unsigned argc, Value *vp) ; + virtual bool construct(JSContext *cx, JSObject *wrapper, unsigned argc, Value *argv, Value *rval) ; + virtual bool nativeCall(JSContext *cx, JSObject *wrapper, Class *clasp, Native native, CallArgs args) ; + virtual bool hasInstance(JSContext *cx, JSObject *wrapper, const Value *vp, bool *bp) ; + virtual JSString *obj_toString(JSContext *cx, JSObject *wrapper) ; + virtual JSString *fun_toString(JSContext *cx, JSObject *wrapper, unsigned indent) ; + + using AbstractWrapper::Action; + + static DirectWrapper singleton; + + static JSObject *New(JSContext *cx, JSObject *obj, JSObject *proto, JSObject *parent, + DirectWrapper *handler); + + using AbstractWrapper::wrappedObject; + using AbstractWrapper::wrapperHandler; + + enum { + CROSS_COMPARTMENT = 1 << 0, + LAST_USED_FLAG = CROSS_COMPARTMENT + }; + + static void *getWrapperFamily(); +}; + + + + + +typedef DirectWrapper Wrapper; + + +class __attribute__((visibility("default"))) CrossCompartmentWrapper : public DirectWrapper +{ + public: + CrossCompartmentWrapper(unsigned flags); + + virtual ~CrossCompartmentWrapper(); + + + virtual bool getPropertyDescriptor(JSContext *cx, JSObject *wrapper, jsid id, bool set, + PropertyDescriptor *desc) ; + virtual bool getOwnPropertyDescriptor(JSContext *cx, JSObject *wrapper, jsid id, bool set, + PropertyDescriptor *desc) ; + virtual bool defineProperty(JSContext *cx, JSObject *wrapper, jsid id, + PropertyDescriptor *desc) ; + virtual bool getOwnPropertyNames(JSContext *cx, JSObject *wrapper, AutoIdVector &props) ; + virtual bool delete_(JSContext *cx, JSObject *wrapper, jsid id, bool *bp) ; + virtual bool enumerate(JSContext *cx, JSObject *wrapper, AutoIdVector &props) ; + + + virtual bool has(JSContext *cx, JSObject *wrapper, jsid id, bool *bp) ; + virtual bool hasOwn(JSContext *cx, JSObject *wrapper, jsid id, bool *bp) ; + virtual bool get(JSContext *cx, JSObject *wrapper, JSObject *receiver, jsid id, Value *vp) ; + virtual bool set(JSContext *cx, JSObject *wrapper, JSObject *receiver, jsid id, bool strict, + Value *vp) ; + virtual bool keys(JSContext *cx, JSObject *wrapper, AutoIdVector &props) ; + virtual bool iterate(JSContext *cx, JSObject *wrapper, unsigned flags, Value *vp) ; + + + virtual bool call(JSContext *cx, JSObject *wrapper, unsigned argc, Value *vp) ; + virtual bool construct(JSContext *cx, JSObject *wrapper, unsigned argc, Value *argv, Value *rval) ; + virtual bool nativeCall(JSContext *cx, JSObject *wrapper, Class *clasp, Native native, CallArgs args) ; + virtual bool hasInstance(JSContext *cx, JSObject *wrapper, const Value *vp, bool *bp) ; + virtual JSString *obj_toString(JSContext *cx, JSObject *wrapper) ; + virtual JSString *fun_toString(JSContext *cx, JSObject *wrapper, unsigned indent) ; + virtual bool regexp_toShared(JSContext *cx, JSObject *proxy, RegExpGuard *g) ; + virtual bool defaultValue(JSContext *cx, JSObject *wrapper, JSType hint, Value *vp) ; + virtual bool iteratorNext(JSContext *cx, JSObject *wrapper, Value *vp); + + static CrossCompartmentWrapper singleton; +}; +# 182 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jswrapper.h" +template +class __attribute__((visibility("default"))) SecurityWrapper : public Base +{ + public: + SecurityWrapper(unsigned flags); + + virtual bool nativeCall(JSContext *cx, JSObject *wrapper, Class *clasp, Native native, CallArgs args) ; + virtual bool objectClassIs(JSObject *obj, ESClassValue classValue, JSContext *cx) ; + virtual bool regexp_toShared(JSContext *cx, JSObject *proxy, RegExpGuard *g) ; +}; + +typedef SecurityWrapper SameCompartmentSecurityWrapper; +typedef SecurityWrapper CrossCompartmentSecurityWrapper; + + + + + +class __attribute__((visibility("default"))) ForceFrame +{ + public: + JSContext * const context; + JSObject * const target; + private: + DummyFrameGuard *frame; + + public: + ForceFrame(JSContext *cx, JSObject *target); + ~ForceFrame(); + bool enter(); +}; + + +class __attribute__((visibility("default"))) DeadObjectProxy : public BaseProxyHandler +{ + public: + static int sDeadObjectFamily; + + explicit DeadObjectProxy(); + + + virtual bool getPropertyDescriptor(JSContext *cx, JSObject *wrapper, jsid id, bool set, + PropertyDescriptor *desc) ; + virtual bool getOwnPropertyDescriptor(JSContext *cx, JSObject *wrapper, jsid id, bool set, + PropertyDescriptor *desc) ; + virtual bool defineProperty(JSContext *cx, JSObject *wrapper, jsid id, + PropertyDescriptor *desc) ; + virtual bool getOwnPropertyNames(JSContext *cx, JSObject *wrapper, AutoIdVector &props) ; + virtual bool delete_(JSContext *cx, JSObject *wrapper, jsid id, bool *bp) ; + virtual bool enumerate(JSContext *cx, JSObject *wrapper, AutoIdVector &props) ; + + + virtual bool call(JSContext *cx, JSObject *proxy, unsigned argc, Value *vp); + virtual bool construct(JSContext *cx, JSObject *proxy, unsigned argc, Value *argv, Value *rval); + virtual bool nativeCall(JSContext *cx, JSObject *proxy, Class *clasp, Native native, CallArgs args); + virtual bool hasInstance(JSContext *cx, JSObject *proxy, const Value *vp, bool *bp); + virtual bool objectClassIs(JSObject *obj, ESClassValue classValue, JSContext *cx); + virtual JSString *obj_toString(JSContext *cx, JSObject *proxy); + virtual JSString *fun_toString(JSContext *cx, JSObject *proxy, unsigned indent); + virtual bool regexp_toShared(JSContext *cx, JSObject *proxy, RegExpGuard *g); + virtual bool defaultValue(JSContext *cx, JSObject *obj, JSType hint, Value *vp); + virtual bool iteratorNext(JSContext *cx, JSObject *proxy, Value *vp); + virtual bool getElementIfPresent(JSContext *cx, JSObject *obj, JSObject *receiver, + uint32_t index, Value *vp, bool *present); + + + static DeadObjectProxy singleton; +}; + +extern JSObject * +TransparentObjectWrapper(JSContext *cx, JSObject *obj, JSObject *wrappedProto, JSObject *parent, + unsigned flags); + + + +extern __attribute__((visibility("default"))) int sWrapperFamily; + +inline bool +IsWrapper(const JSObject *obj) +{ + return IsProxy(obj) && GetProxyHandler(obj)->family() == &sWrapperFamily; +} + + + + + +__attribute__((visibility("default"))) JSObject * +UnwrapObject(JSObject *obj, bool stopAtOuter = true, unsigned *flagsp = __null); + + + + + +__attribute__((visibility("default"))) JSObject * +UnwrapObjectChecked(JSContext *cx, JSObject *obj); + +__attribute__((visibility("default"))) bool +IsCrossCompartmentWrapper(const JSObject *obj); + +JSObject * +NewDeadProxyObject(JSContext *cx, JSObject *parent); + +void +NukeCrossCompartmentWrapper(JSObject *wrapper); + +} +# 30 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Marking.h" 1 +# 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/BooleanObject.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/BooleanObject.h" +#define BooleanObject_h___ + + + +namespace js { + +class BooleanObject : public JSObject +{ + + static const unsigned PRIMITIVE_VALUE_SLOT = 0; + + public: + static const unsigned RESERVED_SLOTS = 1; + + + + + + static inline BooleanObject *create(JSContext *cx, bool b); + + + + + + static inline BooleanObject *createWithProto(JSContext *cx, bool b, JSObject &proto); + + bool unbox() const { + return getFixedSlot(PRIMITIVE_VALUE_SLOT).toBoolean(); + } + + private: + inline void setPrimitiveValue(bool b) { + setFixedSlot(PRIMITIVE_VALUE_SLOT, BooleanValue(b)); + } + + + friend JSObject * + ::js_InitBooleanClass(JSContext *cx, JSObject *global); +}; + +} +# 35 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumberObject.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/NumberObject.h" +#define NumberObject_h___ + + + +namespace js { + +class NumberObject : public JSObject +{ + + static const unsigned PRIMITIVE_VALUE_SLOT = 0; + + public: + static const unsigned RESERVED_SLOTS = 1; + + + + + + static inline NumberObject *create(JSContext *cx, double d); + + + + + + static inline NumberObject *createWithProto(JSContext *cx, double d, JSObject &proto); + + double unbox() const { + return getFixedSlot(PRIMITIVE_VALUE_SLOT).toNumber(); + } + + private: + inline void setPrimitiveValue(double d) { + setFixedSlot(PRIMITIVE_VALUE_SLOT, NumberValue(d)); + } + + + friend JSObject * + ::js_InitNumberClass(JSContext *cx, JSObject *global); +}; + +} +# 37 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics.h" +#define RegExpStatics_h__ + + + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/MatchPairs.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/MatchPairs.h" +#define MatchPairs_h__ +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/MatchPairs.h" +namespace js { + +struct MatchPair +{ + int start; + int limit; + + MatchPair(int start, int limit) : start(start), limit(limit) {} + + size_t length() const { + do { } while(0); + return limit - start; + } + + bool isUndefined() const { + return start == -1; + } + + void check() const { + do { } while(0); + do { } while (0); + } +}; + +class MatchPairs +{ + size_t pairCount_; + int buffer_[1]; + + explicit MatchPairs(size_t pairCount) : pairCount_(pairCount) { + initPairValues(); + } + + void initPairValues() { + for (int *it = buffer_; it < buffer_ + 2 * pairCount_; ++it) + *it = -1; + } + + static size_t calculateSize(size_t backingPairCount) { + return sizeof(MatchPairs) - sizeof(int) + sizeof(int) * backingPairCount; + } + + int *buffer() { return buffer_; } + + friend class RegExpShared; + + public: + + + + + static MatchPairs *create(LifoAlloc &alloc, size_t pairCount, size_t backingPairCount); + + size_t pairCount() const { return pairCount_; } + + MatchPair pair(size_t i) { + do { } while(0); + return MatchPair(buffer_[2 * i], buffer_[2 * i + 1]); + } + + void displace(size_t amount) { + if (!amount) + return; + + for (int *it = buffer_; it < buffer_ + 2 * pairCount_; ++it) + *it = (*it < 0) ? -1 : *it + amount; + } + + inline void checkAgainst(size_t length); +}; + +} +# 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics.h" 2 + +namespace js { + +class RegExpStatics +{ + typedef Vector Pairs; + Pairs matchPairs; + + HeapPtr matchPairsInput; + + HeapPtr pendingInput; + RegExpFlag flags; + RegExpStatics *bufferLink; + bool copied; + + bool createDependent(JSContext *cx, size_t start, size_t end, Value *out) const; + + inline void copyTo(RegExpStatics &dst); + + inline void aboutToWrite(); + + bool save(JSContext *cx, RegExpStatics *buffer) { + do { } while(0); + buffer->bufferLink = bufferLink; + bufferLink = buffer; + if (!buffer->matchPairs.reserve(matchPairs.length())) { + js_ReportOutOfMemory(cx); + return false; + } + return true; + } + + inline void restore(); + + void checkInvariants() { +# 76 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics.h" + } + + + + + + void checkParenNum(size_t pairNum) const { + do { } while(0); + do { } while(0); + } + + + size_t getParenLength(size_t pairNum) const { + checkParenNum(pairNum); + do { } while(0); + return get(pairNum, 1) - get(pairNum, 0); + } + + int get(size_t pairNum, bool which) const { + do { } while(0); + return matchPairs[2 * pairNum + which]; + } + + + + + + + bool makeMatch(JSContext *cx, size_t checkValidIndex, size_t pairNum, Value *out) const; + + void markFlagsSet(JSContext *cx); + + struct InitBuffer {}; + explicit RegExpStatics(InitBuffer) : bufferLink(__null), copied(false) {} + + friend class PreserveRegExpStatics; + + public: + inline RegExpStatics(); + + static JSObject *create(JSContext *cx, GlobalObject *parent); + + + + inline bool updateFromMatchPairs(JSContext *cx, JSLinearString *input, MatchPairs *newPairs); + inline void setMultiline(JSContext *cx, bool enabled); + + inline void clear(); + + + inline void reset(JSContext *cx, JSString *newInput, bool newMultiline); + + inline void setPendingInput(JSString *newInput); +# 139 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics.h" + private: + size_t pairCount() const { + do { } while(0); + return matchPairs.length() / 2; + } + + public: + size_t parenCount() const { + size_t pc = pairCount(); + do { } while(0); + return pc - 1; + } + + JSString *getPendingInput() const { return pendingInput; } + RegExpFlag getFlags() const { return flags; } + bool multiline() const { return flags & MultilineFlag; } + + size_t matchStart() const { + int start = get(0, 0); + do { } while(0); + return size_t(start); + } + + size_t matchLimit() const { + int limit = get(0, 1); + do { } while(0); + return size_t(limit); + } + + + bool matched() const { + do { } while(0); + do { } while (0); + return get(0, 1) - get(0, 0) > 0; + } + + void mark(JSTracer *trc) { + if (pendingInput) + MarkString(trc, &pendingInput, "res->pendingInput"); + if (matchPairsInput) + MarkString(trc, &matchPairsInput, "res->matchPairsInput"); + } + + bool pairIsPresent(size_t pairNum) const { + return get(pairNum, 0) >= 0; + } + + + + bool createPendingInput(JSContext *cx, Value *out) const; + bool createLastMatch(JSContext *cx, Value *out) const { return makeMatch(cx, 0, 0, out); } + bool createLastParen(JSContext *cx, Value *out) const; + bool createLeftContext(JSContext *cx, Value *out) const; + bool createRightContext(JSContext *cx, Value *out) const; + + + bool createParen(JSContext *cx, size_t pairNum, Value *out) const { + do { } while(0); + if (pairNum >= pairCount()) { + out->setString(cx->runtime->emptyString); + return true; + } + return makeMatch(cx, pairNum * 2, pairNum, out); + } + + + + void getParen(size_t pairNum, JSSubString *out) const; + void getLastMatch(JSSubString *out) const; + void getLastParen(JSSubString *out) const; + void getLeftContext(JSSubString *out) const; + void getRightContext(JSSubString *out) const; + + class AutoRooter : private AutoGCRooter + { + public: + explicit AutoRooter(JSContext *cx, RegExpStatics *statics_ + ) + : AutoGCRooter(cx, REGEXPSTATICS), statics(statics_), skip(cx, statics_) + { + do { } while (0); + } + + friend void AutoGCRooter::trace(JSTracer *trc); + void trace(JSTracer *trc); + + private: + RegExpStatics *statics; + SkipRoot skip; + + }; +}; + +class PreserveRegExpStatics +{ + RegExpStatics * const original; + RegExpStatics buffer; + RegExpStatics::AutoRooter bufferRoot; + + public: + explicit PreserveRegExpStatics(JSContext *cx, RegExpStatics *original) + : original(original), + buffer(RegExpStatics::InitBuffer()), + bufferRoot(cx, &buffer) + {} + + bool init(JSContext *cx) { + return original->save(cx, &buffer); + } + + inline ~PreserveRegExpStatics(); +}; + +size_t SizeOfRegExpStaticsData(const JSObject *obj, JSMallocSizeOfFun mallocSizeOf); + +} +# 38 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/StringObject.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/StringObject.h" +#define StringObject_h___ + + + + +namespace js { + +class StringObject : public JSObject +{ + static const unsigned PRIMITIVE_VALUE_SLOT = 0; + static const unsigned LENGTH_SLOT = 1; + + public: + static const unsigned RESERVED_SLOTS = 2; + + + + + + static inline StringObject *create(JSContext *cx, HandleString str); + + + + + + static inline StringObject *createWithProto(JSContext *cx, HandleString str, JSObject &proto); + + JSString *unbox() const { + return getFixedSlot(PRIMITIVE_VALUE_SLOT).toString(); + } + + inline size_t length() const { + return size_t(getFixedSlot(LENGTH_SLOT).toInt32()); + } + + static size_t getPrimitiveValueOffset() { + return getFixedSlotOffset(PRIMITIVE_VALUE_SLOT); + } + + private: + inline bool init(JSContext *cx, HandleString str); + + void setStringThis(JSString *str) { + do { } while(0); + setFixedSlot(PRIMITIVE_VALUE_SLOT, StringValue(str)); + setFixedSlot(LENGTH_SLOT, Int32Value(int32_t(str->length()))); + } + + + friend JSObject * + ::js_InitStringClass(JSContext *cx, JSObject *global); + + + + + + + Shape *assignInitialShape(JSContext *cx); +}; + +} +# 39 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatominlines.h" 1 + + + + + + + +#define jsatominlines_h___ + + + + + + +# 1 "./../../dist/include/mozilla/RangedPtr.h" 1 +# 14 "./../../dist/include/mozilla/RangedPtr.h" +#define mozilla_RangedPtr_h_ + + + + + +namespace mozilla { +# 41 "./../../dist/include/mozilla/RangedPtr.h" +template +class RangedPtr +{ + T* ptr; + + + + + + + void checkSanity() { + do { } while(0); + do { } while(0); + } + + + RangedPtr create(T *ptr) const { + + + + return RangedPtr(ptr, __null, size_t(0)); + + } + + public: + RangedPtr(T* p, T* start, T* end) + : ptr(p) + + + + { + do { } while(0); + checkSanity(); + } + RangedPtr(T* p, T* start, size_t length) + : ptr(p) + + + + { + do { } while(0); + do { } while(0); + checkSanity(); + } + + + RangedPtr(T* p, size_t length) + : ptr(p) + + + + { + do { } while(0); + do { } while(0); + checkSanity(); + } + + + template + RangedPtr(T arr[N]) + : ptr(arr) + + + + { + checkSanity(); + } + + T* get() const { + return ptr; + } +# 123 "./../../dist/include/mozilla/RangedPtr.h" + RangedPtr& operator=(const RangedPtr& other) { + do { } while(0); + do { } while(0); + ptr = other.ptr; + checkSanity(); + return *this; + } + + RangedPtr operator+(size_t inc) { + do { } while(0); + do { } while(0); + return create(ptr + inc); + } + + RangedPtr operator-(size_t dec) { + do { } while(0); + do { } while(0); + return create(ptr - dec); + } + + + + + + template + RangedPtr& operator=(U* p) { + *this = create(p); + return *this; + } + + template + RangedPtr& operator=(const RangedPtr& p) { + do { } while(0); + do { } while(0); + ptr = p.ptr; + checkSanity(); + return *this; + } + + RangedPtr& operator++() { + return (*this += 1); + } + + RangedPtr operator++(int) { + RangedPtr rcp = *this; + ++*this; + return rcp; + } + + RangedPtr& operator--() { + return (*this -= 1); + } + + RangedPtr operator--(int) { + RangedPtr rcp = *this; + --*this; + return rcp; + } + + RangedPtr& operator+=(size_t inc) { + this->operator=(*this + inc); + return *this; + } + + RangedPtr& operator-=(size_t dec) { + this->operator=(*this - dec); + return *this; + } + + T& operator[](int index) const { + do { } while(0); + return *create(ptr + index); + } + + T& operator*() const { + return *ptr; + } + + template + bool operator==(const RangedPtr& other) const { + return ptr == other.ptr; + } + template + bool operator!=(const RangedPtr& other) const { + return !(*this == other); + } + + template + bool operator==(const U* u) const { + return ptr == u; + } + template + bool operator!=(const U* u) const { + return !(*this == u); + } + + template + bool operator<(const RangedPtr& other) const { + return ptr < other.ptr; + } + template + bool operator<=(const RangedPtr& other) const { + return ptr <= other.ptr; + } + + template + bool operator>(const RangedPtr& other) const { + return ptr > other.ptr; + } + template + bool operator>=(const RangedPtr& other) const { + return ptr >= other.ptr; + } + + size_t operator-(const RangedPtr& other) const { + do { } while(0); + return PointerRangeSize(other.ptr, ptr); + } + + private: + RangedPtr() ; + T* operator&() ; + operator T*() const ; +}; + +} +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatominlines.h" 2 + + +inline JSAtom * +js::AtomStateEntry::asPtr() const +{ + do { } while(0); + JSAtom *atom = reinterpret_cast(bits & NO_TAG_MASK); + JSString::readBarrier(atom); + return atom; +} + +inline bool +js_ValueToAtom(JSContext *cx, const js::Value &v, JSAtom **atomp) +{ + if (!v.isString()) { + JSString *str = js::ToStringSlow(cx, v); + if (!str) + return false; + JS::Anchor anchor(str); + *atomp = js_AtomizeString(cx, str); + return !!*atomp; + } + + JSString *str = v.toString(); + if (str->isAtom()) { + *atomp = &str->asAtom(); + return true; + } + + *atomp = js_AtomizeString(cx, str); + return !!*atomp; +} + +namespace js { + +inline bool +ValueToId(JSContext* cx, JSObject *obj, const Value &v, jsid *idp) +{ + int32_t i; + if (ValueFitsInInt32(v, &i) && INT_FITS_IN_JSID(i)) { + *idp = INT_TO_JSID(i); + return true; + } + + return InternNonIntElementId(cx, obj, v, idp); +} + +inline bool +ValueToId(JSContext* cx, const Value &v, jsid *idp) +{ + return ValueToId(cx, __null, v, idp); +} +# 76 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatominlines.h" +template +inline mozilla::RangedPtr +BackfillIndexInCharBuffer(uint32_t index, mozilla::RangedPtr end) +{ +# 89 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsatominlines.h" + do { + uint32_t next = index / 10, digit = index % 10; + *--end = '0' + digit; + index = next; + } while (index > 0); + + return end; +} + +inline bool +IndexToId(JSContext *cx, uint32_t index, jsid *idp) +{ + MaybeCheckStackRoots(cx); + + if (index <= (2147483647)) { + *idp = INT_TO_JSID(index); + return true; + } + + extern bool IndexToIdSlow(JSContext *cx, uint32_t index, jsid *idp); + return IndexToIdSlow(cx, index, idp); +} + +inline jsid +AtomToId(JSAtom *atom) +{ + typedef int moz_static_assert106[(0 == 0) ? 1 : -1]; + + uint32_t index; + if (atom->isIndex(&index) && index <= (2147483647)) + return INT_TO_JSID((int32_t) index); + + return JSID_FROM_BITS((size_t)atom); +} + +static __attribute__((always_inline)) inline JSFlatString * +IdToString(JSContext *cx, jsid id) +{ + if (JSID_IS_STRING(id)) + return JSID_TO_ATOM(id); + + if ((__builtin_expect((JSID_IS_INT(id)), 1))) + return Int32ToString(cx, JSID_TO_INT(id)); + + JSString *str = ToStringSlow(cx, IdToValue(id)); + if (!str) + return __null; + + return str->ensureFlat(cx); +} + +inline +AtomHasher::Lookup::Lookup(const JSAtom *atom) + : chars(atom->chars()), length(atom->length()), atom(atom) +{} + +inline bool +AtomHasher::match(const AtomStateEntry &entry, const Lookup &lookup) +{ + JSAtom *key = entry.asPtr(); + if (lookup.atom) + return lookup.atom == key; + if (key->length() != lookup.length) + return false; + return PodEqual(key->chars(), lookup.chars, lookup.length); +} + +} +# 41 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfuninlines.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfuninlines.h" +#define jsfuninlines_h___ + + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject-inl.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject-inl.h" +#define ScopeObject_inl_h___ + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject.h" +#define ScopeObject_h___ + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsweakmap.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsweakmap.h" +#define jsweakmap_h___ +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsweakmap.h" +namespace js { +# 68 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsweakmap.h" +static WeakMapBase * const WeakMapNotInList = reinterpret_cast(1); + +typedef Vector WeakMapVector; + + + +class WeakMapBase { + public: + WeakMapBase(JSObject *memOf) : memberOf(memOf), next(WeakMapNotInList) { } + virtual ~WeakMapBase() { } + + void trace(JSTracer *tracer) { + if (((tracer)->callback == __null || (tracer)->callback == GCMarker::GrayCallback)) { + + + + + do { } while(0); + + + + if (next == WeakMapNotInList) { + JSRuntime *rt = tracer->runtime; + next = rt->gcWeakMapList; + rt->gcWeakMapList = this; + } + } else { + + + + + if (tracer->eagerlyTraceWeakMaps) + nonMarkingTrace(tracer); + } + } + + + + + + + + static bool markAllIteratively(JSTracer *tracer); + + + + static void sweepAll(JSTracer *tracer); + + + static void traceAllMappings(WeakMapTracer *tracer); + + void check() { do { } while(0); } + + + static void resetWeakMapList(JSRuntime *rt); + + + static bool saveWeakMapList(JSRuntime *rt, WeakMapVector &vector); + static void restoreWeakMapList(JSRuntime *rt, WeakMapVector &vector); + + protected: + + + virtual void nonMarkingTrace(JSTracer *tracer) = 0; + virtual bool markIteratively(JSTracer *tracer) = 0; + virtual void sweep(JSTracer *tracer) = 0; + virtual void traceMappings(WeakMapTracer *tracer) = 0; + + + JSObject *memberOf; + + private: + + + + + + WeakMapBase *next; +}; + +template > +class WeakMap : public HashMap, public WeakMapBase { + private: + typedef HashMap Base; + typedef typename Base::Enum Enum; + + public: + typedef typename Base::Range Range; + + explicit WeakMap(JSRuntime *rt, JSObject *memOf=__null) : Base(rt), WeakMapBase(memOf) { } + explicit WeakMap(JSContext *cx, JSObject *memOf=__null) : Base(cx), WeakMapBase(memOf) { } + + + Range nondeterministicAll() { + return Base::all(); + } + + private: + bool markValue(JSTracer *trc, Value *x) { + if (gc::IsMarked(x)) + return false; + gc::Mark(trc, x, "WeakMap entry"); + return true; + } + + void nonMarkingTrace(JSTracer *trc) { + for (Range r = Base::all(); !r.empty(); r.popFront()) + markValue(trc, &r.front().value); + } + + bool markIteratively(JSTracer *trc) { + bool markedAny = false; + for (Enum e(*this); !e.empty(); e.popFront()) { + + Key k(e.front().key); + bool keyIsMarked = gc::IsMarked(&k); + if (keyIsMarked) { + if (markValue(trc, &e.front().value)) + markedAny = true; + e.rekeyFront(k); + } + } + return markedAny; + } + + void sweep(JSTracer *trc) { + + for (Enum e(*this); !e.empty(); e.popFront()) { + Key k(e.front().key); + if (!gc::IsMarked(&k)) + e.removeFront(); + } +# 216 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsweakmap.h" + } + + + void traceMappings(WeakMapTracer *tracer) { + for (Range r = Base::all(); !r.empty(); r.popFront()) { + gc::Cell *key = gc::ToMarkable(r.front().key); + gc::Cell *value = gc::ToMarkable(r.front().value); + if (key && value) { + tracer->callback(tracer, memberOf, + key, gc::TraceKind(r.front().key), + value, gc::TraceKind(r.front().value)); + } + } + } +}; + +} + +extern JSObject * +js_InitWeakMapClass(JSContext *cx, JSObject *obj); +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject.h" 2 + +namespace js { +# 33 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject.h" +struct ScopeCoordinate +{ + uint16_t hops; + uint16_t binding; + inline ScopeCoordinate(jsbytecode *pc); +}; + +inline JSAtom * +ScopeCoordinateAtom(JSScript *script, jsbytecode *pc); +# 83 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject.h" +class ScopeObject : public JSObject +{ + + void *getPrivate() const; + + protected: + static const uint32_t SCOPE_CHAIN_SLOT = 0; + + public: + + + + + + inline JSObject &enclosingScope() const; + inline bool setEnclosingScope(JSContext *cx, HandleObject obj); + + + + + + + inline StackFrame *maybeStackFrame() const; + inline void setStackFrame(StackFrame *frame); + + + static inline size_t offsetOfEnclosingScope(); +}; + +class CallObject : public ScopeObject +{ + static const uint32_t CALLEE_SLOT = 1; + + static CallObject * + create(JSContext *cx, JSScript *script, HandleObject enclosing, HandleObject callee); + + public: + static const uint32_t RESERVED_SLOTS = 3; + + static CallObject *createForFunction(JSContext *cx, StackFrame *fp); + static CallObject *createForStrictEval(JSContext *cx, StackFrame *fp); + + + inline bool isForEval() const; + + + + + + inline JSObject *getCallee() const; + inline JSFunction *getCalleeFunction() const; + inline void setCallee(JSObject *callee); + + + inline const Value &arg(unsigned i) const; + inline void setArg(unsigned i, const Value &v); + inline void initArgUnchecked(unsigned i, const Value &v); + + + inline const Value &var(unsigned i) const; + inline void setVar(unsigned i, const Value &v); + inline void initVarUnchecked(unsigned i, const Value &v); + + + + + + + inline HeapSlotArray argArray(); + inline HeapSlotArray varArray(); + + inline void copyValues(unsigned nargs, Value *argv, unsigned nvars, Value *slots); + + static JSBool getArgOp(JSContext *cx, HandleObject obj, HandleId id, Value *vp); + static JSBool getVarOp(JSContext *cx, HandleObject obj, HandleId id, Value *vp); + static JSBool setArgOp(JSContext *cx, HandleObject obj, HandleId id, JSBool strict, Value *vp); + static JSBool setVarOp(JSContext *cx, HandleObject obj, HandleId id, JSBool strict, Value *vp); + + + bool containsVarOrArg(PropertyName *name, Value *vp, JSContext *cx); +}; + +class DeclEnvObject : public ScopeObject +{ + public: + static const uint32_t RESERVED_SLOTS = 1; + static const gc::AllocKind FINALIZE_KIND = gc::FINALIZE_OBJECT2; + + static DeclEnvObject *create(JSContext *cx, StackFrame *fp); + +}; + +class NestedScopeObject : public ScopeObject +{ + protected: + static const unsigned DEPTH_SLOT = 1; + + public: + + uint32_t stackDepth() const; +}; + +class WithObject : public NestedScopeObject +{ + + js::StackFrame *maybeStackFrame() const; + void setStackFrame(StackFrame *frame); + + static const unsigned THIS_SLOT = 2; + + + JSObject *getProto() const; + + public: + static const unsigned RESERVED_SLOTS = 3; + static const gc::AllocKind FINALIZE_KIND = gc::FINALIZE_OBJECT4; + + static WithObject * + create(JSContext *cx, HandleObject proto, HandleObject enclosing, uint32_t depth); + + + JSObject &withThis() const; + + + JSObject &object() const; +}; + +class BlockObject : public NestedScopeObject +{ + public: + static const unsigned RESERVED_SLOTS = 2; + static const gc::AllocKind FINALIZE_KIND = gc::FINALIZE_OBJECT4; + + + inline uint32_t slotCount() const; + + protected: + + inline HeapSlot &slotValue(unsigned i); +}; + +class StaticBlockObject : public BlockObject +{ + + StackFrame *maybeStackFrame() const; + void setStackFrame(StackFrame *frame); + + public: + static StaticBlockObject *create(JSContext *cx); + + inline StaticBlockObject *enclosingBlock() const; + inline void setEnclosingBlock(StaticBlockObject *blockObj); + + void setStackDepth(uint32_t depth); + bool containsVarAtDepth(uint32_t depth); + + + + + + void setDefinitionParseNode(unsigned i, Definition *def); + Definition *maybeDefinitionParseNode(unsigned i); + + + + + + void setAliased(unsigned i, bool aliased); + bool isAliased(unsigned i); + + + + + + bool needsClone() const; + + const Shape *addVar(JSContext *cx, jsid id, int index, bool *redeclared); +}; + +class ClonedBlockObject : public BlockObject +{ + public: + static ClonedBlockObject *create(JSContext *cx, Handle block, + StackFrame *fp); + + + StaticBlockObject &staticBlock() const; + + + + + + void put(StackFrame *fp); + + + const Value &closedSlot(unsigned i); + + + bool containsVar(PropertyName *name, Value *vp, JSContext *cx); +}; + +template +bool +XDRStaticBlockObject(XDRState *xdr, JSScript *script, StaticBlockObject **objp); + +extern JSObject * +CloneStaticBlockObject(JSContext *cx, StaticBlockObject &srcBlock, + const AutoObjectVector &objects, JSScript *src); +# 307 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject.h" +class ScopeIter +{ + public: + enum Type { Call, Block, With, StrictEvalScope }; + + private: + StackFrame *fp_; + JSObject *cur_; + StaticBlockObject *block_; + Type type_; + bool hasScopeObject_; + + void settle(); + + public: + + explicit ScopeIter(); + + + explicit ScopeIter(StackFrame *fp); + + + + + + explicit ScopeIter(JSObject &enclosingScope); + + + + + + ScopeIter(ScopeIter si, StackFrame *fp); + + + ScopeIter(StackFrame *fp, ScopeObject &scope); + + bool done() const { return !fp_; } + + + + JSObject &enclosingScope() const { do { } while(0); return *cur_; } + + + + ScopeIter enclosing() const; + + StackFrame *fp() const { do { } while(0); return fp_; } + Type type() const { do { } while(0); return type_; } + bool hasScopeObject() const { do { } while(0); return hasScopeObject_; } + ScopeObject &scope() const; + + StaticBlockObject &staticBlock() const { do { } while(0); return *block_; } + + + typedef ScopeIter Lookup; + static HashNumber hash(ScopeIter si); + static bool match(ScopeIter si1, ScopeIter si2); +}; +# 393 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject.h" +extern JSObject * +GetDebugScopeForFunction(JSContext *cx, JSFunction *fun); + +extern JSObject * +GetDebugScopeForFrame(JSContext *cx, StackFrame *fp); + + +class DebugScopeObject : public JSObject +{ + static const unsigned ENCLOSING_EXTRA = 0; + + public: + static DebugScopeObject *create(JSContext *cx, ScopeObject &scope, JSObject &enclosing); + + ScopeObject &scope() const; + JSObject &enclosingScope() const; + + + bool isForDeclarative() const; +}; + + +class DebugScopes +{ + + typedef WeakMap ObjectWeakMap; + ObjectWeakMap proxiedScopes; + + + + + + typedef HashMap MissingScopeMap; + MissingScopeMap missingScopes; + + public: + DebugScopes(JSRuntime *rt); + ~DebugScopes(); + bool init(); + + void mark(JSTracer *trc); + void sweep(); + + DebugScopeObject *hasDebugScope(JSContext *cx, ScopeObject &scope) const; + bool addDebugScope(JSContext *cx, ScopeObject &scope, DebugScopeObject &debugScope); + + DebugScopeObject *hasDebugScope(JSContext *cx, ScopeIter si) const; + bool addDebugScope(JSContext *cx, ScopeIter si, DebugScopeObject &debugScope); + + + + + + void onPopCall(StackFrame *fp); + void onPopBlock(JSContext *cx, StackFrame *fp); + void onGeneratorFrameChange(StackFrame *from, StackFrame *to); + void onCompartmentLeaveDebugMode(JSCompartment *c); +}; + +} +# 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject-inl.h" 2 + +namespace js { + +inline +ScopeCoordinate::ScopeCoordinate(jsbytecode *pc) + : hops(((unsigned)(((pc)[1] << 8) | (pc)[2]))), binding(((unsigned)(((pc + 2)[1] << 8) | (pc + 2)[2]))) +{ + do { } while(0); +} + +inline JSAtom * +ScopeCoordinateAtom(JSScript *script, jsbytecode *pc) +{ + do { } while(0); + return script->getAtom(GET_UINT32_INDEX(pc + 2 * sizeof(uint16_t))); +} + +inline JSObject & +ScopeObject::enclosingScope() const +{ + return getReservedSlot(SCOPE_CHAIN_SLOT).toObject(); +} + +inline bool +ScopeObject::setEnclosingScope(JSContext *cx, HandleObject obj) +{ + RootedObject self(cx, this); + if (!obj->setDelegate(cx)) + return false; + self->setFixedSlot(SCOPE_CHAIN_SLOT, ObjectValue(*obj)); + return true; +} + +inline StackFrame * +ScopeObject::maybeStackFrame() const +{ + do { } while(0); + return reinterpret_cast(JSObject::getPrivate()); +} + +inline void +ScopeObject::setStackFrame(StackFrame *frame) +{ + return setPrivate(frame); +} + + inline size_t +ScopeObject::offsetOfEnclosingScope() +{ + return getFixedSlotOffset(SCOPE_CHAIN_SLOT); +} + +inline bool +CallObject::isForEval() const +{ + do { } while(0); + do { } while (0) + ; + return getReservedSlot(CALLEE_SLOT).isNull(); +} + +inline void +CallObject::setCallee(JSObject *callee) +{ + do { } while (0); + setFixedSlot(CALLEE_SLOT, ObjectOrNullValue(callee)); +} + +inline JSObject * +CallObject::getCallee() const +{ + return getReservedSlot(CALLEE_SLOT).toObjectOrNull(); +} + +inline JSFunction * +CallObject::getCalleeFunction() const +{ + return getReservedSlot(CALLEE_SLOT).toObject().toFunction(); +} + +inline const Value & +CallObject::arg(unsigned i) const +{ + do { } while(0); + return getSlot(RESERVED_SLOTS + i); +} + +inline void +CallObject::setArg(unsigned i, const Value &v) +{ + do { } while(0); + setSlot(RESERVED_SLOTS + i, v); +} + +inline void +CallObject::initArgUnchecked(unsigned i, const Value &v) +{ + do { } while(0); + initSlotUnchecked(RESERVED_SLOTS + i, v); +} + +inline const Value & +CallObject::var(unsigned i) const +{ + JSFunction *fun = getCalleeFunction(); + do { } while(0); + do { } while(0); + return getSlot(RESERVED_SLOTS + fun->nargs + i); +} + +inline void +CallObject::setVar(unsigned i, const Value &v) +{ + JSFunction *fun = getCalleeFunction(); + do { } while(0); + do { } while(0); + setSlot(RESERVED_SLOTS + fun->nargs + i, v); +} + +inline void +CallObject::initVarUnchecked(unsigned i, const Value &v) +{ + JSFunction *fun = getCalleeFunction(); + do { } while(0); + do { } while(0); + initSlotUnchecked(RESERVED_SLOTS + fun->nargs + i, v); +} + +inline void +CallObject::copyValues(unsigned nargs, Value *argv, unsigned nvars, Value *slots) +{ + do { } while(0); + copySlotRange(RESERVED_SLOTS, argv, nargs); + copySlotRange(RESERVED_SLOTS + nargs, slots, nvars); +} + +inline HeapSlotArray +CallObject::argArray() +{ + DebugOnly fun = getCalleeFunction(); + do { } while(0); + return HeapSlotArray(getSlotAddress(RESERVED_SLOTS)); +} + +inline HeapSlotArray +CallObject::varArray() +{ + JSFunction *fun = getCalleeFunction(); + do { } while(0) + ; + return HeapSlotArray(getSlotAddress(RESERVED_SLOTS + fun->nargs)); +} + +inline uint32_t +NestedScopeObject::stackDepth() const +{ + return getReservedSlot(DEPTH_SLOT).toPrivateUint32(); +} + +inline JSObject & +WithObject::withThis() const +{ + return getReservedSlot(THIS_SLOT).toObject(); +} + +inline JSObject & +WithObject::object() const +{ + return *JSObject::getProto(); +} + +inline uint32_t +BlockObject::slotCount() const +{ + return propertyCount(); +} + +inline HeapSlot & +BlockObject::slotValue(unsigned i) +{ + do { } while(0); + return getSlotRef(RESERVED_SLOTS + i); +} + +inline StaticBlockObject * +StaticBlockObject::enclosingBlock() const +{ + JSObject *obj = getReservedSlot(SCOPE_CHAIN_SLOT).toObjectOrNull(); + return obj ? &obj->asStaticBlock() : __null; +} + +inline void +StaticBlockObject::setEnclosingBlock(StaticBlockObject *blockObj) +{ + setFixedSlot(SCOPE_CHAIN_SLOT, ObjectOrNullValue(blockObj)); +} + +inline void +StaticBlockObject::setStackDepth(uint32_t depth) +{ + do { } while(0); + initReservedSlot(DEPTH_SLOT, PrivateUint32Value(depth)); +} + +inline void +StaticBlockObject::setDefinitionParseNode(unsigned i, Definition *def) +{ + do { } while(0); + slotValue(i).init(this, i, PrivateValue(def)); +} + +inline Definition * +StaticBlockObject::maybeDefinitionParseNode(unsigned i) +{ + Value v = slotValue(i); + return v.isUndefined() ? __null : reinterpret_cast(v.toPrivate()); +} + +inline void +StaticBlockObject::setAliased(unsigned i, bool aliased) +{ + slotValue(i).init(this, i, BooleanValue(aliased)); + if (aliased) + JSObject::setPrivate(reinterpret_cast(1)); +} + +inline bool +StaticBlockObject::isAliased(unsigned i) +{ + return slotValue(i).isTrue(); +} + +inline bool +StaticBlockObject::needsClone() const +{ + return JSObject::getPrivate() != __null; +} + +inline bool +StaticBlockObject::containsVarAtDepth(uint32_t depth) +{ + return depth >= stackDepth() && depth < stackDepth() + slotCount(); +} + +inline StaticBlockObject & +ClonedBlockObject::staticBlock() const +{ + return getProto()->asStaticBlock(); +} + +inline const Value & +ClonedBlockObject::closedSlot(unsigned i) +{ + do { } while(0); + return slotValue(i); +} + +} + +inline js::ScopeObject & +JSObject::asScope() +{ + do { } while(0); + return *static_cast(this); +} + +inline js::CallObject & +JSObject::asCall() +{ + do { } while(0); + return *static_cast(this); +} + +inline js::DeclEnvObject & +JSObject::asDeclEnv() +{ + do { } while(0); + return *static_cast(this); +} + +inline js::NestedScopeObject & +JSObject::asNestedScope() +{ + do { } while(0); + return *static_cast(this); +} + +inline js::WithObject & +JSObject::asWith() +{ + do { } while(0); + return *static_cast(this); +} + +inline js::BlockObject & +JSObject::asBlock() +{ + do { } while(0); + return *static_cast(this); +} + +inline js::StaticBlockObject & +JSObject::asStaticBlock() +{ + do { } while(0); + return *static_cast(this); +} + +inline js::ClonedBlockObject & +JSObject::asClonedBlock() +{ + do { } while(0); + return *static_cast(this); +} + +inline js::DebugScopeObject & +JSObject::asDebugScope() +{ + do { } while(0); + return *static_cast(this); +} +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfuninlines.h" 2 + +inline bool +JSFunction::inStrictMode() const +{ + return script()->strictModeCode; +} + +inline JSObject * +JSFunction::environment() const +{ + do { } while(0); + return u.i.env_; +} + +inline void +JSFunction::setEnvironment(JSObject *obj) +{ + do { } while(0); + *(js::HeapPtrObject *)&u.i.env_ = obj; +} + +inline void +JSFunction::initEnvironment(JSObject *obj) +{ + do { } while(0); + ((js::HeapPtrObject *)&u.i.env_)->init(obj); +} + +inline void +JSFunction::initializeExtended() +{ + do { } while(0); + + do { } while(0); + toExtended()->extendedSlots[0].init(js::UndefinedValue()); + toExtended()->extendedSlots[1].init(js::UndefinedValue()); +} + +inline void +JSFunction::setExtendedSlot(size_t which, const js::Value &val) +{ + do { } while(0); + toExtended()->extendedSlots[which] = val; +} + +inline const js::Value & +JSFunction::getExtendedSlot(size_t which) const +{ + do { } while(0); + return toExtended()->extendedSlots[which]; +} + +namespace js { + +static __attribute__((always_inline)) inline bool +IsFunctionObject(const js::Value &v) +{ + return v.isObject() && v.toObject().isFunction(); +} + +static __attribute__((always_inline)) inline bool +IsFunctionObject(const js::Value &v, JSFunction **fun) +{ + if (v.isObject() && v.toObject().isFunction()) { + *fun = v.toObject().toFunction(); + return true; + } + return false; +} + +static __attribute__((always_inline)) inline bool +IsNativeFunction(const js::Value &v) +{ + JSFunction *fun; + return IsFunctionObject(v, &fun) && fun->isNative(); +} + +static __attribute__((always_inline)) inline bool +IsNativeFunction(const js::Value &v, JSFunction **fun) +{ + return IsFunctionObject(v, fun) && (*fun)->isNative(); +} + +static __attribute__((always_inline)) inline bool +IsNativeFunction(const js::Value &v, JSNative native) +{ + JSFunction *fun; + return IsFunctionObject(v, &fun) && fun->maybeNative() == native; +} +# 115 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfuninlines.h" +static __attribute__((always_inline)) inline bool +ClassMethodIsNative(JSContext *cx, HandleObject obj, Class *clasp, HandleId methodid, JSNative native) +{ + do { } while(0); + + Value v; + if (!HasDataProperty(cx, obj, methodid, &v)) { + RootedObject proto(cx, obj->getProto()); + if (!proto || proto->getClass() != clasp || !HasDataProperty(cx, proto, methodid, &v)) + return false; + } + + return js::IsNativeFunction(v, native); +} + +extern __attribute__((always_inline)) inline bool +SameTraceType(const Value &lhs, const Value &rhs) +{ + return SameType(lhs, rhs) && + (lhs.isPrimitive() || + lhs.toObject().isFunction() == rhs.toObject().isFunction()); +} + + +static __attribute__((always_inline)) inline bool +IsConstructing(const Value *vp) +{ +# 151 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsfuninlines.h" + return vp[1].isMagic(); +} + +inline bool +IsConstructing(CallReceiver call) +{ + return IsConstructing(call.base()); +} + +inline const char * +GetFunctionNameBytes(JSContext *cx, JSFunction *fun, JSAutoByteString *bytes) +{ + if (fun->atom) + return bytes->encode(cx, fun->atom); + return js_anonymous_str; +} + +extern JSFunctionSpec function_methods[]; + +extern JSBool +Function(JSContext *cx, unsigned argc, Value *vp); + +extern bool +IsBuiltinFunctionConstructor(JSFunction *fun); + +static inline JSObject * +SkipScopeParent(JSObject *parent) +{ + if (!parent) + return __null; + while (parent->isScope()) + parent = &parent->asScope().enclosingScope(); + return parent; +} + +inline JSFunction * +CloneFunctionObject(JSContext *cx, HandleFunction fun, HandleObject parent, + gc::AllocKind kind = JSFunction::FinalizeKind) +{ + do { } while(0); + RootedObject proto(cx, parent->global().getOrCreateFunctionPrototype(cx)); + if (!proto) + return __null; + + return js_CloneFunctionObject(cx, fun, parent, proto, kind); +} + +inline JSFunction * +CloneFunctionObjectIfNotSingleton(JSContext *cx, HandleFunction fun, HandleObject parent) +{ + + + + + + + + if (fun->hasSingletonType()) { + if (!JSObject::setParent(cx, fun, RootedObject(cx, SkipScopeParent(parent)))) + return __null; + fun->setEnvironment(parent); + return fun; + } + + return CloneFunctionObject(cx, fun, parent); +} + +inline JSFunction * +CloneFunctionObject(JSContext *cx, HandleFunction fun) +{ + + + + + + + + do { } while(0); + + if (fun->hasSingletonType()) + return fun; + + return js_CloneFunctionObject(cx, fun, + RootedObject(cx, fun->environment()), + RootedObject(cx, fun->getProto()), + JSFunction::ExtendedFinalizeKind); +} + +} + +inline void +JSFunction::setScript(JSScript *script_) +{ + do { } while(0); + mutableScript() = script_; +} + +inline void +JSFunction::initScript(JSScript *script_) +{ + do { } while(0); + mutableScript().init(script_); +} +# 42 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgcinlines.h" 1 + + + + + + + +#define jsgcinlines_h___ + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscompartment.h" 1 +# 13 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgcinlines.h" 2 + + + + + + +namespace js { + +struct Shape; + +namespace gc { + +inline JSGCTraceKind +GetGCThingTraceKind(const void *thing) +{ + do { } while(0); + const Cell *cell = reinterpret_cast(thing); + return MapAllocToTraceKind(cell->getAllocKind()); +} + + +const size_t SLOTS_TO_THING_KIND_LIMIT = 17; + + +static inline AllocKind +GetGCObjectKind(size_t numSlots) +{ + extern AllocKind slotsToThingKind[]; + + if (numSlots >= SLOTS_TO_THING_KIND_LIMIT) + return FINALIZE_OBJECT16; + return slotsToThingKind[numSlots]; +} + +static inline AllocKind +GetGCObjectKind(Class *clasp) +{ + if (clasp == &FunctionClass) + return JSFunction::FinalizeKind; + uint32_t nslots = (((clasp)->flags >> 8) & (((uint32_t)1 << (8)) - 1)); + if (clasp->flags & (1<<0)) + nslots++; + return GetGCObjectKind(nslots); +} + + +static inline AllocKind +GetGCArrayKind(size_t numSlots) +{ + extern AllocKind slotsToThingKind[]; + + + + + + + + typedef int moz_static_assert107[(ObjectElements::VALUES_PER_HEADER == 2) ? 1 : -1]; + if (numSlots > JSObject::NELEMENTS_LIMIT || numSlots + 2 >= SLOTS_TO_THING_KIND_LIMIT) + return FINALIZE_OBJECT2; + return slotsToThingKind[numSlots + 2]; +} + +static inline AllocKind +GetGCObjectFixedSlotsKind(size_t numFixedSlots) +{ + extern AllocKind slotsToThingKind[]; + + do { } while(0); + return slotsToThingKind[numFixedSlots]; +} + +static inline bool +IsBackgroundAllocKind(AllocKind kind) +{ + do { } while(0); + return kind <= FINALIZE_OBJECT_LAST && kind % 2 == 1; +} + +static inline AllocKind +GetBackgroundAllocKind(AllocKind kind) +{ + do { } while(0); + return (AllocKind) (kind + 1); +} + + + + + +static inline bool +TryIncrementAllocKind(AllocKind *kindp) +{ + size_t next = size_t(*kindp) + 2; + if (next >= size_t(FINALIZE_OBJECT_LIMIT)) + return false; + *kindp = AllocKind(next); + return true; +} + + +static inline size_t +GetGCKindSlots(AllocKind thingKind) +{ + + switch (thingKind) { + case FINALIZE_OBJECT0: + case FINALIZE_OBJECT0_BACKGROUND: + return 0; + case FINALIZE_OBJECT2: + case FINALIZE_OBJECT2_BACKGROUND: + return 2; + case FINALIZE_OBJECT4: + case FINALIZE_OBJECT4_BACKGROUND: + return 4; + case FINALIZE_OBJECT8: + case FINALIZE_OBJECT8_BACKGROUND: + return 8; + case FINALIZE_OBJECT12: + case FINALIZE_OBJECT12_BACKGROUND: + return 12; + case FINALIZE_OBJECT16: + case FINALIZE_OBJECT16_BACKGROUND: + return 16; + default: + __builtin_unreachable(); + return 0; + } +} + +static inline size_t +GetGCKindSlots(AllocKind thingKind, Class *clasp) +{ + size_t nslots = GetGCKindSlots(thingKind); + + + if (clasp->flags & (1<<0)) { + do { } while(0); + nslots--; + } + + + + + + if (clasp == &FunctionClass) + nslots = 0; + + return nslots; +} + +static inline void +GCPoke(JSRuntime *rt, Value oldval) +{ + + + + + + + rt->gcPoke = true; +# 183 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgcinlines.h" +} + + + + + +template +void +ForEachArenaAndCell(JSCompartment *compartment, AllocKind thingKind, + ArenaOp arenaOp, CellOp cellOp) +{ + size_t thingSize = Arena::thingSize(thingKind); + ArenaHeader *aheader = compartment->arenas.getFirstArena(thingKind); + + for (; aheader; aheader = aheader->next) { + Arena *arena = aheader->getArena(); + arenaOp(arena); + FreeSpan firstSpan(aheader->getFirstFreeSpan()); + const FreeSpan *span = &firstSpan; + + for (uintptr_t thing = arena->thingsStart(thingKind); ; thing += thingSize) { + do { } while(0); + if (thing == span->first) { + if (!span->hasNext()) + break; + thing = span->last; + span = span->nextSpan(); + } else { + Cell *t = reinterpret_cast(thing); + cellOp(t); + } + } + } +} + +class CellIterImpl +{ + size_t firstThingOffset; + size_t thingSize; + ArenaHeader *aheader; + FreeSpan firstSpan; + const FreeSpan *span; + uintptr_t thing; + Cell *cell; + + protected: + CellIterImpl() { + } + + void initSpan(JSCompartment *comp, AllocKind kind) { + do { } while(0); + firstThingOffset = Arena::firstThingOffset(kind); + thingSize = Arena::thingSize(kind); + firstSpan.initAsEmpty(); + span = &firstSpan; + thing = span->first; + } + + void init(ArenaHeader *singleAheader) { + aheader = singleAheader; + initSpan(aheader->compartment, aheader->getAllocKind()); + next(); + aheader = __null; + } + + void init(JSCompartment *comp, AllocKind kind) { + initSpan(comp, kind); + aheader = comp->arenas.getFirstArena(kind); + next(); + } + + public: + bool done() const { + return !cell; + } + + template T *get() const { + do { } while(0); + return static_cast(cell); + } + + Cell *getCell() const { + do { } while(0); + return cell; + } + + void next() { + for (;;) { + if (thing != span->first) + break; + if ((__builtin_expect((span->hasNext()), 1))) { + thing = span->last + thingSize; + span = span->nextSpan(); + break; + } + if (!aheader) { + cell = __null; + return; + } + firstSpan = aheader->getFirstFreeSpan(); + span = &firstSpan; + thing = aheader->arenaAddress() | firstThingOffset; + aheader = aheader->next; + } + cell = reinterpret_cast(thing); + thing += thingSize; + } +}; + +class CellIterUnderGC : public CellIterImpl +{ + public: + CellIterUnderGC(JSCompartment *comp, AllocKind kind) { + do { } while(0); + init(comp, kind); + } + + CellIterUnderGC(ArenaHeader *aheader) { + do { } while(0); + init(aheader); + } +}; + + + + + + +class CellIter : public CellIterImpl +{ + ArenaLists *lists; + AllocKind kind; + + + + public: + CellIter(JSCompartment *comp, AllocKind kind) + : lists(&comp->arenas), + kind(kind) + { + + + + + + + do { } while(0); + if (lists->isSynchronizedFreeList(kind)) { + lists = __null; + } else { + do { } while(0); + lists->copyFreeListToArena(kind); + } + + + + + init(comp, kind); + } + + ~CellIter() { + + + + + if (lists) + lists->clearFreeListInArena(kind); + } +}; + + + +inline void EmptyArenaOp(Arena *arena) {} +inline void EmptyCellOp(Cell *t) {} + +class GCCompartmentsIter { + private: + JSCompartment **it, **end; + + public: + GCCompartmentsIter(JSRuntime *rt) { + do { } while(0); + it = rt->compartments.begin(); + end = rt->compartments.end(); + if (!(*it)->isCollecting()) + next(); + } + + bool done() const { return it == end; } + + void next() { + do { } while(0); + do { + it++; + } while (it != end && !(*it)->isCollecting()); + } + + JSCompartment *get() const { + do { } while(0); + return *it; + } + + operator JSCompartment *() const { return get(); } + JSCompartment *operator->() const { return get(); } +}; +# 396 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgcinlines.h" +template +inline T * +NewGCThing(JSContext *cx, js::gc::AllocKind kind, size_t thingSize) +{ + do { } while(0); + + do { } while (0) + ; + + do { } while(0); + do { } while(0); + + + do {} while(0); + + + + + + + MaybeCheckStackRoots(cx); + + JSCompartment *comp = cx->compartment; + void *t = comp->arenas.allocateFromFreeList(kind, thingSize); + if (!t) + t = js::gc::ArenaLists::refillFreeList(cx, kind); + + do { } while (0) + ; + return static_cast(t); +} + + +template +inline T * +TryNewGCThing(JSContext *cx, js::gc::AllocKind kind, size_t thingSize) +{ + do { } while(0); + + do { } while (0) + ; + + do { } while(0); + do { } while(0); + + + + + + + void *t = cx->compartment->arenas.allocateFromFreeList(kind, thingSize); + do { } while (0) + ; + return static_cast(t); +} + +} +} + +inline JSObject * +js_NewGCObject(JSContext *cx, js::gc::AllocKind kind) +{ + do { } while(0); + return js::gc::NewGCThing(cx, kind, js::gc::Arena::thingSize(kind)); +} + +inline JSObject * +js_TryNewGCObject(JSContext *cx, js::gc::AllocKind kind) +{ + do { } while(0); + return js::gc::TryNewGCThing(cx, kind, js::gc::Arena::thingSize(kind)); +} + +inline JSString * +js_NewGCString(JSContext *cx) +{ + return js::gc::NewGCThing(cx, js::gc::FINALIZE_STRING, sizeof(JSString)); +} + +inline JSShortString * +js_NewGCShortString(JSContext *cx) +{ + return js::gc::NewGCThing(cx, js::gc::FINALIZE_SHORT_STRING, sizeof(JSShortString)); +} + +inline JSExternalString * +js_NewGCExternalString(JSContext *cx) +{ + return js::gc::NewGCThing(cx, js::gc::FINALIZE_EXTERNAL_STRING, + sizeof(JSExternalString)); +} + +inline JSScript * +js_NewGCScript(JSContext *cx) +{ + return js::gc::NewGCThing(cx, js::gc::FINALIZE_SCRIPT, sizeof(JSScript)); +} + +inline js::Shape * +js_NewGCShape(JSContext *cx) +{ + return js::gc::NewGCThing(cx, js::gc::FINALIZE_SHAPE, sizeof(js::Shape)); +} + +inline js::BaseShape * +js_NewGCBaseShape(JSContext *cx) +{ + return js::gc::NewGCThing(cx, js::gc::FINALIZE_BASE_SHAPE, sizeof(js::BaseShape)); +} + + +extern JSXML * +js_NewGCXML(JSContext *cx); +# 43 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" 1 +# 10 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" 1 +# 10 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" +#define jsanalyze_h___ + +# 1 "./jsautooplen.h" 1 + + + + + +#define JSOP_NOP_LENGTH 1 +#define JSOP_UNDEFINED_LENGTH 1 +#define JSOP_POPV_LENGTH 1 +#define JSOP_ENTERWITH_LENGTH 1 +#define JSOP_LEAVEWITH_LENGTH 1 +#define JSOP_RETURN_LENGTH 1 +#define JSOP_GOTO_LENGTH 5 +#define JSOP_IFEQ_LENGTH 5 +#define JSOP_IFNE_LENGTH 5 +#define JSOP_ARGUMENTS_LENGTH 1 +#define JSOP_SWAP_LENGTH 1 +#define JSOP_POPN_LENGTH 3 +#define JSOP_DUP_LENGTH 1 +#define JSOP_DUP2_LENGTH 1 +#define JSOP_SETCONST_LENGTH 5 +#define JSOP_BITOR_LENGTH 1 +#define JSOP_BITXOR_LENGTH 1 +#define JSOP_BITAND_LENGTH 1 +#define JSOP_EQ_LENGTH 1 +#define JSOP_NE_LENGTH 1 +#define JSOP_LT_LENGTH 1 +#define JSOP_LE_LENGTH 1 +#define JSOP_GT_LENGTH 1 +#define JSOP_GE_LENGTH 1 +#define JSOP_LSH_LENGTH 1 +#define JSOP_RSH_LENGTH 1 +#define JSOP_URSH_LENGTH 1 +#define JSOP_ADD_LENGTH 1 +#define JSOP_SUB_LENGTH 1 +#define JSOP_MUL_LENGTH 1 +#define JSOP_DIV_LENGTH 1 +#define JSOP_MOD_LENGTH 1 +#define JSOP_NOT_LENGTH 1 +#define JSOP_BITNOT_LENGTH 1 +#define JSOP_NEG_LENGTH 1 +#define JSOP_POS_LENGTH 1 +#define JSOP_DELNAME_LENGTH 5 +#define JSOP_DELPROP_LENGTH 5 +#define JSOP_DELELEM_LENGTH 1 +#define JSOP_TYPEOF_LENGTH 1 +#define JSOP_VOID_LENGTH 1 +#define JSOP_INCNAME_LENGTH 6 +#define JSOP_INCPROP_LENGTH 6 +#define JSOP_INCELEM_LENGTH 2 +#define JSOP_DECNAME_LENGTH 6 +#define JSOP_DECPROP_LENGTH 6 +#define JSOP_DECELEM_LENGTH 2 +#define JSOP_NAMEINC_LENGTH 6 +#define JSOP_PROPINC_LENGTH 6 +#define JSOP_ELEMINC_LENGTH 2 +#define JSOP_NAMEDEC_LENGTH 6 +#define JSOP_PROPDEC_LENGTH 6 +#define JSOP_ELEMDEC_LENGTH 2 +#define JSOP_GETPROP_LENGTH 5 +#define JSOP_SETPROP_LENGTH 5 +#define JSOP_GETELEM_LENGTH 1 +#define JSOP_SETELEM_LENGTH 1 +#define JSOP_CALLNAME_LENGTH 5 +#define JSOP_CALL_LENGTH 3 +#define JSOP_NAME_LENGTH 5 +#define JSOP_DOUBLE_LENGTH 5 +#define JSOP_STRING_LENGTH 5 +#define JSOP_ZERO_LENGTH 1 +#define JSOP_ONE_LENGTH 1 +#define JSOP_NULL_LENGTH 1 +#define JSOP_THIS_LENGTH 1 +#define JSOP_FALSE_LENGTH 1 +#define JSOP_TRUE_LENGTH 1 +#define JSOP_OR_LENGTH 5 +#define JSOP_AND_LENGTH 5 +#define JSOP_TABLESWITCH_LENGTH -1 +#define JSOP_LOOKUPSWITCH_LENGTH -1 +#define JSOP_STRICTEQ_LENGTH 1 +#define JSOP_STRICTNE_LENGTH 1 +#define JSOP_SETCALL_LENGTH 1 +#define JSOP_ITER_LENGTH 2 +#define JSOP_MOREITER_LENGTH 1 +#define JSOP_ITERNEXT_LENGTH 2 +#define JSOP_ENDITER_LENGTH 1 +#define JSOP_FUNAPPLY_LENGTH 3 +#define JSOP_OBJECT_LENGTH 5 +#define JSOP_POP_LENGTH 1 +#define JSOP_NEW_LENGTH 3 +#define JSOP_UNUSED0_LENGTH 1 +#define JSOP_GETARG_LENGTH 3 +#define JSOP_SETARG_LENGTH 3 +#define JSOP_GETLOCAL_LENGTH 3 +#define JSOP_SETLOCAL_LENGTH 3 +#define JSOP_UINT16_LENGTH 3 +#define JSOP_NEWINIT_LENGTH 5 +#define JSOP_NEWARRAY_LENGTH 4 +#define JSOP_NEWOBJECT_LENGTH 5 +#define JSOP_ENDINIT_LENGTH 1 +#define JSOP_INITPROP_LENGTH 5 +#define JSOP_INITELEM_LENGTH 1 +#define JSOP_UNUSED14_LENGTH 1 +#define JSOP_UNUSED15_LENGTH 1 +#define JSOP_INCARG_LENGTH 3 +#define JSOP_DECARG_LENGTH 3 +#define JSOP_ARGINC_LENGTH 3 +#define JSOP_ARGDEC_LENGTH 3 +#define JSOP_INCLOCAL_LENGTH 3 +#define JSOP_DECLOCAL_LENGTH 3 +#define JSOP_LOCALINC_LENGTH 3 +#define JSOP_LOCALDEC_LENGTH 3 +#define JSOP_LEAVEFORLETIN_LENGTH 1 +#define JSOP_LABEL_LENGTH 5 +#define JSOP_UNUSED3_LENGTH 1 +#define JSOP_FUNCALL_LENGTH 3 +#define JSOP_LOOPHEAD_LENGTH 1 +#define JSOP_BINDNAME_LENGTH 5 +#define JSOP_SETNAME_LENGTH 5 +#define JSOP_THROW_LENGTH 1 +#define JSOP_IN_LENGTH 1 +#define JSOP_INSTANCEOF_LENGTH 1 +#define JSOP_DEBUGGER_LENGTH 1 +#define JSOP_GOSUB_LENGTH 5 +#define JSOP_RETSUB_LENGTH 1 +#define JSOP_EXCEPTION_LENGTH 1 +#define JSOP_LINENO_LENGTH 3 +#define JSOP_CONDSWITCH_LENGTH 1 +#define JSOP_CASE_LENGTH 5 +#define JSOP_DEFAULT_LENGTH 5 +#define JSOP_EVAL_LENGTH 3 +#define JSOP_ENUMELEM_LENGTH 1 +#define JSOP_GETTER_LENGTH 1 +#define JSOP_SETTER_LENGTH 1 +#define JSOP_DEFFUN_LENGTH 5 +#define JSOP_DEFCONST_LENGTH 5 +#define JSOP_DEFVAR_LENGTH 5 +#define JSOP_LAMBDA_LENGTH 5 +#define JSOP_CALLEE_LENGTH 1 +#define JSOP_UNUSED31_LENGTH 1 +#define JSOP_PICK_LENGTH 2 +#define JSOP_TRY_LENGTH 1 +#define JSOP_FINALLY_LENGTH 1 +#define JSOP_GETALIASEDVAR_LENGTH 9 +#define JSOP_CALLALIASEDVAR_LENGTH 9 +#define JSOP_SETALIASEDVAR_LENGTH 9 +#define JSOP_INCALIASEDVAR_LENGTH 10 +#define JSOP_DECALIASEDVAR_LENGTH 10 +#define JSOP_ALIASEDVARINC_LENGTH 10 +#define JSOP_ALIASEDVARDEC_LENGTH 10 +#define JSOP_UNUSED8_LENGTH 1 +#define JSOP_UNUSED9_LENGTH 1 +#define JSOP_UNUSED10_LENGTH 1 +#define JSOP_UNUSED11_LENGTH 1 +#define JSOP_UNUSED12_LENGTH 1 +#define JSOP_UNUSED13_LENGTH 1 +#define JSOP_BACKPATCH_LENGTH 5 +#define JSOP_BACKPATCH_POP_LENGTH 5 +#define JSOP_THROWING_LENGTH 1 +#define JSOP_SETRVAL_LENGTH 1 +#define JSOP_RETRVAL_LENGTH 1 +#define JSOP_GETGNAME_LENGTH 5 +#define JSOP_SETGNAME_LENGTH 5 +#define JSOP_INCGNAME_LENGTH 6 +#define JSOP_DECGNAME_LENGTH 6 +#define JSOP_GNAMEINC_LENGTH 6 +#define JSOP_GNAMEDEC_LENGTH 6 +#define JSOP_REGEXP_LENGTH 5 +#define JSOP_DEFXMLNS_LENGTH 1 +#define JSOP_ANYNAME_LENGTH 1 +#define JSOP_QNAMEPART_LENGTH 5 +#define JSOP_QNAMECONST_LENGTH 5 +#define JSOP_QNAME_LENGTH 1 +#define JSOP_TOATTRNAME_LENGTH 1 +#define JSOP_TOATTRVAL_LENGTH 1 +#define JSOP_ADDATTRNAME_LENGTH 1 +#define JSOP_ADDATTRVAL_LENGTH 1 +#define JSOP_BINDXMLNAME_LENGTH 1 +#define JSOP_SETXMLNAME_LENGTH 1 +#define JSOP_XMLNAME_LENGTH 1 +#define JSOP_DESCENDANTS_LENGTH 1 +#define JSOP_FILTER_LENGTH 5 +#define JSOP_ENDFILTER_LENGTH 5 +#define JSOP_TOXML_LENGTH 1 +#define JSOP_TOXMLLIST_LENGTH 1 +#define JSOP_XMLTAGEXPR_LENGTH 1 +#define JSOP_XMLELTEXPR_LENGTH 1 +#define JSOP_XMLCDATA_LENGTH 5 +#define JSOP_XMLCOMMENT_LENGTH 5 +#define JSOP_XMLPI_LENGTH 5 +#define JSOP_DELDESC_LENGTH 1 +#define JSOP_CALLPROP_LENGTH 5 +#define JSOP_ENTERLET0_LENGTH 5 +#define JSOP_ENTERLET1_LENGTH 5 +#define JSOP_UINT24_LENGTH 4 +#define JSOP_UNUSED18_LENGTH 1 +#define JSOP_UNUSED19_LENGTH 1 +#define JSOP_UNUSED20_LENGTH 1 +#define JSOP_STARTXML_LENGTH 1 +#define JSOP_STARTXMLEXPR_LENGTH 1 +#define JSOP_CALLELEM_LENGTH 1 +#define JSOP_STOP_LENGTH 1 +#define JSOP_GETXPROP_LENGTH 5 +#define JSOP_CALLXMLNAME_LENGTH 1 +#define JSOP_TYPEOFEXPR_LENGTH 1 +#define JSOP_ENTERBLOCK_LENGTH 5 +#define JSOP_LEAVEBLOCK_LENGTH 3 +#define JSOP_UNUSED1_LENGTH 1 +#define JSOP_UNUSED2_LENGTH 1 +#define JSOP_GENERATOR_LENGTH 1 +#define JSOP_YIELD_LENGTH 1 +#define JSOP_ARRAYPUSH_LENGTH 3 +#define JSOP_GETFUNNS_LENGTH 1 +#define JSOP_ENUMCONSTELEM_LENGTH 1 +#define JSOP_LEAVEBLOCKEXPR_LENGTH 3 +#define JSOP_UNUSED21_LENGTH 1 +#define JSOP_UNUSED22_LENGTH 1 +#define JSOP_UNUSED23_LENGTH 1 +#define JSOP_CALLGNAME_LENGTH 5 +#define JSOP_CALLLOCAL_LENGTH 3 +#define JSOP_CALLARG_LENGTH 3 +#define JSOP_BINDGNAME_LENGTH 5 +#define JSOP_INT8_LENGTH 2 +#define JSOP_INT32_LENGTH 5 +#define JSOP_LENGTH_LENGTH 5 +#define JSOP_HOLE_LENGTH 1 +#define JSOP_UNUSED17_LENGTH 1 +#define JSOP_UNUSED24_LENGTH 1 +#define JSOP_UNUSED25_LENGTH 1 +#define JSOP_UNUSED29_LENGTH 1 +#define JSOP_UNUSED30_LENGTH 1 +#define JSOP_REST_LENGTH 1 +#define JSOP_TOID_LENGTH 1 +#define JSOP_IMPLICITTHIS_LENGTH 5 +#define JSOP_LOOPENTRY_LENGTH 1 +#define JSOP_ACTUALSFILLED_LENGTH 3 +# 13 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" 2 + + + + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject.h" 1 +# 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" 2 + +struct JSScript; + + +namespace js { namespace mjit { struct RegisterAllocation; } } + +namespace js { +namespace analyze { +# 59 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" +class Bytecode +{ + friend class ScriptAnalysis; + + public: + Bytecode() { PodZero(this); } + + + + + bool jumpTarget : 1; + + + bool fallthrough : 1; + + + bool jumpFallthrough : 1; + + + bool switchTarget : 1; + + + + + + bool unconditional : 1; + + + bool analyzed : 1; + + + bool exceptionEntry : 1; + + + bool inTryBlock : 1; + + + bool inLoop : 1; + + + bool safePoint : 1; + + + + + + bool monitoredTypes : 1; + + + bool monitoredTypesReturn : 1; + + + + + + bool arrayWriteHole: 1; + bool getStringElement:1; + bool accessGetter: 1; + + + uint32_t stackDepth; + + private: + + union { + + types::TypeSet *observedTypes; + + + LoopAnalysis *loop; + }; + + + + + mjit::RegisterAllocation *allocation; + + + + + SSAValue *poppedValues; + + + SSAUseChain **pushedUses; + + union { + + + + + + + SlotValue *newValues; +# 161 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" + Vector *pendingValues; + }; + + + + + types::TypeSet *pushedTypes; + + + types::TypeBarrier *typeBarriers; +}; + +static inline unsigned +GetDefCount(JSScript *script, unsigned offset) +{ + do { } while(0); + jsbytecode *pc = script->code + offset; + + + + + + switch (JSOp(*pc)) { + case JSOP_OR: + case JSOP_AND: + return 1; + case JSOP_FILTER: + return 2; + case JSOP_PICK: + + + + + + + return (pc[1] + 1); + default: + return StackDefs(script, pc); + } +} + +static inline unsigned +GetUseCount(JSScript *script, unsigned offset) +{ + do { } while(0); + jsbytecode *pc = script->code + offset; + + if (JSOp(*pc) == JSOP_PICK) + return (pc[1] + 1); + if (js_CodeSpec[*pc].nuses == -1) + return StackUses(script, pc); + return js_CodeSpec[*pc].nuses; +} + + + + + +static inline bool +ExtendedDef(jsbytecode *pc) +{ + switch ((JSOp)*pc) { + case JSOP_SETARG: + case JSOP_INCARG: + case JSOP_DECARG: + case JSOP_ARGINC: + case JSOP_ARGDEC: + case JSOP_SETLOCAL: + case JSOP_INCLOCAL: + case JSOP_DECLOCAL: + case JSOP_LOCALINC: + case JSOP_LOCALDEC: + return true; + default: + return false; + } +} + + +static inline bool +BytecodeNoFallThrough(JSOp op) +{ + switch (op) { + case JSOP_GOTO: + case JSOP_DEFAULT: + case JSOP_RETURN: + case JSOP_STOP: + case JSOP_RETRVAL: + case JSOP_THROW: + case JSOP_TABLESWITCH: + case JSOP_LOOKUPSWITCH: + case JSOP_FILTER: + return true; + case JSOP_GOSUB: + + return false; + default: + return false; + } +} + + + + + +static inline bool +ExtendedUse(jsbytecode *pc) +{ + if (ExtendedDef(pc)) + return true; + switch ((JSOp)*pc) { + case JSOP_GETARG: + case JSOP_CALLARG: + case JSOP_GETLOCAL: + case JSOP_CALLLOCAL: + return true; + default: + return false; + } +} + +static inline JSOp +ReverseCompareOp(JSOp op) +{ + switch (op) { + case JSOP_GT: + return JSOP_LT; + case JSOP_GE: + return JSOP_LE; + case JSOP_LT: + return JSOP_GT; + case JSOP_LE: + return JSOP_GE; + default: + __builtin_unreachable(); + return op; + } +} + +static inline unsigned +FollowBranch(JSContext *cx, JSScript *script, unsigned offset) +{ + + + + + + jsbytecode *pc = script->code + offset; + unsigned targetOffset = offset + GET_JUMP_OFFSET(pc); + if (targetOffset < offset) { + jsbytecode *target = script->code + targetOffset; + JSOp nop = JSOp(*target); + if (nop == JSOP_GOTO) + return targetOffset + GET_JUMP_OFFSET(target); + } + return targetOffset; +} + + +static inline uint32_t CalleeSlot() { + return 0; +} +static inline uint32_t ThisSlot() { + return 1; +} +static inline uint32_t ArgSlot(uint32_t arg) { + return 2 + arg; +} +static inline uint32_t LocalSlot(JSScript *script, uint32_t local) { + return 2 + (script->function() ? script->function()->nargs : 0) + local; +} +static inline uint32_t TotalSlots(JSScript *script) { + return LocalSlot(script, 0) + script->nfixed; +} + +static inline uint32_t StackSlot(JSScript *script, uint32_t index) { + return TotalSlots(script) + index; +} + +static inline uint32_t GetBytecodeSlot(JSScript *script, jsbytecode *pc) +{ + switch (JSOp(*pc)) { + + case JSOP_GETARG: + case JSOP_CALLARG: + case JSOP_SETARG: + case JSOP_INCARG: + case JSOP_DECARG: + case JSOP_ARGINC: + case JSOP_ARGDEC: + return ArgSlot(((unsigned)(((pc)[1] << 8) | (pc)[2]))); + + case JSOP_GETLOCAL: + case JSOP_CALLLOCAL: + case JSOP_SETLOCAL: + case JSOP_INCLOCAL: + case JSOP_DECLOCAL: + case JSOP_LOCALINC: + case JSOP_LOCALDEC: + return LocalSlot(script, ((unsigned)(((pc)[1] << 8) | (pc)[2]))); + + case JSOP_GETALIASEDVAR: + case JSOP_CALLALIASEDVAR: + case JSOP_SETALIASEDVAR: + { + ScopeCoordinate sc = ScopeCoordinate(pc); + return script->bindings.bindingIsArg(sc.binding) + ? ArgSlot(script->bindings.bindingToArg(sc.binding)) + : LocalSlot(script, script->bindings.bindingToLocal(sc.binding)); + } + + + case JSOP_THIS: + return ThisSlot(); + + default: + __builtin_unreachable(); + return 0; + } +} + + +static inline bool +BytecodeUpdatesSlot(JSOp op) +{ + switch (op) { + case JSOP_SETARG: + case JSOP_SETLOCAL: + case JSOP_INCARG: + case JSOP_DECARG: + case JSOP_ARGINC: + case JSOP_ARGDEC: + case JSOP_INCLOCAL: + case JSOP_DECLOCAL: + case JSOP_LOCALINC: + case JSOP_LOCALDEC: + return true; + default: + return false; + } +} + +static inline int32_t +GetBytecodeInteger(jsbytecode *pc) +{ + switch (JSOp(*pc)) { + case JSOP_ZERO: return 0; + case JSOP_ONE: return 1; + case JSOP_UINT16: return ((unsigned)(((pc)[1] << 8) | (pc)[2])); + case JSOP_UINT24: return ((jsatomid)(((pc)[1] << 16) | ((pc)[2] << 8) | (pc)[3])); + case JSOP_INT8: return (int8_t((pc)[1])); + case JSOP_INT32: return (((uint32_t((pc)[1]) << 24) | (uint32_t((pc)[2]) << 16) | (uint32_t((pc)[3]) << 8) | uint32_t((pc)[4]))); + default: + __builtin_unreachable(); + return 0; + } +} +# 426 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" +struct Lifetime +{ + + + + + uint32_t start; + uint32_t end; + + + + + + uint32_t savedEnd; + + + + + + + bool loopTail; + + + + + + bool write; + + + Lifetime *next; + + Lifetime(uint32_t offset, uint32_t savedEnd, Lifetime *next) + : start(offset), end(offset), savedEnd(savedEnd), + loopTail(false), write(false), next(next) + {} +}; + + +class LoopAnalysis +{ + public: + + LoopAnalysis *parent; + + + uint32_t head; + + + + + + uint32_t backedge; + + + uint32_t entry; + + + + + + + + uint32_t lastBlock; + + + + + + bool hasSafePoints; + + + bool hasCallsLoops; +}; + + +struct LifetimeVariable +{ + + Lifetime *lifetime; + + + Lifetime *saved; + + + uint32_t savedEnd : 31; + + + bool ensured : 1; + + + Lifetime * live(uint32_t offset) const { + if (lifetime && lifetime->end >= offset) + return lifetime; + Lifetime *segment = lifetime ? lifetime : saved; + while (segment && segment->start <= offset) { + if (segment->end >= offset) + return segment; + segment = segment->next; + } + return __null; + } + + + + + + uint32_t firstWrite(uint32_t start, uint32_t end) const { + Lifetime *segment = lifetime ? lifetime : saved; + while (segment && segment->start <= end) { + if (segment->start >= start && segment->write) + return segment->start; + segment = segment->next; + } + return (4294967295U); + } + uint32_t firstWrite(LoopAnalysis *loop) const { + return firstWrite(loop->head, loop->backedge); + } + + + bool nonDecreasing(JSScript *script, LoopAnalysis *loop) const { + Lifetime *segment = lifetime ? lifetime : saved; + while (segment && segment->start <= loop->backedge) { + if (segment->start >= loop->head && segment->write) { + switch (JSOp(script->code[segment->start])) { + case JSOP_INCLOCAL: + case JSOP_LOCALINC: + case JSOP_INCARG: + case JSOP_ARGINC: + break; + default: + return false; + } + } + segment = segment->next; + } + return true; + } + + + + + + uint32_t onlyWrite(LoopAnalysis *loop) const { + uint32_t offset = (4294967295U); + Lifetime *segment = lifetime ? lifetime : saved; + while (segment && segment->start <= loop->backedge) { + if (segment->start >= loop->head && segment->write) { + if (offset != (4294967295U)) + return (4294967295U); + offset = segment->start; + } + segment = segment->next; + } + return offset; + } + + + + +}; + +struct SSAPhiNode; + + + + + + + +class SSAValue +{ + friend class ScriptAnalysis; + + public: + enum Kind { + EMPTY = 0, + PUSHED = 1, + VAR = 2, + PHI = 3 + }; + + Kind kind() const { + do { } while(0); + + + return (Kind) (u.pushed.kind & 0x3); + } + + bool operator==(const SSAValue &o) const { + return !memcmp(this, &o, sizeof(SSAValue)); + } + + + + uint32_t pushedOffset() const { + do { } while(0); + return u.pushed.offset; + } + + uint32_t pushedIndex() const { + do { } while(0); + return u.pushed.index; + } + + + + bool varInitial() const { + do { } while(0); + return u.var.initial; + } + + uint32_t varSlot() const { + do { } while(0); + return u.var.slot; + } + + uint32_t varOffset() const { + do { } while(0); + return u.var.offset; + } + + + + uint32_t phiSlot() const; + uint32_t phiLength() const; + const SSAValue &phiValue(uint32_t i) const; + types::TypeSet *phiTypes() const; + + + uint32_t phiOffset() const { + do { } while(0); + return u.phi.offset; + } + + SSAPhiNode *phiNode() const { + do { } while(0); + return u.phi.node; + } + + + + + + + + void clear() { + PodZero(this); + do { } while(0); + } + + void initPushed(uint32_t offset, uint32_t index) { + clear(); + u.pushed.kind = PUSHED; + u.pushed.offset = offset; + u.pushed.index = index; + } + + static SSAValue PushedValue(uint32_t offset, uint32_t index) { + SSAValue v; + v.initPushed(offset, index); + return v; + } + + void initInitial(uint32_t slot) { + clear(); + u.var.kind = VAR; + u.var.initial = true; + u.var.slot = slot; + } + + void initWritten(uint32_t slot, uint32_t offset) { + clear(); + u.var.kind = VAR; + u.var.initial = false; + u.var.slot = slot; + u.var.offset = offset; + } + + static SSAValue WrittenVar(uint32_t slot, uint32_t offset) { + SSAValue v; + v.initWritten(slot, offset); + return v; + } + + void initPhi(uint32_t offset, SSAPhiNode *node) { + clear(); + u.phi.kind = PHI; + u.phi.offset = offset; + u.phi.node = node; + } + + static SSAValue PhiValue(uint32_t offset, SSAPhiNode *node) { + SSAValue v; + v.initPhi(offset, node); + return v; + } + + private: + union { + struct { + Kind kind : 2; + uint32_t offset : 30; + uint32_t index; + } pushed; + struct { + Kind kind : 2; + bool initial : 1; + uint32_t slot : 29; + uint32_t offset; + } var; + struct { + Kind kind : 2; + uint32_t offset : 30; + SSAPhiNode *node; + } phi; + } u; +}; + + + + + + + +struct SSAPhiNode +{ + types::TypeSet types; + uint32_t slot; + uint32_t length; + SSAValue *options; + SSAUseChain *uses; + SSAPhiNode() { PodZero(this); } +}; + +inline uint32_t +SSAValue::phiSlot() const +{ + return u.phi.node->slot; +} + +inline uint32_t +SSAValue::phiLength() const +{ + do { } while(0); + return u.phi.node->length; +} + +inline const SSAValue & +SSAValue::phiValue(uint32_t i) const +{ + do { } while(0); + return u.phi.node->options[i]; +} + +inline types::TypeSet * +SSAValue::phiTypes() const +{ + do { } while(0); + return &u.phi.node->types; +} + +class SSAUseChain +{ + public: + bool popped : 1; + uint32_t offset : 31; + + union { + uint32_t which; + SSAPhiNode *phi; + } u; + SSAUseChain *next; + + SSAUseChain() { PodZero(this); } +}; + +class SlotValue +{ + public: + uint32_t slot; + SSAValue value; + SlotValue(uint32_t slot, const SSAValue &value) : slot(slot), value(value) {} +}; + +struct NeedsArgsObjState; + + +class ScriptAnalysis +{ + friend class Bytecode; + + JSScript *script; + + Bytecode **codeArray; + + uint32_t numSlots; + + bool outOfMemory; + bool hadFailure; + + bool *escapedSlots; + + + bool ranBytecode_; + bool ranSSA_; + bool ranLifetimes_; + bool ranInference_; +# 842 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" + bool usesReturnValue_:1; + bool usesScopeChain_:1; + bool usesThisValue_:1; + bool hasFunctionCalls_:1; + bool modifiesArguments_:1; + bool extendsScope_:1; + bool addsScopeObjects_:1; + bool localsAliasStack_:1; + bool isInlineable:1; + bool isJaegerCompileable:1; + bool canTrackVars:1; + + uint32_t numReturnSites_; + + + + LifetimeVariable *lifetimes; + + public: + + ScriptAnalysis(JSScript *script) { + PodZero(this); + this->script = script; + + + + } + + bool ranBytecode() { return ranBytecode_; } + bool ranSSA() { return ranSSA_; } + bool ranLifetimes() { return ranLifetimes_; } + bool ranInference() { return ranInference_; } + + void analyzeBytecode(JSContext *cx); + void analyzeSSA(JSContext *cx); + void analyzeLifetimes(JSContext *cx); + void analyzeTypes(JSContext *cx); + + + void analyzeTypesNew(JSContext *cx); + + bool OOM() { return outOfMemory; } + bool failed() { return hadFailure; } + bool inlineable(uint32_t argc) { return isInlineable && argc == script->function()->nargs; } + bool jaegerCompileable() { return isJaegerCompileable; } + + + bool usesReturnValue() const { return usesReturnValue_; } + + + bool usesScopeChain() const { return usesScopeChain_; } + + bool usesThisValue() const { return usesThisValue_; } + bool hasFunctionCalls() const { return hasFunctionCalls_; } + uint32_t numReturnSites() const { return numReturnSites_; } + + + + + + bool modifiesArguments() { return modifiesArguments_; } + + + + + + bool extendsScope() { return extendsScope_; } + + + bool addsScopeObjects() { return addsScopeObjects_; } + + + + + + bool localsAliasStack() { return localsAliasStack_; } + + + + Bytecode& getCode(uint32_t offset) { + do { } while(0); + do { } while(0); + return *codeArray[offset]; + } + Bytecode& getCode(const jsbytecode *pc) { return getCode(pc - script->code); } + + Bytecode* maybeCode(uint32_t offset) { + do { } while(0); + return codeArray[offset]; + } + Bytecode* maybeCode(const jsbytecode *pc) { return maybeCode(pc - script->code); } + + bool jumpTarget(uint32_t offset) { + do { } while(0); + return codeArray[offset] && codeArray[offset]->jumpTarget; + } + bool jumpTarget(const jsbytecode *pc) { return jumpTarget(pc - script->code); } + + bool popGuaranteed(jsbytecode *pc) { + jsbytecode *next = pc + GetBytecodeLength(pc); + return JSOp(*next) == JSOP_POP && !jumpTarget(next); + } + + bool incrementInitialValueObserved(jsbytecode *pc) { + const JSCodeSpec *cs = &js_CodeSpec[*pc]; + return (cs->format & (1U<<12)) && !popGuaranteed(pc); + } + + types::TypeSet *bytecodeTypes(const jsbytecode *pc) { + do { } while(0); + return getCode(pc).observedTypes; + } + + const SSAValue &poppedValue(uint32_t offset, uint32_t which) { + do { } while(0); + do { } while(0) + ; + return getCode(offset).poppedValues[which]; + } + const SSAValue &poppedValue(const jsbytecode *pc, uint32_t which) { + return poppedValue(pc - script->code, which); + } + + const SlotValue *newValues(uint32_t offset) { + do { } while(0); + return getCode(offset).newValues; + } + const SlotValue *newValues(const jsbytecode *pc) { return newValues(pc - script->code); } + + types::TypeSet *pushedTypes(uint32_t offset, uint32_t which = 0) { + do { } while(0); + do { } while(0) + ; + types::TypeSet *array = getCode(offset).pushedTypes; + do { } while(0); + return array + which; + } + types::TypeSet *pushedTypes(const jsbytecode *pc, uint32_t which) { + return pushedTypes(pc - script->code, which); + } + + bool hasPushedTypes(const jsbytecode *pc) { return getCode(pc).pushedTypes != __null; } + + types::TypeBarrier *typeBarriers(JSContext *cx, uint32_t offset) { + if (getCode(offset).typeBarriers) + pruneTypeBarriers(cx, offset); + return getCode(offset).typeBarriers; + } + types::TypeBarrier *typeBarriers(JSContext *cx, const jsbytecode *pc) { + return typeBarriers(cx, pc - script->code); + } + void addTypeBarrier(JSContext *cx, const jsbytecode *pc, + types::TypeSet *target, types::Type type); + void addSingletonTypeBarrier(JSContext *cx, const jsbytecode *pc, + types::TypeSet *target, JSObject *singleton, jsid singletonId); + + + void pruneTypeBarriers(JSContext *cx, uint32_t offset); + + + + + + + void breakTypeBarriers(JSContext *cx, uint32_t offset, bool all); + + + void breakTypeBarriersSSA(JSContext *cx, const SSAValue &v); + + inline void addPushedType(JSContext *cx, uint32_t offset, uint32_t which, types::Type type); + + types::TypeSet *getValueTypes(const SSAValue &v) { + switch (v.kind()) { + case SSAValue::PUSHED: + return pushedTypes(v.pushedOffset(), v.pushedIndex()); + case SSAValue::VAR: + do { } while(0); + if (v.varInitial()) { + return types::TypeScript::SlotTypes(script, v.varSlot()); + } else { + + + + + + + return pushedTypes(v.varOffset(), 0); + } + case SSAValue::PHI: + return &v.phiNode()->types; + default: + + __builtin_unreachable(); + return __null; + } + } + + types::TypeSet *poppedTypes(uint32_t offset, uint32_t which) { + return getValueTypes(poppedValue(offset, which)); + } + types::TypeSet *poppedTypes(const jsbytecode *pc, uint32_t which) { + return getValueTypes(poppedValue(pc, which)); + } + + + bool integerOperation(JSContext *cx, jsbytecode *pc); + + bool trackUseChain(const SSAValue &v) { + do { } while (0); + return v.kind() != SSAValue::EMPTY && + (v.kind() != SSAValue::VAR || !v.varInitial()); + } + + + + + + SSAUseChain *& useChain(const SSAValue &v) { + do { } while(0); + if (v.kind() == SSAValue::PUSHED) + return getCode(v.pushedOffset()).pushedUses[v.pushedIndex()]; + if (v.kind() == SSAValue::VAR) + return getCode(v.varOffset()).pushedUses[GetDefCount(script, v.varOffset())]; + return v.phiNode()->uses; + } + + mjit::RegisterAllocation *&getAllocation(uint32_t offset) { + do { } while(0); + return getCode(offset).allocation; + } + mjit::RegisterAllocation *&getAllocation(const jsbytecode *pc) { + return getAllocation(pc - script->code); + } + + LoopAnalysis *getLoop(uint32_t offset) { + do { } while(0); + return getCode(offset).loop; + } + LoopAnalysis *getLoop(const jsbytecode *pc) { return getLoop(pc - script->code); } + + + jsbytecode *getCallPC(jsbytecode *pc) + { + SSAUseChain *uses = useChain(SSAValue::PushedValue(pc - script->code, 0)); + do { } while(0); + do { } while(0); + return script->code + uses->offset; + } +# 1100 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsanalyze.h" + bool slotEscapes(uint32_t slot) { + do { } while(0); + if (slot >= numSlots) + return true; + return escapedSlots[slot]; + } + + + + + + + + bool trackSlot(uint32_t slot) { return !slotEscapes(slot) && canTrackVars && slot < 1000; } + + const LifetimeVariable & liveness(uint32_t slot) { + do { } while(0); + do { } while(0); + return lifetimes[slot]; + } + + + + + + struct NameAccess { + JSScript *script; + types::TypeScriptNesting *nesting; + uint32_t slot; + + + bool arg; + uint32_t index; + + const Value **basePointer() const { + return arg ? &nesting->argArray : &nesting->varArray; + } + }; + NameAccess resolveNameAccess(JSContext *cx, jsid id, bool addDependency = false); + + void printSSA(JSContext *cx); + void printTypes(JSContext *cx); + + void clearAllocations(); + + private: + void setOOM(JSContext *cx) { + if (!outOfMemory) + js_ReportOutOfMemory(cx); + outOfMemory = true; + hadFailure = true; + } + + + inline bool addJump(JSContext *cx, unsigned offset, + unsigned *currentOffset, unsigned *forwardJump, unsigned *forwardLoop, + unsigned stackDepth); + + + inline void addVariable(JSContext *cx, LifetimeVariable &var, unsigned offset, + LifetimeVariable **&saved, unsigned &savedCount); + inline void killVariable(JSContext *cx, LifetimeVariable &var, unsigned offset, + LifetimeVariable **&saved, unsigned &savedCount); + inline void extendVariable(JSContext *cx, LifetimeVariable &var, unsigned start, unsigned end); + inline void ensureVariable(LifetimeVariable &var, unsigned until); + + + struct SSAValueInfo + { + SSAValue v; + + + + + + + int32_t branchSize; + }; + + + bool makePhi(JSContext *cx, uint32_t slot, uint32_t offset, SSAValue *pv); + void insertPhi(JSContext *cx, SSAValue &phi, const SSAValue &v); + void mergeValue(JSContext *cx, uint32_t offset, const SSAValue &v, SlotValue *pv); + void checkPendingValue(JSContext *cx, const SSAValue &v, uint32_t slot, + Vector *pending); + void checkBranchTarget(JSContext *cx, uint32_t targetOffset, Vector &branchTargets, + SSAValueInfo *values, uint32_t stackDepth); + void checkExceptionTarget(JSContext *cx, uint32_t catchOffset, + Vector &exceptionTargets); + void mergeBranchTarget(JSContext *cx, SSAValueInfo &value, uint32_t slot, + const Vector &branchTargets, uint32_t currentOffset); + void mergeExceptionTarget(JSContext *cx, const SSAValue &value, uint32_t slot, + const Vector &exceptionTargets); + void mergeAllExceptionTargets(JSContext *cx, SSAValueInfo *values, + const Vector &exceptionTargets); + void freezeNewValues(JSContext *cx, uint32_t offset); + + struct TypeInferenceState { + Vector phiNodes; + bool hasGetSet; + bool hasHole; + types::TypeSet *forTypes; + TypeInferenceState(JSContext *cx) + : phiNodes(cx), hasGetSet(false), hasHole(false), forTypes(__null) + {} + }; + + + bool analyzeTypesBytecode(JSContext *cx, unsigned offset, TypeInferenceState &state); + bool needsArgsObj(NeedsArgsObjState &state, const SSAValue &v); + bool needsArgsObj(NeedsArgsObjState &state, SSAUseChain *use); + bool needsArgsObj(JSContext *cx); + + public: + + + + void assertMatchingDebugMode() { } + +}; + + +class AutoEnterAnalysis +{ + JSCompartment *compartment; + bool oldActiveAnalysis; + bool left; + + void construct(JSCompartment *compartment) + { + this->compartment = compartment; + oldActiveAnalysis = compartment->activeAnalysis; + compartment->activeAnalysis = true; + left = false; + } + + public: + AutoEnterAnalysis(JSContext *cx) { construct(cx->compartment); } + AutoEnterAnalysis(JSCompartment *compartment) { construct(compartment); } + + void leave() + { + if (!left) { + left = true; + compartment->activeAnalysis = oldActiveAnalysis; + } + } + + ~AutoEnterAnalysis() + { + leave(); + } +}; + + +struct CrossSSAValue +{ + unsigned frame; + SSAValue v; + CrossSSAValue(unsigned frame, const SSAValue &v) : frame(frame), v(v) {} +}; + + + + + + +class CrossScriptSSA +{ + public: + + static const uint32_t OUTER_FRAME = (4294967295U); + static const unsigned INVALID_FRAME = uint32_t(-2); + + struct Frame { + uint32_t index; + JSScript *script; + uint32_t depth; + uint32_t parent; + jsbytecode *parentpc; + + Frame(uint32_t index, JSScript *script, uint32_t depth, uint32_t parent, jsbytecode *parentpc) + : index(index), script(script), depth(depth), parent(parent), parentpc(parentpc) + {} + }; + + const Frame &getFrame(uint32_t index) { + if (index == OUTER_FRAME) + return outerFrame; + return inlineFrames[index]; + } + + unsigned numFrames() { return 1 + inlineFrames.length(); } + const Frame &iterFrame(unsigned i) { + if (i == 0) + return outerFrame; + return inlineFrames[i - 1]; + } + + JSScript *outerScript() { return outerFrame.script; } + + + size_t frameLength(uint32_t index) { + if (index == OUTER_FRAME) + return 0; + size_t res = outerFrame.script->length; + for (unsigned i = 0; i < index; i++) + res += inlineFrames[i].script->length; + return res; + } + + types::TypeSet *getValueTypes(const CrossSSAValue &cv) { + return getFrame(cv.frame).script->analysis()->getValueTypes(cv.v); + } + + bool addInlineFrame(JSScript *script, uint32_t depth, uint32_t parent, jsbytecode *parentpc) + { + uint32_t index = inlineFrames.length(); + return inlineFrames.append(Frame(index, script, depth, parent, parentpc)); + } + + CrossScriptSSA(JSContext *cx, JSScript *outer) + : cx(cx), outerFrame(OUTER_FRAME, outer, 0, INVALID_FRAME, __null), inlineFrames(cx) + {} + + CrossSSAValue foldValue(const CrossSSAValue &cv); + + private: + JSContext *cx; + + Frame outerFrame; + Vector inlineFrames; +}; + + + + + +} +} + +namespace js { +namespace tl { + +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; +template <> struct IsPodType { static const bool result = true; }; + +} +} +# 11 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprf.h" 1 + + + + + + +#define jsprf_h___ +# 29 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprf.h" +# 1 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stdarg.h" 1 3 4 +# 31 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stdarg.h" 3 4 +#define _STDARG_H +#define _ANSI_STDARG_H_ + +#undef __need___va_list +# 47 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stdarg.h" 3 4 +#define va_start(v,l) __builtin_va_start(v,l) +#define va_end(v) __builtin_va_end(v) +#define va_arg(v,l) __builtin_va_arg(v,l) + +#define va_copy(d,s) __builtin_va_copy(d,s) + +#define __va_copy(d,s) __builtin_va_copy(d,s) +# 108 "/usr/lib/gcc/armv7a-hardfloat-linux-gnueabi/4.5.4/include/stdarg.h" 3 4 +#define _VA_LIST_ + + +#define _VA_LIST + + + + + +#define _VA_LIST_T_H + + +#define __va_list__ +# 30 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprf.h" 2 + +extern "C" { + + + + + + +extern __attribute__((visibility("default"))) uint32_t JS_snprintf(char *out, uint32_t outlen, const char *fmt, ...); + + + + + + +extern __attribute__((visibility("default"))) char* JS_smprintf(const char *fmt, ...); + + + + +extern __attribute__((visibility("default"))) void JS_smprintf_free(char *mem); +# 59 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprf.h" +extern __attribute__((visibility("default"))) char* JS_sprintf_append(char *last, const char *fmt, ...); +# 68 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprf.h" +typedef int (*JSStuffFunc)(void *arg, const char *s, uint32_t slen); + +extern __attribute__((visibility("default"))) uint32_t JS_sxprintf(JSStuffFunc f, void *arg, const char *fmt, ...); + + + + +extern __attribute__((visibility("default"))) uint32_t JS_vsnprintf(char *out, uint32_t outlen, const char *fmt, va_list ap); +extern __attribute__((visibility("default"))) char* JS_vsmprintf(const char *fmt, va_list ap); +extern __attribute__((visibility("default"))) char* JS_vsprintf_append(char *last, const char *fmt, va_list ap); +extern __attribute__((visibility("default"))) uint32_t JS_vsxprintf(JSStuffFunc f, void *arg, const char *fmt, va_list ap); + +} +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" 2 + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" +#define Stack_inl_h__ + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/methodjit/MethodJIT.h" 1 +# 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack.h" 1 +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscriptinlines.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscriptinlines.h" +#define jsscriptinlines_h___ + +# 1 "./jsautooplen.h" 1 + + + + + +#define JSOP_NOP_LENGTH 1 +#define JSOP_UNDEFINED_LENGTH 1 +#define JSOP_POPV_LENGTH 1 +#define JSOP_ENTERWITH_LENGTH 1 +#define JSOP_LEAVEWITH_LENGTH 1 +#define JSOP_RETURN_LENGTH 1 +#define JSOP_GOTO_LENGTH 5 +#define JSOP_IFEQ_LENGTH 5 +#define JSOP_IFNE_LENGTH 5 +#define JSOP_ARGUMENTS_LENGTH 1 +#define JSOP_SWAP_LENGTH 1 +#define JSOP_POPN_LENGTH 3 +#define JSOP_DUP_LENGTH 1 +#define JSOP_DUP2_LENGTH 1 +#define JSOP_SETCONST_LENGTH 5 +#define JSOP_BITOR_LENGTH 1 +#define JSOP_BITXOR_LENGTH 1 +#define JSOP_BITAND_LENGTH 1 +#define JSOP_EQ_LENGTH 1 +#define JSOP_NE_LENGTH 1 +#define JSOP_LT_LENGTH 1 +#define JSOP_LE_LENGTH 1 +#define JSOP_GT_LENGTH 1 +#define JSOP_GE_LENGTH 1 +#define JSOP_LSH_LENGTH 1 +#define JSOP_RSH_LENGTH 1 +#define JSOP_URSH_LENGTH 1 +#define JSOP_ADD_LENGTH 1 +#define JSOP_SUB_LENGTH 1 +#define JSOP_MUL_LENGTH 1 +#define JSOP_DIV_LENGTH 1 +#define JSOP_MOD_LENGTH 1 +#define JSOP_NOT_LENGTH 1 +#define JSOP_BITNOT_LENGTH 1 +#define JSOP_NEG_LENGTH 1 +#define JSOP_POS_LENGTH 1 +#define JSOP_DELNAME_LENGTH 5 +#define JSOP_DELPROP_LENGTH 5 +#define JSOP_DELELEM_LENGTH 1 +#define JSOP_TYPEOF_LENGTH 1 +#define JSOP_VOID_LENGTH 1 +#define JSOP_INCNAME_LENGTH 6 +#define JSOP_INCPROP_LENGTH 6 +#define JSOP_INCELEM_LENGTH 2 +#define JSOP_DECNAME_LENGTH 6 +#define JSOP_DECPROP_LENGTH 6 +#define JSOP_DECELEM_LENGTH 2 +#define JSOP_NAMEINC_LENGTH 6 +#define JSOP_PROPINC_LENGTH 6 +#define JSOP_ELEMINC_LENGTH 2 +#define JSOP_NAMEDEC_LENGTH 6 +#define JSOP_PROPDEC_LENGTH 6 +#define JSOP_ELEMDEC_LENGTH 2 +#define JSOP_GETPROP_LENGTH 5 +#define JSOP_SETPROP_LENGTH 5 +#define JSOP_GETELEM_LENGTH 1 +#define JSOP_SETELEM_LENGTH 1 +#define JSOP_CALLNAME_LENGTH 5 +#define JSOP_CALL_LENGTH 3 +#define JSOP_NAME_LENGTH 5 +#define JSOP_DOUBLE_LENGTH 5 +#define JSOP_STRING_LENGTH 5 +#define JSOP_ZERO_LENGTH 1 +#define JSOP_ONE_LENGTH 1 +#define JSOP_NULL_LENGTH 1 +#define JSOP_THIS_LENGTH 1 +#define JSOP_FALSE_LENGTH 1 +#define JSOP_TRUE_LENGTH 1 +#define JSOP_OR_LENGTH 5 +#define JSOP_AND_LENGTH 5 +#define JSOP_TABLESWITCH_LENGTH -1 +#define JSOP_LOOKUPSWITCH_LENGTH -1 +#define JSOP_STRICTEQ_LENGTH 1 +#define JSOP_STRICTNE_LENGTH 1 +#define JSOP_SETCALL_LENGTH 1 +#define JSOP_ITER_LENGTH 2 +#define JSOP_MOREITER_LENGTH 1 +#define JSOP_ITERNEXT_LENGTH 2 +#define JSOP_ENDITER_LENGTH 1 +#define JSOP_FUNAPPLY_LENGTH 3 +#define JSOP_OBJECT_LENGTH 5 +#define JSOP_POP_LENGTH 1 +#define JSOP_NEW_LENGTH 3 +#define JSOP_UNUSED0_LENGTH 1 +#define JSOP_GETARG_LENGTH 3 +#define JSOP_SETARG_LENGTH 3 +#define JSOP_GETLOCAL_LENGTH 3 +#define JSOP_SETLOCAL_LENGTH 3 +#define JSOP_UINT16_LENGTH 3 +#define JSOP_NEWINIT_LENGTH 5 +#define JSOP_NEWARRAY_LENGTH 4 +#define JSOP_NEWOBJECT_LENGTH 5 +#define JSOP_ENDINIT_LENGTH 1 +#define JSOP_INITPROP_LENGTH 5 +#define JSOP_INITELEM_LENGTH 1 +#define JSOP_UNUSED14_LENGTH 1 +#define JSOP_UNUSED15_LENGTH 1 +#define JSOP_INCARG_LENGTH 3 +#define JSOP_DECARG_LENGTH 3 +#define JSOP_ARGINC_LENGTH 3 +#define JSOP_ARGDEC_LENGTH 3 +#define JSOP_INCLOCAL_LENGTH 3 +#define JSOP_DECLOCAL_LENGTH 3 +#define JSOP_LOCALINC_LENGTH 3 +#define JSOP_LOCALDEC_LENGTH 3 +#define JSOP_LEAVEFORLETIN_LENGTH 1 +#define JSOP_LABEL_LENGTH 5 +#define JSOP_UNUSED3_LENGTH 1 +#define JSOP_FUNCALL_LENGTH 3 +#define JSOP_LOOPHEAD_LENGTH 1 +#define JSOP_BINDNAME_LENGTH 5 +#define JSOP_SETNAME_LENGTH 5 +#define JSOP_THROW_LENGTH 1 +#define JSOP_IN_LENGTH 1 +#define JSOP_INSTANCEOF_LENGTH 1 +#define JSOP_DEBUGGER_LENGTH 1 +#define JSOP_GOSUB_LENGTH 5 +#define JSOP_RETSUB_LENGTH 1 +#define JSOP_EXCEPTION_LENGTH 1 +#define JSOP_LINENO_LENGTH 3 +#define JSOP_CONDSWITCH_LENGTH 1 +#define JSOP_CASE_LENGTH 5 +#define JSOP_DEFAULT_LENGTH 5 +#define JSOP_EVAL_LENGTH 3 +#define JSOP_ENUMELEM_LENGTH 1 +#define JSOP_GETTER_LENGTH 1 +#define JSOP_SETTER_LENGTH 1 +#define JSOP_DEFFUN_LENGTH 5 +#define JSOP_DEFCONST_LENGTH 5 +#define JSOP_DEFVAR_LENGTH 5 +#define JSOP_LAMBDA_LENGTH 5 +#define JSOP_CALLEE_LENGTH 1 +#define JSOP_UNUSED31_LENGTH 1 +#define JSOP_PICK_LENGTH 2 +#define JSOP_TRY_LENGTH 1 +#define JSOP_FINALLY_LENGTH 1 +#define JSOP_GETALIASEDVAR_LENGTH 9 +#define JSOP_CALLALIASEDVAR_LENGTH 9 +#define JSOP_SETALIASEDVAR_LENGTH 9 +#define JSOP_INCALIASEDVAR_LENGTH 10 +#define JSOP_DECALIASEDVAR_LENGTH 10 +#define JSOP_ALIASEDVARINC_LENGTH 10 +#define JSOP_ALIASEDVARDEC_LENGTH 10 +#define JSOP_UNUSED8_LENGTH 1 +#define JSOP_UNUSED9_LENGTH 1 +#define JSOP_UNUSED10_LENGTH 1 +#define JSOP_UNUSED11_LENGTH 1 +#define JSOP_UNUSED12_LENGTH 1 +#define JSOP_UNUSED13_LENGTH 1 +#define JSOP_BACKPATCH_LENGTH 5 +#define JSOP_BACKPATCH_POP_LENGTH 5 +#define JSOP_THROWING_LENGTH 1 +#define JSOP_SETRVAL_LENGTH 1 +#define JSOP_RETRVAL_LENGTH 1 +#define JSOP_GETGNAME_LENGTH 5 +#define JSOP_SETGNAME_LENGTH 5 +#define JSOP_INCGNAME_LENGTH 6 +#define JSOP_DECGNAME_LENGTH 6 +#define JSOP_GNAMEINC_LENGTH 6 +#define JSOP_GNAMEDEC_LENGTH 6 +#define JSOP_REGEXP_LENGTH 5 +#define JSOP_DEFXMLNS_LENGTH 1 +#define JSOP_ANYNAME_LENGTH 1 +#define JSOP_QNAMEPART_LENGTH 5 +#define JSOP_QNAMECONST_LENGTH 5 +#define JSOP_QNAME_LENGTH 1 +#define JSOP_TOATTRNAME_LENGTH 1 +#define JSOP_TOATTRVAL_LENGTH 1 +#define JSOP_ADDATTRNAME_LENGTH 1 +#define JSOP_ADDATTRVAL_LENGTH 1 +#define JSOP_BINDXMLNAME_LENGTH 1 +#define JSOP_SETXMLNAME_LENGTH 1 +#define JSOP_XMLNAME_LENGTH 1 +#define JSOP_DESCENDANTS_LENGTH 1 +#define JSOP_FILTER_LENGTH 5 +#define JSOP_ENDFILTER_LENGTH 5 +#define JSOP_TOXML_LENGTH 1 +#define JSOP_TOXMLLIST_LENGTH 1 +#define JSOP_XMLTAGEXPR_LENGTH 1 +#define JSOP_XMLELTEXPR_LENGTH 1 +#define JSOP_XMLCDATA_LENGTH 5 +#define JSOP_XMLCOMMENT_LENGTH 5 +#define JSOP_XMLPI_LENGTH 5 +#define JSOP_DELDESC_LENGTH 1 +#define JSOP_CALLPROP_LENGTH 5 +#define JSOP_ENTERLET0_LENGTH 5 +#define JSOP_ENTERLET1_LENGTH 5 +#define JSOP_UINT24_LENGTH 4 +#define JSOP_UNUSED18_LENGTH 1 +#define JSOP_UNUSED19_LENGTH 1 +#define JSOP_UNUSED20_LENGTH 1 +#define JSOP_STARTXML_LENGTH 1 +#define JSOP_STARTXMLEXPR_LENGTH 1 +#define JSOP_CALLELEM_LENGTH 1 +#define JSOP_STOP_LENGTH 1 +#define JSOP_GETXPROP_LENGTH 5 +#define JSOP_CALLXMLNAME_LENGTH 1 +#define JSOP_TYPEOFEXPR_LENGTH 1 +#define JSOP_ENTERBLOCK_LENGTH 5 +#define JSOP_LEAVEBLOCK_LENGTH 3 +#define JSOP_UNUSED1_LENGTH 1 +#define JSOP_UNUSED2_LENGTH 1 +#define JSOP_GENERATOR_LENGTH 1 +#define JSOP_YIELD_LENGTH 1 +#define JSOP_ARRAYPUSH_LENGTH 3 +#define JSOP_GETFUNNS_LENGTH 1 +#define JSOP_ENUMCONSTELEM_LENGTH 1 +#define JSOP_LEAVEBLOCKEXPR_LENGTH 3 +#define JSOP_UNUSED21_LENGTH 1 +#define JSOP_UNUSED22_LENGTH 1 +#define JSOP_UNUSED23_LENGTH 1 +#define JSOP_CALLGNAME_LENGTH 5 +#define JSOP_CALLLOCAL_LENGTH 3 +#define JSOP_CALLARG_LENGTH 3 +#define JSOP_BINDGNAME_LENGTH 5 +#define JSOP_INT8_LENGTH 2 +#define JSOP_INT32_LENGTH 5 +#define JSOP_LENGTH_LENGTH 5 +#define JSOP_HOLE_LENGTH 1 +#define JSOP_UNUSED17_LENGTH 1 +#define JSOP_UNUSED24_LENGTH 1 +#define JSOP_UNUSED25_LENGTH 1 +#define JSOP_UNUSED29_LENGTH 1 +#define JSOP_UNUSED30_LENGTH 1 +#define JSOP_REST_LENGTH 1 +#define JSOP_TOID_LENGTH 1 +#define JSOP_IMPLICITTHIS_LENGTH 5 +#define JSOP_LOOPENTRY_LENGTH 1 +#define JSOP_ACTUALSFILLED_LENGTH 3 +# 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscriptinlines.h" 2 +# 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscriptinlines.h" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscopeinlines.h" 1 + + + + + + + +#define jsscopeinlines_h___ +# 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscopeinlines.h" +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject.h" +#define ArgumentsObject_h___ + + + +namespace js { +# 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject.h" +struct ArgumentsData +{ + + + + + HeapValue callee; + + + + + + size_t *deletedBits; + + + + + + HeapValue slots[1]; +}; +# 95 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject.h" +class ArgumentsObject : public JSObject +{ + static const uint32_t INITIAL_LENGTH_SLOT = 0; + static const uint32_t DATA_SLOT = 1; + static const uint32_t STACK_FRAME_SLOT = 2; + + + static const uint32_t LENGTH_OVERRIDDEN_BIT = 0x1; + static const uint32_t PACKED_BITS_COUNT = 1; + + void initInitialLength(uint32_t length); + void initData(ArgumentsData *data); + static ArgumentsObject *create(JSContext *cx, uint32_t argc, HandleObject callee); + + public: + static const uint32_t RESERVED_SLOTS = 3; + static const gc::AllocKind FINALIZE_KIND = gc::FINALIZE_OBJECT4; + + + static ArgumentsObject *create(JSContext *cx, StackFrame *fp); + + + + + + + + static ArgumentsObject *createUnexpected(JSContext *cx, StackFrame *fp); + + + + + + inline uint32_t initialLength() const; + + + inline bool hasOverriddenLength() const; + inline void markLengthOverridden(); +# 142 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject.h" + inline bool getElement(uint32_t i, js::Value *vp); +# 153 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject.h" + inline bool getElements(uint32_t start, uint32_t count, js::Value *vp); + + inline js::ArgumentsData *data() const; +# 171 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject.h" + inline bool isElementDeleted(uint32_t i) const; + inline bool isAnyElementDeleted() const; + inline void markElementDeleted(uint32_t i); + + inline const js::Value &element(uint32_t i) const; + inline void setElement(uint32_t i, const js::Value &v); + + + inline js::StackFrame *maybeStackFrame() const; + inline void setStackFrame(js::StackFrame *frame); + + + + + + inline size_t sizeOfMisc(JSMallocSizeOfFun mallocSizeOf) const; +}; + +class NormalArgumentsObject : public ArgumentsObject +{ + public: + + + + + inline const js::Value &callee() const; + + + inline void clearCallee(); + + + + + + + static bool optimizedGetElem(JSContext *cx, StackFrame *fp, const Value &elem, Value *vp); +}; + +class StrictArgumentsObject : public ArgumentsObject +{}; + +} + +js::NormalArgumentsObject & +JSObject::asNormalArguments() +{ + do { } while(0); + return *static_cast(this); +} + +js::StrictArgumentsObject & +JSObject::asStrictArguments() +{ + do { } while(0); + return *static_cast(this); +} + +js::ArgumentsObject & +JSObject::asArguments() +{ + do { } while(0); + return *static_cast(this); +} + +const js::ArgumentsObject & +JSObject::asArguments() const +{ + do { } while(0); + return *static_cast(this); +} +# 23 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscopeinlines.h" 2 + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxtinlines.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxtinlines.h" +#define jscntxtinlines_h___ + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinterp.h" 1 +# 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxtinlines.h" 2 + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/frontend/ParseMaps.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/frontend/ParseMaps.h" +#define ParseMaps_h__ + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/InlineMap.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/ds/InlineMap.h" +#define InlineMap_h__ + + + +namespace js { + + + + + +template struct ZeroIsReserved { static const bool result = false; }; +template struct ZeroIsReserved { static const bool result = true; }; + +template +class InlineMap +{ + public: + typedef HashMap, TempAllocPolicy> WordMap; + + struct InlineElem + { + K key; + V value; + }; + + private: + typedef typename WordMap::Ptr WordMapPtr; + typedef typename WordMap::AddPtr WordMapAddPtr; + typedef typename WordMap::Range WordMapRange; + + size_t inlNext; + size_t inlCount; + InlineElem inl[InlineElems]; + WordMap map; + + void checkStaticInvariants() { + typedef int moz_static_assert108[(ZeroIsReserved::result) ? 1 : -1]; + } + + bool usingMap() const { + return inlNext > InlineElems; + } + + bool switchToMap() { + do { } while(0); + + if (map.initialized()) { + map.clear(); + } else { + if (!map.init(count())) + return false; + do { } while(0); + } + + for (InlineElem *it = inl, *end = inl + inlNext; it != end; ++it) { + if (it->key && !map.putNew(it->key, it->value)) + return false; + } + + inlNext = InlineElems + 1; + do { } while(0); + do { } while(0); + return true; + } + + __attribute__((noinline)) + bool switchAndAdd(const K &key, const V &value) { + if (!switchToMap()) + return false; + + return map.putNew(key, value); + } + + public: + explicit InlineMap(JSContext *cx) + : inlNext(0), inlCount(0), map(cx) { + checkStaticInvariants(); + } + + class Entry + { + friend class InlineMap; + const K &key_; + const V &value_; + + Entry(const K &key, const V &value) : key_(key), value_(value) {} + + public: + const K &key() { return key_; } + const V &value() { return value_; } + }; + + class Ptr + { + friend class InlineMap; + + WordMapPtr mapPtr; + InlineElem *inlPtr; + bool isInlinePtr; + + typedef Ptr ******* ConvertibleToBool; + + explicit Ptr(WordMapPtr p) : mapPtr(p), isInlinePtr(false) {} + explicit Ptr(InlineElem *ie) : inlPtr(ie), isInlinePtr(true) {} + void operator==(const Ptr &other); + + public: + + Ptr() { + + + + + } + + + + bool found() const { + return isInlinePtr ? bool(inlPtr) : mapPtr.found(); + } + + operator ConvertibleToBool() const { + return ConvertibleToBool(found()); + } + + K &key() { + do { } while(0); + return isInlinePtr ? inlPtr->key : mapPtr->key; + } + + V &value() { + do { } while(0); + return isInlinePtr ? inlPtr->value : mapPtr->value; + } + }; + + class AddPtr + { + friend class InlineMap; + + WordMapAddPtr mapAddPtr; + InlineElem *inlAddPtr; + bool isInlinePtr; + + bool inlPtrFound; + + AddPtr(InlineElem *ptr, bool found) + : inlAddPtr(ptr), isInlinePtr(true), inlPtrFound(found) + {} + + AddPtr(const WordMapAddPtr &p) : mapAddPtr(p), isInlinePtr(false) {} + + void operator==(const AddPtr &other); + + typedef AddPtr ******* ConvertibleToBool; + + public: + AddPtr() {} + + bool found() const { + return isInlinePtr ? inlPtrFound : mapAddPtr.found(); + } + + operator ConvertibleToBool() const { + return found() ? ConvertibleToBool(1) : ConvertibleToBool(0); + } + + V &value() { + do { } while(0); + if (isInlinePtr) + return inlAddPtr->value; + return mapAddPtr->value; + } + }; + + size_t count() { + return usingMap() ? map.count() : inlCount; + } + + bool empty() const { + return usingMap() ? map.empty() : !inlCount; + } + + void clear() { + inlNext = 0; + inlCount = 0; + } + + bool isMap() const { + return usingMap(); + } + + const WordMap &asMap() const { + do { } while(0); + return map; + } + + const InlineElem *asInline() const { + do { } while(0); + return inl; + } + + const InlineElem *inlineEnd() const { + do { } while(0); + return inl + inlNext; + } + + __attribute__((always_inline)) inline + Ptr lookup(const K &key) { + if (usingMap()) + return Ptr(map.lookup(key)); + + for (InlineElem *it = inl, *end = inl + inlNext; it != end; ++it) { + if (it->key == key) + return Ptr(it); + } + + return Ptr(__null); + } + + __attribute__((always_inline)) inline + AddPtr lookupForAdd(const K &key) { + if (usingMap()) + return AddPtr(map.lookupForAdd(key)); + + for (InlineElem *it = inl, *end = inl + inlNext; it != end; ++it) { + if (it->key == key) + return AddPtr(it, true); + } + + + + + + + return AddPtr(inl + inlNext, false); + } + + __attribute__((always_inline)) inline + bool add(AddPtr &p, const K &key, const V &value) { + do { } while(0); + + if (p.isInlinePtr) { + InlineElem *addPtr = p.inlAddPtr; + do { } while(0); + + + if (addPtr == inl + InlineElems) + return switchAndAdd(key, value); + + do { } while(0); + do { } while(0); + p.inlAddPtr->key = key; + p.inlAddPtr->value = value; + ++inlCount; + ++inlNext; + return true; + } + + return map.add(p.mapAddPtr, key, value); + } + + __attribute__((always_inline)) inline + bool put(const K &key, const V &value) { + AddPtr p = lookupForAdd(key); + if (p) { + p.value() = value; + return true; + } + return add(p, key, value); + } + + void remove(Ptr p) { + do { } while(0); + if (p.isInlinePtr) { + do { } while(0); + do { } while(0); + p.inlPtr->key = __null; + --inlCount; + return; + } + do { } while(0); + map.remove(p.mapPtr); + } + + void remove(const K &key) { + if (Ptr p = lookup(key)) + remove(p); + } + + class Range + { + friend class InlineMap; + + WordMapRange mapRange; + InlineElem *cur; + InlineElem *end; + bool isInline; + + explicit Range(WordMapRange r) + : cur(__null), end(__null), + isInline(false) { + mapRange = r; + do { } while(0); + } + + Range(const InlineElem *begin, const InlineElem *end_) + : cur(const_cast(begin)), + end(const_cast(end_)), + isInline(true) { + advancePastNulls(cur); + do { } while(0); + } + + bool checkInlineRangeInvariants() const { + do { } while(0); + do { } while (0); + return true; + } + + bool isInlineRange() const { + do { } while (0); + return isInline; + } + + void advancePastNulls(InlineElem *begin) { + InlineElem *newCur = begin; + while (newCur < end && __null == newCur->key) + ++newCur; + do { } while(0); + cur = newCur; + } + + void bumpCurPtr() { + do { } while(0); + advancePastNulls(cur + 1); + } + + void operator==(const Range &other); + + public: + bool empty() const { + return isInlineRange() ? cur == end : mapRange.empty(); + } + + Entry front() { + do { } while(0); + if (isInlineRange()) + return Entry(cur->key, cur->value); + return Entry(mapRange.front().key, mapRange.front().value); + } + + void popFront() { + do { } while(0); + if (isInlineRange()) + bumpCurPtr(); + else + mapRange.popFront(); + } + }; + + Range all() const { + return usingMap() ? Range(map.all()) : Range(inl, inl + inlNext); + } +}; + +} +# 14 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/frontend/ParseMaps.h" 2 + + + +namespace js { + +struct Definition; +# 28 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/frontend/ParseMaps.h" +class ParseMapPool +{ + typedef Vector RecyclableMaps; + + RecyclableMaps all; + RecyclableMaps recyclable; + JSContext *cx; + + void checkInvariants(); + + void recycle(void *map) { + do { } while(0); +# 53 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/frontend/ParseMaps.h" + do { } while(0); + recyclable.infallibleAppend(map); + } + + void *allocateFresh(); + void *allocate(); + + + typedef AtomIndexMap AtomMapT; + + static AtomMapT *asAtomMap(void *ptr) { + return reinterpret_cast(ptr); + } + + public: + explicit ParseMapPool(JSContext *cx) : cx(cx) {} + + ~ParseMapPool() { + purgeAll(); + } + + void purgeAll(); + + bool empty() const { + return all.empty(); + } + + + template + T *acquire(); + + + + void release(AtomIndexMap *map) { + recycle((void *) map); + } + + void release(AtomDefnMap *map) { + recycle((void *) map); + } + + void release(AtomDOHMap *map) { + recycle((void *) map); + } +}; + + + + + +template +struct AtomThingMapPtr +{ + Map *map_; + + void init() { clearMap(); } + + bool ensureMap(JSContext *cx); + void releaseMap(JSContext *cx); + + bool hasMap() const { return map_; } + Map *getMap() { return map_; } + void setMap(Map *newMap) { do { } while(0); map_ = newMap; } + void clearMap() { map_ = __null; } + + Map *operator->() { return map_; } + const Map *operator->() const { return map_; } + Map &operator*() const { return *map_; } +}; + +struct AtomDefnMapPtr : public AtomThingMapPtr +{ + __attribute__((always_inline)) inline + Definition *lookupDefn(JSAtom *atom) { + AtomDefnMap::Ptr p = map_->lookup(atom); + return p ? p.value() : __null; + } +}; + +typedef AtomThingMapPtr AtomIndexMapPtr; + + + + + +template +class OwnedAtomThingMapPtr : public AtomThingMapPtrT +{ + JSContext *cx; + + public: + explicit OwnedAtomThingMapPtr(JSContext *cx) : cx(cx) { + AtomThingMapPtrT::init(); + } + + ~OwnedAtomThingMapPtr() { + AtomThingMapPtrT::releaseMap(cx); + } +}; + +typedef OwnedAtomThingMapPtr OwnedAtomDefnMapPtr; +typedef OwnedAtomThingMapPtr OwnedAtomIndexMapPtr; + + +struct AtomDeclNode +{ + Definition *defn; + AtomDeclNode *next; + + explicit AtomDeclNode(Definition *defn) + : defn(defn), next(__null) + {} +}; + + + + + +class DefnOrHeader +{ + union { + Definition *defn; + AtomDeclNode *head; + uintptr_t bits; + } u; + + public: + DefnOrHeader() { + u.bits = 0; + } + + explicit DefnOrHeader(Definition *defn) { + u.defn = defn; + do { } while(0); + } + + explicit DefnOrHeader(AtomDeclNode *node) { + u.head = node; + u.bits |= 0x1; + do { } while(0); + } + + bool isHeader() const { + return u.bits & 0x1; + } + + Definition *defn() const { + do { } while(0); + return u.defn; + } + + AtomDeclNode *header() const { + do { } while(0); + return (AtomDeclNode *) (u.bits & ~0x1); + } + + + + +}; + +namespace tl { + +template <> struct IsPodType { + static const bool result = true; +}; + +} +# 231 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/frontend/ParseMaps.h" +class AtomDecls +{ + + friend class AtomDeclsIter; + + JSContext *cx; + AtomDOHMap *map; + + AtomDecls(const AtomDecls &other) ; + void operator=(const AtomDecls &other) ; + + AtomDeclNode *allocNode(Definition *defn); + + + + + + AtomDeclNode *lastAsNode(DefnOrHeader *doh); + + public: + explicit AtomDecls(JSContext *cx) + : cx(cx), map(__null) + {} + + ~AtomDecls(); + + bool init(); + + void clear() { + map->clear(); + } + + + inline Definition *lookupFirst(JSAtom *atom); + + + inline MultiDeclRange lookupMulti(JSAtom *atom); + + + inline bool addUnique(JSAtom *atom, Definition *defn); + bool addShadow(JSAtom *atom, Definition *defn); + bool addHoist(JSAtom *atom, Definition *defn); + + + void updateFirst(JSAtom *atom, Definition *defn) { + do { } while(0); + AtomDOHMap::Ptr p = map->lookup(atom); + do { } while(0); + if (p.value().isHeader()) + p.value().header()->defn = defn; + else + p.value() = DefnOrHeader(defn); + } + + + void remove(JSAtom *atom) { + do { } while(0); + AtomDOHMap::Ptr p = map->lookup(atom); + if (!p) + return; + + DefnOrHeader &doh = p.value(); + if (!doh.isHeader()) { + map->remove(p); + return; + } + + AtomDeclNode *node = doh.header(); + AtomDeclNode *newHead = node->next; + if (newHead) + p.value() = DefnOrHeader(newHead); + else + map->remove(p); + } + + AtomDOHMap::Range all() { + do { } while(0); + return map->all(); + } + + + + +}; + + + + + + +class MultiDeclRange +{ + friend class AtomDecls; + + AtomDeclNode *node; + Definition *defn; + + explicit MultiDeclRange(Definition *defn) : node(__null), defn(defn) {} + explicit MultiDeclRange(AtomDeclNode *node) : node(node), defn(node->defn) {} + + public: + void popFront() { + do { } while(0); + if (!node) { + defn = __null; + return; + } + node = node->next; + defn = node ? node->defn : __null; + } + + Definition *front() { + do { } while(0); + return defn; + } + + bool empty() const { + do { } while (0); + return !defn; + } +}; + + +class AtomDeclsIter +{ + AtomDOHMap::Range r; + AtomDeclNode *link; + + public: + explicit AtomDeclsIter(AtomDecls *decls) : r(decls->all()), link(__null) {} + + Definition *next() { + if (link) { + do { } while(0); + Definition *result = link->defn; + link = link->next; + do { } while(0); + return result; + } + + if (r.empty()) + return __null; + + const DefnOrHeader &doh = r.front().value(); + r.popFront(); + + if (!doh.isHeader()) + return doh.defn(); + + do { } while(0); + AtomDeclNode *node = doh.header(); + link = node->next; + return node->defn; + } +}; + +typedef AtomDefnMap::Range AtomDefnRange; +typedef AtomDefnMap::AddPtr AtomDefnAddPtr; +typedef AtomDefnMap::Ptr AtomDefnPtr; +typedef AtomIndexMap::AddPtr AtomIndexAddPtr; +typedef AtomIndexMap::Ptr AtomIndexPtr; +typedef AtomDOHMap::Ptr AtomDOHPtr; +typedef AtomDOHMap::AddPtr AtomDOHAddPtr; +typedef AtomDOHMap::Range AtomDOHRange; + +} +# 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxtinlines.h" 2 + + + + +namespace js { + +inline void +NewObjectCache::staticAsserts() +{ + typedef int moz_static_assert109[(NewObjectCache::MAX_OBJ_SIZE == sizeof(JSObject_Slots16)) ? 1 : -1]; + typedef int moz_static_assert110[(gc::FINALIZE_OBJECT_LAST == gc::FINALIZE_OBJECT16_BACKGROUND) ? 1 : -1]; +} + +inline bool +NewObjectCache::lookup(Class *clasp, gc::Cell *key, gc::AllocKind kind, EntryIndex *pentry) +{ + uintptr_t hash = (uintptr_t(clasp) ^ uintptr_t(key)) + kind; + *pentry = hash % js::ArrayLength(entries); + + Entry *entry = &entries[*pentry]; + + + return (entry->clasp == clasp && entry->key == key); +} + +inline bool +NewObjectCache::lookupProto(Class *clasp, JSObject *proto, gc::AllocKind kind, EntryIndex *pentry) +{ + do { } while(0); + return lookup(clasp, proto, kind, pentry); +} + +inline bool +NewObjectCache::lookupGlobal(Class *clasp, js::GlobalObject *global, gc::AllocKind kind, EntryIndex *pentry) +{ + return lookup(clasp, global, kind, pentry); +} + +inline bool +NewObjectCache::lookupType(Class *clasp, js::types::TypeObject *type, gc::AllocKind kind, EntryIndex *pentry) +{ + return lookup(clasp, type, kind, pentry); +} + +inline void +NewObjectCache::fill(EntryIndex entry_, Class *clasp, gc::Cell *key, gc::AllocKind kind, JSObject *obj) +{ + do { } while(0); + Entry *entry = &entries[entry_]; + + do { } while(0); + + entry->clasp = clasp; + entry->key = key; + entry->kind = kind; + + entry->nbytes = obj->sizeOfThis(); + js_memcpy(&entry->templateObject, obj, entry->nbytes); +} + +inline void +NewObjectCache::fillProto(EntryIndex entry, Class *clasp, JSObject *proto, gc::AllocKind kind, JSObject *obj) +{ + do { } while(0); + do { } while(0); + return fill(entry, clasp, proto, kind, obj); +} + +inline void +NewObjectCache::fillGlobal(EntryIndex entry, Class *clasp, js::GlobalObject *global, gc::AllocKind kind, JSObject *obj) +{ + + return fill(entry, clasp, global, kind, obj); +} + +inline void +NewObjectCache::fillType(EntryIndex entry, Class *clasp, js::types::TypeObject *type, gc::AllocKind kind, JSObject *obj) +{ + do { } while(0); + return fill(entry, clasp, type, kind, obj); +} + +inline JSObject * +NewObjectCache::newObjectFromHit(JSContext *cx, EntryIndex entry_) +{ + do { } while(0); + Entry *entry = &entries[entry_]; + + JSObject *obj = js_TryNewGCObject(cx, entry->kind); + if (obj) { + copyCachedToObject(obj, reinterpret_cast(&entry->templateObject)); + Probes::createObject(cx, obj); + return obj; + } + + + size_t nbytes = entry->nbytes; + char stackObject[sizeof(JSObject_Slots16)]; + do { } while(0); + js_memcpy(&stackObject, &entry->templateObject, nbytes); + + JSObject *baseobj = (JSObject *) stackObject; + + obj = js_NewGCObject(cx, entry->kind); + if (obj) { + copyCachedToObject(obj, baseobj); + Probes::createObject(cx, obj); + return obj; + } + + return __null; +} + +struct PreserveRegsGuard +{ + PreserveRegsGuard(JSContext *cx, FrameRegs ®s) + : prevContextRegs(cx->maybeRegs()), cx(cx), regs_(regs) { + cx->stack.repointRegs(®s_); + } + ~PreserveRegsGuard() { + do { } while(0); + *prevContextRegs = regs_; + cx->stack.repointRegs(prevContextRegs); + } + + FrameRegs *prevContextRegs; + + private: + JSContext *cx; + FrameRegs ®s_; +}; + +static inline GlobalObject * +GetGlobalForScopeChain(JSContext *cx) +{ + if (cx->hasfp()) + return &cx->fp()->global(); + + JSObject *scope = JS_ObjectToInnerObject(cx, cx->globalObject); + if (!scope) + return __null; + return &scope->asGlobal(); +} + +inline GSNCache * +GetGSNCache(JSContext *cx) +{ + return &cx->runtime->gsnCache; +} + + + +class AutoNamespaceArray : protected AutoGCRooter { + public: + AutoNamespaceArray(JSContext *cx) + : AutoGCRooter(cx, NAMESPACES), context(cx) { + array.init(); + } + + ~AutoNamespaceArray() { + array.finish(context->runtime->defaultFreeOp()); + } + + uint32_t length() const { return array.length; } + + private: + JSContext *context; + friend void AutoGCRooter::trace(JSTracer *trc); + + public: + JSXMLArray array; +}; + + + +template +class AutoPtr +{ + JSContext *cx; + T *value; + + AutoPtr(const AutoPtr &other) ; + + public: + explicit AutoPtr(JSContext *cx) : cx(cx), value(__null) {} + ~AutoPtr() { + cx->delete_(value); + } + + void operator=(T *ptr) { value = ptr; } + + typedef void ***** ConvertibleToBool; + operator ConvertibleToBool() const { return (ConvertibleToBool) value; } + + const T *operator->() const { return value; } + T *operator->() { return value; } + + T *get() { return value; } +}; +# 325 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxtinlines.h" +#define START_ASSERT_SAME_COMPARTMENT() if (cx->runtime->gcRunning) return; CompartmentChecker c(cx) + + + + +template inline void +assertSameCompartment(JSContext *cx, const T1 &t1) +{ + + + + +} + +template inline void +assertSameCompartment(JSContext *cx, const T1 &t1, const T2 &t2) +{ + + + + + +} + +template inline void +assertSameCompartment(JSContext *cx, const T1 &t1, const T2 &t2, const T3 &t3) +{ + + + + + + +} + +template inline void +assertSameCompartment(JSContext *cx, const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4) +{ + + + + + + + +} + +template inline void +assertSameCompartment(JSContext *cx, const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4, const T5 &t5) +{ +# 383 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxtinlines.h" +} + +#undef START_ASSERT_SAME_COMPARTMENT + + +__attribute__((always_inline)) inline bool +CallJSNative(JSContext *cx, Native native, const CallArgs &args) +{ + + + + assertSameCompartment(cx, args); + bool ok = native(cx, args.length(), args.base()); + if (ok) { + assertSameCompartment(cx, args.rval()); + do { } while (0); + } + return ok; +} + +extern JSBool CallOrConstructBoundFunction(JSContext *, unsigned, js::Value *); + + +__attribute__((always_inline)) inline bool +CallJSNativeConstructor(JSContext *cx, Native native, const CallArgs &args) +{ + + + + + do { } while(0); + if (!CallJSNative(cx, native, args)) + return false; +# 432 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jscntxtinlines.h" + do { } while (0) + + + ; + + return true; +} + +__attribute__((always_inline)) inline bool +CallJSPropertyOp(JSContext *cx, PropertyOp op, HandleObject receiver, HandleId id, Value *vp) +{ + assertSameCompartment(cx, receiver, id, *vp); + JSBool ok = op(cx, receiver, id, vp); + if (ok) + assertSameCompartment(cx, *vp); + return ok; +} + +__attribute__((always_inline)) inline bool +CallJSPropertyOpSetter(JSContext *cx, StrictPropertyOp op, HandleObject obj, HandleId id, + JSBool strict, Value *vp) +{ + assertSameCompartment(cx, obj, id, *vp); + return op(cx, obj, id, strict, vp); +} + +inline bool +CallSetter(JSContext *cx, HandleObject obj, HandleId id, StrictPropertyOp op, unsigned attrs, + unsigned shortid, JSBool strict, Value *vp) +{ + if (attrs & 0x20) + return InvokeGetterOrSetter(cx, obj, CastAsObjectJsval(op), 1, vp, vp); + + if (attrs & 0x10) + return js_ReportGetterOnlyAssignment(cx); + + if (!(attrs & 0x100)) + return CallJSPropertyOpSetter(cx, op, obj, id, strict, vp); + + RootedId nid(cx, INT_TO_JSID(shortid)); + + return CallJSPropertyOpSetter(cx, op, obj, nid, strict, vp); +} + +static inline HeapPtrAtom * +FrameAtomBase(JSContext *cx, js::StackFrame *fp) +{ + return fp->script()->atoms; +} + +} + +inline JSVersion +JSContext::findVersion() const +{ + if (hasVersionOverride) + return versionOverride; + + if (stack.hasfp()) { + + js::StackFrame *f = fp(); + while (f && !f->isScriptFrame()) + f = f->prev(); + if (f) + return f->script()->getVersion(); + } + + return defaultVersion; +} + +inline bool +JSContext::canSetDefaultVersion() const +{ + return !stack.hasfp() && !hasVersionOverride; +} + +inline void +JSContext::overrideVersion(JSVersion newVersion) +{ + do { } while(0); + versionOverride = newVersion; + hasVersionOverride = true; +} + +inline bool +JSContext::maybeOverrideVersion(JSVersion newVersion) +{ + if (canSetDefaultVersion()) { + setDefaultVersion(newVersion); + return false; + } + overrideVersion(newVersion); + return true; +} + +inline unsigned +JSContext::getCompileOptions() const { return js::VersionFlagsToOptions(findVersion()); } + +inline unsigned +JSContext::allOptions() const { return getRunOptions() | getCompileOptions(); } + +inline void +JSContext::setCompileOptions(unsigned newcopts) +{ + do { } while(0); + if ((__builtin_expect((getCompileOptions() == newcopts), 1))) + return; + JSVersion version = findVersion(); + JSVersion newVersion = js::OptionFlagsToVersion(newcopts, version); + maybeOverrideVersion(newVersion); +} + +inline void +JSContext::assertValidStackDepth(unsigned depth) +{ + + + + +} + +inline js::LifoAlloc & +JSContext::typeLifoAlloc() +{ + return compartment->typeLifoAlloc; +} + +inline bool +JSContext::ensureGeneratorStackSpace() +{ + bool ok = genStack.reserve(genStack.length() + 1); + if (!ok) + js_ReportOutOfMemory(this); + return ok; +} + +inline void +JSContext::setPendingException(js::Value v) { + do { } while(0); + this->throwing = true; + this->exception = v; + js::assertSameCompartment(this, v); +} + +inline bool +JSContext::ensureParseMapPool() +{ + if (parseMapPool_) + return true; + parseMapPool_ = js::OffTheBooks::new_(this); + return parseMapPool_; +} + +inline js::PropertyTree& +JSContext::propertyTree() +{ + return compartment->propertyTree; +} + + +static inline js::StackFrame * +js_GetTopStackFrame(JSContext *cx, FrameExpandKind expand) +{ + + if (expand) + js::mjit::ExpandInlineFrames(cx->compartment); + + + return cx->maybefp(); +} +# 27 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscopeinlines.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 1 +# 29 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscopeinlines.h" 2 + + + +namespace js { + +inline +BaseShape::BaseShape(Class *clasp, JSObject *parent, uint32_t objectFlags) +{ + do { } while(0); + PodZero(this); + this->clasp = clasp; + this->parent = parent; + this->flags = objectFlags; +} + +inline +BaseShape::BaseShape(Class *clasp, JSObject *parent, uint32_t objectFlags, + uint8_t attrs, js::PropertyOp rawGetter, js::StrictPropertyOp rawSetter) +{ + do { } while(0); + PodZero(this); + this->clasp = clasp; + this->parent = parent; + this->flags = objectFlags; + this->rawGetter = rawGetter; + this->rawSetter = rawSetter; + if ((attrs & 0x10) && rawGetter) { + this->flags |= HAS_GETTER_OBJECT; + JSObject::writeBarrierPost(this->getterObj, &this->getterObj); + } + if ((attrs & 0x20) && rawSetter) { + this->flags |= HAS_SETTER_OBJECT; + JSObject::writeBarrierPost(this->setterObj, &this->setterObj); + } +} + +inline +BaseShape::BaseShape(const StackBaseShape &base) +{ + PodZero(this); + this->clasp = base.clasp; + this->parent = base.parent; + this->flags = base.flags; + this->rawGetter = base.rawGetter; + this->rawSetter = base.rawSetter; + if ((base.flags & HAS_GETTER_OBJECT) && base.rawGetter) { + JSObject::writeBarrierPost(this->getterObj, &this->getterObj); + } + if ((base.flags & HAS_SETTER_OBJECT) && base.rawSetter) { + JSObject::writeBarrierPost(this->setterObj, &this->setterObj); + } +} + +inline BaseShape & +BaseShape::operator=(const BaseShape &other) +{ + clasp = other.clasp; + parent = other.parent; + flags = other.flags; + slotSpan_ = other.slotSpan_; + if (flags & HAS_GETTER_OBJECT) { + getterObj = other.getterObj; + JSObject::writeBarrierPost(getterObj, &getterObj); + } else { + rawGetter = other.rawGetter; + } + if (flags & HAS_SETTER_OBJECT) { + setterObj = other.setterObj; + JSObject::writeBarrierPost(setterObj, &setterObj); + } else { + rawSetter = other.rawSetter; + } + return *this; +} + +inline bool +BaseShape::matchesGetterSetter(PropertyOp rawGetter, StrictPropertyOp rawSetter) const +{ + return rawGetter == this->rawGetter && rawSetter == this->rawSetter; +} + +inline +StackBaseShape::StackBaseShape(Shape *shape) + : flags(shape->getObjectFlags()), + clasp(shape->getObjectClass()), + parent(shape->getObjectParent()) +{ + updateGetterSetter(shape->attrs, shape->getter(), shape->setter()); +} + +inline void +StackBaseShape::updateGetterSetter(uint8_t attrs, + PropertyOp rawGetter, + StrictPropertyOp rawSetter) +{ + flags &= ~(BaseShape::HAS_GETTER_OBJECT | BaseShape::HAS_SETTER_OBJECT); + if ((attrs & 0x10) && rawGetter) + flags |= BaseShape::HAS_GETTER_OBJECT; + if ((attrs & 0x20) && rawSetter) + flags |= BaseShape::HAS_SETTER_OBJECT; + + this->rawGetter = rawGetter; + this->rawSetter = rawSetter; +} + +inline void +BaseShape::adoptUnowned(UnownedBaseShape *other) +{ + + + + + do { } while(0); + DebugOnly flags = getObjectFlags(); + do { } while(0); + + uint32_t span = slotSpan(); + ShapeTable *table = &this->table(); + + *this = *other; + setOwned(other); + setTable(table); + setSlotSpan(span); + + assertConsistency(); +} + +inline void +BaseShape::setOwned(UnownedBaseShape *unowned) +{ + flags |= OWNED_SHAPE; + this->unowned_ = unowned; +} + +inline void +BaseShape::assertConsistency() +{ +# 177 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscopeinlines.h" +} + +inline +Shape::Shape(const StackShape &other, uint32_t nfixed) + : base_(other.base), + propid_(other.propid), + slotInfo(other.maybeSlot() | (nfixed << FIXED_SLOTS_SHIFT)), + attrs(other.attrs), + flags(other.flags), + shortid_(other.shortid), + parent(__null) +{ + kids.setNull(); +} + +inline +Shape::Shape(UnownedBaseShape *base, uint32_t nfixed) + : base_(base), + propid_(((jsid)0x4)), + slotInfo(SHAPE_INVALID_SLOT | (nfixed << FIXED_SLOTS_SHIFT)), + attrs(0x40), + flags(0), + shortid_(0), + parent(__null) +{ + do { } while(0); + kids.setNull(); +} + +inline HashNumber +StackShape::hash() const +{ + HashNumber hash = uintptr_t(base); + + + hash = (((hash) << (4)) | ((hash) >> (32 - (4)))) ^ (flags & Shape::PUBLIC_FLAGS); + hash = (((hash) << (4)) | ((hash) >> (32 - (4)))) ^ attrs; + hash = (((hash) << (4)) | ((hash) >> (32 - (4)))) ^ shortid; + hash = (((hash) << (4)) | ((hash) >> (32 - (4)))) ^ slot_; + hash = (((hash) << (4)) | ((hash) >> (32 - (4)))) ^ (propid); + return hash; +} + +inline bool +Shape::matches(const js::Shape *other) const +{ + return propid_.get() == other->propid_.get() && + matchesParamsAfterId(other->base(), other->maybeSlot(), other->attrs, + other->flags, other->shortid_); +} + +inline bool +Shape::matches(const StackShape &other) const +{ + return propid_.get() == other.propid && + matchesParamsAfterId(other.base, other.slot_, other.attrs, other.flags, other.shortid); +} + +inline bool +Shape::matchesParamsAfterId(BaseShape *base, uint32_t aslot, + unsigned aattrs, unsigned aflags, int ashortid) const +{ + return base->unowned() == this->base()->unowned() && + maybeSlot() == aslot && + attrs == aattrs && + ((flags ^ aflags) & PUBLIC_FLAGS) == 0 && + shortid_ == ashortid; +} + +inline bool +Shape::getUserId(JSContext *cx, jsid *idp) const +{ + const Shape *self = this; + + + + + + + if (self->hasShortID()) { + int16_t id = self->shortid(); + if (id < 0) + return ValueToId(cx, Int32Value(id), idp); + *idp = INT_TO_JSID(id); + } else { + *idp = propid(); + } + return true; +} + +inline bool +Shape::get(JSContext* cx, HandleObject receiver, JSObject* obj, JSObject *pobj, Value* vp) const +{ + do { } while(0); + + if (hasGetterValue()) { + Value fval = getterValue(); + return InvokeGetterOrSetter(cx, receiver, fval, 0, 0, vp); + } + + RootedId id(cx); + if (!getUserId(cx, id.address())) + return false; + + return CallJSPropertyOp(cx, getterOp(), receiver, id, vp); +} + +inline bool +Shape::set(JSContext* cx, HandleObject obj, bool strict, Value* vp) const +{ + do { } while (0); + + if (attrs & 0x20) { + Value fval = setterValue(); + return InvokeGetterOrSetter(cx, obj, fval, 1, vp, vp); + } + + if (attrs & 0x10) + return js_ReportGetterOnlyAssignment(cx); + + RootedId id(cx); + if (!getUserId(cx, id.address())) + return false; + + + + + + if (obj->isWith()) { + RootedObject nobj(cx, &obj->asWith().object()); + return CallJSPropertyOpSetter(cx, setterOp(), nobj, id, strict, vp); + } + + return CallJSPropertyOpSetter(cx, setterOp(), obj, id, strict, vp); +} + +inline void +Shape::setParent(js::Shape *p) +{ + do { } while (0) + ; + do { } while (0) + ; + parent = p; +} + +inline void +Shape::removeFromDictionary(JSObject *obj) +{ + do { } while(0); + do { } while(0); + do { } while(0); + + do { } while(0); + do { } while(0); + + if (parent) + parent->listp = listp; + *listp = parent; + listp = __null; +} + +inline void +Shape::insertIntoDictionary(HeapPtrShape *dictp) +{ + + + + + do { } while(0); + do { } while(0); + + do { } while (0); + do { } while (0); + do { } while (0); + + setParent(*dictp); + if (parent) + parent->listp = &parent; + listp = (HeapPtrShape *) dictp; + *dictp = this; +} + +void +Shape::initDictionaryShape(const StackShape &child, uint32_t nfixed, HeapPtrShape *dictp) +{ + new (this) Shape(child, nfixed); + this->flags |= IN_DICTIONARY; + + this->listp = __null; + insertIntoDictionary(dictp); +} + +inline +EmptyShape::EmptyShape(UnownedBaseShape *base, uint32_t nfixed) + : js::Shape(base, nfixed) +{ + + if (!getObjectClass()->isNative()) + flags |= NON_NATIVE; +} + +inline void +Shape::writeBarrierPre(const js::Shape *shape) +{ + + if (!shape) + return; + + JSCompartment *comp = shape->compartment(); + if (comp->needsBarrier()) { + Shape *tmp = const_cast(shape); + MarkShapeUnbarriered(comp->barrierTracer(), &tmp, "write barrier"); + do { } while(0); + } + +} + +inline void +Shape::writeBarrierPost(const js::Shape *shape, void *addr) +{ +} + +inline void +Shape::readBarrier(const Shape *shape) +{ + + JSCompartment *comp = shape->compartment(); + if (comp->needsBarrier()) { + Shape *tmp = const_cast(shape); + MarkShapeUnbarriered(comp->barrierTracer(), &tmp, "read barrier"); + do { } while(0); + } + +} + +inline void +Shape::markChildren(JSTracer *trc) +{ + MarkBaseShape(trc, &base_, "base"); + gc::MarkId(trc, &propidRef(), "propid"); + if (parent) + MarkShape(trc, &parent, "parent"); +} + +inline void +BaseShape::writeBarrierPre(BaseShape *base) +{ + + if (!base) + return; + + JSCompartment *comp = base->compartment(); + if (comp->needsBarrier()) { + BaseShape *tmp = base; + MarkBaseShapeUnbarriered(comp->barrierTracer(), &tmp, "write barrier"); + do { } while(0); + } + +} + +inline void +BaseShape::writeBarrierPost(BaseShape *shape, void *addr) +{ +} + +inline void +BaseShape::readBarrier(BaseShape *base) +{ + + JSCompartment *comp = base->compartment(); + if (comp->needsBarrier()) { + BaseShape *tmp = base; + MarkBaseShapeUnbarriered(comp->barrierTracer(), &tmp, "read barrier"); + do { } while(0); + } + +} + +inline void +BaseShape::markChildren(JSTracer *trc) +{ + if (hasGetterObject()) + MarkObjectUnbarriered(trc, &getterObj, "getter"); + + if (hasSetterObject()) + MarkObjectUnbarriered(trc, &setterObj, "setter"); + + if (isOwned()) + MarkBaseShape(trc, &unowned_, "base"); + + if (parent) + MarkObject(trc, &parent, "parent"); +} + +} +# 23 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscriptinlines.h" 2 + +namespace js { + +inline +Bindings::Bindings(JSContext *cx) + : lastBinding(__null), nargs(0), nvars(0), hasDup_(false) +{} + +inline void +Bindings::transfer(JSContext *cx, Bindings *bindings) +{ + do { } while(0); + do { } while(0); + + *this = *bindings; + + + +} + +inline void +Bindings::clone(JSContext *cx, Bindings *bindings) +{ + do { } while(0); + do { } while(0); + + *this = *bindings; +} + +Shape * +Bindings::lastShape() const +{ + do { } while(0); + do { } while(0); + return lastBinding; +} + +Shape * +Bindings::initialShape(JSContext *cx) const +{ + + gc::AllocKind kind = gc::FINALIZE_OBJECT4; + do { } while(0); + + return EmptyShape::getInitialShape(cx, &CallClass, __null, __null, kind, + BaseShape::VAROBJ); +} + +bool +Bindings::ensureShape(JSContext *cx) +{ + if (!lastBinding) { + lastBinding = initialShape(cx); + if (!lastBinding) + return false; + } + return true; +} + +bool +Bindings::extensibleParents() +{ + return lastBinding && lastBinding->extensibleParents(); +} + +extern void +CurrentScriptFileLineOriginSlow(JSContext *cx, const char **file, unsigned *linenop, JSPrincipals **origin); + +inline void +CurrentScriptFileLineOrigin(JSContext *cx, const char **file, unsigned *linenop, JSPrincipals **origin, + LineOption opt = NOT_CALLED_FROM_JSOP_EVAL) +{ + if (opt == CALLED_FROM_JSOP_EVAL) { + do { } while(0); + do { } while(0); + JSScript *script = cx->fp()->script(); + *file = script->filename; + *linenop = ((unsigned)(((cx->regs().pc + 3)[1] << 8) | (cx->regs().pc + 3)[2])); + *origin = script->originPrincipals; + return; + } + + CurrentScriptFileLineOriginSlow(cx, file, linenop, origin); +} + +inline void +ScriptCounts::destroy(FreeOp *fop) +{ + fop->free_(pcCountsVector); +} + +inline void +MarkScriptFilename(JSRuntime *rt, const char *filename) +{ + + + + + + if (rt->gcIsFull) + ScriptFilenameEntry::fromFilename(filename)->marked = true; +} + +} + +inline void +JSScript::setFunction(JSFunction *fun) +{ + function_ = fun; +} + +inline JSFunction * +JSScript::getFunction(size_t index) +{ + JSObject *funobj = getObject(index); + do { } while(0); + return funobj->toFunction(); +} + +inline JSFunction * +JSScript::getCallerFunction() +{ + do { } while(0); + return getFunction(0); +} + +inline JSObject * +JSScript::getRegExp(size_t index) +{ + js::ObjectArray *arr = regexps(); + do { } while(0); + JSObject *obj = arr->vector[index]; + do { } while(0); + return obj; +} + +inline bool +JSScript::isEmpty() const +{ + if (length > 3) + return false; + + jsbytecode *pc = code; + if (noScriptRval && JSOp(*pc) == JSOP_FALSE) + ++pc; + return JSOp(*pc) == JSOP_STOP; +} + +inline bool +JSScript::hasGlobal() const +{ + + + + + + do { } while(0); + js::GlobalObject *obj = types->global; + return obj && !obj->isCleared(); +} + +inline js::GlobalObject * +JSScript::global() const +{ + do { } while(0); + return types->global; +} + +inline bool +JSScript::hasClearedGlobal() const +{ + do { } while(0); + js::GlobalObject *obj = types->global; + return obj && obj->isCleared(); +} + +inline js::types::TypeScriptNesting * +JSScript::nesting() const +{ + do { } while(0); + return types->nesting; +} + +inline void +JSScript::clearNesting() +{ + js::types::TypeScriptNesting *nesting = this->nesting(); + if (nesting) { + js::Foreground::delete_(nesting); + types->nesting = __null; + } +} + + +inline bool +JSScript::ensureHasJITInfo(JSContext *cx) +{ + if (jitInfo) + return true; + jitInfo = cx->new_(); + return jitInfo != __null; +} + +inline void +JSScript::destroyJITInfo(js::FreeOp *fop) +{ + fop->delete_(jitInfo); + jitInfo = __null; +} + + +inline void +JSScript::writeBarrierPre(JSScript *script) +{ + + if (!script) + return; + + JSCompartment *comp = script->compartment(); + if (comp->needsBarrier()) { + do { } while(0); + JSScript *tmp = script; + MarkScriptUnbarriered(comp->barrierTracer(), &tmp, "write barrier"); + do { } while(0); + } + +} + +inline void +JSScript::writeBarrierPost(JSScript *script, void *addr) +{ +} +# 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject-inl.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject-inl.h" +#define ArgumentsObject_inl_h___ + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject.h" 1 +# 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ArgumentsObject-inl.h" 2 + +namespace js { + +inline void +ArgumentsObject::initInitialLength(uint32_t length) +{ + do { } while(0); + initFixedSlot(INITIAL_LENGTH_SLOT, Int32Value(length << PACKED_BITS_COUNT)); + do { } while(0); + do { } while(0); +} + +inline uint32_t +ArgumentsObject::initialLength() const +{ + uint32_t argc = uint32_t(getFixedSlot(INITIAL_LENGTH_SLOT).toInt32()) >> PACKED_BITS_COUNT; + do { } while(0); + return argc; +} + +inline void +ArgumentsObject::markLengthOverridden() +{ + uint32_t v = getFixedSlot(INITIAL_LENGTH_SLOT).toInt32() | LENGTH_OVERRIDDEN_BIT; + setFixedSlot(INITIAL_LENGTH_SLOT, Int32Value(v)); +} + +inline bool +ArgumentsObject::hasOverriddenLength() const +{ + const js::Value &v = getFixedSlot(INITIAL_LENGTH_SLOT); + return v.toInt32() & LENGTH_OVERRIDDEN_BIT; +} + +inline void +ArgumentsObject::initData(ArgumentsData *data) +{ + do { } while(0); + initFixedSlot(DATA_SLOT, PrivateValue(data)); +} + +inline ArgumentsData * +ArgumentsObject::data() const +{ + return reinterpret_cast(getFixedSlot(DATA_SLOT).toPrivate()); +} + +inline bool +ArgumentsObject::isElementDeleted(uint32_t i) const +{ + return IsBitArrayElementSet(data()->deletedBits, initialLength(), i); +} + +inline bool +ArgumentsObject::isAnyElementDeleted() const +{ + return IsAnyBitArrayElementSet(data()->deletedBits, initialLength()); +} + +inline void +ArgumentsObject::markElementDeleted(uint32_t i) +{ + SetBitArrayElement(data()->deletedBits, initialLength(), i); +} + +inline const js::Value & +ArgumentsObject::element(uint32_t i) const +{ + do { } while(0); + return data()->slots[i]; +} + +inline void +ArgumentsObject::setElement(uint32_t i, const js::Value &v) +{ + do { } while(0); + data()->slots[i] = v; +} + +inline bool +ArgumentsObject::getElement(uint32_t i, Value *vp) +{ + if (i >= initialLength() || isElementDeleted(i)) + return false; + + + + + + + StackFrame *fp = maybeStackFrame(); + do { } while (0); + if (fp) + *vp = fp->canonicalActualArg(i); + else + *vp = element(i); + return true; +} + +namespace detail { + +struct CopyNonHoleArgsTo +{ + CopyNonHoleArgsTo(ArgumentsObject *argsobj, Value *dst) : argsobj(*argsobj), dst(dst) {} + ArgumentsObject &argsobj; + Value *dst; + bool operator()(uint32_t argi, Value *src) { + *dst++ = *src; + return true; + } +}; + +} + +inline bool +ArgumentsObject::getElements(uint32_t start, uint32_t count, Value *vp) +{ + do { } while(0); + + uint32_t length = initialLength(); + if (start > length || start + count > length || isAnyElementDeleted()) + return false; + + StackFrame *fp = maybeStackFrame(); + + + if (!fp) { + const Value *srcbeg = Valueify(data()->slots) + start; + const Value *srcend = srcbeg + count; + const Value *src = srcbeg; + for (Value *dst = vp; src < srcend; ++dst, ++src) + *dst = *src; + return true; + } + + + do { } while(0); + return fp->forEachCanonicalActualArg(detail::CopyNonHoleArgsTo(this, vp), start, count); +} + +inline js::StackFrame * +ArgumentsObject::maybeStackFrame() const +{ + return reinterpret_cast(getFixedSlot(STACK_FRAME_SLOT).toPrivate()); +} + +inline void +ArgumentsObject::setStackFrame(StackFrame *frame) +{ + setFixedSlot(STACK_FRAME_SLOT, PrivateValue(frame)); +} + +inline size_t +ArgumentsObject::sizeOfMisc(JSMallocSizeOfFun mallocSizeOf) const +{ + return mallocSizeOf(data()); +} + +inline const js::Value & +NormalArgumentsObject::callee() const +{ + return data()->callee; +} + +inline void +NormalArgumentsObject::clearCallee() +{ + data()->callee.set(compartment(), MagicValue(JS_OVERWRITTEN_CALLEE)); +} + +} +# 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ScopeObject-inl.h" 1 +# 21 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" 2 + + +namespace js { + + + + + + +static inline bool +IsCacheableNonGlobalScope(JSObject *obj) +{ + bool cacheable = (obj->isCall() || obj->isBlock() || obj->isDeclEnv()); + + do { } while (0); + return cacheable; +} + +inline HandleObject +StackFrame::scopeChain() const +{ + do { } while (0); + if (!(flags_ & HAS_SCOPECHAIN)) { + scopeChain_ = callee().environment(); + flags_ |= HAS_SCOPECHAIN; + } + return HandleObject::fromMarkedLocation(&scopeChain_); +} + +inline GlobalObject & +StackFrame::global() const +{ + return scopeChain()->global(); +} + +inline JSObject & +StackFrame::varObj() +{ + JSObject *obj = scopeChain(); + while (!obj->isVarObj()) + obj = obj->enclosingScope(); + return *obj; +} + +inline JSCompartment * +StackFrame::compartment() const +{ + do { } while (0); + return scopeChain()->compartment(); +} + + +inline mjit::JITScript * +StackFrame::jit() +{ + JSScript *script_ = script(); + return script_->getJIT(isConstructing(), script_->compartment()->needsBarrier()); +} + + +inline void +StackFrame::initPrev(JSContext *cx) +{ + do { } while(0); + if (FrameRegs *regs = cx->maybeRegs()) { + prev_ = regs->fp(); + prevpc_ = regs->pc; + prevInline_ = regs->inlined(); + do { } while (0) + ; + } else { + prev_ = __null; + + + + + } +} + +inline void +StackFrame::resetGeneratorPrev(JSContext *cx) +{ + flags_ |= HAS_PREVPC; + initPrev(cx); +} + +inline void +StackFrame::initInlineFrame(JSFunction *fun, StackFrame *prevfp, jsbytecode *prevpc) +{ + + + + + flags_ = StackFrame::FUNCTION; + exec.fun = fun; + resetInlinePrev(prevfp, prevpc); +} + +inline void +StackFrame::resetInlinePrev(StackFrame *prevfp, jsbytecode *prevpc) +{ + do { } while (0); + flags_ |= StackFrame::HAS_PREVPC; + prev_ = prevfp; + prevpc_ = prevpc; + prevInline_ = __null; +} + +inline void +StackFrame::initCallFrame(JSContext *cx, JSFunction &callee, + JSScript *script, uint32_t nactual, StackFrame::Flags flagsArg) +{ + do { } while(0) + + + ; + do { } while(0); + + + flags_ = FUNCTION | HAS_PREVPC | HAS_SCOPECHAIN | HAS_BLOCKCHAIN | flagsArg; + exec.fun = &callee; + u.nactual = nactual; + scopeChain_ = callee.environment(); + ncode_ = __null; + initPrev(cx); + blockChain_= __null; + do { } while(0); + do { } while(0); + do { } while(0); + do { } while(0); + + SetValueRangeToUndefined(slots(), script->nfixed); +} + + + + + +inline void +StackFrame::initFixupFrame(StackFrame *prev, StackFrame::Flags flags, void *ncode, unsigned nactual) +{ + do { } while(0) + + + + ; + + flags_ = FUNCTION | flags; + prev_ = prev; + ncode_ = ncode; + u.nactual = nactual; +} + +inline JSObject * +StackFrame::createRestParameter(JSContext *cx) +{ + do { } while(0); + unsigned nformal = fun()->nargs - 1, nactual = numActualArgs(); + unsigned nrest = (nactual > nformal) ? nactual - nformal : 0; + return NewDenseCopiedArray(cx, nrest, actualArgs() + nformal); +} + +inline Value & +StackFrame::canonicalActualArg(unsigned i) const +{ + if (i < numFormalArgs()) + return formalArg(i); + do { } while(0); + return actualArgs()[i]; +} + +template +inline bool +StackFrame::forEachCanonicalActualArg(Op op, unsigned start , unsigned count ) +{ + unsigned nformal = fun()->nargs; + do { } while(0); + + Value *formals = formalArgsEnd() - nformal; + unsigned nactual = numActualArgs(); + if (count == unsigned(-1)) + count = nactual - start; + + unsigned end = start + count; + do { } while(0); + do { } while(0); + + if (end <= nformal) { + Value *p = formals + start; + for (; start < end; ++p, ++start) { + if (!op(start, p)) + return false; + } + } else { + for (Value *p = formals + start; start < nformal; ++p, ++start) { + if (!op(start, p)) + return false; + } + do { } while(0); + Value *actuals = formals - (nactual + 2) + start; + for (Value *p = actuals; start < end; ++p, ++start) { + if (!op(start, p)) + return false; + } + } + return true; +} + +template +inline bool +StackFrame::forEachFormalArg(Op op) +{ + Value *formals = formalArgsEnd() - fun()->nargs; + Value *formalsEnd = formalArgsEnd(); + unsigned i = 0; + for (Value *p = formals; p != formalsEnd; ++p, ++i) { + if (!op(i, p)) + return false; + } + return true; +} + +struct CopyTo +{ + Value *dst; + CopyTo(Value *dst) : dst(dst) {} + bool operator()(unsigned, Value *src) { + *dst++ = *src; + return true; + } +}; + +inline unsigned +StackFrame::numActualArgs() const +{ +# 264 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" + do { } while(0); + if ((__builtin_expect((flags_ & (OVERFLOW_ARGS | UNDERFLOW_ARGS)), 0))) + return u.nactual; + return numFormalArgs(); +} + +inline Value * +StackFrame::actualArgs() const +{ + do { } while(0); + Value *argv = formalArgs(); + if ((__builtin_expect((flags_ & OVERFLOW_ARGS), 0))) + return argv - (2 + u.nactual); + return argv; +} + +inline Value * +StackFrame::actualArgsEnd() const +{ + do { } while(0); + if ((__builtin_expect((flags_ & OVERFLOW_ARGS), 0))) + return formalArgs() - 2; + return formalArgs() + numActualArgs(); +} + +inline void +StackFrame::setScopeChain(JSObject &obj) +{ +# 304 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Stack-inl.h" + scopeChain_ = &obj; + flags_ |= HAS_SCOPECHAIN; +} + +inline void +StackFrame::initScopeChain(CallObject &obj) +{ + do { } while(0); + do { } while(0); + scopeChain_ = &obj; + flags_ |= HAS_SCOPECHAIN | HAS_CALL_OBJ; +} + +inline CallObject & +StackFrame::callObj() const +{ + do { } while (0); + + JSObject *pobj = scopeChain(); + while ((__builtin_expect((!pobj->isCall()), 0))) + pobj = pobj->enclosingScope(); + return pobj->asCall(); +} + +inline bool +StackFrame::maintainNestingState() const +{ + + + + + return isNonEvalFunctionFrame() && !isGeneratorFrame() && script()->nesting(); +} + +inline bool +StackFrame::functionPrologue(JSContext *cx) +{ + do { } while(0); + do { } while(0); + + if (fun()->isHeavyweight()) { + CallObject *callobj = CallObject::createForFunction(cx, this); + if (!callobj) + return false; + initScopeChain(*callobj); + } else { + + scopeChain(); + } + + if (script()->nesting()) { + do { } while(0); + types::NestingPrologue(cx, this); + } + + return true; +} + +inline void +StackFrame::functionEpilogue(JSContext *cx) +{ + do { } while(0); + + if (cx->compartment->debugMode()) + cx->runtime->debugScopes->onPopCall(this); + + if (flags_ & (HAS_ARGS_OBJ | HAS_CALL_OBJ)) { + if (hasCallObj()) + js_PutCallObject(this, scopeChain_->asCall()); + if (hasArgsObj()) + js_PutArgsObject(this); + } + + if (maintainNestingState()) + types::NestingEpilogue(this); +} + +inline void +StackFrame::updateEpilogueFlags() +{ + if (flags_ & (HAS_ARGS_OBJ | HAS_CALL_OBJ)) { + if (hasArgsObj() && !argsObj().maybeStackFrame()) + flags_ &= ~HAS_ARGS_OBJ; + if (hasCallObj() && !callObj().maybeStackFrame()) { + + + + + + + + scopeChain_ = isFunctionFrame() + ? callee().environment() + : &scopeChain_->asScope().enclosingScope(); + flags_ &= ~HAS_CALL_OBJ; + } + } + + + + + + + if (maintainNestingState()) + script()->nesting()->activeFrames++; +} + + + + +__attribute__((always_inline)) inline bool +StackSpace::ensureSpace(JSContext *cx, MaybeReportError report, Value *from, ptrdiff_t nvals, + JSCompartment *dest) const +{ + assertInvariants(); + do { } while(0); + + + + if ((__builtin_expect((conservativeEnd_ - from < nvals), 0))) + return ensureSpaceSlow(cx, report, from, nvals, dest); + return true; +} + +inline Value * +StackSpace::getStackLimit(JSContext *cx, MaybeReportError report) +{ + FrameRegs ®s = cx->regs(); + unsigned nvals = regs.fp()->numSlots() + STACK_JIT_EXTRA; + return ensureSpace(cx, report, regs.sp, nvals) + ? conservativeEnd_ + : __null; +} + + + +__attribute__((always_inline)) inline StackFrame * +ContextStack::getCallFrame(JSContext *cx, MaybeReportError report, const CallArgs &args, + JSFunction *fun, JSScript *script, StackFrame::Flags *flags) const +{ + do { } while(0); + unsigned nformal = fun->nargs; + + Value *firstUnused = args.end(); + do { } while(0); + + + unsigned nvals = VALUES_PER_STACK_FRAME + script->nslots + StackSpace::STACK_JIT_EXTRA; + + + + if (args.length() == nformal) { + if (!space().ensureSpace(cx, report, firstUnused, nvals)) + return __null; + return reinterpret_cast(firstUnused); + } + + if (args.length() < nformal) { + *flags = StackFrame::Flags(*flags | StackFrame::UNDERFLOW_ARGS); + unsigned nmissing = nformal - args.length(); + if (!space().ensureSpace(cx, report, firstUnused, nmissing + nvals)) + return __null; + SetValueRangeToUndefined(firstUnused, nmissing); + return reinterpret_cast(firstUnused + nmissing); + } + + *flags = StackFrame::Flags(*flags | StackFrame::OVERFLOW_ARGS); + unsigned ncopy = 2 + nformal; + if (!space().ensureSpace(cx, report, firstUnused, ncopy + nvals)) + return __null; + Value *dst = firstUnused; + Value *src = args.base(); + PodCopy(dst, src, ncopy); + return reinterpret_cast(firstUnused + ncopy); +} + +__attribute__((always_inline)) inline bool +ContextStack::pushInlineFrame(JSContext *cx, FrameRegs ®s, const CallArgs &args, + JSFunction &callee, JSScript *script, + InitialFrameFlags initial) +{ + do { } while(0); + do { } while(0); + + do { } while(0); + + StackFrame::Flags flags = ToFrameFlags(initial); + StackFrame *fp = getCallFrame(cx, REPORT_ERROR, args, &callee, script, &flags); + if (!fp) + return false; + + + fp->initCallFrame(cx, callee, script, args.length(), flags); + + + + + + regs.prepareToRun(*fp, script); + return true; +} + +__attribute__((always_inline)) inline bool +ContextStack::pushInlineFrame(JSContext *cx, FrameRegs ®s, const CallArgs &args, + JSFunction &callee, JSScript *script, + InitialFrameFlags initial, Value **stackLimit) +{ + if (!pushInlineFrame(cx, regs, args, callee, script, initial)) + return false; + *stackLimit = space().conservativeEnd_; + return true; +} + +__attribute__((always_inline)) inline StackFrame * +ContextStack::getFixupFrame(JSContext *cx, MaybeReportError report, + const CallArgs &args, JSFunction *fun, JSScript *script, + void *ncode, InitialFrameFlags initial, Value **stackLimit) +{ + do { } while(0); + do { } while(0); + do { } while(0); + + StackFrame::Flags flags = ToFrameFlags(initial); + StackFrame *fp = getCallFrame(cx, report, args, fun, script, &flags); + if (!fp) + return __null; + + + fp->initFixupFrame(cx->fp(), flags, ncode, args.length()); + + *stackLimit = space().conservativeEnd_; + return fp; +} + +__attribute__((always_inline)) inline void +ContextStack::popInlineFrame(FrameRegs ®s) +{ + do { } while(0); + do { } while(0); + + StackFrame *fp = regs.fp(); + fp->functionEpilogue(cx_); + + Value *newsp = fp->actualArgs() - 1; + do { } while(0); + + newsp[-1] = fp->returnValue(); + regs.popFrame(newsp); +} + +inline void +ContextStack::popFrameAfterOverflow() +{ + + FrameRegs ®s = seg_->regs(); + StackFrame *fp = regs.fp(); + regs.popFrame(fp->actualArgsEnd()); +} + +inline JSScript * +ContextStack::currentScript(jsbytecode **ppc) const +{ + if (ppc) + *ppc = __null; + + FrameRegs *regs = maybeRegs(); + StackFrame *fp = regs ? regs->fp() : __null; + while (fp && fp->isDummyFrame()) + fp = fp->prev(); + if (!fp) + return __null; + + + mjit::CallSite *inlined = regs->inlined(); + if (inlined) { + mjit::JITChunk *chunk = fp->jit()->chunk(regs->pc); + do { } while(0); + mjit::InlineFrame *frame = &chunk->inlineFrames()[inlined->inlineIndex]; + JSScript *script = frame->fun->script(); + if (script->compartment() != cx_->compartment) + return __null; + if (ppc) + *ppc = script->code + inlined->pcOffset; + return script; + } + + + JSScript *script = fp->script(); + if (script->compartment() != cx_->compartment) + return __null; + + if (ppc) + *ppc = fp->pcQuadratic(*this); + return script; +} + +inline JSScript * +ContextStack::currentScriptWithDiagnostics(jsbytecode **ppc) const +{ + if (ppc) + *ppc = __null; + + FrameRegs *regs = maybeRegs(); + StackFrame *fp = regs ? regs->fp() : __null; + while (fp && fp->isDummyFrame()) + fp = fp->prev(); + if (!fp) + *(int *) 0x10 = 0; + + + mjit::CallSite *inlined = regs->inlined(); + if (inlined) { + mjit::JITChunk *chunk = fp->jit()->chunk(regs->pc); + do { } while(0); + mjit::InlineFrame *frame = &chunk->inlineFrames()[inlined->inlineIndex]; + JSScript *script = frame->fun->script(); + if (script->compartment() != cx_->compartment) + *(int *) 0x20 = 0; + if (ppc) + *ppc = script->code + inlined->pcOffset; + return script; + } + + + JSScript *script = fp->script(); + if (script->compartment() != cx_->compartment) + *(int *) 0x30 = 0; + + if (ppc) + *ppc = fp->pcQuadratic(*this); + if (!script) + *(int *) 0x40 = 0; + return script; +} + +inline HandleObject +ContextStack::currentScriptedScopeChain() const +{ + return fp()->scopeChain(); +} + +} +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" 2 + + +#define jsinferinlines_h___ + + + + + +namespace js { +namespace types { + + inline Type +Type::ObjectType(JSObject *obj) +{ + if (obj->hasSingletonType()) + return Type(uintptr_t(obj) | 1); + return Type(uintptr_t(obj->type())); +} + + inline Type +Type::ObjectType(TypeObject *obj) +{ + if (obj->singleton) + return Type(uintptr_t(obj->singleton.get()) | 1); + return Type(uintptr_t(obj)); +} + + inline Type +Type::ObjectType(TypeObjectKey *obj) +{ + return Type(uintptr_t(obj)); +} + +inline Type +GetValueType(JSContext *cx, const Value &val) +{ + do { } while(0); + if (val.isDouble()) + return Type::DoubleType(); + if (val.isObject()) + return Type::ObjectType(&val.toObject()); + return Type::PrimitiveType(val.extractNonDoubleType()); +} + +inline TypeFlags +PrimitiveTypeFlag(JSValueType type) +{ + switch (type) { + case JSVAL_TYPE_UNDEFINED: + return TYPE_FLAG_UNDEFINED; + case JSVAL_TYPE_NULL: + return TYPE_FLAG_NULL; + case JSVAL_TYPE_BOOLEAN: + return TYPE_FLAG_BOOLEAN; + case JSVAL_TYPE_INT32: + return TYPE_FLAG_INT32; + case JSVAL_TYPE_DOUBLE: + return TYPE_FLAG_DOUBLE; + case JSVAL_TYPE_STRING: + return TYPE_FLAG_STRING; + case JSVAL_TYPE_MAGIC: + return TYPE_FLAG_LAZYARGS; + default: + __builtin_unreachable(); + return 0; + } +} + +inline JSValueType +TypeFlagPrimitive(TypeFlags flags) +{ + switch (flags) { + case TYPE_FLAG_UNDEFINED: + return JSVAL_TYPE_UNDEFINED; + case TYPE_FLAG_NULL: + return JSVAL_TYPE_NULL; + case TYPE_FLAG_BOOLEAN: + return JSVAL_TYPE_BOOLEAN; + case TYPE_FLAG_INT32: + return JSVAL_TYPE_INT32; + case TYPE_FLAG_DOUBLE: + return JSVAL_TYPE_DOUBLE; + case TYPE_FLAG_STRING: + return JSVAL_TYPE_STRING; + case TYPE_FLAG_LAZYARGS: + return JSVAL_TYPE_MAGIC; + default: + __builtin_unreachable(); + return (JSValueType) 0; + } +} + + + + + + +inline jsid +MakeTypeId(JSContext *cx, jsid id) +{ + do { } while(0); + + + + + + if (JSID_IS_INT(id)) + return ((jsid)0x2); + + + + + + if (JSID_IS_STRING(id)) { + JSFlatString *str = JSID_TO_FLAT_STRING(id); + const jschar *cp = str->getCharsZ(cx); + if (((((unsigned)(*cp)) - '0') <= 9) || *cp == '-') { + cp++; + while (((((unsigned)(*cp)) - '0') <= 9)) + cp++; + if (*cp == 0) + return ((jsid)0x2); + } + return id; + } + + return ((jsid)0x2); +} + +const char * TypeIdStringImpl(jsid id); + + +static inline const char * +TypeIdString(jsid id) +{ + + + + return "(missing)"; + +} +# 171 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" +struct AutoEnterTypeInference +{ + FreeOp *freeOp; + JSCompartment *compartment; + bool oldActiveAnalysis; + bool oldActiveInference; + + AutoEnterTypeInference(JSContext *cx, bool compiling = false) + { + do { } while (0); + init(cx->runtime->defaultFreeOp(), cx->compartment); + } + + AutoEnterTypeInference(FreeOp *fop, JSCompartment *comp) + { + init(fop, comp); + } + + ~AutoEnterTypeInference() + { + compartment->activeAnalysis = oldActiveAnalysis; + compartment->activeInference = oldActiveInference; + + + + + + + + if (!compartment->activeInference) { + TypeCompartment *types = &compartment->types; + if (types->pendingNukeTypes) + types->nukeTypes(freeOp); + else if (types->pendingRecompiles) + types->processPendingRecompiles(freeOp); + } + } + + private: + void init(FreeOp *fop, JSCompartment *comp) { + freeOp = fop; + compartment = comp; + oldActiveAnalysis = compartment->activeAnalysis; + oldActiveInference = compartment->activeInference; + compartment->activeAnalysis = true; + compartment->activeInference = true; + } +}; + + + + + +struct AutoEnterCompilation +{ + RecompileInfo &info; + + AutoEnterCompilation(JSContext *cx, JSScript *script, bool constructing, unsigned chunkIndex) + : info(cx->compartment->types.compiledInfo) + { + do { } while(0); + info.script = script; + info.constructing = constructing; + info.barriers = cx->compartment->needsBarrier(); + info.chunkIndex = chunkIndex; + } + + ~AutoEnterCompilation() + { + do { } while(0); + info.script = __null; + info.constructing = false; + info.barriers = false; + info.chunkIndex = 0; + } +}; +# 263 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" +inline TypeObject * +GetTypeNewObject(JSContext *cx, JSProtoKey key) +{ + JSObject *proto; + if (!js_GetClassPrototype(cx, __null, key, &proto, __null)) + return __null; + return proto->getNewType(cx); +} + + +inline TypeObject * +GetTypeCallerInitObject(JSContext *cx, JSProtoKey key) +{ + if (cx->typeInferenceEnabled()) { + jsbytecode *pc; + JSScript *script = cx->stack.currentScript(&pc); + if (script) + return TypeScript::InitObject(cx, script, pc, key); + } + return GetTypeNewObject(cx, key); +} + + + + + +inline void +MarkIteratorUnknown(JSContext *cx) +{ + extern void MarkIteratorUnknownSlow(JSContext *cx); + + if (cx->typeInferenceEnabled()) + MarkIteratorUnknownSlow(cx); +} + + + + + +inline bool +TypeMonitorCall(JSContext *cx, const js::CallArgs &args, bool constructing) +{ + extern void TypeMonitorCallSlow(JSContext *cx, JSObject *callee, + const CallArgs &args, bool constructing); + + JSObject *callee = &args.callee(); + if (callee->isFunction()) { + JSFunction *fun = callee->toFunction(); + if (fun->isInterpreted()) { + JSScript *script = fun->script(); + if (!script->ensureRanAnalysis(cx, fun->environment())) + return false; + if (cx->typeInferenceEnabled()) + TypeMonitorCallSlow(cx, callee, args, constructing); + } + } + + return true; +} + +inline bool +TrackPropertyTypes(JSContext *cx, JSObject *obj, jsid id) +{ + if (!cx->typeInferenceEnabled() || obj->hasLazyType() || obj->type()->unknownProperties()) + return false; + + if (obj->hasSingletonType() && !obj->type()->maybeGetProperty(cx, id)) + return false; + + return true; +} + + +inline void +AddTypePropertyId(JSContext *cx, JSObject *obj, jsid id, Type type) +{ + if (cx->typeInferenceEnabled()) + id = MakeTypeId(cx, id); + if (TrackPropertyTypes(cx, obj, id)) + obj->type()->addPropertyType(cx, id, type); +} + +inline void +AddTypePropertyId(JSContext *cx, JSObject *obj, jsid id, const Value &value) +{ + if (cx->typeInferenceEnabled()) + id = MakeTypeId(cx, id); + if (TrackPropertyTypes(cx, obj, id)) + obj->type()->addPropertyType(cx, id, value); +} + +inline void +AddTypeProperty(JSContext *cx, TypeObject *obj, const char *name, Type type) +{ + if (cx->typeInferenceEnabled() && !obj->unknownProperties()) + obj->addPropertyType(cx, name, type); +} + +inline void +AddTypeProperty(JSContext *cx, TypeObject *obj, const char *name, const Value &value) +{ + if (cx->typeInferenceEnabled() && !obj->unknownProperties()) + obj->addPropertyType(cx, name, value); +} + + +inline void +MarkTypeObjectFlags(JSContext *cx, JSObject *obj, TypeObjectFlags flags) +{ + if (cx->typeInferenceEnabled() && !obj->hasLazyType() && !obj->type()->hasAllFlags(flags)) + obj->type()->setFlags(cx, flags); +} + + + + + + + +inline void +MarkTypeObjectUnknownProperties(JSContext *cx, TypeObject *obj, + bool markSetsUnknown = false) +{ + if (cx->typeInferenceEnabled()) { + if (!obj->unknownProperties()) + obj->markUnknown(cx); + if (markSetsUnknown && !(obj->flags & OBJECT_FLAG_SETS_MARKED_UNKNOWN)) + cx->compartment->types.markSetsUnknown(cx, obj); + } +} + + + + + +inline void +MarkTypePropertyConfigured(JSContext *cx, JSObject *obj, jsid id) +{ + if (cx->typeInferenceEnabled()) + id = MakeTypeId(cx, id); + if (TrackPropertyTypes(cx, obj, id)) + obj->type()->markPropertyConfigured(cx, id); +} + + +inline void +MarkObjectStateChange(JSContext *cx, JSObject *obj) +{ + if (cx->typeInferenceEnabled() && !obj->hasLazyType() && !obj->type()->unknownProperties()) + obj->type()->markStateChange(cx); +} + + + + + + +inline void +FixArrayType(JSContext *cx, JSObject *obj) +{ + if (cx->typeInferenceEnabled()) + cx->compartment->types.fixArrayType(cx, obj); +} + +inline void +FixObjectType(JSContext *cx, JSObject *obj) +{ + if (cx->typeInferenceEnabled()) + cx->compartment->types.fixObjectType(cx, obj); +} + + +extern void TypeMonitorResult(JSContext *cx, JSScript *script, jsbytecode *pc, const js::Value &rval); +extern void TypeDynamicResult(JSContext *cx, JSScript *script, jsbytecode *pc, js::types::Type type); + +inline bool +UseNewTypeAtEntry(JSContext *cx, StackFrame *fp) +{ + return fp->isConstructing() && cx->typeInferenceEnabled() && + fp->prev() && fp->prev()->isScriptFrame() && + UseNewType(cx, fp->prev()->script(), fp->prev()->pcQuadratic(cx->stack, fp)); +} + + + + + +inline +TypeScript::TypeScript() +{ + this->global = (js::GlobalObject *) GLOBAL_MISSING_SCOPE; +} + + inline unsigned +TypeScript::NumTypeSets(JSScript *script) +{ + return script->nTypeSets + analyze::TotalSlots(script); +} + + inline TypeSet * +TypeScript::ReturnTypes(JSScript *script) +{ + return script->types->typeArray() + script->nTypeSets + js::analyze::CalleeSlot(); +} + + inline TypeSet * +TypeScript::ThisTypes(JSScript *script) +{ + return script->types->typeArray() + script->nTypeSets + js::analyze::ThisSlot(); +} + + + + + + + + inline TypeSet * +TypeScript::ArgTypes(JSScript *script, unsigned i) +{ + do { } while(0); + return script->types->typeArray() + script->nTypeSets + js::analyze::ArgSlot(i); +} + + inline TypeSet * +TypeScript::LocalTypes(JSScript *script, unsigned i) +{ + do { } while(0); + return script->types->typeArray() + script->nTypeSets + js::analyze::LocalSlot(script, i); +} + + inline TypeSet * +TypeScript::SlotTypes(JSScript *script, unsigned slot) +{ + do { } while(0); + return script->types->typeArray() + script->nTypeSets + slot; +} + + inline TypeObject * +TypeScript::StandardType(JSContext *cx, JSScript *script, JSProtoKey key) +{ + JSObject *proto; + if (!js_GetClassPrototype(cx, script->global(), key, &proto, __null)) + return __null; + return proto->getNewType(cx); +} + +struct AllocationSiteKey { + JSScript *script; + + uint32_t offset : 24; + JSProtoKey kind : 8; + + static const uint32_t OFFSET_LIMIT = (1 << 23); + + AllocationSiteKey() { PodZero(this); } + + typedef AllocationSiteKey Lookup; + + static inline uint32_t hash(AllocationSiteKey key) { + return uint32_t(size_t(key.script->code + key.offset)) ^ key.kind; + } + + static inline bool match(const AllocationSiteKey &a, const AllocationSiteKey &b) { + return a.script == b.script && a.offset == b.offset && a.kind == b.kind; + } +}; + + inline TypeObject * +TypeScript::InitObject(JSContext *cx, JSScript *script, jsbytecode *pc, JSProtoKey kind) +{ + do { } while(0); + + + uint32_t offset = pc - script->code; + + if (!cx->typeInferenceEnabled() || !script->hasGlobal() || offset >= AllocationSiteKey::OFFSET_LIMIT) + return GetTypeNewObject(cx, kind); + + AllocationSiteKey key; + key.script = script; + key.offset = offset; + key.kind = kind; + + if (!cx->compartment->types.allocationSiteTable) + return cx->compartment->types.newAllocationSiteTypeObject(cx, key); + + AllocationSiteTable::Ptr p = cx->compartment->types.allocationSiteTable->lookup(key); + + if (p) + return p->value; + return cx->compartment->types.newAllocationSiteTypeObject(cx, key); +} + + +static inline bool +SetInitializerObjectType(JSContext *cx, JSScript *script, jsbytecode *pc, JSObject *obj) +{ + if (!cx->typeInferenceEnabled()) + return true; + + if (UseNewTypeForInitializer(cx, script, pc)) { + if (!obj->setSingletonType(cx)) + return false; + + + + + + + TypeScript::Monitor(cx, script, pc, ObjectValue(*obj)); + } else { + JSProtoKey key = obj->isDenseArray() ? JSProto_Array : JSProto_Object; + types::TypeObject *type = TypeScript::InitObject(cx, script, pc, key); + if (!type) + return false; + obj->setType(type); + } + + return true; +} + + inline void +TypeScript::Monitor(JSContext *cx, JSScript *script, jsbytecode *pc, const js::Value &rval) +{ + if (cx->typeInferenceEnabled()) + TypeMonitorResult(cx, script, pc, rval); +} + + inline void +TypeScript::MonitorOverflow(JSContext *cx, JSScript *script, jsbytecode *pc) +{ + if (cx->typeInferenceEnabled()) + TypeDynamicResult(cx, script, pc, Type::DoubleType()); +} + + inline void +TypeScript::MonitorString(JSContext *cx, JSScript *script, jsbytecode *pc) +{ + if (cx->typeInferenceEnabled()) + TypeDynamicResult(cx, script, pc, Type::StringType()); +} + + inline void +TypeScript::MonitorUnknown(JSContext *cx, JSScript *script, jsbytecode *pc) +{ + if (cx->typeInferenceEnabled()) + TypeDynamicResult(cx, script, pc, Type::UnknownType()); +} + + inline void +TypeScript::GetPcScript(JSContext *cx, JSScript **script, jsbytecode **pc) +{ + *script = cx->fp()->script(); + *pc = cx->regs().pc; +} + + inline void +TypeScript::MonitorOverflow(JSContext *cx) +{ + JSScript *script; + jsbytecode *pc; + GetPcScript(cx, &script, &pc); + MonitorOverflow(cx, script, pc); +} + + inline void +TypeScript::MonitorString(JSContext *cx) +{ + JSScript *script; + jsbytecode *pc; + GetPcScript(cx, &script, &pc); + MonitorString(cx, script, pc); +} + + inline void +TypeScript::MonitorUnknown(JSContext *cx) +{ + JSScript *script; + jsbytecode *pc; + GetPcScript(cx, &script, &pc); + MonitorUnknown(cx, script, pc); +} + + inline void +TypeScript::Monitor(JSContext *cx, const js::Value &rval) +{ + JSScript *script; + jsbytecode *pc; + GetPcScript(cx, &script, &pc); + Monitor(cx, script, pc, rval); +} + + inline void +TypeScript::MonitorAssign(JSContext *cx, JSObject *obj, jsid id) +{ + if (cx->typeInferenceEnabled() && !obj->hasSingletonType()) { +# 668 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" + uint32_t i; + if (js_IdIsIndex(id, &i)) + return; + MarkTypeObjectUnknownProperties(cx, obj->type()); + } +} + + inline void +TypeScript::SetThis(JSContext *cx, JSScript *script, Type type) +{ + if (!cx->typeInferenceEnabled()) + return; + do { } while(0); + + + bool analyze = cx->hasRunOption(((uint32_t)1 << (16))); + + if (!ThisTypes(script)->hasType(type) || analyze) { + AutoEnterTypeInference enter(cx); + + InferSpew(ISpewOps, "externalType: setThis #%u: %s", + script->id(), TypeString(type)); + ThisTypes(script)->addType(cx, type); + + if (analyze && script->types->hasScope()) + script->ensureRanInference(cx); + } +} + + inline void +TypeScript::SetThis(JSContext *cx, JSScript *script, const js::Value &value) +{ + if (cx->typeInferenceEnabled()) + SetThis(cx, script, GetValueType(cx, value)); +} + + inline void +TypeScript::SetLocal(JSContext *cx, JSScript *script, unsigned local, Type type) +{ + if (!cx->typeInferenceEnabled()) + return; + do { } while(0); + + if (!LocalTypes(script, local)->hasType(type)) { + AutoEnterTypeInference enter(cx); + + InferSpew(ISpewOps, "externalType: setLocal #%u %u: %s", + script->id(), local, TypeString(type)); + LocalTypes(script, local)->addType(cx, type); + } +} + + inline void +TypeScript::SetLocal(JSContext *cx, JSScript *script, unsigned local, const js::Value &value) +{ + if (cx->typeInferenceEnabled()) { + Type type = GetValueType(cx, value); + SetLocal(cx, script, local, type); + } +} + + inline void +TypeScript::SetArgument(JSContext *cx, JSScript *script, unsigned arg, Type type) +{ + if (!cx->typeInferenceEnabled()) + return; + do { } while(0); + + if (!ArgTypes(script, arg)->hasType(type)) { + AutoEnterTypeInference enter(cx); + + InferSpew(ISpewOps, "externalType: setArg #%u %u: %s", + script->id(), arg, TypeString(type)); + ArgTypes(script, arg)->addType(cx, type); + } +} + + inline void +TypeScript::SetArgument(JSContext *cx, JSScript *script, unsigned arg, const js::Value &value) +{ + if (cx->typeInferenceEnabled()) { + Type type = GetValueType(cx, value); + SetArgument(cx, script, arg, type); + } +} + +void +TypeScript::trace(JSTracer *trc) +{ + if (hasScope() && global) + gc::MarkObject(trc, &global, "script_global"); + + +} + + + + + +inline JSCompartment * +TypeCompartment::compartment() +{ + return (JSCompartment *)((char *)this - __builtin_offsetof (JSCompartment, types)); +} + +inline void +TypeCompartment::addPending(JSContext *cx, TypeConstraint *constraint, TypeSet *source, Type type) +{ + do { } while(0); + do { } while(0); + + InferSpew(ISpewOps, "pending: %sC%p%s %s", + InferSpewColor(constraint), constraint, InferSpewColorReset(), + TypeString(type)); + + if ((pendingCount == pendingCapacity) && !growPendingArray(cx)) + return; + + PendingWork &pending = pendingArray[pendingCount++]; + pending.constraint = constraint; + pending.source = source; + pending.type = type; +} + +inline void +TypeCompartment::resolvePending(JSContext *cx) +{ + do { } while(0); + + if (resolving) { + + return; + } + + resolving = true; + + + while (pendingCount) { + const PendingWork &pending = pendingArray[--pendingCount]; + InferSpew(ISpewOps, "resolve: %sC%p%s %s", + InferSpewColor(pending.constraint), pending.constraint, + InferSpewColorReset(), TypeString(pending.type)); + pending.constraint->newType(cx, pending.source, pending.type); + } + + resolving = false; +} +# 828 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" +const unsigned SET_ARRAY_SIZE = 8; + + +static inline unsigned +HashSetCapacity(unsigned count) +{ + do { } while(0); + + if (count <= SET_ARRAY_SIZE) + return SET_ARRAY_SIZE; + + unsigned log2; + do { (log2) = 31 - __builtin_clz(((unsigned int)(count)) | 1); } while (0); + return 1 << (log2 + 2); +} + + +template +static inline uint32_t +HashKey(T v) +{ + uint32_t nv = KEY::keyBits(v); + + uint32_t hash = 84696351 ^ (nv & 0xff); + hash = (hash * 16777619) ^ ((nv >> 8) & 0xff); + hash = (hash * 16777619) ^ ((nv >> 16) & 0xff); + return (hash * 16777619) ^ ((nv >> 24) & 0xff); +} + + + + + +template +static U ** +HashSetInsertTry(JSCompartment *compartment, U **&values, unsigned &count, T key) +{ + unsigned capacity = HashSetCapacity(count); + unsigned insertpos = HashKey(key) & (capacity - 1); + + + bool converting = (count == SET_ARRAY_SIZE); + + if (!converting) { + while (values[insertpos] != __null) { + if (KEY::getKey(values[insertpos]) == key) + return &values[insertpos]; + insertpos = (insertpos + 1) & (capacity - 1); + } + } + + count++; + unsigned newCapacity = HashSetCapacity(count); + + if (newCapacity == capacity) { + do { } while(0); + return &values[insertpos]; + } + + U **newValues = compartment->typeLifoAlloc.newArray(newCapacity); + if (!newValues) + return __null; + PodZero(newValues, newCapacity); + + for (unsigned i = 0; i < capacity; i++) { + if (values[i]) { + unsigned pos = HashKey(KEY::getKey(values[i])) & (newCapacity - 1); + while (newValues[pos] != __null) + pos = (pos + 1) & (newCapacity - 1); + newValues[pos] = values[i]; + } + } + + values = newValues; + + insertpos = HashKey(key) & (newCapacity - 1); + while (values[insertpos] != __null) + insertpos = (insertpos + 1) & (newCapacity - 1); + return &values[insertpos]; +} + + + + + +template +static inline U ** +HashSetInsert(JSCompartment *compartment, U **&values, unsigned &count, T key) +{ + if (count == 0) { + do { } while(0); + count++; + return (U **) &values; + } + + if (count == 1) { + U *oldData = (U*) values; + if (KEY::getKey(oldData) == key) + return (U **) &values; + + values = compartment->typeLifoAlloc.newArray(SET_ARRAY_SIZE); + if (!values) { + values = (U **) oldData; + return __null; + } + PodZero(values, SET_ARRAY_SIZE); + count++; + + values[0] = oldData; + return &values[1]; + } + + if (count <= SET_ARRAY_SIZE) { + for (unsigned i = 0; i < count; i++) { + if (KEY::getKey(values[i]) == key) + return &values[i]; + } + + if (count < SET_ARRAY_SIZE) { + count++; + return &values[count - 1]; + } + } + + return HashSetInsertTry(compartment, values, count, key); +} + + +template +static inline U * +HashSetLookup(U **values, unsigned count, T key) +{ + if (count == 0) + return __null; + + if (count == 1) + return (KEY::getKey((U *) values) == key) ? (U *) values : __null; + + if (count <= SET_ARRAY_SIZE) { + for (unsigned i = 0; i < count; i++) { + if (KEY::getKey(values[i]) == key) + return values[i]; + } + return __null; + } + + unsigned capacity = HashSetCapacity(count); + unsigned pos = HashKey(key) & (capacity - 1); + + while (values[pos] != __null) { + if (KEY::getKey(values[pos]) == key) + return values[pos]; + pos = (pos + 1) & (capacity - 1); + } + + return __null; +} + +inline TypeObjectKey * +Type::objectKey() const +{ + do { } while(0); + if (isTypeObject()) + TypeObject::readBarrier((TypeObject *) data); + else + JSObject::readBarrier((JSObject *) (data ^ 1)); + return (TypeObjectKey *) data; +} + +inline JSObject * +Type::singleObject() const +{ + do { } while(0); + JSObject::readBarrier((JSObject *) (data ^ 1)); + return (JSObject *) (data ^ 1); +} + +inline TypeObject * +Type::typeObject() const +{ + do { } while(0); + TypeObject::readBarrier((TypeObject *) data); + return (TypeObject *) data; +} + +inline bool +TypeSet::hasType(Type type) +{ + if (unknown()) + return true; + + if (type.isUnknown()) { + return false; + } else if (type.isPrimitive()) { + return !!(flags & PrimitiveTypeFlag(type.primitive())); + } else if (type.isAnyObject()) { + return !!(flags & TYPE_FLAG_ANYOBJECT); + } else { + return !!(flags & TYPE_FLAG_ANYOBJECT) || + HashSetLookup + (objectSet, baseObjectCount(), type.objectKey()) != __null; + } +} + +inline void +TypeSet::setBaseObjectCount(uint32_t count) +{ + do { } while(0); + flags = (flags & ~TYPE_FLAG_OBJECT_COUNT_MASK) + | (count << TYPE_FLAG_OBJECT_COUNT_SHIFT); +} + +inline void +TypeSet::clearObjects() +{ + setBaseObjectCount(0); + objectSet = __null; +} + +inline void +TypeSet::addType(JSContext *cx, Type type) +{ + do { } while(0); + + if (unknown()) + return; + + if (type.isUnknown()) { + flags |= TYPE_FLAG_BASE_MASK; + clearObjects(); + do { } while(0); + } else if (type.isPrimitive()) { + TypeFlags flag = PrimitiveTypeFlag(type.primitive()); + if (flags & flag) + return; + + + if (flag == TYPE_FLAG_DOUBLE) + flag |= TYPE_FLAG_INT32; + + flags |= flag; + } else { + if (flags & TYPE_FLAG_ANYOBJECT) + return; + if (type.isAnyObject()) + goto unknownObject; + uint32_t objectCount = baseObjectCount(); + TypeObjectKey *object = type.objectKey(); + TypeObjectKey **pentry = HashSetInsert + (cx->compartment, objectSet, objectCount, object); + if (!pentry) { + cx->compartment->types.setPendingNukeTypes(cx); + return; + } + if (*pentry) + return; + *pentry = object; + + setBaseObjectCount(objectCount); + + if (objectCount == TYPE_FLAG_OBJECT_COUNT_LIMIT) + goto unknownObject; + + if (type.isTypeObject()) { + TypeObject *nobject = type.typeObject(); + do { } while(0); + if (nobject->unknownProperties()) + goto unknownObject; + if (objectCount > 1) { + nobject->contribution += (objectCount - 1) * (objectCount - 1); + if (nobject->contribution >= TypeObject::CONTRIBUTION_LIMIT) { + InferSpew(ISpewOps, "limitUnknown: %sT%p%s", + InferSpewColor(this), this, InferSpewColorReset()); + goto unknownObject; + } + } + } + } + + if (false) { + unknownObject: + type = Type::AnyObjectType(); + flags |= TYPE_FLAG_ANYOBJECT; + clearObjects(); + } + + InferSpew(ISpewOps, "addType: %sT%p%s %s", + InferSpewColor(this), this, InferSpewColorReset(), + TypeString(type)); + + + TypeConstraint *constraint = constraintList; + while (constraint) { + cx->compartment->types.addPending(cx, constraint, this, type); + constraint = constraint->next; + } + + cx->compartment->types.resolvePending(cx); +} + +inline void +TypeSet::setOwnProperty(JSContext *cx, bool configured) +{ + TypeFlags nflags = TYPE_FLAG_OWN_PROPERTY | (configured ? TYPE_FLAG_CONFIGURED_PROPERTY : 0); + + if ((flags & nflags) == nflags) + return; + + flags |= nflags; + + + TypeConstraint *constraint = constraintList; + while (constraint) { + constraint->newPropertyState(cx, this); + constraint = constraint->next; + } +} + +inline unsigned +TypeSet::getObjectCount() +{ + do { } while(0); + uint32_t count = baseObjectCount(); + if (count > SET_ARRAY_SIZE) + return HashSetCapacity(count); + return count; +} + +inline TypeObjectKey * +TypeSet::getObject(unsigned i) +{ + do { } while(0); + if (baseObjectCount() == 1) { + do { } while(0); + return (TypeObjectKey *) objectSet; + } + return objectSet[i]; +} + +inline JSObject * +TypeSet::getSingleObject(unsigned i) +{ + TypeObjectKey *key = getObject(i); + return (uintptr_t(key) & 1) ? (JSObject *)(uintptr_t(key) ^ 1) : __null; +} + +inline TypeObject * +TypeSet::getTypeObject(unsigned i) +{ + TypeObjectKey *key = getObject(i); + return (key && !(uintptr_t(key) & 1)) ? (TypeObject *) key : __null; +} + + + + + +inline +TypeCallsite::TypeCallsite(JSContext *cx, JSScript *script, jsbytecode *pc, + bool isNew, unsigned argumentCount) + : script(script), pc(pc), isNew(isNew), argumentCount(argumentCount), + thisTypes(__null), returnTypes(__null) +{ + + argumentTypes = cx->typeLifoAlloc().newArray(argumentCount); +} + + + + + +inline TypeObject::TypeObject(JSObject *proto, bool function, bool unknown) +{ + PodZero(this); + + + do { } while (0); + + this->proto = proto; + + if (function) + flags |= OBJECT_FLAG_FUNCTION; + if (unknown) + flags |= OBJECT_FLAG_UNKNOWN_MASK; + + InferSpew(ISpewOps, "newObject: %s", TypeObjectString(this)); +} + +inline uint32_t +TypeObject::basePropertyCount() const +{ + return (flags & OBJECT_FLAG_PROPERTY_COUNT_MASK) >> OBJECT_FLAG_PROPERTY_COUNT_SHIFT; +} + +inline void +TypeObject::setBasePropertyCount(uint32_t count) +{ + do { } while(0); + flags = (flags & ~OBJECT_FLAG_PROPERTY_COUNT_MASK) + | (count << OBJECT_FLAG_PROPERTY_COUNT_SHIFT); +} + +inline TypeSet * +TypeObject::getProperty(JSContext *cx, jsid id, bool assign) +{ + do { } while(0); + do { } while(0); + do { } while (0); + do { } while(0); + + uint32_t propertyCount = basePropertyCount(); + Property **pprop = HashSetInsert + (cx->compartment, propertySet, propertyCount, id); + if (!pprop) { + cx->compartment->types.setPendingNukeTypes(cx); + return __null; + } + + if (!*pprop) { + setBasePropertyCount(propertyCount); + if (!addProperty(cx, id, pprop)) { + setBasePropertyCount(0); + propertySet = __null; + return __null; + } + if (propertyCount == OBJECT_FLAG_PROPERTY_COUNT_LIMIT) { + markUnknown(cx); + TypeSet *types = TypeSet::make(cx, "propertyOverflow"); + types->addType(cx, Type::UnknownType()); + return types; + } + } + + TypeSet *types = &(*pprop)->types; + + if (assign) + types->setOwnProperty(cx, false); + + return types; +} + +inline TypeSet * +TypeObject::maybeGetProperty(JSContext *cx, jsid id) +{ + do { } while(0); + do { } while (0); + do { } while(0); + + Property *prop = HashSetLookup + (propertySet, basePropertyCount(), id); + + return prop ? &prop->types : __null; +} + +inline unsigned +TypeObject::getPropertyCount() +{ + uint32_t count = basePropertyCount(); + if (count > SET_ARRAY_SIZE) + return HashSetCapacity(count); + return count; +} + +inline Property * +TypeObject::getProperty(unsigned i) +{ + do { } while(0); + if (basePropertyCount() == 1) { + do { } while(0); + return (Property *) propertySet; + } + return propertySet[i]; +} + +inline void +TypeObject::setFlagsFromKey(JSContext *cx, JSProtoKey key) +{ + TypeObjectFlags flags = 0; + + switch (key) { + case JSProto_Function: + do { } while(0); + + + case JSProto_Object: + flags = OBJECT_FLAG_NON_DENSE_ARRAY + | OBJECT_FLAG_NON_PACKED_ARRAY + | OBJECT_FLAG_NON_TYPED_ARRAY; + break; + + case JSProto_Array: + flags = OBJECT_FLAG_NON_TYPED_ARRAY; + break; + + default: + + do { } while(0) +# 1333 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsinferinlines.h" + ; + flags = OBJECT_FLAG_NON_DENSE_ARRAY + | OBJECT_FLAG_NON_PACKED_ARRAY; + break; + } + + if (!hasAllFlags(flags)) + setFlags(cx, flags); +} + +inline JSObject * +TypeObject::getGlobal() +{ + if (singleton) + return &singleton->global(); + if (interpretedFunction && interpretedFunction->script()->compileAndGo) + return &interpretedFunction->global(); + return __null; +} + +inline void +TypeObject::writeBarrierPre(TypeObject *type) +{ + + if (!type) + return; + + JSCompartment *comp = type->compartment(); + if (comp->needsBarrier()) { + TypeObject *tmp = type; + MarkTypeObjectUnbarriered(comp->barrierTracer(), &tmp, "write barrier"); + do { } while(0); + } + +} + +inline void +TypeObject::writeBarrierPost(TypeObject *type, void *addr) +{ +} + +inline void +TypeObject::readBarrier(TypeObject *type) +{ + + JSCompartment *comp = type->compartment(); + if (comp->needsBarrier()) { + TypeObject *tmp = type; + MarkTypeObjectUnbarriered(comp->barrierTracer(), &tmp, "read barrier"); + do { } while(0); + } + +} + +inline void +TypeNewScript::writeBarrierPre(TypeNewScript *newScript) +{ + + if (!newScript) + return; + + JSCompartment *comp = newScript->fun->compartment(); + if (comp->needsBarrier()) { + MarkObject(comp->barrierTracer(), &newScript->fun, "write barrier"); + MarkShape(comp->barrierTracer(), &newScript->shape, "write barrier"); + } + +} + +inline void +TypeNewScript::writeBarrierPost(TypeNewScript *newScript, void *addr) +{ +} + +inline +Property::Property(jsid id) + : id(id) +{ +} + +inline +Property::Property(const Property &o) + : id(o.id.get()), types(o.types) +{ +} + +} } + +inline bool +JSScript::ensureHasTypes(JSContext *cx) +{ + return types || makeTypes(cx); +} + +inline bool +JSScript::ensureRanAnalysis(JSContext *cx, JSObject *scope) +{ + JSScript *self = this; + JS::SkipRoot root(cx, &self); + + if (!self->ensureHasTypes(cx)) + return false; + if (!self->types->hasScope()) { + js::RootedObject scopeRoot(cx, scope); + if (!js::types::TypeScript::SetScope(cx, self, scope)) + return false; + scope = scopeRoot; + } + if (!self->hasAnalysis() && !self->makeAnalysis(cx)) + return false; + do { } while(0); + return true; +} + +inline bool +JSScript::ensureRanInference(JSContext *cx) +{ + if (!ensureRanAnalysis(cx, __null)) + return false; + if (!analysis()->ranInference()) { + js::types::AutoEnterTypeInference enter(cx); + analysis()->analyzeTypes(cx); + } + return !analysis()->OOM() && + !cx->compartment->types.pendingNukeTypes; +} + +inline bool +JSScript::hasAnalysis() +{ + return types && types->analysis; +} + +inline js::analyze::ScriptAnalysis * +JSScript::analysis() +{ + do { } while(0); + return types->analysis; +} + +inline void +JSScript::clearAnalysis() +{ + if (types) + types->analysis = __null; +} + +inline void +js::analyze::ScriptAnalysis::addPushedType(JSContext *cx, uint32_t offset, uint32_t which, + js::types::Type type) +{ + js::types::TypeSet *pushed = pushedTypes(offset, which); + pushed->addType(cx, type); +} + +inline js::types::TypeObject * +JSCompartment::getEmptyType(JSContext *cx) +{ + if (!emptyTypeObject) + emptyTypeObject = types.newTypeObject(cx, __null, JSProto_Object, __null, true); + return emptyTypeObject; +} +# 44 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsscriptinlines.h" 1 +# 46 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier-inl.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier-inl.h" +#define jsgc_barrier_inl_h___ + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" 1 +# 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier-inl.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String-inl.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String-inl.h" +#define String_inl_h__ + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsprobes.h" 1 +# 13 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String-inl.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String.h" 1 +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String-inl.h" 2 + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsgcinlines.h" 1 +# 18 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String-inl.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 1 +# 19 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String-inl.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier-inl.h" 1 +# 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String-inl.h" 2 + +inline void +JSString::writeBarrierPre(JSString *str) +{ + + if (!str) + return; + + JSCompartment *comp = str->compartment(); + if (comp->needsBarrier()) { + JSString *tmp = str; + MarkStringUnbarriered(comp->barrierTracer(), &tmp, "write barrier"); + do { } while(0); + } + +} + +inline void +JSString::writeBarrierPost(JSString *str, void *addr) +{ +} + +inline bool +JSString::needWriteBarrierPre(JSCompartment *comp) +{ + + return comp->needsBarrier(); + + + +} + +inline void +JSString::readBarrier(JSString *str) +{ + + JSCompartment *comp = str->compartment(); + if (comp->needsBarrier()) { + JSString *tmp = str; + MarkStringUnbarriered(comp->barrierTracer(), &tmp, "read barrier"); + do { } while(0); + } + +} + +__attribute__((always_inline)) inline bool +JSString::validateLength(JSContext *cx, size_t length) +{ + if ((__builtin_expect((length > JSString::MAX_LENGTH), 0))) { + js_ReportAllocationOverflow(cx); + return false; + } + + return true; +} + +__attribute__((always_inline)) inline void +JSRope::init(JSString *left, JSString *right, size_t length) +{ + d.lengthAndFlags = buildLengthAndFlags(length, ROPE_BIT); + d.u1.left = left; + d.s.u2.right = right; + JSString::writeBarrierPost(d.u1.left, &d.u1.left); + JSString::writeBarrierPost(d.s.u2.right, &d.s.u2.right); +} + +__attribute__((always_inline)) inline JSRope * +JSRope::new_(JSContext *cx, js::HandleString left, js::HandleString right, size_t length) +{ + if (!validateLength(cx, length)) + return __null; + JSRope *str = (JSRope *)js_NewGCString(cx); + if (!str) + return __null; + str->init(left, right, length); + return str; +} + +inline void +JSRope::markChildren(JSTracer *trc) +{ + js::gc::MarkStringUnbarriered(trc, &d.u1.left, "left child"); + js::gc::MarkStringUnbarriered(trc, &d.s.u2.right, "right child"); +} + +__attribute__((always_inline)) inline void +JSDependentString::init(JSLinearString *base, const jschar *chars, size_t length) +{ + do { } while(0); + d.lengthAndFlags = buildLengthAndFlags(length, DEPENDENT_FLAGS); + d.u1.chars = chars; + d.s.u2.base = base; + JSString::writeBarrierPost(d.s.u2.base, &d.s.u2.base); +} + +__attribute__((always_inline)) inline JSDependentString * +JSDependentString::new_(JSContext *cx, JSLinearString *base_, const jschar *chars, size_t length) +{ + JS::Rooted base(cx, base_); + + + while (base->isDependent()) + base = base->asDependent().base(); + + do { } while(0); + do { } while(0); + do { } while(0); + + + + + + + JS::SkipRoot charsRoot(cx, &chars); + + JSDependentString *str = (JSDependentString *)js_NewGCString(cx); + if (!str) + return __null; + str->init(base, chars, length); + return str; +} + +inline void +JSString::markBase(JSTracer *trc) +{ + do { } while(0); + js::gc::MarkStringUnbarriered(trc, &d.s.u2.base, "base"); +} + +inline js::PropertyName * +JSFlatString::toPropertyName(JSContext *cx) +{ + + + + + if (isAtom()) + return asAtom().asPropertyName(); + JSAtom *atom = js_AtomizeString(cx, this); + if (!atom) + return __null; + return atom->asPropertyName(); +} + +__attribute__((always_inline)) inline void +JSFixedString::init(const jschar *chars, size_t length) +{ + d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS); + d.u1.chars = chars; +} + +__attribute__((always_inline)) inline JSFixedString * +JSFixedString::new_(JSContext *cx, const jschar *chars, size_t length) +{ + do { } while(0); + + if (!validateLength(cx, length)) + return __null; + JSFixedString *str = (JSFixedString *)js_NewGCString(cx); + if (!str) + return __null; + str->init(chars, length); + return str; +} + +__attribute__((always_inline)) inline JSAtom * +JSFixedString::morphAtomizedStringIntoAtom() +{ + d.lengthAndFlags = buildLengthAndFlags(length(), NON_STATIC_ATOM_FLAGS); + return &asAtom(); +} + +__attribute__((always_inline)) inline JSInlineString * +JSInlineString::new_(JSContext *cx) +{ + return (JSInlineString *)js_NewGCString(cx); +} + +__attribute__((always_inline)) inline jschar * +JSInlineString::init(size_t length) +{ + d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS); + d.u1.chars = d.inlineStorage; + do { } while(0); + return d.inlineStorage; +} + +__attribute__((always_inline)) inline void +JSInlineString::resetLength(size_t length) +{ + d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS); + do { } while(0); +} + +__attribute__((always_inline)) inline JSShortString * +JSShortString::new_(JSContext *cx) +{ + return js_NewGCShortString(cx); +} + +__attribute__((always_inline)) inline void +JSShortString::initAtOffsetInBuffer(const jschar *chars, size_t length) +{ + do { } while(0); + do { } while(0); + d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS); + d.u1.chars = chars; +} + +__attribute__((always_inline)) inline void +JSExternalString::init(const jschar *chars, size_t length, const JSStringFinalizer *fin) +{ + do { } while(0); + do { } while(0); + d.lengthAndFlags = buildLengthAndFlags(length, FIXED_FLAGS); + d.u1.chars = chars; + d.s.u2.externalFinalizer = fin; +} + +__attribute__((always_inline)) inline JSExternalString * +JSExternalString::new_(JSContext *cx, const jschar *chars, size_t length, + const JSStringFinalizer *fin) +{ + do { } while(0); + + if (!validateLength(cx, length)) + return __null; + JSExternalString *str = js_NewGCExternalString(cx); + if (!str) + return __null; + str->init(chars, length, fin); + cx->runtime->updateMallocCounter(cx, (length + 1) * sizeof(jschar)); + return str; +} + +inline bool +js::StaticStrings::fitsInSmallChar(jschar c) +{ + return c < SMALL_CHAR_LIMIT && toSmallChar[c] != INVALID_SMALL_CHAR; +} + +inline bool +js::StaticStrings::hasUnit(jschar c) +{ + return c < UNIT_STATIC_LIMIT; +} + +inline JSAtom * +js::StaticStrings::getUnit(jschar c) +{ + do { } while(0); + return unitStaticTable[c]; +} + +inline bool +js::StaticStrings::hasUint(uint32_t u) +{ + return u < INT_STATIC_LIMIT; +} + +inline JSAtom * +js::StaticStrings::getUint(uint32_t u) +{ + do { } while(0); + return intStaticTable[u]; +} + +inline bool +js::StaticStrings::hasInt(int32_t i) +{ + return uint32_t(i) < INT_STATIC_LIMIT; +} + +inline JSAtom * +js::StaticStrings::getInt(int32_t i) +{ + do { } while(0); + return getUint(uint32_t(i)); +} + +inline JSLinearString * +js::StaticStrings::getUnitStringForElement(JSContext *cx, JSString *str, size_t index) +{ + do { } while(0); + const jschar *chars = str->getChars(cx); + if (!chars) + return __null; + jschar c = chars[index]; + if (c < UNIT_STATIC_LIMIT) + return getUnit(c); + return js_NewDependentString(cx, str, index, 1); +} + +inline JSAtom * +js::StaticStrings::getLength2(jschar c1, jschar c2) +{ + do { } while(0); + do { } while(0); + size_t index = (((size_t)toSmallChar[c1]) << 6) + toSmallChar[c2]; + return length2StaticTable[index]; +} + +inline JSAtom * +js::StaticStrings::getLength2(uint32_t i) +{ + do { } while(0); + return getLength2('0' + i / 10, '0' + i % 10); +} + + +inline JSAtom * +js::StaticStrings::lookup(const jschar *chars, size_t length) +{ + switch (length) { + case 1: + if (chars[0] < UNIT_STATIC_LIMIT) + return getUnit(chars[0]); + return __null; + case 2: + if (fitsInSmallChar(chars[0]) && fitsInSmallChar(chars[1])) + return getLength2(chars[0], chars[1]); + return __null; + case 3: + + + + + + + typedef int moz_static_assert111[(INT_STATIC_LIMIT <= 999) ? 1 : -1]; + if ('1' <= chars[0] && chars[0] <= '9' && + '0' <= chars[1] && chars[1] <= '9' && + '0' <= chars[2] && chars[2] <= '9') { + int i = (chars[0] - '0') * 100 + + (chars[1] - '0') * 10 + + (chars[2] - '0'); + + if (unsigned(i) < INT_STATIC_LIMIT) + return getInt(i); + } + return __null; + } + + return __null; +} + +__attribute__((always_inline)) inline void +JSString::finalize(js::FreeOp *fop) +{ + + do { } while(0); + + if (isFlat()) + asFlat().finalize(fop); + else + do { } while(0); +} + +inline void +JSFlatString::finalize(js::FreeOp *fop) +{ + do { } while(0); + + + + + + if (chars() != d.inlineStorage) + fop->free_(const_cast(chars())); +} + +inline void +JSShortString::finalize(js::FreeOp *fop) +{ + do { } while(0); +} + +inline void +JSAtom::finalize(js::FreeOp *fop) +{ + do { } while(0); + if (getAllocKind() == js::gc::FINALIZE_STRING) + JSFlatString::finalize(fop); + else + do { } while(0); +} + +inline void +JSExternalString::finalize(js::FreeOp *fop) +{ + const JSStringFinalizer *fin = externalFinalizer(); + fin->finalize(fin, const_cast(chars())); +} + +namespace js { + +static __attribute__((always_inline)) inline JSFixedString * +NewShortString(JSContext *cx, const jschar *chars, size_t length) +{ + SkipRoot skip(cx, &chars); + + + + + + do { } while(0); + JSInlineString *str = JSInlineString::lengthFits(length) + ? JSInlineString::new_(cx) + : JSShortString::new_(cx); + if (!str) + return __null; + + jschar *storage = str->init(length); + PodCopy(storage, chars, length); + storage[length] = 0; + Probes::createString(cx, str, length); + return str; +} + +} +# 16 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier-inl.h" 2 + +namespace js { + +inline void +EncapsulatedValue::writeBarrierPre(const Value &value) +{ + + if (value.isMarkable()) { + js::gc::Cell *cell = (js::gc::Cell *)value.toGCThing(); + writeBarrierPre(cell->compartment(), value); + } + +} + +inline void +EncapsulatedValue::writeBarrierPre(JSCompartment *comp, const Value &value) +{ + + if (comp->needsBarrier()) { + Value tmp(value); + js::gc::MarkValueUnbarriered(comp->barrierTracer(), &tmp, "write barrier"); + do { } while(0); + } + +} + +inline void +EncapsulatedValue::pre() +{ + writeBarrierPre(value); +} + +inline void +EncapsulatedValue::pre(JSCompartment *comp) +{ + writeBarrierPre(comp, value); +} + +inline +HeapValue::HeapValue() + : EncapsulatedValue(UndefinedValue()) +{ + post(); +} + +inline +HeapValue::HeapValue(const Value &v) + : EncapsulatedValue(v) +{ + do { } while(0); + post(); +} + +inline +HeapValue::HeapValue(const HeapValue &v) + : EncapsulatedValue(v.value) +{ + do { } while(0); + post(); +} + +inline +HeapValue::~HeapValue() +{ + pre(); +} + +inline void +HeapValue::init(const Value &v) +{ + do { } while(0); + value = v; + post(); +} + +inline void +HeapValue::init(JSCompartment *comp, const Value &v) +{ + do { } while(0); + value = v; + post(comp); +} + +inline HeapValue & +HeapValue::operator=(const Value &v) +{ + pre(); + do { } while(0); + value = v; + post(); + return *this; +} + +inline HeapValue & +HeapValue::operator=(const HeapValue &v) +{ + pre(); + do { } while(0); + value = v.value; + post(); + return *this; +} + +inline void +HeapValue::set(JSCompartment *comp, const Value &v) +{ +# 130 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/gc/Barrier-inl.h" + pre(comp); + do { } while(0); + value = v; + post(comp); +} + +inline void +HeapValue::writeBarrierPost(const Value &value, Value *addr) +{ + + +} + +inline void +HeapValue::writeBarrierPost(JSCompartment *comp, const Value &value, Value *addr) +{ + + +} + +inline void +HeapValue::post() +{ + writeBarrierPost(value, &value); +} + +inline void +HeapValue::post(JSCompartment *comp) +{ + writeBarrierPost(comp, value, &value); +} + +inline +RelocatableValue::RelocatableValue() + : EncapsulatedValue(UndefinedValue()) +{ +} + +inline +RelocatableValue::RelocatableValue(const Value &v) + : EncapsulatedValue(v) +{ + do { } while(0); + post(); +} + +inline +RelocatableValue::RelocatableValue(const RelocatableValue &v) + : EncapsulatedValue(v.value) +{ + do { } while(0); + post(); +} + +inline +RelocatableValue::~RelocatableValue() +{ + pre(); + relocate(); +} + +inline RelocatableValue & +RelocatableValue::operator=(const Value &v) +{ + pre(); + do { } while(0); + value = v; + post(); + return *this; +} + +inline RelocatableValue & +RelocatableValue::operator=(const RelocatableValue &v) +{ + pre(); + do { } while(0); + value = v.value; + post(); + return *this; +} + +inline void +RelocatableValue::post() +{ + + +} + +inline void +RelocatableValue::post(JSCompartment *comp) +{ + + +} + +inline void +RelocatableValue::relocate() +{ + + +} + +inline +HeapSlot::HeapSlot(JSObject *obj, uint32_t slot, const Value &v) + : EncapsulatedValue(v) +{ + do { } while(0); + post(obj, slot); +} + +inline +HeapSlot::HeapSlot(JSObject *obj, uint32_t slot, const HeapSlot &s) + : EncapsulatedValue(s.value) +{ + do { } while(0); + post(obj, slot); +} + +inline +HeapSlot::~HeapSlot() +{ + pre(); +} + +inline void +HeapSlot::init(JSObject *obj, uint32_t slot, const Value &v) +{ + value = v; + post(obj, slot); +} + +inline void +HeapSlot::init(JSCompartment *comp, JSObject *obj, uint32_t slot, const Value &v) +{ + value = v; + post(comp, obj, slot); +} + +inline void +HeapSlot::set(JSObject *obj, uint32_t slot, const Value &v) +{ + do { } while (0); + do { } while (0); + + pre(); + do { } while(0); + value = v; + post(obj, slot); +} + +inline void +HeapSlot::set(JSCompartment *comp, JSObject *obj, uint32_t slot, const Value &v) +{ + do { } while (0); + do { } while (0); + do { } while(0); + + pre(comp); + do { } while(0); + value = v; + post(comp, obj, slot); +} + +inline void +HeapSlot::writeBarrierPost(JSObject *obj, uint32_t slot) +{ +} + +inline void +HeapSlot::writeBarrierPost(JSCompartment *comp, JSObject *obj, uint32_t slotno) +{ +} + +inline void +HeapSlot::post(JSObject *owner, uint32_t slot) +{ + HeapSlot::writeBarrierPost(owner, slot); +} + +inline void +HeapSlot::post(JSCompartment *comp, JSObject *owner, uint32_t slot) +{ + HeapSlot::writeBarrierPost(comp, owner, slot); +} + +inline void +EncapsulatedId::pre() +{ + + if (JSID_IS_OBJECT(value)) { + JSObject *obj = JSID_TO_OBJECT(value); + JSCompartment *comp = obj->compartment(); + if (comp->needsBarrier()) { + js::gc::MarkObjectUnbarriered(comp->barrierTracer(), &obj, "write barrier"); + do { } while(0); + } + } else if (JSID_IS_STRING(value)) { + JSString *str = JSID_TO_STRING(value); + JSCompartment *comp = str->compartment(); + if (comp->needsBarrier()) { + js::gc::MarkStringUnbarriered(comp->barrierTracer(), &str, "write barrier"); + do { } while(0); + } + } + +} + +inline +RelocatableId::~RelocatableId() +{ + pre(); +} + +inline RelocatableId & +RelocatableId::operator=(jsid id) +{ + if (id != value) + pre(); + do { } while(0); + value = id; + return *this; +} + +inline RelocatableId & +RelocatableId::operator=(const RelocatableId &v) +{ + if (v.value != value) + pre(); + do { } while(0); + value = v.value; + return *this; +} + +inline +HeapId::HeapId(jsid id) + : EncapsulatedId(id) +{ + do { } while(0); + post(); +} + +inline +HeapId::~HeapId() +{ + pre(); +} + +inline void +HeapId::init(jsid id) +{ + do { } while(0); + value = id; + post(); +} + +inline void +HeapId::post() +{ +} + +inline HeapId & +HeapId::operator=(jsid id) +{ + if (id != value) + pre(); + do { } while(0); + value = id; + post(); + return *this; +} + +inline HeapId & +HeapId::operator=(const HeapId &v) +{ + if (v.value != value) + pre(); + do { } while(0); + value = v.value; + post(); + return *this; +} + +inline const Value & +ReadBarrieredValue::get() const +{ + if (value.isObject()) + JSObject::readBarrier(&value.toObject()); + else if (value.isString()) + JSString::readBarrier(value.toString()); + else + do { } while(0); + + return value; +} + +inline +ReadBarrieredValue::operator const Value &() const +{ + return get(); +} + +inline JSObject & +ReadBarrieredValue::toObject() const +{ + return get().toObject(); +} + +} +# 48 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics-inl.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics-inl.h" +#define RegExpStatics_inl_h__ + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics.h" 1 +# 12 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics-inl.h" 2 + + + +namespace js { + +inline js::RegExpStatics * +js::GlobalObject::getRegExpStatics() const +{ + JSObject &resObj = getSlot(REGEXP_STATICS).toObject(); + return static_cast(resObj.getPrivate()); +} + +inline size_t +SizeOfRegExpStaticsData(const JSObject *obj, JSMallocSizeOfFun mallocSizeOf) +{ + return mallocSizeOf(obj->getPrivate()); +} + +inline +RegExpStatics::RegExpStatics() + : bufferLink(__null), + copied(false) +{ + clear(); +} + +inline bool +RegExpStatics::createDependent(JSContext *cx, size_t start, size_t end, Value *out) const +{ + do { } while(0); + do { } while(0); + JSString *str = js_NewDependentString(cx, matchPairsInput, start, end - start); + if (!str) + return false; + *out = StringValue(str); + return true; +} + +inline bool +RegExpStatics::createPendingInput(JSContext *cx, Value *out) const +{ + out->setString(pendingInput ? pendingInput.get() : cx->runtime->emptyString); + return true; +} + +inline bool +RegExpStatics::makeMatch(JSContext *cx, size_t checkValidIndex, size_t pairNum, Value *out) const +{ + if (checkValidIndex / 2 >= pairCount() || matchPairs[checkValidIndex] < 0) { + out->setString(cx->runtime->emptyString); + return true; + } + return createDependent(cx, get(pairNum, 0), get(pairNum, 1), out); +} + +inline bool +RegExpStatics::createLastParen(JSContext *cx, Value *out) const +{ + if (pairCount() <= 1) { + out->setString(cx->runtime->emptyString); + return true; + } + size_t num = pairCount() - 1; + int start = get(num, 0); + int end = get(num, 1); + if (start == -1) { + out->setString(cx->runtime->emptyString); + return true; + } + do { } while(0); + do { } while(0); + return createDependent(cx, start, end, out); +} + +inline bool +RegExpStatics::createLeftContext(JSContext *cx, Value *out) const +{ + if (!pairCount()) { + out->setString(cx->runtime->emptyString); + return true; + } + if (matchPairs[0] < 0) { + *out = UndefinedValue(); + return true; + } + return createDependent(cx, 0, matchPairs[0], out); +} + +inline bool +RegExpStatics::createRightContext(JSContext *cx, Value *out) const +{ + if (!pairCount()) { + out->setString(cx->runtime->emptyString); + return true; + } + if (matchPairs[1] < 0) { + *out = UndefinedValue(); + return true; + } + return createDependent(cx, matchPairs[1], matchPairsInput->length(), out); +} + +inline void +RegExpStatics::getParen(size_t pairNum, JSSubString *out) const +{ + checkParenNum(pairNum); + if (!pairIsPresent(pairNum)) { + *out = js_EmptySubString; + return; + } + out->chars = matchPairsInput->chars() + get(pairNum, 0); + out->length = getParenLength(pairNum); +} + +inline void +RegExpStatics::getLastMatch(JSSubString *out) const +{ + if (!pairCount()) { + *out = js_EmptySubString; + return; + } + do { } while(0); + out->chars = matchPairsInput->chars() + get(0, 0); + do { } while(0); + out->length = get(0, 1) - get(0, 0); +} + +inline void +RegExpStatics::getLastParen(JSSubString *out) const +{ + size_t pc = pairCount(); + + if (pc <= 1) { + *out = js_EmptySubString; + return; + } + getParen(pc - 1, out); +} + +inline void +RegExpStatics::getLeftContext(JSSubString *out) const +{ + if (!pairCount()) { + *out = js_EmptySubString; + return; + } + out->chars = matchPairsInput->chars(); + out->length = get(0, 0); +} + +inline void +RegExpStatics::getRightContext(JSSubString *out) const +{ + if (!pairCount()) { + *out = js_EmptySubString; + return; + } + out->chars = matchPairsInput->chars() + get(0, 1); + do { } while(0); + out->length = matchPairsInput->length() - get(0, 1); +} + +inline void +RegExpStatics::copyTo(RegExpStatics &dst) +{ + dst.matchPairs.clear(); + + dst.matchPairs.infallibleAppend(matchPairs); + dst.matchPairsInput = matchPairsInput; + dst.pendingInput = pendingInput; + dst.flags = flags; +} + +inline void +RegExpStatics::aboutToWrite() +{ + if (bufferLink && !bufferLink->copied) { + copyTo(*bufferLink); + bufferLink->copied = true; + } +} + +inline void +RegExpStatics::restore() +{ + if (bufferLink->copied) + bufferLink->copyTo(*this); + bufferLink = bufferLink->bufferLink; +} + +inline bool +RegExpStatics::updateFromMatchPairs(JSContext *cx, JSLinearString *input, MatchPairs *newPairs) +{ + do { } while(0); + aboutToWrite(); + BarrieredSetPair(cx->compartment, + pendingInput, input, + matchPairsInput, input); + + if (!matchPairs.resizeUninitialized(2 * newPairs->pairCount())) { + js_ReportOutOfMemory(cx); + return false; + } + + for (size_t i = 0; i < newPairs->pairCount(); ++i) { + matchPairs[2 * i] = newPairs->pair(i).start; + matchPairs[2 * i + 1] = newPairs->pair(i).limit; + } + + return true; +} + +inline void +RegExpStatics::clear() +{ + aboutToWrite(); + flags = RegExpFlag(0); + pendingInput = __null; + matchPairsInput = __null; + matchPairs.clear(); +} + +inline void +RegExpStatics::setPendingInput(JSString *newInput) +{ + aboutToWrite(); + pendingInput = newInput; +} + +PreserveRegExpStatics::~PreserveRegExpStatics() +{ + original->restore(); +} + +inline void +RegExpStatics::setMultiline(JSContext *cx, bool enabled) +{ + aboutToWrite(); + if (enabled) { + flags = RegExpFlag(flags | MultilineFlag); + markFlagsSet(cx); + } else { + flags = RegExpFlag(flags & ~MultilineFlag); + } +} + +inline void +RegExpStatics::markFlagsSet(JSContext *cx) +{ +# 269 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/RegExpStatics-inl.h" + GlobalObject *global = GetGlobalForScopeChain(cx); + do { } while(0); + + types::MarkTypeObjectFlags(cx, global, types::OBJECT_FLAG_REGEXP_FLAGS_SET); +} + +inline void +RegExpStatics::reset(JSContext *cx, JSString *newInput, bool newMultiline) +{ + aboutToWrite(); + clear(); + pendingInput = newInput; + setMultiline(cx, newMultiline); + checkInvariants(); +} + +} + +inline js::RegExpStatics * +JSContext::regExpStatics() +{ + return js::GetGlobalForScopeChain(this)->getRegExpStatics(); +} +# 51 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/String-inl.h" 1 +# 52 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" 2 + +inline bool +JSObject::enumerate(JSContext *cx, JSIterateOp iterop, js::Value *statep, jsid *idp) +{ + JSNewEnumerateOp op = getOps()->enumerate; + return (op ? op : JS_EnumerateState)(cx, js::RootedObject(cx, this), iterop, statep, idp); +} + +inline bool +JSObject::defaultValue(JSContext *cx, JSType hint, js::Value *vp) +{ + js::RootedObject self(cx, this); + + JSConvertOp op = getClass()->convert; + bool ok; + if (op == JS_ConvertStub) + ok = js::DefaultValue(cx, self, hint, vp); + else + ok = op(cx, self, hint, vp); + do { } while (0); + return ok; +} + +inline JSType +JSObject::typeOf(JSContext *cx) +{ + js::TypeOfOp op = getOps()->typeOf; + return (op ? op : js::baseops::TypeOf)(cx, js::RootedObject(cx, this)); +} + +inline JSObject * +JSObject::thisObject(JSContext *cx) +{ + JSObjectOp op = getOps()->thisObject; + return op ? op(cx, js::RootedObject(cx, this)) : this; +} + +inline JSBool +JSObject::setGeneric(JSContext *cx, js::HandleId id, js::Value *vp, JSBool strict) +{ + if (getOps()->setGeneric) + return nonNativeSetProperty(cx, id, vp, strict); + return js::baseops::SetPropertyHelper(cx, + js::RootedObject(cx, this), + id, 0, vp, strict); +} + +inline JSBool +JSObject::setProperty(JSContext *cx, js::PropertyName *name, js::Value *vp, JSBool strict) +{ + return setGeneric(cx, js::RootedId(cx, js::NameToId(name)), vp, strict); +} + +inline JSBool +JSObject::setElement(JSContext *cx, uint32_t index, js::Value *vp, JSBool strict) +{ + if (getOps()->setElement) + return nonNativeSetElement(cx, index, vp, strict); + return js::baseops::SetElementHelper(cx, js::RootedObject(cx, this), index, 0, vp, strict); +} + +inline JSBool +JSObject::setSpecial(JSContext *cx, js::SpecialId sid, js::Value *vp, JSBool strict) +{ + return setGeneric(cx, js::RootedId(cx, SPECIALID_TO_JSID(sid)), vp, strict); +} + +inline JSBool +JSObject::setGenericAttributes(JSContext *cx, js::HandleId id, unsigned *attrsp) +{ + js::types::MarkTypePropertyConfigured(cx, this, id); + js::GenericAttributesOp op = getOps()->setGenericAttributes; + return (op ? op : js::baseops::SetAttributes)(cx, js::RootedObject(cx, this), id, attrsp); +} + +inline JSBool +JSObject::setPropertyAttributes(JSContext *cx, js::PropertyName *name, unsigned *attrsp) +{ + return setGenericAttributes(cx, js::RootedId(cx, js::NameToId(name)), attrsp); +} + +inline JSBool +JSObject::setElementAttributes(JSContext *cx, uint32_t index, unsigned *attrsp) +{ + js::ElementAttributesOp op = getOps()->setElementAttributes; + return (op ? op : js::baseops::SetElementAttributes)(cx, js::RootedObject(cx, this), index, attrsp); +} + +inline JSBool +JSObject::setSpecialAttributes(JSContext *cx, js::SpecialId sid, unsigned *attrsp) +{ + return setGenericAttributes(cx, js::RootedId(cx, SPECIALID_TO_JSID(sid)), attrsp); +} + +inline bool +JSObject::changePropertyAttributes(JSContext *cx, js::Shape *shape, unsigned attrs) +{ + return !!changeProperty(cx, shape, attrs, 0, shape->getter(), shape->setter()); +} + +inline JSBool +JSObject::getGeneric(JSContext *cx, js::HandleObject receiver, js::HandleId id, js::Value *vp) +{ + js::RootedObject self(cx, this); + + js::GenericIdOp op = getOps()->getGeneric; + if (op) { + if (!op(cx, self, receiver, id, vp)) + return false; + } else { + if (!js::baseops::GetProperty(cx, self, receiver, id, vp)) + return false; + } + return true; +} + +inline JSBool +JSObject::getProperty(JSContext *cx, js::HandleObject receiver, js::PropertyName *name, js::Value *vp) +{ + return getGeneric(cx, receiver, js::RootedId(cx, js::NameToId(name)), vp); +} + +inline JSBool +JSObject::getGeneric(JSContext *cx, js::HandleId id, js::Value *vp) +{ + return getGeneric(cx, js::RootedObject(cx, this), id, vp); +} + +inline JSBool +JSObject::getProperty(JSContext *cx, js::PropertyName *name, js::Value *vp) +{ + return getGeneric(cx, js::RootedId(cx, js::NameToId(name)), vp); +} + +inline bool +JSObject::deleteProperty(JSContext *cx, js::HandlePropertyName name, js::Value *rval, bool strict) +{ + jsid id = js::NameToId(name); + js::types::AddTypePropertyId(cx, this, id, js::types::Type::UndefinedType()); + js::types::MarkTypePropertyConfigured(cx, this, id); + js::DeletePropertyOp op = getOps()->deleteProperty; + return (op ? op : js::baseops::DeleteProperty)(cx, js::RootedObject(cx, this), name, rval, strict); +} + +inline bool +JSObject::deleteElement(JSContext *cx, uint32_t index, js::Value *rval, bool strict) +{ + js::RootedObject self(cx, this); + + jsid id; + if (!js::IndexToId(cx, index, &id)) + return false; + js::types::AddTypePropertyId(cx, self, id, js::types::Type::UndefinedType()); + js::types::MarkTypePropertyConfigured(cx, self, id); + js::DeleteElementOp op = self->getOps()->deleteElement; + return (op ? op : js::baseops::DeleteElement)(cx, self, index, rval, strict); +} + +inline bool +JSObject::deleteSpecial(JSContext *cx, js::HandleSpecialId sid, js::Value *rval, bool strict) +{ + jsid id = SPECIALID_TO_JSID(sid); + js::types::AddTypePropertyId(cx, this, id, js::types::Type::UndefinedType()); + js::types::MarkTypePropertyConfigured(cx, this, id); + js::DeleteSpecialOp op = getOps()->deleteSpecial; + return (op ? op : js::baseops::DeleteSpecial)(cx, js::RootedObject(cx, this), sid, rval, strict); +} + +inline void +JSObject::finalize(js::FreeOp *fop) +{ + js::Probes::finalizeObject(this); + + if (!fop->onBackgroundThread()) { + + + + + + js::Class *clasp = getClass(); + if (clasp->finalize) + clasp->finalize(fop, this); + } + + finish(fop); +} + +inline JSObject * +JSObject::getParent() const +{ + return lastProperty()->getObjectParent(); +} + +inline JSObject * +JSObject::enclosingScope() +{ + return isScope() + ? &asScope().enclosingScope() + : isDebugScope() + ? &asDebugScope().enclosingScope() + : getParent(); +} + +inline bool +JSObject::isFixedSlot(size_t slot) +{ + do { } while(0); + return slot < numFixedSlots(); +} + +inline size_t +JSObject::dynamicSlotIndex(size_t slot) +{ + do { } while(0); + return slot - numFixedSlots(); +} + +inline void +JSObject::setLastPropertyInfallible(const js::Shape *shape) +{ + do { } while(0); + do { } while(0); + do { } while(0); + do { } while(0); + do { } while(0); + + shape_ = const_cast(shape); +} + +inline void +JSObject::removeLastProperty(JSContext *cx) +{ + do { } while(0); + ((void)(setLastProperty(cx, lastProperty()->previous()))); +} + +inline bool +JSObject::canRemoveLastProperty() +{ + + + + + + + + do { } while(0); + const js::Shape *previous = lastProperty()->previous(); + return previous->getObjectParent() == lastProperty()->getObjectParent() + && previous->getObjectFlags() == lastProperty()->getObjectFlags(); +} + +inline const js::HeapSlot * +JSObject::getRawSlots() +{ + do { } while(0); + return slots; +} + +inline const js::Value & +JSObject::getReservedSlot(unsigned index) const +{ + do { } while(0); + return getSlot(index); +} + +inline js::HeapSlot & +JSObject::getReservedSlotRef(unsigned index) +{ + do { } while(0); + return getSlotRef(index); +} + +inline void +JSObject::setReservedSlot(unsigned index, const js::Value &v) +{ + do { } while(0); + setSlot(index, v); +} + +inline void +JSObject::initReservedSlot(unsigned index, const js::Value &v) +{ + do { } while(0); + initSlot(index, v); +} + +inline void +JSObject::prepareSlotRangeForOverwrite(size_t start, size_t end) +{ + for (size_t i = start; i < end; i++) + getSlotAddressUnchecked(i)->js::HeapSlot::~HeapSlot(); +} + +inline void +JSObject::prepareElementRangeForOverwrite(size_t start, size_t end) +{ + do { } while(0); + do { } while(0); + for (size_t i = start; i < end; i++) + elements[i].js::HeapSlot::~HeapSlot(); +} + +inline uint32_t +JSObject::getArrayLength() const +{ + do { } while(0); + return getElementsHeader()->length; +} + +inline void +JSObject::setArrayLength(JSContext *cx, uint32_t length) +{ + do { } while(0); + + if (length > (2147483647)) { + + + + + js::types::MarkTypeObjectFlags(cx, this, + js::types::OBJECT_FLAG_NON_PACKED_ARRAY | + js::types::OBJECT_FLAG_NON_DENSE_ARRAY); + jsid lengthId = js::NameToId(cx->runtime->atomState.lengthAtom); + js::types::AddTypePropertyId(cx, this, lengthId, + js::types::Type::DoubleType()); + } + + getElementsHeader()->length = length; +} + +inline void +JSObject::setDenseArrayLength(uint32_t length) +{ + + do { } while(0); + do { } while(0); + getElementsHeader()->length = length; +} + +inline void +JSObject::setDenseArrayInitializedLength(uint32_t length) +{ + do { } while(0); + do { } while(0); + prepareElementRangeForOverwrite(length, getElementsHeader()->initializedLength); + getElementsHeader()->initializedLength = length; +} + +inline uint32_t +JSObject::getDenseArrayCapacity() +{ + do { } while(0); + return getElementsHeader()->capacity; +} + +inline bool +JSObject::ensureElements(JSContext *cx, uint32_t capacity) +{ + if (capacity > getDenseArrayCapacity()) + return growElements(cx, capacity); + return true; +} + +inline void +JSObject::setDenseArrayElement(unsigned idx, const js::Value &val) +{ + do { } while(0); + elements[idx].set(this, idx, val); +} + +inline void +JSObject::initDenseArrayElement(unsigned idx, const js::Value &val) +{ + do { } while(0); + elements[idx].init(this, idx, val); +} + +inline void +JSObject::setDenseArrayElementWithType(JSContext *cx, unsigned idx, const js::Value &val) +{ + js::types::AddTypePropertyId(cx, this, ((jsid)0x2), val); + setDenseArrayElement(idx, val); +} + +inline void +JSObject::initDenseArrayElementWithType(JSContext *cx, unsigned idx, const js::Value &val) +{ + js::types::AddTypePropertyId(cx, this, ((jsid)0x2), val); + initDenseArrayElement(idx, val); +} + +inline void +JSObject::copyDenseArrayElements(unsigned dstStart, const js::Value *src, unsigned count) +{ + do { } while(0); + JSCompartment *comp = compartment(); + for (unsigned i = 0; i < count; ++i) + elements[dstStart + i].set(comp, this, dstStart + i, src[i]); +} + +inline void +JSObject::initDenseArrayElements(unsigned dstStart, const js::Value *src, unsigned count) +{ + do { } while(0); + JSCompartment *comp = compartment(); + for (unsigned i = 0; i < count; ++i) + elements[dstStart + i].init(comp, this, dstStart + i, src[i]); +} + +inline void +JSObject::moveDenseArrayElements(unsigned dstStart, unsigned srcStart, unsigned count) +{ + do { } while(0); + do { } while(0); +# 480 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" + JSCompartment *comp = compartment(); + if (comp->needsBarrier()) { + if (dstStart < srcStart) { + js::HeapSlot *dst = elements + dstStart; + js::HeapSlot *src = elements + srcStart; + for (unsigned i = 0; i < count; i++, dst++, src++) + dst->set(comp, this, dst - elements, *src); + } else { + js::HeapSlot *dst = elements + dstStart + count - 1; + js::HeapSlot *src = elements + srcStart + count - 1; + for (unsigned i = 0; i < count; i++, dst--, src--) + dst->set(comp, this, dst - elements, *src); + } + } else { + memmove(elements + dstStart, elements + srcStart, count * sizeof(js::HeapSlot)); + SlotRangeWriteBarrierPost(comp, this, dstStart, count); + } +} + +inline void +JSObject::moveDenseArrayElementsUnbarriered(unsigned dstStart, unsigned srcStart, unsigned count) +{ + do { } while(0); + + do { } while(0); + do { } while(0); + + memmove(elements + dstStart, elements + srcStart, count * sizeof(js::Value)); +} + +inline bool +JSObject::denseArrayHasInlineSlots() const +{ + do { } while(0); + return elements == fixedElements(); +} + +namespace js { + + + + + +static inline JSAtom * +CallObjectLambdaName(JSFunction *fun) +{ + return (fun->flags & 0x08) ? fun->atom.get() : __null; +} + +} + +inline const js::Value & +JSObject::getDateUTCTime() const +{ + do { } while(0); + return getFixedSlot(JSSLOT_DATE_UTC_TIME); +} + +inline void +JSObject::setDateUTCTime(const js::Value &time) +{ + do { } while(0); + setFixedSlot(JSSLOT_DATE_UTC_TIME, time); +} + +inline js::NativeIterator * +JSObject::getNativeIterator() const +{ + return (js::NativeIterator *) getPrivate(); +} + +inline void +JSObject::setNativeIterator(js::NativeIterator *ni) +{ + setPrivate(ni); +} + + + +inline JSLinearString * +JSObject::getNamePrefix() const +{ + do { } while(0); + const js::Value &v = getSlot(JSSLOT_NAME_PREFIX); + return !v.isUndefined() ? &v.toString()->asLinear() : __null; +} + +inline jsval +JSObject::getNamePrefixVal() const +{ + do { } while(0); + return getSlot(JSSLOT_NAME_PREFIX); +} + +inline void +JSObject::setNamePrefix(JSLinearString *prefix) +{ + do { } while(0); + setSlot(JSSLOT_NAME_PREFIX, prefix ? js::StringValue(prefix) : js::UndefinedValue()); +} + +inline void +JSObject::clearNamePrefix() +{ + do { } while(0); + setSlot(JSSLOT_NAME_PREFIX, js::UndefinedValue()); +} + +inline JSLinearString * +JSObject::getNameURI() const +{ + do { } while(0); + const js::Value &v = getSlot(JSSLOT_NAME_URI); + return !v.isUndefined() ? &v.toString()->asLinear() : __null; +} + +inline jsval +JSObject::getNameURIVal() const +{ + do { } while(0); + return getSlot(JSSLOT_NAME_URI); +} + +inline void +JSObject::setNameURI(JSLinearString *uri) +{ + do { } while(0); + setSlot(JSSLOT_NAME_URI, uri ? js::StringValue(uri) : js::UndefinedValue()); +} + +inline jsval +JSObject::getNamespaceDeclared() const +{ + do { } while(0); + return getSlot(JSSLOT_NAMESPACE_DECLARED); +} + +inline void +JSObject::setNamespaceDeclared(jsval decl) +{ + do { } while(0); + setSlot(JSSLOT_NAMESPACE_DECLARED, decl); +} + +inline JSAtom * +JSObject::getQNameLocalName() const +{ + do { } while(0); + const js::Value &v = getSlot(JSSLOT_QNAME_LOCAL_NAME); + return !v.isUndefined() ? &v.toString()->asAtom() : __null; +} + +inline jsval +JSObject::getQNameLocalNameVal() const +{ + do { } while(0); + return getSlot(JSSLOT_QNAME_LOCAL_NAME); +} + +inline void +JSObject::setQNameLocalName(JSAtom *name) +{ + do { } while(0); + setSlot(JSSLOT_QNAME_LOCAL_NAME, name ? js::StringValue(name) : js::UndefinedValue()); +} + + + +inline bool +JSObject::setSingletonType(JSContext *cx) +{ + if (!cx->typeInferenceEnabled()) + return true; + + do { } while(0); + do { } while (0); + + js::types::TypeObject *type = cx->compartment->getLazyType(cx, getProto()); + if (!type) + return false; + + type_ = type; + return true; +} + +inline js::types::TypeObject * +JSObject::getType(JSContext *cx) +{ + if (hasLazyType()) + makeLazyType(cx); + return type_; +} + +inline bool +JSObject::clearType(JSContext *cx) +{ + do { } while(0); + + js::types::TypeObject *type = cx->compartment->getEmptyType(cx); + if (!type) + return false; + + type_ = type; + return true; +} + +inline void +JSObject::setType(js::types::TypeObject *newType) +{ + + + + + + do { } while (0) + ; + do { } while(0); + type_ = newType; +} + +inline bool JSObject::setIteratedSingleton(JSContext *cx) +{ + return setFlag(cx, js::BaseShape::ITERATED_SINGLETON); +} + +inline bool JSObject::isSystem() const +{ + return lastProperty()->hasObjectFlag(js::BaseShape::SYSTEM); +} + +inline bool JSObject::setSystem(JSContext *cx) +{ + return setFlag(cx, js::BaseShape::SYSTEM); +} + +inline bool JSObject::setDelegate(JSContext *cx) +{ + return setFlag(cx, js::BaseShape::DELEGATE, GENERATE_SHAPE); +} + +inline bool JSObject::isVarObj() +{ + if (isDebugScope()) + return asDebugScope().scope().isVarObj(); + return lastProperty()->hasObjectFlag(js::BaseShape::VAROBJ); +} + +inline bool JSObject::setVarObj(JSContext *cx) +{ + return setFlag(cx, js::BaseShape::VAROBJ); +} + +inline bool JSObject::setWatched(JSContext *cx) +{ + return setFlag(cx, js::BaseShape::WATCHED, GENERATE_SHAPE); +} + +inline bool JSObject::hasUncacheableProto() const +{ + return lastProperty()->hasObjectFlag(js::BaseShape::UNCACHEABLE_PROTO); +} + +inline bool JSObject::setUncacheableProto(JSContext *cx) +{ + return setFlag(cx, js::BaseShape::UNCACHEABLE_PROTO, GENERATE_SHAPE); +} + +inline bool JSObject::isBoundFunction() const +{ + return lastProperty()->hasObjectFlag(js::BaseShape::BOUND_FUNCTION); +} + +inline bool JSObject::isIndexed() const +{ + return lastProperty()->hasObjectFlag(js::BaseShape::INDEXED); +} + +inline bool JSObject::watched() const +{ + return lastProperty()->hasObjectFlag(js::BaseShape::WATCHED); +} + +inline bool JSObject::hasSpecialEquality() const +{ + return !!getClass()->ext.equality; +} + +inline bool JSObject::isArguments() const { return isNormalArguments() || isStrictArguments(); } +inline bool JSObject::isArrayBuffer() const { return hasClass(&js::ArrayBufferClass); } +inline bool JSObject::isBlock() const { return hasClass(&js::BlockClass); } +inline bool JSObject::isBoolean() const { return hasClass(&js::BooleanClass); } +inline bool JSObject::isCall() const { return hasClass(&js::CallClass); } +inline bool JSObject::isClonedBlock() const { return isBlock() && !!getProto(); } +inline bool JSObject::isDataView() const { return hasClass(&js::DataViewClass); } +inline bool JSObject::isDate() const { return hasClass(&js::DateClass); } +inline bool JSObject::isDeclEnv() const { return hasClass(&js::DeclEnvClass); } +inline bool JSObject::isElementIterator() const { return hasClass(&js::ElementIteratorClass); } +inline bool JSObject::isError() const { return hasClass(&js::ErrorClass); } +inline bool JSObject::isFunction() const { return hasClass(&js::FunctionClass); } +inline bool JSObject::isFunctionProxy() const { return hasClass(&js::FunctionProxyClass); } +inline bool JSObject::isGenerator() const { return hasClass(&js::GeneratorClass); } +inline bool JSObject::isIterator() const { return hasClass(&js::IteratorClass); } +inline bool JSObject::isNestedScope() const { return isBlock() || isWith(); } +inline bool JSObject::isNormalArguments() const { return hasClass(&js::NormalArgumentsObjectClass); } +inline bool JSObject::isNumber() const { return hasClass(&js::NumberClass); } +inline bool JSObject::isObject() const { return hasClass(&js::ObjectClass); } +inline bool JSObject::isPrimitive() const { return isNumber() || isString() || isBoolean(); } +inline bool JSObject::isRegExp() const { return hasClass(&js::RegExpClass); } +inline bool JSObject::isRegExpStatics() const { return hasClass(&js::RegExpStaticsClass); } +inline bool JSObject::isScope() const { return isCall() || isDeclEnv() || isNestedScope(); } +inline bool JSObject::isStaticBlock() const { return isBlock() && !getProto(); } +inline bool JSObject::isStopIteration() const { return hasClass(&js::StopIterationClass); } +inline bool JSObject::isStrictArguments() const { return hasClass(&js::StrictArgumentsObjectClass); } +inline bool JSObject::isString() const { return hasClass(&js::StringClass); } +inline bool JSObject::isTypedArray() const { return IsTypedArrayClass(getClass()); } +inline bool JSObject::isWeakMap() const { return hasClass(&js::WeakMapClass); } +inline bool JSObject::isWith() const { return hasClass(&js::WithClass); } + +inline bool +JSObject::isDebugScope() const +{ + extern bool js_IsDebugScopeSlow(const JSObject *obj); + return getClass() == &js::ObjectProxyClass && js_IsDebugScopeSlow(this); +} + + +inline bool JSObject::isNamespace() const { return hasClass(&js::NamespaceClass); } +inline bool JSObject::isXML() const { return hasClass(&js::XMLClass); } + +inline bool +JSObject::isXMLId() const +{ + return hasClass(&js::QNameClass) + || hasClass(&js::AttributeNameClass) + || hasClass(&js::AnyNameClass); +} + +inline bool +JSObject::isQName() const +{ + return hasClass(&js::QNameClass) + || hasClass(&js::AttributeNameClass) + || hasClass(&js::AnyNameClass); +} + + + inline JSObject * +JSObject::create(JSContext *cx, js::gc::AllocKind kind, + js::HandleShape shape, js::HandleTypeObject type, js::HeapSlot *slots) +{ + + + + + + do { } while(0); + do { } while(0); + do { } while(0); + + JSObject *obj = js_NewGCObject(cx, kind); + if (!obj) + return __null; + + obj->shape_.init(shape); + obj->type_.init(type); + obj->slots = slots; + obj->elements = js::emptyObjectElements; + + const js::Class *clasp = shape->getObjectClass(); + if (clasp->hasPrivate()) + obj->privateRef(shape->numFixedSlots()) = __null; + + size_t span = shape->slotSpan(); + if (span && clasp != &js::ArrayBufferClass) + obj->initializeSlotRange(0, span); + + return obj; +} + + inline JSObject * +JSObject::createDenseArray(JSContext *cx, js::gc::AllocKind kind, + js::HandleShape shape, js::HandleTypeObject type, + uint32_t length) +{ + do { } while(0); + do { } while(0); + + + + + + do { } while(0); + + + + + + do { } while(0); + + uint32_t capacity = js::gc::GetGCKindSlots(kind) - js::ObjectElements::VALUES_PER_HEADER; + + JSObject *obj = js_NewGCObject(cx, kind); + if (!obj) { + js_ReportOutOfMemory(cx); + return __null; + } + + obj->shape_.init(shape); + obj->type_.init(type); + obj->slots = __null; + obj->setFixedElements(); + new (obj->getElementsHeader()) js::ObjectElements(capacity, length); + + return obj; +} + +inline void +JSObject::finish(js::FreeOp *fop) +{ + if (hasDynamicSlots()) + fop->free_(slots); + if (hasDynamicElements()) + fop->free_(getElementsHeader()); +} + +inline bool +JSObject::hasProperty(JSContext *cx, js::HandleId id, bool *foundp, unsigned flags) +{ + JSObject *pobj; + JSProperty *prop; + JSAutoResolveFlags rf(cx, flags); + if (!lookupGeneric(cx, id, &pobj, &prop)) + return false; + *foundp = !!prop; + return true; +} + +inline bool +JSObject::isCallable() +{ + return isFunction() || getClass()->call; +} + +inline JSPrincipals * +JSObject::principals(JSContext *cx) +{ + if (JSObjectPrincipalsFinder find = cx->runtime->securityCallbacks->findObjectPrincipals) + return find(this); + return cx->compartment ? cx->compartment->principals : __null; +} + +inline void +JSObject::nativeSetSlot(unsigned slot, const js::Value &value) +{ + do { } while(0); + do { } while(0); + return setSlot(slot, value); +} + +inline void +JSObject::nativeSetSlotWithType(JSContext *cx, const js::Shape *shape, const js::Value &value) +{ + nativeSetSlot(shape->slot(), value); + js::types::AddTypePropertyId(cx, this, shape->propid(), value); +} + +inline bool +JSObject::nativeContains(JSContext *cx, jsid id) +{ + return nativeLookup(cx, id) != __null; +} + +inline bool +JSObject::nativeContains(JSContext *cx, const js::Shape &shape) +{ + return nativeLookup(cx, shape.propid()) == &shape; +} + +inline bool +JSObject::nativeEmpty() const +{ + return lastProperty()->isEmptyShape(); +} + +inline uint32_t +JSObject::propertyCount() const +{ + return lastProperty()->entryCount(); +} + +inline bool +JSObject::hasShapeTable() const +{ + return lastProperty()->hasTable(); +} + +inline size_t +JSObject::computedSizeOfThisSlotsElements() const +{ + size_t n = sizeOfThis(); + + if (hasDynamicSlots()) + n += numDynamicSlots() * sizeof(js::Value); + + if (hasDynamicElements()) + n += (js::ObjectElements::VALUES_PER_HEADER + getElementsHeader()->capacity) * + sizeof(js::Value); + + return n; +} + +inline void +JSObject::sizeOfExcludingThis(JSMallocSizeOfFun mallocSizeOf, + size_t *slotsSize, size_t *elementsSize, + size_t *miscSize) const +{ + *slotsSize = 0; + if (hasDynamicSlots()) { + *slotsSize += mallocSizeOf(slots); + } + + *elementsSize = 0; + if (hasDynamicElements()) { + *elementsSize += mallocSizeOf(getElementsHeader()); + } + + + *miscSize = 0; + if (isArguments()) { + *miscSize += asArguments().sizeOfMisc(mallocSizeOf); + } else if (isRegExpStatics()) { + *miscSize += js::SizeOfRegExpStaticsData(this, mallocSizeOf); + } +} + +inline JSBool +JSObject::lookupGeneric(JSContext *cx, js::HandleId id, JSObject **objp, JSProperty **propp) +{ + js::RootedObject self(cx, this); + + js::LookupGenericOp op = getOps()->lookupGeneric; + if (op) + return op(cx, self, id, objp, propp); + return js::baseops::LookupProperty(cx, self, id, objp, propp); +} + +inline JSBool +JSObject::lookupProperty(JSContext *cx, js::PropertyName *name, JSObject **objp, JSProperty **propp) +{ + return lookupGeneric(cx, js::RootedId(cx, js::NameToId(name)), objp, propp); +} + +inline JSBool +JSObject::defineGeneric(JSContext *cx, js::HandleId id, const js::Value &value, + JSPropertyOp getter , + JSStrictPropertyOp setter , + unsigned attrs ) +{ + js::RootedObject self(cx, this); + + do { } while(0); + js::DefineGenericOp op = getOps()->defineGeneric; + return (op ? op : js::baseops::DefineProperty)(cx, self, id, &value, getter, setter, attrs); +} + +inline JSBool +JSObject::defineProperty(JSContext *cx, js::PropertyName *name, const js::Value &value, + JSPropertyOp getter , + JSStrictPropertyOp setter , + unsigned attrs ) +{ + return defineGeneric(cx, js::RootedId(cx, js::NameToId(name)), value, getter, setter, attrs); +} + +inline JSBool +JSObject::defineElement(JSContext *cx, uint32_t index, const js::Value &value, + JSPropertyOp getter , + JSStrictPropertyOp setter , + unsigned attrs ) +{ + js::RootedObject self(cx, this); + + js::DefineElementOp op = getOps()->defineElement; + return (op ? op : js::baseops::DefineElement)(cx, self, index, &value, getter, setter, attrs); +} + +inline JSBool +JSObject::defineSpecial(JSContext *cx, js::SpecialId sid, const js::Value &value, + JSPropertyOp getter , + JSStrictPropertyOp setter , + unsigned attrs ) +{ + return defineGeneric(cx, js::RootedId(cx, SPECIALID_TO_JSID(sid)), value, getter, setter, attrs); +} + +inline JSBool +JSObject::lookupElement(JSContext *cx, uint32_t index, JSObject **objp, JSProperty **propp) +{ + js::RootedObject self(cx, this); + + js::LookupElementOp op = getOps()->lookupElement; + return (op ? op : js::baseops::LookupElement)(cx, self, index, objp, propp); +} + +inline JSBool +JSObject::lookupSpecial(JSContext *cx, js::SpecialId sid, JSObject **objp, JSProperty **propp) +{ + return lookupGeneric(cx, js::RootedId(cx, SPECIALID_TO_JSID(sid)), objp, propp); +} + +inline JSBool +JSObject::getElement(JSContext *cx, js::HandleObject receiver, uint32_t index, js::Value *vp) +{ + js::RootedObject self(cx, this); + + js::ElementIdOp op = getOps()->getElement; + if (op) + return op(cx, self, receiver, index, vp); + + js::RootedId id(cx); + if (!js::IndexToId(cx, index, id.address())) + return false; + return self->getGeneric(cx, receiver, id, vp); +} + +inline JSBool +JSObject::getElement(JSContext *cx, uint32_t index, js::Value *vp) +{ + return getElement(cx, js::RootedObject(cx, this), index, vp); +} + +inline JSBool +JSObject::getElementIfPresent(JSContext *cx, js::HandleObject receiver, uint32_t index, js::Value *vp, + bool *present) +{ + js::RootedObject self(cx, this); + + js::ElementIfPresentOp op = getOps()->getElementIfPresent; + if (op) + return op(cx, self, receiver, index, vp, present); + + + + + + + js::RootedId id(cx); + if (!js::IndexToId(cx, index, id.address())) + return false; + + JSObject *obj2; + JSProperty *prop; + if (!self->lookupGeneric(cx, id, &obj2, &prop)) + return false; + + if (!prop) { + *present = false; + js::Debug_SetValueRangeToCrashOnTouch(vp, 1); + return true; + } + + *present = true; + return self->getGeneric(cx, receiver, id, vp); +} + +inline JSBool +JSObject::getSpecial(JSContext *cx, js::HandleObject receiver, js::SpecialId sid, js::Value *vp) +{ + return getGeneric(cx, receiver, js::RootedId(cx, SPECIALID_TO_JSID(sid)), vp); +} + +inline JSBool +JSObject::getGenericAttributes(JSContext *cx, js::HandleId id, unsigned *attrsp) +{ + js::GenericAttributesOp op = getOps()->getGenericAttributes; + return (op ? op : js::baseops::GetAttributes)(cx, js::RootedObject(cx, this), id, attrsp); +} + +inline JSBool +JSObject::getPropertyAttributes(JSContext *cx, js::PropertyName *name, unsigned *attrsp) +{ + return getGenericAttributes(cx, js::RootedId(cx, js::NameToId(name)), attrsp); +} + +inline JSBool +JSObject::getElementAttributes(JSContext *cx, uint32_t index, unsigned *attrsp) +{ + js::RootedId id(cx); + if (!js::IndexToId(cx, index, id.address())) + return false; + return getGenericAttributes(cx, id, attrsp); +} + +inline JSBool +JSObject::getSpecialAttributes(JSContext *cx, js::SpecialId sid, unsigned *attrsp) +{ + return getGenericAttributes(cx, js::RootedId(cx, SPECIALID_TO_JSID(sid)), attrsp); +} + +inline bool +JSObject::isProxy() const +{ + return js::IsProxy(this); +} + +inline bool +JSObject::isCrossCompartmentWrapper() const +{ + return js::IsCrossCompartmentWrapper(this); +} + +inline bool +JSObject::isWrapper() const +{ + return js::IsWrapper(this); +} + +inline js::GlobalObject & +JSObject::global() const +{ + JSObject *obj = const_cast(this); + while (JSObject *parent = obj->getParent()) + obj = parent; + return obj->asGlobal(); +} + +static inline bool +js_IsCallable(const js::Value &v) +{ + return v.isObject() && v.toObject().isCallable(); +} + +namespace js { + +inline JSObject * +GetInnerObject(JSContext *cx, HandleObject obj) +{ + if (JSObjectOp op = obj->getClass()->ext.innerObject) + return op(cx, obj); + return obj; +} + +inline JSObject * +GetOuterObject(JSContext *cx, HandleObject obj) +{ + if (JSObjectOp op = obj->getClass()->ext.outerObject) + return op(cx, obj); + return obj; +} + + + + + + +#define VALUE_IS_XML(v) ((v).isObject() && (v).toObject().isXML()) + +static inline bool +IsXML(const js::Value &v) +{ + return v.isObject() && v.toObject().isXML(); +} + + + + + + + +static inline bool +IsStopIteration(const js::Value &v) +{ + return v.isObject() && v.toObject().isStopIteration(); +} + + +static __attribute__((always_inline)) inline bool +ToPrimitive(JSContext *cx, Value *vp) +{ + if (vp->isPrimitive()) + return true; + return vp->toObject().defaultValue(cx, JSTYPE_VOID, vp); +} + + +static __attribute__((always_inline)) inline bool +ToPrimitive(JSContext *cx, JSType preferredType, Value *vp) +{ + do { } while(0); + if (vp->isPrimitive()) + return true; + return vp->toObject().defaultValue(cx, preferredType, vp); +} + + + + + + +inline bool +IsInternalFunctionObject(JSObject *funobj) +{ + JSFunction *fun = funobj->toFunction(); + return (fun->flags & 0x08) && !funobj->getParent(); +} + +class AutoPropDescArrayRooter : private AutoGCRooter +{ + public: + AutoPropDescArrayRooter(JSContext *cx) + : AutoGCRooter(cx, DESCRIPTORS), descriptors(cx), skip(cx, &descriptors) + { } + + PropDesc *append() { + if (!descriptors.append(PropDesc())) + return __null; + return &descriptors.back(); + } + + bool reserve(size_t n) { + return descriptors.reserve(n); + } + + PropDesc& operator[](size_t i) { + do { } while(0); + return descriptors[i]; + } + + friend void AutoGCRooter::trace(JSTracer *trc); + + private: + PropDescArray descriptors; + SkipRoot skip; +}; + +class AutoPropertyDescriptorRooter : private AutoGCRooter, public PropertyDescriptor +{ + SkipRoot skip; + + AutoPropertyDescriptorRooter *thisDuringConstruction() { return this; } + + public: + AutoPropertyDescriptorRooter(JSContext *cx) + : AutoGCRooter(cx, DESCRIPTOR), skip(cx, thisDuringConstruction()) + { + obj = __null; + attrs = 0; + getter = (PropertyOp) __null; + setter = (StrictPropertyOp) __null; + value.setUndefined(); + } + + AutoPropertyDescriptorRooter(JSContext *cx, PropertyDescriptor *desc) + : AutoGCRooter(cx, DESCRIPTOR), skip(cx, thisDuringConstruction()) + { + obj = desc->obj; + attrs = desc->attrs; + getter = desc->getter; + setter = desc->setter; + value = desc->value; + } + + friend void AutoGCRooter::trace(JSTracer *trc); +}; + +inline void +NewObjectCache::copyCachedToObject(JSObject *dst, JSObject *src) +{ + js_memcpy(dst, src, dst->sizeOfThis()); + + + + +} + +static inline bool +CanBeFinalizedInBackground(gc::AllocKind kind, Class *clasp) +{ + + do { } while(0); + + + + + + + + if (!gc::IsBackgroundAllocKind(kind) && !clasp->finalize) + return true; + + return false; +} + + + + + +JSObject * +NewObjectWithGivenProto(JSContext *cx, js::Class *clasp, JSObject *proto, JSObject *parent, + gc::AllocKind kind); + +inline JSObject * +NewObjectWithGivenProto(JSContext *cx, js::Class *clasp, JSObject *proto, JSObject *parent) +{ + gc::AllocKind kind = gc::GetGCObjectKind(clasp); + return NewObjectWithGivenProto(cx, clasp, proto, parent, kind); +} + +inline JSProtoKey +GetClassProtoKey(js::Class *clasp) +{ + JSProtoKey key = ((JSProtoKey) (((clasp)->flags >> ((8 + 8) + 10)) & (((uint32_t)1 << (6)) - 1))); + if (key != JSProto_Null) + return key; + if (clasp->flags & (1<<((8 + 8)+1))) + return JSProto_Object; + return JSProto_Null; +} + +inline bool +FindProto(JSContext *cx, js::Class *clasp, HandleObject parent, JSObject **proto) +{ + JSProtoKey protoKey = GetClassProtoKey(clasp); + if (!js_GetClassPrototype(cx, parent, protoKey, proto, clasp)) + return false; + if (!(*proto) && !js_GetClassPrototype(cx, parent, JSProto_Object, proto)) + return false; + return true; +} +# 1427 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsobjinlines.h" +JSObject * +NewObjectWithClassProto(JSContext *cx, js::Class *clasp, JSObject *proto, JSObject *parent, + gc::AllocKind kind); + +inline JSObject * +NewObjectWithClassProto(JSContext *cx, js::Class *clasp, JSObject *proto, JSObject *parent) +{ + gc::AllocKind kind = gc::GetGCObjectKind(clasp); + return NewObjectWithClassProto(cx, clasp, proto, parent, kind); +} + + + + + +inline JSObject * +NewBuiltinClassInstance(JSContext *cx, Class *clasp, gc::AllocKind kind) +{ + return NewObjectWithClassProto(cx, clasp, __null, __null, kind); +} + +inline JSObject * +NewBuiltinClassInstance(JSContext *cx, Class *clasp) +{ + gc::AllocKind kind = gc::GetGCObjectKind(clasp); + return NewBuiltinClassInstance(cx, clasp, kind); +} + +inline GlobalObject * +GetCurrentGlobal(JSContext *cx) +{ + JSObject *scopeChain = (cx->hasfp()) ? cx->fp()->scopeChain() : cx->globalObject; + return scopeChain ? &scopeChain->global() : __null; +} + +bool +FindClassPrototype(JSContext *cx, JSObject *scope, JSProtoKey protoKey, JSObject **protop, + Class *clasp); + + + + + +JSObject * +NewObjectWithType(JSContext *cx, HandleTypeObject type, JSObject *parent, gc::AllocKind kind); + + +static inline JSObject * +CopyInitializerObject(JSContext *cx, HandleObject baseobj) +{ + do { } while(0); + do { } while(0); + + gc::AllocKind kind = gc::GetGCObjectFixedSlotsKind(baseobj->numFixedSlots()); + + kind = gc::GetBackgroundAllocKind(kind); + + do { } while(0); + JSObject *obj = NewBuiltinClassInstance(cx, &ObjectClass, kind); + + if (!obj) + return __null; + + if (!obj->setLastProperty(cx, baseobj->lastProperty())) + return __null; + + return obj; +} + +JSObject * +NewReshapedObject(JSContext *cx, HandleTypeObject type, JSObject *parent, + gc::AllocKind kind, const Shape *shape); + + + + + + +static inline gc::AllocKind +GuessObjectGCKind(size_t numSlots) +{ + if (numSlots) + return gc::GetGCObjectKind(numSlots); + return gc::FINALIZE_OBJECT4; +} + +static inline gc::AllocKind +GuessArrayGCKind(size_t numSlots) +{ + if (numSlots) + return gc::GetGCArrayKind(numSlots); + return gc::FINALIZE_OBJECT8; +} + + + + + +static inline gc::AllocKind +NewObjectGCKind(JSContext *cx, js::Class *clasp) +{ + if (clasp == &ArrayClass || clasp == &SlowArrayClass) + return gc::FINALIZE_OBJECT8; + if (clasp == &FunctionClass) + return gc::FINALIZE_OBJECT2; + return gc::FINALIZE_OBJECT4; +} + + + + + +inline bool +PreallocateObjectDynamicSlots(JSContext *cx, Shape *shape, HeapSlot **slots) +{ + if (size_t count = JSObject::dynamicSlotsCount(shape->numFixedSlots(), shape->slotSpan())) { + *slots = (HeapSlot *) cx->malloc_(count * sizeof(HeapSlot)); + if (!*slots) + return false; + Debug_SetSlotRangeToCrashOnTouch(*slots, count); + return true; + } + *slots = __null; + return true; +} + +inline bool +DefineConstructorAndPrototype(JSContext *cx, GlobalObject *global, + JSProtoKey key, JSObject *ctor, JSObject *proto) +{ + do { } while(0); + do { } while(0); + do { } while(0); + + jsid id = NameToId(cx->runtime->atomState.classAtoms[key]); + do { } while(0); + + + global->setSlot(key, ObjectValue(*ctor)); + global->setSlot(key + JSProto_LIMIT, ObjectValue(*proto)); + global->setSlot(key + JSProto_LIMIT * 2, ObjectValue(*ctor)); + + types::AddTypePropertyId(cx, global, id, ObjectValue(*ctor)); + if (!global->addDataProperty(cx, id, key + JSProto_LIMIT * 2, 0)) { + global->setSlot(key, UndefinedValue()); + global->setSlot(key + JSProto_LIMIT, UndefinedValue()); + global->setSlot(key + JSProto_LIMIT * 2, UndefinedValue()); + return false; + } + + return true; +} + +inline bool +ObjectClassIs(JSObject &obj, ESClassValue classValue, JSContext *cx) +{ + if ((__builtin_expect((obj.isProxy()), 0))) + return Proxy::objectClassIs(&obj, classValue, cx); + + switch (classValue) { + case ESClass_Array: return obj.isArray(); + case ESClass_Number: return obj.isNumber(); + case ESClass_String: return obj.isString(); + case ESClass_Boolean: return obj.isBoolean(); + case ESClass_RegExp: return obj.isRegExp(); + case ESClass_ArrayBuffer: return obj.isArrayBuffer(); + } + __builtin_unreachable(); + return false; +} + +inline bool +IsObjectWithClass(const Value &v, ESClassValue classValue, JSContext *cx) +{ + if (!v.isObject()) + return false; + return ObjectClassIs(v.toObject(), classValue, cx); +} + +static __attribute__((always_inline)) inline bool +ValueIsSpecial(JSObject *obj, Value *propval, SpecialId *sidp, JSContext *cx) +{ + + if (!propval->isObject()) + return false; + + if (obj->isXML()) { + *sidp = SpecialId(propval->toObject()); + return true; + } + + JSObject &propobj = propval->toObject(); + JSAtom *name; + if (propobj.isQName() && GetLocalNameFromFunctionQName(&propobj, &name, cx)) { + propval->setString(name); + return false; + } + + + return false; +} + +JSObject * +DefineConstructorAndPrototype(JSContext *cx, HandleObject obj, JSProtoKey key, HandleAtom atom, + JSObject *protoProto, Class *clasp, + Native constructor, unsigned nargs, + JSPropertySpec *ps, JSFunctionSpec *fs, + JSPropertySpec *static_ps, JSFunctionSpec *static_fs, + JSObject **ctorp = __null, + gc::AllocKind ctorKind = JSFunction::FinalizeKind); + +} + +extern JSObject * +js_InitClass(JSContext *cx, js::HandleObject obj, JSObject *parent_proto, + js::Class *clasp, JSNative constructor, unsigned nargs, + JSPropertySpec *ps, JSFunctionSpec *fs, + JSPropertySpec *static_ps, JSFunctionSpec *static_fs, + JSObject **ctorp = __null, + js::gc::AllocKind ctorKind = JSFunction::FinalizeKind); + + + + + + + +extern bool +js_PurgeScopeChainHelper(JSContext *cx, JSObject *obj, jsid id); + +inline bool +js_PurgeScopeChain(JSContext *cx, JSObject *obj, jsid id) +{ + if (obj->isDelegate()) + return js_PurgeScopeChainHelper(cx, obj, id); + return true; +} + +inline void +js::DestroyIdArray(FreeOp *fop, JSIdArray *ida) +{ + fop->free_(ida); +} +# 13 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" 2 + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" 1 +# 9 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" +#define Debugger_h__ + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jsclist.h" 1 +# 15 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" 2 + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/jswrapper.h" 1 +# 20 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" 2 + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/GlobalObject.h" 1 +# 24 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" 2 + +namespace js { + +class Debugger { + friend class Breakpoint; + friend JSBool (::JS_DefineDebuggerObject)(JSContext *cx, JSObject *obj); + + public: + enum Hook { + OnDebuggerStatement, + OnExceptionUnwind, + OnNewScript, + OnEnterFrame, + HookCount + }; + + enum { + JSSLOT_DEBUG_PROTO_START, + JSSLOT_DEBUG_FRAME_PROTO = JSSLOT_DEBUG_PROTO_START, + JSSLOT_DEBUG_ENV_PROTO, + JSSLOT_DEBUG_OBJECT_PROTO, + JSSLOT_DEBUG_SCRIPT_PROTO, + JSSLOT_DEBUG_PROTO_STOP, + JSSLOT_DEBUG_HOOK_START = JSSLOT_DEBUG_PROTO_STOP, + JSSLOT_DEBUG_HOOK_STOP = JSSLOT_DEBUG_HOOK_START + HookCount, + JSSLOT_DEBUG_COUNT = JSSLOT_DEBUG_HOOK_STOP + }; + + private: + JSCList link; + HeapPtrObject object; + GlobalObjectSet debuggees; + js::HeapPtrObject uncaughtExceptionHook; + bool enabled; + JSCList breakpoints; +# 73 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" + typedef HashMap, RuntimeAllocPolicy> + FrameMap; + FrameMap frames; + + + typedef WeakMap ScriptWeakMap; + ScriptWeakMap scripts; + + + typedef WeakMap ObjectWeakMap; + ObjectWeakMap objects; + + + ObjectWeakMap environments; + + class FrameRange; + class ScriptQuery; + + bool addDebuggeeGlobal(JSContext *cx, Handle obj); + void removeDebuggeeGlobal(FreeOp *fop, GlobalObject *global, + GlobalObjectSet::Enum *compartmentEnum, + GlobalObjectSet::Enum *debugEnum); +# 110 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" + JSTrapStatus handleUncaughtException(AutoCompartment &ac, Value *vp, bool callHook); +# 137 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" + JSTrapStatus parseResumptionValue(AutoCompartment &ac, bool ok, const Value &rv, Value *vp, + bool callHook = true); + + JSObject *unwrapDebuggeeArgument(JSContext *cx, const Value &v); + + static void traceObject(JSTracer *trc, JSObject *obj); + void trace(JSTracer *trc); + static void finalize(FreeOp *fop, JSObject *obj); + void markKeysInCompartment(JSTracer *tracer); + + static Class jsclass; + + static Debugger *fromThisValue(JSContext *cx, const CallArgs &ca, const char *fnname); + static JSBool getEnabled(JSContext *cx, unsigned argc, Value *vp); + static JSBool setEnabled(JSContext *cx, unsigned argc, Value *vp); + static JSBool getHookImpl(JSContext *cx, unsigned argc, Value *vp, Hook which); + static JSBool setHookImpl(JSContext *cx, unsigned argc, Value *vp, Hook which); + static JSBool getOnDebuggerStatement(JSContext *cx, unsigned argc, Value *vp); + static JSBool setOnDebuggerStatement(JSContext *cx, unsigned argc, Value *vp); + static JSBool getOnExceptionUnwind(JSContext *cx, unsigned argc, Value *vp); + static JSBool setOnExceptionUnwind(JSContext *cx, unsigned argc, Value *vp); + static JSBool getOnNewScript(JSContext *cx, unsigned argc, Value *vp); + static JSBool setOnNewScript(JSContext *cx, unsigned argc, Value *vp); + static JSBool getOnEnterFrame(JSContext *cx, unsigned argc, Value *vp); + static JSBool setOnEnterFrame(JSContext *cx, unsigned argc, Value *vp); + static JSBool getUncaughtExceptionHook(JSContext *cx, unsigned argc, Value *vp); + static JSBool setUncaughtExceptionHook(JSContext *cx, unsigned argc, Value *vp); + static JSBool addDebuggee(JSContext *cx, unsigned argc, Value *vp); + static JSBool removeDebuggee(JSContext *cx, unsigned argc, Value *vp); + static JSBool hasDebuggee(JSContext *cx, unsigned argc, Value *vp); + static JSBool getDebuggees(JSContext *cx, unsigned argc, Value *vp); + static JSBool getNewestFrame(JSContext *cx, unsigned argc, Value *vp); + static JSBool clearAllBreakpoints(JSContext *cx, unsigned argc, Value *vp); + static JSBool findScripts(JSContext *cx, unsigned argc, Value *vp); + static JSBool wrap(JSContext *cx, unsigned argc, Value *vp); + static JSBool construct(JSContext *cx, unsigned argc, Value *vp); + static JSPropertySpec properties[]; + static JSFunctionSpec methods[]; + + JSObject *getHook(Hook hook) const; + bool hasAnyLiveHooks() const; + + static JSTrapStatus slowPathOnEnterFrame(JSContext *cx, Value *vp); + static bool slowPathOnLeaveFrame(JSContext *cx, bool ok); + static void slowPathOnNewScript(JSContext *cx, JSScript *script, + GlobalObject *compileAndGoGlobal); + static JSTrapStatus dispatchHook(JSContext *cx, Value *vp, Hook which); + + JSTrapStatus fireDebuggerStatement(JSContext *cx, Value *vp); + JSTrapStatus fireExceptionUnwind(JSContext *cx, Value *vp); + JSTrapStatus fireEnterFrame(JSContext *cx, Value *vp); + + + + + + JSObject *newDebuggerScript(JSContext *cx, Handle script); + + + + + + void fireNewScript(JSContext *cx, Handle script); + + static inline Debugger *fromLinks(JSCList *links); + inline Breakpoint *firstBreakpoint() const; + + public: + Debugger(JSContext *cx, JSObject *dbg); + ~Debugger(); + + bool init(JSContext *cx); + inline const js::HeapPtrObject &toJSObject() const; + inline js::HeapPtrObject &toJSObjectRef(); + static inline Debugger *fromJSObject(JSObject *obj); + static Debugger *fromChildJSObject(JSObject *obj); +# 231 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" + static void markCrossCompartmentDebuggerObjectReferents(JSTracer *tracer); + static bool markAllIteratively(GCMarker *trc); + static void sweepAll(FreeOp *fop); + static void detachAllDebuggersFromGlobal(FreeOp *fop, GlobalObject *global, + GlobalObjectSet::Enum *compartmentEnum); + + static inline JSTrapStatus onEnterFrame(JSContext *cx, Value *vp); + static inline bool onLeaveFrame(JSContext *cx, bool ok); + static inline JSTrapStatus onDebuggerStatement(JSContext *cx, Value *vp); + static inline JSTrapStatus onExceptionUnwind(JSContext *cx, Value *vp); + static inline void onNewScript(JSContext *cx, JSScript *script, + GlobalObject *compileAndGoGlobal); + static JSTrapStatus onTrap(JSContext *cx, Value *vp); + static JSTrapStatus onSingleStep(JSContext *cx, Value *vp); + + + + inline bool observesEnterFrame() const; + inline bool observesNewScript() const; + inline bool observesGlobal(GlobalObject *global) const; + inline bool observesFrame(StackFrame *fp) const; + bool observesScript(JSScript *script) const; + + + + + + + bool wrapEnvironment(JSContext *cx, Handle env, Value *vp); +# 270 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" + bool wrapDebuggeeValue(JSContext *cx, Value *vp); +# 299 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" + bool unwrapDebuggeeValue(JSContext *cx, Value *vp); + + + bool getScriptFrame(JSContext *cx, StackFrame *fp, Value *vp); +# 311 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" + static void resultToCompletion(JSContext *cx, bool ok, const Value &rv, + JSTrapStatus *status, Value *value); + + + + + + + bool newCompletionValue(JSContext *cx, JSTrapStatus status, Value value, Value *result); +# 333 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" + bool receiveCompletionValue(AutoCompartment &ac, bool ok, Value val, Value *vp); + + + + + + + JSObject *wrapScript(JSContext *cx, Handle script); + + private: + Debugger(const Debugger &) ; + Debugger & operator=(const Debugger &) ; +}; + +class BreakpointSite { + friend class Breakpoint; + friend struct ::JSCompartment; + friend struct ::JSScript; + friend class Debugger; + + public: + JSScript *script; + jsbytecode * const pc; + + private: + + + + + + GlobalObject *scriptGlobal; + + JSCList breakpoints; + size_t enabledCount; + JSTrapHandler trapHandler; + HeapValue trapClosure; + + void recompile(FreeOp *fop); + + public: + BreakpointSite(JSScript *script, jsbytecode *pc); + Breakpoint *firstBreakpoint() const; + bool hasBreakpoint(Breakpoint *bp); + bool hasTrap() const { return !!trapHandler; } + GlobalObject *getScriptGlobal() const { return scriptGlobal; } + + void inc(FreeOp *fop); + void dec(FreeOp *fop); + void setTrap(FreeOp *fop, JSTrapHandler handler, const Value &closure); + void clearTrap(FreeOp *fop, JSTrapHandler *handlerp = __null, Value *closurep = __null); + void destroyIfEmpty(FreeOp *fop); +}; +# 404 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/Debugger.h" +class Breakpoint { + friend struct ::JSCompartment; + friend class Debugger; + + public: + Debugger * const debugger; + BreakpointSite * const site; + private: + js::HeapPtrObject handler; + JSCList debuggerLinks; + JSCList siteLinks; + + public: + static Breakpoint *fromDebuggerLinks(JSCList *links); + static Breakpoint *fromSiteLinks(JSCList *links); + Breakpoint(Debugger *debugger, BreakpointSite *site, JSObject *handler); + void destroy(FreeOp *fop); + Breakpoint *nextInDebugger(); + Breakpoint *nextInSite(); + const HeapPtrObject &getHandler() const { return handler; } + HeapPtrObject &getHandlerRef() { return handler; } +}; + +Debugger * +Debugger::fromLinks(JSCList *links) +{ + unsigned char *p = reinterpret_cast(links); + return reinterpret_cast(p - __builtin_offsetof (Debugger, link)); +} + +Breakpoint * +Debugger::firstBreakpoint() const +{ + if (((&breakpoints)->next == (&breakpoints))) + return __null; + return Breakpoint::fromDebuggerLinks(((&breakpoints)->next)); +} + +const js::HeapPtrObject & +Debugger::toJSObject() const +{ + do { } while(0); + return object; +} + +js::HeapPtrObject & +Debugger::toJSObjectRef() +{ + do { } while(0); + return object; +} + +Debugger * +Debugger::fromJSObject(JSObject *obj) +{ + do { } while(0); + return (Debugger *) obj->getPrivate(); +} + +bool +Debugger::observesEnterFrame() const +{ + return enabled && getHook(OnEnterFrame); +} + +bool +Debugger::observesNewScript() const +{ + return enabled && getHook(OnNewScript); +} + +bool +Debugger::observesGlobal(GlobalObject *global) const +{ + return debuggees.has(global); +} + +bool +Debugger::observesFrame(StackFrame *fp) const +{ + return !fp->isDummyFrame() && observesGlobal(&fp->global()); +} + +JSTrapStatus +Debugger::onEnterFrame(JSContext *cx, Value *vp) +{ + if (cx->compartment->getDebuggees().empty()) + return JSTRAP_CONTINUE; + return slowPathOnEnterFrame(cx, vp); +} + +bool +Debugger::onLeaveFrame(JSContext *cx, bool ok) +{ + + bool evalTraps = cx->fp()->isEvalFrame() && + cx->fp()->script()->hasAnyBreakpointsOrStepMode(); + if (!cx->compartment->getDebuggees().empty() || evalTraps) + ok = slowPathOnLeaveFrame(cx, ok); + return ok; +} + +JSTrapStatus +Debugger::onDebuggerStatement(JSContext *cx, Value *vp) +{ + return cx->compartment->getDebuggees().empty() + ? JSTRAP_CONTINUE + : dispatchHook(cx, vp, OnDebuggerStatement); +} + +JSTrapStatus +Debugger::onExceptionUnwind(JSContext *cx, Value *vp) +{ + return cx->compartment->getDebuggees().empty() + ? JSTRAP_CONTINUE + : dispatchHook(cx, vp, OnExceptionUnwind); +} + +void +Debugger::onNewScript(JSContext *cx, JSScript *script, GlobalObject *compileAndGoGlobal) +{ + do { } while (0); + do { } while (0); + if (!script->compartment()->getDebuggees().empty()) + slowPathOnNewScript(cx, script, compileAndGoGlobal); +} + +extern JSBool +EvaluateInEnv(JSContext *cx, Handle env, StackFrame *fp, const jschar *chars, + unsigned length, const char *filename, unsigned lineno, Value *rval); + +} +# 17 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" 2 + + + + +# 1 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl-inl.h" 1 +# 22 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" 2 + +using namespace js; + +PropDesc::PropDesc() + : pd_(UndefinedValue()), + value_(UndefinedValue()), + get_(UndefinedValue()), + set_(UndefinedValue()), + attrs(0), + hasGet_(false), + hasSet_(false), + hasValue_(false), + hasWritable_(false), + hasEnumerable_(false), + hasConfigurable_(false), + isUndefined_(true) +{ +} + +bool +PropDesc::checkGetter(JSContext *cx) +{ + if (hasGet_) { + if (!js_IsCallable(get_) && !get_.isUndefined()) { + JS_ReportErrorNumber(cx, js_GetErrorMessage, __null, JSMSG_BAD_GET_SET_FIELD, + js_getter_str); + return false; + } + } + return true; +} + +bool +PropDesc::checkSetter(JSContext *cx) +{ + if (hasSet_) { + if (!js_IsCallable(set_) && !set_.isUndefined()) { + JS_ReportErrorNumber(cx, js_GetErrorMessage, __null, JSMSG_BAD_GET_SET_FIELD, + js_setter_str); + return false; + } + } + return true; +} + +static bool +CheckArgCompartment(JSContext *cx, JSObject *obj, const Value &v, + const char *methodname, const char *propname) +{ + if (v.isObject() && v.toObject().compartment() != obj->compartment()) { + JS_ReportErrorNumber(cx, js_GetErrorMessage, __null, JSMSG_DEBUG_COMPARTMENT_MISMATCH, + methodname, propname); + return false; + } + return true; +} + + + + + +bool +PropDesc::unwrapDebuggerObjectsInto(JSContext *cx, Debugger *dbg, JSObject *obj, + PropDesc *unwrapped) const +{ + do { } while(0); + + *unwrapped = *this; + + if (unwrapped->hasValue()) { + if (!dbg->unwrapDebuggeeValue(cx, &unwrapped->value_) || + !CheckArgCompartment(cx, obj, unwrapped->value_, "defineProperty", "value")) + { + return false; + } + } + + if (unwrapped->hasGet()) { + if (!dbg->unwrapDebuggeeValue(cx, &unwrapped->get_) || + !CheckArgCompartment(cx, obj, unwrapped->get_, "defineProperty", "get")) + { + return false; + } + } + + if (unwrapped->hasSet()) { + if (!dbg->unwrapDebuggeeValue(cx, &unwrapped->set_) || + !CheckArgCompartment(cx, obj, unwrapped->set_, "defineProperty", "set")) + { + return false; + } + } + + return true; +} + + + + + + +bool +PropDesc::wrapInto(JSContext *cx, JSObject *obj, const jsid &id, jsid *wrappedId, + PropDesc *desc) const +{ + do { } while(0); + + JSCompartment *comp = cx->compartment; + + *wrappedId = id; + if (!comp->wrapId(cx, wrappedId)) + return false; + + *desc = *this; + if (!comp->wrap(cx, &desc->value_)) + return false; + if (!comp->wrap(cx, &desc->get_)) + return false; + if (!comp->wrap(cx, &desc->set_)) + return false; + return !obj->isProxy() || desc->makeObject(cx); +} + +static ObjectElements emptyElementsHeader(0, 0); + + +HeapSlot *js::emptyObjectElements = + reinterpret_cast(uintptr_t(&emptyElementsHeader) + sizeof(ObjectElements)); +# 217 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" +void +js::ObjectImpl::initSlotRange(uint32_t start, const Value *vector, uint32_t length) +{ + JSCompartment *comp = compartment(); + HeapSlot *fixedStart, *fixedEnd, *slotsStart, *slotsEnd; + getSlotRange(start, length, &fixedStart, &fixedEnd, &slotsStart, &slotsEnd); + for (HeapSlot *sp = fixedStart; sp < fixedEnd; sp++) + sp->init(comp, this->asObjectPtr(), start++, *vector++); + for (HeapSlot *sp = slotsStart; sp < slotsEnd; sp++) + sp->init(comp, this->asObjectPtr(), start++, *vector++); +} + +void +js::ObjectImpl::copySlotRange(uint32_t start, const Value *vector, uint32_t length) +{ + JSCompartment *comp = compartment(); + HeapSlot *fixedStart, *fixedEnd, *slotsStart, *slotsEnd; + getSlotRange(start, length, &fixedStart, &fixedEnd, &slotsStart, &slotsEnd); + for (HeapSlot *sp = fixedStart; sp < fixedEnd; sp++) + sp->set(comp, this->asObjectPtr(), start++, *vector++); + for (HeapSlot *sp = slotsStart; sp < slotsEnd; sp++) + sp->set(comp, this->asObjectPtr(), start++, *vector++); +} +# 260 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" +const Shape * +js::ObjectImpl::nativeLookup(JSContext *cx, jsid id) +{ + do { } while(0); + Shape **spp; + return Shape::search(cx, lastProperty(), id, &spp); +} +# 277 "/var/tmp/portage/www-client/firefox-15.0.1/work/mozilla-release/js/src/vm/ObjectImpl.cpp" +void +js::ObjectImpl::markChildren(JSTracer *trc) +{ + MarkTypeObject(trc, &type_, "type"); + + MarkShape(trc, &shape_, "shape"); + + Class *clasp = shape_->getObjectClass(); + JSObject *obj = asObjectPtr(); + if (clasp->trace) + clasp->trace(trc, obj); + + if (shape_->isNative()) + MarkObjectSlots(trc, obj, 0, obj->slotSpan()); +} + +bool +DenseElementsHeader::getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc) +{ + do { } while(0); + + uint32_t len = initializedLength(); + if (index >= len) { + *desc = PropDesc::undefined(); + return true; + } + + HeapSlot &slot = obj->elements[index]; + if (slot.isMagic(JS_ARRAY_HOLE)) { + *desc = PropDesc::undefined(); + return true; + } + + *desc = PropDesc(slot, PropDesc::Writable, PropDesc::Enumerable, PropDesc::Configurable); + return true; +} + +bool +SparseElementsHeader::getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc) +{ + do { } while(0); + + __builtin_unreachable(); + return false; +} + +template +static Value +ElementToValue(const T &t) +{ + return NumberValue(t); +} + +template<> + Value +ElementToValue(const uint8_clamped &u) +{ + return NumberValue(uint8_t(u)); +} + +template +bool +TypedElementsHeader::getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, + PropDesc *desc) +{ + do { } while(0); + + if (index >= length()) { + *desc = PropDesc::undefined(); + return true; + } + + *desc = PropDesc(ElementToValue(getElement(index)), PropDesc::Writable, + PropDesc::Enumerable, PropDesc::Configurable); + return false; +} + +bool +ArrayBufferElementsHeader::getOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, + PropDesc *desc) +{ + do { } while(0); + + __builtin_unreachable(); + return false; +} + +bool +SparseElementsHeader::defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, + const PropDesc &desc, bool shouldThrow, bool *succeeded) +{ + do { } while(0); + + __builtin_unreachable(); + return false; +} + +bool +DenseElementsHeader::defineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, + const PropDesc &desc, bool shouldThrow, bool *succeeded) +{ + do { } while(0); + + do { } while (0); + do { } while (0); + + + + + + if (desc.hasGet() || desc.hasSet() || + (desc.hasEnumerable() && !desc.enumerable()) || + (desc.hasConfigurable() && !desc.configurable()) || + (desc.hasWritable() && !desc.writable())) + { + if (!obj->makeElementsSparse(cx)) + return false; + SparseElementsHeader &elts = obj->elementsHeader().asSparseElements(); + return elts.defineElement(cx, obj, index, desc, shouldThrow, succeeded); + } + + + uint32_t initLen = initializedLength(); + if (index < initLen) { + HeapSlot &slot = obj->elements[index]; + if (!slot.isMagic(JS_ARRAY_HOLE)) { + + + + + + } + } + + + + + + if (!obj->isExtensible()) { + *succeeded = false; + if (!shouldThrow) + return true; + ((void)(js_ReportValueErrorFlags(cx, 0x0, JSMSG_OBJECT_NOT_EXTENSIBLE, 0, ObjectValue(*obj), __null, __null, __null))) + + + ; + return false; + } + + + ObjectImpl::DenseElementsResult res = obj->ensureDenseElementsInitialized(cx, index, 0); + + + if (res == ObjectImpl::Failure) + return false; + + + if (res == ObjectImpl::ConvertToSparse) { + if (!obj->makeElementsSparse(cx)) + return false; + SparseElementsHeader &elts = obj->elementsHeader().asSparseElements(); + return elts.defineElement(cx, obj, index, desc, shouldThrow, succeeded); + } + + + do { } while(0); + obj->elements[index].set(obj->asObjectPtr(), index, desc.value()); + *succeeded = true; + return true; +} + +static JSObject * +ArrayBufferDelegate(JSContext *cx, ObjectImpl *obj) +{ + do { } while(0); + if (obj->getPrivate()) + return static_cast(obj->getPrivate()); + JSObject *delegate = NewObjectWithGivenProto(cx, &ObjectClass, obj->getProto(), __null); + obj->setPrivate(delegate); + return delegate; +} + +template +bool +TypedElementsHeader::defineElement(JSContext *cx, ObjectImpl *obj, + uint32_t index, const PropDesc &desc, bool shouldThrow, + bool *succeeded) +{ + + *succeeded = false; + js_ReportValueErrorFlags(cx, 0x0, JSMSG_OBJECT_NOT_EXTENSIBLE, + 0, + ObjectValue(*obj), + __null, __null, __null); + return false; +} + +bool +ArrayBufferElementsHeader::defineElement(JSContext *cx, ObjectImpl *obj, + uint32_t index, const PropDesc &desc, bool shouldThrow, + bool *succeeded) +{ + do { } while(0); + + JSObject *delegate = ArrayBufferDelegate(cx, obj); + if (!delegate) + return false; + return DefineElement(cx, delegate, index, desc, shouldThrow, succeeded); +} + +bool +js::GetOwnElement(JSContext *cx, ObjectImpl *obj, uint32_t index, PropDesc *desc) +{ + ElementsHeader &header = obj->elementsHeader(); + switch (header.kind()) { + case DenseElements: + return header.asDenseElements().getOwnElement(cx, obj, index, desc); + case SparseElements: + return header.asSparseElements().getOwnElement(cx, obj, index, desc); + case Uint8Elements: + return header.asUint8Elements().getOwnElement(cx, obj, index, desc); + case Int8Elements: + return header.asInt8Elements().getOwnElement(cx, obj, index, desc); + case Uint16Elements: + return header.asUint16Elements().getOwnElement(cx, obj, index, desc); + case Int16Elements: + return header.asInt16Elements().getOwnElement(cx, obj, index, desc); + case Uint32Elements: + return header.asUint32Elements().getOwnElement(cx, obj, index, desc); + case Int32Elements: + return header.asInt32Elements().getOwnElement(cx, obj, index, desc); + case Uint8ClampedElements: + return header.asUint8ClampedElements().getOwnElement(cx, obj, index, desc); + case Float32Elements: + return header.asFloat32Elements().getOwnElement(cx, obj, index, desc); + case Float64Elements: + return header.asFloat64Elements().getOwnElement(cx, obj, index, desc); + case ArrayBufferElements: + return header.asArrayBufferElements().getOwnElement(cx, obj, index, desc); + } + + __builtin_unreachable(); + return false; +} + +bool +js::GetElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, + Value *vp) +{ + __builtin_unreachable(); + + do { + do { } while(0); + + if (static_cast(obj)->isProxy()) { + __builtin_unreachable(); + return false; + } + + PropDesc desc; + if (!GetOwnElement(cx, obj, index, &desc)) + return false; + + + if (desc.isUndefined()) { + obj = obj->getProto(); + if (obj) + continue; + + vp->setUndefined(); + return true; + } + + + if (desc.isDataDescriptor()) { + *vp = desc.value(); + return true; + } + + + if (desc.isAccessorDescriptor()) { + Value get = desc.getterValue(); + if (get.isUndefined()) { + vp->setUndefined(); + return true; + } + + InvokeArgsGuard args; + if (!cx->stack.pushInvokeArgs(cx, 0, &args)) + return false; + + + args.calleev() = get; + args.thisv() = ObjectValue(*receiver); + + bool ok = Invoke(cx, args); + *vp = args.rval(); + return ok; + } + + + __builtin_unreachable(); + return false; + } while (false); +} + +bool +js::HasElement(JSContext *cx, ObjectImpl *obj, uint32_t index, bool *found) +{ + __builtin_unreachable(); + + do { + do { } while(0); + + if (static_cast(obj)->isProxy()) { + __builtin_unreachable(); + return false; + } + + PropDesc prop; + if (!GetOwnElement(cx, obj, index, &prop)) + return false; + + if (!prop.isUndefined()) { + *found = true; + return true; + } + + obj = obj->getProto(); + if (obj) + continue; + + *found = false; + return true; + } while (false); +} + +bool +js::DefineElement(JSContext *cx, ObjectImpl *obj, uint32_t index, const PropDesc &desc, + bool shouldThrow, bool *succeeded) +{ + __builtin_unreachable(); + + ElementsHeader &header = obj->elementsHeader(); + + switch (header.kind()) { + case DenseElements: + return header.asDenseElements().defineElement(cx, obj, index, desc, shouldThrow, + succeeded); + case SparseElements: + return header.asSparseElements().defineElement(cx, obj, index, desc, shouldThrow, + succeeded); + case Uint8Elements: + return header.asUint8Elements().defineElement(cx, obj, index, desc, shouldThrow, + succeeded); + case Int8Elements: + return header.asInt8Elements().defineElement(cx, obj, index, desc, shouldThrow, + succeeded); + case Uint16Elements: + return header.asUint16Elements().defineElement(cx, obj, index, desc, shouldThrow, + succeeded); + case Int16Elements: + return header.asInt16Elements().defineElement(cx, obj, index, desc, shouldThrow, + succeeded); + case Uint32Elements: + return header.asUint32Elements().defineElement(cx, obj, index, desc, shouldThrow, + succeeded); + case Int32Elements: + return header.asInt32Elements().defineElement(cx, obj, index, desc, shouldThrow, + succeeded); + case Uint8ClampedElements: + return header.asUint8ClampedElements().defineElement(cx, obj, index, desc, shouldThrow, + succeeded); + case Float32Elements: + return header.asFloat32Elements().defineElement(cx, obj, index, desc, shouldThrow, + succeeded); + case Float64Elements: + return header.asFloat64Elements().defineElement(cx, obj, index, desc, shouldThrow, + succeeded); + case ArrayBufferElements: + return header.asArrayBufferElements().defineElement(cx, obj, index, desc, shouldThrow, + succeeded); + } + + __builtin_unreachable(); + return false; +} + +bool +SparseElementsHeader::setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, + uint32_t index, const Value &v, bool *succeeded) +{ + do { } while(0); + + __builtin_unreachable(); + return false; +} + +bool +DenseElementsHeader::setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, + uint32_t index, const Value &v, bool *succeeded) +{ + do { } while(0); + + __builtin_unreachable(); + return false; +} + +template +bool +TypedElementsHeader::setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, + uint32_t index, const Value &v, bool *succeeded) +{ + do { } while(0); + + uint32_t len = length(); + if (index >= len) { + + + + + *succeeded = true; + return true; + } + + + double d; + if (v.isNumber()) { + d = v.toNumber(); + } else if (v.isNull()) { + d = 0.0; + } else if (v.isPrimitive()) { + if (v.isString()) { + if (!ToNumber(cx, v, &d)) + return false; + } else if (v.isUndefined()) { + d = js_NaN; + } else { + d = double(v.toBoolean()); + } + } else { + + d = js_NaN; + } + + assign(index, d); + *succeeded = true; + return true; +} + +bool +ArrayBufferElementsHeader::setElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, + uint32_t index, const Value &v, bool *succeeded) +{ + do { } while(0); + + JSObject *delegate = ArrayBufferDelegate(cx, obj); + if (!delegate) + return false; + return SetElement(cx, obj, receiver, index, v, succeeded); +} + +bool +js::SetElement(JSContext *cx, ObjectImpl *obj, ObjectImpl *receiver, uint32_t index, + const Value &v, bool *succeeded) +{ + __builtin_unreachable(); + + do { + do { } while(0); + + if (static_cast(obj)->isProxy()) { + __builtin_unreachable(); + return false; + } + + PropDesc ownDesc; + if (!GetOwnElement(cx, obj, index, &ownDesc)) + return false; + + if (!ownDesc.isUndefined()) { + if (ownDesc.isDataDescriptor()) { + if (!ownDesc.writable()) { + *succeeded = false; + return true; + } + + if (receiver == obj) { + PropDesc updateDesc = PropDesc::valueOnly(v); + return DefineElement(cx, receiver, index, updateDesc, false, succeeded); + } + + PropDesc newDesc; + return DefineElement(cx, receiver, index, newDesc, false, succeeded); + } + + if (ownDesc.isAccessorDescriptor()) { + Value setter = ownDesc.setterValue(); + if (setter.isUndefined()) { + *succeeded = false; + return true; + } + + InvokeArgsGuard args; + if (!cx->stack.pushInvokeArgs(cx, 1, &args)) + return false; + + + args.calleev() = setter; + args.thisv() = ObjectValue(*receiver); + args[0] = v; + + *succeeded = true; + return Invoke(cx, args); + } + + __builtin_unreachable(); + return false; + } + + obj = obj->getProto(); + if (obj) + continue; + + PropDesc newDesc(v, PropDesc::Writable, PropDesc::Enumerable, PropDesc::Configurable); + return DefineElement(cx, receiver, index, newDesc, false, succeeded); + } while (false); +} diff --git a/434452/reduce-ice b/434452/reduce-ice new file mode 100755 index 0000000..a183ee4 --- /dev/null +++ b/434452/reduce-ice @@ -0,0 +1,13 @@ +#!/bin/bash +# +# Run like: +# multidelta -level=# ./reduce-ice $FILE +# levels: 0 0 1 1 2 2 10 10 +# + +FILE=ObjectImpl.ii +CC=armv7a-unknown-linux-gnueabi-g++-4.5.3 +CFLAGS="-O2" +STRING="internal compiler error: in merge_if_block, at ifcvt.c:3005" + +$CC -pipe -c $CFLAGS $FILE -o /dev/null 2>&1 | grep "$STRING" diff --git a/434908/op_helper.i b/434908/op_helper.i new file mode 100644 index 0000000..1314a39 --- /dev/null +++ b/434908/op_helper.i @@ -0,0 +1,30286 @@ +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" +# 1 "" +# 1 "" +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" +# 20 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" +# 1 "/usr/include/math.h" 1 3 4 +# 28 "/usr/include/math.h" 3 4 +# 1 "/usr/include/features.h" 1 3 4 +# 358 "/usr/include/features.h" 3 4 +# 1 "/usr/include/sys/cdefs.h" 1 3 4 +# 378 "/usr/include/sys/cdefs.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 379 "/usr/include/sys/cdefs.h" 2 3 4 +# 359 "/usr/include/features.h" 2 3 4 +# 382 "/usr/include/features.h" 3 4 +# 1 "/usr/include/gnu/stubs.h" 1 3 4 + + + +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 5 "/usr/include/gnu/stubs.h" 2 3 4 + + +# 1 "/usr/include/gnu/stubs-32.h" 1 3 4 +# 8 "/usr/include/gnu/stubs.h" 2 3 4 +# 383 "/usr/include/features.h" 2 3 4 +# 29 "/usr/include/math.h" 2 3 4 + + + + + +# 1 "/usr/include/bits/huge_val.h" 1 3 4 +# 35 "/usr/include/math.h" 2 3 4 + +# 1 "/usr/include/bits/huge_valf.h" 1 3 4 +# 37 "/usr/include/math.h" 2 3 4 +# 1 "/usr/include/bits/huge_vall.h" 1 3 4 +# 38 "/usr/include/math.h" 2 3 4 + + +# 1 "/usr/include/bits/inf.h" 1 3 4 +# 41 "/usr/include/math.h" 2 3 4 + + +# 1 "/usr/include/bits/nan.h" 1 3 4 +# 44 "/usr/include/math.h" 2 3 4 + + + +# 1 "/usr/include/bits/mathdef.h" 1 3 4 +# 36 "/usr/include/bits/mathdef.h" 3 4 +typedef long double float_t; + +typedef long double double_t; +# 48 "/usr/include/math.h" 2 3 4 +# 71 "/usr/include/math.h" 3 4 +# 1 "/usr/include/bits/mathcalls.h" 1 3 4 +# 53 "/usr/include/bits/mathcalls.h" 3 4 + + +extern double acos (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __acos (double __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern double asin (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __asin (double __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern double atan (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atan (double __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern double atan2 (double __y, double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atan2 (double __y, double __x) __attribute__ ((__nothrow__ , __leaf__)); + + +extern double cos (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cos (double __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern double sin (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sin (double __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern double tan (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __tan (double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern double cosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern double sinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern double tanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __tanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern void sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__ , __leaf__)) + ; + + + + + +extern double acosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __acosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern double asinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __asinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern double atanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + +extern double exp (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp (double __x) __attribute__ ((__nothrow__ , __leaf__)); + + +extern double frexp (double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern double __frexp (double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); + + +extern double ldexp (double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern double __ldexp (double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); + + +extern double log (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log (double __x) __attribute__ ((__nothrow__ , __leaf__)); + + +extern double log10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); + + +extern double modf (double __x, double *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern double __modf (double __x, double *__iptr) __attribute__ ((__nothrow__ , __leaf__)) + __attribute__ ((__nonnull__ (2))); + + + + +extern double exp10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern double pow10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __pow10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern double expm1 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __expm1 (double __x) __attribute__ ((__nothrow__ , __leaf__)); + + +extern double log1p (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log1p (double __x) __attribute__ ((__nothrow__ , __leaf__)); + + +extern double logb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __logb (double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern double exp2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); + + +extern double log2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + + +extern double pow (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __pow (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); + + +extern double sqrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sqrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern double hypot (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __hypot (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern double cbrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cbrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + + +extern double ceil (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __ceil (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern double fabs (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fabs (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern double floor (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __floor (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern double fmod (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __fmod (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern int __isinf (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern int __finite (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + + + + +extern int isinf (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern int finite (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern double drem (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __drem (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern double significand (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __significand (double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern double copysign (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + + + + + +extern double nan (__const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __nan (__const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + + + + +extern int __isnan (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + + +extern int isnan (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern double j0 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __j0 (double) __attribute__ ((__nothrow__ , __leaf__)); +extern double j1 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __j1 (double) __attribute__ ((__nothrow__ , __leaf__)); +extern double jn (int, double) __attribute__ ((__nothrow__ , __leaf__)); extern double __jn (int, double) __attribute__ ((__nothrow__ , __leaf__)); +extern double y0 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __y0 (double) __attribute__ ((__nothrow__ , __leaf__)); +extern double y1 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __y1 (double) __attribute__ ((__nothrow__ , __leaf__)); +extern double yn (int, double) __attribute__ ((__nothrow__ , __leaf__)); extern double __yn (int, double) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern double erf (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __erf (double) __attribute__ ((__nothrow__ , __leaf__)); +extern double erfc (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __erfc (double) __attribute__ ((__nothrow__ , __leaf__)); +extern double lgamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __lgamma (double) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern double tgamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __tgamma (double) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern double gamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __gamma (double) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern double lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern double __lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + +extern double rint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __rint (double __x) __attribute__ ((__nothrow__ , __leaf__)); + + +extern double nextafter (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + +extern double nexttoward (double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + + +extern double remainder (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __remainder (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern double scalbn (double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalbn (double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern int ilogb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogb (double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern double scalbln (double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalbln (double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern double nearbyint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __nearbyint (double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern double round (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __round (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + + +extern double trunc (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __trunc (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + + + +extern double remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern double __remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern long int lrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); +extern long long int llrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern long int lround (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lround (double __x) __attribute__ ((__nothrow__ , __leaf__)); +extern long long int llround (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llround (double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern double fdim (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __fdim (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); + + +extern double fmax (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __fmax (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); + + +extern double fmin (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __fmin (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern int __fpclassify (double __value) __attribute__ ((__nothrow__ , __leaf__)) + __attribute__ ((__const__)); + + +extern int __signbit (double __value) __attribute__ ((__nothrow__ , __leaf__)) + __attribute__ ((__const__)); + + + +extern double fma (double __x, double __y, double __z) __attribute__ ((__nothrow__ , __leaf__)); extern double __fma (double __x, double __y, double __z) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + + +extern double scalb (double __x, double __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalb (double __x, double __n) __attribute__ ((__nothrow__ , __leaf__)); +# 72 "/usr/include/math.h" 2 3 4 +# 94 "/usr/include/math.h" 3 4 +# 1 "/usr/include/bits/mathcalls.h" 1 3 4 +# 53 "/usr/include/bits/mathcalls.h" 3 4 + + +extern float acosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __acosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern float asinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __asinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern float atanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern float atan2f (float __y, float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atan2f (float __y, float __x) __attribute__ ((__nothrow__ , __leaf__)); + + +extern float cosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __cosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern float sinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern float tanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __tanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern float coshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __coshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern float sinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern float tanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __tanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern void + sincosf +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void + __sincosf +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__ , __leaf__)) + ; + + + + + +extern float acoshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __acoshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern float asinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __asinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern float atanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + +extern float expf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __expf (float __x) __attribute__ ((__nothrow__ , __leaf__)); + + +extern float frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern float __frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); + + +extern float ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern float __ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); + + +extern float logf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __logf (float __x) __attribute__ ((__nothrow__ , __leaf__)); + + +extern float log10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); + + +extern float modff (float __x, float *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern float __modff (float __x, float *__iptr) __attribute__ ((__nothrow__ , __leaf__)) + __attribute__ ((__nonnull__ (2))); + + + + +extern float exp10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __exp10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern float pow10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __pow10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern float expm1f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __expm1f (float __x) __attribute__ ((__nothrow__ , __leaf__)); + + +extern float log1pf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log1pf (float __x) __attribute__ ((__nothrow__ , __leaf__)); + + +extern float logbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __logbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern float exp2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __exp2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); + + +extern float log2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + + +extern float powf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __powf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); + + +extern float sqrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sqrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern float hypotf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __hypotf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern float cbrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __cbrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + + +extern float ceilf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __ceilf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern float fabsf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fabsf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern float floorf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __floorf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern float fmodf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __fmodf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern int __isinff (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern int __finitef (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + + + + +extern int isinff (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern int finitef (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern float dremf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __dremf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern float significandf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __significandf (float __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern float copysignf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + + + + + +extern float nanf (__const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + + + + +extern int __isnanf (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + + +extern int isnanf (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern float j0f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __j0f (float) __attribute__ ((__nothrow__ , __leaf__)); +extern float j1f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __j1f (float) __attribute__ ((__nothrow__ , __leaf__)); +extern float jnf (int, float) __attribute__ ((__nothrow__ , __leaf__)); extern float __jnf (int, float) __attribute__ ((__nothrow__ , __leaf__)); +extern float y0f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __y0f (float) __attribute__ ((__nothrow__ , __leaf__)); +extern float y1f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __y1f (float) __attribute__ ((__nothrow__ , __leaf__)); +extern float ynf (int, float) __attribute__ ((__nothrow__ , __leaf__)); extern float __ynf (int, float) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern float erff (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __erff (float) __attribute__ ((__nothrow__ , __leaf__)); +extern float erfcf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __erfcf (float) __attribute__ ((__nothrow__ , __leaf__)); +extern float lgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __lgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern float tgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __tgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern float gammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __gammaf (float) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern float lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern float __lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + +extern float rintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __rintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); + + +extern float nextafterf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + +extern float nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + + +extern float remainderf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __remainderf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern float scalbnf (float __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalbnf (float __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern int ilogbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern float scalblnf (float __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalblnf (float __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern float nearbyintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __nearbyintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern float roundf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __roundf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + + +extern float truncf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __truncf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + + + +extern float remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern float __remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern long int lrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); +extern long long int llrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern long int lroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); +extern long long int llroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern float fdimf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __fdimf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); + + +extern float fmaxf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __fmaxf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); + + +extern float fminf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __fminf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern int __fpclassifyf (float __value) __attribute__ ((__nothrow__ , __leaf__)) + __attribute__ ((__const__)); + + +extern int __signbitf (float __value) __attribute__ ((__nothrow__ , __leaf__)) + __attribute__ ((__const__)); + + + +extern float fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__ , __leaf__)); extern float __fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + + +extern float scalbf (float __x, float __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalbf (float __x, float __n) __attribute__ ((__nothrow__ , __leaf__)); +# 95 "/usr/include/math.h" 2 3 4 +# 143 "/usr/include/math.h" 3 4 +# 1 "/usr/include/bits/mathcalls.h" 1 3 4 +# 53 "/usr/include/bits/mathcalls.h" 3 4 + + +extern long double acosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __acosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern long double asinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __asinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern long double atanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern long double atan2l (long double __y, long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atan2l (long double __y, long double __x) __attribute__ ((__nothrow__ , __leaf__)); + + +extern long double cosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __cosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern long double sinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern long double tanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern long double coshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __coshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern long double sinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern long double tanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern void + sincosl +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void + __sincosl +# 82 "/usr/include/bits/mathcalls.h" 3 4 + (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__ , __leaf__)) + ; + + + + + +extern long double acoshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __acoshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern long double asinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __asinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern long double atanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + +extern long double expl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __expl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + + +extern long double frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern long double __frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); + + +extern long double ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern long double __ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); + + +extern long double logl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __logl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + + +extern long double log10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + + +extern long double modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern long double __modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__ , __leaf__)) + __attribute__ ((__nonnull__ (2))); + + + + +extern long double exp10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __exp10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + +extern long double pow10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __pow10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern long double expm1l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __expm1l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + + +extern long double log1pl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log1pl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + + +extern long double logbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __logbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern long double exp2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __exp2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + + +extern long double log2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + + +extern long double powl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __powl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); + + +extern long double sqrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sqrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern long double hypotl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __hypotl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern long double cbrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __cbrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + + +extern long double ceill (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __ceill (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern long double fabsl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fabsl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern long double floorl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __floorl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern long double fmodl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fmodl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern int __isinfl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern int __finitel (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + + + + +extern int isinfl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern int finitel (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern long double dreml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __dreml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern long double significandl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __significandl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern long double copysignl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + + + + + +extern long double nanl (__const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + + + + +extern int __isnanl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + + +extern int isnanl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern long double j0l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __j0l (long double) __attribute__ ((__nothrow__ , __leaf__)); +extern long double j1l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __j1l (long double) __attribute__ ((__nothrow__ , __leaf__)); +extern long double jnl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __jnl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); +extern long double y0l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __y0l (long double) __attribute__ ((__nothrow__ , __leaf__)); +extern long double y1l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __y1l (long double) __attribute__ ((__nothrow__ , __leaf__)); +extern long double ynl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __ynl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern long double erfl (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __erfl (long double) __attribute__ ((__nothrow__ , __leaf__)); +extern long double erfcl (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __erfcl (long double) __attribute__ ((__nothrow__ , __leaf__)); +extern long double lgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __lgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern long double tgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern long double gammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __gammal (long double) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern long double lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern long double __lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + +extern long double rintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __rintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + + +extern long double nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + +extern long double nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + + +extern long double remainderl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __remainderl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern long double scalbnl (long double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalbnl (long double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern int ilogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern long double scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern long double nearbyintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nearbyintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern long double roundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __roundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + + +extern long double truncl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __truncl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + + + +extern long double remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern long double __remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern long int lrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); +extern long long int llrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern long int lroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); +extern long long int llroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern long double fdiml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fdiml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); + + +extern long double fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); + + +extern long double fminl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fminl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern int __fpclassifyl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) + __attribute__ ((__const__)); + + +extern int __signbitl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) + __attribute__ ((__const__)); + + + +extern long double fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + + +extern long double scalbl (long double __x, long double __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalbl (long double __x, long double __n) __attribute__ ((__nothrow__ , __leaf__)); +# 144 "/usr/include/math.h" 2 3 4 +# 159 "/usr/include/math.h" 3 4 +extern int signgam; +# 200 "/usr/include/math.h" 3 4 +enum + { + FP_NAN, + + FP_INFINITE, + + FP_ZERO, + + FP_SUBNORMAL, + + FP_NORMAL + + }; +# 293 "/usr/include/math.h" 3 4 +typedef enum +{ + _IEEE_ = -1, + _SVID_, + _XOPEN_, + _POSIX_, + _ISOC_ +} _LIB_VERSION_TYPE; + + + + +extern _LIB_VERSION_TYPE _LIB_VERSION; +# 318 "/usr/include/math.h" 3 4 +struct exception + + { + int type; + char *name; + double arg1; + double arg2; + double retval; + }; + + + + +extern int matherr (struct exception *__exc); +# 418 "/usr/include/math.h" 3 4 +# 1 "/usr/include/bits/mathinline.h" 1 3 4 +# 127 "/usr/include/bits/mathinline.h" 3 4 +extern __inline int +__attribute__ ((__nothrow__ , __leaf__)) __signbitf (float __x) +{ + __extension__ union { float __f; int __i; } __u = { __f: __x }; + return __u.__i < 0; +} +extern __inline int +__attribute__ ((__nothrow__ , __leaf__)) __signbit (double __x) +{ + __extension__ union { double __d; int __i[2]; } __u = { __d: __x }; + return __u.__i[1] < 0; +} +extern __inline int +__attribute__ ((__nothrow__ , __leaf__)) __signbitl (long double __x) +{ + __extension__ union { long double __l; int __i[3]; } __u = { __l: __x }; + return (__u.__i[2] & 0x8000) != 0; +} +# 295 "/usr/include/bits/mathinline.h" 3 4 +extern __inline double __sgn (double) __attribute__ ((__nothrow__ , __leaf__)); extern __inline double __attribute__ ((__nothrow__ , __leaf__)) __sgn (double __x) { return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0); } extern __inline float __sgnf (float) __attribute__ ((__nothrow__ , __leaf__)); extern __inline float __attribute__ ((__nothrow__ , __leaf__)) __sgnf (float __x) { return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0); } extern __inline long double __sgnl (long double) __attribute__ ((__nothrow__ , __leaf__)); extern __inline long double __attribute__ ((__nothrow__ , __leaf__)) __sgnl (long double __x) { return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0); } +# 437 "/usr/include/bits/mathinline.h" 3 4 +extern __inline long double __attribute__ ((__nothrow__ , __leaf__)) __atan2l (long double __y, long double __x) { return __builtin_atan2l (__y, __x); } +# 477 "/usr/include/bits/mathinline.h" 3 4 +extern __inline double __attribute__ ((__nothrow__ , __leaf__)) fabs (double __x) { return __builtin_fabs (__x); } + +extern __inline float __attribute__ ((__nothrow__ , __leaf__)) fabsf (float __x) { return __builtin_fabsf (__x); } +extern __inline long double __attribute__ ((__nothrow__ , __leaf__)) fabsl (long double __x) { return __builtin_fabsl (__x); } + +extern __inline long double __attribute__ ((__nothrow__ , __leaf__)) __fabsl (long double __x) { return __builtin_fabsl (__x); } +# 510 "/usr/include/bits/mathinline.h" 3 4 +extern __inline long double __sgn1l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern __inline long double __attribute__ ((__nothrow__ , __leaf__)) __sgn1l (long double __x) { __extension__ union { long double __xld; unsigned int __xi[3]; } __n = { __xld: __x }; __n.__xi[2] = (__n.__xi[2] & 0x8000) | 0x3fff; __n.__xi[1] = 0x80000000; __n.__xi[0] = 0; return __n.__xld; } +# 534 "/usr/include/bits/mathinline.h" 3 4 +extern __inline double __attribute__ ((__nothrow__ , __leaf__)) floor (double __x) { register long double __value; register int __ignore; unsigned short int __cw; unsigned short int __cwtmp; __asm __volatile ("fnstcw %3\n\t" "movzwl %3, %1\n\t" "andl $0xf3ff, %1\n\t" "orl $0x0400, %1\n\t" "movw %w1, %2\n\t" "fldcw %2\n\t" "frndint\n\t" "fldcw %3" : "=t" (__value), "=&q" (__ignore), "=m" (__cwtmp), "=m" (__cw) : "0" (__x)); return __value; } extern __inline float __attribute__ ((__nothrow__ , __leaf__)) floorf (float __x) { register long double __value; register int __ignore; unsigned short int __cw; unsigned short int __cwtmp; __asm __volatile ("fnstcw %3\n\t" "movzwl %3, %1\n\t" "andl $0xf3ff, %1\n\t" "orl $0x0400, %1\n\t" "movw %w1, %2\n\t" "fldcw %2\n\t" "frndint\n\t" "fldcw %3" : "=t" (__value), "=&q" (__ignore), "=m" (__cwtmp), "=m" (__cw) : "0" (__x)); return __value; } extern __inline long double __attribute__ ((__nothrow__ , __leaf__)) floorl (long double __x) { register long double __value; register int __ignore; unsigned short int __cw; unsigned short int __cwtmp; __asm __volatile ("fnstcw %3\n\t" "movzwl %3, %1\n\t" "andl $0xf3ff, %1\n\t" "orl $0x0400, %1\n\t" "movw %w1, %2\n\t" "fldcw %2\n\t" "frndint\n\t" "fldcw %3" : "=t" (__value), "=&q" (__ignore), "=m" (__cwtmp), "=m" (__cw) : "0" (__x)); return __value; } +# 552 "/usr/include/bits/mathinline.h" 3 4 +extern __inline double __attribute__ ((__nothrow__ , __leaf__)) ceil (double __x) { register long double __value; register int __ignore; unsigned short int __cw; unsigned short int __cwtmp; __asm __volatile ("fnstcw %3\n\t" "movzwl %3, %1\n\t" "andl $0xf3ff, %1\n\t" "orl $0x0800, %1\n\t" "movw %w1, %2\n\t" "fldcw %2\n\t" "frndint\n\t" "fldcw %3" : "=t" (__value), "=&q" (__ignore), "=m" (__cwtmp), "=m" (__cw) : "0" (__x)); return __value; } extern __inline float __attribute__ ((__nothrow__ , __leaf__)) ceilf (float __x) { register long double __value; register int __ignore; unsigned short int __cw; unsigned short int __cwtmp; __asm __volatile ("fnstcw %3\n\t" "movzwl %3, %1\n\t" "andl $0xf3ff, %1\n\t" "orl $0x0800, %1\n\t" "movw %w1, %2\n\t" "fldcw %2\n\t" "frndint\n\t" "fldcw %3" : "=t" (__value), "=&q" (__ignore), "=m" (__cwtmp), "=m" (__cw) : "0" (__x)); return __value; } extern __inline long double __attribute__ ((__nothrow__ , __leaf__)) ceill (long double __x) { register long double __value; register int __ignore; unsigned short int __cw; unsigned short int __cwtmp; __asm __volatile ("fnstcw %3\n\t" "movzwl %3, %1\n\t" "andl $0xf3ff, %1\n\t" "orl $0x0800, %1\n\t" "movw %w1, %2\n\t" "fldcw %2\n\t" "frndint\n\t" "fldcw %3" : "=t" (__value), "=&q" (__ignore), "=m" (__cwtmp), "=m" (__cw) : "0" (__x)); return __value; } +# 669 "/usr/include/bits/mathinline.h" 3 4 +extern __inline long int +__attribute__ ((__nothrow__ , __leaf__)) lrintf (float __x) +{ + long int __lrintres; __asm__ __volatile__ ("fistpl %0" : "=m" (__lrintres) : "t" (__x) : "st"); return __lrintres; +} +extern __inline long int +__attribute__ ((__nothrow__ , __leaf__)) lrint (double __x) +{ + long int __lrintres; __asm__ __volatile__ ("fistpl %0" : "=m" (__lrintres) : "t" (__x) : "st"); return __lrintres; +} +extern __inline long int +__attribute__ ((__nothrow__ , __leaf__)) lrintl (long double __x) +{ + long int __lrintres; __asm__ __volatile__ ("fistpl %0" : "=m" (__lrintres) : "t" (__x) : "st"); return __lrintres; +} +# 692 "/usr/include/bits/mathinline.h" 3 4 +extern __inline long long int +__attribute__ ((__nothrow__ , __leaf__)) llrintf (float __x) +{ + long long int __llrintres; __asm__ __volatile__ ("fistpll %0" : "=m" (__llrintres) : "t" (__x) : "st"); return __llrintres; +} +extern __inline long long int +__attribute__ ((__nothrow__ , __leaf__)) llrint (double __x) +{ + long long int __llrintres; __asm__ __volatile__ ("fistpll %0" : "=m" (__llrintres) : "t" (__x) : "st"); return __llrintres; +} +extern __inline long long int +__attribute__ ((__nothrow__ , __leaf__)) llrintl (long double __x) +{ + long long int __llrintres; __asm__ __volatile__ ("fistpll %0" : "=m" (__llrintres) : "t" (__x) : "st"); return __llrintres; +} +# 729 "/usr/include/bits/mathinline.h" 3 4 +extern __inline int +__attribute__ ((__nothrow__ , __leaf__)) __finite (double __x) +{ + return (__extension__ + (((((union { double __d; int __i[2]; }) {__d: __x}).__i[1] + | 0x800fffffu) + 1) >> 31)); +} +# 419 "/usr/include/math.h" 2 3 4 +# 480 "/usr/include/math.h" 3 4 + +# 21 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" 1 +# 22 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/config.h" 1 +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/config-host.h" 1 +# 2 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/config.h" 2 +# 1 "./config-target.h" 1 +# 2 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/config.h" 2 +# 23 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" 2 +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 1 + + + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/compiler.h" 1 + + + + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/config-host.h" 1 +# 7 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/compiler.h" 2 +# 6 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/config-host.h" 1 +# 7 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 + + + + + + + +typedef struct QEMUTimer QEMUTimer; +typedef struct QEMUFile QEMUFile; +typedef struct DeviceState DeviceState; + +struct Monitor; +typedef struct Monitor Monitor; + + +# 1 "/usr/include/stdlib.h" 1 3 4 +# 33 "/usr/include/stdlib.h" 3 4 +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 +# 212 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 3 4 +typedef unsigned int size_t; +# 324 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 3 4 +typedef int wchar_t; +# 34 "/usr/include/stdlib.h" 2 3 4 + + + + + + + + +# 1 "/usr/include/bits/waitflags.h" 1 3 4 +# 43 "/usr/include/stdlib.h" 2 3 4 +# 1 "/usr/include/bits/waitstatus.h" 1 3 4 +# 65 "/usr/include/bits/waitstatus.h" 3 4 +# 1 "/usr/include/endian.h" 1 3 4 +# 37 "/usr/include/endian.h" 3 4 +# 1 "/usr/include/bits/endian.h" 1 3 4 +# 38 "/usr/include/endian.h" 2 3 4 +# 61 "/usr/include/endian.h" 3 4 +# 1 "/usr/include/bits/byteswap.h" 1 3 4 +# 62 "/usr/include/endian.h" 2 3 4 +# 66 "/usr/include/bits/waitstatus.h" 2 3 4 + +union wait + { + int w_status; + struct + { + + unsigned int __w_termsig:7; + unsigned int __w_coredump:1; + unsigned int __w_retcode:8; + unsigned int:16; + + + + + + + + } __wait_terminated; + struct + { + + unsigned int __w_stopval:8; + unsigned int __w_stopsig:8; + unsigned int:16; + + + + + + + } __wait_stopped; + }; +# 44 "/usr/include/stdlib.h" 2 3 4 +# 68 "/usr/include/stdlib.h" 3 4 +typedef union + { + union wait *__uptr; + int *__iptr; + } __WAIT_STATUS __attribute__ ((__transparent_union__)); +# 96 "/usr/include/stdlib.h" 3 4 + + +typedef struct + { + int quot; + int rem; + } div_t; + + + +typedef struct + { + long int quot; + long int rem; + } ldiv_t; + + + + + + + +__extension__ typedef struct + { + long long int quot; + long long int rem; + } lldiv_t; + + +# 140 "/usr/include/stdlib.h" 3 4 +extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + + + +extern double atof (__const char *__nptr) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern int atoi (__const char *__nptr) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern long int atol (__const char *__nptr) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +__extension__ extern long long int atoll (__const char *__nptr) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern double strtod (__const char *__restrict __nptr, + char **__restrict __endptr) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern float strtof (__const char *__restrict __nptr, + char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern long double strtold (__const char *__restrict __nptr, + char **__restrict __endptr) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern long int strtol (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern unsigned long int strtoul (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +__extension__ +extern long long int strtoq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtouq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +__extension__ +extern long long int strtoll (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtoull (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +# 236 "/usr/include/stdlib.h" 3 4 +# 1 "/usr/include/xlocale.h" 1 3 4 +# 28 "/usr/include/xlocale.h" 3 4 +typedef struct __locale_struct +{ + + struct __locale_data *__locales[13]; + + + const unsigned short int *__ctype_b; + const int *__ctype_tolower; + const int *__ctype_toupper; + + + const char *__names[13]; +} *__locale_t; + + +typedef __locale_t locale_t; +# 237 "/usr/include/stdlib.h" 2 3 4 + + + +extern long int strtol_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +extern unsigned long int strtoul_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern long long int strtoll_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +__extension__ +extern unsigned long long int strtoull_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); + +extern double strtod_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + +extern float strtof_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + +extern long double strtold_l (__const char *__restrict __nptr, + char **__restrict __endptr, + __locale_t __loc) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + + + + + +extern __inline double +__attribute__ ((__nothrow__ , __leaf__)) atof (__const char *__nptr) +{ + return strtod (__nptr, (char **) ((void *)0)); +} +extern __inline int +__attribute__ ((__nothrow__ , __leaf__)) atoi (__const char *__nptr) +{ + return (int) strtol (__nptr, (char **) ((void *)0), 10); +} +extern __inline long int +__attribute__ ((__nothrow__ , __leaf__)) atol (__const char *__nptr) +{ + return strtol (__nptr, (char **) ((void *)0), 10); +} + + + + +__extension__ extern __inline long long int +__attribute__ ((__nothrow__ , __leaf__)) atoll (__const char *__nptr) +{ + return strtoll (__nptr, (char **) ((void *)0), 10); +} + +# 311 "/usr/include/stdlib.h" 3 4 +extern char *l64a (long int __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + +extern long int a64l (__const char *__s) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +# 1 "/usr/include/sys/types.h" 1 3 4 +# 28 "/usr/include/sys/types.h" 3 4 + + +# 1 "/usr/include/bits/types.h" 1 3 4 +# 28 "/usr/include/bits/types.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 29 "/usr/include/bits/types.h" 2 3 4 + + +typedef unsigned char __u_char; +typedef unsigned short int __u_short; +typedef unsigned int __u_int; +typedef unsigned long int __u_long; + + +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; + + + + +__extension__ typedef signed long long int __int64_t; +__extension__ typedef unsigned long long int __uint64_t; + + + + + + + +__extension__ typedef long long int __quad_t; +__extension__ typedef unsigned long long int __u_quad_t; +# 131 "/usr/include/bits/types.h" 3 4 +# 1 "/usr/include/bits/typesizes.h" 1 3 4 +# 132 "/usr/include/bits/types.h" 2 3 4 + + +__extension__ typedef __u_quad_t __dev_t; +__extension__ typedef unsigned int __uid_t; +__extension__ typedef unsigned int __gid_t; +__extension__ typedef unsigned long int __ino_t; +__extension__ typedef __u_quad_t __ino64_t; +__extension__ typedef unsigned int __mode_t; +__extension__ typedef unsigned int __nlink_t; +__extension__ typedef long int __off_t; +__extension__ typedef __quad_t __off64_t; +__extension__ typedef int __pid_t; +__extension__ typedef struct { int __val[2]; } __fsid_t; +__extension__ typedef long int __clock_t; +__extension__ typedef unsigned long int __rlim_t; +__extension__ typedef __u_quad_t __rlim64_t; +__extension__ typedef unsigned int __id_t; +__extension__ typedef long int __time_t; +__extension__ typedef unsigned int __useconds_t; +__extension__ typedef long int __suseconds_t; + +__extension__ typedef int __daddr_t; +__extension__ typedef long int __swblk_t; +__extension__ typedef int __key_t; + + +__extension__ typedef int __clockid_t; + + +__extension__ typedef void * __timer_t; + + +__extension__ typedef long int __blksize_t; + + + + +__extension__ typedef long int __blkcnt_t; +__extension__ typedef __quad_t __blkcnt64_t; + + +__extension__ typedef unsigned long int __fsblkcnt_t; +__extension__ typedef __u_quad_t __fsblkcnt64_t; + + +__extension__ typedef unsigned long int __fsfilcnt_t; +__extension__ typedef __u_quad_t __fsfilcnt64_t; + +__extension__ typedef int __ssize_t; + + + +typedef __off64_t __loff_t; +typedef __quad_t *__qaddr_t; +typedef char *__caddr_t; + + +__extension__ typedef int __intptr_t; + + +__extension__ typedef unsigned int __socklen_t; +# 31 "/usr/include/sys/types.h" 2 3 4 + + + +typedef __u_char u_char; +typedef __u_short u_short; +typedef __u_int u_int; +typedef __u_long u_long; +typedef __quad_t quad_t; +typedef __u_quad_t u_quad_t; +typedef __fsid_t fsid_t; + + + + +typedef __loff_t loff_t; + + + + + +typedef __ino64_t ino_t; + + + + +typedef __ino64_t ino64_t; + + + + +typedef __dev_t dev_t; + + + + +typedef __gid_t gid_t; + + + + +typedef __mode_t mode_t; + + + + +typedef __nlink_t nlink_t; + + + + +typedef __uid_t uid_t; + + + + + + + +typedef __off64_t off_t; + + + + +typedef __off64_t off64_t; + + + + +typedef __pid_t pid_t; + + + + + +typedef __id_t id_t; + + + + +typedef __ssize_t ssize_t; + + + + + +typedef __daddr_t daddr_t; +typedef __caddr_t caddr_t; + + + + + +typedef __key_t key_t; +# 133 "/usr/include/sys/types.h" 3 4 +# 1 "/usr/include/time.h" 1 3 4 +# 58 "/usr/include/time.h" 3 4 + + +typedef __clock_t clock_t; + + + +# 74 "/usr/include/time.h" 3 4 + + +typedef __time_t time_t; + + + +# 92 "/usr/include/time.h" 3 4 +typedef __clockid_t clockid_t; +# 104 "/usr/include/time.h" 3 4 +typedef __timer_t timer_t; +# 134 "/usr/include/sys/types.h" 2 3 4 + + + +typedef __useconds_t useconds_t; + + + +typedef __suseconds_t suseconds_t; + + + + + +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 +# 148 "/usr/include/sys/types.h" 2 3 4 + + + +typedef unsigned long int ulong; +typedef unsigned short int ushort; +typedef unsigned int uint; +# 195 "/usr/include/sys/types.h" 3 4 +typedef int int8_t __attribute__ ((__mode__ (__QI__))); +typedef int int16_t __attribute__ ((__mode__ (__HI__))); +typedef int int32_t __attribute__ ((__mode__ (__SI__))); +typedef int int64_t __attribute__ ((__mode__ (__DI__))); + + +typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); +typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); + +typedef int register_t __attribute__ ((__mode__ (__word__))); +# 220 "/usr/include/sys/types.h" 3 4 +# 1 "/usr/include/sys/select.h" 1 3 4 +# 31 "/usr/include/sys/select.h" 3 4 +# 1 "/usr/include/bits/select.h" 1 3 4 +# 32 "/usr/include/sys/select.h" 2 3 4 + + +# 1 "/usr/include/bits/sigset.h" 1 3 4 +# 24 "/usr/include/bits/sigset.h" 3 4 +typedef int __sig_atomic_t; + + + + +typedef struct + { + unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; + } __sigset_t; +# 35 "/usr/include/sys/select.h" 2 3 4 + + + +typedef __sigset_t sigset_t; + + + + + +# 1 "/usr/include/time.h" 1 3 4 +# 120 "/usr/include/time.h" 3 4 +struct timespec + { + __time_t tv_sec; + long int tv_nsec; + }; +# 45 "/usr/include/sys/select.h" 2 3 4 + +# 1 "/usr/include/bits/time.h" 1 3 4 +# 31 "/usr/include/bits/time.h" 3 4 +struct timeval + { + __time_t tv_sec; + __suseconds_t tv_usec; + }; +# 47 "/usr/include/sys/select.h" 2 3 4 +# 55 "/usr/include/sys/select.h" 3 4 +typedef long int __fd_mask; +# 65 "/usr/include/sys/select.h" 3 4 +typedef struct + { + + + + __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; + + + + + + } fd_set; + + + + + + +typedef __fd_mask fd_mask; +# 97 "/usr/include/sys/select.h" 3 4 + +# 107 "/usr/include/sys/select.h" 3 4 +extern int select (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + struct timeval *__restrict __timeout); +# 119 "/usr/include/sys/select.h" 3 4 +extern int pselect (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + const struct timespec *__restrict __timeout, + const __sigset_t *__restrict __sigmask); + + + + + +# 1 "/usr/include/bits/select2.h" 1 3 4 +# 25 "/usr/include/bits/select2.h" 3 4 +extern long int __fdelt_chk (long int __d); +extern long int __fdelt_warn (long int __d) + __attribute__((__warning__ ("bit outside of fd_set selected"))); +# 130 "/usr/include/sys/select.h" 2 3 4 + + + +# 221 "/usr/include/sys/types.h" 2 3 4 + + +# 1 "/usr/include/sys/sysmacros.h" 1 3 4 +# 30 "/usr/include/sys/sysmacros.h" 3 4 + + +__extension__ +extern unsigned int gnu_dev_major (unsigned long long int __dev) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); +__extension__ +extern unsigned int gnu_dev_minor (unsigned long long int __dev) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); +__extension__ +extern unsigned long long int gnu_dev_makedev (unsigned int __major, + unsigned int __minor) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +__extension__ extern __inline __attribute__ ((__const__)) unsigned int +__attribute__ ((__nothrow__ , __leaf__)) gnu_dev_major (unsigned long long int __dev) +{ + return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); +} + +__extension__ extern __inline __attribute__ ((__const__)) unsigned int +__attribute__ ((__nothrow__ , __leaf__)) gnu_dev_minor (unsigned long long int __dev) +{ + return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); +} + +__extension__ extern __inline __attribute__ ((__const__)) unsigned long long int +__attribute__ ((__nothrow__ , __leaf__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor) +{ + return ((__minor & 0xff) | ((__major & 0xfff) << 8) + | (((unsigned long long int) (__minor & ~0xff)) << 12) + | (((unsigned long long int) (__major & ~0xfff)) << 32)); +} + + +# 224 "/usr/include/sys/types.h" 2 3 4 + + + + + +typedef __blksize_t blksize_t; +# 249 "/usr/include/sys/types.h" 3 4 +typedef __blkcnt64_t blkcnt_t; + + + +typedef __fsblkcnt64_t fsblkcnt_t; + + + +typedef __fsfilcnt64_t fsfilcnt_t; + + + + + +typedef __blkcnt64_t blkcnt64_t; +typedef __fsblkcnt64_t fsblkcnt64_t; +typedef __fsfilcnt64_t fsfilcnt64_t; + + + + + +# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 +# 36 "/usr/include/bits/pthreadtypes.h" 3 4 +typedef unsigned long int pthread_t; + + +typedef union +{ + char __size[36]; + long int __align; +} pthread_attr_t; + + +typedef struct __pthread_internal_slist +{ + struct __pthread_internal_slist *__next; +} __pthread_slist_t; + + + + +typedef union +{ + struct __pthread_mutex_s + { + int __lock; + unsigned int __count; + int __owner; + + + int __kind; + unsigned int __nusers; + __extension__ union + { + int __spins; + __pthread_slist_t __list; + }; + } __data; + char __size[24]; + long int __align; +} pthread_mutex_t; + +typedef union +{ + char __size[4]; + long int __align; +} pthread_mutexattr_t; + + + + +typedef union +{ + struct + { + int __lock; + unsigned int __futex; + __extension__ unsigned long long int __total_seq; + __extension__ unsigned long long int __wakeup_seq; + __extension__ unsigned long long int __woken_seq; + void *__mutex; + unsigned int __nwaiters; + unsigned int __broadcast_seq; + } __data; + char __size[48]; + __extension__ long long int __align; +} pthread_cond_t; + +typedef union +{ + char __size[4]; + long int __align; +} pthread_condattr_t; + + + +typedef unsigned int pthread_key_t; + + + +typedef int pthread_once_t; + + + + + +typedef union +{ + struct + { + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + + + unsigned char __flags; + unsigned char __shared; + unsigned char __pad1; + unsigned char __pad2; + int __writer; + } __data; + char __size[32]; + long int __align; +} pthread_rwlock_t; + +typedef union +{ + char __size[8]; + long int __align; +} pthread_rwlockattr_t; + + + + + +typedef volatile int pthread_spinlock_t; + + + + +typedef union +{ + char __size[20]; + long int __align; +} pthread_barrier_t; + +typedef union +{ + char __size[4]; + int __align; +} pthread_barrierattr_t; +# 272 "/usr/include/sys/types.h" 2 3 4 + + + +# 321 "/usr/include/stdlib.h" 2 3 4 + + + + + + +extern long int random (void) __attribute__ ((__nothrow__ , __leaf__)); + + +extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern char *initstate (unsigned int __seed, char *__statebuf, + size_t __statelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); + + + +extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + + + + + +struct random_data + { + int32_t *fptr; + int32_t *rptr; + int32_t *state; + int rand_type; + int rand_deg; + int rand_sep; + int32_t *end_ptr; + }; + +extern int random_r (struct random_data *__restrict __buf, + int32_t *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int srandom_r (unsigned int __seed, struct random_data *__buf) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); + +extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, + size_t __statelen, + struct random_data *__restrict __buf) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))); + +extern int setstate_r (char *__restrict __statebuf, + struct random_data *__restrict __buf) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern int rand (void) __attribute__ ((__nothrow__ , __leaf__)); + +extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + +extern double drand48 (void) __attribute__ ((__nothrow__ , __leaf__)); +extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern long int lrand48 (void) __attribute__ ((__nothrow__ , __leaf__)); +extern long int nrand48 (unsigned short int __xsubi[3]) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern long int mrand48 (void) __attribute__ ((__nothrow__ , __leaf__)); +extern long int jrand48 (unsigned short int __xsubi[3]) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ , __leaf__)); +extern unsigned short int *seed48 (unsigned short int __seed16v[3]) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); +extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + + + +struct drand48_data + { + unsigned short int __x[3]; + unsigned short int __old_x[3]; + unsigned short int __c; + unsigned short int __init; + unsigned long long int __a; + }; + + +extern int drand48_r (struct drand48_data *__restrict __buffer, + double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); +extern int erand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int lrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); +extern int nrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int mrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); +extern int jrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int srand48_r (long int __seedval, struct drand48_data *__buffer) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); + +extern int seed48_r (unsigned short int __seed16v[3], + struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int lcong48_r (unsigned short int __param[7], + struct drand48_data *__buffer) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + + + + +extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + +extern void *calloc (size_t __nmemb, size_t __size) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + + + + + + + +extern void *realloc (void *__ptr, size_t __size) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + +extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern void cfree (void *__ptr) __attribute__ ((__nothrow__ , __leaf__)); + + + +# 1 "/usr/include/alloca.h" 1 3 4 +# 25 "/usr/include/alloca.h" 3 4 +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 +# 26 "/usr/include/alloca.h" 2 3 4 + + + + + + + +extern void *alloca (size_t __size) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +# 498 "/usr/include/stdlib.h" 2 3 4 + + + + + +extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + +extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +extern void abort (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + + + +extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); +# 528 "/usr/include/stdlib.h" 3 4 +extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern void exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + + + + + + + +extern void quick_exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + + + + + + + +extern void _Exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + + + + + + +extern char *getenv (__const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *__secure_getenv (__const char *__name) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int putenv (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int setenv (__const char *__name, __const char *__value, int __replace) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); + + +extern int unsetenv (__const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int clearenv (void) __attribute__ ((__nothrow__ , __leaf__)); +# 606 "/usr/include/stdlib.h" 3 4 +extern char *mktemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 623 "/usr/include/stdlib.h" 3 4 +extern int mkstemp (char *__template) __asm__ ("" "mkstemp64") + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 645 "/usr/include/stdlib.h" 3 4 +extern int mkstemps (char *__template, int __suffixlen) __asm__ ("" "mkstemps64") + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int mkstemps64 (char *__template, int __suffixlen) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 663 "/usr/include/stdlib.h" 3 4 +extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 677 "/usr/include/stdlib.h" 3 4 +extern int mkostemp (char *__template, int __flags) __asm__ ("" "mkostemp64") + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 698 "/usr/include/stdlib.h" 3 4 +extern int mkostemps (char *__template, int __suffixlen, int __flags) __asm__ ("" "mkostemps64") + + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int mkostemps64 (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + + + + + +extern int system (__const char *__command) __attribute__ ((__warn_unused_result__)); + + + + + + +extern char *canonicalize_file_name (__const char *__name) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 734 "/usr/include/stdlib.h" 3 4 +extern char *realpath (__const char *__restrict __name, + char *__restrict __resolved) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + + + + + +typedef int (*__compar_fn_t) (__const void *, __const void *); + + +typedef __compar_fn_t comparison_fn_t; + + + +typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *); + + + + + +extern void *bsearch (__const void *__key, __const void *__base, + size_t __nmemb, size_t __size, __compar_fn_t __compar) + __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__)); + + + +extern void qsort (void *__base, size_t __nmemb, size_t __size, + __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); + +extern void qsort_r (void *__base, size_t __nmemb, size_t __size, + __compar_d_fn_t __compar, void *__arg) + __attribute__ ((__nonnull__ (1, 4))); + + + + +extern int abs (int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern long int labs (long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + +__extension__ extern long long int llabs (long long int __x) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern div_t div (int __numer, int __denom) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern ldiv_t ldiv (long int __numer, long int __denom) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + + + + +__extension__ extern lldiv_t lldiv (long long int __numer, + long long int __denom) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); + +# 808 "/usr/include/stdlib.h" 3 4 +extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *gcvt (double __value, int __ndigit, char *__buf) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); + + + + +extern char *qecvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qfcvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qgcvt (long double __value, int __ndigit, char *__buf) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); + + + + +extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); +extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); + +extern int qecvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); +extern int qfcvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5))); + + + + + + + +extern int mblen (__const char *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + +extern int mbtowc (wchar_t *__restrict __pwc, + __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + +extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + + +extern size_t mbstowcs (wchar_t *__restrict __pwcs, + __const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); + +extern size_t wcstombs (char *__restrict __s, + __const wchar_t *__restrict __pwcs, size_t __n) + __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + + +extern int rpmatch (__const char *__response) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 896 "/usr/include/stdlib.h" 3 4 +extern int getsubopt (char **__restrict __optionp, + char *__const *__restrict __tokens, + char **__restrict __valuep) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__)); + + + + + +extern void setkey (__const char *__key) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern int grantpt (int __fd) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern int unlockpt (int __fd) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern char *ptsname (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + + + + + +extern int ptsname_r (int __fd, char *__buf, size_t __buflen) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); + + +extern int getpt (void); + + + + + + +extern int getloadavg (double __loadavg[], int __nelem) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + + + +# 1 "/usr/include/bits/stdlib.h" 1 3 4 +# 24 "/usr/include/bits/stdlib.h" 3 4 +extern char *__realpath_chk (__const char *__restrict __name, + char *__restrict __resolved, + size_t __resolvedlen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); +extern char *__realpath_alias (__const char *__restrict __name, char *__restrict __resolved) __asm__ ("" "realpath") __attribute__ ((__nothrow__ , __leaf__)) + + __attribute__ ((__warn_unused_result__)); +extern char *__realpath_chk_warn (__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __asm__ ("" "__realpath_chk") __attribute__ ((__nothrow__ , __leaf__)) + + + __attribute__ ((__warn_unused_result__)) + __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * +__attribute__ ((__nothrow__ , __leaf__)) realpath (__const char *__restrict __name, char *__restrict __resolved) +{ + if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1) + { + + + + + return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); + } + + return __realpath_alias (__name, __resolved); +} + + +extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, + size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ptsname_r") __attribute__ ((__nothrow__ , __leaf__)) + + __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nothrow__ , __leaf__)) + + + __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__nothrow__ , __leaf__)) ptsname_r (int __fd, char *__buf, size_t __buflen) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __ptsname_r_alias (__fd, __buf, __buflen); +} + + +extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); +extern int __wctomb_alias (char *__s, wchar_t __wchar) __asm__ ("" "wctomb") __attribute__ ((__nothrow__ , __leaf__)) + __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) int +__attribute__ ((__nothrow__ , __leaf__)) wctomb (char *__s, wchar_t __wchar) +{ + + + + + + + + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) + return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1)); + return __wctomb_alias (__s, __wchar); +} + + +extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, + __const char *__restrict __src, + size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__)); +extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__ , __leaf__)) + + + ; +extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__mbstowcs_chk") __attribute__ ((__nothrow__ , __leaf__)) + + + + __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) size_t +__attribute__ ((__nothrow__ , __leaf__)) mbstowcs (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __mbstowcs_chk (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + + if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) + return __mbstowcs_chk_warn (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + } + return __mbstowcs_alias (__dst, __src, __len); +} + + +extern size_t __wcstombs_chk (char *__restrict __dst, + __const wchar_t *__restrict __src, + size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__)); +extern size_t __wcstombs_alias (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) __asm__ ("" "wcstombs") __attribute__ ((__nothrow__ , __leaf__)) + + + ; +extern size_t __wcstombs_chk_warn (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__wcstombs_chk") __attribute__ ((__nothrow__ , __leaf__)) + + + + __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len"))); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) size_t +__attribute__ ((__nothrow__ , __leaf__)) wcstombs (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) + +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + if (__len > __builtin_object_size (__dst, 2 > 1)) + return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + } + return __wcstombs_alias (__dst, __src, __len); +} +# 956 "/usr/include/stdlib.h" 2 3 4 +# 964 "/usr/include/stdlib.h" 3 4 + +# 23 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 +# 1 "/usr/include/stdio.h" 1 3 4 +# 30 "/usr/include/stdio.h" 3 4 + + + + +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 +# 35 "/usr/include/stdio.h" 2 3 4 +# 45 "/usr/include/stdio.h" 3 4 +struct _IO_FILE; + + + +typedef struct _IO_FILE FILE; + + + + + +# 65 "/usr/include/stdio.h" 3 4 +typedef struct _IO_FILE __FILE; +# 75 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/libio.h" 1 3 4 +# 32 "/usr/include/libio.h" 3 4 +# 1 "/usr/include/_G_config.h" 1 3 4 +# 15 "/usr/include/_G_config.h" 3 4 +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 +# 16 "/usr/include/_G_config.h" 2 3 4 + + + + +# 1 "/usr/include/wchar.h" 1 3 4 +# 83 "/usr/include/wchar.h" 3 4 +typedef struct +{ + int __count; + union + { + + unsigned int __wch; + + + + char __wchb[4]; + } __value; +} __mbstate_t; +# 21 "/usr/include/_G_config.h" 2 3 4 + +typedef struct +{ + __off_t __pos; + __mbstate_t __state; +} _G_fpos_t; +typedef struct +{ + __off64_t __pos; + __mbstate_t __state; +} _G_fpos64_t; +# 53 "/usr/include/_G_config.h" 3 4 +typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); +typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); +# 33 "/usr/include/libio.h" 2 3 4 +# 53 "/usr/include/libio.h" 3 4 +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stdarg.h" 1 3 4 +# 40 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stdarg.h" 3 4 +typedef __builtin_va_list __gnuc_va_list; +# 54 "/usr/include/libio.h" 2 3 4 +# 172 "/usr/include/libio.h" 3 4 +struct _IO_jump_t; struct _IO_FILE; +# 182 "/usr/include/libio.h" 3 4 +typedef void _IO_lock_t; + + + + + +struct _IO_marker { + struct _IO_marker *_next; + struct _IO_FILE *_sbuf; + + + + int _pos; +# 205 "/usr/include/libio.h" 3 4 +}; + + +enum __codecvt_result +{ + __codecvt_ok, + __codecvt_partial, + __codecvt_error, + __codecvt_noconv +}; +# 273 "/usr/include/libio.h" 3 4 +struct _IO_FILE { + int _flags; + + + + + char* _IO_read_ptr; + char* _IO_read_end; + char* _IO_read_base; + char* _IO_write_base; + char* _IO_write_ptr; + char* _IO_write_end; + char* _IO_buf_base; + char* _IO_buf_end; + + char *_IO_save_base; + char *_IO_backup_base; + char *_IO_save_end; + + struct _IO_marker *_markers; + + struct _IO_FILE *_chain; + + int _fileno; + + + + int _flags2; + + __off_t _old_offset; + + + + unsigned short _cur_column; + signed char _vtable_offset; + char _shortbuf[1]; + + + + _IO_lock_t *_lock; +# 321 "/usr/include/libio.h" 3 4 + __off64_t _offset; +# 330 "/usr/include/libio.h" 3 4 + void *__pad1; + void *__pad2; + void *__pad3; + void *__pad4; + size_t __pad5; + + int _mode; + + char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; + +}; + + +typedef struct _IO_FILE _IO_FILE; + + +struct _IO_FILE_plus; + +extern struct _IO_FILE_plus _IO_2_1_stdin_; +extern struct _IO_FILE_plus _IO_2_1_stdout_; +extern struct _IO_FILE_plus _IO_2_1_stderr_; +# 366 "/usr/include/libio.h" 3 4 +typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); + + + + + + + +typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, + size_t __n); + + + + + + + +typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); + + +typedef int __io_close_fn (void *__cookie); + + + + +typedef __io_read_fn cookie_read_function_t; +typedef __io_write_fn cookie_write_function_t; +typedef __io_seek_fn cookie_seek_function_t; +typedef __io_close_fn cookie_close_function_t; + + +typedef struct +{ + __io_read_fn *read; + __io_write_fn *write; + __io_seek_fn *seek; + __io_close_fn *close; +} _IO_cookie_io_functions_t; +typedef _IO_cookie_io_functions_t cookie_io_functions_t; + +struct _IO_cookie_file; + + +extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, + void *__cookie, _IO_cookie_io_functions_t __fns); + + + + + + + +extern int __underflow (_IO_FILE *); +extern int __uflow (_IO_FILE *); +extern int __overflow (_IO_FILE *, int); +# 462 "/usr/include/libio.h" 3 4 +extern int _IO_getc (_IO_FILE *__fp); +extern int _IO_putc (int __c, _IO_FILE *__fp); +extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__ , __leaf__)); +extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__ , __leaf__)); + +extern int _IO_peekc_locked (_IO_FILE *__fp); + + + + + +extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__)); +extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__)); +extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__)); +# 492 "/usr/include/libio.h" 3 4 +extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, + __gnuc_va_list, int *__restrict); +extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, + __gnuc_va_list); +extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); +extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); + +extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); +extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); + +extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__)); +# 76 "/usr/include/stdio.h" 2 3 4 + + + + +typedef __gnuc_va_list va_list; +# 109 "/usr/include/stdio.h" 3 4 + + + + +typedef _G_fpos64_t fpos_t; + + + +typedef _G_fpos64_t fpos64_t; +# 165 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/bits/stdio_lim.h" 1 3 4 +# 166 "/usr/include/stdio.h" 2 3 4 + + + +extern struct _IO_FILE *stdin; +extern struct _IO_FILE *stdout; +extern struct _IO_FILE *stderr; + + + + + + + +extern int remove (__const char *__filename) __attribute__ ((__nothrow__ , __leaf__)); + +extern int rename (__const char *__old, __const char *__new) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern int renameat (int __oldfd, __const char *__old, int __newfd, + __const char *__new) __attribute__ ((__nothrow__ , __leaf__)); + + + +# 199 "/usr/include/stdio.h" 3 4 +extern FILE *tmpfile (void) __asm__ ("" "tmpfile64") __attribute__ ((__warn_unused_result__)); + + + + + + +extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__)); + + + +extern char *tmpnam (char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + + + + +extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); +# 228 "/usr/include/stdio.h" 3 4 +extern char *tempnam (__const char *__dir, __const char *__pfx) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fclose (FILE *__stream); + + + + +extern int fflush (FILE *__stream); + +# 253 "/usr/include/stdio.h" 3 4 +extern int fflush_unlocked (FILE *__stream); +# 263 "/usr/include/stdio.h" 3 4 +extern int fcloseall (void); + + + + +# 284 "/usr/include/stdio.h" 3 4 +extern FILE *fopen (__const char *__restrict __filename, __const char *__restrict __modes) __asm__ ("" "fopen64") + + __attribute__ ((__warn_unused_result__)); +extern FILE *freopen (__const char *__restrict __filename, __const char *__restrict __modes, FILE *__restrict __stream) __asm__ ("" "freopen64") + + + __attribute__ ((__warn_unused_result__)); + + + + + + + +extern FILE *fopen64 (__const char *__restrict __filename, + __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); +extern FILE *freopen64 (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *fdopen (int __fd, __const char *__modes) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + + + + +extern FILE *fopencookie (void *__restrict __magic_cookie, + __const char *__restrict __modes, + _IO_cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + + + +extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + + + + + +extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, + int __modes, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, + size_t __size) __attribute__ ((__nothrow__ , __leaf__)); + + +extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + + +extern int fprintf (FILE *__restrict __stream, + __const char *__restrict __format, ...); + + + + +extern int printf (__const char *__restrict __format, ...); + +extern int sprintf (char *__restrict __s, + __const char *__restrict __format, ...) __attribute__ ((__nothrow__)); + + + + + +extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg); + + + + +extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); + +extern int vsprintf (char *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) __attribute__ ((__nothrow__)); + + + + + +extern int snprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); + +extern int vsnprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); + + + + + + +extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, + __gnuc_va_list __arg) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__)); +extern int __asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +extern int asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +# 418 "/usr/include/stdio.h" 3 4 +extern int vdprintf (int __fd, __const char *__restrict __fmt, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 2, 0))); +extern int dprintf (int __fd, __const char *__restrict __fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); + + + + + + + + +extern int fscanf (FILE *__restrict __stream, + __const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); + + + + +extern int scanf (__const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); + +extern int sscanf (__const char *__restrict __s, + __const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__)); +# 469 "/usr/include/stdio.h" 3 4 + + + + + + + + +extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); + + +extern int vsscanf (__const char *__restrict __s, + __const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__scanf__, 2, 0))); +# 528 "/usr/include/stdio.h" 3 4 + + + + + + + + + +extern int fgetc (FILE *__stream); +extern int getc (FILE *__stream); + + + + + +extern int getchar (void); + +# 556 "/usr/include/stdio.h" 3 4 +extern int getc_unlocked (FILE *__stream); +extern int getchar_unlocked (void); +# 567 "/usr/include/stdio.h" 3 4 +extern int fgetc_unlocked (FILE *__stream); + + + + + + + + + + + +extern int fputc (int __c, FILE *__stream); +extern int putc (int __c, FILE *__stream); + + + + + +extern int putchar (int __c); + +# 600 "/usr/include/stdio.h" 3 4 +extern int fputc_unlocked (int __c, FILE *__stream); + + + + + + + +extern int putc_unlocked (int __c, FILE *__stream); +extern int putchar_unlocked (int __c); + + + + + + +extern int getw (FILE *__stream); + + +extern int putw (int __w, FILE *__stream); + + + + + + + + +extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) + __attribute__ ((__warn_unused_result__)); + + + + + + +extern char *gets (char *__s) __attribute__ ((__warn_unused_result__)); + +# 646 "/usr/include/stdio.h" 3 4 +extern char *fgets_unlocked (char *__restrict __s, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +# 662 "/usr/include/stdio.h" 3 4 +extern __ssize_t __getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern __ssize_t getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern __ssize_t getline (char **__restrict __lineptr, + size_t *__restrict __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); + + + + + +extern int puts (__const char *__s); + + + + + + +extern int ungetc (int __c, FILE *__stream); + + + + + + +extern size_t fread (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + +extern size_t fwrite (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __s) __attribute__ ((__warn_unused_result__)); + +# 723 "/usr/include/stdio.h" 3 4 +extern int fputs_unlocked (__const char *__restrict __s, + FILE *__restrict __stream); +# 734 "/usr/include/stdio.h" 3 4 +extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern int fseek (FILE *__stream, long int __off, int __whence); + + + + +extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)); + + + + +extern void rewind (FILE *__stream); + +# 778 "/usr/include/stdio.h" 3 4 +extern int fseeko (FILE *__stream, __off64_t __off, int __whence) __asm__ ("" "fseeko64") + + ; +extern __off64_t ftello (FILE *__stream) __asm__ ("" "ftello64"); + + + + + + + + +# 803 "/usr/include/stdio.h" 3 4 +extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos) __asm__ ("" "fgetpos64") + ; +extern int fsetpos (FILE *__stream, __const fpos_t *__pos) __asm__ ("" "fsetpos64") + ; + + + + + + + + +extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); +extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__)); +extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); +extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); + + + + +extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); + +extern int feof (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + +extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + + + +extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); +extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); +extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + + + + + + + +extern void perror (__const char *__s); + + + + + + +# 1 "/usr/include/bits/sys_errlist.h" 1 3 4 +# 27 "/usr/include/bits/sys_errlist.h" 3 4 +extern int sys_nerr; +extern __const char *__const sys_errlist[]; + + +extern int _sys_nerr; +extern __const char *__const _sys_errlist[]; +# 851 "/usr/include/stdio.h" 2 3 4 + + + + +extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + + + +extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); +# 870 "/usr/include/stdio.h" 3 4 +extern FILE *popen (__const char *__command, __const char *__modes) __attribute__ ((__warn_unused_result__)); + + + + + +extern int pclose (FILE *__stream); + + + + + +extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern char *cuserid (char *__s); + + + + +struct obstack; + + +extern int obstack_printf (struct obstack *__restrict __obstack, + __const char *__restrict __format, ...) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))); +extern int obstack_vprintf (struct obstack *__restrict __obstack, + __const char *__restrict __format, + __gnuc_va_list __args) + __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))); + + + + + + + +extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + +extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); +# 931 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/bits/stdio.h" 1 3 4 +# 44 "/usr/include/bits/stdio.h" 3 4 +extern __inline int +getchar (void) +{ + return _IO_getc (stdin); +} + + + + +extern __inline int +fgetc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} + + + + + +extern __inline int +getc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} + + +extern __inline int +getchar_unlocked (void) +{ + return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); +} + + + + +extern __inline int +putchar (int __c) +{ + return _IO_putc (__c, stdout); +} + + + + +extern __inline int +fputc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} + + + + + +extern __inline int +putc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} + + +extern __inline int +putchar_unlocked (int __c) +{ + return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); +} + + + + + +extern __inline __ssize_t +getline (char **__lineptr, size_t *__n, FILE *__stream) +{ + return __getdelim (__lineptr, __n, '\n', __stream); +} + + + + + +extern __inline int +__attribute__ ((__nothrow__ , __leaf__)) feof_unlocked (FILE *__stream) +{ + return (((__stream)->_flags & 0x10) != 0); +} + + +extern __inline int +__attribute__ ((__nothrow__ , __leaf__)) ferror_unlocked (FILE *__stream) +{ + return (((__stream)->_flags & 0x20) != 0); +} +# 932 "/usr/include/stdio.h" 2 3 4 + + +# 1 "/usr/include/bits/stdio2.h" 1 3 4 +# 24 "/usr/include/bits/stdio2.h" 3 4 +extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, + __const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__)); +extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, + __const char *__restrict __format, + __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__)); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__nothrow__ , __leaf__)) sprintf (char *__restrict __s, __const char *__restrict __fmt, ...) +{ + return __builtin___sprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__nothrow__ , __leaf__)) vsprintf (char *__restrict __s, __const char *__restrict __fmt, __gnuc_va_list __ap) + +{ + return __builtin___vsprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} + + + +extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, __const char *__restrict __format, + ...) __attribute__ ((__nothrow__ , __leaf__)); +extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, __const char *__restrict __format, + __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__)); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__nothrow__ , __leaf__)) snprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, ...) + +{ + return __builtin___snprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__nothrow__ , __leaf__)) vsnprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, __gnuc_va_list __ap) + +{ + return __builtin___vsnprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} + + + + + +extern int __fprintf_chk (FILE *__restrict __stream, int __flag, + __const char *__restrict __format, ...); +extern int __printf_chk (int __flag, __const char *__restrict __format, ...); +extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, + __const char *__restrict __format, __gnuc_va_list __ap); +extern int __vprintf_chk (int __flag, __const char *__restrict __format, + __gnuc_va_list __ap); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +fprintf (FILE *__restrict __stream, __const char *__restrict __fmt, ...) +{ + return __fprintf_chk (__stream, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +printf (__const char *__restrict __fmt, ...) +{ + return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); +} + + + + + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +vprintf (__const char *__restrict __fmt, __gnuc_va_list __ap) +{ + + return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap); + + + +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +vfprintf (FILE *__restrict __stream, + __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap); +} + + + +extern int __asprintf_chk (char **__restrict __ptr, int __flag, + __const char *__restrict __fmt, ...) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__)); +extern int __vasprintf_chk (char **__restrict __ptr, int __flag, + __const char *__restrict __fmt, __gnuc_va_list __arg) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__)); +extern int __dprintf_chk (int __fd, int __flag, __const char *__restrict __fmt, + ...) __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __vdprintf_chk (int __fd, int __flag, + __const char *__restrict __fmt, __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 3, 0))); +extern int __obstack_printf_chk (struct obstack *__restrict __obstack, + int __flag, __const char *__restrict __format, + ...) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack, + int __flag, + __const char *__restrict __format, + __gnuc_va_list __args) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 0))); + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__nothrow__ , __leaf__)) asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__nothrow__ , __leaf__)) __asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) + +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +dprintf (int __fd, __const char *__restrict __fmt, ...) +{ + return __dprintf_chk (__fd, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__nothrow__ , __leaf__)) obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, ...) + +{ + return __obstack_printf_chk (__obstack, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +# 195 "/usr/include/bits/stdio2.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__nothrow__ , __leaf__)) vasprintf (char **__restrict __ptr, __const char *__restrict __fmt, __gnuc_va_list __ap) + +{ + return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__nothrow__ , __leaf__)) obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, __gnuc_va_list __ap) + +{ + return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt, + __ap); +} + + + + + +extern char *__gets_chk (char *__str, size_t) __attribute__ ((__warn_unused_result__)); +extern char *__gets_warn (char *__str) __asm__ ("" "gets") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use fgets or getline instead, gets can't " "specify buffer size"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * +gets (char *__str) +{ + if (__builtin_object_size (__str, 2 > 1) != (size_t) -1) + return __gets_chk (__str, __builtin_object_size (__str, 2 > 1)); + return __gets_warn (__str); +} + +extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") + + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_alias (__s, __n, __stream); +} + +extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") + + + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk") + + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + } + return __fread_alias (__ptr, __size, __n, __stream); +} + + +extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size, + int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked") + + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_unlocked_alias (__s, __n, __stream); +} + + + + +extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") + + + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk") + + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + } + + + if (__builtin_constant_p (__size) + && __builtin_constant_p (__n) + && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) + && __size * __n <= 8) + { + size_t __cnt = __size * __n; + char *__cptr = (char *) __ptr; + if (__cnt == 0) + return 0; + + for (; __cnt > 0; --__cnt) + { + int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++); + if (__c == (-1)) + break; + *__cptr++ = __c; + } + return (__cptr - (char *) __ptr) / __size; + } + + return __fread_unlocked_alias (__ptr, __size, __n, __stream); +} +# 935 "/usr/include/stdio.h" 2 3 4 + + + + + + +# 24 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stdarg.h" 1 3 4 +# 25 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stdbool.h" 1 3 4 +# 26 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 +# 1 "/usr/include/string.h" 1 3 4 +# 29 "/usr/include/string.h" 3 4 + + + + + +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 +# 35 "/usr/include/string.h" 2 3 4 + + + + + + + + + +extern void *memcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern void *memmove (void *__dest, __const void *__src, size_t __n) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, + int __c, size_t __n) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 95 "/usr/include/string.h" 3 4 +extern void *memchr (__const void *__s, int __c, size_t __n) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +# 109 "/usr/include/string.h" 3 4 +extern void *rawmemchr (__const void *__s, int __c) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +# 120 "/usr/include/string.h" 3 4 +extern void *memrchr (__const void *__s, int __c, size_t __n) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + +extern char *strncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern char *strcat (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + +extern char *strncat (char *__restrict __dest, __const char *__restrict __src, + size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strcmp (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strcoll (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + +extern size_t strxfrm (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); + +# 165 "/usr/include/string.h" 3 4 +extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); + +extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, + __locale_t __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))); + + + + + +extern char *strdup (__const char *__s) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern char *strndup (__const char *__string, size_t __n) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); +# 210 "/usr/include/string.h" 3 4 + +# 235 "/usr/include/string.h" 3 4 +extern char *strchr (__const char *__s, int __c) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +# 262 "/usr/include/string.h" 3 4 +extern char *strrchr (__const char *__s, int __c) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + +# 276 "/usr/include/string.h" 3 4 +extern char *strchrnul (__const char *__s, int __c) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern size_t strcspn (__const char *__s, __const char *__reject) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern size_t strspn (__const char *__s, __const char *__accept) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 314 "/usr/include/string.h" 3 4 +extern char *strpbrk (__const char *__s, __const char *__accept) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 342 "/usr/include/string.h" 3 4 +extern char *strstr (__const char *__haystack, __const char *__needle) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern char *strtok (char *__restrict __s, __const char *__restrict __delim) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); + + + + +extern char *__strtok_r (char *__restrict __s, + __const char *__restrict __delim, + char **__restrict __save_ptr) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); + +extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, + char **__restrict __save_ptr) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); +# 373 "/usr/include/string.h" 3 4 +extern char *strcasestr (__const char *__haystack, __const char *__needle) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + + +extern void *memmem (__const void *__haystack, size_t __haystacklen, + __const void *__needle, size_t __needlelen) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); + + + +extern void *__mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); +extern void *mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern size_t strlen (__const char *__s) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern size_t strnlen (__const char *__string, size_t __maxlen) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern char *strerror (int __errnum) __attribute__ ((__nothrow__ , __leaf__)); + +# 438 "/usr/include/string.h" 3 4 +extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); + + + + + +extern char *strerror_l (int __errnum, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern void __bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + +extern void bcopy (__const void *__src, void *__dest, size_t __n) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +# 489 "/usr/include/string.h" 3 4 +extern char *index (__const char *__s, int __c) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +# 517 "/usr/include/string.h" 3 4 +extern char *rindex (__const char *__s, int __c) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); + + + + +extern int ffs (int __i) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + + + +extern int ffsl (long int __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + +__extension__ extern int ffsll (long long int __ll) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + + + +extern int strcasecmp (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern int strcasecmp_l (__const char *__s1, __const char *__s2, + __locale_t __loc) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); + +extern int strncasecmp_l (__const char *__s1, __const char *__s2, + size_t __n, __locale_t __loc) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); + + + + + +extern char *strsep (char **__restrict __stringp, + __const char *__restrict __delim) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern char *strsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__)); + + +extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern char *__stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int strverscmp (__const char *__s1, __const char *__s2) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern char *strfry (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); +# 606 "/usr/include/string.h" 3 4 +extern char *basename (__const char *__filename) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); +# 634 "/usr/include/string.h" 3 4 +# 1 "/usr/include/bits/string.h" 1 3 4 +# 635 "/usr/include/string.h" 2 3 4 + + +# 1 "/usr/include/bits/string2.h" 1 3 4 +# 394 "/usr/include/bits/string2.h" 3 4 +extern void *__rawmemchr (const void *__s, int __c); +# 969 "/usr/include/bits/string2.h" 3 4 +extern __inline size_t __strcspn_c1 (__const char *__s, int __reject); +extern __inline size_t +__strcspn_c1 (__const char *__s, int __reject) +{ + register size_t __result = 0; + while (__s[__result] != '\0' && __s[__result] != __reject) + ++__result; + return __result; +} + +extern __inline size_t __strcspn_c2 (__const char *__s, int __reject1, + int __reject2); +extern __inline size_t +__strcspn_c2 (__const char *__s, int __reject1, int __reject2) +{ + register size_t __result = 0; + while (__s[__result] != '\0' && __s[__result] != __reject1 + && __s[__result] != __reject2) + ++__result; + return __result; +} + +extern __inline size_t __strcspn_c3 (__const char *__s, int __reject1, + int __reject2, int __reject3); +extern __inline size_t +__strcspn_c3 (__const char *__s, int __reject1, int __reject2, + int __reject3) +{ + register size_t __result = 0; + while (__s[__result] != '\0' && __s[__result] != __reject1 + && __s[__result] != __reject2 && __s[__result] != __reject3) + ++__result; + return __result; +} +# 1045 "/usr/include/bits/string2.h" 3 4 +extern __inline size_t __strspn_c1 (__const char *__s, int __accept); +extern __inline size_t +__strspn_c1 (__const char *__s, int __accept) +{ + register size_t __result = 0; + + while (__s[__result] == __accept) + ++__result; + return __result; +} + +extern __inline size_t __strspn_c2 (__const char *__s, int __accept1, + int __accept2); +extern __inline size_t +__strspn_c2 (__const char *__s, int __accept1, int __accept2) +{ + register size_t __result = 0; + + while (__s[__result] == __accept1 || __s[__result] == __accept2) + ++__result; + return __result; +} + +extern __inline size_t __strspn_c3 (__const char *__s, int __accept1, + int __accept2, int __accept3); +extern __inline size_t +__strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3) +{ + register size_t __result = 0; + + while (__s[__result] == __accept1 || __s[__result] == __accept2 + || __s[__result] == __accept3) + ++__result; + return __result; +} +# 1121 "/usr/include/bits/string2.h" 3 4 +extern __inline char *__strpbrk_c2 (__const char *__s, int __accept1, + int __accept2); +extern __inline char * +__strpbrk_c2 (__const char *__s, int __accept1, int __accept2) +{ + + while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) + ++__s; + return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; +} + +extern __inline char *__strpbrk_c3 (__const char *__s, int __accept1, + int __accept2, int __accept3); +extern __inline char * +__strpbrk_c3 (__const char *__s, int __accept1, int __accept2, + int __accept3) +{ + + while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 + && *__s != __accept3) + ++__s; + return *__s == '\0' ? ((void *)0) : (char *) (size_t) __s; +} +# 1172 "/usr/include/bits/string2.h" 3 4 +extern __inline char *__strtok_r_1c (char *__s, char __sep, char **__nextp); +extern __inline char * +__strtok_r_1c (char *__s, char __sep, char **__nextp) +{ + char *__result; + if (__s == ((void *)0)) + __s = *__nextp; + while (*__s == __sep) + ++__s; + __result = ((void *)0); + if (*__s != '\0') + { + __result = __s++; + while (*__s != '\0') + if (*__s++ == __sep) + { + __s[-1] = '\0'; + break; + } + } + *__nextp = __s; + return __result; +} +# 1204 "/usr/include/bits/string2.h" 3 4 +extern char *__strsep_g (char **__stringp, __const char *__delim); +# 1222 "/usr/include/bits/string2.h" 3 4 +extern __inline char *__strsep_1c (char **__s, char __reject); +extern __inline char * +__strsep_1c (char **__s, char __reject) +{ + register char *__retval = *__s; + if (__retval != ((void *)0) && (*__s = (__extension__ (__builtin_constant_p (__reject) && !__builtin_constant_p (__retval) && (__reject) == '\0' ? (char *) __rawmemchr (__retval, __reject) : __builtin_strchr (__retval, __reject)))) != ((void *)0)) + *(*__s)++ = '\0'; + return __retval; +} + +extern __inline char *__strsep_2c (char **__s, char __reject1, char __reject2); +extern __inline char * +__strsep_2c (char **__s, char __reject1, char __reject2) +{ + register char *__retval = *__s; + if (__retval != ((void *)0)) + { + register char *__cp = __retval; + while (1) + { + if (*__cp == '\0') + { + __cp = ((void *)0); + break; + } + if (*__cp == __reject1 || *__cp == __reject2) + { + *__cp++ = '\0'; + break; + } + ++__cp; + } + *__s = __cp; + } + return __retval; +} + +extern __inline char *__strsep_3c (char **__s, char __reject1, char __reject2, + char __reject3); +extern __inline char * +__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) +{ + register char *__retval = *__s; + if (__retval != ((void *)0)) + { + register char *__cp = __retval; + while (1) + { + if (*__cp == '\0') + { + __cp = ((void *)0); + break; + } + if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) + { + *__cp++ = '\0'; + break; + } + ++__cp; + } + *__s = __cp; + } + return __retval; +} +# 1303 "/usr/include/bits/string2.h" 3 4 +extern char *__strdup (__const char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)); +# 1322 "/usr/include/bits/string2.h" 3 4 +extern char *__strndup (__const char *__string, size_t __n) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)); +# 638 "/usr/include/string.h" 2 3 4 + + + + +# 1 "/usr/include/bits/string3.h" 1 3 4 +# 23 "/usr/include/bits/string3.h" 3 4 +extern void __warn_memset_zero_len (void) __attribute__((__warning__ ("memset used with constant zero length parameter; this could be due to transposed parameters"))) + ; +# 48 "/usr/include/bits/string3.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void * +__attribute__ ((__nothrow__ , __leaf__)) memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) + +{ + return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void * +__attribute__ ((__nothrow__ , __leaf__)) memmove (void *__dest, __const void *__src, size_t __len) +{ + return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void * +__attribute__ ((__nothrow__ , __leaf__)) mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) + +{ + return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} +# 76 "/usr/include/bits/string3.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void * +__attribute__ ((__nothrow__ , __leaf__)) memset (void *__dest, int __ch, size_t __len) +{ + if (__builtin_constant_p (__len) && __len == 0 + && (!__builtin_constant_p (__ch) || __ch != 0)) + { + __warn_memset_zero_len (); + return __dest; + } + return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void +__attribute__ ((__nothrow__ , __leaf__)) bcopy (__const void *__src, void *__dest, size_t __len) +{ + (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) void +__attribute__ ((__nothrow__ , __leaf__)) bzero (void *__dest, size_t __len) +{ + (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * +__attribute__ ((__nothrow__ , __leaf__)) strcpy (char *__restrict __dest, __const char *__restrict __src) +{ + return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * +__attribute__ ((__nothrow__ , __leaf__)) stpcpy (char *__restrict __dest, __const char *__restrict __src) +{ + return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * +__attribute__ ((__nothrow__ , __leaf__)) strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __len) + +{ + return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); +} + + +extern char *__stpncpy_chk (char *__dest, __const char *__src, size_t __n, + size_t __destlen) __attribute__ ((__nothrow__ , __leaf__)); +extern char *__stpncpy_alias (char *__dest, __const char *__src, size_t __n) __asm__ ("" "stpncpy") __attribute__ ((__nothrow__ , __leaf__)) + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * +__attribute__ ((__nothrow__ , __leaf__)) stpncpy (char *__dest, __const char *__src, size_t __n) +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1 + && (!__builtin_constant_p (__n) || __n <= __builtin_object_size (__dest, 2 > 1))) + return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1)); + return __stpncpy_alias (__dest, __src, __n); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * +__attribute__ ((__nothrow__ , __leaf__)) strcat (char *__restrict __dest, __const char *__restrict __src) +{ + return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) char * +__attribute__ ((__nothrow__ , __leaf__)) strncat (char *__restrict __dest, __const char *__restrict __src, size_t __len) + +{ + return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); +} +# 643 "/usr/include/string.h" 2 3 4 + + + + +# 27 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 +# 1 "/usr/include/strings.h" 1 3 4 +# 28 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 +# 1 "/usr/include/inttypes.h" 1 3 4 +# 28 "/usr/include/inttypes.h" 3 4 +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stdint.h" 1 3 4 + + +# 1 "/usr/include/stdint.h" 1 3 4 +# 27 "/usr/include/stdint.h" 3 4 +# 1 "/usr/include/bits/wchar.h" 1 3 4 +# 28 "/usr/include/stdint.h" 2 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 29 "/usr/include/stdint.h" 2 3 4 +# 49 "/usr/include/stdint.h" 3 4 +typedef unsigned char uint8_t; +typedef unsigned short int uint16_t; + +typedef unsigned int uint32_t; + + + + + +__extension__ +typedef unsigned long long int uint64_t; + + + + + + +typedef signed char int_least8_t; +typedef short int int_least16_t; +typedef int int_least32_t; + + + +__extension__ +typedef long long int int_least64_t; + + + +typedef unsigned char uint_least8_t; +typedef unsigned short int uint_least16_t; +typedef unsigned int uint_least32_t; + + + +__extension__ +typedef unsigned long long int uint_least64_t; + + + + + + +typedef signed char int_fast8_t; + + + + + +typedef int int_fast16_t; +typedef int int_fast32_t; +__extension__ +typedef long long int int_fast64_t; + + + +typedef unsigned char uint_fast8_t; + + + + + +typedef unsigned int uint_fast16_t; +typedef unsigned int uint_fast32_t; +__extension__ +typedef unsigned long long int uint_fast64_t; +# 126 "/usr/include/stdint.h" 3 4 +typedef int intptr_t; + + +typedef unsigned int uintptr_t; +# 138 "/usr/include/stdint.h" 3 4 +__extension__ +typedef long long int intmax_t; +__extension__ +typedef unsigned long long int uintmax_t; +# 4 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stdint.h" 2 3 4 +# 29 "/usr/include/inttypes.h" 2 3 4 + + + + + + +typedef int __gwchar_t; +# 274 "/usr/include/inttypes.h" 3 4 + +# 288 "/usr/include/inttypes.h" 3 4 +typedef struct + { + long long int quot; + long long int rem; + } imaxdiv_t; + + + + + +extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern intmax_t strtoimax (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)); + + +extern uintmax_t strtoumax (__const char *__restrict __nptr, + char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__)); + + +extern intmax_t wcstoimax (__const __gwchar_t *__restrict __nptr, + __gwchar_t **__restrict __endptr, int __base) + __attribute__ ((__nothrow__ , __leaf__)); + + +extern uintmax_t wcstoumax (__const __gwchar_t *__restrict __nptr, + __gwchar_t ** __restrict __endptr, int __base) + __attribute__ ((__nothrow__ , __leaf__)); +# 379 "/usr/include/inttypes.h" 3 4 +__extension__ +extern long long int __strtoll_internal (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, int __group) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern __inline intmax_t +__attribute__ ((__nothrow__ , __leaf__)) strtoimax (__const char *__restrict nptr, char **__restrict endptr, int base) + +{ + return __strtoll_internal (nptr, endptr, base, 0); +} + +__extension__ +extern unsigned long long int __strtoull_internal (__const char * + __restrict __nptr, + char ** + __restrict __endptr, + int __base, + int __group) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern __inline uintmax_t +__attribute__ ((__nothrow__ , __leaf__)) strtoumax (__const char *__restrict nptr, char **__restrict endptr, int base) + +{ + return __strtoull_internal (nptr, endptr, base, 0); +} + +__extension__ +extern long long int __wcstoll_internal (__const __gwchar_t * + __restrict __nptr, + __gwchar_t **__restrict __endptr, + int __base, int __group) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern __inline intmax_t +__attribute__ ((__nothrow__ , __leaf__)) wcstoimax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) + +{ + return __wcstoll_internal (nptr, endptr, base, 0); +} + + +__extension__ +extern unsigned long long int __wcstoull_internal (__const __gwchar_t * + __restrict __nptr, + __gwchar_t ** + __restrict __endptr, + int __base, + int __group) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + +extern __inline uintmax_t +__attribute__ ((__nothrow__ , __leaf__)) wcstoumax (__const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base) + +{ + return __wcstoull_internal (nptr, endptr, base, 0); +} + + + + + +# 29 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include-fixed/limits.h" 1 3 4 +# 34 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include-fixed/limits.h" 3 4 +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include-fixed/syslimits.h" 1 3 4 + + + + + + +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include-fixed/limits.h" 1 3 4 +# 169 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include-fixed/limits.h" 3 4 +# 1 "/usr/include/limits.h" 1 3 4 +# 145 "/usr/include/limits.h" 3 4 +# 1 "/usr/include/bits/posix1_lim.h" 1 3 4 +# 157 "/usr/include/bits/posix1_lim.h" 3 4 +# 1 "/usr/include/bits/local_lim.h" 1 3 4 +# 39 "/usr/include/bits/local_lim.h" 3 4 +# 1 "/usr/include/linux/limits.h" 1 3 4 +# 40 "/usr/include/bits/local_lim.h" 2 3 4 +# 158 "/usr/include/bits/posix1_lim.h" 2 3 4 +# 146 "/usr/include/limits.h" 2 3 4 + + + +# 1 "/usr/include/bits/posix2_lim.h" 1 3 4 +# 150 "/usr/include/limits.h" 2 3 4 + + + +# 1 "/usr/include/bits/xopen_lim.h" 1 3 4 +# 34 "/usr/include/bits/xopen_lim.h" 3 4 +# 1 "/usr/include/bits/stdio_lim.h" 1 3 4 +# 35 "/usr/include/bits/xopen_lim.h" 2 3 4 +# 154 "/usr/include/limits.h" 2 3 4 +# 170 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include-fixed/limits.h" 2 3 4 +# 8 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include-fixed/syslimits.h" 2 3 4 +# 35 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include-fixed/limits.h" 2 3 4 +# 30 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 +# 1 "/usr/include/time.h" 1 3 4 +# 30 "/usr/include/time.h" 3 4 + + + + + + + + +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 +# 39 "/usr/include/time.h" 2 3 4 + + + +# 1 "/usr/include/bits/time.h" 1 3 4 +# 86 "/usr/include/bits/time.h" 3 4 +# 1 "/usr/include/bits/timex.h" 1 3 4 +# 24 "/usr/include/bits/timex.h" 3 4 +struct timex +{ + unsigned int modes; + long int offset; + long int freq; + long int maxerror; + long int esterror; + int status; + long int constant; + long int precision; + long int tolerance; + struct timeval time; + long int tick; + + long int ppsfreq; + long int jitter; + int shift; + long int stabil; + long int jitcnt; + long int calcnt; + long int errcnt; + long int stbcnt; + + int tai; + + + int :32; int :32; int :32; int :32; + int :32; int :32; int :32; int :32; + int :32; int :32; int :32; +}; +# 87 "/usr/include/bits/time.h" 2 3 4 + + + + +extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __attribute__ ((__nothrow__ , __leaf__)); + + +# 43 "/usr/include/time.h" 2 3 4 +# 131 "/usr/include/time.h" 3 4 + + +struct tm +{ + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; + + + long int tm_gmtoff; + __const char *tm_zone; + + + + +}; + + + + + + + + +struct itimerspec + { + struct timespec it_interval; + struct timespec it_value; + }; + + +struct sigevent; +# 180 "/usr/include/time.h" 3 4 + + + +extern clock_t clock (void) __attribute__ ((__nothrow__ , __leaf__)); + + +extern time_t time (time_t *__timer) __attribute__ ((__nothrow__ , __leaf__)); + + +extern double difftime (time_t __time1, time_t __time0) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern size_t strftime (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern char *strptime (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp) + __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + +extern size_t strftime_l (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp, + __locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern char *strptime_l (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp, + __locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern struct tm *gmtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern struct tm *localtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__)); + + +extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + +extern char *asctime_r (__const struct tm *__restrict __tp, + char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)); + + +extern char *ctime_r (__const time_t *__restrict __timer, + char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern char *__tzname[2]; +extern int __daylight; +extern long int __timezone; + + + + +extern char *tzname[2]; + + + +extern void tzset (void) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern int daylight; +extern long int timezone; + + + + + +extern int stime (__const time_t *__when) __attribute__ ((__nothrow__ , __leaf__)); +# 313 "/usr/include/time.h" 3 4 +extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__)); + + +extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int dysize (int __year) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); +# 328 "/usr/include/time.h" 3 4 +extern int nanosleep (__const struct timespec *__requested_time, + struct timespec *__remaining); + + + +extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) + __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern int clock_nanosleep (clockid_t __clock_id, int __flags, + __const struct timespec *__req, + struct timespec *__rem); + + +extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern int timer_create (clockid_t __clock_id, + struct sigevent *__restrict __evp, + timer_t *__restrict __timerid) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int timer_settime (timer_t __timerid, int __flags, + __const struct itimerspec *__restrict __value, + struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) + __attribute__ ((__nothrow__ , __leaf__)); + + +extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__)); +# 390 "/usr/include/time.h" 3 4 +extern int getdate_err; +# 399 "/usr/include/time.h" 3 4 +extern struct tm *getdate (__const char *__string); +# 413 "/usr/include/time.h" 3 4 +extern int getdate_r (__const char *__restrict __string, + struct tm *__restrict __resbufp); + + + +# 31 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 +# 1 "/usr/include/ctype.h" 1 3 4 +# 30 "/usr/include/ctype.h" 3 4 + +# 48 "/usr/include/ctype.h" 3 4 +enum +{ + _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), + _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), + _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), + _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), + _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), + _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), + _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), + _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), + _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), + _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), + _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), + _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) +}; +# 81 "/usr/include/ctype.h" 3 4 +extern __const unsigned short int **__ctype_b_loc (void) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const)); +extern __const __int32_t **__ctype_tolower_loc (void) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const)); +extern __const __int32_t **__ctype_toupper_loc (void) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const)); +# 106 "/usr/include/ctype.h" 3 4 + + + + + + +extern int isalnum (int) __attribute__ ((__nothrow__ , __leaf__)); +extern int isalpha (int) __attribute__ ((__nothrow__ , __leaf__)); +extern int iscntrl (int) __attribute__ ((__nothrow__ , __leaf__)); +extern int isdigit (int) __attribute__ ((__nothrow__ , __leaf__)); +extern int islower (int) __attribute__ ((__nothrow__ , __leaf__)); +extern int isgraph (int) __attribute__ ((__nothrow__ , __leaf__)); +extern int isprint (int) __attribute__ ((__nothrow__ , __leaf__)); +extern int ispunct (int) __attribute__ ((__nothrow__ , __leaf__)); +extern int isspace (int) __attribute__ ((__nothrow__ , __leaf__)); +extern int isupper (int) __attribute__ ((__nothrow__ , __leaf__)); +extern int isxdigit (int) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern int tolower (int __c) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int toupper (int __c) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + + +extern int isblank (int) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern int isctype (int __c, int __mask) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern int isascii (int __c) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern int toascii (int __c) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern int _toupper (int) __attribute__ ((__nothrow__ , __leaf__)); +extern int _tolower (int) __attribute__ ((__nothrow__ , __leaf__)); +# 216 "/usr/include/ctype.h" 3 4 +extern __inline int +__attribute__ ((__nothrow__ , __leaf__)) tolower (int __c) +{ + return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c; +} + +extern __inline int +__attribute__ ((__nothrow__ , __leaf__)) toupper (int __c) +{ + return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c; +} +# 273 "/usr/include/ctype.h" 3 4 +extern int isalnum_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); +extern int isalpha_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); +extern int iscntrl_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); +extern int isdigit_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); +extern int islower_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); +extern int isgraph_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); +extern int isprint_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); +extern int ispunct_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); +extern int isspace_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); +extern int isupper_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); +extern int isxdigit_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); + +extern int isblank_l (int, __locale_t) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern int __tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); +extern int tolower_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int __toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); +extern int toupper_l (int __c, __locale_t __l) __attribute__ ((__nothrow__ , __leaf__)); +# 349 "/usr/include/ctype.h" 3 4 + +# 32 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 +# 1 "/usr/include/errno.h" 1 3 4 +# 32 "/usr/include/errno.h" 3 4 + + + + +# 1 "/usr/include/bits/errno.h" 1 3 4 +# 25 "/usr/include/bits/errno.h" 3 4 +# 1 "/usr/include/linux/errno.h" 1 3 4 + + + +# 1 "/usr/include/asm/errno.h" 1 3 4 +# 1 "/usr/include/asm-generic/errno.h" 1 3 4 + + + +# 1 "/usr/include/asm-generic/errno-base.h" 1 3 4 +# 5 "/usr/include/asm-generic/errno.h" 2 3 4 +# 1 "/usr/include/asm/errno.h" 2 3 4 +# 5 "/usr/include/linux/errno.h" 2 3 4 +# 26 "/usr/include/bits/errno.h" 2 3 4 +# 47 "/usr/include/bits/errno.h" 3 4 +extern int *__errno_location (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); +# 37 "/usr/include/errno.h" 2 3 4 +# 55 "/usr/include/errno.h" 3 4 +extern char *program_invocation_name, *program_invocation_short_name; + + + + +# 69 "/usr/include/errno.h" 3 4 +typedef int error_t; +# 33 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 +# 1 "/usr/include/unistd.h" 1 3 4 +# 28 "/usr/include/unistd.h" 3 4 + +# 203 "/usr/include/unistd.h" 3 4 +# 1 "/usr/include/bits/posix_opt.h" 1 3 4 +# 204 "/usr/include/unistd.h" 2 3 4 + + + +# 1 "/usr/include/bits/environments.h" 1 3 4 +# 208 "/usr/include/unistd.h" 2 3 4 +# 227 "/usr/include/unistd.h" 3 4 +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 +# 228 "/usr/include/unistd.h" 2 3 4 +# 275 "/usr/include/unistd.h" 3 4 +typedef __socklen_t socklen_t; +# 288 "/usr/include/unistd.h" 3 4 +extern int access (__const char *__name, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + + +extern int euidaccess (__const char *__name, int __type) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int eaccess (__const char *__name, int __type) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int faccessat (int __fd, __const char *__file, int __type, int __flag) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); +# 338 "/usr/include/unistd.h" 3 4 +extern __off64_t lseek (int __fd, __off64_t __offset, int __whence) __asm__ ("" "lseek64") __attribute__ ((__nothrow__ , __leaf__)) + + ; + + + + + +extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) + __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern int close (int __fd); + + + + + + +extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__)); + + + + + +extern ssize_t write (int __fd, __const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__)); +# 389 "/usr/include/unistd.h" 3 4 +extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") + + __attribute__ ((__warn_unused_result__)); +extern ssize_t pwrite (int __fd, __const void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pwrite64") + + __attribute__ ((__warn_unused_result__)); +# 405 "/usr/include/unistd.h" 3 4 +extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset) __attribute__ ((__warn_unused_result__)); + + +extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n, + __off64_t __offset) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + + + +extern int pipe2 (int __pipedes[2], int __flags) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); +# 433 "/usr/include/unistd.h" 3 4 +extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__ , __leaf__)); +# 445 "/usr/include/unistd.h" 3 4 +extern unsigned int sleep (unsigned int __seconds); + + + + + + + +extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) + __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern int usleep (__useconds_t __useconds); +# 470 "/usr/include/unistd.h" 3 4 +extern int pause (void); + + + +extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + +extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + + + +extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + + +extern int fchownat (int __fd, __const char *__file, __uid_t __owner, + __gid_t __group, int __flag) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); + + + +extern int chdir (__const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + +extern int fchdir (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); +# 512 "/usr/include/unistd.h" 3 4 +extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + + + + +extern char *get_current_dir_name (void) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + +extern char *getwd (char *__buf) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)); + + + + +extern int dup (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + +extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern int dup3 (int __fd, int __fd2, int __flags) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern char **__environ; + +extern char **environ; + + + + + +extern int execve (__const char *__path, char *__const __argv[], + char *__const __envp[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[]) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); + + + + +extern int execv (__const char *__path, char *__const __argv[]) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int execle (__const char *__path, __const char *__arg, ...) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int execl (__const char *__path, __const char *__arg, ...) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int execvp (__const char *__file, char *__const __argv[]) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int execlp (__const char *__file, __const char *__arg, ...) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int execvpe (__const char *__file, char *__const __argv[], + char *__const __envp[]) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern int nice (int __inc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + + + +extern void _exit (int __status) __attribute__ ((__noreturn__)); + + + + + +# 1 "/usr/include/bits/confname.h" 1 3 4 +# 26 "/usr/include/bits/confname.h" 3 4 +enum + { + _PC_LINK_MAX, + + _PC_MAX_CANON, + + _PC_MAX_INPUT, + + _PC_NAME_MAX, + + _PC_PATH_MAX, + + _PC_PIPE_BUF, + + _PC_CHOWN_RESTRICTED, + + _PC_NO_TRUNC, + + _PC_VDISABLE, + + _PC_SYNC_IO, + + _PC_ASYNC_IO, + + _PC_PRIO_IO, + + _PC_SOCK_MAXBUF, + + _PC_FILESIZEBITS, + + _PC_REC_INCR_XFER_SIZE, + + _PC_REC_MAX_XFER_SIZE, + + _PC_REC_MIN_XFER_SIZE, + + _PC_REC_XFER_ALIGN, + + _PC_ALLOC_SIZE_MIN, + + _PC_SYMLINK_MAX, + + _PC_2_SYMLINKS + + }; + + +enum + { + _SC_ARG_MAX, + + _SC_CHILD_MAX, + + _SC_CLK_TCK, + + _SC_NGROUPS_MAX, + + _SC_OPEN_MAX, + + _SC_STREAM_MAX, + + _SC_TZNAME_MAX, + + _SC_JOB_CONTROL, + + _SC_SAVED_IDS, + + _SC_REALTIME_SIGNALS, + + _SC_PRIORITY_SCHEDULING, + + _SC_TIMERS, + + _SC_ASYNCHRONOUS_IO, + + _SC_PRIORITIZED_IO, + + _SC_SYNCHRONIZED_IO, + + _SC_FSYNC, + + _SC_MAPPED_FILES, + + _SC_MEMLOCK, + + _SC_MEMLOCK_RANGE, + + _SC_MEMORY_PROTECTION, + + _SC_MESSAGE_PASSING, + + _SC_SEMAPHORES, + + _SC_SHARED_MEMORY_OBJECTS, + + _SC_AIO_LISTIO_MAX, + + _SC_AIO_MAX, + + _SC_AIO_PRIO_DELTA_MAX, + + _SC_DELAYTIMER_MAX, + + _SC_MQ_OPEN_MAX, + + _SC_MQ_PRIO_MAX, + + _SC_VERSION, + + _SC_PAGESIZE, + + + _SC_RTSIG_MAX, + + _SC_SEM_NSEMS_MAX, + + _SC_SEM_VALUE_MAX, + + _SC_SIGQUEUE_MAX, + + _SC_TIMER_MAX, + + + + + _SC_BC_BASE_MAX, + + _SC_BC_DIM_MAX, + + _SC_BC_SCALE_MAX, + + _SC_BC_STRING_MAX, + + _SC_COLL_WEIGHTS_MAX, + + _SC_EQUIV_CLASS_MAX, + + _SC_EXPR_NEST_MAX, + + _SC_LINE_MAX, + + _SC_RE_DUP_MAX, + + _SC_CHARCLASS_NAME_MAX, + + + _SC_2_VERSION, + + _SC_2_C_BIND, + + _SC_2_C_DEV, + + _SC_2_FORT_DEV, + + _SC_2_FORT_RUN, + + _SC_2_SW_DEV, + + _SC_2_LOCALEDEF, + + + _SC_PII, + + _SC_PII_XTI, + + _SC_PII_SOCKET, + + _SC_PII_INTERNET, + + _SC_PII_OSI, + + _SC_POLL, + + _SC_SELECT, + + _SC_UIO_MAXIOV, + + _SC_IOV_MAX = _SC_UIO_MAXIOV, + + _SC_PII_INTERNET_STREAM, + + _SC_PII_INTERNET_DGRAM, + + _SC_PII_OSI_COTS, + + _SC_PII_OSI_CLTS, + + _SC_PII_OSI_M, + + _SC_T_IOV_MAX, + + + + _SC_THREADS, + + _SC_THREAD_SAFE_FUNCTIONS, + + _SC_GETGR_R_SIZE_MAX, + + _SC_GETPW_R_SIZE_MAX, + + _SC_LOGIN_NAME_MAX, + + _SC_TTY_NAME_MAX, + + _SC_THREAD_DESTRUCTOR_ITERATIONS, + + _SC_THREAD_KEYS_MAX, + + _SC_THREAD_STACK_MIN, + + _SC_THREAD_THREADS_MAX, + + _SC_THREAD_ATTR_STACKADDR, + + _SC_THREAD_ATTR_STACKSIZE, + + _SC_THREAD_PRIORITY_SCHEDULING, + + _SC_THREAD_PRIO_INHERIT, + + _SC_THREAD_PRIO_PROTECT, + + _SC_THREAD_PROCESS_SHARED, + + + _SC_NPROCESSORS_CONF, + + _SC_NPROCESSORS_ONLN, + + _SC_PHYS_PAGES, + + _SC_AVPHYS_PAGES, + + _SC_ATEXIT_MAX, + + _SC_PASS_MAX, + + + _SC_XOPEN_VERSION, + + _SC_XOPEN_XCU_VERSION, + + _SC_XOPEN_UNIX, + + _SC_XOPEN_CRYPT, + + _SC_XOPEN_ENH_I18N, + + _SC_XOPEN_SHM, + + + _SC_2_CHAR_TERM, + + _SC_2_C_VERSION, + + _SC_2_UPE, + + + _SC_XOPEN_XPG2, + + _SC_XOPEN_XPG3, + + _SC_XOPEN_XPG4, + + + _SC_CHAR_BIT, + + _SC_CHAR_MAX, + + _SC_CHAR_MIN, + + _SC_INT_MAX, + + _SC_INT_MIN, + + _SC_LONG_BIT, + + _SC_WORD_BIT, + + _SC_MB_LEN_MAX, + + _SC_NZERO, + + _SC_SSIZE_MAX, + + _SC_SCHAR_MAX, + + _SC_SCHAR_MIN, + + _SC_SHRT_MAX, + + _SC_SHRT_MIN, + + _SC_UCHAR_MAX, + + _SC_UINT_MAX, + + _SC_ULONG_MAX, + + _SC_USHRT_MAX, + + + _SC_NL_ARGMAX, + + _SC_NL_LANGMAX, + + _SC_NL_MSGMAX, + + _SC_NL_NMAX, + + _SC_NL_SETMAX, + + _SC_NL_TEXTMAX, + + + _SC_XBS5_ILP32_OFF32, + + _SC_XBS5_ILP32_OFFBIG, + + _SC_XBS5_LP64_OFF64, + + _SC_XBS5_LPBIG_OFFBIG, + + + _SC_XOPEN_LEGACY, + + _SC_XOPEN_REALTIME, + + _SC_XOPEN_REALTIME_THREADS, + + + _SC_ADVISORY_INFO, + + _SC_BARRIERS, + + _SC_BASE, + + _SC_C_LANG_SUPPORT, + + _SC_C_LANG_SUPPORT_R, + + _SC_CLOCK_SELECTION, + + _SC_CPUTIME, + + _SC_THREAD_CPUTIME, + + _SC_DEVICE_IO, + + _SC_DEVICE_SPECIFIC, + + _SC_DEVICE_SPECIFIC_R, + + _SC_FD_MGMT, + + _SC_FIFO, + + _SC_PIPE, + + _SC_FILE_ATTRIBUTES, + + _SC_FILE_LOCKING, + + _SC_FILE_SYSTEM, + + _SC_MONOTONIC_CLOCK, + + _SC_MULTI_PROCESS, + + _SC_SINGLE_PROCESS, + + _SC_NETWORKING, + + _SC_READER_WRITER_LOCKS, + + _SC_SPIN_LOCKS, + + _SC_REGEXP, + + _SC_REGEX_VERSION, + + _SC_SHELL, + + _SC_SIGNALS, + + _SC_SPAWN, + + _SC_SPORADIC_SERVER, + + _SC_THREAD_SPORADIC_SERVER, + + _SC_SYSTEM_DATABASE, + + _SC_SYSTEM_DATABASE_R, + + _SC_TIMEOUTS, + + _SC_TYPED_MEMORY_OBJECTS, + + _SC_USER_GROUPS, + + _SC_USER_GROUPS_R, + + _SC_2_PBS, + + _SC_2_PBS_ACCOUNTING, + + _SC_2_PBS_LOCATE, + + _SC_2_PBS_MESSAGE, + + _SC_2_PBS_TRACK, + + _SC_SYMLOOP_MAX, + + _SC_STREAMS, + + _SC_2_PBS_CHECKPOINT, + + + _SC_V6_ILP32_OFF32, + + _SC_V6_ILP32_OFFBIG, + + _SC_V6_LP64_OFF64, + + _SC_V6_LPBIG_OFFBIG, + + + _SC_HOST_NAME_MAX, + + _SC_TRACE, + + _SC_TRACE_EVENT_FILTER, + + _SC_TRACE_INHERIT, + + _SC_TRACE_LOG, + + + _SC_LEVEL1_ICACHE_SIZE, + + _SC_LEVEL1_ICACHE_ASSOC, + + _SC_LEVEL1_ICACHE_LINESIZE, + + _SC_LEVEL1_DCACHE_SIZE, + + _SC_LEVEL1_DCACHE_ASSOC, + + _SC_LEVEL1_DCACHE_LINESIZE, + + _SC_LEVEL2_CACHE_SIZE, + + _SC_LEVEL2_CACHE_ASSOC, + + _SC_LEVEL2_CACHE_LINESIZE, + + _SC_LEVEL3_CACHE_SIZE, + + _SC_LEVEL3_CACHE_ASSOC, + + _SC_LEVEL3_CACHE_LINESIZE, + + _SC_LEVEL4_CACHE_SIZE, + + _SC_LEVEL4_CACHE_ASSOC, + + _SC_LEVEL4_CACHE_LINESIZE, + + + + _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, + + _SC_RAW_SOCKETS, + + + _SC_V7_ILP32_OFF32, + + _SC_V7_ILP32_OFFBIG, + + _SC_V7_LP64_OFF64, + + _SC_V7_LPBIG_OFFBIG, + + + _SC_SS_REPL_MAX, + + + _SC_TRACE_EVENT_NAME_MAX, + + _SC_TRACE_NAME_MAX, + + _SC_TRACE_SYS_MAX, + + _SC_TRACE_USER_EVENT_MAX, + + + _SC_XOPEN_STREAMS, + + + _SC_THREAD_ROBUST_PRIO_INHERIT, + + _SC_THREAD_ROBUST_PRIO_PROTECT + + }; + + +enum + { + _CS_PATH, + + + _CS_V6_WIDTH_RESTRICTED_ENVS, + + + + _CS_GNU_LIBC_VERSION, + + _CS_GNU_LIBPTHREAD_VERSION, + + + _CS_V5_WIDTH_RESTRICTED_ENVS, + + + + _CS_V7_WIDTH_RESTRICTED_ENVS, + + + + _CS_LFS_CFLAGS = 1000, + + _CS_LFS_LDFLAGS, + + _CS_LFS_LIBS, + + _CS_LFS_LINTFLAGS, + + _CS_LFS64_CFLAGS, + + _CS_LFS64_LDFLAGS, + + _CS_LFS64_LIBS, + + _CS_LFS64_LINTFLAGS, + + + _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, + + _CS_XBS5_ILP32_OFF32_LDFLAGS, + + _CS_XBS5_ILP32_OFF32_LIBS, + + _CS_XBS5_ILP32_OFF32_LINTFLAGS, + + _CS_XBS5_ILP32_OFFBIG_CFLAGS, + + _CS_XBS5_ILP32_OFFBIG_LDFLAGS, + + _CS_XBS5_ILP32_OFFBIG_LIBS, + + _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, + + _CS_XBS5_LP64_OFF64_CFLAGS, + + _CS_XBS5_LP64_OFF64_LDFLAGS, + + _CS_XBS5_LP64_OFF64_LIBS, + + _CS_XBS5_LP64_OFF64_LINTFLAGS, + + _CS_XBS5_LPBIG_OFFBIG_CFLAGS, + + _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, + + _CS_XBS5_LPBIG_OFFBIG_LIBS, + + _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, + + + _CS_POSIX_V6_ILP32_OFF32_CFLAGS, + + _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, + + _CS_POSIX_V6_ILP32_OFF32_LIBS, + + _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, + + _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, + + _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, + + _CS_POSIX_V6_ILP32_OFFBIG_LIBS, + + _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, + + _CS_POSIX_V6_LP64_OFF64_CFLAGS, + + _CS_POSIX_V6_LP64_OFF64_LDFLAGS, + + _CS_POSIX_V6_LP64_OFF64_LIBS, + + _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, + + _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, + + _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, + + _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, + + _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, + + + _CS_POSIX_V7_ILP32_OFF32_CFLAGS, + + _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, + + _CS_POSIX_V7_ILP32_OFF32_LIBS, + + _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, + + _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, + + _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, + + _CS_POSIX_V7_ILP32_OFFBIG_LIBS, + + _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, + + _CS_POSIX_V7_LP64_OFF64_CFLAGS, + + _CS_POSIX_V7_LP64_OFF64_LDFLAGS, + + _CS_POSIX_V7_LP64_OFF64_LIBS, + + _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, + + _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, + + _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, + + _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, + + _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, + + + _CS_V6_ENV, + + _CS_V7_ENV + + }; +# 611 "/usr/include/unistd.h" 2 3 4 + + +extern long int pathconf (__const char *__path, int __name) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__ , __leaf__)); + + +extern long int sysconf (int __name) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern __pid_t getpid (void) __attribute__ ((__nothrow__ , __leaf__)); + + +extern __pid_t getppid (void) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern __pid_t getpgrp (void) __attribute__ ((__nothrow__ , __leaf__)); +# 647 "/usr/include/unistd.h" 3 4 +extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__)); + +extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__ , __leaf__)); +# 673 "/usr/include/unistd.h" 3 4 +extern int setpgrp (void) __attribute__ ((__nothrow__ , __leaf__)); +# 690 "/usr/include/unistd.h" 3 4 +extern __pid_t setsid (void) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern __uid_t getuid (void) __attribute__ ((__nothrow__ , __leaf__)); + + +extern __uid_t geteuid (void) __attribute__ ((__nothrow__ , __leaf__)); + + +extern __gid_t getgid (void) __attribute__ ((__nothrow__ , __leaf__)); + + +extern __gid_t getegid (void) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + + +extern int group_member (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) + __attribute__ ((__nothrow__ , __leaf__)); + + + +extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) + __attribute__ ((__nothrow__ , __leaf__)); + + + +extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) + __attribute__ ((__nothrow__ , __leaf__)); + + + +extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) + __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern __pid_t fork (void) __attribute__ ((__nothrow__)); + + + + + + + +extern __pid_t vfork (void) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern char *ttyname (int __fd) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern int ttyname_r (int __fd, char *__buf, size_t __buflen) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); + + + +extern int isatty (int __fd) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern int ttyslot (void) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern int link (__const char *__from, __const char *__to) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); + + + + +extern int linkat (int __fromfd, __const char *__from, int __tofd, + __const char *__to, int __flags) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__)); + + + + +extern int symlink (__const char *__from, __const char *__to) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); + + + + +extern ssize_t readlink (__const char *__restrict __path, + char *__restrict __buf, size_t __len) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); + + + + +extern int symlinkat (__const char *__from, int __tofd, + __const char *__to) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); + + +extern ssize_t readlinkat (int __fd, __const char *__restrict __path, + char *__restrict __buf, size_t __len) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); + + + +extern int unlink (__const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + +extern int unlinkat (int __fd, __const char *__name, int __flag) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); + + + +extern int rmdir (__const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + +extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern char *getlogin (void); + + + + + + + +extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); + + + + +extern int setlogin (__const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); +# 894 "/usr/include/unistd.h" 3 4 +# 1 "/usr/include/getopt.h" 1 3 4 +# 59 "/usr/include/getopt.h" 3 4 +extern char *optarg; +# 73 "/usr/include/getopt.h" 3 4 +extern int optind; + + + + +extern int opterr; + + + +extern int optopt; +# 152 "/usr/include/getopt.h" 3 4 +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) + __attribute__ ((__nothrow__ , __leaf__)); +# 895 "/usr/include/unistd.h" 2 3 4 + + + + + + + +extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int sethostname (__const char *__name, size_t __len) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + +extern int sethostid (long int __id) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + + + + +extern int getdomainname (char *__name, size_t __len) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int setdomainname (__const char *__name, size_t __len) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int vhangup (void) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int revoke (__const char *__file) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + + + +extern int profil (unsigned short int *__sample_buffer, size_t __size, + size_t __offset, unsigned int __scale) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int acct (__const char *__name) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern char *getusershell (void) __attribute__ ((__nothrow__ , __leaf__)); +extern void endusershell (void) __attribute__ ((__nothrow__ , __leaf__)); +extern void setusershell (void) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + + + + + +extern int chroot (__const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + +extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1))); +# 980 "/usr/include/unistd.h" 3 4 +extern int fsync (int __fd); + + + + + + +extern int syncfs (int __fd) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern long int gethostid (void); + + +extern void sync (void) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern int getpagesize (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + + + +extern int getdtablesize (void) __attribute__ ((__nothrow__ , __leaf__)); +# 1022 "/usr/include/unistd.h" 3 4 +extern int truncate (__const char *__file, __off64_t __length) __asm__ ("" "truncate64") __attribute__ ((__nothrow__ , __leaf__)) + + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); + + + + + +extern int truncate64 (__const char *__file, __off64_t __length) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +# 1043 "/usr/include/unistd.h" 3 4 +extern int ftruncate (int __fd, __off64_t __length) __asm__ ("" "ftruncate64") __attribute__ ((__nothrow__ , __leaf__)) + __attribute__ ((__warn_unused_result__)); + + + + + +extern int ftruncate64 (int __fd, __off64_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); +# 1061 "/usr/include/unistd.h" 3 4 +extern int brk (void *__addr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); + + + + + +extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__ , __leaf__)); +# 1082 "/usr/include/unistd.h" 3 4 +extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__ , __leaf__)); +# 1108 "/usr/include/unistd.h" 3 4 +extern int lockf (int __fd, int __cmd, __off64_t __len) __asm__ ("" "lockf64") + __attribute__ ((__warn_unused_result__)); + + + + + +extern int lockf64 (int __fd, int __cmd, __off64_t __len) __attribute__ ((__warn_unused_result__)); +# 1136 "/usr/include/unistd.h" 3 4 +extern int fdatasync (int __fildes); + + + + + + + +extern char *crypt (__const char *__key, __const char *__salt) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern void encrypt (char *__block, int __edflag) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern void swab (__const void *__restrict __from, void *__restrict __to, + ssize_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + + + +extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +# 1 "/usr/include/bits/unistd.h" 1 3 4 +# 24 "/usr/include/bits/unistd.h" 3 4 +extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes, + size_t __buflen) __attribute__ ((__warn_unused_result__)); +extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read") + __attribute__ ((__warn_unused_result__)); +extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t +read (int __fd, void *__buf, size_t __nbytes) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__nbytes)) + return __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); + + if (__nbytes > __builtin_object_size (__buf, 0)) + return __read_chk_warn (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); + } + return __read_alias (__fd, __buf, __nbytes); +} + + +extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes, + __off_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread") + + __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") + + __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk") + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread called with bigger length than size of " "the destination buffer"))) + ; +extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk") + + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread64 called with bigger length than size of " "the destination buffer"))) + ; +# 87 "/usr/include/bits/unistd.h" 3 4 +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t +pread (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__nbytes)) + return __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)); + + if ( __nbytes > __builtin_object_size (__buf, 0)) + return __pread64_chk_warn (__fd, __buf, __nbytes, __offset, + __builtin_object_size (__buf, 0)); + } + + return __pread64_alias (__fd, __buf, __nbytes, __offset); +} + + + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t +pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__nbytes)) + return __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)); + + if ( __nbytes > __builtin_object_size (__buf, 0)) + return __pread64_chk_warn (__fd, __buf, __nbytes, __offset, + __builtin_object_size (__buf, 0)); + } + + return __pread64_alias (__fd, __buf, __nbytes, __offset); +} + + + + +extern ssize_t __readlink_chk (__const char *__restrict __path, + char *__restrict __buf, size_t __len, + size_t __buflen) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlink_alias (__const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlink") __attribute__ ((__nothrow__ , __leaf__)) + + + __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlink_chk_warn (__const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlink_chk") __attribute__ ((__nothrow__ , __leaf__)) + + + + __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t +__attribute__ ((__nothrow__ , __leaf__)) readlink (__const char *__restrict __path, char *__restrict __buf, size_t __len) + +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + + if ( __len > __builtin_object_size (__buf, 2 > 1)) + return __readlink_chk_warn (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + } + return __readlink_alias (__path, __buf, __len); +} + + + +extern ssize_t __readlinkat_chk (int __fd, __const char *__restrict __path, + char *__restrict __buf, size_t __len, + size_t __buflen) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlinkat_alias (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlinkat") __attribute__ ((__nothrow__ , __leaf__)) + + + + __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlinkat_chk_warn (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlinkat_chk") __attribute__ ((__nothrow__ , __leaf__)) + + + + __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer"))) + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t +__attribute__ ((__nothrow__ , __leaf__)) readlinkat (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) + +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __readlinkat_chk (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + + if (__len > __builtin_object_size (__buf, 2 > 1)) + return __readlinkat_chk_warn (__fd, __path, __buf, __len, + __builtin_object_size (__buf, 2 > 1)); + } + return __readlinkat_alias (__fd, __path, __buf, __len); +} + + +extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); +extern char *__getcwd_alias (char *__buf, size_t __size) __asm__ ("" "getcwd") __attribute__ ((__nothrow__ , __leaf__)) + __attribute__ ((__warn_unused_result__)); +extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) __asm__ ("" "__getcwd_chk") __attribute__ ((__nothrow__ , __leaf__)) + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * +__attribute__ ((__nothrow__ , __leaf__)) getcwd (char *__buf, size_t __size) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__size)) + return __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1)); + + if (__size > __builtin_object_size (__buf, 2 > 1)) + return __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1)); + } + return __getcwd_alias (__buf, __size); +} + + +extern char *__getwd_chk (char *__buf, size_t buflen) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern char *__getwd_warn (char *__buf) __asm__ ("" "getwd") __attribute__ ((__nothrow__ , __leaf__)) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char * +__attribute__ ((__nothrow__ , __leaf__)) getwd (char *__buf) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1)); + return __getwd_warn (__buf); +} + + +extern size_t __confstr_chk (int __name, char *__buf, size_t __len, + size_t __buflen) __attribute__ ((__nothrow__ , __leaf__)); +extern size_t __confstr_alias (int __name, char *__buf, size_t __len) __asm__ ("" "confstr") __attribute__ ((__nothrow__ , __leaf__)) + ; +extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) __asm__ ("" "__confstr_chk") __attribute__ ((__nothrow__ , __leaf__)) + + + __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) size_t +__attribute__ ((__nothrow__ , __leaf__)) confstr (int __name, char *__buf, size_t __len) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + + if (__builtin_object_size (__buf, 2 > 1) < __len) + return __confstr_chk_warn (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + } + return __confstr_alias (__name, __buf, __len); +} + + +extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); +extern int __getgroups_alias (int __size, __gid_t __list[]) __asm__ ("" "getgroups") __attribute__ ((__nothrow__ , __leaf__)) + __attribute__ ((__warn_unused_result__)); +extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) __asm__ ("" "__getgroups_chk") __attribute__ ((__nothrow__ , __leaf__)) + + + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__nothrow__ , __leaf__)) getgroups (int __size, __gid_t __list[]) +{ + if (__builtin_object_size (__list, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__size) || __size < 0) + return __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1)); + + if (__size * sizeof (__gid_t) > __builtin_object_size (__list, 2 > 1)) + return __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1)); + } + return __getgroups_alias (__size, __list); +} + + +extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen, + size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); +extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ttyname_r") __attribute__ ((__nothrow__ , __leaf__)) + + __attribute__ ((__nonnull__ (2))); +extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ttyname_r_chk") __attribute__ ((__nothrow__ , __leaf__)) + + + __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__nothrow__ , __leaf__)) ttyname_r (int __fd, char *__buf, size_t __buflen) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __ttyname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __ttyname_r_alias (__fd, __buf, __buflen); +} + + + +extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal) + __attribute__ ((__nonnull__ (1))); +extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r") + __attribute__ ((__nonnull__ (1))); +extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk") + + + __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +getlogin_r (char *__buf, size_t __buflen) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __getlogin_r_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __getlogin_r_alias (__buf, __buflen); +} + + + + +extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); +extern int __gethostname_alias (char *__buf, size_t __buflen) __asm__ ("" "gethostname") __attribute__ ((__nothrow__ , __leaf__)) + __attribute__ ((__nonnull__ (1))); +extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__gethostname_chk") __attribute__ ((__nothrow__ , __leaf__)) + + + __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__nothrow__ , __leaf__)) gethostname (char *__buf, size_t __buflen) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __gethostname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __gethostname_alias (__buf, __buflen); +} + + + + +extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int __getdomainname_alias (char *__buf, size_t __buflen) __asm__ ("" "getdomainname") __attribute__ ((__nothrow__ , __leaf__)) + + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getdomainname_chk") __attribute__ ((__nothrow__ , __leaf__)) + + + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer"))) + + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +__attribute__ ((__nothrow__ , __leaf__)) getdomainname (char *__buf, size_t __buflen) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __getdomainname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __getdomainname_alias (__buf, __buflen); +} +# 1172 "/usr/include/unistd.h" 2 3 4 + + + +# 34 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 +# 1 "/usr/include/fcntl.h" 1 3 4 +# 30 "/usr/include/fcntl.h" 3 4 + + + + +# 1 "/usr/include/bits/fcntl.h" 1 3 4 +# 27 "/usr/include/bits/fcntl.h" 3 4 +# 1 "/usr/include/bits/uio.h" 1 3 4 +# 44 "/usr/include/bits/uio.h" 3 4 +struct iovec + { + void *iov_base; + size_t iov_len; + }; +# 28 "/usr/include/bits/fcntl.h" 2 3 4 +# 153 "/usr/include/bits/fcntl.h" 3 4 +struct flock + { + short int l_type; + short int l_whence; + + + + + __off64_t l_start; + __off64_t l_len; + + __pid_t l_pid; + }; + + +struct flock64 + { + short int l_type; + short int l_whence; + __off64_t l_start; + __off64_t l_len; + __pid_t l_pid; + }; + + + + +enum __pid_type + { + F_OWNER_TID = 0, + F_OWNER_PID, + F_OWNER_PGRP, + F_OWNER_GID = F_OWNER_PGRP + }; + + +struct f_owner_ex + { + enum __pid_type type; + __pid_t pid; + }; +# 239 "/usr/include/bits/fcntl.h" 3 4 +struct file_handle +{ + unsigned int handle_bytes; + int handle_type; + + unsigned char f_handle[0]; +}; + + + + + + + + + + +extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) + __attribute__ ((__nothrow__ , __leaf__)); + + + +extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count, + unsigned int __flags); + + + + + + +extern ssize_t vmsplice (int __fdout, const struct iovec *__iov, + size_t __count, unsigned int __flags); + + + + + +extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, + __off64_t *__offout, size_t __len, + unsigned int __flags); + + + + + +extern ssize_t tee (int __fdin, int __fdout, size_t __len, + unsigned int __flags); +# 295 "/usr/include/bits/fcntl.h" 3 4 +extern int fallocate (int __fd, int __mode, __off64_t __offset, __off64_t __len) __asm__ ("" "fallocate64") + + ; + + + + + +extern int fallocate64 (int __fd, int __mode, __off64_t __offset, + __off64_t __len); + + + + +extern int name_to_handle_at (int __dfd, const char *__name, + struct file_handle *__handle, int *__mnt_id, + int __flags) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle, + int __flags); + + + + +# 35 "/usr/include/fcntl.h" 2 3 4 + + + + + + +# 1 "/usr/include/bits/stat.h" 1 3 4 +# 39 "/usr/include/bits/stat.h" 3 4 +struct stat + { + __dev_t st_dev; + unsigned short int __pad1; + + + + __ino_t __st_ino; + + __mode_t st_mode; + __nlink_t st_nlink; + __uid_t st_uid; + __gid_t st_gid; + __dev_t st_rdev; + unsigned short int __pad2; + + + + __off64_t st_size; + + __blksize_t st_blksize; + + + + + __blkcnt64_t st_blocks; +# 73 "/usr/include/bits/stat.h" 3 4 + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; +# 91 "/usr/include/bits/stat.h" 3 4 + __ino64_t st_ino; + + }; + + +struct stat64 + { + __dev_t st_dev; + unsigned int __pad1; + + __ino_t __st_ino; + __mode_t st_mode; + __nlink_t st_nlink; + __uid_t st_uid; + __gid_t st_gid; + __dev_t st_rdev; + unsigned int __pad2; + __off64_t st_size; + __blksize_t st_blksize; + + __blkcnt64_t st_blocks; + + + + + + + + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; +# 130 "/usr/include/bits/stat.h" 3 4 + __ino64_t st_ino; + }; +# 42 "/usr/include/fcntl.h" 2 3 4 +# 125 "/usr/include/fcntl.h" 3 4 +extern int fcntl (int __fd, int __cmd, ...); +# 137 "/usr/include/fcntl.h" 3 4 +extern int open (__const char *__file, int __oflag, ...) __asm__ ("" "open64") + __attribute__ ((__nonnull__ (1))); + + + + + +extern int open64 (__const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1))); +# 162 "/usr/include/fcntl.h" 3 4 +extern int openat (int __fd, __const char *__file, int __oflag, ...) __asm__ ("" "openat64") + __attribute__ ((__nonnull__ (2))); + + + + + +extern int openat64 (int __fd, __const char *__file, int __oflag, ...) + __attribute__ ((__nonnull__ (2))); +# 183 "/usr/include/fcntl.h" 3 4 +extern int creat (__const char *__file, __mode_t __mode) __asm__ ("" "creat64") + __attribute__ ((__nonnull__ (1))); + + + + + +extern int creat64 (__const char *__file, __mode_t __mode) __attribute__ ((__nonnull__ (1))); +# 230 "/usr/include/fcntl.h" 3 4 +extern int posix_fadvise (int __fd, __off64_t __offset, __off64_t __len, int __advise) __asm__ ("" "posix_fadvise64") __attribute__ ((__nothrow__ , __leaf__)) + + ; + + + + + +extern int posix_fadvise64 (int __fd, __off64_t __offset, __off64_t __len, + int __advise) __attribute__ ((__nothrow__ , __leaf__)); +# 251 "/usr/include/fcntl.h" 3 4 +extern int posix_fallocate (int __fd, __off64_t __offset, __off64_t __len) __asm__ ("" "posix_fallocate64") + + ; + + + + + +extern int posix_fallocate64 (int __fd, __off64_t __offset, __off64_t __len); + + + + + + + +# 1 "/usr/include/bits/fcntl2.h" 1 3 4 +# 31 "/usr/include/bits/fcntl2.h" 3 4 +extern int __open_2 (__const char *__path, int __oflag) __asm__ ("" "__open64_2") + __attribute__ ((__nonnull__ (1))); +extern int __open_alias (__const char *__path, int __oflag, ...) __asm__ ("" "open64") + __attribute__ ((__nonnull__ (1))); + +extern void __open_too_many_args (void) __attribute__((__error__ ("open can be called either with 2 or 3 arguments, not more"))) + ; +extern void __open_missing_mode (void) __attribute__((__error__ ("open with O_CREAT in second argument needs 3 arguments"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +open (__const char *__path, int __oflag, ...) +{ + if (__builtin_va_arg_pack_len () > 1) + __open_too_many_args (); + + if (__builtin_constant_p (__oflag)) + { + if ((__oflag & 0100) != 0 && __builtin_va_arg_pack_len () < 1) + { + __open_missing_mode (); + return __open_2 (__path, __oflag); + } + return __open_alias (__path, __oflag, __builtin_va_arg_pack ()); + } + + if (__builtin_va_arg_pack_len () < 1) + return __open_2 (__path, __oflag); + + return __open_alias (__path, __oflag, __builtin_va_arg_pack ()); +} + + + +extern int __open64_2 (__const char *__path, int __oflag) __attribute__ ((__nonnull__ (1))); +extern int __open64_alias (__const char *__path, int __oflag, ...) __asm__ ("" "open64") + __attribute__ ((__nonnull__ (1))); +extern void __open64_too_many_args (void) __attribute__((__error__ ("open64 can be called either with 2 or 3 arguments, not more"))) + ; +extern void __open64_missing_mode (void) __attribute__((__error__ ("open64 with O_CREAT in second argument needs 3 arguments"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +open64 (__const char *__path, int __oflag, ...) +{ + if (__builtin_va_arg_pack_len () > 1) + __open64_too_many_args (); + + if (__builtin_constant_p (__oflag)) + { + if ((__oflag & 0100) != 0 && __builtin_va_arg_pack_len () < 1) + { + __open64_missing_mode (); + return __open64_2 (__path, __oflag); + } + return __open64_alias (__path, __oflag, __builtin_va_arg_pack ()); + } + + if (__builtin_va_arg_pack_len () < 1) + return __open64_2 (__path, __oflag); + + return __open64_alias (__path, __oflag, __builtin_va_arg_pack ()); +} +# 105 "/usr/include/bits/fcntl2.h" 3 4 +extern int __openat_2 (int __fd, __const char *__path, int __oflag) __asm__ ("" "__openat64_2") + + __attribute__ ((__nonnull__ (2))); +extern int __openat_alias (int __fd, __const char *__path, int __oflag, ...) __asm__ ("" "openat64") + + __attribute__ ((__nonnull__ (2))); + +extern void __openat_too_many_args (void) __attribute__((__error__ ("openat can be called either with 3 or 4 arguments, not more"))) + ; +extern void __openat_missing_mode (void) __attribute__((__error__ ("openat with O_CREAT in third argument needs 4 arguments"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +openat (int __fd, __const char *__path, int __oflag, ...) +{ + if (__builtin_va_arg_pack_len () > 1) + __openat_too_many_args (); + + if (__builtin_constant_p (__oflag)) + { + if ((__oflag & 0100) != 0 && __builtin_va_arg_pack_len () < 1) + { + __openat_missing_mode (); + return __openat_2 (__fd, __path, __oflag); + } + return __openat_alias (__fd, __path, __oflag, __builtin_va_arg_pack ()); + } + + if (__builtin_va_arg_pack_len () < 1) + return __openat_2 (__fd, __path, __oflag); + + return __openat_alias (__fd, __path, __oflag, __builtin_va_arg_pack ()); +} + + + +extern int __openat64_2 (int __fd, __const char *__path, int __oflag) + __attribute__ ((__nonnull__ (2))); +extern int __openat64_alias (int __fd, __const char *__path, int __oflag, ...) __asm__ ("" "openat64") + + __attribute__ ((__nonnull__ (2))); +extern void __openat64_too_many_args (void) __attribute__((__error__ ("openat64 can be called either with 3 or 4 arguments, not more"))) + ; +extern void __openat64_missing_mode (void) __attribute__((__error__ ("openat64 with O_CREAT in third argument needs 4 arguments"))) + ; + +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__artificial__)) int +openat64 (int __fd, __const char *__path, int __oflag, ...) +{ + if (__builtin_va_arg_pack_len () > 1) + __openat64_too_many_args (); + + if (__builtin_constant_p (__oflag)) + { + if ((__oflag & 0100) != 0 && __builtin_va_arg_pack_len () < 1) + { + __openat64_missing_mode (); + return __openat64_2 (__fd, __path, __oflag); + } + return __openat64_alias (__fd, __path, __oflag, __builtin_va_arg_pack ()); + } + + if (__builtin_va_arg_pack_len () < 1) + return __openat64_2 (__fd, __path, __oflag); + + return __openat64_alias (__fd, __path, __oflag, __builtin_va_arg_pack ()); +} +# 268 "/usr/include/fcntl.h" 2 3 4 + + + +# 35 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 +# 1 "/usr/include/sys/stat.h" 1 3 4 +# 105 "/usr/include/sys/stat.h" 3 4 + + +# 1 "/usr/include/bits/stat.h" 1 3 4 +# 108 "/usr/include/sys/stat.h" 2 3 4 +# 219 "/usr/include/sys/stat.h" 3 4 +extern int stat (__const char *__restrict __file, struct stat *__restrict __buf) __asm__ ("" "stat64") __attribute__ ((__nothrow__ , __leaf__)) + + __attribute__ ((__nonnull__ (1, 2))); +extern int fstat (int __fd, struct stat *__buf) __asm__ ("" "fstat64") __attribute__ ((__nothrow__ , __leaf__)) + __attribute__ ((__nonnull__ (2))); + + + + + + +extern int stat64 (__const char *__restrict __file, + struct stat64 *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); +extern int fstat64 (int __fd, struct stat64 *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); +# 245 "/usr/include/sys/stat.h" 3 4 +extern int fstatat (int __fd, __const char *__restrict __file, struct stat *__restrict __buf, int __flag) __asm__ ("" "fstatat64") __attribute__ ((__nothrow__ , __leaf__)) + + + __attribute__ ((__nonnull__ (2, 3))); + + + + + + +extern int fstatat64 (int __fd, __const char *__restrict __file, + struct stat64 *__restrict __buf, int __flag) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); +# 269 "/usr/include/sys/stat.h" 3 4 +extern int lstat (__const char *__restrict __file, struct stat *__restrict __buf) __asm__ ("" "lstat64") __attribute__ ((__nothrow__ , __leaf__)) + + + __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern int lstat64 (__const char *__restrict __file, + struct stat64 *__restrict __buf) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + + + + +extern int chmod (__const char *__file, __mode_t __mode) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int lchmod (__const char *__file, __mode_t __mode) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + + +extern int fchmod (int __fd, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern int fchmodat (int __fd, __const char *__file, __mode_t __mode, + int __flag) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); + + + + + + +extern __mode_t umask (__mode_t __mask) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern __mode_t getumask (void) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern int mkdir (__const char *__path, __mode_t __mode) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int mkdirat (int __fd, __const char *__path, __mode_t __mode) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); + + + + + + +extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int mknodat (int __fd, __const char *__path, __mode_t __mode, + __dev_t __dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); + + + + + +extern int mkfifo (__const char *__path, __mode_t __mode) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int mkfifoat (int __fd, __const char *__path, __mode_t __mode) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); + + + + + +extern int utimensat (int __fd, __const char *__path, + __const struct timespec __times[2], + int __flags) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); + + + + +extern int futimens (int __fd, __const struct timespec __times[2]) __attribute__ ((__nothrow__ , __leaf__)); +# 412 "/usr/include/sys/stat.h" 3 4 +extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf) __asm__ ("" "__fxstat64") __attribute__ ((__nothrow__ , __leaf__)) + + __attribute__ ((__nonnull__ (3))); +extern int __xstat (int __ver, __const char *__filename, struct stat *__stat_buf) __asm__ ("" "__xstat64") __attribute__ ((__nothrow__ , __leaf__)) + + __attribute__ ((__nonnull__ (2, 3))); +extern int __lxstat (int __ver, __const char *__filename, struct stat *__stat_buf) __asm__ ("" "__lxstat64") __attribute__ ((__nothrow__ , __leaf__)) + + __attribute__ ((__nonnull__ (2, 3))); +extern int __fxstatat (int __ver, int __fildes, __const char *__filename, struct stat *__stat_buf, int __flag) __asm__ ("" "__fxstatat64") __attribute__ ((__nothrow__ , __leaf__)) + + + __attribute__ ((__nonnull__ (3, 4))); +# 434 "/usr/include/sys/stat.h" 3 4 +extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); +extern int __xstat64 (int __ver, __const char *__filename, + struct stat64 *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); +extern int __lxstat64 (int __ver, __const char *__filename, + struct stat64 *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); +extern int __fxstatat64 (int __ver, int __fildes, __const char *__filename, + struct stat64 *__stat_buf, int __flag) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))); + +extern int __xmknod (int __ver, __const char *__path, __mode_t __mode, + __dev_t *__dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))); + +extern int __xmknodat (int __ver, int __fd, __const char *__path, + __mode_t __mode, __dev_t *__dev) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 5))); + + + + +extern __inline int +__attribute__ ((__nothrow__ , __leaf__)) stat (__const char *__path, struct stat *__statbuf) +{ + return __xstat (3, __path, __statbuf); +} + + +extern __inline int +__attribute__ ((__nothrow__ , __leaf__)) lstat (__const char *__path, struct stat *__statbuf) +{ + return __lxstat (3, __path, __statbuf); +} + + +extern __inline int +__attribute__ ((__nothrow__ , __leaf__)) fstat (int __fd, struct stat *__statbuf) +{ + return __fxstat (3, __fd, __statbuf); +} + + +extern __inline int +__attribute__ ((__nothrow__ , __leaf__)) fstatat (int __fd, __const char *__filename, struct stat *__statbuf, int __flag) + +{ + return __fxstatat (3, __fd, __filename, __statbuf, __flag); +} + + + +extern __inline int +__attribute__ ((__nothrow__ , __leaf__)) mknod (__const char *__path, __mode_t __mode, __dev_t __dev) +{ + return __xmknod (1, __path, __mode, &__dev); +} + + + +extern __inline int +__attribute__ ((__nothrow__ , __leaf__)) mknodat (int __fd, __const char *__path, __mode_t __mode, __dev_t __dev) + +{ + return __xmknodat (1, __fd, __path, __mode, &__dev); +} + + + + + +extern __inline int +__attribute__ ((__nothrow__ , __leaf__)) stat64 (__const char *__path, struct stat64 *__statbuf) +{ + return __xstat64 (3, __path, __statbuf); +} + + +extern __inline int +__attribute__ ((__nothrow__ , __leaf__)) lstat64 (__const char *__path, struct stat64 *__statbuf) +{ + return __lxstat64 (3, __path, __statbuf); +} + + +extern __inline int +__attribute__ ((__nothrow__ , __leaf__)) fstat64 (int __fd, struct stat64 *__statbuf) +{ + return __fxstat64 (3, __fd, __statbuf); +} + + +extern __inline int +__attribute__ ((__nothrow__ , __leaf__)) fstatat64 (int __fd, __const char *__filename, struct stat64 *__statbuf, int __flag) + +{ + return __fxstatat64 (3, __fd, __filename, __statbuf, __flag); +} + + + + + + + +# 36 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 +# 1 "/usr/include/sys/time.h" 1 3 4 +# 29 "/usr/include/sys/time.h" 3 4 +# 1 "/usr/include/bits/time.h" 1 3 4 +# 30 "/usr/include/sys/time.h" 2 3 4 +# 39 "/usr/include/sys/time.h" 3 4 + +# 57 "/usr/include/sys/time.h" 3 4 +struct timezone + { + int tz_minuteswest; + int tz_dsttime; + }; + +typedef struct timezone *__restrict __timezone_ptr_t; +# 73 "/usr/include/sys/time.h" 3 4 +extern int gettimeofday (struct timeval *__restrict __tv, + __timezone_ptr_t __tz) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + + +extern int settimeofday (__const struct timeval *__tv, + __const struct timezone *__tz) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int adjtime (__const struct timeval *__delta, + struct timeval *__olddelta) __attribute__ ((__nothrow__ , __leaf__)); + + + + +enum __itimer_which + { + + ITIMER_REAL = 0, + + + ITIMER_VIRTUAL = 1, + + + + ITIMER_PROF = 2 + + }; + + + +struct itimerval + { + + struct timeval it_interval; + + struct timeval it_value; + }; + + + + +typedef enum __itimer_which __itimer_which_t; + + + + + + +extern int getitimer (__itimer_which_t __which, + struct itimerval *__value) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern int setitimer (__itimer_which_t __which, + __const struct itimerval *__restrict __new, + struct itimerval *__restrict __old) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern int utimes (__const char *__file, __const struct timeval __tvp[2]) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + +extern int lutimes (__const char *__file, __const struct timeval __tvp[2]) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int futimes (int __fd, __const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern int futimesat (int __fd, __const char *__file, + __const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__)); +# 191 "/usr/include/sys/time.h" 3 4 + +# 37 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 +# 1 "/usr/include/assert.h" 1 3 4 +# 66 "/usr/include/assert.h" 3 4 + + + +extern void __assert_fail (__const char *__assertion, __const char *__file, + unsigned int __line, __const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + + +extern void __assert_perror_fail (int __errnum, __const char *__file, + unsigned int __line, + __const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + + + + +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + + + +# 38 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 +# 1 "/usr/include/signal.h" 1 3 4 +# 31 "/usr/include/signal.h" 3 4 + + +# 1 "/usr/include/bits/sigset.h" 1 3 4 +# 104 "/usr/include/bits/sigset.h" 3 4 +extern int __sigismember (__const __sigset_t *, int); +extern int __sigaddset (__sigset_t *, int); +extern int __sigdelset (__sigset_t *, int); +# 118 "/usr/include/bits/sigset.h" 3 4 +extern __inline int __sigismember (__const __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return (__set->__val[__word] & __mask) ? 1 : 0; } +extern __inline int __sigaddset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] |= __mask), 0); } +extern __inline int __sigdelset ( __sigset_t *__set, int __sig) { unsigned long int __mask = (((unsigned long int) 1) << (((__sig) - 1) % (8 * sizeof (unsigned long int)))); unsigned long int __word = (((__sig) - 1) / (8 * sizeof (unsigned long int))); return ((__set->__val[__word] &= ~__mask), 0); } +# 34 "/usr/include/signal.h" 2 3 4 + + + + + + + +typedef __sig_atomic_t sig_atomic_t; + +# 58 "/usr/include/signal.h" 3 4 +# 1 "/usr/include/bits/signum.h" 1 3 4 +# 59 "/usr/include/signal.h" 2 3 4 +# 79 "/usr/include/signal.h" 3 4 +# 1 "/usr/include/bits/siginfo.h" 1 3 4 +# 25 "/usr/include/bits/siginfo.h" 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 26 "/usr/include/bits/siginfo.h" 2 3 4 + + + + + + + +typedef union sigval + { + int sival_int; + void *sival_ptr; + } sigval_t; +# 51 "/usr/include/bits/siginfo.h" 3 4 +typedef struct siginfo + { + int si_signo; + int si_errno; + + int si_code; + + union + { + int _pad[((128 / sizeof (int)) - 3)]; + + + struct + { + __pid_t si_pid; + __uid_t si_uid; + } _kill; + + + struct + { + int si_tid; + int si_overrun; + sigval_t si_sigval; + } _timer; + + + struct + { + __pid_t si_pid; + __uid_t si_uid; + sigval_t si_sigval; + } _rt; + + + struct + { + __pid_t si_pid; + __uid_t si_uid; + int si_status; + __clock_t si_utime; + __clock_t si_stime; + } _sigchld; + + + struct + { + void *si_addr; + } _sigfault; + + + struct + { + long int si_band; + int si_fd; + } _sigpoll; + } _sifields; + } siginfo_t; +# 129 "/usr/include/bits/siginfo.h" 3 4 +enum +{ + SI_ASYNCNL = -60, + + SI_TKILL = -6, + + SI_SIGIO, + + SI_ASYNCIO, + + SI_MESGQ, + + SI_TIMER, + + SI_QUEUE, + + SI_USER, + + SI_KERNEL = 0x80 + +}; + + + +enum +{ + ILL_ILLOPC = 1, + + ILL_ILLOPN, + + ILL_ILLADR, + + ILL_ILLTRP, + + ILL_PRVOPC, + + ILL_PRVREG, + + ILL_COPROC, + + ILL_BADSTK + +}; + + +enum +{ + FPE_INTDIV = 1, + + FPE_INTOVF, + + FPE_FLTDIV, + + FPE_FLTOVF, + + FPE_FLTUND, + + FPE_FLTRES, + + FPE_FLTINV, + + FPE_FLTSUB + +}; + + +enum +{ + SEGV_MAPERR = 1, + + SEGV_ACCERR + +}; + + +enum +{ + BUS_ADRALN = 1, + + BUS_ADRERR, + + BUS_OBJERR + +}; + + +enum +{ + TRAP_BRKPT = 1, + + TRAP_TRACE + +}; + + +enum +{ + CLD_EXITED = 1, + + CLD_KILLED, + + CLD_DUMPED, + + CLD_TRAPPED, + + CLD_STOPPED, + + CLD_CONTINUED + +}; + + +enum +{ + POLL_IN = 1, + + POLL_OUT, + + POLL_MSG, + + POLL_ERR, + + POLL_PRI, + + POLL_HUP + +}; +# 273 "/usr/include/bits/siginfo.h" 3 4 +typedef struct sigevent + { + sigval_t sigev_value; + int sigev_signo; + int sigev_notify; + + union + { + int _pad[((64 / sizeof (int)) - 3)]; + + + + __pid_t _tid; + + struct + { + void (*_function) (sigval_t); + void *_attribute; + } _sigev_thread; + } _sigev_un; + } sigevent_t; + + + + + + +enum +{ + SIGEV_SIGNAL = 0, + + SIGEV_NONE, + + SIGEV_THREAD, + + + SIGEV_THREAD_ID = 4 + +}; +# 80 "/usr/include/signal.h" 2 3 4 + + + + +typedef void (*__sighandler_t) (int); + + + + +extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) + __attribute__ ((__nothrow__ , __leaf__)); + +extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler) + __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + +extern __sighandler_t signal (int __sig, __sighandler_t __handler) + __attribute__ ((__nothrow__ , __leaf__)); +# 113 "/usr/include/signal.h" 3 4 + + + + + +extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler) + __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern int raise (int __sig) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) + __attribute__ ((__nothrow__ , __leaf__)); +extern int gsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern void psignal (int __sig, __const char *__s); + + + + +extern void psiginfo (__const siginfo_t *__pinfo, __const char *__s); +# 168 "/usr/include/signal.h" 3 4 +extern int __sigpause (int __sig_or_mask, int __is_sig); +# 177 "/usr/include/signal.h" 3 4 +extern int sigpause (int __sig) __asm__ ("__xpg_sigpause"); +# 196 "/usr/include/signal.h" 3 4 +extern int sigblock (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); + + +extern int sigsetmask (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); + + +extern int siggetmask (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); +# 211 "/usr/include/signal.h" 3 4 +typedef __sighandler_t sighandler_t; + + + + +typedef __sighandler_t sig_t; + + + + + +extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int sigismember (__const sigset_t *__set, int __signo) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + +extern int sigisemptyset (__const sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int sigandset (sigset_t *__set, __const sigset_t *__left, + __const sigset_t *__right) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))); + + +extern int sigorset (sigset_t *__set, __const sigset_t *__left, + __const sigset_t *__right) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))); + + + + +# 1 "/usr/include/bits/sigaction.h" 1 3 4 +# 25 "/usr/include/bits/sigaction.h" 3 4 +struct sigaction + { + + + union + { + + __sighandler_t sa_handler; + + void (*sa_sigaction) (int, siginfo_t *, void *); + } + __sigaction_handler; + + + + + + + + __sigset_t sa_mask; + + + int sa_flags; + + + void (*sa_restorer) (void); + }; +# 253 "/usr/include/signal.h" 2 3 4 + + +extern int sigprocmask (int __how, __const sigset_t *__restrict __set, + sigset_t *__restrict __oset) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +extern int sigsuspend (__const sigset_t *__set) __attribute__ ((__nonnull__ (1))); + + +extern int sigaction (int __sig, __const struct sigaction *__restrict __act, + struct sigaction *__restrict __oact) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig) + __attribute__ ((__nonnull__ (1, 2))); + + + + + + +extern int sigwaitinfo (__const sigset_t *__restrict __set, + siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int sigtimedwait (__const sigset_t *__restrict __set, + siginfo_t *__restrict __info, + __const struct timespec *__restrict __timeout) + __attribute__ ((__nonnull__ (1))); + + + +extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val) + __attribute__ ((__nothrow__ , __leaf__)); +# 310 "/usr/include/signal.h" 3 4 +extern __const char *__const _sys_siglist[65]; +extern __const char *__const sys_siglist[65]; + + +struct sigvec + { + __sighandler_t sv_handler; + int sv_mask; + + int sv_flags; + + }; +# 334 "/usr/include/signal.h" 3 4 +extern int sigvec (int __sig, __const struct sigvec *__vec, + struct sigvec *__ovec) __attribute__ ((__nothrow__ , __leaf__)); + + + +# 1 "/usr/include/bits/sigcontext.h" 1 3 4 +# 28 "/usr/include/bits/sigcontext.h" 3 4 +# 1 "/usr/include/asm/sigcontext.h" 1 3 4 + + + + +# 1 "/usr/include/linux/types.h" 1 3 4 + + + +# 1 "/usr/include/asm/types.h" 1 3 4 + + + +# 1 "/usr/include/asm-generic/types.h" 1 3 4 + + + + + + +# 1 "/usr/include/asm-generic/int-ll64.h" 1 3 4 +# 11 "/usr/include/asm-generic/int-ll64.h" 3 4 +# 1 "/usr/include/asm/bitsperlong.h" 1 3 4 +# 10 "/usr/include/asm/bitsperlong.h" 3 4 +# 1 "/usr/include/asm-generic/bitsperlong.h" 1 3 4 +# 11 "/usr/include/asm/bitsperlong.h" 2 3 4 +# 12 "/usr/include/asm-generic/int-ll64.h" 2 3 4 + + + + + + + +typedef __signed__ char __s8; +typedef unsigned char __u8; + +typedef __signed__ short __s16; +typedef unsigned short __u16; + +typedef __signed__ int __s32; +typedef unsigned int __u32; + + +__extension__ typedef __signed__ long long __s64; +__extension__ typedef unsigned long long __u64; +# 8 "/usr/include/asm-generic/types.h" 2 3 4 + + + +typedef unsigned short umode_t; +# 5 "/usr/include/asm/types.h" 2 3 4 +# 5 "/usr/include/linux/types.h" 2 3 4 + + + +# 1 "/usr/include/linux/posix_types.h" 1 3 4 + + + +# 1 "/usr/include/linux/stddef.h" 1 3 4 +# 14 "/usr/include/linux/stddef.h" 3 4 +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 +# 150 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 3 4 +typedef int ptrdiff_t; +# 15 "/usr/include/linux/stddef.h" 2 3 4 +# 5 "/usr/include/linux/posix_types.h" 2 3 4 +# 36 "/usr/include/linux/posix_types.h" 3 4 +typedef struct { + unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))]; +} __kernel_fd_set; + + +typedef void (*__kernel_sighandler_t)(int); + + +typedef int __kernel_key_t; +typedef int __kernel_mqd_t; + +# 1 "/usr/include/asm/posix_types.h" 1 3 4 + +# 1 "/usr/include/asm/posix_types_32.h" 1 3 4 +# 10 "/usr/include/asm/posix_types_32.h" 3 4 +typedef unsigned long __kernel_ino_t; +typedef unsigned short __kernel_mode_t; +typedef unsigned short __kernel_nlink_t; +typedef long __kernel_off_t; +typedef int __kernel_pid_t; +typedef unsigned short __kernel_ipc_pid_t; +typedef unsigned short __kernel_uid_t; +typedef unsigned short __kernel_gid_t; +typedef unsigned int __kernel_size_t; +typedef int __kernel_ssize_t; +typedef int __kernel_ptrdiff_t; +typedef long __kernel_time_t; +typedef long __kernel_suseconds_t; +typedef long __kernel_clock_t; +typedef int __kernel_timer_t; +typedef int __kernel_clockid_t; +typedef int __kernel_daddr_t; +typedef char * __kernel_caddr_t; +typedef unsigned short __kernel_uid16_t; +typedef unsigned short __kernel_gid16_t; +typedef unsigned int __kernel_uid32_t; +typedef unsigned int __kernel_gid32_t; + +typedef unsigned short __kernel_old_uid_t; +typedef unsigned short __kernel_old_gid_t; +typedef unsigned short __kernel_old_dev_t; + + +typedef long long __kernel_loff_t; + + +typedef struct { + int val[2]; +} __kernel_fsid_t; +# 3 "/usr/include/asm/posix_types.h" 2 3 4 +# 48 "/usr/include/linux/posix_types.h" 2 3 4 +# 9 "/usr/include/linux/types.h" 2 3 4 +# 27 "/usr/include/linux/types.h" 3 4 +typedef __u16 __le16; +typedef __u16 __be16; +typedef __u32 __le32; +typedef __u32 __be32; +typedef __u64 __le64; +typedef __u64 __be64; + +typedef __u16 __sum16; +typedef __u32 __wsum; +# 6 "/usr/include/asm/sigcontext.h" 2 3 4 +# 23 "/usr/include/asm/sigcontext.h" 3 4 +struct _fpx_sw_bytes { + __u32 magic1; + __u32 extended_size; + + + __u64 xstate_bv; + + + + + __u32 xstate_size; + + + + + __u32 padding[7]; +}; +# 56 "/usr/include/asm/sigcontext.h" 3 4 +struct _fpreg { + unsigned short significand[4]; + unsigned short exponent; +}; + +struct _fpxreg { + unsigned short significand[4]; + unsigned short exponent; + unsigned short padding[3]; +}; + +struct _xmmreg { + unsigned long element[4]; +}; + +struct _fpstate { + + unsigned long cw; + unsigned long sw; + unsigned long tag; + unsigned long ipoff; + unsigned long cssel; + unsigned long dataoff; + unsigned long datasel; + struct _fpreg _st[8]; + unsigned short status; + unsigned short magic; + + + unsigned long _fxsr_env[6]; + unsigned long mxcsr; + unsigned long reserved; + struct _fpxreg _fxsr_st[8]; + struct _xmmreg _xmm[8]; + unsigned long padding1[44]; + + union { + unsigned long padding2[12]; + struct _fpx_sw_bytes sw_reserved; + + }; +}; + + + + + + +struct sigcontext { + unsigned short gs, __gsh; + unsigned short fs, __fsh; + unsigned short es, __esh; + unsigned short ds, __dsh; + unsigned long edi; + unsigned long esi; + unsigned long ebp; + unsigned long esp; + unsigned long ebx; + unsigned long edx; + unsigned long ecx; + unsigned long eax; + unsigned long trapno; + unsigned long err; + unsigned long eip; + unsigned short cs, __csh; + unsigned long eflags; + unsigned long esp_at_signal; + unsigned short ss, __ssh; + struct _fpstate *fpstate; + unsigned long oldmask; + unsigned long cr2; +}; +# 190 "/usr/include/asm/sigcontext.h" 3 4 +struct _xsave_hdr { + __u64 xstate_bv; + __u64 reserved1[2]; + __u64 reserved2[5]; +}; + +struct _ymmh_state { + + __u32 ymmh_space[64]; +}; + + + + + + + +struct _xstate { + struct _fpstate fpstate; + struct _xsave_hdr xstate_hdr; + struct _ymmh_state ymmh; + +}; +# 29 "/usr/include/bits/sigcontext.h" 2 3 4 + + + +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 +# 33 "/usr/include/bits/sigcontext.h" 2 3 4 +# 340 "/usr/include/signal.h" 2 3 4 + + +extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 +# 350 "/usr/include/signal.h" 2 3 4 + + + + +extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__ , __leaf__)); + +# 1 "/usr/include/bits/sigstack.h" 1 3 4 +# 26 "/usr/include/bits/sigstack.h" 3 4 +struct sigstack + { + void *ss_sp; + int ss_onstack; + }; + + + +enum +{ + SS_ONSTACK = 1, + + SS_DISABLE + +}; +# 50 "/usr/include/bits/sigstack.h" 3 4 +typedef struct sigaltstack + { + void *ss_sp; + int ss_flags; + size_t ss_size; + } stack_t; +# 357 "/usr/include/signal.h" 2 3 4 + + +# 1 "/usr/include/sys/ucontext.h" 1 3 4 +# 23 "/usr/include/sys/ucontext.h" 3 4 +# 1 "/usr/include/signal.h" 1 3 4 +# 24 "/usr/include/sys/ucontext.h" 2 3 4 + + + +# 1 "/usr/include/bits/sigcontext.h" 1 3 4 +# 28 "/usr/include/sys/ucontext.h" 2 3 4 + + + +typedef int greg_t; + + + + + +typedef greg_t gregset_t[19]; + + + +enum +{ + REG_GS = 0, + + REG_FS, + + REG_ES, + + REG_DS, + + REG_EDI, + + REG_ESI, + + REG_EBP, + + REG_ESP, + + REG_EBX, + + REG_EDX, + + REG_ECX, + + REG_EAX, + + REG_TRAPNO, + + REG_ERR, + + REG_EIP, + + REG_CS, + + REG_EFL, + + REG_UESP, + + REG_SS + +}; + + + +struct _libc_fpreg +{ + unsigned short int significand[4]; + unsigned short int exponent; +}; + +struct _libc_fpstate +{ + unsigned long int cw; + unsigned long int sw; + unsigned long int tag; + unsigned long int ipoff; + unsigned long int cssel; + unsigned long int dataoff; + unsigned long int datasel; + struct _libc_fpreg _st[8]; + unsigned long int status; +}; + + +typedef struct _libc_fpstate *fpregset_t; + + +typedef struct + { + gregset_t gregs; + + + fpregset_t fpregs; + unsigned long int oldmask; + unsigned long int cr2; + } mcontext_t; + + +typedef struct ucontext + { + unsigned long int uc_flags; + struct ucontext *uc_link; + stack_t uc_stack; + mcontext_t uc_mcontext; + __sigset_t uc_sigmask; + struct _libc_fpstate __fpregs_mem; + } ucontext_t; +# 360 "/usr/include/signal.h" 2 3 4 + + + + + +extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__)); + + + +extern int sigaltstack (__const struct sigaltstack *__restrict __ss, + struct sigaltstack *__restrict __oss) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + +extern int sighold (int __sig) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int sigrelse (int __sig) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int sigignore (int __sig) __attribute__ ((__nothrow__ , __leaf__)); + + +extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + +# 1 "/usr/include/bits/sigthread.h" 1 3 4 +# 31 "/usr/include/bits/sigthread.h" 3 4 +extern int pthread_sigmask (int __how, + __const __sigset_t *__restrict __newmask, + __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__ , __leaf__)); + + +extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern int pthread_sigqueue (pthread_t __threadid, int __signo, + const union sigval __value) __attribute__ ((__nothrow__ , __leaf__)); +# 396 "/usr/include/signal.h" 2 3 4 + + + + + + +extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__ , __leaf__)); + +extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__ , __leaf__)); + + + + +# 39 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 +# 1 "/usr/include/glib-2.0/glib.h" 1 +# 32 "/usr/include/glib-2.0/glib.h" +# 1 "/usr/include/glib-2.0/glib/galloca.h" 1 +# 34 "/usr/include/glib-2.0/glib/galloca.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 34 "/usr/include/glib-2.0/glib/gtypes.h" +# 1 "/usr/lib/glib-2.0/include/glibconfig.h" 1 +# 9 "/usr/lib/glib-2.0/include/glibconfig.h" +# 1 "/usr/include/glib-2.0/glib/gmacros.h" 1 +# 40 "/usr/include/glib-2.0/glib/gmacros.h" +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 +# 41 "/usr/include/glib-2.0/glib/gmacros.h" 2 +# 10 "/usr/lib/glib-2.0/include/glibconfig.h" 2 + +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include-fixed/limits.h" 1 3 4 +# 12 "/usr/lib/glib-2.0/include/glibconfig.h" 2 +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/float.h" 1 3 4 +# 13 "/usr/lib/glib-2.0/include/glibconfig.h" 2 +# 22 "/usr/lib/glib-2.0/include/glibconfig.h" + +# 38 "/usr/lib/glib-2.0/include/glibconfig.h" +typedef signed char gint8; +typedef unsigned char guint8; +typedef signed short gint16; +typedef unsigned short guint16; + + + +typedef signed int gint32; +typedef unsigned int guint32; + + + + + +__extension__ typedef signed long long gint64; +__extension__ typedef unsigned long long guint64; +# 65 "/usr/lib/glib-2.0/include/glibconfig.h" +typedef signed int gssize; +typedef unsigned int gsize; +# 75 "/usr/lib/glib-2.0/include/glibconfig.h" +typedef gint64 goffset; +# 90 "/usr/lib/glib-2.0/include/glibconfig.h" +typedef signed int gintptr; +typedef unsigned int guintptr; +# 197 "/usr/lib/glib-2.0/include/glibconfig.h" +typedef int GPid; +# 207 "/usr/lib/glib-2.0/include/glibconfig.h" + +# 35 "/usr/include/glib-2.0/glib/gtypes.h" 2 +# 1 "/usr/include/glib-2.0/glib/gmacros.h" 1 +# 36 "/usr/include/glib-2.0/glib/gtypes.h" 2 +# 1 "/usr/include/glib-2.0/glib/gversionmacros.h" 1 +# 37 "/usr/include/glib-2.0/glib/gtypes.h" 2 + + + +# 48 "/usr/include/glib-2.0/glib/gtypes.h" +typedef char gchar; +typedef short gshort; +typedef long glong; +typedef int gint; +typedef gint gboolean; + +typedef unsigned char guchar; +typedef unsigned short gushort; +typedef unsigned long gulong; +typedef unsigned int guint; + +typedef float gfloat; +typedef double gdouble; +# 79 "/usr/include/glib-2.0/glib/gtypes.h" +typedef void* gpointer; +typedef const void *gconstpointer; + +typedef gint (*GCompareFunc) (gconstpointer a, + gconstpointer b); +typedef gint (*GCompareDataFunc) (gconstpointer a, + gconstpointer b, + gpointer user_data); +typedef gboolean (*GEqualFunc) (gconstpointer a, + gconstpointer b); +typedef void (*GDestroyNotify) (gpointer data); +typedef void (*GFunc) (gpointer data, + gpointer user_data); +typedef guint (*GHashFunc) (gconstpointer key); +typedef void (*GHFunc) (gpointer key, + gpointer value, + gpointer user_data); +# 105 "/usr/include/glib-2.0/glib/gtypes.h" +typedef void (*GFreeFunc) (gpointer data); +# 119 "/usr/include/glib-2.0/glib/gtypes.h" +typedef const gchar * (*GTranslateFunc) (const gchar *str, + gpointer data); +# 401 "/usr/include/glib-2.0/glib/gtypes.h" +typedef union _GDoubleIEEE754 GDoubleIEEE754; +typedef union _GFloatIEEE754 GFloatIEEE754; + + + + + +union _GFloatIEEE754 +{ + gfloat v_float; + struct { + guint mantissa : 23; + guint biased_exponent : 8; + guint sign : 1; + } mpn; +}; +union _GDoubleIEEE754 +{ + gdouble v_double; + struct { + guint mantissa_low : 32; + guint mantissa_high : 20; + guint biased_exponent : 11; + guint sign : 1; + } mpn; +}; +# 451 "/usr/include/glib-2.0/glib/gtypes.h" +typedef struct _GTimeVal GTimeVal; + +struct _GTimeVal +{ + glong tv_sec; + glong tv_usec; +}; + + +# 35 "/usr/include/glib-2.0/glib/galloca.h" 2 +# 33 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/garray.h" 1 +# 34 "/usr/include/glib-2.0/glib/garray.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 35 "/usr/include/glib-2.0/glib/garray.h" 2 + + + +typedef struct _GBytes GBytes; +typedef struct _GArray GArray; +typedef struct _GByteArray GByteArray; +typedef struct _GPtrArray GPtrArray; + +struct _GArray +{ + gchar *data; + guint len; +}; + +struct _GByteArray +{ + guint8 *data; + guint len; +}; + +struct _GPtrArray +{ + gpointer *pdata; + guint len; +}; +# 71 "/usr/include/glib-2.0/glib/garray.h" +GArray* g_array_new (gboolean zero_terminated, + gboolean clear_, + guint element_size); +GArray* g_array_sized_new (gboolean zero_terminated, + gboolean clear_, + guint element_size, + guint reserved_size); +gchar* g_array_free (GArray *array, + gboolean free_segment); +GArray *g_array_ref (GArray *array); +void g_array_unref (GArray *array); +guint g_array_get_element_size (GArray *array); +GArray* g_array_append_vals (GArray *array, + gconstpointer data, + guint len); +GArray* g_array_prepend_vals (GArray *array, + gconstpointer data, + guint len); +GArray* g_array_insert_vals (GArray *array, + guint index_, + gconstpointer data, + guint len); +GArray* g_array_set_size (GArray *array, + guint length); +GArray* g_array_remove_index (GArray *array, + guint index_); +GArray* g_array_remove_index_fast (GArray *array, + guint index_); +GArray* g_array_remove_range (GArray *array, + guint index_, + guint length); +void g_array_sort (GArray *array, + GCompareFunc compare_func); +void g_array_sort_with_data (GArray *array, + GCompareDataFunc compare_func, + gpointer user_data); +void g_array_set_clear_func (GArray *array, + GDestroyNotify clear_func); + + + + + + +GPtrArray* g_ptr_array_new (void); +GPtrArray* g_ptr_array_new_with_free_func (GDestroyNotify element_free_func); +GPtrArray* g_ptr_array_sized_new (guint reserved_size); +GPtrArray* g_ptr_array_new_full (guint reserved_size, + GDestroyNotify element_free_func); +gpointer* g_ptr_array_free (GPtrArray *array, + gboolean free_seg); +GPtrArray* g_ptr_array_ref (GPtrArray *array); +void g_ptr_array_unref (GPtrArray *array); +void g_ptr_array_set_free_func (GPtrArray *array, + GDestroyNotify element_free_func); +void g_ptr_array_set_size (GPtrArray *array, + gint length); +gpointer g_ptr_array_remove_index (GPtrArray *array, + guint index_); +gpointer g_ptr_array_remove_index_fast (GPtrArray *array, + guint index_); +gboolean g_ptr_array_remove (GPtrArray *array, + gpointer data); +gboolean g_ptr_array_remove_fast (GPtrArray *array, + gpointer data); +void g_ptr_array_remove_range (GPtrArray *array, + guint index_, + guint length); +void g_ptr_array_add (GPtrArray *array, + gpointer data); +void g_ptr_array_sort (GPtrArray *array, + GCompareFunc compare_func); +void g_ptr_array_sort_with_data (GPtrArray *array, + GCompareDataFunc compare_func, + gpointer user_data); +void g_ptr_array_foreach (GPtrArray *array, + GFunc func, + gpointer user_data); + + + + + + +GByteArray* g_byte_array_new (void); +GByteArray* g_byte_array_new_take (guint8 *data, + gsize len); +GByteArray* g_byte_array_sized_new (guint reserved_size); +guint8* g_byte_array_free (GByteArray *array, + gboolean free_segment); +GBytes* g_byte_array_free_to_bytes (GByteArray *array); +GByteArray *g_byte_array_ref (GByteArray *array); +void g_byte_array_unref (GByteArray *array); +GByteArray* g_byte_array_append (GByteArray *array, + const guint8 *data, + guint len); +GByteArray* g_byte_array_prepend (GByteArray *array, + const guint8 *data, + guint len); +GByteArray* g_byte_array_set_size (GByteArray *array, + guint length); +GByteArray* g_byte_array_remove_index (GByteArray *array, + guint index_); +GByteArray* g_byte_array_remove_index_fast (GByteArray *array, + guint index_); +GByteArray* g_byte_array_remove_range (GByteArray *array, + guint index_, + guint length); +void g_byte_array_sort (GByteArray *array, + GCompareFunc compare_func); +void g_byte_array_sort_with_data (GByteArray *array, + GCompareDataFunc compare_func, + gpointer user_data); + + +# 34 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gasyncqueue.h" 1 +# 34 "/usr/include/glib-2.0/glib/gasyncqueue.h" +# 1 "/usr/include/glib-2.0/glib/gthread.h" 1 +# 34 "/usr/include/glib-2.0/glib/gthread.h" +# 1 "/usr/include/glib-2.0/glib/gatomic.h" 1 +# 29 "/usr/include/glib-2.0/glib/gatomic.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 30 "/usr/include/glib-2.0/glib/gatomic.h" 2 + + + +gint g_atomic_int_get (volatile gint *atomic); +void g_atomic_int_set (volatile gint *atomic, + gint newval); +void g_atomic_int_inc (volatile gint *atomic); +gboolean g_atomic_int_dec_and_test (volatile gint *atomic); +gboolean g_atomic_int_compare_and_exchange (volatile gint *atomic, + gint oldval, + gint newval); +gint g_atomic_int_add (volatile gint *atomic, + gint val); + +guint g_atomic_int_and (volatile guint *atomic, + guint val); + +guint g_atomic_int_or (volatile guint *atomic, + guint val); +guint g_atomic_int_xor (volatile guint *atomic, + guint val); + +gpointer g_atomic_pointer_get (volatile void *atomic); +void g_atomic_pointer_set (volatile void *atomic, + gpointer newval); +gboolean g_atomic_pointer_compare_and_exchange (volatile void *atomic, + gpointer oldval, + gpointer newval); +gssize g_atomic_pointer_add (volatile void *atomic, + gssize val); + +gsize g_atomic_pointer_and (volatile void *atomic, + gsize val); + +gsize g_atomic_pointer_or (volatile void *atomic, + gsize val); +gsize g_atomic_pointer_xor (volatile void *atomic, + gsize val); + +__attribute__((__deprecated__("Use '" "g_atomic_add" "' instead"))) +gint g_atomic_int_exchange_and_add (volatile gint *atomic, + gint val); + + +# 35 "/usr/include/glib-2.0/glib/gthread.h" 2 +# 1 "/usr/include/glib-2.0/glib/gerror.h" 1 +# 30 "/usr/include/glib-2.0/glib/gerror.h" +# 1 "/usr/include/glib-2.0/glib/gquark.h" 1 +# 34 "/usr/include/glib-2.0/glib/gquark.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 35 "/usr/include/glib-2.0/glib/gquark.h" 2 + + + +typedef guint32 GQuark; + + + +GQuark g_quark_try_string (const gchar *string); +GQuark g_quark_from_static_string (const gchar *string); +GQuark g_quark_from_string (const gchar *string); +const gchar * g_quark_to_string (GQuark quark) __attribute__((__const__)); + +const gchar * g_intern_string (const gchar *string); +const gchar * g_intern_static_string (const gchar *string); + + +# 31 "/usr/include/glib-2.0/glib/gerror.h" 2 + + +# 43 "/usr/include/glib-2.0/glib/gerror.h" +typedef struct _GError GError; + +struct _GError +{ + GQuark domain; + gint code; + gchar *message; +}; + +GError* g_error_new (GQuark domain, + gint code, + const gchar *format, + ...) __attribute__((__format__ (__printf__, 3, 4))); + +GError* g_error_new_literal (GQuark domain, + gint code, + const gchar *message); +GError* g_error_new_valist (GQuark domain, + gint code, + const gchar *format, + va_list args); + +void g_error_free (GError *error); +GError* g_error_copy (const GError *error); + +gboolean g_error_matches (const GError *error, + GQuark domain, + gint code); + + + + +void g_set_error (GError **err, + GQuark domain, + gint code, + const gchar *format, + ...) __attribute__((__format__ (__printf__, 4, 5))); + +void g_set_error_literal (GError **err, + GQuark domain, + gint code, + const gchar *message); + + + +void g_propagate_error (GError **dest, + GError *src); + + +void g_clear_error (GError **err); + + +void g_prefix_error (GError **err, + const gchar *format, + ...) __attribute__((__format__ (__printf__, 2, 3))); + + +void g_propagate_prefixed_error (GError **dest, + GError *src, + const gchar *format, + ...) __attribute__((__format__ (__printf__, 3, 4))); + + +# 36 "/usr/include/glib-2.0/glib/gthread.h" 2 + + + + +GQuark g_thread_error_quark (void); + +typedef enum +{ + G_THREAD_ERROR_AGAIN +} GThreadError; + +typedef gpointer (*GThreadFunc) (gpointer data); + +typedef struct _GThread GThread; + +typedef union _GMutex GMutex; +typedef struct _GRecMutex GRecMutex; +typedef struct _GRWLock GRWLock; +typedef struct _GCond GCond; +typedef struct _GPrivate GPrivate; +typedef struct _GOnce GOnce; + +union _GMutex +{ + + gpointer p; + guint i[2]; +}; + +struct _GRWLock +{ + + gpointer p; + guint i[2]; +}; + +struct _GCond +{ + + gpointer p; + guint i[2]; +}; + +struct _GRecMutex +{ + + gpointer p; + guint i[2]; +}; + + +struct _GPrivate +{ + + gpointer p; + GDestroyNotify notify; + gpointer future[2]; +}; + +typedef enum +{ + G_ONCE_STATUS_NOTCALLED, + G_ONCE_STATUS_PROGRESS, + G_ONCE_STATUS_READY +} GOnceStatus; + + +struct _GOnce +{ + volatile GOnceStatus status; + volatile gpointer retval; +}; +# 140 "/usr/include/glib-2.0/glib/gthread.h" +GThread * g_thread_ref (GThread *thread); +void g_thread_unref (GThread *thread); +GThread * g_thread_new (const gchar *name, + GThreadFunc func, + gpointer data); +GThread * g_thread_try_new (const gchar *name, + GThreadFunc func, + gpointer data, + GError **error); +GThread * g_thread_self (void); +void g_thread_exit (gpointer retval); +gpointer g_thread_join (GThread *thread); +void g_thread_yield (void); + + +void g_mutex_init (GMutex *mutex); +void g_mutex_clear (GMutex *mutex); +void g_mutex_lock (GMutex *mutex); +gboolean g_mutex_trylock (GMutex *mutex); +void g_mutex_unlock (GMutex *mutex); + +void g_rw_lock_init (GRWLock *rw_lock); +void g_rw_lock_clear (GRWLock *rw_lock); +void g_rw_lock_writer_lock (GRWLock *rw_lock); +gboolean g_rw_lock_writer_trylock (GRWLock *rw_lock); +void g_rw_lock_writer_unlock (GRWLock *rw_lock); +void g_rw_lock_reader_lock (GRWLock *rw_lock); +gboolean g_rw_lock_reader_trylock (GRWLock *rw_lock); +void g_rw_lock_reader_unlock (GRWLock *rw_lock); + +void g_rec_mutex_init (GRecMutex *rec_mutex); +void g_rec_mutex_clear (GRecMutex *rec_mutex); +void g_rec_mutex_lock (GRecMutex *rec_mutex); +gboolean g_rec_mutex_trylock (GRecMutex *rec_mutex); +void g_rec_mutex_unlock (GRecMutex *rec_mutex); + +void g_cond_init (GCond *cond); +void g_cond_clear (GCond *cond); +void g_cond_wait (GCond *cond, + GMutex *mutex); +void g_cond_signal (GCond *cond); +void g_cond_broadcast (GCond *cond); +gboolean g_cond_wait_until (GCond *cond, + GMutex *mutex, + gint64 end_time); + +gpointer g_private_get (GPrivate *key); +void g_private_set (GPrivate *key, + gpointer value); +void g_private_replace (GPrivate *key, + gpointer value); + +gpointer g_once_impl (GOnce *once, + GThreadFunc func, + gpointer arg); +gboolean g_once_init_enter (volatile void *location); +void g_once_init_leave (volatile void *location, + gsize result); +# 229 "/usr/include/glib-2.0/glib/gthread.h" + +# 35 "/usr/include/glib-2.0/glib/gasyncqueue.h" 2 + + + +typedef struct _GAsyncQueue GAsyncQueue; + +GAsyncQueue *g_async_queue_new (void); +GAsyncQueue *g_async_queue_new_full (GDestroyNotify item_free_func); +void g_async_queue_lock (GAsyncQueue *queue); +void g_async_queue_unlock (GAsyncQueue *queue); +GAsyncQueue *g_async_queue_ref (GAsyncQueue *queue); +void g_async_queue_unref (GAsyncQueue *queue); + +__attribute__((__deprecated__("Use '" "g_async_queue_ref" "' instead"))) +void g_async_queue_ref_unlocked (GAsyncQueue *queue); + +__attribute__((__deprecated__("Use '" "g_async_queue_unref" "' instead"))) +void g_async_queue_unref_and_unlock (GAsyncQueue *queue); + +void g_async_queue_push (GAsyncQueue *queue, + gpointer data); +void g_async_queue_push_unlocked (GAsyncQueue *queue, + gpointer data); +void g_async_queue_push_sorted (GAsyncQueue *queue, + gpointer data, + GCompareDataFunc func, + gpointer user_data); +void g_async_queue_push_sorted_unlocked (GAsyncQueue *queue, + gpointer data, + GCompareDataFunc func, + gpointer user_data); +gpointer g_async_queue_pop (GAsyncQueue *queue); +gpointer g_async_queue_pop_unlocked (GAsyncQueue *queue); +gpointer g_async_queue_try_pop (GAsyncQueue *queue); +gpointer g_async_queue_try_pop_unlocked (GAsyncQueue *queue); +gpointer g_async_queue_timeout_pop (GAsyncQueue *queue, + guint64 timeout); +gpointer g_async_queue_timeout_pop_unlocked (GAsyncQueue *queue, + guint64 timeout); +gint g_async_queue_length (GAsyncQueue *queue); +gint g_async_queue_length_unlocked (GAsyncQueue *queue); +void g_async_queue_sort (GAsyncQueue *queue, + GCompareDataFunc func, + gpointer user_data); +void g_async_queue_sort_unlocked (GAsyncQueue *queue, + GCompareDataFunc func, + gpointer user_data); + +__attribute__((__deprecated__("Use '" "g_async_queue_timeout_pop" "' instead"))) +gpointer g_async_queue_timed_pop (GAsyncQueue *queue, + GTimeVal *end_time); +__attribute__((__deprecated__("Use '" "g_async_queue_timeout_pop_unlocked" "' instead"))) +gpointer g_async_queue_timed_pop_unlocked (GAsyncQueue *queue, + GTimeVal *end_time); + + +# 35 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gatomic.h" 1 +# 36 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gbacktrace.h" 1 +# 34 "/usr/include/glib-2.0/glib/gbacktrace.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 35 "/usr/include/glib-2.0/glib/gbacktrace.h" 2 + + + + +void g_on_error_query (const gchar *prg_name); +void g_on_error_stack_trace (const gchar *prg_name); +# 62 "/usr/include/glib-2.0/glib/gbacktrace.h" + +# 37 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gbase64.h" 1 +# 28 "/usr/include/glib-2.0/glib/gbase64.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 29 "/usr/include/glib-2.0/glib/gbase64.h" 2 + + + +gsize g_base64_encode_step (const guchar *in, + gsize len, + gboolean break_lines, + gchar *out, + gint *state, + gint *save); +gsize g_base64_encode_close (gboolean break_lines, + gchar *out, + gint *state, + gint *save); +gchar* g_base64_encode (const guchar *data, + gsize len) __attribute__((__malloc__)); +gsize g_base64_decode_step (const gchar *in, + gsize len, + guchar *out, + gint *state, + guint *save); +guchar *g_base64_decode (const gchar *text, + gsize *out_len) __attribute__((__malloc__)); +guchar *g_base64_decode_inplace (gchar *text, + gsize *out_len); + + + +# 38 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gbitlock.h" 1 +# 26 "/usr/include/glib-2.0/glib/gbitlock.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 27 "/usr/include/glib-2.0/glib/gbitlock.h" 2 + + + + + + + +void g_bit_lock (volatile gint *address, + gint lock_bit); +gboolean g_bit_trylock (volatile gint *address, + gint lock_bit); +void g_bit_unlock (volatile gint *address, + gint lock_bit); + +void g_pointer_bit_lock (volatile void *address, + gint lock_bit); +gboolean g_pointer_bit_trylock (volatile void *address, + gint lock_bit); +void g_pointer_bit_unlock (volatile void *address, + gint lock_bit); +# 70 "/usr/include/glib-2.0/glib/gbitlock.h" + +# 39 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gbookmarkfile.h" 1 +# 27 "/usr/include/glib-2.0/glib/gbookmarkfile.h" +# 1 "/usr/include/glib-2.0/glib/gerror.h" 1 +# 28 "/usr/include/glib-2.0/glib/gbookmarkfile.h" 2 + + + +# 57 "/usr/include/glib-2.0/glib/gbookmarkfile.h" +typedef enum +{ + G_BOOKMARK_FILE_ERROR_INVALID_URI, + G_BOOKMARK_FILE_ERROR_INVALID_VALUE, + G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED, + G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND, + G_BOOKMARK_FILE_ERROR_READ, + G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING, + G_BOOKMARK_FILE_ERROR_WRITE, + G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND +} GBookmarkFileError; + +GQuark g_bookmark_file_error_quark (void); + + + + + + + +typedef struct _GBookmarkFile GBookmarkFile; + +GBookmarkFile *g_bookmark_file_new (void); +void g_bookmark_file_free (GBookmarkFile *bookmark); + +gboolean g_bookmark_file_load_from_file (GBookmarkFile *bookmark, + const gchar *filename, + GError **error); +gboolean g_bookmark_file_load_from_data (GBookmarkFile *bookmark, + const gchar *data, + gsize length, + GError **error); +gboolean g_bookmark_file_load_from_data_dirs (GBookmarkFile *bookmark, + const gchar *file, + gchar **full_path, + GError **error); +gchar * g_bookmark_file_to_data (GBookmarkFile *bookmark, + gsize *length, + GError **error) __attribute__((__malloc__)); +gboolean g_bookmark_file_to_file (GBookmarkFile *bookmark, + const gchar *filename, + GError **error); + +void g_bookmark_file_set_title (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *title); +gchar * g_bookmark_file_get_title (GBookmarkFile *bookmark, + const gchar *uri, + GError **error) __attribute__((__malloc__)); +void g_bookmark_file_set_description (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *description); +gchar * g_bookmark_file_get_description (GBookmarkFile *bookmark, + const gchar *uri, + GError **error) __attribute__((__malloc__)); +void g_bookmark_file_set_mime_type (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *mime_type); +gchar * g_bookmark_file_get_mime_type (GBookmarkFile *bookmark, + const gchar *uri, + GError **error) __attribute__((__malloc__)); +void g_bookmark_file_set_groups (GBookmarkFile *bookmark, + const gchar *uri, + const gchar **groups, + gsize length); +void g_bookmark_file_add_group (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *group); +gboolean g_bookmark_file_has_group (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *group, + GError **error); +gchar ** g_bookmark_file_get_groups (GBookmarkFile *bookmark, + const gchar *uri, + gsize *length, + GError **error) __attribute__((__malloc__)); +void g_bookmark_file_add_application (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *name, + const gchar *exec); +gboolean g_bookmark_file_has_application (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *name, + GError **error); +gchar ** g_bookmark_file_get_applications (GBookmarkFile *bookmark, + const gchar *uri, + gsize *length, + GError **error) __attribute__((__malloc__)); +gboolean g_bookmark_file_set_app_info (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *name, + const gchar *exec, + gint count, + time_t stamp, + GError **error); +gboolean g_bookmark_file_get_app_info (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *name, + gchar **exec, + guint *count, + time_t *stamp, + GError **error); +void g_bookmark_file_set_is_private (GBookmarkFile *bookmark, + const gchar *uri, + gboolean is_private); +gboolean g_bookmark_file_get_is_private (GBookmarkFile *bookmark, + const gchar *uri, + GError **error); +void g_bookmark_file_set_icon (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *href, + const gchar *mime_type); +gboolean g_bookmark_file_get_icon (GBookmarkFile *bookmark, + const gchar *uri, + gchar **href, + gchar **mime_type, + GError **error); +void g_bookmark_file_set_added (GBookmarkFile *bookmark, + const gchar *uri, + time_t added); +time_t g_bookmark_file_get_added (GBookmarkFile *bookmark, + const gchar *uri, + GError **error); +void g_bookmark_file_set_modified (GBookmarkFile *bookmark, + const gchar *uri, + time_t modified); +time_t g_bookmark_file_get_modified (GBookmarkFile *bookmark, + const gchar *uri, + GError **error); +void g_bookmark_file_set_visited (GBookmarkFile *bookmark, + const gchar *uri, + time_t visited); +time_t g_bookmark_file_get_visited (GBookmarkFile *bookmark, + const gchar *uri, + GError **error); +gboolean g_bookmark_file_has_item (GBookmarkFile *bookmark, + const gchar *uri); +gint g_bookmark_file_get_size (GBookmarkFile *bookmark); +gchar ** g_bookmark_file_get_uris (GBookmarkFile *bookmark, + gsize *length) __attribute__((__malloc__)); +gboolean g_bookmark_file_remove_group (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *group, + GError **error); +gboolean g_bookmark_file_remove_application (GBookmarkFile *bookmark, + const gchar *uri, + const gchar *name, + GError **error); +gboolean g_bookmark_file_remove_item (GBookmarkFile *bookmark, + const gchar *uri, + GError **error); +gboolean g_bookmark_file_move_item (GBookmarkFile *bookmark, + const gchar *old_uri, + const gchar *new_uri, + GError **error); + + +# 40 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gbytes.h" 1 +# 31 "/usr/include/glib-2.0/glib/gbytes.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 32 "/usr/include/glib-2.0/glib/gbytes.h" 2 +# 1 "/usr/include/glib-2.0/glib/garray.h" 1 +# 33 "/usr/include/glib-2.0/glib/gbytes.h" 2 + + + +GBytes * g_bytes_new (gconstpointer data, + gsize size); + +GBytes * g_bytes_new_take (gpointer data, + gsize size); + +GBytes * g_bytes_new_static (gconstpointer data, + gsize size); + +GBytes * g_bytes_new_with_free_func (gconstpointer data, + gsize size, + GDestroyNotify free_func, + gpointer user_data); + +GBytes * g_bytes_new_from_bytes (GBytes *bytes, + gsize offset, + gsize length); + +gconstpointer g_bytes_get_data (GBytes *bytes, + gsize *size); + +gsize g_bytes_get_size (GBytes *bytes); + +GBytes * g_bytes_ref (GBytes *bytes); + +void g_bytes_unref (GBytes *bytes); + +gpointer g_bytes_unref_to_data (GBytes *bytes, + gsize *size); + +GByteArray * g_bytes_unref_to_array (GBytes *bytes); + +guint g_bytes_hash (gconstpointer bytes); + +gboolean g_bytes_equal (gconstpointer bytes1, + gconstpointer bytes2); + +gint g_bytes_compare (gconstpointer bytes1, + gconstpointer bytes2); + + +# 41 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gcharset.h" 1 +# 28 "/usr/include/glib-2.0/glib/gcharset.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 29 "/usr/include/glib-2.0/glib/gcharset.h" 2 + + + +gboolean g_get_charset (const char **charset); +gchar * g_get_codeset (void); + +const gchar * const * g_get_language_names (void); +gchar ** g_get_locale_variants (const gchar *locale); + + +# 42 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gchecksum.h" 1 +# 28 "/usr/include/glib-2.0/glib/gchecksum.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 29 "/usr/include/glib-2.0/glib/gchecksum.h" 2 + + +# 46 "/usr/include/glib-2.0/glib/gchecksum.h" +typedef enum { + G_CHECKSUM_MD5, + G_CHECKSUM_SHA1, + G_CHECKSUM_SHA256 +} GChecksumType; +# 61 "/usr/include/glib-2.0/glib/gchecksum.h" +typedef struct _GChecksum GChecksum; + +gssize g_checksum_type_get_length (GChecksumType checksum_type); + +GChecksum * g_checksum_new (GChecksumType checksum_type); +void g_checksum_reset (GChecksum *checksum); +GChecksum * g_checksum_copy (const GChecksum *checksum); +void g_checksum_free (GChecksum *checksum); +void g_checksum_update (GChecksum *checksum, + const guchar *data, + gssize length); +const gchar * g_checksum_get_string (GChecksum *checksum); +void g_checksum_get_digest (GChecksum *checksum, + guint8 *buffer, + gsize *digest_len); + +gchar *g_compute_checksum_for_data (GChecksumType checksum_type, + const guchar *data, + gsize length); +gchar *g_compute_checksum_for_string (GChecksumType checksum_type, + const gchar *str, + gssize length); + + +# 43 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gconvert.h" 1 +# 34 "/usr/include/glib-2.0/glib/gconvert.h" +# 1 "/usr/include/glib-2.0/glib/gerror.h" 1 +# 35 "/usr/include/glib-2.0/glib/gconvert.h" 2 + + +# 50 "/usr/include/glib-2.0/glib/gconvert.h" +typedef enum +{ + G_CONVERT_ERROR_NO_CONVERSION, + G_CONVERT_ERROR_ILLEGAL_SEQUENCE, + G_CONVERT_ERROR_FAILED, + G_CONVERT_ERROR_PARTIAL_INPUT, + G_CONVERT_ERROR_BAD_URI, + G_CONVERT_ERROR_NOT_ABSOLUTE_PATH +} GConvertError; +# 68 "/usr/include/glib-2.0/glib/gconvert.h" +GQuark g_convert_error_quark (void); +# 77 "/usr/include/glib-2.0/glib/gconvert.h" +typedef struct _GIConv *GIConv; + +GIConv g_iconv_open (const gchar *to_codeset, + const gchar *from_codeset); +gsize g_iconv (GIConv converter, + gchar **inbuf, + gsize *inbytes_left, + gchar **outbuf, + gsize *outbytes_left); +gint g_iconv_close (GIConv converter); + + +gchar* g_convert (const gchar *str, + gssize len, + const gchar *to_codeset, + const gchar *from_codeset, + gsize *bytes_read, + gsize *bytes_written, + GError **error) __attribute__((__malloc__)); +gchar* g_convert_with_iconv (const gchar *str, + gssize len, + GIConv converter, + gsize *bytes_read, + gsize *bytes_written, + GError **error) __attribute__((__malloc__)); +gchar* g_convert_with_fallback (const gchar *str, + gssize len, + const gchar *to_codeset, + const gchar *from_codeset, + const gchar *fallback, + gsize *bytes_read, + gsize *bytes_written, + GError **error) __attribute__((__malloc__)); + + + + +gchar* g_locale_to_utf8 (const gchar *opsysstring, + gssize len, + gsize *bytes_read, + gsize *bytes_written, + GError **error) __attribute__((__malloc__)); +gchar* g_locale_from_utf8 (const gchar *utf8string, + gssize len, + gsize *bytes_read, + gsize *bytes_written, + GError **error) __attribute__((__malloc__)); +# 137 "/usr/include/glib-2.0/glib/gconvert.h" +gchar* g_filename_to_utf8 (const gchar *opsysstring, + gssize len, + gsize *bytes_read, + gsize *bytes_written, + GError **error) __attribute__((__malloc__)); +gchar* g_filename_from_utf8 (const gchar *utf8string, + gssize len, + gsize *bytes_read, + gsize *bytes_written, + GError **error) __attribute__((__malloc__)); + +gchar *g_filename_from_uri (const gchar *uri, + gchar **hostname, + GError **error) __attribute__((__malloc__)); + +gchar *g_filename_to_uri (const gchar *filename, + const gchar *hostname, + GError **error) __attribute__((__malloc__)); +gchar *g_filename_display_name (const gchar *filename) __attribute__((__malloc__)); +gboolean g_get_filename_charsets (const gchar ***charsets); + +gchar *g_filename_display_basename (const gchar *filename) __attribute__((__malloc__)); + +gchar **g_uri_list_extract_uris (const gchar *uri_list) __attribute__((__malloc__)); + + +# 44 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gdataset.h" 1 +# 34 "/usr/include/glib-2.0/glib/gdataset.h" +# 1 "/usr/include/glib-2.0/glib/gquark.h" 1 +# 35 "/usr/include/glib-2.0/glib/gdataset.h" 2 + + + +typedef struct _GData GData; + +typedef void (*GDataForeachFunc) (GQuark key_id, + gpointer data, + gpointer user_data); + + + +void g_datalist_init (GData **datalist); +void g_datalist_clear (GData **datalist); +gpointer g_datalist_id_get_data (GData **datalist, + GQuark key_id); +void g_datalist_id_set_data_full (GData **datalist, + GQuark key_id, + gpointer data, + GDestroyNotify destroy_func); +gpointer g_datalist_id_remove_no_notify (GData **datalist, + GQuark key_id); +void g_datalist_foreach (GData **datalist, + GDataForeachFunc func, + gpointer user_data); +# 69 "/usr/include/glib-2.0/glib/gdataset.h" +void g_datalist_set_flags (GData **datalist, + guint flags); +void g_datalist_unset_flags (GData **datalist, + guint flags); +guint g_datalist_get_flags (GData **datalist); +# 91 "/usr/include/glib-2.0/glib/gdataset.h" +void g_dataset_destroy (gconstpointer dataset_location); +gpointer g_dataset_id_get_data (gconstpointer dataset_location, + GQuark key_id); +gpointer g_datalist_get_data (GData **datalist, + const gchar *key); +void g_dataset_id_set_data_full (gconstpointer dataset_location, + GQuark key_id, + gpointer data, + GDestroyNotify destroy_func); +gpointer g_dataset_id_remove_no_notify (gconstpointer dataset_location, + GQuark key_id); +void g_dataset_foreach (gconstpointer dataset_location, + GDataForeachFunc func, + gpointer user_data); +# 120 "/usr/include/glib-2.0/glib/gdataset.h" + +# 45 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gdate.h" 1 +# 36 "/usr/include/glib-2.0/glib/gdate.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 37 "/usr/include/glib-2.0/glib/gdate.h" 2 +# 1 "/usr/include/glib-2.0/glib/gquark.h" 1 +# 38 "/usr/include/glib-2.0/glib/gdate.h" 2 + + +# 50 "/usr/include/glib-2.0/glib/gdate.h" +typedef gint32 GTime; +typedef guint16 GDateYear; +typedef guint8 GDateDay; +typedef struct _GDate GDate; + + +typedef enum +{ + G_DATE_DAY = 0, + G_DATE_MONTH = 1, + G_DATE_YEAR = 2 +} GDateDMY; + + +typedef enum +{ + G_DATE_BAD_WEEKDAY = 0, + G_DATE_MONDAY = 1, + G_DATE_TUESDAY = 2, + G_DATE_WEDNESDAY = 3, + G_DATE_THURSDAY = 4, + G_DATE_FRIDAY = 5, + G_DATE_SATURDAY = 6, + G_DATE_SUNDAY = 7 +} GDateWeekday; +typedef enum +{ + G_DATE_BAD_MONTH = 0, + G_DATE_JANUARY = 1, + G_DATE_FEBRUARY = 2, + G_DATE_MARCH = 3, + G_DATE_APRIL = 4, + G_DATE_MAY = 5, + G_DATE_JUNE = 6, + G_DATE_JULY = 7, + G_DATE_AUGUST = 8, + G_DATE_SEPTEMBER = 9, + G_DATE_OCTOBER = 10, + G_DATE_NOVEMBER = 11, + G_DATE_DECEMBER = 12 +} GDateMonth; +# 101 "/usr/include/glib-2.0/glib/gdate.h" +struct _GDate +{ + guint julian_days : 32; + + + + + + guint julian : 1; + guint dmy : 1; + + + guint day : 6; + guint month : 4; + guint year : 16; +}; + + + + + +GDate* g_date_new (void); +GDate* g_date_new_dmy (GDateDay day, + GDateMonth month, + GDateYear year); +GDate* g_date_new_julian (guint32 julian_day); +void g_date_free (GDate *date); + + + + + + +gboolean g_date_valid (const GDate *date); +gboolean g_date_valid_day (GDateDay day) __attribute__((__const__)); +gboolean g_date_valid_month (GDateMonth month) __attribute__((__const__)); +gboolean g_date_valid_year (GDateYear year) __attribute__((__const__)); +gboolean g_date_valid_weekday (GDateWeekday weekday) __attribute__((__const__)); +gboolean g_date_valid_julian (guint32 julian_date) __attribute__((__const__)); +gboolean g_date_valid_dmy (GDateDay day, + GDateMonth month, + GDateYear year) __attribute__((__const__)); + +GDateWeekday g_date_get_weekday (const GDate *date); +GDateMonth g_date_get_month (const GDate *date); +GDateYear g_date_get_year (const GDate *date); +GDateDay g_date_get_day (const GDate *date); +guint32 g_date_get_julian (const GDate *date); +guint g_date_get_day_of_year (const GDate *date); + + + + + + +guint g_date_get_monday_week_of_year (const GDate *date); +guint g_date_get_sunday_week_of_year (const GDate *date); +guint g_date_get_iso8601_week_of_year (const GDate *date); + + + + + +void g_date_clear (GDate *date, + guint n_dates); + + + + + +void g_date_set_parse (GDate *date, + const gchar *str); +void g_date_set_time_t (GDate *date, + time_t timet); +void g_date_set_time_val (GDate *date, + GTimeVal *timeval); + +__attribute__((__deprecated__("Use '" "g_date_set_time_t" "' instead"))) +void g_date_set_time (GDate *date, + GTime time_); + +void g_date_set_month (GDate *date, + GDateMonth month); +void g_date_set_day (GDate *date, + GDateDay day); +void g_date_set_year (GDate *date, + GDateYear year); +void g_date_set_dmy (GDate *date, + GDateDay day, + GDateMonth month, + GDateYear y); +void g_date_set_julian (GDate *date, + guint32 julian_date); +gboolean g_date_is_first_of_month (const GDate *date); +gboolean g_date_is_last_of_month (const GDate *date); + + +void g_date_add_days (GDate *date, + guint n_days); +void g_date_subtract_days (GDate *date, + guint n_days); + + +void g_date_add_months (GDate *date, + guint n_months); +void g_date_subtract_months (GDate *date, + guint n_months); + + +void g_date_add_years (GDate *date, + guint n_years); +void g_date_subtract_years (GDate *date, + guint n_years); +gboolean g_date_is_leap_year (GDateYear year) __attribute__((__const__)); +guint8 g_date_get_days_in_month (GDateMonth month, + GDateYear year) __attribute__((__const__)); +guint8 g_date_get_monday_weeks_in_year (GDateYear year) __attribute__((__const__)); +guint8 g_date_get_sunday_weeks_in_year (GDateYear year) __attribute__((__const__)); + + + +gint g_date_days_between (const GDate *date1, + const GDate *date2); + + +gint g_date_compare (const GDate *lhs, + const GDate *rhs); +void g_date_to_struct_tm (const GDate *date, + struct tm *tm); + +void g_date_clamp (GDate *date, + const GDate *min_date, + const GDate *max_date); + + +void g_date_order (GDate *date1, GDate *date2); + + + + +gsize g_date_strftime (gchar *s, + gsize slen, + const gchar *format, + const GDate *date); +# 262 "/usr/include/glib-2.0/glib/gdate.h" + +# 46 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gdatetime.h" 1 +# 33 "/usr/include/glib-2.0/glib/gdatetime.h" +# 1 "/usr/include/glib-2.0/glib/gtimezone.h" 1 +# 29 "/usr/include/glib-2.0/glib/gtimezone.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 30 "/usr/include/glib-2.0/glib/gtimezone.h" 2 + + + +typedef struct _GTimeZone GTimeZone; +# 50 "/usr/include/glib-2.0/glib/gtimezone.h" +typedef enum +{ + G_TIME_TYPE_STANDARD, + G_TIME_TYPE_DAYLIGHT, + G_TIME_TYPE_UNIVERSAL +} GTimeType; + +GTimeZone * g_time_zone_new (const gchar *identifier); +GTimeZone * g_time_zone_new_utc (void); +GTimeZone * g_time_zone_new_local (void); + +GTimeZone * g_time_zone_ref (GTimeZone *tz); +void g_time_zone_unref (GTimeZone *tz); + +gint g_time_zone_find_interval (GTimeZone *tz, + GTimeType type, + gint64 time_); + +gint g_time_zone_adjust_time (GTimeZone *tz, + GTimeType type, + gint64 *time_); + +const gchar * g_time_zone_get_abbreviation (GTimeZone *tz, + gint interval); +gint32 g_time_zone_get_offset (GTimeZone *tz, + gint interval); +gboolean g_time_zone_is_dst (GTimeZone *tz, + gint interval); + + +# 34 "/usr/include/glib-2.0/glib/gdatetime.h" 2 + + +# 89 "/usr/include/glib-2.0/glib/gdatetime.h" +typedef gint64 GTimeSpan; +# 99 "/usr/include/glib-2.0/glib/gdatetime.h" +typedef struct _GDateTime GDateTime; + +void g_date_time_unref (GDateTime *datetime); +GDateTime * g_date_time_ref (GDateTime *datetime); + +GDateTime * g_date_time_new_now (GTimeZone *tz); +GDateTime * g_date_time_new_now_local (void); +GDateTime * g_date_time_new_now_utc (void); + +GDateTime * g_date_time_new_from_unix_local (gint64 t); +GDateTime * g_date_time_new_from_unix_utc (gint64 t); + +GDateTime * g_date_time_new_from_timeval_local (const GTimeVal *tv); +GDateTime * g_date_time_new_from_timeval_utc (const GTimeVal *tv); + +GDateTime * g_date_time_new (GTimeZone *tz, + gint year, + gint month, + gint day, + gint hour, + gint minute, + gdouble seconds); +GDateTime * g_date_time_new_local (gint year, + gint month, + gint day, + gint hour, + gint minute, + gdouble seconds); +GDateTime * g_date_time_new_utc (gint year, + gint month, + gint day, + gint hour, + gint minute, + gdouble seconds); + +__attribute__((warn_unused_result)) +GDateTime * g_date_time_add (GDateTime *datetime, + GTimeSpan timespan); + +__attribute__((warn_unused_result)) +GDateTime * g_date_time_add_years (GDateTime *datetime, + gint years); +__attribute__((warn_unused_result)) +GDateTime * g_date_time_add_months (GDateTime *datetime, + gint months); +__attribute__((warn_unused_result)) +GDateTime * g_date_time_add_weeks (GDateTime *datetime, + gint weeks); +__attribute__((warn_unused_result)) +GDateTime * g_date_time_add_days (GDateTime *datetime, + gint days); + +__attribute__((warn_unused_result)) +GDateTime * g_date_time_add_hours (GDateTime *datetime, + gint hours); +__attribute__((warn_unused_result)) +GDateTime * g_date_time_add_minutes (GDateTime *datetime, + gint minutes); +__attribute__((warn_unused_result)) +GDateTime * g_date_time_add_seconds (GDateTime *datetime, + gdouble seconds); + +__attribute__((warn_unused_result)) +GDateTime * g_date_time_add_full (GDateTime *datetime, + gint years, + gint months, + gint days, + gint hours, + gint minutes, + gdouble seconds); + +gint g_date_time_compare (gconstpointer dt1, + gconstpointer dt2); +GTimeSpan g_date_time_difference (GDateTime *end, + GDateTime *begin); +guint g_date_time_hash (gconstpointer datetime); +gboolean g_date_time_equal (gconstpointer dt1, + gconstpointer dt2); + +void g_date_time_get_ymd (GDateTime *datetime, + gint *year, + gint *month, + gint *day); + +gint g_date_time_get_year (GDateTime *datetime); +gint g_date_time_get_month (GDateTime *datetime); +gint g_date_time_get_day_of_month (GDateTime *datetime); + +gint g_date_time_get_week_numbering_year (GDateTime *datetime); +gint g_date_time_get_week_of_year (GDateTime *datetime); +gint g_date_time_get_day_of_week (GDateTime *datetime); + +gint g_date_time_get_day_of_year (GDateTime *datetime); + +gint g_date_time_get_hour (GDateTime *datetime); +gint g_date_time_get_minute (GDateTime *datetime); +gint g_date_time_get_second (GDateTime *datetime); +gint g_date_time_get_microsecond (GDateTime *datetime); +gdouble g_date_time_get_seconds (GDateTime *datetime); + +gint64 g_date_time_to_unix (GDateTime *datetime); +gboolean g_date_time_to_timeval (GDateTime *datetime, + GTimeVal *tv); + +GTimeSpan g_date_time_get_utc_offset (GDateTime *datetime); +const gchar * g_date_time_get_timezone_abbreviation (GDateTime *datetime); +gboolean g_date_time_is_daylight_savings (GDateTime *datetime); + +GDateTime * g_date_time_to_timezone (GDateTime *datetime, + GTimeZone *tz); +GDateTime * g_date_time_to_local (GDateTime *datetime); +GDateTime * g_date_time_to_utc (GDateTime *datetime); + +gchar * g_date_time_format (GDateTime *datetime, + const gchar *format) __attribute__((__malloc__)); + + +# 47 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gdir.h" 1 +# 31 "/usr/include/glib-2.0/glib/gdir.h" +# 1 "/usr/include/glib-2.0/glib/gerror.h" 1 +# 32 "/usr/include/glib-2.0/glib/gdir.h" 2 + + + +typedef struct _GDir GDir; +# 45 "/usr/include/glib-2.0/glib/gdir.h" +GDir * g_dir_open (const gchar *path, + guint flags, + GError **error); +const gchar * g_dir_read_name (GDir *dir); +void g_dir_rewind (GDir *dir); +void g_dir_close (GDir *dir); + + +# 48 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/genviron.h" 1 +# 34 "/usr/include/glib-2.0/glib/genviron.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 35 "/usr/include/glib-2.0/glib/genviron.h" 2 + + +# 46 "/usr/include/glib-2.0/glib/genviron.h" +const gchar * g_getenv (const gchar *variable); +gboolean g_setenv (const gchar *variable, + const gchar *value, + gboolean overwrite); +void g_unsetenv (const gchar *variable); +gchar ** g_listenv (void); + +gchar ** g_get_environ (void); +const gchar * g_environ_getenv (gchar **envp, + const gchar *variable); +gchar ** g_environ_setenv (gchar **envp, + const gchar *variable, + const gchar *value, + gboolean overwrite) __attribute__((warn_unused_result)); +gchar ** g_environ_unsetenv (gchar **envp, + const gchar *variable) __attribute__((warn_unused_result)); + + +# 49 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gerror.h" 1 +# 50 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gfileutils.h" 1 +# 28 "/usr/include/glib-2.0/glib/gfileutils.h" +# 1 "/usr/include/glib-2.0/glib/gerror.h" 1 +# 29 "/usr/include/glib-2.0/glib/gfileutils.h" 2 + + + + + +typedef enum +{ + G_FILE_ERROR_EXIST, + G_FILE_ERROR_ISDIR, + G_FILE_ERROR_ACCES, + G_FILE_ERROR_NAMETOOLONG, + G_FILE_ERROR_NOENT, + G_FILE_ERROR_NOTDIR, + G_FILE_ERROR_NXIO, + G_FILE_ERROR_NODEV, + G_FILE_ERROR_ROFS, + G_FILE_ERROR_TXTBSY, + G_FILE_ERROR_FAULT, + G_FILE_ERROR_LOOP, + G_FILE_ERROR_NOSPC, + G_FILE_ERROR_NOMEM, + G_FILE_ERROR_MFILE, + G_FILE_ERROR_NFILE, + G_FILE_ERROR_BADF, + G_FILE_ERROR_INVAL, + G_FILE_ERROR_PIPE, + G_FILE_ERROR_AGAIN, + G_FILE_ERROR_INTR, + G_FILE_ERROR_IO, + G_FILE_ERROR_PERM, + G_FILE_ERROR_NOSYS, + G_FILE_ERROR_FAILED +} GFileError; + + + + + +typedef enum +{ + G_FILE_TEST_IS_REGULAR = 1 << 0, + G_FILE_TEST_IS_SYMLINK = 1 << 1, + G_FILE_TEST_IS_DIR = 1 << 2, + G_FILE_TEST_IS_EXECUTABLE = 1 << 3, + G_FILE_TEST_EXISTS = 1 << 4 +} GFileTest; + +GQuark g_file_error_quark (void); + +GFileError g_file_error_from_errno (gint err_no); +# 89 "/usr/include/glib-2.0/glib/gfileutils.h" +gboolean g_file_test (const gchar *filename, + GFileTest test); +gboolean g_file_get_contents (const gchar *filename, + gchar **contents, + gsize *length, + GError **error); +gboolean g_file_set_contents (const gchar *filename, + const gchar *contents, + gssize length, + GError **error); +gchar *g_file_read_link (const gchar *filename, + GError **error); + + + +gchar *g_mkdtemp (gchar *tmpl); + +gchar *g_mkdtemp_full (gchar *tmpl, + gint mode); + + +gint g_mkstemp (gchar *tmpl); +gint g_mkstemp_full (gchar *tmpl, + gint flags, + gint mode); + + +gint g_file_open_tmp (const gchar *tmpl, + gchar **name_used, + GError **error); + +gchar *g_dir_make_tmp (const gchar *tmpl, + GError **error); + +gchar *g_build_path (const gchar *separator, + const gchar *first_element, + ...) __attribute__((__malloc__)) __attribute__((__sentinel__)); +gchar *g_build_pathv (const gchar *separator, + gchar **args) __attribute__((__malloc__)); + +gchar *g_build_filename (const gchar *first_element, + ...) __attribute__((__malloc__)) __attribute__((__sentinel__)); +gchar *g_build_filenamev (gchar **args) __attribute__((__malloc__)); + +gint g_mkdir_with_parents (const gchar *pathname, + gint mode); +# 158 "/usr/include/glib-2.0/glib/gfileutils.h" +gboolean g_path_is_absolute (const gchar *file_name); +const gchar *g_path_skip_root (const gchar *file_name); + +__attribute__((__deprecated__("Use '" "g_path_get_basename" "' instead"))) +const gchar *g_basename (const gchar *file_name); +# 173 "/usr/include/glib-2.0/glib/gfileutils.h" +gchar *g_get_current_dir (void); +gchar *g_path_get_basename (const gchar *file_name) __attribute__((__malloc__)); +gchar *g_path_get_dirname (const gchar *file_name) __attribute__((__malloc__)); + + +# 51 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/ggettext.h" 1 +# 34 "/usr/include/glib-2.0/glib/ggettext.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 35 "/usr/include/glib-2.0/glib/ggettext.h" 2 + + + +const gchar *g_strip_context (const gchar *msgid, + const gchar *msgval) __attribute__((__format_arg__ (1))); + +const gchar *g_dgettext (const gchar *domain, + const gchar *msgid) __attribute__((__format_arg__ (2))); +const gchar *g_dcgettext (const gchar *domain, + const gchar *msgid, + gint category) __attribute__((__format_arg__ (2))); +const gchar *g_dngettext (const gchar *domain, + const gchar *msgid, + const gchar *msgid_plural, + gulong n) __attribute__((__format_arg__ (3))); +const gchar *g_dpgettext (const gchar *domain, + const gchar *msgctxtid, + gsize msgidoffset) __attribute__((__format_arg__ (2))); +const gchar *g_dpgettext2 (const gchar *domain, + const gchar *context, + const gchar *msgid) __attribute__((__format_arg__ (3))); + + +# 52 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/ghash.h" 1 +# 34 "/usr/include/glib-2.0/glib/ghash.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 35 "/usr/include/glib-2.0/glib/ghash.h" 2 +# 1 "/usr/include/glib-2.0/glib/glist.h" 1 +# 34 "/usr/include/glib-2.0/glib/glist.h" +# 1 "/usr/include/glib-2.0/glib/gmem.h" 1 +# 34 "/usr/include/glib-2.0/glib/gmem.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 35 "/usr/include/glib-2.0/glib/gmem.h" 2 + + +# 51 "/usr/include/glib-2.0/glib/gmem.h" +typedef struct _GMemVTable GMemVTable; +# 70 "/usr/include/glib-2.0/glib/gmem.h" +void g_free (gpointer mem); + +gpointer g_malloc (gsize n_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))); +gpointer g_malloc0 (gsize n_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))); +gpointer g_realloc (gpointer mem, + gsize n_bytes) __attribute__((warn_unused_result)); +gpointer g_try_malloc (gsize n_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))); +gpointer g_try_malloc0 (gsize n_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))); +gpointer g_try_realloc (gpointer mem, + gsize n_bytes) __attribute__((warn_unused_result)); + +gpointer g_malloc_n (gsize n_blocks, + gsize n_block_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1,2))); +gpointer g_malloc0_n (gsize n_blocks, + gsize n_block_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1,2))); +gpointer g_realloc_n (gpointer mem, + gsize n_blocks, + gsize n_block_bytes) __attribute__((warn_unused_result)); +gpointer g_try_malloc_n (gsize n_blocks, + gsize n_block_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1,2))); +gpointer g_try_malloc0_n (gsize n_blocks, + gsize n_block_bytes) __attribute__((__malloc__)) __attribute__((__alloc_size__(1,2))); +gpointer g_try_realloc_n (gpointer mem, + gsize n_blocks, + gsize n_block_bytes) __attribute__((warn_unused_result)); +# 240 "/usr/include/glib-2.0/glib/gmem.h" +struct _GMemVTable { + gpointer (*malloc) (gsize n_bytes); + gpointer (*realloc) (gpointer mem, + gsize n_bytes); + void (*free) (gpointer mem); + + gpointer (*calloc) (gsize n_blocks, + gsize n_block_bytes); + gpointer (*try_malloc) (gsize n_bytes); + gpointer (*try_realloc) (gpointer mem, + gsize n_bytes); +}; +void g_mem_set_vtable (GMemVTable *vtable); +gboolean g_mem_is_system_malloc (void); + +extern gboolean g_mem_gc_friendly; + + + +extern GMemVTable *glib_mem_profiler_table; +void g_mem_profile (void); + + +# 35 "/usr/include/glib-2.0/glib/glist.h" 2 + + + +typedef struct _GList GList; + +struct _GList +{ + gpointer data; + GList *next; + GList *prev; +}; + + + +GList* g_list_alloc (void) __attribute__((warn_unused_result)); +void g_list_free (GList *list); +void g_list_free_1 (GList *list); + +void g_list_free_full (GList *list, + GDestroyNotify free_func); +GList* g_list_append (GList *list, + gpointer data) __attribute__((warn_unused_result)); +GList* g_list_prepend (GList *list, + gpointer data) __attribute__((warn_unused_result)); +GList* g_list_insert (GList *list, + gpointer data, + gint position) __attribute__((warn_unused_result)); +GList* g_list_insert_sorted (GList *list, + gpointer data, + GCompareFunc func) __attribute__((warn_unused_result)); +GList* g_list_insert_sorted_with_data (GList *list, + gpointer data, + GCompareDataFunc func, + gpointer user_data) __attribute__((warn_unused_result)); +GList* g_list_insert_before (GList *list, + GList *sibling, + gpointer data) __attribute__((warn_unused_result)); +GList* g_list_concat (GList *list1, + GList *list2) __attribute__((warn_unused_result)); +GList* g_list_remove (GList *list, + gconstpointer data) __attribute__((warn_unused_result)); +GList* g_list_remove_all (GList *list, + gconstpointer data) __attribute__((warn_unused_result)); +GList* g_list_remove_link (GList *list, + GList *llink) __attribute__((warn_unused_result)); +GList* g_list_delete_link (GList *list, + GList *link_) __attribute__((warn_unused_result)); +GList* g_list_reverse (GList *list) __attribute__((warn_unused_result)); +GList* g_list_copy (GList *list) __attribute__((warn_unused_result)); +GList* g_list_nth (GList *list, + guint n); +GList* g_list_nth_prev (GList *list, + guint n); +GList* g_list_find (GList *list, + gconstpointer data); +GList* g_list_find_custom (GList *list, + gconstpointer data, + GCompareFunc func); +gint g_list_position (GList *list, + GList *llink); +gint g_list_index (GList *list, + gconstpointer data); +GList* g_list_last (GList *list); +GList* g_list_first (GList *list); +guint g_list_length (GList *list); +void g_list_foreach (GList *list, + GFunc func, + gpointer user_data); +GList* g_list_sort (GList *list, + GCompareFunc compare_func) __attribute__((warn_unused_result)); +GList* g_list_sort_with_data (GList *list, + GCompareDataFunc compare_func, + gpointer user_data) __attribute__((warn_unused_result)); +gpointer g_list_nth_data (GList *list, + guint n); + + + + + + +# 36 "/usr/include/glib-2.0/glib/ghash.h" 2 + + + +typedef struct _GHashTable GHashTable; + +typedef gboolean (*GHRFunc) (gpointer key, + gpointer value, + gpointer user_data); + +typedef struct _GHashTableIter GHashTableIter; + +struct _GHashTableIter +{ + + gpointer dummy1; + gpointer dummy2; + gpointer dummy3; + int dummy4; + gboolean dummy5; + gpointer dummy6; +}; + +GHashTable* g_hash_table_new (GHashFunc hash_func, + GEqualFunc key_equal_func); +GHashTable* g_hash_table_new_full (GHashFunc hash_func, + GEqualFunc key_equal_func, + GDestroyNotify key_destroy_func, + GDestroyNotify value_destroy_func); +void g_hash_table_destroy (GHashTable *hash_table); +void g_hash_table_insert (GHashTable *hash_table, + gpointer key, + gpointer value); +void g_hash_table_replace (GHashTable *hash_table, + gpointer key, + gpointer value); +void g_hash_table_add (GHashTable *hash_table, + gpointer key); +gboolean g_hash_table_remove (GHashTable *hash_table, + gconstpointer key); +void g_hash_table_remove_all (GHashTable *hash_table); +gboolean g_hash_table_steal (GHashTable *hash_table, + gconstpointer key); +void g_hash_table_steal_all (GHashTable *hash_table); +gpointer g_hash_table_lookup (GHashTable *hash_table, + gconstpointer key); +gboolean g_hash_table_contains (GHashTable *hash_table, + gconstpointer key); +gboolean g_hash_table_lookup_extended (GHashTable *hash_table, + gconstpointer lookup_key, + gpointer *orig_key, + gpointer *value); +void g_hash_table_foreach (GHashTable *hash_table, + GHFunc func, + gpointer user_data); +gpointer g_hash_table_find (GHashTable *hash_table, + GHRFunc predicate, + gpointer user_data); +guint g_hash_table_foreach_remove (GHashTable *hash_table, + GHRFunc func, + gpointer user_data); +guint g_hash_table_foreach_steal (GHashTable *hash_table, + GHRFunc func, + gpointer user_data); +guint g_hash_table_size (GHashTable *hash_table); +GList * g_hash_table_get_keys (GHashTable *hash_table); +GList * g_hash_table_get_values (GHashTable *hash_table); + +void g_hash_table_iter_init (GHashTableIter *iter, + GHashTable *hash_table); +gboolean g_hash_table_iter_next (GHashTableIter *iter, + gpointer *key, + gpointer *value); +GHashTable* g_hash_table_iter_get_hash_table (GHashTableIter *iter); +void g_hash_table_iter_remove (GHashTableIter *iter); + +void g_hash_table_iter_replace (GHashTableIter *iter, + gpointer value); +void g_hash_table_iter_steal (GHashTableIter *iter); + +GHashTable* g_hash_table_ref (GHashTable *hash_table); +void g_hash_table_unref (GHashTable *hash_table); +# 125 "/usr/include/glib-2.0/glib/ghash.h" +gboolean g_str_equal (gconstpointer v1, + gconstpointer v2); +guint g_str_hash (gconstpointer v); + +gboolean g_int_equal (gconstpointer v1, + gconstpointer v2); +guint g_int_hash (gconstpointer v); + +gboolean g_int64_equal (gconstpointer v1, + gconstpointer v2); +guint g_int64_hash (gconstpointer v); + +gboolean g_double_equal (gconstpointer v1, + gconstpointer v2); +guint g_double_hash (gconstpointer v); + +guint g_direct_hash (gconstpointer v) __attribute__((__const__)); +gboolean g_direct_equal (gconstpointer v1, + gconstpointer v2) __attribute__((__const__)); + + +# 53 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/ghmac.h" 1 +# 28 "/usr/include/glib-2.0/glib/ghmac.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 29 "/usr/include/glib-2.0/glib/ghmac.h" 2 +# 1 "/usr/include/glib-2.0/glib/gchecksum.h" 1 +# 30 "/usr/include/glib-2.0/glib/ghmac.h" 2 + + +# 42 "/usr/include/glib-2.0/glib/ghmac.h" +typedef struct _GHmac GHmac; + + +GHmac * g_hmac_new (GChecksumType digest_type, + const guchar *key, + gsize key_len); + +GHmac * g_hmac_copy (const GHmac *hmac); + +GHmac * g_hmac_ref (GHmac *hmac); + +void g_hmac_unref (GHmac *hmac); + +void g_hmac_update (GHmac *hmac, + const guchar *data, + gssize length); + +const gchar * g_hmac_get_string (GHmac *hmac); + +void g_hmac_get_digest (GHmac *hmac, + guint8 *buffer, + gsize *digest_len); + + +gchar *g_compute_hmac_for_data (GChecksumType digest_type, + const guchar *key, + gsize key_len, + const guchar *data, + gsize length); + +gchar *g_compute_hmac_for_string (GChecksumType digest_type, + const guchar *key, + gsize key_len, + const gchar *str, + gssize length); + + +# 54 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/ghook.h" 1 +# 34 "/usr/include/glib-2.0/glib/ghook.h" +# 1 "/usr/include/glib-2.0/glib/gmem.h" 1 +# 35 "/usr/include/glib-2.0/glib/ghook.h" 2 + + + + + +typedef struct _GHook GHook; +typedef struct _GHookList GHookList; + +typedef gint (*GHookCompareFunc) (GHook *new_hook, + GHook *sibling); +typedef gboolean (*GHookFindFunc) (GHook *hook, + gpointer data); +typedef void (*GHookMarshaller) (GHook *hook, + gpointer marshal_data); +typedef gboolean (*GHookCheckMarshaller) (GHook *hook, + gpointer marshal_data); +typedef void (*GHookFunc) (gpointer data); +typedef gboolean (*GHookCheckFunc) (gpointer data); +typedef void (*GHookFinalizeFunc) (GHookList *hook_list, + GHook *hook); +typedef enum +{ + G_HOOK_FLAG_ACTIVE = 1 << 0, + G_HOOK_FLAG_IN_CALL = 1 << 1, + G_HOOK_FLAG_MASK = 0x0f +} GHookFlagMask; + + + + +struct _GHookList +{ + gulong seq_id; + guint hook_size : 16; + guint is_setup : 1; + GHook *hooks; + gpointer dummy3; + GHookFinalizeFunc finalize_hook; + gpointer dummy[2]; +}; +struct _GHook +{ + gpointer data; + GHook *next; + GHook *prev; + guint ref_count; + gulong hook_id; + guint flags; + gpointer func; + GDestroyNotify destroy; +}; +# 106 "/usr/include/glib-2.0/glib/ghook.h" +void g_hook_list_init (GHookList *hook_list, + guint hook_size); +void g_hook_list_clear (GHookList *hook_list); +GHook* g_hook_alloc (GHookList *hook_list); +void g_hook_free (GHookList *hook_list, + GHook *hook); +GHook * g_hook_ref (GHookList *hook_list, + GHook *hook); +void g_hook_unref (GHookList *hook_list, + GHook *hook); +gboolean g_hook_destroy (GHookList *hook_list, + gulong hook_id); +void g_hook_destroy_link (GHookList *hook_list, + GHook *hook); +void g_hook_prepend (GHookList *hook_list, + GHook *hook); +void g_hook_insert_before (GHookList *hook_list, + GHook *sibling, + GHook *hook); +void g_hook_insert_sorted (GHookList *hook_list, + GHook *hook, + GHookCompareFunc func); +GHook* g_hook_get (GHookList *hook_list, + gulong hook_id); +GHook* g_hook_find (GHookList *hook_list, + gboolean need_valids, + GHookFindFunc func, + gpointer data); +GHook* g_hook_find_data (GHookList *hook_list, + gboolean need_valids, + gpointer data); +GHook* g_hook_find_func (GHookList *hook_list, + gboolean need_valids, + gpointer func); +GHook* g_hook_find_func_data (GHookList *hook_list, + gboolean need_valids, + gpointer func, + gpointer data); + +GHook* g_hook_first_valid (GHookList *hook_list, + gboolean may_be_in_call); + + + +GHook* g_hook_next_valid (GHookList *hook_list, + GHook *hook, + gboolean may_be_in_call); + +gint g_hook_compare_ids (GHook *new_hook, + GHook *sibling); + + + + + +void g_hook_list_invoke (GHookList *hook_list, + gboolean may_recurse); + + + +void g_hook_list_invoke_check (GHookList *hook_list, + gboolean may_recurse); + + +void g_hook_list_marshal (GHookList *hook_list, + gboolean may_recurse, + GHookMarshaller marshaller, + gpointer marshal_data); +void g_hook_list_marshal_check (GHookList *hook_list, + gboolean may_recurse, + GHookCheckMarshaller marshaller, + gpointer marshal_data); + + +# 55 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/ghostutils.h" 1 +# 27 "/usr/include/glib-2.0/glib/ghostutils.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 28 "/usr/include/glib-2.0/glib/ghostutils.h" 2 + + + +gboolean g_hostname_is_non_ascii (const gchar *hostname); +gboolean g_hostname_is_ascii_encoded (const gchar *hostname); +gboolean g_hostname_is_ip_address (const gchar *hostname); + +gchar *g_hostname_to_ascii (const gchar *hostname); +gchar *g_hostname_to_unicode (const gchar *hostname); + + +# 56 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/giochannel.h" 1 +# 34 "/usr/include/glib-2.0/glib/giochannel.h" +# 1 "/usr/include/glib-2.0/glib/gconvert.h" 1 +# 35 "/usr/include/glib-2.0/glib/giochannel.h" 2 +# 1 "/usr/include/glib-2.0/glib/gmain.h" 1 +# 27 "/usr/include/glib-2.0/glib/gmain.h" +# 1 "/usr/include/glib-2.0/glib/gpoll.h" 1 +# 27 "/usr/include/glib-2.0/glib/gpoll.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 28 "/usr/include/glib-2.0/glib/gpoll.h" 2 + + +# 61 "/usr/include/glib-2.0/glib/gpoll.h" +typedef struct _GPollFD GPollFD; +# 76 "/usr/include/glib-2.0/glib/gpoll.h" +typedef gint (*GPollFunc) (GPollFD *ufds, + guint nfsd, + gint timeout_); +# 93 "/usr/include/glib-2.0/glib/gpoll.h" +struct _GPollFD +{ + + + + gint fd; + + gushort events; + gushort revents; +}; +# 114 "/usr/include/glib-2.0/glib/gpoll.h" +gint g_poll (GPollFD *fds, + guint nfds, + gint timeout); + + +# 28 "/usr/include/glib-2.0/glib/gmain.h" 2 +# 1 "/usr/include/glib-2.0/glib/gslist.h" 1 +# 34 "/usr/include/glib-2.0/glib/gslist.h" +# 1 "/usr/include/glib-2.0/glib/gmem.h" 1 +# 35 "/usr/include/glib-2.0/glib/gslist.h" 2 + + + +typedef struct _GSList GSList; + +struct _GSList +{ + gpointer data; + GSList *next; +}; + + + +GSList* g_slist_alloc (void) __attribute__((warn_unused_result)); +void g_slist_free (GSList *list); +void g_slist_free_1 (GSList *list); + +void g_slist_free_full (GSList *list, + GDestroyNotify free_func); +GSList* g_slist_append (GSList *list, + gpointer data) __attribute__((warn_unused_result)); +GSList* g_slist_prepend (GSList *list, + gpointer data) __attribute__((warn_unused_result)); +GSList* g_slist_insert (GSList *list, + gpointer data, + gint position) __attribute__((warn_unused_result)); +GSList* g_slist_insert_sorted (GSList *list, + gpointer data, + GCompareFunc func) __attribute__((warn_unused_result)); +GSList* g_slist_insert_sorted_with_data (GSList *list, + gpointer data, + GCompareDataFunc func, + gpointer user_data) __attribute__((warn_unused_result)); +GSList* g_slist_insert_before (GSList *slist, + GSList *sibling, + gpointer data) __attribute__((warn_unused_result)); +GSList* g_slist_concat (GSList *list1, + GSList *list2) __attribute__((warn_unused_result)); +GSList* g_slist_remove (GSList *list, + gconstpointer data) __attribute__((warn_unused_result)); +GSList* g_slist_remove_all (GSList *list, + gconstpointer data) __attribute__((warn_unused_result)); +GSList* g_slist_remove_link (GSList *list, + GSList *link_) __attribute__((warn_unused_result)); +GSList* g_slist_delete_link (GSList *list, + GSList *link_) __attribute__((warn_unused_result)); +GSList* g_slist_reverse (GSList *list) __attribute__((warn_unused_result)); +GSList* g_slist_copy (GSList *list) __attribute__((warn_unused_result)); +GSList* g_slist_nth (GSList *list, + guint n); +GSList* g_slist_find (GSList *list, + gconstpointer data); +GSList* g_slist_find_custom (GSList *list, + gconstpointer data, + GCompareFunc func); +gint g_slist_position (GSList *list, + GSList *llink); +gint g_slist_index (GSList *list, + gconstpointer data); +GSList* g_slist_last (GSList *list); +guint g_slist_length (GSList *list); +void g_slist_foreach (GSList *list, + GFunc func, + gpointer user_data); +GSList* g_slist_sort (GSList *list, + GCompareFunc compare_func) __attribute__((warn_unused_result)); +GSList* g_slist_sort_with_data (GSList *list, + GCompareDataFunc compare_func, + gpointer user_data) __attribute__((warn_unused_result)); +gpointer g_slist_nth_data (GSList *list, + guint n); + + + + +# 29 "/usr/include/glib-2.0/glib/gmain.h" 2 +# 1 "/usr/include/glib-2.0/glib/gthread.h" 1 +# 30 "/usr/include/glib-2.0/glib/gmain.h" 2 + + + + + + + + + +typedef struct _GMainContext GMainContext; + + + + + + + +typedef struct _GMainLoop GMainLoop; + + + + + + + +typedef struct _GSource GSource; +typedef struct _GSourcePrivate GSourcePrivate; +# 68 "/usr/include/glib-2.0/glib/gmain.h" +typedef struct _GSourceCallbackFuncs GSourceCallbackFuncs; +# 113 "/usr/include/glib-2.0/glib/gmain.h" +typedef struct _GSourceFuncs GSourceFuncs; +# 137 "/usr/include/glib-2.0/glib/gmain.h" +typedef gboolean (*GSourceFunc) (gpointer user_data); +# 148 "/usr/include/glib-2.0/glib/gmain.h" +typedef void (*GChildWatchFunc) (GPid pid, + gint status, + gpointer user_data); +struct _GSource +{ + + gpointer callback_data; + GSourceCallbackFuncs *callback_funcs; + + GSourceFuncs *source_funcs; + guint ref_count; + + GMainContext *context; + + gint priority; + guint flags; + guint source_id; + + GSList *poll_fds; + + GSource *prev; + GSource *next; + + char *name; + + GSourcePrivate *priv; +}; + +struct _GSourceCallbackFuncs +{ + void (*ref) (gpointer cb_data); + void (*unref) (gpointer cb_data); + void (*get) (gpointer cb_data, + GSource *source, + GSourceFunc *func, + gpointer *data); +}; + + + + + + + +typedef void (*GSourceDummyMarshal) (void); + +struct _GSourceFuncs +{ + gboolean (*prepare) (GSource *source, + gint *timeout_); + gboolean (*check) (GSource *source); + gboolean (*dispatch) (GSource *source, + GSourceFunc callback, + gpointer user_data); + void (*finalize) (GSource *source); + + + + GSourceFunc closure_callback; + GSourceDummyMarshal closure_marshal; +}; +# 285 "/usr/include/glib-2.0/glib/gmain.h" +GMainContext *g_main_context_new (void); +GMainContext *g_main_context_ref (GMainContext *context); +void g_main_context_unref (GMainContext *context); +GMainContext *g_main_context_default (void); + +gboolean g_main_context_iteration (GMainContext *context, + gboolean may_block); +gboolean g_main_context_pending (GMainContext *context); + + + +GSource *g_main_context_find_source_by_id (GMainContext *context, + guint source_id); +GSource *g_main_context_find_source_by_user_data (GMainContext *context, + gpointer user_data); +GSource *g_main_context_find_source_by_funcs_user_data (GMainContext *context, + GSourceFuncs *funcs, + gpointer user_data); + + + +void g_main_context_wakeup (GMainContext *context); +gboolean g_main_context_acquire (GMainContext *context); +void g_main_context_release (GMainContext *context); +gboolean g_main_context_is_owner (GMainContext *context); +gboolean g_main_context_wait (GMainContext *context, + GCond *cond, + GMutex *mutex); + +gboolean g_main_context_prepare (GMainContext *context, + gint *priority); +gint g_main_context_query (GMainContext *context, + gint max_priority, + gint *timeout_, + GPollFD *fds, + gint n_fds); +gint g_main_context_check (GMainContext *context, + gint max_priority, + GPollFD *fds, + gint n_fds); +void g_main_context_dispatch (GMainContext *context); + +void g_main_context_set_poll_func (GMainContext *context, + GPollFunc func); +GPollFunc g_main_context_get_poll_func (GMainContext *context); + + + +void g_main_context_add_poll (GMainContext *context, + GPollFD *fd, + gint priority); +void g_main_context_remove_poll (GMainContext *context, + GPollFD *fd); + +gint g_main_depth (void); +GSource *g_main_current_source (void); + + + +void g_main_context_push_thread_default (GMainContext *context); +void g_main_context_pop_thread_default (GMainContext *context); +GMainContext *g_main_context_get_thread_default (void); +GMainContext *g_main_context_ref_thread_default (void); + + + +GMainLoop *g_main_loop_new (GMainContext *context, + gboolean is_running); +void g_main_loop_run (GMainLoop *loop); +void g_main_loop_quit (GMainLoop *loop); +GMainLoop *g_main_loop_ref (GMainLoop *loop); +void g_main_loop_unref (GMainLoop *loop); +gboolean g_main_loop_is_running (GMainLoop *loop); +GMainContext *g_main_loop_get_context (GMainLoop *loop); + + + +GSource *g_source_new (GSourceFuncs *source_funcs, + guint struct_size); +GSource *g_source_ref (GSource *source); +void g_source_unref (GSource *source); + +guint g_source_attach (GSource *source, + GMainContext *context); +void g_source_destroy (GSource *source); + +void g_source_set_priority (GSource *source, + gint priority); +gint g_source_get_priority (GSource *source); +void g_source_set_can_recurse (GSource *source, + gboolean can_recurse); +gboolean g_source_get_can_recurse (GSource *source); +guint g_source_get_id (GSource *source); + +GMainContext *g_source_get_context (GSource *source); + +void g_source_set_callback (GSource *source, + GSourceFunc func, + gpointer data, + GDestroyNotify notify); + +void g_source_set_funcs (GSource *source, + GSourceFuncs *funcs); +gboolean g_source_is_destroyed (GSource *source); + +void g_source_set_name (GSource *source, + const char *name); +const char * g_source_get_name (GSource *source); +void g_source_set_name_by_id (guint tag, + const char *name); + + + +void g_source_set_callback_indirect (GSource *source, + gpointer callback_data, + GSourceCallbackFuncs *callback_funcs); + +void g_source_add_poll (GSource *source, + GPollFD *fd); +void g_source_remove_poll (GSource *source, + GPollFD *fd); + +void g_source_add_child_source (GSource *source, + GSource *child_source); +void g_source_remove_child_source (GSource *source, + GSource *child_source); + +__attribute__((__deprecated__("Use '" "g_source_get_time" "' instead"))) +void g_source_get_current_time (GSource *source, + GTimeVal *timeval); + +gint64 g_source_get_time (GSource *source); + + + + + + + +GSource *g_idle_source_new (void); +GSource *g_child_watch_source_new (GPid pid); +GSource *g_timeout_source_new (guint interval); +GSource *g_timeout_source_new_seconds (guint interval); + + + +void g_get_current_time (GTimeVal *result); +gint64 g_get_monotonic_time (void); +gint64 g_get_real_time (void); + + + +gboolean g_source_remove (guint tag); +gboolean g_source_remove_by_user_data (gpointer user_data); +gboolean g_source_remove_by_funcs_user_data (GSourceFuncs *funcs, + gpointer user_data); + + +guint g_timeout_add_full (gint priority, + guint interval, + GSourceFunc function, + gpointer data, + GDestroyNotify notify); +guint g_timeout_add (guint interval, + GSourceFunc function, + gpointer data); +guint g_timeout_add_seconds_full (gint priority, + guint interval, + GSourceFunc function, + gpointer data, + GDestroyNotify notify); +guint g_timeout_add_seconds (guint interval, + GSourceFunc function, + gpointer data); +guint g_child_watch_add_full (gint priority, + GPid pid, + GChildWatchFunc function, + gpointer data, + GDestroyNotify notify); +guint g_child_watch_add (GPid pid, + GChildWatchFunc function, + gpointer data); +guint g_idle_add (GSourceFunc function, + gpointer data); +guint g_idle_add_full (gint priority, + GSourceFunc function, + gpointer data, + GDestroyNotify notify); +gboolean g_idle_remove_by_data (gpointer data); + +void g_main_context_invoke_full (GMainContext *context, + gint priority, + GSourceFunc function, + gpointer data, + GDestroyNotify notify); +void g_main_context_invoke (GMainContext *context, + GSourceFunc function, + gpointer data); + + +extern GSourceFuncs g_timeout_funcs; +extern GSourceFuncs g_child_watch_funcs; +extern GSourceFuncs g_idle_funcs; + + +# 36 "/usr/include/glib-2.0/glib/giochannel.h" 2 +# 1 "/usr/include/glib-2.0/glib/gstring.h" 1 +# 34 "/usr/include/glib-2.0/glib/gstring.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 35 "/usr/include/glib-2.0/glib/gstring.h" 2 +# 1 "/usr/include/glib-2.0/glib/gunicode.h" 1 +# 29 "/usr/include/glib-2.0/glib/gunicode.h" +# 1 "/usr/include/glib-2.0/glib/gerror.h" 1 +# 30 "/usr/include/glib-2.0/glib/gunicode.h" 2 +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 31 "/usr/include/glib-2.0/glib/gunicode.h" 2 + + +# 61 "/usr/include/glib-2.0/glib/gunicode.h" +typedef guint32 gunichar; +# 79 "/usr/include/glib-2.0/glib/gunicode.h" +typedef guint16 gunichar2; +# 118 "/usr/include/glib-2.0/glib/gunicode.h" +typedef enum +{ + G_UNICODE_CONTROL, + G_UNICODE_FORMAT, + G_UNICODE_UNASSIGNED, + G_UNICODE_PRIVATE_USE, + G_UNICODE_SURROGATE, + G_UNICODE_LOWERCASE_LETTER, + G_UNICODE_MODIFIER_LETTER, + G_UNICODE_OTHER_LETTER, + G_UNICODE_TITLECASE_LETTER, + G_UNICODE_UPPERCASE_LETTER, + G_UNICODE_SPACING_MARK, + G_UNICODE_ENCLOSING_MARK, + G_UNICODE_NON_SPACING_MARK, + G_UNICODE_DECIMAL_NUMBER, + G_UNICODE_LETTER_NUMBER, + G_UNICODE_OTHER_NUMBER, + G_UNICODE_CONNECT_PUNCTUATION, + G_UNICODE_DASH_PUNCTUATION, + G_UNICODE_CLOSE_PUNCTUATION, + G_UNICODE_FINAL_PUNCTUATION, + G_UNICODE_INITIAL_PUNCTUATION, + G_UNICODE_OTHER_PUNCTUATION, + G_UNICODE_OPEN_PUNCTUATION, + G_UNICODE_CURRENCY_SYMBOL, + G_UNICODE_MODIFIER_SYMBOL, + G_UNICODE_MATH_SYMBOL, + G_UNICODE_OTHER_SYMBOL, + G_UNICODE_LINE_SEPARATOR, + G_UNICODE_PARAGRAPH_SEPARATOR, + G_UNICODE_SPACE_SEPARATOR +} GUnicodeType; +# 214 "/usr/include/glib-2.0/glib/gunicode.h" +typedef enum +{ + G_UNICODE_BREAK_MANDATORY, + G_UNICODE_BREAK_CARRIAGE_RETURN, + G_UNICODE_BREAK_LINE_FEED, + G_UNICODE_BREAK_COMBINING_MARK, + G_UNICODE_BREAK_SURROGATE, + G_UNICODE_BREAK_ZERO_WIDTH_SPACE, + G_UNICODE_BREAK_INSEPARABLE, + G_UNICODE_BREAK_NON_BREAKING_GLUE, + G_UNICODE_BREAK_CONTINGENT, + G_UNICODE_BREAK_SPACE, + G_UNICODE_BREAK_AFTER, + G_UNICODE_BREAK_BEFORE, + G_UNICODE_BREAK_BEFORE_AND_AFTER, + G_UNICODE_BREAK_HYPHEN, + G_UNICODE_BREAK_NON_STARTER, + G_UNICODE_BREAK_OPEN_PUNCTUATION, + G_UNICODE_BREAK_CLOSE_PUNCTUATION, + G_UNICODE_BREAK_QUOTATION, + G_UNICODE_BREAK_EXCLAMATION, + G_UNICODE_BREAK_IDEOGRAPHIC, + G_UNICODE_BREAK_NUMERIC, + G_UNICODE_BREAK_INFIX_SEPARATOR, + G_UNICODE_BREAK_SYMBOL, + G_UNICODE_BREAK_ALPHABETIC, + G_UNICODE_BREAK_PREFIX, + G_UNICODE_BREAK_POSTFIX, + G_UNICODE_BREAK_COMPLEX_CONTEXT, + G_UNICODE_BREAK_AMBIGUOUS, + G_UNICODE_BREAK_UNKNOWN, + G_UNICODE_BREAK_NEXT_LINE, + G_UNICODE_BREAK_WORD_JOINER, + G_UNICODE_BREAK_HANGUL_L_JAMO, + G_UNICODE_BREAK_HANGUL_V_JAMO, + G_UNICODE_BREAK_HANGUL_T_JAMO, + G_UNICODE_BREAK_HANGUL_LV_SYLLABLE, + G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE, + G_UNICODE_BREAK_CLOSE_PARANTHESIS, + G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER, + G_UNICODE_BREAK_HEBREW_LETTER +} GUnicodeBreakType; +# 387 "/usr/include/glib-2.0/glib/gunicode.h" +typedef enum +{ + G_UNICODE_SCRIPT_INVALID_CODE = -1, + G_UNICODE_SCRIPT_COMMON = 0, + G_UNICODE_SCRIPT_INHERITED, + G_UNICODE_SCRIPT_ARABIC, + G_UNICODE_SCRIPT_ARMENIAN, + G_UNICODE_SCRIPT_BENGALI, + G_UNICODE_SCRIPT_BOPOMOFO, + G_UNICODE_SCRIPT_CHEROKEE, + G_UNICODE_SCRIPT_COPTIC, + G_UNICODE_SCRIPT_CYRILLIC, + G_UNICODE_SCRIPT_DESERET, + G_UNICODE_SCRIPT_DEVANAGARI, + G_UNICODE_SCRIPT_ETHIOPIC, + G_UNICODE_SCRIPT_GEORGIAN, + G_UNICODE_SCRIPT_GOTHIC, + G_UNICODE_SCRIPT_GREEK, + G_UNICODE_SCRIPT_GUJARATI, + G_UNICODE_SCRIPT_GURMUKHI, + G_UNICODE_SCRIPT_HAN, + G_UNICODE_SCRIPT_HANGUL, + G_UNICODE_SCRIPT_HEBREW, + G_UNICODE_SCRIPT_HIRAGANA, + G_UNICODE_SCRIPT_KANNADA, + G_UNICODE_SCRIPT_KATAKANA, + G_UNICODE_SCRIPT_KHMER, + G_UNICODE_SCRIPT_LAO, + G_UNICODE_SCRIPT_LATIN, + G_UNICODE_SCRIPT_MALAYALAM, + G_UNICODE_SCRIPT_MONGOLIAN, + G_UNICODE_SCRIPT_MYANMAR, + G_UNICODE_SCRIPT_OGHAM, + G_UNICODE_SCRIPT_OLD_ITALIC, + G_UNICODE_SCRIPT_ORIYA, + G_UNICODE_SCRIPT_RUNIC, + G_UNICODE_SCRIPT_SINHALA, + G_UNICODE_SCRIPT_SYRIAC, + G_UNICODE_SCRIPT_TAMIL, + G_UNICODE_SCRIPT_TELUGU, + G_UNICODE_SCRIPT_THAANA, + G_UNICODE_SCRIPT_THAI, + G_UNICODE_SCRIPT_TIBETAN, + G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL, + G_UNICODE_SCRIPT_YI, + G_UNICODE_SCRIPT_TAGALOG, + G_UNICODE_SCRIPT_HANUNOO, + G_UNICODE_SCRIPT_BUHID, + G_UNICODE_SCRIPT_TAGBANWA, + + + G_UNICODE_SCRIPT_BRAILLE, + G_UNICODE_SCRIPT_CYPRIOT, + G_UNICODE_SCRIPT_LIMBU, + G_UNICODE_SCRIPT_OSMANYA, + G_UNICODE_SCRIPT_SHAVIAN, + G_UNICODE_SCRIPT_LINEAR_B, + G_UNICODE_SCRIPT_TAI_LE, + G_UNICODE_SCRIPT_UGARITIC, + + + G_UNICODE_SCRIPT_NEW_TAI_LUE, + G_UNICODE_SCRIPT_BUGINESE, + G_UNICODE_SCRIPT_GLAGOLITIC, + G_UNICODE_SCRIPT_TIFINAGH, + G_UNICODE_SCRIPT_SYLOTI_NAGRI, + G_UNICODE_SCRIPT_OLD_PERSIAN, + G_UNICODE_SCRIPT_KHAROSHTHI, + + + G_UNICODE_SCRIPT_UNKNOWN, + G_UNICODE_SCRIPT_BALINESE, + G_UNICODE_SCRIPT_CUNEIFORM, + G_UNICODE_SCRIPT_PHOENICIAN, + G_UNICODE_SCRIPT_PHAGS_PA, + G_UNICODE_SCRIPT_NKO, + + + G_UNICODE_SCRIPT_KAYAH_LI, + G_UNICODE_SCRIPT_LEPCHA, + G_UNICODE_SCRIPT_REJANG, + G_UNICODE_SCRIPT_SUNDANESE, + G_UNICODE_SCRIPT_SAURASHTRA, + G_UNICODE_SCRIPT_CHAM, + G_UNICODE_SCRIPT_OL_CHIKI, + G_UNICODE_SCRIPT_VAI, + G_UNICODE_SCRIPT_CARIAN, + G_UNICODE_SCRIPT_LYCIAN, + G_UNICODE_SCRIPT_LYDIAN, + + + G_UNICODE_SCRIPT_AVESTAN, + G_UNICODE_SCRIPT_BAMUM, + G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS, + G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC, + G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI, + G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN, + G_UNICODE_SCRIPT_JAVANESE, + G_UNICODE_SCRIPT_KAITHI, + G_UNICODE_SCRIPT_LISU, + G_UNICODE_SCRIPT_MEETEI_MAYEK, + G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN, + G_UNICODE_SCRIPT_OLD_TURKIC, + G_UNICODE_SCRIPT_SAMARITAN, + G_UNICODE_SCRIPT_TAI_THAM, + G_UNICODE_SCRIPT_TAI_VIET, + + + G_UNICODE_SCRIPT_BATAK, + G_UNICODE_SCRIPT_BRAHMI, + G_UNICODE_SCRIPT_MANDAIC, + + + G_UNICODE_SCRIPT_CHAKMA, + G_UNICODE_SCRIPT_MEROITIC_CURSIVE, + G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS, + G_UNICODE_SCRIPT_MIAO, + G_UNICODE_SCRIPT_SHARADA, + G_UNICODE_SCRIPT_SORA_SOMPENG, + G_UNICODE_SCRIPT_TAKRI +} GUnicodeScript; + +guint32 g_unicode_script_to_iso15924 (GUnicodeScript script); +GUnicodeScript g_unicode_script_from_iso15924 (guint32 iso15924); + + + +gboolean g_unichar_isalnum (gunichar c) __attribute__((__const__)); +gboolean g_unichar_isalpha (gunichar c) __attribute__((__const__)); +gboolean g_unichar_iscntrl (gunichar c) __attribute__((__const__)); +gboolean g_unichar_isdigit (gunichar c) __attribute__((__const__)); +gboolean g_unichar_isgraph (gunichar c) __attribute__((__const__)); +gboolean g_unichar_islower (gunichar c) __attribute__((__const__)); +gboolean g_unichar_isprint (gunichar c) __attribute__((__const__)); +gboolean g_unichar_ispunct (gunichar c) __attribute__((__const__)); +gboolean g_unichar_isspace (gunichar c) __attribute__((__const__)); +gboolean g_unichar_isupper (gunichar c) __attribute__((__const__)); +gboolean g_unichar_isxdigit (gunichar c) __attribute__((__const__)); +gboolean g_unichar_istitle (gunichar c) __attribute__((__const__)); +gboolean g_unichar_isdefined (gunichar c) __attribute__((__const__)); +gboolean g_unichar_iswide (gunichar c) __attribute__((__const__)); +gboolean g_unichar_iswide_cjk(gunichar c) __attribute__((__const__)); +gboolean g_unichar_iszerowidth(gunichar c) __attribute__((__const__)); +gboolean g_unichar_ismark (gunichar c) __attribute__((__const__)); + + + +gunichar g_unichar_toupper (gunichar c) __attribute__((__const__)); +gunichar g_unichar_tolower (gunichar c) __attribute__((__const__)); +gunichar g_unichar_totitle (gunichar c) __attribute__((__const__)); + + + +gint g_unichar_digit_value (gunichar c) __attribute__((__const__)); + +gint g_unichar_xdigit_value (gunichar c) __attribute__((__const__)); + + +GUnicodeType g_unichar_type (gunichar c) __attribute__((__const__)); + + +GUnicodeBreakType g_unichar_break_type (gunichar c) __attribute__((__const__)); + + +gint g_unichar_combining_class (gunichar uc) __attribute__((__const__)); + +gboolean g_unichar_get_mirror_char (gunichar ch, + gunichar *mirrored_ch); + +GUnicodeScript g_unichar_get_script (gunichar ch) __attribute__((__const__)); + + +gboolean g_unichar_validate (gunichar ch) __attribute__((__const__)); + + +gboolean g_unichar_compose (gunichar a, + gunichar b, + gunichar *ch); +gboolean g_unichar_decompose (gunichar ch, + gunichar *a, + gunichar *b); + +gsize g_unichar_fully_decompose (gunichar ch, + gboolean compat, + gunichar *result, + gsize result_len); +# 589 "/usr/include/glib-2.0/glib/gunicode.h" +void g_unicode_canonical_ordering (gunichar *string, + gsize len); + + +__attribute__((__deprecated__)) +gunichar *g_unicode_canonical_decomposition (gunichar ch, + gsize *result_len) __attribute__((__malloc__)); + + + +extern const gchar * const g_utf8_skip; +# 614 "/usr/include/glib-2.0/glib/gunicode.h" +gunichar g_utf8_get_char (const gchar *p) __attribute__((__pure__)); +gunichar g_utf8_get_char_validated (const gchar *p, + gssize max_len) __attribute__((__pure__)); + +gchar* g_utf8_offset_to_pointer (const gchar *str, + glong offset) __attribute__((__pure__)); +glong g_utf8_pointer_to_offset (const gchar *str, + const gchar *pos) __attribute__((__pure__)); +gchar* g_utf8_prev_char (const gchar *p) __attribute__((__pure__)); +gchar* g_utf8_find_next_char (const gchar *p, + const gchar *end) __attribute__((__pure__)); +gchar* g_utf8_find_prev_char (const gchar *str, + const gchar *p) __attribute__((__pure__)); + +glong g_utf8_strlen (const gchar *p, + gssize max) __attribute__((__pure__)); + + +gchar *g_utf8_substring (const gchar *str, + glong start_pos, + glong end_pos) __attribute__((__malloc__)); + +gchar *g_utf8_strncpy (gchar *dest, + const gchar *src, + gsize n); + + + +gchar* g_utf8_strchr (const gchar *p, + gssize len, + gunichar c); +gchar* g_utf8_strrchr (const gchar *p, + gssize len, + gunichar c); +gchar* g_utf8_strreverse (const gchar *str, + gssize len); + +gunichar2 *g_utf8_to_utf16 (const gchar *str, + glong len, + glong *items_read, + glong *items_written, + GError **error) __attribute__((__malloc__)); +gunichar * g_utf8_to_ucs4 (const gchar *str, + glong len, + glong *items_read, + glong *items_written, + GError **error) __attribute__((__malloc__)); +gunichar * g_utf8_to_ucs4_fast (const gchar *str, + glong len, + glong *items_written) __attribute__((__malloc__)); +gunichar * g_utf16_to_ucs4 (const gunichar2 *str, + glong len, + glong *items_read, + glong *items_written, + GError **error) __attribute__((__malloc__)); +gchar* g_utf16_to_utf8 (const gunichar2 *str, + glong len, + glong *items_read, + glong *items_written, + GError **error) __attribute__((__malloc__)); +gunichar2 *g_ucs4_to_utf16 (const gunichar *str, + glong len, + glong *items_read, + glong *items_written, + GError **error) __attribute__((__malloc__)); +gchar* g_ucs4_to_utf8 (const gunichar *str, + glong len, + glong *items_read, + glong *items_written, + GError **error) __attribute__((__malloc__)); + +gint g_unichar_to_utf8 (gunichar c, + gchar *outbuf); + +gboolean g_utf8_validate (const gchar *str, + gssize max_len, + const gchar **end); + +gchar *g_utf8_strup (const gchar *str, + gssize len) __attribute__((__malloc__)); +gchar *g_utf8_strdown (const gchar *str, + gssize len) __attribute__((__malloc__)); +gchar *g_utf8_casefold (const gchar *str, + gssize len) __attribute__((__malloc__)); +# 723 "/usr/include/glib-2.0/glib/gunicode.h" +typedef enum { + G_NORMALIZE_DEFAULT, + G_NORMALIZE_NFD = G_NORMALIZE_DEFAULT, + G_NORMALIZE_DEFAULT_COMPOSE, + G_NORMALIZE_NFC = G_NORMALIZE_DEFAULT_COMPOSE, + G_NORMALIZE_ALL, + G_NORMALIZE_NFKD = G_NORMALIZE_ALL, + G_NORMALIZE_ALL_COMPOSE, + G_NORMALIZE_NFKC = G_NORMALIZE_ALL_COMPOSE +} GNormalizeMode; + +gchar *g_utf8_normalize (const gchar *str, + gssize len, + GNormalizeMode mode) __attribute__((__malloc__)); + +gint g_utf8_collate (const gchar *str1, + const gchar *str2) __attribute__((__pure__)); +gchar *g_utf8_collate_key (const gchar *str, + gssize len) __attribute__((__malloc__)); +gchar *g_utf8_collate_key_for_filename (const gchar *str, + gssize len) __attribute__((__malloc__)); + + + + +gchar *_g_utf8_make_valid (const gchar *name); + + +# 36 "/usr/include/glib-2.0/glib/gstring.h" 2 +# 1 "/usr/include/glib-2.0/glib/gutils.h" 1 +# 34 "/usr/include/glib-2.0/glib/gutils.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 35 "/usr/include/glib-2.0/glib/gutils.h" 2 + + + +# 96 "/usr/include/glib-2.0/glib/gutils.h" +const gchar * g_get_user_name (void); +const gchar * g_get_real_name (void); +const gchar * g_get_home_dir (void); +const gchar * g_get_tmp_dir (void); +const gchar * g_get_host_name (void); +gchar * g_get_prgname (void); +void g_set_prgname (const gchar *prgname); +const gchar * g_get_application_name (void); +void g_set_application_name (const gchar *application_name); + +void g_reload_user_special_dirs_cache (void); +const gchar * g_get_user_data_dir (void); +const gchar * g_get_user_config_dir (void); +const gchar * g_get_user_cache_dir (void); +const gchar * const * g_get_system_data_dirs (void); +# 130 "/usr/include/glib-2.0/glib/gutils.h" +const gchar * const * g_get_system_config_dirs (void); + +const gchar * g_get_user_runtime_dir (void); +# 156 "/usr/include/glib-2.0/glib/gutils.h" +typedef enum { + G_USER_DIRECTORY_DESKTOP, + G_USER_DIRECTORY_DOCUMENTS, + G_USER_DIRECTORY_DOWNLOAD, + G_USER_DIRECTORY_MUSIC, + G_USER_DIRECTORY_PICTURES, + G_USER_DIRECTORY_PUBLIC_SHARE, + G_USER_DIRECTORY_TEMPLATES, + G_USER_DIRECTORY_VIDEOS, + + G_USER_N_DIRECTORIES +} GUserDirectory; + +const gchar * g_get_user_special_dir (GUserDirectory directory); +# 179 "/usr/include/glib-2.0/glib/gutils.h" +typedef struct _GDebugKey GDebugKey; +struct _GDebugKey +{ + const gchar *key; + guint value; +}; + + + +guint g_parse_debug_string (const gchar *string, + const GDebugKey *keys, + guint nkeys); + +gint g_snprintf (gchar *string, + gulong n, + gchar const *format, + ...) __attribute__((__format__ (__printf__, 3, 4))); +gint g_vsnprintf (gchar *string, + gulong n, + gchar const *format, + va_list args); + +void g_nullify_pointer (gpointer *nullify_location); + +typedef enum +{ + G_FORMAT_SIZE_DEFAULT = 0, + G_FORMAT_SIZE_LONG_FORMAT = 1 << 0, + G_FORMAT_SIZE_IEC_UNITS = 1 << 1 +} GFormatSizeFlags; + + +gchar *g_format_size_full (guint64 size, + GFormatSizeFlags flags); + +gchar *g_format_size (guint64 size); + +__attribute__((__deprecated__("Use '" "g_format_size" "' instead"))) +gchar *g_format_size_for_display (goffset size); +# 227 "/usr/include/glib-2.0/glib/gutils.h" +typedef void (*GVoidFunc) (void); +# 238 "/usr/include/glib-2.0/glib/gutils.h" +__attribute__((__deprecated__)) +void g_atexit (GVoidFunc func); +# 263 "/usr/include/glib-2.0/glib/gutils.h" +gchar* g_find_program_in_path (const gchar *program); + + + +static __inline __attribute__ ((unused)) gint g_bit_nth_lsf (gulong mask, + gint nth_bit) __attribute__((__const__)); +static __inline __attribute__ ((unused)) gint g_bit_nth_msf (gulong mask, + gint nth_bit) __attribute__((__const__)); +static __inline __attribute__ ((unused)) guint g_bit_storage (gulong number) __attribute__((__const__)); + + + + +static __inline __attribute__ ((unused)) gint +g_bit_nth_lsf (gulong mask, + gint nth_bit) +{ + if ((__builtin_expect (__extension__ ({ int _g_boolean_var_; if (nth_bit < -1) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 0))) + nth_bit = -1; + while (nth_bit < ((4 * 8) - 1)) + { + nth_bit++; + if (mask & (1UL << nth_bit)) + return nth_bit; + } + return -1; +} +static __inline __attribute__ ((unused)) gint +g_bit_nth_msf (gulong mask, + gint nth_bit) +{ + if (nth_bit < 0 || (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (nth_bit > 4 * 8) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 0))) + nth_bit = 4 * 8; + while (nth_bit > 0) + { + nth_bit--; + if (mask & (1UL << nth_bit)) + return nth_bit; + } + return -1; +} +static __inline __attribute__ ((unused)) guint +g_bit_storage (gulong number) +{ + + return (__builtin_expect (__extension__ ({ int _g_boolean_var_; if (number) _g_boolean_var_ = 1; else _g_boolean_var_ = 0; _g_boolean_var_; }), 1)) ? + ((4 * 8U - 1) ^ (guint) __builtin_clzl(number)) + 1 : 1; +# 321 "/usr/include/glib-2.0/glib/gutils.h" +} + + + +# 37 "/usr/include/glib-2.0/glib/gstring.h" 2 + + + +typedef struct _GString GString; + +struct _GString +{ + gchar *str; + gsize len; + gsize allocated_len; +}; + +GString* g_string_new (const gchar *init); +GString* g_string_new_len (const gchar *init, + gssize len); +GString* g_string_sized_new (gsize dfl_size); +gchar* g_string_free (GString *string, + gboolean free_segment); +gboolean g_string_equal (const GString *v, + const GString *v2); +guint g_string_hash (const GString *str); +GString* g_string_assign (GString *string, + const gchar *rval); +GString* g_string_truncate (GString *string, + gsize len); +GString* g_string_set_size (GString *string, + gsize len); +GString* g_string_insert_len (GString *string, + gssize pos, + const gchar *val, + gssize len); +GString* g_string_append (GString *string, + const gchar *val); +GString* g_string_append_len (GString *string, + const gchar *val, + gssize len); +GString* g_string_append_c (GString *string, + gchar c); +GString* g_string_append_unichar (GString *string, + gunichar wc); +GString* g_string_prepend (GString *string, + const gchar *val); +GString* g_string_prepend_c (GString *string, + gchar c); +GString* g_string_prepend_unichar (GString *string, + gunichar wc); +GString* g_string_prepend_len (GString *string, + const gchar *val, + gssize len); +GString* g_string_insert (GString *string, + gssize pos, + const gchar *val); +GString* g_string_insert_c (GString *string, + gssize pos, + gchar c); +GString* g_string_insert_unichar (GString *string, + gssize pos, + gunichar wc); +GString* g_string_overwrite (GString *string, + gsize pos, + const gchar *val); +GString* g_string_overwrite_len (GString *string, + gsize pos, + const gchar *val, + gssize len); +GString* g_string_erase (GString *string, + gssize pos, + gssize len); +GString* g_string_ascii_down (GString *string); +GString* g_string_ascii_up (GString *string); +void g_string_vprintf (GString *string, + const gchar *format, + va_list args); +void g_string_printf (GString *string, + const gchar *format, + ...) __attribute__((__format__ (__printf__, 2, 3))); +void g_string_append_vprintf (GString *string, + const gchar *format, + va_list args); +void g_string_append_printf (GString *string, + const gchar *format, + ...) __attribute__((__format__ (__printf__, 2, 3))); +GString* g_string_append_uri_escaped (GString *string, + const gchar *unescaped, + const gchar *reserved_chars_allowed, + gboolean allow_utf8); + + + +static inline GString* +g_string_append_c_inline (GString *gstring, + gchar c) +{ + if (gstring->len + 1 < gstring->allocated_len) + { + gstring->str[gstring->len++] = c; + gstring->str[gstring->len] = 0; + } + else + g_string_insert_c (gstring, -1, c); + return gstring; +} + + + + +__attribute__((__deprecated__)) +GString *g_string_down (GString *string); +__attribute__((__deprecated__)) +GString *g_string_up (GString *string); + + + + + + + +# 37 "/usr/include/glib-2.0/glib/giochannel.h" 2 + + + + + + +typedef struct _GIOChannel GIOChannel; +typedef struct _GIOFuncs GIOFuncs; + +typedef enum +{ + G_IO_ERROR_NONE, + G_IO_ERROR_AGAIN, + G_IO_ERROR_INVAL, + G_IO_ERROR_UNKNOWN +} GIOError; + + + +typedef enum +{ + + G_IO_CHANNEL_ERROR_FBIG, + G_IO_CHANNEL_ERROR_INVAL, + G_IO_CHANNEL_ERROR_IO, + G_IO_CHANNEL_ERROR_ISDIR, + G_IO_CHANNEL_ERROR_NOSPC, + G_IO_CHANNEL_ERROR_NXIO, + G_IO_CHANNEL_ERROR_OVERFLOW, + G_IO_CHANNEL_ERROR_PIPE, + + G_IO_CHANNEL_ERROR_FAILED +} GIOChannelError; + +typedef enum +{ + G_IO_STATUS_ERROR, + G_IO_STATUS_NORMAL, + G_IO_STATUS_EOF, + G_IO_STATUS_AGAIN +} GIOStatus; + +typedef enum +{ + G_SEEK_CUR, + G_SEEK_SET, + G_SEEK_END +} GSeekType; + +typedef enum +{ + G_IO_IN =1, + G_IO_OUT =4, + G_IO_PRI =2, + G_IO_ERR =8, + G_IO_HUP =16, + G_IO_NVAL =32 +} GIOCondition; + +typedef enum +{ + G_IO_FLAG_APPEND = 1 << 0, + G_IO_FLAG_NONBLOCK = 1 << 1, + G_IO_FLAG_IS_READABLE = 1 << 2, + G_IO_FLAG_IS_WRITABLE = 1 << 3, + G_IO_FLAG_IS_SEEKABLE = 1 << 4, + G_IO_FLAG_MASK = (1 << 5) - 1, + G_IO_FLAG_GET_MASK = G_IO_FLAG_MASK, + G_IO_FLAG_SET_MASK = G_IO_FLAG_APPEND | G_IO_FLAG_NONBLOCK +} GIOFlags; + + + + +struct _GIOChannel +{ + + gint ref_count; + GIOFuncs *funcs; + + gchar *encoding; + GIConv read_cd; + GIConv write_cd; + gchar *line_term; + guint line_term_len; + + gsize buf_size; + GString *read_buf; + GString *encoded_read_buf; + GString *write_buf; + gchar partial_write_buf[6]; + + + + guint use_buffer : 1; + guint do_encode : 1; + guint close_on_unref : 1; + guint is_readable : 1; + guint is_writeable : 1; + guint is_seekable : 1; + + gpointer reserved1; + gpointer reserved2; +}; + +typedef gboolean (*GIOFunc) (GIOChannel *source, + GIOCondition condition, + gpointer data); +struct _GIOFuncs +{ + GIOStatus (*io_read) (GIOChannel *channel, + gchar *buf, + gsize count, + gsize *bytes_read, + GError **err); + GIOStatus (*io_write) (GIOChannel *channel, + const gchar *buf, + gsize count, + gsize *bytes_written, + GError **err); + GIOStatus (*io_seek) (GIOChannel *channel, + gint64 offset, + GSeekType type, + GError **err); + GIOStatus (*io_close) (GIOChannel *channel, + GError **err); + GSource* (*io_create_watch) (GIOChannel *channel, + GIOCondition condition); + void (*io_free) (GIOChannel *channel); + GIOStatus (*io_set_flags) (GIOChannel *channel, + GIOFlags flags, + GError **err); + GIOFlags (*io_get_flags) (GIOChannel *channel); +}; + +void g_io_channel_init (GIOChannel *channel); +GIOChannel *g_io_channel_ref (GIOChannel *channel); +void g_io_channel_unref (GIOChannel *channel); + +__attribute__((__deprecated__("Use '" "g_io_channel_read_for" "' instead"))) +GIOError g_io_channel_read (GIOChannel *channel, + gchar *buf, + gsize count, + gsize *bytes_read); + +__attribute__((__deprecated__("Use '" "g_io_channel_write_chars" "' instead"))) +GIOError g_io_channel_write (GIOChannel *channel, + const gchar *buf, + gsize count, + gsize *bytes_written); + +__attribute__((__deprecated__("Use '" "g_io_channel_seek_position" "' instead"))) +GIOError g_io_channel_seek (GIOChannel *channel, + gint64 offset, + GSeekType type); + +__attribute__((__deprecated__("Use '" "g_io_channel_shutdown" "' instead"))) +void g_io_channel_close (GIOChannel *channel); + +GIOStatus g_io_channel_shutdown (GIOChannel *channel, + gboolean flush, + GError **err); +guint g_io_add_watch_full (GIOChannel *channel, + gint priority, + GIOCondition condition, + GIOFunc func, + gpointer user_data, + GDestroyNotify notify); +GSource * g_io_create_watch (GIOChannel *channel, + GIOCondition condition); +guint g_io_add_watch (GIOChannel *channel, + GIOCondition condition, + GIOFunc func, + gpointer user_data); + + + + +void g_io_channel_set_buffer_size (GIOChannel *channel, + gsize size); +gsize g_io_channel_get_buffer_size (GIOChannel *channel); +GIOCondition g_io_channel_get_buffer_condition (GIOChannel *channel); +GIOStatus g_io_channel_set_flags (GIOChannel *channel, + GIOFlags flags, + GError **error); +GIOFlags g_io_channel_get_flags (GIOChannel *channel); +void g_io_channel_set_line_term (GIOChannel *channel, + const gchar *line_term, + gint length); +const gchar * g_io_channel_get_line_term (GIOChannel *channel, + gint *length); +void g_io_channel_set_buffered (GIOChannel *channel, + gboolean buffered); +gboolean g_io_channel_get_buffered (GIOChannel *channel); +GIOStatus g_io_channel_set_encoding (GIOChannel *channel, + const gchar *encoding, + GError **error); +const gchar * g_io_channel_get_encoding (GIOChannel *channel); +void g_io_channel_set_close_on_unref (GIOChannel *channel, + gboolean do_close); +gboolean g_io_channel_get_close_on_unref (GIOChannel *channel); + + +GIOStatus g_io_channel_flush (GIOChannel *channel, + GError **error); +GIOStatus g_io_channel_read_line (GIOChannel *channel, + gchar **str_return, + gsize *length, + gsize *terminator_pos, + GError **error); +GIOStatus g_io_channel_read_line_string (GIOChannel *channel, + GString *buffer, + gsize *terminator_pos, + GError **error); +GIOStatus g_io_channel_read_to_end (GIOChannel *channel, + gchar **str_return, + gsize *length, + GError **error); +GIOStatus g_io_channel_read_chars (GIOChannel *channel, + gchar *buf, + gsize count, + gsize *bytes_read, + GError **error); +GIOStatus g_io_channel_read_unichar (GIOChannel *channel, + gunichar *thechar, + GError **error); +GIOStatus g_io_channel_write_chars (GIOChannel *channel, + const gchar *buf, + gssize count, + gsize *bytes_written, + GError **error); +GIOStatus g_io_channel_write_unichar (GIOChannel *channel, + gunichar thechar, + GError **error); +GIOStatus g_io_channel_seek_position (GIOChannel *channel, + gint64 offset, + GSeekType type, + GError **error); + + + + +GIOChannel* g_io_channel_new_file (const gchar *filename, + const gchar *mode, + GError **error); + + + +GQuark g_io_channel_error_quark (void); +GIOChannelError g_io_channel_error_from_errno (gint en); +# 306 "/usr/include/glib-2.0/glib/giochannel.h" +GIOChannel* g_io_channel_unix_new (int fd); +gint g_io_channel_unix_get_fd (GIOChannel *channel); + + + +extern GSourceFuncs g_io_watch_funcs; +# 372 "/usr/include/glib-2.0/glib/giochannel.h" + +# 57 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gkeyfile.h" 1 +# 30 "/usr/include/glib-2.0/glib/gkeyfile.h" +# 1 "/usr/include/glib-2.0/glib/gerror.h" 1 +# 31 "/usr/include/glib-2.0/glib/gkeyfile.h" 2 + + + +typedef enum +{ + G_KEY_FILE_ERROR_UNKNOWN_ENCODING, + G_KEY_FILE_ERROR_PARSE, + G_KEY_FILE_ERROR_NOT_FOUND, + G_KEY_FILE_ERROR_KEY_NOT_FOUND, + G_KEY_FILE_ERROR_GROUP_NOT_FOUND, + G_KEY_FILE_ERROR_INVALID_VALUE +} GKeyFileError; + + + +GQuark g_key_file_error_quark (void); + +typedef struct _GKeyFile GKeyFile; + +typedef enum +{ + G_KEY_FILE_NONE = 0, + G_KEY_FILE_KEEP_COMMENTS = 1 << 0, + G_KEY_FILE_KEEP_TRANSLATIONS = 1 << 1 +} GKeyFileFlags; + +GKeyFile *g_key_file_new (void); +GKeyFile *g_key_file_ref (GKeyFile *key_file); +void g_key_file_unref (GKeyFile *key_file); +void g_key_file_free (GKeyFile *key_file); +void g_key_file_set_list_separator (GKeyFile *key_file, + gchar separator); +gboolean g_key_file_load_from_file (GKeyFile *key_file, + const gchar *file, + GKeyFileFlags flags, + GError **error); +gboolean g_key_file_load_from_data (GKeyFile *key_file, + const gchar *data, + gsize length, + GKeyFileFlags flags, + GError **error); +gboolean g_key_file_load_from_dirs (GKeyFile *key_file, + const gchar *file, + const gchar **search_dirs, + gchar **full_path, + GKeyFileFlags flags, + GError **error); +gboolean g_key_file_load_from_data_dirs (GKeyFile *key_file, + const gchar *file, + gchar **full_path, + GKeyFileFlags flags, + GError **error); +gchar *g_key_file_to_data (GKeyFile *key_file, + gsize *length, + GError **error) __attribute__((__malloc__)); +gchar *g_key_file_get_start_group (GKeyFile *key_file) __attribute__((__malloc__)); +gchar **g_key_file_get_groups (GKeyFile *key_file, + gsize *length) __attribute__((__malloc__)); +gchar **g_key_file_get_keys (GKeyFile *key_file, + const gchar *group_name, + gsize *length, + GError **error) __attribute__((__malloc__)); +gboolean g_key_file_has_group (GKeyFile *key_file, + const gchar *group_name); +gboolean g_key_file_has_key (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error); +gchar *g_key_file_get_value (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error) __attribute__((__malloc__)); +void g_key_file_set_value (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar *value); +gchar *g_key_file_get_string (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error) __attribute__((__malloc__)); +void g_key_file_set_string (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar *string); +gchar *g_key_file_get_locale_string (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar *locale, + GError **error) __attribute__((__malloc__)); +void g_key_file_set_locale_string (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar *locale, + const gchar *string); +gboolean g_key_file_get_boolean (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error); +void g_key_file_set_boolean (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gboolean value); +gint g_key_file_get_integer (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error); +void g_key_file_set_integer (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gint value); +gint64 g_key_file_get_int64 (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error); +void g_key_file_set_int64 (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gint64 value); +guint64 g_key_file_get_uint64 (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error); +void g_key_file_set_uint64 (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + guint64 value); +gdouble g_key_file_get_double (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error); +void g_key_file_set_double (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gdouble value); +gchar **g_key_file_get_string_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gsize *length, + GError **error) __attribute__((__malloc__)); +void g_key_file_set_string_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar * const list[], + gsize length); +gchar **g_key_file_get_locale_string_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar *locale, + gsize *length, + GError **error) __attribute__((__malloc__)); +void g_key_file_set_locale_string_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar *locale, + const gchar * const list[], + gsize length); +gboolean *g_key_file_get_boolean_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gsize *length, + GError **error) __attribute__((__malloc__)); +void g_key_file_set_boolean_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gboolean list[], + gsize length); +gint *g_key_file_get_integer_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gsize *length, + GError **error) __attribute__((__malloc__)); +void g_key_file_set_double_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gdouble list[], + gsize length); +gdouble *g_key_file_get_double_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gsize *length, + GError **error) __attribute__((__malloc__)); +void g_key_file_set_integer_list (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + gint list[], + gsize length); +gboolean g_key_file_set_comment (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + const gchar *comment, + GError **error); +gchar *g_key_file_get_comment (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error) __attribute__((__malloc__)); + +gboolean g_key_file_remove_comment (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error); +gboolean g_key_file_remove_key (GKeyFile *key_file, + const gchar *group_name, + const gchar *key, + GError **error); +gboolean g_key_file_remove_group (GKeyFile *key_file, + const gchar *group_name, + GError **error); +# 266 "/usr/include/glib-2.0/glib/gkeyfile.h" + +# 58 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/glist.h" 1 +# 59 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gmacros.h" 1 +# 60 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gmain.h" 1 +# 61 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gmappedfile.h" 1 +# 29 "/usr/include/glib-2.0/glib/gmappedfile.h" +# 1 "/usr/include/glib-2.0/glib/gbytes.h" 1 +# 30 "/usr/include/glib-2.0/glib/gmappedfile.h" 2 +# 1 "/usr/include/glib-2.0/glib/gerror.h" 1 +# 31 "/usr/include/glib-2.0/glib/gmappedfile.h" 2 + + + +typedef struct _GMappedFile GMappedFile; + +GMappedFile *g_mapped_file_new (const gchar *filename, + gboolean writable, + GError **error) __attribute__((__malloc__)); +GMappedFile *g_mapped_file_new_from_fd (gint fd, + gboolean writable, + GError **error) __attribute__((__malloc__)); +gsize g_mapped_file_get_length (GMappedFile *file); +gchar *g_mapped_file_get_contents (GMappedFile *file); +GMappedFile *g_mapped_file_ref (GMappedFile *file); +void g_mapped_file_unref (GMappedFile *file); + +__attribute__((__deprecated__("Use '" "g_mapped_file_unref" "' instead"))) +void g_mapped_file_free (GMappedFile *file); + + +# 62 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gmarkup.h" 1 +# 30 "/usr/include/glib-2.0/glib/gmarkup.h" +# 1 "/usr/include/glib-2.0/glib/gerror.h" 1 +# 31 "/usr/include/glib-2.0/glib/gmarkup.h" 2 +# 1 "/usr/include/glib-2.0/glib/gslist.h" 1 +# 32 "/usr/include/glib-2.0/glib/gmarkup.h" 2 + + +# 51 "/usr/include/glib-2.0/glib/gmarkup.h" +typedef enum +{ + G_MARKUP_ERROR_BAD_UTF8, + G_MARKUP_ERROR_EMPTY, + G_MARKUP_ERROR_PARSE, + + + + G_MARKUP_ERROR_UNKNOWN_ELEMENT, + G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, + G_MARKUP_ERROR_INVALID_CONTENT, + G_MARKUP_ERROR_MISSING_ATTRIBUTE +} GMarkupError; +# 74 "/usr/include/glib-2.0/glib/gmarkup.h" +GQuark g_markup_error_quark (void); +# 92 "/usr/include/glib-2.0/glib/gmarkup.h" +typedef enum +{ + G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG = 1 << 0, + G_MARKUP_TREAT_CDATA_AS_TEXT = 1 << 1, + G_MARKUP_PREFIX_ERROR_POSITION = 1 << 2 +} GMarkupParseFlags; +# 108 "/usr/include/glib-2.0/glib/gmarkup.h" +typedef struct _GMarkupParseContext GMarkupParseContext; +typedef struct _GMarkupParser GMarkupParser; +# 138 "/usr/include/glib-2.0/glib/gmarkup.h" +struct _GMarkupParser +{ + + void (*start_element) (GMarkupParseContext *context, + const gchar *element_name, + const gchar **attribute_names, + const gchar **attribute_values, + gpointer user_data, + GError **error); + + + void (*end_element) (GMarkupParseContext *context, + const gchar *element_name, + gpointer user_data, + GError **error); + + + + void (*text) (GMarkupParseContext *context, + const gchar *text, + gsize text_len, + gpointer user_data, + GError **error); + + + + + + + void (*passthrough) (GMarkupParseContext *context, + const gchar *passthrough_text, + gsize text_len, + gpointer user_data, + GError **error); + + + + + void (*error) (GMarkupParseContext *context, + GError *error, + gpointer user_data); +}; + +GMarkupParseContext *g_markup_parse_context_new (const GMarkupParser *parser, + GMarkupParseFlags flags, + gpointer user_data, + GDestroyNotify user_data_dnotify); +void g_markup_parse_context_free (GMarkupParseContext *context); +gboolean g_markup_parse_context_parse (GMarkupParseContext *context, + const gchar *text, + gssize text_len, + GError **error); +void g_markup_parse_context_push (GMarkupParseContext *context, + const GMarkupParser *parser, + gpointer user_data); +gpointer g_markup_parse_context_pop (GMarkupParseContext *context); + +gboolean g_markup_parse_context_end_parse (GMarkupParseContext *context, + GError **error); +const gchar * g_markup_parse_context_get_element (GMarkupParseContext *context); +const GSList * g_markup_parse_context_get_element_stack (GMarkupParseContext *context); + + +void g_markup_parse_context_get_position (GMarkupParseContext *context, + gint *line_number, + gint *char_number); +gpointer g_markup_parse_context_get_user_data (GMarkupParseContext *context); + + +gchar* g_markup_escape_text (const gchar *text, + gssize length); + +gchar *g_markup_printf_escaped (const char *format, + ...) __attribute__((__format__ (__printf__, 1, 2))); +gchar *g_markup_vprintf_escaped (const char *format, + va_list args); + +typedef enum +{ + G_MARKUP_COLLECT_INVALID, + G_MARKUP_COLLECT_STRING, + G_MARKUP_COLLECT_STRDUP, + G_MARKUP_COLLECT_BOOLEAN, + G_MARKUP_COLLECT_TRISTATE, + + G_MARKUP_COLLECT_OPTIONAL = (1 << 16) +} GMarkupCollectType; + + + +gboolean g_markup_collect_attributes (const gchar *element_name, + const gchar **attribute_names, + const gchar **attribute_values, + GError **error, + GMarkupCollectType first_type, + const gchar *first_attr, + ...); + + +# 63 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gmem.h" 1 +# 64 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gmessages.h" 1 +# 35 "/usr/include/glib-2.0/glib/gmessages.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 36 "/usr/include/glib-2.0/glib/gmessages.h" 2 +# 1 "/usr/include/glib-2.0/glib/gmacros.h" 1 +# 37 "/usr/include/glib-2.0/glib/gmessages.h" 2 + + + + + +# 42 "/usr/include/glib-2.0/glib/gmessages.h" 3 + + + + + + +gsize g_printf_string_upper_bound (const gchar* format, + va_list args); +# 58 "/usr/include/glib-2.0/glib/gmessages.h" 3 +typedef enum +{ + + G_LOG_FLAG_RECURSION = 1 << 0, + G_LOG_FLAG_FATAL = 1 << 1, + + + G_LOG_LEVEL_ERROR = 1 << 2, + G_LOG_LEVEL_CRITICAL = 1 << 3, + G_LOG_LEVEL_WARNING = 1 << 4, + G_LOG_LEVEL_MESSAGE = 1 << 5, + G_LOG_LEVEL_INFO = 1 << 6, + G_LOG_LEVEL_DEBUG = 1 << 7, + + G_LOG_LEVEL_MASK = ~(G_LOG_FLAG_RECURSION | G_LOG_FLAG_FATAL) +} GLogLevelFlags; + + + + +typedef void (*GLogFunc) (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer user_data); + + + +guint g_log_set_handler (const gchar *log_domain, + GLogLevelFlags log_levels, + GLogFunc log_func, + gpointer user_data); +void g_log_remove_handler (const gchar *log_domain, + guint handler_id); +void g_log_default_handler (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer unused_data); +GLogFunc g_log_set_default_handler (GLogFunc log_func, + gpointer user_data); +void g_log (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *format, + ...) __attribute__((__format__ (__printf__, 3, 4))); +void g_logv (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *format, + va_list args); +GLogLevelFlags g_log_set_fatal_mask (const gchar *log_domain, + GLogLevelFlags fatal_mask); +GLogLevelFlags g_log_set_always_fatal (GLogLevelFlags fatal_mask); + + +__attribute__((visibility("hidden"))) void _g_log_fallback_handler (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer unused_data); + + +void g_return_if_fail_warning (const char *log_domain, + const char *pretty_function, + const char *expression); +void g_warn_message (const char *domain, + const char *file, + int line, + const char *func, + const char *warnexpr); +__attribute__((__deprecated__)) +void g_assert_warning (const char *log_domain, + const char *file, + const int line, + const char *pretty_function, + const char *expression) __attribute__((__noreturn__)); +# 235 "/usr/include/glib-2.0/glib/gmessages.h" 3 +typedef void (*GPrintFunc) (const gchar *string); +void g_print (const gchar *format, + ...) __attribute__((__format__ (__printf__, 1, 2))); +GPrintFunc g_set_print_handler (GPrintFunc func); +void g_printerr (const gchar *format, + ...) __attribute__((__format__ (__printf__, 1, 2))); +GPrintFunc g_set_printerr_handler (GPrintFunc func); +# 402 "/usr/include/glib-2.0/glib/gmessages.h" 3 + +# 65 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gnode.h" 1 +# 34 "/usr/include/glib-2.0/glib/gnode.h" +# 1 "/usr/include/glib-2.0/glib/gmem.h" 1 +# 35 "/usr/include/glib-2.0/glib/gnode.h" 2 + + + +typedef struct _GNode GNode; + + +typedef enum +{ + G_TRAVERSE_LEAVES = 1 << 0, + G_TRAVERSE_NON_LEAVES = 1 << 1, + G_TRAVERSE_ALL = G_TRAVERSE_LEAVES | G_TRAVERSE_NON_LEAVES, + G_TRAVERSE_MASK = 0x03, + G_TRAVERSE_LEAFS = G_TRAVERSE_LEAVES, + G_TRAVERSE_NON_LEAFS = G_TRAVERSE_NON_LEAVES +} GTraverseFlags; + + +typedef enum +{ + G_IN_ORDER, + G_PRE_ORDER, + G_POST_ORDER, + G_LEVEL_ORDER +} GTraverseType; + +typedef gboolean (*GNodeTraverseFunc) (GNode *node, + gpointer data); +typedef void (*GNodeForeachFunc) (GNode *node, + gpointer data); +# 77 "/usr/include/glib-2.0/glib/gnode.h" +typedef gpointer (*GCopyFunc) (gconstpointer src, + gpointer data); + + + +struct _GNode +{ + gpointer data; + GNode *next; + GNode *prev; + GNode *parent; + GNode *children; +}; +# 115 "/usr/include/glib-2.0/glib/gnode.h" +GNode* g_node_new (gpointer data); +void g_node_destroy (GNode *root); +void g_node_unlink (GNode *node); +GNode* g_node_copy_deep (GNode *node, + GCopyFunc copy_func, + gpointer data); +GNode* g_node_copy (GNode *node); +GNode* g_node_insert (GNode *parent, + gint position, + GNode *node); +GNode* g_node_insert_before (GNode *parent, + GNode *sibling, + GNode *node); +GNode* g_node_insert_after (GNode *parent, + GNode *sibling, + GNode *node); +GNode* g_node_prepend (GNode *parent, + GNode *node); +guint g_node_n_nodes (GNode *root, + GTraverseFlags flags); +GNode* g_node_get_root (GNode *node); +gboolean g_node_is_ancestor (GNode *node, + GNode *descendant); +guint g_node_depth (GNode *node); +GNode* g_node_find (GNode *root, + GTraverseType order, + GTraverseFlags flags, + gpointer data); +# 226 "/usr/include/glib-2.0/glib/gnode.h" +void g_node_traverse (GNode *root, + GTraverseType order, + GTraverseFlags flags, + gint max_depth, + GNodeTraverseFunc func, + gpointer data); + + + + + + +guint g_node_max_height (GNode *root); + +void g_node_children_foreach (GNode *node, + GTraverseFlags flags, + GNodeForeachFunc func, + gpointer data); +void g_node_reverse_children (GNode *node); +guint g_node_n_children (GNode *node); +GNode* g_node_nth_child (GNode *node, + guint n); +GNode* g_node_last_child (GNode *node); +GNode* g_node_find_child (GNode *node, + GTraverseFlags flags, + gpointer data); +gint g_node_child_position (GNode *node, + GNode *child); +gint g_node_child_index (GNode *node, + gpointer data); + +GNode* g_node_first_sibling (GNode *node); +GNode* g_node_last_sibling (GNode *node); +# 296 "/usr/include/glib-2.0/glib/gnode.h" + +# 66 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/goption.h" 1 +# 28 "/usr/include/glib-2.0/glib/goption.h" +# 1 "/usr/include/glib-2.0/glib/gerror.h" 1 +# 29 "/usr/include/glib-2.0/glib/goption.h" 2 +# 1 "/usr/include/glib-2.0/glib/gquark.h" 1 +# 30 "/usr/include/glib-2.0/glib/goption.h" 2 + + +# 40 "/usr/include/glib-2.0/glib/goption.h" +typedef struct _GOptionContext GOptionContext; +# 53 "/usr/include/glib-2.0/glib/goption.h" +typedef struct _GOptionGroup GOptionGroup; +typedef struct _GOptionEntry GOptionEntry; +# 82 "/usr/include/glib-2.0/glib/goption.h" +typedef enum +{ + G_OPTION_FLAG_HIDDEN = 1 << 0, + G_OPTION_FLAG_IN_MAIN = 1 << 1, + G_OPTION_FLAG_REVERSE = 1 << 2, + G_OPTION_FLAG_NO_ARG = 1 << 3, + G_OPTION_FLAG_FILENAME = 1 << 4, + G_OPTION_FLAG_OPTIONAL_ARG = 1 << 5, + G_OPTION_FLAG_NOALIAS = 1 << 6 +} GOptionFlags; +# 118 "/usr/include/glib-2.0/glib/goption.h" +typedef enum +{ + G_OPTION_ARG_NONE, + G_OPTION_ARG_STRING, + G_OPTION_ARG_INT, + G_OPTION_ARG_CALLBACK, + G_OPTION_ARG_FILENAME, + G_OPTION_ARG_STRING_ARRAY, + G_OPTION_ARG_FILENAME_ARRAY, + G_OPTION_ARG_DOUBLE, + G_OPTION_ARG_INT64 +} GOptionArg; +# 148 "/usr/include/glib-2.0/glib/goption.h" +typedef gboolean (*GOptionArgFunc) (const gchar *option_name, + const gchar *value, + gpointer data, + GError **error); +# 166 "/usr/include/glib-2.0/glib/goption.h" +typedef gboolean (*GOptionParseFunc) (GOptionContext *context, + GOptionGroup *group, + gpointer data, + GError **error); +# 181 "/usr/include/glib-2.0/glib/goption.h" +typedef void (*GOptionErrorFunc) (GOptionContext *context, + GOptionGroup *group, + gpointer data, + GError **error); +# 205 "/usr/include/glib-2.0/glib/goption.h" +typedef enum +{ + G_OPTION_ERROR_UNKNOWN_OPTION, + G_OPTION_ERROR_BAD_VALUE, + G_OPTION_ERROR_FAILED +} GOptionError; + +GQuark g_option_error_quark (void); +# 279 "/usr/include/glib-2.0/glib/goption.h" +struct _GOptionEntry +{ + const gchar *long_name; + gchar short_name; + gint flags; + + GOptionArg arg; + gpointer arg_data; + + const gchar *description; + const gchar *arg_description; +}; +# 310 "/usr/include/glib-2.0/glib/goption.h" +GOptionContext *g_option_context_new (const gchar *parameter_string); +void g_option_context_set_summary (GOptionContext *context, + const gchar *summary); +const gchar * g_option_context_get_summary (GOptionContext *context); +void g_option_context_set_description (GOptionContext *context, + const gchar *description); +const gchar * g_option_context_get_description (GOptionContext *context); +void g_option_context_free (GOptionContext *context); +void g_option_context_set_help_enabled (GOptionContext *context, + gboolean help_enabled); +gboolean g_option_context_get_help_enabled (GOptionContext *context); +void g_option_context_set_ignore_unknown_options (GOptionContext *context, + gboolean ignore_unknown); +gboolean g_option_context_get_ignore_unknown_options (GOptionContext *context); + +void g_option_context_add_main_entries (GOptionContext *context, + const GOptionEntry *entries, + const gchar *translation_domain); +gboolean g_option_context_parse (GOptionContext *context, + gint *argc, + gchar ***argv, + GError **error); +void g_option_context_set_translate_func (GOptionContext *context, + GTranslateFunc func, + gpointer data, + GDestroyNotify destroy_notify); +void g_option_context_set_translation_domain (GOptionContext *context, + const gchar *domain); + +void g_option_context_add_group (GOptionContext *context, + GOptionGroup *group); +void g_option_context_set_main_group (GOptionContext *context, + GOptionGroup *group); +GOptionGroup *g_option_context_get_main_group (GOptionContext *context); +gchar *g_option_context_get_help (GOptionContext *context, + gboolean main_help, + GOptionGroup *group); + +GOptionGroup *g_option_group_new (const gchar *name, + const gchar *description, + const gchar *help_description, + gpointer user_data, + GDestroyNotify destroy); +void g_option_group_set_parse_hooks (GOptionGroup *group, + GOptionParseFunc pre_parse_func, + GOptionParseFunc post_parse_func); +void g_option_group_set_error_hook (GOptionGroup *group, + GOptionErrorFunc error_func); +void g_option_group_free (GOptionGroup *group); +void g_option_group_add_entries (GOptionGroup *group, + const GOptionEntry *entries); +void g_option_group_set_translate_func (GOptionGroup *group, + GTranslateFunc func, + gpointer data, + GDestroyNotify destroy_notify); +void g_option_group_set_translation_domain (GOptionGroup *group, + const gchar *domain); + + +# 67 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gpattern.h" 1 +# 27 "/usr/include/glib-2.0/glib/gpattern.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 28 "/usr/include/glib-2.0/glib/gpattern.h" 2 + + + + +typedef struct _GPatternSpec GPatternSpec; + +GPatternSpec* g_pattern_spec_new (const gchar *pattern); +void g_pattern_spec_free (GPatternSpec *pspec); +gboolean g_pattern_spec_equal (GPatternSpec *pspec1, + GPatternSpec *pspec2); +gboolean g_pattern_match (GPatternSpec *pspec, + guint string_length, + const gchar *string, + const gchar *string_reversed); +gboolean g_pattern_match_string (GPatternSpec *pspec, + const gchar *string); +gboolean g_pattern_match_simple (const gchar *pattern, + const gchar *string); + + +# 68 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gpoll.h" 1 +# 69 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gprimes.h" 1 +# 34 "/usr/include/glib-2.0/glib/gprimes.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 35 "/usr/include/glib-2.0/glib/gprimes.h" 2 + + +# 47 "/usr/include/glib-2.0/glib/gprimes.h" +guint g_spaced_primes_closest (guint num) __attribute__((__const__)); + + +# 70 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gqsort.h" 1 +# 34 "/usr/include/glib-2.0/glib/gqsort.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 35 "/usr/include/glib-2.0/glib/gqsort.h" 2 + + + +void g_qsort_with_data (gconstpointer pbase, + gint total_elems, + gsize size, + GCompareDataFunc compare_func, + gpointer user_data); + + +# 71 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gquark.h" 1 +# 72 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gqueue.h" 1 +# 34 "/usr/include/glib-2.0/glib/gqueue.h" +# 1 "/usr/include/glib-2.0/glib/glist.h" 1 +# 35 "/usr/include/glib-2.0/glib/gqueue.h" 2 + + + +typedef struct _GQueue GQueue; +# 49 "/usr/include/glib-2.0/glib/gqueue.h" +struct _GQueue +{ + GList *head; + GList *tail; + guint length; +}; +# 74 "/usr/include/glib-2.0/glib/gqueue.h" +GQueue* g_queue_new (void); +void g_queue_free (GQueue *queue); +void g_queue_free_full (GQueue *queue, + GDestroyNotify free_func); +void g_queue_init (GQueue *queue); +void g_queue_clear (GQueue *queue); +gboolean g_queue_is_empty (GQueue *queue); +guint g_queue_get_length (GQueue *queue); +void g_queue_reverse (GQueue *queue); +GQueue * g_queue_copy (GQueue *queue); +void g_queue_foreach (GQueue *queue, + GFunc func, + gpointer user_data); +GList * g_queue_find (GQueue *queue, + gconstpointer data); +GList * g_queue_find_custom (GQueue *queue, + gconstpointer data, + GCompareFunc func); +void g_queue_sort (GQueue *queue, + GCompareDataFunc compare_func, + gpointer user_data); + +void g_queue_push_head (GQueue *queue, + gpointer data); +void g_queue_push_tail (GQueue *queue, + gpointer data); +void g_queue_push_nth (GQueue *queue, + gpointer data, + gint n); +gpointer g_queue_pop_head (GQueue *queue); +gpointer g_queue_pop_tail (GQueue *queue); +gpointer g_queue_pop_nth (GQueue *queue, + guint n); +gpointer g_queue_peek_head (GQueue *queue); +gpointer g_queue_peek_tail (GQueue *queue); +gpointer g_queue_peek_nth (GQueue *queue, + guint n); +gint g_queue_index (GQueue *queue, + gconstpointer data); +gboolean g_queue_remove (GQueue *queue, + gconstpointer data); +guint g_queue_remove_all (GQueue *queue, + gconstpointer data); +void g_queue_insert_before (GQueue *queue, + GList *sibling, + gpointer data); +void g_queue_insert_after (GQueue *queue, + GList *sibling, + gpointer data); +void g_queue_insert_sorted (GQueue *queue, + gpointer data, + GCompareDataFunc func, + gpointer user_data); + +void g_queue_push_head_link (GQueue *queue, + GList *link_); +void g_queue_push_tail_link (GQueue *queue, + GList *link_); +void g_queue_push_nth_link (GQueue *queue, + gint n, + GList *link_); +GList* g_queue_pop_head_link (GQueue *queue); +GList* g_queue_pop_tail_link (GQueue *queue); +GList* g_queue_pop_nth_link (GQueue *queue, + guint n); +GList* g_queue_peek_head_link (GQueue *queue); +GList* g_queue_peek_tail_link (GQueue *queue); +GList* g_queue_peek_nth_link (GQueue *queue, + guint n); +gint g_queue_link_index (GQueue *queue, + GList *link_); +void g_queue_unlink (GQueue *queue, + GList *link_); +void g_queue_delete_link (GQueue *queue, + GList *link_); + + +# 73 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/grand.h" 1 +# 34 "/usr/include/glib-2.0/glib/grand.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 35 "/usr/include/glib-2.0/glib/grand.h" 2 + + + +typedef struct _GRand GRand; +# 49 "/usr/include/glib-2.0/glib/grand.h" +GRand* g_rand_new_with_seed (guint32 seed); +GRand* g_rand_new_with_seed_array (const guint32 *seed, + guint seed_length); +GRand* g_rand_new (void); +void g_rand_free (GRand *rand_); +GRand* g_rand_copy (GRand *rand_); +void g_rand_set_seed (GRand *rand_, + guint32 seed); +void g_rand_set_seed_array (GRand *rand_, + const guint32 *seed, + guint seed_length); + + + +guint32 g_rand_int (GRand *rand_); +gint32 g_rand_int_range (GRand *rand_, + gint32 begin, + gint32 end); +gdouble g_rand_double (GRand *rand_); +gdouble g_rand_double_range (GRand *rand_, + gdouble begin, + gdouble end); +void g_random_set_seed (guint32 seed); + + + +guint32 g_random_int (void); +gint32 g_random_int_range (gint32 begin, + gint32 end); +gdouble g_random_double (void); +gdouble g_random_double_range (gdouble begin, + gdouble end); + + + +# 74 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gregex.h" 1 +# 29 "/usr/include/glib-2.0/glib/gregex.h" +# 1 "/usr/include/glib-2.0/glib/gerror.h" 1 +# 30 "/usr/include/glib-2.0/glib/gregex.h" 2 +# 1 "/usr/include/glib-2.0/glib/gstring.h" 1 +# 31 "/usr/include/glib-2.0/glib/gregex.h" 2 + + +# 117 "/usr/include/glib-2.0/glib/gregex.h" +typedef enum +{ + G_REGEX_ERROR_COMPILE, + G_REGEX_ERROR_OPTIMIZE, + G_REGEX_ERROR_REPLACE, + G_REGEX_ERROR_MATCH, + G_REGEX_ERROR_INTERNAL, + + + G_REGEX_ERROR_STRAY_BACKSLASH = 101, + G_REGEX_ERROR_MISSING_CONTROL_CHAR = 102, + G_REGEX_ERROR_UNRECOGNIZED_ESCAPE = 103, + G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER = 104, + G_REGEX_ERROR_QUANTIFIER_TOO_BIG = 105, + G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS = 106, + G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS = 107, + G_REGEX_ERROR_RANGE_OUT_OF_ORDER = 108, + G_REGEX_ERROR_NOTHING_TO_REPEAT = 109, + G_REGEX_ERROR_UNRECOGNIZED_CHARACTER = 112, + G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS = 113, + G_REGEX_ERROR_UNMATCHED_PARENTHESIS = 114, + G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE = 115, + G_REGEX_ERROR_UNTERMINATED_COMMENT = 118, + G_REGEX_ERROR_EXPRESSION_TOO_LARGE = 120, + G_REGEX_ERROR_MEMORY_ERROR = 121, + G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND = 125, + G_REGEX_ERROR_MALFORMED_CONDITION = 126, + G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES = 127, + G_REGEX_ERROR_ASSERTION_EXPECTED = 128, + G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME = 130, + G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED = 131, + G_REGEX_ERROR_HEX_CODE_TOO_LARGE = 134, + G_REGEX_ERROR_INVALID_CONDITION = 135, + G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND = 136, + G_REGEX_ERROR_INFINITE_LOOP = 140, + G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR = 142, + G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME = 143, + G_REGEX_ERROR_MALFORMED_PROPERTY = 146, + G_REGEX_ERROR_UNKNOWN_PROPERTY = 147, + G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG = 148, + G_REGEX_ERROR_TOO_MANY_SUBPATTERNS = 149, + G_REGEX_ERROR_INVALID_OCTAL_VALUE = 151, + G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE = 154, + G_REGEX_ERROR_DEFINE_REPETION = 155, + G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS = 156, + G_REGEX_ERROR_MISSING_BACK_REFERENCE = 157 +} GRegexError; +# 176 "/usr/include/glib-2.0/glib/gregex.h" +GQuark g_regex_error_quark (void); +# 243 "/usr/include/glib-2.0/glib/gregex.h" +typedef enum +{ + G_REGEX_CASELESS = 1 << 0, + G_REGEX_MULTILINE = 1 << 1, + G_REGEX_DOTALL = 1 << 2, + G_REGEX_EXTENDED = 1 << 3, + G_REGEX_ANCHORED = 1 << 4, + G_REGEX_DOLLAR_ENDONLY = 1 << 5, + G_REGEX_UNGREEDY = 1 << 9, + G_REGEX_RAW = 1 << 11, + G_REGEX_NO_AUTO_CAPTURE = 1 << 12, + G_REGEX_OPTIMIZE = 1 << 13, + G_REGEX_DUPNAMES = 1 << 19, + G_REGEX_NEWLINE_CR = 1 << 20, + G_REGEX_NEWLINE_LF = 1 << 21, + G_REGEX_NEWLINE_CRLF = G_REGEX_NEWLINE_CR | G_REGEX_NEWLINE_LF +} GRegexCompileFlags; +# 306 "/usr/include/glib-2.0/glib/gregex.h" +typedef enum +{ + G_REGEX_MATCH_ANCHORED = 1 << 4, + G_REGEX_MATCH_NOTBOL = 1 << 7, + G_REGEX_MATCH_NOTEOL = 1 << 8, + G_REGEX_MATCH_NOTEMPTY = 1 << 10, + G_REGEX_MATCH_PARTIAL = 1 << 15, + G_REGEX_MATCH_NEWLINE_CR = 1 << 20, + G_REGEX_MATCH_NEWLINE_LF = 1 << 21, + G_REGEX_MATCH_NEWLINE_CRLF = G_REGEX_MATCH_NEWLINE_CR | G_REGEX_MATCH_NEWLINE_LF, + G_REGEX_MATCH_NEWLINE_ANY = 1 << 22 +} GRegexMatchFlags; +# 327 "/usr/include/glib-2.0/glib/gregex.h" +typedef struct _GRegex GRegex; + + +typedef struct _GMatchInfo GMatchInfo; +# 349 "/usr/include/glib-2.0/glib/gregex.h" +typedef gboolean (*GRegexEvalCallback) (const GMatchInfo *match_info, + GString *result, + gpointer user_data); + + +GRegex *g_regex_new (const gchar *pattern, + GRegexCompileFlags compile_options, + GRegexMatchFlags match_options, + GError **error); +GRegex *g_regex_ref (GRegex *regex); +void g_regex_unref (GRegex *regex); +const gchar *g_regex_get_pattern (const GRegex *regex); +gint g_regex_get_max_backref (const GRegex *regex); +gint g_regex_get_capture_count (const GRegex *regex); +gint g_regex_get_string_number (const GRegex *regex, + const gchar *name); +gchar *g_regex_escape_string (const gchar *string, + gint length); +gchar *g_regex_escape_nul (const gchar *string, + gint length); + +GRegexCompileFlags g_regex_get_compile_flags (const GRegex *regex); +GRegexMatchFlags g_regex_get_match_flags (const GRegex *regex); + + +gboolean g_regex_match_simple (const gchar *pattern, + const gchar *string, + GRegexCompileFlags compile_options, + GRegexMatchFlags match_options); +gboolean g_regex_match (const GRegex *regex, + const gchar *string, + GRegexMatchFlags match_options, + GMatchInfo **match_info); +gboolean g_regex_match_full (const GRegex *regex, + const gchar *string, + gssize string_len, + gint start_position, + GRegexMatchFlags match_options, + GMatchInfo **match_info, + GError **error); +gboolean g_regex_match_all (const GRegex *regex, + const gchar *string, + GRegexMatchFlags match_options, + GMatchInfo **match_info); +gboolean g_regex_match_all_full (const GRegex *regex, + const gchar *string, + gssize string_len, + gint start_position, + GRegexMatchFlags match_options, + GMatchInfo **match_info, + GError **error); + + +gchar **g_regex_split_simple (const gchar *pattern, + const gchar *string, + GRegexCompileFlags compile_options, + GRegexMatchFlags match_options); +gchar **g_regex_split (const GRegex *regex, + const gchar *string, + GRegexMatchFlags match_options); +gchar **g_regex_split_full (const GRegex *regex, + const gchar *string, + gssize string_len, + gint start_position, + GRegexMatchFlags match_options, + gint max_tokens, + GError **error); + + +gchar *g_regex_replace (const GRegex *regex, + const gchar *string, + gssize string_len, + gint start_position, + const gchar *replacement, + GRegexMatchFlags match_options, + GError **error); +gchar *g_regex_replace_literal (const GRegex *regex, + const gchar *string, + gssize string_len, + gint start_position, + const gchar *replacement, + GRegexMatchFlags match_options, + GError **error); +gchar *g_regex_replace_eval (const GRegex *regex, + const gchar *string, + gssize string_len, + gint start_position, + GRegexMatchFlags match_options, + GRegexEvalCallback eval, + gpointer user_data, + GError **error); +gboolean g_regex_check_replacement (const gchar *replacement, + gboolean *has_references, + GError **error); + + +GRegex *g_match_info_get_regex (const GMatchInfo *match_info); +const gchar *g_match_info_get_string (const GMatchInfo *match_info); + +GMatchInfo *g_match_info_ref (GMatchInfo *match_info); +void g_match_info_unref (GMatchInfo *match_info); +void g_match_info_free (GMatchInfo *match_info); +gboolean g_match_info_next (GMatchInfo *match_info, + GError **error); +gboolean g_match_info_matches (const GMatchInfo *match_info); +gint g_match_info_get_match_count (const GMatchInfo *match_info); +gboolean g_match_info_is_partial_match (const GMatchInfo *match_info); +gchar *g_match_info_expand_references(const GMatchInfo *match_info, + const gchar *string_to_expand, + GError **error); +gchar *g_match_info_fetch (const GMatchInfo *match_info, + gint match_num); +gboolean g_match_info_fetch_pos (const GMatchInfo *match_info, + gint match_num, + gint *start_pos, + gint *end_pos); +gchar *g_match_info_fetch_named (const GMatchInfo *match_info, + const gchar *name); +gboolean g_match_info_fetch_named_pos (const GMatchInfo *match_info, + const gchar *name, + gint *start_pos, + gint *end_pos); +gchar **g_match_info_fetch_all (const GMatchInfo *match_info); + + +# 75 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gscanner.h" 1 +# 34 "/usr/include/glib-2.0/glib/gscanner.h" +# 1 "/usr/include/glib-2.0/glib/gdataset.h" 1 +# 35 "/usr/include/glib-2.0/glib/gscanner.h" 2 +# 1 "/usr/include/glib-2.0/glib/ghash.h" 1 +# 36 "/usr/include/glib-2.0/glib/gscanner.h" 2 + + + +typedef struct _GScanner GScanner; +typedef struct _GScannerConfig GScannerConfig; +typedef union _GTokenValue GTokenValue; + +typedef void (*GScannerMsgFunc) (GScanner *scanner, + gchar *message, + gboolean error); +# 64 "/usr/include/glib-2.0/glib/gscanner.h" +typedef enum +{ + G_ERR_UNKNOWN, + G_ERR_UNEXP_EOF, + G_ERR_UNEXP_EOF_IN_STRING, + G_ERR_UNEXP_EOF_IN_COMMENT, + G_ERR_NON_DIGIT_IN_CONST, + G_ERR_DIGIT_RADIX, + G_ERR_FLOAT_RADIX, + G_ERR_FLOAT_MALFORMED +} GErrorType; + + +typedef enum +{ + G_TOKEN_EOF = 0, + + G_TOKEN_LEFT_PAREN = '(', + G_TOKEN_RIGHT_PAREN = ')', + G_TOKEN_LEFT_CURLY = '{', + G_TOKEN_RIGHT_CURLY = '}', + G_TOKEN_LEFT_BRACE = '[', + G_TOKEN_RIGHT_BRACE = ']', + G_TOKEN_EQUAL_SIGN = '=', + G_TOKEN_COMMA = ',', + + G_TOKEN_NONE = 256, + + G_TOKEN_ERROR, + + G_TOKEN_CHAR, + G_TOKEN_BINARY, + G_TOKEN_OCTAL, + G_TOKEN_INT, + G_TOKEN_HEX, + G_TOKEN_FLOAT, + G_TOKEN_STRING, + + G_TOKEN_SYMBOL, + G_TOKEN_IDENTIFIER, + G_TOKEN_IDENTIFIER_NULL, + + G_TOKEN_COMMENT_SINGLE, + G_TOKEN_COMMENT_MULTI, + + + G_TOKEN_LAST +} GTokenType; + +union _GTokenValue +{ + gpointer v_symbol; + gchar *v_identifier; + gulong v_binary; + gulong v_octal; + gulong v_int; + guint64 v_int64; + gdouble v_float; + gulong v_hex; + gchar *v_string; + gchar *v_comment; + guchar v_char; + guint v_error; +}; + +struct _GScannerConfig +{ + + + gchar *cset_skip_characters; + gchar *cset_identifier_first; + gchar *cset_identifier_nth; + gchar *cpair_comment_single; + + + + guint case_sensitive : 1; + + + + + guint skip_comment_multi : 1; + guint skip_comment_single : 1; + guint scan_comment_multi : 1; + guint scan_identifier : 1; + guint scan_identifier_1char : 1; + guint scan_identifier_NULL : 1; + guint scan_symbols : 1; + guint scan_binary : 1; + guint scan_octal : 1; + guint scan_float : 1; + guint scan_hex : 1; + guint scan_hex_dollar : 1; + guint scan_string_sq : 1; + guint scan_string_dq : 1; + guint numbers_2_int : 1; + guint int_2_float : 1; + guint identifier_2_string : 1; + guint char_2_token : 1; + guint symbol_2_token : 1; + guint scope_0_fallback : 1; + guint store_int64 : 1; + + + guint padding_dummy; +}; + +struct _GScanner +{ + + gpointer user_data; + guint max_parse_errors; + + + guint parse_errors; + + + const gchar *input_name; + + + GData *qdata; + + + GScannerConfig *config; + + + GTokenType token; + GTokenValue value; + guint line; + guint position; + + + GTokenType next_token; + GTokenValue next_value; + guint next_line; + guint next_position; + + + + GHashTable *symbol_table; + gint input_fd; + const gchar *text; + const gchar *text_end; + gchar *buffer; + guint scope_id; + + + + GScannerMsgFunc msg_handler; +}; + +GScanner* g_scanner_new (const GScannerConfig *config_templ); +void g_scanner_destroy (GScanner *scanner); +void g_scanner_input_file (GScanner *scanner, + gint input_fd); +void g_scanner_sync_file_offset (GScanner *scanner); +void g_scanner_input_text (GScanner *scanner, + const gchar *text, + guint text_len); +GTokenType g_scanner_get_next_token (GScanner *scanner); +GTokenType g_scanner_peek_next_token (GScanner *scanner); +GTokenType g_scanner_cur_token (GScanner *scanner); +GTokenValue g_scanner_cur_value (GScanner *scanner); +guint g_scanner_cur_line (GScanner *scanner); +guint g_scanner_cur_position (GScanner *scanner); +gboolean g_scanner_eof (GScanner *scanner); +guint g_scanner_set_scope (GScanner *scanner, + guint scope_id); +void g_scanner_scope_add_symbol (GScanner *scanner, + guint scope_id, + const gchar *symbol, + gpointer value); +void g_scanner_scope_remove_symbol (GScanner *scanner, + guint scope_id, + const gchar *symbol); +gpointer g_scanner_scope_lookup_symbol (GScanner *scanner, + guint scope_id, + const gchar *symbol); +void g_scanner_scope_foreach_symbol (GScanner *scanner, + guint scope_id, + GHFunc func, + gpointer user_data); +gpointer g_scanner_lookup_symbol (GScanner *scanner, + const gchar *symbol); +void g_scanner_unexp_token (GScanner *scanner, + GTokenType expected_token, + const gchar *identifier_spec, + const gchar *symbol_spec, + const gchar *symbol_name, + const gchar *message, + gint is_error); +void g_scanner_error (GScanner *scanner, + const gchar *format, + ...) __attribute__((__format__ (__printf__, 2, 3))); +void g_scanner_warn (GScanner *scanner, + const gchar *format, + ...) __attribute__((__format__ (__printf__, 2, 3))); +# 282 "/usr/include/glib-2.0/glib/gscanner.h" + +# 76 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gsequence.h" 1 +# 28 "/usr/include/glib-2.0/glib/gsequence.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 29 "/usr/include/glib-2.0/glib/gsequence.h" 2 + + + +typedef struct _GSequence GSequence; +typedef struct _GSequenceNode GSequenceIter; + +typedef gint (* GSequenceIterCompareFunc) (GSequenceIter *a, + GSequenceIter *b, + gpointer data); + + + +GSequence * g_sequence_new (GDestroyNotify data_destroy); +void g_sequence_free (GSequence *seq); +gint g_sequence_get_length (GSequence *seq); +void g_sequence_foreach (GSequence *seq, + GFunc func, + gpointer user_data); +void g_sequence_foreach_range (GSequenceIter *begin, + GSequenceIter *end, + GFunc func, + gpointer user_data); +void g_sequence_sort (GSequence *seq, + GCompareDataFunc cmp_func, + gpointer cmp_data); +void g_sequence_sort_iter (GSequence *seq, + GSequenceIterCompareFunc cmp_func, + gpointer cmp_data); + + + +GSequenceIter *g_sequence_get_begin_iter (GSequence *seq); +GSequenceIter *g_sequence_get_end_iter (GSequence *seq); +GSequenceIter *g_sequence_get_iter_at_pos (GSequence *seq, + gint pos); +GSequenceIter *g_sequence_append (GSequence *seq, + gpointer data); +GSequenceIter *g_sequence_prepend (GSequence *seq, + gpointer data); +GSequenceIter *g_sequence_insert_before (GSequenceIter *iter, + gpointer data); +void g_sequence_move (GSequenceIter *src, + GSequenceIter *dest); +void g_sequence_swap (GSequenceIter *a, + GSequenceIter *b); +GSequenceIter *g_sequence_insert_sorted (GSequence *seq, + gpointer data, + GCompareDataFunc cmp_func, + gpointer cmp_data); +GSequenceIter *g_sequence_insert_sorted_iter (GSequence *seq, + gpointer data, + GSequenceIterCompareFunc iter_cmp, + gpointer cmp_data); +void g_sequence_sort_changed (GSequenceIter *iter, + GCompareDataFunc cmp_func, + gpointer cmp_data); +void g_sequence_sort_changed_iter (GSequenceIter *iter, + GSequenceIterCompareFunc iter_cmp, + gpointer cmp_data); +void g_sequence_remove (GSequenceIter *iter); +void g_sequence_remove_range (GSequenceIter *begin, + GSequenceIter *end); +void g_sequence_move_range (GSequenceIter *dest, + GSequenceIter *begin, + GSequenceIter *end); +GSequenceIter *g_sequence_search (GSequence *seq, + gpointer data, + GCompareDataFunc cmp_func, + gpointer cmp_data); +GSequenceIter *g_sequence_search_iter (GSequence *seq, + gpointer data, + GSequenceIterCompareFunc iter_cmp, + gpointer cmp_data); +GSequenceIter *g_sequence_lookup (GSequence *seq, + gpointer data, + GCompareDataFunc cmp_func, + gpointer cmp_data); +GSequenceIter *g_sequence_lookup_iter (GSequence *seq, + gpointer data, + GSequenceIterCompareFunc iter_cmp, + gpointer cmp_data); + + + +gpointer g_sequence_get (GSequenceIter *iter); +void g_sequence_set (GSequenceIter *iter, + gpointer data); + + +gboolean g_sequence_iter_is_begin (GSequenceIter *iter); +gboolean g_sequence_iter_is_end (GSequenceIter *iter); +GSequenceIter *g_sequence_iter_next (GSequenceIter *iter); +GSequenceIter *g_sequence_iter_prev (GSequenceIter *iter); +gint g_sequence_iter_get_position (GSequenceIter *iter); +GSequenceIter *g_sequence_iter_move (GSequenceIter *iter, + gint delta); +GSequence * g_sequence_iter_get_sequence (GSequenceIter *iter); + + + +gint g_sequence_iter_compare (GSequenceIter *a, + GSequenceIter *b); +GSequenceIter *g_sequence_range_get_midpoint (GSequenceIter *begin, + GSequenceIter *end); + + +# 77 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gshell.h" 1 +# 28 "/usr/include/glib-2.0/glib/gshell.h" +# 1 "/usr/include/glib-2.0/glib/gerror.h" 1 +# 29 "/usr/include/glib-2.0/glib/gshell.h" 2 + + + + + +typedef enum +{ + + G_SHELL_ERROR_BAD_QUOTING, + + G_SHELL_ERROR_EMPTY_STRING, + G_SHELL_ERROR_FAILED +} GShellError; + +GQuark g_shell_error_quark (void); + +gchar* g_shell_quote (const gchar *unquoted_string); +gchar* g_shell_unquote (const gchar *quoted_string, + GError **error); +gboolean g_shell_parse_argv (const gchar *command_line, + gint *argcp, + gchar ***argvp, + GError **error); + + +# 78 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gslice.h" 1 +# 27 "/usr/include/glib-2.0/glib/gslice.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 28 "/usr/include/glib-2.0/glib/gslice.h" 2 + + + + + +gpointer g_slice_alloc (gsize block_size) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))); +gpointer g_slice_alloc0 (gsize block_size) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))); +gpointer g_slice_copy (gsize block_size, + gconstpointer mem_block) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))); +void g_slice_free1 (gsize block_size, + gpointer mem_block); +void g_slice_free_chain_with_offset (gsize block_size, + gpointer mem_chain, + gsize next_offset); +# 72 "/usr/include/glib-2.0/glib/gslice.h" +typedef enum { + G_SLICE_CONFIG_ALWAYS_MALLOC = 1, + G_SLICE_CONFIG_BYPASS_MAGAZINES, + G_SLICE_CONFIG_WORKING_SET_MSECS, + G_SLICE_CONFIG_COLOR_INCREMENT, + G_SLICE_CONFIG_CHUNK_SIZES, + G_SLICE_CONFIG_CONTENTION_COUNTER +} GSliceConfig; +void g_slice_set_config (GSliceConfig ckey, gint64 value); +gint64 g_slice_get_config (GSliceConfig ckey); +gint64* g_slice_get_config_state (GSliceConfig ckey, gint64 address, guint *n_values); + + +# 79 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gslist.h" 1 +# 80 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gspawn.h" 1 +# 28 "/usr/include/glib-2.0/glib/gspawn.h" +# 1 "/usr/include/glib-2.0/glib/gerror.h" 1 +# 29 "/usr/include/glib-2.0/glib/gspawn.h" 2 + + +# 70 "/usr/include/glib-2.0/glib/gspawn.h" +typedef enum +{ + G_SPAWN_ERROR_FORK, + G_SPAWN_ERROR_READ, + G_SPAWN_ERROR_CHDIR, + G_SPAWN_ERROR_ACCES, + G_SPAWN_ERROR_PERM, + G_SPAWN_ERROR_TOO_BIG, + + G_SPAWN_ERROR_2BIG = G_SPAWN_ERROR_TOO_BIG, + + G_SPAWN_ERROR_NOEXEC, + G_SPAWN_ERROR_NAMETOOLONG, + G_SPAWN_ERROR_NOENT, + G_SPAWN_ERROR_NOMEM, + G_SPAWN_ERROR_NOTDIR, + G_SPAWN_ERROR_LOOP, + G_SPAWN_ERROR_TXTBUSY, + G_SPAWN_ERROR_IO, + G_SPAWN_ERROR_NFILE, + G_SPAWN_ERROR_MFILE, + G_SPAWN_ERROR_INVAL, + G_SPAWN_ERROR_ISDIR, + G_SPAWN_ERROR_LIBBAD, + G_SPAWN_ERROR_FAILED + + +} GSpawnError; +# 135 "/usr/include/glib-2.0/glib/gspawn.h" +typedef void (* GSpawnChildSetupFunc) (gpointer user_data); +# 161 "/usr/include/glib-2.0/glib/gspawn.h" +typedef enum +{ + G_SPAWN_LEAVE_DESCRIPTORS_OPEN = 1 << 0, + G_SPAWN_DO_NOT_REAP_CHILD = 1 << 1, + + G_SPAWN_SEARCH_PATH = 1 << 2, + + G_SPAWN_STDOUT_TO_DEV_NULL = 1 << 3, + G_SPAWN_STDERR_TO_DEV_NULL = 1 << 4, + G_SPAWN_CHILD_INHERITS_STDIN = 1 << 5, + G_SPAWN_FILE_AND_ARGV_ZERO = 1 << 6 +} GSpawnFlags; + +GQuark g_spawn_error_quark (void); +# 186 "/usr/include/glib-2.0/glib/gspawn.h" +gboolean g_spawn_async (const gchar *working_directory, + gchar **argv, + gchar **envp, + GSpawnFlags flags, + GSpawnChildSetupFunc child_setup, + gpointer user_data, + GPid *child_pid, + GError **error); + + + + + +gboolean g_spawn_async_with_pipes (const gchar *working_directory, + gchar **argv, + gchar **envp, + GSpawnFlags flags, + GSpawnChildSetupFunc child_setup, + gpointer user_data, + GPid *child_pid, + gint *standard_input, + gint *standard_output, + gint *standard_error, + GError **error); + + + + + + +gboolean g_spawn_sync (const gchar *working_directory, + gchar **argv, + gchar **envp, + GSpawnFlags flags, + GSpawnChildSetupFunc child_setup, + gpointer user_data, + gchar **standard_output, + gchar **standard_error, + gint *exit_status, + GError **error); + +gboolean g_spawn_command_line_sync (const gchar *command_line, + gchar **standard_output, + gchar **standard_error, + gint *exit_status, + GError **error); +gboolean g_spawn_command_line_async (const gchar *command_line, + GError **error); + +void g_spawn_close_pid (GPid pid); + + +# 81 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gstrfuncs.h" 1 +# 35 "/usr/include/glib-2.0/glib/gstrfuncs.h" +# 1 "/usr/include/glib-2.0/glib/gmacros.h" 1 +# 36 "/usr/include/glib-2.0/glib/gstrfuncs.h" 2 +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 37 "/usr/include/glib-2.0/glib/gstrfuncs.h" 2 + + + + +typedef enum { + G_ASCII_ALNUM = 1 << 0, + G_ASCII_ALPHA = 1 << 1, + G_ASCII_CNTRL = 1 << 2, + G_ASCII_DIGIT = 1 << 3, + G_ASCII_GRAPH = 1 << 4, + G_ASCII_LOWER = 1 << 5, + G_ASCII_PRINT = 1 << 6, + G_ASCII_PUNCT = 1 << 7, + G_ASCII_SPACE = 1 << 8, + G_ASCII_UPPER = 1 << 9, + G_ASCII_XDIGIT = 1 << 10 +} GAsciiType; + +extern const guint16 * const g_ascii_table; +# 90 "/usr/include/glib-2.0/glib/gstrfuncs.h" +gchar g_ascii_tolower (gchar c) __attribute__((__const__)); +gchar g_ascii_toupper (gchar c) __attribute__((__const__)); + +gint g_ascii_digit_value (gchar c) __attribute__((__const__)); +gint g_ascii_xdigit_value (gchar c) __attribute__((__const__)); + + + + + +gchar* g_strdelimit (gchar *string, + const gchar *delimiters, + gchar new_delimiter); +gchar* g_strcanon (gchar *string, + const gchar *valid_chars, + gchar substitutor); +const gchar * g_strerror (gint errnum) __attribute__((__const__)); +const gchar * g_strsignal (gint signum) __attribute__((__const__)); +gchar * g_strreverse (gchar *string); +gsize g_strlcpy (gchar *dest, + const gchar *src, + gsize dest_size); +gsize g_strlcat (gchar *dest, + const gchar *src, + gsize dest_size); +gchar * g_strstr_len (const gchar *haystack, + gssize haystack_len, + const gchar *needle); +gchar * g_strrstr (const gchar *haystack, + const gchar *needle); +gchar * g_strrstr_len (const gchar *haystack, + gssize haystack_len, + const gchar *needle); + +gboolean g_str_has_suffix (const gchar *str, + const gchar *suffix); +gboolean g_str_has_prefix (const gchar *str, + const gchar *prefix); + + + +gdouble g_strtod (const gchar *nptr, + gchar **endptr); +gdouble g_ascii_strtod (const gchar *nptr, + gchar **endptr); +guint64 g_ascii_strtoull (const gchar *nptr, + gchar **endptr, + guint base); +gint64 g_ascii_strtoll (const gchar *nptr, + gchar **endptr, + guint base); + + + + +gchar * g_ascii_dtostr (gchar *buffer, + gint buf_len, + gdouble d); +gchar * g_ascii_formatd (gchar *buffer, + gint buf_len, + const gchar *format, + gdouble d); + + +gchar* g_strchug (gchar *string); + +gchar* g_strchomp (gchar *string); + + + +gint g_ascii_strcasecmp (const gchar *s1, + const gchar *s2); +gint g_ascii_strncasecmp (const gchar *s1, + const gchar *s2, + gsize n); +gchar* g_ascii_strdown (const gchar *str, + gssize len) __attribute__((__malloc__)); +gchar* g_ascii_strup (const gchar *str, + gssize len) __attribute__((__malloc__)); + + +__attribute__((__deprecated__)) +gint g_strcasecmp (const gchar *s1, + const gchar *s2); +__attribute__((__deprecated__)) +gint g_strncasecmp (const gchar *s1, + const gchar *s2, + guint n); +__attribute__((__deprecated__)) +gchar* g_strdown (gchar *string); +__attribute__((__deprecated__)) +gchar* g_strup (gchar *string); + + + + + +gchar* g_strdup (const gchar *str) __attribute__((__malloc__)); +gchar* g_strdup_printf (const gchar *format, + ...) __attribute__((__format__ (__printf__, 1, 2))) __attribute__((__malloc__)); +gchar* g_strdup_vprintf (const gchar *format, + va_list args) __attribute__((__malloc__)); +gchar* g_strndup (const gchar *str, + gsize n) __attribute__((__malloc__)); +gchar* g_strnfill (gsize length, + gchar fill_char) __attribute__((__malloc__)); +gchar* g_strconcat (const gchar *string1, + ...) __attribute__((__malloc__)) __attribute__((__sentinel__)); +gchar* g_strjoin (const gchar *separator, + ...) __attribute__((__malloc__)) __attribute__((__sentinel__)); + + + + + +gchar* g_strcompress (const gchar *source) __attribute__((__malloc__)); +# 215 "/usr/include/glib-2.0/glib/gstrfuncs.h" +gchar* g_strescape (const gchar *source, + const gchar *exceptions) __attribute__((__malloc__)); + +gpointer g_memdup (gconstpointer mem, + guint byte_size) __attribute__((__malloc__)) __attribute__((__alloc_size__(2))); +# 230 "/usr/include/glib-2.0/glib/gstrfuncs.h" +gchar** g_strsplit (const gchar *string, + const gchar *delimiter, + gint max_tokens) __attribute__((__malloc__)); +gchar ** g_strsplit_set (const gchar *string, + const gchar *delimiters, + gint max_tokens) __attribute__((__malloc__)); +gchar* g_strjoinv (const gchar *separator, + gchar **str_array) __attribute__((__malloc__)); +void g_strfreev (gchar **str_array); +gchar** g_strdupv (gchar **str_array) __attribute__((__malloc__)); +guint g_strv_length (gchar **str_array); + +gchar* g_stpcpy (gchar *dest, + const char *src); + + +# 82 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gstring.h" 1 +# 83 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gstringchunk.h" 1 +# 34 "/usr/include/glib-2.0/glib/gstringchunk.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 35 "/usr/include/glib-2.0/glib/gstringchunk.h" 2 + + + +typedef struct _GStringChunk GStringChunk; + +GStringChunk* g_string_chunk_new (gsize size); +void g_string_chunk_free (GStringChunk *chunk); +void g_string_chunk_clear (GStringChunk *chunk); +gchar* g_string_chunk_insert (GStringChunk *chunk, + const gchar *string); +gchar* g_string_chunk_insert_len (GStringChunk *chunk, + const gchar *string, + gssize len); +gchar* g_string_chunk_insert_const (GStringChunk *chunk, + const gchar *string); + + +# 84 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gtestutils.h" 1 +# 28 "/usr/include/glib-2.0/glib/gtestutils.h" +# 1 "/usr/include/glib-2.0/glib/gmessages.h" 1 +# 29 "/usr/include/glib-2.0/glib/gtestutils.h" 2 +# 1 "/usr/include/glib-2.0/glib/gstring.h" 1 +# 30 "/usr/include/glib-2.0/glib/gtestutils.h" 2 +# 1 "/usr/include/glib-2.0/glib/gerror.h" 1 +# 31 "/usr/include/glib-2.0/glib/gtestutils.h" 2 +# 1 "/usr/include/glib-2.0/glib/gslist.h" 1 +# 32 "/usr/include/glib-2.0/glib/gtestutils.h" 2 + + + +typedef struct GTestCase GTestCase; +typedef struct GTestSuite GTestSuite; +typedef void (*GTestFunc) (void); +typedef void (*GTestDataFunc) (gconstpointer user_data); +typedef void (*GTestFixtureFunc) (gpointer fixture, + gconstpointer user_data); +# 79 "/usr/include/glib-2.0/glib/gtestutils.h" +int g_strcmp0 (const char *str1, + const char *str2); + + +void g_test_minimized_result (double minimized_quantity, + const char *format, + ...) __attribute__((__format__ (__printf__, 2, 3))); +void g_test_maximized_result (double maximized_quantity, + const char *format, + ...) __attribute__((__format__ (__printf__, 2, 3))); + + +void g_test_init (int *argc, + char ***argv, + ...); +# 103 "/usr/include/glib-2.0/glib/gtestutils.h" +int g_test_run (void); + +void g_test_add_func (const char *testpath, + GTestFunc test_func); + +void g_test_add_data_func (const char *testpath, + gconstpointer test_data, + GTestDataFunc test_func); + +void g_test_fail (void); +# 128 "/usr/include/glib-2.0/glib/gtestutils.h" +void g_test_message (const char *format, + ...) __attribute__((__format__ (__printf__, 1, 2))); +void g_test_bug_base (const char *uri_pattern); +void g_test_bug (const char *bug_uri_snippet); + +void g_test_timer_start (void); +double g_test_timer_elapsed (void); +double g_test_timer_last (void); + + +void g_test_queue_free (gpointer gfree_pointer); +void g_test_queue_destroy (GDestroyNotify destroy_func, + gpointer destroy_data); + + + +typedef enum { + G_TEST_TRAP_SILENCE_STDOUT = 1 << 7, + G_TEST_TRAP_SILENCE_STDERR = 1 << 8, + G_TEST_TRAP_INHERIT_STDIN = 1 << 9 +} GTestTrapFlags; +gboolean g_test_trap_fork (guint64 usec_timeout, + GTestTrapFlags test_trap_flags); +gboolean g_test_trap_has_passed (void); +gboolean g_test_trap_reached_timeout (void); +# 162 "/usr/include/glib-2.0/glib/gtestutils.h" +gint32 g_test_rand_int (void); +gint32 g_test_rand_int_range (gint32 begin, + gint32 end); +double g_test_rand_double (void); +double g_test_rand_double_range (double range_start, + double range_end); + + +GTestCase* g_test_create_case (const char *test_name, + gsize data_size, + gconstpointer test_data, + GTestFixtureFunc data_setup, + GTestFixtureFunc data_test, + GTestFixtureFunc data_teardown); +GTestSuite* g_test_create_suite (const char *suite_name); +GTestSuite* g_test_get_root (void); +void g_test_suite_add (GTestSuite *suite, + GTestCase *test_case); +void g_test_suite_add_suite (GTestSuite *suite, + GTestSuite *nestedsuite); +int g_test_run_suite (GTestSuite *suite); + + +void g_test_trap_assertions (const char *domain, + const char *file, + int line, + const char *func, + guint64 assertion_flags, + const char *pattern); +void g_assertion_message (const char *domain, + const char *file, + int line, + const char *func, + const char *message) __attribute__((__noreturn__)); +void g_assertion_message_expr (const char *domain, + const char *file, + int line, + const char *func, + const char *expr) __attribute__((__noreturn__)); +void g_assertion_message_cmpstr (const char *domain, + const char *file, + int line, + const char *func, + const char *expr, + const char *arg1, + const char *cmp, + const char *arg2) __attribute__((__noreturn__)); +void g_assertion_message_cmpnum (const char *domain, + const char *file, + int line, + const char *func, + const char *expr, + long double arg1, + const char *cmp, + long double arg2, + char numtype) __attribute__((__noreturn__)); +void g_assertion_message_error (const char *domain, + const char *file, + int line, + const char *func, + const char *expr, + const GError *error, + GQuark error_domain, + int error_code) __attribute__((__noreturn__)); +void g_test_add_vtable (const char *testpath, + gsize data_size, + gconstpointer test_data, + GTestFixtureFunc data_setup, + GTestFixtureFunc data_test, + GTestFixtureFunc data_teardown); +typedef struct { + gboolean test_initialized; + gboolean test_quick; + gboolean test_perf; + gboolean test_verbose; + gboolean test_quiet; + gboolean test_undefined; +} GTestConfig; +extern const GTestConfig * const g_test_config_vars; + + +typedef enum { + G_TEST_LOG_NONE, + G_TEST_LOG_ERROR, + G_TEST_LOG_START_BINARY, + G_TEST_LOG_LIST_CASE, + G_TEST_LOG_SKIP_CASE, + G_TEST_LOG_START_CASE, + G_TEST_LOG_STOP_CASE, + G_TEST_LOG_MIN_RESULT, + G_TEST_LOG_MAX_RESULT, + G_TEST_LOG_MESSAGE +} GTestLogType; + +typedef struct { + GTestLogType log_type; + guint n_strings; + gchar **strings; + guint n_nums; + long double *nums; +} GTestLogMsg; +typedef struct { + + GString *data; + GSList *msgs; +} GTestLogBuffer; + +const char* g_test_log_type_name (GTestLogType log_type); +GTestLogBuffer* g_test_log_buffer_new (void); +void g_test_log_buffer_free (GTestLogBuffer *tbuffer); +void g_test_log_buffer_push (GTestLogBuffer *tbuffer, + guint n_bytes, + const guint8 *bytes); +GTestLogMsg* g_test_log_buffer_pop (GTestLogBuffer *tbuffer); +void g_test_log_msg_free (GTestLogMsg *tmsg); +# 291 "/usr/include/glib-2.0/glib/gtestutils.h" +typedef gboolean (*GTestLogFatalFunc) (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer user_data); +void +g_test_log_set_fatal_handler (GTestLogFatalFunc log_func, + gpointer user_data); + + +# 85 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gthread.h" 1 +# 86 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gthreadpool.h" 1 +# 34 "/usr/include/glib-2.0/glib/gthreadpool.h" +# 1 "/usr/include/glib-2.0/glib/gthread.h" 1 +# 35 "/usr/include/glib-2.0/glib/gthreadpool.h" 2 + + + +typedef struct _GThreadPool GThreadPool; + + + + +struct _GThreadPool +{ + GFunc func; + gpointer user_data; + gboolean exclusive; +}; + +GThreadPool * g_thread_pool_new (GFunc func, + gpointer user_data, + gint max_threads, + gboolean exclusive, + GError **error); +void g_thread_pool_free (GThreadPool *pool, + gboolean immediate, + gboolean wait_); +gboolean g_thread_pool_push (GThreadPool *pool, + gpointer data, + GError **error); +guint g_thread_pool_unprocessed (GThreadPool *pool); +void g_thread_pool_set_sort_function (GThreadPool *pool, + GCompareDataFunc func, + gpointer user_data); +gboolean g_thread_pool_set_max_threads (GThreadPool *pool, + gint max_threads, + GError **error); +gint g_thread_pool_get_max_threads (GThreadPool *pool); +guint g_thread_pool_get_num_threads (GThreadPool *pool); + +void g_thread_pool_set_max_unused_threads (gint max_threads); +gint g_thread_pool_get_max_unused_threads (void); +guint g_thread_pool_get_num_unused_threads (void); +void g_thread_pool_stop_unused_threads (void); +void g_thread_pool_set_max_idle_time (guint interval); +guint g_thread_pool_get_max_idle_time (void); + + +# 87 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gtimer.h" 1 +# 34 "/usr/include/glib-2.0/glib/gtimer.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 35 "/usr/include/glib-2.0/glib/gtimer.h" 2 + + + + + + + +typedef struct _GTimer GTimer; + + + +GTimer* g_timer_new (void); +void g_timer_destroy (GTimer *timer); +void g_timer_start (GTimer *timer); +void g_timer_stop (GTimer *timer); +void g_timer_reset (GTimer *timer); +void g_timer_continue (GTimer *timer); +gdouble g_timer_elapsed (GTimer *timer, + gulong *microseconds); + +void g_usleep (gulong microseconds); + +void g_time_val_add (GTimeVal *time_, + glong microseconds); +gboolean g_time_val_from_iso8601 (const gchar *iso_date, + GTimeVal *time_); +gchar* g_time_val_to_iso8601 (GTimeVal *time_) __attribute__((__malloc__)); + + +# 88 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gtimezone.h" 1 +# 89 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gtrashstack.h" 1 +# 34 "/usr/include/glib-2.0/glib/gtrashstack.h" +# 1 "/usr/include/glib-2.0/glib/gutils.h" 1 +# 35 "/usr/include/glib-2.0/glib/gtrashstack.h" 2 + + + +typedef struct _GTrashStack GTrashStack; +struct _GTrashStack +{ + GTrashStack *next; +}; + +static __inline __attribute__ ((unused)) void g_trash_stack_push (GTrashStack **stack_p, + gpointer data_p); +static __inline __attribute__ ((unused)) gpointer g_trash_stack_pop (GTrashStack **stack_p); +static __inline __attribute__ ((unused)) gpointer g_trash_stack_peek (GTrashStack **stack_p); +static __inline __attribute__ ((unused)) guint g_trash_stack_height (GTrashStack **stack_p); + + + +static __inline __attribute__ ((unused)) void +g_trash_stack_push (GTrashStack **stack_p, + gpointer data_p) +{ + GTrashStack *data = (GTrashStack *) data_p; + + data->next = *stack_p; + *stack_p = data; +} +static __inline __attribute__ ((unused)) gpointer +g_trash_stack_pop (GTrashStack **stack_p) +{ + GTrashStack *data; + + data = *stack_p; + if (data) + { + *stack_p = data->next; + + + + data->next = ((void *)0); + } + + return data; +} +static __inline __attribute__ ((unused)) gpointer +g_trash_stack_peek (GTrashStack **stack_p) +{ + GTrashStack *data; + + data = *stack_p; + + return data; +} +static __inline __attribute__ ((unused)) guint +g_trash_stack_height (GTrashStack **stack_p) +{ + GTrashStack *data; + guint i = 0; + + for (data = *stack_p; data; data = data->next) + i++; + + return i; +} + + + + +# 90 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gtree.h" 1 +# 34 "/usr/include/glib-2.0/glib/gtree.h" +# 1 "/usr/include/glib-2.0/glib/gnode.h" 1 +# 35 "/usr/include/glib-2.0/glib/gtree.h" 2 + + + +typedef struct _GTree GTree; + +typedef gboolean (*GTraverseFunc) (gpointer key, + gpointer value, + gpointer data); + + + +GTree* g_tree_new (GCompareFunc key_compare_func); +GTree* g_tree_new_with_data (GCompareDataFunc key_compare_func, + gpointer key_compare_data); +GTree* g_tree_new_full (GCompareDataFunc key_compare_func, + gpointer key_compare_data, + GDestroyNotify key_destroy_func, + GDestroyNotify value_destroy_func); +GTree* g_tree_ref (GTree *tree); +void g_tree_unref (GTree *tree); +void g_tree_destroy (GTree *tree); +void g_tree_insert (GTree *tree, + gpointer key, + gpointer value); +void g_tree_replace (GTree *tree, + gpointer key, + gpointer value); +gboolean g_tree_remove (GTree *tree, + gconstpointer key); +gboolean g_tree_steal (GTree *tree, + gconstpointer key); +gpointer g_tree_lookup (GTree *tree, + gconstpointer key); +gboolean g_tree_lookup_extended (GTree *tree, + gconstpointer lookup_key, + gpointer *orig_key, + gpointer *value); +void g_tree_foreach (GTree *tree, + GTraverseFunc func, + gpointer user_data); + +__attribute__((__deprecated__)) +void g_tree_traverse (GTree *tree, + GTraverseFunc traverse_func, + GTraverseType traverse_type, + gpointer user_data); + +gpointer g_tree_search (GTree *tree, + GCompareFunc search_func, + gconstpointer user_data); +gint g_tree_height (GTree *tree); +gint g_tree_nnodes (GTree *tree); + + +# 91 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 92 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gunicode.h" 1 +# 93 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gurifuncs.h" 1 +# 30 "/usr/include/glib-2.0/glib/gurifuncs.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 31 "/usr/include/glib-2.0/glib/gurifuncs.h" 2 + + +# 69 "/usr/include/glib-2.0/glib/gurifuncs.h" +char * g_uri_unescape_string (const char *escaped_string, + const char *illegal_characters); +char * g_uri_unescape_segment (const char *escaped_string, + const char *escaped_string_end, + const char *illegal_characters); +char * g_uri_parse_scheme (const char *uri); +char * g_uri_escape_string (const char *unescaped, + const char *reserved_chars_allowed, + gboolean allow_utf8); + + +# 94 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gutils.h" 1 +# 95 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gvarianttype.h" 1 +# 30 "/usr/include/glib-2.0/glib/gvarianttype.h" +# 1 "/usr/include/glib-2.0/glib/gmessages.h" 1 +# 31 "/usr/include/glib-2.0/glib/gvarianttype.h" 2 +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 32 "/usr/include/glib-2.0/glib/gvarianttype.h" 2 + + +# 44 "/usr/include/glib-2.0/glib/gvarianttype.h" +typedef struct _GVariantType GVariantType; +# 297 "/usr/include/glib-2.0/glib/gvarianttype.h" +gboolean g_variant_type_string_is_valid (const gchar *type_string); +gboolean g_variant_type_string_scan (const gchar *string, + const gchar *limit, + const gchar **endptr); + + +void g_variant_type_free (GVariantType *type); +GVariantType * g_variant_type_copy (const GVariantType *type); +GVariantType * g_variant_type_new (const gchar *type_string); + + +gsize g_variant_type_get_string_length (const GVariantType *type); +const gchar * g_variant_type_peek_string (const GVariantType *type); +gchar * g_variant_type_dup_string (const GVariantType *type); + + +gboolean g_variant_type_is_definite (const GVariantType *type); +gboolean g_variant_type_is_container (const GVariantType *type); +gboolean g_variant_type_is_basic (const GVariantType *type); +gboolean g_variant_type_is_maybe (const GVariantType *type); +gboolean g_variant_type_is_array (const GVariantType *type); +gboolean g_variant_type_is_tuple (const GVariantType *type); +gboolean g_variant_type_is_dict_entry (const GVariantType *type); +gboolean g_variant_type_is_variant (const GVariantType *type); + + +guint g_variant_type_hash (gconstpointer type); +gboolean g_variant_type_equal (gconstpointer type1, + gconstpointer type2); + + +gboolean g_variant_type_is_subtype_of (const GVariantType *type, + const GVariantType *supertype); + + +const GVariantType * g_variant_type_element (const GVariantType *type); +const GVariantType * g_variant_type_first (const GVariantType *type); +const GVariantType * g_variant_type_next (const GVariantType *type); +gsize g_variant_type_n_items (const GVariantType *type); +const GVariantType * g_variant_type_key (const GVariantType *type); +const GVariantType * g_variant_type_value (const GVariantType *type); + + +GVariantType * g_variant_type_new_array (const GVariantType *element); +GVariantType * g_variant_type_new_maybe (const GVariantType *element); +GVariantType * g_variant_type_new_tuple (const GVariantType * const *items, + gint length); +GVariantType * g_variant_type_new_dict_entry (const GVariantType *key, + const GVariantType *value); + + +const GVariantType * g_variant_type_checked_ (const gchar *); + + +# 96 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gvariant.h" 1 +# 30 "/usr/include/glib-2.0/glib/gvariant.h" +# 1 "/usr/include/glib-2.0/glib/gvarianttype.h" 1 +# 31 "/usr/include/glib-2.0/glib/gvariant.h" 2 +# 1 "/usr/include/glib-2.0/glib/gstring.h" 1 +# 32 "/usr/include/glib-2.0/glib/gvariant.h" 2 + + + +typedef struct _GVariant GVariant; + +typedef enum +{ + G_VARIANT_CLASS_BOOLEAN = 'b', + G_VARIANT_CLASS_BYTE = 'y', + G_VARIANT_CLASS_INT16 = 'n', + G_VARIANT_CLASS_UINT16 = 'q', + G_VARIANT_CLASS_INT32 = 'i', + G_VARIANT_CLASS_UINT32 = 'u', + G_VARIANT_CLASS_INT64 = 'x', + G_VARIANT_CLASS_UINT64 = 't', + G_VARIANT_CLASS_HANDLE = 'h', + G_VARIANT_CLASS_DOUBLE = 'd', + G_VARIANT_CLASS_STRING = 's', + G_VARIANT_CLASS_OBJECT_PATH = 'o', + G_VARIANT_CLASS_SIGNATURE = 'g', + G_VARIANT_CLASS_VARIANT = 'v', + G_VARIANT_CLASS_MAYBE = 'm', + G_VARIANT_CLASS_ARRAY = 'a', + G_VARIANT_CLASS_TUPLE = '(', + G_VARIANT_CLASS_DICT_ENTRY = '{' +} GVariantClass; + +void g_variant_unref (GVariant *value); +GVariant * g_variant_ref (GVariant *value); +GVariant * g_variant_ref_sink (GVariant *value); +gboolean g_variant_is_floating (GVariant *value); +GVariant * g_variant_take_ref (GVariant *value); + +const GVariantType * g_variant_get_type (GVariant *value); +const gchar * g_variant_get_type_string (GVariant *value); +gboolean g_variant_is_of_type (GVariant *value, + const GVariantType *type); +gboolean g_variant_is_container (GVariant *value); +GVariantClass g_variant_classify (GVariant *value); +GVariant * g_variant_new_boolean (gboolean value); +GVariant * g_variant_new_byte (guchar value); +GVariant * g_variant_new_int16 (gint16 value); +GVariant * g_variant_new_uint16 (guint16 value); +GVariant * g_variant_new_int32 (gint32 value); +GVariant * g_variant_new_uint32 (guint32 value); +GVariant * g_variant_new_int64 (gint64 value); +GVariant * g_variant_new_uint64 (guint64 value); +GVariant * g_variant_new_handle (gint32 value); +GVariant * g_variant_new_double (gdouble value); +GVariant * g_variant_new_string (const gchar *string); +GVariant * g_variant_new_object_path (const gchar *object_path); +gboolean g_variant_is_object_path (const gchar *string); +GVariant * g_variant_new_signature (const gchar *signature); +gboolean g_variant_is_signature (const gchar *string); +GVariant * g_variant_new_variant (GVariant *value); +GVariant * g_variant_new_strv (const gchar * const *strv, + gssize length); + +GVariant * g_variant_new_objv (const gchar * const *strv, + gssize length); +GVariant * g_variant_new_bytestring (const gchar *string); +GVariant * g_variant_new_bytestring_array (const gchar * const *strv, + gssize length); +GVariant * g_variant_new_fixed_array (const GVariantType *element_type, + gconstpointer elements, + gsize n_elements, + gsize element_size); +gboolean g_variant_get_boolean (GVariant *value); +guchar g_variant_get_byte (GVariant *value); +gint16 g_variant_get_int16 (GVariant *value); +guint16 g_variant_get_uint16 (GVariant *value); +gint32 g_variant_get_int32 (GVariant *value); +guint32 g_variant_get_uint32 (GVariant *value); +gint64 g_variant_get_int64 (GVariant *value); +guint64 g_variant_get_uint64 (GVariant *value); +gint32 g_variant_get_handle (GVariant *value); +gdouble g_variant_get_double (GVariant *value); +GVariant * g_variant_get_variant (GVariant *value); +const gchar * g_variant_get_string (GVariant *value, + gsize *length); +gchar * g_variant_dup_string (GVariant *value, + gsize *length); +const gchar ** g_variant_get_strv (GVariant *value, + gsize *length); +gchar ** g_variant_dup_strv (GVariant *value, + gsize *length); + +const gchar ** g_variant_get_objv (GVariant *value, + gsize *length); +gchar ** g_variant_dup_objv (GVariant *value, + gsize *length); +const gchar * g_variant_get_bytestring (GVariant *value); +gchar * g_variant_dup_bytestring (GVariant *value, + gsize *length); +const gchar ** g_variant_get_bytestring_array (GVariant *value, + gsize *length); +gchar ** g_variant_dup_bytestring_array (GVariant *value, + gsize *length); + +GVariant * g_variant_new_maybe (const GVariantType *child_type, + GVariant *child); +GVariant * g_variant_new_array (const GVariantType *child_type, + GVariant * const *children, + gsize n_children); +GVariant * g_variant_new_tuple (GVariant * const *children, + gsize n_children); +GVariant * g_variant_new_dict_entry (GVariant *key, + GVariant *value); + +GVariant * g_variant_get_maybe (GVariant *value); +gsize g_variant_n_children (GVariant *value); +void g_variant_get_child (GVariant *value, + gsize index_, + const gchar *format_string, + ...); +GVariant * g_variant_get_child_value (GVariant *value, + gsize index_); +gboolean g_variant_lookup (GVariant *dictionary, + const gchar *key, + const gchar *format_string, + ...); +GVariant * g_variant_lookup_value (GVariant *dictionary, + const gchar *key, + const GVariantType *expected_type); +gconstpointer g_variant_get_fixed_array (GVariant *value, + gsize *n_elements, + gsize element_size); + +gsize g_variant_get_size (GVariant *value); +gconstpointer g_variant_get_data (GVariant *value); +void g_variant_store (GVariant *value, + gpointer data); + +gchar * g_variant_print (GVariant *value, + gboolean type_annotate); +GString * g_variant_print_string (GVariant *value, + GString *string, + gboolean type_annotate); + +guint g_variant_hash (gconstpointer value); +gboolean g_variant_equal (gconstpointer one, + gconstpointer two); + +GVariant * g_variant_get_normal_form (GVariant *value); +gboolean g_variant_is_normal_form (GVariant *value); +GVariant * g_variant_byteswap (GVariant *value); +GVariant * g_variant_new_from_data (const GVariantType *type, + gconstpointer data, + gsize size, + gboolean trusted, + GDestroyNotify notify, + gpointer user_data); + +typedef struct _GVariantIter GVariantIter; +struct _GVariantIter { + + gsize x[16]; +}; + +GVariantIter * g_variant_iter_new (GVariant *value); +gsize g_variant_iter_init (GVariantIter *iter, + GVariant *value); +GVariantIter * g_variant_iter_copy (GVariantIter *iter); +gsize g_variant_iter_n_children (GVariantIter *iter); +void g_variant_iter_free (GVariantIter *iter); +GVariant * g_variant_iter_next_value (GVariantIter *iter); +gboolean g_variant_iter_next (GVariantIter *iter, + const gchar *format_string, + ...); +gboolean g_variant_iter_loop (GVariantIter *iter, + const gchar *format_string, + ...); + + +typedef struct _GVariantBuilder GVariantBuilder; +struct _GVariantBuilder { + + gsize x[16]; +}; + +typedef enum +{ + G_VARIANT_PARSE_ERROR_FAILED, + G_VARIANT_PARSE_ERROR_BASIC_TYPE_EXPECTED, + G_VARIANT_PARSE_ERROR_CANNOT_INFER_TYPE, + G_VARIANT_PARSE_ERROR_DEFINITE_TYPE_EXPECTED, + G_VARIANT_PARSE_ERROR_INPUT_NOT_AT_END, + G_VARIANT_PARSE_ERROR_INVALID_CHARACTER, + G_VARIANT_PARSE_ERROR_INVALID_FORMAT_STRING, + G_VARIANT_PARSE_ERROR_INVALID_OBJECT_PATH, + G_VARIANT_PARSE_ERROR_INVALID_SIGNATURE, + G_VARIANT_PARSE_ERROR_INVALID_TYPE_STRING, + G_VARIANT_PARSE_ERROR_NO_COMMON_TYPE, + G_VARIANT_PARSE_ERROR_NUMBER_OUT_OF_RANGE, + G_VARIANT_PARSE_ERROR_NUMBER_TOO_BIG, + G_VARIANT_PARSE_ERROR_TYPE_ERROR, + G_VARIANT_PARSE_ERROR_UNEXPECTED_TOKEN, + G_VARIANT_PARSE_ERROR_UNKNOWN_KEYWORD, + G_VARIANT_PARSE_ERROR_UNTERMINATED_STRING_CONSTANT, + G_VARIANT_PARSE_ERROR_VALUE_EXPECTED +} GVariantParseError; + + +GQuark g_variant_parser_get_error_quark (void); + +GVariantBuilder * g_variant_builder_new (const GVariantType *type); +void g_variant_builder_unref (GVariantBuilder *builder); +GVariantBuilder * g_variant_builder_ref (GVariantBuilder *builder); +void g_variant_builder_init (GVariantBuilder *builder, + const GVariantType *type); +GVariant * g_variant_builder_end (GVariantBuilder *builder); +void g_variant_builder_clear (GVariantBuilder *builder); +void g_variant_builder_open (GVariantBuilder *builder, + const GVariantType *type); +void g_variant_builder_close (GVariantBuilder *builder); +void g_variant_builder_add_value (GVariantBuilder *builder, + GVariant *value); +void g_variant_builder_add (GVariantBuilder *builder, + const gchar *format_string, + ...); +void g_variant_builder_add_parsed (GVariantBuilder *builder, + const gchar *format, + ...); + +GVariant * g_variant_new (const gchar *format_string, + ...); +void g_variant_get (GVariant *value, + const gchar *format_string, + ...); +GVariant * g_variant_new_va (const gchar *format_string, + const gchar **endptr, + va_list *app); +void g_variant_get_va (GVariant *value, + const gchar *format_string, + const gchar **endptr, + va_list *app); + + +GVariant * g_variant_parse (const GVariantType *type, + const gchar *text, + const gchar *limit, + const gchar **endptr, + GError **error); +GVariant * g_variant_new_parsed (const gchar *format, + ...); +GVariant * g_variant_new_parsed_va (const gchar *format, + va_list *app); + +gint g_variant_compare (gconstpointer one, + gconstpointer two); + +# 97 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gversion.h" 1 +# 34 "/usr/include/glib-2.0/glib/gversion.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 35 "/usr/include/glib-2.0/glib/gversion.h" 2 + + + +extern const guint glib_major_version; +extern const guint glib_minor_version; +extern const guint glib_micro_version; +extern const guint glib_interface_age; +extern const guint glib_binary_age; + +const gchar * glib_check_version (guint required_major, + guint required_minor, + guint required_micro); + + + + + + + + +# 98 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/gversionmacros.h" 1 +# 99 "/usr/include/glib-2.0/glib.h" 2 + + + + +# 1 "/usr/include/glib-2.0/glib/deprecated/gallocator.h" 1 +# 25 "/usr/include/glib-2.0/glib/deprecated/gallocator.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 26 "/usr/include/glib-2.0/glib/deprecated/gallocator.h" 2 + + + +typedef struct _GAllocator GAllocator; +typedef struct _GMemChunk GMemChunk; +# 44 "/usr/include/glib-2.0/glib/deprecated/gallocator.h" +__attribute__((__deprecated__)) +GMemChunk * g_mem_chunk_new (const gchar *name, + gint atom_size, + gsize area_size, + gint type); +__attribute__((__deprecated__)) +void g_mem_chunk_destroy (GMemChunk *mem_chunk); +__attribute__((__deprecated__)) +gpointer g_mem_chunk_alloc (GMemChunk *mem_chunk); +__attribute__((__deprecated__)) +gpointer g_mem_chunk_alloc0 (GMemChunk *mem_chunk); +__attribute__((__deprecated__)) +void g_mem_chunk_free (GMemChunk *mem_chunk, + gpointer mem); +__attribute__((__deprecated__)) +void g_mem_chunk_clean (GMemChunk *mem_chunk); +__attribute__((__deprecated__)) +void g_mem_chunk_reset (GMemChunk *mem_chunk); +__attribute__((__deprecated__)) +void g_mem_chunk_print (GMemChunk *mem_chunk); +__attribute__((__deprecated__)) +void g_mem_chunk_info (void); +__attribute__((__deprecated__)) +void g_blow_chunks (void); + + +__attribute__((__deprecated__)) +GAllocator * g_allocator_new (const gchar *name, + guint n_preallocs); +__attribute__((__deprecated__)) +void g_allocator_free (GAllocator *allocator); +__attribute__((__deprecated__)) +void g_list_push_allocator (GAllocator *allocator); +__attribute__((__deprecated__)) +void g_list_pop_allocator (void); +__attribute__((__deprecated__)) +void g_slist_push_allocator (GAllocator *allocator); +__attribute__((__deprecated__)) +void g_slist_pop_allocator (void); +__attribute__((__deprecated__)) +void g_node_push_allocator (GAllocator *allocator); +__attribute__((__deprecated__)) +void g_node_pop_allocator (void); + + +# 104 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/deprecated/gcache.h" 1 +# 34 "/usr/include/glib-2.0/glib/deprecated/gcache.h" +# 1 "/usr/include/glib-2.0/glib/glist.h" 1 +# 35 "/usr/include/glib-2.0/glib/deprecated/gcache.h" 2 + + + +typedef struct _GCache GCache; + +typedef gpointer (*GCacheNewFunc) (gpointer key); +typedef gpointer (*GCacheDupFunc) (gpointer value); +typedef void (*GCacheDestroyFunc) (gpointer value); + + + +__attribute__((__deprecated__)) +GCache* g_cache_new (GCacheNewFunc value_new_func, + GCacheDestroyFunc value_destroy_func, + GCacheDupFunc key_dup_func, + GCacheDestroyFunc key_destroy_func, + GHashFunc hash_key_func, + GHashFunc hash_value_func, + GEqualFunc key_equal_func); +__attribute__((__deprecated__)) +void g_cache_destroy (GCache *cache); +__attribute__((__deprecated__)) +gpointer g_cache_insert (GCache *cache, + gpointer key); +__attribute__((__deprecated__)) +void g_cache_remove (GCache *cache, + gconstpointer value); +__attribute__((__deprecated__)) +void g_cache_key_foreach (GCache *cache, + GHFunc func, + gpointer user_data); +__attribute__((__deprecated__)) +void g_cache_value_foreach (GCache *cache, + GHFunc func, + gpointer user_data); + + +# 105 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/deprecated/gcompletion.h" 1 +# 34 "/usr/include/glib-2.0/glib/deprecated/gcompletion.h" +# 1 "/usr/include/glib-2.0/glib/glist.h" 1 +# 35 "/usr/include/glib-2.0/glib/deprecated/gcompletion.h" 2 + + + +typedef struct _GCompletion GCompletion; + +typedef gchar* (*GCompletionFunc) (gpointer); + + + + +typedef gint (*GCompletionStrncmpFunc) (const gchar *s1, + const gchar *s2, + gsize n); + +struct _GCompletion +{ + GList* items; + GCompletionFunc func; + + gchar* prefix; + GList* cache; + GCompletionStrncmpFunc strncmp_func; +}; + +__attribute__((__deprecated__)) +GCompletion* g_completion_new (GCompletionFunc func); +__attribute__((__deprecated__)) +void g_completion_add_items (GCompletion* cmp, + GList* items); +__attribute__((__deprecated__)) +void g_completion_remove_items (GCompletion* cmp, + GList* items); +__attribute__((__deprecated__)) +void g_completion_clear_items (GCompletion* cmp); +__attribute__((__deprecated__)) +GList* g_completion_complete (GCompletion* cmp, + const gchar* prefix, + gchar** new_prefix); +__attribute__((__deprecated__)) +GList* g_completion_complete_utf8 (GCompletion *cmp, + const gchar* prefix, + gchar** new_prefix); +__attribute__((__deprecated__)) +void g_completion_set_compare (GCompletion *cmp, + GCompletionStrncmpFunc strncmp_func); +__attribute__((__deprecated__)) +void g_completion_free (GCompletion* cmp); + + +# 106 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/deprecated/gmain.h" 1 +# 34 "/usr/include/glib-2.0/glib/deprecated/gmain.h" +# 1 "/usr/include/glib-2.0/glib/gmain.h" 1 +# 35 "/usr/include/glib-2.0/glib/deprecated/gmain.h" 2 + + +# 136 "/usr/include/glib-2.0/glib/deprecated/gmain.h" + +# 107 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/deprecated/grel.h" 1 +# 34 "/usr/include/glib-2.0/glib/deprecated/grel.h" +# 1 "/usr/include/glib-2.0/glib/gtypes.h" 1 +# 35 "/usr/include/glib-2.0/glib/deprecated/grel.h" 2 + + + +typedef struct _GRelation GRelation; +typedef struct _GTuples GTuples; + +struct _GTuples +{ + guint len; +}; +# 69 "/usr/include/glib-2.0/glib/deprecated/grel.h" +__attribute__((__deprecated__)) +GRelation* g_relation_new (gint fields); +__attribute__((__deprecated__)) +void g_relation_destroy (GRelation *relation); +__attribute__((__deprecated__)) +void g_relation_index (GRelation *relation, + gint field, + GHashFunc hash_func, + GEqualFunc key_equal_func); +__attribute__((__deprecated__)) +void g_relation_insert (GRelation *relation, + ...); +__attribute__((__deprecated__)) +gint g_relation_delete (GRelation *relation, + gconstpointer key, + gint field); +__attribute__((__deprecated__)) +GTuples* g_relation_select (GRelation *relation, + gconstpointer key, + gint field); +__attribute__((__deprecated__)) +gint g_relation_count (GRelation *relation, + gconstpointer key, + gint field); +__attribute__((__deprecated__)) +gboolean g_relation_exists (GRelation *relation, + ...); +__attribute__((__deprecated__)) +void g_relation_print (GRelation *relation); +__attribute__((__deprecated__)) +void g_tuples_destroy (GTuples *tuples); +__attribute__((__deprecated__)) +gpointer g_tuples_index (GTuples *tuples, + gint index_, + gint field); + + +# 108 "/usr/include/glib-2.0/glib.h" 2 +# 1 "/usr/include/glib-2.0/glib/deprecated/gthread.h" 1 +# 34 "/usr/include/glib-2.0/glib/deprecated/gthread.h" +# 1 "/usr/include/glib-2.0/glib/gthread.h" 1 +# 35 "/usr/include/glib-2.0/glib/deprecated/gthread.h" 2 + + + +typedef enum +{ + G_THREAD_PRIORITY_LOW, + G_THREAD_PRIORITY_NORMAL, + G_THREAD_PRIORITY_HIGH, + G_THREAD_PRIORITY_URGENT +} GThreadPriority; + +struct _GThread +{ + + GThreadFunc func; + gpointer data; + gboolean joinable; + GThreadPriority priority; +}; + +typedef struct _GThreadFunctions GThreadFunctions; +struct _GThreadFunctions +{ + GMutex* (*mutex_new) (void); + void (*mutex_lock) (GMutex *mutex); + gboolean (*mutex_trylock) (GMutex *mutex); + void (*mutex_unlock) (GMutex *mutex); + void (*mutex_free) (GMutex *mutex); + GCond* (*cond_new) (void); + void (*cond_signal) (GCond *cond); + void (*cond_broadcast) (GCond *cond); + void (*cond_wait) (GCond *cond, + GMutex *mutex); + gboolean (*cond_timed_wait) (GCond *cond, + GMutex *mutex, + GTimeVal *end_time); + void (*cond_free) (GCond *cond); + GPrivate* (*private_new) (GDestroyNotify destructor); + gpointer (*private_get) (GPrivate *private_key); + void (*private_set) (GPrivate *private_key, + gpointer data); + void (*thread_create) (GThreadFunc func, + gpointer data, + gulong stack_size, + gboolean joinable, + gboolean bound, + GThreadPriority priority, + gpointer thread, + GError **error); + void (*thread_yield) (void); + void (*thread_join) (gpointer thread); + void (*thread_exit) (void); + void (*thread_set_priority)(gpointer thread, + GThreadPriority priority); + void (*thread_self) (gpointer thread); + gboolean (*thread_equal) (gpointer thread1, + gpointer thread2); +}; + +extern GThreadFunctions g_thread_functions_for_glib_use; +extern gboolean g_thread_use_default_impl; + +extern guint64 (*g_thread_gettime) (void); + + +GThread *g_thread_create (GThreadFunc func, + gpointer data, + gboolean joinable, + GError **error); + + +GThread *g_thread_create_full (GThreadFunc func, + gpointer data, + gulong stack_size, + gboolean joinable, + gboolean bound, + GThreadPriority priority, + GError **error); + + +void g_thread_set_priority (GThread *thread, + GThreadPriority priority); + + +void g_thread_foreach (GFunc thread_func, + gpointer user_data); + + +# 1 "/usr/include/pthread.h" 1 3 4 +# 25 "/usr/include/pthread.h" 3 4 +# 1 "/usr/include/sched.h" 1 3 4 +# 30 "/usr/include/sched.h" 3 4 +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 +# 31 "/usr/include/sched.h" 2 3 4 +# 43 "/usr/include/sched.h" 3 4 +# 1 "/usr/include/bits/sched.h" 1 3 4 +# 74 "/usr/include/bits/sched.h" 3 4 +struct sched_param + { + int __sched_priority; + }; + + + + + +extern int clone (int (*__fn) (void *__arg), void *__child_stack, + int __flags, void *__arg, ...) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int unshare (int __flags) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int sched_getcpu (void) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int setns (int __fd, int __nstype) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + + + + + +struct __sched_param + { + int __sched_priority; + }; +# 120 "/usr/include/bits/sched.h" 3 4 +typedef unsigned long int __cpu_mask; + + + + + + +typedef struct +{ + __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; +} cpu_set_t; +# 203 "/usr/include/bits/sched.h" 3 4 + + +extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) + __attribute__ ((__nothrow__ , __leaf__)); +extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); +extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__ , __leaf__)); + + +# 44 "/usr/include/sched.h" 2 3 4 + + + + + + + +extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param) + __attribute__ ((__nothrow__ , __leaf__)); + + +extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int sched_setscheduler (__pid_t __pid, int __policy, + __const struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int sched_yield (void) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__ , __leaf__)); +# 118 "/usr/include/sched.h" 3 4 +extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, + __const cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, + cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__)); + + + +# 26 "/usr/include/pthread.h" 2 3 4 + + + +# 1 "/usr/include/bits/setjmp.h" 1 3 4 +# 29 "/usr/include/bits/setjmp.h" 3 4 +typedef int __jmp_buf[6]; +# 30 "/usr/include/pthread.h" 2 3 4 +# 1 "/usr/include/bits/wordsize.h" 1 3 4 +# 31 "/usr/include/pthread.h" 2 3 4 + + + +enum +{ + PTHREAD_CREATE_JOINABLE, + + PTHREAD_CREATE_DETACHED + +}; + + + +enum +{ + PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_ADAPTIVE_NP + + , + PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL + + + + , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP + +}; + + + + +enum +{ + PTHREAD_MUTEX_STALLED, + PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, + PTHREAD_MUTEX_ROBUST, + PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST +}; + + + + + +enum +{ + PTHREAD_PRIO_NONE, + PTHREAD_PRIO_INHERIT, + PTHREAD_PRIO_PROTECT +}; +# 115 "/usr/include/pthread.h" 3 4 +enum +{ + PTHREAD_RWLOCK_PREFER_READER_NP, + PTHREAD_RWLOCK_PREFER_WRITER_NP, + PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, + PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP +}; +# 147 "/usr/include/pthread.h" 3 4 +enum +{ + PTHREAD_INHERIT_SCHED, + + PTHREAD_EXPLICIT_SCHED + +}; + + + +enum +{ + PTHREAD_SCOPE_SYSTEM, + + PTHREAD_SCOPE_PROCESS + +}; + + + +enum +{ + PTHREAD_PROCESS_PRIVATE, + + PTHREAD_PROCESS_SHARED + +}; +# 182 "/usr/include/pthread.h" 3 4 +struct _pthread_cleanup_buffer +{ + void (*__routine) (void *); + void *__arg; + int __canceltype; + struct _pthread_cleanup_buffer *__prev; +}; + + +enum +{ + PTHREAD_CANCEL_ENABLE, + + PTHREAD_CANCEL_DISABLE + +}; +enum +{ + PTHREAD_CANCEL_DEFERRED, + + PTHREAD_CANCEL_ASYNCHRONOUS + +}; +# 220 "/usr/include/pthread.h" 3 4 + + + + + +extern int pthread_create (pthread_t *__restrict __newthread, + __const pthread_attr_t *__restrict __attr, + void *(*__start_routine) (void *), + void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3))); + + + + + +extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); + + + + + + + +extern int pthread_join (pthread_t __th, void **__thread_return); + + + + +extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + +extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, + __const struct timespec *__abstime); + + + + + + +extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__ , __leaf__)); + + + +extern pthread_t pthread_self (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); + + +extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + +extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_destroy (pthread_attr_t *__attr) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, + int *__detachstate) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, + int __detachstate) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, + size_t *__guardsize) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setguardsize (pthread_attr_t *__attr, + size_t __guardsize) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict + __attr, + struct sched_param *__restrict __param) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, + __const struct sched_param *__restrict + __param) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict + __attr, int *__restrict __policy) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict + __attr, int *__restrict __inherit) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, + int __inherit) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, + int *__restrict __scope) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict + __attr, void **__restrict __stackaddr) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); + + + + + +extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, + void *__stackaddr) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); + + +extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict + __attr, size_t *__restrict __stacksize) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int pthread_attr_setstacksize (pthread_attr_t *__attr, + size_t __stacksize) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, + void **__restrict __stackaddr, + size_t *__restrict __stacksize) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))); + + + + +extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, + size_t __stacksize) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, + size_t __cpusetsize, + __const cpu_set_t *__cpuset) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); + + + +extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr, + size_t __cpusetsize, + cpu_set_t *__cpuset) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); + + + + + +extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); + + + + + + + +extern int pthread_setschedparam (pthread_t __target_thread, int __policy, + __const struct sched_param *__param) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); + + +extern int pthread_getschedparam (pthread_t __target_thread, + int *__restrict __policy, + struct sched_param *__restrict __param) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))); + + +extern int pthread_setschedprio (pthread_t __target_thread, int __prio) + __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern int pthread_getname_np (pthread_t __target_thread, char *__buf, + size_t __buflen) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); + + +extern int pthread_setname_np (pthread_t __target_thread, __const char *__name) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); + + + + + +extern int pthread_getconcurrency (void) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int pthread_setconcurrency (int __level) __attribute__ ((__nothrow__ , __leaf__)); + + + + + + + +extern int pthread_yield (void) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, + __const cpu_set_t *__cpuset) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); + + +extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, + cpu_set_t *__cpuset) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))); +# 478 "/usr/include/pthread.h" 3 4 +extern int pthread_once (pthread_once_t *__once_control, + void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); +# 490 "/usr/include/pthread.h" 3 4 +extern int pthread_setcancelstate (int __state, int *__oldstate); + + + +extern int pthread_setcanceltype (int __type, int *__oldtype); + + +extern int pthread_cancel (pthread_t __th); + + + + +extern void pthread_testcancel (void); + + + + +typedef struct +{ + struct + { + __jmp_buf __cancel_jmp_buf; + int __mask_was_saved; + } __cancel_jmp_buf[1]; + void *__pad[4]; +} __pthread_unwind_buf_t __attribute__ ((__aligned__)); +# 524 "/usr/include/pthread.h" 3 4 +struct __pthread_cleanup_frame +{ + void (*__cancel_routine) (void *); + void *__cancel_arg; + int __do_it; + int __cancel_type; +}; +# 664 "/usr/include/pthread.h" 3 4 +extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf) + __attribute__ ((__regparm__ (1))); +# 676 "/usr/include/pthread.h" 3 4 +extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf) + __attribute__ ((__regparm__ (1))); +# 699 "/usr/include/pthread.h" 3 4 +extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf) + __attribute__ ((__regparm__ (1))); +# 712 "/usr/include/pthread.h" 3 4 +extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf) + __attribute__ ((__regparm__ (1))); + + + +extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf) + __attribute__ ((__regparm__ (1))) __attribute__ ((__noreturn__)) + + __attribute__ ((__weak__)) + + ; + + + +struct __jmp_buf_tag; +extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __attribute__ ((__nothrow__ , __leaf__)); + + + + + +extern int pthread_mutex_init (pthread_mutex_t *__mutex, + __const pthread_mutexattr_t *__mutexattr) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutex_lock (pthread_mutex_t *__mutex) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, + __const struct timespec *__restrict + __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutex_getprioceiling (__const pthread_mutex_t * + __restrict __mutex, + int *__restrict __prioceiling) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, + int __prioceiling, + int *__restrict __old_ceiling) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))); + + + + +extern int pthread_mutex_consistent (pthread_mutex_t *__mutex) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + +extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); +# 790 "/usr/include/pthread.h" 3 4 +extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __pshared) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, + int __pshared) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict + __attr, int *__restrict __kind) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + + + +extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __protocol) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, + int __protocol) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __prioceiling) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, + int __prioceiling) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr, + int *__robustness) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + +extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr, + int *__robustness) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, + int __robustness) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + +extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, + int __robustness) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); +# 872 "/usr/include/pthread.h" 3 4 +extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, + __const pthread_rwlockattr_t *__restrict + __attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, + __const struct timespec *__restrict + __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, + __const struct timespec *__restrict + __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))); + + + +extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + +extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * + __restrict __attr, + int *__restrict __pshared) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, + int __pshared) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t * + __restrict __attr, + int *__restrict __pref) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, + int __pref) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + + + + + +extern int pthread_cond_init (pthread_cond_t *__restrict __cond, + __const pthread_condattr_t *__restrict + __cond_attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_cond_destroy (pthread_cond_t *__cond) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_cond_signal (pthread_cond_t *__cond) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_cond_broadcast (pthread_cond_t *__cond) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex) + __attribute__ ((__nonnull__ (1, 2))); +# 984 "/usr/include/pthread.h" 3 4 +extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex, + __const struct timespec *__restrict + __abstime) __attribute__ ((__nonnull__ (1, 2, 3))); + + + + +extern int pthread_condattr_init (pthread_condattr_t *__attr) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_condattr_destroy (pthread_condattr_t *__attr) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_condattr_getpshared (__const pthread_condattr_t * + __restrict __attr, + int *__restrict __pshared) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, + int __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_condattr_getclock (__const pthread_condattr_t * + __restrict __attr, + __clockid_t *__restrict __clock_id) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_condattr_setclock (pthread_condattr_t *__attr, + __clockid_t __clock_id) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); +# 1028 "/usr/include/pthread.h" 3 4 +extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_destroy (pthread_spinlock_t *__lock) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_lock (pthread_spinlock_t *__lock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_trylock (pthread_spinlock_t *__lock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_spin_unlock (pthread_spinlock_t *__lock) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + + + + +extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, + __const pthread_barrierattr_t *__restrict + __attr, unsigned int __count) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrier_wait (pthread_barrier_t *__barrier) + __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))); + + + +extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * + __restrict __attr, + int *__restrict __pshared) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))); + + +extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, + int __pshared) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); +# 1095 "/usr/include/pthread.h" 3 4 +extern int pthread_key_create (pthread_key_t *__key, + void (*__destr_function) (void *)) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))); + + +extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__)); + + +extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__)); + + +extern int pthread_setspecific (pthread_key_t __key, + __const void *__pointer) __attribute__ ((__nothrow__ , __leaf__)) ; + + + + +extern int pthread_getcpuclockid (pthread_t __thread_id, + __clockid_t *__clock_id) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))); +# 1129 "/usr/include/pthread.h" 3 4 +extern int pthread_atfork (void (*__prepare) (void), + void (*__parent) (void), + void (*__child) (void)) __attribute__ ((__nothrow__ , __leaf__)); + + + + +extern __inline int +__attribute__ ((__nothrow__ , __leaf__)) pthread_equal (pthread_t __thread1, pthread_t __thread2) +{ + return __thread1 == __thread2; +} + + + +# 124 "/usr/include/glib-2.0/glib/deprecated/gthread.h" 2 + + + + +typedef struct +{ + GMutex *mutex; + + + pthread_mutex_t unused; + +} GStaticMutex; +# 144 "/usr/include/glib-2.0/glib/deprecated/gthread.h" + +void g_static_mutex_init (GStaticMutex *mutex); + +void g_static_mutex_free (GStaticMutex *mutex); +GMutex *g_static_mutex_get_mutex_impl (GStaticMutex *mutex); + +typedef struct _GStaticRecMutex GStaticRecMutex; +struct _GStaticRecMutex +{ + + GStaticMutex mutex; + guint depth; + + + union { + + + + pthread_t owner; + + gdouble dummy; + } unused; +}; + + + +void g_static_rec_mutex_init (GStaticRecMutex *mutex); + + +void g_static_rec_mutex_lock (GStaticRecMutex *mutex); + + +gboolean g_static_rec_mutex_trylock (GStaticRecMutex *mutex); + + +void g_static_rec_mutex_unlock (GStaticRecMutex *mutex); + + +void g_static_rec_mutex_lock_full (GStaticRecMutex *mutex, + guint depth); + + +guint g_static_rec_mutex_unlock_full (GStaticRecMutex *mutex); + + +void g_static_rec_mutex_free (GStaticRecMutex *mutex); + +typedef struct _GStaticRWLock GStaticRWLock; +struct _GStaticRWLock +{ + + GStaticMutex mutex; + GCond *read_cond; + GCond *write_cond; + guint read_counter; + gboolean have_writer; + guint want_to_read; + guint want_to_write; +}; + + + + +void g_static_rw_lock_init (GStaticRWLock *lock); + + +void g_static_rw_lock_reader_lock (GStaticRWLock *lock); + + +gboolean g_static_rw_lock_reader_trylock (GStaticRWLock *lock); + + +void g_static_rw_lock_reader_unlock (GStaticRWLock *lock); + + +void g_static_rw_lock_writer_lock (GStaticRWLock *lock); + + +gboolean g_static_rw_lock_writer_trylock (GStaticRWLock *lock); + + +void g_static_rw_lock_writer_unlock (GStaticRWLock *lock); + + +void g_static_rw_lock_free (GStaticRWLock *lock); + + +GPrivate * g_private_new (GDestroyNotify notify); + +typedef struct _GStaticPrivate GStaticPrivate; +struct _GStaticPrivate +{ + + guint index; +}; + + + +void g_static_private_init (GStaticPrivate *private_key); + + +gpointer g_static_private_get (GStaticPrivate *private_key); + + +void g_static_private_set (GStaticPrivate *private_key, + gpointer data, + GDestroyNotify notify); + + +void g_static_private_free (GStaticPrivate *private_key); + + +gboolean g_once_init_enter_impl (volatile gsize *location); + + +void g_thread_init (gpointer vtable); + +void g_thread_init_with_errorcheck_mutexes (gpointer vtable); + + +gboolean g_thread_get_initialized (void); + +extern gboolean g_threads_got_initialized; + + + + +GMutex * g_mutex_new (void); + +void g_mutex_free (GMutex *mutex); + +GCond * g_cond_new (void); + +void g_cond_free (GCond *cond); + +gboolean g_cond_timed_wait (GCond *cond, + GMutex *mutex, + GTimeVal *timeval); + + +# 109 "/usr/include/glib-2.0/glib.h" 2 +# 40 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 + + + + + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-os-posix.h" 1 +# 29 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-os-posix.h" +void os_set_line_buffering(void); +void os_set_proc_name(const char *s); +void os_setup_signal_handling(void); +void os_daemonize(void); +void os_setup_post(void); + +typedef struct timeval qemu_timeval; +# 46 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-os-posix.h" +typedef struct timespec qemu_timespec; +int qemu_utimens(const char *path, const qemu_timespec *times); +# 47 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 +# 91 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" +# 1 "/usr/include/sys/uio.h" 1 3 4 +# 26 "/usr/include/sys/uio.h" 3 4 + + + +# 1 "/usr/include/bits/uio.h" 1 3 4 +# 55 "/usr/include/bits/uio.h" 3 4 + + + +extern ssize_t process_vm_readv (pid_t __pid, __const struct iovec *__lvec, + unsigned long int __liovcnt, + __const struct iovec *__rvec, + unsigned long int __riovcnt, + unsigned long int __flags) + __attribute__ ((__nothrow__ , __leaf__)); + + +extern ssize_t process_vm_writev (pid_t __pid, __const struct iovec *__lvec, + unsigned long int __liovcnt, + __const struct iovec *__rvec, + unsigned long int __riovcnt, + unsigned long int __flags) + __attribute__ ((__nothrow__ , __leaf__)); + + +# 30 "/usr/include/sys/uio.h" 2 3 4 +# 40 "/usr/include/sys/uio.h" 3 4 +extern ssize_t readv (int __fd, __const struct iovec *__iovec, int __count) + __attribute__ ((__warn_unused_result__)); +# 51 "/usr/include/sys/uio.h" 3 4 +extern ssize_t writev (int __fd, __const struct iovec *__iovec, int __count) + __attribute__ ((__warn_unused_result__)); +# 82 "/usr/include/sys/uio.h" 3 4 +extern ssize_t preadv (int __fd, __const struct iovec *__iovec, int __count, __off64_t __offset) __asm__ ("" "preadv64") + + __attribute__ ((__warn_unused_result__)); +extern ssize_t pwritev (int __fd, __const struct iovec *__iovec, int __count, __off64_t __offset) __asm__ ("" "pwritev64") + + __attribute__ ((__warn_unused_result__)); +# 104 "/usr/include/sys/uio.h" 3 4 +extern ssize_t preadv64 (int __fd, __const struct iovec *__iovec, int __count, + __off64_t __offset) __attribute__ ((__warn_unused_result__)); +# 116 "/usr/include/sys/uio.h" 3 4 +extern ssize_t pwritev64 (int __fd, __const struct iovec *__iovec, int __count, + __off64_t __offset) __attribute__ ((__warn_unused_result__)); + + + + +# 92 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 + + +typedef int (*fprintf_function)(FILE *f, const char *fmt, ...) + __attribute__((format(gnu_printf, 2, 3))); +# 115 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" +void configure_icount(const char *option); +extern int use_icount; +# 126 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" 1 +# 127 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 +# 135 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" +void qemu_get_timedate(struct tm *tm, int offset); +int qemu_timedate_diff(struct tm *tm); + + +void pstrcpy(char *buf, int buf_size, const char *str); +char *pstrcat(char *buf, int buf_size, const char *s); +int strstart(const char *str, const char *val, const char **ptr); +int stristart(const char *str, const char *val, const char **ptr); +int qemu_strnlen(const char *s, int max_len); +time_t mktimegm(struct tm *tm); +int qemu_fls(int i); +int qemu_fdatasync(int fd); +int fcntl_setfl(int fd, int flag); +int qemu_parse_fd(const char *param); +# 162 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" +int64_t strtosz(const char *nptr, char **end); +int64_t strtosz_suffix(const char *nptr, char **end, const char default_suffix); +int64_t strtosz_suffix_unit(const char *nptr, char **end, + const char default_suffix, int64_t unit); + + +void init_paths(const char *prefix); +const char *path(const char *pathname); +# 187 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" +void *qemu_oom_check(void *ptr); + +int qemu_open(const char *name, int flags, ...); +ssize_t qemu_write_full(int fd, const void *buf, size_t count) + __attribute__((warn_unused_result)); +ssize_t qemu_send_full(int fd, const void *buf, size_t count, int flags) + __attribute__((warn_unused_result)); +ssize_t qemu_recv_full(int fd, void *buf, size_t count, int flags) + __attribute__((warn_unused_result)); + + +int qemu_eventfd(int pipefd[2]); +int qemu_pipe(int pipefd[2]); +# 208 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" +int qemu_recvv(int sockfd, struct iovec *iov, int len, int iov_offset); +int qemu_sendv(int sockfd, struct iovec *iov, int len, int iov_offset); + + + +void __attribute__ ((__noreturn__)) hw_error(const char *fmt, ...) __attribute__((format(gnu_printf, 1, 2))); + +struct ParallelIOArg { + void *buffer; + int count; +}; + +typedef int (*DMA_transfer_handler) (void *opaque, int nchan, int pos, int size); + + + +typedef struct NICInfo NICInfo; +typedef struct HCIInfo HCIInfo; +typedef struct AudioState AudioState; +typedef struct BlockDriverState BlockDriverState; +typedef struct DriveInfo DriveInfo; +typedef struct DisplayState DisplayState; +typedef struct DisplayChangeListener DisplayChangeListener; +typedef struct DisplaySurface DisplaySurface; +typedef struct DisplayAllocator DisplayAllocator; +typedef struct PixelFormat PixelFormat; +typedef struct TextConsole TextConsole; +typedef TextConsole QEMUConsole; +typedef struct CharDriverState CharDriverState; +typedef struct MACAddr MACAddr; +typedef struct VLANState VLANState; +typedef struct VLANClientState VLANClientState; +typedef struct i2c_bus i2c_bus; +typedef struct ISABus ISABus; +typedef struct SMBusDevice SMBusDevice; +typedef struct PCIHostState PCIHostState; +typedef struct PCIExpressHost PCIExpressHost; +typedef struct PCIBus PCIBus; +typedef struct PCIDevice PCIDevice; +typedef struct PCIExpressDevice PCIExpressDevice; +typedef struct PCIBridge PCIBridge; +typedef struct PCIEAERMsg PCIEAERMsg; +typedef struct PCIEAERLog PCIEAERLog; +typedef struct PCIEAERErr PCIEAERErr; +typedef struct PCIEPort PCIEPort; +typedef struct PCIESlot PCIESlot; +typedef struct SerialState SerialState; +typedef struct IRQState *qemu_irq; +typedef struct PCMCIACardState PCMCIACardState; +typedef struct MouseTransformInfo MouseTransformInfo; +typedef struct uWireSlave uWireSlave; +typedef struct I2SCodec I2SCodec; +typedef struct SSIBus SSIBus; +typedef struct EventNotifier EventNotifier; +typedef struct VirtIODevice VirtIODevice; +typedef struct QEMUSGList QEMUSGList; +typedef struct SHPCDevice SHPCDevice; + +typedef uint64_t pcibus_t; + +typedef enum LostTickPolicy { + LOST_TICK_DISCARD, + LOST_TICK_DELAY, + LOST_TICK_MERGE, + LOST_TICK_SLEW, + LOST_TICK_MAX +} LostTickPolicy; + +void tcg_exec_init(unsigned long tb_size); +_Bool tcg_enabled(void); + +void cpu_exec_init_all(void); + + +void cpu_save(QEMUFile *f, void *opaque); +int cpu_load(QEMUFile *f, void *opaque, int version_id); + + +void qemu_cpu_kick(void *env); +void qemu_cpu_kick_self(void); +int qemu_cpu_is_self(void *env); +_Bool all_cpu_threads_idle(void); + + +struct qemu_work_item { + struct qemu_work_item *next; + void (*func)(void *data); + void *data; + int done; +}; + + + + +void qemu_init_vcpu(void *env); + + + + + + +int qemu_co_sendv(int sockfd, struct iovec *iov, + int len, int iov_offset); + + + + + +int qemu_co_recvv(int sockfd, struct iovec *iov, + int len, int iov_offset); + + + + + +int qemu_co_send(int sockfd, void *buf, int len); + + + + + +int qemu_co_recv(int sockfd, void *buf, int len); + + +typedef struct QEMUIOVector { + struct iovec *iov; + int niov; + int nalloc; + size_t size; +} QEMUIOVector; + +void qemu_iovec_init(QEMUIOVector *qiov, int alloc_hint); +void qemu_iovec_init_external(QEMUIOVector *qiov, struct iovec *iov, int niov); +void qemu_iovec_add(QEMUIOVector *qiov, void *base, size_t len); +void qemu_iovec_copy(QEMUIOVector *dst, QEMUIOVector *src, uint64_t skip, + size_t size); +void qemu_iovec_concat(QEMUIOVector *dst, QEMUIOVector *src, size_t size); +void qemu_iovec_destroy(QEMUIOVector *qiov); +void qemu_iovec_reset(QEMUIOVector *qiov); +void qemu_iovec_to_buffer(QEMUIOVector *qiov, void *buf); +void qemu_iovec_from_buffer(QEMUIOVector *qiov, const void *buf, size_t count); +void qemu_iovec_memset(QEMUIOVector *qiov, int c, size_t count); +void qemu_iovec_memset_skip(QEMUIOVector *qiov, int c, size_t count, + size_t skip); + +_Bool buffer_is_zero(const void *buf, size_t len); + +void qemu_progress_init(int enabled, float min_skip); +void qemu_progress_end(void); +void qemu_progress_print(float delta, int max); + + + +char *qemu_find_file(int type, const char *name); + + +void os_setup_early_signal_handling(void); +char *os_find_datadir(const char *argv0); +void os_parse_cmd_args(int index, const char *optarg); +void os_pidfile_error(void); + + +static inline uint8_t to_bcd(uint8_t val) +{ + return ((val / 10) << 4) | (val % 10); +} + +static inline uint8_t from_bcd(uint8_t val) +{ + return ((val >> 4) * 10) + (val & 0x0f); +} + + +static inline uint64_t muldiv64(uint64_t a, uint32_t b, uint32_t c) +{ + union { + uint64_t ll; + struct { + + + + uint32_t low, high; + + } l; + } u, res; + uint64_t rl, rh; + + u.ll = a; + rl = (uint64_t)u.l.low * (uint64_t)b; + rh = (uint64_t)u.l.high * (uint64_t)b; + rh += (rl >> 32); + res.l.high = rh / c; + res.l.low = (((rh % c) << 32) + (rl & 0xffffffff)) / c; + return res.ll; +} + + + + + + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/module.h" 1 +# 23 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/module.h" +typedef enum { + MODULE_INIT_BLOCK, + MODULE_INIT_MACHINE, + MODULE_INIT_QAPI, + MODULE_INIT_QOM, + MODULE_INIT_MAX +} module_init_type; + + + + + + +void register_module_init(void (*fn)(void), module_init_type type); + +void module_call_init(module_init_type type); +# 411 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 2 +# 24 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" 2 +# 47 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-defs.h" 1 +# 26 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-defs.h" +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/config.h" 1 +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/config-host.h" 1 +# 2 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/config.h" 2 +# 1 "./config-target.h" 1 +# 2 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/config.h" 2 +# 27 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-defs.h" 2 +# 1 "/usr/include/setjmp.h" 1 3 4 +# 28 "/usr/include/setjmp.h" 3 4 + + + +# 1 "/usr/include/bits/sigset.h" 1 3 4 +# 32 "/usr/include/setjmp.h" 2 3 4 + + + +struct __jmp_buf_tag + { + + + + + __jmp_buf __jmpbuf; + int __mask_was_saved; + __sigset_t __saved_mask; + }; + + + + +typedef struct __jmp_buf_tag jmp_buf[1]; + + + +extern int setjmp (jmp_buf __env) __attribute__ ((__nothrow__)); + + + + + + +extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __attribute__ ((__nothrow__)); + + + + +extern int _setjmp (struct __jmp_buf_tag __env[1]) __attribute__ ((__nothrow__)); +# 78 "/usr/include/setjmp.h" 3 4 + + + + +extern void longjmp (struct __jmp_buf_tag __env[1], int __val) + __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + + + + + +extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) + __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + + + + + +typedef struct __jmp_buf_tag sigjmp_buf[1]; +# 110 "/usr/include/setjmp.h" 3 4 +extern void siglongjmp (sigjmp_buf __env, int __val) + __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__)); + + + + + +# 1 "/usr/include/bits/setjmp2.h" 1 3 4 +# 26 "/usr/include/bits/setjmp2.h" 3 4 +extern void longjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) + + __attribute__ ((__noreturn__)); +extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) + + __attribute__ ((__noreturn__)); +extern void siglongjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) + + __attribute__ ((__noreturn__)); +# 118 "/usr/include/setjmp.h" 2 3 4 + + + +# 28 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-defs.h" 2 + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/osdep.h" 1 + + + + +# 1 "/usr/lib/gcc/i686-pc-linux-gnu/4.6.3/include/stddef.h" 1 3 4 +# 6 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/osdep.h" 2 +# 82 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/osdep.h" +int qemu_daemon(int nochdir, int noclose); +void *qemu_memalign(size_t alignment, size_t size); +void *qemu_vmalloc(size_t size); +void qemu_vfree(void *ptr); +# 120 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/osdep.h" +int qemu_madvise(void *addr, size_t len, int advice); +# 130 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/osdep.h" +int qemu_create_pidfile(const char *filename); +int qemu_get_thread_id(void); +# 150 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/osdep.h" +void qemu_set_cloexec(int fd); +# 31 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-defs.h" 2 +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-queue.h" 1 +# 81 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-queue.h" +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-barrier.h" 1 +# 82 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-queue.h" 2 +# 32 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-defs.h" 2 +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/targphys.h" 1 +# 15 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/targphys.h" +typedef uint64_t target_phys_addr_t; +# 33 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-defs.h" 2 + + + + + + + +typedef int16_t target_short __attribute__ ((aligned(2))); +typedef uint16_t target_ushort __attribute__((aligned(2))); +typedef int32_t target_int __attribute__((aligned(4))); +typedef uint32_t target_uint __attribute__((aligned(4))); +typedef int64_t target_llong __attribute__((aligned(8))); +typedef uint64_t target_ullong __attribute__((aligned(8))); + + +typedef int32_t target_long __attribute__((aligned(4))); +typedef uint32_t target_ulong __attribute__((aligned(4))); +# 89 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-defs.h" +typedef struct CPUTLBEntry { + + + + + + + target_ulong addr_read; + target_ulong addr_write; + target_ulong addr_code; + + + uintptr_t addend; + + uint8_t dummy[(1 << 4) - + (sizeof(target_ulong) * 3 + + ((-sizeof(target_ulong) * 3) & (sizeof(uintptr_t) - 1)) + + sizeof(uintptr_t))]; +} CPUTLBEntry; + +extern int CPUTLBEntry_wrong_size[sizeof(CPUTLBEntry) == (1 << 4) ? 1 : -1]; +# 131 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-defs.h" +typedef struct icount_decr_u16 { + uint16_t low; + uint16_t high; +} icount_decr_u16; + + +struct kvm_run; +struct KVMState; +struct qemu_work_item; + +typedef struct CPUBreakpoint { + target_ulong pc; + int flags; + struct { struct CPUBreakpoint *tqe_next; struct CPUBreakpoint * *tqe_prev; } entry; +} CPUBreakpoint; + +typedef struct CPUWatchpoint { + target_ulong vaddr; + target_ulong len_mask; + int flags; + struct { struct CPUWatchpoint *tqe_next; struct CPUWatchpoint * *tqe_prev; } entry; +} CPUWatchpoint; +# 48 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" 2 + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu/softfloat.h" 1 +# 46 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu/softfloat.h" +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/config-host.h" 1 +# 47 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu/softfloat.h" 2 +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/osdep.h" 1 +# 48 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu/softfloat.h" 2 +# 57 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu/softfloat.h" +typedef uint8_t flag; +typedef uint8_t uint8; +typedef int8_t int8; +typedef unsigned int uint32; +typedef signed int int32; +typedef uint64_t uint64; +typedef int64_t int64; +# 75 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu/softfloat.h" +enum { + float_relation_less = -1, + float_relation_equal = 0, + float_relation_greater = 1, + float_relation_unordered = 2 +}; +# 111 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu/softfloat.h" +typedef uint16_t float16; +typedef uint32_t float32; +typedef uint64_t float64; +# 124 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu/softfloat.h" +typedef struct { + uint64_t low; + uint16_t high; +} floatx80; + + +typedef struct { + + + + uint64_t low, high; + +} float128; + + + + + + +enum { + float_tininess_after_rounding = 0, + float_tininess_before_rounding = 1 +}; + + + + +enum { + float_round_nearest_even = 0, + float_round_down = 1, + float_round_up = 2, + float_round_to_zero = 3 +}; + + + + +enum { + float_flag_invalid = 1, + float_flag_divbyzero = 4, + float_flag_overflow = 8, + float_flag_underflow = 16, + float_flag_inexact = 32, + float_flag_input_denormal = 64, + float_flag_output_denormal = 128 +}; + +typedef struct float_status { + signed char float_detect_tininess; + signed char float_rounding_mode; + signed char float_exception_flags; + signed char floatx80_rounding_precision; + + flag flush_to_zero; + + flag flush_inputs_to_zero; + flag default_nan_mode; +} float_status; + +void set_float_rounding_mode(int val , float_status *status); +void set_float_exception_flags(int val , float_status *status); +static __attribute__ (( always_inline )) __inline__ void set_float_detect_tininess(int val , float_status *status) +{ + status->float_detect_tininess = val; +} +static __attribute__ (( always_inline )) __inline__ void set_flush_to_zero(flag val , float_status *status) +{ + status->flush_to_zero = val; +} +static __attribute__ (( always_inline )) __inline__ void set_flush_inputs_to_zero(flag val , float_status *status) +{ + status->flush_inputs_to_zero = val; +} +static __attribute__ (( always_inline )) __inline__ void set_default_nan_mode(flag val , float_status *status) +{ + status->default_nan_mode = val; +} +static __attribute__ (( always_inline )) __inline__ int get_float_exception_flags(float_status *status) +{ + return status->float_exception_flags; +} +void set_floatx80_rounding_precision(int val , float_status *status); + + + + + +void float_raise( int8 flags , float_status *status); + + + + + + + +enum { + float_muladd_negate_c = 1, + float_muladd_negate_product = 2, + float_muladd_negate_result = 3, +}; + + + + +float32 int32_to_float32( int32 , float_status *status ); +float64 int32_to_float64( int32 , float_status *status ); +float32 uint32_to_float32( uint32 , float_status *status ); +float64 uint32_to_float64( uint32 , float_status *status ); +floatx80 int32_to_floatx80( int32 , float_status *status ); +float128 int32_to_float128( int32 , float_status *status ); +float32 int64_to_float32( int64 , float_status *status ); +float32 uint64_to_float32( uint64 , float_status *status ); +float64 int64_to_float64( int64 , float_status *status ); +float64 uint64_to_float64( uint64 , float_status *status ); +floatx80 int64_to_floatx80( int64 , float_status *status ); +float128 int64_to_float128( int64 , float_status *status ); + + + + +float16 float32_to_float16( float32, flag , float_status *status ); +float32 float16_to_float32( float16, flag , float_status *status ); + + + + +int float16_is_quiet_nan( float16 ); +int float16_is_signaling_nan( float16 ); +float16 float16_maybe_silence_nan( float16 ); + + + + +extern const float16 float16_default_nan; + + + + +int_fast16_t float32_to_int16_round_to_zero(float32 , float_status *status); +uint_fast16_t float32_to_uint16_round_to_zero(float32 , float_status *status); +int32 float32_to_int32( float32 , float_status *status ); +int32 float32_to_int32_round_to_zero( float32 , float_status *status ); +uint32 float32_to_uint32( float32 , float_status *status ); +uint32 float32_to_uint32_round_to_zero( float32 , float_status *status ); +int64 float32_to_int64( float32 , float_status *status ); +int64 float32_to_int64_round_to_zero( float32 , float_status *status ); +float64 float32_to_float64( float32 , float_status *status ); +floatx80 float32_to_floatx80( float32 , float_status *status ); +float128 float32_to_float128( float32 , float_status *status ); + + + + +float32 float32_round_to_int( float32 , float_status *status ); +float32 float32_add( float32, float32 , float_status *status ); +float32 float32_sub( float32, float32 , float_status *status ); +float32 float32_mul( float32, float32 , float_status *status ); +float32 float32_div( float32, float32 , float_status *status ); +float32 float32_rem( float32, float32 , float_status *status ); +float32 float32_muladd(float32, float32, float32, int , float_status *status); +float32 float32_sqrt( float32 , float_status *status ); +float32 float32_exp2( float32 , float_status *status ); +float32 float32_log2( float32 , float_status *status ); +int float32_eq( float32, float32 , float_status *status ); +int float32_le( float32, float32 , float_status *status ); +int float32_lt( float32, float32 , float_status *status ); +int float32_unordered( float32, float32 , float_status *status ); +int float32_eq_quiet( float32, float32 , float_status *status ); +int float32_le_quiet( float32, float32 , float_status *status ); +int float32_lt_quiet( float32, float32 , float_status *status ); +int float32_unordered_quiet( float32, float32 , float_status *status ); +int float32_compare( float32, float32 , float_status *status ); +int float32_compare_quiet( float32, float32 , float_status *status ); +float32 float32_min(float32, float32 , float_status *status); +float32 float32_max(float32, float32 , float_status *status); +int float32_is_quiet_nan( float32 ); +int float32_is_signaling_nan( float32 ); +float32 float32_maybe_silence_nan( float32 ); +float32 float32_scalbn( float32, int , float_status *status ); + +static __attribute__ (( always_inline )) __inline__ float32 float32_abs(float32 a) +{ + + + + return ((a) & 0x7fffffff); +} + +static __attribute__ (( always_inline )) __inline__ float32 float32_chs(float32 a) +{ + + + + return ((a) ^ 0x80000000); +} + +static __attribute__ (( always_inline )) __inline__ int float32_is_infinity(float32 a) +{ + return ((a) & 0x7fffffff) == 0x7f800000; +} + +static __attribute__ (( always_inline )) __inline__ int float32_is_neg(float32 a) +{ + return (a) >> 31; +} + +static __attribute__ (( always_inline )) __inline__ int float32_is_zero(float32 a) +{ + return ((a) & 0x7fffffff) == 0; +} + +static __attribute__ (( always_inline )) __inline__ int float32_is_any_nan(float32 a) +{ + return (((a) & ~(1 << 31)) > 0x7f800000UL); +} + +static __attribute__ (( always_inline )) __inline__ int float32_is_zero_or_denormal(float32 a) +{ + return ((a) & 0x7f800000) == 0; +} + +static __attribute__ (( always_inline )) __inline__ float32 float32_set_sign(float32 a, int sign) +{ + return (((a) & 0x7fffffff) | (sign << 31)); +} +# 361 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu/softfloat.h" +extern const float32 float32_default_nan; + + + + +int_fast16_t float64_to_int16_round_to_zero(float64 , float_status *status); +uint_fast16_t float64_to_uint16_round_to_zero(float64 , float_status *status); +int32 float64_to_int32( float64 , float_status *status ); +int32 float64_to_int32_round_to_zero( float64 , float_status *status ); +uint32 float64_to_uint32( float64 , float_status *status ); +uint32 float64_to_uint32_round_to_zero( float64 , float_status *status ); +int64 float64_to_int64( float64 , float_status *status ); +int64 float64_to_int64_round_to_zero( float64 , float_status *status ); +uint64 float64_to_uint64 (float64 a , float_status *status); +uint64 float64_to_uint64_round_to_zero (float64 a , float_status *status); +float32 float64_to_float32( float64 , float_status *status ); +floatx80 float64_to_floatx80( float64 , float_status *status ); +float128 float64_to_float128( float64 , float_status *status ); + + + + +float64 float64_round_to_int( float64 , float_status *status ); +float64 float64_trunc_to_int( float64 , float_status *status ); +float64 float64_add( float64, float64 , float_status *status ); +float64 float64_sub( float64, float64 , float_status *status ); +float64 float64_mul( float64, float64 , float_status *status ); +float64 float64_div( float64, float64 , float_status *status ); +float64 float64_rem( float64, float64 , float_status *status ); +float64 float64_muladd(float64, float64, float64, int , float_status *status); +float64 float64_sqrt( float64 , float_status *status ); +float64 float64_log2( float64 , float_status *status ); +int float64_eq( float64, float64 , float_status *status ); +int float64_le( float64, float64 , float_status *status ); +int float64_lt( float64, float64 , float_status *status ); +int float64_unordered( float64, float64 , float_status *status ); +int float64_eq_quiet( float64, float64 , float_status *status ); +int float64_le_quiet( float64, float64 , float_status *status ); +int float64_lt_quiet( float64, float64 , float_status *status ); +int float64_unordered_quiet( float64, float64 , float_status *status ); +int float64_compare( float64, float64 , float_status *status ); +int float64_compare_quiet( float64, float64 , float_status *status ); +float64 float64_min(float64, float64 , float_status *status); +float64 float64_max(float64, float64 , float_status *status); +int float64_is_quiet_nan( float64 a ); +int float64_is_signaling_nan( float64 ); +float64 float64_maybe_silence_nan( float64 ); +float64 float64_scalbn( float64, int , float_status *status ); + +static __attribute__ (( always_inline )) __inline__ float64 float64_abs(float64 a) +{ + + + + return ((a) & 0x7fffffffffffffffLL); +} + +static __attribute__ (( always_inline )) __inline__ float64 float64_chs(float64 a) +{ + + + + return ((a) ^ 0x8000000000000000LL); +} + +static __attribute__ (( always_inline )) __inline__ int float64_is_infinity(float64 a) +{ + return ((a) & 0x7fffffffffffffffLL ) == 0x7ff0000000000000LL; +} + +static __attribute__ (( always_inline )) __inline__ int float64_is_neg(float64 a) +{ + return (a) >> 63; +} + +static __attribute__ (( always_inline )) __inline__ int float64_is_zero(float64 a) +{ + return ((a) & 0x7fffffffffffffffLL) == 0; +} + +static __attribute__ (( always_inline )) __inline__ int float64_is_any_nan(float64 a) +{ + return (((a) & ~(1ULL << 63)) > 0x7ff0000000000000ULL); +} + +static __attribute__ (( always_inline )) __inline__ int float64_is_zero_or_denormal(float64 a) +{ + return ((a) & 0x7ff0000000000000LL) == 0; +} + +static __attribute__ (( always_inline )) __inline__ float64 float64_set_sign(float64 a, int sign) +{ + return (((a) & 0x7fffffffffffffffULL) | ((int64_t)sign << 63)) + ; +} +# 467 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu/softfloat.h" +extern const float64 float64_default_nan; + + + + +int32 floatx80_to_int32( floatx80 , float_status *status ); +int32 floatx80_to_int32_round_to_zero( floatx80 , float_status *status ); +int64 floatx80_to_int64( floatx80 , float_status *status ); +int64 floatx80_to_int64_round_to_zero( floatx80 , float_status *status ); +float32 floatx80_to_float32( floatx80 , float_status *status ); +float64 floatx80_to_float64( floatx80 , float_status *status ); +float128 floatx80_to_float128( floatx80 , float_status *status ); + + + + +floatx80 floatx80_round_to_int( floatx80 , float_status *status ); +floatx80 floatx80_add( floatx80, floatx80 , float_status *status ); +floatx80 floatx80_sub( floatx80, floatx80 , float_status *status ); +floatx80 floatx80_mul( floatx80, floatx80 , float_status *status ); +floatx80 floatx80_div( floatx80, floatx80 , float_status *status ); +floatx80 floatx80_rem( floatx80, floatx80 , float_status *status ); +floatx80 floatx80_sqrt( floatx80 , float_status *status ); +int floatx80_eq( floatx80, floatx80 , float_status *status ); +int floatx80_le( floatx80, floatx80 , float_status *status ); +int floatx80_lt( floatx80, floatx80 , float_status *status ); +int floatx80_unordered( floatx80, floatx80 , float_status *status ); +int floatx80_eq_quiet( floatx80, floatx80 , float_status *status ); +int floatx80_le_quiet( floatx80, floatx80 , float_status *status ); +int floatx80_lt_quiet( floatx80, floatx80 , float_status *status ); +int floatx80_unordered_quiet( floatx80, floatx80 , float_status *status ); +int floatx80_compare( floatx80, floatx80 , float_status *status ); +int floatx80_compare_quiet( floatx80, floatx80 , float_status *status ); +int floatx80_is_quiet_nan( floatx80 ); +int floatx80_is_signaling_nan( floatx80 ); +floatx80 floatx80_maybe_silence_nan( floatx80 ); +floatx80 floatx80_scalbn( floatx80, int , float_status *status ); + +static __attribute__ (( always_inline )) __inline__ floatx80 floatx80_abs(floatx80 a) +{ + a.high &= 0x7fff; + return a; +} + +static __attribute__ (( always_inline )) __inline__ floatx80 floatx80_chs(floatx80 a) +{ + a.high ^= 0x8000; + return a; +} + +static __attribute__ (( always_inline )) __inline__ int floatx80_is_infinity(floatx80 a) +{ + return (a.high & 0x7fff) == 0x7fff && a.low == 0x8000000000000000LL; +} + +static __attribute__ (( always_inline )) __inline__ int floatx80_is_neg(floatx80 a) +{ + return a.high >> 15; +} + +static __attribute__ (( always_inline )) __inline__ int floatx80_is_zero(floatx80 a) +{ + return (a.high & 0x7fff) == 0 && a.low == 0; +} + +static __attribute__ (( always_inline )) __inline__ int floatx80_is_zero_or_denormal(floatx80 a) +{ + return (a.high & 0x7fff) == 0; +} + +static __attribute__ (( always_inline )) __inline__ int floatx80_is_any_nan(floatx80 a) +{ + return ((a.high & 0x7fff) == 0x7fff) && (a.low<<1); +} +# 552 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu/softfloat.h" +extern const floatx80 floatx80_default_nan; + + + + +int32 float128_to_int32( float128 , float_status *status ); +int32 float128_to_int32_round_to_zero( float128 , float_status *status ); +int64 float128_to_int64( float128 , float_status *status ); +int64 float128_to_int64_round_to_zero( float128 , float_status *status ); +float32 float128_to_float32( float128 , float_status *status ); +float64 float128_to_float64( float128 , float_status *status ); +floatx80 float128_to_floatx80( float128 , float_status *status ); + + + + +float128 float128_round_to_int( float128 , float_status *status ); +float128 float128_add( float128, float128 , float_status *status ); +float128 float128_sub( float128, float128 , float_status *status ); +float128 float128_mul( float128, float128 , float_status *status ); +float128 float128_div( float128, float128 , float_status *status ); +float128 float128_rem( float128, float128 , float_status *status ); +float128 float128_sqrt( float128 , float_status *status ); +int float128_eq( float128, float128 , float_status *status ); +int float128_le( float128, float128 , float_status *status ); +int float128_lt( float128, float128 , float_status *status ); +int float128_unordered( float128, float128 , float_status *status ); +int float128_eq_quiet( float128, float128 , float_status *status ); +int float128_le_quiet( float128, float128 , float_status *status ); +int float128_lt_quiet( float128, float128 , float_status *status ); +int float128_unordered_quiet( float128, float128 , float_status *status ); +int float128_compare( float128, float128 , float_status *status ); +int float128_compare_quiet( float128, float128 , float_status *status ); +int float128_is_quiet_nan( float128 ); +int float128_is_signaling_nan( float128 ); +float128 float128_maybe_silence_nan( float128 ); +float128 float128_scalbn( float128, int , float_status *status ); + +static __attribute__ (( always_inline )) __inline__ float128 float128_abs(float128 a) +{ + a.high &= 0x7fffffffffffffffLL; + return a; +} + +static __attribute__ (( always_inline )) __inline__ float128 float128_chs(float128 a) +{ + a.high ^= 0x8000000000000000LL; + return a; +} + +static __attribute__ (( always_inline )) __inline__ int float128_is_infinity(float128 a) +{ + return (a.high & 0x7fffffffffffffffLL) == 0x7fff000000000000LL && a.low == 0; +} + +static __attribute__ (( always_inline )) __inline__ int float128_is_neg(float128 a) +{ + return a.high >> 63; +} + +static __attribute__ (( always_inline )) __inline__ int float128_is_zero(float128 a) +{ + return (a.high & 0x7fffffffffffffffLL) == 0 && a.low == 0; +} + +static __attribute__ (( always_inline )) __inline__ int float128_is_zero_or_denormal(float128 a) +{ + return (a.high & 0x7fff000000000000LL) == 0; +} + +static __attribute__ (( always_inline )) __inline__ int float128_is_any_nan(float128 a) +{ + return ((a.high >> 48) & 0x7fff) == 0x7fff && + ((a.low != 0) || ((a.high & 0xffffffffffffLL) != 0)); +} + + + + +extern const float128 float128_default_nan; +# 50 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" 2 +# 489 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" +enum { + CC_OP_DYNAMIC, + CC_OP_EFLAGS, + + CC_OP_MULB, + CC_OP_MULW, + CC_OP_MULL, + CC_OP_MULQ, + + CC_OP_ADDB, + CC_OP_ADDW, + CC_OP_ADDL, + CC_OP_ADDQ, + + CC_OP_ADCB, + CC_OP_ADCW, + CC_OP_ADCL, + CC_OP_ADCQ, + + CC_OP_SUBB, + CC_OP_SUBW, + CC_OP_SUBL, + CC_OP_SUBQ, + + CC_OP_SBBB, + CC_OP_SBBW, + CC_OP_SBBL, + CC_OP_SBBQ, + + CC_OP_LOGICB, + CC_OP_LOGICW, + CC_OP_LOGICL, + CC_OP_LOGICQ, + + CC_OP_INCB, + CC_OP_INCW, + CC_OP_INCL, + CC_OP_INCQ, + + CC_OP_DECB, + CC_OP_DECW, + CC_OP_DECL, + CC_OP_DECQ, + + CC_OP_SHLB, + CC_OP_SHLW, + CC_OP_SHLL, + CC_OP_SHLQ, + + CC_OP_SARB, + CC_OP_SARW, + CC_OP_SARL, + CC_OP_SARQ, + + CC_OP_NB, +}; + +typedef struct SegmentCache { + uint32_t selector; + target_ulong base; + uint32_t limit; + uint32_t flags; +} SegmentCache; + +typedef union { + uint8_t _b[16]; + uint16_t _w[8]; + uint32_t _l[4]; + uint64_t _q[2]; + float32 _s[4]; + float64 _d[2]; +} XMMReg; + +typedef union { + uint8_t _b[8]; + uint16_t _w[4]; + uint32_t _l[2]; + float32 _s[2]; + uint64_t q; +} MMXReg; +# 597 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" +typedef union { + floatx80 d __attribute__((aligned(16))); + MMXReg mmx; +} FPReg; + +typedef struct { + uint64_t base; + uint64_t mask; +} MTRRVar; +# 618 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" +typedef enum TPRAccess { + TPR_ACCESS_READ, + TPR_ACCESS_WRITE, +} TPRAccess; + +typedef struct CPUX86State { + + target_ulong regs[8]; + target_ulong eip; + target_ulong eflags; + + + + + target_ulong cc_src; + target_ulong cc_dst; + uint32_t cc_op; + int32_t df; + uint32_t hflags; + + uint32_t hflags2; + + + SegmentCache segs[6]; + SegmentCache ldt; + SegmentCache tr; + SegmentCache gdt; + SegmentCache idt; + + target_ulong cr[5]; + int32_t a20_mask; + + + unsigned int fpstt; + uint16_t fpus; + uint16_t fpuc; + uint8_t fptags[8]; + FPReg fpregs[8]; + + uint16_t fpop; + uint64_t fpip; + uint64_t fpdp; + + + float_status fp_status; + floatx80 ft0; + + float_status mmx_status; + float_status sse_status; + uint32_t mxcsr; + XMMReg xmm_regs[8]; + XMMReg xmm_t0; + MMXReg mmx_t0; + target_ulong cc_tmp; + + + uint32_t sysenter_cs; + target_ulong sysenter_esp; + target_ulong sysenter_eip; + uint64_t efer; + uint64_t star; + + uint64_t vm_hsave; + uint64_t vm_vmcb; + uint64_t tsc_offset; + uint64_t intercept; + uint16_t intercept_cr_read; + uint16_t intercept_cr_write; + uint16_t intercept_dr_read; + uint16_t intercept_dr_write; + uint32_t intercept_exceptions; + uint8_t v_tpr; + + + + + + + + uint64_t system_time_msr; + uint64_t wall_clock_msr; + uint64_t async_pf_en_msr; + + uint64_t tsc; + uint64_t tsc_deadline; + + uint64_t mcg_status; + uint64_t msr_ia32_misc_enable; + + + int error_code; + int exception_is_int; + target_ulong exception_next_eip; + target_ulong dr[8]; + union { + CPUBreakpoint *cpu_breakpoint[4]; + CPUWatchpoint *cpu_watchpoint[4]; + }; + uint32_t smbase; + int old_exception; + + + uint8_t nmi_injected; + uint8_t nmi_pending; + + struct TranslationBlock *current_tb; uintptr_t mem_io_pc; target_ulong mem_io_vaddr; uint32_t halted; uint32_t interrupt_request; volatile sig_atomic_t exit_request; CPUTLBEntry tlb_table[2][(1 << 8)]; target_phys_addr_t iotlb[2][(1 << 8)]; target_ulong tlb_flush_addr; target_ulong tlb_flush_mask; struct TranslationBlock *tb_jmp_cache[(1 << 12)]; long temp_buf[128]; int64_t icount_extra; union { uint32_t u32; icount_decr_u16 u16; } icount_decr; uint32_t can_do_io; struct breakpoints_head { struct CPUBreakpoint *tqh_first; struct CPUBreakpoint * *tqh_last; } breakpoints; int singlestep_enabled; struct watchpoints_head { struct CPUWatchpoint *tqh_first; struct CPUWatchpoint * *tqh_last; } watchpoints; CPUWatchpoint *watchpoint_hit; struct GDBRegisterState *gdb_regs; jmp_buf jmp_env; int exception_index; struct CPUX86State *next_cpu; int cpu_index; uint32_t host_tid; int numa_node; int nr_cores; int nr_threads; int running; int thread_id; void *opaque; uint32_t created; uint32_t stop; uint32_t stopped; struct QemuThread *thread; struct QemuCond *halt_cond; int thread_kicked; struct qemu_work_item *queued_work_first, *queued_work_last; const char *cpu_model_str; struct KVMState *kvm_state; struct kvm_run *kvm_run; int kvm_fd; int kvm_vcpu_dirty; + + uint64_t pat; + + + uint32_t cpuid_level; + uint32_t cpuid_vendor1; + uint32_t cpuid_vendor2; + uint32_t cpuid_vendor3; + uint32_t cpuid_version; + uint32_t cpuid_features; + uint32_t cpuid_ext_features; + uint32_t cpuid_xlevel; + uint32_t cpuid_model[12]; + uint32_t cpuid_ext2_features; + uint32_t cpuid_ext3_features; + uint32_t cpuid_apic_id; + int cpuid_vendor_override; + + uint32_t cpuid_xlevel2; + uint32_t cpuid_ext4_features; + + uint32_t cpuid_7_0_ebx; + + + uint64_t mtrr_fixed[11]; + uint64_t mtrr_deftype; + MTRRVar mtrr_var[8]; + + + uint32_t mp_state; + int32_t exception_injected; + int32_t interrupt_injected; + uint8_t soft_interrupt; + uint8_t has_error_code; + uint32_t sipi_vector; + uint32_t cpuid_kvm_features; + uint32_t cpuid_svm_features; + _Bool tsc_valid; + int tsc_khz; + void *kvm_xsave_buf; + + + + struct DeviceState *apic_state; + + uint64_t mcg_cap; + uint64_t mcg_ctl; + uint64_t mce_banks[10*4]; + + uint64_t tsc_aux; + + + uint16_t fpus_vmstate; + uint16_t fptag_vmstate; + uint16_t fpregs_format_vmstate; + + uint64_t xstate_bv; + XMMReg ymmh_regs[8]; + + uint64_t xcr0; + + TPRAccess tpr_access_type; +} CPUX86State; + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu-qom.h" 1 +# 23 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu-qom.h" +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/cpu.h" 1 +# 23 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/cpu.h" +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" 1 +# 20 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-queue.h" 1 +# 21 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" 2 + +struct Visitor; +struct Error; + +struct TypeImpl; +typedef struct TypeImpl *Type; + +typedef struct ObjectClass ObjectClass; +typedef struct Object Object; + +typedef struct TypeInfo TypeInfo; + +typedef struct InterfaceClass InterfaceClass; +typedef struct InterfaceInfo InterfaceInfo; +# 202 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +typedef void (ObjectPropertyAccessor)(Object *obj, + struct Visitor *v, + void *opaque, + const char *name, + struct Error **errp); +# 216 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +typedef void (ObjectPropertyRelease)(Object *obj, + const char *name, + void *opaque); + +typedef struct ObjectProperty +{ + gchar *name; + gchar *type; + ObjectPropertyAccessor *get; + ObjectPropertyAccessor *set; + ObjectPropertyRelease *release; + void *opaque; + + struct { struct ObjectProperty *tqe_next; struct ObjectProperty * *tqe_prev; } node; +} ObjectProperty; + + + + + + + +struct ObjectClass +{ + + Type type; +}; +# 259 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +struct Object +{ + + ObjectClass *class; + GSList *interfaces; + struct { struct ObjectProperty *tqh_first; struct ObjectProperty * *tqh_last; } properties; + uint32_t ref; + Object *parent; +}; +# 302 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +struct TypeInfo +{ + const char *name; + const char *parent; + + size_t instance_size; + void (*instance_init)(Object *obj); + void (*instance_finalize)(Object *obj); + + _Bool abstract; + size_t class_size; + + void (*class_init)(ObjectClass *klass, void *data); + void (*class_finalize)(ObjectClass *klass, void *data); + void *class_data; + + InterfaceInfo *interfaces; +}; +# 390 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +struct InterfaceClass +{ + ObjectClass parent_class; +}; +# 405 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +struct InterfaceInfo +{ + const char *type; + + void (*interface_initfn)(ObjectClass *class, void *data); +}; +# 424 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +Object *object_new(const char *typename); +# 436 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +Object *object_new_with_type(Type type); +# 445 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +void object_delete(Object *obj); +# 455 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +void object_initialize_with_type(void *data, Type type); +# 465 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +void object_initialize(void *obj, const char *typename); +# 474 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +void object_finalize(void *obj); +# 486 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +Object *object_dynamic_cast(Object *obj, const char *typename); +# 495 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +Object *object_dynamic_cast_assert(Object *obj, const char *typename); + + + + + + + +ObjectClass *object_get_class(Object *obj); + + + + + + + +const char *object_get_typename(Object *obj); +# 522 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +Type type_register_static(const TypeInfo *info); +# 535 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +Type type_register(const TypeInfo *info); +# 544 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +ObjectClass *object_class_dynamic_cast_assert(ObjectClass *klass, + const char *typename); + +ObjectClass *object_class_dynamic_cast(ObjectClass *klass, + const char *typename); + + + + + + + +const char *object_class_get_name(ObjectClass *klass); + + + + + + + +ObjectClass *object_class_by_name(const char *typename); + +void object_class_foreach(void (*fn)(ObjectClass *klass, void *opaque), + const char *implements_type, _Bool include_abstract, + void *opaque); +# 577 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +GSList *object_class_get_list(const char *implements_type, + _Bool include_abstract); +# 587 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +void object_ref(Object *obj); +# 596 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +void object_unref(Object *obj); +# 618 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +void object_property_add(Object *obj, const char *name, const char *type, + ObjectPropertyAccessor *get, + ObjectPropertyAccessor *set, + ObjectPropertyRelease *release, + void *opaque, struct Error **errp); + +void object_property_del(Object *obj, const char *name, struct Error **errp); + +void object_unparent(Object *obj); +# 638 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +void object_property_get(Object *obj, struct Visitor *v, const char *name, + struct Error **errp); +# 649 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +void object_property_set_str(Object *obj, const char *value, + const char *name, struct Error **errp); +# 662 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +char *object_property_get_str(Object *obj, const char *name, + struct Error **errp); +# 673 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +void object_property_set_link(Object *obj, Object *value, + const char *name, struct Error **errp); +# 686 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +Object *object_property_get_link(Object *obj, const char *name, + struct Error **errp); +# 697 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +void object_property_set_bool(Object *obj, _Bool value, + const char *name, struct Error **errp); +# 709 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +_Bool object_property_get_bool(Object *obj, const char *name, + struct Error **errp); +# 720 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +void object_property_set_int(Object *obj, int64_t value, + const char *name, struct Error **errp); +# 732 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +int64_t object_property_get_int(Object *obj, const char *name, + struct Error **errp); +# 746 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +void object_property_set(Object *obj, struct Visitor *v, const char *name, + struct Error **errp); +# 758 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +void object_property_parse(Object *obj, const char *string, + const char *name, struct Error **errp); +# 770 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +char *object_property_print(Object *obj, const char *name, + struct Error **errp); +# 781 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +const char *object_property_get_type(Object *obj, const char *name, + struct Error **errp); + + + + + + +Object *object_get_root(void); + + + + + + + +gchar *object_get_canonical_path(Object *obj); +# 822 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +Object *object_resolve_path(const char *path, _Bool *ambiguous); +# 842 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +Object *object_resolve_path_type(const char *path, const char *typename, + _Bool *ambiguous); +# 855 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +Object *object_resolve_path_component(Object *parent, gchar *part); +# 874 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +void object_property_add_child(Object *obj, const char *name, + Object *child, struct Error **errp); +# 891 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +void object_property_add_link(Object *obj, const char *name, + const char *type, Object **child, + struct Error **errp); +# 907 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +void object_property_add_str(Object *obj, const char *name, + char *(*get)(Object *, struct Error **), + void (*set)(Object *, const char *, struct Error **), + struct Error **errp); +# 922 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/object.h" +Object *container_get(Object *root, const char *path); +# 24 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/cpu.h" 2 +# 38 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/include/qemu/cpu.h" +typedef struct CPUState CPUState; + + + + + + + +typedef struct CPUClass { + + ObjectClass parent_class; + + + void (*reset)(CPUState *cpu); +} CPUClass; + + + + + + +struct CPUState { + + Object parent_obj; + + + +}; + + + + + + +void cpu_reset(CPUState *cpu); +# 24 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu-qom.h" 2 +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" 1 +# 25 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu-qom.h" 2 +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/error.h" 1 +# 22 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/error.h" +typedef struct Error Error; + + + + + + +void error_set(Error **err, const char *fmt, ...) __attribute__((format(gnu_printf, 2, 3))); + + + + + +_Bool error_is_set(Error **err); + + + + +Error *error_copy(const Error *err); + + + + +const char *error_get_pretty(Error *err); + + + + +const char *error_get_field(Error *err, const char *field); + + + + +void error_set_field(Error *err, const char *field, const char *value); + + + + + + +void error_propagate(Error **dst_err, Error *local_err); + + + + +void error_free(Error *err); + + + + + +_Bool error_is_type(Error *err, const char *fmt); +# 26 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu-qom.h" 2 +# 46 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu-qom.h" +typedef struct X86CPUClass { + + CPUClass parent_class; + + + void (*parent_reset)(CPUState *cpu); +} X86CPUClass; + + + + + + + +typedef struct X86CPU { + + CPUState parent_obj; + + + CPUX86State env; +} X86CPU; + +static __attribute__ (( always_inline )) __inline__ X86CPU *x86_env_get_cpu(CPUX86State *env) +{ + return ((X86CPU *)object_dynamic_cast_assert(((Object *)((({ const typeof(((X86CPU *) 0)->env) *__mptr = (env); (X86CPU *) ((char *) __mptr - __builtin_offsetof (X86CPU, env));})))), ("i386-cpu"))); +} + + + + +void x86_cpu_realize(Object *obj, Error **errp); +# 789 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" 2 + +CPUX86State *cpu_x86_init(const char *cpu_model); +int cpu_x86_exec(CPUX86State *s); +void x86_cpu_list (FILE *f, fprintf_function cpu_fprintf, const char *optarg); +void x86_cpudef_setup(void); +int cpu_x86_support_mca_broadcast(CPUX86State *env); + +int cpu_get_pic_interrupt(CPUX86State *s); + +void cpu_set_ferr(CPUX86State *s); + + + +static __attribute__ (( always_inline )) __inline__ void cpu_x86_load_seg_cache(CPUX86State *env, + int seg_reg, unsigned int selector, + target_ulong base, + unsigned int limit, + unsigned int flags) +{ + SegmentCache *sc; + unsigned int new_hflags; + + sc = &env->segs[seg_reg]; + sc->selector = selector; + sc->base = base; + sc->limit = limit; + sc->flags = flags; + + + { + if (seg_reg == 1) { + + + + + + + + { + + new_hflags = (env->segs[1].flags & (1 << 22)) + >> (22 - 4); + env->hflags = (env->hflags & ~((1 << 4) | (1 << 15))) | + new_hflags; + } + } + new_hflags = (env->segs[2].flags & (1 << 22)) + >> (22 - 5); + if (env->hflags & (1 << 15)) { + + } else if (!(env->cr[0] & (1 << 0)) || + (env->eflags & 0x00020000) || + !(env->hflags & (1 << 4))) { + + + + + + new_hflags |= (1 << 6); + } else { + new_hflags |= ((env->segs[3].base | + env->segs[0].base | + env->segs[2].base) != 0) << + 6; + } + env->hflags = (env->hflags & + ~((1 << 5) | (1 << 6))) | new_hflags; + } +} + +static __attribute__ (( always_inline )) __inline__ void cpu_x86_load_seg_cache_sipi(CPUX86State *env, + int sipi_vector) +{ + env->eip = 0; + cpu_x86_load_seg_cache(env, 1, sipi_vector << 8, + sipi_vector << 12, + env->segs[1].limit, + env->segs[1].flags); + env->halted = 0; +} + +int cpu_x86_get_descr_debug(CPUX86State *env, unsigned int selector, + target_ulong *base, unsigned int *limit, + unsigned int *flags); + + +static __attribute__ (( always_inline )) __inline__ void cpu_x86_set_cpl(CPUX86State *s, int cpl) +{ + + s->hflags = (s->hflags & ~(3 << 0)) | cpl; + + + +} + + + +void cpu_get_fp80(uint64_t *pmant, uint16_t *pexp, floatx80 f); +floatx80 cpu_set_fp80(uint64_t mant, uint16_t upper); + + + + +void cpu_x86_load_seg(CPUX86State *s, int seg_reg, int selector); +void cpu_x86_fsave(CPUX86State *s, target_ulong ptr, int data32); +void cpu_x86_frstor(CPUX86State *s, target_ulong ptr, int data32); + + + + +int cpu_x86_signal_handler(int host_signum, void *pinfo, + void *puc); + + +void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count, + uint32_t *eax, uint32_t *ebx, + uint32_t *ecx, uint32_t *edx); +int cpu_x86_register(X86CPU *cpu, const char *cpu_model); +void cpu_clear_apic_feature(CPUX86State *env); +void host_cpuid(uint32_t function, uint32_t count, + uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx); + + +int cpu_x86_handle_mmu_fault(CPUX86State *env, target_ulong addr, + int is_write, int mmu_idx); + +void cpu_x86_set_a20(CPUX86State *env, int a20_state); + +static __attribute__ (( always_inline )) __inline__ int hw_breakpoint_enabled(unsigned long dr7, int index) +{ + return (dr7 >> (index * 2)) & 3; +} + +static __attribute__ (( always_inline )) __inline__ int hw_breakpoint_type(unsigned long dr7, int index) +{ + return (dr7 >> (16 + (index * 4))) & 3; +} + +static __attribute__ (( always_inline )) __inline__ int hw_breakpoint_len(unsigned long dr7, int index) +{ + int len = ((dr7 >> (18 + (index * 4))) & 3); + return (len == 2) ? 8 : len + 1; +} + +void hw_breakpoint_insert(CPUX86State *env, int index); +void hw_breakpoint_remove(CPUX86State *env, int index); +int check_hw_breakpoints(CPUX86State *env, int force_dr6_update); + + +void cpu_x86_update_cr0(CPUX86State *env, uint32_t new_cr0); +void cpu_x86_update_cr3(CPUX86State *env, target_ulong new_cr3); +void cpu_x86_update_cr4(CPUX86State *env, uint32_t new_cr4); + + +void cpu_smm_update(CPUX86State *env); +uint64_t cpu_get_tsc(CPUX86State *env); +struct CPUX86State *pc_new_cpu(const char *cpu_model); +# 977 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" +static __attribute__ (( always_inline )) __inline__ int cpu_mmu_index (CPUX86State *env) +{ + return (env->hflags & (3 << 0)) == 3 ? 1 : 0; +} +# 1013 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" +void optimize_flags_init(void); +# 1024 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-all.h" 1 +# 22 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-all.h" +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-common.h" 1 +# 23 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-all.h" 2 +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-tls.h" 1 +# 24 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-all.h" 2 +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-common.h" 1 +# 14 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-common.h" +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/bswap.h" 1 + + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/config-host.h" 1 +# 5 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/bswap.h" 2 +# 16 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/bswap.h" +# 1 "/usr/include/byteswap.h" 1 3 4 +# 23 "/usr/include/byteswap.h" 3 4 +# 1 "/usr/include/bits/byteswap.h" 1 3 4 +# 24 "/usr/include/byteswap.h" 2 3 4 +# 17 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/bswap.h" 2 +# 53 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/bswap.h" +static __attribute__ (( always_inline )) __inline__ uint16_t bswap16(uint16_t x) +{ + return (__extension__ ({ register unsigned short int __v, __x = (unsigned short int) (x); if (__builtin_constant_p (__x)) __v = ((unsigned short int) ((((__x) >> 8) & 0xff) | (((__x) & 0xff) << 8))); else __asm__ ("rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); +} + +static __attribute__ (( always_inline )) __inline__ uint32_t bswap32(uint32_t x) +{ + return (__extension__ ({ register unsigned int __v, __x = (x); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ ("rorw $8, %w0;" "rorl $16, %0;" "rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); +} + +static __attribute__ (( always_inline )) __inline__ uint64_t bswap64(uint64_t x) +{ + return (__extension__ ({ union { __extension__ unsigned long long int __ll; unsigned long int __l[2]; } __w, __r; if (__builtin_constant_p (x)) __r.__ll = (__extension__ ((((x) & 0xff00000000000000ull) >> 56) | (((x) & 0x00ff000000000000ull) >> 40) | (((x) & 0x0000ff0000000000ull) >> 24) | (((x) & 0x000000ff00000000ull) >> 8) | (((x) & 0x00000000ff000000ull) << 8) | (((x) & 0x0000000000ff0000ull) << 24) | (((x) & 0x000000000000ff00ull) << 40) | (((x) & 0x00000000000000ffull) << 56))); else { __w.__ll = (x); __r.__l[0] = (__extension__ ({ register unsigned int __v, __x = (__w.__l[1]); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ ("rorw $8, %w0;" "rorl $16, %0;" "rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); __r.__l[1] = (__extension__ ({ register unsigned int __v, __x = (__w.__l[0]); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ ("rorw $8, %w0;" "rorl $16, %0;" "rorw $8, %w0" : "=r" (__v) : "0" (__x) : "cc"); __v; })); } __r.__ll; })); +} + + + +static __attribute__ (( always_inline )) __inline__ void bswap16s(uint16_t *s) +{ + *s = bswap16(*s); +} + +static __attribute__ (( always_inline )) __inline__ void bswap32s(uint32_t *s) +{ + *s = bswap32(*s); +} + +static __attribute__ (( always_inline )) __inline__ void bswap64s(uint64_t *s) +{ + *s = bswap64(*s); +} +# 128 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/bswap.h" +static __attribute__ (( always_inline )) __inline__ uint16_t be16_to_cpu(uint16_t v){ return bswap16(v);}static __attribute__ (( always_inline )) __inline__ uint16_t cpu_to_be16(uint16_t v){ return bswap16(v);}static __attribute__ (( always_inline )) __inline__ void be16_to_cpus(uint16_t *p){ *p = bswap16(*p);}static __attribute__ (( always_inline )) __inline__ void cpu_to_be16s(uint16_t *p){ *p = bswap16(*p);}static __attribute__ (( always_inline )) __inline__ uint16_t be16_to_cpup(const uint16_t *p){ return be16_to_cpu(*p);}static __attribute__ (( always_inline )) __inline__ void cpu_to_be16w(uint16_t *p, uint16_t v){ *p = cpu_to_be16(v);} +static __attribute__ (( always_inline )) __inline__ uint32_t be32_to_cpu(uint32_t v){ return bswap32(v);}static __attribute__ (( always_inline )) __inline__ uint32_t cpu_to_be32(uint32_t v){ return bswap32(v);}static __attribute__ (( always_inline )) __inline__ void be32_to_cpus(uint32_t *p){ *p = bswap32(*p);}static __attribute__ (( always_inline )) __inline__ void cpu_to_be32s(uint32_t *p){ *p = bswap32(*p);}static __attribute__ (( always_inline )) __inline__ uint32_t be32_to_cpup(const uint32_t *p){ return be32_to_cpu(*p);}static __attribute__ (( always_inline )) __inline__ void cpu_to_be32w(uint32_t *p, uint32_t v){ *p = cpu_to_be32(v);} +static __attribute__ (( always_inline )) __inline__ uint64_t be64_to_cpu(uint64_t v){ return bswap64(v);}static __attribute__ (( always_inline )) __inline__ uint64_t cpu_to_be64(uint64_t v){ return bswap64(v);}static __attribute__ (( always_inline )) __inline__ void be64_to_cpus(uint64_t *p){ *p = bswap64(*p);}static __attribute__ (( always_inline )) __inline__ void cpu_to_be64s(uint64_t *p){ *p = bswap64(*p);}static __attribute__ (( always_inline )) __inline__ uint64_t be64_to_cpup(const uint64_t *p){ return be64_to_cpu(*p);}static __attribute__ (( always_inline )) __inline__ void cpu_to_be64w(uint64_t *p, uint64_t v){ *p = cpu_to_be64(v);} + +static __attribute__ (( always_inline )) __inline__ uint16_t le16_to_cpu(uint16_t v){ return (v);}static __attribute__ (( always_inline )) __inline__ uint16_t cpu_to_le16(uint16_t v){ return (v);}static __attribute__ (( always_inline )) __inline__ void le16_to_cpus(uint16_t *p){ }static __attribute__ (( always_inline )) __inline__ void cpu_to_le16s(uint16_t *p){ }static __attribute__ (( always_inline )) __inline__ uint16_t le16_to_cpup(const uint16_t *p){ return le16_to_cpu(*p);}static __attribute__ (( always_inline )) __inline__ void cpu_to_le16w(uint16_t *p, uint16_t v){ *p = cpu_to_le16(v);} +static __attribute__ (( always_inline )) __inline__ uint32_t le32_to_cpu(uint32_t v){ return (v);}static __attribute__ (( always_inline )) __inline__ uint32_t cpu_to_le32(uint32_t v){ return (v);}static __attribute__ (( always_inline )) __inline__ void le32_to_cpus(uint32_t *p){ }static __attribute__ (( always_inline )) __inline__ void cpu_to_le32s(uint32_t *p){ }static __attribute__ (( always_inline )) __inline__ uint32_t le32_to_cpup(const uint32_t *p){ return le32_to_cpu(*p);}static __attribute__ (( always_inline )) __inline__ void cpu_to_le32w(uint32_t *p, uint32_t v){ *p = cpu_to_le32(v);} +static __attribute__ (( always_inline )) __inline__ uint64_t le64_to_cpu(uint64_t v){ return (v);}static __attribute__ (( always_inline )) __inline__ uint64_t cpu_to_le64(uint64_t v){ return (v);}static __attribute__ (( always_inline )) __inline__ void le64_to_cpus(uint64_t *p){ }static __attribute__ (( always_inline )) __inline__ void cpu_to_le64s(uint64_t *p){ }static __attribute__ (( always_inline )) __inline__ uint64_t le64_to_cpup(const uint64_t *p){ return le64_to_cpu(*p);}static __attribute__ (( always_inline )) __inline__ void cpu_to_le64w(uint64_t *p, uint64_t v){ *p = cpu_to_le64(v);} +# 236 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/bswap.h" +static __attribute__ (( always_inline )) __inline__ uint32_t qemu_bswap_len(uint32_t value, int len) +{ + return bswap32(value) >> (32 - 8 * len); +} + +typedef union { + float32 f; + uint32_t l; +} CPU_FloatU; + +typedef union { + float64 d; + + + + + + + struct { + uint32_t lower; + uint32_t upper; + } l; + + uint64_t ll; +} CPU_DoubleU; + +typedef union { + floatx80 d; + struct { + uint64_t lower; + uint16_t upper; + } l; +} CPU_LDoubleU; + +typedef union { + float128 q; +# 284 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/bswap.h" + struct { + uint32_t lowest; + uint32_t lower; + uint32_t upper; + uint32_t upmost; + } l; + struct { + uint64_t lower; + uint64_t upper; + } ll; + +} CPU_QuadU; +# 328 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/bswap.h" +static __attribute__ (( always_inline )) __inline__ int ldub_p(const void *ptr) +{ + return *(uint8_t *)ptr; +} + +static __attribute__ (( always_inline )) __inline__ int ldsb_p(const void *ptr) +{ + return *(int8_t *)ptr; +} + +static __attribute__ (( always_inline )) __inline__ void stb_p(void *ptr, int v) +{ + *(uint8_t *)ptr = v; +} +# 465 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/bswap.h" +static __attribute__ (( always_inline )) __inline__ int lduw_le_p(const void *ptr) +{ + return *(uint16_t *)ptr; +} + +static __attribute__ (( always_inline )) __inline__ int ldsw_le_p(const void *ptr) +{ + return *(int16_t *)ptr; +} + +static __attribute__ (( always_inline )) __inline__ int ldl_le_p(const void *ptr) +{ + return *(uint32_t *)ptr; +} + +static __attribute__ (( always_inline )) __inline__ uint64_t ldq_le_p(const void *ptr) +{ + return *(uint64_t *)ptr; +} + +static __attribute__ (( always_inline )) __inline__ void stw_le_p(void *ptr, int v) +{ + *(uint16_t *)ptr = v; +} + +static __attribute__ (( always_inline )) __inline__ void stl_le_p(void *ptr, int v) +{ + *(uint32_t *)ptr = v; +} + +static __attribute__ (( always_inline )) __inline__ void stq_le_p(void *ptr, uint64_t v) +{ + *(uint64_t *)ptr = v; +} + + + +static __attribute__ (( always_inline )) __inline__ float32 ldfl_le_p(const void *ptr) +{ + return *(float32 *)ptr; +} + +static __attribute__ (( always_inline )) __inline__ float64 ldfq_le_p(const void *ptr) +{ + return *(float64 *)ptr; +} + +static __attribute__ (( always_inline )) __inline__ void stfl_le_p(void *ptr, float32 v) +{ + *(float32 *)ptr = v; +} + +static __attribute__ (( always_inline )) __inline__ void stfq_le_p(void *ptr, float64 v) +{ + *(float64 *)ptr = v; +} + + + + +static __attribute__ (( always_inline )) __inline__ int lduw_be_p(const void *ptr) +{ + + int val; + asm volatile ("movzwl %1, %0\n" + "xchgb %b0, %h0\n" + : "=q" (val) + : "m" (*(uint16_t *)ptr)); + return val; + + + + +} + +static __attribute__ (( always_inline )) __inline__ int ldsw_be_p(const void *ptr) +{ + + int val; + asm volatile ("movzwl %1, %0\n" + "xchgb %b0, %h0\n" + : "=q" (val) + : "m" (*(uint16_t *)ptr)); + return (int16_t)val; + + + + +} + +static __attribute__ (( always_inline )) __inline__ int ldl_be_p(const void *ptr) +{ + + int val; + asm volatile ("movl %1, %0\n" + "bswap %0\n" + : "=r" (val) + : "m" (*(uint32_t *)ptr)); + return val; + + + + +} + +static __attribute__ (( always_inline )) __inline__ uint64_t ldq_be_p(const void *ptr) +{ + uint32_t a,b; + a = ldl_be_p(ptr); + b = ldl_be_p((uint8_t *)ptr + 4); + return (((uint64_t)a<<32)|b); +} + +static __attribute__ (( always_inline )) __inline__ void stw_be_p(void *ptr, int v) +{ + + asm volatile ("xchgb %b0, %h0\n" + "movw %w0, %1\n" + : "=q" (v) + : "m" (*(uint16_t *)ptr), "0" (v)); + + + + + +} + +static __attribute__ (( always_inline )) __inline__ void stl_be_p(void *ptr, int v) +{ + + asm volatile ("bswap %0\n" + "movl %0, %1\n" + : "=r" (v) + : "m" (*(uint32_t *)ptr), "0" (v)); + + + + + + + +} + +static __attribute__ (( always_inline )) __inline__ void stq_be_p(void *ptr, uint64_t v) +{ + stl_be_p(ptr, v >> 32); + stl_be_p((uint8_t *)ptr + 4, v); +} + + + +static __attribute__ (( always_inline )) __inline__ float32 ldfl_be_p(const void *ptr) +{ + union { + float32 f; + uint32_t i; + } u; + u.i = ldl_be_p(ptr); + return u.f; +} + +static __attribute__ (( always_inline )) __inline__ void stfl_be_p(void *ptr, float32 v) +{ + union { + float32 f; + uint32_t i; + } u; + u.f = v; + stl_be_p(ptr, u.i); +} + +static __attribute__ (( always_inline )) __inline__ float64 ldfq_be_p(const void *ptr) +{ + CPU_DoubleU u; + u.l.upper = ldl_be_p(ptr); + u.l.lower = ldl_be_p((uint8_t *)ptr + 4); + return u.d; +} + +static __attribute__ (( always_inline )) __inline__ void stfq_be_p(void *ptr, float64 v) +{ + CPU_DoubleU u; + u.d = v; + stl_be_p(ptr, u.l.upper); + stl_be_p((uint8_t *)ptr + 4, u.l.lower); +} +# 15 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-common.h" 2 + + + + +enum device_endian { + DEVICE_NATIVE_ENDIAN, + DEVICE_BIG_ENDIAN, + DEVICE_LITTLE_ENDIAN, +}; + + + + + + + +typedef uintptr_t ram_addr_t; + + + + + + +typedef void CPUWriteMemoryFunc(void *opaque, target_phys_addr_t addr, uint32_t value); +typedef uint32_t CPUReadMemoryFunc(void *opaque, target_phys_addr_t addr); + +void qemu_ram_remap(ram_addr_t addr, ram_addr_t length); + +void *qemu_get_ram_ptr(ram_addr_t addr); +void *qemu_ram_ptr_length(ram_addr_t addr, ram_addr_t *size); + + +void *qemu_safe_ram_ptr(ram_addr_t addr); +void qemu_put_ram_ptr(void *addr); + +int qemu_ram_addr_from_host(void *ptr, ram_addr_t *ram_addr); +ram_addr_t qemu_ram_addr_from_host_nofail(void *ptr); +void qemu_ram_set_idstr(ram_addr_t addr, const char *name, DeviceState *dev); + +void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, + int len, int is_write); +static __attribute__ (( always_inline )) __inline__ void cpu_physical_memory_read(target_phys_addr_t addr, + void *buf, int len) +{ + cpu_physical_memory_rw(addr, buf, len, 0); +} +static __attribute__ (( always_inline )) __inline__ void cpu_physical_memory_write(target_phys_addr_t addr, + const void *buf, int len) +{ + cpu_physical_memory_rw(addr, (void *)buf, len, 1); +} +void *cpu_physical_memory_map(target_phys_addr_t addr, + target_phys_addr_t *plen, + int is_write); +void cpu_physical_memory_unmap(void *buffer, target_phys_addr_t len, + int is_write, target_phys_addr_t access_len); +void *cpu_register_map_client(void *opaque, void (*callback)(void *opaque)); +void cpu_unregister_map_client(void *cookie); + + + + + + +void qemu_flush_coalesced_mmio_buffer(void); + +uint32_t ldub_phys(target_phys_addr_t addr); +uint32_t lduw_le_phys(target_phys_addr_t addr); +uint32_t lduw_be_phys(target_phys_addr_t addr); +uint32_t ldl_le_phys(target_phys_addr_t addr); +uint32_t ldl_be_phys(target_phys_addr_t addr); +uint64_t ldq_le_phys(target_phys_addr_t addr); +uint64_t ldq_be_phys(target_phys_addr_t addr); +void stb_phys(target_phys_addr_t addr, uint32_t val); +void stw_le_phys(target_phys_addr_t addr, uint32_t val); +void stw_be_phys(target_phys_addr_t addr, uint32_t val); +void stl_le_phys(target_phys_addr_t addr, uint32_t val); +void stl_be_phys(target_phys_addr_t addr, uint32_t val); +void stq_le_phys(target_phys_addr_t addr, uint64_t val); +void stq_be_phys(target_phys_addr_t addr, uint64_t val); + + +uint32_t lduw_phys(target_phys_addr_t addr); +uint32_t ldl_phys(target_phys_addr_t addr); +uint64_t ldq_phys(target_phys_addr_t addr); +void stl_phys_notdirty(target_phys_addr_t addr, uint32_t val); +void stq_phys_notdirty(target_phys_addr_t addr, uint64_t val); +void stw_phys(target_phys_addr_t addr, uint32_t val); +void stl_phys(target_phys_addr_t addr, uint32_t val); +void stq_phys(target_phys_addr_t addr, uint64_t val); + + +void cpu_physical_memory_write_rom(target_phys_addr_t addr, + const uint8_t *buf, int len); + +extern struct MemoryRegion io_mem_ram; +extern struct MemoryRegion io_mem_rom; +extern struct MemoryRegion io_mem_unassigned; +extern struct MemoryRegion io_mem_notdirty; +# 25 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-all.h" 2 +# 77 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-all.h" +static __attribute__ (( always_inline )) __inline__ uint16_t tswap16(uint16_t s) +{ + return s; +} + +static __attribute__ (( always_inline )) __inline__ uint32_t tswap32(uint32_t s) +{ + return s; +} + +static __attribute__ (( always_inline )) __inline__ uint64_t tswap64(uint64_t s) +{ + return s; +} + +static __attribute__ (( always_inline )) __inline__ void tswap16s(uint16_t *s) +{ +} + +static __attribute__ (( always_inline )) __inline__ void tswap32s(uint32_t *s) +{ +} + +static __attribute__ (( always_inline )) __inline__ void tswap64s(uint64_t *s) +{ +} +# 303 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-all.h" +extern uintptr_t qemu_real_host_page_size; +extern uintptr_t qemu_host_page_size; +extern uintptr_t qemu_host_page_mask; +# 335 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-all.h" +struct CPUX86State *cpu_copy(struct CPUX86State *env); +struct CPUX86State *qemu_get_cpu(int cpu); + + + +void cpu_dump_state(struct CPUX86State *env, FILE *f, fprintf_function cpu_fprintf, + int flags); +void cpu_dump_statistics(struct CPUX86State *env, FILE *f, fprintf_function cpu_fprintf, + int flags); + +void __attribute__ ((__noreturn__)) cpu_abort(struct CPUX86State *env, const char *fmt, ...) + __attribute__((format(gnu_printf, 2, 3))); +extern struct CPUX86State *first_cpu; +extern __thread __typeof__(struct CPUX86State *) tls__cpu_single_env; +# 402 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-all.h" +typedef void (*CPUInterruptHandler)(struct CPUX86State *, int); + +extern CPUInterruptHandler cpu_interrupt_handler; + +static __attribute__ (( always_inline )) __inline__ void cpu_interrupt(struct CPUX86State *s, int mask) +{ + cpu_interrupt_handler(s, mask); +} + + + + +void cpu_reset_interrupt(struct CPUX86State *env, int mask); + +void cpu_exit(struct CPUX86State *s); + +_Bool qemu_cpu_has_work(struct CPUX86State *env); +# 429 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-all.h" +int cpu_breakpoint_insert(struct CPUX86State *env, target_ulong pc, int flags, + CPUBreakpoint **breakpoint); +int cpu_breakpoint_remove(struct CPUX86State *env, target_ulong pc, int flags); +void cpu_breakpoint_remove_by_ref(struct CPUX86State *env, CPUBreakpoint *breakpoint); +void cpu_breakpoint_remove_all(struct CPUX86State *env, int mask); +int cpu_watchpoint_insert(struct CPUX86State *env, target_ulong addr, target_ulong len, + int flags, CPUWatchpoint **watchpoint); +int cpu_watchpoint_remove(struct CPUX86State *env, target_ulong addr, + target_ulong len, int flags); +void cpu_watchpoint_remove_by_ref(struct CPUX86State *env, CPUWatchpoint *watchpoint); +void cpu_watchpoint_remove_all(struct CPUX86State *env, int mask); + + + + + +void cpu_single_step(struct CPUX86State *env, int enabled); +void cpu_state_reset(struct CPUX86State *s); +int cpu_is_stopped(struct CPUX86State *env); +void run_on_cpu(struct CPUX86State *env, void (*func)(void *data), void *data); +# 462 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-all.h" +typedef struct CPULogItem { + int mask; + const char *name; + const char *help; +} CPULogItem; + +extern const CPULogItem cpu_log_items[]; + +void cpu_set_log(int log_flags); +void cpu_set_log_filename(const char *filename); +int cpu_str_to_log_mask(const char *str); + + + + + + +target_phys_addr_t cpu_get_phys_page_debug(struct CPUX86State *env, target_ulong addr); + + + +extern int phys_ram_fd; +extern ram_addr_t ram_size; + + + + +typedef struct RAMBlock { + struct MemoryRegion *mr; + uint8_t *host; + ram_addr_t offset; + ram_addr_t length; + uint32_t flags; + char idstr[256]; + struct { struct RAMBlock *le_next; struct RAMBlock **le_prev; } next; + + int fd; + +} RAMBlock; + +typedef struct RAMList { + uint8_t *phys_dirty; + struct { struct RAMBlock *lh_first; } blocks; +} RAMList; +extern RAMList ram_list; + +extern const char *mem_path; +extern int mem_prealloc; +# 521 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/cpu-all.h" +void dump_exec_info(FILE *f, fprintf_function cpu_fprintf); + + +int cpu_memory_rw_debug(struct CPUX86State *env, target_ulong addr, + uint8_t *buf, int len, int is_write); +# 1025 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" 2 +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/svm.h" 1 +# 133 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/svm.h" +struct __attribute__((packed)) vmcb_control_area { + uint16_t intercept_cr_read; + uint16_t intercept_cr_write; + uint16_t intercept_dr_read; + uint16_t intercept_dr_write; + uint32_t intercept_exceptions; + uint64_t intercept; + uint8_t reserved_1[44]; + uint64_t iopm_base_pa; + uint64_t msrpm_base_pa; + uint64_t tsc_offset; + uint32_t asid; + uint8_t tlb_ctl; + uint8_t reserved_2[3]; + uint32_t int_ctl; + uint32_t int_vector; + uint32_t int_state; + uint8_t reserved_3[4]; + uint64_t exit_code; + uint64_t exit_info_1; + uint64_t exit_info_2; + uint32_t exit_int_info; + uint32_t exit_int_info_err; + uint64_t nested_ctl; + uint8_t reserved_4[16]; + uint32_t event_inj; + uint32_t event_inj_err; + uint64_t nested_cr3; + uint64_t lbr_ctl; + uint8_t reserved_5[832]; +}; + +struct __attribute__((packed)) vmcb_seg { + uint16_t selector; + uint16_t attrib; + uint32_t limit; + uint64_t base; +}; + +struct __attribute__((packed)) vmcb_save_area { + struct vmcb_seg es; + struct vmcb_seg cs; + struct vmcb_seg ss; + struct vmcb_seg ds; + struct vmcb_seg fs; + struct vmcb_seg gs; + struct vmcb_seg gdtr; + struct vmcb_seg ldtr; + struct vmcb_seg idtr; + struct vmcb_seg tr; + uint8_t reserved_1[43]; + uint8_t cpl; + uint8_t reserved_2[4]; + uint64_t efer; + uint8_t reserved_3[112]; + uint64_t cr4; + uint64_t cr3; + uint64_t cr0; + uint64_t dr7; + uint64_t dr6; + uint64_t rflags; + uint64_t rip; + uint8_t reserved_4[88]; + uint64_t rsp; + uint8_t reserved_5[24]; + uint64_t rax; + uint64_t star; + uint64_t lstar; + uint64_t cstar; + uint64_t sfmask; + uint64_t kernel_gs_base; + uint64_t sysenter_cs; + uint64_t sysenter_esp; + uint64_t sysenter_eip; + uint64_t cr2; + uint8_t reserved_6[32]; + uint64_t g_pat; + uint64_t dbgctl; + uint64_t br_from; + uint64_t br_to; + uint64_t last_excp_from; + uint64_t last_excp_to; +}; + +struct __attribute__((packed)) vmcb { + struct vmcb_control_area control; + struct vmcb_save_area save; +}; +# 1026 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" 2 + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/hw/apic.h" 1 + + + + + + +void apic_deliver_irq(uint8_t dest, uint8_t dest_mode, uint8_t delivery_mode, + uint8_t vector_num, uint8_t trigger_mode); +int apic_accept_pic_intr(DeviceState *s); +void apic_deliver_pic_intr(DeviceState *s, int level); +void apic_deliver_nmi(DeviceState *d); +int apic_get_interrupt(DeviceState *s); +void apic_reset_irq_delivered(void); +int apic_get_irq_delivered(void); +void cpu_set_apic_base(DeviceState *s, uint64_t val); +uint64_t cpu_get_apic_base(DeviceState *s); +void cpu_set_apic_tpr(DeviceState *s, uint8_t val); +uint8_t cpu_get_apic_tpr(DeviceState *s); +void apic_init_reset(DeviceState *s); +void apic_sipi(DeviceState *s); +void apic_handle_tpr_access_report(DeviceState *d, target_ulong ip, + TPRAccess access); + + +int cpu_is_bsp(CPUX86State *env); +DeviceState *cpu_get_current_apic(void); +# 1029 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" 2 + + +static __attribute__ (( always_inline )) __inline__ _Bool cpu_has_work(CPUX86State *env) +{ + return ((env->interrupt_request & 0x0002) && + (env->eflags & 0x00000200)) || + (env->interrupt_request & (0x0200 | + 0x0400 | + 0x0800 | + 0x1000)); +} + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" 1 +# 34 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" +typedef ram_addr_t tb_page_addr_t; +# 43 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" +struct TranslationBlock; +typedef struct TranslationBlock TranslationBlock; +# 73 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" +extern target_ulong gen_opc_pc[640]; +extern uint8_t gen_opc_instr_start[640]; +extern uint16_t gen_opc_icount[640]; + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-log.h" 1 + + + + +extern FILE *logfile; +extern int loglevel; +# 78 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" 2 + +void gen_intermediate_code(struct CPUX86State *env, struct TranslationBlock *tb); +void gen_intermediate_code_pc(struct CPUX86State *env, struct TranslationBlock *tb); +void restore_state_to_opc(struct CPUX86State *env, struct TranslationBlock *tb, + int pc_pos); + +void cpu_gen_init(void); +int cpu_x86_gen_code(struct CPUX86State *env, struct TranslationBlock *tb, + int *gen_code_size_ptr); +int cpu_restore_state(struct TranslationBlock *tb, + struct CPUX86State *env, uintptr_t searched_pc); +void __attribute__ ((__noreturn__)) cpu_resume_from_signal(struct CPUX86State *env1, void *puc); +void __attribute__ ((__noreturn__)) cpu_io_recompile(struct CPUX86State *env, uintptr_t retaddr); +TranslationBlock *tb_gen_code(struct CPUX86State *env, + target_ulong pc, target_ulong cs_base, int flags, + int cflags); +void cpu_exec_init(struct CPUX86State *env); +void __attribute__ ((__noreturn__)) cpu_loop_exit(struct CPUX86State *env1); +int page_unprotect(target_ulong address, uintptr_t pc, void *puc); +void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end, + int is_cpu_write_access); +void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t end, + int is_cpu_write_access); + + +void tlb_flush_page(struct CPUX86State *env, target_ulong addr); +void tlb_flush(struct CPUX86State *env, int flush_global); +void tlb_set_page(struct CPUX86State *env, target_ulong vaddr, + target_phys_addr_t paddr, int prot, + int mmu_idx, target_ulong size); +void tb_invalidate_phys_addr(target_phys_addr_t addr); +# 141 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" +struct TranslationBlock { + target_ulong pc; + target_ulong cs_base; + uint64_t flags; + uint16_t size; + + uint16_t cflags; + + + + uint8_t *tc_ptr; + + struct TranslationBlock *phys_hash_next; + + + struct TranslationBlock *page_next[2]; + tb_page_addr_t page_addr[2]; + + + + uint16_t tb_next_offset[2]; + + uint16_t tb_jmp_offset[2]; + + + + + + + + struct TranslationBlock *jmp_next[2]; + struct TranslationBlock *jmp_first; + uint32_t icount; +}; + +static __attribute__ (( always_inline )) __inline__ unsigned int tb_jmp_cache_hash_page(target_ulong pc) +{ + target_ulong tmp; + tmp = pc ^ (pc >> (12 - (12 / 2))); + return (tmp >> (12 - (12 / 2))) & ((1 << 12) - (1 << (12 / 2))); +} + +static __attribute__ (( always_inline )) __inline__ unsigned int tb_jmp_cache_hash_func(target_ulong pc) +{ + target_ulong tmp; + tmp = pc ^ (pc >> (12 - (12 / 2))); + return (((tmp >> (12 - (12 / 2))) & ((1 << 12) - (1 << (12 / 2)))) + | (tmp & ((1 << (12 / 2)) - 1))); +} + +static __attribute__ (( always_inline )) __inline__ unsigned int tb_phys_hash_func(tb_page_addr_t pc) +{ + return (pc >> 2) & ((1 << 15) - 1); +} + +void tb_free(TranslationBlock *tb); +void tb_flush(struct CPUX86State *env); +void tb_link_page(TranslationBlock *tb, + tb_page_addr_t phys_pc, tb_page_addr_t phys_page2); +void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr); + +extern TranslationBlock *tb_phys_hash[(1 << 15)]; +# 217 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" +static __attribute__ (( always_inline )) __inline__ void tb_set_jmp_target1(uintptr_t jmp_addr, uintptr_t addr) +{ + + *(uint32_t *)jmp_addr = addr - (jmp_addr + 4); + +} +# 251 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" +static __attribute__ (( always_inline )) __inline__ void tb_set_jmp_target(TranslationBlock *tb, + int n, uintptr_t addr) +{ + uint16_t offset = tb->tb_jmp_offset[n]; + tb_set_jmp_target1((uintptr_t)(tb->tc_ptr + offset), addr); +} +# 269 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" +static __attribute__ (( always_inline )) __inline__ void tb_add_jump(TranslationBlock *tb, int n, + TranslationBlock *tb_next) +{ + + if (!tb->jmp_next[n]) { + + tb_set_jmp_target(tb, n, (uintptr_t)tb_next->tc_ptr); + + + tb->jmp_next[n] = tb_next->jmp_first; + tb_next->jmp_first = (TranslationBlock *)((uintptr_t)(tb) | (n)); + } +} + +TranslationBlock *tb_find_pc(uintptr_t pc_ptr); + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-lock.h" 1 +# 38 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-lock.h" +typedef int spinlock_t; + + +static __attribute__ (( always_inline )) __inline__ void spin_lock(spinlock_t *lock) +{ +} + +static __attribute__ (( always_inline )) __inline__ void spin_unlock(spinlock_t *lock) +{ +} +# 286 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" 2 + +extern spinlock_t tb_lock; + +extern int tb_invalidated_flag; +# 313 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" +struct MemoryRegion *iotlb_to_region(target_phys_addr_t index); +uint64_t io_mem_read(struct MemoryRegion *mr, target_phys_addr_t addr, + unsigned size); +void io_mem_write(struct MemoryRegion *mr, target_phys_addr_t addr, + uint64_t value, unsigned size); + +void tlb_fill(struct CPUX86State *env1, target_ulong addr, int is_write, int mmu_idx, + uintptr_t retaddr); + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_defs.h" 1 +# 13 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_defs.h" +uint8_t __ldb_mmu(target_ulong addr, int mmu_idx); +void __stb_mmu(target_ulong addr, uint8_t val, int mmu_idx); +uint16_t __ldw_mmu(target_ulong addr, int mmu_idx); +void __stw_mmu(target_ulong addr, uint16_t val, int mmu_idx); +uint32_t __ldl_mmu(target_ulong addr, int mmu_idx); +void __stl_mmu(target_ulong addr, uint32_t val, int mmu_idx); +uint64_t __ldq_mmu(target_ulong addr, int mmu_idx); +void __stq_mmu(target_ulong addr, uint64_t val, int mmu_idx); + +uint8_t __ldb_cmmu(target_ulong addr, int mmu_idx); +void __stb_cmmu(target_ulong addr, uint8_t val, int mmu_idx); +uint16_t __ldw_cmmu(target_ulong addr, int mmu_idx); +void __stw_cmmu(target_ulong addr, uint16_t val, int mmu_idx); +uint32_t __ldl_cmmu(target_ulong addr, int mmu_idx); +void __stl_cmmu(target_ulong addr, uint32_t val, int mmu_idx); +uint64_t __ldq_cmmu(target_ulong addr, int mmu_idx); +void __stq_cmmu(target_ulong addr, uint64_t val, int mmu_idx); +# 323 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" 2 +# 331 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 +# 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ uint32_t +ldub_code( + target_ulong ptr) +{ + int page_index; + uint32_t res; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = (cpu_mmu_index(tls__cpu_single_env)); + if (__builtin_expect(!!(tls__cpu_single_env->tlb_table[mmu_idx][page_index].addr_code != (addr & (~((1 << 12) - 1) | (1 - 1)))), 0) + ) { + res = __ldb_cmmu( + addr, + mmu_idx); + } else { + uintptr_t hostaddr = addr + tls__cpu_single_env->tlb_table[mmu_idx][page_index].addend; + res = ldub_p((uint8_t *)(intptr_t)((hostaddr))); + } + return res; +} + + +static __attribute__ (( always_inline )) __inline__ int +ldsb_code( + target_ulong ptr) +{ + int res, page_index; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = (cpu_mmu_index(tls__cpu_single_env)); + if (__builtin_expect(!!(tls__cpu_single_env->tlb_table[mmu_idx][page_index].addr_code != (addr & (~((1 << 12) - 1) | (1 - 1)))), 0) + ) { + res = (int8_t) + __ldb_cmmu( addr, mmu_idx); + } else { + uintptr_t hostaddr = addr + tls__cpu_single_env->tlb_table[mmu_idx][page_index].addend; + res = ldsb_p((uint8_t *)(intptr_t)((hostaddr))); + } + return res; +} +# 332 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" 2 + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 +# 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ uint32_t +lduw_code( + target_ulong ptr) +{ + int page_index; + uint32_t res; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = (cpu_mmu_index(tls__cpu_single_env)); + if (__builtin_expect(!!(tls__cpu_single_env->tlb_table[mmu_idx][page_index].addr_code != (addr & (~((1 << 12) - 1) | (2 - 1)))), 0) + ) { + res = __ldw_cmmu( + addr, + mmu_idx); + } else { + uintptr_t hostaddr = addr + tls__cpu_single_env->tlb_table[mmu_idx][page_index].addend; + res = lduw_le_p((uint8_t *)(intptr_t)((hostaddr))); + } + return res; +} + + +static __attribute__ (( always_inline )) __inline__ int +ldsw_code( + target_ulong ptr) +{ + int res, page_index; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = (cpu_mmu_index(tls__cpu_single_env)); + if (__builtin_expect(!!(tls__cpu_single_env->tlb_table[mmu_idx][page_index].addr_code != (addr & (~((1 << 12) - 1) | (2 - 1)))), 0) + ) { + res = (int16_t) + __ldw_cmmu( addr, mmu_idx); + } else { + uintptr_t hostaddr = addr + tls__cpu_single_env->tlb_table[mmu_idx][page_index].addend; + res = ldsw_le_p((uint8_t *)(intptr_t)((hostaddr))); + } + return res; +} +# 335 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" 2 + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 +# 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ uint32_t +ldl_code( + target_ulong ptr) +{ + int page_index; + uint32_t res; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = (cpu_mmu_index(tls__cpu_single_env)); + if (__builtin_expect(!!(tls__cpu_single_env->tlb_table[mmu_idx][page_index].addr_code != (addr & (~((1 << 12) - 1) | (4 - 1)))), 0) + ) { + res = __ldl_cmmu( + addr, + mmu_idx); + } else { + uintptr_t hostaddr = addr + tls__cpu_single_env->tlb_table[mmu_idx][page_index].addend; + res = ldl_le_p((uint8_t *)(intptr_t)((hostaddr))); + } + return res; +} +# 338 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" 2 + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 +# 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ uint64_t +ldq_code( + target_ulong ptr) +{ + int page_index; + uint64_t res; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = (cpu_mmu_index(tls__cpu_single_env)); + if (__builtin_expect(!!(tls__cpu_single_env->tlb_table[mmu_idx][page_index].addr_code != (addr & (~((1 << 12) - 1) | (8 - 1)))), 0) + ) { + res = __ldq_cmmu( + addr, + mmu_idx); + } else { + uintptr_t hostaddr = addr + tls__cpu_single_env->tlb_table[mmu_idx][page_index].addend; + res = ldq_le_p((uint8_t *)(intptr_t)((hostaddr))); + } + return res; +} +# 341 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" 2 +# 355 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/exec-all.h" +tb_page_addr_t get_page_addr_code(struct CPUX86State *env1, target_ulong addr); + + +typedef void (CPUDebugExcpHandler)(struct CPUX86State *env); + +CPUDebugExcpHandler *cpu_set_debug_excp_handler(CPUDebugExcpHandler *handler); + + +extern int singlestep; + + +extern volatile sig_atomic_t exit_request; + + + +static __attribute__ (( always_inline )) __inline__ int can_do_io(struct CPUX86State *env) +{ + if (!use_icount) { + return 1; + } + + if (!env->current_tb) { + return 1; + } + return env->can_do_io != 0; +} +# 1042 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/cpu.h" 2 + +static __attribute__ (( always_inline )) __inline__ void cpu_pc_from_tb(CPUX86State *env, TranslationBlock *tb) +{ + env->eip = tb->pc - tb->cs_base; +} + +static __attribute__ (( always_inline )) __inline__ void cpu_get_tb_cpu_state(CPUX86State *env, target_ulong *pc, + target_ulong *cs_base, int *flags) +{ + *cs_base = env->segs[1].base; + *pc = *cs_base + env->eip; + *flags = env->hflags | + (env->eflags & (0x00003000 | 0x00000100 | 0x00010000 | 0x00020000)); +} + +void do_cpu_init(CPUX86State *env); +void do_cpu_sipi(CPUX86State *env); + + + + +void cpu_x86_inject_mce(Monitor *mon, CPUX86State *cenv, int bank, + uint64_t status, uint64_t mcg_status, uint64_t addr, + uint64_t misc, int flags); + + +void do_interrupt(CPUX86State *env); +void do_interrupt_x86_hardirq(CPUX86State *env, int intno, int is_hw); +void __attribute__ ((__noreturn__)) raise_exception_env(int exception_index, CPUX86State *nenv); +void __attribute__ ((__noreturn__)) raise_exception_err_env(CPUX86State *nenv, int exception_index, + int error_code); + +void do_smm_enter(CPUX86State *env1); + +void svm_check_intercept(CPUX86State *env1, uint32_t type); + +uint32_t cpu_cc_compute_all(CPUX86State *env1, int op); + +void cpu_report_tpr_access(CPUX86State *env, TPRAccess access); +# 22 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/dyngen-exec.h" 1 +# 64 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/dyngen-exec.h" +register struct CPUX86State *env asm("ebp"); +# 23 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/host-utils.h" 1 +# 46 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/host-utils.h" +void muls64(uint64_t *phigh, uint64_t *plow, int64_t a, int64_t b); +void mulu64(uint64_t *phigh, uint64_t *plow, uint64_t a, uint64_t b); + + + + +static __attribute__ (( always_inline )) __inline__ int clz32(uint32_t val) +{ + + if (val) + return __builtin_clz(val); + else + return 32; +# 87 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/host-utils.h" +} + +static __attribute__ (( always_inline )) __inline__ int clo32(uint32_t val) +{ + return clz32(~val); +} + +static __attribute__ (( always_inline )) __inline__ int clz64(uint64_t val) +{ + + if (val) + return __builtin_clzll(val); + else + return 64; +# 112 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/host-utils.h" +} + +static __attribute__ (( always_inline )) __inline__ int clo64(uint64_t val) +{ + return clz64(~val); +} + +static __attribute__ (( always_inline )) __inline__ int ctz32(uint32_t val) +{ + + if (val) + return __builtin_ctz(val); + else + return 32; +# 156 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/host-utils.h" +} + +static __attribute__ (( always_inline )) __inline__ int cto32(uint32_t val) +{ + return ctz32(~val); +} + +static __attribute__ (( always_inline )) __inline__ int ctz64(uint64_t val) +{ + + if (val) + return __builtin_ctzll(val); + else + return 64; +# 181 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/host-utils.h" +} + +static __attribute__ (( always_inline )) __inline__ int cto64(uint64_t val) +{ + return ctz64(~val); +} + +static __attribute__ (( always_inline )) __inline__ int ctpop8(uint8_t val) +{ + val = (val & 0x55) + ((val >> 1) & 0x55); + val = (val & 0x33) + ((val >> 2) & 0x33); + val = (val & 0x0f) + ((val >> 4) & 0x0f); + + return val; +} + +static __attribute__ (( always_inline )) __inline__ int ctpop16(uint16_t val) +{ + val = (val & 0x5555) + ((val >> 1) & 0x5555); + val = (val & 0x3333) + ((val >> 2) & 0x3333); + val = (val & 0x0f0f) + ((val >> 4) & 0x0f0f); + val = (val & 0x00ff) + ((val >> 8) & 0x00ff); + + return val; +} + +static __attribute__ (( always_inline )) __inline__ int ctpop32(uint32_t val) +{ + + return __builtin_popcount(val); +# 220 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/host-utils.h" +} + +static __attribute__ (( always_inline )) __inline__ int ctpop64(uint64_t val) +{ + + return __builtin_popcountll(val); +# 236 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/host-utils.h" +} +# 24 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/ioport.h" 1 +# 28 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/ioport.h" +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/iorange.h" 1 + + + + + +typedef struct IORange IORange; +typedef struct IORangeOps IORangeOps; + +struct IORangeOps { + void (*read)(IORange *iorange, uint64_t offset, unsigned width, + uint64_t *data); + void (*write)(IORange *iorange, uint64_t offset, unsigned width, + uint64_t data); + void (*destructor)(IORange *iorange); +}; + +struct IORange { + const IORangeOps *ops; + uint64_t base; + uint64_t len; +}; + +static __attribute__ (( always_inline )) __inline__ void iorange_init(IORange *iorange, const IORangeOps *ops, + uint64_t base, uint64_t len) +{ + iorange->ops = ops; + iorange->base = base; + iorange->len = len; +} +# 29 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/ioport.h" 2 + +typedef uint32_t pio_addr_t; + + + + + + +typedef void (IOPortWriteFunc)(void *opaque, uint32_t address, uint32_t data); +typedef uint32_t (IOPortReadFunc)(void *opaque, uint32_t address); +typedef void (IOPortDestructor)(void *opaque); + +void ioport_register(IORange *iorange); +int register_ioport_read(pio_addr_t start, int length, int size, + IOPortReadFunc *func, void *opaque); +int register_ioport_write(pio_addr_t start, int length, int size, + IOPortWriteFunc *func, void *opaque); +void isa_unassign_ioport(pio_addr_t start, int length); +_Bool isa_is_ioport_assigned(pio_addr_t start); + +void cpu_outb(pio_addr_t addr, uint8_t val); +void cpu_outw(pio_addr_t addr, uint16_t val); +void cpu_outl(pio_addr_t addr, uint32_t val); +uint8_t cpu_inb(pio_addr_t addr); +uint16_t cpu_inw(pio_addr_t addr); +uint32_t cpu_inl(pio_addr_t addr); + +struct MemoryRegion; +struct MemoryRegionPortio; + +typedef struct PortioList { + const struct MemoryRegionPortio *ports; + struct MemoryRegion *address_space; + unsigned nr; + struct MemoryRegion **regions; + struct MemoryRegion **aliases; + void *opaque; + const char *name; +} PortioList; + +void portio_list_init(PortioList *piolist, + const struct MemoryRegionPortio *callbacks, + void *opaque, const char *name); +void portio_list_destroy(PortioList *piolist); +void portio_list_add(PortioList *piolist, + struct MemoryRegion *address_space, + uint32_t addr); +void portio_list_del(PortioList *piolist); +# 25 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-log.h" 1 +# 26 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper.h" 1 +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/def-helper.h" 1 +# 2 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper.h" 2 + +uint32_t helper_cc_compute_all (int); +uint32_t helper_cc_compute_c (int); + +void helper_lock (void); +void helper_unlock (void); +void helper_write_eflags (target_ulong, uint32_t); +target_ulong helper_read_eflags (void); +void helper_divb_AL (target_ulong); +void helper_idivb_AL (target_ulong); +void helper_divw_AX (target_ulong); +void helper_idivw_AX (target_ulong); +void helper_divl_EAX (target_ulong); +void helper_idivl_EAX (target_ulong); +# 24 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper.h" +void helper_aam (int); +void helper_aad (int); +void helper_aaa (void); +void helper_aas (void); +void helper_daa (void); +void helper_das (void); + +target_ulong helper_lsl (target_ulong); +target_ulong helper_lar (target_ulong); +void helper_verr (target_ulong); +void helper_verw (target_ulong); +void helper_lldt (int); +void helper_ltr (int); +void helper_load_seg (int, int); +void helper_ljmp_protected (int, target_ulong, int); +void helper_lcall_real (int, target_ulong, int, int); +void helper_lcall_protected (int, target_ulong, int, int); +void helper_iret_real (int); +void helper_iret_protected (int, int); +void helper_lret_protected (int, int); +target_ulong helper_read_crN (int); +void helper_write_crN (int, target_ulong); +void helper_lmsw (target_ulong); +void helper_clts (void); +void helper_movl_drN_T0 (int, target_ulong); +void helper_invlpg (target_ulong); + +void helper_enter_level (int, int, target_ulong); + + + +void helper_sysenter (void); +void helper_sysexit (int); + + + + +void helper_hlt (int); +void helper_monitor (target_ulong); +void helper_mwait (int); +void helper_debug (void); +void helper_reset_rf (void); +void helper_raise_interrupt (int, int); +void helper_raise_exception (int); +void helper_cli (void); +void helper_sti (void); +void helper_set_inhibit_irq (void); +void helper_reset_inhibit_irq (void); +void helper_boundw (target_ulong, int); +void helper_boundl (target_ulong, int); +void helper_rsm (void); +void helper_into (int); +void helper_cmpxchg8b (target_ulong); + + + +void helper_single_step (void); +void helper_cpuid (void); +void helper_rdtsc (void); +void helper_rdtscp (void); +void helper_rdpmc (void); +void helper_rdmsr (void); +void helper_wrmsr (void); + +void helper_check_iob (uint32_t); +void helper_check_iow (uint32_t); +void helper_check_iol (uint32_t); +void helper_outb (uint32_t, uint32_t); +target_ulong helper_inb (uint32_t); +void helper_outw (uint32_t, uint32_t); +target_ulong helper_inw (uint32_t); +void helper_outl (uint32_t, uint32_t); +target_ulong helper_inl (uint32_t); + +void helper_svm_check_intercept_param (uint32_t, uint64_t); +void helper_vmexit (uint32_t, uint64_t); +void helper_svm_check_io (uint32_t, uint32_t, uint32_t); +void helper_vmrun (int, int); +void helper_vmmcall (void); +void helper_vmload (int); +void helper_vmsave (int); +void helper_stgi (void); +void helper_clgi (void); +void helper_skinit (void); +void helper_invlpga (int); + + + +void helper_flds_FT0 (uint32_t); +void helper_fldl_FT0 (uint64_t); +void helper_fildl_FT0 (int32_t); +void helper_flds_ST0 (uint32_t); +void helper_fldl_ST0 (uint64_t); +void helper_fildl_ST0 (int32_t); +void helper_fildll_ST0 (int64_t); +uint32_t helper_fsts_ST0 (void); +uint64_t helper_fstl_ST0 (void); +int32_t helper_fist_ST0 (void); +int32_t helper_fistl_ST0 (void); +int64_t helper_fistll_ST0 (void); +int32_t helper_fistt_ST0 (void); +int32_t helper_fisttl_ST0 (void); +int64_t helper_fisttll_ST0 (void); +void helper_fldt_ST0 (target_ulong); +void helper_fstt_ST0 (target_ulong); +void helper_fpush (void); +void helper_fpop (void); +void helper_fdecstp (void); +void helper_fincstp (void); +void helper_ffree_STN (int); +void helper_fmov_ST0_FT0 (void); +void helper_fmov_FT0_STN (int); +void helper_fmov_ST0_STN (int); +void helper_fmov_STN_ST0 (int); +void helper_fxchg_ST0_STN (int); +void helper_fcom_ST0_FT0 (void); +void helper_fucom_ST0_FT0 (void); +void helper_fcomi_ST0_FT0 (void); +void helper_fucomi_ST0_FT0 (void); +void helper_fadd_ST0_FT0 (void); +void helper_fmul_ST0_FT0 (void); +void helper_fsub_ST0_FT0 (void); +void helper_fsubr_ST0_FT0 (void); +void helper_fdiv_ST0_FT0 (void); +void helper_fdivr_ST0_FT0 (void); +void helper_fadd_STN_ST0 (int); +void helper_fmul_STN_ST0 (int); +void helper_fsub_STN_ST0 (int); +void helper_fsubr_STN_ST0 (int); +void helper_fdiv_STN_ST0 (int); +void helper_fdivr_STN_ST0 (int); +void helper_fchs_ST0 (void); +void helper_fabs_ST0 (void); +void helper_fxam_ST0 (void); +void helper_fld1_ST0 (void); +void helper_fldl2t_ST0 (void); +void helper_fldl2e_ST0 (void); +void helper_fldpi_ST0 (void); +void helper_fldlg2_ST0 (void); +void helper_fldln2_ST0 (void); +void helper_fldz_ST0 (void); +void helper_fldz_FT0 (void); +uint32_t helper_fnstsw (void); +uint32_t helper_fnstcw (void); +void helper_fldcw (uint32_t); +void helper_fclex (void); +void helper_fwait (void); +void helper_fninit (void); +void helper_fbld_ST0 (target_ulong); +void helper_fbst_ST0 (target_ulong); +void helper_f2xm1 (void); +void helper_fyl2x (void); +void helper_fptan (void); +void helper_fpatan (void); +void helper_fxtract (void); +void helper_fprem1 (void); +void helper_fprem (void); +void helper_fyl2xp1 (void); +void helper_fsqrt (void); +void helper_fsincos (void); +void helper_frndint (void); +void helper_fscale (void); +void helper_fsin (void); +void helper_fcos (void); +void helper_fstenv (target_ulong, int); +void helper_fldenv (target_ulong, int); +void helper_fsave (target_ulong, int); +void helper_frstor (target_ulong, int); +void helper_fxsave (target_ulong, int); +void helper_fxrstor (target_ulong, int); +target_ulong helper_bsf (target_ulong); +target_ulong helper_bsr (target_ulong); +target_ulong helper_lzcnt (target_ulong, int); + + + +void helper_ldmxcsr (uint32_t); +void helper_enter_mmx (void); +void helper_emms (void); +void helper_movq (void *, void *); + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse_header.h" 1 +# 37 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse_header.h" +void helper_psrlw_mmx (MMXReg *, MMXReg *); +void helper_psraw_mmx (MMXReg *, MMXReg *); +void helper_psllw_mmx (MMXReg *, MMXReg *); +void helper_psrld_mmx (MMXReg *, MMXReg *); +void helper_psrad_mmx (MMXReg *, MMXReg *); +void helper_pslld_mmx (MMXReg *, MMXReg *); +void helper_psrlq_mmx (MMXReg *, MMXReg *); +void helper_psllq_mmx (MMXReg *, MMXReg *); +# 63 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse_header.h" +void helper_paddb_mmx (MMXReg *, MMXReg *); +void helper_paddw_mmx (MMXReg *, MMXReg *); +void helper_paddl_mmx (MMXReg *, MMXReg *); +void helper_paddq_mmx (MMXReg *, MMXReg *); + +void helper_psubb_mmx (MMXReg *, MMXReg *); +void helper_psubw_mmx (MMXReg *, MMXReg *); +void helper_psubl_mmx (MMXReg *, MMXReg *); +void helper_psubq_mmx (MMXReg *, MMXReg *); + +void helper_paddusb_mmx (MMXReg *, MMXReg *); +void helper_paddsb_mmx (MMXReg *, MMXReg *); +void helper_psubusb_mmx (MMXReg *, MMXReg *); +void helper_psubsb_mmx (MMXReg *, MMXReg *); + +void helper_paddusw_mmx (MMXReg *, MMXReg *); +void helper_paddsw_mmx (MMXReg *, MMXReg *); +void helper_psubusw_mmx (MMXReg *, MMXReg *); +void helper_psubsw_mmx (MMXReg *, MMXReg *); + +void helper_pminub_mmx (MMXReg *, MMXReg *); +void helper_pmaxub_mmx (MMXReg *, MMXReg *); + +void helper_pminsw_mmx (MMXReg *, MMXReg *); +void helper_pmaxsw_mmx (MMXReg *, MMXReg *); + +void helper_pand_mmx (MMXReg *, MMXReg *); +void helper_pandn_mmx (MMXReg *, MMXReg *); +void helper_por_mmx (MMXReg *, MMXReg *); +void helper_pxor_mmx (MMXReg *, MMXReg *); + +void helper_pcmpgtb_mmx (MMXReg *, MMXReg *); +void helper_pcmpgtw_mmx (MMXReg *, MMXReg *); +void helper_pcmpgtl_mmx (MMXReg *, MMXReg *); + +void helper_pcmpeqb_mmx (MMXReg *, MMXReg *); +void helper_pcmpeqw_mmx (MMXReg *, MMXReg *); +void helper_pcmpeql_mmx (MMXReg *, MMXReg *); + +void helper_pmullw_mmx (MMXReg *, MMXReg *); + +void helper_pmulhrw_mmx (MMXReg *, MMXReg *); + +void helper_pmulhuw_mmx (MMXReg *, MMXReg *); +void helper_pmulhw_mmx (MMXReg *, MMXReg *); + +void helper_pavgb_mmx (MMXReg *, MMXReg *); +void helper_pavgw_mmx (MMXReg *, MMXReg *); + +void helper_pmuludq_mmx (MMXReg *, MMXReg *); +void helper_pmaddwd_mmx (MMXReg *, MMXReg *); + +void helper_psadbw_mmx (MMXReg *, MMXReg *); +void helper_maskmov_mmx (MMXReg *, MMXReg *, target_ulong); +void helper_movl_mm_T0_mmx (MMXReg *, uint32_t); + + + + + +void helper_pshufw_mmx (MMXReg *, MMXReg *, int); +# 227 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse_header.h" +uint32_t helper_pmovmskb_mmx (MMXReg *); +void helper_packsswb_mmx (MMXReg *, MMXReg *); +void helper_packuswb_mmx (MMXReg *, MMXReg *); +void helper_packssdw_mmx (MMXReg *, MMXReg *); + + + + + +void helper_punpcklbw_mmx (MMXReg *, MMXReg *); void helper_punpcklwd_mmx (MMXReg *, MMXReg *); void helper_punpckldq_mmx (MMXReg *, MMXReg *); +void helper_punpckhbw_mmx (MMXReg *, MMXReg *); void helper_punpckhwd_mmx (MMXReg *, MMXReg *); void helper_punpckhdq_mmx (MMXReg *, MMXReg *); +# 246 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse_header.h" +void helper_pi2fd (MMXReg *, MMXReg *); +void helper_pi2fw (MMXReg *, MMXReg *); +void helper_pf2id (MMXReg *, MMXReg *); +void helper_pf2iw (MMXReg *, MMXReg *); +void helper_pfacc (MMXReg *, MMXReg *); +void helper_pfadd (MMXReg *, MMXReg *); +void helper_pfcmpeq (MMXReg *, MMXReg *); +void helper_pfcmpge (MMXReg *, MMXReg *); +void helper_pfcmpgt (MMXReg *, MMXReg *); +void helper_pfmax (MMXReg *, MMXReg *); +void helper_pfmin (MMXReg *, MMXReg *); +void helper_pfmul (MMXReg *, MMXReg *); +void helper_pfnacc (MMXReg *, MMXReg *); +void helper_pfpnacc (MMXReg *, MMXReg *); +void helper_pfrcp (MMXReg *, MMXReg *); +void helper_pfrsqrt (MMXReg *, MMXReg *); +void helper_pfsub (MMXReg *, MMXReg *); +void helper_pfsubr (MMXReg *, MMXReg *); +void helper_pswapd (MMXReg *, MMXReg *); + + + +void helper_phaddw_mmx (MMXReg *, MMXReg *); +void helper_phaddd_mmx (MMXReg *, MMXReg *); +void helper_phaddsw_mmx (MMXReg *, MMXReg *); +void helper_phsubw_mmx (MMXReg *, MMXReg *); +void helper_phsubd_mmx (MMXReg *, MMXReg *); +void helper_phsubsw_mmx (MMXReg *, MMXReg *); +void helper_pabsb_mmx (MMXReg *, MMXReg *); +void helper_pabsw_mmx (MMXReg *, MMXReg *); +void helper_pabsd_mmx (MMXReg *, MMXReg *); +void helper_pmaddubsw_mmx (MMXReg *, MMXReg *); +void helper_pmulhrsw_mmx (MMXReg *, MMXReg *); +void helper_pshufb_mmx (MMXReg *, MMXReg *); +void helper_psignb_mmx (MMXReg *, MMXReg *); +void helper_psignw_mmx (MMXReg *, MMXReg *); +void helper_psignd_mmx (MMXReg *, MMXReg *); +void helper_palignr_mmx (MMXReg *, MMXReg *, int32_t); +# 207 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper.h" 2 + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse_header.h" 1 +# 37 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse_header.h" +void helper_psrlw_xmm (XMMReg *, XMMReg *); +void helper_psraw_xmm (XMMReg *, XMMReg *); +void helper_psllw_xmm (XMMReg *, XMMReg *); +void helper_psrld_xmm (XMMReg *, XMMReg *); +void helper_psrad_xmm (XMMReg *, XMMReg *); +void helper_pslld_xmm (XMMReg *, XMMReg *); +void helper_psrlq_xmm (XMMReg *, XMMReg *); +void helper_psllq_xmm (XMMReg *, XMMReg *); + + +void helper_psrldq_xmm (XMMReg *, XMMReg *); +void helper_pslldq_xmm (XMMReg *, XMMReg *); +# 63 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse_header.h" +void helper_paddb_xmm (XMMReg *, XMMReg *); +void helper_paddw_xmm (XMMReg *, XMMReg *); +void helper_paddl_xmm (XMMReg *, XMMReg *); +void helper_paddq_xmm (XMMReg *, XMMReg *); + +void helper_psubb_xmm (XMMReg *, XMMReg *); +void helper_psubw_xmm (XMMReg *, XMMReg *); +void helper_psubl_xmm (XMMReg *, XMMReg *); +void helper_psubq_xmm (XMMReg *, XMMReg *); + +void helper_paddusb_xmm (XMMReg *, XMMReg *); +void helper_paddsb_xmm (XMMReg *, XMMReg *); +void helper_psubusb_xmm (XMMReg *, XMMReg *); +void helper_psubsb_xmm (XMMReg *, XMMReg *); + +void helper_paddusw_xmm (XMMReg *, XMMReg *); +void helper_paddsw_xmm (XMMReg *, XMMReg *); +void helper_psubusw_xmm (XMMReg *, XMMReg *); +void helper_psubsw_xmm (XMMReg *, XMMReg *); + +void helper_pminub_xmm (XMMReg *, XMMReg *); +void helper_pmaxub_xmm (XMMReg *, XMMReg *); + +void helper_pminsw_xmm (XMMReg *, XMMReg *); +void helper_pmaxsw_xmm (XMMReg *, XMMReg *); + +void helper_pand_xmm (XMMReg *, XMMReg *); +void helper_pandn_xmm (XMMReg *, XMMReg *); +void helper_por_xmm (XMMReg *, XMMReg *); +void helper_pxor_xmm (XMMReg *, XMMReg *); + +void helper_pcmpgtb_xmm (XMMReg *, XMMReg *); +void helper_pcmpgtw_xmm (XMMReg *, XMMReg *); +void helper_pcmpgtl_xmm (XMMReg *, XMMReg *); + +void helper_pcmpeqb_xmm (XMMReg *, XMMReg *); +void helper_pcmpeqw_xmm (XMMReg *, XMMReg *); +void helper_pcmpeql_xmm (XMMReg *, XMMReg *); + +void helper_pmullw_xmm (XMMReg *, XMMReg *); + + + +void helper_pmulhuw_xmm (XMMReg *, XMMReg *); +void helper_pmulhw_xmm (XMMReg *, XMMReg *); + +void helper_pavgb_xmm (XMMReg *, XMMReg *); +void helper_pavgw_xmm (XMMReg *, XMMReg *); + +void helper_pmuludq_xmm (XMMReg *, XMMReg *); +void helper_pmaddwd_xmm (XMMReg *, XMMReg *); + +void helper_psadbw_xmm (XMMReg *, XMMReg *); +void helper_maskmov_xmm (XMMReg *, XMMReg *, target_ulong); +void helper_movl_mm_T0_xmm (XMMReg *, uint32_t); + + + + + + + +void helper_shufps (XMMReg *, XMMReg *, int); +void helper_shufpd (XMMReg *, XMMReg *, int); +void helper_pshufd_xmm (XMMReg *, XMMReg *, int); +void helper_pshuflw_xmm (XMMReg *, XMMReg *, int); +void helper_pshufhw_xmm (XMMReg *, XMMReg *, int); +# 142 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse_header.h" +void helper_addps (XMMReg *, XMMReg *); void helper_addss (XMMReg *, XMMReg *); void helper_addpd (XMMReg *, XMMReg *); void helper_addsd (XMMReg *, XMMReg *); +void helper_subps (XMMReg *, XMMReg *); void helper_subss (XMMReg *, XMMReg *); void helper_subpd (XMMReg *, XMMReg *); void helper_subsd (XMMReg *, XMMReg *); +void helper_mulps (XMMReg *, XMMReg *); void helper_mulss (XMMReg *, XMMReg *); void helper_mulpd (XMMReg *, XMMReg *); void helper_mulsd (XMMReg *, XMMReg *); +void helper_divps (XMMReg *, XMMReg *); void helper_divss (XMMReg *, XMMReg *); void helper_divpd (XMMReg *, XMMReg *); void helper_divsd (XMMReg *, XMMReg *); +void helper_minps (XMMReg *, XMMReg *); void helper_minss (XMMReg *, XMMReg *); void helper_minpd (XMMReg *, XMMReg *); void helper_minsd (XMMReg *, XMMReg *); +void helper_maxps (XMMReg *, XMMReg *); void helper_maxss (XMMReg *, XMMReg *); void helper_maxpd (XMMReg *, XMMReg *); void helper_maxsd (XMMReg *, XMMReg *); +void helper_sqrtps (XMMReg *, XMMReg *); void helper_sqrtss (XMMReg *, XMMReg *); void helper_sqrtpd (XMMReg *, XMMReg *); void helper_sqrtsd (XMMReg *, XMMReg *); + + +void helper_cvtps2pd (XMMReg *, XMMReg *); +void helper_cvtpd2ps (XMMReg *, XMMReg *); +void helper_cvtss2sd (XMMReg *, XMMReg *); +void helper_cvtsd2ss (XMMReg *, XMMReg *); +void helper_cvtdq2ps (XMMReg *, XMMReg *); +void helper_cvtdq2pd (XMMReg *, XMMReg *); +void helper_cvtpi2ps (XMMReg *, MMXReg *); +void helper_cvtpi2pd (XMMReg *, MMXReg *); +void helper_cvtsi2ss (XMMReg *, uint32_t); +void helper_cvtsi2sd (XMMReg *, uint32_t); + + + + + + +void helper_cvtps2dq (XMMReg *, XMMReg *); +void helper_cvtpd2dq (XMMReg *, XMMReg *); +void helper_cvtps2pi (MMXReg *, XMMReg *); +void helper_cvtpd2pi (MMXReg *, XMMReg *); +int32_t helper_cvtss2si (XMMReg *); +int32_t helper_cvtsd2si (XMMReg *); + + + + + +void helper_cvttps2dq (XMMReg *, XMMReg *); +void helper_cvttpd2dq (XMMReg *, XMMReg *); +void helper_cvttps2pi (MMXReg *, XMMReg *); +void helper_cvttpd2pi (MMXReg *, XMMReg *); +int32_t helper_cvttss2si (XMMReg *); +int32_t helper_cvttsd2si (XMMReg *); + + + + + +void helper_rsqrtps (XMMReg *, XMMReg *); +void helper_rsqrtss (XMMReg *, XMMReg *); +void helper_rcpps (XMMReg *, XMMReg *); +void helper_rcpss (XMMReg *, XMMReg *); +void helper_extrq_r (XMMReg *, XMMReg *); +void helper_extrq_i (XMMReg *, int, int); +void helper_insertq_r (XMMReg *, XMMReg *); +void helper_insertq_i (XMMReg *, int, int); +void helper_haddps (XMMReg *, XMMReg *); +void helper_haddpd (XMMReg *, XMMReg *); +void helper_hsubps (XMMReg *, XMMReg *); +void helper_hsubpd (XMMReg *, XMMReg *); +void helper_addsubps (XMMReg *, XMMReg *); +void helper_addsubpd (XMMReg *, XMMReg *); + + + + + + + +void helper_cmpeqps (XMMReg *, XMMReg *); void helper_cmpeqss (XMMReg *, XMMReg *); void helper_cmpeqpd (XMMReg *, XMMReg *); void helper_cmpeqsd (XMMReg *, XMMReg *); +void helper_cmpltps (XMMReg *, XMMReg *); void helper_cmpltss (XMMReg *, XMMReg *); void helper_cmpltpd (XMMReg *, XMMReg *); void helper_cmpltsd (XMMReg *, XMMReg *); +void helper_cmpleps (XMMReg *, XMMReg *); void helper_cmpless (XMMReg *, XMMReg *); void helper_cmplepd (XMMReg *, XMMReg *); void helper_cmplesd (XMMReg *, XMMReg *); +void helper_cmpunordps (XMMReg *, XMMReg *); void helper_cmpunordss (XMMReg *, XMMReg *); void helper_cmpunordpd (XMMReg *, XMMReg *); void helper_cmpunordsd (XMMReg *, XMMReg *); +void helper_cmpneqps (XMMReg *, XMMReg *); void helper_cmpneqss (XMMReg *, XMMReg *); void helper_cmpneqpd (XMMReg *, XMMReg *); void helper_cmpneqsd (XMMReg *, XMMReg *); +void helper_cmpnltps (XMMReg *, XMMReg *); void helper_cmpnltss (XMMReg *, XMMReg *); void helper_cmpnltpd (XMMReg *, XMMReg *); void helper_cmpnltsd (XMMReg *, XMMReg *); +void helper_cmpnleps (XMMReg *, XMMReg *); void helper_cmpnless (XMMReg *, XMMReg *); void helper_cmpnlepd (XMMReg *, XMMReg *); void helper_cmpnlesd (XMMReg *, XMMReg *); +void helper_cmpordps (XMMReg *, XMMReg *); void helper_cmpordss (XMMReg *, XMMReg *); void helper_cmpordpd (XMMReg *, XMMReg *); void helper_cmpordsd (XMMReg *, XMMReg *); + +void helper_ucomiss (XMMReg *, XMMReg *); +void helper_comiss (XMMReg *, XMMReg *); +void helper_ucomisd (XMMReg *, XMMReg *); +void helper_comisd (XMMReg *, XMMReg *); +uint32_t helper_movmskps (XMMReg *); +uint32_t helper_movmskpd (XMMReg *); + + +uint32_t helper_pmovmskb_xmm (XMMReg *); +void helper_packsswb_xmm (XMMReg *, XMMReg *); +void helper_packuswb_xmm (XMMReg *, XMMReg *); +void helper_packssdw_xmm (XMMReg *, XMMReg *); + + + + + +void helper_punpcklbw_xmm (XMMReg *, XMMReg *); void helper_punpcklwd_xmm (XMMReg *, XMMReg *); void helper_punpckldq_xmm (XMMReg *, XMMReg *); +void helper_punpckhbw_xmm (XMMReg *, XMMReg *); void helper_punpckhwd_xmm (XMMReg *, XMMReg *); void helper_punpckhdq_xmm (XMMReg *, XMMReg *); + + +void helper_punpcklqdq_xmm (XMMReg *, XMMReg *); +void helper_punpckhqdq_xmm (XMMReg *, XMMReg *); +# 268 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse_header.h" +void helper_phaddw_xmm (XMMReg *, XMMReg *); +void helper_phaddd_xmm (XMMReg *, XMMReg *); +void helper_phaddsw_xmm (XMMReg *, XMMReg *); +void helper_phsubw_xmm (XMMReg *, XMMReg *); +void helper_phsubd_xmm (XMMReg *, XMMReg *); +void helper_phsubsw_xmm (XMMReg *, XMMReg *); +void helper_pabsb_xmm (XMMReg *, XMMReg *); +void helper_pabsw_xmm (XMMReg *, XMMReg *); +void helper_pabsd_xmm (XMMReg *, XMMReg *); +void helper_pmaddubsw_xmm (XMMReg *, XMMReg *); +void helper_pmulhrsw_xmm (XMMReg *, XMMReg *); +void helper_pshufb_xmm (XMMReg *, XMMReg *); +void helper_psignb_xmm (XMMReg *, XMMReg *); +void helper_psignw_xmm (XMMReg *, XMMReg *); +void helper_psignd_xmm (XMMReg *, XMMReg *); +void helper_palignr_xmm (XMMReg *, XMMReg *, int32_t); + + + +void helper_pblendvb_xmm (XMMReg *, XMMReg *); +void helper_blendvps_xmm (XMMReg *, XMMReg *); +void helper_blendvpd_xmm (XMMReg *, XMMReg *); +void helper_ptest_xmm (XMMReg *, XMMReg *); +void helper_pmovsxbw_xmm (XMMReg *, XMMReg *); +void helper_pmovsxbd_xmm (XMMReg *, XMMReg *); +void helper_pmovsxbq_xmm (XMMReg *, XMMReg *); +void helper_pmovsxwd_xmm (XMMReg *, XMMReg *); +void helper_pmovsxwq_xmm (XMMReg *, XMMReg *); +void helper_pmovsxdq_xmm (XMMReg *, XMMReg *); +void helper_pmovzxbw_xmm (XMMReg *, XMMReg *); +void helper_pmovzxbd_xmm (XMMReg *, XMMReg *); +void helper_pmovzxbq_xmm (XMMReg *, XMMReg *); +void helper_pmovzxwd_xmm (XMMReg *, XMMReg *); +void helper_pmovzxwq_xmm (XMMReg *, XMMReg *); +void helper_pmovzxdq_xmm (XMMReg *, XMMReg *); +void helper_pmuldq_xmm (XMMReg *, XMMReg *); +void helper_pcmpeqq_xmm (XMMReg *, XMMReg *); +void helper_packusdw_xmm (XMMReg *, XMMReg *); +void helper_pminsb_xmm (XMMReg *, XMMReg *); +void helper_pminsd_xmm (XMMReg *, XMMReg *); +void helper_pminuw_xmm (XMMReg *, XMMReg *); +void helper_pminud_xmm (XMMReg *, XMMReg *); +void helper_pmaxsb_xmm (XMMReg *, XMMReg *); +void helper_pmaxsd_xmm (XMMReg *, XMMReg *); +void helper_pmaxuw_xmm (XMMReg *, XMMReg *); +void helper_pmaxud_xmm (XMMReg *, XMMReg *); +void helper_pmulld_xmm (XMMReg *, XMMReg *); +void helper_phminposuw_xmm (XMMReg *, XMMReg *); +void helper_roundps_xmm (XMMReg *, XMMReg *, uint32_t); +void helper_roundpd_xmm (XMMReg *, XMMReg *, uint32_t); +void helper_roundss_xmm (XMMReg *, XMMReg *, uint32_t); +void helper_roundsd_xmm (XMMReg *, XMMReg *, uint32_t); +void helper_blendps_xmm (XMMReg *, XMMReg *, uint32_t); +void helper_blendpd_xmm (XMMReg *, XMMReg *, uint32_t); +void helper_pblendw_xmm (XMMReg *, XMMReg *, uint32_t); +void helper_dpps_xmm (XMMReg *, XMMReg *, uint32_t); +void helper_dppd_xmm (XMMReg *, XMMReg *, uint32_t); +void helper_mpsadbw_xmm (XMMReg *, XMMReg *, uint32_t); + + + + +void helper_pcmpgtq_xmm (XMMReg *, XMMReg *); +void helper_pcmpestri_xmm (XMMReg *, XMMReg *, uint32_t); +void helper_pcmpestrm_xmm (XMMReg *, XMMReg *, uint32_t); +void helper_pcmpistri_xmm (XMMReg *, XMMReg *, uint32_t); +void helper_pcmpistrm_xmm (XMMReg *, XMMReg *, uint32_t); +target_ulong helper_crc32 (uint32_t, target_ulong, uint32_t); +target_ulong helper_popcnt (target_ulong, uint32_t); +# 209 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper.h" 2 + +target_ulong helper_rclb (target_ulong, target_ulong); +target_ulong helper_rclw (target_ulong, target_ulong); +target_ulong helper_rcll (target_ulong, target_ulong); +target_ulong helper_rcrb (target_ulong, target_ulong); +target_ulong helper_rcrw (target_ulong, target_ulong); +target_ulong helper_rcrl (target_ulong, target_ulong); + + + + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/def-helper.h" 1 +# 221 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper.h" 2 +# 28 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 1 +# 27 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 +# 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ uint32_t +ldub_kernel( + target_ulong ptr) +{ + int page_index; + uint32_t res; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = 0; + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (1 - 1)))), 0) + ) { + res = __ldb_mmu( + addr, + mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + res = ldub_p((uint8_t *)(intptr_t)((hostaddr))); + } + return res; +} + + +static __attribute__ (( always_inline )) __inline__ int +ldsb_kernel( + target_ulong ptr) +{ + int res, page_index; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = 0; + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (1 - 1)))), 0) + ) { + res = (int8_t) + __ldb_mmu( addr, mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + res = ldsb_p((uint8_t *)(intptr_t)((hostaddr))); + } + return res; +} + + + + + + +static __attribute__ (( always_inline )) __inline__ void +stb_kernel( target_ulong ptr, + uint32_t v) +{ + int page_index; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = 0; + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_write != (addr & (~((1 << 12) - 1) | (1 - 1)))), 0) + ) { + __stb_mmu( addr, v, + mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + stb_p((uint8_t *)(intptr_t)((hostaddr)), v); + } +} +# 28 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 2 + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 +# 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ uint32_t +lduw_kernel( + target_ulong ptr) +{ + int page_index; + uint32_t res; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = 0; + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (2 - 1)))), 0) + ) { + res = __ldw_mmu( + addr, + mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + res = lduw_le_p((uint8_t *)(intptr_t)((hostaddr))); + } + return res; +} + + +static __attribute__ (( always_inline )) __inline__ int +ldsw_kernel( + target_ulong ptr) +{ + int res, page_index; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = 0; + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (2 - 1)))), 0) + ) { + res = (int16_t) + __ldw_mmu( addr, mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + res = ldsw_le_p((uint8_t *)(intptr_t)((hostaddr))); + } + return res; +} + + + + + + +static __attribute__ (( always_inline )) __inline__ void +stw_kernel( target_ulong ptr, + uint32_t v) +{ + int page_index; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = 0; + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_write != (addr & (~((1 << 12) - 1) | (2 - 1)))), 0) + ) { + __stw_mmu( addr, v, + mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + stw_le_p((uint8_t *)(intptr_t)((hostaddr)), v); + } +} +# 31 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 2 + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 +# 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ uint32_t +ldl_kernel( + target_ulong ptr) +{ + int page_index; + uint32_t res; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = 0; + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (4 - 1)))), 0) + ) { + res = __ldl_mmu( + addr, + mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + res = ldl_le_p((uint8_t *)(intptr_t)((hostaddr))); + } + return res; +} +# 147 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ void +stl_kernel( target_ulong ptr, + uint32_t v) +{ + int page_index; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = 0; + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_write != (addr & (~((1 << 12) - 1) | (4 - 1)))), 0) + ) { + __stl_mmu( addr, v, + mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + stl_le_p((uint8_t *)(intptr_t)((hostaddr)), v); + } +} +# 198 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ float32 ldfl_kernel( + target_ulong ptr) +{ + union { + float32 f; + uint32_t i; + } u; + u.i = ldl_kernel( ptr); + return u.f; +} + +static __attribute__ (( always_inline )) __inline__ void stfl_kernel( + target_ulong ptr, + float32 v) +{ + union { + float32 f; + uint32_t i; + } u; + u.f = v; + stl_kernel( ptr, u.i); +} +# 34 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 2 + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 +# 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ uint64_t +ldq_kernel( + target_ulong ptr) +{ + int page_index; + uint64_t res; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = 0; + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (8 - 1)))), 0) + ) { + res = __ldq_mmu( + addr, + mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + res = ldq_le_p((uint8_t *)(intptr_t)((hostaddr))); + } + return res; +} +# 147 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ void +stq_kernel( target_ulong ptr, + uint64_t v) +{ + int page_index; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = 0; + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_write != (addr & (~((1 << 12) - 1) | (8 - 1)))), 0) + ) { + __stq_mmu( addr, v, + mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + stq_le_p((uint8_t *)(intptr_t)((hostaddr)), v); + } +} + + + + + + +static __attribute__ (( always_inline )) __inline__ float64 ldfq_kernel( + target_ulong ptr) +{ + union { + float64 d; + uint64_t i; + } u; + u.i = ldq_kernel( ptr); + return u.d; +} + +static __attribute__ (( always_inline )) __inline__ void stfq_kernel( + target_ulong ptr, + float64 v) +{ + union { + float64 d; + uint64_t i; + } u; + u.d = v; + stq_kernel( ptr, u.i); +} +# 37 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 2 + + + + + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 +# 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ uint32_t +ldub_user( + target_ulong ptr) +{ + int page_index; + uint32_t res; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = 1; + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (1 - 1)))), 0) + ) { + res = __ldb_mmu( + addr, + mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + res = ldub_p((uint8_t *)(intptr_t)((hostaddr))); + } + return res; +} + + +static __attribute__ (( always_inline )) __inline__ int +ldsb_user( + target_ulong ptr) +{ + int res, page_index; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = 1; + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (1 - 1)))), 0) + ) { + res = (int8_t) + __ldb_mmu( addr, mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + res = ldsb_p((uint8_t *)(intptr_t)((hostaddr))); + } + return res; +} + + + + + + +static __attribute__ (( always_inline )) __inline__ void +stb_user( target_ulong ptr, + uint32_t v) +{ + int page_index; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = 1; + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_write != (addr & (~((1 << 12) - 1) | (1 - 1)))), 0) + ) { + __stb_mmu( addr, v, + mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + stb_p((uint8_t *)(intptr_t)((hostaddr)), v); + } +} +# 44 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 2 + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 +# 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ uint32_t +lduw_user( + target_ulong ptr) +{ + int page_index; + uint32_t res; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = 1; + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (2 - 1)))), 0) + ) { + res = __ldw_mmu( + addr, + mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + res = lduw_le_p((uint8_t *)(intptr_t)((hostaddr))); + } + return res; +} + + +static __attribute__ (( always_inline )) __inline__ int +ldsw_user( + target_ulong ptr) +{ + int res, page_index; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = 1; + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (2 - 1)))), 0) + ) { + res = (int16_t) + __ldw_mmu( addr, mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + res = ldsw_le_p((uint8_t *)(intptr_t)((hostaddr))); + } + return res; +} + + + + + + +static __attribute__ (( always_inline )) __inline__ void +stw_user( target_ulong ptr, + uint32_t v) +{ + int page_index; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = 1; + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_write != (addr & (~((1 << 12) - 1) | (2 - 1)))), 0) + ) { + __stw_mmu( addr, v, + mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + stw_le_p((uint8_t *)(intptr_t)((hostaddr)), v); + } +} +# 47 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 2 + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 +# 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ uint32_t +ldl_user( + target_ulong ptr) +{ + int page_index; + uint32_t res; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = 1; + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (4 - 1)))), 0) + ) { + res = __ldl_mmu( + addr, + mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + res = ldl_le_p((uint8_t *)(intptr_t)((hostaddr))); + } + return res; +} +# 147 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ void +stl_user( target_ulong ptr, + uint32_t v) +{ + int page_index; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = 1; + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_write != (addr & (~((1 << 12) - 1) | (4 - 1)))), 0) + ) { + __stl_mmu( addr, v, + mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + stl_le_p((uint8_t *)(intptr_t)((hostaddr)), v); + } +} +# 198 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ float32 ldfl_user( + target_ulong ptr) +{ + union { + float32 f; + uint32_t i; + } u; + u.i = ldl_user( ptr); + return u.f; +} + +static __attribute__ (( always_inline )) __inline__ void stfl_user( + target_ulong ptr, + float32 v) +{ + union { + float32 f; + uint32_t i; + } u; + u.f = v; + stl_user( ptr, u.i); +} +# 50 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 2 + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 +# 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ uint64_t +ldq_user( + target_ulong ptr) +{ + int page_index; + uint64_t res; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = 1; + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (8 - 1)))), 0) + ) { + res = __ldq_mmu( + addr, + mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + res = ldq_le_p((uint8_t *)(intptr_t)((hostaddr))); + } + return res; +} +# 147 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ void +stq_user( target_ulong ptr, + uint64_t v) +{ + int page_index; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = 1; + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_write != (addr & (~((1 << 12) - 1) | (8 - 1)))), 0) + ) { + __stq_mmu( addr, v, + mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + stq_le_p((uint8_t *)(intptr_t)((hostaddr)), v); + } +} + + + + + + +static __attribute__ (( always_inline )) __inline__ float64 ldfq_user( + target_ulong ptr) +{ + union { + float64 d; + uint64_t i; + } u; + u.i = ldq_user( ptr); + return u.d; +} + +static __attribute__ (( always_inline )) __inline__ void stfq_user( + target_ulong ptr, + float64 v) +{ + union { + float64 d; + uint64_t i; + } u; + u.d = v; + stq_user( ptr, u.i); +} +# 53 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 2 +# 140 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 +# 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ uint32_t +ldub_data( + target_ulong ptr) +{ + int page_index; + uint32_t res; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = (cpu_mmu_index(env)); + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (1 - 1)))), 0) + ) { + res = __ldb_mmu( + addr, + mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + res = ldub_p((uint8_t *)(intptr_t)((hostaddr))); + } + return res; +} + + +static __attribute__ (( always_inline )) __inline__ int +ldsb_data( + target_ulong ptr) +{ + int res, page_index; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = (cpu_mmu_index(env)); + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (1 - 1)))), 0) + ) { + res = (int8_t) + __ldb_mmu( addr, mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + res = ldsb_p((uint8_t *)(intptr_t)((hostaddr))); + } + return res; +} + + + + + + +static __attribute__ (( always_inline )) __inline__ void +stb_data( target_ulong ptr, + uint32_t v) +{ + int page_index; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = (cpu_mmu_index(env)); + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_write != (addr & (~((1 << 12) - 1) | (1 - 1)))), 0) + ) { + __stb_mmu( addr, v, + mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + stb_p((uint8_t *)(intptr_t)((hostaddr)), v); + } +} +# 141 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 2 + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 +# 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ uint32_t +lduw_data( + target_ulong ptr) +{ + int page_index; + uint32_t res; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = (cpu_mmu_index(env)); + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (2 - 1)))), 0) + ) { + res = __ldw_mmu( + addr, + mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + res = lduw_le_p((uint8_t *)(intptr_t)((hostaddr))); + } + return res; +} + + +static __attribute__ (( always_inline )) __inline__ int +ldsw_data( + target_ulong ptr) +{ + int res, page_index; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = (cpu_mmu_index(env)); + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (2 - 1)))), 0) + ) { + res = (int16_t) + __ldw_mmu( addr, mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + res = ldsw_le_p((uint8_t *)(intptr_t)((hostaddr))); + } + return res; +} + + + + + + +static __attribute__ (( always_inline )) __inline__ void +stw_data( target_ulong ptr, + uint32_t v) +{ + int page_index; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = (cpu_mmu_index(env)); + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_write != (addr & (~((1 << 12) - 1) | (2 - 1)))), 0) + ) { + __stw_mmu( addr, v, + mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + stw_le_p((uint8_t *)(intptr_t)((hostaddr)), v); + } +} +# 144 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 2 + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 +# 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ uint32_t +ldl_data( + target_ulong ptr) +{ + int page_index; + uint32_t res; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = (cpu_mmu_index(env)); + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (4 - 1)))), 0) + ) { + res = __ldl_mmu( + addr, + mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + res = ldl_le_p((uint8_t *)(intptr_t)((hostaddr))); + } + return res; +} +# 147 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ void +stl_data( target_ulong ptr, + uint32_t v) +{ + int page_index; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = (cpu_mmu_index(env)); + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_write != (addr & (~((1 << 12) - 1) | (4 - 1)))), 0) + ) { + __stl_mmu( addr, v, + mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + stl_le_p((uint8_t *)(intptr_t)((hostaddr)), v); + } +} +# 198 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ float32 ldfl_data( + target_ulong ptr) +{ + union { + float32 f; + uint32_t i; + } u; + u.i = ldl_data( ptr); + return u.f; +} + +static __attribute__ (( always_inline )) __inline__ void stfl_data( + target_ulong ptr, + float32 v) +{ + union { + float32 f; + uint32_t i; + } u; + u.f = v; + stl_data( ptr, u.i); +} +# 147 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 2 + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" 1 +# 95 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ uint64_t +ldq_data( + target_ulong ptr) +{ + int page_index; + uint64_t res; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = (cpu_mmu_index(env)); + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_read != (addr & (~((1 << 12) - 1) | (8 - 1)))), 0) + ) { + res = __ldq_mmu( + addr, + mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + res = ldq_le_p((uint8_t *)(intptr_t)((hostaddr))); + } + return res; +} +# 147 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_header.h" +static __attribute__ (( always_inline )) __inline__ void +stq_data( target_ulong ptr, + uint64_t v) +{ + int page_index; + target_ulong addr; + int mmu_idx; + + addr = ptr; + page_index = (addr >> 12) & ((1 << 8) - 1); + mmu_idx = (cpu_mmu_index(env)); + if (__builtin_expect(!!(env->tlb_table[mmu_idx][page_index].addr_write != (addr & (~((1 << 12) - 1) | (8 - 1)))), 0) + ) { + __stq_mmu( addr, v, + mmu_idx); + } else { + uintptr_t hostaddr = addr + env->tlb_table[mmu_idx][page_index].addend; + stq_le_p((uint8_t *)(intptr_t)((hostaddr)), v); + } +} + + + + + + +static __attribute__ (( always_inline )) __inline__ float64 ldfq_data( + target_ulong ptr) +{ + union { + float64 d; + uint64_t i; + } u; + u.i = ldq_data( ptr); + return u.d; +} + +static __attribute__ (( always_inline )) __inline__ void stfq_data( + target_ulong ptr, + float64 v) +{ + union { + float64 d; + uint64_t i; + } u; + u.d = v; + stq_data( ptr, u.i); +} +# 150 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_exec.h" 2 +# 31 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 +# 45 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" +static __attribute__ (( always_inline )) __inline__ target_long lshift(target_long x, int n) +{ + if (n >= 0) { + return x << n; + } else { + return x >> (-n); + } +} +# 70 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" +static __attribute__ (( always_inline )) __inline__ void fpush(void) +{ + env->fpstt = (env->fpstt - 1) & 7; + env->fptags[env->fpstt] = 0; +} + +static __attribute__ (( always_inline )) __inline__ void fpop(void) +{ + env->fptags[env->fpstt] = 1; + env->fpstt = (env->fpstt + 1) & 7; +} + +static __attribute__ (( always_inline )) __inline__ floatx80 helper_fldt(target_ulong ptr) +{ + CPU_LDoubleU temp; + + temp.l.lower = ldq_data(ptr); + temp.l.upper = lduw_data(ptr + 8); + return temp.d; +} + +static __attribute__ (( always_inline )) __inline__ void helper_fstt(floatx80 f, target_ulong ptr) +{ + CPU_LDoubleU temp; + + temp.d = f; + stq_data(ptr, temp.l.lower); + stw_data(ptr + 8, temp.l.upper); +} +# 112 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" +static __attribute__ (( always_inline )) __inline__ uint32_t compute_eflags(void) +{ + return env->eflags | helper_cc_compute_all((env->cc_op)) | ((env->df) & 0x00000400); +} + + +static __attribute__ (( always_inline )) __inline__ void load_eflags(int eflags, int update_mask) +{ + (env->cc_src) = eflags & (0x0800 | 0x0080 | 0x0040 | 0x0010 | 0x0004 | 0x0001); + (env->df) = 1 - (2 * ((eflags >> 10) & 1)); + env->eflags = (env->eflags & ~update_mask) | + (eflags & update_mask) | 0x2; +} + + + +static __attribute__ (( always_inline )) __inline__ void cpu_load_efer(CPUX86State *env, uint64_t val) +{ + env->efer = val; + env->hflags &= ~((1 << 14) | (1 << 20)); + if (env->efer & (1 << 10)) { + env->hflags |= (1 << 14); + } + if (env->efer & (1 << 12)) { + env->hflags |= (1 << 20); + } +} +# 148 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" +static void __attribute__ ((__noreturn__)) raise_exception_err(int exception_index, + int error_code); + +static const uint8_t parity_table[256] = { + 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, + 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, + 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, + 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, + 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, + 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, + 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, + 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, + 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, + 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, + 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, + 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, + 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, + 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, + 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, + 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, + 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, + 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, + 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, + 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, + 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, + 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, + 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, + 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, + 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, + 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, + 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, + 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, + 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, + 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, + 0x0004, 0, 0, 0x0004, 0, 0x0004, 0x0004, 0, + 0, 0x0004, 0x0004, 0, 0x0004, 0, 0, 0x0004, +}; + + +static const uint8_t rclw_table[32] = { + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 9,10,11,12,13,14,15, + 16, 0, 1, 2, 3, 4, 5, 6, + 7, 8, 9,10,11,12,13,14, +}; + + +static const uint8_t rclb_table[32] = { + 0, 1, 2, 3, 4, 5, 6, 7, + 8, 0, 1, 2, 3, 4, 5, 6, + 7, 8, 0, 1, 2, 3, 4, 5, + 6, 7, 8, 0, 1, 2, 3, 4, +}; + + + + + + + +static spinlock_t global_cpu_lock = 0; + +void helper_lock(void) +{ + spin_lock(&global_cpu_lock); +} + +void helper_unlock(void) +{ + spin_unlock(&global_cpu_lock); +} + +void helper_write_eflags(target_ulong t0, uint32_t update_mask) +{ + load_eflags(t0, update_mask); +} + +target_ulong helper_read_eflags(void) +{ + uint32_t eflags; + eflags = helper_cc_compute_all((env->cc_op)); + eflags |= ((env->df) & 0x00000400); + eflags |= env->eflags & ~(0x00020000 | 0x00010000); + return eflags; +} + + +static __attribute__ (( always_inline )) __inline__ int load_segment(uint32_t *e1_ptr, uint32_t *e2_ptr, + int selector) +{ + SegmentCache *dt; + int index; + target_ulong ptr; + + if (selector & 0x4) + dt = &env->ldt; + else + dt = &env->gdt; + index = selector & ~7; + if ((index + 7) > dt->limit) + return -1; + ptr = dt->base + index; + *e1_ptr = ldl_kernel(ptr); + *e2_ptr = ldl_kernel(ptr + 4); + return 0; +} + +static __attribute__ (( always_inline )) __inline__ unsigned int get_seg_limit(uint32_t e1, uint32_t e2) +{ + unsigned int limit; + limit = (e1 & 0xffff) | (e2 & 0x000f0000); + if (e2 & (1 << 23)) + limit = (limit << 12) | 0xfff; + return limit; +} + +static __attribute__ (( always_inline )) __inline__ uint32_t get_seg_base(uint32_t e1, uint32_t e2) +{ + return ((e1 >> 16) | ((e2 & 0xff) << 16) | (e2 & 0xff000000)); +} + +static __attribute__ (( always_inline )) __inline__ void load_seg_cache_raw_dt(SegmentCache *sc, uint32_t e1, uint32_t e2) +{ + sc->base = get_seg_base(e1, e2); + sc->limit = get_seg_limit(e1, e2); + sc->flags = e2; +} + + +static __attribute__ (( always_inline )) __inline__ void load_seg_vm(int seg, int selector) +{ + selector &= 0xffff; + cpu_x86_load_seg_cache(env, seg, selector, + (selector << 4), 0xffff, 0); +} + +static __attribute__ (( always_inline )) __inline__ void get_ss_esp_from_tss(uint32_t *ss_ptr, + uint32_t *esp_ptr, int dpl) +{ + int type, index, shift; +# 301 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" + if (!(env->tr.flags & (1 << 15))) + cpu_abort(env, "invalid tss"); + type = (env->tr.flags >> 8) & 0xf; + if ((type & 7) != 1) + cpu_abort(env, "invalid tss type"); + shift = type >> 3; + index = (dpl * 4 + 2) << shift; + if (index + (4 << shift) - 1 > env->tr.limit) + raise_exception_err(10, env->tr.selector & 0xfffc); + if (shift == 0) { + *esp_ptr = lduw_kernel(env->tr.base + index); + *ss_ptr = lduw_kernel(env->tr.base + index + 2); + } else { + *esp_ptr = ldl_kernel(env->tr.base + index); + *ss_ptr = lduw_kernel(env->tr.base + index + 4); + } +} + + +static void tss_load_seg(int seg_reg, int selector) +{ + uint32_t e1, e2; + int rpl, dpl, cpl; + + if ((selector & 0xfffc) != 0) { + if (load_segment(&e1, &e2, selector) != 0) + raise_exception_err(10, selector & 0xfffc); + if (!(e2 & (1 << 12))) + raise_exception_err(10, selector & 0xfffc); + rpl = selector & 3; + dpl = (e2 >> 13) & 3; + cpl = env->hflags & (3 << 0); + if (seg_reg == 1) { + if (!(e2 & (1 << 11))) + raise_exception_err(10, selector & 0xfffc); + + if (dpl != rpl) + raise_exception_err(10, selector & 0xfffc); + if ((e2 & (1 << 10)) && dpl > rpl) + raise_exception_err(10, selector & 0xfffc); + } else if (seg_reg == 2) { + + if ((e2 & (1 << 11)) || !(e2 & (1 << 9))) + raise_exception_err(10, selector & 0xfffc); + if (dpl != cpl || dpl != rpl) + raise_exception_err(10, selector & 0xfffc); + } else { + + if ((e2 & (1 << 11)) && !(e2 & (1 << 9))) + raise_exception_err(10, selector & 0xfffc); + + if (((e2 >> 8) & 0xf) < 12) { + if (dpl < cpl || dpl < rpl) + raise_exception_err(10, selector & 0xfffc); + } + } + if (!(e2 & (1 << 15))) + raise_exception_err(11, selector & 0xfffc); + cpu_x86_load_seg_cache(env, seg_reg, selector, + get_seg_base(e1, e2), + get_seg_limit(e1, e2), + e2); + } else { + if (seg_reg == 2 || seg_reg == 1) + raise_exception_err(10, selector & 0xfffc); + } +} + + + + + + +static void switch_tss(int tss_selector, + uint32_t e1, uint32_t e2, int source, + uint32_t next_eip) +{ + int tss_limit, tss_limit_max, type, old_tss_limit_max, old_type, v1, v2, i; + target_ulong tss_base; + uint32_t new_regs[8], new_segs[6]; + uint32_t new_eflags, new_eip, new_cr3, new_ldt, new_trap; + uint32_t old_eflags, eflags_mask; + SegmentCache *dt; + int index; + target_ulong ptr; + + type = (e2 >> 8) & 0xf; + do { } while (0); + + + if (type == 5) { + if (!(e2 & (1 << 15))) + raise_exception_err(11, tss_selector & 0xfffc); + tss_selector = e1 >> 16; + if (tss_selector & 4) + raise_exception_err(10, tss_selector & 0xfffc); + if (load_segment(&e1, &e2, tss_selector) != 0) + raise_exception_err(13, tss_selector & 0xfffc); + if (e2 & (1 << 12)) + raise_exception_err(13, tss_selector & 0xfffc); + type = (e2 >> 8) & 0xf; + if ((type & 7) != 1) + raise_exception_err(13, tss_selector & 0xfffc); + } + + if (!(e2 & (1 << 15))) + raise_exception_err(11, tss_selector & 0xfffc); + + if (type & 8) + tss_limit_max = 103; + else + tss_limit_max = 43; + tss_limit = get_seg_limit(e1, e2); + tss_base = get_seg_base(e1, e2); + if ((tss_selector & 4) != 0 || + tss_limit < tss_limit_max) + raise_exception_err(10, tss_selector & 0xfffc); + old_type = (env->tr.flags >> 8) & 0xf; + if (old_type & 8) + old_tss_limit_max = 103; + else + old_tss_limit_max = 43; + + + if (type & 8) { + + new_cr3 = ldl_kernel(tss_base + 0x1c); + new_eip = ldl_kernel(tss_base + 0x20); + new_eflags = ldl_kernel(tss_base + 0x24); + for(i = 0; i < 8; i++) + new_regs[i] = ldl_kernel(tss_base + (0x28 + i * 4)); + for(i = 0; i < 6; i++) + new_segs[i] = lduw_kernel(tss_base + (0x48 + i * 4)); + new_ldt = lduw_kernel(tss_base + 0x60); + new_trap = ldl_kernel(tss_base + 0x64); + } else { + + new_cr3 = 0; + new_eip = lduw_kernel(tss_base + 0x0e); + new_eflags = lduw_kernel(tss_base + 0x10); + for(i = 0; i < 8; i++) + new_regs[i] = lduw_kernel(tss_base + (0x12 + i * 2)) | 0xffff0000; + for(i = 0; i < 4; i++) + new_segs[i] = lduw_kernel(tss_base + (0x22 + i * 4)); + new_ldt = lduw_kernel(tss_base + 0x2a); + new_segs[4] = 0; + new_segs[5] = 0; + new_trap = 0; + } + + + + (void)new_trap; + + + + + + + v1 = ldub_kernel(env->tr.base); + v2 = ldub_kernel(env->tr.base + old_tss_limit_max); + stb_kernel(env->tr.base, v1); + stb_kernel(env->tr.base + old_tss_limit_max, v2); + + + if (source == 0 || source == 1) { + target_ulong ptr; + uint32_t e2; + ptr = env->gdt.base + (env->tr.selector & ~7); + e2 = ldl_kernel(ptr + 4); + e2 &= ~(1 << 9); + stl_kernel(ptr + 4, e2); + } + old_eflags = compute_eflags(); + if (source == 1) + old_eflags &= ~0x00004000; + + + if (type & 8) { + + stl_kernel(env->tr.base + 0x20, next_eip); + stl_kernel(env->tr.base + 0x24, old_eflags); + stl_kernel(env->tr.base + (0x28 + 0 * 4), (env->regs[0])); + stl_kernel(env->tr.base + (0x28 + 1 * 4), (env->regs[1])); + stl_kernel(env->tr.base + (0x28 + 2 * 4), (env->regs[2])); + stl_kernel(env->tr.base + (0x28 + 3 * 4), (env->regs[3])); + stl_kernel(env->tr.base + (0x28 + 4 * 4), (env->regs[4])); + stl_kernel(env->tr.base + (0x28 + 5 * 4), (env->regs[5])); + stl_kernel(env->tr.base + (0x28 + 6 * 4), (env->regs[6])); + stl_kernel(env->tr.base + (0x28 + 7 * 4), (env->regs[7])); + for(i = 0; i < 6; i++) + stw_kernel(env->tr.base + (0x48 + i * 4), env->segs[i].selector); + } else { + + stw_kernel(env->tr.base + 0x0e, next_eip); + stw_kernel(env->tr.base + 0x10, old_eflags); + stw_kernel(env->tr.base + (0x12 + 0 * 2), (env->regs[0])); + stw_kernel(env->tr.base + (0x12 + 1 * 2), (env->regs[1])); + stw_kernel(env->tr.base + (0x12 + 2 * 2), (env->regs[2])); + stw_kernel(env->tr.base + (0x12 + 3 * 2), (env->regs[3])); + stw_kernel(env->tr.base + (0x12 + 4 * 2), (env->regs[4])); + stw_kernel(env->tr.base + (0x12 + 5 * 2), (env->regs[5])); + stw_kernel(env->tr.base + (0x12 + 6 * 2), (env->regs[6])); + stw_kernel(env->tr.base + (0x12 + 7 * 2), (env->regs[7])); + for(i = 0; i < 4; i++) + stw_kernel(env->tr.base + (0x22 + i * 4), env->segs[i].selector); + } + + + + + if (source == 2) { + stw_kernel(tss_base, env->tr.selector); + new_eflags |= 0x00004000; + } + + + if (source == 0 || source == 2) { + target_ulong ptr; + uint32_t e2; + ptr = env->gdt.base + (tss_selector & ~7); + e2 = ldl_kernel(ptr + 4); + e2 |= (1 << 9); + stl_kernel(ptr + 4, e2); + } + + + + env->cr[0] |= (1 << 3); + env->hflags |= (1 << 11); + env->tr.selector = tss_selector; + env->tr.base = tss_base; + env->tr.limit = tss_limit; + env->tr.flags = e2 & ~(1 << 9); + + if ((type & 8) && (env->cr[0] & (1 << 31))) { + cpu_x86_update_cr3(env, new_cr3); + } + + + + env->eip = new_eip; + eflags_mask = 0x00000100 | 0x00040000 | 0x00200000 | + 0x00000200 | 0x00003000 | 0x00020000 | 0x00010000 | 0x00004000; + if (!(type & 8)) + eflags_mask &= 0xffff; + load_eflags(new_eflags, eflags_mask); + + (env->regs[0]) = new_regs[0]; + (env->regs[1]) = new_regs[1]; + (env->regs[2]) = new_regs[2]; + (env->regs[3]) = new_regs[3]; + (env->regs[4]) = new_regs[4]; + (env->regs[5]) = new_regs[5]; + (env->regs[6]) = new_regs[6]; + (env->regs[7]) = new_regs[7]; + if (new_eflags & 0x00020000) { + for(i = 0; i < 6; i++) + load_seg_vm(i, new_segs[i]); + + cpu_x86_set_cpl(env, 3); + } else { + + cpu_x86_set_cpl(env, new_segs[1] & 3); + + for(i = 0; i < 6; i++) + cpu_x86_load_seg_cache(env, i, new_segs[i], 0, 0, 0); + } + + env->ldt.selector = new_ldt & ~4; + env->ldt.base = 0; + env->ldt.limit = 0; + env->ldt.flags = 0; + + + if (new_ldt & 4) + raise_exception_err(10, new_ldt & 0xfffc); + + if ((new_ldt & 0xfffc) != 0) { + dt = &env->gdt; + index = new_ldt & ~7; + if ((index + 7) > dt->limit) + raise_exception_err(10, new_ldt & 0xfffc); + ptr = dt->base + index; + e1 = ldl_kernel(ptr); + e2 = ldl_kernel(ptr + 4); + if ((e2 & (1 << 12)) || ((e2 >> 8) & 0xf) != 2) + raise_exception_err(10, new_ldt & 0xfffc); + if (!(e2 & (1 << 15))) + raise_exception_err(10, new_ldt & 0xfffc); + load_seg_cache_raw_dt(&env->ldt, e1, e2); + } + + + if (!(new_eflags & 0x00020000)) { + tss_load_seg(1, new_segs[1]); + tss_load_seg(2, new_segs[2]); + tss_load_seg(0, new_segs[0]); + tss_load_seg(3, new_segs[3]); + tss_load_seg(4, new_segs[4]); + tss_load_seg(5, new_segs[5]); + } + + + if (new_eip > env->segs[1].limit) { + + raise_exception_err(13, 0); + } + + + + if (env->dr[7] & 0x55) { + for (i = 0; i < 4; i++) { + if (hw_breakpoint_enabled(env->dr[7], i) == 0x1) + hw_breakpoint_remove(env, i); + } + env->dr[7] &= ~0x55; + } + +} + + +static __attribute__ (( always_inline )) __inline__ void check_io(int addr, int size) +{ + int io_offset, val, mask; + + + if (!(env->tr.flags & (1 << 15)) || + ((env->tr.flags >> 8) & 0xf) != 9 || + env->tr.limit < 103) + goto fail; + io_offset = lduw_kernel(env->tr.base + 0x66); + io_offset += (addr >> 3); + + if ((io_offset + 1) > env->tr.limit) + goto fail; + val = lduw_kernel(env->tr.base + io_offset); + val >>= (addr & 7); + mask = (1 << size) - 1; + + if ((val & mask) != 0) { + fail: + raise_exception_err(13, 0); + } +} + +void helper_check_iob(uint32_t t0) +{ + check_io(t0, 1); +} + +void helper_check_iow(uint32_t t0) +{ + check_io(t0, 2); +} + +void helper_check_iol(uint32_t t0) +{ + check_io(t0, 4); +} + +void helper_outb(uint32_t port, uint32_t data) +{ + cpu_outb(port, data & 0xff); +} + +target_ulong helper_inb(uint32_t port) +{ + return cpu_inb(port); +} + +void helper_outw(uint32_t port, uint32_t data) +{ + cpu_outw(port, data & 0xffff); +} + +target_ulong helper_inw(uint32_t port) +{ + return cpu_inw(port); +} + +void helper_outl(uint32_t port, uint32_t data) +{ + cpu_outl(port, data); +} + +target_ulong helper_inl(uint32_t port) +{ + return cpu_inl(port); +} + +static __attribute__ (( always_inline )) __inline__ unsigned int get_sp_mask(unsigned int e2) +{ + if (e2 & (1 << 22)) + return 0xffffffff; + else + return 0xffff; +} + +static int exeption_has_error_code(int intno) +{ + switch(intno) { + case 8: + case 10: + case 11: + case 12: + case 13: + case 14: + case 17: + return 1; + } + return 0; +} +# 759 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" +static void do_interrupt_protected(int intno, int is_int, int error_code, + unsigned int next_eip, int is_hw) +{ + SegmentCache *dt; + target_ulong ptr, ssp; + int type, dpl, selector, ss_dpl, cpl; + int has_error_code, new_stack, shift; + uint32_t e1, e2, offset, ss = 0, esp, ss_e1 = 0, ss_e2 = 0; + uint32_t old_eip, sp_mask; + + has_error_code = 0; + if (!is_int && !is_hw) + has_error_code = exeption_has_error_code(intno); + if (is_int) + old_eip = next_eip; + else + old_eip = env->eip; + + dt = &env->idt; + if (intno * 8 + 7 > dt->limit) + raise_exception_err(13, intno * 8 + 2); + ptr = dt->base + intno * 8; + e1 = ldl_kernel(ptr); + e2 = ldl_kernel(ptr + 4); + + type = (e2 >> 8) & 0x1f; + switch(type) { + case 5: + + if (!(e2 & (1 << 15))) + raise_exception_err(11, intno * 8 + 2); + switch_tss(intno * 8, e1, e2, 2, old_eip); + if (has_error_code) { + int type; + uint32_t mask; + + type = (env->tr.flags >> 8) & 0xf; + shift = type >> 3; + if (env->segs[2].flags & (1 << 22)) + mask = 0xffffffff; + else + mask = 0xffff; + esp = ((env->regs[4]) - (2 << shift)) & mask; + ssp = env->segs[2].base + esp; + if (shift) + stl_kernel(ssp, error_code); + else + stw_kernel(ssp, error_code); + (env->regs[4]) = ((env->regs[4]) & ~(mask)) | ((esp) & (mask)); + } + return; + case 6: + case 7: + case 14: + case 15: + break; + default: + raise_exception_err(13, intno * 8 + 2); + break; + } + dpl = (e2 >> 13) & 3; + cpl = env->hflags & (3 << 0); + + if (is_int && dpl < cpl) + raise_exception_err(13, intno * 8 + 2); + + if (!(e2 & (1 << 15))) + raise_exception_err(11, intno * 8 + 2); + selector = e1 >> 16; + offset = (e2 & 0xffff0000) | (e1 & 0x0000ffff); + if ((selector & 0xfffc) == 0) + raise_exception_err(13, 0); + + if (load_segment(&e1, &e2, selector) != 0) + raise_exception_err(13, selector & 0xfffc); + if (!(e2 & (1 << 12)) || !(e2 & ((1 << 11)))) + raise_exception_err(13, selector & 0xfffc); + dpl = (e2 >> 13) & 3; + if (dpl > cpl) + raise_exception_err(13, selector & 0xfffc); + if (!(e2 & (1 << 15))) + raise_exception_err(11, selector & 0xfffc); + if (!(e2 & (1 << 10)) && dpl < cpl) { + + get_ss_esp_from_tss(&ss, &esp, dpl); + if ((ss & 0xfffc) == 0) + raise_exception_err(10, ss & 0xfffc); + if ((ss & 3) != dpl) + raise_exception_err(10, ss & 0xfffc); + if (load_segment(&ss_e1, &ss_e2, ss) != 0) + raise_exception_err(10, ss & 0xfffc); + ss_dpl = (ss_e2 >> 13) & 3; + if (ss_dpl != dpl) + raise_exception_err(10, ss & 0xfffc); + if (!(ss_e2 & (1 << 12)) || + (ss_e2 & (1 << 11)) || + !(ss_e2 & (1 << 9))) + raise_exception_err(10, ss & 0xfffc); + if (!(ss_e2 & (1 << 15))) + raise_exception_err(10, ss & 0xfffc); + new_stack = 1; + sp_mask = get_sp_mask(ss_e2); + ssp = get_seg_base(ss_e1, ss_e2); + } else if ((e2 & (1 << 10)) || dpl == cpl) { + + if (env->eflags & 0x00020000) + raise_exception_err(13, selector & 0xfffc); + new_stack = 0; + sp_mask = get_sp_mask(env->segs[2].flags); + ssp = env->segs[2].base; + esp = (env->regs[4]); + dpl = cpl; + } else { + raise_exception_err(13, selector & 0xfffc); + new_stack = 0; + sp_mask = 0; + ssp = 0; + esp = 0; + } + + shift = type >> 3; +# 888 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" + if (shift == 1) { + if (new_stack) { + if (env->eflags & 0x00020000) { + { esp -= 4; stl_kernel(((uint32_t)((ssp) + (esp & (sp_mask)))), (uint32_t)(env->segs[5].selector));}; + { esp -= 4; stl_kernel(((uint32_t)((ssp) + (esp & (sp_mask)))), (uint32_t)(env->segs[4].selector));}; + { esp -= 4; stl_kernel(((uint32_t)((ssp) + (esp & (sp_mask)))), (uint32_t)(env->segs[3].selector));}; + { esp -= 4; stl_kernel(((uint32_t)((ssp) + (esp & (sp_mask)))), (uint32_t)(env->segs[0].selector));}; + } + { esp -= 4; stl_kernel(((uint32_t)((ssp) + (esp & (sp_mask)))), (uint32_t)(env->segs[2].selector));}; + { esp -= 4; stl_kernel(((uint32_t)((ssp) + (esp & (sp_mask)))), (uint32_t)((env->regs[4])));}; + } + { esp -= 4; stl_kernel(((uint32_t)((ssp) + (esp & (sp_mask)))), (uint32_t)(compute_eflags()));}; + { esp -= 4; stl_kernel(((uint32_t)((ssp) + (esp & (sp_mask)))), (uint32_t)(env->segs[1].selector));}; + { esp -= 4; stl_kernel(((uint32_t)((ssp) + (esp & (sp_mask)))), (uint32_t)(old_eip));}; + if (has_error_code) { + { esp -= 4; stl_kernel(((uint32_t)((ssp) + (esp & (sp_mask)))), (uint32_t)(error_code));}; + } + } else { + if (new_stack) { + if (env->eflags & 0x00020000) { + { esp -= 2; stw_kernel((ssp) + (esp & (sp_mask)), (env->segs[5].selector));}; + { esp -= 2; stw_kernel((ssp) + (esp & (sp_mask)), (env->segs[4].selector));}; + { esp -= 2; stw_kernel((ssp) + (esp & (sp_mask)), (env->segs[3].selector));}; + { esp -= 2; stw_kernel((ssp) + (esp & (sp_mask)), (env->segs[0].selector));}; + } + { esp -= 2; stw_kernel((ssp) + (esp & (sp_mask)), (env->segs[2].selector));}; + { esp -= 2; stw_kernel((ssp) + (esp & (sp_mask)), ((env->regs[4])));}; + } + { esp -= 2; stw_kernel((ssp) + (esp & (sp_mask)), (compute_eflags()));}; + { esp -= 2; stw_kernel((ssp) + (esp & (sp_mask)), (env->segs[1].selector));}; + { esp -= 2; stw_kernel((ssp) + (esp & (sp_mask)), (old_eip));}; + if (has_error_code) { + { esp -= 2; stw_kernel((ssp) + (esp & (sp_mask)), (error_code));}; + } + } + + if (new_stack) { + if (env->eflags & 0x00020000) { + cpu_x86_load_seg_cache(env, 0, 0, 0, 0, 0); + cpu_x86_load_seg_cache(env, 3, 0, 0, 0, 0); + cpu_x86_load_seg_cache(env, 4, 0, 0, 0, 0); + cpu_x86_load_seg_cache(env, 5, 0, 0, 0, 0); + } + ss = (ss & ~3) | dpl; + cpu_x86_load_seg_cache(env, 2, ss, + ssp, get_seg_limit(ss_e1, ss_e2), ss_e2); + } + (env->regs[4]) = ((env->regs[4]) & ~(sp_mask)) | ((esp) & (sp_mask)); + + selector = (selector & ~3) | dpl; + cpu_x86_load_seg_cache(env, 1, selector, + get_seg_base(e1, e2), + get_seg_limit(e1, e2), + e2); + cpu_x86_set_cpl(env, dpl); + env->eip = offset; + + + if ((type & 1) == 0) { + env->eflags &= ~0x00000200; + } + env->eflags &= ~(0x00000100 | 0x00020000 | 0x00010000 | 0x00004000); +} +# 1221 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" +static void do_interrupt_real(int intno, int is_int, int error_code, + unsigned int next_eip) +{ + SegmentCache *dt; + target_ulong ptr, ssp; + int selector; + uint32_t offset, esp; + uint32_t old_cs, old_eip; + + + dt = &env->idt; + if (intno * 4 + 3 > dt->limit) + raise_exception_err(13, intno * 8 + 2); + ptr = dt->base + intno * 4; + offset = lduw_kernel(ptr); + selector = lduw_kernel(ptr + 2); + esp = (env->regs[4]); + ssp = env->segs[2].base; + if (is_int) + old_eip = next_eip; + else + old_eip = env->eip; + old_cs = env->segs[1].selector; + + { esp -= 2; stw_kernel((ssp) + (esp & (0xffff)), (compute_eflags()));}; + { esp -= 2; stw_kernel((ssp) + (esp & (0xffff)), (old_cs));}; + { esp -= 2; stw_kernel((ssp) + (esp & (0xffff)), (old_eip));}; + + + (env->regs[4]) = ((env->regs[4]) & ~0xffff) | (esp & 0xffff); + env->eip = offset; + env->segs[1].selector = selector; + env->segs[1].base = (selector << 4); + env->eflags &= ~(0x00000200 | 0x00000100 | 0x00040000 | 0x00010000); +} +# 1291 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" +static void handle_even_inj(int intno, int is_int, int error_code, + int is_hw, int rm) +{ + uint32_t event_inj = ldl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.event_inj)); + if (!(event_inj & (1 << 31))) { + int type; + if (is_int) + type = (4 << 8); + else + type = (3 << 8); + event_inj = intno | type | (1 << 31); + if (!rm && exeption_has_error_code(intno)) { + event_inj |= (1 << 11); + stl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.event_inj_err), error_code); + } + stl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.event_inj), event_inj); + } +} + + + + + + + +static void do_interrupt_all(int intno, int is_int, int error_code, + target_ulong next_eip, int is_hw) +{ + if (((loglevel & ((1 << 4))) != 0)) { + if ((env->cr[0] & (1 << 0))) { + static int count; + do { if (logfile) fprintf(logfile,"%6d: v=%02x e=%04x i=%d cpl=%d IP=%04x:" "%08x" " pc=" "%08x" " SP=%04x:" "%08x", count, intno, error_code, is_int, env->hflags & (3 << 0), env->segs[1].selector, (env->eip), (int)env->segs[1].base + (env->eip), env->segs[2].selector, (env->regs[4])); } while (0) + + + + + ; + if (intno == 0x0e) { + do { if (logfile) fprintf(logfile," CR2=" "%08x", env->cr[2]); } while (0); + } else { + do { if (logfile) fprintf(logfile," EAX=" "%08x", (env->regs[0])); } while (0); + } + do { if (logfile) fprintf(logfile,"\n"); } while (0); + cpu_dump_state((env), logfile, fprintf, (0x0002));; +# 1347 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" + count++; + } + } + if (env->cr[0] & (1 << 0)) { + + if (env->hflags & (1 << 21)) + handle_even_inj(intno, is_int, error_code, is_hw, 0); + + + + + + + { + do_interrupt_protected(intno, is_int, error_code, next_eip, is_hw); + } + } else { + + if (env->hflags & (1 << 21)) + handle_even_inj(intno, is_int, error_code, is_hw, 1); + + do_interrupt_real(intno, is_int, error_code, next_eip); + } + + + if (env->hflags & (1 << 21)) { + uint32_t event_inj = ldl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.event_inj)); + stl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.event_inj), event_inj & ~(1 << 31)); + } + +} + +void do_interrupt(CPUX86State *env1) +{ + CPUX86State *saved_env; + + saved_env = env; + env = env1; +# 1399 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" + do_interrupt_all(env->exception_index, + env->exception_is_int, + env->error_code, + env->exception_next_eip, 0); + + env->old_exception = -1; + + env = saved_env; +} + +void do_interrupt_x86_hardirq(CPUX86State *env1, int intno, int is_hw) +{ + CPUX86State *saved_env; + + saved_env = env; + env = env1; + do_interrupt_all(intno, 0, 0, 0, is_hw); + env = saved_env; +} + + +void qemu_system_reset_request(void); + + + + + + +static int check_exception(int intno, int *error_code) +{ + int first_contributory = env->old_exception == 0 || + (env->old_exception >= 10 && + env->old_exception <= 13); + int second_contributory = intno == 0 || + (intno >= 10 && intno <= 13); + + do { if (loglevel & ((1 << 4))) fprintf(logfile, "check_exception old: 0x%x new 0x%x\n", env->old_exception, intno); } while (0) + ; + + + if (env->old_exception == 8) { + if (env->hflags & (1 << 21)) + helper_vmexit(0x07f, 0); + + do { if (loglevel & ((1 << 9))) fprintf(logfile, "Triple fault\n"); } while (0); + + qemu_system_reset_request(); + return 0x10001; + } + + + if ((first_contributory && second_contributory) + || (env->old_exception == 14 && + (second_contributory || (intno == 14)))) { + intno = 8; + *error_code = 0; + } + + if (second_contributory || (intno == 14) || + (intno == 8)) + env->old_exception = intno; + + return intno; +} + + + + + + + +static void __attribute__ ((__noreturn__)) raise_interrupt(int intno, int is_int, int error_code, + int next_eip_addend) +{ + if (!is_int) { + helper_svm_check_intercept_param(0x040 + intno, error_code); + intno = check_exception(intno, &error_code); + } else { + helper_svm_check_intercept_param(0x075, 0); + } + + env->exception_index = intno; + env->error_code = error_code; + env->exception_is_int = is_int; + env->exception_next_eip = env->eip + next_eip_addend; + cpu_loop_exit(env); +} + + + +static void __attribute__ ((__noreturn__)) raise_exception_err(int exception_index, + int error_code) +{ + raise_interrupt(exception_index, 0, error_code, 0); +} + +void raise_exception_err_env(CPUX86State *nenv, int exception_index, + int error_code) +{ + env = nenv; + raise_interrupt(exception_index, 0, error_code, 0); +} + +static void __attribute__ ((__noreturn__)) raise_exception(int exception_index) +{ + raise_interrupt(exception_index, 0, 0, 0); +} + +void raise_exception_env(int exception_index, CPUX86State *nenv) +{ + env = nenv; + raise_exception(exception_index); +} +# 1532 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" +void do_smm_enter(CPUX86State *env1) +{ + target_ulong sm_state; + SegmentCache *dt; + int i, offset; + CPUX86State *saved_env; + + saved_env = env; + env = env1; + + do { if (loglevel & ((1 << 4))) fprintf(logfile, "SMM: enter\n"); } while (0); + do { if (loglevel & ((1 << 4))) cpu_dump_state(((env)), logfile, fprintf, ((0x0002)));; } while (0); + + env->hflags |= (1 << 19); + cpu_smm_update(env); + + sm_state = env->smbase + 0x8000; +# 1600 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" + stl_phys(sm_state + 0x7ffc, env->cr[0]); + stl_phys(sm_state + 0x7ff8, env->cr[3]); + stl_phys(sm_state + 0x7ff4, compute_eflags()); + stl_phys(sm_state + 0x7ff0, env->eip); + stl_phys(sm_state + 0x7fec, (env->regs[7])); + stl_phys(sm_state + 0x7fe8, (env->regs[6])); + stl_phys(sm_state + 0x7fe4, (env->regs[5])); + stl_phys(sm_state + 0x7fe0, (env->regs[4])); + stl_phys(sm_state + 0x7fdc, (env->regs[3])); + stl_phys(sm_state + 0x7fd8, (env->regs[2])); + stl_phys(sm_state + 0x7fd4, (env->regs[1])); + stl_phys(sm_state + 0x7fd0, (env->regs[0])); + stl_phys(sm_state + 0x7fcc, env->dr[6]); + stl_phys(sm_state + 0x7fc8, env->dr[7]); + + stl_phys(sm_state + 0x7fc4, env->tr.selector); + stl_phys(sm_state + 0x7f64, env->tr.base); + stl_phys(sm_state + 0x7f60, env->tr.limit); + stl_phys(sm_state + 0x7f5c, (env->tr.flags >> 8) & 0xf0ff); + + stl_phys(sm_state + 0x7fc0, env->ldt.selector); + stl_phys(sm_state + 0x7f80, env->ldt.base); + stl_phys(sm_state + 0x7f7c, env->ldt.limit); + stl_phys(sm_state + 0x7f78, (env->ldt.flags >> 8) & 0xf0ff); + + stl_phys(sm_state + 0x7f74, env->gdt.base); + stl_phys(sm_state + 0x7f70, env->gdt.limit); + + stl_phys(sm_state + 0x7f58, env->idt.base); + stl_phys(sm_state + 0x7f54, env->idt.limit); + + for(i = 0; i < 6; i++) { + dt = &env->segs[i]; + if (i < 3) + offset = 0x7f84 + i * 12; + else + offset = 0x7f2c + (i - 3) * 12; + stl_phys(sm_state + 0x7fa8 + i * 4, dt->selector); + stl_phys(sm_state + offset + 8, dt->base); + stl_phys(sm_state + offset + 4, dt->limit); + stl_phys(sm_state + offset, (dt->flags >> 8) & 0xf0ff); + } + stl_phys(sm_state + 0x7f14, env->cr[4]); + + stl_phys(sm_state + 0x7efc, 0x00020000); + stl_phys(sm_state + 0x7ef8, env->smbase); + + + + + + + load_eflags(0, ~(0x0800 | 0x0080 | 0x0040 | 0x0010 | 0x0004 | 0x0001 | 0x00000400)); + env->eip = 0x00008000; + cpu_x86_load_seg_cache(env, 1, (env->smbase >> 4) & 0xffff, env->smbase, + 0xffffffff, 0); + cpu_x86_load_seg_cache(env, 3, 0, 0, 0xffffffff, 0); + cpu_x86_load_seg_cache(env, 0, 0, 0, 0xffffffff, 0); + cpu_x86_load_seg_cache(env, 2, 0, 0, 0xffffffff, 0); + cpu_x86_load_seg_cache(env, 4, 0, 0, 0xffffffff, 0); + cpu_x86_load_seg_cache(env, 5, 0, 0, 0xffffffff, 0); + + cpu_x86_update_cr0(env, + env->cr[0] & ~((1 << 0) | (1 << 2) | (1 << 3) | (1 << 31))); + cpu_x86_update_cr4(env, 0); + env->dr[7] = 0x00000400; + (env->cc_op) = CC_OP_EFLAGS; + env = saved_env; +} + +void helper_rsm(void) +{ + target_ulong sm_state; + int i, offset; + uint32_t val; + + sm_state = env->smbase + 0x8000; +# 1730 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" + cpu_x86_update_cr0(env, ldl_phys(sm_state + 0x7ffc)); + cpu_x86_update_cr3(env, ldl_phys(sm_state + 0x7ff8)); + load_eflags(ldl_phys(sm_state + 0x7ff4), + ~(0x0800 | 0x0080 | 0x0040 | 0x0010 | 0x0004 | 0x0001 | 0x00000400)); + env->eip = ldl_phys(sm_state + 0x7ff0); + (env->regs[7]) = ldl_phys(sm_state + 0x7fec); + (env->regs[6]) = ldl_phys(sm_state + 0x7fe8); + (env->regs[5]) = ldl_phys(sm_state + 0x7fe4); + (env->regs[4]) = ldl_phys(sm_state + 0x7fe0); + (env->regs[3]) = ldl_phys(sm_state + 0x7fdc); + (env->regs[2]) = ldl_phys(sm_state + 0x7fd8); + (env->regs[1]) = ldl_phys(sm_state + 0x7fd4); + (env->regs[0]) = ldl_phys(sm_state + 0x7fd0); + env->dr[6] = ldl_phys(sm_state + 0x7fcc); + env->dr[7] = ldl_phys(sm_state + 0x7fc8); + + env->tr.selector = ldl_phys(sm_state + 0x7fc4) & 0xffff; + env->tr.base = ldl_phys(sm_state + 0x7f64); + env->tr.limit = ldl_phys(sm_state + 0x7f60); + env->tr.flags = (ldl_phys(sm_state + 0x7f5c) & 0xf0ff) << 8; + + env->ldt.selector = ldl_phys(sm_state + 0x7fc0) & 0xffff; + env->ldt.base = ldl_phys(sm_state + 0x7f80); + env->ldt.limit = ldl_phys(sm_state + 0x7f7c); + env->ldt.flags = (ldl_phys(sm_state + 0x7f78) & 0xf0ff) << 8; + + env->gdt.base = ldl_phys(sm_state + 0x7f74); + env->gdt.limit = ldl_phys(sm_state + 0x7f70); + + env->idt.base = ldl_phys(sm_state + 0x7f58); + env->idt.limit = ldl_phys(sm_state + 0x7f54); + + for(i = 0; i < 6; i++) { + if (i < 3) + offset = 0x7f84 + i * 12; + else + offset = 0x7f2c + (i - 3) * 12; + cpu_x86_load_seg_cache(env, i, + ldl_phys(sm_state + 0x7fa8 + i * 4) & 0xffff, + ldl_phys(sm_state + offset + 8), + ldl_phys(sm_state + offset + 4), + (ldl_phys(sm_state + offset) & 0xf0ff) << 8); + } + cpu_x86_update_cr4(env, ldl_phys(sm_state + 0x7f14)); + + val = ldl_phys(sm_state + 0x7efc); + if (val & 0x20000) { + env->smbase = ldl_phys(sm_state + 0x7ef8) & ~0x7fff; + } + + (env->cc_op) = CC_OP_EFLAGS; + env->hflags &= ~(1 << 19); + cpu_smm_update(env); + + do { if (loglevel & ((1 << 4))) fprintf(logfile, "SMM: after RSM\n"); } while (0); + do { if (loglevel & ((1 << 4))) cpu_dump_state(((env)), logfile, fprintf, ((0x0002)));; } while (0); +} + + + + + + +void helper_divb_AL(target_ulong t0) +{ + unsigned int num, den, q, r; + + num = ((env->regs[0]) & 0xffff); + den = (t0 & 0xff); + if (den == 0) { + raise_exception(0); + } + q = (num / den); + if (q > 0xff) + raise_exception(0); + q &= 0xff; + r = (num % den) & 0xff; + (env->regs[0]) = ((env->regs[0]) & ~0xffff) | (r << 8) | q; +} + +void helper_idivb_AL(target_ulong t0) +{ + int num, den, q, r; + + num = (int16_t)(env->regs[0]); + den = (int8_t)t0; + if (den == 0) { + raise_exception(0); + } + q = (num / den); + if (q != (int8_t)q) + raise_exception(0); + q &= 0xff; + r = (num % den) & 0xff; + (env->regs[0]) = ((env->regs[0]) & ~0xffff) | (r << 8) | q; +} + +void helper_divw_AX(target_ulong t0) +{ + unsigned int num, den, q, r; + + num = ((env->regs[0]) & 0xffff) | (((env->regs[2]) & 0xffff) << 16); + den = (t0 & 0xffff); + if (den == 0) { + raise_exception(0); + } + q = (num / den); + if (q > 0xffff) + raise_exception(0); + q &= 0xffff; + r = (num % den) & 0xffff; + (env->regs[0]) = ((env->regs[0]) & ~0xffff) | q; + (env->regs[2]) = ((env->regs[2]) & ~0xffff) | r; +} + +void helper_idivw_AX(target_ulong t0) +{ + int num, den, q, r; + + num = ((env->regs[0]) & 0xffff) | (((env->regs[2]) & 0xffff) << 16); + den = (int16_t)t0; + if (den == 0) { + raise_exception(0); + } + q = (num / den); + if (q != (int16_t)q) + raise_exception(0); + q &= 0xffff; + r = (num % den) & 0xffff; + (env->regs[0]) = ((env->regs[0]) & ~0xffff) | q; + (env->regs[2]) = ((env->regs[2]) & ~0xffff) | r; +} + +void helper_divl_EAX(target_ulong t0) +{ + unsigned int den, r; + uint64_t num, q; + + num = ((uint32_t)(env->regs[0])) | ((uint64_t)((uint32_t)(env->regs[2])) << 32); + den = t0; + if (den == 0) { + raise_exception(0); + } + q = (num / den); + r = (num % den); + if (q > 0xffffffff) + raise_exception(0); + (env->regs[0]) = (uint32_t)q; + (env->regs[2]) = (uint32_t)r; +} + +void helper_idivl_EAX(target_ulong t0) +{ + int den, r; + int64_t num, q; + + num = ((uint32_t)(env->regs[0])) | ((uint64_t)((uint32_t)(env->regs[2])) << 32); + den = t0; + if (den == 0) { + raise_exception(0); + } + q = (num / den); + r = (num % den); + if (q != (int32_t)q) + raise_exception(0); + (env->regs[0]) = (uint32_t)q; + (env->regs[2]) = (uint32_t)r; +} + + + + +void helper_aam(int base) +{ + int al, ah; + al = (env->regs[0]) & 0xff; + ah = al / base; + al = al % base; + (env->regs[0]) = ((env->regs[0]) & ~0xffff) | al | (ah << 8); + (env->cc_dst) = al; +} + +void helper_aad(int base) +{ + int al, ah; + al = (env->regs[0]) & 0xff; + ah = ((env->regs[0]) >> 8) & 0xff; + al = ((ah * base) + al) & 0xff; + (env->regs[0]) = ((env->regs[0]) & ~0xffff) | al; + (env->cc_dst) = al; +} + +void helper_aaa(void) +{ + int icarry; + int al, ah, af; + int eflags; + + eflags = helper_cc_compute_all((env->cc_op)); + af = eflags & 0x0010; + al = (env->regs[0]) & 0xff; + ah = ((env->regs[0]) >> 8) & 0xff; + + icarry = (al > 0xf9); + if (((al & 0x0f) > 9 ) || af) { + al = (al + 6) & 0x0f; + ah = (ah + 1 + icarry) & 0xff; + eflags |= 0x0001 | 0x0010; + } else { + eflags &= ~(0x0001 | 0x0010); + al &= 0x0f; + } + (env->regs[0]) = ((env->regs[0]) & ~0xffff) | al | (ah << 8); + (env->cc_src) = eflags; +} + +void helper_aas(void) +{ + int icarry; + int al, ah, af; + int eflags; + + eflags = helper_cc_compute_all((env->cc_op)); + af = eflags & 0x0010; + al = (env->regs[0]) & 0xff; + ah = ((env->regs[0]) >> 8) & 0xff; + + icarry = (al < 6); + if (((al & 0x0f) > 9 ) || af) { + al = (al - 6) & 0x0f; + ah = (ah - 1 - icarry) & 0xff; + eflags |= 0x0001 | 0x0010; + } else { + eflags &= ~(0x0001 | 0x0010); + al &= 0x0f; + } + (env->regs[0]) = ((env->regs[0]) & ~0xffff) | al | (ah << 8); + (env->cc_src) = eflags; +} + +void helper_daa(void) +{ + int old_al, al, af, cf; + int eflags; + + eflags = helper_cc_compute_all((env->cc_op)); + cf = eflags & 0x0001; + af = eflags & 0x0010; + old_al = al = (env->regs[0]) & 0xff; + + eflags = 0; + if (((al & 0x0f) > 9 ) || af) { + al = (al + 6) & 0xff; + eflags |= 0x0010; + } + if ((old_al > 0x99) || cf) { + al = (al + 0x60) & 0xff; + eflags |= 0x0001; + } + (env->regs[0]) = ((env->regs[0]) & ~0xff) | al; + + eflags |= (al == 0) << 6; + eflags |= parity_table[al]; + eflags |= (al & 0x80); + (env->cc_src) = eflags; +} + +void helper_das(void) +{ + int al, al1, af, cf; + int eflags; + + eflags = helper_cc_compute_all((env->cc_op)); + cf = eflags & 0x0001; + af = eflags & 0x0010; + al = (env->regs[0]) & 0xff; + + eflags = 0; + al1 = al; + if (((al & 0x0f) > 9 ) || af) { + eflags |= 0x0010; + if (al < 6 || cf) + eflags |= 0x0001; + al = (al - 6) & 0xff; + } + if ((al1 > 0x99) || cf) { + al = (al - 0x60) & 0xff; + eflags |= 0x0001; + } + (env->regs[0]) = ((env->regs[0]) & ~0xff) | al; + + eflags |= (al == 0) << 6; + eflags |= parity_table[al]; + eflags |= (al & 0x80); + (env->cc_src) = eflags; +} + +void helper_into(int next_eip_addend) +{ + int eflags; + eflags = helper_cc_compute_all((env->cc_op)); + if (eflags & 0x0800) { + raise_interrupt(4, 1, 0, next_eip_addend); + } +} + +void helper_cmpxchg8b(target_ulong a0) +{ + uint64_t d; + int eflags; + + eflags = helper_cc_compute_all((env->cc_op)); + d = ldq_data(a0); + if (d == (((uint64_t)(env->regs[2]) << 32) | (uint32_t)(env->regs[0]))) { + stq_data(a0, ((uint64_t)(env->regs[1]) << 32) | (uint32_t)(env->regs[3])); + eflags |= 0x0040; + } else { + + stq_data(a0, d); + (env->regs[2]) = (uint32_t)(d >> 32); + (env->regs[0]) = (uint32_t)d; + eflags &= ~0x0040; + } + (env->cc_src) = eflags; +} +# 2083 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" +void helper_single_step(void) +{ + + check_hw_breakpoints(env, 1); + env->dr[6] |= (1 << 14); + + raise_exception(1); +} + +void helper_cpuid(void) +{ + uint32_t eax, ebx, ecx, edx; + + helper_svm_check_intercept_param(0x072, 0); + + cpu_x86_cpuid(env, (uint32_t)(env->regs[0]), (uint32_t)(env->regs[1]), &eax, &ebx, &ecx, &edx); + (env->regs[0]) = eax; + (env->regs[3]) = ebx; + (env->regs[1]) = ecx; + (env->regs[2]) = edx; +} + +void helper_enter_level(int level, int data32, target_ulong t1) +{ + target_ulong ssp; + uint32_t esp_mask, esp, ebp; + + esp_mask = get_sp_mask(env->segs[2].flags); + ssp = env->segs[2].base; + ebp = (env->regs[5]); + esp = (env->regs[4]); + if (data32) { + + esp -= 4; + while (--level) { + esp -= 4; + ebp -= 4; + stl_data(ssp + (esp & esp_mask), ldl_data(ssp + (ebp & esp_mask))); + } + esp -= 4; + stl_data(ssp + (esp & esp_mask), t1); + } else { + + esp -= 2; + while (--level) { + esp -= 2; + ebp -= 2; + stw_data(ssp + (esp & esp_mask), lduw_data(ssp + (ebp & esp_mask))); + } + esp -= 2; + stw_data(ssp + (esp & esp_mask), t1); + } +} +# 2168 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" +void helper_lldt(int selector) +{ + SegmentCache *dt; + uint32_t e1, e2; + int index, entry_limit; + target_ulong ptr; + + selector &= 0xffff; + if ((selector & 0xfffc) == 0) { + + env->ldt.base = 0; + env->ldt.limit = 0; + } else { + if (selector & 0x4) + raise_exception_err(13, selector & 0xfffc); + dt = &env->gdt; + index = selector & ~7; + + + + + + entry_limit = 7; + if ((index + entry_limit) > dt->limit) + raise_exception_err(13, selector & 0xfffc); + ptr = dt->base + index; + e1 = ldl_kernel(ptr); + e2 = ldl_kernel(ptr + 4); + if ((e2 & (1 << 12)) || ((e2 >> 8) & 0xf) != 2) + raise_exception_err(13, selector & 0xfffc); + if (!(e2 & (1 << 15))) + raise_exception_err(11, selector & 0xfffc); +# 2208 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" + { + load_seg_cache_raw_dt(&env->ldt, e1, e2); + } + } + env->ldt.selector = selector; +} + +void helper_ltr(int selector) +{ + SegmentCache *dt; + uint32_t e1, e2; + int index, type, entry_limit; + target_ulong ptr; + + selector &= 0xffff; + if ((selector & 0xfffc) == 0) { + + env->tr.base = 0; + env->tr.limit = 0; + env->tr.flags = 0; + } else { + if (selector & 0x4) + raise_exception_err(13, selector & 0xfffc); + dt = &env->gdt; + index = selector & ~7; + + + + + + entry_limit = 7; + if ((index + entry_limit) > dt->limit) + raise_exception_err(13, selector & 0xfffc); + ptr = dt->base + index; + e1 = ldl_kernel(ptr); + e2 = ldl_kernel(ptr + 4); + type = (e2 >> 8) & 0xf; + if ((e2 & (1 << 12)) || + (type != 1 && type != 9)) + raise_exception_err(13, selector & 0xfffc); + if (!(e2 & (1 << 15))) + raise_exception_err(11, selector & 0xfffc); +# 2261 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" + { + load_seg_cache_raw_dt(&env->tr, e1, e2); + } + e2 |= (1 << 9); + stl_kernel(ptr + 4, e2); + } + env->tr.selector = selector; +} + + +void helper_load_seg(int seg_reg, int selector) +{ + uint32_t e1, e2; + int cpl, dpl, rpl; + SegmentCache *dt; + int index; + target_ulong ptr; + + selector &= 0xffff; + cpl = env->hflags & (3 << 0); + if ((selector & 0xfffc) == 0) { + + if (seg_reg == 2 + + + + ) + raise_exception_err(13, 0); + cpu_x86_load_seg_cache(env, seg_reg, selector, 0, 0, 0); + } else { + + if (selector & 0x4) + dt = &env->ldt; + else + dt = &env->gdt; + index = selector & ~7; + if ((index + 7) > dt->limit) + raise_exception_err(13, selector & 0xfffc); + ptr = dt->base + index; + e1 = ldl_kernel(ptr); + e2 = ldl_kernel(ptr + 4); + + if (!(e2 & (1 << 12))) + raise_exception_err(13, selector & 0xfffc); + rpl = selector & 3; + dpl = (e2 >> 13) & 3; + if (seg_reg == 2) { + + if ((e2 & (1 << 11)) || !(e2 & (1 << 9))) + raise_exception_err(13, selector & 0xfffc); + if (rpl != cpl || dpl != cpl) + raise_exception_err(13, selector & 0xfffc); + } else { + + if ((e2 & ((1 << 11) | (1 << 9))) == (1 << 11)) + raise_exception_err(13, selector & 0xfffc); + + if (!(e2 & (1 << 11)) || !(e2 & (1 << 10))) { + + if (dpl < cpl || dpl < rpl) + raise_exception_err(13, selector & 0xfffc); + } + } + + if (!(e2 & (1 << 15))) { + if (seg_reg == 2) + raise_exception_err(12, selector & 0xfffc); + else + raise_exception_err(11, selector & 0xfffc); + } + + + if (!(e2 & (1 << 8))) { + e2 |= (1 << 8); + stl_kernel(ptr + 4, e2); + } + + cpu_x86_load_seg_cache(env, seg_reg, selector, + get_seg_base(e1, e2), + get_seg_limit(e1, e2), + e2); + + + + + } +} + + +void helper_ljmp_protected(int new_cs, target_ulong new_eip, + int next_eip_addend) +{ + int gate_cs, type; + uint32_t e1, e2, cpl, dpl, rpl, limit; + target_ulong next_eip; + + if ((new_cs & 0xfffc) == 0) + raise_exception_err(13, 0); + if (load_segment(&e1, &e2, new_cs) != 0) + raise_exception_err(13, new_cs & 0xfffc); + cpl = env->hflags & (3 << 0); + if (e2 & (1 << 12)) { + if (!(e2 & (1 << 11))) + raise_exception_err(13, new_cs & 0xfffc); + dpl = (e2 >> 13) & 3; + if (e2 & (1 << 10)) { + + if (dpl > cpl) + raise_exception_err(13, new_cs & 0xfffc); + } else { + + rpl = new_cs & 3; + if (rpl > cpl) + raise_exception_err(13, new_cs & 0xfffc); + if (dpl != cpl) + raise_exception_err(13, new_cs & 0xfffc); + } + if (!(e2 & (1 << 15))) + raise_exception_err(11, new_cs & 0xfffc); + limit = get_seg_limit(e1, e2); + if (new_eip > limit && + !(env->hflags & (1 << 14)) && !(e2 & (1 << 21))) + raise_exception_err(13, new_cs & 0xfffc); + cpu_x86_load_seg_cache(env, 1, (new_cs & 0xfffc) | cpl, + get_seg_base(e1, e2), limit, e2); + (env->eip) = new_eip; + } else { + + dpl = (e2 >> 13) & 3; + rpl = new_cs & 3; + cpl = env->hflags & (3 << 0); + type = (e2 >> 8) & 0xf; + switch(type) { + case 1: + case 9: + case 5: + if (dpl < cpl || dpl < rpl) + raise_exception_err(13, new_cs & 0xfffc); + next_eip = env->eip + next_eip_addend; + switch_tss(new_cs, e1, e2, 0, next_eip); + (env->cc_op) = CC_OP_EFLAGS; + break; + case 4: + case 12: + if ((dpl < cpl) || (dpl < rpl)) + raise_exception_err(13, new_cs & 0xfffc); + if (!(e2 & (1 << 15))) + raise_exception_err(11, new_cs & 0xfffc); + gate_cs = e1 >> 16; + new_eip = (e1 & 0xffff); + if (type == 12) + new_eip |= (e2 & 0xffff0000); + if (load_segment(&e1, &e2, gate_cs) != 0) + raise_exception_err(13, gate_cs & 0xfffc); + dpl = (e2 >> 13) & 3; + + if (((e2 & ((1 << 12) | (1 << 11))) != + ((1 << 12) | (1 << 11)))) + raise_exception_err(13, gate_cs & 0xfffc); + if (((e2 & (1 << 10)) && (dpl > cpl)) || + (!(e2 & (1 << 10)) && (dpl != cpl))) + raise_exception_err(13, gate_cs & 0xfffc); + if (!(e2 & (1 << 15))) + raise_exception_err(13, gate_cs & 0xfffc); + limit = get_seg_limit(e1, e2); + if (new_eip > limit) + raise_exception_err(13, 0); + cpu_x86_load_seg_cache(env, 1, (gate_cs & 0xfffc) | cpl, + get_seg_base(e1, e2), limit, e2); + (env->eip) = new_eip; + break; + default: + raise_exception_err(13, new_cs & 0xfffc); + break; + } + } +} + + +void helper_lcall_real(int new_cs, target_ulong new_eip1, + int shift, int next_eip) +{ + int new_eip; + uint32_t esp, esp_mask; + target_ulong ssp; + + new_eip = new_eip1; + esp = (env->regs[4]); + esp_mask = get_sp_mask(env->segs[2].flags); + ssp = env->segs[2].base; + if (shift) { + { esp -= 4; stl_kernel(((uint32_t)((ssp) + (esp & (esp_mask)))), (uint32_t)(env->segs[1].selector));}; + { esp -= 4; stl_kernel(((uint32_t)((ssp) + (esp & (esp_mask)))), (uint32_t)(next_eip));}; + } else { + { esp -= 2; stw_kernel((ssp) + (esp & (esp_mask)), (env->segs[1].selector));}; + { esp -= 2; stw_kernel((ssp) + (esp & (esp_mask)), (next_eip));}; + } + + (env->regs[4]) = ((env->regs[4]) & ~(esp_mask)) | ((esp) & (esp_mask)); + env->eip = new_eip; + env->segs[1].selector = new_cs; + env->segs[1].base = (new_cs << 4); +} + + +void helper_lcall_protected(int new_cs, target_ulong new_eip, + int shift, int next_eip_addend) +{ + int new_stack, i; + uint32_t e1, e2, cpl, dpl, rpl, selector, offset, param_count; + uint32_t ss = 0, ss_e1 = 0, ss_e2 = 0, sp, type, ss_dpl, sp_mask; + uint32_t val, limit, old_sp_mask; + target_ulong ssp, old_ssp, next_eip; + + next_eip = env->eip + next_eip_addend; + do { } while (0); + do { } while (0); + if ((new_cs & 0xfffc) == 0) + raise_exception_err(13, 0); + if (load_segment(&e1, &e2, new_cs) != 0) + raise_exception_err(13, new_cs & 0xfffc); + cpl = env->hflags & (3 << 0); + do { } while (0); + if (e2 & (1 << 12)) { + if (!(e2 & (1 << 11))) + raise_exception_err(13, new_cs & 0xfffc); + dpl = (e2 >> 13) & 3; + if (e2 & (1 << 10)) { + + if (dpl > cpl) + raise_exception_err(13, new_cs & 0xfffc); + } else { + + rpl = new_cs & 3; + if (rpl > cpl) + raise_exception_err(13, new_cs & 0xfffc); + if (dpl != cpl) + raise_exception_err(13, new_cs & 0xfffc); + } + if (!(e2 & (1 << 15))) + raise_exception_err(11, new_cs & 0xfffc); +# 2519 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" + { + sp = (env->regs[4]); + sp_mask = get_sp_mask(env->segs[2].flags); + ssp = env->segs[2].base; + if (shift) { + { sp -= 4; stl_kernel(((uint32_t)((ssp) + (sp & (sp_mask)))), (uint32_t)(env->segs[1].selector));}; + { sp -= 4; stl_kernel(((uint32_t)((ssp) + (sp & (sp_mask)))), (uint32_t)(next_eip));}; + } else { + { sp -= 2; stw_kernel((ssp) + (sp & (sp_mask)), (env->segs[1].selector));}; + { sp -= 2; stw_kernel((ssp) + (sp & (sp_mask)), (next_eip));}; + } + + limit = get_seg_limit(e1, e2); + if (new_eip > limit) + raise_exception_err(13, new_cs & 0xfffc); + + (env->regs[4]) = ((env->regs[4]) & ~(sp_mask)) | ((sp) & (sp_mask)); + cpu_x86_load_seg_cache(env, 1, (new_cs & 0xfffc) | cpl, + get_seg_base(e1, e2), limit, e2); + (env->eip) = new_eip; + } + } else { + + type = (e2 >> 8) & 0x1f; + dpl = (e2 >> 13) & 3; + rpl = new_cs & 3; + switch(type) { + case 1: + case 9: + case 5: + if (dpl < cpl || dpl < rpl) + raise_exception_err(13, new_cs & 0xfffc); + switch_tss(new_cs, e1, e2, 2, next_eip); + (env->cc_op) = CC_OP_EFLAGS; + return; + case 4: + case 12: + break; + default: + raise_exception_err(13, new_cs & 0xfffc); + break; + } + shift = type >> 3; + + if (dpl < cpl || dpl < rpl) + raise_exception_err(13, new_cs & 0xfffc); + + if (!(e2 & (1 << 15))) + raise_exception_err(11, new_cs & 0xfffc); + selector = e1 >> 16; + offset = (e2 & 0xffff0000) | (e1 & 0x0000ffff); + param_count = e2 & 0x1f; + if ((selector & 0xfffc) == 0) + raise_exception_err(13, 0); + + if (load_segment(&e1, &e2, selector) != 0) + raise_exception_err(13, selector & 0xfffc); + if (!(e2 & (1 << 12)) || !(e2 & ((1 << 11)))) + raise_exception_err(13, selector & 0xfffc); + dpl = (e2 >> 13) & 3; + if (dpl > cpl) + raise_exception_err(13, selector & 0xfffc); + if (!(e2 & (1 << 15))) + raise_exception_err(11, selector & 0xfffc); + + if (!(e2 & (1 << 10)) && dpl < cpl) { + + get_ss_esp_from_tss(&ss, &sp, dpl); + do { } while (0) + ; + if ((ss & 0xfffc) == 0) + raise_exception_err(10, ss & 0xfffc); + if ((ss & 3) != dpl) + raise_exception_err(10, ss & 0xfffc); + if (load_segment(&ss_e1, &ss_e2, ss) != 0) + raise_exception_err(10, ss & 0xfffc); + ss_dpl = (ss_e2 >> 13) & 3; + if (ss_dpl != dpl) + raise_exception_err(10, ss & 0xfffc); + if (!(ss_e2 & (1 << 12)) || + (ss_e2 & (1 << 11)) || + !(ss_e2 & (1 << 9))) + raise_exception_err(10, ss & 0xfffc); + if (!(ss_e2 & (1 << 15))) + raise_exception_err(10, ss & 0xfffc); + + + + old_sp_mask = get_sp_mask(env->segs[2].flags); + old_ssp = env->segs[2].base; + + sp_mask = get_sp_mask(ss_e2); + ssp = get_seg_base(ss_e1, ss_e2); + if (shift) { + { sp -= 4; stl_kernel(((uint32_t)((ssp) + (sp & (sp_mask)))), (uint32_t)(env->segs[2].selector));}; + { sp -= 4; stl_kernel(((uint32_t)((ssp) + (sp & (sp_mask)))), (uint32_t)((env->regs[4])));}; + for(i = param_count - 1; i >= 0; i--) { + val = ldl_kernel(old_ssp + (((env->regs[4]) + i * 4) & old_sp_mask)); + { sp -= 4; stl_kernel(((uint32_t)((ssp) + (sp & (sp_mask)))), (uint32_t)(val));}; + } + } else { + { sp -= 2; stw_kernel((ssp) + (sp & (sp_mask)), (env->segs[2].selector));}; + { sp -= 2; stw_kernel((ssp) + (sp & (sp_mask)), ((env->regs[4])));}; + for(i = param_count - 1; i >= 0; i--) { + val = lduw_kernel(old_ssp + (((env->regs[4]) + i * 2) & old_sp_mask)); + { sp -= 2; stw_kernel((ssp) + (sp & (sp_mask)), (val));}; + } + } + new_stack = 1; + } else { + + sp = (env->regs[4]); + sp_mask = get_sp_mask(env->segs[2].flags); + ssp = env->segs[2].base; + + new_stack = 0; + } + + if (shift) { + { sp -= 4; stl_kernel(((uint32_t)((ssp) + (sp & (sp_mask)))), (uint32_t)(env->segs[1].selector));}; + { sp -= 4; stl_kernel(((uint32_t)((ssp) + (sp & (sp_mask)))), (uint32_t)(next_eip));}; + } else { + { sp -= 2; stw_kernel((ssp) + (sp & (sp_mask)), (env->segs[1].selector));}; + { sp -= 2; stw_kernel((ssp) + (sp & (sp_mask)), (next_eip));}; + } + + + + if (new_stack) { + ss = (ss & ~3) | dpl; + cpu_x86_load_seg_cache(env, 2, ss, + ssp, + get_seg_limit(ss_e1, ss_e2), + ss_e2); + } + + selector = (selector & ~3) | dpl; + cpu_x86_load_seg_cache(env, 1, selector, + get_seg_base(e1, e2), + get_seg_limit(e1, e2), + e2); + cpu_x86_set_cpl(env, dpl); + (env->regs[4]) = ((env->regs[4]) & ~(sp_mask)) | ((sp) & (sp_mask)); + (env->eip) = offset; + } +} + + +void helper_iret_real(int shift) +{ + uint32_t sp, new_cs, new_eip, new_eflags, sp_mask; + target_ulong ssp; + int eflags_mask; + + sp_mask = 0xffff; + sp = (env->regs[4]); + ssp = env->segs[2].base; + if (shift == 1) { + + { new_eip = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; + { new_cs = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; + new_cs &= 0xffff; + { new_eflags = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; + } else { + + { new_eip = lduw_kernel((ssp) + (sp & (sp_mask))); sp += 2;}; + { new_cs = lduw_kernel((ssp) + (sp & (sp_mask))); sp += 2;}; + { new_eflags = lduw_kernel((ssp) + (sp & (sp_mask))); sp += 2;}; + } + (env->regs[4]) = ((env->regs[4]) & ~sp_mask) | (sp & sp_mask); + env->segs[1].selector = new_cs; + env->segs[1].base = (new_cs << 4); + env->eip = new_eip; + if (env->eflags & 0x00020000) + eflags_mask = 0x00000100 | 0x00040000 | 0x00200000 | 0x00000200 | 0x00010000 | 0x00004000; + else + eflags_mask = 0x00000100 | 0x00040000 | 0x00200000 | 0x00000200 | 0x00003000 | 0x00010000 | 0x00004000; + if (shift == 0) + eflags_mask &= 0xffff; + load_eflags(new_eflags, eflags_mask); + env->hflags2 &= ~(1 << 2); +} + +static __attribute__ (( always_inline )) __inline__ void validate_seg(int seg_reg, int cpl) +{ + int dpl; + uint32_t e2; + + + + + if ((seg_reg == 4 || seg_reg == 5) && + (env->segs[seg_reg].selector & 0xfffc) == 0) + return; + + e2 = env->segs[seg_reg].flags; + dpl = (e2 >> 13) & 3; + if (!(e2 & (1 << 11)) || !(e2 & (1 << 10))) { + + if (dpl < cpl) { + cpu_x86_load_seg_cache(env, seg_reg, 0, 0, 0, 0); + } + } +} + + +static __attribute__ (( always_inline )) __inline__ void helper_ret_protected(int shift, int is_iret, int addend) +{ + uint32_t new_cs, new_eflags, new_ss; + uint32_t new_es, new_ds, new_fs, new_gs; + uint32_t e1, e2, ss_e1, ss_e2; + int cpl, dpl, rpl, eflags_mask, iopl; + target_ulong ssp, sp, new_eip, new_esp, sp_mask; + + + + + + + sp_mask = get_sp_mask(env->segs[2].flags); + sp = (env->regs[4]); + ssp = env->segs[2].base; + new_eflags = 0; +# 2752 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" + if (shift == 1) { + + { new_eip = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; + { new_cs = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; + new_cs &= 0xffff; + if (is_iret) { + { new_eflags = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; + if (new_eflags & 0x00020000) + goto return_to_vm86; + } + } else { + + { new_eip = lduw_kernel((ssp) + (sp & (sp_mask))); sp += 2;}; + { new_cs = lduw_kernel((ssp) + (sp & (sp_mask))); sp += 2;}; + if (is_iret) + { new_eflags = lduw_kernel((ssp) + (sp & (sp_mask))); sp += 2;}; + } + do { } while (0) + ; + do { } while (0); + if ((new_cs & 0xfffc) == 0) + raise_exception_err(13, new_cs & 0xfffc); + if (load_segment(&e1, &e2, new_cs) != 0) + raise_exception_err(13, new_cs & 0xfffc); + if (!(e2 & (1 << 12)) || + !(e2 & (1 << 11))) + raise_exception_err(13, new_cs & 0xfffc); + cpl = env->hflags & (3 << 0); + rpl = new_cs & 3; + if (rpl < cpl) + raise_exception_err(13, new_cs & 0xfffc); + dpl = (e2 >> 13) & 3; + if (e2 & (1 << 10)) { + if (dpl > rpl) + raise_exception_err(13, new_cs & 0xfffc); + } else { + if (dpl != rpl) + raise_exception_err(13, new_cs & 0xfffc); + } + if (!(e2 & (1 << 15))) + raise_exception_err(11, new_cs & 0xfffc); + + sp += addend; + if (rpl == cpl && (!(env->hflags & (1 << 15)) || + ((env->hflags & (1 << 15)) && !is_iret))) { + + cpu_x86_load_seg_cache(env, 1, new_cs, + get_seg_base(e1, e2), + get_seg_limit(e1, e2), + e2); + } else { +# 2811 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" + if (shift == 1) { + + { new_esp = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; + { new_ss = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; + new_ss &= 0xffff; + } else { + + { new_esp = lduw_kernel((ssp) + (sp & (sp_mask))); sp += 2;}; + { new_ss = lduw_kernel((ssp) + (sp & (sp_mask))); sp += 2;}; + } + do { } while (0) + ; + if ((new_ss & 0xfffc) == 0) { +# 2836 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" + { + raise_exception_err(13, 0); + } + } else { + if ((new_ss & 3) != rpl) + raise_exception_err(13, new_ss & 0xfffc); + if (load_segment(&ss_e1, &ss_e2, new_ss) != 0) + raise_exception_err(13, new_ss & 0xfffc); + if (!(ss_e2 & (1 << 12)) || + (ss_e2 & (1 << 11)) || + !(ss_e2 & (1 << 9))) + raise_exception_err(13, new_ss & 0xfffc); + dpl = (ss_e2 >> 13) & 3; + if (dpl != rpl) + raise_exception_err(13, new_ss & 0xfffc); + if (!(ss_e2 & (1 << 15))) + raise_exception_err(11, new_ss & 0xfffc); + cpu_x86_load_seg_cache(env, 2, new_ss, + get_seg_base(ss_e1, ss_e2), + get_seg_limit(ss_e1, ss_e2), + ss_e2); + } + + cpu_x86_load_seg_cache(env, 1, new_cs, + get_seg_base(e1, e2), + get_seg_limit(e1, e2), + e2); + cpu_x86_set_cpl(env, rpl); + sp = new_esp; + + + + + + sp_mask = get_sp_mask(ss_e2); + + + validate_seg(0, rpl); + validate_seg(3, rpl); + validate_seg(4, rpl); + validate_seg(5, rpl); + + sp += addend; + } + (env->regs[4]) = ((env->regs[4]) & ~(sp_mask)) | ((sp) & (sp_mask)); + env->eip = new_eip; + if (is_iret) { + + eflags_mask = 0x00000100 | 0x00040000 | 0x00200000 | 0x00010000 | 0x00004000; + if (cpl == 0) + eflags_mask |= 0x00003000; + iopl = (env->eflags >> 12) & 3; + if (cpl <= iopl) + eflags_mask |= 0x00000200; + if (shift == 0) + eflags_mask &= 0xffff; + load_eflags(new_eflags, eflags_mask); + } + return; + + return_to_vm86: + { new_esp = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; + { new_ss = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; + { new_es = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; + { new_ds = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; + { new_fs = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; + { new_gs = (uint32_t)ldl_kernel(((uint32_t)((ssp) + (sp & (sp_mask))))); sp += 4;}; + + + load_eflags(new_eflags, 0x00000100 | 0x00040000 | 0x00200000 | + 0x00000200 | 0x00003000 | 0x00020000 | 0x00004000 | 0x00080000 | 0x00100000); + load_seg_vm(1, new_cs & 0xffff); + cpu_x86_set_cpl(env, 3); + load_seg_vm(2, new_ss & 0xffff); + load_seg_vm(0, new_es & 0xffff); + load_seg_vm(3, new_ds & 0xffff); + load_seg_vm(4, new_fs & 0xffff); + load_seg_vm(5, new_gs & 0xffff); + + env->eip = new_eip & 0xffff; + (env->regs[4]) = new_esp; +} + +void helper_iret_protected(int shift, int next_eip) +{ + int tss_selector, type; + uint32_t e1, e2; + + + if (env->eflags & 0x00004000) { + + + + + tss_selector = lduw_kernel(env->tr.base + 0); + if (tss_selector & 4) + raise_exception_err(10, tss_selector & 0xfffc); + if (load_segment(&e1, &e2, tss_selector) != 0) + raise_exception_err(10, tss_selector & 0xfffc); + type = (e2 >> 8) & 0x17; + + if (type != 3) + raise_exception_err(10, tss_selector & 0xfffc); + switch_tss(tss_selector, e1, e2, 1, next_eip); + } else { + helper_ret_protected(shift, 1, 0); + } + env->hflags2 &= ~(1 << 2); +} + +void helper_lret_protected(int shift, int addend) +{ + helper_ret_protected(shift, 0, addend); +} + +void helper_sysenter(void) +{ + if (env->sysenter_cs == 0) { + raise_exception_err(13, 0); + } + env->eflags &= ~(0x00020000 | 0x00000200 | 0x00010000); + cpu_x86_set_cpl(env, 0); +# 2968 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" + { + cpu_x86_load_seg_cache(env, 1, env->sysenter_cs & 0xfffc, + 0, 0xffffffff, + (1 << 23) | (1 << 22) | (1 << 15) | + (1 << 12) | + (1 << 11) | (1 << 9) | (1 << 8)); + } + cpu_x86_load_seg_cache(env, 2, (env->sysenter_cs + 8) & 0xfffc, + 0, 0xffffffff, + (1 << 23) | (1 << 22) | (1 << 15) | + (1 << 12) | + (1 << 9) | (1 << 8)); + (env->regs[4]) = env->sysenter_esp; + (env->eip) = env->sysenter_eip; +} + +void helper_sysexit(int dflag) +{ + int cpl; + + cpl = env->hflags & (3 << 0); + if (env->sysenter_cs == 0 || cpl != 0) { + raise_exception_err(13, 0); + } + cpu_x86_set_cpl(env, 3); +# 3007 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" + { + cpu_x86_load_seg_cache(env, 1, ((env->sysenter_cs + 16) & 0xfffc) | 3, + 0, 0xffffffff, + (1 << 23) | (1 << 22) | (1 << 15) | + (1 << 12) | (3 << 13) | + (1 << 11) | (1 << 9) | (1 << 8)); + cpu_x86_load_seg_cache(env, 2, ((env->sysenter_cs + 24) & 0xfffc) | 3, + 0, 0xffffffff, + (1 << 23) | (1 << 22) | (1 << 15) | + (1 << 12) | (3 << 13) | + (1 << 9) | (1 << 8)); + } + (env->regs[4]) = (env->regs[1]); + (env->eip) = (env->regs[2]); +} +# 3037 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" +target_ulong helper_read_crN(int reg) +{ + target_ulong val; + + helper_svm_check_intercept_param(0x000 + reg, 0); + switch(reg) { + default: + val = env->cr[reg]; + break; + case 8: + if (!(env->hflags2 & (1 << 3))) { + val = cpu_get_apic_tpr(env->apic_state); + } else { + val = env->v_tpr; + } + break; + } + return val; +} + +void helper_write_crN(int reg, target_ulong t0) +{ + helper_svm_check_intercept_param(0x010 + reg, 0); + switch(reg) { + case 0: + cpu_x86_update_cr0(env, t0); + break; + case 3: + cpu_x86_update_cr3(env, t0); + break; + case 4: + cpu_x86_update_cr4(env, t0); + break; + case 8: + if (!(env->hflags2 & (1 << 3))) { + cpu_set_apic_tpr(env->apic_state, t0); + } + env->v_tpr = t0 & 0x0f; + break; + default: + env->cr[reg] = t0; + break; + } +} + +void helper_movl_drN_T0(int reg, target_ulong t0) +{ + int i; + + if (reg < 4) { + hw_breakpoint_remove(env, reg); + env->dr[reg] = t0; + hw_breakpoint_insert(env, reg); + } else if (reg == 7) { + for (i = 0; i < 4; i++) + hw_breakpoint_remove(env, i); + env->dr[7] = t0; + for (i = 0; i < 4; i++) + hw_breakpoint_insert(env, i); + } else + env->dr[reg] = t0; +} + + +void helper_lmsw(target_ulong t0) +{ + + + t0 = (env->cr[0] & ~0xe) | (t0 & 0xf); + helper_write_crN(0, t0); +} + +void helper_clts(void) +{ + env->cr[0] &= ~(1 << 3); + env->hflags &= ~(1 << 11); +} + +void helper_invlpg(target_ulong addr) +{ + helper_svm_check_intercept_param(0x079, 0); + tlb_flush_page(env, addr); +} + +void helper_rdtsc(void) +{ + uint64_t val; + + if ((env->cr[4] & (1 << 2)) && ((env->hflags & (3 << 0)) != 0)) { + raise_exception(13); + } + helper_svm_check_intercept_param(0x06e, 0); + + val = cpu_get_tsc(env) + env->tsc_offset; + (env->regs[0]) = (uint32_t)(val); + (env->regs[2]) = (uint32_t)(val >> 32); +} + +void helper_rdtscp(void) +{ + helper_rdtsc(); + (env->regs[1]) = (uint32_t)(env->tsc_aux); +} + +void helper_rdpmc(void) +{ + if ((env->cr[4] & (1 << 8)) && ((env->hflags & (3 << 0)) != 0)) { + raise_exception(13); + } + helper_svm_check_intercept_param(0x06f, 0); + + + raise_exception_err(6, 0); +} +# 3161 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" +void helper_wrmsr(void) +{ + uint64_t val; + + helper_svm_check_intercept_param(0x07c, 1); + + val = ((uint32_t)(env->regs[0])) | ((uint64_t)((uint32_t)(env->regs[2])) << 32); + + switch((uint32_t)(env->regs[1])) { + case 0x174: + env->sysenter_cs = val & 0xffff; + break; + case 0x175: + env->sysenter_esp = val; + break; + case 0x176: + env->sysenter_eip = val; + break; + case 0x1b: + cpu_set_apic_base(env->apic_state, val); + break; + case 0xc0000080: + { + uint64_t update_mask; + update_mask = 0; + if (env->cpuid_ext2_features & (1 << 11)) + update_mask |= (1 << 0); + if (env->cpuid_ext2_features & (1 << 29)) + update_mask |= (1 << 8); + if (env->cpuid_ext2_features & (1 << 25)) + update_mask |= (1 << 14); + if (env->cpuid_ext2_features & (1 << 20)) + update_mask |= (1 << 11); + if (env->cpuid_ext3_features & (1 << 2)) + update_mask |= (1 << 12); + if (env->cpuid_ext2_features & (1 << 25)) + update_mask |= (1 << 14); + cpu_load_efer(env, (env->efer & ~update_mask) | + (val & update_mask)); + } + break; + case 0xc0000081: + env->star = val; + break; + case 0x277: + env->pat = val; + break; + case 0xc0010117: + env->vm_hsave = val; + break; +# 3231 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" + case (0x200 + 2 * (0)): + case (0x200 + 2 * (1)): + case (0x200 + 2 * (2)): + case (0x200 + 2 * (3)): + case (0x200 + 2 * (4)): + case (0x200 + 2 * (5)): + case (0x200 + 2 * (6)): + case (0x200 + 2 * (7)): + env->mtrr_var[((uint32_t)(env->regs[1]) - (0x200 + 2 * (0))) / 2].base = val; + break; + case (0x200 + 2 * (0) + 1): + case (0x200 + 2 * (1) + 1): + case (0x200 + 2 * (2) + 1): + case (0x200 + 2 * (3) + 1): + case (0x200 + 2 * (4) + 1): + case (0x200 + 2 * (5) + 1): + case (0x200 + 2 * (6) + 1): + case (0x200 + 2 * (7) + 1): + env->mtrr_var[((uint32_t)(env->regs[1]) - (0x200 + 2 * (0) + 1)) / 2].mask = val; + break; + case 0x250: + env->mtrr_fixed[(uint32_t)(env->regs[1]) - 0x250] = val; + break; + case 0x258: + case 0x259: + env->mtrr_fixed[(uint32_t)(env->regs[1]) - 0x258 + 1] = val; + break; + case 0x268: + case 0x269: + case 0x26a: + case 0x26b: + case 0x26c: + case 0x26d: + case 0x26e: + case 0x26f: + env->mtrr_fixed[(uint32_t)(env->regs[1]) - 0x268 + 3] = val; + break; + case 0x2ff: + env->mtrr_deftype = val; + break; + case 0x17a: + env->mcg_status = val; + break; + case 0x17b: + if ((env->mcg_cap & (1ULL<<8)) + && (val == 0 || val == ~(uint64_t)0)) + env->mcg_ctl = val; + break; + case 0xc0000103: + env->tsc_aux = val; + break; + case 0x1a0: + env->msr_ia32_misc_enable = val; + break; + default: + if ((uint32_t)(env->regs[1]) >= 0x400 + && (uint32_t)(env->regs[1]) < 0x400 + (4 * env->mcg_cap & 0xff)) { + uint32_t offset = (uint32_t)(env->regs[1]) - 0x400; + if ((offset & 0x3) != 0 + || (val == 0 || val == ~(uint64_t)0)) + env->mce_banks[offset] = val; + break; + } + + break; + } +} + +void helper_rdmsr(void) +{ + uint64_t val; + + helper_svm_check_intercept_param(0x07c, 0); + + switch((uint32_t)(env->regs[1])) { + case 0x174: + val = env->sysenter_cs; + break; + case 0x175: + val = env->sysenter_esp; + break; + case 0x176: + val = env->sysenter_eip; + break; + case 0x1b: + val = cpu_get_apic_base(env->apic_state); + break; + case 0xc0000080: + val = env->efer; + break; + case 0xc0000081: + val = env->star; + break; + case 0x277: + val = env->pat; + break; + case 0xc0010117: + val = env->vm_hsave; + break; + case 0x198: + + val = 1000ULL; + + val |= (((uint64_t)4ULL) << 40); + break; +# 3359 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" + case (0x200 + 2 * (0)): + case (0x200 + 2 * (1)): + case (0x200 + 2 * (2)): + case (0x200 + 2 * (3)): + case (0x200 + 2 * (4)): + case (0x200 + 2 * (5)): + case (0x200 + 2 * (6)): + case (0x200 + 2 * (7)): + val = env->mtrr_var[((uint32_t)(env->regs[1]) - (0x200 + 2 * (0))) / 2].base; + break; + case (0x200 + 2 * (0) + 1): + case (0x200 + 2 * (1) + 1): + case (0x200 + 2 * (2) + 1): + case (0x200 + 2 * (3) + 1): + case (0x200 + 2 * (4) + 1): + case (0x200 + 2 * (5) + 1): + case (0x200 + 2 * (6) + 1): + case (0x200 + 2 * (7) + 1): + val = env->mtrr_var[((uint32_t)(env->regs[1]) - (0x200 + 2 * (0) + 1)) / 2].mask; + break; + case 0x250: + val = env->mtrr_fixed[0]; + break; + case 0x258: + case 0x259: + val = env->mtrr_fixed[(uint32_t)(env->regs[1]) - 0x258 + 1]; + break; + case 0x268: + case 0x269: + case 0x26a: + case 0x26b: + case 0x26c: + case 0x26d: + case 0x26e: + case 0x26f: + val = env->mtrr_fixed[(uint32_t)(env->regs[1]) - 0x268 + 3]; + break; + case 0x2ff: + val = env->mtrr_deftype; + break; + case 0xfe: + if (env->cpuid_features & (1 << 12)) + val = 8 | (1 << 8) | (1 << 10); + else + + val = 0; + break; + case 0x179: + val = env->mcg_cap; + break; + case 0x17b: + if (env->mcg_cap & (1ULL<<8)) + val = env->mcg_ctl; + else + val = 0; + break; + case 0x17a: + val = env->mcg_status; + break; + case 0x1a0: + val = env->msr_ia32_misc_enable; + break; + default: + if ((uint32_t)(env->regs[1]) >= 0x400 + && (uint32_t)(env->regs[1]) < 0x400 + (4 * env->mcg_cap & 0xff)) { + uint32_t offset = (uint32_t)(env->regs[1]) - 0x400; + val = env->mce_banks[offset]; + break; + } + + val = 0; + break; + } + (env->regs[0]) = (uint32_t)(val); + (env->regs[2]) = (uint32_t)(val >> 32); +} + + +target_ulong helper_lsl(target_ulong selector1) +{ + unsigned int limit; + uint32_t e1, e2, eflags, selector; + int rpl, dpl, cpl, type; + + selector = selector1 & 0xffff; + eflags = helper_cc_compute_all((env->cc_op)); + if ((selector & 0xfffc) == 0) + goto fail; + if (load_segment(&e1, &e2, selector) != 0) + goto fail; + rpl = selector & 3; + dpl = (e2 >> 13) & 3; + cpl = env->hflags & (3 << 0); + if (e2 & (1 << 12)) { + if ((e2 & (1 << 11)) && (e2 & (1 << 10))) { + + } else { + if (dpl < cpl || dpl < rpl) + goto fail; + } + } else { + type = (e2 >> 8) & 0xf; + switch(type) { + case 1: + case 2: + case 3: + case 9: + case 11: + break; + default: + goto fail; + } + if (dpl < cpl || dpl < rpl) { + fail: + (env->cc_src) = eflags & ~0x0040; + return 0; + } + } + limit = get_seg_limit(e1, e2); + (env->cc_src) = eflags | 0x0040; + return limit; +} + +target_ulong helper_lar(target_ulong selector1) +{ + uint32_t e1, e2, eflags, selector; + int rpl, dpl, cpl, type; + + selector = selector1 & 0xffff; + eflags = helper_cc_compute_all((env->cc_op)); + if ((selector & 0xfffc) == 0) + goto fail; + if (load_segment(&e1, &e2, selector) != 0) + goto fail; + rpl = selector & 3; + dpl = (e2 >> 13) & 3; + cpl = env->hflags & (3 << 0); + if (e2 & (1 << 12)) { + if ((e2 & (1 << 11)) && (e2 & (1 << 10))) { + + } else { + if (dpl < cpl || dpl < rpl) + goto fail; + } + } else { + type = (e2 >> 8) & 0xf; + switch(type) { + case 1: + case 2: + case 3: + case 4: + case 5: + case 9: + case 11: + case 12: + break; + default: + goto fail; + } + if (dpl < cpl || dpl < rpl) { + fail: + (env->cc_src) = eflags & ~0x0040; + return 0; + } + } + (env->cc_src) = eflags | 0x0040; + return e2 & 0x00f0ff00; +} + +void helper_verr(target_ulong selector1) +{ + uint32_t e1, e2, eflags, selector; + int rpl, dpl, cpl; + + selector = selector1 & 0xffff; + eflags = helper_cc_compute_all((env->cc_op)); + if ((selector & 0xfffc) == 0) + goto fail; + if (load_segment(&e1, &e2, selector) != 0) + goto fail; + if (!(e2 & (1 << 12))) + goto fail; + rpl = selector & 3; + dpl = (e2 >> 13) & 3; + cpl = env->hflags & (3 << 0); + if (e2 & (1 << 11)) { + if (!(e2 & (1 << 9))) + goto fail; + if (!(e2 & (1 << 10))) { + if (dpl < cpl || dpl < rpl) + goto fail; + } + } else { + if (dpl < cpl || dpl < rpl) { + fail: + (env->cc_src) = eflags & ~0x0040; + return; + } + } + (env->cc_src) = eflags | 0x0040; +} + +void helper_verw(target_ulong selector1) +{ + uint32_t e1, e2, eflags, selector; + int rpl, dpl, cpl; + + selector = selector1 & 0xffff; + eflags = helper_cc_compute_all((env->cc_op)); + if ((selector & 0xfffc) == 0) + goto fail; + if (load_segment(&e1, &e2, selector) != 0) + goto fail; + if (!(e2 & (1 << 12))) + goto fail; + rpl = selector & 3; + dpl = (e2 >> 13) & 3; + cpl = env->hflags & (3 << 0); + if (e2 & (1 << 11)) { + goto fail; + } else { + if (dpl < cpl || dpl < rpl) + goto fail; + if (!(e2 & (1 << 9))) { + fail: + (env->cc_src) = eflags & ~0x0040; + return; + } + } + (env->cc_src) = eflags | 0x0040; +} + + + +static __attribute__ (( always_inline )) __inline__ double floatx80_to_double(floatx80 a) +{ + union { + float64 f64; + double d; + } u; + + u.f64 = floatx80_to_float64(a, &env->fp_status); + return u.d; +} + +static __attribute__ (( always_inline )) __inline__ floatx80 double_to_floatx80(double a) +{ + union { + float64 f64; + double d; + } u; + + u.d = a; + return float64_to_floatx80(u.f64, &env->fp_status); +} + +static void fpu_set_exception(int mask) +{ + env->fpus |= mask; + if (env->fpus & (~env->fpuc & 0x3f)) + env->fpus |= (1 << 7) | (1 << 15); +} + +static __attribute__ (( always_inline )) __inline__ floatx80 helper_fdiv(floatx80 a, floatx80 b) +{ + if (floatx80_is_zero(b)) { + fpu_set_exception((1 << 2)); + } + return floatx80_div(a, b, &env->fp_status); +} + +static void fpu_raise_exception(void) +{ + if (env->cr[0] & (1 << 5)) { + raise_exception(16); + } + + else { + cpu_set_ferr(env); + } + +} + +void helper_flds_FT0(uint32_t val) +{ + union { + float32 f; + uint32_t i; + } u; + u.i = val; + (env->ft0) = float32_to_floatx80(u.f, &env->fp_status); +} + +void helper_fldl_FT0(uint64_t val) +{ + union { + float64 f; + uint64_t i; + } u; + u.i = val; + (env->ft0) = float64_to_floatx80(u.f, &env->fp_status); +} + +void helper_fildl_FT0(int32_t val) +{ + (env->ft0) = int32_to_floatx80(val, &env->fp_status); +} + +void helper_flds_ST0(uint32_t val) +{ + int new_fpstt; + union { + float32 f; + uint32_t i; + } u; + new_fpstt = (env->fpstt - 1) & 7; + u.i = val; + env->fpregs[new_fpstt].d = float32_to_floatx80(u.f, &env->fp_status); + env->fpstt = new_fpstt; + env->fptags[new_fpstt] = 0; +} + +void helper_fldl_ST0(uint64_t val) +{ + int new_fpstt; + union { + float64 f; + uint64_t i; + } u; + new_fpstt = (env->fpstt - 1) & 7; + u.i = val; + env->fpregs[new_fpstt].d = float64_to_floatx80(u.f, &env->fp_status); + env->fpstt = new_fpstt; + env->fptags[new_fpstt] = 0; +} + +void helper_fildl_ST0(int32_t val) +{ + int new_fpstt; + new_fpstt = (env->fpstt - 1) & 7; + env->fpregs[new_fpstt].d = int32_to_floatx80(val, &env->fp_status); + env->fpstt = new_fpstt; + env->fptags[new_fpstt] = 0; +} + +void helper_fildll_ST0(int64_t val) +{ + int new_fpstt; + new_fpstt = (env->fpstt - 1) & 7; + env->fpregs[new_fpstt].d = int64_to_floatx80(val, &env->fp_status); + env->fpstt = new_fpstt; + env->fptags[new_fpstt] = 0; +} + +uint32_t helper_fsts_ST0(void) +{ + union { + float32 f; + uint32_t i; + } u; + u.f = floatx80_to_float32((env->fpregs[env->fpstt].d), &env->fp_status); + return u.i; +} + +uint64_t helper_fstl_ST0(void) +{ + union { + float64 f; + uint64_t i; + } u; + u.f = floatx80_to_float64((env->fpregs[env->fpstt].d), &env->fp_status); + return u.i; +} + +int32_t helper_fist_ST0(void) +{ + int32_t val; + val = floatx80_to_int32((env->fpregs[env->fpstt].d), &env->fp_status); + if (val != (int16_t)val) + val = -32768; + return val; +} + +int32_t helper_fistl_ST0(void) +{ + int32_t val; + val = floatx80_to_int32((env->fpregs[env->fpstt].d), &env->fp_status); + return val; +} + +int64_t helper_fistll_ST0(void) +{ + int64_t val; + val = floatx80_to_int64((env->fpregs[env->fpstt].d), &env->fp_status); + return val; +} + +int32_t helper_fistt_ST0(void) +{ + int32_t val; + val = floatx80_to_int32_round_to_zero((env->fpregs[env->fpstt].d), &env->fp_status); + if (val != (int16_t)val) + val = -32768; + return val; +} + +int32_t helper_fisttl_ST0(void) +{ + int32_t val; + val = floatx80_to_int32_round_to_zero((env->fpregs[env->fpstt].d), &env->fp_status); + return val; +} + +int64_t helper_fisttll_ST0(void) +{ + int64_t val; + val = floatx80_to_int64_round_to_zero((env->fpregs[env->fpstt].d), &env->fp_status); + return val; +} + +void helper_fldt_ST0(target_ulong ptr) +{ + int new_fpstt; + new_fpstt = (env->fpstt - 1) & 7; + env->fpregs[new_fpstt].d = helper_fldt(ptr); + env->fpstt = new_fpstt; + env->fptags[new_fpstt] = 0; +} + +void helper_fstt_ST0(target_ulong ptr) +{ + helper_fstt((env->fpregs[env->fpstt].d), ptr); +} + +void helper_fpush(void) +{ + fpush(); +} + +void helper_fpop(void) +{ + fpop(); +} + +void helper_fdecstp(void) +{ + env->fpstt = (env->fpstt - 1) & 7; + env->fpus &= (~0x4700); +} + +void helper_fincstp(void) +{ + env->fpstt = (env->fpstt + 1) & 7; + env->fpus &= (~0x4700); +} + + + +void helper_ffree_STN(int st_index) +{ + env->fptags[(env->fpstt + st_index) & 7] = 1; +} + +void helper_fmov_ST0_FT0(void) +{ + (env->fpregs[env->fpstt].d) = (env->ft0); +} + +void helper_fmov_FT0_STN(int st_index) +{ + (env->ft0) = (env->fpregs[(env->fpstt + (st_index)) & 7].d); +} + +void helper_fmov_ST0_STN(int st_index) +{ + (env->fpregs[env->fpstt].d) = (env->fpregs[(env->fpstt + (st_index)) & 7].d); +} + +void helper_fmov_STN_ST0(int st_index) +{ + (env->fpregs[(env->fpstt + (st_index)) & 7].d) = (env->fpregs[env->fpstt].d); +} + +void helper_fxchg_ST0_STN(int st_index) +{ + floatx80 tmp; + tmp = (env->fpregs[(env->fpstt + (st_index)) & 7].d); + (env->fpregs[(env->fpstt + (st_index)) & 7].d) = (env->fpregs[env->fpstt].d); + (env->fpregs[env->fpstt].d) = tmp; +} + + + +static const int fcom_ccval[4] = {0x0100, 0x4000, 0x0000, 0x4500}; + +void helper_fcom_ST0_FT0(void) +{ + int ret; + + ret = floatx80_compare((env->fpregs[env->fpstt].d), (env->ft0), &env->fp_status); + env->fpus = (env->fpus & ~0x4500) | fcom_ccval[ret + 1]; +} + +void helper_fucom_ST0_FT0(void) +{ + int ret; + + ret = floatx80_compare_quiet((env->fpregs[env->fpstt].d), (env->ft0), &env->fp_status); + env->fpus = (env->fpus & ~0x4500) | fcom_ccval[ret+ 1]; +} + +static const int fcomi_ccval[4] = {0x0001, 0x0040, 0, 0x0040 | 0x0004 | 0x0001}; + +void helper_fcomi_ST0_FT0(void) +{ + int eflags; + int ret; + + ret = floatx80_compare((env->fpregs[env->fpstt].d), (env->ft0), &env->fp_status); + eflags = helper_cc_compute_all((env->cc_op)); + eflags = (eflags & ~(0x0040 | 0x0004 | 0x0001)) | fcomi_ccval[ret + 1]; + (env->cc_src) = eflags; +} + +void helper_fucomi_ST0_FT0(void) +{ + int eflags; + int ret; + + ret = floatx80_compare_quiet((env->fpregs[env->fpstt].d), (env->ft0), &env->fp_status); + eflags = helper_cc_compute_all((env->cc_op)); + eflags = (eflags & ~(0x0040 | 0x0004 | 0x0001)) | fcomi_ccval[ret + 1]; + (env->cc_src) = eflags; +} + +void helper_fadd_ST0_FT0(void) +{ + (env->fpregs[env->fpstt].d) = floatx80_add((env->fpregs[env->fpstt].d), (env->ft0), &env->fp_status); +} + +void helper_fmul_ST0_FT0(void) +{ + (env->fpregs[env->fpstt].d) = floatx80_mul((env->fpregs[env->fpstt].d), (env->ft0), &env->fp_status); +} + +void helper_fsub_ST0_FT0(void) +{ + (env->fpregs[env->fpstt].d) = floatx80_sub((env->fpregs[env->fpstt].d), (env->ft0), &env->fp_status); +} + +void helper_fsubr_ST0_FT0(void) +{ + (env->fpregs[env->fpstt].d) = floatx80_sub((env->ft0), (env->fpregs[env->fpstt].d), &env->fp_status); +} + +void helper_fdiv_ST0_FT0(void) +{ + (env->fpregs[env->fpstt].d) = helper_fdiv((env->fpregs[env->fpstt].d), (env->ft0)); +} + +void helper_fdivr_ST0_FT0(void) +{ + (env->fpregs[env->fpstt].d) = helper_fdiv((env->ft0), (env->fpregs[env->fpstt].d)); +} + + + +void helper_fadd_STN_ST0(int st_index) +{ + (env->fpregs[(env->fpstt + (st_index)) & 7].d) = floatx80_add((env->fpregs[(env->fpstt + (st_index)) & 7].d), (env->fpregs[env->fpstt].d), &env->fp_status); +} + +void helper_fmul_STN_ST0(int st_index) +{ + (env->fpregs[(env->fpstt + (st_index)) & 7].d) = floatx80_mul((env->fpregs[(env->fpstt + (st_index)) & 7].d), (env->fpregs[env->fpstt].d), &env->fp_status); +} + +void helper_fsub_STN_ST0(int st_index) +{ + (env->fpregs[(env->fpstt + (st_index)) & 7].d) = floatx80_sub((env->fpregs[(env->fpstt + (st_index)) & 7].d), (env->fpregs[env->fpstt].d), &env->fp_status); +} + +void helper_fsubr_STN_ST0(int st_index) +{ + (env->fpregs[(env->fpstt + (st_index)) & 7].d) = floatx80_sub((env->fpregs[env->fpstt].d), (env->fpregs[(env->fpstt + (st_index)) & 7].d), &env->fp_status); +} + +void helper_fdiv_STN_ST0(int st_index) +{ + floatx80 *p; + p = &(env->fpregs[(env->fpstt + (st_index)) & 7].d); + *p = helper_fdiv(*p, (env->fpregs[env->fpstt].d)); +} + +void helper_fdivr_STN_ST0(int st_index) +{ + floatx80 *p; + p = &(env->fpregs[(env->fpstt + (st_index)) & 7].d); + *p = helper_fdiv((env->fpregs[env->fpstt].d), *p); +} + + +void helper_fchs_ST0(void) +{ + (env->fpregs[env->fpstt].d) = floatx80_chs((env->fpregs[env->fpstt].d)); +} + +void helper_fabs_ST0(void) +{ + (env->fpregs[env->fpstt].d) = floatx80_abs((env->fpregs[env->fpstt].d)); +} + +void helper_fld1_ST0(void) +{ + (env->fpregs[env->fpstt].d) = ((floatx80) { 0x8000000000000000LL, 0x3fff }); +} + +void helper_fldl2t_ST0(void) +{ + (env->fpregs[env->fpstt].d) = ((floatx80) { 0xd49a784bcd1b8afeLL, 0x4000 }); +} + +void helper_fldl2e_ST0(void) +{ + (env->fpregs[env->fpstt].d) = ((floatx80) { 0xb8aa3b295c17f0bcLL, 0x3fff }); +} + +void helper_fldpi_ST0(void) +{ + (env->fpregs[env->fpstt].d) = ((floatx80) { 0xc90fdaa22168c235LL, 0x4000 }); +} + +void helper_fldlg2_ST0(void) +{ + (env->fpregs[env->fpstt].d) = ((floatx80) { 0x9a209a84fbcff799LL, 0x3ffd }); +} + +void helper_fldln2_ST0(void) +{ + (env->fpregs[env->fpstt].d) = ((floatx80) { 0xb17217f7d1cf79acLL, 0x3ffe }); +} + +void helper_fldz_ST0(void) +{ + (env->fpregs[env->fpstt].d) = ((floatx80) { 0x0000000000000000LL, 0x0000 }); +} + +void helper_fldz_FT0(void) +{ + (env->ft0) = ((floatx80) { 0x0000000000000000LL, 0x0000 }); +} + +uint32_t helper_fnstsw(void) +{ + return (env->fpus & ~0x3800) | (env->fpstt & 0x7) << 11; +} + +uint32_t helper_fnstcw(void) +{ + return env->fpuc; +} + +static void update_fp_status(void) +{ + int rnd_type; + + + switch(env->fpuc & 0xc00) { + default: + case 0x000: + rnd_type = float_round_nearest_even; + break; + case 0x400: + rnd_type = float_round_down; + break; + case 0x800: + rnd_type = float_round_up; + break; + case 0xc00: + rnd_type = float_round_to_zero; + break; + } + set_float_rounding_mode(rnd_type, &env->fp_status); + switch((env->fpuc >> 8) & 3) { + case 0: + rnd_type = 32; + break; + case 2: + rnd_type = 64; + break; + case 3: + default: + rnd_type = 80; + break; + } + set_floatx80_rounding_precision(rnd_type, &env->fp_status); +} + +void helper_fldcw(uint32_t val) +{ + env->fpuc = val; + update_fp_status(); +} + +void helper_fclex(void) +{ + env->fpus &= 0x7f00; +} + +void helper_fwait(void) +{ + if (env->fpus & (1 << 7)) + fpu_raise_exception(); +} + +void helper_fninit(void) +{ + env->fpus = 0; + env->fpstt = 0; + env->fpuc = 0x37f; + env->fptags[0] = 1; + env->fptags[1] = 1; + env->fptags[2] = 1; + env->fptags[3] = 1; + env->fptags[4] = 1; + env->fptags[5] = 1; + env->fptags[6] = 1; + env->fptags[7] = 1; +} + + + +void helper_fbld_ST0(target_ulong ptr) +{ + floatx80 tmp; + uint64_t val; + unsigned int v; + int i; + + val = 0; + for(i = 8; i >= 0; i--) { + v = ldub_data(ptr + i); + val = (val * 100) + ((v >> 4) * 10) + (v & 0xf); + } + tmp = int64_to_floatx80(val, &env->fp_status); + if (ldub_data(ptr + 9) & 0x80) { + floatx80_chs(tmp); + } + fpush(); + (env->fpregs[env->fpstt].d) = tmp; +} + +void helper_fbst_ST0(target_ulong ptr) +{ + int v; + target_ulong mem_ref, mem_end; + int64_t val; + + val = floatx80_to_int64((env->fpregs[env->fpstt].d), &env->fp_status); + mem_ref = ptr; + mem_end = mem_ref + 9; + if (val < 0) { + stb_data(mem_end, 0x80); + val = -val; + } else { + stb_data(mem_end, 0x00); + } + while (mem_ref < mem_end) { + if (val == 0) + break; + v = val % 100; + val = val / 100; + v = ((v / 10) << 4) | (v % 10); + stb_data(mem_ref++, v); + } + while (mem_ref < mem_end) { + stb_data(mem_ref++, 0); + } +} + +void helper_f2xm1(void) +{ + double val = floatx80_to_double((env->fpregs[env->fpstt].d)); + val = pow(2.0, val) - 1.0; + (env->fpregs[env->fpstt].d) = double_to_floatx80(val); +} + +void helper_fyl2x(void) +{ + double fptemp = floatx80_to_double((env->fpregs[env->fpstt].d)); + + if (fptemp>0.0){ + fptemp = log(fptemp)/log(2.0); + fptemp *= floatx80_to_double((env->fpregs[(env->fpstt + (1)) & 7].d)); + (env->fpregs[(env->fpstt + (1)) & 7].d) = double_to_floatx80(fptemp); + fpop(); + } else { + env->fpus &= (~0x4700); + env->fpus |= 0x400; + } +} + +void helper_fptan(void) +{ + double fptemp = floatx80_to_double((env->fpregs[env->fpstt].d)); + + if((fptemp > 9223372036854775808.0)||(fptemp < -9223372036854775808.0)) { + env->fpus |= 0x400; + } else { + fptemp = tan(fptemp); + (env->fpregs[env->fpstt].d) = double_to_floatx80(fptemp); + fpush(); + (env->fpregs[env->fpstt].d) = ((floatx80) { 0x8000000000000000LL, 0x3fff }); + env->fpus &= (~0x400); + + } +} + +void helper_fpatan(void) +{ + double fptemp, fpsrcop; + + fpsrcop = floatx80_to_double((env->fpregs[(env->fpstt + (1)) & 7].d)); + fptemp = floatx80_to_double((env->fpregs[env->fpstt].d)); + (env->fpregs[(env->fpstt + (1)) & 7].d) = double_to_floatx80(atan2(fpsrcop, fptemp)); + fpop(); +} + +void helper_fxtract(void) +{ + CPU_LDoubleU temp; + + temp.d = (env->fpregs[env->fpstt].d); + + if (floatx80_is_zero((env->fpregs[env->fpstt].d))) { + + (env->fpregs[env->fpstt].d) = floatx80_div(floatx80_chs(((floatx80) { 0x8000000000000000LL, 0x3fff })), ((floatx80) { 0x0000000000000000LL, 0x0000 }), &env->fp_status); + fpush(); + (env->fpregs[env->fpstt].d) = temp.d; + } else { + int expdif; + + expdif = (temp.l.upper & 0x7fff) - 16383; + + (env->fpregs[env->fpstt].d) = int32_to_floatx80(expdif, &env->fp_status); + fpush(); + temp.l.upper = (temp.l.upper & ~(0x7fff)) | 16383; + (env->fpregs[env->fpstt].d) = temp.d; + } +} + +void helper_fprem1(void) +{ + double st0, st1, dblq, fpsrcop, fptemp; + CPU_LDoubleU fpsrcop1, fptemp1; + int expdif; + signed long long int q; + + st0 = floatx80_to_double((env->fpregs[env->fpstt].d)); + st1 = floatx80_to_double((env->fpregs[(env->fpstt + (1)) & 7].d)); + + if ((sizeof (st0) == sizeof (float) ? __isinff (st0) : sizeof (st0) == sizeof (double) ? __isinf (st0) : __isinfl (st0)) || (sizeof (st0) == sizeof (float) ? __isnanf (st0) : sizeof (st0) == sizeof (double) ? __isnan (st0) : __isnanl (st0)) || (sizeof (st1) == sizeof (float) ? __isnanf (st1) : sizeof (st1) == sizeof (double) ? __isnan (st1) : __isnanl (st1)) || (st1 == 0.0)) { + (env->fpregs[env->fpstt].d) = double_to_floatx80(0.0 / 0.0); + env->fpus &= (~0x4700); + return; + } + + fpsrcop = st0; + fptemp = st1; + fpsrcop1.d = (env->fpregs[env->fpstt].d); + fptemp1.d = (env->fpregs[(env->fpstt + (1)) & 7].d); + expdif = (fpsrcop1.l.upper & 0x7fff) - (fptemp1.l.upper & 0x7fff); + + if (expdif < 0) { + + env->fpus &= (~0x4700); + + return; + } + + if (expdif < 53) { + dblq = fpsrcop / fptemp; + + dblq = rint(dblq); + st0 = fpsrcop - fptemp * dblq; + + + if (dblq < 0.0) + q = (signed long long int)(-dblq); + else + q = (signed long long int)dblq; + + env->fpus &= (~0x4700); + + env->fpus |= (q & 0x4) << (8 - 2); + env->fpus |= (q & 0x2) << (14 - 1); + env->fpus |= (q & 0x1) << (9 - 0); + } else { + env->fpus |= 0x400; + fptemp = pow(2.0, expdif - 50); + fpsrcop = (st0 / st1) / fptemp; + + fpsrcop = (fpsrcop < 0.0) ? + -(floor(fabs(fpsrcop))) : floor(fpsrcop); + st0 -= (st1 * fpsrcop * fptemp); + } + (env->fpregs[env->fpstt].d) = double_to_floatx80(st0); +} + +void helper_fprem(void) +{ + double st0, st1, dblq, fpsrcop, fptemp; + CPU_LDoubleU fpsrcop1, fptemp1; + int expdif; + signed long long int q; + + st0 = floatx80_to_double((env->fpregs[env->fpstt].d)); + st1 = floatx80_to_double((env->fpregs[(env->fpstt + (1)) & 7].d)); + + if ((sizeof (st0) == sizeof (float) ? __isinff (st0) : sizeof (st0) == sizeof (double) ? __isinf (st0) : __isinfl (st0)) || (sizeof (st0) == sizeof (float) ? __isnanf (st0) : sizeof (st0) == sizeof (double) ? __isnan (st0) : __isnanl (st0)) || (sizeof (st1) == sizeof (float) ? __isnanf (st1) : sizeof (st1) == sizeof (double) ? __isnan (st1) : __isnanl (st1)) || (st1 == 0.0)) { + (env->fpregs[env->fpstt].d) = double_to_floatx80(0.0 / 0.0); + env->fpus &= (~0x4700); + return; + } + + fpsrcop = st0; + fptemp = st1; + fpsrcop1.d = (env->fpregs[env->fpstt].d); + fptemp1.d = (env->fpregs[(env->fpstt + (1)) & 7].d); + expdif = (fpsrcop1.l.upper & 0x7fff) - (fptemp1.l.upper & 0x7fff); + + if (expdif < 0) { + + env->fpus &= (~0x4700); + + return; + } + + if ( expdif < 53 ) { + dblq = fpsrcop / fptemp ; + + dblq = (dblq < 0.0) ? ceil(dblq) : floor(dblq); + st0 = fpsrcop - fptemp * dblq; + + + if (dblq < 0.0) + q = (signed long long int)(-dblq); + else + q = (signed long long int)dblq; + + env->fpus &= (~0x4700); + + env->fpus |= (q & 0x4) << (8 - 2); + env->fpus |= (q & 0x2) << (14 - 1); + env->fpus |= (q & 0x1) << (9 - 0); + } else { + int N = 32 + (expdif % 32); + env->fpus |= 0x400; + fptemp = pow(2.0, (double)(expdif - N)); + fpsrcop = (st0 / st1) / fptemp; + + fpsrcop = (fpsrcop < 0.0) ? + -(floor(fabs(fpsrcop))) : floor(fpsrcop); + st0 -= (st1 * fpsrcop * fptemp); + } + (env->fpregs[env->fpstt].d) = double_to_floatx80(st0); +} + +void helper_fyl2xp1(void) +{ + double fptemp = floatx80_to_double((env->fpregs[env->fpstt].d)); + + if ((fptemp+1.0)>0.0) { + fptemp = log(fptemp+1.0) / log(2.0); + fptemp *= floatx80_to_double((env->fpregs[(env->fpstt + (1)) & 7].d)); + (env->fpregs[(env->fpstt + (1)) & 7].d) = double_to_floatx80(fptemp); + fpop(); + } else { + env->fpus &= (~0x4700); + env->fpus |= 0x400; + } +} + +void helper_fsqrt(void) +{ + if (floatx80_is_neg((env->fpregs[env->fpstt].d))) { + env->fpus &= (~0x4700); + env->fpus |= 0x400; + } + (env->fpregs[env->fpstt].d) = floatx80_sqrt((env->fpregs[env->fpstt].d), &env->fp_status); +} + +void helper_fsincos(void) +{ + double fptemp = floatx80_to_double((env->fpregs[env->fpstt].d)); + + if ((fptemp > 9223372036854775808.0)||(fptemp < -9223372036854775808.0)) { + env->fpus |= 0x400; + } else { + (env->fpregs[env->fpstt].d) = double_to_floatx80(sin(fptemp)); + fpush(); + (env->fpregs[env->fpstt].d) = double_to_floatx80(cos(fptemp)); + env->fpus &= (~0x400); + + } +} + +void helper_frndint(void) +{ + (env->fpregs[env->fpstt].d) = floatx80_round_to_int((env->fpregs[env->fpstt].d), &env->fp_status); +} + +void helper_fscale(void) +{ + if (floatx80_is_any_nan((env->fpregs[(env->fpstt + (1)) & 7].d))) { + (env->fpregs[env->fpstt].d) = (env->fpregs[(env->fpstt + (1)) & 7].d); + } else { + int n = floatx80_to_int32_round_to_zero((env->fpregs[(env->fpstt + (1)) & 7].d), &env->fp_status); + (env->fpregs[env->fpstt].d) = floatx80_scalbn((env->fpregs[env->fpstt].d), n, &env->fp_status); + } +} + +void helper_fsin(void) +{ + double fptemp = floatx80_to_double((env->fpregs[env->fpstt].d)); + + if ((fptemp > 9223372036854775808.0)||(fptemp < -9223372036854775808.0)) { + env->fpus |= 0x400; + } else { + (env->fpregs[env->fpstt].d) = double_to_floatx80(sin(fptemp)); + env->fpus &= (~0x400); + + } +} + +void helper_fcos(void) +{ + double fptemp = floatx80_to_double((env->fpregs[env->fpstt].d)); + + if((fptemp > 9223372036854775808.0)||(fptemp < -9223372036854775808.0)) { + env->fpus |= 0x400; + } else { + (env->fpregs[env->fpstt].d) = double_to_floatx80(cos(fptemp)); + env->fpus &= (~0x400); + + } +} + +void helper_fxam_ST0(void) +{ + CPU_LDoubleU temp; + int expdif; + + temp.d = (env->fpregs[env->fpstt].d); + + env->fpus &= (~0x4700); + if (((temp.l.upper) & 0x8000)) + env->fpus |= 0x200; + + + expdif = (temp.l.upper & 0x7fff); + if (expdif == 0x7fff) { + if ((temp.l.lower) == 0x8000000000000000ULL) + env->fpus |= 0x500 ; + else + env->fpus |= 0x100 ; + } else if (expdif == 0) { + if ((temp.l.lower) == 0) + env->fpus |= 0x4000 ; + else + env->fpus |= 0x4400 ; + } else { + env->fpus |= 0x400; + } +} + +void helper_fstenv(target_ulong ptr, int data32) +{ + int fpus, fptag, exp, i; + uint64_t mant; + CPU_LDoubleU tmp; + + fpus = (env->fpus & ~0x3800) | (env->fpstt & 0x7) << 11; + fptag = 0; + for (i=7; i>=0; i--) { + fptag <<= 2; + if (env->fptags[i]) { + fptag |= 3; + } else { + tmp.d = env->fpregs[i].d; + exp = (tmp.l.upper & 0x7fff); + mant = (tmp.l.lower); + if (exp == 0 && mant == 0) { + + fptag |= 1; + } else if (exp == 0 || exp == 0x7fff + || (mant & (1LL << 63)) == 0 + ) { + + fptag |= 2; + } + } + } + if (data32) { + + stl_data(ptr, env->fpuc); + stl_data(ptr + 4, fpus); + stl_data(ptr + 8, fptag); + stl_data(ptr + 12, 0); + stl_data(ptr + 16, 0); + stl_data(ptr + 20, 0); + stl_data(ptr + 24, 0); + } else { + + stw_data(ptr, env->fpuc); + stw_data(ptr + 2, fpus); + stw_data(ptr + 4, fptag); + stw_data(ptr + 6, 0); + stw_data(ptr + 8, 0); + stw_data(ptr + 10, 0); + stw_data(ptr + 12, 0); + } +} + +void helper_fldenv(target_ulong ptr, int data32) +{ + int i, fpus, fptag; + + if (data32) { + env->fpuc = lduw_data(ptr); + fpus = lduw_data(ptr + 4); + fptag = lduw_data(ptr + 8); + } + else { + env->fpuc = lduw_data(ptr); + fpus = lduw_data(ptr + 2); + fptag = lduw_data(ptr + 4); + } + env->fpstt = (fpus >> 11) & 7; + env->fpus = fpus & ~0x3800; + for(i = 0;i < 8; i++) { + env->fptags[i] = ((fptag & 3) == 3); + fptag >>= 2; + } +} + +void helper_fsave(target_ulong ptr, int data32) +{ + floatx80 tmp; + int i; + + helper_fstenv(ptr, data32); + + ptr += (14 << data32); + for(i = 0;i < 8; i++) { + tmp = (env->fpregs[(env->fpstt + (i)) & 7].d); + helper_fstt(tmp, ptr); + ptr += 10; + } + + + env->fpus = 0; + env->fpstt = 0; + env->fpuc = 0x37f; + env->fptags[0] = 1; + env->fptags[1] = 1; + env->fptags[2] = 1; + env->fptags[3] = 1; + env->fptags[4] = 1; + env->fptags[5] = 1; + env->fptags[6] = 1; + env->fptags[7] = 1; +} + +void helper_frstor(target_ulong ptr, int data32) +{ + floatx80 tmp; + int i; + + helper_fldenv(ptr, data32); + ptr += (14 << data32); + + for(i = 0;i < 8; i++) { + tmp = helper_fldt(ptr); + (env->fpregs[(env->fpstt + (i)) & 7].d) = tmp; + ptr += 10; + } +} +# 4591 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" +void helper_fxsave(target_ulong ptr, int data64) +{ + int fpus, fptag, i, nb_xmm_regs; + floatx80 tmp; + target_ulong addr; + + + if (ptr & 0xf) { + raise_exception(13); + } + + fpus = (env->fpus & ~0x3800) | (env->fpstt & 0x7) << 11; + fptag = 0; + for(i = 0; i < 8; i++) { + fptag |= (env->fptags[i] << i); + } + stw_data(ptr, env->fpuc); + stw_data(ptr + 2, fpus); + stw_data(ptr + 4, fptag ^ 0xff); + + + + + + + { + stl_data(ptr + 0x08, 0); + stl_data(ptr + 0x0c, 0); + stl_data(ptr + 0x10, 0); + stl_data(ptr + 0x14, 0); + } + + addr = ptr + 0x20; + for(i = 0;i < 8; i++) { + tmp = (env->fpregs[(env->fpstt + (i)) & 7].d); + helper_fstt(tmp, addr); + addr += 16; + } + + if (env->cr[4] & (1 << 9)) { + + stl_data(ptr + 0x18, env->mxcsr); + stl_data(ptr + 0x1c, 0x0000ffff); + if (env->hflags & (1 << 15)) + nb_xmm_regs = 16; + else + nb_xmm_regs = 8; + addr = ptr + 0xa0; + + if (!(env->efer & (1 << 14)) + || (env->hflags & (3 << 0)) + || !(env->hflags & (1 << 14))) { + for(i = 0; i < nb_xmm_regs; i++) { + stq_data(addr, env->xmm_regs[i]._q[0]); + stq_data(addr + 8, env->xmm_regs[i]._q[1]); + addr += 16; + } + } + } +} + +void helper_fxrstor(target_ulong ptr, int data64) +{ + int i, fpus, fptag, nb_xmm_regs; + floatx80 tmp; + target_ulong addr; + + + if (ptr & 0xf) { + raise_exception(13); + } + + env->fpuc = lduw_data(ptr); + fpus = lduw_data(ptr + 2); + fptag = lduw_data(ptr + 4); + env->fpstt = (fpus >> 11) & 7; + env->fpus = fpus & ~0x3800; + fptag ^= 0xff; + for(i = 0;i < 8; i++) { + env->fptags[i] = ((fptag >> i) & 1); + } + + addr = ptr + 0x20; + for(i = 0;i < 8; i++) { + tmp = helper_fldt(addr); + (env->fpregs[(env->fpstt + (i)) & 7].d) = tmp; + addr += 16; + } + + if (env->cr[4] & (1 << 9)) { + + env->mxcsr = ldl_data(ptr + 0x18); + + if (env->hflags & (1 << 15)) + nb_xmm_regs = 16; + else + nb_xmm_regs = 8; + addr = ptr + 0xa0; + + if (!(env->efer & (1 << 14)) + || (env->hflags & (3 << 0)) + || !(env->hflags & (1 << 14))) { + for(i = 0; i < nb_xmm_regs; i++) { + env->xmm_regs[i]._q[0] = ldq_data(addr); + env->xmm_regs[i]._q[1] = ldq_data(addr + 8); + addr += 16; + } + } + } +} + +void cpu_get_fp80(uint64_t *pmant, uint16_t *pexp, floatx80 f) +{ + CPU_LDoubleU temp; + + temp.d = f; + *pmant = temp.l.lower; + *pexp = temp.l.upper; +} + +floatx80 cpu_set_fp80(uint64_t mant, uint16_t upper) +{ + CPU_LDoubleU temp; + + temp.l.upper = upper; + temp.l.lower = mant; + return temp.d; +} +# 4864 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" +static void do_hlt(void) +{ + env->hflags &= ~(1 << 3); + env->halted = 1; + env->exception_index = 0x10001; + cpu_loop_exit(env); +} + +void helper_hlt(int next_eip_addend) +{ + helper_svm_check_intercept_param(0x078, 0); + (env->eip) += next_eip_addend; + + do_hlt(); +} + +void helper_monitor(target_ulong ptr) +{ + if ((uint32_t)(env->regs[1]) != 0) + raise_exception(13); + + helper_svm_check_intercept_param(0x08a, 0); +} + +void helper_mwait(int next_eip_addend) +{ + if ((uint32_t)(env->regs[1]) != 0) + raise_exception(13); + helper_svm_check_intercept_param(0x08b, 0); + (env->eip) += next_eip_addend; + + + if (env->cpu_index != 0 || env->next_cpu != ((void *)0)) { + + + } else { + do_hlt(); + } +} + +void helper_debug(void) +{ + env->exception_index = 0x10002; + cpu_loop_exit(env); +} + +void helper_reset_rf(void) +{ + env->eflags &= ~0x00010000; +} + +void helper_raise_interrupt(int intno, int next_eip_addend) +{ + raise_interrupt(intno, 1, 0, next_eip_addend); +} + +void helper_raise_exception(int exception_index) +{ + raise_exception(exception_index); +} + +void helper_cli(void) +{ + env->eflags &= ~0x00000200; +} + +void helper_sti(void) +{ + env->eflags |= 0x00000200; +} +# 4951 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" +void helper_set_inhibit_irq(void) +{ + env->hflags |= (1 << 3); +} + +void helper_reset_inhibit_irq(void) +{ + env->hflags &= ~(1 << 3); +} + +void helper_boundw(target_ulong a0, int v) +{ + int low, high; + low = ldsw_data(a0); + high = ldsw_data(a0 + 2); + v = (int16_t)v; + if (v < low || v > high) { + raise_exception(5); + } +} + +void helper_boundl(target_ulong a0, int v) +{ + int low, high; + low = ldl_data(a0); + high = ldl_data(a0 + 4); + if (v < low || v > high) { + raise_exception(5); + } +} + + + + + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" 1 +# 24 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-timer.h" 1 + + + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" 1 +# 43 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" +int qemu_init_main_loop(void); +# 53 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" +int main_loop_init(void); +# 90 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" +int main_loop_wait(int nonblocking); +# 105 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" +void qemu_notify_event(void); +# 174 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" +typedef void IOReadHandler(void *opaque, const uint8_t *buf, int size); +typedef int IOCanReadHandler(void *opaque); +typedef void IOHandler(void *opaque); +# 218 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" +int qemu_set_fd_handler2(int fd, + IOCanReadHandler *fd_read_poll, + IOHandler *fd_read, + IOHandler *fd_write, + void *opaque); +# 252 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" +int qemu_set_fd_handler(int fd, + IOHandler *fd_read, + IOHandler *fd_write, + void *opaque); + +typedef struct QEMUBH QEMUBH; +typedef void QEMUBHFunc(void *opaque); +# 267 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" +QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque); +# 281 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" +void qemu_bh_schedule(QEMUBH *bh); +# 294 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" +void qemu_bh_cancel(QEMUBH *bh); +# 305 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" +void qemu_bh_delete(QEMUBH *bh); +# 323 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" +int qemu_add_child_watch(pid_t pid); +# 339 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" +void qemu_mutex_lock_iothread(void); +# 354 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/main-loop.h" +void qemu_mutex_unlock_iothread(void); + + + +void qemu_fd_register(int fd); +void qemu_iohandler_fill(int *pnfds, fd_set *readfds, fd_set *writefds, fd_set *xfds); +void qemu_iohandler_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds, int rc); + +void qemu_bh_schedule_idle(QEMUBH *bh); +int qemu_bh_poll(void); +void qemu_bh_update_timeout(uint32_t *timeout); +# 6 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-timer.h" 2 +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/notify.h" 1 +# 19 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/notify.h" +typedef struct Notifier Notifier; + +struct Notifier +{ + void (*notify)(Notifier *notifier, void *data); + struct { struct Notifier *le_next; struct Notifier **le_prev; } node; +}; + +typedef struct NotifierList +{ + struct { struct Notifier *lh_first; } notifiers; +} NotifierList; + + + + +void notifier_list_init(NotifierList *list); + +void notifier_list_add(NotifierList *list, Notifier *notifier); + +void notifier_remove(Notifier *notifier); + +void notifier_list_notify(NotifierList *list, void *data); +# 7 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-timer.h" 2 +# 18 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-timer.h" +typedef struct QEMUClock QEMUClock; +typedef void QEMUTimerCB(void *opaque); + + + + + +extern QEMUClock *rt_clock; + + + + +extern QEMUClock *vm_clock; + + + + + + +extern QEMUClock *host_clock; + +int64_t qemu_get_clock_ns(QEMUClock *clock); +int64_t qemu_clock_has_timers(QEMUClock *clock); +int64_t qemu_clock_expired(QEMUClock *clock); +int64_t qemu_clock_deadline(QEMUClock *clock); +void qemu_clock_enable(QEMUClock *clock, _Bool enabled); +void qemu_clock_warp(QEMUClock *clock); + +void qemu_register_clock_reset_notifier(QEMUClock *clock, Notifier *notifier); +void qemu_unregister_clock_reset_notifier(QEMUClock *clock, + Notifier *notifier); + +QEMUTimer *qemu_new_timer(QEMUClock *clock, int scale, + QEMUTimerCB *cb, void *opaque); +void qemu_free_timer(QEMUTimer *ts); +void qemu_del_timer(QEMUTimer *ts); +void qemu_mod_timer_ns(QEMUTimer *ts, int64_t expire_time); +void qemu_mod_timer(QEMUTimer *ts, int64_t expire_time); +_Bool qemu_timer_pending(QEMUTimer *ts); +_Bool qemu_timer_expired(QEMUTimer *timer_head, int64_t current_time); +uint64_t qemu_timer_expire_time_ns(QEMUTimer *ts); + +void qemu_run_timers(QEMUClock *clock); +void qemu_run_all_timers(void); +void configure_alarms(char const *opt); +void init_clocks(void); +int init_timer_alarm(void); + +int64_t cpu_get_ticks(void); +void cpu_enable_ticks(void); +void cpu_disable_ticks(void); + +static __attribute__ (( always_inline )) __inline__ QEMUTimer *qemu_new_timer_ns(QEMUClock *clock, QEMUTimerCB *cb, + void *opaque) +{ + return qemu_new_timer(clock, 1, cb, opaque); +} + +static __attribute__ (( always_inline )) __inline__ QEMUTimer *qemu_new_timer_ms(QEMUClock *clock, QEMUTimerCB *cb, + void *opaque) +{ + return qemu_new_timer(clock, 1000000, cb, opaque); +} + +static __attribute__ (( always_inline )) __inline__ int64_t qemu_get_clock_ms(QEMUClock *clock) +{ + return qemu_get_clock_ns(clock) / 1000000; +} + +static __attribute__ (( always_inline )) __inline__ int64_t get_ticks_per_sec(void) +{ + return 1000000000LL; +} + + +static __attribute__ (( always_inline )) __inline__ int64_t get_clock_realtime(void) +{ + struct timeval tv; + + gettimeofday(&tv, ((void *)0)); + return tv.tv_sec * 1000000000LL + (tv.tv_usec * 1000); +} +# 116 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-timer.h" +extern int use_rt_clock; + +static __attribute__ (( always_inline )) __inline__ int64_t get_clock(void) +{ + + + if (use_rt_clock) { + struct timespec ts; + clock_gettime(1, &ts); + return ts.tv_sec * 1000000000LL + ts.tv_nsec; + } else + + { + + + return get_clock_realtime(); + } +} + + +void qemu_get_timer(QEMUFile *f, QEMUTimer *ts); +void qemu_put_timer(QEMUFile *f, QEMUTimer *ts); + + +int64_t cpu_get_icount(void); +int64_t cpu_get_clock(void); +# 174 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/qemu-timer.h" +static __attribute__ (( always_inline )) __inline__ int64_t cpu_get_real_ticks(void) +{ + int64_t val; + asm volatile ("rdtsc" : "=A" (val)); + return val; +} +# 25 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" 2 +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" 1 +# 26 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/ioport.h" 1 +# 27 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" 2 +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/int128.h" 1 + + + +typedef struct Int128 Int128; + +struct Int128 { + uint64_t lo; + int64_t hi; +}; + +static __attribute__ (( always_inline )) __inline__ Int128 int128_make64(uint64_t a) +{ + return (Int128) { a, 0 }; +} + +static __attribute__ (( always_inline )) __inline__ uint64_t int128_get64(Int128 a) +{ + ((!a.hi) ? (void) (0) : __assert_fail ("!a.hi", "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/int128.h", 18, __PRETTY_FUNCTION__)); + return a.lo; +} + +static __attribute__ (( always_inline )) __inline__ Int128 int128_zero(void) +{ + return int128_make64(0); +} + +static __attribute__ (( always_inline )) __inline__ Int128 int128_one(void) +{ + return int128_make64(1); +} + +static __attribute__ (( always_inline )) __inline__ Int128 int128_2_64(void) +{ + return (Int128) { 0, 1 }; +} + +static __attribute__ (( always_inline )) __inline__ Int128 int128_add(Int128 a, Int128 b) +{ + Int128 r = { a.lo + b.lo, a.hi + b.hi }; + r.hi += (r.lo < a.lo) || (r.lo < b.lo); + return r; +} + +static __attribute__ (( always_inline )) __inline__ Int128 int128_neg(Int128 a) +{ + a.lo = ~a.lo; + a.hi = ~a.hi; + return int128_add(a, int128_one()); +} + +static __attribute__ (( always_inline )) __inline__ Int128 int128_sub(Int128 a, Int128 b) +{ + return int128_add(a, int128_neg(b)); +} + +static __attribute__ (( always_inline )) __inline__ _Bool int128_nonneg(Int128 a) +{ + return a.hi >= 0; +} + +static __attribute__ (( always_inline )) __inline__ _Bool int128_eq(Int128 a, Int128 b) +{ + return a.lo == b.lo && a.hi == b.hi; +} + +static __attribute__ (( always_inline )) __inline__ _Bool int128_ne(Int128 a, Int128 b) +{ + return !int128_eq(a, b); +} + +static __attribute__ (( always_inline )) __inline__ _Bool int128_ge(Int128 a, Int128 b) +{ + return int128_nonneg(int128_sub(a, b)); +} + +static __attribute__ (( always_inline )) __inline__ _Bool int128_lt(Int128 a, Int128 b) +{ + return !int128_ge(a, b); +} + +static __attribute__ (( always_inline )) __inline__ _Bool int128_le(Int128 a, Int128 b) +{ + return int128_ge(b, a); +} + +static __attribute__ (( always_inline )) __inline__ _Bool int128_gt(Int128 a, Int128 b) +{ + return !int128_le(a, b); +} + +static __attribute__ (( always_inline )) __inline__ _Bool int128_nz(Int128 a) +{ + return a.lo || a.hi; +} + +static __attribute__ (( always_inline )) __inline__ Int128 int128_min(Int128 a, Int128 b) +{ + return int128_le(a, b) ? a : b; +} + +static __attribute__ (( always_inline )) __inline__ Int128 int128_max(Int128 a, Int128 b) +{ + return int128_ge(a, b) ? a : b; +} + +static __attribute__ (( always_inline )) __inline__ void int128_addto(Int128 *a, Int128 b) +{ + *a = int128_add(*a, b); +} + +static __attribute__ (( always_inline )) __inline__ void int128_subfrom(Int128 *a, Int128 b) +{ + *a = int128_sub(*a, b); +} +# 28 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" 2 + +typedef struct MemoryRegionOps MemoryRegionOps; +typedef struct MemoryRegion MemoryRegion; +typedef struct MemoryRegionPortio MemoryRegionPortio; +typedef struct MemoryRegionMmio MemoryRegionMmio; +# 41 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +struct MemoryRegionMmio { + CPUReadMemoryFunc *read[3]; + CPUWriteMemoryFunc *write[3]; +}; + + +typedef struct MemoryRegionIORange MemoryRegionIORange; +struct MemoryRegionIORange { + IORange iorange; + MemoryRegion *mr; + target_phys_addr_t offset; +}; + + + + +struct MemoryRegionOps { + + + uint64_t (*read)(void *opaque, + target_phys_addr_t addr, + unsigned size); + + + void (*write)(void *opaque, + target_phys_addr_t addr, + uint64_t data, + unsigned size); + + enum device_endian endianness; + + struct { + + + + unsigned min_access_size; + unsigned max_access_size; + + + + _Bool unaligned; + + + + + + _Bool (*accepts)(void *opaque, target_phys_addr_t addr, + unsigned size, _Bool is_write); + } valid; + + struct { + + + + unsigned min_access_size; + + + + unsigned max_access_size; + + + + _Bool unaligned; + } impl; + + + + + const MemoryRegionPortio *old_portio; + + + + const MemoryRegionMmio old_mmio; +}; + +typedef struct CoalescedMemoryRange CoalescedMemoryRange; +typedef struct MemoryRegionIoeventfd MemoryRegionIoeventfd; + +struct MemoryRegion { + + const MemoryRegionOps *ops; + void *opaque; + MemoryRegion *parent; + Int128 size; + target_phys_addr_t addr; + void (*destructor)(MemoryRegion *mr); + ram_addr_t ram_addr; + _Bool subpage; + _Bool terminates; + _Bool readable; + _Bool ram; + _Bool readonly; + _Bool enabled; + _Bool rom_device; + _Bool warning_printed; + MemoryRegion *alias; + target_phys_addr_t alias_offset; + unsigned priority; + _Bool may_overlap; + struct subregions { struct MemoryRegion *tqh_first; struct MemoryRegion * *tqh_last; } subregions; + struct { struct MemoryRegion *tqe_next; struct MemoryRegion * *tqe_prev; } subregions_link; + struct coalesced_ranges { struct CoalescedMemoryRange *tqh_first; struct CoalescedMemoryRange * *tqh_last; } coalesced; + const char *name; + uint8_t dirty_log_mask; + unsigned ioeventfd_nb; + MemoryRegionIoeventfd *ioeventfds; +}; + +struct MemoryRegionPortio { + uint32_t offset; + uint32_t len; + unsigned size; + IOPortReadFunc *read; + IOPortWriteFunc *write; +}; + + + +typedef struct MemoryRegionSection MemoryRegionSection; +# 172 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +struct MemoryRegionSection { + MemoryRegion *mr; + MemoryRegion *address_space; + target_phys_addr_t offset_within_region; + uint64_t size; + target_phys_addr_t offset_within_address_space; + _Bool readonly; +}; + +typedef struct MemoryListener MemoryListener; + + + + + + + +struct MemoryListener { + void (*begin)(MemoryListener *listener); + void (*commit)(MemoryListener *listener); + void (*region_add)(MemoryListener *listener, MemoryRegionSection *section); + void (*region_del)(MemoryListener *listener, MemoryRegionSection *section); + void (*region_nop)(MemoryListener *listener, MemoryRegionSection *section); + void (*log_start)(MemoryListener *listener, MemoryRegionSection *section); + void (*log_stop)(MemoryListener *listener, MemoryRegionSection *section); + void (*log_sync)(MemoryListener *listener, MemoryRegionSection *section); + void (*log_global_start)(MemoryListener *listener); + void (*log_global_stop)(MemoryListener *listener); + void (*eventfd_add)(MemoryListener *listener, MemoryRegionSection *section, + _Bool match_data, uint64_t data, int fd); + void (*eventfd_del)(MemoryListener *listener, MemoryRegionSection *section, + _Bool match_data, uint64_t data, int fd); + + unsigned priority; + MemoryRegion *address_space_filter; + struct { struct MemoryListener *tqe_next; struct MemoryListener * *tqe_prev; } link; +}; +# 220 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_region_init(MemoryRegion *mr, + const char *name, + uint64_t size); +# 236 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_region_init_io(MemoryRegion *mr, + const MemoryRegionOps *ops, + void *opaque, + const char *name, + uint64_t size); +# 250 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_region_init_ram(MemoryRegion *mr, + const char *name, + uint64_t size); +# 264 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_region_init_ram_ptr(MemoryRegion *mr, + const char *name, + uint64_t size, + void *ptr); +# 280 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_region_init_alias(MemoryRegion *mr, + const char *name, + MemoryRegion *orig, + target_phys_addr_t offset, + uint64_t size); +# 295 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_region_init_rom_device(MemoryRegion *mr, + const MemoryRegionOps *ops, + void *opaque, + const char *name, + uint64_t size); +# 313 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_region_init_reservation(MemoryRegion *mr, + const char *name, + uint64_t size); + + + + + + + +void memory_region_destroy(MemoryRegion *mr); + + + + + + +uint64_t memory_region_size(MemoryRegion *mr); +# 339 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +_Bool memory_region_is_ram(MemoryRegion *mr); +# 349 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +static __attribute__ (( always_inline )) __inline__ _Bool memory_region_is_romd(MemoryRegion *mr) +{ + return mr->rom_device && mr->readable; +} +# 361 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +const char *memory_region_name(MemoryRegion *mr); +# 370 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +_Bool memory_region_is_logging(MemoryRegion *mr); +# 379 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +_Bool memory_region_is_rom(MemoryRegion *mr); +# 390 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void *memory_region_get_ram_ptr(MemoryRegion *mr); +# 403 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_region_set_log(MemoryRegion *mr, _Bool log, unsigned client); +# 419 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +_Bool memory_region_get_dirty(MemoryRegion *mr, target_phys_addr_t addr, + target_phys_addr_t size, unsigned client); +# 432 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_region_set_dirty(MemoryRegion *mr, target_phys_addr_t addr, + target_phys_addr_t size); +# 444 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_region_sync_dirty_bitmap(MemoryRegion *mr); +# 458 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_region_reset_dirty(MemoryRegion *mr, target_phys_addr_t addr, + target_phys_addr_t size, unsigned client); +# 470 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_region_set_readonly(MemoryRegion *mr, _Bool readonly); +# 484 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_region_rom_device_set_readable(MemoryRegion *mr, _Bool readable); +# 495 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_region_set_coalescing(MemoryRegion *mr); +# 508 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_region_add_coalescing(MemoryRegion *mr, + target_phys_addr_t offset, + uint64_t size); +# 521 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_region_clear_coalescing(MemoryRegion *mr); +# 539 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_region_add_eventfd(MemoryRegion *mr, + target_phys_addr_t addr, + unsigned size, + _Bool match_data, + uint64_t data, + int fd); +# 559 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_region_del_eventfd(MemoryRegion *mr, + target_phys_addr_t addr, + unsigned size, + _Bool match_data, + uint64_t data, + int fd); +# 579 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_region_add_subregion(MemoryRegion *mr, + target_phys_addr_t offset, + MemoryRegion *subregion); +# 598 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_region_add_subregion_overlap(MemoryRegion *mr, + target_phys_addr_t offset, + MemoryRegion *subregion, + unsigned priority); +# 610 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +ram_addr_t memory_region_get_ram_addr(MemoryRegion *mr); +# 620 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_region_del_subregion(MemoryRegion *mr, + MemoryRegion *subregion); +# 636 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_region_set_enabled(MemoryRegion *mr, _Bool enabled); +# 647 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_region_set_address(MemoryRegion *mr, target_phys_addr_t addr); +# 658 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_region_set_alias_offset(MemoryRegion *mr, + target_phys_addr_t offset); +# 679 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +MemoryRegionSection memory_region_find(MemoryRegion *address_space, + target_phys_addr_t addr, uint64_t size); +# 690 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +static __attribute__ (( always_inline )) __inline__ target_phys_addr_t +memory_region_section_addr(MemoryRegionSection *section, + target_phys_addr_t addr) +{ + addr -= section->offset_within_address_space; + addr += section->offset_within_region; + return addr; +} +# 706 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_global_sync_dirty_bitmap(MemoryRegion *address_space); + + + + + + + +void memory_region_transaction_begin(void); + + + + + +void memory_region_transaction_commit(void); +# 730 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/memory.h" +void memory_listener_register(MemoryListener *listener, MemoryRegion *filter); + + + + + + +void memory_listener_unregister(MemoryListener *listener); + + + + +void memory_global_dirty_log_start(void); + + + + +void memory_global_dirty_log_stop(void); + +void mtree_info(fprintf_function mon_printf, void *f); +# 26 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" 2 +# 69 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" +static uint8_t slow_ldb_mmu( + target_ulong addr, + int mmu_idx, + uintptr_t retaddr); +static __attribute__ (( always_inline )) __inline__ uint8_t io_readb( + target_phys_addr_t physaddr, + target_ulong addr, + uintptr_t retaddr) +{ + uint8_t res; + MemoryRegion *mr = iotlb_to_region(physaddr); + + physaddr = (physaddr & ~((1 << 12) - 1)) + addr; + env->mem_io_pc = retaddr; + if (mr != &io_mem_ram && mr != &io_mem_rom + && mr != &io_mem_unassigned + && mr != &io_mem_notdirty + && !can_do_io(env)) { + cpu_io_recompile(env, retaddr); + } + + env->mem_io_vaddr = addr; + + res = io_mem_read(mr, physaddr, 1 << 0); +# 102 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" + return res; +} + + +uint8_t +__ldb_mmu( + target_ulong addr, + int mmu_idx) +{ + uint8_t res; + int index; + target_ulong tlb_addr; + target_phys_addr_t ioaddr; + uintptr_t retaddr; + + + + index = (addr >> 12) & ((1 << 8) - 1); + redo: + tlb_addr = env->tlb_table[mmu_idx][index].addr_read; + if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { + if (tlb_addr & ~~((1 << 12) - 1)) { + + if ((addr & ((1 << 0) - 1)) != 0) + goto do_unaligned_access; + retaddr = ((uintptr_t)__builtin_return_address(0) - 1); + ioaddr = env->iotlb[mmu_idx][index]; + res = io_readb( ioaddr, addr, retaddr); + } else if (((addr & ~~((1 << 12) - 1)) + (1 << 0) - 1) >= (1 << 12)) { + + do_unaligned_access: + retaddr = ((uintptr_t)__builtin_return_address(0) - 1); + + + + res = slow_ldb_mmu( addr, + mmu_idx, retaddr); + } else { + + uintptr_t addend; + + + + + + + addend = env->tlb_table[mmu_idx][index].addend; + res = ldub_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend)))) + ; + } + } else { + + retaddr = ((uintptr_t)__builtin_return_address(0) - 1); + + + + + tlb_fill(env, addr, 0, mmu_idx, retaddr); + goto redo; + } + return res; +} + + +static uint8_t +slow_ldb_mmu( + target_ulong addr, + int mmu_idx, + uintptr_t retaddr) +{ + uint8_t res, res1, res2; + int index, shift; + target_phys_addr_t ioaddr; + target_ulong tlb_addr, addr1, addr2; + + index = (addr >> 12) & ((1 << 8) - 1); + redo: + tlb_addr = env->tlb_table[mmu_idx][index].addr_read; + if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { + if (tlb_addr & ~~((1 << 12) - 1)) { + + if ((addr & ((1 << 0) - 1)) != 0) + goto do_unaligned_access; + ioaddr = env->iotlb[mmu_idx][index]; + res = io_readb( ioaddr, addr, retaddr); + } else if (((addr & ~~((1 << 12) - 1)) + (1 << 0) - 1) >= (1 << 12)) { + do_unaligned_access: + + addr1 = addr & ~((1 << 0) - 1); + addr2 = addr1 + (1 << 0); + res1 = slow_ldb_mmu( addr1, + mmu_idx, retaddr); + res2 = slow_ldb_mmu( addr2, + mmu_idx, retaddr); + shift = (addr & ((1 << 0) - 1)) * 8; + + + + res = (res1 >> shift) | (res2 << (((1 << 0) * 8) - shift)); + + res = (uint8_t)res; + } else { + + uintptr_t addend = env->tlb_table[mmu_idx][index].addend; + res = ldub_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend)))) + ; + } + } else { + + tlb_fill(env, addr, 0, mmu_idx, retaddr); + goto redo; + } + return res; +} + + + +static void slow_stb_mmu( + target_ulong addr, + uint8_t val, + int mmu_idx, + uintptr_t retaddr); + +static __attribute__ (( always_inline )) __inline__ void io_writeb( + target_phys_addr_t physaddr, + uint8_t val, + target_ulong addr, + uintptr_t retaddr) +{ + MemoryRegion *mr = iotlb_to_region(physaddr); + + physaddr = (physaddr & ~((1 << 12) - 1)) + addr; + if (mr != &io_mem_ram && mr != &io_mem_rom + && mr != &io_mem_unassigned + && mr != &io_mem_notdirty + && !can_do_io(env)) { + cpu_io_recompile(env, retaddr); + } + + env->mem_io_vaddr = addr; + env->mem_io_pc = retaddr; + + io_mem_write(mr, physaddr, val, 1 << 0); +# 254 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" +} + +void __stb_mmu( + target_ulong addr, + uint8_t val, + int mmu_idx) +{ + target_phys_addr_t ioaddr; + target_ulong tlb_addr; + uintptr_t retaddr; + int index; + + index = (addr >> 12) & ((1 << 8) - 1); + redo: + tlb_addr = env->tlb_table[mmu_idx][index].addr_write; + if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { + if (tlb_addr & ~~((1 << 12) - 1)) { + + if ((addr & ((1 << 0) - 1)) != 0) + goto do_unaligned_access; + retaddr = ((uintptr_t)__builtin_return_address(0) - 1); + ioaddr = env->iotlb[mmu_idx][index]; + io_writeb( ioaddr, val, addr, retaddr); + } else if (((addr & ~~((1 << 12) - 1)) + (1 << 0) - 1) >= (1 << 12)) { + do_unaligned_access: + retaddr = ((uintptr_t)__builtin_return_address(0) - 1); + + + + slow_stb_mmu( addr, val, + mmu_idx, retaddr); + } else { + + uintptr_t addend; + + + + + + + addend = env->tlb_table[mmu_idx][index].addend; + stb_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend))), val) + ; + } + } else { + + retaddr = ((uintptr_t)__builtin_return_address(0) - 1); + + + + + tlb_fill(env, addr, 1, mmu_idx, retaddr); + goto redo; + } +} + + +static void slow_stb_mmu( + target_ulong addr, + uint8_t val, + int mmu_idx, + uintptr_t retaddr) +{ + target_phys_addr_t ioaddr; + target_ulong tlb_addr; + int index, i; + + index = (addr >> 12) & ((1 << 8) - 1); + redo: + tlb_addr = env->tlb_table[mmu_idx][index].addr_write; + if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { + if (tlb_addr & ~~((1 << 12) - 1)) { + + if ((addr & ((1 << 0) - 1)) != 0) + goto do_unaligned_access; + ioaddr = env->iotlb[mmu_idx][index]; + io_writeb( ioaddr, val, addr, retaddr); + } else if (((addr & ~~((1 << 12) - 1)) + (1 << 0) - 1) >= (1 << 12)) { + do_unaligned_access: + + + + for(i = (1 << 0) - 1; i >= 0; i--) { + + + + + + slow_stb_mmu( addr + i, + val >> (i * 8), + mmu_idx, retaddr); + + } + } else { + + uintptr_t addend = env->tlb_table[mmu_idx][index].addend; + stb_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend))), val) + ; + } + } else { + + tlb_fill(env, addr, 1, mmu_idx, retaddr); + goto redo; + } +} +# 4988 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" 1 +# 69 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" +static uint16_t slow_ldw_mmu( + target_ulong addr, + int mmu_idx, + uintptr_t retaddr); +static __attribute__ (( always_inline )) __inline__ uint16_t io_readw( + target_phys_addr_t physaddr, + target_ulong addr, + uintptr_t retaddr) +{ + uint16_t res; + MemoryRegion *mr = iotlb_to_region(physaddr); + + physaddr = (physaddr & ~((1 << 12) - 1)) + addr; + env->mem_io_pc = retaddr; + if (mr != &io_mem_ram && mr != &io_mem_rom + && mr != &io_mem_unassigned + && mr != &io_mem_notdirty + && !can_do_io(env)) { + cpu_io_recompile(env, retaddr); + } + + env->mem_io_vaddr = addr; + + res = io_mem_read(mr, physaddr, 1 << 1); +# 102 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" + return res; +} + + +uint16_t +__ldw_mmu( + target_ulong addr, + int mmu_idx) +{ + uint16_t res; + int index; + target_ulong tlb_addr; + target_phys_addr_t ioaddr; + uintptr_t retaddr; + + + + index = (addr >> 12) & ((1 << 8) - 1); + redo: + tlb_addr = env->tlb_table[mmu_idx][index].addr_read; + if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { + if (tlb_addr & ~~((1 << 12) - 1)) { + + if ((addr & ((1 << 1) - 1)) != 0) + goto do_unaligned_access; + retaddr = ((uintptr_t)__builtin_return_address(0) - 1); + ioaddr = env->iotlb[mmu_idx][index]; + res = io_readw( ioaddr, addr, retaddr); + } else if (((addr & ~~((1 << 12) - 1)) + (1 << 1) - 1) >= (1 << 12)) { + + do_unaligned_access: + retaddr = ((uintptr_t)__builtin_return_address(0) - 1); + + + + res = slow_ldw_mmu( addr, + mmu_idx, retaddr); + } else { + + uintptr_t addend; + + + + + + + addend = env->tlb_table[mmu_idx][index].addend; + res = lduw_le_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend)))) + ; + } + } else { + + retaddr = ((uintptr_t)__builtin_return_address(0) - 1); + + + + + tlb_fill(env, addr, 0, mmu_idx, retaddr); + goto redo; + } + return res; +} + + +static uint16_t +slow_ldw_mmu( + target_ulong addr, + int mmu_idx, + uintptr_t retaddr) +{ + uint16_t res, res1, res2; + int index, shift; + target_phys_addr_t ioaddr; + target_ulong tlb_addr, addr1, addr2; + + index = (addr >> 12) & ((1 << 8) - 1); + redo: + tlb_addr = env->tlb_table[mmu_idx][index].addr_read; + if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { + if (tlb_addr & ~~((1 << 12) - 1)) { + + if ((addr & ((1 << 1) - 1)) != 0) + goto do_unaligned_access; + ioaddr = env->iotlb[mmu_idx][index]; + res = io_readw( ioaddr, addr, retaddr); + } else if (((addr & ~~((1 << 12) - 1)) + (1 << 1) - 1) >= (1 << 12)) { + do_unaligned_access: + + addr1 = addr & ~((1 << 1) - 1); + addr2 = addr1 + (1 << 1); + res1 = slow_ldw_mmu( addr1, + mmu_idx, retaddr); + res2 = slow_ldw_mmu( addr2, + mmu_idx, retaddr); + shift = (addr & ((1 << 1) - 1)) * 8; + + + + res = (res1 >> shift) | (res2 << (((1 << 1) * 8) - shift)); + + res = (uint16_t)res; + } else { + + uintptr_t addend = env->tlb_table[mmu_idx][index].addend; + res = lduw_le_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend)))) + ; + } + } else { + + tlb_fill(env, addr, 0, mmu_idx, retaddr); + goto redo; + } + return res; +} + + + +static void slow_stw_mmu( + target_ulong addr, + uint16_t val, + int mmu_idx, + uintptr_t retaddr); + +static __attribute__ (( always_inline )) __inline__ void io_writew( + target_phys_addr_t physaddr, + uint16_t val, + target_ulong addr, + uintptr_t retaddr) +{ + MemoryRegion *mr = iotlb_to_region(physaddr); + + physaddr = (physaddr & ~((1 << 12) - 1)) + addr; + if (mr != &io_mem_ram && mr != &io_mem_rom + && mr != &io_mem_unassigned + && mr != &io_mem_notdirty + && !can_do_io(env)) { + cpu_io_recompile(env, retaddr); + } + + env->mem_io_vaddr = addr; + env->mem_io_pc = retaddr; + + io_mem_write(mr, physaddr, val, 1 << 1); +# 254 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" +} + +void __stw_mmu( + target_ulong addr, + uint16_t val, + int mmu_idx) +{ + target_phys_addr_t ioaddr; + target_ulong tlb_addr; + uintptr_t retaddr; + int index; + + index = (addr >> 12) & ((1 << 8) - 1); + redo: + tlb_addr = env->tlb_table[mmu_idx][index].addr_write; + if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { + if (tlb_addr & ~~((1 << 12) - 1)) { + + if ((addr & ((1 << 1) - 1)) != 0) + goto do_unaligned_access; + retaddr = ((uintptr_t)__builtin_return_address(0) - 1); + ioaddr = env->iotlb[mmu_idx][index]; + io_writew( ioaddr, val, addr, retaddr); + } else if (((addr & ~~((1 << 12) - 1)) + (1 << 1) - 1) >= (1 << 12)) { + do_unaligned_access: + retaddr = ((uintptr_t)__builtin_return_address(0) - 1); + + + + slow_stw_mmu( addr, val, + mmu_idx, retaddr); + } else { + + uintptr_t addend; + + + + + + + addend = env->tlb_table[mmu_idx][index].addend; + stw_le_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend))), val) + ; + } + } else { + + retaddr = ((uintptr_t)__builtin_return_address(0) - 1); + + + + + tlb_fill(env, addr, 1, mmu_idx, retaddr); + goto redo; + } +} + + +static void slow_stw_mmu( + target_ulong addr, + uint16_t val, + int mmu_idx, + uintptr_t retaddr) +{ + target_phys_addr_t ioaddr; + target_ulong tlb_addr; + int index, i; + + index = (addr >> 12) & ((1 << 8) - 1); + redo: + tlb_addr = env->tlb_table[mmu_idx][index].addr_write; + if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { + if (tlb_addr & ~~((1 << 12) - 1)) { + + if ((addr & ((1 << 1) - 1)) != 0) + goto do_unaligned_access; + ioaddr = env->iotlb[mmu_idx][index]; + io_writew( ioaddr, val, addr, retaddr); + } else if (((addr & ~~((1 << 12) - 1)) + (1 << 1) - 1) >= (1 << 12)) { + do_unaligned_access: + + + + for(i = (1 << 1) - 1; i >= 0; i--) { + + + + + + slow_stb_mmu( addr + i, + val >> (i * 8), + mmu_idx, retaddr); + + } + } else { + + uintptr_t addend = env->tlb_table[mmu_idx][index].addend; + stw_le_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend))), val) + ; + } + } else { + + tlb_fill(env, addr, 1, mmu_idx, retaddr); + goto redo; + } +} +# 4991 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" 1 +# 69 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" +static uint32_t slow_ldl_mmu( + target_ulong addr, + int mmu_idx, + uintptr_t retaddr); +static __attribute__ (( always_inline )) __inline__ uint32_t io_readl( + target_phys_addr_t physaddr, + target_ulong addr, + uintptr_t retaddr) +{ + uint32_t res; + MemoryRegion *mr = iotlb_to_region(physaddr); + + physaddr = (physaddr & ~((1 << 12) - 1)) + addr; + env->mem_io_pc = retaddr; + if (mr != &io_mem_ram && mr != &io_mem_rom + && mr != &io_mem_unassigned + && mr != &io_mem_notdirty + && !can_do_io(env)) { + cpu_io_recompile(env, retaddr); + } + + env->mem_io_vaddr = addr; + + res = io_mem_read(mr, physaddr, 1 << 2); +# 102 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" + return res; +} + + +uint32_t +__ldl_mmu( + target_ulong addr, + int mmu_idx) +{ + uint32_t res; + int index; + target_ulong tlb_addr; + target_phys_addr_t ioaddr; + uintptr_t retaddr; + + + + index = (addr >> 12) & ((1 << 8) - 1); + redo: + tlb_addr = env->tlb_table[mmu_idx][index].addr_read; + if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { + if (tlb_addr & ~~((1 << 12) - 1)) { + + if ((addr & ((1 << 2) - 1)) != 0) + goto do_unaligned_access; + retaddr = ((uintptr_t)__builtin_return_address(0) - 1); + ioaddr = env->iotlb[mmu_idx][index]; + res = io_readl( ioaddr, addr, retaddr); + } else if (((addr & ~~((1 << 12) - 1)) + (1 << 2) - 1) >= (1 << 12)) { + + do_unaligned_access: + retaddr = ((uintptr_t)__builtin_return_address(0) - 1); + + + + res = slow_ldl_mmu( addr, + mmu_idx, retaddr); + } else { + + uintptr_t addend; + + + + + + + addend = env->tlb_table[mmu_idx][index].addend; + res = ldl_le_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend)))) + ; + } + } else { + + retaddr = ((uintptr_t)__builtin_return_address(0) - 1); + + + + + tlb_fill(env, addr, 0, mmu_idx, retaddr); + goto redo; + } + return res; +} + + +static uint32_t +slow_ldl_mmu( + target_ulong addr, + int mmu_idx, + uintptr_t retaddr) +{ + uint32_t res, res1, res2; + int index, shift; + target_phys_addr_t ioaddr; + target_ulong tlb_addr, addr1, addr2; + + index = (addr >> 12) & ((1 << 8) - 1); + redo: + tlb_addr = env->tlb_table[mmu_idx][index].addr_read; + if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { + if (tlb_addr & ~~((1 << 12) - 1)) { + + if ((addr & ((1 << 2) - 1)) != 0) + goto do_unaligned_access; + ioaddr = env->iotlb[mmu_idx][index]; + res = io_readl( ioaddr, addr, retaddr); + } else if (((addr & ~~((1 << 12) - 1)) + (1 << 2) - 1) >= (1 << 12)) { + do_unaligned_access: + + addr1 = addr & ~((1 << 2) - 1); + addr2 = addr1 + (1 << 2); + res1 = slow_ldl_mmu( addr1, + mmu_idx, retaddr); + res2 = slow_ldl_mmu( addr2, + mmu_idx, retaddr); + shift = (addr & ((1 << 2) - 1)) * 8; + + + + res = (res1 >> shift) | (res2 << (((1 << 2) * 8) - shift)); + + res = (uint32_t)res; + } else { + + uintptr_t addend = env->tlb_table[mmu_idx][index].addend; + res = ldl_le_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend)))) + ; + } + } else { + + tlb_fill(env, addr, 0, mmu_idx, retaddr); + goto redo; + } + return res; +} + + + +static void slow_stl_mmu( + target_ulong addr, + uint32_t val, + int mmu_idx, + uintptr_t retaddr); + +static __attribute__ (( always_inline )) __inline__ void io_writel( + target_phys_addr_t physaddr, + uint32_t val, + target_ulong addr, + uintptr_t retaddr) +{ + MemoryRegion *mr = iotlb_to_region(physaddr); + + physaddr = (physaddr & ~((1 << 12) - 1)) + addr; + if (mr != &io_mem_ram && mr != &io_mem_rom + && mr != &io_mem_unassigned + && mr != &io_mem_notdirty + && !can_do_io(env)) { + cpu_io_recompile(env, retaddr); + } + + env->mem_io_vaddr = addr; + env->mem_io_pc = retaddr; + + io_mem_write(mr, physaddr, val, 1 << 2); +# 254 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" +} + +void __stl_mmu( + target_ulong addr, + uint32_t val, + int mmu_idx) +{ + target_phys_addr_t ioaddr; + target_ulong tlb_addr; + uintptr_t retaddr; + int index; + + index = (addr >> 12) & ((1 << 8) - 1); + redo: + tlb_addr = env->tlb_table[mmu_idx][index].addr_write; + if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { + if (tlb_addr & ~~((1 << 12) - 1)) { + + if ((addr & ((1 << 2) - 1)) != 0) + goto do_unaligned_access; + retaddr = ((uintptr_t)__builtin_return_address(0) - 1); + ioaddr = env->iotlb[mmu_idx][index]; + io_writel( ioaddr, val, addr, retaddr); + } else if (((addr & ~~((1 << 12) - 1)) + (1 << 2) - 1) >= (1 << 12)) { + do_unaligned_access: + retaddr = ((uintptr_t)__builtin_return_address(0) - 1); + + + + slow_stl_mmu( addr, val, + mmu_idx, retaddr); + } else { + + uintptr_t addend; + + + + + + + addend = env->tlb_table[mmu_idx][index].addend; + stl_le_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend))), val) + ; + } + } else { + + retaddr = ((uintptr_t)__builtin_return_address(0) - 1); + + + + + tlb_fill(env, addr, 1, mmu_idx, retaddr); + goto redo; + } +} + + +static void slow_stl_mmu( + target_ulong addr, + uint32_t val, + int mmu_idx, + uintptr_t retaddr) +{ + target_phys_addr_t ioaddr; + target_ulong tlb_addr; + int index, i; + + index = (addr >> 12) & ((1 << 8) - 1); + redo: + tlb_addr = env->tlb_table[mmu_idx][index].addr_write; + if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { + if (tlb_addr & ~~((1 << 12) - 1)) { + + if ((addr & ((1 << 2) - 1)) != 0) + goto do_unaligned_access; + ioaddr = env->iotlb[mmu_idx][index]; + io_writel( ioaddr, val, addr, retaddr); + } else if (((addr & ~~((1 << 12) - 1)) + (1 << 2) - 1) >= (1 << 12)) { + do_unaligned_access: + + + + for(i = (1 << 2) - 1; i >= 0; i--) { + + + + + + slow_stb_mmu( addr + i, + val >> (i * 8), + mmu_idx, retaddr); + + } + } else { + + uintptr_t addend = env->tlb_table[mmu_idx][index].addend; + stl_le_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend))), val) + ; + } + } else { + + tlb_fill(env, addr, 1, mmu_idx, retaddr); + goto redo; + } +} +# 4994 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" 1 +# 69 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/softmmu_template.h" +static uint64_t slow_ldq_mmu( + target_ulong addr, + int mmu_idx, + uintptr_t retaddr); +static __attribute__ (( always_inline )) __inline__ uint64_t io_readq( + target_phys_addr_t physaddr, + target_ulong addr, + uintptr_t retaddr) +{ + uint64_t res; + MemoryRegion *mr = iotlb_to_region(physaddr); + + physaddr = (physaddr & ~((1 << 12) - 1)) + addr; + env->mem_io_pc = retaddr; + if (mr != &io_mem_ram && mr != &io_mem_rom + && mr != &io_mem_unassigned + && mr != &io_mem_notdirty + && !can_do_io(env)) { + cpu_io_recompile(env, retaddr); + } + + env->mem_io_vaddr = addr; + + + + + + + + res = io_mem_read(mr, physaddr, 4); + res |= io_mem_read(mr, physaddr + 4, 4) << 32; + + + return res; +} + + +uint64_t +__ldq_mmu( + target_ulong addr, + int mmu_idx) +{ + uint64_t res; + int index; + target_ulong tlb_addr; + target_phys_addr_t ioaddr; + uintptr_t retaddr; + + + + index = (addr >> 12) & ((1 << 8) - 1); + redo: + tlb_addr = env->tlb_table[mmu_idx][index].addr_read; + if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { + if (tlb_addr & ~~((1 << 12) - 1)) { + + if ((addr & ((1 << 3) - 1)) != 0) + goto do_unaligned_access; + retaddr = ((uintptr_t)__builtin_return_address(0) - 1); + ioaddr = env->iotlb[mmu_idx][index]; + res = io_readq( ioaddr, addr, retaddr); + } else if (((addr & ~~((1 << 12) - 1)) + (1 << 3) - 1) >= (1 << 12)) { + + do_unaligned_access: + retaddr = ((uintptr_t)__builtin_return_address(0) - 1); + + + + res = slow_ldq_mmu( addr, + mmu_idx, retaddr); + } else { + + uintptr_t addend; + + + + + + + addend = env->tlb_table[mmu_idx][index].addend; + res = ldq_le_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend)))) + ; + } + } else { + + retaddr = ((uintptr_t)__builtin_return_address(0) - 1); + + + + + tlb_fill(env, addr, 0, mmu_idx, retaddr); + goto redo; + } + return res; +} + + +static uint64_t +slow_ldq_mmu( + target_ulong addr, + int mmu_idx, + uintptr_t retaddr) +{ + uint64_t res, res1, res2; + int index, shift; + target_phys_addr_t ioaddr; + target_ulong tlb_addr, addr1, addr2; + + index = (addr >> 12) & ((1 << 8) - 1); + redo: + tlb_addr = env->tlb_table[mmu_idx][index].addr_read; + if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { + if (tlb_addr & ~~((1 << 12) - 1)) { + + if ((addr & ((1 << 3) - 1)) != 0) + goto do_unaligned_access; + ioaddr = env->iotlb[mmu_idx][index]; + res = io_readq( ioaddr, addr, retaddr); + } else if (((addr & ~~((1 << 12) - 1)) + (1 << 3) - 1) >= (1 << 12)) { + do_unaligned_access: + + addr1 = addr & ~((1 << 3) - 1); + addr2 = addr1 + (1 << 3); + res1 = slow_ldq_mmu( addr1, + mmu_idx, retaddr); + res2 = slow_ldq_mmu( addr2, + mmu_idx, retaddr); + shift = (addr & ((1 << 3) - 1)) * 8; + + + + res = (res1 >> shift) | (res2 << (((1 << 3) * 8) - shift)); + + res = (uint64_t)res; + } else { + + uintptr_t addend = env->tlb_table[mmu_idx][index].addend; + res = ldq_le_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend)))) + ; + } + } else { + + tlb_fill(env, addr, 0, mmu_idx, retaddr); + goto redo; + } + return res; +} + + + +static void slow_stq_mmu( + target_ulong addr, + uint64_t val, + int mmu_idx, + uintptr_t retaddr); + +static __attribute__ (( always_inline )) __inline__ void io_writeq( + target_phys_addr_t physaddr, + uint64_t val, + target_ulong addr, + uintptr_t retaddr) +{ + MemoryRegion *mr = iotlb_to_region(physaddr); + + physaddr = (physaddr & ~((1 << 12) - 1)) + addr; + if (mr != &io_mem_ram && mr != &io_mem_rom + && mr != &io_mem_unassigned + && mr != &io_mem_notdirty + && !can_do_io(env)) { + cpu_io_recompile(env, retaddr); + } + + env->mem_io_vaddr = addr; + env->mem_io_pc = retaddr; + + + + + + + + io_mem_write(mr, physaddr, (uint32_t)val, 4); + io_mem_write(mr, physaddr + 4, val >> 32, 4); + + +} + +void __stq_mmu( + target_ulong addr, + uint64_t val, + int mmu_idx) +{ + target_phys_addr_t ioaddr; + target_ulong tlb_addr; + uintptr_t retaddr; + int index; + + index = (addr >> 12) & ((1 << 8) - 1); + redo: + tlb_addr = env->tlb_table[mmu_idx][index].addr_write; + if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { + if (tlb_addr & ~~((1 << 12) - 1)) { + + if ((addr & ((1 << 3) - 1)) != 0) + goto do_unaligned_access; + retaddr = ((uintptr_t)__builtin_return_address(0) - 1); + ioaddr = env->iotlb[mmu_idx][index]; + io_writeq( ioaddr, val, addr, retaddr); + } else if (((addr & ~~((1 << 12) - 1)) + (1 << 3) - 1) >= (1 << 12)) { + do_unaligned_access: + retaddr = ((uintptr_t)__builtin_return_address(0) - 1); + + + + slow_stq_mmu( addr, val, + mmu_idx, retaddr); + } else { + + uintptr_t addend; + + + + + + + addend = env->tlb_table[mmu_idx][index].addend; + stq_le_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend))), val) + ; + } + } else { + + retaddr = ((uintptr_t)__builtin_return_address(0) - 1); + + + + + tlb_fill(env, addr, 1, mmu_idx, retaddr); + goto redo; + } +} + + +static void slow_stq_mmu( + target_ulong addr, + uint64_t val, + int mmu_idx, + uintptr_t retaddr) +{ + target_phys_addr_t ioaddr; + target_ulong tlb_addr; + int index, i; + + index = (addr >> 12) & ((1 << 8) - 1); + redo: + tlb_addr = env->tlb_table[mmu_idx][index].addr_write; + if ((addr & ~((1 << 12) - 1)) == (tlb_addr & (~((1 << 12) - 1) | (1 << 3)))) { + if (tlb_addr & ~~((1 << 12) - 1)) { + + if ((addr & ((1 << 3) - 1)) != 0) + goto do_unaligned_access; + ioaddr = env->iotlb[mmu_idx][index]; + io_writeq( ioaddr, val, addr, retaddr); + } else if (((addr & ~~((1 << 12) - 1)) + (1 << 3) - 1) >= (1 << 12)) { + do_unaligned_access: + + + + for(i = (1 << 3) - 1; i >= 0; i--) { + + + + + + slow_stb_mmu( addr + i, + val >> (i * 8), + mmu_idx, retaddr); + + } + } else { + + uintptr_t addend = env->tlb_table[mmu_idx][index].addend; + stq_le_p((uint8_t *)(intptr_t)(((uint8_t *)(intptr_t) (addr + addend))), val) + ; + } + } else { + + tlb_fill(env, addr, 1, mmu_idx, retaddr); + goto redo; + } +} +# 4997 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 +# 5005 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" +void tlb_fill(CPUX86State *env1, target_ulong addr, int is_write, int mmu_idx, + uintptr_t retaddr) +{ + TranslationBlock *tb; + int ret; + CPUX86State *saved_env; + + saved_env = env; + env = env1; + + ret = cpu_x86_handle_mmu_fault(env, addr, is_write, mmu_idx); + if (ret) { + if (retaddr) { + + tb = tb_find_pc(retaddr); + if (tb) { + + + cpu_restore_state(tb, env, retaddr); + } + } + raise_exception_err(env->exception_index, env->error_code); + } + env = saved_env; +} +# 5077 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" +static __attribute__ (( always_inline )) __inline__ void svm_save_seg(target_phys_addr_t addr, + const SegmentCache *sc) +{ + stw_phys(addr + __builtin_offsetof (struct vmcb_seg, selector), + sc->selector); + stq_phys(addr + __builtin_offsetof (struct vmcb_seg, base), + sc->base); + stl_phys(addr + __builtin_offsetof (struct vmcb_seg, limit), + sc->limit); + stw_phys(addr + __builtin_offsetof (struct vmcb_seg, attrib), + ((sc->flags >> 8) & 0xff) | ((sc->flags >> 12) & 0x0f00)); +} + +static __attribute__ (( always_inline )) __inline__ void svm_load_seg(target_phys_addr_t addr, SegmentCache *sc) +{ + unsigned int flags; + + sc->selector = lduw_phys(addr + __builtin_offsetof (struct vmcb_seg, selector)); + sc->base = ldq_phys(addr + __builtin_offsetof (struct vmcb_seg, base)); + sc->limit = ldl_phys(addr + __builtin_offsetof (struct vmcb_seg, limit)); + flags = lduw_phys(addr + __builtin_offsetof (struct vmcb_seg, attrib)); + sc->flags = ((flags & 0xff) << 8) | ((flags & 0x0f00) << 12); +} + +static __attribute__ (( always_inline )) __inline__ void svm_load_seg_cache(target_phys_addr_t addr, + CPUX86State *env, int seg_reg) +{ + SegmentCache sc1, *sc = &sc1; + svm_load_seg(addr, sc); + cpu_x86_load_seg_cache(env, seg_reg, sc->selector, + sc->base, sc->limit, sc->flags); +} + +void helper_vmrun(int aflag, int next_eip_addend) +{ + target_ulong addr; + uint32_t event_inj; + uint32_t int_ctl; + + helper_svm_check_intercept_param(0x080, 0); + + if (aflag == 2) + addr = (env->regs[0]); + else + addr = (uint32_t)(env->regs[0]); + + do { if (loglevel & ((1 << 1))) fprintf(logfile, "vmrun! " "%08x" "\n", addr); } while (0); + + env->vm_vmcb = addr; + + + stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.gdtr.base), env->gdt.base); + stl_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.gdtr.limit), env->gdt.limit); + + stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.idtr.base), env->idt.base); + stl_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.idtr.limit), env->idt.limit); + + stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.cr0), env->cr[0]); + stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.cr2), env->cr[2]); + stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.cr3), env->cr[3]); + stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.cr4), env->cr[4]); + stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.dr6), env->dr[6]); + stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.dr7), env->dr[7]); + + stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.efer), env->efer); + stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.rflags), compute_eflags()); + + svm_save_seg(env->vm_hsave + __builtin_offsetof (struct vmcb, save.es), + &env->segs[0]); + svm_save_seg(env->vm_hsave + __builtin_offsetof (struct vmcb, save.cs), + &env->segs[1]); + svm_save_seg(env->vm_hsave + __builtin_offsetof (struct vmcb, save.ss), + &env->segs[2]); + svm_save_seg(env->vm_hsave + __builtin_offsetof (struct vmcb, save.ds), + &env->segs[3]); + + stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.rip), + (env->eip) + next_eip_addend); + stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.rsp), (env->regs[4])); + stq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.rax), (env->regs[0])); + + + + env->intercept = ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.intercept)); + env->intercept_cr_read = lduw_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.intercept_cr_read)); + env->intercept_cr_write = lduw_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.intercept_cr_write)); + env->intercept_dr_read = lduw_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.intercept_dr_read)); + env->intercept_dr_write = lduw_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.intercept_dr_write)); + env->intercept_exceptions = ldl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.intercept_exceptions)); + + + env->hflags |= (1 << 21); + + env->tsc_offset = ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.tsc_offset)); + + env->gdt.base = ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.gdtr.base)); + env->gdt.limit = ldl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.gdtr.limit)); + + env->idt.base = ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.idtr.base)); + env->idt.limit = ldl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.idtr.limit)); + + + stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.exit_info_2), 0); + + cpu_x86_update_cr0(env, ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.cr0))); + cpu_x86_update_cr4(env, ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.cr4))); + cpu_x86_update_cr3(env, ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.cr3))); + env->cr[2] = ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.cr2)); + int_ctl = ldl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.int_ctl)); + env->hflags2 &= ~((1 << 1) | (1 << 3)); + if (int_ctl & (1 << 24)) { + env->v_tpr = int_ctl & 0x0f; + env->hflags2 |= (1 << 3); + if (env->eflags & 0x00000200) + env->hflags2 |= (1 << 1); + } + + cpu_load_efer(env, + ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.efer))); + env->eflags = 0; + load_eflags(ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.rflags)), + ~(0x0800 | 0x0080 | 0x0040 | 0x0010 | 0x0004 | 0x0001 | 0x00000400)); + (env->cc_op) = CC_OP_EFLAGS; + + svm_load_seg_cache(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.es), + env, 0); + svm_load_seg_cache(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.cs), + env, 1); + svm_load_seg_cache(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.ss), + env, 2); + svm_load_seg_cache(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.ds), + env, 3); + + (env->eip) = ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.rip)); + env->eip = (env->eip); + (env->regs[4]) = ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.rsp)); + (env->regs[0]) = ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.rax)); + env->dr[7] = ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.dr7)); + env->dr[6] = ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.dr6)); + cpu_x86_set_cpl(env, ldub_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.cpl))); + + + + switch(ldub_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.tlb_ctl))) { + case 0: + break; + case 1: + + tlb_flush(env, 1); + break; + } + + env->hflags2 |= (1 << 0); + + if (int_ctl & (1 << 8)) { + env->interrupt_request |= 0x0100; + } + + + event_inj = ldl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.event_inj)); + if (event_inj & (1 << 31)) { + uint8_t vector = event_inj & 0xff; + uint16_t valid_err = event_inj & (1 << 11); + uint32_t event_inj_err = ldl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.event_inj_err)); + + do { if (loglevel & ((1 << 1))) fprintf(logfile, "Injecting(%#hx): ", valid_err); } while (0); + + switch (event_inj & (7 << 8)) { + case (0 << 8): + env->exception_index = vector; + env->error_code = event_inj_err; + env->exception_is_int = 0; + env->exception_next_eip = -1; + do { if (loglevel & ((1 << 1))) fprintf(logfile, "INTR"); } while (0); + + do_interrupt_all(vector, 0, 0, 0, 1); + break; + case (2 << 8): + env->exception_index = 2; + env->error_code = event_inj_err; + env->exception_is_int = 0; + env->exception_next_eip = (env->eip); + do { if (loglevel & ((1 << 1))) fprintf(logfile, "NMI"); } while (0); + cpu_loop_exit(env); + break; + case (3 << 8): + env->exception_index = vector; + env->error_code = event_inj_err; + env->exception_is_int = 0; + env->exception_next_eip = -1; + do { if (loglevel & ((1 << 1))) fprintf(logfile, "EXEPT"); } while (0); + cpu_loop_exit(env); + break; + case (4 << 8): + env->exception_index = vector; + env->error_code = event_inj_err; + env->exception_is_int = 1; + env->exception_next_eip = (env->eip); + do { if (loglevel & ((1 << 1))) fprintf(logfile, "SOFT"); } while (0); + cpu_loop_exit(env); + break; + } + do { if (loglevel & ((1 << 1))) fprintf(logfile, " %#x %#x\n", env->exception_index, env->error_code); } while (0); + } +} + +void helper_vmmcall(void) +{ + helper_svm_check_intercept_param(0x081, 0); + raise_exception(6); +} + +void helper_vmload(int aflag) +{ + target_ulong addr; + helper_svm_check_intercept_param(0x082, 0); + + if (aflag == 2) + addr = (env->regs[0]); + else + addr = (uint32_t)(env->regs[0]); + + do { if (loglevel & ((1 << 1))) fprintf(logfile, "vmload! " "%08x" "\nFS: %016" "ll" "x" " | " "%08x" "\n", addr, ldq_phys(addr + __builtin_offsetof (struct vmcb, save.fs.base)), env->segs[4].base); } while (0) + + ; + + svm_load_seg_cache(addr + __builtin_offsetof (struct vmcb, save.fs), + env, 4); + svm_load_seg_cache(addr + __builtin_offsetof (struct vmcb, save.gs), + env, 5); + svm_load_seg(addr + __builtin_offsetof (struct vmcb, save.tr), + &env->tr); + svm_load_seg(addr + __builtin_offsetof (struct vmcb, save.ldtr), + &env->ldt); + + + + + + + + env->star = ldq_phys(addr + __builtin_offsetof (struct vmcb, save.star)); + env->sysenter_cs = ldq_phys(addr + __builtin_offsetof (struct vmcb, save.sysenter_cs)); + env->sysenter_esp = ldq_phys(addr + __builtin_offsetof (struct vmcb, save.sysenter_esp)); + env->sysenter_eip = ldq_phys(addr + __builtin_offsetof (struct vmcb, save.sysenter_eip)); +} + +void helper_vmsave(int aflag) +{ + target_ulong addr; + helper_svm_check_intercept_param(0x083, 0); + + if (aflag == 2) + addr = (env->regs[0]); + else + addr = (uint32_t)(env->regs[0]); + + do { if (loglevel & ((1 << 1))) fprintf(logfile, "vmsave! " "%08x" "\nFS: %016" "ll" "x" " | " "%08x" "\n", addr, ldq_phys(addr + __builtin_offsetof (struct vmcb, save.fs.base)), env->segs[4].base); } while (0) + + ; + + svm_save_seg(addr + __builtin_offsetof (struct vmcb, save.fs), + &env->segs[4]); + svm_save_seg(addr + __builtin_offsetof (struct vmcb, save.gs), + &env->segs[5]); + svm_save_seg(addr + __builtin_offsetof (struct vmcb, save.tr), + &env->tr); + svm_save_seg(addr + __builtin_offsetof (struct vmcb, save.ldtr), + &env->ldt); + + + + + + + + stq_phys(addr + __builtin_offsetof (struct vmcb, save.star), env->star); + stq_phys(addr + __builtin_offsetof (struct vmcb, save.sysenter_cs), env->sysenter_cs); + stq_phys(addr + __builtin_offsetof (struct vmcb, save.sysenter_esp), env->sysenter_esp); + stq_phys(addr + __builtin_offsetof (struct vmcb, save.sysenter_eip), env->sysenter_eip); +} + +void helper_stgi(void) +{ + helper_svm_check_intercept_param(0x084, 0); + env->hflags2 |= (1 << 0); +} + +void helper_clgi(void) +{ + helper_svm_check_intercept_param(0x085, 0); + env->hflags2 &= ~(1 << 0); +} + +void helper_skinit(void) +{ + helper_svm_check_intercept_param(0x086, 0); + + raise_exception(6); +} + +void helper_invlpga(int aflag) +{ + target_ulong addr; + helper_svm_check_intercept_param(0x07a, 0); + + if (aflag == 2) + addr = (env->regs[0]); + else + addr = (uint32_t)(env->regs[0]); + + + + tlb_flush_page(env, addr); +} + +void helper_svm_check_intercept_param(uint32_t type, uint64_t param) +{ + if (__builtin_expect(!!(!(env->hflags & (1 << 21))), 1)) + return; + switch(type) { + case 0x000 ... 0x000 + 8: + if (env->intercept_cr_read & (1 << (type - 0x000))) { + helper_vmexit(type, param); + } + break; + case 0x010 ... 0x010 + 8: + if (env->intercept_cr_write & (1 << (type - 0x010))) { + helper_vmexit(type, param); + } + break; + case 0x020 ... 0x020 + 7: + if (env->intercept_dr_read & (1 << (type - 0x020))) { + helper_vmexit(type, param); + } + break; + case 0x030 ... 0x030 + 7: + if (env->intercept_dr_write & (1 << (type - 0x030))) { + helper_vmexit(type, param); + } + break; + case 0x040 ... 0x040 + 31: + if (env->intercept_exceptions & (1 << (type - 0x040))) { + helper_vmexit(type, param); + } + break; + case 0x07c: + if (env->intercept & (1ULL << (0x07c - 0x060))) { + + uint64_t addr = ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.msrpm_base_pa)); + uint32_t t0, t1; + switch((uint32_t)(env->regs[1])) { + case 0 ... 0x1fff: + t0 = ((env->regs[1]) * 2) % 8; + t1 = ((env->regs[1]) * 2) / 8; + break; + case 0xc0000000 ... 0xc0001fff: + t0 = (8192 + (env->regs[1]) - 0xc0000000) * 2; + t1 = (t0 / 8); + t0 %= 8; + break; + case 0xc0010000 ... 0xc0011fff: + t0 = (16384 + (env->regs[1]) - 0xc0010000) * 2; + t1 = (t0 / 8); + t0 %= 8; + break; + default: + helper_vmexit(type, param); + t0 = 0; + t1 = 0; + break; + } + if (ldub_phys(addr + t1) & ((1 << param) << t0)) + helper_vmexit(type, param); + } + break; + default: + if (env->intercept & (1ULL << (type - 0x060))) { + helper_vmexit(type, param); + } + break; + } +} + +void svm_check_intercept(CPUX86State *env1, uint32_t type) +{ + CPUX86State *saved_env; + + saved_env = env; + env = env1; + helper_svm_check_intercept_param(type, 0); + env = saved_env; +} + +void helper_svm_check_io(uint32_t port, uint32_t param, + uint32_t next_eip_addend) +{ + if (env->intercept & (1ULL << (0x07b - 0x060))) { + + uint64_t addr = ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.iopm_base_pa)); + uint16_t mask = (1 << ((param >> 4) & 7)) - 1; + if(lduw_phys(addr + port / 8) & (mask << (port & 7))) { + + stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.exit_info_2), + env->eip + next_eip_addend); + helper_vmexit(0x07b, param | (port << 16)); + } + } +} + + +void helper_vmexit(uint32_t exit_code, uint64_t exit_info_1) +{ + uint32_t int_ctl; + + do { if (loglevel & ((1 << 1))) fprintf(logfile, "vmexit(%08x, %016" "ll" "x" ", %016" "ll" "x" ", " "%08x" ")!\n", exit_code, exit_info_1, ldq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.exit_info_2)), (env->eip)); } while (0) + + + ; + + if(env->hflags & (1 << 3)) { + stl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.int_state), 1); + env->hflags &= ~(1 << 3); + } else { + stl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.int_state), 0); + } + + + svm_save_seg(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.es), + &env->segs[0]); + svm_save_seg(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.cs), + &env->segs[1]); + svm_save_seg(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.ss), + &env->segs[2]); + svm_save_seg(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.ds), + &env->segs[3]); + + stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.gdtr.base), env->gdt.base); + stl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.gdtr.limit), env->gdt.limit); + + stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.idtr.base), env->idt.base); + stl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.idtr.limit), env->idt.limit); + + stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.efer), env->efer); + stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.cr0), env->cr[0]); + stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.cr2), env->cr[2]); + stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.cr3), env->cr[3]); + stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.cr4), env->cr[4]); + + int_ctl = ldl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.int_ctl)); + int_ctl &= ~(0x0f | (1 << 8)); + int_ctl |= env->v_tpr & 0x0f; + if (env->interrupt_request & 0x0100) + int_ctl |= (1 << 8); + stl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.int_ctl), int_ctl); + + stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.rflags), compute_eflags()); + stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.rip), env->eip); + stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.rsp), (env->regs[4])); + stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.rax), (env->regs[0])); + stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.dr7), env->dr[7]); + stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.dr6), env->dr[6]); + stb_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, save.cpl), env->hflags & (3 << 0)); + + + env->hflags2 &= ~((1 << 1) | (1 << 3)); + env->hflags &= ~(1 << 21); + env->intercept = 0; + env->intercept_exceptions = 0; + env->interrupt_request &= ~0x0100; + env->tsc_offset = 0; + + env->gdt.base = ldq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.gdtr.base)); + env->gdt.limit = ldl_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.gdtr.limit)); + + env->idt.base = ldq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.idtr.base)); + env->idt.limit = ldl_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.idtr.limit)); + + cpu_x86_update_cr0(env, ldq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.cr0)) | (1 << 0)); + cpu_x86_update_cr4(env, ldq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.cr4))); + cpu_x86_update_cr3(env, ldq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.cr3))); + + + cpu_load_efer(env, + ldq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.efer))); + env->eflags = 0; + load_eflags(ldq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.rflags)), + ~(0x0800 | 0x0080 | 0x0040 | 0x0010 | 0x0004 | 0x0001 | 0x00000400)); + (env->cc_op) = CC_OP_EFLAGS; + + svm_load_seg_cache(env->vm_hsave + __builtin_offsetof (struct vmcb, save.es), + env, 0); + svm_load_seg_cache(env->vm_hsave + __builtin_offsetof (struct vmcb, save.cs), + env, 1); + svm_load_seg_cache(env->vm_hsave + __builtin_offsetof (struct vmcb, save.ss), + env, 2); + svm_load_seg_cache(env->vm_hsave + __builtin_offsetof (struct vmcb, save.ds), + env, 3); + + (env->eip) = ldq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.rip)); + (env->regs[4]) = ldq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.rsp)); + (env->regs[0]) = ldq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.rax)); + + env->dr[6] = ldq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.dr6)); + env->dr[7] = ldq_phys(env->vm_hsave + __builtin_offsetof (struct vmcb, save.dr7)); + + + cpu_x86_set_cpl(env, 0); + stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.exit_code), exit_code); + stq_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.exit_info_1), exit_info_1); + + stl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.exit_int_info), + ldl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.event_inj))); + stl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.exit_int_info_err), + ldl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.event_inj_err))); + stl_phys(env->vm_vmcb + __builtin_offsetof (struct vmcb, control.event_inj), 0); + + env->hflags2 &= ~(1 << 0); +# 5606 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" + env->cr[0] |= (1 << 0); + env->eflags &= ~0x00020000; +# 5618 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" + env->exception_index = -1; + env->error_code = 0; + env->old_exception = -1; + + cpu_loop_exit(env); +} +# 5638 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" +static void update_sse_status(void) +{ + int rnd_type; + + + switch(env->mxcsr & 0x6000) { + default: + case 0x0000: + rnd_type = float_round_nearest_even; + break; + case 0x2000: + rnd_type = float_round_down; + break; + case 0x4000: + rnd_type = float_round_up; + break; + case 0x6000: + rnd_type = float_round_to_zero; + break; + } + set_float_rounding_mode(rnd_type, &env->sse_status); + + + set_flush_inputs_to_zero((env->mxcsr & 0x0040) ? 1 : 0, &env->sse_status); + + + set_flush_to_zero((env->mxcsr & 0x8000) ? 1 : 0, &env->fp_status); +} + +void helper_ldmxcsr(uint32_t val) +{ + env->mxcsr = val; + update_sse_status(); +} + +void helper_enter_mmx(void) +{ + env->fpstt = 0; + *(uint32_t *)(env->fptags) = 0; + *(uint32_t *)(env->fptags + 4) = 0; +} + +void helper_emms(void) +{ + + *(uint32_t *)(env->fptags) = 0x01010101; + *(uint32_t *)(env->fptags + 4) = 0x01010101; +} + + +void helper_movq(void *d, void *s) +{ + *(uint64_t *)d = *(uint64_t *)s; +} + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" 1 +# 38 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" +void helper_psrlw_mmx(MMXReg *d, MMXReg *s) +{ + int shift; + + if (s->q > 15) { + d->q = 0; + + + + } else { + shift = s->_b[0]; + d->_w[0] >>= shift; + d->_w[1] >>= shift; + d->_w[2] >>= shift; + d->_w[3] >>= shift; + + + + + + + } +} + +void helper_psraw_mmx(MMXReg *d, MMXReg *s) +{ + int shift; + + if (s->q > 15) { + shift = 15; + } else { + shift = s->_b[0]; + } + d->_w[0] = (int16_t)d->_w[0] >> shift; + d->_w[1] = (int16_t)d->_w[1] >> shift; + d->_w[2] = (int16_t)d->_w[2] >> shift; + d->_w[3] = (int16_t)d->_w[3] >> shift; + + + + + + +} + +void helper_psllw_mmx(MMXReg *d, MMXReg *s) +{ + int shift; + + if (s->q > 15) { + d->q = 0; + + + + } else { + shift = s->_b[0]; + d->_w[0] <<= shift; + d->_w[1] <<= shift; + d->_w[2] <<= shift; + d->_w[3] <<= shift; + + + + + + + } +} + +void helper_psrld_mmx(MMXReg *d, MMXReg *s) +{ + int shift; + + if (s->q > 31) { + d->q = 0; + + + + } else { + shift = s->_b[0]; + d->_l[0] >>= shift; + d->_l[1] >>= shift; + + + + + } +} + +void helper_psrad_mmx(MMXReg *d, MMXReg *s) +{ + int shift; + + if (s->q > 31) { + shift = 31; + } else { + shift = s->_b[0]; + } + d->_l[0] = (int32_t)d->_l[0] >> shift; + d->_l[1] = (int32_t)d->_l[1] >> shift; + + + + +} + +void helper_pslld_mmx(MMXReg *d, MMXReg *s) +{ + int shift; + + if (s->q > 31) { + d->q = 0; + + + + } else { + shift = s->_b[0]; + d->_l[0] <<= shift; + d->_l[1] <<= shift; + + + + + } +} + +void helper_psrlq_mmx(MMXReg *d, MMXReg *s) +{ + int shift; + + if (s->q > 63) { + d->q = 0; + + + + } else { + shift = s->_b[0]; + d->q >>= shift; + + + + } +} + +void helper_psllq_mmx(MMXReg *d, MMXReg *s) +{ + int shift; + + if (s->q > 63) { + d->q = 0; + + + + } else { + shift = s->_b[0]; + d->q <<= shift; + + + + } +} +# 287 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" +static __attribute__ (( always_inline )) __inline__ int satub(int x) +{ + if (x < 0) + return 0; + else if (x > 255) + return 255; + else + return x; +} + +static __attribute__ (( always_inline )) __inline__ int satuw(int x) +{ + if (x < 0) + return 0; + else if (x > 65535) + return 65535; + else + return x; +} + +static __attribute__ (( always_inline )) __inline__ int satsb(int x) +{ + if (x < -128) + return -128; + else if (x > 127) + return 127; + else + return x; +} + +static __attribute__ (( always_inline )) __inline__ int satsw(int x) +{ + if (x < -32768) + return -32768; + else if (x > 32767) + return 32767; + else + return x; +} +# 361 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" +void helper_paddb_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = ((d->_b[0]) + (s->_b[0])); d->_b[1] = ((d->_b[1]) + (s->_b[1])); d->_b[2] = ((d->_b[2]) + (s->_b[2])); d->_b[3] = ((d->_b[3]) + (s->_b[3])); d->_b[4] = ((d->_b[4]) + (s->_b[4])); d->_b[5] = ((d->_b[5]) + (s->_b[5])); d->_b[6] = ((d->_b[6]) + (s->_b[6])); d->_b[7] = ((d->_b[7]) + (s->_b[7])); } +void helper_paddw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = ((d->_w[0]) + (s->_w[0])); d->_w[1] = ((d->_w[1]) + (s->_w[1])); d->_w[2] = ((d->_w[2]) + (s->_w[2])); d->_w[3] = ((d->_w[3]) + (s->_w[3])); } +void helper_paddl_mmx (MMXReg *d, MMXReg *s){ d->_l[0] = ((d->_l[0]) + (s->_l[0])); d->_l[1] = ((d->_l[1]) + (s->_l[1])); } +void helper_paddq_mmx (MMXReg *d, MMXReg *s){ d->q = ((d->q) + (s->q)); } + +void helper_psubb_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = ((d->_b[0]) - (s->_b[0])); d->_b[1] = ((d->_b[1]) - (s->_b[1])); d->_b[2] = ((d->_b[2]) - (s->_b[2])); d->_b[3] = ((d->_b[3]) - (s->_b[3])); d->_b[4] = ((d->_b[4]) - (s->_b[4])); d->_b[5] = ((d->_b[5]) - (s->_b[5])); d->_b[6] = ((d->_b[6]) - (s->_b[6])); d->_b[7] = ((d->_b[7]) - (s->_b[7])); } +void helper_psubw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = ((d->_w[0]) - (s->_w[0])); d->_w[1] = ((d->_w[1]) - (s->_w[1])); d->_w[2] = ((d->_w[2]) - (s->_w[2])); d->_w[3] = ((d->_w[3]) - (s->_w[3])); } +void helper_psubl_mmx (MMXReg *d, MMXReg *s){ d->_l[0] = ((d->_l[0]) - (s->_l[0])); d->_l[1] = ((d->_l[1]) - (s->_l[1])); } +void helper_psubq_mmx (MMXReg *d, MMXReg *s){ d->q = ((d->q) - (s->q)); } + +void helper_paddusb_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = satub((d->_b[0]) + (s->_b[0])); d->_b[1] = satub((d->_b[1]) + (s->_b[1])); d->_b[2] = satub((d->_b[2]) + (s->_b[2])); d->_b[3] = satub((d->_b[3]) + (s->_b[3])); d->_b[4] = satub((d->_b[4]) + (s->_b[4])); d->_b[5] = satub((d->_b[5]) + (s->_b[5])); d->_b[6] = satub((d->_b[6]) + (s->_b[6])); d->_b[7] = satub((d->_b[7]) + (s->_b[7])); } +void helper_paddsb_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = satsb((int8_t)(d->_b[0]) + (int8_t)(s->_b[0])); d->_b[1] = satsb((int8_t)(d->_b[1]) + (int8_t)(s->_b[1])); d->_b[2] = satsb((int8_t)(d->_b[2]) + (int8_t)(s->_b[2])); d->_b[3] = satsb((int8_t)(d->_b[3]) + (int8_t)(s->_b[3])); d->_b[4] = satsb((int8_t)(d->_b[4]) + (int8_t)(s->_b[4])); d->_b[5] = satsb((int8_t)(d->_b[5]) + (int8_t)(s->_b[5])); d->_b[6] = satsb((int8_t)(d->_b[6]) + (int8_t)(s->_b[6])); d->_b[7] = satsb((int8_t)(d->_b[7]) + (int8_t)(s->_b[7])); } +void helper_psubusb_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = satub((d->_b[0]) - (s->_b[0])); d->_b[1] = satub((d->_b[1]) - (s->_b[1])); d->_b[2] = satub((d->_b[2]) - (s->_b[2])); d->_b[3] = satub((d->_b[3]) - (s->_b[3])); d->_b[4] = satub((d->_b[4]) - (s->_b[4])); d->_b[5] = satub((d->_b[5]) - (s->_b[5])); d->_b[6] = satub((d->_b[6]) - (s->_b[6])); d->_b[7] = satub((d->_b[7]) - (s->_b[7])); } +void helper_psubsb_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = satsb((int8_t)(d->_b[0]) - (int8_t)(s->_b[0])); d->_b[1] = satsb((int8_t)(d->_b[1]) - (int8_t)(s->_b[1])); d->_b[2] = satsb((int8_t)(d->_b[2]) - (int8_t)(s->_b[2])); d->_b[3] = satsb((int8_t)(d->_b[3]) - (int8_t)(s->_b[3])); d->_b[4] = satsb((int8_t)(d->_b[4]) - (int8_t)(s->_b[4])); d->_b[5] = satsb((int8_t)(d->_b[5]) - (int8_t)(s->_b[5])); d->_b[6] = satsb((int8_t)(d->_b[6]) - (int8_t)(s->_b[6])); d->_b[7] = satsb((int8_t)(d->_b[7]) - (int8_t)(s->_b[7])); } + +void helper_paddusw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = satuw((d->_w[0]) + (s->_w[0])); d->_w[1] = satuw((d->_w[1]) + (s->_w[1])); d->_w[2] = satuw((d->_w[2]) + (s->_w[2])); d->_w[3] = satuw((d->_w[3]) + (s->_w[3])); } +void helper_paddsw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = satsw((int16_t)(d->_w[0]) + (int16_t)(s->_w[0])); d->_w[1] = satsw((int16_t)(d->_w[1]) + (int16_t)(s->_w[1])); d->_w[2] = satsw((int16_t)(d->_w[2]) + (int16_t)(s->_w[2])); d->_w[3] = satsw((int16_t)(d->_w[3]) + (int16_t)(s->_w[3])); } +void helper_psubusw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = satuw((d->_w[0]) - (s->_w[0])); d->_w[1] = satuw((d->_w[1]) - (s->_w[1])); d->_w[2] = satuw((d->_w[2]) - (s->_w[2])); d->_w[3] = satuw((d->_w[3]) - (s->_w[3])); } +void helper_psubsw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = satsw((int16_t)(d->_w[0]) - (int16_t)(s->_w[0])); d->_w[1] = satsw((int16_t)(d->_w[1]) - (int16_t)(s->_w[1])); d->_w[2] = satsw((int16_t)(d->_w[2]) - (int16_t)(s->_w[2])); d->_w[3] = satsw((int16_t)(d->_w[3]) - (int16_t)(s->_w[3])); } + +void helper_pminub_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = ((d->_b[0]) < (s->_b[0])) ? (d->_b[0]) : (s->_b[0]); d->_b[1] = ((d->_b[1]) < (s->_b[1])) ? (d->_b[1]) : (s->_b[1]); d->_b[2] = ((d->_b[2]) < (s->_b[2])) ? (d->_b[2]) : (s->_b[2]); d->_b[3] = ((d->_b[3]) < (s->_b[3])) ? (d->_b[3]) : (s->_b[3]); d->_b[4] = ((d->_b[4]) < (s->_b[4])) ? (d->_b[4]) : (s->_b[4]); d->_b[5] = ((d->_b[5]) < (s->_b[5])) ? (d->_b[5]) : (s->_b[5]); d->_b[6] = ((d->_b[6]) < (s->_b[6])) ? (d->_b[6]) : (s->_b[6]); d->_b[7] = ((d->_b[7]) < (s->_b[7])) ? (d->_b[7]) : (s->_b[7]); } +void helper_pmaxub_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = ((d->_b[0]) > (s->_b[0])) ? (d->_b[0]) : (s->_b[0]); d->_b[1] = ((d->_b[1]) > (s->_b[1])) ? (d->_b[1]) : (s->_b[1]); d->_b[2] = ((d->_b[2]) > (s->_b[2])) ? (d->_b[2]) : (s->_b[2]); d->_b[3] = ((d->_b[3]) > (s->_b[3])) ? (d->_b[3]) : (s->_b[3]); d->_b[4] = ((d->_b[4]) > (s->_b[4])) ? (d->_b[4]) : (s->_b[4]); d->_b[5] = ((d->_b[5]) > (s->_b[5])) ? (d->_b[5]) : (s->_b[5]); d->_b[6] = ((d->_b[6]) > (s->_b[6])) ? (d->_b[6]) : (s->_b[6]); d->_b[7] = ((d->_b[7]) > (s->_b[7])) ? (d->_b[7]) : (s->_b[7]); } + +void helper_pminsw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = ((int16_t)(d->_w[0]) < (int16_t)(s->_w[0])) ? (d->_w[0]) : (s->_w[0]); d->_w[1] = ((int16_t)(d->_w[1]) < (int16_t)(s->_w[1])) ? (d->_w[1]) : (s->_w[1]); d->_w[2] = ((int16_t)(d->_w[2]) < (int16_t)(s->_w[2])) ? (d->_w[2]) : (s->_w[2]); d->_w[3] = ((int16_t)(d->_w[3]) < (int16_t)(s->_w[3])) ? (d->_w[3]) : (s->_w[3]); } +void helper_pmaxsw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = ((int16_t)(d->_w[0]) > (int16_t)(s->_w[0])) ? (d->_w[0]) : (s->_w[0]); d->_w[1] = ((int16_t)(d->_w[1]) > (int16_t)(s->_w[1])) ? (d->_w[1]) : (s->_w[1]); d->_w[2] = ((int16_t)(d->_w[2]) > (int16_t)(s->_w[2])) ? (d->_w[2]) : (s->_w[2]); d->_w[3] = ((int16_t)(d->_w[3]) > (int16_t)(s->_w[3])) ? (d->_w[3]) : (s->_w[3]); } + +void helper_pand_mmx (MMXReg *d, MMXReg *s){ d->q = (d->q) & (s->q); } +void helper_pandn_mmx (MMXReg *d, MMXReg *s){ d->q = ((~(d->q)) & (s->q)); } +void helper_por_mmx (MMXReg *d, MMXReg *s){ d->q = (d->q) | (s->q); } +void helper_pxor_mmx (MMXReg *d, MMXReg *s){ d->q = (d->q) ^ (s->q); } + +void helper_pcmpgtb_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = (int8_t)(d->_b[0]) > (int8_t)(s->_b[0]) ? -1 : 0; d->_b[1] = (int8_t)(d->_b[1]) > (int8_t)(s->_b[1]) ? -1 : 0; d->_b[2] = (int8_t)(d->_b[2]) > (int8_t)(s->_b[2]) ? -1 : 0; d->_b[3] = (int8_t)(d->_b[3]) > (int8_t)(s->_b[3]) ? -1 : 0; d->_b[4] = (int8_t)(d->_b[4]) > (int8_t)(s->_b[4]) ? -1 : 0; d->_b[5] = (int8_t)(d->_b[5]) > (int8_t)(s->_b[5]) ? -1 : 0; d->_b[6] = (int8_t)(d->_b[6]) > (int8_t)(s->_b[6]) ? -1 : 0; d->_b[7] = (int8_t)(d->_b[7]) > (int8_t)(s->_b[7]) ? -1 : 0; } +void helper_pcmpgtw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = (int16_t)(d->_w[0]) > (int16_t)(s->_w[0]) ? -1 : 0; d->_w[1] = (int16_t)(d->_w[1]) > (int16_t)(s->_w[1]) ? -1 : 0; d->_w[2] = (int16_t)(d->_w[2]) > (int16_t)(s->_w[2]) ? -1 : 0; d->_w[3] = (int16_t)(d->_w[3]) > (int16_t)(s->_w[3]) ? -1 : 0; } +void helper_pcmpgtl_mmx (MMXReg *d, MMXReg *s){ d->_l[0] = (int32_t)(d->_l[0]) > (int32_t)(s->_l[0]) ? -1 : 0; d->_l[1] = (int32_t)(d->_l[1]) > (int32_t)(s->_l[1]) ? -1 : 0; } + +void helper_pcmpeqb_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = (d->_b[0]) == (s->_b[0]) ? -1 : 0; d->_b[1] = (d->_b[1]) == (s->_b[1]) ? -1 : 0; d->_b[2] = (d->_b[2]) == (s->_b[2]) ? -1 : 0; d->_b[3] = (d->_b[3]) == (s->_b[3]) ? -1 : 0; d->_b[4] = (d->_b[4]) == (s->_b[4]) ? -1 : 0; d->_b[5] = (d->_b[5]) == (s->_b[5]) ? -1 : 0; d->_b[6] = (d->_b[6]) == (s->_b[6]) ? -1 : 0; d->_b[7] = (d->_b[7]) == (s->_b[7]) ? -1 : 0; } +void helper_pcmpeqw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = (d->_w[0]) == (s->_w[0]) ? -1 : 0; d->_w[1] = (d->_w[1]) == (s->_w[1]) ? -1 : 0; d->_w[2] = (d->_w[2]) == (s->_w[2]) ? -1 : 0; d->_w[3] = (d->_w[3]) == (s->_w[3]) ? -1 : 0; } +void helper_pcmpeql_mmx (MMXReg *d, MMXReg *s){ d->_l[0] = (d->_l[0]) == (s->_l[0]) ? -1 : 0; d->_l[1] = (d->_l[1]) == (s->_l[1]) ? -1 : 0; } + +void helper_pmullw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = (d->_w[0]) * (s->_w[0]); d->_w[1] = (d->_w[1]) * (s->_w[1]); d->_w[2] = (d->_w[2]) * (s->_w[2]); d->_w[3] = (d->_w[3]) * (s->_w[3]); } + +void helper_pmulhrw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = ((int16_t)(d->_w[0]) * (int16_t)(s->_w[0]) + 0x8000) >> 16; d->_w[1] = ((int16_t)(d->_w[1]) * (int16_t)(s->_w[1]) + 0x8000) >> 16; d->_w[2] = ((int16_t)(d->_w[2]) * (int16_t)(s->_w[2]) + 0x8000) >> 16; d->_w[3] = ((int16_t)(d->_w[3]) * (int16_t)(s->_w[3]) + 0x8000) >> 16; } + +void helper_pmulhuw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = (d->_w[0]) * (s->_w[0]) >> 16; d->_w[1] = (d->_w[1]) * (s->_w[1]) >> 16; d->_w[2] = (d->_w[2]) * (s->_w[2]) >> 16; d->_w[3] = (d->_w[3]) * (s->_w[3]) >> 16; } +void helper_pmulhw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = (int16_t)(d->_w[0]) * (int16_t)(s->_w[0]) >> 16; d->_w[1] = (int16_t)(d->_w[1]) * (int16_t)(s->_w[1]) >> 16; d->_w[2] = (int16_t)(d->_w[2]) * (int16_t)(s->_w[2]) >> 16; d->_w[3] = (int16_t)(d->_w[3]) * (int16_t)(s->_w[3]) >> 16; } + +void helper_pavgb_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = ((d->_b[0]) + (s->_b[0]) + 1) >> 1; d->_b[1] = ((d->_b[1]) + (s->_b[1]) + 1) >> 1; d->_b[2] = ((d->_b[2]) + (s->_b[2]) + 1) >> 1; d->_b[3] = ((d->_b[3]) + (s->_b[3]) + 1) >> 1; d->_b[4] = ((d->_b[4]) + (s->_b[4]) + 1) >> 1; d->_b[5] = ((d->_b[5]) + (s->_b[5]) + 1) >> 1; d->_b[6] = ((d->_b[6]) + (s->_b[6]) + 1) >> 1; d->_b[7] = ((d->_b[7]) + (s->_b[7]) + 1) >> 1; } +void helper_pavgw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = ((d->_w[0]) + (s->_w[0]) + 1) >> 1; d->_w[1] = ((d->_w[1]) + (s->_w[1]) + 1) >> 1; d->_w[2] = ((d->_w[2]) + (s->_w[2]) + 1) >> 1; d->_w[3] = ((d->_w[3]) + (s->_w[3]) + 1) >> 1; } + +void helper_pmuludq_mmx (MMXReg *d, MMXReg *s) +{ + d->q = (uint64_t)s->_l[0] * (uint64_t)d->_l[0]; + + + +} + +void helper_pmaddwd_mmx (MMXReg *d, MMXReg *s) +{ + int i; + + for(i = 0; i < (2 << 0); i++) { + d->_l[i] = (int16_t)s->_w[2*i] * (int16_t)d->_w[2*i] + + (int16_t)s->_w[2*i+1] * (int16_t)d->_w[2*i+1]; + } +} + + +static __attribute__ (( always_inline )) __inline__ int abs1(int a) +{ + if (a < 0) + return -a; + else + return a; +} + +void helper_psadbw_mmx (MMXReg *d, MMXReg *s) +{ + unsigned int val; + + val = 0; + val += abs1(d->_b[0] - s->_b[0]); + val += abs1(d->_b[1] - s->_b[1]); + val += abs1(d->_b[2] - s->_b[2]); + val += abs1(d->_b[3] - s->_b[3]); + val += abs1(d->_b[4] - s->_b[4]); + val += abs1(d->_b[5] - s->_b[5]); + val += abs1(d->_b[6] - s->_b[6]); + val += abs1(d->_b[7] - s->_b[7]); + d->q = val; +# 463 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" +} + +void helper_maskmov_mmx (MMXReg *d, MMXReg *s, target_ulong a0) +{ + int i; + for(i = 0; i < (8 << 0); i++) { + if (s->_b[i] & 0x80) + stb_data(a0 + i, d->_b[i]); + } +} + +void helper_movl_mm_T0_mmx (MMXReg *d, uint32_t val) +{ + d->_l[0] = val; + d->_l[1] = 0; + + + +} +# 494 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" +void helper_pshufw_mmx (MMXReg *d, MMXReg *s, int order) +{ + MMXReg r; + r._w[0] = s->_w[order & 3]; + r._w[1] = s->_w[(order >> 2) & 3]; + r._w[2] = s->_w[(order >> 4) & 3]; + r._w[3] = s->_w[(order >> 6) & 3]; + *d = r; +} +# 1023 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" +uint32_t helper_pmovmskb_mmx(MMXReg *s) +{ + uint32_t val; + val = 0; + val |= (s->_b[0] >> 7); + val |= (s->_b[1] >> 6) & 0x02; + val |= (s->_b[2] >> 5) & 0x04; + val |= (s->_b[3] >> 4) & 0x08; + val |= (s->_b[4] >> 3) & 0x10; + val |= (s->_b[5] >> 2) & 0x20; + val |= (s->_b[6] >> 1) & 0x40; + val |= (s->_b[7]) & 0x80; +# 1045 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" + return val; +} + +void helper_packsswb_mmx (MMXReg *d, MMXReg *s) +{ + MMXReg r; + + r._b[0] = satsb((int16_t)d->_w[0]); + r._b[1] = satsb((int16_t)d->_w[1]); + r._b[2] = satsb((int16_t)d->_w[2]); + r._b[3] = satsb((int16_t)d->_w[3]); + + + + + + + r._b[(4 << 0) + 0] = satsb((int16_t)s->_w[0]); + r._b[(4 << 0) + 1] = satsb((int16_t)s->_w[1]); + r._b[(4 << 0) + 2] = satsb((int16_t)s->_w[2]); + r._b[(4 << 0) + 3] = satsb((int16_t)s->_w[3]); + + + + + + + *d = r; +} + +void helper_packuswb_mmx (MMXReg *d, MMXReg *s) +{ + MMXReg r; + + r._b[0] = satub((int16_t)d->_w[0]); + r._b[1] = satub((int16_t)d->_w[1]); + r._b[2] = satub((int16_t)d->_w[2]); + r._b[3] = satub((int16_t)d->_w[3]); + + + + + + + r._b[(4 << 0) + 0] = satub((int16_t)s->_w[0]); + r._b[(4 << 0) + 1] = satub((int16_t)s->_w[1]); + r._b[(4 << 0) + 2] = satub((int16_t)s->_w[2]); + r._b[(4 << 0) + 3] = satub((int16_t)s->_w[3]); + + + + + + + *d = r; +} + +void helper_packssdw_mmx (MMXReg *d, MMXReg *s) +{ + MMXReg r; + + r._w[0] = satsw(d->_l[0]); + r._w[1] = satsw(d->_l[1]); + + + + + r._w[(2 << 0) + 0] = satsw(s->_l[0]); + r._w[(2 << 0) + 1] = satsw(s->_l[1]); + + + + + *d = r; +} +# 1189 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" +void helper_punpcklbw_mmx (MMXReg *d, MMXReg *s) { MMXReg r; r._b[0] = d->_b[(0 << (0 + 2)) + 0]; r._b[1] = s->_b[(0 << (0 + 2)) + 0]; r._b[2] = d->_b[(0 << (0 + 2)) + 1]; r._b[3] = s->_b[(0 << (0 + 2)) + 1]; r._b[4] = d->_b[(0 << (0 + 2)) + 2]; r._b[5] = s->_b[(0 << (0 + 2)) + 2]; r._b[6] = d->_b[(0 << (0 + 2)) + 3]; r._b[7] = s->_b[(0 << (0 + 2)) + 3]; *d = r; } void helper_punpcklwd_mmx (MMXReg *d, MMXReg *s) { MMXReg r; r._w[0] = d->_w[(0 << (0 + 1)) + 0]; r._w[1] = s->_w[(0 << (0 + 1)) + 0]; r._w[2] = d->_w[(0 << (0 + 1)) + 1]; r._w[3] = s->_w[(0 << (0 + 1)) + 1]; *d = r; } void helper_punpckldq_mmx (MMXReg *d, MMXReg *s) { MMXReg r; r._l[0] = d->_l[(0 << 0) + 0]; r._l[1] = s->_l[(0 << 0) + 0]; *d = r; } +void helper_punpckhbw_mmx (MMXReg *d, MMXReg *s) { MMXReg r; r._b[0] = d->_b[(1 << (0 + 2)) + 0]; r._b[1] = s->_b[(1 << (0 + 2)) + 0]; r._b[2] = d->_b[(1 << (0 + 2)) + 1]; r._b[3] = s->_b[(1 << (0 + 2)) + 1]; r._b[4] = d->_b[(1 << (0 + 2)) + 2]; r._b[5] = s->_b[(1 << (0 + 2)) + 2]; r._b[6] = d->_b[(1 << (0 + 2)) + 3]; r._b[7] = s->_b[(1 << (0 + 2)) + 3]; *d = r; } void helper_punpckhwd_mmx (MMXReg *d, MMXReg *s) { MMXReg r; r._w[0] = d->_w[(1 << (0 + 1)) + 0]; r._w[1] = s->_w[(1 << (0 + 1)) + 0]; r._w[2] = d->_w[(1 << (0 + 1)) + 1]; r._w[3] = s->_w[(1 << (0 + 1)) + 1]; *d = r; } void helper_punpckhdq_mmx (MMXReg *d, MMXReg *s) { MMXReg r; r._l[0] = d->_l[(1 << 0) + 0]; r._l[1] = s->_l[(1 << 0) + 0]; *d = r; } + + + +void helper_pi2fd(MMXReg *d, MMXReg *s) +{ + d->_s[0] = int32_to_float32(s->_l[0], &env->mmx_status); + d->_s[1] = int32_to_float32(s->_l[1], &env->mmx_status); +} + +void helper_pi2fw(MMXReg *d, MMXReg *s) +{ + d->_s[0] = int32_to_float32((int16_t)s->_w[0], &env->mmx_status); + d->_s[1] = int32_to_float32((int16_t)s->_w[2], &env->mmx_status); +} + +void helper_pf2id(MMXReg *d, MMXReg *s) +{ + d->_l[0] = float32_to_int32_round_to_zero(s->_s[0], &env->mmx_status); + d->_l[1] = float32_to_int32_round_to_zero(s->_s[1], &env->mmx_status); +} + +void helper_pf2iw(MMXReg *d, MMXReg *s) +{ + d->_l[0] = satsw(float32_to_int32_round_to_zero(s->_s[0], &env->mmx_status)); + d->_l[1] = satsw(float32_to_int32_round_to_zero(s->_s[1], &env->mmx_status)); +} + +void helper_pfacc(MMXReg *d, MMXReg *s) +{ + MMXReg r; + r._s[0] = float32_add(d->_s[0], d->_s[1], &env->mmx_status); + r._s[1] = float32_add(s->_s[0], s->_s[1], &env->mmx_status); + *d = r; +} + +void helper_pfadd(MMXReg *d, MMXReg *s) +{ + d->_s[0] = float32_add(d->_s[0], s->_s[0], &env->mmx_status); + d->_s[1] = float32_add(d->_s[1], s->_s[1], &env->mmx_status); +} + +void helper_pfcmpeq(MMXReg *d, MMXReg *s) +{ + d->_l[0] = float32_eq_quiet(d->_s[0], s->_s[0], &env->mmx_status) ? -1 : 0; + d->_l[1] = float32_eq_quiet(d->_s[1], s->_s[1], &env->mmx_status) ? -1 : 0; +} + +void helper_pfcmpge(MMXReg *d, MMXReg *s) +{ + d->_l[0] = float32_le(s->_s[0], d->_s[0], &env->mmx_status) ? -1 : 0; + d->_l[1] = float32_le(s->_s[1], d->_s[1], &env->mmx_status) ? -1 : 0; +} + +void helper_pfcmpgt(MMXReg *d, MMXReg *s) +{ + d->_l[0] = float32_lt(s->_s[0], d->_s[0], &env->mmx_status) ? -1 : 0; + d->_l[1] = float32_lt(s->_s[1], d->_s[1], &env->mmx_status) ? -1 : 0; +} + +void helper_pfmax(MMXReg *d, MMXReg *s) +{ + if (float32_lt(d->_s[0], s->_s[0], &env->mmx_status)) + d->_s[0] = s->_s[0]; + if (float32_lt(d->_s[1], s->_s[1], &env->mmx_status)) + d->_s[1] = s->_s[1]; +} + +void helper_pfmin(MMXReg *d, MMXReg *s) +{ + if (float32_lt(s->_s[0], d->_s[0], &env->mmx_status)) + d->_s[0] = s->_s[0]; + if (float32_lt(s->_s[1], d->_s[1], &env->mmx_status)) + d->_s[1] = s->_s[1]; +} + +void helper_pfmul(MMXReg *d, MMXReg *s) +{ + d->_s[0] = float32_mul(d->_s[0], s->_s[0], &env->mmx_status); + d->_s[1] = float32_mul(d->_s[1], s->_s[1], &env->mmx_status); +} + +void helper_pfnacc(MMXReg *d, MMXReg *s) +{ + MMXReg r; + r._s[0] = float32_sub(d->_s[0], d->_s[1], &env->mmx_status); + r._s[1] = float32_sub(s->_s[0], s->_s[1], &env->mmx_status); + *d = r; +} + +void helper_pfpnacc(MMXReg *d, MMXReg *s) +{ + MMXReg r; + r._s[0] = float32_sub(d->_s[0], d->_s[1], &env->mmx_status); + r._s[1] = float32_add(s->_s[0], s->_s[1], &env->mmx_status); + *d = r; +} + +void helper_pfrcp(MMXReg *d, MMXReg *s) +{ + d->_s[0] = float32_div((0x3f800000), s->_s[0], &env->mmx_status); + d->_s[1] = d->_s[0]; +} + +void helper_pfrsqrt(MMXReg *d, MMXReg *s) +{ + d->_l[1] = s->_l[0] & 0x7fffffff; + d->_s[1] = float32_div((0x3f800000), + float32_sqrt(d->_s[1], &env->mmx_status), + &env->mmx_status); + d->_l[1] |= s->_l[0] & 0x80000000; + d->_l[0] = d->_l[1]; +} + +void helper_pfsub(MMXReg *d, MMXReg *s) +{ + d->_s[0] = float32_sub(d->_s[0], s->_s[0], &env->mmx_status); + d->_s[1] = float32_sub(d->_s[1], s->_s[1], &env->mmx_status); +} + +void helper_pfsubr(MMXReg *d, MMXReg *s) +{ + d->_s[0] = float32_sub(s->_s[0], d->_s[0], &env->mmx_status); + d->_s[1] = float32_sub(s->_s[1], d->_s[1], &env->mmx_status); +} + +void helper_pswapd(MMXReg *d, MMXReg *s) +{ + MMXReg r; + r._l[0] = s->_l[1]; + r._l[1] = s->_l[0]; + *d = r; +} + + + +void helper_pshufb_mmx (MMXReg *d, MMXReg *s) +{ + int i; + MMXReg r; + + for (i = 0; i < (8 << 0); i++) + r._b[i] = (s->_b[i] & 0x80) ? 0 : (d->_b[s->_b[i] & ((8 << 0) - 1)]); + + *d = r; +} + +void helper_phaddw_mmx (MMXReg *d, MMXReg *s) +{ + d->_w[0] = (int16_t)d->_w[0] + (int16_t)d->_w[1]; + d->_w[1] = (int16_t)d->_w[2] + (int16_t)d->_w[3]; + ; + ; + d->_w[(2 << 0) + 0] = (int16_t)s->_w[0] + (int16_t)s->_w[1]; + d->_w[(2 << 0) + 1] = (int16_t)s->_w[2] + (int16_t)s->_w[3]; + ; + ; +} + +void helper_phaddd_mmx (MMXReg *d, MMXReg *s) +{ + d->_l[0] = (int32_t)d->_l[0] + (int32_t)d->_l[1]; + ; + d->_l[(1 << 0) + 0] = (int32_t)s->_l[0] + (int32_t)s->_l[1]; + ; +} + +void helper_phaddsw_mmx (MMXReg *d, MMXReg *s) +{ + d->_w[0] = satsw((int16_t)d->_w[0] + (int16_t)d->_w[1]); + d->_w[1] = satsw((int16_t)d->_w[2] + (int16_t)d->_w[3]); + ; + ; + d->_w[(2 << 0) + 0] = satsw((int16_t)s->_w[0] + (int16_t)s->_w[1]); + d->_w[(2 << 0) + 1] = satsw((int16_t)s->_w[2] + (int16_t)s->_w[3]); + ; + ; +} + +void helper_pmaddubsw_mmx (MMXReg *d, MMXReg *s) +{ + d->_w[0] = satsw((int8_t)s->_b[0] * (uint8_t)d->_b[0] + + (int8_t)s->_b[1] * (uint8_t)d->_b[1]); + d->_w[1] = satsw((int8_t)s->_b[2] * (uint8_t)d->_b[2] + + (int8_t)s->_b[3] * (uint8_t)d->_b[3]); + d->_w[2] = satsw((int8_t)s->_b[4] * (uint8_t)d->_b[4] + + (int8_t)s->_b[5] * (uint8_t)d->_b[5]); + d->_w[3] = satsw((int8_t)s->_b[6] * (uint8_t)d->_b[6] + + (int8_t)s->_b[7] * (uint8_t)d->_b[7]); +# 1389 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" +} + +void helper_phsubw_mmx (MMXReg *d, MMXReg *s) +{ + d->_w[0] = (int16_t)d->_w[0] - (int16_t)d->_w[1]; + d->_w[1] = (int16_t)d->_w[2] - (int16_t)d->_w[3]; + ; + ; + d->_w[(2 << 0) + 0] = (int16_t)s->_w[0] - (int16_t)s->_w[1]; + d->_w[(2 << 0) + 1] = (int16_t)s->_w[2] - (int16_t)s->_w[3]; + ; + ; +} + +void helper_phsubd_mmx (MMXReg *d, MMXReg *s) +{ + d->_l[0] = (int32_t)d->_l[0] - (int32_t)d->_l[1]; + ; + d->_l[(1 << 0) + 0] = (int32_t)s->_l[0] - (int32_t)s->_l[1]; + ; +} + +void helper_phsubsw_mmx (MMXReg *d, MMXReg *s) +{ + d->_w[0] = satsw((int16_t)d->_w[0] - (int16_t)d->_w[1]); + d->_w[1] = satsw((int16_t)d->_w[2] - (int16_t)d->_w[3]); + ; + ; + d->_w[(2 << 0) + 0] = satsw((int16_t)s->_w[0] - (int16_t)s->_w[1]); + d->_w[(2 << 0) + 1] = satsw((int16_t)s->_w[2] - (int16_t)s->_w[3]); + ; + ; +} + + + + +void helper_pabsb_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = s->_b[0] > (127) ? -(int8_t ) s->_b[0] : s->_b[0]; d->_b[1] = s->_b[1] > (127) ? -(int8_t ) s->_b[1] : s->_b[1]; d->_b[2] = s->_b[2] > (127) ? -(int8_t ) s->_b[2] : s->_b[2]; d->_b[3] = s->_b[3] > (127) ? -(int8_t ) s->_b[3] : s->_b[3]; d->_b[4] = s->_b[4] > (127) ? -(int8_t ) s->_b[4] : s->_b[4]; d->_b[5] = s->_b[5] > (127) ? -(int8_t ) s->_b[5] : s->_b[5]; d->_b[6] = s->_b[6] > (127) ? -(int8_t ) s->_b[6] : s->_b[6]; d->_b[7] = s->_b[7] > (127) ? -(int8_t ) s->_b[7] : s->_b[7]; } +void helper_pabsw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = s->_w[0] > (32767) ? -(int16_t) s->_w[0] : s->_w[0]; d->_w[1] = s->_w[1] > (32767) ? -(int16_t) s->_w[1] : s->_w[1]; d->_w[2] = s->_w[2] > (32767) ? -(int16_t) s->_w[2] : s->_w[2]; d->_w[3] = s->_w[3] > (32767) ? -(int16_t) s->_w[3] : s->_w[3]; } +void helper_pabsd_mmx (MMXReg *d, MMXReg *s){ d->_l[0] = s->_l[0] > (2147483647) ? -(int32_t) s->_l[0] : s->_l[0]; d->_l[1] = s->_l[1] > (2147483647) ? -(int32_t) s->_l[1] : s->_l[1]; } + + +void helper_pmulhrsw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = ((int16_t) d->_w[0] * (int16_t) s->_w[0] + 0x4000) >> 15; d->_w[1] = ((int16_t) d->_w[1] * (int16_t) s->_w[1] + 0x4000) >> 15; d->_w[2] = ((int16_t) d->_w[2] * (int16_t) s->_w[2] + 0x4000) >> 15; d->_w[3] = ((int16_t) d->_w[3] * (int16_t) s->_w[3] + 0x4000) >> 15; } + + + + +void helper_psignb_mmx (MMXReg *d, MMXReg *s){ d->_b[0] = s->_b[0] <= (127) ? s->_b[0] ? d->_b[0] : 0 : -(int8_t ) d->_b[0]; d->_b[1] = s->_b[1] <= (127) ? s->_b[1] ? d->_b[1] : 0 : -(int8_t ) d->_b[1]; d->_b[2] = s->_b[2] <= (127) ? s->_b[2] ? d->_b[2] : 0 : -(int8_t ) d->_b[2]; d->_b[3] = s->_b[3] <= (127) ? s->_b[3] ? d->_b[3] : 0 : -(int8_t ) d->_b[3]; d->_b[4] = s->_b[4] <= (127) ? s->_b[4] ? d->_b[4] : 0 : -(int8_t ) d->_b[4]; d->_b[5] = s->_b[5] <= (127) ? s->_b[5] ? d->_b[5] : 0 : -(int8_t ) d->_b[5]; d->_b[6] = s->_b[6] <= (127) ? s->_b[6] ? d->_b[6] : 0 : -(int8_t ) d->_b[6]; d->_b[7] = s->_b[7] <= (127) ? s->_b[7] ? d->_b[7] : 0 : -(int8_t ) d->_b[7]; } +void helper_psignw_mmx (MMXReg *d, MMXReg *s){ d->_w[0] = s->_w[0] <= (32767) ? s->_w[0] ? d->_w[0] : 0 : -(int16_t) d->_w[0]; d->_w[1] = s->_w[1] <= (32767) ? s->_w[1] ? d->_w[1] : 0 : -(int16_t) d->_w[1]; d->_w[2] = s->_w[2] <= (32767) ? s->_w[2] ? d->_w[2] : 0 : -(int16_t) d->_w[2]; d->_w[3] = s->_w[3] <= (32767) ? s->_w[3] ? d->_w[3] : 0 : -(int16_t) d->_w[3]; } +void helper_psignd_mmx (MMXReg *d, MMXReg *s){ d->_l[0] = s->_l[0] <= (2147483647) ? s->_l[0] ? d->_l[0] : 0 : -(int32_t) d->_l[0]; d->_l[1] = s->_l[1] <= (2147483647) ? s->_l[1] ? d->_l[1] : 0 : -(int32_t) d->_l[1]; } + +void helper_palignr_mmx (MMXReg *d, MMXReg *s, int32_t shift) +{ + MMXReg r; + + + if (shift >= (16 << 0)) { + r.q = 0; + ; + } else { + shift <<= 3; + + + r.q = (shift - 0 < 64 && shift - 0 > -64 ? shift - 0 > 0 ? s->q >> (shift - 0) : (s->q << -(shift - 0)) : 0) | + (shift - 64 < 64 && shift - 64 > -64 ? shift - 64 > 0 ? d->q >> (shift - 64) : (d->q << -(shift - 64)) : 0); +# 1465 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" + } + + *d = r; +} +# 5695 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" 1 +# 38 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" +void helper_psrlw_xmm(XMMReg *d, XMMReg *s) +{ + int shift; + + if (s->_q[0] > 15) { + d->_q[0] = 0; + + d->_q[1] = 0; + + } else { + shift = s->_b[0]; + d->_w[0] >>= shift; + d->_w[1] >>= shift; + d->_w[2] >>= shift; + d->_w[3] >>= shift; + + d->_w[4] >>= shift; + d->_w[5] >>= shift; + d->_w[6] >>= shift; + d->_w[7] >>= shift; + + } +} + +void helper_psraw_xmm(XMMReg *d, XMMReg *s) +{ + int shift; + + if (s->_q[0] > 15) { + shift = 15; + } else { + shift = s->_b[0]; + } + d->_w[0] = (int16_t)d->_w[0] >> shift; + d->_w[1] = (int16_t)d->_w[1] >> shift; + d->_w[2] = (int16_t)d->_w[2] >> shift; + d->_w[3] = (int16_t)d->_w[3] >> shift; + + d->_w[4] = (int16_t)d->_w[4] >> shift; + d->_w[5] = (int16_t)d->_w[5] >> shift; + d->_w[6] = (int16_t)d->_w[6] >> shift; + d->_w[7] = (int16_t)d->_w[7] >> shift; + +} + +void helper_psllw_xmm(XMMReg *d, XMMReg *s) +{ + int shift; + + if (s->_q[0] > 15) { + d->_q[0] = 0; + + d->_q[1] = 0; + + } else { + shift = s->_b[0]; + d->_w[0] <<= shift; + d->_w[1] <<= shift; + d->_w[2] <<= shift; + d->_w[3] <<= shift; + + d->_w[4] <<= shift; + d->_w[5] <<= shift; + d->_w[6] <<= shift; + d->_w[7] <<= shift; + + } +} + +void helper_psrld_xmm(XMMReg *d, XMMReg *s) +{ + int shift; + + if (s->_q[0] > 31) { + d->_q[0] = 0; + + d->_q[1] = 0; + + } else { + shift = s->_b[0]; + d->_l[0] >>= shift; + d->_l[1] >>= shift; + + d->_l[2] >>= shift; + d->_l[3] >>= shift; + + } +} + +void helper_psrad_xmm(XMMReg *d, XMMReg *s) +{ + int shift; + + if (s->_q[0] > 31) { + shift = 31; + } else { + shift = s->_b[0]; + } + d->_l[0] = (int32_t)d->_l[0] >> shift; + d->_l[1] = (int32_t)d->_l[1] >> shift; + + d->_l[2] = (int32_t)d->_l[2] >> shift; + d->_l[3] = (int32_t)d->_l[3] >> shift; + +} + +void helper_pslld_xmm(XMMReg *d, XMMReg *s) +{ + int shift; + + if (s->_q[0] > 31) { + d->_q[0] = 0; + + d->_q[1] = 0; + + } else { + shift = s->_b[0]; + d->_l[0] <<= shift; + d->_l[1] <<= shift; + + d->_l[2] <<= shift; + d->_l[3] <<= shift; + + } +} + +void helper_psrlq_xmm(XMMReg *d, XMMReg *s) +{ + int shift; + + if (s->_q[0] > 63) { + d->_q[0] = 0; + + d->_q[1] = 0; + + } else { + shift = s->_b[0]; + d->_q[0] >>= shift; + + d->_q[1] >>= shift; + + } +} + +void helper_psllq_xmm(XMMReg *d, XMMReg *s) +{ + int shift; + + if (s->_q[0] > 63) { + d->_q[0] = 0; + + d->_q[1] = 0; + + } else { + shift = s->_b[0]; + d->_q[0] <<= shift; + + d->_q[1] <<= shift; + + } +} + + +void helper_psrldq_xmm(XMMReg *d, XMMReg *s) +{ + int shift, i; + + shift = s->_l[0]; + if (shift > 16) + shift = 16; + for(i = 0; i < 16 - shift; i++) + d->_b[i] = d->_b[i + shift]; + for(i = 16 - shift; i < 16; i++) + d->_b[i] = 0; +} + +void helper_pslldq_xmm(XMMReg *d, XMMReg *s) +{ + int shift, i; + + shift = s->_l[0]; + if (shift > 16) + shift = 16; + for(i = 15; i >= shift; i--) + d->_b[i] = d->_b[i - shift]; + for(i = 0; i < shift; i++) + d->_b[i] = 0; +} +# 361 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" +void helper_paddb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = ((d->_b[0]) + (s->_b[0])); d->_b[1] = ((d->_b[1]) + (s->_b[1])); d->_b[2] = ((d->_b[2]) + (s->_b[2])); d->_b[3] = ((d->_b[3]) + (s->_b[3])); d->_b[4] = ((d->_b[4]) + (s->_b[4])); d->_b[5] = ((d->_b[5]) + (s->_b[5])); d->_b[6] = ((d->_b[6]) + (s->_b[6])); d->_b[7] = ((d->_b[7]) + (s->_b[7])); d->_b[8] = ((d->_b[8]) + (s->_b[8])); d->_b[9] = ((d->_b[9]) + (s->_b[9])); d->_b[10] = ((d->_b[10]) + (s->_b[10])); d->_b[11] = ((d->_b[11]) + (s->_b[11])); d->_b[12] = ((d->_b[12]) + (s->_b[12])); d->_b[13] = ((d->_b[13]) + (s->_b[13])); d->_b[14] = ((d->_b[14]) + (s->_b[14])); d->_b[15] = ((d->_b[15]) + (s->_b[15]));} +void helper_paddw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = ((d->_w[0]) + (s->_w[0])); d->_w[1] = ((d->_w[1]) + (s->_w[1])); d->_w[2] = ((d->_w[2]) + (s->_w[2])); d->_w[3] = ((d->_w[3]) + (s->_w[3])); d->_w[4] = ((d->_w[4]) + (s->_w[4])); d->_w[5] = ((d->_w[5]) + (s->_w[5])); d->_w[6] = ((d->_w[6]) + (s->_w[6])); d->_w[7] = ((d->_w[7]) + (s->_w[7]));} +void helper_paddl_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = ((d->_l[0]) + (s->_l[0])); d->_l[1] = ((d->_l[1]) + (s->_l[1])); d->_l[2] = ((d->_l[2]) + (s->_l[2])); d->_l[3] = ((d->_l[3]) + (s->_l[3]));} +void helper_paddq_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = ((d->_q[0]) + (s->_q[0])); d->_q[1] = ((d->_q[1]) + (s->_q[1]));} + +void helper_psubb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = ((d->_b[0]) - (s->_b[0])); d->_b[1] = ((d->_b[1]) - (s->_b[1])); d->_b[2] = ((d->_b[2]) - (s->_b[2])); d->_b[3] = ((d->_b[3]) - (s->_b[3])); d->_b[4] = ((d->_b[4]) - (s->_b[4])); d->_b[5] = ((d->_b[5]) - (s->_b[5])); d->_b[6] = ((d->_b[6]) - (s->_b[6])); d->_b[7] = ((d->_b[7]) - (s->_b[7])); d->_b[8] = ((d->_b[8]) - (s->_b[8])); d->_b[9] = ((d->_b[9]) - (s->_b[9])); d->_b[10] = ((d->_b[10]) - (s->_b[10])); d->_b[11] = ((d->_b[11]) - (s->_b[11])); d->_b[12] = ((d->_b[12]) - (s->_b[12])); d->_b[13] = ((d->_b[13]) - (s->_b[13])); d->_b[14] = ((d->_b[14]) - (s->_b[14])); d->_b[15] = ((d->_b[15]) - (s->_b[15]));} +void helper_psubw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = ((d->_w[0]) - (s->_w[0])); d->_w[1] = ((d->_w[1]) - (s->_w[1])); d->_w[2] = ((d->_w[2]) - (s->_w[2])); d->_w[3] = ((d->_w[3]) - (s->_w[3])); d->_w[4] = ((d->_w[4]) - (s->_w[4])); d->_w[5] = ((d->_w[5]) - (s->_w[5])); d->_w[6] = ((d->_w[6]) - (s->_w[6])); d->_w[7] = ((d->_w[7]) - (s->_w[7]));} +void helper_psubl_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = ((d->_l[0]) - (s->_l[0])); d->_l[1] = ((d->_l[1]) - (s->_l[1])); d->_l[2] = ((d->_l[2]) - (s->_l[2])); d->_l[3] = ((d->_l[3]) - (s->_l[3]));} +void helper_psubq_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = ((d->_q[0]) - (s->_q[0])); d->_q[1] = ((d->_q[1]) - (s->_q[1]));} + +void helper_paddusb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = satub((d->_b[0]) + (s->_b[0])); d->_b[1] = satub((d->_b[1]) + (s->_b[1])); d->_b[2] = satub((d->_b[2]) + (s->_b[2])); d->_b[3] = satub((d->_b[3]) + (s->_b[3])); d->_b[4] = satub((d->_b[4]) + (s->_b[4])); d->_b[5] = satub((d->_b[5]) + (s->_b[5])); d->_b[6] = satub((d->_b[6]) + (s->_b[6])); d->_b[7] = satub((d->_b[7]) + (s->_b[7])); d->_b[8] = satub((d->_b[8]) + (s->_b[8])); d->_b[9] = satub((d->_b[9]) + (s->_b[9])); d->_b[10] = satub((d->_b[10]) + (s->_b[10])); d->_b[11] = satub((d->_b[11]) + (s->_b[11])); d->_b[12] = satub((d->_b[12]) + (s->_b[12])); d->_b[13] = satub((d->_b[13]) + (s->_b[13])); d->_b[14] = satub((d->_b[14]) + (s->_b[14])); d->_b[15] = satub((d->_b[15]) + (s->_b[15]));} +void helper_paddsb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = satsb((int8_t)(d->_b[0]) + (int8_t)(s->_b[0])); d->_b[1] = satsb((int8_t)(d->_b[1]) + (int8_t)(s->_b[1])); d->_b[2] = satsb((int8_t)(d->_b[2]) + (int8_t)(s->_b[2])); d->_b[3] = satsb((int8_t)(d->_b[3]) + (int8_t)(s->_b[3])); d->_b[4] = satsb((int8_t)(d->_b[4]) + (int8_t)(s->_b[4])); d->_b[5] = satsb((int8_t)(d->_b[5]) + (int8_t)(s->_b[5])); d->_b[6] = satsb((int8_t)(d->_b[6]) + (int8_t)(s->_b[6])); d->_b[7] = satsb((int8_t)(d->_b[7]) + (int8_t)(s->_b[7])); d->_b[8] = satsb((int8_t)(d->_b[8]) + (int8_t)(s->_b[8])); d->_b[9] = satsb((int8_t)(d->_b[9]) + (int8_t)(s->_b[9])); d->_b[10] = satsb((int8_t)(d->_b[10]) + (int8_t)(s->_b[10])); d->_b[11] = satsb((int8_t)(d->_b[11]) + (int8_t)(s->_b[11])); d->_b[12] = satsb((int8_t)(d->_b[12]) + (int8_t)(s->_b[12])); d->_b[13] = satsb((int8_t)(d->_b[13]) + (int8_t)(s->_b[13])); d->_b[14] = satsb((int8_t)(d->_b[14]) + (int8_t)(s->_b[14])); d->_b[15] = satsb((int8_t)(d->_b[15]) + (int8_t)(s->_b[15]));} +void helper_psubusb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = satub((d->_b[0]) - (s->_b[0])); d->_b[1] = satub((d->_b[1]) - (s->_b[1])); d->_b[2] = satub((d->_b[2]) - (s->_b[2])); d->_b[3] = satub((d->_b[3]) - (s->_b[3])); d->_b[4] = satub((d->_b[4]) - (s->_b[4])); d->_b[5] = satub((d->_b[5]) - (s->_b[5])); d->_b[6] = satub((d->_b[6]) - (s->_b[6])); d->_b[7] = satub((d->_b[7]) - (s->_b[7])); d->_b[8] = satub((d->_b[8]) - (s->_b[8])); d->_b[9] = satub((d->_b[9]) - (s->_b[9])); d->_b[10] = satub((d->_b[10]) - (s->_b[10])); d->_b[11] = satub((d->_b[11]) - (s->_b[11])); d->_b[12] = satub((d->_b[12]) - (s->_b[12])); d->_b[13] = satub((d->_b[13]) - (s->_b[13])); d->_b[14] = satub((d->_b[14]) - (s->_b[14])); d->_b[15] = satub((d->_b[15]) - (s->_b[15]));} +void helper_psubsb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = satsb((int8_t)(d->_b[0]) - (int8_t)(s->_b[0])); d->_b[1] = satsb((int8_t)(d->_b[1]) - (int8_t)(s->_b[1])); d->_b[2] = satsb((int8_t)(d->_b[2]) - (int8_t)(s->_b[2])); d->_b[3] = satsb((int8_t)(d->_b[3]) - (int8_t)(s->_b[3])); d->_b[4] = satsb((int8_t)(d->_b[4]) - (int8_t)(s->_b[4])); d->_b[5] = satsb((int8_t)(d->_b[5]) - (int8_t)(s->_b[5])); d->_b[6] = satsb((int8_t)(d->_b[6]) - (int8_t)(s->_b[6])); d->_b[7] = satsb((int8_t)(d->_b[7]) - (int8_t)(s->_b[7])); d->_b[8] = satsb((int8_t)(d->_b[8]) - (int8_t)(s->_b[8])); d->_b[9] = satsb((int8_t)(d->_b[9]) - (int8_t)(s->_b[9])); d->_b[10] = satsb((int8_t)(d->_b[10]) - (int8_t)(s->_b[10])); d->_b[11] = satsb((int8_t)(d->_b[11]) - (int8_t)(s->_b[11])); d->_b[12] = satsb((int8_t)(d->_b[12]) - (int8_t)(s->_b[12])); d->_b[13] = satsb((int8_t)(d->_b[13]) - (int8_t)(s->_b[13])); d->_b[14] = satsb((int8_t)(d->_b[14]) - (int8_t)(s->_b[14])); d->_b[15] = satsb((int8_t)(d->_b[15]) - (int8_t)(s->_b[15]));} + +void helper_paddusw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = satuw((d->_w[0]) + (s->_w[0])); d->_w[1] = satuw((d->_w[1]) + (s->_w[1])); d->_w[2] = satuw((d->_w[2]) + (s->_w[2])); d->_w[3] = satuw((d->_w[3]) + (s->_w[3])); d->_w[4] = satuw((d->_w[4]) + (s->_w[4])); d->_w[5] = satuw((d->_w[5]) + (s->_w[5])); d->_w[6] = satuw((d->_w[6]) + (s->_w[6])); d->_w[7] = satuw((d->_w[7]) + (s->_w[7]));} +void helper_paddsw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = satsw((int16_t)(d->_w[0]) + (int16_t)(s->_w[0])); d->_w[1] = satsw((int16_t)(d->_w[1]) + (int16_t)(s->_w[1])); d->_w[2] = satsw((int16_t)(d->_w[2]) + (int16_t)(s->_w[2])); d->_w[3] = satsw((int16_t)(d->_w[3]) + (int16_t)(s->_w[3])); d->_w[4] = satsw((int16_t)(d->_w[4]) + (int16_t)(s->_w[4])); d->_w[5] = satsw((int16_t)(d->_w[5]) + (int16_t)(s->_w[5])); d->_w[6] = satsw((int16_t)(d->_w[6]) + (int16_t)(s->_w[6])); d->_w[7] = satsw((int16_t)(d->_w[7]) + (int16_t)(s->_w[7]));} +void helper_psubusw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = satuw((d->_w[0]) - (s->_w[0])); d->_w[1] = satuw((d->_w[1]) - (s->_w[1])); d->_w[2] = satuw((d->_w[2]) - (s->_w[2])); d->_w[3] = satuw((d->_w[3]) - (s->_w[3])); d->_w[4] = satuw((d->_w[4]) - (s->_w[4])); d->_w[5] = satuw((d->_w[5]) - (s->_w[5])); d->_w[6] = satuw((d->_w[6]) - (s->_w[6])); d->_w[7] = satuw((d->_w[7]) - (s->_w[7]));} +void helper_psubsw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = satsw((int16_t)(d->_w[0]) - (int16_t)(s->_w[0])); d->_w[1] = satsw((int16_t)(d->_w[1]) - (int16_t)(s->_w[1])); d->_w[2] = satsw((int16_t)(d->_w[2]) - (int16_t)(s->_w[2])); d->_w[3] = satsw((int16_t)(d->_w[3]) - (int16_t)(s->_w[3])); d->_w[4] = satsw((int16_t)(d->_w[4]) - (int16_t)(s->_w[4])); d->_w[5] = satsw((int16_t)(d->_w[5]) - (int16_t)(s->_w[5])); d->_w[6] = satsw((int16_t)(d->_w[6]) - (int16_t)(s->_w[6])); d->_w[7] = satsw((int16_t)(d->_w[7]) - (int16_t)(s->_w[7]));} + +void helper_pminub_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = ((d->_b[0]) < (s->_b[0])) ? (d->_b[0]) : (s->_b[0]); d->_b[1] = ((d->_b[1]) < (s->_b[1])) ? (d->_b[1]) : (s->_b[1]); d->_b[2] = ((d->_b[2]) < (s->_b[2])) ? (d->_b[2]) : (s->_b[2]); d->_b[3] = ((d->_b[3]) < (s->_b[3])) ? (d->_b[3]) : (s->_b[3]); d->_b[4] = ((d->_b[4]) < (s->_b[4])) ? (d->_b[4]) : (s->_b[4]); d->_b[5] = ((d->_b[5]) < (s->_b[5])) ? (d->_b[5]) : (s->_b[5]); d->_b[6] = ((d->_b[6]) < (s->_b[6])) ? (d->_b[6]) : (s->_b[6]); d->_b[7] = ((d->_b[7]) < (s->_b[7])) ? (d->_b[7]) : (s->_b[7]); d->_b[8] = ((d->_b[8]) < (s->_b[8])) ? (d->_b[8]) : (s->_b[8]); d->_b[9] = ((d->_b[9]) < (s->_b[9])) ? (d->_b[9]) : (s->_b[9]); d->_b[10] = ((d->_b[10]) < (s->_b[10])) ? (d->_b[10]) : (s->_b[10]); d->_b[11] = ((d->_b[11]) < (s->_b[11])) ? (d->_b[11]) : (s->_b[11]); d->_b[12] = ((d->_b[12]) < (s->_b[12])) ? (d->_b[12]) : (s->_b[12]); d->_b[13] = ((d->_b[13]) < (s->_b[13])) ? (d->_b[13]) : (s->_b[13]); d->_b[14] = ((d->_b[14]) < (s->_b[14])) ? (d->_b[14]) : (s->_b[14]); d->_b[15] = ((d->_b[15]) < (s->_b[15])) ? (d->_b[15]) : (s->_b[15]);} +void helper_pmaxub_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = ((d->_b[0]) > (s->_b[0])) ? (d->_b[0]) : (s->_b[0]); d->_b[1] = ((d->_b[1]) > (s->_b[1])) ? (d->_b[1]) : (s->_b[1]); d->_b[2] = ((d->_b[2]) > (s->_b[2])) ? (d->_b[2]) : (s->_b[2]); d->_b[3] = ((d->_b[3]) > (s->_b[3])) ? (d->_b[3]) : (s->_b[3]); d->_b[4] = ((d->_b[4]) > (s->_b[4])) ? (d->_b[4]) : (s->_b[4]); d->_b[5] = ((d->_b[5]) > (s->_b[5])) ? (d->_b[5]) : (s->_b[5]); d->_b[6] = ((d->_b[6]) > (s->_b[6])) ? (d->_b[6]) : (s->_b[6]); d->_b[7] = ((d->_b[7]) > (s->_b[7])) ? (d->_b[7]) : (s->_b[7]); d->_b[8] = ((d->_b[8]) > (s->_b[8])) ? (d->_b[8]) : (s->_b[8]); d->_b[9] = ((d->_b[9]) > (s->_b[9])) ? (d->_b[9]) : (s->_b[9]); d->_b[10] = ((d->_b[10]) > (s->_b[10])) ? (d->_b[10]) : (s->_b[10]); d->_b[11] = ((d->_b[11]) > (s->_b[11])) ? (d->_b[11]) : (s->_b[11]); d->_b[12] = ((d->_b[12]) > (s->_b[12])) ? (d->_b[12]) : (s->_b[12]); d->_b[13] = ((d->_b[13]) > (s->_b[13])) ? (d->_b[13]) : (s->_b[13]); d->_b[14] = ((d->_b[14]) > (s->_b[14])) ? (d->_b[14]) : (s->_b[14]); d->_b[15] = ((d->_b[15]) > (s->_b[15])) ? (d->_b[15]) : (s->_b[15]);} + +void helper_pminsw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = ((int16_t)(d->_w[0]) < (int16_t)(s->_w[0])) ? (d->_w[0]) : (s->_w[0]); d->_w[1] = ((int16_t)(d->_w[1]) < (int16_t)(s->_w[1])) ? (d->_w[1]) : (s->_w[1]); d->_w[2] = ((int16_t)(d->_w[2]) < (int16_t)(s->_w[2])) ? (d->_w[2]) : (s->_w[2]); d->_w[3] = ((int16_t)(d->_w[3]) < (int16_t)(s->_w[3])) ? (d->_w[3]) : (s->_w[3]); d->_w[4] = ((int16_t)(d->_w[4]) < (int16_t)(s->_w[4])) ? (d->_w[4]) : (s->_w[4]); d->_w[5] = ((int16_t)(d->_w[5]) < (int16_t)(s->_w[5])) ? (d->_w[5]) : (s->_w[5]); d->_w[6] = ((int16_t)(d->_w[6]) < (int16_t)(s->_w[6])) ? (d->_w[6]) : (s->_w[6]); d->_w[7] = ((int16_t)(d->_w[7]) < (int16_t)(s->_w[7])) ? (d->_w[7]) : (s->_w[7]);} +void helper_pmaxsw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = ((int16_t)(d->_w[0]) > (int16_t)(s->_w[0])) ? (d->_w[0]) : (s->_w[0]); d->_w[1] = ((int16_t)(d->_w[1]) > (int16_t)(s->_w[1])) ? (d->_w[1]) : (s->_w[1]); d->_w[2] = ((int16_t)(d->_w[2]) > (int16_t)(s->_w[2])) ? (d->_w[2]) : (s->_w[2]); d->_w[3] = ((int16_t)(d->_w[3]) > (int16_t)(s->_w[3])) ? (d->_w[3]) : (s->_w[3]); d->_w[4] = ((int16_t)(d->_w[4]) > (int16_t)(s->_w[4])) ? (d->_w[4]) : (s->_w[4]); d->_w[5] = ((int16_t)(d->_w[5]) > (int16_t)(s->_w[5])) ? (d->_w[5]) : (s->_w[5]); d->_w[6] = ((int16_t)(d->_w[6]) > (int16_t)(s->_w[6])) ? (d->_w[6]) : (s->_w[6]); d->_w[7] = ((int16_t)(d->_w[7]) > (int16_t)(s->_w[7])) ? (d->_w[7]) : (s->_w[7]);} + +void helper_pand_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = (d->_q[0]) & (s->_q[0]); d->_q[1] = (d->_q[1]) & (s->_q[1]);} +void helper_pandn_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = ((~(d->_q[0])) & (s->_q[0])); d->_q[1] = ((~(d->_q[1])) & (s->_q[1]));} +void helper_por_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = (d->_q[0]) | (s->_q[0]); d->_q[1] = (d->_q[1]) | (s->_q[1]);} +void helper_pxor_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = (d->_q[0]) ^ (s->_q[0]); d->_q[1] = (d->_q[1]) ^ (s->_q[1]);} + +void helper_pcmpgtb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = (int8_t)(d->_b[0]) > (int8_t)(s->_b[0]) ? -1 : 0; d->_b[1] = (int8_t)(d->_b[1]) > (int8_t)(s->_b[1]) ? -1 : 0; d->_b[2] = (int8_t)(d->_b[2]) > (int8_t)(s->_b[2]) ? -1 : 0; d->_b[3] = (int8_t)(d->_b[3]) > (int8_t)(s->_b[3]) ? -1 : 0; d->_b[4] = (int8_t)(d->_b[4]) > (int8_t)(s->_b[4]) ? -1 : 0; d->_b[5] = (int8_t)(d->_b[5]) > (int8_t)(s->_b[5]) ? -1 : 0; d->_b[6] = (int8_t)(d->_b[6]) > (int8_t)(s->_b[6]) ? -1 : 0; d->_b[7] = (int8_t)(d->_b[7]) > (int8_t)(s->_b[7]) ? -1 : 0; d->_b[8] = (int8_t)(d->_b[8]) > (int8_t)(s->_b[8]) ? -1 : 0; d->_b[9] = (int8_t)(d->_b[9]) > (int8_t)(s->_b[9]) ? -1 : 0; d->_b[10] = (int8_t)(d->_b[10]) > (int8_t)(s->_b[10]) ? -1 : 0; d->_b[11] = (int8_t)(d->_b[11]) > (int8_t)(s->_b[11]) ? -1 : 0; d->_b[12] = (int8_t)(d->_b[12]) > (int8_t)(s->_b[12]) ? -1 : 0; d->_b[13] = (int8_t)(d->_b[13]) > (int8_t)(s->_b[13]) ? -1 : 0; d->_b[14] = (int8_t)(d->_b[14]) > (int8_t)(s->_b[14]) ? -1 : 0; d->_b[15] = (int8_t)(d->_b[15]) > (int8_t)(s->_b[15]) ? -1 : 0;} +void helper_pcmpgtw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = (int16_t)(d->_w[0]) > (int16_t)(s->_w[0]) ? -1 : 0; d->_w[1] = (int16_t)(d->_w[1]) > (int16_t)(s->_w[1]) ? -1 : 0; d->_w[2] = (int16_t)(d->_w[2]) > (int16_t)(s->_w[2]) ? -1 : 0; d->_w[3] = (int16_t)(d->_w[3]) > (int16_t)(s->_w[3]) ? -1 : 0; d->_w[4] = (int16_t)(d->_w[4]) > (int16_t)(s->_w[4]) ? -1 : 0; d->_w[5] = (int16_t)(d->_w[5]) > (int16_t)(s->_w[5]) ? -1 : 0; d->_w[6] = (int16_t)(d->_w[6]) > (int16_t)(s->_w[6]) ? -1 : 0; d->_w[7] = (int16_t)(d->_w[7]) > (int16_t)(s->_w[7]) ? -1 : 0;} +void helper_pcmpgtl_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = (int32_t)(d->_l[0]) > (int32_t)(s->_l[0]) ? -1 : 0; d->_l[1] = (int32_t)(d->_l[1]) > (int32_t)(s->_l[1]) ? -1 : 0; d->_l[2] = (int32_t)(d->_l[2]) > (int32_t)(s->_l[2]) ? -1 : 0; d->_l[3] = (int32_t)(d->_l[3]) > (int32_t)(s->_l[3]) ? -1 : 0;} + +void helper_pcmpeqb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = (d->_b[0]) == (s->_b[0]) ? -1 : 0; d->_b[1] = (d->_b[1]) == (s->_b[1]) ? -1 : 0; d->_b[2] = (d->_b[2]) == (s->_b[2]) ? -1 : 0; d->_b[3] = (d->_b[3]) == (s->_b[3]) ? -1 : 0; d->_b[4] = (d->_b[4]) == (s->_b[4]) ? -1 : 0; d->_b[5] = (d->_b[5]) == (s->_b[5]) ? -1 : 0; d->_b[6] = (d->_b[6]) == (s->_b[6]) ? -1 : 0; d->_b[7] = (d->_b[7]) == (s->_b[7]) ? -1 : 0; d->_b[8] = (d->_b[8]) == (s->_b[8]) ? -1 : 0; d->_b[9] = (d->_b[9]) == (s->_b[9]) ? -1 : 0; d->_b[10] = (d->_b[10]) == (s->_b[10]) ? -1 : 0; d->_b[11] = (d->_b[11]) == (s->_b[11]) ? -1 : 0; d->_b[12] = (d->_b[12]) == (s->_b[12]) ? -1 : 0; d->_b[13] = (d->_b[13]) == (s->_b[13]) ? -1 : 0; d->_b[14] = (d->_b[14]) == (s->_b[14]) ? -1 : 0; d->_b[15] = (d->_b[15]) == (s->_b[15]) ? -1 : 0;} +void helper_pcmpeqw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = (d->_w[0]) == (s->_w[0]) ? -1 : 0; d->_w[1] = (d->_w[1]) == (s->_w[1]) ? -1 : 0; d->_w[2] = (d->_w[2]) == (s->_w[2]) ? -1 : 0; d->_w[3] = (d->_w[3]) == (s->_w[3]) ? -1 : 0; d->_w[4] = (d->_w[4]) == (s->_w[4]) ? -1 : 0; d->_w[5] = (d->_w[5]) == (s->_w[5]) ? -1 : 0; d->_w[6] = (d->_w[6]) == (s->_w[6]) ? -1 : 0; d->_w[7] = (d->_w[7]) == (s->_w[7]) ? -1 : 0;} +void helper_pcmpeql_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = (d->_l[0]) == (s->_l[0]) ? -1 : 0; d->_l[1] = (d->_l[1]) == (s->_l[1]) ? -1 : 0; d->_l[2] = (d->_l[2]) == (s->_l[2]) ? -1 : 0; d->_l[3] = (d->_l[3]) == (s->_l[3]) ? -1 : 0;} + +void helper_pmullw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = (d->_w[0]) * (s->_w[0]); d->_w[1] = (d->_w[1]) * (s->_w[1]); d->_w[2] = (d->_w[2]) * (s->_w[2]); d->_w[3] = (d->_w[3]) * (s->_w[3]); d->_w[4] = (d->_w[4]) * (s->_w[4]); d->_w[5] = (d->_w[5]) * (s->_w[5]); d->_w[6] = (d->_w[6]) * (s->_w[6]); d->_w[7] = (d->_w[7]) * (s->_w[7]);} + + + +void helper_pmulhuw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = (d->_w[0]) * (s->_w[0]) >> 16; d->_w[1] = (d->_w[1]) * (s->_w[1]) >> 16; d->_w[2] = (d->_w[2]) * (s->_w[2]) >> 16; d->_w[3] = (d->_w[3]) * (s->_w[3]) >> 16; d->_w[4] = (d->_w[4]) * (s->_w[4]) >> 16; d->_w[5] = (d->_w[5]) * (s->_w[5]) >> 16; d->_w[6] = (d->_w[6]) * (s->_w[6]) >> 16; d->_w[7] = (d->_w[7]) * (s->_w[7]) >> 16;} +void helper_pmulhw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = (int16_t)(d->_w[0]) * (int16_t)(s->_w[0]) >> 16; d->_w[1] = (int16_t)(d->_w[1]) * (int16_t)(s->_w[1]) >> 16; d->_w[2] = (int16_t)(d->_w[2]) * (int16_t)(s->_w[2]) >> 16; d->_w[3] = (int16_t)(d->_w[3]) * (int16_t)(s->_w[3]) >> 16; d->_w[4] = (int16_t)(d->_w[4]) * (int16_t)(s->_w[4]) >> 16; d->_w[5] = (int16_t)(d->_w[5]) * (int16_t)(s->_w[5]) >> 16; d->_w[6] = (int16_t)(d->_w[6]) * (int16_t)(s->_w[6]) >> 16; d->_w[7] = (int16_t)(d->_w[7]) * (int16_t)(s->_w[7]) >> 16;} + +void helper_pavgb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = ((d->_b[0]) + (s->_b[0]) + 1) >> 1; d->_b[1] = ((d->_b[1]) + (s->_b[1]) + 1) >> 1; d->_b[2] = ((d->_b[2]) + (s->_b[2]) + 1) >> 1; d->_b[3] = ((d->_b[3]) + (s->_b[3]) + 1) >> 1; d->_b[4] = ((d->_b[4]) + (s->_b[4]) + 1) >> 1; d->_b[5] = ((d->_b[5]) + (s->_b[5]) + 1) >> 1; d->_b[6] = ((d->_b[6]) + (s->_b[6]) + 1) >> 1; d->_b[7] = ((d->_b[7]) + (s->_b[7]) + 1) >> 1; d->_b[8] = ((d->_b[8]) + (s->_b[8]) + 1) >> 1; d->_b[9] = ((d->_b[9]) + (s->_b[9]) + 1) >> 1; d->_b[10] = ((d->_b[10]) + (s->_b[10]) + 1) >> 1; d->_b[11] = ((d->_b[11]) + (s->_b[11]) + 1) >> 1; d->_b[12] = ((d->_b[12]) + (s->_b[12]) + 1) >> 1; d->_b[13] = ((d->_b[13]) + (s->_b[13]) + 1) >> 1; d->_b[14] = ((d->_b[14]) + (s->_b[14]) + 1) >> 1; d->_b[15] = ((d->_b[15]) + (s->_b[15]) + 1) >> 1;} +void helper_pavgw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = ((d->_w[0]) + (s->_w[0]) + 1) >> 1; d->_w[1] = ((d->_w[1]) + (s->_w[1]) + 1) >> 1; d->_w[2] = ((d->_w[2]) + (s->_w[2]) + 1) >> 1; d->_w[3] = ((d->_w[3]) + (s->_w[3]) + 1) >> 1; d->_w[4] = ((d->_w[4]) + (s->_w[4]) + 1) >> 1; d->_w[5] = ((d->_w[5]) + (s->_w[5]) + 1) >> 1; d->_w[6] = ((d->_w[6]) + (s->_w[6]) + 1) >> 1; d->_w[7] = ((d->_w[7]) + (s->_w[7]) + 1) >> 1;} + +void helper_pmuludq_xmm (XMMReg *d, XMMReg *s) +{ + d->_q[0] = (uint64_t)s->_l[0] * (uint64_t)d->_l[0]; + + d->_q[1] = (uint64_t)s->_l[2] * (uint64_t)d->_l[2]; + +} + +void helper_pmaddwd_xmm (XMMReg *d, XMMReg *s) +{ + int i; + + for(i = 0; i < (2 << 1); i++) { + d->_l[i] = (int16_t)s->_w[2*i] * (int16_t)d->_w[2*i] + + (int16_t)s->_w[2*i+1] * (int16_t)d->_w[2*i+1]; + } +} +# 437 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" +void helper_psadbw_xmm (XMMReg *d, XMMReg *s) +{ + unsigned int val; + + val = 0; + val += abs1(d->_b[0] - s->_b[0]); + val += abs1(d->_b[1] - s->_b[1]); + val += abs1(d->_b[2] - s->_b[2]); + val += abs1(d->_b[3] - s->_b[3]); + val += abs1(d->_b[4] - s->_b[4]); + val += abs1(d->_b[5] - s->_b[5]); + val += abs1(d->_b[6] - s->_b[6]); + val += abs1(d->_b[7] - s->_b[7]); + d->_q[0] = val; + + val = 0; + val += abs1(d->_b[8] - s->_b[8]); + val += abs1(d->_b[9] - s->_b[9]); + val += abs1(d->_b[10] - s->_b[10]); + val += abs1(d->_b[11] - s->_b[11]); + val += abs1(d->_b[12] - s->_b[12]); + val += abs1(d->_b[13] - s->_b[13]); + val += abs1(d->_b[14] - s->_b[14]); + val += abs1(d->_b[15] - s->_b[15]); + d->_q[1] = val; + +} + +void helper_maskmov_xmm (XMMReg *d, XMMReg *s, target_ulong a0) +{ + int i; + for(i = 0; i < (8 << 1); i++) { + if (s->_b[i] & 0x80) + stb_data(a0 + i, d->_b[i]); + } +} + +void helper_movl_mm_T0_xmm (XMMReg *d, uint32_t val) +{ + d->_l[0] = val; + d->_l[1] = 0; + + d->_q[1] = 0; + +} +# 504 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" +void helper_shufps(XMMReg *d, XMMReg *s, int order) +{ + XMMReg r; + r._l[0] = d->_l[order & 3]; + r._l[1] = d->_l[(order >> 2) & 3]; + r._l[2] = s->_l[(order >> 4) & 3]; + r._l[3] = s->_l[(order >> 6) & 3]; + *d = r; +} + +void helper_shufpd(XMMReg *d, XMMReg *s, int order) +{ + XMMReg r; + r._q[0] = d->_q[order & 1]; + r._q[1] = s->_q[(order >> 1) & 1]; + *d = r; +} + +void helper_pshufd_xmm (XMMReg *d, XMMReg *s, int order) +{ + XMMReg r; + r._l[0] = s->_l[order & 3]; + r._l[1] = s->_l[(order >> 2) & 3]; + r._l[2] = s->_l[(order >> 4) & 3]; + r._l[3] = s->_l[(order >> 6) & 3]; + *d = r; +} + +void helper_pshuflw_xmm (XMMReg *d, XMMReg *s, int order) +{ + XMMReg r; + r._w[0] = s->_w[order & 3]; + r._w[1] = s->_w[(order >> 2) & 3]; + r._w[2] = s->_w[(order >> 4) & 3]; + r._w[3] = s->_w[(order >> 6) & 3]; + r._q[1] = s->_q[1]; + *d = r; +} + +void helper_pshufhw_xmm (XMMReg *d, XMMReg *s, int order) +{ + XMMReg r; + r._q[0] = s->_q[0]; + r._w[4] = s->_w[4 + (order & 3)]; + r._w[5] = s->_w[4 + ((order >> 2) & 3)]; + r._w[6] = s->_w[4 + ((order >> 4) & 3)]; + r._w[7] = s->_w[4 + ((order >> 6) & 3)]; + *d = r; +} +# 596 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" +void helper_addps (XMMReg *d, XMMReg *s){ d->_s[0] = float32_add(d->_s[0], s->_s[0], &env->sse_status); d->_s[1] = float32_add(d->_s[1], s->_s[1], &env->sse_status); d->_s[2] = float32_add(d->_s[2], s->_s[2], &env->sse_status); d->_s[3] = float32_add(d->_s[3], s->_s[3], &env->sse_status);}void helper_addss (XMMReg *d, XMMReg *s){ d->_s[0] = float32_add(d->_s[0], s->_s[0], &env->sse_status);}void helper_addpd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_add(d->_d[0], s->_d[0], &env->sse_status); d->_d[1] = float64_add(d->_d[1], s->_d[1], &env->sse_status);}void helper_addsd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_add(d->_d[0], s->_d[0], &env->sse_status);} +void helper_subps (XMMReg *d, XMMReg *s){ d->_s[0] = float32_sub(d->_s[0], s->_s[0], &env->sse_status); d->_s[1] = float32_sub(d->_s[1], s->_s[1], &env->sse_status); d->_s[2] = float32_sub(d->_s[2], s->_s[2], &env->sse_status); d->_s[3] = float32_sub(d->_s[3], s->_s[3], &env->sse_status);}void helper_subss (XMMReg *d, XMMReg *s){ d->_s[0] = float32_sub(d->_s[0], s->_s[0], &env->sse_status);}void helper_subpd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_sub(d->_d[0], s->_d[0], &env->sse_status); d->_d[1] = float64_sub(d->_d[1], s->_d[1], &env->sse_status);}void helper_subsd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_sub(d->_d[0], s->_d[0], &env->sse_status);} +void helper_mulps (XMMReg *d, XMMReg *s){ d->_s[0] = float32_mul(d->_s[0], s->_s[0], &env->sse_status); d->_s[1] = float32_mul(d->_s[1], s->_s[1], &env->sse_status); d->_s[2] = float32_mul(d->_s[2], s->_s[2], &env->sse_status); d->_s[3] = float32_mul(d->_s[3], s->_s[3], &env->sse_status);}void helper_mulss (XMMReg *d, XMMReg *s){ d->_s[0] = float32_mul(d->_s[0], s->_s[0], &env->sse_status);}void helper_mulpd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_mul(d->_d[0], s->_d[0], &env->sse_status); d->_d[1] = float64_mul(d->_d[1], s->_d[1], &env->sse_status);}void helper_mulsd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_mul(d->_d[0], s->_d[0], &env->sse_status);} +void helper_divps (XMMReg *d, XMMReg *s){ d->_s[0] = float32_div(d->_s[0], s->_s[0], &env->sse_status); d->_s[1] = float32_div(d->_s[1], s->_s[1], &env->sse_status); d->_s[2] = float32_div(d->_s[2], s->_s[2], &env->sse_status); d->_s[3] = float32_div(d->_s[3], s->_s[3], &env->sse_status);}void helper_divss (XMMReg *d, XMMReg *s){ d->_s[0] = float32_div(d->_s[0], s->_s[0], &env->sse_status);}void helper_divpd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_div(d->_d[0], s->_d[0], &env->sse_status); d->_d[1] = float64_div(d->_d[1], s->_d[1], &env->sse_status);}void helper_divsd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_div(d->_d[0], s->_d[0], &env->sse_status);} +void helper_minps (XMMReg *d, XMMReg *s){ d->_s[0] = float32_lt(d->_s[0], s->_s[0], &env->sse_status) ? (d->_s[0]) : (s->_s[0]); d->_s[1] = float32_lt(d->_s[1], s->_s[1], &env->sse_status) ? (d->_s[1]) : (s->_s[1]); d->_s[2] = float32_lt(d->_s[2], s->_s[2], &env->sse_status) ? (d->_s[2]) : (s->_s[2]); d->_s[3] = float32_lt(d->_s[3], s->_s[3], &env->sse_status) ? (d->_s[3]) : (s->_s[3]);}void helper_minss (XMMReg *d, XMMReg *s){ d->_s[0] = float32_lt(d->_s[0], s->_s[0], &env->sse_status) ? (d->_s[0]) : (s->_s[0]);}void helper_minpd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_lt(d->_d[0], s->_d[0], &env->sse_status) ? (d->_d[0]) : (s->_d[0]); d->_d[1] = float64_lt(d->_d[1], s->_d[1], &env->sse_status) ? (d->_d[1]) : (s->_d[1]);}void helper_minsd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_lt(d->_d[0], s->_d[0], &env->sse_status) ? (d->_d[0]) : (s->_d[0]);} +void helper_maxps (XMMReg *d, XMMReg *s){ d->_s[0] = float32_lt(s->_s[0], d->_s[0], &env->sse_status) ? (d->_s[0]) : (s->_s[0]); d->_s[1] = float32_lt(s->_s[1], d->_s[1], &env->sse_status) ? (d->_s[1]) : (s->_s[1]); d->_s[2] = float32_lt(s->_s[2], d->_s[2], &env->sse_status) ? (d->_s[2]) : (s->_s[2]); d->_s[3] = float32_lt(s->_s[3], d->_s[3], &env->sse_status) ? (d->_s[3]) : (s->_s[3]);}void helper_maxss (XMMReg *d, XMMReg *s){ d->_s[0] = float32_lt(s->_s[0], d->_s[0], &env->sse_status) ? (d->_s[0]) : (s->_s[0]);}void helper_maxpd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_lt(s->_d[0], d->_d[0], &env->sse_status) ? (d->_d[0]) : (s->_d[0]); d->_d[1] = float64_lt(s->_d[1], d->_d[1], &env->sse_status) ? (d->_d[1]) : (s->_d[1]);}void helper_maxsd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_lt(s->_d[0], d->_d[0], &env->sse_status) ? (d->_d[0]) : (s->_d[0]);} +void helper_sqrtps (XMMReg *d, XMMReg *s){ d->_s[0] = float32_sqrt(s->_s[0], &env->sse_status); d->_s[1] = float32_sqrt(s->_s[1], &env->sse_status); d->_s[2] = float32_sqrt(s->_s[2], &env->sse_status); d->_s[3] = float32_sqrt(s->_s[3], &env->sse_status);}void helper_sqrtss (XMMReg *d, XMMReg *s){ d->_s[0] = float32_sqrt(s->_s[0], &env->sse_status);}void helper_sqrtpd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_sqrt(s->_d[0], &env->sse_status); d->_d[1] = float64_sqrt(s->_d[1], &env->sse_status);}void helper_sqrtsd (XMMReg *d, XMMReg *s){ d->_d[0] = float64_sqrt(s->_d[0], &env->sse_status);} + + + +void helper_cvtps2pd(XMMReg *d, XMMReg *s) +{ + float32 s0, s1; + s0 = s->_s[0]; + s1 = s->_s[1]; + d->_d[0] = float32_to_float64(s0, &env->sse_status); + d->_d[1] = float32_to_float64(s1, &env->sse_status); +} + +void helper_cvtpd2ps(XMMReg *d, XMMReg *s) +{ + d->_s[0] = float64_to_float32(s->_d[0], &env->sse_status); + d->_s[1] = float64_to_float32(s->_d[1], &env->sse_status); + d->_q[1] = 0; +} + +void helper_cvtss2sd(XMMReg *d, XMMReg *s) +{ + d->_d[0] = float32_to_float64(s->_s[0], &env->sse_status); +} + +void helper_cvtsd2ss(XMMReg *d, XMMReg *s) +{ + d->_s[0] = float64_to_float32(s->_d[0], &env->sse_status); +} + + +void helper_cvtdq2ps(XMMReg *d, XMMReg *s) +{ + d->_s[0] = int32_to_float32(s->_l[0], &env->sse_status); + d->_s[1] = int32_to_float32(s->_l[1], &env->sse_status); + d->_s[2] = int32_to_float32(s->_l[2], &env->sse_status); + d->_s[3] = int32_to_float32(s->_l[3], &env->sse_status); +} + +void helper_cvtdq2pd(XMMReg *d, XMMReg *s) +{ + int32_t l0, l1; + l0 = (int32_t)s->_l[0]; + l1 = (int32_t)s->_l[1]; + d->_d[0] = int32_to_float64(l0, &env->sse_status); + d->_d[1] = int32_to_float64(l1, &env->sse_status); +} + +void helper_cvtpi2ps(XMMReg *d, MMXReg *s) +{ + d->_s[0] = int32_to_float32(s->_l[0], &env->sse_status); + d->_s[1] = int32_to_float32(s->_l[1], &env->sse_status); +} + +void helper_cvtpi2pd(XMMReg *d, MMXReg *s) +{ + d->_d[0] = int32_to_float64(s->_l[0], &env->sse_status); + d->_d[1] = int32_to_float64(s->_l[1], &env->sse_status); +} + +void helper_cvtsi2ss(XMMReg *d, uint32_t val) +{ + d->_s[0] = int32_to_float32(val, &env->sse_status); +} + +void helper_cvtsi2sd(XMMReg *d, uint32_t val) +{ + d->_d[0] = int32_to_float64(val, &env->sse_status); +} +# 685 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" +void helper_cvtps2dq(XMMReg *d, XMMReg *s) +{ + d->_l[0] = float32_to_int32(s->_s[0], &env->sse_status); + d->_l[1] = float32_to_int32(s->_s[1], &env->sse_status); + d->_l[2] = float32_to_int32(s->_s[2], &env->sse_status); + d->_l[3] = float32_to_int32(s->_s[3], &env->sse_status); +} + +void helper_cvtpd2dq(XMMReg *d, XMMReg *s) +{ + d->_l[0] = float64_to_int32(s->_d[0], &env->sse_status); + d->_l[1] = float64_to_int32(s->_d[1], &env->sse_status); + d->_q[1] = 0; +} + +void helper_cvtps2pi(MMXReg *d, XMMReg *s) +{ + d->_l[0] = float32_to_int32(s->_s[0], &env->sse_status); + d->_l[1] = float32_to_int32(s->_s[1], &env->sse_status); +} + +void helper_cvtpd2pi(MMXReg *d, XMMReg *s) +{ + d->_l[0] = float64_to_int32(s->_d[0], &env->sse_status); + d->_l[1] = float64_to_int32(s->_d[1], &env->sse_status); +} + +int32_t helper_cvtss2si(XMMReg *s) +{ + return float32_to_int32(s->_s[0], &env->sse_status); +} + +int32_t helper_cvtsd2si(XMMReg *s) +{ + return float64_to_int32(s->_d[0], &env->sse_status); +} +# 735 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" +void helper_cvttps2dq(XMMReg *d, XMMReg *s) +{ + d->_l[0] = float32_to_int32_round_to_zero(s->_s[0], &env->sse_status); + d->_l[1] = float32_to_int32_round_to_zero(s->_s[1], &env->sse_status); + d->_l[2] = float32_to_int32_round_to_zero(s->_s[2], &env->sse_status); + d->_l[3] = float32_to_int32_round_to_zero(s->_s[3], &env->sse_status); +} + +void helper_cvttpd2dq(XMMReg *d, XMMReg *s) +{ + d->_l[0] = float64_to_int32_round_to_zero(s->_d[0], &env->sse_status); + d->_l[1] = float64_to_int32_round_to_zero(s->_d[1], &env->sse_status); + d->_q[1] = 0; +} + +void helper_cvttps2pi(MMXReg *d, XMMReg *s) +{ + d->_l[0] = float32_to_int32_round_to_zero(s->_s[0], &env->sse_status); + d->_l[1] = float32_to_int32_round_to_zero(s->_s[1], &env->sse_status); +} + +void helper_cvttpd2pi(MMXReg *d, XMMReg *s) +{ + d->_l[0] = float64_to_int32_round_to_zero(s->_d[0], &env->sse_status); + d->_l[1] = float64_to_int32_round_to_zero(s->_d[1], &env->sse_status); +} + +int32_t helper_cvttss2si(XMMReg *s) +{ + return float32_to_int32_round_to_zero(s->_s[0], &env->sse_status); +} + +int32_t helper_cvttsd2si(XMMReg *s) +{ + return float64_to_int32_round_to_zero(s->_d[0], &env->sse_status); +} +# 784 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" +void helper_rsqrtps(XMMReg *d, XMMReg *s) +{ + d->_s[0] = float32_div((0x3f800000), + float32_sqrt(s->_s[0], &env->sse_status), + &env->sse_status); + d->_s[1] = float32_div((0x3f800000), + float32_sqrt(s->_s[1], &env->sse_status), + &env->sse_status); + d->_s[2] = float32_div((0x3f800000), + float32_sqrt(s->_s[2], &env->sse_status), + &env->sse_status); + d->_s[3] = float32_div((0x3f800000), + float32_sqrt(s->_s[3], &env->sse_status), + &env->sse_status); +} + +void helper_rsqrtss(XMMReg *d, XMMReg *s) +{ + d->_s[0] = float32_div((0x3f800000), + float32_sqrt(s->_s[0], &env->sse_status), + &env->sse_status); +} + +void helper_rcpps(XMMReg *d, XMMReg *s) +{ + d->_s[0] = float32_div((0x3f800000), s->_s[0], &env->sse_status); + d->_s[1] = float32_div((0x3f800000), s->_s[1], &env->sse_status); + d->_s[2] = float32_div((0x3f800000), s->_s[2], &env->sse_status); + d->_s[3] = float32_div((0x3f800000), s->_s[3], &env->sse_status); +} + +void helper_rcpss(XMMReg *d, XMMReg *s) +{ + d->_s[0] = float32_div((0x3f800000), s->_s[0], &env->sse_status); +} + +static __attribute__ (( always_inline )) __inline__ uint64_t helper_extrq(uint64_t src, int shift, int len) +{ + uint64_t mask; + + if (len == 0) { + mask = ~0LL; + } else { + mask = (1ULL << len) - 1; + } + return (src >> shift) & mask; +} + +void helper_extrq_r(XMMReg *d, XMMReg *s) +{ + d->_q[0] = helper_extrq(d->_q[0], s->_b[1], s->_b[0]); +} + +void helper_extrq_i(XMMReg *d, int index, int length) +{ + d->_q[0] = helper_extrq(d->_q[0], index, length); +} + +static __attribute__ (( always_inline )) __inline__ uint64_t helper_insertq(uint64_t src, int shift, int len) +{ + uint64_t mask; + + if (len == 0) { + mask = ~0ULL; + } else { + mask = (1ULL << len) - 1; + } + return (src & ~(mask << shift)) | ((src & mask) << shift); +} + +void helper_insertq_r(XMMReg *d, XMMReg *s) +{ + d->_q[0] = helper_insertq(s->_q[0], s->_b[9], s->_b[8]); +} + +void helper_insertq_i(XMMReg *d, int index, int length) +{ + d->_q[0] = helper_insertq(d->_q[0], index, length); +} + +void helper_haddps(XMMReg *d, XMMReg *s) +{ + XMMReg r; + r._s[0] = float32_add(d->_s[0], d->_s[1], &env->sse_status); + r._s[1] = float32_add(d->_s[2], d->_s[3], &env->sse_status); + r._s[2] = float32_add(s->_s[0], s->_s[1], &env->sse_status); + r._s[3] = float32_add(s->_s[2], s->_s[3], &env->sse_status); + *d = r; +} + +void helper_haddpd(XMMReg *d, XMMReg *s) +{ + XMMReg r; + r._d[0] = float64_add(d->_d[0], d->_d[1], &env->sse_status); + r._d[1] = float64_add(s->_d[0], s->_d[1], &env->sse_status); + *d = r; +} + +void helper_hsubps(XMMReg *d, XMMReg *s) +{ + XMMReg r; + r._s[0] = float32_sub(d->_s[0], d->_s[1], &env->sse_status); + r._s[1] = float32_sub(d->_s[2], d->_s[3], &env->sse_status); + r._s[2] = float32_sub(s->_s[0], s->_s[1], &env->sse_status); + r._s[3] = float32_sub(s->_s[2], s->_s[3], &env->sse_status); + *d = r; +} + +void helper_hsubpd(XMMReg *d, XMMReg *s) +{ + XMMReg r; + r._d[0] = float64_sub(d->_d[0], d->_d[1], &env->sse_status); + r._d[1] = float64_sub(s->_d[0], s->_d[1], &env->sse_status); + *d = r; +} + +void helper_addsubps(XMMReg *d, XMMReg *s) +{ + d->_s[0] = float32_sub(d->_s[0], s->_s[0], &env->sse_status); + d->_s[1] = float32_add(d->_s[1], s->_s[1], &env->sse_status); + d->_s[2] = float32_sub(d->_s[2], s->_s[2], &env->sse_status); + d->_s[3] = float32_add(d->_s[3], s->_s[3], &env->sse_status); +} + +void helper_addsubpd(XMMReg *d, XMMReg *s) +{ + d->_d[0] = float64_sub(d->_d[0], s->_d[0], &env->sse_status); + d->_d[1] = float64_add(d->_d[1], s->_d[1], &env->sse_status); +} +# 948 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" +void helper_cmpeqps (XMMReg *d, XMMReg *s){ d->_l[0] = float32_eq_quiet(d->_s[0], s->_s[0], &env->sse_status) ? -1 : 0; d->_l[1] = float32_eq_quiet(d->_s[1], s->_s[1], &env->sse_status) ? -1 : 0; d->_l[2] = float32_eq_quiet(d->_s[2], s->_s[2], &env->sse_status) ? -1 : 0; d->_l[3] = float32_eq_quiet(d->_s[3], s->_s[3], &env->sse_status) ? -1 : 0;}void helper_cmpeqss (XMMReg *d, XMMReg *s){ d->_l[0] = float32_eq_quiet(d->_s[0], s->_s[0], &env->sse_status) ? -1 : 0;}void helper_cmpeqpd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_eq_quiet(d->_d[0], s->_d[0], &env->sse_status) ? -1 : 0; d->_q[1] = float64_eq_quiet(d->_d[1], s->_d[1], &env->sse_status) ? -1 : 0;}void helper_cmpeqsd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_eq_quiet(d->_d[0], s->_d[0], &env->sse_status) ? -1 : 0;} +void helper_cmpltps (XMMReg *d, XMMReg *s){ d->_l[0] = float32_lt(d->_s[0], s->_s[0], &env->sse_status) ? -1 : 0; d->_l[1] = float32_lt(d->_s[1], s->_s[1], &env->sse_status) ? -1 : 0; d->_l[2] = float32_lt(d->_s[2], s->_s[2], &env->sse_status) ? -1 : 0; d->_l[3] = float32_lt(d->_s[3], s->_s[3], &env->sse_status) ? -1 : 0;}void helper_cmpltss (XMMReg *d, XMMReg *s){ d->_l[0] = float32_lt(d->_s[0], s->_s[0], &env->sse_status) ? -1 : 0;}void helper_cmpltpd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_lt(d->_d[0], s->_d[0], &env->sse_status) ? -1 : 0; d->_q[1] = float64_lt(d->_d[1], s->_d[1], &env->sse_status) ? -1 : 0;}void helper_cmpltsd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_lt(d->_d[0], s->_d[0], &env->sse_status) ? -1 : 0;} +void helper_cmpleps (XMMReg *d, XMMReg *s){ d->_l[0] = float32_le(d->_s[0], s->_s[0], &env->sse_status) ? -1 : 0; d->_l[1] = float32_le(d->_s[1], s->_s[1], &env->sse_status) ? -1 : 0; d->_l[2] = float32_le(d->_s[2], s->_s[2], &env->sse_status) ? -1 : 0; d->_l[3] = float32_le(d->_s[3], s->_s[3], &env->sse_status) ? -1 : 0;}void helper_cmpless (XMMReg *d, XMMReg *s){ d->_l[0] = float32_le(d->_s[0], s->_s[0], &env->sse_status) ? -1 : 0;}void helper_cmplepd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_le(d->_d[0], s->_d[0], &env->sse_status) ? -1 : 0; d->_q[1] = float64_le(d->_d[1], s->_d[1], &env->sse_status) ? -1 : 0;}void helper_cmplesd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_le(d->_d[0], s->_d[0], &env->sse_status) ? -1 : 0;} +void helper_cmpunordps (XMMReg *d, XMMReg *s){ d->_l[0] = float32_unordered_quiet(d->_s[0], s->_s[0], &env->sse_status) ? - 1 : 0; d->_l[1] = float32_unordered_quiet(d->_s[1], s->_s[1], &env->sse_status) ? - 1 : 0; d->_l[2] = float32_unordered_quiet(d->_s[2], s->_s[2], &env->sse_status) ? - 1 : 0; d->_l[3] = float32_unordered_quiet(d->_s[3], s->_s[3], &env->sse_status) ? - 1 : 0;}void helper_cmpunordss (XMMReg *d, XMMReg *s){ d->_l[0] = float32_unordered_quiet(d->_s[0], s->_s[0], &env->sse_status) ? - 1 : 0;}void helper_cmpunordpd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_unordered_quiet(d->_d[0], s->_d[0], &env->sse_status) ? - 1 : 0; d->_q[1] = float64_unordered_quiet(d->_d[1], s->_d[1], &env->sse_status) ? - 1 : 0;}void helper_cmpunordsd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_unordered_quiet(d->_d[0], s->_d[0], &env->sse_status) ? - 1 : 0;} +void helper_cmpneqps (XMMReg *d, XMMReg *s){ d->_l[0] = float32_eq_quiet(d->_s[0], s->_s[0], &env->sse_status) ? 0 : -1; d->_l[1] = float32_eq_quiet(d->_s[1], s->_s[1], &env->sse_status) ? 0 : -1; d->_l[2] = float32_eq_quiet(d->_s[2], s->_s[2], &env->sse_status) ? 0 : -1; d->_l[3] = float32_eq_quiet(d->_s[3], s->_s[3], &env->sse_status) ? 0 : -1;}void helper_cmpneqss (XMMReg *d, XMMReg *s){ d->_l[0] = float32_eq_quiet(d->_s[0], s->_s[0], &env->sse_status) ? 0 : -1;}void helper_cmpneqpd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_eq_quiet(d->_d[0], s->_d[0], &env->sse_status) ? 0 : -1; d->_q[1] = float64_eq_quiet(d->_d[1], s->_d[1], &env->sse_status) ? 0 : -1;}void helper_cmpneqsd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_eq_quiet(d->_d[0], s->_d[0], &env->sse_status) ? 0 : -1;} +void helper_cmpnltps (XMMReg *d, XMMReg *s){ d->_l[0] = float32_lt(d->_s[0], s->_s[0], &env->sse_status) ? 0 : -1; d->_l[1] = float32_lt(d->_s[1], s->_s[1], &env->sse_status) ? 0 : -1; d->_l[2] = float32_lt(d->_s[2], s->_s[2], &env->sse_status) ? 0 : -1; d->_l[3] = float32_lt(d->_s[3], s->_s[3], &env->sse_status) ? 0 : -1;}void helper_cmpnltss (XMMReg *d, XMMReg *s){ d->_l[0] = float32_lt(d->_s[0], s->_s[0], &env->sse_status) ? 0 : -1;}void helper_cmpnltpd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_lt(d->_d[0], s->_d[0], &env->sse_status) ? 0 : -1; d->_q[1] = float64_lt(d->_d[1], s->_d[1], &env->sse_status) ? 0 : -1;}void helper_cmpnltsd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_lt(d->_d[0], s->_d[0], &env->sse_status) ? 0 : -1;} +void helper_cmpnleps (XMMReg *d, XMMReg *s){ d->_l[0] = float32_le(d->_s[0], s->_s[0], &env->sse_status) ? 0 : -1; d->_l[1] = float32_le(d->_s[1], s->_s[1], &env->sse_status) ? 0 : -1; d->_l[2] = float32_le(d->_s[2], s->_s[2], &env->sse_status) ? 0 : -1; d->_l[3] = float32_le(d->_s[3], s->_s[3], &env->sse_status) ? 0 : -1;}void helper_cmpnless (XMMReg *d, XMMReg *s){ d->_l[0] = float32_le(d->_s[0], s->_s[0], &env->sse_status) ? 0 : -1;}void helper_cmpnlepd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_le(d->_d[0], s->_d[0], &env->sse_status) ? 0 : -1; d->_q[1] = float64_le(d->_d[1], s->_d[1], &env->sse_status) ? 0 : -1;}void helper_cmpnlesd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_le(d->_d[0], s->_d[0], &env->sse_status) ? 0 : -1;} +void helper_cmpordps (XMMReg *d, XMMReg *s){ d->_l[0] = float32_unordered_quiet(d->_s[0], s->_s[0], &env->sse_status) ? 0 : -1; d->_l[1] = float32_unordered_quiet(d->_s[1], s->_s[1], &env->sse_status) ? 0 : -1; d->_l[2] = float32_unordered_quiet(d->_s[2], s->_s[2], &env->sse_status) ? 0 : -1; d->_l[3] = float32_unordered_quiet(d->_s[3], s->_s[3], &env->sse_status) ? 0 : -1;}void helper_cmpordss (XMMReg *d, XMMReg *s){ d->_l[0] = float32_unordered_quiet(d->_s[0], s->_s[0], &env->sse_status) ? 0 : -1;}void helper_cmpordpd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_unordered_quiet(d->_d[0], s->_d[0], &env->sse_status) ? 0 : -1; d->_q[1] = float64_unordered_quiet(d->_d[1], s->_d[1], &env->sse_status) ? 0 : -1;}void helper_cmpordsd (XMMReg *d, XMMReg *s){ d->_q[0] = float64_unordered_quiet(d->_d[0], s->_d[0], &env->sse_status) ? 0 : -1;} + +static const int comis_eflags[4] = {0x0001, 0x0040, 0, 0x0040 | 0x0004 | 0x0001}; + +void helper_ucomiss(XMMReg *d, XMMReg *s) +{ + int ret; + float32 s0, s1; + + s0 = d->_s[0]; + s1 = s->_s[0]; + ret = float32_compare_quiet(s0, s1, &env->sse_status); + (env->cc_src) = comis_eflags[ret + 1]; +} + +void helper_comiss(XMMReg *d, XMMReg *s) +{ + int ret; + float32 s0, s1; + + s0 = d->_s[0]; + s1 = s->_s[0]; + ret = float32_compare(s0, s1, &env->sse_status); + (env->cc_src) = comis_eflags[ret + 1]; +} + +void helper_ucomisd(XMMReg *d, XMMReg *s) +{ + int ret; + float64 d0, d1; + + d0 = d->_d[0]; + d1 = s->_d[0]; + ret = float64_compare_quiet(d0, d1, &env->sse_status); + (env->cc_src) = comis_eflags[ret + 1]; +} + +void helper_comisd(XMMReg *d, XMMReg *s) +{ + int ret; + float64 d0, d1; + + d0 = d->_d[0]; + d1 = s->_d[0]; + ret = float64_compare(d0, d1, &env->sse_status); + (env->cc_src) = comis_eflags[ret + 1]; +} + +uint32_t helper_movmskps(XMMReg *s) +{ + int b0, b1, b2, b3; + b0 = s->_l[0] >> 31; + b1 = s->_l[1] >> 31; + b2 = s->_l[2] >> 31; + b3 = s->_l[3] >> 31; + return b0 | (b1 << 1) | (b2 << 2) | (b3 << 3); +} + +uint32_t helper_movmskpd(XMMReg *s) +{ + int b0, b1; + b0 = s->_l[1] >> 31; + b1 = s->_l[3] >> 31; + return b0 | (b1 << 1); +} + + + +uint32_t helper_pmovmskb_xmm(XMMReg *s) +{ + uint32_t val; + val = 0; + val |= (s->_b[0] >> 7); + val |= (s->_b[1] >> 6) & 0x02; + val |= (s->_b[2] >> 5) & 0x04; + val |= (s->_b[3] >> 4) & 0x08; + val |= (s->_b[4] >> 3) & 0x10; + val |= (s->_b[5] >> 2) & 0x20; + val |= (s->_b[6] >> 1) & 0x40; + val |= (s->_b[7]) & 0x80; + + val |= (s->_b[8] << 1) & 0x0100; + val |= (s->_b[9] << 2) & 0x0200; + val |= (s->_b[10] << 3) & 0x0400; + val |= (s->_b[11] << 4) & 0x0800; + val |= (s->_b[12] << 5) & 0x1000; + val |= (s->_b[13] << 6) & 0x2000; + val |= (s->_b[14] << 7) & 0x4000; + val |= (s->_b[15] << 8) & 0x8000; + + return val; +} + +void helper_packsswb_xmm (XMMReg *d, XMMReg *s) +{ + XMMReg r; + + r._b[0] = satsb((int16_t)d->_w[0]); + r._b[1] = satsb((int16_t)d->_w[1]); + r._b[2] = satsb((int16_t)d->_w[2]); + r._b[3] = satsb((int16_t)d->_w[3]); + + r._b[4] = satsb((int16_t)d->_w[4]); + r._b[5] = satsb((int16_t)d->_w[5]); + r._b[6] = satsb((int16_t)d->_w[6]); + r._b[7] = satsb((int16_t)d->_w[7]); + + r._b[(4 << 1) + 0] = satsb((int16_t)s->_w[0]); + r._b[(4 << 1) + 1] = satsb((int16_t)s->_w[1]); + r._b[(4 << 1) + 2] = satsb((int16_t)s->_w[2]); + r._b[(4 << 1) + 3] = satsb((int16_t)s->_w[3]); + + r._b[12] = satsb((int16_t)s->_w[4]); + r._b[13] = satsb((int16_t)s->_w[5]); + r._b[14] = satsb((int16_t)s->_w[6]); + r._b[15] = satsb((int16_t)s->_w[7]); + + *d = r; +} + +void helper_packuswb_xmm (XMMReg *d, XMMReg *s) +{ + XMMReg r; + + r._b[0] = satub((int16_t)d->_w[0]); + r._b[1] = satub((int16_t)d->_w[1]); + r._b[2] = satub((int16_t)d->_w[2]); + r._b[3] = satub((int16_t)d->_w[3]); + + r._b[4] = satub((int16_t)d->_w[4]); + r._b[5] = satub((int16_t)d->_w[5]); + r._b[6] = satub((int16_t)d->_w[6]); + r._b[7] = satub((int16_t)d->_w[7]); + + r._b[(4 << 1) + 0] = satub((int16_t)s->_w[0]); + r._b[(4 << 1) + 1] = satub((int16_t)s->_w[1]); + r._b[(4 << 1) + 2] = satub((int16_t)s->_w[2]); + r._b[(4 << 1) + 3] = satub((int16_t)s->_w[3]); + + r._b[12] = satub((int16_t)s->_w[4]); + r._b[13] = satub((int16_t)s->_w[5]); + r._b[14] = satub((int16_t)s->_w[6]); + r._b[15] = satub((int16_t)s->_w[7]); + + *d = r; +} + +void helper_packssdw_xmm (XMMReg *d, XMMReg *s) +{ + XMMReg r; + + r._w[0] = satsw(d->_l[0]); + r._w[1] = satsw(d->_l[1]); + + r._w[2] = satsw(d->_l[2]); + r._w[3] = satsw(d->_l[3]); + + r._w[(2 << 1) + 0] = satsw(s->_l[0]); + r._w[(2 << 1) + 1] = satsw(s->_l[1]); + + r._w[6] = satsw(s->_l[2]); + r._w[7] = satsw(s->_l[3]); + + *d = r; +} +# 1189 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" +void helper_punpcklbw_xmm (XMMReg *d, XMMReg *s) { XMMReg r; r._b[0] = d->_b[(0 << (1 + 2)) + 0]; r._b[1] = s->_b[(0 << (1 + 2)) + 0]; r._b[2] = d->_b[(0 << (1 + 2)) + 1]; r._b[3] = s->_b[(0 << (1 + 2)) + 1]; r._b[4] = d->_b[(0 << (1 + 2)) + 2]; r._b[5] = s->_b[(0 << (1 + 2)) + 2]; r._b[6] = d->_b[(0 << (1 + 2)) + 3]; r._b[7] = s->_b[(0 << (1 + 2)) + 3]; r._b[8] = d->_b[(0 << (1 + 2)) + 4]; r._b[9] = s->_b[(0 << (1 + 2)) + 4]; r._b[10] = d->_b[(0 << (1 + 2)) + 5]; r._b[11] = s->_b[(0 << (1 + 2)) + 5]; r._b[12] = d->_b[(0 << (1 + 2)) + 6]; r._b[13] = s->_b[(0 << (1 + 2)) + 6]; r._b[14] = d->_b[(0 << (1 + 2)) + 7]; r._b[15] = s->_b[(0 << (1 + 2)) + 7]; *d = r; } void helper_punpcklwd_xmm (XMMReg *d, XMMReg *s) { XMMReg r; r._w[0] = d->_w[(0 << (1 + 1)) + 0]; r._w[1] = s->_w[(0 << (1 + 1)) + 0]; r._w[2] = d->_w[(0 << (1 + 1)) + 1]; r._w[3] = s->_w[(0 << (1 + 1)) + 1]; r._w[4] = d->_w[(0 << (1 + 1)) + 2]; r._w[5] = s->_w[(0 << (1 + 1)) + 2]; r._w[6] = d->_w[(0 << (1 + 1)) + 3]; r._w[7] = s->_w[(0 << (1 + 1)) + 3]; *d = r; } void helper_punpckldq_xmm (XMMReg *d, XMMReg *s) { XMMReg r; r._l[0] = d->_l[(0 << 1) + 0]; r._l[1] = s->_l[(0 << 1) + 0]; r._l[2] = d->_l[(0 << 1) + 1]; r._l[3] = s->_l[(0 << 1) + 1]; *d = r; } void helper_punpcklqdq_xmm (XMMReg *d, XMMReg *s) { XMMReg r; r._q[0] = d->_q[0]; r._q[1] = s->_q[0]; *d = r; } +void helper_punpckhbw_xmm (XMMReg *d, XMMReg *s) { XMMReg r; r._b[0] = d->_b[(1 << (1 + 2)) + 0]; r._b[1] = s->_b[(1 << (1 + 2)) + 0]; r._b[2] = d->_b[(1 << (1 + 2)) + 1]; r._b[3] = s->_b[(1 << (1 + 2)) + 1]; r._b[4] = d->_b[(1 << (1 + 2)) + 2]; r._b[5] = s->_b[(1 << (1 + 2)) + 2]; r._b[6] = d->_b[(1 << (1 + 2)) + 3]; r._b[7] = s->_b[(1 << (1 + 2)) + 3]; r._b[8] = d->_b[(1 << (1 + 2)) + 4]; r._b[9] = s->_b[(1 << (1 + 2)) + 4]; r._b[10] = d->_b[(1 << (1 + 2)) + 5]; r._b[11] = s->_b[(1 << (1 + 2)) + 5]; r._b[12] = d->_b[(1 << (1 + 2)) + 6]; r._b[13] = s->_b[(1 << (1 + 2)) + 6]; r._b[14] = d->_b[(1 << (1 + 2)) + 7]; r._b[15] = s->_b[(1 << (1 + 2)) + 7]; *d = r; } void helper_punpckhwd_xmm (XMMReg *d, XMMReg *s) { XMMReg r; r._w[0] = d->_w[(1 << (1 + 1)) + 0]; r._w[1] = s->_w[(1 << (1 + 1)) + 0]; r._w[2] = d->_w[(1 << (1 + 1)) + 1]; r._w[3] = s->_w[(1 << (1 + 1)) + 1]; r._w[4] = d->_w[(1 << (1 + 1)) + 2]; r._w[5] = s->_w[(1 << (1 + 1)) + 2]; r._w[6] = d->_w[(1 << (1 + 1)) + 3]; r._w[7] = s->_w[(1 << (1 + 1)) + 3]; *d = r; } void helper_punpckhdq_xmm (XMMReg *d, XMMReg *s) { XMMReg r; r._l[0] = d->_l[(1 << 1) + 0]; r._l[1] = s->_l[(1 << 1) + 0]; r._l[2] = d->_l[(1 << 1) + 1]; r._l[3] = s->_l[(1 << 1) + 1]; *d = r; } void helper_punpckhqdq_xmm (XMMReg *d, XMMReg *s) { XMMReg r; r._q[0] = d->_q[1]; r._q[1] = s->_q[1]; *d = r; } +# 1326 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" +void helper_pshufb_xmm (XMMReg *d, XMMReg *s) +{ + int i; + XMMReg r; + + for (i = 0; i < (8 << 1); i++) + r._b[i] = (s->_b[i] & 0x80) ? 0 : (d->_b[s->_b[i] & ((8 << 1) - 1)]); + + *d = r; +} + +void helper_phaddw_xmm (XMMReg *d, XMMReg *s) +{ + d->_w[0] = (int16_t)d->_w[0] + (int16_t)d->_w[1]; + d->_w[1] = (int16_t)d->_w[2] + (int16_t)d->_w[3]; + d->_w[2] = (int16_t)d->_w[4] + (int16_t)d->_w[5]; + d->_w[3] = (int16_t)d->_w[6] + (int16_t)d->_w[7]; + d->_w[(2 << 1) + 0] = (int16_t)s->_w[0] + (int16_t)s->_w[1]; + d->_w[(2 << 1) + 1] = (int16_t)s->_w[2] + (int16_t)s->_w[3]; + d->_w[6] = (int16_t)s->_w[4] + (int16_t)s->_w[5]; + d->_w[7] = (int16_t)s->_w[6] + (int16_t)s->_w[7]; +} + +void helper_phaddd_xmm (XMMReg *d, XMMReg *s) +{ + d->_l[0] = (int32_t)d->_l[0] + (int32_t)d->_l[1]; + d->_l[1] = (int32_t)d->_l[2] + (int32_t)d->_l[3]; + d->_l[(1 << 1) + 0] = (int32_t)s->_l[0] + (int32_t)s->_l[1]; + d->_l[3] = (int32_t)s->_l[2] + (int32_t)s->_l[3]; +} + +void helper_phaddsw_xmm (XMMReg *d, XMMReg *s) +{ + d->_w[0] = satsw((int16_t)d->_w[0] + (int16_t)d->_w[1]); + d->_w[1] = satsw((int16_t)d->_w[2] + (int16_t)d->_w[3]); + d->_w[2] = satsw((int16_t)d->_w[4] + (int16_t)d->_w[5]); + d->_w[3] = satsw((int16_t)d->_w[6] + (int16_t)d->_w[7]); + d->_w[(2 << 1) + 0] = satsw((int16_t)s->_w[0] + (int16_t)s->_w[1]); + d->_w[(2 << 1) + 1] = satsw((int16_t)s->_w[2] + (int16_t)s->_w[3]); + d->_w[6] = satsw((int16_t)s->_w[4] + (int16_t)s->_w[5]); + d->_w[7] = satsw((int16_t)s->_w[6] + (int16_t)s->_w[7]); +} + +void helper_pmaddubsw_xmm (XMMReg *d, XMMReg *s) +{ + d->_w[0] = satsw((int8_t)s->_b[0] * (uint8_t)d->_b[0] + + (int8_t)s->_b[1] * (uint8_t)d->_b[1]); + d->_w[1] = satsw((int8_t)s->_b[2] * (uint8_t)d->_b[2] + + (int8_t)s->_b[3] * (uint8_t)d->_b[3]); + d->_w[2] = satsw((int8_t)s->_b[4] * (uint8_t)d->_b[4] + + (int8_t)s->_b[5] * (uint8_t)d->_b[5]); + d->_w[3] = satsw((int8_t)s->_b[6] * (uint8_t)d->_b[6] + + (int8_t)s->_b[7] * (uint8_t)d->_b[7]); + + d->_w[4] = satsw((int8_t)s->_b[8] * (uint8_t)d->_b[8] + + (int8_t)s->_b[9] * (uint8_t)d->_b[9]); + d->_w[5] = satsw((int8_t)s->_b[10] * (uint8_t)d->_b[10] + + (int8_t)s->_b[11] * (uint8_t)d->_b[11]); + d->_w[6] = satsw((int8_t)s->_b[12] * (uint8_t)d->_b[12] + + (int8_t)s->_b[13] * (uint8_t)d->_b[13]); + d->_w[7] = satsw((int8_t)s->_b[14] * (uint8_t)d->_b[14] + + (int8_t)s->_b[15] * (uint8_t)d->_b[15]); + +} + +void helper_phsubw_xmm (XMMReg *d, XMMReg *s) +{ + d->_w[0] = (int16_t)d->_w[0] - (int16_t)d->_w[1]; + d->_w[1] = (int16_t)d->_w[2] - (int16_t)d->_w[3]; + d->_w[2] = (int16_t)d->_w[4] - (int16_t)d->_w[5]; + d->_w[3] = (int16_t)d->_w[6] - (int16_t)d->_w[7]; + d->_w[(2 << 1) + 0] = (int16_t)s->_w[0] - (int16_t)s->_w[1]; + d->_w[(2 << 1) + 1] = (int16_t)s->_w[2] - (int16_t)s->_w[3]; + d->_w[6] = (int16_t)s->_w[4] - (int16_t)s->_w[5]; + d->_w[7] = (int16_t)s->_w[6] - (int16_t)s->_w[7]; +} + +void helper_phsubd_xmm (XMMReg *d, XMMReg *s) +{ + d->_l[0] = (int32_t)d->_l[0] - (int32_t)d->_l[1]; + d->_l[1] = (int32_t)d->_l[2] - (int32_t)d->_l[3]; + d->_l[(1 << 1) + 0] = (int32_t)s->_l[0] - (int32_t)s->_l[1]; + d->_l[3] = (int32_t)s->_l[2] - (int32_t)s->_l[3]; +} + +void helper_phsubsw_xmm (XMMReg *d, XMMReg *s) +{ + d->_w[0] = satsw((int16_t)d->_w[0] - (int16_t)d->_w[1]); + d->_w[1] = satsw((int16_t)d->_w[2] - (int16_t)d->_w[3]); + d->_w[2] = satsw((int16_t)d->_w[4] - (int16_t)d->_w[5]); + d->_w[3] = satsw((int16_t)d->_w[6] - (int16_t)d->_w[7]); + d->_w[(2 << 1) + 0] = satsw((int16_t)s->_w[0] - (int16_t)s->_w[1]); + d->_w[(2 << 1) + 1] = satsw((int16_t)s->_w[2] - (int16_t)s->_w[3]); + d->_w[6] = satsw((int16_t)s->_w[4] - (int16_t)s->_w[5]); + d->_w[7] = satsw((int16_t)s->_w[6] - (int16_t)s->_w[7]); +} + + + + +void helper_pabsb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = s->_b[0] > (127) ? -(int8_t ) s->_b[0] : s->_b[0]; d->_b[1] = s->_b[1] > (127) ? -(int8_t ) s->_b[1] : s->_b[1]; d->_b[2] = s->_b[2] > (127) ? -(int8_t ) s->_b[2] : s->_b[2]; d->_b[3] = s->_b[3] > (127) ? -(int8_t ) s->_b[3] : s->_b[3]; d->_b[4] = s->_b[4] > (127) ? -(int8_t ) s->_b[4] : s->_b[4]; d->_b[5] = s->_b[5] > (127) ? -(int8_t ) s->_b[5] : s->_b[5]; d->_b[6] = s->_b[6] > (127) ? -(int8_t ) s->_b[6] : s->_b[6]; d->_b[7] = s->_b[7] > (127) ? -(int8_t ) s->_b[7] : s->_b[7]; d->_b[8] = s->_b[8] > (127) ? -(int8_t ) s->_b[8] : s->_b[8]; d->_b[9] = s->_b[9] > (127) ? -(int8_t ) s->_b[9] : s->_b[9]; d->_b[10] = s->_b[10] > (127) ? -(int8_t ) s->_b[10] : s->_b[10]; d->_b[11] = s->_b[11] > (127) ? -(int8_t ) s->_b[11] : s->_b[11]; d->_b[12] = s->_b[12] > (127) ? -(int8_t ) s->_b[12] : s->_b[12]; d->_b[13] = s->_b[13] > (127) ? -(int8_t ) s->_b[13] : s->_b[13]; d->_b[14] = s->_b[14] > (127) ? -(int8_t ) s->_b[14] : s->_b[14]; d->_b[15] = s->_b[15] > (127) ? -(int8_t ) s->_b[15] : s->_b[15];} +void helper_pabsw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = s->_w[0] > (32767) ? -(int16_t) s->_w[0] : s->_w[0]; d->_w[1] = s->_w[1] > (32767) ? -(int16_t) s->_w[1] : s->_w[1]; d->_w[2] = s->_w[2] > (32767) ? -(int16_t) s->_w[2] : s->_w[2]; d->_w[3] = s->_w[3] > (32767) ? -(int16_t) s->_w[3] : s->_w[3]; d->_w[4] = s->_w[4] > (32767) ? -(int16_t) s->_w[4] : s->_w[4]; d->_w[5] = s->_w[5] > (32767) ? -(int16_t) s->_w[5] : s->_w[5]; d->_w[6] = s->_w[6] > (32767) ? -(int16_t) s->_w[6] : s->_w[6]; d->_w[7] = s->_w[7] > (32767) ? -(int16_t) s->_w[7] : s->_w[7];} +void helper_pabsd_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = s->_l[0] > (2147483647) ? -(int32_t) s->_l[0] : s->_l[0]; d->_l[1] = s->_l[1] > (2147483647) ? -(int32_t) s->_l[1] : s->_l[1]; d->_l[2] = s->_l[2] > (2147483647) ? -(int32_t) s->_l[2] : s->_l[2]; d->_l[3] = s->_l[3] > (2147483647) ? -(int32_t) s->_l[3] : s->_l[3];} + + +void helper_pmulhrsw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = ((int16_t) d->_w[0] * (int16_t) s->_w[0] + 0x4000) >> 15; d->_w[1] = ((int16_t) d->_w[1] * (int16_t) s->_w[1] + 0x4000) >> 15; d->_w[2] = ((int16_t) d->_w[2] * (int16_t) s->_w[2] + 0x4000) >> 15; d->_w[3] = ((int16_t) d->_w[3] * (int16_t) s->_w[3] + 0x4000) >> 15; d->_w[4] = ((int16_t) d->_w[4] * (int16_t) s->_w[4] + 0x4000) >> 15; d->_w[5] = ((int16_t) d->_w[5] * (int16_t) s->_w[5] + 0x4000) >> 15; d->_w[6] = ((int16_t) d->_w[6] * (int16_t) s->_w[6] + 0x4000) >> 15; d->_w[7] = ((int16_t) d->_w[7] * (int16_t) s->_w[7] + 0x4000) >> 15;} + + + + +void helper_psignb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = s->_b[0] <= (127) ? s->_b[0] ? d->_b[0] : 0 : -(int8_t ) d->_b[0]; d->_b[1] = s->_b[1] <= (127) ? s->_b[1] ? d->_b[1] : 0 : -(int8_t ) d->_b[1]; d->_b[2] = s->_b[2] <= (127) ? s->_b[2] ? d->_b[2] : 0 : -(int8_t ) d->_b[2]; d->_b[3] = s->_b[3] <= (127) ? s->_b[3] ? d->_b[3] : 0 : -(int8_t ) d->_b[3]; d->_b[4] = s->_b[4] <= (127) ? s->_b[4] ? d->_b[4] : 0 : -(int8_t ) d->_b[4]; d->_b[5] = s->_b[5] <= (127) ? s->_b[5] ? d->_b[5] : 0 : -(int8_t ) d->_b[5]; d->_b[6] = s->_b[6] <= (127) ? s->_b[6] ? d->_b[6] : 0 : -(int8_t ) d->_b[6]; d->_b[7] = s->_b[7] <= (127) ? s->_b[7] ? d->_b[7] : 0 : -(int8_t ) d->_b[7]; d->_b[8] = s->_b[8] <= (127) ? s->_b[8] ? d->_b[8] : 0 : -(int8_t ) d->_b[8]; d->_b[9] = s->_b[9] <= (127) ? s->_b[9] ? d->_b[9] : 0 : -(int8_t ) d->_b[9]; d->_b[10] = s->_b[10] <= (127) ? s->_b[10] ? d->_b[10] : 0 : -(int8_t ) d->_b[10]; d->_b[11] = s->_b[11] <= (127) ? s->_b[11] ? d->_b[11] : 0 : -(int8_t ) d->_b[11]; d->_b[12] = s->_b[12] <= (127) ? s->_b[12] ? d->_b[12] : 0 : -(int8_t ) d->_b[12]; d->_b[13] = s->_b[13] <= (127) ? s->_b[13] ? d->_b[13] : 0 : -(int8_t ) d->_b[13]; d->_b[14] = s->_b[14] <= (127) ? s->_b[14] ? d->_b[14] : 0 : -(int8_t ) d->_b[14]; d->_b[15] = s->_b[15] <= (127) ? s->_b[15] ? d->_b[15] : 0 : -(int8_t ) d->_b[15];} +void helper_psignw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = s->_w[0] <= (32767) ? s->_w[0] ? d->_w[0] : 0 : -(int16_t) d->_w[0]; d->_w[1] = s->_w[1] <= (32767) ? s->_w[1] ? d->_w[1] : 0 : -(int16_t) d->_w[1]; d->_w[2] = s->_w[2] <= (32767) ? s->_w[2] ? d->_w[2] : 0 : -(int16_t) d->_w[2]; d->_w[3] = s->_w[3] <= (32767) ? s->_w[3] ? d->_w[3] : 0 : -(int16_t) d->_w[3]; d->_w[4] = s->_w[4] <= (32767) ? s->_w[4] ? d->_w[4] : 0 : -(int16_t) d->_w[4]; d->_w[5] = s->_w[5] <= (32767) ? s->_w[5] ? d->_w[5] : 0 : -(int16_t) d->_w[5]; d->_w[6] = s->_w[6] <= (32767) ? s->_w[6] ? d->_w[6] : 0 : -(int16_t) d->_w[6]; d->_w[7] = s->_w[7] <= (32767) ? s->_w[7] ? d->_w[7] : 0 : -(int16_t) d->_w[7];} +void helper_psignd_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = s->_l[0] <= (2147483647) ? s->_l[0] ? d->_l[0] : 0 : -(int32_t) d->_l[0]; d->_l[1] = s->_l[1] <= (2147483647) ? s->_l[1] ? d->_l[1] : 0 : -(int32_t) d->_l[1]; d->_l[2] = s->_l[2] <= (2147483647) ? s->_l[2] ? d->_l[2] : 0 : -(int32_t) d->_l[2]; d->_l[3] = s->_l[3] <= (2147483647) ? s->_l[3] ? d->_l[3] : 0 : -(int32_t) d->_l[3];} + +void helper_palignr_xmm (XMMReg *d, XMMReg *s, int32_t shift) +{ + XMMReg r; + + + if (shift >= (16 << 1)) { + r._q[0] = 0; + r._q[1] = 0; + } else { + shift <<= 3; + + + + + + r._q[0] = (shift - 0 < 64 && shift - 0 > -64 ? shift - 0 > 0 ? s->_q[0] >> (shift - 0) : (s->_q[0] << -(shift - 0)) : 0) | + (shift - 64 < 64 && shift - 64 > -64 ? shift - 64 > 0 ? s->_q[1] >> (shift - 64) : (s->_q[1] << -(shift - 64)) : 0) | + (shift - 128 < 64 && shift - 128 > -64 ? shift - 128 > 0 ? d->_q[0] >> (shift - 128) : (d->_q[0] << -(shift - 128)) : 0) | + (shift - 192 < 64 && shift - 192 > -64 ? shift - 192 > 0 ? d->_q[1] >> (shift - 192) : (d->_q[1] << -(shift - 192)) : 0); + r._q[1] = (shift + 64 < 64 && shift + 64 > -64 ? shift + 64 > 0 ? s->_q[0] >> (shift + 64) : (s->_q[0] << -(shift + 64)) : 0) | + (shift - 0 < 64 && shift - 0 > -64 ? shift - 0 > 0 ? s->_q[1] >> (shift - 0) : (s->_q[1] << -(shift - 0)) : 0) | + (shift - 64 < 64 && shift - 64 > -64 ? shift - 64 > 0 ? d->_q[0] >> (shift - 64) : (d->_q[0] << -(shift - 64)) : 0) | + (shift - 128 < 64 && shift - 128 > -64 ? shift - 128 > 0 ? d->_q[1] >> (shift - 128) : (d->_q[1] << -(shift - 128)) : 0); + + + } + + *d = r; +} +# 1531 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" +void helper_pblendvb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = (env->xmm_regs[0]._b[0] & 0x80) ? s->_b[0] : d->_b[0]; d->_b[1] = (env->xmm_regs[0]._b[1] & 0x80) ? s->_b[1] : d->_b[1]; if (16 > 2) { d->_b[2] = (env->xmm_regs[0]._b[2] & 0x80) ? s->_b[2] : d->_b[2]; d->_b[3] = (env->xmm_regs[0]._b[3] & 0x80) ? s->_b[3] : d->_b[3]; if (16 > 4) { d->_b[4] = (env->xmm_regs[0]._b[4] & 0x80) ? s->_b[4] : d->_b[4]; d->_b[5] = (env->xmm_regs[0]._b[5] & 0x80) ? s->_b[5] : d->_b[5]; d->_b[6] = (env->xmm_regs[0]._b[6] & 0x80) ? s->_b[6] : d->_b[6]; d->_b[7] = (env->xmm_regs[0]._b[7] & 0x80) ? s->_b[7] : d->_b[7]; if (16 > 8) { d->_b[8] = (env->xmm_regs[0]._b[8] & 0x80) ? s->_b[8] : d->_b[8]; d->_b[9] = (env->xmm_regs[0]._b[9] & 0x80) ? s->_b[9] : d->_b[9]; d->_b[10] = (env->xmm_regs[0]._b[10] & 0x80) ? s->_b[10] : d->_b[10]; d->_b[11] = (env->xmm_regs[0]._b[11] & 0x80) ? s->_b[11] : d->_b[11]; d->_b[12] = (env->xmm_regs[0]._b[12] & 0x80) ? s->_b[12] : d->_b[12]; d->_b[13] = (env->xmm_regs[0]._b[13] & 0x80) ? s->_b[13] : d->_b[13]; d->_b[14] = (env->xmm_regs[0]._b[14] & 0x80) ? s->_b[14] : d->_b[14]; d->_b[15] = (env->xmm_regs[0]._b[15] & 0x80) ? s->_b[15] : d->_b[15]; } } }} +void helper_blendvps_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = (env->xmm_regs[0]._l[0] & 0x80000000) ? s->_l[0] : d->_l[0]; d->_l[1] = (env->xmm_regs[0]._l[1] & 0x80000000) ? s->_l[1] : d->_l[1]; if (4 > 2) { d->_l[2] = (env->xmm_regs[0]._l[2] & 0x80000000) ? s->_l[2] : d->_l[2]; d->_l[3] = (env->xmm_regs[0]._l[3] & 0x80000000) ? s->_l[3] : d->_l[3]; if (4 > 4) { d->_l[4] = (env->xmm_regs[0]._l[4] & 0x80000000) ? s->_l[4] : d->_l[4]; d->_l[5] = (env->xmm_regs[0]._l[5] & 0x80000000) ? s->_l[5] : d->_l[5]; d->_l[6] = (env->xmm_regs[0]._l[6] & 0x80000000) ? s->_l[6] : d->_l[6]; d->_l[7] = (env->xmm_regs[0]._l[7] & 0x80000000) ? s->_l[7] : d->_l[7]; if (4 > 8) { d->_l[8] = (env->xmm_regs[0]._l[8] & 0x80000000) ? s->_l[8] : d->_l[8]; d->_l[9] = (env->xmm_regs[0]._l[9] & 0x80000000) ? s->_l[9] : d->_l[9]; d->_l[10] = (env->xmm_regs[0]._l[10] & 0x80000000) ? s->_l[10] : d->_l[10]; d->_l[11] = (env->xmm_regs[0]._l[11] & 0x80000000) ? s->_l[11] : d->_l[11]; d->_l[12] = (env->xmm_regs[0]._l[12] & 0x80000000) ? s->_l[12] : d->_l[12]; d->_l[13] = (env->xmm_regs[0]._l[13] & 0x80000000) ? s->_l[13] : d->_l[13]; d->_l[14] = (env->xmm_regs[0]._l[14] & 0x80000000) ? s->_l[14] : d->_l[14]; d->_l[15] = (env->xmm_regs[0]._l[15] & 0x80000000) ? s->_l[15] : d->_l[15]; } } }} +void helper_blendvpd_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = (env->xmm_regs[0]._q[0] & 0x8000000000000000LL) ? s->_q[0] : d->_q[0]; d->_q[1] = (env->xmm_regs[0]._q[1] & 0x8000000000000000LL) ? s->_q[1] : d->_q[1]; if (2 > 2) { d->_q[2] = (env->xmm_regs[0]._q[2] & 0x8000000000000000LL) ? s->_q[2] : d->_q[2]; d->_q[3] = (env->xmm_regs[0]._q[3] & 0x8000000000000000LL) ? s->_q[3] : d->_q[3]; if (2 > 4) { d->_q[4] = (env->xmm_regs[0]._q[4] & 0x8000000000000000LL) ? s->_q[4] : d->_q[4]; d->_q[5] = (env->xmm_regs[0]._q[5] & 0x8000000000000000LL) ? s->_q[5] : d->_q[5]; d->_q[6] = (env->xmm_regs[0]._q[6] & 0x8000000000000000LL) ? s->_q[6] : d->_q[6]; d->_q[7] = (env->xmm_regs[0]._q[7] & 0x8000000000000000LL) ? s->_q[7] : d->_q[7]; if (2 > 8) { d->_q[8] = (env->xmm_regs[0]._q[8] & 0x8000000000000000LL) ? s->_q[8] : d->_q[8]; d->_q[9] = (env->xmm_regs[0]._q[9] & 0x8000000000000000LL) ? s->_q[9] : d->_q[9]; d->_q[10] = (env->xmm_regs[0]._q[10] & 0x8000000000000000LL) ? s->_q[10] : d->_q[10]; d->_q[11] = (env->xmm_regs[0]._q[11] & 0x8000000000000000LL) ? s->_q[11] : d->_q[11]; d->_q[12] = (env->xmm_regs[0]._q[12] & 0x8000000000000000LL) ? s->_q[12] : d->_q[12]; d->_q[13] = (env->xmm_regs[0]._q[13] & 0x8000000000000000LL) ? s->_q[13] : d->_q[13]; d->_q[14] = (env->xmm_regs[0]._q[14] & 0x8000000000000000LL) ? s->_q[14] : d->_q[14]; d->_q[15] = (env->xmm_regs[0]._q[15] & 0x8000000000000000LL) ? s->_q[15] : d->_q[15]; } } }} + +void helper_ptest_xmm (XMMReg *d, XMMReg *s) +{ + uint64_t zf = (s->_q[0] & d->_q[0]) | (s->_q[1] & d->_q[1]); + uint64_t cf = (s->_q[0] & ~d->_q[0]) | (s->_q[1] & ~d->_q[1]); + + (env->cc_src) = (zf ? 0 : 0x0040) | (cf ? 0 : 0x0001); +} +# 1560 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" +void helper_pmovsxbw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = (int8_t) s->_b[0]; d->_w[1] = (int8_t) s->_b[1]; if (8 > 2) { d->_w[2] = (int8_t) s->_b[2]; d->_w[3] = (int8_t) s->_b[3]; if (8 > 4) { d->_w[4] = (int8_t) s->_b[4]; d->_w[5] = (int8_t) s->_b[5]; d->_w[6] = (int8_t) s->_b[6]; d->_w[7] = (int8_t) s->_b[7]; } }} +void helper_pmovsxbd_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = (int8_t) s->_b[0]; d->_l[1] = (int8_t) s->_b[1]; if (4 > 2) { d->_l[2] = (int8_t) s->_b[2]; d->_l[3] = (int8_t) s->_b[3]; if (4 > 4) { d->_l[4] = (int8_t) s->_b[4]; d->_l[5] = (int8_t) s->_b[5]; d->_l[6] = (int8_t) s->_b[6]; d->_l[7] = (int8_t) s->_b[7]; } }} +void helper_pmovsxbq_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = (int8_t) s->_b[0]; d->_q[1] = (int8_t) s->_b[1]; if (2 > 2) { d->_q[2] = (int8_t) s->_b[2]; d->_q[3] = (int8_t) s->_b[3]; if (2 > 4) { d->_q[4] = (int8_t) s->_b[4]; d->_q[5] = (int8_t) s->_b[5]; d->_q[6] = (int8_t) s->_b[6]; d->_q[7] = (int8_t) s->_b[7]; } }} +void helper_pmovsxwd_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = (int16_t) s->_w[0]; d->_l[1] = (int16_t) s->_w[1]; if (4 > 2) { d->_l[2] = (int16_t) s->_w[2]; d->_l[3] = (int16_t) s->_w[3]; if (4 > 4) { d->_l[4] = (int16_t) s->_w[4]; d->_l[5] = (int16_t) s->_w[5]; d->_l[6] = (int16_t) s->_w[6]; d->_l[7] = (int16_t) s->_w[7]; } }} +void helper_pmovsxwq_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = (int16_t) s->_w[0]; d->_q[1] = (int16_t) s->_w[1]; if (2 > 2) { d->_q[2] = (int16_t) s->_w[2]; d->_q[3] = (int16_t) s->_w[3]; if (2 > 4) { d->_q[4] = (int16_t) s->_w[4]; d->_q[5] = (int16_t) s->_w[5]; d->_q[6] = (int16_t) s->_w[6]; d->_q[7] = (int16_t) s->_w[7]; } }} +void helper_pmovsxdq_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = (int32_t) s->_l[0]; d->_q[1] = (int32_t) s->_l[1]; if (2 > 2) { d->_q[2] = (int32_t) s->_l[2]; d->_q[3] = (int32_t) s->_l[3]; if (2 > 4) { d->_q[4] = (int32_t) s->_l[4]; d->_q[5] = (int32_t) s->_l[5]; d->_q[6] = (int32_t) s->_l[6]; d->_q[7] = (int32_t) s->_l[7]; } }} +void helper_pmovzxbw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = s->_b[0]; d->_w[1] = s->_b[1]; if (8 > 2) { d->_w[2] = s->_b[2]; d->_w[3] = s->_b[3]; if (8 > 4) { d->_w[4] = s->_b[4]; d->_w[5] = s->_b[5]; d->_w[6] = s->_b[6]; d->_w[7] = s->_b[7]; } }} +void helper_pmovzxbd_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = s->_b[0]; d->_l[1] = s->_b[1]; if (4 > 2) { d->_l[2] = s->_b[2]; d->_l[3] = s->_b[3]; if (4 > 4) { d->_l[4] = s->_b[4]; d->_l[5] = s->_b[5]; d->_l[6] = s->_b[6]; d->_l[7] = s->_b[7]; } }} +void helper_pmovzxbq_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = s->_b[0]; d->_q[1] = s->_b[1]; if (2 > 2) { d->_q[2] = s->_b[2]; d->_q[3] = s->_b[3]; if (2 > 4) { d->_q[4] = s->_b[4]; d->_q[5] = s->_b[5]; d->_q[6] = s->_b[6]; d->_q[7] = s->_b[7]; } }} +void helper_pmovzxwd_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = s->_w[0]; d->_l[1] = s->_w[1]; if (4 > 2) { d->_l[2] = s->_w[2]; d->_l[3] = s->_w[3]; if (4 > 4) { d->_l[4] = s->_w[4]; d->_l[5] = s->_w[5]; d->_l[6] = s->_w[6]; d->_l[7] = s->_w[7]; } }} +void helper_pmovzxwq_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = s->_w[0]; d->_q[1] = s->_w[1]; if (2 > 2) { d->_q[2] = s->_w[2]; d->_q[3] = s->_w[3]; if (2 > 4) { d->_q[4] = s->_w[4]; d->_q[5] = s->_w[5]; d->_q[6] = s->_w[6]; d->_q[7] = s->_w[7]; } }} +void helper_pmovzxdq_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = s->_l[0]; d->_q[1] = s->_l[1]; if (2 > 2) { d->_q[2] = s->_l[2]; d->_q[3] = s->_l[3]; if (2 > 4) { d->_q[4] = s->_l[4]; d->_q[5] = s->_l[5]; d->_q[6] = s->_l[6]; d->_q[7] = s->_l[7]; } }} + +void helper_pmuldq_xmm (XMMReg *d, XMMReg *s) +{ + d->_q[0] = (int64_t) (int32_t) d->_l[0] * (int32_t) s->_l[0]; + d->_q[1] = (int64_t) (int32_t) d->_l[2] * (int32_t) s->_l[2]; +} + + +void helper_pcmpeqq_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = d->_q[0] == s->_q[0] ? -1 : 0; d->_q[1] = d->_q[1] == s->_q[1] ? -1 : 0;} + +void helper_packusdw_xmm (XMMReg *d, XMMReg *s) +{ + d->_w[0] = satuw((int32_t) d->_l[0]); + d->_w[1] = satuw((int32_t) d->_l[1]); + d->_w[2] = satuw((int32_t) d->_l[2]); + d->_w[3] = satuw((int32_t) d->_l[3]); + d->_w[4] = satuw((int32_t) s->_l[0]); + d->_w[5] = satuw((int32_t) s->_l[1]); + d->_w[6] = satuw((int32_t) s->_l[2]); + d->_w[7] = satuw((int32_t) s->_l[3]); +} + + + + + +void helper_pminsb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = ((((int8_t) d->_b[0]) < ((int8_t) s->_b[0])) ? ((int8_t) d->_b[0]) : ((int8_t) s->_b[0])); d->_b[1] = ((((int8_t) d->_b[1]) < ((int8_t) s->_b[1])) ? ((int8_t) d->_b[1]) : ((int8_t) s->_b[1])); d->_b[2] = ((((int8_t) d->_b[2]) < ((int8_t) s->_b[2])) ? ((int8_t) d->_b[2]) : ((int8_t) s->_b[2])); d->_b[3] = ((((int8_t) d->_b[3]) < ((int8_t) s->_b[3])) ? ((int8_t) d->_b[3]) : ((int8_t) s->_b[3])); d->_b[4] = ((((int8_t) d->_b[4]) < ((int8_t) s->_b[4])) ? ((int8_t) d->_b[4]) : ((int8_t) s->_b[4])); d->_b[5] = ((((int8_t) d->_b[5]) < ((int8_t) s->_b[5])) ? ((int8_t) d->_b[5]) : ((int8_t) s->_b[5])); d->_b[6] = ((((int8_t) d->_b[6]) < ((int8_t) s->_b[6])) ? ((int8_t) d->_b[6]) : ((int8_t) s->_b[6])); d->_b[7] = ((((int8_t) d->_b[7]) < ((int8_t) s->_b[7])) ? ((int8_t) d->_b[7]) : ((int8_t) s->_b[7])); d->_b[8] = ((((int8_t) d->_b[8]) < ((int8_t) s->_b[8])) ? ((int8_t) d->_b[8]) : ((int8_t) s->_b[8])); d->_b[9] = ((((int8_t) d->_b[9]) < ((int8_t) s->_b[9])) ? ((int8_t) d->_b[9]) : ((int8_t) s->_b[9])); d->_b[10] = ((((int8_t) d->_b[10]) < ((int8_t) s->_b[10])) ? ((int8_t) d->_b[10]) : ((int8_t) s->_b[10])); d->_b[11] = ((((int8_t) d->_b[11]) < ((int8_t) s->_b[11])) ? ((int8_t) d->_b[11]) : ((int8_t) s->_b[11])); d->_b[12] = ((((int8_t) d->_b[12]) < ((int8_t) s->_b[12])) ? ((int8_t) d->_b[12]) : ((int8_t) s->_b[12])); d->_b[13] = ((((int8_t) d->_b[13]) < ((int8_t) s->_b[13])) ? ((int8_t) d->_b[13]) : ((int8_t) s->_b[13])); d->_b[14] = ((((int8_t) d->_b[14]) < ((int8_t) s->_b[14])) ? ((int8_t) d->_b[14]) : ((int8_t) s->_b[14])); d->_b[15] = ((((int8_t) d->_b[15]) < ((int8_t) s->_b[15])) ? ((int8_t) d->_b[15]) : ((int8_t) s->_b[15]));} +void helper_pminsd_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = ((((int32_t) d->_l[0]) < ((int32_t) s->_l[0])) ? ((int32_t) d->_l[0]) : ((int32_t) s->_l[0])); d->_l[1] = ((((int32_t) d->_l[1]) < ((int32_t) s->_l[1])) ? ((int32_t) d->_l[1]) : ((int32_t) s->_l[1])); d->_l[2] = ((((int32_t) d->_l[2]) < ((int32_t) s->_l[2])) ? ((int32_t) d->_l[2]) : ((int32_t) s->_l[2])); d->_l[3] = ((((int32_t) d->_l[3]) < ((int32_t) s->_l[3])) ? ((int32_t) d->_l[3]) : ((int32_t) s->_l[3]));} +void helper_pminuw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = (((d->_w[0]) < (s->_w[0])) ? (d->_w[0]) : (s->_w[0])); d->_w[1] = (((d->_w[1]) < (s->_w[1])) ? (d->_w[1]) : (s->_w[1])); d->_w[2] = (((d->_w[2]) < (s->_w[2])) ? (d->_w[2]) : (s->_w[2])); d->_w[3] = (((d->_w[3]) < (s->_w[3])) ? (d->_w[3]) : (s->_w[3])); d->_w[4] = (((d->_w[4]) < (s->_w[4])) ? (d->_w[4]) : (s->_w[4])); d->_w[5] = (((d->_w[5]) < (s->_w[5])) ? (d->_w[5]) : (s->_w[5])); d->_w[6] = (((d->_w[6]) < (s->_w[6])) ? (d->_w[6]) : (s->_w[6])); d->_w[7] = (((d->_w[7]) < (s->_w[7])) ? (d->_w[7]) : (s->_w[7]));} +void helper_pminud_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = (((d->_l[0]) < (s->_l[0])) ? (d->_l[0]) : (s->_l[0])); d->_l[1] = (((d->_l[1]) < (s->_l[1])) ? (d->_l[1]) : (s->_l[1])); d->_l[2] = (((d->_l[2]) < (s->_l[2])) ? (d->_l[2]) : (s->_l[2])); d->_l[3] = (((d->_l[3]) < (s->_l[3])) ? (d->_l[3]) : (s->_l[3]));} +void helper_pmaxsb_xmm (XMMReg *d, XMMReg *s){ d->_b[0] = ((((int8_t) d->_b[0]) > ((int8_t) s->_b[0])) ? ((int8_t) d->_b[0]) : ((int8_t) s->_b[0])); d->_b[1] = ((((int8_t) d->_b[1]) > ((int8_t) s->_b[1])) ? ((int8_t) d->_b[1]) : ((int8_t) s->_b[1])); d->_b[2] = ((((int8_t) d->_b[2]) > ((int8_t) s->_b[2])) ? ((int8_t) d->_b[2]) : ((int8_t) s->_b[2])); d->_b[3] = ((((int8_t) d->_b[3]) > ((int8_t) s->_b[3])) ? ((int8_t) d->_b[3]) : ((int8_t) s->_b[3])); d->_b[4] = ((((int8_t) d->_b[4]) > ((int8_t) s->_b[4])) ? ((int8_t) d->_b[4]) : ((int8_t) s->_b[4])); d->_b[5] = ((((int8_t) d->_b[5]) > ((int8_t) s->_b[5])) ? ((int8_t) d->_b[5]) : ((int8_t) s->_b[5])); d->_b[6] = ((((int8_t) d->_b[6]) > ((int8_t) s->_b[6])) ? ((int8_t) d->_b[6]) : ((int8_t) s->_b[6])); d->_b[7] = ((((int8_t) d->_b[7]) > ((int8_t) s->_b[7])) ? ((int8_t) d->_b[7]) : ((int8_t) s->_b[7])); d->_b[8] = ((((int8_t) d->_b[8]) > ((int8_t) s->_b[8])) ? ((int8_t) d->_b[8]) : ((int8_t) s->_b[8])); d->_b[9] = ((((int8_t) d->_b[9]) > ((int8_t) s->_b[9])) ? ((int8_t) d->_b[9]) : ((int8_t) s->_b[9])); d->_b[10] = ((((int8_t) d->_b[10]) > ((int8_t) s->_b[10])) ? ((int8_t) d->_b[10]) : ((int8_t) s->_b[10])); d->_b[11] = ((((int8_t) d->_b[11]) > ((int8_t) s->_b[11])) ? ((int8_t) d->_b[11]) : ((int8_t) s->_b[11])); d->_b[12] = ((((int8_t) d->_b[12]) > ((int8_t) s->_b[12])) ? ((int8_t) d->_b[12]) : ((int8_t) s->_b[12])); d->_b[13] = ((((int8_t) d->_b[13]) > ((int8_t) s->_b[13])) ? ((int8_t) d->_b[13]) : ((int8_t) s->_b[13])); d->_b[14] = ((((int8_t) d->_b[14]) > ((int8_t) s->_b[14])) ? ((int8_t) d->_b[14]) : ((int8_t) s->_b[14])); d->_b[15] = ((((int8_t) d->_b[15]) > ((int8_t) s->_b[15])) ? ((int8_t) d->_b[15]) : ((int8_t) s->_b[15]));} +void helper_pmaxsd_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = ((((int32_t) d->_l[0]) > ((int32_t) s->_l[0])) ? ((int32_t) d->_l[0]) : ((int32_t) s->_l[0])); d->_l[1] = ((((int32_t) d->_l[1]) > ((int32_t) s->_l[1])) ? ((int32_t) d->_l[1]) : ((int32_t) s->_l[1])); d->_l[2] = ((((int32_t) d->_l[2]) > ((int32_t) s->_l[2])) ? ((int32_t) d->_l[2]) : ((int32_t) s->_l[2])); d->_l[3] = ((((int32_t) d->_l[3]) > ((int32_t) s->_l[3])) ? ((int32_t) d->_l[3]) : ((int32_t) s->_l[3]));} +void helper_pmaxuw_xmm (XMMReg *d, XMMReg *s){ d->_w[0] = (((d->_w[0]) > (s->_w[0])) ? (d->_w[0]) : (s->_w[0])); d->_w[1] = (((d->_w[1]) > (s->_w[1])) ? (d->_w[1]) : (s->_w[1])); d->_w[2] = (((d->_w[2]) > (s->_w[2])) ? (d->_w[2]) : (s->_w[2])); d->_w[3] = (((d->_w[3]) > (s->_w[3])) ? (d->_w[3]) : (s->_w[3])); d->_w[4] = (((d->_w[4]) > (s->_w[4])) ? (d->_w[4]) : (s->_w[4])); d->_w[5] = (((d->_w[5]) > (s->_w[5])) ? (d->_w[5]) : (s->_w[5])); d->_w[6] = (((d->_w[6]) > (s->_w[6])) ? (d->_w[6]) : (s->_w[6])); d->_w[7] = (((d->_w[7]) > (s->_w[7])) ? (d->_w[7]) : (s->_w[7]));} +void helper_pmaxud_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = (((d->_l[0]) > (s->_l[0])) ? (d->_l[0]) : (s->_l[0])); d->_l[1] = (((d->_l[1]) > (s->_l[1])) ? (d->_l[1]) : (s->_l[1])); d->_l[2] = (((d->_l[2]) > (s->_l[2])) ? (d->_l[2]) : (s->_l[2])); d->_l[3] = (((d->_l[3]) > (s->_l[3])) ? (d->_l[3]) : (s->_l[3]));} + + +void helper_pmulld_xmm (XMMReg *d, XMMReg *s){ d->_l[0] = (int32_t) d->_l[0] * (int32_t) s->_l[0]; d->_l[1] = (int32_t) d->_l[1] * (int32_t) s->_l[1]; d->_l[2] = (int32_t) d->_l[2] * (int32_t) s->_l[2]; d->_l[3] = (int32_t) d->_l[3] * (int32_t) s->_l[3];} + +void helper_phminposuw_xmm (XMMReg *d, XMMReg *s) +{ + int idx = 0; + + if (s->_w[1] < s->_w[idx]) + idx = 1; + if (s->_w[2] < s->_w[idx]) + idx = 2; + if (s->_w[3] < s->_w[idx]) + idx = 3; + if (s->_w[4] < s->_w[idx]) + idx = 4; + if (s->_w[5] < s->_w[idx]) + idx = 5; + if (s->_w[6] < s->_w[idx]) + idx = 6; + if (s->_w[7] < s->_w[idx]) + idx = 7; + + d->_q[1] = 0; + d->_l[1] = 0; + d->_w[1] = idx; + d->_w[0] = s->_w[idx]; +} + +void helper_roundps_xmm (XMMReg *d, XMMReg *s, uint32_t mode) +{ + signed char prev_rounding_mode; + + prev_rounding_mode = env->sse_status.float_rounding_mode; + if (!(mode & (1 << 2))) + switch (mode & 3) { + case 0: + set_float_rounding_mode(float_round_nearest_even, &env->sse_status); + break; + case 1: + set_float_rounding_mode(float_round_down, &env->sse_status); + break; + case 2: + set_float_rounding_mode(float_round_up, &env->sse_status); + break; + case 3: + set_float_rounding_mode(float_round_to_zero, &env->sse_status); + break; + } + + d->_s[0] = float32_round_to_int(s->_s[0], &env->sse_status); + d->_s[1] = float32_round_to_int(s->_s[1], &env->sse_status); + d->_s[2] = float32_round_to_int(s->_s[2], &env->sse_status); + d->_s[3] = float32_round_to_int(s->_s[3], &env->sse_status); +# 1668 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" + env->sse_status.float_rounding_mode = prev_rounding_mode; +} + +void helper_roundpd_xmm (XMMReg *d, XMMReg *s, uint32_t mode) +{ + signed char prev_rounding_mode; + + prev_rounding_mode = env->sse_status.float_rounding_mode; + if (!(mode & (1 << 2))) + switch (mode & 3) { + case 0: + set_float_rounding_mode(float_round_nearest_even, &env->sse_status); + break; + case 1: + set_float_rounding_mode(float_round_down, &env->sse_status); + break; + case 2: + set_float_rounding_mode(float_round_up, &env->sse_status); + break; + case 3: + set_float_rounding_mode(float_round_to_zero, &env->sse_status); + break; + } + + d->_d[0] = float64_round_to_int(s->_d[0], &env->sse_status); + d->_d[1] = float64_round_to_int(s->_d[1], &env->sse_status); +# 1702 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" + env->sse_status.float_rounding_mode = prev_rounding_mode; +} + +void helper_roundss_xmm (XMMReg *d, XMMReg *s, uint32_t mode) +{ + signed char prev_rounding_mode; + + prev_rounding_mode = env->sse_status.float_rounding_mode; + if (!(mode & (1 << 2))) + switch (mode & 3) { + case 0: + set_float_rounding_mode(float_round_nearest_even, &env->sse_status); + break; + case 1: + set_float_rounding_mode(float_round_down, &env->sse_status); + break; + case 2: + set_float_rounding_mode(float_round_up, &env->sse_status); + break; + case 3: + set_float_rounding_mode(float_round_to_zero, &env->sse_status); + break; + } + + d->_s[0] = float32_round_to_int(s->_s[0], &env->sse_status); +# 1735 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" + env->sse_status.float_rounding_mode = prev_rounding_mode; +} + +void helper_roundsd_xmm (XMMReg *d, XMMReg *s, uint32_t mode) +{ + signed char prev_rounding_mode; + + prev_rounding_mode = env->sse_status.float_rounding_mode; + if (!(mode & (1 << 2))) + switch (mode & 3) { + case 0: + set_float_rounding_mode(float_round_nearest_even, &env->sse_status); + break; + case 1: + set_float_rounding_mode(float_round_down, &env->sse_status); + break; + case 2: + set_float_rounding_mode(float_round_up, &env->sse_status); + break; + case 3: + set_float_rounding_mode(float_round_to_zero, &env->sse_status); + break; + } + + d->_d[0] = float64_round_to_int(s->_d[0], &env->sse_status); +# 1768 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/ops_sse.h" + env->sse_status.float_rounding_mode = prev_rounding_mode; +} + + +void helper_blendps_xmm (XMMReg *d, XMMReg *s, uint32_t imm){ d->_l[0] = ((imm >> 0) & 1) ? s->_l[0] : d->_l[0]; d->_l[1] = ((imm >> 1) & 1) ? s->_l[1] : d->_l[1]; if (4 > 2) { d->_l[2] = ((imm >> 2) & 1) ? s->_l[2] : d->_l[2]; d->_l[3] = ((imm >> 3) & 1) ? s->_l[3] : d->_l[3]; if (4 > 4) { d->_l[4] = ((imm >> 4) & 1) ? s->_l[4] : d->_l[4]; d->_l[5] = ((imm >> 5) & 1) ? s->_l[5] : d->_l[5]; d->_l[6] = ((imm >> 6) & 1) ? s->_l[6] : d->_l[6]; d->_l[7] = ((imm >> 7) & 1) ? s->_l[7] : d->_l[7]; if (4 > 8) { d->_l[8] = ((imm >> 8) & 1) ? s->_l[8] : d->_l[8]; d->_l[9] = ((imm >> 9) & 1) ? s->_l[9] : d->_l[9]; d->_l[10] = ((imm >> 10) & 1) ? s->_l[10] : d->_l[10]; d->_l[11] = ((imm >> 11) & 1) ? s->_l[11] : d->_l[11]; d->_l[12] = ((imm >> 12) & 1) ? s->_l[12] : d->_l[12]; d->_l[13] = ((imm >> 13) & 1) ? s->_l[13] : d->_l[13]; d->_l[14] = ((imm >> 14) & 1) ? s->_l[14] : d->_l[14]; d->_l[15] = ((imm >> 15) & 1) ? s->_l[15] : d->_l[15]; } } }} +void helper_blendpd_xmm (XMMReg *d, XMMReg *s, uint32_t imm){ d->_q[0] = ((imm >> 0) & 1) ? s->_q[0] : d->_q[0]; d->_q[1] = ((imm >> 1) & 1) ? s->_q[1] : d->_q[1]; if (2 > 2) { d->_q[2] = ((imm >> 2) & 1) ? s->_q[2] : d->_q[2]; d->_q[3] = ((imm >> 3) & 1) ? s->_q[3] : d->_q[3]; if (2 > 4) { d->_q[4] = ((imm >> 4) & 1) ? s->_q[4] : d->_q[4]; d->_q[5] = ((imm >> 5) & 1) ? s->_q[5] : d->_q[5]; d->_q[6] = ((imm >> 6) & 1) ? s->_q[6] : d->_q[6]; d->_q[7] = ((imm >> 7) & 1) ? s->_q[7] : d->_q[7]; if (2 > 8) { d->_q[8] = ((imm >> 8) & 1) ? s->_q[8] : d->_q[8]; d->_q[9] = ((imm >> 9) & 1) ? s->_q[9] : d->_q[9]; d->_q[10] = ((imm >> 10) & 1) ? s->_q[10] : d->_q[10]; d->_q[11] = ((imm >> 11) & 1) ? s->_q[11] : d->_q[11]; d->_q[12] = ((imm >> 12) & 1) ? s->_q[12] : d->_q[12]; d->_q[13] = ((imm >> 13) & 1) ? s->_q[13] : d->_q[13]; d->_q[14] = ((imm >> 14) & 1) ? s->_q[14] : d->_q[14]; d->_q[15] = ((imm >> 15) & 1) ? s->_q[15] : d->_q[15]; } } }} +void helper_pblendw_xmm (XMMReg *d, XMMReg *s, uint32_t imm){ d->_w[0] = ((imm >> 0) & 1) ? s->_w[0] : d->_w[0]; d->_w[1] = ((imm >> 1) & 1) ? s->_w[1] : d->_w[1]; if (8 > 2) { d->_w[2] = ((imm >> 2) & 1) ? s->_w[2] : d->_w[2]; d->_w[3] = ((imm >> 3) & 1) ? s->_w[3] : d->_w[3]; if (8 > 4) { d->_w[4] = ((imm >> 4) & 1) ? s->_w[4] : d->_w[4]; d->_w[5] = ((imm >> 5) & 1) ? s->_w[5] : d->_w[5]; d->_w[6] = ((imm >> 6) & 1) ? s->_w[6] : d->_w[6]; d->_w[7] = ((imm >> 7) & 1) ? s->_w[7] : d->_w[7]; if (8 > 8) { d->_w[8] = ((imm >> 8) & 1) ? s->_w[8] : d->_w[8]; d->_w[9] = ((imm >> 9) & 1) ? s->_w[9] : d->_w[9]; d->_w[10] = ((imm >> 10) & 1) ? s->_w[10] : d->_w[10]; d->_w[11] = ((imm >> 11) & 1) ? s->_w[11] : d->_w[11]; d->_w[12] = ((imm >> 12) & 1) ? s->_w[12] : d->_w[12]; d->_w[13] = ((imm >> 13) & 1) ? s->_w[13] : d->_w[13]; d->_w[14] = ((imm >> 14) & 1) ? s->_w[14] : d->_w[14]; d->_w[15] = ((imm >> 15) & 1) ? s->_w[15] : d->_w[15]; } } }} + +void helper_dpps_xmm (XMMReg *d, XMMReg *s, uint32_t mask) +{ + float32 iresult = (0); + + if (mask & (1 << 4)) + iresult = float32_add(iresult, + float32_mul(d->_s[0], s->_s[0], &env->sse_status), + &env->sse_status); + if (mask & (1 << 5)) + iresult = float32_add(iresult, + float32_mul(d->_s[1], s->_s[1], &env->sse_status), + &env->sse_status); + if (mask & (1 << 6)) + iresult = float32_add(iresult, + float32_mul(d->_s[2], s->_s[2], &env->sse_status), + &env->sse_status); + if (mask & (1 << 7)) + iresult = float32_add(iresult, + float32_mul(d->_s[3], s->_s[3], &env->sse_status), + &env->sse_status); + d->_s[0] = (mask & (1 << 0)) ? iresult : (0); + d->_s[1] = (mask & (1 << 1)) ? iresult : (0); + d->_s[2] = (mask & (1 << 2)) ? iresult : (0); + d->_s[3] = (mask & (1 << 3)) ? iresult : (0); +} + +void helper_dppd_xmm (XMMReg *d, XMMReg *s, uint32_t mask) +{ + float64 iresult = (0); + + if (mask & (1 << 4)) + iresult = float64_add(iresult, + float64_mul(d->_d[0], s->_d[0], &env->sse_status), + &env->sse_status); + if (mask & (1 << 5)) + iresult = float64_add(iresult, + float64_mul(d->_d[1], s->_d[1], &env->sse_status), + &env->sse_status); + d->_d[0] = (mask & (1 << 0)) ? iresult : (0); + d->_d[1] = (mask & (1 << 1)) ? iresult : (0); +} + +void helper_mpsadbw_xmm (XMMReg *d, XMMReg *s, uint32_t offset) +{ + int s0 = (offset & 3) << 2; + int d0 = (offset & 4) << 0; + int i; + XMMReg r; + + for (i = 0; i < 8; i++, d0++) { + r._w[i] = 0; + r._w[i] += abs1(d->_b[d0 + 0] - s->_b[s0 + 0]); + r._w[i] += abs1(d->_b[d0 + 1] - s->_b[s0 + 1]); + r._w[i] += abs1(d->_b[d0 + 2] - s->_b[s0 + 2]); + r._w[i] += abs1(d->_b[d0 + 3] - s->_b[s0 + 3]); + } + + *d = r; +} + + + + +void helper_pcmpgtq_xmm (XMMReg *d, XMMReg *s){ d->_q[0] = d->_q[0] > s->_q[0] ? -1 : 0; d->_q[1] = d->_q[1] > s->_q[1] ? -1 : 0;} + +static __attribute__ (( always_inline )) __inline__ int pcmp_elen(int reg, uint32_t ctrl) +{ + int val; + + + if (ctrl >> 8) + val = abs1((int64_t) env->regs[reg]); + else + val = abs1((int32_t) env->regs[reg]); + + if (ctrl & 1) { + if (val > 8) + return 8; + } else + if (val > 16) + return 16; + + return val; +} + +static __attribute__ (( always_inline )) __inline__ int pcmp_ilen(XMMReg *r, uint8_t ctrl) +{ + int val = 0; + + if (ctrl & 1) { + while (val < 8 && r->_w[val]) + val++; + } else + while (val < 16 && r->_b[val]) + val++; + + return val; +} + +static __attribute__ (( always_inline )) __inline__ int pcmp_val(XMMReg *r, uint8_t ctrl, int i) +{ + switch ((ctrl >> 0) & 3) { + case 0: + return r->_b[i]; + case 1: + return r->_w[i]; + case 2: + return (int8_t) r->_b[i]; + case 3: + default: + return (int16_t) r->_w[i]; + } +} + +static __attribute__ (( always_inline )) __inline__ unsigned pcmpxstrx(XMMReg *d, XMMReg *s, + int8_t ctrl, int valids, int validd) +{ + unsigned int res = 0; + int v; + int j, i; + int upper = (ctrl & 1) ? 7 : 15; + + valids--; + validd--; + + (env->cc_src) = (valids < upper ? 0x0040 : 0) | (validd < upper ? 0x0080 : 0); + + switch ((ctrl >> 2) & 3) { + case 0: + for (j = valids; j >= 0; j--) { + res <<= 1; + v = pcmp_val(s, ctrl, j); + for (i = validd; i >= 0; i--) + res |= (v == pcmp_val(d, ctrl, i)); + } + break; + case 1: + for (j = valids; j >= 0; j--) { + res <<= 1; + v = pcmp_val(s, ctrl, j); + for (i = ((validd - 1) | 1); i >= 0; i -= 2) + res |= (pcmp_val(d, ctrl, i - 0) <= v && + pcmp_val(d, ctrl, i - 1) >= v); + } + break; + case 2: + res = (2 << (upper - (((valids) > (validd)) ? (valids) : (validd)))) - 1; + res <<= (((valids) > (validd)) ? (valids) : (validd)) - (((valids) < (validd)) ? (valids) : (validd)); + for (i = (((valids) < (validd)) ? (valids) : (validd)); i >= 0; i--) { + res <<= 1; + v = pcmp_val(s, ctrl, i); + res |= (v == pcmp_val(d, ctrl, i)); + } + break; + case 3: + for (j = valids - validd; j >= 0; j--) { + res <<= 1; + res |= 1; + for (i = (((upper - j) < (validd)) ? (upper - j) : (validd)); i >= 0; i--) + res &= (pcmp_val(s, ctrl, i + j) == pcmp_val(d, ctrl, i)); + } + break; + } + + switch ((ctrl >> 4) & 3) { + case 1: + res ^= (2 << upper) - 1; + break; + case 3: + res ^= (2 << valids) - 1; + break; + } + + if (res) + (env->cc_src) |= 0x0001; + if (res & 1) + (env->cc_src) |= 0x0800; + + return res; +} + +static __attribute__ (( always_inline )) __inline__ int rffs1(unsigned int val) +{ + int ret = 1, hi; + + for (hi = sizeof(val) * 4; hi; hi /= 2) + if (val >> hi) { + val >>= hi; + ret += hi; + } + + return ret; +} + +static __attribute__ (( always_inline )) __inline__ int ffs1(unsigned int val) +{ + int ret = 1, hi; + + for (hi = sizeof(val) * 4; hi; hi /= 2) + if (val << hi) { + val <<= hi; + ret += hi; + } + + return ret; +} + +void helper_pcmpestri_xmm (XMMReg *d, XMMReg *s, uint32_t ctrl) +{ + unsigned int res = pcmpxstrx(d, s, ctrl, + pcmp_elen(2, ctrl), + pcmp_elen(0, ctrl)); + + if (res) + env->regs[1] = ((ctrl & (1 << 6)) ? rffs1 : ffs1)(res) - 1; + else + env->regs[1] = 16 >> (ctrl & (1 << 0)); +} + +void helper_pcmpestrm_xmm (XMMReg *d, XMMReg *s, uint32_t ctrl) +{ + int i; + unsigned int res = pcmpxstrx(d, s, ctrl, + pcmp_elen(2, ctrl), + pcmp_elen(0, ctrl)); + + if ((ctrl >> 6) & 1) { + if (ctrl & 1) + for (i = 0; i < 8; i++, res >>= 1) { + d->_w[i] = (res & 1) ? ~0 : 0; + } + else + for (i = 0; i < 16; i++, res >>= 1) { + d->_b[i] = (res & 1) ? ~0 : 0; + } + } else { + d->_q[1] = 0; + d->_q[0] = res; + } +} + +void helper_pcmpistri_xmm (XMMReg *d, XMMReg *s, uint32_t ctrl) +{ + unsigned int res = pcmpxstrx(d, s, ctrl, + pcmp_ilen(s, ctrl), + pcmp_ilen(d, ctrl)); + + if (res) + env->regs[1] = ((ctrl & (1 << 6)) ? rffs1 : ffs1)(res) - 1; + else + env->regs[1] = 16 >> (ctrl & (1 << 0)); +} + +void helper_pcmpistrm_xmm (XMMReg *d, XMMReg *s, uint32_t ctrl) +{ + int i; + unsigned int res = pcmpxstrx(d, s, ctrl, + pcmp_ilen(s, ctrl), + pcmp_ilen(d, ctrl)); + + if ((ctrl >> 6) & 1) { + if (ctrl & 1) + for (i = 0; i < 8; i++, res >>= 1) { + d->_w[i] = (res & 1) ? ~0 : 0; + } + else + for (i = 0; i < 16; i++, res >>= 1) { + d->_b[i] = (res & 1) ? ~0 : 0; + } + } else { + d->_q[1] = 0; + d->_q[0] = res; + } +} + + + +target_ulong helper_crc32(uint32_t crc1, target_ulong msg, uint32_t len) +{ + target_ulong crc = (msg & ((target_ulong) -1 >> + (32 - len))) ^ crc1; + + while (len--) + crc = (crc >> 1) ^ ((crc & 1) ? 0x82f63b78 : 0); + + return crc; +} + + + +target_ulong helper_popcnt(target_ulong n, uint32_t type) +{ + (env->cc_src) = n ? 0 : 0x0040; + + n = (n & ((target_ulong) -1 / ((1LL << (1 << 0)) + 1))) + ((n >> (1 << 0)) & ((target_ulong) -1 / ((1LL << (1 << 0)) + 1))); + n = (n & ((target_ulong) -1 / ((1LL << (1 << 1)) + 1))) + ((n >> (1 << 1)) & ((target_ulong) -1 / ((1LL << (1 << 1)) + 1))); + n = (n & ((target_ulong) -1 / ((1LL << (1 << 2)) + 1))) + ((n >> (1 << 2)) & ((target_ulong) -1 / ((1LL << (1 << 2)) + 1))); + n = (n & ((target_ulong) -1 / ((1LL << (1 << 3)) + 1))) + ((n >> (1 << 3)) & ((target_ulong) -1 / ((1LL << (1 << 3)) + 1))); + if (type == 1) + return n & 0xff; + + n = (n & ((target_ulong) -1 / ((1LL << (1 << 4)) + 1))) + ((n >> (1 << 4)) & ((target_ulong) -1 / ((1LL << (1 << 4)) + 1))); + + return n; + + + + + + +} +# 5698 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper_template.h" 1 +# 54 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper_template.h" +static int compute_all_addb(void) +{ + int cf, pf, af, zf, sf, of; + target_long src1, src2; + src1 = (env->cc_src); + src2 = (env->cc_dst) - (env->cc_src); + cf = (uint8_t)(env->cc_dst) < (uint8_t)src1; + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; + zf = ((uint8_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; + of = lshift((src1 ^ src2 ^ -1) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 0))) & 0x0800; + return cf | pf | af | zf | sf | of; +} + +static int compute_c_addb(void) +{ + int cf; + target_long src1; + src1 = (env->cc_src); + cf = (uint8_t)(env->cc_dst) < (uint8_t)src1; + return cf; +} + +static int compute_all_adcb(void) +{ + int cf, pf, af, zf, sf, of; + target_long src1, src2; + src1 = (env->cc_src); + src2 = (env->cc_dst) - (env->cc_src) - 1; + cf = (uint8_t)(env->cc_dst) <= (uint8_t)src1; + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; + zf = ((uint8_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; + of = lshift((src1 ^ src2 ^ -1) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 0))) & 0x0800; + return cf | pf | af | zf | sf | of; +} + +static int compute_c_adcb(void) +{ + int cf; + target_long src1; + src1 = (env->cc_src); + cf = (uint8_t)(env->cc_dst) <= (uint8_t)src1; + return cf; +} + +static int compute_all_subb(void) +{ + int cf, pf, af, zf, sf, of; + target_long src1, src2; + src1 = (env->cc_dst) + (env->cc_src); + src2 = (env->cc_src); + cf = (uint8_t)src1 < (uint8_t)src2; + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; + zf = ((uint8_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; + of = lshift((src1 ^ src2) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 0))) & 0x0800; + return cf | pf | af | zf | sf | of; +} + +static int compute_c_subb(void) +{ + int cf; + target_long src1, src2; + src1 = (env->cc_dst) + (env->cc_src); + src2 = (env->cc_src); + cf = (uint8_t)src1 < (uint8_t)src2; + return cf; +} + +static int compute_all_sbbb(void) +{ + int cf, pf, af, zf, sf, of; + target_long src1, src2; + src1 = (env->cc_dst) + (env->cc_src) + 1; + src2 = (env->cc_src); + cf = (uint8_t)src1 <= (uint8_t)src2; + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; + zf = ((uint8_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; + of = lshift((src1 ^ src2) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 0))) & 0x0800; + return cf | pf | af | zf | sf | of; +} + +static int compute_c_sbbb(void) +{ + int cf; + target_long src1, src2; + src1 = (env->cc_dst) + (env->cc_src) + 1; + src2 = (env->cc_src); + cf = (uint8_t)src1 <= (uint8_t)src2; + return cf; +} + +static int compute_all_logicb(void) +{ + int cf, pf, af, zf, sf, of; + cf = 0; + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = 0; + zf = ((uint8_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; + of = 0; + return cf | pf | af | zf | sf | of; +} + +static int compute_c_logicb(void) +{ + return 0; +} + +static int compute_all_incb(void) +{ + int cf, pf, af, zf, sf, of; + target_long src1, src2; + src1 = (env->cc_dst) - 1; + src2 = 1; + cf = (env->cc_src); + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; + zf = ((uint8_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; + of = (((env->cc_dst) & 0xff) == (((target_ulong)1) << ((1 << (3 + 0)) - 1))) << 11; + return cf | pf | af | zf | sf | of; +} +# 191 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper_template.h" +static int compute_all_decb(void) +{ + int cf, pf, af, zf, sf, of; + target_long src1, src2; + src1 = (env->cc_dst) + 1; + src2 = 1; + cf = (env->cc_src); + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; + zf = ((uint8_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; + of = (((env->cc_dst) & 0xff) == ((target_ulong)(((target_ulong)1) << ((1 << (3 + 0)) - 1)) - 1)) << 11; + return cf | pf | af | zf | sf | of; +} + +static int compute_all_shlb(void) +{ + int cf, pf, af, zf, sf, of; + cf = ((env->cc_src) >> ((1 << (3 + 0)) - 1)) & 0x0001; + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = 0; + zf = ((uint8_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; + + of = lshift((env->cc_src) ^ (env->cc_dst), 12 - (1 << (3 + 0))) & 0x0800; + return cf | pf | af | zf | sf | of; +} + +static int compute_c_shlb(void) +{ + return ((env->cc_src) >> ((1 << (3 + 0)) - 1)) & 0x0001; +} +# 231 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper_template.h" +static int compute_all_sarb(void) +{ + int cf, pf, af, zf, sf, of; + cf = (env->cc_src) & 1; + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = 0; + zf = ((uint8_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; + + of = lshift((env->cc_src) ^ (env->cc_dst), 12 - (1 << (3 + 0))) & 0x0800; + return cf | pf | af | zf | sf | of; +} +# 255 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper_template.h" +static int compute_all_mulb(void) +{ + int cf, pf, af, zf, sf, of; + cf = ((env->cc_src) != 0); + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = 0; + zf = ((uint8_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 0))) & 0x80; + of = cf << 11; + return cf | pf | af | zf | sf | of; +} + + + +target_ulong helper_rclb(target_ulong t0, target_ulong t1) +{ + int count, eflags; + target_ulong src; + target_long res; + + count = t1 & 0x1f; + + + + count = rclb_table[count]; + + if (count) { + eflags = helper_cc_compute_all((env->cc_op)); + t0 &= 0xff; + src = t0; + res = (t0 << count) | ((target_ulong)(eflags & 0x0001) << (count - 1)); + if (count > 1) + res |= t0 >> ((1 << (3 + 0)) + 1 - count); + t0 = res; + env->cc_tmp = (eflags & ~(0x0001 | 0x0800)) | + (lshift(src ^ t0, 11 - ((1 << (3 + 0)) - 1)) & 0x0800) | + ((src >> ((1 << (3 + 0)) - count)) & 0x0001); + } else { + env->cc_tmp = -1; + } + return t0; +} + +target_ulong helper_rcrb(target_ulong t0, target_ulong t1) +{ + int count, eflags; + target_ulong src; + target_long res; + + count = t1 & 0x1f; + + + + count = rclb_table[count]; + + if (count) { + eflags = helper_cc_compute_all((env->cc_op)); + t0 &= 0xff; + src = t0; + res = (t0 >> count) | ((target_ulong)(eflags & 0x0001) << ((1 << (3 + 0)) - count)); + if (count > 1) + res |= t0 << ((1 << (3 + 0)) + 1 - count); + t0 = res; + env->cc_tmp = (eflags & ~(0x0001 | 0x0800)) | + (lshift(src ^ t0, 11 - ((1 << (3 + 0)) - 1)) & 0x0800) | + ((src >> (count - 1)) & 0x0001); + } else { + env->cc_tmp = -1; + } + return t0; +} +# 5701 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 + + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper_template.h" 1 +# 54 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper_template.h" +static int compute_all_addw(void) +{ + int cf, pf, af, zf, sf, of; + target_long src1, src2; + src1 = (env->cc_src); + src2 = (env->cc_dst) - (env->cc_src); + cf = (uint16_t)(env->cc_dst) < (uint16_t)src1; + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; + zf = ((uint16_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; + of = lshift((src1 ^ src2 ^ -1) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 1))) & 0x0800; + return cf | pf | af | zf | sf | of; +} + +static int compute_c_addw(void) +{ + int cf; + target_long src1; + src1 = (env->cc_src); + cf = (uint16_t)(env->cc_dst) < (uint16_t)src1; + return cf; +} + +static int compute_all_adcw(void) +{ + int cf, pf, af, zf, sf, of; + target_long src1, src2; + src1 = (env->cc_src); + src2 = (env->cc_dst) - (env->cc_src) - 1; + cf = (uint16_t)(env->cc_dst) <= (uint16_t)src1; + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; + zf = ((uint16_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; + of = lshift((src1 ^ src2 ^ -1) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 1))) & 0x0800; + return cf | pf | af | zf | sf | of; +} + +static int compute_c_adcw(void) +{ + int cf; + target_long src1; + src1 = (env->cc_src); + cf = (uint16_t)(env->cc_dst) <= (uint16_t)src1; + return cf; +} + +static int compute_all_subw(void) +{ + int cf, pf, af, zf, sf, of; + target_long src1, src2; + src1 = (env->cc_dst) + (env->cc_src); + src2 = (env->cc_src); + cf = (uint16_t)src1 < (uint16_t)src2; + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; + zf = ((uint16_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; + of = lshift((src1 ^ src2) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 1))) & 0x0800; + return cf | pf | af | zf | sf | of; +} + +static int compute_c_subw(void) +{ + int cf; + target_long src1, src2; + src1 = (env->cc_dst) + (env->cc_src); + src2 = (env->cc_src); + cf = (uint16_t)src1 < (uint16_t)src2; + return cf; +} + +static int compute_all_sbbw(void) +{ + int cf, pf, af, zf, sf, of; + target_long src1, src2; + src1 = (env->cc_dst) + (env->cc_src) + 1; + src2 = (env->cc_src); + cf = (uint16_t)src1 <= (uint16_t)src2; + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; + zf = ((uint16_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; + of = lshift((src1 ^ src2) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 1))) & 0x0800; + return cf | pf | af | zf | sf | of; +} + +static int compute_c_sbbw(void) +{ + int cf; + target_long src1, src2; + src1 = (env->cc_dst) + (env->cc_src) + 1; + src2 = (env->cc_src); + cf = (uint16_t)src1 <= (uint16_t)src2; + return cf; +} + +static int compute_all_logicw(void) +{ + int cf, pf, af, zf, sf, of; + cf = 0; + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = 0; + zf = ((uint16_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; + of = 0; + return cf | pf | af | zf | sf | of; +} + +static int compute_c_logicw(void) +{ + return 0; +} + +static int compute_all_incw(void) +{ + int cf, pf, af, zf, sf, of; + target_long src1, src2; + src1 = (env->cc_dst) - 1; + src2 = 1; + cf = (env->cc_src); + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; + zf = ((uint16_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; + of = (((env->cc_dst) & 0xffff) == (((target_ulong)1) << ((1 << (3 + 1)) - 1))) << 11; + return cf | pf | af | zf | sf | of; +} +# 191 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper_template.h" +static int compute_all_decw(void) +{ + int cf, pf, af, zf, sf, of; + target_long src1, src2; + src1 = (env->cc_dst) + 1; + src2 = 1; + cf = (env->cc_src); + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; + zf = ((uint16_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; + of = (((env->cc_dst) & 0xffff) == ((target_ulong)(((target_ulong)1) << ((1 << (3 + 1)) - 1)) - 1)) << 11; + return cf | pf | af | zf | sf | of; +} + +static int compute_all_shlw(void) +{ + int cf, pf, af, zf, sf, of; + cf = ((env->cc_src) >> ((1 << (3 + 1)) - 1)) & 0x0001; + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = 0; + zf = ((uint16_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; + + of = lshift((env->cc_src) ^ (env->cc_dst), 12 - (1 << (3 + 1))) & 0x0800; + return cf | pf | af | zf | sf | of; +} + +static int compute_c_shlw(void) +{ + return ((env->cc_src) >> ((1 << (3 + 1)) - 1)) & 0x0001; +} +# 231 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper_template.h" +static int compute_all_sarw(void) +{ + int cf, pf, af, zf, sf, of; + cf = (env->cc_src) & 1; + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = 0; + zf = ((uint16_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; + + of = lshift((env->cc_src) ^ (env->cc_dst), 12 - (1 << (3 + 1))) & 0x0800; + return cf | pf | af | zf | sf | of; +} +# 255 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper_template.h" +static int compute_all_mulw(void) +{ + int cf, pf, af, zf, sf, of; + cf = ((env->cc_src) != 0); + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = 0; + zf = ((uint16_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 1))) & 0x80; + of = cf << 11; + return cf | pf | af | zf | sf | of; +} + + + +target_ulong helper_rclw(target_ulong t0, target_ulong t1) +{ + int count, eflags; + target_ulong src; + target_long res; + + count = t1 & 0x1f; + + count = rclw_table[count]; + + + + if (count) { + eflags = helper_cc_compute_all((env->cc_op)); + t0 &= 0xffff; + src = t0; + res = (t0 << count) | ((target_ulong)(eflags & 0x0001) << (count - 1)); + if (count > 1) + res |= t0 >> ((1 << (3 + 1)) + 1 - count); + t0 = res; + env->cc_tmp = (eflags & ~(0x0001 | 0x0800)) | + (lshift(src ^ t0, 11 - ((1 << (3 + 1)) - 1)) & 0x0800) | + ((src >> ((1 << (3 + 1)) - count)) & 0x0001); + } else { + env->cc_tmp = -1; + } + return t0; +} + +target_ulong helper_rcrw(target_ulong t0, target_ulong t1) +{ + int count, eflags; + target_ulong src; + target_long res; + + count = t1 & 0x1f; + + count = rclw_table[count]; + + + + if (count) { + eflags = helper_cc_compute_all((env->cc_op)); + t0 &= 0xffff; + src = t0; + res = (t0 >> count) | ((target_ulong)(eflags & 0x0001) << ((1 << (3 + 1)) - count)); + if (count > 1) + res |= t0 << ((1 << (3 + 1)) + 1 - count); + t0 = res; + env->cc_tmp = (eflags & ~(0x0001 | 0x0800)) | + (lshift(src ^ t0, 11 - ((1 << (3 + 1)) - 1)) & 0x0800) | + ((src >> (count - 1)) & 0x0001); + } else { + env->cc_tmp = -1; + } + return t0; +} +# 5705 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 + + + +# 1 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper_template.h" 1 +# 54 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/helper_template.h" +static int compute_all_addl(void) +{ + int cf, pf, af, zf, sf, of; + target_long src1, src2; + src1 = (env->cc_src); + src2 = (env->cc_dst) - (env->cc_src); + cf = (uint32_t)(env->cc_dst) < (uint32_t)src1; + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; + zf = ((uint32_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; + of = lshift((src1 ^ src2 ^ -1) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 2))) & 0x0800; + return cf | pf | af | zf | sf | of; +} + +static int compute_c_addl(void) +{ + int cf; + target_long src1; + src1 = (env->cc_src); + cf = (uint32_t)(env->cc_dst) < (uint32_t)src1; + return cf; +} + +static int compute_all_adcl(void) +{ + int cf, pf, af, zf, sf, of; + target_long src1, src2; + src1 = (env->cc_src); + src2 = (env->cc_dst) - (env->cc_src) - 1; + cf = (uint32_t)(env->cc_dst) <= (uint32_t)src1; + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; + zf = ((uint32_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; + of = lshift((src1 ^ src2 ^ -1) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 2))) & 0x0800; + return cf | pf | af | zf | sf | of; +} + +static int compute_c_adcl(void) +{ + int cf; + target_long src1; + src1 = (env->cc_src); + cf = (uint32_t)(env->cc_dst) <= (uint32_t)src1; + return cf; +} + +static int compute_all_subl(void) +{ + int cf, pf, af, zf, sf, of; + target_long src1, src2; + src1 = (env->cc_dst) + (env->cc_src); + src2 = (env->cc_src); + cf = (uint32_t)src1 < (uint32_t)src2; + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; + zf = ((uint32_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; + of = lshift((src1 ^ src2) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 2))) & 0x0800; + return cf | pf | af | zf | sf | of; +} + +static int compute_c_subl(void) +{ + int cf; + target_long src1, src2; + src1 = (env->cc_dst) + (env->cc_src); + src2 = (env->cc_src); + cf = (uint32_t)src1 < (uint32_t)src2; + return cf; +} + +static int compute_all_sbbl(void) +{ + int cf, pf, af, zf, sf, of; + target_long src1, src2; + src1 = (env->cc_dst) + (env->cc_src) + 1; + src2 = (env->cc_src); + cf = (uint32_t)src1 <= (uint32_t)src2; + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; + zf = ((uint32_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; + of = lshift((src1 ^ src2) & (src1 ^ (env->cc_dst)), 12 - (1 << (3 + 2))) & 0x0800; + return cf | pf | af | zf | sf | of; +} + +static int compute_c_sbbl(void) +{ + int cf; + target_long src1, src2; + src1 = (env->cc_dst) + (env->cc_src) + 1; + src2 = (env->cc_src); + cf = (uint32_t)src1 <= (uint32_t)src2; + return cf; +} + +static int compute_all_logicl(void) +{ + int cf, pf, af, zf, sf, of; + cf = 0; + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = 0; + zf = ((uint32_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; + of = 0; + return cf | pf | af | zf | sf | of; +} + +static int compute_c_logicl(void) +{ + return 0; +} + +static int compute_all_incl(void) +{ + int cf, pf, af, zf, sf, of; + target_long src1, src2; + src1 = (env->cc_dst) - 1; + src2 = 1; + cf = (env->cc_src); + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; + zf = ((uint32_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; + of = (((env->cc_dst) & 0xffffffff) == (((target_ulong)1) << ((1 << (3 + 2)) - 1))) << 11; + return cf | pf | af | zf | sf | of; +} + + +static int compute_c_incl(void) +{ + return (env->cc_src); +} + + +static int compute_all_decl(void) +{ + int cf, pf, af, zf, sf, of; + target_long src1, src2; + src1 = (env->cc_dst) + 1; + src2 = 1; + cf = (env->cc_src); + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = ((env->cc_dst) ^ src1 ^ src2) & 0x10; + zf = ((uint32_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; + of = (((env->cc_dst) & 0xffffffff) == ((target_ulong)(((target_ulong)1) << ((1 << (3 + 2)) - 1)) - 1)) << 11; + return cf | pf | af | zf | sf | of; +} + +static int compute_all_shll(void) +{ + int cf, pf, af, zf, sf, of; + cf = ((env->cc_src) >> ((1 << (3 + 2)) - 1)) & 0x0001; + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = 0; + zf = ((uint32_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; + + of = lshift((env->cc_src) ^ (env->cc_dst), 12 - (1 << (3 + 2))) & 0x0800; + return cf | pf | af | zf | sf | of; +} + +static int compute_c_shll(void) +{ + return ((env->cc_src) >> ((1 << (3 + 2)) - 1)) & 0x0001; +} + + +static int compute_c_sarl(void) +{ + return (env->cc_src) & 1; +} + + +static int compute_all_sarl(void) +{ + int cf, pf, af, zf, sf, of; + cf = (env->cc_src) & 1; + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = 0; + zf = ((uint32_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; + + of = lshift((env->cc_src) ^ (env->cc_dst), 12 - (1 << (3 + 2))) & 0x0800; + return cf | pf | af | zf | sf | of; +} + + +static int compute_c_mull(void) +{ + int cf; + cf = ((env->cc_src) != 0); + return cf; +} + + + + +static int compute_all_mull(void) +{ + int cf, pf, af, zf, sf, of; + cf = ((env->cc_src) != 0); + pf = parity_table[(uint8_t)(env->cc_dst)]; + af = 0; + zf = ((uint32_t)(env->cc_dst) == 0) << 6; + sf = lshift((env->cc_dst), 8 - (1 << (3 + 2))) & 0x80; + of = cf << 11; + return cf | pf | af | zf | sf | of; +} + + + +target_ulong helper_rcll(target_ulong t0, target_ulong t1) +{ + int count, eflags; + target_ulong src; + target_long res; + + count = t1 & 0x1f; + + + + + + if (count) { + eflags = helper_cc_compute_all((env->cc_op)); + t0 &= 0xffffffff; + src = t0; + res = (t0 << count) | ((target_ulong)(eflags & 0x0001) << (count - 1)); + if (count > 1) + res |= t0 >> ((1 << (3 + 2)) + 1 - count); + t0 = res; + env->cc_tmp = (eflags & ~(0x0001 | 0x0800)) | + (lshift(src ^ t0, 11 - ((1 << (3 + 2)) - 1)) & 0x0800) | + ((src >> ((1 << (3 + 2)) - count)) & 0x0001); + } else { + env->cc_tmp = -1; + } + return t0; +} + +target_ulong helper_rcrl(target_ulong t0, target_ulong t1) +{ + int count, eflags; + target_ulong src; + target_long res; + + count = t1 & 0x1f; + + + + + + if (count) { + eflags = helper_cc_compute_all((env->cc_op)); + t0 &= 0xffffffff; + src = t0; + res = (t0 >> count) | ((target_ulong)(eflags & 0x0001) << ((1 << (3 + 2)) - count)); + if (count > 1) + res |= t0 << ((1 << (3 + 2)) + 1 - count); + t0 = res; + env->cc_tmp = (eflags & ~(0x0001 | 0x0800)) | + (lshift(src ^ t0, 11 - ((1 << (3 + 2)) - 1)) & 0x0800) | + ((src >> (count - 1)) & 0x0001); + } else { + env->cc_tmp = -1; + } + return t0; +} +# 5709 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" 2 +# 5720 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" +target_ulong helper_bsf(target_ulong t0) +{ + int count; + target_ulong res; + + res = t0; + count = 0; + while ((res & 1) == 0) { + count++; + res >>= 1; + } + return count; +} + +target_ulong helper_lzcnt(target_ulong t0, int wordsize) +{ + int count; + target_ulong res, mask; + + if (wordsize > 0 && t0 == 0) { + return wordsize; + } + res = t0; + count = 32 - 1; + mask = (target_ulong)1 << (32 - 1); + while ((res & mask) == 0) { + count--; + res <<= 1; + } + if (wordsize > 0) { + return wordsize - 1 - count; + } + return count; +} + +target_ulong helper_bsr(target_ulong t0) +{ + return helper_lzcnt(t0, 0); +} + +static int compute_all_eflags(void) +{ + return (env->cc_src); +} + +static int compute_c_eflags(void) +{ + return (env->cc_src) & 0x0001; +} + +uint32_t helper_cc_compute_all(int op) +{ + switch (op) { + default: return 0; + + case CC_OP_EFLAGS: return compute_all_eflags(); + + case CC_OP_MULB: return compute_all_mulb(); + case CC_OP_MULW: return compute_all_mulw(); + case CC_OP_MULL: return compute_all_mull(); + + case CC_OP_ADDB: return compute_all_addb(); + case CC_OP_ADDW: return compute_all_addw(); + case CC_OP_ADDL: return compute_all_addl(); + + case CC_OP_ADCB: return compute_all_adcb(); + case CC_OP_ADCW: return compute_all_adcw(); + case CC_OP_ADCL: return compute_all_adcl(); + + case CC_OP_SUBB: return compute_all_subb(); + case CC_OP_SUBW: return compute_all_subw(); + case CC_OP_SUBL: return compute_all_subl(); + + case CC_OP_SBBB: return compute_all_sbbb(); + case CC_OP_SBBW: return compute_all_sbbw(); + case CC_OP_SBBL: return compute_all_sbbl(); + + case CC_OP_LOGICB: return compute_all_logicb(); + case CC_OP_LOGICW: return compute_all_logicw(); + case CC_OP_LOGICL: return compute_all_logicl(); + + case CC_OP_INCB: return compute_all_incb(); + case CC_OP_INCW: return compute_all_incw(); + case CC_OP_INCL: return compute_all_incl(); + + case CC_OP_DECB: return compute_all_decb(); + case CC_OP_DECW: return compute_all_decw(); + case CC_OP_DECL: return compute_all_decl(); + + case CC_OP_SHLB: return compute_all_shlb(); + case CC_OP_SHLW: return compute_all_shlw(); + case CC_OP_SHLL: return compute_all_shll(); + + case CC_OP_SARB: return compute_all_sarb(); + case CC_OP_SARW: return compute_all_sarw(); + case CC_OP_SARL: return compute_all_sarl(); +# 5838 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" + } +} + +uint32_t cpu_cc_compute_all(CPUX86State *env1, int op) +{ + CPUX86State *saved_env; + uint32_t ret; + + saved_env = env; + env = env1; + ret = helper_cc_compute_all(op); + env = saved_env; + return ret; +} + +uint32_t helper_cc_compute_c(int op) +{ + switch (op) { + default: return 0; + + case CC_OP_EFLAGS: return compute_c_eflags(); + + case CC_OP_MULB: return compute_c_mull(); + case CC_OP_MULW: return compute_c_mull(); + case CC_OP_MULL: return compute_c_mull(); + + case CC_OP_ADDB: return compute_c_addb(); + case CC_OP_ADDW: return compute_c_addw(); + case CC_OP_ADDL: return compute_c_addl(); + + case CC_OP_ADCB: return compute_c_adcb(); + case CC_OP_ADCW: return compute_c_adcw(); + case CC_OP_ADCL: return compute_c_adcl(); + + case CC_OP_SUBB: return compute_c_subb(); + case CC_OP_SUBW: return compute_c_subw(); + case CC_OP_SUBL: return compute_c_subl(); + + case CC_OP_SBBB: return compute_c_sbbb(); + case CC_OP_SBBW: return compute_c_sbbw(); + case CC_OP_SBBL: return compute_c_sbbl(); + + case CC_OP_LOGICB: return compute_c_logicb(); + case CC_OP_LOGICW: return compute_c_logicw(); + case CC_OP_LOGICL: return compute_c_logicl(); + + case CC_OP_INCB: return compute_c_incl(); + case CC_OP_INCW: return compute_c_incl(); + case CC_OP_INCL: return compute_c_incl(); + + case CC_OP_DECB: return compute_c_incl(); + case CC_OP_DECW: return compute_c_incl(); + case CC_OP_DECL: return compute_c_incl(); + + case CC_OP_SHLB: return compute_c_shlb(); + case CC_OP_SHLW: return compute_c_shlw(); + case CC_OP_SHLL: return compute_c_shll(); + + case CC_OP_SARB: return compute_c_sarl(); + case CC_OP_SARW: return compute_c_sarl(); + case CC_OP_SARL: return compute_c_sarl(); +# 5921 "/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/target-i386/op_helper.c" + } +} diff --git a/462550/bug462550.ii b/462550/bug462550.ii new file mode 100644 index 0000000..b34b125 --- /dev/null +++ b/462550/bug462550.ii @@ -0,0 +1,145854 @@ +namespace std +{ + typedef long unsigned int size_t; + typedef long int ptrdiff_t; +} +namespace std +{ + inline namespace __gnu_cxx_ldbl128 { } +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + class allocator; + template + struct char_traits; + template, + typename _Alloc = allocator<_CharT> > + class basic_string; + template<> struct char_traits; + typedef basic_string string; + template<> struct char_traits; + typedef basic_string wstring; +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + void + __throw_bad_exception(void) __attribute__((__noreturn__)); + void + __throw_bad_alloc(void) __attribute__((__noreturn__)); + void + __throw_bad_cast(void) __attribute__((__noreturn__)); + void + __throw_bad_typeid(void) __attribute__((__noreturn__)); + void + __throw_logic_error(const char*) __attribute__((__noreturn__)); + void + __throw_domain_error(const char*) __attribute__((__noreturn__)); + void + __throw_invalid_argument(const char*) __attribute__((__noreturn__)); + void + __throw_length_error(const char*) __attribute__((__noreturn__)); + void + __throw_out_of_range(const char*) __attribute__((__noreturn__)); + void + __throw_runtime_error(const char*) __attribute__((__noreturn__)); + void + __throw_range_error(const char*) __attribute__((__noreturn__)); + void + __throw_overflow_error(const char*) __attribute__((__noreturn__)); + void + __throw_underflow_error(const char*) __attribute__((__noreturn__)); + void + __throw_ios_failure(const char*) __attribute__((__noreturn__)); + void + __throw_system_error(int) __attribute__((__noreturn__)); + void + __throw_future_error(int) __attribute__((__noreturn__)); + void + __throw_bad_function_call() __attribute__((__noreturn__)); +} +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) +{ + template + class __normal_iterator; +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + struct __true_type { }; + struct __false_type { }; + template + struct __truth_type + { typedef __false_type __type; }; + template<> + struct __truth_type + { typedef __true_type __type; }; + template + struct __traitor + { + enum { __value = bool(_Sp::__value) || bool(_Tp::__value) }; + typedef typename __truth_type<__value>::__type __type; + }; + template + struct __are_same + { + enum { __value = 0 }; + typedef __false_type __type; + }; + template + struct __are_same<_Tp, _Tp> + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template + struct __is_void + { + enum { __value = 0 }; + typedef __false_type __type; + }; + template<> + struct __is_void + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template + struct __is_integer + { + enum { __value = 0 }; + typedef __false_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_integer + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template + struct __is_floating + { + enum { __value = 0 }; + typedef __false_type __type; + }; + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_floating + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template + struct __is_pointer + { + enum { __value = 0 }; + typedef __false_type __type; + }; + template + struct __is_pointer<_Tp*> + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template + struct __is_normal_iterator + { + enum { __value = 0 }; + typedef __false_type __type; + }; + template + struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator, + _Container> > + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template + struct __is_arithmetic + : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > + { }; + template + struct __is_fundamental + : public __traitor<__is_void<_Tp>, __is_arithmetic<_Tp> > + { }; + template + struct __is_scalar + : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > + { }; + template + struct __is_char + { + enum { __value = 0 }; + typedef __false_type __type; + }; + template<> + struct __is_char + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_char + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template + struct __is_byte + { + enum { __value = 0 }; + typedef __false_type __type; + }; + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template<> + struct __is_byte + { + enum { __value = 1 }; + typedef __true_type __type; + }; + template + struct __is_move_iterator + { + enum { __value = 0 }; + typedef __false_type __type; + }; +} +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) +{ + template + struct __enable_if + { }; + template + struct __enable_if + { typedef _Tp __type; }; + template + struct __conditional_type + { typedef _Iftrue __type; }; + template + struct __conditional_type + { typedef _Iffalse __type; }; + template + struct __add_unsigned + { + private: + typedef __enable_if::__value, _Tp> __if_type; + public: + typedef typename __if_type::__type __type; + }; + template<> + struct __add_unsigned + { typedef unsigned char __type; }; + template<> + struct __add_unsigned + { typedef unsigned char __type; }; + template<> + struct __add_unsigned + { typedef unsigned short __type; }; + template<> + struct __add_unsigned + { typedef unsigned int __type; }; + template<> + struct __add_unsigned + { typedef unsigned long __type; }; + template<> + struct __add_unsigned + { typedef unsigned long long __type; }; + template<> + struct __add_unsigned; + template<> + struct __add_unsigned; + template + struct __remove_unsigned + { + private: + typedef __enable_if::__value, _Tp> __if_type; + public: + typedef typename __if_type::__type __type; + }; + template<> + struct __remove_unsigned + { typedef signed char __type; }; + template<> + struct __remove_unsigned + { typedef signed char __type; }; + template<> + struct __remove_unsigned + { typedef short __type; }; + template<> + struct __remove_unsigned + { typedef int __type; }; + template<> + struct __remove_unsigned + { typedef long __type; }; + template<> + struct __remove_unsigned + { typedef long long __type; }; + template<> + struct __remove_unsigned; + template<> + struct __remove_unsigned; + template + inline bool + __is_null_pointer(_Type* __ptr) + { return __ptr == 0; } + template + inline bool + __is_null_pointer(_Type) + { return false; } + template::__value> + struct __promote + { typedef double __type; }; + template + struct __promote<_Tp, false> + { }; + template<> + struct __promote + { typedef long double __type; }; + template<> + struct __promote + { typedef double __type; }; + template<> + struct __promote + { typedef float __type; }; + template::__type, + typename _Up2 = typename __promote<_Up>::__type> + struct __promote_2 + { + typedef __typeof__(_Tp2() + _Up2()) __type; + }; + template::__type, + typename _Up2 = typename __promote<_Up>::__type, + typename _Vp2 = typename __promote<_Vp>::__type> + struct __promote_3 + { + typedef __typeof__(_Tp2() + _Up2() + _Vp2()) __type; + }; + template::__type, + typename _Up2 = typename __promote<_Up>::__type, + typename _Vp2 = typename __promote<_Vp>::__type, + typename _Wp2 = typename __promote<_Wp>::__type> + struct __promote_4 + { + typedef __typeof__(_Tp2() + _Up2() + _Vp2() + _Wp2()) __type; + }; +} +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) +{ + template + struct __numeric_traits_integer + { + static const _Value __min = (((_Value)(-1) < 0) ? (_Value)1 << (sizeof(_Value) * 8 - ((_Value)(-1) < 0)) : (_Value)0); + static const _Value __max = (((_Value)(-1) < 0) ? (((((_Value)1 << ((sizeof(_Value) * 8 - ((_Value)(-1) < 0)) - 1)) - 1) << 1) + 1) : ~(_Value)0); + static const bool __is_signed = ((_Value)(-1) < 0); + static const int __digits = (sizeof(_Value) * 8 - ((_Value)(-1) < 0)); + }; + template + const _Value __numeric_traits_integer<_Value>::__min; + template + const _Value __numeric_traits_integer<_Value>::__max; + template + const bool __numeric_traits_integer<_Value>::__is_signed; + template + const int __numeric_traits_integer<_Value>::__digits; + template + struct __numeric_traits_floating + { + static const int __max_digits10 = (2 + (std::__are_same<_Value, float>::__value ? 24 : std::__are_same<_Value, double>::__value ? 53 : 106) * 643L / 2136); + static const bool __is_signed = true; + static const int __digits10 = (std::__are_same<_Value, float>::__value ? 6 : std::__are_same<_Value, double>::__value ? 15 : 31); + static const int __max_exponent10 = (std::__are_same<_Value, float>::__value ? 38 : std::__are_same<_Value, double>::__value ? 308 : 308); + }; + template + const int __numeric_traits_floating<_Value>::__max_digits10; + template + const bool __numeric_traits_floating<_Value>::__is_signed; + template + const int __numeric_traits_floating<_Value>::__digits10; + template + const int __numeric_traits_floating<_Value>::__max_exponent10; + template + struct __numeric_traits + : public __conditional_type::__value, + __numeric_traits_integer<_Value>, + __numeric_traits_floating<_Value> >::__type + { }; +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + inline _Tp* + __addressof(_Tp& __r) + { + return reinterpret_cast<_Tp*> + (&const_cast(reinterpret_cast(__r))); + } +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + inline void + swap(_Tp& __a, _Tp& __b) + { + _Tp __tmp = (__a); + __a = (__b); + __b = (__tmp); + } + template + inline void + swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) + { + for (size_t __n = 0; __n < _Nm; ++__n) + swap(__a[__n], __b[__n]); + } +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + struct pair + { + typedef _T1 first_type; + typedef _T2 second_type; + _T1 first; + _T2 second; + pair() + : first(), second() { } + pair(const _T1& __a, const _T2& __b) + : first(__a), second(__b) { } + template + pair(const pair<_U1, _U2>& __p) + : first(__p.first), second(__p.second) { } + }; + template + inline bool + operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __x.first == __y.first && __x.second == __y.second; } + template + inline bool + operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __x.first < __y.first + || (!(__y.first < __x.first) && __x.second < __y.second); } + template + inline bool + operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return __y < __x; } + template + inline bool + operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) + { return !(__x < __y); } + template + inline pair<_T1, _T2> + make_pair(_T1 __x, _T2 __y) + { return pair<_T1, _T2>(__x, __y); } +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + struct input_iterator_tag { }; + struct output_iterator_tag { }; + struct forward_iterator_tag : public input_iterator_tag { }; + struct bidirectional_iterator_tag : public forward_iterator_tag { }; + struct random_access_iterator_tag : public bidirectional_iterator_tag { }; + template + struct iterator + { + typedef _Category iterator_category; + typedef _Tp value_type; + typedef _Distance difference_type; + typedef _Pointer pointer; + typedef _Reference reference; + }; + template + struct iterator_traits + { + typedef typename _Iterator::iterator_category iterator_category; + typedef typename _Iterator::value_type value_type; + typedef typename _Iterator::difference_type difference_type; + typedef typename _Iterator::pointer pointer; + typedef typename _Iterator::reference reference; + }; + template + struct iterator_traits<_Tp*> + { + typedef random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef _Tp& reference; + }; + template + struct iterator_traits + { + typedef random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef ptrdiff_t difference_type; + typedef const _Tp* pointer; + typedef const _Tp& reference; + }; + template + inline typename iterator_traits<_Iter>::iterator_category + __iterator_category(const _Iter&) + { return typename iterator_traits<_Iter>::iterator_category(); } + template + struct _Iter_base + { + typedef _Iterator iterator_type; + static iterator_type _S_base(_Iterator __it) + { return __it; } + }; + template + struct _Iter_base<_Iterator, true> + { + typedef typename _Iterator::iterator_type iterator_type; + static iterator_type _S_base(_Iterator __it) + { return __it.base(); } + }; +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + inline typename iterator_traits<_InputIterator>::difference_type + __distance(_InputIterator __first, _InputIterator __last, + input_iterator_tag) + { + typename iterator_traits<_InputIterator>::difference_type __n = 0; + while (__first != __last) + { + ++__first; + ++__n; + } + return __n; + } + template + inline typename iterator_traits<_RandomAccessIterator>::difference_type + __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, + random_access_iterator_tag) + { + return __last - __first; + } + template + inline typename iterator_traits<_InputIterator>::difference_type + distance(_InputIterator __first, _InputIterator __last) + { + return std::__distance(__first, __last, + std::__iterator_category(__first)); + } + template + inline void + __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) + { + while (__n--) + ++__i; + } + template + inline void + __advance(_BidirectionalIterator& __i, _Distance __n, + bidirectional_iterator_tag) + { + if (__n > 0) + while (__n--) + ++__i; + else + while (__n++) + --__i; + } + template + inline void + __advance(_RandomAccessIterator& __i, _Distance __n, + random_access_iterator_tag) + { + __i += __n; + } + template + inline void + advance(_InputIterator& __i, _Distance __n) + { + typename iterator_traits<_InputIterator>::difference_type __d = __n; + std::__advance(__i, __d, std::__iterator_category(__i)); + } +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + class reverse_iterator + : public iterator::iterator_category, + typename iterator_traits<_Iterator>::value_type, + typename iterator_traits<_Iterator>::difference_type, + typename iterator_traits<_Iterator>::pointer, + typename iterator_traits<_Iterator>::reference> + { + protected: + _Iterator current; + typedef iterator_traits<_Iterator> __traits_type; + public: + typedef _Iterator iterator_type; + typedef typename __traits_type::difference_type difference_type; + typedef typename __traits_type::pointer pointer; + typedef typename __traits_type::reference reference; + reverse_iterator() : current() { } + explicit + reverse_iterator(iterator_type __x) : current(__x) { } + reverse_iterator(const reverse_iterator& __x) + : current(__x.current) { } + template + reverse_iterator(const reverse_iterator<_Iter>& __x) + : current(__x.base()) { } + iterator_type + base() const + { return current; } + reference + operator*() const + { + _Iterator __tmp = current; + return *--__tmp; + } + pointer + operator->() const + { return &(operator*()); } + reverse_iterator& + operator++() + { + --current; + return *this; + } + reverse_iterator + operator++(int) + { + reverse_iterator __tmp = *this; + --current; + return __tmp; + } + reverse_iterator& + operator--() + { + ++current; + return *this; + } + reverse_iterator + operator--(int) + { + reverse_iterator __tmp = *this; + ++current; + return __tmp; + } + reverse_iterator + operator+(difference_type __n) const + { return reverse_iterator(current - __n); } + reverse_iterator& + operator+=(difference_type __n) + { + current -= __n; + return *this; + } + reverse_iterator + operator-(difference_type __n) const + { return reverse_iterator(current + __n); } + reverse_iterator& + operator-=(difference_type __n) + { + current += __n; + return *this; + } + reference + operator[](difference_type __n) const + { return *(*this + __n); } + }; + template + inline bool + operator==(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return __x.base() == __y.base(); } + template + inline bool + operator<(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return __y.base() < __x.base(); } + template + inline bool + operator!=(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return __y < __x; } + template + inline bool + operator<=(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return !(__x < __y); } + template + inline typename reverse_iterator<_Iterator>::difference_type + operator-(const reverse_iterator<_Iterator>& __x, + const reverse_iterator<_Iterator>& __y) + { return __y.base() - __x.base(); } + template + inline reverse_iterator<_Iterator> + operator+(typename reverse_iterator<_Iterator>::difference_type __n, + const reverse_iterator<_Iterator>& __x) + { return reverse_iterator<_Iterator>(__x.base() - __n); } + template + inline bool + operator==(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __x.base() == __y.base(); } + template + inline bool + operator<(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __y.base() < __x.base(); } + template + inline bool + operator!=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __y < __x; } + template + inline bool + operator<=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return !(__x < __y); } + template + inline typename reverse_iterator<_IteratorL>::difference_type + operator-(const reverse_iterator<_IteratorL>& __x, + const reverse_iterator<_IteratorR>& __y) + { return __y.base() - __x.base(); } + template + class back_insert_iterator + : public iterator + { + protected: + _Container* container; + public: + typedef _Container container_type; + explicit + back_insert_iterator(_Container& __x) : container(&__x) { } + back_insert_iterator& + operator=(typename _Container::const_reference __value) + { + container->push_back(__value); + return *this; + } + back_insert_iterator& + operator*() + { return *this; } + back_insert_iterator& + operator++() + { return *this; } + back_insert_iterator + operator++(int) + { return *this; } + }; + template + inline back_insert_iterator<_Container> + back_inserter(_Container& __x) + { return back_insert_iterator<_Container>(__x); } + template + class front_insert_iterator + : public iterator + { + protected: + _Container* container; + public: + typedef _Container container_type; + explicit front_insert_iterator(_Container& __x) : container(&__x) { } + front_insert_iterator& + operator=(typename _Container::const_reference __value) + { + container->push_front(__value); + return *this; + } + front_insert_iterator& + operator*() + { return *this; } + front_insert_iterator& + operator++() + { return *this; } + front_insert_iterator + operator++(int) + { return *this; } + }; + template + inline front_insert_iterator<_Container> + front_inserter(_Container& __x) + { return front_insert_iterator<_Container>(__x); } + template + class insert_iterator + : public iterator + { + protected: + _Container* container; + typename _Container::iterator iter; + public: + typedef _Container container_type; + insert_iterator(_Container& __x, typename _Container::iterator __i) + : container(&__x), iter(__i) {} + insert_iterator& + operator=(typename _Container::const_reference __value) + { + iter = container->insert(iter, __value); + ++iter; + return *this; + } + insert_iterator& + operator*() + { return *this; } + insert_iterator& + operator++() + { return *this; } + insert_iterator& + operator++(int) + { return *this; } + }; + template + inline insert_iterator<_Container> + inserter(_Container& __x, _Iterator __i) + { + return insert_iterator<_Container>(__x, + typename _Container::iterator(__i)); + } +} +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) +{ + using std::iterator_traits; + using std::iterator; + template + class __normal_iterator + { + protected: + _Iterator _M_current; + typedef iterator_traits<_Iterator> __traits_type; + public: + typedef _Iterator iterator_type; + typedef typename __traits_type::iterator_category iterator_category; + typedef typename __traits_type::value_type value_type; + typedef typename __traits_type::difference_type difference_type; + typedef typename __traits_type::reference reference; + typedef typename __traits_type::pointer pointer; + __normal_iterator() : _M_current(_Iterator()) { } + explicit + __normal_iterator(const _Iterator& __i) : _M_current(__i) { } + template + __normal_iterator(const __normal_iterator<_Iter, + typename __enable_if< + (std::__are_same<_Iter, typename _Container::pointer>::__value), + _Container>::__type>& __i) + : _M_current(__i.base()) { } + reference + operator*() const + { return *_M_current; } + pointer + operator->() const + { return _M_current; } + __normal_iterator& + operator++() + { + ++_M_current; + return *this; + } + __normal_iterator + operator++(int) + { return __normal_iterator(_M_current++); } + __normal_iterator& + operator--() + { + --_M_current; + return *this; + } + __normal_iterator + operator--(int) + { return __normal_iterator(_M_current--); } + reference + operator[](const difference_type& __n) const + { return _M_current[__n]; } + __normal_iterator& + operator+=(const difference_type& __n) + { _M_current += __n; return *this; } + __normal_iterator + operator+(const difference_type& __n) const + { return __normal_iterator(_M_current + __n); } + __normal_iterator& + operator-=(const difference_type& __n) + { _M_current -= __n; return *this; } + __normal_iterator + operator-(const difference_type& __n) const + { return __normal_iterator(_M_current - __n); } + const _Iterator& + base() const + { return _M_current; } + }; + template + inline bool + operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() == __rhs.base(); } + template + inline bool + operator==(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() == __rhs.base(); } + template + inline bool + operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() != __rhs.base(); } + template + inline bool + operator!=(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() != __rhs.base(); } + template + inline bool + operator<(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() < __rhs.base(); } + template + inline bool + operator<(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() < __rhs.base(); } + template + inline bool + operator>(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() > __rhs.base(); } + template + inline bool + operator>(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() > __rhs.base(); } + template + inline bool + operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() <= __rhs.base(); } + template + inline bool + operator<=(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() <= __rhs.base(); } + template + inline bool + operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() >= __rhs.base(); } + template + inline bool + operator>=(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() >= __rhs.base(); } + template + inline typename __normal_iterator<_IteratorL, _Container>::difference_type + operator-(const __normal_iterator<_IteratorL, _Container>& __lhs, + const __normal_iterator<_IteratorR, _Container>& __rhs) + { return __lhs.base() - __rhs.base(); } + template + inline typename __normal_iterator<_Iterator, _Container>::difference_type + operator-(const __normal_iterator<_Iterator, _Container>& __lhs, + const __normal_iterator<_Iterator, _Container>& __rhs) + { return __lhs.base() - __rhs.base(); } + template + inline __normal_iterator<_Iterator, _Container> + operator+(typename __normal_iterator<_Iterator, _Container>::difference_type + __n, const __normal_iterator<_Iterator, _Container>& __i) + { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); } +} +namespace std +{ + namespace __debug { } +} +namespace __gnu_debug +{ + using namespace std::__debug; +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + struct __iter_swap + { + template + static void + iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) + { + typedef typename iterator_traits<_ForwardIterator1>::value_type + _ValueType1; + _ValueType1 __tmp = (*__a); + *__a = (*__b); + *__b = (__tmp); + } + }; + template<> + struct __iter_swap + { + template + static void + iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) + { + swap(*__a, *__b); + } + }; + template + inline void + iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) + { + typedef typename iterator_traits<_ForwardIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_ForwardIterator2>::value_type + _ValueType2; + typedef typename iterator_traits<_ForwardIterator1>::reference + _ReferenceType1; + typedef typename iterator_traits<_ForwardIterator2>::reference + _ReferenceType2; + std::__iter_swap<__are_same<_ValueType1, _ValueType2>::__value + && __are_same<_ValueType1&, _ReferenceType1>::__value + && __are_same<_ValueType2&, _ReferenceType2>::__value>:: + iter_swap(__a, __b); + } + template + _ForwardIterator2 + swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2) + { + ; + for (; __first1 != __last1; ++__first1, ++__first2) + std::iter_swap(__first1, __first2); + return __first2; + } + template + inline const _Tp& + min(const _Tp& __a, const _Tp& __b) + { + if (__b < __a) + return __b; + return __a; + } + template + inline const _Tp& + max(const _Tp& __a, const _Tp& __b) + { + if (__a < __b) + return __b; + return __a; + } + template + inline const _Tp& + min(const _Tp& __a, const _Tp& __b, _Compare __comp) + { + if (__comp(__b, __a)) + return __b; + return __a; + } + template + inline const _Tp& + max(const _Tp& __a, const _Tp& __b, _Compare __comp) + { + if (__comp(__a, __b)) + return __b; + return __a; + } + template + struct _Niter_base + : _Iter_base<_Iterator, __is_normal_iterator<_Iterator>::__value> + { }; + template + inline typename _Niter_base<_Iterator>::iterator_type + __niter_base(_Iterator __it) + { return std::_Niter_base<_Iterator>::_S_base(__it); } + template + struct _Miter_base + : _Iter_base<_Iterator, __is_move_iterator<_Iterator>::__value> + { }; + template + inline typename _Miter_base<_Iterator>::iterator_type + __miter_base(_Iterator __it) + { return std::_Miter_base<_Iterator>::_S_base(__it); } + template + struct __copy_move + { + template + static _OI + __copy_m(_II __first, _II __last, _OI __result) + { + for (; __first != __last; ++__result, ++__first) + *__result = *__first; + return __result; + } + }; + template<> + struct __copy_move + { + template + static _OI + __copy_m(_II __first, _II __last, _OI __result) + { + typedef typename iterator_traits<_II>::difference_type _Distance; + for(_Distance __n = __last - __first; __n > 0; --__n) + { + *__result = *__first; + ++__first; + ++__result; + } + return __result; + } + }; + template + struct __copy_move<_IsMove, true, random_access_iterator_tag> + { + template + static _Tp* + __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result) + { + const ptrdiff_t _Num = __last - __first; + if (_Num) + __builtin_memmove(__result, __first, sizeof(_Tp) * _Num); + return __result + _Num; + } + }; + template + inline _OI + __copy_move_a(_II __first, _II __last, _OI __result) + { + typedef typename iterator_traits<_II>::value_type _ValueTypeI; + typedef typename iterator_traits<_OI>::value_type _ValueTypeO; + typedef typename iterator_traits<_II>::iterator_category _Category; + const bool __simple = (__is_trivial(_ValueTypeI) + && __is_pointer<_II>::__value + && __is_pointer<_OI>::__value + && __are_same<_ValueTypeI, _ValueTypeO>::__value); + return std::__copy_move<_IsMove, __simple, + _Category>::__copy_m(__first, __last, __result); + } + template + struct char_traits; + template + class istreambuf_iterator; + template + class ostreambuf_iterator; + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type + __copy_move_a2(_CharT*, _CharT*, + ostreambuf_iterator<_CharT, char_traits<_CharT> >); + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT, char_traits<_CharT> > >::__type + __copy_move_a2(const _CharT*, const _CharT*, + ostreambuf_iterator<_CharT, char_traits<_CharT> >); + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + _CharT*>::__type + __copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >, + istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*); + template + inline _OI + __copy_move_a2(_II __first, _II __last, _OI __result) + { + return _OI(std::__copy_move_a<_IsMove>(std::__niter_base(__first), + std::__niter_base(__last), + std::__niter_base(__result))); + } + template + inline _OI + copy(_II __first, _II __last, _OI __result) + { + ; + return (std::__copy_move_a2<__is_move_iterator<_II>::__value> + (std::__miter_base(__first), std::__miter_base(__last), + __result)); + } + template + struct __copy_move_backward + { + template + static _BI2 + __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) + { + while (__first != __last) + *--__result = *--__last; + return __result; + } + }; + template<> + struct __copy_move_backward + { + template + static _BI2 + __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) + { + typename iterator_traits<_BI1>::difference_type __n; + for (__n = __last - __first; __n > 0; --__n) + *--__result = *--__last; + return __result; + } + }; + template + struct __copy_move_backward<_IsMove, true, random_access_iterator_tag> + { + template + static _Tp* + __copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result) + { + const ptrdiff_t _Num = __last - __first; + if (_Num) + __builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num); + return __result - _Num; + } + }; + template + inline _BI2 + __copy_move_backward_a(_BI1 __first, _BI1 __last, _BI2 __result) + { + typedef typename iterator_traits<_BI1>::value_type _ValueType1; + typedef typename iterator_traits<_BI2>::value_type _ValueType2; + typedef typename iterator_traits<_BI1>::iterator_category _Category; + const bool __simple = (__is_trivial(_ValueType1) + && __is_pointer<_BI1>::__value + && __is_pointer<_BI2>::__value + && __are_same<_ValueType1, _ValueType2>::__value); + return std::__copy_move_backward<_IsMove, __simple, + _Category>::__copy_move_b(__first, + __last, + __result); + } + template + inline _BI2 + __copy_move_backward_a2(_BI1 __first, _BI1 __last, _BI2 __result) + { + return _BI2(std::__copy_move_backward_a<_IsMove> + (std::__niter_base(__first), std::__niter_base(__last), + std::__niter_base(__result))); + } + template + inline _BI2 + copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) + { + ; + return (std::__copy_move_backward_a2<__is_move_iterator<_BI1>::__value> + (std::__miter_base(__first), std::__miter_base(__last), + __result)); + } + template + inline typename + __gnu_cxx::__enable_if::__value, void>::__type + __fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __value) + { + for (; __first != __last; ++__first) + *__first = __value; + } + template + inline typename + __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type + __fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __value) + { + const _Tp __tmp = __value; + for (; __first != __last; ++__first) + *__first = __tmp; + } + template + inline typename + __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, void>::__type + __fill_a(_Tp* __first, _Tp* __last, const _Tp& __c) + { + const _Tp __tmp = __c; + __builtin_memset(__first, static_cast(__tmp), + __last - __first); + } + template + inline void + fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) + { + ; + std::__fill_a(std::__niter_base(__first), std::__niter_base(__last), + __value); + } + template + inline typename + __gnu_cxx::__enable_if::__value, _OutputIterator>::__type + __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) + { + for (__decltype(__n + 0) __niter = __n; + __niter > 0; --__niter, ++__first) + *__first = __value; + return __first; + } + template + inline typename + __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, _OutputIterator>::__type + __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) + { + const _Tp __tmp = __value; + for (__decltype(__n + 0) __niter = __n; + __niter > 0; --__niter, ++__first) + *__first = __tmp; + return __first; + } + template + inline typename + __gnu_cxx::__enable_if<__is_byte<_Tp>::__value, _Tp*>::__type + __fill_n_a(_Tp* __first, _Size __n, const _Tp& __c) + { + std::__fill_a(__first, __first + __n, __c); + return __first + __n; + } + template + inline _OI + fill_n(_OI __first, _Size __n, const _Tp& __value) + { + return _OI(std::__fill_n_a(std::__niter_base(__first), __n, __value)); + } + template + struct __equal + { + template + static bool + equal(_II1 __first1, _II1 __last1, _II2 __first2) + { + for (; __first1 != __last1; ++__first1, ++__first2) + if (!(*__first1 == *__first2)) + return false; + return true; + } + }; + template<> + struct __equal + { + template + static bool + equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2) + { + return !__builtin_memcmp(__first1, __first2, sizeof(_Tp) + * (__last1 - __first1)); + } + }; + template + inline bool + __equal_aux(_II1 __first1, _II1 __last1, _II2 __first2) + { + typedef typename iterator_traits<_II1>::value_type _ValueType1; + typedef typename iterator_traits<_II2>::value_type _ValueType2; + const bool __simple = (__is_integer<_ValueType1>::__value + && __is_pointer<_II1>::__value + && __is_pointer<_II2>::__value + && __are_same<_ValueType1, _ValueType2>::__value); + return std::__equal<__simple>::equal(__first1, __last1, __first2); + } + template + struct __lc_rai + { + template + static _II1 + __newlast1(_II1, _II1 __last1, _II2, _II2) + { return __last1; } + template + static bool + __cnd2(_II __first, _II __last) + { return __first != __last; } + }; + template<> + struct __lc_rai + { + template + static _RAI1 + __newlast1(_RAI1 __first1, _RAI1 __last1, + _RAI2 __first2, _RAI2 __last2) + { + const typename iterator_traits<_RAI1>::difference_type + __diff1 = __last1 - __first1; + const typename iterator_traits<_RAI2>::difference_type + __diff2 = __last2 - __first2; + return __diff2 < __diff1 ? __first1 + __diff2 : __last1; + } + template + static bool + __cnd2(_RAI, _RAI) + { return true; } + }; + template + struct __lexicographical_compare + { + template + static bool __lc(_II1, _II1, _II2, _II2); + }; + template + template + bool + __lexicographical_compare<_BoolType>:: + __lc(_II1 __first1, _II1 __last1, _II2 __first2, _II2 __last2) + { + typedef typename iterator_traits<_II1>::iterator_category _Category1; + typedef typename iterator_traits<_II2>::iterator_category _Category2; + typedef std::__lc_rai<_Category1, _Category2> __rai_type; + __last1 = __rai_type::__newlast1(__first1, __last1, + __first2, __last2); + for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); + ++__first1, ++__first2) + { + if (*__first1 < *__first2) + return true; + if (*__first2 < *__first1) + return false; + } + return __first1 == __last1 && __first2 != __last2; + } + template<> + struct __lexicographical_compare + { + template + static bool + __lc(const _Tp* __first1, const _Tp* __last1, + const _Up* __first2, const _Up* __last2) + { + const size_t __len1 = __last1 - __first1; + const size_t __len2 = __last2 - __first2; + const int __result = __builtin_memcmp(__first1, __first2, + std::min(__len1, __len2)); + return __result != 0 ? __result < 0 : __len1 < __len2; + } + }; + template + inline bool + __lexicographical_compare_aux(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2) + { + typedef typename iterator_traits<_II1>::value_type _ValueType1; + typedef typename iterator_traits<_II2>::value_type _ValueType2; + const bool __simple = + (__is_byte<_ValueType1>::__value && __is_byte<_ValueType2>::__value + && !__gnu_cxx::__numeric_traits<_ValueType1>::__is_signed + && !__gnu_cxx::__numeric_traits<_ValueType2>::__is_signed + && __is_pointer<_II1>::__value + && __is_pointer<_II2>::__value); + return std::__lexicographical_compare<__simple>::__lc(__first1, __last1, + __first2, __last2); + } + template + _ForwardIterator + lower_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + ; + _DistanceType __len = std::distance(__first, __last); + while (__len > 0) + { + _DistanceType __half = __len >> 1; + _ForwardIterator __middle = __first; + std::advance(__middle, __half); + if (*__middle < __val) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else + __len = __half; + } + return __first; + } + template + inline _Size + __lg(_Size __n) + { + _Size __k; + for (__k = 0; __n != 0; __n >>= 1) + ++__k; + return __k - 1; + } + inline int + __lg(int __n) + { return sizeof(int) * 8 - 1 - __builtin_clz(__n); } + inline long + __lg(long __n) + { return sizeof(long) * 8 - 1 - __builtin_clzl(__n); } + inline long long + __lg(long long __n) + { return sizeof(long long) * 8 - 1 - __builtin_clzll(__n); } + template + inline bool + equal(_II1 __first1, _II1 __last1, _II2 __first2) + { + ; + return std::__equal_aux(std::__niter_base(__first1), + std::__niter_base(__last1), + std::__niter_base(__first2)); + } + template + inline bool + equal(_IIter1 __first1, _IIter1 __last1, + _IIter2 __first2, _BinaryPredicate __binary_pred) + { + ; + for (; __first1 != __last1; ++__first1, ++__first2) + if (!bool(__binary_pred(*__first1, *__first2))) + return false; + return true; + } + template + inline bool + lexicographical_compare(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2) + { + typedef typename iterator_traits<_II1>::value_type _ValueType1; + typedef typename iterator_traits<_II2>::value_type _ValueType2; + ; + ; + return std::__lexicographical_compare_aux(std::__niter_base(__first1), + std::__niter_base(__last1), + std::__niter_base(__first2), + std::__niter_base(__last2)); + } + template + bool + lexicographical_compare(_II1 __first1, _II1 __last1, + _II2 __first2, _II2 __last2, _Compare __comp) + { + typedef typename iterator_traits<_II1>::iterator_category _Category1; + typedef typename iterator_traits<_II2>::iterator_category _Category2; + typedef std::__lc_rai<_Category1, _Category2> __rai_type; + ; + ; + __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2); + for (; __first1 != __last1 && __rai_type::__cnd2(__first2, __last2); + ++__first1, ++__first2) + { + if (__comp(*__first1, *__first2)) + return true; + if (__comp(*__first2, *__first1)) + return false; + } + return __first1 == __last1 && __first2 != __last2; + } + template + pair<_InputIterator1, _InputIterator2> + mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2) + { + ; + while (__first1 != __last1 && *__first1 == *__first2) + { + ++__first1; + ++__first2; + } + return pair<_InputIterator1, _InputIterator2>(__first1, __first2); + } + template + pair<_InputIterator1, _InputIterator2> + mismatch(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _BinaryPredicate __binary_pred) + { + ; + while (__first1 != __last1 && bool(__binary_pred(*__first1, *__first2))) + { + ++__first1; + ++__first2; + } + return pair<_InputIterator1, _InputIterator2>(__first1, __first2); + } +} +struct _IO_FILE; +typedef struct _IO_FILE FILE; +typedef struct _IO_FILE __FILE; +typedef __builtin_va_list __gnuc_va_list; +typedef long unsigned int size_t; +typedef unsigned int wint_t; +typedef struct +{ + int __count; + union + { + unsigned int __wch; + char __wchb[4]; + } __value; +} __mbstate_t; +typedef __mbstate_t mbstate_t; +extern "C" { +struct tm; +extern wchar_t *wcscpy (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src) throw (); +extern wchar_t *wcsncpy (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n) + throw (); +extern wchar_t *wcscat (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src) throw (); +extern wchar_t *wcsncat (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n) + throw (); +extern int wcscmp (__const wchar_t *__s1, __const wchar_t *__s2) + throw () __attribute__ ((__pure__)); +extern int wcsncmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) + throw () __attribute__ ((__pure__)); +extern int wcscasecmp (__const wchar_t *__s1, __const wchar_t *__s2) throw (); +extern int wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2, + size_t __n) throw (); +typedef struct __locale_struct +{ + struct __locale_data *__locales[13]; + const unsigned short int *__ctype_b; + const int *__ctype_tolower; + const int *__ctype_toupper; + const char *__names[13]; +} *__locale_t; +typedef __locale_t locale_t; +extern int wcscasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, + __locale_t __loc) throw (); +extern int wcsncasecmp_l (__const wchar_t *__s1, __const wchar_t *__s2, + size_t __n, __locale_t __loc) throw (); +extern int wcscoll (__const wchar_t *__s1, __const wchar_t *__s2) throw (); +extern size_t wcsxfrm (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) throw (); +extern int wcscoll_l (__const wchar_t *__s1, __const wchar_t *__s2, + __locale_t __loc) throw (); +extern size_t wcsxfrm_l (wchar_t *__s1, __const wchar_t *__s2, + size_t __n, __locale_t __loc) throw (); +extern wchar_t *wcsdup (__const wchar_t *__s) throw () __attribute__ ((__malloc__)); +extern "C++" wchar_t *wcschr (wchar_t *__wcs, wchar_t __wc) + throw () __asm ("wcschr") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcschr (__const wchar_t *__wcs, wchar_t __wc) + throw () __asm ("wcschr") __attribute__ ((__pure__)); +extern "C++" wchar_t *wcsrchr (wchar_t *__wcs, wchar_t __wc) + throw () __asm ("wcsrchr") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcsrchr (__const wchar_t *__wcs, wchar_t __wc) + throw () __asm ("wcsrchr") __attribute__ ((__pure__)); +extern wchar_t *wcschrnul (__const wchar_t *__s, wchar_t __wc) + throw () __attribute__ ((__pure__)); +extern size_t wcscspn (__const wchar_t *__wcs, __const wchar_t *__reject) + throw () __attribute__ ((__pure__)); +extern size_t wcsspn (__const wchar_t *__wcs, __const wchar_t *__accept) + throw () __attribute__ ((__pure__)); +extern "C++" wchar_t *wcspbrk (wchar_t *__wcs, __const wchar_t *__accept) + throw () __asm ("wcspbrk") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcspbrk (__const wchar_t *__wcs, + __const wchar_t *__accept) + throw () __asm ("wcspbrk") __attribute__ ((__pure__)); +extern "C++" wchar_t *wcsstr (wchar_t *__haystack, __const wchar_t *__needle) + throw () __asm ("wcsstr") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcsstr (__const wchar_t *__haystack, + __const wchar_t *__needle) + throw () __asm ("wcsstr") __attribute__ ((__pure__)); +extern wchar_t *wcstok (wchar_t *__restrict __s, + __const wchar_t *__restrict __delim, + wchar_t **__restrict __ptr) throw (); +extern size_t wcslen (__const wchar_t *__s) throw () __attribute__ ((__pure__)); +extern "C++" wchar_t *wcswcs (wchar_t *__haystack, __const wchar_t *__needle) + throw () __asm ("wcswcs") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wcswcs (__const wchar_t *__haystack, + __const wchar_t *__needle) + throw () __asm ("wcswcs") __attribute__ ((__pure__)); +extern size_t wcsnlen (__const wchar_t *__s, size_t __maxlen) + throw () __attribute__ ((__pure__)); +extern "C++" wchar_t *wmemchr (wchar_t *__s, wchar_t __c, size_t __n) + throw () __asm ("wmemchr") __attribute__ ((__pure__)); +extern "C++" __const wchar_t *wmemchr (__const wchar_t *__s, wchar_t __c, + size_t __n) + throw () __asm ("wmemchr") __attribute__ ((__pure__)); +extern int wmemcmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) + throw () __attribute__ ((__pure__)); +extern wchar_t *wmemcpy (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) throw (); +extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n) + throw (); +extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw (); +extern wchar_t *wmempcpy (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n) + throw (); +extern wint_t btowc (int __c) throw (); +extern int wctob (wint_t __c) throw (); +extern int mbsinit (__const mbstate_t *__ps) throw () __attribute__ ((__pure__)); +extern size_t mbrtowc (wchar_t *__restrict __pwc, + __const char *__restrict __s, size_t __n, + mbstate_t *__p) throw (); +extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, + mbstate_t *__restrict __ps) throw (); +extern size_t __mbrlen (__const char *__restrict __s, size_t __n, + mbstate_t *__restrict __ps) throw (); +extern size_t mbrlen (__const char *__restrict __s, size_t __n, + mbstate_t *__restrict __ps) throw (); +extern wint_t __btowc_alias (int __c) __asm ("btowc"); +extern __inline __attribute__ ((__gnu_inline__)) wint_t +__attribute__ ((__leaf__)) btowc (int __c) throw () +{ return (__builtin_constant_p (__c) && __c >= '\0' && __c <= '\x7f' + ? (wint_t) __c : __btowc_alias (__c)); } +extern int __wctob_alias (wint_t __c) __asm ("wctob"); +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__leaf__)) wctob (wint_t __wc) throw () +{ return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f' + ? (int) __wc : __wctob_alias (__wc)); } +extern __inline __attribute__ ((__gnu_inline__)) size_t +__attribute__ ((__leaf__)) mbrlen (__const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) throw () +{ return (__ps != __null + ? mbrtowc (__null, __s, __n, __ps) : __mbrlen (__s, __n, __null)); } +extern size_t mbsrtowcs (wchar_t *__restrict __dst, + __const char **__restrict __src, size_t __len, + mbstate_t *__restrict __ps) throw (); +extern size_t wcsrtombs (char *__restrict __dst, + __const wchar_t **__restrict __src, size_t __len, + mbstate_t *__restrict __ps) throw (); +extern size_t mbsnrtowcs (wchar_t *__restrict __dst, + __const char **__restrict __src, size_t __nmc, + size_t __len, mbstate_t *__restrict __ps) throw (); +extern size_t wcsnrtombs (char *__restrict __dst, + __const wchar_t **__restrict __src, + size_t __nwc, size_t __len, + mbstate_t *__restrict __ps) throw (); +extern int wcwidth (wchar_t __c) throw (); +extern int wcswidth (__const wchar_t *__s, size_t __n) throw (); +extern double wcstod (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) throw (); +extern float wcstof (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) throw (); +extern long double wcstold (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr) throw (); +extern long int wcstol (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) throw (); +extern unsigned long int wcstoul (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + throw (); +__extension__ +extern long long int wcstoll (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + throw (); +__extension__ +extern unsigned long long int wcstoull (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base) throw (); +__extension__ +extern long long int wcstoq (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base) + throw (); +__extension__ +extern unsigned long long int wcstouq (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base) throw (); +extern long int wcstol_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, int __base, + __locale_t __loc) throw (); +extern unsigned long int wcstoul_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, __locale_t __loc) throw (); +__extension__ +extern long long int wcstoll_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, __locale_t __loc) throw (); +__extension__ +extern unsigned long long int wcstoull_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + int __base, __locale_t __loc) + throw (); +extern double wcstod_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, __locale_t __loc) + throw (); +extern float wcstof_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, __locale_t __loc) + throw (); +extern long double wcstold_l (__const wchar_t *__restrict __nptr, + wchar_t **__restrict __endptr, + __locale_t __loc) throw (); +extern wchar_t *wcpcpy (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src) throw (); +extern wchar_t *wcpncpy (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n) + throw (); +extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) throw (); +extern int fwide (__FILE *__fp, int __mode) throw (); +extern int fwprintf (__FILE *__restrict __stream, + __const wchar_t *__restrict __format, ...) + ; +extern int wprintf (__const wchar_t *__restrict __format, ...) + ; +extern int swprintf (wchar_t *__restrict __s, size_t __n, + __const wchar_t *__restrict __format, ...) + throw () ; +extern int vfwprintf (__FILE *__restrict __s, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; +extern int vwprintf (__const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; +extern int vswprintf (wchar_t *__restrict __s, size_t __n, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + throw () ; +extern int fwscanf (__FILE *__restrict __stream, + __const wchar_t *__restrict __format, ...) + ; +extern int wscanf (__const wchar_t *__restrict __format, ...) + ; +extern int swscanf (__const wchar_t *__restrict __s, + __const wchar_t *__restrict __format, ...) + throw () ; +extern int vfwscanf (__FILE *__restrict __s, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; +extern int vwscanf (__const wchar_t *__restrict __format, + __gnuc_va_list __arg) + ; +extern int vswscanf (__const wchar_t *__restrict __s, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + throw () ; +extern wint_t fgetwc (__FILE *__stream); +extern wint_t getwc (__FILE *__stream); +extern wint_t getwchar (void); +extern wint_t fputwc (wchar_t __wc, __FILE *__stream); +extern wint_t putwc (wchar_t __wc, __FILE *__stream); +extern wint_t putwchar (wchar_t __wc); +extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n, + __FILE *__restrict __stream); +extern int fputws (__const wchar_t *__restrict __ws, + __FILE *__restrict __stream); +extern wint_t ungetwc (wint_t __wc, __FILE *__stream); +extern wint_t getwc_unlocked (__FILE *__stream); +extern wint_t getwchar_unlocked (void); +extern wint_t fgetwc_unlocked (__FILE *__stream); +extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream); +extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream); +extern wint_t putwchar_unlocked (wchar_t __wc); +extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n, + __FILE *__restrict __stream); +extern int fputws_unlocked (__const wchar_t *__restrict __ws, + __FILE *__restrict __stream); +extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize, + __const wchar_t *__restrict __format, + __const struct tm *__restrict __tp) throw (); +extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, + __const wchar_t *__restrict __format, + __const struct tm *__restrict __tp, + __locale_t __loc) throw (); +extern wchar_t *__wmemcpy_chk (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n, + size_t __ns1) throw (); +extern wchar_t *__wmemcpy_alias (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () __asm__ ("" "wmemcpy") + ; +extern wchar_t *__wmemcpy_chk_warn (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmemcpy_chk") + __attribute__((__warning__ ("wmemcpy called with length bigger than size of destination " "buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +__attribute__ ((__leaf__)) wmemcpy (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () +{ + if (__builtin_object_size (__s1, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wmemcpy_chk (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t)) + return __wmemcpy_chk_warn (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + } + return __wmemcpy_alias (__s1, __s2, __n); +} +extern wchar_t *__wmemmove_chk (wchar_t *__s1, __const wchar_t *__s2, + size_t __n, size_t __ns1) throw (); +extern wchar_t *__wmemmove_alias (wchar_t *__s1, __const wchar_t *__s2, size_t __n) throw () __asm__ ("" "wmemmove") + ; +extern wchar_t *__wmemmove_chk_warn (wchar_t *__s1, __const wchar_t *__s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmemmove_chk") + __attribute__((__warning__ ("wmemmove called with length bigger than size of destination " "buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +__attribute__ ((__leaf__)) wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n) throw () +{ + if (__builtin_object_size (__s1, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wmemmove_chk (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t)) + return __wmemmove_chk_warn (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + } + return __wmemmove_alias (__s1, __s2, __n); +} +extern wchar_t *__wmempcpy_chk (wchar_t *__restrict __s1, + __const wchar_t *__restrict __s2, size_t __n, + size_t __ns1) throw (); +extern wchar_t *__wmempcpy_alias (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () __asm__ ("" "wmempcpy") + ; +extern wchar_t *__wmempcpy_chk_warn (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n, size_t __ns1) throw () __asm__ ("" "__wmempcpy_chk") + __attribute__((__warning__ ("wmempcpy called with length bigger than size of destination " "buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +__attribute__ ((__leaf__)) wmempcpy (wchar_t *__restrict __s1, __const wchar_t *__restrict __s2, size_t __n) throw () +{ + if (__builtin_object_size (__s1, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wmempcpy_chk (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + if (__n > __builtin_object_size (__s1, 0) / sizeof (wchar_t)) + return __wmempcpy_chk_warn (__s1, __s2, __n, + __builtin_object_size (__s1, 0) / sizeof (wchar_t)); + } + return __wmempcpy_alias (__s1, __s2, __n); +} +extern wchar_t *__wmemset_chk (wchar_t *__s, wchar_t __c, size_t __n, + size_t __ns) throw (); +extern wchar_t *__wmemset_alias (wchar_t *__s, wchar_t __c, size_t __n) throw () __asm__ ("" "wmemset") + ; +extern wchar_t *__wmemset_chk_warn (wchar_t *__s, wchar_t __c, size_t __n, size_t __ns) throw () __asm__ ("" "__wmemset_chk") + __attribute__((__warning__ ("wmemset called with length bigger than size of destination " "buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +__attribute__ ((__leaf__)) wmemset (wchar_t *__s, wchar_t __c, size_t __n) throw () +{ + if (__builtin_object_size (__s, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wmemset_chk (__s, __c, __n, __builtin_object_size (__s, 0) / sizeof (wchar_t)); + if (__n > __builtin_object_size (__s, 0) / sizeof (wchar_t)) + return __wmemset_chk_warn (__s, __c, __n, + __builtin_object_size (__s, 0) / sizeof (wchar_t)); + } + return __wmemset_alias (__s, __c, __n); +} +extern wchar_t *__wcscpy_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, + size_t __n) throw (); +extern wchar_t *__wcscpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () __asm__ ("" "wcscpy") + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +__attribute__ ((__leaf__)) wcscpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + return __wcscpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + return __wcscpy_alias (__dest, __src); +} +extern wchar_t *__wcpcpy_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, + size_t __destlen) throw (); +extern wchar_t *__wcpcpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () __asm__ ("" "wcpcpy") + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +__attribute__ ((__leaf__)) wcpcpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + return __wcpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + return __wcpcpy_alias (__dest, __src); +} +extern wchar_t *__wcsncpy_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n, + size_t __destlen) throw (); +extern wchar_t *__wcsncpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcsncpy") + ; +extern wchar_t *__wcsncpy_chk_warn (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n, size_t __destlen) throw () __asm__ ("" "__wcsncpy_chk") + __attribute__((__warning__ ("wcsncpy called with length bigger than size of destination " "buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +__attribute__ ((__leaf__)) wcsncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wcsncpy_chk (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + if (__n > __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)) + return __wcsncpy_chk_warn (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + } + return __wcsncpy_alias (__dest, __src, __n); +} +extern wchar_t *__wcpncpy_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, size_t __n, + size_t __destlen) throw (); +extern wchar_t *__wcpncpy_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcpncpy") + ; +extern wchar_t *__wcpncpy_chk_warn (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n, size_t __destlen) throw () __asm__ ("" "__wcpncpy_chk") + __attribute__((__warning__ ("wcpncpy called with length bigger than size of destination " "buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +__attribute__ ((__leaf__)) wcpncpy (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n)) + return __wcpncpy_chk (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + if (__n > __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)) + return __wcpncpy_chk_warn (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + } + return __wcpncpy_alias (__dest, __src, __n); +} +extern wchar_t *__wcscat_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, + size_t __destlen) throw (); +extern wchar_t *__wcscat_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () __asm__ ("" "wcscat") + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +__attribute__ ((__leaf__)) wcscat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + return __wcscat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + return __wcscat_alias (__dest, __src); +} +extern wchar_t *__wcsncat_chk (wchar_t *__restrict __dest, + __const wchar_t *__restrict __src, + size_t __n, size_t __destlen) throw (); +extern wchar_t *__wcsncat_alias (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () __asm__ ("" "wcsncat") + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) wchar_t * +__attribute__ ((__leaf__)) wcsncat (wchar_t *__restrict __dest, __const wchar_t *__restrict __src, size_t __n) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1) + return __wcsncat_chk (__dest, __src, __n, + __builtin_object_size (__dest, 2 > 1) / sizeof (wchar_t)); + return __wcsncat_alias (__dest, __src, __n); +} +extern int __swprintf_chk (wchar_t *__restrict __s, size_t __n, + int __flag, size_t __s_len, + __const wchar_t *__restrict __format, ...) + throw () ; +extern int __swprintf_alias (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, ...) throw () __asm__ ("" "swprintf") + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__leaf__)) swprintf (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, ...) throw () +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 || 2 > 1) + return __swprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __fmt, __builtin_va_arg_pack ()); + return __swprintf_alias (__s, __n, __fmt, __builtin_va_arg_pack ()); +} +extern int __vswprintf_chk (wchar_t *__restrict __s, size_t __n, + int __flag, size_t __s_len, + __const wchar_t *__restrict __format, + __gnuc_va_list __arg) + throw () ; +extern int __vswprintf_alias (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, __gnuc_va_list __ap) throw () __asm__ ("" "vswprintf") + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__leaf__)) vswprintf (wchar_t *__restrict __s, size_t __n, __const wchar_t *__restrict __fmt, __gnuc_va_list __ap) throw () +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 || 2 > 1) + return __vswprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), __fmt, __ap); + return __vswprintf_alias (__s, __n, __fmt, __ap); +} +extern int __fwprintf_chk (__FILE *__restrict __stream, int __flag, + __const wchar_t *__restrict __format, ...); +extern int __wprintf_chk (int __flag, __const wchar_t *__restrict __format, + ...); +extern int __vfwprintf_chk (__FILE *__restrict __stream, int __flag, + __const wchar_t *__restrict __format, + __gnuc_va_list __ap); +extern int __vwprintf_chk (int __flag, __const wchar_t *__restrict __format, + __gnuc_va_list __ap); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +wprintf (__const wchar_t *__restrict __fmt, ...) +{ + return __wprintf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +fwprintf (__FILE *__restrict __stream, __const wchar_t *__restrict __fmt, ...) +{ + return __fwprintf_chk (__stream, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vwprintf (__const wchar_t *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vwprintf_chk (2 - 1, __fmt, __ap); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vfwprintf (__FILE *__restrict __stream, + __const wchar_t *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vfwprintf_chk (__stream, 2 - 1, __fmt, __ap); +} +extern wchar_t *__fgetws_chk (wchar_t *__restrict __s, size_t __size, int __n, + __FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern wchar_t *__fgetws_alias (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) __asm__ ("" "fgetws") + __attribute__ ((__warn_unused_result__)); +extern wchar_t *__fgetws_chk_warn (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __asm__ ("" "__fgetws_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgetws called with bigger size than length " "of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) wchar_t * +fgetws (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgetws_chk (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __n, __stream); + if ((size_t) __n > __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t)) + return __fgetws_chk_warn (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __n, __stream); + } + return __fgetws_alias (__s, __n, __stream); +} +extern wchar_t *__fgetws_unlocked_chk (wchar_t *__restrict __s, size_t __size, + int __n, __FILE *__restrict __stream) + __attribute__ ((__warn_unused_result__)); +extern wchar_t *__fgetws_unlocked_alias (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) __asm__ ("" "fgetws_unlocked") + __attribute__ ((__warn_unused_result__)); +extern wchar_t *__fgetws_unlocked_chk_warn (wchar_t *__restrict __s, size_t __size, int __n, __FILE *__restrict __stream) __asm__ ("" "__fgetws_unlocked_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgetws_unlocked called with bigger size than length " "of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) wchar_t * +fgetws_unlocked (wchar_t *__restrict __s, int __n, __FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgetws_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __n, __stream); + if ((size_t) __n > __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t)) + return __fgetws_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1) / sizeof (wchar_t), + __n, __stream); + } + return __fgetws_unlocked_alias (__s, __n, __stream); +} +extern size_t __wcrtomb_chk (char *__restrict __s, wchar_t __wchar, + mbstate_t *__restrict __p, + size_t __buflen) throw () __attribute__ ((__warn_unused_result__)); +extern size_t __wcrtomb_alias (char *__restrict __s, wchar_t __wchar, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcrtomb") + __attribute__ ((__warn_unused_result__)); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +__attribute__ ((__leaf__)) wcrtomb (char *__restrict __s, wchar_t __wchar, mbstate_t *__restrict __ps) throw () +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) + return __wcrtomb_chk (__s, __wchar, __ps, __builtin_object_size (__s, 2 > 1)); + return __wcrtomb_alias (__s, __wchar, __ps); +} +extern size_t __mbsrtowcs_chk (wchar_t *__restrict __dst, + __const char **__restrict __src, + size_t __len, mbstate_t *__restrict __ps, + size_t __dstlen) throw (); +extern size_t __mbsrtowcs_alias (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "mbsrtowcs") + ; +extern size_t __mbsrtowcs_chk_warn (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__mbsrtowcs_chk") + __attribute__((__warning__ ("mbsrtowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +__attribute__ ((__leaf__)) mbsrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __mbsrtowcs_chk (__dst, __src, __len, __ps, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) + return __mbsrtowcs_chk_warn (__dst, __src, __len, __ps, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + } + return __mbsrtowcs_alias (__dst, __src, __len, __ps); +} +extern size_t __wcsrtombs_chk (char *__restrict __dst, + __const wchar_t **__restrict __src, + size_t __len, mbstate_t *__restrict __ps, + size_t __dstlen) throw (); +extern size_t __wcsrtombs_alias (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcsrtombs") + ; +extern size_t __wcsrtombs_chk_warn (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__wcsrtombs_chk") + __attribute__((__warning__ ("wcsrtombs called with dst buffer smaller than len"))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +__attribute__ ((__leaf__)) wcsrtombs (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) throw () +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __wcsrtombs_chk (__dst, __src, __len, __ps, __builtin_object_size (__dst, 2 > 1)); + if (__len > __builtin_object_size (__dst, 2 > 1)) + return __wcsrtombs_chk_warn (__dst, __src, __len, __ps, __builtin_object_size (__dst, 2 > 1)); + } + return __wcsrtombs_alias (__dst, __src, __len, __ps); +} +extern size_t __mbsnrtowcs_chk (wchar_t *__restrict __dst, + __const char **__restrict __src, size_t __nmc, + size_t __len, mbstate_t *__restrict __ps, + size_t __dstlen) throw (); +extern size_t __mbsnrtowcs_alias (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "mbsnrtowcs") + ; +extern size_t __mbsnrtowcs_chk_warn (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__mbsnrtowcs_chk") + __attribute__((__warning__ ("mbsnrtowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +__attribute__ ((__leaf__)) mbsnrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) throw () +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __mbsnrtowcs_chk (__dst, __src, __nmc, __len, __ps, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) + return __mbsnrtowcs_chk_warn (__dst, __src, __nmc, __len, __ps, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + } + return __mbsnrtowcs_alias (__dst, __src, __nmc, __len, __ps); +} +extern size_t __wcsnrtombs_chk (char *__restrict __dst, + __const wchar_t **__restrict __src, + size_t __nwc, size_t __len, + mbstate_t *__restrict __ps, size_t __dstlen) + throw (); +extern size_t __wcsnrtombs_alias (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) throw () __asm__ ("" "wcsnrtombs") + ; +extern size_t __wcsnrtombs_chk_warn (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps, size_t __dstlen) throw () __asm__ ("" "__wcsnrtombs_chk") + __attribute__((__warning__ ("wcsnrtombs called with dst buffer smaller than len"))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +__attribute__ ((__leaf__)) wcsnrtombs (char *__restrict __dst, __const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) throw () +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __wcsnrtombs_chk (__dst, __src, __nwc, __len, __ps, + __builtin_object_size (__dst, 2 > 1)); + if (__len > __builtin_object_size (__dst, 2 > 1)) + return __wcsnrtombs_chk_warn (__dst, __src, __nwc, __len, __ps, + __builtin_object_size (__dst, 2 > 1)); + } + return __wcsnrtombs_alias (__dst, __src, __nwc, __len, __ps); +} +} +namespace std +{ + using ::mbstate_t; +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + using ::wint_t; + using ::btowc; + using ::fgetwc; + using ::fgetws; + using ::fputwc; + using ::fputws; + using ::fwide; + using ::fwprintf; + using ::fwscanf; + using ::getwc; + using ::getwchar; + using ::mbrlen; + using ::mbrtowc; + using ::mbsinit; + using ::mbsrtowcs; + using ::putwc; + using ::putwchar; + using ::swprintf; + using ::swscanf; + using ::ungetwc; + using ::vfwprintf; + using ::vfwscanf; + using ::vswprintf; + using ::vswscanf; + using ::vwprintf; + using ::vwscanf; + using ::wcrtomb; + using ::wcscat; + using ::wcscmp; + using ::wcscoll; + using ::wcscpy; + using ::wcscspn; + using ::wcsftime; + using ::wcslen; + using ::wcsncat; + using ::wcsncmp; + using ::wcsncpy; + using ::wcsrtombs; + using ::wcsspn; + using ::wcstod; + using ::wcstof; + using ::wcstok; + using ::wcstol; + using ::wcstoul; + using ::wcsxfrm; + using ::wctob; + using ::wmemcmp; + using ::wmemcpy; + using ::wmemmove; + using ::wmemset; + using ::wprintf; + using ::wscanf; + using ::wcschr; + using ::wcspbrk; + using ::wcsrchr; + using ::wcsstr; + using ::wmemchr; +} +namespace __gnu_cxx +{ + using ::wcstold; + using ::wcstoll; + using ::wcstoull; +} +namespace std +{ + using ::__gnu_cxx::wcstold; + using ::__gnu_cxx::wcstoll; + using ::__gnu_cxx::wcstoull; +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + typedef long streamoff; + typedef ptrdiff_t streamsize; + template + class fpos + { + private: + streamoff _M_off; + _StateT _M_state; + public: + fpos() + : _M_off(0), _M_state() { } + fpos(streamoff __off) + : _M_off(__off), _M_state() { } + operator streamoff() const { return _M_off; } + void + state(_StateT __st) + { _M_state = __st; } + _StateT + state() const + { return _M_state; } + fpos& + operator+=(streamoff __off) + { + _M_off += __off; + return *this; + } + fpos& + operator-=(streamoff __off) + { + _M_off -= __off; + return *this; + } + fpos + operator+(streamoff __off) const + { + fpos __pos(*this); + __pos += __off; + return __pos; + } + fpos + operator-(streamoff __off) const + { + fpos __pos(*this); + __pos -= __off; + return __pos; + } + streamoff + operator-(const fpos& __other) const + { return _M_off - __other._M_off; } + }; + template + inline bool + operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) + { return streamoff(__lhs) == streamoff(__rhs); } + template + inline bool + operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) + { return streamoff(__lhs) != streamoff(__rhs); } + typedef fpos streampos; + typedef fpos wstreampos; +} +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) +{ + template + struct _Char_types + { + typedef unsigned long int_type; + typedef std::streampos pos_type; + typedef std::streamoff off_type; + typedef std::mbstate_t state_type; + }; + template + struct char_traits + { + typedef _CharT char_type; + typedef typename _Char_types<_CharT>::int_type int_type; + typedef typename _Char_types<_CharT>::pos_type pos_type; + typedef typename _Char_types<_CharT>::off_type off_type; + typedef typename _Char_types<_CharT>::state_type state_type; + static void + assign(char_type& __c1, const char_type& __c2) + { __c1 = __c2; } + static bool + eq(const char_type& __c1, const char_type& __c2) + { return __c1 == __c2; } + static bool + lt(const char_type& __c1, const char_type& __c2) + { return __c1 < __c2; } + static int + compare(const char_type* __s1, const char_type* __s2, std::size_t __n); + static std::size_t + length(const char_type* __s); + static const char_type* + find(const char_type* __s, std::size_t __n, const char_type& __a); + static char_type* + move(char_type* __s1, const char_type* __s2, std::size_t __n); + static char_type* + copy(char_type* __s1, const char_type* __s2, std::size_t __n); + static char_type* + assign(char_type* __s, std::size_t __n, char_type __a); + static char_type + to_char_type(const int_type& __c) + { return static_cast(__c); } + static int_type + to_int_type(const char_type& __c) + { return static_cast(__c); } + static bool + eq_int_type(const int_type& __c1, const int_type& __c2) + { return __c1 == __c2; } + static int_type + eof() + { return static_cast(-1); } + static int_type + not_eof(const int_type& __c) + { return !eq_int_type(__c, eof()) ? __c : to_int_type(char_type()); } + }; + template + int + char_traits<_CharT>:: + compare(const char_type* __s1, const char_type* __s2, std::size_t __n) + { + for (std::size_t __i = 0; __i < __n; ++__i) + if (lt(__s1[__i], __s2[__i])) + return -1; + else if (lt(__s2[__i], __s1[__i])) + return 1; + return 0; + } + template + std::size_t + char_traits<_CharT>:: + length(const char_type* __p) + { + std::size_t __i = 0; + while (!eq(__p[__i], char_type())) + ++__i; + return __i; + } + template + const typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + find(const char_type* __s, std::size_t __n, const char_type& __a) + { + for (std::size_t __i = 0; __i < __n; ++__i) + if (eq(__s[__i], __a)) + return __s + __i; + return 0; + } + template + typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + move(char_type* __s1, const char_type* __s2, std::size_t __n) + { + return static_cast<_CharT*>(__builtin_memmove(__s1, __s2, + __n * sizeof(char_type))); + } + template + typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + copy(char_type* __s1, const char_type* __s2, std::size_t __n) + { + std::copy(__s2, __s2 + __n, __s1); + return __s1; + } + template + typename char_traits<_CharT>::char_type* + char_traits<_CharT>:: + assign(char_type* __s, std::size_t __n, char_type __a) + { + std::fill_n(__s, __n, __a); + return __s; + } +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + struct char_traits : public __gnu_cxx::char_traits<_CharT> + { }; + template<> + struct char_traits + { + typedef char char_type; + typedef int int_type; + typedef streampos pos_type; + typedef streamoff off_type; + typedef mbstate_t state_type; + static void + assign(char_type& __c1, const char_type& __c2) + { __c1 = __c2; } + static bool + eq(const char_type& __c1, const char_type& __c2) + { return __c1 == __c2; } + static bool + lt(const char_type& __c1, const char_type& __c2) + { return __c1 < __c2; } + static int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { return __builtin_memcmp(__s1, __s2, __n); } + static size_t + length(const char_type* __s) + { return __builtin_strlen(__s); } + static const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { return static_cast(__builtin_memchr(__s, __a, __n)); } + static char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { return static_cast(__builtin_memmove(__s1, __s2, __n)); } + static char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { return static_cast(__builtin_memcpy(__s1, __s2, __n)); } + static char_type* + assign(char_type* __s, size_t __n, char_type __a) + { return static_cast(__builtin_memset(__s, __a, __n)); } + static char_type + to_char_type(const int_type& __c) + { return static_cast(__c); } + static int_type + to_int_type(const char_type& __c) + { return static_cast(static_cast(__c)); } + static bool + eq_int_type(const int_type& __c1, const int_type& __c2) + { return __c1 == __c2; } + static int_type + eof() + { return static_cast(-1); } + static int_type + not_eof(const int_type& __c) + { return (__c == eof()) ? 0 : __c; } + }; + template<> + struct char_traits + { + typedef wchar_t char_type; + typedef wint_t int_type; + typedef streamoff off_type; + typedef wstreampos pos_type; + typedef mbstate_t state_type; + static void + assign(char_type& __c1, const char_type& __c2) + { __c1 = __c2; } + static bool + eq(const char_type& __c1, const char_type& __c2) + { return __c1 == __c2; } + static bool + lt(const char_type& __c1, const char_type& __c2) + { return __c1 < __c2; } + static int + compare(const char_type* __s1, const char_type* __s2, size_t __n) + { return wmemcmp(__s1, __s2, __n); } + static size_t + length(const char_type* __s) + { return wcslen(__s); } + static const char_type* + find(const char_type* __s, size_t __n, const char_type& __a) + { return wmemchr(__s, __a, __n); } + static char_type* + move(char_type* __s1, const char_type* __s2, size_t __n) + { return wmemmove(__s1, __s2, __n); } + static char_type* + copy(char_type* __s1, const char_type* __s2, size_t __n) + { return wmemcpy(__s1, __s2, __n); } + static char_type* + assign(char_type* __s, size_t __n, char_type __a) + { return wmemset(__s, __a, __n); } + static char_type + to_char_type(const int_type& __c) + { return char_type(__c); } + static int_type + to_int_type(const char_type& __c) + { return int_type(__c); } + static bool + eq_int_type(const int_type& __c1, const int_type& __c2) + { return __c1 == __c2; } + static int_type + eof() + { return static_cast((0xffffffffu)); } + static int_type + not_eof(const int_type& __c) + { return eq_int_type(__c, eof()) ? 0 : __c; } + }; +} +#pragma GCC visibility push(default) +extern "C++" { +namespace std +{ + class exception + { + public: + exception() throw() { } + virtual ~exception() throw(); + virtual const char* what() const throw(); + }; + class bad_exception : public exception + { + public: + bad_exception() throw() { } + virtual ~bad_exception() throw(); + virtual const char* what() const throw(); + }; + typedef void (*terminate_handler) (); + typedef void (*unexpected_handler) (); + terminate_handler set_terminate(terminate_handler) throw(); + void terminate() throw() __attribute__ ((__noreturn__)); + unexpected_handler set_unexpected(unexpected_handler) throw(); + void unexpected() __attribute__ ((__noreturn__)); + bool uncaught_exception() throw() __attribute__ ((__pure__)); +} +namespace __gnu_cxx +{ + void __verbose_terminate_handler(); +} +} +#pragma GCC visibility pop +#pragma GCC visibility push(default) +extern "C++" { +namespace std +{ + class bad_alloc : public exception + { + public: + bad_alloc() throw() { } + virtual ~bad_alloc() throw(); + virtual const char* what() const throw(); + }; + struct nothrow_t { }; + extern const nothrow_t nothrow; + typedef void (*new_handler)(); + new_handler set_new_handler(new_handler) throw(); +} +void* operator new(std::size_t) throw (std::bad_alloc); +void* operator new[](std::size_t) throw (std::bad_alloc); +void operator delete(void*) throw(); +void operator delete[](void*) throw(); +void* operator new(std::size_t, const std::nothrow_t&) throw(); +void* operator new[](std::size_t, const std::nothrow_t&) throw(); +void operator delete(void*, const std::nothrow_t&) throw(); +void operator delete[](void*, const std::nothrow_t&) throw(); +inline void* operator new(std::size_t, void* __p) throw() { return __p; } +inline void* operator new[](std::size_t, void* __p) throw() { return __p; } +inline void operator delete (void*, void*) throw() { } +inline void operator delete[](void*, void*) throw() { } +} +#pragma GCC visibility pop +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) +{ + using std::size_t; + using std::ptrdiff_t; + template + class new_allocator + { + public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef const _Tp* const_pointer; + typedef _Tp& reference; + typedef const _Tp& const_reference; + typedef _Tp value_type; + template + struct rebind + { typedef new_allocator<_Tp1> other; }; + new_allocator() throw() { } + new_allocator(const new_allocator&) throw() { } + template + new_allocator(const new_allocator<_Tp1>&) throw() { } + ~new_allocator() throw() { } + pointer + address(reference __x) const { return std::__addressof(__x); } + const_pointer + address(const_reference __x) const { return std::__addressof(__x); } + pointer + allocate(size_type __n, const void* = 0) + { + if (__n > this->max_size()) + std::__throw_bad_alloc(); + return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp))); + } + void + deallocate(pointer __p, size_type) + { ::operator delete(__p); } + size_type + max_size() const throw() + { return size_t(-1) / sizeof(_Tp); } + void + construct(pointer __p, const _Tp& __val) + { ::new((void *)__p) _Tp(__val); } + void + destroy(pointer __p) { __p->~_Tp(); } + }; + template + inline bool + operator==(const new_allocator<_Tp>&, const new_allocator<_Tp>&) + { return true; } + template + inline bool + operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&) + { return false; } +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + class allocator; + template<> + class allocator + { + public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef void* pointer; + typedef const void* const_pointer; + typedef void value_type; + template + struct rebind + { typedef allocator<_Tp1> other; }; + }; + template + class allocator: public __gnu_cxx::new_allocator<_Tp> + { + public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef const _Tp* const_pointer; + typedef _Tp& reference; + typedef const _Tp& const_reference; + typedef _Tp value_type; + template + struct rebind + { typedef allocator<_Tp1> other; }; + allocator() throw() { } + allocator(const allocator& __a) throw() + : __gnu_cxx::new_allocator<_Tp>(__a) { } + template + allocator(const allocator<_Tp1>&) throw() { } + ~allocator() throw() { } + }; + template + inline bool + operator==(const allocator<_T1>&, const allocator<_T2>&) + { return true; } + template + inline bool + operator==(const allocator<_Tp>&, const allocator<_Tp>&) + { return true; } + template + inline bool + operator!=(const allocator<_T1>&, const allocator<_T2>&) + { return false; } + template + inline bool + operator!=(const allocator<_Tp>&, const allocator<_Tp>&) + { return false; } + extern template class allocator; + extern template class allocator; + template + struct __alloc_swap + { static void _S_do_it(_Alloc&, _Alloc&) { } }; + template + struct __alloc_swap<_Alloc, false> + { + static void + _S_do_it(_Alloc& __one, _Alloc& __two) + { + if (__one != __two) + swap(__one, __two); + } + }; + template + struct __alloc_neq + { + static bool + _S_do_it(const _Alloc&, const _Alloc&) + { return false; } + }; + template + struct __alloc_neq<_Alloc, false> + { + static bool + _S_do_it(const _Alloc& __one, const _Alloc& __two) + { return __one != __two; } + }; +} +enum +{ + __LC_CTYPE = 0, + __LC_NUMERIC = 1, + __LC_TIME = 2, + __LC_COLLATE = 3, + __LC_MONETARY = 4, + __LC_MESSAGES = 5, + __LC_ALL = 6, + __LC_PAPER = 7, + __LC_NAME = 8, + __LC_ADDRESS = 9, + __LC_TELEPHONE = 10, + __LC_MEASUREMENT = 11, + __LC_IDENTIFICATION = 12 +}; +extern "C" { +struct lconv +{ + char *decimal_point; + char *thousands_sep; + char *grouping; + char *int_curr_symbol; + char *currency_symbol; + char *mon_decimal_point; + char *mon_thousands_sep; + char *mon_grouping; + char *positive_sign; + char *negative_sign; + char int_frac_digits; + char frac_digits; + char p_cs_precedes; + char p_sep_by_space; + char n_cs_precedes; + char n_sep_by_space; + char p_sign_posn; + char n_sign_posn; + char int_p_cs_precedes; + char int_p_sep_by_space; + char int_n_cs_precedes; + char int_n_sep_by_space; + char int_p_sign_posn; + char int_n_sign_posn; +}; +extern char *setlocale (int __category, __const char *__locale) throw (); +extern struct lconv *localeconv (void) throw (); +extern __locale_t newlocale (int __category_mask, __const char *__locale, + __locale_t __base) throw (); +extern __locale_t duplocale (__locale_t __dataset) throw (); +extern void freelocale (__locale_t __dataset) throw (); +extern __locale_t uselocale (__locale_t __dataset) throw (); +} +namespace std +{ + using ::lconv; + using ::setlocale; + using ::localeconv; +} +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) +{ + extern "C" __typeof(uselocale) __uselocale; +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + typedef __locale_t __c_locale; + inline int + __convert_from_v(const __c_locale& __cloc __attribute__ ((__unused__)), + char* __out, + const int __size __attribute__ ((__unused__)), + const char* __fmt, ...) + { + __c_locale __old = __gnu_cxx::__uselocale(__cloc); + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); + __builtin_va_end(__args); + __gnu_cxx::__uselocale(__old); + return __ret; + } +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + class ios_base; + template > + class basic_ios; + template > + class basic_streambuf; + template > + class basic_istream; + template > + class basic_ostream; + template > + class basic_iostream; + template, + typename _Alloc = allocator<_CharT> > + class basic_stringbuf; + template, + typename _Alloc = allocator<_CharT> > + class basic_istringstream; + template, + typename _Alloc = allocator<_CharT> > + class basic_ostringstream; + template, + typename _Alloc = allocator<_CharT> > + class basic_stringstream; + template > + class basic_filebuf; + template > + class basic_ifstream; + template > + class basic_ofstream; + template > + class basic_fstream; + template > + class istreambuf_iterator; + template > + class ostreambuf_iterator; + typedef basic_ios ios; + typedef basic_streambuf streambuf; + typedef basic_istream istream; + typedef basic_ostream ostream; + typedef basic_iostream iostream; + typedef basic_stringbuf stringbuf; + typedef basic_istringstream istringstream; + typedef basic_ostringstream ostringstream; + typedef basic_stringstream stringstream; + typedef basic_filebuf filebuf; + typedef basic_ifstream ifstream; + typedef basic_ofstream ofstream; + typedef basic_fstream fstream; + typedef basic_ios wios; + typedef basic_streambuf wstreambuf; + typedef basic_istream wistream; + typedef basic_ostream wostream; + typedef basic_iostream wiostream; + typedef basic_stringbuf wstringbuf; + typedef basic_istringstream wistringstream; + typedef basic_ostringstream wostringstream; + typedef basic_stringstream wstringstream; + typedef basic_filebuf wfilebuf; + typedef basic_ifstream wifstream; + typedef basic_ofstream wofstream; + typedef basic_fstream wfstream; +} +typedef unsigned char __u_char; +typedef unsigned short int __u_short; +typedef unsigned int __u_int; +typedef unsigned long int __u_long; +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef signed short int __int16_t; +typedef unsigned short int __uint16_t; +typedef signed int __int32_t; +typedef unsigned int __uint32_t; +typedef signed long int __int64_t; +typedef unsigned long int __uint64_t; +typedef long int __quad_t; +typedef unsigned long int __u_quad_t; +typedef unsigned long int __dev_t; +typedef unsigned int __uid_t; +typedef unsigned int __gid_t; +typedef unsigned long int __ino_t; +typedef unsigned long int __ino64_t; +typedef unsigned int __mode_t; +typedef unsigned long int __nlink_t; +typedef long int __off_t; +typedef long int __off64_t; +typedef int __pid_t; +typedef struct { int __val[2]; } __fsid_t; +typedef long int __clock_t; +typedef unsigned long int __rlim_t; +typedef unsigned long int __rlim64_t; +typedef unsigned int __id_t; +typedef long int __time_t; +typedef unsigned int __useconds_t; +typedef long int __suseconds_t; +typedef int __daddr_t; +typedef long int __swblk_t; +typedef int __key_t; +typedef int __clockid_t; +typedef void * __timer_t; +typedef long int __blksize_t; +typedef long int __blkcnt_t; +typedef long int __blkcnt64_t; +typedef unsigned long int __fsblkcnt_t; +typedef unsigned long int __fsblkcnt64_t; +typedef unsigned long int __fsfilcnt_t; +typedef unsigned long int __fsfilcnt64_t; +typedef long int __ssize_t; +typedef __off64_t __loff_t; +typedef __quad_t *__qaddr_t; +typedef char *__caddr_t; +typedef long int __intptr_t; +typedef unsigned int __socklen_t; +extern "C" { +enum +{ + _ISupper = (1 << (0)), + _ISlower = (1 << (1)), + _ISalpha = (1 << (2)), + _ISdigit = (1 << (3)), + _ISxdigit = (1 << (4)), + _ISspace = (1 << (5)), + _ISprint = (1 << (6)), + _ISgraph = (1 << (7)), + _ISblank = (1 << (8)), + _IScntrl = (1 << (9)), + _ISpunct = (1 << (10)), + _ISalnum = (1 << (11)) +}; +extern __const unsigned short int **__ctype_b_loc (void) + throw () __attribute__ ((__const)); +extern __const __int32_t **__ctype_tolower_loc (void) + throw () __attribute__ ((__const)); +extern __const __int32_t **__ctype_toupper_loc (void) + throw () __attribute__ ((__const)); +extern int isalnum (int) throw (); +extern int isalpha (int) throw (); +extern int iscntrl (int) throw (); +extern int isdigit (int) throw (); +extern int islower (int) throw (); +extern int isgraph (int) throw (); +extern int isprint (int) throw (); +extern int ispunct (int) throw (); +extern int isspace (int) throw (); +extern int isupper (int) throw (); +extern int isxdigit (int) throw (); +extern int tolower (int __c) throw (); +extern int toupper (int __c) throw (); +extern int isblank (int) throw (); +extern int isctype (int __c, int __mask) throw (); +extern int isascii (int __c) throw (); +extern int toascii (int __c) throw (); +extern int _toupper (int) throw (); +extern int _tolower (int) throw (); +extern int isalnum_l (int, __locale_t) throw (); +extern int isalpha_l (int, __locale_t) throw (); +extern int iscntrl_l (int, __locale_t) throw (); +extern int isdigit_l (int, __locale_t) throw (); +extern int islower_l (int, __locale_t) throw (); +extern int isgraph_l (int, __locale_t) throw (); +extern int isprint_l (int, __locale_t) throw (); +extern int ispunct_l (int, __locale_t) throw (); +extern int isspace_l (int, __locale_t) throw (); +extern int isupper_l (int, __locale_t) throw (); +extern int isxdigit_l (int, __locale_t) throw (); +extern int isblank_l (int, __locale_t) throw (); +extern int __tolower_l (int __c, __locale_t __l) throw (); +extern int tolower_l (int __c, __locale_t __l) throw (); +extern int __toupper_l (int __c, __locale_t __l) throw (); +extern int toupper_l (int __c, __locale_t __l) throw (); +} +namespace std +{ + using ::isalnum; + using ::isalpha; + using ::iscntrl; + using ::isdigit; + using ::isgraph; + using ::islower; + using ::isprint; + using ::ispunct; + using ::isspace; + using ::isupper; + using ::isxdigit; + using ::tolower; + using ::toupper; +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + class locale; + template + bool + has_facet(const locale&) throw(); + template + const _Facet& + use_facet(const locale&); + template + bool + isspace(_CharT, const locale&); + template + bool + isprint(_CharT, const locale&); + template + bool + iscntrl(_CharT, const locale&); + template + bool + isupper(_CharT, const locale&); + template + bool + islower(_CharT, const locale&); + template + bool + isalpha(_CharT, const locale&); + template + bool + isdigit(_CharT, const locale&); + template + bool + ispunct(_CharT, const locale&); + template + bool + isxdigit(_CharT, const locale&); + template + bool + isalnum(_CharT, const locale&); + template + bool + isgraph(_CharT, const locale&); + template + _CharT + toupper(_CharT, const locale&); + template + _CharT + tolower(_CharT, const locale&); + class ctype_base; + template + class ctype; + template<> class ctype; + template<> class ctype; + template + class ctype_byname; + class codecvt_base; + template + class codecvt; + template<> class codecvt; + template<> class codecvt; + template + class codecvt_byname; +namespace __gnu_cxx_ldbl128 { + template > + class num_get; + template > + class num_put; +} + template class numpunct; + template class numpunct_byname; + template + class collate; + template class + collate_byname; + class time_base; + template > + class time_get; + template > + class time_get_byname; + template > + class time_put; + template > + class time_put_byname; + class money_base; +namespace __gnu_cxx_ldbl128 { + template > + class money_get; + template > + class money_put; +} + template + class moneypunct; + template + class moneypunct_byname; + class messages_base; + template + class messages; + template + class messages_byname; +} +#pragma GCC visibility push(default) +namespace __cxxabiv1 +{ + class __forced_unwind + { + virtual ~__forced_unwind() throw(); + virtual void __pure_dummy() = 0; + }; +} +#pragma GCC visibility pop +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + inline void + __ostream_write(basic_ostream<_CharT, _Traits>& __out, + const _CharT* __s, streamsize __n) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + const streamsize __put = __out.rdbuf()->sputn(__s, __n); + if (__put != __n) + __out.setstate(__ios_base::badbit); + } + template + inline void + __ostream_fill(basic_ostream<_CharT, _Traits>& __out, streamsize __n) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + const _CharT __c = __out.fill(); + for (; __n > 0; --__n) + { + const typename _Traits::int_type __put = __out.rdbuf()->sputc(__c); + if (_Traits::eq_int_type(__put, _Traits::eof())) + { + __out.setstate(__ios_base::badbit); + break; + } + } + } + template + basic_ostream<_CharT, _Traits>& + __ostream_insert(basic_ostream<_CharT, _Traits>& __out, + const _CharT* __s, streamsize __n) + { + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef typename __ostream_type::ios_base __ios_base; + typename __ostream_type::sentry __cerb(__out); + if (__cerb) + { + try + { + const streamsize __w = __out.width(); + if (__w > __n) + { + const bool __left = ((__out.flags() + & __ios_base::adjustfield) + == __ios_base::left); + if (!__left) + __ostream_fill(__out, __w - __n); + if (__out.good()) + __ostream_write(__out, __s, __n); + if (__left && __out.good()) + __ostream_fill(__out, __w - __n); + } + else + __ostream_write(__out, __s, __n); + __out.width(0); + } + catch(__cxxabiv1::__forced_unwind&) + { + __out._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { __out._M_setstate(__ios_base::badbit); } + } + return __out; + } + extern template ostream& __ostream_insert(ostream&, const char*, streamsize); + extern template wostream& __ostream_insert(wostream&, const wchar_t*, + streamsize); +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + struct unary_function + { + typedef _Arg argument_type; + typedef _Result result_type; + }; + template + struct binary_function + { + typedef _Arg1 first_argument_type; + typedef _Arg2 second_argument_type; + typedef _Result result_type; + }; + template + struct plus : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x + __y; } + }; + template + struct minus : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x - __y; } + }; + template + struct multiplies : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x * __y; } + }; + template + struct divides : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x / __y; } + }; + template + struct modulus : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x % __y; } + }; + template + struct negate : public unary_function<_Tp, _Tp> + { + _Tp + operator()(const _Tp& __x) const + { return -__x; } + }; + template + struct equal_to : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x == __y; } + }; + template + struct not_equal_to : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x != __y; } + }; + template + struct greater : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x > __y; } + }; + template + struct less : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x < __y; } + }; + template + struct greater_equal : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x >= __y; } + }; + template + struct less_equal : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x <= __y; } + }; + template + struct logical_and : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x && __y; } + }; + template + struct logical_or : public binary_function<_Tp, _Tp, bool> + { + bool + operator()(const _Tp& __x, const _Tp& __y) const + { return __x || __y; } + }; + template + struct logical_not : public unary_function<_Tp, bool> + { + bool + operator()(const _Tp& __x) const + { return !__x; } + }; + template + struct bit_and : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x & __y; } + }; + template + struct bit_or : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x | __y; } + }; + template + struct bit_xor : public binary_function<_Tp, _Tp, _Tp> + { + _Tp + operator()(const _Tp& __x, const _Tp& __y) const + { return __x ^ __y; } + }; + template + class unary_negate + : public unary_function + { + protected: + _Predicate _M_pred; + public: + explicit + unary_negate(const _Predicate& __x) : _M_pred(__x) { } + bool + operator()(const typename _Predicate::argument_type& __x) const + { return !_M_pred(__x); } + }; + template + inline unary_negate<_Predicate> + not1(const _Predicate& __pred) + { return unary_negate<_Predicate>(__pred); } + template + class binary_negate + : public binary_function + { + protected: + _Predicate _M_pred; + public: + explicit + binary_negate(const _Predicate& __x) : _M_pred(__x) { } + bool + operator()(const typename _Predicate::first_argument_type& __x, + const typename _Predicate::second_argument_type& __y) const + { return !_M_pred(__x, __y); } + }; + template + inline binary_negate<_Predicate> + not2(const _Predicate& __pred) + { return binary_negate<_Predicate>(__pred); } + template + class pointer_to_unary_function : public unary_function<_Arg, _Result> + { + protected: + _Result (*_M_ptr)(_Arg); + public: + pointer_to_unary_function() { } + explicit + pointer_to_unary_function(_Result (*__x)(_Arg)) + : _M_ptr(__x) { } + _Result + operator()(_Arg __x) const + { return _M_ptr(__x); } + }; + template + inline pointer_to_unary_function<_Arg, _Result> + ptr_fun(_Result (*__x)(_Arg)) + { return pointer_to_unary_function<_Arg, _Result>(__x); } + template + class pointer_to_binary_function + : public binary_function<_Arg1, _Arg2, _Result> + { + protected: + _Result (*_M_ptr)(_Arg1, _Arg2); + public: + pointer_to_binary_function() { } + explicit + pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) + : _M_ptr(__x) { } + _Result + operator()(_Arg1 __x, _Arg2 __y) const + { return _M_ptr(__x, __y); } + }; + template + inline pointer_to_binary_function<_Arg1, _Arg2, _Result> + ptr_fun(_Result (*__x)(_Arg1, _Arg2)) + { return pointer_to_binary_function<_Arg1, _Arg2, _Result>(__x); } + template + struct _Identity : public unary_function<_Tp,_Tp> + { + _Tp& + operator()(_Tp& __x) const + { return __x; } + const _Tp& + operator()(const _Tp& __x) const + { return __x; } + }; + template + struct _Select1st : public unary_function<_Pair, + typename _Pair::first_type> + { + typename _Pair::first_type& + operator()(_Pair& __x) const + { return __x.first; } + const typename _Pair::first_type& + operator()(const _Pair& __x) const + { return __x.first; } + }; + template + struct _Select2nd : public unary_function<_Pair, + typename _Pair::second_type> + { + typename _Pair::second_type& + operator()(_Pair& __x) const + { return __x.second; } + const typename _Pair::second_type& + operator()(const _Pair& __x) const + { return __x.second; } + }; + template + class mem_fun_t : public unary_function<_Tp*, _Ret> + { + public: + explicit + mem_fun_t(_Ret (_Tp::*__pf)()) + : _M_f(__pf) { } + _Ret + operator()(_Tp* __p) const + { return (__p->*_M_f)(); } + private: + _Ret (_Tp::*_M_f)(); + }; + template + class const_mem_fun_t : public unary_function + { + public: + explicit + const_mem_fun_t(_Ret (_Tp::*__pf)() const) + : _M_f(__pf) { } + _Ret + operator()(const _Tp* __p) const + { return (__p->*_M_f)(); } + private: + _Ret (_Tp::*_M_f)() const; + }; + template + class mem_fun_ref_t : public unary_function<_Tp, _Ret> + { + public: + explicit + mem_fun_ref_t(_Ret (_Tp::*__pf)()) + : _M_f(__pf) { } + _Ret + operator()(_Tp& __r) const + { return (__r.*_M_f)(); } + private: + _Ret (_Tp::*_M_f)(); + }; + template + class const_mem_fun_ref_t : public unary_function<_Tp, _Ret> + { + public: + explicit + const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) + : _M_f(__pf) { } + _Ret + operator()(const _Tp& __r) const + { return (__r.*_M_f)(); } + private: + _Ret (_Tp::*_M_f)() const; + }; + template + class mem_fun1_t : public binary_function<_Tp*, _Arg, _Ret> + { + public: + explicit + mem_fun1_t(_Ret (_Tp::*__pf)(_Arg)) + : _M_f(__pf) { } + _Ret + operator()(_Tp* __p, _Arg __x) const + { return (__p->*_M_f)(__x); } + private: + _Ret (_Tp::*_M_f)(_Arg); + }; + template + class const_mem_fun1_t : public binary_function + { + public: + explicit + const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const) + : _M_f(__pf) { } + _Ret + operator()(const _Tp* __p, _Arg __x) const + { return (__p->*_M_f)(__x); } + private: + _Ret (_Tp::*_M_f)(_Arg) const; + }; + template + class mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> + { + public: + explicit + mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg)) + : _M_f(__pf) { } + _Ret + operator()(_Tp& __r, _Arg __x) const + { return (__r.*_M_f)(__x); } + private: + _Ret (_Tp::*_M_f)(_Arg); + }; + template + class const_mem_fun1_ref_t : public binary_function<_Tp, _Arg, _Ret> + { + public: + explicit + const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const) + : _M_f(__pf) { } + _Ret + operator()(const _Tp& __r, _Arg __x) const + { return (__r.*_M_f)(__x); } + private: + _Ret (_Tp::*_M_f)(_Arg) const; + }; + template + inline mem_fun_t<_Ret, _Tp> + mem_fun(_Ret (_Tp::*__f)()) + { return mem_fun_t<_Ret, _Tp>(__f); } + template + inline const_mem_fun_t<_Ret, _Tp> + mem_fun(_Ret (_Tp::*__f)() const) + { return const_mem_fun_t<_Ret, _Tp>(__f); } + template + inline mem_fun_ref_t<_Ret, _Tp> + mem_fun_ref(_Ret (_Tp::*__f)()) + { return mem_fun_ref_t<_Ret, _Tp>(__f); } + template + inline const_mem_fun_ref_t<_Ret, _Tp> + mem_fun_ref(_Ret (_Tp::*__f)() const) + { return const_mem_fun_ref_t<_Ret, _Tp>(__f); } + template + inline mem_fun1_t<_Ret, _Tp, _Arg> + mem_fun(_Ret (_Tp::*__f)(_Arg)) + { return mem_fun1_t<_Ret, _Tp, _Arg>(__f); } + template + inline const_mem_fun1_t<_Ret, _Tp, _Arg> + mem_fun(_Ret (_Tp::*__f)(_Arg) const) + { return const_mem_fun1_t<_Ret, _Tp, _Arg>(__f); } + template + inline mem_fun1_ref_t<_Ret, _Tp, _Arg> + mem_fun_ref(_Ret (_Tp::*__f)(_Arg)) + { return mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } + template + inline const_mem_fun1_ref_t<_Ret, _Tp, _Arg> + mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const) + { return const_mem_fun1_ref_t<_Ret, _Tp, _Arg>(__f); } +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + class binder1st + : public unary_function + { + protected: + _Operation op; + typename _Operation::first_argument_type value; + public: + binder1st(const _Operation& __x, + const typename _Operation::first_argument_type& __y) + : op(__x), value(__y) { } + typename _Operation::result_type + operator()(const typename _Operation::second_argument_type& __x) const + { return op(value, __x); } + typename _Operation::result_type + operator()(typename _Operation::second_argument_type& __x) const + { return op(value, __x); } + } ; + template + inline binder1st<_Operation> + bind1st(const _Operation& __fn, const _Tp& __x) + { + typedef typename _Operation::first_argument_type _Arg1_type; + return binder1st<_Operation>(__fn, _Arg1_type(__x)); + } + template + class binder2nd + : public unary_function + { + protected: + _Operation op; + typename _Operation::second_argument_type value; + public: + binder2nd(const _Operation& __x, + const typename _Operation::second_argument_type& __y) + : op(__x), value(__y) { } + typename _Operation::result_type + operator()(const typename _Operation::first_argument_type& __x) const + { return op(__x, value); } + typename _Operation::result_type + operator()(typename _Operation::first_argument_type& __x) const + { return op(__x, value); } + } ; + template + inline binder2nd<_Operation> + bind2nd(const _Operation& __fn, const _Tp& __x) + { + typedef typename _Operation::second_argument_type _Arg2_type; + return binder2nd<_Operation>(__fn, _Arg2_type(__x)); + } +} +#pragma GCC visibility push(default) +typedef __time_t time_t; +struct timespec + { + __time_t tv_sec; + long int tv_nsec; + }; +typedef __pid_t pid_t; +struct sched_param + { + int __sched_priority; + }; +extern "C" { +extern int clone (int (*__fn) (void *__arg), void *__child_stack, + int __flags, void *__arg, ...) throw (); +extern int unshare (int __flags) throw (); +extern int sched_getcpu (void) throw (); +extern int setns (int __fd, int __nstype) throw (); +} +struct __sched_param + { + int __sched_priority; + }; +typedef unsigned long int __cpu_mask; +typedef struct +{ + __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))]; +} cpu_set_t; +extern "C" { +extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) + throw (); +extern cpu_set_t *__sched_cpualloc (size_t __count) throw () __attribute__ ((__warn_unused_result__)); +extern void __sched_cpufree (cpu_set_t *__set) throw (); +} +extern "C" { +extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param) + throw (); +extern int sched_getparam (__pid_t __pid, struct sched_param *__param) throw (); +extern int sched_setscheduler (__pid_t __pid, int __policy, + __const struct sched_param *__param) throw (); +extern int sched_getscheduler (__pid_t __pid) throw (); +extern int sched_yield (void) throw (); +extern int sched_get_priority_max (int __algorithm) throw (); +extern int sched_get_priority_min (int __algorithm) throw (); +extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) throw (); +extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, + __const cpu_set_t *__cpuset) throw (); +extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, + cpu_set_t *__cpuset) throw (); +} +extern "C" { +struct timeval + { + __time_t tv_sec; + __suseconds_t tv_usec; + }; +struct timex +{ + unsigned int modes; + long int offset; + long int freq; + long int maxerror; + long int esterror; + int status; + long int constant; + long int precision; + long int tolerance; + struct timeval time; + long int tick; + long int ppsfreq; + long int jitter; + int shift; + long int stabil; + long int jitcnt; + long int calcnt; + long int errcnt; + long int stbcnt; + int tai; + int :32; int :32; int :32; int :32; + int :32; int :32; int :32; int :32; + int :32; int :32; int :32; +}; +extern "C" { +extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) throw (); +} +typedef __clock_t clock_t; +typedef __clockid_t clockid_t; +typedef __timer_t timer_t; +struct tm +{ + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; + long int tm_gmtoff; + __const char *tm_zone; +}; +struct itimerspec + { + struct timespec it_interval; + struct timespec it_value; + }; +struct sigevent; +extern clock_t clock (void) throw (); +extern time_t time (time_t *__timer) throw (); +extern double difftime (time_t __time1, time_t __time0) + throw () __attribute__ ((__const__)); +extern time_t mktime (struct tm *__tp) throw (); +extern size_t strftime (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp) throw (); +extern char *strptime (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp) + throw (); +extern size_t strftime_l (char *__restrict __s, size_t __maxsize, + __const char *__restrict __format, + __const struct tm *__restrict __tp, + __locale_t __loc) throw (); +extern char *strptime_l (__const char *__restrict __s, + __const char *__restrict __fmt, struct tm *__tp, + __locale_t __loc) throw (); +extern struct tm *gmtime (__const time_t *__timer) throw (); +extern struct tm *localtime (__const time_t *__timer) throw (); +extern struct tm *gmtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) throw (); +extern struct tm *localtime_r (__const time_t *__restrict __timer, + struct tm *__restrict __tp) throw (); +extern char *asctime (__const struct tm *__tp) throw (); +extern char *ctime (__const time_t *__timer) throw (); +extern char *asctime_r (__const struct tm *__restrict __tp, + char *__restrict __buf) throw (); +extern char *ctime_r (__const time_t *__restrict __timer, + char *__restrict __buf) throw (); +extern char *__tzname[2]; +extern int __daylight; +extern long int __timezone; +extern char *tzname[2]; +extern void tzset (void) throw (); +extern int daylight; +extern long int timezone; +extern int stime (__const time_t *__when) throw (); +extern time_t timegm (struct tm *__tp) throw (); +extern time_t timelocal (struct tm *__tp) throw (); +extern int dysize (int __year) throw () __attribute__ ((__const__)); +extern int nanosleep (__const struct timespec *__requested_time, + struct timespec *__remaining); +extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw (); +extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw (); +extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp) + throw (); +extern int clock_nanosleep (clockid_t __clock_id, int __flags, + __const struct timespec *__req, + struct timespec *__rem); +extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw (); +extern int timer_create (clockid_t __clock_id, + struct sigevent *__restrict __evp, + timer_t *__restrict __timerid) throw (); +extern int timer_delete (timer_t __timerid) throw (); +extern int timer_settime (timer_t __timerid, int __flags, + __const struct itimerspec *__restrict __value, + struct itimerspec *__restrict __ovalue) throw (); +extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) + throw (); +extern int timer_getoverrun (timer_t __timerid) throw (); +extern int getdate_err; +extern struct tm *getdate (__const char *__string); +extern int getdate_r (__const char *__restrict __string, + struct tm *__restrict __resbufp); +} +typedef unsigned long int pthread_t; +typedef union +{ + char __size[56]; + long int __align; +} pthread_attr_t; +typedef struct __pthread_internal_list +{ + struct __pthread_internal_list *__prev; + struct __pthread_internal_list *__next; +} __pthread_list_t; +typedef union +{ + struct __pthread_mutex_s + { + int __lock; + unsigned int __count; + int __owner; + unsigned int __nusers; + int __kind; + int __spins; + __pthread_list_t __list; + } __data; + char __size[40]; + long int __align; +} pthread_mutex_t; +typedef union +{ + char __size[4]; + int __align; +} pthread_mutexattr_t; +typedef union +{ + struct + { + int __lock; + unsigned int __futex; + __extension__ unsigned long long int __total_seq; + __extension__ unsigned long long int __wakeup_seq; + __extension__ unsigned long long int __woken_seq; + void *__mutex; + unsigned int __nwaiters; + unsigned int __broadcast_seq; + } __data; + char __size[48]; + __extension__ long long int __align; +} pthread_cond_t; +typedef union +{ + char __size[4]; + int __align; +} pthread_condattr_t; +typedef unsigned int pthread_key_t; +typedef int pthread_once_t; +typedef union +{ + struct + { + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + int __writer; + int __shared; + unsigned long int __pad1; + unsigned long int __pad2; + unsigned int __flags; + } __data; + char __size[56]; + long int __align; +} pthread_rwlock_t; +typedef union +{ + char __size[8]; + long int __align; +} pthread_rwlockattr_t; +typedef volatile int pthread_spinlock_t; +typedef union +{ + char __size[32]; + long int __align; +} pthread_barrier_t; +typedef union +{ + char __size[4]; + int __align; +} pthread_barrierattr_t; +typedef long int __jmp_buf[64] __attribute__ ((__aligned__ (16))); +enum +{ + PTHREAD_CREATE_JOINABLE, + PTHREAD_CREATE_DETACHED +}; +enum +{ + PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_ADAPTIVE_NP + , + PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, + PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL + , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP +}; +enum +{ + PTHREAD_MUTEX_STALLED, + PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, + PTHREAD_MUTEX_ROBUST, + PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST +}; +enum +{ + PTHREAD_PRIO_NONE, + PTHREAD_PRIO_INHERIT, + PTHREAD_PRIO_PROTECT +}; +enum +{ + PTHREAD_RWLOCK_PREFER_READER_NP, + PTHREAD_RWLOCK_PREFER_WRITER_NP, + PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, + PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP +}; +enum +{ + PTHREAD_INHERIT_SCHED, + PTHREAD_EXPLICIT_SCHED +}; +enum +{ + PTHREAD_SCOPE_SYSTEM, + PTHREAD_SCOPE_PROCESS +}; +enum +{ + PTHREAD_PROCESS_PRIVATE, + PTHREAD_PROCESS_SHARED +}; +struct _pthread_cleanup_buffer +{ + void (*__routine) (void *); + void *__arg; + int __canceltype; + struct _pthread_cleanup_buffer *__prev; +}; +enum +{ + PTHREAD_CANCEL_ENABLE, + PTHREAD_CANCEL_DISABLE +}; +enum +{ + PTHREAD_CANCEL_DEFERRED, + PTHREAD_CANCEL_ASYNCHRONOUS +}; +extern "C" { +extern int pthread_create (pthread_t *__restrict __newthread, + __const pthread_attr_t *__restrict __attr, + void *(*__start_routine) (void *), + void *__restrict __arg) throw () __attribute__ ((__nonnull__ (1, 3))); +extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); +extern int pthread_join (pthread_t __th, void **__thread_return); +extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) throw (); +extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, + __const struct timespec *__abstime); +extern int pthread_detach (pthread_t __th) throw (); +extern pthread_t pthread_self (void) throw () __attribute__ ((__const__)); +extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) throw (); +extern int pthread_attr_init (pthread_attr_t *__attr) throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_destroy (pthread_attr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr, + int *__detachstate) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, + int __detachstate) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr, + size_t *__guardsize) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setguardsize (pthread_attr_t *__attr, + size_t __guardsize) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict + __attr, + struct sched_param *__restrict __param) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, + __const struct sched_param *__restrict + __param) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict + __attr, int *__restrict __policy) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict + __attr, int *__restrict __inherit) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, + int __inherit) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr, + int *__restrict __scope) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict + __attr, void **__restrict __stackaddr) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__)); +extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, + void *__stackaddr) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)); +extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict + __attr, size_t *__restrict __stacksize) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_attr_setstacksize (pthread_attr_t *__attr, + size_t __stacksize) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr, + void **__restrict __stackaddr, + size_t *__restrict __stacksize) + throw () __attribute__ ((__nonnull__ (1, 2, 3))); +extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, + size_t __stacksize) throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, + size_t __cpusetsize, + __const cpu_set_t *__cpuset) + throw () __attribute__ ((__nonnull__ (1, 3))); +extern int pthread_attr_getaffinity_np (__const pthread_attr_t *__attr, + size_t __cpusetsize, + cpu_set_t *__cpuset) + throw () __attribute__ ((__nonnull__ (1, 3))); +extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) + throw () __attribute__ ((__nonnull__ (2))); +extern int pthread_setschedparam (pthread_t __target_thread, int __policy, + __const struct sched_param *__param) + throw () __attribute__ ((__nonnull__ (3))); +extern int pthread_getschedparam (pthread_t __target_thread, + int *__restrict __policy, + struct sched_param *__restrict __param) + throw () __attribute__ ((__nonnull__ (2, 3))); +extern int pthread_setschedprio (pthread_t __target_thread, int __prio) + throw (); +extern int pthread_getname_np (pthread_t __target_thread, char *__buf, + size_t __buflen) + throw () __attribute__ ((__nonnull__ (2))); +extern int pthread_setname_np (pthread_t __target_thread, __const char *__name) + throw () __attribute__ ((__nonnull__ (2))); +extern int pthread_getconcurrency (void) throw (); +extern int pthread_setconcurrency (int __level) throw (); +extern int pthread_yield (void) throw (); +extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, + __const cpu_set_t *__cpuset) + throw () __attribute__ ((__nonnull__ (3))); +extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, + cpu_set_t *__cpuset) + throw () __attribute__ ((__nonnull__ (3))); +extern int pthread_once (pthread_once_t *__once_control, + void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_setcancelstate (int __state, int *__oldstate); +extern int pthread_setcanceltype (int __type, int *__oldtype); +extern int pthread_cancel (pthread_t __th); +extern void pthread_testcancel (void); +typedef struct +{ + struct + { + __jmp_buf __cancel_jmp_buf; + int __mask_was_saved; + } __cancel_jmp_buf[1]; + void *__pad[4]; +} __pthread_unwind_buf_t __attribute__ ((__aligned__)); +struct __pthread_cleanup_frame +{ + void (*__cancel_routine) (void *); + void *__cancel_arg; + int __do_it; + int __cancel_type; +}; +class __pthread_cleanup_class +{ + void (*__cancel_routine) (void *); + void *__cancel_arg; + int __do_it; + int __cancel_type; + public: + __pthread_cleanup_class (void (*__fct) (void *), void *__arg) + : __cancel_routine (__fct), __cancel_arg (__arg), __do_it (1) { } + ~__pthread_cleanup_class () { if (__do_it) __cancel_routine (__cancel_arg); } + void __setdoit (int __newval) { __do_it = __newval; } + void __defer () { pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, + &__cancel_type); } + void __restore () const { pthread_setcanceltype (__cancel_type, 0); } +}; +struct __jmp_buf_tag; +extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) throw (); +extern int pthread_mutex_init (pthread_mutex_t *__mutex, + __const pthread_mutexattr_t *__mutexattr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutex_lock (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, + __const struct timespec *__restrict + __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutex_getprioceiling (__const pthread_mutex_t * + __restrict __mutex, + int *__restrict __prioceiling) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, + int __prioceiling, + int *__restrict __old_ceiling) + throw () __attribute__ ((__nonnull__ (1, 3))); +extern int pthread_mutex_consistent (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __pshared) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, + int __pshared) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict + __attr, int *__restrict __kind) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __protocol) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, + int __protocol) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t * + __restrict __attr, + int *__restrict __prioceiling) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, + int __prioceiling) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr, + int *__robustness) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutexattr_getrobust_np (__const pthread_mutexattr_t *__attr, + int *__robustness) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, + int __robustness) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, + int __robustness) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, + __const pthread_rwlockattr_t *__restrict + __attr) throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, + __const struct timespec *__restrict + __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, + __const struct timespec *__restrict + __abstime) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t * + __restrict __attr, + int *__restrict __pshared) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, + int __pshared) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t * + __restrict __attr, + int *__restrict __pref) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, + int __pref) throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_cond_init (pthread_cond_t *__restrict __cond, + __const pthread_condattr_t *__restrict + __cond_attr) throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_cond_destroy (pthread_cond_t *__cond) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_cond_signal (pthread_cond_t *__cond) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_cond_broadcast (pthread_cond_t *__cond) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex) + __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex, + __const struct timespec *__restrict + __abstime) __attribute__ ((__nonnull__ (1, 2, 3))); +extern int pthread_condattr_init (pthread_condattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_condattr_destroy (pthread_condattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_condattr_getpshared (__const pthread_condattr_t * + __restrict __attr, + int *__restrict __pshared) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, + int __pshared) throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_condattr_getclock (__const pthread_condattr_t * + __restrict __attr, + __clockid_t *__restrict __clock_id) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_condattr_setclock (pthread_condattr_t *__attr, + __clockid_t __clock_id) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_spin_destroy (pthread_spinlock_t *__lock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_spin_lock (pthread_spinlock_t *__lock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_spin_trylock (pthread_spinlock_t *__lock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_spin_unlock (pthread_spinlock_t *__lock) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, + __const pthread_barrierattr_t *__restrict + __attr, unsigned int __count) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_barrier_wait (pthread_barrier_t *__barrier) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t * + __restrict __attr, + int *__restrict __pshared) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, + int __pshared) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_key_create (pthread_key_t *__key, + void (*__destr_function) (void *)) + throw () __attribute__ ((__nonnull__ (1))); +extern int pthread_key_delete (pthread_key_t __key) throw (); +extern void *pthread_getspecific (pthread_key_t __key) throw (); +extern int pthread_setspecific (pthread_key_t __key, + __const void *__pointer) throw () ; +extern int pthread_getcpuclockid (pthread_t __thread_id, + __clockid_t *__clock_id) + throw () __attribute__ ((__nonnull__ (2))); +extern int pthread_atfork (void (*__prepare) (void), + void (*__parent) (void), + void (*__child) (void)) throw (); +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__leaf__)) pthread_equal (pthread_t __thread1, pthread_t __thread2) throw () +{ + return __thread1 == __thread2; +} +} +extern "C" { +typedef __ssize_t ssize_t; +typedef __gid_t gid_t; +typedef __uid_t uid_t; +typedef __off_t off_t; +typedef __off64_t off64_t; +typedef __useconds_t useconds_t; +typedef __intptr_t intptr_t; +typedef __socklen_t socklen_t; +extern int access (__const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1))); +extern int euidaccess (__const char *__name, int __type) + throw () __attribute__ ((__nonnull__ (1))); +extern int eaccess (__const char *__name, int __type) + throw () __attribute__ ((__nonnull__ (1))); +extern int faccessat (int __fd, __const char *__file, int __type, int __flag) + throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); +extern __off_t lseek (int __fd, __off_t __offset, int __whence) throw (); +extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) + throw (); +extern int close (int __fd); +extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__)); +extern ssize_t write (int __fd, __const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__)); +extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, + __off_t __offset) __attribute__ ((__warn_unused_result__)); +extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n, + __off_t __offset) __attribute__ ((__warn_unused_result__)); +extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset) __attribute__ ((__warn_unused_result__)); +extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n, + __off64_t __offset) __attribute__ ((__warn_unused_result__)); +extern int pipe (int __pipedes[2]) throw () __attribute__ ((__warn_unused_result__)); +extern int pipe2 (int __pipedes[2], int __flags) throw () __attribute__ ((__warn_unused_result__)); +extern unsigned int alarm (unsigned int __seconds) throw (); +extern unsigned int sleep (unsigned int __seconds); +extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) + throw (); +extern int usleep (__useconds_t __useconds); +extern int pause (void); +extern int chown (__const char *__file, __uid_t __owner, __gid_t __group) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw () __attribute__ ((__warn_unused_result__)); +extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int fchownat (int __fd, __const char *__file, __uid_t __owner, + __gid_t __group, int __flag) + throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); +extern int chdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int fchdir (int __fd) throw () __attribute__ ((__warn_unused_result__)); +extern char *getcwd (char *__buf, size_t __size) throw () __attribute__ ((__warn_unused_result__)); +extern char *get_current_dir_name (void) throw (); +extern char *getwd (char *__buf) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)); +extern int dup (int __fd) throw () __attribute__ ((__warn_unused_result__)); +extern int dup2 (int __fd, int __fd2) throw (); +extern int dup3 (int __fd, int __fd2, int __flags) throw (); +extern char **__environ; +extern char **environ; +extern int execve (__const char *__path, char *__const __argv[], + char *__const __envp[]) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[]) + throw () __attribute__ ((__nonnull__ (2))); +extern int execv (__const char *__path, char *__const __argv[]) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int execle (__const char *__path, __const char *__arg, ...) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int execl (__const char *__path, __const char *__arg, ...) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int execvp (__const char *__file, char *__const __argv[]) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int execlp (__const char *__file, __const char *__arg, ...) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int execvpe (__const char *__file, char *__const __argv[], + char *__const __envp[]) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int nice (int __inc) throw () __attribute__ ((__warn_unused_result__)); +extern void _exit (int __status) __attribute__ ((__noreturn__)); +enum + { + _PC_LINK_MAX, + _PC_MAX_CANON, + _PC_MAX_INPUT, + _PC_NAME_MAX, + _PC_PATH_MAX, + _PC_PIPE_BUF, + _PC_CHOWN_RESTRICTED, + _PC_NO_TRUNC, + _PC_VDISABLE, + _PC_SYNC_IO, + _PC_ASYNC_IO, + _PC_PRIO_IO, + _PC_SOCK_MAXBUF, + _PC_FILESIZEBITS, + _PC_REC_INCR_XFER_SIZE, + _PC_REC_MAX_XFER_SIZE, + _PC_REC_MIN_XFER_SIZE, + _PC_REC_XFER_ALIGN, + _PC_ALLOC_SIZE_MIN, + _PC_SYMLINK_MAX, + _PC_2_SYMLINKS + }; +enum + { + _SC_ARG_MAX, + _SC_CHILD_MAX, + _SC_CLK_TCK, + _SC_NGROUPS_MAX, + _SC_OPEN_MAX, + _SC_STREAM_MAX, + _SC_TZNAME_MAX, + _SC_JOB_CONTROL, + _SC_SAVED_IDS, + _SC_REALTIME_SIGNALS, + _SC_PRIORITY_SCHEDULING, + _SC_TIMERS, + _SC_ASYNCHRONOUS_IO, + _SC_PRIORITIZED_IO, + _SC_SYNCHRONIZED_IO, + _SC_FSYNC, + _SC_MAPPED_FILES, + _SC_MEMLOCK, + _SC_MEMLOCK_RANGE, + _SC_MEMORY_PROTECTION, + _SC_MESSAGE_PASSING, + _SC_SEMAPHORES, + _SC_SHARED_MEMORY_OBJECTS, + _SC_AIO_LISTIO_MAX, + _SC_AIO_MAX, + _SC_AIO_PRIO_DELTA_MAX, + _SC_DELAYTIMER_MAX, + _SC_MQ_OPEN_MAX, + _SC_MQ_PRIO_MAX, + _SC_VERSION, + _SC_PAGESIZE, + _SC_RTSIG_MAX, + _SC_SEM_NSEMS_MAX, + _SC_SEM_VALUE_MAX, + _SC_SIGQUEUE_MAX, + _SC_TIMER_MAX, + _SC_BC_BASE_MAX, + _SC_BC_DIM_MAX, + _SC_BC_SCALE_MAX, + _SC_BC_STRING_MAX, + _SC_COLL_WEIGHTS_MAX, + _SC_EQUIV_CLASS_MAX, + _SC_EXPR_NEST_MAX, + _SC_LINE_MAX, + _SC_RE_DUP_MAX, + _SC_CHARCLASS_NAME_MAX, + _SC_2_VERSION, + _SC_2_C_BIND, + _SC_2_C_DEV, + _SC_2_FORT_DEV, + _SC_2_FORT_RUN, + _SC_2_SW_DEV, + _SC_2_LOCALEDEF, + _SC_PII, + _SC_PII_XTI, + _SC_PII_SOCKET, + _SC_PII_INTERNET, + _SC_PII_OSI, + _SC_POLL, + _SC_SELECT, + _SC_UIO_MAXIOV, + _SC_IOV_MAX = _SC_UIO_MAXIOV, + _SC_PII_INTERNET_STREAM, + _SC_PII_INTERNET_DGRAM, + _SC_PII_OSI_COTS, + _SC_PII_OSI_CLTS, + _SC_PII_OSI_M, + _SC_T_IOV_MAX, + _SC_THREADS, + _SC_THREAD_SAFE_FUNCTIONS, + _SC_GETGR_R_SIZE_MAX, + _SC_GETPW_R_SIZE_MAX, + _SC_LOGIN_NAME_MAX, + _SC_TTY_NAME_MAX, + _SC_THREAD_DESTRUCTOR_ITERATIONS, + _SC_THREAD_KEYS_MAX, + _SC_THREAD_STACK_MIN, + _SC_THREAD_THREADS_MAX, + _SC_THREAD_ATTR_STACKADDR, + _SC_THREAD_ATTR_STACKSIZE, + _SC_THREAD_PRIORITY_SCHEDULING, + _SC_THREAD_PRIO_INHERIT, + _SC_THREAD_PRIO_PROTECT, + _SC_THREAD_PROCESS_SHARED, + _SC_NPROCESSORS_CONF, + _SC_NPROCESSORS_ONLN, + _SC_PHYS_PAGES, + _SC_AVPHYS_PAGES, + _SC_ATEXIT_MAX, + _SC_PASS_MAX, + _SC_XOPEN_VERSION, + _SC_XOPEN_XCU_VERSION, + _SC_XOPEN_UNIX, + _SC_XOPEN_CRYPT, + _SC_XOPEN_ENH_I18N, + _SC_XOPEN_SHM, + _SC_2_CHAR_TERM, + _SC_2_C_VERSION, + _SC_2_UPE, + _SC_XOPEN_XPG2, + _SC_XOPEN_XPG3, + _SC_XOPEN_XPG4, + _SC_CHAR_BIT, + _SC_CHAR_MAX, + _SC_CHAR_MIN, + _SC_INT_MAX, + _SC_INT_MIN, + _SC_LONG_BIT, + _SC_WORD_BIT, + _SC_MB_LEN_MAX, + _SC_NZERO, + _SC_SSIZE_MAX, + _SC_SCHAR_MAX, + _SC_SCHAR_MIN, + _SC_SHRT_MAX, + _SC_SHRT_MIN, + _SC_UCHAR_MAX, + _SC_UINT_MAX, + _SC_ULONG_MAX, + _SC_USHRT_MAX, + _SC_NL_ARGMAX, + _SC_NL_LANGMAX, + _SC_NL_MSGMAX, + _SC_NL_NMAX, + _SC_NL_SETMAX, + _SC_NL_TEXTMAX, + _SC_XBS5_ILP32_OFF32, + _SC_XBS5_ILP32_OFFBIG, + _SC_XBS5_LP64_OFF64, + _SC_XBS5_LPBIG_OFFBIG, + _SC_XOPEN_LEGACY, + _SC_XOPEN_REALTIME, + _SC_XOPEN_REALTIME_THREADS, + _SC_ADVISORY_INFO, + _SC_BARRIERS, + _SC_BASE, + _SC_C_LANG_SUPPORT, + _SC_C_LANG_SUPPORT_R, + _SC_CLOCK_SELECTION, + _SC_CPUTIME, + _SC_THREAD_CPUTIME, + _SC_DEVICE_IO, + _SC_DEVICE_SPECIFIC, + _SC_DEVICE_SPECIFIC_R, + _SC_FD_MGMT, + _SC_FIFO, + _SC_PIPE, + _SC_FILE_ATTRIBUTES, + _SC_FILE_LOCKING, + _SC_FILE_SYSTEM, + _SC_MONOTONIC_CLOCK, + _SC_MULTI_PROCESS, + _SC_SINGLE_PROCESS, + _SC_NETWORKING, + _SC_READER_WRITER_LOCKS, + _SC_SPIN_LOCKS, + _SC_REGEXP, + _SC_REGEX_VERSION, + _SC_SHELL, + _SC_SIGNALS, + _SC_SPAWN, + _SC_SPORADIC_SERVER, + _SC_THREAD_SPORADIC_SERVER, + _SC_SYSTEM_DATABASE, + _SC_SYSTEM_DATABASE_R, + _SC_TIMEOUTS, + _SC_TYPED_MEMORY_OBJECTS, + _SC_USER_GROUPS, + _SC_USER_GROUPS_R, + _SC_2_PBS, + _SC_2_PBS_ACCOUNTING, + _SC_2_PBS_LOCATE, + _SC_2_PBS_MESSAGE, + _SC_2_PBS_TRACK, + _SC_SYMLOOP_MAX, + _SC_STREAMS, + _SC_2_PBS_CHECKPOINT, + _SC_V6_ILP32_OFF32, + _SC_V6_ILP32_OFFBIG, + _SC_V6_LP64_OFF64, + _SC_V6_LPBIG_OFFBIG, + _SC_HOST_NAME_MAX, + _SC_TRACE, + _SC_TRACE_EVENT_FILTER, + _SC_TRACE_INHERIT, + _SC_TRACE_LOG, + _SC_LEVEL1_ICACHE_SIZE, + _SC_LEVEL1_ICACHE_ASSOC, + _SC_LEVEL1_ICACHE_LINESIZE, + _SC_LEVEL1_DCACHE_SIZE, + _SC_LEVEL1_DCACHE_ASSOC, + _SC_LEVEL1_DCACHE_LINESIZE, + _SC_LEVEL2_CACHE_SIZE, + _SC_LEVEL2_CACHE_ASSOC, + _SC_LEVEL2_CACHE_LINESIZE, + _SC_LEVEL3_CACHE_SIZE, + _SC_LEVEL3_CACHE_ASSOC, + _SC_LEVEL3_CACHE_LINESIZE, + _SC_LEVEL4_CACHE_SIZE, + _SC_LEVEL4_CACHE_ASSOC, + _SC_LEVEL4_CACHE_LINESIZE, + _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, + _SC_RAW_SOCKETS, + _SC_V7_ILP32_OFF32, + _SC_V7_ILP32_OFFBIG, + _SC_V7_LP64_OFF64, + _SC_V7_LPBIG_OFFBIG, + _SC_SS_REPL_MAX, + _SC_TRACE_EVENT_NAME_MAX, + _SC_TRACE_NAME_MAX, + _SC_TRACE_SYS_MAX, + _SC_TRACE_USER_EVENT_MAX, + _SC_XOPEN_STREAMS, + _SC_THREAD_ROBUST_PRIO_INHERIT, + _SC_THREAD_ROBUST_PRIO_PROTECT + }; +enum + { + _CS_PATH, + _CS_V6_WIDTH_RESTRICTED_ENVS, + _CS_GNU_LIBC_VERSION, + _CS_GNU_LIBPTHREAD_VERSION, + _CS_V5_WIDTH_RESTRICTED_ENVS, + _CS_V7_WIDTH_RESTRICTED_ENVS, + _CS_LFS_CFLAGS = 1000, + _CS_LFS_LDFLAGS, + _CS_LFS_LIBS, + _CS_LFS_LINTFLAGS, + _CS_LFS64_CFLAGS, + _CS_LFS64_LDFLAGS, + _CS_LFS64_LIBS, + _CS_LFS64_LINTFLAGS, + _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, + _CS_XBS5_ILP32_OFF32_LDFLAGS, + _CS_XBS5_ILP32_OFF32_LIBS, + _CS_XBS5_ILP32_OFF32_LINTFLAGS, + _CS_XBS5_ILP32_OFFBIG_CFLAGS, + _CS_XBS5_ILP32_OFFBIG_LDFLAGS, + _CS_XBS5_ILP32_OFFBIG_LIBS, + _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, + _CS_XBS5_LP64_OFF64_CFLAGS, + _CS_XBS5_LP64_OFF64_LDFLAGS, + _CS_XBS5_LP64_OFF64_LIBS, + _CS_XBS5_LP64_OFF64_LINTFLAGS, + _CS_XBS5_LPBIG_OFFBIG_CFLAGS, + _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, + _CS_XBS5_LPBIG_OFFBIG_LIBS, + _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, + _CS_POSIX_V6_ILP32_OFF32_CFLAGS, + _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, + _CS_POSIX_V6_ILP32_OFF32_LIBS, + _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, + _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, + _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, + _CS_POSIX_V6_ILP32_OFFBIG_LIBS, + _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, + _CS_POSIX_V6_LP64_OFF64_CFLAGS, + _CS_POSIX_V6_LP64_OFF64_LDFLAGS, + _CS_POSIX_V6_LP64_OFF64_LIBS, + _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, + _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, + _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, + _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, + _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, + _CS_POSIX_V7_ILP32_OFF32_CFLAGS, + _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, + _CS_POSIX_V7_ILP32_OFF32_LIBS, + _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, + _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, + _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, + _CS_POSIX_V7_ILP32_OFFBIG_LIBS, + _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, + _CS_POSIX_V7_LP64_OFF64_CFLAGS, + _CS_POSIX_V7_LP64_OFF64_LDFLAGS, + _CS_POSIX_V7_LP64_OFF64_LIBS, + _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, + _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, + _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, + _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, + _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, + _CS_V6_ENV, + _CS_V7_ENV + }; +extern long int pathconf (__const char *__path, int __name) + throw () __attribute__ ((__nonnull__ (1))); +extern long int fpathconf (int __fd, int __name) throw (); +extern long int sysconf (int __name) throw (); +extern size_t confstr (int __name, char *__buf, size_t __len) throw (); +extern __pid_t getpid (void) throw (); +extern __pid_t getppid (void) throw (); +extern __pid_t getpgrp (void) throw (); +extern __pid_t __getpgid (__pid_t __pid) throw (); +extern __pid_t getpgid (__pid_t __pid) throw (); +extern int setpgid (__pid_t __pid, __pid_t __pgid) throw (); +extern int setpgrp (void) throw (); +extern __pid_t setsid (void) throw (); +extern __pid_t getsid (__pid_t __pid) throw (); +extern __uid_t getuid (void) throw (); +extern __uid_t geteuid (void) throw (); +extern __gid_t getgid (void) throw (); +extern __gid_t getegid (void) throw (); +extern int getgroups (int __size, __gid_t __list[]) throw () __attribute__ ((__warn_unused_result__)); +extern int group_member (__gid_t __gid) throw (); +extern int setuid (__uid_t __uid) throw (); +extern int setreuid (__uid_t __ruid, __uid_t __euid) throw (); +extern int seteuid (__uid_t __uid) throw (); +extern int setgid (__gid_t __gid) throw (); +extern int setregid (__gid_t __rgid, __gid_t __egid) throw (); +extern int setegid (__gid_t __gid) throw (); +extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) + throw (); +extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) + throw (); +extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) + throw (); +extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) + throw (); +extern __pid_t fork (void) throw (); +extern __pid_t vfork (void) throw (); +extern char *ttyname (int __fd) throw (); +extern int ttyname_r (int __fd, char *__buf, size_t __buflen) + throw () __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__)); +extern int isatty (int __fd) throw (); +extern int ttyslot (void) throw (); +extern int link (__const char *__from, __const char *__to) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); +extern int linkat (int __fromfd, __const char *__from, int __tofd, + __const char *__to, int __flags) + throw () __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__)); +extern int symlink (__const char *__from, __const char *__to) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); +extern ssize_t readlink (__const char *__restrict __path, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); +extern int symlinkat (__const char *__from, int __tofd, + __const char *__to) throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); +extern ssize_t readlinkat (int __fd, __const char *__restrict __path, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); +extern int unlink (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); +extern int unlinkat (int __fd, __const char *__name, int __flag) + throw () __attribute__ ((__nonnull__ (2))); +extern int rmdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))); +extern __pid_t tcgetpgrp (int __fd) throw (); +extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw (); +extern char *getlogin (void); +extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1))); +extern int setlogin (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); +extern "C" { +extern char *optarg; +extern int optind; +extern int opterr; +extern int optopt; +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) + throw (); +} +extern int gethostname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1))); +extern int sethostname (__const char *__name, size_t __len) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int sethostid (long int __id) throw () __attribute__ ((__warn_unused_result__)); +extern int getdomainname (char *__name, size_t __len) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int setdomainname (__const char *__name, size_t __len) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int vhangup (void) throw (); +extern int revoke (__const char *__file) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int profil (unsigned short int *__sample_buffer, size_t __size, + size_t __offset, unsigned int __scale) + throw () __attribute__ ((__nonnull__ (1))); +extern int acct (__const char *__name) throw (); +extern char *getusershell (void) throw (); +extern void endusershell (void) throw (); +extern void setusershell (void) throw (); +extern int daemon (int __nochdir, int __noclose) throw () __attribute__ ((__warn_unused_result__)); +extern int chroot (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1))); +extern int fsync (int __fd); +extern int syncfs (int __fd) throw (); +extern long int gethostid (void); +extern void sync (void) throw (); +extern int getpagesize (void) throw () __attribute__ ((__const__)); +extern int getdtablesize (void) throw (); +extern int truncate (__const char *__file, __off_t __length) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int truncate64 (__const char *__file, __off64_t __length) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int ftruncate (int __fd, __off_t __length) throw () __attribute__ ((__warn_unused_result__)); +extern int ftruncate64 (int __fd, __off64_t __length) throw () __attribute__ ((__warn_unused_result__)); +extern int brk (void *__addr) throw () __attribute__ ((__warn_unused_result__)); +extern void *sbrk (intptr_t __delta) throw (); +extern long int syscall (long int __sysno, ...) throw (); +extern int lockf (int __fd, int __cmd, __off_t __len) __attribute__ ((__warn_unused_result__)); +extern int lockf64 (int __fd, int __cmd, __off64_t __len) __attribute__ ((__warn_unused_result__)); +extern int fdatasync (int __fildes); +extern char *crypt (__const char *__key, __const char *__salt) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void encrypt (char *__block, int __edflag) throw () __attribute__ ((__nonnull__ (1))); +extern void swab (__const void *__restrict __from, void *__restrict __to, + ssize_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *ctermid (char *__s) throw (); +extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes, + size_t __buflen) __attribute__ ((__warn_unused_result__)); +extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read") + __attribute__ ((__warn_unused_result__)); +extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t +read (int __fd, void *__buf, size_t __nbytes) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__nbytes)) + return __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); + if (__nbytes > __builtin_object_size (__buf, 0)) + return __read_chk_warn (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0)); + } + return __read_alias (__fd, __buf, __nbytes); +} +extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes, + __off_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes, + __off64_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread") + __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") + __attribute__ ((__warn_unused_result__)); +extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread called with bigger length than size of " "the destination buffer"))) + ; +extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread64 called with bigger length than size of " "the destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t +pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__nbytes)) + return __pread_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)); + if ( __nbytes > __builtin_object_size (__buf, 0)) + return __pread_chk_warn (__fd, __buf, __nbytes, __offset, + __builtin_object_size (__buf, 0)); + } + return __pread_alias (__fd, __buf, __nbytes, __offset); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t +pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) +{ + if (__builtin_object_size (__buf, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__nbytes)) + return __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0)); + if ( __nbytes > __builtin_object_size (__buf, 0)) + return __pread64_chk_warn (__fd, __buf, __nbytes, __offset, + __builtin_object_size (__buf, 0)); + } + return __pread64_alias (__fd, __buf, __nbytes, __offset); +} +extern ssize_t __readlink_chk (__const char *__restrict __path, + char *__restrict __buf, size_t __len, + size_t __buflen) + throw () __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlink_alias (__const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __asm__ ("" "readlink") + __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlink_chk_warn (__const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__readlink_chk") + __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t +__attribute__ ((__leaf__)) readlink (__const char *__restrict __path, char *__restrict __buf, size_t __len) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + if ( __len > __builtin_object_size (__buf, 2 > 1)) + return __readlink_chk_warn (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + } + return __readlink_alias (__path, __buf, __len); +} +extern ssize_t __readlinkat_chk (int __fd, __const char *__restrict __path, + char *__restrict __buf, size_t __len, + size_t __buflen) + throw () __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlinkat_alias (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) throw () __asm__ ("" "readlinkat") + __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)); +extern ssize_t __readlinkat_chk_warn (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__readlinkat_chk") + __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t +__attribute__ ((__leaf__)) readlinkat (int __fd, __const char *__restrict __path, char *__restrict __buf, size_t __len) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __readlinkat_chk (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + if (__len > __builtin_object_size (__buf, 2 > 1)) + return __readlinkat_chk_warn (__fd, __path, __buf, __len, + __builtin_object_size (__buf, 2 > 1)); + } + return __readlinkat_alias (__fd, __path, __buf, __len); +} +extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen) + throw () __attribute__ ((__warn_unused_result__)); +extern char *__getcwd_alias (char *__buf, size_t __size) throw () __asm__ ("" "getcwd") + __attribute__ ((__warn_unused_result__)); +extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) throw () __asm__ ("" "__getcwd_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +__attribute__ ((__leaf__)) getcwd (char *__buf, size_t __size) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__size)) + return __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1)); + if (__size > __builtin_object_size (__buf, 2 > 1)) + return __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1)); + } + return __getcwd_alias (__buf, __size); +} +extern char *__getwd_chk (char *__buf, size_t buflen) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern char *__getwd_warn (char *__buf) throw () __asm__ ("" "getwd") + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char * +__attribute__ ((__leaf__)) getwd (char *__buf) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1)); + return __getwd_warn (__buf); +} +extern size_t __confstr_chk (int __name, char *__buf, size_t __len, + size_t __buflen) throw (); +extern size_t __confstr_alias (int __name, char *__buf, size_t __len) throw () __asm__ ("" "confstr") + ; +extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) throw () __asm__ ("" "__confstr_chk") + __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +__attribute__ ((__leaf__)) confstr (int __name, char *__buf, size_t __len) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + if (__builtin_object_size (__buf, 2 > 1) < __len) + return __confstr_chk_warn (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1)); + } + return __confstr_alias (__name, __buf, __len); +} +extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen) + throw () __attribute__ ((__warn_unused_result__)); +extern int __getgroups_alias (int __size, __gid_t __list[]) throw () __asm__ ("" "getgroups") + __attribute__ ((__warn_unused_result__)); +extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) throw () __asm__ ("" "__getgroups_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__leaf__)) getgroups (int __size, __gid_t __list[]) throw () +{ + if (__builtin_object_size (__list, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__size) || __size < 0) + return __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1)); + if (__size * sizeof (__gid_t) > __builtin_object_size (__list, 2 > 1)) + return __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1)); + } + return __getgroups_alias (__size, __list); +} +extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen, + size_t __nreal) throw () __attribute__ ((__nonnull__ (2))); +extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) throw () __asm__ ("" "ttyname_r") + __attribute__ ((__nonnull__ (2))); +extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__ttyname_r_chk") + __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__leaf__)) ttyname_r (int __fd, char *__buf, size_t __buflen) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __ttyname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __ttyname_r_alias (__fd, __buf, __buflen); +} +extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal) + __attribute__ ((__nonnull__ (1))); +extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r") + __attribute__ ((__nonnull__ (1))); +extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk") + __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +getlogin_r (char *__buf, size_t __buflen) +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __getlogin_r_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __getlogin_r_alias (__buf, __buflen); +} +extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal) + throw () __attribute__ ((__nonnull__ (1))); +extern int __gethostname_alias (char *__buf, size_t __buflen) throw () __asm__ ("" "gethostname") + __attribute__ ((__nonnull__ (1))); +extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__gethostname_chk") + __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__leaf__)) gethostname (char *__buf, size_t __buflen) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __gethostname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __gethostname_alias (__buf, __buflen); +} +extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int __getdomainname_alias (char *__buf, size_t __buflen) throw () __asm__ ("" "getdomainname") + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__getdomainname_chk") + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__leaf__)) getdomainname (char *__buf, size_t __buflen) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __getdomainname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __getdomainname_alias (__buf, __buflen); +} +} +typedef pthread_t __gthread_t; +typedef pthread_key_t __gthread_key_t; +typedef pthread_once_t __gthread_once_t; +typedef pthread_mutex_t __gthread_mutex_t; +typedef pthread_mutex_t __gthread_recursive_mutex_t; +typedef pthread_cond_t __gthread_cond_t; +typedef struct timespec __gthread_time_t; +static __typeof(pthread_once) __gthrw_pthread_once __attribute__ ((__weakref__("pthread_once"))); +static __typeof(pthread_getspecific) __gthrw_pthread_getspecific __attribute__ ((__weakref__("pthread_getspecific"))); +static __typeof(pthread_setspecific) __gthrw_pthread_setspecific __attribute__ ((__weakref__("pthread_setspecific"))); +static __typeof(pthread_create) __gthrw_pthread_create __attribute__ ((__weakref__("pthread_create"))); +static __typeof(pthread_join) __gthrw_pthread_join __attribute__ ((__weakref__("pthread_join"))); +static __typeof(pthread_equal) __gthrw_pthread_equal __attribute__ ((__weakref__("pthread_equal"))); +static __typeof(pthread_self) __gthrw_pthread_self __attribute__ ((__weakref__("pthread_self"))); +static __typeof(pthread_detach) __gthrw_pthread_detach __attribute__ ((__weakref__("pthread_detach"))); +static __typeof(pthread_cancel) __gthrw_pthread_cancel __attribute__ ((__weakref__("pthread_cancel"))); +static __typeof(sched_yield) __gthrw_sched_yield __attribute__ ((__weakref__("sched_yield"))); +static __typeof(pthread_mutex_lock) __gthrw_pthread_mutex_lock __attribute__ ((__weakref__("pthread_mutex_lock"))); +static __typeof(pthread_mutex_trylock) __gthrw_pthread_mutex_trylock __attribute__ ((__weakref__("pthread_mutex_trylock"))); +static __typeof(pthread_mutex_timedlock) __gthrw_pthread_mutex_timedlock __attribute__ ((__weakref__("pthread_mutex_timedlock"))); +static __typeof(pthread_mutex_unlock) __gthrw_pthread_mutex_unlock __attribute__ ((__weakref__("pthread_mutex_unlock"))); +static __typeof(pthread_mutex_init) __gthrw_pthread_mutex_init __attribute__ ((__weakref__("pthread_mutex_init"))); +static __typeof(pthread_mutex_destroy) __gthrw_pthread_mutex_destroy __attribute__ ((__weakref__("pthread_mutex_destroy"))); +static __typeof(pthread_cond_broadcast) __gthrw_pthread_cond_broadcast __attribute__ ((__weakref__("pthread_cond_broadcast"))); +static __typeof(pthread_cond_signal) __gthrw_pthread_cond_signal __attribute__ ((__weakref__("pthread_cond_signal"))); +static __typeof(pthread_cond_wait) __gthrw_pthread_cond_wait __attribute__ ((__weakref__("pthread_cond_wait"))); +static __typeof(pthread_cond_timedwait) __gthrw_pthread_cond_timedwait __attribute__ ((__weakref__("pthread_cond_timedwait"))); +static __typeof(pthread_cond_destroy) __gthrw_pthread_cond_destroy __attribute__ ((__weakref__("pthread_cond_destroy"))); +static __typeof(pthread_key_create) __gthrw_pthread_key_create __attribute__ ((__weakref__("pthread_key_create"))); +static __typeof(pthread_key_delete) __gthrw_pthread_key_delete __attribute__ ((__weakref__("pthread_key_delete"))); +static __typeof(pthread_mutexattr_init) __gthrw_pthread_mutexattr_init __attribute__ ((__weakref__("pthread_mutexattr_init"))); +static __typeof(pthread_mutexattr_settype) __gthrw_pthread_mutexattr_settype __attribute__ ((__weakref__("pthread_mutexattr_settype"))); +static __typeof(pthread_mutexattr_destroy) __gthrw_pthread_mutexattr_destroy __attribute__ ((__weakref__("pthread_mutexattr_destroy"))); +static inline int +__gthread_active_p (void) +{ + static void *const __gthread_active_ptr + = __extension__ (void *) & + __gthrw_pthread_cancel; + return __gthread_active_ptr != 0; +} +static inline int +__gthread_create (__gthread_t *__threadid, void *(*__func) (void*), + void *__args) +{ + return __gthrw_pthread_create (__threadid, __null, __func, __args); +} +static inline int +__gthread_join (__gthread_t __threadid, void **__value_ptr) +{ + return __gthrw_pthread_join (__threadid, __value_ptr); +} +static inline int +__gthread_detach (__gthread_t __threadid) +{ + return __gthrw_pthread_detach (__threadid); +} +static inline int +__gthread_equal (__gthread_t __t1, __gthread_t __t2) +{ + return __gthrw_pthread_equal (__t1, __t2); +} +static inline __gthread_t +__gthread_self (void) +{ + return __gthrw_pthread_self (); +} +static inline int +__gthread_yield (void) +{ + return __gthrw_sched_yield (); +} +static inline int +__gthread_once (__gthread_once_t *__once, void (*__func) (void)) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_once (__once, __func); + else + return -1; +} +static inline int +__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *)) +{ + return __gthrw_pthread_key_create (__key, __dtor); +} +static inline int +__gthread_key_delete (__gthread_key_t __key) +{ + return __gthrw_pthread_key_delete (__key); +} +static inline void * +__gthread_getspecific (__gthread_key_t __key) +{ + return __gthrw_pthread_getspecific (__key); +} +static inline int +__gthread_setspecific (__gthread_key_t __key, const void *__ptr) +{ + return __gthrw_pthread_setspecific (__key, __ptr); +} +static inline int +__gthread_mutex_destroy (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_destroy (__mutex); + else + return 0; +} +static inline int +__gthread_mutex_lock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_lock (__mutex); + else + return 0; +} +static inline int +__gthread_mutex_trylock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_trylock (__mutex); + else + return 0; +} +static inline int +__gthread_mutex_timedlock (__gthread_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_timedlock (__mutex, __abs_timeout); + else + return 0; +} +static inline int +__gthread_mutex_unlock (__gthread_mutex_t *__mutex) +{ + if (__gthread_active_p ()) + return __gthrw_pthread_mutex_unlock (__mutex); + else + return 0; +} +static inline int +__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_lock (__mutex); +} +static inline int +__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_trylock (__mutex); +} +static inline int +__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return __gthread_mutex_timedlock (__mutex, __abs_timeout); +} +static inline int +__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_unlock (__mutex); +} +static inline int +__gthread_cond_broadcast (__gthread_cond_t *__cond) +{ + return __gthrw_pthread_cond_broadcast (__cond); +} +static inline int +__gthread_cond_signal (__gthread_cond_t *__cond) +{ + return __gthrw_pthread_cond_signal (__cond); +} +static inline int +__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex) +{ + return __gthrw_pthread_cond_wait (__cond, __mutex); +} +static inline int +__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return __gthrw_pthread_cond_timedwait (__cond, __mutex, __abs_timeout); +} +static inline int +__gthread_cond_wait_recursive (__gthread_cond_t *__cond, + __gthread_recursive_mutex_t *__mutex) +{ + return __gthread_cond_wait (__cond, __mutex); +} +static inline int +__gthread_cond_timedwait_recursive (__gthread_cond_t *__cond, + __gthread_recursive_mutex_t *__mutex, + const __gthread_time_t *__abs_timeout) +{ + return __gthread_cond_timedwait (__cond, __mutex, __abs_timeout); +} +static inline int +__gthread_cond_destroy (__gthread_cond_t* __cond) +{ + return __gthrw_pthread_cond_destroy (__cond); +} +#pragma GCC visibility pop +typedef int _Atomic_word; +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) +{ + static inline _Atomic_word + __exchange_and_add(volatile _Atomic_word* __mem, int __val) + { return __sync_fetch_and_add(__mem, __val); } + static inline void + __atomic_add(volatile _Atomic_word* __mem, int __val) + { __sync_fetch_and_add(__mem, __val); } + static inline _Atomic_word + __exchange_and_add_single(_Atomic_word* __mem, int __val) + { + _Atomic_word __result = *__mem; + *__mem += __val; + return __result; + } + static inline void + __atomic_add_single(_Atomic_word* __mem, int __val) + { *__mem += __val; } + static inline _Atomic_word + __attribute__ ((__unused__)) + __exchange_and_add_dispatch(_Atomic_word* __mem, int __val) + { + if (__gthread_active_p()) + return __exchange_and_add(__mem, __val); + else + return __exchange_and_add_single(__mem, __val); + } + static inline void + __attribute__ ((__unused__)) + __atomic_add_dispatch(_Atomic_word* __mem, int __val) + { + if (__gthread_active_p()) + __atomic_add(__mem, __val); + else + __atomic_add_single(__mem, __val); + } +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + class basic_string + { + typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type; + public: + typedef _Traits traits_type; + typedef typename _Traits::char_type value_type; + typedef _Alloc allocator_type; + typedef typename _CharT_alloc_type::size_type size_type; + typedef typename _CharT_alloc_type::difference_type difference_type; + typedef typename _CharT_alloc_type::reference reference; + typedef typename _CharT_alloc_type::const_reference const_reference; + typedef typename _CharT_alloc_type::pointer pointer; + typedef typename _CharT_alloc_type::const_pointer const_pointer; + typedef __gnu_cxx::__normal_iterator iterator; + typedef __gnu_cxx::__normal_iterator + const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + private: + struct _Rep_base + { + size_type _M_length; + size_type _M_capacity; + _Atomic_word _M_refcount; + }; + struct _Rep : _Rep_base + { + typedef typename _Alloc::template rebind::other _Raw_bytes_alloc; + static const size_type _S_max_size; + static const _CharT _S_terminal; + static size_type _S_empty_rep_storage[]; + static _Rep& + _S_empty_rep() + { + void* __p = reinterpret_cast(&_S_empty_rep_storage); + return *reinterpret_cast<_Rep*>(__p); + } + bool + _M_is_leaked() const + { return this->_M_refcount < 0; } + bool + _M_is_shared() const + { return this->_M_refcount > 0; } + void + _M_set_leaked() + { this->_M_refcount = -1; } + void + _M_set_sharable() + { this->_M_refcount = 0; } + void + _M_set_length_and_sharable(size_type __n) + { + if (__builtin_expect(this != &_S_empty_rep(), false)) + { + this->_M_set_sharable(); + this->_M_length = __n; + traits_type::assign(this->_M_refdata()[__n], _S_terminal); + } + } + _CharT* + _M_refdata() throw() + { return reinterpret_cast<_CharT*>(this + 1); } + _CharT* + _M_grab(const _Alloc& __alloc1, const _Alloc& __alloc2) + { + return (!_M_is_leaked() && __alloc1 == __alloc2) + ? _M_refcopy() : _M_clone(__alloc1); + } + static _Rep* + _S_create(size_type, size_type, const _Alloc&); + void + _M_dispose(const _Alloc& __a) + { + if (__builtin_expect(this != &_S_empty_rep(), false)) + { + ; + if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount, + -1) <= 0) + { + ; + _M_destroy(__a); + } + } + } + void + _M_destroy(const _Alloc&) throw(); + _CharT* + _M_refcopy() throw() + { + if (__builtin_expect(this != &_S_empty_rep(), false)) + __gnu_cxx::__atomic_add_dispatch(&this->_M_refcount, 1); + return _M_refdata(); + } + _CharT* + _M_clone(const _Alloc&, size_type __res = 0); + }; + struct _Alloc_hider : _Alloc + { + _Alloc_hider(_CharT* __dat, const _Alloc& __a) + : _Alloc(__a), _M_p(__dat) { } + _CharT* _M_p; + }; + public: + static const size_type npos = static_cast(-1); + private: + mutable _Alloc_hider _M_dataplus; + _CharT* + _M_data() const + { return _M_dataplus._M_p; } + _CharT* + _M_data(_CharT* __p) + { return (_M_dataplus._M_p = __p); } + _Rep* + _M_rep() const + { return &((reinterpret_cast<_Rep*> (_M_data()))[-1]); } + iterator + _M_ibegin() const + { return iterator(_M_data()); } + iterator + _M_iend() const + { return iterator(_M_data() + this->size()); } + void + _M_leak() + { + if (!_M_rep()->_M_is_leaked()) + _M_leak_hard(); + } + size_type + _M_check(size_type __pos, const char* __s) const + { + if (__pos > this->size()) + __throw_out_of_range((__s)); + return __pos; + } + void + _M_check_length(size_type __n1, size_type __n2, const char* __s) const + { + if (this->max_size() - (this->size() - __n1) < __n2) + __throw_length_error((__s)); + } + size_type + _M_limit(size_type __pos, size_type __off) const + { + const bool __testoff = __off < this->size() - __pos; + return __testoff ? __off : this->size() - __pos; + } + bool + _M_disjunct(const _CharT* __s) const + { + return (less()(__s, _M_data()) + || less()(_M_data() + this->size(), __s)); + } + static void + _M_copy(_CharT* __d, const _CharT* __s, size_type __n) + { + if (__n == 1) + traits_type::assign(*__d, *__s); + else + traits_type::copy(__d, __s, __n); + } + static void + _M_move(_CharT* __d, const _CharT* __s, size_type __n) + { + if (__n == 1) + traits_type::assign(*__d, *__s); + else + traits_type::move(__d, __s, __n); + } + static void + _M_assign(_CharT* __d, size_type __n, _CharT __c) + { + if (__n == 1) + traits_type::assign(*__d, __c); + else + traits_type::assign(__d, __n, __c); + } + template + static void + _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2) + { + for (; __k1 != __k2; ++__k1, ++__p) + traits_type::assign(*__p, *__k1); + } + static void + _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2) + { _S_copy_chars(__p, __k1.base(), __k2.base()); } + static void + _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2) + { _S_copy_chars(__p, __k1.base(), __k2.base()); } + static void + _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2) + { _M_copy(__p, __k1, __k2 - __k1); } + static void + _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2) + { _M_copy(__p, __k1, __k2 - __k1); } + static int + _S_compare(size_type __n1, size_type __n2) + { + const difference_type __d = difference_type(__n1 - __n2); + if (__d > __gnu_cxx::__numeric_traits::__max) + return __gnu_cxx::__numeric_traits::__max; + else if (__d < __gnu_cxx::__numeric_traits::__min) + return __gnu_cxx::__numeric_traits::__min; + else + return int(__d); + } + void + _M_mutate(size_type __pos, size_type __len1, size_type __len2); + void + _M_leak_hard(); + static _Rep& + _S_empty_rep() + { return _Rep::_S_empty_rep(); } + public: + basic_string() + : _M_dataplus(_S_empty_rep()._M_refdata(), _Alloc()) { } + explicit + basic_string(const _Alloc& __a); + basic_string(const basic_string& __str); + basic_string(const basic_string& __str, size_type __pos, + size_type __n = npos); + basic_string(const basic_string& __str, size_type __pos, + size_type __n, const _Alloc& __a); + basic_string(const _CharT* __s, size_type __n, + const _Alloc& __a = _Alloc()); + basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()); + basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc()); + template + basic_string(_InputIterator __beg, _InputIterator __end, + const _Alloc& __a = _Alloc()); + ~basic_string() + { _M_rep()->_M_dispose(this->get_allocator()); } + basic_string& + operator=(const basic_string& __str) + { return this->assign(__str); } + basic_string& + operator=(const _CharT* __s) + { return this->assign(__s); } + basic_string& + operator=(_CharT __c) + { + this->assign(1, __c); + return *this; + } + iterator + begin() + { + _M_leak(); + return iterator(_M_data()); + } + const_iterator + begin() const + { return const_iterator(_M_data()); } + iterator + end() + { + _M_leak(); + return iterator(_M_data() + this->size()); + } + const_iterator + end() const + { return const_iterator(_M_data() + this->size()); } + reverse_iterator + rbegin() + { return reverse_iterator(this->end()); } + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(this->end()); } + reverse_iterator + rend() + { return reverse_iterator(this->begin()); } + const_reverse_iterator + rend() const + { return const_reverse_iterator(this->begin()); } + public: + size_type + size() const + { return _M_rep()->_M_length; } + size_type + length() const + { return _M_rep()->_M_length; } + size_type + max_size() const + { return _Rep::_S_max_size; } + void + resize(size_type __n, _CharT __c); + void + resize(size_type __n) + { this->resize(__n, _CharT()); } + size_type + capacity() const + { return _M_rep()->_M_capacity; } + void + reserve(size_type __res_arg = 0); + void + clear() + { _M_mutate(0, this->size(), 0); } + bool + empty() const + { return this->size() == 0; } + const_reference + operator[] (size_type __pos) const + { + ; + return _M_data()[__pos]; + } + reference + operator[](size_type __pos) + { + ; + ; + _M_leak(); + return _M_data()[__pos]; + } + const_reference + at(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range(("basic_string::at")); + return _M_data()[__n]; + } + reference + at(size_type __n) + { + if (__n >= size()) + __throw_out_of_range(("basic_string::at")); + _M_leak(); + return _M_data()[__n]; + } + basic_string& + operator+=(const basic_string& __str) + { return this->append(__str); } + basic_string& + operator+=(const _CharT* __s) + { return this->append(__s); } + basic_string& + operator+=(_CharT __c) + { + this->push_back(__c); + return *this; + } + basic_string& + append(const basic_string& __str); + basic_string& + append(const basic_string& __str, size_type __pos, size_type __n); + basic_string& + append(const _CharT* __s, size_type __n); + basic_string& + append(const _CharT* __s) + { + ; + return this->append(__s, traits_type::length(__s)); + } + basic_string& + append(size_type __n, _CharT __c); + template + basic_string& + append(_InputIterator __first, _InputIterator __last) + { return this->replace(_M_iend(), _M_iend(), __first, __last); } + void + push_back(_CharT __c) + { + const size_type __len = 1 + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + this->reserve(__len); + traits_type::assign(_M_data()[this->size()], __c); + _M_rep()->_M_set_length_and_sharable(__len); + } + basic_string& + assign(const basic_string& __str); + basic_string& + assign(const basic_string& __str, size_type __pos, size_type __n) + { return this->assign(__str._M_data() + + __str._M_check(__pos, "basic_string::assign"), + __str._M_limit(__pos, __n)); } + basic_string& + assign(const _CharT* __s, size_type __n); + basic_string& + assign(const _CharT* __s) + { + ; + return this->assign(__s, traits_type::length(__s)); + } + basic_string& + assign(size_type __n, _CharT __c) + { return _M_replace_aux(size_type(0), this->size(), __n, __c); } + template + basic_string& + assign(_InputIterator __first, _InputIterator __last) + { return this->replace(_M_ibegin(), _M_iend(), __first, __last); } + void + insert(iterator __p, size_type __n, _CharT __c) + { this->replace(__p, __p, __n, __c); } + template + void + insert(iterator __p, _InputIterator __beg, _InputIterator __end) + { this->replace(__p, __p, __beg, __end); } + basic_string& + insert(size_type __pos1, const basic_string& __str) + { return this->insert(__pos1, __str, size_type(0), __str.size()); } + basic_string& + insert(size_type __pos1, const basic_string& __str, + size_type __pos2, size_type __n) + { return this->insert(__pos1, __str._M_data() + + __str._M_check(__pos2, "basic_string::insert"), + __str._M_limit(__pos2, __n)); } + basic_string& + insert(size_type __pos, const _CharT* __s, size_type __n); + basic_string& + insert(size_type __pos, const _CharT* __s) + { + ; + return this->insert(__pos, __s, traits_type::length(__s)); + } + basic_string& + insert(size_type __pos, size_type __n, _CharT __c) + { return _M_replace_aux(_M_check(__pos, "basic_string::insert"), + size_type(0), __n, __c); } + iterator + insert(iterator __p, _CharT __c) + { + ; + const size_type __pos = __p - _M_ibegin(); + _M_replace_aux(__pos, size_type(0), size_type(1), __c); + _M_rep()->_M_set_leaked(); + return iterator(_M_data() + __pos); + } + basic_string& + erase(size_type __pos = 0, size_type __n = npos) + { + _M_mutate(_M_check(__pos, "basic_string::erase"), + _M_limit(__pos, __n), size_type(0)); + return *this; + } + iterator + erase(iterator __position) + { + ; + const size_type __pos = __position - _M_ibegin(); + _M_mutate(__pos, size_type(1), size_type(0)); + _M_rep()->_M_set_leaked(); + return iterator(_M_data() + __pos); + } + iterator + erase(iterator __first, iterator __last); + basic_string& + replace(size_type __pos, size_type __n, const basic_string& __str) + { return this->replace(__pos, __n, __str._M_data(), __str.size()); } + basic_string& + replace(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2) + { return this->replace(__pos1, __n1, __str._M_data() + + __str._M_check(__pos2, "basic_string::replace"), + __str._M_limit(__pos2, __n2)); } + basic_string& + replace(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2); + basic_string& + replace(size_type __pos, size_type __n1, const _CharT* __s) + { + ; + return this->replace(__pos, __n1, __s, traits_type::length(__s)); + } + basic_string& + replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c) + { return _M_replace_aux(_M_check(__pos, "basic_string::replace"), + _M_limit(__pos, __n1), __n2, __c); } + basic_string& + replace(iterator __i1, iterator __i2, const basic_string& __str) + { return this->replace(__i1, __i2, __str._M_data(), __str.size()); } + basic_string& + replace(iterator __i1, iterator __i2, const _CharT* __s, size_type __n) + { + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n); + } + basic_string& + replace(iterator __i1, iterator __i2, const _CharT* __s) + { + ; + return this->replace(__i1, __i2, __s, traits_type::length(__s)); + } + basic_string& + replace(iterator __i1, iterator __i2, size_type __n, _CharT __c) + { + ; + return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __c); + } + template + basic_string& + replace(iterator __i1, iterator __i2, + _InputIterator __k1, _InputIterator __k2) + { + ; + ; + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + return _M_replace_dispatch(__i1, __i2, __k1, __k2, _Integral()); + } + basic_string& + replace(iterator __i1, iterator __i2, _CharT* __k1, _CharT* __k2) + { + ; + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, + __k1, __k2 - __k1); + } + basic_string& + replace(iterator __i1, iterator __i2, + const _CharT* __k1, const _CharT* __k2) + { + ; + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, + __k1, __k2 - __k1); + } + basic_string& + replace(iterator __i1, iterator __i2, iterator __k1, iterator __k2) + { + ; + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, + __k1.base(), __k2 - __k1); + } + basic_string& + replace(iterator __i1, iterator __i2, + const_iterator __k1, const_iterator __k2) + { + ; + ; + return this->replace(__i1 - _M_ibegin(), __i2 - __i1, + __k1.base(), __k2 - __k1); + } + private: + template + basic_string& + _M_replace_dispatch(iterator __i1, iterator __i2, _Integer __n, + _Integer __val, __true_type) + { return _M_replace_aux(__i1 - _M_ibegin(), __i2 - __i1, __n, __val); } + template + basic_string& + _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, + _InputIterator __k2, __false_type); + basic_string& + _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, + _CharT __c); + basic_string& + _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, + size_type __n2); + template + static _CharT* + _S_construct_aux(_InIterator __beg, _InIterator __end, + const _Alloc& __a, __false_type) + { + typedef typename iterator_traits<_InIterator>::iterator_category _Tag; + return _S_construct(__beg, __end, __a, _Tag()); + } + template + static _CharT* + _S_construct_aux(_Integer __beg, _Integer __end, + const _Alloc& __a, __true_type) + { return _S_construct_aux_2(static_cast(__beg), + __end, __a); } + static _CharT* + _S_construct_aux_2(size_type __req, _CharT __c, const _Alloc& __a) + { return _S_construct(__req, __c, __a); } + template + static _CharT* + _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a) + { + typedef typename std::__is_integer<_InIterator>::__type _Integral; + return _S_construct_aux(__beg, __end, __a, _Integral()); + } + template + static _CharT* + _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, + input_iterator_tag); + template + static _CharT* + _S_construct(_FwdIterator __beg, _FwdIterator __end, const _Alloc& __a, + forward_iterator_tag); + static _CharT* + _S_construct(size_type __req, _CharT __c, const _Alloc& __a); + public: + size_type + copy(_CharT* __s, size_type __n, size_type __pos = 0) const; + void + swap(basic_string& __s); + const _CharT* + c_str() const + { return _M_data(); } + const _CharT* + data() const + { return _M_data(); } + allocator_type + get_allocator() const + { return _M_dataplus; } + size_type + find(const _CharT* __s, size_type __pos, size_type __n) const; + size_type + find(const basic_string& __str, size_type __pos = 0) const + { return this->find(__str.data(), __pos, __str.size()); } + size_type + find(const _CharT* __s, size_type __pos = 0) const + { + ; + return this->find(__s, __pos, traits_type::length(__s)); + } + size_type + find(_CharT __c, size_type __pos = 0) const; + size_type + rfind(const basic_string& __str, size_type __pos = npos) const + { return this->rfind(__str.data(), __pos, __str.size()); } + size_type + rfind(const _CharT* __s, size_type __pos, size_type __n) const; + size_type + rfind(const _CharT* __s, size_type __pos = npos) const + { + ; + return this->rfind(__s, __pos, traits_type::length(__s)); + } + size_type + rfind(_CharT __c, size_type __pos = npos) const; + size_type + find_first_of(const basic_string& __str, size_type __pos = 0) const + { return this->find_first_of(__str.data(), __pos, __str.size()); } + size_type + find_first_of(const _CharT* __s, size_type __pos, size_type __n) const; + size_type + find_first_of(const _CharT* __s, size_type __pos = 0) const + { + ; + return this->find_first_of(__s, __pos, traits_type::length(__s)); + } + size_type + find_first_of(_CharT __c, size_type __pos = 0) const + { return this->find(__c, __pos); } + size_type + find_last_of(const basic_string& __str, size_type __pos = npos) const + { return this->find_last_of(__str.data(), __pos, __str.size()); } + size_type + find_last_of(const _CharT* __s, size_type __pos, size_type __n) const; + size_type + find_last_of(const _CharT* __s, size_type __pos = npos) const + { + ; + return this->find_last_of(__s, __pos, traits_type::length(__s)); + } + size_type + find_last_of(_CharT __c, size_type __pos = npos) const + { return this->rfind(__c, __pos); } + size_type + find_first_not_of(const basic_string& __str, size_type __pos = 0) const + { return this->find_first_not_of(__str.data(), __pos, __str.size()); } + size_type + find_first_not_of(const _CharT* __s, size_type __pos, + size_type __n) const; + size_type + find_first_not_of(const _CharT* __s, size_type __pos = 0) const + { + ; + return this->find_first_not_of(__s, __pos, traits_type::length(__s)); + } + size_type + find_first_not_of(_CharT __c, size_type __pos = 0) const; + size_type + find_last_not_of(const basic_string& __str, size_type __pos = npos) const + { return this->find_last_not_of(__str.data(), __pos, __str.size()); } + size_type + find_last_not_of(const _CharT* __s, size_type __pos, + size_type __n) const; + size_type + find_last_not_of(const _CharT* __s, size_type __pos = npos) const + { + ; + return this->find_last_not_of(__s, __pos, traits_type::length(__s)); + } + size_type + find_last_not_of(_CharT __c, size_type __pos = npos) const; + basic_string + substr(size_type __pos = 0, size_type __n = npos) const + { return basic_string(*this, + _M_check(__pos, "basic_string::substr"), __n); } + int + compare(const basic_string& __str) const + { + const size_type __size = this->size(); + const size_type __osize = __str.size(); + const size_type __len = std::min(__size, __osize); + int __r = traits_type::compare(_M_data(), __str.data(), __len); + if (!__r) + __r = _S_compare(__size, __osize); + return __r; + } + int + compare(size_type __pos, size_type __n, const basic_string& __str) const; + int + compare(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2) const; + int + compare(const _CharT* __s) const; + int + compare(size_type __pos, size_type __n1, const _CharT* __s) const; + int + compare(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) const; + }; + template + basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + basic_string<_CharT, _Traits, _Alloc> __str(__lhs); + __str.append(__rhs); + return __str; + } + template + basic_string<_CharT,_Traits,_Alloc> + operator+(const _CharT* __lhs, + const basic_string<_CharT,_Traits,_Alloc>& __rhs); + template + basic_string<_CharT,_Traits,_Alloc> + operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs); + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { + basic_string<_CharT, _Traits, _Alloc> __str(__lhs); + __str.append(__rhs); + return __str; + } + template + inline basic_string<_CharT, _Traits, _Alloc> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) + { + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + __string_type __str(__lhs); + __str.append(__size_type(1), __rhs); + return __str; + } + template + inline bool + operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) == 0; } + template + inline + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, bool>::__type + operator==(const basic_string<_CharT>& __lhs, + const basic_string<_CharT>& __rhs) + { return (__lhs.size() == __rhs.size() + && !std::char_traits<_CharT>::compare(__lhs.data(), __rhs.data(), + __lhs.size())); } + template + inline bool + operator==(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) == 0; } + template + inline bool + operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) == 0; } + template + inline bool + operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return !(__lhs == __rhs); } + template + inline bool + operator!=(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return !(__lhs == __rhs); } + template + inline bool + operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return !(__lhs == __rhs); } + template + inline bool + operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) < 0; } + template + inline bool + operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) < 0; } + template + inline bool + operator<(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) > 0; } + template + inline bool + operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) > 0; } + template + inline bool + operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) > 0; } + template + inline bool + operator>(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) < 0; } + template + inline bool + operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) <= 0; } + template + inline bool + operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) <= 0; } + template + inline bool + operator<=(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) >= 0; } + template + inline bool + operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __lhs.compare(__rhs) >= 0; } + template + inline bool + operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, + const _CharT* __rhs) + { return __lhs.compare(__rhs) >= 0; } + template + inline bool + operator>=(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { return __rhs.compare(__lhs) <= 0; } + template + inline void + swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, + basic_string<_CharT, _Traits, _Alloc>& __rhs) + { __lhs.swap(__rhs); } + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str); + template<> + basic_istream& + operator>>(basic_istream& __is, basic_string& __str); + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, + const basic_string<_CharT, _Traits, _Alloc>& __str) + { + return __ostream_insert(__os, __str.data(), __str.size()); + } + template + basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim); + template + inline basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT, _Traits, _Alloc>& __str) + { return getline(__is, __str, __is.widen('\n')); } + template<> + basic_istream& + getline(basic_istream& __in, basic_string& __str, + char __delim); + template<> + basic_istream& + getline(basic_istream& __in, basic_string& __str, + wchar_t __delim); +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + const typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + _Rep::_S_max_size = (((npos - sizeof(_Rep_base))/sizeof(_CharT)) - 1) / 4; + template + const _CharT + basic_string<_CharT, _Traits, _Alloc>:: + _Rep::_S_terminal = _CharT(); + template + const typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>::npos; + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_empty_rep_storage[ + (sizeof(_Rep_base) + sizeof(_CharT) + sizeof(size_type) - 1) / + sizeof(size_type)]; + template + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>:: + _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, + input_iterator_tag) + { + if (__beg == __end && __a == _Alloc()) + return _S_empty_rep()._M_refdata(); + _CharT __buf[128]; + size_type __len = 0; + while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT)) + { + __buf[__len++] = *__beg; + ++__beg; + } + _Rep* __r = _Rep::_S_create(__len, size_type(0), __a); + _M_copy(__r->_M_refdata(), __buf, __len); + try + { + while (__beg != __end) + { + if (__len == __r->_M_capacity) + { + _Rep* __another = _Rep::_S_create(__len + 1, __len, __a); + _M_copy(__another->_M_refdata(), __r->_M_refdata(), __len); + __r->_M_destroy(__a); + __r = __another; + } + __r->_M_refdata()[__len++] = *__beg; + ++__beg; + } + } + catch(...) + { + __r->_M_destroy(__a); + throw; + } + __r->_M_set_length_and_sharable(__len); + return __r->_M_refdata(); + } + template + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>:: + _S_construct(_InIterator __beg, _InIterator __end, const _Alloc& __a, + forward_iterator_tag) + { + if (__beg == __end && __a == _Alloc()) + return _S_empty_rep()._M_refdata(); + if (__gnu_cxx::__is_null_pointer(__beg) && __beg != __end) + __throw_logic_error(("basic_string::_S_construct null not valid")); + const size_type __dnew = static_cast(std::distance(__beg, + __end)); + _Rep* __r = _Rep::_S_create(__dnew, size_type(0), __a); + try + { _S_copy_chars(__r->_M_refdata(), __beg, __end); } + catch(...) + { + __r->_M_destroy(__a); + throw; + } + __r->_M_set_length_and_sharable(__dnew); + return __r->_M_refdata(); + } + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>:: + _S_construct(size_type __n, _CharT __c, const _Alloc& __a) + { + if (__n == 0 && __a == _Alloc()) + return _S_empty_rep()._M_refdata(); + _Rep* __r = _Rep::_S_create(__n, size_type(0), __a); + if (__n) + _M_assign(__r->_M_refdata(), __n, __c); + __r->_M_set_length_and_sharable(__n); + return __r->_M_refdata(); + } + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const basic_string& __str) + : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(__str.get_allocator()), + __str.get_allocator()), + __str.get_allocator()) + { } + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const _Alloc& __a) + : _M_dataplus(_S_construct(size_type(), _CharT(), __a), __a) + { } + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const basic_string& __str, size_type __pos, size_type __n) + : _M_dataplus(_S_construct(__str._M_data() + + __str._M_check(__pos, + "basic_string::basic_string"), + __str._M_data() + __str._M_limit(__pos, __n) + + __pos, _Alloc()), _Alloc()) + { } + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const basic_string& __str, size_type __pos, + size_type __n, const _Alloc& __a) + : _M_dataplus(_S_construct(__str._M_data() + + __str._M_check(__pos, + "basic_string::basic_string"), + __str._M_data() + __str._M_limit(__pos, __n) + + __pos, __a), __a) + { } + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const _CharT* __s, size_type __n, const _Alloc& __a) + : _M_dataplus(_S_construct(__s, __s + __n, __a), __a) + { } + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(const _CharT* __s, const _Alloc& __a) + : _M_dataplus(_S_construct(__s, __s ? __s + traits_type::length(__s) : + __s + npos, __a), __a) + { } + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(size_type __n, _CharT __c, const _Alloc& __a) + : _M_dataplus(_S_construct(__n, __c, __a), __a) + { } + template + template + basic_string<_CharT, _Traits, _Alloc>:: + basic_string(_InputIterator __beg, _InputIterator __end, const _Alloc& __a) + : _M_dataplus(_S_construct(__beg, __end, __a), __a) + { } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + assign(const basic_string& __str) + { + if (_M_rep() != __str._M_rep()) + { + const allocator_type __a = this->get_allocator(); + _CharT* __tmp = __str._M_rep()->_M_grab(__a, __str.get_allocator()); + _M_rep()->_M_dispose(__a); + _M_data(__tmp); + } + return *this; + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + assign(const _CharT* __s, size_type __n) + { + ; + _M_check_length(this->size(), __n, "basic_string::assign"); + if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) + return _M_replace_safe(size_type(0), this->size(), __s, __n); + else + { + const size_type __pos = __s - _M_data(); + if (__pos >= __n) + _M_copy(_M_data(), __s, __n); + else if (__pos) + _M_move(_M_data(), __s, __n); + _M_rep()->_M_set_length_and_sharable(__n); + return *this; + } + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + append(size_type __n, _CharT __c) + { + if (__n) + { + _M_check_length(size_type(0), __n, "basic_string::append"); + const size_type __len = __n + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + this->reserve(__len); + _M_assign(_M_data() + this->size(), __n, __c); + _M_rep()->_M_set_length_and_sharable(__len); + } + return *this; + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + append(const _CharT* __s, size_type __n) + { + ; + if (__n) + { + _M_check_length(size_type(0), __n, "basic_string::append"); + const size_type __len = __n + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + { + if (_M_disjunct(__s)) + this->reserve(__len); + else + { + const size_type __off = __s - _M_data(); + this->reserve(__len); + __s = _M_data() + __off; + } + } + _M_copy(_M_data() + this->size(), __s, __n); + _M_rep()->_M_set_length_and_sharable(__len); + } + return *this; + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + append(const basic_string& __str) + { + const size_type __size = __str.size(); + if (__size) + { + const size_type __len = __size + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + this->reserve(__len); + _M_copy(_M_data() + this->size(), __str._M_data(), __size); + _M_rep()->_M_set_length_and_sharable(__len); + } + return *this; + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + append(const basic_string& __str, size_type __pos, size_type __n) + { + __str._M_check(__pos, "basic_string::append"); + __n = __str._M_limit(__pos, __n); + if (__n) + { + const size_type __len = __n + this->size(); + if (__len > this->capacity() || _M_rep()->_M_is_shared()) + this->reserve(__len); + _M_copy(_M_data() + this->size(), __str._M_data() + __pos, __n); + _M_rep()->_M_set_length_and_sharable(__len); + } + return *this; + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + insert(size_type __pos, const _CharT* __s, size_type __n) + { + ; + _M_check(__pos, "basic_string::insert"); + _M_check_length(size_type(0), __n, "basic_string::insert"); + if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) + return _M_replace_safe(__pos, size_type(0), __s, __n); + else + { + const size_type __off = __s - _M_data(); + _M_mutate(__pos, 0, __n); + __s = _M_data() + __off; + _CharT* __p = _M_data() + __pos; + if (__s + __n <= __p) + _M_copy(__p, __s, __n); + else if (__s >= __p) + _M_copy(__p, __s + __n, __n); + else + { + const size_type __nleft = __p - __s; + _M_copy(__p, __s, __nleft); + _M_copy(__p + __nleft, __p + __n, __n - __nleft); + } + return *this; + } + } + template + typename basic_string<_CharT, _Traits, _Alloc>::iterator + basic_string<_CharT, _Traits, _Alloc>:: + erase(iterator __first, iterator __last) + { + ; + const size_type __size = __last - __first; + if (__size) + { + const size_type __pos = __first - _M_ibegin(); + _M_mutate(__pos, __size, size_type(0)); + _M_rep()->_M_set_leaked(); + return iterator(_M_data() + __pos); + } + else + return __first; + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + replace(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) + { + ; + _M_check(__pos, "basic_string::replace"); + __n1 = _M_limit(__pos, __n1); + _M_check_length(__n1, __n2, "basic_string::replace"); + bool __left; + if (_M_disjunct(__s) || _M_rep()->_M_is_shared()) + return _M_replace_safe(__pos, __n1, __s, __n2); + else if ((__left = __s + __n2 <= _M_data() + __pos) + || _M_data() + __pos + __n1 <= __s) + { + size_type __off = __s - _M_data(); + __left ? __off : (__off += __n2 - __n1); + _M_mutate(__pos, __n1, __n2); + _M_copy(_M_data() + __pos, _M_data() + __off, __n2); + return *this; + } + else + { + const basic_string __tmp(__s, __n2); + return _M_replace_safe(__pos, __n1, __tmp._M_data(), __n2); + } + } + template + void + basic_string<_CharT, _Traits, _Alloc>::_Rep:: + _M_destroy(const _Alloc& __a) throw () + { + const size_type __size = sizeof(_Rep_base) + + (this->_M_capacity + 1) * sizeof(_CharT); + _Raw_bytes_alloc(__a).deallocate(reinterpret_cast(this), __size); + } + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_leak_hard() + { + if (_M_rep() == &_S_empty_rep()) + return; + if (_M_rep()->_M_is_shared()) + _M_mutate(0, 0, 0); + _M_rep()->_M_set_leaked(); + } + template + void + basic_string<_CharT, _Traits, _Alloc>:: + _M_mutate(size_type __pos, size_type __len1, size_type __len2) + { + const size_type __old_size = this->size(); + const size_type __new_size = __old_size + __len2 - __len1; + const size_type __how_much = __old_size - __pos - __len1; + if (__new_size > this->capacity() || _M_rep()->_M_is_shared()) + { + const allocator_type __a = get_allocator(); + _Rep* __r = _Rep::_S_create(__new_size, this->capacity(), __a); + if (__pos) + _M_copy(__r->_M_refdata(), _M_data(), __pos); + if (__how_much) + _M_copy(__r->_M_refdata() + __pos + __len2, + _M_data() + __pos + __len1, __how_much); + _M_rep()->_M_dispose(__a); + _M_data(__r->_M_refdata()); + } + else if (__how_much && __len1 != __len2) + { + _M_move(_M_data() + __pos + __len2, + _M_data() + __pos + __len1, __how_much); + } + _M_rep()->_M_set_length_and_sharable(__new_size); + } + template + void + basic_string<_CharT, _Traits, _Alloc>:: + reserve(size_type __res) + { + if (__res != this->capacity() || _M_rep()->_M_is_shared()) + { + if (__res < this->size()) + __res = this->size(); + const allocator_type __a = get_allocator(); + _CharT* __tmp = _M_rep()->_M_clone(__a, __res - this->size()); + _M_rep()->_M_dispose(__a); + _M_data(__tmp); + } + } + template + void + basic_string<_CharT, _Traits, _Alloc>:: + swap(basic_string& __s) + { + if (_M_rep()->_M_is_leaked()) + _M_rep()->_M_set_sharable(); + if (__s._M_rep()->_M_is_leaked()) + __s._M_rep()->_M_set_sharable(); + if (this->get_allocator() == __s.get_allocator()) + { + _CharT* __tmp = _M_data(); + _M_data(__s._M_data()); + __s._M_data(__tmp); + } + else + { + const basic_string __tmp1(_M_ibegin(), _M_iend(), + __s.get_allocator()); + const basic_string __tmp2(__s._M_ibegin(), __s._M_iend(), + this->get_allocator()); + *this = __tmp2; + __s = __tmp1; + } + } + template + typename basic_string<_CharT, _Traits, _Alloc>::_Rep* + basic_string<_CharT, _Traits, _Alloc>::_Rep:: + _S_create(size_type __capacity, size_type __old_capacity, + const _Alloc& __alloc) + { + if (__capacity > _S_max_size) + __throw_length_error(("basic_string::_S_create")); + const size_type __pagesize = 4096; + const size_type __malloc_header_size = 4 * sizeof(void*); + if (__capacity > __old_capacity && __capacity < 2 * __old_capacity) + __capacity = 2 * __old_capacity; + size_type __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); + const size_type __adj_size = __size + __malloc_header_size; + if (__adj_size > __pagesize && __capacity > __old_capacity) + { + const size_type __extra = __pagesize - __adj_size % __pagesize; + __capacity += __extra / sizeof(_CharT); + if (__capacity > _S_max_size) + __capacity = _S_max_size; + __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep); + } + void* __place = _Raw_bytes_alloc(__alloc).allocate(__size); + _Rep *__p = new (__place) _Rep; + __p->_M_capacity = __capacity; + __p->_M_set_sharable(); + return __p; + } + template + _CharT* + basic_string<_CharT, _Traits, _Alloc>::_Rep:: + _M_clone(const _Alloc& __alloc, size_type __res) + { + const size_type __requested_cap = this->_M_length + __res; + _Rep* __r = _Rep::_S_create(__requested_cap, this->_M_capacity, + __alloc); + if (this->_M_length) + _M_copy(__r->_M_refdata(), _M_refdata(), this->_M_length); + __r->_M_set_length_and_sharable(this->_M_length); + return __r->_M_refdata(); + } + template + void + basic_string<_CharT, _Traits, _Alloc>:: + resize(size_type __n, _CharT __c) + { + const size_type __size = this->size(); + _M_check_length(__size, __n, "basic_string::resize"); + if (__size < __n) + this->append(__n - __size, __c); + else if (__n < __size) + this->erase(__n); + } + template + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace_dispatch(iterator __i1, iterator __i2, _InputIterator __k1, + _InputIterator __k2, __false_type) + { + const basic_string __s(__k1, __k2); + const size_type __n1 = __i2 - __i1; + _M_check_length(__n1, __s.size(), "basic_string::_M_replace_dispatch"); + return _M_replace_safe(__i1 - _M_ibegin(), __n1, __s._M_data(), + __s.size()); + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace_aux(size_type __pos1, size_type __n1, size_type __n2, + _CharT __c) + { + _M_check_length(__n1, __n2, "basic_string::_M_replace_aux"); + _M_mutate(__pos1, __n1, __n2); + if (__n2) + _M_assign(_M_data() + __pos1, __n2, __c); + return *this; + } + template + basic_string<_CharT, _Traits, _Alloc>& + basic_string<_CharT, _Traits, _Alloc>:: + _M_replace_safe(size_type __pos1, size_type __n1, const _CharT* __s, + size_type __n2) + { + _M_mutate(__pos1, __n1, __n2); + if (__n2) + _M_copy(_M_data() + __pos1, __s, __n2); + return *this; + } + template + basic_string<_CharT, _Traits, _Alloc> + operator+(const _CharT* __lhs, + const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + ; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + const __size_type __len = _Traits::length(__lhs); + __string_type __str; + __str.reserve(__len + __rhs.size()); + __str.append(__lhs, __len); + __str.append(__rhs); + return __str; + } + template + basic_string<_CharT, _Traits, _Alloc> + operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs) + { + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __string_type::size_type __size_type; + __string_type __str; + const __size_type __len = __rhs.size(); + __str.reserve(__len + 1); + __str.append(__size_type(1), __lhs); + __str.append(__rhs); + return __str; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + copy(_CharT* __s, size_type __n, size_type __pos) const + { + _M_check(__pos, "basic_string::copy"); + __n = _M_limit(__pos, __n); + ; + if (__n) + _M_copy(__s, _M_data() + __pos, __n); + return __n; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + const size_type __size = this->size(); + const _CharT* __data = _M_data(); + if (__n == 0) + return __pos <= __size ? __pos : npos; + if (__n <= __size) + { + for (; __pos <= __size - __n; ++__pos) + if (traits_type::eq(__data[__pos], __s[0]) + && traits_type::compare(__data + __pos + 1, + __s + 1, __n - 1) == 0) + return __pos; + } + return npos; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find(_CharT __c, size_type __pos) const + { + size_type __ret = npos; + const size_type __size = this->size(); + if (__pos < __size) + { + const _CharT* __data = _M_data(); + const size_type __n = __size - __pos; + const _CharT* __p = traits_type::find(__data + __pos, __n, __c); + if (__p) + __ret = __p - __data; + } + return __ret; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + rfind(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + const size_type __size = this->size(); + if (__n <= __size) + { + __pos = std::min(size_type(__size - __n), __pos); + const _CharT* __data = _M_data(); + do + { + if (traits_type::compare(__data + __pos, __s, __n) == 0) + return __pos; + } + while (__pos-- > 0); + } + return npos; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + rfind(_CharT __c, size_type __pos) const + { + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + for (++__size; __size-- > 0; ) + if (traits_type::eq(_M_data()[__size], __c)) + return __size; + } + return npos; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_of(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + for (; __n && __pos < this->size(); ++__pos) + { + const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]); + if (__p) + return __pos; + } + return npos; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_of(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + size_type __size = this->size(); + if (__size && __n) + { + if (--__size > __pos) + __size = __pos; + do + { + if (traits_type::find(__s, __n, _M_data()[__size])) + return __size; + } + while (__size-- != 0); + } + return npos; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + for (; __pos < this->size(); ++__pos) + if (!traits_type::find(__s, __n, _M_data()[__pos])) + return __pos; + return npos; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_first_not_of(_CharT __c, size_type __pos) const + { + for (; __pos < this->size(); ++__pos) + if (!traits_type::eq(_M_data()[__pos], __c)) + return __pos; + return npos; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const + { + ; + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + do + { + if (!traits_type::find(__s, __n, _M_data()[__size])) + return __size; + } + while (__size--); + } + return npos; + } + template + typename basic_string<_CharT, _Traits, _Alloc>::size_type + basic_string<_CharT, _Traits, _Alloc>:: + find_last_not_of(_CharT __c, size_type __pos) const + { + size_type __size = this->size(); + if (__size) + { + if (--__size > __pos) + __size = __pos; + do + { + if (!traits_type::eq(_M_data()[__size], __c)) + return __size; + } + while (__size--); + } + return npos; + } + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n, const basic_string& __str) const + { + _M_check(__pos, "basic_string::compare"); + __n = _M_limit(__pos, __n); + const size_type __osize = __str.size(); + const size_type __len = std::min(__n, __osize); + int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len); + if (!__r) + __r = _S_compare(__n, __osize); + return __r; + } + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(size_type __pos1, size_type __n1, const basic_string& __str, + size_type __pos2, size_type __n2) const + { + _M_check(__pos1, "basic_string::compare"); + __str._M_check(__pos2, "basic_string::compare"); + __n1 = _M_limit(__pos1, __n1); + __n2 = __str._M_limit(__pos2, __n2); + const size_type __len = std::min(__n1, __n2); + int __r = traits_type::compare(_M_data() + __pos1, + __str.data() + __pos2, __len); + if (!__r) + __r = _S_compare(__n1, __n2); + return __r; + } + template + int + basic_string<_CharT, _Traits, _Alloc>:: + compare(const _CharT* __s) const + { + ; + const size_type __size = this->size(); + const size_type __osize = traits_type::length(__s); + const size_type __len = std::min(__size, __osize); + int __r = traits_type::compare(_M_data(), __s, __len); + if (!__r) + __r = _S_compare(__size, __osize); + return __r; + } + template + int + basic_string <_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n1, const _CharT* __s) const + { + ; + _M_check(__pos, "basic_string::compare"); + __n1 = _M_limit(__pos, __n1); + const size_type __osize = traits_type::length(__s); + const size_type __len = std::min(__n1, __osize); + int __r = traits_type::compare(_M_data() + __pos, __s, __len); + if (!__r) + __r = _S_compare(__n1, __osize); + return __r; + } + template + int + basic_string <_CharT, _Traits, _Alloc>:: + compare(size_type __pos, size_type __n1, const _CharT* __s, + size_type __n2) const + { + ; + _M_check(__pos, "basic_string::compare"); + __n1 = _M_limit(__pos, __n1); + const size_type __len = std::min(__n1, __n2); + int __r = traits_type::compare(_M_data() + __pos, __s, __len); + if (!__r) + __r = _S_compare(__n1, __n2); + return __r; + } + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, + basic_string<_CharT, _Traits, _Alloc>& __str) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __istream_type::ios_base __ios_base; + typedef typename __istream_type::int_type __int_type; + typedef typename __string_type::size_type __size_type; + typedef ctype<_CharT> __ctype_type; + typedef typename __ctype_type::ctype_base __ctype_base; + __size_type __extracted = 0; + typename __ios_base::iostate __err = __ios_base::goodbit; + typename __istream_type::sentry __cerb(__in, false); + if (__cerb) + { + try + { + __str.erase(); + _CharT __buf[128]; + __size_type __len = 0; + const streamsize __w = __in.width(); + const __size_type __n = __w > 0 ? static_cast<__size_type>(__w) + : __str.max_size(); + const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); + const __int_type __eof = _Traits::eof(); + __int_type __c = __in.rdbuf()->sgetc(); + while (__extracted < __n + && !_Traits::eq_int_type(__c, __eof) + && !__ct.is(__ctype_base::space, + _Traits::to_char_type(__c))) + { + if (__len == sizeof(__buf) / sizeof(_CharT)) + { + __str.append(__buf, sizeof(__buf) / sizeof(_CharT)); + __len = 0; + } + __buf[__len++] = _Traits::to_char_type(__c); + ++__extracted; + __c = __in.rdbuf()->snextc(); + } + __str.append(__buf, __len); + if (_Traits::eq_int_type(__c, __eof)) + __err |= __ios_base::eofbit; + __in.width(0); + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { + __in._M_setstate(__ios_base::badbit); + } + } + if (!__extracted) + __err |= __ios_base::failbit; + if (__err) + __in.setstate(__err); + return __in; + } + template + basic_istream<_CharT, _Traits>& + getline(basic_istream<_CharT, _Traits>& __in, + basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_string<_CharT, _Traits, _Alloc> __string_type; + typedef typename __istream_type::ios_base __ios_base; + typedef typename __istream_type::int_type __int_type; + typedef typename __string_type::size_type __size_type; + __size_type __extracted = 0; + const __size_type __n = __str.max_size(); + typename __ios_base::iostate __err = __ios_base::goodbit; + typename __istream_type::sentry __cerb(__in, true); + if (__cerb) + { + try + { + __str.erase(); + const __int_type __idelim = _Traits::to_int_type(__delim); + const __int_type __eof = _Traits::eof(); + __int_type __c = __in.rdbuf()->sgetc(); + while (__extracted < __n + && !_Traits::eq_int_type(__c, __eof) + && !_Traits::eq_int_type(__c, __idelim)) + { + __str += _Traits::to_char_type(__c); + ++__extracted; + __c = __in.rdbuf()->snextc(); + } + if (_Traits::eq_int_type(__c, __eof)) + __err |= __ios_base::eofbit; + else if (_Traits::eq_int_type(__c, __idelim)) + { + ++__extracted; + __in.rdbuf()->sbumpc(); + } + else + __err |= __ios_base::failbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(__ios_base::badbit); + throw; + } + catch(...) + { + __in._M_setstate(__ios_base::badbit); + } + } + if (!__extracted) + __err |= __ios_base::failbit; + if (__err) + __in.setstate(__err); + return __in; + } + extern template class basic_string; + extern template + basic_istream& + operator>>(basic_istream&, string&); + extern template + basic_ostream& + operator<<(basic_ostream&, const string&); + extern template + basic_istream& + getline(basic_istream&, string&, char); + extern template + basic_istream& + getline(basic_istream&, string&); + extern template class basic_string; + extern template + basic_istream& + operator>>(basic_istream&, wstring&); + extern template + basic_ostream& + operator<<(basic_ostream&, const wstring&); + extern template + basic_istream& + getline(basic_istream&, wstring&, wchar_t); + extern template + basic_istream& + getline(basic_istream&, wstring&); +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + inline void + _Construct(_T1* __p, const _T2& __value) + { + ::new(static_cast(__p)) _T1(__value); + } + template + inline void + _Destroy(_Tp* __pointer) + { __pointer->~_Tp(); } + template + struct _Destroy_aux + { + template + static void + __destroy(_ForwardIterator __first, _ForwardIterator __last) + { + for (; __first != __last; ++__first) + std::_Destroy(std::__addressof(*__first)); + } + }; + template<> + struct _Destroy_aux + { + template + static void + __destroy(_ForwardIterator, _ForwardIterator) { } + }; + template + inline void + _Destroy(_ForwardIterator __first, _ForwardIterator __last) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _Value_type; + std::_Destroy_aux<__has_trivial_destructor(_Value_type)>:: + __destroy(__first, __last); + } + template class allocator; + template + void + _Destroy(_ForwardIterator __first, _ForwardIterator __last, + _Allocator& __alloc) + { + for (; __first != __last; ++__first) + __alloc.destroy(std::__addressof(*__first)); + } + template + inline void + _Destroy(_ForwardIterator __first, _ForwardIterator __last, + allocator<_Tp>&) + { + _Destroy(__first, __last); + } +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + struct __uninitialized_copy + { + template + static _ForwardIterator + __uninit_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { + _ForwardIterator __cur = __result; + try + { + for (; __first != __last; ++__first, ++__cur) + std::_Construct(std::__addressof(*__cur), *__first); + return __cur; + } + catch(...) + { + std::_Destroy(__result, __cur); + throw; + } + } + }; + template<> + struct __uninitialized_copy + { + template + static _ForwardIterator + __uninit_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { return std::copy(__first, __last, __result); } + }; + template + inline _ForwardIterator + uninitialized_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result) + { + typedef typename iterator_traits<_InputIterator>::value_type + _ValueType1; + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType2; + return std::__uninitialized_copy<(__is_trivial(_ValueType1) + && __is_trivial(_ValueType2))>:: + __uninit_copy(__first, __last, __result); + } + template + struct __uninitialized_fill + { + template + static void + __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x) + { + _ForwardIterator __cur = __first; + try + { + for (; __cur != __last; ++__cur) + std::_Construct(std::__addressof(*__cur), __x); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + template<> + struct __uninitialized_fill + { + template + static void + __uninit_fill(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x) + { std::fill(__first, __last, __x); } + }; + template + inline void + uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + std::__uninitialized_fill<__is_trivial(_ValueType)>:: + __uninit_fill(__first, __last, __x); + } + template + struct __uninitialized_fill_n + { + template + static void + __uninit_fill_n(_ForwardIterator __first, _Size __n, + const _Tp& __x) + { + _ForwardIterator __cur = __first; + try + { + for (; __n > 0; --__n, ++__cur) + std::_Construct(std::__addressof(*__cur), __x); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + template<> + struct __uninitialized_fill_n + { + template + static void + __uninit_fill_n(_ForwardIterator __first, _Size __n, + const _Tp& __x) + { std::fill_n(__first, __n, __x); } + }; + template + inline void + uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + std::__uninitialized_fill_n<__is_trivial(_ValueType)>:: + __uninit_fill_n(__first, __n, __x); + } + template + _ForwardIterator + __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _Allocator& __alloc) + { + _ForwardIterator __cur = __result; + try + { + for (; __first != __last; ++__first, ++__cur) + __alloc.construct(std::__addressof(*__cur), *__first); + return __cur; + } + catch(...) + { + std::_Destroy(__result, __cur, __alloc); + throw; + } + } + template + inline _ForwardIterator + __uninitialized_copy_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, allocator<_Tp>&) + { return std::uninitialized_copy(__first, __last, __result); } + template + inline _ForwardIterator + __uninitialized_move_a(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _Allocator& __alloc) + { + return std::__uninitialized_copy_a((__first), + (__last), + __result, __alloc); + } + template + void + __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x, _Allocator& __alloc) + { + _ForwardIterator __cur = __first; + try + { + for (; __cur != __last; ++__cur) + __alloc.construct(std::__addressof(*__cur), __x); + } + catch(...) + { + std::_Destroy(__first, __cur, __alloc); + throw; + } + } + template + inline void + __uninitialized_fill_a(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __x, allocator<_Tp2>&) + { std::uninitialized_fill(__first, __last, __x); } + template + void + __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, + const _Tp& __x, _Allocator& __alloc) + { + _ForwardIterator __cur = __first; + try + { + for (; __n > 0; --__n, ++__cur) + __alloc.construct(std::__addressof(*__cur), __x); + } + catch(...) + { + std::_Destroy(__first, __cur, __alloc); + throw; + } + } + template + inline void + __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, + const _Tp& __x, allocator<_Tp2>&) + { std::uninitialized_fill_n(__first, __n, __x); } + template + inline _ForwardIterator + __uninitialized_copy_move(_InputIterator1 __first1, + _InputIterator1 __last1, + _InputIterator2 __first2, + _InputIterator2 __last2, + _ForwardIterator __result, + _Allocator& __alloc) + { + _ForwardIterator __mid = std::__uninitialized_copy_a(__first1, __last1, + __result, + __alloc); + try + { + return std::__uninitialized_move_a(__first2, __last2, __mid, __alloc); + } + catch(...) + { + std::_Destroy(__result, __mid, __alloc); + throw; + } + } + template + inline _ForwardIterator + __uninitialized_move_copy(_InputIterator1 __first1, + _InputIterator1 __last1, + _InputIterator2 __first2, + _InputIterator2 __last2, + _ForwardIterator __result, + _Allocator& __alloc) + { + _ForwardIterator __mid = std::__uninitialized_move_a(__first1, __last1, + __result, + __alloc); + try + { + return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc); + } + catch(...) + { + std::_Destroy(__result, __mid, __alloc); + throw; + } + } + template + inline _ForwardIterator + __uninitialized_fill_move(_ForwardIterator __result, _ForwardIterator __mid, + const _Tp& __x, _InputIterator __first, + _InputIterator __last, _Allocator& __alloc) + { + std::__uninitialized_fill_a(__result, __mid, __x, __alloc); + try + { + return std::__uninitialized_move_a(__first, __last, __mid, __alloc); + } + catch(...) + { + std::_Destroy(__result, __mid, __alloc); + throw; + } + } + template + inline void + __uninitialized_move_fill(_InputIterator __first1, _InputIterator __last1, + _ForwardIterator __first2, + _ForwardIterator __last2, const _Tp& __x, + _Allocator& __alloc) + { + _ForwardIterator __mid2 = std::__uninitialized_move_a(__first1, __last1, + __first2, + __alloc); + try + { + std::__uninitialized_fill_a(__mid2, __last2, __x, __alloc); + } + catch(...) + { + std::_Destroy(__first2, __mid2, __alloc); + throw; + } + } +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + struct _Vector_base + { + typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; + struct _Vector_impl + : public _Tp_alloc_type + { + typename _Tp_alloc_type::pointer _M_start; + typename _Tp_alloc_type::pointer _M_finish; + typename _Tp_alloc_type::pointer _M_end_of_storage; + _Vector_impl() + : _Tp_alloc_type(), _M_start(0), _M_finish(0), _M_end_of_storage(0) + { } + _Vector_impl(_Tp_alloc_type const& __a) + : _Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0) + { } + }; + public: + typedef _Alloc allocator_type; + _Tp_alloc_type& + _M_get_Tp_allocator() + { return *static_cast<_Tp_alloc_type*>(&this->_M_impl); } + const _Tp_alloc_type& + _M_get_Tp_allocator() const + { return *static_cast(&this->_M_impl); } + allocator_type + get_allocator() const + { return allocator_type(_M_get_Tp_allocator()); } + _Vector_base() + : _M_impl() { } + _Vector_base(const allocator_type& __a) + : _M_impl(__a) { } + _Vector_base(size_t __n) + : _M_impl() + { + this->_M_impl._M_start = this->_M_allocate(__n); + this->_M_impl._M_finish = this->_M_impl._M_start; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + } + _Vector_base(size_t __n, const allocator_type& __a) + : _M_impl(__a) + { + this->_M_impl._M_start = this->_M_allocate(__n); + this->_M_impl._M_finish = this->_M_impl._M_start; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + } + ~_Vector_base() + { _M_deallocate(this->_M_impl._M_start, this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); } + public: + _Vector_impl _M_impl; + typename _Tp_alloc_type::pointer + _M_allocate(size_t __n) + { return __n != 0 ? _M_impl.allocate(__n) : 0; } + void + _M_deallocate(typename _Tp_alloc_type::pointer __p, size_t __n) + { + if (__p) + _M_impl.deallocate(__p, __n); + } + }; + template > + class vector : protected _Vector_base<_Tp, _Alloc> + { + typedef typename _Alloc::value_type _Alloc_value_type; + typedef _Vector_base<_Tp, _Alloc> _Base; + typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; + public: + typedef _Tp value_type; + typedef typename _Tp_alloc_type::pointer pointer; + typedef typename _Tp_alloc_type::const_pointer const_pointer; + typedef typename _Tp_alloc_type::reference reference; + typedef typename _Tp_alloc_type::const_reference const_reference; + typedef __gnu_cxx::__normal_iterator iterator; + typedef __gnu_cxx::__normal_iterator + const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Alloc allocator_type; + protected: + using _Base::_M_allocate; + using _Base::_M_deallocate; + using _Base::_M_impl; + using _Base::_M_get_Tp_allocator; + public: + vector() + : _Base() { } + explicit + vector(const allocator_type& __a) + : _Base(__a) { } + explicit + vector(size_type __n, const value_type& __value = value_type(), + const allocator_type& __a = allocator_type()) + : _Base(__n, __a) + { _M_fill_initialize(__n, __value); } + vector(const vector& __x) + : _Base(__x.size(), __x._M_get_Tp_allocator()) + { this->_M_impl._M_finish = + std::__uninitialized_copy_a(__x.begin(), __x.end(), + this->_M_impl._M_start, + _M_get_Tp_allocator()); + } + template + vector(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_initialize_dispatch(__first, __last, _Integral()); + } + ~vector() + { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); } + vector& + operator=(const vector& __x); + void + assign(size_type __n, const value_type& __val) + { _M_fill_assign(__n, __val); } + template + void + assign(_InputIterator __first, _InputIterator __last) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } + using _Base::get_allocator; + iterator + begin() + { return iterator(this->_M_impl._M_start); } + const_iterator + begin() const + { return const_iterator(this->_M_impl._M_start); } + iterator + end() + { return iterator(this->_M_impl._M_finish); } + const_iterator + end() const + { return const_iterator(this->_M_impl._M_finish); } + reverse_iterator + rbegin() + { return reverse_iterator(end()); } + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(end()); } + reverse_iterator + rend() + { return reverse_iterator(begin()); } + const_reverse_iterator + rend() const + { return const_reverse_iterator(begin()); } + size_type + size() const + { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); } + size_type + max_size() const + { return _M_get_Tp_allocator().max_size(); } + void + resize(size_type __new_size, value_type __x = value_type()) + { + if (__new_size > size()) + insert(end(), __new_size - size(), __x); + else if (__new_size < size()) + _M_erase_at_end(this->_M_impl._M_start + __new_size); + } + size_type + capacity() const + { return size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); } + bool + empty() const + { return begin() == end(); } + void + reserve(size_type __n); + reference + operator[](size_type __n) + { return *(this->_M_impl._M_start + __n); } + const_reference + operator[](size_type __n) const + { return *(this->_M_impl._M_start + __n); } + protected: + void + _M_range_check(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range(("vector::_M_range_check")); + } + public: + reference + at(size_type __n) + { + _M_range_check(__n); + return (*this)[__n]; + } + const_reference + at(size_type __n) const + { + _M_range_check(__n); + return (*this)[__n]; + } + reference + front() + { return *begin(); } + const_reference + front() const + { return *begin(); } + reference + back() + { return *(end() - 1); } + const_reference + back() const + { return *(end() - 1); } + pointer + data() + { return std::__addressof(front()); } + const_pointer + data() const + { return std::__addressof(front()); } + void + push_back(const value_type& __x) + { + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + { + this->_M_impl.construct(this->_M_impl._M_finish, __x); + ++this->_M_impl._M_finish; + } + else + _M_insert_aux(end(), __x); + } + void + pop_back() + { + --this->_M_impl._M_finish; + this->_M_impl.destroy(this->_M_impl._M_finish); + } + iterator + insert(iterator __position, const value_type& __x); + void + insert(iterator __position, size_type __n, const value_type& __x) + { _M_fill_insert(__position, __n, __x); } + template + void + insert(iterator __position, _InputIterator __first, + _InputIterator __last) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_insert_dispatch(__position, __first, __last, _Integral()); + } + iterator + erase(iterator __position); + iterator + erase(iterator __first, iterator __last); + void + swap(vector& __x) + { + std::swap(this->_M_impl._M_start, __x._M_impl._M_start); + std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); + std::swap(this->_M_impl._M_end_of_storage, + __x._M_impl._M_end_of_storage); + std::__alloc_swap<_Tp_alloc_type>::_S_do_it(_M_get_Tp_allocator(), + __x._M_get_Tp_allocator()); + } + void + clear() + { _M_erase_at_end(this->_M_impl._M_start); } + protected: + template + pointer + _M_allocate_and_copy(size_type __n, + _ForwardIterator __first, _ForwardIterator __last) + { + pointer __result = this->_M_allocate(__n); + try + { + std::__uninitialized_copy_a(__first, __last, __result, + _M_get_Tp_allocator()); + return __result; + } + catch(...) + { + _M_deallocate(__result, __n); + throw; + } + } + template + void + _M_initialize_dispatch(_Integer __n, _Integer __value, __true_type) + { + this->_M_impl._M_start = _M_allocate(static_cast(__n)); + this->_M_impl._M_end_of_storage = + this->_M_impl._M_start + static_cast(__n); + _M_fill_initialize(static_cast(__n), __value); + } + template + void + _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { + typedef typename std::iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_range_initialize(__first, __last, _IterCategory()); + } + template + void + _M_range_initialize(_InputIterator __first, + _InputIterator __last, std::input_iterator_tag) + { + for (; __first != __last; ++__first) + push_back(*__first); + } + template + void + _M_range_initialize(_ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag) + { + const size_type __n = std::distance(__first, __last); + this->_M_impl._M_start = this->_M_allocate(__n); + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + this->_M_impl._M_finish = + std::__uninitialized_copy_a(__first, __last, + this->_M_impl._M_start, + _M_get_Tp_allocator()); + } + void + _M_fill_initialize(size_type __n, const value_type& __value) + { + std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value, + _M_get_Tp_allocator()); + this->_M_impl._M_finish = this->_M_impl._M_end_of_storage; + } + template + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } + template + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { + typedef typename std::iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_assign_aux(__first, __last, _IterCategory()); + } + template + void + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag); + template + void + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag); + void + _M_fill_assign(size_type __n, const value_type& __val); + template + void + _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, + __true_type) + { _M_fill_insert(__pos, __n, __val); } + template + void + _M_insert_dispatch(iterator __pos, _InputIterator __first, + _InputIterator __last, __false_type) + { + typedef typename std::iterator_traits<_InputIterator>:: + iterator_category _IterCategory; + _M_range_insert(__pos, __first, __last, _IterCategory()); + } + template + void + _M_range_insert(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag); + template + void + _M_range_insert(iterator __pos, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag); + void + _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); + void + _M_insert_aux(iterator __position, const value_type& __x); + size_type + _M_check_len(size_type __n, const char* __s) const + { + if (max_size() - size() < __n) + __throw_length_error((__s)); + const size_type __len = size() + std::max(size(), __n); + return (__len < size() || __len > max_size()) ? max_size() : __len; + } + void + _M_erase_at_end(pointer __pos) + { + std::_Destroy(__pos, this->_M_impl._M_finish, _M_get_Tp_allocator()); + this->_M_impl._M_finish = __pos; + } + }; + template + inline bool + operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return (__x.size() == __y.size() + && std::equal(__x.begin(), __x.end(), __y.begin())); } + template + inline bool + operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return std::lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); } + template + inline bool + operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return __y < __x; } + template + inline bool + operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) + { return !(__x < __y); } + template + inline void + swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) + { __x.swap(__y); } +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + typedef unsigned long _Bit_type; + enum { _S_word_bit = int(8 * sizeof(_Bit_type)) }; + struct _Bit_reference + { + _Bit_type * _M_p; + _Bit_type _M_mask; + _Bit_reference(_Bit_type * __x, _Bit_type __y) + : _M_p(__x), _M_mask(__y) { } + _Bit_reference() : _M_p(0), _M_mask(0) { } + operator bool() const + { return !!(*_M_p & _M_mask); } + _Bit_reference& + operator=(bool __x) + { + if (__x) + *_M_p |= _M_mask; + else + *_M_p &= ~_M_mask; + return *this; + } + _Bit_reference& + operator=(const _Bit_reference& __x) + { return *this = bool(__x); } + bool + operator==(const _Bit_reference& __x) const + { return bool(*this) == bool(__x); } + bool + operator<(const _Bit_reference& __x) const + { return !bool(*this) && bool(__x); } + void + flip() + { *_M_p ^= _M_mask; } + }; + struct _Bit_iterator_base + : public std::iterator + { + _Bit_type * _M_p; + unsigned int _M_offset; + _Bit_iterator_base(_Bit_type * __x, unsigned int __y) + : _M_p(__x), _M_offset(__y) { } + void + _M_bump_up() + { + if (_M_offset++ == int(_S_word_bit) - 1) + { + _M_offset = 0; + ++_M_p; + } + } + void + _M_bump_down() + { + if (_M_offset-- == 0) + { + _M_offset = int(_S_word_bit) - 1; + --_M_p; + } + } + void + _M_incr(ptrdiff_t __i) + { + difference_type __n = __i + _M_offset; + _M_p += __n / int(_S_word_bit); + __n = __n % int(_S_word_bit); + if (__n < 0) + { + __n += int(_S_word_bit); + --_M_p; + } + _M_offset = static_cast(__n); + } + bool + operator==(const _Bit_iterator_base& __i) const + { return _M_p == __i._M_p && _M_offset == __i._M_offset; } + bool + operator<(const _Bit_iterator_base& __i) const + { + return _M_p < __i._M_p + || (_M_p == __i._M_p && _M_offset < __i._M_offset); + } + bool + operator!=(const _Bit_iterator_base& __i) const + { return !(*this == __i); } + bool + operator>(const _Bit_iterator_base& __i) const + { return __i < *this; } + bool + operator<=(const _Bit_iterator_base& __i) const + { return !(__i < *this); } + bool + operator>=(const _Bit_iterator_base& __i) const + { return !(*this < __i); } + }; + inline ptrdiff_t + operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) + { + return (int(_S_word_bit) * (__x._M_p - __y._M_p) + + __x._M_offset - __y._M_offset); + } + struct _Bit_iterator : public _Bit_iterator_base + { + typedef _Bit_reference reference; + typedef _Bit_reference* pointer; + typedef _Bit_iterator iterator; + _Bit_iterator() : _Bit_iterator_base(0, 0) { } + _Bit_iterator(_Bit_type * __x, unsigned int __y) + : _Bit_iterator_base(__x, __y) { } + reference + operator*() const + { return reference(_M_p, 1UL << _M_offset); } + iterator& + operator++() + { + _M_bump_up(); + return *this; + } + iterator + operator++(int) + { + iterator __tmp = *this; + _M_bump_up(); + return __tmp; + } + iterator& + operator--() + { + _M_bump_down(); + return *this; + } + iterator + operator--(int) + { + iterator __tmp = *this; + _M_bump_down(); + return __tmp; + } + iterator& + operator+=(difference_type __i) + { + _M_incr(__i); + return *this; + } + iterator& + operator-=(difference_type __i) + { + *this += -__i; + return *this; + } + iterator + operator+(difference_type __i) const + { + iterator __tmp = *this; + return __tmp += __i; + } + iterator + operator-(difference_type __i) const + { + iterator __tmp = *this; + return __tmp -= __i; + } + reference + operator[](difference_type __i) const + { return *(*this + __i); } + }; + inline _Bit_iterator + operator+(ptrdiff_t __n, const _Bit_iterator& __x) + { return __x + __n; } + struct _Bit_const_iterator : public _Bit_iterator_base + { + typedef bool reference; + typedef bool const_reference; + typedef const bool* pointer; + typedef _Bit_const_iterator const_iterator; + _Bit_const_iterator() : _Bit_iterator_base(0, 0) { } + _Bit_const_iterator(_Bit_type * __x, unsigned int __y) + : _Bit_iterator_base(__x, __y) { } + _Bit_const_iterator(const _Bit_iterator& __x) + : _Bit_iterator_base(__x._M_p, __x._M_offset) { } + const_reference + operator*() const + { return _Bit_reference(_M_p, 1UL << _M_offset); } + const_iterator& + operator++() + { + _M_bump_up(); + return *this; + } + const_iterator + operator++(int) + { + const_iterator __tmp = *this; + _M_bump_up(); + return __tmp; + } + const_iterator& + operator--() + { + _M_bump_down(); + return *this; + } + const_iterator + operator--(int) + { + const_iterator __tmp = *this; + _M_bump_down(); + return __tmp; + } + const_iterator& + operator+=(difference_type __i) + { + _M_incr(__i); + return *this; + } + const_iterator& + operator-=(difference_type __i) + { + *this += -__i; + return *this; + } + const_iterator + operator+(difference_type __i) const + { + const_iterator __tmp = *this; + return __tmp += __i; + } + const_iterator + operator-(difference_type __i) const + { + const_iterator __tmp = *this; + return __tmp -= __i; + } + const_reference + operator[](difference_type __i) const + { return *(*this + __i); } + }; + inline _Bit_const_iterator + operator+(ptrdiff_t __n, const _Bit_const_iterator& __x) + { return __x + __n; } + inline void + __fill_bvector(_Bit_iterator __first, _Bit_iterator __last, bool __x) + { + for (; __first != __last; ++__first) + *__first = __x; + } + inline void + fill(_Bit_iterator __first, _Bit_iterator __last, const bool& __x) + { + if (__first._M_p != __last._M_p) + { + std::fill(__first._M_p + 1, __last._M_p, __x ? ~0 : 0); + __fill_bvector(__first, _Bit_iterator(__first._M_p + 1, 0), __x); + __fill_bvector(_Bit_iterator(__last._M_p, 0), __last, __x); + } + else + __fill_bvector(__first, __last, __x); + } + template + struct _Bvector_base + { + typedef typename _Alloc::template rebind<_Bit_type>::other + _Bit_alloc_type; + struct _Bvector_impl + : public _Bit_alloc_type + { + _Bit_iterator _M_start; + _Bit_iterator _M_finish; + _Bit_type* _M_end_of_storage; + _Bvector_impl() + : _Bit_alloc_type(), _M_start(), _M_finish(), _M_end_of_storage(0) + { } + _Bvector_impl(const _Bit_alloc_type& __a) + : _Bit_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage(0) + { } + }; + public: + typedef _Alloc allocator_type; + _Bit_alloc_type& + _M_get_Bit_allocator() + { return *static_cast<_Bit_alloc_type*>(&this->_M_impl); } + const _Bit_alloc_type& + _M_get_Bit_allocator() const + { return *static_cast(&this->_M_impl); } + allocator_type + get_allocator() const + { return allocator_type(_M_get_Bit_allocator()); } + _Bvector_base() + : _M_impl() { } + _Bvector_base(const allocator_type& __a) + : _M_impl(__a) { } + ~_Bvector_base() + { this->_M_deallocate(); } + protected: + _Bvector_impl _M_impl; + _Bit_type* + _M_allocate(size_t __n) + { return _M_impl.allocate((__n + int(_S_word_bit) - 1) + / int(_S_word_bit)); } + void + _M_deallocate() + { + if (_M_impl._M_start._M_p) + _M_impl.deallocate(_M_impl._M_start._M_p, + _M_impl._M_end_of_storage - _M_impl._M_start._M_p); + } + }; +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ +template + class vector : protected _Bvector_base<_Alloc> + { + typedef _Bvector_base<_Alloc> _Base; + public: + typedef bool value_type; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Bit_reference reference; + typedef bool const_reference; + typedef _Bit_reference* pointer; + typedef const bool* const_pointer; + typedef _Bit_iterator iterator; + typedef _Bit_const_iterator const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef _Alloc allocator_type; + allocator_type get_allocator() const + { return _Base::get_allocator(); } + protected: + using _Base::_M_allocate; + using _Base::_M_deallocate; + using _Base::_M_get_Bit_allocator; + public: + vector() + : _Base() { } + explicit + vector(const allocator_type& __a) + : _Base(__a) { } + explicit + vector(size_type __n, const bool& __value = bool(), + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + _M_initialize(__n); + std::fill(this->_M_impl._M_start._M_p, this->_M_impl._M_end_of_storage, + __value ? ~0 : 0); + } + vector(const vector& __x) + : _Base(__x._M_get_Bit_allocator()) + { + _M_initialize(__x.size()); + _M_copy_aligned(__x.begin(), __x.end(), this->_M_impl._M_start); + } + template + vector(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_initialize_dispatch(__first, __last, _Integral()); + } + ~vector() { } + vector& + operator=(const vector& __x) + { + if (&__x == this) + return *this; + if (__x.size() > capacity()) + { + this->_M_deallocate(); + _M_initialize(__x.size()); + } + this->_M_impl._M_finish = _M_copy_aligned(__x.begin(), __x.end(), + begin()); + return *this; + } + void + assign(size_type __n, const bool& __x) + { _M_fill_assign(__n, __x); } + template + void + assign(_InputIterator __first, _InputIterator __last) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } + iterator + begin() + { return this->_M_impl._M_start; } + const_iterator + begin() const + { return this->_M_impl._M_start; } + iterator + end() + { return this->_M_impl._M_finish; } + const_iterator + end() const + { return this->_M_impl._M_finish; } + reverse_iterator + rbegin() + { return reverse_iterator(end()); } + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(end()); } + reverse_iterator + rend() + { return reverse_iterator(begin()); } + const_reverse_iterator + rend() const + { return const_reverse_iterator(begin()); } + size_type + size() const + { return size_type(end() - begin()); } + size_type + max_size() const + { + const size_type __isize = + __gnu_cxx::__numeric_traits::__max + - int(_S_word_bit) + 1; + const size_type __asize = _M_get_Bit_allocator().max_size(); + return (__asize <= __isize / int(_S_word_bit) + ? __asize * int(_S_word_bit) : __isize); + } + size_type + capacity() const + { return size_type(const_iterator(this->_M_impl._M_end_of_storage, 0) + - begin()); } + bool + empty() const + { return begin() == end(); } + reference + operator[](size_type __n) + { + return *iterator(this->_M_impl._M_start._M_p + + __n / int(_S_word_bit), __n % int(_S_word_bit)); + } + const_reference + operator[](size_type __n) const + { + return *const_iterator(this->_M_impl._M_start._M_p + + __n / int(_S_word_bit), __n % int(_S_word_bit)); + } + protected: + void + _M_range_check(size_type __n) const + { + if (__n >= this->size()) + __throw_out_of_range(("vector::_M_range_check")); + } + public: + reference + at(size_type __n) + { _M_range_check(__n); return (*this)[__n]; } + const_reference + at(size_type __n) const + { _M_range_check(__n); return (*this)[__n]; } + void + reserve(size_type __n); + reference + front() + { return *begin(); } + const_reference + front() const + { return *begin(); } + reference + back() + { return *(end() - 1); } + const_reference + back() const + { return *(end() - 1); } + void + data() { } + void + push_back(bool __x) + { + if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage) + *this->_M_impl._M_finish++ = __x; + else + _M_insert_aux(end(), __x); + } + void + swap(vector& __x) + { + std::swap(this->_M_impl._M_start, __x._M_impl._M_start); + std::swap(this->_M_impl._M_finish, __x._M_impl._M_finish); + std::swap(this->_M_impl._M_end_of_storage, + __x._M_impl._M_end_of_storage); + std::__alloc_swap:: + _S_do_it(_M_get_Bit_allocator(), __x._M_get_Bit_allocator()); + } + static void + swap(reference __x, reference __y) + { + bool __tmp = __x; + __x = __y; + __y = __tmp; + } + iterator + insert(iterator __position, const bool& __x = bool()) + { + const difference_type __n = __position - begin(); + if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage + && __position == end()) + *this->_M_impl._M_finish++ = __x; + else + _M_insert_aux(__position, __x); + return begin() + __n; + } + template + void + insert(iterator __position, + _InputIterator __first, _InputIterator __last) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_insert_dispatch(__position, __first, __last, _Integral()); + } + void + insert(iterator __position, size_type __n, const bool& __x) + { _M_fill_insert(__position, __n, __x); } + void + pop_back() + { --this->_M_impl._M_finish; } + iterator + erase(iterator __position) + { + if (__position + 1 != end()) + std::copy(__position + 1, end(), __position); + --this->_M_impl._M_finish; + return __position; + } + iterator + erase(iterator __first, iterator __last) + { + if (__first != __last) + _M_erase_at_end(std::copy(__last, end(), __first)); + return __first; + } + void + resize(size_type __new_size, bool __x = bool()) + { + if (__new_size < size()) + _M_erase_at_end(begin() + difference_type(__new_size)); + else + insert(end(), __new_size - size(), __x); + } + void + flip() + { + for (_Bit_type * __p = this->_M_impl._M_start._M_p; + __p != this->_M_impl._M_end_of_storage; ++__p) + *__p = ~*__p; + } + void + clear() + { _M_erase_at_end(begin()); } + protected: + iterator + _M_copy_aligned(const_iterator __first, const_iterator __last, + iterator __result) + { + _Bit_type* __q = std::copy(__first._M_p, __last._M_p, __result._M_p); + return std::copy(const_iterator(__last._M_p, 0), __last, + iterator(__q, 0)); + } + void + _M_initialize(size_type __n) + { + _Bit_type* __q = this->_M_allocate(__n); + this->_M_impl._M_end_of_storage = (__q + + ((__n + int(_S_word_bit) - 1) + / int(_S_word_bit))); + this->_M_impl._M_start = iterator(__q, 0); + this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n); + } + template + void + _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) + { + _M_initialize(static_cast(__n)); + std::fill(this->_M_impl._M_start._M_p, + this->_M_impl._M_end_of_storage, __x ? ~0 : 0); + } + template + void + _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { _M_initialize_range(__first, __last, + std::__iterator_category(__first)); } + template + void + _M_initialize_range(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + for (; __first != __last; ++__first) + push_back(*__first); + } + template + void + _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __n = std::distance(__first, __last); + _M_initialize(__n); + std::copy(__first, __last, this->_M_impl._M_start); + } + template + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } + template + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { _M_assign_aux(__first, __last, std::__iterator_category(__first)); } + void + _M_fill_assign(size_t __n, bool __x) + { + if (__n > size()) + { + std::fill(this->_M_impl._M_start._M_p, + this->_M_impl._M_end_of_storage, __x ? ~0 : 0); + insert(end(), __n - size(), __x); + } + else + { + _M_erase_at_end(begin() + __n); + std::fill(this->_M_impl._M_start._M_p, + this->_M_impl._M_end_of_storage, __x ? ~0 : 0); + } + } + template + void + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + iterator __cur = begin(); + for (; __first != __last && __cur != end(); ++__cur, ++__first) + *__cur = *__first; + if (__first == __last) + _M_erase_at_end(__cur); + else + insert(end(), __first, __last); + } + template + void + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __len = std::distance(__first, __last); + if (__len < size()) + _M_erase_at_end(std::copy(__first, __last, begin())); + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, size()); + std::copy(__first, __mid, begin()); + insert(end(), __mid, __last); + } + } + template + void + _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, + __true_type) + { _M_fill_insert(__pos, __n, __x); } + template + void + _M_insert_dispatch(iterator __pos, + _InputIterator __first, _InputIterator __last, + __false_type) + { _M_insert_range(__pos, __first, __last, + std::__iterator_category(__first)); } + void + _M_fill_insert(iterator __position, size_type __n, bool __x); + template + void + _M_insert_range(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag) + { + for (; __first != __last; ++__first) + { + __pos = insert(__pos, *__first); + ++__pos; + } + } + template + void + _M_insert_range(iterator __position, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag); + void + _M_insert_aux(iterator __position, bool __x); + size_type + _M_check_len(size_type __n, const char* __s) const + { + if (max_size() - size() < __n) + __throw_length_error((__s)); + const size_type __len = size() + std::max(size(), __n); + return (__len < size() || __len > max_size()) ? max_size() : __len; + } + void + _M_erase_at_end(iterator __pos) + { this->_M_impl._M_finish = __pos; } + }; +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + void + vector<_Tp, _Alloc>:: + reserve(size_type __n) + { + if (__n > this->max_size()) + __throw_length_error(("vector::reserve")); + if (this->capacity() < __n) + { + const size_type __old_size = size(); + pointer __tmp = _M_allocate_and_copy(__n, + (this->_M_impl._M_start), + (this->_M_impl._M_finish)); + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __tmp; + this->_M_impl._M_finish = __tmp + __old_size; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n; + } + } + template + typename vector<_Tp, _Alloc>::iterator + vector<_Tp, _Alloc>:: + insert(iterator __position, const value_type& __x) + { + const size_type __n = __position - begin(); + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage + && __position == end()) + { + this->_M_impl.construct(this->_M_impl._M_finish, __x); + ++this->_M_impl._M_finish; + } + else + { + _M_insert_aux(__position, __x); + } + return iterator(this->_M_impl._M_start + __n); + } + template + typename vector<_Tp, _Alloc>::iterator + vector<_Tp, _Alloc>:: + erase(iterator __position) + { + if (__position + 1 != end()) + std::copy(__position + 1, end(), __position); + --this->_M_impl._M_finish; + this->_M_impl.destroy(this->_M_impl._M_finish); + return __position; + } + template + typename vector<_Tp, _Alloc>::iterator + vector<_Tp, _Alloc>:: + erase(iterator __first, iterator __last) + { + if (__first != __last) + { + if (__last != end()) + std::copy(__last, end(), __first); + _M_erase_at_end(__first.base() + (end() - __last)); + } + return __first; + } + template + vector<_Tp, _Alloc>& + vector<_Tp, _Alloc>:: + operator=(const vector<_Tp, _Alloc>& __x) + { + if (&__x != this) + { + const size_type __xlen = __x.size(); + if (__xlen > capacity()) + { + pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(), + __x.end()); + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __tmp; + this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __xlen; + } + else if (size() >= __xlen) + { + std::_Destroy(std::copy(__x.begin(), __x.end(), begin()), + end(), _M_get_Tp_allocator()); + } + else + { + std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(), + this->_M_impl._M_start); + std::__uninitialized_copy_a(__x._M_impl._M_start + size(), + __x._M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + } + this->_M_impl._M_finish = this->_M_impl._M_start + __xlen; + } + return *this; + } + template + void + vector<_Tp, _Alloc>:: + _M_fill_assign(size_t __n, const value_type& __val) + { + if (__n > capacity()) + { + vector __tmp(__n, __val, _M_get_Tp_allocator()); + __tmp.swap(*this); + } + else if (__n > size()) + { + std::fill(begin(), end(), __val); + std::__uninitialized_fill_n_a(this->_M_impl._M_finish, + __n - size(), __val, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n - size(); + } + else + _M_erase_at_end(std::fill_n(this->_M_impl._M_start, __n, __val)); + } + template + template + void + vector<_Tp, _Alloc>:: + _M_assign_aux(_InputIterator __first, _InputIterator __last, + std::input_iterator_tag) + { + pointer __cur(this->_M_impl._M_start); + for (; __first != __last && __cur != this->_M_impl._M_finish; + ++__cur, ++__first) + *__cur = *__first; + if (__first == __last) + _M_erase_at_end(__cur); + else + insert(end(), __first, __last); + } + template + template + void + vector<_Tp, _Alloc>:: + _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + std::forward_iterator_tag) + { + const size_type __len = std::distance(__first, __last); + if (__len > capacity()) + { + pointer __tmp(_M_allocate_and_copy(__len, __first, __last)); + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __tmp; + this->_M_impl._M_finish = this->_M_impl._M_start + __len; + this->_M_impl._M_end_of_storage = this->_M_impl._M_finish; + } + else if (size() >= __len) + _M_erase_at_end(std::copy(__first, __last, this->_M_impl._M_start)); + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, size()); + std::copy(__first, __mid, this->_M_impl._M_start); + this->_M_impl._M_finish = + std::__uninitialized_copy_a(__mid, __last, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + } + } + template + void + vector<_Tp, _Alloc>:: + _M_insert_aux(iterator __position, const _Tp& __x) + { + if (this->_M_impl._M_finish != this->_M_impl._M_end_of_storage) + { + this->_M_impl.construct(this->_M_impl._M_finish, + (*(this->_M_impl._M_finish - 1)) + ); + ++this->_M_impl._M_finish; + _Tp __x_copy = __x; + std::copy_backward(__position.base(), this->_M_impl._M_finish - 2, this->_M_impl._M_finish - 1) + ; + *__position = __x_copy; + } + else + { + const size_type __len = + _M_check_len(size_type(1), "vector::_M_insert_aux"); + const size_type __elems_before = __position - begin(); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + try + { + this->_M_impl.construct(__new_start + __elems_before, + __x); + __new_finish = 0; + __new_finish = + std::__uninitialized_move_a(this->_M_impl._M_start, + __position.base(), __new_start, + _M_get_Tp_allocator()); + ++__new_finish; + __new_finish = + std::__uninitialized_move_a(__position.base(), + this->_M_impl._M_finish, + __new_finish, + _M_get_Tp_allocator()); + } + catch(...) + { + if (!__new_finish) + this->_M_impl.destroy(__new_start + __elems_before); + else + std::_Destroy(__new_start, __new_finish, _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + } + template + void + vector<_Tp, _Alloc>:: + _M_fill_insert(iterator __position, size_type __n, const value_type& __x) + { + if (__n != 0) + { + if (size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_finish) >= __n) + { + value_type __x_copy = __x; + const size_type __elems_after = end() - __position; + pointer __old_finish(this->_M_impl._M_finish); + if (__elems_after > __n) + { + std::__uninitialized_move_a(this->_M_impl._M_finish - __n, + this->_M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n; + std::copy_backward(__position.base(), __old_finish - __n, __old_finish) + ; + std::fill(__position.base(), __position.base() + __n, + __x_copy); + } + else + { + std::__uninitialized_fill_n_a(this->_M_impl._M_finish, + __n - __elems_after, + __x_copy, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n - __elems_after; + std::__uninitialized_move_a(__position.base(), __old_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __elems_after; + std::fill(__position.base(), __old_finish, __x_copy); + } + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_fill_insert"); + const size_type __elems_before = __position - begin(); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + try + { + std::__uninitialized_fill_n_a(__new_start + __elems_before, + __n, __x, + _M_get_Tp_allocator()); + __new_finish = 0; + __new_finish = + std::__uninitialized_move_a(this->_M_impl._M_start, + __position.base(), + __new_start, + _M_get_Tp_allocator()); + __new_finish += __n; + __new_finish = + std::__uninitialized_move_a(__position.base(), + this->_M_impl._M_finish, + __new_finish, + _M_get_Tp_allocator()); + } + catch(...) + { + if (!__new_finish) + std::_Destroy(__new_start + __elems_before, + __new_start + __elems_before + __n, + _M_get_Tp_allocator()); + else + std::_Destroy(__new_start, __new_finish, + _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + } + } + template + template + void + vector<_Tp, _Alloc>:: + _M_range_insert(iterator __pos, _InputIterator __first, + _InputIterator __last, std::input_iterator_tag) + { + for (; __first != __last; ++__first) + { + __pos = insert(__pos, *__first); + ++__pos; + } + } + template + template + void + vector<_Tp, _Alloc>:: + _M_range_insert(iterator __position, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag) + { + if (__first != __last) + { + const size_type __n = std::distance(__first, __last); + if (size_type(this->_M_impl._M_end_of_storage + - this->_M_impl._M_finish) >= __n) + { + const size_type __elems_after = end() - __position; + pointer __old_finish(this->_M_impl._M_finish); + if (__elems_after > __n) + { + std::__uninitialized_move_a(this->_M_impl._M_finish - __n, + this->_M_impl._M_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n; + std::copy_backward(__position.base(), __old_finish - __n, __old_finish) + ; + std::copy(__first, __last, __position); + } + else + { + _ForwardIterator __mid = __first; + std::advance(__mid, __elems_after); + std::__uninitialized_copy_a(__mid, __last, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __n - __elems_after; + std::__uninitialized_move_a(__position.base(), + __old_finish, + this->_M_impl._M_finish, + _M_get_Tp_allocator()); + this->_M_impl._M_finish += __elems_after; + std::copy(__first, __mid, __position); + } + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_range_insert"); + pointer __new_start(this->_M_allocate(__len)); + pointer __new_finish(__new_start); + try + { + __new_finish = + std::__uninitialized_move_a(this->_M_impl._M_start, + __position.base(), + __new_start, + _M_get_Tp_allocator()); + __new_finish = + std::__uninitialized_copy_a(__first, __last, + __new_finish, + _M_get_Tp_allocator()); + __new_finish = + std::__uninitialized_move_a(__position.base(), + this->_M_impl._M_finish, + __new_finish, + _M_get_Tp_allocator()); + } + catch(...) + { + std::_Destroy(__new_start, __new_finish, + _M_get_Tp_allocator()); + _M_deallocate(__new_start, __len); + throw; + } + std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, + _M_get_Tp_allocator()); + _M_deallocate(this->_M_impl._M_start, + this->_M_impl._M_end_of_storage + - this->_M_impl._M_start); + this->_M_impl._M_start = __new_start; + this->_M_impl._M_finish = __new_finish; + this->_M_impl._M_end_of_storage = __new_start + __len; + } + } + } + template + void + vector:: + reserve(size_type __n) + { + if (__n > this->max_size()) + __throw_length_error(("vector::reserve")); + if (this->capacity() < __n) + { + _Bit_type* __q = this->_M_allocate(__n); + this->_M_impl._M_finish = _M_copy_aligned(begin(), end(), + iterator(__q, 0)); + this->_M_deallocate(); + this->_M_impl._M_start = iterator(__q, 0); + this->_M_impl._M_end_of_storage = (__q + (__n + int(_S_word_bit) - 1) + / int(_S_word_bit)); + } + } + template + void + vector:: + _M_fill_insert(iterator __position, size_type __n, bool __x) + { + if (__n == 0) + return; + if (capacity() - size() >= __n) + { + std::copy_backward(__position, end(), + this->_M_impl._M_finish + difference_type(__n)); + std::fill(__position, __position + difference_type(__n), __x); + this->_M_impl._M_finish += difference_type(__n); + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_fill_insert"); + _Bit_type * __q = this->_M_allocate(__len); + iterator __i = _M_copy_aligned(begin(), __position, + iterator(__q, 0)); + std::fill(__i, __i + difference_type(__n), __x); + this->_M_impl._M_finish = std::copy(__position, end(), + __i + difference_type(__n)); + this->_M_deallocate(); + this->_M_impl._M_end_of_storage = (__q + ((__len + + int(_S_word_bit) - 1) + / int(_S_word_bit))); + this->_M_impl._M_start = iterator(__q, 0); + } + } + template + template + void + vector:: + _M_insert_range(iterator __position, _ForwardIterator __first, + _ForwardIterator __last, std::forward_iterator_tag) + { + if (__first != __last) + { + size_type __n = std::distance(__first, __last); + if (capacity() - size() >= __n) + { + std::copy_backward(__position, end(), + this->_M_impl._M_finish + + difference_type(__n)); + std::copy(__first, __last, __position); + this->_M_impl._M_finish += difference_type(__n); + } + else + { + const size_type __len = + _M_check_len(__n, "vector::_M_insert_range"); + _Bit_type * __q = this->_M_allocate(__len); + iterator __i = _M_copy_aligned(begin(), __position, + iterator(__q, 0)); + __i = std::copy(__first, __last, __i); + this->_M_impl._M_finish = std::copy(__position, end(), __i); + this->_M_deallocate(); + this->_M_impl._M_end_of_storage = (__q + + ((__len + + int(_S_word_bit) - 1) + / int(_S_word_bit))); + this->_M_impl._M_start = iterator(__q, 0); + } + } + } + template + void + vector:: + _M_insert_aux(iterator __position, bool __x) + { + if (this->_M_impl._M_finish._M_p != this->_M_impl._M_end_of_storage) + { + std::copy_backward(__position, this->_M_impl._M_finish, + this->_M_impl._M_finish + 1); + *__position = __x; + ++this->_M_impl._M_finish; + } + else + { + const size_type __len = + _M_check_len(size_type(1), "vector::_M_insert_aux"); + _Bit_type * __q = this->_M_allocate(__len); + iterator __i = _M_copy_aligned(begin(), __position, + iterator(__q, 0)); + *__i++ = __x; + this->_M_impl._M_finish = std::copy(__position, end(), __i); + this->_M_deallocate(); + this->_M_impl._M_end_of_storage = (__q + ((__len + + int(_S_word_bit) - 1) + / int(_S_word_bit))); + this->_M_impl._M_start = iterator(__q, 0); + } + } +} +class Document; +namespace DotParser { + bool parse(const std::string& str, Document* graphDoc); + bool parseIntegers(const std::string& str, std::vector& v); + void setStrict(); + void undirectedDataStructure(); + void directedDataStructure(); + void dataStructureId(const std::string& str); + void attributeId(const std::string& str); + void subDataStructureId(const std::string& str); + void valid(const std::string& str); + void insertAttributeIntoAttributeList(); + void createAttributeList(); + void removeAttributeList(); + void createSubDataStructure(); + void createData(const std::string& str); + void setDataStructureAttributes(); + void setSubDataStructureAttributes(char const* first, char const* last); + void setDataAttributes(); + void applyAttributeList(); + void checkEdgeOperator(const std::string& str); + void edgebound(const std::string& str); + void createPointers(); + void leaveSubDataStructure(); +} +typedef long int ptrdiff_t; +namespace std __attribute__ ((__visibility__ ("default"))) +{ + namespace rel_ops + { + template + inline bool + operator!=(const _Tp& __x, const _Tp& __y) + { return !(__x == __y); } + template + inline bool + operator>(const _Tp& __x, const _Tp& __y) + { return __y < __x; } + template + inline bool + operator<=(const _Tp& __x, const _Tp& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const _Tp& __x, const _Tp& __y) + { return !(__x < __y); } + } +} +extern "C" { +union wait + { + int w_status; + struct + { + unsigned int:16; + unsigned int __w_retcode:8; + unsigned int __w_coredump:1; + unsigned int __w_termsig:7; + } __wait_terminated; + struct + { + unsigned int:16; + unsigned int __w_stopsig:8; + unsigned int __w_stopval:8; + } __wait_stopped; + }; +typedef struct + { + int quot; + int rem; + } div_t; +typedef struct + { + long int quot; + long int rem; + } ldiv_t; +__extension__ typedef struct + { + long long int quot; + long long int rem; + } lldiv_t; +extern size_t __ctype_get_mb_cur_max (void) throw () __attribute__ ((__warn_unused_result__)); +extern double atof (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int atoi (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern long int atol (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +__extension__ extern long long int atoll (__const char *__nptr) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern double strtod (__const char *__restrict __nptr, + char **__restrict __endptr) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern float strtof (__const char *__restrict __nptr, + char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern long double strtold (__const char *__restrict __nptr, + char **__restrict __endptr) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern long int strtol (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern unsigned long int strtoul (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +__extension__ +extern long long int strtoq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +__extension__ +extern unsigned long long int strtouq (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +__extension__ +extern long long int strtoll (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +__extension__ +extern unsigned long long int strtoull (__const char *__restrict __nptr, + char **__restrict __endptr, int __base) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern long int strtol_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); +extern unsigned long int strtoul_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); +__extension__ +extern long long int strtoll_l (__const char *__restrict __nptr, + char **__restrict __endptr, int __base, + __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); +__extension__ +extern unsigned long long int strtoull_l (__const char *__restrict __nptr, + char **__restrict __endptr, + int __base, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 4))) __attribute__ ((__warn_unused_result__)); +extern double strtod_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); +extern float strtof_l (__const char *__restrict __nptr, + char **__restrict __endptr, __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); +extern long double strtold_l (__const char *__restrict __nptr, + char **__restrict __endptr, + __locale_t __loc) + throw () __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__)); +extern __inline __attribute__ ((__gnu_inline__)) double +__attribute__ ((__leaf__)) atof (__const char *__nptr) throw () +{ + return strtod (__nptr, (char **) __null); +} +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__leaf__)) atoi (__const char *__nptr) throw () +{ + return (int) strtol (__nptr, (char **) __null, 10); +} +extern __inline __attribute__ ((__gnu_inline__)) long int +__attribute__ ((__leaf__)) atol (__const char *__nptr) throw () +{ + return strtol (__nptr, (char **) __null, 10); +} +__extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int +__attribute__ ((__leaf__)) atoll (__const char *__nptr) throw () +{ + return strtoll (__nptr, (char **) __null, 10); +} +extern char *l64a (long int __n) throw () __attribute__ ((__warn_unused_result__)); +extern long int a64l (__const char *__s) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern "C" { +typedef __u_char u_char; +typedef __u_short u_short; +typedef __u_int u_int; +typedef __u_long u_long; +typedef __quad_t quad_t; +typedef __u_quad_t u_quad_t; +typedef __fsid_t fsid_t; +typedef __loff_t loff_t; +typedef __ino_t ino_t; +typedef __ino64_t ino64_t; +typedef __dev_t dev_t; +typedef __mode_t mode_t; +typedef __nlink_t nlink_t; +typedef __id_t id_t; +typedef __daddr_t daddr_t; +typedef __caddr_t caddr_t; +typedef __key_t key_t; +typedef __suseconds_t suseconds_t; +typedef unsigned long int ulong; +typedef unsigned short int ushort; +typedef unsigned int uint; +typedef int int8_t __attribute__ ((__mode__ (__QI__))); +typedef int int16_t __attribute__ ((__mode__ (__HI__))); +typedef int int32_t __attribute__ ((__mode__ (__SI__))); +typedef int int64_t __attribute__ ((__mode__ (__DI__))); +typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); +typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); +typedef int register_t __attribute__ ((__mode__ (__word__))); +typedef int __sig_atomic_t; +typedef struct + { + unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; + } __sigset_t; +typedef __sigset_t sigset_t; +typedef long int __fd_mask; +typedef struct + { + __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))]; + } fd_set; +typedef __fd_mask fd_mask; +extern "C" { +extern int select (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + struct timeval *__restrict __timeout); +extern int pselect (int __nfds, fd_set *__restrict __readfds, + fd_set *__restrict __writefds, + fd_set *__restrict __exceptfds, + const struct timespec *__restrict __timeout, + const __sigset_t *__restrict __sigmask); +extern long int __fdelt_chk (long int __d); +extern long int __fdelt_warn (long int __d) + __attribute__((__warning__ ("bit outside of fd_set selected"))); +} +extern "C" { +__extension__ +extern unsigned int gnu_dev_major (unsigned long long int __dev) + throw () __attribute__ ((__const__)); +__extension__ +extern unsigned int gnu_dev_minor (unsigned long long int __dev) + throw () __attribute__ ((__const__)); +__extension__ +extern unsigned long long int gnu_dev_makedev (unsigned int __major, + unsigned int __minor) + throw () __attribute__ ((__const__)); +__extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) unsigned int +__attribute__ ((__leaf__)) gnu_dev_major (unsigned long long int __dev) throw () +{ + return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); +} +__extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) unsigned int +__attribute__ ((__leaf__)) gnu_dev_minor (unsigned long long int __dev) throw () +{ + return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); +} +__extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) unsigned long long int +__attribute__ ((__leaf__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw () +{ + return ((__minor & 0xff) | ((__major & 0xfff) << 8) + | (((unsigned long long int) (__minor & ~0xff)) << 12) + | (((unsigned long long int) (__major & ~0xfff)) << 32)); +} +} +typedef __blksize_t blksize_t; +typedef __blkcnt_t blkcnt_t; +typedef __fsblkcnt_t fsblkcnt_t; +typedef __fsfilcnt_t fsfilcnt_t; +typedef __blkcnt64_t blkcnt64_t; +typedef __fsblkcnt64_t fsblkcnt64_t; +typedef __fsfilcnt64_t fsfilcnt64_t; +} +extern long int random (void) throw (); +extern void srandom (unsigned int __seed) throw (); +extern char *initstate (unsigned int __seed, char *__statebuf, + size_t __statelen) throw () __attribute__ ((__nonnull__ (2))); +extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1))); +struct random_data + { + int32_t *fptr; + int32_t *rptr; + int32_t *state; + int rand_type; + int rand_deg; + int rand_sep; + int32_t *end_ptr; + }; +extern int random_r (struct random_data *__restrict __buf, + int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int srandom_r (unsigned int __seed, struct random_data *__buf) + throw () __attribute__ ((__nonnull__ (2))); +extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, + size_t __statelen, + struct random_data *__restrict __buf) + throw () __attribute__ ((__nonnull__ (2, 4))); +extern int setstate_r (char *__restrict __statebuf, + struct random_data *__restrict __buf) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int rand (void) throw (); +extern void srand (unsigned int __seed) throw (); +extern int rand_r (unsigned int *__seed) throw (); +extern double drand48 (void) throw (); +extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1))); +extern long int lrand48 (void) throw (); +extern long int nrand48 (unsigned short int __xsubi[3]) + throw () __attribute__ ((__nonnull__ (1))); +extern long int mrand48 (void) throw (); +extern long int jrand48 (unsigned short int __xsubi[3]) + throw () __attribute__ ((__nonnull__ (1))); +extern void srand48 (long int __seedval) throw (); +extern unsigned short int *seed48 (unsigned short int __seed16v[3]) + throw () __attribute__ ((__nonnull__ (1))); +extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1))); +struct drand48_data + { + unsigned short int __x[3]; + unsigned short int __old_x[3]; + unsigned short int __c; + unsigned short int __init; + unsigned long long int __a; + }; +extern int drand48_r (struct drand48_data *__restrict __buffer, + double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int erand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int lrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int nrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int mrand48_r (struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int jrand48_r (unsigned short int __xsubi[3], + struct drand48_data *__restrict __buffer, + long int *__restrict __result) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int srand48_r (long int __seedval, struct drand48_data *__buffer) + throw () __attribute__ ((__nonnull__ (2))); +extern int seed48_r (unsigned short int __seed16v[3], + struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int lcong48_r (unsigned short int __param[7], + struct drand48_data *__buffer) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); +extern void *calloc (size_t __nmemb, size_t __size) + throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); +extern void *realloc (void *__ptr, size_t __size) + throw () __attribute__ ((__warn_unused_result__)); +extern void free (void *__ptr) throw (); +extern void cfree (void *__ptr) throw (); +extern "C" { +extern void *alloca (size_t __size) throw (); +} +extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); +extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern void abort (void) throw () __attribute__ ((__noreturn__)); +extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1))); +extern "C++" int at_quick_exit (void (*__func) (void)) + throw () __asm ("at_quick_exit") __attribute__ ((__nonnull__ (1))); +extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) + throw () __attribute__ ((__nonnull__ (1))); +extern void exit (int __status) throw () __attribute__ ((__noreturn__)); +extern void quick_exit (int __status) throw () __attribute__ ((__noreturn__)); +extern void _Exit (int __status) throw () __attribute__ ((__noreturn__)); +extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern char *__secure_getenv (__const char *__name) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1))); +extern int setenv (__const char *__name, __const char *__value, int __replace) + throw () __attribute__ ((__nonnull__ (2))); +extern int unsetenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))); +extern int clearenv (void) throw (); +extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkstemps64 (char *__template, int __suffixlen) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkostemps (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int mkostemps64 (char *__template, int __suffixlen, int __flags) + __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int system (__const char *__command) __attribute__ ((__warn_unused_result__)); +extern char *canonicalize_file_name (__const char *__name) + throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern char *realpath (__const char *__restrict __name, + char *__restrict __resolved) throw () __attribute__ ((__warn_unused_result__)); +typedef int (*__compar_fn_t) (__const void *, __const void *); +typedef __compar_fn_t comparison_fn_t; +typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *); +extern void *bsearch (__const void *__key, __const void *__base, + size_t __nmemb, size_t __size, __compar_fn_t __compar) + __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__)); +extern void qsort (void *__base, size_t __nmemb, size_t __size, + __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4))); +extern void qsort_r (void *__base, size_t __nmemb, size_t __size, + __compar_d_fn_t __compar, void *__arg) + __attribute__ ((__nonnull__ (1, 4))); +extern int abs (int __x) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern long int labs (long int __x) throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +__extension__ extern long long int llabs (long long int __x) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern div_t div (int __numer, int __denom) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern ldiv_t ldiv (long int __numer, long int __denom) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +__extension__ extern lldiv_t lldiv (long long int __numer, + long long int __denom) + throw () __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__)); +extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *gcvt (double __value, int __ndigit, char *__buf) + throw () __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); +extern char *qecvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qfcvt (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign) + throw () __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__)); +extern char *qgcvt (long double __value, int __ndigit, char *__buf) + throw () __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__)); +extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); +extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, + int *__restrict __sign, char *__restrict __buf, + size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5))); +extern int qecvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (3, 4, 5))); +extern int qfcvt_r (long double __value, int __ndigit, + int *__restrict __decpt, int *__restrict __sign, + char *__restrict __buf, size_t __len) + throw () __attribute__ ((__nonnull__ (3, 4, 5))); +extern int mblen (__const char *__s, size_t __n) throw () __attribute__ ((__warn_unused_result__)); +extern int mbtowc (wchar_t *__restrict __pwc, + __const char *__restrict __s, size_t __n) throw () __attribute__ ((__warn_unused_result__)); +extern int wctomb (char *__s, wchar_t __wchar) throw () __attribute__ ((__warn_unused_result__)); +extern size_t mbstowcs (wchar_t *__restrict __pwcs, + __const char *__restrict __s, size_t __n) throw (); +extern size_t wcstombs (char *__restrict __s, + __const wchar_t *__restrict __pwcs, size_t __n) + throw (); +extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)); +extern int getsubopt (char **__restrict __optionp, + char *__const *__restrict __tokens, + char **__restrict __valuep) + throw () __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__)); +extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1))); +extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__)); +extern int grantpt (int __fd) throw (); +extern int unlockpt (int __fd) throw (); +extern char *ptsname (int __fd) throw () __attribute__ ((__warn_unused_result__)); +extern int ptsname_r (int __fd, char *__buf, size_t __buflen) + throw () __attribute__ ((__nonnull__ (2))); +extern int getpt (void); +extern int getloadavg (double __loadavg[], int __nelem) + throw () __attribute__ ((__nonnull__ (1))); +extern char *__realpath_chk (__const char *__restrict __name, + char *__restrict __resolved, + size_t __resolvedlen) throw () __attribute__ ((__warn_unused_result__)); +extern char *__realpath_alias (__const char *__restrict __name, char *__restrict __resolved) throw () __asm__ ("" "realpath") + __attribute__ ((__warn_unused_result__)); +extern char *__realpath_chk_warn (__const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) throw () __asm__ ("" "__realpath_chk") + __attribute__ ((__warn_unused_result__)) + __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +__attribute__ ((__leaf__)) realpath (__const char *__restrict __name, char *__restrict __resolved) throw () +{ + if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1) + { + return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1)); + } + return __realpath_alias (__name, __resolved); +} +extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen, + size_t __nreal) throw () __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) throw () __asm__ ("" "ptsname_r") + __attribute__ ((__nonnull__ (2))); +extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) throw () __asm__ ("" "__ptsname_r_chk") + __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__leaf__)) ptsname_r (int __fd, char *__buf, size_t __buflen) throw () +{ + if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__buflen)) + return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + if (__buflen > __builtin_object_size (__buf, 2 > 1)) + return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1)); + } + return __ptsname_r_alias (__fd, __buf, __buflen); +} +extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen) + throw () __attribute__ ((__warn_unused_result__)); +extern int __wctomb_alias (char *__s, wchar_t __wchar) throw () __asm__ ("" "wctomb") + __attribute__ ((__warn_unused_result__)); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) int +__attribute__ ((__leaf__)) wctomb (char *__s, wchar_t __wchar) throw () +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1)) + return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1)); + return __wctomb_alias (__s, __wchar); +} +extern size_t __mbstowcs_chk (wchar_t *__restrict __dst, + __const char *__restrict __src, + size_t __len, size_t __dstlen) throw (); +extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) throw () __asm__ ("" "mbstowcs") + ; +extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len, size_t __dstlen) throw () __asm__ ("" "__mbstowcs_chk") + __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +__attribute__ ((__leaf__)) mbstowcs (wchar_t *__restrict __dst, __const char *__restrict __src, size_t __len) throw () +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __mbstowcs_chk (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)) + return __mbstowcs_chk_warn (__dst, __src, __len, + __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t)); + } + return __mbstowcs_alias (__dst, __src, __len); +} +extern size_t __wcstombs_chk (char *__restrict __dst, + __const wchar_t *__restrict __src, + size_t __len, size_t __dstlen) throw (); +extern size_t __wcstombs_alias (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) throw () __asm__ ("" "wcstombs") + ; +extern size_t __wcstombs_chk_warn (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len, size_t __dstlen) throw () __asm__ ("" "__wcstombs_chk") + __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len"))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) size_t +__attribute__ ((__leaf__)) wcstombs (char *__restrict __dst, __const wchar_t *__restrict __src, size_t __len) throw () +{ + if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__len)) + return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + if (__len > __builtin_object_size (__dst, 2 > 1)) + return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1)); + } + return __wcstombs_alias (__dst, __src, __len); +} +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + using ::div_t; + using ::ldiv_t; + using ::abort; + using ::abs; + using ::atexit; + using ::atof; + using ::atoi; + using ::atol; + using ::bsearch; + using ::calloc; + using ::div; + using ::exit; + using ::free; + using ::getenv; + using ::labs; + using ::ldiv; + using ::malloc; + using ::mblen; + using ::mbstowcs; + using ::mbtowc; + using ::qsort; + using ::rand; + using ::realloc; + using ::srand; + using ::strtod; + using ::strtol; + using ::strtoul; + using ::system; + using ::wcstombs; + using ::wctomb; + inline long + abs(long __i) { return labs(__i); } + inline ldiv_t + div(long __i, long __j) { return ldiv(__i, __j); } +} +namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) +{ + using ::lldiv_t; + using ::_Exit; + inline long long + abs(long long __x) { return __x >= 0 ? __x : -__x; } + using ::llabs; + inline lldiv_t + div(long long __n, long long __d) + { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } + using ::lldiv; + using ::atoll; + using ::strtoll; + using ::strtoull; + using ::strtof; + using ::strtold; +} +namespace std +{ + using ::__gnu_cxx::lldiv_t; + using ::__gnu_cxx::_Exit; + using ::__gnu_cxx::abs; + using ::__gnu_cxx::llabs; + using ::__gnu_cxx::div; + using ::__gnu_cxx::lldiv; + using ::__gnu_cxx::atoll; + using ::__gnu_cxx::strtof; + using ::__gnu_cxx::strtoll; + using ::__gnu_cxx::strtoull; + using ::__gnu_cxx::strtold; +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + bool + binary_search(_FIter, _FIter, const _Tp&); + template + bool + binary_search(_FIter, _FIter, const _Tp&, _Compare); + template + _OIter + copy(_IIter, _IIter, _OIter); + template + _BIter2 + copy_backward(_BIter1, _BIter1, _BIter2); + template + pair<_FIter, _FIter> + equal_range(_FIter, _FIter, const _Tp&); + template + pair<_FIter, _FIter> + equal_range(_FIter, _FIter, const _Tp&, _Compare); + template + void + fill(_FIter, _FIter, const _Tp&); + template + _OIter + fill_n(_OIter, _Size, const _Tp&); + template + _FIter1 + find_end(_FIter1, _FIter1, _FIter2, _FIter2); + template + _FIter1 + find_end(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); + template + bool + includes(_IIter1, _IIter1, _IIter2, _IIter2); + template + bool + includes(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); + template + void + inplace_merge(_BIter, _BIter, _BIter); + template + void + inplace_merge(_BIter, _BIter, _BIter, _Compare); + template + void + iter_swap(_FIter1, _FIter2); + template + _FIter + lower_bound(_FIter, _FIter, const _Tp&); + template + _FIter + lower_bound(_FIter, _FIter, const _Tp&, _Compare); + template + void + make_heap(_RAIter, _RAIter); + template + void + make_heap(_RAIter, _RAIter, _Compare); + template + const _Tp& + max(const _Tp&, const _Tp&); + template + const _Tp& + max(const _Tp&, const _Tp&, _Compare); + template + const _Tp& + min(const _Tp&, const _Tp&); + template + const _Tp& + min(const _Tp&, const _Tp&, _Compare); + template + bool + next_permutation(_BIter, _BIter); + template + bool + next_permutation(_BIter, _BIter, _Compare); + template + _RAIter + partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter); + template + _RAIter + partial_sort_copy(_IIter, _IIter, _RAIter, _RAIter, _Compare); + template + void + pop_heap(_RAIter, _RAIter); + template + void + pop_heap(_RAIter, _RAIter, _Compare); + template + bool + prev_permutation(_BIter, _BIter); + template + bool + prev_permutation(_BIter, _BIter, _Compare); + template + void + push_heap(_RAIter, _RAIter); + template + void + push_heap(_RAIter, _RAIter, _Compare); + template + _FIter + remove(_FIter, _FIter, const _Tp&); + template + _FIter + remove_if(_FIter, _FIter, _Predicate); + template + _OIter + remove_copy(_IIter, _IIter, _OIter, const _Tp&); + template + _OIter + remove_copy_if(_IIter, _IIter, _OIter, _Predicate); + template + _OIter + replace_copy(_IIter, _IIter, _OIter, const _Tp&, const _Tp&); + template + _OIter + replace_copy_if(_Iter, _Iter, _OIter, _Predicate, const _Tp&); + template + void + reverse(_BIter, _BIter); + template + _OIter + reverse_copy(_BIter, _BIter, _OIter); + template + void + rotate(_FIter, _FIter, _FIter); + template + _OIter + rotate_copy(_FIter, _FIter, _FIter, _OIter); + template + void + sort_heap(_RAIter, _RAIter); + template + void + sort_heap(_RAIter, _RAIter, _Compare); + template + _BIter + stable_partition(_BIter, _BIter, _Predicate); + template + void + swap(_Tp&, _Tp&); + template + void + swap(_Tp (&)[_Nm], _Tp (&)[_Nm]); + template + _FIter2 + swap_ranges(_FIter1, _FIter1, _FIter2); + template + _FIter + unique(_FIter, _FIter); + template + _FIter + unique(_FIter, _FIter, _BinaryPredicate); + template + _FIter + upper_bound(_FIter, _FIter, const _Tp&); + template + _FIter + upper_bound(_FIter, _FIter, const _Tp&, _Compare); + template + _FIter + adjacent_find(_FIter, _FIter); + template + _FIter + adjacent_find(_FIter, _FIter, _BinaryPredicate); + template + typename iterator_traits<_IIter>::difference_type + count(_IIter, _IIter, const _Tp&); + template + typename iterator_traits<_IIter>::difference_type + count_if(_IIter, _IIter, _Predicate); + template + bool + equal(_IIter1, _IIter1, _IIter2); + template + bool + equal(_IIter1, _IIter1, _IIter2, _BinaryPredicate); + template + _IIter + find(_IIter, _IIter, const _Tp&); + template + _FIter1 + find_first_of(_FIter1, _FIter1, _FIter2, _FIter2); + template + _FIter1 + find_first_of(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); + template + _IIter + find_if(_IIter, _IIter, _Predicate); + template + _Funct + for_each(_IIter, _IIter, _Funct); + template + void + generate(_FIter, _FIter, _Generator); + template + _OIter + generate_n(_OIter, _Size, _Generator); + template + bool + lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2); + template + bool + lexicographical_compare(_IIter1, _IIter1, _IIter2, _IIter2, _Compare); + template + _FIter + max_element(_FIter, _FIter); + template + _FIter + max_element(_FIter, _FIter, _Compare); + template + _OIter + merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + template + _OIter + merge(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + template + _FIter + min_element(_FIter, _FIter); + template + _FIter + min_element(_FIter, _FIter, _Compare); + template + pair<_IIter1, _IIter2> + mismatch(_IIter1, _IIter1, _IIter2); + template + pair<_IIter1, _IIter2> + mismatch(_IIter1, _IIter1, _IIter2, _BinaryPredicate); + template + void + nth_element(_RAIter, _RAIter, _RAIter); + template + void + nth_element(_RAIter, _RAIter, _RAIter, _Compare); + template + void + partial_sort(_RAIter, _RAIter, _RAIter); + template + void + partial_sort(_RAIter, _RAIter, _RAIter, _Compare); + template + _BIter + partition(_BIter, _BIter, _Predicate); + template + void + random_shuffle(_RAIter, _RAIter); + template + void + random_shuffle(_RAIter, _RAIter, + _Generator&); + template + void + replace(_FIter, _FIter, const _Tp&, const _Tp&); + template + void + replace_if(_FIter, _FIter, _Predicate, const _Tp&); + template + _FIter1 + search(_FIter1, _FIter1, _FIter2, _FIter2); + template + _FIter1 + search(_FIter1, _FIter1, _FIter2, _FIter2, _BinaryPredicate); + template + _FIter + search_n(_FIter, _FIter, _Size, const _Tp&); + template + _FIter + search_n(_FIter, _FIter, _Size, const _Tp&, _BinaryPredicate); + template + _OIter + set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + template + _OIter + set_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + template + _OIter + set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + template + _OIter + set_intersection(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + template + _OIter + set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + template + _OIter + set_symmetric_difference(_IIter1, _IIter1, _IIter2, _IIter2, + _OIter, _Compare); + template + _OIter + set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter); + template + _OIter + set_union(_IIter1, _IIter1, _IIter2, _IIter2, _OIter, _Compare); + template + void + sort(_RAIter, _RAIter); + template + void + sort(_RAIter, _RAIter, _Compare); + template + void + stable_sort(_RAIter, _RAIter); + template + void + stable_sort(_RAIter, _RAIter, _Compare); + template + _OIter + transform(_IIter, _IIter, _OIter, _UnaryOperation); + template + _OIter + transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation); + template + _OIter + unique_copy(_IIter, _IIter, _OIter); + template + _OIter + unique_copy(_IIter, _IIter, _OIter, _BinaryPredicate); +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + _Distance + __is_heap_until(_RandomAccessIterator __first, _Distance __n) + { + _Distance __parent = 0; + for (_Distance __child = 1; __child < __n; ++__child) + { + if (__first[__parent] < __first[__child]) + return __child; + if ((__child & 1) == 0) + ++__parent; + } + return __n; + } + template + _Distance + __is_heap_until(_RandomAccessIterator __first, _Distance __n, + _Compare __comp) + { + _Distance __parent = 0; + for (_Distance __child = 1; __child < __n; ++__child) + { + if (__comp(__first[__parent], __first[__child])) + return __child; + if ((__child & 1) == 0) + ++__parent; + } + return __n; + } + template + inline bool + __is_heap(_RandomAccessIterator __first, _Distance __n) + { return std::__is_heap_until(__first, __n) == __n; } + template + inline bool + __is_heap(_RandomAccessIterator __first, _Compare __comp, _Distance __n) + { return std::__is_heap_until(__first, __n, __comp) == __n; } + template + inline bool + __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { return std::__is_heap(__first, std::distance(__first, __last)); } + template + inline bool + __is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { return std::__is_heap(__first, __comp, std::distance(__first, __last)); } + template + void + __push_heap(_RandomAccessIterator __first, + _Distance __holeIndex, _Distance __topIndex, _Tp __value) + { + _Distance __parent = (__holeIndex - 1) / 2; + while (__holeIndex > __topIndex && *(__first + __parent) < __value) + { + *(__first + __holeIndex) = (*(__first + __parent)); + __holeIndex = __parent; + __parent = (__holeIndex - 1) / 2; + } + *(__first + __holeIndex) = (__value); + } + template + inline void + push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + ; + ; + _ValueType __value = (*(__last - 1)); + std::__push_heap(__first, _DistanceType((__last - __first) - 1), + _DistanceType(0), (__value)); + } + template + void + __push_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __topIndex, _Tp __value, _Compare __comp) + { + _Distance __parent = (__holeIndex - 1) / 2; + while (__holeIndex > __topIndex + && __comp(*(__first + __parent), __value)) + { + *(__first + __holeIndex) = (*(__first + __parent)); + __holeIndex = __parent; + __parent = (__holeIndex - 1) / 2; + } + *(__first + __holeIndex) = (__value); + } + template + inline void + push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + ; + ; + _ValueType __value = (*(__last - 1)); + std::__push_heap(__first, _DistanceType((__last - __first) - 1), + _DistanceType(0), (__value), __comp); + } + template + void + __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __len, _Tp __value) + { + const _Distance __topIndex = __holeIndex; + _Distance __secondChild = __holeIndex; + while (__secondChild < (__len - 1) / 2) + { + __secondChild = 2 * (__secondChild + 1); + if (*(__first + __secondChild) < *(__first + (__secondChild - 1))) + __secondChild--; + *(__first + __holeIndex) = (*(__first + __secondChild)); + __holeIndex = __secondChild; + } + if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2) + { + __secondChild = 2 * (__secondChild + 1); + *(__first + __holeIndex) = (*(__first + (__secondChild - 1))) + ; + __holeIndex = __secondChild - 1; + } + std::__push_heap(__first, __holeIndex, __topIndex, + (__value)); + } + template + inline void + __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _RandomAccessIterator __result) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + _ValueType __value = (*__result); + *__result = (*__first); + std::__adjust_heap(__first, _DistanceType(0), + _DistanceType(__last - __first), + (__value)); + } + template + inline void + pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + ; + ; + --__last; + std::__pop_heap(__first, __last, __last); + } + template + void + __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __len, _Tp __value, _Compare __comp) + { + const _Distance __topIndex = __holeIndex; + _Distance __secondChild = __holeIndex; + while (__secondChild < (__len - 1) / 2) + { + __secondChild = 2 * (__secondChild + 1); + if (__comp(*(__first + __secondChild), + *(__first + (__secondChild - 1)))) + __secondChild--; + *(__first + __holeIndex) = (*(__first + __secondChild)); + __holeIndex = __secondChild; + } + if ((__len & 1) == 0 && __secondChild == (__len - 2) / 2) + { + __secondChild = 2 * (__secondChild + 1); + *(__first + __holeIndex) = (*(__first + (__secondChild - 1))) + ; + __holeIndex = __secondChild - 1; + } + std::__push_heap(__first, __holeIndex, __topIndex, + (__value), __comp); + } + template + inline void + __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _RandomAccessIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + _ValueType __value = (*__result); + *__result = (*__first); + std::__adjust_heap(__first, _DistanceType(0), + _DistanceType(__last - __first), + (__value), __comp); + } + template + inline void + pop_heap(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + ; + ; + --__last; + std::__pop_heap(__first, __last, __last, __comp); + } + template + void + make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + ; + if (__last - __first < 2) + return; + const _DistanceType __len = __last - __first; + _DistanceType __parent = (__len - 2) / 2; + while (true) + { + _ValueType __value = (*(__first + __parent)); + std::__adjust_heap(__first, __parent, __len, (__value)); + if (__parent == 0) + return; + __parent--; + } + } + template + void + make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + ; + if (__last - __first < 2) + return; + const _DistanceType __len = __last - __first; + _DistanceType __parent = (__len - 2) / 2; + while (true) + { + _ValueType __value = (*(__first + __parent)); + std::__adjust_heap(__first, __parent, __len, (__value), + __comp); + if (__parent == 0) + return; + __parent--; + } + } + template + void + sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + ; + ; + while (__last - __first > 1) + { + --__last; + std::__pop_heap(__first, __last, __last); + } + } + template + void + sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + ; + ; + while (__last - __first > 1) + { + --__last; + std::__pop_heap(__first, __last, __last, __comp); + } + } +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + pair<_Tp*, ptrdiff_t> + get_temporary_buffer(ptrdiff_t __len) + { + const ptrdiff_t __max = + __gnu_cxx::__numeric_traits::__max / sizeof(_Tp); + if (__len > __max) + __len = __max; + while (__len > 0) + { + _Tp* __tmp = static_cast<_Tp*>(::operator new(__len * sizeof(_Tp), + std::nothrow)); + if (__tmp != 0) + return std::pair<_Tp*, ptrdiff_t>(__tmp, __len); + __len /= 2; + } + return std::pair<_Tp*, ptrdiff_t>(static_cast<_Tp*>(0), 0); + } + template + inline void + return_temporary_buffer(_Tp* __p) + { ::operator delete(__p, std::nothrow); } + template + class _Temporary_buffer + { + public: + typedef _Tp value_type; + typedef value_type* pointer; + typedef pointer iterator; + typedef ptrdiff_t size_type; + protected: + size_type _M_original_len; + size_type _M_len; + pointer _M_buffer; + public: + size_type + size() const + { return _M_len; } + size_type + requested_size() const + { return _M_original_len; } + iterator + begin() + { return _M_buffer; } + iterator + end() + { return _M_buffer + _M_len; } + _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last); + ~_Temporary_buffer() + { + std::_Destroy(_M_buffer, _M_buffer + _M_len); + std::return_temporary_buffer(_M_buffer); + } + private: + _Temporary_buffer(const _Temporary_buffer&); + void + operator=(const _Temporary_buffer&); + }; + template + struct __uninitialized_construct_buf_dispatch + { + template + static void + __ucr(_ForwardIterator __first, _ForwardIterator __last, + _Tp& __value) + { + if(__first == __last) + return; + _ForwardIterator __cur = __first; + try + { + std::_Construct(std::__addressof(*__first), + (__value)); + _ForwardIterator __prev = __cur; + ++__cur; + for(; __cur != __last; ++__cur, ++__prev) + std::_Construct(std::__addressof(*__cur), + (*__prev)); + __value = (*__prev); + } + catch(...) + { + std::_Destroy(__first, __cur); + throw; + } + } + }; + template<> + struct __uninitialized_construct_buf_dispatch + { + template + static void + __ucr(_ForwardIterator, _ForwardIterator, _Tp&) { } + }; + template + inline void + __uninitialized_construct_buf(_ForwardIterator __first, + _ForwardIterator __last, + _Tp& __value) + { + typedef typename std::iterator_traits<_ForwardIterator>::value_type + _ValueType; + std::__uninitialized_construct_buf_dispatch< + __has_trivial_constructor(_ValueType)>:: + __ucr(__first, __last, __value); + } + template + _Temporary_buffer<_ForwardIterator, _Tp>:: + _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) + : _M_original_len(std::distance(__first, __last)), + _M_len(0), _M_buffer(0) + { + try + { + std::pair __p(std::get_temporary_buffer< + value_type>(_M_original_len)); + _M_buffer = __p.first; + _M_len = __p.second; + if(_M_buffer) + std::__uninitialized_construct_buf(_M_buffer, _M_buffer + _M_len, + *__first); + } + catch(...) + { + std::return_temporary_buffer(_M_buffer); + _M_buffer = 0; + _M_len = 0; + throw; + } + } +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + void + __move_median_first(_Iterator __a, _Iterator __b, _Iterator __c) + { + if (*__a < *__b) + { + if (*__b < *__c) + std::iter_swap(__a, __b); + else if (*__a < *__c) + std::iter_swap(__a, __c); + } + else if (*__a < *__c) + return; + else if (*__b < *__c) + std::iter_swap(__a, __c); + else + std::iter_swap(__a, __b); + } + template + void + __move_median_first(_Iterator __a, _Iterator __b, _Iterator __c, + _Compare __comp) + { + if (__comp(*__a, *__b)) + { + if (__comp(*__b, *__c)) + std::iter_swap(__a, __b); + else if (__comp(*__a, *__c)) + std::iter_swap(__a, __c); + } + else if (__comp(*__a, *__c)) + return; + else if (__comp(*__b, *__c)) + std::iter_swap(__a, __c); + else + std::iter_swap(__a, __b); + } + template + inline _InputIterator + __find(_InputIterator __first, _InputIterator __last, + const _Tp& __val, input_iterator_tag) + { + while (__first != __last && !(*__first == __val)) + ++__first; + return __first; + } + template + inline _InputIterator + __find_if(_InputIterator __first, _InputIterator __last, + _Predicate __pred, input_iterator_tag) + { + while (__first != __last && !bool(__pred(*__first))) + ++__first; + return __first; + } + template + _RandomAccessIterator + __find(_RandomAccessIterator __first, _RandomAccessIterator __last, + const _Tp& __val, random_access_iterator_tag) + { + typename iterator_traits<_RandomAccessIterator>::difference_type + __trip_count = (__last - __first) >> 2; + for (; __trip_count > 0; --__trip_count) + { + if (*__first == __val) + return __first; + ++__first; + if (*__first == __val) + return __first; + ++__first; + if (*__first == __val) + return __first; + ++__first; + if (*__first == __val) + return __first; + ++__first; + } + switch (__last - __first) + { + case 3: + if (*__first == __val) + return __first; + ++__first; + case 2: + if (*__first == __val) + return __first; + ++__first; + case 1: + if (*__first == __val) + return __first; + ++__first; + case 0: + default: + return __last; + } + } + template + _RandomAccessIterator + __find_if(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Predicate __pred, random_access_iterator_tag) + { + typename iterator_traits<_RandomAccessIterator>::difference_type + __trip_count = (__last - __first) >> 2; + for (; __trip_count > 0; --__trip_count) + { + if (__pred(*__first)) + return __first; + ++__first; + if (__pred(*__first)) + return __first; + ++__first; + if (__pred(*__first)) + return __first; + ++__first; + if (__pred(*__first)) + return __first; + ++__first; + } + switch (__last - __first) + { + case 3: + if (__pred(*__first)) + return __first; + ++__first; + case 2: + if (__pred(*__first)) + return __first; + ++__first; + case 1: + if (__pred(*__first)) + return __first; + ++__first; + case 0: + default: + return __last; + } + } + template + _ForwardIterator + __search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, const _Tp& __val, + std::forward_iterator_tag) + { + __first = std::find(__first, __last, __val); + while (__first != __last) + { + typename iterator_traits<_ForwardIterator>::difference_type + __n = __count; + _ForwardIterator __i = __first; + ++__i; + while (__i != __last && __n != 1 && *__i == __val) + { + ++__i; + --__n; + } + if (__n == 1) + return __first; + if (__i == __last) + return __last; + __first = std::find(++__i, __last, __val); + } + return __last; + } + template + _RandomAccessIter + __search_n(_RandomAccessIter __first, _RandomAccessIter __last, + _Integer __count, const _Tp& __val, + std::random_access_iterator_tag) + { + typedef typename std::iterator_traits<_RandomAccessIter>::difference_type + _DistanceType; + _DistanceType __tailSize = __last - __first; + const _DistanceType __pattSize = __count; + if (__tailSize < __pattSize) + return __last; + const _DistanceType __skipOffset = __pattSize - 1; + _RandomAccessIter __lookAhead = __first + __skipOffset; + __tailSize -= __pattSize; + while (1) + { + while (!(*__lookAhead == __val)) + { + if (__tailSize < __pattSize) + return __last; + __lookAhead += __pattSize; + __tailSize -= __pattSize; + } + _DistanceType __remainder = __skipOffset; + for (_RandomAccessIter __backTrack = __lookAhead - 1; + *__backTrack == __val; --__backTrack) + { + if (--__remainder == 0) + return (__lookAhead - __skipOffset); + } + if (__remainder > __tailSize) + return __last; + __lookAhead += __remainder; + __tailSize -= __remainder; + } + } + template + _ForwardIterator + __search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, const _Tp& __val, + _BinaryPredicate __binary_pred, std::forward_iterator_tag) + { + while (__first != __last && !bool(__binary_pred(*__first, __val))) + ++__first; + while (__first != __last) + { + typename iterator_traits<_ForwardIterator>::difference_type + __n = __count; + _ForwardIterator __i = __first; + ++__i; + while (__i != __last && __n != 1 && bool(__binary_pred(*__i, __val))) + { + ++__i; + --__n; + } + if (__n == 1) + return __first; + if (__i == __last) + return __last; + __first = ++__i; + while (__first != __last + && !bool(__binary_pred(*__first, __val))) + ++__first; + } + return __last; + } + template + _RandomAccessIter + __search_n(_RandomAccessIter __first, _RandomAccessIter __last, + _Integer __count, const _Tp& __val, + _BinaryPredicate __binary_pred, std::random_access_iterator_tag) + { + typedef typename std::iterator_traits<_RandomAccessIter>::difference_type + _DistanceType; + _DistanceType __tailSize = __last - __first; + const _DistanceType __pattSize = __count; + if (__tailSize < __pattSize) + return __last; + const _DistanceType __skipOffset = __pattSize - 1; + _RandomAccessIter __lookAhead = __first + __skipOffset; + __tailSize -= __pattSize; + while (1) + { + while (!bool(__binary_pred(*__lookAhead, __val))) + { + if (__tailSize < __pattSize) + return __last; + __lookAhead += __pattSize; + __tailSize -= __pattSize; + } + _DistanceType __remainder = __skipOffset; + for (_RandomAccessIter __backTrack = __lookAhead - 1; + __binary_pred(*__backTrack, __val); --__backTrack) + { + if (--__remainder == 0) + return (__lookAhead - __skipOffset); + } + if (__remainder > __tailSize) + return __last; + __lookAhead += __remainder; + __tailSize -= __remainder; + } + } + template + _ForwardIterator1 + __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + forward_iterator_tag, forward_iterator_tag) + { + if (__first2 == __last2) + return __last1; + else + { + _ForwardIterator1 __result = __last1; + while (1) + { + _ForwardIterator1 __new_result + = std::search(__first1, __last1, __first2, __last2); + if (__new_result == __last1) + return __result; + else + { + __result = __new_result; + __first1 = __new_result; + ++__first1; + } + } + } + } + template + _ForwardIterator1 + __find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + forward_iterator_tag, forward_iterator_tag, + _BinaryPredicate __comp) + { + if (__first2 == __last2) + return __last1; + else + { + _ForwardIterator1 __result = __last1; + while (1) + { + _ForwardIterator1 __new_result + = std::search(__first1, __last1, __first2, + __last2, __comp); + if (__new_result == __last1) + return __result; + else + { + __result = __new_result; + __first1 = __new_result; + ++__first1; + } + } + } + } + template + _BidirectionalIterator1 + __find_end(_BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + bidirectional_iterator_tag, bidirectional_iterator_tag) + { + typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; + typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; + _RevIterator1 __rlast1(__first1); + _RevIterator2 __rlast2(__first2); + _RevIterator1 __rresult = std::search(_RevIterator1(__last1), + __rlast1, + _RevIterator2(__last2), + __rlast2); + if (__rresult == __rlast1) + return __last1; + else + { + _BidirectionalIterator1 __result = __rresult.base(); + std::advance(__result, -std::distance(__first2, __last2)); + return __result; + } + } + template + _BidirectionalIterator1 + __find_end(_BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + bidirectional_iterator_tag, bidirectional_iterator_tag, + _BinaryPredicate __comp) + { + typedef reverse_iterator<_BidirectionalIterator1> _RevIterator1; + typedef reverse_iterator<_BidirectionalIterator2> _RevIterator2; + _RevIterator1 __rlast1(__first1); + _RevIterator2 __rlast2(__first2); + _RevIterator1 __rresult = std::search(_RevIterator1(__last1), __rlast1, + _RevIterator2(__last2), __rlast2, + __comp); + if (__rresult == __rlast1) + return __last1; + else + { + _BidirectionalIterator1 __result = __rresult.base(); + std::advance(__result, -std::distance(__first2, __last2)); + return __result; + } + } + template + inline _ForwardIterator1 + find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2) + { + ; + ; + return std::__find_end(__first1, __last1, __first2, __last2, + std::__iterator_category(__first1), + std::__iterator_category(__first2)); + } + template + inline _ForwardIterator1 + find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + _BinaryPredicate __comp) + { + ; + ; + return std::__find_end(__first1, __last1, __first2, __last2, + std::__iterator_category(__first1), + std::__iterator_category(__first2), + __comp); + } + template + _OutputIterator + remove_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, const _Tp& __value) + { + ; + for (; __first != __last; ++__first) + if (!(*__first == __value)) + { + *__result = *__first; + ++__result; + } + return __result; + } + template + _OutputIterator + remove_copy_if(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _Predicate __pred) + { + ; + for (; __first != __last; ++__first) + if (!bool(__pred(*__first))) + { + *__result = *__first; + ++__result; + } + return __result; + } + template + _ForwardIterator + remove(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __value) + { + ; + __first = std::find(__first, __last, __value); + if(__first == __last) + return __first; + _ForwardIterator __result = __first; + ++__first; + for(; __first != __last; ++__first) + if(!(*__first == __value)) + { + *__result = (*__first); + ++__result; + } + return __result; + } + template + _ForwardIterator + remove_if(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + ; + __first = std::find_if(__first, __last, __pred); + if(__first == __last) + return __first; + _ForwardIterator __result = __first; + ++__first; + for(; __first != __last; ++__first) + if(!bool(__pred(*__first))) + { + *__result = (*__first); + ++__result; + } + return __result; + } + template + _ForwardIterator + unique(_ForwardIterator __first, _ForwardIterator __last) + { + ; + __first = std::adjacent_find(__first, __last); + if (__first == __last) + return __last; + _ForwardIterator __dest = __first; + ++__first; + while (++__first != __last) + if (!(*__dest == *__first)) + *++__dest = (*__first); + return ++__dest; + } + template + _ForwardIterator + unique(_ForwardIterator __first, _ForwardIterator __last, + _BinaryPredicate __binary_pred) + { + ; + __first = std::adjacent_find(__first, __last, __binary_pred); + if (__first == __last) + return __last; + _ForwardIterator __dest = __first; + ++__first; + while (++__first != __last) + if (!bool(__binary_pred(*__dest, *__first))) + *++__dest = (*__first); + return ++__dest; + } + template + _OutputIterator + __unique_copy(_ForwardIterator __first, _ForwardIterator __last, + _OutputIterator __result, + forward_iterator_tag, output_iterator_tag) + { + _ForwardIterator __next = __first; + *__result = *__first; + while (++__next != __last) + if (!(*__first == *__next)) + { + __first = __next; + *++__result = *__first; + } + return ++__result; + } + template + _OutputIterator + __unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + input_iterator_tag, output_iterator_tag) + { + typename iterator_traits<_InputIterator>::value_type __value = *__first; + *__result = __value; + while (++__first != __last) + if (!(__value == *__first)) + { + __value = *__first; + *++__result = __value; + } + return ++__result; + } + template + _ForwardIterator + __unique_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, + input_iterator_tag, forward_iterator_tag) + { + *__result = *__first; + while (++__first != __last) + if (!(*__result == *__first)) + *++__result = *__first; + return ++__result; + } + template + _OutputIterator + __unique_copy(_ForwardIterator __first, _ForwardIterator __last, + _OutputIterator __result, _BinaryPredicate __binary_pred, + forward_iterator_tag, output_iterator_tag) + { + _ForwardIterator __next = __first; + *__result = *__first; + while (++__next != __last) + if (!bool(__binary_pred(*__first, *__next))) + { + __first = __next; + *++__result = *__first; + } + return ++__result; + } + template + _OutputIterator + __unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _BinaryPredicate __binary_pred, + input_iterator_tag, output_iterator_tag) + { + typename iterator_traits<_InputIterator>::value_type __value = *__first; + *__result = __value; + while (++__first != __last) + if (!bool(__binary_pred(__value, *__first))) + { + __value = *__first; + *++__result = __value; + } + return ++__result; + } + template + _ForwardIterator + __unique_copy(_InputIterator __first, _InputIterator __last, + _ForwardIterator __result, _BinaryPredicate __binary_pred, + input_iterator_tag, forward_iterator_tag) + { + *__result = *__first; + while (++__first != __last) + if (!bool(__binary_pred(*__result, *__first))) + *++__result = *__first; + return ++__result; + } + template + void + __reverse(_BidirectionalIterator __first, _BidirectionalIterator __last, + bidirectional_iterator_tag) + { + while (true) + if (__first == __last || __first == --__last) + return; + else + { + std::iter_swap(__first, __last); + ++__first; + } + } + template + void + __reverse(_RandomAccessIterator __first, _RandomAccessIterator __last, + random_access_iterator_tag) + { + if (__first == __last) + return; + --__last; + while (__first < __last) + { + std::iter_swap(__first, __last); + ++__first; + --__last; + } + } + template + inline void + reverse(_BidirectionalIterator __first, _BidirectionalIterator __last) + { + ; + std::__reverse(__first, __last, std::__iterator_category(__first)); + } + template + _OutputIterator + reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, + _OutputIterator __result) + { + ; + while (__first != __last) + { + --__last; + *__result = *__last; + ++__result; + } + return __result; + } + template + _EuclideanRingElement + __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n) + { + while (__n != 0) + { + _EuclideanRingElement __t = __m % __n; + __m = __n; + __n = __t; + } + return __m; + } + template + void + __rotate(_ForwardIterator __first, + _ForwardIterator __middle, + _ForwardIterator __last, + forward_iterator_tag) + { + if (__first == __middle || __last == __middle) + return; + _ForwardIterator __first2 = __middle; + do + { + std::iter_swap(__first, __first2); + ++__first; + ++__first2; + if (__first == __middle) + __middle = __first2; + } + while (__first2 != __last); + __first2 = __middle; + while (__first2 != __last) + { + std::iter_swap(__first, __first2); + ++__first; + ++__first2; + if (__first == __middle) + __middle = __first2; + else if (__first2 == __last) + __first2 = __middle; + } + } + template + void + __rotate(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + bidirectional_iterator_tag) + { + if (__first == __middle || __last == __middle) + return; + std::__reverse(__first, __middle, bidirectional_iterator_tag()); + std::__reverse(__middle, __last, bidirectional_iterator_tag()); + while (__first != __middle && __middle != __last) + { + std::iter_swap(__first, --__last); + ++__first; + } + if (__first == __middle) + std::__reverse(__middle, __last, bidirectional_iterator_tag()); + else + std::__reverse(__first, __middle, bidirectional_iterator_tag()); + } + template + void + __rotate(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last, + random_access_iterator_tag) + { + if (__first == __middle || __last == __middle) + return; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _Distance; + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + _Distance __n = __last - __first; + _Distance __k = __middle - __first; + if (__k == __n - __k) + { + std::swap_ranges(__first, __middle, __middle); + return; + } + _RandomAccessIterator __p = __first; + for (;;) + { + if (__k < __n - __k) + { + if (__is_pod(_ValueType) && __k == 1) + { + _ValueType __t = (*__p); + std::copy(__p + 1, __p + __n, __p); + *(__p + __n - 1) = (__t); + return; + } + _RandomAccessIterator __q = __p + __k; + for (_Distance __i = 0; __i < __n - __k; ++ __i) + { + std::iter_swap(__p, __q); + ++__p; + ++__q; + } + __n %= __k; + if (__n == 0) + return; + std::swap(__n, __k); + __k = __n - __k; + } + else + { + __k = __n - __k; + if (__is_pod(_ValueType) && __k == 1) + { + _ValueType __t = (*(__p + __n - 1)); + std::copy_backward(__p, __p + __n - 1, __p + __n); + *__p = (__t); + return; + } + _RandomAccessIterator __q = __p + __n; + __p = __q - __k; + for (_Distance __i = 0; __i < __n - __k; ++ __i) + { + --__p; + --__q; + std::iter_swap(__p, __q); + } + __n %= __k; + if (__n == 0) + return; + std::swap(__n, __k); + } + } + } + template + inline void + rotate(_ForwardIterator __first, _ForwardIterator __middle, + _ForwardIterator __last) + { + ; + ; + typedef typename iterator_traits<_ForwardIterator>::iterator_category + _IterType; + std::__rotate(__first, __middle, __last, _IterType()); + } + template + _OutputIterator + rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, + _ForwardIterator __last, _OutputIterator __result) + { + ; + ; + return std::copy(__first, __middle, + std::copy(__middle, __last, __result)); + } + template + _ForwardIterator + __partition(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred, forward_iterator_tag) + { + if (__first == __last) + return __first; + while (__pred(*__first)) + if (++__first == __last) + return __first; + _ForwardIterator __next = __first; + while (++__next != __last) + if (__pred(*__next)) + { + std::iter_swap(__first, __next); + ++__first; + } + return __first; + } + template + _BidirectionalIterator + __partition(_BidirectionalIterator __first, _BidirectionalIterator __last, + _Predicate __pred, bidirectional_iterator_tag) + { + while (true) + { + while (true) + if (__first == __last) + return __first; + else if (__pred(*__first)) + ++__first; + else + break; + --__last; + while (true) + if (__first == __last) + return __first; + else if (!bool(__pred(*__last))) + --__last; + else + break; + std::iter_swap(__first, __last); + ++__first; + } + } + template + _ForwardIterator + __inplace_stable_partition(_ForwardIterator __first, + _ForwardIterator __last, + _Predicate __pred, _Distance __len) + { + if (__len == 1) + return __pred(*__first) ? __last : __first; + _ForwardIterator __middle = __first; + std::advance(__middle, __len / 2); + _ForwardIterator __begin = std::__inplace_stable_partition(__first, + __middle, + __pred, + __len / 2); + _ForwardIterator __end = std::__inplace_stable_partition(__middle, __last, + __pred, + __len + - __len / 2); + std::rotate(__begin, __middle, __end); + std::advance(__begin, std::distance(__middle, __end)); + return __begin; + } + template + _ForwardIterator + __stable_partition_adaptive(_ForwardIterator __first, + _ForwardIterator __last, + _Predicate __pred, _Distance __len, + _Pointer __buffer, + _Distance __buffer_size) + { + if (__len <= __buffer_size) + { + _ForwardIterator __result1 = __first; + _Pointer __result2 = __buffer; + for (; __first != __last; ++__first) + if (__pred(*__first)) + { + *__result1 = (*__first); + ++__result1; + } + else + { + *__result2 = (*__first); + ++__result2; + } + std::copy(__buffer, __result2, __result1); + return __result1; + } + else + { + _ForwardIterator __middle = __first; + std::advance(__middle, __len / 2); + _ForwardIterator __begin = + std::__stable_partition_adaptive(__first, __middle, __pred, + __len / 2, __buffer, + __buffer_size); + _ForwardIterator __end = + std::__stable_partition_adaptive(__middle, __last, __pred, + __len - __len / 2, + __buffer, __buffer_size); + std::rotate(__begin, __middle, __end); + std::advance(__begin, std::distance(__middle, __end)); + return __begin; + } + } + template + _ForwardIterator + stable_partition(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + ; + if (__first == __last) + return __first; + else + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + _Temporary_buffer<_ForwardIterator, _ValueType> __buf(__first, + __last); + if (__buf.size() > 0) + return + std::__stable_partition_adaptive(__first, __last, __pred, + _DistanceType(__buf.requested_size()), + __buf.begin(), + _DistanceType(__buf.size())); + else + return + std::__inplace_stable_partition(__first, __last, __pred, + _DistanceType(__buf.requested_size())); + } + } + template + void + __heap_select(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last) + { + std::make_heap(__first, __middle); + for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) + if (*__i < *__first) + std::__pop_heap(__first, __middle, __i); + } + template + void + __heap_select(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last, _Compare __comp) + { + std::make_heap(__first, __middle, __comp); + for (_RandomAccessIterator __i = __middle; __i < __last; ++__i) + if (__comp(*__i, *__first)) + std::__pop_heap(__first, __middle, __i, __comp); + } + template + _RandomAccessIterator + partial_sort_copy(_InputIterator __first, _InputIterator __last, + _RandomAccessIterator __result_first, + _RandomAccessIterator __result_last) + { + typedef typename iterator_traits<_InputIterator>::value_type + _InputValueType; + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _OutputValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + ; + ; + if (__result_first == __result_last) + return __result_last; + _RandomAccessIterator __result_real_last = __result_first; + while(__first != __last && __result_real_last != __result_last) + { + *__result_real_last = *__first; + ++__result_real_last; + ++__first; + } + std::make_heap(__result_first, __result_real_last); + while (__first != __last) + { + if (*__first < *__result_first) + std::__adjust_heap(__result_first, _DistanceType(0), + _DistanceType(__result_real_last + - __result_first), + _InputValueType(*__first)); + ++__first; + } + std::sort_heap(__result_first, __result_real_last); + return __result_real_last; + } + template + _RandomAccessIterator + partial_sort_copy(_InputIterator __first, _InputIterator __last, + _RandomAccessIterator __result_first, + _RandomAccessIterator __result_last, + _Compare __comp) + { + typedef typename iterator_traits<_InputIterator>::value_type + _InputValueType; + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _OutputValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + ; + ; + if (__result_first == __result_last) + return __result_last; + _RandomAccessIterator __result_real_last = __result_first; + while(__first != __last && __result_real_last != __result_last) + { + *__result_real_last = *__first; + ++__result_real_last; + ++__first; + } + std::make_heap(__result_first, __result_real_last, __comp); + while (__first != __last) + { + if (__comp(*__first, *__result_first)) + std::__adjust_heap(__result_first, _DistanceType(0), + _DistanceType(__result_real_last + - __result_first), + _InputValueType(*__first), + __comp); + ++__first; + } + std::sort_heap(__result_first, __result_real_last, __comp); + return __result_real_last; + } + template + void + __unguarded_linear_insert(_RandomAccessIterator __last) + { + typename iterator_traits<_RandomAccessIterator>::value_type + __val = (*__last); + _RandomAccessIterator __next = __last; + --__next; + while (__val < *__next) + { + *__last = (*__next); + __last = __next; + --__next; + } + *__last = (__val); + } + template + void + __unguarded_linear_insert(_RandomAccessIterator __last, + _Compare __comp) + { + typename iterator_traits<_RandomAccessIterator>::value_type + __val = (*__last); + _RandomAccessIterator __next = __last; + --__next; + while (__comp(__val, *__next)) + { + *__last = (*__next); + __last = __next; + --__next; + } + *__last = (__val); + } + template + void + __insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last) + { + if (__first == __last) + return; + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + { + if (*__i < *__first) + { + typename iterator_traits<_RandomAccessIterator>::value_type + __val = (*__i); + std::copy_backward(__first, __i, __i + 1); + *__first = (__val); + } + else + std::__unguarded_linear_insert(__i); + } + } + template + void + __insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + if (__first == __last) return; + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + { + if (__comp(*__i, *__first)) + { + typename iterator_traits<_RandomAccessIterator>::value_type + __val = (*__i); + std::copy_backward(__first, __i, __i + 1); + *__first = (__val); + } + else + std::__unguarded_linear_insert(__i, __comp); + } + } + template + inline void + __unguarded_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + for (_RandomAccessIterator __i = __first; __i != __last; ++__i) + std::__unguarded_linear_insert(__i); + } + template + inline void + __unguarded_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + for (_RandomAccessIterator __i = __first; __i != __last; ++__i) + std::__unguarded_linear_insert(__i, __comp); + } + enum { _S_threshold = 16 }; + template + void + __final_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last) + { + if (__last - __first > int(_S_threshold)) + { + std::__insertion_sort(__first, __first + int(_S_threshold)); + std::__unguarded_insertion_sort(__first + int(_S_threshold), __last); + } + else + std::__insertion_sort(__first, __last); + } + template + void + __final_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + if (__last - __first > int(_S_threshold)) + { + std::__insertion_sort(__first, __first + int(_S_threshold), __comp); + std::__unguarded_insertion_sort(__first + int(_S_threshold), __last, + __comp); + } + else + std::__insertion_sort(__first, __last, __comp); + } + template + _RandomAccessIterator + __unguarded_partition(_RandomAccessIterator __first, + _RandomAccessIterator __last, const _Tp& __pivot) + { + while (true) + { + while (*__first < __pivot) + ++__first; + --__last; + while (__pivot < *__last) + --__last; + if (!(__first < __last)) + return __first; + std::iter_swap(__first, __last); + ++__first; + } + } + template + _RandomAccessIterator + __unguarded_partition(_RandomAccessIterator __first, + _RandomAccessIterator __last, + const _Tp& __pivot, _Compare __comp) + { + while (true) + { + while (__comp(*__first, __pivot)) + ++__first; + --__last; + while (__comp(__pivot, *__last)) + --__last; + if (!(__first < __last)) + return __first; + std::iter_swap(__first, __last); + ++__first; + } + } + template + inline _RandomAccessIterator + __unguarded_partition_pivot(_RandomAccessIterator __first, + _RandomAccessIterator __last) + { + _RandomAccessIterator __mid = __first + (__last - __first) / 2; + std::__move_median_first(__first, __mid, (__last - 1)); + return std::__unguarded_partition(__first + 1, __last, *__first); + } + template + inline _RandomAccessIterator + __unguarded_partition_pivot(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + _RandomAccessIterator __mid = __first + (__last - __first) / 2; + std::__move_median_first(__first, __mid, (__last - 1), __comp); + return std::__unguarded_partition(__first + 1, __last, *__first, __comp); + } + template + void + __introsort_loop(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Size __depth_limit) + { + while (__last - __first > int(_S_threshold)) + { + if (__depth_limit == 0) + { + std::partial_sort(__first, __last, __last); + return; + } + --__depth_limit; + _RandomAccessIterator __cut = + std::__unguarded_partition_pivot(__first, __last); + std::__introsort_loop(__cut, __last, __depth_limit); + __last = __cut; + } + } + template + void + __introsort_loop(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Size __depth_limit, _Compare __comp) + { + while (__last - __first > int(_S_threshold)) + { + if (__depth_limit == 0) + { + std::partial_sort(__first, __last, __last, __comp); + return; + } + --__depth_limit; + _RandomAccessIterator __cut = + std::__unguarded_partition_pivot(__first, __last, __comp); + std::__introsort_loop(__cut, __last, __depth_limit, __comp); + __last = __cut; + } + } + template + void + __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last, _Size __depth_limit) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + while (__last - __first > 3) + { + if (__depth_limit == 0) + { + std::__heap_select(__first, __nth + 1, __last); + std::iter_swap(__first, __nth); + return; + } + --__depth_limit; + _RandomAccessIterator __cut = + std::__unguarded_partition_pivot(__first, __last); + if (__cut <= __nth) + __first = __cut; + else + __last = __cut; + } + std::__insertion_sort(__first, __last); + } + template + void + __introselect(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last, _Size __depth_limit, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + while (__last - __first > 3) + { + if (__depth_limit == 0) + { + std::__heap_select(__first, __nth + 1, __last, __comp); + std::iter_swap(__first, __nth); + return; + } + --__depth_limit; + _RandomAccessIterator __cut = + std::__unguarded_partition_pivot(__first, __last, __comp); + if (__cut <= __nth) + __first = __cut; + else + __last = __cut; + } + std::__insertion_sort(__first, __last, __comp); + } + template + _ForwardIterator + lower_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + ; + _DistanceType __len = std::distance(__first, __last); + while (__len > 0) + { + _DistanceType __half = __len >> 1; + _ForwardIterator __middle = __first; + std::advance(__middle, __half); + if (__comp(*__middle, __val)) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else + __len = __half; + } + return __first; + } + template + _ForwardIterator + upper_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + ; + _DistanceType __len = std::distance(__first, __last); + while (__len > 0) + { + _DistanceType __half = __len >> 1; + _ForwardIterator __middle = __first; + std::advance(__middle, __half); + if (__val < *__middle) + __len = __half; + else + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + } + return __first; + } + template + _ForwardIterator + upper_bound(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + ; + _DistanceType __len = std::distance(__first, __last); + while (__len > 0) + { + _DistanceType __half = __len >> 1; + _ForwardIterator __middle = __first; + std::advance(__middle, __half); + if (__comp(__val, *__middle)) + __len = __half; + else + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + } + return __first; + } + template + pair<_ForwardIterator, _ForwardIterator> + equal_range(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + ; + ; + _DistanceType __len = std::distance(__first, __last); + while (__len > 0) + { + _DistanceType __half = __len >> 1; + _ForwardIterator __middle = __first; + std::advance(__middle, __half); + if (*__middle < __val) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else if (__val < *__middle) + __len = __half; + else + { + _ForwardIterator __left = std::lower_bound(__first, __middle, + __val); + std::advance(__first, __len); + _ForwardIterator __right = std::upper_bound(++__middle, __first, + __val); + return pair<_ForwardIterator, _ForwardIterator>(__left, __right); + } + } + return pair<_ForwardIterator, _ForwardIterator>(__first, __first); + } + template + pair<_ForwardIterator, _ForwardIterator> + equal_range(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + typedef typename iterator_traits<_ForwardIterator>::difference_type + _DistanceType; + ; + ; + _DistanceType __len = std::distance(__first, __last); + while (__len > 0) + { + _DistanceType __half = __len >> 1; + _ForwardIterator __middle = __first; + std::advance(__middle, __half); + if (__comp(*__middle, __val)) + { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else if (__comp(__val, *__middle)) + __len = __half; + else + { + _ForwardIterator __left = std::lower_bound(__first, __middle, + __val, __comp); + std::advance(__first, __len); + _ForwardIterator __right = std::upper_bound(++__middle, __first, + __val, __comp); + return pair<_ForwardIterator, _ForwardIterator>(__left, __right); + } + } + return pair<_ForwardIterator, _ForwardIterator>(__first, __first); + } + template + bool + binary_search(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + ; + ; + _ForwardIterator __i = std::lower_bound(__first, __last, __val); + return __i != __last && !(__val < *__i); + } + template + bool + binary_search(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __val, _Compare __comp) + { + typedef typename iterator_traits<_ForwardIterator>::value_type + _ValueType; + ; + ; + _ForwardIterator __i = std::lower_bound(__first, __last, __val, __comp); + return __i != __last && !bool(__comp(__val, *__i)); + } + template + void + __move_merge_adaptive(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + while (__first1 != __last1 && __first2 != __last2) + { + if (*__first2 < *__first1) + { + *__result = (*__first2); + ++__first2; + } + else + { + *__result = (*__first1); + ++__first1; + } + ++__result; + } + if (__first1 != __last1) + std::copy(__first1, __last1, __result); + } + template + void + __move_merge_adaptive(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(*__first2, *__first1)) + { + *__result = (*__first2); + ++__first2; + } + else + { + *__result = (*__first1); + ++__first1; + } + ++__result; + } + if (__first1 != __last1) + std::copy(__first1, __last1, __result); + } + template + void + __move_merge_adaptive_backward(_BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + _BidirectionalIterator3 __result) + { + if (__first1 == __last1) + { + std::copy_backward(__first2, __last2, __result); + return; + } + else if (__first2 == __last2) + return; + --__last1; + --__last2; + while (true) + { + if (*__last2 < *__last1) + { + *--__result = (*__last1); + if (__first1 == __last1) + { + std::copy_backward(__first2, ++__last2, __result); + return; + } + --__last1; + } + else + { + *--__result = (*__last2); + if (__first2 == __last2) + return; + --__last2; + } + } + } + template + void + __move_merge_adaptive_backward(_BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + _BidirectionalIterator3 __result, + _Compare __comp) + { + if (__first1 == __last1) + { + std::copy_backward(__first2, __last2, __result); + return; + } + else if (__first2 == __last2) + return; + --__last1; + --__last2; + while (true) + { + if (__comp(*__last2, *__last1)) + { + *--__result = (*__last1); + if (__first1 == __last1) + { + std::copy_backward(__first2, ++__last2, __result); + return; + } + --__last1; + } + else + { + *--__result = (*__last2); + if (__first2 == __last2) + return; + --__last2; + } + } + } + template + _BidirectionalIterator1 + __rotate_adaptive(_BidirectionalIterator1 __first, + _BidirectionalIterator1 __middle, + _BidirectionalIterator1 __last, + _Distance __len1, _Distance __len2, + _BidirectionalIterator2 __buffer, + _Distance __buffer_size) + { + _BidirectionalIterator2 __buffer_end; + if (__len1 > __len2 && __len2 <= __buffer_size) + { + if (__len2) + { + __buffer_end = std::copy(__middle, __last, __buffer); + std::copy_backward(__first, __middle, __last); + return std::copy(__buffer, __buffer_end, __first); + } + else + return __first; + } + else if (__len1 <= __buffer_size) + { + if (__len1) + { + __buffer_end = std::copy(__first, __middle, __buffer); + std::copy(__middle, __last, __first); + return std::copy_backward(__buffer, __buffer_end, __last); + } + else + return __last; + } + else + { + std::rotate(__first, __middle, __last); + std::advance(__first, std::distance(__middle, __last)); + return __first; + } + } + template + void + __merge_adaptive(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Distance __len1, _Distance __len2, + _Pointer __buffer, _Distance __buffer_size) + { + if (__len1 <= __len2 && __len1 <= __buffer_size) + { + _Pointer __buffer_end = std::copy(__first, __middle, __buffer); + std::__move_merge_adaptive(__buffer, __buffer_end, __middle, __last, + __first); + } + else if (__len2 <= __buffer_size) + { + _Pointer __buffer_end = std::copy(__middle, __last, __buffer); + std::__move_merge_adaptive_backward(__first, __middle, __buffer, + __buffer_end, __last); + } + else + { + _BidirectionalIterator __first_cut = __first; + _BidirectionalIterator __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) + { + __len11 = __len1 / 2; + std::advance(__first_cut, __len11); + __second_cut = std::lower_bound(__middle, __last, + *__first_cut); + __len22 = std::distance(__middle, __second_cut); + } + else + { + __len22 = __len2 / 2; + std::advance(__second_cut, __len22); + __first_cut = std::upper_bound(__first, __middle, + *__second_cut); + __len11 = std::distance(__first, __first_cut); + } + _BidirectionalIterator __new_middle = + std::__rotate_adaptive(__first_cut, __middle, __second_cut, + __len1 - __len11, __len22, __buffer, + __buffer_size); + std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, + __len22, __buffer, __buffer_size); + std::__merge_adaptive(__new_middle, __second_cut, __last, + __len1 - __len11, + __len2 - __len22, __buffer, __buffer_size); + } + } + template + void + __merge_adaptive(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Distance __len1, _Distance __len2, + _Pointer __buffer, _Distance __buffer_size, + _Compare __comp) + { + if (__len1 <= __len2 && __len1 <= __buffer_size) + { + _Pointer __buffer_end = std::copy(__first, __middle, __buffer); + std::__move_merge_adaptive(__buffer, __buffer_end, __middle, __last, + __first, __comp); + } + else if (__len2 <= __buffer_size) + { + _Pointer __buffer_end = std::copy(__middle, __last, __buffer); + std::__move_merge_adaptive_backward(__first, __middle, __buffer, + __buffer_end, __last, __comp); + } + else + { + _BidirectionalIterator __first_cut = __first; + _BidirectionalIterator __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) + { + __len11 = __len1 / 2; + std::advance(__first_cut, __len11); + __second_cut = std::lower_bound(__middle, __last, *__first_cut, + __comp); + __len22 = std::distance(__middle, __second_cut); + } + else + { + __len22 = __len2 / 2; + std::advance(__second_cut, __len22); + __first_cut = std::upper_bound(__first, __middle, *__second_cut, + __comp); + __len11 = std::distance(__first, __first_cut); + } + _BidirectionalIterator __new_middle = + std::__rotate_adaptive(__first_cut, __middle, __second_cut, + __len1 - __len11, __len22, __buffer, + __buffer_size); + std::__merge_adaptive(__first, __first_cut, __new_middle, __len11, + __len22, __buffer, __buffer_size, __comp); + std::__merge_adaptive(__new_middle, __second_cut, __last, + __len1 - __len11, + __len2 - __len22, __buffer, + __buffer_size, __comp); + } + } + template + void + __merge_without_buffer(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Distance __len1, _Distance __len2) + { + if (__len1 == 0 || __len2 == 0) + return; + if (__len1 + __len2 == 2) + { + if (*__middle < *__first) + std::iter_swap(__first, __middle); + return; + } + _BidirectionalIterator __first_cut = __first; + _BidirectionalIterator __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) + { + __len11 = __len1 / 2; + std::advance(__first_cut, __len11); + __second_cut = std::lower_bound(__middle, __last, *__first_cut); + __len22 = std::distance(__middle, __second_cut); + } + else + { + __len22 = __len2 / 2; + std::advance(__second_cut, __len22); + __first_cut = std::upper_bound(__first, __middle, *__second_cut); + __len11 = std::distance(__first, __first_cut); + } + std::rotate(__first_cut, __middle, __second_cut); + _BidirectionalIterator __new_middle = __first_cut; + std::advance(__new_middle, std::distance(__middle, __second_cut)); + std::__merge_without_buffer(__first, __first_cut, __new_middle, + __len11, __len22); + std::__merge_without_buffer(__new_middle, __second_cut, __last, + __len1 - __len11, __len2 - __len22); + } + template + void + __merge_without_buffer(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Distance __len1, _Distance __len2, + _Compare __comp) + { + if (__len1 == 0 || __len2 == 0) + return; + if (__len1 + __len2 == 2) + { + if (__comp(*__middle, *__first)) + std::iter_swap(__first, __middle); + return; + } + _BidirectionalIterator __first_cut = __first; + _BidirectionalIterator __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) + { + __len11 = __len1 / 2; + std::advance(__first_cut, __len11); + __second_cut = std::lower_bound(__middle, __last, *__first_cut, + __comp); + __len22 = std::distance(__middle, __second_cut); + } + else + { + __len22 = __len2 / 2; + std::advance(__second_cut, __len22); + __first_cut = std::upper_bound(__first, __middle, *__second_cut, + __comp); + __len11 = std::distance(__first, __first_cut); + } + std::rotate(__first_cut, __middle, __second_cut); + _BidirectionalIterator __new_middle = __first_cut; + std::advance(__new_middle, std::distance(__middle, __second_cut)); + std::__merge_without_buffer(__first, __first_cut, __new_middle, + __len11, __len22, __comp); + std::__merge_without_buffer(__new_middle, __second_cut, __last, + __len1 - __len11, __len2 - __len22, __comp); + } + template + void + inplace_merge(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last) + { + typedef typename iterator_traits<_BidirectionalIterator>::value_type + _ValueType; + typedef typename iterator_traits<_BidirectionalIterator>::difference_type + _DistanceType; + ; + ; + if (__first == __middle || __middle == __last) + return; + _DistanceType __len1 = std::distance(__first, __middle); + _DistanceType __len2 = std::distance(__middle, __last); + _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first, + __last); + if (__buf.begin() == 0) + std::__merge_without_buffer(__first, __middle, __last, __len1, __len2); + else + std::__merge_adaptive(__first, __middle, __last, __len1, __len2, + __buf.begin(), _DistanceType(__buf.size())); + } + template + void + inplace_merge(_BidirectionalIterator __first, + _BidirectionalIterator __middle, + _BidirectionalIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_BidirectionalIterator>::value_type + _ValueType; + typedef typename iterator_traits<_BidirectionalIterator>::difference_type + _DistanceType; + ; + ; + if (__first == __middle || __middle == __last) + return; + const _DistanceType __len1 = std::distance(__first, __middle); + const _DistanceType __len2 = std::distance(__middle, __last); + _Temporary_buffer<_BidirectionalIterator, _ValueType> __buf(__first, + __last); + if (__buf.begin() == 0) + std::__merge_without_buffer(__first, __middle, __last, __len1, + __len2, __comp); + else + std::__merge_adaptive(__first, __middle, __last, __len1, __len2, + __buf.begin(), _DistanceType(__buf.size()), + __comp); + } + template + _OutputIterator + __move_merge(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + while (__first1 != __last1 && __first2 != __last2) + { + if (*__first2 < *__first1) + { + *__result = (*__first2); + ++__first2; + } + else + { + *__result = (*__first1); + ++__first1; + } + ++__result; + } + return std::copy(__first2, __last2, std::copy(__first1, __last1, __result)) + ; + } + template + _OutputIterator + __move_merge(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(*__first2, *__first1)) + { + *__result = (*__first2); + ++__first2; + } + else + { + *__result = (*__first1); + ++__first1; + } + ++__result; + } + return std::copy(__first2, __last2, std::copy(__first1, __last1, __result)) + ; + } + template + void + __merge_sort_loop(_RandomAccessIterator1 __first, + _RandomAccessIterator1 __last, + _RandomAccessIterator2 __result, + _Distance __step_size) + { + const _Distance __two_step = 2 * __step_size; + while (__last - __first >= __two_step) + { + __result = std::__move_merge(__first, __first + __step_size, + __first + __step_size, + __first + __two_step, __result); + __first += __two_step; + } + __step_size = std::min(_Distance(__last - __first), __step_size); + std::__move_merge(__first, __first + __step_size, + __first + __step_size, __last, __result); + } + template + void + __merge_sort_loop(_RandomAccessIterator1 __first, + _RandomAccessIterator1 __last, + _RandomAccessIterator2 __result, _Distance __step_size, + _Compare __comp) + { + const _Distance __two_step = 2 * __step_size; + while (__last - __first >= __two_step) + { + __result = std::__move_merge(__first, __first + __step_size, + __first + __step_size, + __first + __two_step, + __result, __comp); + __first += __two_step; + } + __step_size = std::min(_Distance(__last - __first), __step_size); + std::__move_merge(__first,__first + __step_size, + __first + __step_size, __last, __result, __comp); + } + template + void + __chunk_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Distance __chunk_size) + { + while (__last - __first >= __chunk_size) + { + std::__insertion_sort(__first, __first + __chunk_size); + __first += __chunk_size; + } + std::__insertion_sort(__first, __last); + } + template + void + __chunk_insertion_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Distance __chunk_size, _Compare __comp) + { + while (__last - __first >= __chunk_size) + { + std::__insertion_sort(__first, __first + __chunk_size, __comp); + __first += __chunk_size; + } + std::__insertion_sort(__first, __last, __comp); + } + enum { _S_chunk_size = 7 }; + template + void + __merge_sort_with_buffer(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Pointer __buffer) + { + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _Distance; + const _Distance __len = __last - __first; + const _Pointer __buffer_last = __buffer + __len; + _Distance __step_size = _S_chunk_size; + std::__chunk_insertion_sort(__first, __last, __step_size); + while (__step_size < __len) + { + std::__merge_sort_loop(__first, __last, __buffer, __step_size); + __step_size *= 2; + std::__merge_sort_loop(__buffer, __buffer_last, __first, __step_size); + __step_size *= 2; + } + } + template + void + __merge_sort_with_buffer(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Pointer __buffer, _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _Distance; + const _Distance __len = __last - __first; + const _Pointer __buffer_last = __buffer + __len; + _Distance __step_size = _S_chunk_size; + std::__chunk_insertion_sort(__first, __last, __step_size, __comp); + while (__step_size < __len) + { + std::__merge_sort_loop(__first, __last, __buffer, + __step_size, __comp); + __step_size *= 2; + std::__merge_sort_loop(__buffer, __buffer_last, __first, + __step_size, __comp); + __step_size *= 2; + } + } + template + void + __stable_sort_adaptive(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Pointer __buffer, _Distance __buffer_size) + { + const _Distance __len = (__last - __first + 1) / 2; + const _RandomAccessIterator __middle = __first + __len; + if (__len > __buffer_size) + { + std::__stable_sort_adaptive(__first, __middle, + __buffer, __buffer_size); + std::__stable_sort_adaptive(__middle, __last, + __buffer, __buffer_size); + } + else + { + std::__merge_sort_with_buffer(__first, __middle, __buffer); + std::__merge_sort_with_buffer(__middle, __last, __buffer); + } + std::__merge_adaptive(__first, __middle, __last, + _Distance(__middle - __first), + _Distance(__last - __middle), + __buffer, __buffer_size); + } + template + void + __stable_sort_adaptive(_RandomAccessIterator __first, + _RandomAccessIterator __last, + _Pointer __buffer, _Distance __buffer_size, + _Compare __comp) + { + const _Distance __len = (__last - __first + 1) / 2; + const _RandomAccessIterator __middle = __first + __len; + if (__len > __buffer_size) + { + std::__stable_sort_adaptive(__first, __middle, __buffer, + __buffer_size, __comp); + std::__stable_sort_adaptive(__middle, __last, __buffer, + __buffer_size, __comp); + } + else + { + std::__merge_sort_with_buffer(__first, __middle, __buffer, __comp); + std::__merge_sort_with_buffer(__middle, __last, __buffer, __comp); + } + std::__merge_adaptive(__first, __middle, __last, + _Distance(__middle - __first), + _Distance(__last - __middle), + __buffer, __buffer_size, + __comp); + } + template + void + __inplace_stable_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last) + { + if (__last - __first < 15) + { + std::__insertion_sort(__first, __last); + return; + } + _RandomAccessIterator __middle = __first + (__last - __first) / 2; + std::__inplace_stable_sort(__first, __middle); + std::__inplace_stable_sort(__middle, __last); + std::__merge_without_buffer(__first, __middle, __last, + __middle - __first, + __last - __middle); + } + template + void + __inplace_stable_sort(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) + { + if (__last - __first < 15) + { + std::__insertion_sort(__first, __last, __comp); + return; + } + _RandomAccessIterator __middle = __first + (__last - __first) / 2; + std::__inplace_stable_sort(__first, __middle, __comp); + std::__inplace_stable_sort(__middle, __last, __comp); + std::__merge_without_buffer(__first, __middle, __last, + __middle - __first, + __last - __middle, + __comp); + } + template + bool + includes(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + ; + ; + while (__first1 != __last1 && __first2 != __last2) + if (*__first2 < *__first1) + return false; + else if(*__first1 < *__first2) + ++__first1; + else + ++__first1, ++__first2; + return __first2 == __last2; + } + template + bool + includes(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + ; + ; + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first2, *__first1)) + return false; + else if(__comp(*__first1, *__first2)) + ++__first1; + else + ++__first1, ++__first2; + return __first2 == __last2; + } + template + bool + next_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last) + { + ; + if (__first == __last) + return false; + _BidirectionalIterator __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + for(;;) + { + _BidirectionalIterator __ii = __i; + --__i; + if (*__i < *__ii) + { + _BidirectionalIterator __j = __last; + while (!(*__i < *--__j)) + {} + std::iter_swap(__i, __j); + std::reverse(__ii, __last); + return true; + } + if (__i == __first) + { + std::reverse(__first, __last); + return false; + } + } + } + template + bool + next_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last, _Compare __comp) + { + ; + if (__first == __last) + return false; + _BidirectionalIterator __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + for(;;) + { + _BidirectionalIterator __ii = __i; + --__i; + if (__comp(*__i, *__ii)) + { + _BidirectionalIterator __j = __last; + while (!bool(__comp(*__i, *--__j))) + {} + std::iter_swap(__i, __j); + std::reverse(__ii, __last); + return true; + } + if (__i == __first) + { + std::reverse(__first, __last); + return false; + } + } + } + template + bool + prev_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last) + { + ; + if (__first == __last) + return false; + _BidirectionalIterator __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + for(;;) + { + _BidirectionalIterator __ii = __i; + --__i; + if (*__ii < *__i) + { + _BidirectionalIterator __j = __last; + while (!(*--__j < *__i)) + {} + std::iter_swap(__i, __j); + std::reverse(__ii, __last); + return true; + } + if (__i == __first) + { + std::reverse(__first, __last); + return false; + } + } + } + template + bool + prev_permutation(_BidirectionalIterator __first, + _BidirectionalIterator __last, _Compare __comp) + { + ; + if (__first == __last) + return false; + _BidirectionalIterator __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + for(;;) + { + _BidirectionalIterator __ii = __i; + --__i; + if (__comp(*__ii, *__i)) + { + _BidirectionalIterator __j = __last; + while (!bool(__comp(*--__j, *__i))) + {} + std::iter_swap(__i, __j); + std::reverse(__ii, __last); + return true; + } + if (__i == __first) + { + std::reverse(__first, __last); + return false; + } + } + } + template + _OutputIterator + replace_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + const _Tp& __old_value, const _Tp& __new_value) + { + ; + for (; __first != __last; ++__first, ++__result) + if (*__first == __old_value) + *__result = __new_value; + else + *__result = *__first; + return __result; + } + template + _OutputIterator + replace_copy_if(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + _Predicate __pred, const _Tp& __new_value) + { + ; + for (; __first != __last; ++__first, ++__result) + if (__pred(*__first)) + *__result = __new_value; + else + *__result = *__first; + return __result; + } + template + _Function + for_each(_InputIterator __first, _InputIterator __last, _Function __f) + { + ; + for (; __first != __last; ++__first) + __f(*__first); + return (__f); + } + template + inline _InputIterator + find(_InputIterator __first, _InputIterator __last, + const _Tp& __val) + { + ; + return std::__find(__first, __last, __val, + std::__iterator_category(__first)); + } + template + inline _InputIterator + find_if(_InputIterator __first, _InputIterator __last, + _Predicate __pred) + { + ; + return std::__find_if(__first, __last, __pred, + std::__iterator_category(__first)); + } + template + _InputIterator + find_first_of(_InputIterator __first1, _InputIterator __last1, + _ForwardIterator __first2, _ForwardIterator __last2) + { + ; + ; + for (; __first1 != __last1; ++__first1) + for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) + if (*__first1 == *__iter) + return __first1; + return __last1; + } + template + _InputIterator + find_first_of(_InputIterator __first1, _InputIterator __last1, + _ForwardIterator __first2, _ForwardIterator __last2, + _BinaryPredicate __comp) + { + ; + ; + for (; __first1 != __last1; ++__first1) + for (_ForwardIterator __iter = __first2; __iter != __last2; ++__iter) + if (__comp(*__first1, *__iter)) + return __first1; + return __last1; + } + template + _ForwardIterator + adjacent_find(_ForwardIterator __first, _ForwardIterator __last) + { + ; + if (__first == __last) + return __last; + _ForwardIterator __next = __first; + while(++__next != __last) + { + if (*__first == *__next) + return __first; + __first = __next; + } + return __last; + } + template + _ForwardIterator + adjacent_find(_ForwardIterator __first, _ForwardIterator __last, + _BinaryPredicate __binary_pred) + { + ; + if (__first == __last) + return __last; + _ForwardIterator __next = __first; + while(++__next != __last) + { + if (__binary_pred(*__first, *__next)) + return __first; + __first = __next; + } + return __last; + } + template + typename iterator_traits<_InputIterator>::difference_type + count(_InputIterator __first, _InputIterator __last, const _Tp& __value) + { + ; + typename iterator_traits<_InputIterator>::difference_type __n = 0; + for (; __first != __last; ++__first) + if (*__first == __value) + ++__n; + return __n; + } + template + typename iterator_traits<_InputIterator>::difference_type + count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) + { + ; + typename iterator_traits<_InputIterator>::difference_type __n = 0; + for (; __first != __last; ++__first) + if (__pred(*__first)) + ++__n; + return __n; + } + template + _ForwardIterator1 + search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2) + { + ; + ; + if (__first1 == __last1 || __first2 == __last2) + return __first1; + _ForwardIterator2 __p1(__first2); + if (++__p1 == __last2) + return std::find(__first1, __last1, *__first2); + _ForwardIterator2 __p; + _ForwardIterator1 __current = __first1; + for (;;) + { + __first1 = std::find(__first1, __last1, *__first2); + if (__first1 == __last1) + return __last1; + __p = __p1; + __current = __first1; + if (++__current == __last1) + return __last1; + while (*__current == *__p) + { + if (++__p == __last2) + return __first1; + if (++__current == __last1) + return __last1; + } + ++__first1; + } + return __first1; + } + template + _ForwardIterator1 + search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, + _ForwardIterator2 __first2, _ForwardIterator2 __last2, + _BinaryPredicate __predicate) + { + ; + ; + if (__first1 == __last1 || __first2 == __last2) + return __first1; + _ForwardIterator2 __p1(__first2); + if (++__p1 == __last2) + { + while (__first1 != __last1 + && !bool(__predicate(*__first1, *__first2))) + ++__first1; + return __first1; + } + _ForwardIterator2 __p; + _ForwardIterator1 __current = __first1; + for (;;) + { + while (__first1 != __last1 + && !bool(__predicate(*__first1, *__first2))) + ++__first1; + if (__first1 == __last1) + return __last1; + __p = __p1; + __current = __first1; + if (++__current == __last1) + return __last1; + while (__predicate(*__current, *__p)) + { + if (++__p == __last2) + return __first1; + if (++__current == __last1) + return __last1; + } + ++__first1; + } + return __first1; + } + template + _ForwardIterator + search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, const _Tp& __val) + { + ; + if (__count <= 0) + return __first; + if (__count == 1) + return std::find(__first, __last, __val); + return std::__search_n(__first, __last, __count, __val, + std::__iterator_category(__first)); + } + template + _ForwardIterator + search_n(_ForwardIterator __first, _ForwardIterator __last, + _Integer __count, const _Tp& __val, + _BinaryPredicate __binary_pred) + { + ; + if (__count <= 0) + return __first; + if (__count == 1) + { + while (__first != __last && !bool(__binary_pred(*__first, __val))) + ++__first; + return __first; + } + return std::__search_n(__first, __last, __count, __val, __binary_pred, + std::__iterator_category(__first)); + } + template + _OutputIterator + transform(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _UnaryOperation __unary_op) + { + ; + for (; __first != __last; ++__first, ++__result) + *__result = __unary_op(*__first); + return __result; + } + template + _OutputIterator + transform(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _OutputIterator __result, + _BinaryOperation __binary_op) + { + ; + for (; __first1 != __last1; ++__first1, ++__first2, ++__result) + *__result = __binary_op(*__first1, *__first2); + return __result; + } + template + void + replace(_ForwardIterator __first, _ForwardIterator __last, + const _Tp& __old_value, const _Tp& __new_value) + { + ; + for (; __first != __last; ++__first) + if (*__first == __old_value) + *__first = __new_value; + } + template + void + replace_if(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred, const _Tp& __new_value) + { + ; + for (; __first != __last; ++__first) + if (__pred(*__first)) + *__first = __new_value; + } + template + void + generate(_ForwardIterator __first, _ForwardIterator __last, + _Generator __gen) + { + ; + for (; __first != __last; ++__first) + *__first = __gen(); + } + template + _OutputIterator + generate_n(_OutputIterator __first, _Size __n, _Generator __gen) + { + for (__decltype(__n + 0) __niter = __n; + __niter > 0; --__niter, ++__first) + *__first = __gen(); + return __first; + } + template + inline _OutputIterator + unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result) + { + ; + if (__first == __last) + return __result; + return std::__unique_copy(__first, __last, __result, + std::__iterator_category(__first), + std::__iterator_category(__result)); + } + template + inline _OutputIterator + unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + _BinaryPredicate __binary_pred) + { + ; + if (__first == __last) + return __result; + return std::__unique_copy(__first, __last, __result, __binary_pred, + std::__iterator_category(__first), + std::__iterator_category(__result)); + } + template + inline void + random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + ; + if (__first != __last) + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + std::iter_swap(__i, __first + (std::rand() % ((__i - __first) + 1))); + } + template + void + random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last, + _RandomNumberGenerator& __rand) + { + ; + if (__first == __last) + return; + for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i) + std::iter_swap(__i, __first + __rand((__i - __first) + 1)); + } + template + inline _ForwardIterator + partition(_ForwardIterator __first, _ForwardIterator __last, + _Predicate __pred) + { + ; + return std::__partition(__first, __last, __pred, + std::__iterator_category(__first)); + } + template + inline void + partial_sort(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + ; + ; + std::__heap_select(__first, __middle, __last); + std::sort_heap(__first, __middle); + } + template + inline void + partial_sort(_RandomAccessIterator __first, + _RandomAccessIterator __middle, + _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + ; + ; + std::__heap_select(__first, __middle, __last, __comp); + std::sort_heap(__first, __middle, __comp); + } + template + inline void + nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + ; + ; + if (__first == __last || __nth == __last) + return; + std::__introselect(__first, __nth, __last, + std::__lg(__last - __first) * 2); + } + template + inline void + nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, + _RandomAccessIterator __last, _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + ; + ; + if (__first == __last || __nth == __last) + return; + std::__introselect(__first, __nth, __last, + std::__lg(__last - __first) * 2, __comp); + } + template + inline void + sort(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + ; + if (__first != __last) + { + std::__introsort_loop(__first, __last, + std::__lg(__last - __first) * 2); + std::__final_insertion_sort(__first, __last); + } + } + template + inline void + sort(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + ; + if (__first != __last) + { + std::__introsort_loop(__first, __last, + std::__lg(__last - __first) * 2, __comp); + std::__final_insertion_sort(__first, __last, __comp); + } + } + template + _OutputIterator + merge(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + ; + ; + while (__first1 != __last1 && __first2 != __last2) + { + if (*__first2 < *__first1) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + } + ++__result; + } + return std::copy(__first2, __last2, std::copy(__first1, __last1, + __result)); + } + template + _OutputIterator + merge(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + ; + ; + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(*__first2, *__first1)) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + } + ++__result; + } + return std::copy(__first2, __last2, std::copy(__first1, __last1, + __result)); + } + template + inline void + stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + ; + _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first, + __last); + if (__buf.begin() == 0) + std::__inplace_stable_sort(__first, __last); + else + std::__stable_sort_adaptive(__first, __last, __buf.begin(), + _DistanceType(__buf.size())); + } + template + inline void + stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) + { + typedef typename iterator_traits<_RandomAccessIterator>::value_type + _ValueType; + typedef typename iterator_traits<_RandomAccessIterator>::difference_type + _DistanceType; + ; + _Temporary_buffer<_RandomAccessIterator, _ValueType> __buf(__first, + __last); + if (__buf.begin() == 0) + std::__inplace_stable_sort(__first, __last, __comp); + else + std::__stable_sort_adaptive(__first, __last, __buf.begin(), + _DistanceType(__buf.size()), __comp); + } + template + _OutputIterator + set_union(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + ; + ; + while (__first1 != __last1 && __first2 != __last2) + { + if (*__first1 < *__first2) + { + *__result = *__first1; + ++__first1; + } + else if (*__first2 < *__first1) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + ++__first2; + } + ++__result; + } + return std::copy(__first2, __last2, std::copy(__first1, __last1, + __result)); + } + template + _OutputIterator + set_union(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + ; + ; + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(*__first1, *__first2)) + { + *__result = *__first1; + ++__first1; + } + else if (__comp(*__first2, *__first1)) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + ++__first2; + } + ++__result; + } + return std::copy(__first2, __last2, std::copy(__first1, __last1, + __result)); + } + template + _OutputIterator + set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + ; + ; + while (__first1 != __last1 && __first2 != __last2) + if (*__first1 < *__first2) + ++__first1; + else if (*__first2 < *__first1) + ++__first2; + else + { + *__result = *__first1; + ++__first1; + ++__first2; + ++__result; + } + return __result; + } + template + _OutputIterator + set_intersection(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + ; + ; + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first1, *__first2)) + ++__first1; + else if (__comp(*__first2, *__first1)) + ++__first2; + else + { + *__result = *__first1; + ++__first1; + ++__first2; + ++__result; + } + return __result; + } + template + _OutputIterator + set_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + ; + ; + while (__first1 != __last1 && __first2 != __last2) + if (*__first1 < *__first2) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (*__first2 < *__first1) + ++__first2; + else + { + ++__first1; + ++__first2; + } + return std::copy(__first1, __last1, __result); + } + template + _OutputIterator + set_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + ; + ; + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first1, *__first2)) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (__comp(*__first2, *__first1)) + ++__first2; + else + { + ++__first1; + ++__first2; + } + return std::copy(__first1, __last1, __result); + } + template + _OutputIterator + set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + ; + ; + while (__first1 != __last1 && __first2 != __last2) + if (*__first1 < *__first2) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (*__first2 < *__first1) + { + *__result = *__first2; + ++__first2; + ++__result; + } + else + { + ++__first1; + ++__first2; + } + return std::copy(__first2, __last2, std::copy(__first1, + __last1, __result)); + } + template + _OutputIterator + set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _InputIterator2 __last2, + _OutputIterator __result, + _Compare __comp) + { + typedef typename iterator_traits<_InputIterator1>::value_type + _ValueType1; + typedef typename iterator_traits<_InputIterator2>::value_type + _ValueType2; + ; + ; + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first1, *__first2)) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (__comp(*__first2, *__first1)) + { + *__result = *__first2; + ++__first2; + ++__result; + } + else + { + ++__first1; + ++__first2; + } + return std::copy(__first2, __last2, + std::copy(__first1, __last1, __result)); + } + template + _ForwardIterator + min_element(_ForwardIterator __first, _ForwardIterator __last) + { + ; + if (__first == __last) + return __first; + _ForwardIterator __result = __first; + while (++__first != __last) + if (*__first < *__result) + __result = __first; + return __result; + } + template + _ForwardIterator + min_element(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + ; + if (__first == __last) + return __first; + _ForwardIterator __result = __first; + while (++__first != __last) + if (__comp(*__first, *__result)) + __result = __first; + return __result; + } + template + _ForwardIterator + max_element(_ForwardIterator __first, _ForwardIterator __last) + { + ; + if (__first == __last) + return __first; + _ForwardIterator __result = __first; + while (++__first != __last) + if (*__result < *__first) + __result = __first; + return __result; + } + template + _ForwardIterator + max_element(_ForwardIterator __first, _ForwardIterator __last, + _Compare __comp) + { + ; + if (__first == __last) return __first; + _ForwardIterator __result = __first; + while (++__first != __last) + if (__comp(*__result, *__first)) + __result = __first; + return __result; + } +} +typedef signed char qint8; +typedef unsigned char quint8; +typedef short qint16; +typedef unsigned short quint16; +typedef int qint32; +typedef unsigned int quint32; +typedef long long qint64; +typedef unsigned long long quint64; +typedef qint64 qlonglong; +typedef quint64 qulonglong; +template struct QIntegerForSize; +template <> struct QIntegerForSize<1> { typedef quint8 Unsigned; typedef qint8 Signed; }; +template <> struct QIntegerForSize<2> { typedef quint16 Unsigned; typedef qint16 Signed; }; +template <> struct QIntegerForSize<4> { typedef quint32 Unsigned; typedef qint32 Signed; }; +template <> struct QIntegerForSize<8> { typedef quint64 Unsigned; typedef qint64 Signed; }; +template struct QIntegerForSizeof: QIntegerForSize { }; +typedef QIntegerForSizeof::Unsigned quintptr; +typedef QIntegerForSizeof::Signed qptrdiff; +typedef unsigned char uchar; +typedef unsigned short ushort; +typedef unsigned int uint; +typedef unsigned long ulong; +typedef int QNoImplicitBoolCast; +typedef double qreal; +template + inline T qAbs(const T &t) { return t >= 0 ? t : -t; } + inline int qRound(qreal d) +{ return d >= qreal(0.0) ? int(d + qreal(0.5)) : int(d - int(d-1) + qreal(0.5)) + int(d-1); } + inline qint64 qRound64(qreal d) +{ return d >= qreal(0.0) ? qint64(d + qreal(0.5)) : qint64(d - qreal(qint64(d-1)) + qreal(0.5)) + qint64(d-1); } +template + inline const T &qMin(const T &a, const T &b) { return (a < b) ? a : b; } +template + inline const T &qMax(const T &a, const T &b) { return (a < b) ? b : a; } +template + inline const T &qBound(const T &min, const T &val, const T &max) +{ return qMax(min, qMin(max, val)); } +class QDataStream; +inline void qt_noop(void) {} +class QString; +class QSysInfo { +public: + enum Sizes { + WordSize = (sizeof(void *)<<3) + }; + enum Endian { + BigEndian, + LittleEndian + , ByteOrder = BigEndian + }; +}; + const char *qVersion(); + bool qSharedBuild(); + void qDebug(const char *, ...) + __attribute__ ((format (printf, 1, 2))) +; + void qWarning(const char *, ...) + __attribute__ ((format (printf, 1, 2))) +; +class QString; + QString qt_error_string(int errorCode = -1); + void qCritical(const char *, ...) + __attribute__ ((format (printf, 1, 2))) +; + void qFatal(const char *, ...) + __attribute__ ((format (printf, 1, 2))) +; + void qErrnoWarning(int code, const char *msg, ...); + void qErrnoWarning(const char *msg, ...); +class QDebug; +class QNoDebug; + inline QDebug qDebug(); + inline QDebug qWarning(); + inline QDebug qCritical(); + void qt_assert(const char *assertion, const char *file, int line); + void qt_assert_x(const char *where, const char *what, const char *file, int line); + void qt_check_pointer(const char *, int); + void qBadAlloc(); +template +inline T *q_check_ptr(T *p) { do { if (!(p)) qBadAlloc(); } while (0); return p; } +enum QtMsgType { QtDebugMsg, QtWarningMsg, QtCriticalMsg, QtFatalMsg, QtSystemMsg = QtCriticalMsg }; + void qt_message_output(QtMsgType, const char *buf); +typedef void (*QtMsgHandler)(QtMsgType, const char *); + QtMsgHandler qInstallMsgHandler(QtMsgHandler); +template class QBasicAtomicPointer; +template +class QGlobalStatic +{ +public: + QBasicAtomicPointer pointer; + bool destroyed; +}; +template +class QGlobalStaticDeleter +{ +public: + QGlobalStatic &globalStatic; + QGlobalStaticDeleter(QGlobalStatic &_globalStatic) + : globalStatic(_globalStatic) + { } + inline ~QGlobalStaticDeleter() + { + delete globalStatic.pointer; + globalStatic.pointer = 0; + globalStatic.destroyed = true; + } +}; +class QBool +{ + bool b; +public: + inline explicit QBool(bool B) : b(B) {} + inline operator const void *() const + { return b ? static_cast(this) : static_cast(0); } +}; +inline bool operator==(QBool b1, bool b2) { return !b1 == !b2; } +inline bool operator==(bool b1, QBool b2) { return !b1 == !b2; } +inline bool operator==(QBool b1, QBool b2) { return !b1 == !b2; } +inline bool operator!=(QBool b1, bool b2) { return !b1 != !b2; } +inline bool operator!=(bool b1, QBool b2) { return !b1 != !b2; } +inline bool operator!=(QBool b1, QBool b2) { return !b1 != !b2; } + static inline bool qFuzzyCompare(double p1, double p2) +{ + return (qAbs(p1 - p2) <= 0.000000000001 * qMin(qAbs(p1), qAbs(p2))); +} + static inline bool qFuzzyCompare(float p1, float p2) +{ + return (qAbs(p1 - p2) <= 0.00001f * qMin(qAbs(p1), qAbs(p2))); +} + static inline bool qFuzzyIsNull(double d) +{ + return qAbs(d) <= 0.000000000001; +} + static inline bool qFuzzyIsNull(float f) +{ + return qAbs(f) <= 0.00001f; +} +static inline bool qIsNull(double d) +{ + union U { + double d; + quint64 u; + }; + U val; + val.d = d; + return val.u == quint64(0); +} +static inline bool qIsNull(float f) +{ + union U { + float f; + quint32 u; + }; + U val; + val.f = f; + return val.u == 0u; +} +template inline bool qIsDetached(T &) { return true; } +template +class QTypeInfo +{ +public: + enum { + isPointer = false, + isComplex = true, + isStatic = true, + isLarge = (sizeof(T)>sizeof(void*)), + isDummy = false + }; +}; +template +class QTypeInfo +{ +public: + enum { + isPointer = true, + isComplex = false, + isStatic = false, + isLarge = false, + isDummy = false + }; +}; +enum { + Q_COMPLEX_TYPE = 0, + Q_PRIMITIVE_TYPE = 0x1, + Q_STATIC_TYPE = 0, + Q_MOVABLE_TYPE = 0x2, + Q_DUMMY_TYPE = 0x4 +}; +template +inline void qSwap(T &value1, T &value2) +{ + using std::swap; + swap(value1, value2); +} +template<> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(bool)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "bool"; } }; +template<> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(char)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "char"; } }; +template<> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(signed char)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "signed char"; } }; +template<> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(uchar)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "uchar"; } }; +template<> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(short)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "short"; } }; +template<> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(ushort)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "ushort"; } }; +template<> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(int)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "int"; } }; +template<> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(uint)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "uint"; } }; +template<> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(long)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "long"; } }; +template<> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(ulong)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "ulong"; } }; +template<> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(qint64)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "qint64"; } }; +template<> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(quint64)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "quint64"; } }; +template<> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(float)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "float"; } }; +template<> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(double)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "double"; } }; +template<> class QTypeInfo { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(long double)>sizeof(void*)), isPointer = false, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "long double"; } }; + void *qMalloc(size_t size); + void qFree(void *ptr); + void *qRealloc(void *ptr, size_t size); + void *qMallocAligned(size_t size, size_t alignment); + void *qReallocAligned(void *ptr, size_t size, size_t oldsize, size_t alignment); + void qFreeAligned(void *ptr); + void *qMemCopy(void *dest, const void *src, size_t n); + void *qMemSet(void *dest, int c, size_t n); +class QFlag +{ + int i; +public: + inline QFlag(int i); + inline operator int() const { return i; } +}; +inline QFlag::QFlag(int ai) : i(ai) {} +class QIncompatibleFlag +{ + int i; +public: + inline explicit QIncompatibleFlag(int i); + inline operator int() const { return i; } +}; +inline QIncompatibleFlag::QIncompatibleFlag(int ai) : i(ai) {} +template +class QFlags +{ + typedef void **Zero; + int i; +public: + typedef Enum enum_type; + inline QFlags(const QFlags &f) : i(f.i) {} + inline QFlags(Enum f) : i(f) {} + inline QFlags(Zero = 0) : i(0) {} + inline QFlags(QFlag f) : i(f) {} + inline QFlags &operator=(const QFlags &f) { i = f.i; return *this; } + inline QFlags &operator&=(int mask) { i &= mask; return *this; } + inline QFlags &operator&=(uint mask) { i &= mask; return *this; } + inline QFlags &operator|=(QFlags f) { i |= f.i; return *this; } + inline QFlags &operator|=(Enum f) { i |= f; return *this; } + inline QFlags &operator^=(QFlags f) { i ^= f.i; return *this; } + inline QFlags &operator^=(Enum f) { i ^= f; return *this; } + inline operator int() const { return i; } + inline QFlags operator|(QFlags f) const { return QFlags(Enum(i | f.i)); } + inline QFlags operator|(Enum f) const { return QFlags(Enum(i | f)); } + inline QFlags operator^(QFlags f) const { return QFlags(Enum(i ^ f.i)); } + inline QFlags operator^(Enum f) const { return QFlags(Enum(i ^ f)); } + inline QFlags operator&(int mask) const { return QFlags(Enum(i & mask)); } + inline QFlags operator&(uint mask) const { return QFlags(Enum(i & mask)); } + inline QFlags operator&(Enum f) const { return QFlags(Enum(i & f)); } + inline QFlags operator~() const { return QFlags(Enum(~i)); } + inline bool operator!() const { return !i; } + inline bool testFlag(Enum f) const { return (i & f) == f && (f != 0 || i == int(f) ); } +}; +template +class QForeachContainer { +public: + inline QForeachContainer(const T& t) : c(t), brk(0), i(c.begin()), e(c.end()) { } + const T c; + int brk; + typename T::const_iterator i, e; +}; +template static inline T *qGetPtrHelper(T *ptr) { return ptr; } +template static inline typename Wrapper::pointer qGetPtrHelper(const Wrapper &p) { return p.data(); } + QString qtTrId(const char *id, int n = -1); +class QByteArray; + QByteArray qgetenv(const char *varName); + bool qputenv(const char *varName, const QByteArray& value); +inline int qIntCast(double f) { return int(f); } +inline int qIntCast(float f) { return int(f); } + void qsrand(uint seed); + int qrand(); +enum QtValidLicenseForCoreModule { LicensedCore = true }; +enum QtValidLicenseForGuiModule { LicensedGui = true }; +enum QtValidLicenseForNetworkModule { LicensedNetwork = true }; +enum QtValidLicenseForOpenGLModule { LicensedOpenGL = true }; +enum QtValidLicenseForOpenVGModule { LicensedOpenVG = true }; +enum QtValidLicenseForSqlModule { LicensedSql = true }; +enum QtValidLicenseForMultimediaModule { LicensedMultimedia = true }; +enum QtValidLicenseForXmlModule { LicensedXml = true }; +enum QtValidLicenseForXmlPatternsModule { LicensedXmlPatterns = true }; +enum QtValidLicenseForHelpModule { LicensedHelp = true }; +enum QtValidLicenseForScriptModule { LicensedScript = true }; +enum QtValidLicenseForScriptToolsModule { LicensedScriptTools = true }; +enum QtValidLicenseForQt3SupportLightModule { LicensedQt3SupportLight = true }; +enum QtValidLicenseForQt3SupportModule { LicensedQt3Support = true }; +enum QtValidLicenseForSvgModule { LicensedSvg = true }; +enum QtValidLicenseForDeclarativeModule { LicensedDeclarative = true }; +enum QtValidLicenseForActiveQtModule { LicensedActiveQt = true }; +enum QtValidLicenseForTestModule { LicensedTest = true }; +enum QtValidLicenseForDBusModule { LicensedDBus = true }; +namespace QtPrivate { +template struct QEnableIf; +template struct QEnableIf { typedef T Type; }; +} +typedef QtValidLicenseForCoreModule QtCoreModule; +namespace QAlgorithmsPrivate { +template + void qSortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan); +template +inline void qSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &dummy); +template + void qStableSortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan); +template +inline void qStableSortHelper(RandomAccessIterator, RandomAccessIterator, const T &); +template + RandomAccessIterator qLowerBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan); +template + RandomAccessIterator qUpperBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan); +template + RandomAccessIterator qBinaryFindHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan); +} +template +inline OutputIterator qCopy(InputIterator begin, InputIterator end, OutputIterator dest) +{ + while (begin != end) + *dest++ = *begin++; + return dest; +} +template +inline BiIterator2 qCopyBackward(BiIterator1 begin, BiIterator1 end, BiIterator2 dest) +{ + while (begin != end) + *--dest = *--end; + return dest; +} +template +inline bool qEqual(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2) +{ + for (; first1 != last1; ++first1, ++first2) + if (!(*first1 == *first2)) + return false; + return true; +} +template +inline void qFill(ForwardIterator first, ForwardIterator last, const T &val) +{ + for (; first != last; ++first) + *first = val; +} +template +inline void qFill(Container &container, const T &val) +{ + qFill(container.begin(), container.end(), val); +} +template +inline InputIterator qFind(InputIterator first, InputIterator last, const T &val) +{ + while (first != last && !(*first == val)) + ++first; + return first; +} +template +inline typename Container::const_iterator qFind(const Container &container, const T &val) +{ + return qFind(container.constBegin(), container.constEnd(), val); +} +template +inline void qCount(InputIterator first, InputIterator last, const T &value, Size &n) +{ + for (; first != last; ++first) + if (*first == value) + ++n; +} +template +inline void qCount(const Container &container, const T &value, Size &n) +{ + qCount(container.constBegin(), container.constEnd(), value, n); +} +template +class qLess +{ +public: + inline bool operator()(const T &t1, const T &t2) const + { + return (t1 < t2); + } +}; +template +class qGreater +{ +public: + inline bool operator()(const T &t1, const T &t2) const + { + return (t2 < t1); + } +}; +template +inline void qSort(RandomAccessIterator start, RandomAccessIterator end) +{ + if (start != end) + QAlgorithmsPrivate::qSortHelper(start, end, *start); +} +template +inline void qSort(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan) +{ + if (start != end) + QAlgorithmsPrivate::qSortHelper(start, end, *start, lessThan); +} +template +inline void qSort(Container &c) +{ + if (!c.empty()) + QAlgorithmsPrivate::qSortHelper(c.begin(), c.end(), *c.begin()); +} +template +inline void qStableSort(RandomAccessIterator start, RandomAccessIterator end) +{ + if (start != end) + QAlgorithmsPrivate::qStableSortHelper(start, end, *start); +} +template +inline void qStableSort(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan) +{ + if (start != end) + QAlgorithmsPrivate::qStableSortHelper(start, end, *start, lessThan); +} +template +inline void qStableSort(Container &c) +{ + if (!c.empty()) + QAlgorithmsPrivate::qStableSortHelper(c.begin(), c.end(), *c.begin()); +} +template + RandomAccessIterator qLowerBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value) +{ + RandomAccessIterator middle; + int n = end - begin; + int half; + while (n > 0) { + half = n >> 1; + middle = begin + half; + if (*middle < value) { + begin = middle + 1; + n -= half + 1; + } else { + n = half; + } + } + return begin; +} +template + RandomAccessIterator qLowerBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) +{ + return QAlgorithmsPrivate::qLowerBoundHelper(begin, end, value, lessThan); +} +template + typename Container::const_iterator qLowerBound(const Container &container, const T &value) +{ + return QAlgorithmsPrivate::qLowerBoundHelper(container.constBegin(), container.constEnd(), value, qLess()); +} +template + RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value) +{ + RandomAccessIterator middle; + int n = end - begin; + int half; + while (n > 0) { + half = n >> 1; + middle = begin + half; + if (value < *middle) { + n = half; + } else { + begin = middle + 1; + n -= half + 1; + } + } + return begin; +} +template + RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) +{ + return QAlgorithmsPrivate::qUpperBoundHelper(begin, end, value, lessThan); +} +template + typename Container::const_iterator qUpperBound(const Container &container, const T &value) +{ + return QAlgorithmsPrivate::qUpperBoundHelper(container.constBegin(), container.constEnd(), value, qLess()); +} +template + RandomAccessIterator qBinaryFind(RandomAccessIterator begin, RandomAccessIterator end, const T &value) +{ + RandomAccessIterator it = qLowerBound(begin, end, value); + if (it == end || value < *it) + return end; + return it; +} +template + RandomAccessIterator qBinaryFind(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) +{ + return QAlgorithmsPrivate::qBinaryFindHelper(begin, end, value, lessThan); +} +template + typename Container::const_iterator qBinaryFind(const Container &container, const T &value) +{ + return QAlgorithmsPrivate::qBinaryFindHelper(container.constBegin(), container.constEnd(), value, qLess()); +} +template + void qDeleteAll(ForwardIterator begin, ForwardIterator end) +{ + while (begin != end) { + delete *begin; + ++begin; + } +} +template +inline void qDeleteAll(const Container &c) +{ + qDeleteAll(c.begin(), c.end()); +} +namespace QAlgorithmsPrivate { +template + void qSortHelper(RandomAccessIterator start, RandomAccessIterator end, const T &t, LessThan lessThan) +{ +top: + int span = int(end - start); + if (span < 2) + return; + --end; + RandomAccessIterator low = start, high = end - 1; + RandomAccessIterator pivot = start + span / 2; + if (lessThan(*end, *start)) + qSwap(*end, *start); + if (span == 2) + return; + if (lessThan(*pivot, *start)) + qSwap(*pivot, *start); + if (lessThan(*end, *pivot)) + qSwap(*end, *pivot); + if (span == 3) + return; + qSwap(*pivot, *end); + while (low < high) { + while (low < high && lessThan(*low, *end)) + ++low; + while (high > low && lessThan(*end, *high)) + --high; + if (low < high) { + qSwap(*low, *high); + ++low; + --high; + } else { + break; + } + } + if (lessThan(*low, *end)) + ++low; + qSwap(*end, *low); + qSortHelper(start, low, t, lessThan); + start = low + 1; + ++end; + goto top; +} +template +inline void qSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &dummy) +{ + qSortHelper(begin, end, dummy, qLess()); +} +template + void qReverse(RandomAccessIterator begin, RandomAccessIterator end) +{ + --end; + while (begin < end) + qSwap(*begin++, *end--); +} +template + void qRotate(RandomAccessIterator begin, RandomAccessIterator middle, RandomAccessIterator end) +{ + qReverse(begin, middle); + qReverse(middle, end); + qReverse(begin, end); +} +template + void qMerge(RandomAccessIterator begin, RandomAccessIterator pivot, RandomAccessIterator end, T &t, LessThan lessThan) +{ + const int len1 = pivot - begin; + const int len2 = end - pivot; + if (len1 == 0 || len2 == 0) + return; + if (len1 + len2 == 2) { + if (lessThan(*(begin + 1), *(begin))) + qSwap(*begin, *(begin + 1)); + return; + } + RandomAccessIterator firstCut; + RandomAccessIterator secondCut; + int len2Half; + if (len1 > len2) { + const int len1Half = len1 / 2; + firstCut = begin + len1Half; + secondCut = qLowerBound(pivot, end, *firstCut, lessThan); + len2Half = secondCut - pivot; + } else { + len2Half = len2 / 2; + secondCut = pivot + len2Half; + firstCut = qUpperBound(begin, pivot, *secondCut, lessThan); + } + qRotate(firstCut, pivot, secondCut); + const RandomAccessIterator newPivot = firstCut + len2Half; + qMerge(begin, firstCut, newPivot, t, lessThan); + qMerge(newPivot, secondCut, end, t, lessThan); +} +template + void qStableSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &t, LessThan lessThan) +{ + const int span = end - begin; + if (span < 2) + return; + const RandomAccessIterator middle = begin + span / 2; + qStableSortHelper(begin, middle, t, lessThan); + qStableSortHelper(middle, end, t, lessThan); + qMerge(begin, middle, end, t, lessThan); +} +template +inline void qStableSortHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &dummy) +{ + qStableSortHelper(begin, end, dummy, qLess()); +} +template + RandomAccessIterator qLowerBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) +{ + RandomAccessIterator middle; + int n = int(end - begin); + int half; + while (n > 0) { + half = n >> 1; + middle = begin + half; + if (lessThan(*middle, value)) { + begin = middle + 1; + n -= half + 1; + } else { + n = half; + } + } + return begin; +} +template + RandomAccessIterator qUpperBoundHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) +{ + RandomAccessIterator middle; + int n = end - begin; + int half; + while (n > 0) { + half = n >> 1; + middle = begin + half; + if (lessThan(value, *middle)) { + n = half; + } else { + begin = middle + 1; + n -= half + 1; + } + } + return begin; +} +template + RandomAccessIterator qBinaryFindHelper(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) +{ + RandomAccessIterator it = qLowerBoundHelper(begin, end, value, lessThan); + if (it == end || lessThan(value, *it)) + return end; + return it; +} +} +typedef QtValidLicenseForCoreModule QtCoreModule; +template +struct QScopedPointerDeleter +{ + static inline void cleanup(T *pointer) + { + typedef char IsIncompleteType[ sizeof(T) ? 1 : -1 ]; + (void) sizeof(IsIncompleteType); + delete pointer; + } +}; +template +struct QScopedPointerArrayDeleter +{ + static inline void cleanup(T *pointer) + { + typedef char IsIncompleteType[ sizeof(T) ? 1 : -1 ]; + (void) sizeof(IsIncompleteType); + delete [] pointer; + } +}; +struct QScopedPointerPodDeleter +{ + static inline void cleanup(void *pointer) { if (pointer) qFree(pointer); } +}; +template > +class QScopedPointer +{ + typedef T *QScopedPointer:: *RestrictedBool; +public: + explicit inline QScopedPointer(T *p = 0) : d(p) + { + } + inline ~QScopedPointer() + { + T *oldD = this->d; + Cleanup::cleanup(oldD); + this->d = 0; + } + inline T &operator*() const + { + qt_noop(); + return *d; + } + inline T *operator->() const + { + qt_noop(); + return d; + } + inline bool operator!() const + { + return !d; + } + inline operator RestrictedBool() const + { + return isNull() ? 0 : &QScopedPointer::d; + } + inline T *data() const + { + return d; + } + inline bool isNull() const + { + return !d; + } + inline void reset(T *other = 0) + { + if (d == other) + return; + T *oldD = d; + d = other; + Cleanup::cleanup(oldD); + } + inline T *take() + { + T *oldD = d; + d = 0; + return oldD; + } + inline void swap(QScopedPointer &other) + { + qSwap(d, other.d); + } + typedef T *pointer; +protected: + T *d; +private: + QScopedPointer(const QScopedPointer &); QScopedPointer &operator=(const QScopedPointer &); +}; +template +inline bool operator==(const QScopedPointer &lhs, const QScopedPointer &rhs) +{ + return lhs.data() == rhs.data(); +} +template +inline bool operator!=(const QScopedPointer &lhs, const QScopedPointer &rhs) +{ + return lhs.data() != rhs.data(); +} +template +inline void qSwap(QScopedPointer &p1, QScopedPointer &p2) +{ p1.swap(p2); } +namespace std { + template + inline void swap(::QScopedPointer &p1, ::QScopedPointer &p2) + { p1.swap(p2); } +} +namespace QtPrivate { + template struct QScopedArrayEnsureSameType; + template struct QScopedArrayEnsureSameType { typedef X* Type; }; + template struct QScopedArrayEnsureSameType { typedef X* Type; }; +} +template > +class QScopedArrayPointer : public QScopedPointer +{ +public: + inline QScopedArrayPointer() : QScopedPointer(0) {} + template + explicit inline QScopedArrayPointer(D *p, typename QtPrivate::QScopedArrayEnsureSameType::Type = 0) + : QScopedPointer(p) + { + } + inline T &operator[](int i) + { + return this->d[i]; + } + inline const T &operator[](int i) const + { + return this->d[i]; + } +private: + explicit inline QScopedArrayPointer(void *) { + } + QScopedArrayPointer(const QScopedArrayPointer &); QScopedArrayPointer &operator=(const QScopedArrayPointer &); +}; +typedef QtValidLicenseForCoreModule QtCoreModule; +namespace +Qt { + enum GlobalColor { + color0, + color1, + black, + white, + darkGray, + gray, + lightGray, + red, + green, + blue, + cyan, + magenta, + yellow, + darkRed, + darkGreen, + darkBlue, + darkCyan, + darkMagenta, + darkYellow, + transparent + }; + enum KeyboardModifier { + NoModifier = 0x00000000, + ShiftModifier = 0x02000000, + ControlModifier = 0x04000000, + AltModifier = 0x08000000, + MetaModifier = 0x10000000, + KeypadModifier = 0x20000000, + GroupSwitchModifier = 0x40000000, + KeyboardModifierMask = 0xfe000000 + }; + typedef QFlags KeyboardModifiers; + enum Modifier { + META = Qt::MetaModifier, + SHIFT = Qt::ShiftModifier, + CTRL = Qt::ControlModifier, + ALT = Qt::AltModifier, + MODIFIER_MASK = KeyboardModifierMask, + UNICODE_ACCEL = 0x00000000 + }; + enum MouseButton { + NoButton = 0x00000000, + LeftButton = 0x00000001, + RightButton = 0x00000002, + MidButton = 0x00000004, + MiddleButton = MidButton, + XButton1 = 0x00000008, + XButton2 = 0x00000010, + MouseButtonMask = 0x000000ff + }; + typedef QFlags MouseButtons; + enum Orientation { + Horizontal = 0x1, + Vertical = 0x2 + }; + typedef QFlags Orientations; + enum FocusPolicy { + NoFocus = 0, + TabFocus = 0x1, + ClickFocus = 0x2, + StrongFocus = TabFocus | ClickFocus | 0x8, + WheelFocus = StrongFocus | 0x4 + }; + enum SortOrder { + AscendingOrder, + DescendingOrder + }; + enum TileRule { + StretchTile, + RepeatTile, + RoundTile + }; + enum AlignmentFlag { + AlignLeft = 0x0001, + AlignLeading = AlignLeft, + AlignRight = 0x0002, + AlignTrailing = AlignRight, + AlignHCenter = 0x0004, + AlignJustify = 0x0008, + AlignAbsolute = 0x0010, + AlignHorizontal_Mask = AlignLeft | AlignRight | AlignHCenter | AlignJustify | AlignAbsolute, + AlignTop = 0x0020, + AlignBottom = 0x0040, + AlignVCenter = 0x0080, + AlignVertical_Mask = AlignTop | AlignBottom | AlignVCenter, + AlignCenter = AlignVCenter | AlignHCenter + }; + typedef QFlags Alignment; + enum TextFlag { + TextSingleLine = 0x0100, + TextDontClip = 0x0200, + TextExpandTabs = 0x0400, + TextShowMnemonic = 0x0800, + TextWordWrap = 0x1000, + TextWrapAnywhere = 0x2000, + TextDontPrint = 0x4000, + TextIncludeTrailingSpaces = 0x08000000, + TextHideMnemonic = 0x8000, + TextJustificationForced = 0x10000, + TextForceLeftToRight = 0x20000, + TextForceRightToLeft = 0x40000, + TextLongestVariant = 0x80000, + TextBypassShaping = 0x100000 + }; + enum TextElideMode { + ElideLeft, + ElideRight, + ElideMiddle, + ElideNone + }; + enum WindowType { + Widget = 0x00000000, + Window = 0x00000001, + Dialog = 0x00000002 | Window, + Sheet = 0x00000004 | Window, + Drawer = 0x00000006 | Window, + Popup = 0x00000008 | Window, + Tool = 0x0000000a | Window, + ToolTip = 0x0000000c | Window, + SplashScreen = 0x0000000e | Window, + Desktop = 0x00000010 | Window, + SubWindow = 0x00000012, + WindowType_Mask = 0x000000ff, + MSWindowsFixedSizeDialogHint = 0x00000100, + MSWindowsOwnDC = 0x00000200, + X11BypassWindowManagerHint = 0x00000400, + FramelessWindowHint = 0x00000800, + WindowTitleHint = 0x00001000, + WindowSystemMenuHint = 0x00002000, + WindowMinimizeButtonHint = 0x00004000, + WindowMaximizeButtonHint = 0x00008000, + WindowMinMaxButtonsHint = WindowMinimizeButtonHint | WindowMaximizeButtonHint, + WindowContextHelpButtonHint = 0x00010000, + WindowShadeButtonHint = 0x00020000, + WindowStaysOnTopHint = 0x00040000, + CustomizeWindowHint = 0x02000000, + WindowStaysOnBottomHint = 0x04000000, + WindowCloseButtonHint = 0x08000000, + MacWindowToolBarButtonHint = 0x10000000, + BypassGraphicsProxyWidget = 0x20000000, + WindowOkButtonHint = 0x00080000, + WindowCancelButtonHint = 0x00100000, + WindowSoftkeysVisibleHint = 0x40000000, + WindowSoftkeysRespondHint = 0x80000000 + }; + typedef QFlags WindowFlags; + enum WindowState { + WindowNoState = 0x00000000, + WindowMinimized = 0x00000001, + WindowMaximized = 0x00000002, + WindowFullScreen = 0x00000004, + WindowActive = 0x00000008 + }; + typedef QFlags WindowStates; + enum WidgetAttribute { + WA_Disabled = 0, + WA_UnderMouse = 1, + WA_MouseTracking = 2, + WA_ContentsPropagated = 3, + WA_OpaquePaintEvent = 4, + WA_NoBackground = WA_OpaquePaintEvent, + WA_StaticContents = 5, + WA_LaidOut = 7, + WA_PaintOnScreen = 8, + WA_NoSystemBackground = 9, + WA_UpdatesDisabled = 10, + WA_Mapped = 11, + WA_MacNoClickThrough = 12, + WA_PaintOutsidePaintEvent = 13, + WA_InputMethodEnabled = 14, + WA_WState_Visible = 15, + WA_WState_Hidden = 16, + WA_ForceDisabled = 32, + WA_KeyCompression = 33, + WA_PendingMoveEvent = 34, + WA_PendingResizeEvent = 35, + WA_SetPalette = 36, + WA_SetFont = 37, + WA_SetCursor = 38, + WA_NoChildEventsFromChildren = 39, + WA_WindowModified = 41, + WA_Resized = 42, + WA_Moved = 43, + WA_PendingUpdate = 44, + WA_InvalidSize = 45, + WA_MacBrushedMetal = 46, + WA_MacMetalStyle = WA_MacBrushedMetal, + WA_CustomWhatsThis = 47, + WA_LayoutOnEntireRect = 48, + WA_OutsideWSRange = 49, + WA_GrabbedShortcut = 50, + WA_TransparentForMouseEvents = 51, + WA_PaintUnclipped = 52, + WA_SetWindowIcon = 53, + WA_NoMouseReplay = 54, + WA_DeleteOnClose = 55, + WA_RightToLeft = 56, + WA_SetLayoutDirection = 57, + WA_NoChildEventsForParent = 58, + WA_ForceUpdatesDisabled = 59, + WA_WState_Created = 60, + WA_WState_CompressKeys = 61, + WA_WState_InPaintEvent = 62, + WA_WState_Reparented = 63, + WA_WState_ConfigPending = 64, + WA_WState_Polished = 66, + WA_WState_DND = 67, + WA_WState_OwnSizePolicy = 68, + WA_WState_ExplicitShowHide = 69, + WA_ShowModal = 70, + WA_MouseNoMask = 71, + WA_GroupLeader = 72, + WA_NoMousePropagation = 73, + WA_Hover = 74, + WA_InputMethodTransparent = 75, + WA_QuitOnClose = 76, + WA_KeyboardFocusChange = 77, + WA_AcceptDrops = 78, + WA_DropSiteRegistered = 79, + WA_ForceAcceptDrops = WA_DropSiteRegistered, + WA_WindowPropagation = 80, + WA_NoX11EventCompression = 81, + WA_TintedBackground = 82, + WA_X11OpenGLOverlay = 83, + WA_AlwaysShowToolTips = 84, + WA_MacOpaqueSizeGrip = 85, + WA_SetStyle = 86, + WA_SetLocale = 87, + WA_MacShowFocusRect = 88, + WA_MacNormalSize = 89, + WA_MacSmallSize = 90, + WA_MacMiniSize = 91, + WA_LayoutUsesWidgetRect = 92, + WA_StyledBackground = 93, + WA_MSWindowsUseDirect3D = 94, + WA_CanHostQMdiSubWindowTitleBar = 95, + WA_MacAlwaysShowToolWindow = 96, + WA_StyleSheet = 97, + WA_ShowWithoutActivating = 98, + WA_X11BypassTransientForHint = 99, + WA_NativeWindow = 100, + WA_DontCreateNativeAncestors = 101, + WA_MacVariableSize = 102, + WA_DontShowOnScreen = 103, + WA_X11NetWmWindowTypeDesktop = 104, + WA_X11NetWmWindowTypeDock = 105, + WA_X11NetWmWindowTypeToolBar = 106, + WA_X11NetWmWindowTypeMenu = 107, + WA_X11NetWmWindowTypeUtility = 108, + WA_X11NetWmWindowTypeSplash = 109, + WA_X11NetWmWindowTypeDialog = 110, + WA_X11NetWmWindowTypeDropDownMenu = 111, + WA_X11NetWmWindowTypePopupMenu = 112, + WA_X11NetWmWindowTypeToolTip = 113, + WA_X11NetWmWindowTypeNotification = 114, + WA_X11NetWmWindowTypeCombo = 115, + WA_X11NetWmWindowTypeDND = 116, + WA_MacFrameworkScaled = 117, + WA_SetWindowModality = 118, + WA_WState_WindowOpacitySet = 119, + WA_TranslucentBackground = 120, + WA_AcceptTouchEvents = 121, + WA_WState_AcceptedTouchBeginEvent = 122, + WA_TouchPadAcceptSingleTouchEvents = 123, + WA_MergeSoftkeys = 124, + WA_MergeSoftkeysRecursively = 125, + WA_LockPortraitOrientation = 128, + WA_LockLandscapeOrientation = 129, + WA_AutoOrientation = 130, + WA_X11DoNotAcceptFocus = 132, + WA_SymbianNoSystemRotation = 133, + WA_MacNoShadow = 134, + WA_AttributeCount + }; + enum ApplicationAttribute + { + AA_ImmediateWidgetCreation = 0, + AA_MSWindowsUseDirect3DByDefault = 1, + AA_DontShowIconsInMenus = 2, + AA_NativeWindows = 3, + AA_DontCreateNativeWidgetSiblings = 4, + AA_MacPluginApplication = 5, + AA_DontUseNativeMenuBar = 6, + AA_MacDontSwapCtrlAndMeta = 7, + AA_S60DontConstructApplicationPanes = 8, + AA_S60DisablePartialScreenInputMode = 9, + AA_X11InitThreads = 10, + AA_CaptureMultimediaKeys = 11, + AA_AttributeCount + }; + enum ImageConversionFlag { + ColorMode_Mask = 0x00000003, + AutoColor = 0x00000000, + ColorOnly = 0x00000003, + MonoOnly = 0x00000002, + AlphaDither_Mask = 0x0000000c, + ThresholdAlphaDither = 0x00000000, + OrderedAlphaDither = 0x00000004, + DiffuseAlphaDither = 0x00000008, + NoAlpha = 0x0000000c, + Dither_Mask = 0x00000030, + DiffuseDither = 0x00000000, + OrderedDither = 0x00000010, + ThresholdDither = 0x00000020, + DitherMode_Mask = 0x000000c0, + AutoDither = 0x00000000, + PreferDither = 0x00000040, + AvoidDither = 0x00000080, + NoOpaqueDetection = 0x00000100, + NoFormatConversion = 0x00000200 + }; + typedef QFlags ImageConversionFlags; + enum BGMode { + TransparentMode, + OpaqueMode + }; + enum Key { + Key_Escape = 0x01000000, + Key_Tab = 0x01000001, + Key_Backtab = 0x01000002, + Key_Backspace = 0x01000003, + Key_Return = 0x01000004, + Key_Enter = 0x01000005, + Key_Insert = 0x01000006, + Key_Delete = 0x01000007, + Key_Pause = 0x01000008, + Key_Print = 0x01000009, + Key_SysReq = 0x0100000a, + Key_Clear = 0x0100000b, + Key_Home = 0x01000010, + Key_End = 0x01000011, + Key_Left = 0x01000012, + Key_Up = 0x01000013, + Key_Right = 0x01000014, + Key_Down = 0x01000015, + Key_PageUp = 0x01000016, + Key_PageDown = 0x01000017, + Key_Shift = 0x01000020, + Key_Control = 0x01000021, + Key_Meta = 0x01000022, + Key_Alt = 0x01000023, + Key_CapsLock = 0x01000024, + Key_NumLock = 0x01000025, + Key_ScrollLock = 0x01000026, + Key_F1 = 0x01000030, + Key_F2 = 0x01000031, + Key_F3 = 0x01000032, + Key_F4 = 0x01000033, + Key_F5 = 0x01000034, + Key_F6 = 0x01000035, + Key_F7 = 0x01000036, + Key_F8 = 0x01000037, + Key_F9 = 0x01000038, + Key_F10 = 0x01000039, + Key_F11 = 0x0100003a, + Key_F12 = 0x0100003b, + Key_F13 = 0x0100003c, + Key_F14 = 0x0100003d, + Key_F15 = 0x0100003e, + Key_F16 = 0x0100003f, + Key_F17 = 0x01000040, + Key_F18 = 0x01000041, + Key_F19 = 0x01000042, + Key_F20 = 0x01000043, + Key_F21 = 0x01000044, + Key_F22 = 0x01000045, + Key_F23 = 0x01000046, + Key_F24 = 0x01000047, + Key_F25 = 0x01000048, + Key_F26 = 0x01000049, + Key_F27 = 0x0100004a, + Key_F28 = 0x0100004b, + Key_F29 = 0x0100004c, + Key_F30 = 0x0100004d, + Key_F31 = 0x0100004e, + Key_F32 = 0x0100004f, + Key_F33 = 0x01000050, + Key_F34 = 0x01000051, + Key_F35 = 0x01000052, + Key_Super_L = 0x01000053, + Key_Super_R = 0x01000054, + Key_Menu = 0x01000055, + Key_Hyper_L = 0x01000056, + Key_Hyper_R = 0x01000057, + Key_Help = 0x01000058, + Key_Direction_L = 0x01000059, + Key_Direction_R = 0x01000060, + Key_Space = 0x20, + Key_Any = Key_Space, + Key_Exclam = 0x21, + Key_QuoteDbl = 0x22, + Key_NumberSign = 0x23, + Key_Dollar = 0x24, + Key_Percent = 0x25, + Key_Ampersand = 0x26, + Key_Apostrophe = 0x27, + Key_ParenLeft = 0x28, + Key_ParenRight = 0x29, + Key_Asterisk = 0x2a, + Key_Plus = 0x2b, + Key_Comma = 0x2c, + Key_Minus = 0x2d, + Key_Period = 0x2e, + Key_Slash = 0x2f, + Key_0 = 0x30, + Key_1 = 0x31, + Key_2 = 0x32, + Key_3 = 0x33, + Key_4 = 0x34, + Key_5 = 0x35, + Key_6 = 0x36, + Key_7 = 0x37, + Key_8 = 0x38, + Key_9 = 0x39, + Key_Colon = 0x3a, + Key_Semicolon = 0x3b, + Key_Less = 0x3c, + Key_Equal = 0x3d, + Key_Greater = 0x3e, + Key_Question = 0x3f, + Key_At = 0x40, + Key_A = 0x41, + Key_B = 0x42, + Key_C = 0x43, + Key_D = 0x44, + Key_E = 0x45, + Key_F = 0x46, + Key_G = 0x47, + Key_H = 0x48, + Key_I = 0x49, + Key_J = 0x4a, + Key_K = 0x4b, + Key_L = 0x4c, + Key_M = 0x4d, + Key_N = 0x4e, + Key_O = 0x4f, + Key_P = 0x50, + Key_Q = 0x51, + Key_R = 0x52, + Key_S = 0x53, + Key_T = 0x54, + Key_U = 0x55, + Key_V = 0x56, + Key_W = 0x57, + Key_X = 0x58, + Key_Y = 0x59, + Key_Z = 0x5a, + Key_BracketLeft = 0x5b, + Key_Backslash = 0x5c, + Key_BracketRight = 0x5d, + Key_AsciiCircum = 0x5e, + Key_Underscore = 0x5f, + Key_QuoteLeft = 0x60, + Key_BraceLeft = 0x7b, + Key_Bar = 0x7c, + Key_BraceRight = 0x7d, + Key_AsciiTilde = 0x7e, + Key_nobreakspace = 0x0a0, + Key_exclamdown = 0x0a1, + Key_cent = 0x0a2, + Key_sterling = 0x0a3, + Key_currency = 0x0a4, + Key_yen = 0x0a5, + Key_brokenbar = 0x0a6, + Key_section = 0x0a7, + Key_diaeresis = 0x0a8, + Key_copyright = 0x0a9, + Key_ordfeminine = 0x0aa, + Key_guillemotleft = 0x0ab, + Key_notsign = 0x0ac, + Key_hyphen = 0x0ad, + Key_registered = 0x0ae, + Key_macron = 0x0af, + Key_degree = 0x0b0, + Key_plusminus = 0x0b1, + Key_twosuperior = 0x0b2, + Key_threesuperior = 0x0b3, + Key_acute = 0x0b4, + Key_mu = 0x0b5, + Key_paragraph = 0x0b6, + Key_periodcentered = 0x0b7, + Key_cedilla = 0x0b8, + Key_onesuperior = 0x0b9, + Key_masculine = 0x0ba, + Key_guillemotright = 0x0bb, + Key_onequarter = 0x0bc, + Key_onehalf = 0x0bd, + Key_threequarters = 0x0be, + Key_questiondown = 0x0bf, + Key_Agrave = 0x0c0, + Key_Aacute = 0x0c1, + Key_Acircumflex = 0x0c2, + Key_Atilde = 0x0c3, + Key_Adiaeresis = 0x0c4, + Key_Aring = 0x0c5, + Key_AE = 0x0c6, + Key_Ccedilla = 0x0c7, + Key_Egrave = 0x0c8, + Key_Eacute = 0x0c9, + Key_Ecircumflex = 0x0ca, + Key_Ediaeresis = 0x0cb, + Key_Igrave = 0x0cc, + Key_Iacute = 0x0cd, + Key_Icircumflex = 0x0ce, + Key_Idiaeresis = 0x0cf, + Key_ETH = 0x0d0, + Key_Ntilde = 0x0d1, + Key_Ograve = 0x0d2, + Key_Oacute = 0x0d3, + Key_Ocircumflex = 0x0d4, + Key_Otilde = 0x0d5, + Key_Odiaeresis = 0x0d6, + Key_multiply = 0x0d7, + Key_Ooblique = 0x0d8, + Key_Ugrave = 0x0d9, + Key_Uacute = 0x0da, + Key_Ucircumflex = 0x0db, + Key_Udiaeresis = 0x0dc, + Key_Yacute = 0x0dd, + Key_THORN = 0x0de, + Key_ssharp = 0x0df, + Key_division = 0x0f7, + Key_ydiaeresis = 0x0ff, + Key_AltGr = 0x01001103, + Key_Multi_key = 0x01001120, + Key_Codeinput = 0x01001137, + Key_SingleCandidate = 0x0100113c, + Key_MultipleCandidate = 0x0100113d, + Key_PreviousCandidate = 0x0100113e, + Key_Mode_switch = 0x0100117e, + Key_Kanji = 0x01001121, + Key_Muhenkan = 0x01001122, + Key_Henkan = 0x01001123, + Key_Romaji = 0x01001124, + Key_Hiragana = 0x01001125, + Key_Katakana = 0x01001126, + Key_Hiragana_Katakana = 0x01001127, + Key_Zenkaku = 0x01001128, + Key_Hankaku = 0x01001129, + Key_Zenkaku_Hankaku = 0x0100112a, + Key_Touroku = 0x0100112b, + Key_Massyo = 0x0100112c, + Key_Kana_Lock = 0x0100112d, + Key_Kana_Shift = 0x0100112e, + Key_Eisu_Shift = 0x0100112f, + Key_Eisu_toggle = 0x01001130, + Key_Hangul = 0x01001131, + Key_Hangul_Start = 0x01001132, + Key_Hangul_End = 0x01001133, + Key_Hangul_Hanja = 0x01001134, + Key_Hangul_Jamo = 0x01001135, + Key_Hangul_Romaja = 0x01001136, + Key_Hangul_Jeonja = 0x01001138, + Key_Hangul_Banja = 0x01001139, + Key_Hangul_PreHanja = 0x0100113a, + Key_Hangul_PostHanja = 0x0100113b, + Key_Hangul_Special = 0x0100113f, + Key_Dead_Grave = 0x01001250, + Key_Dead_Acute = 0x01001251, + Key_Dead_Circumflex = 0x01001252, + Key_Dead_Tilde = 0x01001253, + Key_Dead_Macron = 0x01001254, + Key_Dead_Breve = 0x01001255, + Key_Dead_Abovedot = 0x01001256, + Key_Dead_Diaeresis = 0x01001257, + Key_Dead_Abovering = 0x01001258, + Key_Dead_Doubleacute = 0x01001259, + Key_Dead_Caron = 0x0100125a, + Key_Dead_Cedilla = 0x0100125b, + Key_Dead_Ogonek = 0x0100125c, + Key_Dead_Iota = 0x0100125d, + Key_Dead_Voiced_Sound = 0x0100125e, + Key_Dead_Semivoiced_Sound = 0x0100125f, + Key_Dead_Belowdot = 0x01001260, + Key_Dead_Hook = 0x01001261, + Key_Dead_Horn = 0x01001262, + Key_Back = 0x01000061, + Key_Forward = 0x01000062, + Key_Stop = 0x01000063, + Key_Refresh = 0x01000064, + Key_VolumeDown = 0x01000070, + Key_VolumeMute = 0x01000071, + Key_VolumeUp = 0x01000072, + Key_BassBoost = 0x01000073, + Key_BassUp = 0x01000074, + Key_BassDown = 0x01000075, + Key_TrebleUp = 0x01000076, + Key_TrebleDown = 0x01000077, + Key_MediaPlay = 0x01000080, + Key_MediaStop = 0x01000081, + Key_MediaPrevious = 0x01000082, + Key_MediaNext = 0x01000083, + Key_MediaRecord = 0x01000084, + Key_MediaPause = 0x1000085, + Key_MediaTogglePlayPause = 0x1000086, + Key_HomePage = 0x01000090, + Key_Favorites = 0x01000091, + Key_Search = 0x01000092, + Key_Standby = 0x01000093, + Key_OpenUrl = 0x01000094, + Key_LaunchMail = 0x010000a0, + Key_LaunchMedia = 0x010000a1, + Key_Launch0 = 0x010000a2, + Key_Launch1 = 0x010000a3, + Key_Launch2 = 0x010000a4, + Key_Launch3 = 0x010000a5, + Key_Launch4 = 0x010000a6, + Key_Launch5 = 0x010000a7, + Key_Launch6 = 0x010000a8, + Key_Launch7 = 0x010000a9, + Key_Launch8 = 0x010000aa, + Key_Launch9 = 0x010000ab, + Key_LaunchA = 0x010000ac, + Key_LaunchB = 0x010000ad, + Key_LaunchC = 0x010000ae, + Key_LaunchD = 0x010000af, + Key_LaunchE = 0x010000b0, + Key_LaunchF = 0x010000b1, + Key_MonBrightnessUp = 0x010000b2, + Key_MonBrightnessDown = 0x010000b3, + Key_KeyboardLightOnOff = 0x010000b4, + Key_KeyboardBrightnessUp = 0x010000b5, + Key_KeyboardBrightnessDown = 0x010000b6, + Key_PowerOff = 0x010000b7, + Key_WakeUp = 0x010000b8, + Key_Eject = 0x010000b9, + Key_ScreenSaver = 0x010000ba, + Key_WWW = 0x010000bb, + Key_Memo = 0x010000bc, + Key_LightBulb = 0x010000bd, + Key_Shop = 0x010000be, + Key_History = 0x010000bf, + Key_AddFavorite = 0x010000c0, + Key_HotLinks = 0x010000c1, + Key_BrightnessAdjust = 0x010000c2, + Key_Finance = 0x010000c3, + Key_Community = 0x010000c4, + Key_AudioRewind = 0x010000c5, + Key_BackForward = 0x010000c6, + Key_ApplicationLeft = 0x010000c7, + Key_ApplicationRight = 0x010000c8, + Key_Book = 0x010000c9, + Key_CD = 0x010000ca, + Key_Calculator = 0x010000cb, + Key_ToDoList = 0x010000cc, + Key_ClearGrab = 0x010000cd, + Key_Close = 0x010000ce, + Key_Copy = 0x010000cf, + Key_Cut = 0x010000d0, + Key_Display = 0x010000d1, + Key_DOS = 0x010000d2, + Key_Documents = 0x010000d3, + Key_Excel = 0x010000d4, + Key_Explorer = 0x010000d5, + Key_Game = 0x010000d6, + Key_Go = 0x010000d7, + Key_iTouch = 0x010000d8, + Key_LogOff = 0x010000d9, + Key_Market = 0x010000da, + Key_Meeting = 0x010000db, + Key_MenuKB = 0x010000dc, + Key_MenuPB = 0x010000dd, + Key_MySites = 0x010000de, + Key_News = 0x010000df, + Key_OfficeHome = 0x010000e0, + Key_Option = 0x010000e1, + Key_Paste = 0x010000e2, + Key_Phone = 0x010000e3, + Key_Calendar = 0x010000e4, + Key_Reply = 0x010000e5, + Key_Reload = 0x010000e6, + Key_RotateWindows = 0x010000e7, + Key_RotationPB = 0x010000e8, + Key_RotationKB = 0x010000e9, + Key_Save = 0x010000ea, + Key_Send = 0x010000eb, + Key_Spell = 0x010000ec, + Key_SplitScreen = 0x010000ed, + Key_Support = 0x010000ee, + Key_TaskPane = 0x010000ef, + Key_Terminal = 0x010000f0, + Key_Tools = 0x010000f1, + Key_Travel = 0x010000f2, + Key_Video = 0x010000f3, + Key_Word = 0x010000f4, + Key_Xfer = 0x010000f5, + Key_ZoomIn = 0x010000f6, + Key_ZoomOut = 0x010000f7, + Key_Away = 0x010000f8, + Key_Messenger = 0x010000f9, + Key_WebCam = 0x010000fa, + Key_MailForward = 0x010000fb, + Key_Pictures = 0x010000fc, + Key_Music = 0x010000fd, + Key_Battery = 0x010000fe, + Key_Bluetooth = 0x010000ff, + Key_WLAN = 0x01000100, + Key_UWB = 0x01000101, + Key_AudioForward = 0x01000102, + Key_AudioRepeat = 0x01000103, + Key_AudioRandomPlay = 0x01000104, + Key_Subtitle = 0x01000105, + Key_AudioCycleTrack = 0x01000106, + Key_Time = 0x01000107, + Key_Hibernate = 0x01000108, + Key_View = 0x01000109, + Key_TopMenu = 0x0100010a, + Key_PowerDown = 0x0100010b, + Key_Suspend = 0x0100010c, + Key_ContrastAdjust = 0x0100010d, + Key_LaunchG = 0x0100010e, + Key_LaunchH = 0x0100010f, + Key_MediaLast = 0x0100ffff, + Key_Select = 0x01010000, + Key_Yes = 0x01010001, + Key_No = 0x01010002, + Key_Cancel = 0x01020001, + Key_Printer = 0x01020002, + Key_Execute = 0x01020003, + Key_Sleep = 0x01020004, + Key_Play = 0x01020005, + Key_Zoom = 0x01020006, + Key_Context1 = 0x01100000, + Key_Context2 = 0x01100001, + Key_Context3 = 0x01100002, + Key_Context4 = 0x01100003, + Key_Call = 0x01100004, + Key_Hangup = 0x01100005, + Key_Flip = 0x01100006, + Key_ToggleCallHangup = 0x01100007, + Key_VoiceDial = 0x01100008, + Key_LastNumberRedial = 0x01100009, + Key_Camera = 0x01100020, + Key_CameraFocus = 0x01100021, + Key_unknown = 0x01ffffff + }; + enum ArrowType { + NoArrow, + UpArrow, + DownArrow, + LeftArrow, + RightArrow + }; + enum PenStyle { + NoPen, + SolidLine, + DashLine, + DotLine, + DashDotLine, + DashDotDotLine, + CustomDashLine + , MPenStyle = 0x0f + }; + enum PenCapStyle { + FlatCap = 0x00, + SquareCap = 0x10, + RoundCap = 0x20, + MPenCapStyle = 0x30 + }; + enum PenJoinStyle { + MiterJoin = 0x00, + BevelJoin = 0x40, + RoundJoin = 0x80, + SvgMiterJoin = 0x100, + MPenJoinStyle = 0x1c0 + }; + enum BrushStyle { + NoBrush, + SolidPattern, + Dense1Pattern, + Dense2Pattern, + Dense3Pattern, + Dense4Pattern, + Dense5Pattern, + Dense6Pattern, + Dense7Pattern, + HorPattern, + VerPattern, + CrossPattern, + BDiagPattern, + FDiagPattern, + DiagCrossPattern, + LinearGradientPattern, + RadialGradientPattern, + ConicalGradientPattern, + TexturePattern = 24 + }; + enum SizeMode { + AbsoluteSize, + RelativeSize + }; + enum UIEffect { + UI_General, + UI_AnimateMenu, + UI_FadeMenu, + UI_AnimateCombo, + UI_AnimateTooltip, + UI_FadeTooltip, + UI_AnimateToolBox + }; + enum CursorShape { + ArrowCursor, + UpArrowCursor, + CrossCursor, + WaitCursor, + IBeamCursor, + SizeVerCursor, + SizeHorCursor, + SizeBDiagCursor, + SizeFDiagCursor, + SizeAllCursor, + BlankCursor, + SplitVCursor, + SplitHCursor, + PointingHandCursor, + ForbiddenCursor, + WhatsThisCursor, + BusyCursor, + OpenHandCursor, + ClosedHandCursor, + DragCopyCursor, + DragMoveCursor, + DragLinkCursor, + LastCursor = DragLinkCursor, + BitmapCursor = 24, + CustomCursor = 25 + }; + enum TextFormat { + PlainText, + RichText, + AutoText, + LogText + }; + enum AspectRatioMode { + IgnoreAspectRatio, + KeepAspectRatio, + KeepAspectRatioByExpanding + }; + enum AnchorAttribute { + AnchorName, + AnchorHref + }; + enum DockWidgetArea { + LeftDockWidgetArea = 0x1, + RightDockWidgetArea = 0x2, + TopDockWidgetArea = 0x4, + BottomDockWidgetArea = 0x8, + DockWidgetArea_Mask = 0xf, + AllDockWidgetAreas = DockWidgetArea_Mask, + NoDockWidgetArea = 0 + }; + enum DockWidgetAreaSizes { + NDockWidgetAreas = 4 + }; + typedef QFlags DockWidgetAreas; + enum ToolBarArea { + LeftToolBarArea = 0x1, + RightToolBarArea = 0x2, + TopToolBarArea = 0x4, + BottomToolBarArea = 0x8, + ToolBarArea_Mask = 0xf, + AllToolBarAreas = ToolBarArea_Mask, + NoToolBarArea = 0 + }; + enum ToolBarAreaSizes { + NToolBarAreas = 4 + }; + typedef QFlags ToolBarAreas; + enum DateFormat { + TextDate, + ISODate, + SystemLocaleDate, + LocalDate = SystemLocaleDate, + LocaleDate, + SystemLocaleShortDate, + SystemLocaleLongDate, + DefaultLocaleShortDate, + DefaultLocaleLongDate + }; + enum TimeSpec { + LocalTime, + UTC, + OffsetFromUTC + }; + enum DayOfWeek { + Monday = 1, + Tuesday = 2, + Wednesday = 3, + Thursday = 4, + Friday = 5, + Saturday = 6, + Sunday = 7 + }; + enum ScrollBarPolicy { + ScrollBarAsNeeded, + ScrollBarAlwaysOff, + ScrollBarAlwaysOn + }; + enum CaseSensitivity { + CaseInsensitive, + CaseSensitive + }; + enum Corner { + TopLeftCorner = 0x00000, + TopRightCorner = 0x00001, + BottomLeftCorner = 0x00002, + BottomRightCorner = 0x00003 + }; + enum ConnectionType { + AutoConnection, + DirectConnection, + QueuedConnection, + AutoCompatConnection, + BlockingQueuedConnection, + UniqueConnection = 0x80 + }; + enum ShortcutContext { + WidgetShortcut, + WindowShortcut, + ApplicationShortcut, + WidgetWithChildrenShortcut + }; + enum FillRule { + OddEvenFill, + WindingFill + }; + enum MaskMode { + MaskInColor, + MaskOutColor + }; + enum ClipOperation { + NoClip, + ReplaceClip, + IntersectClip, + UniteClip + }; + enum ItemSelectionMode { + ContainsItemShape = 0x0, + IntersectsItemShape = 0x1, + ContainsItemBoundingRect = 0x2, + IntersectsItemBoundingRect = 0x3 + }; + enum TransformationMode { + FastTransformation, + SmoothTransformation + }; + enum Axis { + XAxis, + YAxis, + ZAxis + }; + enum FocusReason { + MouseFocusReason, + TabFocusReason, + BacktabFocusReason, + ActiveWindowFocusReason, + PopupFocusReason, + ShortcutFocusReason, + MenuBarFocusReason, + OtherFocusReason, + NoFocusReason + }; + enum ContextMenuPolicy { + NoContextMenu, + DefaultContextMenu, + ActionsContextMenu, + CustomContextMenu, + PreventContextMenu + }; + enum InputMethodQuery { + ImMicroFocus, + ImFont, + ImCursorPosition, + ImSurroundingText, + ImCurrentSelection, + ImMaximumTextLength, + ImAnchorPosition + }; + enum InputMethodHint { + ImhNone = 0x0, + ImhHiddenText = 0x1, + ImhNoAutoUppercase = 0x2, + ImhPreferNumbers = 0x4, + ImhPreferUppercase = 0x8, + ImhPreferLowercase = 0x10, + ImhNoPredictiveText = 0x20, + ImhDigitsOnly = 0x10000, + ImhFormattedNumbersOnly = 0x20000, + ImhUppercaseOnly = 0x40000, + ImhLowercaseOnly = 0x80000, + ImhDialableCharactersOnly = 0x100000, + ImhEmailCharactersOnly = 0x200000, + ImhUrlCharactersOnly = 0x400000, + ImhExclusiveInputMask = 0xffff0000 + }; + typedef QFlags InputMethodHints; + enum ToolButtonStyle { + ToolButtonIconOnly, + ToolButtonTextOnly, + ToolButtonTextBesideIcon, + ToolButtonTextUnderIcon, + ToolButtonFollowStyle + }; + enum LayoutDirection { + LeftToRight, + RightToLeft, + LayoutDirectionAuto + }; + enum AnchorPoint { + AnchorLeft = 0, + AnchorHorizontalCenter, + AnchorRight, + AnchorTop, + AnchorVerticalCenter, + AnchorBottom + }; + enum DropAction { + CopyAction = 0x1, + MoveAction = 0x2, + LinkAction = 0x4, + ActionMask = 0xff, + TargetMoveAction = 0x8002, + IgnoreAction = 0x0 + }; + typedef QFlags DropActions; + enum CheckState { + Unchecked, + PartiallyChecked, + Checked + }; + enum ItemDataRole { + DisplayRole = 0, + DecorationRole = 1, + EditRole = 2, + ToolTipRole = 3, + StatusTipRole = 4, + WhatsThisRole = 5, + FontRole = 6, + TextAlignmentRole = 7, + BackgroundColorRole = 8, + BackgroundRole = 8, + TextColorRole = 9, + ForegroundRole = 9, + CheckStateRole = 10, + AccessibleTextRole = 11, + AccessibleDescriptionRole = 12, + SizeHintRole = 13, + InitialSortOrderRole = 14, + DisplayPropertyRole = 27, + DecorationPropertyRole = 28, + ToolTipPropertyRole = 29, + StatusTipPropertyRole = 30, + WhatsThisPropertyRole = 31, + UserRole = 32 + }; + enum ItemFlag { + NoItemFlags = 0, + ItemIsSelectable = 1, + ItemIsEditable = 2, + ItemIsDragEnabled = 4, + ItemIsDropEnabled = 8, + ItemIsUserCheckable = 16, + ItemIsEnabled = 32, + ItemIsTristate = 64 + }; + typedef QFlags ItemFlags; + enum MatchFlag { + MatchExactly = 0, + MatchContains = 1, + MatchStartsWith = 2, + MatchEndsWith = 3, + MatchRegExp = 4, + MatchWildcard = 5, + MatchFixedString = 8, + MatchCaseSensitive = 16, + MatchWrap = 32, + MatchRecursive = 64 + }; + typedef QFlags MatchFlags; + typedef unsigned long HANDLE; + typedef WindowFlags WFlags; + enum WindowModality { + NonModal, + WindowModal, + ApplicationModal + }; + enum TextInteractionFlag { + NoTextInteraction = 0, + TextSelectableByMouse = 1, + TextSelectableByKeyboard = 2, + LinksAccessibleByMouse = 4, + LinksAccessibleByKeyboard = 8, + TextEditable = 16, + TextEditorInteraction = TextSelectableByMouse | TextSelectableByKeyboard | TextEditable, + TextBrowserInteraction = TextSelectableByMouse | LinksAccessibleByMouse | LinksAccessibleByKeyboard + }; + typedef QFlags TextInteractionFlags; + enum EventPriority { + HighEventPriority = 1, + NormalEventPriority = 0, + LowEventPriority = -1 + }; + enum SizeHint { + MinimumSize, + PreferredSize, + MaximumSize, + MinimumDescent, + NSizeHints + }; + enum WindowFrameSection { + NoSection, + LeftSection, + TopLeftSection, + TopSection, + TopRightSection, + RightSection, + BottomRightSection, + BottomSection, + BottomLeftSection, + TitleBarArea + }; + enum Initialization { + Uninitialized + }; + enum CoordinateSystem { + DeviceCoordinates, + LogicalCoordinates + }; + enum TouchPointState { + TouchPointPressed = 0x01, + TouchPointMoved = 0x02, + TouchPointStationary = 0x04, + TouchPointReleased = 0x08, + TouchPointStateMask = 0x0f, + TouchPointPrimary = 0x10 + }; + typedef QFlags TouchPointStates; + enum GestureState + { + NoGesture, + GestureStarted = 1, + GestureUpdated = 2, + GestureFinished = 3, + GestureCanceled = 4 + }; + enum GestureType + { + TapGesture = 1, + TapAndHoldGesture = 2, + PanGesture = 3, + PinchGesture = 4, + SwipeGesture = 5, + CustomGesture = 0x0100, + LastGestureType = ~0u + }; + enum GestureFlag + { + DontStartGestureOnChildren = 0x01, + ReceivePartialGestures = 0x02, + IgnoredGesturesPropagateToParent = 0x04 + }; + typedef QFlags GestureFlags; + enum NavigationMode + { + NavigationModeNone, + NavigationModeKeypadTabOrder, + NavigationModeKeypadDirectional, + NavigationModeCursorAuto, + NavigationModeCursorForceVisible + }; + enum CursorMoveStyle { + LogicalMoveStyle, + VisualMoveStyle + }; +} + inline QFlags operator|(Qt::MouseButtons::enum_type f1, Qt::MouseButtons::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::MouseButtons::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::MouseButtons::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } + inline QFlags operator|(Qt::Orientations::enum_type f1, Qt::Orientations::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::Orientations::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::Orientations::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } + inline QFlags operator|(Qt::KeyboardModifiers::enum_type f1, Qt::KeyboardModifiers::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::KeyboardModifiers::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::KeyboardModifiers::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } + inline QFlags operator|(Qt::WindowFlags::enum_type f1, Qt::WindowFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::WindowFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::WindowFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } + inline QFlags operator|(Qt::Alignment::enum_type f1, Qt::Alignment::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::Alignment::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::Alignment::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } + inline QFlags operator|(Qt::ImageConversionFlags::enum_type f1, Qt::ImageConversionFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::ImageConversionFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::ImageConversionFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } + inline QFlags operator|(Qt::DockWidgetAreas::enum_type f1, Qt::DockWidgetAreas::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::DockWidgetAreas::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::DockWidgetAreas::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } + inline QFlags operator|(Qt::ToolBarAreas::enum_type f1, Qt::ToolBarAreas::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::ToolBarAreas::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::ToolBarAreas::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } + inline QFlags operator|(Qt::WindowStates::enum_type f1, Qt::WindowStates::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::WindowStates::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::WindowStates::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } + inline QFlags operator|(Qt::DropActions::enum_type f1, Qt::DropActions::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::DropActions::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::DropActions::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } + inline QFlags operator|(Qt::ItemFlags::enum_type f1, Qt::ItemFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::ItemFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::ItemFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } + inline QFlags operator|(Qt::MatchFlags::enum_type f1, Qt::MatchFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::MatchFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::MatchFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } + inline QFlags operator|(Qt::TextInteractionFlags::enum_type f1, Qt::TextInteractionFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::TextInteractionFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::TextInteractionFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } + inline QFlags operator|(Qt::InputMethodHints::enum_type f1, Qt::InputMethodHints::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::InputMethodHints::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::InputMethodHints::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } + inline QFlags operator|(Qt::TouchPointStates::enum_type f1, Qt::TouchPointStates::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::TouchPointStates::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::TouchPointStates::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } + inline QFlags operator|(Qt::GestureFlags::enum_type f1, Qt::GestureFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(Qt::GestureFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(Qt::GestureFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +typedef bool (*qInternalCallback)(void **); +class QInternal { +public: + enum PaintDeviceFlags { + UnknownDevice = 0x00, + Widget = 0x01, + Pixmap = 0x02, + Image = 0x03, + Printer = 0x04, + Picture = 0x05, + Pbuffer = 0x06, + FramebufferObject = 0x07, + CustomRaster = 0x08, + MacQuartz = 0x09, + PaintBuffer = 0x0a, + OpenGL = 0x0b + }; + enum RelayoutType { + RelayoutNormal, + RelayoutDragging, + RelayoutDropped + }; + enum Callback { + ConnectCallback, + DisconnectCallback, + AdoptCurrentThread, + EventNotifyCallback, + LastCallback + }; + enum InternalFunction { + CreateThreadForAdoption, + RefAdoptedThread, + DerefAdoptedThread, + SetCurrentThreadToMainThread, + SetQObjectSender, + GetQObjectSender, + ResetQObjectSender, + LastInternalFunction + }; + enum DockPosition { + LeftDock, + RightDock, + TopDock, + BottomDock, + DockCount + }; + static bool registerCallback(Callback, qInternalCallback); + static bool unregisterCallback(Callback, qInternalCallback); + static bool activateCallbacks(Callback, void **); + static bool callFunction(InternalFunction func, void **); +}; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QByteArray; +class QString; +template +inline int qYouForgotTheQ_OBJECT_Macro(T, T) { return 0; } +template +inline void qYouForgotTheQ_OBJECT_Macro(T1, T2) {} + const char *qFlagLocation(const char *method); +class QObject; +class QMetaMethod; +class QMetaEnum; +class QMetaProperty; +class QMetaClassInfo; +class QGenericArgument +{ +public: + inline QGenericArgument(const char *aName = 0, const void *aData = 0) + : _data(aData), _name(aName) {} + inline void *data() const { return const_cast(_data); } + inline const char *name() const { return _name; } +private: + const void *_data; + const char *_name; +}; +class QGenericReturnArgument: public QGenericArgument +{ +public: + inline QGenericReturnArgument(const char *aName = 0, void *aData = 0) + : QGenericArgument(aName, aData) + {} +}; +template +class QArgument: public QGenericArgument +{ +public: + inline QArgument(const char *aName, const T &aData) + : QGenericArgument(aName, static_cast(&aData)) + {} +}; +template +class QArgument: public QGenericArgument +{ +public: + inline QArgument(const char *aName, T &aData) + : QGenericArgument(aName, static_cast(&aData)) + {} +}; +template +class QReturnArgument: public QGenericReturnArgument +{ +public: + inline QReturnArgument(const char *aName, T &aData) + : QGenericReturnArgument(aName, static_cast(&aData)) + {} +}; +struct QMetaObject +{ + const char *className() const; + const QMetaObject *superClass() const; + QObject *cast(QObject *obj) const; + const QObject *cast(const QObject *obj) const; + QString tr(const char *s, const char *c) const; + QString trUtf8(const char *s, const char *c) const; + QString tr(const char *s, const char *c, int n) const; + QString trUtf8(const char *s, const char *c, int n) const; + int methodOffset() const; + int enumeratorOffset() const; + int propertyOffset() const; + int classInfoOffset() const; + int constructorCount() const; + int methodCount() const; + int enumeratorCount() const; + int propertyCount() const; + int classInfoCount() const; + int indexOfConstructor(const char *constructor) const; + int indexOfMethod(const char *method) const; + int indexOfSignal(const char *signal) const; + int indexOfSlot(const char *slot) const; + int indexOfEnumerator(const char *name) const; + int indexOfProperty(const char *name) const; + int indexOfClassInfo(const char *name) const; + QMetaMethod constructor(int index) const; + QMetaMethod method(int index) const; + QMetaEnum enumerator(int index) const; + QMetaProperty property(int index) const; + QMetaClassInfo classInfo(int index) const; + QMetaProperty userProperty() const; + static bool checkConnectArgs(const char *signal, const char *method); + static QByteArray normalizedSignature(const char *method); + static QByteArray normalizedType(const char *type); + static bool connect(const QObject *sender, int signal_index, + const QObject *receiver, int method_index, + int type = 0, int *types = 0); + static bool disconnect(const QObject *sender, int signal_index, + const QObject *receiver, int method_index); + static bool disconnectOne(const QObject *sender, int signal_index, + const QObject *receiver, int method_index); + static void connectSlotsByName(QObject *o); + static void activate(QObject *sender, int signal_index, void **argv); + static void activate(QObject *sender, int from_signal_index, int to_signal_index, void **argv); + static void activate(QObject *sender, const QMetaObject *, int local_signal_index, void **argv); + static void activate(QObject *sender, const QMetaObject *, int from_local_signal_index, int to_local_signal_index, void **argv); + static void addGuard(QObject **ptr); + static void removeGuard(QObject **ptr); + static void changeGuard(QObject **ptr, QObject *o); + static bool invokeMethod(QObject *obj, const char *member, + Qt::ConnectionType, + QGenericReturnArgument ret, + QGenericArgument val0 = QGenericArgument(0), + QGenericArgument val1 = QGenericArgument(), + QGenericArgument val2 = QGenericArgument(), + QGenericArgument val3 = QGenericArgument(), + QGenericArgument val4 = QGenericArgument(), + QGenericArgument val5 = QGenericArgument(), + QGenericArgument val6 = QGenericArgument(), + QGenericArgument val7 = QGenericArgument(), + QGenericArgument val8 = QGenericArgument(), + QGenericArgument val9 = QGenericArgument()); + static inline bool invokeMethod(QObject *obj, const char *member, + QGenericReturnArgument ret, + QGenericArgument val0 = QGenericArgument(0), + QGenericArgument val1 = QGenericArgument(), + QGenericArgument val2 = QGenericArgument(), + QGenericArgument val3 = QGenericArgument(), + QGenericArgument val4 = QGenericArgument(), + QGenericArgument val5 = QGenericArgument(), + QGenericArgument val6 = QGenericArgument(), + QGenericArgument val7 = QGenericArgument(), + QGenericArgument val8 = QGenericArgument(), + QGenericArgument val9 = QGenericArgument()) + { + return invokeMethod(obj, member, Qt::AutoConnection, ret, val0, val1, val2, val3, + val4, val5, val6, val7, val8, val9); + } + static inline bool invokeMethod(QObject *obj, const char *member, + Qt::ConnectionType type, + QGenericArgument val0 = QGenericArgument(0), + QGenericArgument val1 = QGenericArgument(), + QGenericArgument val2 = QGenericArgument(), + QGenericArgument val3 = QGenericArgument(), + QGenericArgument val4 = QGenericArgument(), + QGenericArgument val5 = QGenericArgument(), + QGenericArgument val6 = QGenericArgument(), + QGenericArgument val7 = QGenericArgument(), + QGenericArgument val8 = QGenericArgument(), + QGenericArgument val9 = QGenericArgument()) + { + return invokeMethod(obj, member, type, QGenericReturnArgument(), val0, val1, val2, + val3, val4, val5, val6, val7, val8, val9); + } + static inline bool invokeMethod(QObject *obj, const char *member, + QGenericArgument val0 = QGenericArgument(0), + QGenericArgument val1 = QGenericArgument(), + QGenericArgument val2 = QGenericArgument(), + QGenericArgument val3 = QGenericArgument(), + QGenericArgument val4 = QGenericArgument(), + QGenericArgument val5 = QGenericArgument(), + QGenericArgument val6 = QGenericArgument(), + QGenericArgument val7 = QGenericArgument(), + QGenericArgument val8 = QGenericArgument(), + QGenericArgument val9 = QGenericArgument()) + { + return invokeMethod(obj, member, Qt::AutoConnection, QGenericReturnArgument(), val0, + val1, val2, val3, val4, val5, val6, val7, val8, val9); + } + QObject *newInstance(QGenericArgument val0 = QGenericArgument(0), + QGenericArgument val1 = QGenericArgument(), + QGenericArgument val2 = QGenericArgument(), + QGenericArgument val3 = QGenericArgument(), + QGenericArgument val4 = QGenericArgument(), + QGenericArgument val5 = QGenericArgument(), + QGenericArgument val6 = QGenericArgument(), + QGenericArgument val7 = QGenericArgument(), + QGenericArgument val8 = QGenericArgument(), + QGenericArgument val9 = QGenericArgument()) const; + enum Call { + InvokeMetaMethod, + ReadProperty, + WriteProperty, + ResetProperty, + QueryPropertyDesignable, + QueryPropertyScriptable, + QueryPropertyStored, + QueryPropertyEditable, + QueryPropertyUser, + CreateInstance + }; + int static_metacall(Call, int, void **) const; + static int metacall(QObject *, Call, int, void **); + struct { + const QMetaObject *superdata; + const char *stringdata; + const uint *data; + const void *extradata; + } d; +}; +typedef const QMetaObject& (*QMetaObjectAccessor)(); +struct QMetaObjectExtraData +{ + const QMetaObject **objects; + typedef void (*StaticMetacallFunction)(QObject *, QMetaObject::Call, int, void **); + StaticMetacallFunction static_metacall; +}; +inline const char *QMetaObject::className() const +{ return d.stringdata; } +inline const QMetaObject *QMetaObject::superClass() const +{ return d.superdata; } +typedef QtValidLicenseForCoreModule QtCoreModule; +class QString; +struct QLatin1Char +{ +public: + inline explicit QLatin1Char(char c) : ch(c) {} + inline char toLatin1() const { return ch; } + inline ushort unicode() const { return ushort(uchar(ch)); } +private: + char ch; +}; +class QChar { +public: + QChar(); + QChar(char c); + QChar(uchar c); + QChar(QLatin1Char ch); + QChar(uchar c, uchar r); + inline QChar(ushort rc) : ucs(rc){} + QChar(short rc); + QChar(uint rc); + QChar(int rc); + enum SpecialCharacter { + Null = 0x0000, + Nbsp = 0x00a0, + ReplacementCharacter = 0xfffd, + ObjectReplacementCharacter = 0xfffc, + ByteOrderMark = 0xfeff, + ByteOrderSwapped = 0xfffe, + ParagraphSeparator = 0x2029, + LineSeparator = 0x2028 + }; + QChar(SpecialCharacter sc); + enum Category + { + NoCategory, + Mark_NonSpacing, + Mark_SpacingCombining, + Mark_Enclosing, + Number_DecimalDigit, + Number_Letter, + Number_Other, + Separator_Space, + Separator_Line, + Separator_Paragraph, + Other_Control, + Other_Format, + Other_Surrogate, + Other_PrivateUse, + Other_NotAssigned, + Letter_Uppercase, + Letter_Lowercase, + Letter_Titlecase, + Letter_Modifier, + Letter_Other, + Punctuation_Connector, + Punctuation_Dash, + Punctuation_Open, + Punctuation_Close, + Punctuation_InitialQuote, + Punctuation_FinalQuote, + Punctuation_Other, + Symbol_Math, + Symbol_Currency, + Symbol_Modifier, + Symbol_Other, + Punctuation_Dask = Punctuation_Dash + }; + enum Direction + { + DirL, DirR, DirEN, DirES, DirET, DirAN, DirCS, DirB, DirS, DirWS, DirON, + DirLRE, DirLRO, DirAL, DirRLE, DirRLO, DirPDF, DirNSM, DirBN + }; + enum Decomposition + { + NoDecomposition, + Canonical, + Font, + NoBreak, + Initial, + Medial, + Final, + Isolated, + Circle, + Super, + Sub, + Vertical, + Wide, + Narrow, + Small, + Square, + Compat, + Fraction + }; + enum Joining + { + OtherJoining, Dual, Right, Center + }; + enum CombiningClass + { + Combining_BelowLeftAttached = 200, + Combining_BelowAttached = 202, + Combining_BelowRightAttached = 204, + Combining_LeftAttached = 208, + Combining_RightAttached = 210, + Combining_AboveLeftAttached = 212, + Combining_AboveAttached = 214, + Combining_AboveRightAttached = 216, + Combining_BelowLeft = 218, + Combining_Below = 220, + Combining_BelowRight = 222, + Combining_Left = 224, + Combining_Right = 226, + Combining_AboveLeft = 228, + Combining_Above = 230, + Combining_AboveRight = 232, + Combining_DoubleBelow = 233, + Combining_DoubleAbove = 234, + Combining_IotaSubscript = 240 + }; + enum UnicodeVersion { + Unicode_Unassigned, + Unicode_1_1, + Unicode_2_0, + Unicode_2_1_2, + Unicode_3_0, + Unicode_3_1, + Unicode_3_2, + Unicode_4_0, + Unicode_4_1, + Unicode_5_0 + }; + Category category() const; + Direction direction() const; + Joining joining() const; + bool hasMirrored() const; + unsigned char combiningClass() const; + QChar mirroredChar() const; + QString decomposition() const; + Decomposition decompositionTag() const; + int digitValue() const; + QChar toLower() const; + QChar toUpper() const; + QChar toTitleCase() const; + QChar toCaseFolded() const; + UnicodeVersion unicodeVersion() const; + char toAscii() const; + inline char toLatin1() const; + inline ushort unicode() const { return ucs; } + inline ushort &unicode() { return const_cast(ucs); } + static QChar fromAscii(char c); + static QChar fromLatin1(char c); + inline bool isNull() const { return ucs == 0; } + bool isPrint() const; + bool isPunct() const; + bool isSpace() const; + bool isMark() const; + bool isLetter() const; + bool isNumber() const; + bool isLetterOrNumber() const; + bool isDigit() const; + bool isSymbol() const; + inline bool isLower() const { return category() == Letter_Lowercase; } + inline bool isUpper() const { return category() == Letter_Uppercase; } + inline bool isTitleCase() const { return category() == Letter_Titlecase; } + inline bool isHighSurrogate() const { + return ((ucs & 0xfc00) == 0xd800); + } + inline bool isLowSurrogate() const { + return ((ucs & 0xfc00) == 0xdc00); + } + inline uchar cell() const { return uchar(ucs & 0xff); } + inline uchar row() const { return uchar((ucs>>8)&0xff); } + inline void setCell(uchar cell); + inline void setRow(uchar row); + static inline bool isHighSurrogate(uint ucs4) { + return ((ucs4 & 0xfffffc00) == 0xd800); + } + static inline bool isLowSurrogate(uint ucs4) { + return ((ucs4 & 0xfffffc00) == 0xdc00); + } + static inline bool requiresSurrogates(uint ucs4) { + return (ucs4 >= 0x10000); + } + static inline uint surrogateToUcs4(ushort high, ushort low) { + return (uint(high)<<10) + low - 0x35fdc00; + } + static inline uint surrogateToUcs4(QChar high, QChar low) { + return (uint(high.ucs)<<10) + low.ucs - 0x35fdc00; + } + static inline ushort highSurrogate(uint ucs4) { + return ushort((ucs4>>10) + 0xd7c0); + } + static inline ushort lowSurrogate(uint ucs4) { + return ushort(ucs4%0x400 + 0xdc00); + } + static Category category(uint ucs4); + static Category category(ushort ucs2); + static Direction direction(uint ucs4); + static Direction direction(ushort ucs2); + static Joining joining(uint ucs4); + static Joining joining(ushort ucs2); + static unsigned char combiningClass(uint ucs4); + static unsigned char combiningClass(ushort ucs2); + static uint mirroredChar(uint ucs4); + static ushort mirroredChar(ushort ucs2); + static Decomposition decompositionTag(uint ucs4); + static int digitValue(uint ucs4); + static int digitValue(ushort ucs2); + static uint toLower(uint ucs4); + static ushort toLower(ushort ucs2); + static uint toUpper(uint ucs4); + static ushort toUpper(ushort ucs2); + static uint toTitleCase(uint ucs4); + static ushort toTitleCase(ushort ucs2); + static uint toCaseFolded(uint ucs4); + static ushort toCaseFolded(ushort ucs2); + static UnicodeVersion unicodeVersion(uint ucs4); + static UnicodeVersion unicodeVersion(ushort ucs2); + static UnicodeVersion currentUnicodeVersion(); + static QString decomposition(uint ucs4); +private: + ushort ucs; +} +; +template<> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QChar)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QChar"; } }; +inline QChar::QChar() : ucs(0) {} +inline char QChar::toLatin1() const { return ucs > 0xff ? '\0' : char(ucs); } +inline QChar QChar::fromLatin1(char c) { return QChar(ushort(uchar(c))); } +inline QChar::QChar(uchar c, uchar r) : ucs(ushort((r << 8) | c)){} +inline QChar::QChar(short rc) : ucs(ushort(rc)){} +inline QChar::QChar(uint rc) : ucs(ushort(rc & 0xffff)){} +inline QChar::QChar(int rc) : ucs(ushort(rc & 0xffff)){} +inline QChar::QChar(SpecialCharacter s) : ucs(ushort(s)) {} +inline QChar::QChar(QLatin1Char ch) : ucs(ch.unicode()) {} +inline void QChar::setCell(uchar acell) +{ ucs = ushort((ucs & 0xff00) + acell); } +inline void QChar::setRow(uchar arow) +{ ucs = ushort((ushort(arow)<<8) + (ucs&0xff)); } +inline bool operator==(QChar c1, QChar c2) { return c1.unicode() == c2.unicode(); } +inline bool operator!=(QChar c1, QChar c2) { return c1.unicode() != c2.unicode(); } +inline bool operator<=(QChar c1, QChar c2) { return c1.unicode() <= c2.unicode(); } +inline bool operator>=(QChar c1, QChar c2) { return c1.unicode() >= c2.unicode(); } +inline bool operator<(QChar c1, QChar c2) { return c1.unicode() < c2.unicode(); } +inline bool operator>(QChar c1, QChar c2) { return c1.unicode() > c2.unicode(); } + QDataStream &operator<<(QDataStream &, const QChar &); + QDataStream &operator>>(QDataStream &, QChar &); +typedef QtValidLicenseForCoreModule QtCoreModule; +class QBasicAtomicInt +{ +public: + volatile int _q_value; + inline bool operator==(int value) const + { + return _q_value == value; + } + inline bool operator!=(int value) const + { + return _q_value != value; + } + inline bool operator!() const + { + return _q_value == 0; + } + inline operator int() const + { + return _q_value; + } + inline QBasicAtomicInt &operator=(int value) + { + _q_value = value; + return *this; + } + static bool isReferenceCountingNative(); + static bool isReferenceCountingWaitFree(); + bool ref(); + bool deref(); + static bool isTestAndSetNative(); + static bool isTestAndSetWaitFree(); + bool testAndSetRelaxed(int expectedValue, int newValue); + bool testAndSetAcquire(int expectedValue, int newValue); + bool testAndSetRelease(int expectedValue, int newValue); + bool testAndSetOrdered(int expectedValue, int newValue); + static bool isFetchAndStoreNative(); + static bool isFetchAndStoreWaitFree(); + int fetchAndStoreRelaxed(int newValue); + int fetchAndStoreAcquire(int newValue); + int fetchAndStoreRelease(int newValue); + int fetchAndStoreOrdered(int newValue); + static bool isFetchAndAddNative(); + static bool isFetchAndAddWaitFree(); + int fetchAndAddRelaxed(int valueToAdd); + int fetchAndAddAcquire(int valueToAdd); + int fetchAndAddRelease(int valueToAdd); + int fetchAndAddOrdered(int valueToAdd); +}; +template +class QBasicAtomicPointer +{ +public: + T * volatile _q_value; + inline bool operator==(T *value) const + { + return _q_value == value; + } + inline bool operator!=(T *value) const + { + return !operator==(value); + } + inline bool operator!() const + { + return operator==(0); + } + inline operator T *() const + { + return _q_value; + } + inline T *operator->() const + { + return _q_value; + } + inline QBasicAtomicPointer &operator=(T *value) + { + _q_value = value; + return *this; + } + static bool isTestAndSetNative(); + static bool isTestAndSetWaitFree(); + bool testAndSetRelaxed(T *expectedValue, T *newValue); + bool testAndSetAcquire(T *expectedValue, T *newValue); + bool testAndSetRelease(T *expectedValue, T *newValue); + bool testAndSetOrdered(T *expectedValue, T *newValue); + static bool isFetchAndStoreNative(); + static bool isFetchAndStoreWaitFree(); + T *fetchAndStoreRelaxed(T *newValue); + T *fetchAndStoreAcquire(T *newValue); + T *fetchAndStoreRelease(T *newValue); + T *fetchAndStoreOrdered(T *newValue); + static bool isFetchAndAddNative(); + static bool isFetchAndAddWaitFree(); + T *fetchAndAddRelaxed(qptrdiff valueToAdd); + T *fetchAndAddAcquire(qptrdiff valueToAdd); + T *fetchAndAddRelease(qptrdiff valueToAdd); + T *fetchAndAddOrdered(qptrdiff valueToAdd); +}; +inline bool QBasicAtomicInt::isReferenceCountingNative() +{ return true; } +inline bool QBasicAtomicInt::isReferenceCountingWaitFree() +{ return false; } +inline bool QBasicAtomicInt::isTestAndSetNative() +{ return true; } +inline bool QBasicAtomicInt::isTestAndSetWaitFree() +{ return false; } +inline bool QBasicAtomicInt::isFetchAndStoreNative() +{ return true; } +inline bool QBasicAtomicInt::isFetchAndStoreWaitFree() +{ return false; } +inline bool QBasicAtomicInt::isFetchAndAddNative() +{ return true; } +inline bool QBasicAtomicInt::isFetchAndAddWaitFree() +{ return false; } +template +inline bool QBasicAtomicPointer::isTestAndSetNative() +{ return true; } +template +inline bool QBasicAtomicPointer::isTestAndSetWaitFree() +{ return false; } +template +inline bool QBasicAtomicPointer::isFetchAndStoreNative() +{ return true; } +template +inline bool QBasicAtomicPointer::isFetchAndStoreWaitFree() +{ return false; } +template +inline bool QBasicAtomicPointer::isFetchAndAddNative() +{ return true; } +template +inline bool QBasicAtomicPointer::isFetchAndAddWaitFree() +{ return false; } +inline bool QBasicAtomicInt::ref() +{ + register int originalValue; + register int newValue; + asm volatile("lwarx %[originalValue]," "%y[_q_value]" "\n" + "addi %[newValue], %[originalValue], %[one]\n" + "stwcx. %[newValue]," "%y[_q_value]" "\n" + "bne- $-12\n" + : [originalValue] "=&b" (originalValue), + [newValue] "=&r" (newValue), + [_q_value] "+Z" (_q_value) + : + [one] "i" (1) + : "cc", "memory"); + return newValue != 0; +} +inline bool QBasicAtomicInt::deref() +{ + register int originalValue; + register int newValue; + asm volatile("lwarx %[originalValue]," "%y[_q_value]" "\n" + "addi %[newValue], %[originalValue], %[minusOne]\n" + "stwcx. %[newValue]," "%y[_q_value]" "\n" + "bne- $-12\n" + : [originalValue] "=&b" (originalValue), + [newValue] "=&r" (newValue), + [_q_value] "+Z" (_q_value) + : + [minusOne] "i" (-1) + : "cc", "memory"); + return newValue != 0; +} +inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue) +{ + register int result; + asm volatile("lwarx %[result]," "%y[_q_value]" "\n" + "xor. %[result], %[result], %[expectedValue]\n" + "bne $+12\n" + "stwcx. %[newValue]," "%y[_q_value]" "\n" + "bne- $-16\n" + : [result] "=&r" (result), + [_q_value] "+Z" (_q_value) + : + [expectedValue] "r" (expectedValue), + [newValue] "r" (newValue) + : "cc", "memory"); + return result == 0; +} +inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue) +{ + register int result; + asm volatile("lwarx %[result]," "%y[_q_value]" "\n" + "xor. %[result], %[result], %[expectedValue]\n" + "bne $+16\n" + "stwcx. %[newValue]," "%y[_q_value]" "\n" + "bne- $-16\n" + "isync\n" + : [result] "=&r" (result), + [_q_value] "+Z" (_q_value) + : + [expectedValue] "r" (expectedValue), + [newValue] "r" (newValue) + : "cc", "memory"); + return result == 0; +} +inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue) +{ + register int result; + asm volatile("eieio\n" + "lwarx %[result]," "%y[_q_value]" "\n" + "xor. %[result], %[result], %[expectedValue]\n" + "bne $+12\n" + "stwcx. %[newValue]," "%y[_q_value]" "\n" + "bne- $-16\n" + : [result] "=&r" (result), + [_q_value] "+Z" (_q_value) + : + [expectedValue] "r" (expectedValue), + [newValue] "r" (newValue) + : "cc", "memory"); + return result == 0; +} +inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue) +{ + register int originalValue; + asm volatile("lwarx %[originalValue]," "%y[_q_value]" "\n" + "stwcx. %[newValue]," "%y[_q_value]" "\n" + "bne- $-8\n" + : [originalValue] "=&r" (originalValue), + [_q_value] "+Z" (_q_value) + : + [newValue] "r" (newValue) + : "cc", "memory"); + return originalValue; +} +inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue) +{ + register int originalValue; + asm volatile("lwarx %[originalValue]," "%y[_q_value]" "\n" + "stwcx. %[newValue]," "%y[_q_value]" "\n" + "bne- $-8\n" + "isync\n" + : [originalValue] "=&r" (originalValue), + [_q_value] "+Z" (_q_value) + : + [newValue] "r" (newValue) + : "cc", "memory"); + return originalValue; +} +inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue) +{ + register int originalValue; + asm volatile("eieio\n" + "lwarx %[originalValue]," "%y[_q_value]" "\n" + "stwcx. %[newValue]," "%y[_q_value]" "\n" + "bne- $-8\n" + : [originalValue] "=&r" (originalValue), + [_q_value] "+Z" (_q_value) + : + [newValue] "r" (newValue) + : "cc", "memory"); + return originalValue; +} +inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd) +{ + register int originalValue; + register int newValue; + asm volatile("lwarx %[originalValue]," "%y[_q_value]" "\n" + "add %[newValue], %[originalValue], %[valueToAdd]\n" + "stwcx. %[newValue]," "%y[_q_value]" "\n" + "bne- $-12\n" + : [originalValue] "=&r" (originalValue), + [newValue] "=&r" (newValue), + [_q_value] "+Z" (_q_value) + : + [valueToAdd] "r" (valueToAdd) + : "cc", "memory"); + return originalValue; +} +inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd) +{ + register int originalValue; + register int newValue; + asm volatile("lwarx %[originalValue]," "%y[_q_value]" "\n" + "add %[newValue], %[originalValue], %[valueToAdd]\n" + "stwcx. %[newValue]," "%y[_q_value]" "\n" + "bne- $-12\n" + "isync\n" + : [originalValue] "=&r" (originalValue), + [newValue] "=&r" (newValue), + [_q_value] "+Z" (_q_value) + : + [valueToAdd] "r" (valueToAdd) + : "cc", "memory"); + return originalValue; +} +inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd) +{ + register int originalValue; + register int newValue; + asm volatile("eieio\n" + "lwarx %[originalValue]," "%y[_q_value]" "\n" + "add %[newValue], %[originalValue], %[valueToAdd]\n" + "stwcx. %[newValue]," "%y[_q_value]" "\n" + "bne- $-12\n" + : [originalValue] "=&r" (originalValue), + [newValue] "=&r" (newValue), + [_q_value] "+Z" (_q_value) + : + [valueToAdd] "r" (valueToAdd) + : "cc", "memory"); + return originalValue; +} +template +inline bool QBasicAtomicPointer::testAndSetRelaxed(T *expectedValue, T *newValue) +{ + register void *result; + asm volatile("ldarx"" %[result]," "%y[_q_value]" "\n" + "xor. %[result], %[result], %[expectedValue]\n" + "bne $+12\n" + "stdcx."" %[newValue]," "%y[_q_value]" "\n" + "bne- $-16\n" + : [result] "=&r" (result), + [_q_value] "+Z" (_q_value) + : + [expectedValue] "r" (expectedValue), + [newValue] "r" (newValue) + : "cc", "memory"); + return result == 0; +} +template +inline bool QBasicAtomicPointer::testAndSetAcquire(T *expectedValue, T *newValue) +{ + register void *result; + asm volatile("ldarx"" %[result]," "%y[_q_value]" "\n" + "xor. %[result], %[result], %[expectedValue]\n" + "bne $+16\n" + "stdcx."" %[newValue]," "%y[_q_value]" "\n" + "bne- $-16\n" + "isync\n" + : [result] "=&r" (result), + [_q_value] "+Z" (_q_value) + : + [expectedValue] "r" (expectedValue), + [newValue] "r" (newValue) + : "cc", "memory"); + return result == 0; +} +template +inline bool QBasicAtomicPointer::testAndSetRelease(T *expectedValue, T *newValue) +{ + register void *result; + asm volatile("eieio\n" + "ldarx"" %[result]," "%y[_q_value]" "\n" + "xor. %[result], %[result], %[expectedValue]\n" + "bne $+12\n" + "stdcx."" %[newValue]," "%y[_q_value]" "\n" + "bne- $-16\n" + : [result] "=&r" (result), + [_q_value] "+Z" (_q_value) + : + [expectedValue] "r" (expectedValue), + [newValue] "r" (newValue) + : "cc", "memory"); + return result == 0; +} +template +inline T *QBasicAtomicPointer::fetchAndStoreRelaxed(T *newValue) +{ + register T *originalValue; + asm volatile("ldarx"" %[originalValue]," "%y[_q_value]" "\n" + "stdcx."" %[newValue]," "%y[_q_value]" "\n" + "bne- $-8\n" + : [originalValue] "=&r" (originalValue), + [_q_value] "+Z" (_q_value) + : + [newValue] "r" (newValue) + : "cc", "memory"); + return originalValue; +} +template +inline T *QBasicAtomicPointer::fetchAndStoreAcquire(T *newValue) +{ + register T *originalValue; + asm volatile("ldarx"" %[originalValue]," "%y[_q_value]" "\n" + "stdcx."" %[newValue]," "%y[_q_value]" "\n" + "bne- $-8\n" + "isync\n" + : [originalValue] "=&r" (originalValue), + [_q_value] "+Z" (_q_value) + : + [newValue] "r" (newValue) + : "cc", "memory"); + return originalValue; +} +template +inline T *QBasicAtomicPointer::fetchAndStoreRelease(T *newValue) +{ + register T *originalValue; + asm volatile("eieio\n" + "ldarx"" %[originalValue]," "%y[_q_value]" "\n" + "stdcx."" %[newValue]," "%y[_q_value]" "\n" + "bne- $-8\n" + : [originalValue] "=&r" (originalValue), + [_q_value] "+Z" (_q_value) + : + [newValue] "r" (newValue) + : "cc", "memory"); + return originalValue; +} +template +inline T *QBasicAtomicPointer::fetchAndAddRelaxed(qptrdiff valueToAdd) +{ + register T *originalValue; + register T *newValue; + asm volatile("ldarx"" %[originalValue]," "%y[_q_value]" "\n" + "add %[newValue], %[originalValue], %[valueToAdd]\n" + "stdcx."" %[newValue]," "%y[_q_value]" "\n" + "bne- $-12\n" + : [originalValue] "=&r" (originalValue), + [newValue] "=&r" (newValue), + [_q_value] "+Z" (_q_value) + : + [valueToAdd] "r" (valueToAdd * sizeof(T)) + : "cc", "memory"); + return originalValue; +} +template +inline T *QBasicAtomicPointer::fetchAndAddAcquire(qptrdiff valueToAdd) +{ + register T *originalValue; + register T *newValue; + asm volatile("ldarx"" %[originalValue]," "%y[_q_value]" "\n" + "add %[newValue], %[originalValue], %[valueToAdd]\n" + "stdcx."" %[newValue]," "%y[_q_value]" "\n" + "bne- $-12\n" + "isync\n" + : [originalValue] "=&r" (originalValue), + [newValue] "=&r" (newValue), + [_q_value] "+Z" (_q_value) + : + [valueToAdd] "r" (valueToAdd * sizeof(T)) + : "cc", "memory"); + return originalValue; +} +template +inline T *QBasicAtomicPointer::fetchAndAddRelease(qptrdiff valueToAdd) +{ + register T *originalValue; + register T *newValue; + asm volatile("eieio\n" + "ldarx"" %[originalValue]," "%y[_q_value]" "\n" + "add %[newValue], %[originalValue], %[valueToAdd]\n" + "stdcx."" %[newValue]," "%y[_q_value]" "\n" + "bne- $-12\n" + : [originalValue] "=&r" (originalValue), + [newValue] "=&r" (newValue), + [_q_value] "+Z" (_q_value) + : + [valueToAdd] "r" (valueToAdd * sizeof(T)) + : "cc", "memory"); + return originalValue; +} +inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue) +{ + return testAndSetAcquire(expectedValue, newValue); +} +inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue) +{ + return fetchAndStoreAcquire(newValue); +} +inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd) +{ + return fetchAndAddAcquire(valueToAdd); +} +template +inline bool QBasicAtomicPointer::testAndSetOrdered(T *expectedValue, T *newValue) +{ + return testAndSetAcquire(expectedValue, newValue); +} +template +inline T *QBasicAtomicPointer::fetchAndStoreOrdered(T *newValue) +{ + return fetchAndStoreAcquire(newValue); +} +template +inline T *QBasicAtomicPointer::fetchAndAddOrdered(qptrdiff valueToAdd) +{ + return fetchAndAddAcquire(valueToAdd); +} +typedef QtValidLicenseForCoreModule QtCoreModule; +class QAtomicInt : public QBasicAtomicInt +{ +public: + inline QAtomicInt(int value = 0) + { + _q_value = value; + } + inline QAtomicInt(const QAtomicInt &other) + { + _q_value = other._q_value; + } + inline QAtomicInt &operator=(int value) + { + (void) QBasicAtomicInt::operator=(value); + return *this; + } + inline QAtomicInt &operator=(const QAtomicInt &other) + { + (void) QBasicAtomicInt::operator=(other); + return *this; + } +}; +template +class QAtomicPointer : public QBasicAtomicPointer +{ +public: + inline QAtomicPointer(T *value = 0) + { + QBasicAtomicPointer::_q_value = value; + } + inline QAtomicPointer(const QAtomicPointer &other) + { + QBasicAtomicPointer::_q_value = other._q_value; + } + inline QAtomicPointer &operator=(T *value) + { + (void) QBasicAtomicPointer::operator=(value); + return *this; + } + inline QAtomicPointer &operator=(const QAtomicPointer &other) + { + (void) QBasicAtomicPointer::operator=(other); + return *this; + } +}; +template +inline void qAtomicAssign(T *&d, T *x) +{ + if (d == x) + return; + x->ref.ref(); + if (!d->ref.deref()) + delete d; + d = x; +} +template +inline void qAtomicDetach(T *&d) +{ + if (d->ref == 1) + return; + T *x = d; + d = new T(*d); + if (!x->ref.deref()) + delete x; +} +extern "C" { +extern void *memcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void *memmove (void *__dest, __const void *__src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, + int __c, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1))); +extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern "C++" +{ +extern void *memchr (void *__s, int __c, size_t __n) + throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const void *memchr (__const void *__s, int __c, size_t __n) + throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +memchr (void *__s, int __c, size_t __n) throw () +{ + return __builtin_memchr (__s, __c, __n); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const void * +memchr (__const void *__s, int __c, size_t __n) throw () +{ + return __builtin_memchr (__s, __c, __n); +} +} +extern "C++" void *rawmemchr (void *__s, int __c) + throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" __const void *rawmemchr (__const void *__s, int __c) + throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" void *memrchr (void *__s, int __c, size_t __n) + throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" __const void *memrchr (__const void *__s, int __c, size_t __n) + throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *strncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *strcat (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *strncat (char *__restrict __dest, __const char *__restrict __src, + size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); +extern int strcmp (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern int strcoll (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern size_t strxfrm (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (2))); +extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); +extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, + __locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4))); +extern char *strdup (__const char *__s) + throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); +extern char *strndup (__const char *__string, size_t __n) + throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); +extern "C++" +{ +extern char *strchr (char *__s, int __c) + throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *strchr (__const char *__s, int __c) + throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strchr (char *__s, int __c) throw () +{ + return __builtin_strchr (__s, __c); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +strchr (__const char *__s, int __c) throw () +{ + return __builtin_strchr (__s, __c); +} +} +extern "C++" +{ +extern char *strrchr (char *__s, int __c) + throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *strrchr (__const char *__s, int __c) + throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strrchr (char *__s, int __c) throw () +{ + return __builtin_strrchr (__s, __c); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +strrchr (__const char *__s, int __c) throw () +{ + return __builtin_strrchr (__s, __c); +} +} +extern "C++" char *strchrnul (char *__s, int __c) + throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern "C++" __const char *strchrnul (__const char *__s, int __c) + throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern size_t strcspn (__const char *__s, __const char *__reject) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern size_t strspn (__const char *__s, __const char *__accept) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern "C++" +{ +extern char *strpbrk (char *__s, __const char *__accept) + throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern __const char *strpbrk (__const char *__s, __const char *__accept) + throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strpbrk (char *__s, __const char *__accept) throw () +{ + return __builtin_strpbrk (__s, __accept); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +strpbrk (__const char *__s, __const char *__accept) throw () +{ + return __builtin_strpbrk (__s, __accept); +} +} +extern "C++" +{ +extern char *strstr (char *__haystack, __const char *__needle) + throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern __const char *strstr (__const char *__haystack, + __const char *__needle) + throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +strstr (char *__haystack, __const char *__needle) throw () +{ + return __builtin_strstr (__haystack, __needle); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +strstr (__const char *__haystack, __const char *__needle) throw () +{ + return __builtin_strstr (__haystack, __needle); +} +} +extern char *strtok (char *__restrict __s, __const char *__restrict __delim) + throw () __attribute__ ((__nonnull__ (2))); +extern char *__strtok_r (char *__restrict __s, + __const char *__restrict __delim, + char **__restrict __save_ptr) + throw () __attribute__ ((__nonnull__ (2, 3))); +extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, + char **__restrict __save_ptr) + throw () __attribute__ ((__nonnull__ (2, 3))); +extern "C++" char *strcasestr (char *__haystack, __const char *__needle) + throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern "C++" __const char *strcasestr (__const char *__haystack, + __const char *__needle) + throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern void *memmem (__const void *__haystack, size_t __haystacklen, + __const void *__needle, size_t __needlelen) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); +extern void *__mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void *mempcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern size_t strlen (__const char *__s) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern size_t strnlen (__const char *__string, size_t __maxlen) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern char *strerror (int __errnum) throw (); +extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) + throw () __attribute__ ((__nonnull__ (2))); +extern char *strerror_l (int __errnum, __locale_t __l) throw (); +extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); +extern void bcopy (__const void *__src, void *__dest, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); +extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern "C++" +{ +extern char *index (char *__s, int __c) + throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *index (__const char *__s, int __c) + throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +index (char *__s, int __c) throw () +{ + return __builtin_index (__s, __c); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +index (__const char *__s, int __c) throw () +{ + return __builtin_index (__s, __c); +} +} +extern "C++" +{ +extern char *rindex (char *__s, int __c) + throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __const char *rindex (__const char *__s, int __c) + throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +rindex (char *__s, int __c) throw () +{ + return __builtin_rindex (__s, __c); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __const char * +rindex (__const char *__s, int __c) throw () +{ + return __builtin_rindex (__s, __c); +} +} +extern int ffs (int __i) throw () __attribute__ ((__const__)); +extern int ffsl (long int __l) throw () __attribute__ ((__const__)); +__extension__ extern int ffsll (long long int __ll) + throw () __attribute__ ((__const__)); +extern int strcasecmp (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern int strcasecmp_l (__const char *__s1, __const char *__s2, + __locale_t __loc) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); +extern int strncasecmp_l (__const char *__s1, __const char *__s2, + size_t __n, __locale_t __loc) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); +extern char *strsep (char **__restrict __stringp, + __const char *__restrict __delim) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *strsignal (int __sig) throw (); +extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *__stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern char *stpncpy (char *__restrict __dest, + __const char *__restrict __src, size_t __n) + throw () __attribute__ ((__nonnull__ (1, 2))); +extern int strverscmp (__const char *__s1, __const char *__s2) + throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); +extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1))); +extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); +extern "C++" char *basename (char *__filename) + throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); +extern "C++" __const char *basename (__const char *__filename) + throw () __asm ("basename") __attribute__ ((__nonnull__ (1))); +extern void __warn_memset_zero_len (void) __attribute__((__warning__ ("memset used with constant zero length parameter; this could be due to transposed parameters"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +__attribute__ ((__leaf__)) memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) throw () +{ + return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +__attribute__ ((__leaf__)) memmove (void *__dest, __const void *__src, size_t __len) throw () +{ + return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +__attribute__ ((__leaf__)) mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) throw () +{ + return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void * +__attribute__ ((__leaf__)) memset (void *__dest, int __ch, size_t __len) throw () +{ + if (__builtin_constant_p (__len) && __len == 0 + && (!__builtin_constant_p (__ch) || __ch != 0)) + { + __warn_memset_zero_len (); + return __dest; + } + return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void +__attribute__ ((__leaf__)) bcopy (__const void *__src, void *__dest, size_t __len) throw () +{ + (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) void +__attribute__ ((__leaf__)) bzero (void *__dest, size_t __len) throw () +{ + (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__leaf__)) strcpy (char *__restrict __dest, __const char *__restrict __src) throw () +{ + return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__leaf__)) stpcpy (char *__restrict __dest, __const char *__restrict __src) throw () +{ + return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__leaf__)) strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __len) throw () +{ + return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); +} +extern char *__stpncpy_chk (char *__dest, __const char *__src, size_t __n, + size_t __destlen) throw (); +extern char *__stpncpy_alias (char *__dest, __const char *__src, size_t __n) throw () __asm__ ("" "stpncpy") + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__leaf__)) stpncpy (char *__dest, __const char *__src, size_t __n) throw () +{ + if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1 + && (!__builtin_constant_p (__n) || __n <= __builtin_object_size (__dest, 2 > 1))) + return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1)); + return __stpncpy_alias (__dest, __src, __n); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__leaf__)) strcat (char *__restrict __dest, __const char *__restrict __src) throw () +{ + return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1)); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) char * +__attribute__ ((__leaf__)) strncat (char *__restrict __dest, __const char *__restrict __src, size_t __len) throw () +{ + return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1)); +} +} +typedef __gnuc_va_list va_list; +typedef QtValidLicenseForCoreModule QtCoreModule; + char *qstrdup(const char *); +inline uint qstrlen(const char *str) +{ return str ? uint(strlen(str)) : 0; } +inline uint qstrnlen(const char *str, uint maxlen) +{ + uint length = 0; + if (str) { + while (length < maxlen && *str++) + length++; + } + return length; +} + char *qstrcpy(char *dst, const char *src); + char *qstrncpy(char *dst, const char *src, uint len); + int qstrcmp(const char *str1, const char *str2); + int qstrcmp(const QByteArray &str1, const QByteArray &str2); + int qstrcmp(const QByteArray &str1, const char *str2); +static inline int qstrcmp(const char *str1, const QByteArray &str2) +{ return -qstrcmp(str2, str1); } +inline int qstrncmp(const char *str1, const char *str2, uint len) +{ + return (str1 && str2) ? strncmp(str1, str2, len) + : (str1 ? 1 : (str2 ? -1 : 0)); +} + int qstricmp(const char *, const char *); + int qstrnicmp(const char *, const char *, uint len); + int qvsnprintf(char *str, size_t n, const char *fmt, va_list ap); + int qsnprintf(char *str, size_t n, const char *fmt, ...); + quint16 qChecksum(const char *s, uint len); +class QByteRef; +class QString; +class QDataStream; +template class QList; +class QByteArray +{ +private: + struct Data { + QBasicAtomicInt ref; + int alloc, size; + char *data; + char array[1]; + }; +public: + inline QByteArray(); + QByteArray(const char *); + QByteArray(const char *, int size); + QByteArray(int size, char c); + QByteArray(int size, Qt::Initialization); + inline QByteArray(const QByteArray &); + inline ~QByteArray(); + QByteArray &operator=(const QByteArray &); + QByteArray &operator=(const char *str); + inline void swap(QByteArray &other) { qSwap(d, other.d); } + inline int size() const; + bool isEmpty() const; + void resize(int size); + QByteArray &fill(char c, int size = -1); + int capacity() const; + void reserve(int size); + void squeeze(); + operator const char *() const; + operator const void *() const; + char *data(); + const char *data() const; + inline const char *constData() const; + inline void detach(); + bool isDetached() const; + inline bool isSharedWith(const QByteArray &other) const { return d == other.d; } + void clear(); + char at(int i) const; + char operator[](int i) const; + char operator[](uint i) const; + QByteRef operator[](int i); + QByteRef operator[](uint i); + int indexOf(char c, int from = 0) const; + int indexOf(const char *c, int from = 0) const; + int indexOf(const QByteArray &a, int from = 0) const; + int lastIndexOf(char c, int from = -1) const; + int lastIndexOf(const char *c, int from = -1) const; + int lastIndexOf(const QByteArray &a, int from = -1) const; + QBool contains(char c) const; + QBool contains(const char *a) const; + QBool contains(const QByteArray &a) const; + int count(char c) const; + int count(const char *a) const; + int count(const QByteArray &a) const; + QByteArray left(int len) const; + QByteArray right(int len) const; + QByteArray mid(int index, int len = -1) const; + bool startsWith(const QByteArray &a) const; + bool startsWith(char c) const; + bool startsWith(const char *c) const; + bool endsWith(const QByteArray &a) const; + bool endsWith(char c) const; + bool endsWith(const char *c) const; + void truncate(int pos); + void chop(int n); + QByteArray toLower() const; + QByteArray toUpper() const; + QByteArray trimmed() const; + QByteArray simplified() const; + QByteArray leftJustified(int width, char fill = ' ', bool truncate = false) const; + QByteArray rightJustified(int width, char fill = ' ', bool truncate = false) const; + QByteArray &prepend(char c); + QByteArray &prepend(const char *s); + QByteArray &prepend(const char *s, int len); + QByteArray &prepend(const QByteArray &a); + QByteArray &append(char c); + QByteArray &append(const char *s); + QByteArray &append(const char *s, int len); + QByteArray &append(const QByteArray &a); + QByteArray &insert(int i, char c); + QByteArray &insert(int i, const char *s); + QByteArray &insert(int i, const char *s, int len); + QByteArray &insert(int i, const QByteArray &a); + QByteArray &remove(int index, int len); + QByteArray &replace(int index, int len, const char *s); + QByteArray &replace(int index, int len, const char *s, int alen); + QByteArray &replace(int index, int len, const QByteArray &s); + QByteArray &replace(char before, const char *after); + QByteArray &replace(char before, const QByteArray &after); + QByteArray &replace(const char *before, const char *after); + QByteArray &replace(const char *before, int bsize, const char *after, int asize); + QByteArray &replace(const QByteArray &before, const QByteArray &after); + QByteArray &replace(const QByteArray &before, const char *after); + QByteArray &replace(const char *before, const QByteArray &after); + QByteArray &replace(char before, char after); + QByteArray &operator+=(char c); + QByteArray &operator+=(const char *s); + QByteArray &operator+=(const QByteArray &a); + QList split(char sep) const; + QByteArray repeated(int times) const; + QByteArray &append(const QString &s); + QByteArray &insert(int i, const QString &s); + QByteArray &replace(const QString &before, const char *after); + QByteArray &replace(char c, const QString &after); + QByteArray &replace(const QString &before, const QByteArray &after); + QByteArray &operator+=(const QString &s); + int indexOf(const QString &s, int from = 0) const; + int lastIndexOf(const QString &s, int from = -1) const; + inline bool operator==(const QString &s2) const; + inline bool operator!=(const QString &s2) const; + inline bool operator<(const QString &s2) const; + inline bool operator>(const QString &s2) const; + inline bool operator<=(const QString &s2) const; + inline bool operator>=(const QString &s2) const; + short toShort(bool *ok = 0, int base = 10) const; + ushort toUShort(bool *ok = 0, int base = 10) const; + int toInt(bool *ok = 0, int base = 10) const; + uint toUInt(bool *ok = 0, int base = 10) const; + long toLong(bool *ok = 0, int base = 10) const; + ulong toULong(bool *ok = 0, int base = 10) const; + qlonglong toLongLong(bool *ok = 0, int base = 10) const; + qulonglong toULongLong(bool *ok = 0, int base = 10) const; + float toFloat(bool *ok = 0) const; + double toDouble(bool *ok = 0) const; + QByteArray toBase64() const; + QByteArray toHex() const; + QByteArray toPercentEncoding(const QByteArray &exclude = QByteArray(), + const QByteArray &include = QByteArray(), + char percent = '%') const; + QByteArray &setNum(short, int base = 10); + QByteArray &setNum(ushort, int base = 10); + QByteArray &setNum(int, int base = 10); + QByteArray &setNum(uint, int base = 10); + QByteArray &setNum(qlonglong, int base = 10); + QByteArray &setNum(qulonglong, int base = 10); + QByteArray &setNum(float, char f = 'g', int prec = 6); + QByteArray &setNum(double, char f = 'g', int prec = 6); + QByteArray &setRawData(const char *a, uint n); + static QByteArray number(int, int base = 10); + static QByteArray number(uint, int base = 10); + static QByteArray number(qlonglong, int base = 10); + static QByteArray number(qulonglong, int base = 10); + static QByteArray number(double, char f = 'g', int prec = 6); + static QByteArray fromRawData(const char *, int size); + static QByteArray fromBase64(const QByteArray &base64); + static QByteArray fromHex(const QByteArray &hexEncoded); + static QByteArray fromPercentEncoding(const QByteArray &pctEncoded, char percent = '%'); + typedef char *iterator; + typedef const char *const_iterator; + typedef iterator Iterator; + typedef const_iterator ConstIterator; + iterator begin(); + const_iterator begin() const; + const_iterator constBegin() const; + iterator end(); + const_iterator end() const; + const_iterator constEnd() const; + typedef const char & const_reference; + typedef char & reference; + typedef char value_type; + void push_back(char c); + void push_back(const char *c); + void push_back(const QByteArray &a); + void push_front(char c); + void push_front(const char *c); + void push_front(const QByteArray &a); + inline int count() const { return d->size; } + int length() const { return d->size; } + bool isNull() const; +private: + operator QNoImplicitBoolCast() const; + static Data shared_null; + static Data shared_empty; + Data *d; + QByteArray(Data *dd, int , int ) : d(dd) {} + void realloc(int alloc); + void expand(int i); + QByteArray nulTerminated() const; + friend class QByteRef; + friend class QString; + friend QByteArray qUncompress(const uchar *data, int nbytes); +public: + typedef Data * DataPtr; + inline DataPtr &data_ptr() { return d; } +}; +inline QByteArray::QByteArray(): d(&shared_null) { d->ref.ref(); } +inline QByteArray::~QByteArray() { if (!d->ref.deref()) qFree(d); } +inline int QByteArray::size() const +{ return d->size; } +inline char QByteArray::at(int i) const +{ qt_noop(); return d->data[i]; } +inline char QByteArray::operator[](int i) const +{ qt_noop(); return d->data[i]; } +inline char QByteArray::operator[](uint i) const +{ qt_noop(); return d->data[i]; } +inline bool QByteArray::isEmpty() const +{ return d->size == 0; } +inline QByteArray::operator const char *() const +{ return d->data; } +inline QByteArray::operator const void *() const +{ return d->data; } +inline char *QByteArray::data() +{ detach(); return d->data; } +inline const char *QByteArray::data() const +{ return d->data; } +inline const char *QByteArray::constData() const +{ return d->data; } +inline void QByteArray::detach() +{ if (d->ref != 1 || d->data != d->array) realloc(d->size); } +inline bool QByteArray::isDetached() const +{ return d->ref == 1; } +inline QByteArray::QByteArray(const QByteArray &a) : d(a.d) +{ d->ref.ref(); } +inline int QByteArray::capacity() const +{ return d->alloc; } +inline void QByteArray::reserve(int asize) +{ if (d->ref != 1 || asize > d->alloc) realloc(asize); } +inline void QByteArray::squeeze() +{ if (d->size < d->alloc) realloc(d->size); } +class QByteRef { + QByteArray &a; + int i; + inline QByteRef(QByteArray &array, int idx) + : a(array),i(idx) {} + friend class QByteArray; +public: + inline operator char() const + { return i < a.d->size ? a.d->data[i] : char(0); } + inline QByteRef &operator=(char c) + { if (i >= a.d->size) a.expand(i); else a.detach(); + a.d->data[i] = c; return *this; } + inline QByteRef &operator=(const QByteRef &c) + { if (i >= a.d->size) a.expand(i); else a.detach(); + a.d->data[i] = c.a.d->data[c.i]; return *this; } + inline bool operator==(char c) const + { return a.d->data[i] == c; } + inline bool operator!=(char c) const + { return a.d->data[i] != c; } + inline bool operator>(char c) const + { return a.d->data[i] > c; } + inline bool operator>=(char c) const + { return a.d->data[i] >= c; } + inline bool operator<(char c) const + { return a.d->data[i] < c; } + inline bool operator<=(char c) const + { return a.d->data[i] <= c; } +}; +inline QByteRef QByteArray::operator[](int i) +{ qt_noop(); return QByteRef(*this, i); } +inline QByteRef QByteArray::operator[](uint i) +{ return QByteRef(*this, i); } +inline QByteArray::iterator QByteArray::begin() +{ detach(); return d->data; } +inline QByteArray::const_iterator QByteArray::begin() const +{ return d->data; } +inline QByteArray::const_iterator QByteArray::constBegin() const +{ return d->data; } +inline QByteArray::iterator QByteArray::end() +{ detach(); return d->data + d->size; } +inline QByteArray::const_iterator QByteArray::end() const +{ return d->data + d->size; } +inline QByteArray::const_iterator QByteArray::constEnd() const +{ return d->data + d->size; } +inline QByteArray &QByteArray::operator+=(char c) +{ return append(c); } +inline QByteArray &QByteArray::operator+=(const char *s) +{ return append(s); } +inline QByteArray &QByteArray::operator+=(const QByteArray &a) +{ return append(a); } +inline void QByteArray::push_back(char c) +{ append(c); } +inline void QByteArray::push_back(const char *c) +{ append(c); } +inline void QByteArray::push_back(const QByteArray &a) +{ append(a); } +inline void QByteArray::push_front(char c) +{ prepend(c); } +inline void QByteArray::push_front(const char *c) +{ prepend(c); } +inline void QByteArray::push_front(const QByteArray &a) +{ prepend(a); } +inline QBool QByteArray::contains(const QByteArray &a) const +{ return QBool(indexOf(a) != -1); } +inline QBool QByteArray::contains(char c) const +{ return QBool(indexOf(c) != -1); } +inline bool operator==(const QByteArray &a1, const QByteArray &a2) +{ return (a1.size() == a2.size()) && (memcmp(a1.constData(), a2.constData(), a1.size())==0); } +inline bool operator==(const QByteArray &a1, const char *a2) +{ return a2 ? qstrcmp(a1,a2) == 0 : a1.isEmpty(); } +inline bool operator==(const char *a1, const QByteArray &a2) +{ return a1 ? qstrcmp(a1,a2) == 0 : a2.isEmpty(); } +inline bool operator!=(const QByteArray &a1, const QByteArray &a2) +{ return !(a1==a2); } +inline bool operator!=(const QByteArray &a1, const char *a2) +{ return a2 ? qstrcmp(a1,a2) != 0 : !a1.isEmpty(); } +inline bool operator!=(const char *a1, const QByteArray &a2) +{ return a1 ? qstrcmp(a1,a2) != 0 : !a2.isEmpty(); } +inline bool operator<(const QByteArray &a1, const QByteArray &a2) +{ return qstrcmp(a1, a2) < 0; } + inline bool operator<(const QByteArray &a1, const char *a2) +{ return qstrcmp(a1, a2) < 0; } +inline bool operator<(const char *a1, const QByteArray &a2) +{ return qstrcmp(a1, a2) < 0; } +inline bool operator<=(const QByteArray &a1, const QByteArray &a2) +{ return qstrcmp(a1, a2) <= 0; } +inline bool operator<=(const QByteArray &a1, const char *a2) +{ return qstrcmp(a1, a2) <= 0; } +inline bool operator<=(const char *a1, const QByteArray &a2) +{ return qstrcmp(a1, a2) <= 0; } +inline bool operator>(const QByteArray &a1, const QByteArray &a2) +{ return qstrcmp(a1, a2) > 0; } +inline bool operator>(const QByteArray &a1, const char *a2) +{ return qstrcmp(a1, a2) > 0; } +inline bool operator>(const char *a1, const QByteArray &a2) +{ return qstrcmp(a1, a2) > 0; } +inline bool operator>=(const QByteArray &a1, const QByteArray &a2) +{ return qstrcmp(a1, a2) >= 0; } +inline bool operator>=(const QByteArray &a1, const char *a2) +{ return qstrcmp(a1, a2) >= 0; } +inline bool operator>=(const char *a1, const QByteArray &a2) +{ return qstrcmp(a1, a2) >= 0; } +inline const QByteArray operator+(const QByteArray &a1, const QByteArray &a2) +{ return QByteArray(a1) += a2; } +inline const QByteArray operator+(const QByteArray &a1, const char *a2) +{ return QByteArray(a1) += a2; } +inline const QByteArray operator+(const QByteArray &a1, char a2) +{ return QByteArray(a1) += a2; } +inline const QByteArray operator+(const char *a1, const QByteArray &a2) +{ return QByteArray(a1) += a2; } +inline const QByteArray operator+(char a1, const QByteArray &a2) +{ return QByteArray(&a1, 1) += a2; } +inline QBool QByteArray::contains(const char *c) const +{ return QBool(indexOf(c) != -1); } +inline QByteArray &QByteArray::replace(char before, const char *c) +{ return replace(&before, 1, c, qstrlen(c)); } +inline QByteArray &QByteArray::replace(const QByteArray &before, const char *c) +{ return replace(before.constData(), before.size(), c, qstrlen(c)); } +inline QByteArray &QByteArray::replace(const char *before, const char *after) +{ return replace(before, qstrlen(before), after, qstrlen(after)); } +inline QByteArray &QByteArray::setNum(short n, int base) +{ return setNum(qlonglong(n), base); } +inline QByteArray &QByteArray::setNum(ushort n, int base) +{ return setNum(qulonglong(n), base); } +inline QByteArray &QByteArray::setNum(int n, int base) +{ return setNum(qlonglong(n), base); } +inline QByteArray &QByteArray::setNum(uint n, int base) +{ return setNum(qulonglong(n), base); } +inline QByteArray &QByteArray::setNum(float n, char f, int prec) +{ return setNum(double(n),f,prec); } + QDataStream &operator<<(QDataStream &, const QByteArray &); + QDataStream &operator>>(QDataStream &, QByteArray &); + QByteArray qCompress(const uchar* data, int nbytes, int compressionLevel = -1); + QByteArray qUncompress(const uchar* data, int nbytes); +inline QByteArray qCompress(const QByteArray& data, int compressionLevel = -1) +{ return qCompress(reinterpret_cast(data.constData()), data.size(), compressionLevel); } +inline QByteArray qUncompress(const QByteArray& data) +{ return qUncompress(reinterpret_cast(data.constData()), data.size()); } +template<> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QByteArray)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QByteArray"; } }; +template <> inline bool qIsDetached(QByteArray &t) { return t.isDetached(); } template <> inline void qSwap(QByteArray &value1, QByteArray &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } namespace std { template<> inline void swap< ::QByteArray>(::QByteArray &value1, ::QByteArray &value2) { swap(value1.data_ptr(), value2.data_ptr()); } } +typedef std::basic_string QStdWString; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QCharRef; +class QRegExp; +class QStringList; +class QTextCodec; +class QLatin1String; +class QStringRef; +template class QVector; +class QString +{ +public: + inline QString(); + QString(const QChar *unicode, int size); + explicit QString(const QChar *unicode); + QString(QChar c); + QString(int size, QChar c); + inline QString(const QLatin1String &latin1); + inline QString(const QString &); + inline ~QString(); + QString &operator=(QChar c); + QString &operator=(const QString &); + inline QString &operator=(const QLatin1String &); + inline void swap(QString &other) { qSwap(d, other.d); } + inline int size() const { return d->size; } + inline int count() const { return d->size; } + inline int length() const; + inline bool isEmpty() const; + void resize(int size); + QString &fill(QChar c, int size = -1); + void truncate(int pos); + void chop(int n); + int capacity() const; + inline void reserve(int size); + inline void squeeze() { if (d->size < d->alloc || d->ref != 1) realloc(); d->capacity = 0;} + inline const QChar *unicode() const; + inline QChar *data(); + inline const QChar *data() const; + inline const QChar *constData() const; + inline void detach(); + inline bool isDetached() const; + inline bool isSharedWith(const QString &other) const { return d == other.d; } + void clear(); + inline const QChar at(int i) const; + const QChar operator[](int i) const; + QCharRef operator[](int i); + const QChar operator[](uint i) const; + QCharRef operator[](uint i); + QString arg(qlonglong a, int fieldwidth=0, int base=10, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(qulonglong a, int fieldwidth=0, int base=10, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(long a, int fieldwidth=0, int base=10, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(ulong a, int fieldwidth=0, int base=10, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(int a, int fieldWidth = 0, int base = 10, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(uint a, int fieldWidth = 0, int base = 10, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(short a, int fieldWidth = 0, int base = 10, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(ushort a, int fieldWidth = 0, int base = 10, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(double a, int fieldWidth = 0, char fmt = 'g', int prec = -1, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(char a, int fieldWidth = 0, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(QChar a, int fieldWidth = 0, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a, int fieldWidth = 0, + const QChar &fillChar = QLatin1Char(' ')) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a1, const QString &a2) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a1, const QString &a2, const QString &a3) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5, const QString &a6) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5, const QString &a6, + const QString &a7) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5, const QString &a6, + const QString &a7, const QString &a8) const __attribute__ ((warn_unused_result)); + QString arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5, const QString &a6, + const QString &a7, const QString &a8, const QString &a9) const __attribute__ ((warn_unused_result)); + QString &vsprintf(const char *format, va_list ap) + __attribute__ ((format (printf, 2, 0))) + ; + QString &sprintf(const char *format, ...) + __attribute__ ((format (printf, 2, 3))) + ; + int indexOf(QChar c, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int indexOf(const QString &s, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int indexOf(const QLatin1String &s, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int indexOf(const QStringRef &s, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int lastIndexOf(QChar c, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int lastIndexOf(const QString &s, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int lastIndexOf(const QLatin1String &s, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int lastIndexOf(const QStringRef &s, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + inline QBool contains(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + inline QBool contains(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + inline QBool contains(const QStringRef &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int count(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int count(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int count(const QStringRef &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int indexOf(const QRegExp &, int from = 0) const; + int lastIndexOf(const QRegExp &, int from = -1) const; + inline QBool contains(const QRegExp &rx) const { return QBool(indexOf(rx) != -1); } + int count(const QRegExp &) const; + int indexOf(QRegExp &, int from = 0) const; + int lastIndexOf(QRegExp &, int from = -1) const; + inline QBool contains(QRegExp &rx) const { return QBool(indexOf(rx) != -1); } + enum SectionFlag { + SectionDefault = 0x00, + SectionSkipEmpty = 0x01, + SectionIncludeLeadingSep = 0x02, + SectionIncludeTrailingSep = 0x04, + SectionCaseInsensitiveSeps = 0x08 + }; + typedef QFlags SectionFlags; + QString section(QChar sep, int start, int end = -1, SectionFlags flags = SectionDefault) const; + QString section(const QString &in_sep, int start, int end = -1, SectionFlags flags = SectionDefault) const; + QString section(const QRegExp ®, int start, int end = -1, SectionFlags flags = SectionDefault) const; + QString left(int n) const __attribute__ ((warn_unused_result)); + QString right(int n) const __attribute__ ((warn_unused_result)); + QString mid(int position, int n = -1) const __attribute__ ((warn_unused_result)); + QStringRef leftRef(int n) const __attribute__ ((warn_unused_result)); + QStringRef rightRef(int n) const __attribute__ ((warn_unused_result)); + QStringRef midRef(int position, int n = -1) const __attribute__ ((warn_unused_result)); + bool startsWith(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool startsWith(const QStringRef &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool startsWith(const QLatin1String &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool startsWith(const QChar &c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool endsWith(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool endsWith(const QStringRef &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool endsWith(const QLatin1String &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool endsWith(const QChar &c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + QString leftJustified(int width, QChar fill = QLatin1Char(' '), bool trunc = false) const __attribute__ ((warn_unused_result)); + QString rightJustified(int width, QChar fill = QLatin1Char(' '), bool trunc = false) const __attribute__ ((warn_unused_result)); + QString toLower() const __attribute__ ((warn_unused_result)); + QString toUpper() const __attribute__ ((warn_unused_result)); + QString toCaseFolded() const __attribute__ ((warn_unused_result)); + QString trimmed() const __attribute__ ((warn_unused_result)); + QString simplified() const __attribute__ ((warn_unused_result)); + QString &insert(int i, QChar c); + QString &insert(int i, const QChar *uc, int len); + inline QString &insert(int i, const QString &s) { return insert(i, s.constData(), s.length()); } + QString &insert(int i, const QLatin1String &s); + QString &append(QChar c); + QString &append(const QString &s); + QString &append(const QStringRef &s); + QString &append(const QLatin1String &s); + inline QString &prepend(QChar c) { return insert(0, c); } + inline QString &prepend(const QString &s) { return insert(0, s); } + inline QString &prepend(const QLatin1String &s) { return insert(0, s); } + inline QString &operator+=(QChar c) { + if (d->ref != 1 || d->size + 1 > d->alloc) + realloc(grow(d->size + 1)); + d->data[d->size++] = c.unicode(); + d->data[d->size] = '\0'; + return *this; + } + inline QString &operator+=(QChar::SpecialCharacter c) { return append(QChar(c)); } + inline QString &operator+=(const QString &s) { return append(s); } + inline QString &operator+=(const QStringRef &s) { return append(s); } + inline QString &operator+=(const QLatin1String &s) { return append(s); } + QString &remove(int i, int len); + QString &remove(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &remove(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(int i, int len, QChar after); + QString &replace(int i, int len, const QChar *s, int slen); + QString &replace(int i, int len, const QString &after); + QString &replace(QChar before, QChar after, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(const QChar *before, int blen, const QChar *after, int alen, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(const QLatin1String &before, const QLatin1String &after, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(const QLatin1String &before, const QString &after, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(const QString &before, const QLatin1String &after, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(const QString &before, const QString &after, + Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(QChar c, const QString &after, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(QChar c, const QLatin1String &after, Qt::CaseSensitivity cs = Qt::CaseSensitive); + QString &replace(const QRegExp &rx, const QString &after); + inline QString &remove(const QRegExp &rx) + { return replace(rx, QString()); } + enum SplitBehavior { KeepEmptyParts, SkipEmptyParts }; + QStringList split(const QString &sep, SplitBehavior behavior = KeepEmptyParts, + Qt::CaseSensitivity cs = Qt::CaseSensitive) const __attribute__ ((warn_unused_result)); + QStringList split(const QChar &sep, SplitBehavior behavior = KeepEmptyParts, + Qt::CaseSensitivity cs = Qt::CaseSensitive) const __attribute__ ((warn_unused_result)); + QStringList split(const QRegExp &sep, SplitBehavior behavior = KeepEmptyParts) const __attribute__ ((warn_unused_result)); + enum NormalizationForm { + NormalizationForm_D, + NormalizationForm_C, + NormalizationForm_KD, + NormalizationForm_KC + }; + QString normalized(NormalizationForm mode) const __attribute__ ((warn_unused_result)); + QString normalized(NormalizationForm mode, QChar::UnicodeVersion version) const __attribute__ ((warn_unused_result)); + QString repeated(int times) const; + const ushort *utf16() const; + QByteArray toAscii() const __attribute__ ((warn_unused_result)); + QByteArray toLatin1() const __attribute__ ((warn_unused_result)); + QByteArray toUtf8() const __attribute__ ((warn_unused_result)); + QByteArray toLocal8Bit() const __attribute__ ((warn_unused_result)); + QVector toUcs4() const __attribute__ ((warn_unused_result)); + static QString fromAscii(const char *, int size = -1); + static QString fromLatin1(const char *, int size = -1); + static QString fromUtf8(const char *, int size = -1); + static QString fromLocal8Bit(const char *, int size = -1); + static QString fromUtf16(const ushort *, int size = -1); + static QString fromUcs4(const uint *, int size = -1); + static QString fromRawData(const QChar *, int size); + int toWCharArray(wchar_t *array) const; + static QString fromWCharArray(const wchar_t *, int size = -1); + QString &setRawData(const QChar *unicode, int size); + QString &setUnicode(const QChar *unicode, int size); + inline QString &setUtf16(const ushort *utf16, int size); + int compare(const QString &s) const; + int compare(const QString &s, Qt::CaseSensitivity cs) const; + int compare(const QLatin1String &other, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + static inline int compare(const QString &s1, const QString &s2) + { return s1.compare(s2); } + static inline int compare(const QString &s1, const QString &s2, Qt::CaseSensitivity cs) + { return s1.compare(s2, cs); } + static inline int compare(const QString& s1, const QLatin1String &s2, + Qt::CaseSensitivity cs = Qt::CaseSensitive) + { return s1.compare(s2, cs); } + static inline int compare(const QLatin1String& s1, const QString &s2, + Qt::CaseSensitivity cs = Qt::CaseSensitive) + { return -s2.compare(s1, cs); } + int compare(const QStringRef &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + static int compare(const QString &s1, const QStringRef &s2, + Qt::CaseSensitivity = Qt::CaseSensitive); + int localeAwareCompare(const QString& s) const; + static int localeAwareCompare(const QString& s1, const QString& s2) + { return s1.localeAwareCompare(s2); } + int localeAwareCompare(const QStringRef &s) const; + static int localeAwareCompare(const QString& s1, const QStringRef& s2); + short toShort(bool *ok=0, int base=10) const; + ushort toUShort(bool *ok=0, int base=10) const; + int toInt(bool *ok=0, int base=10) const; + uint toUInt(bool *ok=0, int base=10) const; + long toLong(bool *ok=0, int base=10) const; + ulong toULong(bool *ok=0, int base=10) const; + qlonglong toLongLong(bool *ok=0, int base=10) const; + qulonglong toULongLong(bool *ok=0, int base=10) const; + float toFloat(bool *ok=0) const; + double toDouble(bool *ok=0) const; + QString &setNum(short, int base=10); + QString &setNum(ushort, int base=10); + QString &setNum(int, int base=10); + QString &setNum(uint, int base=10); + QString &setNum(long, int base=10); + QString &setNum(ulong, int base=10); + QString &setNum(qlonglong, int base=10); + QString &setNum(qulonglong, int base=10); + QString &setNum(float, char f='g', int prec=6); + QString &setNum(double, char f='g', int prec=6); + static QString number(int, int base=10); + static QString number(uint, int base=10); + static QString number(long, int base=10); + static QString number(ulong, int base=10); + static QString number(qlonglong, int base=10); + static QString number(qulonglong, int base=10); + static QString number(double, char f='g', int prec=6); + bool operator==(const QString &s) const; + bool operator<(const QString &s) const; + inline bool operator>(const QString &s) const { return s < *this; } + inline bool operator!=(const QString &s) const { return !operator==(s); } + inline bool operator<=(const QString &s) const { return !operator>(s); } + inline bool operator>=(const QString &s) const { return !operator<(s); } + bool operator==(const QLatin1String &s) const; + bool operator<(const QLatin1String &s) const; + bool operator>(const QLatin1String &s) const; + inline bool operator!=(const QLatin1String &s) const { return !operator==(s); } + inline bool operator<=(const QLatin1String &s) const { return !operator>(s); } + inline bool operator>=(const QLatin1String &s) const { return !operator<(s); } + inline QString(const char *ch) : d(fromAscii_helper(ch)) + {} + inline QString(const QByteArray &a) + : d(fromAscii_helper(a.constData(), qstrnlen(a.constData(), a.size()))) + {} + inline QString &operator=(const char *ch) + { return (*this = fromAscii(ch)); } + inline QString &operator=(const QByteArray &a) + { return (*this = fromAscii(a.constData(), qstrnlen(a.constData(), a.size()))); } + inline QString &operator=(char c) + { return (*this = QChar::fromAscii(c)); } + inline QString &prepend(const char *s) + { return prepend(QString::fromAscii(s)); } + inline QString &prepend(const QByteArray &s) + { return prepend(QString::fromAscii(s.constData(), qstrnlen(s.constData(), s.size()))); } + inline QString &append(const char *s) + { return append(QString::fromAscii(s)); } + inline QString &append(const QByteArray &s) + { return append(QString::fromAscii(s.constData(), qstrnlen(s.constData(), s.size()))); } + inline QString &operator+=(const char *s) + { return append(QString::fromAscii(s)); } + inline QString &operator+=(const QByteArray &s) + { return append(QString::fromAscii(s.constData(), qstrnlen(s.constData(), s.size()))); } + inline QString &operator+=(char c) + { return append(QChar::fromAscii(c)); } + inline bool operator==(const char *s) const; + inline bool operator!=(const char *s) const; + inline bool operator<(const char *s) const; + inline bool operator<=(const char *s2) const; + inline bool operator>(const char *s2) const; + inline bool operator>=(const char *s2) const; + inline bool operator==(const QByteArray &s) const; + inline bool operator!=(const QByteArray &s) const; + inline bool operator<(const QByteArray &s) const + { return *this < QString::fromAscii(s.constData(), s.size()); } + inline bool operator>(const QByteArray &s) const + { return *this > QString::fromAscii(s.constData(), s.size()); } + inline bool operator<=(const QByteArray &s) const + { return *this <= QString::fromAscii(s.constData(), s.size()); } + inline bool operator>=(const QByteArray &s) const + { return *this >= QString::fromAscii(s.constData(), s.size()); } + typedef QChar *iterator; + typedef const QChar *const_iterator; + typedef iterator Iterator; + typedef const_iterator ConstIterator; + iterator begin(); + const_iterator begin() const; + const_iterator constBegin() const; + iterator end(); + const_iterator end() const; + const_iterator constEnd() const; + typedef const QChar & const_reference; + typedef QChar & reference; + typedef QChar value_type; + inline void push_back(QChar c) { append(c); } + inline void push_back(const QString &s) { append(s); } + inline void push_front(QChar c) { prepend(c); } + inline void push_front(const QString &s) { prepend(s); } + static inline QString fromStdString(const std::string &s); + inline std::string toStdString() const; + static inline QString fromStdWString(const QStdWString &s); + inline QStdWString toStdWString() const; + struct Null { }; + static const Null null; + inline QString(const Null &): d(&shared_null) { d->ref.ref(); } + inline QString &operator=(const Null &) { *this = QString(); return *this; } + inline bool isNull() const { return d == &shared_null; } + bool isSimpleText() const { if (!d->clean) updateProperties(); return d->simpletext; } + bool isRightToLeft() const; + QString(int size, Qt::Initialization); +private: + struct Data { + QBasicAtomicInt ref; + int alloc, size; + ushort *data; + ushort clean : 1; + ushort simpletext : 1; + ushort righttoleft : 1; + ushort asciiCache : 1; + ushort capacity : 1; + ushort reserved : 11; + ushort array[1]; + }; + static Data shared_null; + static Data shared_empty; + Data *d; + QString(Data *dd, int ) : d(dd) {} + static QTextCodec *codecForCStrings; + static int grow(int); + static void free(Data *); + void realloc(); + void realloc(int alloc); + void expand(int i); + void updateProperties() const; + QString multiArg(int numArgs, const QString **args) const; + static int compare_helper(const QChar *data1, int length1, + const QChar *data2, int length2, + Qt::CaseSensitivity cs = Qt::CaseSensitive); + static int compare_helper(const QChar *data1, int length1, + QLatin1String s2, + Qt::CaseSensitivity cs = Qt::CaseSensitive); + static int localeAwareCompare_helper(const QChar *data1, int length1, + const QChar *data2, int length2); + static Data *fromLatin1_helper(const char *str, int size = -1); + static Data *fromAscii_helper(const char *str, int size = -1); + void replace_helper(uint *indices, int nIndices, int blen, const QChar *after, int alen); + friend class QCharRef; + friend class QCFString; + friend class QTextCodec; + friend class QStringRef; + friend struct QAbstractConcatenable; + friend inline bool qStringComparisonHelper(const QString &s1, const char *s2); + friend inline bool qStringComparisonHelper(const QStringRef &s1, const char *s2); +public: + typedef Data * DataPtr; + inline DataPtr &data_ptr() { return d; } +}; +class QLatin1String +{ +public: + inline explicit QLatin1String(const char *s) : chars(s) {} + inline QLatin1String &operator=(const QLatin1String &other) + { chars = other.chars; return *this; } + inline const char *latin1() const { return chars; } + inline bool operator==(const QString &s) const + { return s == *this; } + inline bool operator!=(const QString &s) const + { return s != *this; } + inline bool operator>(const QString &s) const + { return s < *this; } + inline bool operator<(const QString &s) const + { return s > *this; } + inline bool operator>=(const QString &s) const + { return s <= *this; } + inline bool operator<=(const QString &s) const + { return s >= *this; } + inline bool operator==(const char *s) const + { return QString::fromAscii(s) == *this; } + inline bool operator!=(const char *s) const + { return QString::fromAscii(s) != *this; } + inline bool operator<(const char *s) const + { return QString::fromAscii(s) > *this; } + inline bool operator>(const char *s) const + { return QString::fromAscii(s) < *this; } + inline bool operator<=(const char *s) const + { return QString::fromAscii(s) >= *this; } + inline bool operator>=(const char *s) const + { return QString::fromAscii(s) <= *this; } +private: + const char *chars; +}; +inline QString::QString(const QLatin1String &aLatin1) : d(fromLatin1_helper(aLatin1.latin1())) +{ } +inline int QString::length() const +{ return d->size; } +inline const QChar QString::at(int i) const +{ qt_noop(); return d->data[i]; } +inline const QChar QString::operator[](int i) const +{ qt_noop(); return d->data[i]; } +inline const QChar QString::operator[](uint i) const +{ qt_noop(); return d->data[i]; } +inline bool QString::isEmpty() const +{ return d->size == 0; } +inline const QChar *QString::unicode() const +{ return reinterpret_cast(d->data); } +inline const QChar *QString::data() const +{ return reinterpret_cast(d->data); } +inline QChar *QString::data() +{ detach(); return reinterpret_cast(d->data); } +inline const QChar *QString::constData() const +{ return reinterpret_cast(d->data); } +inline void QString::detach() +{ if (d->ref != 1 || d->data != d->array) realloc(); } +inline bool QString::isDetached() const +{ return d->ref == 1; } +inline QString &QString::operator=(const QLatin1String &s) +{ + *this = fromLatin1(s.latin1()); + return *this; +} +inline void QString::clear() +{ if (!isNull()) *this = QString(); } +inline QString::QString(const QString &other) : d(other.d) +{ qt_noop(); d->ref.ref(); } +inline int QString::capacity() const +{ return d->alloc; } +inline QString &QString::setNum(short n, int base) +{ return setNum(qlonglong(n), base); } +inline QString &QString::setNum(ushort n, int base) +{ return setNum(qulonglong(n), base); } +inline QString &QString::setNum(int n, int base) +{ return setNum(qlonglong(n), base); } +inline QString &QString::setNum(uint n, int base) +{ return setNum(qulonglong(n), base); } +inline QString &QString::setNum(long n, int base) +{ return setNum(qlonglong(n), base); } +inline QString &QString::setNum(ulong n, int base) +{ return setNum(qulonglong(n), base); } +inline QString &QString::setNum(float n, char f, int prec) +{ return setNum(double(n),f,prec); } +inline QString QString::arg(int a, int fieldWidth, int base, const QChar &fillChar) const +{ return arg(qlonglong(a), fieldWidth, base, fillChar); } +inline QString QString::arg(uint a, int fieldWidth, int base, const QChar &fillChar) const +{ return arg(qulonglong(a), fieldWidth, base, fillChar); } +inline QString QString::arg(long a, int fieldWidth, int base, const QChar &fillChar) const +{ return arg(qlonglong(a), fieldWidth, base, fillChar); } +inline QString QString::arg(ulong a, int fieldWidth, int base, const QChar &fillChar) const +{ return arg(qulonglong(a), fieldWidth, base, fillChar); } +inline QString QString::arg(short a, int fieldWidth, int base, const QChar &fillChar) const +{ return arg(qlonglong(a), fieldWidth, base, fillChar); } +inline QString QString::arg(ushort a, int fieldWidth, int base, const QChar &fillChar) const +{ return arg(qulonglong(a), fieldWidth, base, fillChar); } +inline QString QString::arg(const QString &a1, const QString &a2) const +{ const QString *args[2] = { &a1, &a2 }; return multiArg(2, args); } +inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3) const +{ const QString *args[3] = { &a1, &a2, &a3 }; return multiArg(3, args); } +inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4) const +{ const QString *args[4] = { &a1, &a2, &a3, &a4 }; return multiArg(4, args); } +inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5) const +{ const QString *args[5] = { &a1, &a2, &a3, &a4, &a5 }; return multiArg(5, args); } +inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5, const QString &a6) const +{ const QString *args[6] = { &a1, &a2, &a3, &a4, &a5, &a6 }; return multiArg(6, args); } +inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5, const QString &a6, + const QString &a7) const +{ const QString *args[7] = { &a1, &a2, &a3, &a4, &a5, &a6, &a7 }; return multiArg(7, args); } +inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5, const QString &a6, + const QString &a7, const QString &a8) const +{ const QString *args[8] = { &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8 }; return multiArg(8, args); } +inline QString QString::arg(const QString &a1, const QString &a2, const QString &a3, + const QString &a4, const QString &a5, const QString &a6, + const QString &a7, const QString &a8, const QString &a9) const +{ const QString *args[9] = { &a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8, &a9 }; return multiArg(9, args); } +inline QString QString::section(QChar asep, int astart, int aend, SectionFlags aflags) const +{ return section(QString(asep), astart, aend, aflags); } +class QCharRef { + QString &s; + int i; + inline QCharRef(QString &str, int idx) + : s(str),i(idx) {} + friend class QString; +public: + inline operator QChar() const + { return i < s.d->size ? s.d->data[i] : 0; } + inline QCharRef &operator=(const QChar &c) + { if (i >= s.d->size) s.expand(i); else s.detach(); + s.d->data[i] = c.unicode(); return *this; } + inline QCharRef &operator=(char c) + { return operator=(QChar::fromAscii(c)); } + inline QCharRef &operator=(uchar c) + { return operator=(QChar::fromAscii(c)); } + inline QCharRef &operator=(const QCharRef &c) { return operator=(QChar(c)); } + inline QCharRef &operator=(ushort rc) { return operator=(QChar(rc)); } + inline QCharRef &operator=(short rc) { return operator=(QChar(rc)); } + inline QCharRef &operator=(uint rc) { return operator=(QChar(rc)); } + inline QCharRef &operator=(int rc) { return operator=(QChar(rc)); } + inline bool isNull() const { return QChar(*this).isNull(); } + inline bool isPrint() const { return QChar(*this).isPrint(); } + inline bool isPunct() const { return QChar(*this).isPunct(); } + inline bool isSpace() const { return QChar(*this).isSpace(); } + inline bool isMark() const { return QChar(*this).isMark(); } + inline bool isLetter() const { return QChar(*this).isLetter(); } + inline bool isNumber() const { return QChar(*this).isNumber(); } + inline bool isLetterOrNumber() { return QChar(*this).isLetterOrNumber(); } + inline bool isDigit() const { return QChar(*this).isDigit(); } + inline bool isLower() const { return QChar(*this).isLower(); } + inline bool isUpper() const { return QChar(*this).isUpper(); } + inline bool isTitleCase() const { return QChar(*this).isTitleCase(); } + inline int digitValue() const { return QChar(*this).digitValue(); } + QChar toLower() const { return QChar(*this).toLower(); } + QChar toUpper() const { return QChar(*this).toUpper(); } + QChar toTitleCase () const { return QChar(*this).toTitleCase(); } + QChar::Category category() const { return QChar(*this).category(); } + QChar::Direction direction() const { return QChar(*this).direction(); } + QChar::Joining joining() const { return QChar(*this).joining(); } + bool hasMirrored() const { return QChar(*this).hasMirrored(); } + QChar mirroredChar() const { return QChar(*this).mirroredChar(); } + QString decomposition() const { return QChar(*this).decomposition(); } + QChar::Decomposition decompositionTag() const { return QChar(*this).decompositionTag(); } + uchar combiningClass() const { return QChar(*this).combiningClass(); } + QChar::UnicodeVersion unicodeVersion() const { return QChar(*this).unicodeVersion(); } + inline uchar cell() const { return QChar(*this).cell(); } + inline uchar row() const { return QChar(*this).row(); } + inline void setCell(uchar cell); + inline void setRow(uchar row); + char toAscii() const { return QChar(*this).toAscii(); } + char toLatin1() const { return QChar(*this).toLatin1(); } + ushort unicode() const { return QChar(*this).unicode(); } + ushort& unicode() { return s.data()[i].unicode(); } +}; +inline void QCharRef::setRow(uchar arow) { QChar(*this).setRow(arow); } +inline void QCharRef::setCell(uchar acell) { QChar(*this).setCell(acell); } +inline QString::QString() : d(&shared_null) { d->ref.ref(); } +inline QString::~QString() { if (!d->ref.deref()) free(d); } +inline void QString::reserve(int asize) { if (d->ref != 1 || asize > d->alloc) realloc(asize); d->capacity = 1;} +inline QString &QString::setUtf16(const ushort *autf16, int asize) +{ return setUnicode(reinterpret_cast(autf16), asize); } +inline QCharRef QString::operator[](int i) +{ qt_noop(); return QCharRef(*this, i); } +inline QCharRef QString::operator[](uint i) +{ return QCharRef(*this, i); } +inline QString::iterator QString::begin() +{ detach(); return reinterpret_cast(d->data); } +inline QString::const_iterator QString::begin() const +{ return reinterpret_cast(d->data); } +inline QString::const_iterator QString::constBegin() const +{ return reinterpret_cast(d->data); } +inline QString::iterator QString::end() +{ detach(); return reinterpret_cast(d->data + d->size); } +inline QString::const_iterator QString::end() const +{ return reinterpret_cast(d->data + d->size); } +inline QString::const_iterator QString::constEnd() const +{ return reinterpret_cast(d->data + d->size); } +inline QBool QString::contains(const QString &s, Qt::CaseSensitivity cs) const +{ return QBool(indexOf(s, 0, cs) != -1); } +inline QBool QString::contains(const QStringRef &s, Qt::CaseSensitivity cs) const +{ return QBool(indexOf(s, 0, cs) != -1); } +inline QBool QString::contains(QChar c, Qt::CaseSensitivity cs) const +{ return QBool(indexOf(c, 0, cs) != -1); } +inline bool operator==(QString::Null, QString::Null) { return true; } +inline bool operator==(QString::Null, const QString &s) { return s.isNull(); } +inline bool operator==(const QString &s, QString::Null) { return s.isNull(); } +inline bool operator!=(QString::Null, QString::Null) { return false; } +inline bool operator!=(QString::Null, const QString &s) { return !s.isNull(); } +inline bool operator!=(const QString &s, QString::Null) { return !s.isNull(); } +inline bool qStringComparisonHelper(const QString &s1, const char *s2) +{ + if (QString::codecForCStrings) return (s1 == QString::fromAscii(s2)); + return (s1 == QLatin1String(s2)); +} +inline bool QString::operator==(const char *s) const +{ return qStringComparisonHelper(*this, s); } +inline bool QString::operator!=(const char *s) const +{ return !qStringComparisonHelper(*this, s); } +inline bool QString::operator<(const char *s) const +{ return *this < QString::fromAscii(s); } +inline bool QString::operator>(const char *s) const +{ return *this > QString::fromAscii(s); } +inline bool QString::operator<=(const char *s) const +{ return *this <= QString::fromAscii(s); } +inline bool QString::operator>=(const char *s) const +{ return *this >= QString::fromAscii(s); } +inline bool operator==(const char *s1, const QString &s2) +{ return qStringComparisonHelper(s2, s1); } +inline bool operator!=(const char *s1, const QString &s2) +{ return !qStringComparisonHelper(s2, s1); } +inline bool operator<(const char *s1, const QString &s2) +{ return (QString::fromAscii(s1) < s2); } +inline bool operator>(const char *s1, const QString &s2) +{ return (QString::fromAscii(s1) > s2); } +inline bool operator<=(const char *s1, const QString &s2) +{ return (QString::fromAscii(s1) <= s2); } +inline bool operator>=(const char *s1, const QString &s2) +{ return (QString::fromAscii(s1) >= s2); } +inline bool operator==(const char *s1, const QLatin1String &s2) +{ return QString::fromAscii(s1) == s2; } +inline bool operator!=(const char *s1, const QLatin1String &s2) +{ return QString::fromAscii(s1) != s2; } +inline bool operator<(const char *s1, const QLatin1String &s2) +{ return (QString::fromAscii(s1) < s2); } +inline bool operator>(const char *s1, const QLatin1String &s2) +{ return (QString::fromAscii(s1) > s2); } +inline bool operator<=(const char *s1, const QLatin1String &s2) +{ return (QString::fromAscii(s1) <= s2); } +inline bool operator>=(const char *s1, const QLatin1String &s2) +{ return (QString::fromAscii(s1) >= s2); } +inline bool operator==(const QLatin1String &s1, const QLatin1String &s2) +{ return (qstrcmp(s1.latin1(), s2.latin1()) == 0); } +inline bool operator!=(const QLatin1String &s1, const QLatin1String &s2) +{ return (qstrcmp(s1.latin1(), s2.latin1()) != 0); } +inline bool operator<(const QLatin1String &s1, const QLatin1String &s2) +{ return (qstrcmp(s1.latin1(), s2.latin1()) < 0); } +inline bool operator<=(const QLatin1String &s1, const QLatin1String &s2) +{ return (qstrcmp(s1.latin1(), s2.latin1()) <= 0); } +inline bool operator>(const QLatin1String &s1, const QLatin1String &s2) +{ return (qstrcmp(s1.latin1(), s2.latin1()) > 0); } +inline bool operator>=(const QLatin1String &s1, const QLatin1String &s2) +{ return (qstrcmp(s1.latin1(), s2.latin1()) >= 0); } +inline bool QString::operator==(const QByteArray &s) const +{ return qStringComparisonHelper(*this, s.constData()); } +inline bool QString::operator!=(const QByteArray &s) const +{ return !qStringComparisonHelper(*this, s.constData()); } +inline bool QByteArray::operator==(const QString &s) const +{ return qStringComparisonHelper(s, constData()); } +inline bool QByteArray::operator!=(const QString &s) const +{ return !qStringComparisonHelper(s, constData()); } +inline bool QByteArray::operator<(const QString &s) const +{ return QString::fromAscii(constData(), size()) < s; } +inline bool QByteArray::operator>(const QString &s) const +{ return QString::fromAscii(constData(), size()) > s; } +inline bool QByteArray::operator<=(const QString &s) const +{ return QString::fromAscii(constData(), size()) <= s; } +inline bool QByteArray::operator>=(const QString &s) const +{ return QString::fromAscii(constData(), size()) >= s; } +inline QByteArray &QByteArray::append(const QString &s) +{ return append(s.toAscii()); } +inline QByteArray &QByteArray::insert(int i, const QString &s) +{ return insert(i, s.toAscii()); } +inline QByteArray &QByteArray::replace(char c, const QString &after) +{ return replace(c, after.toAscii()); } +inline QByteArray &QByteArray::replace(const QString &before, const char *after) +{ return replace(before.toAscii(), after); } +inline QByteArray &QByteArray::replace(const QString &before, const QByteArray &after) +{ return replace(before.toAscii(), after); } +inline QByteArray &QByteArray::operator+=(const QString &s) +{ return operator+=(s.toAscii()); } +inline int QByteArray::indexOf(const QString &s, int from) const +{ return indexOf(s.toAscii(), from); } +inline int QByteArray::lastIndexOf(const QString &s, int from) const +{ return lastIndexOf(s.toAscii(), from); } +inline const QString operator+(const QString &s1, const QString &s2) +{ QString t(s1); t += s2; return t; } +inline const QString operator+(const QString &s1, QChar s2) +{ QString t(s1); t += s2; return t; } +inline const QString operator+(QChar s1, const QString &s2) +{ QString t(s1); t += s2; return t; } +inline const QString operator+(const QString &s1, const char *s2) +{ QString t(s1); t += QString::fromAscii(s2); return t; } +inline const QString operator+(const char *s1, const QString &s2) +{ QString t = QString::fromAscii(s1); t += s2; return t; } +inline const QString operator+(char c, const QString &s) +{ QString t = s; t.prepend(QChar::fromAscii(c)); return t; } +inline const QString operator+(const QString &s, char c) +{ QString t = s; t += QChar::fromAscii(c); return t; } +inline const QString operator+(const QByteArray &ba, const QString &s) +{ QString t = QString::fromAscii(ba.constData(), qstrnlen(ba.constData(), ba.size())); t += s; return t; } +inline const QString operator+(const QString &s, const QByteArray &ba) +{ QString t(s); t += QString::fromAscii(ba.constData(), qstrnlen(ba.constData(), ba.size())); return t; } +inline std::string QString::toStdString() const +{ const QByteArray asc = toAscii(); return std::string(asc.constData(), asc.length()); } +inline QString QString::fromStdString(const std::string &s) +{ return fromAscii(s.data(), int(s.size())); } +inline QStdWString QString::toStdWString() const +{ + QStdWString str; + str.resize(length()); + str.resize(toWCharArray(&(*str.begin()))); + return str; +} +inline QString QString::fromStdWString(const QStdWString &s) +{ return fromWCharArray(s.data(), int(s.size())); } + QDataStream &operator<<(QDataStream &, const QString &); + QDataStream &operator>>(QDataStream &, QString &); +template<> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QString)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QString"; } }; +template <> inline bool qIsDetached(QString &t) { return t.isDetached(); } template <> inline void qSwap(QString &value1, QString &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } namespace std { template<> inline void swap< ::QString>(::QString &value1, ::QString &value2) { swap(value1.data_ptr(), value2.data_ptr()); } } + inline QFlags operator|(QString::SectionFlags::enum_type f1, QString::SectionFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(QString::SectionFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QString::SectionFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +class QStringRef { + const QString *m_string; + int m_position; + int m_size; +public: + inline QStringRef():m_string(0), m_position(0), m_size(0){} + inline QStringRef(const QString *string, int position, int size); + inline QStringRef(const QString *string); + inline QStringRef(const QStringRef &other) + :m_string(other.m_string), m_position(other.m_position), m_size(other.m_size) + {} + inline ~QStringRef(){} + inline const QString *string() const { return m_string; } + inline int position() const { return m_position; } + inline int size() const { return m_size; } + inline int count() const { return m_size; } + inline int length() const { return m_size; } + inline QStringRef &operator=(const QStringRef &other) { + m_string = other.m_string; m_position = other.m_position; + m_size = other.m_size; return *this; + } + int indexOf(const QString &str, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int indexOf(QChar ch, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int indexOf(QLatin1String str, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int indexOf(const QStringRef &str, int from = 0, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int lastIndexOf(const QString &str, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int lastIndexOf(QChar ch, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int lastIndexOf(QLatin1String str, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int lastIndexOf(const QStringRef &str, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + inline QBool contains(const QString &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + inline QBool contains(QChar ch, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + inline QBool contains(QLatin1String str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + inline QBool contains(const QStringRef &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int count(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int count(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int count(const QStringRef &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool startsWith(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool startsWith(QLatin1String s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool startsWith(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool startsWith(const QStringRef &c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool endsWith(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool endsWith(QLatin1String s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool endsWith(QChar c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + bool endsWith(const QStringRef &c, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + inline QStringRef &operator=(const QString *string); + inline const QChar *unicode() const { + if (!m_string) + return reinterpret_cast(QString::shared_null.data); + return m_string->unicode() + m_position; + } + inline const QChar *data() const { return unicode(); } + inline const QChar *constData() const { return unicode(); } + QByteArray toAscii() const __attribute__ ((warn_unused_result)); + QByteArray toLatin1() const __attribute__ ((warn_unused_result)); + QByteArray toUtf8() const __attribute__ ((warn_unused_result)); + QByteArray toLocal8Bit() const __attribute__ ((warn_unused_result)); + QVector toUcs4() const __attribute__ ((warn_unused_result)); + inline void clear() { m_string = 0; m_position = m_size = 0; } + QString toString() const; + inline bool isEmpty() const { return m_size == 0; } + inline bool isNull() const { return m_string == 0 || m_string->isNull(); } + QStringRef appendTo(QString *string) const; + inline const QChar at(int i) const + { qt_noop(); return m_string->at(i + m_position); } + int compare(const QString &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int compare(const QStringRef &s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + int compare(QLatin1String s, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + static int compare(const QStringRef &s1, const QString &s2, + Qt::CaseSensitivity = Qt::CaseSensitive); + static int compare(const QStringRef &s1, const QStringRef &s2, + Qt::CaseSensitivity = Qt::CaseSensitive); + static int compare(const QStringRef &s1, QLatin1String s2, + Qt::CaseSensitivity cs = Qt::CaseSensitive); + int localeAwareCompare(const QString &s) const; + int localeAwareCompare(const QStringRef &s) const; + static int localeAwareCompare(const QStringRef &s1, const QString &s2); + static int localeAwareCompare(const QStringRef &s1, const QStringRef &s2); +}; +inline QStringRef &QStringRef::operator=(const QString *aString) +{ m_string = aString; m_position = 0; m_size = aString?aString->size():0; return *this; } +inline QStringRef::QStringRef(const QString *aString, int aPosition, int aSize) + :m_string(aString), m_position(aPosition), m_size(aSize){} +inline QStringRef::QStringRef(const QString *aString) + :m_string(aString), m_position(0), m_size(aString?aString->size() : 0){} + bool operator==(const QStringRef &s1,const QStringRef &s2); +inline bool operator!=(const QStringRef &s1,const QStringRef &s2) +{ return !(s1 == s2); } + bool operator==(const QString &s1,const QStringRef &s2); +inline bool operator!=(const QString &s1,const QStringRef &s2) +{ return !(s1 == s2); } +inline bool operator==(const QStringRef &s1,const QString &s2) +{ return s2 == s1; } +inline bool operator!=(const QStringRef &s1,const QString &s2) +{ return s2 != s1; } + bool operator==(const QLatin1String &s1, const QStringRef &s2); +inline bool operator!=(const QLatin1String &s1,const QStringRef &s2) +{ return !(s1 == s2); } +inline bool operator==(const QStringRef &s1,const QLatin1String &s2) +{ return s2 == s1; } +inline bool operator!=(const QStringRef &s1,const QLatin1String &s2) +{ return s2 != s1; } + bool operator<(const QStringRef &s1,const QStringRef &s2); +inline bool operator>(const QStringRef &s1, const QStringRef &s2) +{ return s2 < s1; } +inline bool operator<=(const QStringRef &s1, const QStringRef &s2) +{ return !(s1 > s2); } +inline bool operator>=(const QStringRef &s1, const QStringRef &s2) +{ return !(s1 < s2); } +inline bool qStringComparisonHelper(const QStringRef &s1, const char *s2) +{ + if (QString::codecForCStrings) return (s1 == QString::fromAscii(s2)); + return (s1 == QLatin1String(s2)); +} +inline bool operator==(const char *s1, const QStringRef &s2) +{ return qStringComparisonHelper(s2, s1); } +inline bool operator==(const QStringRef &s1, const char *s2) +{ return qStringComparisonHelper(s1, s2); } +inline bool operator!=(const char *s1, const QStringRef &s2) +{ return !qStringComparisonHelper(s2, s1); } +inline bool operator!=(const QStringRef &s1, const char *s2) +{ return !qStringComparisonHelper(s1, s2); } +inline int QString::compare(const QStringRef &s, Qt::CaseSensitivity cs) const +{ return QString::compare_helper(constData(), length(), s.constData(), s.length(), cs); } +inline int QString::compare(const QString &s1, const QStringRef &s2, Qt::CaseSensitivity cs) +{ return QString::compare_helper(s1.constData(), s1.length(), s2.constData(), s2.length(), cs); } +inline int QStringRef::compare(const QString &s, Qt::CaseSensitivity cs) const +{ return QString::compare_helper(constData(), length(), s.constData(), s.length(), cs); } +inline int QStringRef::compare(const QStringRef &s, Qt::CaseSensitivity cs) const +{ return QString::compare_helper(constData(), length(), s.constData(), s.length(), cs); } +inline int QStringRef::compare(QLatin1String s, Qt::CaseSensitivity cs) const +{ return QString::compare_helper(constData(), length(), s, cs); } +inline int QStringRef::compare(const QStringRef &s1, const QString &s2, Qt::CaseSensitivity cs) +{ return QString::compare_helper(s1.constData(), s1.length(), s2.constData(), s2.length(), cs); } +inline int QStringRef::compare(const QStringRef &s1, const QStringRef &s2, Qt::CaseSensitivity cs) +{ return QString::compare_helper(s1.constData(), s1.length(), s2.constData(), s2.length(), cs); } +inline int QStringRef::compare(const QStringRef &s1, QLatin1String s2, Qt::CaseSensitivity cs) +{ return QString::compare_helper(s1.constData(), s1.length(), s2, cs); } +inline int QString::localeAwareCompare(const QStringRef &s) const +{ return localeAwareCompare_helper(constData(), length(), s.constData(), s.length()); } +inline int QString::localeAwareCompare(const QString& s1, const QStringRef& s2) +{ return localeAwareCompare_helper(s1.constData(), s1.length(), s2.constData(), s2.length()); } +inline int QStringRef::localeAwareCompare(const QString &s) const +{ return QString::localeAwareCompare_helper(constData(), length(), s.constData(), s.length()); } +inline int QStringRef::localeAwareCompare(const QStringRef &s) const +{ return QString::localeAwareCompare_helper(constData(), length(), s.constData(), s.length()); } +inline int QStringRef::localeAwareCompare(const QStringRef &s1, const QString &s2) +{ return QString::localeAwareCompare_helper(s1.constData(), s1.length(), s2.constData(), s2.length()); } +inline int QStringRef::localeAwareCompare(const QStringRef &s1, const QStringRef &s2) +{ return QString::localeAwareCompare_helper(s1.constData(), s1.length(), s2.constData(), s2.length()); } +inline QBool QStringRef::contains(const QString &s, Qt::CaseSensitivity cs) const +{ return QBool(indexOf(s, 0, cs) != -1); } +inline QBool QStringRef::contains(QLatin1String s, Qt::CaseSensitivity cs) const +{ return QBool(indexOf(s, 0, cs) != -1); } +inline QBool QStringRef::contains(QChar c, Qt::CaseSensitivity cs) const +{ return QBool(indexOf(c, 0, cs) != -1); } +inline QBool QStringRef::contains(const QStringRef &s, Qt::CaseSensitivity cs) const +{ return QBool(indexOf(s, 0, cs) != -1); } +typedef QtValidLicenseForCoreModule QtCoreModule; +namespace std __attribute__ ((__visibility__ ("default"))) +{ + class locale + { + public: + typedef int category; + class facet; + class id; + class _Impl; + friend class facet; + friend class _Impl; + template + friend bool + has_facet(const locale&) throw(); + template + friend const _Facet& + use_facet(const locale&); + template + friend struct __use_cache; + static const category none = 0; + static const category ctype = 1L << 0; + static const category numeric = 1L << 1; + static const category collate = 1L << 2; + static const category time = 1L << 3; + static const category monetary = 1L << 4; + static const category messages = 1L << 5; + static const category all = (ctype | numeric | collate | + time | monetary | messages); + locale() throw(); + locale(const locale& __other) throw(); + explicit + locale(const char* __s); + locale(const locale& __base, const char* __s, category __cat); + locale(const locale& __base, const locale& __add, category __cat); + template + locale(const locale& __other, _Facet* __f); + ~locale() throw(); + const locale& + operator=(const locale& __other) throw(); + template + locale + combine(const locale& __other) const; + string + name() const; + bool + operator==(const locale& __other) const throw(); + bool + operator!=(const locale& __other) const throw() + { return !(this->operator==(__other)); } + template + bool + operator()(const basic_string<_Char, _Traits, _Alloc>& __s1, + const basic_string<_Char, _Traits, _Alloc>& __s2) const; + static locale + global(const locale&); + static const locale& + classic(); + private: + _Impl* _M_impl; + static _Impl* _S_classic; + static _Impl* _S_global; + static const char* const* const _S_categories; + enum { _S_categories_size = 6 + 6 }; + static __gthread_once_t _S_once; + explicit + locale(_Impl*) throw(); + static void + _S_initialize(); + static void + _S_initialize_once() throw(); + static category + _S_normalize_category(category); + void + _M_coalesce(const locale& __base, const locale& __add, category __cat); + }; + class locale::facet + { + private: + friend class locale; + friend class locale::_Impl; + mutable _Atomic_word _M_refcount; + static __c_locale _S_c_locale; + static const char _S_c_name[2]; + static __gthread_once_t _S_once; + static void + _S_initialize_once(); + protected: + explicit + facet(size_t __refs = 0) throw() : _M_refcount(__refs ? 1 : 0) + { } + virtual + ~facet(); + static void + _S_create_c_locale(__c_locale& __cloc, const char* __s, + __c_locale __old = 0); + static __c_locale + _S_clone_c_locale(__c_locale& __cloc) throw(); + static void + _S_destroy_c_locale(__c_locale& __cloc); + static __c_locale + _S_lc_ctype_c_locale(__c_locale __cloc, const char* __s); + static __c_locale + _S_get_c_locale(); + __attribute__ ((__const__)) static const char* + _S_get_c_name() throw(); + private: + void + _M_add_reference() const throw() + { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } + void + _M_remove_reference() const throw() + { + ; + if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) + { + ; + try + { delete this; } + catch(...) + { } + } + } + facet(const facet&); + facet& + operator=(const facet&); + }; + class locale::id + { + private: + friend class locale; + friend class locale::_Impl; + template + friend const _Facet& + use_facet(const locale&); + template + friend bool + has_facet(const locale&) throw(); + mutable size_t _M_index; + static _Atomic_word _S_refcount; + void + operator=(const id&); + id(const id&); + public: + id() { } + size_t + _M_id() const throw(); + }; + class locale::_Impl + { + public: + friend class locale; + friend class locale::facet; + template + friend bool + has_facet(const locale&) throw(); + template + friend const _Facet& + use_facet(const locale&); + template + friend struct __use_cache; + private: + _Atomic_word _M_refcount; + const facet** _M_facets; + size_t _M_facets_size; + const facet** _M_caches; + char** _M_names; + static const locale::id* const _S_id_ctype[]; + static const locale::id* const _S_id_numeric[]; + static const locale::id* const _S_id_collate[]; + static const locale::id* const _S_id_time[]; + static const locale::id* const _S_id_monetary[]; + static const locale::id* const _S_id_messages[]; + static const locale::id* const* const _S_facet_categories[]; + void + _M_add_reference() throw() + { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } + void + _M_remove_reference() throw() + { + ; + if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) + { + ; + try + { delete this; } + catch(...) + { } + } + } + _Impl(const _Impl&, size_t); + _Impl(const char*, size_t); + _Impl(size_t) throw(); + ~_Impl() throw(); + _Impl(const _Impl&); + void + operator=(const _Impl&); + bool + _M_check_same_name() + { + bool __ret = true; + if (_M_names[1]) + for (size_t __i = 0; __ret && __i < _S_categories_size - 1; ++__i) + __ret = __builtin_strcmp(_M_names[__i], _M_names[__i + 1]) == 0; + return __ret; + } + void + _M_replace_categories(const _Impl*, category); + void + _M_replace_category(const _Impl*, const locale::id* const*); + void + _M_replace_facet(const _Impl*, const locale::id*); + void + _M_install_facet(const locale::id*, const facet*); + template + void + _M_init_facet(_Facet* __facet) + { _M_install_facet(&_Facet::id, __facet); } + void + _M_install_cache(const facet*, size_t); + }; + template + bool + has_facet(const locale& __loc) throw(); + template + const _Facet& + use_facet(const locale& __loc); + template + class collate : public locale::facet + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + protected: + __c_locale _M_c_locale_collate; + public: + static locale::id id; + explicit + collate(size_t __refs = 0) + : facet(__refs), _M_c_locale_collate(_S_get_c_locale()) + { } + explicit + collate(__c_locale __cloc, size_t __refs = 0) + : facet(__refs), _M_c_locale_collate(_S_clone_c_locale(__cloc)) + { } + int + compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const + { return this->do_compare(__lo1, __hi1, __lo2, __hi2); } + string_type + transform(const _CharT* __lo, const _CharT* __hi) const + { return this->do_transform(__lo, __hi); } + long + hash(const _CharT* __lo, const _CharT* __hi) const + { return this->do_hash(__lo, __hi); } + int + _M_compare(const _CharT*, const _CharT*) const throw(); + size_t + _M_transform(_CharT*, const _CharT*, size_t) const throw(); + protected: + virtual + ~collate() + { _S_destroy_c_locale(_M_c_locale_collate); } + virtual int + do_compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const; + virtual string_type + do_transform(const _CharT* __lo, const _CharT* __hi) const; + virtual long + do_hash(const _CharT* __lo, const _CharT* __hi) const; + }; + template + locale::id collate<_CharT>::id; + template<> + int + collate::_M_compare(const char*, const char*) const throw(); + template<> + size_t + collate::_M_transform(char*, const char*, size_t) const throw(); + template<> + int + collate::_M_compare(const wchar_t*, const wchar_t*) const throw(); + template<> + size_t + collate::_M_transform(wchar_t*, const wchar_t*, size_t) const throw(); + template + class collate_byname : public collate<_CharT> + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + explicit + collate_byname(const char* __s, size_t __refs = 0) + : collate<_CharT>(__refs) + { + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + this->_S_destroy_c_locale(this->_M_c_locale_collate); + this->_S_create_c_locale(this->_M_c_locale_collate, __s); + } + } + protected: + virtual + ~collate_byname() { } + }; +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + locale:: + locale(const locale& __other, _Facet* __f) + { + _M_impl = new _Impl(*__other._M_impl, 1); + try + { _M_impl->_M_install_facet(&_Facet::id, __f); } + catch(...) + { + _M_impl->_M_remove_reference(); + throw; + } + delete [] _M_impl->_M_names[0]; + _M_impl->_M_names[0] = 0; + } + template + locale + locale:: + combine(const locale& __other) const + { + _Impl* __tmp = new _Impl(*_M_impl, 1); + try + { + __tmp->_M_replace_facet(__other._M_impl, &_Facet::id); + } + catch(...) + { + __tmp->_M_remove_reference(); + throw; + } + return locale(__tmp); + } + template + bool + locale:: + operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1, + const basic_string<_CharT, _Traits, _Alloc>& __s2) const + { + typedef std::collate<_CharT> __collate_type; + const __collate_type& __collate = use_facet<__collate_type>(*this); + return (__collate.compare(__s1.data(), __s1.data() + __s1.length(), + __s2.data(), __s2.data() + __s2.length()) < 0); + } + template + bool + has_facet(const locale& __loc) throw() + { + const size_t __i = _Facet::id._M_id(); + const locale::facet** __facets = __loc._M_impl->_M_facets; + return (__i < __loc._M_impl->_M_facets_size + && dynamic_cast(__facets[__i])); + } + template + const _Facet& + use_facet(const locale& __loc) + { + const size_t __i = _Facet::id._M_id(); + const locale::facet** __facets = __loc._M_impl->_M_facets; + if (__i >= __loc._M_impl->_M_facets_size || !__facets[__i]) + __throw_bad_cast(); + return dynamic_cast(*__facets[__i]); + } + template + int + collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const throw () + { return 0; } + template + size_t + collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const throw () + { return 0; } + template + int + collate<_CharT>:: + do_compare(const _CharT* __lo1, const _CharT* __hi1, + const _CharT* __lo2, const _CharT* __hi2) const + { + const string_type __one(__lo1, __hi1); + const string_type __two(__lo2, __hi2); + const _CharT* __p = __one.c_str(); + const _CharT* __pend = __one.data() + __one.length(); + const _CharT* __q = __two.c_str(); + const _CharT* __qend = __two.data() + __two.length(); + for (;;) + { + const int __res = _M_compare(__p, __q); + if (__res) + return __res; + __p += char_traits<_CharT>::length(__p); + __q += char_traits<_CharT>::length(__q); + if (__p == __pend && __q == __qend) + return 0; + else if (__p == __pend) + return -1; + else if (__q == __qend) + return 1; + __p++; + __q++; + } + } + template + typename collate<_CharT>::string_type + collate<_CharT>:: + do_transform(const _CharT* __lo, const _CharT* __hi) const + { + string_type __ret; + const string_type __str(__lo, __hi); + const _CharT* __p = __str.c_str(); + const _CharT* __pend = __str.data() + __str.length(); + size_t __len = (__hi - __lo) * 2; + _CharT* __c = new _CharT[__len]; + try + { + for (;;) + { + size_t __res = _M_transform(__c, __p, __len); + if (__res >= __len) + { + __len = __res + 1; + delete [] __c, __c = 0; + __c = new _CharT[__len]; + __res = _M_transform(__c, __p, __len); + } + __ret.append(__c, __res); + __p += char_traits<_CharT>::length(__p); + if (__p == __pend) + break; + __p++; + __ret.push_back(_CharT()); + } + } + catch(...) + { + delete [] __c; + throw; + } + delete [] __c; + return __ret; + } + template + long + collate<_CharT>:: + do_hash(const _CharT* __lo, const _CharT* __hi) const + { + unsigned long __val = 0; + for (; __lo < __hi; ++__lo) + __val = + *__lo + ((__val << 7) + | (__val >> (__gnu_cxx::__numeric_traits:: + __digits - 7))); + return static_cast(__val); + } + extern template class collate; + extern template class collate_byname; + extern template + const collate& + use_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template class collate; + extern template class collate_byname; + extern template + const collate& + use_facet >(const locale&); + extern template + bool + has_facet >(const locale&); +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + enum _Ios_Fmtflags + { + _S_boolalpha = 1L << 0, + _S_dec = 1L << 1, + _S_fixed = 1L << 2, + _S_hex = 1L << 3, + _S_internal = 1L << 4, + _S_left = 1L << 5, + _S_oct = 1L << 6, + _S_right = 1L << 7, + _S_scientific = 1L << 8, + _S_showbase = 1L << 9, + _S_showpoint = 1L << 10, + _S_showpos = 1L << 11, + _S_skipws = 1L << 12, + _S_unitbuf = 1L << 13, + _S_uppercase = 1L << 14, + _S_adjustfield = _S_left | _S_right | _S_internal, + _S_basefield = _S_dec | _S_oct | _S_hex, + _S_floatfield = _S_scientific | _S_fixed, + _S_ios_fmtflags_end = 1L << 16 + }; + inline _Ios_Fmtflags + operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) & static_cast(__b)); } + inline _Ios_Fmtflags + operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) | static_cast(__b)); } + inline _Ios_Fmtflags + operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b) + { return _Ios_Fmtflags(static_cast(__a) ^ static_cast(__b)); } + inline _Ios_Fmtflags + operator~(_Ios_Fmtflags __a) + { return _Ios_Fmtflags(~static_cast(__a)); } + inline const _Ios_Fmtflags& + operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a | __b; } + inline const _Ios_Fmtflags& + operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a & __b; } + inline const _Ios_Fmtflags& + operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) + { return __a = __a ^ __b; } + enum _Ios_Openmode + { + _S_app = 1L << 0, + _S_ate = 1L << 1, + _S_bin = 1L << 2, + _S_in = 1L << 3, + _S_out = 1L << 4, + _S_trunc = 1L << 5, + _S_ios_openmode_end = 1L << 16 + }; + inline _Ios_Openmode + operator&(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) & static_cast(__b)); } + inline _Ios_Openmode + operator|(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) | static_cast(__b)); } + inline _Ios_Openmode + operator^(_Ios_Openmode __a, _Ios_Openmode __b) + { return _Ios_Openmode(static_cast(__a) ^ static_cast(__b)); } + inline _Ios_Openmode + operator~(_Ios_Openmode __a) + { return _Ios_Openmode(~static_cast(__a)); } + inline const _Ios_Openmode& + operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a | __b; } + inline const _Ios_Openmode& + operator&=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a & __b; } + inline const _Ios_Openmode& + operator^=(_Ios_Openmode& __a, _Ios_Openmode __b) + { return __a = __a ^ __b; } + enum _Ios_Iostate + { + _S_goodbit = 0, + _S_badbit = 1L << 0, + _S_eofbit = 1L << 1, + _S_failbit = 1L << 2, + _S_ios_iostate_end = 1L << 16 + }; + inline _Ios_Iostate + operator&(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) & static_cast(__b)); } + inline _Ios_Iostate + operator|(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) | static_cast(__b)); } + inline _Ios_Iostate + operator^(_Ios_Iostate __a, _Ios_Iostate __b) + { return _Ios_Iostate(static_cast(__a) ^ static_cast(__b)); } + inline _Ios_Iostate + operator~(_Ios_Iostate __a) + { return _Ios_Iostate(~static_cast(__a)); } + inline const _Ios_Iostate& + operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a | __b; } + inline const _Ios_Iostate& + operator&=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a & __b; } + inline const _Ios_Iostate& + operator^=(_Ios_Iostate& __a, _Ios_Iostate __b) + { return __a = __a ^ __b; } + enum _Ios_Seekdir + { + _S_beg = 0, + _S_cur = 1, + _S_end = 2, + _S_ios_seekdir_end = 1L << 16 + }; + class ios_base + { + public: + class failure : public exception + { + public: + explicit + failure(const string& __str) throw(); + virtual + ~failure() throw(); + virtual const char* + what() const throw(); + private: + string _M_msg; + }; + typedef _Ios_Fmtflags fmtflags; + static const fmtflags boolalpha = _S_boolalpha; + static const fmtflags dec = _S_dec; + static const fmtflags fixed = _S_fixed; + static const fmtflags hex = _S_hex; + static const fmtflags internal = _S_internal; + static const fmtflags left = _S_left; + static const fmtflags oct = _S_oct; + static const fmtflags right = _S_right; + static const fmtflags scientific = _S_scientific; + static const fmtflags showbase = _S_showbase; + static const fmtflags showpoint = _S_showpoint; + static const fmtflags showpos = _S_showpos; + static const fmtflags skipws = _S_skipws; + static const fmtflags unitbuf = _S_unitbuf; + static const fmtflags uppercase = _S_uppercase; + static const fmtflags adjustfield = _S_adjustfield; + static const fmtflags basefield = _S_basefield; + static const fmtflags floatfield = _S_floatfield; + typedef _Ios_Iostate iostate; + static const iostate badbit = _S_badbit; + static const iostate eofbit = _S_eofbit; + static const iostate failbit = _S_failbit; + static const iostate goodbit = _S_goodbit; + typedef _Ios_Openmode openmode; + static const openmode app = _S_app; + static const openmode ate = _S_ate; + static const openmode binary = _S_bin; + static const openmode in = _S_in; + static const openmode out = _S_out; + static const openmode trunc = _S_trunc; + typedef _Ios_Seekdir seekdir; + static const seekdir beg = _S_beg; + static const seekdir cur = _S_cur; + static const seekdir end = _S_end; + typedef int io_state; + typedef int open_mode; + typedef int seek_dir; + typedef std::streampos streampos; + typedef std::streamoff streamoff; + enum event + { + erase_event, + imbue_event, + copyfmt_event + }; + typedef void (*event_callback) (event, ios_base&, int); + void + register_callback(event_callback __fn, int __index); + protected: + streamsize _M_precision; + streamsize _M_width; + fmtflags _M_flags; + iostate _M_exception; + iostate _M_streambuf_state; + struct _Callback_list + { + _Callback_list* _M_next; + ios_base::event_callback _M_fn; + int _M_index; + _Atomic_word _M_refcount; + _Callback_list(ios_base::event_callback __fn, int __index, + _Callback_list* __cb) + : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { } + void + _M_add_reference() { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } + int + _M_remove_reference() + { + ; + int __res = __gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1); + if (__res == 0) + { + ; + } + return __res; + } + }; + _Callback_list* _M_callbacks; + void + _M_call_callbacks(event __ev) throw(); + void + _M_dispose_callbacks(void) throw(); + struct _Words + { + void* _M_pword; + long _M_iword; + _Words() : _M_pword(0), _M_iword(0) { } + }; + _Words _M_word_zero; + enum { _S_local_word_size = 8 }; + _Words _M_local_word[_S_local_word_size]; + int _M_word_size; + _Words* _M_word; + _Words& + _M_grow_words(int __index, bool __iword); + locale _M_ios_locale; + void + _M_init() throw(); + public: + class Init + { + friend class ios_base; + public: + Init(); + ~Init(); + private: + static _Atomic_word _S_refcount; + static bool _S_synced_with_stdio; + }; + fmtflags + flags() const + { return _M_flags; } + fmtflags + flags(fmtflags __fmtfl) + { + fmtflags __old = _M_flags; + _M_flags = __fmtfl; + return __old; + } + fmtflags + setf(fmtflags __fmtfl) + { + fmtflags __old = _M_flags; + _M_flags |= __fmtfl; + return __old; + } + fmtflags + setf(fmtflags __fmtfl, fmtflags __mask) + { + fmtflags __old = _M_flags; + _M_flags &= ~__mask; + _M_flags |= (__fmtfl & __mask); + return __old; + } + void + unsetf(fmtflags __mask) + { _M_flags &= ~__mask; } + streamsize + precision() const + { return _M_precision; } + streamsize + precision(streamsize __prec) + { + streamsize __old = _M_precision; + _M_precision = __prec; + return __old; + } + streamsize + width() const + { return _M_width; } + streamsize + width(streamsize __wide) + { + streamsize __old = _M_width; + _M_width = __wide; + return __old; + } + static bool + sync_with_stdio(bool __sync = true); + locale + imbue(const locale& __loc) throw(); + locale + getloc() const + { return _M_ios_locale; } + const locale& + _M_getloc() const + { return _M_ios_locale; } + static int + xalloc() throw(); + long& + iword(int __ix) + { + _Words& __word = (__ix < _M_word_size) + ? _M_word[__ix] : _M_grow_words(__ix, true); + return __word._M_iword; + } + void*& + pword(int __ix) + { + _Words& __word = (__ix < _M_word_size) + ? _M_word[__ix] : _M_grow_words(__ix, false); + return __word._M_pword; + } + virtual ~ios_base(); + protected: + ios_base() throw (); + private: + ios_base(const ios_base&); + ios_base& + operator=(const ios_base&); + }; + inline ios_base& + boolalpha(ios_base& __base) + { + __base.setf(ios_base::boolalpha); + return __base; + } + inline ios_base& + noboolalpha(ios_base& __base) + { + __base.unsetf(ios_base::boolalpha); + return __base; + } + inline ios_base& + showbase(ios_base& __base) + { + __base.setf(ios_base::showbase); + return __base; + } + inline ios_base& + noshowbase(ios_base& __base) + { + __base.unsetf(ios_base::showbase); + return __base; + } + inline ios_base& + showpoint(ios_base& __base) + { + __base.setf(ios_base::showpoint); + return __base; + } + inline ios_base& + noshowpoint(ios_base& __base) + { + __base.unsetf(ios_base::showpoint); + return __base; + } + inline ios_base& + showpos(ios_base& __base) + { + __base.setf(ios_base::showpos); + return __base; + } + inline ios_base& + noshowpos(ios_base& __base) + { + __base.unsetf(ios_base::showpos); + return __base; + } + inline ios_base& + skipws(ios_base& __base) + { + __base.setf(ios_base::skipws); + return __base; + } + inline ios_base& + noskipws(ios_base& __base) + { + __base.unsetf(ios_base::skipws); + return __base; + } + inline ios_base& + uppercase(ios_base& __base) + { + __base.setf(ios_base::uppercase); + return __base; + } + inline ios_base& + nouppercase(ios_base& __base) + { + __base.unsetf(ios_base::uppercase); + return __base; + } + inline ios_base& + unitbuf(ios_base& __base) + { + __base.setf(ios_base::unitbuf); + return __base; + } + inline ios_base& + nounitbuf(ios_base& __base) + { + __base.unsetf(ios_base::unitbuf); + return __base; + } + inline ios_base& + internal(ios_base& __base) + { + __base.setf(ios_base::internal, ios_base::adjustfield); + return __base; + } + inline ios_base& + left(ios_base& __base) + { + __base.setf(ios_base::left, ios_base::adjustfield); + return __base; + } + inline ios_base& + right(ios_base& __base) + { + __base.setf(ios_base::right, ios_base::adjustfield); + return __base; + } + inline ios_base& + dec(ios_base& __base) + { + __base.setf(ios_base::dec, ios_base::basefield); + return __base; + } + inline ios_base& + hex(ios_base& __base) + { + __base.setf(ios_base::hex, ios_base::basefield); + return __base; + } + inline ios_base& + oct(ios_base& __base) + { + __base.setf(ios_base::oct, ios_base::basefield); + return __base; + } + inline ios_base& + fixed(ios_base& __base) + { + __base.setf(ios_base::fixed, ios_base::floatfield); + return __base; + } + inline ios_base& + scientific(ios_base& __base) + { + __base.setf(ios_base::scientific, ios_base::floatfield); + return __base; + } +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + streamsize + __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>*, + basic_streambuf<_CharT, _Traits>*, bool&); + template + class basic_streambuf + { + public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename traits_type::int_type int_type; + typedef typename traits_type::pos_type pos_type; + typedef typename traits_type::off_type off_type; + typedef basic_streambuf __streambuf_type; + friend class basic_ios; + friend class basic_istream; + friend class basic_ostream; + friend class istreambuf_iterator; + friend class ostreambuf_iterator; + friend streamsize + __copy_streambufs_eof<>(__streambuf_type*, __streambuf_type*, bool&); + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + _CharT2*>::__type + __copy_move_a2(istreambuf_iterator<_CharT2>, + istreambuf_iterator<_CharT2>, _CharT2*); + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + istreambuf_iterator<_CharT2> >::__type + find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + const _CharT2&); + template + friend basic_istream<_CharT2, _Traits2>& + operator>>(basic_istream<_CharT2, _Traits2>&, _CharT2*); + template + friend basic_istream<_CharT2, _Traits2>& + operator>>(basic_istream<_CharT2, _Traits2>&, + basic_string<_CharT2, _Traits2, _Alloc>&); + template + friend basic_istream<_CharT2, _Traits2>& + getline(basic_istream<_CharT2, _Traits2>&, + basic_string<_CharT2, _Traits2, _Alloc>&, _CharT2); + protected: + char_type* _M_in_beg; + char_type* _M_in_cur; + char_type* _M_in_end; + char_type* _M_out_beg; + char_type* _M_out_cur; + char_type* _M_out_end; + locale _M_buf_locale; + public: + virtual + ~basic_streambuf() + { } + locale + pubimbue(const locale &__loc) + { + locale __tmp(this->getloc()); + this->imbue(__loc); + _M_buf_locale = __loc; + return __tmp; + } + locale + getloc() const + { return _M_buf_locale; } + __streambuf_type* + pubsetbuf(char_type* __s, streamsize __n) + { return this->setbuf(__s, __n); } + pos_type + pubseekoff(off_type __off, ios_base::seekdir __way, + ios_base::openmode __mode = ios_base::in | ios_base::out) + { return this->seekoff(__off, __way, __mode); } + pos_type + pubseekpos(pos_type __sp, + ios_base::openmode __mode = ios_base::in | ios_base::out) + { return this->seekpos(__sp, __mode); } + int + pubsync() { return this->sync(); } + streamsize + in_avail() + { + const streamsize __ret = this->egptr() - this->gptr(); + return __ret ? __ret : this->showmanyc(); + } + int_type + snextc() + { + int_type __ret = traits_type::eof(); + if (__builtin_expect(!traits_type::eq_int_type(this->sbumpc(), + __ret), true)) + __ret = this->sgetc(); + return __ret; + } + int_type + sbumpc() + { + int_type __ret; + if (__builtin_expect(this->gptr() < this->egptr(), true)) + { + __ret = traits_type::to_int_type(*this->gptr()); + this->gbump(1); + } + else + __ret = this->uflow(); + return __ret; + } + int_type + sgetc() + { + int_type __ret; + if (__builtin_expect(this->gptr() < this->egptr(), true)) + __ret = traits_type::to_int_type(*this->gptr()); + else + __ret = this->underflow(); + return __ret; + } + streamsize + sgetn(char_type* __s, streamsize __n) + { return this->xsgetn(__s, __n); } + int_type + sputbackc(char_type __c) + { + int_type __ret; + const bool __testpos = this->eback() < this->gptr(); + if (__builtin_expect(!__testpos || + !traits_type::eq(__c, this->gptr()[-1]), false)) + __ret = this->pbackfail(traits_type::to_int_type(__c)); + else + { + this->gbump(-1); + __ret = traits_type::to_int_type(*this->gptr()); + } + return __ret; + } + int_type + sungetc() + { + int_type __ret; + if (__builtin_expect(this->eback() < this->gptr(), true)) + { + this->gbump(-1); + __ret = traits_type::to_int_type(*this->gptr()); + } + else + __ret = this->pbackfail(); + return __ret; + } + int_type + sputc(char_type __c) + { + int_type __ret; + if (__builtin_expect(this->pptr() < this->epptr(), true)) + { + *this->pptr() = __c; + this->pbump(1); + __ret = traits_type::to_int_type(__c); + } + else + __ret = this->overflow(traits_type::to_int_type(__c)); + return __ret; + } + streamsize + sputn(const char_type* __s, streamsize __n) + { return this->xsputn(__s, __n); } + protected: + basic_streambuf() + : _M_in_beg(0), _M_in_cur(0), _M_in_end(0), + _M_out_beg(0), _M_out_cur(0), _M_out_end(0), + _M_buf_locale(locale()) + { } + char_type* + eback() const { return _M_in_beg; } + char_type* + gptr() const { return _M_in_cur; } + char_type* + egptr() const { return _M_in_end; } + void + gbump(int __n) { _M_in_cur += __n; } + void + setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) + { + _M_in_beg = __gbeg; + _M_in_cur = __gnext; + _M_in_end = __gend; + } + char_type* + pbase() const { return _M_out_beg; } + char_type* + pptr() const { return _M_out_cur; } + char_type* + epptr() const { return _M_out_end; } + void + pbump(int __n) { _M_out_cur += __n; } + void + setp(char_type* __pbeg, char_type* __pend) + { + _M_out_beg = _M_out_cur = __pbeg; + _M_out_end = __pend; + } + virtual void + imbue(const locale&) + { } + virtual basic_streambuf* + setbuf(char_type*, streamsize) + { return this; } + virtual pos_type + seekoff(off_type, ios_base::seekdir, + ios_base::openmode = ios_base::in | ios_base::out) + { return pos_type(off_type(-1)); } + virtual pos_type + seekpos(pos_type, + ios_base::openmode = ios_base::in | ios_base::out) + { return pos_type(off_type(-1)); } + virtual int + sync() { return 0; } + virtual streamsize + showmanyc() { return 0; } + virtual streamsize + xsgetn(char_type* __s, streamsize __n); + virtual int_type + underflow() + { return traits_type::eof(); } + virtual int_type + uflow() + { + int_type __ret = traits_type::eof(); + const bool __testeof = traits_type::eq_int_type(this->underflow(), + __ret); + if (!__testeof) + { + __ret = traits_type::to_int_type(*this->gptr()); + this->gbump(1); + } + return __ret; + } + virtual int_type + pbackfail(int_type = traits_type::eof()) + { return traits_type::eof(); } + virtual streamsize + xsputn(const char_type* __s, streamsize __n); + virtual int_type + overflow(int_type = traits_type::eof()) + { return traits_type::eof(); } + public: + void + stossc() + { + if (this->gptr() < this->egptr()) + this->gbump(1); + else + this->uflow(); + } + void + __safe_gbump(streamsize __n) { _M_in_cur += __n; } + void + __safe_pbump(streamsize __n) { _M_out_cur += __n; } + private: + basic_streambuf(const __streambuf_type& __sb) + : _M_in_beg(__sb._M_in_beg), _M_in_cur(__sb._M_in_cur), + _M_in_end(__sb._M_in_end), _M_out_beg(__sb._M_out_beg), + _M_out_cur(__sb._M_out_cur), _M_out_end(__sb._M_out_cur), + _M_buf_locale(__sb._M_buf_locale) + { } + __streambuf_type& + operator=(const __streambuf_type&) { return *this; }; + }; + template<> + streamsize + __copy_streambufs_eof(basic_streambuf* __sbin, + basic_streambuf* __sbout, bool& __ineof); + template<> + streamsize + __copy_streambufs_eof(basic_streambuf* __sbin, + basic_streambuf* __sbout, bool& __ineof); +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + streamsize + basic_streambuf<_CharT, _Traits>:: + xsgetn(char_type* __s, streamsize __n) + { + streamsize __ret = 0; + while (__ret < __n) + { + const streamsize __buf_len = this->egptr() - this->gptr(); + if (__buf_len) + { + const streamsize __remaining = __n - __ret; + const streamsize __len = std::min(__buf_len, __remaining); + traits_type::copy(__s, this->gptr(), __len); + __ret += __len; + __s += __len; + this->__safe_gbump(__len); + } + if (__ret < __n) + { + const int_type __c = this->uflow(); + if (!traits_type::eq_int_type(__c, traits_type::eof())) + { + traits_type::assign(*__s++, traits_type::to_char_type(__c)); + ++__ret; + } + else + break; + } + } + return __ret; + } + template + streamsize + basic_streambuf<_CharT, _Traits>:: + xsputn(const char_type* __s, streamsize __n) + { + streamsize __ret = 0; + while (__ret < __n) + { + const streamsize __buf_len = this->epptr() - this->pptr(); + if (__buf_len) + { + const streamsize __remaining = __n - __ret; + const streamsize __len = std::min(__buf_len, __remaining); + traits_type::copy(this->pptr(), __s, __len); + __ret += __len; + __s += __len; + this->__safe_pbump(__len); + } + if (__ret < __n) + { + int_type __c = this->overflow(traits_type::to_int_type(*__s)); + if (!traits_type::eq_int_type(__c, traits_type::eof())) + { + ++__ret; + ++__s; + } + else + break; + } + } + return __ret; + } + template + streamsize + __copy_streambufs_eof(basic_streambuf<_CharT, _Traits>* __sbin, + basic_streambuf<_CharT, _Traits>* __sbout, + bool& __ineof) + { + streamsize __ret = 0; + __ineof = true; + typename _Traits::int_type __c = __sbin->sgetc(); + while (!_Traits::eq_int_type(__c, _Traits::eof())) + { + __c = __sbout->sputc(_Traits::to_char_type(__c)); + if (_Traits::eq_int_type(__c, _Traits::eof())) + { + __ineof = false; + break; + } + ++__ret; + __c = __sbin->snextc(); + } + return __ret; + } + template + inline streamsize + __copy_streambufs(basic_streambuf<_CharT, _Traits>* __sbin, + basic_streambuf<_CharT, _Traits>* __sbout) + { + bool __ineof; + return __copy_streambufs_eof(__sbin, __sbout, __ineof); + } + extern template class basic_streambuf; + extern template + streamsize + __copy_streambufs(basic_streambuf*, + basic_streambuf*); + extern template + streamsize + __copy_streambufs_eof(basic_streambuf*, + basic_streambuf*, bool&); + extern template class basic_streambuf; + extern template + streamsize + __copy_streambufs(basic_streambuf*, + basic_streambuf*); + extern template + streamsize + __copy_streambufs_eof(basic_streambuf*, + basic_streambuf*, bool&); +} +typedef unsigned long int wctype_t; +enum +{ + __ISwupper = 0, + __ISwlower = 1, + __ISwalpha = 2, + __ISwdigit = 3, + __ISwxdigit = 4, + __ISwspace = 5, + __ISwprint = 6, + __ISwgraph = 7, + __ISwblank = 8, + __ISwcntrl = 9, + __ISwpunct = 10, + __ISwalnum = 11, + _ISwupper = (1 << (__ISwupper)), + _ISwlower = (1 << (__ISwlower)), + _ISwalpha = (1 << (__ISwalpha)), + _ISwdigit = (1 << (__ISwdigit)), + _ISwxdigit = (1 << (__ISwxdigit)), + _ISwspace = (1 << (__ISwspace)), + _ISwprint = (1 << (__ISwprint)), + _ISwgraph = (1 << (__ISwgraph)), + _ISwblank = (1 << (__ISwblank)), + _ISwcntrl = (1 << (__ISwcntrl)), + _ISwpunct = (1 << (__ISwpunct)), + _ISwalnum = (1 << (__ISwalnum)) +}; +extern "C" { +extern int iswalnum (wint_t __wc) throw (); +extern int iswalpha (wint_t __wc) throw (); +extern int iswcntrl (wint_t __wc) throw (); +extern int iswdigit (wint_t __wc) throw (); +extern int iswgraph (wint_t __wc) throw (); +extern int iswlower (wint_t __wc) throw (); +extern int iswprint (wint_t __wc) throw (); +extern int iswpunct (wint_t __wc) throw (); +extern int iswspace (wint_t __wc) throw (); +extern int iswupper (wint_t __wc) throw (); +extern int iswxdigit (wint_t __wc) throw (); +extern int iswblank (wint_t __wc) throw (); +extern wctype_t wctype (__const char *__property) throw (); +extern int iswctype (wint_t __wc, wctype_t __desc) throw (); +typedef __const __int32_t *wctrans_t; +extern wint_t towlower (wint_t __wc) throw (); +extern wint_t towupper (wint_t __wc) throw (); +} +extern "C" { +extern wctrans_t wctrans (__const char *__property) throw (); +extern wint_t towctrans (wint_t __wc, wctrans_t __desc) throw (); +extern int iswalnum_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswalpha_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswcntrl_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswdigit_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswgraph_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswlower_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswprint_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswpunct_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswspace_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswupper_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswxdigit_l (wint_t __wc, __locale_t __locale) throw (); +extern int iswblank_l (wint_t __wc, __locale_t __locale) throw (); +extern wctype_t wctype_l (__const char *__property, __locale_t __locale) + throw (); +extern int iswctype_l (wint_t __wc, wctype_t __desc, __locale_t __locale) + throw (); +extern wint_t towlower_l (wint_t __wc, __locale_t __locale) throw (); +extern wint_t towupper_l (wint_t __wc, __locale_t __locale) throw (); +extern wctrans_t wctrans_l (__const char *__property, __locale_t __locale) + throw (); +extern wint_t towctrans_l (wint_t __wc, wctrans_t __desc, + __locale_t __locale) throw (); +} +namespace std +{ + using ::wctrans_t; + using ::wctype_t; + using ::wint_t; + using ::iswalnum; + using ::iswalpha; + using ::iswblank; + using ::iswcntrl; + using ::iswctype; + using ::iswdigit; + using ::iswgraph; + using ::iswlower; + using ::iswprint; + using ::iswpunct; + using ::iswspace; + using ::iswupper; + using ::iswxdigit; + using ::towctrans; + using ::towlower; + using ::towupper; + using ::wctrans; + using ::wctype; +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + struct ctype_base + { + typedef const int* __to_type; + typedef unsigned short mask; + static const mask upper = _ISupper; + static const mask lower = _ISlower; + static const mask alpha = _ISalpha; + static const mask digit = _ISdigit; + static const mask xdigit = _ISxdigit; + static const mask space = _ISspace; + static const mask print = _ISprint; + static const mask graph = _ISalpha | _ISdigit | _ISpunct; + static const mask cntrl = _IScntrl; + static const mask punct = _ISpunct; + static const mask alnum = _ISalpha | _ISdigit; + }; +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + class istreambuf_iterator + : public iterator + { + public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename _Traits::int_type int_type; + typedef basic_streambuf<_CharT, _Traits> streambuf_type; + typedef basic_istream<_CharT, _Traits> istream_type; + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + ostreambuf_iterator<_CharT2> >::__type + copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + ostreambuf_iterator<_CharT2>); + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + _CharT2*>::__type + __copy_move_a2(istreambuf_iterator<_CharT2>, + istreambuf_iterator<_CharT2>, _CharT2*); + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + istreambuf_iterator<_CharT2> >::__type + find(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + const _CharT2&); + private: + mutable streambuf_type* _M_sbuf; + mutable int_type _M_c; + public: + istreambuf_iterator() throw() + : _M_sbuf(0), _M_c(traits_type::eof()) { } + istreambuf_iterator(istream_type& __s) throw() + : _M_sbuf(__s.rdbuf()), _M_c(traits_type::eof()) { } + istreambuf_iterator(streambuf_type* __s) throw() + : _M_sbuf(__s), _M_c(traits_type::eof()) { } + char_type + operator*() const + { + return traits_type::to_char_type(_M_get()); + } + istreambuf_iterator& + operator++() + { + ; + if (_M_sbuf) + { + _M_sbuf->sbumpc(); + _M_c = traits_type::eof(); + } + return *this; + } + istreambuf_iterator + operator++(int) + { + ; + istreambuf_iterator __old = *this; + if (_M_sbuf) + { + __old._M_c = _M_sbuf->sbumpc(); + _M_c = traits_type::eof(); + } + return __old; + } + bool + equal(const istreambuf_iterator& __b) const + { return _M_at_eof() == __b._M_at_eof(); } + private: + int_type + _M_get() const + { + const int_type __eof = traits_type::eof(); + int_type __ret = __eof; + if (_M_sbuf) + { + if (!traits_type::eq_int_type(_M_c, __eof)) + __ret = _M_c; + else if (!traits_type::eq_int_type((__ret = _M_sbuf->sgetc()), + __eof)) + _M_c = __ret; + else + _M_sbuf = 0; + } + return __ret; + } + bool + _M_at_eof() const + { + const int_type __eof = traits_type::eof(); + return traits_type::eq_int_type(_M_get(), __eof); + } + }; + template + inline bool + operator==(const istreambuf_iterator<_CharT, _Traits>& __a, + const istreambuf_iterator<_CharT, _Traits>& __b) + { return __a.equal(__b); } + template + inline bool + operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, + const istreambuf_iterator<_CharT, _Traits>& __b) + { return !__a.equal(__b); } + template + class ostreambuf_iterator + : public iterator + { + public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_streambuf<_CharT, _Traits> streambuf_type; + typedef basic_ostream<_CharT, _Traits> ostream_type; + template + friend typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, + ostreambuf_iterator<_CharT2> >::__type + copy(istreambuf_iterator<_CharT2>, istreambuf_iterator<_CharT2>, + ostreambuf_iterator<_CharT2>); + private: + streambuf_type* _M_sbuf; + bool _M_failed; + public: + ostreambuf_iterator(ostream_type& __s) throw () + : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { } + ostreambuf_iterator(streambuf_type* __s) throw () + : _M_sbuf(__s), _M_failed(!_M_sbuf) { } + ostreambuf_iterator& + operator=(_CharT __c) + { + if (!_M_failed && + _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof())) + _M_failed = true; + return *this; + } + ostreambuf_iterator& + operator*() + { return *this; } + ostreambuf_iterator& + operator++(int) + { return *this; } + ostreambuf_iterator& + operator++() + { return *this; } + bool + failed() const throw() + { return _M_failed; } + ostreambuf_iterator& + _M_put(const _CharT* __ws, streamsize __len) + { + if (__builtin_expect(!_M_failed, true) + && __builtin_expect(this->_M_sbuf->sputn(__ws, __len) != __len, + false)) + _M_failed = true; + return *this; + } + }; + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT> >::__type + copy(istreambuf_iterator<_CharT> __first, + istreambuf_iterator<_CharT> __last, + ostreambuf_iterator<_CharT> __result) + { + if (__first._M_sbuf && !__last._M_sbuf && !__result._M_failed) + { + bool __ineof; + __copy_streambufs_eof(__first._M_sbuf, __result._M_sbuf, __ineof); + if (!__ineof) + __result._M_failed = true; + } + return __result; + } + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT> >::__type + __copy_move_a2(_CharT* __first, _CharT* __last, + ostreambuf_iterator<_CharT> __result) + { + const streamsize __num = __last - __first; + if (__num > 0) + __result._M_put(__first, __num); + return __result; + } + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + ostreambuf_iterator<_CharT> >::__type + __copy_move_a2(const _CharT* __first, const _CharT* __last, + ostreambuf_iterator<_CharT> __result) + { + const streamsize __num = __last - __first; + if (__num > 0) + __result._M_put(__first, __num); + return __result; + } + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + _CharT*>::__type + __copy_move_a2(istreambuf_iterator<_CharT> __first, + istreambuf_iterator<_CharT> __last, _CharT* __result) + { + typedef istreambuf_iterator<_CharT> __is_iterator_type; + typedef typename __is_iterator_type::traits_type traits_type; + typedef typename __is_iterator_type::streambuf_type streambuf_type; + typedef typename traits_type::int_type int_type; + if (__first._M_sbuf && !__last._M_sbuf) + { + streambuf_type* __sb = __first._M_sbuf; + int_type __c = __sb->sgetc(); + while (!traits_type::eq_int_type(__c, traits_type::eof())) + { + const streamsize __n = __sb->egptr() - __sb->gptr(); + if (__n > 1) + { + traits_type::copy(__result, __sb->gptr(), __n); + __sb->__safe_gbump(__n); + __result += __n; + __c = __sb->underflow(); + } + else + { + *__result++ = traits_type::to_char_type(__c); + __c = __sb->snextc(); + } + } + } + return __result; + } + template + typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, + istreambuf_iterator<_CharT> >::__type + find(istreambuf_iterator<_CharT> __first, + istreambuf_iterator<_CharT> __last, const _CharT& __val) + { + typedef istreambuf_iterator<_CharT> __is_iterator_type; + typedef typename __is_iterator_type::traits_type traits_type; + typedef typename __is_iterator_type::streambuf_type streambuf_type; + typedef typename traits_type::int_type int_type; + if (__first._M_sbuf && !__last._M_sbuf) + { + const int_type __ival = traits_type::to_int_type(__val); + streambuf_type* __sb = __first._M_sbuf; + int_type __c = __sb->sgetc(); + while (!traits_type::eq_int_type(__c, traits_type::eof()) + && !traits_type::eq_int_type(__c, __ival)) + { + streamsize __n = __sb->egptr() - __sb->gptr(); + if (__n > 1) + { + const _CharT* __p = traits_type::find(__sb->gptr(), + __n, __val); + if (__p) + __n = __p - __sb->gptr(); + __sb->__safe_gbump(__n); + __c = __sb->sgetc(); + } + else + __c = __sb->snextc(); + } + if (!traits_type::eq_int_type(__c, traits_type::eof())) + __first._M_c = __c; + else + __first._M_sbuf = 0; + } + return __first; + } +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + void + __convert_to_v(const char*, _Tp&, ios_base::iostate&, + const __c_locale&) throw(); + template<> + void + __convert_to_v(const char*, float&, ios_base::iostate&, + const __c_locale&) throw(); + template<> + void + __convert_to_v(const char*, double&, ios_base::iostate&, + const __c_locale&) throw(); + template<> + void + __convert_to_v(const char*, long double&, ios_base::iostate&, + const __c_locale&) throw(); + template + struct __pad + { + static void + _S_pad(ios_base& __io, _CharT __fill, _CharT* __news, + const _CharT* __olds, streamsize __newlen, streamsize __oldlen); + }; + template + _CharT* + __add_grouping(_CharT* __s, _CharT __sep, + const char* __gbeg, size_t __gsize, + const _CharT* __first, const _CharT* __last); + template + inline + ostreambuf_iterator<_CharT> + __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int __len) + { + __s._M_put(__ws, __len); + return __s; + } + template + inline + _OutIter + __write(_OutIter __s, const _CharT* __ws, int __len) + { + for (int __j = 0; __j < __len; __j++, ++__s) + *__s = __ws[__j]; + return __s; + } + template + class __ctype_abstract_base : public locale::facet, public ctype_base + { + public: + typedef _CharT char_type; + bool + is(mask __m, char_type __c) const + { return this->do_is(__m, __c); } + const char_type* + is(const char_type *__lo, const char_type *__hi, mask *__vec) const + { return this->do_is(__lo, __hi, __vec); } + const char_type* + scan_is(mask __m, const char_type* __lo, const char_type* __hi) const + { return this->do_scan_is(__m, __lo, __hi); } + const char_type* + scan_not(mask __m, const char_type* __lo, const char_type* __hi) const + { return this->do_scan_not(__m, __lo, __hi); } + char_type + toupper(char_type __c) const + { return this->do_toupper(__c); } + const char_type* + toupper(char_type *__lo, const char_type* __hi) const + { return this->do_toupper(__lo, __hi); } + char_type + tolower(char_type __c) const + { return this->do_tolower(__c); } + const char_type* + tolower(char_type* __lo, const char_type* __hi) const + { return this->do_tolower(__lo, __hi); } + char_type + widen(char __c) const + { return this->do_widen(__c); } + const char* + widen(const char* __lo, const char* __hi, char_type* __to) const + { return this->do_widen(__lo, __hi, __to); } + char + narrow(char_type __c, char __dfault) const + { return this->do_narrow(__c, __dfault); } + const char_type* + narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char *__to) const + { return this->do_narrow(__lo, __hi, __dfault, __to); } + protected: + explicit + __ctype_abstract_base(size_t __refs = 0): facet(__refs) { } + virtual + ~__ctype_abstract_base() { } + virtual bool + do_is(mask __m, char_type __c) const = 0; + virtual const char_type* + do_is(const char_type* __lo, const char_type* __hi, + mask* __vec) const = 0; + virtual const char_type* + do_scan_is(mask __m, const char_type* __lo, + const char_type* __hi) const = 0; + virtual const char_type* + do_scan_not(mask __m, const char_type* __lo, + const char_type* __hi) const = 0; + virtual char_type + do_toupper(char_type) const = 0; + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const = 0; + virtual char_type + do_tolower(char_type) const = 0; + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const = 0; + virtual char_type + do_widen(char) const = 0; + virtual const char* + do_widen(const char* __lo, const char* __hi, + char_type* __dest) const = 0; + virtual char + do_narrow(char_type, char __dfault) const = 0; + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char* __dest) const = 0; + }; + template + class ctype : public __ctype_abstract_base<_CharT> + { + public: + typedef _CharT char_type; + typedef typename __ctype_abstract_base<_CharT>::mask mask; + static locale::id id; + explicit + ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { } + protected: + virtual + ~ctype(); + virtual bool + do_is(mask __m, char_type __c) const; + virtual const char_type* + do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; + virtual const char_type* + do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; + virtual const char_type* + do_scan_not(mask __m, const char_type* __lo, + const char_type* __hi) const; + virtual char_type + do_toupper(char_type __c) const; + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const; + virtual char_type + do_tolower(char_type __c) const; + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const; + virtual char_type + do_widen(char __c) const; + virtual const char* + do_widen(const char* __lo, const char* __hi, char_type* __dest) const; + virtual char + do_narrow(char_type, char __dfault) const; + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char* __dest) const; + }; + template + locale::id ctype<_CharT>::id; + template<> + class ctype : public locale::facet, public ctype_base + { + public: + typedef char char_type; + protected: + __c_locale _M_c_locale_ctype; + bool _M_del; + __to_type _M_toupper; + __to_type _M_tolower; + const mask* _M_table; + mutable char _M_widen_ok; + mutable char _M_widen[1 + static_cast(-1)]; + mutable char _M_narrow[1 + static_cast(-1)]; + mutable char _M_narrow_ok; + public: + static locale::id id; + static const size_t table_size = 1 + static_cast(-1); + explicit + ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0); + explicit + ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false, + size_t __refs = 0); + inline bool + is(mask __m, char __c) const; + inline const char* + is(const char* __lo, const char* __hi, mask* __vec) const; + inline const char* + scan_is(mask __m, const char* __lo, const char* __hi) const; + inline const char* + scan_not(mask __m, const char* __lo, const char* __hi) const; + char_type + toupper(char_type __c) const + { return this->do_toupper(__c); } + const char_type* + toupper(char_type *__lo, const char_type* __hi) const + { return this->do_toupper(__lo, __hi); } + char_type + tolower(char_type __c) const + { return this->do_tolower(__c); } + const char_type* + tolower(char_type* __lo, const char_type* __hi) const + { return this->do_tolower(__lo, __hi); } + char_type + widen(char __c) const + { + if (_M_widen_ok) + return _M_widen[static_cast(__c)]; + this->_M_widen_init(); + return this->do_widen(__c); + } + const char* + widen(const char* __lo, const char* __hi, char_type* __to) const + { + if (_M_widen_ok == 1) + { + __builtin_memcpy(__to, __lo, __hi - __lo); + return __hi; + } + if (!_M_widen_ok) + _M_widen_init(); + return this->do_widen(__lo, __hi, __to); + } + char + narrow(char_type __c, char __dfault) const + { + if (_M_narrow[static_cast(__c)]) + return _M_narrow[static_cast(__c)]; + const char __t = do_narrow(__c, __dfault); + if (__t != __dfault) + _M_narrow[static_cast(__c)] = __t; + return __t; + } + const char_type* + narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char *__to) const + { + if (__builtin_expect(_M_narrow_ok == 1, true)) + { + __builtin_memcpy(__to, __lo, __hi - __lo); + return __hi; + } + if (!_M_narrow_ok) + _M_narrow_init(); + return this->do_narrow(__lo, __hi, __dfault, __to); + } + const mask* + table() const throw() + { return _M_table; } + static const mask* + classic_table() throw(); + protected: + virtual + ~ctype(); + virtual char_type + do_toupper(char_type) const; + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const; + virtual char_type + do_tolower(char_type) const; + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const; + virtual char_type + do_widen(char __c) const + { return __c; } + virtual const char* + do_widen(const char* __lo, const char* __hi, char_type* __dest) const + { + __builtin_memcpy(__dest, __lo, __hi - __lo); + return __hi; + } + virtual char + do_narrow(char_type __c, char) const + { return __c; } + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char, char* __dest) const + { + __builtin_memcpy(__dest, __lo, __hi - __lo); + return __hi; + } + private: + void _M_narrow_init() const; + void _M_widen_init() const; + }; + template<> + class ctype : public __ctype_abstract_base + { + public: + typedef wchar_t char_type; + typedef wctype_t __wmask_type; + protected: + __c_locale _M_c_locale_ctype; + bool _M_narrow_ok; + char _M_narrow[128]; + wint_t _M_widen[1 + static_cast(-1)]; + mask _M_bit[16]; + __wmask_type _M_wmask[16]; + public: + static locale::id id; + explicit + ctype(size_t __refs = 0); + explicit + ctype(__c_locale __cloc, size_t __refs = 0); + protected: + __wmask_type + _M_convert_to_wmask(const mask __m) const throw(); + virtual + ~ctype(); + virtual bool + do_is(mask __m, char_type __c) const; + virtual const char_type* + do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const; + virtual const char_type* + do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const; + virtual const char_type* + do_scan_not(mask __m, const char_type* __lo, + const char_type* __hi) const; + virtual char_type + do_toupper(char_type) const; + virtual const char_type* + do_toupper(char_type* __lo, const char_type* __hi) const; + virtual char_type + do_tolower(char_type) const; + virtual const char_type* + do_tolower(char_type* __lo, const char_type* __hi) const; + virtual char_type + do_widen(char) const; + virtual const char* + do_widen(const char* __lo, const char* __hi, char_type* __dest) const; + virtual char + do_narrow(char_type, char __dfault) const; + virtual const char_type* + do_narrow(const char_type* __lo, const char_type* __hi, + char __dfault, char* __dest) const; + void + _M_initialize_ctype() throw(); + }; + template + class ctype_byname : public ctype<_CharT> + { + public: + typedef typename ctype<_CharT>::mask mask; + explicit + ctype_byname(const char* __s, size_t __refs = 0); + protected: + virtual + ~ctype_byname() { }; + }; + template<> + class ctype_byname : public ctype + { + public: + explicit + ctype_byname(const char* __s, size_t __refs = 0); + protected: + virtual + ~ctype_byname(); + }; + template<> + class ctype_byname : public ctype + { + public: + explicit + ctype_byname(const char* __s, size_t __refs = 0); + protected: + virtual + ~ctype_byname(); + }; +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + bool + ctype:: + is(mask __m, char __c) const + { return _M_table[static_cast(__c)] & __m; } + const char* + ctype:: + is(const char* __low, const char* __high, mask* __vec) const + { + while (__low < __high) + *__vec++ = _M_table[static_cast(*__low++)]; + return __high; + } + const char* + ctype:: + scan_is(mask __m, const char* __low, const char* __high) const + { + while (__low < __high + && !(_M_table[static_cast(*__low)] & __m)) + ++__low; + return __low; + } + const char* + ctype:: + scan_not(mask __m, const char* __low, const char* __high) const + { + while (__low < __high + && (_M_table[static_cast(*__low)] & __m) != 0) + ++__low; + return __low; + } +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + class __num_base + { + public: + enum + { + _S_ominus, + _S_oplus, + _S_ox, + _S_oX, + _S_odigits, + _S_odigits_end = _S_odigits + 16, + _S_oudigits = _S_odigits_end, + _S_oudigits_end = _S_oudigits + 16, + _S_oe = _S_odigits + 14, + _S_oE = _S_oudigits + 14, + _S_oend = _S_oudigits_end + }; + static const char* _S_atoms_out; + static const char* _S_atoms_in; + enum + { + _S_iminus, + _S_iplus, + _S_ix, + _S_iX, + _S_izero, + _S_ie = _S_izero + 14, + _S_iE = _S_izero + 20, + _S_iend = 26 + }; + static void + _S_format_float(const ios_base& __io, char* __fptr, char __mod) throw(); + }; + template + struct __numpunct_cache : public locale::facet + { + const char* _M_grouping; + size_t _M_grouping_size; + bool _M_use_grouping; + const _CharT* _M_truename; + size_t _M_truename_size; + const _CharT* _M_falsename; + size_t _M_falsename_size; + _CharT _M_decimal_point; + _CharT _M_thousands_sep; + _CharT _M_atoms_out[__num_base::_S_oend]; + _CharT _M_atoms_in[__num_base::_S_iend]; + bool _M_allocated; + __numpunct_cache(size_t __refs = 0) + : facet(__refs), _M_grouping(0), _M_grouping_size(0), + _M_use_grouping(false), + _M_truename(0), _M_truename_size(0), _M_falsename(0), + _M_falsename_size(0), _M_decimal_point(_CharT()), + _M_thousands_sep(_CharT()), _M_allocated(false) + { } + ~__numpunct_cache(); + void + _M_cache(const locale& __loc); + private: + __numpunct_cache& + operator=(const __numpunct_cache&); + explicit + __numpunct_cache(const __numpunct_cache&); + }; + template + __numpunct_cache<_CharT>::~__numpunct_cache() + { + if (_M_allocated) + { + delete [] _M_grouping; + delete [] _M_truename; + delete [] _M_falsename; + } + } + template + class numpunct : public locale::facet + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + typedef __numpunct_cache<_CharT> __cache_type; + protected: + __cache_type* _M_data; + public: + static locale::id id; + explicit + numpunct(size_t __refs = 0) + : facet(__refs), _M_data(0) + { _M_initialize_numpunct(); } + explicit + numpunct(__cache_type* __cache, size_t __refs = 0) + : facet(__refs), _M_data(__cache) + { _M_initialize_numpunct(); } + explicit + numpunct(__c_locale __cloc, size_t __refs = 0) + : facet(__refs), _M_data(0) + { _M_initialize_numpunct(__cloc); } + char_type + decimal_point() const + { return this->do_decimal_point(); } + char_type + thousands_sep() const + { return this->do_thousands_sep(); } + string + grouping() const + { return this->do_grouping(); } + string_type + truename() const + { return this->do_truename(); } + string_type + falsename() const + { return this->do_falsename(); } + protected: + virtual + ~numpunct(); + virtual char_type + do_decimal_point() const + { return _M_data->_M_decimal_point; } + virtual char_type + do_thousands_sep() const + { return _M_data->_M_thousands_sep; } + virtual string + do_grouping() const + { return _M_data->_M_grouping; } + virtual string_type + do_truename() const + { return _M_data->_M_truename; } + virtual string_type + do_falsename() const + { return _M_data->_M_falsename; } + void + _M_initialize_numpunct(__c_locale __cloc = 0); + }; + template + locale::id numpunct<_CharT>::id; + template<> + numpunct::~numpunct(); + template<> + void + numpunct::_M_initialize_numpunct(__c_locale __cloc); + template<> + numpunct::~numpunct(); + template<> + void + numpunct::_M_initialize_numpunct(__c_locale __cloc); + template + class numpunct_byname : public numpunct<_CharT> + { + public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + explicit + numpunct_byname(const char* __s, size_t __refs = 0) + : numpunct<_CharT>(__refs) + { + if (__builtin_strcmp(__s, "C") != 0 + && __builtin_strcmp(__s, "POSIX") != 0) + { + __c_locale __tmp; + this->_S_create_c_locale(__tmp, __s); + this->_M_initialize_numpunct(__tmp); + this->_S_destroy_c_locale(__tmp); + } + } + protected: + virtual + ~numpunct_byname() { } + }; +namespace __gnu_cxx_ldbl128 { + template + class num_get : public locale::facet + { + public: + typedef _CharT char_type; + typedef _InIter iter_type; + static locale::id id; + explicit + num_get(size_t __refs = 0) : facet(__refs) { } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, bool& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned short& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned int& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long long& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long long& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, float& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, double& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long double& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + iter_type + get(iter_type __in, iter_type __end, ios_base& __io, + ios_base::iostate& __err, void*& __v) const + { return this->do_get(__in, __end, __io, __err, __v); } + protected: + virtual ~num_get() { } + iter_type + _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&, + string&) const; + template + iter_type + _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&, + _ValueT&) const; + template + typename __gnu_cxx::__enable_if<__is_char<_CharT2>::__value, int>::__type + _M_find(const _CharT2*, size_t __len, _CharT2 __c) const + { + int __ret = -1; + if (__len <= 10) + { + if (__c >= _CharT2('0') && __c < _CharT2(_CharT2('0') + __len)) + __ret = __c - _CharT2('0'); + } + else + { + if (__c >= _CharT2('0') && __c <= _CharT2('9')) + __ret = __c - _CharT2('0'); + else if (__c >= _CharT2('a') && __c <= _CharT2('f')) + __ret = 10 + (__c - _CharT2('a')); + else if (__c >= _CharT2('A') && __c <= _CharT2('F')) + __ret = 10 + (__c - _CharT2('A')); + } + return __ret; + } + template + typename __gnu_cxx::__enable_if::__value, + int>::__type + _M_find(const _CharT2* __zero, size_t __len, _CharT2 __c) const + { + int __ret = -1; + const char_type* __q = char_traits<_CharT2>::find(__zero, __len, __c); + if (__q) + { + __ret = __q - __zero; + if (__ret > 15) + __ret -= 6; + } + return __ret; + } + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const; + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned short& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned int& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long long& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + virtual iter_type + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, unsigned long long& __v) const + { return _M_extract_int(__beg, __end, __io, __err, __v); } + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + float&) const; + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + double&) const; + virtual iter_type + __do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + double&) const; + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + void*&) const; + virtual iter_type + do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, + long double&) const; + }; + template + locale::id num_get<_CharT, _InIter>::id; + template + class num_put : public locale::facet + { + public: + typedef _CharT char_type; + typedef _OutIter iter_type; + static locale::id id; + explicit + num_put(size_t __refs = 0) : facet(__refs) { } + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, bool __v) const + { return this->do_put(__s, __f, __fill, __v); } + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, long __v) const + { return this->do_put(__s, __f, __fill, __v); } + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + unsigned long __v) const + { return this->do_put(__s, __f, __fill, __v); } + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, long long __v) const + { return this->do_put(__s, __f, __fill, __v); } + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + unsigned long long __v) const + { return this->do_put(__s, __f, __fill, __v); } + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, double __v) const + { return this->do_put(__s, __f, __fill, __v); } + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + long double __v) const + { return this->do_put(__s, __f, __fill, __v); } + iter_type + put(iter_type __s, ios_base& __f, char_type __fill, + const void* __v) const + { return this->do_put(__s, __f, __fill, __v); } + protected: + template + iter_type + _M_insert_float(iter_type, ios_base& __io, char_type __fill, + char __mod, _ValueT __v) const; + void + _M_group_float(const char* __grouping, size_t __grouping_size, + char_type __sep, const char_type* __p, char_type* __new, + char_type* __cs, int& __len) const; + template + iter_type + _M_insert_int(iter_type, ios_base& __io, char_type __fill, + _ValueT __v) const; + void + _M_group_int(const char* __grouping, size_t __grouping_size, + char_type __sep, ios_base& __io, char_type* __new, + char_type* __cs, int& __len) const; + void + _M_pad(char_type __fill, streamsize __w, ios_base& __io, + char_type* __new, const char_type* __cs, int& __len) const; + virtual + ~num_put() { }; + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, bool __v) const; + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const + { return _M_insert_int(__s, __io, __fill, __v); } + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, + unsigned long __v) const + { return _M_insert_int(__s, __io, __fill, __v); } + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, + long long __v) const + { return _M_insert_int(__s, __io, __fill, __v); } + virtual iter_type + do_put(iter_type __s, ios_base& __io, char_type __fill, + unsigned long long __v) const + { return _M_insert_int(__s, __io, __fill, __v); } + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, double __v) const; + virtual iter_type + __do_put(iter_type, ios_base&, char_type __fill, double __v) const; + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, const void* __v) const; + virtual iter_type + do_put(iter_type, ios_base&, char_type __fill, long double __v) const; + }; + template + locale::id num_put<_CharT, _OutIter>::id; +} + template + inline bool + isspace(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::space, __c); } + template + inline bool + isprint(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::print, __c); } + template + inline bool + iscntrl(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::cntrl, __c); } + template + inline bool + isupper(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::upper, __c); } + template + inline bool + islower(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::lower, __c); } + template + inline bool + isalpha(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::alpha, __c); } + template + inline bool + isdigit(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::digit, __c); } + template + inline bool + ispunct(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::punct, __c); } + template + inline bool + isxdigit(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::xdigit, __c); } + template + inline bool + isalnum(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::alnum, __c); } + template + inline bool + isgraph(_CharT __c, const locale& __loc) + { return use_facet >(__loc).is(ctype_base::graph, __c); } + template + inline _CharT + toupper(_CharT __c, const locale& __loc) + { return use_facet >(__loc).toupper(__c); } + template + inline _CharT + tolower(_CharT __c, const locale& __loc) + { return use_facet >(__loc).tolower(__c); } +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + struct __use_cache + { + const _Facet* + operator() (const locale& __loc) const; + }; + template + struct __use_cache<__numpunct_cache<_CharT> > + { + const __numpunct_cache<_CharT>* + operator() (const locale& __loc) const + { + const size_t __i = numpunct<_CharT>::id._M_id(); + const locale::facet** __caches = __loc._M_impl->_M_caches; + if (!__caches[__i]) + { + __numpunct_cache<_CharT>* __tmp = 0; + try + { + __tmp = new __numpunct_cache<_CharT>; + __tmp->_M_cache(__loc); + } + catch(...) + { + delete __tmp; + throw; + } + __loc._M_impl->_M_install_cache(__tmp, __i); + } + return static_cast*>(__caches[__i]); + } + }; + template + void + __numpunct_cache<_CharT>::_M_cache(const locale& __loc) + { + _M_allocated = true; + const numpunct<_CharT>& __np = use_facet >(__loc); + char* __grouping = 0; + _CharT* __truename = 0; + _CharT* __falsename = 0; + try + { + _M_grouping_size = __np.grouping().size(); + __grouping = new char[_M_grouping_size]; + __np.grouping().copy(__grouping, _M_grouping_size); + _M_grouping = __grouping; + _M_use_grouping = (_M_grouping_size + && static_cast(_M_grouping[0]) > 0 + && (_M_grouping[0] + != __gnu_cxx::__numeric_traits::__max)); + _M_truename_size = __np.truename().size(); + __truename = new _CharT[_M_truename_size]; + __np.truename().copy(__truename, _M_truename_size); + _M_truename = __truename; + _M_falsename_size = __np.falsename().size(); + __falsename = new _CharT[_M_falsename_size]; + __np.falsename().copy(__falsename, _M_falsename_size); + _M_falsename = __falsename; + _M_decimal_point = __np.decimal_point(); + _M_thousands_sep = __np.thousands_sep(); + const ctype<_CharT>& __ct = use_facet >(__loc); + __ct.widen(__num_base::_S_atoms_out, + __num_base::_S_atoms_out + + __num_base::_S_oend, _M_atoms_out); + __ct.widen(__num_base::_S_atoms_in, + __num_base::_S_atoms_in + + __num_base::_S_iend, _M_atoms_in); + } + catch(...) + { + delete [] __grouping; + delete [] __truename; + delete [] __falsename; + throw; + } + } + __attribute__ ((__pure__)) bool + __verify_grouping(const char* __grouping, size_t __grouping_size, + const string& __grouping_tmp) throw (); +namespace __gnu_cxx_ldbl128 { + template + _InIter + num_get<_CharT, _InIter>:: + _M_extract_float(_InIter __beg, _InIter __end, ios_base& __io, + ios_base::iostate& __err, string& __xtrc) const + { + typedef char_traits<_CharT> __traits_type; + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + const _CharT* __lit = __lc->_M_atoms_in; + char_type __c = char_type(); + bool __testeof = __beg == __end; + if (!__testeof) + { + __c = *__beg; + const bool __plus = __c == __lit[__num_base::_S_iplus]; + if ((__plus || __c == __lit[__num_base::_S_iminus]) + && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + && !(__c == __lc->_M_decimal_point)) + { + __xtrc += __plus ? '+' : '-'; + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + } + bool __found_mantissa = false; + int __sep_pos = 0; + while (!__testeof) + { + if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + || __c == __lc->_M_decimal_point) + break; + else if (__c == __lit[__num_base::_S_izero]) + { + if (!__found_mantissa) + { + __xtrc += '0'; + __found_mantissa = true; + } + ++__sep_pos; + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + else + break; + } + bool __found_dec = false; + bool __found_sci = false; + string __found_grouping; + if (__lc->_M_use_grouping) + __found_grouping.reserve(32); + const char_type* __lit_zero = __lit + __num_base::_S_izero; + if (!__lc->_M_allocated) + while (!__testeof) + { + const int __digit = _M_find(__lit_zero, 10, __c); + if (__digit != -1) + { + __xtrc += '0' + __digit; + __found_mantissa = true; + } + else if (__c == __lc->_M_decimal_point + && !__found_dec && !__found_sci) + { + __xtrc += '.'; + __found_dec = true; + } + else if ((__c == __lit[__num_base::_S_ie] + || __c == __lit[__num_base::_S_iE]) + && !__found_sci && __found_mantissa) + { + __xtrc += 'e'; + __found_sci = true; + if (++__beg != __end) + { + __c = *__beg; + const bool __plus = __c == __lit[__num_base::_S_iplus]; + if (__plus || __c == __lit[__num_base::_S_iminus]) + __xtrc += __plus ? '+' : '-'; + else + continue; + } + else + { + __testeof = true; + break; + } + } + else + break; + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + else + while (!__testeof) + { + if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + { + if (!__found_dec && !__found_sci) + { + if (__sep_pos) + { + __found_grouping += static_cast(__sep_pos); + __sep_pos = 0; + } + else + { + __xtrc.clear(); + break; + } + } + else + break; + } + else if (__c == __lc->_M_decimal_point) + { + if (!__found_dec && !__found_sci) + { + if (__found_grouping.size()) + __found_grouping += static_cast(__sep_pos); + __xtrc += '.'; + __found_dec = true; + } + else + break; + } + else + { + const char_type* __q = + __traits_type::find(__lit_zero, 10, __c); + if (__q) + { + __xtrc += '0' + (__q - __lit_zero); + __found_mantissa = true; + ++__sep_pos; + } + else if ((__c == __lit[__num_base::_S_ie] + || __c == __lit[__num_base::_S_iE]) + && !__found_sci && __found_mantissa) + { + if (__found_grouping.size() && !__found_dec) + __found_grouping += static_cast(__sep_pos); + __xtrc += 'e'; + __found_sci = true; + if (++__beg != __end) + { + __c = *__beg; + const bool __plus = __c == __lit[__num_base::_S_iplus]; + if ((__plus || __c == __lit[__num_base::_S_iminus]) + && !(__lc->_M_use_grouping + && __c == __lc->_M_thousands_sep) + && !(__c == __lc->_M_decimal_point)) + __xtrc += __plus ? '+' : '-'; + else + continue; + } + else + { + __testeof = true; + break; + } + } + else + break; + } + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + if (__found_grouping.size()) + { + if (!__found_dec && !__found_sci) + __found_grouping += static_cast(__sep_pos); + if (!std::__verify_grouping(__lc->_M_grouping, + __lc->_M_grouping_size, + __found_grouping)) + __err = ios_base::failbit; + } + return __beg; + } + template + template + _InIter + num_get<_CharT, _InIter>:: + _M_extract_int(_InIter __beg, _InIter __end, ios_base& __io, + ios_base::iostate& __err, _ValueT& __v) const + { + typedef char_traits<_CharT> __traits_type; + using __gnu_cxx::__add_unsigned; + typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + const _CharT* __lit = __lc->_M_atoms_in; + char_type __c = char_type(); + const ios_base::fmtflags __basefield = __io.flags() + & ios_base::basefield; + const bool __oct = __basefield == ios_base::oct; + int __base = __oct ? 8 : (__basefield == ios_base::hex ? 16 : 10); + bool __testeof = __beg == __end; + bool __negative = false; + if (!__testeof) + { + __c = *__beg; + __negative = __c == __lit[__num_base::_S_iminus]; + if ((__negative || __c == __lit[__num_base::_S_iplus]) + && !(__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + && !(__c == __lc->_M_decimal_point)) + { + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + } + bool __found_zero = false; + int __sep_pos = 0; + while (!__testeof) + { + if ((__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + || __c == __lc->_M_decimal_point) + break; + else if (__c == __lit[__num_base::_S_izero] + && (!__found_zero || __base == 10)) + { + __found_zero = true; + ++__sep_pos; + if (__basefield == 0) + __base = 8; + if (__base == 8) + __sep_pos = 0; + } + else if (__found_zero + && (__c == __lit[__num_base::_S_ix] + || __c == __lit[__num_base::_S_iX])) + { + if (__basefield == 0) + __base = 16; + if (__base == 16) + { + __found_zero = false; + __sep_pos = 0; + } + else + break; + } + else + break; + if (++__beg != __end) + { + __c = *__beg; + if (!__found_zero) + break; + } + else + __testeof = true; + } + const size_t __len = (__base == 16 ? __num_base::_S_iend + - __num_base::_S_izero : __base); + string __found_grouping; + if (__lc->_M_use_grouping) + __found_grouping.reserve(32); + bool __testfail = false; + bool __testoverflow = false; + const __unsigned_type __max = + (__negative && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) + ? -__gnu_cxx::__numeric_traits<_ValueT>::__min + : __gnu_cxx::__numeric_traits<_ValueT>::__max; + const __unsigned_type __smax = __max / __base; + __unsigned_type __result = 0; + int __digit = 0; + const char_type* __lit_zero = __lit + __num_base::_S_izero; + if (!__lc->_M_allocated) + while (!__testeof) + { + __digit = _M_find(__lit_zero, __len, __c); + if (__digit == -1) + break; + if (__result > __smax) + __testoverflow = true; + else + { + __result *= __base; + __testoverflow |= __result > __max - __digit; + __result += __digit; + ++__sep_pos; + } + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + else + while (!__testeof) + { + if (__lc->_M_use_grouping && __c == __lc->_M_thousands_sep) + { + if (__sep_pos) + { + __found_grouping += static_cast(__sep_pos); + __sep_pos = 0; + } + else + { + __testfail = true; + break; + } + } + else if (__c == __lc->_M_decimal_point) + break; + else + { + const char_type* __q = + __traits_type::find(__lit_zero, __len, __c); + if (!__q) + break; + __digit = __q - __lit_zero; + if (__digit > 15) + __digit -= 6; + if (__result > __smax) + __testoverflow = true; + else + { + __result *= __base; + __testoverflow |= __result > __max - __digit; + __result += __digit; + ++__sep_pos; + } + } + if (++__beg != __end) + __c = *__beg; + else + __testeof = true; + } + if (__found_grouping.size()) + { + __found_grouping += static_cast(__sep_pos); + if (!std::__verify_grouping(__lc->_M_grouping, + __lc->_M_grouping_size, + __found_grouping)) + __err = ios_base::failbit; + } + if ((!__sep_pos && !__found_zero && !__found_grouping.size()) + || __testfail) + { + __v = 0; + __err = ios_base::failbit; + } + else if (__testoverflow) + { + if (__negative + && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) + __v = __gnu_cxx::__numeric_traits<_ValueT>::__min; + else + __v = __gnu_cxx::__numeric_traits<_ValueT>::__max; + __err = ios_base::failbit; + } + else + __v = __negative ? -__result : __result; + if (__testeof) + __err |= ios_base::eofbit; + return __beg; + } + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, bool& __v) const + { + if (!(__io.flags() & ios_base::boolalpha)) + { + long __l = -1; + __beg = _M_extract_int(__beg, __end, __io, __err, __l); + if (__l == 0 || __l == 1) + __v = bool(__l); + else + { + __v = true; + __err = ios_base::failbit; + if (__beg == __end) + __err |= ios_base::eofbit; + } + } + else + { + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + bool __testf = true; + bool __testt = true; + bool __donef = __lc->_M_falsename_size == 0; + bool __donet = __lc->_M_truename_size == 0; + bool __testeof = false; + size_t __n = 0; + while (!__donef || !__donet) + { + if (__beg == __end) + { + __testeof = true; + break; + } + const char_type __c = *__beg; + if (!__donef) + __testf = __c == __lc->_M_falsename[__n]; + if (!__testf && __donet) + break; + if (!__donet) + __testt = __c == __lc->_M_truename[__n]; + if (!__testt && __donef) + break; + if (!__testt && !__testf) + break; + ++__n; + ++__beg; + __donef = !__testf || __n >= __lc->_M_falsename_size; + __donet = !__testt || __n >= __lc->_M_truename_size; + } + if (__testf && __n == __lc->_M_falsename_size && __n) + { + __v = false; + if (__testt && __n == __lc->_M_truename_size) + __err = ios_base::failbit; + else + __err = __testeof ? ios_base::eofbit : ios_base::goodbit; + } + else if (__testt && __n == __lc->_M_truename_size && __n) + { + __v = true; + __err = __testeof ? ios_base::eofbit : ios_base::goodbit; + } + else + { + __v = false; + __err = ios_base::failbit; + if (__testeof) + __err |= ios_base::eofbit; + } + } + return __beg; + } + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, float& __v) const + { + string __xtrc; + __xtrc.reserve(32); + __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); + std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, double& __v) const + { + string __xtrc; + __xtrc.reserve(32); + __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); + std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + template + _InIter + num_get<_CharT, _InIter>:: + __do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, double& __v) const + { + string __xtrc; + __xtrc.reserve(32); + __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); + std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, long double& __v) const + { + string __xtrc; + __xtrc.reserve(32); + __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc); + std::__convert_to_v(__xtrc.c_str(), __v, __err, _S_get_c_locale()); + if (__beg == __end) + __err |= ios_base::eofbit; + return __beg; + } + template + _InIter + num_get<_CharT, _InIter>:: + do_get(iter_type __beg, iter_type __end, ios_base& __io, + ios_base::iostate& __err, void*& __v) const + { + typedef ios_base::fmtflags fmtflags; + const fmtflags __fmt = __io.flags(); + __io.flags((__fmt & ~ios_base::basefield) | ios_base::hex); + typedef __gnu_cxx::__conditional_type<(sizeof(void*) + <= sizeof(unsigned long)), + unsigned long, unsigned long long>::__type _UIntPtrType; + _UIntPtrType __ul; + __beg = _M_extract_int(__beg, __end, __io, __err, __ul); + __io.flags(__fmt); + __v = reinterpret_cast(__ul); + return __beg; + } + template + void + num_put<_CharT, _OutIter>:: + _M_pad(_CharT __fill, streamsize __w, ios_base& __io, + _CharT* __new, const _CharT* __cs, int& __len) const + { + __pad<_CharT, char_traits<_CharT> >::_S_pad(__io, __fill, __new, + __cs, __w, __len); + __len = static_cast(__w); + } +} + template + int + __int_to_char(_CharT* __bufend, _ValueT __v, const _CharT* __lit, + ios_base::fmtflags __flags, bool __dec) + { + _CharT* __buf = __bufend; + if (__builtin_expect(__dec, true)) + { + do + { + *--__buf = __lit[(__v % 10) + __num_base::_S_odigits]; + __v /= 10; + } + while (__v != 0); + } + else if ((__flags & ios_base::basefield) == ios_base::oct) + { + do + { + *--__buf = __lit[(__v & 0x7) + __num_base::_S_odigits]; + __v >>= 3; + } + while (__v != 0); + } + else + { + const bool __uppercase = __flags & ios_base::uppercase; + const int __case_offset = __uppercase ? __num_base::_S_oudigits + : __num_base::_S_odigits; + do + { + *--__buf = __lit[(__v & 0xf) + __case_offset]; + __v >>= 4; + } + while (__v != 0); + } + return __bufend - __buf; + } +namespace __gnu_cxx_ldbl128 { + template + void + num_put<_CharT, _OutIter>:: + _M_group_int(const char* __grouping, size_t __grouping_size, _CharT __sep, + ios_base&, _CharT* __new, _CharT* __cs, int& __len) const + { + _CharT* __p = std::__add_grouping(__new, __sep, __grouping, + __grouping_size, __cs, __cs + __len); + __len = __p - __new; + } + template + template + _OutIter + num_put<_CharT, _OutIter>:: + _M_insert_int(_OutIter __s, ios_base& __io, _CharT __fill, + _ValueT __v) const + { + using __gnu_cxx::__add_unsigned; + typedef typename __add_unsigned<_ValueT>::__type __unsigned_type; + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + const _CharT* __lit = __lc->_M_atoms_out; + const ios_base::fmtflags __flags = __io.flags(); + const int __ilen = 5 * sizeof(_ValueT); + _CharT* __cs = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __ilen)); + const ios_base::fmtflags __basefield = __flags & ios_base::basefield; + const bool __dec = (__basefield != ios_base::oct + && __basefield != ios_base::hex); + const __unsigned_type __u = ((__v > 0 || !__dec) + ? __unsigned_type(__v) + : -__unsigned_type(__v)); + int __len = __int_to_char(__cs + __ilen, __u, __lit, __flags, __dec); + __cs += __ilen - __len; + if (__lc->_M_use_grouping) + { + _CharT* __cs2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * (__len + 1) + * 2)); + _M_group_int(__lc->_M_grouping, __lc->_M_grouping_size, + __lc->_M_thousands_sep, __io, __cs2 + 2, __cs, __len); + __cs = __cs2 + 2; + } + if (__builtin_expect(__dec, true)) + { + if (__v >= 0) + { + if (bool(__flags & ios_base::showpos) + && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed) + *--__cs = __lit[__num_base::_S_oplus], ++__len; + } + else + *--__cs = __lit[__num_base::_S_ominus], ++__len; + } + else if (bool(__flags & ios_base::showbase) && __v) + { + if (__basefield == ios_base::oct) + *--__cs = __lit[__num_base::_S_odigits], ++__len; + else + { + const bool __uppercase = __flags & ios_base::uppercase; + *--__cs = __lit[__num_base::_S_ox + __uppercase]; + *--__cs = __lit[__num_base::_S_odigits]; + __len += 2; + } + } + const streamsize __w = __io.width(); + if (__w > static_cast(__len)) + { + _CharT* __cs3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __w)); + _M_pad(__fill, __w, __io, __cs3, __cs, __len); + __cs = __cs3; + } + __io.width(0); + return std::__write(__s, __cs, __len); + } + template + void + num_put<_CharT, _OutIter>:: + _M_group_float(const char* __grouping, size_t __grouping_size, + _CharT __sep, const _CharT* __p, _CharT* __new, + _CharT* __cs, int& __len) const + { + const int __declen = __p ? __p - __cs : __len; + _CharT* __p2 = std::__add_grouping(__new, __sep, __grouping, + __grouping_size, + __cs, __cs + __declen); + int __newlen = __p2 - __new; + if (__p) + { + char_traits<_CharT>::copy(__p2, __p, __len - __declen); + __newlen += __len - __declen; + } + __len = __newlen; + } + template + template + _OutIter + num_put<_CharT, _OutIter>:: + _M_insert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod, + _ValueT __v) const + { + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + const streamsize __prec = __io.precision() < 0 ? 6 : __io.precision(); + const int __max_digits = + __gnu_cxx::__numeric_traits<_ValueT>::__digits10; + int __len; + char __fbuf[16]; + __num_base::_S_format_float(__io, __fbuf, __mod); + int __cs_size = __max_digits * 3; + char* __cs = static_cast(__builtin_alloca(__cs_size)); + __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, + __fbuf, __prec, __v); + if (__len >= __cs_size) + { + __cs_size = __len + 1; + __cs = static_cast(__builtin_alloca(__cs_size)); + __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, + __fbuf, __prec, __v); + } + const ctype<_CharT>& __ctype = use_facet >(__loc); + _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __len)); + __ctype.widen(__cs, __cs + __len, __ws); + _CharT* __wp = 0; + const char* __p = char_traits::find(__cs, __len, '.'); + if (__p) + { + __wp = __ws + (__p - __cs); + *__wp = __lc->_M_decimal_point; + } + if (__lc->_M_use_grouping + && (__wp || __len < 3 || (__cs[1] <= '9' && __cs[2] <= '9' + && __cs[1] >= '0' && __cs[2] >= '0'))) + { + _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __len * 2)); + streamsize __off = 0; + if (__cs[0] == '-' || __cs[0] == '+') + { + __off = 1; + __ws2[0] = __ws[0]; + __len -= 1; + } + _M_group_float(__lc->_M_grouping, __lc->_M_grouping_size, + __lc->_M_thousands_sep, __wp, __ws2 + __off, + __ws + __off, __len); + __len += __off; + __ws = __ws2; + } + const streamsize __w = __io.width(); + if (__w > static_cast(__len)) + { + _CharT* __ws3 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __w)); + _M_pad(__fill, __w, __io, __ws3, __ws, __len); + __ws = __ws3; + } + __io.width(0); + return std::__write(__s, __ws, __len); + } + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const + { + const ios_base::fmtflags __flags = __io.flags(); + if ((__flags & ios_base::boolalpha) == 0) + { + const long __l = __v; + __s = _M_insert_int(__s, __io, __fill, __l); + } + else + { + typedef __numpunct_cache<_CharT> __cache_type; + __use_cache<__cache_type> __uc; + const locale& __loc = __io._M_getloc(); + const __cache_type* __lc = __uc(__loc); + const _CharT* __name = __v ? __lc->_M_truename + : __lc->_M_falsename; + int __len = __v ? __lc->_M_truename_size + : __lc->_M_falsename_size; + const streamsize __w = __io.width(); + if (__w > static_cast(__len)) + { + const streamsize __plen = __w - __len; + _CharT* __ps + = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) + * __plen)); + char_traits<_CharT>::assign(__ps, __plen, __fill); + __io.width(0); + if ((__flags & ios_base::adjustfield) == ios_base::left) + { + __s = std::__write(__s, __name, __len); + __s = std::__write(__s, __ps, __plen); + } + else + { + __s = std::__write(__s, __ps, __plen); + __s = std::__write(__s, __name, __len); + } + return __s; + } + __io.width(0); + __s = std::__write(__s, __name, __len); + } + return __s; + } + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const + { return _M_insert_float(__s, __io, __fill, char(), __v); } + template + _OutIter + num_put<_CharT, _OutIter>:: + __do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const + { return _M_insert_float(__s, __io, __fill, char(), __v); } + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, + long double __v) const + { return _M_insert_float(__s, __io, __fill, 'L', __v); } + template + _OutIter + num_put<_CharT, _OutIter>:: + do_put(iter_type __s, ios_base& __io, char_type __fill, + const void* __v) const + { + const ios_base::fmtflags __flags = __io.flags(); + const ios_base::fmtflags __fmt = ~(ios_base::basefield + | ios_base::uppercase); + __io.flags((__flags & __fmt) | (ios_base::hex | ios_base::showbase)); + typedef __gnu_cxx::__conditional_type<(sizeof(const void*) + <= sizeof(unsigned long)), + unsigned long, unsigned long long>::__type _UIntPtrType; + __s = _M_insert_int(__s, __io, __fill, + reinterpret_cast<_UIntPtrType>(__v)); + __io.flags(__flags); + return __s; + } +} + template + void + __pad<_CharT, _Traits>::_S_pad(ios_base& __io, _CharT __fill, + _CharT* __news, const _CharT* __olds, + streamsize __newlen, streamsize __oldlen) + { + const size_t __plen = static_cast(__newlen - __oldlen); + const ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield; + if (__adjust == ios_base::left) + { + _Traits::copy(__news, __olds, __oldlen); + _Traits::assign(__news + __oldlen, __plen, __fill); + return; + } + size_t __mod = 0; + if (__adjust == ios_base::internal) + { + const locale& __loc = __io._M_getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); + if (__ctype.widen('-') == __olds[0] + || __ctype.widen('+') == __olds[0]) + { + __news[0] = __olds[0]; + __mod = 1; + ++__news; + } + else if (__ctype.widen('0') == __olds[0] + && __oldlen > 1 + && (__ctype.widen('x') == __olds[1] + || __ctype.widen('X') == __olds[1])) + { + __news[0] = __olds[0]; + __news[1] = __olds[1]; + __mod = 2; + __news += 2; + } + } + _Traits::assign(__news, __plen, __fill); + _Traits::copy(__news + __plen, __olds + __mod, __oldlen - __mod); + } + template + _CharT* + __add_grouping(_CharT* __s, _CharT __sep, + const char* __gbeg, size_t __gsize, + const _CharT* __first, const _CharT* __last) + { + size_t __idx = 0; + size_t __ctr = 0; + while (__last - __first > __gbeg[__idx] + && static_cast(__gbeg[__idx]) > 0 + && __gbeg[__idx] != __gnu_cxx::__numeric_traits::__max) + { + __last -= __gbeg[__idx]; + __idx < __gsize - 1 ? ++__idx : ++__ctr; + } + while (__first != __last) + *__s++ = *__first++; + while (__ctr--) + { + *__s++ = __sep; + for (char __i = __gbeg[__idx]; __i > 0; --__i) + *__s++ = *__first++; + } + while (__idx--) + { + *__s++ = __sep; + for (char __i = __gbeg[__idx]; __i > 0; --__i) + *__s++ = *__first++; + } + return __s; + } + extern template class numpunct; + extern template class numpunct_byname; + extern template class __gnu_cxx_ldbl128:: num_get; + extern template class __gnu_cxx_ldbl128:: num_put; + extern template class ctype_byname; + extern template + const ctype& + use_facet >(const locale&); + extern template + const numpunct& + use_facet >(const locale&); + extern template + const num_put& + use_facet >(const locale&); + extern template + const num_get& + use_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template class numpunct; + extern template class numpunct_byname; + extern template class __gnu_cxx_ldbl128:: num_get; + extern template class __gnu_cxx_ldbl128:: num_put; + extern template class ctype_byname; + extern template + const ctype& + use_facet >(const locale&); + extern template + const numpunct& + use_facet >(const locale&); + extern template + const num_put& + use_facet >(const locale&); + extern template + const num_get& + use_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); + extern template + bool + has_facet >(const locale&); +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + inline const _Facet& + __check_facet(const _Facet* __f) + { + if (!__f) + __throw_bad_cast(); + return *__f; + } + template + class basic_ios : public ios_base + { + public: + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + typedef ctype<_CharT> __ctype_type; + typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > + __num_put_type; + typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > + __num_get_type; + protected: + basic_ostream<_CharT, _Traits>* _M_tie; + mutable char_type _M_fill; + mutable bool _M_fill_init; + basic_streambuf<_CharT, _Traits>* _M_streambuf; + const __ctype_type* _M_ctype; + const __num_put_type* _M_num_put; + const __num_get_type* _M_num_get; + public: + operator void*() const + { return this->fail() ? 0 : const_cast(this); } + bool + operator!() const + { return this->fail(); } + iostate + rdstate() const + { return _M_streambuf_state; } + void + clear(iostate __state = goodbit); + void + setstate(iostate __state) + { this->clear(this->rdstate() | __state); } + void + _M_setstate(iostate __state) + { + _M_streambuf_state |= __state; + if (this->exceptions() & __state) + throw; + } + bool + good() const + { return this->rdstate() == 0; } + bool + eof() const + { return (this->rdstate() & eofbit) != 0; } + bool + fail() const + { return (this->rdstate() & (badbit | failbit)) != 0; } + bool + bad() const + { return (this->rdstate() & badbit) != 0; } + iostate + exceptions() const + { return _M_exception; } + void + exceptions(iostate __except) + { + _M_exception = __except; + this->clear(_M_streambuf_state); + } + explicit + basic_ios(basic_streambuf<_CharT, _Traits>* __sb) + : ios_base(), _M_tie(0), _M_fill(), _M_fill_init(false), _M_streambuf(0), + _M_ctype(0), _M_num_put(0), _M_num_get(0) + { this->init(__sb); } + virtual + ~basic_ios() { } + basic_ostream<_CharT, _Traits>* + tie() const + { return _M_tie; } + basic_ostream<_CharT, _Traits>* + tie(basic_ostream<_CharT, _Traits>* __tiestr) + { + basic_ostream<_CharT, _Traits>* __old = _M_tie; + _M_tie = __tiestr; + return __old; + } + basic_streambuf<_CharT, _Traits>* + rdbuf() const + { return _M_streambuf; } + basic_streambuf<_CharT, _Traits>* + rdbuf(basic_streambuf<_CharT, _Traits>* __sb); + basic_ios& + copyfmt(const basic_ios& __rhs); + char_type + fill() const + { + if (!_M_fill_init) + { + _M_fill = this->widen(' '); + _M_fill_init = true; + } + return _M_fill; + } + char_type + fill(char_type __ch) + { + char_type __old = this->fill(); + _M_fill = __ch; + return __old; + } + locale + imbue(const locale& __loc); + char + narrow(char_type __c, char __dfault) const + { return __check_facet(_M_ctype).narrow(__c, __dfault); } + char_type + widen(char __c) const + { return __check_facet(_M_ctype).widen(__c); } + protected: + basic_ios() + : ios_base(), _M_tie(0), _M_fill(char_type()), _M_fill_init(false), + _M_streambuf(0), _M_ctype(0), _M_num_put(0), _M_num_get(0) + { } + void + init(basic_streambuf<_CharT, _Traits>* __sb); + void + _M_cache_locale(const locale& __loc); + }; +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + void + basic_ios<_CharT, _Traits>::clear(iostate __state) + { + if (this->rdbuf()) + _M_streambuf_state = __state; + else + _M_streambuf_state = __state | badbit; + if (this->exceptions() & this->rdstate()) + __throw_ios_failure(("basic_ios::clear")); + } + template + basic_streambuf<_CharT, _Traits>* + basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb) + { + basic_streambuf<_CharT, _Traits>* __old = _M_streambuf; + _M_streambuf = __sb; + this->clear(); + return __old; + } + template + basic_ios<_CharT, _Traits>& + basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs) + { + if (this != &__rhs) + { + _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ? + _M_local_word : new _Words[__rhs._M_word_size]; + _Callback_list* __cb = __rhs._M_callbacks; + if (__cb) + __cb->_M_add_reference(); + _M_call_callbacks(erase_event); + if (_M_word != _M_local_word) + { + delete [] _M_word; + _M_word = 0; + } + _M_dispose_callbacks(); + _M_callbacks = __cb; + for (int __i = 0; __i < __rhs._M_word_size; ++__i) + __words[__i] = __rhs._M_word[__i]; + _M_word = __words; + _M_word_size = __rhs._M_word_size; + this->flags(__rhs.flags()); + this->width(__rhs.width()); + this->precision(__rhs.precision()); + this->tie(__rhs.tie()); + this->fill(__rhs.fill()); + _M_ios_locale = __rhs.getloc(); + _M_cache_locale(_M_ios_locale); + _M_call_callbacks(copyfmt_event); + this->exceptions(__rhs.exceptions()); + } + return *this; + } + template + locale + basic_ios<_CharT, _Traits>::imbue(const locale& __loc) + { + locale __old(this->getloc()); + ios_base::imbue(__loc); + _M_cache_locale(__loc); + if (this->rdbuf() != 0) + this->rdbuf()->pubimbue(__loc); + return __old; + } + template + void + basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb) + { + ios_base::_M_init(); + _M_cache_locale(_M_ios_locale); + _M_fill = _CharT(); + _M_fill_init = false; + _M_tie = 0; + _M_exception = goodbit; + _M_streambuf = __sb; + _M_streambuf_state = __sb ? goodbit : badbit; + } + template + void + basic_ios<_CharT, _Traits>::_M_cache_locale(const locale& __loc) + { + if (__builtin_expect(has_facet<__ctype_type>(__loc), true)) + _M_ctype = &use_facet<__ctype_type>(__loc); + else + _M_ctype = 0; + if (__builtin_expect(has_facet<__num_put_type>(__loc), true)) + _M_num_put = &use_facet<__num_put_type>(__loc); + else + _M_num_put = 0; + if (__builtin_expect(has_facet<__num_get_type>(__loc), true)) + _M_num_get = &use_facet<__num_get_type>(__loc); + else + _M_num_get = 0; + } + extern template class basic_ios; + extern template class basic_ios; +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + class basic_ostream : virtual public basic_ios<_CharT, _Traits> + { + public: + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef basic_ios<_CharT, _Traits> __ios_type; + typedef basic_ostream<_CharT, _Traits> __ostream_type; + typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > + __num_put_type; + typedef ctype<_CharT> __ctype_type; + explicit + basic_ostream(__streambuf_type* __sb) + { this->init(__sb); } + virtual + ~basic_ostream() { } + class sentry; + friend class sentry; + __ostream_type& + operator<<(__ostream_type& (*__pf)(__ostream_type&)) + { + return __pf(*this); + } + __ostream_type& + operator<<(__ios_type& (*__pf)(__ios_type&)) + { + __pf(*this); + return *this; + } + __ostream_type& + operator<<(ios_base& (*__pf) (ios_base&)) + { + __pf(*this); + return *this; + } + __ostream_type& + operator<<(long __n) + { return _M_insert(__n); } + __ostream_type& + operator<<(unsigned long __n) + { return _M_insert(__n); } + __ostream_type& + operator<<(bool __n) + { return _M_insert(__n); } + __ostream_type& + operator<<(short __n); + __ostream_type& + operator<<(unsigned short __n) + { + return _M_insert(static_cast(__n)); + } + __ostream_type& + operator<<(int __n); + __ostream_type& + operator<<(unsigned int __n) + { + return _M_insert(static_cast(__n)); + } + __ostream_type& + operator<<(long long __n) + { return _M_insert(__n); } + __ostream_type& + operator<<(unsigned long long __n) + { return _M_insert(__n); } + __ostream_type& + operator<<(double __f) + { return _M_insert(__f); } + __ostream_type& + operator<<(float __f) + { + return _M_insert(static_cast(__f)); + } + __ostream_type& + operator<<(long double __f) + { return _M_insert(__f); } + __ostream_type& + operator<<(const void* __p) + { return _M_insert(__p); } + __ostream_type& + operator<<(__streambuf_type* __sb); + __ostream_type& + put(char_type __c); + void + _M_write(const char_type* __s, streamsize __n) + { + const streamsize __put = this->rdbuf()->sputn(__s, __n); + if (__put != __n) + this->setstate(ios_base::badbit); + } + __ostream_type& + write(const char_type* __s, streamsize __n); + __ostream_type& + flush(); + pos_type + tellp(); + __ostream_type& + seekp(pos_type); + __ostream_type& + seekp(off_type, ios_base::seekdir); + protected: + basic_ostream() + { this->init(0); } + template + __ostream_type& + _M_insert(_ValueT __v); + }; + template + class basic_ostream<_CharT, _Traits>::sentry + { + bool _M_ok; + basic_ostream<_CharT, _Traits>& _M_os; + public: + explicit + sentry(basic_ostream<_CharT, _Traits>& __os); + ~sentry() + { + if (bool(_M_os.flags() & ios_base::unitbuf) && !uncaught_exception()) + { + if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1) + _M_os.setstate(ios_base::badbit); + } + } + operator bool() const + { return _M_ok; } + }; + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) + { return __ostream_insert(__out, &__c, 1); } + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) + { return (__out << __out.widen(__c)); } + template + inline basic_ostream& + operator<<(basic_ostream& __out, char __c) + { return __ostream_insert(__out, &__c, 1); } + template + inline basic_ostream& + operator<<(basic_ostream& __out, signed char __c) + { return (__out << static_cast(__c)); } + template + inline basic_ostream& + operator<<(basic_ostream& __out, unsigned char __c) + { return (__out << static_cast(__c)); } + template + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) + { + if (!__s) + __out.setstate(ios_base::badbit); + else + __ostream_insert(__out, __s, + static_cast(_Traits::length(__s))); + return __out; + } + template + basic_ostream<_CharT, _Traits> & + operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s); + template + inline basic_ostream& + operator<<(basic_ostream& __out, const char* __s) + { + if (!__s) + __out.setstate(ios_base::badbit); + else + __ostream_insert(__out, __s, + static_cast(_Traits::length(__s))); + return __out; + } + template + inline basic_ostream& + operator<<(basic_ostream& __out, const signed char* __s) + { return (__out << reinterpret_cast(__s)); } + template + inline basic_ostream & + operator<<(basic_ostream& __out, const unsigned char* __s) + { return (__out << reinterpret_cast(__s)); } + template + inline basic_ostream<_CharT, _Traits>& + endl(basic_ostream<_CharT, _Traits>& __os) + { return flush(__os.put(__os.widen('\n'))); } + template + inline basic_ostream<_CharT, _Traits>& + ends(basic_ostream<_CharT, _Traits>& __os) + { return __os.put(_CharT()); } + template + inline basic_ostream<_CharT, _Traits>& + flush(basic_ostream<_CharT, _Traits>& __os) + { return __os.flush(); } +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + basic_ostream<_CharT, _Traits>::sentry:: + sentry(basic_ostream<_CharT, _Traits>& __os) + : _M_ok(false), _M_os(__os) + { + if (__os.tie() && __os.good()) + __os.tie()->flush(); + if (__os.good()) + _M_ok = true; + else + __os.setstate(ios_base::failbit); + } + template + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + _M_insert(_ValueT __v) + { + sentry __cerb(*this); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const __num_put_type& __np = __check_facet(this->_M_num_put); + if (__np.put(*this, *this, this->fill(), __v).failed()) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + operator<<(short __n) + { + const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; + if (__fmt == ios_base::oct || __fmt == ios_base::hex) + return _M_insert(static_cast(static_cast(__n))); + else + return _M_insert(static_cast(__n)); + } + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + operator<<(int __n) + { + const ios_base::fmtflags __fmt = this->flags() & ios_base::basefield; + if (__fmt == ios_base::oct || __fmt == ios_base::hex) + return _M_insert(static_cast(static_cast(__n))); + else + return _M_insert(static_cast(__n)); + } + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + operator<<(__streambuf_type* __sbin) + { + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this); + if (__cerb && __sbin) + { + try + { + if (!__copy_streambufs(__sbin, this->rdbuf())) + __err |= ios_base::failbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::failbit); } + } + else if (!__sbin) + __err |= ios_base::badbit; + if (__err) + this->setstate(__err); + return *this; + } + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + put(char_type __c) + { + sentry __cerb(*this); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __put = this->rdbuf()->sputc(__c); + if (traits_type::eq_int_type(__put, traits_type::eof())) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + write(const _CharT* __s, streamsize __n) + { + sentry __cerb(*this); + if (__cerb) + { + try + { _M_write(__s, __n); } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + return *this; + } + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + flush() + { + ios_base::iostate __err = ios_base::goodbit; + try + { + if (this->rdbuf() && this->rdbuf()->pubsync() == -1) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + template + typename basic_ostream<_CharT, _Traits>::pos_type + basic_ostream<_CharT, _Traits>:: + tellp() + { + pos_type __ret = pos_type(-1); + try + { + if (!this->fail()) + __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + return __ret; + } + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + seekp(pos_type __pos) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + if (!this->fail()) + { + const pos_type __p = this->rdbuf()->pubseekpos(__pos, + ios_base::out); + if (__p == pos_type(off_type(-1))) + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + template + basic_ostream<_CharT, _Traits>& + basic_ostream<_CharT, _Traits>:: + seekp(off_type __off, ios_base::seekdir __dir) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + if (!this->fail()) + { + const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, + ios_base::out); + if (__p == pos_type(off_type(-1))) + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + return *this; + } + template + basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) + { + if (!__s) + __out.setstate(ios_base::badbit); + else + { + const size_t __clen = char_traits::length(__s); + try + { + struct __ptr_guard + { + _CharT *__p; + __ptr_guard (_CharT *__ip): __p(__ip) { } + ~__ptr_guard() { delete[] __p; } + _CharT* __get() { return __p; } + } __pg (new _CharT[__clen]); + _CharT *__ws = __pg.__get(); + for (size_t __i = 0; __i < __clen; ++__i) + __ws[__i] = __out.widen(__s[__i]); + __ostream_insert(__out, __ws, __clen); + } + catch(__cxxabiv1::__forced_unwind&) + { + __out._M_setstate(ios_base::badbit); + throw; + } + catch(...) + { __out._M_setstate(ios_base::badbit); } + } + return __out; + } + extern template class basic_ostream; + extern template ostream& endl(ostream&); + extern template ostream& ends(ostream&); + extern template ostream& flush(ostream&); + extern template ostream& operator<<(ostream&, char); + extern template ostream& operator<<(ostream&, unsigned char); + extern template ostream& operator<<(ostream&, signed char); + extern template ostream& operator<<(ostream&, const char*); + extern template ostream& operator<<(ostream&, const unsigned char*); + extern template ostream& operator<<(ostream&, const signed char*); + extern template ostream& ostream::_M_insert(long); + extern template ostream& ostream::_M_insert(unsigned long); + extern template ostream& ostream::_M_insert(bool); + extern template ostream& ostream::_M_insert(long long); + extern template ostream& ostream::_M_insert(unsigned long long); + extern template ostream& ostream::_M_insert(double); + extern template ostream& ostream::_M_insert(long double); + extern template ostream& ostream::_M_insert(const void*); + extern template class basic_ostream; + extern template wostream& endl(wostream&); + extern template wostream& ends(wostream&); + extern template wostream& flush(wostream&); + extern template wostream& operator<<(wostream&, wchar_t); + extern template wostream& operator<<(wostream&, char); + extern template wostream& operator<<(wostream&, const wchar_t*); + extern template wostream& operator<<(wostream&, const char*); + extern template wostream& wostream::_M_insert(long); + extern template wostream& wostream::_M_insert(unsigned long); + extern template wostream& wostream::_M_insert(bool); + extern template wostream& wostream::_M_insert(long long); + extern template wostream& wostream::_M_insert(unsigned long long); + extern template wostream& wostream::_M_insert(double); + extern template wostream& wostream::_M_insert(long double); + extern template wostream& wostream::_M_insert(const void*); +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + class basic_istream : virtual public basic_ios<_CharT, _Traits> + { + public: + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef basic_ios<_CharT, _Traits> __ios_type; + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > + __num_get_type; + typedef ctype<_CharT> __ctype_type; + protected: + streamsize _M_gcount; + public: + explicit + basic_istream(__streambuf_type* __sb) + : _M_gcount(streamsize(0)) + { this->init(__sb); } + virtual + ~basic_istream() + { _M_gcount = streamsize(0); } + class sentry; + friend class sentry; + __istream_type& + operator>>(__istream_type& (*__pf)(__istream_type&)) + { return __pf(*this); } + __istream_type& + operator>>(__ios_type& (*__pf)(__ios_type&)) + { + __pf(*this); + return *this; + } + __istream_type& + operator>>(ios_base& (*__pf)(ios_base&)) + { + __pf(*this); + return *this; + } + __istream_type& + operator>>(bool& __n) + { return _M_extract(__n); } + __istream_type& + operator>>(short& __n); + __istream_type& + operator>>(unsigned short& __n) + { return _M_extract(__n); } + __istream_type& + operator>>(int& __n); + __istream_type& + operator>>(unsigned int& __n) + { return _M_extract(__n); } + __istream_type& + operator>>(long& __n) + { return _M_extract(__n); } + __istream_type& + operator>>(unsigned long& __n) + { return _M_extract(__n); } + __istream_type& + operator>>(long long& __n) + { return _M_extract(__n); } + __istream_type& + operator>>(unsigned long long& __n) + { return _M_extract(__n); } + __istream_type& + operator>>(float& __f) + { return _M_extract(__f); } + __istream_type& + operator>>(double& __f) + { return _M_extract(__f); } + __istream_type& + operator>>(long double& __f) + { return _M_extract(__f); } + __istream_type& + operator>>(void*& __p) + { return _M_extract(__p); } + __istream_type& + operator>>(__streambuf_type* __sb); + streamsize + gcount() const + { return _M_gcount; } + int_type + get(); + __istream_type& + get(char_type& __c); + __istream_type& + get(char_type* __s, streamsize __n, char_type __delim); + __istream_type& + get(char_type* __s, streamsize __n) + { return this->get(__s, __n, this->widen('\n')); } + __istream_type& + get(__streambuf_type& __sb, char_type __delim); + __istream_type& + get(__streambuf_type& __sb) + { return this->get(__sb, this->widen('\n')); } + __istream_type& + getline(char_type* __s, streamsize __n, char_type __delim); + __istream_type& + getline(char_type* __s, streamsize __n) + { return this->getline(__s, __n, this->widen('\n')); } + __istream_type& + ignore(); + __istream_type& + ignore(streamsize __n); + __istream_type& + ignore(streamsize __n, int_type __delim); + int_type + peek(); + __istream_type& + read(char_type* __s, streamsize __n); + streamsize + readsome(char_type* __s, streamsize __n); + __istream_type& + putback(char_type __c); + __istream_type& + unget(); + int + sync(); + pos_type + tellg(); + __istream_type& + seekg(pos_type); + __istream_type& + seekg(off_type, ios_base::seekdir); + protected: + basic_istream() + : _M_gcount(streamsize(0)) + { this->init(0); } + template + __istream_type& + _M_extract(_ValueT& __v); + }; + template<> + basic_istream& + basic_istream:: + getline(char_type* __s, streamsize __n, char_type __delim); + template<> + basic_istream& + basic_istream:: + ignore(streamsize __n); + template<> + basic_istream& + basic_istream:: + ignore(streamsize __n, int_type __delim); + template<> + basic_istream& + basic_istream:: + getline(char_type* __s, streamsize __n, char_type __delim); + template<> + basic_istream& + basic_istream:: + ignore(streamsize __n); + template<> + basic_istream& + basic_istream:: + ignore(streamsize __n, int_type __delim); + template + class basic_istream<_CharT, _Traits>::sentry + { + bool _M_ok; + public: + typedef _Traits traits_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef typename __istream_type::__ctype_type __ctype_type; + typedef typename _Traits::int_type __int_type; + explicit + sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false); + operator bool() const + { return _M_ok; } + }; + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c); + template + inline basic_istream& + operator>>(basic_istream& __in, unsigned char& __c) + { return (__in >> reinterpret_cast(__c)); } + template + inline basic_istream& + operator>>(basic_istream& __in, signed char& __c) + { return (__in >> reinterpret_cast(__c)); } + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s); + template<> + basic_istream& + operator>>(basic_istream& __in, char* __s); + template + inline basic_istream& + operator>>(basic_istream& __in, unsigned char* __s) + { return (__in >> reinterpret_cast(__s)); } + template + inline basic_istream& + operator>>(basic_istream& __in, signed char* __s) + { return (__in >> reinterpret_cast(__s)); } + template + class basic_iostream + : public basic_istream<_CharT, _Traits>, + public basic_ostream<_CharT, _Traits> + { + public: + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_ostream<_CharT, _Traits> __ostream_type; + explicit + basic_iostream(basic_streambuf<_CharT, _Traits>* __sb) + : __istream_type(__sb), __ostream_type(__sb) { } + virtual + ~basic_iostream() { } + protected: + basic_iostream() + : __istream_type(), __ostream_type() { } + }; + template + basic_istream<_CharT, _Traits>& + ws(basic_istream<_CharT, _Traits>& __is); +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + basic_istream<_CharT, _Traits>::sentry:: + sentry(basic_istream<_CharT, _Traits>& __in, bool __noskip) : _M_ok(false) + { + ios_base::iostate __err = ios_base::goodbit; + if (__in.good()) + { + if (__in.tie()) + __in.tie()->flush(); + if (!__noskip && bool(__in.flags() & ios_base::skipws)) + { + const __int_type __eof = traits_type::eof(); + __streambuf_type* __sb = __in.rdbuf(); + __int_type __c = __sb->sgetc(); + const __ctype_type& __ct = __check_facet(__in._M_ctype); + while (!traits_type::eq_int_type(__c, __eof) + && __ct.is(ctype_base::space, + traits_type::to_char_type(__c))) + __c = __sb->snextc(); + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + } + } + if (__in.good() && __err == ios_base::goodbit) + _M_ok = true; + else + { + __err |= ios_base::failbit; + __in.setstate(__err); + } + } + template + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + _M_extract(_ValueT& __v) + { + sentry __cerb(*this, false); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const __num_get_type& __ng = __check_facet(this->_M_num_get); + __ng.get(*this, 0, *this, __err, __v); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(short& __n) + { + sentry __cerb(*this, false); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + long __l; + const __num_get_type& __ng = __check_facet(this->_M_num_get); + __ng.get(*this, 0, *this, __err, __l); + if (__l < __gnu_cxx::__numeric_traits::__min) + { + __err |= ios_base::failbit; + __n = __gnu_cxx::__numeric_traits::__min; + } + else if (__l > __gnu_cxx::__numeric_traits::__max) + { + __err |= ios_base::failbit; + __n = __gnu_cxx::__numeric_traits::__max; + } + else + __n = short(__l); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(int& __n) + { + sentry __cerb(*this, false); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + long __l; + const __num_get_type& __ng = __check_facet(this->_M_num_get); + __ng.get(*this, 0, *this, __err, __l); + if (__l < __gnu_cxx::__numeric_traits::__min) + { + __err |= ios_base::failbit; + __n = __gnu_cxx::__numeric_traits::__min; + } + else if (__l > __gnu_cxx::__numeric_traits::__max) + { + __err |= ios_base::failbit; + __n = __gnu_cxx::__numeric_traits::__max; + } + else + __n = int(__l); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + operator>>(__streambuf_type* __sbout) + { + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, false); + if (__cerb && __sbout) + { + try + { + bool __ineof; + if (!__copy_streambufs_eof(this->rdbuf(), __sbout, __ineof)) + __err |= ios_base::failbit; + if (__ineof) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::failbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::failbit); } + } + else if (!__sbout) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + template + typename basic_istream<_CharT, _Traits>::int_type + basic_istream<_CharT, _Traits>:: + get(void) + { + const int_type __eof = traits_type::eof(); + int_type __c = __eof; + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + __c = this->rdbuf()->sbumpc(); + if (!traits_type::eq_int_type(__c, __eof)) + _M_gcount = 1; + else + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return __c; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + get(char_type& __c) + { + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __cb = this->rdbuf()->sbumpc(); + if (!traits_type::eq_int_type(__cb, traits_type::eof())) + { + _M_gcount = 1; + __c = traits_type::to_char_type(__cb); + } + else + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + get(char_type* __s, streamsize __n, char_type __delim) + { + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __idelim = traits_type::to_int_type(__delim); + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sgetc(); + while (_M_gcount + 1 < __n + && !traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __idelim)) + { + *__s++ = traits_type::to_char_type(__c); + ++_M_gcount; + __c = __sb->snextc(); + } + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + if (__n > 0) + *__s = char_type(); + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + get(__streambuf_type& __sb, char_type __delim) + { + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __idelim = traits_type::to_int_type(__delim); + const int_type __eof = traits_type::eof(); + __streambuf_type* __this_sb = this->rdbuf(); + int_type __c = __this_sb->sgetc(); + char_type __c2 = traits_type::to_char_type(__c); + while (!traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __idelim) + && !traits_type::eq_int_type(__sb.sputc(__c2), __eof)) + { + ++_M_gcount; + __c = __this_sb->snextc(); + __c2 = traits_type::to_char_type(__c); + } + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + getline(char_type* __s, streamsize __n, char_type __delim) + { + _M_gcount = 0; + ios_base::iostate __err = ios_base::goodbit; + sentry __cerb(*this, true); + if (__cerb) + { + try + { + const int_type __idelim = traits_type::to_int_type(__delim); + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sgetc(); + while (_M_gcount + 1 < __n + && !traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __idelim)) + { + *__s++ = traits_type::to_char_type(__c); + __c = __sb->snextc(); + ++_M_gcount; + } + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + else + { + if (traits_type::eq_int_type(__c, __idelim)) + { + __sb->sbumpc(); + ++_M_gcount; + } + else + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + if (__n > 0) + *__s = char_type(); + if (!_M_gcount) + __err |= ios_base::failbit; + if (__err) + this->setstate(__err); + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + ignore(void) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + if (traits_type::eq_int_type(__sb->sbumpc(), __eof)) + __err |= ios_base::eofbit; + else + _M_gcount = 1; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + ignore(streamsize __n) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb && __n > 0) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sgetc(); + bool __large_ignore = false; + while (true) + { + while (_M_gcount < __n + && !traits_type::eq_int_type(__c, __eof)) + { + ++_M_gcount; + __c = __sb->snextc(); + } + if (__n == __gnu_cxx::__numeric_traits::__max + && !traits_type::eq_int_type(__c, __eof)) + { + _M_gcount = + __gnu_cxx::__numeric_traits::__min; + __large_ignore = true; + } + else + break; + } + if (__large_ignore) + _M_gcount = __gnu_cxx::__numeric_traits::__max; + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + ignore(streamsize __n, int_type __delim) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb && __n > 0) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + int_type __c = __sb->sgetc(); + bool __large_ignore = false; + while (true) + { + while (_M_gcount < __n + && !traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __delim)) + { + ++_M_gcount; + __c = __sb->snextc(); + } + if (__n == __gnu_cxx::__numeric_traits::__max + && !traits_type::eq_int_type(__c, __eof) + && !traits_type::eq_int_type(__c, __delim)) + { + _M_gcount = + __gnu_cxx::__numeric_traits::__min; + __large_ignore = true; + } + else + break; + } + if (__large_ignore) + _M_gcount = __gnu_cxx::__numeric_traits::__max; + if (traits_type::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + else if (traits_type::eq_int_type(__c, __delim)) + { + if (_M_gcount + < __gnu_cxx::__numeric_traits::__max) + ++_M_gcount; + __sb->sbumpc(); + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + typename basic_istream<_CharT, _Traits>::int_type + basic_istream<_CharT, _Traits>:: + peek(void) + { + int_type __c = traits_type::eof(); + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + __c = this->rdbuf()->sgetc(); + if (traits_type::eq_int_type(__c, traits_type::eof())) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return __c; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + read(char_type* __s, streamsize __n) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + _M_gcount = this->rdbuf()->sgetn(__s, __n); + if (_M_gcount != __n) + __err |= (ios_base::eofbit | ios_base::failbit); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + streamsize + basic_istream<_CharT, _Traits>:: + readsome(char_type* __s, streamsize __n) + { + _M_gcount = 0; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const streamsize __num = this->rdbuf()->in_avail(); + if (__num > 0) + _M_gcount = this->rdbuf()->sgetn(__s, std::min(__num, __n)); + else if (__num == -1) + __err |= ios_base::eofbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return _M_gcount; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + putback(char_type __c) + { + _M_gcount = 0; + this->clear(this->rdstate() & ~ios_base::eofbit); + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + if (!__sb + || traits_type::eq_int_type(__sb->sputbackc(__c), __eof)) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + unget(void) + { + _M_gcount = 0; + this->clear(this->rdstate() & ~ios_base::eofbit); + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const int_type __eof = traits_type::eof(); + __streambuf_type* __sb = this->rdbuf(); + if (!__sb + || traits_type::eq_int_type(__sb->sungetc(), __eof)) + __err |= ios_base::badbit; + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + int + basic_istream<_CharT, _Traits>:: + sync(void) + { + int __ret = -1; + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + __streambuf_type* __sb = this->rdbuf(); + if (__sb) + { + if (__sb->pubsync() == -1) + __err |= ios_base::badbit; + else + __ret = 0; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return __ret; + } + template + typename basic_istream<_CharT, _Traits>::pos_type + basic_istream<_CharT, _Traits>:: + tellg(void) + { + pos_type __ret = pos_type(-1); + sentry __cerb(*this, true); + if (__cerb) + { + try + { + if (!this->fail()) + __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, + ios_base::in); + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + } + return __ret; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + seekg(pos_type __pos) + { + this->clear(this->rdstate() & ~ios_base::eofbit); + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + if (!this->fail()) + { + const pos_type __p = this->rdbuf()->pubseekpos(__pos, + ios_base::in); + if (__p == pos_type(off_type(-1))) + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + basic_istream<_CharT, _Traits>& + basic_istream<_CharT, _Traits>:: + seekg(off_type __off, ios_base::seekdir __dir) + { + this->clear(this->rdstate() & ~ios_base::eofbit); + sentry __cerb(*this, true); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + if (!this->fail()) + { + const pos_type __p = this->rdbuf()->pubseekoff(__off, __dir, + ios_base::in); + if (__p == pos_type(off_type(-1))) + __err |= ios_base::failbit; + } + } + catch(__cxxabiv1::__forced_unwind&) + { + this->_M_setstate(ios_base::badbit); + throw; + } + catch(...) + { this->_M_setstate(ios_base::badbit); } + if (__err) + this->setstate(__err); + } + return *this; + } + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef typename __istream_type::int_type __int_type; + typename __istream_type::sentry __cerb(__in, false); + if (__cerb) + { + ios_base::iostate __err = ios_base::goodbit; + try + { + const __int_type __cb = __in.rdbuf()->sbumpc(); + if (!_Traits::eq_int_type(__cb, _Traits::eof())) + __c = _Traits::to_char_type(__cb); + else + __err |= (ios_base::eofbit | ios_base::failbit); + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(ios_base::badbit); + throw; + } + catch(...) + { __in._M_setstate(ios_base::badbit); } + if (__err) + __in.setstate(__err); + } + return __in; + } + template + basic_istream<_CharT, _Traits>& + operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef typename _Traits::int_type int_type; + typedef _CharT char_type; + typedef ctype<_CharT> __ctype_type; + streamsize __extracted = 0; + ios_base::iostate __err = ios_base::goodbit; + typename __istream_type::sentry __cerb(__in, false); + if (__cerb) + { + try + { + streamsize __num = __in.width(); + if (__num <= 0) + __num = __gnu_cxx::__numeric_traits::__max; + const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); + const int_type __eof = _Traits::eof(); + __streambuf_type* __sb = __in.rdbuf(); + int_type __c = __sb->sgetc(); + while (__extracted < __num - 1 + && !_Traits::eq_int_type(__c, __eof) + && !__ct.is(ctype_base::space, + _Traits::to_char_type(__c))) + { + *__s++ = _Traits::to_char_type(__c); + ++__extracted; + __c = __sb->snextc(); + } + if (_Traits::eq_int_type(__c, __eof)) + __err |= ios_base::eofbit; + *__s = char_type(); + __in.width(0); + } + catch(__cxxabiv1::__forced_unwind&) + { + __in._M_setstate(ios_base::badbit); + throw; + } + catch(...) + { __in._M_setstate(ios_base::badbit); } + } + if (!__extracted) + __err |= ios_base::failbit; + if (__err) + __in.setstate(__err); + return __in; + } + template + basic_istream<_CharT, _Traits>& + ws(basic_istream<_CharT, _Traits>& __in) + { + typedef basic_istream<_CharT, _Traits> __istream_type; + typedef basic_streambuf<_CharT, _Traits> __streambuf_type; + typedef typename __istream_type::int_type __int_type; + typedef ctype<_CharT> __ctype_type; + const __ctype_type& __ct = use_facet<__ctype_type>(__in.getloc()); + const __int_type __eof = _Traits::eof(); + __streambuf_type* __sb = __in.rdbuf(); + __int_type __c = __sb->sgetc(); + while (!_Traits::eq_int_type(__c, __eof) + && __ct.is(ctype_base::space, _Traits::to_char_type(__c))) + __c = __sb->snextc(); + if (_Traits::eq_int_type(__c, __eof)) + __in.setstate(ios_base::eofbit); + return __in; + } + extern template class basic_istream; + extern template istream& ws(istream&); + extern template istream& operator>>(istream&, char&); + extern template istream& operator>>(istream&, char*); + extern template istream& operator>>(istream&, unsigned char&); + extern template istream& operator>>(istream&, signed char&); + extern template istream& operator>>(istream&, unsigned char*); + extern template istream& operator>>(istream&, signed char*); + extern template istream& istream::_M_extract(unsigned short&); + extern template istream& istream::_M_extract(unsigned int&); + extern template istream& istream::_M_extract(long&); + extern template istream& istream::_M_extract(unsigned long&); + extern template istream& istream::_M_extract(bool&); + extern template istream& istream::_M_extract(long long&); + extern template istream& istream::_M_extract(unsigned long long&); + extern template istream& istream::_M_extract(float&); + extern template istream& istream::_M_extract(double&); + extern template istream& istream::_M_extract(long double&); + extern template istream& istream::_M_extract(void*&); + extern template class basic_iostream; + extern template class basic_istream; + extern template wistream& ws(wistream&); + extern template wistream& operator>>(wistream&, wchar_t&); + extern template wistream& operator>>(wistream&, wchar_t*); + extern template wistream& wistream::_M_extract(unsigned short&); + extern template wistream& wistream::_M_extract(unsigned int&); + extern template wistream& wistream::_M_extract(long&); + extern template wistream& wistream::_M_extract(unsigned long&); + extern template wistream& wistream::_M_extract(bool&); + extern template wistream& wistream::_M_extract(long long&); + extern template wistream& wistream::_M_extract(unsigned long long&); + extern template wistream& wistream::_M_extract(float&); + extern template wistream& wistream::_M_extract(double&); + extern template wistream& wistream::_M_extract(long double&); + extern template wistream& wistream::_M_extract(void*&); + extern template class basic_iostream; +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template, typename _Dist = ptrdiff_t> + class istream_iterator + : public iterator + { + public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_istream<_CharT, _Traits> istream_type; + private: + istream_type* _M_stream; + _Tp _M_value; + bool _M_ok; + public: + istream_iterator() + : _M_stream(0), _M_value(), _M_ok(false) {} + istream_iterator(istream_type& __s) + : _M_stream(&__s) + { _M_read(); } + istream_iterator(const istream_iterator& __obj) + : _M_stream(__obj._M_stream), _M_value(__obj._M_value), + _M_ok(__obj._M_ok) + { } + const _Tp& + operator*() const + { + ; + return _M_value; + } + const _Tp* + operator->() const { return &(operator*()); } + istream_iterator& + operator++() + { + ; + _M_read(); + return *this; + } + istream_iterator + operator++(int) + { + ; + istream_iterator __tmp = *this; + _M_read(); + return __tmp; + } + bool + _M_equal(const istream_iterator& __x) const + { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); } + private: + void + _M_read() + { + _M_ok = (_M_stream && *_M_stream) ? true : false; + if (_M_ok) + { + *_M_stream >> _M_value; + _M_ok = *_M_stream ? true : false; + } + } + }; + template + inline bool + operator==(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, + const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) + { return __x._M_equal(__y); } + template + inline bool + operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x, + const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) + { return !__x._M_equal(__y); } + template > + class ostream_iterator + : public iterator + { + public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_ostream<_CharT, _Traits> ostream_type; + private: + ostream_type* _M_stream; + const _CharT* _M_string; + public: + ostream_iterator(ostream_type& __s) : _M_stream(&__s), _M_string(0) {} + ostream_iterator(ostream_type& __s, const _CharT* __c) + : _M_stream(&__s), _M_string(__c) { } + ostream_iterator(const ostream_iterator& __obj) + : _M_stream(__obj._M_stream), _M_string(__obj._M_string) { } + ostream_iterator& + operator=(const _Tp& __value) + { + ; + *_M_stream << __value; + if (_M_string) *_M_stream << _M_string; + return *this; + } + ostream_iterator& + operator*() + { return *this; } + ostream_iterator& + operator++() + { return *this; } + ostream_iterator& + operator++(int) + { return *this; } + }; +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + namespace __detail + { + struct _List_node_base + { + _List_node_base* _M_next; + _List_node_base* _M_prev; + static void + swap(_List_node_base& __x, _List_node_base& __y) throw (); + void + _M_transfer(_List_node_base* const __first, + _List_node_base* const __last) throw (); + void + _M_reverse() throw (); + void + _M_hook(_List_node_base* const __position) throw (); + void + _M_unhook() throw (); + }; + } + template + struct _List_node : public __detail::_List_node_base + { + _Tp _M_data; + }; + template + struct _List_iterator + { + typedef _List_iterator<_Tp> _Self; + typedef _List_node<_Tp> _Node; + typedef ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + typedef _Tp value_type; + typedef _Tp* pointer; + typedef _Tp& reference; + _List_iterator() + : _M_node() { } + explicit + _List_iterator(__detail::_List_node_base* __x) + : _M_node(__x) { } + reference + operator*() const + { return static_cast<_Node*>(_M_node)->_M_data; } + pointer + operator->() const + { return std::__addressof(static_cast<_Node*>(_M_node)->_M_data); } + _Self& + operator++() + { + _M_node = _M_node->_M_next; + return *this; + } + _Self + operator++(int) + { + _Self __tmp = *this; + _M_node = _M_node->_M_next; + return __tmp; + } + _Self& + operator--() + { + _M_node = _M_node->_M_prev; + return *this; + } + _Self + operator--(int) + { + _Self __tmp = *this; + _M_node = _M_node->_M_prev; + return __tmp; + } + bool + operator==(const _Self& __x) const + { return _M_node == __x._M_node; } + bool + operator!=(const _Self& __x) const + { return _M_node != __x._M_node; } + __detail::_List_node_base* _M_node; + }; + template + struct _List_const_iterator + { + typedef _List_const_iterator<_Tp> _Self; + typedef const _List_node<_Tp> _Node; + typedef _List_iterator<_Tp> iterator; + typedef ptrdiff_t difference_type; + typedef std::bidirectional_iterator_tag iterator_category; + typedef _Tp value_type; + typedef const _Tp* pointer; + typedef const _Tp& reference; + _List_const_iterator() + : _M_node() { } + explicit + _List_const_iterator(const __detail::_List_node_base* __x) + : _M_node(__x) { } + _List_const_iterator(const iterator& __x) + : _M_node(__x._M_node) { } + reference + operator*() const + { return static_cast<_Node*>(_M_node)->_M_data; } + pointer + operator->() const + { return std::__addressof(static_cast<_Node*>(_M_node)->_M_data); } + _Self& + operator++() + { + _M_node = _M_node->_M_next; + return *this; + } + _Self + operator++(int) + { + _Self __tmp = *this; + _M_node = _M_node->_M_next; + return __tmp; + } + _Self& + operator--() + { + _M_node = _M_node->_M_prev; + return *this; + } + _Self + operator--(int) + { + _Self __tmp = *this; + _M_node = _M_node->_M_prev; + return __tmp; + } + bool + operator==(const _Self& __x) const + { return _M_node == __x._M_node; } + bool + operator!=(const _Self& __x) const + { return _M_node != __x._M_node; } + const __detail::_List_node_base* _M_node; + }; + template + inline bool + operator==(const _List_iterator<_Val>& __x, + const _List_const_iterator<_Val>& __y) + { return __x._M_node == __y._M_node; } + template + inline bool + operator!=(const _List_iterator<_Val>& __x, + const _List_const_iterator<_Val>& __y) + { return __x._M_node != __y._M_node; } + template + class _List_base + { + protected: + typedef typename _Alloc::template rebind<_List_node<_Tp> >::other + _Node_alloc_type; + typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; + struct _List_impl + : public _Node_alloc_type + { + __detail::_List_node_base _M_node; + _List_impl() + : _Node_alloc_type(), _M_node() + { } + _List_impl(const _Node_alloc_type& __a) + : _Node_alloc_type(__a), _M_node() + { } + }; + _List_impl _M_impl; + _List_node<_Tp>* + _M_get_node() + { return _M_impl._Node_alloc_type::allocate(1); } + void + _M_put_node(_List_node<_Tp>* __p) + { _M_impl._Node_alloc_type::deallocate(__p, 1); } + public: + typedef _Alloc allocator_type; + _Node_alloc_type& + _M_get_Node_allocator() + { return *static_cast<_Node_alloc_type*>(&this->_M_impl); } + const _Node_alloc_type& + _M_get_Node_allocator() const + { return *static_cast(&this->_M_impl); } + _Tp_alloc_type + _M_get_Tp_allocator() const + { return _Tp_alloc_type(_M_get_Node_allocator()); } + allocator_type + get_allocator() const + { return allocator_type(_M_get_Node_allocator()); } + _List_base() + : _M_impl() + { _M_init(); } + _List_base(const allocator_type& __a) + : _M_impl(__a) + { _M_init(); } + ~_List_base() + { _M_clear(); } + void + _M_clear(); + void + _M_init() + { + this->_M_impl._M_node._M_next = &this->_M_impl._M_node; + this->_M_impl._M_node._M_prev = &this->_M_impl._M_node; + } + }; + template > + class list : protected _List_base<_Tp, _Alloc> + { + typedef typename _Alloc::value_type _Alloc_value_type; + typedef _List_base<_Tp, _Alloc> _Base; + typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; + public: + typedef _Tp value_type; + typedef typename _Tp_alloc_type::pointer pointer; + typedef typename _Tp_alloc_type::const_pointer const_pointer; + typedef typename _Tp_alloc_type::reference reference; + typedef typename _Tp_alloc_type::const_reference const_reference; + typedef _List_iterator<_Tp> iterator; + typedef _List_const_iterator<_Tp> const_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Alloc allocator_type; + protected: + typedef _List_node<_Tp> _Node; + using _Base::_M_impl; + using _Base::_M_put_node; + using _Base::_M_get_node; + using _Base::_M_get_Tp_allocator; + using _Base::_M_get_Node_allocator; + _Node* + _M_create_node(const value_type& __x) + { + _Node* __p = this->_M_get_node(); + try + { + _M_get_Tp_allocator().construct + (std::__addressof(__p->_M_data), __x); + } + catch(...) + { + _M_put_node(__p); + throw; + } + return __p; + } + public: + list() + : _Base() { } + explicit + list(const allocator_type& __a) + : _Base(__a) { } + explicit + list(size_type __n, const value_type& __value = value_type(), + const allocator_type& __a = allocator_type()) + : _Base(__a) + { _M_fill_initialize(__n, __value); } + list(const list& __x) + : _Base(__x._M_get_Node_allocator()) + { _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); } + template + list(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()) + : _Base(__a) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_initialize_dispatch(__first, __last, _Integral()); + } + list& + operator=(const list& __x); + void + assign(size_type __n, const value_type& __val) + { _M_fill_assign(__n, __val); } + template + void + assign(_InputIterator __first, _InputIterator __last) + { + typedef typename std::__is_integer<_InputIterator>::__type _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } + allocator_type + get_allocator() const + { return _Base::get_allocator(); } + iterator + begin() + { return iterator(this->_M_impl._M_node._M_next); } + const_iterator + begin() const + { return const_iterator(this->_M_impl._M_node._M_next); } + iterator + end() + { return iterator(&this->_M_impl._M_node); } + const_iterator + end() const + { return const_iterator(&this->_M_impl._M_node); } + reverse_iterator + rbegin() + { return reverse_iterator(end()); } + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(end()); } + reverse_iterator + rend() + { return reverse_iterator(begin()); } + const_reverse_iterator + rend() const + { return const_reverse_iterator(begin()); } + bool + empty() const + { return this->_M_impl._M_node._M_next == &this->_M_impl._M_node; } + size_type + size() const + { return std::distance(begin(), end()); } + size_type + max_size() const + { return _M_get_Node_allocator().max_size(); } + void + resize(size_type __new_size, value_type __x = value_type()); + reference + front() + { return *begin(); } + const_reference + front() const + { return *begin(); } + reference + back() + { + iterator __tmp = end(); + --__tmp; + return *__tmp; + } + const_reference + back() const + { + const_iterator __tmp = end(); + --__tmp; + return *__tmp; + } + void + push_front(const value_type& __x) + { this->_M_insert(begin(), __x); } + void + pop_front() + { this->_M_erase(begin()); } + void + push_back(const value_type& __x) + { this->_M_insert(end(), __x); } + void + pop_back() + { this->_M_erase(iterator(this->_M_impl._M_node._M_prev)); } + iterator + insert(iterator __position, const value_type& __x); + void + insert(iterator __position, size_type __n, const value_type& __x) + { + list __tmp(__n, __x, _M_get_Node_allocator()); + splice(__position, __tmp); + } + template + void + insert(iterator __position, _InputIterator __first, + _InputIterator __last) + { + list __tmp(__first, __last, _M_get_Node_allocator()); + splice(__position, __tmp); + } + iterator + erase(iterator __position); + iterator + erase(iterator __first, iterator __last) + { + while (__first != __last) + __first = erase(__first); + return __last; + } + void + swap(list& __x) + { + __detail::_List_node_base::swap(this->_M_impl._M_node, + __x._M_impl._M_node); + std::__alloc_swap:: + _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator()); + } + void + clear() + { + _Base::_M_clear(); + _Base::_M_init(); + } + void + splice(iterator __position, list& __x) + { + if (!__x.empty()) + { + _M_check_equal_allocators(__x); + this->_M_transfer(__position, __x.begin(), __x.end()); + } + } + void + splice(iterator __position, list& __x, iterator __i) + { + iterator __j = __i; + ++__j; + if (__position == __i || __position == __j) + return; + if (this != &__x) + _M_check_equal_allocators(__x); + this->_M_transfer(__position, __i, __j); + } + void + splice(iterator __position, list& __x, iterator __first, + iterator __last) + { + if (__first != __last) + { + if (this != &__x) + _M_check_equal_allocators(__x); + this->_M_transfer(__position, __first, __last); + } + } + void + remove(const _Tp& __value); + template + void + remove_if(_Predicate); + void + unique(); + template + void + unique(_BinaryPredicate); + void + merge(list& __x); + template + void + merge(list&, _StrictWeakOrdering); + void + reverse() + { this->_M_impl._M_node._M_reverse(); } + void + sort(); + template + void + sort(_StrictWeakOrdering); + protected: + template + void + _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) + { _M_fill_initialize(static_cast(__n), __x); } + template + void + _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { + for (; __first != __last; ++__first) + push_back(*__first); + } + void + _M_fill_initialize(size_type __n, const value_type& __x) + { + for (; __n; --__n) + push_back(__x); + } + template + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } + template + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + __false_type); + void + _M_fill_assign(size_type __n, const value_type& __val); + void + _M_transfer(iterator __position, iterator __first, iterator __last) + { __position._M_node->_M_transfer(__first._M_node, __last._M_node); } + void + _M_insert(iterator __position, const value_type& __x) + { + _Node* __tmp = _M_create_node(__x); + __tmp->_M_hook(__position._M_node); + } + void + _M_erase(iterator __position) + { + __position._M_node->_M_unhook(); + _Node* __n = static_cast<_Node*>(__position._M_node); + _M_get_Tp_allocator().destroy(std::__addressof(__n->_M_data)); + _M_put_node(__n); + } + void + _M_check_equal_allocators(list& __x) + { + if (std::__alloc_neq:: + _S_do_it(_M_get_Node_allocator(), __x._M_get_Node_allocator())) + __throw_runtime_error(("list::_M_check_equal_allocators")); + } + }; + template + inline bool + operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { + typedef typename list<_Tp, _Alloc>::const_iterator const_iterator; + const_iterator __end1 = __x.end(); + const_iterator __end2 = __y.end(); + const_iterator __i1 = __x.begin(); + const_iterator __i2 = __y.begin(); + while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2) + { + ++__i1; + ++__i2; + } + return __i1 == __end1 && __i2 == __end2; + } + template + inline bool + operator<(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return std::lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); } + template + inline bool + operator!=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return __y < __x; } + template + inline bool + operator<=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) + { return !(__x < __y); } + template + inline void + swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y) + { __x.swap(__y); } +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template + void + _List_base<_Tp, _Alloc>:: + _M_clear() + { + typedef _List_node<_Tp> _Node; + _Node* __cur = static_cast<_Node*>(this->_M_impl._M_node._M_next); + while (__cur != &this->_M_impl._M_node) + { + _Node* __tmp = __cur; + __cur = static_cast<_Node*>(__cur->_M_next); + _M_get_Tp_allocator().destroy(std::__addressof(__tmp->_M_data)); + _M_put_node(__tmp); + } + } + template + typename list<_Tp, _Alloc>::iterator + list<_Tp, _Alloc>:: + insert(iterator __position, const value_type& __x) + { + _Node* __tmp = _M_create_node(__x); + __tmp->_M_hook(__position._M_node); + return iterator(__tmp); + } + template + typename list<_Tp, _Alloc>::iterator + list<_Tp, _Alloc>:: + erase(iterator __position) + { + iterator __ret = iterator(__position._M_node->_M_next); + _M_erase(__position); + return __ret; + } + template + void + list<_Tp, _Alloc>:: + resize(size_type __new_size, value_type __x) + { + iterator __i = begin(); + size_type __len = 0; + for (; __i != end() && __len < __new_size; ++__i, ++__len) + ; + if (__len == __new_size) + erase(__i, end()); + else + insert(end(), __new_size - __len, __x); + } + template + list<_Tp, _Alloc>& + list<_Tp, _Alloc>:: + operator=(const list& __x) + { + if (this != &__x) + { + iterator __first1 = begin(); + iterator __last1 = end(); + const_iterator __first2 = __x.begin(); + const_iterator __last2 = __x.end(); + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, ++__first2) + *__first1 = *__first2; + if (__first2 == __last2) + erase(__first1, __last1); + else + insert(__last1, __first2, __last2); + } + return *this; + } + template + void + list<_Tp, _Alloc>:: + _M_fill_assign(size_type __n, const value_type& __val) + { + iterator __i = begin(); + for (; __i != end() && __n > 0; ++__i, --__n) + *__i = __val; + if (__n > 0) + insert(end(), __n, __val); + else + erase(__i, end()); + } + template + template + void + list<_Tp, _Alloc>:: + _M_assign_dispatch(_InputIterator __first2, _InputIterator __last2, + __false_type) + { + iterator __first1 = begin(); + iterator __last1 = end(); + for (; __first1 != __last1 && __first2 != __last2; + ++__first1, ++__first2) + *__first1 = *__first2; + if (__first2 == __last2) + erase(__first1, __last1); + else + insert(__last1, __first2, __last2); + } + template + void + list<_Tp, _Alloc>:: + remove(const value_type& __value) + { + iterator __first = begin(); + iterator __last = end(); + iterator __extra = __last; + while (__first != __last) + { + iterator __next = __first; + ++__next; + if (*__first == __value) + { + if (std::__addressof(*__first) != std::__addressof(__value)) + _M_erase(__first); + else + __extra = __first; + } + __first = __next; + } + if (__extra != __last) + _M_erase(__extra); + } + template + void + list<_Tp, _Alloc>:: + unique() + { + iterator __first = begin(); + iterator __last = end(); + if (__first == __last) + return; + iterator __next = __first; + while (++__next != __last) + { + if (*__first == *__next) + _M_erase(__next); + else + __first = __next; + __next = __first; + } + } + template + void + list<_Tp, _Alloc>:: + merge(list& __x) + { + if (this != &__x) + { + _M_check_equal_allocators(__x); + iterator __first1 = begin(); + iterator __last1 = end(); + iterator __first2 = __x.begin(); + iterator __last2 = __x.end(); + while (__first1 != __last1 && __first2 != __last2) + if (*__first2 < *__first1) + { + iterator __next = __first2; + _M_transfer(__first1, __first2, ++__next); + __first2 = __next; + } + else + ++__first1; + if (__first2 != __last2) + _M_transfer(__last1, __first2, __last2); + } + } + template + template + void + list<_Tp, _Alloc>:: + merge(list& __x, _StrictWeakOrdering __comp) + { + if (this != &__x) + { + _M_check_equal_allocators(__x); + iterator __first1 = begin(); + iterator __last1 = end(); + iterator __first2 = __x.begin(); + iterator __last2 = __x.end(); + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first2, *__first1)) + { + iterator __next = __first2; + _M_transfer(__first1, __first2, ++__next); + __first2 = __next; + } + else + ++__first1; + if (__first2 != __last2) + _M_transfer(__last1, __first2, __last2); + } + } + template + void + list<_Tp, _Alloc>:: + sort() + { + if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node + && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node) + { + list __carry; + list __tmp[64]; + list * __fill = &__tmp[0]; + list * __counter; + do + { + __carry.splice(__carry.begin(), *this, begin()); + for(__counter = &__tmp[0]; + __counter != __fill && !__counter->empty(); + ++__counter) + { + __counter->merge(__carry); + __carry.swap(*__counter); + } + __carry.swap(*__counter); + if (__counter == __fill) + ++__fill; + } + while ( !empty() ); + for (__counter = &__tmp[1]; __counter != __fill; ++__counter) + __counter->merge(*(__counter - 1)); + swap( *(__fill - 1) ); + } + } + template + template + void + list<_Tp, _Alloc>:: + remove_if(_Predicate __pred) + { + iterator __first = begin(); + iterator __last = end(); + while (__first != __last) + { + iterator __next = __first; + ++__next; + if (__pred(*__first)) + _M_erase(__first); + __first = __next; + } + } + template + template + void + list<_Tp, _Alloc>:: + unique(_BinaryPredicate __binary_pred) + { + iterator __first = begin(); + iterator __last = end(); + if (__first == __last) + return; + iterator __next = __first; + while (++__next != __last) + { + if (__binary_pred(*__first, *__next)) + _M_erase(__next); + else + __first = __next; + __next = __first; + } + } + template + template + void + list<_Tp, _Alloc>:: + sort(_StrictWeakOrdering __comp) + { + if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node + && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node) + { + list __carry; + list __tmp[64]; + list * __fill = &__tmp[0]; + list * __counter; + do + { + __carry.splice(__carry.begin(), *this, begin()); + for(__counter = &__tmp[0]; + __counter != __fill && !__counter->empty(); + ++__counter) + { + __counter->merge(__carry, __comp); + __carry.swap(*__counter); + } + __carry.swap(*__counter); + if (__counter == __fill) + ++__fill; + } + while ( !empty() ); + for (__counter = &__tmp[1]; __counter != __fill; ++__counter) + __counter->merge(*(__counter - 1), __comp); + swap(*(__fill - 1)); + } + } +} +typedef QtValidLicenseForCoreModule QtCoreModule; +template class QVector; +template class QSet; +struct QListData { + struct Data { + QBasicAtomicInt ref; + int alloc, begin, end; + uint sharable : 1; + void *array[1]; + }; + enum { DataHeaderSize = sizeof(Data) - sizeof(void *) }; + Data *detach(int alloc); + Data *detach_grow(int *i, int n); + Data *detach(); + Data *detach2(); + Data *detach3(); + void realloc(int alloc); + static Data shared_null; + Data *d; + void **erase(void **xi); + void **append(int n); + void **append(); + void **append(const QListData &l); + void **append2(const QListData &l); + void **prepend(); + void **insert(int i); + void remove(int i); + void remove(int i, int n); + void move(int from, int to); + inline int size() const { return d->end - d->begin; } + inline bool isEmpty() const { return d->end == d->begin; } + inline void **at(int i) const { return d->array + d->begin + i; } + inline void **begin() const { return d->array + d->begin; } + inline void **end() const { return d->array + d->end; } +}; +template +class QList +{ + struct Node { void *v; + inline T &t() + { return *reinterpret_cast(QTypeInfo::isLarge || QTypeInfo::isStatic + ? v : this); } + }; + union { QListData p; QListData::Data *d; }; +public: + inline QList() : d(&QListData::shared_null) { d->ref.ref(); } + inline QList(const QList &l) : d(l.d) { d->ref.ref(); if (!d->sharable) detach_helper(); } + ~QList(); + QList &operator=(const QList &l); + inline void swap(QList &other) { qSwap(d, other.d); } + bool operator==(const QList &l) const; + inline bool operator!=(const QList &l) const { return !(*this == l); } + inline int size() const { return p.size(); } + inline void detach() { if (d->ref != 1) detach_helper(); } + inline void detachShared() + { + if (d->ref != 1 && this->d != &QListData::shared_null) + detach_helper(); + } + inline bool isDetached() const { return d->ref == 1; } + inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; } + inline bool isSharedWith(const QList &other) const { return d == other.d; } + inline bool isEmpty() const { return p.isEmpty(); } + void clear(); + const T &at(int i) const; + const T &operator[](int i) const; + T &operator[](int i); + void reserve(int size); + void append(const T &t); + void append(const QList &t); + void prepend(const T &t); + void insert(int i, const T &t); + void replace(int i, const T &t); + void removeAt(int i); + int removeAll(const T &t); + bool removeOne(const T &t); + T takeAt(int i); + T takeFirst(); + T takeLast(); + void move(int from, int to); + void swap(int i, int j); + int indexOf(const T &t, int from = 0) const; + int lastIndexOf(const T &t, int from = -1) const; + QBool contains(const T &t) const; + int count(const T &t) const; + class const_iterator; + class iterator { + public: + Node *i; + typedef std::random_access_iterator_tag iterator_category; + typedef qptrdiff difference_type; + typedef T value_type; + typedef T *pointer; + typedef T &reference; + inline iterator() : i(0) {} + inline iterator(Node *n) : i(n) {} + inline iterator(const iterator &o): i(o.i){} + inline T &operator*() const { return i->t(); } + inline T *operator->() const { return &i->t(); } + inline T &operator[](int j) const { return i[j].t(); } + inline bool operator==(const iterator &o) const { return i == o.i; } + inline bool operator!=(const iterator &o) const { return i != o.i; } + inline bool operator<(const iterator& other) const { return i < other.i; } + inline bool operator<=(const iterator& other) const { return i <= other.i; } + inline bool operator>(const iterator& other) const { return i > other.i; } + inline bool operator>=(const iterator& other) const { return i >= other.i; } + inline bool operator==(const const_iterator &o) const + { return i == o.i; } + inline bool operator!=(const const_iterator &o) const + { return i != o.i; } + inline bool operator<(const const_iterator& other) const + { return i < other.i; } + inline bool operator<=(const const_iterator& other) const + { return i <= other.i; } + inline bool operator>(const const_iterator& other) const + { return i > other.i; } + inline bool operator>=(const const_iterator& other) const + { return i >= other.i; } + inline iterator &operator++() { ++i; return *this; } + inline iterator operator++(int) { Node *n = i; ++i; return n; } + inline iterator &operator--() { i--; return *this; } + inline iterator operator--(int) { Node *n = i; i--; return n; } + inline iterator &operator+=(int j) { i+=j; return *this; } + inline iterator &operator-=(int j) { i-=j; return *this; } + inline iterator operator+(int j) const { return iterator(i+j); } + inline iterator operator-(int j) const { return iterator(i-j); } + inline int operator-(iterator j) const { return int(i - j.i); } + }; + friend class iterator; + class const_iterator { + public: + Node *i; + typedef std::random_access_iterator_tag iterator_category; + typedef qptrdiff difference_type; + typedef T value_type; + typedef const T *pointer; + typedef const T &reference; + inline const_iterator() : i(0) {} + inline const_iterator(Node *n) : i(n) {} + inline const_iterator(const const_iterator &o): i(o.i) {} + inline const_iterator(const iterator &o): i(o.i) {} + inline const T &operator*() const { return i->t(); } + inline const T *operator->() const { return &i->t(); } + inline const T &operator[](int j) const { return i[j].t(); } + inline bool operator==(const const_iterator &o) const { return i == o.i; } + inline bool operator!=(const const_iterator &o) const { return i != o.i; } + inline bool operator<(const const_iterator& other) const { return i < other.i; } + inline bool operator<=(const const_iterator& other) const { return i <= other.i; } + inline bool operator>(const const_iterator& other) const { return i > other.i; } + inline bool operator>=(const const_iterator& other) const { return i >= other.i; } + inline const_iterator &operator++() { ++i; return *this; } + inline const_iterator operator++(int) { Node *n = i; ++i; return n; } + inline const_iterator &operator--() { i--; return *this; } + inline const_iterator operator--(int) { Node *n = i; i--; return n; } + inline const_iterator &operator+=(int j) { i+=j; return *this; } + inline const_iterator &operator-=(int j) { i-=j; return *this; } + inline const_iterator operator+(int j) const { return const_iterator(i+j); } + inline const_iterator operator-(int j) const { return const_iterator(i-j); } + inline int operator-(const_iterator j) const { return i - j.i; } + }; + friend class const_iterator; + inline iterator begin() { detach(); return reinterpret_cast(p.begin()); } + inline const_iterator begin() const { return reinterpret_cast(p.begin()); } + inline const_iterator constBegin() const { return reinterpret_cast(p.begin()); } + inline iterator end() { detach(); return reinterpret_cast(p.end()); } + inline const_iterator end() const { return reinterpret_cast(p.end()); } + inline const_iterator constEnd() const { return reinterpret_cast(p.end()); } + iterator insert(iterator before, const T &t); + iterator erase(iterator pos); + iterator erase(iterator first, iterator last); + typedef iterator Iterator; + typedef const_iterator ConstIterator; + inline int count() const { return p.size(); } + inline int length() const { return p.size(); } + inline T& first() { qt_noop(); return *begin(); } + inline const T& first() const { qt_noop(); return at(0); } + T& last() { qt_noop(); return *(--end()); } + const T& last() const { qt_noop(); return at(count() - 1); } + inline void removeFirst() { qt_noop(); erase(begin()); } + inline void removeLast() { qt_noop(); erase(--end()); } + inline bool startsWith(const T &t) const { return !isEmpty() && first() == t; } + inline bool endsWith(const T &t) const { return !isEmpty() && last() == t; } + QList mid(int pos, int length = -1) const; + T value(int i) const; + T value(int i, const T &defaultValue) const; + inline void push_back(const T &t) { append(t); } + inline void push_front(const T &t) { prepend(t); } + inline T& front() { return first(); } + inline const T& front() const { return first(); } + inline T& back() { return last(); } + inline const T& back() const { return last(); } + inline void pop_front() { removeFirst(); } + inline void pop_back() { removeLast(); } + inline bool empty() const { return isEmpty(); } + typedef int size_type; + typedef T value_type; + typedef value_type *pointer; + typedef const value_type *const_pointer; + typedef value_type &reference; + typedef const value_type &const_reference; + typedef qptrdiff difference_type; + QList &operator+=(const QList &l); + inline QList operator+(const QList &l) const + { QList n = *this; n += l; return n; } + inline QList &operator+=(const T &t) + { append(t); return *this; } + inline QList &operator<< (const T &t) + { append(t); return *this; } + inline QList &operator<<(const QList &l) + { *this += l; return *this; } + QVector toVector() const; + QSet toSet() const; + static QList fromVector(const QVector &vector); + static QList fromSet(const QSet &set); + static inline QList fromStdList(const std::list &list) + { QList tmp; qCopy(list.begin(), list.end(), std::back_inserter(tmp)); return tmp; } + inline std::list toStdList() const + { std::list tmp; qCopy(constBegin(), constEnd(), std::back_inserter(tmp)); return tmp; } +private: + Node *detach_helper_grow(int i, int n); + void detach_helper(int alloc); + void detach_helper(); + void free(QListData::Data *d); + void node_construct(Node *n, const T &t); + void node_destruct(Node *n); + void node_copy(Node *from, Node *to, Node *src); + void node_destruct(Node *from, Node *to); +}; +template +inline void QList::node_construct(Node *n, const T &t) +{ + if (QTypeInfo::isLarge || QTypeInfo::isStatic) n->v = new T(t); + else if (QTypeInfo::isComplex) new (n) T(t); + else ::memcpy(n, &t, sizeof(T)); +} +template +inline void QList::node_destruct(Node *n) +{ + if (QTypeInfo::isLarge || QTypeInfo::isStatic) delete reinterpret_cast(n->v); + else if (QTypeInfo::isComplex) reinterpret_cast(n)->~T(); +} +template +inline void QList::node_copy(Node *from, Node *to, Node *src) +{ + Node *current = from; + if (QTypeInfo::isLarge || QTypeInfo::isStatic) { + try { + while(current != to) { + current->v = new T(*reinterpret_cast(src->v)); + ++current; + ++src; + } + } catch (...) { + while (current-- != from) + delete reinterpret_cast(current->v); + throw; + } + } else if (QTypeInfo::isComplex) { + try { + while(current != to) { + new (current) T(*reinterpret_cast(src)); + ++current; + ++src; + } + } catch (...) { + while (current-- != from) + (reinterpret_cast(current))->~T(); + throw; + } + } else { + if (src != from && to - from > 0) + memcpy(from, src, (to - from) * sizeof(Node *)); + } +} +template +inline void QList::node_destruct(Node *from, Node *to) +{ + if (QTypeInfo::isLarge || QTypeInfo::isStatic) + while(from != to) --to, delete reinterpret_cast(to->v); + else if (QTypeInfo::isComplex) + while (from != to) --to, reinterpret_cast(to)->~T(); +} +template +inline QList &QList::operator=(const QList &l) +{ + if (d != l.d) { + QListData::Data *o = l.d; + o->ref.ref(); + if (!d->ref.deref()) + free(d); + d = o; + if (!d->sharable) + detach_helper(); + } + return *this; +} +template +inline typename QList::iterator QList::insert(iterator before, const T &t) +{ + int iBefore = int(before.i - reinterpret_cast(p.begin())); + Node *n = reinterpret_cast(p.insert(iBefore)); + try { + node_construct(n, t); + } catch (...) { + p.remove(iBefore); + throw; + } + return n; +} +template +inline typename QList::iterator QList::erase(iterator it) +{ node_destruct(it.i); + return reinterpret_cast(p.erase(reinterpret_cast(it.i))); } +template +inline const T &QList::at(int i) const +{ qt_noop(); + return reinterpret_cast(p.at(i))->t(); } +template +inline const T &QList::operator[](int i) const +{ qt_noop(); + return reinterpret_cast(p.at(i))->t(); } +template +inline T &QList::operator[](int i) +{ qt_noop(); + detach(); return reinterpret_cast(p.at(i))->t(); } +template +inline void QList::removeAt(int i) +{ if(i >= 0 && i < p.size()) { detach(); + node_destruct(reinterpret_cast(p.at(i))); p.remove(i); } } +template +inline T QList::takeAt(int i) +{ qt_noop(); + detach(); Node *n = reinterpret_cast(p.at(i)); T t = n->t(); node_destruct(n); + p.remove(i); return t; } +template +inline T QList::takeFirst() +{ T t = first(); removeFirst(); return t; } +template +inline T QList::takeLast() +{ T t = last(); removeLast(); return t; } +template + void QList::reserve(int alloc) +{ + if (d->alloc < alloc) { + if (d->ref != 1) + detach_helper(alloc); + else + p.realloc(alloc); + } +} +template + void QList::append(const T &t) +{ + if (d->ref != 1) { + Node *n = detach_helper_grow(2147483647, 1); + try { + node_construct(n, t); + } catch (...) { + --d->end; + throw; + } + } else { + if (QTypeInfo::isLarge || QTypeInfo::isStatic) { + Node *n = reinterpret_cast(p.append()); + try { + node_construct(n, t); + } catch (...) { + --d->end; + throw; + } + } else { + Node *n, copy; + node_construct(©, t); + try { + n = reinterpret_cast(p.append());; + } catch (...) { + node_destruct(©); + throw; + } + *n = copy; + } + } +} +template +inline void QList::prepend(const T &t) +{ + if (d->ref != 1) { + Node *n = detach_helper_grow(0, 1); + try { + node_construct(n, t); + } catch (...) { + ++d->begin; + throw; + } + } else { + if (QTypeInfo::isLarge || QTypeInfo::isStatic) { + Node *n = reinterpret_cast(p.prepend()); + try { + node_construct(n, t); + } catch (...) { + ++d->begin; + throw; + } + } else { + Node *n, copy; + node_construct(©, t); + try { + n = reinterpret_cast(p.prepend());; + } catch (...) { + node_destruct(©); + throw; + } + *n = copy; + } + } +} +template +inline void QList::insert(int i, const T &t) +{ + if (d->ref != 1) { + Node *n = detach_helper_grow(i, 1); + try { + node_construct(n, t); + } catch (...) { + p.remove(i); + throw; + } + } else { + if (QTypeInfo::isLarge || QTypeInfo::isStatic) { + Node *n = reinterpret_cast(p.insert(i)); + try { + node_construct(n, t); + } catch (...) { + p.remove(i); + throw; + } + } else { + Node *n, copy; + node_construct(©, t); + try { + n = reinterpret_cast(p.insert(i));; + } catch (...) { + node_destruct(©); + throw; + } + *n = copy; + } + } +} +template +inline void QList::replace(int i, const T &t) +{ + qt_noop(); + detach(); + reinterpret_cast(p.at(i))->t() = t; +} +template +inline void QList::swap(int i, int j) +{ + qt_noop() + ; + detach(); + void *t = d->array[d->begin + i]; + d->array[d->begin + i] = d->array[d->begin + j]; + d->array[d->begin + j] = t; +} +template +inline void QList::move(int from, int to) +{ + qt_noop() + ; + detach(); + p.move(from, to); +} +template + QList QList::mid(int pos, int alength) const +{ + if (alength < 0 || pos + alength > size()) + alength = size() - pos; + if (pos == 0 && alength == size()) + return *this; + QList cpy; + if (alength <= 0) + return cpy; + cpy.reserve(alength); + cpy.d->end = alength; + try { + cpy.node_copy(reinterpret_cast(cpy.p.begin()), + reinterpret_cast(cpy.p.end()), + reinterpret_cast(p.begin() + pos)); + } catch (...) { + cpy.d->end = 0; + throw; + } + return cpy; +} +template + T QList::value(int i) const +{ + if (i < 0 || i >= p.size()) { + return T(); + } + return reinterpret_cast(p.at(i))->t(); +} +template + T QList::value(int i, const T& defaultValue) const +{ + return ((i < 0 || i >= p.size()) ? defaultValue : reinterpret_cast(p.at(i))->t()); +} +template + typename QList::Node *QList::detach_helper_grow(int i, int c) +{ + Node *n = reinterpret_cast(p.begin()); + QListData::Data *x = p.detach_grow(&i, c); + try { + node_copy(reinterpret_cast(p.begin()), + reinterpret_cast(p.begin() + i), n); + } catch (...) { + qFree(d); + d = x; + throw; + } + try { + node_copy(reinterpret_cast(p.begin() + i + c), + reinterpret_cast(p.end()), n + i); + } catch (...) { + node_destruct(reinterpret_cast(p.begin()), + reinterpret_cast(p.begin() + i)); + qFree(d); + d = x; + throw; + } + if (!x->ref.deref()) + free(x); + return reinterpret_cast(p.begin() + i); +} +template + void QList::detach_helper(int alloc) +{ + Node *n = reinterpret_cast(p.begin()); + QListData::Data *x = p.detach(alloc); + try { + node_copy(reinterpret_cast(p.begin()), reinterpret_cast(p.end()), n); + } catch (...) { + qFree(d); + d = x; + throw; + } + if (!x->ref.deref()) + free(x); +} +template + void QList::detach_helper() +{ + detach_helper(d->alloc); +} +template + QList::~QList() +{ + if (!d->ref.deref()) + free(d); +} +template + bool QList::operator==(const QList &l) const +{ + if (p.size() != l.p.size()) + return false; + if (d == l.d) + return true; + Node *i = reinterpret_cast(p.end()); + Node *b = reinterpret_cast(p.begin()); + Node *li = reinterpret_cast(l.p.end()); + while (i != b) { + --i; --li; + if (!(i->t() == li->t())) + return false; + } + return true; +} +template + void QList::free(QListData::Data *data) +{ + node_destruct(reinterpret_cast(data->array + data->begin), + reinterpret_cast(data->array + data->end)); + qFree(data); +} +template + void QList::clear() +{ + *this = QList(); +} +template + int QList::removeAll(const T &_t) +{ + int index = indexOf(_t); + if (index == -1) + return 0; + const T t = _t; + detach(); + Node *i = reinterpret_cast(p.at(index)); + Node *e = reinterpret_cast(p.end()); + Node *n = i; + node_destruct(i); + while (++i != e) { + if (i->t() == t) + node_destruct(i); + else + *n++ = *i; + } + int removedCount = e - n; + d->end -= removedCount; + return removedCount; +} +template + bool QList::removeOne(const T &_t) +{ + int index = indexOf(_t); + if (index != -1) { + removeAt(index); + return true; + } + return false; +} +template + typename QList::iterator QList::erase(typename QList::iterator afirst, + typename QList::iterator alast) +{ + for (Node *n = afirst.i; n < alast.i; ++n) + node_destruct(n); + int idx = afirst - begin(); + p.remove(idx, alast - afirst); + return begin() + idx; +} +template + QList &QList::operator+=(const QList &l) +{ + if (!l.isEmpty()) { + if (isEmpty()) { + *this = l; + } else { + Node *n = (d->ref != 1) + ? detach_helper_grow(2147483647, l.size()) + : reinterpret_cast(p.append2(l.p)); + try { + node_copy(n, reinterpret_cast(p.end()), + reinterpret_cast(l.p.begin())); + } catch (...) { + d->end -= int(reinterpret_cast(p.end()) - n); + throw; + } + } + } + return *this; +} +template +inline void QList::append(const QList &t) +{ + *this += t; +} +template + int QList::indexOf(const T &t, int from) const +{ + if (from < 0) + from = qMax(from + p.size(), 0); + if (from < p.size()) { + Node *n = reinterpret_cast(p.at(from -1)); + Node *e = reinterpret_cast(p.end()); + while (++n != e) + if (n->t() == t) + return int(n - reinterpret_cast(p.begin())); + } + return -1; +} +template + int QList::lastIndexOf(const T &t, int from) const +{ + if (from < 0) + from += p.size(); + else if (from >= p.size()) + from = p.size()-1; + if (from >= 0) { + Node *b = reinterpret_cast(p.begin()); + Node *n = reinterpret_cast(p.at(from + 1)); + while (n-- != b) { + if (n->t() == t) + return n - b; + } + } + return -1; +} +template + QBool QList::contains(const T &t) const +{ + Node *b = reinterpret_cast(p.begin()); + Node *i = reinterpret_cast(p.end()); + while (i-- != b) + if (i->t() == t) + return QBool(true); + return QBool(false); +} +template + int QList::count(const T &t) const +{ + int c = 0; + Node *b = reinterpret_cast(p.begin()); + Node *i = reinterpret_cast(p.end()); + while (i-- != b) + if (i->t() == t) + ++c; + return c; +} +template class QListIterator { typedef typename QList::const_iterator const_iterator; QList c; const_iterator i; public: inline QListIterator(const QList &container) : c(container), i(c.constBegin()) {} inline QListIterator &operator=(const QList &container) { c = container; i = c.constBegin(); return *this; } inline void toFront() { i = c.constBegin(); } inline void toBack() { i = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline const T &next() { return *i++; } inline const T &peekNext() const { return *i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline const T &previous() { return *--i; } inline const T &peekPrevious() const { const_iterator p = i; return *--p; } inline bool findNext(const T &t) { while (i != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(--i) == t) return true; return false; } }; +template class QMutableListIterator { typedef typename QList::iterator iterator; typedef typename QList::const_iterator const_iterator; QList *c; iterator i, n; inline bool item_exists() const { return const_iterator(n) != c->constEnd(); } public: inline QMutableListIterator(QList &container) : c(&container) { c->setSharable(false); i = c->begin(); n = c->end(); } inline ~QMutableListIterator() { c->setSharable(true); } inline QMutableListIterator &operator=(QList &container) { c->setSharable(true); c = &container; c->setSharable(false); i = c->begin(); n = c->end(); return *this; } inline void toFront() { i = c->begin(); n = c->end(); } inline void toBack() { i = c->end(); n = i; } inline bool hasNext() const { return c->constEnd() != const_iterator(i); } inline T &next() { n = i++; return *n; } inline T &peekNext() const { return *i; } inline bool hasPrevious() const { return c->constBegin() != const_iterator(i); } inline T &previous() { n = --i; return *n; } inline T &peekPrevious() const { iterator p = i; return *--p; } inline void remove() { if (c->constEnd() != const_iterator(n)) { i = c->erase(n); n = c->end(); } } inline void setValue(const T &t) const { if (c->constEnd() != const_iterator(n)) *n = t; } inline T &value() { qt_noop(); return *n; } inline const T &value() const { qt_noop(); return *n; } inline void insert(const T &t) { n = i = c->insert(i, t); ++i; } inline bool findNext(const T &t) { while (c->constEnd() != const_iterator(n = i)) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (c->constBegin() != const_iterator(i)) if (*(n = --i) == t) return true; n = c->end(); return false; } }; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QEvent; +class QTimerEvent; +class QChildEvent; +struct QMetaObject; +class QVariant; +class QObjectPrivate; +class QObject; +class QThread; +class QWidget; +class QRegExp; +class QObjectUserData; +typedef QList QObjectList; + void qt_qFindChildren_helper(const QObject *parent, const QString &name, const QRegExp *re, + const QMetaObject &mo, QList *list); + QObject *qt_qFindChild_helper(const QObject *parent, const QString &name, const QMetaObject &mo); +class +QObjectData { +public: + virtual ~QObjectData() = 0; + QObject *q_ptr; + QObject *parent; + QObjectList children; + uint isWidget : 1; + uint pendTimer : 1; + uint blockSig : 1; + uint wasDeleted : 1; + uint ownObjectName : 1; + uint sendChildEvents : 1; + uint receiveChildEvents : 1; + uint inEventHandler : 1; + uint inThreadChangeEvent : 1; + uint hasGuards : 1; + uint unused : 22; + int postedEvents; + QMetaObject *metaObject; +}; +class QObject +{ + public: template inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); + inline QObjectPrivate* d_func() { return reinterpret_cast(qGetPtrHelper(d_ptr)); } inline const QObjectPrivate* d_func() const { return reinterpret_cast(qGetPtrHelper(d_ptr)); } friend class QObjectPrivate; +public: + explicit QObject(QObject *parent=0); + virtual ~QObject(); + virtual bool event(QEvent *); + virtual bool eventFilter(QObject *, QEvent *); + QString objectName() const; + void setObjectName(const QString &name); + inline bool isWidgetType() const { return d_ptr->isWidget; } + inline bool signalsBlocked() const { return d_ptr->blockSig; } + bool blockSignals(bool b); + QThread *thread() const; + void moveToThread(QThread *thread); + int startTimer(int interval); + void killTimer(int id); + template + inline T findChild(const QString &aName = QString()) const + { return static_cast(qt_qFindChild_helper(this, aName, reinterpret_cast(0)->staticMetaObject)); } + template + inline QList findChildren(const QString &aName = QString()) const + { + QList list; + union { + QList *typedList; + QList *voidList; + } u; + u.typedList = &list; + qt_qFindChildren_helper(this, aName, 0, reinterpret_cast(0)->staticMetaObject, u.voidList); + return list; + } + template + inline QList findChildren(const QRegExp &re) const + { + QList list; + union { + QList *typedList; + QList *voidList; + } u; + u.typedList = &list; + qt_qFindChildren_helper(this, QString(), &re, reinterpret_cast(0)->staticMetaObject, u.voidList); + return list; + } + inline const QObjectList &children() const { return d_ptr->children; } + void setParent(QObject *); + void installEventFilter(QObject *); + void removeEventFilter(QObject *); + static bool connect(const QObject *sender, const char *signal, + const QObject *receiver, const char *member, Qt::ConnectionType = + Qt::AutoConnection + ); + static bool connect(const QObject *sender, const QMetaMethod &signal, + const QObject *receiver, const QMetaMethod &method, + Qt::ConnectionType type = + Qt::AutoConnection + ); + inline bool connect(const QObject *sender, const char *signal, + const char *member, Qt::ConnectionType type = + Qt::AutoConnection + ) const; + static bool disconnect(const QObject *sender, const char *signal, + const QObject *receiver, const char *member); + static bool disconnect(const QObject *sender, const QMetaMethod &signal, + const QObject *receiver, const QMetaMethod &member); + inline bool disconnect(const char *signal = 0, + const QObject *receiver = 0, const char *member = 0) + { return disconnect(this, signal, receiver, member); } + inline bool disconnect(const QObject *receiver, const char *member = 0) + { return disconnect(this, 0, receiver, member); } + void dumpObjectTree(); + void dumpObjectInfo(); + bool setProperty(const char *name, const QVariant &value); + QVariant property(const char *name) const; + QList dynamicPropertyNames() const; + static uint registerUserData(); + void setUserData(uint id, QObjectUserData* data); + QObjectUserData* userData(uint id) const; +protected: + void destroyed(QObject * = 0); +public: + inline QObject *parent() const { return d_ptr->parent; } + inline bool inherits(const char *classname) const + { return const_cast(this)->qt_metacast(classname) != 0; } +public : + void deleteLater(); +protected: + QObject *sender() const; + int senderSignalIndex() const; + int receivers(const char* signal) const; + virtual void timerEvent(QTimerEvent *); + virtual void childEvent(QChildEvent *); + virtual void customEvent(QEvent *); + virtual void connectNotify(const char *signal); + virtual void disconnectNotify(const char *signal); +protected: + QObject(QObjectPrivate &dd, QObject *parent = 0); +protected: + QScopedPointer d_ptr; + static const QMetaObject staticQtMetaObject; + friend struct QMetaObject; + friend class QApplication; + friend class QApplicationPrivate; + friend class QCoreApplication; + friend class QCoreApplicationPrivate; + friend class QWidget; + friend class QThreadData; +private: + QObject(const QObject &); QObject &operator=(const QObject &); +}; +inline bool QObject::connect(const QObject *asender, const char *asignal, + const char *amember, Qt::ConnectionType atype) const +{ return connect(asender, asignal, this, amember, atype); } +class QObjectUserData { +public: + virtual ~QObjectUserData(); +}; +template +inline T qFindChild(const QObject *o, const QString &name = QString()) +{ return o->findChild(name); } +template +inline QList qFindChildren(const QObject *o, const QString &name = QString()) +{ + return o->findChildren(name); +} +template +inline QList qFindChildren(const QObject *o, const QRegExp &re) +{ + return o->findChildren(re); +} +template +inline T qobject_cast(QObject *object) +{ + reinterpret_cast(object)->qt_check_for_QOBJECT_macro(*reinterpret_cast(object)); + return static_cast(reinterpret_cast(object)->staticMetaObject.cast(object)); +} +template +inline T qobject_cast(const QObject *object) +{ + reinterpret_cast(object)->qt_check_for_QOBJECT_macro(*reinterpret_cast(const_cast(object))); + return static_cast(reinterpret_cast(object)->staticMetaObject.cast(object)); +} +template inline const char * qobject_interface_iid() +{ return 0; } + QDebug operator<<(QDebug, const QObject *); +typedef QtValidLicenseForCoreModule QtCoreModule; +class QByteArray; +class QIODevicePrivate; +class QIODevice + : public QObject +{ + public: template inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); +public: + enum OpenModeFlag { + NotOpen = 0x0000, + ReadOnly = 0x0001, + WriteOnly = 0x0002, + ReadWrite = ReadOnly | WriteOnly, + Append = 0x0004, + Truncate = 0x0008, + Text = 0x0010, + Unbuffered = 0x0020 + }; + typedef QFlags OpenMode; + QIODevice(); + explicit QIODevice(QObject *parent); + virtual ~QIODevice(); + OpenMode openMode() const; + void setTextModeEnabled(bool enabled); + bool isTextModeEnabled() const; + bool isOpen() const; + bool isReadable() const; + bool isWritable() const; + virtual bool isSequential() const; + virtual bool open(OpenMode mode); + virtual void close(); + virtual qint64 pos() const; + virtual qint64 size() const; + virtual bool seek(qint64 pos); + virtual bool atEnd() const; + virtual bool reset(); + virtual qint64 bytesAvailable() const; + virtual qint64 bytesToWrite() const; + qint64 read(char *data, qint64 maxlen); + QByteArray read(qint64 maxlen); + QByteArray readAll(); + qint64 readLine(char *data, qint64 maxlen); + QByteArray readLine(qint64 maxlen = 0); + virtual bool canReadLine() const; + qint64 write(const char *data, qint64 len); + qint64 write(const char *data); + inline qint64 write(const QByteArray &data) + { return write(data.constData(), data.size()); } + qint64 peek(char *data, qint64 maxlen); + QByteArray peek(qint64 maxlen); + virtual bool waitForReadyRead(int msecs); + virtual bool waitForBytesWritten(int msecs); + void ungetChar(char c); + bool putChar(char c); + bool getChar(char *c); + QString errorString() const; +protected: + void readyRead(); + void bytesWritten(qint64 bytes); + void aboutToClose(); + void readChannelFinished(); +protected: + QIODevice(QIODevicePrivate &dd, QObject *parent = 0); + virtual qint64 readData(char *data, qint64 maxlen) = 0; + virtual qint64 readLineData(char *data, qint64 maxlen); + virtual qint64 writeData(const char *data, qint64 len) = 0; + void setOpenMode(OpenMode openMode); + void setErrorString(const QString &errorString); +private: + inline QIODevicePrivate* d_func() { return reinterpret_cast(qGetPtrHelper(d_ptr)); } inline const QIODevicePrivate* d_func() const { return reinterpret_cast(qGetPtrHelper(d_ptr)); } friend class QIODevicePrivate; + QIODevice(const QIODevice &); QIODevice &operator=(const QIODevice &); +}; + inline QFlags operator|(QIODevice::OpenMode::enum_type f1, QIODevice::OpenMode::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(QIODevice::OpenMode::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QIODevice::OpenMode::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +class QDebug; + QDebug operator<<(QDebug debug, QIODevice::OpenMode modes); +typedef QtValidLicenseForCoreModule QtCoreModule; +class QByteArray; +class QIODevice; +template class QList; +template class QLinkedList; +template class QVector; +template class QSet; +template class QHash; +template class QMap; +class QDataStreamPrivate; +class QDataStream +{ +public: + enum Version { + Qt_1_0 = 1, + Qt_2_0 = 2, + Qt_2_1 = 3, + Qt_3_0 = 4, + Qt_3_1 = 5, + Qt_3_3 = 6, + Qt_4_0 = 7, + Qt_4_1 = Qt_4_0, + Qt_4_2 = 8, + Qt_4_3 = 9, + Qt_4_4 = 10, + Qt_4_5 = 11, + Qt_4_6 = 12, + Qt_4_7 = Qt_4_6, + Qt_4_8 = Qt_4_7 + }; + enum ByteOrder { + BigEndian = QSysInfo::BigEndian, + LittleEndian = QSysInfo::LittleEndian + }; + enum Status { + Ok, + ReadPastEnd, + ReadCorruptData, + WriteFailed + }; + enum FloatingPointPrecision { + SinglePrecision, + DoublePrecision + }; + QDataStream(); + explicit QDataStream(QIODevice *); + QDataStream(QByteArray *, QIODevice::OpenMode flags); + QDataStream(const QByteArray &); + virtual ~QDataStream(); + QIODevice *device() const; + void setDevice(QIODevice *); + void unsetDevice(); + bool atEnd() const; + Status status() const; + void setStatus(Status status); + void resetStatus(); + FloatingPointPrecision floatingPointPrecision() const; + void setFloatingPointPrecision(FloatingPointPrecision precision); + ByteOrder byteOrder() const; + void setByteOrder(ByteOrder); + int version() const; + void setVersion(int); + QDataStream &operator>>(qint8 &i); + QDataStream &operator>>(quint8 &i); + QDataStream &operator>>(qint16 &i); + QDataStream &operator>>(quint16 &i); + QDataStream &operator>>(qint32 &i); + QDataStream &operator>>(quint32 &i); + QDataStream &operator>>(qint64 &i); + QDataStream &operator>>(quint64 &i); + QDataStream &operator>>(bool &i); + QDataStream &operator>>(float &f); + QDataStream &operator>>(double &f); + QDataStream &operator>>(char *&str); + QDataStream &operator<<(qint8 i); + QDataStream &operator<<(quint8 i); + QDataStream &operator<<(qint16 i); + QDataStream &operator<<(quint16 i); + QDataStream &operator<<(qint32 i); + QDataStream &operator<<(quint32 i); + QDataStream &operator<<(qint64 i); + QDataStream &operator<<(quint64 i); + QDataStream &operator<<(bool i); + QDataStream &operator<<(float f); + QDataStream &operator<<(double f); + QDataStream &operator<<(const char *str); + QDataStream &readBytes(char *&, uint &len); + int readRawData(char *, int len); + QDataStream &writeBytes(const char *, uint len); + int writeRawData(const char *, int len); + int skipRawData(int len); +private: + QDataStream(const QDataStream &); QDataStream &operator=(const QDataStream &); + QScopedPointer d; + QIODevice *dev; + bool owndev; + bool noswap; + ByteOrder byteorder; + int ver; + Status q_status; +}; +inline QIODevice *QDataStream::device() const +{ return dev; } +inline QDataStream::ByteOrder QDataStream::byteOrder() const +{ return byteorder; } +inline int QDataStream::version() const +{ return ver; } +inline void QDataStream::setVersion(int v) +{ ver = v; } +inline QDataStream &QDataStream::operator>>(quint8 &i) +{ return *this >> reinterpret_cast(i); } +inline QDataStream &QDataStream::operator>>(quint16 &i) +{ return *this >> reinterpret_cast(i); } +inline QDataStream &QDataStream::operator>>(quint32 &i) +{ return *this >> reinterpret_cast(i); } +inline QDataStream &QDataStream::operator>>(quint64 &i) +{ return *this >> reinterpret_cast(i); } +inline QDataStream &QDataStream::operator<<(quint8 i) +{ return *this << qint8(i); } +inline QDataStream &QDataStream::operator<<(quint16 i) +{ return *this << qint16(i); } +inline QDataStream &QDataStream::operator<<(quint32 i) +{ return *this << qint32(i); } +inline QDataStream &QDataStream::operator<<(quint64 i) +{ return *this << qint64(i); } +template +QDataStream& operator>>(QDataStream& s, QList& l) +{ + l.clear(); + quint32 c; + s >> c; + l.reserve(c); + for(quint32 i = 0; i < c; ++i) + { + T t; + s >> t; + l.append(t); + if (s.atEnd()) + break; + } + return s; +} +template +QDataStream& operator<<(QDataStream& s, const QList& l) +{ + s << quint32(l.size()); + for (int i = 0; i < l.size(); ++i) + s << l.at(i); + return s; +} +template +QDataStream& operator>>(QDataStream& s, QLinkedList& l) +{ + l.clear(); + quint32 c; + s >> c; + for(quint32 i = 0; i < c; ++i) + { + T t; + s >> t; + l.append(t); + if (s.atEnd()) + break; + } + return s; +} +template +QDataStream& operator<<(QDataStream& s, const QLinkedList& l) +{ + s << quint32(l.size()); + typename QLinkedList::ConstIterator it = l.constBegin(); + for(; it != l.constEnd(); ++it) + s << *it; + return s; +} +template +QDataStream& operator>>(QDataStream& s, QVector& v) +{ + v.clear(); + quint32 c; + s >> c; + v.resize(c); + for(quint32 i = 0; i < c; ++i) { + T t; + s >> t; + v[i] = t; + } + return s; +} +template +QDataStream& operator<<(QDataStream& s, const QVector& v) +{ + s << quint32(v.size()); + for (typename QVector::const_iterator it = v.begin(); it != v.end(); ++it) + s << *it; + return s; +} +template +QDataStream &operator>>(QDataStream &in, QSet &set) +{ + set.clear(); + quint32 c; + in >> c; + for (quint32 i = 0; i < c; ++i) { + T t; + in >> t; + set << t; + if (in.atEnd()) + break; + } + return in; +} +template +QDataStream& operator<<(QDataStream &out, const QSet &set) +{ + out << quint32(set.size()); + typename QSet::const_iterator i = set.constBegin(); + while (i != set.constEnd()) { + out << *i; + ++i; + } + return out; +} +template + QDataStream &operator>>(QDataStream &in, QHash &hash) +{ + QDataStream::Status oldStatus = in.status(); + in.resetStatus(); + hash.clear(); + quint32 n; + in >> n; + for (quint32 i = 0; i < n; ++i) { + if (in.status() != QDataStream::Ok) + break; + Key k; + T t; + in >> k >> t; + hash.insertMulti(k, t); + } + if (in.status() != QDataStream::Ok) + hash.clear(); + if (oldStatus != QDataStream::Ok) + in.setStatus(oldStatus); + return in; +} +template + QDataStream &operator<<(QDataStream &out, const QHash& hash) +{ + out << quint32(hash.size()); + typename QHash::ConstIterator it = hash.end(); + typename QHash::ConstIterator begin = hash.begin(); + while (it != begin) { + --it; + out << it.key() << it.value(); + } + return out; +} +template + QDataStream &operator>>(QDataStream &in, QMap &map) +{ + QDataStream::Status oldStatus = in.status(); + in.resetStatus(); + map.clear(); + quint32 n; + in >> n; + map.detach(); + map.setInsertInOrder(true); + for (quint32 i = 0; i < n; ++i) { + if (in.status() != QDataStream::Ok) + break; + aKey key; + aT value; + in >> key >> value; + map.insertMulti(key, value); + } + map.setInsertInOrder(false); + if (in.status() != QDataStream::Ok) + map.clear(); + if (oldStatus != QDataStream::Ok) + in.setStatus(oldStatus); + return in; +} +template + QDataStream &operator<<(QDataStream &out, const QMap &map) +{ + out << quint32(map.size()); + typename QMap::ConstIterator it = map.end(); + typename QMap::ConstIterator begin = map.begin(); + while (it != begin) { + --it; + out << it.key() << it.value(); + } + return out; +} +typedef QtValidLicenseForCoreModule QtCoreModule; +struct QRegExpPrivate; +class QStringList; +class QRegExp +{ +public: + enum PatternSyntax { + RegExp, + Wildcard, + FixedString, + RegExp2, + WildcardUnix, + W3CXmlSchema11 }; + enum CaretMode { CaretAtZero, CaretAtOffset, CaretWontMatch }; + QRegExp(); + explicit QRegExp(const QString &pattern, Qt::CaseSensitivity cs = Qt::CaseSensitive, + PatternSyntax syntax = RegExp); + QRegExp(const QRegExp &rx); + ~QRegExp(); + QRegExp &operator=(const QRegExp &rx); + inline void swap(QRegExp &other) { qSwap(priv, other.priv); } + bool operator==(const QRegExp &rx) const; + inline bool operator!=(const QRegExp &rx) const { return !operator==(rx); } + bool isEmpty() const; + bool isValid() const; + QString pattern() const; + void setPattern(const QString &pattern); + Qt::CaseSensitivity caseSensitivity() const; + void setCaseSensitivity(Qt::CaseSensitivity cs); + PatternSyntax patternSyntax() const; + void setPatternSyntax(PatternSyntax syntax); + bool isMinimal() const; + void setMinimal(bool minimal); + bool exactMatch(const QString &str) const; + int indexIn(const QString &str, int offset = 0, CaretMode caretMode = CaretAtZero) const; + int lastIndexIn(const QString &str, int offset = -1, CaretMode caretMode = CaretAtZero) const; + int matchedLength() const; + int numCaptures() const; + int captureCount() const; + QStringList capturedTexts() const; + QStringList capturedTexts(); + QString cap(int nth = 0) const; + QString cap(int nth = 0); + int pos(int nth = 0) const; + int pos(int nth = 0); + QString errorString() const; + QString errorString(); + static QString escape(const QString &str); +private: + QRegExpPrivate *priv; +}; +template<> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QRegExp)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QRegExp"; } }; + QDataStream &operator<<(QDataStream &out, const QRegExp ®Exp); + QDataStream &operator>>(QDataStream &in, QRegExp ®Exp); +typedef QtValidLicenseForCoreModule QtCoreModule; +class QStringMatcherPrivate; +class QStringMatcher +{ +public: + QStringMatcher(); + QStringMatcher(const QString &pattern, + Qt::CaseSensitivity cs = Qt::CaseSensitive); + QStringMatcher(const QChar *uc, int len, + Qt::CaseSensitivity cs = Qt::CaseSensitive); + QStringMatcher(const QStringMatcher &other); + ~QStringMatcher(); + QStringMatcher &operator=(const QStringMatcher &other); + void setPattern(const QString &pattern); + void setCaseSensitivity(Qt::CaseSensitivity cs); + int indexIn(const QString &str, int from = 0) const; + int indexIn(const QChar *str, int length, int from = 0) const; + QString pattern() const; + inline Qt::CaseSensitivity caseSensitivity() const { return q_cs; } +private: + QStringMatcherPrivate *d_ptr; + QString q_pattern; + Qt::CaseSensitivity q_cs; + struct Data { + uchar q_skiptable[256]; + const QChar *uc; + int len; + }; + union { + uint q_data[256]; + Data p; + }; +}; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QRegExp; +typedef QListIterator QStringListIterator; +typedef QMutableListIterator QMutableStringListIterator; +class QStringList : public QList +{ +public: + inline QStringList() { } + inline explicit QStringList(const QString &i) { append(i); } + inline QStringList(const QStringList &l) : QList(l) { } + inline QStringList(const QList &l) : QList(l) { } + inline void sort(); + inline int removeDuplicates(); + inline QString join(const QString &sep) const; + inline QStringList filter(const QString &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + inline QBool contains(const QString &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const; + inline QStringList &replaceInStrings(const QString &before, const QString &after, Qt::CaseSensitivity cs = Qt::CaseSensitive); + inline QStringList operator+(const QStringList &other) const + { QStringList n = *this; n += other; return n; } + inline QStringList &operator<<(const QString &str) + { append(str); return *this; } + inline QStringList &operator<<(const QStringList &l) + { *this += l; return *this; } + inline QStringList filter(const QRegExp &rx) const; + inline QStringList &replaceInStrings(const QRegExp &rx, const QString &after); + inline int indexOf(const QRegExp &rx, int from = 0) const; + inline int lastIndexOf(const QRegExp &rx, int from = -1) const; + inline int indexOf(QRegExp &rx, int from = 0) const; + inline int lastIndexOf(QRegExp &rx, int from = -1) const; + using QList::indexOf; + using QList::lastIndexOf; +}; +namespace QtPrivate { + void QStringList_sort(QStringList *that); + int QStringList_removeDuplicates(QStringList *that); + QString QStringList_join(const QStringList *that, const QString &sep); + QStringList QStringList_filter(const QStringList *that, const QString &str, + Qt::CaseSensitivity cs); + QBool QStringList_contains(const QStringList *that, const QString &str, Qt::CaseSensitivity cs); + void QStringList_replaceInStrings(QStringList *that, const QString &before, const QString &after, + Qt::CaseSensitivity cs); + void QStringList_replaceInStrings(QStringList *that, const QRegExp &rx, const QString &after); + QStringList QStringList_filter(const QStringList *that, const QRegExp &re); + int QStringList_indexOf(const QStringList *that, const QRegExp &rx, int from); + int QStringList_lastIndexOf(const QStringList *that, const QRegExp &rx, int from); + int QStringList_indexOf(const QStringList *that, QRegExp &rx, int from); + int QStringList_lastIndexOf(const QStringList *that, QRegExp &rx, int from); +} +inline void QStringList::sort() +{ + QtPrivate::QStringList_sort(this); +} +inline int QStringList::removeDuplicates() +{ + return QtPrivate::QStringList_removeDuplicates(this); +} +inline QString QStringList::join(const QString &sep) const +{ + return QtPrivate::QStringList_join(this, sep); +} +inline QStringList QStringList::filter(const QString &str, Qt::CaseSensitivity cs) const +{ + return QtPrivate::QStringList_filter(this, str, cs); +} +inline QBool QStringList::contains(const QString &str, Qt::CaseSensitivity cs) const +{ + return QtPrivate::QStringList_contains(this, str, cs); +} +inline QStringList &QStringList::replaceInStrings(const QString &before, const QString &after, Qt::CaseSensitivity cs) +{ + QtPrivate::QStringList_replaceInStrings(this, before, after, cs); + return *this; +} +inline QStringList &QStringList::replaceInStrings(const QRegExp &rx, const QString &after) +{ + QtPrivate::QStringList_replaceInStrings(this, rx, after); + return *this; +} +inline QStringList QStringList::filter(const QRegExp &rx) const +{ + return QtPrivate::QStringList_filter(this, rx); +} +inline int QStringList::indexOf(const QRegExp &rx, int from) const +{ + return QtPrivate::QStringList_indexOf(this, rx, from); +} +inline int QStringList::lastIndexOf(const QRegExp &rx, int from) const +{ + return QtPrivate::QStringList_lastIndexOf(this, rx, from); +} +inline int QStringList::indexOf(QRegExp &rx, int from) const +{ + return QtPrivate::QStringList_indexOf(this, rx, from); +} +inline int QStringList::lastIndexOf(QRegExp &rx, int from) const +{ + return QtPrivate::QStringList_lastIndexOf(this, rx, from); +} +inline QDataStream &operator>>(QDataStream &in, QStringList &list) +{ + return operator>>(in, static_cast &>(list)); +} +inline QDataStream &operator<<(QDataStream &out, const QStringList &list) +{ + return operator<<(out, static_cast &>(list)); +} +typedef QtValidLicenseForCoreModule QtCoreModule; +class QBitRef; +class QBitArray +{ + friend QDataStream &operator<<(QDataStream &, const QBitArray &); + friend QDataStream &operator>>(QDataStream &, QBitArray &); + friend uint qHash(const QBitArray &key); + QByteArray d; +public: + inline QBitArray() {} + explicit QBitArray(int size, bool val = false); + QBitArray(const QBitArray &other) : d(other.d) {} + inline QBitArray &operator=(const QBitArray &other) { d = other.d; return *this; } + inline void swap(QBitArray &other) { qSwap(d, other.d); } + inline int size() const { return (d.size() << 3) - *d.constData(); } + inline int count() const { return (d.size() << 3) - *d.constData(); } + int count(bool on) const; + inline bool isEmpty() const { return d.isEmpty(); } + inline bool isNull() const { return d.isNull(); } + void resize(int size); + inline void detach() { d.detach(); } + inline bool isDetached() const { return d.isDetached(); } + inline void clear() { d.clear(); } + bool testBit(int i) const; + void setBit(int i); + void setBit(int i, bool val); + void clearBit(int i); + bool toggleBit(int i); + bool at(int i) const; + QBitRef operator[](int i); + bool operator[](int i) const; + QBitRef operator[](uint i); + bool operator[](uint i) const; + QBitArray& operator&=(const QBitArray &); + QBitArray& operator|=(const QBitArray &); + QBitArray& operator^=(const QBitArray &); + QBitArray operator~() const; + inline bool operator==(const QBitArray& a) const { return d == a.d; } + inline bool operator!=(const QBitArray& a) const { return d != a.d; } + inline bool fill(bool val, int size = -1); + void fill(bool val, int first, int last); + inline void truncate(int pos) { if (pos < size()) resize(pos); } +public: + typedef QByteArray::DataPtr DataPtr; + inline DataPtr &data_ptr() { return d.data_ptr(); } +}; +inline bool QBitArray::fill(bool aval, int asize) +{ *this = QBitArray((asize < 0 ? this->size() : asize), aval); return true; } + QBitArray operator&(const QBitArray &, const QBitArray &); + QBitArray operator|(const QBitArray &, const QBitArray &); + QBitArray operator^(const QBitArray &, const QBitArray &); +inline bool QBitArray::testBit(int i) const +{ qt_noop(); + return (*(reinterpret_cast(d.constData())+1+(i>>3)) & (1 << (i & 7))) != 0; } +inline void QBitArray::setBit(int i) +{ qt_noop(); + *(reinterpret_cast(d.data())+1+(i>>3)) |= uchar(1 << (i & 7)); } +inline void QBitArray::clearBit(int i) +{ qt_noop(); + *(reinterpret_cast(d.data())+1+(i>>3)) &= ~uchar(1 << (i & 7)); } +inline void QBitArray::setBit(int i, bool val) +{ if (val) setBit(i); else clearBit(i); } +inline bool QBitArray::toggleBit(int i) +{ qt_noop(); + uchar b = uchar(1<<(i&7)); uchar* p = reinterpret_cast(d.data())+1+(i>>3); + uchar c = uchar(*p&b); *p^=b; return c!=0; } +inline bool QBitArray::operator[](int i) const { return testBit(i); } +inline bool QBitArray::operator[](uint i) const { return testBit(i); } +inline bool QBitArray::at(int i) const { return testBit(i); } +class QBitRef +{ +private: + QBitArray& a; + int i; + inline QBitRef(QBitArray& array, int idx) : a(array), i(idx) {} + friend class QBitArray; +public: + inline operator bool() const { return a.testBit(i); } + inline bool operator!() const { return !a.testBit(i); } + QBitRef& operator=(const QBitRef& val) { a.setBit(i, val); return *this; } + QBitRef& operator=(bool val) { a.setBit(i, val); return *this; } +}; +inline QBitRef QBitArray::operator[](int i) +{ qt_noop(); return QBitRef(*this, i); } +inline QBitRef QBitArray::operator[](uint i) +{ return QBitRef(*this, i); } + QDataStream &operator<<(QDataStream &, const QBitArray &); + QDataStream &operator>>(QDataStream &, QBitArray &); +template<> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QBitArray)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QBitArray"; } }; +template <> inline bool qIsDetached(QBitArray &t) { return t.isDetached(); } template <> inline void qSwap(QBitArray &value1, QBitArray &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } namespace std { template<> inline void swap< ::QBitArray>(::QBitArray &value1, ::QBitArray &value2) { swap(value1.data_ptr(), value2.data_ptr()); } } +typedef QtValidLicenseForCoreModule QtCoreModule; +class QByteArrayMatcherPrivate; +class QByteArrayMatcher +{ +public: + QByteArrayMatcher(); + explicit QByteArrayMatcher(const QByteArray &pattern); + explicit QByteArrayMatcher(const char *pattern, int length); + QByteArrayMatcher(const QByteArrayMatcher &other); + ~QByteArrayMatcher(); + QByteArrayMatcher &operator=(const QByteArrayMatcher &other); + void setPattern(const QByteArray &pattern); + int indexIn(const QByteArray &ba, int from = 0) const; + int indexIn(const char *str, int len, int from = 0) const; + inline QByteArray pattern() const + { + if (q_pattern.isNull()) + return QByteArray(reinterpret_cast(p.p), p.l); + return q_pattern; + } +private: + QByteArrayMatcherPrivate *d; + QByteArray q_pattern; + struct Data { + uchar q_skiptable[256]; + const uchar *p; + int l; + }; + union { + uint dummy[256]; + Data p; + }; +}; +typedef QtValidLicenseForCoreModule QtCoreModule; +template +struct QPair +{ + typedef T1 first_type; + typedef T2 second_type; + QPair() : first(T1()), second(T2()) {} + QPair(const T1 &t1, const T2 &t2) : first(t1), second(t2) {} + QPair &operator=(const QPair &other) + { first = other.first; second = other.second; return *this; } + T1 first; + T2 second; +}; +template +inline bool operator==(const QPair &p1, const QPair &p2) +{ return p1.first == p2.first && p1.second == p2.second; } +template +inline bool operator!=(const QPair &p1, const QPair &p2) +{ return !(p1 == p2); } +template +inline bool operator<(const QPair &p1, const QPair &p2) +{ + return p1.first < p2.first || (!(p2.first < p1.first) && p1.second < p2.second); +} +template +inline bool operator>(const QPair &p1, const QPair &p2) +{ + return p2 < p1; +} +template +inline bool operator<=(const QPair &p1, const QPair &p2) +{ + return !(p2 < p1); +} +template +inline bool operator>=(const QPair &p1, const QPair &p2) +{ + return !(p1 < p2); +} +template + QPair qMakePair(const T1 &x, const T2 &y) +{ + return QPair(x, y); +} +template +inline QDataStream& operator>>(QDataStream& s, QPair& p) +{ + s >> p.first >> p.second; + return s; +} +template +inline QDataStream& operator<<(QDataStream& s, const QPair& p) +{ + s << p.first << p.second; + return s; +} +typedef QtValidLicenseForCoreModule QtCoreModule; +class QBitArray; +class QByteArray; +class QString; +class QStringRef; +inline uint qHash(char key) { return uint(key); } +inline uint qHash(uchar key) { return uint(key); } +inline uint qHash(signed char key) { return uint(key); } +inline uint qHash(ushort key) { return uint(key); } +inline uint qHash(short key) { return uint(key); } +inline uint qHash(uint key) { return key; } +inline uint qHash(int key) { return uint(key); } +inline uint qHash(ulong key) +{ + if (sizeof(ulong) > sizeof(uint)) { + return uint(((key >> (8 * sizeof(uint) - 1)) ^ key) & (~0U)); + } else { + return uint(key & (~0U)); + } +} +inline uint qHash(long key) { return qHash(ulong(key)); } +inline uint qHash(quint64 key) +{ + if (sizeof(quint64) > sizeof(uint)) { + return uint(((key >> (8 * sizeof(uint) - 1)) ^ key) & (~0U)); + } else { + return uint(key & (~0U)); + } +} +inline uint qHash(qint64 key) { return qHash(quint64(key)); } +inline uint qHash(QChar key) { return qHash(key.unicode()); } + uint qHash(const QByteArray &key); + uint qHash(const QString &key); + uint qHash(const QStringRef &key); + uint qHash(const QBitArray &key); +template inline uint qHash(const T *key) +{ + return qHash(reinterpret_cast(key)); +} +template inline uint qHash(const QPair &key) +{ + uint h1 = qHash(key.first); + uint h2 = qHash(key.second); + return ((h1 << 16) | (h1 >> 16)) ^ h2; +} +struct QHashData +{ + struct Node { + Node *next; + uint h; + }; + Node *fakeNext; + Node **buckets; + QBasicAtomicInt ref; + int size; + int nodeSize; + short userNumBits; + short numBits; + int numBuckets; + uint sharable : 1; + uint strictAlignment : 1; + uint reserved : 30; + void *allocateNode(); + void *allocateNode(int nodeAlign); + void freeNode(void *node); + QHashData *detach_helper(void (*node_duplicate)(Node *, void *), int nodeSize); + QHashData *detach_helper2(void (*node_duplicate)(Node *, void *), void (*node_delete)(Node *), + int nodeSize, int nodeAlign); + void mightGrow(); + bool willGrow(); + void hasShrunk(); + void rehash(int hint); + void free_helper(void (*node_delete)(Node *)); + void destroyAndFree(); + Node *firstNode(); + static Node *nextNode(Node *node); + static Node *previousNode(Node *node); + static QHashData shared_null; +}; +inline void QHashData::mightGrow() +{ + if (size >= numBuckets) + rehash(numBits + 1); +} +inline bool QHashData::willGrow() +{ + if (size >= numBuckets) { + rehash(numBits + 1); + return true; + } else { + return false; + } +} +inline void QHashData::hasShrunk() +{ + if (size <= (numBuckets >> 3) && numBits > userNumBits) { + try { + rehash(qMax(int(numBits) - 2, int(userNumBits))); + } catch (const std::bad_alloc &) { + } + } +} +inline QHashData::Node *QHashData::firstNode() +{ + Node *e = reinterpret_cast(this); + Node **bucket = buckets; + int n = numBuckets; + while (n--) { + if (*bucket != e) + return *bucket; + ++bucket; + } + return e; +} +struct QHashDummyValue +{ +}; +inline bool operator==(const QHashDummyValue & , const QHashDummyValue & ) +{ + return true; +} +template<> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE | Q_DUMMY_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE | Q_DUMMY_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QHashDummyValue)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE | Q_DUMMY_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QHashDummyValue"; } }; +template +struct QHashDummyNode +{ + QHashDummyNode *next; + uint h; + Key key; + inline QHashDummyNode(const Key &key0) : key(key0) {} +}; +template +struct QHashNode +{ + QHashNode *next; + uint h; + Key key; + T value; + inline QHashNode(const Key &key0) : key(key0) {} + inline QHashNode(const Key &key0, const T &value0) : key(key0), value(value0) {} + inline bool same_key(uint h0, const Key &key0) { return h0 == h && key0 == key; } +}; +template struct QHashDummyNode { QHashDummyNode *next; union { uint h; int key; }; inline QHashDummyNode(int ) {} }; template struct QHashNode { QHashNode *next; union { uint h; int key; }; T value; inline QHashNode(int ) {} inline QHashNode(int , const T &value0) : value(value0) {} inline bool same_key(uint h0, int) { return h0 == h; } }; +template struct QHashDummyNode { QHashDummyNode *next; union { uint h; uint key; }; inline QHashDummyNode(uint ) {} }; template struct QHashNode { QHashNode *next; union { uint h; uint key; }; T value; inline QHashNode(uint ) {} inline QHashNode(uint , const T &value0) : value(value0) {} inline bool same_key(uint h0, uint) { return h0 == h; } }; +template +class QHash +{ + typedef QHashDummyNode DummyNode; + typedef QHashNode Node; + union { + QHashData *d; + QHashNode *e; + }; + static inline Node *concrete(QHashData::Node *node) { + return reinterpret_cast(node); + } + static inline int alignOfNode() { return qMax(sizeof(void*), __alignof__(Node)); } + static inline int alignOfDummyNode() { return qMax(sizeof(void*), __alignof__(DummyNode)); } +public: + inline QHash() : d(&QHashData::shared_null) { d->ref.ref(); } + inline QHash(const QHash &other) : d(other.d) { d->ref.ref(); if (!d->sharable) detach(); } + inline ~QHash() { if (!d->ref.deref()) freeData(d); } + QHash &operator=(const QHash &other); + inline void swap(QHash &other) { qSwap(d, other.d); } + bool operator==(const QHash &other) const; + inline bool operator!=(const QHash &other) const { return !(*this == other); } + inline int size() const { return d->size; } + inline bool isEmpty() const { return d->size == 0; } + inline int capacity() const { return d->numBuckets; } + void reserve(int size); + inline void squeeze() { reserve(1); } + inline void detach() { if (d->ref != 1) detach_helper(); } + inline bool isDetached() const { return d->ref == 1; } + inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; } + inline bool isSharedWith(const QHash &other) const { return d == other.d; } + void clear(); + int remove(const Key &key); + T take(const Key &key); + bool contains(const Key &key) const; + const Key key(const T &value) const; + const Key key(const T &value, const Key &defaultKey) const; + const T value(const Key &key) const; + const T value(const Key &key, const T &defaultValue) const; + T &operator[](const Key &key); + const T operator[](const Key &key) const; + QList uniqueKeys() const; + QList keys() const; + QList keys(const T &value) const; + QList values() const; + QList values(const Key &key) const; + int count(const Key &key) const; + class const_iterator; + class iterator + { + friend class const_iterator; + QHashData::Node *i; + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef qptrdiff difference_type; + typedef T value_type; + typedef T *pointer; + typedef T &reference; + inline operator Node *() const { return concrete(i); } + inline iterator() : i(0) { } + explicit inline iterator(void *node) : i(reinterpret_cast(node)) { } + inline const Key &key() const { return concrete(i)->key; } + inline T &value() const { return concrete(i)->value; } + inline T &operator*() const { return concrete(i)->value; } + inline T *operator->() const { return &concrete(i)->value; } + inline bool operator==(const iterator &o) const { return i == o.i; } + inline bool operator!=(const iterator &o) const { return i != o.i; } + inline iterator &operator++() { + i = QHashData::nextNode(i); + return *this; + } + inline iterator operator++(int) { + iterator r = *this; + i = QHashData::nextNode(i); + return r; + } + inline iterator &operator--() { + i = QHashData::previousNode(i); + return *this; + } + inline iterator operator--(int) { + iterator r = *this; + i = QHashData::previousNode(i); + return r; + } + inline iterator operator+(int j) const + { iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; } + inline iterator operator-(int j) const { return operator+(-j); } + inline iterator &operator+=(int j) { return *this = *this + j; } + inline iterator &operator-=(int j) { return *this = *this - j; } + public: + inline bool operator==(const const_iterator &o) const + { return i == o.i; } + inline bool operator!=(const const_iterator &o) const + { return i != o.i; } + private: + inline operator bool() const { return false; } + }; + friend class iterator; + class const_iterator + { + friend class iterator; + QHashData::Node *i; + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef qptrdiff difference_type; + typedef T value_type; + typedef const T *pointer; + typedef const T &reference; + inline operator Node *() const { return concrete(i); } + inline const_iterator() : i(0) { } + explicit inline const_iterator(void *node) + : i(reinterpret_cast(node)) { } + inline const_iterator(const iterator &o) + { i = o.i; } + inline const Key &key() const { return concrete(i)->key; } + inline const T &value() const { return concrete(i)->value; } + inline const T &operator*() const { return concrete(i)->value; } + inline const T *operator->() const { return &concrete(i)->value; } + inline bool operator==(const const_iterator &o) const { return i == o.i; } + inline bool operator!=(const const_iterator &o) const { return i != o.i; } + inline const_iterator &operator++() { + i = QHashData::nextNode(i); + return *this; + } + inline const_iterator operator++(int) { + const_iterator r = *this; + i = QHashData::nextNode(i); + return r; + } + inline const_iterator &operator--() { + i = QHashData::previousNode(i); + return *this; + } + inline const_iterator operator--(int) { + const_iterator r = *this; + i = QHashData::previousNode(i); + return r; + } + inline const_iterator operator+(int j) const + { const_iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; } + inline const_iterator operator-(int j) const { return operator+(-j); } + inline const_iterator &operator+=(int j) { return *this = *this + j; } + inline const_iterator &operator-=(int j) { return *this = *this - j; } + private: + inline operator bool() const { return false; } + }; + friend class const_iterator; + inline iterator begin() { detach(); return iterator(d->firstNode()); } + inline const_iterator begin() const { return const_iterator(d->firstNode()); } + inline const_iterator constBegin() const { return const_iterator(d->firstNode()); } + inline iterator end() { detach(); return iterator(e); } + inline const_iterator end() const { return const_iterator(e); } + inline const_iterator constEnd() const { return const_iterator(e); } + iterator erase(iterator it); + typedef iterator Iterator; + typedef const_iterator ConstIterator; + inline int count() const { return d->size; } + iterator find(const Key &key); + const_iterator find(const Key &key) const; + const_iterator constFind(const Key &key) const; + iterator insert(const Key &key, const T &value); + iterator insertMulti(const Key &key, const T &value); + QHash &unite(const QHash &other); + typedef T mapped_type; + typedef Key key_type; + typedef qptrdiff difference_type; + typedef int size_type; + inline bool empty() const { return isEmpty(); } +private: + void detach_helper(); + void freeData(QHashData *d); + Node **findNode(const Key &key, uint *hp = 0) const; + Node *createNode(uint h, const Key &key, const T &value, Node **nextNode); + void deleteNode(Node *node); + static void deleteNode2(QHashData::Node *node); + static void duplicateNode(QHashData::Node *originalNode, void *newNode); +}; +template +inline void QHash::deleteNode(Node *node) +{ + deleteNode2(reinterpret_cast(node)); + d->freeNode(node); +} +template +inline void QHash::deleteNode2(QHashData::Node *node) +{ + concrete(node)->~Node(); +} +template +inline void QHash::duplicateNode(QHashData::Node *node, void *newNode) +{ + Node *concreteNode = concrete(node); + if (QTypeInfo::isDummy) { + (void) new (newNode) DummyNode(concreteNode->key); + } else { + (void) new (newNode) Node(concreteNode->key, concreteNode->value); + } +} +template +inline typename QHash::Node * +QHash::createNode(uint ah, const Key &akey, const T &avalue, Node **anextNode) +{ + Node *node; + if (QTypeInfo::isDummy) { + node = reinterpret_cast(new (d->allocateNode(alignOfDummyNode())) DummyNode(akey)); + } else { + node = new (d->allocateNode(alignOfNode())) Node(akey, avalue); + } + node->h = ah; + node->next = *anextNode; + *anextNode = node; + ++d->size; + return node; +} +template +inline QHash &QHash::unite(const QHash &other) +{ + QHash copy(other); + const_iterator it = copy.constEnd(); + while (it != copy.constBegin()) { + --it; + insertMulti(it.key(), it.value()); + } + return *this; +} +template + void QHash::freeData(QHashData *x) +{ + x->free_helper(deleteNode2); +} +template +inline void QHash::clear() +{ + *this = QHash(); +} +template + void QHash::detach_helper() +{ + QHashData *x = d->detach_helper2(duplicateNode, deleteNode2, + QTypeInfo::isDummy ? sizeof(DummyNode) : sizeof(Node), + QTypeInfo::isDummy ? alignOfDummyNode() : alignOfNode()); + if (!d->ref.deref()) + freeData(d); + d = x; +} +template +inline QHash &QHash::operator=(const QHash &other) +{ + if (d != other.d) { + QHashData *o = other.d; + o->ref.ref(); + if (!d->ref.deref()) + freeData(d); + d = o; + if (!d->sharable) + detach_helper(); + } + return *this; +} +template +inline const T QHash::value(const Key &akey) const +{ + Node *node; + if (d->size == 0 || (node = *findNode(akey)) == e) { + return T(); + } else { + return node->value; + } +} +template +inline const T QHash::value(const Key &akey, const T &adefaultValue) const +{ + Node *node; + if (d->size == 0 || (node = *findNode(akey)) == e) { + return adefaultValue; + } else { + return node->value; + } +} +template + QList QHash::uniqueKeys() const +{ + QList res; + res.reserve(size()); + const_iterator i = begin(); + if (i != end()) { + for (;;) { + const Key &aKey = i.key(); + res.append(aKey); + do { + if (++i == end()) + goto break_out_of_outer_loop; + } while (aKey == i.key()); + } + } +break_out_of_outer_loop: + return res; +} +template + QList QHash::keys() const +{ + QList res; + res.reserve(size()); + const_iterator i = begin(); + while (i != end()) { + res.append(i.key()); + ++i; + } + return res; +} +template + QList QHash::keys(const T &avalue) const +{ + QList res; + const_iterator i = begin(); + while (i != end()) { + if (i.value() == avalue) + res.append(i.key()); + ++i; + } + return res; +} +template + const Key QHash::key(const T &avalue) const +{ + return key(avalue, Key()); +} +template + const Key QHash::key(const T &avalue, const Key &defaultValue) const +{ + const_iterator i = begin(); + while (i != end()) { + if (i.value() == avalue) + return i.key(); + ++i; + } + return defaultValue; +} +template + QList QHash::values() const +{ + QList res; + res.reserve(size()); + const_iterator i = begin(); + while (i != end()) { + res.append(i.value()); + ++i; + } + return res; +} +template + QList QHash::values(const Key &akey) const +{ + QList res; + Node *node = *findNode(akey); + if (node != e) { + do { + res.append(node->value); + } while ((node = node->next) != e && node->key == akey); + } + return res; +} +template + int QHash::count(const Key &akey) const +{ + int cnt = 0; + Node *node = *findNode(akey); + if (node != e) { + do { + ++cnt; + } while ((node = node->next) != e && node->key == akey); + } + return cnt; +} +template +inline const T QHash::operator[](const Key &akey) const +{ + return value(akey); +} +template +inline T &QHash::operator[](const Key &akey) +{ + detach(); + uint h; + Node **node = findNode(akey, &h); + if (*node == e) { + if (d->willGrow()) + node = findNode(akey, &h); + return createNode(h, akey, T(), node)->value; + } + return (*node)->value; +} +template +inline typename QHash::iterator QHash::insert(const Key &akey, + const T &avalue) +{ + detach(); + uint h; + Node **node = findNode(akey, &h); + if (*node == e) { + if (d->willGrow()) + node = findNode(akey, &h); + return iterator(createNode(h, akey, avalue, node)); + } + if (!QTypeInfo::isDummy) + (*node)->value = avalue; + return iterator(*node); +} +template +inline typename QHash::iterator QHash::insertMulti(const Key &akey, + const T &avalue) +{ + detach(); + d->willGrow(); + uint h; + Node **nextNode = findNode(akey, &h); + return iterator(createNode(h, akey, avalue, nextNode)); +} +template + int QHash::remove(const Key &akey) +{ + if (isEmpty()) + return 0; + detach(); + int oldSize = d->size; + Node **node = findNode(akey); + if (*node != e) { + bool deleteNext = true; + do { + Node *next = (*node)->next; + deleteNext = (next != e && next->key == (*node)->key); + deleteNode(*node); + *node = next; + --d->size; + } while (deleteNext); + d->hasShrunk(); + } + return oldSize - d->size; +} +template + T QHash::take(const Key &akey) +{ + if (isEmpty()) + return T(); + detach(); + Node **node = findNode(akey); + if (*node != e) { + T t = (*node)->value; + Node *next = (*node)->next; + deleteNode(*node); + *node = next; + --d->size; + d->hasShrunk(); + return t; + } + return T(); +} +template + typename QHash::iterator QHash::erase(iterator it) +{ + if (it == iterator(e)) + return it; + iterator ret = it; + ++ret; + Node *node = it; + Node **node_ptr = reinterpret_cast(&d->buckets[node->h % d->numBuckets]); + while (*node_ptr != node) + node_ptr = &(*node_ptr)->next; + *node_ptr = node->next; + deleteNode(node); + --d->size; + return ret; +} +template +inline void QHash::reserve(int asize) +{ + detach(); + d->rehash(-qMax(asize, 1)); +} +template +inline typename QHash::const_iterator QHash::find(const Key &akey) const +{ + return const_iterator(*findNode(akey)); +} +template +inline typename QHash::const_iterator QHash::constFind(const Key &akey) const +{ + return const_iterator(*findNode(akey)); +} +template +inline typename QHash::iterator QHash::find(const Key &akey) +{ + detach(); + return iterator(*findNode(akey)); +} +template +inline bool QHash::contains(const Key &akey) const +{ + return *findNode(akey) != e; +} +template + typename QHash::Node **QHash::findNode(const Key &akey, + uint *ahp) const +{ + Node **node; + uint h = qHash(akey); + if (d->numBuckets) { + node = reinterpret_cast(&d->buckets[h % d->numBuckets]); + qt_noop(); + while (*node != e && !(*node)->same_key(h, akey)) + node = &(*node)->next; + } else { + node = const_cast(reinterpret_cast(&e)); + } + if (ahp) + *ahp = h; + return node; +} +template + bool QHash::operator==(const QHash &other) const +{ + if (size() != other.size()) + return false; + if (d == other.d) + return true; + const_iterator it = begin(); + while (it != end()) { + const Key &akey = it.key(); + const_iterator it2 = other.find(akey); + do { + if (it2 == other.end() || !(it2.key() == akey)) + return false; + if (!QTypeInfo::isDummy && !(it.value() == it2.value())) + return false; + ++it; + ++it2; + } while (it != end() && it.key() == akey); + } + return true; +} +template +class QMultiHash : public QHash +{ +public: + QMultiHash() {} + QMultiHash(const QHash &other) : QHash(other) {} + inline void swap(QMultiHash &other) { QHash::swap(other); } + inline typename QHash::iterator replace(const Key &key, const T &value) + { return QHash::insert(key, value); } + inline typename QHash::iterator insert(const Key &key, const T &value) + { return QHash::insertMulti(key, value); } + inline QMultiHash &operator+=(const QMultiHash &other) + { this->unite(other); return *this; } + inline QMultiHash operator+(const QMultiHash &other) const + { QMultiHash result = *this; result += other; return result; } + using QHash::contains; + using QHash::remove; + using QHash::count; + using QHash::find; + using QHash::constFind; + bool contains(const Key &key, const T &value) const; + int remove(const Key &key, const T &value); + int count(const Key &key, const T &value) const; + typename QHash::iterator find(const Key &key, const T &value) { + typename QHash::iterator i(find(key)); + typename QHash::iterator end(this->end()); + while (i != end && i.key() == key) { + if (i.value() == value) + return i; + ++i; + } + return end; + } + typename QHash::const_iterator find(const Key &key, const T &value) const { + typename QHash::const_iterator i(constFind(key)); + typename QHash::const_iterator end(QHash::constEnd()); + while (i != end && i.key() == key) { + if (i.value() == value) + return i; + ++i; + } + return end; + } + typename QHash::const_iterator constFind(const Key &key, const T &value) const + { return find(key, value); } +private: + T &operator[](const Key &key); + const T operator[](const Key &key) const; +}; +template +inline bool QMultiHash::contains(const Key &key, const T &value) const +{ + return constFind(key, value) != QHash::constEnd(); +} +template +inline int QMultiHash::remove(const Key &key, const T &value) +{ + int n = 0; + typename QHash::iterator i(find(key)); + typename QHash::iterator end(QHash::end()); + while (i != end && i.key() == key) { + if (i.value() == value) { + i = this->erase(i); + ++n; + } else { + ++i; + } + } + return n; +} +template +inline int QMultiHash::count(const Key &key, const T &value) const +{ + int n = 0; + typename QHash::const_iterator i(constFind(key)); + typename QHash::const_iterator end(QHash::constEnd()); + while (i != end && i.key() == key) { + if (i.value() == value) + ++n; + ++i; + } + return n; +} +template class QHashIterator { typedef typename QHash::const_iterator const_iterator; typedef const_iterator Item; QHash c; const_iterator i, n; inline bool item_exists() const { return n != c.constEnd(); } public: inline QHashIterator(const QHash &container) : c(container), i(c.constBegin()), n(c.constEnd()) {} inline QHashIterator &operator=(const QHash &container) { c = container; i = c.constBegin(); n = c.constEnd(); return *this; } inline void toFront() { i = c.constBegin(); n = c.constEnd(); } inline void toBack() { i = c.constEnd(); n = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline Item next() { n = i++; return n; } inline Item peekNext() const { return i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline Item previous() { n = --i; return n; } inline Item peekPrevious() const { const_iterator p = i; return --p; } inline const T &value() const { qt_noop(); return *n; } inline const Key &key() const { qt_noop(); return n.key(); } inline bool findNext(const T &t) { while ((n = i) != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(n = --i) == t) return true; n = c.constEnd(); return false; } }; +template class QMutableHashIterator { typedef typename QHash::iterator iterator; typedef typename QHash::const_iterator const_iterator; typedef iterator Item; QHash *c; iterator i, n; inline bool item_exists() const { return const_iterator(n) != c->constEnd(); } public: inline QMutableHashIterator(QHash &container) : c(&container) { c->setSharable(false); i = c->begin(); n = c->end(); } inline ~QMutableHashIterator() { c->setSharable(true); } inline QMutableHashIterator &operator=(QHash &container) { c->setSharable(true); c = &container; c->setSharable(false); i = c->begin(); n = c->end(); return *this; } inline void toFront() { i = c->begin(); n = c->end(); } inline void toBack() { i = c->end(); n = c->end(); } inline bool hasNext() const { return const_iterator(i) != c->constEnd(); } inline Item next() { n = i++; return n; } inline Item peekNext() const { return i; } inline bool hasPrevious() const { return const_iterator(i) != c->constBegin(); } inline Item previous() { n = --i; return n; } inline Item peekPrevious() const { iterator p = i; return --p; } inline void remove() { if (const_iterator(n) != c->constEnd()) { i = c->erase(n); n = c->end(); } } inline void setValue(const T &t) { if (const_iterator(n) != c->constEnd()) *n = t; } inline T &value() { qt_noop(); return *n; } inline const T &value() const { qt_noop(); return *n; } inline const Key &key() const { qt_noop(); return n.key(); } inline bool findNext(const T &t) { while (const_iterator(n = i) != c->constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (const_iterator(i) != c->constBegin()) if (*(n = --i) == t) return true; n = c->end(); return false; } }; +typedef QtValidLicenseForCoreModule QtCoreModule; +template +class QCache +{ + struct Node { + inline Node() : keyPtr(0) {} + inline Node(T *data, int cost) + : keyPtr(0), t(data), c(cost), p(0), n(0) {} + const Key *keyPtr; T *t; int c; Node *p,*n; + }; + Node *f, *l; + QHash hash; + void *unused; + int mx, total; + inline void unlink(Node &n) { + if (n.p) n.p->n = n.n; + if (n.n) n.n->p = n.p; + if (l == &n) l = n.p; + if (f == &n) f = n.n; + total -= n.c; + T *obj = n.t; + hash.remove(*n.keyPtr); + delete obj; + } + inline T *relink(const Key &key) { + typename QHash::iterator i = hash.find(key); + if (typename QHash::const_iterator(i) == hash.constEnd()) + return 0; + Node &n = *i; + if (f != &n) { + if (n.p) n.p->n = n.n; + if (n.n) n.n->p = n.p; + if (l == &n) l = n.p; + n.p = 0; + n.n = f; + f->p = &n; + f = &n; + } + return n.t; + } + QCache(const QCache &); QCache &operator=(const QCache &); +public: + inline explicit QCache(int maxCost = 100); + inline ~QCache() { clear(); } + inline int maxCost() const { return mx; } + void setMaxCost(int m); + inline int totalCost() const { return total; } + inline int size() const { return hash.size(); } + inline int count() const { return hash.size(); } + inline bool isEmpty() const { return hash.isEmpty(); } + inline QList keys() const { return hash.keys(); } + void clear(); + bool insert(const Key &key, T *object, int cost = 1); + T *object(const Key &key) const; + inline bool contains(const Key &key) const { return hash.contains(key); } + T *operator[](const Key &key) const; + bool remove(const Key &key); + T *take(const Key &key); +private: + void trim(int m); +}; +template +inline QCache::QCache(int amaxCost) + : f(0), l(0), unused(0), mx(amaxCost), total(0) {} +template +inline void QCache::clear() +{ while (f) { delete f->t; f = f->n; } + hash.clear(); l = 0; total = 0; } +template +inline void QCache::setMaxCost(int m) +{ mx = m; trim(mx); } +template +inline T *QCache::object(const Key &key) const +{ return const_cast*>(this)->relink(key); } +template +inline T *QCache::operator[](const Key &key) const +{ return object(key); } +template +inline bool QCache::remove(const Key &key) +{ + typename QHash::iterator i = hash.find(key); + if (typename QHash::const_iterator(i) == hash.constEnd()) { + return false; + } else { + unlink(*i); + return true; + } +} +template +inline T *QCache::take(const Key &key) +{ + typename QHash::iterator i = hash.find(key); + if (i == hash.end()) + return 0; + Node &n = *i; + T *t = n.t; + n.t = 0; + unlink(n); + return t; +} +template +bool QCache::insert(const Key &akey, T *aobject, int acost) +{ + remove(akey); + if (acost > mx) { + delete aobject; + return false; + } + trim(mx - acost); + Node sn(aobject, acost); + typename QHash::iterator i = hash.insert(akey, sn); + total += acost; + Node *n = &i.value(); + n->keyPtr = &i.key(); + if (f) f->p = n; + n->n = f; + f = n; + if (!l) l = f; + return true; +} +template +void QCache::trim(int m) +{ + Node *n = l; + while (n && total > m) { + Node *u = n; + n = n->p; + unlink(*u); + } +} +typedef QtValidLicenseForCoreModule QtCoreModule; +template class QCache; +template class QHash; +template class QLinkedList; +template class QList; +template class QMap; +template class QMultiHash; +template class QMultiMap; +template struct QPair; +template class QQueue; +template class QSet; +template class QStack; +template class QVarLengthArray; +template class QVector; +typedef QtValidLicenseForCoreModule QtCoreModule; +struct QContiguousCacheData +{ + QBasicAtomicInt ref; + int alloc; + int count; + int start; + int offset; + uint sharable : 1; + uint reserved : 31; + static QContiguousCacheData *allocate(int size, int alignment); + static void free(QContiguousCacheData *data); +}; +template +struct QContiguousCacheTypedData: private QContiguousCacheData +{ + T array[1]; + static inline void free(QContiguousCacheTypedData *data) { QContiguousCacheData::free(data); } +}; +template +class QContiguousCache { + typedef QContiguousCacheTypedData Data; + union { QContiguousCacheData *d; QContiguousCacheTypedData *p; }; +public: + typedef T value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef qptrdiff difference_type; + typedef int size_type; + explicit QContiguousCache(int capacity = 0); + QContiguousCache(const QContiguousCache &v) : d(v.d) { d->ref.ref(); if (!d->sharable) detach_helper(); } + inline ~QContiguousCache() { if (!d) return; if (!d->ref.deref()) free(p); } + inline void detach() { if (d->ref != 1) detach_helper(); } + inline bool isDetached() const { return d->ref == 1; } + inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; } + QContiguousCache &operator=(const QContiguousCache &other); + inline void swap(QContiguousCache &other) { qSwap(d, other.d); } + bool operator==(const QContiguousCache &other) const; + inline bool operator!=(const QContiguousCache &other) const { return !(*this == other); } + inline int capacity() const {return d->alloc; } + inline int count() const { return d->count; } + inline int size() const { return d->count; } + inline bool isEmpty() const { return d->count == 0; } + inline bool isFull() const { return d->count == d->alloc; } + inline int available() const { return d->alloc - d->count; } + void clear(); + void setCapacity(int size); + const T &at(int pos) const; + T &operator[](int i); + const T &operator[](int i) const; + void append(const T &value); + void prepend(const T &value); + void insert(int pos, const T &value); + inline bool containsIndex(int pos) const { return pos >= d->offset && pos - d->offset < d->count; } + inline int firstIndex() const { return d->offset; } + inline int lastIndex() const { return d->offset + d->count - 1; } + inline const T &first() const { qt_noop(); return p->array[d->start]; } + inline const T &last() const { qt_noop(); return p->array[(d->start + d->count -1) % d->alloc]; } + inline T &first() { qt_noop(); detach(); return p->array[d->start]; } + inline T &last() { qt_noop(); detach(); return p->array[(d->start + d->count -1) % d->alloc]; } + void removeFirst(); + T takeFirst(); + void removeLast(); + T takeLast(); + inline bool areIndexesValid() const + { return d->offset >= 0 && d->offset < 2147483647 - d->count && (d->offset % d->alloc) == d->start; } + inline void normalizeIndexes() { d->offset = d->start; } +private: + void detach_helper(); + QContiguousCacheData *malloc(int aalloc); + void free(Data *x); + int sizeOfTypedData() { + return reinterpret_cast(&(reinterpret_cast(this))->array[1]) - reinterpret_cast(this); + } + int alignOfTypedData() const + { + return qMax(sizeof(void*), __alignof__(Data)); + } +}; +template +void QContiguousCache::detach_helper() +{ + union { QContiguousCacheData *d; QContiguousCacheTypedData *p; } x; + x.d = malloc(d->alloc); + x.d->ref = 1; + x.d->count = d->count; + x.d->start = d->start; + x.d->offset = d->offset; + x.d->alloc = d->alloc; + x.d->sharable = true; + x.d->reserved = 0; + T *dest = x.p->array + x.d->start; + T *src = p->array + d->start; + int oldcount = x.d->count; + while (oldcount--) { + if (QTypeInfo::isComplex) { + new (dest) T(*src); + } else { + *dest = *src; + } + dest++; + if (dest == x.p->array + x.d->alloc) + dest = x.p->array; + src++; + if (src == p->array + d->alloc) + src = p->array; + } + if (!d->ref.deref()) + free(p); + d = x.d; +} +template +void QContiguousCache::setCapacity(int asize) +{ + if (asize == d->alloc) + return; + detach(); + union { QContiguousCacheData *d; QContiguousCacheTypedData *p; } x; + x.d = malloc(asize); + x.d->alloc = asize; + x.d->count = qMin(d->count, asize); + x.d->offset = d->offset + d->count - x.d->count; + if(asize) + x.d->start = x.d->offset % x.d->alloc; + else + x.d->start = 0; + int oldcount = x.d->count; + if(oldcount) + { + T *dest = x.p->array + (x.d->start + x.d->count-1) % x.d->alloc; + T *src = p->array + (d->start + d->count-1) % d->alloc; + while (oldcount--) { + if (QTypeInfo::isComplex) { + new (dest) T(*src); + } else { + *dest = *src; + } + if (dest == x.p->array) + dest = x.p->array + x.d->alloc; + dest--; + if (src == p->array) + src = p->array + d->alloc; + src--; + } + } + free(p); + d = x.d; +} +template +void QContiguousCache::clear() +{ + if (d->ref == 1) { + if (QTypeInfo::isComplex) { + int oldcount = d->count; + T * i = p->array + d->start; + T * e = p->array + d->alloc; + while (oldcount--) { + i->~T(); + i++; + if (i == e) + i = p->array; + } + } + d->count = d->start = d->offset = 0; + } else { + union { QContiguousCacheData *d; QContiguousCacheTypedData *p; } x; + x.d = malloc(d->alloc); + x.d->ref = 1; + x.d->alloc = d->alloc; + x.d->count = x.d->start = x.d->offset = 0; + x.d->sharable = true; + if (!d->ref.deref()) free(p); + d = x.d; + } +} +template +inline QContiguousCacheData *QContiguousCache::malloc(int aalloc) +{ + return QContiguousCacheData::allocate(sizeOfTypedData() + (aalloc - 1) * sizeof(T), alignOfTypedData()); +} +template +QContiguousCache::QContiguousCache(int cap) +{ + d = malloc(cap); + d->ref = 1; + d->alloc = cap; + d->count = d->start = d->offset = 0; + d->sharable = true; +} +template +QContiguousCache &QContiguousCache::operator=(const QContiguousCache &other) +{ + other.d->ref.ref(); + if (!d->ref.deref()) + free(d); + d = other.d; + if (!d->sharable) + detach_helper(); + return *this; +} +template +bool QContiguousCache::operator==(const QContiguousCache &other) const +{ + if (other.d == d) + return true; + if (other.d->start != d->start + || other.d->count != d->count + || other.d->offset != d->offset + || other.d->alloc != d->alloc) + return false; + for (int i = firstIndex(); i <= lastIndex(); ++i) + if (!(at(i) == other.at(i))) + return false; + return true; +} +template +void QContiguousCache::free(Data *x) +{ + if (QTypeInfo::isComplex) { + int oldcount = d->count; + T * i = p->array + d->start; + T * e = p->array + d->alloc; + while (oldcount--) { + i->~T(); + i++; + if (i == e) + i = p->array; + } + } + x->free(x); +} +template +void QContiguousCache::append(const T &value) +{ + detach(); + if (QTypeInfo::isComplex) { + if (d->count == d->alloc) + (p->array + (d->start+d->count) % d->alloc)->~T(); + new (p->array + (d->start+d->count) % d->alloc) T(value); + } else { + p->array[(d->start+d->count) % d->alloc] = value; + } + if (d->count == d->alloc) { + d->start++; + d->start %= d->alloc; + d->offset++; + } else { + d->count++; + } +} +template +void QContiguousCache::prepend(const T &value) +{ + detach(); + if (d->start) + d->start--; + else + d->start = d->alloc-1; + d->offset--; + if (d->count != d->alloc) + d->count++; + else + if (d->count == d->alloc) + (p->array + d->start)->~T(); + if (QTypeInfo::isComplex) + new (p->array + d->start) T(value); + else + p->array[d->start] = value; +} +template +void QContiguousCache::insert(int pos, const T &value) +{ + qt_noop(); + detach(); + if (containsIndex(pos)) { + if (QTypeInfo::isComplex) { + (p->array + pos % d->alloc)->~T(); + new (p->array + pos % d->alloc) T(value); + } else { + p->array[pos % d->alloc] = value; + } + } else if (pos == d->offset-1) + prepend(value); + else if (pos == d->offset+d->count) + append(value); + else { + clear(); + d->offset = pos; + d->start = pos % d->alloc; + d->count = 1; + if (QTypeInfo::isComplex) + new (p->array + d->start) T(value); + else + p->array[d->start] = value; + } +} +template +inline const T &QContiguousCache::at(int pos) const +{ qt_noop(); return p->array[pos % d->alloc]; } +template +inline const T &QContiguousCache::operator[](int pos) const +{ qt_noop(); return p->array[pos % d->alloc]; } +template +inline T &QContiguousCache::operator[](int pos) +{ + detach(); + if (!containsIndex(pos)) + insert(pos, T()); + return p->array[pos % d->alloc]; +} +template +inline void QContiguousCache::removeFirst() +{ + qt_noop(); + detach(); + d->count--; + if (QTypeInfo::isComplex) + (p->array + d->start)->~T(); + d->start = (d->start + 1) % d->alloc; + d->offset++; +} +template +inline void QContiguousCache::removeLast() +{ + qt_noop(); + detach(); + d->count--; + if (QTypeInfo::isComplex) + (p->array + (d->start + d->count) % d->alloc)->~T(); +} +template +inline T QContiguousCache::takeFirst() +{ T t = first(); removeFirst(); return t; } +template +inline T QContiguousCache::takeLast() +{ T t = last(); removeLast(); return t; } +typedef QtValidLicenseForCoreModule QtCoreModule; +class QCryptographicHashPrivate; +class QCryptographicHash +{ +public: + enum Algorithm { + Md4, + Md5, + Sha1 + }; + QCryptographicHash(Algorithm method); + ~QCryptographicHash(); + void reset(); + void addData(const char *data, int length); + void addData(const QByteArray &data); + QByteArray result() const; + static QByteArray hash(const QByteArray &data, Algorithm method); +private: + QCryptographicHash(const QCryptographicHash &); QCryptographicHash &operator=(const QCryptographicHash &); + QCryptographicHashPrivate *d; +}; +typedef QtValidLicenseForCoreModule QtCoreModule; +template class QSharedDataPointer; +class QSharedData +{ +public: + mutable QAtomicInt ref; + inline QSharedData() : ref(0) { } + inline QSharedData(const QSharedData &) : ref(0) { } +private: + QSharedData &operator=(const QSharedData &); +}; +template class QSharedDataPointer +{ +public: + typedef T Type; + typedef T *pointer; + inline void detach() { if (d && d->ref != 1) detach_helper(); } + inline T &operator*() { detach(); return *d; } + inline const T &operator*() const { return *d; } + inline T *operator->() { detach(); return d; } + inline const T *operator->() const { return d; } + inline operator T *() { detach(); return d; } + inline operator const T *() const { return d; } + inline T *data() { detach(); return d; } + inline const T *data() const { return d; } + inline const T *constData() const { return d; } + inline bool operator==(const QSharedDataPointer &other) const { return d == other.d; } + inline bool operator!=(const QSharedDataPointer &other) const { return d != other.d; } + inline QSharedDataPointer() { d = 0; } + inline ~QSharedDataPointer() { if (d && !d->ref.deref()) delete d; } + explicit QSharedDataPointer(T *data); + inline QSharedDataPointer(const QSharedDataPointer &o) : d(o.d) { if (d) d->ref.ref(); } + inline QSharedDataPointer & operator=(const QSharedDataPointer &o) { + if (o.d != d) { + if (o.d) + o.d->ref.ref(); + T *old = d; + d = o.d; + if (old && !old->ref.deref()) + delete old; + } + return *this; + } + inline QSharedDataPointer &operator=(T *o) { + if (o != d) { + if (o) + o->ref.ref(); + T *old = d; + d = o; + if (old && !old->ref.deref()) + delete old; + } + return *this; + } + inline bool operator!() const { return !d; } + inline void swap(QSharedDataPointer &other) + { qSwap(d, other.d); } +protected: + T *clone(); +private: + void detach_helper(); + T *d; +}; +template class QExplicitlySharedDataPointer +{ +public: + typedef T Type; + typedef T *pointer; + inline T &operator*() const { return *d; } + inline T *operator->() { return d; } + inline T *operator->() const { return d; } + inline T *data() const { return d; } + inline const T *constData() const { return d; } + inline void detach() { if (d && d->ref != 1) detach_helper(); } + inline void reset() + { + if(d && !d->ref.deref()) + delete d; + d = 0; + } + inline operator bool () const { return d != 0; } + inline bool operator==(const QExplicitlySharedDataPointer &other) const { return d == other.d; } + inline bool operator!=(const QExplicitlySharedDataPointer &other) const { return d != other.d; } + inline bool operator==(const T *ptr) const { return d == ptr; } + inline bool operator!=(const T *ptr) const { return d != ptr; } + inline QExplicitlySharedDataPointer() { d = 0; } + inline ~QExplicitlySharedDataPointer() { if (d && !d->ref.deref()) delete d; } + explicit QExplicitlySharedDataPointer(T *data); + inline QExplicitlySharedDataPointer(const QExplicitlySharedDataPointer &o) : d(o.d) { if (d) d->ref.ref(); } + template + inline QExplicitlySharedDataPointer(const QExplicitlySharedDataPointer &o) : d(static_cast(o.data())) + { + if(d) + d->ref.ref(); + } + inline QExplicitlySharedDataPointer & operator=(const QExplicitlySharedDataPointer &o) { + if (o.d != d) { + if (o.d) + o.d->ref.ref(); + T *old = d; + d = o.d; + if (old && !old->ref.deref()) + delete old; + } + return *this; + } + inline QExplicitlySharedDataPointer &operator=(T *o) { + if (o != d) { + if (o) + o->ref.ref(); + T *old = d; + d = o; + if (old && !old->ref.deref()) + delete old; + } + return *this; + } + inline bool operator!() const { return !d; } + inline void swap(QExplicitlySharedDataPointer &other) + { qSwap(d, other.d); } +protected: + T *clone(); +private: + void detach_helper(); + T *d; +}; +template +inline QSharedDataPointer::QSharedDataPointer(T *adata) : d(adata) +{ if (d) d->ref.ref(); } +template +inline T *QSharedDataPointer::clone() +{ + return new T(*d); +} +template + void QSharedDataPointer::detach_helper() +{ + T *x = clone(); + x->ref.ref(); + if (!d->ref.deref()) + delete d; + d = x; +} +template +inline T *QExplicitlySharedDataPointer::clone() +{ + return new T(*d); +} +template + void QExplicitlySharedDataPointer::detach_helper() +{ + T *x = clone(); + x->ref.ref(); + if (!d->ref.deref()) + delete d; + d = x; +} +template +inline QExplicitlySharedDataPointer::QExplicitlySharedDataPointer(T *adata) : d(adata) +{ if (d) d->ref.ref(); } +template +inline void qSwap(QSharedDataPointer &p1, QSharedDataPointer &p2) +{ p1.swap(p2); } +template +inline void qSwap(QExplicitlySharedDataPointer &p1, QExplicitlySharedDataPointer &p2) +{ p1.swap(p2); } +namespace std { + template + inline void swap(::QSharedDataPointer &p1, ::QSharedDataPointer &p2) + { p1.swap(p2); } + template + inline void swap(::QExplicitlySharedDataPointer &p1, ::QExplicitlySharedDataPointer &p2) + { p1.swap(p2); } +} +typedef QtValidLicenseForCoreModule QtCoreModule; +template class QWeakPointer; +template class QSharedPointer; +template +QSharedPointer qSharedPointerCast(const QSharedPointer &ptr); +template +QSharedPointer qSharedPointerDynamicCast(const QSharedPointer &ptr); +template +QSharedPointer qSharedPointerConstCast(const QSharedPointer &ptr); +template +QSharedPointer qSharedPointerObjectCast(const QSharedPointer &ptr); +namespace QtSharedPointer { + template class InternalRefCount; + template class ExternalRefCount; + template QSharedPointer copyAndSetPointer(X * ptr, const QSharedPointer &src); + void internalSafetyCheckAdd2(const void *, const volatile void *); + void internalSafetyCheckRemove2(const void *); + template + inline void executeDeleter(T *t, RetVal (Klass:: *memberDeleter)()) + { (t->*memberDeleter)(); } + template + inline void executeDeleter(T *t, Deleter d) + { d(t); } + template inline void normalDeleter(T *t) { delete t; } + template struct RemovePointer; + template struct RemovePointer { typedef T Type; }; + template struct RemovePointer > { typedef T Type; }; + template struct RemovePointer > { typedef T Type; }; + template + class Basic + { + typedef T *Basic:: *RestrictedBool; + public: + typedef T Type; + typedef T element_type; + typedef T value_type; + typedef value_type *pointer; + typedef const value_type *const_pointer; + typedef value_type &reference; + typedef const value_type &const_reference; + typedef qptrdiff difference_type; + inline T *data() const { return value; } + inline bool isNull() const { return !data(); } + inline operator RestrictedBool() const { return isNull() ? 0 : &Basic::value; } + inline bool operator !() const { return isNull(); } + inline T &operator*() const { return *data(); } + inline T *operator->() const { return data(); } + protected: + inline Basic(T *ptr = 0) : value(ptr) { } + inline Basic(Qt::Initialization) { } + inline void internalConstruct(T *ptr) + { + value = ptr; + } + template friend class ::QWeakPointer; + Type *value; + }; + struct ExternalRefCountData + { + QBasicAtomicInt weakref; + QBasicAtomicInt strongref; + inline ExternalRefCountData() + { + strongref = 1; + weakref = 1; + } + inline ExternalRefCountData(Qt::Initialization) { } + virtual inline ~ExternalRefCountData() { qt_noop(); qt_noop(); } + virtual inline bool destroy() { return false; } + static ExternalRefCountData *getAndRef(const QObject *); + void setQObjectShared(const QObject *, bool enable); + inline void setQObjectShared(...) { } + }; + struct ExternalRefCountWithDestroyFn: public ExternalRefCountData + { + typedef void (*DestroyerFn)(ExternalRefCountData *); + DestroyerFn destroyer; + inline ExternalRefCountWithDestroyFn(DestroyerFn d) + : destroyer(d) + { } + inline bool destroy() { destroyer(this); return true; } + inline void operator delete(void *ptr) { ::operator delete(ptr); } + inline void operator delete(void *, void *) { } + }; + template + struct ExternalRefCountWithCustomDeleter: public ExternalRefCountWithDestroyFn + { + typedef ExternalRefCountWithCustomDeleter Self; + typedef ExternalRefCountWithDestroyFn BaseClass; + struct CustomDeleter + { + Deleter deleter; + T *ptr; + inline CustomDeleter(T *p, Deleter d) : deleter(d), ptr(p) {} + }; + CustomDeleter extra; + static inline void deleter(ExternalRefCountData *self) + { + Self *realself = static_cast(self); + executeDeleter(realself->extra.ptr, realself->extra.deleter); + realself->extra.~CustomDeleter(); + } + static void safetyCheckDeleter(ExternalRefCountData *self) + { + internalSafetyCheckRemove2(self); + deleter(self); + } + static inline Self *create(T *ptr, Deleter userDeleter) + { + DestroyerFn destroy = &deleter; + Self *d = static_cast(::operator new(sizeof(Self))); + new (&d->extra) CustomDeleter(ptr, userDeleter); + new (d) BaseClass(destroy); + return d; + } + private: + ExternalRefCountWithCustomDeleter(); + ~ExternalRefCountWithCustomDeleter(); + }; + template + struct ExternalRefCountWithContiguousData: public ExternalRefCountWithDestroyFn + { + typedef ExternalRefCountWithDestroyFn Parent; + T data; + static void deleter(ExternalRefCountData *self) + { + ExternalRefCountWithContiguousData *that = + static_cast(self); + that->data.~T(); + } + static void safetyCheckDeleter(ExternalRefCountData *self) + { + internalSafetyCheckRemove2(self); + deleter(self); + } + static inline ExternalRefCountData *create(T **ptr) + { + DestroyerFn destroy = &deleter; + ExternalRefCountWithContiguousData *d = + static_cast(::operator new(sizeof(ExternalRefCountWithContiguousData))); + new (d) Parent(destroy); + *ptr = &d->data; + return d; + } + private: + ExternalRefCountWithContiguousData(); + ~ExternalRefCountWithContiguousData(); + }; + template + class ExternalRefCount: public Basic + { + protected: + typedef ExternalRefCountData Data; + inline void deref() + { deref(d, this->value); } + static inline void deref(Data *d, T *value) + { + if (!d) return; + if (!d->strongref.deref()) { + if (!d->destroy()) + delete value; + } + if (!d->weakref.deref()) + delete d; + } + inline void internalConstruct(T *ptr) + { + if (ptr) + d = new Data; + else + d = 0; + internalFinishConstruction(ptr); + } + template + inline void internalConstruct(T *ptr, Deleter deleter) + { + if (ptr) + d = ExternalRefCountWithCustomDeleter::create(ptr, deleter); + else + d = 0; + internalFinishConstruction(ptr); + } + inline void internalCreate() + { + T *ptr; + d = ExternalRefCountWithContiguousData::create(&ptr); + Basic::internalConstruct(ptr); + } + inline void internalFinishConstruction(T *ptr) + { + Basic::internalConstruct(ptr); + if (ptr) d->setQObjectShared(ptr, true); + } + inline ExternalRefCount() : d(0) { } + inline ExternalRefCount(Qt::Initialization i) : Basic(i) { } + inline ExternalRefCount(T *ptr) : Basic(Qt::Uninitialized) + { internalConstruct(ptr); } + template + inline ExternalRefCount(T *ptr, Deleter deleter) : Basic(Qt::Uninitialized) + { internalConstruct(ptr, deleter); } + inline ExternalRefCount(const ExternalRefCount &other) : Basic(other), d(other.d) + { if (d) ref(); } + template + inline ExternalRefCount(const ExternalRefCount &other) : Basic(other.value), d(other.d) + { if (d) ref(); } + inline ~ExternalRefCount() { deref(); } + template + inline void internalCopy(const ExternalRefCount &other) + { + Data *o = other.d; + T *actual = other.value; + if (o) + other.ref(); + qSwap(d, o); + qSwap(this->value, actual); + deref(o, actual); + } + inline void internalSwap(ExternalRefCount &other) + { + qSwap(d, other.d); + qSwap(this->value, other.value); + } + template friend class ExternalRefCount; + template friend class ::QWeakPointer; + template friend QSharedPointer copyAndSetPointer(X * ptr, const QSharedPointer &src); + inline void ref() const { d->weakref.ref(); d->strongref.ref(); } + inline void internalSet(Data *o, T *actual) + { + if (o) { + register int tmp = o->strongref; + while (tmp > 0) { + if (o->strongref.testAndSetRelaxed(tmp, tmp + 1)) + break; + tmp = o->strongref; + } + if (tmp > 0) + o->weakref.ref(); + else + o = 0; + } + qSwap(d, o); + qSwap(this->value, actual); + if (!d || d->strongref == 0) + this->value = 0; + deref(o, actual); + } + Data *d; + private: + template ExternalRefCount(const InternalRefCount &); + }; +} +template +class QSharedPointer: public QtSharedPointer::ExternalRefCount +{ + typedef typename QtSharedPointer::ExternalRefCount BaseClass; +public: + inline QSharedPointer() { } + inline explicit QSharedPointer(T *ptr) : BaseClass(ptr) + { } + template + inline QSharedPointer(T *ptr, Deleter d) : BaseClass(ptr, d) + { } + inline QSharedPointer(const QSharedPointer &other) : BaseClass(other) { } + inline QSharedPointer &operator=(const QSharedPointer &other) + { + BaseClass::internalCopy(other); + return *this; + } + template + inline QSharedPointer(const QSharedPointer &other) : BaseClass(other) + { } + template + inline QSharedPointer &operator=(const QSharedPointer &other) + { + qt_noop(); + BaseClass::internalCopy(other); + return *this; + } + template + inline QSharedPointer(const QWeakPointer &other) : BaseClass(Qt::Uninitialized) + { this->d = 0; *this = other; } + template + inline QSharedPointer &operator=(const QWeakPointer &other) + { BaseClass::internalSet(other.d, other.value); return *this; } + inline void swap(QSharedPointer &other) + { QSharedPointer::internalSwap(other); } + template + QSharedPointer staticCast() const + { + return qSharedPointerCast(*this); + } + template + QSharedPointer dynamicCast() const + { + return qSharedPointerDynamicCast(*this); + } + template + QSharedPointer constCast() const + { + return qSharedPointerConstCast(*this); + } + template + QSharedPointer objectCast() const + { + return qSharedPointerObjectCast(*this); + } + inline void clear() { *this = QSharedPointer(); } + QWeakPointer toWeakRef() const; +protected: + inline explicit QSharedPointer(Qt::Initialization i) : BaseClass(i) {} +public: + static inline QSharedPointer create() + { + QSharedPointer result(Qt::Uninitialized); + result.internalCreate(); + new (result.data()) T(); + result.internalFinishConstruction(result.data()); + return result; + } +}; +template +class QWeakPointer +{ + typedef T *QWeakPointer:: *RestrictedBool; + typedef QtSharedPointer::ExternalRefCountData Data; +public: + typedef T element_type; + typedef T value_type; + typedef value_type *pointer; + typedef const value_type *const_pointer; + typedef value_type &reference; + typedef const value_type &const_reference; + typedef qptrdiff difference_type; + inline bool isNull() const { return d == 0 || d->strongref == 0 || value == 0; } + inline operator RestrictedBool() const { return isNull() ? 0 : &QWeakPointer::value; } + inline bool operator !() const { return isNull(); } + inline T *data() const { return d == 0 || d->strongref == 0 ? 0 : value; } + inline QWeakPointer() : d(0), value(0) { } + inline ~QWeakPointer() { if (d && !d->weakref.deref()) delete d; } + template + inline QWeakPointer(X *ptr) : d(ptr ? Data::getAndRef(ptr) : 0), value(ptr) + { } + template + inline QWeakPointer &operator=(X *ptr) + { return *this = QWeakPointer(ptr); } + inline QWeakPointer(const QWeakPointer &o) : d(o.d), value(o.value) + { if (d) d->weakref.ref(); } + inline QWeakPointer &operator=(const QWeakPointer &o) + { + internalSet(o.d, o.value); + return *this; + } + inline QWeakPointer(const QSharedPointer &o) : d(o.d), value(o.data()) + { if (d) d->weakref.ref();} + inline QWeakPointer &operator=(const QSharedPointer &o) + { + internalSet(o.d, o.value); + return *this; + } + template + inline QWeakPointer(const QWeakPointer &o) : d(0), value(0) + { *this = o; } + template + inline QWeakPointer &operator=(const QWeakPointer &o) + { + *this = o.toStrongRef(); + return *this; + } + template + inline bool operator==(const QWeakPointer &o) const + { return d == o.d && value == static_cast(o.value); } + template + inline bool operator!=(const QWeakPointer &o) const + { return !(*this == o); } + template + inline QWeakPointer(const QSharedPointer &o) : d(0), value(0) + { *this = o; } + template + inline QWeakPointer &operator=(const QSharedPointer &o) + { + qt_noop(); + internalSet(o.d, o.data()); + return *this; + } + template + inline bool operator==(const QSharedPointer &o) const + { return d == o.d; } + template + inline bool operator!=(const QSharedPointer &o) const + { return !(*this == o); } + inline void clear() { *this = QWeakPointer(); } + inline QSharedPointer toStrongRef() const { return QSharedPointer(*this); } +private: + template friend class QSharedPointer; + inline void internalSet(Data *o, T *actual) + { + if (d == o) return; + if (o) + o->weakref.ref(); + if (d && !d->weakref.deref()) + delete d; + d = o; + value = actual; + } + Data *d; + T *value; +}; +template +bool operator==(const QSharedPointer &ptr1, const QSharedPointer &ptr2) +{ + return ptr1.data() == ptr2.data(); +} +template +bool operator!=(const QSharedPointer &ptr1, const QSharedPointer &ptr2) +{ + return ptr1.data() != ptr2.data(); +} +template +bool operator==(const QSharedPointer &ptr1, const X *ptr2) +{ + return ptr1.data() == ptr2; +} +template +bool operator==(const T *ptr1, const QSharedPointer &ptr2) +{ + return ptr1 == ptr2.data(); +} +template +bool operator!=(const QSharedPointer &ptr1, const X *ptr2) +{ + return !(ptr1 == ptr2); +} +template +bool operator!=(const T *ptr1, const QSharedPointer &ptr2) +{ + return !(ptr2 == ptr1); +} +template +bool operator==(const QSharedPointer &ptr1, const QWeakPointer &ptr2) +{ + return ptr2 == ptr1; +} +template +bool operator!=(const QSharedPointer &ptr1, const QWeakPointer &ptr2) +{ + return ptr2 != ptr1; +} +template +inline typename QSharedPointer::difference_type operator-(const QSharedPointer &ptr1, const QSharedPointer &ptr2) +{ + return ptr1.data() - ptr2.data(); +} +template +inline typename QSharedPointer::difference_type operator-(const QSharedPointer &ptr1, X *ptr2) +{ + return ptr1.data() - ptr2; +} +template +inline typename QSharedPointer::difference_type operator-(T *ptr1, const QSharedPointer &ptr2) +{ + return ptr1 - ptr2.data(); +} +template +inline bool operator<(const QSharedPointer &ptr1, const QSharedPointer &ptr2) +{ + return ptr1.data() < ptr2.data(); +} +template +inline bool operator<(const QSharedPointer &ptr1, X *ptr2) +{ + return ptr1.data() < ptr2; +} +template +inline bool operator<(T *ptr1, const QSharedPointer &ptr2) +{ + return ptr1 < ptr2.data(); +} +template inline uint qHash(const T *key); +template +inline uint qHash(const QSharedPointer &ptr) +{ + return ::qHash(ptr.data()); +} +template +inline QWeakPointer QSharedPointer::toWeakRef() const +{ + return QWeakPointer(*this); +} +template +inline void qSwap(QSharedPointer &p1, QSharedPointer &p2) +{ + p1.swap(p2); +} +namespace std { + template + inline void swap(::QSharedPointer &p1, ::QSharedPointer &p2) + { p1.swap(p2); } +} +namespace QtSharedPointer { + template + inline QSharedPointer copyAndSetPointer(X *ptr, const QSharedPointer &src) + { + QSharedPointer result; + result.internalSet(src.d, ptr); + return result; + } +} +template +inline QSharedPointer qSharedPointerCast(const QSharedPointer &src) +{ + register X *ptr = static_cast(src.data()); + return QtSharedPointer::copyAndSetPointer(ptr, src); +} +template +inline QSharedPointer qSharedPointerCast(const QWeakPointer &src) +{ + return qSharedPointerCast(src.toStrongRef()); +} +template +inline QSharedPointer qSharedPointerDynamicCast(const QSharedPointer &src) +{ + register X *ptr = dynamic_cast(src.data()); + return QtSharedPointer::copyAndSetPointer(ptr, src); +} +template +inline QSharedPointer qSharedPointerDynamicCast(const QWeakPointer &src) +{ + return qSharedPointerDynamicCast(src.toStrongRef()); +} +template +inline QSharedPointer qSharedPointerConstCast(const QSharedPointer &src) +{ + register X *ptr = const_cast(src.data()); + return QtSharedPointer::copyAndSetPointer(ptr, src); +} +template +inline QSharedPointer qSharedPointerConstCast(const QWeakPointer &src) +{ + return qSharedPointerConstCast(src.toStrongRef()); +} +template +inline +QWeakPointer qWeakPointerCast(const QSharedPointer &src) +{ + return qSharedPointerCast(src).toWeakRef(); +} +template +inline QSharedPointer qSharedPointerObjectCast(const QSharedPointer &src) +{ + register X *ptr = qobject_cast(src.data()); + return QtSharedPointer::copyAndSetPointer(ptr, src); +} +template +inline QSharedPointer qSharedPointerObjectCast(const QWeakPointer &src) +{ + return qSharedPointerObjectCast(src.toStrongRef()); +} +template +inline QSharedPointer::Type> +qobject_cast(const QSharedPointer &src) +{ + return qSharedPointerObjectCast::Type, T>(src); +} +template +inline QSharedPointer::Type> +qobject_cast(const QWeakPointer &src) +{ + return qSharedPointerObjectCast::Type, T>(src); +} +template class QTypeInfo > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QWeakPointer)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QWeakPointer"; } }; +template class QTypeInfo > { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QSharedPointer)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QSharedPointer"; } }; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QDate +{ +public: + enum MonthNameType { + DateFormat = 0, + StandaloneFormat + }; +public: + QDate() { jd = 0; } + QDate(int y, int m, int d); + bool isNull() const { return jd == 0; } + bool isValid() const; + int year() const; + int month() const; + int day() const; + int dayOfWeek() const; + int dayOfYear() const; + int daysInMonth() const; + int daysInYear() const; + int weekNumber(int *yearNum = 0) const; + static QString shortMonthName(int month); + static QString shortMonthName(int month, MonthNameType type); + static QString shortDayName(int weekday); + static QString shortDayName(int weekday, MonthNameType type); + static QString longMonthName(int month); + static QString longMonthName(int month, MonthNameType type); + static QString longDayName(int weekday); + static QString longDayName(int weekday, MonthNameType type); + QString toString(Qt::DateFormat f = Qt::TextDate) const; + QString toString(const QString &format) const; + bool setYMD(int y, int m, int d); + bool setDate(int year, int month, int day); + void getDate(int *year, int *month, int *day); + QDate addDays(int days) const; + QDate addMonths(int months) const; + QDate addYears(int years) const; + int daysTo(const QDate &) const; + bool operator==(const QDate &other) const { return jd == other.jd; } + bool operator!=(const QDate &other) const { return jd != other.jd; } + bool operator<(const QDate &other) const { return jd < other.jd; } + bool operator<=(const QDate &other) const { return jd <= other.jd; } + bool operator>(const QDate &other) const { return jd > other.jd; } + bool operator>=(const QDate &other) const { return jd >= other.jd; } + static QDate currentDate(); + static QDate fromString(const QString &s, Qt::DateFormat f = Qt::TextDate); + static QDate fromString(const QString &s, const QString &format); + static bool isValid(int y, int m, int d); + static bool isLeapYear(int year); + static uint gregorianToJulian(int y, int m, int d); + static void julianToGregorian(uint jd, int &y, int &m, int &d); + static inline QDate fromJulianDay(int jd) { QDate d; d.jd = jd; return d; } + inline int toJulianDay() const { return jd; } +private: + uint jd; + friend class QDateTime; + friend class QDateTimePrivate; + friend QDataStream &operator<<(QDataStream &, const QDate &); + friend QDataStream &operator>>(QDataStream &, QDate &); +}; +template<> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QDate)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QDate"; } }; +class QTime +{ +public: + QTime(): mds(NullTime) + {} + QTime(int h, int m, int s = 0, int ms = 0); + bool isNull() const { return mds == NullTime; } + bool isValid() const; + int hour() const; + int minute() const; + int second() const; + int msec() const; + QString toString(Qt::DateFormat f = Qt::TextDate) const; + QString toString(const QString &format) const; + bool setHMS(int h, int m, int s, int ms = 0); + QTime addSecs(int secs) const; + int secsTo(const QTime &) const; + QTime addMSecs(int ms) const; + int msecsTo(const QTime &) const; + bool operator==(const QTime &other) const { return mds == other.mds; } + bool operator!=(const QTime &other) const { return mds != other.mds; } + bool operator<(const QTime &other) const { return mds < other.mds; } + bool operator<=(const QTime &other) const { return mds <= other.mds; } + bool operator>(const QTime &other) const { return mds > other.mds; } + bool operator>=(const QTime &other) const { return mds >= other.mds; } + static QTime currentTime(); + static QTime fromString(const QString &s, Qt::DateFormat f = Qt::TextDate); + static QTime fromString(const QString &s, const QString &format); + static bool isValid(int h, int m, int s, int ms = 0); + void start(); + int restart(); + int elapsed() const; +private: + enum TimeFlag { NullTime = -1 }; + inline int ds() const { return mds == -1 ? 0 : mds; } + int mds; + friend class QDateTime; + friend class QDateTimePrivate; + friend QDataStream &operator<<(QDataStream &, const QTime &); + friend QDataStream &operator>>(QDataStream &, QTime &); +}; +template<> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QTime)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QTime"; } }; +class QDateTimePrivate; +class QDateTime +{ +public: + QDateTime(); + explicit QDateTime(const QDate &); + QDateTime(const QDate &, const QTime &, Qt::TimeSpec spec = Qt::LocalTime); + QDateTime(const QDateTime &other); + ~QDateTime(); + QDateTime &operator=(const QDateTime &other); + bool isNull() const; + bool isValid() const; + QDate date() const; + QTime time() const; + Qt::TimeSpec timeSpec() const; + qint64 toMSecsSinceEpoch() const; + uint toTime_t() const; + void setDate(const QDate &date); + void setTime(const QTime &time); + void setTimeSpec(Qt::TimeSpec spec); + void setMSecsSinceEpoch(qint64 msecs); + void setTime_t(uint secsSince1Jan1970UTC); + QString toString(Qt::DateFormat f = Qt::TextDate) const; + QString toString(const QString &format) const; + QDateTime addDays(int days) const; + QDateTime addMonths(int months) const; + QDateTime addYears(int years) const; + QDateTime addSecs(int secs) const; + QDateTime addMSecs(qint64 msecs) const; + QDateTime toTimeSpec(Qt::TimeSpec spec) const; + inline QDateTime toLocalTime() const { return toTimeSpec(Qt::LocalTime); } + inline QDateTime toUTC() const { return toTimeSpec(Qt::UTC); } + int daysTo(const QDateTime &) const; + int secsTo(const QDateTime &) const; + qint64 msecsTo(const QDateTime &) const; + bool operator==(const QDateTime &other) const; + inline bool operator!=(const QDateTime &other) const { return !(*this == other); } + bool operator<(const QDateTime &other) const; + inline bool operator<=(const QDateTime &other) const { return !(other < *this); } + inline bool operator>(const QDateTime &other) const { return other < *this; } + inline bool operator>=(const QDateTime &other) const { return !(*this < other); } + void setUtcOffset(int seconds); + int utcOffset() const; + static QDateTime currentDateTime(); + static QDateTime currentDateTimeUtc(); + static QDateTime fromString(const QString &s, Qt::DateFormat f = Qt::TextDate); + static QDateTime fromString(const QString &s, const QString &format); + static QDateTime fromTime_t(uint secsSince1Jan1970UTC); + static QDateTime fromMSecsSinceEpoch(qint64 msecs); + static qint64 currentMSecsSinceEpoch(); +private: + friend class QDateTimePrivate; + void detach(); + QExplicitlySharedDataPointer d; + friend QDataStream &operator<<(QDataStream &, const QDateTime &); + friend QDataStream &operator>>(QDataStream &, QDateTime &); +}; +template<> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QDateTime)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QDateTime"; } }; + QDataStream &operator<<(QDataStream &, const QDate &); + QDataStream &operator>>(QDataStream &, QDate &); + QDataStream &operator<<(QDataStream &, const QTime &); + QDataStream &operator>>(QDataStream &, QTime &); + QDataStream &operator<<(QDataStream &, const QDateTime &); + QDataStream &operator>>(QDataStream &, QDateTime &); + QDebug operator<<(QDebug, const QDate &); + QDebug operator<<(QDebug, const QTime &); + QDebug operator<<(QDebug, const QDateTime &); +typedef QtValidLicenseForCoreModule QtCoreModule; +class QEasingCurvePrivate; +class QEasingCurve +{ + public: static const QMetaObject staticMetaObject; private: +public: + enum Type { + Linear, + InQuad, OutQuad, InOutQuad, OutInQuad, + InCubic, OutCubic, InOutCubic, OutInCubic, + InQuart, OutQuart, InOutQuart, OutInQuart, + InQuint, OutQuint, InOutQuint, OutInQuint, + InSine, OutSine, InOutSine, OutInSine, + InExpo, OutExpo, InOutExpo, OutInExpo, + InCirc, OutCirc, InOutCirc, OutInCirc, + InElastic, OutElastic, InOutElastic, OutInElastic, + InBack, OutBack, InOutBack, OutInBack, + InBounce, OutBounce, InOutBounce, OutInBounce, + InCurve, OutCurve, SineCurve, CosineCurve, + Custom, NCurveTypes + }; + QEasingCurve(Type type = Linear); + QEasingCurve(const QEasingCurve &other); + ~QEasingCurve(); + QEasingCurve &operator=(const QEasingCurve &other); + bool operator==(const QEasingCurve &other) const; + inline bool operator!=(const QEasingCurve &other) const + { return !(this->operator==(other)); } + qreal amplitude() const; + void setAmplitude(qreal amplitude); + qreal period() const; + void setPeriod(qreal period); + qreal overshoot() const; + void setOvershoot(qreal overshoot); + Type type() const; + void setType(Type type); + typedef qreal (*EasingFunction)(qreal progress); + void setCustomType(EasingFunction func); + EasingFunction customType() const; + qreal valueForProgress(qreal progress) const; +private: + QEasingCurvePrivate *d_ptr; + friend QDebug operator<<(QDebug debug, const QEasingCurve &item); + friend QDataStream &operator<<(QDataStream &, const QEasingCurve&); + friend QDataStream &operator>>(QDataStream &, QEasingCurve &); +}; + QDebug operator<<(QDebug debug, const QEasingCurve &item); + QDataStream &operator<<(QDataStream &, const QEasingCurve&); + QDataStream &operator>>(QDataStream &, QEasingCurve &); +typedef QtValidLicenseForCoreModule QtCoreModule; +class QElapsedTimer +{ +public: + enum ClockType { + SystemTime, + MonotonicClock, + TickCounter, + MachAbsoluteTime, + PerformanceCounter + }; + static ClockType clockType(); + static bool isMonotonic(); + void start(); + qint64 restart(); + void invalidate(); + bool isValid() const; + qint64 nsecsElapsed() const; + qint64 elapsed() const; + bool hasExpired(qint64 timeout) const; + qint64 msecsSinceReference() const; + qint64 msecsTo(const QElapsedTimer &other) const; + qint64 secsTo(const QElapsedTimer &other) const; + bool operator==(const QElapsedTimer &other) const + { return t1 == other.t1 && t2 == other.t2; } + bool operator!=(const QElapsedTimer &other) const + { return !(*this == other); } + friend bool operator<(const QElapsedTimer &v1, const QElapsedTimer &v2); +private: + qint64 t1; + qint64 t2; +}; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QPoint +{ +public: + QPoint(); + QPoint(int xpos, int ypos); + bool isNull() const; + int x() const; + int y() const; + void setX(int x); + void setY(int y); + int manhattanLength() const; + int &rx(); + int &ry(); + QPoint &operator+=(const QPoint &p); + QPoint &operator-=(const QPoint &p); + QPoint &operator*=(float c); + QPoint &operator*=(double c); + QPoint &operator*=(int c); + QPoint &operator/=(qreal c); + friend inline bool operator==(const QPoint &, const QPoint &); + friend inline bool operator!=(const QPoint &, const QPoint &); + friend inline const QPoint operator+(const QPoint &, const QPoint &); + friend inline const QPoint operator-(const QPoint &, const QPoint &); + friend inline const QPoint operator*(const QPoint &, float); + friend inline const QPoint operator*(float, const QPoint &); + friend inline const QPoint operator*(const QPoint &, double); + friend inline const QPoint operator*(double, const QPoint &); + friend inline const QPoint operator*(const QPoint &, int); + friend inline const QPoint operator*(int, const QPoint &); + friend inline const QPoint operator-(const QPoint &); + friend inline const QPoint operator/(const QPoint &, qreal); +private: + friend class QTransform; + int xp; + int yp; +}; +template<> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QPoint)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QPoint"; } }; + QDataStream &operator<<(QDataStream &, const QPoint &); + QDataStream &operator>>(QDataStream &, QPoint &); +inline QPoint::QPoint() +{ xp=0; yp=0; } +inline QPoint::QPoint(int xpos, int ypos) +{ xp = xpos; yp = ypos; } +inline bool QPoint::isNull() const +{ return xp == 0 && yp == 0; } +inline int QPoint::x() const +{ return xp; } +inline int QPoint::y() const +{ return yp; } +inline void QPoint::setX(int xpos) +{ xp = xpos; } +inline void QPoint::setY(int ypos) +{ yp = ypos; } +inline int &QPoint::rx() +{ return xp; } +inline int &QPoint::ry() +{ return yp; } +inline QPoint &QPoint::operator+=(const QPoint &p) +{ xp+=p.xp; yp+=p.yp; return *this; } +inline QPoint &QPoint::operator-=(const QPoint &p) +{ xp-=p.xp; yp-=p.yp; return *this; } +inline QPoint &QPoint::operator*=(float c) +{ xp = qRound(xp*c); yp = qRound(yp*c); return *this; } +inline QPoint &QPoint::operator*=(double c) +{ xp = qRound(xp*c); yp = qRound(yp*c); return *this; } +inline QPoint &QPoint::operator*=(int c) +{ xp = xp*c; yp = yp*c; return *this; } +inline bool operator==(const QPoint &p1, const QPoint &p2) +{ return p1.xp == p2.xp && p1.yp == p2.yp; } +inline bool operator!=(const QPoint &p1, const QPoint &p2) +{ return p1.xp != p2.xp || p1.yp != p2.yp; } +inline const QPoint operator+(const QPoint &p1, const QPoint &p2) +{ return QPoint(p1.xp+p2.xp, p1.yp+p2.yp); } +inline const QPoint operator-(const QPoint &p1, const QPoint &p2) +{ return QPoint(p1.xp-p2.xp, p1.yp-p2.yp); } +inline const QPoint operator*(const QPoint &p, float c) +{ return QPoint(qRound(p.xp*c), qRound(p.yp*c)); } +inline const QPoint operator*(const QPoint &p, double c) +{ return QPoint(qRound(p.xp*c), qRound(p.yp*c)); } +inline const QPoint operator*(const QPoint &p, int c) +{ return QPoint(p.xp*c, p.yp*c); } +inline const QPoint operator*(float c, const QPoint &p) +{ return QPoint(qRound(p.xp*c), qRound(p.yp*c)); } +inline const QPoint operator*(double c, const QPoint &p) +{ return QPoint(qRound(p.xp*c), qRound(p.yp*c)); } +inline const QPoint operator*(int c, const QPoint &p) +{ return QPoint(p.xp*c, p.yp*c); } +inline const QPoint operator-(const QPoint &p) +{ return QPoint(-p.xp, -p.yp); } +inline QPoint &QPoint::operator/=(qreal c) +{ + xp = qRound(xp/c); + yp = qRound(yp/c); + return *this; +} +inline const QPoint operator/(const QPoint &p, qreal c) +{ + return QPoint(qRound(p.xp/c), qRound(p.yp/c)); +} + QDebug operator<<(QDebug, const QPoint &); +class QPointF +{ +public: + QPointF(); + QPointF(const QPoint &p); + QPointF(qreal xpos, qreal ypos); + qreal manhattanLength() const; + bool isNull() const; + qreal x() const; + qreal y() const; + void setX(qreal x); + void setY(qreal y); + qreal &rx(); + qreal &ry(); + QPointF &operator+=(const QPointF &p); + QPointF &operator-=(const QPointF &p); + QPointF &operator*=(qreal c); + QPointF &operator/=(qreal c); + friend inline bool operator==(const QPointF &, const QPointF &); + friend inline bool operator!=(const QPointF &, const QPointF &); + friend inline const QPointF operator+(const QPointF &, const QPointF &); + friend inline const QPointF operator-(const QPointF &, const QPointF &); + friend inline const QPointF operator*(qreal, const QPointF &); + friend inline const QPointF operator*(const QPointF &, qreal); + friend inline const QPointF operator-(const QPointF &); + friend inline const QPointF operator/(const QPointF &, qreal); + QPoint toPoint() const; +private: + friend class QMatrix; + friend class QTransform; + qreal xp; + qreal yp; +}; +template<> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QPointF)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QPointF"; } }; + QDataStream &operator<<(QDataStream &, const QPointF &); + QDataStream &operator>>(QDataStream &, QPointF &); +inline QPointF::QPointF() : xp(0), yp(0) { } +inline QPointF::QPointF(qreal xpos, qreal ypos) : xp(xpos), yp(ypos) { } +inline QPointF::QPointF(const QPoint &p) : xp(p.x()), yp(p.y()) { } +inline bool QPointF::isNull() const +{ + return qIsNull(xp) && qIsNull(yp); +} +inline qreal QPointF::x() const +{ + return xp; +} +inline qreal QPointF::y() const +{ + return yp; +} +inline void QPointF::setX(qreal xpos) +{ + xp = xpos; +} +inline void QPointF::setY(qreal ypos) +{ + yp = ypos; +} +inline qreal &QPointF::rx() +{ + return xp; +} +inline qreal &QPointF::ry() +{ + return yp; +} +inline QPointF &QPointF::operator+=(const QPointF &p) +{ + xp+=p.xp; + yp+=p.yp; + return *this; +} +inline QPointF &QPointF::operator-=(const QPointF &p) +{ + xp-=p.xp; yp-=p.yp; return *this; +} +inline QPointF &QPointF::operator*=(qreal c) +{ + xp*=c; yp*=c; return *this; +} +inline bool operator==(const QPointF &p1, const QPointF &p2) +{ + return qFuzzyIsNull(p1.xp - p2.xp) && qFuzzyIsNull(p1.yp - p2.yp); +} +inline bool operator!=(const QPointF &p1, const QPointF &p2) +{ + return !qFuzzyIsNull(p1.xp - p2.xp) || !qFuzzyIsNull(p1.yp - p2.yp); +} +inline const QPointF operator+(const QPointF &p1, const QPointF &p2) +{ + return QPointF(p1.xp+p2.xp, p1.yp+p2.yp); +} +inline const QPointF operator-(const QPointF &p1, const QPointF &p2) +{ + return QPointF(p1.xp-p2.xp, p1.yp-p2.yp); +} +inline const QPointF operator*(const QPointF &p, qreal c) +{ + return QPointF(p.xp*c, p.yp*c); +} +inline const QPointF operator*(qreal c, const QPointF &p) +{ + return QPointF(p.xp*c, p.yp*c); +} +inline const QPointF operator-(const QPointF &p) +{ + return QPointF(-p.xp, -p.yp); +} +inline QPointF &QPointF::operator/=(qreal c) +{ + xp/=c; + yp/=c; + return *this; +} +inline const QPointF operator/(const QPointF &p, qreal c) +{ + return QPointF(p.xp/c, p.yp/c); +} +inline QPoint QPointF::toPoint() const +{ + return QPoint(qRound(xp), qRound(yp)); +} + QDebug operator<<(QDebug d, const QPointF &p); +typedef QtValidLicenseForCoreModule QtCoreModule; +class QLine +{ +public: + inline QLine(); + inline QLine(const QPoint &pt1, const QPoint &pt2); + inline QLine(int x1, int y1, int x2, int y2); + inline bool isNull() const; + inline QPoint p1() const; + inline QPoint p2() const; + inline int x1() const; + inline int y1() const; + inline int x2() const; + inline int y2() const; + inline int dx() const; + inline int dy() const; + inline void translate(const QPoint &p); + inline void translate(int dx, int dy); + inline QLine translated(const QPoint &p) const; + inline QLine translated(int dx, int dy) const; + inline void setP1(const QPoint &p1); + inline void setP2(const QPoint &p2); + inline void setPoints(const QPoint &p1, const QPoint &p2); + inline void setLine(int x1, int y1, int x2, int y2); + inline bool operator==(const QLine &d) const; + inline bool operator!=(const QLine &d) const { return !(*this == d); } +private: + QPoint pt1, pt2; +}; +template<> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QLine)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QLine"; } }; +inline QLine::QLine() { } +inline QLine::QLine(const QPoint &pt1_, const QPoint &pt2_) : pt1(pt1_), pt2(pt2_) { } +inline QLine::QLine(int x1pos, int y1pos, int x2pos, int y2pos) : pt1(QPoint(x1pos, y1pos)), pt2(QPoint(x2pos, y2pos)) { } +inline bool QLine::isNull() const +{ + return pt1 == pt2; +} +inline int QLine::x1() const +{ + return pt1.x(); +} +inline int QLine::y1() const +{ + return pt1.y(); +} +inline int QLine::x2() const +{ + return pt2.x(); +} +inline int QLine::y2() const +{ + return pt2.y(); +} +inline QPoint QLine::p1() const +{ + return pt1; +} +inline QPoint QLine::p2() const +{ + return pt2; +} +inline int QLine::dx() const +{ + return pt2.x() - pt1.x(); +} +inline int QLine::dy() const +{ + return pt2.y() - pt1.y(); +} +inline void QLine::translate(const QPoint &point) +{ + pt1 += point; + pt2 += point; +} +inline void QLine::translate(int adx, int ady) +{ + this->translate(QPoint(adx, ady)); +} +inline QLine QLine::translated(const QPoint &p) const +{ + return QLine(pt1 + p, pt2 + p); +} +inline QLine QLine::translated(int adx, int ady) const +{ + return translated(QPoint(adx, ady)); +} +inline void QLine::setP1(const QPoint &aP1) +{ + pt1 = aP1; +} +inline void QLine::setP2(const QPoint &aP2) +{ + pt2 = aP2; +} +inline void QLine::setPoints(const QPoint &aP1, const QPoint &aP2) +{ + pt1 = aP1; + pt2 = aP2; +} +inline void QLine::setLine(int aX1, int aY1, int aX2, int aY2) +{ + pt1 = QPoint(aX1, aY1); + pt2 = QPoint(aX2, aY2); +} +inline bool QLine::operator==(const QLine &d) const +{ + return pt1 == d.pt1 && pt2 == d.pt2; +} + QDebug operator<<(QDebug d, const QLine &p); + QDataStream &operator<<(QDataStream &, const QLine &); + QDataStream &operator>>(QDataStream &, QLine &); +class QLineF { +public: + enum IntersectType { NoIntersection, BoundedIntersection, UnboundedIntersection }; + inline QLineF(); + inline QLineF(const QPointF &pt1, const QPointF &pt2); + inline QLineF(qreal x1, qreal y1, qreal x2, qreal y2); + inline QLineF(const QLine &line) : pt1(line.p1()), pt2(line.p2()) { } + static QLineF fromPolar(qreal length, qreal angle); + bool isNull() const; + inline QPointF p1() const; + inline QPointF p2() const; + inline qreal x1() const; + inline qreal y1() const; + inline qreal x2() const; + inline qreal y2() const; + inline qreal dx() const; + inline qreal dy() const; + qreal length() const; + void setLength(qreal len); + qreal angle() const; + void setAngle(qreal angle); + qreal angleTo(const QLineF &l) const; + QLineF unitVector() const; + QLineF normalVector() const; + IntersectType intersect(const QLineF &l, QPointF *intersectionPoint) const; + qreal angle(const QLineF &l) const; + QPointF pointAt(qreal t) const; + inline void translate(const QPointF &p); + inline void translate(qreal dx, qreal dy); + inline QLineF translated(const QPointF &p) const; + inline QLineF translated(qreal dx, qreal dy) const; + inline void setP1(const QPointF &p1); + inline void setP2(const QPointF &p2); + inline void setPoints(const QPointF &p1, const QPointF &p2); + inline void setLine(qreal x1, qreal y1, qreal x2, qreal y2); + inline bool operator==(const QLineF &d) const; + inline bool operator!=(const QLineF &d) const { return !(*this == d); } + QLine toLine() const; +private: + QPointF pt1, pt2; +}; +template<> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QLineF)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QLineF"; } }; +inline QLineF::QLineF() +{ +} +inline QLineF::QLineF(const QPointF &apt1, const QPointF &apt2) + : pt1(apt1), pt2(apt2) +{ +} +inline QLineF::QLineF(qreal x1pos, qreal y1pos, qreal x2pos, qreal y2pos) + : pt1(x1pos, y1pos), pt2(x2pos, y2pos) +{ +} +inline qreal QLineF::x1() const +{ + return pt1.x(); +} +inline qreal QLineF::y1() const +{ + return pt1.y(); +} +inline qreal QLineF::x2() const +{ + return pt2.x(); +} +inline qreal QLineF::y2() const +{ + return pt2.y(); +} +inline QPointF QLineF::p1() const +{ + return pt1; +} +inline QPointF QLineF::p2() const +{ + return pt2; +} +inline qreal QLineF::dx() const +{ + return pt2.x() - pt1.x(); +} +inline qreal QLineF::dy() const +{ + return pt2.y() - pt1.y(); +} +inline QLineF QLineF::normalVector() const +{ + return QLineF(p1(), p1() + QPointF(dy(), -dx())); +} +inline void QLineF::translate(const QPointF &point) +{ + pt1 += point; + pt2 += point; +} +inline void QLineF::translate(qreal adx, qreal ady) +{ + this->translate(QPointF(adx, ady)); +} +inline QLineF QLineF::translated(const QPointF &p) const +{ + return QLineF(pt1 + p, pt2 + p); +} +inline QLineF QLineF::translated(qreal adx, qreal ady) const +{ + return translated(QPointF(adx, ady)); +} +inline void QLineF::setLength(qreal len) +{ + if (isNull()) + return; + QLineF v = unitVector(); + pt2 = QPointF(pt1.x() + v.dx() * len, pt1.y() + v.dy() * len); +} +inline QPointF QLineF::pointAt(qreal t) const +{ + qreal vx = pt2.x() - pt1.x(); + qreal vy = pt2.y() - pt1.y(); + return QPointF(pt1.x() + vx * t, pt1.y() + vy * t); +} +inline QLine QLineF::toLine() const +{ + return QLine(pt1.toPoint(), pt2.toPoint()); +} +inline void QLineF::setP1(const QPointF &aP1) +{ + pt1 = aP1; +} +inline void QLineF::setP2(const QPointF &aP2) +{ + pt2 = aP2; +} +inline void QLineF::setPoints(const QPointF &aP1, const QPointF &aP2) +{ + pt1 = aP1; + pt2 = aP2; +} +inline void QLineF::setLine(qreal aX1, qreal aY1, qreal aX2, qreal aY2) +{ + pt1 = QPointF(aX1, aY1); + pt2 = QPointF(aX2, aY2); +} +inline bool QLineF::operator==(const QLineF &d) const +{ + return pt1 == d.pt1 && pt2 == d.pt2; +} + QDebug operator<<(QDebug d, const QLineF &p); + QDataStream &operator<<(QDataStream &, const QLineF &); + QDataStream &operator>>(QDataStream &, QLineF &); +typedef QtValidLicenseForCoreModule QtCoreModule; +struct QLinkedListData +{ + QLinkedListData *n, *p; + QBasicAtomicInt ref; + int size; + uint sharable : 1; + static QLinkedListData shared_null; +}; +template +struct QLinkedListNode +{ + inline QLinkedListNode(const T &arg): t(arg) { } + QLinkedListNode *n, *p; + T t; +}; +template +class QLinkedList +{ + typedef QLinkedListNode Node; + union { QLinkedListData *d; QLinkedListNode *e; }; +public: + inline QLinkedList() : d(&QLinkedListData::shared_null) { d->ref.ref(); } + inline QLinkedList(const QLinkedList &l) : d(l.d) { d->ref.ref(); if (!d->sharable) detach(); } + ~QLinkedList(); + QLinkedList &operator=(const QLinkedList &); + inline void swap(QLinkedList &other) { qSwap(d, other.d); } + bool operator==(const QLinkedList &l) const; + inline bool operator!=(const QLinkedList &l) const { return !(*this == l); } + inline int size() const { return d->size; } + inline void detach() + { if (d->ref != 1) detach_helper(); } + inline bool isDetached() const { return d->ref == 1; } + inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; } + inline bool isSharedWith(const QLinkedList &other) const { return d == other.d; } + inline bool isEmpty() const { return d->size == 0; } + void clear(); + void append(const T &); + void prepend(const T &); + T takeFirst(); + T takeLast(); + int removeAll(const T &t); + bool removeOne(const T &t); + bool contains(const T &t) const; + int count(const T &t) const; + class const_iterator; + class iterator + { + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef qptrdiff difference_type; + typedef T value_type; + typedef T *pointer; + typedef T &reference; + Node *i; + inline iterator() : i(0) {} + inline iterator(Node *n) : i(n) {} + inline iterator(const iterator &o) : i(o.i) {} + inline iterator &operator=(const iterator &o) { i = o.i; return *this; } + inline T &operator*() const { return i->t; } + inline T *operator->() const { return &i->t; } + inline bool operator==(const iterator &o) const { return i == o.i; } + inline bool operator!=(const iterator &o) const { return i != o.i; } + inline bool operator==(const const_iterator &o) const + { return i == o.i; } + inline bool operator!=(const const_iterator &o) const + { return i != o.i; } + inline iterator &operator++() { i = i->n; return *this; } + inline iterator operator++(int) { Node *n = i; i = i->n; return n; } + inline iterator &operator--() { i = i->p; return *this; } + inline iterator operator--(int) { Node *n = i; i = i->p; return n; } + inline iterator operator+(int j) const + { Node *n = i; if (j > 0) while (j--) n = n->n; else while (j++) n = n->p; return n; } + inline iterator operator-(int j) const { return operator+(-j); } + inline iterator &operator+=(int j) { return *this = *this + j; } + inline iterator &operator-=(int j) { return *this = *this - j; } + }; + friend class iterator; + class const_iterator + { + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef qptrdiff difference_type; + typedef T value_type; + typedef const T *pointer; + typedef const T &reference; + Node *i; + inline const_iterator() : i(0) {} + inline const_iterator(Node *n) : i(n) {} + inline const_iterator(const const_iterator &o) : i(o.i){} + inline const_iterator(iterator ci) : i(ci.i){} + inline const_iterator &operator=(const const_iterator &o) { i = o.i; return *this; } + inline const T &operator*() const { return i->t; } + inline const T *operator->() const { return &i->t; } + inline bool operator==(const const_iterator &o) const { return i == o.i; } + inline bool operator!=(const const_iterator &o) const { return i != o.i; } + inline const_iterator &operator++() { i = i->n; return *this; } + inline const_iterator operator++(int) { Node *n = i; i = i->n; return n; } + inline const_iterator &operator--() { i = i->p; return *this; } + inline const_iterator operator--(int) { Node *n = i; i = i->p; return n; } + inline const_iterator operator+(int j) const + { Node *n = i; if (j > 0) while (j--) n = n->n; else while (j++) n = n->p; return n; } + inline const_iterator operator-(int j) const { return operator+(-j); } + inline const_iterator &operator+=(int j) { return *this = *this + j; } + inline const_iterator &operator-=(int j) { return *this = *this - j; } + }; + friend class const_iterator; + inline iterator begin() { detach(); return e->n; } + inline const_iterator begin() const { return e->n; } + inline const_iterator constBegin() const { return e->n; } + inline iterator end() { detach(); return e; } + inline const_iterator end() const { return e; } + inline const_iterator constEnd() const { return e; } + iterator insert(iterator before, const T &t); + iterator erase(iterator pos); + iterator erase(iterator first, iterator last); + typedef iterator Iterator; + typedef const_iterator ConstIterator; + inline int count() const { return d->size; } + inline T& first() { qt_noop(); return *begin(); } + inline const T& first() const { qt_noop(); return *begin(); } + T& last() { qt_noop(); return *(--end()); } + const T& last() const { qt_noop(); return *(--end()); } + inline void removeFirst() { qt_noop(); erase(begin()); } + inline void removeLast() { qt_noop(); erase(--end()); } + inline bool startsWith(const T &t) const { return !isEmpty() && first() == t; } + inline bool endsWith(const T &t) const { return !isEmpty() && last() == t; } + inline void push_back(const T &t) { append(t); } + inline void push_front(const T &t) { prepend(t); } + inline T& front() { return first(); } + inline const T& front() const { return first(); } + inline T& back() { return last(); } + inline const T& back() const { return last(); } + inline void pop_front() { removeFirst(); } + inline void pop_back() { removeLast(); } + inline bool empty() const { return isEmpty(); } + typedef int size_type; + typedef T value_type; + typedef value_type *pointer; + typedef const value_type *const_pointer; + typedef value_type &reference; + typedef const value_type &const_reference; + typedef qptrdiff difference_type; + static inline QLinkedList fromStdList(const std::list &list) + { QLinkedList tmp; qCopy(list.begin(), list.end(), std::back_inserter(tmp)); return tmp; } + inline std::list toStdList() const + { std::list tmp; qCopy(constBegin(), constEnd(), std::back_inserter(tmp)); return tmp; } + QLinkedList &operator+=(const QLinkedList &l); + QLinkedList operator+(const QLinkedList &l) const; + inline QLinkedList &operator+=(const T &t) { append(t); return *this; } + inline QLinkedList &operator<< (const T &t) { append(t); return *this; } + inline QLinkedList &operator<<(const QLinkedList &l) { *this += l; return *this; } +private: + void detach_helper(); + void free(QLinkedListData*); +}; +template +inline QLinkedList::~QLinkedList() +{ + if (!d) + return; + if (!d->ref.deref()) + free(d); +} +template +void QLinkedList::detach_helper() +{ + union { QLinkedListData *d; Node *e; } x; + x.d = new QLinkedListData; + x.d->ref = 1; + x.d->size = d->size; + x.d->sharable = true; + Node *original = e->n; + Node *copy = x.e; + while (original != e) { + try { + copy->n = new Node(original->t); + copy->n->p = copy; + original = original->n; + copy = copy->n; + } catch (...) { + copy->n = x.e; + free(x.d); + throw; + } + } + copy->n = x.e; + x.e->p = copy; + if (!d->ref.deref()) + free(d); + d = x.d; +} +template +void QLinkedList::free(QLinkedListData *x) +{ + Node *y = reinterpret_cast(x); + Node *i = y->n; + if (x->ref == 0) { + while(i != y) { + Node *n = i; + i = i->n; + delete n; + } + delete x; + } +} +template +void QLinkedList::clear() +{ + *this = QLinkedList(); +} +template +QLinkedList &QLinkedList::operator=(const QLinkedList &l) +{ + if (d != l.d) { + QLinkedListData *o = l.d; + o->ref.ref(); + if (!d->ref.deref()) + free(d); + d = o; + if (!d->sharable) + detach_helper(); + } + return *this; +} +template +bool QLinkedList::operator== (const QLinkedList &l) const +{ + if (d->size != l.d->size) + return false; + if (e == l.e) + return true; + Node *i = e->n; + Node *il = l.e->n; + while (i != e) { + if (! (i->t == il->t)) + return false; + i = i->n; + il = il->n; + } + return true; +} +template +void QLinkedList::append(const T &t) +{ + detach(); + Node *i = new Node(t); + i->n = e; + i->p = e->p; + i->p->n = i; + e->p = i; + d->size++; +} +template +void QLinkedList::prepend(const T &t) +{ + detach(); + Node *i = new Node(t); + i->n = e->n; + i->p = e; + i->n->p = i; + e->n = i; + d->size++; +} +template +int QLinkedList::removeAll(const T &_t) +{ + detach(); + const T t = _t; + Node *i = e->n; + int c = 0; + while (i != e) { + if (i->t == t) { + Node *n = i; + i->n->p = i->p; + i->p->n = i->n; + i = i->n; + delete n; + c++; + } else { + i = i->n; + } + } + d->size-=c; + return c; +} +template +bool QLinkedList::removeOne(const T &_t) +{ + detach(); + iterator it = qFind(begin(), end(), _t); + if (it != end()) { + erase(it); + return true; + } + return false; +} +template +inline T QLinkedList::takeFirst() +{ + T t = first(); + removeFirst(); + return t; +} +template +inline T QLinkedList::takeLast() +{ + T t = last(); + removeLast(); + return t; +} +template +bool QLinkedList::contains(const T &t) const +{ + Node *i = e; + while ((i = i->n) != e) + if (i->t == t) + return true; + return false; +} +template +int QLinkedList::count(const T &t) const +{ + Node *i = e; + int c = 0; + while ((i = i->n) != e) + if (i->t == t) + c++; + return c; +} +template +typename QLinkedList::iterator QLinkedList::insert(iterator before, const T &t) +{ + Node *i = before.i; + Node *m = new Node(t); + m->n = i; + m->p = i->p; + m->p->n = m; + i->p = m; + d->size++; + return m; +} +template +typename QLinkedList::iterator QLinkedList::erase(typename QLinkedList::iterator afirst, + typename QLinkedList::iterator alast) +{ + while (afirst != alast) + erase(afirst++); + return alast; +} +template +typename QLinkedList::iterator QLinkedList::erase(iterator pos) +{ + detach(); + Node *i = pos.i; + if (i != e) { + Node *n = i; + i->n->p = i->p; + i->p->n = i->n; + i = i->n; + delete n; + d->size--; + } + return i; +} +template +QLinkedList &QLinkedList::operator+=(const QLinkedList &l) +{ + detach(); + int n = l.d->size; + d->size += n; + Node *original = l.e->n; + while (n--) { + try { + Node *copy = new Node(original->t); + original = original->n; + copy->n = e; + copy->p = e->p; + copy->p->n = copy; + e->p = copy; + } catch (...) { + while (n++size) + removeLast(); + throw; + } + } + return *this; +} +template +QLinkedList QLinkedList::operator+(const QLinkedList &l) const +{ + QLinkedList n = *this; + n += l; + return n; +} +template class QLinkedListIterator { typedef typename QLinkedList::const_iterator const_iterator; QLinkedList c; const_iterator i; public: inline QLinkedListIterator(const QLinkedList &container) : c(container), i(c.constBegin()) {} inline QLinkedListIterator &operator=(const QLinkedList &container) { c = container; i = c.constBegin(); return *this; } inline void toFront() { i = c.constBegin(); } inline void toBack() { i = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline const T &next() { return *i++; } inline const T &peekNext() const { return *i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline const T &previous() { return *--i; } inline const T &peekPrevious() const { const_iterator p = i; return *--p; } inline bool findNext(const T &t) { while (i != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(--i) == t) return true; return false; } }; +template class QMutableLinkedListIterator { typedef typename QLinkedList::iterator iterator; typedef typename QLinkedList::const_iterator const_iterator; QLinkedList *c; iterator i, n; inline bool item_exists() const { return const_iterator(n) != c->constEnd(); } public: inline QMutableLinkedListIterator(QLinkedList &container) : c(&container) { c->setSharable(false); i = c->begin(); n = c->end(); } inline ~QMutableLinkedListIterator() { c->setSharable(true); } inline QMutableLinkedListIterator &operator=(QLinkedList &container) { c->setSharable(true); c = &container; c->setSharable(false); i = c->begin(); n = c->end(); return *this; } inline void toFront() { i = c->begin(); n = c->end(); } inline void toBack() { i = c->end(); n = i; } inline bool hasNext() const { return c->constEnd() != const_iterator(i); } inline T &next() { n = i++; return *n; } inline T &peekNext() const { return *i; } inline bool hasPrevious() const { return c->constBegin() != const_iterator(i); } inline T &previous() { n = --i; return *n; } inline T &peekPrevious() const { iterator p = i; return *--p; } inline void remove() { if (c->constEnd() != const_iterator(n)) { i = c->erase(n); n = c->end(); } } inline void setValue(const T &t) const { if (c->constEnd() != const_iterator(n)) *n = t; } inline T &value() { qt_noop(); return *n; } inline const T &value() const { qt_noop(); return *n; } inline void insert(const T &t) { n = i = c->insert(i, t); ++i; } inline bool findNext(const T &t) { while (c->constEnd() != const_iterator(n = i)) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (c->constBegin() != const_iterator(i)) if (*(n = --i) == t) return true; n = c->end(); return false; } }; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QMetaType { +public: + enum Type { + Void = 0, Bool = 1, Int = 2, UInt = 3, LongLong = 4, ULongLong = 5, + Double = 6, QChar = 7, QVariantMap = 8, QVariantList = 9, + QString = 10, QStringList = 11, QByteArray = 12, + QBitArray = 13, QDate = 14, QTime = 15, QDateTime = 16, QUrl = 17, + QLocale = 18, QRect = 19, QRectF = 20, QSize = 21, QSizeF = 22, + QLine = 23, QLineF = 24, QPoint = 25, QPointF = 26, QRegExp = 27, + QVariantHash = 28, QEasingCurve = 29, LastCoreType = QEasingCurve, + FirstGuiType = 63 , + QFont = 64, QPixmap = 65, QBrush = 66, QColor = 67, QPalette = 68, + QIcon = 69, QImage = 70, QPolygon = 71, QRegion = 72, QBitmap = 73, + QCursor = 74, QSizePolicy = 75, QKeySequence = 76, QPen = 77, + QTextLength = 78, QTextFormat = 79, QMatrix = 80, QTransform = 81, + QMatrix4x4 = 82, QVector2D = 83, QVector3D = 84, QVector4D = 85, + QQuaternion = 86, + LastGuiType = QQuaternion, + FirstCoreExtType = 128 , + VoidStar = 128, Long = 129, Short = 130, Char = 131, ULong = 132, + UShort = 133, UChar = 134, Float = 135, QObjectStar = 136, QWidgetStar = 137, + QVariant = 138, + LastCoreExtType = QVariant, + QReal = Double, + User = 256 + }; + typedef void (*Destructor)(void *); + typedef void *(*Constructor)(const void *); + typedef void (*SaveOperator)(QDataStream &, const void *); + typedef void (*LoadOperator)(QDataStream &, void *); + static void registerStreamOperators(const char *typeName, SaveOperator saveOp, + LoadOperator loadOp); + static void registerStreamOperators(int type, SaveOperator saveOp, + LoadOperator loadOp); + static int registerType(const char *typeName, Destructor destructor, + Constructor constructor); + static int registerTypedef(const char *typeName, int aliasId); + static int type(const char *typeName); + static const char *typeName(int type); + static bool isRegistered(int type); + static void *construct(int type, const void *copy = 0); + static void destroy(int type, void *data); + static void unregisterType(const char *typeName); + static bool save(QDataStream &stream, int type, const void *data); + static bool load(QDataStream &stream, int type, void *data); +}; +template +void qMetaTypeDeleteHelper(T *t) +{ + delete t; +} +template +void *qMetaTypeConstructHelper(const T *t) +{ + if (!t) + return new T(); + return new T(*static_cast(t)); +} +template +void qMetaTypeSaveHelper(QDataStream &stream, const T *t) +{ + stream << *t; +} +template +void qMetaTypeLoadHelper(QDataStream &stream, T *t) +{ + stream >> *t; +} +template +struct QMetaTypeId +{ + enum { Defined = 0 }; +}; +template +struct QMetaTypeId2 +{ + enum { Defined = QMetaTypeId::Defined }; + static inline int qt_metatype_id() { return QMetaTypeId::qt_metatype_id(); } +}; +namespace QtPrivate { + template ::Defined> + struct QMetaTypeIdHelper { + static inline int qt_metatype_id() + { return QMetaTypeId2::qt_metatype_id(); } + }; + template struct QMetaTypeIdHelper { + static inline int qt_metatype_id() + { return -1; } + }; +} +template +int qRegisterMetaType(const char *typeName + , T * dummy = 0 +) +{ + const int typedefOf = dummy ? -1 : QtPrivate::QMetaTypeIdHelper::qt_metatype_id(); + if (typedefOf != -1) + return QMetaType::registerTypedef(typeName, typedefOf); + typedef void*(*ConstructPtr)(const T*); + ConstructPtr cptr = qMetaTypeConstructHelper; + typedef void(*DeletePtr)(T*); + DeletePtr dptr = qMetaTypeDeleteHelper; + return QMetaType::registerType(typeName, reinterpret_cast(dptr), + reinterpret_cast(cptr)); +} +template +void qRegisterMetaTypeStreamOperators(const char *typeName + , T * = 0 +) +{ + typedef void(*SavePtr)(QDataStream &, const T *); + typedef void(*LoadPtr)(QDataStream &, T *); + SavePtr sptr = qMetaTypeSaveHelper; + LoadPtr lptr = qMetaTypeLoadHelper; + qRegisterMetaType(typeName); + QMetaType::registerStreamOperators(typeName, reinterpret_cast(sptr), + reinterpret_cast(lptr)); +} +template +inline int qMetaTypeId( + T * = 0 +) +{ + return QMetaTypeId2::qt_metatype_id(); +} +template +inline int qRegisterMetaType( + T * dummy = 0 +) +{ + return qMetaTypeId(dummy); +} +template +inline int qRegisterMetaTypeStreamOperators() +{ + typedef void(*SavePtr)(QDataStream &, const T *); + typedef void(*LoadPtr)(QDataStream &, T *); + SavePtr sptr = qMetaTypeSaveHelper; + LoadPtr lptr = qMetaTypeLoadHelper; + register int id = qMetaTypeId(); + QMetaType::registerStreamOperators(id, + reinterpret_cast(sptr), + reinterpret_cast(lptr)); + return id; +} +class QString; +class QByteArray; +class QChar; +class QStringList; +class QBitArray; +class QDate; +class QTime; +class QDateTime; +class QUrl; +class QLocale; +class QRect; +class QRectF; +class QSize; +class QSizeF; +class QLine; +class QLineF; +class QPoint; +class QPointF; +class QRegExp; +class QEasingCurve; +class QWidget; +class QObject; +class QFont; +class QPixmap; +class QBrush; +class QColor; +class QPalette; +class QIcon; +class QImage; +class QPolygon; +class QRegion; +class QBitmap; +class QCursor; +class QSizePolicy; +class QKeySequence; +class QPen; +class QTextLength; +class QTextFormat; +class QMatrix; +class QTransform; +class QMatrix4x4; +class QVector2D; +class QVector3D; +class QVector4D; +class QQuaternion; +class QVariant; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QString }; static inline int qt_metatype_id() { return QMetaType::QString; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::Int }; static inline int qt_metatype_id() { return QMetaType::Int; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::UInt }; static inline int qt_metatype_id() { return QMetaType::UInt; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::Bool }; static inline int qt_metatype_id() { return QMetaType::Bool; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::Double }; static inline int qt_metatype_id() { return QMetaType::Double; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QByteArray }; static inline int qt_metatype_id() { return QMetaType::QByteArray; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QChar }; static inline int qt_metatype_id() { return QMetaType::QChar; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::Long }; static inline int qt_metatype_id() { return QMetaType::Long; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::Short }; static inline int qt_metatype_id() { return QMetaType::Short; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::Char }; static inline int qt_metatype_id() { return QMetaType::Char; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::Char }; static inline int qt_metatype_id() { return QMetaType::Char; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::ULong }; static inline int qt_metatype_id() { return QMetaType::ULong; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::UShort }; static inline int qt_metatype_id() { return QMetaType::UShort; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::UChar }; static inline int qt_metatype_id() { return QMetaType::UChar; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::Float }; static inline int qt_metatype_id() { return QMetaType::Float; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QObjectStar }; static inline int qt_metatype_id() { return QMetaType::QObjectStar; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QWidgetStar }; static inline int qt_metatype_id() { return QMetaType::QWidgetStar; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::VoidStar }; static inline int qt_metatype_id() { return QMetaType::VoidStar; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::LongLong }; static inline int qt_metatype_id() { return QMetaType::LongLong; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::ULongLong }; static inline int qt_metatype_id() { return QMetaType::ULongLong; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QStringList }; static inline int qt_metatype_id() { return QMetaType::QStringList; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QBitArray }; static inline int qt_metatype_id() { return QMetaType::QBitArray; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QDate }; static inline int qt_metatype_id() { return QMetaType::QDate; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QTime }; static inline int qt_metatype_id() { return QMetaType::QTime; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QDateTime }; static inline int qt_metatype_id() { return QMetaType::QDateTime; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QUrl }; static inline int qt_metatype_id() { return QMetaType::QUrl; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QLocale }; static inline int qt_metatype_id() { return QMetaType::QLocale; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QRect }; static inline int qt_metatype_id() { return QMetaType::QRect; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QRectF }; static inline int qt_metatype_id() { return QMetaType::QRectF; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QSize }; static inline int qt_metatype_id() { return QMetaType::QSize; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QSizeF }; static inline int qt_metatype_id() { return QMetaType::QSizeF; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QLine }; static inline int qt_metatype_id() { return QMetaType::QLine; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QLineF }; static inline int qt_metatype_id() { return QMetaType::QLineF; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QPoint }; static inline int qt_metatype_id() { return QMetaType::QPoint; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QPointF }; static inline int qt_metatype_id() { return QMetaType::QPointF; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QRegExp }; static inline int qt_metatype_id() { return QMetaType::QRegExp; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QEasingCurve }; static inline int qt_metatype_id() { return QMetaType::QEasingCurve; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QFont }; static inline int qt_metatype_id() { return QMetaType::QFont; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QPixmap }; static inline int qt_metatype_id() { return QMetaType::QPixmap; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QBrush }; static inline int qt_metatype_id() { return QMetaType::QBrush; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QColor }; static inline int qt_metatype_id() { return QMetaType::QColor; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QPalette }; static inline int qt_metatype_id() { return QMetaType::QPalette; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QIcon }; static inline int qt_metatype_id() { return QMetaType::QIcon; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QImage }; static inline int qt_metatype_id() { return QMetaType::QImage; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QPolygon }; static inline int qt_metatype_id() { return QMetaType::QPolygon; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QRegion }; static inline int qt_metatype_id() { return QMetaType::QRegion; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QBitmap }; static inline int qt_metatype_id() { return QMetaType::QBitmap; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QCursor }; static inline int qt_metatype_id() { return QMetaType::QCursor; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QSizePolicy }; static inline int qt_metatype_id() { return QMetaType::QSizePolicy; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QKeySequence }; static inline int qt_metatype_id() { return QMetaType::QKeySequence; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QPen }; static inline int qt_metatype_id() { return QMetaType::QPen; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QTextLength }; static inline int qt_metatype_id() { return QMetaType::QTextLength; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QTextFormat }; static inline int qt_metatype_id() { return QMetaType::QTextFormat; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QMatrix }; static inline int qt_metatype_id() { return QMetaType::QMatrix; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QTransform }; static inline int qt_metatype_id() { return QMetaType::QTransform; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QMatrix4x4 }; static inline int qt_metatype_id() { return QMetaType::QMatrix4x4; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QVector2D }; static inline int qt_metatype_id() { return QMetaType::QVector2D; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QVector3D }; static inline int qt_metatype_id() { return QMetaType::QVector3D; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QVector4D }; static inline int qt_metatype_id() { return QMetaType::QVector4D; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QQuaternion }; static inline int qt_metatype_id() { return QMetaType::QQuaternion; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QVariant }; static inline int qt_metatype_id() { return QMetaType::QVariant; } }; +namespace std __attribute__ ((__visibility__ ("default"))) +{ + enum _Rb_tree_color { _S_red = false, _S_black = true }; + struct _Rb_tree_node_base + { + typedef _Rb_tree_node_base* _Base_ptr; + typedef const _Rb_tree_node_base* _Const_Base_ptr; + _Rb_tree_color _M_color; + _Base_ptr _M_parent; + _Base_ptr _M_left; + _Base_ptr _M_right; + static _Base_ptr + _S_minimum(_Base_ptr __x) + { + while (__x->_M_left != 0) __x = __x->_M_left; + return __x; + } + static _Const_Base_ptr + _S_minimum(_Const_Base_ptr __x) + { + while (__x->_M_left != 0) __x = __x->_M_left; + return __x; + } + static _Base_ptr + _S_maximum(_Base_ptr __x) + { + while (__x->_M_right != 0) __x = __x->_M_right; + return __x; + } + static _Const_Base_ptr + _S_maximum(_Const_Base_ptr __x) + { + while (__x->_M_right != 0) __x = __x->_M_right; + return __x; + } + }; + template + struct _Rb_tree_node : public _Rb_tree_node_base + { + typedef _Rb_tree_node<_Val>* _Link_type; + _Val _M_value_field; + }; + __attribute__ ((__pure__)) _Rb_tree_node_base* + _Rb_tree_increment(_Rb_tree_node_base* __x) throw (); + __attribute__ ((__pure__)) const _Rb_tree_node_base* + _Rb_tree_increment(const _Rb_tree_node_base* __x) throw (); + __attribute__ ((__pure__)) _Rb_tree_node_base* + _Rb_tree_decrement(_Rb_tree_node_base* __x) throw (); + __attribute__ ((__pure__)) const _Rb_tree_node_base* + _Rb_tree_decrement(const _Rb_tree_node_base* __x) throw (); + template + struct _Rb_tree_iterator + { + typedef _Tp value_type; + typedef _Tp& reference; + typedef _Tp* pointer; + typedef bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + typedef _Rb_tree_iterator<_Tp> _Self; + typedef _Rb_tree_node_base::_Base_ptr _Base_ptr; + typedef _Rb_tree_node<_Tp>* _Link_type; + _Rb_tree_iterator() + : _M_node() { } + explicit + _Rb_tree_iterator(_Link_type __x) + : _M_node(__x) { } + reference + operator*() const + { return static_cast<_Link_type>(_M_node)->_M_value_field; } + pointer + operator->() const + { return std::__addressof(static_cast<_Link_type> + (_M_node)->_M_value_field); } + _Self& + operator++() + { + _M_node = _Rb_tree_increment(_M_node); + return *this; + } + _Self + operator++(int) + { + _Self __tmp = *this; + _M_node = _Rb_tree_increment(_M_node); + return __tmp; + } + _Self& + operator--() + { + _M_node = _Rb_tree_decrement(_M_node); + return *this; + } + _Self + operator--(int) + { + _Self __tmp = *this; + _M_node = _Rb_tree_decrement(_M_node); + return __tmp; + } + bool + operator==(const _Self& __x) const + { return _M_node == __x._M_node; } + bool + operator!=(const _Self& __x) const + { return _M_node != __x._M_node; } + _Base_ptr _M_node; + }; + template + struct _Rb_tree_const_iterator + { + typedef _Tp value_type; + typedef const _Tp& reference; + typedef const _Tp* pointer; + typedef _Rb_tree_iterator<_Tp> iterator; + typedef bidirectional_iterator_tag iterator_category; + typedef ptrdiff_t difference_type; + typedef _Rb_tree_const_iterator<_Tp> _Self; + typedef _Rb_tree_node_base::_Const_Base_ptr _Base_ptr; + typedef const _Rb_tree_node<_Tp>* _Link_type; + _Rb_tree_const_iterator() + : _M_node() { } + explicit + _Rb_tree_const_iterator(_Link_type __x) + : _M_node(__x) { } + _Rb_tree_const_iterator(const iterator& __it) + : _M_node(__it._M_node) { } + iterator + _M_const_cast() const + { return iterator(static_cast + (const_cast(_M_node))); } + reference + operator*() const + { return static_cast<_Link_type>(_M_node)->_M_value_field; } + pointer + operator->() const + { return std::__addressof(static_cast<_Link_type> + (_M_node)->_M_value_field); } + _Self& + operator++() + { + _M_node = _Rb_tree_increment(_M_node); + return *this; + } + _Self + operator++(int) + { + _Self __tmp = *this; + _M_node = _Rb_tree_increment(_M_node); + return __tmp; + } + _Self& + operator--() + { + _M_node = _Rb_tree_decrement(_M_node); + return *this; + } + _Self + operator--(int) + { + _Self __tmp = *this; + _M_node = _Rb_tree_decrement(_M_node); + return __tmp; + } + bool + operator==(const _Self& __x) const + { return _M_node == __x._M_node; } + bool + operator!=(const _Self& __x) const + { return _M_node != __x._M_node; } + _Base_ptr _M_node; + }; + template + inline bool + operator==(const _Rb_tree_iterator<_Val>& __x, + const _Rb_tree_const_iterator<_Val>& __y) + { return __x._M_node == __y._M_node; } + template + inline bool + operator!=(const _Rb_tree_iterator<_Val>& __x, + const _Rb_tree_const_iterator<_Val>& __y) + { return __x._M_node != __y._M_node; } + void + _Rb_tree_insert_and_rebalance(const bool __insert_left, + _Rb_tree_node_base* __x, + _Rb_tree_node_base* __p, + _Rb_tree_node_base& __header) throw (); + _Rb_tree_node_base* + _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z, + _Rb_tree_node_base& __header) throw (); + template > + class _Rb_tree + { + typedef typename _Alloc::template rebind<_Rb_tree_node<_Val> >::other + _Node_allocator; + protected: + typedef _Rb_tree_node_base* _Base_ptr; + typedef const _Rb_tree_node_base* _Const_Base_ptr; + public: + typedef _Key key_type; + typedef _Val value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef _Rb_tree_node<_Val>* _Link_type; + typedef const _Rb_tree_node<_Val>* _Const_Link_type; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Alloc allocator_type; + _Node_allocator& + _M_get_Node_allocator() + { return *static_cast<_Node_allocator*>(&this->_M_impl); } + const _Node_allocator& + _M_get_Node_allocator() const + { return *static_cast(&this->_M_impl); } + allocator_type + get_allocator() const + { return allocator_type(_M_get_Node_allocator()); } + protected: + _Link_type + _M_get_node() + { return _M_impl._Node_allocator::allocate(1); } + void + _M_put_node(_Link_type __p) + { _M_impl._Node_allocator::deallocate(__p, 1); } + _Link_type + _M_create_node(const value_type& __x) + { + _Link_type __tmp = _M_get_node(); + try + { get_allocator().construct + (std::__addressof(__tmp->_M_value_field), __x); } + catch(...) + { + _M_put_node(__tmp); + throw; + } + return __tmp; + } + void + _M_destroy_node(_Link_type __p) + { + get_allocator().destroy(std::__addressof(__p->_M_value_field)); + _M_put_node(__p); + } + _Link_type + _M_clone_node(_Const_Link_type __x) + { + _Link_type __tmp = _M_create_node(__x->_M_value_field); + __tmp->_M_color = __x->_M_color; + __tmp->_M_left = 0; + __tmp->_M_right = 0; + return __tmp; + } + protected: + template + struct _Rb_tree_impl : public _Node_allocator + { + _Key_compare _M_key_compare; + _Rb_tree_node_base _M_header; + size_type _M_node_count; + _Rb_tree_impl() + : _Node_allocator(), _M_key_compare(), _M_header(), + _M_node_count(0) + { _M_initialize(); } + _Rb_tree_impl(const _Key_compare& __comp, const _Node_allocator& __a) + : _Node_allocator(__a), _M_key_compare(__comp), _M_header(), + _M_node_count(0) + { _M_initialize(); } + private: + void + _M_initialize() + { + this->_M_header._M_color = _S_red; + this->_M_header._M_parent = 0; + this->_M_header._M_left = &this->_M_header; + this->_M_header._M_right = &this->_M_header; + } + }; + _Rb_tree_impl<_Compare> _M_impl; + protected: + _Base_ptr& + _M_root() + { return this->_M_impl._M_header._M_parent; } + _Const_Base_ptr + _M_root() const + { return this->_M_impl._M_header._M_parent; } + _Base_ptr& + _M_leftmost() + { return this->_M_impl._M_header._M_left; } + _Const_Base_ptr + _M_leftmost() const + { return this->_M_impl._M_header._M_left; } + _Base_ptr& + _M_rightmost() + { return this->_M_impl._M_header._M_right; } + _Const_Base_ptr + _M_rightmost() const + { return this->_M_impl._M_header._M_right; } + _Link_type + _M_begin() + { return static_cast<_Link_type>(this->_M_impl._M_header._M_parent); } + _Const_Link_type + _M_begin() const + { + return static_cast<_Const_Link_type> + (this->_M_impl._M_header._M_parent); + } + _Link_type + _M_end() + { return static_cast<_Link_type>(&this->_M_impl._M_header); } + _Const_Link_type + _M_end() const + { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); } + static const_reference + _S_value(_Const_Link_type __x) + { return __x->_M_value_field; } + static const _Key& + _S_key(_Const_Link_type __x) + { return _KeyOfValue()(_S_value(__x)); } + static _Link_type + _S_left(_Base_ptr __x) + { return static_cast<_Link_type>(__x->_M_left); } + static _Const_Link_type + _S_left(_Const_Base_ptr __x) + { return static_cast<_Const_Link_type>(__x->_M_left); } + static _Link_type + _S_right(_Base_ptr __x) + { return static_cast<_Link_type>(__x->_M_right); } + static _Const_Link_type + _S_right(_Const_Base_ptr __x) + { return static_cast<_Const_Link_type>(__x->_M_right); } + static const_reference + _S_value(_Const_Base_ptr __x) + { return static_cast<_Const_Link_type>(__x)->_M_value_field; } + static const _Key& + _S_key(_Const_Base_ptr __x) + { return _KeyOfValue()(_S_value(__x)); } + static _Base_ptr + _S_minimum(_Base_ptr __x) + { return _Rb_tree_node_base::_S_minimum(__x); } + static _Const_Base_ptr + _S_minimum(_Const_Base_ptr __x) + { return _Rb_tree_node_base::_S_minimum(__x); } + static _Base_ptr + _S_maximum(_Base_ptr __x) + { return _Rb_tree_node_base::_S_maximum(__x); } + static _Const_Base_ptr + _S_maximum(_Const_Base_ptr __x) + { return _Rb_tree_node_base::_S_maximum(__x); } + public: + typedef _Rb_tree_iterator iterator; + typedef _Rb_tree_const_iterator const_iterator; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + private: + iterator + _M_insert_(_Const_Base_ptr __x, _Const_Base_ptr __y, + const value_type& __v); + iterator + _M_insert_lower(_Base_ptr __x, _Base_ptr __y, const value_type& __v); + iterator + _M_insert_equal_lower(const value_type& __x); + _Link_type + _M_copy(_Const_Link_type __x, _Link_type __p); + void + _M_erase(_Link_type __x); + iterator + _M_lower_bound(_Link_type __x, _Link_type __y, + const _Key& __k); + const_iterator + _M_lower_bound(_Const_Link_type __x, _Const_Link_type __y, + const _Key& __k) const; + iterator + _M_upper_bound(_Link_type __x, _Link_type __y, + const _Key& __k); + const_iterator + _M_upper_bound(_Const_Link_type __x, _Const_Link_type __y, + const _Key& __k) const; + public: + _Rb_tree() { } + _Rb_tree(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_impl(__comp, __a) { } + _Rb_tree(const _Rb_tree& __x) + : _M_impl(__x._M_impl._M_key_compare, __x._M_get_Node_allocator()) + { + if (__x._M_root() != 0) + { + _M_root() = _M_copy(__x._M_begin(), _M_end()); + _M_leftmost() = _S_minimum(_M_root()); + _M_rightmost() = _S_maximum(_M_root()); + _M_impl._M_node_count = __x._M_impl._M_node_count; + } + } + ~_Rb_tree() + { _M_erase(_M_begin()); } + _Rb_tree& + operator=(const _Rb_tree& __x); + _Compare + key_comp() const + { return _M_impl._M_key_compare; } + iterator + begin() + { + return iterator(static_cast<_Link_type> + (this->_M_impl._M_header._M_left)); + } + const_iterator + begin() const + { + return const_iterator(static_cast<_Const_Link_type> + (this->_M_impl._M_header._M_left)); + } + iterator + end() + { return iterator(static_cast<_Link_type>(&this->_M_impl._M_header)); } + const_iterator + end() const + { + return const_iterator(static_cast<_Const_Link_type> + (&this->_M_impl._M_header)); + } + reverse_iterator + rbegin() + { return reverse_iterator(end()); } + const_reverse_iterator + rbegin() const + { return const_reverse_iterator(end()); } + reverse_iterator + rend() + { return reverse_iterator(begin()); } + const_reverse_iterator + rend() const + { return const_reverse_iterator(begin()); } + bool + empty() const + { return _M_impl._M_node_count == 0; } + size_type + size() const + { return _M_impl._M_node_count; } + size_type + max_size() const + { return _M_get_Node_allocator().max_size(); } + void + swap(_Rb_tree& __t); + pair + _M_insert_unique(const value_type& __x); + iterator + _M_insert_equal(const value_type& __x); + iterator + _M_insert_unique_(const_iterator __position, const value_type& __x); + iterator + _M_insert_equal_(const_iterator __position, const value_type& __x); + template + void + _M_insert_unique(_InputIterator __first, _InputIterator __last); + template + void + _M_insert_equal(_InputIterator __first, _InputIterator __last); + private: + void + _M_erase_aux(const_iterator __position); + void + _M_erase_aux(const_iterator __first, const_iterator __last); + public: + void + erase(iterator __position) + { _M_erase_aux(__position); } + void + erase(const_iterator __position) + { _M_erase_aux(__position); } + size_type + erase(const key_type& __x); + void + erase(iterator __first, iterator __last) + { _M_erase_aux(__first, __last); } + void + erase(const_iterator __first, const_iterator __last) + { _M_erase_aux(__first, __last); } + void + erase(const key_type* __first, const key_type* __last); + void + clear() + { + _M_erase(_M_begin()); + _M_leftmost() = _M_end(); + _M_root() = 0; + _M_rightmost() = _M_end(); + _M_impl._M_node_count = 0; + } + iterator + find(const key_type& __k); + const_iterator + find(const key_type& __k) const; + size_type + count(const key_type& __k) const; + iterator + lower_bound(const key_type& __k) + { return _M_lower_bound(_M_begin(), _M_end(), __k); } + const_iterator + lower_bound(const key_type& __k) const + { return _M_lower_bound(_M_begin(), _M_end(), __k); } + iterator + upper_bound(const key_type& __k) + { return _M_upper_bound(_M_begin(), _M_end(), __k); } + const_iterator + upper_bound(const key_type& __k) const + { return _M_upper_bound(_M_begin(), _M_end(), __k); } + pair + equal_range(const key_type& __k); + pair + equal_range(const key_type& __k) const; + bool + __rb_verify() const; + }; + template + inline bool + operator==(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { + return __x.size() == __y.size() + && std::equal(__x.begin(), __x.end(), __y.begin()); + } + template + inline bool + operator<(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { + return std::lexicographical_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()); + } + template + inline bool + operator!=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { return __y < __x; } + template + inline bool + operator<=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { return !(__x < __y); } + template + inline void + swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __y) + { __x.swap(__y); } + template + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + operator=(const _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x) + { + if (this != &__x) + { + clear(); + _M_impl._M_key_compare = __x._M_impl._M_key_compare; + if (__x._M_root() != 0) + { + _M_root() = _M_copy(__x._M_begin(), _M_end()); + _M_leftmost() = _S_minimum(_M_root()); + _M_rightmost() = _S_maximum(_M_root()); + _M_impl._M_node_count = __x._M_impl._M_node_count; + } + } + return *this; + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_(_Const_Base_ptr __x, _Const_Base_ptr __p, const _Val& __v) + { + bool __insert_left = (__x != 0 || __p == _M_end() + || _M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key(__p))); + _Link_type __z = _M_create_node((__v)); + _Rb_tree_insert_and_rebalance(__insert_left, __z, + const_cast<_Base_ptr>(__p), + this->_M_impl._M_header); + ++_M_impl._M_node_count; + return iterator(__z); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_lower(_Base_ptr __x, _Base_ptr __p, const _Val& __v) + { + bool __insert_left = (__x != 0 || __p == _M_end() + || !_M_impl._M_key_compare(_S_key(__p), + _KeyOfValue()(__v))); + _Link_type __z = _M_create_node((__v)); + _Rb_tree_insert_and_rebalance(__insert_left, __z, __p, + this->_M_impl._M_header); + ++_M_impl._M_node_count; + return iterator(__z); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_equal_lower(const _Val& __v) + { + _Link_type __x = _M_begin(); + _Link_type __y = _M_end(); + while (__x != 0) + { + __y = __x; + __x = !_M_impl._M_key_compare(_S_key(__x), _KeyOfValue()(__v)) ? + _S_left(__x) : _S_right(__x); + } + return _M_insert_lower(__x, __y, (__v)); + } + template + typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::_Link_type + _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>:: + _M_copy(_Const_Link_type __x, _Link_type __p) + { + _Link_type __top = _M_clone_node(__x); + __top->_M_parent = __p; + try + { + if (__x->_M_right) + __top->_M_right = _M_copy(_S_right(__x), __top); + __p = __top; + __x = _S_left(__x); + while (__x != 0) + { + _Link_type __y = _M_clone_node(__x); + __p->_M_left = __y; + __y->_M_parent = __p; + if (__x->_M_right) + __y->_M_right = _M_copy(_S_right(__x), __y); + __p = __y; + __x = _S_left(__x); + } + } + catch(...) + { + _M_erase(__top); + throw; + } + return __top; + } + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_erase(_Link_type __x) + { + while (__x != 0) + { + _M_erase(_S_right(__x)); + _Link_type __y = _S_left(__x); + _M_destroy_node(__x); + __x = __y; + } + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_lower_bound(_Link_type __x, _Link_type __y, + const _Key& __k) + { + while (__x != 0) + if (!_M_impl._M_key_compare(_S_key(__x), __k)) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + return iterator(__y); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::const_iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_lower_bound(_Const_Link_type __x, _Const_Link_type __y, + const _Key& __k) const + { + while (__x != 0) + if (!_M_impl._M_key_compare(_S_key(__x), __k)) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + return const_iterator(__y); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_upper_bound(_Link_type __x, _Link_type __y, + const _Key& __k) + { + while (__x != 0) + if (_M_impl._M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + return iterator(__y); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::const_iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_upper_bound(_Const_Link_type __x, _Const_Link_type __y, + const _Key& __k) const + { + while (__x != 0) + if (_M_impl._M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + __x = _S_right(__x); + return const_iterator(__y); + } + template + pair::iterator, + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::iterator> + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + equal_range(const _Key& __k) + { + _Link_type __x = _M_begin(); + _Link_type __y = _M_end(); + while (__x != 0) + { + if (_M_impl._M_key_compare(_S_key(__x), __k)) + __x = _S_right(__x); + else if (_M_impl._M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + { + _Link_type __xu(__x), __yu(__y); + __y = __x, __x = _S_left(__x); + __xu = _S_right(__xu); + return pair(_M_lower_bound(__x, __y, __k), + _M_upper_bound(__xu, __yu, __k)); + } + } + return pair(iterator(__y), + iterator(__y)); + } + template + pair::const_iterator, + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::const_iterator> + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + equal_range(const _Key& __k) const + { + _Const_Link_type __x = _M_begin(); + _Const_Link_type __y = _M_end(); + while (__x != 0) + { + if (_M_impl._M_key_compare(_S_key(__x), __k)) + __x = _S_right(__x); + else if (_M_impl._M_key_compare(__k, _S_key(__x))) + __y = __x, __x = _S_left(__x); + else + { + _Const_Link_type __xu(__x), __yu(__y); + __y = __x, __x = _S_left(__x); + __xu = _S_right(__xu); + return pair(_M_lower_bound(__x, __y, __k), + _M_upper_bound(__xu, __yu, __k)); + } + } + return pair(const_iterator(__y), + const_iterator(__y)); + } + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __t) + { + if (_M_root() == 0) + { + if (__t._M_root() != 0) + { + _M_root() = __t._M_root(); + _M_leftmost() = __t._M_leftmost(); + _M_rightmost() = __t._M_rightmost(); + _M_root()->_M_parent = _M_end(); + __t._M_root() = 0; + __t._M_leftmost() = __t._M_end(); + __t._M_rightmost() = __t._M_end(); + } + } + else if (__t._M_root() == 0) + { + __t._M_root() = _M_root(); + __t._M_leftmost() = _M_leftmost(); + __t._M_rightmost() = _M_rightmost(); + __t._M_root()->_M_parent = __t._M_end(); + _M_root() = 0; + _M_leftmost() = _M_end(); + _M_rightmost() = _M_end(); + } + else + { + std::swap(_M_root(),__t._M_root()); + std::swap(_M_leftmost(),__t._M_leftmost()); + std::swap(_M_rightmost(),__t._M_rightmost()); + _M_root()->_M_parent = _M_end(); + __t._M_root()->_M_parent = __t._M_end(); + } + std::swap(this->_M_impl._M_node_count, __t._M_impl._M_node_count); + std::swap(this->_M_impl._M_key_compare, __t._M_impl._M_key_compare); + std::__alloc_swap<_Node_allocator>:: + _S_do_it(_M_get_Node_allocator(), __t._M_get_Node_allocator()); + } + template + pair::iterator, bool> + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_unique(const _Val& __v) + { + _Link_type __x = _M_begin(); + _Link_type __y = _M_end(); + bool __comp = true; + while (__x != 0) + { + __y = __x; + __comp = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x)); + __x = __comp ? _S_left(__x) : _S_right(__x); + } + iterator __j = iterator(__y); + if (__comp) + { + if (__j == begin()) + return pair + (_M_insert_(__x, __y, (__v)), true); + else + --__j; + } + if (_M_impl._M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v))) + return pair + (_M_insert_(__x, __y, (__v)), true); + return pair(__j, false); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_equal(const _Val& __v) + { + _Link_type __x = _M_begin(); + _Link_type __y = _M_end(); + while (__x != 0) + { + __y = __x; + __x = _M_impl._M_key_compare(_KeyOfValue()(__v), _S_key(__x)) ? + _S_left(__x) : _S_right(__x); + } + return _M_insert_(__x, __y, (__v)); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_unique_(const_iterator __position, const _Val& __v) + { + if (__position._M_node == _M_end()) + { + if (size() > 0 + && _M_impl._M_key_compare(_S_key(_M_rightmost()), + _KeyOfValue()(__v))) + return _M_insert_(0, _M_rightmost(), (__v)); + else + return _M_insert_unique((__v)).first; + } + else if (_M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key(__position._M_node))) + { + const_iterator __before = __position; + if (__position._M_node == _M_leftmost()) + return _M_insert_(_M_leftmost(), _M_leftmost(), + (__v)); + else if (_M_impl._M_key_compare(_S_key((--__before)._M_node), + _KeyOfValue()(__v))) + { + if (_S_right(__before._M_node) == 0) + return _M_insert_(0, __before._M_node, + (__v)); + else + return _M_insert_(__position._M_node, + __position._M_node, + (__v)); + } + else + return _M_insert_unique((__v)).first; + } + else if (_M_impl._M_key_compare(_S_key(__position._M_node), + _KeyOfValue()(__v))) + { + const_iterator __after = __position; + if (__position._M_node == _M_rightmost()) + return _M_insert_(0, _M_rightmost(), + (__v)); + else if (_M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key((++__after)._M_node))) + { + if (_S_right(__position._M_node) == 0) + return _M_insert_(0, __position._M_node, + (__v)); + else + return _M_insert_(__after._M_node, __after._M_node, + (__v)); + } + else + return _M_insert_unique((__v)).first; + } + else + return __position._M_const_cast(); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_insert_equal_(const_iterator __position, const _Val& __v) + { + if (__position._M_node == _M_end()) + { + if (size() > 0 + && !_M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key(_M_rightmost()))) + return _M_insert_(0, _M_rightmost(), + (__v)); + else + return _M_insert_equal((__v)); + } + else if (!_M_impl._M_key_compare(_S_key(__position._M_node), + _KeyOfValue()(__v))) + { + const_iterator __before = __position; + if (__position._M_node == _M_leftmost()) + return _M_insert_(_M_leftmost(), _M_leftmost(), + (__v)); + else if (!_M_impl._M_key_compare(_KeyOfValue()(__v), + _S_key((--__before)._M_node))) + { + if (_S_right(__before._M_node) == 0) + return _M_insert_(0, __before._M_node, + (__v)); + else + return _M_insert_(__position._M_node, + __position._M_node, + (__v)); + } + else + return _M_insert_equal((__v)); + } + else + { + const_iterator __after = __position; + if (__position._M_node == _M_rightmost()) + return _M_insert_(0, _M_rightmost(), + (__v)); + else if (!_M_impl._M_key_compare(_S_key((++__after)._M_node), + _KeyOfValue()(__v))) + { + if (_S_right(__position._M_node) == 0) + return _M_insert_(0, __position._M_node, + (__v)); + else + return _M_insert_(__after._M_node, __after._M_node, + (__v)); + } + else + return _M_insert_equal_lower((__v)); + } + } + template + template + void + _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: + _M_insert_unique(_II __first, _II __last) + { + for (; __first != __last; ++__first) + _M_insert_unique_(end(), *__first); + } + template + template + void + _Rb_tree<_Key, _Val, _KoV, _Cmp, _Alloc>:: + _M_insert_equal(_II __first, _II __last) + { + for (; __first != __last; ++__first) + _M_insert_equal_(end(), *__first); + } + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_erase_aux(const_iterator __position) + { + _Link_type __y = + static_cast<_Link_type>(_Rb_tree_rebalance_for_erase + (const_cast<_Base_ptr>(__position._M_node), + this->_M_impl._M_header)); + _M_destroy_node(__y); + --_M_impl._M_node_count; + } + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + _M_erase_aux(const_iterator __first, const_iterator __last) + { + if (__first == begin() && __last == end()) + clear(); + else + while (__first != __last) + erase(__first++); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(const _Key& __x) + { + pair __p = equal_range(__x); + const size_type __old_size = size(); + erase(__p.first, __p.second); + return __old_size - size(); + } + template + void + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + erase(const _Key* __first, const _Key* __last) + { + while (__first != __last) + erase(*__first++); + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + find(const _Key& __k) + { + iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k); + return (__j == end() + || _M_impl._M_key_compare(__k, + _S_key(__j._M_node))) ? end() : __j; + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, + _Compare, _Alloc>::const_iterator + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + find(const _Key& __k) const + { + const_iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k); + return (__j == end() + || _M_impl._M_key_compare(__k, + _S_key(__j._M_node))) ? end() : __j; + } + template + typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::size_type + _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: + count(const _Key& __k) const + { + pair __p = equal_range(__k); + const size_type __n = std::distance(__p.first, __p.second); + return __n; + } + __attribute__ ((__pure__)) unsigned int + _Rb_tree_black_count(const _Rb_tree_node_base* __node, + const _Rb_tree_node_base* __root) throw (); + template + bool + _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::__rb_verify() const + { + if (_M_impl._M_node_count == 0 || begin() == end()) + return _M_impl._M_node_count == 0 && begin() == end() + && this->_M_impl._M_header._M_left == _M_end() + && this->_M_impl._M_header._M_right == _M_end(); + unsigned int __len = _Rb_tree_black_count(_M_leftmost(), _M_root()); + for (const_iterator __it = begin(); __it != end(); ++__it) + { + _Const_Link_type __x = static_cast<_Const_Link_type>(__it._M_node); + _Const_Link_type __L = _S_left(__x); + _Const_Link_type __R = _S_right(__x); + if (__x->_M_color == _S_red) + if ((__L && __L->_M_color == _S_red) + || (__R && __R->_M_color == _S_red)) + return false; + if (__L && _M_impl._M_key_compare(_S_key(__x), _S_key(__L))) + return false; + if (__R && _M_impl._M_key_compare(_S_key(__R), _S_key(__x))) + return false; + if (!__L && !__R && _Rb_tree_black_count(__x, _M_root()) != __len) + return false; + } + if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root())) + return false; + if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root())) + return false; + return true; + } +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template , + typename _Alloc = std::allocator > > + class map + { + public: + typedef _Key key_type; + typedef _Tp mapped_type; + typedef std::pair value_type; + typedef _Compare key_compare; + typedef _Alloc allocator_type; + private: + typedef typename _Alloc::value_type _Alloc_value_type; + public: + class value_compare + : public std::binary_function + { + friend class map<_Key, _Tp, _Compare, _Alloc>; + protected: + _Compare comp; + value_compare(_Compare __c) + : comp(__c) { } + public: + bool operator()(const value_type& __x, const value_type& __y) const + { return comp(__x.first, __y.first); } + }; + private: + typedef typename _Alloc::template rebind::other + _Pair_alloc_type; + typedef _Rb_tree, + key_compare, _Pair_alloc_type> _Rep_type; + _Rep_type _M_t; + public: + typedef typename _Pair_alloc_type::pointer pointer; + typedef typename _Pair_alloc_type::const_pointer const_pointer; + typedef typename _Pair_alloc_type::reference reference; + typedef typename _Pair_alloc_type::const_reference const_reference; + typedef typename _Rep_type::iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + typedef typename _Rep_type::reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; + map() + : _M_t() { } + explicit + map(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) { } + map(const map& __x) + : _M_t(__x._M_t) { } + template + map(_InputIterator __first, _InputIterator __last) + : _M_t() + { _M_t._M_insert_unique(__first, __last); } + template + map(_InputIterator __first, _InputIterator __last, + const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) + { _M_t._M_insert_unique(__first, __last); } + map& + operator=(const map& __x) + { + _M_t = __x._M_t; + return *this; + } + allocator_type + get_allocator() const + { return _M_t.get_allocator(); } + iterator + begin() + { return _M_t.begin(); } + const_iterator + begin() const + { return _M_t.begin(); } + iterator + end() + { return _M_t.end(); } + const_iterator + end() const + { return _M_t.end(); } + reverse_iterator + rbegin() + { return _M_t.rbegin(); } + const_reverse_iterator + rbegin() const + { return _M_t.rbegin(); } + reverse_iterator + rend() + { return _M_t.rend(); } + const_reverse_iterator + rend() const + { return _M_t.rend(); } + bool + empty() const + { return _M_t.empty(); } + size_type + size() const + { return _M_t.size(); } + size_type + max_size() const + { return _M_t.max_size(); } + mapped_type& + operator[](const key_type& __k) + { + iterator __i = lower_bound(__k); + if (__i == end() || key_comp()(__k, (*__i).first)) + __i = insert(__i, value_type(__k, mapped_type())); + return (*__i).second; + } + mapped_type& + at(const key_type& __k) + { + iterator __i = lower_bound(__k); + if (__i == end() || key_comp()(__k, (*__i).first)) + __throw_out_of_range(("map::at")); + return (*__i).second; + } + const mapped_type& + at(const key_type& __k) const + { + const_iterator __i = lower_bound(__k); + if (__i == end() || key_comp()(__k, (*__i).first)) + __throw_out_of_range(("map::at")); + return (*__i).second; + } + std::pair + insert(const value_type& __x) + { return _M_t._M_insert_unique(__x); } + iterator + insert(iterator __position, const value_type& __x) + { return _M_t._M_insert_unique_(__position, __x); } + template + void + insert(_InputIterator __first, _InputIterator __last) + { _M_t._M_insert_unique(__first, __last); } + void + erase(iterator __position) + { _M_t.erase(__position); } + size_type + erase(const key_type& __x) + { return _M_t.erase(__x); } + void + erase(iterator __first, iterator __last) + { _M_t.erase(__first, __last); } + void + swap(map& __x) + { _M_t.swap(__x._M_t); } + void + clear() + { _M_t.clear(); } + key_compare + key_comp() const + { return _M_t.key_comp(); } + value_compare + value_comp() const + { return value_compare(_M_t.key_comp()); } + iterator + find(const key_type& __x) + { return _M_t.find(__x); } + const_iterator + find(const key_type& __x) const + { return _M_t.find(__x); } + size_type + count(const key_type& __x) const + { return _M_t.find(__x) == _M_t.end() ? 0 : 1; } + iterator + lower_bound(const key_type& __x) + { return _M_t.lower_bound(__x); } + const_iterator + lower_bound(const key_type& __x) const + { return _M_t.lower_bound(__x); } + iterator + upper_bound(const key_type& __x) + { return _M_t.upper_bound(__x); } + const_iterator + upper_bound(const key_type& __x) const + { return _M_t.upper_bound(__x); } + std::pair + equal_range(const key_type& __x) + { return _M_t.equal_range(__x); } + std::pair + equal_range(const key_type& __x) const + { return _M_t.equal_range(__x); } + template + friend bool + operator==(const map<_K1, _T1, _C1, _A1>&, + const map<_K1, _T1, _C1, _A1>&); + template + friend bool + operator<(const map<_K1, _T1, _C1, _A1>&, + const map<_K1, _T1, _C1, _A1>&); + }; + template + inline bool + operator==(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return __x._M_t == __y._M_t; } + template + inline bool + operator<(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return __x._M_t < __y._M_t; } + template + inline bool + operator!=(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return __y < __x; } + template + inline bool + operator<=(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const map<_Key, _Tp, _Compare, _Alloc>& __x, + const map<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__x < __y); } + template + inline void + swap(map<_Key, _Tp, _Compare, _Alloc>& __x, + map<_Key, _Tp, _Compare, _Alloc>& __y) + { __x.swap(__y); } +} +namespace std __attribute__ ((__visibility__ ("default"))) +{ + template , + typename _Alloc = std::allocator > > + class multimap + { + public: + typedef _Key key_type; + typedef _Tp mapped_type; + typedef std::pair value_type; + typedef _Compare key_compare; + typedef _Alloc allocator_type; + private: + typedef typename _Alloc::value_type _Alloc_value_type; + public: + class value_compare + : public std::binary_function + { + friend class multimap<_Key, _Tp, _Compare, _Alloc>; + protected: + _Compare comp; + value_compare(_Compare __c) + : comp(__c) { } + public: + bool operator()(const value_type& __x, const value_type& __y) const + { return comp(__x.first, __y.first); } + }; + private: + typedef typename _Alloc::template rebind::other + _Pair_alloc_type; + typedef _Rb_tree, + key_compare, _Pair_alloc_type> _Rep_type; + _Rep_type _M_t; + public: + typedef typename _Pair_alloc_type::pointer pointer; + typedef typename _Pair_alloc_type::const_pointer const_pointer; + typedef typename _Pair_alloc_type::reference reference; + typedef typename _Pair_alloc_type::const_reference const_reference; + typedef typename _Rep_type::iterator iterator; + typedef typename _Rep_type::const_iterator const_iterator; + typedef typename _Rep_type::size_type size_type; + typedef typename _Rep_type::difference_type difference_type; + typedef typename _Rep_type::reverse_iterator reverse_iterator; + typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator; + multimap() + : _M_t() { } + explicit + multimap(const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) { } + multimap(const multimap& __x) + : _M_t(__x._M_t) { } + template + multimap(_InputIterator __first, _InputIterator __last) + : _M_t() + { _M_t._M_insert_equal(__first, __last); } + template + multimap(_InputIterator __first, _InputIterator __last, + const _Compare& __comp, + const allocator_type& __a = allocator_type()) + : _M_t(__comp, __a) + { _M_t._M_insert_equal(__first, __last); } + multimap& + operator=(const multimap& __x) + { + _M_t = __x._M_t; + return *this; + } + allocator_type + get_allocator() const + { return _M_t.get_allocator(); } + iterator + begin() + { return _M_t.begin(); } + const_iterator + begin() const + { return _M_t.begin(); } + iterator + end() + { return _M_t.end(); } + const_iterator + end() const + { return _M_t.end(); } + reverse_iterator + rbegin() + { return _M_t.rbegin(); } + const_reverse_iterator + rbegin() const + { return _M_t.rbegin(); } + reverse_iterator + rend() + { return _M_t.rend(); } + const_reverse_iterator + rend() const + { return _M_t.rend(); } + bool + empty() const + { return _M_t.empty(); } + size_type + size() const + { return _M_t.size(); } + size_type + max_size() const + { return _M_t.max_size(); } + iterator + insert(const value_type& __x) + { return _M_t._M_insert_equal(__x); } + iterator + insert(iterator __position, const value_type& __x) + { return _M_t._M_insert_equal_(__position, __x); } + template + void + insert(_InputIterator __first, _InputIterator __last) + { _M_t._M_insert_equal(__first, __last); } + void + erase(iterator __position) + { _M_t.erase(__position); } + size_type + erase(const key_type& __x) + { return _M_t.erase(__x); } + void + erase(iterator __first, iterator __last) + { _M_t.erase(__first, __last); } + void + swap(multimap& __x) + { _M_t.swap(__x._M_t); } + void + clear() + { _M_t.clear(); } + key_compare + key_comp() const + { return _M_t.key_comp(); } + value_compare + value_comp() const + { return value_compare(_M_t.key_comp()); } + iterator + find(const key_type& __x) + { return _M_t.find(__x); } + const_iterator + find(const key_type& __x) const + { return _M_t.find(__x); } + size_type + count(const key_type& __x) const + { return _M_t.count(__x); } + iterator + lower_bound(const key_type& __x) + { return _M_t.lower_bound(__x); } + const_iterator + lower_bound(const key_type& __x) const + { return _M_t.lower_bound(__x); } + iterator + upper_bound(const key_type& __x) + { return _M_t.upper_bound(__x); } + const_iterator + upper_bound(const key_type& __x) const + { return _M_t.upper_bound(__x); } + std::pair + equal_range(const key_type& __x) + { return _M_t.equal_range(__x); } + std::pair + equal_range(const key_type& __x) const + { return _M_t.equal_range(__x); } + template + friend bool + operator==(const multimap<_K1, _T1, _C1, _A1>&, + const multimap<_K1, _T1, _C1, _A1>&); + template + friend bool + operator<(const multimap<_K1, _T1, _C1, _A1>&, + const multimap<_K1, _T1, _C1, _A1>&); + }; + template + inline bool + operator==(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return __x._M_t == __y._M_t; } + template + inline bool + operator<(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return __x._M_t < __y._M_t; } + template + inline bool + operator!=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__x == __y); } + template + inline bool + operator>(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return __y < __x; } + template + inline bool + operator<=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__y < __x); } + template + inline bool + operator>=(const multimap<_Key, _Tp, _Compare, _Alloc>& __x, + const multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { return !(__x < __y); } + template + inline void + swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x, + multimap<_Key, _Tp, _Compare, _Alloc>& __y) + { __x.swap(__y); } +} +typedef QtValidLicenseForCoreModule QtCoreModule; +struct QMapData +{ + struct Node { + Node *backward; + Node *forward[1]; + }; + enum { LastLevel = 11, Sparseness = 3 }; + QMapData *backward; + QMapData *forward[QMapData::LastLevel + 1]; + QBasicAtomicInt ref; + int topLevel; + int size; + uint randomBits; + uint insertInOrder : 1; + uint sharable : 1; + uint strictAlignment : 1; + uint reserved : 29; + static QMapData *createData(); + static QMapData *createData(int alignment); + void continueFreeData(int offset); + Node *node_create(Node *update[], int offset); + Node *node_create(Node *update[], int offset, int alignment); + void node_delete(Node *update[], int offset, Node *node); + static QMapData shared_null; +}; +template inline bool qMapLessThanKey(const Key &key1, const Key &key2) +{ + return key1 < key2; +} +template inline bool qMapLessThanKey(Ptr *key1, Ptr *key2) +{ + qt_noop(); + return quintptr(key1) < quintptr(key2); +} +template inline bool qMapLessThanKey(const Ptr *key1, const Ptr *key2) +{ + qt_noop(); + return quintptr(key1) < quintptr(key2); +} +template +struct QMapNode { + Key key; + T value; +private: + QMapData::Node *backward; + QMapData::Node *forward[1]; +}; +template +struct QMapPayloadNode +{ + Key key; + T value; +private: + QMapData::Node *backward; +}; +template +class QMap +{ + typedef QMapNode Node; + typedef QMapPayloadNode PayloadNode; + union { + QMapData *d; + QMapData::Node *e; + }; + static inline int payload() { return sizeof(PayloadNode) - sizeof(QMapData::Node *); } + static inline int alignment() { + return int(qMax(sizeof(void*), __alignof__(Node))); + } + static inline Node *concrete(QMapData::Node *node) { + return reinterpret_cast(reinterpret_cast(node) - payload()); + } +public: + inline QMap() : d(&QMapData::shared_null) { d->ref.ref(); } + inline QMap(const QMap &other) : d(other.d) + { d->ref.ref(); if (!d->sharable) detach(); } + inline ~QMap() { if (!d) return; if (!d->ref.deref()) freeData(d); } + QMap &operator=(const QMap &other); + inline void swap(QMap &other) { qSwap(d, other.d); } + explicit QMap(const typename std::map &other); + std::map toStdMap() const; + bool operator==(const QMap &other) const; + inline bool operator!=(const QMap &other) const { return !(*this == other); } + inline int size() const { return d->size; } + inline bool isEmpty() const { return d->size == 0; } + inline void detach() { if (d->ref != 1) detach_helper(); } + inline bool isDetached() const { return d->ref == 1; } + inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; } + inline bool isSharedWith(const QMap &other) const { return d == other.d; } + inline void setInsertInOrder(bool ordered) { d->insertInOrder = ordered; } + void clear(); + int remove(const Key &key); + T take(const Key &key); + bool contains(const Key &key) const; + const Key key(const T &value) const; + const Key key(const T &value, const Key &defaultKey) const; + const T value(const Key &key) const; + const T value(const Key &key, const T &defaultValue) const; + T &operator[](const Key &key); + const T operator[](const Key &key) const; + QList uniqueKeys() const; + QList keys() const; + QList keys(const T &value) const; + QList values() const; + QList values(const Key &key) const; + int count(const Key &key) const; + class const_iterator; + class iterator + { + friend class const_iterator; + QMapData::Node *i; + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef qptrdiff difference_type; + typedef T value_type; + typedef T *pointer; + typedef T &reference; + inline operator QMapData::Node *() const { return i; } + inline iterator() : i(0) { } + inline iterator(QMapData::Node *node) : i(node) { } + inline const Key &key() const { return concrete(i)->key; } + inline T &value() const { return concrete(i)->value; } + inline T &operator*() const { return concrete(i)->value; } + inline T *operator->() const { return &concrete(i)->value; } + inline bool operator==(const iterator &o) const { return i == o.i; } + inline bool operator!=(const iterator &o) const { return i != o.i; } + inline iterator &operator++() { + i = i->forward[0]; + return *this; + } + inline iterator operator++(int) { + iterator r = *this; + i = i->forward[0]; + return r; + } + inline iterator &operator--() { + i = i->backward; + return *this; + } + inline iterator operator--(int) { + iterator r = *this; + i = i->backward; + return r; + } + inline iterator operator+(int j) const + { iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; } + inline iterator operator-(int j) const { return operator+(-j); } + inline iterator &operator+=(int j) { return *this = *this + j; } + inline iterator &operator-=(int j) { return *this = *this - j; } + public: + inline bool operator==(const const_iterator &o) const + { return i == o.i; } + inline bool operator!=(const const_iterator &o) const + { return i != o.i; } + private: + inline operator bool() const { return false; } + }; + friend class iterator; + class const_iterator + { + friend class iterator; + QMapData::Node *i; + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef qptrdiff difference_type; + typedef T value_type; + typedef const T *pointer; + typedef const T &reference; + inline operator QMapData::Node *() const { return i; } + inline const_iterator() : i(0) { } + inline const_iterator(QMapData::Node *node) : i(node) { } + inline const_iterator(const iterator &o) + { i = o.i; } + inline const Key &key() const { return concrete(i)->key; } + inline const T &value() const { return concrete(i)->value; } + inline const T &operator*() const { return concrete(i)->value; } + inline const T *operator->() const { return &concrete(i)->value; } + inline bool operator==(const const_iterator &o) const { return i == o.i; } + inline bool operator!=(const const_iterator &o) const { return i != o.i; } + inline const_iterator &operator++() { + i = i->forward[0]; + return *this; + } + inline const_iterator operator++(int) { + const_iterator r = *this; + i = i->forward[0]; + return r; + } + inline const_iterator &operator--() { + i = i->backward; + return *this; + } + inline const_iterator operator--(int) { + const_iterator r = *this; + i = i->backward; + return r; + } + inline const_iterator operator+(int j) const + { const_iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; } + inline const_iterator operator-(int j) const { return operator+(-j); } + inline const_iterator &operator+=(int j) { return *this = *this + j; } + inline const_iterator &operator-=(int j) { return *this = *this - j; } + private: + inline operator bool() const { return false; } + }; + friend class const_iterator; + inline iterator begin() { detach(); return iterator(e->forward[0]); } + inline const_iterator begin() const { return const_iterator(e->forward[0]); } + inline const_iterator constBegin() const { return const_iterator(e->forward[0]); } + inline iterator end() { + detach(); + return iterator(e); + } + inline const_iterator end() const { return const_iterator(e); } + inline const_iterator constEnd() const { return const_iterator(e); } + iterator erase(iterator it); + typedef iterator Iterator; + typedef const_iterator ConstIterator; + inline int count() const { return d->size; } + iterator find(const Key &key); + const_iterator find(const Key &key) const; + const_iterator constFind(const Key &key) const; + iterator lowerBound(const Key &key); + const_iterator lowerBound(const Key &key) const; + iterator upperBound(const Key &key); + const_iterator upperBound(const Key &key) const; + iterator insert(const Key &key, const T &value); + iterator insertMulti(const Key &key, const T &value); + QMap &unite(const QMap &other); + typedef Key key_type; + typedef T mapped_type; + typedef qptrdiff difference_type; + typedef int size_type; + inline bool empty() const { return isEmpty(); } +private: + void detach_helper(); + void freeData(QMapData *d); + QMapData::Node *findNode(const Key &key) const; + QMapData::Node *mutableFindNode(QMapData::Node *update[], const Key &key) const; + QMapData::Node *node_create(QMapData *d, QMapData::Node *update[], const Key &key, + const T &value); +}; +template +inline QMap &QMap::operator=(const QMap &other) +{ + if (d != other.d) { + QMapData* o = other.d; + o->ref.ref(); + if (!d->ref.deref()) + freeData(d); + d = o; + if (!d->sharable) + detach_helper(); + } + return *this; +} +template +inline void QMap::clear() +{ + *this = QMap(); +} +template +inline typename QMapData::Node * +QMap::node_create(QMapData *adt, QMapData::Node *aupdate[], const Key &akey, const T &avalue) +{ + QMapData::Node *abstractNode = adt->node_create(aupdate, payload(), alignment()); + try { + Node *concreteNode = concrete(abstractNode); + new (&concreteNode->key) Key(akey); + try { + new (&concreteNode->value) T(avalue); + } catch (...) { + concreteNode->key.~Key(); + throw; + } + } catch (...) { + adt->node_delete(aupdate, payload(), abstractNode); + throw; + } + return abstractNode; +} +template +inline QMapData::Node *QMap::findNode(const Key &akey) const +{ + QMapData::Node *cur = e; + QMapData::Node *next = e; + for (int i = d->topLevel; i >= 0; i--) { + while ((next = cur->forward[i]) != e && qMapLessThanKey(concrete(next)->key, akey)) + cur = next; + } + if (next != e && !qMapLessThanKey(akey, concrete(next)->key)) { + return next; + } else { + return e; + } +} +template +inline const T QMap::value(const Key &akey) const +{ + QMapData::Node *node; + if (d->size == 0 || (node = findNode(akey)) == e) { + return T(); + } else { + return concrete(node)->value; + } +} +template +inline const T QMap::value(const Key &akey, const T &adefaultValue) const +{ + QMapData::Node *node; + if (d->size == 0 || (node = findNode(akey)) == e) { + return adefaultValue; + } else { + return concrete(node)->value; + } +} +template +inline const T QMap::operator[](const Key &akey) const +{ + return value(akey); +} +template +inline T &QMap::operator[](const Key &akey) +{ + detach(); + QMapData::Node *update[QMapData::LastLevel + 1]; + QMapData::Node *node = mutableFindNode(update, akey); + if (node == e) + node = node_create(d, update, akey, T()); + return concrete(node)->value; +} +template +inline int QMap::count(const Key &akey) const +{ + int cnt = 0; + QMapData::Node *node = findNode(akey); + if (node != e) { + do { + ++cnt; + node = node->forward[0]; + } while (node != e && !qMapLessThanKey(akey, concrete(node)->key)); + } + return cnt; +} +template +inline bool QMap::contains(const Key &akey) const +{ + return findNode(akey) != e; +} +template +inline typename QMap::iterator QMap::insert(const Key &akey, + const T &avalue) +{ + detach(); + QMapData::Node *update[QMapData::LastLevel + 1]; + QMapData::Node *node = mutableFindNode(update, akey); + if (node == e) { + node = node_create(d, update, akey, avalue); + } else { + concrete(node)->value = avalue; + } + return iterator(node); +} +template +inline typename QMap::iterator QMap::insertMulti(const Key &akey, + const T &avalue) +{ + detach(); + QMapData::Node *update[QMapData::LastLevel + 1]; + mutableFindNode(update, akey); + return iterator(node_create(d, update, akey, avalue)); +} +template +inline typename QMap::const_iterator QMap::find(const Key &akey) const +{ + return const_iterator(findNode(akey)); +} +template +inline typename QMap::const_iterator QMap::constFind(const Key &akey) const +{ + return const_iterator(findNode(akey)); +} +template +inline typename QMap::iterator QMap::find(const Key &akey) +{ + detach(); + return iterator(findNode(akey)); +} +template +inline QMap &QMap::unite(const QMap &other) +{ + QMap copy(other); + const_iterator it = copy.constEnd(); + const const_iterator b = copy.constBegin(); + while (it != b) { + --it; + insertMulti(it.key(), it.value()); + } + return *this; +} +template + void QMap::freeData(QMapData *x) +{ + if (QTypeInfo::isComplex || QTypeInfo::isComplex) { + QMapData *cur = x; + QMapData *next = cur->forward[0]; + while (next != x) { + cur = next; + next = cur->forward[0]; + Node *concreteNode = concrete(reinterpret_cast(cur)); + concreteNode->key.~Key(); + concreteNode->value.~T(); + } + } + x->continueFreeData(payload()); +} +template + int QMap::remove(const Key &akey) +{ + detach(); + QMapData::Node *update[QMapData::LastLevel + 1]; + QMapData::Node *cur = e; + QMapData::Node *next = e; + int oldSize = d->size; + for (int i = d->topLevel; i >= 0; i--) { + while ((next = cur->forward[i]) != e && qMapLessThanKey(concrete(next)->key, akey)) + cur = next; + update[i] = cur; + } + if (next != e && !qMapLessThanKey(akey, concrete(next)->key)) { + bool deleteNext = true; + do { + cur = next; + next = cur->forward[0]; + deleteNext = (next != e && !qMapLessThanKey(concrete(cur)->key, concrete(next)->key)); + concrete(cur)->key.~Key(); + concrete(cur)->value.~T(); + d->node_delete(update, payload(), cur); + } while (deleteNext); + } + return oldSize - d->size; +} +template + T QMap::take(const Key &akey) +{ + detach(); + QMapData::Node *update[QMapData::LastLevel + 1]; + QMapData::Node *cur = e; + QMapData::Node *next = e; + for (int i = d->topLevel; i >= 0; i--) { + while ((next = cur->forward[i]) != e && qMapLessThanKey(concrete(next)->key, akey)) + cur = next; + update[i] = cur; + } + if (next != e && !qMapLessThanKey(akey, concrete(next)->key)) { + T t = concrete(next)->value; + concrete(next)->key.~Key(); + concrete(next)->value.~T(); + d->node_delete(update, payload(), next); + return t; + } + return T(); +} +template + typename QMap::iterator QMap::erase(iterator it) +{ + QMapData::Node *update[QMapData::LastLevel + 1]; + QMapData::Node *cur = e; + QMapData::Node *next = e; + if (it == iterator(e)) + return it; + for (int i = d->topLevel; i >= 0; i--) { + while ((next = cur->forward[i]) != e && qMapLessThanKey(concrete(next)->key, it.key())) + cur = next; + update[i] = cur; + } + while (next != e) { + cur = next; + next = cur->forward[0]; + if (cur == it) { + concrete(cur)->key.~Key(); + concrete(cur)->value.~T(); + d->node_delete(update, payload(), cur); + return iterator(next); + } + for (int i = 0; i <= d->topLevel; ++i) { + if (update[i]->forward[i] != cur) + break; + update[i] = cur; + } + } + return end(); +} +template + void QMap::detach_helper() +{ + union { QMapData *d; QMapData::Node *e; } x; + x.d = QMapData::createData(alignment()); + if (d->size) { + x.d->insertInOrder = true; + QMapData::Node *update[QMapData::LastLevel + 1]; + QMapData::Node *cur = e->forward[0]; + update[0] = x.e; + while (cur != e) { + try { + Node *concreteNode = concrete(cur); + node_create(x.d, update, concreteNode->key, concreteNode->value); + } catch (...) { + freeData(x.d); + throw; + } + cur = cur->forward[0]; + } + x.d->insertInOrder = false; + } + if (!d->ref.deref()) + freeData(d); + d = x.d; +} +template + QMapData::Node *QMap::mutableFindNode(QMapData::Node *aupdate[], + const Key &akey) const +{ + QMapData::Node *cur = e; + QMapData::Node *next = e; + for (int i = d->topLevel; i >= 0; i--) { + while ((next = cur->forward[i]) != e && qMapLessThanKey(concrete(next)->key, akey)) + cur = next; + aupdate[i] = cur; + } + if (next != e && !qMapLessThanKey(akey, concrete(next)->key)) { + return next; + } else { + return e; + } +} +template + QList QMap::uniqueKeys() const +{ + QList res; + res.reserve(size()); + const_iterator i = begin(); + if (i != end()) { + for (;;) { + const Key &aKey = i.key(); + res.append(aKey); + do { + if (++i == end()) + goto break_out_of_outer_loop; + } while (!(aKey < i.key())); + } + } +break_out_of_outer_loop: + return res; +} +template + QList QMap::keys() const +{ + QList res; + res.reserve(size()); + const_iterator i = begin(); + while (i != end()) { + res.append(i.key()); + ++i; + } + return res; +} +template + QList QMap::keys(const T &avalue) const +{ + QList res; + const_iterator i = begin(); + while (i != end()) { + if (i.value() == avalue) + res.append(i.key()); + ++i; + } + return res; +} +template + const Key QMap::key(const T &avalue) const +{ + return key(avalue, Key()); +} +template + const Key QMap::key(const T &avalue, const Key &defaultKey) const +{ + const_iterator i = begin(); + while (i != end()) { + if (i.value() == avalue) + return i.key(); + ++i; + } + return defaultKey; +} +template + QList QMap::values() const +{ + QList res; + res.reserve(size()); + const_iterator i = begin(); + while (i != end()) { + res.append(i.value()); + ++i; + } + return res; +} +template + QList QMap::values(const Key &akey) const +{ + QList res; + QMapData::Node *node = findNode(akey); + if (node != e) { + do { + res.append(concrete(node)->value); + node = node->forward[0]; + } while (node != e && !qMapLessThanKey(akey, concrete(node)->key)); + } + return res; +} +template +inline typename QMap::const_iterator +QMap::lowerBound(const Key &akey) const +{ + QMapData::Node *update[QMapData::LastLevel + 1]; + mutableFindNode(update, akey); + return const_iterator(update[0]->forward[0]); +} +template +inline typename QMap::iterator QMap::lowerBound(const Key &akey) +{ + detach(); + return static_cast(const_cast(this)->lowerBound(akey)); +} +template +inline typename QMap::const_iterator +QMap::upperBound(const Key &akey) const +{ + QMapData::Node *update[QMapData::LastLevel + 1]; + mutableFindNode(update, akey); + QMapData::Node *node = update[0]->forward[0]; + while (node != e && !qMapLessThanKey(akey, concrete(node)->key)) + node = node->forward[0]; + return const_iterator(node); +} +template +inline typename QMap::iterator QMap::upperBound(const Key &akey) +{ + detach(); + return static_cast(const_cast(this)->upperBound(akey)); +} +template + bool QMap::operator==(const QMap &other) const +{ + if (size() != other.size()) + return false; + if (d == other.d) + return true; + const_iterator it1 = begin(); + const_iterator it2 = other.begin(); + while (it1 != end()) { + if (!(it1.value() == it2.value()) || qMapLessThanKey(it1.key(), it2.key()) || qMapLessThanKey(it2.key(), it1.key())) + return false; + ++it2; + ++it1; + } + return true; +} +template + QMap::QMap(const std::map &other) +{ + d = QMapData::createData(alignment()); + d->insertInOrder = true; + typename std::map::const_iterator it = other.end(); + while (it != other.begin()) { + --it; + insert((*it).first, (*it).second); + } + d->insertInOrder = false; +} +template + std::map QMap::toStdMap() const +{ + std::map map; + const_iterator it = end(); + while (it != begin()) { + --it; + map.insert(std::pair(it.key(), it.value())); + } + return map; +} +template +class QMultiMap : public QMap +{ +public: + QMultiMap() {} + QMultiMap(const QMap &other) : QMap(other) {} + inline void swap(QMultiMap &other) { QMap::swap(other); } + inline typename QMap::iterator replace(const Key &key, const T &value) + { return QMap::insert(key, value); } + inline typename QMap::iterator insert(const Key &key, const T &value) + { return QMap::insertMulti(key, value); } + inline QMultiMap &operator+=(const QMultiMap &other) + { this->unite(other); return *this; } + inline QMultiMap operator+(const QMultiMap &other) const + { QMultiMap result = *this; result += other; return result; } + using QMap::contains; + using QMap::remove; + using QMap::count; + using QMap::find; + using QMap::constFind; + bool contains(const Key &key, const T &value) const; + int remove(const Key &key, const T &value); + int count(const Key &key, const T &value) const; + typename QMap::iterator find(const Key &key, const T &value) { + typename QMap::iterator i(find(key)); + typename QMap::iterator end(this->end()); + while (i != end && !qMapLessThanKey(key, i.key())) { + if (i.value() == value) + return i; + ++i; + } + return end; + } + typename QMap::const_iterator find(const Key &key, const T &value) const { + typename QMap::const_iterator i(constFind(key)); + typename QMap::const_iterator end(QMap::constEnd()); + while (i != end && !qMapLessThanKey(key, i.key())) { + if (i.value() == value) + return i; + ++i; + } + return end; + } + typename QMap::const_iterator constFind(const Key &key, const T &value) const + { return find(key, value); } +private: + T &operator[](const Key &key); + const T operator[](const Key &key) const; +}; +template +inline bool QMultiMap::contains(const Key &key, const T &value) const +{ + return constFind(key, value) != QMap::constEnd(); +} +template +inline int QMultiMap::remove(const Key &key, const T &value) +{ + int n = 0; + typename QMap::iterator i(find(key)); + typename QMap::iterator end(QMap::end()); + while (i != end && !qMapLessThanKey(key, i.key())) { + if (i.value() == value) { + i = this->erase(i); + ++n; + } else { + ++i; + } + } + return n; +} +template +inline int QMultiMap::count(const Key &key, const T &value) const +{ + int n = 0; + typename QMap::const_iterator i(constFind(key)); + typename QMap::const_iterator end(QMap::constEnd()); + while (i != end && !qMapLessThanKey(key, i.key())) { + if (i.value() == value) + ++n; + ++i; + } + return n; +} +template class QMapIterator { typedef typename QMap::const_iterator const_iterator; typedef const_iterator Item; QMap c; const_iterator i, n; inline bool item_exists() const { return n != c.constEnd(); } public: inline QMapIterator(const QMap &container) : c(container), i(c.constBegin()), n(c.constEnd()) {} inline QMapIterator &operator=(const QMap &container) { c = container; i = c.constBegin(); n = c.constEnd(); return *this; } inline void toFront() { i = c.constBegin(); n = c.constEnd(); } inline void toBack() { i = c.constEnd(); n = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline Item next() { n = i++; return n; } inline Item peekNext() const { return i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline Item previous() { n = --i; return n; } inline Item peekPrevious() const { const_iterator p = i; return --p; } inline const T &value() const { qt_noop(); return *n; } inline const Key &key() const { qt_noop(); return n.key(); } inline bool findNext(const T &t) { while ((n = i) != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(n = --i) == t) return true; n = c.constEnd(); return false; } }; +template class QMutableMapIterator { typedef typename QMap::iterator iterator; typedef typename QMap::const_iterator const_iterator; typedef iterator Item; QMap *c; iterator i, n; inline bool item_exists() const { return const_iterator(n) != c->constEnd(); } public: inline QMutableMapIterator(QMap &container) : c(&container) { c->setSharable(false); i = c->begin(); n = c->end(); } inline ~QMutableMapIterator() { c->setSharable(true); } inline QMutableMapIterator &operator=(QMap &container) { c->setSharable(true); c = &container; c->setSharable(false); i = c->begin(); n = c->end(); return *this; } inline void toFront() { i = c->begin(); n = c->end(); } inline void toBack() { i = c->end(); n = c->end(); } inline bool hasNext() const { return const_iterator(i) != c->constEnd(); } inline Item next() { n = i++; return n; } inline Item peekNext() const { return i; } inline bool hasPrevious() const { return const_iterator(i) != c->constBegin(); } inline Item previous() { n = --i; return n; } inline Item peekPrevious() const { iterator p = i; return --p; } inline void remove() { if (const_iterator(n) != c->constEnd()) { i = c->erase(n); n = c->end(); } } inline void setValue(const T &t) { if (const_iterator(n) != c->constEnd()) *n = t; } inline T &value() { qt_noop(); return *n; } inline const T &value() const { qt_noop(); return *n; } inline const Key &key() const { qt_noop(); return n.key(); } inline bool findNext(const T &t) { while (const_iterator(n = i) != c->constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (const_iterator(i) != c->constBegin()) if (*(n = --i) == t) return true; n = c->end(); return false; } }; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QBitArray; +class QDataStream; +class QDate; +class QDateTime; +class QEasingCurve; +class QLine; +class QLineF; +class QLocale; +class QMatrix; +class QTransform; +class QStringList; +class QTime; +class QPoint; +class QPointF; +class QSize; +class QSizeF; +class QRect; +class QRectF; +class QRegExp; +class QTextFormat; +class QTextLength; +class QUrl; +class QVariant; +class QVariantComparisonHelper; +template +inline QVariant qVariantFromValue(const T &); +template +inline T qvariant_cast(const QVariant &); +class QVariant +{ + public: + enum Type { + Invalid = 0, + Bool = 1, + Int = 2, + UInt = 3, + LongLong = 4, + ULongLong = 5, + Double = 6, + Char = 7, + Map = 8, + List = 9, + String = 10, + StringList = 11, + ByteArray = 12, + BitArray = 13, + Date = 14, + Time = 15, + DateTime = 16, + Url = 17, + Locale = 18, + Rect = 19, + RectF = 20, + Size = 21, + SizeF = 22, + Line = 23, + LineF = 24, + Point = 25, + PointF = 26, + RegExp = 27, + Hash = 28, + EasingCurve = 29, + LastCoreType = EasingCurve, + Font = 64, + Pixmap = 65, + Brush = 66, + Color = 67, + Palette = 68, + Icon = 69, + Image = 70, + Polygon = 71, + Region = 72, + Bitmap = 73, + Cursor = 74, + SizePolicy = 75, + KeySequence = 76, + Pen = 77, + TextLength = 78, + TextFormat = 79, + Matrix = 80, + Transform = 81, + Matrix4x4 = 82, + Vector2D = 83, + Vector3D = 84, + Vector4D = 85, + Quaternion = 86, + LastGuiType = Quaternion, + UserType = 127, + LastType = 0xffffffff + }; + inline QVariant(); + ~QVariant(); + QVariant(Type type); + QVariant(int typeOrUserType, const void *copy); + QVariant(int typeOrUserType, const void *copy, uint flags); + QVariant(const QVariant &other); + QVariant(QDataStream &s); + QVariant(int i); + QVariant(uint ui); + QVariant(qlonglong ll); + QVariant(qulonglong ull); + QVariant(bool b); + QVariant(double d); + QVariant(float f) { d.is_null = false; d.type = QMetaType::Float; d.data.f = f; } + QVariant(const char *str); + QVariant(const QByteArray &bytearray); + QVariant(const QBitArray &bitarray); + QVariant(const QString &string); + QVariant(const QLatin1String &string); + QVariant(const QStringList &stringlist); + QVariant(const QChar &qchar); + QVariant(const QDate &date); + QVariant(const QTime &time); + QVariant(const QDateTime &datetime); + QVariant(const QList &list); + QVariant(const QMap &map); + QVariant(const QHash &hash); + QVariant(const QSize &size); + QVariant(const QSizeF &size); + QVariant(const QPoint &pt); + QVariant(const QPointF &pt); + QVariant(const QLine &line); + QVariant(const QLineF &line); + QVariant(const QRect &rect); + QVariant(const QRectF &rect); + QVariant(const QUrl &url); + QVariant(const QLocale &locale); + QVariant(const QRegExp ®Exp); + QVariant(const QEasingCurve &easing); + QVariant(Qt::GlobalColor color); + QVariant& operator=(const QVariant &other); + inline void swap(QVariant &other) { qSwap(d, other.d); } + Type type() const; + int userType() const; + const char *typeName() const; + bool canConvert(Type t) const; + bool convert(Type t); + inline bool isValid() const; + bool isNull() const; + void clear(); + void detach(); + inline bool isDetached() const; + int toInt(bool *ok = 0) const; + uint toUInt(bool *ok = 0) const; + qlonglong toLongLong(bool *ok = 0) const; + qulonglong toULongLong(bool *ok = 0) const; + bool toBool() const; + double toDouble(bool *ok = 0) const; + float toFloat(bool *ok = 0) const; + qreal toReal(bool *ok = 0) const; + QByteArray toByteArray() const; + QBitArray toBitArray() const; + QString toString() const; + QStringList toStringList() const; + QChar toChar() const; + QDate toDate() const; + QTime toTime() const; + QDateTime toDateTime() const; + QList toList() const; + QMap toMap() const; + QHash toHash() const; + QPoint toPoint() const; + QPointF toPointF() const; + QRect toRect() const; + QSize toSize() const; + QSizeF toSizeF() const; + QLine toLine() const; + QLineF toLineF() const; + QRectF toRectF() const; + QUrl toUrl() const; + QLocale toLocale() const; + QRegExp toRegExp() const; + QEasingCurve toEasingCurve() const; + void load(QDataStream &ds); + void save(QDataStream &ds) const; + static const char *typeToName(Type type); + static Type nameToType(const char *name); + void *data(); + const void *constData() const; + inline const void *data() const { return constData(); } + template + inline void setValue(const T &value); + template + inline T value() const + { return qvariant_cast(*this); } + template + static inline QVariant fromValue(const T &value) + { return qVariantFromValue(value); } + template + bool canConvert() const + { return canConvert(Type(qMetaTypeId())); } + public: + struct PrivateShared + { + inline PrivateShared(void *v) : ptr(v), ref(1) { } + void *ptr; + QAtomicInt ref; + }; + struct Private + { + inline Private(): type(Invalid), is_shared(false), is_null(true) { data.ptr = 0; } + inline Private(const Private &other) + : data(other.data), type(other.type), + is_shared(other.is_shared), is_null(other.is_null) + {} + union Data + { + char c; + int i; + uint u; + bool b; + double d; + float f; + qreal real; + qlonglong ll; + qulonglong ull; + QObject *o; + void *ptr; + PrivateShared *shared; + } data; + uint type : 30; + uint is_shared : 1; + uint is_null : 1; + }; + public: + typedef void (*f_construct)(Private *, const void *); + typedef void (*f_clear)(Private *); + typedef bool (*f_null)(const Private *); + typedef void (*f_load)(Private *, QDataStream &); + typedef void (*f_save)(const Private *, QDataStream &); + typedef bool (*f_compare)(const Private *, const Private *); + typedef bool (*f_convert)(const QVariant::Private *d, Type t, void *, bool *); + typedef bool (*f_canConvert)(const QVariant::Private *d, Type t); + typedef void (*f_debugStream)(QDebug, const QVariant &); + struct Handler { + f_construct construct; + f_clear clear; + f_null isNull; + f_load load; + f_save save; + f_compare compare; + f_convert convert; + f_canConvert canConvert; + f_debugStream debugStream; + }; + inline bool operator==(const QVariant &v) const + { return cmp(v); } + inline bool operator!=(const QVariant &v) const + { return !cmp(v); } +protected: + friend inline bool qvariant_cast_helper(const QVariant &, QVariant::Type, void *); + friend int qRegisterGuiVariant(); + friend int qUnregisterGuiVariant(); + friend inline bool operator==(const QVariant &, const QVariantComparisonHelper &); + friend QDebug operator<<(QDebug, const QVariant &); + Private d; + static const Handler *handler; + void create(int type, const void *copy); + bool cmp(const QVariant &other) const; +private: + inline QVariant(void *) { qt_noop(); } + inline QVariant(bool, int) { qt_noop(); } +public: + typedef Private DataPtr; + inline DataPtr &data_ptr() { return d; } +}; +typedef QList QVariantList; +typedef QMap QVariantMap; +typedef QHash QVariantHash; +inline bool qvariant_cast_helper(const QVariant &v, QVariant::Type tp, void *ptr) +{ return QVariant::handler->convert(&v.d, tp, ptr, 0); } +template +inline QVariant qVariantFromValue(const T &t) +{ + return QVariant(qMetaTypeId(reinterpret_cast(0)), &t, QTypeInfo::isPointer); +} +template <> +inline QVariant qVariantFromValue(const QVariant &t) { return t; } +template +inline void qVariantSetValue(QVariant &v, const T &t) +{ + const uint type = qMetaTypeId(reinterpret_cast(0)); + QVariant::Private &d = v.data_ptr(); + if (v.isDetached() && (type == d.type || (type <= uint(QVariant::Char) && d.type <= uint(QVariant::Char)))) { + d.type = type; + d.is_null = false; + T *old = reinterpret_cast(d.is_shared ? d.data.shared->ptr : &d.data.ptr); + if (QTypeInfo::isComplex) + old->~T(); + new (old) T(t); + } else { + v = QVariant(type, &t, QTypeInfo::isPointer); + } +} +template <> +inline void qVariantSetValue(QVariant &v, const QVariant &t) +{ + v = t; +} +inline QVariant::QVariant() {} +inline bool QVariant::isValid() const { return d.type != Invalid; } +template +inline void QVariant::setValue(const T &avalue) +{ qVariantSetValue(*this, avalue); } + QDataStream& operator>> (QDataStream& s, QVariant& p); + QDataStream& operator<< (QDataStream& s, const QVariant& p); + QDataStream& operator>> (QDataStream& s, QVariant::Type& p); + QDataStream& operator<< (QDataStream& s, const QVariant::Type p); +inline bool QVariant::isDetached() const +{ return !d.is_shared || d.data.shared->ref == 1; } +class QVariantComparisonHelper +{ +public: + inline QVariantComparisonHelper(const QVariant &var) + : v(&var) {} +private: + friend inline bool operator==(const QVariant &, const QVariantComparisonHelper &); + const QVariant *v; +}; +inline bool operator==(const QVariant &v1, const QVariantComparisonHelper &v2) +{ + return v1.cmp(*v2.v); +} +inline bool operator!=(const QVariant &v1, const QVariantComparisonHelper &v2) +{ + return !operator==(v1, v2); +} +template inline T qvariant_cast(const QVariant &v) +{ + const int vid = qMetaTypeId(static_cast(0)); + if (vid == v.userType()) + return *reinterpret_cast(v.constData()); + if (vid < int(QMetaType::User)) { + T t; + if (qvariant_cast_helper(v, QVariant::Type(vid), &t)) + return t; + } + return T(); +} +template<> inline QVariant qvariant_cast(const QVariant &v) +{ + if (v.userType() == QMetaType::QVariant) + return *reinterpret_cast(v.constData()); + return v; +} +template +inline T qVariantValue(const QVariant &variant) +{ return qvariant_cast(variant); } +template +inline bool qVariantCanConvert(const QVariant &variant) +{ return variant.template canConvert(); } +template <> inline bool qIsDetached(QVariant &t) { return t.isDetached(); } template <> inline void qSwap(QVariant &value1, QVariant &value2) { qSwap(value1.data_ptr(), value2.data_ptr()); } namespace std { template<> inline void swap< ::QVariant>(::QVariant &value1, ::QVariant &value2) { swap(value1.data_ptr(), value2.data_ptr()); } } +template<> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QVariant)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QVariant"; } }; + QDebug operator<<(QDebug, const QVariant &); + QDebug operator<<(QDebug, const QVariant::Type); + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QVariantList }; static inline int qt_metatype_id() { return QMetaType::QVariantList; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QVariantMap }; static inline int qt_metatype_id() { return QMetaType::QVariantMap; } }; + template<> struct QMetaTypeId2 { enum { Defined = 1, MetaType = QMetaType::QVariantHash }; static inline int qt_metatype_id() { return QMetaType::QVariantHash; } }; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QDataStream; +class QDate; +class QDateTime; +class QTime; +class QVariant; +class QTextStream; +class QTextStreamPrivate; +class QLocale; +class QSystemLocale +{ +public: + QSystemLocale(); + virtual ~QSystemLocale(); + struct CurrencyToStringArgument + { + CurrencyToStringArgument() { } + CurrencyToStringArgument(const QVariant &v, const QString &s) + : value(v), symbol(s) { } + QVariant value; + QString symbol; + }; + enum QueryType { + LanguageId, + CountryId, + DecimalPoint, + GroupSeparator, + ZeroDigit, + NegativeSign, + DateFormatLong, + DateFormatShort, + TimeFormatLong, + TimeFormatShort, + DayNameLong, + DayNameShort, + MonthNameLong, + MonthNameShort, + DateToStringLong, + DateToStringShort, + TimeToStringLong, + TimeToStringShort, + DateTimeFormatLong, + DateTimeFormatShort, + DateTimeToStringLong, + DateTimeToStringShort, + MeasurementSystem, + PositiveSign, + AMText, + PMText, + FirstDayOfWeek, + Weekdays, + CurrencySymbol, + CurrencyToString, + UILanguages, + StringToStandardQuotation, + StringToAlternateQuotation, + ScriptId, + ListToSeparatedString, + LocaleChanged, + NativeLanguageName, + NativeCountryName + }; + virtual QVariant query(QueryType type, QVariant in) const; + virtual QLocale fallbackLocale() const; +private: + QSystemLocale(bool); + friend QSystemLocale *QSystemLocale_globalSystemLocale(); +}; +struct QLocalePrivate; +class QLocale +{ + public: static const QMetaObject staticMetaObject; private: + friend class QString; + friend class QByteArray; + friend class QIntValidator; + friend class QDoubleValidatorPrivate; + friend class QTextStream; + friend class QTextStreamPrivate; +public: + enum Language { + AnyLanguage = 0, + C = 1, + Abkhazian = 2, + Afan = 3, + Afar = 4, + Afrikaans = 5, + Albanian = 6, + Amharic = 7, + Arabic = 8, + Armenian = 9, + Assamese = 10, + Aymara = 11, + Azerbaijani = 12, + Bashkir = 13, + Basque = 14, + Bengali = 15, + Bhutani = 16, + Bihari = 17, + Bislama = 18, + Breton = 19, + Bulgarian = 20, + Burmese = 21, + Byelorussian = 22, + Cambodian = 23, + Catalan = 24, + Chinese = 25, + Corsican = 26, + Croatian = 27, + Czech = 28, + Danish = 29, + Dutch = 30, + English = 31, + Esperanto = 32, + Estonian = 33, + Faroese = 34, + FijiLanguage = 35, + Finnish = 36, + French = 37, + Frisian = 38, + Gaelic = 39, + Galician = 40, + Georgian = 41, + German = 42, + Greek = 43, + Greenlandic = 44, + Guarani = 45, + Gujarati = 46, + Hausa = 47, + Hebrew = 48, + Hindi = 49, + Hungarian = 50, + Icelandic = 51, + Indonesian = 52, + Interlingua = 53, + Interlingue = 54, + Inuktitut = 55, + Inupiak = 56, + Irish = 57, + Italian = 58, + Japanese = 59, + Javanese = 60, + Kannada = 61, + Kashmiri = 62, + Kazakh = 63, + Kinyarwanda = 64, + Kirghiz = 65, + Korean = 66, + Kurdish = 67, + Rundi = 68, + Laothian = 69, + Latin = 70, + Latvian = 71, + Lingala = 72, + Lithuanian = 73, + Macedonian = 74, + Malagasy = 75, + Malay = 76, + Malayalam = 77, + Maltese = 78, + Maori = 79, + Marathi = 80, + Moldavian = 81, + Mongolian = 82, + NauruLanguage = 83, + Nepali = 84, + Norwegian = 85, + Occitan = 86, + Oriya = 87, + Pashto = 88, + Persian = 89, + Polish = 90, + Portuguese = 91, + Punjabi = 92, + Quechua = 93, + RhaetoRomance = 94, + Romanian = 95, + Russian = 96, + Samoan = 97, + Sangho = 98, + Sanskrit = 99, + Serbian = 100, + SerboCroatian = 101, + Sesotho = 102, + Setswana = 103, + Shona = 104, + Sindhi = 105, + Singhalese = 106, + Siswati = 107, + Slovak = 108, + Slovenian = 109, + Somali = 110, + Spanish = 111, + Sundanese = 112, + Swahili = 113, + Swedish = 114, + Tagalog = 115, + Tajik = 116, + Tamil = 117, + Tatar = 118, + Telugu = 119, + Thai = 120, + Tibetan = 121, + Tigrinya = 122, + TongaLanguage = 123, + Tsonga = 124, + Turkish = 125, + Turkmen = 126, + Twi = 127, + Uigur = 128, + Ukrainian = 129, + Urdu = 130, + Uzbek = 131, + Vietnamese = 132, + Volapuk = 133, + Welsh = 134, + Wolof = 135, + Xhosa = 136, + Yiddish = 137, + Yoruba = 138, + Zhuang = 139, + Zulu = 140, + Nynorsk = 141, + Bosnian = 142, + Divehi = 143, + Manx = 144, + Cornish = 145, + Akan = 146, + Konkani = 147, + Ga = 148, + Igbo = 149, + Kamba = 150, + Syriac = 151, + Blin = 152, + Geez = 153, + Koro = 154, + Sidamo = 155, + Atsam = 156, + Tigre = 157, + Jju = 158, + Friulian = 159, + Venda = 160, + Ewe = 161, + Walamo = 162, + Hawaiian = 163, + Tyap = 164, + Chewa = 165, + Filipino = 166, + SwissGerman = 167, + SichuanYi = 168, + Kpelle = 169, + LowGerman = 170, + SouthNdebele = 171, + NorthernSotho = 172, + NorthernSami = 173, + Taroko = 174, + Gusii = 175, + Taita = 176, + Fulah = 177, + Kikuyu = 178, + Samburu = 179, + Sena = 180, + NorthNdebele = 181, + Rombo = 182, + Tachelhit = 183, + Kabyle = 184, + Nyankole = 185, + Bena = 186, + Vunjo = 187, + Bambara = 188, + Embu = 189, + Cherokee = 190, + Morisyen = 191, + Makonde = 192, + Langi = 193, + Ganda = 194, + Bemba = 195, + Kabuverdianu = 196, + Meru = 197, + Kalenjin = 198, + Nama = 199, + Machame = 200, + Colognian = 201, + Masai = 202, + Soga = 203, + Luyia = 204, + Asu = 205, + Teso = 206, + Saho = 207, + KoyraChiini = 208, + Rwa = 209, + Luo = 210, + Chiga = 211, + CentralMoroccoTamazight = 212, + KoyraboroSenni = 213, + Shambala = 214, + Bodo = 215, + Aghem = 216, + Basaa = 217, + Zarma = 218, + Duala = 219, + JolaFonyi = 220, + Ewondo = 221, + Bafia = 222, + LubaKatanga = 223, + MakhuwaMeetto = 224, + Mundang = 225, + Kwasio = 226, + Nuer = 227, + Sakha = 228, + Sangu = 229, + CongoSwahili = 230, + Tasawaq = 231, + Vai = 232, + Walser = 233, + Yangben = 234, + NorwegianBokmal = Norwegian, + NorwegianNynorsk = Nynorsk, + Kurundi = Rundi, + LastLanguage = Yangben + }; + enum Script { + AnyScript = 0, + ArabicScript = 1, + CyrillicScript = 2, + DeseretScript = 3, + GurmukhiScript = 4, + SimplifiedHanScript = 5, + TraditionalHanScript = 6, + LatinScript = 7, + MongolianScript = 8, + TifinaghScript = 9, + SimplifiedChineseScript = SimplifiedHanScript, + TraditionalChineseScript = TraditionalHanScript, + LastScript = TifinaghScript + }; + enum Country { + AnyCountry = 0, + Afghanistan = 1, + Albania = 2, + Algeria = 3, + AmericanSamoa = 4, + Andorra = 5, + Angola = 6, + Anguilla = 7, + Antarctica = 8, + AntiguaAndBarbuda = 9, + Argentina = 10, + Armenia = 11, + Aruba = 12, + Australia = 13, + Austria = 14, + Azerbaijan = 15, + Bahamas = 16, + Bahrain = 17, + Bangladesh = 18, + Barbados = 19, + Belarus = 20, + Belgium = 21, + Belize = 22, + Benin = 23, + Bermuda = 24, + Bhutan = 25, + Bolivia = 26, + BosniaAndHerzegowina = 27, + Botswana = 28, + BouvetIsland = 29, + Brazil = 30, + BritishIndianOceanTerritory = 31, + BruneiDarussalam = 32, + Bulgaria = 33, + BurkinaFaso = 34, + Burundi = 35, + Cambodia = 36, + Cameroon = 37, + Canada = 38, + CapeVerde = 39, + CaymanIslands = 40, + CentralAfricanRepublic = 41, + Chad = 42, + Chile = 43, + China = 44, + ChristmasIsland = 45, + CocosIslands = 46, + Colombia = 47, + Comoros = 48, + DemocraticRepublicOfCongo = 49, + PeoplesRepublicOfCongo = 50, + CookIslands = 51, + CostaRica = 52, + IvoryCoast = 53, + Croatia = 54, + Cuba = 55, + Cyprus = 56, + CzechRepublic = 57, + Denmark = 58, + Djibouti = 59, + Dominica = 60, + DominicanRepublic = 61, + EastTimor = 62, + Ecuador = 63, + Egypt = 64, + ElSalvador = 65, + EquatorialGuinea = 66, + Eritrea = 67, + Estonia = 68, + Ethiopia = 69, + FalklandIslands = 70, + FaroeIslands = 71, + FijiCountry = 72, + Finland = 73, + France = 74, + MetropolitanFrance = 75, + FrenchGuiana = 76, + FrenchPolynesia = 77, + FrenchSouthernTerritories = 78, + Gabon = 79, + Gambia = 80, + Georgia = 81, + Germany = 82, + Ghana = 83, + Gibraltar = 84, + Greece = 85, + Greenland = 86, + Grenada = 87, + Guadeloupe = 88, + Guam = 89, + Guatemala = 90, + Guinea = 91, + GuineaBissau = 92, + Guyana = 93, + Haiti = 94, + HeardAndMcDonaldIslands = 95, + Honduras = 96, + HongKong = 97, + Hungary = 98, + Iceland = 99, + India = 100, + Indonesia = 101, + Iran = 102, + Iraq = 103, + Ireland = 104, + Israel = 105, + Italy = 106, + Jamaica = 107, + Japan = 108, + Jordan = 109, + Kazakhstan = 110, + Kenya = 111, + Kiribati = 112, + DemocraticRepublicOfKorea = 113, + RepublicOfKorea = 114, + Kuwait = 115, + Kyrgyzstan = 116, + Lao = 117, + Latvia = 118, + Lebanon = 119, + Lesotho = 120, + Liberia = 121, + LibyanArabJamahiriya = 122, + Liechtenstein = 123, + Lithuania = 124, + Luxembourg = 125, + Macau = 126, + Macedonia = 127, + Madagascar = 128, + Malawi = 129, + Malaysia = 130, + Maldives = 131, + Mali = 132, + Malta = 133, + MarshallIslands = 134, + Martinique = 135, + Mauritania = 136, + Mauritius = 137, + Mayotte = 138, + Mexico = 139, + Micronesia = 140, + Moldova = 141, + Monaco = 142, + Mongolia = 143, + Montserrat = 144, + Morocco = 145, + Mozambique = 146, + Myanmar = 147, + Namibia = 148, + NauruCountry = 149, + Nepal = 150, + Netherlands = 151, + NetherlandsAntilles = 152, + NewCaledonia = 153, + NewZealand = 154, + Nicaragua = 155, + Niger = 156, + Nigeria = 157, + Niue = 158, + NorfolkIsland = 159, + NorthernMarianaIslands = 160, + Norway = 161, + Oman = 162, + Pakistan = 163, + Palau = 164, + PalestinianTerritory = 165, + Panama = 166, + PapuaNewGuinea = 167, + Paraguay = 168, + Peru = 169, + Philippines = 170, + Pitcairn = 171, + Poland = 172, + Portugal = 173, + PuertoRico = 174, + Qatar = 175, + Reunion = 176, + Romania = 177, + RussianFederation = 178, + Rwanda = 179, + SaintKittsAndNevis = 180, + StLucia = 181, + StVincentAndTheGrenadines = 182, + Samoa = 183, + SanMarino = 184, + SaoTomeAndPrincipe = 185, + SaudiArabia = 186, + Senegal = 187, + Seychelles = 188, + SierraLeone = 189, + Singapore = 190, + Slovakia = 191, + Slovenia = 192, + SolomonIslands = 193, + Somalia = 194, + SouthAfrica = 195, + SouthGeorgiaAndTheSouthSandwichIslands = 196, + Spain = 197, + SriLanka = 198, + StHelena = 199, + StPierreAndMiquelon = 200, + Sudan = 201, + Suriname = 202, + SvalbardAndJanMayenIslands = 203, + Swaziland = 204, + Sweden = 205, + Switzerland = 206, + SyrianArabRepublic = 207, + Taiwan = 208, + Tajikistan = 209, + Tanzania = 210, + Thailand = 211, + Togo = 212, + Tokelau = 213, + TongaCountry = 214, + TrinidadAndTobago = 215, + Tunisia = 216, + Turkey = 217, + Turkmenistan = 218, + TurksAndCaicosIslands = 219, + Tuvalu = 220, + Uganda = 221, + Ukraine = 222, + UnitedArabEmirates = 223, + UnitedKingdom = 224, + UnitedStates = 225, + UnitedStatesMinorOutlyingIslands = 226, + Uruguay = 227, + Uzbekistan = 228, + Vanuatu = 229, + VaticanCityState = 230, + Venezuela = 231, + VietNam = 232, + BritishVirginIslands = 233, + USVirginIslands = 234, + WallisAndFutunaIslands = 235, + WesternSahara = 236, + Yemen = 237, + Yugoslavia = 238, + Zambia = 239, + Zimbabwe = 240, + SerbiaAndMontenegro = 241, + Montenegro = 242, + Serbia = 243, + SaintBarthelemy = 244, + SaintMartin = 245, + LatinAmericaAndTheCaribbean = 246, + LastCountry = LatinAmericaAndTheCaribbean + }; + enum MeasurementSystem { MetricSystem, ImperialSystem }; + enum FormatType { LongFormat, ShortFormat, NarrowFormat }; + enum NumberOption { + OmitGroupSeparator = 0x01, + RejectGroupSeparator = 0x02 + }; + typedef QFlags NumberOptions; + enum CurrencySymbolFormat { + CurrencyIsoCode, + CurrencySymbol, + CurrencyDisplayName + }; + QLocale(); + QLocale(const QString &name); + QLocale(Language language, Country country = AnyCountry); + QLocale(Language language, Script script, Country country); + QLocale(const QLocale &other); + QLocale &operator=(const QLocale &other); + Language language() const; + Script script() const; + Country country() const; + QString name() const; + QString bcp47Name() const; + QString nativeLanguageName() const; + QString nativeCountryName() const; + short toShort(const QString &s, bool *ok = 0, int base = 0) const; + ushort toUShort(const QString &s, bool *ok = 0, int base = 0) const; + int toInt(const QString &s, bool *ok = 0, int base = 0) const; + uint toUInt(const QString &s, bool *ok = 0, int base = 0) const; + qlonglong toLongLong(const QString &s, bool *ok = 0, int base = 0) const; + qlonglong toULongLong(const QString &s, bool *ok = 0, int base = 0) const; + float toFloat(const QString &s, bool *ok = 0) const; + double toDouble(const QString &s, bool *ok = 0) const; + QString toString(qlonglong i) const; + QString toString(qulonglong i) const; + inline QString toString(short i) const; + inline QString toString(ushort i) const; + inline QString toString(int i) const; + inline QString toString(uint i) const; + QString toString(double i, char f = 'g', int prec = 6) const; + inline QString toString(float i, char f = 'g', int prec = 6) const; + QString toString(const QDate &date, const QString &formatStr) const; + QString toString(const QDate &date, FormatType format = LongFormat) const; + QString toString(const QTime &time, const QString &formatStr) const; + QString toString(const QTime &time, FormatType format = LongFormat) const; + QString toString(const QDateTime &dateTime, FormatType format = LongFormat) const; + QString toString(const QDateTime &dateTime, const QString &format) const; + QString dateFormat(FormatType format = LongFormat) const; + QString timeFormat(FormatType format = LongFormat) const; + QString dateTimeFormat(FormatType format = LongFormat) const; + QDate toDate(const QString &string, FormatType = LongFormat) const; + QTime toTime(const QString &string, FormatType = LongFormat) const; + QDateTime toDateTime(const QString &string, FormatType format = LongFormat) const; + QDate toDate(const QString &string, const QString &format) const; + QTime toTime(const QString &string, const QString &format) const; + QDateTime toDateTime(const QString &string, const QString &format) const; + QChar decimalPoint() const; + QChar groupSeparator() const; + QChar percent() const; + QChar zeroDigit() const; + QChar negativeSign() const; + QChar positiveSign() const; + QChar exponential() const; + QString monthName(int, FormatType format = LongFormat) const; + QString standaloneMonthName(int, FormatType format = LongFormat) const; + QString dayName(int, FormatType format = LongFormat) const; + QString standaloneDayName(int, FormatType format = LongFormat) const; + Qt::DayOfWeek firstDayOfWeek() const; + QList weekdays() const; + QString amText() const; + QString pmText() const; + MeasurementSystem measurementSystem() const; + Qt::LayoutDirection textDirection() const; + QString toUpper(const QString &str) const; + QString toLower(const QString &str) const; + QString currencySymbol(CurrencySymbolFormat = CurrencySymbol) const; + QString toCurrencyString(qlonglong, const QString &symbol = QString()) const; + QString toCurrencyString(qulonglong, const QString &symbol = QString()) const; + inline QString toCurrencyString(short, const QString &symbol = QString()) const; + inline QString toCurrencyString(ushort, const QString &symbol = QString()) const; + inline QString toCurrencyString(int, const QString &symbol = QString()) const; + inline QString toCurrencyString(uint, const QString &symbol = QString()) const; + QString toCurrencyString(double, const QString &symbol = QString()) const; + inline QString toCurrencyString(float, const QString &symbol = QString()) const; + QStringList uiLanguages() const; + inline bool operator==(const QLocale &other) const; + inline bool operator!=(const QLocale &other) const; + static QString languageToString(Language language); + static QString countryToString(Country country); + static QString scriptToString(Script script); + static void setDefault(const QLocale &locale); + static QLocale c() { return QLocale(C); } + static QLocale system(); + static QList matchingLocales(QLocale::Language language, QLocale::Script script, QLocale::Country country); + static QList countriesForLanguage(Language lang); + void setNumberOptions(NumberOptions options); + NumberOptions numberOptions() const; + enum QuotationStyle { StandardQuotation, AlternateQuotation }; + QString quoteString(const QString &str, QuotationStyle style = StandardQuotation) const; + QString quoteString(const QStringRef &str, QuotationStyle style = StandardQuotation) const; + QString createSeparatedList(const QStringList &strl) const; + struct Data { + quint16 index; + quint16 numberOptions; + } + __attribute__ ((__packed__)) + ; +private: + friend struct QLocalePrivate; + union { + void *v; + Data p; + }; + const QLocalePrivate *d() const; +}; +template<> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QLocale)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QLocale"; } }; + inline QFlags operator|(QLocale::NumberOptions::enum_type f1, QLocale::NumberOptions::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(QLocale::NumberOptions::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QLocale::NumberOptions::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +inline QString QLocale::toString(short i) const + { return toString(qlonglong(i)); } +inline QString QLocale::toString(ushort i) const + { return toString(qulonglong(i)); } +inline QString QLocale::toString(int i) const + { return toString(qlonglong(i)); } +inline QString QLocale::toString(uint i) const + { return toString(qulonglong(i)); } +inline QString QLocale::toString(float i, char f, int prec) const + { return toString(double(i), f, prec); } +inline bool QLocale::operator==(const QLocale &other) const + { return d() == other.d() && numberOptions() == other.numberOptions(); } +inline bool QLocale::operator!=(const QLocale &other) const + { return d() != other.d() || numberOptions() != other.numberOptions(); } +inline QString QLocale::toCurrencyString(short i, const QString &symbol) const + { return toCurrencyString(qlonglong(i), symbol); } +inline QString QLocale::toCurrencyString(ushort i, const QString &symbol) const + { return toCurrencyString(qulonglong(i), symbol); } +inline QString QLocale::toCurrencyString(int i, const QString &symbol) const +{ return toCurrencyString(qlonglong(i), symbol); } +inline QString QLocale::toCurrencyString(uint i, const QString &symbol) const +{ return toCurrencyString(qulonglong(i), symbol); } +inline QString QLocale::toCurrencyString(float i, const QString &symbol) const +{ return toCurrencyString(double(i), symbol); } + QDataStream &operator<<(QDataStream &, const QLocale &); + QDataStream &operator>>(QDataStream &, QLocale &); + template <> struct QMetaTypeId< QSystemLocale::CurrencyToStringArgument > { enum { Defined = 1 }; static int qt_metatype_id() { static QBasicAtomicInt metatype_id = { (0) }; if (!metatype_id) metatype_id = qRegisterMetaType< QSystemLocale::CurrencyToStringArgument >("QSystemLocale::CurrencyToStringArgument", reinterpret_cast< QSystemLocale::CurrencyToStringArgument *>(quintptr(-1))); return metatype_id; } }; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QMargins +{ +public: + QMargins(); + QMargins(int left, int top, int right, int bottom); + bool isNull() const; + int left() const; + int top() const; + int right() const; + int bottom() const; + void setLeft(int left); + void setTop(int top); + void setRight(int right); + void setBottom(int bottom); +private: + int m_left; + int m_top; + int m_right; + int m_bottom; + friend inline bool operator==(const QMargins &, const QMargins &); + friend inline bool operator!=(const QMargins &, const QMargins &); +}; +template<> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QMargins)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QMargins"; } }; +inline QMargins::QMargins() +{ m_top = m_bottom = m_left = m_right = 0; } +inline QMargins::QMargins(int aleft, int atop, int aright, int abottom) + : m_left(aleft), m_top(atop), m_right(aright), m_bottom(abottom) {} +inline bool QMargins::isNull() const +{ return m_left==0 && m_top==0 && m_right==0 && m_bottom==0; } +inline int QMargins::left() const +{ return m_left; } +inline int QMargins::top() const +{ return m_top; } +inline int QMargins::right() const +{ return m_right; } +inline int QMargins::bottom() const +{ return m_bottom; } +inline void QMargins::setLeft(int aleft) +{ m_left = aleft; } +inline void QMargins::setTop(int atop) +{ m_top = atop; } +inline void QMargins::setRight(int aright) +{ m_right = aright; } +inline void QMargins::setBottom(int abottom) +{ m_bottom = abottom; } +inline bool operator==(const QMargins &m1, const QMargins &m2) +{ + return + m1.m_left == m2.m_left && + m1.m_top == m2.m_top && + m1.m_right == m2.m_right && + m1.m_bottom == m2.m_bottom; +} +inline bool operator!=(const QMargins &m1, const QMargins &m2) +{ + return + m1.m_left != m2.m_left || + m1.m_top != m2.m_top || + m1.m_right != m2.m_right || + m1.m_bottom != m2.m_bottom; +} + QDebug operator<<(QDebug, const QMargins &); +typedef QtValidLicenseForCoreModule QtCoreModule; +template +class QQueue : public QList +{ +public: + inline QQueue() {} + inline ~QQueue() {} + inline void swap(QQueue &other) { QList::swap(other); } + inline void enqueue(const T &t) { QList::append(t); } + inline T dequeue() { return QList::takeFirst(); } + inline T &head() { return QList::first(); } + inline const T &head() const { return QList::first(); } +}; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QSize +{ +public: + QSize(); + QSize(int w, int h); + bool isNull() const; + bool isEmpty() const; + bool isValid() const; + int width() const; + int height() const; + void setWidth(int w); + void setHeight(int h); + void transpose(); + void scale(int w, int h, Qt::AspectRatioMode mode); + void scale(const QSize &s, Qt::AspectRatioMode mode); + QSize expandedTo(const QSize &) const; + QSize boundedTo(const QSize &) const; + int &rwidth(); + int &rheight(); + QSize &operator+=(const QSize &); + QSize &operator-=(const QSize &); + QSize &operator*=(qreal c); + QSize &operator/=(qreal c); + friend inline bool operator==(const QSize &, const QSize &); + friend inline bool operator!=(const QSize &, const QSize &); + friend inline const QSize operator+(const QSize &, const QSize &); + friend inline const QSize operator-(const QSize &, const QSize &); + friend inline const QSize operator*(const QSize &, qreal); + friend inline const QSize operator*(qreal, const QSize &); + friend inline const QSize operator/(const QSize &, qreal); +private: + int wd; + int ht; +}; +template<> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QSize)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QSize"; } }; + QDataStream &operator<<(QDataStream &, const QSize &); + QDataStream &operator>>(QDataStream &, QSize &); +inline QSize::QSize() +{ wd = ht = -1; } +inline QSize::QSize(int w, int h) +{ wd = w; ht = h; } +inline bool QSize::isNull() const +{ return wd==0 && ht==0; } +inline bool QSize::isEmpty() const +{ return wd<1 || ht<1; } +inline bool QSize::isValid() const +{ return wd>=0 && ht>=0; } +inline int QSize::width() const +{ return wd; } +inline int QSize::height() const +{ return ht; } +inline void QSize::setWidth(int w) +{ wd = w; } +inline void QSize::setHeight(int h) +{ ht = h; } +inline void QSize::scale(int w, int h, Qt::AspectRatioMode mode) +{ scale(QSize(w, h), mode); } +inline int &QSize::rwidth() +{ return wd; } +inline int &QSize::rheight() +{ return ht; } +inline QSize &QSize::operator+=(const QSize &s) +{ wd+=s.wd; ht+=s.ht; return *this; } +inline QSize &QSize::operator-=(const QSize &s) +{ wd-=s.wd; ht-=s.ht; return *this; } +inline QSize &QSize::operator*=(qreal c) +{ wd = qRound(wd*c); ht = qRound(ht*c); return *this; } +inline bool operator==(const QSize &s1, const QSize &s2) +{ return s1.wd == s2.wd && s1.ht == s2.ht; } +inline bool operator!=(const QSize &s1, const QSize &s2) +{ return s1.wd != s2.wd || s1.ht != s2.ht; } +inline const QSize operator+(const QSize & s1, const QSize & s2) +{ return QSize(s1.wd+s2.wd, s1.ht+s2.ht); } +inline const QSize operator-(const QSize &s1, const QSize &s2) +{ return QSize(s1.wd-s2.wd, s1.ht-s2.ht); } +inline const QSize operator*(const QSize &s, qreal c) +{ return QSize(qRound(s.wd*c), qRound(s.ht*c)); } +inline const QSize operator*(qreal c, const QSize &s) +{ return QSize(qRound(s.wd*c), qRound(s.ht*c)); } +inline QSize &QSize::operator/=(qreal c) +{ + qt_noop(); + wd = qRound(wd/c); ht = qRound(ht/c); + return *this; +} +inline const QSize operator/(const QSize &s, qreal c) +{ + qt_noop(); + return QSize(qRound(s.wd/c), qRound(s.ht/c)); +} +inline QSize QSize::expandedTo(const QSize & otherSize) const +{ + return QSize(qMax(wd,otherSize.wd), qMax(ht,otherSize.ht)); +} +inline QSize QSize::boundedTo(const QSize & otherSize) const +{ + return QSize(qMin(wd,otherSize.wd), qMin(ht,otherSize.ht)); +} + QDebug operator<<(QDebug, const QSize &); +class QSizeF +{ +public: + QSizeF(); + QSizeF(const QSize &sz); + QSizeF(qreal w, qreal h); + bool isNull() const; + bool isEmpty() const; + bool isValid() const; + qreal width() const; + qreal height() const; + void setWidth(qreal w); + void setHeight(qreal h); + void transpose(); + void scale(qreal w, qreal h, Qt::AspectRatioMode mode); + void scale(const QSizeF &s, Qt::AspectRatioMode mode); + QSizeF expandedTo(const QSizeF &) const; + QSizeF boundedTo(const QSizeF &) const; + qreal &rwidth(); + qreal &rheight(); + QSizeF &operator+=(const QSizeF &); + QSizeF &operator-=(const QSizeF &); + QSizeF &operator*=(qreal c); + QSizeF &operator/=(qreal c); + friend inline bool operator==(const QSizeF &, const QSizeF &); + friend inline bool operator!=(const QSizeF &, const QSizeF &); + friend inline const QSizeF operator+(const QSizeF &, const QSizeF &); + friend inline const QSizeF operator-(const QSizeF &, const QSizeF &); + friend inline const QSizeF operator*(const QSizeF &, qreal); + friend inline const QSizeF operator*(qreal, const QSizeF &); + friend inline const QSizeF operator/(const QSizeF &, qreal); + inline QSize toSize() const; +private: + qreal wd; + qreal ht; +}; +template<> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QSizeF)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QSizeF"; } }; + QDataStream &operator<<(QDataStream &, const QSizeF &); + QDataStream &operator>>(QDataStream &, QSizeF &); +inline QSizeF::QSizeF() +{ wd = ht = -1.; } +inline QSizeF::QSizeF(const QSize &sz) + : wd(sz.width()), ht(sz.height()) +{ +} +inline QSizeF::QSizeF(qreal w, qreal h) +{ wd = w; ht = h; } +inline bool QSizeF::isNull() const +{ return qIsNull(wd) && qIsNull(ht); } +inline bool QSizeF::isEmpty() const +{ return wd <= 0. || ht <= 0.; } +inline bool QSizeF::isValid() const +{ return wd >= 0. && ht >= 0.; } +inline qreal QSizeF::width() const +{ return wd; } +inline qreal QSizeF::height() const +{ return ht; } +inline void QSizeF::setWidth(qreal w) +{ wd = w; } +inline void QSizeF::setHeight(qreal h) +{ ht = h; } +inline void QSizeF::scale(qreal w, qreal h, Qt::AspectRatioMode mode) +{ scale(QSizeF(w, h), mode); } +inline qreal &QSizeF::rwidth() +{ return wd; } +inline qreal &QSizeF::rheight() +{ return ht; } +inline QSizeF &QSizeF::operator+=(const QSizeF &s) +{ wd += s.wd; ht += s.ht; return *this; } +inline QSizeF &QSizeF::operator-=(const QSizeF &s) +{ wd -= s.wd; ht -= s.ht; return *this; } +inline QSizeF &QSizeF::operator*=(qreal c) +{ wd *= c; ht *= c; return *this; } +inline bool operator==(const QSizeF &s1, const QSizeF &s2) +{ return qFuzzyCompare(s1.wd, s2.wd) && qFuzzyCompare(s1.ht, s2.ht); } +inline bool operator!=(const QSizeF &s1, const QSizeF &s2) +{ return !qFuzzyCompare(s1.wd, s2.wd) || !qFuzzyCompare(s1.ht, s2.ht); } +inline const QSizeF operator+(const QSizeF & s1, const QSizeF & s2) +{ return QSizeF(s1.wd+s2.wd, s1.ht+s2.ht); } +inline const QSizeF operator-(const QSizeF &s1, const QSizeF &s2) +{ return QSizeF(s1.wd-s2.wd, s1.ht-s2.ht); } +inline const QSizeF operator*(const QSizeF &s, qreal c) +{ return QSizeF(s.wd*c, s.ht*c); } +inline const QSizeF operator*(qreal c, const QSizeF &s) +{ return QSizeF(s.wd*c, s.ht*c); } +inline QSizeF &QSizeF::operator/=(qreal c) +{ + qt_noop(); + wd = wd/c; ht = ht/c; + return *this; +} +inline const QSizeF operator/(const QSizeF &s, qreal c) +{ + qt_noop(); + return QSizeF(s.wd/c, s.ht/c); +} +inline QSizeF QSizeF::expandedTo(const QSizeF & otherSize) const +{ + return QSizeF(qMax(wd,otherSize.wd), qMax(ht,otherSize.ht)); +} +inline QSizeF QSizeF::boundedTo(const QSizeF & otherSize) const +{ + return QSizeF(qMin(wd,otherSize.wd), qMin(ht,otherSize.ht)); +} +inline QSize QSizeF::toSize() const +{ + return QSize(qRound(wd), qRound(ht)); +} + QDebug operator<<(QDebug, const QSizeF &); +typedef QtValidLicenseForCoreModule QtCoreModule; +class QRect +{ +public: + QRect() { x1 = y1 = 0; x2 = y2 = -1; } + QRect(const QPoint &topleft, const QPoint &bottomright); + QRect(const QPoint &topleft, const QSize &size); + QRect(int left, int top, int width, int height); + bool isNull() const; + bool isEmpty() const; + bool isValid() const; + int left() const; + int top() const; + int right() const; + int bottom() const; + QRect normalized() const; + int x() const; + int y() const; + void setLeft(int pos); + void setTop(int pos); + void setRight(int pos); + void setBottom(int pos); + void setX(int x); + void setY(int y); + void setTopLeft(const QPoint &p); + void setBottomRight(const QPoint &p); + void setTopRight(const QPoint &p); + void setBottomLeft(const QPoint &p); + QPoint topLeft() const; + QPoint bottomRight() const; + QPoint topRight() const; + QPoint bottomLeft() const; + QPoint center() const; + void moveLeft(int pos); + void moveTop(int pos); + void moveRight(int pos); + void moveBottom(int pos); + void moveTopLeft(const QPoint &p); + void moveBottomRight(const QPoint &p); + void moveTopRight(const QPoint &p); + void moveBottomLeft(const QPoint &p); + void moveCenter(const QPoint &p); + inline void translate(int dx, int dy); + inline void translate(const QPoint &p); + inline QRect translated(int dx, int dy) const; + inline QRect translated(const QPoint &p) const; + void moveTo(int x, int t); + void moveTo(const QPoint &p); + void setRect(int x, int y, int w, int h); + inline void getRect(int *x, int *y, int *w, int *h) const; + void setCoords(int x1, int y1, int x2, int y2); + inline void getCoords(int *x1, int *y1, int *x2, int *y2) const; + inline void adjust(int x1, int y1, int x2, int y2); + inline QRect adjusted(int x1, int y1, int x2, int y2) const; + QSize size() const; + int width() const; + int height() const; + void setWidth(int w); + void setHeight(int h); + void setSize(const QSize &s); + QRect operator|(const QRect &r) const; + QRect operator&(const QRect &r) const; + QRect& operator|=(const QRect &r); + QRect& operator&=(const QRect &r); + bool contains(const QPoint &p, bool proper=false) const; + bool contains(int x, int y) const; + bool contains(int x, int y, bool proper) const; + bool contains(const QRect &r, bool proper = false) const; + QRect unite(const QRect &r) const; + QRect united(const QRect &other) const; + QRect intersect(const QRect &r) const; + QRect intersected(const QRect &other) const; + bool intersects(const QRect &r) const; + friend inline bool operator==(const QRect &, const QRect &); + friend inline bool operator!=(const QRect &, const QRect &); +private: + friend void qt_setCoords(QRect *r, int xp1, int yp1, int xp2, int yp2); + int x1; + int y1; + int x2; + int y2; +}; +template<> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QRect)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QRect"; } }; + inline bool operator==(const QRect &, const QRect &); + inline bool operator!=(const QRect &, const QRect &); + QDataStream &operator<<(QDataStream &, const QRect &); + QDataStream &operator>>(QDataStream &, QRect &); +inline QRect::QRect(int aleft, int atop, int awidth, int aheight) +{ + x1 = aleft; + y1 = atop; + x2 = (aleft + awidth - 1); + y2 = (atop + aheight - 1); +} +inline QRect::QRect(const QPoint &atopLeft, const QPoint &abottomRight) +{ + x1 = atopLeft.x(); + y1 = atopLeft.y(); + x2 = abottomRight.x(); + y2 = abottomRight.y(); +} +inline QRect::QRect(const QPoint &atopLeft, const QSize &asize) +{ + x1 = atopLeft.x(); + y1 = atopLeft.y(); + x2 = (x1+asize.width() - 1); + y2 = (y1+asize.height() - 1); +} +inline bool QRect::isNull() const +{ return x2 == x1 - 1 && y2 == y1 - 1; } +inline bool QRect::isEmpty() const +{ return x1 > x2 || y1 > y2; } +inline bool QRect::isValid() const +{ return x1 <= x2 && y1 <= y2; } +inline int QRect::left() const +{ return x1; } +inline int QRect::top() const +{ return y1; } +inline int QRect::right() const +{ return x2; } +inline int QRect::bottom() const +{ return y2; } +inline int QRect::x() const +{ return x1; } +inline int QRect::y() const +{ return y1; } +inline void QRect::setLeft(int pos) +{ x1 = pos; } +inline void QRect::setTop(int pos) +{ y1 = pos; } +inline void QRect::setRight(int pos) +{ x2 = pos; } +inline void QRect::setBottom(int pos) +{ y2 = pos; } +inline void QRect::setTopLeft(const QPoint &p) +{ x1 = p.x(); y1 = p.y(); } +inline void QRect::setBottomRight(const QPoint &p) +{ x2 = p.x(); y2 = p.y(); } +inline void QRect::setTopRight(const QPoint &p) +{ x2 = p.x(); y1 = p.y(); } +inline void QRect::setBottomLeft(const QPoint &p) +{ x1 = p.x(); y2 = p.y(); } +inline void QRect::setX(int ax) +{ x1 = ax; } +inline void QRect::setY(int ay) +{ y1 = ay; } +inline QPoint QRect::topLeft() const +{ return QPoint(x1, y1); } +inline QPoint QRect::bottomRight() const +{ return QPoint(x2, y2); } +inline QPoint QRect::topRight() const +{ return QPoint(x2, y1); } +inline QPoint QRect::bottomLeft() const +{ return QPoint(x1, y2); } +inline QPoint QRect::center() const +{ return QPoint((x1+x2)/2, (y1+y2)/2); } +inline int QRect::width() const +{ return x2 - x1 + 1; } +inline int QRect::height() const +{ return y2 - y1 + 1; } +inline QSize QRect::size() const +{ return QSize(width(), height()); } +inline void QRect::translate(int dx, int dy) +{ + x1 += dx; + y1 += dy; + x2 += dx; + y2 += dy; +} +inline void QRect::translate(const QPoint &p) +{ + x1 += p.x(); + y1 += p.y(); + x2 += p.x(); + y2 += p.y(); +} +inline QRect QRect::translated(int dx, int dy) const +{ return QRect(QPoint(x1 + dx, y1 + dy), QPoint(x2 + dx, y2 + dy)); } +inline QRect QRect::translated(const QPoint &p) const +{ return QRect(QPoint(x1 + p.x(), y1 + p.y()), QPoint(x2 + p.x(), y2 + p.y())); } +inline void QRect::moveTo(int ax, int ay) +{ + x2 += ax - x1; + y2 += ay - y1; + x1 = ax; + y1 = ay; +} +inline void QRect::moveTo(const QPoint &p) +{ + x2 += p.x() - x1; + y2 += p.y() - y1; + x1 = p.x(); + y1 = p.y(); +} +inline void QRect::moveLeft(int pos) +{ x2 += (pos - x1); x1 = pos; } +inline void QRect::moveTop(int pos) +{ y2 += (pos - y1); y1 = pos; } +inline void QRect::moveRight(int pos) +{ + x1 += (pos - x2); + x2 = pos; +} +inline void QRect::moveBottom(int pos) +{ + y1 += (pos - y2); + y2 = pos; +} +inline void QRect::moveTopLeft(const QPoint &p) +{ + moveLeft(p.x()); + moveTop(p.y()); +} +inline void QRect::moveBottomRight(const QPoint &p) +{ + moveRight(p.x()); + moveBottom(p.y()); +} +inline void QRect::moveTopRight(const QPoint &p) +{ + moveRight(p.x()); + moveTop(p.y()); +} +inline void QRect::moveBottomLeft(const QPoint &p) +{ + moveLeft(p.x()); + moveBottom(p.y()); +} +inline void QRect::getRect(int *ax, int *ay, int *aw, int *ah) const +{ + *ax = x1; + *ay = y1; + *aw = x2 - x1 + 1; + *ah = y2 - y1 + 1; +} +inline void QRect::setRect(int ax, int ay, int aw, int ah) +{ + x1 = ax; + y1 = ay; + x2 = (ax + aw - 1); + y2 = (ay + ah - 1); +} +inline void QRect::getCoords(int *xp1, int *yp1, int *xp2, int *yp2) const +{ + *xp1 = x1; + *yp1 = y1; + *xp2 = x2; + *yp2 = y2; +} +inline void QRect::setCoords(int xp1, int yp1, int xp2, int yp2) +{ + x1 = xp1; + y1 = yp1; + x2 = xp2; + y2 = yp2; +} +inline QRect QRect::adjusted(int xp1, int yp1, int xp2, int yp2) const +{ return QRect(QPoint(x1 + xp1, y1 + yp1), QPoint(x2 + xp2, y2 + yp2)); } +inline void QRect::adjust(int dx1, int dy1, int dx2, int dy2) +{ + x1 += dx1; + y1 += dy1; + x2 += dx2; + y2 += dy2; +} +inline void QRect::setWidth(int w) +{ x2 = (x1 + w - 1); } +inline void QRect::setHeight(int h) +{ y2 = (y1 + h - 1); } +inline void QRect::setSize(const QSize &s) +{ + x2 = (s.width() + x1 - 1); + y2 = (s.height() + y1 - 1); +} +inline bool QRect::contains(int ax, int ay, bool aproper) const +{ + return contains(QPoint(ax, ay), aproper); +} +inline bool QRect::contains(int ax, int ay) const +{ + return contains(QPoint(ax, ay), false); +} +inline QRect& QRect::operator|=(const QRect &r) +{ + *this = *this | r; + return *this; +} +inline QRect& QRect::operator&=(const QRect &r) +{ + *this = *this & r; + return *this; +} +inline QRect QRect::intersect(const QRect &r) const +{ + return *this & r; +} +inline QRect QRect::intersected(const QRect &other) const +{ + return intersect(other); +} +inline QRect QRect::unite(const QRect &r) const +{ + return *this | r; +} +inline QRect QRect::united(const QRect &r) const +{ + return unite(r); +} +inline bool operator==(const QRect &r1, const QRect &r2) +{ + return r1.x1==r2.x1 && r1.x2==r2.x2 && r1.y1==r2.y1 && r1.y2==r2.y2; +} +inline bool operator!=(const QRect &r1, const QRect &r2) +{ + return r1.x1!=r2.x1 || r1.x2!=r2.x2 || r1.y1!=r2.y1 || r1.y2!=r2.y2; +} + QDebug operator<<(QDebug, const QRect &); +class QRectF +{ +public: + QRectF() { xp = yp = 0.; w = h = 0.; } + QRectF(const QPointF &topleft, const QSizeF &size); + QRectF(const QPointF &topleft, const QPointF &bottomRight); + QRectF(qreal left, qreal top, qreal width, qreal height); + QRectF(const QRect &rect); + bool isNull() const; + bool isEmpty() const; + bool isValid() const; + QRectF normalized() const; + inline qreal left() const { return xp; } + inline qreal top() const { return yp; } + inline qreal right() const { return xp + w; } + inline qreal bottom() const { return yp + h; } + inline qreal x() const; + inline qreal y() const; + inline void setLeft(qreal pos); + inline void setTop(qreal pos); + inline void setRight(qreal pos); + inline void setBottom(qreal pos); + inline void setX(qreal pos) { setLeft(pos); } + inline void setY(qreal pos) { setTop(pos); } + inline QPointF topLeft() const { return QPointF(xp, yp); } + inline QPointF bottomRight() const { return QPointF(xp+w, yp+h); } + inline QPointF topRight() const { return QPointF(xp+w, yp); } + inline QPointF bottomLeft() const { return QPointF(xp, yp+h); } + inline QPointF center() const; + void setTopLeft(const QPointF &p); + void setBottomRight(const QPointF &p); + void setTopRight(const QPointF &p); + void setBottomLeft(const QPointF &p); + void moveLeft(qreal pos); + void moveTop(qreal pos); + void moveRight(qreal pos); + void moveBottom(qreal pos); + void moveTopLeft(const QPointF &p); + void moveBottomRight(const QPointF &p); + void moveTopRight(const QPointF &p); + void moveBottomLeft(const QPointF &p); + void moveCenter(const QPointF &p); + void translate(qreal dx, qreal dy); + void translate(const QPointF &p); + QRectF translated(qreal dx, qreal dy) const; + QRectF translated(const QPointF &p) const; + void moveTo(qreal x, qreal t); + void moveTo(const QPointF &p); + void setRect(qreal x, qreal y, qreal w, qreal h); + void getRect(qreal *x, qreal *y, qreal *w, qreal *h) const; + void setCoords(qreal x1, qreal y1, qreal x2, qreal y2); + void getCoords(qreal *x1, qreal *y1, qreal *x2, qreal *y2) const; + inline void adjust(qreal x1, qreal y1, qreal x2, qreal y2); + inline QRectF adjusted(qreal x1, qreal y1, qreal x2, qreal y2) const; + QSizeF size() const; + qreal width() const; + qreal height() const; + void setWidth(qreal w); + void setHeight(qreal h); + void setSize(const QSizeF &s); + QRectF operator|(const QRectF &r) const; + QRectF operator&(const QRectF &r) const; + QRectF& operator|=(const QRectF &r); + QRectF& operator&=(const QRectF &r); + bool contains(const QPointF &p) const; + bool contains(qreal x, qreal y) const; + bool contains(const QRectF &r) const; + QRectF unite(const QRectF &r) const; + QRectF united(const QRectF &other) const; + QRectF intersect(const QRectF &r) const; + QRectF intersected(const QRectF &other) const; + bool intersects(const QRectF &r) const; + friend inline bool operator==(const QRectF &, const QRectF &); + friend inline bool operator!=(const QRectF &, const QRectF &); + QRect toRect() const; + QRect toAlignedRect() const; +private: + qreal xp; + qreal yp; + qreal w; + qreal h; +}; +template<> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QRectF)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QRectF"; } }; + inline bool operator==(const QRectF &, const QRectF &); + inline bool operator!=(const QRectF &, const QRectF &); + QDataStream &operator<<(QDataStream &, const QRectF &); + QDataStream &operator>>(QDataStream &, QRectF &); +inline QRectF::QRectF(qreal aleft, qreal atop, qreal awidth, qreal aheight) + : xp(aleft), yp(atop), w(awidth), h(aheight) +{ +} +inline QRectF::QRectF(const QPointF &atopLeft, const QSizeF &asize) +{ + xp = atopLeft.x(); + yp = atopLeft.y(); + w = asize.width(); + h = asize.height(); +} +inline QRectF::QRectF(const QPointF &atopLeft, const QPointF &abottomRight) +{ + xp = atopLeft.x(); + yp = atopLeft.y(); + w = abottomRight.x() - xp; + h = abottomRight.y() - yp; +} +inline QRectF::QRectF(const QRect &r) + : xp(r.x()), yp(r.y()), w(r.width()), h(r.height()) +{ +} +inline bool QRectF::isNull() const +{ return w == 0. && h == 0.; } +inline bool QRectF::isEmpty() const +{ return w <= 0. || h <= 0.; } +inline bool QRectF::isValid() const +{ return w > 0. && h > 0.; } +inline qreal QRectF::x() const +{ return xp; } +inline qreal QRectF::y() const +{ return yp; } +inline void QRectF::setLeft(qreal pos) { qreal diff = pos - xp; xp += diff; w -= diff; } +inline void QRectF::setRight(qreal pos) { w = pos - xp; } +inline void QRectF::setTop(qreal pos) { qreal diff = pos - yp; yp += diff; h -= diff; } +inline void QRectF::setBottom(qreal pos) { h = pos - yp; } +inline void QRectF::setTopLeft(const QPointF &p) { setLeft(p.x()); setTop(p.y()); } +inline void QRectF::setTopRight(const QPointF &p) { setRight(p.x()); setTop(p.y()); } +inline void QRectF::setBottomLeft(const QPointF &p) { setLeft(p.x()); setBottom(p.y()); } +inline void QRectF::setBottomRight(const QPointF &p) { setRight(p.x()); setBottom(p.y()); } +inline QPointF QRectF::center() const +{ return QPointF(xp + w/2, yp + h/2); } +inline void QRectF::moveLeft(qreal pos) { xp = pos; } +inline void QRectF::moveTop(qreal pos) { yp = pos; } +inline void QRectF::moveRight(qreal pos) { xp = pos - w; } +inline void QRectF::moveBottom(qreal pos) { yp = pos - h; } +inline void QRectF::moveTopLeft(const QPointF &p) { moveLeft(p.x()); moveTop(p.y()); } +inline void QRectF::moveTopRight(const QPointF &p) { moveRight(p.x()); moveTop(p.y()); } +inline void QRectF::moveBottomLeft(const QPointF &p) { moveLeft(p.x()); moveBottom(p.y()); } +inline void QRectF::moveBottomRight(const QPointF &p) { moveRight(p.x()); moveBottom(p.y()); } +inline void QRectF::moveCenter(const QPointF &p) { xp = p.x() - w/2; yp = p.y() - h/2; } +inline qreal QRectF::width() const +{ return w; } +inline qreal QRectF::height() const +{ return h; } +inline QSizeF QRectF::size() const +{ return QSizeF(w, h); } +inline void QRectF::translate(qreal dx, qreal dy) +{ + xp += dx; + yp += dy; +} +inline void QRectF::translate(const QPointF &p) +{ + xp += p.x(); + yp += p.y(); +} +inline void QRectF::moveTo(qreal ax, qreal ay) +{ + xp = ax; + yp = ay; +} +inline void QRectF::moveTo(const QPointF &p) +{ + xp = p.x(); + yp = p.y(); +} +inline QRectF QRectF::translated(qreal dx, qreal dy) const +{ return QRectF(xp + dx, yp + dy, w, h); } +inline QRectF QRectF::translated(const QPointF &p) const +{ return QRectF(xp + p.x(), yp + p.y(), w, h); } +inline void QRectF::getRect(qreal *ax, qreal *ay, qreal *aaw, qreal *aah) const +{ + *ax = this->xp; + *ay = this->yp; + *aaw = this->w; + *aah = this->h; +} +inline void QRectF::setRect(qreal ax, qreal ay, qreal aaw, qreal aah) +{ + this->xp = ax; + this->yp = ay; + this->w = aaw; + this->h = aah; +} +inline void QRectF::getCoords(qreal *xp1, qreal *yp1, qreal *xp2, qreal *yp2) const +{ + *xp1 = xp; + *yp1 = yp; + *xp2 = xp + w; + *yp2 = yp + h; +} +inline void QRectF::setCoords(qreal xp1, qreal yp1, qreal xp2, qreal yp2) +{ + xp = xp1; + yp = yp1; + w = xp2 - xp1; + h = yp2 - yp1; +} +inline void QRectF::adjust(qreal xp1, qreal yp1, qreal xp2, qreal yp2) +{ xp += xp1; yp += yp1; w += xp2 - xp1; h += yp2 - yp1; } +inline QRectF QRectF::adjusted(qreal xp1, qreal yp1, qreal xp2, qreal yp2) const +{ return QRectF(xp + xp1, yp + yp1, w + xp2 - xp1, h + yp2 - yp1); } +inline void QRectF::setWidth(qreal aw) +{ this->w = aw; } +inline void QRectF::setHeight(qreal ah) +{ this->h = ah; } +inline void QRectF::setSize(const QSizeF &s) +{ + w = s.width(); + h = s.height(); +} +inline bool QRectF::contains(qreal ax, qreal ay) const +{ + return contains(QPointF(ax, ay)); +} +inline QRectF& QRectF::operator|=(const QRectF &r) +{ + *this = *this | r; + return *this; +} +inline QRectF& QRectF::operator&=(const QRectF &r) +{ + *this = *this & r; + return *this; +} +inline QRectF QRectF::intersect(const QRectF &r) const +{ + return *this & r; +} +inline QRectF QRectF::intersected(const QRectF &r) const +{ + return intersect(r); +} +inline QRectF QRectF::unite(const QRectF &r) const +{ + return *this | r; +} +inline QRectF QRectF::united(const QRectF &r) const +{ + return unite(r); +} +inline bool operator==(const QRectF &r1, const QRectF &r2) +{ + return qFuzzyCompare(r1.xp, r2.xp) && qFuzzyCompare(r1.yp, r2.yp) + && qFuzzyCompare(r1.w, r2.w) && qFuzzyCompare(r1.h, r2.h); +} +inline bool operator!=(const QRectF &r1, const QRectF &r2) +{ + return !qFuzzyCompare(r1.xp, r2.xp) || !qFuzzyCompare(r1.yp, r2.yp) + || !qFuzzyCompare(r1.w, r2.w) || !qFuzzyCompare(r1.h, r2.h); +} +inline QRect QRectF::toRect() const +{ + return QRect(qRound(xp), qRound(yp), qRound(w), qRound(h)); +} + QDebug operator<<(QDebug, const QRectF &); +typedef QtValidLicenseForCoreModule QtCoreModule; +template +class QScopedValueRollback +{ +public: + QScopedValueRollback(T &var) : + varRef(var) + { + oldValue = varRef; + } + ~QScopedValueRollback() + { + varRef = oldValue; + } + void commit() + { + oldValue = varRef; + } +private: + T& varRef; + T oldValue; + QScopedValueRollback(const QScopedValueRollback &); QScopedValueRollback &operator=(const QScopedValueRollback &); +}; +typedef QtValidLicenseForCoreModule QtCoreModule; +template +class QSet +{ + typedef QHash Hash; +public: + inline QSet() {} + inline QSet(const QSet &other) : q_hash(other.q_hash) {} + inline QSet &operator=(const QSet &other) + { q_hash = other.q_hash; return *this; } + inline void swap(QSet &other) { q_hash.swap(other.q_hash); } + inline bool operator==(const QSet &other) const + { return q_hash == other.q_hash; } + inline bool operator!=(const QSet &other) const + { return q_hash != other.q_hash; } + inline int size() const { return q_hash.size(); } + inline bool isEmpty() const { return q_hash.isEmpty(); } + inline int capacity() const { return q_hash.capacity(); } + inline void reserve(int size); + inline void squeeze() { q_hash.squeeze(); } + inline void detach() { q_hash.detach(); } + inline bool isDetached() const { return q_hash.isDetached(); } + inline void setSharable(bool sharable) { q_hash.setSharable(sharable); } + inline void clear() { q_hash.clear(); } + inline bool remove(const T &value) { return q_hash.remove(value) != 0; } + inline bool contains(const T &value) const { return q_hash.contains(value); } + bool contains(const QSet &set) const; + class const_iterator; + class iterator + { + typedef QHash Hash; + typename Hash::iterator i; + friend class const_iterator; + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef qptrdiff difference_type; + typedef T value_type; + typedef const T *pointer; + typedef const T &reference; + inline iterator() {} + inline iterator(typename Hash::iterator o) : i(o) {} + inline iterator(const iterator &o) : i(o.i) {} + inline iterator &operator=(const iterator &o) { i = o.i; return *this; } + inline const T &operator*() const { return i.key(); } + inline const T *operator->() const { return &i.key(); } + inline bool operator==(const iterator &o) const { return i == o.i; } + inline bool operator!=(const iterator &o) const { return i != o.i; } + inline bool operator==(const const_iterator &o) const + { return i == o.i; } + inline bool operator!=(const const_iterator &o) const + { return i != o.i; } + inline iterator &operator++() { ++i; return *this; } + inline iterator operator++(int) { iterator r = *this; ++i; return r; } + inline iterator &operator--() { --i; return *this; } + inline iterator operator--(int) { iterator r = *this; --i; return r; } + inline iterator operator+(int j) const { return i + j; } + inline iterator operator-(int j) const { return i - j; } + inline iterator &operator+=(int j) { i += j; return *this; } + inline iterator &operator-=(int j) { i -= j; return *this; } + }; + class const_iterator + { + typedef QHash Hash; + typename Hash::const_iterator i; + friend class iterator; + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef qptrdiff difference_type; + typedef T value_type; + typedef const T *pointer; + typedef const T &reference; + inline const_iterator() {} + inline const_iterator(typename Hash::const_iterator o) : i(o) {} + inline const_iterator(const const_iterator &o) : i(o.i) {} + inline const_iterator(const iterator &o) + : i(o.i) {} + inline const_iterator &operator=(const const_iterator &o) { i = o.i; return *this; } + inline const T &operator*() const { return i.key(); } + inline const T *operator->() const { return &i.key(); } + inline bool operator==(const const_iterator &o) const { return i == o.i; } + inline bool operator!=(const const_iterator &o) const { return i != o.i; } + inline const_iterator &operator++() { ++i; return *this; } + inline const_iterator operator++(int) { const_iterator r = *this; ++i; return r; } + inline const_iterator &operator--() { --i; return *this; } + inline const_iterator operator--(int) { const_iterator r = *this; --i; return r; } + inline const_iterator operator+(int j) const { return i + j; } + inline const_iterator operator-(int j) const { return i - j; } + inline const_iterator &operator+=(int j) { i += j; return *this; } + inline const_iterator &operator-=(int j) { i -= j; return *this; } + }; + inline iterator begin() { return q_hash.begin(); } + inline const_iterator begin() const { return q_hash.begin(); } + inline const_iterator constBegin() const { return q_hash.constBegin(); } + inline iterator end() { return q_hash.end(); } + inline const_iterator end() const { return q_hash.end(); } + inline const_iterator constEnd() const { return q_hash.constEnd(); } + iterator erase(iterator i) + { return q_hash.erase(reinterpret_cast(i)); } + typedef iterator Iterator; + typedef const_iterator ConstIterator; + inline int count() const { return q_hash.count(); } + inline const_iterator insert(const T &value) + { return static_cast(q_hash.insert(value, + QHashDummyValue())); } + iterator find(const T &value) { return q_hash.find(value); } + const_iterator find(const T &value) const { return q_hash.find(value); } + inline const_iterator constFind(const T &value) const { return find(value); } + QSet &unite(const QSet &other); + QSet &intersect(const QSet &other); + QSet &subtract(const QSet &other); + typedef T key_type; + typedef T value_type; + typedef value_type *pointer; + typedef const value_type *const_pointer; + typedef value_type &reference; + typedef const value_type &const_reference; + typedef qptrdiff difference_type; + typedef int size_type; + inline bool empty() const { return isEmpty(); } + inline QSet &operator<<(const T &value) { insert(value); return *this; } + inline QSet &operator|=(const QSet &other) { unite(other); return *this; } + inline QSet &operator|=(const T &value) { insert(value); return *this; } + inline QSet &operator&=(const QSet &other) { intersect(other); return *this; } + inline QSet &operator&=(const T &value) + { QSet result; if (contains(value)) result.insert(value); return (*this = result); } + inline QSet &operator+=(const QSet &other) { unite(other); return *this; } + inline QSet &operator+=(const T &value) { insert(value); return *this; } + inline QSet &operator-=(const QSet &other) { subtract(other); return *this; } + inline QSet &operator-=(const T &value) { remove(value); return *this; } + inline QSet operator|(const QSet &other) const + { QSet result = *this; result |= other; return result; } + inline QSet operator&(const QSet &other) const + { QSet result = *this; result &= other; return result; } + inline QSet operator+(const QSet &other) const + { QSet result = *this; result += other; return result; } + inline QSet operator-(const QSet &other) const + { QSet result = *this; result -= other; return result; } + inline QSet operator|(const QSet &other) + { QSet result = *this; result |= other; return result; } + inline QSet operator&(const QSet &other) + { QSet result = *this; result &= other; return result; } + inline QSet operator+(const QSet &other) + { QSet result = *this; result += other; return result; } + inline QSet operator-(const QSet &other) + { QSet result = *this; result -= other; return result; } + QList toList() const; + inline QList values() const { return toList(); } + static QSet fromList(const QList &list); +private: + Hash q_hash; +}; +template +inline void QSet::reserve(int asize) { q_hash.reserve(asize); } +template +inline QSet &QSet::unite(const QSet &other) +{ + QSet copy(other); + typename QSet::const_iterator i = copy.constEnd(); + while (i != copy.constBegin()) { + --i; + insert(*i); + } + return *this; +} +template +inline QSet &QSet::intersect(const QSet &other) +{ + QSet copy1(*this); + QSet copy2(other); + typename QSet::const_iterator i = copy1.constEnd(); + while (i != copy1.constBegin()) { + --i; + if (!copy2.contains(*i)) + remove(*i); + } + return *this; +} +template +inline QSet &QSet::subtract(const QSet &other) +{ + QSet copy1(*this); + QSet copy2(other); + typename QSet::const_iterator i = copy1.constEnd(); + while (i != copy1.constBegin()) { + --i; + if (copy2.contains(*i)) + remove(*i); + } + return *this; +} +template +inline bool QSet::contains(const QSet &other) const +{ + typename QSet::const_iterator i = other.constBegin(); + while (i != other.constEnd()) { + if (!contains(*i)) + return false; + ++i; + } + return true; +} +template + QList QSet::toList() const +{ + QList result; + result.reserve(size()); + typename QSet::const_iterator i = constBegin(); + while (i != constEnd()) { + result.append(*i); + ++i; + } + return result; +} +template + QSet QList::toSet() const +{ + QSet result; + result.reserve(size()); + for (int i = 0; i < size(); ++i) + result.insert(at(i)); + return result; +} +template +QSet QSet::fromList(const QList &list) +{ + return list.toSet(); +} +template +QList QList::fromSet(const QSet &set) +{ + return set.toList(); +} +template class QSetIterator { typedef typename QSet::const_iterator const_iterator; QSet c; const_iterator i; public: inline QSetIterator(const QSet &container) : c(container), i(c.constBegin()) {} inline QSetIterator &operator=(const QSet &container) { c = container; i = c.constBegin(); return *this; } inline void toFront() { i = c.constBegin(); } inline void toBack() { i = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline const T &next() { return *i++; } inline const T &peekNext() const { return *i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline const T &previous() { return *--i; } inline const T &peekPrevious() const { const_iterator p = i; return *--p; } inline bool findNext(const T &t) { while (i != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(--i) == t) return true; return false; } }; +template +class QMutableSetIterator +{ + typedef typename QSet::iterator iterator; + QSet *c; + iterator i, n; + inline bool item_exists() const { return c->constEnd() != n; } +public: + inline QMutableSetIterator(QSet &container) + : c(&container) + { c->setSharable(false); i = c->begin(); n = c->end(); } + inline ~QMutableSetIterator() + { c->setSharable(true); } + inline QMutableSetIterator &operator=(QSet &container) + { c->setSharable(true); c = &container; c->setSharable(false); + i = c->begin(); n = c->end(); return *this; } + inline void toFront() { i = c->begin(); n = c->end(); } + inline void toBack() { i = c->end(); n = i; } + inline bool hasNext() const { return c->constEnd() != i; } + inline const T &next() { n = i++; return *n; } + inline const T &peekNext() const { return *i; } + inline bool hasPrevious() const { return c->constBegin() != i; } + inline const T &previous() { n = --i; return *n; } + inline const T &peekPrevious() const { iterator p = i; return *--p; } + inline void remove() + { if (c->constEnd() != n) { i = c->erase(n); n = c->end(); } } + inline const T &value() const { qt_noop(); return *n; } + inline bool findNext(const T &t) + { while (c->constEnd() != (n = i)) if (*i++ == t) return true; return false; } + inline bool findPrevious(const T &t) + { while (c->constBegin() != i) if (*(n = --i) == t) return true; + n = c->end(); return false; } +}; +typedef QtValidLicenseForCoreModule QtCoreModule; +struct QVectorData +{ + QBasicAtomicInt ref; + int alloc; + int size; + uint sharable : 1; + uint capacity : 1; + uint reserved : 30; + static QVectorData shared_null; + static QVectorData *malloc(int sizeofTypedData, int size, int sizeofT, QVectorData *init); + static QVectorData *allocate(int size, int alignment); + static QVectorData *reallocate(QVectorData *old, int newsize, int oldsize, int alignment); + static void free(QVectorData *data, int alignment); + static int grow(int sizeofTypedData, int size, int sizeofT, bool excessive); +}; +template +struct QVectorTypedData : private QVectorData +{ + T array[1]; + static inline void free(QVectorTypedData *x, int alignment) { QVectorData::free(static_cast(x), alignment); } +}; +class QRegion; +template +class QVector +{ + typedef QVectorTypedData Data; + union { + QVectorData *d; + Data *p; + }; +public: + inline QVector() : d(&QVectorData::shared_null) { d->ref.ref(); } + explicit QVector(int size); + QVector(int size, const T &t); + inline QVector(const QVector &v) : d(v.d) { d->ref.ref(); if (!d->sharable) detach_helper(); } + inline ~QVector() { if (!d) return; if (!d->ref.deref()) free(p); } + QVector &operator=(const QVector &v); + inline void swap(QVector &other) { qSwap(d, other.d); } + bool operator==(const QVector &v) const; + inline bool operator!=(const QVector &v) const { return !(*this == v); } + inline int size() const { return d->size; } + inline bool isEmpty() const { return d->size == 0; } + void resize(int size); + inline int capacity() const { return d->alloc; } + void reserve(int size); + inline void squeeze() { realloc(d->size, d->size); d->capacity = 0; } + inline void detach() { if (d->ref != 1) detach_helper(); } + inline bool isDetached() const { return d->ref == 1; } + inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; } + inline bool isSharedWith(const QVector &other) const { return d == other.d; } + inline T *data() { detach(); return p->array; } + inline const T *data() const { return p->array; } + inline const T *constData() const { return p->array; } + void clear(); + const T &at(int i) const; + T &operator[](int i); + const T &operator[](int i) const; + void append(const T &t); + void prepend(const T &t); + void insert(int i, const T &t); + void insert(int i, int n, const T &t); + void replace(int i, const T &t); + void remove(int i); + void remove(int i, int n); + QVector &fill(const T &t, int size = -1); + int indexOf(const T &t, int from = 0) const; + int lastIndexOf(const T &t, int from = -1) const; + bool contains(const T &t) const; + int count(const T &t) const; + typedef T* iterator; + typedef const T* const_iterator; + inline iterator begin() { detach(); return p->array; } + inline const_iterator begin() const { return p->array; } + inline const_iterator constBegin() const { return p->array; } + inline iterator end() { detach(); return p->array + d->size; } + inline const_iterator end() const { return p->array + d->size; } + inline const_iterator constEnd() const { return p->array + d->size; } + iterator insert(iterator before, int n, const T &x); + inline iterator insert(iterator before, const T &x) { return insert(before, 1, x); } + iterator erase(iterator begin, iterator end); + inline iterator erase(iterator pos) { return erase(pos, pos+1); } + inline int count() const { return d->size; } + inline T& first() { qt_noop(); return *begin(); } + inline const T &first() const { qt_noop(); return *begin(); } + inline T& last() { qt_noop(); return *(end()-1); } + inline const T &last() const { qt_noop(); return *(end()-1); } + inline bool startsWith(const T &t) const { return !isEmpty() && first() == t; } + inline bool endsWith(const T &t) const { return !isEmpty() && last() == t; } + QVector mid(int pos, int length = -1) const; + T value(int i) const; + T value(int i, const T &defaultValue) const; + typedef T value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef qptrdiff difference_type; + typedef iterator Iterator; + typedef const_iterator ConstIterator; + typedef int size_type; + inline void push_back(const T &t) { append(t); } + inline void push_front(const T &t) { prepend(t); } + void pop_back() { qt_noop(); erase(end()-1); } + void pop_front() { qt_noop(); erase(begin()); } + inline bool empty() const + { return d->size == 0; } + inline T& front() { return first(); } + inline const_reference front() const { return first(); } + inline reference back() { return last(); } + inline const_reference back() const { return last(); } + QVector &operator+=(const QVector &l); + inline QVector operator+(const QVector &l) const + { QVector n = *this; n += l; return n; } + inline QVector &operator+=(const T &t) + { append(t); return *this; } + inline QVector &operator<< (const T &t) + { append(t); return *this; } + inline QVector &operator<<(const QVector &l) + { *this += l; return *this; } + QList toList() const; + static QVector fromList(const QList &list); + static inline QVector fromStdVector(const std::vector &vector) + { QVector tmp; tmp.reserve(int(vector.size())); qCopy(vector.begin(), vector.end(), std::back_inserter(tmp)); return tmp; } + inline std::vector toStdVector() const + { std::vector tmp; tmp.reserve(size()); qCopy(constBegin(), constEnd(), std::back_inserter(tmp)); return tmp; } +private: + friend class QRegion; + void detach_helper(); + QVectorData *malloc(int alloc); + void realloc(int size, int alloc); + void free(Data *d); + int sizeOfTypedData() { + return reinterpret_cast(&(reinterpret_cast(this))->array[1]) - reinterpret_cast(this); + } + inline int alignOfTypedData() const + { + return qMax(sizeof(void*), __alignof__(Data)); + } +}; +template +void QVector::detach_helper() +{ realloc(d->size, d->alloc); } +template +void QVector::reserve(int asize) +{ if (asize > d->alloc) realloc(d->size, asize); if (d->ref == 1) d->capacity = 1; } +template +void QVector::resize(int asize) +{ realloc(asize, (asize > d->alloc || (!d->capacity && asize < d->size && asize < (d->alloc >> 1))) ? + QVectorData::grow(sizeOfTypedData(), asize, sizeof(T), QTypeInfo::isStatic) + : d->alloc); } +template +inline void QVector::clear() +{ *this = QVector(); } +template +inline const T &QVector::at(int i) const +{ qt_noop(); + return p->array[i]; } +template +inline const T &QVector::operator[](int i) const +{ qt_noop(); + return p->array[i]; } +template +inline T &QVector::operator[](int i) +{ qt_noop(); + return data()[i]; } +template +inline void QVector::insert(int i, const T &t) +{ qt_noop(); + insert(begin() + i, 1, t); } +template +inline void QVector::insert(int i, int n, const T &t) +{ qt_noop(); + insert(begin() + i, n, t); } +template +inline void QVector::remove(int i, int n) +{ qt_noop(); + erase(begin() + i, begin() + i + n); } +template +inline void QVector::remove(int i) +{ qt_noop(); + erase(begin() + i, begin() + i + 1); } +template +inline void QVector::prepend(const T &t) +{ insert(begin(), 1, t); } +template +inline void QVector::replace(int i, const T &t) +{ + qt_noop(); + const T copy(t); + data()[i] = copy; +} +template +QVector &QVector::operator=(const QVector &v) +{ + QVectorData *o = v.d; + o->ref.ref(); + if (!d->ref.deref()) + free(p); + d = o; + if (!d->sharable) + detach_helper(); + return *this; +} +template +inline QVectorData *QVector::malloc(int aalloc) +{ + QVectorData *vectordata = QVectorData::allocate(sizeOfTypedData() + (aalloc - 1) * sizeof(T), alignOfTypedData()); + do { if (!(vectordata)) qBadAlloc(); } while (0); + return vectordata; +} +template +QVector::QVector(int asize) +{ + d = malloc(asize); + d->ref = 1; + d->alloc = d->size = asize; + d->sharable = true; + d->capacity = false; + if (QTypeInfo::isComplex) { + T* b = p->array; + T* i = p->array + d->size; + while (i != b) + new (--i) T; + } else { + qMemSet(p->array, 0, asize * sizeof(T)); + } +} +template +QVector::QVector(int asize, const T &t) +{ + d = malloc(asize); + d->ref = 1; + d->alloc = d->size = asize; + d->sharable = true; + d->capacity = false; + T* i = p->array + d->size; + while (i != p->array) + new (--i) T(t); +} +template +void QVector::free(Data *x) +{ + if (QTypeInfo::isComplex) { + T* b = x->array; + union { QVectorData *d; Data *p; } u; + u.p = x; + T* i = b + u.d->size; + while (i-- != b) + i->~T(); + } + x->free(x, alignOfTypedData()); +} +template +void QVector::realloc(int asize, int aalloc) +{ + qt_noop(); + T *pOld; + T *pNew; + union { QVectorData *d; Data *p; } x; + x.d = d; + if (QTypeInfo::isComplex && asize < d->size && d->ref == 1 ) { + pOld = p->array + d->size; + pNew = p->array + asize; + while (asize < d->size) { + (--pOld)->~T(); + d->size--; + } + } + if (aalloc != d->alloc || d->ref != 1) { + if (QTypeInfo::isStatic) { + x.d = malloc(aalloc); + do { if (!(x.p)) qBadAlloc(); } while (0); + x.d->size = 0; + } else if (d->ref != 1) { + x.d = malloc(aalloc); + do { if (!(x.p)) qBadAlloc(); } while (0); + if (QTypeInfo::isComplex) { + x.d->size = 0; + } else { + ::memcpy(x.p, p, sizeOfTypedData() + (qMin(aalloc, d->alloc) - 1) * sizeof(T)); + x.d->size = d->size; + } + } else { + try { + QVectorData *mem = QVectorData::reallocate(d, sizeOfTypedData() + (aalloc - 1) * sizeof(T), + sizeOfTypedData() + (d->alloc - 1) * sizeof(T), alignOfTypedData()); + do { if (!(mem)) qBadAlloc(); } while (0); + x.d = d = mem; + x.d->size = d->size; + } catch (const std::bad_alloc &) { + if (aalloc > d->alloc) + throw; + } + } + x.d->ref = 1; + x.d->alloc = aalloc; + x.d->sharable = true; + x.d->capacity = d->capacity; + x.d->reserved = 0; + } + if (QTypeInfo::isComplex) { + try { + pOld = p->array + x.d->size; + pNew = x.p->array + x.d->size; + const int toMove = qMin(asize, d->size); + while (x.d->size < toMove) { + new (pNew++) T(*pOld++); + x.d->size++; + } + while (x.d->size < asize) { + new (pNew++) T; + x.d->size++; + } + } catch (...) { + free(x.p); + throw; + } + } else if (asize > x.d->size) { + qMemSet(x.p->array + x.d->size, 0, (asize - x.d->size) * sizeof(T)); + } + x.d->size = asize; + if (d != x.d) { + if (!d->ref.deref()) + free(p); + d = x.d; + } +} +template + T QVector::value(int i) const +{ + if (i < 0 || i >= d->size) { + return T(); + } + return p->array[i]; +} +template + T QVector::value(int i, const T &defaultValue) const +{ + return ((i < 0 || i >= d->size) ? defaultValue : p->array[i]); +} +template +void QVector::append(const T &t) +{ + if (d->ref != 1 || d->size + 1 > d->alloc) { + const T copy(t); + realloc(d->size, QVectorData::grow(sizeOfTypedData(), d->size + 1, sizeof(T), + QTypeInfo::isStatic)); + if (QTypeInfo::isComplex) + new (p->array + d->size) T(copy); + else + p->array[d->size] = copy; + } else { + if (QTypeInfo::isComplex) + new (p->array + d->size) T(t); + else + p->array[d->size] = t; + } + ++d->size; +} +template +typename QVector::iterator QVector::insert(iterator before, size_type n, const T &t) +{ + int offset = int(before - p->array); + if (n != 0) { + const T copy(t); + if (d->ref != 1 || d->size + n > d->alloc) + realloc(d->size, QVectorData::grow(sizeOfTypedData(), d->size + n, sizeof(T), + QTypeInfo::isStatic)); + if (QTypeInfo::isStatic) { + T *b = p->array + d->size; + T *i = p->array + d->size + n; + while (i != b) + new (--i) T; + i = p->array + d->size; + T *j = i + n; + b = p->array + offset; + while (i != b) + *--j = *--i; + i = b+n; + while (i != b) + *--i = copy; + } else { + T *b = p->array + offset; + T *i = b + n; + memmove(i, b, (d->size - offset) * sizeof(T)); + while (i != b) + new (--i) T(copy); + } + d->size += n; + } + return p->array + offset; +} +template +typename QVector::iterator QVector::erase(iterator abegin, iterator aend) +{ + int f = int(abegin - p->array); + int l = int(aend - p->array); + int n = l - f; + detach(); + if (QTypeInfo::isComplex) { + qCopy(p->array+l, p->array+d->size, p->array+f); + T *i = p->array+d->size; + T* b = p->array+d->size-n; + while (i != b) { + --i; + i->~T(); + } + } else { + memmove(p->array + f, p->array + l, (d->size-l)*sizeof(T)); + } + d->size -= n; + return p->array + f; +} +template +bool QVector::operator==(const QVector &v) const +{ + if (d->size != v.d->size) + return false; + if (d == v.d) + return true; + T* b = p->array; + T* i = b + d->size; + T* j = v.p->array + d->size; + while (i != b) + if (!(*--i == *--j)) + return false; + return true; +} +template +QVector &QVector::fill(const T &from, int asize) +{ + const T copy(from); + resize(asize < 0 ? d->size : asize); + if (d->size) { + T *i = p->array + d->size; + T *b = p->array; + while (i != b) + *--i = copy; + } + return *this; +} +template +QVector &QVector::operator+=(const QVector &l) +{ + int newSize = d->size + l.d->size; + realloc(d->size, newSize); + T *w = p->array + newSize; + T *i = l.p->array + l.d->size; + T *b = l.p->array; + while (i != b) { + if (QTypeInfo::isComplex) + new (--w) T(*--i); + else + *--w = *--i; + } + d->size = newSize; + return *this; +} +template +int QVector::indexOf(const T &t, int from) const +{ + if (from < 0) + from = qMax(from + d->size, 0); + if (from < d->size) { + T* n = p->array + from - 1; + T* e = p->array + d->size; + while (++n != e) + if (*n == t) + return n - p->array; + } + return -1; +} +template +int QVector::lastIndexOf(const T &t, int from) const +{ + if (from < 0) + from += d->size; + else if (from >= d->size) + from = d->size-1; + if (from >= 0) { + T* b = p->array; + T* n = p->array + from + 1; + while (n != b) { + if (*--n == t) + return n - b; + } + } + return -1; +} +template +bool QVector::contains(const T &t) const +{ + T* b = p->array; + T* i = p->array + d->size; + while (i != b) + if (*--i == t) + return true; + return false; +} +template +int QVector::count(const T &t) const +{ + int c = 0; + T* b = p->array; + T* i = p->array + d->size; + while (i != b) + if (*--i == t) + ++c; + return c; +} +template + QVector QVector::mid(int pos, int length) const +{ + if (length < 0) + length = size() - pos; + if (pos == 0 && length == size()) + return *this; + if (pos + length > size()) + length = size() - pos; + QVector copy; + copy.reserve(length); + for (int i = pos; i < pos + length; ++i) + copy += at(i); + return copy; +} +template + QList QVector::toList() const +{ + QList result; + result.reserve(size()); + for (int i = 0; i < size(); ++i) + result.append(at(i)); + return result; +} +template + QVector QList::toVector() const +{ + QVector result(size()); + for (int i = 0; i < size(); ++i) + result[i] = at(i); + return result; +} +template +QVector QVector::fromList(const QList &list) +{ + return list.toVector(); +} +template +QList QList::fromVector(const QVector &vector) +{ + return vector.toList(); +} +template class QVectorIterator { typedef typename QVector::const_iterator const_iterator; QVector c; const_iterator i; public: inline QVectorIterator(const QVector &container) : c(container), i(c.constBegin()) {} inline QVectorIterator &operator=(const QVector &container) { c = container; i = c.constBegin(); return *this; } inline void toFront() { i = c.constBegin(); } inline void toBack() { i = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline const T &next() { return *i++; } inline const T &peekNext() const { return *i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline const T &previous() { return *--i; } inline const T &peekPrevious() const { const_iterator p = i; return *--p; } inline bool findNext(const T &t) { while (i != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(--i) == t) return true; return false; } }; +template class QMutableVectorIterator { typedef typename QVector::iterator iterator; typedef typename QVector::const_iterator const_iterator; QVector *c; iterator i, n; inline bool item_exists() const { return const_iterator(n) != c->constEnd(); } public: inline QMutableVectorIterator(QVector &container) : c(&container) { c->setSharable(false); i = c->begin(); n = c->end(); } inline ~QMutableVectorIterator() { c->setSharable(true); } inline QMutableVectorIterator &operator=(QVector &container) { c->setSharable(true); c = &container; c->setSharable(false); i = c->begin(); n = c->end(); return *this; } inline void toFront() { i = c->begin(); n = c->end(); } inline void toBack() { i = c->end(); n = i; } inline bool hasNext() const { return c->constEnd() != const_iterator(i); } inline T &next() { n = i++; return *n; } inline T &peekNext() const { return *i; } inline bool hasPrevious() const { return c->constBegin() != const_iterator(i); } inline T &previous() { n = --i; return *n; } inline T &peekPrevious() const { iterator p = i; return *--p; } inline void remove() { if (c->constEnd() != const_iterator(n)) { i = c->erase(n); n = c->end(); } } inline void setValue(const T &t) const { if (c->constEnd() != const_iterator(n)) *n = t; } inline T &value() { qt_noop(); return *n; } inline const T &value() const { qt_noop(); return *n; } inline void insert(const T &t) { n = i = c->insert(i, t); ++i; } inline bool findNext(const T &t) { while (c->constEnd() != const_iterator(n = i)) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (c->constBegin() != const_iterator(i)) if (*(n = --i) == t) return true; n = c->end(); return false; } }; +typedef QtValidLicenseForCoreModule QtCoreModule; +template +class QStack : public QVector +{ +public: + inline QStack() {} + inline ~QStack() {} + inline void swap(QStack &other) { QVector::swap(other); } + inline void push(const T &t) { QVector::append(t); } + T pop(); + T &top(); + const T &top() const; +}; +template +inline T QStack::pop() +{ qt_noop(); T t = this->data()[this->size() -1]; + this->resize(this->size()-1); return t; } +template +inline T &QStack::top() +{ qt_noop(); this->detach(); return this->data()[this->size()-1]; } +template +inline const T &QStack::top() const +{ qt_noop(); return this->data()[this->size()-1]; } +typedef QtValidLicenseForCoreModule QtCoreModule; +class QLatin1Literal +{ +public: + int size() const { return m_size; } + const char *data() const { return m_data; } + template + QLatin1Literal(const char (&str)[N]) + : m_size(N - 1), m_data(str) {} +private: + const int m_size; + const char * const m_data; +}; +struct QAbstractConcatenable +{ +protected: + static void convertFromAscii(const char *a, int len, QChar *&out); + static void convertToAscii(const QChar *a, int len, char *&out); + static inline void convertFromAscii(char a, QChar *&out) + { + if (QString::codecForCStrings) + *out++ = QChar::fromAscii(a); + else + *out++ = QLatin1Char(a); + } + static inline void convertToAscii(QChar a, char *&out) + { + if (QString::codecForCStrings) + *out++ = a.toAscii(); + else + convertToLatin1(a, out); + } + static inline void convertToLatin1(QChar a, char *&out) + { + *out++ = a.unicode() > 0xff ? '?' : char(a.unicode()); + } +}; +template struct QConcatenable {}; +template +class QStringBuilder +{ +public: + QStringBuilder(const A &a_, const B &b_) : a(a_), b(b_) {} +private: + friend class QByteArray; + friend class QString; + template T convertTo() const + { + const uint len = QConcatenable< QStringBuilder >::size(*this); + T s(len, Qt::Uninitialized); + typename T::iterator d = s.data(); + typename T::const_iterator const start = d; + QConcatenable< QStringBuilder >::appendTo(*this, d); + if (!QConcatenable< QStringBuilder >::ExactSize && int(len) != d - start) { + s.resize(d - start); + } + return s; + } + typedef QConcatenable > Concatenable; + typedef typename Concatenable::ConvertTo ConvertTo; +public: + operator ConvertTo() const { return convertTo(); } + QByteArray toLatin1() const { return convertTo().toLatin1(); } + int size() const { return Concatenable::size(*this); } + const A &a; + const B &b; +}; +template <> +class QStringBuilder +{ + public: + QStringBuilder(const QString &a_, const QString &b_) : a(a_), b(b_) {} + operator QString() const + { QString r(a); r += b; return r; } + QByteArray toLatin1() const { return QString(*this).toLatin1(); } + const QString &a; + const QString &b; +}; +template <> +class QStringBuilder +{ + public: + QStringBuilder(const QByteArray &a_, const QByteArray &b_) : a(a_), b(b_) {} + operator QByteArray() const + { QByteArray r(a); r += b; return r; } + const QByteArray &a; + const QByteArray &b; +}; +template <> struct QConcatenable : private QAbstractConcatenable +{ + typedef char type; + typedef QByteArray ConvertTo; + enum { ExactSize = true }; + static int size(const char) { return 1; } + static inline void appendTo(const char c, QChar *&out) + { + QAbstractConcatenable::convertFromAscii(c, out); + } + static inline void appendTo(const char c, char *&out) + { *out++ = c; } +}; +template <> struct QConcatenable +{ + typedef QLatin1Char type; + typedef QString ConvertTo; + enum { ExactSize = true }; + static int size(const QLatin1Char) { return 1; } + static inline void appendTo(const QLatin1Char c, QChar *&out) + { *out++ = c; } + static inline void appendTo(const QLatin1Char c, char *&out) + { *out++ = c.toLatin1(); } +}; +template <> struct QConcatenable : private QAbstractConcatenable +{ + typedef QChar type; + typedef QString ConvertTo; + enum { ExactSize = true }; + static int size(const QChar) { return 1; } + static inline void appendTo(const QChar c, QChar *&out) + { *out++ = c; } + static inline void appendTo(const QChar c, char *&out) + { convertToAscii(c, out); } +}; +template <> struct QConcatenable : private QAbstractConcatenable +{ + typedef QCharRef type; + typedef QString ConvertTo; + enum { ExactSize = true }; + static int size(const QCharRef &) { return 1; } + static inline void appendTo(const QCharRef &c, QChar *&out) + { *out++ = QChar(c); } + static inline void appendTo(const QCharRef &c, char *&out) + { convertToAscii(c, out); } +}; +template <> struct QConcatenable +{ + typedef QLatin1String type; + typedef QString ConvertTo; + enum { ExactSize = true }; + static int size(const QLatin1String &a) { return qstrlen(a.latin1()); } + static inline void appendTo(const QLatin1String &a, QChar *&out) + { + for (const char *s = a.latin1(); *s; ) + *out++ = QLatin1Char(*s++); + } + static inline void appendTo(const QLatin1String &a, char *&out) + { + for (const char *s = a.latin1(); *s; ) + *out++ = *s++; + } +}; +template <> struct QConcatenable +{ + typedef QLatin1Literal type; + typedef QString ConvertTo; + enum { ExactSize = true }; + static int size(const QLatin1Literal &a) { return a.size(); } + static inline void appendTo(const QLatin1Literal &a, QChar *&out) + { + for (const char *s = a.data(); *s; ) + *out++ = QLatin1Char(*s++); + } + static inline void appendTo(const QLatin1Literal &a, char *&out) + { + for (const char *s = a.data(); *s; ) + *out++ = *s++; + } +}; +template <> struct QConcatenable : private QAbstractConcatenable +{ + typedef QString type; + typedef QString ConvertTo; + enum { ExactSize = true }; + static int size(const QString &a) { return a.size(); } + static inline void appendTo(const QString &a, QChar *&out) + { + const int n = a.size(); + memcpy(out, reinterpret_cast(a.constData()), sizeof(QChar) * n); + out += n; + } + static inline void appendTo(const QString &a, char *&out) + { convertToAscii(a.constData(), a.length(), out); } +}; +template <> struct QConcatenable : private QAbstractConcatenable +{ + typedef QStringRef type; + typedef QString ConvertTo; + enum { ExactSize = true }; + static int size(const QStringRef &a) { return a.size(); } + static inline void appendTo(const QStringRef &a, QChar *&out) + { + const int n = a.size(); + memcpy(out, reinterpret_cast(a.constData()), sizeof(QChar) * n); + out += n; + } + static inline void appendTo(const QStringRef &a, char *&out) + { convertToAscii(a.constData(), a.length(), out); } +}; +template struct QConcatenable : private QAbstractConcatenable +{ + typedef char type[N]; + typedef QByteArray ConvertTo; + enum { ExactSize = false }; + static int size(const char[N]) { return N - 1; } + static inline void appendTo(const char a[N], QChar *&out) + { + QAbstractConcatenable::convertFromAscii(a, N, out); + } + static inline void appendTo(const char a[N], char *&out) + { + while (*a) + *out++ = *a++; + } +}; +template struct QConcatenable : private QAbstractConcatenable +{ + typedef const char type[N]; + typedef QByteArray ConvertTo; + enum { ExactSize = false }; + static int size(const char[N]) { return N - 1; } + static inline void appendTo(const char a[N], QChar *&out) + { + QAbstractConcatenable::convertFromAscii(a, N, out); + } + static inline void appendTo(const char a[N], char *&out) + { + while (*a) + *out++ = *a++; + } +}; +template <> struct QConcatenable : private QAbstractConcatenable +{ + typedef char const *type; + typedef QByteArray ConvertTo; + enum { ExactSize = false }; + static int size(const char *a) { return qstrlen(a); } + static inline void appendTo(const char *a, QChar *&out) + { QAbstractConcatenable::convertFromAscii(a, -1, out); } + static inline void appendTo(const char *a, char *&out) + { + if (!a) + return; + while (*a) + *out++ = *a++; + } +}; +template <> struct QConcatenable : private QAbstractConcatenable +{ + typedef QByteArray type; + typedef QByteArray ConvertTo; + enum { ExactSize = false }; + static int size(const QByteArray &ba) { return ba.size(); } + static inline void appendTo(const QByteArray &ba, QChar *&out) + { + QAbstractConcatenable::convertFromAscii(ba.constData(), ba.size() + 1, out); + } + static inline void appendTo(const QByteArray &ba, char *&out) + { + const char *a = ba.constData(); + const char * const end = ba.end(); + while (a != end) + *out++ = *a++; + } +}; +namespace QtStringBuilder { + template struct ConvertToTypeHelper + { typedef A ConvertTo; }; + template struct ConvertToTypeHelper + { typedef QString ConvertTo; }; +} +template +struct QConcatenable< QStringBuilder > +{ + typedef QStringBuilder type; + typedef typename QtStringBuilder::ConvertToTypeHelper::ConvertTo, typename QConcatenable::ConvertTo>::ConvertTo ConvertTo; + enum { ExactSize = QConcatenable::ExactSize && QConcatenable::ExactSize }; + static int size(const type &p) + { + return QConcatenable::size(p.a) + QConcatenable::size(p.b); + } + template static inline void appendTo(const type &p, T *&out) + { + QConcatenable::appendTo(p.a, out); + QConcatenable::appendTo(p.b, out); + } +}; +template +QStringBuilder::type, typename QConcatenable::type> +operator%(const A &a, const B &b) +{ + return QStringBuilder::type, typename QConcatenable::type>(a, b); +} +template +QByteArray &operator+=(QByteArray &a, const QStringBuilder &b) +{ + if (sizeof(typename QConcatenable< QStringBuilder >::ConvertTo::value_type) == sizeof(QChar)) { + return a += QString(b); + } + int len = a.size() + QConcatenable< QStringBuilder >::size(b); + a.reserve(len); + char *it = a.data() + a.size(); + QConcatenable< QStringBuilder >::appendTo(b, it); + a.resize(len); + return a; +} +template +QString &operator+=(QString &a, const QStringBuilder &b) +{ + int len = a.size() + QConcatenable< QStringBuilder >::size(b); + a.reserve(len); + QChar *it = a.data() + a.size(); + QConcatenable< QStringBuilder >::appendTo(b, it); + a.resize(it - a.constData()); + return a; +} +typedef QtValidLicenseForCoreModule QtCoreModule; +class QTextBoundaryFinderPrivate; +class QTextBoundaryFinder +{ +public: + QTextBoundaryFinder(); + QTextBoundaryFinder(const QTextBoundaryFinder &other); + QTextBoundaryFinder &operator=(const QTextBoundaryFinder &other); + ~QTextBoundaryFinder(); + enum BoundaryType { + Grapheme, + Word, + Line, + Sentence + }; + enum BoundaryReason { + NotAtBoundary = 0, + StartWord = 1, + EndWord = 2 + }; + typedef QFlags BoundaryReasons; + QTextBoundaryFinder(BoundaryType type, const QString &string); + QTextBoundaryFinder(BoundaryType type, const QChar *chars, int length, unsigned char *buffer = 0, int bufferSize = 0); + inline bool isValid() const { return d; } + inline BoundaryType type() const { return t; } + QString string() const; + void toStart(); + void toEnd(); + int position() const; + void setPosition(int position); + int toNextBoundary(); + int toPreviousBoundary(); + bool isAtBoundary() const; + BoundaryReasons boundaryReasons() const; +private: + BoundaryType t; + QString s; + const QChar *chars; + int length; + int pos; + uint freePrivate : 1; + uint unused : 31; + QTextBoundaryFinderPrivate *d; +}; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QTimeLinePrivate; +class QTimeLine : public QObject +{ + public: template inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); +public: + enum State { + NotRunning, + Paused, + Running + }; + enum Direction { + Forward, + Backward + }; + enum CurveShape { + EaseInCurve, + EaseOutCurve, + EaseInOutCurve, + LinearCurve, + SineCurve, + CosineCurve + }; + explicit QTimeLine(int duration = 1000, QObject *parent = 0); + virtual ~QTimeLine(); + State state() const; + int loopCount() const; + void setLoopCount(int count); + Direction direction() const; + void setDirection(Direction direction); + int duration() const; + void setDuration(int duration); + int startFrame() const; + void setStartFrame(int frame); + int endFrame() const; + void setEndFrame(int frame); + void setFrameRange(int startFrame, int endFrame); + int updateInterval() const; + void setUpdateInterval(int interval); + CurveShape curveShape() const; + void setCurveShape(CurveShape shape); + QEasingCurve easingCurve() const; + void setEasingCurve(const QEasingCurve &curve); + int currentTime() const; + int currentFrame() const; + qreal currentValue() const; + int frameForTime(int msec) const; + virtual qreal valueForTime(int msec) const; +public : + void start(); + void resume(); + void stop(); + void setPaused(bool paused); + void setCurrentTime(int msec); + void toggleDirection(); +protected: + void valueChanged(qreal x); + void frameChanged(int); + void stateChanged(QTimeLine::State newState); + void finished(); +protected: + void timerEvent(QTimerEvent *event); +private: + QTimeLine(const QTimeLine &); QTimeLine &operator=(const QTimeLine &); + inline QTimeLinePrivate* d_func() { return reinterpret_cast(qGetPtrHelper(d_ptr)); } inline const QTimeLinePrivate* d_func() const { return reinterpret_cast(qGetPtrHelper(d_ptr)); } friend class QTimeLinePrivate; +}; +typedef QtValidLicenseForCoreModule QtCoreModule; +template +class QPodList; +template +class QVarLengthArray +{ +public: + inline explicit QVarLengthArray(int size = 0); + inline QVarLengthArray(const QVarLengthArray &other) + : a(Prealloc), s(0), ptr(reinterpret_cast(array)) + { + append(other.constData(), other.size()); + } + inline ~QVarLengthArray() { + if (QTypeInfo::isComplex) { + T *i = ptr + s; + while (i-- != ptr) + i->~T(); + } + if (ptr != reinterpret_cast(array)) + qFree(ptr); + } + inline QVarLengthArray &operator=(const QVarLengthArray &other) + { + if (this != &other) { + clear(); + append(other.constData(), other.size()); + } + return *this; + } + inline void removeLast() { + qt_noop(); + realloc(s - 1, a); + } + inline int size() const { return s; } + inline int count() const { return s; } + inline bool isEmpty() const { return (s == 0); } + inline void resize(int size); + inline void clear() { resize(0); } + inline int capacity() const { return a; } + inline void reserve(int size); + inline T &operator[](int idx) { + qt_noop(); + return ptr[idx]; + } + inline const T &operator[](int idx) const { + qt_noop(); + return ptr[idx]; + } + inline const T &at(int idx) const { return operator[](idx); } + T value(int i) const; + T value(int i, const T &defaultValue) const; + inline void append(const T &t) { + if (s == a) + realloc(s, s<<1); + const int idx = s++; + if (QTypeInfo::isComplex) { + new (ptr + idx) T(t); + } else { + ptr[idx] = t; + } + } + void append(const T *buf, int size); + inline QVarLengthArray &operator<<(const T &t) + { append(t); return *this; } + inline QVarLengthArray &operator+=(const T &t) + { append(t); return *this; } + void prepend(const T &t); + void insert(int i, const T &t); + void insert(int i, int n, const T &t); + void replace(int i, const T &t); + void remove(int i); + void remove(int i, int n); + inline T *data() { return ptr; } + inline const T *data() const { return ptr; } + inline const T * constData() const { return ptr; } + typedef int size_type; + typedef T value_type; + typedef value_type *pointer; + typedef const value_type *const_pointer; + typedef value_type &reference; + typedef const value_type &const_reference; + typedef qptrdiff difference_type; + typedef T* iterator; + typedef const T* const_iterator; + inline iterator begin() { return ptr; } + inline const_iterator begin() const { return ptr; } + inline const_iterator constBegin() const { return ptr; } + inline iterator end() { return ptr + s; } + inline const_iterator end() const { return ptr + s; } + inline const_iterator constEnd() const { return ptr + s; } + iterator insert(iterator before, int n, const T &x); + inline iterator insert(iterator before, const T &x) { return insert(before, 1, x); } + iterator erase(iterator begin, iterator end); + inline iterator erase(iterator pos) { return erase(pos, pos+1); } +private: + friend class QPodList; + void realloc(int size, int alloc); + int a; + int s; + T *ptr; + union { + char array[sizeof(qint64) * (((Prealloc * sizeof(T)) / sizeof(qint64)) + 1)]; + qint64 q_for_alignment_1; + double q_for_alignment_2; + }; +}; +template +inline QVarLengthArray::QVarLengthArray(int asize) + : s(asize) { + if (s > Prealloc) { + ptr = reinterpret_cast(qMalloc(s * sizeof(T))); + do { if (!(ptr)) qBadAlloc(); } while (0); + a = s; + } else { + ptr = reinterpret_cast(array); + a = Prealloc; + } + if (QTypeInfo::isComplex) { + T *i = ptr + s; + while (i != ptr) + new (--i) T; + } +} +template +inline void QVarLengthArray::resize(int asize) +{ realloc(asize, qMax(asize, a)); } +template +inline void QVarLengthArray::reserve(int asize) +{ if (asize > a) realloc(s, asize); } +template + void QVarLengthArray::append(const T *abuf, int increment) +{ + qt_noop(); + if (increment <= 0) + return; + const int asize = s + increment; + if (asize >= a) + realloc(s, qMax(s*2, asize)); + if (QTypeInfo::isComplex) { + while (s < asize) + new (ptr+(s++)) T(*abuf++); + } else { + qMemCopy(&ptr[s], abuf, increment * sizeof(T)); + s = asize; + } +} +template + void QVarLengthArray::realloc(int asize, int aalloc) +{ + qt_noop(); + T *oldPtr = ptr; + int osize = s; + const int copySize = qMin(asize, osize); + if (aalloc != a) { + ptr = reinterpret_cast(qMalloc(aalloc * sizeof(T))); + do { if (!(ptr)) qBadAlloc(); } while (0); + if (ptr) { + s = 0; + a = aalloc; + if (QTypeInfo::isStatic) { + try { + while (s < copySize) { + new (ptr+s) T(*(oldPtr+s)); + (oldPtr+s)->~T(); + s++; + } + } catch (...) { + int sClean = s; + while (sClean < osize) + (oldPtr+(sClean++))->~T(); + if (oldPtr != reinterpret_cast(array) && oldPtr != ptr) + qFree(oldPtr); + throw; + } + } else { + qMemCopy(ptr, oldPtr, copySize * sizeof(T)); + } + } else { + ptr = oldPtr; + return; + } + } + s = copySize; + if (QTypeInfo::isComplex) { + while (osize > asize) + (oldPtr+(--osize))->~T(); + } + if (oldPtr != reinterpret_cast(array) && oldPtr != ptr) + qFree(oldPtr); + if (QTypeInfo::isComplex) { + while (s < asize) + new (ptr+(s++)) T; + } else { + s = asize; + } +} +template + T QVarLengthArray::value(int i) const +{ + if (i < 0 || i >= size()) { + return T(); + } + return at(i); +} +template + T QVarLengthArray::value(int i, const T &defaultValue) const +{ + return (i < 0 || i >= size()) ? defaultValue : at(i); +} +template +inline void QVarLengthArray::insert(int i, const T &t) +{ qt_noop(); + insert(begin() + i, 1, t); } +template +inline void QVarLengthArray::insert(int i, int n, const T &t) +{ qt_noop(); + insert(begin() + i, n, t); } +template +inline void QVarLengthArray::remove(int i, int n) +{ qt_noop(); + erase(begin() + i, begin() + i + n); } +template +inline void QVarLengthArray::remove(int i) +{ qt_noop(); + erase(begin() + i, begin() + i + 1); } +template +inline void QVarLengthArray::prepend(const T &t) +{ insert(begin(), 1, t); } +template +inline void QVarLengthArray::replace(int i, const T &t) +{ + qt_noop(); + const T copy(t); + data()[i] = copy; +} +template + typename QVarLengthArray::iterator QVarLengthArray::insert(iterator before, size_type n, const T &t) +{ + int offset = int(before - ptr); + if (n != 0) { + resize(s + n); + const T copy(t); + if (QTypeInfo::isStatic) { + T *b = ptr + offset; + T *j = ptr + s; + T *i = j - n; + while (i != b) + *--j = *--i; + i = b + n; + while (i != b) + *--i = copy; + } else { + T *b = ptr + offset; + T *i = b + n; + memmove(i, b, (s - offset - n) * sizeof(T)); + while (i != b) + new (--i) T(copy); + } + } + return ptr + offset; +} +template + typename QVarLengthArray::iterator QVarLengthArray::erase(iterator abegin, iterator aend) +{ + int f = int(abegin - ptr); + int l = int(aend - ptr); + int n = l - f; + if (QTypeInfo::isComplex) { + qCopy(ptr + l, ptr + s, ptr + f); + T *i = ptr + s; + T *b = ptr + s - n; + while (i != b) { + --i; + i->~T(); + } + } else { + memmove(ptr + f, ptr + l, (s - l) * sizeof(T)); + } + s -= n; + return ptr + f; +} +template +bool operator==(const QVarLengthArray &l, const QVarLengthArray &r) +{ + if (l.size() != r.size()) + return false; + for (int i = 0; i < l.size(); i++) { + if (l.at(i) != r.at(i)) + return false; + } + return true; +} +template +bool operator!=(const QVarLengthArray &l, const QVarLengthArray &r) +{ + return !(l == r); +} +typedef QtValidLicenseForCoreModule QtCoreModule; +class QXmlStreamStringRef { + QString m_string; + int m_position, m_size; +public: + inline QXmlStreamStringRef():m_position(0), m_size(0){} + inline QXmlStreamStringRef(const QStringRef &aString) + :m_string(aString.string()?*aString.string():QString()), m_position(aString.position()), m_size(aString.size()){} + inline QXmlStreamStringRef(const QString &aString):m_string(aString), m_position(0), m_size(aString.size()){} + inline ~QXmlStreamStringRef(){} + inline void clear() { m_string.clear(); m_position = m_size = 0; } + inline operator QStringRef() const { return QStringRef(&m_string, m_position, m_size); } + inline const QString *string() const { return &m_string; } + inline int position() const { return m_position; } + inline int size() const { return m_size; } +}; +class QXmlStreamReaderPrivate; +class QXmlStreamAttributes; +class QXmlStreamAttribute { + QXmlStreamStringRef m_name, m_namespaceUri, m_qualifiedName, m_value; + void *reserved; + uint m_isDefault : 1; + friend class QXmlStreamReaderPrivate; + friend class QXmlStreamAttributes; +public: + QXmlStreamAttribute(); + QXmlStreamAttribute(const QString &qualifiedName, const QString &value); + QXmlStreamAttribute(const QString &namespaceUri, const QString &name, const QString &value); + QXmlStreamAttribute(const QXmlStreamAttribute &); + QXmlStreamAttribute& operator=(const QXmlStreamAttribute &); + ~QXmlStreamAttribute(); + inline QStringRef namespaceUri() const { return m_namespaceUri; } + inline QStringRef name() const { return m_name; } + inline QStringRef qualifiedName() const { return m_qualifiedName; } + inline QStringRef prefix() const { + return QStringRef(m_qualifiedName.string(), + m_qualifiedName.position(), + qMax(0, m_qualifiedName.size() - m_name.size() - 1)); + } + inline QStringRef value() const { return m_value; } + inline bool isDefault() const { return m_isDefault; } + inline bool operator==(const QXmlStreamAttribute &other) const { + return (value() == other.value() + && (namespaceUri().isNull() ? (qualifiedName() == other.qualifiedName()) + : (namespaceUri() == other.namespaceUri() && name() == other.name()))); + } + inline bool operator!=(const QXmlStreamAttribute &other) const + { return !operator==(other); } +}; +template<> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QXmlStreamAttribute)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QXmlStreamAttribute"; } }; +class QXmlStreamAttributes : public QVector +{ +public: + inline QXmlStreamAttributes() {} + QStringRef value(const QString &namespaceUri, const QString &name) const; + QStringRef value(const QString &namespaceUri, const QLatin1String &name) const; + QStringRef value(const QLatin1String &namespaceUri, const QLatin1String &name) const; + QStringRef value(const QString &qualifiedName) const; + QStringRef value(const QLatin1String &qualifiedName) const; + void append(const QString &namespaceUri, const QString &name, const QString &value); + void append(const QString &qualifiedName, const QString &value); + inline bool hasAttribute(const QString &qualifiedName) const + { + return !value(qualifiedName).isNull(); + } + inline bool hasAttribute(const QLatin1String &qualifiedName) const + { + return !value(qualifiedName).isNull(); + } + inline bool hasAttribute(const QString &namespaceUri, const QString &name) const + { + return !value(namespaceUri, name).isNull(); + } + using QVector::append; +}; +class QXmlStreamNamespaceDeclaration { + QXmlStreamStringRef m_prefix, m_namespaceUri; + void *reserved; + friend class QXmlStreamReaderPrivate; +public: + QXmlStreamNamespaceDeclaration(); + QXmlStreamNamespaceDeclaration(const QXmlStreamNamespaceDeclaration &); + QXmlStreamNamespaceDeclaration(const QString &prefix, const QString &namespaceUri); + ~QXmlStreamNamespaceDeclaration(); + QXmlStreamNamespaceDeclaration& operator=(const QXmlStreamNamespaceDeclaration &); + inline QStringRef prefix() const { return m_prefix; } + inline QStringRef namespaceUri() const { return m_namespaceUri; } + inline bool operator==(const QXmlStreamNamespaceDeclaration &other) const { + return (prefix() == other.prefix() && namespaceUri() == other.namespaceUri()); + } + inline bool operator!=(const QXmlStreamNamespaceDeclaration &other) const + { return !operator==(other); } +}; +template<> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QXmlStreamNamespaceDeclaration)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QXmlStreamNamespaceDeclaration"; } }; +typedef QVector QXmlStreamNamespaceDeclarations; +class QXmlStreamNotationDeclaration { + QXmlStreamStringRef m_name, m_systemId, m_publicId; + void *reserved; + friend class QXmlStreamReaderPrivate; +public: + QXmlStreamNotationDeclaration(); + ~QXmlStreamNotationDeclaration(); + QXmlStreamNotationDeclaration(const QXmlStreamNotationDeclaration &); + QXmlStreamNotationDeclaration& operator=(const QXmlStreamNotationDeclaration &); + inline QStringRef name() const { return m_name; } + inline QStringRef systemId() const { return m_systemId; } + inline QStringRef publicId() const { return m_publicId; } + inline bool operator==(const QXmlStreamNotationDeclaration &other) const { + return (name() == other.name() && systemId() == other.systemId() + && publicId() == other.publicId()); + } + inline bool operator!=(const QXmlStreamNotationDeclaration &other) const + { return !operator==(other); } +}; +template<> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QXmlStreamNotationDeclaration)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QXmlStreamNotationDeclaration"; } }; +typedef QVector QXmlStreamNotationDeclarations; +class QXmlStreamEntityDeclaration { + QXmlStreamStringRef m_name, m_notationName, m_systemId, m_publicId, m_value; + void *reserved; + friend class QXmlStreamReaderPrivate; +public: + QXmlStreamEntityDeclaration(); + ~QXmlStreamEntityDeclaration(); + QXmlStreamEntityDeclaration(const QXmlStreamEntityDeclaration &); + QXmlStreamEntityDeclaration& operator=(const QXmlStreamEntityDeclaration &); + inline QStringRef name() const { return m_name; } + inline QStringRef notationName() const { return m_notationName; } + inline QStringRef systemId() const { return m_systemId; } + inline QStringRef publicId() const { return m_publicId; } + inline QStringRef value() const { return m_value; } + inline bool operator==(const QXmlStreamEntityDeclaration &other) const { + return (name() == other.name() + && notationName() == other.notationName() + && systemId() == other.systemId() + && publicId() == other.publicId() + && value() == other.value()); + } + inline bool operator!=(const QXmlStreamEntityDeclaration &other) const + { return !operator==(other); } +}; +template<> class QTypeInfo { public: enum { isComplex = (((Q_MOVABLE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_MOVABLE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isLarge = (sizeof(QXmlStreamEntityDeclaration)>sizeof(void*)), isPointer = false, isDummy = (((Q_MOVABLE_TYPE) & Q_DUMMY_TYPE) != 0) }; static inline const char *name() { return "QXmlStreamEntityDeclaration"; } }; +typedef QVector QXmlStreamEntityDeclarations; +class QXmlStreamEntityResolver +{ +public: + virtual ~QXmlStreamEntityResolver(); + virtual QString resolveEntity(const QString& publicId, const QString& systemId); + virtual QString resolveUndeclaredEntity(const QString &name); +}; +class QXmlStreamReader { +public: + enum TokenType { + NoToken = 0, + Invalid, + StartDocument, + EndDocument, + StartElement, + EndElement, + Characters, + Comment, + DTD, + EntityReference, + ProcessingInstruction + }; + QXmlStreamReader(); + QXmlStreamReader(QIODevice *device); + QXmlStreamReader(const QByteArray &data); + QXmlStreamReader(const QString &data); + QXmlStreamReader(const char * data); + ~QXmlStreamReader(); + void setDevice(QIODevice *device); + QIODevice *device() const; + void addData(const QByteArray &data); + void addData(const QString &data); + void addData(const char *data); + void clear(); + bool atEnd() const; + TokenType readNext(); + bool readNextStartElement(); + void skipCurrentElement(); + TokenType tokenType() const; + QString tokenString() const; + void setNamespaceProcessing(bool); + bool namespaceProcessing() const; + inline bool isStartDocument() const { return tokenType() == StartDocument; } + inline bool isEndDocument() const { return tokenType() == EndDocument; } + inline bool isStartElement() const { return tokenType() == StartElement; } + inline bool isEndElement() const { return tokenType() == EndElement; } + inline bool isCharacters() const { return tokenType() == Characters; } + bool isWhitespace() const; + bool isCDATA() const; + inline bool isComment() const { return tokenType() == Comment; } + inline bool isDTD() const { return tokenType() == DTD; } + inline bool isEntityReference() const { return tokenType() == EntityReference; } + inline bool isProcessingInstruction() const { return tokenType() == ProcessingInstruction; } + bool isStandaloneDocument() const; + QStringRef documentVersion() const; + QStringRef documentEncoding() const; + qint64 lineNumber() const; + qint64 columnNumber() const; + qint64 characterOffset() const; + QXmlStreamAttributes attributes() const; + enum ReadElementTextBehaviour { + ErrorOnUnexpectedElement, + IncludeChildElements, + SkipChildElements + }; + QString readElementText(ReadElementTextBehaviour behaviour); + QString readElementText(); + QStringRef name() const; + QStringRef namespaceUri() const; + QStringRef qualifiedName() const; + QStringRef prefix() const; + QStringRef processingInstructionTarget() const; + QStringRef processingInstructionData() const; + QStringRef text() const; + QXmlStreamNamespaceDeclarations namespaceDeclarations() const; + void addExtraNamespaceDeclaration(const QXmlStreamNamespaceDeclaration &extraNamespaceDeclaraction); + void addExtraNamespaceDeclarations(const QXmlStreamNamespaceDeclarations &extraNamespaceDeclaractions); + QXmlStreamNotationDeclarations notationDeclarations() const; + QXmlStreamEntityDeclarations entityDeclarations() const; + QStringRef dtdName() const; + QStringRef dtdPublicId() const; + QStringRef dtdSystemId() const; + enum Error { + NoError, + UnexpectedElementError, + CustomError, + NotWellFormedError, + PrematureEndOfDocumentError + }; + void raiseError(const QString& message = QString()); + QString errorString() const; + Error error() const; + inline bool hasError() const + { + return error() != NoError; + } + void setEntityResolver(QXmlStreamEntityResolver *resolver); + QXmlStreamEntityResolver *entityResolver() const; +private: + QXmlStreamReader(const QXmlStreamReader &); QXmlStreamReader &operator=(const QXmlStreamReader &); + inline QXmlStreamReaderPrivate* d_func() { return reinterpret_cast(qGetPtrHelper(d_ptr)); } inline const QXmlStreamReaderPrivate* d_func() const { return reinterpret_cast(qGetPtrHelper(d_ptr)); } friend class QXmlStreamReaderPrivate; + QScopedPointer d_ptr; +}; +class QXmlStreamWriterPrivate; +class QXmlStreamWriter +{ +public: + QXmlStreamWriter(); + QXmlStreamWriter(QIODevice *device); + QXmlStreamWriter(QByteArray *array); + QXmlStreamWriter(QString *string); + ~QXmlStreamWriter(); + void setDevice(QIODevice *device); + QIODevice *device() const; + void setCodec(QTextCodec *codec); + void setCodec(const char *codecName); + QTextCodec *codec() const; + void setAutoFormatting(bool); + bool autoFormatting() const; + void setAutoFormattingIndent(int spacesOrTabs); + int autoFormattingIndent() const; + void writeAttribute(const QString &qualifiedName, const QString &value); + void writeAttribute(const QString &namespaceUri, const QString &name, const QString &value); + void writeAttribute(const QXmlStreamAttribute& attribute); + void writeAttributes(const QXmlStreamAttributes& attributes); + void writeCDATA(const QString &text); + void writeCharacters(const QString &text); + void writeComment(const QString &text); + void writeDTD(const QString &dtd); + void writeEmptyElement(const QString &qualifiedName); + void writeEmptyElement(const QString &namespaceUri, const QString &name); + void writeTextElement(const QString &qualifiedName, const QString &text); + void writeTextElement(const QString &namespaceUri, const QString &name, const QString &text); + void writeEndDocument(); + void writeEndElement(); + void writeEntityReference(const QString &name); + void writeNamespace(const QString &namespaceUri, const QString &prefix = QString()); + void writeDefaultNamespace(const QString &namespaceUri); + void writeProcessingInstruction(const QString &target, const QString &data = QString()); + void writeStartDocument(); + void writeStartDocument(const QString &version); + void writeStartDocument(const QString &version, bool standalone); + void writeStartElement(const QString &qualifiedName); + void writeStartElement(const QString &namespaceUri, const QString &name); + void writeCurrentToken(const QXmlStreamReader &reader); + bool hasError() const; +private: + QXmlStreamWriter(const QXmlStreamWriter &); QXmlStreamWriter &operator=(const QXmlStreamWriter &); + inline QXmlStreamWriterPrivate* d_func() { return reinterpret_cast(qGetPtrHelper(d_ptr)); } inline const QXmlStreamWriterPrivate* d_func() const { return reinterpret_cast(qGetPtrHelper(d_ptr)); } friend class QXmlStreamWriterPrivate; + QScopedPointer d_ptr; +}; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QTextCodec; +class QIODevice; +class QTextDecoder; +class QTextEncoder; +class QTextCodec +{ + QTextCodec(const QTextCodec &); QTextCodec &operator=(const QTextCodec &); +public: + static QTextCodec* codecForName(const QByteArray &name); + static QTextCodec* codecForName(const char *name) { return codecForName(QByteArray(name)); } + static QTextCodec* codecForMib(int mib); + static QList availableCodecs(); + static QList availableMibs(); + static QTextCodec* codecForLocale(); + static void setCodecForLocale(QTextCodec *c); + static QTextCodec* codecForTr(); + static void setCodecForTr(QTextCodec *c); + static QTextCodec* codecForCStrings(); + static void setCodecForCStrings(QTextCodec *c); + static QTextCodec *codecForHtml(const QByteArray &ba); + static QTextCodec *codecForHtml(const QByteArray &ba, QTextCodec *defaultCodec); + static QTextCodec *codecForUtfText(const QByteArray &ba); + static QTextCodec *codecForUtfText(const QByteArray &ba, QTextCodec *defaultCodec); + bool canEncode(QChar) const; + bool canEncode(const QString&) const; + QString toUnicode(const QByteArray&) const; + QString toUnicode(const char* chars) const; + QByteArray fromUnicode(const QString& uc) const; + enum ConversionFlag { + DefaultConversion, + ConvertInvalidToNull = 0x80000000, + IgnoreHeader = 0x1, + FreeFunction = 0x2 + }; + typedef QFlags ConversionFlags; + struct ConverterState { + ConverterState(ConversionFlags f = DefaultConversion) + : flags(f), remainingChars(0), invalidChars(0), d(0) { state_data[0] = state_data[1] = state_data[2] = 0; } + ~ConverterState(); + ConversionFlags flags; + int remainingChars; + int invalidChars; + uint state_data[3]; + void *d; + private: + ConverterState(const ConverterState &); ConverterState &operator=(const ConverterState &); + }; + QString toUnicode(const char *in, int length, ConverterState *state = 0) const + { return convertToUnicode(in, length, state); } + QByteArray fromUnicode(const QChar *in, int length, ConverterState *state = 0) const + { return convertFromUnicode(in, length, state); } + QTextDecoder* makeDecoder() const; + QTextDecoder* makeDecoder(ConversionFlags flags) const; + QTextEncoder* makeEncoder() const; + QTextEncoder* makeEncoder(ConversionFlags flags) const; + virtual QByteArray name() const = 0; + virtual QList aliases() const; + virtual int mibEnum() const = 0; +protected: + virtual QString convertToUnicode(const char *in, int length, ConverterState *state) const = 0; + virtual QByteArray convertFromUnicode(const QChar *in, int length, ConverterState *state) const = 0; + QTextCodec(); + virtual ~QTextCodec(); +public: +private: + friend class QTextCodecCleanup; + static QTextCodec *cftr; + static bool validCodecs(); +}; + inline QFlags operator|(QTextCodec::ConversionFlags::enum_type f1, QTextCodec::ConversionFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(QTextCodec::ConversionFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QTextCodec::ConversionFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } + inline QTextCodec* QTextCodec::codecForTr() { return validCodecs() ? cftr : 0; } +inline void QTextCodec::setCodecForTr(QTextCodec *c) { cftr = c; } +inline QTextCodec* QTextCodec::codecForCStrings() { return validCodecs() ? QString::codecForCStrings : 0; } +inline void QTextCodec::setCodecForCStrings(QTextCodec *c) { QString::codecForCStrings = c; } +class QTextEncoder { + QTextEncoder(const QTextEncoder &); QTextEncoder &operator=(const QTextEncoder &); +public: + explicit QTextEncoder(const QTextCodec *codec) : c(codec), state() {} + QTextEncoder(const QTextCodec *codec, QTextCodec::ConversionFlags flags); + ~QTextEncoder(); + QByteArray fromUnicode(const QString& str); + QByteArray fromUnicode(const QChar *uc, int len); + bool hasFailure() const; +private: + const QTextCodec *c; + QTextCodec::ConverterState state; +}; +class QTextDecoder { + QTextDecoder(const QTextDecoder &); QTextDecoder &operator=(const QTextDecoder &); +public: + explicit QTextDecoder(const QTextCodec *codec) : c(codec), state() {} + QTextDecoder(const QTextCodec *codec, QTextCodec::ConversionFlags flags); + ~QTextDecoder(); + QString toUnicode(const char* chars, int len); + QString toUnicode(const QByteArray &ba); + void toUnicode(QString *target, const char *chars, int len); + bool hasFailure() const; +private: + const QTextCodec *c; + QTextCodec::ConverterState state; +}; +typedef QtValidLicenseForCoreModule QtCoreModule; +template +class QPointer +{ + QObject *o; +public: + inline QPointer() : o(0) {} + inline QPointer(T *p) : o(p) + { QMetaObject::addGuard(&o); } + inline QPointer(const QPointer &p) : o(p.o) + { QMetaObject::addGuard(&o); } + inline ~QPointer() + { QMetaObject::removeGuard(&o); } + inline QPointer &operator=(const QPointer &p) + { if (this != &p) QMetaObject::changeGuard(&o, p.o); return *this; } + inline QPointer &operator=(T* p) + { if (o != p) QMetaObject::changeGuard(&o, p); return *this; } + inline bool isNull() const + { return !o; } + inline T* operator->() const + { return static_cast(const_cast(o)); } + inline T& operator*() const + { return *static_cast(const_cast(o)); } + inline operator T*() const + { return static_cast(const_cast(o)); } + inline T* data() const + { return static_cast(const_cast(o)); } +}; +template +inline bool operator==(const T *o, const QPointer &p) +{ return o == p.operator->(); } +template +inline bool operator==(const QPointer &p, const T *o) +{ return p.operator->() == o; } +template +inline bool operator==(T *o, const QPointer &p) +{ return o == p.operator->(); } +template +inline bool operator==(const QPointer &p, T *o) +{ return p.operator->() == o; } +template +inline bool operator==(const QPointer &p1, const QPointer &p2) +{ return p1.operator->() == p2.operator->(); } +template +inline bool operator!=(const T *o, const QPointer &p) +{ return o != p.operator->(); } +template +inline bool operator!= (const QPointer &p, const T *o) +{ return p.operator->() != o; } +template +inline bool operator!=(T *o, const QPointer &p) +{ return o != p.operator->(); } +template +inline bool operator!= (const QPointer &p, T *o) +{ return p.operator->() != o; } +template +inline bool operator!= (const QPointer &p1, const QPointer &p2) +{ return p1.operator->() != p2.operator->() ; } +typedef QtValidLicenseForCoreModule QtCoreModule; +typedef QObject *(*QtPluginInstanceFunction)(); +void qRegisterStaticPluginInstanceFunction(QtPluginInstanceFunction function); +typedef QtValidLicenseForCoreModule QtCoreModule; +struct QFactoryInterface +{ + virtual ~QFactoryInterface() {} + virtual QStringList keys() const = 0; +}; +template <> inline const char *qobject_interface_iid() { return "com.trolltech.Qt.QFactoryInterface"; } template <> inline QFactoryInterface *qobject_cast(QObject *object) { return reinterpret_cast((object ? object->qt_metacast("com.trolltech.Qt.QFactoryInterface") : 0)); } template <> inline QFactoryInterface *qobject_cast(const QObject *object) { return reinterpret_cast((object ? const_cast(object)->qt_metacast("com.trolltech.Qt.QFactoryInterface") : 0)); } +typedef QtValidLicenseForCoreModule QtCoreModule; +class QTextCodec; +struct QTextCodecFactoryInterface : public QFactoryInterface +{ + virtual QTextCodec *create(const QString &key) = 0; +}; +template <> inline const char *qobject_interface_iid() { return "com.trolltech.Qt.QTextCodecFactoryInterface"; } template <> inline QTextCodecFactoryInterface *qobject_cast(QObject *object) { return reinterpret_cast((object ? object->qt_metacast("com.trolltech.Qt.QTextCodecFactoryInterface") : 0)); } template <> inline QTextCodecFactoryInterface *qobject_cast(const QObject *object) { return reinterpret_cast((object ? const_cast(object)->qt_metacast("com.trolltech.Qt.QTextCodecFactoryInterface") : 0)); } +class QTextCodecPlugin : public QObject, public QTextCodecFactoryInterface +{ + public: template inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); +public: + explicit QTextCodecPlugin(QObject *parent = 0); + ~QTextCodecPlugin(); + virtual QList names() const = 0; + virtual QList aliases() const = 0; + virtual QTextCodec *createForName(const QByteArray &name) = 0; + virtual QList mibEnums() const = 0; + virtual QTextCodec *createForMib(int mib) = 0; +private: + QStringList keys() const; + QTextCodec *create(const QString &name); +}; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QRunnable +{ + int ref; + friend class QThreadPool; + friend class QThreadPoolPrivate; + friend class QThreadPoolThread; +public: + virtual void run() = 0; + QRunnable() : ref(0) { } + virtual ~QRunnable() { } + bool autoDelete() const { return ref != -1; } + void setAutoDelete(bool _autoDelete) { ref = _autoDelete ? 0 : -1; } +}; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QAtomicInt; +class QMutexData; +class QMutex +{ + friend class QWaitCondition; + friend class QWaitConditionPrivate; +public: + enum RecursionMode { NonRecursive, Recursive }; + explicit QMutex(RecursionMode mode = NonRecursive); + ~QMutex(); + void lock(); + inline void lockInline(); + bool tryLock(); + bool tryLock(int timeout); + inline bool tryLockInline(); + void unlock(); + inline void unlockInline(); +private: + void lockInternal(); + void unlockInternal(); + QMutex(const QMutex &); QMutex &operator=(const QMutex &); + QMutexData *d; +}; +class QMutexLocker +{ +public: + inline explicit QMutexLocker(QMutex *m) + { + qt_noop() + ; + if (m) { + m->lockInline(); + val = reinterpret_cast(m) | quintptr(1u); + } else { + val = 0; + } + } + inline ~QMutexLocker() { unlock(); } + inline void unlock() + { + if ((val & quintptr(1u)) == quintptr(1u)) { + val &= ~quintptr(1u); + mutex()->unlockInline(); + } + } + inline void relock() + { + if (val) { + if ((val & quintptr(1u)) == quintptr(0u)) { + mutex()->lockInline(); + val |= quintptr(1u); + } + } + } + inline QMutex *mutex() const + { + return reinterpret_cast(val & ~quintptr(1u)); + } +private: + QMutexLocker(const QMutexLocker &); QMutexLocker &operator=(const QMutexLocker &); + quintptr val; +}; +class QMutexData +{ + public: + QAtomicInt contenders; + const uint recursive : 1; + uint reserved : 31; + protected: + QMutexData(QMutex::RecursionMode mode); + ~QMutexData(); +}; +inline void QMutex::unlockInline() +{ + if (d->recursive) { + unlock(); + } else if (!d->contenders.testAndSetRelease(1, 0)) { + unlockInternal(); + } +} +inline bool QMutex::tryLockInline() +{ + if (d->recursive) { + return tryLock(); + } else { + return d->contenders.testAndSetAcquire(0, 1); + } +} +inline void QMutex::lockInline() +{ + if (d->recursive) { + lock(); + } else if(!tryLockInline()) { + lockInternal(); + } +} +typedef QtValidLicenseForCoreModule QtCoreModule; +namespace QtConcurrent +{ +class Exception : public std::exception +{ +public: + virtual void raise() const; + virtual Exception *clone() const; +}; +class UnhandledException : public Exception +{ +public: + void raise() const; + Exception *clone() const; +}; +namespace internal { +class Base; +class ExceptionHolder +{ +public: + ExceptionHolder(Exception *exception = 0); + ExceptionHolder(const ExceptionHolder &other); + void operator=(const ExceptionHolder &other); + ~ExceptionHolder(); + Exception *exception() const; + Base *base; +}; +class ExceptionStore +{ +public: + void setException(const Exception &e); + bool hasException() const; + ExceptionHolder exception(); + void throwPossibleException(); + bool hasThrown() const; + ExceptionHolder exceptionHolder; +}; +} +} +extern "C" { +typedef struct +{ + __off_t __pos; + __mbstate_t __state; +} _G_fpos_t; +typedef struct +{ + __off64_t __pos; + __mbstate_t __state; +} _G_fpos64_t; +typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); +typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); +typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__))); +typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); +struct _IO_jump_t; struct _IO_FILE; +typedef void _IO_lock_t; +struct _IO_marker { + struct _IO_marker *_next; + struct _IO_FILE *_sbuf; + int _pos; +}; +enum __codecvt_result +{ + __codecvt_ok, + __codecvt_partial, + __codecvt_error, + __codecvt_noconv +}; +struct _IO_FILE { + int _flags; + char* _IO_read_ptr; + char* _IO_read_end; + char* _IO_read_base; + char* _IO_write_base; + char* _IO_write_ptr; + char* _IO_write_end; + char* _IO_buf_base; + char* _IO_buf_end; + char *_IO_save_base; + char *_IO_backup_base; + char *_IO_save_end; + struct _IO_marker *_markers; + struct _IO_FILE *_chain; + int _fileno; + int _flags2; + __off_t _old_offset; + unsigned short _cur_column; + signed char _vtable_offset; + char _shortbuf[1]; + _IO_lock_t *_lock; + __off64_t _offset; + void *__pad1; + void *__pad2; + void *__pad3; + void *__pad4; + size_t __pad5; + int _mode; + char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; +}; +struct _IO_FILE_plus; +extern struct _IO_FILE_plus _IO_2_1_stdin_; +extern struct _IO_FILE_plus _IO_2_1_stdout_; +extern struct _IO_FILE_plus _IO_2_1_stderr_; +typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); +typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf, + size_t __n); +typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); +typedef int __io_close_fn (void *__cookie); +typedef __io_read_fn cookie_read_function_t; +typedef __io_write_fn cookie_write_function_t; +typedef __io_seek_fn cookie_seek_function_t; +typedef __io_close_fn cookie_close_function_t; +typedef struct +{ + __io_read_fn *read; + __io_write_fn *write; + __io_seek_fn *seek; + __io_close_fn *close; +} _IO_cookie_io_functions_t; +typedef _IO_cookie_io_functions_t cookie_io_functions_t; +struct _IO_cookie_file; +extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, + void *__cookie, _IO_cookie_io_functions_t __fns); +extern "C" { +extern int __underflow (_IO_FILE *); +extern int __uflow (_IO_FILE *); +extern int __overflow (_IO_FILE *, int); +extern int _IO_getc (_IO_FILE *__fp); +extern int _IO_putc (int __c, _IO_FILE *__fp); +extern int _IO_feof (_IO_FILE *__fp) throw (); +extern int _IO_ferror (_IO_FILE *__fp) throw (); +extern int _IO_peekc_locked (_IO_FILE *__fp); +extern void _IO_flockfile (_IO_FILE *) throw (); +extern void _IO_funlockfile (_IO_FILE *) throw (); +extern int _IO_ftrylockfile (_IO_FILE *) throw (); +extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, + __gnuc_va_list, int *__restrict); +extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, + __gnuc_va_list); +extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); +extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); +extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); +extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); +extern void _IO_free_backup_area (_IO_FILE *) throw (); +} +typedef _G_fpos_t fpos_t; +typedef _G_fpos64_t fpos64_t; +extern struct _IO_FILE *stdin; +extern struct _IO_FILE *stdout; +extern struct _IO_FILE *stderr; +extern int remove (__const char *__filename) throw (); +extern int rename (__const char *__old, __const char *__new) throw (); +extern int renameat (int __oldfd, __const char *__old, int __newfd, + __const char *__new) throw (); +extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__)); +extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__)); +extern char *tmpnam (char *__s) throw () __attribute__ ((__warn_unused_result__)); +extern char *tmpnam_r (char *__s) throw () __attribute__ ((__warn_unused_result__)); +extern char *tempnam (__const char *__dir, __const char *__pfx) + throw () __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); +extern int fclose (FILE *__stream); +extern int fflush (FILE *__stream); +extern int fflush_unlocked (FILE *__stream); +extern int fcloseall (void); +extern FILE *fopen (__const char *__restrict __filename, + __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); +extern FILE *freopen (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern FILE *fopen64 (__const char *__restrict __filename, + __const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); +extern FILE *freopen64 (__const char *__restrict __filename, + __const char *__restrict __modes, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern FILE *fdopen (int __fd, __const char *__modes) throw () __attribute__ ((__warn_unused_result__)); +extern FILE *fopencookie (void *__restrict __magic_cookie, + __const char *__restrict __modes, + _IO_cookie_io_functions_t __io_funcs) throw () __attribute__ ((__warn_unused_result__)); +extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes) + throw () __attribute__ ((__warn_unused_result__)); +extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () __attribute__ ((__warn_unused_result__)); +extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw (); +extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, + int __modes, size_t __n) throw (); +extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, + size_t __size) throw (); +extern void setlinebuf (FILE *__stream) throw (); +extern int fprintf (FILE *__restrict __stream, + __const char *__restrict __format, ...); +extern int printf (__const char *__restrict __format, ...); +extern int sprintf (char *__restrict __s, + __const char *__restrict __format, ...) throw (); +extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg); +extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg); +extern int vsprintf (char *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) throw (); +extern int snprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, ...) + throw () __attribute__ ((__format__ (__printf__, 3, 4))); +extern int vsnprintf (char *__restrict __s, size_t __maxlen, + __const char *__restrict __format, __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__printf__, 3, 0))); +extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f, + __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__)); +extern int __asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + throw () __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +extern int asprintf (char **__restrict __ptr, + __const char *__restrict __fmt, ...) + throw () __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__)); +extern int vdprintf (int __fd, __const char *__restrict __fmt, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 2, 0))); +extern int dprintf (int __fd, __const char *__restrict __fmt, ...) + __attribute__ ((__format__ (__printf__, 2, 3))); +extern int fscanf (FILE *__restrict __stream, + __const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); +extern int scanf (__const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); +extern int sscanf (__const char *__restrict __s, + __const char *__restrict __format, ...) throw (); +extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format, + __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); +extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg) + __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); +extern int vsscanf (__const char *__restrict __s, + __const char *__restrict __format, __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__scanf__, 2, 0))); +extern int fgetc (FILE *__stream); +extern int getc (FILE *__stream); +extern int getchar (void); +extern int getc_unlocked (FILE *__stream); +extern int getchar_unlocked (void); +extern int fgetc_unlocked (FILE *__stream); +extern int fputc (int __c, FILE *__stream); +extern int putc (int __c, FILE *__stream); +extern int putchar (int __c); +extern int fputc_unlocked (int __c, FILE *__stream); +extern int putc_unlocked (int __c, FILE *__stream); +extern int putchar_unlocked (int __c); +extern int getw (FILE *__stream); +extern int putw (int __w, FILE *__stream); +extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) + __attribute__ ((__warn_unused_result__)); +extern char *gets (char *__s) __attribute__ ((__warn_unused_result__)); +extern char *fgets_unlocked (char *__restrict __s, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern __ssize_t __getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern __ssize_t getdelim (char **__restrict __lineptr, + size_t *__restrict __n, int __delimiter, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern __ssize_t getline (char **__restrict __lineptr, + size_t *__restrict __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern int fputs (__const char *__restrict __s, FILE *__restrict __stream); +extern int puts (__const char *__s); +extern int ungetc (int __c, FILE *__stream); +extern size_t fread (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t fwrite (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __s) __attribute__ ((__warn_unused_result__)); +extern int fputs_unlocked (__const char *__restrict __s, + FILE *__restrict __stream); +extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size, + size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern int fseek (FILE *__stream, long int __off, int __whence); +extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)); +extern void rewind (FILE *__stream); +extern int fseeko (FILE *__stream, __off_t __off, int __whence); +extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__)); +extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); +extern int fsetpos (FILE *__stream, __const fpos_t *__pos); +extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); +extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__)); +extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); +extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos); +extern void clearerr (FILE *__stream) throw (); +extern int feof (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); +extern int ferror (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); +extern void clearerr_unlocked (FILE *__stream) throw (); +extern int feof_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); +extern int ferror_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); +extern void perror (__const char *__s); +extern int sys_nerr; +extern __const char *__const sys_errlist[]; +extern int _sys_nerr; +extern __const char *__const _sys_errlist[]; +extern int fileno (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); +extern int fileno_unlocked (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); +extern FILE *popen (__const char *__command, __const char *__modes) __attribute__ ((__warn_unused_result__)); +extern int pclose (FILE *__stream); +extern char *ctermid (char *__s) throw (); +extern char *cuserid (char *__s); +struct obstack; +extern int obstack_printf (struct obstack *__restrict __obstack, + __const char *__restrict __format, ...) + throw () __attribute__ ((__format__ (__printf__, 2, 3))); +extern int obstack_vprintf (struct obstack *__restrict __obstack, + __const char *__restrict __format, + __gnuc_va_list __args) + throw () __attribute__ ((__format__ (__printf__, 2, 0))); +extern void flockfile (FILE *__stream) throw (); +extern int ftrylockfile (FILE *__stream) throw () __attribute__ ((__warn_unused_result__)); +extern void funlockfile (FILE *__stream) throw (); +extern __inline __attribute__ ((__gnu_inline__)) int +getchar (void) +{ + return _IO_getc (stdin); +} +extern __inline __attribute__ ((__gnu_inline__)) int +fgetc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} +extern __inline __attribute__ ((__gnu_inline__)) int +getc_unlocked (FILE *__fp) +{ + return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); +} +extern __inline __attribute__ ((__gnu_inline__)) int +getchar_unlocked (void) +{ + return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); +} +extern __inline __attribute__ ((__gnu_inline__)) int +putchar (int __c) +{ + return _IO_putc (__c, stdout); +} +extern __inline __attribute__ ((__gnu_inline__)) int +fputc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} +extern __inline __attribute__ ((__gnu_inline__)) int +putc_unlocked (int __c, FILE *__stream) +{ + return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); +} +extern __inline __attribute__ ((__gnu_inline__)) int +putchar_unlocked (int __c) +{ + return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); +} +extern __inline __attribute__ ((__gnu_inline__)) __ssize_t +getline (char **__lineptr, size_t *__n, FILE *__stream) +{ + return __getdelim (__lineptr, __n, '\n', __stream); +} +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__leaf__)) feof_unlocked (FILE *__stream) throw () +{ + return (((__stream)->_flags & 0x10) != 0); +} +extern __inline __attribute__ ((__gnu_inline__)) int +__attribute__ ((__leaf__)) ferror_unlocked (FILE *__stream) throw () +{ + return (((__stream)->_flags & 0x20) != 0); +} +extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, + __const char *__restrict __format, ...) throw (); +extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, + __const char *__restrict __format, + __gnuc_va_list __ap) throw (); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__leaf__)) sprintf (char *__restrict __s, __const char *__restrict __fmt, ...) throw () +{ + return __builtin___sprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__leaf__)) vsprintf (char *__restrict __s, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () +{ + return __builtin___vsprintf_chk (__s, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} +extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, __const char *__restrict __format, + ...) throw (); +extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, + size_t __slen, __const char *__restrict __format, + __gnuc_va_list __ap) throw (); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__leaf__)) snprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, ...) throw () +{ + return __builtin___snprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__leaf__)) vsnprintf (char *__restrict __s, size_t __n, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () +{ + return __builtin___vsnprintf_chk (__s, __n, 2 - 1, + __builtin_object_size (__s, 2 > 1), __fmt, __ap); +} +extern int __fprintf_chk (FILE *__restrict __stream, int __flag, + __const char *__restrict __format, ...); +extern int __printf_chk (int __flag, __const char *__restrict __format, ...); +extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, + __const char *__restrict __format, __gnuc_va_list __ap); +extern int __vprintf_chk (int __flag, __const char *__restrict __format, + __gnuc_va_list __ap); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +fprintf (FILE *__restrict __stream, __const char *__restrict __fmt, ...) +{ + return __fprintf_chk (__stream, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +printf (__const char *__restrict __fmt, ...) +{ + return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vprintf (__const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vfprintf (FILE *__restrict __stream, + __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap); +} +extern int __asprintf_chk (char **__restrict __ptr, int __flag, + __const char *__restrict __fmt, ...) + throw () __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__)); +extern int __vasprintf_chk (char **__restrict __ptr, int __flag, + __const char *__restrict __fmt, __gnuc_va_list __arg) + throw () __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__)); +extern int __dprintf_chk (int __fd, int __flag, __const char *__restrict __fmt, + ...) __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __vdprintf_chk (int __fd, int __flag, + __const char *__restrict __fmt, __gnuc_va_list __arg) + __attribute__ ((__format__ (__printf__, 3, 0))); +extern int __obstack_printf_chk (struct obstack *__restrict __obstack, + int __flag, __const char *__restrict __format, + ...) + throw () __attribute__ ((__format__ (__printf__, 3, 4))); +extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack, + int __flag, + __const char *__restrict __format, + __gnuc_va_list __args) + throw () __attribute__ ((__format__ (__printf__, 3, 0))); +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__leaf__)) asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__leaf__)) __asprintf (char **__restrict __ptr, __const char *__restrict __fmt, ...) throw () +{ + return __asprintf_chk (__ptr, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +dprintf (int __fd, __const char *__restrict __fmt, ...) +{ + return __dprintf_chk (__fd, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__leaf__)) obstack_printf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, ...) throw () +{ + return __obstack_printf_chk (__obstack, 2 - 1, __fmt, + __builtin_va_arg_pack ()); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__leaf__)) vasprintf (char **__restrict __ptr, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () +{ + return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +vdprintf (int __fd, __const char *__restrict __fmt, __gnuc_va_list __ap) +{ + return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap); +} +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) int +__attribute__ ((__leaf__)) obstack_vprintf (struct obstack *__restrict __obstack, __const char *__restrict __fmt, __gnuc_va_list __ap) throw () +{ + return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt, + __ap); +} +extern char *__gets_chk (char *__str, size_t) __attribute__ ((__warn_unused_result__)); +extern char *__gets_warn (char *__str) __asm__ ("" "gets") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use fgets or getline instead, gets can't " "specify buffer size"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +gets (char *__str) +{ + if (__builtin_object_size (__str, 2 > 1) != (size_t) -1) + return __gets_chk (__str, __builtin_object_size (__str, 2 > 1)); + return __gets_warn (__str); +} +extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_alias (__s, __n, __stream); +} +extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); + } + return __fread_alias (__ptr, __size, __n, __stream); +} +extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size, + int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked") + __attribute__ ((__warn_unused_result__)); +extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) char * +fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) +{ + if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) + { + if (!__builtin_constant_p (__n) || __n <= 0) + return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) + return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); + } + return __fgets_unlocked_alias (__s, __n, __stream); +} +extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, + size_t __size, size_t __n, + FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") + __attribute__ ((__warn_unused_result__)); +extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk") + __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"))) + ; +extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__)) __attribute__ ((__warn_unused_result__)) size_t +fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, + FILE *__restrict __stream) +{ + if (__builtin_object_size (__ptr, 0) != (size_t) -1) + { + if (!__builtin_constant_p (__size) + || !__builtin_constant_p (__n) + || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) + return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + if (__size * __n > __builtin_object_size (__ptr, 0)) + return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, + __stream); + } + if (__builtin_constant_p (__size) + && __builtin_constant_p (__n) + && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) + && __size * __n <= 8) + { + size_t __cnt = __size * __n; + char *__cptr = (char *) __ptr; + if (__cnt == 0) + return 0; + for (; __cnt > 0; --__cnt) + { + int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++); + if (__c == (-1)) + break; + *__cptr++ = __c; + } + return (__cptr - (char *) __ptr) / __size; + } + return __fread_unlocked_alias (__ptr, __size, __n, __stream); +} +} +typedef QtValidLicenseForCoreModule QtCoreModule; +class QTextCodec; +class QTextDecoder; +class QTextStreamPrivate; +class QTextStream +{ + inline QTextStreamPrivate* d_func() { return reinterpret_cast(qGetPtrHelper(d_ptr)); } inline const QTextStreamPrivate* d_func() const { return reinterpret_cast(qGetPtrHelper(d_ptr)); } friend class QTextStreamPrivate; +public: + enum RealNumberNotation { + SmartNotation, + FixedNotation, + ScientificNotation + }; + enum FieldAlignment { + AlignLeft, + AlignRight, + AlignCenter, + AlignAccountingStyle + }; + enum Status { + Ok, + ReadPastEnd, + ReadCorruptData, + WriteFailed + }; + enum NumberFlag { + ShowBase = 0x1, + ForcePoint = 0x2, + ForceSign = 0x4, + UppercaseBase = 0x8, + UppercaseDigits = 0x10 + }; + typedef QFlags NumberFlags; + QTextStream(); + explicit QTextStream(QIODevice *device); + explicit QTextStream(FILE *fileHandle, QIODevice::OpenMode openMode = QIODevice::ReadWrite); + explicit QTextStream(QString *string, QIODevice::OpenMode openMode = QIODevice::ReadWrite); + explicit QTextStream(QByteArray *array, QIODevice::OpenMode openMode = QIODevice::ReadWrite); + explicit QTextStream(const QByteArray &array, QIODevice::OpenMode openMode = QIODevice::ReadOnly); + virtual ~QTextStream(); + void setCodec(QTextCodec *codec); + void setCodec(const char *codecName); + QTextCodec *codec() const; + void setAutoDetectUnicode(bool enabled); + bool autoDetectUnicode() const; + void setGenerateByteOrderMark(bool generate); + bool generateByteOrderMark() const; + void setLocale(const QLocale &locale); + QLocale locale() const; + void setDevice(QIODevice *device); + QIODevice *device() const; + void setString(QString *string, QIODevice::OpenMode openMode = QIODevice::ReadWrite); + QString *string() const; + Status status() const; + void setStatus(Status status); + void resetStatus(); + bool atEnd() const; + void reset(); + void flush(); + bool seek(qint64 pos); + qint64 pos() const; + void skipWhiteSpace(); + QString readLine(qint64 maxlen = 0); + QString readAll(); + QString read(qint64 maxlen); + void setFieldAlignment(FieldAlignment alignment); + FieldAlignment fieldAlignment() const; + void setPadChar(QChar ch); + QChar padChar() const; + void setFieldWidth(int width); + int fieldWidth() const; + void setNumberFlags(NumberFlags flags); + NumberFlags numberFlags() const; + void setIntegerBase(int base); + int integerBase() const; + void setRealNumberNotation(RealNumberNotation notation); + RealNumberNotation realNumberNotation() const; + void setRealNumberPrecision(int precision); + int realNumberPrecision() const; + QTextStream &operator>>(QChar &ch); + QTextStream &operator>>(char &ch); + QTextStream &operator>>(signed short &i); + QTextStream &operator>>(unsigned short &i); + QTextStream &operator>>(signed int &i); + QTextStream &operator>>(unsigned int &i); + QTextStream &operator>>(signed long &i); + QTextStream &operator>>(unsigned long &i); + QTextStream &operator>>(qlonglong &i); + QTextStream &operator>>(qulonglong &i); + QTextStream &operator>>(float &f); + QTextStream &operator>>(double &f); + QTextStream &operator>>(QString &s); + QTextStream &operator>>(QByteArray &array); + QTextStream &operator>>(char *c); + QTextStream &operator<<(QBool b); + QTextStream &operator<<(QChar ch); + QTextStream &operator<<(char ch); + QTextStream &operator<<(signed short i); + QTextStream &operator<<(unsigned short i); + QTextStream &operator<<(signed int i); + QTextStream &operator<<(unsigned int i); + QTextStream &operator<<(signed long i); + QTextStream &operator<<(unsigned long i); + QTextStream &operator<<(qlonglong i); + QTextStream &operator<<(qulonglong i); + QTextStream &operator<<(float f); + QTextStream &operator<<(double f); + QTextStream &operator<<(const QString &s); + QTextStream &operator<<(const QByteArray &array); + QTextStream &operator<<(const char *c); + QTextStream &operator<<(const void *ptr); +private: + QTextStream(const QTextStream &); QTextStream &operator=(const QTextStream &); + QScopedPointer d_ptr; +}; + inline QFlags operator|(QTextStream::NumberFlags::enum_type f1, QTextStream::NumberFlags::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(QTextStream::NumberFlags::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(QTextStream::NumberFlags::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +typedef QTextStream & (*QTextStreamFunction)(QTextStream &); +typedef void (QTextStream::*QTSMFI)(int); +typedef void (QTextStream::*QTSMFC)(QChar); +class QTextStreamManipulator +{ +public: + QTextStreamManipulator(QTSMFI m, int a) { mf = m; mc = 0; arg = a; } + QTextStreamManipulator(QTSMFC m, QChar c) { mf = 0; mc = m; ch = c; arg = -1; } + void exec(QTextStream &s) { if (mf) { (s.*mf)(arg); } else { (s.*mc)(ch); } } +private: + QTSMFI mf; + QTSMFC mc; + int arg; + QChar ch; +}; +inline QTextStream &operator>>(QTextStream &s, QTextStreamFunction f) +{ return (*f)(s); } +inline QTextStream &operator<<(QTextStream &s, QTextStreamFunction f) +{ return (*f)(s); } +inline QTextStream &operator<<(QTextStream &s, QTextStreamManipulator m) +{ m.exec(s); return s; } + QTextStream &bin(QTextStream &s); + QTextStream &oct(QTextStream &s); + QTextStream &dec(QTextStream &s); + QTextStream &hex(QTextStream &s); + QTextStream &showbase(QTextStream &s); + QTextStream &forcesign(QTextStream &s); + QTextStream &forcepoint(QTextStream &s); + QTextStream &noshowbase(QTextStream &s); + QTextStream &noforcesign(QTextStream &s); + QTextStream &noforcepoint(QTextStream &s); + QTextStream &uppercasebase(QTextStream &s); + QTextStream &uppercasedigits(QTextStream &s); + QTextStream &lowercasebase(QTextStream &s); + QTextStream &lowercasedigits(QTextStream &s); + QTextStream &fixed(QTextStream &s); + QTextStream &scientific(QTextStream &s); + QTextStream &left(QTextStream &s); + QTextStream &right(QTextStream &s); + QTextStream ¢er(QTextStream &s); + QTextStream &endl(QTextStream &s); + QTextStream &flush(QTextStream &s); + QTextStream &reset(QTextStream &s); + QTextStream &bom(QTextStream &s); + QTextStream &ws(QTextStream &s); +inline QTextStreamManipulator qSetFieldWidth(int width) +{ + QTSMFI func = &QTextStream::setFieldWidth; + return QTextStreamManipulator(func,width); +} +inline QTextStreamManipulator qSetPadChar(QChar ch) +{ + QTSMFC func = &QTextStream::setPadChar; + return QTextStreamManipulator(func, ch); +} +inline QTextStreamManipulator qSetRealNumberPrecision(int precision) +{ + QTSMFI func = &QTextStream::setRealNumberPrecision; + return QTextStreamManipulator(func, precision); +} +typedef QtValidLicenseForCoreModule QtCoreModule; +class QDebug +{ + struct Stream { + Stream(QIODevice *device) : ts(device), ref(1), type(QtDebugMsg), space(true), message_output(false) {} + Stream(QString *string) : ts(string, QIODevice::WriteOnly), ref(1), type(QtDebugMsg), space(true), message_output(false) {} + Stream(QtMsgType t) : ts(&buffer, QIODevice::WriteOnly), ref(1), type(t), space(true), message_output(true) {} + QTextStream ts; + QString buffer; + int ref; + QtMsgType type; + bool space; + bool message_output; + } *stream; +public: + inline QDebug(QIODevice *device) : stream(new Stream(device)) {} + inline QDebug(QString *string) : stream(new Stream(string)) {} + inline QDebug(QtMsgType t) : stream(new Stream(t)) {} + inline QDebug(const QDebug &o):stream(o.stream) { ++stream->ref; } + inline QDebug &operator=(const QDebug &other); + inline ~QDebug() { + if (!--stream->ref) { + if(stream->message_output) { + try { + qt_message_output(stream->type, stream->buffer.toLocal8Bit().data()); + } catch (std::bad_alloc&) { } + } + delete stream; + } + } + inline QDebug &space() { stream->space = true; stream->ts << ' '; return *this; } + inline QDebug &nospace() { stream->space = false; return *this; } + inline QDebug &maybeSpace() { if (stream->space) stream->ts << ' '; return *this; } + inline QDebug &operator<<(QChar t) { stream->ts << '\'' << t << '\''; return maybeSpace(); } + inline QDebug &operator<<(QBool t) { stream->ts << (bool(t != 0) ? "true" : "false"); return maybeSpace(); } + inline QDebug &operator<<(bool t) { stream->ts << (t ? "true" : "false"); return maybeSpace(); } + inline QDebug &operator<<(char t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(signed short t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(unsigned short t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(signed int t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(unsigned int t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(signed long t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(unsigned long t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(qint64 t) + { stream->ts << QString::number(t); return maybeSpace(); } + inline QDebug &operator<<(quint64 t) + { stream->ts << QString::number(t); return maybeSpace(); } + inline QDebug &operator<<(float t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(double t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(const char* t) { stream->ts << QString::fromAscii(t); return maybeSpace(); } + inline QDebug &operator<<(const QString & t) { stream->ts << '\"' << t << '\"'; return maybeSpace(); } + inline QDebug &operator<<(const QStringRef & t) { return operator<<(t.toString()); } + inline QDebug &operator<<(const QLatin1String &t) { stream->ts << '\"' << t.latin1() << '\"'; return maybeSpace(); } + inline QDebug &operator<<(const QByteArray & t) { stream->ts << '\"' << t << '\"'; return maybeSpace(); } + inline QDebug &operator<<(const void * t) { stream->ts << t; return maybeSpace(); } + inline QDebug &operator<<(QTextStreamFunction f) { + stream->ts << f; + return *this; + } + inline QDebug &operator<<(QTextStreamManipulator m) + { stream->ts << m; return *this; } +}; +class QNoDebug +{ +public: + inline QNoDebug(){} + inline QNoDebug(const QDebug &){} + inline ~QNoDebug(){} + inline QNoDebug &operator<<(QTextStreamFunction) { return *this; } + inline QNoDebug &operator<<(QTextStreamManipulator) { return *this; } + inline QNoDebug &space() { return *this; } + inline QNoDebug &nospace() { return *this; } + inline QNoDebug &maybeSpace() { return *this; } + template + inline QNoDebug &operator<<(const T &) { return *this; } +}; + inline QDebug qCritical() { return QDebug(QtCriticalMsg); } +inline QDebug &QDebug::operator=(const QDebug &other) +{ + if (this != &other) { + QDebug copy(other); + qSwap(stream, copy.stream); + } + return *this; +} +template +inline QDebug operator<<(QDebug debug, const QList &list) +{ + debug.nospace() << '('; + for (typename QList::size_type i = 0; i < list.count(); ++i) { + if (i) + debug << ", "; + debug << list.at(i); + } + debug << ')'; + return debug.space(); +} +template +inline QDebug operator<<(QDebug debug, const QVector &vec) +{ + debug.nospace() << "QVector"; + return operator<<(debug, vec.toList()); +} +template +inline QDebug operator<<(QDebug debug, const QMap &map) +{ + debug.nospace() << "QMap("; + for (typename QMap::const_iterator it = map.constBegin(); + it != map.constEnd(); ++it) { + debug << '(' << it.key() << ", " << it.value() << ')'; + } + debug << ')'; + return debug.space(); +} +template +inline QDebug operator<<(QDebug debug, const QHash &hash) +{ + debug.nospace() << "QHash("; + for (typename QHash::const_iterator it = hash.constBegin(); + it != hash.constEnd(); ++it) + debug << '(' << it.key() << ", " << it.value() << ')'; + debug << ')'; + return debug.space(); +} +template +inline QDebug operator<<(QDebug debug, const QPair &pair) +{ + debug.nospace() << "QPair(" << pair.first << ',' << pair.second << ')'; + return debug.space(); +} +template +inline QDebug operator<<(QDebug debug, const QSet &set) +{ + debug.nospace() << "QSet"; + return operator<<(debug, set.toList()); +} +template +inline QDebug operator<<(QDebug debug, const QContiguousCache &cache) +{ + debug.nospace() << "QContiguousCache("; + for (int i = cache.firstIndex(); i <= cache.lastIndex(); ++i) { + debug << cache[i]; + if (i != cache.lastIndex()) + debug << ", "; + } + debug << ')'; + return debug.space(); +} +template +inline QDebug operator<<(QDebug debug, const QFlags &flags) +{ + debug.nospace() << "QFlags("; + bool needSeparator = false; + for (uint i = 0; i < sizeof(T) * 8; ++i) { + if (flags.testFlag(T(1 << i))) { + if (needSeparator) + debug.nospace() << '|'; + else + needSeparator = true; + debug.nospace() << "0x" << QByteArray::number(T(1 << i), 16).constData(); + } + } + debug << ')'; + return debug.space(); +} + inline QDebug qDebug() { return QDebug(QtDebugMsg); } + inline QDebug qWarning() { return QDebug(QtWarningMsg); } +typedef QtValidLicenseForCoreModule QtCoreModule; +namespace QtConcurrent { +class ResultItem +{ +public: + ResultItem(const void *_result, int _count) : m_count(_count), result(_result) { } + ResultItem(const void *_result) : m_count(0), result(_result) { } + ResultItem() : m_count(0), result(0) { } + bool isValid() const { return result != 0; } + bool isVector() const { return m_count != 0; } + int count() const { return (m_count == 0) ? 1 : m_count; } + int m_count; + const void *result; +}; +class ResultIteratorBase +{ +public: + ResultIteratorBase(); + ResultIteratorBase(QMap::const_iterator _mapIterator, int _vectorIndex = 0); + int vectorIndex() const; + int resultIndex() const; + ResultIteratorBase operator++(); + int batchSize() const; + void batchedAdvance(); + bool operator==(const ResultIteratorBase &other) const; + bool operator!=(const ResultIteratorBase &other) const; + bool isVector() const; + bool canIncrementVectorIndex() const; +protected: + QMap::const_iterator mapIterator; + int m_vectorIndex; +}; +template +class ResultIterator : public ResultIteratorBase +{ +public: + ResultIterator(const ResultIteratorBase &base) + : ResultIteratorBase(base) { } + const T &value() const + { + return *pointer(); + } + const T *pointer() const + { + if (mapIterator.value().isVector()) + return &(reinterpret_cast *>(mapIterator.value().result)->at(m_vectorIndex)); + else + return reinterpret_cast(mapIterator.value().result); + } +}; +class ResultStoreBase +{ +public: + ResultStoreBase(); + void setFilterMode(bool enable); + bool filterMode() const; + int addResult(int index, const void *result); + int addResults(int index, const void *results, int vectorSize, int logicalCount); + ResultIteratorBase begin() const; + ResultIteratorBase end() const; + bool hasNextResult() const; + ResultIteratorBase resultAt(int index) const; + bool contains(int index) const; + int count() const; + virtual ~ResultStoreBase() { }; +protected: + int insertResultItem(int index, ResultItem &resultItem); + void insertResultItemIfValid(int index, ResultItem &resultItem); + void syncPendingResults(); + void syncResultCount(); + int updateInsertIndex(int index, int _count); + QMap m_results; + int insertIndex; + int resultCount; + bool m_filterMode; + QMap pendingResults; + int filteredResults; +}; +template +class ResultStore : public ResultStoreBase +{ +public: + ResultStore() { } + ResultStore(const ResultStoreBase &base) + : ResultStoreBase(base) { } + int addResult(int index, const T *result) + { + if (result == 0) + return ResultStoreBase::addResult(index, result); + else + return ResultStoreBase::addResult(index, new T(*result)); + } + int addResults(int index, const QVector *results) + { + return ResultStoreBase::addResults(index, new QVector(*results), results->count(), results->count()); + } + int addResults(int index, const QVector *results, int totalCount) + { + if (m_filterMode && totalCount && !results->count()) + return ResultStoreBase::addResults(index, 0, 0, totalCount); + else + return ResultStoreBase::addResults(index, new QVector(*results), results->count(), totalCount); + } + int addCanceledResult(int index) + { + return addResult(index, 0); + } + int addCanceledResults(int index, int _count) + { + QVector empty; + return addResults(index, &empty, _count); + } + ResultIterator begin() const + { + return static_cast >(ResultStoreBase::begin()); + } + ResultIterator end() const + { + return static_cast >(ResultStoreBase::end()); + } + ResultIterator resultAt(int index) const + { + return static_cast >(ResultStoreBase::resultAt(index)); + } + void clear() + { + QMap::const_iterator mapIterator = m_results.constBegin(); + while (mapIterator != m_results.constEnd()) { + if (mapIterator.value().isVector()) + delete reinterpret_cast *>(mapIterator.value().result); + else + delete reinterpret_cast(mapIterator.value().result); + ++mapIterator; + } + resultCount = 0; + m_results.clear(); + } + ~ResultStore() + { + clear(); + } +}; +} +typedef QtValidLicenseForCoreModule QtCoreModule; +template class QFuture; +class QFutureInterfaceBasePrivate; +class QFutureWatcherBase; +class QFutureWatcherBasePrivate; +class QFutureInterfaceBase +{ +public: + enum State { + NoState = 0x00, + Running = 0x01, + Started = 0x02, + Finished = 0x04, + Canceled = 0x08, + Paused = 0x10, + Throttled = 0x20 + }; + QFutureInterfaceBase(State initialState = NoState); + QFutureInterfaceBase(const QFutureInterfaceBase &other); + virtual ~QFutureInterfaceBase(); + void reportStarted(); + void reportFinished(); + void reportCanceled(); + void reportException(const QtConcurrent::Exception &e); + void reportResultsReady(int beginIndex, int endIndex); + void setRunnable(QRunnable *runnable); + void setFilterMode(bool enable); + void setProgressRange(int minimum, int maximum); + int progressMinimum() const; + int progressMaximum() const; + bool isProgressUpdateNeeded() const; + void setProgressValue(int progressValue); + int progressValue() const; + void setProgressValueAndText(int progressValue, const QString &progressText); + QString progressText() const; + void setExpectedResultCount(int resultCount); + int expectedResultCount(); + int resultCount() const; + bool queryState(State state) const; + bool isRunning() const; + bool isStarted() const; + bool isCanceled() const; + bool isFinished() const; + bool isPaused() const; + bool isThrottled() const; + bool isResultReadyAt(int index) const; + void cancel(); + void setPaused(bool paused); + void togglePaused(); + void setThrottled(bool enable); + void waitForFinished(); + bool waitForNextResult(); + void waitForResult(int resultIndex); + void waitForResume(); + QMutex *mutex() const; + QtConcurrent::internal::ExceptionStore &exceptionStore(); + QtConcurrent::ResultStoreBase &resultStoreBase(); + const QtConcurrent::ResultStoreBase &resultStoreBase() const; + inline bool operator==(const QFutureInterfaceBase &other) const { return d == other.d; } + inline bool operator!=(const QFutureInterfaceBase &other) const { return d != other.d; } + QFutureInterfaceBase &operator=(const QFutureInterfaceBase &other); +protected: + bool referenceCountIsOne() const; +public: +private: + QFutureInterfaceBasePrivate *d; +private: + friend class QFutureWatcherBase; + friend class QFutureWatcherBasePrivate; +}; +template +class QFutureInterface : public QFutureInterfaceBase +{ +public: + QFutureInterface(State initialState = NoState) + : QFutureInterfaceBase(initialState) + { } + QFutureInterface(const QFutureInterface &other) + : QFutureInterfaceBase(other) + { } + ~QFutureInterface() + { + if (referenceCountIsOne()) + resultStore().clear(); + } + static QFutureInterface canceledResult() + { return QFutureInterface(State(Started | Finished | Canceled)); } + QFutureInterface &operator=(const QFutureInterface &other) + { + if (referenceCountIsOne()) + resultStore().clear(); + QFutureInterfaceBase::operator=(other); + return *this; + } + inline QFuture future(); + inline void reportResult(const T *result, int index = -1); + inline void reportResult(const T &result, int index = -1); + inline void reportResults(const QVector &results, int beginIndex = -1, int count = -1); + inline void reportFinished(const T *result = 0); + inline const T &resultReference(int index) const; + inline const T *resultPointer(int index) const; + inline QList results(); +private: + QtConcurrent::ResultStore &resultStore() + { return static_cast &>(resultStoreBase()); } + const QtConcurrent::ResultStore &resultStore() const + { return static_cast &>(resultStoreBase()); } +}; +template +inline void QFutureInterface::reportResult(const T *result, int index) +{ + QMutexLocker locker(mutex()); + if (this->queryState(Canceled) || this->queryState(Finished)) { + return; + } + QtConcurrent::ResultStore &store = resultStore(); + if (store.filterMode()) { + const int resultCountBefore = store.count(); + store.addResult(index, result); + this->reportResultsReady(resultCountBefore, resultCountBefore + store.count()); + } else { + const int insertIndex = store.addResult(index, result); + this->reportResultsReady(insertIndex, insertIndex + 1); + } +} +template +inline void QFutureInterface::reportResult(const T &result, int index) +{ + reportResult(&result, index); +} +template +inline void QFutureInterface::reportResults(const QVector &_results, int beginIndex, int count) +{ + QMutexLocker locker(mutex()); + if (this->queryState(Canceled) || this->queryState(Finished)) { + return; + } + QtConcurrent::ResultStore &store = resultStore(); + if (store.filterMode()) { + const int resultCountBefore = store.count(); + store.addResults(beginIndex, &_results, count); + this->reportResultsReady(resultCountBefore, store.count()); + } else { + const int insertIndex = store.addResults(beginIndex, &_results, count); + this->reportResultsReady(insertIndex, insertIndex + _results.count()); + } +} +template +inline void QFutureInterface::reportFinished(const T *result) +{ + if (result) + reportResult(result); + QFutureInterfaceBase::reportFinished(); +} +template +inline const T &QFutureInterface::resultReference(int index) const +{ + QMutexLocker lock(mutex()); + return resultStore().resultAt(index).value(); +} +template +inline const T *QFutureInterface::resultPointer(int index) const +{ + QMutexLocker lock(mutex()); + return resultStore().resultAt(index).pointer(); +} +template +inline QList QFutureInterface::results() +{ + if (this->isCanceled()) { + exceptionStore().throwPossibleException(); + return QList(); + } + QFutureInterfaceBase::waitForResult(-1); + QList res; + QMutexLocker lock(mutex()); + QtConcurrent::ResultIterator it = resultStore().begin(); + while (it != resultStore().end()) { + res.append(it.value()); + ++it; + } + return res; +} +template <> +class QFutureInterface : public QFutureInterfaceBase +{ +public: + QFutureInterface(State initialState = NoState) + : QFutureInterfaceBase(initialState) + { } + QFutureInterface(const QFutureInterface &other) + : QFutureInterfaceBase(other) + { } + static QFutureInterface canceledResult() + { return QFutureInterface(State(Started | Finished | Canceled)); } + QFutureInterface &operator=(const QFutureInterface &other) + { + QFutureInterfaceBase::operator=(other); + return *this; + } + inline QFuture future(); + void reportResult(const void *, int) { } + void reportResults(const QVector &, int) { } + void reportFinished(void * = 0) { QFutureInterfaceBase::reportFinished(); } +}; +typedef QtValidLicenseForCoreModule QtCoreModule; +namespace QtPrivate { +template +class HasResultType { + typedef char Yes; + typedef void *No; + template static Yes test(int, const typename U::result_type * = 0); + template static No test(double); +public: + enum { Value = (sizeof(test(0)) == sizeof(Yes)) }; +}; +} +typedef QtValidLicenseForCoreModule QtCoreModule; +template +class QFutureWatcher; +template <> +class QFutureWatcher; +template +class QFuture +{ +public: + QFuture() + : d(QFutureInterface::canceledResult()) + { } + explicit QFuture(QFutureInterface *p) + : d(*p) + { } + QFuture(const QFuture &other) + : d(other.d) + { } + ~QFuture() + { } + inline QFuture &operator=(const QFuture &other); + bool operator==(const QFuture &other) const { return (d == other.d); } + bool operator!=(const QFuture &other) const { return (d != other.d); } + void cancel() { d.cancel(); } + bool isCanceled() const { return d.isCanceled(); } + void setPaused(bool paused) { d.setPaused(paused); } + bool isPaused() const { return d.isPaused(); } + void pause() { setPaused(true); } + void resume() { setPaused(false); } + void togglePaused() { d.togglePaused(); } + bool isStarted() const { return d.isStarted(); } + bool isFinished() const { return d.isFinished(); } + bool isRunning() const { return d.isRunning(); } + int resultCount() const { return d.resultCount(); } + int progressValue() const { return d.progressValue(); } + int progressMinimum() const { return d.progressMinimum(); } + int progressMaximum() const { return d.progressMaximum(); } + QString progressText() const { return d.progressText(); } + void waitForFinished() { d.waitForFinished(); } + inline T result() const; + inline T resultAt(int index) const; + bool isResultReadyAt(int resultIndex) const { return d.isResultReadyAt(resultIndex); } + operator T() const { return result(); } + QList results() const { return d.results(); } + class const_iterator + { + public: + typedef std::bidirectional_iterator_tag iterator_category; + typedef qptrdiff difference_type; + typedef T value_type; + typedef const T *pointer; + typedef const T &reference; + inline const_iterator() {} + inline const_iterator(QFuture const * const _future, int _index) : future(_future), index(_index) {} + inline const_iterator(const const_iterator &o) : future(o.future), index(o.index) {} + inline const_iterator &operator=(const const_iterator &o) + { future = o.future; index = o.index; return *this; } + inline const T &operator*() const { return future->d.resultReference(index); } + inline const T *operator->() const { return future->d.resultPointer(index); } + inline bool operator!=(const const_iterator &other) const + { + if (index == -1 && other.index == -1) + return false; + if (other.index == -1) + return (future->isRunning() || (index < future->resultCount())); + return (index != other.index); + } + inline bool operator==(const const_iterator &o) const { return !operator!=(o); } + inline const_iterator &operator++() { ++index; return *this; } + inline const_iterator operator++(int) { const_iterator r = *this; ++index; return r; } + inline const_iterator &operator--() { --index; return *this; } + inline const_iterator operator--(int) { const_iterator r = *this; --index; return r; } + inline const_iterator operator+(int j) const { return const_iterator(future, index + j); } + inline const_iterator operator-(int j) const { return const_iterator(future, index - j); } + inline const_iterator &operator+=(int j) { index += j; return *this; } + inline const_iterator &operator-=(int j) { index -= j; return *this; } + private: + QFuture const * future; + int index; + }; + friend class const_iterator; + typedef const_iterator ConstIterator; + const_iterator begin() const { return const_iterator(this, 0); } + const_iterator constBegin() const { return const_iterator(this, 0); } + const_iterator end() const { return const_iterator(this, -1); } + const_iterator constEnd() const { return const_iterator(this, -1); } +private: + friend class QFutureWatcher; +public: + mutable QFutureInterface d; +}; +template +inline QFuture &QFuture::operator=(const QFuture &other) +{ + d = other.d; + return *this; +} +template +inline T QFuture::result() const +{ + d.waitForResult(0); + return d.resultReference(0); +} +template +inline T QFuture::resultAt(int index) const +{ + d.waitForResult(index); + return d.resultReference(index); +} +template +inline QFuture QFutureInterface::future() +{ + return QFuture(this); +} +template class QFutureIterator { typedef typename QFuture::const_iterator const_iterator; QFuture c; const_iterator i; public: inline QFutureIterator(const QFuture &container) : c(container), i(c.constBegin()) {} inline QFutureIterator &operator=(const QFuture &container) { c = container; i = c.constBegin(); return *this; } inline void toFront() { i = c.constBegin(); } inline void toBack() { i = c.constEnd(); } inline bool hasNext() const { return i != c.constEnd(); } inline const T &next() { return *i++; } inline const T &peekNext() const { return *i; } inline bool hasPrevious() const { return i != c.constBegin(); } inline const T &previous() { return *--i; } inline const T &peekPrevious() const { const_iterator p = i; return *--p; } inline bool findNext(const T &t) { while (i != c.constEnd()) if (*i++ == t) return true; return false; } inline bool findPrevious(const T &t) { while (i != c.constBegin()) if (*(--i) == t) return true; return false; } }; +template <> +class QFuture +{ +public: + QFuture() + : d(QFutureInterface::canceledResult()) + { } + explicit QFuture(QFutureInterfaceBase *p) + : d(*p) + { } + QFuture(const QFuture &other) + : d(other.d) + { } + ~QFuture() + { } + QFuture &operator=(const QFuture &other); + bool operator==(const QFuture &other) const { return (d == other.d); } + bool operator!=(const QFuture &other) const { return (d != other.d); } + template + QFuture(const QFuture &other) + : d(other.d) + { } + template + QFuture &operator=(const QFuture &other) + { + d = other.d; + return *this; + } + void cancel() { d.cancel(); } + bool isCanceled() const { return d.isCanceled(); } + void setPaused(bool paused) { d.setPaused(paused); } + bool isPaused() const { return d.isPaused(); } + void pause() { setPaused(true); } + void resume() { setPaused(false); } + void togglePaused() { d.togglePaused(); } + bool isStarted() const { return d.isStarted(); } + bool isFinished() const { return d.isFinished(); } + bool isRunning() const { return d.isRunning(); } + int resultCount() const { return d.resultCount(); } + int progressValue() const { return d.progressValue(); } + int progressMinimum() const { return d.progressMinimum(); } + int progressMaximum() const { return d.progressMaximum(); } + QString progressText() const { return d.progressText(); } + void waitForFinished() { d.waitForFinished(); } +private: + friend class QFutureWatcher; + mutable QFutureInterfaceBase d; +}; +inline QFuture &QFuture::operator=(const QFuture &other) +{ + d = other.d; + return *this; +} +inline QFuture QFutureInterface::future() +{ + return QFuture(this); +} +template +QFuture qToVoidFuture(const QFuture &future) +{ + return QFuture(future.d); +} +typedef QtValidLicenseForCoreModule QtCoreModule; +template +class QFutureSynchronizer +{ + QFutureSynchronizer(const QFutureSynchronizer &); QFutureSynchronizer &operator=(const QFutureSynchronizer &); +public: + QFutureSynchronizer() : m_cancelOnWait(false) { } + explicit QFutureSynchronizer(const QFuture &future) + : m_cancelOnWait(false) + { addFuture(future); } + ~QFutureSynchronizer() { waitForFinished(); } + void setFuture(const QFuture &future) + { + waitForFinished(); + m_futures.clear(); + addFuture(future); + } + void addFuture(const QFuture &future) + { + m_futures.append(future); + } + void waitForFinished() + { + if (m_cancelOnWait) { + for (int i = 0; i < m_futures.count(); ++i) { + m_futures[i].cancel(); + } + } + for (int i = 0; i < m_futures.count(); ++i) { + m_futures[i].waitForFinished(); + } + } + void clearFutures() + { + m_futures.clear(); + } + QList > futures() const + { + return m_futures; + } + void setCancelOnWait(bool enabled) + { + m_cancelOnWait = enabled; + } + bool cancelOnWait() const + { + return m_cancelOnWait; + } +protected: + QList > m_futures; + bool m_cancelOnWait; +}; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QEvent; +class QFutureWatcherBasePrivate; +class QFutureWatcherBase : public QObject +{ + public: template inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); + inline QFutureWatcherBasePrivate* d_func() { return reinterpret_cast(qGetPtrHelper(d_ptr)); } inline const QFutureWatcherBasePrivate* d_func() const { return reinterpret_cast(qGetPtrHelper(d_ptr)); } friend class QFutureWatcherBasePrivate; +public: + QFutureWatcherBase(QObject *parent = 0); + int progressValue() const; + int progressMinimum() const; + int progressMaximum() const; + QString progressText() const; + bool isStarted() const; + bool isFinished() const; + bool isRunning() const; + bool isCanceled() const; + bool isPaused() const; + void waitForFinished(); + void setPendingResultsLimit(int limit); + bool event(QEvent *event); +protected: + void started(); + void finished(); + void canceled(); + void paused(); + void resumed(); + void resultReadyAt(int resultIndex); + void resultsReadyAt(int beginIndex, int endIndex); + void progressRangeChanged(int minimum, int maximum); + void progressValueChanged(int progressValue); + void progressTextChanged(const QString &progressText); +public : + void cancel(); + void setPaused(bool paused); + void pause(); + void resume(); + void togglePaused(); +protected: + void connectNotify (const char * signal); + void disconnectNotify (const char * signal); + void connectOutputInterface(); + void disconnectOutputInterface(bool pendingAssignment = false); +private: + virtual const QFutureInterfaceBase &futureInterface() const = 0; + virtual QFutureInterfaceBase &futureInterface() = 0; +}; +template +class QFutureWatcher : public QFutureWatcherBase +{ +public: + QFutureWatcher(QObject *_parent = 0) + : QFutureWatcherBase(_parent) + { } + ~QFutureWatcher() + { disconnectOutputInterface(); } + void setFuture(const QFuture &future); + QFuture future() const + { return m_future; } + T result() const { return m_future.result(); } + T resultAt(int index) const { return m_future.resultAt(index); } +private: + QFuture m_future; + const QFutureInterfaceBase &futureInterface() const { return m_future.d; } + QFutureInterfaceBase &futureInterface() { return m_future.d; } +}; +template +inline void QFutureWatcher::setFuture(const QFuture &_future) +{ + if (_future == m_future) + return; + disconnectOutputInterface(true); + m_future = _future; + connectOutputInterface(); +} +template <> +class QFutureWatcher : public QFutureWatcherBase +{ +public: + QFutureWatcher(QObject *_parent = 0) + : QFutureWatcherBase(_parent) + { } + ~QFutureWatcher() + { disconnectOutputInterface(); } + void setFuture(const QFuture &future); + QFuture future() const + { return m_future; } +private: + QFuture m_future; + const QFutureInterfaceBase &futureInterface() const { return m_future.d; } + QFutureInterfaceBase &futureInterface() { return m_future.d; } +}; +inline void QFutureWatcher::setFuture(const QFuture &_future) +{ + if (_future == m_future) + return; + disconnectOutputInterface(true); + m_future = _future; + connectOutputInterface(); +} +typedef QtValidLicenseForCoreModule QtCoreModule; +namespace QtConcurrent { +template +class Median +{ +public: + Median(int _bufferSize) + : currentMedian(), bufferSize(_bufferSize), currentIndex(0), valid(false), dirty(true) + { + values.resize(bufferSize); + } + void reset() + { + values.fill(0); + currentIndex = 0; + valid = false; + dirty = true; + } + void addValue(T value) + { + currentIndex = ((currentIndex + 1) % bufferSize); + if (valid == false && currentIndex % bufferSize == 0) + valid = true; + const T currentIndexValue = values[currentIndex]; + if ((currentIndexValue > currentMedian && currentMedian > value) + || (currentMedian > currentIndexValue && value > currentMedian)) { + dirty = true; + } + values[currentIndex] = value; + } + bool isMedianValid() const + { + return valid; + } + T median() + { + if (dirty) { + dirty = false; + QVector sorted = values; + qSort(sorted); + currentMedian = sorted.at(bufferSize / 2 + 1); + } + return currentMedian; + } +private: + QVector values; + T currentMedian; + int bufferSize; + int currentIndex; + bool valid; + bool dirty; +}; +} +typedef QtValidLicenseForCoreModule QtCoreModule; +class QThreadData; +class QThreadPrivate; +class QThread : public QObject +{ +public: + static Qt::HANDLE currentThreadId(); + static QThread *currentThread(); + static int idealThreadCount(); + static void yieldCurrentThread(); + explicit QThread(QObject *parent = 0); + ~QThread(); + enum Priority { + IdlePriority, + LowestPriority, + LowPriority, + NormalPriority, + HighPriority, + HighestPriority, + TimeCriticalPriority, + InheritPriority + }; + void setPriority(Priority priority); + Priority priority() const; + bool isFinished() const; + bool isRunning() const; + void setStackSize(uint stackSize); + uint stackSize() const; + void exit(int retcode = 0); +public : + void start(Priority = InheritPriority); + void terminate(); + void quit(); +public: + bool wait(unsigned long time = (9223372036854775807L * 2UL + 1UL)); +protected: + void started(); + void finished(); + void terminated(); +protected: + virtual void run(); + int exec(); + static void setTerminationEnabled(bool enabled = true); + static void sleep(unsigned long); + static void msleep(unsigned long); + static void usleep(unsigned long); +protected: + QThread(QThreadPrivate &dd, QObject *parent = 0); +private: + public: template inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); + inline QThreadPrivate* d_func() { return reinterpret_cast(qGetPtrHelper(d_ptr)); } inline const QThreadPrivate* d_func() const { return reinterpret_cast(qGetPtrHelper(d_ptr)); } friend class QThreadPrivate; + static void initialize(); + static void cleanup(); + friend class QCoreApplication; + friend class QThreadData; +}; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QThreadPoolPrivate; +class QThreadPool : public QObject +{ + public: template inline void qt_check_for_QOBJECT_macro(const T &_q_argument) const { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i; } static const QMetaObject staticMetaObject; virtual const QMetaObject *metaObject() const; virtual void *qt_metacast(const char *); static inline QString tr(const char *s, const char *c = 0) { return staticMetaObject.tr(s, c); } static inline QString trUtf8(const char *s, const char *c = 0) { return staticMetaObject.trUtf8(s, c); } static inline QString tr(const char *s, const char *c, int n) { return staticMetaObject.tr(s, c, n); } static inline QString trUtf8(const char *s, const char *c, int n) { return staticMetaObject.trUtf8(s, c, n); } virtual int qt_metacall(QMetaObject::Call, int, void **); private: __attribute__((visibility("hidden"))) static const QMetaObjectExtraData staticMetaObjectExtraData; __attribute__((visibility("hidden"))) static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); + inline QThreadPoolPrivate* d_func() { return reinterpret_cast(qGetPtrHelper(d_ptr)); } inline const QThreadPoolPrivate* d_func() const { return reinterpret_cast(qGetPtrHelper(d_ptr)); } friend class QThreadPoolPrivate; + friend class QFutureInterfaceBase; +public: + QThreadPool(QObject *parent = 0); + ~QThreadPool(); + static QThreadPool *globalInstance(); + void start(QRunnable *runnable, int priority = 0); + bool tryStart(QRunnable *runnable); + int expiryTimeout() const; + void setExpiryTimeout(int expiryTimeout); + int maxThreadCount() const; + void setMaxThreadCount(int maxThreadCount); + int activeThreadCount() const; + void reserveThread(); + void releaseThread(); + void waitForDone(); + bool waitForDone(int msecs); +}; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QWaitConditionPrivate; +class QMutex; +class QReadWriteLock; +class QWaitCondition +{ +public: + QWaitCondition(); + ~QWaitCondition(); + bool wait(QMutex *mutex, unsigned long time = (9223372036854775807L * 2UL + 1UL)); + bool wait(QReadWriteLock *readWriteLock, unsigned long time = (9223372036854775807L * 2UL + 1UL)); + void wakeOne(); + void wakeAll(); +private: + QWaitCondition(const QWaitCondition &); QWaitCondition &operator=(const QWaitCondition &); + QWaitConditionPrivate * d; +}; +typedef QtValidLicenseForCoreModule QtCoreModule; +class QSemaphorePrivate; +class QSemaphore +{ +public: + explicit QSemaphore(int n = 0); + ~QSemaphore(); + void acquire(int n = 1); + bool tryAcquire(int n = 1); + bool tryAcquire(int n, int timeout); + void release(int n = 1); + int available() const; +private: + QSemaphore(const QSemaphore &); QSemaphore &operator=(const QSemaphore &); + QSemaphorePrivate *d; +}; +typedef QtValidLicenseForCoreModule QtCoreModule; +namespace QtConcurrent { +class ThreadEngineBarrier +{ +private: + QMutex mutex; + QAtomicInt count; + QSemaphore semaphore; +public: + ThreadEngineBarrier(); + void acquire(); + int release(); + void wait(); + int currentCount(); + bool releaseUnlessLast(); +}; +enum ThreadFunctionResult { ThrottleThread, ThreadFinished }; +class ThreadEngineBase: public QRunnable +{ +public: + ThreadEngineBase(); + virtual ~ThreadEngineBase(); + void startSingleThreaded(); + void startBlocking(); + void startThread(); + bool isCanceled(); + void waitForResume(); + bool isProgressReportingEnabled(); + void setProgressValue(int progress); + void setProgressRange(int minimum, int maximum); + void acquireBarrierSemaphore(); +protected: + virtual void start() {} + virtual void finish() {} + virtual ThreadFunctionResult threadFunction() { return ThreadFinished; } + virtual bool shouldStartThread() { return futureInterface ? !futureInterface->isPaused() : true; } + virtual bool shouldThrottleThread() { return futureInterface ? futureInterface->isPaused() : false; } +private: + bool startThreadInternal(); + void startThreads(); + void threadExit(); + bool threadThrottleExit(); + void run(); + virtual void asynchronousFinish() = 0; + void handleException(const QtConcurrent::Exception &exception); +protected: + QFutureInterfaceBase *futureInterface; + QThreadPool *threadPool; + ThreadEngineBarrier barrier; + QtConcurrent::internal::ExceptionStore exceptionStore; +}; +template +class ThreadEngine : public virtual ThreadEngineBase +{ +public: + typedef T ResultType; + virtual T *result() { return 0; } + QFutureInterface *futureInterfaceTyped() + { + return static_cast *>(futureInterface); + } + T *startSingleThreaded() + { + ThreadEngineBase::startSingleThreaded(); + return result(); + } + T *startBlocking() + { + ThreadEngineBase::startBlocking(); + return result(); + } + QFuture startAsynchronously() + { + futureInterface = new QFutureInterface(); + futureInterface->reportStarted(); + QFuture future = QFuture(futureInterfaceTyped()); + start(); + acquireBarrierSemaphore(); + threadPool->start(this); + return future; + } + void asynchronousFinish() + { + finish(); + futureInterfaceTyped()->reportFinished(result()); + delete futureInterfaceTyped(); + delete this; + } + void reportResult(const T *_result, int index = -1) + { + if (futureInterface) + futureInterfaceTyped()->reportResult(_result, index); + } + void reportResults(const QVector &_result, int index = -1, int count = -1) + { + if (futureInterface) + futureInterfaceTyped()->reportResults(_result, index, count); + } +}; +template +class ThreadEngineStarterBase +{ +public: + ThreadEngineStarterBase(ThreadEngine *_threadEngine) + : threadEngine(_threadEngine) { } + inline ThreadEngineStarterBase(const ThreadEngineStarterBase &other) + : threadEngine(other.threadEngine) { } + QFuture startAsynchronously() + { + return threadEngine->startAsynchronously(); + } + operator QFuture() + { + return startAsynchronously(); + } +protected: + ThreadEngine *threadEngine; +}; +template +class ThreadEngineStarter : public ThreadEngineStarterBase +{ + typedef ThreadEngineStarterBase Base; + typedef ThreadEngine TypedThreadEngine; +public: + ThreadEngineStarter(TypedThreadEngine *eng) + : Base(eng) { } + T startBlocking() + { + T t = *this->threadEngine->startBlocking(); + delete this->threadEngine; + return t; + } +}; +template <> +class ThreadEngineStarter : public ThreadEngineStarterBase +{ +public: + ThreadEngineStarter(ThreadEngine *_threadEngine) + :ThreadEngineStarterBase(_threadEngine) {} + void startBlocking() + { + this->threadEngine->startBlocking(); + delete this->threadEngine; + } +}; +template +inline ThreadEngineStarter startThreadEngine(ThreadEngine *threadEngine) +{ + return ThreadEngineStarter(threadEngine); +} +} +typedef QtValidLicenseForCoreModule QtCoreModule; +namespace QtConcurrent { + using std::advance; +class BlockSizeManager +{ +public: + BlockSizeManager(int iterationCount); + void timeBeforeUser(); + void timeAfterUser(); + int blockSize(); +private: + inline bool blockSizeMaxed() + { + return (m_blockSize >= maxBlockSize); + } + const int maxBlockSize; + qint64 beforeUser; + qint64 afterUser; + Median controlPartElapsed; + Median userPartElapsed; + int m_blockSize; +}; +template +class ResultReporter +{ +public: + ResultReporter(ThreadEngine *_threadEngine) + :threadEngine(_threadEngine) + { + } + void reserveSpace(int resultCount) + { + currentResultCount = resultCount; + vector.resize(qMax(resultCount, vector.count())); + } + void reportResults(int begin) + { + const int useVectorThreshold = 4; + if (currentResultCount > useVectorThreshold) { + vector.resize(currentResultCount); + threadEngine->reportResults(vector, begin); + } else { + for (int i = 0; i < currentResultCount; ++i) + threadEngine->reportResult(&vector.at(i), begin + i); + } + } + inline T * getPointer() + { + return vector.data(); + } + int currentResultCount; + ThreadEngine *threadEngine; + QVector vector; +}; +template <> +class ResultReporter +{ +public: + inline ResultReporter(ThreadEngine *) { } + inline void reserveSpace(int) { }; + inline void reportResults(int) { }; + inline void * getPointer() { return 0; } +}; +inline bool selectIteration(std::bidirectional_iterator_tag) +{ + return false; +} +inline bool selectIteration(std::forward_iterator_tag) +{ + return false; +} +inline bool selectIteration(std::random_access_iterator_tag) +{ + return true; +} +template +class IterateKernel : public ThreadEngine +{ +public: + typedef T ResultType; + IterateKernel(Iterator _begin, Iterator _end) + : begin(_begin), end(_end), current(_begin), currentIndex(0), + forIteration(selectIteration(typename std::iterator_traits::iterator_category())), progressReportingEnabled(true) + { + iterationCount = forIteration ? std::distance(_begin, _end) : 0; + } + virtual ~IterateKernel() { } + virtual bool runIteration(Iterator it, int index , T *result) + { (void)it;; (void)index;; (void)result;; return false; } + virtual bool runIterations(Iterator _begin, int beginIndex, int endIndex, T *results) + { (void)_begin;; (void)beginIndex;; (void)endIndex;; (void)results;; return false; } + void start() + { + progressReportingEnabled = this->isProgressReportingEnabled(); + if (progressReportingEnabled && iterationCount > 0) + this->setProgressRange(0, iterationCount); + } + bool shouldStartThread() + { + if (forIteration) + return (currentIndex < iterationCount) && !this->shouldThrottleThread(); + else + return (iteratorThreads == 0); + } + ThreadFunctionResult threadFunction() + { + if (forIteration) + return this->forThreadFunction(); + else + return this->whileThreadFunction(); + } + ThreadFunctionResult forThreadFunction() + { + BlockSizeManager blockSizeManager(iterationCount); + ResultReporter resultReporter(this); + for(;;) { + if (this->isCanceled()) + break; + const int currentBlockSize = blockSizeManager.blockSize(); + if (currentIndex >= iterationCount) + break; + const int beginIndex = currentIndex.fetchAndAddRelease(currentBlockSize); + const int endIndex = qMin(beginIndex + currentBlockSize, iterationCount); + if (beginIndex >= endIndex) { + break; + } + this->waitForResume(); + if (shouldStartThread()) + this->startThread(); + const int finalBlockSize = endIndex - beginIndex; + resultReporter.reserveSpace(finalBlockSize); + blockSizeManager.timeBeforeUser(); + const bool resultsAvailable = this->runIterations(begin, beginIndex, endIndex, resultReporter.getPointer()); + blockSizeManager.timeAfterUser(); + if (resultsAvailable) + resultReporter.reportResults(beginIndex); + if (progressReportingEnabled) { + completed.fetchAndAddAcquire(finalBlockSize); + this->setProgressValue(this->completed); + } + if (this->shouldThrottleThread()) + return ThrottleThread; + } + return ThreadFinished; + } + ThreadFunctionResult whileThreadFunction() + { + if (iteratorThreads.testAndSetAcquire(0, 1) == false) + return ThreadFinished; + ResultReporter resultReporter(this); + resultReporter.reserveSpace(1); + while (current != end) { + Iterator prev = current; + ++current; + int index = currentIndex.fetchAndAddRelaxed(1); + iteratorThreads.testAndSetRelease(1, 0); + this->waitForResume(); + if (shouldStartThread()) + this->startThread(); + const bool resultAavailable = this->runIteration(prev, index, resultReporter.getPointer()); + if (resultAavailable) + resultReporter.reportResults(index); + if (this->shouldThrottleThread()) + return ThrottleThread; + if (iteratorThreads.testAndSetAcquire(0, 1) == false) + return ThreadFinished; + } + return ThreadFinished; + } +public: + const Iterator begin; + const Iterator end; + Iterator current; + QAtomicInt currentIndex; + bool forIteration; + QAtomicInt iteratorThreads; + int iterationCount; + bool progressReportingEnabled; + QAtomicInt completed; +}; +} +typedef QtValidLicenseForCoreModule QtCoreModule; +namespace QtConcurrent { +enum { + ReduceQueueStartLimit = 20, + ReduceQueueThrottleLimit = 30 +}; +template +class IntermediateResults +{ +public: + int begin, end; + QVector vector; +}; +enum ReduceOption { + UnorderedReduce = 0x1, + OrderedReduce = 0x2, + SequentialReduce = 0x4 +}; +typedef QFlags ReduceOptions; + inline QFlags operator|(ReduceOptions::enum_type f1, ReduceOptions::enum_type f2) { return QFlags(f1) | f2; } inline QFlags operator|(ReduceOptions::enum_type f1, QFlags f2) { return f2 | f1; } inline QIncompatibleFlag operator|(ReduceOptions::enum_type f1, int f2) { return QIncompatibleFlag(int(f1) | f2); } +template +class ReduceKernel +{ + typedef QMap > ResultsMap; + const ReduceOptions reduceOptions; + QMutex mutex; + int progress, resultsMapSize, threadCount; + ResultsMap resultsMap; + bool canReduce(int begin) const + { + return (((reduceOptions & UnorderedReduce) + && progress == 0) + || ((reduceOptions & OrderedReduce) + && progress == begin)); + } + void reduceResult(ReduceFunctor &reduce, + ReduceResultType &r, + const IntermediateResults &result) + { + for (int i = 0; i < result.vector.size(); ++i) { + reduce(r, result.vector.at(i)); + } + } + void reduceResults(ReduceFunctor &reduce, + ReduceResultType &r, + ResultsMap &map) + { + typename ResultsMap::iterator it = map.begin(); + while (it != map.end()) { + reduceResult(reduce, r, it.value()); + ++it; + } + } +public: + ReduceKernel(ReduceOptions _reduceOptions) + : reduceOptions(_reduceOptions), progress(0), resultsMapSize(0), + threadCount(QThreadPool::globalInstance()->maxThreadCount()) + { } + void runReduce(ReduceFunctor &reduce, + ReduceResultType &r, + const IntermediateResults &result) + { + QMutexLocker locker(&mutex); + if (!canReduce(result.begin)) { + ++resultsMapSize; + resultsMap.insert(result.begin, result); + return; + } + if (reduceOptions & UnorderedReduce) { + progress = -1; + locker.unlock(); + reduceResult(reduce, r, result); + locker.relock(); + while (!resultsMap.isEmpty()) { + ResultsMap resultsMapCopy = resultsMap; + resultsMap.clear(); + locker.unlock(); + reduceResults(reduce, r, resultsMapCopy); + locker.relock(); + resultsMapSize -= resultsMapCopy.size(); + } + progress = 0; + } else { + locker.unlock(); + reduceResult(reduce, r, result); + locker.relock(); + progress += result.end - result.begin; + typename ResultsMap::iterator it = resultsMap.begin(); + while (it != resultsMap.end()) { + if (it.value().begin != progress) + break; + locker.unlock(); + reduceResult(reduce, r, it.value()); + locker.relock(); + --resultsMapSize; + progress += it.value().end - it.value().begin; + it = resultsMap.erase(it); + } + } + } + void finish(ReduceFunctor &reduce, ReduceResultType &r) + { + reduceResults(reduce, r, resultsMap); + } + inline bool shouldThrottle() + { + return (resultsMapSize > (ReduceQueueThrottleLimit * threadCount)); + } + inline bool shouldStartThread() + { + return (resultsMapSize <= (ReduceQueueStartLimit * threadCount)); + } +}; +template +struct SequenceHolder2 : public Base +{ + SequenceHolder2(const Sequence &_sequence, + Functor1 functor1, + Functor2 functor2, + ReduceOptions reduceOptions) + : Base(_sequence.begin(), _sequence.end(), functor1, functor2, reduceOptions), + sequence(_sequence) + { } + Sequence sequence; + void finish() + { + Base::finish(); + sequence = Sequence(); + } +}; +} +typedef QtValidLicenseForCoreModule QtCoreModule; +namespace QtConcurrent { +template +class MapKernel : public IterateKernel +{ + MapFunctor map; +public: + typedef void ReturnType; + MapKernel(Iterator begin, Iterator end, MapFunctor _map) + : IterateKernel(begin, end), map(_map) + { } + bool runIteration(Iterator it, int, void *) + { + map(*it); + return false; + } + bool runIterations(Iterator sequenceBeginIterator, int beginIndex, int endIndex, void *) + { + Iterator it = sequenceBeginIterator; + advance(it, beginIndex); + for (int i = beginIndex; i < endIndex; ++i) { + runIteration(it, i, 0); + advance(it, 1); + } + return false; + } +}; +template > +class MappedReducedKernel : public IterateKernel +{ + ReducedResultType reducedResult; + MapFunctor map; + ReduceFunctor reduce; + Reducer reducer; +public: + typedef ReducedResultType ReturnType; + MappedReducedKernel(Iterator begin, Iterator end, MapFunctor _map, ReduceFunctor _reduce, ReduceOptions reduceOptions) + : IterateKernel(begin, end), reducedResult(), map(_map), reduce(_reduce), reducer(reduceOptions) + { } + MappedReducedKernel(ReducedResultType initialValue, + MapFunctor _map, + ReduceFunctor _reduce) + : reducedResult(initialValue), map(_map), reduce(_reduce) + { } + bool runIteration(Iterator it, int index, ReducedResultType *) + { + IntermediateResults results; + results.begin = index; + results.end = index + 1; + results.vector.append(map(*it)); + reducer.runReduce(reduce, reducedResult, results); + return false; + } + bool runIterations(Iterator sequenceBeginIterator, int begin, int end, ReducedResultType *) + { + IntermediateResults results; + results.begin = begin; + results.end = end; + results.vector.reserve(end - begin); + Iterator it = sequenceBeginIterator; + advance(it, begin); + for (int i = begin; i < end; ++i) { + results.vector.append(map(*(it))); + advance(it, 1); + } + reducer.runReduce(reduce, reducedResult, results); + return false; + } + void finish() + { + reducer.finish(reduce, reducedResult); + } + bool shouldThrottleThread() + { + return IterateKernel::shouldThrottleThread() || reducer.shouldThrottle(); + } + bool shouldStartThread() + { + return IterateKernel::shouldStartThread() && reducer.shouldStartThread(); + } + typedef ReducedResultType ResultType; + ReducedResultType *result() + { + return &reducedResult; + } +}; +template +class MappedEachKernel : public IterateKernel +{ + MapFunctor map; + typedef typename MapFunctor::result_type T; +public: + typedef T ReturnType; + typedef T ResultType; + MappedEachKernel(Iterator begin, Iterator end, MapFunctor _map) + : IterateKernel(begin, end), map(_map) { } + bool runIteration(Iterator it, int, T *result) + { + *result = map(*it); + return true; + } + bool runIterations(Iterator sequenceBeginIterator, int begin, int end, T *results) + { + Iterator it = sequenceBeginIterator; + advance(it, begin); + for (int i = begin; i < end; ++i) { + runIteration(it, i, results + (i - begin)); + advance(it, 1); + } + return true; + } +}; +template +inline ThreadEngineStarter startMap(Iterator begin, Iterator end, Functor functor) +{ + return startThreadEngine(new MapKernel(begin, end, functor)); +} +template +inline ThreadEngineStarter startMapped(Iterator begin, Iterator end, Functor functor) +{ + return startThreadEngine(new MappedEachKernel(begin, end, functor)); +} +template +struct SequenceHolder1 : public Base +{ + SequenceHolder1(const Sequence &_sequence, Functor functor) + : Base(_sequence.begin(), _sequence.end(), functor), sequence(_sequence) + { } + Sequence sequence; + void finish() + { + Base::finish(); + sequence = Sequence(); + } +}; +template +inline ThreadEngineStarter startMapped(const Sequence &sequence, Functor functor) +{ + typedef SequenceHolder1, Functor> + SequenceHolderType; + return startThreadEngine(new SequenceHolderType(sequence, functor)); +} +template +inline ThreadEngineStarter startMappedReduced(const Sequence & sequence, + MapFunctor mapFunctor, ReduceFunctor reduceFunctor, + ReduceOptions options) +{ + typedef typename Sequence::const_iterator Iterator; + typedef ReduceKernel Reducer; + typedef MappedReducedKernel MappedReduceType; + typedef SequenceHolder2 SequenceHolderType; + return startThreadEngine(new SequenceHolderType(sequence, mapFunctor, reduceFunctor, options)); +} +template +inline ThreadEngineStarter startMappedReduced(Iterator begin, Iterator end, + MapFunctor mapFunctor, ReduceFunctor reduceFunctor, + ReduceOptions options) +{ + typedef ReduceKernel Reducer; + typedef MappedReducedKernel MappedReduceType; + return startThreadEngine(new MappedReduceType(begin, end, mapFunctor, reduceFunctor, options)); +} +} +typedef QtValidLicenseForCoreModule QtCoreModule; +namespace QtConcurrent { +template +struct qValueType +{ + typedef typename T::value_type value_type; +}; +template +struct qValueType +{ + typedef T value_type; +}; +template +struct qValueType +{ + typedef T value_type; +}; +template +class FilterKernel : public IterateKernel +{ + typedef ReduceKernel Reducer; + typedef IterateKernel IterateKernelType; + typedef typename ReduceFunctor::result_type T; + Sequence reducedResult; + Sequence &sequence; + KeepFunctor keep; + ReduceFunctor reduce; + Reducer reducer; +public: + FilterKernel(Sequence &_sequence, KeepFunctor _keep, ReduceFunctor _reduce) + : IterateKernelType(const_cast(_sequence).begin(), const_cast(_sequence).end()), reducedResult(), + sequence(_sequence), + keep(_keep), + reduce(_reduce), + reducer(OrderedReduce) + { } + bool runIteration(typename Sequence::const_iterator it, int index, T *) + { + IntermediateResults results; + results.begin = index; + results.end = index + 1; + if (keep(*it)) + results.vector.append(*it); + reducer.runReduce(reduce, reducedResult, results); + return false; + } + bool runIterations(typename Sequence::const_iterator sequenceBeginIterator, int begin, int end, T *) + { + IntermediateResults results; + results.begin = begin; + results.end = end; + results.vector.reserve(end - begin); + typename Sequence::const_iterator it = sequenceBeginIterator; + advance(it, begin); + for (int i = begin; i < end; ++i) { + if (keep(*it)) + results.vector.append(*it); + advance(it, 1); + } + reducer.runReduce(reduce, reducedResult, results); + return false; + } + void finish() + { + reducer.finish(reduce, reducedResult); + sequence = reducedResult; + } + inline bool shouldThrottleThread() + { + return IterateKernelType::shouldThrottleThread() || reducer.shouldThrottle(); + } + inline bool shouldStartThread() + { + return IterateKernelType::shouldStartThread() && reducer.shouldStartThread(); + } + typedef void ReturnType; + typedef void ResultType; +}; +template ::value_type> > +class FilteredReducedKernel : public IterateKernel +{ + ReducedResultType reducedResult; + KeepFunctor keep; + ReduceFunctor reduce; + Reducer reducer; + typedef IterateKernel IterateKernelType; +public: + FilteredReducedKernel(Iterator begin, + Iterator end, + KeepFunctor _keep, + ReduceFunctor _reduce, + ReduceOptions reduceOption) + : IterateKernelType(begin, end), reducedResult(), keep(_keep), reduce(_reduce), reducer(reduceOption) + { } + bool runIteration(Iterator it, int index, ReducedResultType *) + { + IntermediateResults::value_type> results; + results.begin = index; + results.end = index + 1; + if (keep(*it)) + results.vector.append(*it); + reducer.runReduce(reduce, reducedResult, results); + return false; + } + bool runIterations(Iterator sequenceBeginIterator, int begin, int end, ReducedResultType *) + { + IntermediateResults::value_type> results; + results.begin = begin; + results.end = end; + results.vector.reserve(end - begin); + Iterator it = sequenceBeginIterator; + advance(it, begin); + for (int i = begin; i < end; ++i) { + if (keep(*it)) + results.vector.append(*it); + advance(it, 1); + } + reducer.runReduce(reduce, reducedResult, results); + return false; + } + void finish() + { + reducer.finish(reduce, reducedResult); + } + inline bool shouldThrottleThread() + { + return IterateKernelType::shouldThrottleThread() || reducer.shouldThrottle(); + } + inline bool shouldStartThread() + { + return IterateKernelType::shouldStartThread() && reducer.shouldStartThread(); + } + typedef ReducedResultType ReturnType; + typedef ReducedResultType ResultType; + ReducedResultType *result() + { + return &reducedResult; + } +}; +template +class FilteredEachKernel : public IterateKernel::value_type> +{ + typedef typename qValueType::value_type T; + typedef IterateKernel IterateKernelType; + KeepFunctor keep; +public: + typedef T ReturnType; + typedef T ResultType; + FilteredEachKernel(Iterator begin, Iterator end, KeepFunctor _keep) + : IterateKernelType(begin, end), keep(_keep) + { } + void start() + { + if (this->futureInterface) + this->futureInterface->setFilterMode(true); + IterateKernelType::start(); + } + bool runIteration(Iterator it, int index, T *) + { + if (keep(*it)) + this->reportResult(&(*it), index); + else + this->reportResult(0, index); + return false; + } + bool runIterations(Iterator sequenceBeginIterator, int begin, int end, T *) + { + const int count = end - begin; + IntermediateResults::value_type> results; + results.begin = begin; + results.end = end; + results.vector.reserve(count); + Iterator it = sequenceBeginIterator; + advance(it, begin); + for (int i = begin; i < end; ++i) { + if (keep(*it)) + results.vector.append(*it); + advance(it, 1); + } + this->reportResults(results.vector, begin, count); + return false; + } +}; +template +inline +ThreadEngineStarter::value_type> +startFiltered(Iterator begin, Iterator end, KeepFunctor functor) +{ + return startThreadEngine(new FilteredEachKernel(begin, end, functor)); +} +template +inline ThreadEngineStarter +startFiltered(const Sequence &sequence, KeepFunctor functor) +{ + typedef SequenceHolder1, + KeepFunctor> + SequenceHolderType; + return startThreadEngine(new SequenceHolderType(sequence, functor)); +} +template +inline ThreadEngineStarter startFilteredReduced(const Sequence & sequence, + MapFunctor mapFunctor, ReduceFunctor reduceFunctor, + ReduceOptions options) +{ + typedef typename Sequence::const_iterator Iterator; + typedef ReduceKernel::value_type > Reducer; + typedef FilteredReducedKernel FilteredReduceType; + typedef SequenceHolder2 SequenceHolderType; + return startThreadEngine(new SequenceHolderType(sequence, mapFunctor, reduceFunctor, options)); +} +template +inline ThreadEngineStarter startFilteredReduced(Iterator begin, Iterator end, + MapFunctor mapFunctor, ReduceFunctor reduceFunctor, + ReduceOptions options) +{ + typedef ReduceKernel::value_type> Reducer; + typedef FilteredReducedKernel FilteredReduceType; + return startThreadEngine(new FilteredReduceType(begin, end, mapFunctor, reduceFunctor, options)); +} +} +typedef QtValidLicenseForCoreModule QtCoreModule; +namespace QtConcurrent { +template +class FunctionWrapper0 +{ +public: + typedef T (*FunctionPointerType)(); + typedef T result_type; + inline FunctionWrapper0(FunctionPointerType _functionPointer) + :functionPointer(_functionPointer) { } + inline T operator()() + { + return functionPointer(); + } +private: + FunctionPointerType functionPointer; +}; +template +class FunctionWrapper1 +{ +public: + typedef T (*FunctionPointerType)(U u); + typedef T result_type; + inline FunctionWrapper1(FunctionPointerType _functionPointer) + :functionPointer(_functionPointer) { } + inline T operator()(U u) + { + return functionPointer(u); + } +private: + FunctionPointerType functionPointer; +}; +template +class FunctionWrapper2 +{ +public: + typedef T (*FunctionPointerType)(U u, V v); + typedef T result_type; + inline FunctionWrapper2(FunctionPointerType _functionPointer) + :functionPointer(_functionPointer) { } + inline T operator()(U u, V v) + { + return functionPointer(u, v); + } +private: + FunctionPointerType functionPointer; +}; +template +class MemberFunctionWrapper +{ +public: + typedef T (C::*FunctionPointerType)(); + typedef T result_type; + inline MemberFunctionWrapper(FunctionPointerType _functionPointer) + :functionPointer(_functionPointer) { } + inline T operator()(C &c) + { + return (c.*functionPointer)(); + } +private: + FunctionPointerType functionPointer; +}; +template +class MemberFunctionWrapper1 +{ +public: + typedef T (C::*FunctionPointerType)(U); + typedef T result_type; + inline MemberFunctionWrapper1(FunctionPointerType _functionPointer) + : functionPointer(_functionPointer) + { } + inline T operator()(C &c, U u) + { + return (c.*functionPointer)(u); + } +private: + FunctionPointerType functionPointer; +}; +template +class ConstMemberFunctionWrapper +{ +public: + typedef T (C::*FunctionPointerType)() const; + typedef T result_type; + inline ConstMemberFunctionWrapper(FunctionPointerType _functionPointer) + :functionPointer(_functionPointer) { } + inline T operator()(const C &c) const + { + return (c.*functionPointer)(); + } +private: + FunctionPointerType functionPointer; +}; +} +namespace QtPrivate { +template +const T& createFunctionWrapper(const T& t) +{ + return t; +} +template +QtConcurrent::FunctionWrapper1 createFunctionWrapper(T (*func)(U)) +{ + return QtConcurrent::FunctionWrapper1(func); +} +template +QtConcurrent::MemberFunctionWrapper createFunctionWrapper(T (C::*func)()) +{ + return QtConcurrent::MemberFunctionWrapper(func); +} +template +QtConcurrent::MemberFunctionWrapper1 createFunctionWrapper(T (C::*func)(U)) +{ + return QtConcurrent::MemberFunctionWrapper1(func); +} +template +QtConcurrent::ConstMemberFunctionWrapper createFunctionWrapper(T (C::*func)() const) +{ + return QtConcurrent::ConstMemberFunctionWrapper(func); +} +struct PushBackWrapper +{ + typedef void result_type; + template + inline void operator()(C &c, const U &u) const + { + return c.push_back(u); + } +}; +template ::Value> +struct LazyResultType { typedef typename Functor::result_type Type; }; +template +struct LazyResultType { typedef void Type; }; +template +struct ReduceResultType; +template +struct ReduceResultType +{ + typedef U ResultType; +}; +template +struct ReduceResultType +{ + typedef C ResultType; +}; +template +struct MapResultType +{ + typedef typename LazyResultType::Type ResultType; +}; +template +struct MapResultType +{ + typedef U ResultType; +}; +template +struct MapResultType +{ + typedef T ResultType; +}; +template